dealposbarcode 1.7.8 → 1.7.9
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.
- package/{chunk-XF6NYFHE.js → chunk-BT6OUK6X.js} +3 -3
- package/{chunk-BY34KE7H.js → chunk-JICIBBA5.js} +1 -1
- package/{chunk-Q5B7O5PE.js → chunk-PY67MF7G.js} +1 -1
- package/{chunk-GDT24CSJ.js → chunk-R6SFZQFG.js} +1 -1
- package/{chunk-TS4GG226.js → chunk-V3TCV22E.js} +1 -1
- package/index.html +3 -3
- package/{main-5ZSC2QTH.js → main-YQPER324.js} +2 -2
- package/ngsw.json +16 -16
- package/package.json +1 -1
- package/{styles-J3VAN6Z4.css → styles-MX6P4AZ2.css} +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{A as Wp,B as Ms,C as $p,D as qp,E as El,F as Gp,G as Xp,a as Cp,b as Ds,d as Is,e as Mr,f as _l,g as Ap,h as Bp,i as Ii,j as Np,k as Ar,l as wl,m as xl,n as We,o as zp,p as Os,q as ke,r as Fs,s as Lp,t as Hp,u as Sl,v as Rs,w as jp,x as Pl,y as Vp,z as Up}from"./chunk-GDT24CSJ.js";import{a as As,b as _i,c as oi}from"./chunk-BY34KE7H.js";import{B as nt,C as Dt,D as ys,E as vs,F as bs,G as Yi,H as ht,I as rt,J as $n,K as _s,L as ws,M as xs,N as Cs,O as Ss,P as Ps,R as Pp,S as Ep,T as Dp,U as kp,V as Tp,W as Es,X as Ip,Z as Op,_ as Ts,a as vi,b as wp,ba as bi,d as xp,ga as Cl,l as ms,n as Un,q as vl,r as Je,s as pt,t as Sp,u as Wn,v as tt,w as lt,y as it,z as gs}from"./chunk-Q5B7O5PE.js";import{$b as ls,Aa as Ir,Ac as Ae,Ad as Fp,Bb as Or,Bd as ks,C as Le,Ca as pe,Cd as Rp,D as sp,Da as z,Db as hp,Ec as Ue,Ed as Rr,Fb as ns,Fc as ni,Fd as Mp,Gb as rs,Gc as Ti,H as mi,Ha as fe,Hc as gl,Hd as bl,I as Kt,Ia as Nt,Ic as me,J as es,Ja as ln,Jb as q,Ka as ts,Kb as pl,Mb as Fr,N as ap,O as rl,Oa as up,P as sn,Pb as le,Pc as mp,Qb as fp,Ra as gi,Rb as os,S as an,Sa as se,Sb as Lt,Sc as cn,Ta as ae,Tb as P,U as Qt,Uc as Gi,Vb as jn,Wa as Xe,Wb as ss,Xa as Ye,Xc as gp,Y as ol,Yc as yl,Z as Tr,Za as zt,Zb as Ce,_a as Pt,_b as as,a as v,aa as lp,ab as ul,ac as Zt,b as D,bb as Et,bc as Jt,c as Ln,ca as sl,cc as f,cd as mt,d as j,dc as m,e as De,ea as cp,ec as ue,fa as al,fc as hl,g as B,gc as fl,h as Hn,hb as pp,hd as hs,i as Qo,ic as Ie,j as Zo,jd as Xi,k as Jo,l as $i,lc as W,ld as Vn,mc as O,md as yp,n as St,nc as cs,oa as ll,oc as ds,od as vp,pd as bp,q as et,qa as cl,qc as us,qd as fs,ra as qi,rc as yi,rd as _p,sa as dl,sc as ei,sd as ri,ta as xe,tc as ti,ub as is,uc as ml,vc as x,wa as dp,wc as I,xa as Ve,xc as ii,ya as Bt,yb as y,yc as ps,zb as He,zc as _e}from"./chunk-UZEILQYY.js";var Ht=j(Dl=>{"use strict";Object.defineProperty(Dl,"__esModule",{value:!0});function Ly(i,e){if(!(i instanceof e))throw new TypeError("Cannot call a class as a function")}var Hy=function i(e,t){Ly(this,i),this.data=e,this.text=t.text||e,this.options=t};Dl.default=Hy});var Qp=j(Bs=>{"use strict";Object.defineProperty(Bs,"__esModule",{value:!0});Bs.CODE39=void 0;var jy=function(){function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),e}}(),Vy=Ht(),Uy=Wy(Vy);function Wy(i){return i&&i.__esModule?i:{default:i}}function $y(i,e){if(!(i instanceof e))throw new TypeError("Cannot call a class as a function")}function qy(i,e){if(!i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:i}function Gy(i,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);i.prototype=Object.create(e&&e.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(i,e):i.__proto__=e)}var Xy=function(i){Gy(e,i);function e(t,n){return $y(this,e),t=t.toUpperCase(),n.mod43&&(t+=Qy(Zy(t))),qy(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n))}return jy(e,[{key:"encode",value:function(){for(var n=kl("*"),r=0;r<this.data.length;r++)n+=kl(this.data[r])+"0";return n+=kl("*"),{data:n,text:this.text}}},{key:"valid",value:function(){return this.data.search(/^[0-9A-Z\-\.\ \$\/\+\%]+$/)!==-1}}]),e}(Uy.default),Yp=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","-","."," ","$","/","+","%","*"],Yy=[20957,29783,23639,30485,20951,29813,23669,20855,29789,23645,29975,23831,30533,22295,30149,24005,21623,29981,23837,22301,30023,23879,30545,22343,30161,24017,21959,30065,23921,22385,29015,18263,29141,17879,29045,18293,17783,29021,18269,17477,17489,17681,20753,35770];function kl(i){return Ky(Kp(i))}function Ky(i){return Yy[i].toString(2)}function Qy(i){return Yp[i]}function Kp(i){return Yp.indexOf(i)}function Zy(i){for(var e=0,t=0;t<i.length;t++)e+=Kp(i[t]);return e=e%43,e}Bs.CODE39=Xy});var qn=j($e=>{"use strict";Object.defineProperty($e,"__esModule",{value:!0});var Br;function Tl(i,e,t){return e in i?Object.defineProperty(i,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):i[e]=t,i}var Zp=$e.SET_A=0,Jp=$e.SET_B=1,eh=$e.SET_C=2,Ck=$e.SHIFT=98,Jy=$e.START_A=103,ev=$e.START_B=104,tv=$e.START_C=105,Sk=$e.MODULO=103,Pk=$e.STOP=106,Ek=$e.FNC1=207,Dk=$e.SET_BY_CODE=(Br={},Tl(Br,Jy,Zp),Tl(Br,ev,Jp),Tl(Br,tv,eh),Br),kk=$e.SWAP={101:Zp,100:Jp,99:eh},Tk=$e.A_START_CHAR="\xD0",Ik=$e.B_START_CHAR="\xD1",Ok=$e.C_START_CHAR="\xD2",Fk=$e.A_CHARS="[\0-_\xC8-\xCF]",Rk=$e.B_CHARS="[ -\x7F\xC8-\xCF]",Mk=$e.C_CHARS="(\xCF*[0-9]{2}\xCF*)",Ak=$e.BARS=[11011001100,11001101100,11001100110,10010011e3,10010001100,10001001100,10011001e3,10011000100,10001100100,11001001e3,11001000100,11000100100,10110011100,10011011100,10011001110,10111001100,10011101100,10011100110,11001110010,11001011100,11001001110,11011100100,11001110100,11101101110,11101001100,11100101100,11100100110,11101100100,11100110100,11100110010,11011011e3,11011000110,11000110110,10100011e3,10001011e3,10001000110,10110001e3,10001101e3,10001100010,11010001e3,11000101e3,11000100010,10110111e3,10110001110,10001101110,10111011e3,10111000110,10001110110,11101110110,11010001110,11000101110,11011101e3,11011100010,11011101110,11101011e3,11101000110,11100010110,11101101e3,11101100010,11100011010,11101111010,11001000010,11110001010,1010011e4,10100001100,1001011e4,10010000110,10000101100,10000100110,1011001e4,10110000100,1001101e4,10011000010,10000110100,10000110010,11000010010,1100101e4,11110111010,11000010100,10001111010,10100111100,10010111100,10010011110,10111100100,10011110100,10011110010,11110100100,11110010100,11110010010,11011011110,11011110110,11110110110,10101111e3,10100011110,10001011110,10111101e3,10111100010,11110101e3,11110100010,10111011110,10111101110,11101011110,11110101110,11010000100,1101001e4,11010011100,1100011101011]});var Nr=j(Il=>{"use strict";Object.defineProperty(Il,"__esModule",{value:!0});var iv=function(){function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),e}}(),nv=Ht(),rv=ov(nv),jt=qn();function ov(i){return i&&i.__esModule?i:{default:i}}function sv(i,e){if(!(i instanceof e))throw new TypeError("Cannot call a class as a function")}function av(i,e){if(!i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:i}function lv(i,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);i.prototype=Object.create(e&&e.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(i,e):i.__proto__=e)}var cv=function(i){lv(e,i);function e(t,n){sv(this,e);var r=av(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t.substring(1),n));return r.bytes=t.split("").map(function(o){return o.charCodeAt(0)}),r}return iv(e,[{key:"valid",value:function(){return/^[\x00-\x7F\xC8-\xD3]+$/.test(this.data)}},{key:"encode",value:function(){var n=this.bytes,r=n.shift()-105,o=jt.SET_BY_CODE[r];if(o===void 0)throw new RangeError("The encoding does not start with a start character.");this.shouldEncodeAsEan128()===!0&&n.unshift(jt.FNC1);var s=e.next(n,1,o);return{text:this.text===this.data?this.text.replace(/[^\x20-\x7E]/g,""):this.text,data:e.getBar(r)+s.result+e.getBar((s.checksum+r)%jt.MODULO)+e.getBar(jt.STOP)}}},{key:"shouldEncodeAsEan128",value:function(){var n=this.options.ean128||!1;return typeof n=="string"&&(n=n.toLowerCase()==="true"),n}}],[{key:"getBar",value:function(n){return jt.BARS[n]?jt.BARS[n].toString():""}},{key:"correctIndex",value:function(n,r){if(r===jt.SET_A){var o=n.shift();return o<32?o+64:o-32}else return r===jt.SET_B?n.shift()-32:(n.shift()-48)*10+n.shift()-48}},{key:"next",value:function(n,r,o){if(!n.length)return{result:"",checksum:0};var s=void 0,a=void 0;if(n[0]>=200){a=n.shift()-105;var l=jt.SWAP[a];l!==void 0?s=e.next(n,r+1,l):((o===jt.SET_A||o===jt.SET_B)&&a===jt.SHIFT&&(n[0]=o===jt.SET_A?n[0]>95?n[0]-96:n[0]:n[0]<32?n[0]+96:n[0]),s=e.next(n,r+1,o))}else a=e.correctIndex(n,o),s=e.next(n,r+1,o);var c=e.getBar(a),d=a*r;return{result:c+s.result,checksum:d+s.checksum}}}]),e}(rv.default);Il.default=cv});var oh=j(Fl=>{"use strict";Object.defineProperty(Fl,"__esModule",{value:!0});var Ki=qn(),th=function(e){return e.match(new RegExp("^"+Ki.A_CHARS+"*"))[0].length},ih=function(e){return e.match(new RegExp("^"+Ki.B_CHARS+"*"))[0].length},nh=function(e){return e.match(new RegExp("^"+Ki.C_CHARS+"*"))[0]};function Ol(i,e){var t=e?Ki.A_CHARS:Ki.B_CHARS,n=i.match(new RegExp("^("+t+"+?)(([0-9]{2}){2,})([^0-9]|$)"));if(n)return n[1]+"\xCC"+rh(i.substring(n[1].length));var r=i.match(new RegExp("^"+t+"+"))[0];return r.length===i.length?i:r+String.fromCharCode(e?205:206)+Ol(i.substring(r.length),!e)}function rh(i){var e=nh(i),t=e.length;if(t===i.length)return i;i=i.substring(t);var n=th(i)>=ih(i);return e+String.fromCharCode(n?206:205)+Ol(i,n)}Fl.default=function(i){var e=void 0,t=nh(i).length;if(t>=2)e=Ki.C_START_CHAR+rh(i);else{var n=th(i)>ih(i);e=(n?Ki.A_START_CHAR:Ki.B_START_CHAR)+Ol(i,n)}return e.replace(/[\xCD\xCE]([^])[\xCD\xCE]/,function(r,o){return"\xCB"+o})}});var ah=j(Ml=>{"use strict";Object.defineProperty(Ml,"__esModule",{value:!0});var dv=Nr(),uv=sh(dv),pv=oh(),hv=sh(pv);function sh(i){return i&&i.__esModule?i:{default:i}}function fv(i,e){if(!(i instanceof e))throw new TypeError("Cannot call a class as a function")}function Rl(i,e){if(!i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:i}function mv(i,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);i.prototype=Object.create(e&&e.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(i,e):i.__proto__=e)}var gv=function(i){mv(e,i);function e(t,n){if(fv(this,e),/^[\x00-\x7F\xC8-\xD3]+$/.test(t))var r=Rl(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,(0,hv.default)(t),n));else var r=Rl(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return Rl(r)}return e}(uv.default);Ml.default=gv});var ch=j(Al=>{"use strict";Object.defineProperty(Al,"__esModule",{value:!0});var yv=function(){function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),e}}(),vv=Nr(),bv=_v(vv),lh=qn();function _v(i){return i&&i.__esModule?i:{default:i}}function wv(i,e){if(!(i instanceof e))throw new TypeError("Cannot call a class as a function")}function xv(i,e){if(!i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:i}function Cv(i,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);i.prototype=Object.create(e&&e.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(i,e):i.__proto__=e)}var Sv=function(i){Cv(e,i);function e(t,n){return wv(this,e),xv(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,lh.A_START_CHAR+t,n))}return yv(e,[{key:"valid",value:function(){return new RegExp("^"+lh.A_CHARS+"+$").test(this.data)}}]),e}(bv.default);Al.default=Sv});var uh=j(Bl=>{"use strict";Object.defineProperty(Bl,"__esModule",{value:!0});var Pv=function(){function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),e}}(),Ev=Nr(),Dv=kv(Ev),dh=qn();function kv(i){return i&&i.__esModule?i:{default:i}}function Tv(i,e){if(!(i instanceof e))throw new TypeError("Cannot call a class as a function")}function Iv(i,e){if(!i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:i}function Ov(i,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);i.prototype=Object.create(e&&e.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(i,e):i.__proto__=e)}var Fv=function(i){Ov(e,i);function e(t,n){return Tv(this,e),Iv(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,dh.B_START_CHAR+t,n))}return Pv(e,[{key:"valid",value:function(){return new RegExp("^"+dh.B_CHARS+"+$").test(this.data)}}]),e}(Dv.default);Bl.default=Fv});var hh=j(Nl=>{"use strict";Object.defineProperty(Nl,"__esModule",{value:!0});var Rv=function(){function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),e}}(),Mv=Nr(),Av=Bv(Mv),ph=qn();function Bv(i){return i&&i.__esModule?i:{default:i}}function Nv(i,e){if(!(i instanceof e))throw new TypeError("Cannot call a class as a function")}function zv(i,e){if(!i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:i}function Lv(i,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);i.prototype=Object.create(e&&e.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(i,e):i.__proto__=e)}var Hv=function(i){Lv(e,i);function e(t,n){return Nv(this,e),zv(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,ph.C_START_CHAR+t,n))}return Rv(e,[{key:"valid",value:function(){return new RegExp("^"+ph.C_CHARS+"+$").test(this.data)}}]),e}(Av.default);Nl.default=Hv});var fh=j(wi=>{"use strict";Object.defineProperty(wi,"__esModule",{value:!0});wi.CODE128C=wi.CODE128B=wi.CODE128A=wi.CODE128=void 0;var jv=ah(),Vv=Ns(jv),Uv=ch(),Wv=Ns(Uv),$v=uh(),qv=Ns($v),Gv=hh(),Xv=Ns(Gv);function Ns(i){return i&&i.__esModule?i:{default:i}}wi.CODE128=Vv.default;wi.CODE128A=Wv.default;wi.CODE128B=qv.default;wi.CODE128C=Xv.default});var Gn=j(Qi=>{"use strict";Object.defineProperty(Qi,"__esModule",{value:!0});var Wk=Qi.SIDE_BIN="101",$k=Qi.MIDDLE_BIN="01010",qk=Qi.BINARIES={L:["0001101","0011001","0010011","0111101","0100011","0110001","0101111","0111011","0110111","0001011"],G:["0100111","0110011","0011011","0100001","0011101","0111001","0000101","0010001","0001001","0010111"],R:["1110010","1100110","1101100","1000010","1011100","1001110","1010000","1000100","1001000","1110100"],O:["0001101","0011001","0010011","0111101","0100011","0110001","0101111","0111011","0110111","0001011"],E:["0100111","0110011","0011011","0100001","0011101","0111001","0000101","0010001","0001001","0010111"]},Gk=Qi.EAN2_STRUCTURE=["LL","LG","GL","GG"],Xk=Qi.EAN5_STRUCTURE=["GGLLL","GLGLL","GLLGL","GLLLG","LGGLL","LLGGL","LLLGG","LGLGL","LGLLG","LLGLG"],Yk=Qi.EAN13_STRUCTURE=["LLLLLL","LLGLGG","LLGGLG","LLGGGL","LGLLGG","LGGLLG","LGGGLL","LGLGLG","LGLGGL","LGGLGL"]});var Xn=j(zl=>{"use strict";Object.defineProperty(zl,"__esModule",{value:!0});var Yv=Gn(),Kv=function(e,t,n){var r=e.split("").map(function(s,a){return Yv.BINARIES[t[a]]}).map(function(s,a){return s?s[e[a]]:""});if(n){var o=e.length-1;r=r.map(function(s,a){return a<o?s+n:s})}return r.join("")};zl.default=Kv});var Hl=j(Ll=>{"use strict";Object.defineProperty(Ll,"__esModule",{value:!0});var Qv=function(){function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),e}}(),Yn=Gn(),Zv=Xn(),mh=gh(Zv),Jv=Ht(),eb=gh(Jv);function gh(i){return i&&i.__esModule?i:{default:i}}function tb(i,e){if(!(i instanceof e))throw new TypeError("Cannot call a class as a function")}function ib(i,e){if(!i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:i}function nb(i,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);i.prototype=Object.create(e&&e.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(i,e):i.__proto__=e)}var rb=function(i){nb(e,i);function e(t,n){tb(this,e);var r=ib(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return r.fontSize=!n.flat&&n.fontSize>n.width*10?n.width*10:n.fontSize,r.guardHeight=n.height+r.fontSize/2+n.textMargin,r}return Qv(e,[{key:"encode",value:function(){return this.options.flat?this.encodeFlat():this.encodeGuarded()}},{key:"leftText",value:function(n,r){return this.text.substr(n,r)}},{key:"leftEncode",value:function(n,r){return(0,mh.default)(n,r)}},{key:"rightText",value:function(n,r){return this.text.substr(n,r)}},{key:"rightEncode",value:function(n,r){return(0,mh.default)(n,r)}},{key:"encodeGuarded",value:function(){var n={fontSize:this.fontSize},r={height:this.guardHeight};return[{data:Yn.SIDE_BIN,options:r},{data:this.leftEncode(),text:this.leftText(),options:n},{data:Yn.MIDDLE_BIN,options:r},{data:this.rightEncode(),text:this.rightText(),options:n},{data:Yn.SIDE_BIN,options:r}]}},{key:"encodeFlat",value:function(){var n=[Yn.SIDE_BIN,this.leftEncode(),Yn.MIDDLE_BIN,this.rightEncode(),Yn.SIDE_BIN];return{data:n.join(""),text:this.text}}}]),e}(eb.default);Ll.default=rb});var vh=j(jl=>{"use strict";Object.defineProperty(jl,"__esModule",{value:!0});var ob=function(){function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),e}}(),zr=function i(e,t,n){e===null&&(e=Function.prototype);var r=Object.getOwnPropertyDescriptor(e,t);if(r===void 0){var o=Object.getPrototypeOf(e);return o===null?void 0:i(o,t,n)}else{if("value"in r)return r.value;var s=r.get;return s===void 0?void 0:s.call(n)}},sb=Gn(),ab=Hl(),lb=cb(ab);function cb(i){return i&&i.__esModule?i:{default:i}}function db(i,e){if(!(i instanceof e))throw new TypeError("Cannot call a class as a function")}function ub(i,e){if(!i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:i}function pb(i,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);i.prototype=Object.create(e&&e.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(i,e):i.__proto__=e)}var yh=function(e){var t=e.substr(0,12).split("").map(function(n){return+n}).reduce(function(n,r,o){return o%2?n+r*3:n+r},0);return(10-t%10)%10},hb=function(i){pb(e,i);function e(t,n){db(this,e),t.search(/^[0-9]{12}$/)!==-1&&(t+=yh(t));var r=ub(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return r.lastChar=n.lastChar,r}return ob(e,[{key:"valid",value:function(){return this.data.search(/^[0-9]{13}$/)!==-1&&+this.data[12]===yh(this.data)}},{key:"leftText",value:function(){return zr(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"leftText",this).call(this,1,6)}},{key:"leftEncode",value:function(){var n=this.data.substr(1,6),r=sb.EAN13_STRUCTURE[this.data[0]];return zr(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"leftEncode",this).call(this,n,r)}},{key:"rightText",value:function(){return zr(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"rightText",this).call(this,7,6)}},{key:"rightEncode",value:function(){var n=this.data.substr(7,6);return zr(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"rightEncode",this).call(this,n,"RRRRRR")}},{key:"encodeGuarded",value:function(){var n=zr(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"encodeGuarded",this).call(this);return this.options.displayValue&&(n.unshift({data:"000000000000",text:this.text.substr(0,1),options:{textAlign:"left",fontSize:this.fontSize}}),this.options.lastChar&&(n.push({data:"00"}),n.push({data:"00000",text:this.options.lastChar,options:{fontSize:this.fontSize}}))),n}}]),e}(lb.default);jl.default=hb});var _h=j(Vl=>{"use strict";Object.defineProperty(Vl,"__esModule",{value:!0});var fb=function(){function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),e}}(),zs=function i(e,t,n){e===null&&(e=Function.prototype);var r=Object.getOwnPropertyDescriptor(e,t);if(r===void 0){var o=Object.getPrototypeOf(e);return o===null?void 0:i(o,t,n)}else{if("value"in r)return r.value;var s=r.get;return s===void 0?void 0:s.call(n)}},mb=Hl(),gb=yb(mb);function yb(i){return i&&i.__esModule?i:{default:i}}function vb(i,e){if(!(i instanceof e))throw new TypeError("Cannot call a class as a function")}function bb(i,e){if(!i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:i}function _b(i,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);i.prototype=Object.create(e&&e.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(i,e):i.__proto__=e)}var bh=function(e){var t=e.substr(0,7).split("").map(function(n){return+n}).reduce(function(n,r,o){return o%2?n+r:n+r*3},0);return(10-t%10)%10},wb=function(i){_b(e,i);function e(t,n){return vb(this,e),t.search(/^[0-9]{7}$/)!==-1&&(t+=bh(t)),bb(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n))}return fb(e,[{key:"valid",value:function(){return this.data.search(/^[0-9]{8}$/)!==-1&&+this.data[7]===bh(this.data)}},{key:"leftText",value:function(){return zs(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"leftText",this).call(this,0,4)}},{key:"leftEncode",value:function(){var n=this.data.substr(0,4);return zs(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"leftEncode",this).call(this,n,"LLLL")}},{key:"rightText",value:function(){return zs(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"rightText",this).call(this,4,4)}},{key:"rightEncode",value:function(){var n=this.data.substr(4,4);return zs(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"rightEncode",this).call(this,n,"RRRR")}}]),e}(gb.default);Vl.default=wb});var xh=j(Ul=>{"use strict";Object.defineProperty(Ul,"__esModule",{value:!0});var xb=function(){function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),e}}(),Cb=Gn(),Sb=Xn(),Pb=wh(Sb),Eb=Ht(),Db=wh(Eb);function wh(i){return i&&i.__esModule?i:{default:i}}function kb(i,e){if(!(i instanceof e))throw new TypeError("Cannot call a class as a function")}function Tb(i,e){if(!i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:i}function Ib(i,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);i.prototype=Object.create(e&&e.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(i,e):i.__proto__=e)}var Ob=function(e){var t=e.split("").map(function(n){return+n}).reduce(function(n,r,o){return o%2?n+r*9:n+r*3},0);return t%10},Fb=function(i){Ib(e,i);function e(t,n){return kb(this,e),Tb(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n))}return xb(e,[{key:"valid",value:function(){return this.data.search(/^[0-9]{5}$/)!==-1}},{key:"encode",value:function(){var n=Cb.EAN5_STRUCTURE[Ob(this.data)];return{data:"1011"+(0,Pb.default)(this.data,n,"01"),text:this.text}}}]),e}(Db.default);Ul.default=Fb});var Sh=j(Wl=>{"use strict";Object.defineProperty(Wl,"__esModule",{value:!0});var Rb=function(){function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),e}}(),Mb=Gn(),Ab=Xn(),Bb=Ch(Ab),Nb=Ht(),zb=Ch(Nb);function Ch(i){return i&&i.__esModule?i:{default:i}}function Lb(i,e){if(!(i instanceof e))throw new TypeError("Cannot call a class as a function")}function Hb(i,e){if(!i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:i}function jb(i,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);i.prototype=Object.create(e&&e.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(i,e):i.__proto__=e)}var Vb=function(i){jb(e,i);function e(t,n){return Lb(this,e),Hb(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n))}return Rb(e,[{key:"valid",value:function(){return this.data.search(/^[0-9]{2}$/)!==-1}},{key:"encode",value:function(){var n=Mb.EAN2_STRUCTURE[parseInt(this.data)%4];return{data:"1011"+(0,Bb.default)(this.data,n,"01"),text:this.text}}}]),e}(zb.default);Wl.default=Vb});var ql=j(Ls=>{"use strict";Object.defineProperty(Ls,"__esModule",{value:!0});var Ub=function(){function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),e}}();Ls.checksum=$l;var Wb=Xn(),Kn=Ph(Wb),$b=Ht(),qb=Ph($b);function Ph(i){return i&&i.__esModule?i:{default:i}}function Gb(i,e){if(!(i instanceof e))throw new TypeError("Cannot call a class as a function")}function Xb(i,e){if(!i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:i}function Yb(i,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);i.prototype=Object.create(e&&e.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(i,e):i.__proto__=e)}var Kb=function(i){Yb(e,i);function e(t,n){Gb(this,e),t.search(/^[0-9]{11}$/)!==-1&&(t+=$l(t));var r=Xb(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return r.displayValue=n.displayValue,n.fontSize>n.width*10?r.fontSize=n.width*10:r.fontSize=n.fontSize,r.guardHeight=n.height+r.fontSize/2+n.textMargin,r}return Ub(e,[{key:"valid",value:function(){return this.data.search(/^[0-9]{12}$/)!==-1&&this.data[11]==$l(this.data)}},{key:"encode",value:function(){return this.options.flat?this.flatEncoding():this.guardedEncoding()}},{key:"flatEncoding",value:function(){var n="";return n+="101",n+=(0,Kn.default)(this.data.substr(0,6),"LLLLLL"),n+="01010",n+=(0,Kn.default)(this.data.substr(6,6),"RRRRRR"),n+="101",{data:n,text:this.text}}},{key:"guardedEncoding",value:function(){var n=[];return this.displayValue&&n.push({data:"00000000",text:this.text.substr(0,1),options:{textAlign:"left",fontSize:this.fontSize}}),n.push({data:"101"+(0,Kn.default)(this.data[0],"L"),options:{height:this.guardHeight}}),n.push({data:(0,Kn.default)(this.data.substr(1,5),"LLLLL"),text:this.text.substr(1,5),options:{fontSize:this.fontSize}}),n.push({data:"01010",options:{height:this.guardHeight}}),n.push({data:(0,Kn.default)(this.data.substr(6,5),"RRRRR"),text:this.text.substr(6,5),options:{fontSize:this.fontSize}}),n.push({data:(0,Kn.default)(this.data[11],"R")+"101",options:{height:this.guardHeight}}),this.displayValue&&n.push({data:"00000000",text:this.text.substr(11,1),options:{textAlign:"right",fontSize:this.fontSize}}),n}}]),e}(qb.default);function $l(i){var e=0,t;for(t=1;t<11;t+=2)e+=parseInt(i[t]);for(t=0;t<11;t+=2)e+=parseInt(i[t])*3;return(10-e%10)%10}Ls.default=Kb});var kh=j(Xl=>{"use strict";Object.defineProperty(Xl,"__esModule",{value:!0});var Qb=function(){function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),e}}(),Zb=Xn(),Jb=Dh(Zb),e1=Ht(),t1=Dh(e1),i1=ql();function Dh(i){return i&&i.__esModule?i:{default:i}}function n1(i,e){if(!(i instanceof e))throw new TypeError("Cannot call a class as a function")}function Gl(i,e){if(!i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:i}function r1(i,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);i.prototype=Object.create(e&&e.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(i,e):i.__proto__=e)}var o1=["XX00000XXX","XX10000XXX","XX20000XXX","XXX00000XX","XXXX00000X","XXXXX00005","XXXXX00006","XXXXX00007","XXXXX00008","XXXXX00009"],s1=[["EEEOOO","OOOEEE"],["EEOEOO","OOEOEE"],["EEOOEO","OOEEOE"],["EEOOOE","OOEEEO"],["EOEEOO","OEOOEE"],["EOOEEO","OEEOOE"],["EOOOEE","OEEEOO"],["EOEOEO","OEOEOE"],["EOEOOE","OEOEEO"],["EOOEOE","OEEOEO"]],a1=function(i){r1(e,i);function e(t,n){n1(this,e);var r=Gl(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));if(r.isValid=!1,t.search(/^[0-9]{6}$/)!==-1)r.middleDigits=t,r.upcA=Eh(t,"0"),r.text=n.text||""+r.upcA[0]+t+r.upcA[r.upcA.length-1],r.isValid=!0;else if(t.search(/^[01][0-9]{7}$/)!==-1)if(r.middleDigits=t.substring(1,t.length-1),r.upcA=Eh(r.middleDigits,t[0]),r.upcA[r.upcA.length-1]===t[t.length-1])r.isValid=!0;else return Gl(r);else return Gl(r);return r.displayValue=n.displayValue,n.fontSize>n.width*10?r.fontSize=n.width*10:r.fontSize=n.fontSize,r.guardHeight=n.height+r.fontSize/2+n.textMargin,r}return Qb(e,[{key:"valid",value:function(){return this.isValid}},{key:"encode",value:function(){return this.options.flat?this.flatEncoding():this.guardedEncoding()}},{key:"flatEncoding",value:function(){var n="";return n+="101",n+=this.encodeMiddleDigits(),n+="010101",{data:n,text:this.text}}},{key:"guardedEncoding",value:function(){var n=[];return this.displayValue&&n.push({data:"00000000",text:this.text[0],options:{textAlign:"left",fontSize:this.fontSize}}),n.push({data:"101",options:{height:this.guardHeight}}),n.push({data:this.encodeMiddleDigits(),text:this.text.substring(1,7),options:{fontSize:this.fontSize}}),n.push({data:"010101",options:{height:this.guardHeight}}),this.displayValue&&n.push({data:"00000000",text:this.text[7],options:{textAlign:"right",fontSize:this.fontSize}}),n}},{key:"encodeMiddleDigits",value:function(){var n=this.upcA[0],r=this.upcA[this.upcA.length-1],o=s1[parseInt(r)][parseInt(n)];return(0,Jb.default)(this.middleDigits,o)}}]),e}(t1.default);function Eh(i,e){for(var t=parseInt(i[i.length-1]),n=o1[t],r="",o=0,s=0;s<n.length;s++){var a=n[s];a==="X"?r+=i[o++]:r+=a}return r=""+e+r,""+r+(0,i1.checksum)(r)}Xl.default=a1});var Th=j(kt=>{"use strict";Object.defineProperty(kt,"__esModule",{value:!0});kt.UPCE=kt.UPC=kt.EAN2=kt.EAN5=kt.EAN8=kt.EAN13=void 0;var l1=vh(),c1=Qn(l1),d1=_h(),u1=Qn(d1),p1=xh(),h1=Qn(p1),f1=Sh(),m1=Qn(f1),g1=ql(),y1=Qn(g1),v1=kh(),b1=Qn(v1);function Qn(i){return i&&i.__esModule?i:{default:i}}kt.EAN13=c1.default;kt.EAN8=u1.default;kt.EAN5=h1.default;kt.EAN2=m1.default;kt.UPC=y1.default;kt.UPCE=b1.default});var Ih=j(Lr=>{"use strict";Object.defineProperty(Lr,"__esModule",{value:!0});var sT=Lr.START_BIN="1010",aT=Lr.END_BIN="11101",lT=Lr.BINARIES=["00110","10001","01001","11000","00101","10100","01100","00011","10010","01010"]});var Kl=j(Yl=>{"use strict";Object.defineProperty(Yl,"__esModule",{value:!0});var _1=function(){function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),e}}(),Hs=Ih(),w1=Ht(),x1=C1(w1);function C1(i){return i&&i.__esModule?i:{default:i}}function S1(i,e){if(!(i instanceof e))throw new TypeError("Cannot call a class as a function")}function P1(i,e){if(!i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:i}function E1(i,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);i.prototype=Object.create(e&&e.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(i,e):i.__proto__=e)}var D1=function(i){E1(e,i);function e(){return S1(this,e),P1(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return _1(e,[{key:"valid",value:function(){return this.data.search(/^([0-9]{2})+$/)!==-1}},{key:"encode",value:function(){var n=this,r=this.data.match(/.{2}/g).map(function(o){return n.encodePair(o)}).join("");return{data:Hs.START_BIN+r+Hs.END_BIN,text:this.text}}},{key:"encodePair",value:function(n){var r=Hs.BINARIES[n[1]];return Hs.BINARIES[n[0]].split("").map(function(o,s){return(o==="1"?"111":"1")+(r[s]==="1"?"000":"0")}).join("")}}]),e}(x1.default);Yl.default=D1});var Fh=j(Ql=>{"use strict";Object.defineProperty(Ql,"__esModule",{value:!0});var k1=function(){function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),e}}(),T1=Kl(),I1=O1(T1);function O1(i){return i&&i.__esModule?i:{default:i}}function F1(i,e){if(!(i instanceof e))throw new TypeError("Cannot call a class as a function")}function R1(i,e){if(!i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:i}function M1(i,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);i.prototype=Object.create(e&&e.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(i,e):i.__proto__=e)}var Oh=function(e){var t=e.substr(0,13).split("").map(function(n){return parseInt(n,10)}).reduce(function(n,r,o){return n+r*(3-o%2*2)},0);return Math.ceil(t/10)*10-t},A1=function(i){M1(e,i);function e(t,n){return F1(this,e),t.search(/^[0-9]{13}$/)!==-1&&(t+=Oh(t)),R1(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n))}return k1(e,[{key:"valid",value:function(){return this.data.search(/^[0-9]{14}$/)!==-1&&+this.data[13]===Oh(this.data)}}]),e}(I1.default);Ql.default=A1});var Mh=j(Zn=>{"use strict";Object.defineProperty(Zn,"__esModule",{value:!0});Zn.ITF14=Zn.ITF=void 0;var B1=Kl(),N1=Rh(B1),z1=Fh(),L1=Rh(z1);function Rh(i){return i&&i.__esModule?i:{default:i}}Zn.ITF=N1.default;Zn.ITF14=L1.default});var Jn=j(Zl=>{"use strict";Object.defineProperty(Zl,"__esModule",{value:!0});var H1=function(){function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),e}}(),j1=Ht(),V1=U1(j1);function U1(i){return i&&i.__esModule?i:{default:i}}function W1(i,e){if(!(i instanceof e))throw new TypeError("Cannot call a class as a function")}function $1(i,e){if(!i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:i}function q1(i,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);i.prototype=Object.create(e&&e.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(i,e):i.__proto__=e)}var G1=function(i){q1(e,i);function e(t,n){return W1(this,e),$1(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n))}return H1(e,[{key:"encode",value:function(){for(var n="110",r=0;r<this.data.length;r++){var o=parseInt(this.data[r]),s=o.toString(2);s=X1(s,4-s.length);for(var a=0;a<s.length;a++)n+=s[a]=="0"?"100":"110"}return n+="1001",{data:n,text:this.text}}},{key:"valid",value:function(){return this.data.search(/^[0-9]+$/)!==-1}}]),e}(V1.default);function X1(i,e){for(var t=0;t<e;t++)i="0"+i;return i}Zl.default=G1});var Hr=j(js=>{"use strict";Object.defineProperty(js,"__esModule",{value:!0});js.mod10=Y1;js.mod11=K1;function Y1(i){for(var e=0,t=0;t<i.length;t++){var n=parseInt(i[t]);(t+i.length)%2===0?e+=n:e+=n*2%10+Math.floor(n*2/10)}return(10-e%10)%10}function K1(i){for(var e=0,t=[2,3,4,5,6,7],n=0;n<i.length;n++){var r=parseInt(i[i.length-1-n]);e+=t[n%t.length]*r}return(11-e%11)%11}});var Ah=j(Jl=>{"use strict";Object.defineProperty(Jl,"__esModule",{value:!0});var Q1=Jn(),Z1=e_(Q1),J1=Hr();function e_(i){return i&&i.__esModule?i:{default:i}}function t_(i,e){if(!(i instanceof e))throw new TypeError("Cannot call a class as a function")}function i_(i,e){if(!i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:i}function n_(i,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);i.prototype=Object.create(e&&e.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(i,e):i.__proto__=e)}var r_=function(i){n_(e,i);function e(t,n){return t_(this,e),i_(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t+(0,J1.mod10)(t),n))}return e}(Z1.default);Jl.default=r_});var Bh=j(ec=>{"use strict";Object.defineProperty(ec,"__esModule",{value:!0});var o_=Jn(),s_=l_(o_),a_=Hr();function l_(i){return i&&i.__esModule?i:{default:i}}function c_(i,e){if(!(i instanceof e))throw new TypeError("Cannot call a class as a function")}function d_(i,e){if(!i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:i}function u_(i,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);i.prototype=Object.create(e&&e.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(i,e):i.__proto__=e)}var p_=function(i){u_(e,i);function e(t,n){return c_(this,e),d_(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t+(0,a_.mod11)(t),n))}return e}(s_.default);ec.default=p_});var zh=j(tc=>{"use strict";Object.defineProperty(tc,"__esModule",{value:!0});var h_=Jn(),f_=m_(h_),Nh=Hr();function m_(i){return i&&i.__esModule?i:{default:i}}function g_(i,e){if(!(i instanceof e))throw new TypeError("Cannot call a class as a function")}function y_(i,e){if(!i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:i}function v_(i,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);i.prototype=Object.create(e&&e.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(i,e):i.__proto__=e)}var b_=function(i){v_(e,i);function e(t,n){return g_(this,e),t+=(0,Nh.mod10)(t),t+=(0,Nh.mod10)(t),y_(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n))}return e}(f_.default);tc.default=b_});var Hh=j(ic=>{"use strict";Object.defineProperty(ic,"__esModule",{value:!0});var __=Jn(),w_=x_(__),Lh=Hr();function x_(i){return i&&i.__esModule?i:{default:i}}function C_(i,e){if(!(i instanceof e))throw new TypeError("Cannot call a class as a function")}function S_(i,e){if(!i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:i}function P_(i,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);i.prototype=Object.create(e&&e.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(i,e):i.__proto__=e)}var E_=function(i){P_(e,i);function e(t,n){return C_(this,e),t+=(0,Lh.mod11)(t),t+=(0,Lh.mod10)(t),S_(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n))}return e}(w_.default);ic.default=E_});var jh=j(si=>{"use strict";Object.defineProperty(si,"__esModule",{value:!0});si.MSI1110=si.MSI1010=si.MSI11=si.MSI10=si.MSI=void 0;var D_=Jn(),k_=jr(D_),T_=Ah(),I_=jr(T_),O_=Bh(),F_=jr(O_),R_=zh(),M_=jr(R_),A_=Hh(),B_=jr(A_);function jr(i){return i&&i.__esModule?i:{default:i}}si.MSI=k_.default;si.MSI10=I_.default;si.MSI11=F_.default;si.MSI1010=M_.default;si.MSI1110=B_.default});var Vh=j(Vs=>{"use strict";Object.defineProperty(Vs,"__esModule",{value:!0});Vs.pharmacode=void 0;var N_=function(){function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),e}}(),z_=Ht(),L_=H_(z_);function H_(i){return i&&i.__esModule?i:{default:i}}function j_(i,e){if(!(i instanceof e))throw new TypeError("Cannot call a class as a function")}function V_(i,e){if(!i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:i}function U_(i,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);i.prototype=Object.create(e&&e.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(i,e):i.__proto__=e)}var W_=function(i){U_(e,i);function e(t,n){j_(this,e);var r=V_(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return r.number=parseInt(t,10),r}return N_(e,[{key:"encode",value:function(){for(var n=this.number,r="";!isNaN(n)&&n!=0;)n%2===0?(r="11100"+r,n=(n-2)/2):(r="100"+r,n=(n-1)/2);return r=r.slice(0,-2),{data:r,text:this.text}}},{key:"valid",value:function(){return this.number>=3&&this.number<=131070}}]),e}(L_.default);Vs.pharmacode=W_});var Uh=j(Us=>{"use strict";Object.defineProperty(Us,"__esModule",{value:!0});Us.codabar=void 0;var $_=function(){function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),e}}(),q_=Ht(),G_=X_(q_);function X_(i){return i&&i.__esModule?i:{default:i}}function Y_(i,e){if(!(i instanceof e))throw new TypeError("Cannot call a class as a function")}function K_(i,e){if(!i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:i}function Q_(i,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);i.prototype=Object.create(e&&e.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(i,e):i.__proto__=e)}var Z_=function(i){Q_(e,i);function e(t,n){Y_(this,e),t.search(/^[0-9\-\$\:\.\+\/]+$/)===0&&(t="A"+t+"A");var r=K_(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t.toUpperCase(),n));return r.text=r.options.text||r.text.replace(/[A-D]/g,""),r}return $_(e,[{key:"valid",value:function(){return this.data.search(/^[A-D][0-9\-\$\:\.\+\/]+[A-D]$/)!==-1}},{key:"encode",value:function(){for(var n=[],r=this.getEncodings(),o=0;o<this.data.length;o++)n.push(r[this.data.charAt(o)]),o!==this.data.length-1&&n.push("0");return{text:this.text,data:n.join("")}}},{key:"getEncodings",value:function(){return{0:"101010011",1:"101011001",2:"101001011",3:"110010101",4:"101101001",5:"110101001",6:"100101011",7:"100101101",8:"100110101",9:"110100101","-":"101001101",$:"101100101",":":"1101011011","/":"1101101011",".":"1101101101","+":"1011011011",A:"1011001001",B:"1001001011",C:"1010010011",D:"1010011001"}}}]),e}(G_.default);Us.codabar=Z_});var Wh=j(Ws=>{"use strict";Object.defineProperty(Ws,"__esModule",{value:!0});Ws.GenericBarcode=void 0;var J_=function(){function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),e}}(),ew=Ht(),tw=iw(ew);function iw(i){return i&&i.__esModule?i:{default:i}}function nw(i,e){if(!(i instanceof e))throw new TypeError("Cannot call a class as a function")}function rw(i,e){if(!i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:i}function ow(i,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);i.prototype=Object.create(e&&e.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(i,e):i.__proto__=e)}var sw=function(i){ow(e,i);function e(t,n){return nw(this,e),rw(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n))}return J_(e,[{key:"encode",value:function(){return{data:"10101010101010101010101010101010101010101",text:this.text}}},{key:"valid",value:function(){return!0}}]),e}(tw.default);Ws.GenericBarcode=sw});var qh=j(nc=>{"use strict";Object.defineProperty(nc,"__esModule",{value:!0});var aw=Qp(),$s=fh(),er=Th(),$h=Mh(),Vr=jh(),lw=Vh(),cw=Uh(),dw=Wh();nc.default={CODE39:aw.CODE39,CODE128:$s.CODE128,CODE128A:$s.CODE128A,CODE128B:$s.CODE128B,CODE128C:$s.CODE128C,EAN13:er.EAN13,EAN8:er.EAN8,EAN5:er.EAN5,EAN2:er.EAN2,UPC:er.UPC,UPCE:er.UPCE,ITF14:$h.ITF14,ITF:$h.ITF,MSI:Vr.MSI,MSI10:Vr.MSI10,MSI11:Vr.MSI11,MSI1010:Vr.MSI1010,MSI1110:Vr.MSI1110,pharmacode:lw.pharmacode,codabar:cw.codabar,GenericBarcode:dw.GenericBarcode}});var Ur=j(rc=>{"use strict";Object.defineProperty(rc,"__esModule",{value:!0});var uw=Object.assign||function(i){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(i[n]=t[n])}return i};rc.default=function(i,e){return uw({},i,e)}});var Gh=j(oc=>{"use strict";Object.defineProperty(oc,"__esModule",{value:!0});oc.default=pw;function pw(i){var e=[];function t(n){if(Array.isArray(n))for(var r=0;r<n.length;r++)t(n[r]);else n.text=n.text||"",n.data=n.data||"",e.push(n)}return t(i),e}});var Xh=j(sc=>{"use strict";Object.defineProperty(sc,"__esModule",{value:!0});sc.default=hw;function hw(i){return i.marginTop=i.marginTop||i.margin,i.marginBottom=i.marginBottom||i.margin,i.marginRight=i.marginRight||i.margin,i.marginLeft=i.marginLeft||i.margin,i}});var lc=j(ac=>{"use strict";Object.defineProperty(ac,"__esModule",{value:!0});ac.default=fw;function fw(i){var e=["width","height","textMargin","fontSize","margin","marginTop","marginBottom","marginLeft","marginRight"];for(var t in e)e.hasOwnProperty(t)&&(t=e[t],typeof i[t]=="string"&&(i[t]=parseInt(i[t],10)));return typeof i.displayValue=="string"&&(i.displayValue=i.displayValue!="false"),i}});var dc=j(cc=>{"use strict";Object.defineProperty(cc,"__esModule",{value:!0});var mw={width:2,height:100,format:"auto",displayValue:!0,fontOptions:"",font:"monospace",text:void 0,textAlign:"center",textPosition:"bottom",textMargin:2,fontSize:20,background:"#ffffff",lineColor:"#000000",margin:10,marginTop:void 0,marginBottom:void 0,marginLeft:void 0,marginRight:void 0,valid:function(){}};cc.default=mw});var Qh=j(uc=>{"use strict";Object.defineProperty(uc,"__esModule",{value:!0});var gw=lc(),yw=Kh(gw),vw=dc(),Yh=Kh(vw);function Kh(i){return i&&i.__esModule?i:{default:i}}function bw(i){var e={};for(var t in Yh.default)Yh.default.hasOwnProperty(t)&&(i.hasAttribute("jsbarcode-"+t.toLowerCase())&&(e[t]=i.getAttribute("jsbarcode-"+t.toLowerCase())),i.hasAttribute("data-"+t.toLowerCase())&&(e[t]=i.getAttribute("data-"+t.toLowerCase())));return e.value=i.getAttribute("jsbarcode-value")||i.getAttribute("data-value"),e=(0,yw.default)(e),e}uc.default=bw});var pc=j(ai=>{"use strict";Object.defineProperty(ai,"__esModule",{value:!0});ai.getTotalWidthOfEncodings=ai.calculateEncodingAttributes=ai.getBarcodePadding=ai.getEncodingHeight=ai.getMaximumHeightOfEncodings=void 0;var _w=Ur(),ww=xw(_w);function xw(i){return i&&i.__esModule?i:{default:i}}function Zh(i,e){return e.height+(e.displayValue&&i.text.length>0?e.fontSize+e.textMargin:0)+e.marginTop+e.marginBottom}function Jh(i,e,t){if(t.displayValue&&e<i){if(t.textAlign=="center")return Math.floor((i-e)/2);if(t.textAlign=="left")return 0;if(t.textAlign=="right")return Math.floor(i-e)}return 0}function Cw(i,e,t){for(var n=0;n<i.length;n++){var r=i[n],o=(0,ww.default)(e,r.options),s;o.displayValue?s=Ew(r.text,o,t):s=0;var a=r.data.length*o.width;r.width=Math.ceil(Math.max(s,a)),r.height=Zh(r,o),r.barcodePadding=Jh(s,a,o)}}function Sw(i){for(var e=0,t=0;t<i.length;t++)e+=i[t].width;return e}function Pw(i){for(var e=0,t=0;t<i.length;t++)i[t].height>e&&(e=i[t].height);return e}function Ew(i,e,t){var n;if(t)n=t;else if(typeof document<"u")n=document.createElement("canvas").getContext("2d");else return 0;n.font=e.fontOptions+" "+e.fontSize+"px "+e.font;var r=n.measureText(i);if(!r)return 0;var o=r.width;return o}ai.getMaximumHeightOfEncodings=Pw;ai.getEncodingHeight=Zh;ai.getBarcodePadding=Jh;ai.calculateEncodingAttributes=Cw;ai.getTotalWidthOfEncodings=Sw});var ef=j(fc=>{"use strict";Object.defineProperty(fc,"__esModule",{value:!0});var Dw=function(){function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),e}}(),kw=Ur(),Tw=Iw(kw),hc=pc();function Iw(i){return i&&i.__esModule?i:{default:i}}function Ow(i,e){if(!(i instanceof e))throw new TypeError("Cannot call a class as a function")}var Fw=function(){function i(e,t,n){Ow(this,i),this.canvas=e,this.encodings=t,this.options=n}return Dw(i,[{key:"render",value:function(){if(!this.canvas.getContext)throw new Error("The browser does not support canvas.");this.prepareCanvas();for(var t=0;t<this.encodings.length;t++){var n=(0,Tw.default)(this.options,this.encodings[t].options);this.drawCanvasBarcode(n,this.encodings[t]),this.drawCanvasText(n,this.encodings[t]),this.moveCanvasDrawing(this.encodings[t])}this.restoreCanvas()}},{key:"prepareCanvas",value:function(){var t=this.canvas.getContext("2d");t.save(),(0,hc.calculateEncodingAttributes)(this.encodings,this.options,t);var n=(0,hc.getTotalWidthOfEncodings)(this.encodings),r=(0,hc.getMaximumHeightOfEncodings)(this.encodings);this.canvas.width=n+this.options.marginLeft+this.options.marginRight,this.canvas.height=r,t.clearRect(0,0,this.canvas.width,this.canvas.height),this.options.background&&(t.fillStyle=this.options.background,t.fillRect(0,0,this.canvas.width,this.canvas.height)),t.translate(this.options.marginLeft,0)}},{key:"drawCanvasBarcode",value:function(t,n){var r=this.canvas.getContext("2d"),o=n.data,s;t.textPosition=="top"?s=t.marginTop+t.fontSize+t.textMargin:s=t.marginTop,r.fillStyle=t.lineColor;for(var a=0;a<o.length;a++){var l=a*t.width+n.barcodePadding;o[a]==="1"?r.fillRect(l,s,t.width,t.height):o[a]&&r.fillRect(l,s,t.width,t.height*o[a])}}},{key:"drawCanvasText",value:function(t,n){var r=this.canvas.getContext("2d"),o=t.fontOptions+" "+t.fontSize+"px "+t.font;if(t.displayValue){var s,a;t.textPosition=="top"?a=t.marginTop+t.fontSize-t.textMargin:a=t.height+t.textMargin+t.marginTop+t.fontSize,r.font=o,t.textAlign=="left"||n.barcodePadding>0?(s=0,r.textAlign="left"):t.textAlign=="right"?(s=n.width-1,r.textAlign="right"):(s=n.width/2,r.textAlign="center"),r.fillText(n.text,s,a)}}},{key:"moveCanvasDrawing",value:function(t){var n=this.canvas.getContext("2d");n.translate(t.width,0)}},{key:"restoreCanvas",value:function(){var t=this.canvas.getContext("2d");t.restore()}}]),i}();fc.default=Fw});var tf=j(gc=>{"use strict";Object.defineProperty(gc,"__esModule",{value:!0});var Rw=function(){function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),e}}(),Mw=Ur(),Aw=Bw(Mw),mc=pc();function Bw(i){return i&&i.__esModule?i:{default:i}}function Nw(i,e){if(!(i instanceof e))throw new TypeError("Cannot call a class as a function")}var qs="http://www.w3.org/2000/svg",zw=function(){function i(e,t,n){Nw(this,i),this.svg=e,this.encodings=t,this.options=n,this.document=n.xmlDocument||document}return Rw(i,[{key:"render",value:function(){var t=this.options.marginLeft;this.prepareSVG();for(var n=0;n<this.encodings.length;n++){var r=this.encodings[n],o=(0,Aw.default)(this.options,r.options),s=this.createGroup(t,o.marginTop,this.svg);this.setGroupOptions(s,o),this.drawSvgBarcode(s,o,r),this.drawSVGText(s,o,r),t+=r.width}}},{key:"prepareSVG",value:function(){for(;this.svg.firstChild;)this.svg.removeChild(this.svg.firstChild);(0,mc.calculateEncodingAttributes)(this.encodings,this.options);var t=(0,mc.getTotalWidthOfEncodings)(this.encodings),n=(0,mc.getMaximumHeightOfEncodings)(this.encodings),r=t+this.options.marginLeft+this.options.marginRight;this.setSvgAttributes(r,n),this.options.background&&this.drawRect(0,0,r,n,this.svg).setAttribute("style","fill:"+this.options.background+";")}},{key:"drawSvgBarcode",value:function(t,n,r){var o=r.data,s;n.textPosition=="top"?s=n.fontSize+n.textMargin:s=0;for(var a=0,l=0,c=0;c<o.length;c++)l=c*n.width+r.barcodePadding,o[c]==="1"?a++:a>0&&(this.drawRect(l-n.width*a,s,n.width*a,n.height,t),a=0);a>0&&this.drawRect(l-n.width*(a-1),s,n.width*a,n.height,t)}},{key:"drawSVGText",value:function(t,n,r){var o=this.document.createElementNS(qs,"text");if(n.displayValue){var s,a;o.setAttribute("style","font:"+n.fontOptions+" "+n.fontSize+"px "+n.font),n.textPosition=="top"?a=n.fontSize-n.textMargin:a=n.height+n.textMargin+n.fontSize,n.textAlign=="left"||r.barcodePadding>0?(s=0,o.setAttribute("text-anchor","start")):n.textAlign=="right"?(s=r.width-1,o.setAttribute("text-anchor","end")):(s=r.width/2,o.setAttribute("text-anchor","middle")),o.setAttribute("x",s),o.setAttribute("y",a),o.appendChild(this.document.createTextNode(r.text)),t.appendChild(o)}}},{key:"setSvgAttributes",value:function(t,n){var r=this.svg;r.setAttribute("width",t+"px"),r.setAttribute("height",n+"px"),r.setAttribute("x","0px"),r.setAttribute("y","0px"),r.setAttribute("viewBox","0 0 "+t+" "+n),r.setAttribute("xmlns",qs),r.setAttribute("version","1.1"),r.setAttribute("style","transform: translate(0,0)")}},{key:"createGroup",value:function(t,n,r){var o=this.document.createElementNS(qs,"g");return o.setAttribute("transform","translate("+t+", "+n+")"),r.appendChild(o),o}},{key:"setGroupOptions",value:function(t,n){t.setAttribute("style","fill:"+n.lineColor+";")}},{key:"drawRect",value:function(t,n,r,o,s){var a=this.document.createElementNS(qs,"rect");return a.setAttribute("x",t),a.setAttribute("y",n),a.setAttribute("width",r),a.setAttribute("height",o),s.appendChild(a),a}}]),i}();gc.default=zw});var nf=j(yc=>{"use strict";Object.defineProperty(yc,"__esModule",{value:!0});var Lw=function(){function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),e}}();function Hw(i,e){if(!(i instanceof e))throw new TypeError("Cannot call a class as a function")}var jw=function(){function i(e,t,n){Hw(this,i),this.object=e,this.encodings=t,this.options=n}return Lw(i,[{key:"render",value:function(){this.object.encodings=this.encodings}}]),i}();yc.default=jw});var rf=j(bc=>{"use strict";Object.defineProperty(bc,"__esModule",{value:!0});var Vw=ef(),Uw=vc(Vw),Ww=tf(),$w=vc(Ww),qw=nf(),Gw=vc(qw);function vc(i){return i&&i.__esModule?i:{default:i}}bc.default={CanvasRenderer:Uw.default,SVGRenderer:$w.default,ObjectRenderer:Gw.default}});var Cc=j(Wr=>{"use strict";Object.defineProperty(Wr,"__esModule",{value:!0});function _c(i,e){if(!(i instanceof e))throw new TypeError("Cannot call a class as a function")}function wc(i,e){if(!i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:i}function xc(i,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);i.prototype=Object.create(e&&e.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(i,e):i.__proto__=e)}var Xw=function(i){xc(e,i);function e(t,n){_c(this,e);var r=wc(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return r.name="InvalidInputException",r.symbology=t,r.input=n,r.message='"'+r.input+'" is not a valid input for '+r.symbology,r}return e}(Error),Yw=function(i){xc(e,i);function e(){_c(this,e);var t=wc(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return t.name="InvalidElementException",t.message="Not supported type to render on",t}return e}(Error),Kw=function(i){xc(e,i);function e(){_c(this,e);var t=wc(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return t.name="NoElementException",t.message="No element to render on.",t}return e}(Error);Wr.InvalidInputException=Xw;Wr.InvalidElementException=Yw;Wr.NoElementException=Kw});var sf=j(Ec=>{"use strict";Object.defineProperty(Ec,"__esModule",{value:!0});var Qw=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},Zw=Qh(),Sc=of(Zw),Jw=rf(),$r=of(Jw),ex=Cc();function of(i){return i&&i.__esModule?i:{default:i}}function Pc(i){if(typeof i=="string")return tx(i);if(Array.isArray(i)){for(var e=[],t=0;t<i.length;t++)e.push(Pc(i[t]));return e}else{if(typeof HTMLCanvasElement<"u"&&i instanceof HTMLImageElement)return ix(i);if(i&&i.nodeName&&i.nodeName.toLowerCase()==="svg"||typeof SVGElement<"u"&&i instanceof SVGElement)return{element:i,options:(0,Sc.default)(i),renderer:$r.default.SVGRenderer};if(typeof HTMLCanvasElement<"u"&&i instanceof HTMLCanvasElement)return{element:i,options:(0,Sc.default)(i),renderer:$r.default.CanvasRenderer};if(i&&i.getContext)return{element:i,renderer:$r.default.CanvasRenderer};if(i&&(typeof i>"u"?"undefined":Qw(i))==="object"&&!i.nodeName)return{element:i,renderer:$r.default.ObjectRenderer};throw new ex.InvalidElementException}}function tx(i){var e=document.querySelectorAll(i);if(e.length!==0){for(var t=[],n=0;n<e.length;n++)t.push(Pc(e[n]));return t}}function ix(i){var e=document.createElement("canvas");return{element:e,options:(0,Sc.default)(i),renderer:$r.default.CanvasRenderer,afterRender:function(){i.setAttribute("src",e.toDataURL())}}}Ec.default=Pc});var af=j(Dc=>{"use strict";Object.defineProperty(Dc,"__esModule",{value:!0});var nx=function(){function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),e}}();function rx(i,e){if(!(i instanceof e))throw new TypeError("Cannot call a class as a function")}var ox=function(){function i(e){rx(this,i),this.api=e}return nx(i,[{key:"handleCatch",value:function(t){if(t.name==="InvalidInputException")if(this.api._options.valid!==this.api._defaults.valid)this.api._options.valid(!1);else throw t.message;else throw t;this.api.render=function(){}}},{key:"wrapBarcodeCall",value:function(t){try{var n=t.apply(void 0,arguments);return this.api._options.valid(!0),n}catch(r){return this.handleCatch(r),this.api}}}]),i}();Dc.default=ox});var Ic=j((zT,ff)=>{"use strict";var sx=qh(),dn=Zi(sx),ax=Ur(),qr=Zi(ax),lx=Gh(),cf=Zi(lx),cx=Xh(),lf=Zi(cx),dx=sf(),ux=Zi(dx),px=lc(),hx=Zi(px),fx=af(),mx=Zi(fx),df=Cc(),gx=dc(),uf=Zi(gx);function Zi(i){return i&&i.__esModule?i:{default:i}}var Oi=function(){},Gs=function(e,t,n){var r=new Oi;if(typeof e>"u")throw Error("No element to render on was provided.");return r._renderProperties=(0,ux.default)(e),r._encodings=[],r._options=uf.default,r._errorHandler=new mx.default(r),typeof t<"u"&&(n=n||{},n.format||(n.format=hf()),r.options(n)[n.format](t,n).render()),r};Gs.getModule=function(i){return dn.default[i]};for(kc in dn.default)dn.default.hasOwnProperty(kc)&&yx(dn.default,kc);var kc;function yx(i,e){Oi.prototype[e]=Oi.prototype[e.toUpperCase()]=Oi.prototype[e.toLowerCase()]=function(t,n){var r=this;return r._errorHandler.wrapBarcodeCall(function(){n.text=typeof n.text>"u"?void 0:""+n.text;var o=(0,qr.default)(r._options,n);o=(0,hx.default)(o);var s=i[e],a=pf(t,s,o);return r._encodings.push(a),r})}}function pf(i,e,t){i=""+i;var n=new e(i,t);if(!n.valid())throw new df.InvalidInputException(n.constructor.name,i);var r=n.encode();r=(0,cf.default)(r);for(var o=0;o<r.length;o++)r[o].options=(0,qr.default)(t,r[o].options);return r}function hf(){return dn.default.CODE128?"CODE128":Object.keys(dn.default)[0]}Oi.prototype.options=function(i){return this._options=(0,qr.default)(this._options,i),this};Oi.prototype.blank=function(i){var e=new Array(i+1).join("0");return this._encodings.push({data:e}),this};Oi.prototype.init=function(){if(this._renderProperties){Array.isArray(this._renderProperties)||(this._renderProperties=[this._renderProperties]);var i;for(var e in this._renderProperties){i=this._renderProperties[e];var t=(0,qr.default)(this._options,i.options);t.format=="auto"&&(t.format=hf()),this._errorHandler.wrapBarcodeCall(function(){var n=t.value,r=dn.default[t.format.toUpperCase()],o=pf(n,r,t);Tc(i,o,t)})}}};Oi.prototype.render=function(){if(!this._renderProperties)throw new df.NoElementException;if(Array.isArray(this._renderProperties))for(var i=0;i<this._renderProperties.length;i++)Tc(this._renderProperties[i],this._encodings,this._options);else Tc(this._renderProperties,this._encodings,this._options);return this};Oi.prototype._defaults=uf.default;function Tc(i,e,t){e=(0,cf.default)(e);for(var n=0;n<e.length;n++)e[n].options=(0,qr.default)(t,e[n].options),(0,lf.default)(e[n].options);(0,lf.default)(t);var r=i.renderer,o=new r(i.element,e,t);o.render(),i.afterRender&&i.afterRender()}typeof window<"u"&&(window.JsBarcode=Gs);typeof jQuery<"u"&&(jQuery.fn.JsBarcode=function(i,e){var t=[];return jQuery(this).each(function(){t.push(this)}),Gs(t,i,e)});ff.exports=Gs});var cm=j((b3,lm)=>{lm.exports=function(){var e={},t=e._fns={};e.emit=function(s,a,l,c,d,u,g){var h=n(s);h.length&&r(s,h,[a,l,c,d,u,g])},e.on=function(s,a){t[s]||(t[s]=[]),t[s].push(a)},e.once=function(s,a){function l(){a.apply(this,arguments),e.off(s,l)}this.on(s,l)},e.off=function(s,a){var l=[];if(s&&a){var c=this._fns[s],d=0,u=c?c.length:0;for(d;d<u;d++)c[d]!==a&&l.push(c[d])}l.length?this._fns[s]=l:delete this._fns[s]};function n(o){var s=t[o]?t[o]:[],a=o.indexOf(":"),l=a===-1?[o]:[o.substring(0,a),o.substring(a+1)],c=Object.keys(t),d=0,u=c.length;for(d;d<u;d++){var g=c[d];if(g==="*"&&(s=s.concat(t[g])),l.length===2&&l[0]===g){s=s.concat(t[g]);break}}return s}function r(o,s,a){var l=0,c=s.length;for(l;l<c&&s[l];l++)s[l].event=o,s[l].apply(s[l],a)}return e}});var sa=j((w3,dm)=>{function tS(i){var e=typeof i;return i!=null&&(e=="object"||e=="function")}dm.exports=tS});var pm=j((x3,um)=>{var iS=typeof global=="object"&&global&&global.Object===Object&&global;um.exports=iS});var Qc=j((C3,hm)=>{var nS=pm(),rS=typeof self=="object"&&self&&self.Object===Object&&self,oS=nS||rS||Function("return this")();hm.exports=oS});var mm=j((S3,fm)=>{var sS=Qc(),aS=function(){return sS.Date.now()};fm.exports=aS});var ym=j((P3,gm)=>{var lS=/\s/;function cS(i){for(var e=i.length;e--&&lS.test(i.charAt(e)););return e}gm.exports=cS});var bm=j((E3,vm)=>{var dS=ym(),uS=/^\s+/;function pS(i){return i&&i.slice(0,dS(i)+1).replace(uS,"")}vm.exports=pS});var Zc=j((D3,_m)=>{var hS=Qc(),fS=hS.Symbol;_m.exports=fS});var Sm=j((k3,Cm)=>{var wm=Zc(),xm=Object.prototype,mS=xm.hasOwnProperty,gS=xm.toString,eo=wm?wm.toStringTag:void 0;function yS(i){var e=mS.call(i,eo),t=i[eo];try{i[eo]=void 0;var n=!0}catch{}var r=gS.call(i);return n&&(e?i[eo]=t:delete i[eo]),r}Cm.exports=yS});var Em=j((T3,Pm)=>{var vS=Object.prototype,bS=vS.toString;function _S(i){return bS.call(i)}Pm.exports=_S});var Im=j((I3,Tm)=>{var Dm=Zc(),wS=Sm(),xS=Em(),CS="[object Null]",SS="[object Undefined]",km=Dm?Dm.toStringTag:void 0;function PS(i){return i==null?i===void 0?SS:CS:km&&km in Object(i)?wS(i):xS(i)}Tm.exports=PS});var Fm=j((O3,Om)=>{function ES(i){return i!=null&&typeof i=="object"}Om.exports=ES});var Mm=j((F3,Rm)=>{var DS=Im(),kS=Fm(),TS="[object Symbol]";function IS(i){return typeof i=="symbol"||kS(i)&&DS(i)==TS}Rm.exports=IS});var zm=j((R3,Nm)=>{var OS=bm(),Am=sa(),FS=Mm(),Bm=NaN,RS=/^[-+]0x[0-9a-f]+$/i,MS=/^0b[01]+$/i,AS=/^0o[0-7]+$/i,BS=parseInt;function NS(i){if(typeof i=="number")return i;if(FS(i))return Bm;if(Am(i)){var e=typeof i.valueOf=="function"?i.valueOf():i;i=Am(e)?e+"":e}if(typeof i!="string")return i===0?i:+i;i=OS(i);var t=MS.test(i);return t||AS.test(i)?BS(i.slice(2),t?2:8):RS.test(i)?Bm:+i}Nm.exports=NS});var ed=j((M3,Hm)=>{var zS=sa(),Jc=mm(),Lm=zm(),LS="Expected a function",HS=Math.max,jS=Math.min;function VS(i,e,t){var n,r,o,s,a,l,c=0,d=!1,u=!1,g=!0;if(typeof i!="function")throw new TypeError(LS);e=Lm(e)||0,zS(t)&&(d=!!t.leading,u="maxWait"in t,o=u?HS(Lm(t.maxWait)||0,e):o,g="trailing"in t?!!t.trailing:g);function h(b){var w=n,S=r;return n=r=void 0,c=b,s=i.apply(S,w),s}function _(b){return c=b,a=setTimeout(M,e),d?h(b):s}function E(b){var w=b-l,S=b-c,A=e-w;return u?jS(A,o-S):A}function N(b){var w=b-l,S=b-c;return l===void 0||w>=e||w<0||u&&S>=o}function M(){var b=Jc();if(N(b))return U(b);a=setTimeout(M,E(b))}function U(b){return a=void 0,g&&n?h(b):(n=r=void 0,s)}function de(){a!==void 0&&clearTimeout(a),c=0,n=l=r=a=void 0}function oe(){return a===void 0?s:U(Jc())}function ee(){var b=Jc(),w=N(b);if(n=arguments,r=this,l=b,w){if(a===void 0)return _(l);if(u)return clearTimeout(a),a=setTimeout(M,e),h(l)}return a===void 0&&(a=setTimeout(M,e)),s}return ee.cancel=de,ee.flush=oe,ee}Hm.exports=VS});var Vm=j((A3,jm)=>{var US=ed(),WS=sa(),$S="Expected a function";function qS(i,e,t){var n=!0,r=!0;if(typeof i!="function")throw new TypeError($S);return WS(t)&&(n="leading"in t?!!t.leading:n,r="trailing"in t?!!t.trailing:r),US(i,e,{leading:n,maxWait:e,trailing:r})}jm.exports=qS});var io=j((Q3,Ym)=>{"use strict";Ym.exports=function(e){if(typeof e!="number"||Number.isNaN(e))throw new TypeError(`Expected a number, got ${typeof e}`);let t=e<0,n=Math.abs(e);if(t&&(n=-n),n===0)return"0 B";let r=["B","KB","MB","GB","TB","PB","EB","ZB","YB"],o=Math.min(Math.floor(Math.log(n)/Math.log(1024)),r.length-1),s=Number(n/1024**o),a=r[o];return`${s>=10||s%1===0?Math.round(s):s.toFixed(1)} ${a}`}});var Zm=j((Z3,Qm)=>{"use strict";function Km(i,e){this.text=i=i||"",this.hasWild=~i.indexOf("*"),this.separator=e,this.parts=i.split(e)}Km.prototype.match=function(i){var e=!0,t=this.parts,n,r=t.length,o;if(typeof i=="string"||i instanceof String)if(!this.hasWild&&this.text!=i)e=!1;else{for(o=(i||"").split(this.separator),n=0;e&&n<r;n++)t[n]!=="*"&&(n<o.length?e=t[n]===o[n]:e=!1);e=e&&o}else if(typeof i.splice=="function")for(e=[],n=i.length;n--;)this.match(i[n])&&(e[e.length]=i[n]);else if(typeof i=="object"){e={};for(var s in i)this.match(s)&&(e[s]=i[s])}return e};Qm.exports=function(i,e,t){var n=new Km(i,t||/[\/\.]/);return typeof e<"u"?n.match(e):n}});var eg=j((J3,Jm)=>{var ZS=Zm(),JS=/[\/\+\.]/;Jm.exports=function(i,e){function t(n){var r=ZS(n,i,JS);return r&&r.length>=2}return e?t(e.split(";")[0]):t}});var yt=j((MF,ba)=>{(function(){"use strict";var i={}.hasOwnProperty;function e(){for(var r="",o=0;o<arguments.length;o++){var s=arguments[o];s&&(r=n(r,t(s)))}return r}function t(r){if(typeof r=="string"||typeof r=="number")return r;if(typeof r!="object")return"";if(Array.isArray(r))return e.apply(null,r);if(r.toString!==Object.prototype.toString&&!r.toString.toString().includes("[native code]"))return r.toString();var o="";for(var s in r)i.call(r,s)&&r[s]&&(o=n(o,s));return o}function n(r,o){return o?r?r+" "+o:r+o:r}typeof ba<"u"&&ba.exports?(e.default=e,ba.exports=e):typeof define=="function"&&typeof define.amd=="object"&&define.amd?define("classnames",[],function(){return e}):window.classNames=e})()});var w0=j((LM,ou)=>{"use strict";var k2=Object.prototype.hasOwnProperty,bt="~";function Ro(){}Object.create&&(Ro.prototype=Object.create(null),new Ro().__proto__||(bt=!1));function T2(i,e,t){this.fn=i,this.context=e,this.once=t||!1}function _0(i,e,t,n,r){if(typeof t!="function")throw new TypeError("The listener must be a function");var o=new T2(t,n||i,r),s=bt?bt+e:e;return i._events[s]?i._events[s].fn?i._events[s]=[i._events[s],o]:i._events[s].push(o):(i._events[s]=o,i._eventsCount++),i}function za(i,e){--i._eventsCount===0?i._events=new Ro:delete i._events[e]}function ft(){this._events=new Ro,this._eventsCount=0}ft.prototype.eventNames=function(){var e=[],t,n;if(this._eventsCount===0)return e;for(n in t=this._events)k2.call(t,n)&&e.push(bt?n.slice(1):n);return Object.getOwnPropertySymbols?e.concat(Object.getOwnPropertySymbols(t)):e};ft.prototype.listeners=function(e){var t=bt?bt+e:e,n=this._events[t];if(!n)return[];if(n.fn)return[n.fn];for(var r=0,o=n.length,s=new Array(o);r<o;r++)s[r]=n[r].fn;return s};ft.prototype.listenerCount=function(e){var t=bt?bt+e:e,n=this._events[t];return n?n.fn?1:n.length:0};ft.prototype.emit=function(e,t,n,r,o,s){var a=bt?bt+e:e;if(!this._events[a])return!1;var l=this._events[a],c=arguments.length,d,u;if(l.fn){switch(l.once&&this.removeListener(e,l.fn,void 0,!0),c){case 1:return l.fn.call(l.context),!0;case 2:return l.fn.call(l.context,t),!0;case 3:return l.fn.call(l.context,t,n),!0;case 4:return l.fn.call(l.context,t,n,r),!0;case 5:return l.fn.call(l.context,t,n,r,o),!0;case 6:return l.fn.call(l.context,t,n,r,o,s),!0}for(u=1,d=new Array(c-1);u<c;u++)d[u-1]=arguments[u];l.fn.apply(l.context,d)}else{var g=l.length,h;for(u=0;u<g;u++)switch(l[u].once&&this.removeListener(e,l[u].fn,void 0,!0),c){case 1:l[u].fn.call(l[u].context);break;case 2:l[u].fn.call(l[u].context,t);break;case 3:l[u].fn.call(l[u].context,t,n);break;case 4:l[u].fn.call(l[u].context,t,n,r);break;default:if(!d)for(h=1,d=new Array(c-1);h<c;h++)d[h-1]=arguments[h];l[u].fn.apply(l[u].context,d)}}return!0};ft.prototype.on=function(e,t,n){return _0(this,e,t,n,!1)};ft.prototype.once=function(e,t,n){return _0(this,e,t,n,!0)};ft.prototype.removeListener=function(e,t,n,r){var o=bt?bt+e:e;if(!this._events[o])return this;if(!t)return za(this,o),this;var s=this._events[o];if(s.fn)s.fn===t&&(!r||s.once)&&(!n||s.context===n)&&za(this,o);else{for(var a=0,l=[],c=s.length;a<c;a++)(s[a].fn!==t||r&&!s[a].once||n&&s[a].context!==n)&&l.push(s[a]);l.length?this._events[o]=l.length===1?l[0]:l:za(this,o)}return this};ft.prototype.removeAllListeners=function(e){var t;return e?(t=bt?bt+e:e,this._events[t]&&za(this,t)):(this._events=new Ro,this._eventsCount=0),this};ft.prototype.off=ft.prototype.removeListener;ft.prototype.addListener=ft.prototype.on;ft.prefixed=bt;ft.EventEmitter=ft;typeof ou<"u"&&(ou.exports=ft)});var dy=j((Hu,ju)=>{(function(i,e){typeof Hu=="object"&&typeof ju<"u"?ju.exports=e():typeof define=="function"&&define.amd?define(e):(i=typeof globalThis<"u"?globalThis:i||self,i.Compressor=e())})(Hu,function(){"use strict";function i(F,C){var k=Object.keys(F);if(Object.getOwnPropertySymbols){var T=Object.getOwnPropertySymbols(F);C&&(T=T.filter(function(R){return Object.getOwnPropertyDescriptor(F,R).enumerable})),k.push.apply(k,T)}return k}function e(F){for(var C=1;C<arguments.length;C++){var k=arguments[C]!=null?arguments[C]:{};C%2?i(Object(k),!0).forEach(function(T){o(F,T,k[T])}):Object.getOwnPropertyDescriptors?Object.defineProperties(F,Object.getOwnPropertyDescriptors(k)):i(Object(k)).forEach(function(T){Object.defineProperty(F,T,Object.getOwnPropertyDescriptor(k,T))})}return F}function t(F,C){if(!(F instanceof C))throw new TypeError("Cannot call a class as a function")}function n(F,C){for(var k=0;k<C.length;k++){var T=C[k];T.enumerable=T.enumerable||!1,T.configurable=!0,"value"in T&&(T.writable=!0),Object.defineProperty(F,l(T.key),T)}}function r(F,C,k){return C&&n(F.prototype,C),k&&n(F,k),Object.defineProperty(F,"prototype",{writable:!1}),F}function o(F,C,k){return C=l(C),C in F?Object.defineProperty(F,C,{value:k,enumerable:!0,configurable:!0,writable:!0}):F[C]=k,F}function s(){return s=Object.assign?Object.assign.bind():function(F){for(var C=1;C<arguments.length;C++){var k=arguments[C];for(var T in k)Object.prototype.hasOwnProperty.call(k,T)&&(F[T]=k[T])}return F},s.apply(this,arguments)}function a(F,C){if(typeof F!="object"||F===null)return F;var k=F[Symbol.toPrimitive];if(k!==void 0){var T=k.call(F,C||"default");if(typeof T!="object")return T;throw new TypeError("@@toPrimitive must return a primitive value.")}return(C==="string"?String:Number)(F)}function l(F){var C=a(F,"string");return typeof C=="symbol"?C:String(C)}var c={exports:{}};(function(F){typeof window>"u"||function(C){var k=C.HTMLCanvasElement&&C.HTMLCanvasElement.prototype,T=C.Blob&&function(){try{return!!new Blob}catch{return!1}}(),R=T&&C.Uint8Array&&function(){try{return new Blob([new Uint8Array(100)]).size===100}catch{return!1}}(),V=C.BlobBuilder||C.WebKitBlobBuilder||C.MozBlobBuilder||C.MSBlobBuilder,ie=/^data:((.*?)(;charset=.*?)?)(;base64)?,/,G=(T||V)&&C.atob&&C.ArrayBuffer&&C.Uint8Array&&function($){var Y,ne,re,ge,Z,J,ve,be,xt;if(Y=$.match(ie),!Y)throw new Error("invalid data URI");for(ne=Y[2]?Y[1]:"text/plain"+(Y[3]||";charset=US-ASCII"),re=!!Y[4],ge=$.slice(Y[0].length),re?Z=atob(ge):Z=decodeURIComponent(ge),J=new ArrayBuffer(Z.length),ve=new Uint8Array(J),be=0;be<Z.length;be+=1)ve[be]=Z.charCodeAt(be);return T?new Blob([R?ve:J],{type:ne}):(xt=new V,xt.append(J),xt.getBlob(ne))};C.HTMLCanvasElement&&!k.toBlob&&(k.mozGetAsFile?k.toBlob=function($,Y,ne){var re=this;setTimeout(function(){ne&&k.toDataURL&&G?$(G(re.toDataURL(Y,ne))):$(re.mozGetAsFile("blob",Y))})}:k.toDataURL&&G&&(k.msToBlob?k.toBlob=function($,Y,ne){var re=this;setTimeout(function(){(Y&&Y!=="image/png"||ne)&&k.toDataURL&&G?$(G(re.toDataURL(Y,ne))):$(re.msToBlob(Y))})}:k.toBlob=function($,Y,ne){var re=this;setTimeout(function(){$(G(re.toDataURL(Y,ne)))})})),F.exports?F.exports=G:C.dataURLtoBlob=G}(window)})(c);var d=c.exports,u=function(C){return typeof Blob>"u"?!1:C instanceof Blob||Object.prototype.toString.call(C)==="[object Blob]"},g={strict:!0,checkOrientation:!0,retainExif:!1,maxWidth:1/0,maxHeight:1/0,minWidth:0,minHeight:0,width:void 0,height:void 0,resize:"none",quality:.8,mimeType:"auto",convertTypes:["image/png"],convertSize:5e6,beforeDraw:null,drew:null,success:null,error:null},h=typeof window<"u"&&typeof window.document<"u",_=h?window:{},E=function(C){return C>0&&C<1/0},N=Array.prototype.slice;function M(F){return Array.from?Array.from(F):N.call(F)}var U=/^image\/.+$/;function de(F){return U.test(F)}function oe(F){var C=de(F)?F.substr(6):"";return C==="jpeg"&&(C="jpg"),".".concat(C)}var ee=String.fromCharCode;function b(F,C,k){var T="",R;for(k+=C,R=C;R<k;R+=1)T+=ee(F.getUint8(R));return T}var w=_.btoa;function S(F,C){for(var k=[],T=8192,R=new Uint8Array(F);R.length>0;)k.push(ee.apply(null,M(R.subarray(0,T)))),R=R.subarray(T);return"data:".concat(C,";base64,").concat(w(k.join("")))}function A(F){var C=new DataView(F),k;try{var T,R,V;if(C.getUint8(0)===255&&C.getUint8(1)===216)for(var ie=C.byteLength,G=2;G+1<ie;){if(C.getUint8(G)===255&&C.getUint8(G+1)===225){R=G;break}G+=1}if(R){var $=R+4,Y=R+10;if(b(C,$,4)==="Exif"){var ne=C.getUint16(Y);if(T=ne===18761,(T||ne===19789)&&C.getUint16(Y+2,T)===42){var re=C.getUint32(Y+4,T);re>=8&&(V=Y+re)}}}if(V){var ge=C.getUint16(V,T),Z,J;for(J=0;J<ge;J+=1)if(Z=V+J*12+2,C.getUint16(Z,T)===274){Z+=8,k=C.getUint16(Z,T),C.setUint16(Z,1,T);break}}}catch{k=1}return k}function L(F){var C=0,k=1,T=1;switch(F){case 2:k=-1;break;case 3:C=-180;break;case 4:T=-1;break;case 5:C=90,T=-1;break;case 6:C=90;break;case 7:C=90,k=-1;break;case 8:C=-90;break}return{rotate:C,scaleX:k,scaleY:T}}var K=/\.\d*(?:0|9){12}\d*$/;function ye(F){var C=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1e11;return K.test(F)?Math.round(F*C)/C:F}function Ne(F){var C=F.aspectRatio,k=F.height,T=F.width,R=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"none",V=E(T),ie=E(k);if(V&&ie){var G=k*C;(R==="contain"||R==="none")&&G>T||R==="cover"&&G<T?k=T/C:T=k*C}else V?k=T/C:ie&&(T=k*C);return{width:T,height:k}}function Pe(F){for(var C=M(new Uint8Array(F)),k=C.length,T=[],R=0;R+3<k;){var V=C[R],ie=C[R+1];if(V===255&&ie===218)break;if(V===255&&ie===216)R+=2;else{var G=C[R+2]*256+C[R+3],$=R+G+2,Y=C.slice(R,$);T.push(Y),R=$}}return T.reduce(function(ne,re){return re[0]===255&&re[1]===225?ne.concat(re):ne},[])}function Se(F,C){var k=M(new Uint8Array(F));if(k[2]!==255||k[3]!==224)return F;var T=k[4]*256+k[5],R=[255,216].concat(C,k.slice(4+T));return new Uint8Array(R)}var Q=_.ArrayBuffer,ze=_.FileReader,te=_.URL||_.webkitURL,Rt=/\.\w+$/,he=_.Compressor,X=function(){function F(C,k){t(this,F),this.file=C,this.exif=[],this.image=new Image,this.options=e(e({},g),k),this.aborted=!1,this.result=null,this.init()}return r(F,[{key:"init",value:function(){var k=this,T=this.file,R=this.options;if(!u(T)){this.fail(new Error("The first argument must be a File or Blob object."));return}var V=T.type;if(!de(V)){this.fail(new Error("The first argument must be an image File or Blob object."));return}if(!te||!ze){this.fail(new Error("The current browser does not support image compression."));return}Q||(R.checkOrientation=!1,R.retainExif=!1);var ie=V==="image/jpeg",G=ie&&R.checkOrientation,$=ie&&R.retainExif;if(te&&!G&&!$)this.load({url:te.createObjectURL(T)});else{var Y=new ze;this.reader=Y,Y.onload=function(ne){var re=ne.target,ge=re.result,Z={},J=1;G&&(J=A(ge),J>1&&s(Z,L(J))),$&&(k.exif=Pe(ge)),G||$?!te||J>1?Z.url=S(ge,V):Z.url=te.createObjectURL(T):Z.url=ge,k.load(Z)},Y.onabort=function(){k.fail(new Error("Aborted to read the image with FileReader."))},Y.onerror=function(){k.fail(new Error("Failed to read the image with FileReader."))},Y.onloadend=function(){k.reader=null},G||$?Y.readAsArrayBuffer(T):Y.readAsDataURL(T)}}},{key:"load",value:function(k){var T=this,R=this.file,V=this.image;V.onload=function(){T.draw(e(e({},k),{},{naturalWidth:V.naturalWidth,naturalHeight:V.naturalHeight}))},V.onabort=function(){T.fail(new Error("Aborted to load the image."))},V.onerror=function(){T.fail(new Error("Failed to load the image."))},_.navigator&&/(?:iPad|iPhone|iPod).*?AppleWebKit/i.test(_.navigator.userAgent)&&(V.crossOrigin="anonymous"),V.alt=R.name,V.src=k.url}},{key:"draw",value:function(k){var T=this,R=k.naturalWidth,V=k.naturalHeight,ie=k.rotate,G=ie===void 0?0:ie,$=k.scaleX,Y=$===void 0?1:$,ne=k.scaleY,re=ne===void 0?1:ne,ge=this.file,Z=this.image,J=this.options,ve=document.createElement("canvas"),be=ve.getContext("2d"),xt=Math.abs(G)%180===90,Mt=(J.resize==="contain"||J.resize==="cover")&&E(J.width)&&E(J.height),je=Math.max(J.maxWidth,0)||1/0,Ct=Math.max(J.maxHeight,0)||1/0,Te=Math.max(J.minWidth,0)||0,st=Math.max(J.minHeight,0)||0,at=R/V,Re=J.width,Ze=J.height;if(xt){var ki=[Ct,je];je=ki[0],Ct=ki[1];var At=[st,Te];Te=At[0],st=At[1];var Wi=[Ze,Re];Re=Wi[0],Ze=Wi[1]}Mt&&(at=Re/Ze);var Er=Ne({aspectRatio:at,width:je,height:Ct},"contain");je=Er.width,Ct=Er.height;var qu=Ne({aspectRatio:at,width:Te,height:st},"cover");if(Te=qu.width,st=qu.height,Mt){var Gu=Ne({aspectRatio:at,width:Re,height:Ze},J.resize);Re=Gu.width,Ze=Gu.height}else{var Xu=Ne({aspectRatio:at,width:Re,height:Ze}),Yu=Xu.width;Re=Yu===void 0?R:Yu;var Ku=Xu.height;Ze=Ku===void 0?V:Ku}Re=Math.floor(ye(Math.min(Math.max(Re,Te),je))),Ze=Math.floor(ye(Math.min(Math.max(Ze,st),Ct)));var Ay=-Re/2,By=-Ze/2,Ny=Re,zy=Ze,el=[];if(Mt){var Qu=0,Zu=0,tl=R,il=V,Ju=Ne({aspectRatio:at,width:R,height:V},{contain:"cover",cover:"contain"}[J.resize]);tl=Ju.width,il=Ju.height,Qu=(R-tl)/2,Zu=(V-il)/2,el.push(Qu,Zu,tl,il)}if(el.push(Ay,By,Ny,zy),xt){var ep=[Ze,Re];Re=ep[0],Ze=ep[1]}ve.width=Re,ve.height=Ze,de(J.mimeType)||(J.mimeType=ge.type);var tp="transparent";ge.size>J.convertSize&&J.convertTypes.indexOf(J.mimeType)>=0&&(J.mimeType="image/jpeg");var ip=J.mimeType==="image/jpeg";if(ip&&(tp="#fff"),be.fillStyle=tp,be.fillRect(0,0,Re,Ze),J.beforeDraw&&J.beforeDraw.call(this,be,ve),!this.aborted&&(be.save(),be.translate(Re/2,Ze/2),be.rotate(G*Math.PI/180),be.scale(Y,re),be.drawImage.apply(be,[Z].concat(el)),be.restore(),J.drew&&J.drew.call(this,be,ve),!this.aborted)){var np=function(Dr){if(!T.aborted){var rp=function(kr){return T.done({naturalWidth:R,naturalHeight:V,result:kr})};if(Dr&&ip&&J.retainExif&&T.exif&&T.exif.length>0){var op=function(kr){return rp(d(S(Se(kr,T.exif),J.mimeType)))};if(Dr.arrayBuffer)Dr.arrayBuffer().then(op).catch(function(){T.fail(new Error("Failed to read the compressed image with Blob.arrayBuffer()."))});else{var zn=new ze;T.reader=zn,zn.onload=function(nl){var kr=nl.target;op(kr.result)},zn.onabort=function(){T.fail(new Error("Aborted to read the compressed image with FileReader."))},zn.onerror=function(){T.fail(new Error("Failed to read the compressed image with FileReader."))},zn.onloadend=function(){T.reader=null},zn.readAsArrayBuffer(Dr)}}else rp(Dr)}};ve.toBlob?ve.toBlob(np,J.mimeType,J.quality):np(d(ve.toDataURL(J.mimeType,J.quality)))}}},{key:"done",value:function(k){var T=k.naturalWidth,R=k.naturalHeight,V=k.result,ie=this.file,G=this.image,$=this.options;if(te&&G.src.indexOf("blob:")===0&&te.revokeObjectURL(G.src),V)if($.strict&&!$.retainExif&&V.size>ie.size&&$.mimeType===ie.type&&!($.width>T||$.height>R||$.minWidth>T||$.minHeight>R||$.maxWidth<T||$.maxHeight<R))V=ie;else{var Y=new Date;V.lastModified=Y.getTime(),V.lastModifiedDate=Y,V.name=ie.name,V.name&&V.type!==ie.type&&(V.name=V.name.replace(Rt,oe(V.type)))}else V=ie;this.result=V,$.success&&$.success.call(this,V)}},{key:"fail",value:function(k){var T=this.options;if(T.error)T.error.call(this,k);else throw k}},{key:"abort",value:function(){this.aborted||(this.aborted=!0,this.reader?this.reader.abort():this.image.complete?this.fail(new Error("The compression process has been aborted.")):(this.image.onload=null,this.image.onabort()))}}],[{key:"noConflict",value:function(){return window.Compressor=he,F}},{key:"setDefaults",value:function(k){s(g,k)}}]),F}();return X})});var fy=j((Uu,Wu)=>{((i,e)=>{typeof define=="function"&&define.amd?define([],e):typeof Wu=="object"&&typeof Uu<"u"?Wu.exports=e():i.Papa=e()})(Uu,function i(){var e=typeof self<"u"?self:typeof window<"u"?window:e!==void 0?e:{},t,n=!e.document&&!!e.postMessage,r=e.IS_PAPA_WORKER||!1,o={},s=0,a={};function l(b){this._handle=null,this._finished=!1,this._completed=!1,this._halted=!1,this._input=null,this._baseIndex=0,this._partialLine="",this._rowCount=0,this._start=0,this._nextChunk=null,this.isFirstChunk=!0,this._completeResults={data:[],errors:[],meta:{}},function(w){var S=de(w);S.chunkSize=parseInt(S.chunkSize),w.step||w.chunk||(S.chunkSize=null),this._handle=new h(S),(this._handle.streamer=this)._config=S}.call(this,b),this.parseChunk=function(w,S){var A=parseInt(this._config.skipFirstNLines)||0;if(this.isFirstChunk&&0<A){let K=this._config.newline;K||(L=this._config.quoteChar||'"',K=this._handle.guessLineEndings(w,L)),w=[...w.split(K).slice(A)].join(K)}this.isFirstChunk&&ee(this._config.beforeFirstChunk)&&(L=this._config.beforeFirstChunk(w))!==void 0&&(w=L),this.isFirstChunk=!1,this._halted=!1;var A=this._partialLine+w,L=(this._partialLine="",this._handle.parse(A,this._baseIndex,!this._finished));if(!this._handle.paused()&&!this._handle.aborted()){if(w=L.meta.cursor,A=(this._finished||(this._partialLine=A.substring(w-this._baseIndex),this._baseIndex=w),L&&L.data&&(this._rowCount+=L.data.length),this._finished||this._config.preview&&this._rowCount>=this._config.preview),r)e.postMessage({results:L,workerId:a.WORKER_ID,finished:A});else if(ee(this._config.chunk)&&!S){if(this._config.chunk(L,this._handle),this._handle.paused()||this._handle.aborted())return void(this._halted=!0);this._completeResults=L=void 0}return this._config.step||this._config.chunk||(this._completeResults.data=this._completeResults.data.concat(L.data),this._completeResults.errors=this._completeResults.errors.concat(L.errors),this._completeResults.meta=L.meta),this._completed||!A||!ee(this._config.complete)||L&&L.meta.aborted||(this._config.complete(this._completeResults,this._input),this._completed=!0),A||L&&L.meta.paused||this._nextChunk(),L}this._halted=!0},this._sendError=function(w){ee(this._config.error)?this._config.error(w):r&&this._config.error&&e.postMessage({workerId:a.WORKER_ID,error:w,finished:!1})}}function c(b){var w;(b=b||{}).chunkSize||(b.chunkSize=a.RemoteChunkSize),l.call(this,b),this._nextChunk=n?function(){this._readChunk(),this._chunkLoaded()}:function(){this._readChunk()},this.stream=function(S){this._input=S,this._nextChunk()},this._readChunk=function(){if(this._finished)this._chunkLoaded();else{if(w=new XMLHttpRequest,this._config.withCredentials&&(w.withCredentials=this._config.withCredentials),n||(w.onload=oe(this._chunkLoaded,this),w.onerror=oe(this._chunkError,this)),w.open(this._config.downloadRequestBody?"POST":"GET",this._input,!n),this._config.downloadRequestHeaders){var S,A=this._config.downloadRequestHeaders;for(S in A)w.setRequestHeader(S,A[S])}var L;this._config.chunkSize&&(L=this._start+this._config.chunkSize-1,w.setRequestHeader("Range","bytes="+this._start+"-"+L));try{w.send(this._config.downloadRequestBody)}catch(K){this._chunkError(K.message)}n&&w.status===0&&this._chunkError()}},this._chunkLoaded=function(){w.readyState===4&&(w.status<200||400<=w.status?this._chunkError():(this._start+=this._config.chunkSize||w.responseText.length,this._finished=!this._config.chunkSize||this._start>=(S=>(S=S.getResponseHeader("Content-Range"))!==null?parseInt(S.substring(S.lastIndexOf("/")+1)):-1)(w),this.parseChunk(w.responseText)))},this._chunkError=function(S){S=w.statusText||S,this._sendError(new Error(S))}}function d(b){(b=b||{}).chunkSize||(b.chunkSize=a.LocalChunkSize),l.call(this,b);var w,S,A=typeof FileReader<"u";this.stream=function(L){this._input=L,S=L.slice||L.webkitSlice||L.mozSlice,A?((w=new FileReader).onload=oe(this._chunkLoaded,this),w.onerror=oe(this._chunkError,this)):w=new FileReaderSync,this._nextChunk()},this._nextChunk=function(){this._finished||this._config.preview&&!(this._rowCount<this._config.preview)||this._readChunk()},this._readChunk=function(){var L=this._input,K=(this._config.chunkSize&&(K=Math.min(this._start+this._config.chunkSize,this._input.size),L=S.call(L,this._start,K)),w.readAsText(L,this._config.encoding));A||this._chunkLoaded({target:{result:K}})},this._chunkLoaded=function(L){this._start+=this._config.chunkSize,this._finished=!this._config.chunkSize||this._start>=this._input.size,this.parseChunk(L.target.result)},this._chunkError=function(){this._sendError(w.error)}}function u(b){var w;l.call(this,b=b||{}),this.stream=function(S){return w=S,this._nextChunk()},this._nextChunk=function(){var S,A;if(!this._finished)return S=this._config.chunkSize,w=S?(A=w.substring(0,S),w.substring(S)):(A=w,""),this._finished=!w,this.parseChunk(A)}}function g(b){l.call(this,b=b||{});var w=[],S=!0,A=!1;this.pause=function(){l.prototype.pause.apply(this,arguments),this._input.pause()},this.resume=function(){l.prototype.resume.apply(this,arguments),this._input.resume()},this.stream=function(L){this._input=L,this._input.on("data",this._streamData),this._input.on("end",this._streamEnd),this._input.on("error",this._streamError)},this._checkIsFinished=function(){A&&w.length===1&&(this._finished=!0)},this._nextChunk=function(){this._checkIsFinished(),w.length?this.parseChunk(w.shift()):S=!0},this._streamData=oe(function(L){try{w.push(typeof L=="string"?L:L.toString(this._config.encoding)),S&&(S=!1,this._checkIsFinished(),this.parseChunk(w.shift()))}catch(K){this._streamError(K)}},this),this._streamError=oe(function(L){this._streamCleanUp(),this._sendError(L)},this),this._streamEnd=oe(function(){this._streamCleanUp(),A=!0,this._streamData("")},this),this._streamCleanUp=oe(function(){this._input.removeListener("data",this._streamData),this._input.removeListener("end",this._streamEnd),this._input.removeListener("error",this._streamError)},this)}function h(b){var w,S,A,L,K=Math.pow(2,53),ye=-K,Ne=/^\s*-?(\d+\.?|\.\d+|\d+\.\d+)([eE][-+]?\d+)?\s*$/,Pe=/^((\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z)))$/,Se=this,Q=0,ze=0,te=!1,Rt=!1,he=[],X={data:[],errors:[],meta:{}};function F(R){return b.skipEmptyLines==="greedy"?R.join("").trim()==="":R.length===1&&R[0].length===0}function C(){if(X&&A&&(T("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+a.DefaultDelimiter+"'"),A=!1),b.skipEmptyLines&&(X.data=X.data.filter(function($){return!F($)})),k()){let $=function(Y,ne){ee(b.transformHeader)&&(Y=b.transformHeader(Y,ne)),he.push(Y)};var G=$;if(X)if(Array.isArray(X.data[0])){for(var R=0;k()&&R<X.data.length;R++)X.data[R].forEach($);X.data.splice(0,1)}else X.data.forEach($)}function V($,Y){for(var ne=b.header?{}:[],re=0;re<$.length;re++){var ge=re,Z=$[re],Z=((J,ve)=>(be=>(b.dynamicTypingFunction&&b.dynamicTyping[be]===void 0&&(b.dynamicTyping[be]=b.dynamicTypingFunction(be)),(b.dynamicTyping[be]||b.dynamicTyping)===!0))(J)?ve==="true"||ve==="TRUE"||ve!=="false"&&ve!=="FALSE"&&((be=>{if(Ne.test(be)&&(be=parseFloat(be),ye<be&&be<K))return 1})(ve)?parseFloat(ve):Pe.test(ve)?new Date(ve):ve===""?null:ve):ve)(ge=b.header?re>=he.length?"__parsed_extra":he[re]:ge,Z=b.transform?b.transform(Z,ge):Z);ge==="__parsed_extra"?(ne[ge]=ne[ge]||[],ne[ge].push(Z)):ne[ge]=Z}return b.header&&(re>he.length?T("FieldMismatch","TooManyFields","Too many fields: expected "+he.length+" fields but parsed "+re,ze+Y):re<he.length&&T("FieldMismatch","TooFewFields","Too few fields: expected "+he.length+" fields but parsed "+re,ze+Y)),ne}var ie;X&&(b.header||b.dynamicTyping||b.transform)&&(ie=1,!X.data.length||Array.isArray(X.data[0])?(X.data=X.data.map(V),ie=X.data.length):X.data=V(X.data,0),b.header&&X.meta&&(X.meta.fields=he),ze+=ie)}function k(){return b.header&&he.length===0}function T(R,V,ie,G){R={type:R,code:V,message:ie},G!==void 0&&(R.row=G),X.errors.push(R)}ee(b.step)&&(L=b.step,b.step=function(R){X=R,k()?C():(C(),X.data.length!==0&&(Q+=R.data.length,b.preview&&Q>b.preview?S.abort():(X.data=X.data[0],L(X,Se))))}),this.parse=function(R,V,ie){var G=b.quoteChar||'"',G=(b.newline||(b.newline=this.guessLineEndings(R,G)),A=!1,b.delimiter?ee(b.delimiter)&&(b.delimiter=b.delimiter(R),X.meta.delimiter=b.delimiter):((G=(($,Y,ne,re,ge)=>{var Z,J,ve,be;ge=ge||[","," ","|",";",a.RECORD_SEP,a.UNIT_SEP];for(var xt=0;xt<ge.length;xt++){for(var Mt,je=ge[xt],Ct=0,Te=0,st=0,at=(ve=void 0,new E({comments:re,delimiter:je,newline:Y,preview:10}).parse($)),Re=0;Re<at.data.length;Re++)ne&&F(at.data[Re])?st++:(Mt=at.data[Re].length,Te+=Mt,ve===void 0?ve=Mt:0<Mt&&(Ct+=Math.abs(Mt-ve),ve=Mt));0<at.data.length&&(Te/=at.data.length-st),(J===void 0||Ct<=J)&&(be===void 0||be<Te)&&1.99<Te&&(J=Ct,Z=je,be=Te)}return{successful:!!(b.delimiter=Z),bestDelimiter:Z}})(R,b.newline,b.skipEmptyLines,b.comments,b.delimitersToGuess)).successful?b.delimiter=G.bestDelimiter:(A=!0,b.delimiter=a.DefaultDelimiter),X.meta.delimiter=b.delimiter),de(b));return b.preview&&b.header&&G.preview++,w=R,S=new E(G),X=S.parse(w,V,ie),C(),te?{meta:{paused:!0}}:X||{meta:{paused:!1}}},this.paused=function(){return te},this.pause=function(){te=!0,S.abort(),w=ee(b.chunk)?"":w.substring(S.getCharIndex())},this.resume=function(){Se.streamer._halted?(te=!1,Se.streamer.parseChunk(w,!0)):setTimeout(Se.resume,3)},this.aborted=function(){return Rt},this.abort=function(){Rt=!0,S.abort(),X.meta.aborted=!0,ee(b.complete)&&b.complete(X),w=""},this.guessLineEndings=function($,G){$=$.substring(0,1048576);var G=new RegExp(_(G)+"([^]*?)"+_(G),"gm"),ie=($=$.replace(G,"")).split("\r"),G=$.split(`
|
|
1
|
+
import{A as Wp,B as Ms,C as $p,D as qp,E as El,F as Gp,G as Xp,a as Cp,b as Ds,d as Is,e as Mr,f as _l,g as Ap,h as Bp,i as Ii,j as Np,k as Ar,l as wl,m as xl,n as We,o as zp,p as Os,q as ke,r as Fs,s as Lp,t as Hp,u as Sl,v as Rs,w as jp,x as Pl,y as Vp,z as Up}from"./chunk-R6SFZQFG.js";import{a as As,b as _i,c as oi}from"./chunk-JICIBBA5.js";import{B as nt,C as Dt,D as ys,E as vs,F as bs,G as Yi,H as ht,I as rt,J as $n,K as _s,L as ws,M as xs,N as Cs,O as Ss,P as Ps,R as Pp,S as Ep,T as Dp,U as kp,V as Tp,W as Es,X as Ip,Z as Op,_ as Ts,a as vi,b as wp,ba as bi,d as xp,ga as Cl,l as ms,n as Un,q as vl,r as Je,s as pt,t as Sp,u as Wn,v as tt,w as lt,y as it,z as gs}from"./chunk-PY67MF7G.js";import{$b as ls,Aa as Ir,Ac as Ae,Ad as Fp,Bb as Or,Bd as ks,C as Le,Ca as pe,Cd as Rp,D as sp,Da as z,Db as hp,Ec as Ue,Ed as Rr,Fb as ns,Fc as ni,Fd as Mp,Gb as rs,Gc as Ti,H as mi,Ha as fe,Hc as gl,Hd as bl,I as Kt,Ia as Nt,Ic as me,J as es,Ja as ln,Jb as q,Ka as ts,Kb as pl,Mb as Fr,N as ap,O as rl,Oa as up,P as sn,Pb as le,Pc as mp,Qb as fp,Ra as gi,Rb as os,S as an,Sa as se,Sb as Lt,Sc as cn,Ta as ae,Tb as P,U as Qt,Uc as Gi,Vb as jn,Wa as Xe,Wb as ss,Xa as Ye,Xc as gp,Y as ol,Yc as yl,Z as Tr,Za as zt,Zb as Ce,_a as Pt,_b as as,a as v,aa as lp,ab as ul,ac as Zt,b as D,bb as Et,bc as Jt,c as Ln,ca as sl,cc as f,cd as mt,d as j,dc as m,e as De,ea as cp,ec as ue,fa as al,fc as hl,g as B,gc as fl,h as Hn,hb as pp,hd as hs,i as Qo,ic as Ie,j as Zo,jd as Xi,k as Jo,l as $i,lc as W,ld as Vn,mc as O,md as yp,n as St,nc as cs,oa as ll,oc as ds,od as vp,pd as bp,q as et,qa as cl,qc as us,qd as fs,ra as qi,rc as yi,rd as _p,sa as dl,sc as ei,sd as ri,ta as xe,tc as ti,ub as is,uc as ml,vc as x,wa as dp,wc as I,xa as Ve,xc as ii,ya as Bt,yb as y,yc as ps,zb as He,zc as _e}from"./chunk-UZEILQYY.js";var Ht=j(Dl=>{"use strict";Object.defineProperty(Dl,"__esModule",{value:!0});function Ly(i,e){if(!(i instanceof e))throw new TypeError("Cannot call a class as a function")}var Hy=function i(e,t){Ly(this,i),this.data=e,this.text=t.text||e,this.options=t};Dl.default=Hy});var Qp=j(Bs=>{"use strict";Object.defineProperty(Bs,"__esModule",{value:!0});Bs.CODE39=void 0;var jy=function(){function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),e}}(),Vy=Ht(),Uy=Wy(Vy);function Wy(i){return i&&i.__esModule?i:{default:i}}function $y(i,e){if(!(i instanceof e))throw new TypeError("Cannot call a class as a function")}function qy(i,e){if(!i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:i}function Gy(i,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);i.prototype=Object.create(e&&e.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(i,e):i.__proto__=e)}var Xy=function(i){Gy(e,i);function e(t,n){return $y(this,e),t=t.toUpperCase(),n.mod43&&(t+=Qy(Zy(t))),qy(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n))}return jy(e,[{key:"encode",value:function(){for(var n=kl("*"),r=0;r<this.data.length;r++)n+=kl(this.data[r])+"0";return n+=kl("*"),{data:n,text:this.text}}},{key:"valid",value:function(){return this.data.search(/^[0-9A-Z\-\.\ \$\/\+\%]+$/)!==-1}}]),e}(Uy.default),Yp=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","-","."," ","$","/","+","%","*"],Yy=[20957,29783,23639,30485,20951,29813,23669,20855,29789,23645,29975,23831,30533,22295,30149,24005,21623,29981,23837,22301,30023,23879,30545,22343,30161,24017,21959,30065,23921,22385,29015,18263,29141,17879,29045,18293,17783,29021,18269,17477,17489,17681,20753,35770];function kl(i){return Ky(Kp(i))}function Ky(i){return Yy[i].toString(2)}function Qy(i){return Yp[i]}function Kp(i){return Yp.indexOf(i)}function Zy(i){for(var e=0,t=0;t<i.length;t++)e+=Kp(i[t]);return e=e%43,e}Bs.CODE39=Xy});var qn=j($e=>{"use strict";Object.defineProperty($e,"__esModule",{value:!0});var Br;function Tl(i,e,t){return e in i?Object.defineProperty(i,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):i[e]=t,i}var Zp=$e.SET_A=0,Jp=$e.SET_B=1,eh=$e.SET_C=2,Ck=$e.SHIFT=98,Jy=$e.START_A=103,ev=$e.START_B=104,tv=$e.START_C=105,Sk=$e.MODULO=103,Pk=$e.STOP=106,Ek=$e.FNC1=207,Dk=$e.SET_BY_CODE=(Br={},Tl(Br,Jy,Zp),Tl(Br,ev,Jp),Tl(Br,tv,eh),Br),kk=$e.SWAP={101:Zp,100:Jp,99:eh},Tk=$e.A_START_CHAR="\xD0",Ik=$e.B_START_CHAR="\xD1",Ok=$e.C_START_CHAR="\xD2",Fk=$e.A_CHARS="[\0-_\xC8-\xCF]",Rk=$e.B_CHARS="[ -\x7F\xC8-\xCF]",Mk=$e.C_CHARS="(\xCF*[0-9]{2}\xCF*)",Ak=$e.BARS=[11011001100,11001101100,11001100110,10010011e3,10010001100,10001001100,10011001e3,10011000100,10001100100,11001001e3,11001000100,11000100100,10110011100,10011011100,10011001110,10111001100,10011101100,10011100110,11001110010,11001011100,11001001110,11011100100,11001110100,11101101110,11101001100,11100101100,11100100110,11101100100,11100110100,11100110010,11011011e3,11011000110,11000110110,10100011e3,10001011e3,10001000110,10110001e3,10001101e3,10001100010,11010001e3,11000101e3,11000100010,10110111e3,10110001110,10001101110,10111011e3,10111000110,10001110110,11101110110,11010001110,11000101110,11011101e3,11011100010,11011101110,11101011e3,11101000110,11100010110,11101101e3,11101100010,11100011010,11101111010,11001000010,11110001010,1010011e4,10100001100,1001011e4,10010000110,10000101100,10000100110,1011001e4,10110000100,1001101e4,10011000010,10000110100,10000110010,11000010010,1100101e4,11110111010,11000010100,10001111010,10100111100,10010111100,10010011110,10111100100,10011110100,10011110010,11110100100,11110010100,11110010010,11011011110,11011110110,11110110110,10101111e3,10100011110,10001011110,10111101e3,10111100010,11110101e3,11110100010,10111011110,10111101110,11101011110,11110101110,11010000100,1101001e4,11010011100,1100011101011]});var Nr=j(Il=>{"use strict";Object.defineProperty(Il,"__esModule",{value:!0});var iv=function(){function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),e}}(),nv=Ht(),rv=ov(nv),jt=qn();function ov(i){return i&&i.__esModule?i:{default:i}}function sv(i,e){if(!(i instanceof e))throw new TypeError("Cannot call a class as a function")}function av(i,e){if(!i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:i}function lv(i,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);i.prototype=Object.create(e&&e.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(i,e):i.__proto__=e)}var cv=function(i){lv(e,i);function e(t,n){sv(this,e);var r=av(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t.substring(1),n));return r.bytes=t.split("").map(function(o){return o.charCodeAt(0)}),r}return iv(e,[{key:"valid",value:function(){return/^[\x00-\x7F\xC8-\xD3]+$/.test(this.data)}},{key:"encode",value:function(){var n=this.bytes,r=n.shift()-105,o=jt.SET_BY_CODE[r];if(o===void 0)throw new RangeError("The encoding does not start with a start character.");this.shouldEncodeAsEan128()===!0&&n.unshift(jt.FNC1);var s=e.next(n,1,o);return{text:this.text===this.data?this.text.replace(/[^\x20-\x7E]/g,""):this.text,data:e.getBar(r)+s.result+e.getBar((s.checksum+r)%jt.MODULO)+e.getBar(jt.STOP)}}},{key:"shouldEncodeAsEan128",value:function(){var n=this.options.ean128||!1;return typeof n=="string"&&(n=n.toLowerCase()==="true"),n}}],[{key:"getBar",value:function(n){return jt.BARS[n]?jt.BARS[n].toString():""}},{key:"correctIndex",value:function(n,r){if(r===jt.SET_A){var o=n.shift();return o<32?o+64:o-32}else return r===jt.SET_B?n.shift()-32:(n.shift()-48)*10+n.shift()-48}},{key:"next",value:function(n,r,o){if(!n.length)return{result:"",checksum:0};var s=void 0,a=void 0;if(n[0]>=200){a=n.shift()-105;var l=jt.SWAP[a];l!==void 0?s=e.next(n,r+1,l):((o===jt.SET_A||o===jt.SET_B)&&a===jt.SHIFT&&(n[0]=o===jt.SET_A?n[0]>95?n[0]-96:n[0]:n[0]<32?n[0]+96:n[0]),s=e.next(n,r+1,o))}else a=e.correctIndex(n,o),s=e.next(n,r+1,o);var c=e.getBar(a),d=a*r;return{result:c+s.result,checksum:d+s.checksum}}}]),e}(rv.default);Il.default=cv});var oh=j(Fl=>{"use strict";Object.defineProperty(Fl,"__esModule",{value:!0});var Ki=qn(),th=function(e){return e.match(new RegExp("^"+Ki.A_CHARS+"*"))[0].length},ih=function(e){return e.match(new RegExp("^"+Ki.B_CHARS+"*"))[0].length},nh=function(e){return e.match(new RegExp("^"+Ki.C_CHARS+"*"))[0]};function Ol(i,e){var t=e?Ki.A_CHARS:Ki.B_CHARS,n=i.match(new RegExp("^("+t+"+?)(([0-9]{2}){2,})([^0-9]|$)"));if(n)return n[1]+"\xCC"+rh(i.substring(n[1].length));var r=i.match(new RegExp("^"+t+"+"))[0];return r.length===i.length?i:r+String.fromCharCode(e?205:206)+Ol(i.substring(r.length),!e)}function rh(i){var e=nh(i),t=e.length;if(t===i.length)return i;i=i.substring(t);var n=th(i)>=ih(i);return e+String.fromCharCode(n?206:205)+Ol(i,n)}Fl.default=function(i){var e=void 0,t=nh(i).length;if(t>=2)e=Ki.C_START_CHAR+rh(i);else{var n=th(i)>ih(i);e=(n?Ki.A_START_CHAR:Ki.B_START_CHAR)+Ol(i,n)}return e.replace(/[\xCD\xCE]([^])[\xCD\xCE]/,function(r,o){return"\xCB"+o})}});var ah=j(Ml=>{"use strict";Object.defineProperty(Ml,"__esModule",{value:!0});var dv=Nr(),uv=sh(dv),pv=oh(),hv=sh(pv);function sh(i){return i&&i.__esModule?i:{default:i}}function fv(i,e){if(!(i instanceof e))throw new TypeError("Cannot call a class as a function")}function Rl(i,e){if(!i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:i}function mv(i,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);i.prototype=Object.create(e&&e.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(i,e):i.__proto__=e)}var gv=function(i){mv(e,i);function e(t,n){if(fv(this,e),/^[\x00-\x7F\xC8-\xD3]+$/.test(t))var r=Rl(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,(0,hv.default)(t),n));else var r=Rl(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return Rl(r)}return e}(uv.default);Ml.default=gv});var ch=j(Al=>{"use strict";Object.defineProperty(Al,"__esModule",{value:!0});var yv=function(){function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),e}}(),vv=Nr(),bv=_v(vv),lh=qn();function _v(i){return i&&i.__esModule?i:{default:i}}function wv(i,e){if(!(i instanceof e))throw new TypeError("Cannot call a class as a function")}function xv(i,e){if(!i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:i}function Cv(i,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);i.prototype=Object.create(e&&e.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(i,e):i.__proto__=e)}var Sv=function(i){Cv(e,i);function e(t,n){return wv(this,e),xv(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,lh.A_START_CHAR+t,n))}return yv(e,[{key:"valid",value:function(){return new RegExp("^"+lh.A_CHARS+"+$").test(this.data)}}]),e}(bv.default);Al.default=Sv});var uh=j(Bl=>{"use strict";Object.defineProperty(Bl,"__esModule",{value:!0});var Pv=function(){function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),e}}(),Ev=Nr(),Dv=kv(Ev),dh=qn();function kv(i){return i&&i.__esModule?i:{default:i}}function Tv(i,e){if(!(i instanceof e))throw new TypeError("Cannot call a class as a function")}function Iv(i,e){if(!i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:i}function Ov(i,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);i.prototype=Object.create(e&&e.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(i,e):i.__proto__=e)}var Fv=function(i){Ov(e,i);function e(t,n){return Tv(this,e),Iv(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,dh.B_START_CHAR+t,n))}return Pv(e,[{key:"valid",value:function(){return new RegExp("^"+dh.B_CHARS+"+$").test(this.data)}}]),e}(Dv.default);Bl.default=Fv});var hh=j(Nl=>{"use strict";Object.defineProperty(Nl,"__esModule",{value:!0});var Rv=function(){function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),e}}(),Mv=Nr(),Av=Bv(Mv),ph=qn();function Bv(i){return i&&i.__esModule?i:{default:i}}function Nv(i,e){if(!(i instanceof e))throw new TypeError("Cannot call a class as a function")}function zv(i,e){if(!i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:i}function Lv(i,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);i.prototype=Object.create(e&&e.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(i,e):i.__proto__=e)}var Hv=function(i){Lv(e,i);function e(t,n){return Nv(this,e),zv(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,ph.C_START_CHAR+t,n))}return Rv(e,[{key:"valid",value:function(){return new RegExp("^"+ph.C_CHARS+"+$").test(this.data)}}]),e}(Av.default);Nl.default=Hv});var fh=j(wi=>{"use strict";Object.defineProperty(wi,"__esModule",{value:!0});wi.CODE128C=wi.CODE128B=wi.CODE128A=wi.CODE128=void 0;var jv=ah(),Vv=Ns(jv),Uv=ch(),Wv=Ns(Uv),$v=uh(),qv=Ns($v),Gv=hh(),Xv=Ns(Gv);function Ns(i){return i&&i.__esModule?i:{default:i}}wi.CODE128=Vv.default;wi.CODE128A=Wv.default;wi.CODE128B=qv.default;wi.CODE128C=Xv.default});var Gn=j(Qi=>{"use strict";Object.defineProperty(Qi,"__esModule",{value:!0});var Wk=Qi.SIDE_BIN="101",$k=Qi.MIDDLE_BIN="01010",qk=Qi.BINARIES={L:["0001101","0011001","0010011","0111101","0100011","0110001","0101111","0111011","0110111","0001011"],G:["0100111","0110011","0011011","0100001","0011101","0111001","0000101","0010001","0001001","0010111"],R:["1110010","1100110","1101100","1000010","1011100","1001110","1010000","1000100","1001000","1110100"],O:["0001101","0011001","0010011","0111101","0100011","0110001","0101111","0111011","0110111","0001011"],E:["0100111","0110011","0011011","0100001","0011101","0111001","0000101","0010001","0001001","0010111"]},Gk=Qi.EAN2_STRUCTURE=["LL","LG","GL","GG"],Xk=Qi.EAN5_STRUCTURE=["GGLLL","GLGLL","GLLGL","GLLLG","LGGLL","LLGGL","LLLGG","LGLGL","LGLLG","LLGLG"],Yk=Qi.EAN13_STRUCTURE=["LLLLLL","LLGLGG","LLGGLG","LLGGGL","LGLLGG","LGGLLG","LGGGLL","LGLGLG","LGLGGL","LGGLGL"]});var Xn=j(zl=>{"use strict";Object.defineProperty(zl,"__esModule",{value:!0});var Yv=Gn(),Kv=function(e,t,n){var r=e.split("").map(function(s,a){return Yv.BINARIES[t[a]]}).map(function(s,a){return s?s[e[a]]:""});if(n){var o=e.length-1;r=r.map(function(s,a){return a<o?s+n:s})}return r.join("")};zl.default=Kv});var Hl=j(Ll=>{"use strict";Object.defineProperty(Ll,"__esModule",{value:!0});var Qv=function(){function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),e}}(),Yn=Gn(),Zv=Xn(),mh=gh(Zv),Jv=Ht(),eb=gh(Jv);function gh(i){return i&&i.__esModule?i:{default:i}}function tb(i,e){if(!(i instanceof e))throw new TypeError("Cannot call a class as a function")}function ib(i,e){if(!i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:i}function nb(i,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);i.prototype=Object.create(e&&e.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(i,e):i.__proto__=e)}var rb=function(i){nb(e,i);function e(t,n){tb(this,e);var r=ib(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return r.fontSize=!n.flat&&n.fontSize>n.width*10?n.width*10:n.fontSize,r.guardHeight=n.height+r.fontSize/2+n.textMargin,r}return Qv(e,[{key:"encode",value:function(){return this.options.flat?this.encodeFlat():this.encodeGuarded()}},{key:"leftText",value:function(n,r){return this.text.substr(n,r)}},{key:"leftEncode",value:function(n,r){return(0,mh.default)(n,r)}},{key:"rightText",value:function(n,r){return this.text.substr(n,r)}},{key:"rightEncode",value:function(n,r){return(0,mh.default)(n,r)}},{key:"encodeGuarded",value:function(){var n={fontSize:this.fontSize},r={height:this.guardHeight};return[{data:Yn.SIDE_BIN,options:r},{data:this.leftEncode(),text:this.leftText(),options:n},{data:Yn.MIDDLE_BIN,options:r},{data:this.rightEncode(),text:this.rightText(),options:n},{data:Yn.SIDE_BIN,options:r}]}},{key:"encodeFlat",value:function(){var n=[Yn.SIDE_BIN,this.leftEncode(),Yn.MIDDLE_BIN,this.rightEncode(),Yn.SIDE_BIN];return{data:n.join(""),text:this.text}}}]),e}(eb.default);Ll.default=rb});var vh=j(jl=>{"use strict";Object.defineProperty(jl,"__esModule",{value:!0});var ob=function(){function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),e}}(),zr=function i(e,t,n){e===null&&(e=Function.prototype);var r=Object.getOwnPropertyDescriptor(e,t);if(r===void 0){var o=Object.getPrototypeOf(e);return o===null?void 0:i(o,t,n)}else{if("value"in r)return r.value;var s=r.get;return s===void 0?void 0:s.call(n)}},sb=Gn(),ab=Hl(),lb=cb(ab);function cb(i){return i&&i.__esModule?i:{default:i}}function db(i,e){if(!(i instanceof e))throw new TypeError("Cannot call a class as a function")}function ub(i,e){if(!i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:i}function pb(i,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);i.prototype=Object.create(e&&e.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(i,e):i.__proto__=e)}var yh=function(e){var t=e.substr(0,12).split("").map(function(n){return+n}).reduce(function(n,r,o){return o%2?n+r*3:n+r},0);return(10-t%10)%10},hb=function(i){pb(e,i);function e(t,n){db(this,e),t.search(/^[0-9]{12}$/)!==-1&&(t+=yh(t));var r=ub(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return r.lastChar=n.lastChar,r}return ob(e,[{key:"valid",value:function(){return this.data.search(/^[0-9]{13}$/)!==-1&&+this.data[12]===yh(this.data)}},{key:"leftText",value:function(){return zr(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"leftText",this).call(this,1,6)}},{key:"leftEncode",value:function(){var n=this.data.substr(1,6),r=sb.EAN13_STRUCTURE[this.data[0]];return zr(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"leftEncode",this).call(this,n,r)}},{key:"rightText",value:function(){return zr(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"rightText",this).call(this,7,6)}},{key:"rightEncode",value:function(){var n=this.data.substr(7,6);return zr(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"rightEncode",this).call(this,n,"RRRRRR")}},{key:"encodeGuarded",value:function(){var n=zr(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"encodeGuarded",this).call(this);return this.options.displayValue&&(n.unshift({data:"000000000000",text:this.text.substr(0,1),options:{textAlign:"left",fontSize:this.fontSize}}),this.options.lastChar&&(n.push({data:"00"}),n.push({data:"00000",text:this.options.lastChar,options:{fontSize:this.fontSize}}))),n}}]),e}(lb.default);jl.default=hb});var _h=j(Vl=>{"use strict";Object.defineProperty(Vl,"__esModule",{value:!0});var fb=function(){function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),e}}(),zs=function i(e,t,n){e===null&&(e=Function.prototype);var r=Object.getOwnPropertyDescriptor(e,t);if(r===void 0){var o=Object.getPrototypeOf(e);return o===null?void 0:i(o,t,n)}else{if("value"in r)return r.value;var s=r.get;return s===void 0?void 0:s.call(n)}},mb=Hl(),gb=yb(mb);function yb(i){return i&&i.__esModule?i:{default:i}}function vb(i,e){if(!(i instanceof e))throw new TypeError("Cannot call a class as a function")}function bb(i,e){if(!i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:i}function _b(i,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);i.prototype=Object.create(e&&e.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(i,e):i.__proto__=e)}var bh=function(e){var t=e.substr(0,7).split("").map(function(n){return+n}).reduce(function(n,r,o){return o%2?n+r:n+r*3},0);return(10-t%10)%10},wb=function(i){_b(e,i);function e(t,n){return vb(this,e),t.search(/^[0-9]{7}$/)!==-1&&(t+=bh(t)),bb(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n))}return fb(e,[{key:"valid",value:function(){return this.data.search(/^[0-9]{8}$/)!==-1&&+this.data[7]===bh(this.data)}},{key:"leftText",value:function(){return zs(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"leftText",this).call(this,0,4)}},{key:"leftEncode",value:function(){var n=this.data.substr(0,4);return zs(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"leftEncode",this).call(this,n,"LLLL")}},{key:"rightText",value:function(){return zs(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"rightText",this).call(this,4,4)}},{key:"rightEncode",value:function(){var n=this.data.substr(4,4);return zs(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"rightEncode",this).call(this,n,"RRRR")}}]),e}(gb.default);Vl.default=wb});var xh=j(Ul=>{"use strict";Object.defineProperty(Ul,"__esModule",{value:!0});var xb=function(){function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),e}}(),Cb=Gn(),Sb=Xn(),Pb=wh(Sb),Eb=Ht(),Db=wh(Eb);function wh(i){return i&&i.__esModule?i:{default:i}}function kb(i,e){if(!(i instanceof e))throw new TypeError("Cannot call a class as a function")}function Tb(i,e){if(!i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:i}function Ib(i,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);i.prototype=Object.create(e&&e.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(i,e):i.__proto__=e)}var Ob=function(e){var t=e.split("").map(function(n){return+n}).reduce(function(n,r,o){return o%2?n+r*9:n+r*3},0);return t%10},Fb=function(i){Ib(e,i);function e(t,n){return kb(this,e),Tb(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n))}return xb(e,[{key:"valid",value:function(){return this.data.search(/^[0-9]{5}$/)!==-1}},{key:"encode",value:function(){var n=Cb.EAN5_STRUCTURE[Ob(this.data)];return{data:"1011"+(0,Pb.default)(this.data,n,"01"),text:this.text}}}]),e}(Db.default);Ul.default=Fb});var Sh=j(Wl=>{"use strict";Object.defineProperty(Wl,"__esModule",{value:!0});var Rb=function(){function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),e}}(),Mb=Gn(),Ab=Xn(),Bb=Ch(Ab),Nb=Ht(),zb=Ch(Nb);function Ch(i){return i&&i.__esModule?i:{default:i}}function Lb(i,e){if(!(i instanceof e))throw new TypeError("Cannot call a class as a function")}function Hb(i,e){if(!i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:i}function jb(i,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);i.prototype=Object.create(e&&e.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(i,e):i.__proto__=e)}var Vb=function(i){jb(e,i);function e(t,n){return Lb(this,e),Hb(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n))}return Rb(e,[{key:"valid",value:function(){return this.data.search(/^[0-9]{2}$/)!==-1}},{key:"encode",value:function(){var n=Mb.EAN2_STRUCTURE[parseInt(this.data)%4];return{data:"1011"+(0,Bb.default)(this.data,n,"01"),text:this.text}}}]),e}(zb.default);Wl.default=Vb});var ql=j(Ls=>{"use strict";Object.defineProperty(Ls,"__esModule",{value:!0});var Ub=function(){function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),e}}();Ls.checksum=$l;var Wb=Xn(),Kn=Ph(Wb),$b=Ht(),qb=Ph($b);function Ph(i){return i&&i.__esModule?i:{default:i}}function Gb(i,e){if(!(i instanceof e))throw new TypeError("Cannot call a class as a function")}function Xb(i,e){if(!i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:i}function Yb(i,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);i.prototype=Object.create(e&&e.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(i,e):i.__proto__=e)}var Kb=function(i){Yb(e,i);function e(t,n){Gb(this,e),t.search(/^[0-9]{11}$/)!==-1&&(t+=$l(t));var r=Xb(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return r.displayValue=n.displayValue,n.fontSize>n.width*10?r.fontSize=n.width*10:r.fontSize=n.fontSize,r.guardHeight=n.height+r.fontSize/2+n.textMargin,r}return Ub(e,[{key:"valid",value:function(){return this.data.search(/^[0-9]{12}$/)!==-1&&this.data[11]==$l(this.data)}},{key:"encode",value:function(){return this.options.flat?this.flatEncoding():this.guardedEncoding()}},{key:"flatEncoding",value:function(){var n="";return n+="101",n+=(0,Kn.default)(this.data.substr(0,6),"LLLLLL"),n+="01010",n+=(0,Kn.default)(this.data.substr(6,6),"RRRRRR"),n+="101",{data:n,text:this.text}}},{key:"guardedEncoding",value:function(){var n=[];return this.displayValue&&n.push({data:"00000000",text:this.text.substr(0,1),options:{textAlign:"left",fontSize:this.fontSize}}),n.push({data:"101"+(0,Kn.default)(this.data[0],"L"),options:{height:this.guardHeight}}),n.push({data:(0,Kn.default)(this.data.substr(1,5),"LLLLL"),text:this.text.substr(1,5),options:{fontSize:this.fontSize}}),n.push({data:"01010",options:{height:this.guardHeight}}),n.push({data:(0,Kn.default)(this.data.substr(6,5),"RRRRR"),text:this.text.substr(6,5),options:{fontSize:this.fontSize}}),n.push({data:(0,Kn.default)(this.data[11],"R")+"101",options:{height:this.guardHeight}}),this.displayValue&&n.push({data:"00000000",text:this.text.substr(11,1),options:{textAlign:"right",fontSize:this.fontSize}}),n}}]),e}(qb.default);function $l(i){var e=0,t;for(t=1;t<11;t+=2)e+=parseInt(i[t]);for(t=0;t<11;t+=2)e+=parseInt(i[t])*3;return(10-e%10)%10}Ls.default=Kb});var kh=j(Xl=>{"use strict";Object.defineProperty(Xl,"__esModule",{value:!0});var Qb=function(){function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),e}}(),Zb=Xn(),Jb=Dh(Zb),e1=Ht(),t1=Dh(e1),i1=ql();function Dh(i){return i&&i.__esModule?i:{default:i}}function n1(i,e){if(!(i instanceof e))throw new TypeError("Cannot call a class as a function")}function Gl(i,e){if(!i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:i}function r1(i,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);i.prototype=Object.create(e&&e.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(i,e):i.__proto__=e)}var o1=["XX00000XXX","XX10000XXX","XX20000XXX","XXX00000XX","XXXX00000X","XXXXX00005","XXXXX00006","XXXXX00007","XXXXX00008","XXXXX00009"],s1=[["EEEOOO","OOOEEE"],["EEOEOO","OOEOEE"],["EEOOEO","OOEEOE"],["EEOOOE","OOEEEO"],["EOEEOO","OEOOEE"],["EOOEEO","OEEOOE"],["EOOOEE","OEEEOO"],["EOEOEO","OEOEOE"],["EOEOOE","OEOEEO"],["EOOEOE","OEEOEO"]],a1=function(i){r1(e,i);function e(t,n){n1(this,e);var r=Gl(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));if(r.isValid=!1,t.search(/^[0-9]{6}$/)!==-1)r.middleDigits=t,r.upcA=Eh(t,"0"),r.text=n.text||""+r.upcA[0]+t+r.upcA[r.upcA.length-1],r.isValid=!0;else if(t.search(/^[01][0-9]{7}$/)!==-1)if(r.middleDigits=t.substring(1,t.length-1),r.upcA=Eh(r.middleDigits,t[0]),r.upcA[r.upcA.length-1]===t[t.length-1])r.isValid=!0;else return Gl(r);else return Gl(r);return r.displayValue=n.displayValue,n.fontSize>n.width*10?r.fontSize=n.width*10:r.fontSize=n.fontSize,r.guardHeight=n.height+r.fontSize/2+n.textMargin,r}return Qb(e,[{key:"valid",value:function(){return this.isValid}},{key:"encode",value:function(){return this.options.flat?this.flatEncoding():this.guardedEncoding()}},{key:"flatEncoding",value:function(){var n="";return n+="101",n+=this.encodeMiddleDigits(),n+="010101",{data:n,text:this.text}}},{key:"guardedEncoding",value:function(){var n=[];return this.displayValue&&n.push({data:"00000000",text:this.text[0],options:{textAlign:"left",fontSize:this.fontSize}}),n.push({data:"101",options:{height:this.guardHeight}}),n.push({data:this.encodeMiddleDigits(),text:this.text.substring(1,7),options:{fontSize:this.fontSize}}),n.push({data:"010101",options:{height:this.guardHeight}}),this.displayValue&&n.push({data:"00000000",text:this.text[7],options:{textAlign:"right",fontSize:this.fontSize}}),n}},{key:"encodeMiddleDigits",value:function(){var n=this.upcA[0],r=this.upcA[this.upcA.length-1],o=s1[parseInt(r)][parseInt(n)];return(0,Jb.default)(this.middleDigits,o)}}]),e}(t1.default);function Eh(i,e){for(var t=parseInt(i[i.length-1]),n=o1[t],r="",o=0,s=0;s<n.length;s++){var a=n[s];a==="X"?r+=i[o++]:r+=a}return r=""+e+r,""+r+(0,i1.checksum)(r)}Xl.default=a1});var Th=j(kt=>{"use strict";Object.defineProperty(kt,"__esModule",{value:!0});kt.UPCE=kt.UPC=kt.EAN2=kt.EAN5=kt.EAN8=kt.EAN13=void 0;var l1=vh(),c1=Qn(l1),d1=_h(),u1=Qn(d1),p1=xh(),h1=Qn(p1),f1=Sh(),m1=Qn(f1),g1=ql(),y1=Qn(g1),v1=kh(),b1=Qn(v1);function Qn(i){return i&&i.__esModule?i:{default:i}}kt.EAN13=c1.default;kt.EAN8=u1.default;kt.EAN5=h1.default;kt.EAN2=m1.default;kt.UPC=y1.default;kt.UPCE=b1.default});var Ih=j(Lr=>{"use strict";Object.defineProperty(Lr,"__esModule",{value:!0});var sT=Lr.START_BIN="1010",aT=Lr.END_BIN="11101",lT=Lr.BINARIES=["00110","10001","01001","11000","00101","10100","01100","00011","10010","01010"]});var Kl=j(Yl=>{"use strict";Object.defineProperty(Yl,"__esModule",{value:!0});var _1=function(){function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),e}}(),Hs=Ih(),w1=Ht(),x1=C1(w1);function C1(i){return i&&i.__esModule?i:{default:i}}function S1(i,e){if(!(i instanceof e))throw new TypeError("Cannot call a class as a function")}function P1(i,e){if(!i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:i}function E1(i,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);i.prototype=Object.create(e&&e.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(i,e):i.__proto__=e)}var D1=function(i){E1(e,i);function e(){return S1(this,e),P1(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return _1(e,[{key:"valid",value:function(){return this.data.search(/^([0-9]{2})+$/)!==-1}},{key:"encode",value:function(){var n=this,r=this.data.match(/.{2}/g).map(function(o){return n.encodePair(o)}).join("");return{data:Hs.START_BIN+r+Hs.END_BIN,text:this.text}}},{key:"encodePair",value:function(n){var r=Hs.BINARIES[n[1]];return Hs.BINARIES[n[0]].split("").map(function(o,s){return(o==="1"?"111":"1")+(r[s]==="1"?"000":"0")}).join("")}}]),e}(x1.default);Yl.default=D1});var Fh=j(Ql=>{"use strict";Object.defineProperty(Ql,"__esModule",{value:!0});var k1=function(){function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),e}}(),T1=Kl(),I1=O1(T1);function O1(i){return i&&i.__esModule?i:{default:i}}function F1(i,e){if(!(i instanceof e))throw new TypeError("Cannot call a class as a function")}function R1(i,e){if(!i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:i}function M1(i,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);i.prototype=Object.create(e&&e.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(i,e):i.__proto__=e)}var Oh=function(e){var t=e.substr(0,13).split("").map(function(n){return parseInt(n,10)}).reduce(function(n,r,o){return n+r*(3-o%2*2)},0);return Math.ceil(t/10)*10-t},A1=function(i){M1(e,i);function e(t,n){return F1(this,e),t.search(/^[0-9]{13}$/)!==-1&&(t+=Oh(t)),R1(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n))}return k1(e,[{key:"valid",value:function(){return this.data.search(/^[0-9]{14}$/)!==-1&&+this.data[13]===Oh(this.data)}}]),e}(I1.default);Ql.default=A1});var Mh=j(Zn=>{"use strict";Object.defineProperty(Zn,"__esModule",{value:!0});Zn.ITF14=Zn.ITF=void 0;var B1=Kl(),N1=Rh(B1),z1=Fh(),L1=Rh(z1);function Rh(i){return i&&i.__esModule?i:{default:i}}Zn.ITF=N1.default;Zn.ITF14=L1.default});var Jn=j(Zl=>{"use strict";Object.defineProperty(Zl,"__esModule",{value:!0});var H1=function(){function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),e}}(),j1=Ht(),V1=U1(j1);function U1(i){return i&&i.__esModule?i:{default:i}}function W1(i,e){if(!(i instanceof e))throw new TypeError("Cannot call a class as a function")}function $1(i,e){if(!i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:i}function q1(i,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);i.prototype=Object.create(e&&e.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(i,e):i.__proto__=e)}var G1=function(i){q1(e,i);function e(t,n){return W1(this,e),$1(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n))}return H1(e,[{key:"encode",value:function(){for(var n="110",r=0;r<this.data.length;r++){var o=parseInt(this.data[r]),s=o.toString(2);s=X1(s,4-s.length);for(var a=0;a<s.length;a++)n+=s[a]=="0"?"100":"110"}return n+="1001",{data:n,text:this.text}}},{key:"valid",value:function(){return this.data.search(/^[0-9]+$/)!==-1}}]),e}(V1.default);function X1(i,e){for(var t=0;t<e;t++)i="0"+i;return i}Zl.default=G1});var Hr=j(js=>{"use strict";Object.defineProperty(js,"__esModule",{value:!0});js.mod10=Y1;js.mod11=K1;function Y1(i){for(var e=0,t=0;t<i.length;t++){var n=parseInt(i[t]);(t+i.length)%2===0?e+=n:e+=n*2%10+Math.floor(n*2/10)}return(10-e%10)%10}function K1(i){for(var e=0,t=[2,3,4,5,6,7],n=0;n<i.length;n++){var r=parseInt(i[i.length-1-n]);e+=t[n%t.length]*r}return(11-e%11)%11}});var Ah=j(Jl=>{"use strict";Object.defineProperty(Jl,"__esModule",{value:!0});var Q1=Jn(),Z1=e_(Q1),J1=Hr();function e_(i){return i&&i.__esModule?i:{default:i}}function t_(i,e){if(!(i instanceof e))throw new TypeError("Cannot call a class as a function")}function i_(i,e){if(!i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:i}function n_(i,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);i.prototype=Object.create(e&&e.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(i,e):i.__proto__=e)}var r_=function(i){n_(e,i);function e(t,n){return t_(this,e),i_(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t+(0,J1.mod10)(t),n))}return e}(Z1.default);Jl.default=r_});var Bh=j(ec=>{"use strict";Object.defineProperty(ec,"__esModule",{value:!0});var o_=Jn(),s_=l_(o_),a_=Hr();function l_(i){return i&&i.__esModule?i:{default:i}}function c_(i,e){if(!(i instanceof e))throw new TypeError("Cannot call a class as a function")}function d_(i,e){if(!i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:i}function u_(i,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);i.prototype=Object.create(e&&e.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(i,e):i.__proto__=e)}var p_=function(i){u_(e,i);function e(t,n){return c_(this,e),d_(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t+(0,a_.mod11)(t),n))}return e}(s_.default);ec.default=p_});var zh=j(tc=>{"use strict";Object.defineProperty(tc,"__esModule",{value:!0});var h_=Jn(),f_=m_(h_),Nh=Hr();function m_(i){return i&&i.__esModule?i:{default:i}}function g_(i,e){if(!(i instanceof e))throw new TypeError("Cannot call a class as a function")}function y_(i,e){if(!i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:i}function v_(i,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);i.prototype=Object.create(e&&e.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(i,e):i.__proto__=e)}var b_=function(i){v_(e,i);function e(t,n){return g_(this,e),t+=(0,Nh.mod10)(t),t+=(0,Nh.mod10)(t),y_(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n))}return e}(f_.default);tc.default=b_});var Hh=j(ic=>{"use strict";Object.defineProperty(ic,"__esModule",{value:!0});var __=Jn(),w_=x_(__),Lh=Hr();function x_(i){return i&&i.__esModule?i:{default:i}}function C_(i,e){if(!(i instanceof e))throw new TypeError("Cannot call a class as a function")}function S_(i,e){if(!i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:i}function P_(i,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);i.prototype=Object.create(e&&e.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(i,e):i.__proto__=e)}var E_=function(i){P_(e,i);function e(t,n){return C_(this,e),t+=(0,Lh.mod11)(t),t+=(0,Lh.mod10)(t),S_(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n))}return e}(w_.default);ic.default=E_});var jh=j(si=>{"use strict";Object.defineProperty(si,"__esModule",{value:!0});si.MSI1110=si.MSI1010=si.MSI11=si.MSI10=si.MSI=void 0;var D_=Jn(),k_=jr(D_),T_=Ah(),I_=jr(T_),O_=Bh(),F_=jr(O_),R_=zh(),M_=jr(R_),A_=Hh(),B_=jr(A_);function jr(i){return i&&i.__esModule?i:{default:i}}si.MSI=k_.default;si.MSI10=I_.default;si.MSI11=F_.default;si.MSI1010=M_.default;si.MSI1110=B_.default});var Vh=j(Vs=>{"use strict";Object.defineProperty(Vs,"__esModule",{value:!0});Vs.pharmacode=void 0;var N_=function(){function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),e}}(),z_=Ht(),L_=H_(z_);function H_(i){return i&&i.__esModule?i:{default:i}}function j_(i,e){if(!(i instanceof e))throw new TypeError("Cannot call a class as a function")}function V_(i,e){if(!i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:i}function U_(i,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);i.prototype=Object.create(e&&e.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(i,e):i.__proto__=e)}var W_=function(i){U_(e,i);function e(t,n){j_(this,e);var r=V_(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return r.number=parseInt(t,10),r}return N_(e,[{key:"encode",value:function(){for(var n=this.number,r="";!isNaN(n)&&n!=0;)n%2===0?(r="11100"+r,n=(n-2)/2):(r="100"+r,n=(n-1)/2);return r=r.slice(0,-2),{data:r,text:this.text}}},{key:"valid",value:function(){return this.number>=3&&this.number<=131070}}]),e}(L_.default);Vs.pharmacode=W_});var Uh=j(Us=>{"use strict";Object.defineProperty(Us,"__esModule",{value:!0});Us.codabar=void 0;var $_=function(){function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),e}}(),q_=Ht(),G_=X_(q_);function X_(i){return i&&i.__esModule?i:{default:i}}function Y_(i,e){if(!(i instanceof e))throw new TypeError("Cannot call a class as a function")}function K_(i,e){if(!i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:i}function Q_(i,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);i.prototype=Object.create(e&&e.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(i,e):i.__proto__=e)}var Z_=function(i){Q_(e,i);function e(t,n){Y_(this,e),t.search(/^[0-9\-\$\:\.\+\/]+$/)===0&&(t="A"+t+"A");var r=K_(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t.toUpperCase(),n));return r.text=r.options.text||r.text.replace(/[A-D]/g,""),r}return $_(e,[{key:"valid",value:function(){return this.data.search(/^[A-D][0-9\-\$\:\.\+\/]+[A-D]$/)!==-1}},{key:"encode",value:function(){for(var n=[],r=this.getEncodings(),o=0;o<this.data.length;o++)n.push(r[this.data.charAt(o)]),o!==this.data.length-1&&n.push("0");return{text:this.text,data:n.join("")}}},{key:"getEncodings",value:function(){return{0:"101010011",1:"101011001",2:"101001011",3:"110010101",4:"101101001",5:"110101001",6:"100101011",7:"100101101",8:"100110101",9:"110100101","-":"101001101",$:"101100101",":":"1101011011","/":"1101101011",".":"1101101101","+":"1011011011",A:"1011001001",B:"1001001011",C:"1010010011",D:"1010011001"}}}]),e}(G_.default);Us.codabar=Z_});var Wh=j(Ws=>{"use strict";Object.defineProperty(Ws,"__esModule",{value:!0});Ws.GenericBarcode=void 0;var J_=function(){function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),e}}(),ew=Ht(),tw=iw(ew);function iw(i){return i&&i.__esModule?i:{default:i}}function nw(i,e){if(!(i instanceof e))throw new TypeError("Cannot call a class as a function")}function rw(i,e){if(!i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:i}function ow(i,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);i.prototype=Object.create(e&&e.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(i,e):i.__proto__=e)}var sw=function(i){ow(e,i);function e(t,n){return nw(this,e),rw(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n))}return J_(e,[{key:"encode",value:function(){return{data:"10101010101010101010101010101010101010101",text:this.text}}},{key:"valid",value:function(){return!0}}]),e}(tw.default);Ws.GenericBarcode=sw});var qh=j(nc=>{"use strict";Object.defineProperty(nc,"__esModule",{value:!0});var aw=Qp(),$s=fh(),er=Th(),$h=Mh(),Vr=jh(),lw=Vh(),cw=Uh(),dw=Wh();nc.default={CODE39:aw.CODE39,CODE128:$s.CODE128,CODE128A:$s.CODE128A,CODE128B:$s.CODE128B,CODE128C:$s.CODE128C,EAN13:er.EAN13,EAN8:er.EAN8,EAN5:er.EAN5,EAN2:er.EAN2,UPC:er.UPC,UPCE:er.UPCE,ITF14:$h.ITF14,ITF:$h.ITF,MSI:Vr.MSI,MSI10:Vr.MSI10,MSI11:Vr.MSI11,MSI1010:Vr.MSI1010,MSI1110:Vr.MSI1110,pharmacode:lw.pharmacode,codabar:cw.codabar,GenericBarcode:dw.GenericBarcode}});var Ur=j(rc=>{"use strict";Object.defineProperty(rc,"__esModule",{value:!0});var uw=Object.assign||function(i){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(i[n]=t[n])}return i};rc.default=function(i,e){return uw({},i,e)}});var Gh=j(oc=>{"use strict";Object.defineProperty(oc,"__esModule",{value:!0});oc.default=pw;function pw(i){var e=[];function t(n){if(Array.isArray(n))for(var r=0;r<n.length;r++)t(n[r]);else n.text=n.text||"",n.data=n.data||"",e.push(n)}return t(i),e}});var Xh=j(sc=>{"use strict";Object.defineProperty(sc,"__esModule",{value:!0});sc.default=hw;function hw(i){return i.marginTop=i.marginTop||i.margin,i.marginBottom=i.marginBottom||i.margin,i.marginRight=i.marginRight||i.margin,i.marginLeft=i.marginLeft||i.margin,i}});var lc=j(ac=>{"use strict";Object.defineProperty(ac,"__esModule",{value:!0});ac.default=fw;function fw(i){var e=["width","height","textMargin","fontSize","margin","marginTop","marginBottom","marginLeft","marginRight"];for(var t in e)e.hasOwnProperty(t)&&(t=e[t],typeof i[t]=="string"&&(i[t]=parseInt(i[t],10)));return typeof i.displayValue=="string"&&(i.displayValue=i.displayValue!="false"),i}});var dc=j(cc=>{"use strict";Object.defineProperty(cc,"__esModule",{value:!0});var mw={width:2,height:100,format:"auto",displayValue:!0,fontOptions:"",font:"monospace",text:void 0,textAlign:"center",textPosition:"bottom",textMargin:2,fontSize:20,background:"#ffffff",lineColor:"#000000",margin:10,marginTop:void 0,marginBottom:void 0,marginLeft:void 0,marginRight:void 0,valid:function(){}};cc.default=mw});var Qh=j(uc=>{"use strict";Object.defineProperty(uc,"__esModule",{value:!0});var gw=lc(),yw=Kh(gw),vw=dc(),Yh=Kh(vw);function Kh(i){return i&&i.__esModule?i:{default:i}}function bw(i){var e={};for(var t in Yh.default)Yh.default.hasOwnProperty(t)&&(i.hasAttribute("jsbarcode-"+t.toLowerCase())&&(e[t]=i.getAttribute("jsbarcode-"+t.toLowerCase())),i.hasAttribute("data-"+t.toLowerCase())&&(e[t]=i.getAttribute("data-"+t.toLowerCase())));return e.value=i.getAttribute("jsbarcode-value")||i.getAttribute("data-value"),e=(0,yw.default)(e),e}uc.default=bw});var pc=j(ai=>{"use strict";Object.defineProperty(ai,"__esModule",{value:!0});ai.getTotalWidthOfEncodings=ai.calculateEncodingAttributes=ai.getBarcodePadding=ai.getEncodingHeight=ai.getMaximumHeightOfEncodings=void 0;var _w=Ur(),ww=xw(_w);function xw(i){return i&&i.__esModule?i:{default:i}}function Zh(i,e){return e.height+(e.displayValue&&i.text.length>0?e.fontSize+e.textMargin:0)+e.marginTop+e.marginBottom}function Jh(i,e,t){if(t.displayValue&&e<i){if(t.textAlign=="center")return Math.floor((i-e)/2);if(t.textAlign=="left")return 0;if(t.textAlign=="right")return Math.floor(i-e)}return 0}function Cw(i,e,t){for(var n=0;n<i.length;n++){var r=i[n],o=(0,ww.default)(e,r.options),s;o.displayValue?s=Ew(r.text,o,t):s=0;var a=r.data.length*o.width;r.width=Math.ceil(Math.max(s,a)),r.height=Zh(r,o),r.barcodePadding=Jh(s,a,o)}}function Sw(i){for(var e=0,t=0;t<i.length;t++)e+=i[t].width;return e}function Pw(i){for(var e=0,t=0;t<i.length;t++)i[t].height>e&&(e=i[t].height);return e}function Ew(i,e,t){var n;if(t)n=t;else if(typeof document<"u")n=document.createElement("canvas").getContext("2d");else return 0;n.font=e.fontOptions+" "+e.fontSize+"px "+e.font;var r=n.measureText(i);if(!r)return 0;var o=r.width;return o}ai.getMaximumHeightOfEncodings=Pw;ai.getEncodingHeight=Zh;ai.getBarcodePadding=Jh;ai.calculateEncodingAttributes=Cw;ai.getTotalWidthOfEncodings=Sw});var ef=j(fc=>{"use strict";Object.defineProperty(fc,"__esModule",{value:!0});var Dw=function(){function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),e}}(),kw=Ur(),Tw=Iw(kw),hc=pc();function Iw(i){return i&&i.__esModule?i:{default:i}}function Ow(i,e){if(!(i instanceof e))throw new TypeError("Cannot call a class as a function")}var Fw=function(){function i(e,t,n){Ow(this,i),this.canvas=e,this.encodings=t,this.options=n}return Dw(i,[{key:"render",value:function(){if(!this.canvas.getContext)throw new Error("The browser does not support canvas.");this.prepareCanvas();for(var t=0;t<this.encodings.length;t++){var n=(0,Tw.default)(this.options,this.encodings[t].options);this.drawCanvasBarcode(n,this.encodings[t]),this.drawCanvasText(n,this.encodings[t]),this.moveCanvasDrawing(this.encodings[t])}this.restoreCanvas()}},{key:"prepareCanvas",value:function(){var t=this.canvas.getContext("2d");t.save(),(0,hc.calculateEncodingAttributes)(this.encodings,this.options,t);var n=(0,hc.getTotalWidthOfEncodings)(this.encodings),r=(0,hc.getMaximumHeightOfEncodings)(this.encodings);this.canvas.width=n+this.options.marginLeft+this.options.marginRight,this.canvas.height=r,t.clearRect(0,0,this.canvas.width,this.canvas.height),this.options.background&&(t.fillStyle=this.options.background,t.fillRect(0,0,this.canvas.width,this.canvas.height)),t.translate(this.options.marginLeft,0)}},{key:"drawCanvasBarcode",value:function(t,n){var r=this.canvas.getContext("2d"),o=n.data,s;t.textPosition=="top"?s=t.marginTop+t.fontSize+t.textMargin:s=t.marginTop,r.fillStyle=t.lineColor;for(var a=0;a<o.length;a++){var l=a*t.width+n.barcodePadding;o[a]==="1"?r.fillRect(l,s,t.width,t.height):o[a]&&r.fillRect(l,s,t.width,t.height*o[a])}}},{key:"drawCanvasText",value:function(t,n){var r=this.canvas.getContext("2d"),o=t.fontOptions+" "+t.fontSize+"px "+t.font;if(t.displayValue){var s,a;t.textPosition=="top"?a=t.marginTop+t.fontSize-t.textMargin:a=t.height+t.textMargin+t.marginTop+t.fontSize,r.font=o,t.textAlign=="left"||n.barcodePadding>0?(s=0,r.textAlign="left"):t.textAlign=="right"?(s=n.width-1,r.textAlign="right"):(s=n.width/2,r.textAlign="center"),r.fillText(n.text,s,a)}}},{key:"moveCanvasDrawing",value:function(t){var n=this.canvas.getContext("2d");n.translate(t.width,0)}},{key:"restoreCanvas",value:function(){var t=this.canvas.getContext("2d");t.restore()}}]),i}();fc.default=Fw});var tf=j(gc=>{"use strict";Object.defineProperty(gc,"__esModule",{value:!0});var Rw=function(){function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),e}}(),Mw=Ur(),Aw=Bw(Mw),mc=pc();function Bw(i){return i&&i.__esModule?i:{default:i}}function Nw(i,e){if(!(i instanceof e))throw new TypeError("Cannot call a class as a function")}var qs="http://www.w3.org/2000/svg",zw=function(){function i(e,t,n){Nw(this,i),this.svg=e,this.encodings=t,this.options=n,this.document=n.xmlDocument||document}return Rw(i,[{key:"render",value:function(){var t=this.options.marginLeft;this.prepareSVG();for(var n=0;n<this.encodings.length;n++){var r=this.encodings[n],o=(0,Aw.default)(this.options,r.options),s=this.createGroup(t,o.marginTop,this.svg);this.setGroupOptions(s,o),this.drawSvgBarcode(s,o,r),this.drawSVGText(s,o,r),t+=r.width}}},{key:"prepareSVG",value:function(){for(;this.svg.firstChild;)this.svg.removeChild(this.svg.firstChild);(0,mc.calculateEncodingAttributes)(this.encodings,this.options);var t=(0,mc.getTotalWidthOfEncodings)(this.encodings),n=(0,mc.getMaximumHeightOfEncodings)(this.encodings),r=t+this.options.marginLeft+this.options.marginRight;this.setSvgAttributes(r,n),this.options.background&&this.drawRect(0,0,r,n,this.svg).setAttribute("style","fill:"+this.options.background+";")}},{key:"drawSvgBarcode",value:function(t,n,r){var o=r.data,s;n.textPosition=="top"?s=n.fontSize+n.textMargin:s=0;for(var a=0,l=0,c=0;c<o.length;c++)l=c*n.width+r.barcodePadding,o[c]==="1"?a++:a>0&&(this.drawRect(l-n.width*a,s,n.width*a,n.height,t),a=0);a>0&&this.drawRect(l-n.width*(a-1),s,n.width*a,n.height,t)}},{key:"drawSVGText",value:function(t,n,r){var o=this.document.createElementNS(qs,"text");if(n.displayValue){var s,a;o.setAttribute("style","font:"+n.fontOptions+" "+n.fontSize+"px "+n.font),n.textPosition=="top"?a=n.fontSize-n.textMargin:a=n.height+n.textMargin+n.fontSize,n.textAlign=="left"||r.barcodePadding>0?(s=0,o.setAttribute("text-anchor","start")):n.textAlign=="right"?(s=r.width-1,o.setAttribute("text-anchor","end")):(s=r.width/2,o.setAttribute("text-anchor","middle")),o.setAttribute("x",s),o.setAttribute("y",a),o.appendChild(this.document.createTextNode(r.text)),t.appendChild(o)}}},{key:"setSvgAttributes",value:function(t,n){var r=this.svg;r.setAttribute("width",t+"px"),r.setAttribute("height",n+"px"),r.setAttribute("x","0px"),r.setAttribute("y","0px"),r.setAttribute("viewBox","0 0 "+t+" "+n),r.setAttribute("xmlns",qs),r.setAttribute("version","1.1"),r.setAttribute("style","transform: translate(0,0)")}},{key:"createGroup",value:function(t,n,r){var o=this.document.createElementNS(qs,"g");return o.setAttribute("transform","translate("+t+", "+n+")"),r.appendChild(o),o}},{key:"setGroupOptions",value:function(t,n){t.setAttribute("style","fill:"+n.lineColor+";")}},{key:"drawRect",value:function(t,n,r,o,s){var a=this.document.createElementNS(qs,"rect");return a.setAttribute("x",t),a.setAttribute("y",n),a.setAttribute("width",r),a.setAttribute("height",o),s.appendChild(a),a}}]),i}();gc.default=zw});var nf=j(yc=>{"use strict";Object.defineProperty(yc,"__esModule",{value:!0});var Lw=function(){function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),e}}();function Hw(i,e){if(!(i instanceof e))throw new TypeError("Cannot call a class as a function")}var jw=function(){function i(e,t,n){Hw(this,i),this.object=e,this.encodings=t,this.options=n}return Lw(i,[{key:"render",value:function(){this.object.encodings=this.encodings}}]),i}();yc.default=jw});var rf=j(bc=>{"use strict";Object.defineProperty(bc,"__esModule",{value:!0});var Vw=ef(),Uw=vc(Vw),Ww=tf(),$w=vc(Ww),qw=nf(),Gw=vc(qw);function vc(i){return i&&i.__esModule?i:{default:i}}bc.default={CanvasRenderer:Uw.default,SVGRenderer:$w.default,ObjectRenderer:Gw.default}});var Cc=j(Wr=>{"use strict";Object.defineProperty(Wr,"__esModule",{value:!0});function _c(i,e){if(!(i instanceof e))throw new TypeError("Cannot call a class as a function")}function wc(i,e){if(!i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:i}function xc(i,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);i.prototype=Object.create(e&&e.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(i,e):i.__proto__=e)}var Xw=function(i){xc(e,i);function e(t,n){_c(this,e);var r=wc(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return r.name="InvalidInputException",r.symbology=t,r.input=n,r.message='"'+r.input+'" is not a valid input for '+r.symbology,r}return e}(Error),Yw=function(i){xc(e,i);function e(){_c(this,e);var t=wc(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return t.name="InvalidElementException",t.message="Not supported type to render on",t}return e}(Error),Kw=function(i){xc(e,i);function e(){_c(this,e);var t=wc(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return t.name="NoElementException",t.message="No element to render on.",t}return e}(Error);Wr.InvalidInputException=Xw;Wr.InvalidElementException=Yw;Wr.NoElementException=Kw});var sf=j(Ec=>{"use strict";Object.defineProperty(Ec,"__esModule",{value:!0});var Qw=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},Zw=Qh(),Sc=of(Zw),Jw=rf(),$r=of(Jw),ex=Cc();function of(i){return i&&i.__esModule?i:{default:i}}function Pc(i){if(typeof i=="string")return tx(i);if(Array.isArray(i)){for(var e=[],t=0;t<i.length;t++)e.push(Pc(i[t]));return e}else{if(typeof HTMLCanvasElement<"u"&&i instanceof HTMLImageElement)return ix(i);if(i&&i.nodeName&&i.nodeName.toLowerCase()==="svg"||typeof SVGElement<"u"&&i instanceof SVGElement)return{element:i,options:(0,Sc.default)(i),renderer:$r.default.SVGRenderer};if(typeof HTMLCanvasElement<"u"&&i instanceof HTMLCanvasElement)return{element:i,options:(0,Sc.default)(i),renderer:$r.default.CanvasRenderer};if(i&&i.getContext)return{element:i,renderer:$r.default.CanvasRenderer};if(i&&(typeof i>"u"?"undefined":Qw(i))==="object"&&!i.nodeName)return{element:i,renderer:$r.default.ObjectRenderer};throw new ex.InvalidElementException}}function tx(i){var e=document.querySelectorAll(i);if(e.length!==0){for(var t=[],n=0;n<e.length;n++)t.push(Pc(e[n]));return t}}function ix(i){var e=document.createElement("canvas");return{element:e,options:(0,Sc.default)(i),renderer:$r.default.CanvasRenderer,afterRender:function(){i.setAttribute("src",e.toDataURL())}}}Ec.default=Pc});var af=j(Dc=>{"use strict";Object.defineProperty(Dc,"__esModule",{value:!0});var nx=function(){function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),e}}();function rx(i,e){if(!(i instanceof e))throw new TypeError("Cannot call a class as a function")}var ox=function(){function i(e){rx(this,i),this.api=e}return nx(i,[{key:"handleCatch",value:function(t){if(t.name==="InvalidInputException")if(this.api._options.valid!==this.api._defaults.valid)this.api._options.valid(!1);else throw t.message;else throw t;this.api.render=function(){}}},{key:"wrapBarcodeCall",value:function(t){try{var n=t.apply(void 0,arguments);return this.api._options.valid(!0),n}catch(r){return this.handleCatch(r),this.api}}}]),i}();Dc.default=ox});var Ic=j((zT,ff)=>{"use strict";var sx=qh(),dn=Zi(sx),ax=Ur(),qr=Zi(ax),lx=Gh(),cf=Zi(lx),cx=Xh(),lf=Zi(cx),dx=sf(),ux=Zi(dx),px=lc(),hx=Zi(px),fx=af(),mx=Zi(fx),df=Cc(),gx=dc(),uf=Zi(gx);function Zi(i){return i&&i.__esModule?i:{default:i}}var Oi=function(){},Gs=function(e,t,n){var r=new Oi;if(typeof e>"u")throw Error("No element to render on was provided.");return r._renderProperties=(0,ux.default)(e),r._encodings=[],r._options=uf.default,r._errorHandler=new mx.default(r),typeof t<"u"&&(n=n||{},n.format||(n.format=hf()),r.options(n)[n.format](t,n).render()),r};Gs.getModule=function(i){return dn.default[i]};for(kc in dn.default)dn.default.hasOwnProperty(kc)&&yx(dn.default,kc);var kc;function yx(i,e){Oi.prototype[e]=Oi.prototype[e.toUpperCase()]=Oi.prototype[e.toLowerCase()]=function(t,n){var r=this;return r._errorHandler.wrapBarcodeCall(function(){n.text=typeof n.text>"u"?void 0:""+n.text;var o=(0,qr.default)(r._options,n);o=(0,hx.default)(o);var s=i[e],a=pf(t,s,o);return r._encodings.push(a),r})}}function pf(i,e,t){i=""+i;var n=new e(i,t);if(!n.valid())throw new df.InvalidInputException(n.constructor.name,i);var r=n.encode();r=(0,cf.default)(r);for(var o=0;o<r.length;o++)r[o].options=(0,qr.default)(t,r[o].options);return r}function hf(){return dn.default.CODE128?"CODE128":Object.keys(dn.default)[0]}Oi.prototype.options=function(i){return this._options=(0,qr.default)(this._options,i),this};Oi.prototype.blank=function(i){var e=new Array(i+1).join("0");return this._encodings.push({data:e}),this};Oi.prototype.init=function(){if(this._renderProperties){Array.isArray(this._renderProperties)||(this._renderProperties=[this._renderProperties]);var i;for(var e in this._renderProperties){i=this._renderProperties[e];var t=(0,qr.default)(this._options,i.options);t.format=="auto"&&(t.format=hf()),this._errorHandler.wrapBarcodeCall(function(){var n=t.value,r=dn.default[t.format.toUpperCase()],o=pf(n,r,t);Tc(i,o,t)})}}};Oi.prototype.render=function(){if(!this._renderProperties)throw new df.NoElementException;if(Array.isArray(this._renderProperties))for(var i=0;i<this._renderProperties.length;i++)Tc(this._renderProperties[i],this._encodings,this._options);else Tc(this._renderProperties,this._encodings,this._options);return this};Oi.prototype._defaults=uf.default;function Tc(i,e,t){e=(0,cf.default)(e);for(var n=0;n<e.length;n++)e[n].options=(0,qr.default)(t,e[n].options),(0,lf.default)(e[n].options);(0,lf.default)(t);var r=i.renderer,o=new r(i.element,e,t);o.render(),i.afterRender&&i.afterRender()}typeof window<"u"&&(window.JsBarcode=Gs);typeof jQuery<"u"&&(jQuery.fn.JsBarcode=function(i,e){var t=[];return jQuery(this).each(function(){t.push(this)}),Gs(t,i,e)});ff.exports=Gs});var cm=j((b3,lm)=>{lm.exports=function(){var e={},t=e._fns={};e.emit=function(s,a,l,c,d,u,g){var h=n(s);h.length&&r(s,h,[a,l,c,d,u,g])},e.on=function(s,a){t[s]||(t[s]=[]),t[s].push(a)},e.once=function(s,a){function l(){a.apply(this,arguments),e.off(s,l)}this.on(s,l)},e.off=function(s,a){var l=[];if(s&&a){var c=this._fns[s],d=0,u=c?c.length:0;for(d;d<u;d++)c[d]!==a&&l.push(c[d])}l.length?this._fns[s]=l:delete this._fns[s]};function n(o){var s=t[o]?t[o]:[],a=o.indexOf(":"),l=a===-1?[o]:[o.substring(0,a),o.substring(a+1)],c=Object.keys(t),d=0,u=c.length;for(d;d<u;d++){var g=c[d];if(g==="*"&&(s=s.concat(t[g])),l.length===2&&l[0]===g){s=s.concat(t[g]);break}}return s}function r(o,s,a){var l=0,c=s.length;for(l;l<c&&s[l];l++)s[l].event=o,s[l].apply(s[l],a)}return e}});var sa=j((w3,dm)=>{function tS(i){var e=typeof i;return i!=null&&(e=="object"||e=="function")}dm.exports=tS});var pm=j((x3,um)=>{var iS=typeof global=="object"&&global&&global.Object===Object&&global;um.exports=iS});var Qc=j((C3,hm)=>{var nS=pm(),rS=typeof self=="object"&&self&&self.Object===Object&&self,oS=nS||rS||Function("return this")();hm.exports=oS});var mm=j((S3,fm)=>{var sS=Qc(),aS=function(){return sS.Date.now()};fm.exports=aS});var ym=j((P3,gm)=>{var lS=/\s/;function cS(i){for(var e=i.length;e--&&lS.test(i.charAt(e)););return e}gm.exports=cS});var bm=j((E3,vm)=>{var dS=ym(),uS=/^\s+/;function pS(i){return i&&i.slice(0,dS(i)+1).replace(uS,"")}vm.exports=pS});var Zc=j((D3,_m)=>{var hS=Qc(),fS=hS.Symbol;_m.exports=fS});var Sm=j((k3,Cm)=>{var wm=Zc(),xm=Object.prototype,mS=xm.hasOwnProperty,gS=xm.toString,eo=wm?wm.toStringTag:void 0;function yS(i){var e=mS.call(i,eo),t=i[eo];try{i[eo]=void 0;var n=!0}catch{}var r=gS.call(i);return n&&(e?i[eo]=t:delete i[eo]),r}Cm.exports=yS});var Em=j((T3,Pm)=>{var vS=Object.prototype,bS=vS.toString;function _S(i){return bS.call(i)}Pm.exports=_S});var Im=j((I3,Tm)=>{var Dm=Zc(),wS=Sm(),xS=Em(),CS="[object Null]",SS="[object Undefined]",km=Dm?Dm.toStringTag:void 0;function PS(i){return i==null?i===void 0?SS:CS:km&&km in Object(i)?wS(i):xS(i)}Tm.exports=PS});var Fm=j((O3,Om)=>{function ES(i){return i!=null&&typeof i=="object"}Om.exports=ES});var Mm=j((F3,Rm)=>{var DS=Im(),kS=Fm(),TS="[object Symbol]";function IS(i){return typeof i=="symbol"||kS(i)&&DS(i)==TS}Rm.exports=IS});var zm=j((R3,Nm)=>{var OS=bm(),Am=sa(),FS=Mm(),Bm=NaN,RS=/^[-+]0x[0-9a-f]+$/i,MS=/^0b[01]+$/i,AS=/^0o[0-7]+$/i,BS=parseInt;function NS(i){if(typeof i=="number")return i;if(FS(i))return Bm;if(Am(i)){var e=typeof i.valueOf=="function"?i.valueOf():i;i=Am(e)?e+"":e}if(typeof i!="string")return i===0?i:+i;i=OS(i);var t=MS.test(i);return t||AS.test(i)?BS(i.slice(2),t?2:8):RS.test(i)?Bm:+i}Nm.exports=NS});var ed=j((M3,Hm)=>{var zS=sa(),Jc=mm(),Lm=zm(),LS="Expected a function",HS=Math.max,jS=Math.min;function VS(i,e,t){var n,r,o,s,a,l,c=0,d=!1,u=!1,g=!0;if(typeof i!="function")throw new TypeError(LS);e=Lm(e)||0,zS(t)&&(d=!!t.leading,u="maxWait"in t,o=u?HS(Lm(t.maxWait)||0,e):o,g="trailing"in t?!!t.trailing:g);function h(b){var w=n,S=r;return n=r=void 0,c=b,s=i.apply(S,w),s}function _(b){return c=b,a=setTimeout(M,e),d?h(b):s}function E(b){var w=b-l,S=b-c,A=e-w;return u?jS(A,o-S):A}function N(b){var w=b-l,S=b-c;return l===void 0||w>=e||w<0||u&&S>=o}function M(){var b=Jc();if(N(b))return U(b);a=setTimeout(M,E(b))}function U(b){return a=void 0,g&&n?h(b):(n=r=void 0,s)}function de(){a!==void 0&&clearTimeout(a),c=0,n=l=r=a=void 0}function oe(){return a===void 0?s:U(Jc())}function ee(){var b=Jc(),w=N(b);if(n=arguments,r=this,l=b,w){if(a===void 0)return _(l);if(u)return clearTimeout(a),a=setTimeout(M,e),h(l)}return a===void 0&&(a=setTimeout(M,e)),s}return ee.cancel=de,ee.flush=oe,ee}Hm.exports=VS});var Vm=j((A3,jm)=>{var US=ed(),WS=sa(),$S="Expected a function";function qS(i,e,t){var n=!0,r=!0;if(typeof i!="function")throw new TypeError($S);return WS(t)&&(n="leading"in t?!!t.leading:n,r="trailing"in t?!!t.trailing:r),US(i,e,{leading:n,maxWait:e,trailing:r})}jm.exports=qS});var io=j((Q3,Ym)=>{"use strict";Ym.exports=function(e){if(typeof e!="number"||Number.isNaN(e))throw new TypeError(`Expected a number, got ${typeof e}`);let t=e<0,n=Math.abs(e);if(t&&(n=-n),n===0)return"0 B";let r=["B","KB","MB","GB","TB","PB","EB","ZB","YB"],o=Math.min(Math.floor(Math.log(n)/Math.log(1024)),r.length-1),s=Number(n/1024**o),a=r[o];return`${s>=10||s%1===0?Math.round(s):s.toFixed(1)} ${a}`}});var Zm=j((Z3,Qm)=>{"use strict";function Km(i,e){this.text=i=i||"",this.hasWild=~i.indexOf("*"),this.separator=e,this.parts=i.split(e)}Km.prototype.match=function(i){var e=!0,t=this.parts,n,r=t.length,o;if(typeof i=="string"||i instanceof String)if(!this.hasWild&&this.text!=i)e=!1;else{for(o=(i||"").split(this.separator),n=0;e&&n<r;n++)t[n]!=="*"&&(n<o.length?e=t[n]===o[n]:e=!1);e=e&&o}else if(typeof i.splice=="function")for(e=[],n=i.length;n--;)this.match(i[n])&&(e[e.length]=i[n]);else if(typeof i=="object"){e={};for(var s in i)this.match(s)&&(e[s]=i[s])}return e};Qm.exports=function(i,e,t){var n=new Km(i,t||/[\/\.]/);return typeof e<"u"?n.match(e):n}});var eg=j((J3,Jm)=>{var ZS=Zm(),JS=/[\/\+\.]/;Jm.exports=function(i,e){function t(n){var r=ZS(n,i,JS);return r&&r.length>=2}return e?t(e.split(";")[0]):t}});var yt=j((MF,ba)=>{(function(){"use strict";var i={}.hasOwnProperty;function e(){for(var r="",o=0;o<arguments.length;o++){var s=arguments[o];s&&(r=n(r,t(s)))}return r}function t(r){if(typeof r=="string"||typeof r=="number")return r;if(typeof r!="object")return"";if(Array.isArray(r))return e.apply(null,r);if(r.toString!==Object.prototype.toString&&!r.toString.toString().includes("[native code]"))return r.toString();var o="";for(var s in r)i.call(r,s)&&r[s]&&(o=n(o,s));return o}function n(r,o){return o?r?r+" "+o:r+o:r}typeof ba<"u"&&ba.exports?(e.default=e,ba.exports=e):typeof define=="function"&&typeof define.amd=="object"&&define.amd?define("classnames",[],function(){return e}):window.classNames=e})()});var w0=j((LM,ou)=>{"use strict";var k2=Object.prototype.hasOwnProperty,bt="~";function Ro(){}Object.create&&(Ro.prototype=Object.create(null),new Ro().__proto__||(bt=!1));function T2(i,e,t){this.fn=i,this.context=e,this.once=t||!1}function _0(i,e,t,n,r){if(typeof t!="function")throw new TypeError("The listener must be a function");var o=new T2(t,n||i,r),s=bt?bt+e:e;return i._events[s]?i._events[s].fn?i._events[s]=[i._events[s],o]:i._events[s].push(o):(i._events[s]=o,i._eventsCount++),i}function za(i,e){--i._eventsCount===0?i._events=new Ro:delete i._events[e]}function ft(){this._events=new Ro,this._eventsCount=0}ft.prototype.eventNames=function(){var e=[],t,n;if(this._eventsCount===0)return e;for(n in t=this._events)k2.call(t,n)&&e.push(bt?n.slice(1):n);return Object.getOwnPropertySymbols?e.concat(Object.getOwnPropertySymbols(t)):e};ft.prototype.listeners=function(e){var t=bt?bt+e:e,n=this._events[t];if(!n)return[];if(n.fn)return[n.fn];for(var r=0,o=n.length,s=new Array(o);r<o;r++)s[r]=n[r].fn;return s};ft.prototype.listenerCount=function(e){var t=bt?bt+e:e,n=this._events[t];return n?n.fn?1:n.length:0};ft.prototype.emit=function(e,t,n,r,o,s){var a=bt?bt+e:e;if(!this._events[a])return!1;var l=this._events[a],c=arguments.length,d,u;if(l.fn){switch(l.once&&this.removeListener(e,l.fn,void 0,!0),c){case 1:return l.fn.call(l.context),!0;case 2:return l.fn.call(l.context,t),!0;case 3:return l.fn.call(l.context,t,n),!0;case 4:return l.fn.call(l.context,t,n,r),!0;case 5:return l.fn.call(l.context,t,n,r,o),!0;case 6:return l.fn.call(l.context,t,n,r,o,s),!0}for(u=1,d=new Array(c-1);u<c;u++)d[u-1]=arguments[u];l.fn.apply(l.context,d)}else{var g=l.length,h;for(u=0;u<g;u++)switch(l[u].once&&this.removeListener(e,l[u].fn,void 0,!0),c){case 1:l[u].fn.call(l[u].context);break;case 2:l[u].fn.call(l[u].context,t);break;case 3:l[u].fn.call(l[u].context,t,n);break;case 4:l[u].fn.call(l[u].context,t,n,r);break;default:if(!d)for(h=1,d=new Array(c-1);h<c;h++)d[h-1]=arguments[h];l[u].fn.apply(l[u].context,d)}}return!0};ft.prototype.on=function(e,t,n){return _0(this,e,t,n,!1)};ft.prototype.once=function(e,t,n){return _0(this,e,t,n,!0)};ft.prototype.removeListener=function(e,t,n,r){var o=bt?bt+e:e;if(!this._events[o])return this;if(!t)return za(this,o),this;var s=this._events[o];if(s.fn)s.fn===t&&(!r||s.once)&&(!n||s.context===n)&&za(this,o);else{for(var a=0,l=[],c=s.length;a<c;a++)(s[a].fn!==t||r&&!s[a].once||n&&s[a].context!==n)&&l.push(s[a]);l.length?this._events[o]=l.length===1?l[0]:l:za(this,o)}return this};ft.prototype.removeAllListeners=function(e){var t;return e?(t=bt?bt+e:e,this._events[t]&&za(this,t)):(this._events=new Ro,this._eventsCount=0),this};ft.prototype.off=ft.prototype.removeListener;ft.prototype.addListener=ft.prototype.on;ft.prefixed=bt;ft.EventEmitter=ft;typeof ou<"u"&&(ou.exports=ft)});var dy=j((Hu,ju)=>{(function(i,e){typeof Hu=="object"&&typeof ju<"u"?ju.exports=e():typeof define=="function"&&define.amd?define(e):(i=typeof globalThis<"u"?globalThis:i||self,i.Compressor=e())})(Hu,function(){"use strict";function i(F,C){var k=Object.keys(F);if(Object.getOwnPropertySymbols){var T=Object.getOwnPropertySymbols(F);C&&(T=T.filter(function(R){return Object.getOwnPropertyDescriptor(F,R).enumerable})),k.push.apply(k,T)}return k}function e(F){for(var C=1;C<arguments.length;C++){var k=arguments[C]!=null?arguments[C]:{};C%2?i(Object(k),!0).forEach(function(T){o(F,T,k[T])}):Object.getOwnPropertyDescriptors?Object.defineProperties(F,Object.getOwnPropertyDescriptors(k)):i(Object(k)).forEach(function(T){Object.defineProperty(F,T,Object.getOwnPropertyDescriptor(k,T))})}return F}function t(F,C){if(!(F instanceof C))throw new TypeError("Cannot call a class as a function")}function n(F,C){for(var k=0;k<C.length;k++){var T=C[k];T.enumerable=T.enumerable||!1,T.configurable=!0,"value"in T&&(T.writable=!0),Object.defineProperty(F,l(T.key),T)}}function r(F,C,k){return C&&n(F.prototype,C),k&&n(F,k),Object.defineProperty(F,"prototype",{writable:!1}),F}function o(F,C,k){return C=l(C),C in F?Object.defineProperty(F,C,{value:k,enumerable:!0,configurable:!0,writable:!0}):F[C]=k,F}function s(){return s=Object.assign?Object.assign.bind():function(F){for(var C=1;C<arguments.length;C++){var k=arguments[C];for(var T in k)Object.prototype.hasOwnProperty.call(k,T)&&(F[T]=k[T])}return F},s.apply(this,arguments)}function a(F,C){if(typeof F!="object"||F===null)return F;var k=F[Symbol.toPrimitive];if(k!==void 0){var T=k.call(F,C||"default");if(typeof T!="object")return T;throw new TypeError("@@toPrimitive must return a primitive value.")}return(C==="string"?String:Number)(F)}function l(F){var C=a(F,"string");return typeof C=="symbol"?C:String(C)}var c={exports:{}};(function(F){typeof window>"u"||function(C){var k=C.HTMLCanvasElement&&C.HTMLCanvasElement.prototype,T=C.Blob&&function(){try{return!!new Blob}catch{return!1}}(),R=T&&C.Uint8Array&&function(){try{return new Blob([new Uint8Array(100)]).size===100}catch{return!1}}(),V=C.BlobBuilder||C.WebKitBlobBuilder||C.MozBlobBuilder||C.MSBlobBuilder,ie=/^data:((.*?)(;charset=.*?)?)(;base64)?,/,G=(T||V)&&C.atob&&C.ArrayBuffer&&C.Uint8Array&&function($){var Y,ne,re,ge,Z,J,ve,be,xt;if(Y=$.match(ie),!Y)throw new Error("invalid data URI");for(ne=Y[2]?Y[1]:"text/plain"+(Y[3]||";charset=US-ASCII"),re=!!Y[4],ge=$.slice(Y[0].length),re?Z=atob(ge):Z=decodeURIComponent(ge),J=new ArrayBuffer(Z.length),ve=new Uint8Array(J),be=0;be<Z.length;be+=1)ve[be]=Z.charCodeAt(be);return T?new Blob([R?ve:J],{type:ne}):(xt=new V,xt.append(J),xt.getBlob(ne))};C.HTMLCanvasElement&&!k.toBlob&&(k.mozGetAsFile?k.toBlob=function($,Y,ne){var re=this;setTimeout(function(){ne&&k.toDataURL&&G?$(G(re.toDataURL(Y,ne))):$(re.mozGetAsFile("blob",Y))})}:k.toDataURL&&G&&(k.msToBlob?k.toBlob=function($,Y,ne){var re=this;setTimeout(function(){(Y&&Y!=="image/png"||ne)&&k.toDataURL&&G?$(G(re.toDataURL(Y,ne))):$(re.msToBlob(Y))})}:k.toBlob=function($,Y,ne){var re=this;setTimeout(function(){$(G(re.toDataURL(Y,ne)))})})),F.exports?F.exports=G:C.dataURLtoBlob=G}(window)})(c);var d=c.exports,u=function(C){return typeof Blob>"u"?!1:C instanceof Blob||Object.prototype.toString.call(C)==="[object Blob]"},g={strict:!0,checkOrientation:!0,retainExif:!1,maxWidth:1/0,maxHeight:1/0,minWidth:0,minHeight:0,width:void 0,height:void 0,resize:"none",quality:.8,mimeType:"auto",convertTypes:["image/png"],convertSize:5e6,beforeDraw:null,drew:null,success:null,error:null},h=typeof window<"u"&&typeof window.document<"u",_=h?window:{},E=function(C){return C>0&&C<1/0},N=Array.prototype.slice;function M(F){return Array.from?Array.from(F):N.call(F)}var U=/^image\/.+$/;function de(F){return U.test(F)}function oe(F){var C=de(F)?F.substr(6):"";return C==="jpeg"&&(C="jpg"),".".concat(C)}var ee=String.fromCharCode;function b(F,C,k){var T="",R;for(k+=C,R=C;R<k;R+=1)T+=ee(F.getUint8(R));return T}var w=_.btoa;function S(F,C){for(var k=[],T=8192,R=new Uint8Array(F);R.length>0;)k.push(ee.apply(null,M(R.subarray(0,T)))),R=R.subarray(T);return"data:".concat(C,";base64,").concat(w(k.join("")))}function A(F){var C=new DataView(F),k;try{var T,R,V;if(C.getUint8(0)===255&&C.getUint8(1)===216)for(var ie=C.byteLength,G=2;G+1<ie;){if(C.getUint8(G)===255&&C.getUint8(G+1)===225){R=G;break}G+=1}if(R){var $=R+4,Y=R+10;if(b(C,$,4)==="Exif"){var ne=C.getUint16(Y);if(T=ne===18761,(T||ne===19789)&&C.getUint16(Y+2,T)===42){var re=C.getUint32(Y+4,T);re>=8&&(V=Y+re)}}}if(V){var ge=C.getUint16(V,T),Z,J;for(J=0;J<ge;J+=1)if(Z=V+J*12+2,C.getUint16(Z,T)===274){Z+=8,k=C.getUint16(Z,T),C.setUint16(Z,1,T);break}}}catch{k=1}return k}function L(F){var C=0,k=1,T=1;switch(F){case 2:k=-1;break;case 3:C=-180;break;case 4:T=-1;break;case 5:C=90,T=-1;break;case 6:C=90;break;case 7:C=90,k=-1;break;case 8:C=-90;break}return{rotate:C,scaleX:k,scaleY:T}}var K=/\.\d*(?:0|9){12}\d*$/;function ye(F){var C=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1e11;return K.test(F)?Math.round(F*C)/C:F}function Ne(F){var C=F.aspectRatio,k=F.height,T=F.width,R=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"none",V=E(T),ie=E(k);if(V&&ie){var G=k*C;(R==="contain"||R==="none")&&G>T||R==="cover"&&G<T?k=T/C:T=k*C}else V?k=T/C:ie&&(T=k*C);return{width:T,height:k}}function Pe(F){for(var C=M(new Uint8Array(F)),k=C.length,T=[],R=0;R+3<k;){var V=C[R],ie=C[R+1];if(V===255&&ie===218)break;if(V===255&&ie===216)R+=2;else{var G=C[R+2]*256+C[R+3],$=R+G+2,Y=C.slice(R,$);T.push(Y),R=$}}return T.reduce(function(ne,re){return re[0]===255&&re[1]===225?ne.concat(re):ne},[])}function Se(F,C){var k=M(new Uint8Array(F));if(k[2]!==255||k[3]!==224)return F;var T=k[4]*256+k[5],R=[255,216].concat(C,k.slice(4+T));return new Uint8Array(R)}var Q=_.ArrayBuffer,ze=_.FileReader,te=_.URL||_.webkitURL,Rt=/\.\w+$/,he=_.Compressor,X=function(){function F(C,k){t(this,F),this.file=C,this.exif=[],this.image=new Image,this.options=e(e({},g),k),this.aborted=!1,this.result=null,this.init()}return r(F,[{key:"init",value:function(){var k=this,T=this.file,R=this.options;if(!u(T)){this.fail(new Error("The first argument must be a File or Blob object."));return}var V=T.type;if(!de(V)){this.fail(new Error("The first argument must be an image File or Blob object."));return}if(!te||!ze){this.fail(new Error("The current browser does not support image compression."));return}Q||(R.checkOrientation=!1,R.retainExif=!1);var ie=V==="image/jpeg",G=ie&&R.checkOrientation,$=ie&&R.retainExif;if(te&&!G&&!$)this.load({url:te.createObjectURL(T)});else{var Y=new ze;this.reader=Y,Y.onload=function(ne){var re=ne.target,ge=re.result,Z={},J=1;G&&(J=A(ge),J>1&&s(Z,L(J))),$&&(k.exif=Pe(ge)),G||$?!te||J>1?Z.url=S(ge,V):Z.url=te.createObjectURL(T):Z.url=ge,k.load(Z)},Y.onabort=function(){k.fail(new Error("Aborted to read the image with FileReader."))},Y.onerror=function(){k.fail(new Error("Failed to read the image with FileReader."))},Y.onloadend=function(){k.reader=null},G||$?Y.readAsArrayBuffer(T):Y.readAsDataURL(T)}}},{key:"load",value:function(k){var T=this,R=this.file,V=this.image;V.onload=function(){T.draw(e(e({},k),{},{naturalWidth:V.naturalWidth,naturalHeight:V.naturalHeight}))},V.onabort=function(){T.fail(new Error("Aborted to load the image."))},V.onerror=function(){T.fail(new Error("Failed to load the image."))},_.navigator&&/(?:iPad|iPhone|iPod).*?AppleWebKit/i.test(_.navigator.userAgent)&&(V.crossOrigin="anonymous"),V.alt=R.name,V.src=k.url}},{key:"draw",value:function(k){var T=this,R=k.naturalWidth,V=k.naturalHeight,ie=k.rotate,G=ie===void 0?0:ie,$=k.scaleX,Y=$===void 0?1:$,ne=k.scaleY,re=ne===void 0?1:ne,ge=this.file,Z=this.image,J=this.options,ve=document.createElement("canvas"),be=ve.getContext("2d"),xt=Math.abs(G)%180===90,Mt=(J.resize==="contain"||J.resize==="cover")&&E(J.width)&&E(J.height),je=Math.max(J.maxWidth,0)||1/0,Ct=Math.max(J.maxHeight,0)||1/0,Te=Math.max(J.minWidth,0)||0,st=Math.max(J.minHeight,0)||0,at=R/V,Re=J.width,Ze=J.height;if(xt){var ki=[Ct,je];je=ki[0],Ct=ki[1];var At=[st,Te];Te=At[0],st=At[1];var Wi=[Ze,Re];Re=Wi[0],Ze=Wi[1]}Mt&&(at=Re/Ze);var Er=Ne({aspectRatio:at,width:je,height:Ct},"contain");je=Er.width,Ct=Er.height;var qu=Ne({aspectRatio:at,width:Te,height:st},"cover");if(Te=qu.width,st=qu.height,Mt){var Gu=Ne({aspectRatio:at,width:Re,height:Ze},J.resize);Re=Gu.width,Ze=Gu.height}else{var Xu=Ne({aspectRatio:at,width:Re,height:Ze}),Yu=Xu.width;Re=Yu===void 0?R:Yu;var Ku=Xu.height;Ze=Ku===void 0?V:Ku}Re=Math.floor(ye(Math.min(Math.max(Re,Te),je))),Ze=Math.floor(ye(Math.min(Math.max(Ze,st),Ct)));var Ay=-Re/2,By=-Ze/2,Ny=Re,zy=Ze,el=[];if(Mt){var Qu=0,Zu=0,tl=R,il=V,Ju=Ne({aspectRatio:at,width:R,height:V},{contain:"cover",cover:"contain"}[J.resize]);tl=Ju.width,il=Ju.height,Qu=(R-tl)/2,Zu=(V-il)/2,el.push(Qu,Zu,tl,il)}if(el.push(Ay,By,Ny,zy),xt){var ep=[Ze,Re];Re=ep[0],Ze=ep[1]}ve.width=Re,ve.height=Ze,de(J.mimeType)||(J.mimeType=ge.type);var tp="transparent";ge.size>J.convertSize&&J.convertTypes.indexOf(J.mimeType)>=0&&(J.mimeType="image/jpeg");var ip=J.mimeType==="image/jpeg";if(ip&&(tp="#fff"),be.fillStyle=tp,be.fillRect(0,0,Re,Ze),J.beforeDraw&&J.beforeDraw.call(this,be,ve),!this.aborted&&(be.save(),be.translate(Re/2,Ze/2),be.rotate(G*Math.PI/180),be.scale(Y,re),be.drawImage.apply(be,[Z].concat(el)),be.restore(),J.drew&&J.drew.call(this,be,ve),!this.aborted)){var np=function(Dr){if(!T.aborted){var rp=function(kr){return T.done({naturalWidth:R,naturalHeight:V,result:kr})};if(Dr&&ip&&J.retainExif&&T.exif&&T.exif.length>0){var op=function(kr){return rp(d(S(Se(kr,T.exif),J.mimeType)))};if(Dr.arrayBuffer)Dr.arrayBuffer().then(op).catch(function(){T.fail(new Error("Failed to read the compressed image with Blob.arrayBuffer()."))});else{var zn=new ze;T.reader=zn,zn.onload=function(nl){var kr=nl.target;op(kr.result)},zn.onabort=function(){T.fail(new Error("Aborted to read the compressed image with FileReader."))},zn.onerror=function(){T.fail(new Error("Failed to read the compressed image with FileReader."))},zn.onloadend=function(){T.reader=null},zn.readAsArrayBuffer(Dr)}}else rp(Dr)}};ve.toBlob?ve.toBlob(np,J.mimeType,J.quality):np(d(ve.toDataURL(J.mimeType,J.quality)))}}},{key:"done",value:function(k){var T=k.naturalWidth,R=k.naturalHeight,V=k.result,ie=this.file,G=this.image,$=this.options;if(te&&G.src.indexOf("blob:")===0&&te.revokeObjectURL(G.src),V)if($.strict&&!$.retainExif&&V.size>ie.size&&$.mimeType===ie.type&&!($.width>T||$.height>R||$.minWidth>T||$.minHeight>R||$.maxWidth<T||$.maxHeight<R))V=ie;else{var Y=new Date;V.lastModified=Y.getTime(),V.lastModifiedDate=Y,V.name=ie.name,V.name&&V.type!==ie.type&&(V.name=V.name.replace(Rt,oe(V.type)))}else V=ie;this.result=V,$.success&&$.success.call(this,V)}},{key:"fail",value:function(k){var T=this.options;if(T.error)T.error.call(this,k);else throw k}},{key:"abort",value:function(){this.aborted||(this.aborted=!0,this.reader?this.reader.abort():this.image.complete?this.fail(new Error("The compression process has been aborted.")):(this.image.onload=null,this.image.onabort()))}}],[{key:"noConflict",value:function(){return window.Compressor=he,F}},{key:"setDefaults",value:function(k){s(g,k)}}]),F}();return X})});var fy=j((Uu,Wu)=>{((i,e)=>{typeof define=="function"&&define.amd?define([],e):typeof Wu=="object"&&typeof Uu<"u"?Wu.exports=e():i.Papa=e()})(Uu,function i(){var e=typeof self<"u"?self:typeof window<"u"?window:e!==void 0?e:{},t,n=!e.document&&!!e.postMessage,r=e.IS_PAPA_WORKER||!1,o={},s=0,a={};function l(b){this._handle=null,this._finished=!1,this._completed=!1,this._halted=!1,this._input=null,this._baseIndex=0,this._partialLine="",this._rowCount=0,this._start=0,this._nextChunk=null,this.isFirstChunk=!0,this._completeResults={data:[],errors:[],meta:{}},function(w){var S=de(w);S.chunkSize=parseInt(S.chunkSize),w.step||w.chunk||(S.chunkSize=null),this._handle=new h(S),(this._handle.streamer=this)._config=S}.call(this,b),this.parseChunk=function(w,S){var A=parseInt(this._config.skipFirstNLines)||0;if(this.isFirstChunk&&0<A){let K=this._config.newline;K||(L=this._config.quoteChar||'"',K=this._handle.guessLineEndings(w,L)),w=[...w.split(K).slice(A)].join(K)}this.isFirstChunk&&ee(this._config.beforeFirstChunk)&&(L=this._config.beforeFirstChunk(w))!==void 0&&(w=L),this.isFirstChunk=!1,this._halted=!1;var A=this._partialLine+w,L=(this._partialLine="",this._handle.parse(A,this._baseIndex,!this._finished));if(!this._handle.paused()&&!this._handle.aborted()){if(w=L.meta.cursor,A=(this._finished||(this._partialLine=A.substring(w-this._baseIndex),this._baseIndex=w),L&&L.data&&(this._rowCount+=L.data.length),this._finished||this._config.preview&&this._rowCount>=this._config.preview),r)e.postMessage({results:L,workerId:a.WORKER_ID,finished:A});else if(ee(this._config.chunk)&&!S){if(this._config.chunk(L,this._handle),this._handle.paused()||this._handle.aborted())return void(this._halted=!0);this._completeResults=L=void 0}return this._config.step||this._config.chunk||(this._completeResults.data=this._completeResults.data.concat(L.data),this._completeResults.errors=this._completeResults.errors.concat(L.errors),this._completeResults.meta=L.meta),this._completed||!A||!ee(this._config.complete)||L&&L.meta.aborted||(this._config.complete(this._completeResults,this._input),this._completed=!0),A||L&&L.meta.paused||this._nextChunk(),L}this._halted=!0},this._sendError=function(w){ee(this._config.error)?this._config.error(w):r&&this._config.error&&e.postMessage({workerId:a.WORKER_ID,error:w,finished:!1})}}function c(b){var w;(b=b||{}).chunkSize||(b.chunkSize=a.RemoteChunkSize),l.call(this,b),this._nextChunk=n?function(){this._readChunk(),this._chunkLoaded()}:function(){this._readChunk()},this.stream=function(S){this._input=S,this._nextChunk()},this._readChunk=function(){if(this._finished)this._chunkLoaded();else{if(w=new XMLHttpRequest,this._config.withCredentials&&(w.withCredentials=this._config.withCredentials),n||(w.onload=oe(this._chunkLoaded,this),w.onerror=oe(this._chunkError,this)),w.open(this._config.downloadRequestBody?"POST":"GET",this._input,!n),this._config.downloadRequestHeaders){var S,A=this._config.downloadRequestHeaders;for(S in A)w.setRequestHeader(S,A[S])}var L;this._config.chunkSize&&(L=this._start+this._config.chunkSize-1,w.setRequestHeader("Range","bytes="+this._start+"-"+L));try{w.send(this._config.downloadRequestBody)}catch(K){this._chunkError(K.message)}n&&w.status===0&&this._chunkError()}},this._chunkLoaded=function(){w.readyState===4&&(w.status<200||400<=w.status?this._chunkError():(this._start+=this._config.chunkSize||w.responseText.length,this._finished=!this._config.chunkSize||this._start>=(S=>(S=S.getResponseHeader("Content-Range"))!==null?parseInt(S.substring(S.lastIndexOf("/")+1)):-1)(w),this.parseChunk(w.responseText)))},this._chunkError=function(S){S=w.statusText||S,this._sendError(new Error(S))}}function d(b){(b=b||{}).chunkSize||(b.chunkSize=a.LocalChunkSize),l.call(this,b);var w,S,A=typeof FileReader<"u";this.stream=function(L){this._input=L,S=L.slice||L.webkitSlice||L.mozSlice,A?((w=new FileReader).onload=oe(this._chunkLoaded,this),w.onerror=oe(this._chunkError,this)):w=new FileReaderSync,this._nextChunk()},this._nextChunk=function(){this._finished||this._config.preview&&!(this._rowCount<this._config.preview)||this._readChunk()},this._readChunk=function(){var L=this._input,K=(this._config.chunkSize&&(K=Math.min(this._start+this._config.chunkSize,this._input.size),L=S.call(L,this._start,K)),w.readAsText(L,this._config.encoding));A||this._chunkLoaded({target:{result:K}})},this._chunkLoaded=function(L){this._start+=this._config.chunkSize,this._finished=!this._config.chunkSize||this._start>=this._input.size,this.parseChunk(L.target.result)},this._chunkError=function(){this._sendError(w.error)}}function u(b){var w;l.call(this,b=b||{}),this.stream=function(S){return w=S,this._nextChunk()},this._nextChunk=function(){var S,A;if(!this._finished)return S=this._config.chunkSize,w=S?(A=w.substring(0,S),w.substring(S)):(A=w,""),this._finished=!w,this.parseChunk(A)}}function g(b){l.call(this,b=b||{});var w=[],S=!0,A=!1;this.pause=function(){l.prototype.pause.apply(this,arguments),this._input.pause()},this.resume=function(){l.prototype.resume.apply(this,arguments),this._input.resume()},this.stream=function(L){this._input=L,this._input.on("data",this._streamData),this._input.on("end",this._streamEnd),this._input.on("error",this._streamError)},this._checkIsFinished=function(){A&&w.length===1&&(this._finished=!0)},this._nextChunk=function(){this._checkIsFinished(),w.length?this.parseChunk(w.shift()):S=!0},this._streamData=oe(function(L){try{w.push(typeof L=="string"?L:L.toString(this._config.encoding)),S&&(S=!1,this._checkIsFinished(),this.parseChunk(w.shift()))}catch(K){this._streamError(K)}},this),this._streamError=oe(function(L){this._streamCleanUp(),this._sendError(L)},this),this._streamEnd=oe(function(){this._streamCleanUp(),A=!0,this._streamData("")},this),this._streamCleanUp=oe(function(){this._input.removeListener("data",this._streamData),this._input.removeListener("end",this._streamEnd),this._input.removeListener("error",this._streamError)},this)}function h(b){var w,S,A,L,K=Math.pow(2,53),ye=-K,Ne=/^\s*-?(\d+\.?|\.\d+|\d+\.\d+)([eE][-+]?\d+)?\s*$/,Pe=/^((\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z)))$/,Se=this,Q=0,ze=0,te=!1,Rt=!1,he=[],X={data:[],errors:[],meta:{}};function F(R){return b.skipEmptyLines==="greedy"?R.join("").trim()==="":R.length===1&&R[0].length===0}function C(){if(X&&A&&(T("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+a.DefaultDelimiter+"'"),A=!1),b.skipEmptyLines&&(X.data=X.data.filter(function($){return!F($)})),k()){let $=function(Y,ne){ee(b.transformHeader)&&(Y=b.transformHeader(Y,ne)),he.push(Y)};var G=$;if(X)if(Array.isArray(X.data[0])){for(var R=0;k()&&R<X.data.length;R++)X.data[R].forEach($);X.data.splice(0,1)}else X.data.forEach($)}function V($,Y){for(var ne=b.header?{}:[],re=0;re<$.length;re++){var ge=re,Z=$[re],Z=((J,ve)=>(be=>(b.dynamicTypingFunction&&b.dynamicTyping[be]===void 0&&(b.dynamicTyping[be]=b.dynamicTypingFunction(be)),(b.dynamicTyping[be]||b.dynamicTyping)===!0))(J)?ve==="true"||ve==="TRUE"||ve!=="false"&&ve!=="FALSE"&&((be=>{if(Ne.test(be)&&(be=parseFloat(be),ye<be&&be<K))return 1})(ve)?parseFloat(ve):Pe.test(ve)?new Date(ve):ve===""?null:ve):ve)(ge=b.header?re>=he.length?"__parsed_extra":he[re]:ge,Z=b.transform?b.transform(Z,ge):Z);ge==="__parsed_extra"?(ne[ge]=ne[ge]||[],ne[ge].push(Z)):ne[ge]=Z}return b.header&&(re>he.length?T("FieldMismatch","TooManyFields","Too many fields: expected "+he.length+" fields but parsed "+re,ze+Y):re<he.length&&T("FieldMismatch","TooFewFields","Too few fields: expected "+he.length+" fields but parsed "+re,ze+Y)),ne}var ie;X&&(b.header||b.dynamicTyping||b.transform)&&(ie=1,!X.data.length||Array.isArray(X.data[0])?(X.data=X.data.map(V),ie=X.data.length):X.data=V(X.data,0),b.header&&X.meta&&(X.meta.fields=he),ze+=ie)}function k(){return b.header&&he.length===0}function T(R,V,ie,G){R={type:R,code:V,message:ie},G!==void 0&&(R.row=G),X.errors.push(R)}ee(b.step)&&(L=b.step,b.step=function(R){X=R,k()?C():(C(),X.data.length!==0&&(Q+=R.data.length,b.preview&&Q>b.preview?S.abort():(X.data=X.data[0],L(X,Se))))}),this.parse=function(R,V,ie){var G=b.quoteChar||'"',G=(b.newline||(b.newline=this.guessLineEndings(R,G)),A=!1,b.delimiter?ee(b.delimiter)&&(b.delimiter=b.delimiter(R),X.meta.delimiter=b.delimiter):((G=(($,Y,ne,re,ge)=>{var Z,J,ve,be;ge=ge||[","," ","|",";",a.RECORD_SEP,a.UNIT_SEP];for(var xt=0;xt<ge.length;xt++){for(var Mt,je=ge[xt],Ct=0,Te=0,st=0,at=(ve=void 0,new E({comments:re,delimiter:je,newline:Y,preview:10}).parse($)),Re=0;Re<at.data.length;Re++)ne&&F(at.data[Re])?st++:(Mt=at.data[Re].length,Te+=Mt,ve===void 0?ve=Mt:0<Mt&&(Ct+=Math.abs(Mt-ve),ve=Mt));0<at.data.length&&(Te/=at.data.length-st),(J===void 0||Ct<=J)&&(be===void 0||be<Te)&&1.99<Te&&(J=Ct,Z=je,be=Te)}return{successful:!!(b.delimiter=Z),bestDelimiter:Z}})(R,b.newline,b.skipEmptyLines,b.comments,b.delimitersToGuess)).successful?b.delimiter=G.bestDelimiter:(A=!0,b.delimiter=a.DefaultDelimiter),X.meta.delimiter=b.delimiter),de(b));return b.preview&&b.header&&G.preview++,w=R,S=new E(G),X=S.parse(w,V,ie),C(),te?{meta:{paused:!0}}:X||{meta:{paused:!1}}},this.paused=function(){return te},this.pause=function(){te=!0,S.abort(),w=ee(b.chunk)?"":w.substring(S.getCharIndex())},this.resume=function(){Se.streamer._halted?(te=!1,Se.streamer.parseChunk(w,!0)):setTimeout(Se.resume,3)},this.aborted=function(){return Rt},this.abort=function(){Rt=!0,S.abort(),X.meta.aborted=!0,ee(b.complete)&&b.complete(X),w=""},this.guessLineEndings=function($,G){$=$.substring(0,1048576);var G=new RegExp(_(G)+"([^]*?)"+_(G),"gm"),ie=($=$.replace(G,"")).split("\r"),G=$.split(`
|
|
2
2
|
`),$=1<G.length&&G[0].length<ie[0].length;if(ie.length===1||$)return`
|
|
3
3
|
`;for(var Y=0,ne=0;ne<ie.length;ne++)ie[ne][0]===`
|
|
4
4
|
`&&Y++;return Y>=ie.length/2?`\r
|
|
@@ -13,7 +13,7 @@ import{A as Wp,B as Ms,C as $p,D as qp,E as El,F as Gp,G as Xp,a as Cp,b as Ds,d
|
|
|
13
13
|
`)}get selectionStart(){return mf(this.element)[0]}get selectionEnd(){return mf(this.element)[1]}setSelectionRange(e,t){bx(this.element,[e??0,t??0])}select(){this.setSelectionRange(0,this.value.length)}};function _x(i){let e=new Oc(i);return new Proxy(i,{get(t,n){if(n in e)return e[n];let r=t[n];return typeof r=="function"?r.bind(t):r},set(t,n,r,o){return Reflect.set(n in e?e:t,n,r,o)}})}var bf=i=>i.isContentEditable?_x(i):i.querySelector("input,textarea")||i,ir={mask:/^.*$/,preprocessors:[],postprocessors:[],plugins:[],overwriteMode:"shift"},Fc=class{constructor(){this.now=null,this.past=[],this.future=[]}undo(){let e=this.past.pop();e&&this.now&&(this.future.push(this.now),this.updateElement(e,"historyUndo"))}redo(){let e=this.future.pop();e&&this.now&&(this.past.push(this.now),this.updateElement(e,"historyRedo"))}updateHistory(e){if(!this.now){this.now=e;return}let t=this.now.value!==e.value,n=this.now.selection.some((r,o)=>r!==e.selection[o]);!t&&!n||(t&&(this.past.push(this.now),this.future=[]),this.now=e)}updateElement(e,t){this.now=e,this.updateElementState(e,{inputType:t,data:null})}};function wx(i,...e){return e.every(({value:t})=>t===i.value)}function xx(i,...e){return e.every(({value:t,selection:n})=>t===i.value&&n[0]===i.selection[0]&&n[1]===i.selection[1])}function Cx({value:i,selection:e},t,n){let[r,o]=e,s=typeof n=="function"?n({value:i,selection:e}):n;return{value:i,selection:s==="replace"?[r,Math.max(r+t.length,o)]:[r,o]}}function Qs(i){return typeof i=="string"}function gf(i,e,t,n){let r="";for(let o=e.length;o<i.length;o++){let s=i[o]||"",a=n?.value[o]===s;if(!Qs(s)||s===t&&!a)return r;r+=s}return r}function _f(i,e){return Array.isArray(e)?i.length===e.length&&Array.from(i).every((t,n)=>{let r=e[n]||"";return Qs(r)?t===r:t.match(r)}):e.test(i)}function Sx(i,e,t){let n=null,r=null,o=Array.from(i.value).reduce((a,l,c)=>{let d=gf(e,a,l,t),u=a+d,g=e[u.length]||"";return n===null&&c>=i.selection[0]&&(n=u.length),r===null&&c>=i.selection[1]&&(r=u.length),Qs(g)?u+g:l.match(g)?u+l:u},""),s=gf(e,o,"",t);return{value:_f(o+s,e)?o+s:o,selection:[n??o.length,r??o.length]}}function Px({value:i,selection:e},t){let[n,r]=e,o=n,s=r,a=Array.from(i).reduce((l,c,d)=>{let u=l+c;return n===d&&(o=l.length),r===d&&(s=l.length),u.match(t)?u:l},"");return{value:a,selection:[Math.min(o,a.length),Math.min(s,a.length)]}}function Xs(i,e,t=null){if(_f(i.value,e))return i;let{value:n,selection:r}=Array.isArray(e)?Sx(i,e,t):Px(i,e);return{selection:r,value:Array.isArray(e)?n.slice(0,e.length):n}}function yf(i,e){if(!Array.isArray(e))return i;let[t,n]=i.selection,r=[],o=Array.from(i.value).reduce((s,a,l)=>{let c=e[l]||"";return l===t&&r.push(s.length),l===n&&r.push(s.length),Qs(c)&&c===a?s:s+a},"");return r.length<2&&r.push(...new Array(2-r.length).fill(o.length)),{value:o,selection:[r[0],r[1]]}}var Yr=class{constructor(e,t){this.initialElementState=e,this.maskOptions=t,this.value="",this.selection=[0,0];let{value:n,selection:r}=Xs(this.initialElementState,this.getMaskExpression(this.initialElementState));this.value=n,this.selection=r}addCharacters([e,t],n){let{value:r,maskOptions:o}=this,s=this.getMaskExpression({value:r.slice(0,e)+n+r.slice(t),selection:[e+n.length,e+n.length]}),a={value:r,selection:[e,t]},l=yf(a,s),[c,d]=Cx(l,n,o.overwriteMode).selection,u=l.value.slice(0,c)+n,g=u.length,h=Xs({value:u+l.value.slice(d),selection:[g,g]},s,a);if(r.slice(0,e)===Xs({value:u,selection:[g,g]},s,a).value||xx(this,h))throw new Error("Invalid mask value");this.value=h.value,this.selection=h.selection}deleteCharacters([e,t]){if(e===t||!t)return;let{value:n}=this,r=this.getMaskExpression({value:n.slice(0,e)+n.slice(t),selection:[e,e]}),o={value:n,selection:[e,t]},s=yf(o,r),[a,l]=s.selection,c=s.value.slice(0,a)+s.value.slice(l),d=Xs({value:c,selection:[a,a]},r,o);this.value=d.value,this.selection=d.selection}getMaskExpression(e){let{mask:t}=this.maskOptions;return typeof t=="function"?t(e):t}},Rc=class{constructor(e){this.element=e,this.listeners=[]}listen(e,t,n){let r=t;this.element.addEventListener(e,r,n),this.listeners.push(()=>this.element.removeEventListener(e,r,n))}destroy(){this.listeners.forEach(e=>e())}},ci={CTRL:1,ALT:2,SHIFT:4,META:8},Gr={Y:89,Z:90};function Xr(i,e,t){return i.ctrlKey===!!(e&ci.CTRL)&&i.altKey===!!(e&ci.ALT)&&i.shiftKey===!!(e&ci.SHIFT)&&i.metaKey===!!(e&ci.META)&&i.keyCode===t}function Ex(i){return Xr(i,ci.CTRL,Gr.Y)||Xr(i,ci.CTRL|ci.SHIFT,Gr.Z)||Xr(i,ci.META|ci.SHIFT,Gr.Z)}function Dx(i){return Xr(i,ci.CTRL,Gr.Z)||Xr(i,ci.META,Gr.Z)}function nr(i,e){var t;let n=i.value;if(typeof e=="string")i.value=e;else{let[r,o]=e.selection;i.value=e.value,i.matches(":focus")&&((t=i.setSelectionRange)===null||t===void 0||t.call(i,r,o))}i.value!==n&&i.dispatchEvent(new Event("input",{bubbles:!0}))}function kx({value:i,selection:e},t){let[n,r]=e;if(n!==r)return[n,r];let o=t?i.slice(n).indexOf(`
|
|
14
14
|
`)+1||i.length:i.slice(0,r).lastIndexOf(`
|
|
15
15
|
`)+1;return[t?n:o,t?o:r]}function Tx({value:i,selection:e},t){let[n,r]=e;return n!==r?[n,r]:(t?[n,r+1]:[n-1,r]).map(s=>Math.min(Math.max(s,0),i.length))}var Ix=/\s+$/g,Ox=/^\s+/g,vf=/\s/;function Fx({value:i,selection:e},t){let[n,r]=e;if(n!==r)return[n,r];if(t){let l=i.slice(n),[c]=l.match(Ox)||[""],d=l.trimStart().search(vf);return[n,d!==-1?n+c.length+d:i.length]}let o=i.slice(0,r),[s]=o.match(Ix)||[""],a=o.trimEnd().split("").reverse().findIndex(l=>vf.exec(l));return[a!==-1?r-s.length-a:0,r]}function Ys(i=[]){return(e,...t)=>i.reduce((n,r)=>Object.assign(Object.assign({},n),r(n,...t)),e)}function un(i,e){let t=Object.assign(Object.assign({},ir),e),n=Ys(t.preprocessors),r=Ys(t.postprocessors),o=typeof i=="string"?{value:i,selection:[0,0]}:i,{elementState:s}=n({elementState:o,data:""},"validation"),a=new Yr(s,t),{value:l,selection:c}=r(a,o);return typeof i=="string"?l:{value:l,selection:c}}var Ks=class extends Fc{constructor(e,t){super(),this.element=e,this.maskitoOptions=t,this.isTextArea=this.element.nodeName==="TEXTAREA",this.eventListener=new Rc(this.element),this.options=Object.assign(Object.assign({},ir),this.maskitoOptions),this.upcomingElementState=null,this.preprocessor=Ys(this.options.preprocessors),this.postprocessor=Ys(this.options.postprocessors),this.teardowns=this.options.plugins.map(n=>n(this.element,this.options)),this.updateHistory(this.elementState),this.eventListener.listen("keydown",n=>{if(Ex(n))return n.preventDefault(),this.redo();if(Dx(n))return n.preventDefault(),this.undo()}),this.eventListener.listen("beforeinput",n=>{var r,o,s;let a=n.inputType.includes("Forward");switch(this.updateHistory(this.elementState),n.inputType){case"deleteByCut":case"deleteContentBackward":case"deleteContentForward":return this.handleDelete({event:n,isForward:a,selection:Tx(this.elementState,a)});case"deleteHardLineBackward":case"deleteHardLineForward":case"deleteSoftLineBackward":case"deleteSoftLineForward":return this.handleDelete({event:n,isForward:a,selection:kx(this.elementState,a),force:!0});case"deleteWordBackward":case"deleteWordForward":return this.handleDelete({event:n,isForward:a,selection:Fx(this.elementState,a),force:!0});case"historyRedo":return n.preventDefault(),this.redo();case"historyUndo":return n.preventDefault(),this.undo();case"insertCompositionText":return;case"insertLineBreak":case"insertParagraph":return this.handleEnter(n);case"insertReplacementText":return;case"insertFromDrop":case"insertFromPaste":case"insertText":default:return this.handleInsert(n,(s=(r=n.data)!==null&&r!==void 0?r:(o=n.dataTransfer)===null||o===void 0?void 0:o.getData("text/plain"))!==null&&s!==void 0?s:"")}}),this.eventListener.listen("input",()=>{this.upcomingElementState&&(this.updateElementState(this.upcomingElementState),this.upcomingElementState=null)},{capture:!0}),this.eventListener.listen("input",({inputType:n})=>{n!=="insertCompositionText"&&(this.ensureValueFitsMask(),this.updateHistory(this.elementState))}),this.eventListener.listen("compositionend",()=>{this.ensureValueFitsMask(),this.updateHistory(this.elementState)})}destroy(){this.eventListener.destroy(),this.teardowns.forEach(e=>e?.())}updateElementState({value:e,selection:t},n){let r=this.elementState.value;this.updateValue(e),this.updateSelectionRange(t),n&&r!==e&&this.dispatchInputEvent(n)}get elementState(){let{value:e,selectionStart:t,selectionEnd:n}=this.element;return{value:e,selection:[t??0,n??0]}}get maxLength(){let{maxLength:e}=this.element;return e===-1?1/0:e}updateSelectionRange([e,t]){var n;let{element:r}=this;r.matches(":focus")&&(r.selectionStart!==e||r.selectionEnd!==t)&&((n=r.setSelectionRange)===null||n===void 0||n.call(r,e,t))}updateValue(e){this.element.value=e}ensureValueFitsMask(){this.updateElementState(un(this.elementState,this.options),{inputType:"insertText",data:null})}dispatchInputEvent(e={inputType:"insertText",data:null}){globalThis.InputEvent&&this.element.dispatchEvent(new InputEvent("input",Object.assign(Object.assign({},e),{bubbles:!0,cancelable:!1})))}handleDelete({event:e,selection:t,isForward:n,force:r=!1}){let o={value:this.elementState.value,selection:t},[s,a]=o.selection,{elementState:l}=this.preprocessor({elementState:o,data:""},n?"deleteForward":"deleteBackward"),c=new Yr(l,this.options),[d,u]=l.selection;c.deleteCharacters([d,u]);let g=this.postprocessor(c,o);if(!(o.value.slice(0,s)+o.value.slice(a)===g.value&&!r&&!this.element.isContentEditable)){if(wx(o,l,c,g))return e.preventDefault(),this.updateSelectionRange(n?[u,u]:[d,d]);this.upcomingElementState=g}}handleInsert(e,t){let{options:n,maxLength:r,element:o,elementState:s}=this,{elementState:a,data:l=t}=this.preprocessor({data:t,elementState:s},"insert"),c=new Yr(a,n);try{c.addCharacters(a.selection,l)}catch{return e.preventDefault()}let[d,u]=a.selection,g=s.value.slice(0,d)+t+s.value.slice(u),h=this.postprocessor(c,s);if(h.value.length>r)return e.preventDefault();(g!==h.value||o.isContentEditable)&&(this.upcomingElementState=h,n.overwriteMode==="replace"&&g.length>r&&this.dispatchInputEvent({inputType:"insertText",data:t}))}handleEnter(e){(this.isTextArea||this.element.isContentEditable)&&this.handleInsert(e,`
|
|
16
|
-
`)}};function rr(i,e,t){let n=Math.min(Number(t),Math.max(Number(e),Number(i)));return i instanceof Date?new Date(n):n}var Rx=[".",",","\u0431","\u044E"];var Ac="\xA0",Mx="\u200B",Pf="\u2013",Ef="\u2014",Zs="-",Mc="\u2212",Df="\u30FC";var VT=new RegExp(`[${Ac}APM]+$`,"g"),UT=new RegExp(`${Ac}[AP]M$`,"g"),Ax=[":","."];function or(i){return i}function Bx(){}var kf=/[\\^$.*+?()[\]{}|]/g,Nx=new RegExp(kf.source);function gt(i){return i&&Nx.test(i)?i.replaceAll(kf,String.raw`\$&`):i}function di(i,{prefix:e,postfix:t}){var n,r;let o=new RegExp(`^${gt(e)}`),s=new RegExp(`${gt(t)}$`),[a=""]=(n=i.match(o))!==null&&n!==void 0?n:[],[l=""]=(r=i.match(s))!==null&&r!==void 0?r:[];return{extractedPrefix:a,extractedPostfix:l,cleanValue:a||l?i.slice(a.length,l.length?-l.length:1/0):i}}function zx(i,e){let t="";for(let n=0;n<i.length;n++){if(i[n]!==e[n])return t;t+=i[n]}return t}function wf(i){return i.replaceAll(/[0-9]/g,e=>String.fromCharCode(e.charCodeAt(0)-65248))}function Lx(){return({elementState:i,data:e})=>{let{value:t,selection:n}=i;return{elementState:{selection:n,value:wf(t)},data:wf(e)}}}var WT=new RegExp(`[${Ax.map(gt).join("")}]$`);function Hx(i){let e=new RegExp(`${gt(i)}$`);return i?({value:t,selection:n},r)=>{if(!t&&!r.value.endsWith(i))return{value:t,selection:n};if(!t.endsWith(i)&&!r.value.endsWith(i))return{selection:n,value:t+i};let o=r.value.replace(e,""),s=r.selection[1]>o.length,a=zx(o,t);return{selection:n,value:Array.from(i).reverse().reduce((l,c,d)=>{let u=l.length-1-d,g=a[u]===c&&s;return l[u]!==c||g?l.slice(0,u+1)+c+l.slice(u+1):l},t)}}:or}function jx(i){return i?({value:e,selection:t},n)=>{if(e.startsWith(i)||!e&&!n.value.startsWith(i))return{value:e,selection:t};let[r,o]=t,s=Array.from(i).reduce((l,c,d)=>l[d]===c?l:l.slice(0,d)+c+l.slice(d),e),a=s.length-e.length;return{selection:[r+a,o+a],value:s}}:or}function sr(i,e,t){return(n,r)=>{let o=()=>e(n,r);return n.addEventListener(i,o,t),()=>n.removeEventListener(i,o,t)}}function Vx(i){return(e,t)=>{let n=e.ownerDocument,r=0,o=()=>r++,s=()=>{r=Math.max(--r,0)},a=()=>{if(e.matches(":focus")){if(r)return n.addEventListener("mouseup",a,{once:!0,passive:!0});i(e,t)}};return n.addEventListener("selectionchange",a,{passive:!0}),e.addEventListener("mousedown",o,{passive:!0}),n.addEventListener("mouseup",s,{passive:!0}),()=>{n.removeEventListener("selectionchange",a),n.removeEventListener("mousedown",o),n.removeEventListener("mouseup",s)}}}function Tf(i){return Vx(e=>{var t,n;let r=(t=e.selectionStart)!==null&&t!==void 0?t:0,o=(n=e.selectionEnd)!==null&&n!==void 0?n:0,[s,a]=i(e.value,[r,o]);(s>r||a<o)&&e.setSelectionRange(rr(r,s,a),rr(o,s,a))})}function Ux({prefix:i,postfix:e}){return({elementState:t,data:n})=>{let{cleanValue:r}=di(n,{prefix:i,postfix:e});return{elementState:t,data:r}}}function If({decimalSeparator:i,isNegativeAllowed:e,precision:t,thousandSeparator:n,prefix:r,postfix:o,decimalPseudoSeparators:s=[],pseudoMinuses:a=[],minusSign:l}){let c=xf(r),d=String.raw`\d`,u=e?`[${l}${a.map(N=>`\\${N}`).join("")}]?`:"",g=n?`[${d}${gt(n).replaceAll(/\s/g,String.raw`\s`)}]*`:`[${d}]*`,h=Number.isFinite(t)?t:"",_=t>0?`([${gt(i)}${s.map(gt).join("")}]${d}{0,${h}})?`:"",E=xf(o);return new RegExp(`^${c}${u}${g}${_}${E}$`)}function xf(i){return i?`${i.split("").map(e=>`${gt(e)}?`).join("")}`:""}function Bc(i,e="."){let t=!!new RegExp(`^\\D*[${Mc}\\${Zs}${Pf}${Ef}${Df}]`).exec(i),n=gt(e),r=i.replaceAll(new RegExp(`${n}(?!\\d)`,"g"),"").replaceAll(new RegExp(`[^\\d${n}]`,"g"),"").replace(e,e&&".");return r?+`${t?Zs:""}${r}`:NaN}function Wx(i){var e;let t=String(i),[n="",r]=t.split("e-"),o=t;if(r){let[,s]=n.split("."),a=Number(r)+((e=s?.length)!==null&&e!==void 0?e:0);o=i.toFixed(a)}return o}function Of(i,{decimalSeparator:e,minusSign:t}){let[n="",r=""]=e?i.split(e):[i],o=gt(t),[,s="",a=""]=new RegExp(`^(?:[^\\d${o}])?(${o})?(.*)`).exec(n)||[];return{minus:s,integerPart:a,decimalPart:r}}function $x({decimalSeparator:i,thousandSeparator:e,decimalPseudoSeparators:t=Rx}){return t.filter(n=>n!==e&&n!==i)}function qx({decimalSeparator:i,precision:e,decimalZeroPadding:t,prefix:n,postfix:r}){return e<=0||!t?or:({value:o,selection:s})=>{let{cleanValue:a,extractedPrefix:l,extractedPostfix:c}=di(o,{prefix:n,postfix:r});if(Number.isNaN(Bc(a,i)))return{value:o,selection:s};let[d,u=""]=a.split(i);return{value:l+d+i+u.padEnd(e,"0")+c,selection:s}}}function Gx({prefix:i,postfix:e,decimalSeparator:t,minusSign:n}){return({value:r,selection:o})=>{let[s]=o,{cleanValue:a,extractedPrefix:l,extractedPostfix:c}=di(r,{prefix:i,postfix:e}),{minus:d,integerPart:u,decimalPart:g}=Of(a,{decimalSeparator:t,minusSign:n}),h=!u&&!g&&!!t&&a.includes(t);return!u&&!Number(g)&&s===(d+l).length||h?{selection:o,value:l+d+c}:{value:r,selection:o}}}function Xx({decimalSeparator:i,decimalPseudoSeparators:e,pseudoMinuses:t,prefix:n,postfix:r,minusSign:o}){let s=!0,a=If({decimalSeparator:i,decimalPseudoSeparators:e,pseudoMinuses:t,prefix:"",postfix:"",thousandSeparator:"",precision:1/0,isNegativeAllowed:!0,minusSign:o});return({elementState:l,data:c})=>{if(!s)return{elementState:l,data:c};s=!1;let{value:d,selection:u}=l,[g,h]=u,{extractedPrefix:_,cleanValue:E,extractedPostfix:N}=di(d,{prefix:n,postfix:r}),M=un({selection:[Math.max(g-_.length,0),rr(h-_.length,0,E.length)],value:E},{mask:a}),[U,de]=M.selection;return{elementState:{selection:[U+_.length,de+_.length],value:_+M.value+N},data:c}}}function Yx({decimalSeparator:i,thousandSeparator:e,prefix:t,postfix:n}){let r=s=>{let a=gt(e);return s.replace(new RegExp(`^(\\D+)?[0${a}]+(?=0)`),"$1").replace(new RegExp(`^(\\D+)?[0${a}]+(?=[1-9])`),"$1")},o=(s,a)=>{let l=s.slice(0,a),c=s.slice(a).startsWith("0");return l.length-r(l).length+(c?1:0)};return({value:s,selection:a})=>{let[l,c]=a,{cleanValue:d,extractedPrefix:u,extractedPostfix:g}=di(s,{prefix:t,postfix:n}),h=!!i&&d.includes(i),[_="",E=""]=i?d.split(i):[d],N=r(_);if(_===N)return{value:s,selection:a};let M=l-o(s,l),U=c-o(s,c);return{value:u+N+(h?i:"")+E+g,selection:[Math.max(M,0),Math.max(U,0)]}}}function Kx({min:i,max:e,decimalSeparator:t,minusSign:n}){return({value:r,selection:o})=>{let s=Bc(r,t),a=s>0?Math.min(s,e):Math.max(s,i);if(s&&a!==s){let l=`${a}`.replace(".",t).replace(Zs,n);return{value:l,selection:[l.length,l.length]}}return{value:r,selection:o}}}function Qx({decimalSeparator:i,thousandSeparator:e,decimalZeroPadding:t}){return({elementState:n,data:r},o)=>{let{value:s,selection:a}=n,[l,c]=a,d=s.slice(l,c),u=t?[i,e]:[e],g=t&&l>s.indexOf(i)&&!!d.match(/^0+$/gi);return o!=="deleteBackward"&&o!=="deleteForward"||!u.includes(d)&&!g?{elementState:n,data:r}:{elementState:{value:s,selection:o==="deleteForward"?[c,c]:[l,l]},data:r}}}function Zx({decimalSeparator:i,precision:e,prefix:t,postfix:n}){let r=new RegExp(`^\\D*${gt(i)}`);return({elementState:o,data:s})=>{let{value:a,selection:l}=o,{cleanValue:c,extractedPrefix:d}=di(a,{prefix:t,postfix:n}),[u,g]=l,h=rr(u-d.length,0,c.length),_=rr(g-d.length,0,c.length);if(e<=0||c.slice(0,h).includes(i)||c.slice(_).includes(i)||!s.match(r))return{elementState:o,data:s};let E=/\d+/.exec(c.slice(0,h));return{elementState:o,data:E?s:`0${s}`}}}function Cf({validCharacter:i,pseudoCharacters:e,prefix:t,postfix:n}){let r=new RegExp(`[${e.join("")}]`,"gi");return({elementState:o,data:s})=>{let{value:a,selection:l}=o,{cleanValue:c,extractedPostfix:d,extractedPrefix:u}=di(a,{prefix:t,postfix:n});return{elementState:{selection:l,value:u+c.replace(r,i)+d},data:s.replace(r,i)}}}function Jx({decimalSeparator:i,prefix:e,postfix:t}){return i?({elementState:n,data:r})=>{let{value:o,selection:s}=n,[a,l]=s,{cleanValue:c}=di(o,{prefix:e,postfix:t});return{elementState:n,data:!c.includes(i)||o.slice(a,l+1).includes(i)?r:r.replaceAll(new RegExp(gt(i),"gi"),"")}}:or}function eC({thousandSeparator:i,decimalSeparator:e,prefix:t,postfix:n,minusSign:r}){if(!i)return or;let o=(...s)=>s.every(a=>/\s/.test(a));return({value:s,selection:a})=>{let[l,c]=a,[d,u]=a,{cleanValue:g,extractedPostfix:h,extractedPrefix:_}=di(s,{prefix:t,postfix:n}),{minus:E,integerPart:N,decimalPart:M}=Of(g,{decimalSeparator:e,minusSign:r}),U=e&&g.includes(e),de=g.length-(E+N+(U?e+M:"")).length;de>0&&l&&l<=de&&(d-=de),de>0&&c&&c<=de&&(u-=de);let oe=Array.from(N).reduceRight((ee,b,w)=>{let A=!(!w&&b===i)&&!!ee.length&&(ee.length+1)%4===0,L=b===i||o(b,i);return A&&L?i+ee:!A&&L?(w&&w<=l&&d--,w&&w<=c&&u--,ee):A?(w<l&&d++,w<c&&u++,b+i+ee):b+ee},"");return{value:_+E+oe+(U?e:"")+M+h,selection:[d,u]}}}function tC({precision:i,decimalSeparator:e,prefix:t,postfix:n}){if(i>0||!e)return or;let r=new RegExp(`${gt(e)}.*$`,"g");return({elementState:o,data:s})=>{let{value:a,selection:l}=o,{cleanValue:c,extractedPrefix:d,extractedPostfix:u}=di(a,{prefix:t,postfix:n}),[g,h]=l,_=d+c.replace(r,"")+u;return{elementState:{selection:[Math.min(g,_.length),Math.min(h,_.length)],value:_},data:s.replace(r,"")}}}var Sf=[0,0];function iC({decimalSeparator:i,thousandSeparator:e,prefix:t,postfix:n}){let r=Yx({decimalSeparator:i,thousandSeparator:e,prefix:t,postfix:n});return sr("blur",o=>{let s=r({value:o.value,selection:Sf},{value:"",selection:Sf}).value;nr(o,s)},{capture:!0})}function nC({min:i,max:e,decimalSeparator:t}){return sr("blur",(n,r)=>{let o=Bc(n.value,t),s=rr(o,i,e);!Number.isNaN(o)&&o!==s&&nr(n,un(Wx(s),r))},{capture:!0})}function rC({decimalSeparator:i,prefix:e,postfix:t}){return i?sr("blur",n=>{let{cleanValue:r,extractedPostfix:o,extractedPrefix:s}=di(n.value,{prefix:e,postfix:t}),a=s+r.replace(new RegExp(`^(\\D+)?${gt(i)}`),`$10${i}`)+o;nr(n,a)},{capture:!0}):Bx}function ar({max:i=Number.MAX_SAFE_INTEGER,min:e=Number.MIN_SAFE_INTEGER,precision:t=0,thousandSeparator:n=Ac,decimalSeparator:r=".",decimalPseudoSeparators:o,decimalZeroPadding:s=!1,prefix:a="",postfix:l="",minusSign:c=Mc}={}){let d=[Zs,Pf,Ef,Df,Mc].filter(_=>_!==n&&_!==r&&_!==c),u=$x({decimalSeparator:r,thousandSeparator:n,decimalPseudoSeparators:o}),g=a.endsWith(r)&&t>0?`${a}${Mx}`:a,h=Xx({decimalSeparator:r,decimalPseudoSeparators:u,pseudoMinuses:d,prefix:g,postfix:l,minusSign:c});return r=t<=0&&r===n?"":r,Object.assign(Object.assign({},ir),{mask:If({decimalSeparator:r,precision:t,thousandSeparator:n,prefix:g,postfix:l,isNegativeAllowed:e<0,minusSign:c}),preprocessors:[Lx(),h,Ux({prefix:g,postfix:l}),Cf({validCharacter:c,pseudoCharacters:d,prefix:g,postfix:l}),Cf({validCharacter:r,pseudoCharacters:u,prefix:g,postfix:l}),Zx({decimalSeparator:r,precision:t,prefix:g,postfix:l}),Qx({decimalSeparator:r,decimalZeroPadding:s,thousandSeparator:n}),tC({precision:t,decimalSeparator:r,prefix:g,postfix:l}),Jx({decimalSeparator:r,prefix:g,postfix:l})],postprocessors:[Kx({decimalSeparator:r,min:e,max:i,minusSign:c}),jx(g),Hx(l),eC({decimalSeparator:r,thousandSeparator:n,prefix:g,postfix:l,minusSign:c}),qx({decimalSeparator:r,decimalZeroPadding:s,precision:t,prefix:g,postfix:l}),Gx({prefix:g,postfix:l,decimalSeparator:r,minusSign:c})],plugins:[iC({decimalSeparator:r,thousandSeparator:n,prefix:g,postfix:l}),rC({decimalSeparator:r,prefix:g,postfix:l}),nC({min:e,max:i,decimalSeparator:r})],overwriteMode:s?({value:_,selection:[E]})=>E<=_.indexOf(r)?"shift":"replace":"shift"})}var Ji=(()=>{class i{constructor(){this.elementRef=z(Et).nativeElement,this.ngZone=z(Pt),this.maskedElement=null,this.options=null,this.elementPredicate=bf;let t=z(tt,{self:!0,optional:!0});if(t){let n=t.writeValue.bind(t);t.writeValue=r=>{n(this.options?un(String(r??""),this.options):r)}}}ngOnChanges(){return B(this,null,function*(){let{elementPredicate:t,options:n,maskedElement:r,elementRef:o,ngZone:s}=this;if(r?.destroy(),!n)return;let a=yield t(o);this.elementPredicate!==t||this.options!==n||s.runOutsideAngular(()=>{this.maskedElement=new Ks(a,n)})})}ngOnDestroy(){this.maskedElement?.destroy()}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275dir=ln({type:i,selectors:[["","maskito",""]],inputs:{options:[0,"maskito","options"],elementPredicate:[0,"maskitoElement","elementPredicate"]},standalone:!0,features:[gi]})}}return i})(),Ff=(()=>{class i{transform(t,n){return un(String(t??""),n??ir)}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275pipe=ts({name:"maskito",type:i,pure:!0,standalone:!0})}}return i})();var sC=20,Mf=(()=>{class i{constructor(t,n,r){this._ngZone=t,this._platform=n,this._scrolled=new et,this._globalSubscription=null,this._scrolledCount=0,this.scrollContainers=new Map,this._document=r}register(t){this.scrollContainers.has(t)||this.scrollContainers.set(t,t.elementScrolled().subscribe(()=>this._scrolled.next(t)))}deregister(t){let n=this.scrollContainers.get(t);n&&(n.unsubscribe(),this.scrollContainers.delete(t))}scrolled(t=sC){return this._platform.isBrowser?new St(n=>{this._globalSubscription||this._addGlobalListener();let r=t>0?this._scrolled.pipe(ol(t)).subscribe(n):this._scrolled.subscribe(n);return this._scrolledCount++,()=>{r.unsubscribe(),this._scrolledCount--,this._scrolledCount||this._removeGlobalListener()}}):Le()}ngOnDestroy(){this._removeGlobalListener(),this.scrollContainers.forEach((t,n)=>this.deregister(n)),this._scrolled.complete()}ancestorScrolled(t,n){let r=this.getAncestorScrollContainers(t);return this.scrolled(n).pipe(Qt(o=>!o||r.indexOf(o)>-1))}getAncestorScrollContainers(t){let n=[];return this.scrollContainers.forEach((r,o)=>{this._scrollableContainsElement(o,t)&&n.push(o)}),n}_getWindow(){return this._document.defaultView||window}_scrollableContainsElement(t,n){let r=zp(n),o=t.getElementRef().nativeElement;do if(r==o)return!0;while(r=r.parentElement);return!1}_addGlobalListener(){this._globalSubscription=this._ngZone.runOutsideAngular(()=>{let t=this._getWindow();return sn(t.document,"scroll").subscribe(()=>this._scrolled.next())})}_removeGlobalListener(){this._globalSubscription&&(this._globalSubscription.unsubscribe(),this._globalSubscription=null)}static{this.\u0275fac=function(n){return new(n||i)(pe(Pt),pe(Ii),pe(mt,8))}}static{this.\u0275prov=Ve({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();var aC=20,Kr=(()=>{class i{constructor(t,n,r){this._platform=t,this._change=new et,this._changeListener=o=>{this._change.next(o)},this._document=r,n.runOutsideAngular(()=>{if(t.isBrowser){let o=this._getWindow();o.addEventListener("resize",this._changeListener),o.addEventListener("orientationchange",this._changeListener)}this.change().subscribe(()=>this._viewportSize=null)})}ngOnDestroy(){if(this._platform.isBrowser){let t=this._getWindow();t.removeEventListener("resize",this._changeListener),t.removeEventListener("orientationchange",this._changeListener)}this._change.complete()}getViewportSize(){this._viewportSize||this._updateViewportSize();let t={width:this._viewportSize.width,height:this._viewportSize.height};return this._platform.isBrowser||(this._viewportSize=null),t}getViewportRect(){let t=this.getViewportScrollPosition(),{width:n,height:r}=this.getViewportSize();return{top:t.top,left:t.left,bottom:t.top+r,right:t.left+n,height:r,width:n}}getViewportScrollPosition(){if(!this._platform.isBrowser)return{top:0,left:0};let t=this._document,n=this._getWindow(),r=t.documentElement,o=r.getBoundingClientRect(),s=-o.top||t.body.scrollTop||n.scrollY||r.scrollTop||0,a=-o.left||t.body.scrollLeft||n.scrollX||r.scrollLeft||0;return{top:s,left:a}}change(t=aC){return t>0?this._change.pipe(ol(t)):this._change}_getWindow(){return this._document.defaultView||window}_updateViewportSize(){let t=this._getWindow();this._viewportSize=this._platform.isBrowser?{width:t.innerWidth,height:t.innerHeight}:{width:0,height:0}}static{this.\u0275fac=function(n){return new(n||i)(pe(Ii),pe(Pt),pe(mt,8))}}static{this.\u0275prov=Ve({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();var Js=(()=>{class i{static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275mod=Nt({type:i})}static{this.\u0275inj=Bt({})}}return i})(),Nc=(()=>{class i{static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275mod=Nt({type:i})}static{this.\u0275inj=Bt({imports:[Mr,Js,Mr,Js]})}}return i})();var Bf=Np(),zc=class{constructor(e,t){this._viewportRuler=e,this._previousHTMLStyles={top:"",left:""},this._isEnabled=!1,this._document=t}attach(){}enable(){if(this._canBeEnabled()){let e=this._document.documentElement;this._previousScrollPosition=this._viewportRuler.getViewportScrollPosition(),this._previousHTMLStyles.left=e.style.left||"",this._previousHTMLStyles.top=e.style.top||"",e.style.left=We(-this._previousScrollPosition.left),e.style.top=We(-this._previousScrollPosition.top),e.classList.add("cdk-global-scrollblock"),this._isEnabled=!0}}disable(){if(this._isEnabled){let e=this._document.documentElement,t=this._document.body,n=e.style,r=t.style,o=n.scrollBehavior||"",s=r.scrollBehavior||"";this._isEnabled=!1,n.left=this._previousHTMLStyles.left,n.top=this._previousHTMLStyles.top,e.classList.remove("cdk-global-scrollblock"),Bf&&(n.scrollBehavior=r.scrollBehavior="auto"),window.scroll(this._previousScrollPosition.left,this._previousScrollPosition.top),Bf&&(n.scrollBehavior=o,r.scrollBehavior=s)}}_canBeEnabled(){if(this._document.documentElement.classList.contains("cdk-global-scrollblock")||this._isEnabled)return!1;let t=this._document.body,n=this._viewportRuler.getViewportSize();return t.scrollHeight>n.height||t.scrollWidth>n.width}};var Lc=class{constructor(e,t,n,r){this._scrollDispatcher=e,this._ngZone=t,this._viewportRuler=n,this._config=r,this._scrollSubscription=null,this._detach=()=>{this.disable(),this._overlayRef.hasAttached()&&this._ngZone.run(()=>this._overlayRef.detach())}}attach(e){this._overlayRef,this._overlayRef=e}enable(){if(this._scrollSubscription)return;let e=this._scrollDispatcher.scrolled(0).pipe(Qt(t=>!t||!this._overlayRef.overlayElement.contains(t.getElementRef().nativeElement)));this._config&&this._config.threshold&&this._config.threshold>1?(this._initialScrollPosition=this._viewportRuler.getViewportScrollPosition().top,this._scrollSubscription=e.subscribe(()=>{let t=this._viewportRuler.getViewportScrollPosition().top;Math.abs(t-this._initialScrollPosition)>this._config.threshold?this._detach():this._overlayRef.updatePosition()})):this._scrollSubscription=e.subscribe(this._detach)}disable(){this._scrollSubscription&&(this._scrollSubscription.unsubscribe(),this._scrollSubscription=null)}detach(){this.disable(),this._overlayRef=null}},ea=class{enable(){}disable(){}attach(){}};function Hc(i,e){return e.some(t=>{let n=i.bottom<t.top,r=i.top>t.bottom,o=i.right<t.left,s=i.left>t.right;return n||r||o||s})}function Nf(i,e){return e.some(t=>{let n=i.top<t.top,r=i.bottom>t.bottom,o=i.left<t.left,s=i.right>t.right;return n||r||o||s})}var jc=class{constructor(e,t,n,r){this._scrollDispatcher=e,this._viewportRuler=t,this._ngZone=n,this._config=r,this._scrollSubscription=null}attach(e){this._overlayRef,this._overlayRef=e}enable(){if(!this._scrollSubscription){let e=this._config?this._config.scrollThrottle:0;this._scrollSubscription=this._scrollDispatcher.scrolled(e).subscribe(()=>{if(this._overlayRef.updatePosition(),this._config&&this._config.autoClose){let t=this._overlayRef.overlayElement.getBoundingClientRect(),{width:n,height:r}=this._viewportRuler.getViewportSize();Hc(t,[{width:n,height:r,bottom:r,right:n,top:0,left:0}])&&(this.disable(),this._ngZone.run(()=>this._overlayRef.detach()))}})}}disable(){this._scrollSubscription&&(this._scrollSubscription.unsubscribe(),this._scrollSubscription=null)}detach(){this.disable(),this._overlayRef=null}},cC=(()=>{class i{constructor(t,n,r,o){this._scrollDispatcher=t,this._viewportRuler=n,this._ngZone=r,this.noop=()=>new ea,this.close=s=>new Lc(this._scrollDispatcher,this._ngZone,this._viewportRuler,s),this.block=()=>new zc(this._viewportRuler,this._document),this.reposition=s=>new jc(this._scrollDispatcher,this._viewportRuler,this._ngZone,s),this._document=o}static{this.\u0275fac=function(n){return new(n||i)(pe(Mf),pe(Kr),pe(Pt),pe(mt))}}static{this.\u0275prov=Ve({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})(),Qr=class{constructor(e){if(this.scrollStrategy=new ea,this.panelClass="",this.hasBackdrop=!1,this.backdropClass="cdk-overlay-dark-backdrop",this.disposeOnNavigation=!1,e){let t=Object.keys(e);for(let n of t)e[n]!==void 0&&(this[n]=e[n])}}};var Vc=class{constructor(e,t){this.connectionPair=e,this.scrollableViewProperties=t}};var Uf=(()=>{class i{constructor(t){this._attachedOverlays=[],this._document=t}ngOnDestroy(){this.detach()}add(t){this.remove(t),this._attachedOverlays.push(t)}remove(t){let n=this._attachedOverlays.indexOf(t);n>-1&&this._attachedOverlays.splice(n,1),this._attachedOverlays.length===0&&this.detach()}static{this.\u0275fac=function(n){return new(n||i)(pe(mt))}}static{this.\u0275prov=Ve({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})(),dC=(()=>{class i extends Uf{constructor(t,n){super(t),this._ngZone=n,this._keydownListener=r=>{let o=this._attachedOverlays;for(let s=o.length-1;s>-1;s--)if(o[s]._keydownEvents.observers.length>0){let a=o[s]._keydownEvents;this._ngZone?this._ngZone.run(()=>a.next(r)):a.next(r);break}}}add(t){super.add(t),this._isAttached||(this._ngZone?this._ngZone.runOutsideAngular(()=>this._document.body.addEventListener("keydown",this._keydownListener)):this._document.body.addEventListener("keydown",this._keydownListener),this._isAttached=!0)}detach(){this._isAttached&&(this._document.body.removeEventListener("keydown",this._keydownListener),this._isAttached=!1)}static{this.\u0275fac=function(n){return new(n||i)(pe(mt),pe(Pt,8))}}static{this.\u0275prov=Ve({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})(),uC=(()=>{class i extends Uf{constructor(t,n,r){super(t),this._platform=n,this._ngZone=r,this._cursorStyleIsSet=!1,this._pointerDownListener=o=>{this._pointerDownEventTarget=Ar(o)},this._clickListener=o=>{let s=Ar(o),a=o.type==="click"&&this._pointerDownEventTarget?this._pointerDownEventTarget:s;this._pointerDownEventTarget=null;let l=this._attachedOverlays.slice();for(let c=l.length-1;c>-1;c--){let d=l[c];if(d._outsidePointerEvents.observers.length<1||!d.hasAttached())continue;if(zf(d.overlayElement,s)||zf(d.overlayElement,a))break;let u=d._outsidePointerEvents;this._ngZone?this._ngZone.run(()=>u.next(o)):u.next(o)}}}add(t){if(super.add(t),!this._isAttached){let n=this._document.body;this._ngZone?this._ngZone.runOutsideAngular(()=>this._addEventListeners(n)):this._addEventListeners(n),this._platform.IOS&&!this._cursorStyleIsSet&&(this._cursorOriginalValue=n.style.cursor,n.style.cursor="pointer",this._cursorStyleIsSet=!0),this._isAttached=!0}}detach(){if(this._isAttached){let t=this._document.body;t.removeEventListener("pointerdown",this._pointerDownListener,!0),t.removeEventListener("click",this._clickListener,!0),t.removeEventListener("auxclick",this._clickListener,!0),t.removeEventListener("contextmenu",this._clickListener,!0),this._platform.IOS&&this._cursorStyleIsSet&&(t.style.cursor=this._cursorOriginalValue,this._cursorStyleIsSet=!1),this._isAttached=!1}}_addEventListeners(t){t.addEventListener("pointerdown",this._pointerDownListener,!0),t.addEventListener("click",this._clickListener,!0),t.addEventListener("auxclick",this._clickListener,!0),t.addEventListener("contextmenu",this._clickListener,!0)}static{this.\u0275fac=function(n){return new(n||i)(pe(mt),pe(Ii),pe(Pt,8))}}static{this.\u0275prov=Ve({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();function zf(i,e){let t=typeof ShadowRoot<"u"&&ShadowRoot,n=e;for(;n;){if(n===i)return!0;n=t&&n instanceof ShadowRoot?n.host:n.parentNode}return!1}var Wf=(()=>{class i{constructor(t,n){this._platform=n,this._document=t}ngOnDestroy(){this._containerElement?.remove()}getContainerElement(){return this._containerElement||this._createContainer(),this._containerElement}_createContainer(){let t="cdk-overlay-container";if(this._platform.isBrowser||wl()){let r=this._document.querySelectorAll(`.${t}[platform="server"], .${t}[platform="test"]`);for(let o=0;o<r.length;o++)r[o].remove()}let n=this._document.createElement("div");n.classList.add(t),wl()?n.setAttribute("platform","test"):this._platform.isBrowser||n.setAttribute("platform","server"),this._document.body.appendChild(n),this._containerElement=n}static{this.\u0275fac=function(n){return new(n||i)(pe(mt),pe(Ii))}}static{this.\u0275prov=Ve({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})(),Uc=class{constructor(e,t,n,r,o,s,a,l,c,d=!1,u){this._portalOutlet=e,this._host=t,this._pane=n,this._config=r,this._ngZone=o,this._keyboardDispatcher=s,this._document=a,this._location=l,this._outsideClickDispatcher=c,this._animationsDisabled=d,this._injector=u,this._backdropElement=null,this._backdropClick=new et,this._attachments=new et,this._detachments=new et,this._locationChanges=$i.EMPTY,this._backdropClickHandler=g=>this._backdropClick.next(g),this._backdropTransitionendHandler=g=>{this._disposeBackdrop(g.target)},this._keydownEvents=new et,this._outsidePointerEvents=new et,this._renders=new et,r.scrollStrategy&&(this._scrollStrategy=r.scrollStrategy,this._scrollStrategy.attach(this)),this._positionStrategy=r.positionStrategy,this._afterRenderRef=gp(()=>fp(()=>{this._renders.next()},{injector:this._injector}))}get overlayElement(){return this._pane}get backdropElement(){return this._backdropElement}get hostElement(){return this._host}attach(e){!this._host.parentElement&&this._previousHostParent&&this._previousHostParent.appendChild(this._host);let t=this._portalOutlet.attach(e);return this._positionStrategy&&this._positionStrategy.attach(this),this._updateStackingOrder(),this._updateElementSize(),this._updateElementDirection(),this._scrollStrategy&&this._scrollStrategy.enable(),this._afterNextRenderRef?.destroy(),this._afterNextRenderRef=os(()=>{this.hasAttached()&&this.updatePosition()},{injector:this._injector}),this._togglePointerEvents(!0),this._config.hasBackdrop&&this._attachBackdrop(),this._config.panelClass&&this._toggleClasses(this._pane,this._config.panelClass,!0),this._attachments.next(),this._keyboardDispatcher.add(this),this._config.disposeOnNavigation&&(this._locationChanges=this._location.subscribe(()=>this.dispose())),this._outsideClickDispatcher.add(this),typeof t?.onDestroy=="function"&&t.onDestroy(()=>{this.hasAttached()&&this._ngZone.runOutsideAngular(()=>Promise.resolve().then(()=>this.detach()))}),t}detach(){if(!this.hasAttached())return;this.detachBackdrop(),this._togglePointerEvents(!1),this._positionStrategy&&this._positionStrategy.detach&&this._positionStrategy.detach(),this._scrollStrategy&&this._scrollStrategy.disable();let e=this._portalOutlet.detach();return this._detachments.next(),this._keyboardDispatcher.remove(this),this._detachContentWhenEmpty(),this._locationChanges.unsubscribe(),this._outsideClickDispatcher.remove(this),e}dispose(){let e=this.hasAttached();this._positionStrategy&&this._positionStrategy.dispose(),this._disposeScrollStrategy(),this._disposeBackdrop(this._backdropElement),this._locationChanges.unsubscribe(),this._keyboardDispatcher.remove(this),this._portalOutlet.dispose(),this._attachments.complete(),this._backdropClick.complete(),this._keydownEvents.complete(),this._outsidePointerEvents.complete(),this._outsideClickDispatcher.remove(this),this._host?.remove(),this._afterNextRenderRef?.destroy(),this._previousHostParent=this._pane=this._host=null,e&&this._detachments.next(),this._detachments.complete(),this._afterRenderRef.destroy(),this._renders.complete()}hasAttached(){return this._portalOutlet.hasAttached()}backdropClick(){return this._backdropClick}attachments(){return this._attachments}detachments(){return this._detachments}keydownEvents(){return this._keydownEvents}outsidePointerEvents(){return this._outsidePointerEvents}getConfig(){return this._config}updatePosition(){this._positionStrategy&&this._positionStrategy.apply()}updatePositionStrategy(e){e!==this._positionStrategy&&(this._positionStrategy&&this._positionStrategy.dispose(),this._positionStrategy=e,this.hasAttached()&&(e.attach(this),this.updatePosition()))}updateSize(e){this._config=v(v({},this._config),e),this._updateElementSize()}setDirection(e){this._config=D(v({},this._config),{direction:e}),this._updateElementDirection()}addPanelClass(e){this._pane&&this._toggleClasses(this._pane,e,!0)}removePanelClass(e){this._pane&&this._toggleClasses(this._pane,e,!1)}getDirection(){let e=this._config.direction;return e?typeof e=="string"?e:e.value:"ltr"}updateScrollStrategy(e){e!==this._scrollStrategy&&(this._disposeScrollStrategy(),this._scrollStrategy=e,this.hasAttached()&&(e.attach(this),e.enable()))}_updateElementDirection(){this._host.setAttribute("dir",this.getDirection())}_updateElementSize(){if(!this._pane)return;let e=this._pane.style;e.width=We(this._config.width),e.height=We(this._config.height),e.minWidth=We(this._config.minWidth),e.minHeight=We(this._config.minHeight),e.maxWidth=We(this._config.maxWidth),e.maxHeight=We(this._config.maxHeight)}_togglePointerEvents(e){this._pane.style.pointerEvents=e?"":"none"}_attachBackdrop(){let e="cdk-overlay-backdrop-showing";this._backdropElement=this._document.createElement("div"),this._backdropElement.classList.add("cdk-overlay-backdrop"),this._animationsDisabled&&this._backdropElement.classList.add("cdk-overlay-backdrop-noop-animation"),this._config.backdropClass&&this._toggleClasses(this._backdropElement,this._config.backdropClass,!0),this._host.parentElement.insertBefore(this._backdropElement,this._host),this._backdropElement.addEventListener("click",this._backdropClickHandler),!this._animationsDisabled&&typeof requestAnimationFrame<"u"?this._ngZone.runOutsideAngular(()=>{requestAnimationFrame(()=>{this._backdropElement&&this._backdropElement.classList.add(e)})}):this._backdropElement.classList.add(e)}_updateStackingOrder(){this._host.nextSibling&&this._host.parentNode.appendChild(this._host)}detachBackdrop(){let e=this._backdropElement;if(e){if(this._animationsDisabled){this._disposeBackdrop(e);return}e.classList.remove("cdk-overlay-backdrop-showing"),this._ngZone.runOutsideAngular(()=>{e.addEventListener("transitionend",this._backdropTransitionendHandler)}),e.style.pointerEvents="none",this._backdropTimeout=this._ngZone.runOutsideAngular(()=>setTimeout(()=>{this._disposeBackdrop(e)},500))}}_toggleClasses(e,t,n){let r=xl(t||[]).filter(o=>!!o);r.length&&(n?e.classList.add(...r):e.classList.remove(...r))}_detachContentWhenEmpty(){this._ngZone.runOutsideAngular(()=>{let e=this._renders.pipe(dl(an(this._attachments,this._detachments))).subscribe(()=>{(!this._pane||!this._host||this._pane.children.length===0)&&(this._pane&&this._config.panelClass&&this._toggleClasses(this._pane,this._config.panelClass,!1),this._host&&this._host.parentElement&&(this._previousHostParent=this._host.parentElement,this._host.remove()),e.unsubscribe())})})}_disposeScrollStrategy(){let e=this._scrollStrategy;e&&(e.disable(),e.detach&&e.detach())}_disposeBackdrop(e){e&&(e.removeEventListener("click",this._backdropClickHandler),e.removeEventListener("transitionend",this._backdropTransitionendHandler),e.remove(),this._backdropElement===e&&(this._backdropElement=null)),this._backdropTimeout&&(clearTimeout(this._backdropTimeout),this._backdropTimeout=void 0)}},Lf="cdk-overlay-connected-position-bounding-box",pC=/([A-Za-z%]+)$/,Wc=class{get positions(){return this._preferredPositions}constructor(e,t,n,r,o){this._viewportRuler=t,this._document=n,this._platform=r,this._overlayContainer=o,this._lastBoundingBoxSize={width:0,height:0},this._isPushed=!1,this._canPush=!0,this._growAfterOpen=!1,this._hasFlexibleDimensions=!0,this._positionLocked=!1,this._viewportMargin=0,this._scrollables=[],this._preferredPositions=[],this._positionChanges=new et,this._resizeSubscription=$i.EMPTY,this._offsetX=0,this._offsetY=0,this._appliedPanelClasses=[],this.positionChanges=this._positionChanges,this.setOrigin(e)}attach(e){this._overlayRef&&this._overlayRef,this._validatePositions(),e.hostElement.classList.add(Lf),this._overlayRef=e,this._boundingBox=e.hostElement,this._pane=e.overlayElement,this._isDisposed=!1,this._isInitialRender=!0,this._lastPosition=null,this._resizeSubscription.unsubscribe(),this._resizeSubscription=this._viewportRuler.change().subscribe(()=>{this._isInitialRender=!0,this.apply()})}apply(){if(this._isDisposed||!this._platform.isBrowser)return;if(!this._isInitialRender&&this._positionLocked&&this._lastPosition){this.reapplyLastPosition();return}this._clearPanelClasses(),this._resetOverlayElementStyles(),this._resetBoundingBoxStyles(),this._viewportRect=this._getNarrowedViewportRect(),this._originRect=this._getOriginRect(),this._overlayRect=this._pane.getBoundingClientRect(),this._containerRect=this._overlayContainer.getContainerElement().getBoundingClientRect();let e=this._originRect,t=this._overlayRect,n=this._viewportRect,r=this._containerRect,o=[],s;for(let a of this._preferredPositions){let l=this._getOriginPoint(e,r,a),c=this._getOverlayPoint(l,t,a),d=this._getOverlayFit(c,t,n,a);if(d.isCompletelyWithinViewport){this._isPushed=!1,this._applyPosition(a,l);return}if(this._canFitWithFlexibleDimensions(d,c,n)){o.push({position:a,origin:l,overlayRect:t,boundingBoxRect:this._calculateBoundingBoxRect(l,a)});continue}(!s||s.overlayFit.visibleArea<d.visibleArea)&&(s={overlayFit:d,overlayPoint:c,originPoint:l,position:a,overlayRect:t})}if(o.length){let a=null,l=-1;for(let c of o){let d=c.boundingBoxRect.width*c.boundingBoxRect.height*(c.position.weight||1);d>l&&(l=d,a=c)}this._isPushed=!1,this._applyPosition(a.position,a.origin);return}if(this._canPush){this._isPushed=!0,this._applyPosition(s.position,s.originPoint);return}this._applyPosition(s.position,s.originPoint)}detach(){this._clearPanelClasses(),this._lastPosition=null,this._previousPushAmount=null,this._resizeSubscription.unsubscribe()}dispose(){this._isDisposed||(this._boundingBox&&pn(this._boundingBox.style,{top:"",left:"",right:"",bottom:"",height:"",width:"",alignItems:"",justifyContent:""}),this._pane&&this._resetOverlayElementStyles(),this._overlayRef&&this._overlayRef.hostElement.classList.remove(Lf),this.detach(),this._positionChanges.complete(),this._overlayRef=this._boundingBox=null,this._isDisposed=!0)}reapplyLastPosition(){if(this._isDisposed||!this._platform.isBrowser)return;let e=this._lastPosition;if(e){this._originRect=this._getOriginRect(),this._overlayRect=this._pane.getBoundingClientRect(),this._viewportRect=this._getNarrowedViewportRect(),this._containerRect=this._overlayContainer.getContainerElement().getBoundingClientRect();let t=this._getOriginPoint(this._originRect,this._containerRect,e);this._applyPosition(e,t)}else this.apply()}withScrollableContainers(e){return this._scrollables=e,this}withPositions(e){return this._preferredPositions=e,e.indexOf(this._lastPosition)===-1&&(this._lastPosition=null),this._validatePositions(),this}withViewportMargin(e){return this._viewportMargin=e,this}withFlexibleDimensions(e=!0){return this._hasFlexibleDimensions=e,this}withGrowAfterOpen(e=!0){return this._growAfterOpen=e,this}withPush(e=!0){return this._canPush=e,this}withLockedPosition(e=!0){return this._positionLocked=e,this}setOrigin(e){return this._origin=e,this}withDefaultOffsetX(e){return this._offsetX=e,this}withDefaultOffsetY(e){return this._offsetY=e,this}withTransformOriginOn(e){return this._transformOriginSelector=e,this}_getOriginPoint(e,t,n){let r;if(n.originX=="center")r=e.left+e.width/2;else{let s=this._isRtl()?e.right:e.left,a=this._isRtl()?e.left:e.right;r=n.originX=="start"?s:a}t.left<0&&(r-=t.left);let o;return n.originY=="center"?o=e.top+e.height/2:o=n.originY=="top"?e.top:e.bottom,t.top<0&&(o-=t.top),{x:r,y:o}}_getOverlayPoint(e,t,n){let r;n.overlayX=="center"?r=-t.width/2:n.overlayX==="start"?r=this._isRtl()?-t.width:0:r=this._isRtl()?0:-t.width;let o;return n.overlayY=="center"?o=-t.height/2:o=n.overlayY=="top"?0:-t.height,{x:e.x+r,y:e.y+o}}_getOverlayFit(e,t,n,r){let o=jf(t),{x:s,y:a}=e,l=this._getOffset(r,"x"),c=this._getOffset(r,"y");l&&(s+=l),c&&(a+=c);let d=0-s,u=s+o.width-n.width,g=0-a,h=a+o.height-n.height,_=this._subtractOverflows(o.width,d,u),E=this._subtractOverflows(o.height,g,h),N=_*E;return{visibleArea:N,isCompletelyWithinViewport:o.width*o.height===N,fitsInViewportVertically:E===o.height,fitsInViewportHorizontally:_==o.width}}_canFitWithFlexibleDimensions(e,t,n){if(this._hasFlexibleDimensions){let r=n.bottom-t.y,o=n.right-t.x,s=Hf(this._overlayRef.getConfig().minHeight),a=Hf(this._overlayRef.getConfig().minWidth),l=e.fitsInViewportVertically||s!=null&&s<=r,c=e.fitsInViewportHorizontally||a!=null&&a<=o;return l&&c}return!1}_pushOverlayOnScreen(e,t,n){if(this._previousPushAmount&&this._positionLocked)return{x:e.x+this._previousPushAmount.x,y:e.y+this._previousPushAmount.y};let r=jf(t),o=this._viewportRect,s=Math.max(e.x+r.width-o.width,0),a=Math.max(e.y+r.height-o.height,0),l=Math.max(o.top-n.top-e.y,0),c=Math.max(o.left-n.left-e.x,0),d=0,u=0;return r.width<=o.width?d=c||-s:d=e.x<this._viewportMargin?o.left-n.left-e.x:0,r.height<=o.height?u=l||-a:u=e.y<this._viewportMargin?o.top-n.top-e.y:0,this._previousPushAmount={x:d,y:u},{x:e.x+d,y:e.y+u}}_applyPosition(e,t){if(this._setTransformOrigin(e),this._setOverlayElementStyles(t,e),this._setBoundingBoxStyles(t,e),e.panelClass&&this._addPanelClasses(e.panelClass),this._positionChanges.observers.length){let n=this._getScrollVisibility();if(e!==this._lastPosition||!this._lastScrollVisibility||!hC(this._lastScrollVisibility,n)){let r=new Vc(e,n);this._positionChanges.next(r)}this._lastScrollVisibility=n}this._lastPosition=e,this._isInitialRender=!1}_setTransformOrigin(e){if(!this._transformOriginSelector)return;let t=this._boundingBox.querySelectorAll(this._transformOriginSelector),n,r=e.overlayY;e.overlayX==="center"?n="center":this._isRtl()?n=e.overlayX==="start"?"right":"left":n=e.overlayX==="start"?"left":"right";for(let o=0;o<t.length;o++)t[o].style.transformOrigin=`${n} ${r}`}_calculateBoundingBoxRect(e,t){let n=this._viewportRect,r=this._isRtl(),o,s,a;if(t.overlayY==="top")s=e.y,o=n.height-s+this._viewportMargin;else if(t.overlayY==="bottom")a=n.height-e.y+this._viewportMargin*2,o=n.height-a+this._viewportMargin;else{let h=Math.min(n.bottom-e.y+n.top,e.y),_=this._lastBoundingBoxSize.height;o=h*2,s=e.y-h,o>_&&!this._isInitialRender&&!this._growAfterOpen&&(s=e.y-_/2)}let l=t.overlayX==="start"&&!r||t.overlayX==="end"&&r,c=t.overlayX==="end"&&!r||t.overlayX==="start"&&r,d,u,g;if(c)g=n.width-e.x+this._viewportMargin*2,d=e.x-this._viewportMargin;else if(l)u=e.x,d=n.right-e.x;else{let h=Math.min(n.right-e.x+n.left,e.x),_=this._lastBoundingBoxSize.width;d=h*2,u=e.x-h,d>_&&!this._isInitialRender&&!this._growAfterOpen&&(u=e.x-_/2)}return{top:s,left:u,bottom:a,right:g,width:d,height:o}}_setBoundingBoxStyles(e,t){let n=this._calculateBoundingBoxRect(e,t);!this._isInitialRender&&!this._growAfterOpen&&(n.height=Math.min(n.height,this._lastBoundingBoxSize.height),n.width=Math.min(n.width,this._lastBoundingBoxSize.width));let r={};if(this._hasExactPosition())r.top=r.left="0",r.bottom=r.right=r.maxHeight=r.maxWidth="",r.width=r.height="100%";else{let o=this._overlayRef.getConfig().maxHeight,s=this._overlayRef.getConfig().maxWidth;r.height=We(n.height),r.top=We(n.top),r.bottom=We(n.bottom),r.width=We(n.width),r.left=We(n.left),r.right=We(n.right),t.overlayX==="center"?r.alignItems="center":r.alignItems=t.overlayX==="end"?"flex-end":"flex-start",t.overlayY==="center"?r.justifyContent="center":r.justifyContent=t.overlayY==="bottom"?"flex-end":"flex-start",o&&(r.maxHeight=We(o)),s&&(r.maxWidth=We(s))}this._lastBoundingBoxSize=n,pn(this._boundingBox.style,r)}_resetBoundingBoxStyles(){pn(this._boundingBox.style,{top:"0",left:"0",right:"0",bottom:"0",height:"",width:"",alignItems:"",justifyContent:""})}_resetOverlayElementStyles(){pn(this._pane.style,{top:"",left:"",bottom:"",right:"",position:"",transform:""})}_setOverlayElementStyles(e,t){let n={},r=this._hasExactPosition(),o=this._hasFlexibleDimensions,s=this._overlayRef.getConfig();if(r){let d=this._viewportRuler.getViewportScrollPosition();pn(n,this._getExactOverlayY(t,e,d)),pn(n,this._getExactOverlayX(t,e,d))}else n.position="static";let a="",l=this._getOffset(t,"x"),c=this._getOffset(t,"y");l&&(a+=`translateX(${l}px) `),c&&(a+=`translateY(${c}px)`),n.transform=a.trim(),s.maxHeight&&(r?n.maxHeight=We(s.maxHeight):o&&(n.maxHeight="")),s.maxWidth&&(r?n.maxWidth=We(s.maxWidth):o&&(n.maxWidth="")),pn(this._pane.style,n)}_getExactOverlayY(e,t,n){let r={top:"",bottom:""},o=this._getOverlayPoint(t,this._overlayRect,e);if(this._isPushed&&(o=this._pushOverlayOnScreen(o,this._overlayRect,n)),e.overlayY==="bottom"){let s=this._document.documentElement.clientHeight;r.bottom=`${s-(o.y+this._overlayRect.height)}px`}else r.top=We(o.y);return r}_getExactOverlayX(e,t,n){let r={left:"",right:""},o=this._getOverlayPoint(t,this._overlayRect,e);this._isPushed&&(o=this._pushOverlayOnScreen(o,this._overlayRect,n));let s;if(this._isRtl()?s=e.overlayX==="end"?"left":"right":s=e.overlayX==="end"?"right":"left",s==="right"){let a=this._document.documentElement.clientWidth;r.right=`${a-(o.x+this._overlayRect.width)}px`}else r.left=We(o.x);return r}_getScrollVisibility(){let e=this._getOriginRect(),t=this._pane.getBoundingClientRect(),n=this._scrollables.map(r=>r.getElementRef().nativeElement.getBoundingClientRect());return{isOriginClipped:Nf(e,n),isOriginOutsideView:Hc(e,n),isOverlayClipped:Nf(t,n),isOverlayOutsideView:Hc(t,n)}}_subtractOverflows(e,...t){return t.reduce((n,r)=>n-Math.max(r,0),e)}_getNarrowedViewportRect(){let e=this._document.documentElement.clientWidth,t=this._document.documentElement.clientHeight,n=this._viewportRuler.getViewportScrollPosition();return{top:n.top+this._viewportMargin,left:n.left+this._viewportMargin,right:n.left+e-this._viewportMargin,bottom:n.top+t-this._viewportMargin,width:e-2*this._viewportMargin,height:t-2*this._viewportMargin}}_isRtl(){return this._overlayRef.getDirection()==="rtl"}_hasExactPosition(){return!this._hasFlexibleDimensions||this._isPushed}_getOffset(e,t){return t==="x"?e.offsetX==null?this._offsetX:e.offsetX:e.offsetY==null?this._offsetY:e.offsetY}_validatePositions(){}_addPanelClasses(e){this._pane&&xl(e).forEach(t=>{t!==""&&this._appliedPanelClasses.indexOf(t)===-1&&(this._appliedPanelClasses.push(t),this._pane.classList.add(t))})}_clearPanelClasses(){this._pane&&(this._appliedPanelClasses.forEach(e=>{this._pane.classList.remove(e)}),this._appliedPanelClasses=[])}_getOriginRect(){let e=this._origin;if(e instanceof Et)return e.nativeElement.getBoundingClientRect();if(e instanceof Element)return e.getBoundingClientRect();let t=e.width||0,n=e.height||0;return{top:e.y,bottom:e.y+n,left:e.x,right:e.x+t,height:n,width:t}}};function pn(i,e){for(let t in e)e.hasOwnProperty(t)&&(i[t]=e[t]);return i}function Hf(i){if(typeof i!="number"&&i!=null){let[e,t]=i.split(pC);return!t||t==="px"?parseFloat(e):null}return i||null}function jf(i){return{top:Math.floor(i.top),right:Math.floor(i.right),bottom:Math.floor(i.bottom),left:Math.floor(i.left),width:Math.floor(i.width),height:Math.floor(i.height)}}function hC(i,e){return i===e?!0:i.isOriginClipped===e.isOriginClipped&&i.isOriginOutsideView===e.isOriginOutsideView&&i.isOverlayClipped===e.isOverlayClipped&&i.isOverlayOutsideView===e.isOverlayOutsideView}var Vf="cdk-global-overlay-wrapper",$c=class{constructor(){this._cssPosition="static",this._topOffset="",this._bottomOffset="",this._alignItems="",this._xPosition="",this._xOffset="",this._width="",this._height="",this._isDisposed=!1}attach(e){let t=e.getConfig();this._overlayRef=e,this._width&&!t.width&&e.updateSize({width:this._width}),this._height&&!t.height&&e.updateSize({height:this._height}),e.hostElement.classList.add(Vf),this._isDisposed=!1}top(e=""){return this._bottomOffset="",this._topOffset=e,this._alignItems="flex-start",this}left(e=""){return this._xOffset=e,this._xPosition="left",this}bottom(e=""){return this._topOffset="",this._bottomOffset=e,this._alignItems="flex-end",this}right(e=""){return this._xOffset=e,this._xPosition="right",this}start(e=""){return this._xOffset=e,this._xPosition="start",this}end(e=""){return this._xOffset=e,this._xPosition="end",this}width(e=""){return this._overlayRef?this._overlayRef.updateSize({width:e}):this._width=e,this}height(e=""){return this._overlayRef?this._overlayRef.updateSize({height:e}):this._height=e,this}centerHorizontally(e=""){return this.left(e),this._xPosition="center",this}centerVertically(e=""){return this.top(e),this._alignItems="center",this}apply(){if(!this._overlayRef||!this._overlayRef.hasAttached())return;let e=this._overlayRef.overlayElement.style,t=this._overlayRef.hostElement.style,n=this._overlayRef.getConfig(),{width:r,height:o,maxWidth:s,maxHeight:a}=n,l=(r==="100%"||r==="100vw")&&(!s||s==="100%"||s==="100vw"),c=(o==="100%"||o==="100vh")&&(!a||a==="100%"||a==="100vh"),d=this._xPosition,u=this._xOffset,g=this._overlayRef.getConfig().direction==="rtl",h="",_="",E="";l?E="flex-start":d==="center"?(E="center",g?_=u:h=u):g?d==="left"||d==="end"?(E="flex-end",h=u):(d==="right"||d==="start")&&(E="flex-start",_=u):d==="left"||d==="start"?(E="flex-start",h=u):(d==="right"||d==="end")&&(E="flex-end",_=u),e.position=this._cssPosition,e.marginLeft=l?"0":h,e.marginTop=c?"0":this._topOffset,e.marginBottom=this._bottomOffset,e.marginRight=l?"0":_,t.justifyContent=E,t.alignItems=c?"flex-start":this._alignItems}dispose(){if(this._isDisposed||!this._overlayRef)return;let e=this._overlayRef.overlayElement.style,t=this._overlayRef.hostElement,n=t.style;t.classList.remove(Vf),n.justifyContent=n.alignItems=e.marginTop=e.marginBottom=e.marginLeft=e.marginRight=e.position="",this._overlayRef=null,this._isDisposed=!0}},fC=(()=>{class i{constructor(t,n,r,o){this._viewportRuler=t,this._document=n,this._platform=r,this._overlayContainer=o}global(){return new $c}flexibleConnectedTo(t){return new Wc(t,this._viewportRuler,this._document,this._platform,this._overlayContainer)}static{this.\u0275fac=function(n){return new(n||i)(pe(Kr),pe(mt),pe(Ii),pe(Wf))}}static{this.\u0275prov=Ve({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})(),mC=0,en=(()=>{class i{constructor(t,n,r,o,s,a,l,c,d,u,g,h){this.scrollStrategies=t,this._overlayContainer=n,this._componentFactoryResolver=r,this._positionBuilder=o,this._keyboardDispatcher=s,this._injector=a,this._ngZone=l,this._document=c,this._directionality=d,this._location=u,this._outsideClickDispatcher=g,this._animationsModuleType=h}create(t){let n=this._createHostElement(),r=this._createPaneElement(n),o=this._createPortalOutlet(r),s=new Qr(t);return s.direction=s.direction||this._directionality.value,new Uc(o,n,r,s,this._ngZone,this._keyboardDispatcher,this._document,this._location,this._outsideClickDispatcher,this._animationsModuleType==="NoopAnimations",this._injector.get(up))}position(){return this._positionBuilder}_createPaneElement(t){let n=this._document.createElement("div");return n.id=`cdk-overlay-${mC++}`,n.classList.add("cdk-overlay-pane"),t.appendChild(n),n}_createHostElement(){let t=this._document.createElement("div");return this._overlayContainer.getContainerElement().appendChild(t),t}_createPortalOutlet(t){return this._appRef||(this._appRef=this._injector.get(mp)),new Ap(t,this._componentFactoryResolver,this._appRef,this._injector,this._document)}static{this.\u0275fac=function(n){return new(n||i)(pe(cC),pe(Wf),pe(hp),pe(fC),pe(dC),pe(Xe),pe(Pt),pe(mt),pe(Is),pe(hs),pe(uC),pe(pp,8))}}static{this.\u0275prov=Ve({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();var gC=new Ir("cdk-connected-overlay-scroll-strategy",{providedIn:"root",factory:()=>{let i=z(en);return()=>i.scrollStrategies.reposition()}});function yC(i){return()=>i.scrollStrategies.reposition()}var vC={provide:gC,deps:[en],useFactory:yC},$f=(()=>{class i{static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275mod=Nt({type:i})}static{this.\u0275inj=Bt({providers:[en,vC],imports:[Mr,Bp,Nc,Nc]})}}return i})();var CC=["panel"],SC=["*"];function PC(i,e){if(i&1){let t=Ie();f(0,"div",1,0),W("@panelAnimation.done",function(r){se(t);let o=O();return ae(o._animationDone.next(r))}),ds(2),m()}if(i&2){let t=e.id,n=O();ss(n._classList),jn("mat-mdc-autocomplete-visible",n.showPanel)("mat-mdc-autocomplete-hidden",!n.showPanel)("mat-primary",n._color==="primary")("mat-accent",n._color==="accent")("mat-warn",n._color==="warn"),P("id",n.id)("@panelAnimation",n.isOpen?"visible":"hidden"),Lt("aria-label",n.ariaLabel||null)("aria-labelledby",n._getPanelAriaLabelledby(t))}}var EC=Fp("panelAnimation",[Mp("void, hidden",Rr({opacity:0,transform:"scaleY(0.8)"})),bl(":enter, hidden => visible",[Rp([ks("0.03s linear",Rr({opacity:1})),ks("0.12s cubic-bezier(0, 0, 0.2, 1)",Rr({transform:"scaleY(1)"}))])]),bl(":leave, visible => hidden",[ks("0.075s linear",Rr({opacity:0}))])]),DC=0,Gc=class{constructor(e,t){this.source=e,this.option=t}},Xf=new Ir("mat-autocomplete-default-options",{providedIn:"root",factory:kC});function kC(){return{autoActiveFirstOption:!1,autoSelectActiveOption:!1,hideSingleSelectionIndicator:!1,requireSelection:!1}}var Yf=(()=>{class i{get isOpen(){return this._isOpen&&this.showPanel}_setColor(t){this._color=t,this._changeDetectorRef.markForCheck()}set classList(t){this._classList=t,this._elementRef.nativeElement.className=""}get hideSingleSelectionIndicator(){return this._hideSingleSelectionIndicator}set hideSingleSelectionIndicator(t){this._hideSingleSelectionIndicator=t,this._syncParentProperties()}_syncParentProperties(){if(this.options)for(let t of this.options)t._changeDetectorRef.markForCheck()}constructor(t,n,r,o){this._changeDetectorRef=t,this._elementRef=n,this._defaults=r,this._activeOptionChanges=$i.EMPTY,this._animationDone=new zt,this.showPanel=!1,this._isOpen=!1,this.displayWith=null,this.optionSelected=new zt,this.opened=new zt,this.closed=new zt,this.optionActivated=new zt,this.id=`mat-autocomplete-${DC++}`,this.inertGroups=o?.SAFARI||!1,this.autoActiveFirstOption=!!r.autoActiveFirstOption,this.autoSelectActiveOption=!!r.autoSelectActiveOption,this.requireSelection=!!r.requireSelection,this._hideSingleSelectionIndicator=this._defaults.hideSingleSelectionIndicator??!1}ngAfterContentInit(){this._keyManager=new jp(this.options).withWrap().skipPredicate(this._skipPredicate),this._activeOptionChanges=this._keyManager.change.subscribe(t=>{this.isOpen&&this.optionActivated.emit({source:this,option:this.options.toArray()[t]||null})}),this._setVisibility()}ngOnDestroy(){this._keyManager?.destroy(),this._activeOptionChanges.unsubscribe(),this._animationDone.complete()}_setScrollTop(t){this.panel&&(this.panel.nativeElement.scrollTop=t)}_getScrollTop(){return this.panel?this.panel.nativeElement.scrollTop:0}_setVisibility(){this.showPanel=!!this.options.length,this._changeDetectorRef.markForCheck()}_emitSelectEvent(t){let n=new Gc(this,t);this.optionSelected.emit(n)}_getPanelAriaLabelledby(t){if(this.ariaLabel)return null;let n=t?t+" ":"";return this.ariaLabelledby?n+this.ariaLabelledby:t}_skipPredicate(){return!1}static{this.\u0275fac=function(n){return new(n||i)(He(cn),He(Et),He(Xf),He(Ii))}}static{this.\u0275cmp=fe({type:i,selectors:[["mat-autocomplete"]],contentQueries:function(n,r,o){if(n&1&&(us(o,Ms,5),us(o,Up,5)),n&2){let s;ei(s=ti())&&(r.options=s),ei(s=ti())&&(r.optionGroups=s)}},viewQuery:function(n,r){if(n&1&&(yi(Or,7),yi(CC,5)),n&2){let o;ei(o=ti())&&(r.template=o.first),ei(o=ti())&&(r.panel=o.first)}},hostAttrs:[1,"mat-mdc-autocomplete"],inputs:{ariaLabel:[0,"aria-label","ariaLabel"],ariaLabelledby:[0,"aria-labelledby","ariaLabelledby"],displayWith:"displayWith",autoActiveFirstOption:[2,"autoActiveFirstOption","autoActiveFirstOption",Gi],autoSelectActiveOption:[2,"autoSelectActiveOption","autoSelectActiveOption",Gi],requireSelection:[2,"requireSelection","requireSelection",Gi],panelWidth:"panelWidth",disableRipple:[2,"disableRipple","disableRipple",Gi],classList:[0,"class","classList"],hideSingleSelectionIndicator:[2,"hideSingleSelectionIndicator","hideSingleSelectionIndicator",Gi]},outputs:{optionSelected:"optionSelected",opened:"opened",closed:"closed",optionActivated:"optionActivated"},exportAs:["matAutocomplete"],standalone:!0,features:[ps([{provide:Vp,useExisting:i}]),Fr,_e],ngContentSelectors:SC,decls:1,vars:0,consts:[["panel",""],["role","listbox",1,"mat-mdc-autocomplete-panel","mdc-menu-surface","mdc-menu-surface--open",3,"id"]],template:function(n,r){n&1&&(cs(),le(0,PC,3,16,"ng-template"))},styles:["div.mat-mdc-autocomplete-panel{width:100%;max-height:256px;visibility:hidden;transform-origin:center top;overflow:auto;padding:8px 0;box-sizing:border-box;position:static;border-radius:var(--mat-autocomplete-container-shape, var(--mat-app-corner-extra-small));box-shadow:var(--mat-autocomplete-container-elevation-shadow);background-color:var(--mat-autocomplete-background-color, var(--mat-app-surface-container))}.cdk-high-contrast-active div.mat-mdc-autocomplete-panel{outline:solid 1px}.cdk-overlay-pane:not(.mat-mdc-autocomplete-panel-above) div.mat-mdc-autocomplete-panel{border-top-left-radius:0;border-top-right-radius:0}.mat-mdc-autocomplete-panel-above div.mat-mdc-autocomplete-panel{border-bottom-left-radius:0;border-bottom-right-radius:0;transform-origin:center bottom}div.mat-mdc-autocomplete-panel.mat-mdc-autocomplete-visible{visibility:visible}div.mat-mdc-autocomplete-panel.mat-mdc-autocomplete-hidden{visibility:hidden;pointer-events:none}mat-autocomplete{display:none}"],encapsulation:2,data:{animation:[EC]},changeDetection:0})}}return i})();var TC={provide:Sp,useExisting:dp(()=>Xc),multi:!0};var Kf=new Ir("mat-autocomplete-scroll-strategy",{providedIn:"root",factory:()=>{let i=z(en);return()=>i.scrollStrategies.reposition()}});function IC(i){return()=>i.scrollStrategies.reposition()}var OC={provide:Kf,deps:[en],useFactory:IC},Xc=(()=>{class i{constructor(t,n,r,o,s,a,l,c,d,u,g){this._element=t,this._overlay=n,this._viewContainerRef=r,this._zone=o,this._changeDetectorRef=s,this._dir=l,this._formField=c,this._document=d,this._viewportRuler=u,this._defaults=g,this._componentDestroyed=!1,this._manuallyFloatingLabel=!1,this._viewportSubscription=$i.EMPTY,this._breakpointObserver=z(Lp),this._handsetLandscapeSubscription=$i.EMPTY,this._canOpenOnNextFocus=!0,this._closeKeyEventStream=new et,this._windowBlurHandler=()=>{this._canOpenOnNextFocus=this._document.activeElement!==this._element.nativeElement||this.panelOpen},this._onChange=()=>{},this._onTouched=()=>{},this.position="auto",this.autocompleteAttribute="off",this._initialized=new et,this._injector=z(Xe),this._aboveClass="mat-mdc-autocomplete-panel-above",this._overlayAttached=!1,this.optionSelections=ap(()=>{let h=this.autocomplete?this.autocomplete.options:null;return h?h.changes.pipe(cl(h),qi(()=>an(...h.map(_=>_.onSelectionChange)))):this._initialized.pipe(qi(()=>this.optionSelections))}),this._handlePanelKeydown=h=>{(h.keyCode===27&&!Fs(h)||h.keyCode===38&&Fs(h,"altKey"))&&(this._pendingAutoselectedOption&&(this._updateNativeInputValue(this._valueBeforeAutoSelection??""),this._pendingAutoselectedOption=null),this._closeKeyEventStream.next(),this._resetActiveItem(),h.stopPropagation(),h.preventDefault())},this._trackedModal=null,this._scrollStrategy=a}ngAfterViewInit(){this._initialized.next(),this._initialized.complete();let t=this._getWindow();typeof t<"u"&&this._zone.runOutsideAngular(()=>t.addEventListener("blur",this._windowBlurHandler))}ngOnChanges(t){t.position&&this._positionStrategy&&(this._setStrategyPositions(this._positionStrategy),this.panelOpen&&this._overlayRef.updatePosition())}ngOnDestroy(){let t=this._getWindow();typeof t<"u"&&t.removeEventListener("blur",this._windowBlurHandler),this._handsetLandscapeSubscription.unsubscribe(),this._viewportSubscription.unsubscribe(),this._componentDestroyed=!0,this._destroyPanel(),this._closeKeyEventStream.complete(),this._clearFromModal()}get panelOpen(){return this._overlayAttached&&this.autocomplete.showPanel}openPanel(){this._openPanelInternal()}closePanel(){this._resetLabel(),this._overlayAttached&&(this.panelOpen&&this._zone.run(()=>{this.autocomplete.closed.emit()}),this.autocomplete._latestOpeningTrigger===this&&(this.autocomplete._isOpen=!1,this.autocomplete._latestOpeningTrigger=null),this._overlayAttached=!1,this._pendingAutoselectedOption=null,this._overlayRef&&this._overlayRef.hasAttached()&&(this._overlayRef.detach(),this._closingActionsSubscription.unsubscribe()),this._updatePanelState(),this._componentDestroyed||this._changeDetectorRef.detectChanges(),this._trackedModal&&Rs(this._trackedModal,"aria-owns",this.autocomplete.id))}updatePosition(){this._overlayAttached&&this._overlayRef.updatePosition()}get panelClosingActions(){return an(this.optionSelections,this.autocomplete._keyManager.tabOut.pipe(Qt(()=>this._overlayAttached)),this._closeKeyEventStream,this._getOutsideClickStream(),this._overlayRef?this._overlayRef.detachments().pipe(Qt(()=>this._overlayAttached)):Le()).pipe(Kt(t=>t instanceof Wp?t:null))}get activeOption(){return this.autocomplete&&this.autocomplete._keyManager?this.autocomplete._keyManager.activeItem:null}_getOutsideClickStream(){return an(sn(this._document,"click"),sn(this._document,"auxclick"),sn(this._document,"touchend")).pipe(Qt(t=>{let n=Ar(t),r=this._formField?this._formField.getConnectedOverlayOrigin().nativeElement:null,o=this.connectedTo?this.connectedTo.elementRef.nativeElement:null;return this._overlayAttached&&n!==this._element.nativeElement&&this._document.activeElement!==this._element.nativeElement&&(!r||!r.contains(n))&&(!o||!o.contains(n))&&!!this._overlayRef&&!this._overlayRef.overlayElement.contains(n)}))}writeValue(t){Promise.resolve(null).then(()=>this._assignOptionValue(t))}registerOnChange(t){this._onChange=t}registerOnTouched(t){this._onTouched=t}setDisabledState(t){this._element.nativeElement.disabled=t}_handleKeydown(t){let n=t.keyCode,r=Fs(t);if(n===27&&!r&&t.preventDefault(),this._valueOnLastKeydown=this._element.nativeElement.value,this.activeOption&&n===13&&this.panelOpen&&!r)this.activeOption._selectViaInteraction(),this._resetActiveItem(),t.preventDefault();else if(this.autocomplete){let o=this.autocomplete._keyManager.activeItem,s=n===38||n===40;n===9||s&&!r&&this.panelOpen?this.autocomplete._keyManager.onKeydown(t):s&&this._canOpen()&&this._openPanelInternal(this._valueOnLastKeydown),(s||this.autocomplete._keyManager.activeItem!==o)&&(this._scrollToOption(this.autocomplete._keyManager.activeItemIndex||0),this.autocomplete.autoSelectActiveOption&&this.activeOption&&(this._pendingAutoselectedOption||(this._valueBeforeAutoSelection=this._valueOnLastKeydown),this._pendingAutoselectedOption=this.activeOption,this._assignOptionValue(this.activeOption.value)))}}_handleInput(t){let n=t.target,r=n.value;if(n.type==="number"&&(r=r==""?null:parseFloat(r)),this._previousValue!==r){if(this._previousValue=r,this._pendingAutoselectedOption=null,(!this.autocomplete||!this.autocomplete.requireSelection)&&this._onChange(r),!r)this._clearPreviousSelectedOption(null,!1);else if(this.panelOpen&&!this.autocomplete.requireSelection){let o=this.autocomplete.options?.find(s=>s.selected);if(o){let s=this._getDisplayValue(o.value);r!==s&&o.deselect(!1)}}if(this._canOpen()&&this._document.activeElement===t.target){let o=this._valueOnLastKeydown??this._element.nativeElement.value;this._valueOnLastKeydown=null,this._openPanelInternal(o)}}}_handleFocus(){this._canOpenOnNextFocus?this._canOpen()&&(this._previousValue=this._element.nativeElement.value,this._attachOverlay(this._previousValue),this._floatLabel(!0)):this._canOpenOnNextFocus=!0}_handleClick(){this._canOpen()&&!this.panelOpen&&this._openPanelInternal()}_floatLabel(t=!1){this._formField&&this._formField.floatLabel==="auto"&&(t?this._formField._animateAndLockLabel():this._formField.floatLabel="always",this._manuallyFloatingLabel=!0)}_resetLabel(){this._manuallyFloatingLabel&&(this._formField&&(this._formField.floatLabel="auto"),this._manuallyFloatingLabel=!1)}_subscribeToClosingActions(){let t=new St(r=>{os(()=>{r.next()},{injector:this._injector})}),n=this.autocomplete.options.changes.pipe(xe(()=>this._positionStrategy.reapplyLastPosition()),cp(0));return an(t,n).pipe(qi(()=>this._zone.run(()=>{let r=this.panelOpen;return this._resetActiveItem(),this._updatePanelState(),this._changeDetectorRef.detectChanges(),this.panelOpen&&this._overlayRef.updatePosition(),r!==this.panelOpen&&(this.panelOpen?this._emitOpened():this.autocomplete.closed.emit()),this.panelClosingActions})),sl(1)).subscribe(r=>this._setValueAndClose(r))}_emitOpened(){this.autocomplete.opened.emit()}_destroyPanel(){this._overlayRef&&(this.closePanel(),this._overlayRef.dispose(),this._overlayRef=null)}_getDisplayValue(t){let n=this.autocomplete;return n&&n.displayWith?n.displayWith(t):t}_assignOptionValue(t){let n=this._getDisplayValue(t);t==null&&this._clearPreviousSelectedOption(null,!1),this._updateNativeInputValue(n??"")}_updateNativeInputValue(t){this._formField?this._formField._control.value=t:this._element.nativeElement.value=t,this._previousValue=t}_setValueAndClose(t){let n=this.autocomplete,r=t?t.source:this._pendingAutoselectedOption;r?(this._clearPreviousSelectedOption(r),this._assignOptionValue(r.value),this._onChange(r.value),n._emitSelectEvent(r),this._element.nativeElement.focus()):n.requireSelection&&this._element.nativeElement.value!==this._valueOnAttach&&(this._clearPreviousSelectedOption(null),this._assignOptionValue(null),n._animationDone?n._animationDone.pipe(sl(1)).subscribe(()=>this._onChange(null)):this._onChange(null)),this.closePanel()}_clearPreviousSelectedOption(t,n){this.autocomplete?.options?.forEach(r=>{r!==t&&r.selected&&r.deselect(n)})}_openPanelInternal(t=this._element.nativeElement.value){if(this._attachOverlay(t),this._floatLabel(),this._trackedModal){let n=this.autocomplete.id;Sl(this._trackedModal,"aria-owns",n)}}_attachOverlay(t){this.autocomplete;let n=this._overlayRef;n?(this._positionStrategy.setOrigin(this._getConnectedElement()),n.updateSize({width:this._getPanelWidth()})):(this._portal=new _l(this.autocomplete.template,this._viewContainerRef,{id:this._formField?.getLabelId()}),n=this._overlay.create(this._getOverlayConfig()),this._overlayRef=n,this._viewportSubscription=this._viewportRuler.change().subscribe(()=>{this.panelOpen&&n&&n.updateSize({width:this._getPanelWidth()})}),this._handsetLandscapeSubscription=this._breakpointObserver.observe(Hp.HandsetLandscape).subscribe(o=>{o.matches?this._positionStrategy.withFlexibleDimensions(!0).withGrowAfterOpen(!0).withViewportMargin(8):this._positionStrategy.withFlexibleDimensions(!1).withGrowAfterOpen(!1).withViewportMargin(0)})),n&&!n.hasAttached()&&(n.attach(this._portal),this._valueOnAttach=t,this._valueOnLastKeydown=null,this._closingActionsSubscription=this._subscribeToClosingActions());let r=this.panelOpen;this.autocomplete._isOpen=this._overlayAttached=!0,this.autocomplete._latestOpeningTrigger=this,this.autocomplete._setColor(this._formField?.color),this._updatePanelState(),this._applyModalPanelOwnership(),this.panelOpen&&r!==this.panelOpen&&this._emitOpened()}_updatePanelState(){if(this.autocomplete._setVisibility(),this.panelOpen){let t=this._overlayRef;this._keydownSubscription||(this._keydownSubscription=t.keydownEvents().subscribe(this._handlePanelKeydown)),this._outsideClickSubscription||(this._outsideClickSubscription=t.outsidePointerEvents().subscribe())}else this._keydownSubscription?.unsubscribe(),this._outsideClickSubscription?.unsubscribe(),this._keydownSubscription=this._outsideClickSubscription=null}_getOverlayConfig(){return new Qr({positionStrategy:this._getOverlayPosition(),scrollStrategy:this._scrollStrategy(),width:this._getPanelWidth(),direction:this._dir??void 0,panelClass:this._defaults?.overlayPanelClass})}_getOverlayPosition(){let t=this._overlay.position().flexibleConnectedTo(this._getConnectedElement()).withFlexibleDimensions(!1).withPush(!1);return this._setStrategyPositions(t),this._positionStrategy=t,t}_setStrategyPositions(t){let n=[{originX:"start",originY:"bottom",overlayX:"start",overlayY:"top"},{originX:"end",originY:"bottom",overlayX:"end",overlayY:"top"}],r=this._aboveClass,o=[{originX:"start",originY:"top",overlayX:"start",overlayY:"bottom",panelClass:r},{originX:"end",originY:"top",overlayX:"end",overlayY:"bottom",panelClass:r}],s;this.position==="above"?s=o:this.position==="below"?s=n:s=[...n,...o],t.withPositions(s)}_getConnectedElement(){return this.connectedTo?this.connectedTo.elementRef:this._formField?this._formField.getConnectedOverlayOrigin():this._element}_getPanelWidth(){return this.autocomplete.panelWidth||this._getHostWidth()}_getHostWidth(){return this._getConnectedElement().nativeElement.getBoundingClientRect().width}_resetActiveItem(){let t=this.autocomplete;if(t.autoActiveFirstOption){let n=-1;for(let r=0;r<t.options.length;r++)if(!t.options.get(r).disabled){n=r;break}t._keyManager.setActiveItem(n)}else t._keyManager.setActiveItem(-1)}_canOpen(){let t=this._element.nativeElement;return!t.readOnly&&!t.disabled&&!this.autocompleteDisabled}_getWindow(){return this._document?.defaultView||window}_scrollToOption(t){let n=this.autocomplete,r=$p(t,n.options,n.optionGroups);if(t===0&&r===1)n._setScrollTop(0);else if(n.panel){let o=n.options.toArray()[t];if(o){let s=o._getHostElement(),a=qp(s.offsetTop,s.offsetHeight,n._getScrollTop(),n.panel.nativeElement.offsetHeight);n._setScrollTop(a)}}}_applyModalPanelOwnership(){let t=this._element.nativeElement.closest('body > .cdk-overlay-container [aria-modal="true"]');if(!t)return;let n=this.autocomplete.id;this._trackedModal&&Rs(this._trackedModal,"aria-owns",n),Sl(t,"aria-owns",n),this._trackedModal=t}_clearFromModal(){if(this._trackedModal){let t=this.autocomplete.id;Rs(this._trackedModal,"aria-owns",t),this._trackedModal=null}}static{this.\u0275fac=function(n){return new(n||i)(He(Et),He(en),He(rs),He(Pt),He(cn),He(Kf),He(Is,8),He(Gp,9),He(mt,8),He(Kr),He(Xf,8))}}static{this.\u0275dir=ln({type:i,selectors:[["input","matAutocomplete",""],["textarea","matAutocomplete",""]],hostAttrs:[1,"mat-mdc-autocomplete-trigger"],hostVars:7,hostBindings:function(n,r){n&1&&W("focusin",function(){return r._handleFocus()})("blur",function(){return r._onTouched()})("input",function(s){return r._handleInput(s)})("keydown",function(s){return r._handleKeydown(s)})("click",function(){return r._handleClick()}),n&2&&Lt("autocomplete",r.autocompleteAttribute)("role",r.autocompleteDisabled?null:"combobox")("aria-autocomplete",r.autocompleteDisabled?null:"list")("aria-activedescendant",r.panelOpen&&r.activeOption?r.activeOption.id:null)("aria-expanded",r.autocompleteDisabled?null:r.panelOpen.toString())("aria-controls",r.autocompleteDisabled||!r.panelOpen||r.autocomplete==null?null:r.autocomplete.id)("aria-haspopup",r.autocompleteDisabled?null:"listbox")},inputs:{autocomplete:[0,"matAutocomplete","autocomplete"],position:[0,"matAutocompletePosition","position"],connectedTo:[0,"matAutocompleteConnectedTo","connectedTo"],autocompleteAttribute:[0,"autocomplete","autocompleteAttribute"],autocompleteDisabled:[2,"matAutocompleteDisabled","autocompleteDisabled",Gi]},exportAs:["matAutocompleteTrigger"],standalone:!0,features:[ps([TC]),Fr,gi]})}}return i})(),Qf=(()=>{class i{static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275mod=Nt({type:i})}static{this.\u0275inj=Bt({providers:[OC],imports:[$f,El,Pl,ri,Js,El,Pl]})}}return i})();function hn(i="emit"){return e=>e.pipe(xe(t=>console.log(`${i}`,t)))}var Yc={dashboard:{View:"DashV"},estimate:{Create:"EstC",Edit:"EstE",Delete:"EstD"},report:{View:"Rep",Advanced:"RepA",Profit:"RepF"},shift:{View:"Shift",Create:"ShiftC",Edit:"ShiftE",Void:"ShiftVo"},contact:{View:"Con",Create:"ConC",Edit:"ConE",Delete:"ConD",LoyaltyPointEditor:"LoyPE",ContactDetail:"ContD",ContactImageEditor:"ContE",ContactSensitiveField:"ConSF",Supplier:"Supp"},sell:{Create:"Sell",PricebookSelector:"PricebS",Edit:"SellE",Delete:"SellD",Number:"NumE",SalesPerson:"SalesmanE",Return:"Return",Discount:"Disc",UnitPriceEditor:"UnitPE",Commission:"Comms",Tax:"Tax",CustomerInputLock:"CustL",Payment:"PayR",PriceVisible:"PriceV",PriceMinimum:"PriceM",Email:"Email",DeleteItem:"DelItm",Shipping:"Ship",PaymentCodeLock:"PayCL",EraseVoidOrd:"EraseVO",RestoreVoidOrd:"RestVO",RetrieveR:"RetrieveR",BundlingPrice:"BundlP",ClearCartRestriction:"ClearCartRestriction",CreditSalesLock:"CredSL",CouponInputLock:"CouponInputLock",Park:"Park"},orders:{View:"Ord",SupplierBill:"OrdB",VoidInvoice:"OrdVo",Print:"OrdRpr",NoteEditor:"OrdNe",Invoice:"OrdIr",Erase:"EraseVO"},product:{View:"Prod",Delete:"ProdD",ImageEditor:"ImgE",Create:"ProdC",Edit:"ProdE",Cost:"Cost",BarcodePrinting:"BarP",DeleteAllOutletPrice:"DeleteAllOutletPrice",Expense:"Expense",CommissionView:"CommV",ProductSensitiveField:"ProdSF",Price:"PriceV"},payment:{View:"Pay",Delete:"PayD",Create:"PayC",Edit:"PayE"},adjustment:{View:"Adj",Delete:"AdjD",Create:"AdjC",Edit:"AdjE",Approval:"AdjApp",InventoryProductCount:"InvPC"},buy:{Delete:"BuyD",Create:"Buy",Edit:"BuyE",ShippingRestriction:"BuySh",Approval:"PurA",Report:"BuyR"},logistics:{View:"Del",Create:"DelC",Edit:"DelE",Delete:"DelD",TransferOrderEditor:"DelRE",Outbound:"FulF",TransferOrderApproval:"DelA",TransferOrderReceiver:"DelR"},debt:{View:"Debt",Delete:"DebtD",Create:"DebtC",Edit:"DebtE"},prepaidPackage:{View:"Tre",Create:"TreC",Edit:"TreE",Delete:"TreD",TreatmentIncentive:"TreI",SharePackageEditor:"SharPacE",TreatmentNote:"TreN",Doctor:"Doct"},inventory:{View:"Inv",Edit:"InvE"},promotion:{View:"Prom",Create:"PromC",Edit:"PromE",Delete:"PromD",Coupon:"Cou",Pricebook:"Pri"},accounting:{View:"Act",Create:"ActC",Edit:"ActE",Delete:"ActD",Report:"ActRep",Ledger:"ActL",EmptyOutlet:"ActEO",ClosingEditor:"ActCE",Advanced:"ActRA",Recurring:"ActRec"},users:{View:"Use",Create:"UseC",Edit:"UseE",Delete:"UseD",Groups:"Gro",LoginTimeRestriction:"LogTR",UserIPRestriction:"UseIR",GroupsRestriction:"UseG",LogRestriction:"LogResct"},outlets:{View:"Out",Create:"OutC",Edit:"OutE",Delete:"OutD"},setup:{View:"Stp",Create:"StpC",Edit:"StpE",Delete:"StpD",Webhook:"StpWh",Developer:"StpDev"},service:{View:"Serv"},myProfile:{View:"Prof",Notification:"Notf",Subscription:"Subs",Activity:"Actv"},customerDisplay:{View:"Disp"},orderDisplay:{View:"KitD"},global:{Export:"Export",Number:"NumE",Date:"DateE"},apps:{Marketplace:"Mrp",Jurnal:"Jurnal",Tools:"Tools"},fulfillment:{View:"Ful",Edit:"FulE",Create:"FulC",Delete:"FulD",Ship:"FulS"},manufacture:{View:"Man",Create:"ManC",Edit:"ManE",Delete:"ManD"},developer:{Api:"API",View:"Dev",Edit:"DevE"}};var Zf=(()=>{class i{constructor(){this._roles=[],this.parseJWTRoles()}parseJWTRoles(){let t=localStorage.getItem("Token");if(t){var n=Cl(t);this._roles=n["http://schemas.microsoft.com/ws/2008/06/identity/claims/role"],console.log(this._roles)}}isInRole(t,n){let r={};return n.forEach((o,s)=>r[t[s]]=typeof o=="string"?this._roles.includes(o):o(this._roles)),r}isUserHasRole(t){return this._roles.includes(t)}get product(){return this._product||(this._product=this.setBulkRole("product")),this._product}get contact(){return this._contact||(this._contact=this.setBulkRole("contact")),this._contact}get promotion(){return this._promotion||(this._promotion=this.setBulkRole("promotion")),this._promotion}get accounting(){return this._accounting||(this._accounting=this.setBulkRole("accounting")),this._accounting}get users(){return this._users||(this._users=this.setBulkRole("users")),this._users}get outlets(){return this._outlets||(this._outlets=this.setBulkRole("outlets")),this._outlets}get setup(){return this._setup||(this._setup=this.setBulkRole("setup")),this._setup}get service(){return this._service||(this._service=this.setBulkRole("service")),this._service}get profile(){return this._profile||(this._profile=this.setBulkRole("myProfile")),this._profile}get customerDisplay(){return this._customerDisplay||(this._customerDisplay=this.setBulkRole("customerDisplay")),this._customerDisplay}get orderDisplay(){return this._orderDisplay||(this._orderDisplay=this.setBulkRole("orderDisplay")),this._orderDisplay}get global(){return this._global||(this._global=this.setBulkRole("global")),this._global}get apps(){return this._apps||(this._apps=this.setBulkRole("apps")),this._apps}get fulfillment(){return this._fulfillment||(this._fulfillment=this.setBulkRole("fulfillment")),this._fulfillment}get manufacture(){return this._manufacture||(this._manufacture=this.setBulkRole("manufacture")),this._manufacture}get inventory(){return this._inventory||(this._inventory=this.setBulkRole("inventory")),this._inventory}get sell(){return this._sell||(this._sell=this.setBulkRole("sell")),this._sell}get report(){return this._report||(this._report=this.setBulkRole("report")),this._report}get buy(){return this._buy||(this._buy=this.setBulkRole("buy")),this._buy}get adjustment(){return this._adjustment||(this._adjustment=this.setBulkRole("adjustment")),this._adjustment}get debt(){return this._debt||(this._debt=this.setBulkRole("debt")),this._debt}get payment(){return this._payment||(this._payment=this.setBulkRole("payment")),this._payment}get prepaidPackage(){return this._prepaidPackage||(this._prepaidPackage=this.setBulkRole("prepaidPackage")),this._prepaidPackage}get order(){return this._order||(this._order=this.setBulkRole("orders")),this._order}get logistic(){return this._logistic||(this._logistic=this.setBulkRole("logistics")),this._logistic}get estimate(){return this._estimate||(this._estimate=this.setBulkRole("estimate")),this._estimate}get shift(){return this._shift||(this._shift=this.setBulkRole("shift")),this._shift}get developer(){return this._developer||(this._developer=this.setBulkRole("developer")),this._developer}get dashboard(){return this._dashboard||(this._dashboard=this.setBulkRole("dashboard")),this._dashboard}setBulkRole(t){let n={};for(let r in Yc[t])n[r]=this.isUserHasRole(Yc[t][r]);return n}get isSystemUser(){let t=localStorage.getItem("Token");return Cl(t).Type=="System"}resetRoles(){this._roles=[],this._accounting=null,this._adjustment=null,this._apps=null,this._buy=null,this._contact=null,this._customerDisplay=null,this._debt=null,this._fulfillment=null,this._estimate=null,this._global=null,this._inventory=null,this._logistic=null,this._manufacture=null,this._order=null,this._orderDisplay=null,this._outlets=null,this._payment=null,this._product=null,this._prepaidPackage=null,this._profile=null,this._promotion=null,this._report=null,this._sell=null,this._service=null,this._setup=null,this._shift=null,this._users=null,this._developer=null,this._dashboard=null}toJSON(){return{product:this.product,contact:this.contact,promotion:this.promotion,accounting:this.accounting,users:this.users,outlets:this.outlets,setup:this.setup,service:this.service,profile:this.profile,customerDisplay:this.customerDisplay,orderDisplay:this.orderDisplay,global:this.global,apps:this.apps,fulfillment:this.fulfillment,manufacture:this.manufacture,inventory:this.inventory,sell:this.sell,report:this.report,buy:this.buy,adjustment:this.adjustment,debt:this.debt,payment:this.payment,prepaidPackage:this.prepaidPackage,order:this.order,logistic:this.logistic,estimate:this.estimate,shift:this.shift,developer:this.developer,dashboard:this.dashboard}}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275prov=Ve({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();var Jf=(i,e)=>e.PromotionID;function RC(i,e){if(i&1&&(f(0,"mat-option",19)(1,"div",20)(2,"span",21),x(3),m(),f(4,"span",22),x(5),m()()()),i&2){let t=e.$implicit;P("value",t),y(3),I(t.Value),y(2),I(t.Code)}}function MC(i,e){if(i&1&&Zt(0,RC,6,3,"mat-option",19,as),i&2){let t=O();Jt(t)}}function AC(i,e){i&1&&(f(0,"mat-option",18),x(1,"No items found"),m()),i&2&&P("disabled",!0)}function BC(i,e){i&1&&le(0,MC,2,0)(1,AC,2,1,"mat-option",18),i&2&&Ce(e.length>0?0:1)}function NC(i,e){if(i&1){let t=Ie();f(0,"div",23)(1,"img",24),W("error",function(r){se(t);let o=O();return ae(o.onErrorImage(r))}),m(),f(2,"div",25)(3,"ngb-highlight",26),x(4),m(),f(5,"span"),x(6),m()()()}if(i&2){let t=e.result,n=e.term;y(),P("src",t.ImgUrl,is)("alt",t.Value),y(2),P("result",t.Value)("term",n),y(),I(t.Value),y(2),I(t.Code)}}function zC(i,e){if(i&1&&(f(0,"ng-option",28),x(1),m()),i&2){let t=e.$implicit;P("value",t.PromotionID),y(),I(t.Name)}}function LC(i,e){if(i&1&&(f(0,"ng-select",27),Zt(1,zC,2,2,"ng-option",28,Jf),m()),i&2){let t=O(2);y(),Jt(t)}}function HC(i,e){if(i&1&&(f(0,"ng-option",28),x(1),m()),i&2){let t=e.$implicit;P("value",t),y(),I(t.Name)}}function jC(i,e){if(i&1&&(f(0,"ng-select",27),Zt(1,HC,2,2,"ng-option",28,Jf),m()),i&2){let t=O(2);y(),Jt(t)}}function VC(i,e){if(i&1&&(f(0,"div",12)(1,"label",9),x(2,"Promotion Price"),m(),le(3,LC,3,0,"ng-select",27)(4,jC,3,0,"ng-select",27),m()),i&2){let t=O(2);y(3),Ce(t.isEditProduct()?3:4)}}function UC(i,e){i&1&&le(0,VC,5,1,"div",12),i&2&&Ce(e.length?0:-1)}function WC(i,e){if(i&1){let t=Ie();f(0,"button",29),W("click",function(){se(t);let r=O();return ae(r.resetForm())}),x(1," Cancel "),m()}}var ia=(()=>{class i{constructor(){this.promotionPrice$=Le([]),this.variant$=Le({}),this.UUidSelected="",this.httpService=z(bi),this.fb=z(Yi),this.router=z(Un),this.storeService=z(ke),this.location=z(hs),this.maskitoOptions=ar({precision:2,thousandSeparator:","}),this.route=z(ms),this.variant={},this.roleService=z(Zf),this.domain="",this.isEditProduct=q(!1)}displayFn(t){return t?t.Value:""}initForm(){this.form=this.fb.group({name:new nt("",[lt.required]),quantity:new nt("",[lt.required]),promotionPrice:new nt("",[]),price:new nt("",[lt.required])})}ngAfterViewInit(){this.domain=`https://${localStorage.getItem("Domain")}`}ngOnInit(){this.initForm(),this.form.get("promotionPrice").valueChanges.pipe(Qt(()=>Object.keys(this.variant).length>0),hn("prommotionPrice"),xe(t=>{if(t)this.form.patchValue({price:+this.variant.UnitPrice}),this.form.get("price").disable();else{console.warn("Invalid UnitPrice, not patching price");let n=[...this.storeService.productItems()],r=n.findIndex(o=>o.VariantID===this.route.snapshot.queryParamMap.get("id"));r!==-1&&this.form.patchValue({price:+this.variant.UnitPrice!=+n[r].UnitPrice?+n[r].UnitPrice:+this.variant.UnitPrice}),this.form.get("price").enable()}})).subscribe(),this.route.queryParamMap.pipe(xe(t=>{this.isEditProduct.set(t.has("id")),console.log("edit",this.isEditProduct()),this.UUidSelected=t.get("id")||""})).subscribe(),this.route.queryParamMap.pipe(qi(t=>{if(t.has("id")){let n=t.get("id"),r=[...this.storeService.productItems()],o=r.findIndex(s=>Object.prototype.hasOwnProperty.call(s,"VariantID")?s.VariantID:s.ID===n);if(o!==-1){let s={EntityID:"00000000-0000-0000-0000-000000000000",ID:Object.prototype.hasOwnProperty.call(r[o],"VariantID")?r[o].VariantID:r[o].ID},a={VariantID:Object.prototype.hasOwnProperty.call(r[o],"VariantID")?r[o].VariantID:r[o].ID};return rl([this.httpService.post("/API/V3/Variant/ID",s,void 0,this.domain),this.roleService.promotion.View?this.httpService.post("/API/v3/PromotionEvent/GetByVariantID",a,void 0,this.domain):Le(null)]).pipe(Kt(([l,c])=>({variant:l,promotion:c,KEY:n})))}return Le(null)}else return this.form.reset(),this.form.enable(),this.promotionPrice$=Le([]),Le(null)}),hn("edit"),xe(t=>{if(t===null)return;this.form.get("name").disable();let{variant:n,promotion:r,KEY:o}=t;this.promotionPrice$=Le(r),this.variant$=Le(n),this.variant=n;let s=[...this.storeService.productItems()],a=s.findIndex(l=>Object.prototype.hasOwnProperty.call(l,"VariantID")?l.VariantID:l.ID);if(a!==-1){let l=r.findIndex(c=>c.PromotionID.toLowerCase()===s[a].Promotions?.PromotionID?.toLowerCase());if(l!==-1){let c=+r[l]?.UnitPrice;isNaN(c)&&(c=+n.UnitPrice),this.form.patchValue({price:+n.UnitPrice!=+s[a].UnitPrice?+s[a].UnitPrice:+n.UnitPrice,promotionPrice:r[l].PromotionID,quantity:+s[a].Quantity,name:{Value:n.Name}}),this.form.get("price").disable()}else this.form.patchValue({price:+n.UnitPrice!=+s[a].UnitPrice?+s[a].UnitPrice:+n.UnitPrice,promotionPrice:null,quantity:+s[a].Quantity,name:{Value:n.Name}})}})).subscribe(),this.variantSuggestion$=this.form.get("name").valueChanges.pipe(lp(200),al(),qi(t=>{if(t&&t.length>2){let n={count:100,prefix:t},r=`https://${localStorage.getItem("Domain")}`;return this.httpService.post("/API/AC/GetVariantSuggestionByCodeNName",n,void 0,r)}else return Le([])}))}onOptionSelected(t){if(Object.hasOwn(t.option.value,"Key")){let n=t.option.value.Key,r={EntityID:"00000000-0000-0000-0000-000000000000",ID:n},o={VariantID:n};return rl([this.httpService.post("/API/V3/Variant/ID",r,void 0,this.domain),this.roleService.promotion.View?this.httpService.post("/API/v3/PromotionEvent/GetByVariantID",o,void 0,this.domain):Le(null)]).pipe(Kt(([s,a])=>({variant:s,promotion:a})),xe(({variant:s,promotion:a})=>{this.form.patchValue({price:s.UnitPrice,promotionPrice:null,quantity:1}),this.promotionPrice$=Le(a),this.variant$=Le(s),this.variant=s})).subscribe()}else throw new Error("Key not found")}onSubmit(){let{name:t,quantity:n,promotionPrice:r,price:o}=this.form.getRawValue(),s=n.toString().replace(/,/g,""),a=o.toString().replace(/,/g,"");return this.isEditProduct()?es([this.promotionPrice$,this.variant$]).pipe(Kt(([l,c])=>({promotions:l,variant:c})),Kt(({promotions:l,variant:c})=>{let d=[...this.storeService.productItems()],u=d.findIndex(h=>Object.prototype.hasOwnProperty.call(h,"VariantID")?h.VariantID:h.ID===this.UUidSelected.toLowerCase());if(u!==-1){let h=l.findIndex(_=>_.PromotionID.toLowerCase()===r?.toLowerCase());if(h!==-1){let _=+l[h]?.UnitPrice;isNaN(_)&&(_=+c.UnitPrice),d[u]=D(v({},d[u]),{Quantity:+s,Promotions:l[h],UnitPrice:+a,checked:!1})}else d[u]=D(v({},d[u]),{Quantity:+s,Promotions:r,UnitPrice:+a,checked:!1})}let g=[...d];this.storeService.onChangeProductItems(g),this.form.get("price").enable(),this.form.reset(),this.router.navigate(["/pages"]),this.promotionPrice$=Le([]),this.variant={}})).subscribe():this.variant$.pipe(Kt(l=>D(v({},l),{Quantity:+n,Promotions:r,UnitPrice:+a})),xe(l=>{let c=[...this.storeService.productItems()];c.push(l);let d=[...c];this.storeService.onChangeProductItems(d),this.form.get("price").enable(),this.form.reset(),this.promotionPrice$=Le([])})).subscribe()}onErrorImage(t){console.log(t);let n=t.target;t.type==="error"&&(n.src="assets/images/image-404.svg")}get hasEdit(){return this.route.snapshot.queryParamMap.has("id")}resetForm(){this.form.reset(),this.router.navigate([],{relativeTo:this.route,queryParams:{id:null},queryParamsHandling:"merge"})}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275cmp=fe({type:i,selectors:[["modal-choose-product"]],standalone:!0,features:[_e],decls:31,vars:14,consts:[["auto","matAutocomplete"],["rt",""],[1,"card","mb-3","w-100","p-0"],[1,"card-header","px-0"],[1,"text-dark","fw-medium","font-robotoslab",2,"margin","0.6rem 0","font-size","16px"],[1,"card-body","px-0","py-0","pt-4"],[1,"d-flex","flex-column","gap-2"],[1,"d-flex","flex-column","gap-3",3,"formGroup"],[1,"form-group","d-flex","flex-column","position-relative"],[1,"text-dark","fs-2","fw-semibold","font-robotoslab"],["type","text","formControlName","name",1,"form-control","form-control-lg","fs-3",3,"matAutocomplete"],["autoActiveFirstOption","",3,"optionSelected","displayWith"],[1,"form-group"],["type","text","formControlName","quantity",1,"form-control","form-control-lg","fs-3",3,"maskito"],["type","text","formControlName","price",1,"form-control","form-control-lg","fs-3",3,"maskito"],[1,"d-flex","gap-4"],["type","button",1,"flex","flex-grow-1","btn","btn-outline-secondary"],["type","button",1,"flex","flex-grow-1","btn","btn-success",3,"click","disabled"],[1,"fs-2",3,"disabled"],[1,"fs-2",3,"value"],[1,"d-flex","flex-column"],[1,"fs-2"],[1,"opacity-75",2,"font-size","11px"],[1,"d-flex","w-100","overflow-x-hidden","gap-2"],[1,"me-1",2,"width","42px","height","42px",3,"error","src","alt"],[1,"flex-grow-1","d-flex","flex-column","flex-wrap"],[3,"result","term"],["formControlName","promotionPrice","placeholder","Select Promotion Price",1,"custom","fs-3"],[1,"fs-3",3,"value"],["type","button",1,"flex","flex-grow-1","btn","btn-outline-secondary",3,"click"]],template:function(n,r){if(n&1){let o=Ie();f(0,"div",2)(1,"div",3)(2,"span",4),x(3),m()(),f(4,"div",5)(5,"div",6)(6,"form",7)(7,"div",8)(8,"label",9),x(9,"Name"),m(),ue(10,"input",10),f(11,"mat-autocomplete",11,0),W("optionSelected",function(a){return se(o),ae(r.onOptionSelected(a))}),le(13,BC,2,1),Ue(14,"async"),m(),le(15,NC,7,6,"ng-template",null,1,me),m(),f(17,"div",12)(18,"label",9),x(19,"Quantity"),m(),ue(20,"input",13),m(),f(21,"div",12)(22,"label",9),x(23,"Price"),m(),ue(24,"input",14),m(),le(25,UC,1,1),Ue(26,"async"),f(27,"div",15),le(28,WC,2,0,"button",16),f(29,"button",17),W("click",function(){return se(o),ae(r.onSubmit())}),x(30," Submit "),m()()()()()()}if(n&2){let o,s,a=ml(12);y(3),ii("",r.UUidSelected?"Update":"Add"," Product"),y(3),P("formGroup",r.form),y(4),P("matAutocomplete",a),y(),P("displayWith",r.displayFn),y(2),Ce((o=ni(14,10,r.variantSuggestion$))?13:-1,o),y(7),P("maskito",r.maskitoOptions),y(4),P("maskito",r.maskitoOptions),y(),Ce((s=ni(26,12,r.promotionPrice$))?25:-1,s),y(3),Ce(r.hasEdit?28:-1),y(),P("disabled",r.form.invalid)}},dependencies:[Cp,oi,_i,As,rt,ys,tt,it,gs,vs,bs,Op,vp,Ji,Os,Qf,Yf,Ms,Xc],styles:[".mat-mdc-autocomplete-panel{background-color:#fff!important} .mat-mdc-autocomplete-panel>.mat-mdc-option.mdc-list-item--disabled{min-height:34px}"]})}}return i})();var em=(()=>{class i{constructor(){this.transactionType=q([{title:"Supplier Bill",type:0},{title:"Transfer Order",type:1}]),this.storeService=z(ke),this.fb=z(Yi),this.activeModal=z(Es)}get outlets(){return this.storeService.paperConfig().Outlets}initForm(){this.form=this.fb.group({type:new nt("",[lt.required]),outlet:new nt("",[lt.required]),number:new nt("",[lt.required])})}ngOnInit(){this.initForm()}onOK(){this.activeModal.close({role:"ok",data:this.form.value})}onClose(){this.activeModal.dismiss({role:"close",data:null})}onPaste(t){t.preventDefault();let n=t.clipboardData.getData("text").trim(),r=t.target;r.value+=n,this.form.patchValue({number:r.value})}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275cmp=fe({type:i,selectors:[["app-dialog-load-transaction"]],standalone:!0,features:[_e],decls:14,vars:4,consts:[["title","Choose your transaction",3,"onOK","onClose","hasValid"],[1,"d-flex","flex-column","gap-2",3,"formGroup"],[1,"form-group"],[1,"text-dark","fs-2","fw-semibold","font-robotoslab"],["formControlName","type","bindLabel","title","bindValue","type","placeholder","Choose Type",1,"custom","fs-2",3,"items"],["formControlName","outlet","bindLabel","Name","bindValue","Name","placeholder","Choose Outlet",1,"custom","fs-2",3,"items"],["formControlName","number","type","text",1,"form-control","fs-2",2,"height","32px",3,"paste"]],template:function(n,r){n&1&&(f(0,"app-base-modal",0),W("onOK",function(){return r.onOK()})("onClose",function(){return r.onClose()}),f(1,"form",1)(2,"div",2)(3,"label",3),x(4,"Choose Type"),m(),ue(5,"ng-select",4),m(),f(6,"div",2)(7,"label",3),x(8,"Choose Outlet"),m(),ue(9,"ng-select",5),m(),f(10,"div",2)(11,"label",3),x(12,"Invoice Number"),m(),f(13,"input",6),W("paste",function(s){return r.onPaste(s)}),m()()()()),n&2&&(P("hasValid",r.form.valid),y(),P("formGroup",r.form),y(4),P("items",r.transactionType()),y(4),P("items",r.outlets))},dependencies:[Ds,oi,_i,ht,ys,tt,it,gs,rt,vs,bs],changeDetection:0})}}return i})();var $C=(()=>{class i{constructor(t){this.document=t,this.width=this.getWidth()}getWidth(){let t=this.document.createElement("div");t.style.visibility="hidden",t.style.width="100px",t.style.msOverflowStyle="scrollbar",this.document.body.appendChild(t);let n=t.offsetWidth;t.style.overflow="scroll";let r=this.document.createElement("div");r.style.width="100%",t.appendChild(r);let o=r.offsetWidth;return t.parentNode.removeChild(t),n-o}}return i.\u0275fac=function(t){return new(t||i)(pe(mt))},i.\u0275prov=Ve({token:i,factory:i.\u0275fac}),i})(),qC=(()=>{class i{getDimensions(t){return t.getBoundingClientRect()}}return i.\u0275fac=function(t){return new(t||i)},i.\u0275prov=Ve({token:i,factory:i.\u0275fac}),i})(),GC=(()=>{class i{constructor(){this.columnInputChanges=new et}get columnInputChanges$(){return this.columnInputChanges.asObservable()}onInputChange(){this.columnInputChanges.next()}}return i.\u0275fac=function(t){return new(t||i)},i.\u0275prov=Ve({token:i,factory:i.\u0275fac}),i})();function XC(i){return i=i.replace(/[^a-zA-Z0-9 ]/g," "),i=i.replace(/([a-z](?=[A-Z]))/g,"$1 "),i=i.replace(/([^a-zA-Z0-9 ])|^[0-9]+/g,"").trim().toLowerCase(),i=i.replace(/([ 0-9]+)([a-zA-Z])/g,function(e,t,n){return t.trim()+n.toUpperCase()}),i}var na={},tm=typeof document<"u"?document.createElement("div").style:void 0,Kc=function(){let i=typeof window<"u"?window.getComputedStyle(document.documentElement,""):void 0,e=typeof i<"u"?Array.prototype.slice.call(i).join("").match(/-(moz|webkit|ms)-/):null,t=e!==null?e[1]:void 0,n=typeof t<"u"?"WebKit|Moz|MS|O".match(new RegExp("("+t+")","i"))[1]:void 0;return n?{dom:n,lowercase:t,css:`-${t}-`,js:t[0].toUpperCase()+t.substr(1)}:void 0}();function ra(i){let e=XC(i);return na[e]||(Kc!==void 0&&tm[Kc.css+i]!==void 0?na[e]=Kc.css+i:tm[i]!==void 0&&(na[e]=i)),na[e]}var t3=typeof window<"u"?ra("transform"):void 0,i3=typeof window<"u"?ra("backfaceVisibility"):void 0,n3=typeof window<"u"?!!ra("transform"):void 0,r3=typeof window<"u"?!!ra("perspective"):void 0,im=typeof window<"u"?window.navigator.userAgent:"Chrome",o3=/Safari\//.test(im)&&!/Chrome\//.test(im);var nm=(()=>{class i{static forRoot(t){return{ngModule:i,providers:[{provide:"configuration",useValue:t}]}}}return i.\u0275fac=function(t){return new(t||i)},i.\u0275mod=Nt({type:i}),i.\u0275inj=Bt({providers:[$C,qC,GC],imports:[[ri]]}),i})();typeof document<"u"&&!document.elementsFromPoint&&(document.elementsFromPoint=YC);function YC(i,e){let t=[],n=[],r,o,s;for(;(r=document.elementFromPoint(i,e))&&t.indexOf(r)===-1&&r!=null;)t.push(r),n.push({value:r.style.getPropertyValue("pointer-events"),priority:r.style.getPropertyPriority("pointer-events")}),r.style.setProperty("pointer-events","none","important");for(o=n.length;s=n[--o];)t[o].style.setProperty("pointer-events",s.value?s.value:"",s.priority);return t}var rm=(()=>{class i{constructor(){this.subject$=new et}onFileLoad(t){let r=t.target.result,o=!1,s=[],a=[],l=0;for(let c of r.split(/[\r\n]+/))if(o){let d={};for(let u=0;u<l;u++)d[a[u]]=c.split(",")[u];s.push(d)}else{for(let d=0;d<c.split(",").length;d++)l=c.split(",").length,a.push(c.split(",")[d].replace(/ /g,""));o=!0}return s.splice(-1),s}convertFile(t){let n=t,r=new FileReader;return r.onload=o=>{let s=this.onFileLoad(o);this.subject$.next(s)},r.readAsText(n,"UTF-8"),this.subject$.asObservable()}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275prov=Ve({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();var om=(()=>{class i{constructor(t,n,r){this.http=t,this.toastr=n,this.router=r}PostToUrlEncode(t,n,r=1e5){let o=new vi;return o=o.set("Content-Type","application/x-www-form-urlencoded"),new St(s=>{this.http.post(t,n,{headers:o}).pipe(mi(r)).subscribe(a=>{s.next(a),s.complete()})})}GetText(t=1e5){let n=localStorage.getItem("Token"),o={responseType:"text",headers:new vi({Authorization:"Bearer "+n})};return new St(s=>{this.http.get("/API/Token/GetZendeskJWT",o).pipe(mi(t)).subscribe(a=>{s.next(a),s.complete()})})}POSText(t,n,r=1e5){let o=localStorage.getItem("Token"),a={responseType:"text",headers:new vi({"Content-Type":"application/json","Cache-Control":"no-cache",Authorization:"Bearer "+o})};return new St(l=>{this.http.post(t,n,a).pipe(mi(r)).subscribe(c=>{l.next(c),l.complete()})})}get(t){let n=localStorage.getItem("Token"),r=new vi({"Content-Type":"application/json","Cache-Control":"no-cache"});n&&(r=r.append("Authorization","Bearer "+n));let o={headers:r};return this.http.get(t,o).pipe(Tr(s=>{if(!this.unauthorizedErrorHandling(s)){let l=this.errorMessageHandling(s);this.toastr.error(l.Message!=""?l.Message:"An unknown error has occured!",l.header),this.paymentErrorHandling(s)}return sp(()=>s)}))}getNews(t){return this.http.get(t)}paymentErrorHandling(t){t.status==402&&this.router.navigate(["/menu/Profile/Main/My_Subscription"])}post(t,n,r=1e5){return new St(o=>{let s=localStorage.getItem("Token"),a=new vi({"Content-Type":"application/json","Cache-Control":"no-cache"});s&&(a=a.append("Authorization","Bearer "+s));let l={headers:a};Date.prototype.toJSON=function(){return this.getFullYear()+"-"+c(this.getMonth()+1)+"-"+c(this.getDate())+"T"+c(this.getHours())+":"+c(this.getMinutes())+":"+c(this.getSeconds())+".000"};function c(d){return d<10?"0"+d:d}this.http.post(t,n,l).pipe(mi(r)).subscribe({next:d=>{o.next(d),o.complete()},error:d=>{if(d.status==200)o.next(d.error.text),o.complete();else{if(!this.unauthorizedErrorHandling(d)){let g=this.errorMessageHandling(d);this.toastr.error(g.Message!=""?g.Message:"An unknown error has occured!",g.header,{enableHtml:!0})}o.error(d)}}})})}postFile(t,n,r=1e5){return new St(o=>{let s=localStorage.getItem("Token"),a=new vi({"Content-Type":"application/json","Cache-Control":"no-cache"});s&&(a=a.append("Authorization","Bearer "+s)),this.http.post(t,n,{headers:a,observe:"response",responseType:"blob"}).pipe(mi(r)).subscribe({next:l=>{o.next({title:l.headers.get("Content-Disposition"),file:l.body}),o.complete()},error:l=>{if(l.headers.get("Content-Type")==="application/json; charset=utf-8"){let c=new FileReader;c.addEventListener("loadend",d=>{let u=JSON.parse(d.srcElement.result)?.Message;if(!this.unauthorizedErrorHandling(l)){let h=this.errorMessageHandling(l);this.toastr.error(u??"An unknown error has occured!",h.header,{enableHtml:!0})}}),c.readAsText(l.error)}o.error(l)}})})}put(t,n,r=1e5){return new St(o=>{let s=localStorage.getItem("Token"),a=new vi({"Content-Type":"application/json","Cache-Control":"no-cache"});s&&(a=a.append("Authorization","Bearer "+s));let l={headers:a};this.http.put(t,n,l).pipe(mi(r)).subscribe({next:c=>{o.next(c),o.complete()},error:c=>{if(c.status==200)o.next(c.error.text),o.complete();else{if(!this.unauthorizedErrorHandling(c)){let u=this.errorMessageHandling(c);this.toastr.error(u.Message!=""?u.Message:"An unknown error has occured!",u.header)}o.error(c)}}})})}delete(t,n,r=1e5){return new St(o=>{let s=localStorage.getItem("Token"),a=new vi({"Content-Type":"application/json","Cache-Control":"no-cache"});s&&(a=a.append("Authorization","Bearer "+s));let l={headers:a,body:n};this.http.delete(t,l).pipe(mi(r)).subscribe({next:c=>{o.next(c),o.complete()},error:c=>{if(c.status==200)o.next(c.error.text),o.complete();else{if(!this.unauthorizedErrorHandling(c)){let u=this.errorMessageHandling(c);this.toastr.error(u.Message!=""?u.Message:"An unknown error has occured!",u.header)}o.error(c)}}})})}unauthorizedErrorHandling(t){let n=!1;return(t.status==401||t.status==403)&&(localStorage.getItem("Token")?this.router.navigate(["/menu/Unauthorized/Main/Unauthorized"]):window.location.href="/",n=!0),n}errorMessageHandling(t){let n="API Error",r="Exception Message";return t.error?(n="API Error - "+t.status,t.status==451&&(n="Error"),t.error&&(r=t.error.Message)):t.Message&&(n="API Error - "+t.name,r=t.Message),{header:n,Message:r}}postFormDataWithoutBearer(t,n){return new St(r=>{this.http.post(t,n).pipe(mi(1e5)).subscribe({next:o=>{r.next(o),r.complete()},error:o=>{o.status==200&&(r.next(o.error.text),r.complete()),r.error(o)}})})}postFormData(t,n,r=!0){return new St(o=>{let s=localStorage.getItem("Token"),l={headers:new vi({Authorization:"Bearer "+s})};this.http.post(t,n,l).pipe(mi(1e5)).subscribe({next:c=>{o.next(c),o.complete()},error:c=>{if(c.status==200)o.next(c.error.text),o.complete();else{if(!this.unauthorizedErrorHandling(c)&&r){let u=this.errorMessageHandling(c);this.toastr.error(u.Message!=""?u.Message:"An unknown error has occured!",u.header)}o.error(c)}}})})}static{this.\u0275fac=function(n){return new(n||i)(pe(xp),pe(Ts),pe(Un))}}static{this.\u0275prov=Ve({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();function oa(i,e){if(!{}.hasOwnProperty.call(i,e))throw new TypeError("attempted to use private field on non-instance");return i}var KC=0;function am(i){return"__private_"+KC+++"_"+i}function QC(i,e,t){let n=[];return i.forEach(r=>typeof r!="string"?n.push(r):e[Symbol.split](r).forEach((o,s,a)=>{o!==""&&n.push(o),s<a.length-1&&n.push(t)})),n}function sm(i,e){let t=/\$/g,n="$$$$",r=[i];if(e==null)return r;for(let o of Object.keys(e))if(o!=="_"){let s=e[o];typeof s=="string"&&(s=t[Symbol.replace](s,n)),r=QC(r,new RegExp(`%\\{${o}\\}`,"g"),s)}return r}var ZC=i=>{throw new Error(`missing string: ${i}`)},Zr=am("onMissingKey"),Jr=am("apply"),lr=class{constructor(e,t){let{onMissingKey:n=ZC}=t===void 0?{}:t;Object.defineProperty(this,Jr,{value:JC}),Object.defineProperty(this,Zr,{writable:!0,value:void 0}),this.locale={strings:{},pluralize(r){return r===1?0:1}},Array.isArray(e)?e.forEach(oa(this,Jr)[Jr],this):oa(this,Jr)[Jr](e),oa(this,Zr)[Zr]=n}translate(e,t){return this.translateArray(e,t).join("")}translateArray(e,t){let n=this.locale.strings[e];if(n==null&&(oa(this,Zr)[Zr](e),n=e),typeof n=="object"){if(t&&typeof t.smart_count<"u"){let o=this.locale.pluralize(t.smart_count);return sm(n[o],t)}throw new Error("Attempted to use a string with plural forms, but no value was given for %{smart_count}")}if(typeof n!="string")throw new Error("string was not a string");return sm(n,t)}};function JC(i){if(!(i!=null&&i.strings))return;let e=this.locale;Object.assign(this.locale,{strings:v(v({},e.strings),i.strings),pluralize:i.pluralize||e.pluralize})}var rg=De(cm(),1);var eS="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";var nn=(i=21)=>{let e="",t=i|0;for(;t--;)e+=eS[Math.random()*64|0];return e};var og=De(Vm(),1);function aa(i,e){if(!{}.hasOwnProperty.call(i,e))throw new TypeError("attempted to use private field on non-instance");return i}var GS=0;function Um(i){return"__private_"+GS+++"_"+i}var XS={version:"4.2.0"},fn=Um("callbacks"),td=Um("publish"),la=class{constructor(){Object.defineProperty(this,td,{value:YS}),this.state={},Object.defineProperty(this,fn,{writable:!0,value:new Set})}getState(){return this.state}setState(e){let t=v({},this.state),n=v(v({},this.state),e);this.state=n,aa(this,td)[td](t,n,e)}subscribe(e){return aa(this,fn)[fn].add(e),()=>{aa(this,fn)[fn].delete(e)}}};function YS(){for(var i=arguments.length,e=new Array(i),t=0;t<i;t++)e[t]=arguments[t];aa(this,fn)[fn].forEach(n=>{n(...e)})}la.VERSION=XS.version;var Wm=la;function xi(i){let e=i.lastIndexOf(".");return e===-1||e===i.length-1?{name:i,extension:void 0}:{name:i.slice(0,e),extension:i.slice(e+1)}}var id={__proto__:null,md:"text/markdown",markdown:"text/markdown",mp4:"video/mp4",mp3:"audio/mp3",svg:"image/svg+xml",jpg:"image/jpeg",png:"image/png",webp:"image/webp",gif:"image/gif",heic:"image/heic",heif:"image/heif",yaml:"text/yaml",yml:"text/yaml",csv:"text/csv",tsv:"text/tab-separated-values",tab:"text/tab-separated-values",avi:"video/x-msvideo",mks:"video/x-matroska",mkv:"video/x-matroska",mov:"video/quicktime",dicom:"application/dicom",doc:"application/msword",docm:"application/vnd.ms-word.document.macroenabled.12",docx:"application/vnd.openxmlformats-officedocument.wordprocessingml.document",dot:"application/msword",dotm:"application/vnd.ms-word.template.macroenabled.12",dotx:"application/vnd.openxmlformats-officedocument.wordprocessingml.template",xla:"application/vnd.ms-excel",xlam:"application/vnd.ms-excel.addin.macroenabled.12",xlc:"application/vnd.ms-excel",xlf:"application/x-xliff+xml",xlm:"application/vnd.ms-excel",xls:"application/vnd.ms-excel",xlsb:"application/vnd.ms-excel.sheet.binary.macroenabled.12",xlsm:"application/vnd.ms-excel.sheet.macroenabled.12",xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",xlt:"application/vnd.ms-excel",xltm:"application/vnd.ms-excel.template.macroenabled.12",xltx:"application/vnd.openxmlformats-officedocument.spreadsheetml.template",xlw:"application/vnd.ms-excel",txt:"text/plain",text:"text/plain",conf:"text/plain",log:"text/plain",pdf:"application/pdf",zip:"application/zip","7z":"application/x-7z-compressed",rar:"application/x-rar-compressed",tar:"application/x-tar",gz:"application/gzip",dmg:"application/x-apple-diskimage"};function to(i){var e;if(i.type)return i.type;let t=i.name?(e=xi(i.name).extension)==null?void 0:e.toLowerCase():null;return t&&t in id?id[t]:"application/octet-stream"}function KS(i){return i.charCodeAt(0).toString(32)}function $m(i){let e="";return i.replace(/[^A-Z0-9]/gi,t=>(e+=`-${KS(t)}`,"/"))+e}function qm(i,e){let t=e||"uppy";return typeof i.name=="string"&&(t+=`-${$m(i.name.toLowerCase())}`),i.type!==void 0&&(t+=`-${i.type}`),i.meta&&typeof i.meta.relativePath=="string"&&(t+=`-${$m(i.meta.relativePath.toLowerCase())}`),i.data.size!==void 0&&(t+=`-${i.data.size}`),i.data.lastModified!==void 0&&(t+=`-${i.data.lastModified}`),t}function QS(i){return!i.isRemote||!i.remote?!1:new Set(["box","dropbox","drive","facebook","unsplash"]).has(i.remote.provider)}function ca(i,e){if(QS(i))return i.id;let t=to(i);return qm(D(v({},i),{type:t}),e)}function nd(i){if(i==null&&typeof navigator<"u"&&(i=navigator.userAgent),!i)return!0;let e=/Edge\/(\d+\.\d+)/.exec(i);if(!e)return!0;let n=e[1].split(".",2),r=parseInt(n[0],10),o=parseInt(n[1],10);return r<15||r===15&&o<15063||r>18||r===18&&o>=18218}function rd(i,e){return e.name?e.name:i.split("/")[0]==="image"?`${i.split("/")[0]}.${i.split("/")[1]}`:"noname"}function od(i){return i<10?`0${i}`:i.toString()}function cr(){let i=new Date,e=od(i.getHours()),t=od(i.getMinutes()),n=od(i.getSeconds());return`${e}:${t}:${n}`}var Gm={debug:()=>{},warn:()=>{},error:function(){for(var i=arguments.length,e=new Array(i),t=0;t<i;t++)e[t]=arguments[t];return console.error(`[Uppy] [${cr()}]`,...e)}},Xm={debug:function(){for(var i=arguments.length,e=new Array(i),t=0;t<i;t++)e[t]=arguments[t];return console.debug(`[Uppy] [${cr()}]`,...e)},warn:function(){for(var i=arguments.length,e=new Array(i),t=0;t<i;t++)e[t]=arguments[t];return console.warn(`[Uppy] [${cr()}]`,...e)},error:function(){for(var i=arguments.length,e=new Array(i),t=0;t<i;t++)e[t]=arguments[t];return console.error(`[Uppy] [${cr()}]`,...e)}};var no=De(io(),1),tg=De(eg(),1),ig={maxFileSize:null,minFileSize:null,maxTotalFileSize:null,maxNumberOfFiles:null,minNumberOfFiles:null,allowedFileTypes:null,requiredMetaFields:[]},Tt=class extends Error{constructor(e,t){var n;super(e),this.isRestriction=!0,this.isUserFacing=(n=t?.isUserFacing)!=null?n:!0,t!=null&&t.file&&(this.file=t.file)}},da=class{constructor(e,t){this.getI18n=t,this.getOpts=()=>{var n;let r=e();if(((n=r.restrictions)==null?void 0:n.allowedFileTypes)!=null&&!Array.isArray(r.restrictions.allowedFileTypes))throw new TypeError("`restrictions.allowedFileTypes` must be an array");return r}}validateAggregateRestrictions(e,t){let{maxTotalFileSize:n,maxNumberOfFiles:r}=this.getOpts().restrictions;if(r&&e.filter(s=>!s.isGhost).length+t.length>r)throw new Tt(`${this.getI18n()("youCanOnlyUploadX",{smart_count:r})}`);if(n){let o=[...e,...t].reduce((s,a)=>{var l;return s+((l=a.size)!=null?l:0)},0);if(o>n)throw new Tt(this.getI18n()("aggregateExceedsSize",{sizeAllowed:(0,no.default)(n),size:(0,no.default)(o)}))}}validateSingleFile(e){let{maxFileSize:t,minFileSize:n,allowedFileTypes:r}=this.getOpts().restrictions;if(r&&!r.some(a=>a.includes("/")?e.type?(0,tg.default)(e.type.replace(/;.*?$/,""),a):!1:a[0]==="."&&e.extension?e.extension.toLowerCase()===a.slice(1).toLowerCase():!1)){let a=r.join(", ");throw new Tt(this.getI18n()("youCanOnlyUploadFileTypes",{types:a}),{file:e})}if(t&&e.size!=null&&e.size>t){var o;throw new Tt(this.getI18n()("exceedsSize",{size:(0,no.default)(t),file:(o=e.name)!=null?o:this.getI18n()("unnamed")}),{file:e})}if(n&&e.size!=null&&e.size<n)throw new Tt(this.getI18n()("inferiorSize",{size:(0,no.default)(n)}),{file:e})}validate(e,t){t.forEach(n=>{this.validateSingleFile(n)}),this.validateAggregateRestrictions(e,t)}validateMinNumberOfFiles(e){let{minNumberOfFiles:t}=this.getOpts().restrictions;if(t&&Object.keys(e).length<t)throw new Tt(this.getI18n()("youHaveToAtLeastSelectX",{smart_count:t}))}getMissingRequiredMetaFields(e){var t;let n=new Tt(this.getI18n()("missingRequiredMetaFieldOnFile",{fileName:(t=e.name)!=null?t:this.getI18n()("unnamed")})),{requiredMetaFields:r}=this.getOpts().restrictions,o=[];for(let s of r)(!Object.hasOwn(e.meta,s)||e.meta[s]==="")&&o.push(s);return{missingFields:o,error:n}}};var ng={strings:{addBulkFilesFailed:{0:"Failed to add %{smart_count} file due to an internal error",1:"Failed to add %{smart_count} files due to internal errors"},youCanOnlyUploadX:{0:"You can only upload %{smart_count} file",1:"You can only upload %{smart_count} files"},youHaveToAtLeastSelectX:{0:"You have to select at least %{smart_count} file",1:"You have to select at least %{smart_count} files"},aggregateExceedsSize:"You selected %{size} of files, but maximum allowed size is %{sizeAllowed}",exceedsSize:"%{file} exceeds maximum allowed size of %{size}",missingRequiredMetaField:"Missing required meta fields",missingRequiredMetaFieldOnFile:"Missing required meta fields in %{fileName}",inferiorSize:"This file is smaller than the allowed size of %{size}",youCanOnlyUploadFileTypes:"You can only upload: %{types}",noMoreFilesAllowed:"Cannot add more files",noDuplicates:"Cannot add the duplicate file '%{fileName}', it already exists",companionError:"Connection with Companion failed",authAborted:"Authentication aborted",companionUnauthorizeHint:"To unauthorize to your %{provider} account, please go to %{url}",failedToUpload:"Failed to upload %{file}",noInternetConnection:"No Internet connection",connectedToInternet:"Connected to the Internet",noFilesFound:"You have no files or folders here",noSearchResults:"Unfortunately, there are no results for this search",selectX:{0:"Select %{smart_count}",1:"Select %{smart_count}"},allFilesFromFolderNamed:"All files from folder %{name}",openFolderNamed:"Open folder %{name}",cancel:"Cancel",logOut:"Log out",logIn:"Log in",pickFiles:"Pick files",pickPhotos:"Pick photos",filter:"Filter",resetFilter:"Reset filter",loading:"Loading...",loadedXFiles:"Loaded %{numFiles} files",authenticateWithTitle:"Please authenticate with %{pluginName} to select files",authenticateWith:"Connect to %{pluginName}",signInWithGoogle:"Sign in with Google",searchImages:"Search for images",enterTextToSearch:"Enter text to search for images",search:"Search",resetSearch:"Reset search",emptyFolderAdded:"No files were added from empty folder",addedNumFiles:"Added %{numFiles} file(s)",folderAlreadyAdded:'The folder "%{folder}" was already added',folderAdded:{0:"Added %{smart_count} file from %{folder}",1:"Added %{smart_count} files from %{folder}"},additionalRestrictionsFailed:"%{count} additional restrictions were not fulfilled",unnamed:"Unnamed",pleaseWait:"Please wait"}};function H(i,e){if(!{}.hasOwnProperty.call(i,e))throw new TypeError("attempted to use private field on non-instance");return i}var eP=0;function Me(i){return"__private_"+eP+++"_"+i}var tP={version:"4.4.1"},ua={totalProgress:0,allowNewUpload:!0,error:null,recoveredState:null},ct=Me("plugins"),dt=Me("restricter"),ro=Me("storeUnsubscribe"),Fi=Me("emitter"),mn=Me("preProcessors"),gn=Me("uploaders"),Ai=Me("postProcessors"),Vt=Me("informAndEmit"),uo=Me("checkRequiredMetaFieldsOnFile"),sd=Me("checkRequiredMetaFields"),oo=Me("assertNewUploadAllowed"),cd=Me("transformFile"),so=Me("startIfAutoProceed"),ao=Me("checkAndUpdateFileState"),dd=Me("handleUploadProgress"),lo=Me("updateTotalProgress"),Bi=Me("updateTotalProgressThrottled"),ud=Me("calculateTotalProgress"),ad=Me("addListeners"),ui=Me("updateOnlineStatus"),co=Me("requestClientById"),Ri=Me("createUpload"),ld=Me("getUpload"),yn=Me("removeUpload"),Mi=Me("runUpload"),pa=class i{constructor(e){Object.defineProperty(this,Mi,{value:mP}),Object.defineProperty(this,yn,{value:fP}),Object.defineProperty(this,ld,{value:hP}),Object.defineProperty(this,Ri,{value:pP}),Object.defineProperty(this,ad,{value:uP}),Object.defineProperty(this,ud,{value:dP}),Object.defineProperty(this,lo,{value:cP}),Object.defineProperty(this,ao,{value:lP}),Object.defineProperty(this,so,{value:aP}),Object.defineProperty(this,cd,{value:sP}),Object.defineProperty(this,oo,{value:oP}),Object.defineProperty(this,sd,{value:rP}),Object.defineProperty(this,uo,{value:nP}),Object.defineProperty(this,Vt,{value:iP}),Object.defineProperty(this,ct,{writable:!0,value:Object.create(null)}),Object.defineProperty(this,dt,{writable:!0,value:void 0}),Object.defineProperty(this,ro,{writable:!0,value:void 0}),Object.defineProperty(this,Fi,{writable:!0,value:(0,rg.default)()}),Object.defineProperty(this,mn,{writable:!0,value:new Set}),Object.defineProperty(this,gn,{writable:!0,value:new Set}),Object.defineProperty(this,Ai,{writable:!0,value:new Set}),this.scheduledAutoProceed=null,this.wasOffline=!1,Object.defineProperty(this,dd,{writable:!0,value:(r,o)=>{let s=r?this.getFile(r.id):void 0;if(r==null||!s){this.log(`Not setting progress for a file that has been removed: ${r?.id}`);return}if(s.progress.percentage===100){this.log(`Not setting progress for a file that has been already uploaded: ${r.id}`);return}let a={bytesTotal:o.bytesTotal,percentage:o.bytesTotal!=null&&Number.isFinite(o.bytesTotal)&&o.bytesTotal>0?Math.round(o.bytesUploaded/o.bytesTotal*100):void 0};s.progress.uploadStarted!=null?this.setFileState(r.id,{progress:D(v(v({},s.progress),a),{bytesUploaded:o.bytesUploaded})}):this.setFileState(r.id,{progress:v(v({},s.progress),a)}),H(this,Bi)[Bi]()}}),Object.defineProperty(this,Bi,{writable:!0,value:(0,og.default)(()=>H(this,lo)[lo](),500,{leading:!0,trailing:!0})}),Object.defineProperty(this,ui,{writable:!0,value:this.updateOnlineStatus.bind(this)}),Object.defineProperty(this,co,{writable:!0,value:new Map}),this.defaultLocale=ng;let t={id:"uppy",autoProceed:!1,allowMultipleUploadBatches:!0,debug:!1,restrictions:ig,meta:{},onBeforeFileAdded:(r,o)=>!Object.hasOwn(o,r.id),onBeforeUpload:r=>r,store:new Wm,logger:Gm,infoTimeout:5e3},n=v(v({},t),e);this.opts=D(v({},n),{restrictions:v(v({},t.restrictions),e&&e.restrictions)}),e&&e.logger&&e.debug?this.log("You are using a custom `logger`, but also set `debug: true`, which uses built-in logger to output logs to console. Ignoring `debug: true` and using your custom `logger`.","warning"):e&&e.debug&&(this.opts.logger=Xm),this.log(`Using Core v${i.VERSION}`),this.i18nInit(),this.store=this.opts.store,this.setState(D(v({},ua),{plugins:{},files:{},currentUploads:{},capabilities:{uploadProgress:nd(),individualCancellation:!0,resumableUploads:!1},meta:v({},this.opts.meta),info:[]})),H(this,dt)[dt]=new da(()=>this.opts,()=>this.i18n),H(this,ro)[ro]=this.store.subscribe((r,o,s)=>{this.emit("state-update",r,o,s),this.updateAll(o)}),this.opts.debug&&typeof window<"u"&&(window[this.opts.id]=this),H(this,ad)[ad]()}emit(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];H(this,Fi)[Fi].emit(e,...n)}on(e,t){return H(this,Fi)[Fi].on(e,t),this}once(e,t){return H(this,Fi)[Fi].once(e,t),this}off(e,t){return H(this,Fi)[Fi].off(e,t),this}updateAll(e){this.iteratePlugins(t=>{t.update(e)})}setState(e){this.store.setState(e)}getState(){return this.store.getState()}patchFilesState(e){let t=this.getState().files;this.setState({files:v(v({},t),Object.fromEntries(Object.entries(e).map(n=>{let[r,o]=n;return[r,v(v({},t[r]),o)]})))})}setFileState(e,t){if(!this.getState().files[e])throw new Error(`Can\u2019t set state for ${e} (the file could have been removed)`);this.patchFilesState({[e]:t})}i18nInit(){let e=n=>this.log(`Missing i18n string: ${n}`,"error"),t=new lr([this.defaultLocale,this.opts.locale],{onMissingKey:e});this.i18n=t.translate.bind(t),this.i18nArray=t.translateArray.bind(t),this.locale=t.locale}setOptions(e){this.opts=D(v(v({},this.opts),e),{restrictions:v(v({},this.opts.restrictions),e?.restrictions)}),e.meta&&this.setMeta(e.meta),this.i18nInit(),e.locale&&this.iteratePlugins(t=>{t.setOptions(e)}),this.setState(void 0)}resetProgress(){let e={percentage:0,bytesUploaded:!1,uploadComplete:!1,uploadStarted:null},t=v({},this.getState().files),n=Object.create(null);Object.keys(t).forEach(r=>{n[r]=D(v({},t[r]),{progress:v(v({},t[r].progress),e),tus:void 0,transloadit:void 0})}),this.setState(v({files:n},ua))}clear(){let{capabilities:e,currentUploads:t}=this.getState();if(Object.keys(t).length>0&&!e.individualCancellation)throw new Error("The installed uploader plugin does not allow removing files during an upload.");this.setState(D(v({},ua),{files:{}}))}addPreProcessor(e){H(this,mn)[mn].add(e)}removePreProcessor(e){return H(this,mn)[mn].delete(e)}addPostProcessor(e){H(this,Ai)[Ai].add(e)}removePostProcessor(e){return H(this,Ai)[Ai].delete(e)}addUploader(e){H(this,gn)[gn].add(e)}removeUploader(e){return H(this,gn)[gn].delete(e)}setMeta(e){let t=v(v({},this.getState().meta),e),n=v({},this.getState().files);Object.keys(n).forEach(r=>{n[r]=D(v({},n[r]),{meta:v(v({},n[r].meta),e)})}),this.log("Adding metadata:"),this.log(e),this.setState({meta:t,files:n})}setFileMeta(e,t){let n=v({},this.getState().files);if(!n[e]){this.log(`Was trying to set metadata for a file that has been removed: ${e}`);return}let r=v(v({},n[e].meta),t);n[e]=D(v({},n[e]),{meta:r}),this.setState({files:n})}getFile(e){return this.getState().files[e]}getFiles(){let{files:e}=this.getState();return Object.values(e)}getFilesByIds(e){return e.map(t=>this.getFile(t))}getObjectOfFilesPerState(){let{files:e,totalProgress:t,error:n}=this.getState(),r=Object.values(e),o=[],s=[],a=[],l=[],c=[],d=[],u=[],g=[],h=[];for(let _ of r){let{progress:E}=_;!E.uploadComplete&&E.uploadStarted&&(o.push(_),_.isPaused||g.push(_)),E.uploadStarted||s.push(_),(E.uploadStarted||E.preprocess||E.postprocess)&&a.push(_),E.uploadStarted&&l.push(_),_.isPaused&&c.push(_),E.uploadComplete&&d.push(_),_.error&&u.push(_),(E.preprocess||E.postprocess)&&h.push(_)}return{newFiles:s,startedFiles:a,uploadStartedFiles:l,pausedFiles:c,completeFiles:d,erroredFiles:u,inProgressFiles:o,inProgressNotPausedFiles:g,processingFiles:h,isUploadStarted:l.length>0,isAllComplete:t===100&&d.length===r.length&&h.length===0,isAllErrored:!!n&&u.length===r.length,isAllPaused:o.length!==0&&c.length===o.length,isUploadInProgress:o.length>0,isSomeGhost:r.some(_=>_.isGhost)}}validateRestrictions(e,t){t===void 0&&(t=this.getFiles());try{H(this,dt)[dt].validate(t,[e])}catch(n){return n}return null}validateSingleFile(e){try{H(this,dt)[dt].validateSingleFile(e)}catch(t){return t.message}return null}validateAggregateRestrictions(e){let t=this.getFiles();try{H(this,dt)[dt].validateAggregateRestrictions(t,e)}catch(n){return n.message}return null}checkIfFileAlreadyExists(e){let{files:t}=this.getState();return!!(t[e]&&!t[e].isGhost)}addFile(e){H(this,oo)[oo](e);let{nextFilesState:t,validFilesToAdd:n,errors:r}=H(this,ao)[ao]([e]),o=r.filter(a=>a.isRestriction);if(H(this,Vt)[Vt](o),r.length>0)throw r[0];this.setState({files:t});let[s]=n;return this.emit("file-added",s),this.emit("files-added",n),this.log(`Added file: ${s.name}, ${s.id}, mime type: ${s.type}`),H(this,so)[so](),s.id}addFiles(e){H(this,oo)[oo]();let{nextFilesState:t,validFilesToAdd:n,errors:r}=H(this,ao)[ao](e),o=r.filter(a=>a.isRestriction);H(this,Vt)[Vt](o);let s=r.filter(a=>!a.isRestriction);if(s.length>0){let a=`Multiple errors occurred while adding files:
|
|
16
|
+
`)}};function rr(i,e,t){let n=Math.min(Number(t),Math.max(Number(e),Number(i)));return i instanceof Date?new Date(n):n}var Rx=[".",",","\u0431","\u044E"];var Ac="\xA0",Mx="\u200B",Pf="\u2013",Ef="\u2014",Zs="-",Mc="\u2212",Df="\u30FC";var VT=new RegExp(`[${Ac}APM]+$`,"g"),UT=new RegExp(`${Ac}[AP]M$`,"g"),Ax=[":","."];function or(i){return i}function Bx(){}var kf=/[\\^$.*+?()[\]{}|]/g,Nx=new RegExp(kf.source);function gt(i){return i&&Nx.test(i)?i.replaceAll(kf,String.raw`\$&`):i}function di(i,{prefix:e,postfix:t}){var n,r;let o=new RegExp(`^${gt(e)}`),s=new RegExp(`${gt(t)}$`),[a=""]=(n=i.match(o))!==null&&n!==void 0?n:[],[l=""]=(r=i.match(s))!==null&&r!==void 0?r:[];return{extractedPrefix:a,extractedPostfix:l,cleanValue:a||l?i.slice(a.length,l.length?-l.length:1/0):i}}function zx(i,e){let t="";for(let n=0;n<i.length;n++){if(i[n]!==e[n])return t;t+=i[n]}return t}function wf(i){return i.replaceAll(/[0-9]/g,e=>String.fromCharCode(e.charCodeAt(0)-65248))}function Lx(){return({elementState:i,data:e})=>{let{value:t,selection:n}=i;return{elementState:{selection:n,value:wf(t)},data:wf(e)}}}var WT=new RegExp(`[${Ax.map(gt).join("")}]$`);function Hx(i){let e=new RegExp(`${gt(i)}$`);return i?({value:t,selection:n},r)=>{if(!t&&!r.value.endsWith(i))return{value:t,selection:n};if(!t.endsWith(i)&&!r.value.endsWith(i))return{selection:n,value:t+i};let o=r.value.replace(e,""),s=r.selection[1]>o.length,a=zx(o,t);return{selection:n,value:Array.from(i).reverse().reduce((l,c,d)=>{let u=l.length-1-d,g=a[u]===c&&s;return l[u]!==c||g?l.slice(0,u+1)+c+l.slice(u+1):l},t)}}:or}function jx(i){return i?({value:e,selection:t},n)=>{if(e.startsWith(i)||!e&&!n.value.startsWith(i))return{value:e,selection:t};let[r,o]=t,s=Array.from(i).reduce((l,c,d)=>l[d]===c?l:l.slice(0,d)+c+l.slice(d),e),a=s.length-e.length;return{selection:[r+a,o+a],value:s}}:or}function sr(i,e,t){return(n,r)=>{let o=()=>e(n,r);return n.addEventListener(i,o,t),()=>n.removeEventListener(i,o,t)}}function Vx(i){return(e,t)=>{let n=e.ownerDocument,r=0,o=()=>r++,s=()=>{r=Math.max(--r,0)},a=()=>{if(e.matches(":focus")){if(r)return n.addEventListener("mouseup",a,{once:!0,passive:!0});i(e,t)}};return n.addEventListener("selectionchange",a,{passive:!0}),e.addEventListener("mousedown",o,{passive:!0}),n.addEventListener("mouseup",s,{passive:!0}),()=>{n.removeEventListener("selectionchange",a),n.removeEventListener("mousedown",o),n.removeEventListener("mouseup",s)}}}function Tf(i){return Vx(e=>{var t,n;let r=(t=e.selectionStart)!==null&&t!==void 0?t:0,o=(n=e.selectionEnd)!==null&&n!==void 0?n:0,[s,a]=i(e.value,[r,o]);(s>r||a<o)&&e.setSelectionRange(rr(r,s,a),rr(o,s,a))})}function Ux({prefix:i,postfix:e}){return({elementState:t,data:n})=>{let{cleanValue:r}=di(n,{prefix:i,postfix:e});return{elementState:t,data:r}}}function If({decimalSeparator:i,isNegativeAllowed:e,precision:t,thousandSeparator:n,prefix:r,postfix:o,decimalPseudoSeparators:s=[],pseudoMinuses:a=[],minusSign:l}){let c=xf(r),d=String.raw`\d`,u=e?`[${l}${a.map(N=>`\\${N}`).join("")}]?`:"",g=n?`[${d}${gt(n).replaceAll(/\s/g,String.raw`\s`)}]*`:`[${d}]*`,h=Number.isFinite(t)?t:"",_=t>0?`([${gt(i)}${s.map(gt).join("")}]${d}{0,${h}})?`:"",E=xf(o);return new RegExp(`^${c}${u}${g}${_}${E}$`)}function xf(i){return i?`${i.split("").map(e=>`${gt(e)}?`).join("")}`:""}function Bc(i,e="."){let t=!!new RegExp(`^\\D*[${Mc}\\${Zs}${Pf}${Ef}${Df}]`).exec(i),n=gt(e),r=i.replaceAll(new RegExp(`${n}(?!\\d)`,"g"),"").replaceAll(new RegExp(`[^\\d${n}]`,"g"),"").replace(e,e&&".");return r?+`${t?Zs:""}${r}`:NaN}function Wx(i){var e;let t=String(i),[n="",r]=t.split("e-"),o=t;if(r){let[,s]=n.split("."),a=Number(r)+((e=s?.length)!==null&&e!==void 0?e:0);o=i.toFixed(a)}return o}function Of(i,{decimalSeparator:e,minusSign:t}){let[n="",r=""]=e?i.split(e):[i],o=gt(t),[,s="",a=""]=new RegExp(`^(?:[^\\d${o}])?(${o})?(.*)`).exec(n)||[];return{minus:s,integerPart:a,decimalPart:r}}function $x({decimalSeparator:i,thousandSeparator:e,decimalPseudoSeparators:t=Rx}){return t.filter(n=>n!==e&&n!==i)}function qx({decimalSeparator:i,precision:e,decimalZeroPadding:t,prefix:n,postfix:r}){return e<=0||!t?or:({value:o,selection:s})=>{let{cleanValue:a,extractedPrefix:l,extractedPostfix:c}=di(o,{prefix:n,postfix:r});if(Number.isNaN(Bc(a,i)))return{value:o,selection:s};let[d,u=""]=a.split(i);return{value:l+d+i+u.padEnd(e,"0")+c,selection:s}}}function Gx({prefix:i,postfix:e,decimalSeparator:t,minusSign:n}){return({value:r,selection:o})=>{let[s]=o,{cleanValue:a,extractedPrefix:l,extractedPostfix:c}=di(r,{prefix:i,postfix:e}),{minus:d,integerPart:u,decimalPart:g}=Of(a,{decimalSeparator:t,minusSign:n}),h=!u&&!g&&!!t&&a.includes(t);return!u&&!Number(g)&&s===(d+l).length||h?{selection:o,value:l+d+c}:{value:r,selection:o}}}function Xx({decimalSeparator:i,decimalPseudoSeparators:e,pseudoMinuses:t,prefix:n,postfix:r,minusSign:o}){let s=!0,a=If({decimalSeparator:i,decimalPseudoSeparators:e,pseudoMinuses:t,prefix:"",postfix:"",thousandSeparator:"",precision:1/0,isNegativeAllowed:!0,minusSign:o});return({elementState:l,data:c})=>{if(!s)return{elementState:l,data:c};s=!1;let{value:d,selection:u}=l,[g,h]=u,{extractedPrefix:_,cleanValue:E,extractedPostfix:N}=di(d,{prefix:n,postfix:r}),M=un({selection:[Math.max(g-_.length,0),rr(h-_.length,0,E.length)],value:E},{mask:a}),[U,de]=M.selection;return{elementState:{selection:[U+_.length,de+_.length],value:_+M.value+N},data:c}}}function Yx({decimalSeparator:i,thousandSeparator:e,prefix:t,postfix:n}){let r=s=>{let a=gt(e);return s.replace(new RegExp(`^(\\D+)?[0${a}]+(?=0)`),"$1").replace(new RegExp(`^(\\D+)?[0${a}]+(?=[1-9])`),"$1")},o=(s,a)=>{let l=s.slice(0,a),c=s.slice(a).startsWith("0");return l.length-r(l).length+(c?1:0)};return({value:s,selection:a})=>{let[l,c]=a,{cleanValue:d,extractedPrefix:u,extractedPostfix:g}=di(s,{prefix:t,postfix:n}),h=!!i&&d.includes(i),[_="",E=""]=i?d.split(i):[d],N=r(_);if(_===N)return{value:s,selection:a};let M=l-o(s,l),U=c-o(s,c);return{value:u+N+(h?i:"")+E+g,selection:[Math.max(M,0),Math.max(U,0)]}}}function Kx({min:i,max:e,decimalSeparator:t,minusSign:n}){return({value:r,selection:o})=>{let s=Bc(r,t),a=s>0?Math.min(s,e):Math.max(s,i);if(s&&a!==s){let l=`${a}`.replace(".",t).replace(Zs,n);return{value:l,selection:[l.length,l.length]}}return{value:r,selection:o}}}function Qx({decimalSeparator:i,thousandSeparator:e,decimalZeroPadding:t}){return({elementState:n,data:r},o)=>{let{value:s,selection:a}=n,[l,c]=a,d=s.slice(l,c),u=t?[i,e]:[e],g=t&&l>s.indexOf(i)&&!!d.match(/^0+$/gi);return o!=="deleteBackward"&&o!=="deleteForward"||!u.includes(d)&&!g?{elementState:n,data:r}:{elementState:{value:s,selection:o==="deleteForward"?[c,c]:[l,l]},data:r}}}function Zx({decimalSeparator:i,precision:e,prefix:t,postfix:n}){let r=new RegExp(`^\\D*${gt(i)}`);return({elementState:o,data:s})=>{let{value:a,selection:l}=o,{cleanValue:c,extractedPrefix:d}=di(a,{prefix:t,postfix:n}),[u,g]=l,h=rr(u-d.length,0,c.length),_=rr(g-d.length,0,c.length);if(e<=0||c.slice(0,h).includes(i)||c.slice(_).includes(i)||!s.match(r))return{elementState:o,data:s};let E=/\d+/.exec(c.slice(0,h));return{elementState:o,data:E?s:`0${s}`}}}function Cf({validCharacter:i,pseudoCharacters:e,prefix:t,postfix:n}){let r=new RegExp(`[${e.join("")}]`,"gi");return({elementState:o,data:s})=>{let{value:a,selection:l}=o,{cleanValue:c,extractedPostfix:d,extractedPrefix:u}=di(a,{prefix:t,postfix:n});return{elementState:{selection:l,value:u+c.replace(r,i)+d},data:s.replace(r,i)}}}function Jx({decimalSeparator:i,prefix:e,postfix:t}){return i?({elementState:n,data:r})=>{let{value:o,selection:s}=n,[a,l]=s,{cleanValue:c}=di(o,{prefix:e,postfix:t});return{elementState:n,data:!c.includes(i)||o.slice(a,l+1).includes(i)?r:r.replaceAll(new RegExp(gt(i),"gi"),"")}}:or}function eC({thousandSeparator:i,decimalSeparator:e,prefix:t,postfix:n,minusSign:r}){if(!i)return or;let o=(...s)=>s.every(a=>/\s/.test(a));return({value:s,selection:a})=>{let[l,c]=a,[d,u]=a,{cleanValue:g,extractedPostfix:h,extractedPrefix:_}=di(s,{prefix:t,postfix:n}),{minus:E,integerPart:N,decimalPart:M}=Of(g,{decimalSeparator:e,minusSign:r}),U=e&&g.includes(e),de=g.length-(E+N+(U?e+M:"")).length;de>0&&l&&l<=de&&(d-=de),de>0&&c&&c<=de&&(u-=de);let oe=Array.from(N).reduceRight((ee,b,w)=>{let A=!(!w&&b===i)&&!!ee.length&&(ee.length+1)%4===0,L=b===i||o(b,i);return A&&L?i+ee:!A&&L?(w&&w<=l&&d--,w&&w<=c&&u--,ee):A?(w<l&&d++,w<c&&u++,b+i+ee):b+ee},"");return{value:_+E+oe+(U?e:"")+M+h,selection:[d,u]}}}function tC({precision:i,decimalSeparator:e,prefix:t,postfix:n}){if(i>0||!e)return or;let r=new RegExp(`${gt(e)}.*$`,"g");return({elementState:o,data:s})=>{let{value:a,selection:l}=o,{cleanValue:c,extractedPrefix:d,extractedPostfix:u}=di(a,{prefix:t,postfix:n}),[g,h]=l,_=d+c.replace(r,"")+u;return{elementState:{selection:[Math.min(g,_.length),Math.min(h,_.length)],value:_},data:s.replace(r,"")}}}var Sf=[0,0];function iC({decimalSeparator:i,thousandSeparator:e,prefix:t,postfix:n}){let r=Yx({decimalSeparator:i,thousandSeparator:e,prefix:t,postfix:n});return sr("blur",o=>{let s=r({value:o.value,selection:Sf},{value:"",selection:Sf}).value;nr(o,s)},{capture:!0})}function nC({min:i,max:e,decimalSeparator:t}){return sr("blur",(n,r)=>{let o=Bc(n.value,t),s=rr(o,i,e);!Number.isNaN(o)&&o!==s&&nr(n,un(Wx(s),r))},{capture:!0})}function rC({decimalSeparator:i,prefix:e,postfix:t}){return i?sr("blur",n=>{let{cleanValue:r,extractedPostfix:o,extractedPrefix:s}=di(n.value,{prefix:e,postfix:t}),a=s+r.replace(new RegExp(`^(\\D+)?${gt(i)}`),`$10${i}`)+o;nr(n,a)},{capture:!0}):Bx}function ar({max:i=Number.MAX_SAFE_INTEGER,min:e=Number.MIN_SAFE_INTEGER,precision:t=0,thousandSeparator:n=Ac,decimalSeparator:r=".",decimalPseudoSeparators:o,decimalZeroPadding:s=!1,prefix:a="",postfix:l="",minusSign:c=Mc}={}){let d=[Zs,Pf,Ef,Df,Mc].filter(_=>_!==n&&_!==r&&_!==c),u=$x({decimalSeparator:r,thousandSeparator:n,decimalPseudoSeparators:o}),g=a.endsWith(r)&&t>0?`${a}${Mx}`:a,h=Xx({decimalSeparator:r,decimalPseudoSeparators:u,pseudoMinuses:d,prefix:g,postfix:l,minusSign:c});return r=t<=0&&r===n?"":r,Object.assign(Object.assign({},ir),{mask:If({decimalSeparator:r,precision:t,thousandSeparator:n,prefix:g,postfix:l,isNegativeAllowed:e<0,minusSign:c}),preprocessors:[Lx(),h,Ux({prefix:g,postfix:l}),Cf({validCharacter:c,pseudoCharacters:d,prefix:g,postfix:l}),Cf({validCharacter:r,pseudoCharacters:u,prefix:g,postfix:l}),Zx({decimalSeparator:r,precision:t,prefix:g,postfix:l}),Qx({decimalSeparator:r,decimalZeroPadding:s,thousandSeparator:n}),tC({precision:t,decimalSeparator:r,prefix:g,postfix:l}),Jx({decimalSeparator:r,prefix:g,postfix:l})],postprocessors:[Kx({decimalSeparator:r,min:e,max:i,minusSign:c}),jx(g),Hx(l),eC({decimalSeparator:r,thousandSeparator:n,prefix:g,postfix:l,minusSign:c}),qx({decimalSeparator:r,decimalZeroPadding:s,precision:t,prefix:g,postfix:l}),Gx({prefix:g,postfix:l,decimalSeparator:r,minusSign:c})],plugins:[iC({decimalSeparator:r,thousandSeparator:n,prefix:g,postfix:l}),rC({decimalSeparator:r,prefix:g,postfix:l}),nC({min:e,max:i,decimalSeparator:r})],overwriteMode:s?({value:_,selection:[E]})=>E<=_.indexOf(r)?"shift":"replace":"shift"})}var Ji=(()=>{class i{constructor(){this.elementRef=z(Et).nativeElement,this.ngZone=z(Pt),this.maskedElement=null,this.options=null,this.elementPredicate=bf;let t=z(tt,{self:!0,optional:!0});if(t){let n=t.writeValue.bind(t);t.writeValue=r=>{n(this.options?un(String(r??""),this.options):r)}}}ngOnChanges(){return B(this,null,function*(){let{elementPredicate:t,options:n,maskedElement:r,elementRef:o,ngZone:s}=this;if(r?.destroy(),!n)return;let a=yield t(o);this.elementPredicate!==t||this.options!==n||s.runOutsideAngular(()=>{this.maskedElement=new Ks(a,n)})})}ngOnDestroy(){this.maskedElement?.destroy()}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275dir=ln({type:i,selectors:[["","maskito",""]],inputs:{options:[0,"maskito","options"],elementPredicate:[0,"maskitoElement","elementPredicate"]},standalone:!0,features:[gi]})}}return i})(),Ff=(()=>{class i{transform(t,n){return un(String(t??""),n??ir)}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275pipe=ts({name:"maskito",type:i,pure:!0,standalone:!0})}}return i})();var sC=20,Mf=(()=>{class i{constructor(t,n,r){this._ngZone=t,this._platform=n,this._scrolled=new et,this._globalSubscription=null,this._scrolledCount=0,this.scrollContainers=new Map,this._document=r}register(t){this.scrollContainers.has(t)||this.scrollContainers.set(t,t.elementScrolled().subscribe(()=>this._scrolled.next(t)))}deregister(t){let n=this.scrollContainers.get(t);n&&(n.unsubscribe(),this.scrollContainers.delete(t))}scrolled(t=sC){return this._platform.isBrowser?new St(n=>{this._globalSubscription||this._addGlobalListener();let r=t>0?this._scrolled.pipe(ol(t)).subscribe(n):this._scrolled.subscribe(n);return this._scrolledCount++,()=>{r.unsubscribe(),this._scrolledCount--,this._scrolledCount||this._removeGlobalListener()}}):Le()}ngOnDestroy(){this._removeGlobalListener(),this.scrollContainers.forEach((t,n)=>this.deregister(n)),this._scrolled.complete()}ancestorScrolled(t,n){let r=this.getAncestorScrollContainers(t);return this.scrolled(n).pipe(Qt(o=>!o||r.indexOf(o)>-1))}getAncestorScrollContainers(t){let n=[];return this.scrollContainers.forEach((r,o)=>{this._scrollableContainsElement(o,t)&&n.push(o)}),n}_getWindow(){return this._document.defaultView||window}_scrollableContainsElement(t,n){let r=zp(n),o=t.getElementRef().nativeElement;do if(r==o)return!0;while(r=r.parentElement);return!1}_addGlobalListener(){this._globalSubscription=this._ngZone.runOutsideAngular(()=>{let t=this._getWindow();return sn(t.document,"scroll").subscribe(()=>this._scrolled.next())})}_removeGlobalListener(){this._globalSubscription&&(this._globalSubscription.unsubscribe(),this._globalSubscription=null)}static{this.\u0275fac=function(n){return new(n||i)(pe(Pt),pe(Ii),pe(mt,8))}}static{this.\u0275prov=Ve({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();var aC=20,Kr=(()=>{class i{constructor(t,n,r){this._platform=t,this._change=new et,this._changeListener=o=>{this._change.next(o)},this._document=r,n.runOutsideAngular(()=>{if(t.isBrowser){let o=this._getWindow();o.addEventListener("resize",this._changeListener),o.addEventListener("orientationchange",this._changeListener)}this.change().subscribe(()=>this._viewportSize=null)})}ngOnDestroy(){if(this._platform.isBrowser){let t=this._getWindow();t.removeEventListener("resize",this._changeListener),t.removeEventListener("orientationchange",this._changeListener)}this._change.complete()}getViewportSize(){this._viewportSize||this._updateViewportSize();let t={width:this._viewportSize.width,height:this._viewportSize.height};return this._platform.isBrowser||(this._viewportSize=null),t}getViewportRect(){let t=this.getViewportScrollPosition(),{width:n,height:r}=this.getViewportSize();return{top:t.top,left:t.left,bottom:t.top+r,right:t.left+n,height:r,width:n}}getViewportScrollPosition(){if(!this._platform.isBrowser)return{top:0,left:0};let t=this._document,n=this._getWindow(),r=t.documentElement,o=r.getBoundingClientRect(),s=-o.top||t.body.scrollTop||n.scrollY||r.scrollTop||0,a=-o.left||t.body.scrollLeft||n.scrollX||r.scrollLeft||0;return{top:s,left:a}}change(t=aC){return t>0?this._change.pipe(ol(t)):this._change}_getWindow(){return this._document.defaultView||window}_updateViewportSize(){let t=this._getWindow();this._viewportSize=this._platform.isBrowser?{width:t.innerWidth,height:t.innerHeight}:{width:0,height:0}}static{this.\u0275fac=function(n){return new(n||i)(pe(Ii),pe(Pt),pe(mt,8))}}static{this.\u0275prov=Ve({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();var Js=(()=>{class i{static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275mod=Nt({type:i})}static{this.\u0275inj=Bt({})}}return i})(),Nc=(()=>{class i{static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275mod=Nt({type:i})}static{this.\u0275inj=Bt({imports:[Mr,Js,Mr,Js]})}}return i})();var Bf=Np(),zc=class{constructor(e,t){this._viewportRuler=e,this._previousHTMLStyles={top:"",left:""},this._isEnabled=!1,this._document=t}attach(){}enable(){if(this._canBeEnabled()){let e=this._document.documentElement;this._previousScrollPosition=this._viewportRuler.getViewportScrollPosition(),this._previousHTMLStyles.left=e.style.left||"",this._previousHTMLStyles.top=e.style.top||"",e.style.left=We(-this._previousScrollPosition.left),e.style.top=We(-this._previousScrollPosition.top),e.classList.add("cdk-global-scrollblock"),this._isEnabled=!0}}disable(){if(this._isEnabled){let e=this._document.documentElement,t=this._document.body,n=e.style,r=t.style,o=n.scrollBehavior||"",s=r.scrollBehavior||"";this._isEnabled=!1,n.left=this._previousHTMLStyles.left,n.top=this._previousHTMLStyles.top,e.classList.remove("cdk-global-scrollblock"),Bf&&(n.scrollBehavior=r.scrollBehavior="auto"),window.scroll(this._previousScrollPosition.left,this._previousScrollPosition.top),Bf&&(n.scrollBehavior=o,r.scrollBehavior=s)}}_canBeEnabled(){if(this._document.documentElement.classList.contains("cdk-global-scrollblock")||this._isEnabled)return!1;let t=this._document.body,n=this._viewportRuler.getViewportSize();return t.scrollHeight>n.height||t.scrollWidth>n.width}};var Lc=class{constructor(e,t,n,r){this._scrollDispatcher=e,this._ngZone=t,this._viewportRuler=n,this._config=r,this._scrollSubscription=null,this._detach=()=>{this.disable(),this._overlayRef.hasAttached()&&this._ngZone.run(()=>this._overlayRef.detach())}}attach(e){this._overlayRef,this._overlayRef=e}enable(){if(this._scrollSubscription)return;let e=this._scrollDispatcher.scrolled(0).pipe(Qt(t=>!t||!this._overlayRef.overlayElement.contains(t.getElementRef().nativeElement)));this._config&&this._config.threshold&&this._config.threshold>1?(this._initialScrollPosition=this._viewportRuler.getViewportScrollPosition().top,this._scrollSubscription=e.subscribe(()=>{let t=this._viewportRuler.getViewportScrollPosition().top;Math.abs(t-this._initialScrollPosition)>this._config.threshold?this._detach():this._overlayRef.updatePosition()})):this._scrollSubscription=e.subscribe(this._detach)}disable(){this._scrollSubscription&&(this._scrollSubscription.unsubscribe(),this._scrollSubscription=null)}detach(){this.disable(),this._overlayRef=null}},ea=class{enable(){}disable(){}attach(){}};function Hc(i,e){return e.some(t=>{let n=i.bottom<t.top,r=i.top>t.bottom,o=i.right<t.left,s=i.left>t.right;return n||r||o||s})}function Nf(i,e){return e.some(t=>{let n=i.top<t.top,r=i.bottom>t.bottom,o=i.left<t.left,s=i.right>t.right;return n||r||o||s})}var jc=class{constructor(e,t,n,r){this._scrollDispatcher=e,this._viewportRuler=t,this._ngZone=n,this._config=r,this._scrollSubscription=null}attach(e){this._overlayRef,this._overlayRef=e}enable(){if(!this._scrollSubscription){let e=this._config?this._config.scrollThrottle:0;this._scrollSubscription=this._scrollDispatcher.scrolled(e).subscribe(()=>{if(this._overlayRef.updatePosition(),this._config&&this._config.autoClose){let t=this._overlayRef.overlayElement.getBoundingClientRect(),{width:n,height:r}=this._viewportRuler.getViewportSize();Hc(t,[{width:n,height:r,bottom:r,right:n,top:0,left:0}])&&(this.disable(),this._ngZone.run(()=>this._overlayRef.detach()))}})}}disable(){this._scrollSubscription&&(this._scrollSubscription.unsubscribe(),this._scrollSubscription=null)}detach(){this.disable(),this._overlayRef=null}},cC=(()=>{class i{constructor(t,n,r,o){this._scrollDispatcher=t,this._viewportRuler=n,this._ngZone=r,this.noop=()=>new ea,this.close=s=>new Lc(this._scrollDispatcher,this._ngZone,this._viewportRuler,s),this.block=()=>new zc(this._viewportRuler,this._document),this.reposition=s=>new jc(this._scrollDispatcher,this._viewportRuler,this._ngZone,s),this._document=o}static{this.\u0275fac=function(n){return new(n||i)(pe(Mf),pe(Kr),pe(Pt),pe(mt))}}static{this.\u0275prov=Ve({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})(),Qr=class{constructor(e){if(this.scrollStrategy=new ea,this.panelClass="",this.hasBackdrop=!1,this.backdropClass="cdk-overlay-dark-backdrop",this.disposeOnNavigation=!1,e){let t=Object.keys(e);for(let n of t)e[n]!==void 0&&(this[n]=e[n])}}};var Vc=class{constructor(e,t){this.connectionPair=e,this.scrollableViewProperties=t}};var Uf=(()=>{class i{constructor(t){this._attachedOverlays=[],this._document=t}ngOnDestroy(){this.detach()}add(t){this.remove(t),this._attachedOverlays.push(t)}remove(t){let n=this._attachedOverlays.indexOf(t);n>-1&&this._attachedOverlays.splice(n,1),this._attachedOverlays.length===0&&this.detach()}static{this.\u0275fac=function(n){return new(n||i)(pe(mt))}}static{this.\u0275prov=Ve({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})(),dC=(()=>{class i extends Uf{constructor(t,n){super(t),this._ngZone=n,this._keydownListener=r=>{let o=this._attachedOverlays;for(let s=o.length-1;s>-1;s--)if(o[s]._keydownEvents.observers.length>0){let a=o[s]._keydownEvents;this._ngZone?this._ngZone.run(()=>a.next(r)):a.next(r);break}}}add(t){super.add(t),this._isAttached||(this._ngZone?this._ngZone.runOutsideAngular(()=>this._document.body.addEventListener("keydown",this._keydownListener)):this._document.body.addEventListener("keydown",this._keydownListener),this._isAttached=!0)}detach(){this._isAttached&&(this._document.body.removeEventListener("keydown",this._keydownListener),this._isAttached=!1)}static{this.\u0275fac=function(n){return new(n||i)(pe(mt),pe(Pt,8))}}static{this.\u0275prov=Ve({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})(),uC=(()=>{class i extends Uf{constructor(t,n,r){super(t),this._platform=n,this._ngZone=r,this._cursorStyleIsSet=!1,this._pointerDownListener=o=>{this._pointerDownEventTarget=Ar(o)},this._clickListener=o=>{let s=Ar(o),a=o.type==="click"&&this._pointerDownEventTarget?this._pointerDownEventTarget:s;this._pointerDownEventTarget=null;let l=this._attachedOverlays.slice();for(let c=l.length-1;c>-1;c--){let d=l[c];if(d._outsidePointerEvents.observers.length<1||!d.hasAttached())continue;if(zf(d.overlayElement,s)||zf(d.overlayElement,a))break;let u=d._outsidePointerEvents;this._ngZone?this._ngZone.run(()=>u.next(o)):u.next(o)}}}add(t){if(super.add(t),!this._isAttached){let n=this._document.body;this._ngZone?this._ngZone.runOutsideAngular(()=>this._addEventListeners(n)):this._addEventListeners(n),this._platform.IOS&&!this._cursorStyleIsSet&&(this._cursorOriginalValue=n.style.cursor,n.style.cursor="pointer",this._cursorStyleIsSet=!0),this._isAttached=!0}}detach(){if(this._isAttached){let t=this._document.body;t.removeEventListener("pointerdown",this._pointerDownListener,!0),t.removeEventListener("click",this._clickListener,!0),t.removeEventListener("auxclick",this._clickListener,!0),t.removeEventListener("contextmenu",this._clickListener,!0),this._platform.IOS&&this._cursorStyleIsSet&&(t.style.cursor=this._cursorOriginalValue,this._cursorStyleIsSet=!1),this._isAttached=!1}}_addEventListeners(t){t.addEventListener("pointerdown",this._pointerDownListener,!0),t.addEventListener("click",this._clickListener,!0),t.addEventListener("auxclick",this._clickListener,!0),t.addEventListener("contextmenu",this._clickListener,!0)}static{this.\u0275fac=function(n){return new(n||i)(pe(mt),pe(Ii),pe(Pt,8))}}static{this.\u0275prov=Ve({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();function zf(i,e){let t=typeof ShadowRoot<"u"&&ShadowRoot,n=e;for(;n;){if(n===i)return!0;n=t&&n instanceof ShadowRoot?n.host:n.parentNode}return!1}var Wf=(()=>{class i{constructor(t,n){this._platform=n,this._document=t}ngOnDestroy(){this._containerElement?.remove()}getContainerElement(){return this._containerElement||this._createContainer(),this._containerElement}_createContainer(){let t="cdk-overlay-container";if(this._platform.isBrowser||wl()){let r=this._document.querySelectorAll(`.${t}[platform="server"], .${t}[platform="test"]`);for(let o=0;o<r.length;o++)r[o].remove()}let n=this._document.createElement("div");n.classList.add(t),wl()?n.setAttribute("platform","test"):this._platform.isBrowser||n.setAttribute("platform","server"),this._document.body.appendChild(n),this._containerElement=n}static{this.\u0275fac=function(n){return new(n||i)(pe(mt),pe(Ii))}}static{this.\u0275prov=Ve({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})(),Uc=class{constructor(e,t,n,r,o,s,a,l,c,d=!1,u){this._portalOutlet=e,this._host=t,this._pane=n,this._config=r,this._ngZone=o,this._keyboardDispatcher=s,this._document=a,this._location=l,this._outsideClickDispatcher=c,this._animationsDisabled=d,this._injector=u,this._backdropElement=null,this._backdropClick=new et,this._attachments=new et,this._detachments=new et,this._locationChanges=$i.EMPTY,this._backdropClickHandler=g=>this._backdropClick.next(g),this._backdropTransitionendHandler=g=>{this._disposeBackdrop(g.target)},this._keydownEvents=new et,this._outsidePointerEvents=new et,this._renders=new et,r.scrollStrategy&&(this._scrollStrategy=r.scrollStrategy,this._scrollStrategy.attach(this)),this._positionStrategy=r.positionStrategy,this._afterRenderRef=gp(()=>fp(()=>{this._renders.next()},{injector:this._injector}))}get overlayElement(){return this._pane}get backdropElement(){return this._backdropElement}get hostElement(){return this._host}attach(e){!this._host.parentElement&&this._previousHostParent&&this._previousHostParent.appendChild(this._host);let t=this._portalOutlet.attach(e);return this._positionStrategy&&this._positionStrategy.attach(this),this._updateStackingOrder(),this._updateElementSize(),this._updateElementDirection(),this._scrollStrategy&&this._scrollStrategy.enable(),this._afterNextRenderRef?.destroy(),this._afterNextRenderRef=os(()=>{this.hasAttached()&&this.updatePosition()},{injector:this._injector}),this._togglePointerEvents(!0),this._config.hasBackdrop&&this._attachBackdrop(),this._config.panelClass&&this._toggleClasses(this._pane,this._config.panelClass,!0),this._attachments.next(),this._keyboardDispatcher.add(this),this._config.disposeOnNavigation&&(this._locationChanges=this._location.subscribe(()=>this.dispose())),this._outsideClickDispatcher.add(this),typeof t?.onDestroy=="function"&&t.onDestroy(()=>{this.hasAttached()&&this._ngZone.runOutsideAngular(()=>Promise.resolve().then(()=>this.detach()))}),t}detach(){if(!this.hasAttached())return;this.detachBackdrop(),this._togglePointerEvents(!1),this._positionStrategy&&this._positionStrategy.detach&&this._positionStrategy.detach(),this._scrollStrategy&&this._scrollStrategy.disable();let e=this._portalOutlet.detach();return this._detachments.next(),this._keyboardDispatcher.remove(this),this._detachContentWhenEmpty(),this._locationChanges.unsubscribe(),this._outsideClickDispatcher.remove(this),e}dispose(){let e=this.hasAttached();this._positionStrategy&&this._positionStrategy.dispose(),this._disposeScrollStrategy(),this._disposeBackdrop(this._backdropElement),this._locationChanges.unsubscribe(),this._keyboardDispatcher.remove(this),this._portalOutlet.dispose(),this._attachments.complete(),this._backdropClick.complete(),this._keydownEvents.complete(),this._outsidePointerEvents.complete(),this._outsideClickDispatcher.remove(this),this._host?.remove(),this._afterNextRenderRef?.destroy(),this._previousHostParent=this._pane=this._host=null,e&&this._detachments.next(),this._detachments.complete(),this._afterRenderRef.destroy(),this._renders.complete()}hasAttached(){return this._portalOutlet.hasAttached()}backdropClick(){return this._backdropClick}attachments(){return this._attachments}detachments(){return this._detachments}keydownEvents(){return this._keydownEvents}outsidePointerEvents(){return this._outsidePointerEvents}getConfig(){return this._config}updatePosition(){this._positionStrategy&&this._positionStrategy.apply()}updatePositionStrategy(e){e!==this._positionStrategy&&(this._positionStrategy&&this._positionStrategy.dispose(),this._positionStrategy=e,this.hasAttached()&&(e.attach(this),this.updatePosition()))}updateSize(e){this._config=v(v({},this._config),e),this._updateElementSize()}setDirection(e){this._config=D(v({},this._config),{direction:e}),this._updateElementDirection()}addPanelClass(e){this._pane&&this._toggleClasses(this._pane,e,!0)}removePanelClass(e){this._pane&&this._toggleClasses(this._pane,e,!1)}getDirection(){let e=this._config.direction;return e?typeof e=="string"?e:e.value:"ltr"}updateScrollStrategy(e){e!==this._scrollStrategy&&(this._disposeScrollStrategy(),this._scrollStrategy=e,this.hasAttached()&&(e.attach(this),e.enable()))}_updateElementDirection(){this._host.setAttribute("dir",this.getDirection())}_updateElementSize(){if(!this._pane)return;let e=this._pane.style;e.width=We(this._config.width),e.height=We(this._config.height),e.minWidth=We(this._config.minWidth),e.minHeight=We(this._config.minHeight),e.maxWidth=We(this._config.maxWidth),e.maxHeight=We(this._config.maxHeight)}_togglePointerEvents(e){this._pane.style.pointerEvents=e?"":"none"}_attachBackdrop(){let e="cdk-overlay-backdrop-showing";this._backdropElement=this._document.createElement("div"),this._backdropElement.classList.add("cdk-overlay-backdrop"),this._animationsDisabled&&this._backdropElement.classList.add("cdk-overlay-backdrop-noop-animation"),this._config.backdropClass&&this._toggleClasses(this._backdropElement,this._config.backdropClass,!0),this._host.parentElement.insertBefore(this._backdropElement,this._host),this._backdropElement.addEventListener("click",this._backdropClickHandler),!this._animationsDisabled&&typeof requestAnimationFrame<"u"?this._ngZone.runOutsideAngular(()=>{requestAnimationFrame(()=>{this._backdropElement&&this._backdropElement.classList.add(e)})}):this._backdropElement.classList.add(e)}_updateStackingOrder(){this._host.nextSibling&&this._host.parentNode.appendChild(this._host)}detachBackdrop(){let e=this._backdropElement;if(e){if(this._animationsDisabled){this._disposeBackdrop(e);return}e.classList.remove("cdk-overlay-backdrop-showing"),this._ngZone.runOutsideAngular(()=>{e.addEventListener("transitionend",this._backdropTransitionendHandler)}),e.style.pointerEvents="none",this._backdropTimeout=this._ngZone.runOutsideAngular(()=>setTimeout(()=>{this._disposeBackdrop(e)},500))}}_toggleClasses(e,t,n){let r=xl(t||[]).filter(o=>!!o);r.length&&(n?e.classList.add(...r):e.classList.remove(...r))}_detachContentWhenEmpty(){this._ngZone.runOutsideAngular(()=>{let e=this._renders.pipe(dl(an(this._attachments,this._detachments))).subscribe(()=>{(!this._pane||!this._host||this._pane.children.length===0)&&(this._pane&&this._config.panelClass&&this._toggleClasses(this._pane,this._config.panelClass,!1),this._host&&this._host.parentElement&&(this._previousHostParent=this._host.parentElement,this._host.remove()),e.unsubscribe())})})}_disposeScrollStrategy(){let e=this._scrollStrategy;e&&(e.disable(),e.detach&&e.detach())}_disposeBackdrop(e){e&&(e.removeEventListener("click",this._backdropClickHandler),e.removeEventListener("transitionend",this._backdropTransitionendHandler),e.remove(),this._backdropElement===e&&(this._backdropElement=null)),this._backdropTimeout&&(clearTimeout(this._backdropTimeout),this._backdropTimeout=void 0)}},Lf="cdk-overlay-connected-position-bounding-box",pC=/([A-Za-z%]+)$/,Wc=class{get positions(){return this._preferredPositions}constructor(e,t,n,r,o){this._viewportRuler=t,this._document=n,this._platform=r,this._overlayContainer=o,this._lastBoundingBoxSize={width:0,height:0},this._isPushed=!1,this._canPush=!0,this._growAfterOpen=!1,this._hasFlexibleDimensions=!0,this._positionLocked=!1,this._viewportMargin=0,this._scrollables=[],this._preferredPositions=[],this._positionChanges=new et,this._resizeSubscription=$i.EMPTY,this._offsetX=0,this._offsetY=0,this._appliedPanelClasses=[],this.positionChanges=this._positionChanges,this.setOrigin(e)}attach(e){this._overlayRef&&this._overlayRef,this._validatePositions(),e.hostElement.classList.add(Lf),this._overlayRef=e,this._boundingBox=e.hostElement,this._pane=e.overlayElement,this._isDisposed=!1,this._isInitialRender=!0,this._lastPosition=null,this._resizeSubscription.unsubscribe(),this._resizeSubscription=this._viewportRuler.change().subscribe(()=>{this._isInitialRender=!0,this.apply()})}apply(){if(this._isDisposed||!this._platform.isBrowser)return;if(!this._isInitialRender&&this._positionLocked&&this._lastPosition){this.reapplyLastPosition();return}this._clearPanelClasses(),this._resetOverlayElementStyles(),this._resetBoundingBoxStyles(),this._viewportRect=this._getNarrowedViewportRect(),this._originRect=this._getOriginRect(),this._overlayRect=this._pane.getBoundingClientRect(),this._containerRect=this._overlayContainer.getContainerElement().getBoundingClientRect();let e=this._originRect,t=this._overlayRect,n=this._viewportRect,r=this._containerRect,o=[],s;for(let a of this._preferredPositions){let l=this._getOriginPoint(e,r,a),c=this._getOverlayPoint(l,t,a),d=this._getOverlayFit(c,t,n,a);if(d.isCompletelyWithinViewport){this._isPushed=!1,this._applyPosition(a,l);return}if(this._canFitWithFlexibleDimensions(d,c,n)){o.push({position:a,origin:l,overlayRect:t,boundingBoxRect:this._calculateBoundingBoxRect(l,a)});continue}(!s||s.overlayFit.visibleArea<d.visibleArea)&&(s={overlayFit:d,overlayPoint:c,originPoint:l,position:a,overlayRect:t})}if(o.length){let a=null,l=-1;for(let c of o){let d=c.boundingBoxRect.width*c.boundingBoxRect.height*(c.position.weight||1);d>l&&(l=d,a=c)}this._isPushed=!1,this._applyPosition(a.position,a.origin);return}if(this._canPush){this._isPushed=!0,this._applyPosition(s.position,s.originPoint);return}this._applyPosition(s.position,s.originPoint)}detach(){this._clearPanelClasses(),this._lastPosition=null,this._previousPushAmount=null,this._resizeSubscription.unsubscribe()}dispose(){this._isDisposed||(this._boundingBox&&pn(this._boundingBox.style,{top:"",left:"",right:"",bottom:"",height:"",width:"",alignItems:"",justifyContent:""}),this._pane&&this._resetOverlayElementStyles(),this._overlayRef&&this._overlayRef.hostElement.classList.remove(Lf),this.detach(),this._positionChanges.complete(),this._overlayRef=this._boundingBox=null,this._isDisposed=!0)}reapplyLastPosition(){if(this._isDisposed||!this._platform.isBrowser)return;let e=this._lastPosition;if(e){this._originRect=this._getOriginRect(),this._overlayRect=this._pane.getBoundingClientRect(),this._viewportRect=this._getNarrowedViewportRect(),this._containerRect=this._overlayContainer.getContainerElement().getBoundingClientRect();let t=this._getOriginPoint(this._originRect,this._containerRect,e);this._applyPosition(e,t)}else this.apply()}withScrollableContainers(e){return this._scrollables=e,this}withPositions(e){return this._preferredPositions=e,e.indexOf(this._lastPosition)===-1&&(this._lastPosition=null),this._validatePositions(),this}withViewportMargin(e){return this._viewportMargin=e,this}withFlexibleDimensions(e=!0){return this._hasFlexibleDimensions=e,this}withGrowAfterOpen(e=!0){return this._growAfterOpen=e,this}withPush(e=!0){return this._canPush=e,this}withLockedPosition(e=!0){return this._positionLocked=e,this}setOrigin(e){return this._origin=e,this}withDefaultOffsetX(e){return this._offsetX=e,this}withDefaultOffsetY(e){return this._offsetY=e,this}withTransformOriginOn(e){return this._transformOriginSelector=e,this}_getOriginPoint(e,t,n){let r;if(n.originX=="center")r=e.left+e.width/2;else{let s=this._isRtl()?e.right:e.left,a=this._isRtl()?e.left:e.right;r=n.originX=="start"?s:a}t.left<0&&(r-=t.left);let o;return n.originY=="center"?o=e.top+e.height/2:o=n.originY=="top"?e.top:e.bottom,t.top<0&&(o-=t.top),{x:r,y:o}}_getOverlayPoint(e,t,n){let r;n.overlayX=="center"?r=-t.width/2:n.overlayX==="start"?r=this._isRtl()?-t.width:0:r=this._isRtl()?0:-t.width;let o;return n.overlayY=="center"?o=-t.height/2:o=n.overlayY=="top"?0:-t.height,{x:e.x+r,y:e.y+o}}_getOverlayFit(e,t,n,r){let o=jf(t),{x:s,y:a}=e,l=this._getOffset(r,"x"),c=this._getOffset(r,"y");l&&(s+=l),c&&(a+=c);let d=0-s,u=s+o.width-n.width,g=0-a,h=a+o.height-n.height,_=this._subtractOverflows(o.width,d,u),E=this._subtractOverflows(o.height,g,h),N=_*E;return{visibleArea:N,isCompletelyWithinViewport:o.width*o.height===N,fitsInViewportVertically:E===o.height,fitsInViewportHorizontally:_==o.width}}_canFitWithFlexibleDimensions(e,t,n){if(this._hasFlexibleDimensions){let r=n.bottom-t.y,o=n.right-t.x,s=Hf(this._overlayRef.getConfig().minHeight),a=Hf(this._overlayRef.getConfig().minWidth),l=e.fitsInViewportVertically||s!=null&&s<=r,c=e.fitsInViewportHorizontally||a!=null&&a<=o;return l&&c}return!1}_pushOverlayOnScreen(e,t,n){if(this._previousPushAmount&&this._positionLocked)return{x:e.x+this._previousPushAmount.x,y:e.y+this._previousPushAmount.y};let r=jf(t),o=this._viewportRect,s=Math.max(e.x+r.width-o.width,0),a=Math.max(e.y+r.height-o.height,0),l=Math.max(o.top-n.top-e.y,0),c=Math.max(o.left-n.left-e.x,0),d=0,u=0;return r.width<=o.width?d=c||-s:d=e.x<this._viewportMargin?o.left-n.left-e.x:0,r.height<=o.height?u=l||-a:u=e.y<this._viewportMargin?o.top-n.top-e.y:0,this._previousPushAmount={x:d,y:u},{x:e.x+d,y:e.y+u}}_applyPosition(e,t){if(this._setTransformOrigin(e),this._setOverlayElementStyles(t,e),this._setBoundingBoxStyles(t,e),e.panelClass&&this._addPanelClasses(e.panelClass),this._positionChanges.observers.length){let n=this._getScrollVisibility();if(e!==this._lastPosition||!this._lastScrollVisibility||!hC(this._lastScrollVisibility,n)){let r=new Vc(e,n);this._positionChanges.next(r)}this._lastScrollVisibility=n}this._lastPosition=e,this._isInitialRender=!1}_setTransformOrigin(e){if(!this._transformOriginSelector)return;let t=this._boundingBox.querySelectorAll(this._transformOriginSelector),n,r=e.overlayY;e.overlayX==="center"?n="center":this._isRtl()?n=e.overlayX==="start"?"right":"left":n=e.overlayX==="start"?"left":"right";for(let o=0;o<t.length;o++)t[o].style.transformOrigin=`${n} ${r}`}_calculateBoundingBoxRect(e,t){let n=this._viewportRect,r=this._isRtl(),o,s,a;if(t.overlayY==="top")s=e.y,o=n.height-s+this._viewportMargin;else if(t.overlayY==="bottom")a=n.height-e.y+this._viewportMargin*2,o=n.height-a+this._viewportMargin;else{let h=Math.min(n.bottom-e.y+n.top,e.y),_=this._lastBoundingBoxSize.height;o=h*2,s=e.y-h,o>_&&!this._isInitialRender&&!this._growAfterOpen&&(s=e.y-_/2)}let l=t.overlayX==="start"&&!r||t.overlayX==="end"&&r,c=t.overlayX==="end"&&!r||t.overlayX==="start"&&r,d,u,g;if(c)g=n.width-e.x+this._viewportMargin*2,d=e.x-this._viewportMargin;else if(l)u=e.x,d=n.right-e.x;else{let h=Math.min(n.right-e.x+n.left,e.x),_=this._lastBoundingBoxSize.width;d=h*2,u=e.x-h,d>_&&!this._isInitialRender&&!this._growAfterOpen&&(u=e.x-_/2)}return{top:s,left:u,bottom:a,right:g,width:d,height:o}}_setBoundingBoxStyles(e,t){let n=this._calculateBoundingBoxRect(e,t);!this._isInitialRender&&!this._growAfterOpen&&(n.height=Math.min(n.height,this._lastBoundingBoxSize.height),n.width=Math.min(n.width,this._lastBoundingBoxSize.width));let r={};if(this._hasExactPosition())r.top=r.left="0",r.bottom=r.right=r.maxHeight=r.maxWidth="",r.width=r.height="100%";else{let o=this._overlayRef.getConfig().maxHeight,s=this._overlayRef.getConfig().maxWidth;r.height=We(n.height),r.top=We(n.top),r.bottom=We(n.bottom),r.width=We(n.width),r.left=We(n.left),r.right=We(n.right),t.overlayX==="center"?r.alignItems="center":r.alignItems=t.overlayX==="end"?"flex-end":"flex-start",t.overlayY==="center"?r.justifyContent="center":r.justifyContent=t.overlayY==="bottom"?"flex-end":"flex-start",o&&(r.maxHeight=We(o)),s&&(r.maxWidth=We(s))}this._lastBoundingBoxSize=n,pn(this._boundingBox.style,r)}_resetBoundingBoxStyles(){pn(this._boundingBox.style,{top:"0",left:"0",right:"0",bottom:"0",height:"",width:"",alignItems:"",justifyContent:""})}_resetOverlayElementStyles(){pn(this._pane.style,{top:"",left:"",bottom:"",right:"",position:"",transform:""})}_setOverlayElementStyles(e,t){let n={},r=this._hasExactPosition(),o=this._hasFlexibleDimensions,s=this._overlayRef.getConfig();if(r){let d=this._viewportRuler.getViewportScrollPosition();pn(n,this._getExactOverlayY(t,e,d)),pn(n,this._getExactOverlayX(t,e,d))}else n.position="static";let a="",l=this._getOffset(t,"x"),c=this._getOffset(t,"y");l&&(a+=`translateX(${l}px) `),c&&(a+=`translateY(${c}px)`),n.transform=a.trim(),s.maxHeight&&(r?n.maxHeight=We(s.maxHeight):o&&(n.maxHeight="")),s.maxWidth&&(r?n.maxWidth=We(s.maxWidth):o&&(n.maxWidth="")),pn(this._pane.style,n)}_getExactOverlayY(e,t,n){let r={top:"",bottom:""},o=this._getOverlayPoint(t,this._overlayRect,e);if(this._isPushed&&(o=this._pushOverlayOnScreen(o,this._overlayRect,n)),e.overlayY==="bottom"){let s=this._document.documentElement.clientHeight;r.bottom=`${s-(o.y+this._overlayRect.height)}px`}else r.top=We(o.y);return r}_getExactOverlayX(e,t,n){let r={left:"",right:""},o=this._getOverlayPoint(t,this._overlayRect,e);this._isPushed&&(o=this._pushOverlayOnScreen(o,this._overlayRect,n));let s;if(this._isRtl()?s=e.overlayX==="end"?"left":"right":s=e.overlayX==="end"?"right":"left",s==="right"){let a=this._document.documentElement.clientWidth;r.right=`${a-(o.x+this._overlayRect.width)}px`}else r.left=We(o.x);return r}_getScrollVisibility(){let e=this._getOriginRect(),t=this._pane.getBoundingClientRect(),n=this._scrollables.map(r=>r.getElementRef().nativeElement.getBoundingClientRect());return{isOriginClipped:Nf(e,n),isOriginOutsideView:Hc(e,n),isOverlayClipped:Nf(t,n),isOverlayOutsideView:Hc(t,n)}}_subtractOverflows(e,...t){return t.reduce((n,r)=>n-Math.max(r,0),e)}_getNarrowedViewportRect(){let e=this._document.documentElement.clientWidth,t=this._document.documentElement.clientHeight,n=this._viewportRuler.getViewportScrollPosition();return{top:n.top+this._viewportMargin,left:n.left+this._viewportMargin,right:n.left+e-this._viewportMargin,bottom:n.top+t-this._viewportMargin,width:e-2*this._viewportMargin,height:t-2*this._viewportMargin}}_isRtl(){return this._overlayRef.getDirection()==="rtl"}_hasExactPosition(){return!this._hasFlexibleDimensions||this._isPushed}_getOffset(e,t){return t==="x"?e.offsetX==null?this._offsetX:e.offsetX:e.offsetY==null?this._offsetY:e.offsetY}_validatePositions(){}_addPanelClasses(e){this._pane&&xl(e).forEach(t=>{t!==""&&this._appliedPanelClasses.indexOf(t)===-1&&(this._appliedPanelClasses.push(t),this._pane.classList.add(t))})}_clearPanelClasses(){this._pane&&(this._appliedPanelClasses.forEach(e=>{this._pane.classList.remove(e)}),this._appliedPanelClasses=[])}_getOriginRect(){let e=this._origin;if(e instanceof Et)return e.nativeElement.getBoundingClientRect();if(e instanceof Element)return e.getBoundingClientRect();let t=e.width||0,n=e.height||0;return{top:e.y,bottom:e.y+n,left:e.x,right:e.x+t,height:n,width:t}}};function pn(i,e){for(let t in e)e.hasOwnProperty(t)&&(i[t]=e[t]);return i}function Hf(i){if(typeof i!="number"&&i!=null){let[e,t]=i.split(pC);return!t||t==="px"?parseFloat(e):null}return i||null}function jf(i){return{top:Math.floor(i.top),right:Math.floor(i.right),bottom:Math.floor(i.bottom),left:Math.floor(i.left),width:Math.floor(i.width),height:Math.floor(i.height)}}function hC(i,e){return i===e?!0:i.isOriginClipped===e.isOriginClipped&&i.isOriginOutsideView===e.isOriginOutsideView&&i.isOverlayClipped===e.isOverlayClipped&&i.isOverlayOutsideView===e.isOverlayOutsideView}var Vf="cdk-global-overlay-wrapper",$c=class{constructor(){this._cssPosition="static",this._topOffset="",this._bottomOffset="",this._alignItems="",this._xPosition="",this._xOffset="",this._width="",this._height="",this._isDisposed=!1}attach(e){let t=e.getConfig();this._overlayRef=e,this._width&&!t.width&&e.updateSize({width:this._width}),this._height&&!t.height&&e.updateSize({height:this._height}),e.hostElement.classList.add(Vf),this._isDisposed=!1}top(e=""){return this._bottomOffset="",this._topOffset=e,this._alignItems="flex-start",this}left(e=""){return this._xOffset=e,this._xPosition="left",this}bottom(e=""){return this._topOffset="",this._bottomOffset=e,this._alignItems="flex-end",this}right(e=""){return this._xOffset=e,this._xPosition="right",this}start(e=""){return this._xOffset=e,this._xPosition="start",this}end(e=""){return this._xOffset=e,this._xPosition="end",this}width(e=""){return this._overlayRef?this._overlayRef.updateSize({width:e}):this._width=e,this}height(e=""){return this._overlayRef?this._overlayRef.updateSize({height:e}):this._height=e,this}centerHorizontally(e=""){return this.left(e),this._xPosition="center",this}centerVertically(e=""){return this.top(e),this._alignItems="center",this}apply(){if(!this._overlayRef||!this._overlayRef.hasAttached())return;let e=this._overlayRef.overlayElement.style,t=this._overlayRef.hostElement.style,n=this._overlayRef.getConfig(),{width:r,height:o,maxWidth:s,maxHeight:a}=n,l=(r==="100%"||r==="100vw")&&(!s||s==="100%"||s==="100vw"),c=(o==="100%"||o==="100vh")&&(!a||a==="100%"||a==="100vh"),d=this._xPosition,u=this._xOffset,g=this._overlayRef.getConfig().direction==="rtl",h="",_="",E="";l?E="flex-start":d==="center"?(E="center",g?_=u:h=u):g?d==="left"||d==="end"?(E="flex-end",h=u):(d==="right"||d==="start")&&(E="flex-start",_=u):d==="left"||d==="start"?(E="flex-start",h=u):(d==="right"||d==="end")&&(E="flex-end",_=u),e.position=this._cssPosition,e.marginLeft=l?"0":h,e.marginTop=c?"0":this._topOffset,e.marginBottom=this._bottomOffset,e.marginRight=l?"0":_,t.justifyContent=E,t.alignItems=c?"flex-start":this._alignItems}dispose(){if(this._isDisposed||!this._overlayRef)return;let e=this._overlayRef.overlayElement.style,t=this._overlayRef.hostElement,n=t.style;t.classList.remove(Vf),n.justifyContent=n.alignItems=e.marginTop=e.marginBottom=e.marginLeft=e.marginRight=e.position="",this._overlayRef=null,this._isDisposed=!0}},fC=(()=>{class i{constructor(t,n,r,o){this._viewportRuler=t,this._document=n,this._platform=r,this._overlayContainer=o}global(){return new $c}flexibleConnectedTo(t){return new Wc(t,this._viewportRuler,this._document,this._platform,this._overlayContainer)}static{this.\u0275fac=function(n){return new(n||i)(pe(Kr),pe(mt),pe(Ii),pe(Wf))}}static{this.\u0275prov=Ve({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})(),mC=0,en=(()=>{class i{constructor(t,n,r,o,s,a,l,c,d,u,g,h){this.scrollStrategies=t,this._overlayContainer=n,this._componentFactoryResolver=r,this._positionBuilder=o,this._keyboardDispatcher=s,this._injector=a,this._ngZone=l,this._document=c,this._directionality=d,this._location=u,this._outsideClickDispatcher=g,this._animationsModuleType=h}create(t){let n=this._createHostElement(),r=this._createPaneElement(n),o=this._createPortalOutlet(r),s=new Qr(t);return s.direction=s.direction||this._directionality.value,new Uc(o,n,r,s,this._ngZone,this._keyboardDispatcher,this._document,this._location,this._outsideClickDispatcher,this._animationsModuleType==="NoopAnimations",this._injector.get(up))}position(){return this._positionBuilder}_createPaneElement(t){let n=this._document.createElement("div");return n.id=`cdk-overlay-${mC++}`,n.classList.add("cdk-overlay-pane"),t.appendChild(n),n}_createHostElement(){let t=this._document.createElement("div");return this._overlayContainer.getContainerElement().appendChild(t),t}_createPortalOutlet(t){return this._appRef||(this._appRef=this._injector.get(mp)),new Ap(t,this._componentFactoryResolver,this._appRef,this._injector,this._document)}static{this.\u0275fac=function(n){return new(n||i)(pe(cC),pe(Wf),pe(hp),pe(fC),pe(dC),pe(Xe),pe(Pt),pe(mt),pe(Is),pe(hs),pe(uC),pe(pp,8))}}static{this.\u0275prov=Ve({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();var gC=new Ir("cdk-connected-overlay-scroll-strategy",{providedIn:"root",factory:()=>{let i=z(en);return()=>i.scrollStrategies.reposition()}});function yC(i){return()=>i.scrollStrategies.reposition()}var vC={provide:gC,deps:[en],useFactory:yC},$f=(()=>{class i{static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275mod=Nt({type:i})}static{this.\u0275inj=Bt({providers:[en,vC],imports:[Mr,Bp,Nc,Nc]})}}return i})();var CC=["panel"],SC=["*"];function PC(i,e){if(i&1){let t=Ie();f(0,"div",1,0),W("@panelAnimation.done",function(r){se(t);let o=O();return ae(o._animationDone.next(r))}),ds(2),m()}if(i&2){let t=e.id,n=O();ss(n._classList),jn("mat-mdc-autocomplete-visible",n.showPanel)("mat-mdc-autocomplete-hidden",!n.showPanel)("mat-primary",n._color==="primary")("mat-accent",n._color==="accent")("mat-warn",n._color==="warn"),P("id",n.id)("@panelAnimation",n.isOpen?"visible":"hidden"),Lt("aria-label",n.ariaLabel||null)("aria-labelledby",n._getPanelAriaLabelledby(t))}}var EC=Fp("panelAnimation",[Mp("void, hidden",Rr({opacity:0,transform:"scaleY(0.8)"})),bl(":enter, hidden => visible",[Rp([ks("0.03s linear",Rr({opacity:1})),ks("0.12s cubic-bezier(0, 0, 0.2, 1)",Rr({transform:"scaleY(1)"}))])]),bl(":leave, visible => hidden",[ks("0.075s linear",Rr({opacity:0}))])]),DC=0,Gc=class{constructor(e,t){this.source=e,this.option=t}},Xf=new Ir("mat-autocomplete-default-options",{providedIn:"root",factory:kC});function kC(){return{autoActiveFirstOption:!1,autoSelectActiveOption:!1,hideSingleSelectionIndicator:!1,requireSelection:!1}}var Yf=(()=>{class i{get isOpen(){return this._isOpen&&this.showPanel}_setColor(t){this._color=t,this._changeDetectorRef.markForCheck()}set classList(t){this._classList=t,this._elementRef.nativeElement.className=""}get hideSingleSelectionIndicator(){return this._hideSingleSelectionIndicator}set hideSingleSelectionIndicator(t){this._hideSingleSelectionIndicator=t,this._syncParentProperties()}_syncParentProperties(){if(this.options)for(let t of this.options)t._changeDetectorRef.markForCheck()}constructor(t,n,r,o){this._changeDetectorRef=t,this._elementRef=n,this._defaults=r,this._activeOptionChanges=$i.EMPTY,this._animationDone=new zt,this.showPanel=!1,this._isOpen=!1,this.displayWith=null,this.optionSelected=new zt,this.opened=new zt,this.closed=new zt,this.optionActivated=new zt,this.id=`mat-autocomplete-${DC++}`,this.inertGroups=o?.SAFARI||!1,this.autoActiveFirstOption=!!r.autoActiveFirstOption,this.autoSelectActiveOption=!!r.autoSelectActiveOption,this.requireSelection=!!r.requireSelection,this._hideSingleSelectionIndicator=this._defaults.hideSingleSelectionIndicator??!1}ngAfterContentInit(){this._keyManager=new jp(this.options).withWrap().skipPredicate(this._skipPredicate),this._activeOptionChanges=this._keyManager.change.subscribe(t=>{this.isOpen&&this.optionActivated.emit({source:this,option:this.options.toArray()[t]||null})}),this._setVisibility()}ngOnDestroy(){this._keyManager?.destroy(),this._activeOptionChanges.unsubscribe(),this._animationDone.complete()}_setScrollTop(t){this.panel&&(this.panel.nativeElement.scrollTop=t)}_getScrollTop(){return this.panel?this.panel.nativeElement.scrollTop:0}_setVisibility(){this.showPanel=!!this.options.length,this._changeDetectorRef.markForCheck()}_emitSelectEvent(t){let n=new Gc(this,t);this.optionSelected.emit(n)}_getPanelAriaLabelledby(t){if(this.ariaLabel)return null;let n=t?t+" ":"";return this.ariaLabelledby?n+this.ariaLabelledby:t}_skipPredicate(){return!1}static{this.\u0275fac=function(n){return new(n||i)(He(cn),He(Et),He(Xf),He(Ii))}}static{this.\u0275cmp=fe({type:i,selectors:[["mat-autocomplete"]],contentQueries:function(n,r,o){if(n&1&&(us(o,Ms,5),us(o,Up,5)),n&2){let s;ei(s=ti())&&(r.options=s),ei(s=ti())&&(r.optionGroups=s)}},viewQuery:function(n,r){if(n&1&&(yi(Or,7),yi(CC,5)),n&2){let o;ei(o=ti())&&(r.template=o.first),ei(o=ti())&&(r.panel=o.first)}},hostAttrs:[1,"mat-mdc-autocomplete"],inputs:{ariaLabel:[0,"aria-label","ariaLabel"],ariaLabelledby:[0,"aria-labelledby","ariaLabelledby"],displayWith:"displayWith",autoActiveFirstOption:[2,"autoActiveFirstOption","autoActiveFirstOption",Gi],autoSelectActiveOption:[2,"autoSelectActiveOption","autoSelectActiveOption",Gi],requireSelection:[2,"requireSelection","requireSelection",Gi],panelWidth:"panelWidth",disableRipple:[2,"disableRipple","disableRipple",Gi],classList:[0,"class","classList"],hideSingleSelectionIndicator:[2,"hideSingleSelectionIndicator","hideSingleSelectionIndicator",Gi]},outputs:{optionSelected:"optionSelected",opened:"opened",closed:"closed",optionActivated:"optionActivated"},exportAs:["matAutocomplete"],standalone:!0,features:[ps([{provide:Vp,useExisting:i}]),Fr,_e],ngContentSelectors:SC,decls:1,vars:0,consts:[["panel",""],["role","listbox",1,"mat-mdc-autocomplete-panel","mdc-menu-surface","mdc-menu-surface--open",3,"id"]],template:function(n,r){n&1&&(cs(),le(0,PC,3,16,"ng-template"))},styles:["div.mat-mdc-autocomplete-panel{width:100%;max-height:256px;visibility:hidden;transform-origin:center top;overflow:auto;padding:8px 0;box-sizing:border-box;position:static;border-radius:var(--mat-autocomplete-container-shape, var(--mat-app-corner-extra-small));box-shadow:var(--mat-autocomplete-container-elevation-shadow);background-color:var(--mat-autocomplete-background-color, var(--mat-app-surface-container))}.cdk-high-contrast-active div.mat-mdc-autocomplete-panel{outline:solid 1px}.cdk-overlay-pane:not(.mat-mdc-autocomplete-panel-above) div.mat-mdc-autocomplete-panel{border-top-left-radius:0;border-top-right-radius:0}.mat-mdc-autocomplete-panel-above div.mat-mdc-autocomplete-panel{border-bottom-left-radius:0;border-bottom-right-radius:0;transform-origin:center bottom}div.mat-mdc-autocomplete-panel.mat-mdc-autocomplete-visible{visibility:visible}div.mat-mdc-autocomplete-panel.mat-mdc-autocomplete-hidden{visibility:hidden;pointer-events:none}mat-autocomplete{display:none}"],encapsulation:2,data:{animation:[EC]},changeDetection:0})}}return i})();var TC={provide:Sp,useExisting:dp(()=>Xc),multi:!0};var Kf=new Ir("mat-autocomplete-scroll-strategy",{providedIn:"root",factory:()=>{let i=z(en);return()=>i.scrollStrategies.reposition()}});function IC(i){return()=>i.scrollStrategies.reposition()}var OC={provide:Kf,deps:[en],useFactory:IC},Xc=(()=>{class i{constructor(t,n,r,o,s,a,l,c,d,u,g){this._element=t,this._overlay=n,this._viewContainerRef=r,this._zone=o,this._changeDetectorRef=s,this._dir=l,this._formField=c,this._document=d,this._viewportRuler=u,this._defaults=g,this._componentDestroyed=!1,this._manuallyFloatingLabel=!1,this._viewportSubscription=$i.EMPTY,this._breakpointObserver=z(Lp),this._handsetLandscapeSubscription=$i.EMPTY,this._canOpenOnNextFocus=!0,this._closeKeyEventStream=new et,this._windowBlurHandler=()=>{this._canOpenOnNextFocus=this._document.activeElement!==this._element.nativeElement||this.panelOpen},this._onChange=()=>{},this._onTouched=()=>{},this.position="auto",this.autocompleteAttribute="off",this._initialized=new et,this._injector=z(Xe),this._aboveClass="mat-mdc-autocomplete-panel-above",this._overlayAttached=!1,this.optionSelections=ap(()=>{let h=this.autocomplete?this.autocomplete.options:null;return h?h.changes.pipe(cl(h),qi(()=>an(...h.map(_=>_.onSelectionChange)))):this._initialized.pipe(qi(()=>this.optionSelections))}),this._handlePanelKeydown=h=>{(h.keyCode===27&&!Fs(h)||h.keyCode===38&&Fs(h,"altKey"))&&(this._pendingAutoselectedOption&&(this._updateNativeInputValue(this._valueBeforeAutoSelection??""),this._pendingAutoselectedOption=null),this._closeKeyEventStream.next(),this._resetActiveItem(),h.stopPropagation(),h.preventDefault())},this._trackedModal=null,this._scrollStrategy=a}ngAfterViewInit(){this._initialized.next(),this._initialized.complete();let t=this._getWindow();typeof t<"u"&&this._zone.runOutsideAngular(()=>t.addEventListener("blur",this._windowBlurHandler))}ngOnChanges(t){t.position&&this._positionStrategy&&(this._setStrategyPositions(this._positionStrategy),this.panelOpen&&this._overlayRef.updatePosition())}ngOnDestroy(){let t=this._getWindow();typeof t<"u"&&t.removeEventListener("blur",this._windowBlurHandler),this._handsetLandscapeSubscription.unsubscribe(),this._viewportSubscription.unsubscribe(),this._componentDestroyed=!0,this._destroyPanel(),this._closeKeyEventStream.complete(),this._clearFromModal()}get panelOpen(){return this._overlayAttached&&this.autocomplete.showPanel}openPanel(){this._openPanelInternal()}closePanel(){this._resetLabel(),this._overlayAttached&&(this.panelOpen&&this._zone.run(()=>{this.autocomplete.closed.emit()}),this.autocomplete._latestOpeningTrigger===this&&(this.autocomplete._isOpen=!1,this.autocomplete._latestOpeningTrigger=null),this._overlayAttached=!1,this._pendingAutoselectedOption=null,this._overlayRef&&this._overlayRef.hasAttached()&&(this._overlayRef.detach(),this._closingActionsSubscription.unsubscribe()),this._updatePanelState(),this._componentDestroyed||this._changeDetectorRef.detectChanges(),this._trackedModal&&Rs(this._trackedModal,"aria-owns",this.autocomplete.id))}updatePosition(){this._overlayAttached&&this._overlayRef.updatePosition()}get panelClosingActions(){return an(this.optionSelections,this.autocomplete._keyManager.tabOut.pipe(Qt(()=>this._overlayAttached)),this._closeKeyEventStream,this._getOutsideClickStream(),this._overlayRef?this._overlayRef.detachments().pipe(Qt(()=>this._overlayAttached)):Le()).pipe(Kt(t=>t instanceof Wp?t:null))}get activeOption(){return this.autocomplete&&this.autocomplete._keyManager?this.autocomplete._keyManager.activeItem:null}_getOutsideClickStream(){return an(sn(this._document,"click"),sn(this._document,"auxclick"),sn(this._document,"touchend")).pipe(Qt(t=>{let n=Ar(t),r=this._formField?this._formField.getConnectedOverlayOrigin().nativeElement:null,o=this.connectedTo?this.connectedTo.elementRef.nativeElement:null;return this._overlayAttached&&n!==this._element.nativeElement&&this._document.activeElement!==this._element.nativeElement&&(!r||!r.contains(n))&&(!o||!o.contains(n))&&!!this._overlayRef&&!this._overlayRef.overlayElement.contains(n)}))}writeValue(t){Promise.resolve(null).then(()=>this._assignOptionValue(t))}registerOnChange(t){this._onChange=t}registerOnTouched(t){this._onTouched=t}setDisabledState(t){this._element.nativeElement.disabled=t}_handleKeydown(t){let n=t.keyCode,r=Fs(t);if(n===27&&!r&&t.preventDefault(),this._valueOnLastKeydown=this._element.nativeElement.value,this.activeOption&&n===13&&this.panelOpen&&!r)this.activeOption._selectViaInteraction(),this._resetActiveItem(),t.preventDefault();else if(this.autocomplete){let o=this.autocomplete._keyManager.activeItem,s=n===38||n===40;n===9||s&&!r&&this.panelOpen?this.autocomplete._keyManager.onKeydown(t):s&&this._canOpen()&&this._openPanelInternal(this._valueOnLastKeydown),(s||this.autocomplete._keyManager.activeItem!==o)&&(this._scrollToOption(this.autocomplete._keyManager.activeItemIndex||0),this.autocomplete.autoSelectActiveOption&&this.activeOption&&(this._pendingAutoselectedOption||(this._valueBeforeAutoSelection=this._valueOnLastKeydown),this._pendingAutoselectedOption=this.activeOption,this._assignOptionValue(this.activeOption.value)))}}_handleInput(t){let n=t.target,r=n.value;if(n.type==="number"&&(r=r==""?null:parseFloat(r)),this._previousValue!==r){if(this._previousValue=r,this._pendingAutoselectedOption=null,(!this.autocomplete||!this.autocomplete.requireSelection)&&this._onChange(r),!r)this._clearPreviousSelectedOption(null,!1);else if(this.panelOpen&&!this.autocomplete.requireSelection){let o=this.autocomplete.options?.find(s=>s.selected);if(o){let s=this._getDisplayValue(o.value);r!==s&&o.deselect(!1)}}if(this._canOpen()&&this._document.activeElement===t.target){let o=this._valueOnLastKeydown??this._element.nativeElement.value;this._valueOnLastKeydown=null,this._openPanelInternal(o)}}}_handleFocus(){this._canOpenOnNextFocus?this._canOpen()&&(this._previousValue=this._element.nativeElement.value,this._attachOverlay(this._previousValue),this._floatLabel(!0)):this._canOpenOnNextFocus=!0}_handleClick(){this._canOpen()&&!this.panelOpen&&this._openPanelInternal()}_floatLabel(t=!1){this._formField&&this._formField.floatLabel==="auto"&&(t?this._formField._animateAndLockLabel():this._formField.floatLabel="always",this._manuallyFloatingLabel=!0)}_resetLabel(){this._manuallyFloatingLabel&&(this._formField&&(this._formField.floatLabel="auto"),this._manuallyFloatingLabel=!1)}_subscribeToClosingActions(){let t=new St(r=>{os(()=>{r.next()},{injector:this._injector})}),n=this.autocomplete.options.changes.pipe(xe(()=>this._positionStrategy.reapplyLastPosition()),cp(0));return an(t,n).pipe(qi(()=>this._zone.run(()=>{let r=this.panelOpen;return this._resetActiveItem(),this._updatePanelState(),this._changeDetectorRef.detectChanges(),this.panelOpen&&this._overlayRef.updatePosition(),r!==this.panelOpen&&(this.panelOpen?this._emitOpened():this.autocomplete.closed.emit()),this.panelClosingActions})),sl(1)).subscribe(r=>this._setValueAndClose(r))}_emitOpened(){this.autocomplete.opened.emit()}_destroyPanel(){this._overlayRef&&(this.closePanel(),this._overlayRef.dispose(),this._overlayRef=null)}_getDisplayValue(t){let n=this.autocomplete;return n&&n.displayWith?n.displayWith(t):t}_assignOptionValue(t){let n=this._getDisplayValue(t);t==null&&this._clearPreviousSelectedOption(null,!1),this._updateNativeInputValue(n??"")}_updateNativeInputValue(t){this._formField?this._formField._control.value=t:this._element.nativeElement.value=t,this._previousValue=t}_setValueAndClose(t){let n=this.autocomplete,r=t?t.source:this._pendingAutoselectedOption;r?(this._clearPreviousSelectedOption(r),this._assignOptionValue(r.value),this._onChange(r.value),n._emitSelectEvent(r),this._element.nativeElement.focus()):n.requireSelection&&this._element.nativeElement.value!==this._valueOnAttach&&(this._clearPreviousSelectedOption(null),this._assignOptionValue(null),n._animationDone?n._animationDone.pipe(sl(1)).subscribe(()=>this._onChange(null)):this._onChange(null)),this.closePanel()}_clearPreviousSelectedOption(t,n){this.autocomplete?.options?.forEach(r=>{r!==t&&r.selected&&r.deselect(n)})}_openPanelInternal(t=this._element.nativeElement.value){if(this._attachOverlay(t),this._floatLabel(),this._trackedModal){let n=this.autocomplete.id;Sl(this._trackedModal,"aria-owns",n)}}_attachOverlay(t){this.autocomplete;let n=this._overlayRef;n?(this._positionStrategy.setOrigin(this._getConnectedElement()),n.updateSize({width:this._getPanelWidth()})):(this._portal=new _l(this.autocomplete.template,this._viewContainerRef,{id:this._formField?.getLabelId()}),n=this._overlay.create(this._getOverlayConfig()),this._overlayRef=n,this._viewportSubscription=this._viewportRuler.change().subscribe(()=>{this.panelOpen&&n&&n.updateSize({width:this._getPanelWidth()})}),this._handsetLandscapeSubscription=this._breakpointObserver.observe(Hp.HandsetLandscape).subscribe(o=>{o.matches?this._positionStrategy.withFlexibleDimensions(!0).withGrowAfterOpen(!0).withViewportMargin(8):this._positionStrategy.withFlexibleDimensions(!1).withGrowAfterOpen(!1).withViewportMargin(0)})),n&&!n.hasAttached()&&(n.attach(this._portal),this._valueOnAttach=t,this._valueOnLastKeydown=null,this._closingActionsSubscription=this._subscribeToClosingActions());let r=this.panelOpen;this.autocomplete._isOpen=this._overlayAttached=!0,this.autocomplete._latestOpeningTrigger=this,this.autocomplete._setColor(this._formField?.color),this._updatePanelState(),this._applyModalPanelOwnership(),this.panelOpen&&r!==this.panelOpen&&this._emitOpened()}_updatePanelState(){if(this.autocomplete._setVisibility(),this.panelOpen){let t=this._overlayRef;this._keydownSubscription||(this._keydownSubscription=t.keydownEvents().subscribe(this._handlePanelKeydown)),this._outsideClickSubscription||(this._outsideClickSubscription=t.outsidePointerEvents().subscribe())}else this._keydownSubscription?.unsubscribe(),this._outsideClickSubscription?.unsubscribe(),this._keydownSubscription=this._outsideClickSubscription=null}_getOverlayConfig(){return new Qr({positionStrategy:this._getOverlayPosition(),scrollStrategy:this._scrollStrategy(),width:this._getPanelWidth(),direction:this._dir??void 0,panelClass:this._defaults?.overlayPanelClass})}_getOverlayPosition(){let t=this._overlay.position().flexibleConnectedTo(this._getConnectedElement()).withFlexibleDimensions(!1).withPush(!1);return this._setStrategyPositions(t),this._positionStrategy=t,t}_setStrategyPositions(t){let n=[{originX:"start",originY:"bottom",overlayX:"start",overlayY:"top"},{originX:"end",originY:"bottom",overlayX:"end",overlayY:"top"}],r=this._aboveClass,o=[{originX:"start",originY:"top",overlayX:"start",overlayY:"bottom",panelClass:r},{originX:"end",originY:"top",overlayX:"end",overlayY:"bottom",panelClass:r}],s;this.position==="above"?s=o:this.position==="below"?s=n:s=[...n,...o],t.withPositions(s)}_getConnectedElement(){return this.connectedTo?this.connectedTo.elementRef:this._formField?this._formField.getConnectedOverlayOrigin():this._element}_getPanelWidth(){return this.autocomplete.panelWidth||this._getHostWidth()}_getHostWidth(){return this._getConnectedElement().nativeElement.getBoundingClientRect().width}_resetActiveItem(){let t=this.autocomplete;if(t.autoActiveFirstOption){let n=-1;for(let r=0;r<t.options.length;r++)if(!t.options.get(r).disabled){n=r;break}t._keyManager.setActiveItem(n)}else t._keyManager.setActiveItem(-1)}_canOpen(){let t=this._element.nativeElement;return!t.readOnly&&!t.disabled&&!this.autocompleteDisabled}_getWindow(){return this._document?.defaultView||window}_scrollToOption(t){let n=this.autocomplete,r=$p(t,n.options,n.optionGroups);if(t===0&&r===1)n._setScrollTop(0);else if(n.panel){let o=n.options.toArray()[t];if(o){let s=o._getHostElement(),a=qp(s.offsetTop,s.offsetHeight,n._getScrollTop(),n.panel.nativeElement.offsetHeight);n._setScrollTop(a)}}}_applyModalPanelOwnership(){let t=this._element.nativeElement.closest('body > .cdk-overlay-container [aria-modal="true"]');if(!t)return;let n=this.autocomplete.id;this._trackedModal&&Rs(this._trackedModal,"aria-owns",n),Sl(t,"aria-owns",n),this._trackedModal=t}_clearFromModal(){if(this._trackedModal){let t=this.autocomplete.id;Rs(this._trackedModal,"aria-owns",t),this._trackedModal=null}}static{this.\u0275fac=function(n){return new(n||i)(He(Et),He(en),He(rs),He(Pt),He(cn),He(Kf),He(Is,8),He(Gp,9),He(mt,8),He(Kr),He(Xf,8))}}static{this.\u0275dir=ln({type:i,selectors:[["input","matAutocomplete",""],["textarea","matAutocomplete",""]],hostAttrs:[1,"mat-mdc-autocomplete-trigger"],hostVars:7,hostBindings:function(n,r){n&1&&W("focusin",function(){return r._handleFocus()})("blur",function(){return r._onTouched()})("input",function(s){return r._handleInput(s)})("keydown",function(s){return r._handleKeydown(s)})("click",function(){return r._handleClick()}),n&2&&Lt("autocomplete",r.autocompleteAttribute)("role",r.autocompleteDisabled?null:"combobox")("aria-autocomplete",r.autocompleteDisabled?null:"list")("aria-activedescendant",r.panelOpen&&r.activeOption?r.activeOption.id:null)("aria-expanded",r.autocompleteDisabled?null:r.panelOpen.toString())("aria-controls",r.autocompleteDisabled||!r.panelOpen||r.autocomplete==null?null:r.autocomplete.id)("aria-haspopup",r.autocompleteDisabled?null:"listbox")},inputs:{autocomplete:[0,"matAutocomplete","autocomplete"],position:[0,"matAutocompletePosition","position"],connectedTo:[0,"matAutocompleteConnectedTo","connectedTo"],autocompleteAttribute:[0,"autocomplete","autocompleteAttribute"],autocompleteDisabled:[2,"matAutocompleteDisabled","autocompleteDisabled",Gi]},exportAs:["matAutocompleteTrigger"],standalone:!0,features:[ps([TC]),Fr,gi]})}}return i})(),Qf=(()=>{class i{static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275mod=Nt({type:i})}static{this.\u0275inj=Bt({providers:[OC],imports:[$f,El,Pl,ri,Js,El,Pl]})}}return i})();function hn(i="emit"){return e=>e.pipe(xe(t=>console.log(`${i}`,t)))}var Yc={dashboard:{View:"DashV"},estimate:{Create:"EstC",Edit:"EstE",Delete:"EstD"},report:{View:"Rep",Advanced:"RepA",Profit:"RepF"},shift:{View:"Shift",Create:"ShiftC",Edit:"ShiftE",Void:"ShiftVo"},contact:{View:"Con",Create:"ConC",Edit:"ConE",Delete:"ConD",LoyaltyPointEditor:"LoyPE",ContactDetail:"ContD",ContactImageEditor:"ContE",ContactSensitiveField:"ConSF",Supplier:"Supp"},sell:{Create:"Sell",PricebookSelector:"PricebS",Edit:"SellE",Delete:"SellD",Number:"NumE",SalesPerson:"SalesmanE",Return:"Return",Discount:"Disc",UnitPriceEditor:"UnitPE",Commission:"Comms",Tax:"Tax",CustomerInputLock:"CustL",Payment:"PayR",PriceVisible:"PriceV",PriceMinimum:"PriceM",Email:"Email",DeleteItem:"DelItm",Shipping:"Ship",PaymentCodeLock:"PayCL",EraseVoidOrd:"EraseVO",RestoreVoidOrd:"RestVO",RetrieveR:"RetrieveR",BundlingPrice:"BundlP",ClearCartRestriction:"ClearCartRestriction",CreditSalesLock:"CredSL",CouponInputLock:"CouponInputLock",Park:"Park"},orders:{View:"Ord",SupplierBill:"OrdB",VoidInvoice:"OrdVo",Print:"OrdRpr",NoteEditor:"OrdNe",Invoice:"OrdIr",Erase:"EraseVO"},product:{View:"Prod",Delete:"ProdD",ImageEditor:"ImgE",Create:"ProdC",Edit:"ProdE",Cost:"Cost",BarcodePrinting:"BarP",DeleteAllOutletPrice:"DeleteAllOutletPrice",Expense:"Expense",CommissionView:"CommV",ProductSensitiveField:"ProdSF",Price:"PriceV"},payment:{View:"Pay",Delete:"PayD",Create:"PayC",Edit:"PayE"},adjustment:{View:"Adj",Delete:"AdjD",Create:"AdjC",Edit:"AdjE",Approval:"AdjApp",InventoryProductCount:"InvPC"},buy:{Delete:"BuyD",Create:"Buy",Edit:"BuyE",ShippingRestriction:"BuySh",Approval:"PurA",Report:"BuyR"},logistics:{View:"Del",Create:"DelC",Edit:"DelE",Delete:"DelD",TransferOrderEditor:"DelRE",Outbound:"FulF",TransferOrderApproval:"DelA",TransferOrderReceiver:"DelR"},debt:{View:"Debt",Delete:"DebtD",Create:"DebtC",Edit:"DebtE"},prepaidPackage:{View:"Tre",Create:"TreC",Edit:"TreE",Delete:"TreD",TreatmentIncentive:"TreI",SharePackageEditor:"SharPacE",TreatmentNote:"TreN",Doctor:"Doct"},inventory:{View:"Inv",Edit:"InvE"},promotion:{View:"Prom",Create:"PromC",Edit:"PromE",Delete:"PromD",Coupon:"Cou",Pricebook:"Pri"},accounting:{View:"Act",Create:"ActC",Edit:"ActE",Delete:"ActD",Report:"ActRep",Ledger:"ActL",EmptyOutlet:"ActEO",ClosingEditor:"ActCE",Advanced:"ActRA",Recurring:"ActRec"},users:{View:"Use",Create:"UseC",Edit:"UseE",Delete:"UseD",Groups:"Gro",LoginTimeRestriction:"LogTR",UserIPRestriction:"UseIR",GroupsRestriction:"UseG",LogRestriction:"LogResct"},outlets:{View:"Out",Create:"OutC",Edit:"OutE",Delete:"OutD"},setup:{View:"Stp",Create:"StpC",Edit:"StpE",Delete:"StpD",Webhook:"StpWh",Developer:"StpDev"},service:{View:"Serv"},myProfile:{View:"Prof",Notification:"Notf",Subscription:"Subs",Activity:"Actv"},customerDisplay:{View:"Disp"},orderDisplay:{View:"KitD"},global:{Export:"Export",Number:"NumE",Date:"DateE"},apps:{Marketplace:"Mrp",Jurnal:"Jurnal",Tools:"Tools"},fulfillment:{View:"Ful",Edit:"FulE",Create:"FulC",Delete:"FulD",Ship:"FulS"},manufacture:{View:"Man",Create:"ManC",Edit:"ManE",Delete:"ManD"},developer:{Api:"API",View:"Dev",Edit:"DevE"}};var Zf=(()=>{class i{constructor(){this._roles=[],this.parseJWTRoles()}parseJWTRoles(){let t=localStorage.getItem("Token");if(t){var n=Cl(t);this._roles=n["http://schemas.microsoft.com/ws/2008/06/identity/claims/role"],console.log(this._roles)}}isInRole(t,n){let r={};return n.forEach((o,s)=>r[t[s]]=typeof o=="string"?this._roles.includes(o):o(this._roles)),r}isUserHasRole(t){return this._roles.includes(t)}get product(){return this._product||(this._product=this.setBulkRole("product")),this._product}get contact(){return this._contact||(this._contact=this.setBulkRole("contact")),this._contact}get promotion(){return this._promotion||(this._promotion=this.setBulkRole("promotion")),this._promotion}get accounting(){return this._accounting||(this._accounting=this.setBulkRole("accounting")),this._accounting}get users(){return this._users||(this._users=this.setBulkRole("users")),this._users}get outlets(){return this._outlets||(this._outlets=this.setBulkRole("outlets")),this._outlets}get setup(){return this._setup||(this._setup=this.setBulkRole("setup")),this._setup}get service(){return this._service||(this._service=this.setBulkRole("service")),this._service}get profile(){return this._profile||(this._profile=this.setBulkRole("myProfile")),this._profile}get customerDisplay(){return this._customerDisplay||(this._customerDisplay=this.setBulkRole("customerDisplay")),this._customerDisplay}get orderDisplay(){return this._orderDisplay||(this._orderDisplay=this.setBulkRole("orderDisplay")),this._orderDisplay}get global(){return this._global||(this._global=this.setBulkRole("global")),this._global}get apps(){return this._apps||(this._apps=this.setBulkRole("apps")),this._apps}get fulfillment(){return this._fulfillment||(this._fulfillment=this.setBulkRole("fulfillment")),this._fulfillment}get manufacture(){return this._manufacture||(this._manufacture=this.setBulkRole("manufacture")),this._manufacture}get inventory(){return this._inventory||(this._inventory=this.setBulkRole("inventory")),this._inventory}get sell(){return this._sell||(this._sell=this.setBulkRole("sell")),this._sell}get report(){return this._report||(this._report=this.setBulkRole("report")),this._report}get buy(){return this._buy||(this._buy=this.setBulkRole("buy")),this._buy}get adjustment(){return this._adjustment||(this._adjustment=this.setBulkRole("adjustment")),this._adjustment}get debt(){return this._debt||(this._debt=this.setBulkRole("debt")),this._debt}get payment(){return this._payment||(this._payment=this.setBulkRole("payment")),this._payment}get prepaidPackage(){return this._prepaidPackage||(this._prepaidPackage=this.setBulkRole("prepaidPackage")),this._prepaidPackage}get order(){return this._order||(this._order=this.setBulkRole("orders")),this._order}get logistic(){return this._logistic||(this._logistic=this.setBulkRole("logistics")),this._logistic}get estimate(){return this._estimate||(this._estimate=this.setBulkRole("estimate")),this._estimate}get shift(){return this._shift||(this._shift=this.setBulkRole("shift")),this._shift}get developer(){return this._developer||(this._developer=this.setBulkRole("developer")),this._developer}get dashboard(){return this._dashboard||(this._dashboard=this.setBulkRole("dashboard")),this._dashboard}setBulkRole(t){let n={};for(let r in Yc[t])n[r]=this.isUserHasRole(Yc[t][r]);return n}get isSystemUser(){let t=localStorage.getItem("Token");return Cl(t).Type=="System"}resetRoles(){this._roles=[],this._accounting=null,this._adjustment=null,this._apps=null,this._buy=null,this._contact=null,this._customerDisplay=null,this._debt=null,this._fulfillment=null,this._estimate=null,this._global=null,this._inventory=null,this._logistic=null,this._manufacture=null,this._order=null,this._orderDisplay=null,this._outlets=null,this._payment=null,this._product=null,this._prepaidPackage=null,this._profile=null,this._promotion=null,this._report=null,this._sell=null,this._service=null,this._setup=null,this._shift=null,this._users=null,this._developer=null,this._dashboard=null}toJSON(){return{product:this.product,contact:this.contact,promotion:this.promotion,accounting:this.accounting,users:this.users,outlets:this.outlets,setup:this.setup,service:this.service,profile:this.profile,customerDisplay:this.customerDisplay,orderDisplay:this.orderDisplay,global:this.global,apps:this.apps,fulfillment:this.fulfillment,manufacture:this.manufacture,inventory:this.inventory,sell:this.sell,report:this.report,buy:this.buy,adjustment:this.adjustment,debt:this.debt,payment:this.payment,prepaidPackage:this.prepaidPackage,order:this.order,logistic:this.logistic,estimate:this.estimate,shift:this.shift,developer:this.developer,dashboard:this.dashboard}}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275prov=Ve({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();var Jf=(i,e)=>e.PromotionID;function RC(i,e){if(i&1&&(f(0,"mat-option",19)(1,"div",20)(2,"span",21),x(3),m(),f(4,"span",22),x(5),m()()()),i&2){let t=e.$implicit;P("value",t),y(3),I(t.Value),y(2),I(t.Code)}}function MC(i,e){if(i&1&&Zt(0,RC,6,3,"mat-option",19,as),i&2){let t=O();Jt(t)}}function AC(i,e){i&1&&(f(0,"mat-option",18),x(1,"No items found"),m()),i&2&&P("disabled",!0)}function BC(i,e){i&1&&le(0,MC,2,0)(1,AC,2,1,"mat-option",18),i&2&&Ce(e.length>0?0:1)}function NC(i,e){if(i&1){let t=Ie();f(0,"div",23)(1,"img",24),W("error",function(r){se(t);let o=O();return ae(o.onErrorImage(r))}),m(),f(2,"div",25)(3,"ngb-highlight",26),x(4),m(),f(5,"span"),x(6),m()()()}if(i&2){let t=e.result,n=e.term;y(),P("src",t.ImgUrl,is)("alt",t.Value),y(2),P("result",t.Value)("term",n),y(),I(t.Value),y(2),I(t.Code)}}function zC(i,e){if(i&1&&(f(0,"ng-option",28),x(1),m()),i&2){let t=e.$implicit;P("value",t.PromotionID),y(),I(t.Name)}}function LC(i,e){if(i&1&&(f(0,"ng-select",27),Zt(1,zC,2,2,"ng-option",28,Jf),m()),i&2){let t=O(2);y(),Jt(t)}}function HC(i,e){if(i&1&&(f(0,"ng-option",28),x(1),m()),i&2){let t=e.$implicit;P("value",t),y(),I(t.Name)}}function jC(i,e){if(i&1&&(f(0,"ng-select",27),Zt(1,HC,2,2,"ng-option",28,Jf),m()),i&2){let t=O(2);y(),Jt(t)}}function VC(i,e){if(i&1&&(f(0,"div",12)(1,"label",9),x(2,"Promotion Price"),m(),le(3,LC,3,0,"ng-select",27)(4,jC,3,0,"ng-select",27),m()),i&2){let t=O(2);y(3),Ce(t.isEditProduct()?3:4)}}function UC(i,e){i&1&&le(0,VC,5,1,"div",12),i&2&&Ce(e.length?0:-1)}function WC(i,e){if(i&1){let t=Ie();f(0,"button",29),W("click",function(){se(t);let r=O();return ae(r.resetForm())}),x(1," Cancel "),m()}}var ia=(()=>{class i{constructor(){this.promotionPrice$=Le([]),this.variant$=Le({}),this.UUidSelected="",this.httpService=z(bi),this.fb=z(Yi),this.router=z(Un),this.storeService=z(ke),this.location=z(hs),this.maskitoOptions=ar({precision:2,thousandSeparator:","}),this.route=z(ms),this.variant={},this.roleService=z(Zf),this.domain="",this.isEditProduct=q(!1)}displayFn(t){return t?t.Value:""}initForm(){this.form=this.fb.group({name:new nt("",[lt.required]),quantity:new nt("",[lt.required]),promotionPrice:new nt("",[]),price:new nt("",[lt.required])})}ngAfterViewInit(){this.domain=`https://${localStorage.getItem("Domain")}`}ngOnInit(){this.initForm(),this.form.get("promotionPrice").valueChanges.pipe(Qt(()=>Object.keys(this.variant).length>0),hn("prommotionPrice"),xe(t=>{if(t)this.form.patchValue({price:+this.variant.UnitPrice}),this.form.get("price").disable();else{console.warn("Invalid UnitPrice, not patching price");let n=[...this.storeService.productItems()],r=n.findIndex(o=>o.VariantID===this.route.snapshot.queryParamMap.get("id"));r!==-1&&this.form.patchValue({price:+this.variant.UnitPrice!=+n[r].UnitPrice?+n[r].UnitPrice:+this.variant.UnitPrice}),this.form.get("price").enable()}})).subscribe(),this.route.queryParamMap.pipe(xe(t=>{this.isEditProduct.set(t.has("id")),console.log("edit",this.isEditProduct()),this.UUidSelected=t.get("id")||""})).subscribe(),this.route.queryParamMap.pipe(qi(t=>{if(t.has("id")){let n=t.get("id"),r=[...this.storeService.productItems()],o=r.findIndex(s=>Object.prototype.hasOwnProperty.call(s,"VariantID")?s.VariantID:s.ID===n);if(o!==-1){let s={EntityID:"00000000-0000-0000-0000-000000000000",ID:Object.prototype.hasOwnProperty.call(r[o],"VariantID")?r[o].VariantID:r[o].ID},a={VariantID:Object.prototype.hasOwnProperty.call(r[o],"VariantID")?r[o].VariantID:r[o].ID};return rl([this.httpService.post("/API/V3/Variant/ID",s,void 0,this.domain),this.roleService.promotion.View?this.httpService.post("/API/v3/PromotionEvent/GetByVariantID",a,void 0,this.domain):Le(null)]).pipe(Kt(([l,c])=>({variant:l,promotion:c,KEY:n})))}return Le(null)}else return this.form.reset(),this.form.enable(),this.promotionPrice$=Le([]),Le(null)}),hn("edit"),xe(t=>{if(t===null)return;this.form.get("name").disable();let{variant:n,promotion:r,KEY:o}=t;this.promotionPrice$=Le(r),this.variant$=Le(n),this.variant=n;let s=[...this.storeService.productItems()],a=s.findIndex(l=>Object.prototype.hasOwnProperty.call(l,"VariantID")?l.VariantID:l.ID);if(a!==-1){let l=r.findIndex(c=>c.PromotionID.toLowerCase()===s[a].Promotions?.PromotionID?.toLowerCase());if(l!==-1){let c=+r[l]?.UnitPrice;isNaN(c)&&(c=+n.UnitPrice),this.form.patchValue({price:+n.UnitPrice!=+s[a].UnitPrice?+s[a].UnitPrice:+n.UnitPrice,promotionPrice:r[l].PromotionID,quantity:+s[a].Quantity,name:{Value:n.Name}}),this.form.get("price").disable()}else this.form.patchValue({price:+n.UnitPrice!=+s[a].UnitPrice?+s[a].UnitPrice:+n.UnitPrice,promotionPrice:null,quantity:+s[a].Quantity,name:{Value:n.Name}})}})).subscribe(),this.variantSuggestion$=this.form.get("name").valueChanges.pipe(lp(200),al(),qi(t=>{if(t&&t.length>2){let n={count:100,prefix:t},r=`https://${localStorage.getItem("Domain")}`;return this.httpService.post("/API/AC/GetVariantSuggestionByCodeNName",n,void 0,r)}else return Le([])}))}onOptionSelected(t){if(Object.hasOwn(t.option.value,"Key")){let n=t.option.value.Key,r={EntityID:"00000000-0000-0000-0000-000000000000",ID:n},o={VariantID:n};return rl([this.httpService.post("/API/V3/Variant/ID",r,void 0,this.domain),this.roleService.promotion.View?this.httpService.post("/API/v3/PromotionEvent/GetByVariantID",o,void 0,this.domain):Le(null)]).pipe(Kt(([s,a])=>({variant:s,promotion:a})),xe(({variant:s,promotion:a})=>{this.form.patchValue({price:s.UnitPrice,promotionPrice:null,quantity:1}),this.promotionPrice$=Le(a),this.variant$=Le(s),this.variant=s})).subscribe()}else throw new Error("Key not found")}onSubmit(){let{name:t,quantity:n,promotionPrice:r,price:o}=this.form.getRawValue(),s=n.toString().replace(/,/g,""),a=o.toString().replace(/,/g,"");return this.isEditProduct()?es([this.promotionPrice$,this.variant$]).pipe(Kt(([l,c])=>({promotions:l,variant:c})),Kt(({promotions:l,variant:c})=>{let d=[...this.storeService.productItems()],u=d.findIndex(h=>Object.prototype.hasOwnProperty.call(h,"VariantID")?h.VariantID:h.ID===this.UUidSelected.toLowerCase());if(u!==-1){let h=l.findIndex(_=>_.PromotionID.toLowerCase()===r?.toLowerCase());if(h!==-1){let _=+l[h]?.UnitPrice;isNaN(_)&&(_=+c.UnitPrice),d[u]=D(v({},d[u]),{Quantity:+s,Promotions:l[h],UnitPrice:+a,checked:!1})}else d[u]=D(v({},d[u]),{Quantity:+s,Promotions:r,UnitPrice:+a,checked:!1})}let g=[...d];this.storeService.onChangeProductItems(g),this.form.get("price").enable(),this.form.reset(),this.router.navigate(["/pages"]),this.promotionPrice$=Le([]),this.variant={}})).subscribe():this.variant$.pipe(Kt(l=>D(v({},l),{Quantity:+n,Promotions:r,UnitPrice:+a})),xe(l=>{let c=[...this.storeService.productItems()];c.push(l);let d=[...c];this.storeService.onChangeProductItems(d),this.form.get("price").enable(),this.form.reset(),this.promotionPrice$=Le([])})).subscribe()}onErrorImage(t){console.log(t);let n=t.target;t.type==="error"&&(n.src="assets/images/image-404.svg")}get hasEdit(){return this.route.snapshot.queryParamMap.has("id")}resetForm(){this.form.reset(),this.router.navigate([],{relativeTo:this.route,queryParams:{id:null},queryParamsHandling:"merge"})}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275cmp=fe({type:i,selectors:[["modal-choose-product"]],standalone:!0,features:[_e],decls:31,vars:14,consts:[["auto","matAutocomplete"],["rt",""],[1,"card","mb-3","w-100","p-0"],[1,"card-header","px-0"],[1,"text-dark","fw-medium","font-robotoslab",2,"margin","0.6rem 0","font-size","16px"],[1,"card-body","px-0","py-0","pt-4"],[1,"d-flex","flex-column","gap-2"],[1,"d-flex","flex-column","gap-3",3,"formGroup"],[1,"form-group","d-flex","flex-column","position-relative"],[1,"text-dark","fs-2","fw-semibold","font-robotoslab"],["type","text","formControlName","name",1,"form-control","form-control-lg","fs-3",3,"matAutocomplete"],["autoActiveFirstOption","",3,"optionSelected","displayWith"],[1,"form-group"],["type","text","formControlName","quantity",1,"form-control","form-control-lg","fs-3",3,"maskito"],["type","text","formControlName","price",1,"form-control","form-control-lg","fs-3",3,"maskito"],[1,"d-flex","gap-4"],["type","button",1,"flex","flex-grow-1","btn","btn-outline-secondary"],["type","button",1,"flex","flex-grow-1","btn","btn-success",3,"click","disabled"],[1,"fs-2",3,"disabled"],[1,"fs-2",3,"value"],[1,"d-flex","flex-column"],[1,"fs-2"],[1,"opacity-75",2,"font-size","11px"],[1,"d-flex","w-100","overflow-x-hidden","gap-2"],[1,"me-1",2,"width","42px","height","42px",3,"error","src","alt"],[1,"flex-grow-1","d-flex","flex-column","flex-wrap"],[3,"result","term"],["formControlName","promotionPrice","placeholder","Select Promotion Price",1,"custom","fs-3"],[1,"fs-3",3,"value"],["type","button",1,"flex","flex-grow-1","btn","btn-outline-secondary",3,"click"]],template:function(n,r){if(n&1){let o=Ie();f(0,"div",2)(1,"div",3)(2,"span",4),x(3),m()(),f(4,"div",5)(5,"div",6)(6,"form",7)(7,"div",8)(8,"label",9),x(9,"Name"),m(),ue(10,"input",10),f(11,"mat-autocomplete",11,0),W("optionSelected",function(a){return se(o),ae(r.onOptionSelected(a))}),le(13,BC,2,1),Ue(14,"async"),m(),le(15,NC,7,6,"ng-template",null,1,me),m(),f(17,"div",12)(18,"label",9),x(19,"Quantity"),m(),ue(20,"input",13),m(),f(21,"div",12)(22,"label",9),x(23,"Price"),m(),ue(24,"input",14),m(),le(25,UC,1,1),Ue(26,"async"),f(27,"div",15),le(28,WC,2,0,"button",16),f(29,"button",17),W("click",function(){return se(o),ae(r.onSubmit())}),x(30," Submit "),m()()()()()()}if(n&2){let o,s,a=ml(12);y(3),ii("",r.UUidSelected?"Update":"Add"," Product"),y(3),P("formGroup",r.form),y(4),P("matAutocomplete",a),y(),P("displayWith",r.displayFn),y(2),Ce((o=ni(14,10,r.variantSuggestion$))?13:-1,o),y(7),P("maskito",r.maskitoOptions),y(4),P("maskito",r.maskitoOptions),y(),Ce((s=ni(26,12,r.promotionPrice$))?25:-1,s),y(3),Ce(r.hasEdit?28:-1),y(),P("disabled",r.form.invalid)}},dependencies:[Cp,oi,_i,As,rt,ys,tt,it,gs,vs,bs,Op,vp,Ji,Os,Qf,Yf,Ms,Xc],styles:[".mat-mdc-autocomplete-panel{background-color:#fff!important} .mat-mdc-autocomplete-panel>.mat-mdc-option.mdc-list-item--disabled{min-height:34px}"]})}}return i})();var em=(()=>{class i{constructor(){this.transactionType=q([{title:"Supplier Bill",type:0},{title:"Transfer Order",type:1}]),this.storeService=z(ke),this.fb=z(Yi),this.activeModal=z(Es)}get outlets(){return this.storeService.paperConfig().Outlets}initForm(){this.form=this.fb.group({type:new nt("",[lt.required]),outlet:new nt("",[lt.required]),number:new nt("",[lt.required])})}ngOnInit(){this.initForm()}onOK(){this.activeModal.close({role:"ok",data:this.form.value})}onClose(){this.activeModal.dismiss({role:"close",data:null})}onPaste(t){t.preventDefault();let n=t.clipboardData;if(n){let r=n.getData("text").trim(),o=t.target;o.value=r,this.form.patchValue({number:o.value})}}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275cmp=fe({type:i,selectors:[["app-dialog-load-transaction"]],standalone:!0,features:[_e],decls:14,vars:4,consts:[["title","Choose your transaction",3,"onOK","onClose","hasValid"],[1,"d-flex","flex-column","gap-2",3,"formGroup"],[1,"form-group"],[1,"text-dark","fs-2","fw-semibold","font-robotoslab"],["formControlName","type","bindLabel","title","bindValue","type","placeholder","Choose Type",1,"custom","fs-2",3,"items"],["formControlName","outlet","bindLabel","Name","bindValue","Name","placeholder","Choose Outlet",1,"custom","fs-2",3,"items"],["formControlName","number","type","text",1,"form-control","fs-2",2,"height","32px",3,"paste"]],template:function(n,r){n&1&&(f(0,"app-base-modal",0),W("onOK",function(){return r.onOK()})("onClose",function(){return r.onClose()}),f(1,"form",1)(2,"div",2)(3,"label",3),x(4,"Choose Type"),m(),ue(5,"ng-select",4),m(),f(6,"div",2)(7,"label",3),x(8,"Choose Outlet"),m(),ue(9,"ng-select",5),m(),f(10,"div",2)(11,"label",3),x(12,"Invoice Number"),m(),f(13,"input",6),W("paste",function(s){return r.onPaste(s)}),m()()()()),n&2&&(P("hasValid",r.form.valid),y(),P("formGroup",r.form),y(4),P("items",r.transactionType()),y(4),P("items",r.outlets))},dependencies:[Ds,oi,_i,ht,ys,tt,it,gs,rt,vs,bs],changeDetection:0})}}return i})();var $C=(()=>{class i{constructor(t){this.document=t,this.width=this.getWidth()}getWidth(){let t=this.document.createElement("div");t.style.visibility="hidden",t.style.width="100px",t.style.msOverflowStyle="scrollbar",this.document.body.appendChild(t);let n=t.offsetWidth;t.style.overflow="scroll";let r=this.document.createElement("div");r.style.width="100%",t.appendChild(r);let o=r.offsetWidth;return t.parentNode.removeChild(t),n-o}}return i.\u0275fac=function(t){return new(t||i)(pe(mt))},i.\u0275prov=Ve({token:i,factory:i.\u0275fac}),i})(),qC=(()=>{class i{getDimensions(t){return t.getBoundingClientRect()}}return i.\u0275fac=function(t){return new(t||i)},i.\u0275prov=Ve({token:i,factory:i.\u0275fac}),i})(),GC=(()=>{class i{constructor(){this.columnInputChanges=new et}get columnInputChanges$(){return this.columnInputChanges.asObservable()}onInputChange(){this.columnInputChanges.next()}}return i.\u0275fac=function(t){return new(t||i)},i.\u0275prov=Ve({token:i,factory:i.\u0275fac}),i})();function XC(i){return i=i.replace(/[^a-zA-Z0-9 ]/g," "),i=i.replace(/([a-z](?=[A-Z]))/g,"$1 "),i=i.replace(/([^a-zA-Z0-9 ])|^[0-9]+/g,"").trim().toLowerCase(),i=i.replace(/([ 0-9]+)([a-zA-Z])/g,function(e,t,n){return t.trim()+n.toUpperCase()}),i}var na={},tm=typeof document<"u"?document.createElement("div").style:void 0,Kc=function(){let i=typeof window<"u"?window.getComputedStyle(document.documentElement,""):void 0,e=typeof i<"u"?Array.prototype.slice.call(i).join("").match(/-(moz|webkit|ms)-/):null,t=e!==null?e[1]:void 0,n=typeof t<"u"?"WebKit|Moz|MS|O".match(new RegExp("("+t+")","i"))[1]:void 0;return n?{dom:n,lowercase:t,css:`-${t}-`,js:t[0].toUpperCase()+t.substr(1)}:void 0}();function ra(i){let e=XC(i);return na[e]||(Kc!==void 0&&tm[Kc.css+i]!==void 0?na[e]=Kc.css+i:tm[i]!==void 0&&(na[e]=i)),na[e]}var t3=typeof window<"u"?ra("transform"):void 0,i3=typeof window<"u"?ra("backfaceVisibility"):void 0,n3=typeof window<"u"?!!ra("transform"):void 0,r3=typeof window<"u"?!!ra("perspective"):void 0,im=typeof window<"u"?window.navigator.userAgent:"Chrome",o3=/Safari\//.test(im)&&!/Chrome\//.test(im);var nm=(()=>{class i{static forRoot(t){return{ngModule:i,providers:[{provide:"configuration",useValue:t}]}}}return i.\u0275fac=function(t){return new(t||i)},i.\u0275mod=Nt({type:i}),i.\u0275inj=Bt({providers:[$C,qC,GC],imports:[[ri]]}),i})();typeof document<"u"&&!document.elementsFromPoint&&(document.elementsFromPoint=YC);function YC(i,e){let t=[],n=[],r,o,s;for(;(r=document.elementFromPoint(i,e))&&t.indexOf(r)===-1&&r!=null;)t.push(r),n.push({value:r.style.getPropertyValue("pointer-events"),priority:r.style.getPropertyPriority("pointer-events")}),r.style.setProperty("pointer-events","none","important");for(o=n.length;s=n[--o];)t[o].style.setProperty("pointer-events",s.value?s.value:"",s.priority);return t}var rm=(()=>{class i{constructor(){this.subject$=new et}onFileLoad(t){let r=t.target.result,o=!1,s=[],a=[],l=0;for(let c of r.split(/[\r\n]+/))if(o){let d={};for(let u=0;u<l;u++)d[a[u]]=c.split(",")[u];s.push(d)}else{for(let d=0;d<c.split(",").length;d++)l=c.split(",").length,a.push(c.split(",")[d].replace(/ /g,""));o=!0}return s.splice(-1),s}convertFile(t){let n=t,r=new FileReader;return r.onload=o=>{let s=this.onFileLoad(o);this.subject$.next(s)},r.readAsText(n,"UTF-8"),this.subject$.asObservable()}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275prov=Ve({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();var om=(()=>{class i{constructor(t,n,r){this.http=t,this.toastr=n,this.router=r}PostToUrlEncode(t,n,r=1e5){let o=new vi;return o=o.set("Content-Type","application/x-www-form-urlencoded"),new St(s=>{this.http.post(t,n,{headers:o}).pipe(mi(r)).subscribe(a=>{s.next(a),s.complete()})})}GetText(t=1e5){let n=localStorage.getItem("Token"),o={responseType:"text",headers:new vi({Authorization:"Bearer "+n})};return new St(s=>{this.http.get("/API/Token/GetZendeskJWT",o).pipe(mi(t)).subscribe(a=>{s.next(a),s.complete()})})}POSText(t,n,r=1e5){let o=localStorage.getItem("Token"),a={responseType:"text",headers:new vi({"Content-Type":"application/json","Cache-Control":"no-cache",Authorization:"Bearer "+o})};return new St(l=>{this.http.post(t,n,a).pipe(mi(r)).subscribe(c=>{l.next(c),l.complete()})})}get(t){let n=localStorage.getItem("Token"),r=new vi({"Content-Type":"application/json","Cache-Control":"no-cache"});n&&(r=r.append("Authorization","Bearer "+n));let o={headers:r};return this.http.get(t,o).pipe(Tr(s=>{if(!this.unauthorizedErrorHandling(s)){let l=this.errorMessageHandling(s);this.toastr.error(l.Message!=""?l.Message:"An unknown error has occured!",l.header),this.paymentErrorHandling(s)}return sp(()=>s)}))}getNews(t){return this.http.get(t)}paymentErrorHandling(t){t.status==402&&this.router.navigate(["/menu/Profile/Main/My_Subscription"])}post(t,n,r=1e5){return new St(o=>{let s=localStorage.getItem("Token"),a=new vi({"Content-Type":"application/json","Cache-Control":"no-cache"});s&&(a=a.append("Authorization","Bearer "+s));let l={headers:a};Date.prototype.toJSON=function(){return this.getFullYear()+"-"+c(this.getMonth()+1)+"-"+c(this.getDate())+"T"+c(this.getHours())+":"+c(this.getMinutes())+":"+c(this.getSeconds())+".000"};function c(d){return d<10?"0"+d:d}this.http.post(t,n,l).pipe(mi(r)).subscribe({next:d=>{o.next(d),o.complete()},error:d=>{if(d.status==200)o.next(d.error.text),o.complete();else{if(!this.unauthorizedErrorHandling(d)){let g=this.errorMessageHandling(d);this.toastr.error(g.Message!=""?g.Message:"An unknown error has occured!",g.header,{enableHtml:!0})}o.error(d)}}})})}postFile(t,n,r=1e5){return new St(o=>{let s=localStorage.getItem("Token"),a=new vi({"Content-Type":"application/json","Cache-Control":"no-cache"});s&&(a=a.append("Authorization","Bearer "+s)),this.http.post(t,n,{headers:a,observe:"response",responseType:"blob"}).pipe(mi(r)).subscribe({next:l=>{o.next({title:l.headers.get("Content-Disposition"),file:l.body}),o.complete()},error:l=>{if(l.headers.get("Content-Type")==="application/json; charset=utf-8"){let c=new FileReader;c.addEventListener("loadend",d=>{let u=JSON.parse(d.srcElement.result)?.Message;if(!this.unauthorizedErrorHandling(l)){let h=this.errorMessageHandling(l);this.toastr.error(u??"An unknown error has occured!",h.header,{enableHtml:!0})}}),c.readAsText(l.error)}o.error(l)}})})}put(t,n,r=1e5){return new St(o=>{let s=localStorage.getItem("Token"),a=new vi({"Content-Type":"application/json","Cache-Control":"no-cache"});s&&(a=a.append("Authorization","Bearer "+s));let l={headers:a};this.http.put(t,n,l).pipe(mi(r)).subscribe({next:c=>{o.next(c),o.complete()},error:c=>{if(c.status==200)o.next(c.error.text),o.complete();else{if(!this.unauthorizedErrorHandling(c)){let u=this.errorMessageHandling(c);this.toastr.error(u.Message!=""?u.Message:"An unknown error has occured!",u.header)}o.error(c)}}})})}delete(t,n,r=1e5){return new St(o=>{let s=localStorage.getItem("Token"),a=new vi({"Content-Type":"application/json","Cache-Control":"no-cache"});s&&(a=a.append("Authorization","Bearer "+s));let l={headers:a,body:n};this.http.delete(t,l).pipe(mi(r)).subscribe({next:c=>{o.next(c),o.complete()},error:c=>{if(c.status==200)o.next(c.error.text),o.complete();else{if(!this.unauthorizedErrorHandling(c)){let u=this.errorMessageHandling(c);this.toastr.error(u.Message!=""?u.Message:"An unknown error has occured!",u.header)}o.error(c)}}})})}unauthorizedErrorHandling(t){let n=!1;return(t.status==401||t.status==403)&&(localStorage.getItem("Token")?this.router.navigate(["/menu/Unauthorized/Main/Unauthorized"]):window.location.href="/",n=!0),n}errorMessageHandling(t){let n="API Error",r="Exception Message";return t.error?(n="API Error - "+t.status,t.status==451&&(n="Error"),t.error&&(r=t.error.Message)):t.Message&&(n="API Error - "+t.name,r=t.Message),{header:n,Message:r}}postFormDataWithoutBearer(t,n){return new St(r=>{this.http.post(t,n).pipe(mi(1e5)).subscribe({next:o=>{r.next(o),r.complete()},error:o=>{o.status==200&&(r.next(o.error.text),r.complete()),r.error(o)}})})}postFormData(t,n,r=!0){return new St(o=>{let s=localStorage.getItem("Token"),l={headers:new vi({Authorization:"Bearer "+s})};this.http.post(t,n,l).pipe(mi(1e5)).subscribe({next:c=>{o.next(c),o.complete()},error:c=>{if(c.status==200)o.next(c.error.text),o.complete();else{if(!this.unauthorizedErrorHandling(c)&&r){let u=this.errorMessageHandling(c);this.toastr.error(u.Message!=""?u.Message:"An unknown error has occured!",u.header)}o.error(c)}}})})}static{this.\u0275fac=function(n){return new(n||i)(pe(xp),pe(Ts),pe(Un))}}static{this.\u0275prov=Ve({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();function oa(i,e){if(!{}.hasOwnProperty.call(i,e))throw new TypeError("attempted to use private field on non-instance");return i}var KC=0;function am(i){return"__private_"+KC+++"_"+i}function QC(i,e,t){let n=[];return i.forEach(r=>typeof r!="string"?n.push(r):e[Symbol.split](r).forEach((o,s,a)=>{o!==""&&n.push(o),s<a.length-1&&n.push(t)})),n}function sm(i,e){let t=/\$/g,n="$$$$",r=[i];if(e==null)return r;for(let o of Object.keys(e))if(o!=="_"){let s=e[o];typeof s=="string"&&(s=t[Symbol.replace](s,n)),r=QC(r,new RegExp(`%\\{${o}\\}`,"g"),s)}return r}var ZC=i=>{throw new Error(`missing string: ${i}`)},Zr=am("onMissingKey"),Jr=am("apply"),lr=class{constructor(e,t){let{onMissingKey:n=ZC}=t===void 0?{}:t;Object.defineProperty(this,Jr,{value:JC}),Object.defineProperty(this,Zr,{writable:!0,value:void 0}),this.locale={strings:{},pluralize(r){return r===1?0:1}},Array.isArray(e)?e.forEach(oa(this,Jr)[Jr],this):oa(this,Jr)[Jr](e),oa(this,Zr)[Zr]=n}translate(e,t){return this.translateArray(e,t).join("")}translateArray(e,t){let n=this.locale.strings[e];if(n==null&&(oa(this,Zr)[Zr](e),n=e),typeof n=="object"){if(t&&typeof t.smart_count<"u"){let o=this.locale.pluralize(t.smart_count);return sm(n[o],t)}throw new Error("Attempted to use a string with plural forms, but no value was given for %{smart_count}")}if(typeof n!="string")throw new Error("string was not a string");return sm(n,t)}};function JC(i){if(!(i!=null&&i.strings))return;let e=this.locale;Object.assign(this.locale,{strings:v(v({},e.strings),i.strings),pluralize:i.pluralize||e.pluralize})}var rg=De(cm(),1);var eS="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";var nn=(i=21)=>{let e="",t=i|0;for(;t--;)e+=eS[Math.random()*64|0];return e};var og=De(Vm(),1);function aa(i,e){if(!{}.hasOwnProperty.call(i,e))throw new TypeError("attempted to use private field on non-instance");return i}var GS=0;function Um(i){return"__private_"+GS+++"_"+i}var XS={version:"4.2.0"},fn=Um("callbacks"),td=Um("publish"),la=class{constructor(){Object.defineProperty(this,td,{value:YS}),this.state={},Object.defineProperty(this,fn,{writable:!0,value:new Set})}getState(){return this.state}setState(e){let t=v({},this.state),n=v(v({},this.state),e);this.state=n,aa(this,td)[td](t,n,e)}subscribe(e){return aa(this,fn)[fn].add(e),()=>{aa(this,fn)[fn].delete(e)}}};function YS(){for(var i=arguments.length,e=new Array(i),t=0;t<i;t++)e[t]=arguments[t];aa(this,fn)[fn].forEach(n=>{n(...e)})}la.VERSION=XS.version;var Wm=la;function xi(i){let e=i.lastIndexOf(".");return e===-1||e===i.length-1?{name:i,extension:void 0}:{name:i.slice(0,e),extension:i.slice(e+1)}}var id={__proto__:null,md:"text/markdown",markdown:"text/markdown",mp4:"video/mp4",mp3:"audio/mp3",svg:"image/svg+xml",jpg:"image/jpeg",png:"image/png",webp:"image/webp",gif:"image/gif",heic:"image/heic",heif:"image/heif",yaml:"text/yaml",yml:"text/yaml",csv:"text/csv",tsv:"text/tab-separated-values",tab:"text/tab-separated-values",avi:"video/x-msvideo",mks:"video/x-matroska",mkv:"video/x-matroska",mov:"video/quicktime",dicom:"application/dicom",doc:"application/msword",docm:"application/vnd.ms-word.document.macroenabled.12",docx:"application/vnd.openxmlformats-officedocument.wordprocessingml.document",dot:"application/msword",dotm:"application/vnd.ms-word.template.macroenabled.12",dotx:"application/vnd.openxmlformats-officedocument.wordprocessingml.template",xla:"application/vnd.ms-excel",xlam:"application/vnd.ms-excel.addin.macroenabled.12",xlc:"application/vnd.ms-excel",xlf:"application/x-xliff+xml",xlm:"application/vnd.ms-excel",xls:"application/vnd.ms-excel",xlsb:"application/vnd.ms-excel.sheet.binary.macroenabled.12",xlsm:"application/vnd.ms-excel.sheet.macroenabled.12",xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",xlt:"application/vnd.ms-excel",xltm:"application/vnd.ms-excel.template.macroenabled.12",xltx:"application/vnd.openxmlformats-officedocument.spreadsheetml.template",xlw:"application/vnd.ms-excel",txt:"text/plain",text:"text/plain",conf:"text/plain",log:"text/plain",pdf:"application/pdf",zip:"application/zip","7z":"application/x-7z-compressed",rar:"application/x-rar-compressed",tar:"application/x-tar",gz:"application/gzip",dmg:"application/x-apple-diskimage"};function to(i){var e;if(i.type)return i.type;let t=i.name?(e=xi(i.name).extension)==null?void 0:e.toLowerCase():null;return t&&t in id?id[t]:"application/octet-stream"}function KS(i){return i.charCodeAt(0).toString(32)}function $m(i){let e="";return i.replace(/[^A-Z0-9]/gi,t=>(e+=`-${KS(t)}`,"/"))+e}function qm(i,e){let t=e||"uppy";return typeof i.name=="string"&&(t+=`-${$m(i.name.toLowerCase())}`),i.type!==void 0&&(t+=`-${i.type}`),i.meta&&typeof i.meta.relativePath=="string"&&(t+=`-${$m(i.meta.relativePath.toLowerCase())}`),i.data.size!==void 0&&(t+=`-${i.data.size}`),i.data.lastModified!==void 0&&(t+=`-${i.data.lastModified}`),t}function QS(i){return!i.isRemote||!i.remote?!1:new Set(["box","dropbox","drive","facebook","unsplash"]).has(i.remote.provider)}function ca(i,e){if(QS(i))return i.id;let t=to(i);return qm(D(v({},i),{type:t}),e)}function nd(i){if(i==null&&typeof navigator<"u"&&(i=navigator.userAgent),!i)return!0;let e=/Edge\/(\d+\.\d+)/.exec(i);if(!e)return!0;let n=e[1].split(".",2),r=parseInt(n[0],10),o=parseInt(n[1],10);return r<15||r===15&&o<15063||r>18||r===18&&o>=18218}function rd(i,e){return e.name?e.name:i.split("/")[0]==="image"?`${i.split("/")[0]}.${i.split("/")[1]}`:"noname"}function od(i){return i<10?`0${i}`:i.toString()}function cr(){let i=new Date,e=od(i.getHours()),t=od(i.getMinutes()),n=od(i.getSeconds());return`${e}:${t}:${n}`}var Gm={debug:()=>{},warn:()=>{},error:function(){for(var i=arguments.length,e=new Array(i),t=0;t<i;t++)e[t]=arguments[t];return console.error(`[Uppy] [${cr()}]`,...e)}},Xm={debug:function(){for(var i=arguments.length,e=new Array(i),t=0;t<i;t++)e[t]=arguments[t];return console.debug(`[Uppy] [${cr()}]`,...e)},warn:function(){for(var i=arguments.length,e=new Array(i),t=0;t<i;t++)e[t]=arguments[t];return console.warn(`[Uppy] [${cr()}]`,...e)},error:function(){for(var i=arguments.length,e=new Array(i),t=0;t<i;t++)e[t]=arguments[t];return console.error(`[Uppy] [${cr()}]`,...e)}};var no=De(io(),1),tg=De(eg(),1),ig={maxFileSize:null,minFileSize:null,maxTotalFileSize:null,maxNumberOfFiles:null,minNumberOfFiles:null,allowedFileTypes:null,requiredMetaFields:[]},Tt=class extends Error{constructor(e,t){var n;super(e),this.isRestriction=!0,this.isUserFacing=(n=t?.isUserFacing)!=null?n:!0,t!=null&&t.file&&(this.file=t.file)}},da=class{constructor(e,t){this.getI18n=t,this.getOpts=()=>{var n;let r=e();if(((n=r.restrictions)==null?void 0:n.allowedFileTypes)!=null&&!Array.isArray(r.restrictions.allowedFileTypes))throw new TypeError("`restrictions.allowedFileTypes` must be an array");return r}}validateAggregateRestrictions(e,t){let{maxTotalFileSize:n,maxNumberOfFiles:r}=this.getOpts().restrictions;if(r&&e.filter(s=>!s.isGhost).length+t.length>r)throw new Tt(`${this.getI18n()("youCanOnlyUploadX",{smart_count:r})}`);if(n){let o=[...e,...t].reduce((s,a)=>{var l;return s+((l=a.size)!=null?l:0)},0);if(o>n)throw new Tt(this.getI18n()("aggregateExceedsSize",{sizeAllowed:(0,no.default)(n),size:(0,no.default)(o)}))}}validateSingleFile(e){let{maxFileSize:t,minFileSize:n,allowedFileTypes:r}=this.getOpts().restrictions;if(r&&!r.some(a=>a.includes("/")?e.type?(0,tg.default)(e.type.replace(/;.*?$/,""),a):!1:a[0]==="."&&e.extension?e.extension.toLowerCase()===a.slice(1).toLowerCase():!1)){let a=r.join(", ");throw new Tt(this.getI18n()("youCanOnlyUploadFileTypes",{types:a}),{file:e})}if(t&&e.size!=null&&e.size>t){var o;throw new Tt(this.getI18n()("exceedsSize",{size:(0,no.default)(t),file:(o=e.name)!=null?o:this.getI18n()("unnamed")}),{file:e})}if(n&&e.size!=null&&e.size<n)throw new Tt(this.getI18n()("inferiorSize",{size:(0,no.default)(n)}),{file:e})}validate(e,t){t.forEach(n=>{this.validateSingleFile(n)}),this.validateAggregateRestrictions(e,t)}validateMinNumberOfFiles(e){let{minNumberOfFiles:t}=this.getOpts().restrictions;if(t&&Object.keys(e).length<t)throw new Tt(this.getI18n()("youHaveToAtLeastSelectX",{smart_count:t}))}getMissingRequiredMetaFields(e){var t;let n=new Tt(this.getI18n()("missingRequiredMetaFieldOnFile",{fileName:(t=e.name)!=null?t:this.getI18n()("unnamed")})),{requiredMetaFields:r}=this.getOpts().restrictions,o=[];for(let s of r)(!Object.hasOwn(e.meta,s)||e.meta[s]==="")&&o.push(s);return{missingFields:o,error:n}}};var ng={strings:{addBulkFilesFailed:{0:"Failed to add %{smart_count} file due to an internal error",1:"Failed to add %{smart_count} files due to internal errors"},youCanOnlyUploadX:{0:"You can only upload %{smart_count} file",1:"You can only upload %{smart_count} files"},youHaveToAtLeastSelectX:{0:"You have to select at least %{smart_count} file",1:"You have to select at least %{smart_count} files"},aggregateExceedsSize:"You selected %{size} of files, but maximum allowed size is %{sizeAllowed}",exceedsSize:"%{file} exceeds maximum allowed size of %{size}",missingRequiredMetaField:"Missing required meta fields",missingRequiredMetaFieldOnFile:"Missing required meta fields in %{fileName}",inferiorSize:"This file is smaller than the allowed size of %{size}",youCanOnlyUploadFileTypes:"You can only upload: %{types}",noMoreFilesAllowed:"Cannot add more files",noDuplicates:"Cannot add the duplicate file '%{fileName}', it already exists",companionError:"Connection with Companion failed",authAborted:"Authentication aborted",companionUnauthorizeHint:"To unauthorize to your %{provider} account, please go to %{url}",failedToUpload:"Failed to upload %{file}",noInternetConnection:"No Internet connection",connectedToInternet:"Connected to the Internet",noFilesFound:"You have no files or folders here",noSearchResults:"Unfortunately, there are no results for this search",selectX:{0:"Select %{smart_count}",1:"Select %{smart_count}"},allFilesFromFolderNamed:"All files from folder %{name}",openFolderNamed:"Open folder %{name}",cancel:"Cancel",logOut:"Log out",logIn:"Log in",pickFiles:"Pick files",pickPhotos:"Pick photos",filter:"Filter",resetFilter:"Reset filter",loading:"Loading...",loadedXFiles:"Loaded %{numFiles} files",authenticateWithTitle:"Please authenticate with %{pluginName} to select files",authenticateWith:"Connect to %{pluginName}",signInWithGoogle:"Sign in with Google",searchImages:"Search for images",enterTextToSearch:"Enter text to search for images",search:"Search",resetSearch:"Reset search",emptyFolderAdded:"No files were added from empty folder",addedNumFiles:"Added %{numFiles} file(s)",folderAlreadyAdded:'The folder "%{folder}" was already added',folderAdded:{0:"Added %{smart_count} file from %{folder}",1:"Added %{smart_count} files from %{folder}"},additionalRestrictionsFailed:"%{count} additional restrictions were not fulfilled",unnamed:"Unnamed",pleaseWait:"Please wait"}};function H(i,e){if(!{}.hasOwnProperty.call(i,e))throw new TypeError("attempted to use private field on non-instance");return i}var eP=0;function Me(i){return"__private_"+eP+++"_"+i}var tP={version:"4.4.1"},ua={totalProgress:0,allowNewUpload:!0,error:null,recoveredState:null},ct=Me("plugins"),dt=Me("restricter"),ro=Me("storeUnsubscribe"),Fi=Me("emitter"),mn=Me("preProcessors"),gn=Me("uploaders"),Ai=Me("postProcessors"),Vt=Me("informAndEmit"),uo=Me("checkRequiredMetaFieldsOnFile"),sd=Me("checkRequiredMetaFields"),oo=Me("assertNewUploadAllowed"),cd=Me("transformFile"),so=Me("startIfAutoProceed"),ao=Me("checkAndUpdateFileState"),dd=Me("handleUploadProgress"),lo=Me("updateTotalProgress"),Bi=Me("updateTotalProgressThrottled"),ud=Me("calculateTotalProgress"),ad=Me("addListeners"),ui=Me("updateOnlineStatus"),co=Me("requestClientById"),Ri=Me("createUpload"),ld=Me("getUpload"),yn=Me("removeUpload"),Mi=Me("runUpload"),pa=class i{constructor(e){Object.defineProperty(this,Mi,{value:mP}),Object.defineProperty(this,yn,{value:fP}),Object.defineProperty(this,ld,{value:hP}),Object.defineProperty(this,Ri,{value:pP}),Object.defineProperty(this,ad,{value:uP}),Object.defineProperty(this,ud,{value:dP}),Object.defineProperty(this,lo,{value:cP}),Object.defineProperty(this,ao,{value:lP}),Object.defineProperty(this,so,{value:aP}),Object.defineProperty(this,cd,{value:sP}),Object.defineProperty(this,oo,{value:oP}),Object.defineProperty(this,sd,{value:rP}),Object.defineProperty(this,uo,{value:nP}),Object.defineProperty(this,Vt,{value:iP}),Object.defineProperty(this,ct,{writable:!0,value:Object.create(null)}),Object.defineProperty(this,dt,{writable:!0,value:void 0}),Object.defineProperty(this,ro,{writable:!0,value:void 0}),Object.defineProperty(this,Fi,{writable:!0,value:(0,rg.default)()}),Object.defineProperty(this,mn,{writable:!0,value:new Set}),Object.defineProperty(this,gn,{writable:!0,value:new Set}),Object.defineProperty(this,Ai,{writable:!0,value:new Set}),this.scheduledAutoProceed=null,this.wasOffline=!1,Object.defineProperty(this,dd,{writable:!0,value:(r,o)=>{let s=r?this.getFile(r.id):void 0;if(r==null||!s){this.log(`Not setting progress for a file that has been removed: ${r?.id}`);return}if(s.progress.percentage===100){this.log(`Not setting progress for a file that has been already uploaded: ${r.id}`);return}let a={bytesTotal:o.bytesTotal,percentage:o.bytesTotal!=null&&Number.isFinite(o.bytesTotal)&&o.bytesTotal>0?Math.round(o.bytesUploaded/o.bytesTotal*100):void 0};s.progress.uploadStarted!=null?this.setFileState(r.id,{progress:D(v(v({},s.progress),a),{bytesUploaded:o.bytesUploaded})}):this.setFileState(r.id,{progress:v(v({},s.progress),a)}),H(this,Bi)[Bi]()}}),Object.defineProperty(this,Bi,{writable:!0,value:(0,og.default)(()=>H(this,lo)[lo](),500,{leading:!0,trailing:!0})}),Object.defineProperty(this,ui,{writable:!0,value:this.updateOnlineStatus.bind(this)}),Object.defineProperty(this,co,{writable:!0,value:new Map}),this.defaultLocale=ng;let t={id:"uppy",autoProceed:!1,allowMultipleUploadBatches:!0,debug:!1,restrictions:ig,meta:{},onBeforeFileAdded:(r,o)=>!Object.hasOwn(o,r.id),onBeforeUpload:r=>r,store:new Wm,logger:Gm,infoTimeout:5e3},n=v(v({},t),e);this.opts=D(v({},n),{restrictions:v(v({},t.restrictions),e&&e.restrictions)}),e&&e.logger&&e.debug?this.log("You are using a custom `logger`, but also set `debug: true`, which uses built-in logger to output logs to console. Ignoring `debug: true` and using your custom `logger`.","warning"):e&&e.debug&&(this.opts.logger=Xm),this.log(`Using Core v${i.VERSION}`),this.i18nInit(),this.store=this.opts.store,this.setState(D(v({},ua),{plugins:{},files:{},currentUploads:{},capabilities:{uploadProgress:nd(),individualCancellation:!0,resumableUploads:!1},meta:v({},this.opts.meta),info:[]})),H(this,dt)[dt]=new da(()=>this.opts,()=>this.i18n),H(this,ro)[ro]=this.store.subscribe((r,o,s)=>{this.emit("state-update",r,o,s),this.updateAll(o)}),this.opts.debug&&typeof window<"u"&&(window[this.opts.id]=this),H(this,ad)[ad]()}emit(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];H(this,Fi)[Fi].emit(e,...n)}on(e,t){return H(this,Fi)[Fi].on(e,t),this}once(e,t){return H(this,Fi)[Fi].once(e,t),this}off(e,t){return H(this,Fi)[Fi].off(e,t),this}updateAll(e){this.iteratePlugins(t=>{t.update(e)})}setState(e){this.store.setState(e)}getState(){return this.store.getState()}patchFilesState(e){let t=this.getState().files;this.setState({files:v(v({},t),Object.fromEntries(Object.entries(e).map(n=>{let[r,o]=n;return[r,v(v({},t[r]),o)]})))})}setFileState(e,t){if(!this.getState().files[e])throw new Error(`Can\u2019t set state for ${e} (the file could have been removed)`);this.patchFilesState({[e]:t})}i18nInit(){let e=n=>this.log(`Missing i18n string: ${n}`,"error"),t=new lr([this.defaultLocale,this.opts.locale],{onMissingKey:e});this.i18n=t.translate.bind(t),this.i18nArray=t.translateArray.bind(t),this.locale=t.locale}setOptions(e){this.opts=D(v(v({},this.opts),e),{restrictions:v(v({},this.opts.restrictions),e?.restrictions)}),e.meta&&this.setMeta(e.meta),this.i18nInit(),e.locale&&this.iteratePlugins(t=>{t.setOptions(e)}),this.setState(void 0)}resetProgress(){let e={percentage:0,bytesUploaded:!1,uploadComplete:!1,uploadStarted:null},t=v({},this.getState().files),n=Object.create(null);Object.keys(t).forEach(r=>{n[r]=D(v({},t[r]),{progress:v(v({},t[r].progress),e),tus:void 0,transloadit:void 0})}),this.setState(v({files:n},ua))}clear(){let{capabilities:e,currentUploads:t}=this.getState();if(Object.keys(t).length>0&&!e.individualCancellation)throw new Error("The installed uploader plugin does not allow removing files during an upload.");this.setState(D(v({},ua),{files:{}}))}addPreProcessor(e){H(this,mn)[mn].add(e)}removePreProcessor(e){return H(this,mn)[mn].delete(e)}addPostProcessor(e){H(this,Ai)[Ai].add(e)}removePostProcessor(e){return H(this,Ai)[Ai].delete(e)}addUploader(e){H(this,gn)[gn].add(e)}removeUploader(e){return H(this,gn)[gn].delete(e)}setMeta(e){let t=v(v({},this.getState().meta),e),n=v({},this.getState().files);Object.keys(n).forEach(r=>{n[r]=D(v({},n[r]),{meta:v(v({},n[r].meta),e)})}),this.log("Adding metadata:"),this.log(e),this.setState({meta:t,files:n})}setFileMeta(e,t){let n=v({},this.getState().files);if(!n[e]){this.log(`Was trying to set metadata for a file that has been removed: ${e}`);return}let r=v(v({},n[e].meta),t);n[e]=D(v({},n[e]),{meta:r}),this.setState({files:n})}getFile(e){return this.getState().files[e]}getFiles(){let{files:e}=this.getState();return Object.values(e)}getFilesByIds(e){return e.map(t=>this.getFile(t))}getObjectOfFilesPerState(){let{files:e,totalProgress:t,error:n}=this.getState(),r=Object.values(e),o=[],s=[],a=[],l=[],c=[],d=[],u=[],g=[],h=[];for(let _ of r){let{progress:E}=_;!E.uploadComplete&&E.uploadStarted&&(o.push(_),_.isPaused||g.push(_)),E.uploadStarted||s.push(_),(E.uploadStarted||E.preprocess||E.postprocess)&&a.push(_),E.uploadStarted&&l.push(_),_.isPaused&&c.push(_),E.uploadComplete&&d.push(_),_.error&&u.push(_),(E.preprocess||E.postprocess)&&h.push(_)}return{newFiles:s,startedFiles:a,uploadStartedFiles:l,pausedFiles:c,completeFiles:d,erroredFiles:u,inProgressFiles:o,inProgressNotPausedFiles:g,processingFiles:h,isUploadStarted:l.length>0,isAllComplete:t===100&&d.length===r.length&&h.length===0,isAllErrored:!!n&&u.length===r.length,isAllPaused:o.length!==0&&c.length===o.length,isUploadInProgress:o.length>0,isSomeGhost:r.some(_=>_.isGhost)}}validateRestrictions(e,t){t===void 0&&(t=this.getFiles());try{H(this,dt)[dt].validate(t,[e])}catch(n){return n}return null}validateSingleFile(e){try{H(this,dt)[dt].validateSingleFile(e)}catch(t){return t.message}return null}validateAggregateRestrictions(e){let t=this.getFiles();try{H(this,dt)[dt].validateAggregateRestrictions(t,e)}catch(n){return n.message}return null}checkIfFileAlreadyExists(e){let{files:t}=this.getState();return!!(t[e]&&!t[e].isGhost)}addFile(e){H(this,oo)[oo](e);let{nextFilesState:t,validFilesToAdd:n,errors:r}=H(this,ao)[ao]([e]),o=r.filter(a=>a.isRestriction);if(H(this,Vt)[Vt](o),r.length>0)throw r[0];this.setState({files:t});let[s]=n;return this.emit("file-added",s),this.emit("files-added",n),this.log(`Added file: ${s.name}, ${s.id}, mime type: ${s.type}`),H(this,so)[so](),s.id}addFiles(e){H(this,oo)[oo]();let{nextFilesState:t,validFilesToAdd:n,errors:r}=H(this,ao)[ao](e),o=r.filter(a=>a.isRestriction);H(this,Vt)[Vt](o);let s=r.filter(a=>!a.isRestriction);if(s.length>0){let a=`Multiple errors occurred while adding files:
|
|
17
17
|
`;if(s.forEach(l=>{a+=`
|
|
18
18
|
* ${l.message}`}),this.info({message:this.i18n("addBulkFilesFailed",{smart_count:s.length}),details:a},"error",this.opts.infoTimeout),typeof AggregateError=="function")throw new AggregateError(s,a);{let l=new Error(a);throw l.errors=s,l}}this.setState({files:t}),n.forEach(a=>{this.emit("file-added",a)}),this.emit("files-added",n),n.length>5?this.log(`Added batch of ${n.length} files`):Object.values(n).forEach(a=>{this.log(`Added file: ${a.name}
|
|
19
19
|
id: ${a.id}
|
|
@@ -27,7 +27,7 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e.byteLength}`),e.tiff&&
|
|
|
27
27
|
uppy-DragDrop-container
|
|
28
28
|
${this.isDragDropSupported?"uppy-DragDrop--isDragDropSupported":""}
|
|
29
29
|
${this.getPluginState().isDraggingOver?"uppy-DragDrop--isDraggingOver":""}
|
|
30
|
-
`,t={width:this.opts.width,height:this.opts.height};return p("button",{type:"button",className:e,style:t,onClick:()=>this.fileInputRef.click(),onDragOver:this.handleDragOver,onDragLeave:this.handleDragLeave,onDrop:this.handleDrop},this.renderHiddenFileInput(),p("div",{className:"uppy-DragDrop-inner"},i.renderArrowSvg(),this.renderLabel(),this.renderNote()))}install(){let{target:e}=this.opts;this.setPluginState({isDraggingOver:!1}),e&&this.mount(e,this)}uninstall(){this.unmount()}};Pr.VERSION=AE.version;var Au=class{onMount(e,t){this.options=v(v({},e),this.props),this.uppy.use(t,this.options),this.plugin=this.uppy.getPlugin(this.options.id)}handleChanges(e,t){e.uppy&&this.uppy!==e.uppy.previousValue&&e.uppy.previousValue!==void 0&&(this.uninstall(e.uppy.previousValue),this.uppy.use(t,this.options)),this.options=v(v({},this.options),this.props),this.plugin=this.uppy.getPlugin(this.options.id),e.props&&this.props!==e.props.previousValue&&e.props.previousValue!==void 0&&this.plugin.setOptions(v({},this.options))}uninstall(e=this.uppy){e.removePlugin(this.plugin)}},ay=(()=>{class i extends Au{constructor(t){super(),this.el=t,this.uppy=new dr,this.props={}}ngOnInit(){this.onMount({id:"angular:Dashboard",inline:!0,target:this.el.nativeElement},Mn)}ngOnChanges(t){this.handleChanges(t,Mn)}ngOnDestroy(){this.uninstall()}static{this.\u0275fac=function(n){return new(n||i)(He(Et))}}static{this.\u0275cmp=fe({type:i,selectors:[["uppy-dashboard"]],inputs:{uppy:"uppy",props:"props"},features:[pl,gi],decls:0,vars:0,template:function(n,r){},encapsulation:2,changeDetection:0})}}return i})();var ly=(()=>{class i{static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275mod=Nt({type:i})}static{this.\u0275inj=Bt({})}}return i})();function ce(i,e){if(!{}.hasOwnProperty.call(i,e))throw new TypeError("attempted to use private field on non-instance");return i}var zE=0;function Ot(i){return"__private_"+zE+++"_"+i}function LE(i){return new Error("Cancelled",{cause:i})}function cy(i){if(i!=null){var e;let t=()=>this.abort(i.reason);i.addEventListener("abort",t,{once:!0});let n=()=>{i.removeEventListener("abort",t)};(e=this.then)==null||e.call(this,n,n)}return this}var Yt=Ot("activeRequests"),wt=Ot("queuedHandlers"),Xt=Ot("paused"),An=Ot("pauseTimer"),_t=Ot("downLimit"),Bn=Ot("upperLimit"),Vi=Ot("rateLimitingTimer"),Xo=Ot("call"),Ui=Ot("queueNext"),zu=Ot("next"),Bu=Ot("queue"),Lu=Ot("dequeue"),Nu=Ot("resume"),Nn=Ot("increaseLimit"),Ka=class{constructor(e){Object.defineProperty(this,Lu,{value:WE}),Object.defineProperty(this,Bu,{value:UE}),Object.defineProperty(this,zu,{value:VE}),Object.defineProperty(this,Ui,{value:jE}),Object.defineProperty(this,Xo,{value:HE}),Object.defineProperty(this,Yt,{writable:!0,value:0}),Object.defineProperty(this,wt,{writable:!0,value:[]}),Object.defineProperty(this,Xt,{writable:!0,value:!1}),Object.defineProperty(this,An,{writable:!0,value:void 0}),Object.defineProperty(this,_t,{writable:!0,value:1}),Object.defineProperty(this,Bn,{writable:!0,value:void 0}),Object.defineProperty(this,Vi,{writable:!0,value:void 0}),Object.defineProperty(this,Nu,{writable:!0,value:()=>this.resume()}),Object.defineProperty(this,Nn,{writable:!0,value:()=>{if(ce(this,Xt)[Xt]){ce(this,Vi)[Vi]=setTimeout(ce(this,Nn)[Nn],0);return}ce(this,_t)[_t]=this.limit,this.limit=Math.ceil((ce(this,Bn)[Bn]+ce(this,_t)[_t])/2);for(let t=ce(this,_t)[_t];t<=this.limit;t++)ce(this,Ui)[Ui]();ce(this,Bn)[Bn]-ce(this,_t)[_t]>3?ce(this,Vi)[Vi]=setTimeout(ce(this,Nn)[Nn],2e3):ce(this,_t)[_t]=Math.floor(ce(this,_t)[_t]/2)}}),typeof e!="number"||e===0?this.limit=1/0:this.limit=e}run(e,t){return!ce(this,Xt)[Xt]&&ce(this,Yt)[Yt]<this.limit?ce(this,Xo)[Xo](e):ce(this,Bu)[Bu](e,t)}wrapSyncFunction(e,t){var n=this;return function(){for(var r=arguments.length,o=new Array(r),s=0;s<r;s++)o[s]=arguments[s];let a=n.run(()=>(e(...o),queueMicrotask(()=>a.done()),()=>{}),t);return{abortOn:cy,abort(){a.abort()}}}}wrapPromiseFunction(e,t){var n=this;return function(){for(var r=arguments.length,o=new Array(r),s=0;s<r;s++)o[s]=arguments[s];let a,l=new Promise((c,d)=>{a=n.run(()=>{let u,g;try{g=Promise.resolve(e(...o))}catch(h){g=Promise.reject(h)}return g.then(h=>{u?d(u):(a.done(),c(h))},h=>{u?d(u):(a.done(),d(h))}),h=>{u=LE(h)}},t)});return l.abort=c=>{a.abort(c)},l.abortOn=cy,l}}resume(){ce(this,Xt)[Xt]=!1,clearTimeout(ce(this,An)[An]);for(let e=0;e<this.limit;e++)ce(this,Ui)[Ui]()}pause(e){e===void 0&&(e=null),ce(this,Xt)[Xt]=!0,clearTimeout(ce(this,An)[An]),e!=null&&(ce(this,An)[An]=setTimeout(ce(this,Nu)[Nu],e))}rateLimit(e){clearTimeout(ce(this,Vi)[Vi]),this.pause(e),this.limit>1&&Number.isFinite(this.limit)&&(ce(this,Bn)[Bn]=this.limit-1,this.limit=ce(this,_t)[_t],ce(this,Vi)[Vi]=setTimeout(ce(this,Nn)[Nn],e))}get isPaused(){return ce(this,Xt)[Xt]}};function HE(i){ce(this,Yt)[Yt]+=1;let e=!1,t;try{t=i()}catch(n){throw ce(this,Yt)[Yt]-=1,n}return{abort:n=>{e||(e=!0,ce(this,Yt)[Yt]-=1,t?.(n),ce(this,Ui)[Ui]())},done:()=>{e||(e=!0,ce(this,Yt)[Yt]-=1,ce(this,Ui)[Ui]())}}}function jE(){queueMicrotask(()=>ce(this,zu)[zu]())}function VE(){if(ce(this,Xt)[Xt]||ce(this,Yt)[Yt]>=this.limit||ce(this,wt)[wt].length===0)return;let i=ce(this,wt)[wt].shift();if(i==null)throw new Error("Invariant violation: next is null");let e=ce(this,Xo)[Xo](i.fn);i.abort=e.abort,i.done=e.done}function UE(i,e){let t={fn:i,priority:e?.priority||0,abort:()=>{ce(this,Lu)[Lu](t)},done:()=>{throw new Error("Cannot mark a queued request as done: this indicates a bug")}},n=ce(this,wt)[wt].findIndex(r=>t.priority>r.priority);return n===-1?ce(this,wt)[wt].push(t):ce(this,wt)[wt].splice(n,0,t),t}function WE(i){let e=ce(this,wt)[wt].indexOf(i);e!==-1&&ce(this,wt)[wt].splice(e,1)}var Y4=Symbol("__queue");var Vu=De(io(),1),hy=De(dy(),1);var uy={strings:{compressingImages:"Compressing images...",compressedX:"Saved %{size} by compressing images"}};function py(i,e){if(!{}.hasOwnProperty.call(i,e))throw new TypeError("attempted to use private field on non-instance");return i}var $E=0;function qE(i){return"__private_"+$E+++"_"+i}var GE={quality:.6,limit:10},Yo=qE("RateLimitedQueue"),Qa=class extends bn{constructor(e,t){super(e,v(v({},GE),t)),Object.defineProperty(this,Yo,{writable:!0,value:void 0}),this.id=this.opts.id||"Compressor",this.type="modifier",this.defaultLocale=uy,py(this,Yo)[Yo]=new Ka(this.opts.limit),this.i18nInit(),this.prepareUpload=this.prepareUpload.bind(this),this.compress=this.compress.bind(this)}compress(e){return new Promise((t,n)=>{new hy.default(e,D(v({},this.opts),{success:t,error:n}))})}prepareUpload(e){return B(this,null,function*(){let t=0,n=[],r=py(this,Yo)[Yo].wrapPromiseFunction(s=>B(this,null,function*(){try{let a=yield this.compress(s.data),l=s.data.size-a.size;this.uppy.log(`[Image Compressor] Image ${s.id} compressed by ${(0,Vu.default)(l)}`),t+=l;let{name:c,type:d,size:u}=a,g=xi(c),_=`${xi(s.meta.name).name}.${g.extension}`;this.uppy.setFileState(s.id,D(v(v(v(v({},c&&{name:c}),g.extension&&{extension:g.extension}),d&&{type:d}),u&&{size:u}),{data:a,meta:D(v({},s.meta),{type:d,name:_})})),n.push(s)}catch(a){this.uppy.log(`[Image Compressor] Failed to compress ${s.id}:`,"warning"),this.uppy.log(a,"warning")}})),o=e.map(s=>{var a;let l=this.uppy.getFile(s);return this.uppy.emit("preprocess-progress",l,{mode:"indeterminate",message:this.i18n("compressingImages")}),l.isRemote||(l.data.type||(l.data=l.data.slice(0,l.data.size,l.type)),!((a=l.type)!=null&&a.startsWith("image/")))?Promise.resolve():r(l)});yield Promise.all(o),this.uppy.emit("compressor:complete",n),t>1024&&this.uppy.info(this.i18n("compressedX",{size:(0,Vu.default)(t)}),"info");for(let s of e){let a=this.uppy.getFile(s);this.uppy.emit("preprocess-complete",a)}})}install(){this.uppy.addPreProcessor(this.prepareUpload)}uninstall(){this.uppy.removePreProcessor(this.prepareUpload)}};var my=De(fy(),1);function XE(i,e){if(i&1&&(f(0,"small",5),x(1),m()),i&2){let t=O();y(),I(t.subtitle)}}function YE(i,e){if(i&1&&(f(0,"a",6),ue(1,"i",7),x(2," Download Template "),m()),i&2){let t=O();jn("top-58",t.subtitle),P("href",t.sampleUrl,is)}}function KE(i,e){if(i&1&&(hl(0),x(1),fl()),i&2){let t=O(2);y(),ii("- ",t.rowSummary().rowEmpty," empty in the CSV you uploaded")}}function QE(i,e){if(i&1&&(f(0,"div",4)(1,"h4",8),x(2,"CSV File Content Summary"),m(),ue(3,"hr"),f(4,"p",9),x(5),le(6,KE,2,1,"ng-container",10),m()()),i&2){let t=O();y(5),ii("",t.rowSummary().rowCount," rows found "),y(),P("ngIf",t.rowSummary().rowEmpty>0)}}var gy=(()=>{class i{static{this.sizes=["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"]}static{this.kilobyte=1024}constructor(){this.sampleUrl="",this.subtitle="",this.showSample=!0,this.showSubtitle=!0,this.uppyCoreConfiguration=ul(),this.dashboardPropsConfiguration=ul(),this.fileUploaded=new zt,this.fileUploadComplete=new zt,this.fileRemoved=new zt,this.onParser=new zt,this.multipleFilesUploaded=new zt,this.http=z(om),this.csvParser=z(rm),this.rowSummary=q({rowCount:0,rowEmpty:0}),this.file=q(null),this.multipleFiles=q([]),this.uppy=new dr({debug:!0,autoProceed:!0,allowMultipleUploadBatches:!1,restrictions:{allowedFileTypes:[".csv"],maxTotalFileSize:1e6}}).use(Qa,{mimeType:"image/jpeg",convertSize:1/0,convertTypes:["image/png"]}),this.dashboardProps={hideUploadButton:!0,height:350},yl(()=>this.uppy.setOptions(v({},this.uppyCoreConfiguration()))),yl(()=>this.dashboardProps=v(v({},this.dashboardProps),this.dashboardPropsConfiguration())),this.uppy.on("upload",(t,n)=>{let r=n[0]?.data;this.showSample=!1,this.showSubtitle=!1,console.log(t,n,r),this.fileUploaded.emit(r),this.file.set(n[0].data),my.default.parse(r,{skipEmptyLines:"greedy",header:!0,beforeFirstChunk:o=>{let s=o.split(/\r?\n/).slice(1);return s[s.length-1]===""&&s.pop(),this.rowSummary.update(a=>D(v({},a),{rowCount:s.length})),s.forEach(a=>{a.split(",").every(c=>c==="")&&this.rowSummary.update(c=>D(v({},c),{rowEmpty:c.rowEmpty+1}))}),o},error(o,s){console.log("ERROR",o,s)},complete:(o,s)=>{this.onParser.emit(o.data)}})}),this.uppy.on("complete",t=>{let n=t.successful?.map(o=>({file:o.data,id:o.id}))??[],r=t.successful[0]?.data;this.showSample=!1,this.showSubtitle=!1,console.log(r),this.fileUploadComplete.emit(r),this.multipleFilesUploaded.emit(n),this.file.set(r),this.multipleFiles.set(n)}),this.uppy.on("transloadit:upload",(t,n)=>{console.log(t,n)}),this.uppy.on("transloadit:result",(t,n)=>{console.log(t,n)}),this.uppy.on("file-removed",t=>{this.showSample=!0,this.showSubtitle=!0,this.file.set(null);let r=this.multipleFiles().filter(o=>o.id!=t.id);this.multipleFiles.set(r),this.fileRemoved.emit(t.id),this.rowSummary.set({rowCount:0,rowEmpty:0})})}formatFileSize(t,n=2){if(t===0)return"0 bytes";let r=Math.floor(Math.log(t)/Math.log(i.kilobyte));return`${(t/Math.pow(i.kilobyte,r)).toFixed(n)} ${i.sizes[r]}`}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275cmp=fe({type:i,selectors:[["POS-uppy"]],inputs:{sampleUrl:"sampleUrl",subtitle:"subtitle",uppyCoreConfiguration:[1,"uppyCoreConfiguration"],dashboardPropsConfiguration:[1,"dashboardPropsConfiguration"]},outputs:{fileUploaded:"fileUploaded",fileUploadComplete:"fileUploadComplete",fileRemoved:"fileRemoved",onParser:"onParser",multipleFilesUploaded:"multipleFilesUploaded"},standalone:!0,features:[_e],decls:5,vars:5,consts:[[1,"position-relative"],[3,"uppy","props"],["class","subtitle position-absolute",4,"ngIf"],["class","sample position-absolute","role","button",3,"top-58","href",4,"ngIf"],["role","alert",1,"alert","alert-warning","d-flex","flex-column","gap-2",2,"margin","1rem 0 0 0"],[1,"subtitle","position-absolute"],["role","button",1,"sample","position-absolute",3,"href"],[1,"fa-solid","fa-download","ms-3"],[1,"alert-heading"],[1,"fs-6","m-0"],[4,"ngIf"]],template:function(n,r){if(n&1&&(f(0,"div",0),ue(1,"uppy-dashboard",1),le(2,XE,2,1,"small",2)(3,YE,3,3,"a",3)(4,QE,7,2,"div",4),m()),n&2){let o;y(),P("uppy",r.uppy)("props",r.dashboardProps),y(),P("ngIf",r.subtitle&&r.showSubtitle),y(),P("ngIf",r.sampleUrl&&r.showSample),y(),Ce(r.file()&&((o=r.file())==null?null:o.type)==="text/csv"?4:-1)}},dependencies:[ly,ay,ri,Vn],styles:[".uppy-Dashboard-AddFiles-info{display:none!important} .uppy-Dashboard-AddFiles-list{flex:none;flex-direction:row;flex-wrap:wrap;justify-content:center;max-width:600px;margin-top:15px;padding-top:0;overflow-y:visible}.sample[_ngcontent-%COMP%], .subtitle[_ngcontent-%COMP%]{top:56%;width:100%;text-align:center}.top-58[_ngcontent-%COMP%]{top:61%}"]})}}return i})();var yy=(()=>{class i{constructor(){this.file=null,this.sample_URL="https://res.cloudinary.com/pos/raw/upload/POS/CSV/Barcode_DealPOS.csv",this.fb=z(Yi),this.httpService=z(bi),this.destroyRef=z(Ye),this.activeModal=z(Es)}ngOnInit(){this.form=this.fb.group({file:new nt("",[lt.required])})}onSelectFile(t){t instanceof File&&(this.file=t)}onOK(){let t=`https://${localStorage.getItem("Domain")}`;if(this.file){let n=new FormData;n.append("file",this.file,this.file.name),n.append("OutletID",""),this.httpService.postFormData("API/catalog/product/UploadCSVforBarcode",n,void 0,t).pipe(Je(this.destroyRef)).subscribe({next:r=>{this.activeModal.close(r)}})}}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275cmp=fe({type:i,selectors:[["app-dialog-import-product"]],standalone:!0,features:[_e],decls:2,vars:2,consts:[["title","Upload New Product Barcode?",3,"onOK","hasValid"],[3,"fileUploaded","sampleUrl"]],template:function(n,r){n&1&&(f(0,"app-base-modal",0),W("onOK",function(){return r.onOK()}),f(1,"POS-uppy",1),W("fileUploaded",function(s){return r.onSelectFile(s)}),m()()),n&2&&(P("hasValid",r.form.valid),y(),P("sampleUrl",r.sample_URL))},dependencies:[Ds,rt,gy],styles:["pos-uppy div div h4{font-size:14px;margin:0} pos-uppy div div hr{margin:0!important} pos-uppy div div p.fs-6{font-size:1rem!important}"]})}}return i})();var vy=()=>{let i=new Date().getTime();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var t=Math.random()*16;return t=(i+t)%16|0,i=Math.floor(i/16),(e==="x"?t:t&3|8).toString(16)})};var ZE=(i,e)=>e.VariantID;function JE(i,e){if(i&1&&(f(0,"span",46),x(1),Ue(2,"maskito"),m()),i&2){let t=O(2).$implicit,n=O();y(),I(Ti(2,1,n.promotionDiscount(t.Promotions),n.options))}}function eD(i,e){if(i&1&&(f(0,"div",37)(1,"span",44),x(2),Ue(3,"maskito"),m(),le(4,JE,3,4,"span",45),m()),i&2){let t=O().$implicit,n=O();y(2),I(Ti(3,2,t.UnitPrice,n.options)),y(2),P("ngIf",t.Promotions)}}function tD(i,e){if(i&1&&(f(0,"div",37)(1,"span"),x(2),Ue(3,"maskito"),m()()),i&2){let t=O(2).$implicit,n=O();y(2),I(Ti(3,1,t.Print[0].UnitPrice,n.options))}}function iD(i,e){if(i&1&&(f(0,"div",37)(1,"span"),x(2),Ue(3,"maskito"),m()()),i&2){let t=O(2).$implicit,n=O();y(2),I(Ti(3,1,t.UnitPrice,n.options))}}function nD(i,e){if(i&1&&le(0,tD,4,4,"div",37)(1,iD,4,4,"div",37),i&2){let t=O().$implicit;Ce(t.Print&&t.Print.length>0?0:1)}}function rD(i,e){i&1&&ue(0,"i",40)}function oD(i,e){i&1&&ue(0,"i",41)}function sD(i,e){if(i&1){let t=Ie();f(0,"tr")(1,"td"),x(2),m(),f(3,"td"),x(4),m(),f(5,"td"),x(6),Ue(7,"number"),m(),f(8,"td"),le(9,eD,5,5,"div",37)(10,nD,2,1),m(),f(11,"td")(12,"div",38)(13,"button",39),W("click",function(){let r=se(t).$implicit,o=O();return ae(o.onToggleSelected(r))}),le(14,rD,1,0,"i",40)(15,oD,1,0,"i",41),m(),f(16,"button",42),W("click",function(){let r=se(t).$implicit,o=O();return ae(o.onRemoveItem(r))}),ue(17,"i",43),m()()()()}if(i&2){let t=e.$implicit,n=O();y(2),I(t.Name),y(2),I(t.Code),y(2),I(ni(7,6,t.Quantity)),y(3),Ce(t.Promotions?9:10),y(5),Ce(t.isSelected&&n.productEdit?14:15),y(2),P("disabled",t.isSelected&&n.productEdit)}}var by=(()=>{class i{constructor(){this.productItems=[],this.storeService=z(ke),this.Object=Object,this.options=ar({precision:2,thousandSeparator:","}),this.modalService=z(Ip),this.httpService=z(bi),this.router=z(Un),this.route=z(ms)}ngOnInit(){}onNext(){this.storeService.onNextStep(),this.storeService.productItems().length>0&&(this.storeService.stepperRef().selected.completed=!0,this.storeService.stepperRef().next())}onOpenModalChooseProduct(){return B(this,null,function*(){let n=yield this.modalService.open(ia,{centered:!0}).result;if(n){let r=[...this.storeService.productItems()],o=r.findIndex(a=>a.ID===n.ID);o!==-1?r[o].Quantity+=n.Quantity:r.push(n);let s=[...r];this.storeService.onChangeProductItems(s),vl.production||localStorage.setItem("productItems",JSON.stringify(s))}})}onOpenModalEdit(t){return B(this,null,function*(){let n=this.modalService.open(ia,{centered:!0,scrollable:!0});n.componentInstance.data=t;try{let r=yield n.result;if(r){let o=[...this.storeService.productItems()],s=o.findIndex(l=>l.ID===r.ID);s!==-1?o[s]=r:o.push(r);let a=[...o];this.storeService.onChangeProductItems(a),vl.production||localStorage.setItem("productItems",JSON.stringify(a))}}catch{}})}ngAfterViewInit(){this.productItems=this.storeService.productItems().map(t=>D(v({},t),{isSelected:!1}))}onToggleSelected(t){let n=[...this.storeService.productItems()],r=n.findIndex(o=>Object.prototype.hasOwnProperty.call(o,"VariantID")?o.VariantID===t.VariantID:o.ID===t.ID);r!==-1?n[r].checked=!0:n.forEach(o=>o.checked=!1),this.router.navigate(["/pages"],{queryParams:{id:n[r].checked?Object.prototype.hasOwnProperty.call(n[r],"VariantID")?t.VariantID:t.ID:null}})}onOpenDialogImportProduct(){return B(this,null,function*(){let n=yield this.modalService.open(yy,{scrollable:!0,centered:!0}).result,r=[...this.storeService.productItems()];n.forEach(o=>{r.push(D(v({},o),{Uuid:vy(),ID:o.VariantID}))}),this.storeService.onChangeProductItems(r),console.log("result",n)})}onOpenDialogLoadTransaction(){return B(this,null,function*(){let n=yield this.modalService.open(em,{scrollable:!0,centered:!0}).result,o=`https://${localStorage.getItem("Domain")}`;if(console.log("result",n),n!==void 0)switch(n.role){case"ok":let s={Number:n.data.number,Outlet:n.data.outlet},a=n.data.type===0?"/API/V3/Bill/Number":"/API/V3/TransferOrder/Detail ";this.httpService.post(a,s,void 0,o).pipe(Kt(l=>D(v({},l),{Variants:l.Variants.map(c=>D(v({},c),{UnitPrice:c.Price,checked:!1}))})),xe(l=>{let c=[...this.storeService.productItems()];l.Variants.forEach(d=>{let u=c.findIndex(g=>g.VariantID===d.VariantID);u!==-1?c[u].Quantity+=d.Quantity:c.push(d)}),this.storeService.onChangeProductItems(c)})).subscribe();break}})}onRemoveItem(t){let r=[...this.storeService.productItems()].filter(o=>o.VariantID!==t.VariantID);this.storeService.onChangeProductItems(r)}onActivate(t){return B(this,null,function*(){t.type==="click"&&(yield this.onOpenModalEdit(t.row))})}promotionDiscount(t){try{return Object.keys(t).length?t.Discount&&t.Discount>0?t.UnitPrice-t.UnitPrice*t.Discount/100:t.UnitPrice:0}catch(n){throw new Error("error: ",n)}}onClear(){this.storeService.onChangeProductItems([])}get productEdit(){return this.route.snapshot.queryParamMap.has("id")}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275cmp=fe({type:i,selectors:[["choose-product"]],viewQuery:function(n,r){if(n&1&&yi(Xp,5),n&2){let o;ei(o=ti())&&(r.verticalSidebar=o.first)}},standalone:!0,features:[_e],decls:58,vars:5,consts:[[1,"d-flex","flex-column","gap-3","h-100"],[1,"topbar","position-static"],[1,"d-flex","top-navbar","navbar-expand-lg",3,"ngClass"],["id","navbarSupportedContent",1,"navbar-collapse","collapse","m-0",3,"ngbCollapse"],[1,"w-100","d-flex","align-items-center","px-3"],[1,"navbar-nav","float-start","me-auto","h-100","d-flex","align-items-center"],[1,"nav-item","d-none","d-lg-block"],[1,"font-robotoslab","m-0"],[1,"navbar-nav","float-end","py-2"],[1,"d-flex","gap-2"],[1,"btn-group"],["ngbDropdown","","placement","bottom-end",1,"btn-group"],["type","button",1,"btn","btn-outline-secondary","text-dark","d-flex","gap-2","align-items-baseline",3,"click"],[1,"fa-solid","fa-upload","fs-3"],[1,"fs-3"],["type","button","ngbDropdownToggle","",1,"btn","btn-outline-secondary","dropdown-toggle-split"],["ngbDropdownMenu","","aria-labelledby","dropdownBasic1"],["ngbDropdownItem","",1,"dropdown-item","text-dark","d-flex","gap-2","align-items-baseline",3,"click"],[1,"fa-regular","fa-file-lines","fs-3"],[1,"fa-solid","fa-trash","fs-3"],["type","button",1,"btn","btn-outline-secondary","d-flex","gap-1","align-items-center",3,"click","disabled"],[1,"f","fas","fa-angle-right"],[1,"mx-3","flex-grow-1"],[1,"row"],[1,"col-8"],[1,"container",2,"padding-left","2px","padding-right","0px"],[1,"card","h-100"],[1,"card-body",2,"padding","0.8rem","height","calc(100vh - 100px)"],[1,"table-responsive",2,"max-height","100%","height","100%","overflow-y","auto"],[1,"table"],[2,"position","sticky","top","0","background-color","white","border","1px solid rgba(0, 0, 0, 0.12)","z-index","1"],["scope","col"],["scope","col",2,"width","10%"],["scope","col",1,"text-end",2,"width","10%"],[1,"col"],[1,"card"],[1,"card-body",2,"padding","0.8rem"],[1,"d-flex","flex-column","text-end"],[1,"w-100","d-flex","justify-content-end","align-items-center"],["type","button",1,"btn","btn-link",3,"click"],[1,"fa-solid","fa-check","fs-5","text-primary"],[1,"fa-solid","fa-pen-to-square","fs-5"],["type","button",1,"btn","btn-link",3,"click","disabled"],[1,"fas","fa-trash","me-1","text-danger","fs-5"],[1,"text-decoration-line-through","text-danger"],["class","text-dark",4,"ngIf"],[1,"text-dark"]],template:function(n,r){n&1&&(f(0,"div",0)(1,"header",1)(2,"nav",2)(3,"div",3)(4,"div",4)(5,"ul",5)(6,"li",6)(7,"h3",7),x(8,"Choose Product"),m()()(),f(9,"ul",8)(10,"div",9)(11,"div",10)(12,"div",11)(13,"button",12),W("click",function(){return r.onOpenDialogImportProduct()}),ue(14,"i",13),f(15,"span",14),x(16,"Upload"),m()(),ue(17,"button",15),f(18,"div",16)(19,"button",17),W("click",function(){return r.onOpenDialogLoadTransaction()}),ue(20,"i",18),f(21,"span",14),x(22,"Load Transaction"),m()(),f(23,"button",17),W("click",function(){return r.onClear()}),ue(24,"i",19),f(25,"span",14),x(26,"Clear"),m()()()()(),f(27,"button",20),W("click",function(){return r.onNext()}),f(28,"span",14),x(29,"Next"),m(),ue(30,"i",21),m()()()()(),x(31,' " '),m()(),f(32,"div",22)(33,"div",23)(34,"div",24)(35,"div",25)(36,"div",26)(37,"div",27)(38,"div",28)(39,"table",29)(40,"thead",30)(41,"tr")(42,"th",31),x(43,"Name"),m(),f(44,"th",31),x(45,"Code"),m(),f(46,"th",32),x(47,"Qty"),m(),f(48,"th",33),x(49," Price "),m(),ue(50,"th",32),m()(),f(51,"tbody"),Zt(52,sD,18,8,"tr",null,ZE),m()()()()()()(),f(54,"div",34)(55,"div",35)(56,"div",36),ue(57,"modal-choose-product"),m()()()()()()),n&2&&(y(),Lt("data-navbarbg",r.storeService.options().navbarbg),y(),P("ngClass",r.storeService.options().navbarbg=="skin6"?"navbar-light":"navbar-dark"),y(),P("ngbCollapse",!r.storeService.options().isCollapsed),Lt("data-navbarbg",r.storeService.options().navbarbg),y(24),P("disabled",r.storeService.productItems().length<=0),y(25),Jt(r.storeService.productItems()))},dependencies:[ri,Xi,Vn,fs,Tp,Ep,Pp,Dp,kp,$n,Ff,nm,ia],styles:[".dropdown-toggle:after{display:inline-block!important}[_nghost-%COMP%] .ngx-datatable.fixed-header .datatable-header .datatable-header-inner .datatable-header-cell{background:#f6f6f6!important;font-weight:600;font-size:14px;color:#3b3b3b}[_nghost-%COMP%] .ngx-datatable .datatable-body{border:none}[_nghost-%COMP%] .ngx-datatable.material{border:none}[_ngcontent-%COMP%]:hover .ngx-datatable.material .datatable-header{border:1px solid rgba(0,0,0,.12)}[_nghost-%COMP%] .ngx-datatable.material .datatable-body .datatable-body-row .datatable-body-cell{display:flex;align-items:center;font-size:12px}[_nghost-%COMP%] .ngx-datatable.material .datatable-body .datatable-body-row .datatable-body-cell .datatable-body-cell-label{width:100%}[_nghost-%COMP%] .ngx-datatable.material .empty-row{font-size:12px}table[_ngcontent-%COMP%] > thead[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%] > th[_ngcontent-%COMP%]{background:#f6f6f6!important;font-weight:600;font-size:14px;color:#3b3b3b}table[_ngcontent-%COMP%] > thead[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%]{border:1px solid rgba(0,0,0,.12)}table[_ngcontent-%COMP%] > tbody[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%] > td[_ngcontent-%COMP%]{font-weight:400;font-size:12px;vertical-align:middle}.dropdown-item[_ngcontent-%COMP%]:hover{background-color:#ddd;color:#333}.dropdown-menu.show[_ngcontent-%COMP%]{padding:.5rem 0}"],changeDetection:0})}}return i})();var Ko="px",_y=ar({postfix:Ko,min:0,thousandSeparator:""}),{plugins:aD}=_y,lD=Ln(_y,["plugins"]),Ft=D(v({},lD),{plugins:[...aD,Tf(i=>[0,i.length-Ko.length]),sr("focus",i=>{i.setSelectionRange(0,i.value.length-Ko.length)}),sr("blur",i=>{i.value===Ko&&nr(i,`0${Ko}`)})]});function cD(i,e){if(i&1&&(f(0,"span",30),x(1),m()),i&2){let t=O();y(),I(t.tooltip.barcodeHeight)}}function dD(i,e){if(i&1&&(f(0,"span",30),x(1),m()),i&2){let t=O();y(),I(t.tooltip.fontSize)}}function uD(i,e){if(i&1&&(f(0,"span",30),x(1),m()),i&2){let t=O();y(),I(t.tooltip.barcode)}}function pD(i,e){if(i&1&&(f(0,"span",30),x(1),m()),i&2){let t=O();y(),I(t.tooltip.code)}}function hD(i,e){if(i&1&&(f(0,"span",30),x(1),m()),i&2){let t=O();y(),I(t.tooltip.price)}}function fD(i,e){if(i&1&&(f(0,"span",30),x(1),m()),i&2){let t=O();y(),I(t.tooltip.name)}}function mD(i,e){if(i&1&&(f(0,"span",30),x(1),m()),i&2){let t=O();y(),I(t.tooltip.moveProductName)}}function gD(i,e){if(i&1&&(f(0,"span",30),x(1),m()),i&2){let t=O();y(),I(t.tooltip.releaseDate)}}function yD(i,e){if(i&1&&(f(0,"span",30),x(1),m()),i&2){let t=O();y(),I(t.tooltip.discountVisible)}}function vD(i,e){if(i&1&&(f(0,"span",30),x(1),m()),i&2){let t=O();y(),I(t.tooltip.pricebookPrice)}}function bD(i,e){if(i&1&&(f(0,"span",30),x(1),m()),i&2){let t=O();y(),I(t.tooltip.pricebookFontSize)}}var wy=(()=>{class i{constructor(){this.options=Ft,this.barcodeHeight=q(0),this.fontSize=q(0),this.barcode=q(!1),this.code=q(!1),this.price=q(!1),this.name=q(!1),this.moveProductName=q(!1),this.releaseDate=q(!1),this.discountVisible=q(!1),this.pricebookPrice=q(!1),this.pricebookFontSize=q(0),this.UOMVisible=q(!1),this.tooltip={barcodeHeight:"The height of the generated barcode in pixels",fontSize:"Change all font size (except price)",barcode:"Whether barcode is visible",code:"Whether variant code is visible",price:"Whether variant price is visible",name:"Whether variant name is visible",moveProductName:"Whether move variant name below variant code or below variant price",releaseDate:"Whether release data is visible",discountVisible:"Whether variant's sell price discount is visible",pricebookPrice:"Whether pricebook price is visible",pricebookFontSize:"Change font size for pricebook price",UOMVisible:"Whether UOM is visible"},this.storeService=z(ke),this.injector=z(Xe),this.destroyRef=z(Ye)}ngOnInit(){pt(this.storeService.paperConfiguration,{injector:this.injector}).pipe(Je(this.destroyRef),xe(t=>{this.barcodeHeight.set(t.BarcodeHeight),this.fontSize.set(t.ProductNameFontSize),this.barcode.set(t.BarcodeVisible),this.code.set(t.CodeVisible),this.price.set(t.PriceVisible),this.name.set(t.NameVisible),this.moveProductName.set(t.MoveProductNameOnTop),this.releaseDate.set(t.ShowReleasedDate),this.discountVisible.set(t.ShowPriceDiscount),this.pricebookPrice.set(t.PricebookVisible),this.pricebookFontSize.set(t.PricebookFontSize),this.UOMVisible.set(t.UOMNameVisible)})).subscribe()}onInputHandler(t,n){switch(console.log("value",t),n){case"barcodeHeight":this.barcodeHeight.set(parseFloat(t.replace("px",""))),this.storeService.onChangePaperConfiguration(D(v({},this.storeService.paperConfiguration()),{BarcodeHeight:this.barcodeHeight()}));break;case"fontSize":this.fontSize.set(parseFloat(t.replace("px",""))),this.storeService.onChangePaperConfiguration(D(v({},this.storeService.paperConfiguration()),{ProductNameFontSize:this.fontSize()}));break;case"barcode":this.barcode.set(!!t),this.storeService.onChangePaperConfiguration(D(v({},this.storeService.paperConfiguration()),{BarcodeVisible:this.barcode()}));break;case"code":this.code.set(!!t),this.storeService.onChangePaperConfiguration(D(v({},this.storeService.paperConfiguration()),{CodeVisible:this.code()}));break;case"price":this.price.set(!!t),this.storeService.onChangePaperConfiguration(D(v({},this.storeService.paperConfiguration()),{PriceVisible:this.price()}));break;case"name":this.name.set(!!t),this.storeService.onChangePaperConfiguration(D(v({},this.storeService.paperConfiguration()),{NameVisible:this.name()}));break;case"moveProductName":this.moveProductName.set(!!t),this.storeService.onChangePaperConfiguration(D(v({},this.storeService.paperConfiguration()),{MoveProductNameOnTop:this.moveProductName()}));break;case"releaseDate":this.releaseDate.set(!!t),this.storeService.onChangePaperConfiguration(D(v({},this.storeService.paperConfiguration()),{ShowReleasedDate:this.releaseDate()}));break;case"discountVisible":this.discountVisible.set(!!t),this.storeService.onChangePaperConfiguration(D(v({},this.storeService.paperConfiguration()),{ShowPriceDiscount:this.discountVisible()}));break;case"pricebookPrice":this.pricebookPrice.set(!!t),this.storeService.onChangePaperConfiguration(D(v({},this.storeService.paperConfiguration()),{PricebookVisible:this.pricebookPrice()}));break;case"pricebookFontSize":this.pricebookFontSize.set(parseFloat(t.replace("px",""))),this.storeService.onChangePaperConfiguration(D(v({},this.storeService.paperConfiguration()),{PricebookFontSize:this.pricebookFontSize()}));break;case"UOMVisible":this.UOMVisible.set(!!t),this.storeService.onChangePaperConfiguration(D(v({},this.storeService.paperConfiguration()),{UOMNameVisible:this.UOMVisible()}));break}}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275cmp=fe({type:i,selectors:[["app-barcode-view"]],standalone:!0,features:[_e],decls:114,vars:20,consts:[["barcodeHeightTemplate",""],["fontSizeTemplate",""],["barcodeTemplate",""],["codeTemplate",""],["priceTemplate",""],["nameTemplate",""],["moveProductNameTemplate",""],["releaseDateTemplate",""],["discountVisibleTemplate",""],["pricebookPriceTemplate",""],["pricebookFontSizeTemplate",""],[1,"table","table-bordered"],["for","barcode",1,"fs-2"],[1,"form-check","form-switch"],["id","barcode","name","barcode","role","switch","type","checkbox",1,"form-check-input","fs-2",3,"ngModelChange","checked","ngModel"],[1,"form-text","fst-italic","fw-normal","fs-2"],["for","code",1,"fs-2"],["id","code","name","code","role","switch","type","checkbox",1,"form-check-input","fs-2",3,"ngModelChange","checked","ngModel"],["for","price",1,"fs-2"],["id","price","name","price","role","switch","type","checkbox",1,"form-check-input","fs-2",3,"ngModelChange","ngModel"],["for","name",1,"fs-2"],["id","name","name","name","role","switch","type","checkbox",1,"form-check-input","fs-2",3,"ngModelChange","ngModel"],["for","moveProductName",1,"fs-2","d-inline-block","text-truncate"],["id","moveProductName","name","moveProductName","role","switch","type","checkbox",1,"form-check-input","fs-2",3,"ngModelChange","ngModel"],["for","releaseDate",1,"fs-2"],["id","releaseDate","name","releaseDate","role","switch","type","checkbox",1,"form-check-input","fs-2",3,"ngModelChange","ngModel"],["for","discountVisible",1,"fs-2"],["id","discountVisible","name","discountVisible","role","switch","type","checkbox",1,"form-check-input","fs-2",3,"ngModelChange","ngModel"],["for","pricebookPrice",1,"fs-2"],["id","pricebookPrice","name","pricebookPrice","role","switch","type","checkbox",1,"form-check-input","fs-2",3,"ngModelChange","ngModel"],[1,"fst-italic"]],template:function(n,r){if(n&1){let o=Ie();f(0,"table",11)(1,"tbody")(2,"tr")(3,"td")(4,"label",12),x(5,"Barcode"),m()(),f(6,"td")(7,"div",13)(8,"input",14),W("ngModelChange",function(a){return se(o),ae(r.onInputHandler(a,"barcode"))}),m()()(),f(9,"td")(10,"span",15),x(11),m()()(),f(12,"tr")(13,"td")(14,"label",16),x(15,"Code"),m()(),f(16,"td")(17,"div",13)(18,"input",17),W("ngModelChange",function(a){return se(o),ae(r.onInputHandler(a,"code"))}),m()()(),f(19,"td")(20,"span",15),x(21),m()()(),f(22,"tr")(23,"th")(24,"label",18),x(25,"Price"),m()(),f(26,"td")(27,"div",13)(28,"input",19),W("ngModelChange",function(a){return se(o),ae(r.onInputHandler(a,"price"))}),m()()(),f(29,"td")(30,"span",15),x(31),m()()(),f(32,"tr")(33,"td")(34,"label",20),x(35,"Name"),m()(),f(36,"td")(37,"div",13)(38,"input",21),W("ngModelChange",function(a){return se(o),ae(r.onInputHandler(a,"name"))}),m()()(),f(39,"td")(40,"span",15),x(41),m()()(),f(42,"tr")(43,"td")(44,"label",22),x(45,"Move Product Name"),m()(),f(46,"td")(47,"div",13)(48,"input",23),W("ngModelChange",function(a){return se(o),ae(r.onInputHandler(a,"moveProductName"))}),m()()(),f(49,"td")(50,"span",15),x(51),m()()(),f(52,"tr")(53,"td")(54,"label",24),x(55,"Release Date"),m()(),f(56,"td")(57,"div",13)(58,"input",25),W("ngModelChange",function(a){return se(o),ae(r.onInputHandler(a,"releaseDate"))}),m()()(),f(59,"td")(60,"span",15),x(61),m()()(),f(62,"tr")(63,"td")(64,"label",26),x(65,"Discount Visible"),m()(),f(66,"td")(67,"div",13)(68,"input",27),W("ngModelChange",function(a){return se(o),ae(r.onInputHandler(a,"discountVisible"))}),m()()(),f(69,"td")(70,"span",15),x(71),m()()(),f(72,"tr")(73,"td")(74,"label",26),x(75,"UOM Visible"),m()(),f(76,"td")(77,"div",13)(78,"input",27),W("ngModelChange",function(a){return se(o),ae(r.onInputHandler(a,"UOMVisible"))}),m()()(),f(79,"td")(80,"span",15),x(81),m()()(),f(82,"tr")(83,"td")(84,"label",28),x(85,"Pricebook Price"),m()(),f(86,"td")(87,"div",13)(88,"input",29),W("ngModelChange",function(a){return se(o),ae(r.onInputHandler(a,"pricebookPrice"))}),m()()(),f(89,"td")(90,"span",15),x(91),m()()()()(),le(92,cD,2,1,"ng-template",null,0,me)(94,dD,2,1,"ng-template",null,1,me)(96,uD,2,1,"ng-template",null,2,me)(98,pD,2,1,"ng-template",null,3,me)(100,hD,2,1,"ng-template",null,4,me)(102,fD,2,1,"ng-template",null,5,me)(104,mD,2,1,"ng-template",null,6,me)(106,gD,2,1,"ng-template",null,7,me)(108,yD,2,1,"ng-template",null,8,me)(110,vD,2,1,"ng-template",null,9,me)(112,bD,2,1,"ng-template",null,10,me)}n&2&&(y(8),P("checked",r.barcode())("ngModel",r.barcode()),y(3),I(r.tooltip.barcode),y(7),P("checked",r.code())("ngModel",r.code()),y(3),I(r.tooltip.code),y(7),P("ngModel",r.price()),y(3),I(r.tooltip.price),y(7),P("ngModel",r.name()),y(3),I(r.tooltip.name),y(7),P("ngModel",r.moveProductName()),y(3),I(r.tooltip.moveProductName),y(7),P("ngModel",r.releaseDate()),y(3),I(r.tooltip.releaseDate),y(7),P("ngModel",r.discountVisible()),y(3),I(r.tooltip.discountVisible),y(7),P("ngModel",r.UOMVisible()),y(3),I(r.tooltip.UOMVisible),y(7),P("ngModel",r.pricebookPrice()),y(3),I(r.tooltip.pricebookPrice))},dependencies:[ht,Wn,it,Dt,rt,Os],styles:[".col[_ngcontent-%COMP%]{padding:0!important}.fas[_ngcontent-%COMP%] .fa-info-circle[_ngcontent-%COMP%]{font-size:12px}table[_ngcontent-%COMP%] > tbody[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%] > td[_ngcontent-%COMP%]{vertical-align:middle}table[_ngcontent-%COMP%] > tbody[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%] > td[_ngcontent-%COMP%]:last-child{width:50%}"],changeDetection:0})}}return i})();function _D(i,e){if(i&1&&(f(0,"span",16),x(1),m()),i&2){let t=O();y(),I(t.tooltip.priceWithTax)}}function wD(i,e){if(i&1&&(f(0,"span",16),x(1),m()),i&2){let t=O();y(),I(t.tooltip.selectedTax)}}function xD(i,e){if(i&1&&(f(0,"span",16),x(1),m()),i&2){let t=O();y(),I(t.tooltip.currency)}}function CD(i,e){if(i&1&&(f(0,"span",16),x(1),m()),i&2){let t=O();y(),I(t.tooltip.fontSize)}}function SD(i,e){if(i&1&&(f(0,"span",16),x(1),m()),i&2){let t=O();y(),I(t.tooltip.outletPrice)}}var xy=(()=>{class i{constructor(){this.options=Ft,this.hasPriceTax=q(!1),this.selectedTax=q(""),this.taxType=q({}),this.currency=q(""),this.fontSize=q(0),this.outletPrice=q(""),this.tooltip={priceWithTax:"Tax is added to the product base price true",selectedTax:"Applied Tax ex: 100 + 10% = 110",currency:"The default currency",fontSize:"Change font size for price",outletPrice:"Price will be set according to the outlet price assigned when selected the outlet"},this.storeService=z(ke),this.destroyRef=z(Ye),this.injector=z(Xe),this.outlets=q([])}get taxs(){return this.storeService.taxs()}ngOnInit(){pt(this.storeService.paperConfiguration,{injector:this.injector}).pipe(Je(this.destroyRef),xe(o=>{this.hasPriceTax.set(o.PriceWithTax),this.selectedTax.set(o.TaxType&&o.TaxType.ID),this.currency.set(o.CurrencySymbol),this.fontSize.set(o.PriceFontSize),this.outletPrice.set(o.OutletID)})).subscribe();let t=this.storeService.paperConfig().Outlets,n=this.storeService.productItems(),r=t.filter(o=>n?n.some(s=>s.OutletPrice?.some(a=>a.Outlet===o.Name)):[]);this.outlets.set(r),pt(this.storeService.productItems,{injector:this.injector}).pipe(xe(o=>{let s=o.some(a=>a.Promotions);this.outletPrice.set(s?"":this.outletPrice())})).subscribe(),pt(this.outletPrice,{injector:this.injector}).pipe(Qt(o=>!!o),xe(()=>{let o=[...this.storeService.productItems().map(s=>D(v({},s),{Promotions:null}))];this.storeService.onChangeProductItems(o)})).subscribe()}onInputHandler(t,n){switch(n){case"hasPriceTax":this.hasPriceTax.set(!!t),this.storeService.onChangePaperConfiguration(D(v({},this.storeService.paperConfiguration()),{PriceWithTax:this.hasPriceTax()}));break;case"selectedTax":let r=this.storeService.taxs().findIndex(o=>o.ID===t);r!==-1&&(this.selectedTax.set(t),this.taxType.set(this.storeService.taxs()[r])),this.storeService.onChangePaperConfiguration(D(v({},this.storeService.paperConfiguration()),{TaxType:this.taxType()}));break;case"currency":this.currency.set(t),this.storeService.onChangePaperConfiguration(D(v({},this.storeService.paperConfiguration()),{CurrencySymbol:this.currency()}));break;case"fontSize":this.fontSize.set(parseFloat(t.replace("px",""))),this.storeService.onChangePaperConfiguration(D(v({},this.storeService.paperConfiguration()),{PriceFontSize:this.fontSize()}));break;case"outletPrice":if(this.outletPrice.set(t),this.storeService.onChangePaperConfiguration(D(v({},this.storeService.paperConfiguration()),{OutletID:this.outletPrice()})),this.storeService.paperConfiguration().OutletID){let o=[...this.storeService.productItems().map(s=>D(v({},s),{Promotions:null}))];this.storeService.onChangeProductItems(o)}break}}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275cmp=fe({type:i,selectors:[["app-price"]],standalone:!0,features:[_e],decls:49,vars:11,consts:[["priceWithTaxTemplate",""],["selectedTaxTemplate",""],["currencyTemplate",""],["fontSizeTemplate",""],["outletPriceTemplate",""],[1,"table","table-bordered"],["for","hasPriceTax",1,"fs-2","d-inline-block","text-truncate"],[1,"form-check","form-switch"],["id","hasPriceTax","name","hasPriceTax","role","switch","type","checkbox",1,"form-check-input","fs-2",3,"ngModelChange","checked","ngModel"],[1,"form-text","fst-italic","fw-normal","fs-2"],["for","selectedTax",1,"fs-2","d-inline-block","text-truncate"],["id","selectedTax","name","selectedTax","bindLabel","Name","bindValue","ID","placeholder","Select Column",1,"custom","w-100","fs-2",3,"ngModelChange","ngModel","items"],["for","currency",1,"fs-2","d-inline-block","text-truncate"],["id","currency","name","currency","type","text",1,"form-control","fs-2",3,"ngModelChange","ngModel"],["for","outletPrice",1,"fs-2","d-inline-block","text-truncate"],["id","outletPrice","name","outletPrice","bindLabel","Name","bindValue","ID","placeholder","Choose Outlet",1,"custom","w-100","fs-2",3,"ngModelChange","ngModel","items"],[1,"fst-italic"]],template:function(n,r){if(n&1){let o=Ie();f(0,"table",5)(1,"tbody")(2,"tr")(3,"td")(4,"label",6),x(5,"Price With Tax"),m()(),f(6,"td")(7,"div",7)(8,"input",8),W("ngModelChange",function(a){return se(o),ae(r.onInputHandler(a,"hasPriceTax"))}),m()()(),f(9,"td")(10,"span",9),x(11),m()()(),f(12,"tr")(13,"td")(14,"label",10),x(15,"Selected Tax"),m()(),f(16,"td")(17,"ng-select",11),W("ngModelChange",function(a){return se(o),ae(r.onInputHandler(a,"selectedTax"))}),m()(),f(18,"td")(19,"span",9),x(20),m()()(),f(21,"tr")(22,"td")(23,"label",12),x(24,"Currency"),m()(),f(25,"td")(26,"input",13),W("ngModelChange",function(a){return se(o),ae(r.onInputHandler(a,"currency"))}),m()(),f(27,"td")(28,"span",9),x(29),m()()(),f(30,"tr")(31,"th")(32,"label",14),x(33,"Outlet Price"),m()(),f(34,"td")(35,"ng-select",15),W("ngModelChange",function(a){return se(o),ae(r.onInputHandler(a,"outletPrice"))}),m()(),f(36,"td")(37,"span",9),x(38),m()()()()(),le(39,_D,2,1,"ng-template",null,0,me)(41,wD,2,1,"ng-template",null,1,me)(43,xD,2,1,"ng-template",null,2,me)(45,CD,2,1,"ng-template",null,3,me)(47,SD,2,1,"ng-template",null,4,me)}n&2&&(y(8),P("checked",r.hasPriceTax())("ngModel",r.hasPriceTax()),y(3),I(r.tooltip.priceWithTax),y(6),P("ngModel",r.selectedTax())("items",r.taxs),y(3),I(r.tooltip.selectedTax),y(6),P("ngModel",r.currency()),y(3),I(r.tooltip.currency),y(6),P("ngModel",r.outletPrice())("items",r.outlets()),y(3),I(r.tooltip.outletPrice))},dependencies:[ht,tt,Wn,it,Dt,rt,oi,_i],styles:["table[_ngcontent-%COMP%] > tbody[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%] > td[_ngcontent-%COMP%]{vertical-align:middle}table[_ngcontent-%COMP%] > tbody[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%] > td[_ngcontent-%COMP%]:last-child{width:50%}"],changeDetection:0})}}return i})();function PD(i,e){if(i&1&&(f(0,"span",21),x(1),m()),i&2){let t=O();y(),I(t.tooltip.maxCharacter)}}function ED(i,e){if(i&1&&(f(0,"span",21),x(1),m()),i&2){let t=O();y(),I(t.tooltip.namePrefix)}}function DD(i,e){if(i&1&&(f(0,"span",21),x(1),m()),i&2){let t=O();y(),I(t.tooltip.storeName)}}function kD(i,e){if(i&1&&(f(0,"span",21),x(1),m()),i&2){let t=O();y(),I(t.tooltip.orientation)}}function TD(i,e){if(i&1&&(f(0,"span",21),x(1),m()),i&2){let t=O();y(),I(t.tooltip.useDescriptionAsCode)}}function ID(i,e){if(i&1&&(f(0,"span",21),x(1),m()),i&2){let t=O();y(),I(t.tooltip.removeDefault)}}var Cy=(()=>{class i{constructor(){this.storeService=z(ke),this.fb=z(Yi),this.destroyRef=z(Ye),this.injector=z(Xe),this.tooltip={maxCharacter:"The max character of the product name",namePrefix:"A word, letter, or number placed before product name",storeName:"The name of the store",orientation:"Horizontal or vertical position store name label",useDescriptionAsCode:"Copy product description into product code",removeDefault:"Remove 'Default' label from product name"},this.maxCharacter=q(0),this.namePrefix=q(""),this.storeName=q(""),this.orientation=q(0),this.useDescriptionAsCode=q(!1),this.removeDefault=q(!1),this.options=Ft}ngOnInit(){this.initForm(),pt(this.storeService.paperConfiguration,{injector:this.injector}).pipe(Je(this.destroyRef),xe(t=>{this.maxCharacter.set(t.ProductNameMaxLength),this.namePrefix.set(t.ProductNamePrefix),this.storeName.set(t.StoreName),this.orientation.set(t.Orientation),this.useDescriptionAsCode.set(t.DescriptionAsCode),this.removeDefault.set(!1)})).subscribe(),this.form.valueChanges.pipe(Je(this.destroyRef),xe(t=>{let n=D(v({},this.storeService.paperConfiguration()),{ProductNameMaxLength:t.maxCharacter,ProductNamePrefix:t.namePrefix,StoreName:t.storeName,Orientation:t.orientation,DescriptionAsCode:!!t.useDescriptionAsCode});this.storeService.onChangePaperConfiguration(n);let o=["ProductNameMaxLength","ProductNamePrefix","StoreName","Orientation","DescriptionAsCode"].reduce((s,a)=>(a in this.storeService.paperConfiguration()&&(s[a]=this.storeService.paperConfiguration()[a]),s),{});console.log("filtered advanced",o)})).subscribe()}onInputHandler(t,n){switch(n){case"maxCharacter":this.maxCharacter.set(+t),this.storeService.onChangePaperConfiguration(D(v({},this.storeService.paperConfiguration()),{ProductNameMaxLength:this.maxCharacter()}));break;case"namePrefix":this.namePrefix.set(t),this.storeService.onChangePaperConfiguration(D(v({},this.storeService.paperConfiguration()),{ProductNamePrefix:this.namePrefix()}));break;case"storeName":this.storeName.set(t),this.storeService.onChangePaperConfiguration(D(v({},this.storeService.paperConfiguration()),{StoreName:this.storeName()}));break;case"orientation":this.orientation.set(+t),this.storeService.onChangePaperConfiguration(D(v({},this.storeService.paperConfiguration()),{Orientation:this.orientation()}));break;case"useDescriptionAsCode":this.useDescriptionAsCode.set(!!t),this.storeService.onChangePaperConfiguration(D(v({},this.storeService.paperConfiguration()),{DescriptionAsCode:this.useDescriptionAsCode()}));break;case"removeDefault":this.removeDefault.set(!!t);break}}initForm(){this.form=this.fb.group({maxCharacter:new nt(this.storeService.paperConfiguration().ProductNameMaxLength,[lt.required]),namePrefix:new nt(null,[lt.required]),storeName:new nt(null,[lt.required]),orientation:new nt(null,[lt.required]),useDescriptionAsCode:new nt(null,[lt.required]),removeDefault:new nt("0",[lt.required])}),this.form.patchValue({maxCharacter:this.storeService.paperConfiguration().ProductNameMaxLength,namePrefix:this.storeService.paperConfiguration().ProductNamePrefix,storeName:this.storeService.paperConfiguration().StoreName,orientation:this.storeService.paperConfiguration().Orientation,useDescriptionAsCode:Number(this.storeService.paperConfiguration().DescriptionAsCode).toString()})}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275cmp=fe({type:i,selectors:[["app-advanced"]],standalone:!0,features:[_e],decls:70,vars:15,consts:[["maxCharacterTemplate",""],["namePrefixTemplate",""],["storeNameTemplate",""],["orientationTemplate",""],["useDescriptionAsCodeTemplate",""],["removeDefaultTemplate",""],[1,"table","table-bordered"],["for","MaxCharacter",1,"fs-2","d-inline-block","text-truncate"],["id","maxCharacter","name","maxCharacter","type","text",1,"form-control","fs-2",3,"ngModelChange","ngModel"],[1,"form-text","fst-italic","fw-medium","fs-2"],["for","namePrefix",1,"fs-2","d-inline-block","text-truncate"],["name","namePrefix","type","text",1,"form-control","fs-2",3,"ngModelChange","ngModel"],["for","storeName",1,"fs-2","d-inline-block","text-truncate"],["id","storeName","name","storeName","type","text",1,"form-control","fs-2",3,"ngModelChange","ngModel"],["for","orientation",1,"fs-2","d-inline-block","text-truncate"],["id","orientation","name","orientation","bindLabel","Value","bindValue","Key","placeholder","Select Column",1,"custom","w-100","fs-2",3,"ngModelChange","ngModel","items"],["for","useDescriptionAsCode",1,"fs-2","d-inline-block","text-truncate"],[1,"form-check","form-switch"],["id","useDescriptionAsCode","name","barcode","role","switch","type","checkbox",1,"form-check-input","fs-2",3,"ngModelChange","checked","ngModel"],["for","removeDefault",1,"fs-2","d-inline-block","text-truncate"],["id","removeDefault","name","removeDefault","role","switch","type","checkbox",1,"form-check-input","fs-2",3,"ngModelChange","checked","ngModel"],[1,"fst-italic"]],template:function(n,r){if(n&1){let o=Ie();f(0,"table",6)(1,"tbody")(2,"tr")(3,"td")(4,"label",7),x(5,"Max Character"),m()(),f(6,"td")(7,"input",8),W("ngModelChange",function(a){return se(o),ae(r.onInputHandler(a,"maxCharacter"))}),m()(),f(8,"td")(9,"span",9),x(10),m()()(),f(11,"tr")(12,"td")(13,"label",10),x(14,"Name Prefix"),m()(),f(15,"td")(16,"input",11),W("ngModelChange",function(a){return se(o),ae(r.onInputHandler(a,"namePrefix"))}),m()(),f(17,"td")(18,"span",9),x(19),m()()(),f(20,"tr")(21,"td")(22,"label",12),x(23,"Store Name"),m()(),f(24,"td")(25,"input",13),W("ngModelChange",function(a){return se(o),ae(r.onInputHandler(a,"storeName"))}),m()(),f(26,"td")(27,"span",9),x(28),m()()(),f(29,"tr")(30,"th")(31,"label",14),x(32,"Orientation"),m()(),f(33,"td")(34,"ng-select",15),W("ngModelChange",function(a){return se(o),ae(r.onInputHandler(a,"orientation"))}),m()(),f(35,"td")(36,"span",9),x(37),m()()(),f(38,"tr")(39,"td")(40,"label",16),x(41,"Use description as code"),m()(),f(42,"td")(43,"div",17)(44,"input",18),W("ngModelChange",function(a){return se(o),ae(r.onInputHandler(a,"useDescriptionAsCode"))}),m()()(),f(45,"td")(46,"span",9),x(47),m()()(),f(48,"tr")(49,"td")(50,"label",19),x(51,'Remove "Default"'),m()(),f(52,"td")(53,"div",17)(54,"input",20),W("ngModelChange",function(a){return se(o),ae(r.onInputHandler(a,"removeDefault"))}),m()()(),f(55,"td")(56,"span",9),x(57),m()()()()(),le(58,PD,2,1,"ng-template",null,0,me)(60,ED,2,1,"ng-template",null,1,me)(62,DD,2,1,"ng-template",null,2,me)(64,kD,2,1,"ng-template",null,3,me)(66,TD,2,1,"ng-template",null,4,me)(68,ID,2,1,"ng-template",null,5,me)}n&2&&(y(7),P("ngModel",r.maxCharacter()),y(3),I(r.tooltip.maxCharacter),y(6),P("ngModel",r.namePrefix()),y(3),I(r.tooltip.namePrefix),y(6),P("ngModel",r.storeName()),y(3),I(r.tooltip.storeName),y(6),P("ngModel",r.orientation())("items",r.storeService.paperConfiguration().OrientationChoice),y(3),I(r.tooltip.orientation),y(7),P("checked",r.useDescriptionAsCode())("ngModel",r.useDescriptionAsCode()),y(3),I(r.tooltip.useDescriptionAsCode),y(7),P("checked",r.removeDefault())("ngModel",r.removeDefault()),y(3),I(r.tooltip.removeDefault))},dependencies:[rt,tt,Wn,it,oi,_i,ht,Dt],styles:["table[_ngcontent-%COMP%] > tbody[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%] > td[_ngcontent-%COMP%]{vertical-align:middle}table[_ngcontent-%COMP%] > tbody[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%] > td[_ngcontent-%COMP%]:last-child{width:50%}"],changeDetection:0})}}return i})();var Sy=(()=>{class i{transform(t,...n){let r=Number(t),o=Number(n[0]);return r*o/100+r}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275pipe=ts({name:"taxs",type:i,pure:!0,standalone:!0})}}return i})();var Py=De(Ic());var OD=["barcode"],FD=(i,e)=>e.VariantID,RD=i=>({"h-100":i}),Ge=i=>({"font-size.px":i});function MD(i,e){if(i&1&&(f(0,"div",3),ue(1,"canvas",12,0),m()),i&2){let t=O(2);y(),P("ngStyle",t.barcodeStyle)}}function AD(i,e){if(i&1&&(f(0,"span",5),x(1),m()),i&2){let t=O().$implicit,n=O();P("ngStyle",Ae(2,Ge,n.storeService.paperConfiguration().ProductNameFontSize)),y(),I(t.Code)}}function BD(i,e){if(i&1&&(f(0,"span",14),x(1),m()),i&2){let t=O(3);P("ngStyle",Ae(2,Ge,t.storeService.paperConfiguration().ProductNameFontSize)),y(),I(t.storeService.paperConfiguration().ProductNamePrefix)}}function ND(i,e){if(i&1&&(f(0,"div",6),le(1,BD,2,4,"span",13),f(2,"span",14),x(3),Ue(4,"slice"),m()()),i&2){let t=O().$implicit,n=O();y(),P("ngIf",n.storeService.paperConfiguration().ProductNamePrefix),y(),P("ngStyle",Ae(7,Ge,n.storeService.paperConfiguration().ProductNameFontSize)),y(),I(gl(4,3,t.Name,0,n.storeService.paperConfiguration().ProductNameMaxLength))}}function zD(i,e){if(i&1&&(f(0,"span",25),x(1),m()),i&2){let t=O(3);P("ngStyle",Ae(2,Ge,t.storeService.paperConfiguration().PriceFontSize)),y(),I(t.storeService.paperConfiguration().CurrencySymbol)}}function LD(i,e){if(i&1&&(f(0,"span"),x(1),m()),i&2){let t=O(2).$implicit;y(),ii("/",t.UOMName||"pcs","")}}function HD(i,e){if(i&1&&(f(0,"span",26),x(1),m()),i&2){let t=O(3);P("ngStyle",Ae(2,Ge,t.storeService.paperConfiguration().PriceFontSize)),y(),I(t.storeService.paperConfiguration().CurrencySymbol)}}function jD(i,e){if(i&1&&(f(0,"div",7)(1,"div",15)(2,"div",16),x(3),m(),f(4,"div",17),le(5,zD,2,4,"span",18),f(6,"span",19),x(7),Ue(8,"number"),m(),le(9,LD,2,1,"span",20),m()(),f(10,"div",15)(11,"div",21),x(12),m(),f(13,"div",22),le(14,HD,2,4,"span",23),f(15,"span",24),x(16),Ue(17,"number"),m()()()()),i&2){let t=O().$implicit,n=O();y(2),P("ngStyle",Ae(15,Ge,n.storeService.paperConfiguration().ProductNameFontSize)),y(),ii(" ",n.storeService.paperConfiguration().BasicPriceLabel," "),y(2),P("ngIf",n.storeService.paperConfiguration().CurrencySymbol),y(),P("ngStyle",Ae(17,Ge,n.storeService.paperConfiguration().PriceFontSize)),y(),I(ni(8,11,t.UnitPrice)),y(2),P("ngIf",n.storeService.paperConfiguration().UOMNameVisible),y(2),P("ngStyle",Ae(19,Ge,n.storeService.paperConfiguration().ProductNameFontSize)),y(),ii(" ",n.storeService.paperConfiguration().PromotionPriceLabel," "),y(2),P("ngIf",n.storeService.paperConfiguration().CurrencySymbol),y(),P("ngStyle",Ae(21,Ge,n.storeService.paperConfiguration().PriceFontSize)),y(),I(ni(17,13,n.promotionDiscount(t.Promotions)))}}function VD(i,e){if(i&1&&(f(0,"span",28),x(1),m()),i&2){let t=O(3);P("ngStyle",Ae(2,Ge,t.storeService.paperConfiguration().PriceFontSize)),y(),I(t.storeService.paperConfiguration().CurrencySymbol)}}function UD(i,e){if(i&1&&(f(0,"span",30),x(1),m()),i&2){let t=O(2).$implicit,n=O();P("ngStyle",Ae(2,Ge,n.storeService.paperConfiguration().PriceFontSize)),y(),ii("/",t.UOMName||"pcs","")}}function WD(i,e){if(i&1&&(f(0,"div",8),le(1,VD,2,4,"span",27),f(2,"span",28),x(3),Ue(4,"taxs"),Ue(5,"number"),m(),le(6,UD,2,4,"span",29),m()),i&2){let t=O().$implicit,n=O();y(),P("ngIf",n.storeService.paperConfiguration().CurrencySymbol),y(),P("ngStyle",Ae(9,Ge,n.storeService.paperConfiguration().PriceFontSize)),y(),I(ni(5,7,Ti(4,4,t.UnitPrice,n.taxRate))),y(3),P("ngIf",n.storeService.paperConfiguration().UOMNameVisible)}}function $D(i,e){if(i&1&&(f(0,"span",28),x(1),m()),i&2){let t=O(5);P("ngStyle",Ae(2,Ge,t.storeService.paperConfiguration().PriceFontSize)),y(),I(t.storeService.paperConfiguration().CurrencySymbol)}}function qD(i,e){if(i&1&&(f(0,"div",10),le(1,$D,2,4,"span",27),f(2,"span",28),x(3),Ue(4,"taxs"),Ue(5,"number"),m()()),i&2){let t=O().$implicit,n=O(3);y(),P("ngIf",n.storeService.paperConfiguration().CurrencySymbol),y(),P("ngStyle",Ae(8,Ge,n.storeService.paperConfiguration().PriceFontSize)),y(),I(ni(5,6,Ti(4,3,t.Price,n.taxRate)))}}function GD(i,e){if(i&1&&le(0,qD,6,10,"div",10),i&2){let t=e.$implicit,n=O(3);Ce(t.Outlet===n.storeService.outlet$().Name?0:-1)}}function XD(i,e){if(i&1&&Zt(0,GD,1,1,null,null,as),i&2){let t=O().$implicit;Jt(t.OutletPrice)}}function YD(i,e){if(i&1&&(f(0,"span",14),x(1),m()),i&2){let t=O(3);P("ngStyle",Ae(2,Ge,t.storeService.paperConfiguration().ProductNameFontSize)),y(),I(t.storeService.paperConfiguration().ProductNamePrefix)}}function KD(i,e){if(i&1&&(f(0,"div",9),le(1,YD,2,4,"span",13),f(2,"span",14),x(3),Ue(4,"slice"),m()()),i&2){let t=O().$implicit,n=O();y(),P("ngIf",n.storeService.paperConfiguration().ProductNamePrefix),y(),P("ngStyle",Ae(7,Ge,n.storeService.paperConfiguration().ProductNameFontSize)),y(),I(gl(4,3,t.Name,0,n.storeService.paperConfiguration().ProductNameMaxLength))}}function QD(i,e){if(i&1&&(f(0,"div",31)(1,"span",14),x(2),m()()),i&2){let t=O(3);y(),P("ngStyle",Ae(2,Ge,t.storeService.paperConfiguration().ProductNameFontSize)),y(),I(t.storeService.paperConfiguration().StoreName)}}function ZD(i,e){if(i&1&&(f(0,"div",32)(1,"span",14),x(2),m()()),i&2){let t=O(3);y(),P("ngStyle",Ae(2,Ge,t.storeService.paperConfiguration().ProductNameFontSize)),y(),I(t.storeService.paperConfiguration().StoreName)}}function JD(i,e){if(i&1&&le(0,QD,3,4,"div",31)(1,ZD,3,4,"div",32),i&2){let t=O(2);Ce(t.storeService.paperConfiguration().Orientation===0?0:1)}}function ek(i,e){if(i&1&&(f(0,"div",10)(1,"span",14),x(2),Ue(3,"date"),m()()),i&2){let t=O().$implicit,n=O();y(),P("ngStyle",Ae(5,Ge,n.storeService.paperConfiguration().ProductNameFontSize)),y(),I(Ti(3,2,t.ReleasedDate,"dd MMM yyyy"))}}function tk(i,e){if(i&1&&(f(0,"div",10)(1,"span",14),x(2),m()()),i&2){let t=O().$implicit,n=O();y(),P("ngStyle",Ae(2,Ge,n.storeService.paperConfiguration().ProductNameFontSize)),y(),ii("",t.PriceDiscount,"% Off")}}function ik(i,e){if(i&1&&(f(0,"span"),x(1),m(),f(2,"span"),x(3,"-"),m(),f(4,"span"),x(5),m(),f(6,"span"),x(7,"-"),m(),f(8,"span"),x(9),Ue(10,"number"),m()),i&2){let t=e.$implicit;y(),I(t.Name),y(4),I(t.MinimumQuantity),y(4),I(ni(10,3,t.UnitPrice))}}function nk(i,e){if(i&1&&(f(0,"div",11),Zt(1,ik,11,5,null,null,ls),m()),i&2){let t=O().$implicit,n=O();P("ngStyle",Ae(1,Ge,n.storeService.paperConfiguration().PricebookFontSize)),y(),Jt(t.Pricebook)}}function rk(i,e){if(i&1&&(f(0,"div",2),le(1,MD,3,1,"div",3),f(2,"div",4),le(3,AD,2,4,"span",5)(4,ND,5,9,"div",6)(5,jD,18,23,"div",7)(6,WD,7,11,"div",8)(7,XD,2,0)(8,KD,5,9,"div",9)(9,JD,2,1)(10,ek,4,7,"div",10)(11,tk,3,4,"div",10)(12,nk,3,3,"div",11),m()()),i&2){let t=e.$implicit,n=O();P("ngStyle",n.stickerStyles),y(),Ce(n.storeService.paperConfiguration().BarcodeVisible?1:-1),y(),P("ngClass",Ae(13,RD,!n.storeService.paperConfiguration().BarcodeVisible)),y(),Ce(n.storeService.paperConfiguration().CodeVisible?3:-1),y(),Ce(n.storeService.paperConfiguration().MoveProductNameOnTop&&n.storeService.paperConfiguration().NameVisible?4:-1),y(),Ce(t.Promotions&&n.storeService.paperConfiguration().PriceVisible?5:-1),y(),Ce(!t.Promotions&&!n.storeService.paperConfiguration().OutletID&&n.storeService.paperConfiguration().PriceVisible?6:-1),y(),Ce(n.storeService.paperConfiguration().OutletID&&n.storeService.paperConfiguration().PriceVisible?7:-1),y(),Ce(!n.storeService.paperConfiguration().MoveProductNameOnTop&&n.storeService.paperConfiguration().NameVisible?8:-1),y(),Ce(n.storeService.paperConfiguration().StoreName?9:-1),y(),Ce(n.storeService.paperConfiguration().ShowReleasedDate?10:-1),y(),Ce(n.storeService.paperConfiguration().ShowPriceDiscount?11:-1),y(),Ce(n.storeService.paperConfiguration().PricebookVisible?12:-1)}}var Za=(()=>{class i{constructor(){this.items=[],this.previewType="single",this.storeService=z(ke),this.Object=Object,this.cdr=z(cn),this.renderer=z(ns),this.elementsInitialized=!1,this.injector=z(Xe)}get barcodeContainerStyles(){let t=0;switch(this.storeService.paperSource()){case"Continuous - 3 Column":t=3;break;case"Continuous - 2 Column":t=2;break;case"Continuous - 1 Column":t=1;break;case"Tom & Jerry 107":t=3;break;case"Tom & Jerry 108":t=5;break}let n={display:"grid",gridTemplateColumns:`repeat(${t}, ${this.items.length===1?"1fr":this.storeService.paperConfiguration().StickerWidth}px)`,gridAutoRows:`${this.storeService.paperConfiguration().StickerHeight}px`,columnGap:`${this.storeService.paperConfiguration().ColumnSpacing}px`,rowGap:`${this.storeService.paperConfiguration().RowSpacing}px`,margin:`${this.storeService.paperConfiguration().MarginTop}px ${this.storeService.paperConfiguration().MarginLeft}px`,maxHeight:"100%",height:`${this.previewType==="single"?"90px":"100%"}`,width:`${this.previewType==="single"?"250px":this.storeService.paperConfiguration().PaperWidth+"px"}`};return console.log("style",n),n}get stickerStyles(){let t=this.storeService.paperConfiguration().StickerWidth,n=this.storeService.paperConfiguration().StickerHeight,r=this.items.length===1&&this.previewType==="single"?"250px":`${typeof t=="number"?t+"px":t}`,o=`${this.previewType==="single"?"90px":n+"px"}`;return{width:r,height:o,overflow:"hidden"}}get barcodeStyle(){return{width:"100%",height:`${this.previewType==="single"?"25px":this.storeService.paperConfiguration().BarcodeHeight+"px"}`}}get taxRate(){if(this.storeService.paperConfiguration().TaxType){let n=this.storeService.taxs().findIndex(r=>r.ID===this.storeService.paperConfiguration().TaxType.ID);if(n!==-1)return this.storeService.taxs()[n].Rate}return 0}get stickerStoreName(){let t={order:"4",lineHeight:"15px"},n={position:"absolute",right:"0",top:"0",transform:"translate(0%, 20%) rotate(270deg)"};return this.storeService.paperConfiguration().Orientation===0?t:n}ngOnInit(){}ngAfterViewInit(){this.elementsInitialized=!0}ngAfterViewChecked(){this.generateBarcodes(),this.elementsInitialized&&(this.generateBarcodes(),this.elementsInitialized=!1)}generateBarcodes(){this.storeService.expandProductItems().forEach((t,n)=>{let r=this.barcodeRef.get(n)?.nativeElement;r&&(0,Py.default)(r,t.Code,{format:"CODE128",lineColor:"#000",width:20,displayValue:!1})})}promotionDiscount(t){try{return Object.keys(t).length?t.Discount&&t.Discount>0?t.UnitPrice-t.UnitPrice*t.Discount/100:t.UnitPrice:0}catch(n){throw new Error("error: ",n)}}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275cmp=fe({type:i,selectors:[["app-barcode-preview"]],viewQuery:function(n,r){if(n&1&&yi(OD,5,Et),n&2){let o;ei(o=ti())&&(r.barcodeRef=o)}},inputs:{items:"items",previewType:"previewType"},standalone:!0,features:[_e],decls:3,vars:1,consts:[["barcode",""],["id","barcode-container",1,"barcode-container",3,"ngStyle"],[1,"sticker","position-relative","border","border-dark","d-flex","flex-column",3,"ngStyle"],[1,"sticker-header","d-flex","justify-content-center","px-1"],[1,"sticker-body","d-flex","flex-column","align-items-center","justify-content-center",3,"ngClass"],[1,"text-dark",2,"line-height","1",3,"ngStyle"],[2,"line-height","0.3","width","100%","text-align","center"],[1,"d-flex","flex-column",2,"line-height","1"],[1,"d-flex","align-items-baseline",2,"line-height","1"],[2,"line-height","0","width","100%","text-align","center"],[2,"line-height","1"],[1,"d-flex","gap-1",2,"line-height","1",3,"ngStyle"],["id","barcode",3,"ngStyle"],["class","text-dark",3,"ngStyle",4,"ngIf"],[1,"text-dark",3,"ngStyle"],[1,"d-flex","gap-2","align-items-center"],[1,"promotion__normalprice_label","text-dark","d-flex","justify-content-end",3,"ngStyle"],[1,"d-flex","gap-1","align-items-baseline"],["class","promotion__normalprice text-dark",3,"ngStyle",4,"ngIf"],[1,"promotion__normalprice","text-decoration-line-through","text-danger",3,"ngStyle"],[4,"ngIf"],[1,"promotion__price_label","text-dark","d-flex","justify-content-end",3,"ngStyle"],[1,"d-flex","gap-2"],["class","text-danger promotion__price text-dark",3,"ngStyle",4,"ngIf"],[1,"promotion__price","text-danger","text-dark",3,"ngStyle"],[1,"promotion__normalprice","text-dark",3,"ngStyle"],[1,"text-danger","promotion__price","text-dark",3,"ngStyle"],["class","price text-dark",3,"ngStyle",4,"ngIf"],[1,"price","text-dark",3,"ngStyle"],[3,"ngStyle",4,"ngIf"],[3,"ngStyle"],["id","store-name-horizontal",1,"",2,"line-height","1"],["id","store-name-vertical",1,"position-absolute",2,"line-height","1"]],template:function(n,r){n&1&&(f(0,"div",1),Zt(1,rk,13,15,"div",2,FD),m()),n&2&&(P("ngStyle",r.barcodeContainerStyles),y(),Jt(r.items))},dependencies:[yp,Sy,Vn,bp,ri,Xi,_p,fs],styles:["#barcode[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{height:100%}.storename[_ngcontent-%COMP%]{position:absolute;right:0;top:0;transform:translateY(20%) rotate(270deg)}#store-name-vertical[_ngcontent-%COMP%]{top:50%;right:0;transform:translateY(-50%) rotate(-90deg)}.sticker-body[_ngcontent-%COMP%]{width:100%;display:inline-flex}.sticker-body[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{line-height:.9!important}"],changeDetection:0})}}return i})();var Ey=(()=>{class i{constructor(){this.storeService=z(ke)}ngOnInit(){}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275cmp=fe({type:i,selectors:[["app-customize-label"]],standalone:!0,features:[_e],decls:58,vars:9,consts:[["scrollContainer",""],[1,"d-flex","flex-column","gap-3","h-100"],[1,"topbar","position-static"],[1,"d-flex","top-navbar","navbar-expand-lg",3,"ngClass"],["id","navbarSupportedContent",1,"navbar-collapse","collapse","m-0",3,"ngbCollapse"],[1,"w-100","d-flex","align-items-center","px-3"],[1,"navbar-nav","float-start","me-auto","h-100","d-flex","align-items-center"],[1,"nav-item","d-none","d-lg-block"],[1,"font-robotoslab","m-0"],[1,"navbar-nav","float-end","py-2"],[1,"d-flex","gap-2"],["type","button",1,"btn","btn-outline-secondary","d-flex","gap-1","align-items-center",3,"click"],[1,"f","fas","fa-angle-left"],[1,"fs-3"],[1,"f","fas","fa-angle-right"],[1,"row","mx-2","flex-grow-1","overflow-x-auto",2,"margin-bottom","1rem"],[1,"col-lg-6","col-md-6","d-flex","justify-content-center"],[1,"card","sticky-md-top",2,"height","fit-content"],[1,"card-body","d-flex","justify-content-center","align-items-center"],[3,"items"],[1,"col-lg-6","col-md-6"],[1,"card"],[1,"p-3"],[1,"card-title","mb-0","font-robotoslab",2,"font-size","16px"],[1,"card-body","border-top","p-1"],["ngbAccordion","",3,"closeOthers"],["ngbAccordionItem","",3,"collapsed"],["ngbAccordionHeader",""],["ngbAccordionButton",""],[1,"",2,"font-size","14px"],["ngbAccordionCollapse",""],["ngbAccordionBody","",1,"scroll-container"],[2,"font-size","14px"]],template:function(n,r){if(n&1){let o=Ie();f(0,"div",1)(1,"header",2)(2,"nav",3)(3,"div",4)(4,"div",5)(5,"ul",6)(6,"li",7)(7,"h3",8),x(8,"Customize Label"),m()()(),f(9,"ul",9)(10,"div",10)(11,"button",11),W("click",function(){return se(o),ae(r.storeService.onPrevStep())}),ue(12,"i",12),f(13,"span",13),x(14,"Back"),m()(),f(15,"button",11),W("click",function(){return se(o),ae(r.storeService.onNextStep())}),f(16,"span",13),x(17,"Next"),m(),ue(18,"i",14),m()()()()()()(),f(19,"div",15)(20,"div",16)(21,"div",17)(22,"div",18),ue(23,"app-barcode-preview",19),m()()(),f(24,"div",20)(25,"div",21)(26,"div",22)(27,"h4",23),x(28," Sticker Content "),m()(),f(29,"div",24)(30,"div",25)(31,"div",26)(32,"h2",27)(33,"button",28)(34,"span",29),x(35,"Barcode View"),m()()(),f(36,"div",30)(37,"div",31,0),ue(39,"app-barcode-view"),m()()(),f(40,"div",26)(41,"h2",27)(42,"button",28)(43,"span",32),x(44,"Price"),m()()(),f(45,"div",30)(46,"div",31,0),ue(48,"app-price"),m()()(),f(49,"div",26)(50,"h2",27)(51,"button",28)(52,"span",32),x(53,"Advanced"),m()()(),f(54,"div",30)(55,"div",31,0),ue(57,"app-advanced"),m()()()()()()()()()}n&2&&(y(),Lt("data-navbarbg",r.storeService.options().navbarbg),y(),P("ngClass",r.storeService.options().navbarbg=="skin6"?"navbar-light":"navbar-dark"),y(),P("ngbCollapse",!r.storeService.options().isCollapsed),Lt("data-navbarbg",r.storeService.options().navbarbg),y(20),P("items",r.storeService.expandProductItem()),y(7),P("closeOthers",!0),y(),P("collapsed",!1),y(9),P("collapsed",!0),y(9),P("collapsed",!0))},dependencies:[_s,xs,ws,Ps,Cs,Ss,tr,$n,Xi,wy,xy,Cy,Za],styles:[".scroll-container[_ngcontent-%COMP%]{overflow-y:auto;max-height:100vh}"],changeDetection:0})}}return i})();function ok(i,e){if(i&1&&(f(0,"ng-option",3),x(1),m()),i&2){let t=e.$implicit;P("value",t.Name),y(),I(t.Name)}}var Dy=(()=>{class i{onInputHandler(t,n){switch(n){case"paperWidth":this.paperWidth.set(parseFloat(t.replace("px",""))),this.storeService.onChangePaperConfiguration(D(v({},this.storeService.paperConfiguration()),{PaperWidth:this.paperWidth()}));break;case"stickerWidth":this.stickerWidth.set(parseFloat(t.replace("px",""))),this.storeService.onChangePaperConfiguration(D(v({},this.storeService.paperConfiguration()),{StickerWidth:this.stickerWidth()}));break;case"stickerHeight":this.stickerHeight.set(parseFloat(t.replace("px",""))),this.storeService.onChangePaperConfiguration(D(v({},this.storeService.paperConfiguration()),{StickerHeight:this.stickerHeight()}));break;case"barcodeHeight":this.barcodeHeight.set(parseFloat(t.replace("px",""))),this.storeService.onChangePaperConfiguration(D(v({},this.storeService.paperConfiguration()),{BarcodeHeight:this.barcodeHeight()}));break;case"fontSize":this.fontSize.set(parseFloat(t.replace("px",""))),this.storeService.onChangePaperConfiguration(D(v({},this.storeService.paperConfiguration()),{ProductNameFontSize:this.fontSize()}));break}}constructor(){this.options=Ft,this.storeService=z(ke),this.destroyRef=z(Ye),this.injector=z(Xe),this.paperWidth=q(0),this.stickerWidth=q(0),this.stickerHeight=q(0),this.paperSource=q(""),this.barcodeHeight=q(0),this.fontSize=q(0),this.tooltip={paperWidth:"The width of the paper",stickerWidth:"The width of the sticker",stickerHeight:"The height of the sticker",barcodeHeight:"The height of the generated barcode in pixels",fontSize:"Change all font size (except price)"}}ngOnInit(){pt(this.storeService.paperConfiguration,{injector:this.injector}).pipe(xe(t=>{this.paperWidth.set(t.PaperWidth),this.stickerWidth.set(t.StickerWidth),this.stickerHeight.set(t.StickerHeight),this.barcodeHeight.set(t.BarcodeHeight),this.fontSize.set(t.ProductNameFontSize)})).subscribe(),this.paperWidth.set(this.storeService.paperConfiguration().PaperWidth),this.stickerWidth.set(this.storeService.paperConfiguration().StickerWidth),this.stickerHeight.set(this.storeService.paperConfiguration().StickerHeight),this.paperSource.set(this.storeService.paperConfig().PaperFormats[0].Name),this.storeService.paperSource().length==0&&this.storeService.onChangePaperSource(this.storeService.paperConfig().PaperFormats[0].Name)}onChangePaperSource(t){let n=this.storeService.paperConfig().PaperFormats.findIndex(r=>r.Name===t);n!==-1&&(this.storeService.onChangePaperSource(this.storeService.paperConfig().PaperFormats[n].Name),this.storeService.onChangePaperConfiguration(this.storeService.paperConfig().PaperFormats[n]))}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275cmp=fe({type:i,selectors:[["app-pp-paper"]],standalone:!0,features:[_e],decls:58,vars:17,consts:[[1,"table","table-bordered"],["for","paperSource",1,"fs-2","d-inline-block","text-truncate"],["searchable","false","clearable","false","id","paperSource","name","paperSource","selecte","",1,"custom","w-100","fs-2",3,"ngModelChange","ngModel"],[3,"value"],[1,"form-text","fst-italic","fw-normal","fs-2"],["for","paperWidth",1,"fs-2","d-inline-block","text-truncate"],["id","paperWidth","name","paperWidth","type","text","inputmode","number",1,"form-control","fs-2",3,"ngModelChange","maskito","ngModel"],["for","stickerWidth",1,"fs-2","d-inline-block","text-truncate"],["name","stickerWidth","type","text","inputmode","number",1,"form-control","fs-2",3,"ngModelChange","maskito","ngModel"],["for","stickerHeight",1,"fs-2","d-inline-block","text-truncate"],["id","stickerHeight","name","stickerHeight","type","text","inputmode","number",1,"form-control","fs-2",3,"ngModelChange","maskito","ngModel"],["for","barcode",1,"fs-2"],["id","barcodeHeight","name","barcodeHeight","type","text",1,"form-control","fs-2",3,"ngModelChange","maskito","ngModel"],["for","fontSize",1,"fs-2","d-inline-block","text-truncate"],["id","fontSize","name","fontSize","type","text",1,"form-control","fs-2",3,"ngModelChange","maskito","ngModel"]],template:function(n,r){n&1&&(f(0,"table",0)(1,"tbody")(2,"tr")(3,"td")(4,"label",1),x(5,"Paper Source"),m()(),f(6,"td")(7,"ng-select",2),W("ngModelChange",function(s){return r.onChangePaperSource(s)}),Zt(8,ok,2,2,"ng-option",3,ls),m()(),f(10,"td")(11,"span",4),x(12),m()()(),f(13,"tr")(14,"td")(15,"label",5),x(16,"Paper Width"),m()(),f(17,"td")(18,"input",6),W("ngModelChange",function(s){return r.onInputHandler(s,"paperWidth")}),m()(),f(19,"td")(20,"span",4),x(21),m()()(),f(22,"tr")(23,"td")(24,"label",7),x(25,"Sticker Width"),m()(),f(26,"td")(27,"input",8),W("ngModelChange",function(s){return r.onInputHandler(s,"stickerWidth")}),m()(),f(28,"td")(29,"span",4),x(30),m()()(),f(31,"tr")(32,"th")(33,"label",9),x(34,"Sticker Height"),m()(),f(35,"td")(36,"input",10),W("ngModelChange",function(s){return r.onInputHandler(s,"stickerHeight")}),m()(),f(37,"td")(38,"span",4),x(39),m()()(),f(40,"tr")(41,"td")(42,"label",11),x(43,"Barcode Height"),m()(),f(44,"td")(45,"input",12),W("ngModelChange",function(s){return r.onInputHandler(s,"barcodeHeight")}),m()(),f(46,"td")(47,"span",4),x(48),m()()(),f(49,"tr")(50,"td")(51,"label",13),x(52,"Font Size"),m()(),f(53,"td")(54,"input",14),W("ngModelChange",function(s){return r.onInputHandler(s,"fontSize")}),m()(),f(55,"td")(56,"span",4),x(57),m()()()()()),n&2&&(y(7),P("ngModel",r.storeService.paperSource()),y(),Jt(r.storeService.paperConfig().PaperFormats),y(4),I(r.tooltip.paperWidth),y(6),P("maskito",r.options)("ngModel",r.paperWidth()),y(3),I(r.tooltip.paperWidth),y(6),P("maskito",r.options)("ngModel",r.stickerWidth()),y(3),I(r.tooltip.stickerWidth),y(6),P("maskito",r.options)("ngModel",r.stickerHeight()),y(3),I(r.tooltip.stickerHeight),y(6),P("maskito",r.options)("ngModel",r.barcodeHeight()),y(3),I(r.tooltip.barcodeHeight),y(6),P("maskito",r.options)("ngModel",r.fontSize()),y(3),I(r.tooltip.fontSize))},dependencies:[ht,tt,it,Dt,rt,oi,_i,As,Ji],styles:["table[_ngcontent-%COMP%] > tbody[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%] > td[_ngcontent-%COMP%]{vertical-align:middle}table[_ngcontent-%COMP%] > tbody[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%] > td[_ngcontent-%COMP%]:last-child{width:50%}"],changeDetection:0})}}return i})();function sk(i,e){if(i&1&&(f(0,"span",14),x(1),m()),i&2){let t=O();y(),I(t.tooltip.leftIndent)}}function ak(i,e){if(i&1&&(f(0,"span",14),x(1),m()),i&2){let t=O();y(),I(t.tooltip.topIndent)}}function lk(i,e){if(i&1&&(f(0,"span",14),x(1),m()),i&2){let t=O();y(),I(t.tooltip.rowSpacing)}}function ck(i,e){if(i&1&&(f(0,"span",14),x(1),m()),i&2){let t=O();y(),I(t.tooltip.columnSpacing)}}var ky=(()=>{class i{constructor(){this.options=Ft,this.tooltip={leftIndent:"The number of pixels appended before the first COLUMN",topIndent:"The number of pixels appended after the first ROW",rowSpacing:"The number of pixels between each ROW",columnSpacing:"The number of pixels between each COLUMN"},this.leftIndent=q(0),this.topIndent=q(0),this.rowSpacing=q(0),this.columnSpacing=q(0),this.storeService=z(ke),this.destroyRef=z(Ye),this.injector=z(Xe)}onInputHandler(t,n){switch(n){case"marginLeft":this.leftIndent.set(parseFloat(t.replace("px",""))),this.storeService.onChangePaperConfiguration(D(v({},this.storeService.paperConfiguration()),{MarginLeft:this.leftIndent()}));break;case"marginTop":this.topIndent.set(parseFloat(t.replace("px",""))),this.storeService.onChangePaperConfiguration(D(v({},this.storeService.paperConfiguration()),{MarginTop:this.topIndent()}));break;case"rowSpacing":this.rowSpacing.set(parseFloat(t.replace("px",""))),this.storeService.onChangePaperConfiguration(D(v({},this.storeService.paperConfiguration()),{RowSpacing:this.rowSpacing()}));break;case"columnSpacing":this.columnSpacing.set(parseFloat(t.replace("px",""))),this.storeService.onChangePaperConfiguration(D(v({},this.storeService.paperConfiguration()),{ColumnSpacing:this.columnSpacing()}));break}}ngOnInit(){pt(this.storeService.paperConfiguration,{injector:this.injector}).pipe(Je(this.destroyRef),xe(t=>{this.leftIndent.set(t.MarginLeft),this.topIndent.set(t.MarginTop),this.rowSpacing.set(t.RowSpacing),this.columnSpacing.set(t.ColumnSpacing)})).subscribe()}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275cmp=fe({type:i,selectors:[["app-pp-spacing"]],standalone:!0,features:[_e],decls:46,vars:12,consts:[["leftIndentTemplate",""],["topIndentTemplate",""],["rowSpacingTemplate",""],["columnSpacingTemplate",""],[1,"table","table-bordered"],["for","leftIndent",1,"fs-2","d-inline-block","text-truncate"],["id","leftIndent","name","leftIndent","type","text","inputmode","number",1,"form-control","fs-2",3,"ngModelChange","maskito","ngModel"],[1,"form-text","fst-italic","fs-2","fw-normal"],["for","topIndent",1,"fs-2","d-inline-block","text-truncate"],["id","topIndent","name","topIndent","type","text","inputmode","number",1,"form-control","fs-2",3,"ngModelChange","maskito","ngModel"],["for","rowSpacing",1,"fs-2","d-inline-block","text-truncate"],["id","rowSpacing","name","rowSpacing","type","text","inputmode","number",1,"form-control","fs-2",3,"ngModelChange","maskito","ngModel"],["for","columnSpacing",1,"fs-2","d-inline-block","text-truncate"],["id","columnSpacing","name","columnSpacing","type","text","inputmode","number",1,"form-control","fs-2",3,"ngModelChange","maskito","ngModel"],[1,"fst-italic"]],template:function(n,r){if(n&1){let o=Ie();f(0,"table",4)(1,"tbody")(2,"tr")(3,"td")(4,"label",5),x(5,"Left Indent"),m()(),f(6,"td")(7,"input",6),W("ngModelChange",function(a){return se(o),ae(r.onInputHandler(a,"marginLeft"))}),m()(),f(8,"td")(9,"span",7),x(10),m()()(),f(11,"tr")(12,"td")(13,"label",8),x(14,"Top Indent"),m()(),f(15,"td")(16,"input",9),W("ngModelChange",function(a){return se(o),ae(r.onInputHandler(a,"marginTop"))}),m()(),f(17,"td")(18,"span",7),x(19),m()()(),f(20,"tr")(21,"td")(22,"label",10),x(23,"Row Spacing"),m()(),f(24,"td")(25,"input",11),W("ngModelChange",function(a){return se(o),ae(r.onInputHandler(a,"rowSpacing"))}),m()(),f(26,"td")(27,"span",7),x(28),m()()(),f(29,"tr")(30,"th")(31,"label",12),x(32,"Column Spacing"),m()(),f(33,"td")(34,"input",13),W("ngModelChange",function(a){return se(o),ae(r.onInputHandler(a,"columnSpacing"))}),m()(),f(35,"td")(36,"span",7),x(37),m()()()()(),le(38,sk,2,1,"ng-template",null,0,me)(40,ak,2,1,"ng-template",null,1,me)(42,lk,2,1,"ng-template",null,2,me)(44,ck,2,1,"ng-template",null,3,me)}n&2&&(y(7),P("maskito",r.options)("ngModel",r.leftIndent()),y(3),I(r.tooltip.leftIndent),y(6),P("maskito",r.options)("ngModel",r.topIndent()),y(3),I(r.tooltip.topIndent),y(6),P("maskito",r.options)("ngModel",r.rowSpacing()),y(3),I(r.tooltip.rowSpacing),y(6),P("maskito",r.options)("ngModel",r.columnSpacing()),y(3),I(r.tooltip.columnSpacing))},dependencies:[ht,tt,it,Dt,rt,Ji,oi],styles:["table[_ngcontent-%COMP%] > tbody[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%] > td[_ngcontent-%COMP%]{vertical-align:middle}table[_ngcontent-%COMP%] > tbody[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%] > td[_ngcontent-%COMP%]:last-child{width:50%}"],changeDetection:0})}}return i})();function dk(i,e){if(i&1&&(f(0,"span",8),x(1),m()),i&2){let t=O();y(),I(t.tooltip.basicPriceLabel)}}function uk(i,e){if(i&1&&(f(0,"span",8),x(1),m()),i&2){let t=O();y(),I(t.tooltip.promotionPriceLabel)}}var Ty=(()=>{class i{constructor(){this.tooltip={basicPriceLabel:"Custom label normal price",promotionPriceLabel:"Custom label promotion price"},this.storeService=z(ke),this.destroyRef=z(Ye),this.injector=z(Xe),this.basicPriceLabel=q(""),this.promotionPriceLabel=q(""),this.options=Ft}ngOnInit(){pt(this.storeService.paperConfiguration,{injector:this.injector}).pipe(Je(this.destroyRef),xe(t=>{this.basicPriceLabel.set(t.BasicPriceLabel),this.promotionPriceLabel.set(t.PromotionPriceLabel)})).subscribe()}onInputHandler(t,n){switch(n){case"basicPriceLabel":this.basicPriceLabel.set(t),this.storeService.onChangePaperConfiguration(D(v({},this.storeService.paperConfiguration()),{BasicPriceLabel:this.basicPriceLabel()}));break;case"promotionPriceLabel":this.promotionPriceLabel.set(t),this.storeService.onChangePaperConfiguration(D(v({},this.storeService.paperConfiguration()),{PromotionPriceLabel:this.promotionPriceLabel()}));break}}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275cmp=fe({type:i,selectors:[["app-pp-label"]],standalone:!0,features:[_e],decls:24,vars:4,consts:[["basicPriceLabelTemplate",""],["promotionPriceLabelTemplate",""],[1,"table","table-bordered"],["for","normalPrice",1,"fs-2","d-inline-block","text-truncate"],["id","normalPrice","name","basicPriceLabel","type","text",1,"form-control","fs-2",3,"ngModelChange","ngModel"],[1,"form-text","fst-italic","fs-2","fw-normal"],["for","promotionPrice",1,"fs-2","d-inline-block","text-truncate"],["id","promotionPrice","name","promotionPriceLabel","type","text",1,"form-control","fs-1",3,"ngModelChange","ngModel"],[1,"fst-italic"]],template:function(n,r){if(n&1){let o=Ie();f(0,"table",2)(1,"tbody")(2,"tr")(3,"td")(4,"label",3),x(5,"Normal Price"),m()(),f(6,"td")(7,"input",4),W("ngModelChange",function(a){return se(o),ae(r.onInputHandler(a,"basicPriceLabel"))}),m()(),f(8,"td")(9,"span",5),x(10),m()()(),f(11,"tr")(12,"td")(13,"label",6),x(14,"Promotion Price"),m()(),f(15,"td")(16,"input",7),W("ngModelChange",function(a){return se(o),ae(r.onInputHandler(a,"promotionPriceLabel"))}),m()(),f(17,"td")(18,"span",5),x(19),m()()()()(),le(20,dk,2,1,"ng-template",null,0,me)(22,uk,2,1,"ng-template",null,1,me)}n&2&&(y(7),P("ngModel",r.basicPriceLabel()),y(3),I(r.tooltip.basicPriceLabel),y(6),P("ngModel",r.promotionPriceLabel()),y(3),I(r.tooltip.promotionPriceLabel))},dependencies:[ht,tt,it,Dt,rt],styles:["table[_ngcontent-%COMP%] > tbody[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%] > td[_ngcontent-%COMP%]{vertical-align:middle}table[_ngcontent-%COMP%] > tbody[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%] > td[_ngcontent-%COMP%]:last-child{width:50%}"],changeDetection:0})}}return i})();var Fy=De(Iy());function pk(i,e){if(i&1){let t=Ie();f(0,"tr")(1,"td")(2,"label",6),x(3,"Pricebook Font Size"),m()(),f(4,"td")(5,"input",7),W("ngModelChange",function(r){se(t);let o=O();return ae(o.onInputHandler(r,"pricebookFontSize"))}),m()(),f(6,"td")(7,"span",5),x(8),m()()()}if(i&2){let t=O();y(5),P("maskito",t.options)("ngModel",t.pricebookFontSize()),y(3),I(t.tooltip.pricebookFontSize)}}function hk(i,e){if(i&1&&(f(0,"span",8),x(1),m()),i&2){let t=O();y(),I(t.tooltip.pricebookFontSize)}}function fk(i,e){if(i&1&&(f(0,"span",8),x(1),m()),i&2){let t=O();y(),I(t.tooltip.fontSize)}}var Oy=(()=>{class i{constructor(){this.options=Ft,this.barcodeHeight=q(0),this.fontSize=q(0),this.barcode=q(!1),this.code=q(!1),this.price=q(!1),this.name=q(!1),this.moveProductName=q(!1),this.releaseDate=q(!1),this.discountVisible=q(!1),this.pricebookPrice=q(!1),this.pricebookFontSize=q(0),this.tooltip={fontSize:"Change font size for price",pricebookFontSize:"Change font size for pricebook price"},this.storeService=z(ke),this.injector=z(Xe),this.destroyRef=z(Ye)}ngOnInit(){pt(this.storeService.paperConfiguration,{injector:this.injector}).pipe(Je(this.destroyRef),xe(t=>{this.pricebookFontSize.set(t.PricebookFontSize),this.fontSize.set(t.PriceFontSize)})).subscribe()}onInputHandler(t,n){switch(console.log("value",t),n){case"pricebookFontSize":this.fontSize.set(parseFloat(t.replace("px",""))),this.storeService.onChangePaperConfiguration(D(v({},this.storeService.paperConfiguration()),{ProductNameFontSize:this.fontSize()}));break;case"fontSize":this.fontSize.set(parseFloat(t.replace("px",""))),this.storeService.onChangePaperConfiguration(D(v({},this.storeService.paperConfiguration()),{PriceFontSize:this.fontSize()}));break}}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275cmp=fe({type:i,selectors:[["app-price-fontsize"]],standalone:!0,features:[_e],decls:16,vars:4,consts:[["pricebookFontSizeTemplate",""],["fontSizeTemplate",""],[1,"table","table-bordered"],["for","fontSize",1,"fs-2","d-inline-block","text-truncate"],["id","fontSize","name","fontSize","type","text","inputmode","number",1,"form-control","fs-2",3,"ngModelChange","maskito","ngModel"],[1,"form-text","fst-italic","fs-2","fw-normal"],["for","pricebookFontSize",1,"fs-2","d-inline-block","text-truncate"],["id","pricebookFontSize","name","pricebookFontSize","type","text","inputmode","number",1,"form-control","fs-2",3,"ngModelChange","maskito","ngModel"],[1,"fst-italic"]],template:function(n,r){if(n&1){let o=Ie();f(0,"table",2)(1,"tbody"),le(2,pk,9,3,"tr"),f(3,"tr")(4,"td")(5,"label",3),x(6,"Font Size"),m()(),f(7,"td")(8,"input",4),W("ngModelChange",function(a){return se(o),ae(r.onInputHandler(a,"fontSize"))}),m()(),f(9,"td")(10,"span",5),x(11),m()()()()(),le(12,hk,2,1,"ng-template",null,0,me)(14,fk,2,1,"ng-template",null,1,me)}n&2&&(y(2),Ce(r.storeService.paperConfiguration().PricebookVisible?2:-1),y(6),P("maskito",r.options)("ngModel",r.fontSize()),y(3),I(r.tooltip.fontSize))},dependencies:[Ji,ri,ht,tt,it,Dt],styles:["table[_ngcontent-%COMP%] > tbody[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%] > td[_ngcontent-%COMP%]{vertical-align:middle}table[_ngcontent-%COMP%] > tbody[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%] > td[_ngcontent-%COMP%]:last-child{width:50%}"]})}}return i})();function mk(i,e){i&1&&(f(0,"button",14)(1,"span",13),x(2,"Next"),m(),ue(3,"i",33),m())}function gk(i,e){if(i&1){let t=Ie();f(0,"button",34),W("click",function(){se(t);let r=O();return ae(r.printBarcode())}),f(1,"span",13),x(2,"Print"),m()()}}var Ry=(()=>{class i{constructor(){this.storeService=z(ke),this.httpService=z(bi),this.toastr=z(Ts),this.destroyRef=z(Ye)}ngOnInit(){document.addEventListener("keydown",t=>{t instanceof KeyboardEvent&&t.key==="p"&&t.ctrlKey&&(t.preventDefault(),this.printBarcode())})}printBarcode(){let t=0;switch(this.storeService.paperSource()){case"Continuous - 3 Column":t=3;break;case"Continuous - 2 Column":t=2;break;case"Continuous - 1 Column":t=1;break;case"Tom & Jerry 107":t=3;break;case"Tom & Jerry 108":t=5;break}(0,Fy.default)({printable:"barcode-container",type:"html",css:"https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css",style:`
|
|
30
|
+
`,t={width:this.opts.width,height:this.opts.height};return p("button",{type:"button",className:e,style:t,onClick:()=>this.fileInputRef.click(),onDragOver:this.handleDragOver,onDragLeave:this.handleDragLeave,onDrop:this.handleDrop},this.renderHiddenFileInput(),p("div",{className:"uppy-DragDrop-inner"},i.renderArrowSvg(),this.renderLabel(),this.renderNote()))}install(){let{target:e}=this.opts;this.setPluginState({isDraggingOver:!1}),e&&this.mount(e,this)}uninstall(){this.unmount()}};Pr.VERSION=AE.version;var Au=class{onMount(e,t){this.options=v(v({},e),this.props),this.uppy.use(t,this.options),this.plugin=this.uppy.getPlugin(this.options.id)}handleChanges(e,t){e.uppy&&this.uppy!==e.uppy.previousValue&&e.uppy.previousValue!==void 0&&(this.uninstall(e.uppy.previousValue),this.uppy.use(t,this.options)),this.options=v(v({},this.options),this.props),this.plugin=this.uppy.getPlugin(this.options.id),e.props&&this.props!==e.props.previousValue&&e.props.previousValue!==void 0&&this.plugin.setOptions(v({},this.options))}uninstall(e=this.uppy){e.removePlugin(this.plugin)}},ay=(()=>{class i extends Au{constructor(t){super(),this.el=t,this.uppy=new dr,this.props={}}ngOnInit(){this.onMount({id:"angular:Dashboard",inline:!0,target:this.el.nativeElement},Mn)}ngOnChanges(t){this.handleChanges(t,Mn)}ngOnDestroy(){this.uninstall()}static{this.\u0275fac=function(n){return new(n||i)(He(Et))}}static{this.\u0275cmp=fe({type:i,selectors:[["uppy-dashboard"]],inputs:{uppy:"uppy",props:"props"},features:[pl,gi],decls:0,vars:0,template:function(n,r){},encapsulation:2,changeDetection:0})}}return i})();var ly=(()=>{class i{static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275mod=Nt({type:i})}static{this.\u0275inj=Bt({})}}return i})();function ce(i,e){if(!{}.hasOwnProperty.call(i,e))throw new TypeError("attempted to use private field on non-instance");return i}var zE=0;function Ot(i){return"__private_"+zE+++"_"+i}function LE(i){return new Error("Cancelled",{cause:i})}function cy(i){if(i!=null){var e;let t=()=>this.abort(i.reason);i.addEventListener("abort",t,{once:!0});let n=()=>{i.removeEventListener("abort",t)};(e=this.then)==null||e.call(this,n,n)}return this}var Yt=Ot("activeRequests"),wt=Ot("queuedHandlers"),Xt=Ot("paused"),An=Ot("pauseTimer"),_t=Ot("downLimit"),Bn=Ot("upperLimit"),Vi=Ot("rateLimitingTimer"),Xo=Ot("call"),Ui=Ot("queueNext"),zu=Ot("next"),Bu=Ot("queue"),Lu=Ot("dequeue"),Nu=Ot("resume"),Nn=Ot("increaseLimit"),Ka=class{constructor(e){Object.defineProperty(this,Lu,{value:WE}),Object.defineProperty(this,Bu,{value:UE}),Object.defineProperty(this,zu,{value:VE}),Object.defineProperty(this,Ui,{value:jE}),Object.defineProperty(this,Xo,{value:HE}),Object.defineProperty(this,Yt,{writable:!0,value:0}),Object.defineProperty(this,wt,{writable:!0,value:[]}),Object.defineProperty(this,Xt,{writable:!0,value:!1}),Object.defineProperty(this,An,{writable:!0,value:void 0}),Object.defineProperty(this,_t,{writable:!0,value:1}),Object.defineProperty(this,Bn,{writable:!0,value:void 0}),Object.defineProperty(this,Vi,{writable:!0,value:void 0}),Object.defineProperty(this,Nu,{writable:!0,value:()=>this.resume()}),Object.defineProperty(this,Nn,{writable:!0,value:()=>{if(ce(this,Xt)[Xt]){ce(this,Vi)[Vi]=setTimeout(ce(this,Nn)[Nn],0);return}ce(this,_t)[_t]=this.limit,this.limit=Math.ceil((ce(this,Bn)[Bn]+ce(this,_t)[_t])/2);for(let t=ce(this,_t)[_t];t<=this.limit;t++)ce(this,Ui)[Ui]();ce(this,Bn)[Bn]-ce(this,_t)[_t]>3?ce(this,Vi)[Vi]=setTimeout(ce(this,Nn)[Nn],2e3):ce(this,_t)[_t]=Math.floor(ce(this,_t)[_t]/2)}}),typeof e!="number"||e===0?this.limit=1/0:this.limit=e}run(e,t){return!ce(this,Xt)[Xt]&&ce(this,Yt)[Yt]<this.limit?ce(this,Xo)[Xo](e):ce(this,Bu)[Bu](e,t)}wrapSyncFunction(e,t){var n=this;return function(){for(var r=arguments.length,o=new Array(r),s=0;s<r;s++)o[s]=arguments[s];let a=n.run(()=>(e(...o),queueMicrotask(()=>a.done()),()=>{}),t);return{abortOn:cy,abort(){a.abort()}}}}wrapPromiseFunction(e,t){var n=this;return function(){for(var r=arguments.length,o=new Array(r),s=0;s<r;s++)o[s]=arguments[s];let a,l=new Promise((c,d)=>{a=n.run(()=>{let u,g;try{g=Promise.resolve(e(...o))}catch(h){g=Promise.reject(h)}return g.then(h=>{u?d(u):(a.done(),c(h))},h=>{u?d(u):(a.done(),d(h))}),h=>{u=LE(h)}},t)});return l.abort=c=>{a.abort(c)},l.abortOn=cy,l}}resume(){ce(this,Xt)[Xt]=!1,clearTimeout(ce(this,An)[An]);for(let e=0;e<this.limit;e++)ce(this,Ui)[Ui]()}pause(e){e===void 0&&(e=null),ce(this,Xt)[Xt]=!0,clearTimeout(ce(this,An)[An]),e!=null&&(ce(this,An)[An]=setTimeout(ce(this,Nu)[Nu],e))}rateLimit(e){clearTimeout(ce(this,Vi)[Vi]),this.pause(e),this.limit>1&&Number.isFinite(this.limit)&&(ce(this,Bn)[Bn]=this.limit-1,this.limit=ce(this,_t)[_t],ce(this,Vi)[Vi]=setTimeout(ce(this,Nn)[Nn],e))}get isPaused(){return ce(this,Xt)[Xt]}};function HE(i){ce(this,Yt)[Yt]+=1;let e=!1,t;try{t=i()}catch(n){throw ce(this,Yt)[Yt]-=1,n}return{abort:n=>{e||(e=!0,ce(this,Yt)[Yt]-=1,t?.(n),ce(this,Ui)[Ui]())},done:()=>{e||(e=!0,ce(this,Yt)[Yt]-=1,ce(this,Ui)[Ui]())}}}function jE(){queueMicrotask(()=>ce(this,zu)[zu]())}function VE(){if(ce(this,Xt)[Xt]||ce(this,Yt)[Yt]>=this.limit||ce(this,wt)[wt].length===0)return;let i=ce(this,wt)[wt].shift();if(i==null)throw new Error("Invariant violation: next is null");let e=ce(this,Xo)[Xo](i.fn);i.abort=e.abort,i.done=e.done}function UE(i,e){let t={fn:i,priority:e?.priority||0,abort:()=>{ce(this,Lu)[Lu](t)},done:()=>{throw new Error("Cannot mark a queued request as done: this indicates a bug")}},n=ce(this,wt)[wt].findIndex(r=>t.priority>r.priority);return n===-1?ce(this,wt)[wt].push(t):ce(this,wt)[wt].splice(n,0,t),t}function WE(i){let e=ce(this,wt)[wt].indexOf(i);e!==-1&&ce(this,wt)[wt].splice(e,1)}var Y4=Symbol("__queue");var Vu=De(io(),1),hy=De(dy(),1);var uy={strings:{compressingImages:"Compressing images...",compressedX:"Saved %{size} by compressing images"}};function py(i,e){if(!{}.hasOwnProperty.call(i,e))throw new TypeError("attempted to use private field on non-instance");return i}var $E=0;function qE(i){return"__private_"+$E+++"_"+i}var GE={quality:.6,limit:10},Yo=qE("RateLimitedQueue"),Qa=class extends bn{constructor(e,t){super(e,v(v({},GE),t)),Object.defineProperty(this,Yo,{writable:!0,value:void 0}),this.id=this.opts.id||"Compressor",this.type="modifier",this.defaultLocale=uy,py(this,Yo)[Yo]=new Ka(this.opts.limit),this.i18nInit(),this.prepareUpload=this.prepareUpload.bind(this),this.compress=this.compress.bind(this)}compress(e){return new Promise((t,n)=>{new hy.default(e,D(v({},this.opts),{success:t,error:n}))})}prepareUpload(e){return B(this,null,function*(){let t=0,n=[],r=py(this,Yo)[Yo].wrapPromiseFunction(s=>B(this,null,function*(){try{let a=yield this.compress(s.data),l=s.data.size-a.size;this.uppy.log(`[Image Compressor] Image ${s.id} compressed by ${(0,Vu.default)(l)}`),t+=l;let{name:c,type:d,size:u}=a,g=xi(c),_=`${xi(s.meta.name).name}.${g.extension}`;this.uppy.setFileState(s.id,D(v(v(v(v({},c&&{name:c}),g.extension&&{extension:g.extension}),d&&{type:d}),u&&{size:u}),{data:a,meta:D(v({},s.meta),{type:d,name:_})})),n.push(s)}catch(a){this.uppy.log(`[Image Compressor] Failed to compress ${s.id}:`,"warning"),this.uppy.log(a,"warning")}})),o=e.map(s=>{var a;let l=this.uppy.getFile(s);return this.uppy.emit("preprocess-progress",l,{mode:"indeterminate",message:this.i18n("compressingImages")}),l.isRemote||(l.data.type||(l.data=l.data.slice(0,l.data.size,l.type)),!((a=l.type)!=null&&a.startsWith("image/")))?Promise.resolve():r(l)});yield Promise.all(o),this.uppy.emit("compressor:complete",n),t>1024&&this.uppy.info(this.i18n("compressedX",{size:(0,Vu.default)(t)}),"info");for(let s of e){let a=this.uppy.getFile(s);this.uppy.emit("preprocess-complete",a)}})}install(){this.uppy.addPreProcessor(this.prepareUpload)}uninstall(){this.uppy.removePreProcessor(this.prepareUpload)}};var my=De(fy(),1);function XE(i,e){if(i&1&&(f(0,"small",5),x(1),m()),i&2){let t=O();y(),I(t.subtitle)}}function YE(i,e){if(i&1&&(f(0,"a",6),ue(1,"i",7),x(2," Download Template "),m()),i&2){let t=O();jn("top-58",t.subtitle),P("href",t.sampleUrl,is)}}function KE(i,e){if(i&1&&(hl(0),x(1),fl()),i&2){let t=O(2);y(),ii("- ",t.rowSummary().rowEmpty," empty in the CSV you uploaded")}}function QE(i,e){if(i&1&&(f(0,"div",4)(1,"h4",8),x(2,"CSV File Content Summary"),m(),ue(3,"hr"),f(4,"p",9),x(5),le(6,KE,2,1,"ng-container",10),m()()),i&2){let t=O();y(5),ii("",t.rowSummary().rowCount," rows found "),y(),P("ngIf",t.rowSummary().rowEmpty>0)}}var gy=(()=>{class i{static{this.sizes=["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"]}static{this.kilobyte=1024}constructor(){this.sampleUrl="",this.subtitle="",this.showSample=!0,this.showSubtitle=!0,this.uppyCoreConfiguration=ul(),this.dashboardPropsConfiguration=ul(),this.fileUploaded=new zt,this.fileUploadComplete=new zt,this.fileRemoved=new zt,this.onParser=new zt,this.multipleFilesUploaded=new zt,this.http=z(om),this.csvParser=z(rm),this.rowSummary=q({rowCount:0,rowEmpty:0}),this.file=q(null),this.multipleFiles=q([]),this.uppy=new dr({debug:!0,autoProceed:!0,allowMultipleUploadBatches:!1,restrictions:{allowedFileTypes:[".csv"],maxTotalFileSize:1e6}}).use(Qa,{mimeType:"image/jpeg",convertSize:1/0,convertTypes:["image/png"]}),this.dashboardProps={hideUploadButton:!0,height:350},yl(()=>this.uppy.setOptions(v({},this.uppyCoreConfiguration()))),yl(()=>this.dashboardProps=v(v({},this.dashboardProps),this.dashboardPropsConfiguration())),this.uppy.on("upload",(t,n)=>{let r=n[0]?.data;this.showSample=!1,this.showSubtitle=!1,console.log(t,n,r),this.fileUploaded.emit(r),this.file.set(n[0].data),my.default.parse(r,{skipEmptyLines:"greedy",header:!0,beforeFirstChunk:o=>{let s=o.split(/\r?\n/).slice(1);return s[s.length-1]===""&&s.pop(),this.rowSummary.update(a=>D(v({},a),{rowCount:s.length})),s.forEach(a=>{a.split(",").every(c=>c==="")&&this.rowSummary.update(c=>D(v({},c),{rowEmpty:c.rowEmpty+1}))}),o},error(o,s){console.log("ERROR",o,s)},complete:(o,s)=>{this.onParser.emit(o.data)}})}),this.uppy.on("complete",t=>{let n=t.successful?.map(o=>({file:o.data,id:o.id}))??[],r=t.successful[0]?.data;this.showSample=!1,this.showSubtitle=!1,console.log(r),this.fileUploadComplete.emit(r),this.multipleFilesUploaded.emit(n),this.file.set(r),this.multipleFiles.set(n)}),this.uppy.on("transloadit:upload",(t,n)=>{console.log(t,n)}),this.uppy.on("transloadit:result",(t,n)=>{console.log(t,n)}),this.uppy.on("file-removed",t=>{this.showSample=!0,this.showSubtitle=!0,this.file.set(null);let r=this.multipleFiles().filter(o=>o.id!=t.id);this.multipleFiles.set(r),this.fileRemoved.emit(t.id),this.rowSummary.set({rowCount:0,rowEmpty:0})})}formatFileSize(t,n=2){if(t===0)return"0 bytes";let r=Math.floor(Math.log(t)/Math.log(i.kilobyte));return`${(t/Math.pow(i.kilobyte,r)).toFixed(n)} ${i.sizes[r]}`}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275cmp=fe({type:i,selectors:[["POS-uppy"]],inputs:{sampleUrl:"sampleUrl",subtitle:"subtitle",uppyCoreConfiguration:[1,"uppyCoreConfiguration"],dashboardPropsConfiguration:[1,"dashboardPropsConfiguration"]},outputs:{fileUploaded:"fileUploaded",fileUploadComplete:"fileUploadComplete",fileRemoved:"fileRemoved",onParser:"onParser",multipleFilesUploaded:"multipleFilesUploaded"},standalone:!0,features:[_e],decls:5,vars:5,consts:[[1,"position-relative"],[3,"uppy","props"],["class","subtitle position-absolute",4,"ngIf"],["class","sample position-absolute","role","button",3,"top-58","href",4,"ngIf"],["role","alert",1,"alert","alert-warning","d-flex","flex-column","gap-2",2,"margin","1rem 0 0 0"],[1,"subtitle","position-absolute"],["role","button",1,"sample","position-absolute",3,"href"],[1,"fa-solid","fa-download","ms-3"],[1,"alert-heading"],[1,"fs-6","m-0"],[4,"ngIf"]],template:function(n,r){if(n&1&&(f(0,"div",0),ue(1,"uppy-dashboard",1),le(2,XE,2,1,"small",2)(3,YE,3,3,"a",3)(4,QE,7,2,"div",4),m()),n&2){let o;y(),P("uppy",r.uppy)("props",r.dashboardProps),y(),P("ngIf",r.subtitle&&r.showSubtitle),y(),P("ngIf",r.sampleUrl&&r.showSample),y(),Ce(r.file()&&((o=r.file())==null?null:o.type)==="text/csv"?4:-1)}},dependencies:[ly,ay,ri,Vn],styles:[".uppy-Dashboard-AddFiles-info{display:none!important} .uppy-Dashboard-AddFiles-list{flex:none;flex-direction:row;flex-wrap:wrap;justify-content:center;max-width:600px;margin-top:15px;padding-top:0;overflow-y:visible}.sample[_ngcontent-%COMP%], .subtitle[_ngcontent-%COMP%]{top:56%;width:100%;text-align:center}.top-58[_ngcontent-%COMP%]{top:61%}"]})}}return i})();var yy=(()=>{class i{constructor(){this.file=null,this.sample_URL="https://res.cloudinary.com/pos/raw/upload/POS/CSV/Barcode_DealPOS.csv",this.fb=z(Yi),this.httpService=z(bi),this.destroyRef=z(Ye),this.activeModal=z(Es)}ngOnInit(){this.form=this.fb.group({file:new nt("",[lt.required])})}onSelectFile(t){t instanceof File&&(this.file=t)}onOK(){let t=`https://${localStorage.getItem("Domain")}`;if(this.file){let n=new FormData;n.append("file",this.file,this.file.name),n.append("OutletID",""),this.httpService.postFormData("API/catalog/product/UploadCSVforBarcode",n,void 0,t).pipe(Je(this.destroyRef)).subscribe({next:r=>{this.activeModal.close(r)}})}}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275cmp=fe({type:i,selectors:[["app-dialog-import-product"]],standalone:!0,features:[_e],decls:2,vars:2,consts:[["title","Upload New Product Barcode?",3,"onOK","hasValid"],[3,"fileUploaded","sampleUrl"]],template:function(n,r){n&1&&(f(0,"app-base-modal",0),W("onOK",function(){return r.onOK()}),f(1,"POS-uppy",1),W("fileUploaded",function(s){return r.onSelectFile(s)}),m()()),n&2&&(P("hasValid",r.form.valid),y(),P("sampleUrl",r.sample_URL))},dependencies:[Ds,rt,gy],styles:["pos-uppy div div h4{font-size:14px;margin:0} pos-uppy div div hr{margin:0!important} pos-uppy div div p.fs-6{font-size:1rem!important}"]})}}return i})();var vy=()=>{let i=new Date().getTime();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var t=Math.random()*16;return t=(i+t)%16|0,i=Math.floor(i/16),(e==="x"?t:t&3|8).toString(16)})};var ZE=(i,e)=>e.VariantID;function JE(i,e){if(i&1&&(f(0,"span",46),x(1),Ue(2,"maskito"),m()),i&2){let t=O(2).$implicit,n=O();y(),I(Ti(2,1,n.promotionDiscount(t.Promotions),n.options))}}function eD(i,e){if(i&1&&(f(0,"div",37)(1,"span",44),x(2),Ue(3,"maskito"),m(),le(4,JE,3,4,"span",45),m()),i&2){let t,n=O().$implicit,r=O();y(2),I(Ti(3,2,(t=n.UnitPrice)!==null&&t!==void 0?t:n.Promotions.UnitPrice,r.options)),y(2),P("ngIf",n.Promotions)}}function tD(i,e){if(i&1&&(f(0,"div",37)(1,"span"),x(2),Ue(3,"maskito"),m()()),i&2){let t=O(2).$implicit,n=O();y(2),I(Ti(3,1,t.Print[0].UnitPrice,n.options))}}function iD(i,e){if(i&1&&(f(0,"div",37)(1,"span"),x(2),Ue(3,"maskito"),m()()),i&2){let t=O(2).$implicit,n=O();y(2),I(Ti(3,1,t.UnitPrice,n.options))}}function nD(i,e){if(i&1&&le(0,tD,4,4,"div",37)(1,iD,4,4,"div",37),i&2){let t=O().$implicit;Ce(t.Print&&t.Print.length>0?0:1)}}function rD(i,e){i&1&&ue(0,"i",40)}function oD(i,e){i&1&&ue(0,"i",41)}function sD(i,e){if(i&1){let t=Ie();f(0,"tr")(1,"td"),x(2),m(),f(3,"td"),x(4),m(),f(5,"td"),x(6),Ue(7,"number"),m(),f(8,"td"),le(9,eD,5,5,"div",37)(10,nD,2,1),m(),f(11,"td")(12,"div",38)(13,"button",39),W("click",function(){let r=se(t).$implicit,o=O();return ae(o.onToggleSelected(r))}),le(14,rD,1,0,"i",40)(15,oD,1,0,"i",41),m(),f(16,"button",42),W("click",function(){let r=se(t).$implicit,o=O();return ae(o.onRemoveItem(r))}),ue(17,"i",43),m()()()()}if(i&2){let t=e.$implicit,n=O();y(2),I(t.Name),y(2),I(t.Code),y(2),I(ni(7,6,t.Quantity)),y(3),Ce(t.Promotions?9:10),y(5),Ce(t.isSelected&&n.productEdit?14:15),y(2),P("disabled",t.isSelected&&n.productEdit)}}var by=(()=>{class i{constructor(){this.productItems=[],this.storeService=z(ke),this.Object=Object,this.options=ar({precision:2,thousandSeparator:","}),this.modalService=z(Ip),this.httpService=z(bi),this.router=z(Un),this.route=z(ms)}ngOnInit(){}onNext(){this.storeService.onNextStep(),this.storeService.productItems().length>0&&(this.storeService.stepperRef().selected.completed=!0,this.storeService.stepperRef().next())}onOpenModalChooseProduct(){return B(this,null,function*(){let n=yield this.modalService.open(ia,{centered:!0}).result;if(n){let r=[...this.storeService.productItems()],o=r.findIndex(a=>a.ID===n.ID);o!==-1?r[o].Quantity+=n.Quantity:r.push(n);let s=[...r];this.storeService.onChangeProductItems(s),vl.production||localStorage.setItem("productItems",JSON.stringify(s))}})}onOpenModalEdit(t){return B(this,null,function*(){let n=this.modalService.open(ia,{centered:!0,scrollable:!0});n.componentInstance.data=t;try{let r=yield n.result;if(r){let o=[...this.storeService.productItems()],s=o.findIndex(l=>l.ID===r.ID);s!==-1?o[s]=r:o.push(r);let a=[...o];this.storeService.onChangeProductItems(a),vl.production||localStorage.setItem("productItems",JSON.stringify(a))}}catch{}})}ngAfterViewInit(){this.productItems=this.storeService.productItems().map(t=>D(v({},t),{isSelected:!1}))}onToggleSelected(t){let n=[...this.storeService.productItems()],r=n.findIndex(o=>Object.prototype.hasOwnProperty.call(o,"VariantID")?o.VariantID===t.VariantID:o.ID===t.ID);r!==-1?n[r].checked=!0:n.forEach(o=>o.checked=!1),this.router.navigate(["/pages"],{queryParams:{id:n[r].checked?Object.prototype.hasOwnProperty.call(n[r],"VariantID")?t.VariantID:t.ID:null}})}onOpenDialogImportProduct(){return B(this,null,function*(){let n=yield this.modalService.open(yy,{scrollable:!0,centered:!0}).result,r=[...this.storeService.productItems()];n.forEach(o=>{r.push(D(v({},o),{Uuid:vy(),ID:o.VariantID,Promotions:o.Print[0].IsDiscounted?D(v({},o.Print[0]),{UnitPrice:o.Print[0].UnitPriceDiscounted}):{},UnitPrice:o.Print[0].UnitPrice}))}),this.storeService.onChangeProductItems(r),console.log("result",n)})}onOpenDialogLoadTransaction(){return B(this,null,function*(){let n=yield this.modalService.open(em,{scrollable:!0,centered:!0}).result,o=`https://${localStorage.getItem("Domain")}`;if(console.log("result",n),n!==void 0)switch(n.role){case"ok":let s={Number:n.data.number,Outlet:n.data.outlet},a=n.data.type===0?"/api/v3/Barcode/ByBillNumber":"/api/v3/Barcode/ByOutletDeliveryNumber";this.httpService.post(a,s,void 0,o).pipe(Kt(l=>l.map(c=>D(v({},c),{checked:!1}))),xe(l=>{let c=[...this.storeService.productItems()];l.forEach(d=>{let u=c.findIndex(g=>g.VariantID===d.VariantID);u!==-1?c[u].Quantity+=d.Quantity:c.push(d)}),this.storeService.onChangeProductItems(c)})).subscribe();break}})}onRemoveItem(t){let r=[...this.storeService.productItems()].filter(o=>o.VariantID!==t.VariantID);this.storeService.onChangeProductItems(r)}onActivate(t){return B(this,null,function*(){t.type==="click"&&(yield this.onOpenModalEdit(t.row))})}promotionDiscount(t){try{return Object.keys(t).length?t.Discount&&t.Discount>0?t.UnitPrice-t.UnitPrice*t.Discount/100:t.UnitPrice:0}catch(n){throw new Error("error: ",n)}}onClear(){this.storeService.onChangeProductItems([])}get productEdit(){return this.route.snapshot.queryParamMap.has("id")}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275cmp=fe({type:i,selectors:[["choose-product"]],viewQuery:function(n,r){if(n&1&&yi(Xp,5),n&2){let o;ei(o=ti())&&(r.verticalSidebar=o.first)}},standalone:!0,features:[_e],decls:58,vars:5,consts:[[1,"d-flex","flex-column","gap-3","h-100"],[1,"topbar","position-static"],[1,"d-flex","top-navbar","navbar-expand-lg",3,"ngClass"],["id","navbarSupportedContent",1,"navbar-collapse","collapse","m-0",3,"ngbCollapse"],[1,"w-100","d-flex","align-items-center","px-3"],[1,"navbar-nav","float-start","me-auto","h-100","d-flex","align-items-center"],[1,"nav-item","d-none","d-lg-block"],[1,"font-robotoslab","m-0"],[1,"navbar-nav","float-end","py-2"],[1,"d-flex","gap-2"],[1,"btn-group"],["ngbDropdown","","placement","bottom-end",1,"btn-group"],["type","button",1,"btn","btn-outline-secondary","text-dark","d-flex","gap-2","align-items-baseline",3,"click"],[1,"fa-solid","fa-upload","fs-3"],[1,"fs-3"],["type","button","ngbDropdownToggle","",1,"btn","btn-outline-secondary","dropdown-toggle-split"],["ngbDropdownMenu","","aria-labelledby","dropdownBasic1"],["ngbDropdownItem","",1,"dropdown-item","text-dark","d-flex","gap-2","align-items-baseline",3,"click"],[1,"fa-regular","fa-file-lines","fs-3"],[1,"fa-solid","fa-trash","fs-3"],["type","button",1,"btn","btn-outline-secondary","d-flex","gap-1","align-items-center",3,"click","disabled"],[1,"f","fas","fa-angle-right"],[1,"mx-3","flex-grow-1"],[1,"row"],[1,"col-8"],[1,"container",2,"padding-left","2px","padding-right","0px"],[1,"card","h-100"],[1,"card-body",2,"padding","0.8rem","height","calc(100vh - 100px)"],[1,"table-responsive",2,"max-height","100%","height","100%","overflow-y","auto"],[1,"table"],[2,"position","sticky","top","0","background-color","white","border","1px solid rgba(0, 0, 0, 0.12)","z-index","1"],["scope","col"],["scope","col",2,"width","10%"],["scope","col",1,"text-end",2,"width","10%"],[1,"col"],[1,"card"],[1,"card-body",2,"padding","0.8rem"],[1,"d-flex","flex-column","text-end"],[1,"w-100","d-flex","justify-content-end","align-items-center"],["type","button",1,"btn","btn-link",3,"click"],[1,"fa-solid","fa-check","fs-5","text-primary"],[1,"fa-solid","fa-pen-to-square","fs-5"],["type","button",1,"btn","btn-link",3,"click","disabled"],[1,"fas","fa-trash","me-1","text-danger","fs-5"],[1,"text-decoration-line-through","text-danger"],["class","text-dark",4,"ngIf"],[1,"text-dark"]],template:function(n,r){n&1&&(f(0,"div",0)(1,"header",1)(2,"nav",2)(3,"div",3)(4,"div",4)(5,"ul",5)(6,"li",6)(7,"h3",7),x(8,"Choose Product"),m()()(),f(9,"ul",8)(10,"div",9)(11,"div",10)(12,"div",11)(13,"button",12),W("click",function(){return r.onOpenDialogImportProduct()}),ue(14,"i",13),f(15,"span",14),x(16,"Upload"),m()(),ue(17,"button",15),f(18,"div",16)(19,"button",17),W("click",function(){return r.onOpenDialogLoadTransaction()}),ue(20,"i",18),f(21,"span",14),x(22,"Load Transaction"),m()(),f(23,"button",17),W("click",function(){return r.onClear()}),ue(24,"i",19),f(25,"span",14),x(26,"Clear"),m()()()()(),f(27,"button",20),W("click",function(){return r.onNext()}),f(28,"span",14),x(29,"Next"),m(),ue(30,"i",21),m()()()()(),x(31,' " '),m()(),f(32,"div",22)(33,"div",23)(34,"div",24)(35,"div",25)(36,"div",26)(37,"div",27)(38,"div",28)(39,"table",29)(40,"thead",30)(41,"tr")(42,"th",31),x(43,"Name"),m(),f(44,"th",31),x(45,"Code"),m(),f(46,"th",32),x(47,"Qty"),m(),f(48,"th",33),x(49," Price "),m(),ue(50,"th",32),m()(),f(51,"tbody"),Zt(52,sD,18,8,"tr",null,ZE),m()()()()()()(),f(54,"div",34)(55,"div",35)(56,"div",36),ue(57,"modal-choose-product"),m()()()()()()),n&2&&(y(),Lt("data-navbarbg",r.storeService.options().navbarbg),y(),P("ngClass",r.storeService.options().navbarbg=="skin6"?"navbar-light":"navbar-dark"),y(),P("ngbCollapse",!r.storeService.options().isCollapsed),Lt("data-navbarbg",r.storeService.options().navbarbg),y(24),P("disabled",r.storeService.productItems().length<=0),y(25),Jt(r.storeService.productItems()))},dependencies:[ri,Xi,Vn,fs,Tp,Ep,Pp,Dp,kp,$n,Ff,nm,ia],styles:[".dropdown-toggle:after{display:inline-block!important}[_nghost-%COMP%] .ngx-datatable.fixed-header .datatable-header .datatable-header-inner .datatable-header-cell{background:#f6f6f6!important;font-weight:600;font-size:14px;color:#3b3b3b}[_nghost-%COMP%] .ngx-datatable .datatable-body{border:none}[_nghost-%COMP%] .ngx-datatable.material{border:none}[_ngcontent-%COMP%]:hover .ngx-datatable.material .datatable-header{border:1px solid rgba(0,0,0,.12)}[_nghost-%COMP%] .ngx-datatable.material .datatable-body .datatable-body-row .datatable-body-cell{display:flex;align-items:center;font-size:12px}[_nghost-%COMP%] .ngx-datatable.material .datatable-body .datatable-body-row .datatable-body-cell .datatable-body-cell-label{width:100%}[_nghost-%COMP%] .ngx-datatable.material .empty-row{font-size:12px}table[_ngcontent-%COMP%] > thead[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%] > th[_ngcontent-%COMP%]{background:#f6f6f6!important;font-weight:600;font-size:14px;color:#3b3b3b}table[_ngcontent-%COMP%] > thead[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%]{border:1px solid rgba(0,0,0,.12)}table[_ngcontent-%COMP%] > tbody[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%] > td[_ngcontent-%COMP%]{font-weight:400;font-size:12px;vertical-align:middle}.dropdown-item[_ngcontent-%COMP%]:hover{background-color:#ddd;color:#333}.dropdown-menu.show[_ngcontent-%COMP%]{padding:.5rem 0}"],changeDetection:0})}}return i})();var Ko="px",_y=ar({postfix:Ko,min:0,thousandSeparator:""}),{plugins:aD}=_y,lD=Ln(_y,["plugins"]),Ft=D(v({},lD),{plugins:[...aD,Tf(i=>[0,i.length-Ko.length]),sr("focus",i=>{i.setSelectionRange(0,i.value.length-Ko.length)}),sr("blur",i=>{i.value===Ko&&nr(i,`0${Ko}`)})]});function cD(i,e){if(i&1&&(f(0,"span",30),x(1),m()),i&2){let t=O();y(),I(t.tooltip.barcodeHeight)}}function dD(i,e){if(i&1&&(f(0,"span",30),x(1),m()),i&2){let t=O();y(),I(t.tooltip.fontSize)}}function uD(i,e){if(i&1&&(f(0,"span",30),x(1),m()),i&2){let t=O();y(),I(t.tooltip.barcode)}}function pD(i,e){if(i&1&&(f(0,"span",30),x(1),m()),i&2){let t=O();y(),I(t.tooltip.code)}}function hD(i,e){if(i&1&&(f(0,"span",30),x(1),m()),i&2){let t=O();y(),I(t.tooltip.price)}}function fD(i,e){if(i&1&&(f(0,"span",30),x(1),m()),i&2){let t=O();y(),I(t.tooltip.name)}}function mD(i,e){if(i&1&&(f(0,"span",30),x(1),m()),i&2){let t=O();y(),I(t.tooltip.moveProductName)}}function gD(i,e){if(i&1&&(f(0,"span",30),x(1),m()),i&2){let t=O();y(),I(t.tooltip.releaseDate)}}function yD(i,e){if(i&1&&(f(0,"span",30),x(1),m()),i&2){let t=O();y(),I(t.tooltip.discountVisible)}}function vD(i,e){if(i&1&&(f(0,"span",30),x(1),m()),i&2){let t=O();y(),I(t.tooltip.pricebookPrice)}}function bD(i,e){if(i&1&&(f(0,"span",30),x(1),m()),i&2){let t=O();y(),I(t.tooltip.pricebookFontSize)}}var wy=(()=>{class i{constructor(){this.options=Ft,this.barcodeHeight=q(0),this.fontSize=q(0),this.barcode=q(!1),this.code=q(!1),this.price=q(!1),this.name=q(!1),this.moveProductName=q(!1),this.releaseDate=q(!1),this.discountVisible=q(!1),this.pricebookPrice=q(!1),this.pricebookFontSize=q(0),this.UOMVisible=q(!1),this.tooltip={barcodeHeight:"The height of the generated barcode in pixels",fontSize:"Change all font size (except price)",barcode:"Whether barcode is visible",code:"Whether variant code is visible",price:"Whether variant price is visible",name:"Whether variant name is visible",moveProductName:"Whether move variant name below variant code or below variant price",releaseDate:"Whether release data is visible",discountVisible:"Whether variant's sell price discount is visible",pricebookPrice:"Whether pricebook price is visible",pricebookFontSize:"Change font size for pricebook price",UOMVisible:"Whether UOM is visible"},this.storeService=z(ke),this.injector=z(Xe),this.destroyRef=z(Ye)}ngOnInit(){pt(this.storeService.paperConfiguration,{injector:this.injector}).pipe(Je(this.destroyRef),xe(t=>{this.barcodeHeight.set(t.BarcodeHeight),this.fontSize.set(t.ProductNameFontSize),this.barcode.set(t.BarcodeVisible),this.code.set(t.CodeVisible),this.price.set(t.PriceVisible),this.name.set(t.NameVisible),this.moveProductName.set(t.MoveProductNameOnTop),this.releaseDate.set(t.ShowReleasedDate),this.discountVisible.set(t.ShowPriceDiscount),this.pricebookPrice.set(t.PricebookVisible),this.pricebookFontSize.set(t.PricebookFontSize),this.UOMVisible.set(t.UOMNameVisible)})).subscribe()}onInputHandler(t,n){switch(console.log("value",t),n){case"barcodeHeight":this.barcodeHeight.set(parseFloat(t.replace("px",""))),this.storeService.onChangePaperConfiguration(D(v({},this.storeService.paperConfiguration()),{BarcodeHeight:this.barcodeHeight()}));break;case"fontSize":this.fontSize.set(parseFloat(t.replace("px",""))),this.storeService.onChangePaperConfiguration(D(v({},this.storeService.paperConfiguration()),{ProductNameFontSize:this.fontSize()}));break;case"barcode":this.barcode.set(!!t),this.storeService.onChangePaperConfiguration(D(v({},this.storeService.paperConfiguration()),{BarcodeVisible:this.barcode()}));break;case"code":this.code.set(!!t),this.storeService.onChangePaperConfiguration(D(v({},this.storeService.paperConfiguration()),{CodeVisible:this.code()}));break;case"price":this.price.set(!!t),this.storeService.onChangePaperConfiguration(D(v({},this.storeService.paperConfiguration()),{PriceVisible:this.price()}));break;case"name":this.name.set(!!t),this.storeService.onChangePaperConfiguration(D(v({},this.storeService.paperConfiguration()),{NameVisible:this.name()}));break;case"moveProductName":this.moveProductName.set(!!t),this.storeService.onChangePaperConfiguration(D(v({},this.storeService.paperConfiguration()),{MoveProductNameOnTop:this.moveProductName()}));break;case"releaseDate":this.releaseDate.set(!!t),this.storeService.onChangePaperConfiguration(D(v({},this.storeService.paperConfiguration()),{ShowReleasedDate:this.releaseDate()}));break;case"discountVisible":this.discountVisible.set(!!t),this.storeService.onChangePaperConfiguration(D(v({},this.storeService.paperConfiguration()),{ShowPriceDiscount:this.discountVisible()}));break;case"pricebookPrice":this.pricebookPrice.set(!!t),this.storeService.onChangePaperConfiguration(D(v({},this.storeService.paperConfiguration()),{PricebookVisible:this.pricebookPrice()}));break;case"pricebookFontSize":this.pricebookFontSize.set(parseFloat(t.replace("px",""))),this.storeService.onChangePaperConfiguration(D(v({},this.storeService.paperConfiguration()),{PricebookFontSize:this.pricebookFontSize()}));break;case"UOMVisible":this.UOMVisible.set(!!t),this.storeService.onChangePaperConfiguration(D(v({},this.storeService.paperConfiguration()),{UOMNameVisible:this.UOMVisible()}));break}}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275cmp=fe({type:i,selectors:[["app-barcode-view"]],standalone:!0,features:[_e],decls:114,vars:20,consts:[["barcodeHeightTemplate",""],["fontSizeTemplate",""],["barcodeTemplate",""],["codeTemplate",""],["priceTemplate",""],["nameTemplate",""],["moveProductNameTemplate",""],["releaseDateTemplate",""],["discountVisibleTemplate",""],["pricebookPriceTemplate",""],["pricebookFontSizeTemplate",""],[1,"table","table-bordered"],["for","barcode",1,"fs-2"],[1,"form-check","form-switch"],["id","barcode","name","barcode","role","switch","type","checkbox",1,"form-check-input","fs-2",3,"ngModelChange","checked","ngModel"],[1,"form-text","fst-italic","fw-normal","fs-2"],["for","code",1,"fs-2"],["id","code","name","code","role","switch","type","checkbox",1,"form-check-input","fs-2",3,"ngModelChange","checked","ngModel"],["for","price",1,"fs-2"],["id","price","name","price","role","switch","type","checkbox",1,"form-check-input","fs-2",3,"ngModelChange","ngModel"],["for","name",1,"fs-2"],["id","name","name","name","role","switch","type","checkbox",1,"form-check-input","fs-2",3,"ngModelChange","ngModel"],["for","moveProductName",1,"fs-2","d-inline-block","text-truncate"],["id","moveProductName","name","moveProductName","role","switch","type","checkbox",1,"form-check-input","fs-2",3,"ngModelChange","ngModel"],["for","releaseDate",1,"fs-2"],["id","releaseDate","name","releaseDate","role","switch","type","checkbox",1,"form-check-input","fs-2",3,"ngModelChange","ngModel"],["for","discountVisible",1,"fs-2"],["id","discountVisible","name","discountVisible","role","switch","type","checkbox",1,"form-check-input","fs-2",3,"ngModelChange","ngModel"],["for","pricebookPrice",1,"fs-2"],["id","pricebookPrice","name","pricebookPrice","role","switch","type","checkbox",1,"form-check-input","fs-2",3,"ngModelChange","ngModel"],[1,"fst-italic"]],template:function(n,r){if(n&1){let o=Ie();f(0,"table",11)(1,"tbody")(2,"tr")(3,"td")(4,"label",12),x(5,"Barcode"),m()(),f(6,"td")(7,"div",13)(8,"input",14),W("ngModelChange",function(a){return se(o),ae(r.onInputHandler(a,"barcode"))}),m()()(),f(9,"td")(10,"span",15),x(11),m()()(),f(12,"tr")(13,"td")(14,"label",16),x(15,"Code"),m()(),f(16,"td")(17,"div",13)(18,"input",17),W("ngModelChange",function(a){return se(o),ae(r.onInputHandler(a,"code"))}),m()()(),f(19,"td")(20,"span",15),x(21),m()()(),f(22,"tr")(23,"th")(24,"label",18),x(25,"Price"),m()(),f(26,"td")(27,"div",13)(28,"input",19),W("ngModelChange",function(a){return se(o),ae(r.onInputHandler(a,"price"))}),m()()(),f(29,"td")(30,"span",15),x(31),m()()(),f(32,"tr")(33,"td")(34,"label",20),x(35,"Name"),m()(),f(36,"td")(37,"div",13)(38,"input",21),W("ngModelChange",function(a){return se(o),ae(r.onInputHandler(a,"name"))}),m()()(),f(39,"td")(40,"span",15),x(41),m()()(),f(42,"tr")(43,"td")(44,"label",22),x(45,"Move Product Name"),m()(),f(46,"td")(47,"div",13)(48,"input",23),W("ngModelChange",function(a){return se(o),ae(r.onInputHandler(a,"moveProductName"))}),m()()(),f(49,"td")(50,"span",15),x(51),m()()(),f(52,"tr")(53,"td")(54,"label",24),x(55,"Release Date"),m()(),f(56,"td")(57,"div",13)(58,"input",25),W("ngModelChange",function(a){return se(o),ae(r.onInputHandler(a,"releaseDate"))}),m()()(),f(59,"td")(60,"span",15),x(61),m()()(),f(62,"tr")(63,"td")(64,"label",26),x(65,"Discount Visible"),m()(),f(66,"td")(67,"div",13)(68,"input",27),W("ngModelChange",function(a){return se(o),ae(r.onInputHandler(a,"discountVisible"))}),m()()(),f(69,"td")(70,"span",15),x(71),m()()(),f(72,"tr")(73,"td")(74,"label",26),x(75,"UOM Visible"),m()(),f(76,"td")(77,"div",13)(78,"input",27),W("ngModelChange",function(a){return se(o),ae(r.onInputHandler(a,"UOMVisible"))}),m()()(),f(79,"td")(80,"span",15),x(81),m()()(),f(82,"tr")(83,"td")(84,"label",28),x(85,"Pricebook Price"),m()(),f(86,"td")(87,"div",13)(88,"input",29),W("ngModelChange",function(a){return se(o),ae(r.onInputHandler(a,"pricebookPrice"))}),m()()(),f(89,"td")(90,"span",15),x(91),m()()()()(),le(92,cD,2,1,"ng-template",null,0,me)(94,dD,2,1,"ng-template",null,1,me)(96,uD,2,1,"ng-template",null,2,me)(98,pD,2,1,"ng-template",null,3,me)(100,hD,2,1,"ng-template",null,4,me)(102,fD,2,1,"ng-template",null,5,me)(104,mD,2,1,"ng-template",null,6,me)(106,gD,2,1,"ng-template",null,7,me)(108,yD,2,1,"ng-template",null,8,me)(110,vD,2,1,"ng-template",null,9,me)(112,bD,2,1,"ng-template",null,10,me)}n&2&&(y(8),P("checked",r.barcode())("ngModel",r.barcode()),y(3),I(r.tooltip.barcode),y(7),P("checked",r.code())("ngModel",r.code()),y(3),I(r.tooltip.code),y(7),P("ngModel",r.price()),y(3),I(r.tooltip.price),y(7),P("ngModel",r.name()),y(3),I(r.tooltip.name),y(7),P("ngModel",r.moveProductName()),y(3),I(r.tooltip.moveProductName),y(7),P("ngModel",r.releaseDate()),y(3),I(r.tooltip.releaseDate),y(7),P("ngModel",r.discountVisible()),y(3),I(r.tooltip.discountVisible),y(7),P("ngModel",r.UOMVisible()),y(3),I(r.tooltip.UOMVisible),y(7),P("ngModel",r.pricebookPrice()),y(3),I(r.tooltip.pricebookPrice))},dependencies:[ht,Wn,it,Dt,rt,Os],styles:[".col[_ngcontent-%COMP%]{padding:0!important}.fas[_ngcontent-%COMP%] .fa-info-circle[_ngcontent-%COMP%]{font-size:12px}table[_ngcontent-%COMP%] > tbody[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%] > td[_ngcontent-%COMP%]{vertical-align:middle}table[_ngcontent-%COMP%] > tbody[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%] > td[_ngcontent-%COMP%]:last-child{width:50%}"],changeDetection:0})}}return i})();function _D(i,e){if(i&1&&(f(0,"span",16),x(1),m()),i&2){let t=O();y(),I(t.tooltip.priceWithTax)}}function wD(i,e){if(i&1&&(f(0,"span",16),x(1),m()),i&2){let t=O();y(),I(t.tooltip.selectedTax)}}function xD(i,e){if(i&1&&(f(0,"span",16),x(1),m()),i&2){let t=O();y(),I(t.tooltip.currency)}}function CD(i,e){if(i&1&&(f(0,"span",16),x(1),m()),i&2){let t=O();y(),I(t.tooltip.fontSize)}}function SD(i,e){if(i&1&&(f(0,"span",16),x(1),m()),i&2){let t=O();y(),I(t.tooltip.outletPrice)}}var xy=(()=>{class i{constructor(){this.options=Ft,this.hasPriceTax=q(!1),this.selectedTax=q(""),this.taxType=q({}),this.currency=q(""),this.fontSize=q(0),this.outletPrice=q(""),this.tooltip={priceWithTax:"Tax is added to the product base price true",selectedTax:"Applied Tax ex: 100 + 10% = 110",currency:"The default currency",fontSize:"Change font size for price",outletPrice:"Price will be set according to the outlet price assigned when selected the outlet"},this.storeService=z(ke),this.destroyRef=z(Ye),this.injector=z(Xe),this.outlets=q([])}get taxs(){return this.storeService.taxs()}ngOnInit(){pt(this.storeService.paperConfiguration,{injector:this.injector}).pipe(Je(this.destroyRef),xe(o=>{this.hasPriceTax.set(o.PriceWithTax),this.selectedTax.set(o.TaxType&&o.TaxType.ID),this.currency.set(o.CurrencySymbol),this.fontSize.set(o.PriceFontSize),this.outletPrice.set(o.OutletID)})).subscribe();let t=this.storeService.paperConfig().Outlets,n=this.storeService.productItems(),r=t.filter(o=>n?n.some(s=>s.OutletPrice?.some(a=>a.Outlet===o.Name)):[]);this.outlets.set(r),pt(this.storeService.productItems,{injector:this.injector}).pipe(xe(o=>{let s=o.some(a=>a.Promotions);this.outletPrice.set(s?"":this.outletPrice())})).subscribe(),pt(this.outletPrice,{injector:this.injector}).pipe(Qt(o=>!!o),xe(()=>{let o=[...this.storeService.productItems().map(s=>D(v({},s),{Promotions:null}))];this.storeService.onChangeProductItems(o)})).subscribe()}onInputHandler(t,n){switch(n){case"hasPriceTax":this.hasPriceTax.set(!!t),this.storeService.onChangePaperConfiguration(D(v({},this.storeService.paperConfiguration()),{PriceWithTax:this.hasPriceTax()}));break;case"selectedTax":let r=this.storeService.taxs().findIndex(o=>o.ID===t);r!==-1&&(this.selectedTax.set(t),this.taxType.set(this.storeService.taxs()[r])),this.storeService.onChangePaperConfiguration(D(v({},this.storeService.paperConfiguration()),{TaxType:this.taxType()}));break;case"currency":this.currency.set(t),this.storeService.onChangePaperConfiguration(D(v({},this.storeService.paperConfiguration()),{CurrencySymbol:this.currency()}));break;case"fontSize":this.fontSize.set(parseFloat(t.replace("px",""))),this.storeService.onChangePaperConfiguration(D(v({},this.storeService.paperConfiguration()),{PriceFontSize:this.fontSize()}));break;case"outletPrice":if(this.outletPrice.set(t),this.storeService.onChangePaperConfiguration(D(v({},this.storeService.paperConfiguration()),{OutletID:this.outletPrice()})),this.storeService.paperConfiguration().OutletID){let o=[...this.storeService.productItems().map(s=>D(v({},s),{Promotions:null}))];this.storeService.onChangeProductItems(o)}break}}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275cmp=fe({type:i,selectors:[["app-price"]],standalone:!0,features:[_e],decls:49,vars:11,consts:[["priceWithTaxTemplate",""],["selectedTaxTemplate",""],["currencyTemplate",""],["fontSizeTemplate",""],["outletPriceTemplate",""],[1,"table","table-bordered"],["for","hasPriceTax",1,"fs-2","d-inline-block","text-truncate"],[1,"form-check","form-switch"],["id","hasPriceTax","name","hasPriceTax","role","switch","type","checkbox",1,"form-check-input","fs-2",3,"ngModelChange","checked","ngModel"],[1,"form-text","fst-italic","fw-normal","fs-2"],["for","selectedTax",1,"fs-2","d-inline-block","text-truncate"],["id","selectedTax","name","selectedTax","bindLabel","Name","bindValue","ID","placeholder","Select Column",1,"custom","w-100","fs-2",3,"ngModelChange","ngModel","items"],["for","currency",1,"fs-2","d-inline-block","text-truncate"],["id","currency","name","currency","type","text",1,"form-control","fs-2",3,"ngModelChange","ngModel"],["for","outletPrice",1,"fs-2","d-inline-block","text-truncate"],["id","outletPrice","name","outletPrice","bindLabel","Name","bindValue","ID","placeholder","Choose Outlet",1,"custom","w-100","fs-2",3,"ngModelChange","ngModel","items"],[1,"fst-italic"]],template:function(n,r){if(n&1){let o=Ie();f(0,"table",5)(1,"tbody")(2,"tr")(3,"td")(4,"label",6),x(5,"Price With Tax"),m()(),f(6,"td")(7,"div",7)(8,"input",8),W("ngModelChange",function(a){return se(o),ae(r.onInputHandler(a,"hasPriceTax"))}),m()()(),f(9,"td")(10,"span",9),x(11),m()()(),f(12,"tr")(13,"td")(14,"label",10),x(15,"Selected Tax"),m()(),f(16,"td")(17,"ng-select",11),W("ngModelChange",function(a){return se(o),ae(r.onInputHandler(a,"selectedTax"))}),m()(),f(18,"td")(19,"span",9),x(20),m()()(),f(21,"tr")(22,"td")(23,"label",12),x(24,"Currency"),m()(),f(25,"td")(26,"input",13),W("ngModelChange",function(a){return se(o),ae(r.onInputHandler(a,"currency"))}),m()(),f(27,"td")(28,"span",9),x(29),m()()(),f(30,"tr")(31,"th")(32,"label",14),x(33,"Outlet Price"),m()(),f(34,"td")(35,"ng-select",15),W("ngModelChange",function(a){return se(o),ae(r.onInputHandler(a,"outletPrice"))}),m()(),f(36,"td")(37,"span",9),x(38),m()()()()(),le(39,_D,2,1,"ng-template",null,0,me)(41,wD,2,1,"ng-template",null,1,me)(43,xD,2,1,"ng-template",null,2,me)(45,CD,2,1,"ng-template",null,3,me)(47,SD,2,1,"ng-template",null,4,me)}n&2&&(y(8),P("checked",r.hasPriceTax())("ngModel",r.hasPriceTax()),y(3),I(r.tooltip.priceWithTax),y(6),P("ngModel",r.selectedTax())("items",r.taxs),y(3),I(r.tooltip.selectedTax),y(6),P("ngModel",r.currency()),y(3),I(r.tooltip.currency),y(6),P("ngModel",r.outletPrice())("items",r.outlets()),y(3),I(r.tooltip.outletPrice))},dependencies:[ht,tt,Wn,it,Dt,rt,oi,_i],styles:["table[_ngcontent-%COMP%] > tbody[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%] > td[_ngcontent-%COMP%]{vertical-align:middle}table[_ngcontent-%COMP%] > tbody[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%] > td[_ngcontent-%COMP%]:last-child{width:50%}"],changeDetection:0})}}return i})();function PD(i,e){if(i&1&&(f(0,"span",21),x(1),m()),i&2){let t=O();y(),I(t.tooltip.maxCharacter)}}function ED(i,e){if(i&1&&(f(0,"span",21),x(1),m()),i&2){let t=O();y(),I(t.tooltip.namePrefix)}}function DD(i,e){if(i&1&&(f(0,"span",21),x(1),m()),i&2){let t=O();y(),I(t.tooltip.storeName)}}function kD(i,e){if(i&1&&(f(0,"span",21),x(1),m()),i&2){let t=O();y(),I(t.tooltip.orientation)}}function TD(i,e){if(i&1&&(f(0,"span",21),x(1),m()),i&2){let t=O();y(),I(t.tooltip.useDescriptionAsCode)}}function ID(i,e){if(i&1&&(f(0,"span",21),x(1),m()),i&2){let t=O();y(),I(t.tooltip.removeDefault)}}var Cy=(()=>{class i{constructor(){this.storeService=z(ke),this.fb=z(Yi),this.destroyRef=z(Ye),this.injector=z(Xe),this.tooltip={maxCharacter:"The max character of the product name",namePrefix:"A word, letter, or number placed before product name",storeName:"The name of the store",orientation:"Horizontal or vertical position store name label",useDescriptionAsCode:"Copy product description into product code",removeDefault:"Remove 'Default' label from product name"},this.maxCharacter=q(0),this.namePrefix=q(""),this.storeName=q(""),this.orientation=q(0),this.useDescriptionAsCode=q(!1),this.removeDefault=q(!1),this.options=Ft}ngOnInit(){this.initForm(),pt(this.storeService.paperConfiguration,{injector:this.injector}).pipe(Je(this.destroyRef),xe(t=>{this.maxCharacter.set(t.ProductNameMaxLength),this.namePrefix.set(t.ProductNamePrefix),this.storeName.set(t.StoreName),this.orientation.set(t.Orientation),this.useDescriptionAsCode.set(t.DescriptionAsCode),this.removeDefault.set(!1)})).subscribe(),this.form.valueChanges.pipe(Je(this.destroyRef),xe(t=>{let n=D(v({},this.storeService.paperConfiguration()),{ProductNameMaxLength:t.maxCharacter,ProductNamePrefix:t.namePrefix,StoreName:t.storeName,Orientation:t.orientation,DescriptionAsCode:!!t.useDescriptionAsCode});this.storeService.onChangePaperConfiguration(n);let o=["ProductNameMaxLength","ProductNamePrefix","StoreName","Orientation","DescriptionAsCode"].reduce((s,a)=>(a in this.storeService.paperConfiguration()&&(s[a]=this.storeService.paperConfiguration()[a]),s),{});console.log("filtered advanced",o)})).subscribe()}onInputHandler(t,n){switch(n){case"maxCharacter":this.maxCharacter.set(+t),this.storeService.onChangePaperConfiguration(D(v({},this.storeService.paperConfiguration()),{ProductNameMaxLength:this.maxCharacter()}));break;case"namePrefix":this.namePrefix.set(t),this.storeService.onChangePaperConfiguration(D(v({},this.storeService.paperConfiguration()),{ProductNamePrefix:this.namePrefix()}));break;case"storeName":this.storeName.set(t),this.storeService.onChangePaperConfiguration(D(v({},this.storeService.paperConfiguration()),{StoreName:this.storeName()}));break;case"orientation":this.orientation.set(+t),this.storeService.onChangePaperConfiguration(D(v({},this.storeService.paperConfiguration()),{Orientation:this.orientation()}));break;case"useDescriptionAsCode":this.useDescriptionAsCode.set(!!t),this.storeService.onChangePaperConfiguration(D(v({},this.storeService.paperConfiguration()),{DescriptionAsCode:this.useDescriptionAsCode()}));break;case"removeDefault":this.removeDefault.set(!!t);break}}initForm(){this.form=this.fb.group({maxCharacter:new nt(this.storeService.paperConfiguration().ProductNameMaxLength,[lt.required]),namePrefix:new nt(null,[lt.required]),storeName:new nt(null,[lt.required]),orientation:new nt(null,[lt.required]),useDescriptionAsCode:new nt(null,[lt.required]),removeDefault:new nt("0",[lt.required])}),this.form.patchValue({maxCharacter:this.storeService.paperConfiguration().ProductNameMaxLength,namePrefix:this.storeService.paperConfiguration().ProductNamePrefix,storeName:this.storeService.paperConfiguration().StoreName,orientation:this.storeService.paperConfiguration().Orientation,useDescriptionAsCode:Number(this.storeService.paperConfiguration().DescriptionAsCode).toString()})}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275cmp=fe({type:i,selectors:[["app-advanced"]],standalone:!0,features:[_e],decls:70,vars:15,consts:[["maxCharacterTemplate",""],["namePrefixTemplate",""],["storeNameTemplate",""],["orientationTemplate",""],["useDescriptionAsCodeTemplate",""],["removeDefaultTemplate",""],[1,"table","table-bordered"],["for","MaxCharacter",1,"fs-2","d-inline-block","text-truncate"],["id","maxCharacter","name","maxCharacter","type","text",1,"form-control","fs-2",3,"ngModelChange","ngModel"],[1,"form-text","fst-italic","fw-medium","fs-2"],["for","namePrefix",1,"fs-2","d-inline-block","text-truncate"],["name","namePrefix","type","text",1,"form-control","fs-2",3,"ngModelChange","ngModel"],["for","storeName",1,"fs-2","d-inline-block","text-truncate"],["id","storeName","name","storeName","type","text",1,"form-control","fs-2",3,"ngModelChange","ngModel"],["for","orientation",1,"fs-2","d-inline-block","text-truncate"],["id","orientation","name","orientation","bindLabel","Value","bindValue","Key","placeholder","Select Column",1,"custom","w-100","fs-2",3,"ngModelChange","ngModel","items"],["for","useDescriptionAsCode",1,"fs-2","d-inline-block","text-truncate"],[1,"form-check","form-switch"],["id","useDescriptionAsCode","name","barcode","role","switch","type","checkbox",1,"form-check-input","fs-2",3,"ngModelChange","checked","ngModel"],["for","removeDefault",1,"fs-2","d-inline-block","text-truncate"],["id","removeDefault","name","removeDefault","role","switch","type","checkbox",1,"form-check-input","fs-2",3,"ngModelChange","checked","ngModel"],[1,"fst-italic"]],template:function(n,r){if(n&1){let o=Ie();f(0,"table",6)(1,"tbody")(2,"tr")(3,"td")(4,"label",7),x(5,"Max Character"),m()(),f(6,"td")(7,"input",8),W("ngModelChange",function(a){return se(o),ae(r.onInputHandler(a,"maxCharacter"))}),m()(),f(8,"td")(9,"span",9),x(10),m()()(),f(11,"tr")(12,"td")(13,"label",10),x(14,"Name Prefix"),m()(),f(15,"td")(16,"input",11),W("ngModelChange",function(a){return se(o),ae(r.onInputHandler(a,"namePrefix"))}),m()(),f(17,"td")(18,"span",9),x(19),m()()(),f(20,"tr")(21,"td")(22,"label",12),x(23,"Store Name"),m()(),f(24,"td")(25,"input",13),W("ngModelChange",function(a){return se(o),ae(r.onInputHandler(a,"storeName"))}),m()(),f(26,"td")(27,"span",9),x(28),m()()(),f(29,"tr")(30,"th")(31,"label",14),x(32,"Orientation"),m()(),f(33,"td")(34,"ng-select",15),W("ngModelChange",function(a){return se(o),ae(r.onInputHandler(a,"orientation"))}),m()(),f(35,"td")(36,"span",9),x(37),m()()(),f(38,"tr")(39,"td")(40,"label",16),x(41,"Use description as code"),m()(),f(42,"td")(43,"div",17)(44,"input",18),W("ngModelChange",function(a){return se(o),ae(r.onInputHandler(a,"useDescriptionAsCode"))}),m()()(),f(45,"td")(46,"span",9),x(47),m()()(),f(48,"tr")(49,"td")(50,"label",19),x(51,'Remove "Default"'),m()(),f(52,"td")(53,"div",17)(54,"input",20),W("ngModelChange",function(a){return se(o),ae(r.onInputHandler(a,"removeDefault"))}),m()()(),f(55,"td")(56,"span",9),x(57),m()()()()(),le(58,PD,2,1,"ng-template",null,0,me)(60,ED,2,1,"ng-template",null,1,me)(62,DD,2,1,"ng-template",null,2,me)(64,kD,2,1,"ng-template",null,3,me)(66,TD,2,1,"ng-template",null,4,me)(68,ID,2,1,"ng-template",null,5,me)}n&2&&(y(7),P("ngModel",r.maxCharacter()),y(3),I(r.tooltip.maxCharacter),y(6),P("ngModel",r.namePrefix()),y(3),I(r.tooltip.namePrefix),y(6),P("ngModel",r.storeName()),y(3),I(r.tooltip.storeName),y(6),P("ngModel",r.orientation())("items",r.storeService.paperConfiguration().OrientationChoice),y(3),I(r.tooltip.orientation),y(7),P("checked",r.useDescriptionAsCode())("ngModel",r.useDescriptionAsCode()),y(3),I(r.tooltip.useDescriptionAsCode),y(7),P("checked",r.removeDefault())("ngModel",r.removeDefault()),y(3),I(r.tooltip.removeDefault))},dependencies:[rt,tt,Wn,it,oi,_i,ht,Dt],styles:["table[_ngcontent-%COMP%] > tbody[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%] > td[_ngcontent-%COMP%]{vertical-align:middle}table[_ngcontent-%COMP%] > tbody[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%] > td[_ngcontent-%COMP%]:last-child{width:50%}"],changeDetection:0})}}return i})();var Sy=(()=>{class i{transform(t,...n){let r=Number(t),o=Number(n[0]);return r*o/100+r}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275pipe=ts({name:"taxs",type:i,pure:!0,standalone:!0})}}return i})();var Py=De(Ic());var OD=["barcode"],FD=(i,e)=>e.VariantID,RD=i=>({"h-100":i}),Ge=i=>({"font-size.px":i});function MD(i,e){if(i&1&&(f(0,"div",3),ue(1,"canvas",12,0),m()),i&2){let t=O(2);y(),P("ngStyle",t.barcodeStyle)}}function AD(i,e){if(i&1&&(f(0,"span",5),x(1),m()),i&2){let t=O().$implicit,n=O();P("ngStyle",Ae(2,Ge,n.storeService.paperConfiguration().ProductNameFontSize)),y(),I(t.Code)}}function BD(i,e){if(i&1&&(f(0,"span",14),x(1),m()),i&2){let t=O(3);P("ngStyle",Ae(2,Ge,t.storeService.paperConfiguration().ProductNameFontSize)),y(),I(t.storeService.paperConfiguration().ProductNamePrefix)}}function ND(i,e){if(i&1&&(f(0,"div",6),le(1,BD,2,4,"span",13),f(2,"span",14),x(3),Ue(4,"slice"),m()()),i&2){let t=O().$implicit,n=O();y(),P("ngIf",n.storeService.paperConfiguration().ProductNamePrefix),y(),P("ngStyle",Ae(7,Ge,n.storeService.paperConfiguration().ProductNameFontSize)),y(),I(gl(4,3,t.Name,0,n.storeService.paperConfiguration().ProductNameMaxLength))}}function zD(i,e){if(i&1&&(f(0,"span",25),x(1),m()),i&2){let t=O(3);P("ngStyle",Ae(2,Ge,t.storeService.paperConfiguration().PriceFontSize)),y(),I(t.storeService.paperConfiguration().CurrencySymbol)}}function LD(i,e){if(i&1&&(f(0,"span"),x(1),m()),i&2){let t=O(2).$implicit;y(),ii("/",t.UOMName||"pcs","")}}function HD(i,e){if(i&1&&(f(0,"span",26),x(1),m()),i&2){let t=O(3);P("ngStyle",Ae(2,Ge,t.storeService.paperConfiguration().PriceFontSize)),y(),I(t.storeService.paperConfiguration().CurrencySymbol)}}function jD(i,e){if(i&1&&(f(0,"div",7)(1,"div",15)(2,"div",16),x(3),m(),f(4,"div",17),le(5,zD,2,4,"span",18),f(6,"span",19),x(7),Ue(8,"number"),m(),le(9,LD,2,1,"span",20),m()(),f(10,"div",15)(11,"div",21),x(12),m(),f(13,"div",22),le(14,HD,2,4,"span",23),f(15,"span",24),x(16),Ue(17,"number"),m()()()()),i&2){let t=O().$implicit,n=O();y(2),P("ngStyle",Ae(15,Ge,n.storeService.paperConfiguration().ProductNameFontSize)),y(),ii(" ",n.storeService.paperConfiguration().BasicPriceLabel," "),y(2),P("ngIf",n.storeService.paperConfiguration().CurrencySymbol),y(),P("ngStyle",Ae(17,Ge,n.storeService.paperConfiguration().PriceFontSize)),y(),I(ni(8,11,t.UnitPrice)),y(2),P("ngIf",n.storeService.paperConfiguration().UOMNameVisible),y(2),P("ngStyle",Ae(19,Ge,n.storeService.paperConfiguration().ProductNameFontSize)),y(),ii(" ",n.storeService.paperConfiguration().PromotionPriceLabel," "),y(2),P("ngIf",n.storeService.paperConfiguration().CurrencySymbol),y(),P("ngStyle",Ae(21,Ge,n.storeService.paperConfiguration().PriceFontSize)),y(),I(ni(17,13,n.promotionDiscount(t.Promotions)))}}function VD(i,e){if(i&1&&(f(0,"span",28),x(1),m()),i&2){let t=O(3);P("ngStyle",Ae(2,Ge,t.storeService.paperConfiguration().PriceFontSize)),y(),I(t.storeService.paperConfiguration().CurrencySymbol)}}function UD(i,e){if(i&1&&(f(0,"span",30),x(1),m()),i&2){let t=O(2).$implicit,n=O();P("ngStyle",Ae(2,Ge,n.storeService.paperConfiguration().PriceFontSize)),y(),ii("/",t.UOMName||"pcs","")}}function WD(i,e){if(i&1&&(f(0,"div",8),le(1,VD,2,4,"span",27),f(2,"span",28),x(3),Ue(4,"taxs"),Ue(5,"number"),m(),le(6,UD,2,4,"span",29),m()),i&2){let t=O().$implicit,n=O();y(),P("ngIf",n.storeService.paperConfiguration().CurrencySymbol),y(),P("ngStyle",Ae(9,Ge,n.storeService.paperConfiguration().PriceFontSize)),y(),I(ni(5,7,Ti(4,4,t.UnitPrice,n.taxRate))),y(3),P("ngIf",n.storeService.paperConfiguration().UOMNameVisible)}}function $D(i,e){if(i&1&&(f(0,"span",28),x(1),m()),i&2){let t=O(5);P("ngStyle",Ae(2,Ge,t.storeService.paperConfiguration().PriceFontSize)),y(),I(t.storeService.paperConfiguration().CurrencySymbol)}}function qD(i,e){if(i&1&&(f(0,"div",10),le(1,$D,2,4,"span",27),f(2,"span",28),x(3),Ue(4,"taxs"),Ue(5,"number"),m()()),i&2){let t=O().$implicit,n=O(3);y(),P("ngIf",n.storeService.paperConfiguration().CurrencySymbol),y(),P("ngStyle",Ae(8,Ge,n.storeService.paperConfiguration().PriceFontSize)),y(),I(ni(5,6,Ti(4,3,t.Price,n.taxRate)))}}function GD(i,e){if(i&1&&le(0,qD,6,10,"div",10),i&2){let t=e.$implicit,n=O(3);Ce(t.Outlet===n.storeService.outlet$().Name?0:-1)}}function XD(i,e){if(i&1&&Zt(0,GD,1,1,null,null,as),i&2){let t=O().$implicit;Jt(t.OutletPrice)}}function YD(i,e){if(i&1&&(f(0,"span",14),x(1),m()),i&2){let t=O(3);P("ngStyle",Ae(2,Ge,t.storeService.paperConfiguration().ProductNameFontSize)),y(),I(t.storeService.paperConfiguration().ProductNamePrefix)}}function KD(i,e){if(i&1&&(f(0,"div",9),le(1,YD,2,4,"span",13),f(2,"span",14),x(3),Ue(4,"slice"),m()()),i&2){let t=O().$implicit,n=O();y(),P("ngIf",n.storeService.paperConfiguration().ProductNamePrefix),y(),P("ngStyle",Ae(7,Ge,n.storeService.paperConfiguration().ProductNameFontSize)),y(),I(gl(4,3,t.Name,0,n.storeService.paperConfiguration().ProductNameMaxLength))}}function QD(i,e){if(i&1&&(f(0,"div",31)(1,"span",14),x(2),m()()),i&2){let t=O(3);y(),P("ngStyle",Ae(2,Ge,t.storeService.paperConfiguration().ProductNameFontSize)),y(),I(t.storeService.paperConfiguration().StoreName)}}function ZD(i,e){if(i&1&&(f(0,"div",32)(1,"span",14),x(2),m()()),i&2){let t=O(3);y(),P("ngStyle",Ae(2,Ge,t.storeService.paperConfiguration().ProductNameFontSize)),y(),I(t.storeService.paperConfiguration().StoreName)}}function JD(i,e){if(i&1&&le(0,QD,3,4,"div",31)(1,ZD,3,4,"div",32),i&2){let t=O(2);Ce(t.storeService.paperConfiguration().Orientation===0?0:1)}}function ek(i,e){if(i&1&&(f(0,"div",10)(1,"span",14),x(2),Ue(3,"date"),m()()),i&2){let t=O().$implicit,n=O();y(),P("ngStyle",Ae(5,Ge,n.storeService.paperConfiguration().ProductNameFontSize)),y(),I(Ti(3,2,t.ReleasedDate,"dd MMM yyyy"))}}function tk(i,e){if(i&1&&(f(0,"div",10)(1,"span",14),x(2),m()()),i&2){let t=O().$implicit,n=O();y(),P("ngStyle",Ae(2,Ge,n.storeService.paperConfiguration().ProductNameFontSize)),y(),ii("",t.PriceDiscount,"% Off")}}function ik(i,e){if(i&1&&(f(0,"span"),x(1),m(),f(2,"span"),x(3,"-"),m(),f(4,"span"),x(5),m(),f(6,"span"),x(7,"-"),m(),f(8,"span"),x(9),Ue(10,"number"),m()),i&2){let t=e.$implicit;y(),I(t.Name),y(4),I(t.MinimumQuantity),y(4),I(ni(10,3,t.UnitPrice))}}function nk(i,e){if(i&1&&(f(0,"div",11),Zt(1,ik,11,5,null,null,ls),m()),i&2){let t=O().$implicit,n=O();P("ngStyle",Ae(1,Ge,n.storeService.paperConfiguration().PricebookFontSize)),y(),Jt(t.Pricebook)}}function rk(i,e){if(i&1&&(f(0,"div",2),le(1,MD,3,1,"div",3),f(2,"div",4),le(3,AD,2,4,"span",5)(4,ND,5,9,"div",6)(5,jD,18,23,"div",7)(6,WD,7,11,"div",8)(7,XD,2,0)(8,KD,5,9,"div",9)(9,JD,2,1)(10,ek,4,7,"div",10)(11,tk,3,4,"div",10)(12,nk,3,3,"div",11),m()()),i&2){let t=e.$implicit,n=O();P("ngStyle",n.stickerStyles),y(),Ce(n.storeService.paperConfiguration().BarcodeVisible?1:-1),y(),P("ngClass",Ae(13,RD,!n.storeService.paperConfiguration().BarcodeVisible)),y(),Ce(n.storeService.paperConfiguration().CodeVisible?3:-1),y(),Ce(n.storeService.paperConfiguration().MoveProductNameOnTop&&n.storeService.paperConfiguration().NameVisible?4:-1),y(),Ce(t.Promotions&&n.storeService.paperConfiguration().PriceVisible?5:-1),y(),Ce(!t.Promotions&&!n.storeService.paperConfiguration().OutletID&&n.storeService.paperConfiguration().PriceVisible?6:-1),y(),Ce(n.storeService.paperConfiguration().OutletID&&n.storeService.paperConfiguration().PriceVisible?7:-1),y(),Ce(!n.storeService.paperConfiguration().MoveProductNameOnTop&&n.storeService.paperConfiguration().NameVisible?8:-1),y(),Ce(n.storeService.paperConfiguration().StoreName?9:-1),y(),Ce(n.storeService.paperConfiguration().ShowReleasedDate?10:-1),y(),Ce(n.storeService.paperConfiguration().ShowPriceDiscount?11:-1),y(),Ce(n.storeService.paperConfiguration().PricebookVisible?12:-1)}}var Za=(()=>{class i{constructor(){this.items=[],this.previewType="single",this.storeService=z(ke),this.Object=Object,this.cdr=z(cn),this.renderer=z(ns),this.elementsInitialized=!1,this.injector=z(Xe)}get barcodeContainerStyles(){let t=0;switch(this.storeService.paperSource()){case"Continuous - 3 Column":t=3;break;case"Continuous - 2 Column":t=2;break;case"Continuous - 1 Column":t=1;break;case"Tom & Jerry 107":t=3;break;case"Tom & Jerry 108":t=5;break}let n={display:"grid",gridTemplateColumns:`repeat(${t}, ${this.items.length===1?"1fr":this.storeService.paperConfiguration().StickerWidth}px)`,gridAutoRows:`${this.storeService.paperConfiguration().StickerHeight}px`,columnGap:`${this.storeService.paperConfiguration().ColumnSpacing}px`,rowGap:`${this.storeService.paperConfiguration().RowSpacing}px`,margin:`${this.storeService.paperConfiguration().MarginTop}px ${this.storeService.paperConfiguration().MarginLeft}px`,maxHeight:"100%",height:`${this.previewType==="single"?"90px":"100%"}`,width:`${this.previewType==="single"?"250px":this.storeService.paperConfiguration().PaperWidth+"px"}`};return console.log("style",n),n}get stickerStyles(){let t=this.storeService.paperConfiguration().StickerWidth,n=this.storeService.paperConfiguration().StickerHeight,r=this.items.length===1&&this.previewType==="single"?"250px":`${typeof t=="number"?t+"px":t}`,o=`${this.previewType==="single"?"90px":n+"px"}`;return{width:r,height:o,overflow:"hidden"}}get barcodeStyle(){return{width:"100%",height:`${this.previewType==="single"?"25px":this.storeService.paperConfiguration().BarcodeHeight+"px"}`}}get taxRate(){if(this.storeService.paperConfiguration().TaxType){let n=this.storeService.taxs().findIndex(r=>r.ID===this.storeService.paperConfiguration().TaxType.ID);if(n!==-1)return this.storeService.taxs()[n].Rate}return 0}get stickerStoreName(){let t={order:"4",lineHeight:"15px"},n={position:"absolute",right:"0",top:"0",transform:"translate(0%, 20%) rotate(270deg)"};return this.storeService.paperConfiguration().Orientation===0?t:n}ngOnInit(){}ngAfterViewInit(){this.elementsInitialized=!0}ngAfterViewChecked(){this.generateBarcodes(),this.elementsInitialized&&(this.generateBarcodes(),this.elementsInitialized=!1)}generateBarcodes(){this.storeService.expandProductItems().forEach((t,n)=>{let r=this.barcodeRef.get(n)?.nativeElement;r&&(0,Py.default)(r,t.Code,{format:"CODE128",lineColor:"#000",width:20,displayValue:!1})})}promotionDiscount(t){try{return Object.keys(t).length?t.Discount&&t.Discount>0?t.UnitPrice-t.UnitPrice*t.Discount/100:t.UnitPrice:0}catch(n){throw new Error("error: ",n)}}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275cmp=fe({type:i,selectors:[["app-barcode-preview"]],viewQuery:function(n,r){if(n&1&&yi(OD,5,Et),n&2){let o;ei(o=ti())&&(r.barcodeRef=o)}},inputs:{items:"items",previewType:"previewType"},standalone:!0,features:[_e],decls:3,vars:1,consts:[["barcode",""],["id","barcode-container",1,"barcode-container",3,"ngStyle"],[1,"sticker","position-relative","border","border-dark","d-flex","flex-column",3,"ngStyle"],[1,"sticker-header","d-flex","justify-content-center","px-1"],[1,"sticker-body","d-flex","flex-column","align-items-center","justify-content-center",3,"ngClass"],[1,"text-dark",2,"line-height","1",3,"ngStyle"],[2,"line-height","0.3","width","100%","text-align","center"],[1,"d-flex","flex-column",2,"line-height","1"],[1,"d-flex","align-items-baseline",2,"line-height","1"],[2,"line-height","0","width","100%","text-align","center"],[2,"line-height","1"],[1,"d-flex","gap-1",2,"line-height","1",3,"ngStyle"],["id","barcode",3,"ngStyle"],["class","text-dark",3,"ngStyle",4,"ngIf"],[1,"text-dark",3,"ngStyle"],[1,"d-flex","gap-2","align-items-center"],[1,"promotion__normalprice_label","text-dark","d-flex","justify-content-end",3,"ngStyle"],[1,"d-flex","gap-1","align-items-baseline"],["class","promotion__normalprice text-dark",3,"ngStyle",4,"ngIf"],[1,"promotion__normalprice","text-decoration-line-through","text-danger",3,"ngStyle"],[4,"ngIf"],[1,"promotion__price_label","text-dark","d-flex","justify-content-end",3,"ngStyle"],[1,"d-flex","gap-2"],["class","text-danger promotion__price text-dark",3,"ngStyle",4,"ngIf"],[1,"promotion__price","text-danger","text-dark",3,"ngStyle"],[1,"promotion__normalprice","text-dark",3,"ngStyle"],[1,"text-danger","promotion__price","text-dark",3,"ngStyle"],["class","price text-dark",3,"ngStyle",4,"ngIf"],[1,"price","text-dark",3,"ngStyle"],[3,"ngStyle",4,"ngIf"],[3,"ngStyle"],["id","store-name-horizontal",1,"",2,"line-height","1"],["id","store-name-vertical",1,"position-absolute",2,"line-height","1"]],template:function(n,r){n&1&&(f(0,"div",1),Zt(1,rk,13,15,"div",2,FD),m()),n&2&&(P("ngStyle",r.barcodeContainerStyles),y(),Jt(r.items))},dependencies:[yp,Sy,Vn,bp,ri,Xi,_p,fs],styles:["#barcode[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{height:100%}.storename[_ngcontent-%COMP%]{position:absolute;right:0;top:0;transform:translateY(20%) rotate(270deg)}#store-name-vertical[_ngcontent-%COMP%]{top:50%;right:0;transform:translateY(-50%) rotate(-90deg)}.sticker-body[_ngcontent-%COMP%]{width:100%;display:inline-flex}.sticker-body[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{line-height:.9!important}"],changeDetection:0})}}return i})();var Ey=(()=>{class i{constructor(){this.storeService=z(ke)}ngOnInit(){}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275cmp=fe({type:i,selectors:[["app-customize-label"]],standalone:!0,features:[_e],decls:58,vars:9,consts:[["scrollContainer",""],[1,"d-flex","flex-column","gap-3","h-100"],[1,"topbar","position-static"],[1,"d-flex","top-navbar","navbar-expand-lg",3,"ngClass"],["id","navbarSupportedContent",1,"navbar-collapse","collapse","m-0",3,"ngbCollapse"],[1,"w-100","d-flex","align-items-center","px-3"],[1,"navbar-nav","float-start","me-auto","h-100","d-flex","align-items-center"],[1,"nav-item","d-none","d-lg-block"],[1,"font-robotoslab","m-0"],[1,"navbar-nav","float-end","py-2"],[1,"d-flex","gap-2"],["type","button",1,"btn","btn-outline-secondary","d-flex","gap-1","align-items-center",3,"click"],[1,"f","fas","fa-angle-left"],[1,"fs-3"],[1,"f","fas","fa-angle-right"],[1,"row","mx-2","flex-grow-1","overflow-x-auto",2,"margin-bottom","1rem"],[1,"col-lg-6","col-md-6","d-flex","justify-content-center"],[1,"card","sticky-md-top",2,"height","fit-content"],[1,"card-body","d-flex","justify-content-center","align-items-center"],[3,"items"],[1,"col-lg-6","col-md-6"],[1,"card"],[1,"p-3"],[1,"card-title","mb-0","font-robotoslab",2,"font-size","16px"],[1,"card-body","border-top","p-1"],["ngbAccordion","",3,"closeOthers"],["ngbAccordionItem","",3,"collapsed"],["ngbAccordionHeader",""],["ngbAccordionButton",""],[1,"",2,"font-size","14px"],["ngbAccordionCollapse",""],["ngbAccordionBody","",1,"scroll-container"],[2,"font-size","14px"]],template:function(n,r){if(n&1){let o=Ie();f(0,"div",1)(1,"header",2)(2,"nav",3)(3,"div",4)(4,"div",5)(5,"ul",6)(6,"li",7)(7,"h3",8),x(8,"Customize Label"),m()()(),f(9,"ul",9)(10,"div",10)(11,"button",11),W("click",function(){return se(o),ae(r.storeService.onPrevStep())}),ue(12,"i",12),f(13,"span",13),x(14,"Back"),m()(),f(15,"button",11),W("click",function(){return se(o),ae(r.storeService.onNextStep())}),f(16,"span",13),x(17,"Next"),m(),ue(18,"i",14),m()()()()()()(),f(19,"div",15)(20,"div",16)(21,"div",17)(22,"div",18),ue(23,"app-barcode-preview",19),m()()(),f(24,"div",20)(25,"div",21)(26,"div",22)(27,"h4",23),x(28," Sticker Content "),m()(),f(29,"div",24)(30,"div",25)(31,"div",26)(32,"h2",27)(33,"button",28)(34,"span",29),x(35,"Barcode View"),m()()(),f(36,"div",30)(37,"div",31,0),ue(39,"app-barcode-view"),m()()(),f(40,"div",26)(41,"h2",27)(42,"button",28)(43,"span",32),x(44,"Price"),m()()(),f(45,"div",30)(46,"div",31,0),ue(48,"app-price"),m()()(),f(49,"div",26)(50,"h2",27)(51,"button",28)(52,"span",32),x(53,"Advanced"),m()()(),f(54,"div",30)(55,"div",31,0),ue(57,"app-advanced"),m()()()()()()()()()}n&2&&(y(),Lt("data-navbarbg",r.storeService.options().navbarbg),y(),P("ngClass",r.storeService.options().navbarbg=="skin6"?"navbar-light":"navbar-dark"),y(),P("ngbCollapse",!r.storeService.options().isCollapsed),Lt("data-navbarbg",r.storeService.options().navbarbg),y(20),P("items",r.storeService.expandProductItem()),y(7),P("closeOthers",!0),y(),P("collapsed",!1),y(9),P("collapsed",!0),y(9),P("collapsed",!0))},dependencies:[_s,xs,ws,Ps,Cs,Ss,tr,$n,Xi,wy,xy,Cy,Za],styles:[".scroll-container[_ngcontent-%COMP%]{overflow-y:auto;max-height:100vh}"],changeDetection:0})}}return i})();function ok(i,e){if(i&1&&(f(0,"ng-option",3),x(1),m()),i&2){let t=e.$implicit;P("value",t.Name),y(),I(t.Name)}}var Dy=(()=>{class i{onInputHandler(t,n){switch(n){case"paperWidth":this.paperWidth.set(parseFloat(t.replace("px",""))),this.storeService.onChangePaperConfiguration(D(v({},this.storeService.paperConfiguration()),{PaperWidth:this.paperWidth()}));break;case"stickerWidth":this.stickerWidth.set(parseFloat(t.replace("px",""))),this.storeService.onChangePaperConfiguration(D(v({},this.storeService.paperConfiguration()),{StickerWidth:this.stickerWidth()}));break;case"stickerHeight":this.stickerHeight.set(parseFloat(t.replace("px",""))),this.storeService.onChangePaperConfiguration(D(v({},this.storeService.paperConfiguration()),{StickerHeight:this.stickerHeight()}));break;case"barcodeHeight":this.barcodeHeight.set(parseFloat(t.replace("px",""))),this.storeService.onChangePaperConfiguration(D(v({},this.storeService.paperConfiguration()),{BarcodeHeight:this.barcodeHeight()}));break;case"fontSize":this.fontSize.set(parseFloat(t.replace("px",""))),this.storeService.onChangePaperConfiguration(D(v({},this.storeService.paperConfiguration()),{ProductNameFontSize:this.fontSize()}));break}}constructor(){this.options=Ft,this.storeService=z(ke),this.destroyRef=z(Ye),this.injector=z(Xe),this.paperWidth=q(0),this.stickerWidth=q(0),this.stickerHeight=q(0),this.paperSource=q(""),this.barcodeHeight=q(0),this.fontSize=q(0),this.tooltip={paperWidth:"The width of the paper",stickerWidth:"The width of the sticker",stickerHeight:"The height of the sticker",barcodeHeight:"The height of the generated barcode in pixels",fontSize:"Change all font size (except price)"}}ngOnInit(){pt(this.storeService.paperConfiguration,{injector:this.injector}).pipe(xe(t=>{this.paperWidth.set(t.PaperWidth),this.stickerWidth.set(t.StickerWidth),this.stickerHeight.set(t.StickerHeight),this.barcodeHeight.set(t.BarcodeHeight),this.fontSize.set(t.ProductNameFontSize)})).subscribe(),this.paperWidth.set(this.storeService.paperConfiguration().PaperWidth),this.stickerWidth.set(this.storeService.paperConfiguration().StickerWidth),this.stickerHeight.set(this.storeService.paperConfiguration().StickerHeight),this.paperSource.set(this.storeService.paperConfig().PaperFormats[0].Name),this.storeService.paperSource().length==0&&this.storeService.onChangePaperSource(this.storeService.paperConfig().PaperFormats[0].Name)}onChangePaperSource(t){let n=this.storeService.paperConfig().PaperFormats.findIndex(r=>r.Name===t);n!==-1&&(this.storeService.onChangePaperSource(this.storeService.paperConfig().PaperFormats[n].Name),this.storeService.onChangePaperConfiguration(this.storeService.paperConfig().PaperFormats[n]))}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275cmp=fe({type:i,selectors:[["app-pp-paper"]],standalone:!0,features:[_e],decls:58,vars:17,consts:[[1,"table","table-bordered"],["for","paperSource",1,"fs-2","d-inline-block","text-truncate"],["searchable","false","clearable","false","id","paperSource","name","paperSource","selecte","",1,"custom","w-100","fs-2",3,"ngModelChange","ngModel"],[3,"value"],[1,"form-text","fst-italic","fw-normal","fs-2"],["for","paperWidth",1,"fs-2","d-inline-block","text-truncate"],["id","paperWidth","name","paperWidth","type","text","inputmode","number",1,"form-control","fs-2",3,"ngModelChange","maskito","ngModel"],["for","stickerWidth",1,"fs-2","d-inline-block","text-truncate"],["name","stickerWidth","type","text","inputmode","number",1,"form-control","fs-2",3,"ngModelChange","maskito","ngModel"],["for","stickerHeight",1,"fs-2","d-inline-block","text-truncate"],["id","stickerHeight","name","stickerHeight","type","text","inputmode","number",1,"form-control","fs-2",3,"ngModelChange","maskito","ngModel"],["for","barcode",1,"fs-2"],["id","barcodeHeight","name","barcodeHeight","type","text",1,"form-control","fs-2",3,"ngModelChange","maskito","ngModel"],["for","fontSize",1,"fs-2","d-inline-block","text-truncate"],["id","fontSize","name","fontSize","type","text",1,"form-control","fs-2",3,"ngModelChange","maskito","ngModel"]],template:function(n,r){n&1&&(f(0,"table",0)(1,"tbody")(2,"tr")(3,"td")(4,"label",1),x(5,"Paper Source"),m()(),f(6,"td")(7,"ng-select",2),W("ngModelChange",function(s){return r.onChangePaperSource(s)}),Zt(8,ok,2,2,"ng-option",3,ls),m()(),f(10,"td")(11,"span",4),x(12),m()()(),f(13,"tr")(14,"td")(15,"label",5),x(16,"Paper Width"),m()(),f(17,"td")(18,"input",6),W("ngModelChange",function(s){return r.onInputHandler(s,"paperWidth")}),m()(),f(19,"td")(20,"span",4),x(21),m()()(),f(22,"tr")(23,"td")(24,"label",7),x(25,"Sticker Width"),m()(),f(26,"td")(27,"input",8),W("ngModelChange",function(s){return r.onInputHandler(s,"stickerWidth")}),m()(),f(28,"td")(29,"span",4),x(30),m()()(),f(31,"tr")(32,"th")(33,"label",9),x(34,"Sticker Height"),m()(),f(35,"td")(36,"input",10),W("ngModelChange",function(s){return r.onInputHandler(s,"stickerHeight")}),m()(),f(37,"td")(38,"span",4),x(39),m()()(),f(40,"tr")(41,"td")(42,"label",11),x(43,"Barcode Height"),m()(),f(44,"td")(45,"input",12),W("ngModelChange",function(s){return r.onInputHandler(s,"barcodeHeight")}),m()(),f(46,"td")(47,"span",4),x(48),m()()(),f(49,"tr")(50,"td")(51,"label",13),x(52,"Font Size"),m()(),f(53,"td")(54,"input",14),W("ngModelChange",function(s){return r.onInputHandler(s,"fontSize")}),m()(),f(55,"td")(56,"span",4),x(57),m()()()()()),n&2&&(y(7),P("ngModel",r.storeService.paperSource()),y(),Jt(r.storeService.paperConfig().PaperFormats),y(4),I(r.tooltip.paperWidth),y(6),P("maskito",r.options)("ngModel",r.paperWidth()),y(3),I(r.tooltip.paperWidth),y(6),P("maskito",r.options)("ngModel",r.stickerWidth()),y(3),I(r.tooltip.stickerWidth),y(6),P("maskito",r.options)("ngModel",r.stickerHeight()),y(3),I(r.tooltip.stickerHeight),y(6),P("maskito",r.options)("ngModel",r.barcodeHeight()),y(3),I(r.tooltip.barcodeHeight),y(6),P("maskito",r.options)("ngModel",r.fontSize()),y(3),I(r.tooltip.fontSize))},dependencies:[ht,tt,it,Dt,rt,oi,_i,As,Ji],styles:["table[_ngcontent-%COMP%] > tbody[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%] > td[_ngcontent-%COMP%]{vertical-align:middle}table[_ngcontent-%COMP%] > tbody[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%] > td[_ngcontent-%COMP%]:last-child{width:50%}"],changeDetection:0})}}return i})();function sk(i,e){if(i&1&&(f(0,"span",14),x(1),m()),i&2){let t=O();y(),I(t.tooltip.leftIndent)}}function ak(i,e){if(i&1&&(f(0,"span",14),x(1),m()),i&2){let t=O();y(),I(t.tooltip.topIndent)}}function lk(i,e){if(i&1&&(f(0,"span",14),x(1),m()),i&2){let t=O();y(),I(t.tooltip.rowSpacing)}}function ck(i,e){if(i&1&&(f(0,"span",14),x(1),m()),i&2){let t=O();y(),I(t.tooltip.columnSpacing)}}var ky=(()=>{class i{constructor(){this.options=Ft,this.tooltip={leftIndent:"The number of pixels appended before the first COLUMN",topIndent:"The number of pixels appended after the first ROW",rowSpacing:"The number of pixels between each ROW",columnSpacing:"The number of pixels between each COLUMN"},this.leftIndent=q(0),this.topIndent=q(0),this.rowSpacing=q(0),this.columnSpacing=q(0),this.storeService=z(ke),this.destroyRef=z(Ye),this.injector=z(Xe)}onInputHandler(t,n){switch(n){case"marginLeft":this.leftIndent.set(parseFloat(t.replace("px",""))),this.storeService.onChangePaperConfiguration(D(v({},this.storeService.paperConfiguration()),{MarginLeft:this.leftIndent()}));break;case"marginTop":this.topIndent.set(parseFloat(t.replace("px",""))),this.storeService.onChangePaperConfiguration(D(v({},this.storeService.paperConfiguration()),{MarginTop:this.topIndent()}));break;case"rowSpacing":this.rowSpacing.set(parseFloat(t.replace("px",""))),this.storeService.onChangePaperConfiguration(D(v({},this.storeService.paperConfiguration()),{RowSpacing:this.rowSpacing()}));break;case"columnSpacing":this.columnSpacing.set(parseFloat(t.replace("px",""))),this.storeService.onChangePaperConfiguration(D(v({},this.storeService.paperConfiguration()),{ColumnSpacing:this.columnSpacing()}));break}}ngOnInit(){pt(this.storeService.paperConfiguration,{injector:this.injector}).pipe(Je(this.destroyRef),xe(t=>{this.leftIndent.set(t.MarginLeft),this.topIndent.set(t.MarginTop),this.rowSpacing.set(t.RowSpacing),this.columnSpacing.set(t.ColumnSpacing)})).subscribe()}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275cmp=fe({type:i,selectors:[["app-pp-spacing"]],standalone:!0,features:[_e],decls:46,vars:12,consts:[["leftIndentTemplate",""],["topIndentTemplate",""],["rowSpacingTemplate",""],["columnSpacingTemplate",""],[1,"table","table-bordered"],["for","leftIndent",1,"fs-2","d-inline-block","text-truncate"],["id","leftIndent","name","leftIndent","type","text","inputmode","number",1,"form-control","fs-2",3,"ngModelChange","maskito","ngModel"],[1,"form-text","fst-italic","fs-2","fw-normal"],["for","topIndent",1,"fs-2","d-inline-block","text-truncate"],["id","topIndent","name","topIndent","type","text","inputmode","number",1,"form-control","fs-2",3,"ngModelChange","maskito","ngModel"],["for","rowSpacing",1,"fs-2","d-inline-block","text-truncate"],["id","rowSpacing","name","rowSpacing","type","text","inputmode","number",1,"form-control","fs-2",3,"ngModelChange","maskito","ngModel"],["for","columnSpacing",1,"fs-2","d-inline-block","text-truncate"],["id","columnSpacing","name","columnSpacing","type","text","inputmode","number",1,"form-control","fs-2",3,"ngModelChange","maskito","ngModel"],[1,"fst-italic"]],template:function(n,r){if(n&1){let o=Ie();f(0,"table",4)(1,"tbody")(2,"tr")(3,"td")(4,"label",5),x(5,"Left Indent"),m()(),f(6,"td")(7,"input",6),W("ngModelChange",function(a){return se(o),ae(r.onInputHandler(a,"marginLeft"))}),m()(),f(8,"td")(9,"span",7),x(10),m()()(),f(11,"tr")(12,"td")(13,"label",8),x(14,"Top Indent"),m()(),f(15,"td")(16,"input",9),W("ngModelChange",function(a){return se(o),ae(r.onInputHandler(a,"marginTop"))}),m()(),f(17,"td")(18,"span",7),x(19),m()()(),f(20,"tr")(21,"td")(22,"label",10),x(23,"Row Spacing"),m()(),f(24,"td")(25,"input",11),W("ngModelChange",function(a){return se(o),ae(r.onInputHandler(a,"rowSpacing"))}),m()(),f(26,"td")(27,"span",7),x(28),m()()(),f(29,"tr")(30,"th")(31,"label",12),x(32,"Column Spacing"),m()(),f(33,"td")(34,"input",13),W("ngModelChange",function(a){return se(o),ae(r.onInputHandler(a,"columnSpacing"))}),m()(),f(35,"td")(36,"span",7),x(37),m()()()()(),le(38,sk,2,1,"ng-template",null,0,me)(40,ak,2,1,"ng-template",null,1,me)(42,lk,2,1,"ng-template",null,2,me)(44,ck,2,1,"ng-template",null,3,me)}n&2&&(y(7),P("maskito",r.options)("ngModel",r.leftIndent()),y(3),I(r.tooltip.leftIndent),y(6),P("maskito",r.options)("ngModel",r.topIndent()),y(3),I(r.tooltip.topIndent),y(6),P("maskito",r.options)("ngModel",r.rowSpacing()),y(3),I(r.tooltip.rowSpacing),y(6),P("maskito",r.options)("ngModel",r.columnSpacing()),y(3),I(r.tooltip.columnSpacing))},dependencies:[ht,tt,it,Dt,rt,Ji,oi],styles:["table[_ngcontent-%COMP%] > tbody[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%] > td[_ngcontent-%COMP%]{vertical-align:middle}table[_ngcontent-%COMP%] > tbody[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%] > td[_ngcontent-%COMP%]:last-child{width:50%}"],changeDetection:0})}}return i})();function dk(i,e){if(i&1&&(f(0,"span",8),x(1),m()),i&2){let t=O();y(),I(t.tooltip.basicPriceLabel)}}function uk(i,e){if(i&1&&(f(0,"span",8),x(1),m()),i&2){let t=O();y(),I(t.tooltip.promotionPriceLabel)}}var Ty=(()=>{class i{constructor(){this.tooltip={basicPriceLabel:"Custom label normal price",promotionPriceLabel:"Custom label promotion price"},this.storeService=z(ke),this.destroyRef=z(Ye),this.injector=z(Xe),this.basicPriceLabel=q(""),this.promotionPriceLabel=q(""),this.options=Ft}ngOnInit(){pt(this.storeService.paperConfiguration,{injector:this.injector}).pipe(Je(this.destroyRef),xe(t=>{this.basicPriceLabel.set(t.BasicPriceLabel),this.promotionPriceLabel.set(t.PromotionPriceLabel)})).subscribe()}onInputHandler(t,n){switch(n){case"basicPriceLabel":this.basicPriceLabel.set(t),this.storeService.onChangePaperConfiguration(D(v({},this.storeService.paperConfiguration()),{BasicPriceLabel:this.basicPriceLabel()}));break;case"promotionPriceLabel":this.promotionPriceLabel.set(t),this.storeService.onChangePaperConfiguration(D(v({},this.storeService.paperConfiguration()),{PromotionPriceLabel:this.promotionPriceLabel()}));break}}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275cmp=fe({type:i,selectors:[["app-pp-label"]],standalone:!0,features:[_e],decls:24,vars:4,consts:[["basicPriceLabelTemplate",""],["promotionPriceLabelTemplate",""],[1,"table","table-bordered"],["for","normalPrice",1,"fs-2","d-inline-block","text-truncate"],["id","normalPrice","name","basicPriceLabel","type","text",1,"form-control","fs-2",3,"ngModelChange","ngModel"],[1,"form-text","fst-italic","fs-2","fw-normal"],["for","promotionPrice",1,"fs-2","d-inline-block","text-truncate"],["id","promotionPrice","name","promotionPriceLabel","type","text",1,"form-control","fs-1",3,"ngModelChange","ngModel"],[1,"fst-italic"]],template:function(n,r){if(n&1){let o=Ie();f(0,"table",2)(1,"tbody")(2,"tr")(3,"td")(4,"label",3),x(5,"Normal Price"),m()(),f(6,"td")(7,"input",4),W("ngModelChange",function(a){return se(o),ae(r.onInputHandler(a,"basicPriceLabel"))}),m()(),f(8,"td")(9,"span",5),x(10),m()()(),f(11,"tr")(12,"td")(13,"label",6),x(14,"Promotion Price"),m()(),f(15,"td")(16,"input",7),W("ngModelChange",function(a){return se(o),ae(r.onInputHandler(a,"promotionPriceLabel"))}),m()(),f(17,"td")(18,"span",5),x(19),m()()()()(),le(20,dk,2,1,"ng-template",null,0,me)(22,uk,2,1,"ng-template",null,1,me)}n&2&&(y(7),P("ngModel",r.basicPriceLabel()),y(3),I(r.tooltip.basicPriceLabel),y(6),P("ngModel",r.promotionPriceLabel()),y(3),I(r.tooltip.promotionPriceLabel))},dependencies:[ht,tt,it,Dt,rt],styles:["table[_ngcontent-%COMP%] > tbody[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%] > td[_ngcontent-%COMP%]{vertical-align:middle}table[_ngcontent-%COMP%] > tbody[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%] > td[_ngcontent-%COMP%]:last-child{width:50%}"],changeDetection:0})}}return i})();var Fy=De(Iy());function pk(i,e){if(i&1){let t=Ie();f(0,"tr")(1,"td")(2,"label",6),x(3,"Pricebook Font Size"),m()(),f(4,"td")(5,"input",7),W("ngModelChange",function(r){se(t);let o=O();return ae(o.onInputHandler(r,"pricebookFontSize"))}),m()(),f(6,"td")(7,"span",5),x(8),m()()()}if(i&2){let t=O();y(5),P("maskito",t.options)("ngModel",t.pricebookFontSize()),y(3),I(t.tooltip.pricebookFontSize)}}function hk(i,e){if(i&1&&(f(0,"span",8),x(1),m()),i&2){let t=O();y(),I(t.tooltip.pricebookFontSize)}}function fk(i,e){if(i&1&&(f(0,"span",8),x(1),m()),i&2){let t=O();y(),I(t.tooltip.fontSize)}}var Oy=(()=>{class i{constructor(){this.options=Ft,this.barcodeHeight=q(0),this.fontSize=q(0),this.barcode=q(!1),this.code=q(!1),this.price=q(!1),this.name=q(!1),this.moveProductName=q(!1),this.releaseDate=q(!1),this.discountVisible=q(!1),this.pricebookPrice=q(!1),this.pricebookFontSize=q(0),this.tooltip={fontSize:"Change font size for price",pricebookFontSize:"Change font size for pricebook price"},this.storeService=z(ke),this.injector=z(Xe),this.destroyRef=z(Ye)}ngOnInit(){pt(this.storeService.paperConfiguration,{injector:this.injector}).pipe(Je(this.destroyRef),xe(t=>{this.pricebookFontSize.set(t.PricebookFontSize),this.fontSize.set(t.PriceFontSize)})).subscribe()}onInputHandler(t,n){switch(console.log("value",t),n){case"pricebookFontSize":this.fontSize.set(parseFloat(t.replace("px",""))),this.storeService.onChangePaperConfiguration(D(v({},this.storeService.paperConfiguration()),{ProductNameFontSize:this.fontSize()}));break;case"fontSize":this.fontSize.set(parseFloat(t.replace("px",""))),this.storeService.onChangePaperConfiguration(D(v({},this.storeService.paperConfiguration()),{PriceFontSize:this.fontSize()}));break}}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275cmp=fe({type:i,selectors:[["app-price-fontsize"]],standalone:!0,features:[_e],decls:16,vars:4,consts:[["pricebookFontSizeTemplate",""],["fontSizeTemplate",""],[1,"table","table-bordered"],["for","fontSize",1,"fs-2","d-inline-block","text-truncate"],["id","fontSize","name","fontSize","type","text","inputmode","number",1,"form-control","fs-2",3,"ngModelChange","maskito","ngModel"],[1,"form-text","fst-italic","fs-2","fw-normal"],["for","pricebookFontSize",1,"fs-2","d-inline-block","text-truncate"],["id","pricebookFontSize","name","pricebookFontSize","type","text","inputmode","number",1,"form-control","fs-2",3,"ngModelChange","maskito","ngModel"],[1,"fst-italic"]],template:function(n,r){if(n&1){let o=Ie();f(0,"table",2)(1,"tbody"),le(2,pk,9,3,"tr"),f(3,"tr")(4,"td")(5,"label",3),x(6,"Font Size"),m()(),f(7,"td")(8,"input",4),W("ngModelChange",function(a){return se(o),ae(r.onInputHandler(a,"fontSize"))}),m()(),f(9,"td")(10,"span",5),x(11),m()()()()(),le(12,hk,2,1,"ng-template",null,0,me)(14,fk,2,1,"ng-template",null,1,me)}n&2&&(y(2),Ce(r.storeService.paperConfiguration().PricebookVisible?2:-1),y(6),P("maskito",r.options)("ngModel",r.fontSize()),y(3),I(r.tooltip.fontSize))},dependencies:[Ji,ri,ht,tt,it,Dt],styles:["table[_ngcontent-%COMP%] > tbody[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%] > td[_ngcontent-%COMP%]{vertical-align:middle}table[_ngcontent-%COMP%] > tbody[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%] > td[_ngcontent-%COMP%]:last-child{width:50%}"]})}}return i})();function mk(i,e){i&1&&(f(0,"button",14)(1,"span",13),x(2,"Next"),m(),ue(3,"i",33),m())}function gk(i,e){if(i&1){let t=Ie();f(0,"button",34),W("click",function(){se(t);let r=O();return ae(r.printBarcode())}),f(1,"span",13),x(2,"Print"),m()()}}var Ry=(()=>{class i{constructor(){this.storeService=z(ke),this.httpService=z(bi),this.toastr=z(Ts),this.destroyRef=z(Ye)}ngOnInit(){document.addEventListener("keydown",t=>{t instanceof KeyboardEvent&&t.key==="p"&&t.ctrlKey&&(t.preventDefault(),this.printBarcode())})}printBarcode(){let t=0;switch(this.storeService.paperSource()){case"Continuous - 3 Column":t=3;break;case"Continuous - 2 Column":t=2;break;case"Continuous - 1 Column":t=1;break;case"Tom & Jerry 107":t=3;break;case"Tom & Jerry 108":t=5;break}(0,Fy.default)({printable:"barcode-container",type:"html",css:"https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css",style:`
|
|
31
31
|
body {
|
|
32
32
|
font-family: Arial, Helvetica, sans-serif;
|
|
33
33
|
font-size: ${this.storeService.paperConfiguration().ProductNameFontSize}px;
|