marketplacepos 3.7.2 → 3.7.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (71) hide show
  1. package/Marketplace/{chunk-QOBUHJEC.js → chunk-2SA7SVYH.js} +1 -1
  2. package/Marketplace/{chunk-H65R6LYY.js → chunk-2UI4YTN6.js} +1 -1
  3. package/Marketplace/chunk-2V7GCWY7.js +1 -0
  4. package/Marketplace/{chunk-EJ4H3OFV.js → chunk-2YI2WW5U.js} +1 -1
  5. package/Marketplace/{chunk-ULZ3J3BD.js → chunk-4AQ3EZML.js} +1 -1
  6. package/Marketplace/{chunk-GSZSRSYG.js → chunk-5XRAHMC6.js} +1 -1
  7. package/Marketplace/{chunk-MQUFUG4I.js → chunk-644NU43G.js} +1 -1
  8. package/Marketplace/{chunk-4SAZAICQ.js → chunk-7I7KV673.js} +1 -1
  9. package/Marketplace/{chunk-IANWTXDM.js → chunk-7QIOC7BK.js} +1 -1
  10. package/Marketplace/{chunk-MG7FPXZX.js → chunk-7XITKPS5.js} +1 -1
  11. package/Marketplace/{chunk-H65V337R.js → chunk-BGCBCSHC.js} +1 -1
  12. package/Marketplace/{chunk-AE6IHJSI.js → chunk-BTKXSJ5K.js} +1 -1
  13. package/Marketplace/{chunk-LQUPRVED.js → chunk-CHDEJCV7.js} +1 -1
  14. package/Marketplace/{chunk-KOEWWMXB.js → chunk-COKR3NPC.js} +1 -1
  15. package/Marketplace/{chunk-6GVQC3OR.js → chunk-COLVGV5B.js} +1 -1
  16. package/Marketplace/{chunk-NY3NDLUY.js → chunk-CS62TIAP.js} +1 -1
  17. package/Marketplace/{chunk-QWKP6LGP.js → chunk-CSUJ7V36.js} +1 -1
  18. package/Marketplace/{chunk-3KV2JLZD.js → chunk-CUYZKVZ3.js} +1 -1
  19. package/Marketplace/{chunk-CQJJCQOZ.js → chunk-DJCANNYC.js} +1 -1
  20. package/Marketplace/{chunk-JHT6TPR2.js → chunk-ELFNCSQS.js} +1 -1
  21. package/Marketplace/{chunk-ZA6GABVQ.js → chunk-ENOOLWKX.js} +1 -1
  22. package/Marketplace/{chunk-LU4CQUNV.js → chunk-FGEVVKEH.js} +1 -1
  23. package/Marketplace/{chunk-T4IQWUBV.js → chunk-FZ3LLUFV.js} +1 -1
  24. package/Marketplace/{chunk-VM5LF2AQ.js → chunk-GQU66EJO.js} +1 -1
  25. package/Marketplace/{chunk-7QK5UPRO.js → chunk-H4UMXVLS.js} +1 -1
  26. package/Marketplace/{chunk-2SYJDDTX.js → chunk-HAU6K6GW.js} +1 -1
  27. package/Marketplace/{chunk-ONRH4TTU.js → chunk-HX36ACUF.js} +1 -1
  28. package/Marketplace/{chunk-4Z75AP5X.js → chunk-IL2DK2XK.js} +1 -1
  29. package/Marketplace/{chunk-WIPT5BVZ.js → chunk-IMUZFXPJ.js} +2 -2
  30. package/Marketplace/{chunk-NE4U3Z2F.js → chunk-IPVDR333.js} +1 -1
  31. package/Marketplace/{chunk-LV7NKX2V.js → chunk-IZ3HV6DV.js} +1 -1
  32. package/Marketplace/{chunk-GSZGHECR.js → chunk-JB6W2UTC.js} +1 -1
  33. package/Marketplace/{chunk-F2WJC5YO.js → chunk-K5HNYUX4.js} +2 -2
  34. package/Marketplace/{chunk-HD4CTBL2.js → chunk-KQRK4CTQ.js} +1 -1
  35. package/Marketplace/{chunk-RNMZG2RU.js → chunk-KSDM566S.js} +1 -1
  36. package/Marketplace/{chunk-QHJPUEQJ.js → chunk-LSBFWGC6.js} +1 -1
  37. package/Marketplace/{chunk-MCTEEYBG.js → chunk-MPHWSDOT.js} +1 -1
  38. package/Marketplace/{chunk-PSAPUCAJ.js → chunk-N5YIZS6Z.js} +1 -1
  39. package/Marketplace/{chunk-JOI2R7DA.js → chunk-O7MAOFLA.js} +1 -1
  40. package/Marketplace/chunk-OGL675J6.js +1 -0
  41. package/Marketplace/{chunk-37MHCWTD.js → chunk-OKATPNAY.js} +1 -1
  42. package/Marketplace/{chunk-B2H2LMDP.js → chunk-Q4LQRXK4.js} +1 -1
  43. package/Marketplace/{chunk-W5LP6HWA.js → chunk-R4XC3TIR.js} +1 -1
  44. package/Marketplace/{chunk-JEIL7GTU.js → chunk-S5TAVCV2.js} +1 -1
  45. package/Marketplace/{chunk-P7MI7GDE.js → chunk-SCSHD4KU.js} +1 -1
  46. package/Marketplace/{chunk-JGSLR6Q7.js → chunk-SKMUHTVE.js} +1 -1
  47. package/Marketplace/{chunk-LPD77TVJ.js → chunk-SMV45LT2.js} +1 -1
  48. package/Marketplace/{chunk-UUY6BTJU.js → chunk-TNBAGDLT.js} +1 -1
  49. package/Marketplace/{chunk-VZO27DX6.js → chunk-TO2VHTUR.js} +3 -3
  50. package/Marketplace/{chunk-HIX2BUDB.js → chunk-U7MYN4C4.js} +1 -1
  51. package/Marketplace/{chunk-CBW7JGFJ.js → chunk-UGTOBS2B.js} +1 -1
  52. package/Marketplace/{chunk-RQWHADXY.js → chunk-VAE6Y2B3.js} +1 -1
  53. package/Marketplace/{chunk-T5BNV4KL.js → chunk-WGXKB6XB.js} +1 -1
  54. package/Marketplace/{chunk-N6VKSGEM.js → chunk-WOOLZ22H.js} +1 -1
  55. package/Marketplace/{chunk-ZSK75YJW.js → chunk-WP6G47JB.js} +1 -1
  56. package/Marketplace/{chunk-F7PVCSNW.js → chunk-X5NF5S2H.js} +1 -1
  57. package/Marketplace/{chunk-27IVVEQ5.js → chunk-X6UUIC3F.js} +1 -1
  58. package/Marketplace/{chunk-ZMMTX4YX.js → chunk-Y3GV3L67.js} +1 -1
  59. package/Marketplace/{chunk-I66FBNYV.js → chunk-YBPTSF4K.js} +1 -1
  60. package/Marketplace/{chunk-PL4TRYLK.js → chunk-ZAKCXPP7.js} +1 -1
  61. package/Marketplace/index.html +2 -2
  62. package/Marketplace/{main-AUAZAZGD.js → main-FSM7S3E4.js} +1 -1
  63. package/Marketplace/{styles-DC4DACOA.css → styles-VY4XPEM3.css} +1 -1
  64. package/package.json +1 -1
  65. package/Marketplace/chunk-5CBOZ77Z.js +0 -1
  66. package/Marketplace/chunk-FX4KZMXX.js +0 -1
  67. /package/Marketplace/{chunk-5DL35YCG.js → chunk-322JBPYB.js} +0 -0
  68. /package/Marketplace/{chunk-VS4FYYKI.js → chunk-EF3W3UUA.js} +0 -0
  69. /package/Marketplace/{chunk-QYP6WXYL.js → chunk-MKDJJ5L7.js} +0 -0
  70. /package/Marketplace/{chunk-FG5W5K4B.js → chunk-R7J6AS67.js} +0 -0
  71. /package/Marketplace/{polyfills-FXABYPWM.js → polyfills-5ZPLRT7K.js} +0 -0
