1import{b as te}from"./chunk-3TIUSOGG.js";import{a as R}from"./chunk-SWGX6VYE.js";import{a as F}from"./chunk-CVPCRE5I.js";import{$ as Y,Bb as f,Bc as A,Ca as J,Cb as H,Db as L,Fa as Q,La as w,Lb as Z,M as b,Pb as S,Ra as C,S as P,T as B,U as D,V as I,Ya as y,Z as M,_ as j,aa as G,bb as m,bc as $,ca as k,cb as h,d as q,db as W,ka as a,kb as X,mb as v,qc as T,uc as ee,ya as p,za as c}from"./chunk-7OI6FXJV.js";import{a as O,b as x,f as e,g as u}from"./chunk-JNGVGNCT.js";var E=new D("@sweetalert2/ngx-sweetalert2#swalProvider"),N=new D("@sweetalert2/ngx-sweetalert2#fireOnInit"),z=new D("@sweetalert2/ngx-sweetalert2#dismissOnDestroy"),K=(()=>{let i=class i{constructor(t){e(this,"swalProvider");e(this,"swalPromiseCache");this.swalProvider=t}get swal(){return this.swalPromiseCache||this.preloadSweetAlertLibrary(),this.swalPromiseCache}preloadSweetAlertLibrary(){if(this.swalPromiseCache)return;let t=n(this.swalProvider)?this.swalProvider():Promise.resolve(this.swalProvider);this.swalPromiseCache=t.then(r=>s(r)?r:r.default);function n(r){return typeof r=="function"&&r.version===void 0}function s(r){return typeof r=="function"}}};e(i,"\u0275fac",function(n){return new(n||i)(I(E))}),e(i,"\u0275prov",P({token:i,factory:i.\u0275fac}));let o=i;return o})(),ie=(()=>{let i=class i{constructor(t,n,s){e(this,"sweetAlert2Loader");e(this,"moduleLevelFireOnInit");e(this,"moduleLevelDismissOnDestroy");e(this,"title");e(this,"titleText");e(this,"text");e(this,"html");e(this,"footer");e(this,"icon");e(this,"iconColor");e(this,"iconHtml");e(this,"backdrop");e(this,"toast");e(this,"target");e(this,"input");e(this,"width");e(this,"padding");e(this,"background");e(this,"position");e(this,"grow");e(this,"showClass");e(this,"hideClass");e(this,"customClass");e(this,"timer");e(this,"timerProgressBar");e(this,"heightAuto");e(this,"allowOutsideClick");e(this,"allowEscapeKey");e(this,"allowEnterKey");e(this,"stopKeydownPropagation");e(this,"keydownListenerCapture");e(this,"showConfirmButton");e(this,"showDenyButton");e(this,"showCancelButton");e(this,"confirmButtonText");e(this,"denyButtonText");e(this,"cancelButtonText");e(this,"confirmButtonColor");e(this,"denyButtonColor");e(this,"cancelButtonColor");e(this,"confirmButtonAriaLabel");e(this,"denyButtonAriaLabel");e(this,"cancelButtonAriaLabel");e(this,"buttonsStyling");e(this,"reverseButtons");e(this,"focusConfirm");e(this,"focusDeny");e(this,"focusCancel");e(this,"showCloseButton");e(this,"closeButtonHtml");e(this,"closeButtonAriaLabel");e(this,"loaderHtml");e(this,"showLoaderOnConfirm");e(this,"preConfirm");e(this,"preDeny");e(this,"imageUrl");e(this,"imageWidth");e(this,"imageHeight");e(this,"imageAlt");e(this,"inputLabel");e(this,"inputPlaceholder");e(this,"inputValue");e(this,"inputOptions");e(this,"inputAutoTrim");e(this,"inputAttributes");e(this,"inputValidator");e(this,"returnInputValueOnDeny");e(this,"validationMessage");e(this,"progressSteps");e(this,"currentProgressStep");e(this,"progressStepsDistance");e(this,"scrollbarPadding");e(this,"swalFireOnInit");e(this,"swalDismissOnDestroy");e(this,"willOpen",new a);e(this,"didOpen",new a);e(this,"didRender",new a);e(this,"willClose",new a);e(this,"didClose",new a);e(this,"didDestroy",new a);e(this,"confirm",new a);e(this,"deny",new a);e(this,"dismiss",new a);e(this,"touchedProps",new Set);e(this,"markTouched",this.touchedProps.add.bind(this.touchedProps));e(this,"isCurrentlyShown",!1);this.sweetAlert2Loader=t,this.moduleLevelFireOnInit=n,this.moduleLevelDismissOnDestroy=s}set swalOptions(t){Object.assign(this,t),Object.keys(t).forEach(this.markTouched)}get swalOptions(){return[...this.touchedProps].reduce((t,n)=>x(O({},t),{[n]:this[n]}),{})}set swalVisible(t){t?this.fire():this.close()}get swalVisible(){return this.isCurrentlyShown}ngOnInit(){this.sweetAlert2Loader.preloadSweetAlertLibrary()}ngAfterViewInit(){(this.swalFireOnInit===void 0?this.moduleLevelFireOnInit:this.swalFireOnInit)&&this.fire()}ngOnChanges(t){Object.keys(t).filter(n=>!n.startsWith("swal")).forEach(this.markTouched),this.update()}ngOnDestroy(){(this.swalDismissOnDestroy===void 0?this.moduleLevelDismissOnDestroy:this.swalDismissOnDestroy)&&this.close()}fire(){return u(this,null,function*(){let t=yield this.sweetAlert2Loader.swal,n=this.swalOptions,s=x(O({},n),{willOpen:d(n.willOpen,l=>{this.willOpen.emit({modalElement:l})}),didOpen:d(n.didOpen,l=>{this.isCurrentlyShown=!0,this.didOpen.emit({modalElement:l})}),didRender:d(n.didRender,l=>{this.didRender.emit({modalElement:l})}),willClose:d(n.willClose,l=>{this.isCurrentlyShown=!1,this.willClose.emit({modalElement:l})}
1),didClose:d(n.didClose,()=>{this.didClose.emit()}),didDestroy:d(n.didDestroy,()=>{this.didDestroy.emit()})}),r=yield t.fire(s);switch(!0){case r.isConfirmed:this.confirm.emit(r.value);break;case r.isDenied:this.deny.emit();break;case r.isDismissed:this.dismiss.emit(r.dismiss);break}return r;function d(l,ae){return(...U)=>(ae(...U),l?.(...U))}})}close(t){return u(this,null,function*(){if(!this.isCurrentlyShown)return;(yield this.sweetAlert2Loader.swal).close(t)})}update(t){return u(this,null,function*(){if(t&&(this.swalOptions=t),!this.isCurrentlyShown)return;let n=yield this.sweetAlert2Loader.swal,s=this.swalOptions,r=Object.keys(s).filter(n.isUpdatableParameter).reduce((d,l)=>x(O({},d),{[l]:s[l]}),{});n.update(r)})}};e(i,"\u0275fac",function(n){return new(n||i)(c(K),c(N),c(z))}),e(i,"\u0275cmp",M({type:i,selectors:[["swal"]],inputs:{title:"title",titleText:"titleText",text:"text",html:"html",footer:"footer",icon:"icon",iconColor:"iconColor",iconHtml:"iconHtml",backdrop:"backdrop",toast:"toast",target:"target",input:"input",width:"width",padding:"padding",background:"background",position:"position",grow:"grow",showClass:"showClass",hideClass:"hideClass",customClass:"customClass",timer:"timer",timerProgressBar:"timerProgressBar",heightAuto:"heightAuto",allowOutsideClick:"allowOutsideClick",allowEscapeKey:"allowEscapeKey",allowEnterKey:"allowEnterKey",stopKeydownPropagation:"stopKeydownPropagation",keydownListenerCapture:"keydownListenerCapture",showConfirmButton:"showConfirmButton",showDenyButton:"showDenyButton",showCancelButton:"showCancelButton",confirmButtonText:"confirmButtonText",denyButtonText:"denyButtonText",cancelButtonText:"cancelButtonText",confirmButtonColor:"confirmButtonColor",denyButtonColor:"denyButtonColor",cancelButtonColor:"cancelButtonColor",confirmButtonAriaLabel:"confirmButtonAriaLabel",denyButtonAriaLabel:"denyButtonAriaLabel",cancelButtonAriaLabel:"cancelButtonAriaLabel",buttonsStyling:"buttonsStyling",reverseButtons:"reverseButtons",focusConfirm:"focusConfirm",focusDeny:"focusDeny",focusCancel:"focusCancel",showCloseButton:"showCloseButton",closeButtonHtml:"closeButtonHtml",closeButtonAriaLabel:"closeButtonAriaLabel",loaderHtml:"loaderHtml",showLoaderOnConfirm:"showLoaderOnConfirm",preConfirm:"preConfirm",preDeny:"preDeny",imageUrl:"imageUrl",imageWidth:"imageWidth",imageHeight:"imageHeight",imageAlt:"imageAlt",inputLabel:"inputLabel",inputPlaceholder:"inputPlaceholder",inputValue:"inputValue",inputOptions:"inputOptions",inputAutoTrim:"inputAutoTrim",inputAttributes:"inputAttributes",inputValidator:"inputValidator",returnInputValueOnDeny:"returnInputValueOnDeny",validationMessage:"validationMessage",progressSteps:"progressSteps",currentProgressStep:"currentProgressStep",progressStepsDistance:"progressStepsDistance",scrollbarPadding:"scrollbarPadding",swalOptions:"swalOptions",swalFireOnInit:"swalFireOnInit",swalDismissOnDestroy:"swalDismissOnDestroy",swalVisible:"swalVisible"},outputs:{willOpen:"willOpen",didOpen:"didOpen",didRender:"didRender",willClose:"willClose",didClose:"didClose",didDestroy:"didDestroy",confirm:"confirm",deny:"deny",dismiss:"dism
1iss"},features:[k],decls:0,vars:0,template:function(n,s){},encapsulation:2,changeDetection:0}));let o=i;return o})(),ne=(()=>{let i=class i{constructor(t,n){e(this,"viewContainerRef");e(this,"resolver");e(this,"confirm",new a);e(this,"deny",new a);e(this,"dismiss",new a);e(this,"swalRef");e(this,"swalInstance");e(this,"swalOptions");this.viewContainerRef=t,this.resolver=n}set swal(t){t instanceof ie?this.swalInstance=t:n(t)?(this.swalOptions={},[this.swalOptions.title,this.swalOptions.text,this.swalOptions.icon]=t):this.swalOptions=t;function n(s){return Array.isArray(t)}}ngOnInit(){if(!this.swalInstance){let t=this.resolver.resolveComponentFactory(ie);this.swalRef=this.viewContainerRef.createComponent(t),this.swalInstance=this.swalRef.instance}}ngOnDestroy(){this.swalRef&&this.swalRef.destroy()}onClick(t){if(t.preventDefault(),t.stopImmediatePropagation(),t.stopPropagation(),!this.swalInstance)return;this.swalOptions&&(this.swalInstance.swalOptions=this.swalOptions);let n=new q;this.swalInstance.confirm.asObservable().pipe(b(n)).subscribe(s=>this.confirm.emit(s)),this.swalInstance.deny.asObservable().pipe(b(n)).subscribe(s=>this.deny.emit(s)),this.swalInstance.dismiss.asObservable().pipe(b(n)).subscribe(s=>this.dismiss.emit(s)),this.swalInstance.fire().then(()=>n.next())}};e(i,"\u0275fac",function(n){return new(n||i)(c(Q),c(J))}),e(i,"\u0275dir",Y({type:i,selectors:[["","swal",""]],hostBindings:function(n,s){n&1&&X("click",function(d){return s.onClick(d)})},inputs:{swal:"swal"}
1,outputs:{confirm:"confirm",deny:"deny",dismiss:"dismiss"}}));let o=i;return o})();function le(){return import("./chunk-Z2NAD2DM.js")}var oe=(()=>{let i=class i{static forRoot(t={}){return{ngModule:i,providers:[K,{provide:E,useValue:t.provideSwal||le},{provide:N,useValue:t.fireOnInit||!1},{provide:z,useValue:t.dismissOnDestroy||!0}]}}static forChild(t={}){return{ngModule:i,providers:[...t.provideSwal?[K,{provide:E,useValue:t.provideSwal}]:[],...t.fireOnInit!==void 0?[{provide:N,useValue:t.fireOnInit}]:[],...t.dismissOnDestroy!==void 0?[{provide:z,useValue:t.dismissOnDestroy}]:[]]}}};e(i,"\u0275fac",function(n){return new(n||i)}),e(i,"\u0275mod",j({type:i})),e(i,"\u0275inj",B({imports:[A]}));let o=i;return o})();var V=(()=>{let i=class i{constructor(t){this.locale=t,this.lowerWeight=F.lowerweight,this.upperWeight=F.upperweight,this.unitsWeight=F.unitsweight}transform(t,n){return n?t<1?T(t*this.unitsWeight,this.locale,"1.0-0")+this.lowerWeight:T(t,this.locale,"1.0-2")+this.upperWeight:T(t,this.locale,"1.0-2")+this.upperWeight}};i.\u0275fac=function(n){return new(n||i)(c($,16))},i.\u0275pipe=G({name:"customWeight",type:i,pure:!0});let o=i;return o})();var se=(()=>{let i=class i{constructor(t){this.siteConfigService=t,this.init()}init(){return u(this,null,function*(){this.allowedBasketWeight=yield this.siteConfigService.getAllowedBasketWeightForDisplay()})}getBoxes(t){return t%(this.allowedBasketWeight||0)===0?Math.floor(t/(this.allowedBasketWeight||0)):Math.floor(t/(this.allowedBasketWeight||0))+1}getNextLevelWeight(t){let n=this.getBoxes(t);return n>0?n*(this.allowedBasketWeight||0):this.allowedBasketWeight||0}getRemaining(t,n=0){return this.getNextLevelWeight(t)-(t+n)}};i.\u0275fac=function(n){return new(n||i)(I(R))},i.\u0275prov=P({token:i,factory:i.\u0275fac,providedIn:"root"});let o=i;return o})();var ue=o=>({title:"Delivery Box Details",html:o,icon:"info",showCancelButton:!1,confirmButtonText:"OK I UNDERSTAND"}),re=o=>({"width.%":o});function me(o,i){if(o&1&&(m(0,"div",0),f(1),h()),o&2){let g=v();p(),H(g.weightTitle)}}function ge(o,i){if(o&1&&W(0,"div",8),o&2){let g=v();C("ngStyle",S(1,re,g.projectedPercentage))}}function fe(o,i){if(o&1&&W(0,"div",9),o&2){let g=v();C("ngStyle",S(1,re,g.getPercentage()))}}function we(o,i){if(o&1&&(m(0,"div",12),f(1),h()),o&2){let g=v();p(),H(g.boxes)}}var Ue=(()=>{let i=class i{constructor(t,n,s){this.boxService=t,this.customWeight=n,this.siteConfigService=s,this.weight=0,this.boxes=1,this.projectedWeight=0,this.projectedPercentage=0,this.projectedPercentageMax=0}ngOnInit(){return u(this,null,function*(){this.allowedBasketWeight=yield this.siteConfigService.getAllowedBasketWeightForDisplay()})}ngOnChanges(t){t.projectedWeight&&t.projectedWeight.currentValue!==t.projectedWeight.previousValue&&(t.projectedWeight.currentValue!==0?(this.projectedPercentageMax=this.getProjectedPercentages(),this.projectedPercentage=this.getPercentage(),setTimeout(()=>this.increaseProgress(),10)):(this.projectedPercentageMax=0,this.projectedPercentage=0))}getNextLevelWeight(){return this.boxService.getNextLevelWeight(this.weight)}formatWeight(t){return this.customWeight.transform(t,!1)}getPercentage(){let t=this.getRemaining();return t>0?Math.floor(((this.allowedBasketWeight||0)-t)/(this.allowedBasketWeight||0)*100):this.weight==0?0:100}getProjectedPercentages(){let t=this.getRemaining(this.projectedWeight);return t>0?Math.floor(((this.allowedBasketWeight||0)-t)/(this.allowedBasketWeight||0)*100):this.weight==0?0:100}getRemaining(t=0){return this.boxService.getNextLevelWeight(this.weight)-(this.weight+t)}getBasketDetails(){let t="";return this.boxes&&(t+="Your order currently requires "+this.boxes+(this.boxes==1?" box":" boxes"),t+=" ("+this.formatWeight(this.allowedBasketWeight||0)+").<br>",t+="You are currently "+this.getPercentage()+"% into this box.<br>",t+="This leaves you "+this.formatWeight(this.getRemaining())+" remaining before another box will be required."),t}increaseProgress(){let t=setInterval(()=>{this.projectedPercentage<this.projectedPercentageMax?this.projectedPercentage+=1:clearInterval(t)},17)}};i.\u0275fac=function(n){return new(n||i)(c(se),c(V),c(R))},i.\u0275cmp=M({type:i,selectors:[["af-weight-indicator"]],inputs:{weightTitle:"weightTitle",weight:"weight",boxes:"boxes",projectedWeight:"projectedWeight"},features:[Z([V]),k],decls:17,vars:10,consts:[[1,"deliveryTitle"],["id","flexContainer"],["id","progressContainer"],["id","progressUsed"],[1,"percentage_used"],[1,"percentage_weight"],[1,"percentage_total"],["id","progressOf",1,"percentage_weight"],["id","progressBarProjected",3,"ngStyle"],["id","progressBar",3,"ngStyle"],[1,"boxesUsed"],["src","/assets/images/icons/box.svg","alt","Delivery Basket","height","30px","width","30px",1,"infoImg",3,"swal"],[1,"boxesNumber"]],template:function(n,s){n&1&&(w(0,me,2,1,"div",0),m(1,"div",1)(2,"div",2)(3,"span",3)(4,"span",4),f(5,"Used: "),h(),m(6,"span",5),f(7),h(),m(8,"span",6),f(9),h()(),m(10,"span",7),f(11),h(),w(12,ge,1,3,"div",8)(13,fe,1,3,"div",9),h(),m(14,"div",10),W(15,"img",11),w(16,we,2,1,"div",12),h()()),n&2&&(y(s.weightTitle?0:-1),p(7),L(" ",s.formatWeight(s.weight?s.weight:0)," "),p(2),L(" (",s.getPercentage(),"%)"),p(2),L(" ",s.formatWeight(s.getNextLevelWeight())," "),p(),y(s.projectedWeight>0&&s.projectedPercentageMax>2&&s.projectedPercentageMax<100?12:-1),p(),y(s.getPercentage()>2?13:-1),p(2),C("swal",S(8,ue,s.getBasketDetails())),p(),y(s.boxes?16:-1))},dependencies:[ee,ne],styles:["[_nghost-%COMP%] .deliveryTitle[_ngcontent-%COMP%]{text-align:center;color:var(--default-color);font-size:14px}[_nghost-%COMP%] #flexContainer[_ngcontent-%COMP%]{display:flex;flex-direction:row;width:100%}[_nghost-%COMP%] #progressContainer[_ngcontent-%COMP%]{border-radius:var(--border-radius-small);flex-grow:1;margin:8px 0;min-height:var(--weight-progress-bar-size);background:#f5f5f5;position:relative;color:var(--secondary-color);box-shadow:0 3px 7px #a7a7a780}[_nghost-%COMP%] #progressUsed[_ngcontent-%COMP%]{position:absolute;
1left:7px;top:6px;z-index:3}[_nghost-%COMP%] #progressUsed[_ngcontent-%COMP%]:after{color:#0ff;mix-blend-mode:difference}[_nghost-%COMP%] #progressOf[_ngcontent-%COMP%]{position:absolute;right:10px;top:6px}[_nghost-%COMP%] #progressBar[_ngcontent-%COMP%], [_nghost-%COMP%] #progressBarProjected[_ngcontent-%COMP%]{position:absolute;left:0;top:0;border-radius:var(--border-radius-small);border:1px solid white;min-height:var(--weight-progress-bar-size)}[_nghost-%COMP%] #progressBar[_ngcontent-%COMP%]{background:var(--primary-color-lighten-20);z-index:2}[_nghost-%COMP%] #progressBarProjected[_ngcontent-%COMP%]{background-image:repeating-linear-gradient(-45deg,var(--primary-color-lighten-20),var(--primary-color-lighten-20) 10px,#F5F5F5 10px,#F5F5F5 20px);opacity:60%;z-index:1}[_nghost-%COMP%] .boxesUsed[_ngcontent-%COMP%]{position:relative;text-align:center;color:#fff;padding:8px 0 0 5px}[_nghost-%COMP%] .boxesNumber[_ngcontent-%COMP%]{position:absolute;bottom:28px;left:23px;background:var(--primary-color);border-radius:var(--border-radius-medium);padding:6px 6px 5px;font-size:11px;line-height:11px;color:#fff;text-align:center;min-width:21px;flex-grow:1}[_nghost-%COMP%] .percentage_used[_ngcontent-%COMP%]{font-size:11px}[_nghost-%COMP%] .percentage_weight[_ngcontent-%COMP%]{font-size:14px;z-index:3}[_nghost-%COMP%] .percentage_total[_ngcontent-%COMP%]{font-size:10px}[_nghost-%COMP%] .infoImg[_ngcontent-%COMP%]{cursor:pointer}@media only screen and (max-width: 979px){[_nghost-%COMP%] .header[_ngcontent-%COMP%] #flexContainer[_ngcontent-%COMP%]{width:calc(50% - 16px)}}"]});let o=i;return o})();var $e=(()=>{let i=class i{};i.\u0275fac=function(n){return new(n||i)},i.\u0275mod=j({type:i}),i.\u0275inj=B({imports:[A,te,oe]});let o=i;return o})();export{ne as a,oe as b,V as c,se as d,Ue as e,$e as f};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.