@@ -1 +1 @@
1
- import{J as w,L as q,a as Y}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.2/Marketplace/chunk-7QK5UPRO.js";import{$ as M,Ba as j,E as A,Ea as I,Ga as d,I as T,La as z,M as b,Na as H,P as L,Qa as k,Vb as F,X as v,a as y,aa as x,ba as E,ca as g,da as O,ea as P,fa as D,jc as B,kb as W,lb as $,n as f,o as R,oa as U,q as u,qc as V,w as N,xa as m}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.2/Marketplace/chunk-CQJJCQOZ.js";var tt=["*"],S;function et(){if(S===void 0&&(S=null,typeof window<"u")){let r=window;r.trustedTypes!==void 0&&(S=r.trustedTypes.createPolicy("angular#components",{createHTML:s=>s}))}return S}function _(r){return et()?.createHTML(r)||r}function G(r){return Error(`Unable to find icon with the name "${r}"`)}function nt(){return Error("Could not find HttpClient provider for use with Angular Material icons. Please include the HttpClientModule from @angular/common/http in your app imports.")}function J(r){return Error(`The URL provided to MatIconRegistry was not trusted as a resource URL via Angular's DomSanitizer. Attempted URL was "${r}".`)}function K(r){return Error(`The literal provided to MatIconRegistry was not trusted as safe HTML by Angular's DomSanitizer. Attempted literal was "${r}".`)}var a=class{constructor(s,Z,t){this.url=s,this.svgText=Z,this.options=t}},it=(()=>{let s=class s{constructor(t,e,n,i){this._httpClient=t,this._sanitizer=e,this._errorHandler=i,this._svgIconConfigs=new Map,this._iconSetConfigs=new Map,this._cachedIconsByUrl=new Map,this._inProgressUrlFetches=new Map,this._fontCssClassesByAlias=new Map,this._resolvers=[],this._defaultFontSetClass=["material-icons","mat-ligature-font"],this._document=n}addSvgIcon(t,e,n){return this.addSvgIconInNamespace("",t,e,n)}addSvgIconLiteral(t,e,n){return this.addSvgIconLiteralInNamespace("",t,e,n)}addSvgIconInNamespace(t,e,n,i){return this._addSvgIconConfig(t,e,new a(n,null,i))}addSvgIconResolver(t){return this._resolvers.push(t),this}addSvgIconLiteralInNamespace(t,e,n,i){let o=this._sanitizer.sanitize(m.HTML,n);if(!o)throw K(n);let c=_(o);return this._addSvgIconConfig(t,e,new a("",c,i))}addSvgIconSet(t,e){return this.addSvgIconSetInNamespace("",t,e)}addSvgIconSetLiteral(t,e){return this.addSvgIconSetLiteralInNamespace("",t,e)}addSvgIconSetInNamespace(t,e,n){return this._addSvgIconSetConfig(t,new a(e,null,n))}addSvgIconSetLiteralInNamespace(t,e,n){let i=this._sanitizer.sanitize(m.HTML,e);if(!i)throw K(e);let o=_(i);return this._addSvgIconSetConfig(t,new a("",o,n))}registerFontClassAlias(t,e=t){return this._fontCssClassesByAlias.set(t,e),this}classNameForFontAlias(t){return this._fontCssClassesByAlias.get(t)||t}setDefaultFontSetClass(...t){return this._defaultFontSetClass=t,this}getDefaultFontSetClass(){return this._defaultFontSetClass}getSvgIconFromUrl(t){let e=this._sanitizer.sanitize(m.RESOURCE_URL,t);if(!e)throw J(t);let n=this._cachedIconsByUrl.get(e);return n?f(C(n)):this._loadSvgIconFromConfig(new a(t,null)).pipe(v(i=>this._cachedIconsByUrl.set(e,i)),u(i=>C(i)))}getNamedSvgIcon(t,e=""){let n=Q(e,t),i=this._svgIconConfigs.get(n);if(i)return this._getSvgFromConfig(i);if(i=this._getIconConfigFromResolvers(e,t),i)return this._svgIconConfigs.set(n,i),this._getSvgFromConfig(i);let o=this._iconSetConfigs.get(e);return o?this._getSvgFromIconSetConfigs(t,o):R(G(n))}ngOnDestroy(){this._resolvers=[],this._svgIconConfigs.clear(),this._iconSetConfigs.clear(),this._cachedIconsByUrl.clear()}_getSvgFromConfig(t){return t.svgText?f(C(this._svgElementFromConfig(t))):this._loadSvgIconFromConfig(t).pipe(u(e=>C(e)))}_getSvgFromIconSetConfigs(t,e){let n=this._extractIconWithNameFromAnySet(t,e);if(n)return f(n);let i=e.filter(o=>!o.svgText).map(o=>this._loadSvgIconSetFromConfig(o).pipe(A(c=>{let h=`Loading icon set URL: ${this._sanitizer.sanitize(m.RESOURCE_URL,o.url)} failed: ${c.message}`;return this._errorHandler.handleError(new Error(h)),f(null)})));return N(i).pipe(u(()=>{let o=this._extractIconWithNameFromAnySet(t,e);if(!o)throw G(t);return o}))}_extractIconWithNameFromAnySet(t,e){for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.svgText&&i.svgText.toString().indexOf(t)>-1){let o=this._svgElementFromConfig(i),c=this._extractSvgIconFromSet(o,t,i.options);if(c)return c}}return null}_loadSvgIconFromConfig(t){return this._fetchIcon(t).pipe(v(e=>t.svgText=e),u(()=>this._svgElementFromConfig(t)))}_loadSvgIconSetFromConfig(t){return t.svgText?f(null):this._fetchIcon(t).pipe(v(e=>t.svgText=e))}_extractSvgIconFromSet(t,e,n){let i=t.querySelector(`[id="${e}"]`);if(!i)return null;let o=i.cloneNode(!0);if(o.removeAttribute("id"),o.nodeName.toLowerCase()==="svg")return this._setSvgAttributes(o,n);if(o.nodeName.toLowerCase()==="symbol")return this._setSvgAttributes(this._toSvgElement(o),n);let c=this._svgElementFromString(_("<svg></svg>"));return c.appendChild(o),this._setSvgAttributes(c,n)}_svgElementFromString(t){let e=this._document.createElement("DIV");e.innerHTML=t;let n=e.querySelector("svg");if(!n)throw Error("<svg> tag not found");return n}_toSvgElement(t){let e=this._svgElementFromString(_("<svg></svg>")),n=t.attributes;for(let i=0;i<n.length;i++){let{name:o,value:c}=n[i];o!=="id"&&e.setAttribute(o,c)}for(let i=0;i<t.childNodes.length;i++)t.childNodes[i].nodeType===this._document.ELEMENT_NODE&&e.appendChild(t.childNodes[i].cloneNode(!0));return e}_setSvgAttributes(t,e){return t.setAttribute("fit",""),t.setAttribute("height","100%"),t.setAttribute("width","100%"),t.setAttribute("preserveAspectRatio","xMidYMid meet"),t.setAttribute("focusable","false"),e&&e.viewBox&&t.setAttribute("viewBox",e.viewBox),t}_fetchIcon(t){let{url:e,options:n}=t,i=n?.withCredentials??!1;if(!this._httpClient)throw nt();if(e==null)throw Error(`Cannot fetch icon from URL "${e}".`);let o=this._sanitizer.sanitize(m.RESOURCE_URL,e);if(!o)throw J(e);let c=this._inProgressUrlFetches.get(o);if(c)return c;let l=this._httpClient.get(o,{responseType:"text",withCredentials:i}).pipe(u(h=>_(h)),b(()=>this._inProgressUrlFetches.delete(o)),L());return this._inProgressUrlFetches.set(o,l),l}_addSvgIconConfig(t,e,n){return this._svgIconConfigs.set(Q(t,e),n),this}_addSvgIconSetConfig(t,e){let n=this._iconSetConfigs.get(t);return n?n.push(e):this._iconSetConfigs.set(t,[e]),this}_svgElementFromConfig(t){if(!t.svgElement){let e=this._svgElementFromString(t.svgText);this._setSvgAttributes(e,t.options),t.svgElement=e}return t.svgElement}_getIconConfigFromResolvers(t,e){for(let n=0;n<this._resolvers.length;n++){let i=this._resolvers[n](e,t);if(i)return ot(i)?new a(i.url,null,i.options):new a(i,null)}}};s.\u0275fac=function(e){return new(e||s)(g(B,8),g(V),g(F,8),g(I))},s.\u0275prov=M({token:s,factory:s.\u0275fac,providedIn:"root"});let r=s;return r})();function C(r){return r.cloneNode(!0)}function Q(r,s){return r+":"+s}function ot(r){return!!(r.url&&r.options)}var rt=q(class{constructor(r){this._elementRef=r}}),st=new E("MAT_ICON_DEFAULT_OPTIONS"),ct=new E("mat-icon-location",{providedIn:"root",factory:at});function at(){let r=O(F),s=r?r.location:null;return{getPathname:()=>s?s.pathname+s.search:""}}var X=["clip-path","color-profile","src","cursor","fill","filter","marker","marker-start","marker-mid","marker-end","mask","stroke"],lt=X.map(r=>`[${r}]`).join(", "),ht=/^url\(['"]?#(.*?)['"]?\)$/,bt=(()=>{let s=class s extends rt{get inline(){return this._inline}set inline(t){this._inline=Y(t)}get svgIcon(){return this._svgIcon}set svgIcon(t){t!==this._svgIcon&&(t?this._updateSvgIcon(t):this._svgIcon&&this._clearSvgElement(),this._svgIcon=t)}get fontSet(){return this._fontSet}set fontSet(t){let e=this._cleanupFontValue(t);e!==this._fontSet&&(this._fontSet=e,this._updateFontIconClasses())}get fontIcon(){return this._fontIcon}set fontIcon(t){let e=this._cleanupFontValue(t);e!==this._fontIcon&&(this._fontIcon=e,this._updateFontIconClasses())}constructor(t,e,n,i,o,c){super(t),this._iconRegistry=e,this._location=i,this._errorHandler=o,this._inline=!1,this._previousFontSetClass=[],this._currentIconFetch=y.EMPTY,c&&(c.color&&(this.color=this.defaultColor=c.color),c.fontSet&&(this.fontSet=c.fontSet)),n||t.nativeElement.setAttribute("aria-hidden","true")}_splitIconName(t){if(!t)return["",""];let e=t.split(":");switch(e.length){case 1:return["",e[0]];case 2:return e;default:throw Error(`Invalid icon name: "${t}"`)}}ngOnInit(){this._updateFontIconClasses()}ngAfterViewChecked(){let t=this._elementsWithExternalReferences;if(t&&t.size){let e=this._location.getPathname();e!==this._previousPath&&(this._previousPath=e,this._prependPathToReferences(e))}}ngOnDestroy(){this._currentIconFetch.unsubscribe(),this._elementsWithExternalReferences&&this._elementsWithExternalReferences.clear()}_usingFontIcon(){return!this.svgIcon}_setSvgElement(t){this._clearSvgElement();let e=this._location.getPathname();this._previousPath=e,this._cacheChildrenWithExternalReferences(t),this._prependPathToReferences(e),this._elementRef.nativeElement.appendChild(t)}_clearSvgElement(){let t=this._elementRef.nativeElement,e=t.childNodes.length;for(this._elementsWithExternalReferences&&this._elementsWithExternalReferences.clear();e--;){let n=t.childNodes[e];(n.nodeType!==1||n.nodeName.toLowerCase()==="svg")&&n.remove()}}_updateFontIconClasses(){if(!this._usingFontIcon())return;let t=this._elementRef.nativeElement,e=(this.fontSet?this._iconRegistry.classNameForFontAlias(this.fontSet).split(/ +/):this._iconRegistry.getDefaultFontSetClass()).filter(n=>n.length>0);this._previousFontSetClass.forEach(n=>t.classList.remove(n)),e.forEach(n=>t.classList.add(n)),this._previousFontSetClass=e,this.fontIcon!==this._previousFontIconClass&&!e.includes("mat-ligature-font")&&(this._previousFontIconClass&&t.classList.remove(this._previousFontIconClass),this.fontIcon&&t.classList.add(this.fontIcon),this._previousFontIconClass=this.fontIcon)}_cleanupFontValue(t){return typeof t=="string"?t.trim().split(" ")[0]:t}_prependPathToReferences(t){let e=this._elementsWithExternalReferences;e&&e.forEach((n,i)=>{n.forEach(o=>{i.setAttribute(o.name,`url('${t}#${o.value}')`)})})}_cacheChildrenWithExternalReferences(t){let e=t.querySelectorAll(lt),n=this._elementsWithExternalReferences=this._elementsWithExternalReferences||new Map;for(let i=0;i<e.length;i++)X.forEach(o=>{let c=e[i],l=c.getAttribute(o),h=l?l.match(ht):null;if(h){let p=n.get(c);p||(p=[],n.set(c,p)),p.push({name:o,value:h[1]})}})}_updateSvgIcon(t){if(this._svgNamespace=null,this._svgName=null,this._currentIconFetch.unsubscribe(),t){let[e,n]=this._splitIconName(t);e&&(this._svgNamespace=e),n&&(this._svgName=n),this._currentIconFetch=this._iconRegistry.getNamedSvgIcon(n,e).pipe(T(1)).subscribe(i=>this._setSvgElement(i),i=>{let o=`Error retrieving icon ${e}:${n}! ${i.message}`;this._errorHandler.handleError(new Error(o))})}}};s.\u0275fac=function(e){return new(e||s)(d(j),d(it),U("aria-hidden"),d(ct),d(I),d(st,8))},s.\u0275cmp=P({type:s,selectors:[["mat-icon"]],hostAttrs:["role","img",1,"mat-icon","notranslate"],hostVars:8,hostBindings:function(e,n){e&2&&(H("data-mat-icon-type",n._usingFontIcon()?"font":"svg")("data-mat-icon-name",n._svgName||n.fontIcon)("data-mat-icon-namespace",n._svgNamespace||n.fontSet)("fontIcon",n._usingFontIcon()?n.fontIcon:null),k("mat-icon-inline",n.inline)("mat-icon-no-color",n.color!=="primary"&&n.color!=="accent"&&n.color!=="warn"))},inputs:{color:"color",inline:"inline",svgIcon:"svgIcon",fontSet:"fontSet",fontIcon:"fontIcon"},exportAs:["matIcon"],features:[z],ngContentSelectors:tt,decls:1,vars:0,template:function(e,n){e&1&&(W(),$(0))},styles:["mat-icon,mat-icon.mat-primary,mat-icon.mat-accent,mat-icon.mat-warn{color:var(--mat-icon-color)}.mat-icon{-webkit-user-select:none;user-select:none;background-repeat:no-repeat;display:inline-block;fill:currentColor;height:24px;width:24px;overflow:hidden}.mat-icon.mat-icon-inline{font-size:inherit;height:inherit;line-height:inherit;width:inherit}.mat-icon.mat-ligature-font[fontIcon]::before{content:attr(fontIcon)}[dir=rtl] .mat-icon-rtl-mirror{transform:scale(-1, 1)}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-icon,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-icon{display:block}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-icon-button .mat-icon,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-icon-button .mat-icon{margin:auto}"],encapsulation:2,changeDetection:0});let r=s;return r})(),Lt=(()=>{let s=class s{};s.\u0275fac=function(e){return new(e||s)},s.\u0275mod=D({type:s}),s.\u0275inj=x({imports:[w,w]});let r=s;return r})();export{bt as a,Lt as b};
1
+ import{J as w,L as q,a as Y}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.4/Marketplace/chunk-H4UMXVLS.js";import{$ as M,Ba as j,E as A,Ea as I,Ga as d,I as T,La as z,M as b,Na as H,P as L,Qa as k,Vb as F,X as v,a as y,aa as x,ba as E,ca as g,da as O,ea as P,fa as D,jc as B,kb as W,lb as $,n as f,o as R,oa as U,q as u,qc as V,w as N,xa as m}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.4/Marketplace/chunk-DJCANNYC.js";var tt=["*"],S;function et(){if(S===void 0&&(S=null,typeof window<"u")){let r=window;r.trustedTypes!==void 0&&(S=r.trustedTypes.createPolicy("angular#components",{createHTML:s=>s}))}return S}function _(r){return et()?.createHTML(r)||r}function G(r){return Error(`Unable to find icon with the name "${r}"`)}function nt(){return Error("Could not find HttpClient provider for use with Angular Material icons. Please include the HttpClientModule from @angular/common/http in your app imports.")}function J(r){return Error(`The URL provided to MatIconRegistry was not trusted as a resource URL via Angular's DomSanitizer. Attempted URL was "${r}".`)}function K(r){return Error(`The literal provided to MatIconRegistry was not trusted as safe HTML by Angular's DomSanitizer. Attempted literal was "${r}".`)}var a=class{constructor(s,Z,t){this.url=s,this.svgText=Z,this.options=t}},it=(()=>{let s=class s{constructor(t,e,n,i){this._httpClient=t,this._sanitizer=e,this._errorHandler=i,this._svgIconConfigs=new Map,this._iconSetConfigs=new Map,this._cachedIconsByUrl=new Map,this._inProgressUrlFetches=new Map,this._fontCssClassesByAlias=new Map,this._resolvers=[],this._defaultFontSetClass=["material-icons","mat-ligature-font"],this._document=n}addSvgIcon(t,e,n){return this.addSvgIconInNamespace("",t,e,n)}addSvgIconLiteral(t,e,n){return this.addSvgIconLiteralInNamespace("",t,e,n)}addSvgIconInNamespace(t,e,n,i){return this._addSvgIconConfig(t,e,new a(n,null,i))}addSvgIconResolver(t){return this._resolvers.push(t),this}addSvgIconLiteralInNamespace(t,e,n,i){let o=this._sanitizer.sanitize(m.HTML,n);if(!o)throw K(n);let c=_(o);return this._addSvgIconConfig(t,e,new a("",c,i))}addSvgIconSet(t,e){return this.addSvgIconSetInNamespace("",t,e)}addSvgIconSetLiteral(t,e){return this.addSvgIconSetLiteralInNamespace("",t,e)}addSvgIconSetInNamespace(t,e,n){return this._addSvgIconSetConfig(t,new a(e,null,n))}addSvgIconSetLiteralInNamespace(t,e,n){let i=this._sanitizer.sanitize(m.HTML,e);if(!i)throw K(e);let o=_(i);return this._addSvgIconSetConfig(t,new a("",o,n))}registerFontClassAlias(t,e=t){return this._fontCssClassesByAlias.set(t,e),this}classNameForFontAlias(t){return this._fontCssClassesByAlias.get(t)||t}setDefaultFontSetClass(...t){return this._defaultFontSetClass=t,this}getDefaultFontSetClass(){return this._defaultFontSetClass}getSvgIconFromUrl(t){let e=this._sanitizer.sanitize(m.RESOURCE_URL,t);if(!e)throw J(t);let n=this._cachedIconsByUrl.get(e);return n?f(C(n)):this._loadSvgIconFromConfig(new a(t,null)).pipe(v(i=>this._cachedIconsByUrl.set(e,i)),u(i=>C(i)))}getNamedSvgIcon(t,e=""){let n=Q(e,t),i=this._svgIconConfigs.get(n);if(i)return this._getSvgFromConfig(i);if(i=this._getIconConfigFromResolvers(e,t),i)return this._svgIconConfigs.set(n,i),this._getSvgFromConfig(i);let o=this._iconSetConfigs.get(e);return o?this._getSvgFromIconSetConfigs(t,o):R(G(n))}ngOnDestroy(){this._resolvers=[],this._svgIconConfigs.clear(),this._iconSetConfigs.clear(),this._cachedIconsByUrl.clear()}_getSvgFromConfig(t){return t.svgText?f(C(this._svgElementFromConfig(t))):this._loadSvgIconFromConfig(t).pipe(u(e=>C(e)))}_getSvgFromIconSetConfigs(t,e){let n=this._extractIconWithNameFromAnySet(t,e);if(n)return f(n);let i=e.filter(o=>!o.svgText).map(o=>this._loadSvgIconSetFromConfig(o).pipe(A(c=>{let h=`Loading icon set URL: ${this._sanitizer.sanitize(m.RESOURCE_URL,o.url)} failed: ${c.message}`;return this._errorHandler.handleError(new Error(h)),f(null)})));return N(i).pipe(u(()=>{let o=this._extractIconWithNameFromAnySet(t,e);if(!o)throw G(t);return o}))}_extractIconWithNameFromAnySet(t,e){for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.svgText&&i.svgText.toString().indexOf(t)>-1){let o=this._svgElementFromConfig(i),c=this._extractSvgIconFromSet(o,t,i.options);if(c)return c}}return null}_loadSvgIconFromConfig(t){return this._fetchIcon(t).pipe(v(e=>t.svgText=e),u(()=>this._svgElementFromConfig(t)))}_loadSvgIconSetFromConfig(t){return t.svgText?f(null):this._fetchIcon(t).pipe(v(e=>t.svgText=e))}_extractSvgIconFromSet(t,e,n){let i=t.querySelector(`[id="${e}"]`);if(!i)return null;let o=i.cloneNode(!0);if(o.removeAttribute("id"),o.nodeName.toLowerCase()==="svg")return this._setSvgAttributes(o,n);if(o.nodeName.toLowerCase()==="symbol")return this._setSvgAttributes(this._toSvgElement(o),n);let c=this._svgElementFromString(_("<svg></svg>"));return c.appendChild(o),this._setSvgAttributes(c,n)}_svgElementFromString(t){let e=this._document.createElement("DIV");e.innerHTML=t;let n=e.querySelector("svg");if(!n)throw Error("<svg> tag not found");return n}_toSvgElement(t){let e=this._svgElementFromString(_("<svg></svg>")),n=t.attributes;for(let i=0;i<n.length;i++){let{name:o,value:c}=n[i];o!=="id"&&e.setAttribute(o,c)}for(let i=0;i<t.childNodes.length;i++)t.childNodes[i].nodeType===this._document.ELEMENT_NODE&&e.appendChild(t.childNodes[i].cloneNode(!0));return e}_setSvgAttributes(t,e){return t.setAttribute("fit",""),t.setAttribute("height","100%"),t.setAttribute("width","100%"),t.setAttribute("preserveAspectRatio","xMidYMid meet"),t.setAttribute("focusable","false"),e&&e.viewBox&&t.setAttribute("viewBox",e.viewBox),t}_fetchIcon(t){let{url:e,options:n}=t,i=n?.withCredentials??!1;if(!this._httpClient)throw nt();if(e==null)throw Error(`Cannot fetch icon from URL "${e}".`);let o=this._sanitizer.sanitize(m.RESOURCE_URL,e);if(!o)throw J(e);let c=this._inProgressUrlFetches.get(o);if(c)return c;let l=this._httpClient.get(o,{responseType:"text",withCredentials:i}).pipe(u(h=>_(h)),b(()=>this._inProgressUrlFetches.delete(o)),L());return this._inProgressUrlFetches.set(o,l),l}_addSvgIconConfig(t,e,n){return this._svgIconConfigs.set(Q(t,e),n),this}_addSvgIconSetConfig(t,e){let n=this._iconSetConfigs.get(t);return n?n.push(e):this._iconSetConfigs.set(t,[e]),this}_svgElementFromConfig(t){if(!t.svgElement){let e=this._svgElementFromString(t.svgText);this._setSvgAttributes(e,t.options),t.svgElement=e}return t.svgElement}_getIconConfigFromResolvers(t,e){for(let n=0;n<this._resolvers.length;n++){let i=this._resolvers[n](e,t);if(i)return ot(i)?new a(i.url,null,i.options):new a(i,null)}}};s.\u0275fac=function(e){return new(e||s)(g(B,8),g(V),g(F,8),g(I))},s.\u0275prov=M({token:s,factory:s.\u0275fac,providedIn:"root"});let r=s;return r})();function C(r){return r.cloneNode(!0)}function Q(r,s){return r+":"+s}function ot(r){return!!(r.url&&r.options)}var rt=q(class{constructor(r){this._elementRef=r}}),st=new E("MAT_ICON_DEFAULT_OPTIONS"),ct=new E("mat-icon-location",{providedIn:"root",factory:at});function at(){let r=O(F),s=r?r.location:null;return{getPathname:()=>s?s.pathname+s.search:""}}var X=["clip-path","color-profile","src","cursor","fill","filter","marker","marker-start","marker-mid","marker-end","mask","stroke"],lt=X.map(r=>`[${r}]`).join(", "),ht=/^url\(['"]?#(.*?)['"]?\)$/,bt=(()=>{let s=class s extends rt{get inline(){return this._inline}set inline(t){this._inline=Y(t)}get svgIcon(){return this._svgIcon}set svgIcon(t){t!==this._svgIcon&&(t?this._updateSvgIcon(t):this._svgIcon&&this._clearSvgElement(),this._svgIcon=t)}get fontSet(){return this._fontSet}set fontSet(t){let e=this._cleanupFontValue(t);e!==this._fontSet&&(this._fontSet=e,this._updateFontIconClasses())}get fontIcon(){return this._fontIcon}set fontIcon(t){let e=this._cleanupFontValue(t);e!==this._fontIcon&&(this._fontIcon=e,this._updateFontIconClasses())}constructor(t,e,n,i,o,c){super(t),this._iconRegistry=e,this._location=i,this._errorHandler=o,this._inline=!1,this._previousFontSetClass=[],this._currentIconFetch=y.EMPTY,c&&(c.color&&(this.color=this.defaultColor=c.color),c.fontSet&&(this.fontSet=c.fontSet)),n||t.nativeElement.setAttribute("aria-hidden","true")}_splitIconName(t){if(!t)return["",""];let e=t.split(":");switch(e.length){case 1:return["",e[0]];case 2:return e;default:throw Error(`Invalid icon name: "${t}"`)}}ngOnInit(){this._updateFontIconClasses()}ngAfterViewChecked(){let t=this._elementsWithExternalReferences;if(t&&t.size){let e=this._location.getPathname();e!==this._previousPath&&(this._previousPath=e,this._prependPathToReferences(e))}}ngOnDestroy(){this._currentIconFetch.unsubscribe(),this._elementsWithExternalReferences&&this._elementsWithExternalReferences.clear()}_usingFontIcon(){return!this.svgIcon}_setSvgElement(t){this._clearSvgElement();let e=this._location.getPathname();this._previousPath=e,this._cacheChildrenWithExternalReferences(t),this._prependPathToReferences(e),this._elementRef.nativeElement.appendChild(t)}_clearSvgElement(){let t=this._elementRef.nativeElement,e=t.childNodes.length;for(this._elementsWithExternalReferences&&this._elementsWithExternalReferences.clear();e--;){let n=t.childNodes[e];(n.nodeType!==1||n.nodeName.toLowerCase()==="svg")&&n.remove()}}_updateFontIconClasses(){if(!this._usingFontIcon())return;let t=this._elementRef.nativeElement,e=(this.fontSet?this._iconRegistry.classNameForFontAlias(this.fontSet).split(/ +/):this._iconRegistry.getDefaultFontSetClass()).filter(n=>n.length>0);this._previousFontSetClass.forEach(n=>t.classList.remove(n)),e.forEach(n=>t.classList.add(n)),this._previousFontSetClass=e,this.fontIcon!==this._previousFontIconClass&&!e.includes("mat-ligature-font")&&(this._previousFontIconClass&&t.classList.remove(this._previousFontIconClass),this.fontIcon&&t.classList.add(this.fontIcon),this._previousFontIconClass=this.fontIcon)}_cleanupFontValue(t){return typeof t=="string"?t.trim().split(" ")[0]:t}_prependPathToReferences(t){let e=this._elementsWithExternalReferences;e&&e.forEach((n,i)=>{n.forEach(o=>{i.setAttribute(o.name,`url('${t}#${o.value}')`)})})}_cacheChildrenWithExternalReferences(t){let e=t.querySelectorAll(lt),n=this._elementsWithExternalReferences=this._elementsWithExternalReferences||new Map;for(let i=0;i<e.length;i++)X.forEach(o=>{let c=e[i],l=c.getAttribute(o),h=l?l.match(ht):null;if(h){let p=n.get(c);p||(p=[],n.set(c,p)),p.push({name:o,value:h[1]})}})}_updateSvgIcon(t){if(this._svgNamespace=null,this._svgName=null,this._currentIconFetch.unsubscribe(),t){let[e,n]=this._splitIconName(t);e&&(this._svgNamespace=e),n&&(this._svgName=n),this._currentIconFetch=this._iconRegistry.getNamedSvgIcon(n,e).pipe(T(1)).subscribe(i=>this._setSvgElement(i),i=>{let o=`Error retrieving icon ${e}:${n}! ${i.message}`;this._errorHandler.handleError(new Error(o))})}}};s.\u0275fac=function(e){return new(e||s)(d(j),d(it),U("aria-hidden"),d(ct),d(I),d(st,8))},s.\u0275cmp=P({type:s,selectors:[["mat-icon"]],hostAttrs:["role","img",1,"mat-icon","notranslate"],hostVars:8,hostBindings:function(e,n){e&2&&(H("data-mat-icon-type",n._usingFontIcon()?"font":"svg")("data-mat-icon-name",n._svgName||n.fontIcon)("data-mat-icon-namespace",n._svgNamespace||n.fontSet)("fontIcon",n._usingFontIcon()?n.fontIcon:null),k("mat-icon-inline",n.inline)("mat-icon-no-color",n.color!=="primary"&&n.color!=="accent"&&n.color!=="warn"))},inputs:{color:"color",inline:"inline",svgIcon:"svgIcon",fontSet:"fontSet",fontIcon:"fontIcon"},exportAs:["matIcon"],features:[z],ngContentSelectors:tt,decls:1,vars:0,template:function(e,n){e&1&&(W(),$(0))},styles:["mat-icon,mat-icon.mat-primary,mat-icon.mat-accent,mat-icon.mat-warn{color:var(--mat-icon-color)}.mat-icon{-webkit-user-select:none;user-select:none;background-repeat:no-repeat;display:inline-block;fill:currentColor;height:24px;width:24px;overflow:hidden}.mat-icon.mat-icon-inline{font-size:inherit;height:inherit;line-height:inherit;width:inherit}.mat-icon.mat-ligature-font[fontIcon]::before{content:attr(fontIcon)}[dir=rtl] .mat-icon-rtl-mirror{transform:scale(-1, 1)}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-icon,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-icon{display:block}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-icon-button .mat-icon,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-icon-button .mat-icon{margin:auto}"],encapsulation:2,changeDetection:0});let r=s;return r})(),Lt=(()=>{let s=class s{};s.\u0275fac=function(e){return new(e||s)},s.\u0275mod=D({type:s}),s.\u0275inj=x({imports:[w,w]});let r=s;return r})();export{bt as a,Lt as b};
@@ -1,4 +1,4 @@
1
- import{c as at}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.2/Marketplace/chunk-QYP6WXYL.js";import{$ as ut}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.2/Marketplace/chunk-CQJJCQOZ.js";import{a as Ee,b as ct,h as ft}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.2/Marketplace/chunk-FG5W5K4B.js";function L(){}var Je=e=>e;function dt(e,t){for(let n in t)e[n]=t[n];return e}function Tt(e){return e()}function X(e){e.forEach(Tt)}function Re(e){return typeof e=="function"}function se(e,t){return e!=e?t==t:e!==t}function At(e){return Object.keys(e).length===0}function Ht(e,...t){if(e==null)return L;let n=e.subscribe(...t);return n.unsubscribe?()=>n.unsubscribe():n}function me(e,t,n){e.$$.on_destroy.push(Ht(t,n))}function Ye(e){return e&&Re(e.destroy)?e.destroy:L}var Ve=()=>globalThis.performance.now(),Ge=e=>requestAnimationFrame(e),ge=new Set;function It(e){ge.forEach(t=>{t.c(e)||(ge.delete(t),t.f())}),ge.size!==0&&Ge(It)}function Qe(e){let t;return ge.size===0&&Ge(It),{promise:new Promise(n=>{ge.add(t={c:e,f:n})}),abort(){ge.delete(t)}}}function G(e,t){e.appendChild(t)}function S(e,t,n){e.insertBefore(t,n||null)}function A(e){e.parentNode.removeChild(e)}function M(e){return document.createElement(e)}function Lt(e){return document.createTextNode(e)}function Ie(){return Lt("")}function H(e,t,n,i){return e.addEventListener(t,n,i),()=>e.removeEventListener(t,n,i)}function v(e,t,n){n==null?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}function D(e,t,n,i){n===null?e.style.removeProperty(t):e.style.setProperty(t,n)}function Y(e,t,n){e.classList[n?"add":"remove"](t)}function Ot(e,t,n=!1){let i=document.createEvent("CustomEvent");return i.initCustomEvent(e,n,!1,t),i}var he,xe=0,Fe={};function Mt(e,t,n,i,o,r,s,c=0){let l=16.666/i,f=`{
1
+ import{c as at}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.4/Marketplace/chunk-MKDJJ5L7.js";import{$ as ut}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.4/Marketplace/chunk-DJCANNYC.js";import{a as Ee,b as ct,h as ft}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.4/Marketplace/chunk-R7J6AS67.js";function L(){}var Je=e=>e;function dt(e,t){for(let n in t)e[n]=t[n];return e}function Tt(e){return e()}function X(e){e.forEach(Tt)}function Re(e){return typeof e=="function"}function se(e,t){return e!=e?t==t:e!==t}function At(e){return Object.keys(e).length===0}function Ht(e,...t){if(e==null)return L;let n=e.subscribe(...t);return n.unsubscribe?()=>n.unsubscribe():n}function me(e,t,n){e.$$.on_destroy.push(Ht(t,n))}function Ye(e){return e&&Re(e.destroy)?e.destroy:L}var Ve=()=>globalThis.performance.now(),Ge=e=>requestAnimationFrame(e),ge=new Set;function It(e){ge.forEach(t=>{t.c(e)||(ge.delete(t),t.f())}),ge.size!==0&&Ge(It)}function Qe(e){let t;return ge.size===0&&Ge(It),{promise:new Promise(n=>{ge.add(t={c:e,f:n})}),abort(){ge.delete(t)}}}function G(e,t){e.appendChild(t)}function S(e,t,n){e.insertBefore(t,n||null)}function A(e){e.parentNode.removeChild(e)}function M(e){return document.createElement(e)}function Lt(e){return document.createTextNode(e)}function Ie(){return Lt("")}function H(e,t,n,i){return e.addEventListener(t,n,i),()=>e.removeEventListener(t,n,i)}function v(e,t,n){n==null?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}function D(e,t,n,i){n===null?e.style.removeProperty(t):e.style.setProperty(t,n)}function Y(e,t,n){e.classList[n?"add":"remove"](t)}function Ot(e,t,n=!1){let i=document.createEvent("CustomEvent");return i.initCustomEvent(e,n,!1,t),i}var he,xe=0,Fe={};function Mt(e,t,n,i,o,r,s,c=0){let l=16.666/i,f=`{
2
2
  `;for(let d=0;d<=1;d+=l){let u=t+(n-t)*r(d);f+=d*100+`%{${s(u,1-u)}}
3
3
  `}let a=f+`100% {${s(n,1-n)}}
4
4
  }`,m=`_bp_${Math.round(Math.random()*1e9)}_${c}`;if(!Fe[m]){if(!he){let d=M("style");document.head.appendChild(d),he=d.sheet}Fe[m]=!0,he.insertRule(`@keyframes ${m} ${a}`,he.cssRules.length)}let _=e.style.animation||"";return e.style.animation=`${_?`${_}, `:""}${m} ${i}ms linear ${o}ms 1 both`,xe+=1,m}function je(e,t){e.style.animation=(e.style.animation||"").split(", ").filter(t?n=>n.indexOf(t)<0:n=>n.indexOf("_bp")===-1).join(", "),t&&!--xe&&Rt()}function Rt(){Ge(()=>{if(xe)return;let e=he.cssRules.length;for(;e--;)he.deleteRule(e);Fe={}})}var et;function Te(e){et=e}var ze=[],pt=[],Ae=[],mt=[],Yt=Promise.resolve(),Ze=!1;function Nt(){Ze||(Ze=!0,Yt.then(Ct))}function ne(e){Ae.push(e)}var Xe=new Set,Se=0;function Ct(){let e=et;do{for(;Se<ze.length;){let t=ze[Se];Se++,Te(t),Xt(t.$$)}for(Te(null),ze.length=0,Se=0;pt.length;)pt.pop()();for(let t=0;t<Ae.length;t+=1){let n=Ae[t];Xe.has(n)||(Xe.add(n),n())}Ae.length=0}while(ze.length);for(;mt.length;)mt.pop()();Ze=!1,Xe.clear(),Te(e)}function Xt(e){if(e.fragment!==null){e.update(),X(e.before_update);let t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(ne)}}var ve;function Dt(){return ve||(ve=Promise.resolve(),ve.then(()=>{ve=null})),ve}function Le(e,t,n){e.dispatchEvent(Ot(`${t?"intro":"outro"}${n}`))}var He=new Set,V;function ie(){V={r:0,c:[],p:V}}function oe(){V.r||X(V.c),V=V.p}function z(e,t){e&&e.i&&(He.delete(e),e.i(t))}function P(e,t,n,i){if(e&&e.o){if(He.has(e))return;He.add(e),V.c.push(()=>{He.delete(e),i&&(n&&e.d(1),i())}),e.o(t)}}var Pt={duration:0};function $t(e,t,n){let i=t(e,n),o=!1,r,s,c=0;function l(){r&&je(e,r)}function f(){let{delay:m=0,duration:_=300,easing:d=Je,tick:u=L,css:h}=i||Pt;h&&(r=Mt(e,0,1,_,m,d,h,c++)),u(0,1);let k=Ve()+m,O=k+_;s&&s.abort(),o=!0,ne(()=>Le(e,!0,"start")),s=Qe(N=>{if(o){if(N>=O)return u(1,0),Le(e,!0,"end"),l(),o=!1;if(N>=k){let y=d((N-k)/_);u(y,1-y)}}return o})}let a=!1;return{start(){a||(a=!0,je(e),Re(i)?(i=i(),Dt().then(f)):f())},invalidate(){a=!1},end(){o&&(l(),o=!1)}}}function _e(e,t,n){let i=t(e,n),o=!0,r,s=V;s.r+=1;function c(){let{delay:l=0,duration:f=300,easing:a=Je,tick:m=L,css:_}=i||Pt;_&&(r=Mt(e,1,0,f,l,a,_));let d=Ve()+l,u=d+f;ne(()=>Le(e,!1,"start")),Qe(h=>{if(o){if(h>=u)return m(0,1),Le(e,!1,"end"),--s.r||X(s.c),!1;if(h>=d){let k=a((h-d)/f);m(1-k,k)}}return o})}return Re(i)?Dt().then(()=>{i=i(),c()}):c(),{end(l){l&&i.tick&&i.tick(1,0),o&&(r&&je(e,r),o=!1)}}}function ke(e){e&&e.c()}function le(e,t,n,i){let{fragment:o,on_mount:r,on_destroy:s,after_update:c}=e.$$;o&&o.m(t,n),i||ne(()=>{let l=r.map(Tt).filter(Re);s?s.push(...l):X(l),e.$$.on_mount=[]}),c.forEach(ne)}function ce(e,t){let n=e.$$;n.fragment!==null&&(X(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[])}function Wt(e,t){e.$$.dirty[0]===-1&&(ze.push(e),Nt(),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}function Ce(e,t,n,i,o,r,s,c=[-1]){let l=et;Te(e);let f=e.$$={fragment:null,ctx:null,props:r,update:L,not_equal:o,bound:{},on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(t.context||(l?l.$$.context:[])),callbacks:{},dirty:c,skip_bound:!1,root:t.target||l.$$.root};s&&s(f.root);let a=!1;f.ctx=n?n(e,t.props||{},(m,_,...d)=>{let u=d.length?d[0]:_;return f.ctx&&o(f.ctx[m],f.ctx[m]=u)&&(!f.skip_bound&&f.bound[m]&&f.bound[m](u),a&&Wt(e,m)),_}):[],f.update(),a=!0,X(f.before_update),f.fragment=i?i(f.ctx):!1,t.target&&(f.fragment&&f.fragment.c(),le(e,t.target,t.anchor,t.customElement),Ct()),Te(l)}var re=class{$destroy(){ce(this,1),this.$destroy=L}$on(t,n){let i=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return i.push(n),()=>{let o=i.indexOf(n);o!==-1&&i.splice(o,1)}}$set(t){this.$$set&&!At(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}};function tt(e){let t=e-1;return t*t*t+1}function Q(e,{delay:t=0,duration:n=400,easing:i=tt,x:o=0,y:r=0,opacity:s=0}={}){let c=getComputedStyle(e),l=+c.opacity,f=c.transform==="none"?"":c.transform,a=l*(1-s);return{delay:t,duration:n,easing:i,css:(m,_)=>`
@@ -1 +1 @@
1
- import{a as T}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.2/Marketplace/chunk-LU4CQUNV.js";import{A as w,s as x,t as I,z as k}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.2/Marketplace/chunk-W5LP6HWA.js";import{h as y,k as O}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.2/Marketplace/chunk-IANWTXDM.js";import{Fa as s,Ga as m,Oa as d,Ua as C,Za as a,Zb as v,_a as c,db as _,ea as f,hb as p,ja as g,ka as h,pb as u,qb as M}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.2/Marketplace/chunk-CQJJCQOZ.js";function S(o,e){if(o&1){let r=_();a(0,"li")(1,"mat-checkbox",5),p("ngModelChange",function(t){let i=g(r).$implicit;return h(i.selected=t)}),a(2,"div",6)(3,"h5",7),u(4),c()()()()}if(o&2){let r=e.$implicit;s(1),d("ngModel",r.selected),s(3),M(r.Name)}}var R=(()=>{let e=class e{constructor(l,t){this.data=l,this.dialogRef=t,this.selectedItems=this.data.selectedItems,this.channels=this.data.channels}ngOnInit(){this.initModalConfig()}initModalConfig(){this.modalConfig=new k,this.modalConfig.title="Updating Inventory"}onOk(){this.dialogRef.close(this.channels)}onClose(){this.dialogRef.close()}getSelectedChannel(){return this.channels.filter(l=>l.selected)}};e.\u0275fac=function(t){return new(t||e)(m(I),m(x))},e.\u0275cmp=f({type:e,selectors:[["app-modal-update-channels"]],decls:5,vars:3,consts:[[3,"dynamicValidated","config","onOk","onClose","onCancel"],["content",""],[2,"overflow-y","auto","max-height","28rem"],[1,"no-bullet"],[4,"ngFor","ngForOf"],[3,"ngModel","ngModelChange"],[1,"d-flex"],[1,"fw-light","me-2","my-auto"]],template:function(t,n){if(t&1&&(a(0,"modal-material",0),p("onOk",function(){return n.onOk()})("onClose",function(){return n.onClose()})("onCancel",function(){return n.onClose()}),a(1,"div",1)(2,"div",2)(3,"ul",3),C(4,S,5,2,"li",4),c()()()()),t&2){let i;d("dynamicValidated",((i=n.getSelectedChannel())==null?null:i.length)>0)("config",n.modalConfig),s(4),d("ngForOf",n.channels)}},dependencies:[v,y,O,T,w],styles:[".no-bullet[_ngcontent-%COMP%]{list-style-type:none}mat-form-field[_ngcontent-%COMP%]{width:100%;height:100%}.mat-dialog-title[_ngcontent-%COMP%]{margin-bottom:0%;margin-left:24px}.vertical-radio[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin:15px 0}"]});let o=e;return o})();export{R as a};
1
+ import{a as T}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.4/Marketplace/chunk-FGEVVKEH.js";import{A as w,s as x,t as I,z as k}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.4/Marketplace/chunk-R4XC3TIR.js";import{h as y,k as O}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.4/Marketplace/chunk-7QIOC7BK.js";import{Fa as s,Ga as m,Oa as d,Ua as C,Za as a,Zb as v,_a as c,db as _,ea as f,hb as p,ja as g,ka as h,pb as u,qb as M}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.4/Marketplace/chunk-DJCANNYC.js";function S(o,e){if(o&1){let r=_();a(0,"li")(1,"mat-checkbox",5),p("ngModelChange",function(t){let i=g(r).$implicit;return h(i.selected=t)}),a(2,"div",6)(3,"h5",7),u(4),c()()()()}if(o&2){let r=e.$implicit;s(1),d("ngModel",r.selected),s(3),M(r.Name)}}var R=(()=>{let e=class e{constructor(l,t){this.data=l,this.dialogRef=t,this.selectedItems=this.data.selectedItems,this.channels=this.data.channels}ngOnInit(){this.initModalConfig()}initModalConfig(){this.modalConfig=new k,this.modalConfig.title="Updating Inventory"}onOk(){this.dialogRef.close(this.channels)}onClose(){this.dialogRef.close()}getSelectedChannel(){return this.channels.filter(l=>l.selected)}};e.\u0275fac=function(t){return new(t||e)(m(I),m(x))},e.\u0275cmp=f({type:e,selectors:[["app-modal-update-channels"]],decls:5,vars:3,consts:[[3,"dynamicValidated","config","onOk","onClose","onCancel"],["content",""],[2,"overflow-y","auto","max-height","28rem"],[1,"no-bullet"],[4,"ngFor","ngForOf"],[3,"ngModel","ngModelChange"],[1,"d-flex"],[1,"fw-light","me-2","my-auto"]],template:function(t,n){if(t&1&&(a(0,"modal-material",0),p("onOk",function(){return n.onOk()})("onClose",function(){return n.onClose()})("onCancel",function(){return n.onClose()}),a(1,"div",1)(2,"div",2)(3,"ul",3),C(4,S,5,2,"li",4),c()()()()),t&2){let i;d("dynamicValidated",((i=n.getSelectedChannel())==null?null:i.length)>0)("config",n.modalConfig),s(4),d("ngForOf",n.channels)}},dependencies:[v,y,O,T,w],styles:[".no-bullet[_ngcontent-%COMP%]{list-style-type:none}mat-form-field[_ngcontent-%COMP%]{width:100%;height:100%}.mat-dialog-title[_ngcontent-%COMP%]{margin-bottom:0%;margin-left:24px}.vertical-radio[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin:15px 0}"]});let o=e;return o})();export{R as a};
@@ -1,4 +1,4 @@
1
- import{a as Ne}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.2/Marketplace/chunk-JGSLR6Q7.js";import{e as Be}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.2/Marketplace/chunk-MG7FPXZX.js";import{a as Le,b as le,c as $e,d as He,e as ue,f as We,g as de,h as Ke,i as q,j as he,k as I}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.2/Marketplace/chunk-VM5LF2AQ.js";import{a as Ue}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.2/Marketplace/chunk-ZSK75YJW.js";import{b as ce,c as z}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.2/Marketplace/chunk-QYP6WXYL.js";import{$ as E,A as Ce,B as Pe,I as oe,Ic as Fe,Ka as $,Mb as xe,N as De,Nb as Re,Q as ie,Rb as ae,T as _,U as se,X as U,aa as N,b as g,ba as y,c as X,ca as h,fa as F,fc as je,g as ye,gc as Oe,h as Ie,hc as Me,k as M,l as B,m as x,n as K,pa as _e,q as D,r as Te,ua as L}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.2/Marketplace/chunk-CQJJCQOZ.js";import{h as b}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.2/Marketplace/chunk-FG5W5K4B.js";var dt="firebase",ht="10.7.1";q(dt,ht,"app");var G=new xe("ANGULARFIRE2_VERSION");var pt=(r,i)=>{let t=i?[i]:Ke(),e=[];return t.forEach(n=>{n.container.getProvider(r).instances.forEach(s=>{e.includes(s)||e.push(s)})}),e},V=class{constructor(){return pt(ft)}},ft="app-check";function pe(){}var Y=class{zone;delegate;constructor(i,t=Ie){this.zone=i,this.delegate=t}now(){return this.delegate.now()}schedule(i,t,e){let n=this.zone,o=function(s){n.runGuarded(()=>{i.apply(this,[s])})};return this.delegate.schedule(o,t,e)}},fe=class{zone;task=null;constructor(i){this.zone=i}call(i,t){let e=this.unscheduleTask.bind(this);return this.task=this.zone.run(()=>Zone.current.scheduleMacroTask("firebaseZoneBlock",pe,{},pe,pe)),t.pipe(U({next:e,complete:e,error:e})).subscribe(i).add(e)}unscheduleTask(){setTimeout(()=>{this.task!=null&&this.task.state==="scheduled"&&(this.task.invoke(),this.task=null)},10)}},ze=(()=>{class r{ngZone;outsideAngular;insideAngular;constructor(t){this.ngZone=t,this.outsideAngular=t.runOutsideAngular(()=>new Y(Zone.current)),this.insideAngular=t.run(()=>new Y(Zone.current,ye)),globalThis.\u0275AngularFireScheduler||=this}static \u0275fac=function(e){return new(e||r)(h($))};static \u0275prov=E({token:r,factory:r.\u0275fac,providedIn:"root"})}return r})();function gt(){let r=globalThis.\u0275AngularFireScheduler;if(!r)throw new Error(`Either AngularFireModule has not been provided in your AppModule (this can be done manually or implictly using
1
+ import{a as Ne}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.4/Marketplace/chunk-SKMUHTVE.js";import{e as Be}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.4/Marketplace/chunk-7XITKPS5.js";import{a as Le,b as le,c as $e,d as He,e as ue,f as We,g as de,h as Ke,i as q,j as he,k as I}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.4/Marketplace/chunk-GQU66EJO.js";import{a as Ue}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.4/Marketplace/chunk-WP6G47JB.js";import{b as ce,c as z}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.4/Marketplace/chunk-MKDJJ5L7.js";import{$ as E,A as Ce,B as Pe,I as oe,Ic as Fe,Ka as $,Mb as xe,N as De,Nb as Re,Q as ie,Rb as ae,T as _,U as se,X as U,aa as N,b as g,ba as y,c as X,ca as h,fa as F,fc as je,g as ye,gc as Oe,h as Ie,hc as Me,k as M,l as B,m as x,n as K,pa as _e,q as D,r as Te,ua as L}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.4/Marketplace/chunk-DJCANNYC.js";import{h as b}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.7.4/Marketplace/chunk-R7J6AS67.js";var dt="firebase",ht="10.7.1";q(dt,ht,"app");var G=new xe("ANGULARFIRE2_VERSION");var pt=(r,i)=>{let t=i?[i]:Ke(),e=[];return t.forEach(n=>{n.container.getProvider(r).instances.forEach(s=>{e.includes(s)||e.push(s)})}),e},V=class{constructor(){return pt(ft)}},ft="app-check";function pe(){}var Y=class{zone;delegate;constructor(i,t=Ie){this.zone=i,this.delegate=t}now(){return this.delegate.now()}schedule(i,t,e){let n=this.zone,o=function(s){n.runGuarded(()=>{i.apply(this,[s])})};return this.delegate.schedule(o,t,e)}},fe=class{zone;task=null;constructor(i){this.zone=i}call(i,t){let e=this.unscheduleTask.bind(this);return this.task=this.zone.run(()=>Zone.current.scheduleMacroTask("firebaseZoneBlock",pe,{},pe,pe)),t.pipe(U({next:e,complete:e,error:e})).subscribe(i).add(e)}unscheduleTask(){setTimeout(()=>{this.task!=null&&this.task.state==="scheduled"&&(this.task.invoke(),this.task=null)},10)}},ze=(()=>{class r{ngZone;outsideAngular;insideAngular;constructor(t){this.ngZone=t,this.outsideAngular=t.runOutsideAngular(()=>new Y(Zone.current)),this.insideAngular=t.run(()=>new Y(Zone.current,ye)),globalThis.\u0275AngularFireScheduler||=this}static \u0275fac=function(e){return new(e||r)(h($))};static \u0275prov=E({token:r,factory:r.\u0275fac,providedIn:"root"})}return r})();function gt(){let r=globalThis.\u0275AngularFireScheduler;if(!r)throw new Error(`Either AngularFireModule has not been provided in your AppModule (this can be done manually or implictly using
2
2
  provideFirebaseApp) or you're calling an AngularFire method outside of an NgModule (which is not supported).`);return r}function qe(r){return mt(gt())(r)}function mt(r){return function(t){return t=t.lift(new fe(r.ngZone)),t.pipe(B(r.outsideAngular),M(r.insideAngular))}}var wt="firebase",kt="10.7.1";I.registerVersion(wt,kt,"app-compat");var vt=["ngOnDestroy"],Ge=(r,i,t,e={})=>new Proxy(r,{get:(n,o)=>t.runOutsideAngular(()=>{if(r[o])return e?.spy?.get&&e.spy.get(o,r[o]),r[o];if(vt.indexOf(o)>-1)return()=>{};let s=i.toPromise().then(a=>{let c=a?.[o];return typeof c=="function"?c.bind(a):c?.then?c.then(l=>t.run(()=>l)):t.run(()=>c)});return new Proxy(()=>{},{get:(a,c)=>s[c],apply:(a,c,l)=>s.then(d=>{let u=d?.(...l);return e?.spy?.apply&&e.spy.apply(o,l,u),u})})})});var Q=class{constructor(i){return i}},ee=new y("angularfire2.app.options"),te=new y("angularfire2.app.name");function ge(r,i,t){let e=typeof t=="string"&&t||"[DEFAULT]",n=typeof t=="object"&&t||{};n.name=n.name||e;let s=I.apps.filter(a=>a&&a.name===n.name)[0]||i.runOutsideAngular(()=>I.initializeApp(r,n));try{if(JSON.stringify(r)!==JSON.stringify(s.options)){let a=!!module.hot;St("error",`${s.name} Firebase App already initialized with different options${a?", you may need to reload as Firebase is not HMR aware.":"."}`)}}catch{}return new Q(s)}var St=(r,...i)=>{ae()&&typeof console<"u"&&console[r](...i)},bt={provide:Q,useFactory:ge,deps:[ee,$,[new _e,te]]},Pn=(()=>{class r{static initializeApp(t,e){return{ngModule:r,providers:[{provide:ee,useValue:t},{provide:te,useValue:e}]}}constructor(t){I.registerVersion("angularfire",G.full,"core"),I.registerVersion("angularfire",G.full,"app-compat"),I.registerVersion("angular",Re.full,t.toString())}static \u0275fac=function(e){return new(e||r)(h(L))};static \u0275mod=F({type:r});static \u0275inj=N({providers:[bt]})}return r})();function Je(r,i,t,e,n){let[,o,s]=globalThis.\u0275AngularfireInstanceCache.find(a=>a[0]===r)||[];if(o)return Et(n,s)||(Ve("error",`${i} was already initialized on the ${t} Firebase App with different settings.${yt?" You may need to reload as Firebase is not HMR aware.":""}`),Ve("warn",{is:n,was:s})),o;{let a=e();return globalThis.\u0275AngularfireInstanceCache.push([r,a,n]),a}}function Et(r,i){try{return r.toString()===i.toString()}catch{return r===i}}var yt=typeof module<"u"&&!!module.hot,Ve=(r,...i)=>{ae()&&typeof console<"u"&&console[r](...i)};globalThis.\u0275AngularfireInstanceCache||=[];var It=new Map,Tt={activated:!1,tokenObservers:[]},Ct={initialized:!1,enabled:!1};function T(r){return It.get(r)||Object.assign({},Tt)}function et(){return Ct}var Pt="https://content-firebaseappcheck.googleapis.com/v1";var Dt="exchangeDebugToken",Ze={OFFSET_DURATION:5*60*1e3,RETRIAL_MIN_WAIT:30*1e3,RETRIAL_MAX_WAIT:16*60*1e3},Hn=24*60*60*1e3;var Ae=class{constructor(i,t,e,n,o){if(this.operation=i,this.retryPolicy=t,this.getWaitDuration=e,this.lowerBound=n,this.upperBound=o,this.pending=null,this.nextErrorWaitInterval=n,n>o)throw new Error("Proactive refresh lower bound greater than upper bound!")}start(){this.nextErrorWaitInterval=this.lowerBound,this.process(!0).catch(()=>{})}stop(){this.pending&&(this.pending.reject("cancelled"),this.pending=null)}isRunning(){return!!this.pending}process(i){return b(this,null,function*(){this.stop();try{this.pending=new le,this.pending.promise.catch(t=>{}),yield _t(this.getNextRun(i)),this.pending.resolve(),yield this.pending.promise,this.pending=new le,this.pending.promise.catch(t=>{}),yield this.operation(),this.pending.resolve(),yield this.pending.promise,this.process(!0).catch(()=>{})}catch(t){this.retryPolicy(t)?this.process(!1).catch(()=>{}):this.stop()}})}getNextRun(i){if(i)return this.nextErrorWaitInterval=this.lowerBound,this.getWaitDuration();{let t=this.nextErrorWaitInterval;return this.nextErrorWaitInterval*=2,this.nextErrorWaitInterval>this.upperBound&&(this.nextErrorWaitInterval=this.upperBound),t}}};function _t(r){return new Promise(i=>{setTimeout(i,r)})}var xt={"already-initialized":"You have already called initializeAppCheck() for FirebaseApp {$appName} with different options. To avoid this error, call initializeAppCheck() with the same options as when it was originally called. This will return the already initialized instance.","use-before-activation":"App Check is being used before initializeAppCheck() is called for FirebaseApp {$appName}. Call initializeAppCheck() before instantiating other Firebase services.","fetch-network-error":"Fetch failed to connect to a network. Check Internet connection. Original error: {$originalErrorMessage}.","fetch-parse-error":"Fetch client could not parse response. Original error: {$originalErrorMessage}.","fetch-status-error":"Fetch server returned an HTTP error status. HTTP status: {$httpStatus}.","storage-open":"Error thrown when opening storage. Original error: {$originalErrorMessage}.","storage-get":"Error thrown when reading from storage. Original error: {$originalErrorMessage}.","storage-set":"Error thrown when writing to storage. Original error: {$originalErrorMessage}.","recaptcha-error":"ReCAPTCHA error.",throttled:"Requests throttled due to {$httpStatus} error. Attempts allowed again after {$time}"},R=new He("appCheck","AppCheck",xt);function tt(r){if(!T(r).activated)throw R.create("use-before-activation",{appName:r.name})}function nt(e,n){return b(this,arguments,function*({url:r,body:i},t){let o={"Content-Type":"application/json"},s=t.getImmediate({optional:!0});if(s){let f=yield s.getHeartbeatsHeader();f&&(o["X-Firebase-Client"]=f)}let a={method:"POST",body:JSON.stringify(i),headers:o},c;try{c=yield fetch(r,a)}catch(f){throw R.create("fetch-network-error",{originalErrorMessage:f?.message})}if(c.status!==200)throw R.create("fetch-status-error",{httpStatus:c.status});let l;try{l=yield c.json()}catch(f){throw R.create("fetch-parse-error",{originalErrorMessage:f?.message})}let d=l.ttl.match(/^([\d.]+)(s)$/);if(!d||!d[2]||isNaN(Number(d[1])))throw R.create("fetch-parse-error",{originalErrorMessage:`ttl field (timeToLive) is not in standard Protobuf Duration format: ${l.ttl}`});let u=Number(d[1])*1e3,p=Date.now();return{token:l.token,expireTimeMillis:p+u,issuedAtTimeMillis:p}})}function rt(r,i){let{projectId:t,appId:e,apiKey:n}=r.options;return{url:`${Pt}/projects/${t}/apps/${e}:${Dt}?key=${n}`,body:{debug_token:i}}}var Rt="firebase-app-check-database",jt=1,we="firebase-app-check-store";var ne=null;function Ot(){return ne||(ne=new Promise((r,i)=>{try{let t=indexedDB.open(Rt,jt);t.onsuccess=e=>{r(e.target.result)},t.onerror=e=>{var n;i(R.create("storage-open",{originalErrorMessage:(n=e.target.error)===null||n===void 0?void 0:n.message}))},t.onupgradeneeded=e=>{let n=e.target.result;switch(e.oldVersion){case 0:n.createObjectStore(we,{keyPath:"compositeKey"})}}}catch(t){i(R.create("storage-open",{originalErrorMessage:t?.message}))}}),ne)}function Mt(r,i){return Bt(Nt(r),i)}function Bt(r,i){return b(this,null,function*(){let e=(yield Ot()).transaction(we,"readwrite"),o=e.objectStore(we).put({compositeKey:r,value:i});return new Promise((s,a)=>{o.onsuccess=c=>{s()},e.onerror=c=>{var l;a(R.create("storage-set",{originalErrorMessage:(l=c.target.error)===null||l===void 0?void 0:l.message}))}})})}function Nt(r){return`${r.options.appId}-${r.name}`}var ke=new We("@firebase/app-check");function me(r,i){return $e()?Mt(r,i).catch(t=>{ke.warn(`Failed to write token to IndexedDB. Error: ${t}`)}):Promise.resolve()}function ot(){return et().enabled}function it(){return b(this,null,function*(){let r=et();if(r.enabled&&r.token)return r.token.promise;throw Error(`
3
3
  Can't get debug token in production mode.
4
- `)})}var Ft={error:"UNKNOWN_ERROR"};function Lt(r){return Le.encodeString(JSON.stringify(r),!1)}function ve(r,i=!1){return b(this,null,function*(){let t=r.app;tt(t);let e=T(t),n=e.token,o;if(n&&!J(n)&&(e.token=void 0,n=void 0),!n){let c=yield e.cachedTokenPromise;c&&(J(c)?n=c:yield me(t,void 0))}if(!i&&n&&J(n))return{token:n.token};let s=!1;if(ot()){e.exchangeTokenPromise||(e.exchangeTokenPromise=nt(rt(t,yield it()),r.heartbeatServiceProvider).finally(()=>{e.exchangeTokenPromise=void 0}),s=!0);let c=yield e.exchangeTokenPromise;return yield me(t,c),e.token=c,{token:c.token}}try{e.exchangeTokenPromise||(e.exchangeTokenPromise=e.provider.getToken().finally(()=>{e.exchangeTokenPromise=void 0}),s=!0),n=yield T(t).exchangeTokenPromise}catch(c){c.code==="appCheck/throttled"?ke.warn(c.message):ke.error(c),o=c}let a;return n?o?J(n)?a={token:n.token,internalError:o}:a=Ye(o):(a={token:n.token},e.token=n,yield me(t,n)):a=Ye(o),s&&Kt(t,a),a})}function $t(r){return b(this,null,function*(){let i=r.app;tt(i);let{provider:t}=T(i);if(ot()){let e=yield it(),{token:n}=yield nt(rt(i,e),r.heartbeatServiceProvider);return{token:n}}else{let{token:e}=yield t.getToken();return{token:e}}})}function Ht(r,i,t,e){let{app:n}=r,o=T(n),s={next:t,error:e,type:i};if(o.tokenObservers=[...o.tokenObservers,s],o.token&&J(o.token)){let a=o.token;Promise.resolve().then(()=>{t({token:a.token}),Xe(r)}).catch(()=>{})}o.cachedTokenPromise.then(()=>Xe(r))}function st(r,i){let t=T(r),e=t.tokenObservers.filter(n=>n.next!==i);e.length===0&&t.tokenRefresher&&t.tokenRefresher.isRunning()&&t.tokenRefresher.stop(),t.tokenObservers=e}function Xe(r){let{app:i}=r,t=T(i),e=t.tokenRefresher;e||(e=Wt(r),t.tokenRefresher=e),!e.isRunning()&&t.isTokenAutoRefreshEnabled&&e.start()}function Wt(r){let{app:i}=r;return new Ae(()=>b(this,null,function*(){let t=T(i),e;if(t.token?e=yield ve(r,!0):e=yield ve(r),e.error)throw e.error;if(e.internalError)throw e.internalError}),()=>!0,()=>{let t=T(i);if(t.token){let e=t.token.issuedAtTimeMillis+(t.token.expireTimeMillis-t.token.issuedAtTimeMillis)*.5+3e5,n=t.token.expireTimeMillis-5*60*1e3;return e=Math.min(e,n),Math.max(0,e-Date.now())}else return 0},Ze.RETRIAL_MIN_WAIT,Ze.RETRIAL_MAX_WAIT)}function Kt(r,i){let t=T(r).tokenObservers;for(let e of t)try{e.type==="EXTERNAL"&&i.error!=null?e.error(i.error):e.next(i)}catch{}}function J(r){return r.expireTimeMillis-Date.now()>0}function Ye(r){return{token:Lt(Ft),error:r}}var Se=class{constructor(i,t){this.app=i,this.heartbeatServiceProvider=t}_delete(){let{tokenObservers:i}=T(this.app);for(let t of i)st(this.app,t.next);return Promise.resolve()}};function Ut(r,i){return new Se(r,i)}function zt(r){return{getToken:i=>ve(r,i),getLimitedUseToken:()=>$t(r),addTokenListener:i=>Ht(r,"INTERNAL",i),removeTokenListener:i=>st(r.app,i)}}var qt="@firebase/app-check",Vt="0.8.1";var Gt="app-check",Qe="app-check-internal";function Jt(){de(new ue(Gt,r=>{let i=r.getProvider("app").getImmediate(),t=r.getProvider("heartbeat");return Ut(i,t)},"PUBLIC").setInstantiationMode("EXPLICIT").setInstanceCreatedCallback((r,i,t)=>{r.getProvider(Qe).initialize()})),de(new ue(Qe,r=>{let i=r.getProvider("app-check").getImmediate();return zt(i)},"PUBLIC").setInstantiationMode("EXPLICIT")),q(qt,Vt)}Jt();var Zt=["localhost","0.0.0.0","127.0.0.1"],Qn=typeof window<"u"&&Zt.includes(window.location.hostname);var Yt=new y("angularfire2.auth.use-emulator"),Qt=new y("angularfire2.auth.settings"),en=new y("angularfire2.auth.tenant-id"),tn=new y("angularfire2.auth.langugage-code"),nn=new y("angularfire2.auth.use-device-language"),rn=new y("angularfire.auth.persistence"),on=(r,i,t,e,n,o,s,a)=>Je(`${r.name}.auth`,"AngularFireAuth",r.name,()=>{let c=i.runOutsideAngular(()=>r.auth());if(t&&c.useEmulator(...t),e&&(c.tenantId=e),c.languageCode=n,o&&c.useDeviceLanguage(),s)for(let[l,d]of Object.entries(s))c.settings[l]=d;return a&&c.setPersistence(a),c},[t,e,n,o,s,a]),be=(()=>{class r{authState;idToken;user;idTokenResult;credential;constructor(t,e,n,o,s,a,c,l,d,u,p,f){let W=new X,j=K(void 0).pipe(M(s.outsideAngular),_(()=>o.runOutsideAngular(()=>import("https://cdn.jsdelivr.net/npm/marketplacepos@3.7.2/Marketplace/chunk-5CBOZ77Z.js"))),D(()=>ge(t,o,e)),D(C=>on(C,o,a,l,d,u,c,p)),ie({bufferSize:1,refCount:!1}));if(Me(n))this.authState=this.user=this.idToken=this.idTokenResult=this.credential=K(null);else{j.pipe(De()).subscribe();let C=j.pipe(_(A=>A.getRedirectResult().then(P=>P,()=>null)),qe,ie({bufferSize:1,refCount:!1})),Z=j.pipe(_(A=>new g(P=>({unsubscribe:o.runOutsideAngular(()=>A.onAuthStateChanged(O=>P.next(O),O=>P.error(O),()=>P.complete()))})))),re=j.pipe(_(A=>new g(P=>({unsubscribe:o.runOutsideAngular(()=>A.onIdTokenChanged(O=>P.next(O),O=>P.error(O),()=>P.complete()))}))));this.authState=C.pipe(se(Z),B(s.outsideAngular),M(s.insideAngular)),this.user=C.pipe(se(re),B(s.outsideAngular),M(s.insideAngular)),this.idToken=this.user.pipe(_(A=>A?x(A.getIdToken()):K(null))),this.idTokenResult=this.user.pipe(_(A=>A?x(A.getIdTokenResult()):K(null))),this.credential=Ce(C,W,this.authState.pipe(Pe(A=>!A))).pipe(D(A=>A?.user?A:null),B(s.outsideAngular),M(s.insideAngular))}return Ge(this,j,o,{spy:{apply:(C,Z,re)=>{(C.startsWith("signIn")||C.startsWith("createUser"))&&re.then(A=>W.next(A))}}})}static \u0275fac=function(e){return new(e||r)(h(ee),h(te,8),h(L),h($),h(ze),h(Yt,8),h(Qt,8),h(en,8),h(tn,8),h(nn,8),h(rn,8),h(V,8))};static \u0275prov=E({token:r,factory:r.\u0275fac,providedIn:"any"})}return r})(),gr=(()=>{class r{constructor(){I.registerVersion("angularfire",G.full,"auth-compat")}static \u0275fac=function(e){return new(e||r)};static \u0275mod=F({type:r});static \u0275inj=N({providers:[be]})}return r})();function m(r,i,t,e){return new Promise((n,o)=>{r||o("IndexedDB not available");let s=r.open(i,t),a;s.onsuccess=c=>{a=s.result,n(a)},s.onerror=c=>{o(`IndexedDB error: ${s.error}`)},typeof e=="function"&&(s.onupgradeneeded=c=>{e(c,a)})})}function at(r,i,t,e,n){if(!r)return;let o=r.open(i,t);o.onupgradeneeded=s=>{let a=s.target.result;e.forEach(l=>{if(!a.objectStoreNames.contains(l.store)){let d=a.createObjectStore(l.store,l.storeConfig);l.storeSchema.forEach(u=>{d.createIndex(u.name,u.keypath,u.options)})}});let c=n&&n();c&&Object.keys(c).map(l=>parseInt(l,10)).filter(l=>l>s.oldVersion).sort((l,d)=>l-d).forEach(l=>{c[l](a,o.transaction)}),a.close()},o.onsuccess=s=>{s.target.result.close()}}function an(r,i,t){if(!r||!i||!t)throw Error('Params: "dbName", "version", "storeName" are mandatory.');return new g(e=>{try{let n=i+1,o=indexedDB.open(r,n);o.onupgradeneeded=s=>{let a=s.target.result;a.deleteObjectStore(t),a.close(),console.log("onupgradeneeded"),e.next(!0),e.complete()},o.onerror=s=>e.error(s)}catch(n){e.error(n)}})}function cn(r,i){return r.objectStoreNames.contains(i)}function S(r,i,t){r||t("You need to use the openDatabase function to create a database before you query it!"),cn(r,i)||t(`objectStore does not exists: ${i}`)}function k(r,i){let t=r.transaction(i.storeName,i.dbMode);return t.onerror=i.error,t.onabort=i.abort,t}function v(r,i,t,e){return{storeName:i,dbMode:r,error:n=>{t(n)},abort:n=>{t(n)}}}var w=function(r){return r.readonly="readonly",r.readwrite="readwrite",r}(w||{}),ct=new y(null),Ee=(()=>{class r{constructor(t,e){if(this.dbConfig=t,this.platformId=e,!t.name)throw new Error("NgxIndexedDB: Please, provide the dbName in the configuration");if(!t.version)throw new Error("NgxIndexedDB: Please, provide the db version in the configuration");this.isBrowser=Oe(this.platformId),this.isBrowser&&(this.indexedDB=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB,at(this.indexedDB,t.name,t.version,t.objectStoresMeta,t.migrationFactory),m(this.indexedDB,t.name).then(n=>{n.version!==t.version&&(this.dbConfig.version=n.version)}))}createObjectStore(t,e){let n=[t];at(this.indexedDB,this.dbConfig.name,++this.dbConfig.version,n,e)}add(t,e,n){return new g(o=>{m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(s=>{let c=k(s,v(w.readwrite,t,d=>o.error(d))).objectStore(t),l=n?c.add(e,n):c.add(e);l.onsuccess=d=>b(this,null,function*(){let u=d.target.result,p=c.get(u);p.onsuccess=f=>{o.next(f.target.result),o.complete()}})}).catch(s=>o.error(s))})}bulkAdd(t,e){let n=new Promise((o,s)=>{m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(a=>{let l=k(a,v(w.readwrite,t,o,s)).objectStore(t),d=e.map(u=>new Promise((p,f)=>{let W=u.key;delete u.key;let j=W?l.add(u,W):l.add(u);j.onsuccess=C=>{let Z=C.target.result;p(Z)}}));o(Promise.all(d))}).catch(a=>s(a))});return x(n)}bulkDelete(t,e){let n=e.map(o=>new Promise((s,a)=>{m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(c=>{let l=k(c,v(w.readwrite,t,a,s));l.objectStore(t).delete(o),l.oncomplete=()=>{this.getAll(t).pipe(oe(1)).subscribe(u=>{s(u)})}}).catch(c=>a(c))}));return x(Promise.all(n))}getByKey(t,e){return new g(n=>{m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(o=>{let c=k(o,v(w.readonly,t,n.error)).objectStore(t).get(e);c.onsuccess=l=>{n.next(l.target.result),n.complete()},c.onerror=l=>{n.error(l)}}).catch(o=>n.error(o))})}bulkGet(t,e){let n=e.map(o=>this.getByKey(t,o));return new g(o=>{Te(n).subscribe(s=>{o.next(s),o.complete()})})}getByID(t,e){return new g(n=>{m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(o=>{S(o,t,l=>n.error(l));let c=k(o,v(w.readonly,t,n.error,n.next)).objectStore(t).get(e);c.onsuccess=l=>{n.next(l.target.result)}}).catch(o=>n.error(o))})}getByIndex(t,e,n){return new g(o=>{m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(s=>{S(s,t,u=>o.error(u));let d=k(s,v(w.readonly,t,o.error)).objectStore(t).index(e).get(n);d.onsuccess=u=>{o.next(u.target.result),o.complete()}}).catch(s=>o.error(s))})}getAll(t){return new g(e=>{m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(n=>{S(n,t,c=>e.error(c));let a=k(n,v(w.readonly,t,e.error,e.next)).objectStore(t).getAll();a.onerror=c=>{e.error(c)},a.onsuccess=({target:{result:c}})=>{e.next(c),e.complete()}}).catch(n=>e.error(n))})}update(t,e){return new g(n=>{m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(o=>{S(o,t,l=>n.error(l));let a=k(o,v(w.readwrite,t,l=>n.error(l))).objectStore(t),c=a.put(e);c.onsuccess=l=>b(this,null,function*(){let d=l.target.result,u=a.get(d);u.onsuccess=p=>{n.next(p.target.result),n.complete()}})}).catch(o=>n.error(o))})}delete(t,e){return new g(n=>{m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(o=>{S(o,t,c=>n.error(c));let s=k(o,v(w.readwrite,t,c=>n.error(c)));s.objectStore(t).delete(e),s.oncomplete=()=>{this.getAll(t).pipe(oe(1)).subscribe(c=>{n.next(c),n.complete()})}}).catch(o=>n.error(o))})}deleteByKey(t,e){return new g(n=>{m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(o=>{S(o,t,c=>n.error(c));let s=k(o,v(w.readwrite,t,c=>n.error(c))),a=s.objectStore(t);s.oncomplete=()=>{n.next(!0),n.complete()},a.delete(e)}).catch(o=>n.error(o))})}clear(t){return new g(e=>{m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(n=>{S(n,t,a=>e.error(a));let o=k(n,v(w.readwrite,t,a=>e.error(a)));o.objectStore(t).clear(),o.oncomplete=()=>{e.next(!0),e.complete()}}).catch(n=>e.error(n))})}deleteDatabase(){return new g(t=>{m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(e=>b(this,null,function*(){yield e.close();let n=this.indexedDB.deleteDatabase(this.dbConfig.name);n.onsuccess=()=>{t.next(!0),t.complete()},n.onerror=o=>t.error(o),n.onblocked=()=>{throw new Error("Unable to delete database because it's blocked")}})).catch(e=>t.error(e))})}openCursor(t,e){return new g(n=>{m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(o=>{S(o,t,l=>n.error(l));let a=k(o,v(w.readonly,t,n.error)).objectStore(t),c=e===void 0?a.openCursor():a.openCursor(e);c.onsuccess=l=>{n.next(l),n.complete()}}).catch(o=>n.error(o))})}openCursorByIndex(t,e,n,o=w.readonly){let s=new X;return m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(a=>{S(a,t,p=>{s.error(p)});let u=k(a,v(o,t,p=>{s.error(p)},()=>{s.next()})).objectStore(t).index(e).openCursor(n);u.onsuccess=p=>{s.next(p)}}).catch(a=>s.error(a)),s}getAllByIndex(t,e,n){let o=[];return new g(s=>{m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(a=>{S(a,t,p=>s.error(p));let u=k(a,v(w.readonly,t,s.error)).objectStore(t).index(e).openCursor(n);u.onsuccess=p=>{let f=p.target.result;f?(o.push(f.value),f.continue()):(s.next(o),s.complete())}}).catch(a=>s.error(a))})}getAllKeysByIndex(t,e,n){let o=[];return new g(s=>{m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(a=>{S(a,t,p=>s.error(p));let u=k(a,v(w.readonly,t,s.error)).objectStore(t).index(e).openKeyCursor(n);u.onsuccess=p=>{let f=p.target.result;f?(o.push({primaryKey:f.primaryKey,key:f.key}),f.continue()):(s.next(o),s.complete())}}).catch(a=>s.error(a))})}count(t,e){return new g(n=>{m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(o=>{S(o,t,l=>n.error(l));let c=k(o,v(w.readonly,t,n.error)).objectStore(t).count(e);c.onerror=l=>n.error(l),c.onsuccess=l=>{n.next(l.target.result),n.complete()}}).catch(o=>n.error(o))})}countByIndex(t,e,n){return new g(o=>{m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(s=>{S(s,t,u=>o.error(u));let d=k(s,v(w.readonly,t,o.error)).objectStore(t).index(e).count(n);d.onerror=u=>o.error(u),d.onsuccess=u=>{o.next(u.target.result),o.complete()}}).catch(s=>o.error(s))})}deleteObjectStore(t){return an(this.dbConfig.name,++this.dbConfig.version,t)}}return r.\u0275fac=function(t){return new(t||r)(h(ct),h(L))},r.\u0275prov=E({token:r,factory:r.\u0275fac}),r})(),Er=(()=>{class r{static forRoot(t){return{ngModule:r,providers:[Ee,{provide:ct,useValue:t}]}}}return r.\u0275fac=function(t){return new(t||r)},r.\u0275mod=F({type:r}),r.\u0275inj=N({imports:[[je]]}),r})();var lt=(()=>{let i=class i{constructor(e){this.db=e,this.DATABASE="Categories"}saveCategoriesByChannelType(e,n){let o=this.getKey(n);return this.db.add(this.DATABASE,e,o).pipe(D(s=>e))}getCategoriesByChannelType(e){let n=this.getKey(e);return this.db.getByKey(this.DATABASE,n)}getKey(e){let n="";switch(e){case ce.Lazada:n="Lazada";break;case ce.Tokopedia:n="Tokopedia";break}return n}clearDatabase(){this.db.clear(this.DATABASE)}getHostName(){let e=localStorage.getItem("Authorization");return this.hostName=JSON.parse(e)?.Host,this.hostName}};i.\u0275fac=function(n){return new(n||i)(h(Ee))},i.\u0275prov=E({token:i,factory:i.\u0275fac,providedIn:"root"});let r=i;return r})();var ut=(()=>{let i=class i{constructor(){}inititalizeIntercom(){let e=this.getFromLocalStorage();e?.Enabled&&window.Intercom("boot",{app_id:"xv1oomgl",name:e.Name,email:e.Email,created_at:e.Created,user_hash:e.Hash})}shutdown(){this.getFromLocalStorage()?.Enabled&&(window.Intercom("shutdown"),this.clearStorage())}clearStorage(){localStorage.removeItem("Intercom")}updateLocalStorage(e){e&&(e.Enabled=!0),localStorage.setItem("Intercom",JSON.stringify(e))}getFromLocalStorage(){let e=localStorage.getItem("Intercom");return JSON.parse(e)}hideLauncher(){let e=this.getFromLocalStorage();e?.Enabled&&(window.Intercom("update",{app_id:"xv1oomgl",hide_default_launcher:!0}),e.hide_default_launcher=!0,this.updateLocalStorage(e))}showLauncher(){let e=this.getFromLocalStorage();e?.Enabled&&(window.Intercom("update",{app_id:"xv1oomgl",hide_default_launcher:!1}),e.hide_default_launcher=!1,this.updateLocalStorage(e))}isHideLauncher(){let e=this.getFromLocalStorage();return z.IsEmpty(e?.hide_default_launcher)?!1:e?.hide_default_launcher}};i.\u0275fac=function(n){return new(n||i)},i.\u0275prov=E({token:i,factory:i.\u0275fac,providedIn:"root"});let r=i;return r})();var Ai=(()=>{let i=class i{constructor(e,n,o,s,a,c,l){this.httpService=e,this.tokenDecodeService=n,this.afAuth=o,this.ngxPermission=s,this.localDataService=a,this.router=c,this.intercomService=l,this.channels=[]}login(e){return this.httpService.post("/api/token/Login",e).pipe(U(n=>{this.setLocalStorage(n,e.Host,e.Username),this.loadPermissions()}))}loginWithGoogle(e,n){e.preventDefault();let o=new he;return o.setCustomParameters({prompt:"select_account"}),x(this.afAuth.signInWithPopup(o)).pipe(D(s=>s.credential),D(s=>s.idToken),_(s=>this.httpService.post("/api/token/LoginWithSocialProvider",JSON.stringify({IDToken:s,Host:n}))),U(s=>{this.setLocalStorage(s,n,null),this.loadPermissions()}))}setLocalStorage(e,n,o){localStorage.setItem("user",JSON.stringify(e)),localStorage.setItem("Authorization",JSON.stringify({Host:n,username:o})),localStorage.setItem("channels",JSON.stringify(e.Channels)),this.intercomService.updateLocalStorage(e.IntercomWidget),this.intercomService.inititalizeIntercom()}loadPermissions(){this.ngxPermission.loadPermissions([]);let e=localStorage.getItem("user");if(z.IsNotEmpty(e)){let n=this.tokenDecodeService.GetRoles();this.ngxPermission.loadPermissions(n)}}getChannels(){let e=JSON.parse(JSON.stringify(this.channels));if(this.channels.length===0){let n=localStorage.getItem("channels");n?(this.channels=JSON.parse(n),e=JSON.parse(JSON.stringify(this.channels))):(this.channels=[],e=[])}return e=this.setChannelLogo(e),e}setChannelLogo(e){return e=e.map(n=>(n.logo=z.getChannelLogoByTypeId(n.TypeID),n)),e}logout(){this.clearLocalStorage(),this.ngxPermission.flushPermissions()}isActiveToken(){let e=JSON.parse(window.localStorage.getItem("user")),n=new Date;if(e!=null){let o=new Date(e.Token.expiredAt);return n<o?!0:(this.clearLocalStorage(),!1)}else return!1}getDomain(){if(!this.domain){let e=localStorage.getItem("Authorization");this.domain="https://"+JSON.parse(e).Host}return this.domain}clearLocalStorage(){this.domain=null,this.channels=[],localStorage.removeItem("channels"),localStorage.removeItem("user"),this.intercomService.shutdown(),this.localDataService.clearDatabase(),this.router.navigate([""])}};i.\u0275fac=function(n){return new(n||i)(h(Be),h(Ne),h(be),h(Ue),h(lt),h(Fe),h(ut))},i.\u0275prov=E({token:i,factory:i.\u0275fac,providedIn:"root"});let r=i;return r})();export{Pn as a,gr as b,Er as c,lt as d,Ai as e};
4
+ `)})}var Ft={error:"UNKNOWN_ERROR"};function Lt(r){return Le.encodeString(JSON.stringify(r),!1)}function ve(r,i=!1){return b(this,null,function*(){let t=r.app;tt(t);let e=T(t),n=e.token,o;if(n&&!J(n)&&(e.token=void 0,n=void 0),!n){let c=yield e.cachedTokenPromise;c&&(J(c)?n=c:yield me(t,void 0))}if(!i&&n&&J(n))return{token:n.token};let s=!1;if(ot()){e.exchangeTokenPromise||(e.exchangeTokenPromise=nt(rt(t,yield it()),r.heartbeatServiceProvider).finally(()=>{e.exchangeTokenPromise=void 0}),s=!0);let c=yield e.exchangeTokenPromise;return yield me(t,c),e.token=c,{token:c.token}}try{e.exchangeTokenPromise||(e.exchangeTokenPromise=e.provider.getToken().finally(()=>{e.exchangeTokenPromise=void 0}),s=!0),n=yield T(t).exchangeTokenPromise}catch(c){c.code==="appCheck/throttled"?ke.warn(c.message):ke.error(c),o=c}let a;return n?o?J(n)?a={token:n.token,internalError:o}:a=Ye(o):(a={token:n.token},e.token=n,yield me(t,n)):a=Ye(o),s&&Kt(t,a),a})}function $t(r){return b(this,null,function*(){let i=r.app;tt(i);let{provider:t}=T(i);if(ot()){let e=yield it(),{token:n}=yield nt(rt(i,e),r.heartbeatServiceProvider);return{token:n}}else{let{token:e}=yield t.getToken();return{token:e}}})}function Ht(r,i,t,e){let{app:n}=r,o=T(n),s={next:t,error:e,type:i};if(o.tokenObservers=[...o.tokenObservers,s],o.token&&J(o.token)){let a=o.token;Promise.resolve().then(()=>{t({token:a.token}),Xe(r)}).catch(()=>{})}o.cachedTokenPromise.then(()=>Xe(r))}function st(r,i){let t=T(r),e=t.tokenObservers.filter(n=>n.next!==i);e.length===0&&t.tokenRefresher&&t.tokenRefresher.isRunning()&&t.tokenRefresher.stop(),t.tokenObservers=e}function Xe(r){let{app:i}=r,t=T(i),e=t.tokenRefresher;e||(e=Wt(r),t.tokenRefresher=e),!e.isRunning()&&t.isTokenAutoRefreshEnabled&&e.start()}function Wt(r){let{app:i}=r;return new Ae(()=>b(this,null,function*(){let t=T(i),e;if(t.token?e=yield ve(r,!0):e=yield ve(r),e.error)throw e.error;if(e.internalError)throw e.internalError}),()=>!0,()=>{let t=T(i);if(t.token){let e=t.token.issuedAtTimeMillis+(t.token.expireTimeMillis-t.token.issuedAtTimeMillis)*.5+3e5,n=t.token.expireTimeMillis-5*60*1e3;return e=Math.min(e,n),Math.max(0,e-Date.now())}else return 0},Ze.RETRIAL_MIN_WAIT,Ze.RETRIAL_MAX_WAIT)}function Kt(r,i){let t=T(r).tokenObservers;for(let e of t)try{e.type==="EXTERNAL"&&i.error!=null?e.error(i.error):e.next(i)}catch{}}function J(r){return r.expireTimeMillis-Date.now()>0}function Ye(r){return{token:Lt(Ft),error:r}}var Se=class{constructor(i,t){this.app=i,this.heartbeatServiceProvider=t}_delete(){let{tokenObservers:i}=T(this.app);for(let t of i)st(this.app,t.next);return Promise.resolve()}};function Ut(r,i){return new Se(r,i)}function zt(r){return{getToken:i=>ve(r,i),getLimitedUseToken:()=>$t(r),addTokenListener:i=>Ht(r,"INTERNAL",i),removeTokenListener:i=>st(r.app,i)}}var qt="@firebase/app-check",Vt="0.8.1";var Gt="app-check",Qe="app-check-internal";function Jt(){de(new ue(Gt,r=>{let i=r.getProvider("app").getImmediate(),t=r.getProvider("heartbeat");return Ut(i,t)},"PUBLIC").setInstantiationMode("EXPLICIT").setInstanceCreatedCallback((r,i,t)=>{r.getProvider(Qe).initialize()})),de(new ue(Qe,r=>{let i=r.getProvider("app-check").getImmediate();return zt(i)},"PUBLIC").setInstantiationMode("EXPLICIT")),q(qt,Vt)}Jt();var Zt=["localhost","0.0.0.0","127.0.0.1"],Qn=typeof window<"u"&&Zt.includes(window.location.hostname);var Yt=new y("angularfire2.auth.use-emulator"),Qt=new y("angularfire2.auth.settings"),en=new y("angularfire2.auth.tenant-id"),tn=new y("angularfire2.auth.langugage-code"),nn=new y("angularfire2.auth.use-device-language"),rn=new y("angularfire.auth.persistence"),on=(r,i,t,e,n,o,s,a)=>Je(`${r.name}.auth`,"AngularFireAuth",r.name,()=>{let c=i.runOutsideAngular(()=>r.auth());if(t&&c.useEmulator(...t),e&&(c.tenantId=e),c.languageCode=n,o&&c.useDeviceLanguage(),s)for(let[l,d]of Object.entries(s))c.settings[l]=d;return a&&c.setPersistence(a),c},[t,e,n,o,s,a]),be=(()=>{class r{authState;idToken;user;idTokenResult;credential;constructor(t,e,n,o,s,a,c,l,d,u,p,f){let W=new X,j=K(void 0).pipe(M(s.outsideAngular),_(()=>o.runOutsideAngular(()=>import("https://cdn.jsdelivr.net/npm/marketplacepos@3.7.4/Marketplace/chunk-2V7GCWY7.js"))),D(()=>ge(t,o,e)),D(C=>on(C,o,a,l,d,u,c,p)),ie({bufferSize:1,refCount:!1}));if(Me(n))this.authState=this.user=this.idToken=this.idTokenResult=this.credential=K(null);else{j.pipe(De()).subscribe();let C=j.pipe(_(A=>A.getRedirectResult().then(P=>P,()=>null)),qe,ie({bufferSize:1,refCount:!1})),Z=j.pipe(_(A=>new g(P=>({unsubscribe:o.runOutsideAngular(()=>A.onAuthStateChanged(O=>P.next(O),O=>P.error(O),()=>P.complete()))})))),re=j.pipe(_(A=>new g(P=>({unsubscribe:o.runOutsideAngular(()=>A.onIdTokenChanged(O=>P.next(O),O=>P.error(O),()=>P.complete()))}))));this.authState=C.pipe(se(Z),B(s.outsideAngular),M(s.insideAngular)),this.user=C.pipe(se(re),B(s.outsideAngular),M(s.insideAngular)),this.idToken=this.user.pipe(_(A=>A?x(A.getIdToken()):K(null))),this.idTokenResult=this.user.pipe(_(A=>A?x(A.getIdTokenResult()):K(null))),this.credential=Ce(C,W,this.authState.pipe(Pe(A=>!A))).pipe(D(A=>A?.user?A:null),B(s.outsideAngular),M(s.insideAngular))}return Ge(this,j,o,{spy:{apply:(C,Z,re)=>{(C.startsWith("signIn")||C.startsWith("createUser"))&&re.then(A=>W.next(A))}}})}static \u0275fac=function(e){return new(e||r)(h(ee),h(te,8),h(L),h($),h(ze),h(Yt,8),h(Qt,8),h(en,8),h(tn,8),h(nn,8),h(rn,8),h(V,8))};static \u0275prov=E({token:r,factory:r.\u0275fac,providedIn:"any"})}return r})(),gr=(()=>{class r{constructor(){I.registerVersion("angularfire",G.full,"auth-compat")}static \u0275fac=function(e){return new(e||r)};static \u0275mod=F({type:r});static \u0275inj=N({providers:[be]})}return r})();function m(r,i,t,e){return new Promise((n,o)=>{r||o("IndexedDB not available");let s=r.open(i,t),a;s.onsuccess=c=>{a=s.result,n(a)},s.onerror=c=>{o(`IndexedDB error: ${s.error}`)},typeof e=="function"&&(s.onupgradeneeded=c=>{e(c,a)})})}function at(r,i,t,e,n){if(!r)return;let o=r.open(i,t);o.onupgradeneeded=s=>{let a=s.target.result;e.forEach(l=>{if(!a.objectStoreNames.contains(l.store)){let d=a.createObjectStore(l.store,l.storeConfig);l.storeSchema.forEach(u=>{d.createIndex(u.name,u.keypath,u.options)})}});let c=n&&n();c&&Object.keys(c).map(l=>parseInt(l,10)).filter(l=>l>s.oldVersion).sort((l,d)=>l-d).forEach(l=>{c[l](a,o.transaction)}),a.close()},o.onsuccess=s=>{s.target.result.close()}}function an(r,i,t){if(!r||!i||!t)throw Error('Params: "dbName", "version", "storeName" are mandatory.');return new g(e=>{try{let n=i+1,o=indexedDB.open(r,n);o.onupgradeneeded=s=>{let a=s.target.result;a.deleteObjectStore(t),a.close(),console.log("onupgradeneeded"),e.next(!0),e.complete()},o.onerror=s=>e.error(s)}catch(n){e.error(n)}})}function cn(r,i){return r.objectStoreNames.contains(i)}function S(r,i,t){r||t("You need to use the openDatabase function to create a database before you query it!"),cn(r,i)||t(`objectStore does not exists: ${i}`)}function k(r,i){let t=r.transaction(i.storeName,i.dbMode);return t.onerror=i.error,t.onabort=i.abort,t}function v(r,i,t,e){return{storeName:i,dbMode:r,error:n=>{t(n)},abort:n=>{t(n)}}}var w=function(r){return r.readonly="readonly",r.readwrite="readwrite",r}(w||{}),ct=new y(null),Ee=(()=>{class r{constructor(t,e){if(this.dbConfig=t,this.platformId=e,!t.name)throw new Error("NgxIndexedDB: Please, provide the dbName in the configuration");if(!t.version)throw new Error("NgxIndexedDB: Please, provide the db version in the configuration");this.isBrowser=Oe(this.platformId),this.isBrowser&&(this.indexedDB=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB,at(this.indexedDB,t.name,t.version,t.objectStoresMeta,t.migrationFactory),m(this.indexedDB,t.name).then(n=>{n.version!==t.version&&(this.dbConfig.version=n.version)}))}createObjectStore(t,e){let n=[t];at(this.indexedDB,this.dbConfig.name,++this.dbConfig.version,n,e)}add(t,e,n){return new g(o=>{m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(s=>{let c=k(s,v(w.readwrite,t,d=>o.error(d))).objectStore(t),l=n?c.add(e,n):c.add(e);l.onsuccess=d=>b(this,null,function*(){let u=d.target.result,p=c.get(u);p.onsuccess=f=>{o.next(f.target.result),o.complete()}})}).catch(s=>o.error(s))})}bulkAdd(t,e){let n=new Promise((o,s)=>{m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(a=>{let l=k(a,v(w.readwrite,t,o,s)).objectStore(t),d=e.map(u=>new Promise((p,f)=>{let W=u.key;delete u.key;let j=W?l.add(u,W):l.add(u);j.onsuccess=C=>{let Z=C.target.result;p(Z)}}));o(Promise.all(d))}).catch(a=>s(a))});return x(n)}bulkDelete(t,e){let n=e.map(o=>new Promise((s,a)=>{m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(c=>{let l=k(c,v(w.readwrite,t,a,s));l.objectStore(t).delete(o),l.oncomplete=()=>{this.getAll(t).pipe(oe(1)).subscribe(u=>{s(u)})}}).catch(c=>a(c))}));return x(Promise.all(n))}getByKey(t,e){return new g(n=>{m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(o=>{let c=k(o,v(w.readonly,t,n.error)).objectStore(t).get(e);c.onsuccess=l=>{n.next(l.target.result),n.complete()},c.onerror=l=>{n.error(l)}}).catch(o=>n.error(o))})}bulkGet(t,e){let n=e.map(o=>this.getByKey(t,o));return new g(o=>{Te(n).subscribe(s=>{o.next(s),o.complete()})})}getByID(t,e){return new g(n=>{m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(o=>{S(o,t,l=>n.error(l));let c=k(o,v(w.readonly,t,n.error,n.next)).objectStore(t).get(e);c.onsuccess=l=>{n.next(l.target.result)}}).catch(o=>n.error(o))})}getByIndex(t,e,n){return new g(o=>{m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(s=>{S(s,t,u=>o.error(u));let d=k(s,v(w.readonly,t,o.error)).objectStore(t).index(e).get(n);d.onsuccess=u=>{o.next(u.target.result),o.complete()}}).catch(s=>o.error(s))})}getAll(t){return new g(e=>{m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(n=>{S(n,t,c=>e.error(c));let a=k(n,v(w.readonly,t,e.error,e.next)).objectStore(t).getAll();a.onerror=c=>{e.error(c)},a.onsuccess=({target:{result:c}})=>{e.next(c),e.complete()}}).catch(n=>e.error(n))})}update(t,e){return new g(n=>{m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(o=>{S(o,t,l=>n.error(l));let a=k(o,v(w.readwrite,t,l=>n.error(l))).objectStore(t),c=a.put(e);c.onsuccess=l=>b(this,null,function*(){let d=l.target.result,u=a.get(d);u.onsuccess=p=>{n.next(p.target.result),n.complete()}})}).catch(o=>n.error(o))})}delete(t,e){return new g(n=>{m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(o=>{S(o,t,c=>n.error(c));let s=k(o,v(w.readwrite,t,c=>n.error(c)));s.objectStore(t).delete(e),s.oncomplete=()=>{this.getAll(t).pipe(oe(1)).subscribe(c=>{n.next(c),n.complete()})}}).catch(o=>n.error(o))})}deleteByKey(t,e){return new g(n=>{m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(o=>{S(o,t,c=>n.error(c));let s=k(o,v(w.readwrite,t,c=>n.error(c))),a=s.objectStore(t);s.oncomplete=()=>{n.next(!0),n.complete()},a.delete(e)}).catch(o=>n.error(o))})}clear(t){return new g(e=>{m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(n=>{S(n,t,a=>e.error(a));let o=k(n,v(w.readwrite,t,a=>e.error(a)));o.objectStore(t).clear(),o.oncomplete=()=>{e.next(!0),e.complete()}}).catch(n=>e.error(n))})}deleteDatabase(){return new g(t=>{m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(e=>b(this,null,function*(){yield e.close();let n=this.indexedDB.deleteDatabase(this.dbConfig.name);n.onsuccess=()=>{t.next(!0),t.complete()},n.onerror=o=>t.error(o),n.onblocked=()=>{throw new Error("Unable to delete database because it's blocked")}})).catch(e=>t.error(e))})}openCursor(t,e){return new g(n=>{m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(o=>{S(o,t,l=>n.error(l));let a=k(o,v(w.readonly,t,n.error)).objectStore(t),c=e===void 0?a.openCursor():a.openCursor(e);c.onsuccess=l=>{n.next(l),n.complete()}}).catch(o=>n.error(o))})}openCursorByIndex(t,e,n,o=w.readonly){let s=new X;return m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(a=>{S(a,t,p=>{s.error(p)});let u=k(a,v(o,t,p=>{s.error(p)},()=>{s.next()})).objectStore(t).index(e).openCursor(n);u.onsuccess=p=>{s.next(p)}}).catch(a=>s.error(a)),s}getAllByIndex(t,e,n){let o=[];return new g(s=>{m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(a=>{S(a,t,p=>s.error(p));let u=k(a,v(w.readonly,t,s.error)).objectStore(t).index(e).openCursor(n);u.onsuccess=p=>{let f=p.target.result;f?(o.push(f.value),f.continue()):(s.next(o),s.complete())}}).catch(a=>s.error(a))})}getAllKeysByIndex(t,e,n){let o=[];return new g(s=>{m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(a=>{S(a,t,p=>s.error(p));let u=k(a,v(w.readonly,t,s.error)).objectStore(t).index(e).openKeyCursor(n);u.onsuccess=p=>{let f=p.target.result;f?(o.push({primaryKey:f.primaryKey,key:f.key}),f.continue()):(s.next(o),s.complete())}}).catch(a=>s.error(a))})}count(t,e){return new g(n=>{m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(o=>{S(o,t,l=>n.error(l));let c=k(o,v(w.readonly,t,n.error)).objectStore(t).count(e);c.onerror=l=>n.error(l),c.onsuccess=l=>{n.next(l.target.result),n.complete()}}).catch(o=>n.error(o))})}countByIndex(t,e,n){return new g(o=>{m(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(s=>{S(s,t,u=>o.error(u));let d=k(s,v(w.readonly,t,o.error)).objectStore(t).index(e).count(n);d.onerror=u=>o.error(u),d.onsuccess=u=>{o.next(u.target.result),o.complete()}}).catch(s=>o.error(s))})}deleteObjectStore(t){return an(this.dbConfig.name,++this.dbConfig.version,t)}}return r.\u0275fac=function(t){return new(t||r)(h(ct),h(L))},r.\u0275prov=E({token:r,factory:r.\u0275fac}),r})(),Er=(()=>{class r{static forRoot(t){return{ngModule:r,providers:[Ee,{provide:ct,useValue:t}]}}}return r.\u0275fac=function(t){return new(t||r)},r.\u0275mod=F({type:r}),r.\u0275inj=N({imports:[[je]]}),r})();var lt=(()=>{let i=class i{constructor(e){this.db=e,this.DATABASE="Categories"}saveCategoriesByChannelType(e,n){let o=this.getKey(n);return this.db.add(this.DATABASE,e,o).pipe(D(s=>e))}getCategoriesByChannelType(e){let n=this.getKey(e);return this.db.getByKey(this.DATABASE,n)}getKey(e){let n="";switch(e){case ce.Lazada:n="Lazada";break;case ce.Tokopedia:n="Tokopedia";break}return n}clearDatabase(){this.db.clear(this.DATABASE)}getHostName(){let e=localStorage.getItem("Authorization");return this.hostName=JSON.parse(e)?.Host,this.hostName}};i.\u0275fac=function(n){return new(n||i)(h(Ee))},i.\u0275prov=E({token:i,factory:i.\u0275fac,providedIn:"root"});let r=i;return r})();var ut=(()=>{let i=class i{constructor(){}inititalizeIntercom(){let e=this.getFromLocalStorage();e?.Enabled&&window.Intercom("boot",{app_id:"xv1oomgl",name:e.Name,email:e.Email,created_at:e.Created,user_hash:e.Hash})}shutdown(){this.getFromLocalStorage()?.Enabled&&(window.Intercom("shutdown"),this.clearStorage())}clearStorage(){localStorage.removeItem("Intercom")}updateLocalStorage(e){e&&(e.Enabled=!0),localStorage.setItem("Intercom",JSON.stringify(e))}getFromLocalStorage(){let e=localStorage.getItem("Intercom");return JSON.parse(e)}hideLauncher(){let e=this.getFromLocalStorage();e?.Enabled&&(window.Intercom("update",{app_id:"xv1oomgl",hide_default_launcher:!0}),e.hide_default_launcher=!0,this.updateLocalStorage(e))}showLauncher(){let e=this.getFromLocalStorage();e?.Enabled&&(window.Intercom("update",{app_id:"xv1oomgl",hide_default_launcher:!1}),e.hide_default_launcher=!1,this.updateLocalStorage(e))}isHideLauncher(){let e=this.getFromLocalStorage();return z.IsEmpty(e?.hide_default_launcher)?!1:e?.hide_default_launcher}};i.\u0275fac=function(n){return new(n||i)},i.\u0275prov=E({token:i,factory:i.\u0275fac,providedIn:"root"});let r=i;return r})();var Ai=(()=>{let i=class i{constructor(e,n,o,s,a,c,l){this.httpService=e,this.tokenDecodeService=n,this.afAuth=o,this.ngxPermission=s,this.localDataService=a,this.router=c,this.intercomService=l,this.channels=[]}login(e){return this.httpService.post("/api/token/Login",e).pipe(U(n=>{this.setLocalStorage(n,e.Host,e.Username),this.loadPermissions()}))}loginWithGoogle(e,n){e.preventDefault();let o=new he;return o.setCustomParameters({prompt:"select_account"}),x(this.afAuth.signInWithPopup(o)).pipe(D(s=>s.credential),D(s=>s.idToken),_(s=>this.httpService.post("/api/token/LoginWithSocialProvider",JSON.stringify({IDToken:s,Host:n}))),U(s=>{this.setLocalStorage(s,n,null),this.loadPermissions()}))}setLocalStorage(e,n,o){localStorage.setItem("user",JSON.stringify(e)),localStorage.setItem("Authorization",JSON.stringify({Host:n,username:o})),localStorage.setItem("channels",JSON.stringify(e.Channels)),this.intercomService.updateLocalStorage(e.IntercomWidget),this.intercomService.inititalizeIntercom()}loadPermissions(){this.ngxPermission.loadPermissions([]);let e=localStorage.getItem("user");if(z.IsNotEmpty(e)){let n=this.tokenDecodeService.GetRoles();this.ngxPermission.loadPermissions(n)}}getChannels(){let e=JSON.parse(JSON.stringify(this.channels));if(this.channels.length===0){let n=localStorage.getItem("channels");n?(this.channels=JSON.parse(n),e=JSON.parse(JSON.stringify(this.channels))):(this.channels=[],e=[])}return e=this.setChannelLogo(e),e}setChannelLogo(e){return e=e.map(n=>(n.logo=z.getChannelLogoByTypeId(n.TypeID),n)),e}logout(){this.clearLocalStorage(),this.ngxPermission.flushPermissions()}isActiveToken(){let e=JSON.parse(window.localStorage.getItem("user")),n=new Date;if(e!=null){let o=new Date(e.Token.expiredAt);return n<o?!0:(this.clearLocalStorage(),!1)}else return!1}getDomain(){if(!this.domain){let e=localStorage.getItem("Authorization");this.domain="https://"+JSON.parse(e).Host}return this.domain}clearLocalStorage(){this.domain=null,this.channels=[],localStorage.removeItem("channels"),localStorage.removeItem("user"),this.intercomService.shutdown(),this.localDataService.clearDatabase(),this.router.navigate([""])}};i.\u0275fac=function(n){return new(n||i)(h(Be),h(Ne),h(be),h(Ue),h(lt),h(Fe),h(ut))},i.\u0275prov=E({token:i,factory:i.\u0275fac,providedIn:"root"});let r=i;return r})();export{Pn as a,gr as b,Er as c,lt as d,Ai as e};