marketplacepos 5.43.13 → 5.44.0
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/Marketplace/3rdpartylicenses.txt +41 -41
- package/Marketplace/{chunk-IVHM5DMM.js → chunk-22AHRDNQ.js} +1 -1
- package/Marketplace/{chunk-YSJSAVBS.js → chunk-2ODVHD2K.js} +1 -1
- package/Marketplace/{chunk-DRHWRRQV.js → chunk-35XX6SQT.js} +1 -1
- package/Marketplace/{chunk-5BSS4CVK.js → chunk-3OIE7ARG.js} +1 -1
- package/Marketplace/chunk-3VUDKIND.js +1 -0
- package/Marketplace/{chunk-QQXVBN22.js → chunk-4PDRBB73.js} +1 -1
- package/Marketplace/chunk-4YWSKMFD.js +1 -0
- package/Marketplace/{chunk-AJJSLBE3.js → chunk-55BJO7BI.js} +2 -2
- package/Marketplace/{chunk-WS4A4RPE.js → chunk-5GLSI4QU.js} +1 -1
- package/Marketplace/{chunk-G2YN5S5X.js → chunk-5JQJRPL3.js} +1 -1
- package/Marketplace/{chunk-CUEO37N7.js → chunk-5W7TCSDK.js} +1 -1
- package/Marketplace/{chunk-2GSWEJRP.js → chunk-64JGYG54.js} +1 -1
- package/Marketplace/{chunk-2IDDYNBR.js → chunk-6BIM4KEI.js} +1 -1
- package/Marketplace/{chunk-722SRHLY.js → chunk-6RKA4STM.js} +1 -1
- package/Marketplace/{chunk-QWHPQWPM.js → chunk-77JJJNRM.js} +1 -1
- package/Marketplace/{chunk-SRVGUGY2.js → chunk-AO46RPZ4.js} +1 -1
- package/Marketplace/{chunk-6FY74YFQ.js → chunk-B5V5KFQU.js} +1 -1
- package/Marketplace/{chunk-PXYBLGMN.js → chunk-BO7BG424.js} +1 -1
- package/Marketplace/{chunk-WIAQQWWF.js → chunk-BU5LUO3S.js} +1 -1
- package/Marketplace/chunk-C3VEI2IE.js +1 -0
- package/Marketplace/{chunk-3B2PNJWF.js → chunk-CCWNSX4Y.js} +1 -1
- package/Marketplace/{chunk-6W6DKFRE.js → chunk-CIAZIJGR.js} +3 -3
- package/Marketplace/{chunk-J2KWRDVH.js → chunk-CUB2QFUO.js} +1 -1
- package/Marketplace/{chunk-WPW3D4MQ.js → chunk-D6URDVES.js} +1 -1
- package/Marketplace/{chunk-POR3OF22.js → chunk-DHIDUIOD.js} +1 -1
- package/Marketplace/{chunk-O5LFGGB2.js → chunk-DL66NZ2A.js} +1 -1
- package/Marketplace/chunk-E2SXYIML.js +2 -0
- package/Marketplace/{chunk-L7K5HOBY.js → chunk-E4KNET2R.js} +1 -1
- package/Marketplace/{chunk-7ZXNQAAU.js → chunk-E4Z7OR75.js} +2 -2
- package/Marketplace/{chunk-GH57P6KF.js → chunk-EJWZFRMT.js} +1 -1
- package/Marketplace/{chunk-NEYMDA6P.js → chunk-ELE7BOLL.js} +1 -1
- package/Marketplace/{chunk-AG2REZBE.js → chunk-ENLYKIFW.js} +8 -8
- package/Marketplace/{chunk-B73M3AMU.js → chunk-EQIFZBRG.js} +1 -1
- package/Marketplace/chunk-EVXMYPWP.js +1 -0
- package/Marketplace/{chunk-E6U3KRK7.js → chunk-G3O7MWIB.js} +1 -1
- package/Marketplace/{chunk-624I4PEE.js → chunk-G5DA2OSB.js} +1 -1
- package/Marketplace/{chunk-7UHCDGAA.js → chunk-G7R7LUW4.js} +1 -1
- package/Marketplace/{chunk-2EOAYJGX.js → chunk-GCDQNJQN.js} +1 -1
- package/Marketplace/{chunk-G47XGOST.js → chunk-GIRXMYNI.js} +1 -1
- package/Marketplace/{chunk-5HO2IJ47.js → chunk-GRIUDEPO.js} +1 -1
- package/Marketplace/chunk-H3DIKLA5.js +1 -0
- package/Marketplace/chunk-HWHDJDQN.js +1 -0
- package/Marketplace/chunk-HZHUTC6E.js +1 -0
- package/Marketplace/{chunk-YCH6HHU3.js → chunk-IHNN4Q2N.js} +3 -3
- package/Marketplace/{chunk-H3J5OAIG.js → chunk-IIZDEGGW.js} +2 -2
- package/Marketplace/{chunk-N3P55TG2.js → chunk-IMEGV3MV.js} +1 -1
- package/Marketplace/{chunk-7PN4XLNE.js → chunk-IMK2JGZA.js} +1 -1
- package/Marketplace/{chunk-WHG5PPSE.js → chunk-JF4QOCAZ.js} +1 -1
- package/Marketplace/{chunk-TCS2Y6CC.js → chunk-JHYTM6OD.js} +1 -1
- package/Marketplace/{chunk-ZUEJZI4O.js → chunk-JIOSKHGT.js} +1 -1
- package/Marketplace/{chunk-MHCAI6KP.js → chunk-K5GEJ2GZ.js} +1 -1
- package/Marketplace/{chunk-7SVF5UPT.js → chunk-KALG6D6L.js} +1 -1
- package/Marketplace/{chunk-Z7LBV3BO.js → chunk-KGMQTWMX.js} +1 -1
- package/Marketplace/{chunk-U7TVLBC5.js → chunk-KIPJJIYU.js} +1 -1
- package/Marketplace/{chunk-M5JQ7BGW.js → chunk-L3FX4O3H.js} +6 -6
- package/Marketplace/{chunk-CRUPQQ56.js → chunk-LC6TXSYB.js} +1 -1
- package/Marketplace/{chunk-CROPN4YC.js → chunk-LDHQNVI5.js} +1 -1
- package/Marketplace/chunk-LFAU6HXM.js +1 -0
- package/Marketplace/{chunk-6NHTTVBK.js → chunk-LRCKOJEI.js} +1 -1
- package/Marketplace/{chunk-6G5WVJGA.js → chunk-LYBSI3ZX.js} +1 -1
- package/Marketplace/{chunk-LROLRGKE.js → chunk-LYZVX4EZ.js} +1 -1
- package/Marketplace/{chunk-YD5TUVFF.js → chunk-M6YFSBMG.js} +1 -1
- package/Marketplace/{chunk-6BAZYVHI.js → chunk-MDHPQWC7.js} +2 -2
- package/Marketplace/{chunk-3BT5DR3X.js → chunk-MH4SJTQX.js} +1 -1
- package/Marketplace/{chunk-2TRFYYCP.js → chunk-MKUH4R2N.js} +1 -1
- package/Marketplace/chunk-MRODDSR7.js +1 -0
- package/Marketplace/chunk-MS3ZBCON.js +157 -0
- package/Marketplace/{chunk-XBUZ27V4.js → chunk-NDSJ4AAU.js} +1 -1
- package/Marketplace/{chunk-GMVNN57A.js → chunk-NSS35UR3.js} +1 -1
- package/Marketplace/{chunk-OLCFJJOD.js → chunk-OFD3D5IO.js} +1 -1
- package/Marketplace/{chunk-3TDK2RMH.js → chunk-OFUTQWBX.js} +1 -1
- package/Marketplace/{chunk-RZU7PSKG.js → chunk-OPFENZ3W.js} +1 -1
- package/Marketplace/{chunk-3NMM37H7.js → chunk-P7NATRFC.js} +1 -1
- package/Marketplace/{chunk-IRLIWSK5.js → chunk-PANQ33RQ.js} +1 -1
- package/Marketplace/{chunk-JDIBETL5.js → chunk-PNITO7BE.js} +1 -1
- package/Marketplace/{chunk-EOZ2J2CF.js → chunk-PVPN53WE.js} +1 -1
- package/Marketplace/{chunk-PFB7XEYZ.js → chunk-QJJ2WFVX.js} +1 -1
- package/Marketplace/chunk-QYCOQS7D.js +2 -0
- package/Marketplace/{chunk-2YFZS6SG.js → chunk-RHCH74ZR.js} +1 -1
- package/Marketplace/chunk-RMAEWPJV.js +1 -0
- package/Marketplace/{chunk-VKMFDXJJ.js → chunk-SLI26GUH.js} +1 -1
- package/Marketplace/{chunk-C3HL4S2R.js → chunk-STPUGFHI.js} +1 -1
- package/Marketplace/{chunk-EZY2ATQQ.js → chunk-TPC5KHGH.js} +1 -1
- package/Marketplace/{chunk-LOBNKJGT.js → chunk-TPW56VWM.js} +1 -1
- package/Marketplace/chunk-TZQFN56G.js +1 -0
- package/Marketplace/{chunk-JILE74BG.js → chunk-UBXKO4QI.js} +1 -1
- package/Marketplace/{chunk-J7AN3ZQL.js → chunk-UCQKKX2L.js} +1 -1
- package/Marketplace/{chunk-CLER2MX6.js → chunk-UGVEAL7H.js} +3 -3
- package/Marketplace/{chunk-2OVYEC6Q.js → chunk-UUSBNUEH.js} +1 -1
- package/Marketplace/{chunk-ALSCWTAY.js → chunk-V4D6BB2N.js} +1 -1
- package/Marketplace/chunk-W3L5LPU5.js +1 -0
- package/Marketplace/{chunk-E6XWD6WX.js → chunk-W6FZQ6XT.js} +1 -1
- package/Marketplace/{chunk-OPXWL5G6.js → chunk-W7H6T326.js} +1 -1
- package/Marketplace/{chunk-MMVLDCF6.js → chunk-W7VYUPIP.js} +1 -1
- package/Marketplace/chunk-WKUTDZ7J.js +5 -0
- package/Marketplace/chunk-WY4BY2ID.js +3 -0
- package/Marketplace/chunk-X67M7TFE.js +1 -0
- package/Marketplace/{chunk-G2CMMGM2.js → chunk-X743YBE6.js} +1 -1
- package/Marketplace/chunk-XF4BVLTJ.js +1 -0
- package/Marketplace/chunk-XYEV5RMD.js +1 -0
- package/Marketplace/{chunk-BFU7VKO3.js → chunk-YM4TJJMM.js} +1 -1
- package/Marketplace/{chunk-CIIO2CJ6.js → chunk-YPWHTELF.js} +1 -1
- package/Marketplace/chunk-YRSF6N67.js +1 -0
- package/Marketplace/{chunk-DYWTLXMP.js → chunk-Z5GRNGHJ.js} +1 -1
- package/Marketplace/chunk-ZEYELO7U.js +1 -0
- package/Marketplace/chunk-ZMEMG7ZN.js +1 -0
- package/Marketplace/{chunk-L64EL5OU.js → chunk-ZQ5EGXEB.js} +2 -2
- package/Marketplace/{chunk-4JKDNUTX.js → chunk-ZXNM4AGN.js} +1 -1
- package/Marketplace/index.html +3 -3
- package/Marketplace/{main-2SUNMEPM.js → main-WUG4WUAT.js} +1 -1
- package/package.json +1 -1
- package/Marketplace/chunk-4B4NNOKK.js +0 -1
- package/Marketplace/chunk-56IX4GTG.js +0 -1
- package/Marketplace/chunk-67N4UGA5.js +0 -2
- package/Marketplace/chunk-7AQ244V7.js +0 -5
- package/Marketplace/chunk-DRMAONR7.js +0 -1
- package/Marketplace/chunk-GSZJGR7K.js +0 -2
- package/Marketplace/chunk-GVL2YXE5.js +0 -1
- package/Marketplace/chunk-HLOBDI4F.js +0 -2
- package/Marketplace/chunk-I7FTVK26.js +0 -1
- package/Marketplace/chunk-MY5ZX6JG.js +0 -1
- package/Marketplace/chunk-OOCYP2XG.js +0 -1
- package/Marketplace/chunk-Q3MVAL6O.js +0 -1
- package/Marketplace/chunk-QINGXOOA.js +0 -1
- package/Marketplace/chunk-SMUCMLEE.js +0 -1
- package/Marketplace/chunk-UG7VRDLB.js +0 -3
- package/Marketplace/chunk-V2RVHNCX.js +0 -1
- package/Marketplace/chunk-ZWBTWIGY.js +0 -1
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import{a as so,b as co,c as po,d as mo,e as Vi}from"./chunk-QWHPQWPM.js";import{a as lo}from"./chunk-VKMFDXJJ.js";import{a as Re}from"./chunk-2GSWEJRP.js";import{a as ao,b as ro}from"./chunk-PFB7XEYZ.js";import"./chunk-UEPQYAWE.js";import{a as oo,b as ui}from"./chunk-7UHCDGAA.js";import{a as qt}from"./chunk-PE5AFID4.js";import{a as Ue,b as je,c as Ae}from"./chunk-MHCAI6KP.js";import{a as eo,d as io}from"./chunk-L7K5HOBY.js";import"./chunk-3LRWABHB.js";import{a as Xn}from"./chunk-G47XGOST.js";import{a as mi,b as hi}from"./chunk-CIIO2CJ6.js";import"./chunk-OC2FBL33.js";import"./chunk-NS46QSCM.js";import{a as no}from"./chunk-M5XGP4SG.js";import{b as to}from"./chunk-H3J5OAIG.js";import"./chunk-AQTXFEBA.js";import"./chunk-5OHRA4AS.js";import{a as $n}from"./chunk-SDUUFQUI.js";import{a as Wi}from"./chunk-IL5JIRWJ.js";import{c as Jn}from"./chunk-3BT5DR3X.js";import"./chunk-EH6HWI3G.js";import"./chunk-E3ROEHBW.js";import"./chunk-OLOIQI4D.js";import"./chunk-IA6KOBDJ.js";import"./chunk-RECNBAEB.js";import"./chunk-SN4AOGQK.js";import"./chunk-SB7NWPDS.js";import"./chunk-AYPY47VM.js";import"./chunk-SM3P57SO.js";import{a as dt}from"./chunk-G2CMMGM2.js";import"./chunk-3RK6DDJD.js";import{a as Qn}from"./chunk-J2KWRDVH.js";import{a as qn,c as Kn,d as Zn,f as Yn}from"./chunk-7SVF5UPT.js";import{a as ft}from"./chunk-UMP6ZMEJ.js";import{b as jn}from"./chunk-PAEIUO2F.js";import"./chunk-OZ7LWNOK.js";import"./chunk-ECRWEMEV.js";import"./chunk-LZCEM2PC.js";import{a as Hn,b as Un}from"./chunk-7PN4XLNE.js";import{a as Li}from"./chunk-CMTBBXR5.js";import{a as pi}from"./chunk-WPW3D4MQ.js";import"./chunk-UG7VRDLB.js";import"./chunk-Z3ITXK3D.js";import"./chunk-ACIMXBIC.js";import"./chunk-TGMCGROM.js";import{a as Te}from"./chunk-5HO2IJ47.js";import{a as Pn,b as On,d as Me,e as te}from"./chunk-5JVEEL2T.js";import{b as w,c as F}from"./chunk-PW42BQIY.js";import{b as It,c as Gt}from"./chunk-SWQXSJ7O.js";import"./chunk-AEOSNAHH.js";import{b as ae,e as ye}from"./chunk-JXSBFTQM.js";import"./chunk-K5XRGNWG.js";import{b as Gn,d as xt,j as Ni,k as Bn,m as Fe,n as Dt}from"./chunk-CLER2MX6.js";import{A as lt,B as Y,c as Oe,e as K,g as xn,h as H,i as X,j as Dn,k as kn,l as zt,m as wt,n as $,o as Tt,q as Z,r as oe,s as ee,z as En}from"./chunk-6QYD6NIJ.js";import{a as gt}from"./chunk-ATZ475FN.js";import{a as Wn,c as Vn,d as zn,r as R,s as W}from"./chunk-YCH6HHU3.js";import{E as jt,M as Ai,a as Mn,b as Fn,c as di,e as Bt,f as st,i as Fi,j as ct,k as Rn,m as Ht,n as An,o as Nn,v as Ut,w as Ri,y as Ln}from"./chunk-B73M3AMU.js";import{E as ci,F as In,G as at,H as Pe,J as rt,a as St,d as L,f as fe,g as z,j as _e,k as He,m as si,n as I}from"./chunk-M2FCTYGU.js";import{$ as mt,$c as P,Ac as Mi,Bc as ke,Ca as vn,Cc as Ee,E as un,Ea as ii,F as ze,Fc as Be,G as $e,Ga as _n,Gb as S,Gc as c,Hb as tt,Hc as v,Ib as it,Ic as O,Jb as Sn,K as ti,Ka as j,Kb as oi,Kc as ce,La as bt,Lc as de,Mb as h,Mc as pe,Nc as wn,O as fn,Oa as Nt,Pa as Ze,Qc as he,Ra as Lt,Rc as Wt,Sa as yn,Sc as y,Tc as ne,Xa as bn,Xb as we,Yb as p,Z as Ce,Zc as Tn,_b as nt,a as yt,aa as Q,ac as ai,ad as G,bd as me,c as Pi,ca as Se,cb as ni,cd as ot,dc as b,ea as ie,f as B,g as We,ic as a,ja as ge,jc as r,jd as Ct,ka as et,kc as g,l as hn,lc as k,m as At,ma as xe,mc as E,oa as gn,oc as A,od as ue,pa as f,pb as ht,pc as ri,pd as Vt,q as Ve,rb as l,tc as C,uc as u,v as se,vb as Oi,vc as ut,wc as De,xa as J,xb as V,xc as li,ya as x,za as D,zb as Cn,zc as Ge}from"./chunk-B7KTCPKC.js";import"./chunk-EU2KAMEK.js";import{a as Ke,b as mn}from"./chunk-66YHNWRR.js";var ho=(()=>{class n{constructor(){this.channelTabs=[{Title:"Channel",Url:"/menu/channel/marketplace"},{Title:"POS",Url:"/menu/channel/pos"},{Title:"Flush Cache",Url:"/menu/channel/flush_cache"}]}ngOnInit(){}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275cmp=S({type:n,selectors:[["app-channels"]],standalone:!1,decls:5,vars:1,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid"],[3,"Tabs"]],template:function(i,t){i&1&&(a(0,"nav",0)(1,"div",1)(2,"div"),g(3,"nav-tab",2),r()()(),g(4,"router-outlet")),i&2&&(l(3),p("Tabs",t.channelTabs))},dependencies:[Hn,In],styles:[".form-label-group[_ngcontent-%COMP%]{position:relative;margin-bottom:1rem}.form-label-group[_ngcontent-%COMP%] > input[_ngcontent-%COMP%]{height:3.625rem;padding:.75rem;color:#343434;font-size:.875rem;border-radius:.25rem!important;border-color:#c8d3df}.form-label-group[_ngcontent-%COMP%] > input[_ngcontent-%COMP%]:focus{border:solid 1.5px #1A73E8!important}.form-label-group[_ngcontent-%COMP%] > label[_ngcontent-%COMP%]{width:auto;position:absolute;top:1.125rem;left:.75rem;display:block;margin-bottom:0;line-height:1.5;color:#ccc;pointer-events:none;cursor:text;border:1px solid transparent;border-radius:.25rem;transition:all .1s ease-in-out;font-size:.875rem}.form-label-group[_ngcontent-%COMP%] > textarea[_ngcontent-%COMP%]{padding:.75rem;color:#343434;resize:both;font-size:.875rem;border-radius:.25rem;border-color:#c8d3df}.form-label-group[_ngcontent-%COMP%] > textarea[_ngcontent-%COMP%] ~ label[_ngcontent-%COMP%]{top:.9375rem}.form-label-group[_ngcontent-%COMP%] > textarea[_ngcontent-%COMP%]:focus{border:solid 1.5px #1A73E8!important}.form-label-group[_ngcontent-%COMP%] > textarea[_ngcontent-%COMP%]:focus ~ label[_ngcontent-%COMP%]{top:1rem;left:.78125rem}.form-label-group[_ngcontent-%COMP%] > ng-select[_ngcontent-%COMP%] .ng-select-container{min-height:3.625rem;border-color:#c8d3df;box-shadow:none}.form-label-group[_ngcontent-%COMP%] > ng-select[_ngcontent-%COMP%] ~ label[_ngcontent-%COMP%]{display:inline-block;top:-.625rem;background-color:#fff;font-size:.75rem!important;color:#9da2a6;padding:0 .25rem;z-index:1002;left:.5rem}.form-label-group.multiple[_ngcontent-%COMP%] ng-select[_ngcontent-%COMP%] .ng-input{padding-left:.25rem!important}.form-label-group.multiple[_ngcontent-%COMP%] ng-select[_ngcontent-%COMP%] .ng-placeholder{top:18px!important}.form-label-group.radio[_ngcontent-%COMP%]{height:3.625rem;padding:.75rem;color:#343434;border-radius:.25rem!important;border:solid 1px #c8d3df}.form-label-group.radio[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{font-size:.75rem!important;top:-10px!important;padding:0 .25rem;left:.5rem}.form-label-group.empty[_ngcontent-%COMP%] ng-select[_ngcontent-%COMP%] ~ label[_ngcontent-%COMP%]{display:none}.form-label-group[_ngcontent-%COMP%] input[_ngcontent-%COMP%]::-webkit-input-placeholder, .form-label-group[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:-ms-input-placeholder, .form-label-group[_ngcontent-%COMP%] input[_ngcontent-%COMP%]::-ms-input-placeholder, .form-label-group[_ngcontent-%COMP%] input[_ngcontent-%COMP%]::-moz-placeholder, .form-label-group[_ngcontent-%COMP%] input[_ngcontent-%COMP%]::placeholder, .form-label-group[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]::-webkit-input-placeholder, .form-label-group[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]:-ms-input-placeholder, .form-label-group[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]::-ms-input-placeholder, .form-label-group[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]::-moz-placeholder, .form-label-group[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]::placeholder{color:transparent}.form-label-group[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:not(:placeholder-shown) ~ label[_ngcontent-%COMP%], .form-label-group[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]:not(:placeholder-shown) ~ label[_ngcontent-%COMP%]{background-color:#fff;font-size:.75rem!important;color:#9da2a6;top:-10px!important;padding:0 .25rem;left:.5rem}.form-label-group[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:not(:placeholder-shown):focus ~ label[_ngcontent-%COMP%], .form-label-group[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]:not(:placeholder-shown):focus ~ label[_ngcontent-%COMP%]{color:#3f8aec}.form-label-group[_ngcontent-%COMP%] ng-select[_ngcontent-%COMP%] .ng-placeholder{padding-left:.25rem;color:#ccc!important;font-size:.875rem}.form-label-group[_ngcontent-%COMP%] ng-select[_ngcontent-%COMP%] .ng-has-value .ng-value{padding-left:.25rem;font-size:.875rem}.form-label-group[_ngcontent-%COMP%] ng-select[_ngcontent-%COMP%] .ng-value-container{overflow:initial!important}.form-label-group[_ngcontent-%COMP%] ng-select[_ngcontent-%COMP%] .ng-input{top:auto!important;padding-left:.875rem!important;font-size:.875rem}"]})}}return n})();function Eo(n){let o=n.cloneNode(!0),e=o.querySelectorAll("[id]"),i=n.nodeName.toLowerCase();o.removeAttribute("id");for(let t=0;t<e.length;t++)e[t].removeAttribute("id");return i==="canvas"?go(n,o):(i==="input"||i==="select"||i==="textarea")&&fo(n,o),uo("canvas",n,o,go),uo("input, textarea, select",n,o,fo),o}function uo(n,o,e,i){let t=o.querySelectorAll(n);if(t.length){let s=e.querySelectorAll(n);for(let d=0;d<t.length;d++)i(t[d],s[d])}}var Va=0;function fo(n,o){o.type!=="file"&&(o.value=n.value),o.type==="radio"&&o.name&&(o.name=`mat-clone-${o.name}-${Va++}`)}function go(n,o){let e=o.getContext("2d");if(e)try{e.drawImage(n,0,0)}catch{}}function Ki(n){let o=n.getBoundingClientRect();return{top:o.top,right:o.right,bottom:o.bottom,left:o.left,width:o.width,height:o.height,x:o.x,y:o.y}}function Bi(n,o,e){let{top:i,bottom:t,left:s,right:d}=n;return e>=i&&e<=t&&o>=s&&o<=d}function Yt(n,o,e){n.top+=o,n.bottom=n.top+n.height,n.left+=e,n.right=n.left+n.width}function vo(n,o,e,i){let{top:t,right:s,bottom:d,left:m,width:_,height:T}=n,N=_*o,be=T*o;return i>t-be&&i<d+be&&e>m-N&&e<s+N}var fi=class{_document;positions=new Map;constructor(o){this._document=o}clear(){this.positions.clear()}cache(o){this.clear(),this.positions.set(this._document,{scrollPosition:this.getViewportScrollPosition()}),o.forEach(e=>{this.positions.set(e,{scrollPosition:{top:e.scrollTop,left:e.scrollLeft},clientRect:Ki(e)})})}handleScroll(o){let e=Bt(o),i=this.positions.get(e);if(!i)return null;let t=i.scrollPosition,s,d;if(e===this._document){let T=this.getViewportScrollPosition();s=T.top,d=T.left}else s=e.scrollTop,d=e.scrollLeft;let m=t.top-s,_=t.left-d;return this.positions.forEach((T,N)=>{T.clientRect&&e!==N&&e.contains(N)&&Yt(T.clientRect,m,_)}),t.top=s,t.left=d,{top:m,left:_}}getViewportScrollPosition(){return{top:window.scrollY,left:window.scrollX}}};function Po(n,o){let e=n.rootNodes;if(e.length===1&&e[0].nodeType===o.ELEMENT_NODE)return e[0];let i=o.createElement("div");return e.forEach(t=>i.appendChild(t)),i}function Zi(n,o,e){for(let i in o)if(o.hasOwnProperty(i)){let t=o[i];t?n.setProperty(i,t,e?.has(i)?"important":""):n.removeProperty(i)}return n}function Et(n,o){let e=o?"":"none";Zi(n.style,{"touch-action":o?"":"none","-webkit-user-drag":o?"":"none","-webkit-tap-highlight-color":o?"":"transparent","user-select":e,"-ms-user-select":e,"-webkit-user-select":e,"-moz-user-select":e})}function _o(n,o,e){Zi(n.style,{position:o?"":"fixed",top:o?"":"0",opacity:o?"":"0",left:o?"":"-999em"},e)}function gi(n,o){return o&&o!="none"?n+" "+o:n}function yo(n,o){n.style.width=`${o.width}px`,n.style.height=`${o.height}px`,n.style.transform=vi(o.left,o.top)}function vi(n,o){return`translate3d(${Math.round(n)}px, ${Math.round(o)}px, 0)`}function bo(n){let o=n.toLowerCase().indexOf("ms")>-1?1:1e3;return parseFloat(n)*o}function za(n){let o=getComputedStyle(n),e=zi(o,"transition-property"),i=e.find(m=>m==="transform"||m==="all");if(!i)return 0;let t=e.indexOf(i),s=zi(o,"transition-duration"),d=zi(o,"transition-delay");return bo(s[t])+bo(d[t])}function zi(n,o){return n.getPropertyValue(o).split(",").map(i=>i.trim())}var Ga=new Set(["position"]),Hi=class{_document;_rootElement;_direction;_initialDomRect;_previewTemplate;_previewClass;_pickupPositionOnPage;_initialTransform;_zIndex;_renderer;_previewEmbeddedView;_preview;get element(){return this._preview}constructor(o,e,i,t,s,d,m,_,T,N){this._document=o,this._rootElement=e,this._direction=i,this._initialDomRect=t,this._previewTemplate=s,this._previewClass=d,this._pickupPositionOnPage=m,this._initialTransform=_,this._zIndex=T,this._renderer=N}attach(o){this._preview=this._createPreview(),o.appendChild(this._preview),Co(this._preview)&&this._preview.showPopover()}destroy(){this._preview.remove(),this._previewEmbeddedView?.destroy(),this._preview=this._previewEmbeddedView=null}setTransform(o){this._preview.style.transform=o}getBoundingClientRect(){return this._preview.getBoundingClientRect()}addClass(o){this._preview.classList.add(o)}getTransitionDuration(){return za(this._preview)}addEventListener(o,e){return this._renderer.listen(this._preview,o,e)}_createPreview(){let o=this._previewTemplate,e=this._previewClass,i=o?o.template:null,t;if(i&&o){let s=o.matchSize?this._initialDomRect:null,d=o.viewContainer.createEmbeddedView(i,o.context);d.detectChanges(),t=Po(d,this._document),this._previewEmbeddedView=d,o.matchSize?yo(t,s):t.style.transform=vi(this._pickupPositionOnPage.x,this._pickupPositionOnPage.y)}else t=Eo(this._rootElement),yo(t,this._initialDomRect),this._initialTransform&&(t.style.transform=this._initialTransform);return Zi(t.style,{"pointer-events":"none",margin:Co(t)?"0 auto 0 0":"0",position:"fixed",top:"0",left:"0","z-index":this._zIndex+""},Ga),Et(t,!1),t.classList.add("cdk-drag-preview"),t.setAttribute("popover","manual"),t.setAttribute("dir",this._direction),e&&(Array.isArray(e)?e.forEach(s=>t.classList.add(s)):t.classList.add(e)),t}};function Co(n){return"showPopover"in n}var Ba={passive:!0},So={passive:!1},Ha={passive:!1,capture:!0},Ua=800,wo=new Set(["position"]),Ui=class{_config;_document;_ngZone;_viewportRuler;_dragDropRegistry;_renderer;_rootElementCleanups;_cleanupShadowRootSelectStart;_preview;_previewContainer;_placeholderRef;_placeholder;_pickupPositionInElement;_pickupPositionOnPage;_anchor;_passiveTransform={x:0,y:0};_activeTransform={x:0,y:0};_initialTransform;_hasStartedDragging=Lt(!1);_hasMoved;_initialContainer;_initialIndex;_parentPositions;_moveEvents=new B;_pointerDirectionDelta;_pointerPositionAtLastDirectionChange;_lastKnownPointerPosition;_rootElement;_ownerSVGElement;_rootElementTapHighlight;_pointerMoveSubscription=yt.EMPTY;_pointerUpSubscription=yt.EMPTY;_scrollSubscription=yt.EMPTY;_resizeSubscription=yt.EMPTY;_lastTouchEventTime;_dragStartTime;_boundaryElement=null;_nativeInteractionsEnabled=!0;_initialDomRect;_previewRect;_boundaryRect;_previewTemplate;_placeholderTemplate;_handles=[];_disabledHandles=new Set;_dropContainer;_direction="ltr";_parentDragRef;_cachedShadowRoot;lockAxis;dragStartDelay=0;previewClass;scale=1;get disabled(){return this._disabled||!!(this._dropContainer&&this._dropContainer.disabled)}set disabled(o){o!==this._disabled&&(this._disabled=o,this._toggleNativeDragInteractions(),this._handles.forEach(e=>Et(e,o)))}_disabled=!1;beforeStarted=new B;started=new B;released=new B;ended=new B;entered=new B;exited=new B;dropped=new B;moved=this._moveEvents;data;constrainPosition;constructor(o,e,i,t,s,d,m){this._config=e,this._document=i,this._ngZone=t,this._viewportRuler=s,this._dragDropRegistry=d,this._renderer=m,this.withRootElement(o).withParent(e.parentDragRef||null),this._parentPositions=new fi(i),d.registerDragItem(this)}getPlaceholderElement(){return this._placeholder}getRootElement(){return this._rootElement}getVisibleElement(){return this.isDragging()?this.getPlaceholderElement():this.getRootElement()}withHandles(o){this._handles=o.map(i=>ct(i)),this._handles.forEach(i=>Et(i,this.disabled)),this._toggleNativeDragInteractions();let e=new Set;return this._disabledHandles.forEach(i=>{this._handles.indexOf(i)>-1&&e.add(i)}),this._disabledHandles=e,this}withPreviewTemplate(o){return this._previewTemplate=o,this}withPlaceholderTemplate(o){return this._placeholderTemplate=o,this}withRootElement(o){let e=ct(o);return e!==this._rootElement&&(this._removeRootElementListeners(),this._rootElementCleanups=this._ngZone.runOutsideAngular(()=>[st(this._renderer,e,"mousedown",this._pointerDown,So),st(this._renderer,e,"touchstart",this._pointerDown,Ba),st(this._renderer,e,"dragstart",this._nativeDragStart,So)]),this._initialTransform=void 0,this._rootElement=e),typeof SVGElement<"u"&&this._rootElement instanceof SVGElement&&(this._ownerSVGElement=this._rootElement.ownerSVGElement),this}withBoundaryElement(o){return this._boundaryElement=o?ct(o):null,this._resizeSubscription.unsubscribe(),o&&(this._resizeSubscription=this._viewportRuler.change(10).subscribe(()=>this._containInsideBoundaryOnResize())),this}withParent(o){return this._parentDragRef=o,this}dispose(){this._removeRootElementListeners(),this.isDragging()&&this._rootElement?.remove(),this._anchor?.remove(),this._destroyPreview(),this._destroyPlaceholder(),this._dragDropRegistry.removeDragItem(this),this._removeListeners(),this.beforeStarted.complete(),this.started.complete(),this.released.complete(),this.ended.complete(),this.entered.complete(),this.exited.complete(),this.dropped.complete(),this._moveEvents.complete(),this._handles=[],this._disabledHandles.clear(),this._dropContainer=void 0,this._resizeSubscription.unsubscribe(),this._parentPositions.clear(),this._boundaryElement=this._rootElement=this._ownerSVGElement=this._placeholderTemplate=this._previewTemplate=this._anchor=this._parentDragRef=null}isDragging(){return this._hasStartedDragging()&&this._dragDropRegistry.isDragging(this)}reset(){this._rootElement.style.transform=this._initialTransform||"",this._activeTransform={x:0,y:0},this._passiveTransform={x:0,y:0}}disableHandle(o){!this._disabledHandles.has(o)&&this._handles.indexOf(o)>-1&&(this._disabledHandles.add(o),Et(o,!0))}enableHandle(o){this._disabledHandles.has(o)&&(this._disabledHandles.delete(o),Et(o,this.disabled))}withDirection(o){return this._direction=o,this}_withDropContainer(o){this._dropContainer=o}getFreeDragPosition(){let o=this.isDragging()?this._activeTransform:this._passiveTransform;return{x:o.x,y:o.y}}setFreeDragPosition(o){return this._activeTransform={x:0,y:0},this._passiveTransform.x=o.x,this._passiveTransform.y=o.y,this._dropContainer||this._applyRootElementTransform(o.x,o.y),this}withPreviewContainer(o){return this._previewContainer=o,this}_sortFromLastPointerPosition(){let o=this._lastKnownPointerPosition;o&&this._dropContainer&&this._updateActiveDropContainer(this._getConstrainedPointerPosition(o),o)}_removeListeners(){this._pointerMoveSubscription.unsubscribe(),this._pointerUpSubscription.unsubscribe(),this._scrollSubscription.unsubscribe(),this._cleanupShadowRootSelectStart?.(),this._cleanupShadowRootSelectStart=void 0}_destroyPreview(){this._preview?.destroy(),this._preview=null}_destroyPlaceholder(){this._placeholder?.remove(),this._placeholderRef?.destroy(),this._placeholder=this._placeholderRef=null}_pointerDown=o=>{if(this.beforeStarted.next(),this._handles.length){let e=this._getTargetHandle(o);e&&!this._disabledHandles.has(e)&&!this.disabled&&this._initializeDragSequence(e,o)}else this.disabled||this._initializeDragSequence(this._rootElement,o)};_pointerMove=o=>{let e=this._getPointerPositionOnPage(o);if(!this._hasStartedDragging()){let t=Math.abs(e.x-this._pickupPositionOnPage.x),s=Math.abs(e.y-this._pickupPositionOnPage.y);if(t+s>=this._config.dragStartThreshold){let m=Date.now()>=this._dragStartTime+this._getDragStartDelay(o),_=this._dropContainer;if(!m){this._endDragSequence(o);return}(!_||!_.isDragging()&&!_.isReceiving())&&(o.cancelable&&o.preventDefault(),this._hasStartedDragging.set(!0),this._ngZone.run(()=>this._startDragSequence(o)))}return}o.cancelable&&o.preventDefault();let i=this._getConstrainedPointerPosition(e);if(this._hasMoved=!0,this._lastKnownPointerPosition=e,this._updatePointerDirectionDelta(i),this._dropContainer)this._updateActiveDropContainer(i,e);else{let t=this.constrainPosition?this._initialDomRect:this._pickupPositionOnPage,s=this._activeTransform;s.x=i.x-t.x+this._passiveTransform.x,s.y=i.y-t.y+this._passiveTransform.y,this._applyRootElementTransform(s.x,s.y)}this._moveEvents.observers.length&&this._ngZone.run(()=>{this._moveEvents.next({source:this,pointerPosition:i,event:o,distance:this._getDragDistance(i),delta:this._pointerDirectionDelta})})};_pointerUp=o=>{this._endDragSequence(o)};_endDragSequence(o){if(this._dragDropRegistry.isDragging(this)&&(this._removeListeners(),this._dragDropRegistry.stopDragging(this),this._toggleNativeDragInteractions(),this._handles&&(this._rootElement.style.webkitTapHighlightColor=this._rootElementTapHighlight),!!this._hasStartedDragging()))if(this.released.next({source:this,event:o}),this._dropContainer)this._dropContainer._stopScrolling(),this._animatePreviewToPlaceholder().then(()=>{this._cleanupDragArtifacts(o),this._cleanupCachedDimensions(),this._dragDropRegistry.stopDragging(this)});else{this._passiveTransform.x=this._activeTransform.x;let e=this._getPointerPositionOnPage(o);this._passiveTransform.y=this._activeTransform.y,this._ngZone.run(()=>{this.ended.next({source:this,distance:this._getDragDistance(e),dropPoint:e,event:o})}),this._cleanupCachedDimensions(),this._dragDropRegistry.stopDragging(this)}}_startDragSequence(o){Kt(o)&&(this._lastTouchEventTime=Date.now()),this._toggleNativeDragInteractions();let e=this._getShadowRoot(),i=this._dropContainer;if(e&&this._ngZone.runOutsideAngular(()=>{this._cleanupShadowRootSelectStart=st(this._renderer,e,"selectstart",ja,Ha)}),i){let t=this._rootElement,s=t.parentNode,d=this._placeholder=this._createPlaceholderElement(),m=this._anchor=this._anchor||this._document.createComment("");s.insertBefore(m,t),this._initialTransform=t.style.transform||"",this._preview=new Hi(this._document,this._rootElement,this._direction,this._initialDomRect,this._previewTemplate||null,this.previewClass||null,this._pickupPositionOnPage,this._initialTransform,this._config.zIndex||1e3,this._renderer),this._preview.attach(this._getPreviewInsertionPoint(s,e)),_o(t,!1,wo),this._document.body.appendChild(s.replaceChild(d,t)),this.started.next({source:this,event:o}),i.start(),this._initialContainer=i,this._initialIndex=i.getItemIndex(this)}else this.started.next({source:this,event:o}),this._initialContainer=this._initialIndex=void 0;this._parentPositions.cache(i?i.getScrollableParents():[])}_initializeDragSequence(o,e){this._parentDragRef&&e.stopPropagation();let i=this.isDragging(),t=Kt(e),s=!t&&e.button!==0,d=this._rootElement,m=Bt(e),_=!t&&this._lastTouchEventTime&&this._lastTouchEventTime+Ua>Date.now(),T=t?Fn(e):Mn(e);if(m&&m.draggable&&e.type==="mousedown"&&e.preventDefault(),i||s||_||T)return;if(this._handles.length){let qe=d.style;this._rootElementTapHighlight=qe.webkitTapHighlightColor||"",qe.webkitTapHighlightColor="transparent"}this._hasMoved=!1,this._hasStartedDragging.set(this._hasMoved),this._removeListeners(),this._initialDomRect=this._rootElement.getBoundingClientRect(),this._pointerMoveSubscription=this._dragDropRegistry.pointerMove.subscribe(this._pointerMove),this._pointerUpSubscription=this._dragDropRegistry.pointerUp.subscribe(this._pointerUp),this._scrollSubscription=this._dragDropRegistry.scrolled(this._getShadowRoot()).subscribe(qe=>this._updateOnScroll(qe)),this._boundaryElement&&(this._boundaryRect=Ki(this._boundaryElement));let N=this._previewTemplate;this._pickupPositionInElement=N&&N.template&&!N.matchSize?{x:0,y:0}:this._getPointerPositionInElement(this._initialDomRect,o,e);let be=this._pickupPositionOnPage=this._lastKnownPointerPosition=this._getPointerPositionOnPage(e);this._pointerDirectionDelta={x:0,y:0},this._pointerPositionAtLastDirectionChange={x:be.x,y:be.y},this._dragStartTime=Date.now(),this._dragDropRegistry.startDragging(this,e)}_cleanupDragArtifacts(o){_o(this._rootElement,!0,wo),this._anchor.parentNode.replaceChild(this._rootElement,this._anchor),this._destroyPreview(),this._destroyPlaceholder(),this._initialDomRect=this._boundaryRect=this._previewRect=this._initialTransform=void 0,this._ngZone.run(()=>{let e=this._dropContainer,i=e.getItemIndex(this),t=this._getPointerPositionOnPage(o),s=this._getDragDistance(t),d=e._isOverContainer(t.x,t.y);this.ended.next({source:this,distance:s,dropPoint:t,event:o}),this.dropped.next({item:this,currentIndex:i,previousIndex:this._initialIndex,container:e,previousContainer:this._initialContainer,isPointerOverContainer:d,distance:s,dropPoint:t,event:o}),e.drop(this,i,this._initialIndex,this._initialContainer,d,s,t,o),this._dropContainer=this._initialContainer})}_updateActiveDropContainer({x:o,y:e},{x:i,y:t}){let s=this._initialContainer._getSiblingContainerFromPosition(this,o,e);!s&&this._dropContainer!==this._initialContainer&&this._initialContainer._isOverContainer(o,e)&&(s=this._initialContainer),s&&s!==this._dropContainer&&this._ngZone.run(()=>{this.exited.next({item:this,container:this._dropContainer}),this._dropContainer.exit(this),this._dropContainer=s,this._dropContainer.enter(this,o,e,s===this._initialContainer&&s.sortingDisabled?this._initialIndex:void 0),this.entered.next({item:this,container:s,currentIndex:s.getItemIndex(this)})}),this.isDragging()&&(this._dropContainer._startScrollingIfNecessary(i,t),this._dropContainer._sortItem(this,o,e,this._pointerDirectionDelta),this.constrainPosition?this._applyPreviewTransform(o,e):this._applyPreviewTransform(o-this._pickupPositionInElement.x,e-this._pickupPositionInElement.y))}_animatePreviewToPlaceholder(){if(!this._hasMoved)return Promise.resolve();let o=this._placeholder.getBoundingClientRect();this._preview.addClass("cdk-drag-animating"),this._applyPreviewTransform(o.left,o.top);let e=this._preview.getTransitionDuration();return e===0?Promise.resolve():this._ngZone.runOutsideAngular(()=>new Promise(i=>{let t=m=>{(!m||this._preview&&Bt(m)===this._preview.element&&m.propertyName==="transform")&&(d(),i(),clearTimeout(s))},s=setTimeout(t,e*1.5),d=this._preview.addEventListener("transitionend",t)}))}_createPlaceholderElement(){let o=this._placeholderTemplate,e=o?o.template:null,i;return e?(this._placeholderRef=o.viewContainer.createEmbeddedView(e,o.context),this._placeholderRef.detectChanges(),i=Po(this._placeholderRef,this._document)):i=Eo(this._rootElement),i.style.pointerEvents="none",i.classList.add("cdk-drag-placeholder"),i}_getPointerPositionInElement(o,e,i){let t=e===this._rootElement?null:e,s=t?t.getBoundingClientRect():o,d=Kt(i)?i.targetTouches[0]:i,m=this._getViewportScrollPosition(),_=d.pageX-s.left-m.left,T=d.pageY-s.top-m.top;return{x:s.left-o.left+_,y:s.top-o.top+T}}_getPointerPositionOnPage(o){let e=this._getViewportScrollPosition(),i=Kt(o)?o.touches[0]||o.changedTouches[0]||{pageX:0,pageY:0}:o,t=i.pageX-e.left,s=i.pageY-e.top;if(this._ownerSVGElement){let d=this._ownerSVGElement.getScreenCTM();if(d){let m=this._ownerSVGElement.createSVGPoint();return m.x=t,m.y=s,m.matrixTransform(d.inverse())}}return{x:t,y:s}}_getConstrainedPointerPosition(o){let e=this._dropContainer?this._dropContainer.lockAxis:null,{x:i,y:t}=this.constrainPosition?this.constrainPosition(o,this,this._initialDomRect,this._pickupPositionInElement):o;if(this.lockAxis==="x"||e==="x"?t=this._pickupPositionOnPage.y-(this.constrainPosition?this._pickupPositionInElement.y:0):(this.lockAxis==="y"||e==="y")&&(i=this._pickupPositionOnPage.x-(this.constrainPosition?this._pickupPositionInElement.x:0)),this._boundaryRect){let{x:s,y:d}=this.constrainPosition?{x:0,y:0}:this._pickupPositionInElement,m=this._boundaryRect,{width:_,height:T}=this._getPreviewRect(),N=m.top+d,be=m.bottom-(T-d),qe=m.left+s,ki=m.right-(_-s);i=To(i,qe,ki),t=To(t,N,be)}return{x:i,y:t}}_updatePointerDirectionDelta(o){let{x:e,y:i}=o,t=this._pointerDirectionDelta,s=this._pointerPositionAtLastDirectionChange,d=Math.abs(e-s.x),m=Math.abs(i-s.y);return d>this._config.pointerDirectionChangeThreshold&&(t.x=e>s.x?1:-1,s.x=e),m>this._config.pointerDirectionChangeThreshold&&(t.y=i>s.y?1:-1,s.y=i),t}_toggleNativeDragInteractions(){if(!this._rootElement||!this._handles)return;let o=this._handles.length>0||!this.isDragging();o!==this._nativeInteractionsEnabled&&(this._nativeInteractionsEnabled=o,Et(this._rootElement,o))}_removeRootElementListeners(){this._rootElementCleanups?.forEach(o=>o()),this._rootElementCleanups=void 0}_applyRootElementTransform(o,e){let i=1/this.scale,t=vi(o*i,e*i),s=this._rootElement.style;this._initialTransform==null&&(this._initialTransform=s.transform&&s.transform!="none"?s.transform:""),s.transform=gi(t,this._initialTransform)}_applyPreviewTransform(o,e){let i=this._previewTemplate?.template?void 0:this._initialTransform,t=vi(o,e);this._preview.setTransform(gi(t,i))}_getDragDistance(o){let e=this._pickupPositionOnPage;return e?{x:o.x-e.x,y:o.y-e.y}:{x:0,y:0}}_cleanupCachedDimensions(){this._boundaryRect=this._previewRect=void 0,this._parentPositions.clear()}_containInsideBoundaryOnResize(){let{x:o,y:e}=this._passiveTransform;if(o===0&&e===0||this.isDragging()||!this._boundaryElement)return;let i=this._rootElement.getBoundingClientRect(),t=this._boundaryElement.getBoundingClientRect();if(t.width===0&&t.height===0||i.width===0&&i.height===0)return;let s=t.left-i.left,d=i.right-t.right,m=t.top-i.top,_=i.bottom-t.bottom;t.width>i.width?(s>0&&(o+=s),d>0&&(o-=d)):o=0,t.height>i.height?(m>0&&(e+=m),_>0&&(e-=_)):e=0,(o!==this._passiveTransform.x||e!==this._passiveTransform.y)&&this.setFreeDragPosition({y:e,x:o})}_getDragStartDelay(o){let e=this.dragStartDelay;return typeof e=="number"?e:Kt(o)?e.touch:e?e.mouse:0}_updateOnScroll(o){let e=this._parentPositions.handleScroll(o);if(e){let i=Bt(o);this._boundaryRect&&i!==this._boundaryElement&&i.contains(this._boundaryElement)&&Yt(this._boundaryRect,e.top,e.left),this._pickupPositionOnPage.x+=e.left,this._pickupPositionOnPage.y+=e.top,this._dropContainer||(this._activeTransform.x-=e.left,this._activeTransform.y-=e.top,this._applyRootElementTransform(this._activeTransform.x,this._activeTransform.y))}}_getViewportScrollPosition(){return this._parentPositions.positions.get(this._document)?.scrollPosition||this._parentPositions.getViewportScrollPosition()}_getShadowRoot(){return this._cachedShadowRoot===void 0&&(this._cachedShadowRoot=di(this._rootElement)),this._cachedShadowRoot}_getPreviewInsertionPoint(o,e){let i=this._previewContainer||"global";if(i==="parent")return o;if(i==="global"){let t=this._document;return e||t.fullscreenElement||t.webkitFullscreenElement||t.mozFullScreenElement||t.msFullscreenElement||t.body}return ct(i)}_getPreviewRect(){return(!this._previewRect||!this._previewRect.width&&!this._previewRect.height)&&(this._previewRect=this._preview?this._preview.getBoundingClientRect():this._initialDomRect),this._previewRect}_nativeDragStart=o=>{if(this._handles.length){let e=this._getTargetHandle(o);e&&!this._disabledHandles.has(e)&&!this.disabled&&o.preventDefault()}else this.disabled||o.preventDefault()};_getTargetHandle(o){return this._handles.find(e=>o.target&&(o.target===e||e.contains(o.target)))}};function To(n,o,e){return Math.max(o,Math.min(e,n))}function Kt(n){return n.type[0]==="t"}function ja(n){n.preventDefault()}function yi(n,o,e){let i=Io(o,n.length-1),t=Io(e,n.length-1);if(i===t)return;let s=n[i],d=t<i?-1:1;for(let m=i;m!==t;m+=d)n[m]=n[m+d];n[t]=s}function Io(n,o){return Math.max(0,Math.min(o,n))}var _i=class{_dragDropRegistry;_element;_sortPredicate;_itemPositions=[];_activeDraggables;orientation="vertical";direction;constructor(o){this._dragDropRegistry=o}_previousSwap={drag:null,delta:0,overlaps:!1};start(o){this.withItems(o)}sort(o,e,i,t){let s=this._itemPositions,d=this._getItemIndexFromPointerPosition(o,e,i,t);if(d===-1&&s.length>0)return null;let m=this.orientation==="horizontal",_=s.findIndex(Ie=>Ie.drag===o),T=s[d],N=s[_].clientRect,be=T.clientRect,qe=_>d?1:-1,ki=this._getItemOffsetPx(N,be,qe),Na=this._getSiblingOffsetPx(_,s,qe),La=s.slice();return yi(s,_,d),s.forEach((Ie,Wa)=>{if(La[Wa]===Ie)return;let cn=Ie.drag===o,Ei=cn?ki:Na,dn=cn?o.getPlaceholderElement():Ie.drag.getRootElement();Ie.offset+=Ei;let pn=Math.round(Ie.offset*(1/Ie.drag.scale));m?(dn.style.transform=gi(`translate3d(${pn}px, 0, 0)`,Ie.initialTransform),Yt(Ie.clientRect,0,Ei)):(dn.style.transform=gi(`translate3d(0, ${pn}px, 0)`,Ie.initialTransform),Yt(Ie.clientRect,Ei,0))}),this._previousSwap.overlaps=Bi(be,e,i),this._previousSwap.drag=T.drag,this._previousSwap.delta=m?t.x:t.y,{previousIndex:_,currentIndex:d}}enter(o,e,i,t){let s=t==null||t<0?this._getItemIndexFromPointerPosition(o,e,i):t,d=this._activeDraggables,m=d.indexOf(o),_=o.getPlaceholderElement(),T=d[s];if(T===o&&(T=d[s+1]),!T&&(s==null||s===-1||s<d.length-1)&&this._shouldEnterAsFirstChild(e,i)&&(T=d[0]),m>-1&&d.splice(m,1),T&&!this._dragDropRegistry.isDragging(T)){let N=T.getRootElement();N.parentElement.insertBefore(_,N),d.splice(s,0,o)}else this._element.appendChild(_),d.push(o);_.style.transform="",this._cacheItemPositions()}withItems(o){this._activeDraggables=o.slice(),this._cacheItemPositions()}withSortPredicate(o){this._sortPredicate=o}reset(){this._activeDraggables?.forEach(o=>{let e=o.getRootElement();if(e){let i=this._itemPositions.find(t=>t.drag===o)?.initialTransform;e.style.transform=i||""}}),this._itemPositions=[],this._activeDraggables=[],this._previousSwap.drag=null,this._previousSwap.delta=0,this._previousSwap.overlaps=!1}getActiveItemsSnapshot(){return this._activeDraggables}getItemIndex(o){return(this.orientation==="horizontal"&&this.direction==="rtl"?this._itemPositions.slice().reverse():this._itemPositions).findIndex(i=>i.drag===o)}updateOnScroll(o,e){this._itemPositions.forEach(({clientRect:i})=>{Yt(i,o,e)}),this._itemPositions.forEach(({drag:i})=>{this._dragDropRegistry.isDragging(i)&&i._sortFromLastPointerPosition()})}withElementContainer(o){this._element=o}_cacheItemPositions(){let o=this.orientation==="horizontal";this._itemPositions=this._activeDraggables.map(e=>{let i=e.getVisibleElement();return{drag:e,offset:0,initialTransform:i.style.transform||"",clientRect:Ki(i)}}).sort((e,i)=>o?e.clientRect.left-i.clientRect.left:e.clientRect.top-i.clientRect.top)}_getItemOffsetPx(o,e,i){let t=this.orientation==="horizontal",s=t?e.left-o.left:e.top-o.top;return i===-1&&(s+=t?e.width-o.width:e.height-o.height),s}_getSiblingOffsetPx(o,e,i){let t=this.orientation==="horizontal",s=e[o].clientRect,d=e[o+i*-1],m=s[t?"width":"height"]*i;if(d){let _=t?"left":"top",T=t?"right":"bottom";i===-1?m-=d.clientRect[_]-s[T]:m+=s[_]-d.clientRect[T]}return m}_shouldEnterAsFirstChild(o,e){if(!this._activeDraggables.length)return!1;let i=this._itemPositions,t=this.orientation==="horizontal";if(i[0].drag!==this._activeDraggables[0]){let d=i[i.length-1].clientRect;return t?o>=d.right:e>=d.bottom}else{let d=i[0].clientRect;return t?o<=d.left:e<=d.top}}_getItemIndexFromPointerPosition(o,e,i,t){let s=this.orientation==="horizontal",d=this._itemPositions.findIndex(({drag:m,clientRect:_})=>{if(m===o)return!1;if(t){let T=s?t.x:t.y;if(m===this._previousSwap.drag&&this._previousSwap.overlaps&&T===this._previousSwap.delta)return!1}return s?e>=Math.floor(_.left)&&e<Math.floor(_.right):i>=Math.floor(_.top)&&i<Math.floor(_.bottom)});return d===-1||!this._sortPredicate(d,o)?-1:d}},ji=class{_document;_dragDropRegistry;_element;_sortPredicate;_rootNode;_activeItems;_previousSwap={drag:null,deltaX:0,deltaY:0,overlaps:!1};_relatedNodes=[];constructor(o,e){this._document=o,this._dragDropRegistry=e}start(o){let e=this._element.childNodes;this._relatedNodes=[];for(let i=0;i<e.length;i++){let t=e[i];this._relatedNodes.push([t,t.nextSibling])}this.withItems(o)}sort(o,e,i,t){let s=this._getItemIndexFromPointerPosition(o,e,i),d=this._previousSwap;if(s===-1||this._activeItems[s]===o)return null;let m=this._activeItems[s];if(d.drag===m&&d.overlaps&&d.deltaX===t.x&&d.deltaY===t.y)return null;let _=this.getItemIndex(o),T=o.getPlaceholderElement(),N=m.getRootElement();s>_?N.after(T):N.before(T),yi(this._activeItems,_,s);let be=this._getRootNode().elementFromPoint(e,i);return d.deltaX=t.x,d.deltaY=t.y,d.drag=m,d.overlaps=N===be||N.contains(be),{previousIndex:_,currentIndex:s}}enter(o,e,i,t){let s=t==null||t<0?this._getItemIndexFromPointerPosition(o,e,i):t;s===-1&&(s=this._getClosestItemIndexToPointer(o,e,i));let d=this._activeItems[s],m=this._activeItems.indexOf(o);m>-1&&this._activeItems.splice(m,1),d&&!this._dragDropRegistry.isDragging(d)?(this._activeItems.splice(s,0,o),d.getRootElement().before(o.getPlaceholderElement())):(this._activeItems.push(o),this._element.appendChild(o.getPlaceholderElement()))}withItems(o){this._activeItems=o.slice()}withSortPredicate(o){this._sortPredicate=o}reset(){let o=this._element,e=this._previousSwap;for(let i=this._relatedNodes.length-1;i>-1;i--){let[t,s]=this._relatedNodes[i];t.parentNode===o&&t.nextSibling!==s&&(s===null?o.appendChild(t):s.parentNode===o&&o.insertBefore(t,s))}this._relatedNodes=[],this._activeItems=[],e.drag=null,e.deltaX=e.deltaY=0,e.overlaps=!1}getActiveItemsSnapshot(){return this._activeItems}getItemIndex(o){return this._activeItems.indexOf(o)}updateOnScroll(){this._activeItems.forEach(o=>{this._dragDropRegistry.isDragging(o)&&o._sortFromLastPointerPosition()})}withElementContainer(o){o!==this._element&&(this._element=o,this._rootNode=void 0)}_getItemIndexFromPointerPosition(o,e,i){let t=this._getRootNode().elementFromPoint(Math.floor(e),Math.floor(i)),s=t?this._activeItems.findIndex(d=>{let m=d.getRootElement();return t===m||m.contains(t)}):-1;return s===-1||!this._sortPredicate(s,o)?-1:s}_getRootNode(){return this._rootNode||(this._rootNode=di(this._element)||this._document),this._rootNode}_getClosestItemIndexToPointer(o,e,i){if(this._activeItems.length===0)return-1;if(this._activeItems.length===1)return 0;let t=1/0,s=-1;for(let d=0;d<this._activeItems.length;d++){let m=this._activeItems[d];if(m!==o){let{x:_,y:T}=m.getRootElement().getBoundingClientRect(),N=Math.hypot(e-_,i-T);N<t&&(t=N,s=d)}}return s}},xo=.05,Oo=.05,Ne=function(n){return n[n.NONE=0]="NONE",n[n.UP=1]="UP",n[n.DOWN=2]="DOWN",n}(Ne||{}),ve=function(n){return n[n.NONE=0]="NONE",n[n.LEFT=1]="LEFT",n[n.RIGHT=2]="RIGHT",n}(ve||{}),qi=class{_dragDropRegistry;_ngZone;_viewportRuler;element;disabled=!1;sortingDisabled=!1;lockAxis;autoScrollDisabled=!1;autoScrollStep=2;enterPredicate=()=>!0;sortPredicate=()=>!0;beforeStarted=new B;entered=new B;exited=new B;dropped=new B;sorted=new B;receivingStarted=new B;receivingStopped=new B;data;_container;_isDragging=!1;_parentPositions;_sortStrategy;_domRect;_draggables=[];_siblings=[];_activeSiblings=new Set;_viewportScrollSubscription=yt.EMPTY;_verticalScrollDirection=Ne.NONE;_horizontalScrollDirection=ve.NONE;_scrollNode;_stopScrollTimers=new B;_cachedShadowRoot=null;_document;_scrollableElements=[];_initialScrollSnap;_direction="ltr";constructor(o,e,i,t,s){this._dragDropRegistry=e,this._ngZone=t,this._viewportRuler=s;let d=this.element=ct(o);this._document=i,this.withOrientation("vertical").withElementContainer(d),e.registerDropContainer(this),this._parentPositions=new fi(i)}dispose(){this._stopScrolling(),this._stopScrollTimers.complete(),this._viewportScrollSubscription.unsubscribe(),this.beforeStarted.complete(),this.entered.complete(),this.exited.complete(),this.dropped.complete(),this.sorted.complete(),this.receivingStarted.complete(),this.receivingStopped.complete(),this._activeSiblings.clear(),this._scrollNode=null,this._parentPositions.clear(),this._dragDropRegistry.removeDropContainer(this)}isDragging(){return this._isDragging}start(){this._draggingStarted(),this._notifyReceivingSiblings()}enter(o,e,i,t){this._draggingStarted(),t==null&&this.sortingDisabled&&(t=this._draggables.indexOf(o)),this._sortStrategy.enter(o,e,i,t),this._cacheParentPositions(),this._notifyReceivingSiblings(),this.entered.next({item:o,container:this,currentIndex:this.getItemIndex(o)})}exit(o){this._reset(),this.exited.next({item:o,container:this})}drop(o,e,i,t,s,d,m,_={}){this._reset(),this.dropped.next({item:o,currentIndex:e,previousIndex:i,container:this,previousContainer:t,isPointerOverContainer:s,distance:d,dropPoint:m,event:_})}withItems(o){let e=this._draggables;return this._draggables=o,o.forEach(i=>i._withDropContainer(this)),this.isDragging()&&(e.filter(t=>t.isDragging()).every(t=>o.indexOf(t)===-1)?this._reset():this._sortStrategy.withItems(this._draggables)),this}withDirection(o){return this._direction=o,this._sortStrategy instanceof _i&&(this._sortStrategy.direction=o),this}connectedTo(o){return this._siblings=o.slice(),this}withOrientation(o){if(o==="mixed")this._sortStrategy=new ji(this._document,this._dragDropRegistry);else{let e=new _i(this._dragDropRegistry);e.direction=this._direction,e.orientation=o,this._sortStrategy=e}return this._sortStrategy.withElementContainer(this._container),this._sortStrategy.withSortPredicate((e,i)=>this.sortPredicate(e,i,this)),this}withScrollableParents(o){let e=this._container;return this._scrollableElements=o.indexOf(e)===-1?[e,...o]:o.slice(),this}withElementContainer(o){if(o===this._container)return this;let e=ct(this.element),i=this._scrollableElements.indexOf(this._container),t=this._scrollableElements.indexOf(o);return i>-1&&this._scrollableElements.splice(i,1),t>-1&&this._scrollableElements.splice(t,1),this._sortStrategy&&this._sortStrategy.withElementContainer(o),this._cachedShadowRoot=null,this._scrollableElements.unshift(o),this._container=o,this}getScrollableParents(){return this._scrollableElements}getItemIndex(o){return this._isDragging?this._sortStrategy.getItemIndex(o):this._draggables.indexOf(o)}isReceiving(){return this._activeSiblings.size>0}_sortItem(o,e,i,t){if(this.sortingDisabled||!this._domRect||!vo(this._domRect,xo,e,i))return;let s=this._sortStrategy.sort(o,e,i,t);s&&this.sorted.next({previousIndex:s.previousIndex,currentIndex:s.currentIndex,container:this,item:o})}_startScrollingIfNecessary(o,e){if(this.autoScrollDisabled)return;let i,t=Ne.NONE,s=ve.NONE;if(this._parentPositions.positions.forEach((d,m)=>{m===this._document||!d.clientRect||i||vo(d.clientRect,xo,o,e)&&([t,s]=qa(m,d.clientRect,this._direction,o,e),(t||s)&&(i=m))}),!t&&!s){let{width:d,height:m}=this._viewportRuler.getViewportSize(),_={width:d,height:m,top:0,right:d,bottom:m,left:0};t=Mo(_,e),s=Fo(_,o),i=window}i&&(t!==this._verticalScrollDirection||s!==this._horizontalScrollDirection||i!==this._scrollNode)&&(this._verticalScrollDirection=t,this._horizontalScrollDirection=s,this._scrollNode=i,(t||s)&&i?this._ngZone.runOutsideAngular(this._startScrollInterval):this._stopScrolling())}_stopScrolling(){this._stopScrollTimers.next()}_draggingStarted(){let o=this._container.style;this.beforeStarted.next(),this._isDragging=!0,this._initialScrollSnap=o.msScrollSnapType||o.scrollSnapType||"",o.scrollSnapType=o.msScrollSnapType="none",this._sortStrategy.start(this._draggables),this._cacheParentPositions(),this._viewportScrollSubscription.unsubscribe(),this._listenToScrollEvents()}_cacheParentPositions(){this._parentPositions.cache(this._scrollableElements),this._domRect=this._parentPositions.positions.get(this._container).clientRect}_reset(){this._isDragging=!1;let o=this._container.style;o.scrollSnapType=o.msScrollSnapType=this._initialScrollSnap,this._siblings.forEach(e=>e._stopReceiving(this)),this._sortStrategy.reset(),this._stopScrolling(),this._viewportScrollSubscription.unsubscribe(),this._parentPositions.clear()}_startScrollInterval=()=>{this._stopScrolling(),un(0,hn).pipe(Se(this._stopScrollTimers)).subscribe(()=>{let o=this._scrollNode,e=this.autoScrollStep;this._verticalScrollDirection===Ne.UP?o.scrollBy(0,-e):this._verticalScrollDirection===Ne.DOWN&&o.scrollBy(0,e),this._horizontalScrollDirection===ve.LEFT?o.scrollBy(-e,0):this._horizontalScrollDirection===ve.RIGHT&&o.scrollBy(e,0)})};_isOverContainer(o,e){return this._domRect!=null&&Bi(this._domRect,o,e)}_getSiblingContainerFromPosition(o,e,i){return this._siblings.find(t=>t._canReceive(o,e,i))}_canReceive(o,e,i){if(!this._domRect||!Bi(this._domRect,e,i)||!this.enterPredicate(o,this))return!1;let t=this._getShadowRoot().elementFromPoint(e,i);return t?t===this._container||this._container.contains(t):!1}_startReceiving(o,e){let i=this._activeSiblings;!i.has(o)&&e.every(t=>this.enterPredicate(t,this)||this._draggables.indexOf(t)>-1)&&(i.add(o),this._cacheParentPositions(),this._listenToScrollEvents(),this.receivingStarted.next({initiator:o,receiver:this,items:e}))}_stopReceiving(o){this._activeSiblings.delete(o),this._viewportScrollSubscription.unsubscribe(),this.receivingStopped.next({initiator:o,receiver:this})}_listenToScrollEvents(){this._viewportScrollSubscription=this._dragDropRegistry.scrolled(this._getShadowRoot()).subscribe(o=>{if(this.isDragging()){let e=this._parentPositions.handleScroll(o);e&&this._sortStrategy.updateOnScroll(e.top,e.left)}else this.isReceiving()&&this._cacheParentPositions()})}_getShadowRoot(){if(!this._cachedShadowRoot){let o=di(this._container);this._cachedShadowRoot=o||this._document}return this._cachedShadowRoot}_notifyReceivingSiblings(){let o=this._sortStrategy.getActiveItemsSnapshot().filter(e=>e.isDragging());this._siblings.forEach(e=>e._startReceiving(this,o))}};function Mo(n,o){let{top:e,bottom:i,height:t}=n,s=t*Oo;return o>=e-s&&o<=e+s?Ne.UP:o>=i-s&&o<=i+s?Ne.DOWN:Ne.NONE}function Fo(n,o){let{left:e,right:i,width:t}=n,s=t*Oo;return o>=e-s&&o<=e+s?ve.LEFT:o>=i-s&&o<=i+s?ve.RIGHT:ve.NONE}function qa(n,o,e,i,t){let s=Mo(o,t),d=Fo(o,i),m=Ne.NONE,_=ve.NONE;if(s){let T=n.scrollTop;s===Ne.UP?T>0&&(m=Ne.UP):n.scrollHeight-T>n.clientHeight&&(m=Ne.DOWN)}if(d){let T=n.scrollLeft;e==="rtl"?d===ve.RIGHT?T<0&&(_=ve.RIGHT):n.scrollWidth+T>n.clientWidth&&(_=ve.LEFT):d===ve.LEFT?T>0&&(_=ve.LEFT):n.scrollWidth-T>n.clientWidth&&(_=ve.RIGHT)}return[m,_]}var Zt={capture:!0},Gi={passive:!1,capture:!0},Ka=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275cmp=S({type:n,selectors:[["ng-component"]],hostAttrs:["cdk-drag-resets-container",""],decls:0,vars:0,template:function(i,t){},styles:[`@layer cdk-resets{.cdk-drag-preview{background:none;border:none;padding:0;color:inherit;inset:auto}}.cdk-drag-placeholder *,.cdk-drag-preview *{pointer-events:none !important}
|
|
2
|
-
`],encapsulation:2,changeDetection:0})}return n})(),Ro=(()=>{class n{_ngZone=f(bt);_document=f(St);_styleLoader=f(Ht);_renderer=f(Oi).createRenderer(null,null);_cleanupDocumentTouchmove;_dropInstances=new Set;_dragInstances=new Set;_activeDragInstances=Lt([]);_globalListeners;_draggingPredicate=e=>e.isDragging();_domNodesToDirectives=null;pointerMove=new B;pointerUp=new B;scroll=new B;constructor(){}registerDropContainer(e){this._dropInstances.has(e)||this._dropInstances.add(e)}registerDragItem(e){this._dragInstances.add(e),this._dragInstances.size===1&&this._ngZone.runOutsideAngular(()=>{this._cleanupDocumentTouchmove?.(),this._cleanupDocumentTouchmove=st(this._renderer,this._document,"touchmove",this._persistentTouchmoveListener,Gi)})}removeDropContainer(e){this._dropInstances.delete(e)}removeDragItem(e){this._dragInstances.delete(e),this.stopDragging(e),this._dragInstances.size===0&&this._cleanupDocumentTouchmove?.()}startDragging(e,i){if(!(this._activeDragInstances().indexOf(e)>-1)&&(this._styleLoader.load(Ka),this._activeDragInstances.update(t=>[...t,e]),this._activeDragInstances().length===1)){let t=i.type.startsWith("touch"),s=m=>this.pointerUp.next(m),d=[["scroll",m=>this.scroll.next(m),Zt],["selectstart",this._preventDefaultWhileDragging,Gi]];t?d.push(["touchend",s,Zt],["touchcancel",s,Zt]):d.push(["mouseup",s,Zt]),t||d.push(["mousemove",m=>this.pointerMove.next(m),Gi]),this._ngZone.runOutsideAngular(()=>{this._globalListeners=d.map(([m,_,T])=>st(this._renderer,this._document,m,_,T))})}}stopDragging(e){this._activeDragInstances.update(i=>{let t=i.indexOf(e);return t>-1?(i.splice(t,1),[...i]):i}),this._activeDragInstances().length===0&&this._clearGlobalListeners()}isDragging(e){return this._activeDragInstances().indexOf(e)>-1}scrolled(e){let i=[this.scroll];return e&&e!==this._document&&i.push(new Pi(t=>this._ngZone.runOutsideAngular(()=>{let s=st(this._renderer,e,"scroll",d=>{this._activeDragInstances().length&&t.next(d)},Zt);return()=>{s()}}))),ze(...i)}registerDirectiveNode(e,i){this._domNodesToDirectives??=new WeakMap,this._domNodesToDirectives.set(e,i)}removeDirectiveNode(e){this._domNodesToDirectives?.delete(e)}getDragDirectiveForNode(e){return this._domNodesToDirectives?.get(e)||null}ngOnDestroy(){this._dragInstances.forEach(e=>this.removeDragItem(e)),this._dropInstances.forEach(e=>this.removeDropContainer(e)),this._domNodesToDirectives=null,this._clearGlobalListeners(),this.pointerMove.complete(),this.pointerUp.complete()}_preventDefaultWhileDragging=e=>{this._activeDragInstances().length>0&&e.preventDefault()};_persistentTouchmoveListener=e=>{this._activeDragInstances().length>0&&(this._activeDragInstances().some(this._draggingPredicate)&&e.preventDefault(),this.pointerMove.next(e))};_clearGlobalListeners(){this._globalListeners?.forEach(e=>e()),this._globalListeners=void 0}static \u0275fac=function(i){return new(i||n)};static \u0275prov=ge({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})(),Za={dragStartThreshold:5,pointerDirectionChangeThreshold:5},Yi=(()=>{class n{_document=f(St);_ngZone=f(bt);_viewportRuler=f(Vn);_dragDropRegistry=f(Ro);_renderer=f(Oi).createRenderer(null,null);constructor(){}createDrag(e,i=Za){return new Ui(e,i,this._document,this._ngZone,this._viewportRuler,this._dragDropRegistry,this._renderer)}createDropList(e){return new qi(e,this._dragDropRegistry,this._document,this._ngZone,this._viewportRuler)}static \u0275fac=function(i){return new(i||n)};static \u0275prov=ge({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})(),Do=new xe("CDK_DRAG_PARENT");var Ya=new xe("CdkDragHandle");var Ao=new xe("CDK_DRAG_CONFIG"),No=new xe("CdkDropList"),Lo=(()=>{class n{element=f(Ze);dropContainer=f(No,{optional:!0,skipSelf:!0});_ngZone=f(bt);_viewContainerRef=f(Cn);_dir=f(jt,{optional:!0});_changeDetectorRef=f(Ct);_selfHandle=f(Ya,{optional:!0,self:!0});_parentDrag=f(Do,{optional:!0,skipSelf:!0});_dragDropRegistry=f(Ro);_destroyed=new B;_handles=new We([]);_previewTemplate;_placeholderTemplate;_dragRef;data;lockAxis;rootElementSelector;boundaryElement;dragStartDelay;freeDragPosition;get disabled(){return this._disabled||!!(this.dropContainer&&this.dropContainer.disabled)}set disabled(e){this._disabled=e,this._dragRef.disabled=this._disabled}_disabled;constrainPosition;previewClass;previewContainer;scale=1;started=new j;released=new j;ended=new j;entered=new j;exited=new j;dropped=new j;moved=new Pi(e=>{let i=this._dragRef.moved.pipe(se(t=>({source:this,pointerPosition:t.pointerPosition,event:t.event,delta:t.delta,distance:t.distance}))).subscribe(e);return()=>{i.unsubscribe()}});_injector=f(ii);constructor(){let e=this.dropContainer,i=f(Ao,{optional:!0}),t=f(Yi);this._dragRef=t.createDrag(this.element,{dragStartThreshold:i&&i.dragStartThreshold!=null?i.dragStartThreshold:5,pointerDirectionChangeThreshold:i&&i.pointerDirectionChangeThreshold!=null?i.pointerDirectionChangeThreshold:5,zIndex:i?.zIndex}),this._dragRef.data=this,this._dragDropRegistry.registerDirectiveNode(this.element.nativeElement,this),i&&this._assignDefaults(i),e&&(this._dragRef._withDropContainer(e._dropListRef),e.addItem(this),e._dropListRef.beforeStarted.pipe(Se(this._destroyed)).subscribe(()=>{this._dragRef.scale=this.scale})),this._syncInputs(this._dragRef),this._handleEvents(this._dragRef)}getPlaceholderElement(){return this._dragRef.getPlaceholderElement()}getRootElement(){return this._dragRef.getRootElement()}reset(){this._dragRef.reset()}getFreeDragPosition(){return this._dragRef.getFreeDragPosition()}setFreeDragPosition(e){this._dragRef.setFreeDragPosition(e)}ngAfterViewInit(){ni(()=>{this._updateRootElement(),this._setupHandlesListener(),this._dragRef.scale=this.scale,this.freeDragPosition&&this._dragRef.setFreeDragPosition(this.freeDragPosition)},{injector:this._injector})}ngOnChanges(e){let i=e.rootElementSelector,t=e.freeDragPosition;i&&!i.firstChange&&this._updateRootElement(),this._dragRef.scale=this.scale,t&&!t.firstChange&&this.freeDragPosition&&this._dragRef.setFreeDragPosition(this.freeDragPosition)}ngOnDestroy(){this.dropContainer&&this.dropContainer.removeItem(this),this._dragDropRegistry.removeDirectiveNode(this.element.nativeElement),this._ngZone.runOutsideAngular(()=>{this._handles.complete(),this._destroyed.next(),this._destroyed.complete(),this._dragRef.dispose()})}_addHandle(e){let i=this._handles.getValue();i.push(e),this._handles.next(i)}_removeHandle(e){let i=this._handles.getValue(),t=i.indexOf(e);t>-1&&(i.splice(t,1),this._handles.next(i))}_setPreviewTemplate(e){this._previewTemplate=e}_resetPreviewTemplate(e){e===this._previewTemplate&&(this._previewTemplate=null)}_setPlaceholderTemplate(e){this._placeholderTemplate=e}_resetPlaceholderTemplate(e){e===this._placeholderTemplate&&(this._placeholderTemplate=null)}_updateRootElement(){let e=this.element.nativeElement,i=e;this.rootElementSelector&&(i=e.closest!==void 0?e.closest(this.rootElementSelector):e.parentElement?.closest(this.rootElementSelector)),this._dragRef.withRootElement(i||e)}_getBoundaryElement(){let e=this.boundaryElement;return e?typeof e=="string"?this.element.nativeElement.closest(e):ct(e):null}_syncInputs(e){e.beforeStarted.subscribe(()=>{if(!e.isDragging()){let i=this._dir,t=this.dragStartDelay,s=this._placeholderTemplate?{template:this._placeholderTemplate.templateRef,context:this._placeholderTemplate.data,viewContainer:this._viewContainerRef}:null,d=this._previewTemplate?{template:this._previewTemplate.templateRef,context:this._previewTemplate.data,matchSize:this._previewTemplate.matchSize,viewContainer:this._viewContainerRef}:null;e.disabled=this.disabled,e.lockAxis=this.lockAxis,e.scale=this.scale,e.dragStartDelay=typeof t=="object"&&t?t:Fi(t),e.constrainPosition=this.constrainPosition,e.previewClass=this.previewClass,e.withBoundaryElement(this._getBoundaryElement()).withPlaceholderTemplate(s).withPreviewTemplate(d).withPreviewContainer(this.previewContainer||"global"),i&&e.withDirection(i.value)}}),e.beforeStarted.pipe(fn(1)).subscribe(()=>{if(this._parentDrag){e.withParent(this._parentDrag._dragRef);return}let i=this.element.nativeElement.parentElement;for(;i;){let t=this._dragDropRegistry.getDragDirectiveForNode(i);if(t){e.withParent(t._dragRef);break}i=i.parentElement}})}_handleEvents(e){e.started.subscribe(i=>{this.started.emit({source:this,event:i.event}),this._changeDetectorRef.markForCheck()}),e.released.subscribe(i=>{this.released.emit({source:this,event:i.event})}),e.ended.subscribe(i=>{this.ended.emit({source:this,distance:i.distance,dropPoint:i.dropPoint,event:i.event}),this._changeDetectorRef.markForCheck()}),e.entered.subscribe(i=>{this.entered.emit({container:i.container.data,item:this,currentIndex:i.currentIndex})}),e.exited.subscribe(i=>{this.exited.emit({container:i.container.data,item:this})}),e.dropped.subscribe(i=>{this.dropped.emit({previousIndex:i.previousIndex,currentIndex:i.currentIndex,previousContainer:i.previousContainer.data,container:i.container.data,isPointerOverContainer:i.isPointerOverContainer,item:this,distance:i.distance,dropPoint:i.dropPoint,event:i.event})})}_assignDefaults(e){let{lockAxis:i,dragStartDelay:t,constrainPosition:s,previewClass:d,boundaryElement:m,draggingDisabled:_,rootElementSelector:T,previewContainer:N}=e;this.disabled=_??!1,this.dragStartDelay=t||0,i&&(this.lockAxis=i),s&&(this.constrainPosition=s),d&&(this.previewClass=d),m&&(this.boundaryElement=m),T&&(this.rootElementSelector=T),N&&(this.previewContainer=N)}_setupHandlesListener(){this._handles.pipe(ie(e=>{let i=e.map(t=>t.element);this._selfHandle&&this.rootElementSelector&&i.push(this.element),this._dragRef.withHandles(i)}),Q(e=>ze(...e.map(i=>i._stateChanges.pipe(mt(i))))),Se(this._destroyed)).subscribe(e=>{let i=this._dragRef,t=e.element.nativeElement;e.disabled?i.disableHandle(t):i.enableHandle(t)})}static \u0275fac=function(i){return new(i||n)};static \u0275dir=it({type:n,selectors:[["","cdkDrag",""]],hostAttrs:[1,"cdk-drag"],hostVars:4,hostBindings:function(i,t){i&2&&nt("cdk-drag-disabled",t.disabled)("cdk-drag-dragging",t._dragRef.isDragging())},inputs:{data:[0,"cdkDragData","data"],lockAxis:[0,"cdkDragLockAxis","lockAxis"],rootElementSelector:[0,"cdkDragRootElement","rootElementSelector"],boundaryElement:[0,"cdkDragBoundary","boundaryElement"],dragStartDelay:[0,"cdkDragStartDelay","dragStartDelay"],freeDragPosition:[0,"cdkDragFreeDragPosition","freeDragPosition"],disabled:[2,"cdkDragDisabled","disabled",ue],constrainPosition:[0,"cdkDragConstrainPosition","constrainPosition"],previewClass:[0,"cdkDragPreviewClass","previewClass"],previewContainer:[0,"cdkDragPreviewContainer","previewContainer"],scale:[2,"cdkDragScale","scale",Vt]},outputs:{started:"cdkDragStarted",released:"cdkDragReleased",ended:"cdkDragEnded",entered:"cdkDragEntered",exited:"cdkDragExited",dropped:"cdkDragDropped",moved:"cdkDragMoved"},exportAs:["cdkDrag"],features:[he([{provide:Do,useExisting:n}]),J]})}return n})(),ko=new xe("CdkDropListGroup");var Wo=(()=>{class n{element=f(Ze);_changeDetectorRef=f(Ct);_scrollDispatcher=f(Wn);_dir=f(jt,{optional:!0});_group=f(ko,{optional:!0,skipSelf:!0});_latestSortedRefs;_destroyed=new B;_scrollableParentsResolved;static _dropLists=[];_dropListRef;connectedTo=[];data;orientation;id=f(Ut).getId("cdk-drop-list-");lockAxis;get disabled(){return this._disabled||!!this._group&&this._group.disabled}set disabled(e){this._dropListRef.disabled=this._disabled=e}_disabled;sortingDisabled;enterPredicate=()=>!0;sortPredicate=()=>!0;autoScrollDisabled;autoScrollStep;elementContainerSelector;dropped=new j;entered=new j;exited=new j;sorted=new j;_unsortedItems=new Set;constructor(){let e=f(Yi),i=f(Ao,{optional:!0});this._dropListRef=e.createDropList(this.element),this._dropListRef.data=this,i&&this._assignDefaults(i),this._dropListRef.enterPredicate=(t,s)=>this.enterPredicate(t.data,s.data),this._dropListRef.sortPredicate=(t,s,d)=>this.sortPredicate(t,s.data,d.data),this._setupInputSyncSubscription(this._dropListRef),this._handleEvents(this._dropListRef),n._dropLists.push(this),this._group&&this._group._items.add(this)}addItem(e){this._unsortedItems.add(e),this._dropListRef.isDragging()&&this._syncItemsWithRef(this.getSortedItems().map(i=>i._dragRef))}removeItem(e){if(this._unsortedItems.delete(e),this._latestSortedRefs){let i=this._latestSortedRefs.indexOf(e._dragRef);i>-1&&(this._latestSortedRefs.splice(i,1),this._syncItemsWithRef(this._latestSortedRefs))}}getSortedItems(){return Array.from(this._unsortedItems).sort((e,i)=>e._dragRef.getVisibleElement().compareDocumentPosition(i._dragRef.getVisibleElement())&Node.DOCUMENT_POSITION_FOLLOWING?-1:1)}ngOnDestroy(){let e=n._dropLists.indexOf(this);e>-1&&n._dropLists.splice(e,1),this._group&&this._group._items.delete(this),this._latestSortedRefs=void 0,this._unsortedItems.clear(),this._dropListRef.dispose(),this._destroyed.next(),this._destroyed.complete()}_setupInputSyncSubscription(e){this._dir&&this._dir.change.pipe(mt(this._dir.value),Se(this._destroyed)).subscribe(i=>e.withDirection(i)),e.beforeStarted.subscribe(()=>{let i=Nn(this.connectedTo).map(t=>{if(typeof t=="string"){let s=n._dropLists.find(d=>d.id===t);return s}return t});if(this._group&&this._group._items.forEach(t=>{i.indexOf(t)===-1&&i.push(t)}),!this._scrollableParentsResolved){let t=this._scrollDispatcher.getAncestorScrollContainers(this.element).map(s=>s.getElementRef().nativeElement);this._dropListRef.withScrollableParents(t),this._scrollableParentsResolved=!0}if(this.elementContainerSelector){let t=this.element.nativeElement.querySelector(this.elementContainerSelector);e.withElementContainer(t)}e.disabled=this.disabled,e.lockAxis=this.lockAxis,e.sortingDisabled=this.sortingDisabled,e.autoScrollDisabled=this.autoScrollDisabled,e.autoScrollStep=Fi(this.autoScrollStep,2),e.connectedTo(i.filter(t=>t&&t!==this).map(t=>t._dropListRef)).withOrientation(this.orientation)})}_handleEvents(e){e.beforeStarted.subscribe(()=>{this._syncItemsWithRef(this.getSortedItems().map(i=>i._dragRef)),this._changeDetectorRef.markForCheck()}),e.entered.subscribe(i=>{this.entered.emit({container:this,item:i.item.data,currentIndex:i.currentIndex})}),e.exited.subscribe(i=>{this.exited.emit({container:this,item:i.item.data}),this._changeDetectorRef.markForCheck()}),e.sorted.subscribe(i=>{this.sorted.emit({previousIndex:i.previousIndex,currentIndex:i.currentIndex,container:this,item:i.item.data})}),e.dropped.subscribe(i=>{this.dropped.emit({previousIndex:i.previousIndex,currentIndex:i.currentIndex,previousContainer:i.previousContainer.data,container:i.container.data,item:i.item.data,isPointerOverContainer:i.isPointerOverContainer,distance:i.distance,dropPoint:i.dropPoint,event:i.event}),this._changeDetectorRef.markForCheck()}),ze(e.receivingStarted,e.receivingStopped).subscribe(()=>this._changeDetectorRef.markForCheck())}_assignDefaults(e){let{lockAxis:i,draggingDisabled:t,sortingDisabled:s,listAutoScrollDisabled:d,listOrientation:m}=e;this.disabled=t??!1,this.sortingDisabled=s??!1,this.autoScrollDisabled=d??!1,this.orientation=m||"vertical",i&&(this.lockAxis=i)}_syncItemsWithRef(e){this._latestSortedRefs=e,this._dropListRef.withItems(e)}static \u0275fac=function(i){return new(i||n)};static \u0275dir=it({type:n,selectors:[["","cdkDropList",""],["cdk-drop-list"]],hostAttrs:[1,"cdk-drop-list"],hostVars:7,hostBindings:function(i,t){i&2&&(we("id",t.id),nt("cdk-drop-list-disabled",t.disabled)("cdk-drop-list-dragging",t._dropListRef.isDragging())("cdk-drop-list-receiving",t._dropListRef.isReceiving()))},inputs:{connectedTo:[0,"cdkDropListConnectedTo","connectedTo"],data:[0,"cdkDropListData","data"],orientation:[0,"cdkDropListOrientation","orientation"],id:"id",lockAxis:[0,"cdkDropListLockAxis","lockAxis"],disabled:[2,"cdkDropListDisabled","disabled",ue],sortingDisabled:[2,"cdkDropListSortingDisabled","sortingDisabled",ue],enterPredicate:[0,"cdkDropListEnterPredicate","enterPredicate"],sortPredicate:[0,"cdkDropListSortPredicate","sortPredicate"],autoScrollDisabled:[2,"cdkDropListAutoScrollDisabled","autoScrollDisabled",ue],autoScrollStep:[0,"cdkDropListAutoScrollStep","autoScrollStep"],elementContainerSelector:[0,"cdkDropListElementContainer","elementContainerSelector"]},outputs:{dropped:"cdkDropListDropped",entered:"cdkDropListEntered",exited:"cdkDropListExited",sorted:"cdkDropListSorted"},exportAs:["cdkDropList"],features:[he([{provide:ko,useValue:void 0},{provide:No,useExisting:n}])]})}return n})();var Vo=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275mod=tt({type:n});static \u0275inj=et({providers:[Yi],imports:[zn]})}return n})();var Pt=(()=>{class n{transform(e){let i=!1;if(e){let t=new Date(e);i=F.isDateExpired(t)}return i}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275pipe=Sn({name:"expiredTime",type:n,pure:!0})}}return n})();var $a=n=>[n],Ot=n=>({"bg-gradient-warning":n}),zo=()=>["/menu/channel/marketplace/view"],Go=n=>({ID:n}),Uo=(n,o)=>({"text-danger":n,"text-success":o});function er(n,o){if(n&1&&(a(0,"span",17),g(1,"img",18),r(),c(2)),n&2){let e=o.item;l(),p("src",e.Logo,ht)("alt",e.Value),l(),O(" ",e.Value," ")}}function tr(n,o){n&1&&(k(0),a(1,"a",20),c(2,"Add"),r(),E())}function ir(n,o){if(n&1&&h(0,tr,3,0,"ng-container",19),n&2){let e=u();p("ngxPermissionsOnly",y(1,$a,e.roleChannelAdd))}}function nr(n,o){if(n&1){let e=A();k(0),a(1,"button",21),C("click",function(){x(e);let t=u();return D(t.onSaveDragAndDrop())}),g(2,"i",22),c(3,"Save Changes "),r(),E()}}function or(n,o){if(n&1){let e=A();a(0,"button",23),C("click",function(){x(e);let t=u();return D(t.cdkDragDisabled=!t.cdkDragDisabled)}),g(1,"i",22),c(2,"Sort "),r()}}function ar(n,o){if(n&1){let e=A();k(0),a(1,"div",42),C("click",function(){x(e);let t=u().$implicit,s=u();return D(s.onAuthorizeChannel(t))}),a(2,"span"),c(3," NOT AUTHORIZED "),r(),g(4,"i",43),r(),E()}}function rr(n,o){if(n&1&&(a(0,"div",34)(1,"span",17),c(2,"Shop Expiration:"),r(),a(3,"span",44),P(4,"expiredTime"),P(5,"expiredTime"),c(6),P(7,"date"),r()()),n&2){let e=u().$implicit;l(3),p("ngClass",ne(10,Uo,G(4,3,e==null?null:e.ExpiredTime),!G(5,5,e==null?null:e.ExpiredTime)))("matTooltip","The expiry date for "+e.Name+" Open API authorization from your account "+e.Name+" to Dealpos"),l(3),O(" ",me(7,7,e==null?null:e.ExpiredTime,"dd MMM yyyy")," ")}}function lr(n,o){if(n&1&&(a(0,"div",34)(1,"span",17),c(2,"Access Token Expiration:"),r(),a(3,"span",44),P(4,"expiredTime"),P(5,"expiredTime"),c(6),P(7,"date"),r()()),n&2){let e=u().$implicit;l(3),p("ngClass",ne(10,Uo,G(4,3,e==null?null:e.TokenExpired),!G(5,5,e==null?null:e.TokenExpired)))("matTooltip",e.tokenExpiredMsg),l(3),v(me(7,7,e.TokenExpired,"dd MMM yyyy HH:mm"))}}function sr(n,o){if(n&1&&(a(0,"div")(1,"span"),c(2),r()()),n&2){let e=u().$implicit;l(2),O("[ ",e==null?null:e.TotalMultiwarehouse," Warehouse Registered ]")}}function cr(n,o){if(n&1&&(a(0,"span",46)(1,"button",47),c(2),r()()),n&2){let e=u(2).$implicit,i=u();p("matTooltip",i.filterProductInventory(e.POSInventoryOutletArray,4,e.POSInventoryOutletArray.length)),l(2),O(" ",e.POSInventoryOutletArray.length-3," ")}}function dr(n,o){if(n&1&&(a(0,"span",35),c(1),h(2,cr,3,2,"span",45),r()),n&2){let e=u().$implicit,i=u();l(),O(" ",i.filterProductInventory(e.POSInventoryOutletArray,1,3)," "),l(),p("ngIf",e.POSInventoryOutletArray.length>3)}}function pr(n,o){n&1&&(a(0,"span",35),c(1," [SUM All Outlet] "),r())}function mr(n,o){if(n&1&&(a(0,"div",34),c(1," Additional Item: "),a(2,"span",35),c(3),r()()),n&2){let e=u().$implicit;l(3),O(" ",e==null?null:e.Additionalitem,"")}}function hr(n,o){if(n&1){let e=A();a(0,"tr",24)(1,"td",25)(2,"div",26)(3,"div",27)(4,"a",28),g(5,"img",29),r()(),a(6,"div",30)(7,"div")(8,"a",28)(9,"span",31),c(10),r()()(),a(11,"div")(12,"span"),c(13),r()(),h(14,ar,5,0,"ng-container",32),r()()(),a(15,"td",33)(16,"div",34)(17,"span",17),c(18,"Sync Orders:"),r(),a(19,"span",35),c(20),r()(),a(21,"div",34)(22,"span",17),c(23,"Product Sync:"),r(),a(24,"span",35),c(25),P(26,"date"),r()(),h(27,rr,8,13,"div",34)(28,lr,8,13,"div",34)(29,sr,3,1,"div"),r(),a(30,"td",33)(31,"div",36),c(32," New Order To: "),a(33,"span",35),c(34),r()(),a(35,"div",36),c(36," Dispatch Orders From: "),a(37,"span",35),c(38),r()(),a(39,"div",37),c(40," Product Inventory: "),h(41,dr,3,2,"span",38)(42,pr,2,0,"ng-template",null,1,ot),r(),a(44,"div",34),c(45," Minimum Inventory: "),a(46,"span",35),c(47),r()(),h(48,mr,4,1,"div",39),r(),a(49,"td",33)(50,"div",40)(51,"div",36),c(52," Payment: "),a(53,"span",35),c(54),r()(),a(55,"div",36),c(56," Tag: "),a(57,"span",35),c(58),r()(),a(59,"div",36),c(60," Tax : "),a(61,"span",35),c(62),r()()()(),a(63,"td")(64,"button",41),C("click",function(){let t=x(e).$implicit,s=u();return D(s.onTestChannel(t))}),c(65," Test "),r()()()}if(n&2){let e=o.$implicit,i=Be(43),t=u();p("cdkDragDisabled",t.cdkDragDisabled)("matTooltip",e!=null&&e.isComplete?"":"Please complete your channel configuration"),l(),p("ngClass",y(34,Ot,t.isEmpty(e==null?null:e.isComplete))),l(3),p("routerLink",Wt(36,zo))("queryParams",y(37,Go,e.ID)),l(),p("src",e.logo,ht),l(3),p("routerLink",Wt(39,zo))("queryParams",y(40,Go,e.ID)),l(2),v(e==null?null:e.Name),l(3),v(e==null?null:e.URL),l(),p("ngIf",e.Authorized==!1),l(6),v(e==null?null:e.SyncOrder),l(5),v(e!=null&&e.LastSync?me(26,31,e==null?null:e.LastSync,"dd MMM yyyy HH:mm"):"Never"),l(2),b(e.TypeID!=t.channelType.Tiktok&&(e!=null&&e.ExpiredTime)?27:-1),l(),b(e!=null&&e.TokenExpired?28:-1),l(),b(e.MultiWarehouse&&(e==null?null:e.TotalMultiwarehouse)>0?29:-1),l(2),p("ngClass",y(42,Ot,t.isEmpty(e==null?null:e.POSOutlet))),l(3),O(" ",e==null?null:e.POSOutlet,""),l(),p("ngClass",y(44,Ot,t.isEmpty(e==null?null:e.POSDeliveryOutlet))),l(3),O(" ",e==null?null:e.POSDeliveryOutlet,""),l(3),p("ngIf",e==null?null:e.POSInventoryOutlet)("ngIfElse",i),l(6),O(" ",e==null?null:e.MinimumInventory,""),l(),p("ngIf",e==null?null:e.Additionalitem),l(3),p("ngClass",y(46,Ot,t.isEmpty(e==null?null:e.POSInvoicePaymentMethod))),l(3),v(e==null?null:e.POSInvoicePaymentMethod),l(),p("ngClass",y(48,Ot,t.isEmpty(e==null?null:e.POSSalesOrderType))),l(3),O(" ",e==null?null:e.POSSalesOrderType,""),l(),p("ngClass",y(50,Ot,t.isEmpty(e==null?null:e.POSTax))),l(3),v(e!=null&&e.POSTax?e==null?null:e.POSTax:"-"),l(2),p("hidden",(e==null?null:e.TypeID)==t.channelType.KalCare)}}var jo=(()=>{class n{constructor(e,i,t){this.toastr=e,this.channelService=i,this.dialog=t,this.roleChannelAdd=ft.ChannelAdd,this.pagination={PageSize:20,PageNumber:1},this.hasClickedRowCount=!1,this.channelType=w,this.channelLoader(),this.pageData={Title:"Channel",Nav:[{Title:"Channel",Url:"/menu/channel",Active:!0},{Title:"POS",Url:"/menu/channel/config",Active:!1}]},this.cdkDragDisabled=!0}channelLoader(){this.channelService.getChannelLoader().subscribe(e=>{this.channelOptions=this.mappingChannelOptionLogo(e.Options),this.getChannels()})}onFilter(e){this.hasClickedRowCount=!1,this.getChannels(e)}getChannels(e){this.pageFilter={TypeID:this.channelTypeID,Text:e,RowCount:this.pagination.PageSize,PageNumber:this.pagination.PageNumber},this.channelService.getChannel(this.pageFilter).subscribe(i=>{this.channels=F.assignChannelLogo(i.Data),this.showWarningChannel(i?.ChannelNotUnique),this.checkFieldComplete(),this.mappingTokenExpiredMsg()})}mappingTokenExpiredMsg(){this.channels=this.channels.map(e=>(e.tokenExpiredMsg=this.generateTokenExpiryMessage(e),e=this.mappingIsExpiredDate(e),e))}mappingIsExpiredDate(e){if(F.IsNotEmpty(e.TokenExpired)){let i=new Date(e.TokenExpired);e.isTokenExpired=F.isDateExpired(i)}if(F.IsNotEmpty(e.ExpiredTime)){let i=new Date(e.ExpiredTime);e.isShopExpired=F.isDateExpired(i)}return e}getRowCount(){this.totalRowCount$=this.channelService.getChannelRowCount(this.pageFilter).pipe(ie(()=>this.hasClickedRowCount=!0),Ce(1))}onAuthorizeChannel(e){this.channelService.authorizedChannel(e.TypeID).subscribe()}showWarningChannel(e=[]){e.length>0&&this.isUniqueChannel(e)==!1&&this.dialog.open(so,{disableClose:!0,data:{channels:e}})}isUniqueChannel(e){let i=0;return e.forEach((t,s,d)=>{d.forEach(m=>{t.Value.Out==m.Value.Out&&t.Value.Tg==m.Value.Tg&&t.Key.TypeID!==m.Key.TypeID&&(i+=1)})}),i==0}checkFieldComplete(){this.channels=this.channels.map(e=>(e.isComplete=!1,F.IsNotEmpty(e.POSOutlet)&&F.IsNotEmpty(e.POSTax)&&F.IsNotEmpty(e.POSInvoicePaymentMethod)&&F.IsNotEmpty(e.POSSalesOrderType)&&F.IsNotEmpty(e.POSDeliveryOutlet)&&(e.isComplete=!0),e))}isEmpty(e){return F.IsEmpty(e)}onTestChannel(e){this.channelService.testShopID(e).subscribe({next:i=>{this.getChannels()},error:i=>{this.getChannels()}})}onDeleteChannel(e){confirm("Want to delete?")&&this.channelService.deleteChannel(e).subscribe(t=>{this.getChannels()})}onDrop(e){yi(this.channels,e.previousIndex,e.currentIndex)}onSaveDragAndDrop(){this.cdkDragDisabled=!0,this.channelService.updateChannelIndex(this.channels).subscribe({next:()=>{this.toastr.success("Channel list successfully saved","Success")}})}filterProductInventory(e,i,t){let s=e;return s=s.filter((m,_)=>(_+=1,_>=i&&_<=t)),s.join(", ")}mappingChannelOptionLogo(e){return e=e.map(i=>{let t=parseInt(i.Key);return i.Logo=F.getChannelLogoByTypeId(t),i}),e}generateTokenExpiryMessage(e){let i="";switch(e.TypeID){case w.Shopee:i="The expiry date for a token to call API to channel (automatically update every 4 hours)";break;case w.Lazada:i="The expiry date for a token to call API to channel (automatically update every 1 Month)";break;case w.Tiktok:i="The expiry date for a token to call API to channel (automatically update every 3 Days)";break}return i}static{this.\u0275fac=function(i){return new(i||n)(V(ae),V(Re),V(xt))}}static{this.\u0275cmp=S({type:n,selectors:[["app-marketplace"]],standalone:!1,decls:35,vars:14,consts:[["SORT_BTN",""],["SUM_Outlet",""],["headerTitle","Channel",3,"onSubmit","pageData"],[1,"fw-bold","mb-2"],["bindLabel","Value","name","TypeID","bindValue","Key","placeholder","Select Channel","appendTo","body",1,"center-text",3,"ngModelChange","clearable","items","ngModel"],["ng-option-tmp","","ng-label-tmp",""],[4,"ngIf","ngIfElse"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"table-responsive"],[1,"table","table-hover"],[1,"table-light"],["cdkDropList","",3,"cdkDropListDropped"],["cdkDrag","",3,"cdkDragDisabled","matTooltip",4,"ngFor","ngForOf"],[1,"col-12"],[3,"filterChange","total","next","previous","filter","totaldata","paginationTotal","hasClicked"],[1,"me-2"],[2,"width","18px",3,"src","alt"],[4,"ngxPermissionsOnly"],["role","button","routerLink","/menu/channel/marketplace/add",1,"btn","btn-success","btn-fill","btn-lg","text-white"],["title","Drag and drop the rows of the table below to the order you want then click Save",1,"btn","btn-success","btn-fill","btn-lg","me-3",2,"float","left",3,"click"],[1,"fa","fa-arrows-alt-v","me-3"],["title","Drag and drop the rows of the table below to the order you want then click Save",1,"btn","btn-outline-secondary","btn-lg","me-3",2,"float","left",3,"click"],["cdkDrag","",3,"cdkDragDisabled","matTooltip"],[3,"ngClass"],[1,"d-flex","align-items-center","h-100"],[1,"mx-6"],[3,"routerLink","queryParams"],[2,"width","30px",3,"src"],[1,"lh-base"],[2,"font-size","16px"],[4,"ngIf"],[1,"vertical-align-top",2,"font-size","12px"],[1,"mb-3"],[2,"color","blue"],[1,"mb-3",3,"ngClass"],[1,"mb-3","d-flex","align-items-center"],["style","color: blue",4,"ngIf","ngIfElse"],["class","mb-3",4,"ngIf"],[1,"d-inline-block","align-items-start"],[1,"btn","btn-outline-success","mb-3","ms-2","btn-sm",3,"click","hidden"],["role","button",1,"alert","alert-danger","d-inline-block","px-3","py-1","text-start","mt-2","fw-bold","cursor-pointer",2,"margin-bottom","0px !important",3,"click"],[1,"fa-regular","fa-clock","ms-2"],["matTooltipPosition","above",3,"ngClass","matTooltip"],["class","cursor-pointer",3,"matTooltip",4,"ngIf"],[1,"cursor-pointer",3,"matTooltip"],["type","button",1,"btn","btn-circle","btn-sm"]],template:function(i,t){if(i&1){let s=A();a(0,"mainpanel",2),C("onSubmit",function(m){return x(s),D(t.onFilter(m))}),a(1,"filters")(2,"div")(3,"label",3),c(4,"Channel"),r(),a(5,"ng-select",4),C("ngModelChange",function(m){return x(s),D(t.channelTypeID=m)}),h(6,er,3,3,"ng-template",5),r()()(),a(7,"actions"),h(8,ir,1,3,"ng-container")(9,nr,4,0,"ng-container",6)(10,or,3,0,"ng-template",null,0,ot),r(),a(12,"content")(13,"div",7)(14,"div",8)(15,"div",9)(16,"div",10)(17,"table",11)(18,"thead")(19,"tr",12)(20,"th"),c(21,"Channel"),r(),a(22,"th"),c(23,"Sync Info"),r(),a(24,"th"),c(25,"POS Outlet"),r(),a(26,"th"),c(27,"POS Orders"),r(),g(28,"th"),r()(),a(29,"tbody",13),C("cdkDropListDropped",function(m){return x(s),D(t.onDrop(m))}),h(30,hr,66,52,"tr",14),r()()()()(),a(31,"div",8)(32,"div",15)(33,"app-custom-paginator",16),P(34,"async"),pe("filterChange",function(m){return x(s),de(t.pagination,m)||(t.pagination=m),D(m)}),C("total",function(){return x(s),D(t.getRowCount())})("next",function(){return x(s),D(t.getChannels())})("previous",function(){return x(s),D(t.getChannels())}),r()()()()()()}if(i&2){let s=Be(11);p("pageData",t.pageData),l(5),p("clearable",!0)("items",t.channelOptions)("ngModel",t.channelTypeID),l(3),b(t.cdkDragDisabled?8:-1),l(),p("ngIf",!t.cdkDragDisabled)("ngIfElse",s),l(21),p("ngForOf",t.channels),l(3),ce("filter",t.pagination),p("totaldata",t.channels==null?null:t.channels.length)("paginationTotal",G(34,12,t.totalRowCount$))("hasClicked",t.hasClickedRowCount)}},dependencies:[L,fe,z,H,wt,Fe,Me,Pn,On,Pe,Wo,Lo,R,It,pi,_e,He,Pt],styles:[".btn-circle.btn-sm[_ngcontent-%COMP%]{width:18px;height:18px;padding:0;border-radius:60px;font-size:10px;text-align:center;background-color:#00f;border-color:#00f;color:#fff}table[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] > td.vertical-align-top[_ngcontent-%COMP%]{vertical-align:inherit}"]})}}return n})();var le=class{constructor(){this.ID="00000000-0000-0000-0000-000000000000",this.ShopID=0,this.Name="",this.TypeID=0,this.LastProductSync=new Date,this.POSOutlet="",this.POSOutletID="00000000-0000-0000-0000-000000000000",this.POSTax="",this.POSInvoicePaymentMethod="",this.POSSalesOrderType="",this.URL="",this.POSDeliveryOutlet="",this.ProductCategoryDefault=null,this.SyncOrder=!0,this.CustomerDefaultEmail=null,this.InventoryLog=2,this.IsComplete=!1,this.OrderLog=3,this.SyncInventory=!0,this.POSInventoryOutlet="",this.POSWriteOff="",this.Register="",this.POSInventoryOutletArray=[],this.MinimumInventory="",this.Additionalitem="",this.ConsumerKey="",this.ConsumerSecret="",this.ShopIDString="",this.Index=0,this.ServiceFeeWriteOffReason="",this.ServiceFeeWriteOff=!1,this.Brand="",this.ShippingFee="",this.ReturnProcess=!1,this.WarehouseID="",this.PaymentSyncTypeID=2}};var q=(()=>{class n{get mainForm(){return this._mainForm}get channel(){return this._channel}constructor(){this.formBuilder=f(En),this.http=f(ye),this._channel=new le,this._selectedWarehouse=Lt([]),this._mainForm=this.formBuilder.group({setup:this.formBuilder.group({Name:[null,[K.required]],TypeID:[null],ShopID:[null],ShopIDString:[null],URL:[null],MultiWarehouse:[!1]}),sync:this.formBuilder.group({SyncOrder:[!1],SyncInventory:[!1],UnpaidOrder:[!1],NewOrderSyncTypeID:[null],CancelledOrderSyncTypeID:[null]}),outlet:this.formBuilder.group({POSOutlet:[null],POSOutletID:[null,[K.required]],POSDeliveryOutlet:[null,[K.required]],POSInventoryOutletArray:[null]}),orders:this.formBuilder.group({POSInvoicePaymentMethod:[null,[K.required]],POSTax:[null,[K.required]],POSSalesOrderType:[null,[K.required]]}),invoiceFee:this.formBuilder.group({ServiceFeeWriteOff:[null],ServiceFeeWriteOffReason:[null,[K.required]],PaymentSyncTypeID:[null]}),advanced:this.formBuilder.group({Register:[null],MinimumInventory:[null,[K.required]],Additionalitem:[[]],IgnoreReverseOrder:[null],SizeChart:[null],ShippingFee:[null],FulfillmentWebhookHandling:[1],ReturnProcess:[!1],WarehouseID:[null],PricebookID:[null]}),default:this.formBuilder.group({CustomerDefaultEmail:[null,[K.email]],DefaultCategoryID:[null],Brand:[null],ScanProductSize:[0]}),authorized:this.formBuilder.group({ConsumerKey:[{value:null,disabled:!0}],ConsumerSecret:[{value:null,disabled:!0}],TokenLog:[null]}),webhook:this.formBuilder.control({init:!1,data:[]})})}initFormValue(e,i){this._channel=e;let t=e.POSOutletID;if(!t||t==="00000000-0000-0000-0000-000000000000"){let s=i?.ListOutlet.find(d=>d.Name===e.POSOutlet);s&&(t=s.ID)}this._mainForm.patchValue({setup:{Name:e.Name,TypeID:e.TypeID,ShopID:e.ShopID,ShopIDString:e.ShopIDString,URL:e.URL,MultiWarehouse:e.MultiWarehouse},sync:{SyncOrder:e.SyncOrder,SyncInventory:e.SyncInventory,UnpaidOrder:e.UnpaidOrder,NewOrderSyncTypeID:e.NewOrderSyncTypeID,CancelledOrderSyncTypeID:e.CancelledOrderSyncTypeID},outlet:{POSOutlet:e.POSOutlet,POSOutletID:t??null,POSDeliveryOutlet:e.POSDeliveryOutlet,POSInventoryOutletArray:e.POSInventoryOutletArray},orders:{POSInvoicePaymentMethod:e.POSInvoicePaymentMethod,POSTax:e.POSTax,POSSalesOrderType:e.POSSalesOrderType},invoiceFee:{ServiceFeeWriteOff:e.ServiceFeeWriteOff,ServiceFeeWriteOffReason:e.ServiceFeeWriteOffReason,PaymentSyncTypeID:e.PaymentSyncTypeID},advanced:{Register:e.Register,MinimumInventory:e.MinimumInventory,Additionalitem:e?.Additionalitem?.split(","),IgnoreReverseOrder:e.IgnoreReverseOrder,SizeChart:e.SizeChart,ShippingFee:e.ShippingFee,FulfillmentWebhookHandling:e.FulfillmentWebhookHandling,ReturnProcess:e.ReturnProcess,WarehouseID:e.WarehouseID,PricebookID:e.PricebookID},default:{CustomerDefaultEmail:e.CustomerDefaultEmail,DefaultCategoryID:e.DefaultCategoryID,Brand:e.Brand},authorized:{ConsumerKey:e.ConsumerKey,ConsumerSecret:e.ConsumerSecret,TokenLog:e.TokenLog}})}getLoadForm$(e){return this.http.post("/api/ChannelLoader/GetPOSProperties",{ID:e}).pipe(ie(i=>{this.initFormValue(i.Model,i.Options),this.setWriteOffReasonValidators(i.Model?.ServiceFeeWriteOff),this.addGroupByWarehouseLocation(i.Model?.WarehouseLocations)}))}setWriteOffReasonValidators(e){e?this._mainForm.get("invoiceFee.ServiceFeeWriteOffReason").setValidators([K.required]):this._mainForm.get("invoiceFee.ServiceFeeWriteOffReason").clearValidators(),this._mainForm.get("invoiceFee.ServiceFeeWriteOffReason")?.updateValueAndValidity()}addGroupByWarehouseLocation(e){let i=this.formBuilder.group({});e.forEach(t=>{i.addControl(t.Name,new zt(t.ProductInventoryOutlet,[K.required]))}),this._selectedWarehouse.set(e),this._mainForm.setControl("warehouse",i)}getFormValue(){let e=this._mainForm.getRawValue();e.advanced.Additionalitem=this.toStringAdditionalItem(),e.outlet.POSInventoryOutlet=this.toStringInventoryOutlet();let i=this.mapWarehouseLocation(),t=Object.keys(e),s={};return t.forEach(d=>{s=Ke(Ke({},s),e[d])}),this._channel=mn(Ke(Ke({},this._channel),s),{WarehouseLocations:i}),this._channel}getWebhooks(){return this._mainForm.value?.webhook}mapWarehouseLocation(){let e=this._mainForm.value,i=[],t=this._selectedWarehouse(),s=e?.warehouse;return s&&Object.keys(s)?.forEach(d=>{let m=t.find(_=>_.Name===d);F.IsNotEmpty(m)&&(m.ProductInventoryOutlet=s[d],i.push(m))}),i}toStringAdditionalItem(){let i=this._mainForm.value?.advanced?.Additionalitem,t="";return typeof i=="object"?t=i.join(","):t=i,t}toStringInventoryOutlet(){let i=this._mainForm.value?.outlet?.POSInventoryOutletArray,t="";return F.IsNotEmpty(i)&&i.length>0?t=i.join(","):t=null,t}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275prov=ge({token:n,factory:n.\u0275fac})}}return n})();var Ye=(()=>{class n{constructor(){this.httpService=f(ye),this._webhooksOptions=new We({data:[],isFirstLoad:!1}),this.webhooksOptions$=this._webhooksOptions.asObservable(),this._webhooks=new We({data:[],isFirstLoad:!1}),this.webhooks$=this._webhooks.asObservable()}getWebhookList(e){let i="/api/webhook/ListShopify";return this.webhooks$.pipe(Q(t=>t.isFirstLoad?Ve(t.data):this.httpService.get(i,[{key:"ID",value:e}]).pipe(ie(s=>{this._webhooks.next({data:s,isFirstLoad:!0})}))))}getOptions(){let e="/api/webhook/OptionShopify";return this.webhooksOptions$.pipe(Q(i=>i.isFirstLoad?Ve(i.data):this.httpService.get(e).pipe(ie(t=>{this._webhooksOptions.next({data:t,isFirstLoad:!0})}))))}getWebhookWithState(e){return this.getWebhookList(e).pipe(ti(i=>this.getOptions().pipe(se(t=>this.mappingEnabledWebhook(i,t)))),Ce(1))}mappingEnabledWebhook(e,i){return i.map(t=>(e.find(d=>d.topic===t.topic)?t.enabled=!0:t.enabled=!1,t.addressWithoutHost=this.hideWebhookPath(t.address),Ke({},t)))}hideWebhookPath(e){let i=new URL(e);return i.href.replace(i.host,"*")}updateWebhook(e,i){return this.httpService.post("/api/webhook/AddShopify",{ChannelID:e,Webhook:i})}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275prov=ge({token:n,factory:n.\u0275fac})}}return n})();var Qe=(()=>{class n{constructor(){this.httpService=f(ye),this._webhooksOptions=new We({data:[],isFirstLoad:!1}),this.webhooksOptions$=this._webhooksOptions.asObservable(),this._webhooks=new We({data:[],isFirstLoad:!1}),this.webhooks$=this._webhooks.asObservable()}getWebhookList(e){let i="/api/webhook/ListWoo";return this._webhooks.pipe(Q(t=>t.isFirstLoad?Ve(t.data):this.httpService.get(i,[{key:"ID",value:e}]).pipe(ie(s=>{this._webhooks.next({data:s,isFirstLoad:!0})}))))}getOptions(){let e="/api/webhook/OptionWoo";return this.webhooksOptions$.pipe(Q(i=>i.isFirstLoad?Ve(i.data):this.httpService.get(e).pipe(ie(t=>{this._webhooksOptions.next({data:t,isFirstLoad:!0})}))))}getWebhookWithState(e){return this.getWebhookList(e).pipe(ti(i=>this.getOptions().pipe(se(t=>this.mappingEnabledWebhook(i,t)))),Ce(1))}mappingEnabledWebhook(e,i){return i.map(t=>(t.address=t.delivery_url,e.find(d=>d.topic===t.topic)?t.enabled=!0:t.enabled=!1,t.addressWithoutHost=this.hideWebhookPath(t.address),Ke({},t)))}hideWebhookPath(e){let i=new URL(e);return i.href.replace(i.host,"*")}updateWebhook(e,i){return this.httpService.post("/api/webhook/AddWoo",{ChannelID:e,Webhook:i})}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275prov=ge({token:n,factory:n.\u0275fac})}}return n})();var qo=(n,o)=>({"is-invalid":n,"bg-gradient-warning":o});function ur(n,o){n&1&&(a(0,"div",9),c(1," Outlet is required! "),r())}function fr(n,o){n&1&&(a(0,"div",13)(1,"span"),c(2,"Outlet is required!"),r()())}var Ko=(()=>{class n{constructor(){this.formService=f(q),this.form=this.formService.mainForm,this.outletForm=this.form.get("outlet"),this.setupForm=this.form.get("setup");let e=this.setupForm.get("MultiWarehouse");this.disabledOutlet(e.value),this.disabledOutletDelivery(e.value),this.disabledInventoryOutlet(e.value),this.outletForm.get("POSOutletID")?.valueChanges.pipe(gt()).subscribe(i=>{let t=this.outlets?.find(s=>s.OutletID===i);this.outletForm.get("POSOutlet")?.setValue(t?t.Outlet:null,{emitEvent:!1})}),e?.valueChanges.pipe(gt()).subscribe(i=>{this.disabledOutlet(i),this.disabledOutletDelivery(i),this.disabledInventoryOutlet(i)})}disabledOutlet(e){let i=this.outletForm.get("POSOutletID");e?i.disable({onlySelf:!0}):i.enable({onlySelf:!0})}disabledOutletDelivery(e){let i=this.outletForm.get("POSDeliveryOutlet");e?i.disable({onlySelf:!0}):i.enable({onlySelf:!0})}disabledInventoryOutlet(e){let i=this.outletForm.get("POSInventoryOutletArray");e?i.disable({onlySelf:!0}):i.enable({onlySelf:!0})}onSelectOutlet(){let e=this.outletForm.get("POSOutletID")?.value,i=this.outlets?.find(s=>s.ID===e);this.outletForm.get("POSOutlet")?.setValue(i?i.Outlet:null,{emitEvent:!1});let t=this.form?.get("sync")?.get("SyncOrder");F.IsEmpty(e)?t.setValue(!1):t.setValue(!0)}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275cmp=S({type:n,selectors:[["app-outle-config"]],inputs:{outlets:"outlets"},decls:23,vars:17,consts:[[1,"card","pt-12","border-top-0","rounded-0","rounded-bottom"],[3,"formGroup"],["formGroupName","outlet"],[1,"card-body"],[1,"row"],[1,"col-6"],["matTooltip","Outlet where the transaction is recorded in POS","matTooltipPosition","above",1,"form-label-group"],["id","outletOrder","bindLabel","Outlet","bindValue","ID","formControlName","POSOutletID","name","Name",1,"center-text","tall",3,"change","ngClass","items","clearable"],["for","outletOrder"],["id","outletOrder",1,"invalid-feedback"],["matTooltip","Outlet where the stock is deducted in POS","matTooltipPosition","above",1,"form-label-group"],["id","inventorySource","bindLabel","Outlet","bindValue","Outlet","formControlName","POSDeliveryOutlet","name","Delivery",1,"center-text","tall",3,"ngClass","items","clearable"],["for","inventorySource"],["id","inventorySource",1,"invalid-feedback"],[1,"col-12"],["matTooltip","Outlet where the inventory will displayed as inventory in inventory Comparison Menu","matTooltipPosition","above",1,"form-label-group"],["id","ProductInventory","multiple","true","bindLabel","Outlet","bindValue","Outlet","placeholder","Product Inventory","formControlName","POSInventoryOutletArray","name","POSInventoryOutletArray",1,"center-text","tall","multiple-select",3,"items"],["for","ProductInventory"]],template:function(i,t){if(i&1&&(a(0,"div",0)(1,"form",1)(2,"div",2)(3,"div",3)(4,"div",4)(5,"div",5)(6,"div",6)(7,"ng-select",7),C("change",function(){return t.onSelectOutlet()}),r(),a(8,"label",8),c(9),r(),h(10,ur,2,0,"div",9),r()(),a(11,"div",5)(12,"div",10),g(13,"ng-select",11),a(14,"label",12),c(15,"Dispatch Orders From"),r(),h(16,fr,3,0,"div",13),r()()(),a(17,"div",4)(18,"div",14)(19,"div",15),g(20,"ng-select",16),a(21,"label",17),c(22,"Product Inventory"),r()()()()()()()()),i&2){let s,d;l(),p("formGroup",t.form),l(6),p("ngClass",ne(11,qo,t.outletForm.get("POSOutletID").invalid&&(t.outletForm.get("POSOutletID").dirty||t.outletForm.get("POSOutletID").touched),t.outletForm.get("POSOutletID").invalid))("items",t.outlets)("clearable",!1),l(2),O("New Order To ",t.outletForm.get("POSOutlet").value,""),l(),b(t.outletForm.get("POSOutletID").invalid&&(t.outletForm.get("POSOutletID").dirty||t.outletForm.get("POSOutletID").touched)?10:-1),l(3),p("ngClass",ne(14,qo,((s=t.outletForm.get("POSDeliveryOutlet"))==null?null:s.invalid)&&(((s=t.outletForm.get("POSDeliveryOutlet"))==null?null:s.dirty)||((s=t.outletForm.get("POSDeliveryOutlet"))==null?null:s.touched)),(s=t.outletForm.get("POSDeliveryOutlet"))==null?null:s.invalid))("items",t.outlets)("clearable",!1),l(3),b((d=t.outletForm.get("POSDeliveryOutlet"))!=null&&d.invalid&&((d=t.outletForm.get("POSDeliveryOutlet"))!=null&&d.dirty||(d=t.outletForm.get("POSDeliveryOutlet"))!=null&&d.touched)?16:-1),l(4),p("items",t.outlets)}},dependencies:[I,L,W,R,Y,$,H,X,Z,ee,oe,te,Me],encapsulation:2,changeDetection:0})}}return n})();var Qi=(n,o)=>({"is-invalid":n,"bg-gradient-warning":o});function gr(n,o){n&1&&(a(0,"div",9)(1,"span"),c(2,"Payment Method is required!"),r()())}function vr(n,o){n&1&&(a(0,"div",13)(1,"span"),c(2,"Tax Type is required!"),r()())}function _r(n,o){n&1&&(a(0,"div",17)(1,"span"),c(2,"Sales Orders is required!"),r()())}var Zo=(()=>{class n{constructor(){this.formService=f(q),this.form=this.formService.mainForm,this.ordersForm=this.form.get("orders"),this.channel=new le}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275cmp=S({type:n,selectors:[["app-orders-config"]],inputs:{channel:"channel",paymentMethods:"paymentMethods",taxes:"taxes",salesTypes:"salesTypes"},decls:24,vars:19,consts:[[1,"card","pt-12","border-top-0","rounded-0","rounded-bottom"],[3,"formGroup"],["formGroupName","orders"],[1,"card-body"],[1,"row"],[1,"col-6"],["matTooltipPosition","above","matTooltip","Payment that will be recorded in POS if there is a transaction from the marketplace",1,"form-label-group"],["id","paymentOutlet","bindLabel","Name","bindValue","Name","formControlName","POSInvoicePaymentMethod","name","InvoicePaymentMethod",1,"center-text","tall",3,"items","ngClass"],["for","paymentOutlet"],["id","paymentOutlet",1,"invalid-feedback"],["matTooltip","Tax Type that will be recorded in POS if there is a transaction from the marketplace","matTooltipPosition","above",1,"form-label-group"],["id","taxType","bindLabel","Name","bindValue","Name","formControlName","POSTax","name","POSTax",1,"center-text","tall",3,"items","ngClass"],["for","taxType"],["id","taxType",1,"invalid-feedback"],["matTooltip","Tag Type that will be recorded in POS if there is a transaction from the marketplace","matTooltipPosition","above",1,"form-label-group"],["id","salesTag","bindLabel","Name","bindValue","Name","formControlName","POSSalesOrderType","name","SalesType",1,"center-text","tall",3,"items","ngClass"],["for","salesTag"],["id","salesTag",1,"invalid-feedback"]],template:function(i,t){if(i&1&&(a(0,"div",0)(1,"form",1)(2,"div",2)(3,"div",3)(4,"div",4)(5,"div",5)(6,"div",6),g(7,"ng-select",7),a(8,"label",8),c(9,"Payment Method"),r(),h(10,gr,3,0,"div",9),r()(),a(11,"div",5)(12,"div",10),g(13,"ng-select",11),a(14,"label",12),c(15,"Tax"),r(),h(16,vr,3,0,"div",13),r()()(),a(17,"div",4)(18,"div",5)(19,"div",14),g(20,"ng-select",15),a(21,"label",16),c(22,"Sales Orders Tag"),r(),h(23,_r,3,0,"div",17),r()()()()()()()),i&2){let s,d,m,_,T,N;l(),p("formGroup",t.form),l(6),p("items",t.paymentMethods)("ngClass",ne(10,Qi,((s=t.ordersForm.get("POSInvoicePaymentMethod"))==null?null:s.invalid)&&(((s=t.ordersForm.get("POSInvoicePaymentMethod"))==null?null:s.dirty)||((s=t.ordersForm.get("POSInvoicePaymentMethod"))==null?null:s.touched)),(s=t.ordersForm.get("POSInvoicePaymentMethod"))==null?null:s.invalid)),l(3),b((d=t.ordersForm.get("POSInvoicePaymentMethod"))!=null&&d.invalid&&((d=t.ordersForm.get("POSInvoicePaymentMethod"))!=null&&d.dirty||(d=t.ordersForm.get("POSInvoicePaymentMethod"))!=null&&d.touched)?10:-1),l(3),p("items",t.taxes)("ngClass",ne(13,Qi,((m=t.ordersForm.get("POSTax"))==null?null:m.invalid)&&(((m=t.ordersForm.get("POSTax"))==null?null:m.dirty)||((m=t.ordersForm.get("POSTax"))==null?null:m.touched)),(m=t.ordersForm.get("POSTax"))==null?null:m.invalid)),l(3),b((_=t.ordersForm.get("POSTax"))!=null&&_.invalid&&((_=t.ordersForm.get("POSTax"))!=null&&_.dirty||(_=t.ordersForm.get("POSTax"))!=null&&_.touched)?16:-1),l(4),p("items",t.salesTypes)("ngClass",ne(16,Qi,((T=t.ordersForm.get("POSSalesOrderType"))==null?null:T.invalid)&&(((T=t.ordersForm.get("POSSalesOrderType"))==null?null:T.dirty)||((T=t.ordersForm.get("POSSalesOrderType"))==null?null:T.touched)),(T=t.ordersForm.get("POSSalesOrderType"))==null?null:T.invalid)),l(3),b((N=t.ordersForm.get("POSSalesOrderType"))!=null&&N.invalid&&((N=t.ordersForm.get("POSSalesOrderType"))!=null&&N.dirty||(N=t.ordersForm.get("POSSalesOrderType"))!=null&&N.touched)?23:-1)}},dependencies:[I,L,W,R,Y,$,H,X,Z,ee,oe,te,Me],encapsulation:2,changeDetection:0})}}return n})();var yr=n=>({empty:n}),br=n=>({"danger is-invalid":n});function Cr(n,o){n&1&&(a(0,"div",23),c(1," Write off reason is required! "),r())}function Sr(n,o){if(n&1){let e=A();k(0),a(1,"div",5)(2,"div",19)(3,"div",20),g(4,"ng-select",21),a(5,"label",22),c(6,"Write Off Reason"),r(),h(7,Cr,2,0,"div",23),r(),a(8,"div",24)(9,"button",25),C("click",function(){x(e);let t=u();return D(t.onAddWriteOffReason())}),g(10,"i",26),r()()()(),E()}if(n&2){let e,i,t,s=u();l(3),p("ngClass",y(4,yr,((e=s.feeForm.get("ServiceFeeWriteOffReason"))==null?null:e.invalid)&&(((e=s.feeForm.get("ServiceFeeWriteOffReason"))==null?null:e.dirty)||((e=s.feeForm.get("ServiceFeeWriteOffReason"))==null?null:e.touched)))),l(),p("ngClass",y(6,br,!((i=s.feeForm.get("ServiceFeeWriteOffReason"))!=null&&i.value)))("items",s.listWriteOff),l(3),b((t=s.feeForm.get("ServiceFeeWriteOffReason"))!=null&&t.invalid&&((t=s.feeForm.get("ServiceFeeWriteOffReason"))!=null&&t.dirty||(t=s.feeForm.get("ServiceFeeWriteOffReason"))!=null&&t.touched)?7:-1)}}var Yo=(()=>{class n{constructor(e){this.dialog=e,this.formChannel=f(q),this.form=this.formChannel.mainForm,this.feeForm=this.form.get("invoiceFee"),this.channel=new le}onAddWriteOffReason(){this.dialog.open(co,{width:"450px"}).afterClosed().pipe($e(e=>e)).subscribe(e=>{this.listWriteOff=[e,...this.listWriteOff],this.feeForm?.get("ServiceFeeWriteOffReason")?.setValue(e.Name)})}onOptionChange(e){this.setWriteOffReasonValidators(e.value)}setWriteOffReasonValidators(e){e?this.feeForm?.get("ServiceFeeWriteOffReason")?.setValidators([K.required]):this.feeForm?.get("ServiceFeeWriteOffReason")?.clearValidators(),this.feeForm?.get("ServiceFeeWriteOffReason")?.updateValueAndValidity()}static{this.\u0275fac=function(i){return new(i||n)(V(xt))}}static{this.\u0275cmp=S({type:n,selectors:[["app-invoice-fee-config"]],inputs:{channel:"channel",listWriteOff:"listWriteOff"},decls:33,vars:7,consts:[[1,"card","pt-12","border-top-0","rounded-0","rounded-bottom"],[3,"formGroup"],["formGroupName","invoiceFee"],[1,"card-body"],[1,"row"],[1,"col-6"],["matTooltipPosition","above","matTooltip","Enable for record marketplace service fee in POS as Write off",1,"form-label-group","radio"],["for","enableWriteOff"],[1,"mt-3"],["formControlName","ServiceFeeWriteOff","name","enableWriteOff",3,"change"],[1,"me-5",3,"value"],[1,"d-flex","border","mb-4","pt-6","px-6",2,"background","#1f87ac0a","border-radius","5px"],[1,"me-3","pt-1"],[1,"fa","fa-lightbulb","fs-5"],[1,"mb-6"],[1,"form-label-group","radio"],["for","paymentSyncType"],["formControlName","PaymentSyncTypeID","name","PaymentSyncTypeID"],[4,"ngIf"],[1,"d-flex","align-items-center","justify-content-between"],["matTooltipPosition","above","matTooltip","Choose Reason to Write Off",1,"form-label-group","w-100",3,"ngClass"],["id","writeOffReason","clearable","true","bindLabel","Name","bindValue","Name","placeholder","Write Off Reason","formControlName","ServiceFeeWriteOffReason","name","writeOffReason",1,"center-text","tall",3,"ngClass","items"],["for","ServiceFeeWriteOffReason"],[1,"invalid-feedback"],[1,"mb-5","ms-4"],[1,"btn","btn-sm","primary",3,"click"],[1,"fas","fa-plus-circle","fa-lg","fs-1"]],template:function(i,t){if(i&1&&(a(0,"div",0)(1,"form",1)(2,"div",2)(3,"div",3)(4,"div",4)(5,"div",5)(6,"div",6)(7,"label",7),c(8,"Enable Write Off"),r(),a(9,"div",8)(10,"mat-radio-group",9),C("change",function(d){return t.onOptionChange(d)}),a(11,"mat-radio-button",10),c(12," Yes "),r(),a(13,"mat-radio-button",10),c(14," No "),r()()()(),a(15,"div",11)(16,"div",12),g(17,"i",13),r(),a(18,"p",14),c(19," When this configuration is turned on, Invoice Payment value is deducted with Marketplace Service Fee. Ex: $100 Order might only receive $97 Payment, $3 is recorded as Write Off "),r()()(),a(20,"div",5)(21,"div",15)(22,"label",16),c(23,"PaymentSyncType"),r(),a(24,"div",8)(25,"mat-radio-group",17)(26,"mat-radio-button",10),c(27," Never "),r(),a(28,"mat-radio-button",10),c(29," Full "),r(),a(30,"mat-radio-button",10),c(31," Write Off "),r()()()()(),h(32,Sr,11,8,"ng-container",18),r()()()()()),i&2){let s;l(),p("formGroup",t.form),l(10),p("value",!0),l(2),p("value",!1),l(13),p("value",0),l(2),p("value",1),l(2),p("value",2),l(2),p("ngIf",(s=t.feeForm.get("ServiceFeeWriteOff"))==null?null:s.value)}},dependencies:[I,L,z,W,R,Y,$,H,X,Z,ee,oe,te,Me,Ae,Ue,je],styles:["button.btn[_ngcontent-%COMP%]:hover, [_ngcontent-%COMP%]:disabled{border:none}"]})}}return n})();var xr=["*",[["mat-chip-avatar"],["","matChipAvatar",""]],[["mat-chip-trailing-icon"],["","matChipRemove",""],["","matChipTrailingIcon",""]]],Dr=["*","mat-chip-avatar, [matChipAvatar]","mat-chip-trailing-icon,[matChipRemove],[matChipTrailingIcon]"];function kr(n,o){n&1&&(a(0,"span",3),De(1,1),r())}function Er(n,o){n&1&&(a(0,"span",6),De(1,2),r())}var Pr=`.mdc-evolution-chip,.mdc-evolution-chip__cell,.mdc-evolution-chip__action{display:inline-flex;align-items:center}.mdc-evolution-chip{position:relative;max-width:100%}.mdc-evolution-chip__cell,.mdc-evolution-chip__action{height:100%}.mdc-evolution-chip__cell--primary{flex-basis:100%;overflow-x:hidden}.mdc-evolution-chip__cell--trailing{flex:1 0 auto}.mdc-evolution-chip__action{align-items:center;background:none;border:none;box-sizing:content-box;cursor:pointer;display:inline-flex;justify-content:center;outline:none;padding:0;text-decoration:none;color:inherit}.mdc-evolution-chip__action--presentational{cursor:auto}.mdc-evolution-chip--disabled,.mdc-evolution-chip__action:disabled{pointer-events:none}@media(forced-colors: active){.mdc-evolution-chip--disabled,.mdc-evolution-chip__action:disabled{forced-color-adjust:none}}.mdc-evolution-chip__action--primary{font:inherit;letter-spacing:inherit;white-space:inherit;overflow-x:hidden}.mat-mdc-standard-chip .mdc-evolution-chip__action--primary::before{border-width:var(--mdc-chip-outline-width, 1px);border-radius:var(--mdc-chip-container-shape-radius, 8px);box-sizing:border-box;content:"";height:100%;left:0;position:absolute;pointer-events:none;top:0;width:100%;z-index:1;border-style:solid}.mat-mdc-standard-chip .mdc-evolution-chip__action--primary{padding-left:12px;padding-right:12px}.mat-mdc-standard-chip.mdc-evolution-chip--with-primary-graphic .mdc-evolution-chip__action--primary{padding-left:0;padding-right:12px}[dir=rtl] .mat-mdc-standard-chip.mdc-evolution-chip--with-primary-graphic .mdc-evolution-chip__action--primary{padding-left:12px;padding-right:0}.mat-mdc-standard-chip:not(.mdc-evolution-chip--disabled) .mdc-evolution-chip__action--primary::before{border-color:var(--mdc-chip-outline-color, var(--mat-sys-outline))}.mdc-evolution-chip__action--primary:not(.mdc-evolution-chip__action--presentational):not(.mdc-ripple-upgraded):focus::before{border-color:var(--mdc-chip-focus-outline-color, var(--mat-sys-on-surface-variant))}.mat-mdc-standard-chip.mdc-evolution-chip--disabled .mdc-evolution-chip__action--primary::before{border-color:var(--mdc-chip-disabled-outline-color, color-mix(in srgb, var(--mat-sys-on-surface) 12%, transparent))}.mat-mdc-standard-chip.mdc-evolution-chip--selected .mdc-evolution-chip__action--primary::before{border-width:var(--mdc-chip-flat-selected-outline-width, 0)}.mat-mdc-basic-chip .mdc-evolution-chip__action--primary{font:inherit}.mat-mdc-standard-chip.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__action--primary{padding-left:12px;padding-right:0}[dir=rtl] .mat-mdc-standard-chip.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__action--primary{padding-left:0;padding-right:12px}.mat-mdc-standard-chip.mdc-evolution-chip--with-primary-graphic.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__action--primary{padding-left:0;padding-right:0}[dir=rtl] .mat-mdc-standard-chip.mdc-evolution-chip--with-primary-graphic.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__action--primary{padding-left:0;padding-right:0}.mdc-evolution-chip--with-avatar.mdc-evolution-chip--with-primary-graphic .mdc-evolution-chip__action--primary{padding-left:0;padding-right:12px}[dir=rtl] .mdc-evolution-chip--with-avatar.mdc-evolution-chip--with-primary-graphic .mdc-evolution-chip__action--primary{padding-left:12px;padding-right:0}.mdc-evolution-chip--with-avatar.mdc-evolution-chip--with-primary-graphic.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__action--primary{padding-left:0;padding-right:0}[dir=rtl] .mdc-evolution-chip--with-avatar.mdc-evolution-chip--with-primary-graphic.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__action--primary{padding-left:0;padding-right:0}.mdc-evolution-chip__action--trailing{position:relative;overflow:visible}.mat-mdc-standard-chip:not(.mdc-evolution-chip--disabled) .mdc-evolution-chip__action--trailing{color:var(--mdc-chip-with-trailing-icon-trailing-icon-color, var(--mat-sys-on-surface-variant))}.mat-mdc-standard-chip.mdc-evolution-chip--disabled .mdc-evolution-chip__action--trailing{color:var(--mdc-chip-with-trailing-icon-disabled-trailing-icon-color, var(--mat-sys-on-surface))}.mat-mdc-standard-chip.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__action--trailing{padding-left:8px;padding-right:8px}.mat-mdc-standard-chip.mdc-evolution-chip--with-primary-graphic.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__action--trailing{padding-left:8px;padding-right:8px}.mdc-evolution-chip--with-avatar.mdc-evolution-chip--with-primary-graphic.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__action--trailing{padding-left:8px;padding-right:8px}[dir=rtl] .mdc-evolution-chip--with-avatar.mdc-evolution-chip--with-primary-graphic.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__action--trailing{padding-left:8px;padding-right:8px}.mdc-evolution-chip__text-label{-webkit-user-select:none;user-select:none;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.mat-mdc-standard-chip .mdc-evolution-chip__text-label{font-family:var(--mdc-chip-label-text-font, var(--mat-sys-label-large-font));line-height:var(--mdc-chip-label-text-line-height, var(--mat-sys-label-large-line-height));font-size:var(--mdc-chip-label-text-size, var(--mat-sys-label-large-size));font-weight:var(--mdc-chip-label-text-weight, var(--mat-sys-label-large-weight));letter-spacing:var(--mdc-chip-label-text-tracking, var(--mat-sys-label-large-tracking))}.mat-mdc-standard-chip:not(.mdc-evolution-chip--disabled) .mdc-evolution-chip__text-label{color:var(--mdc-chip-label-text-color, var(--mat-sys-on-surface-variant))}.mat-mdc-standard-chip.mdc-evolution-chip--selected:not(.mdc-evolution-chip--disabled) .mdc-evolution-chip__text-label{color:var(--mdc-chip-selected-label-text-color, var(--mat-sys-on-secondary-container))}.mat-mdc-standard-chip.mdc-evolution-chip--disabled .mdc-evolution-chip__text-label,.mat-mdc-standard-chip.mdc-evolution-chip--selected.mdc-evolution-chip--disabled .mdc-evolution-chip__text-label{color:var(--mdc-chip-disabled-label-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mdc-evolution-chip__graphic{align-items:center;display:inline-flex;justify-content:center;overflow:hidden;pointer-events:none;position:relative;flex:1 0 auto}.mat-mdc-standard-chip .mdc-evolution-chip__graphic{width:var(--mdc-chip-with-avatar-avatar-size, 24px);height:var(--mdc-chip-with-avatar-avatar-size, 24px);font-size:var(--mdc-chip-with-avatar-avatar-size, 24px)}.mdc-evolution-chip--selecting .mdc-evolution-chip__graphic{transition:width 150ms 0ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-evolution-chip--selectable:not(.mdc-evolution-chip--selected):not(.mdc-evolution-chip--with-primary-icon) .mdc-evolution-chip__graphic{width:0}.mat-mdc-standard-chip.mdc-evolution-chip--with-primary-graphic .mdc-evolution-chip__graphic{padding-left:6px;padding-right:6px}.mdc-evolution-chip--with-avatar.mdc-evolution-chip--with-primary-graphic .mdc-evolution-chip__graphic{padding-left:4px;padding-right:8px}[dir=rtl] .mdc-evolution-chip--with-avatar.mdc-evolution-chip--with-primary-graphic .mdc-evolution-chip__graphic{padding-left:8px;padding-right:4px}.mat-mdc-standard-chip.mdc-evolution-chip--with-primary-graphic.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__graphic{padding-left:6px;padding-right:6px}.mdc-evolution-chip--with-avatar.mdc-evolution-chip--with-primary-graphic.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__graphic{padding-left:4px;padding-right:8px}[dir=rtl] .mdc-evolution-chip--with-avatar.mdc-evolution-chip--with-primary-graphic.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__graphic{padding-left:8px;padding-right:4px}.mdc-evolution-chip__checkmark{position:absolute;opacity:0;top:50%;left:50%;height:20px;width:20px}.mat-mdc-standard-chip:not(.mdc-evolution-chip--disabled) .mdc-evolution-chip__checkmark{color:var(--mdc-chip-with-icon-selected-icon-color, var(--mat-sys-on-secondary-container))}.mat-mdc-standard-chip.mdc-evolution-chip--disabled .mdc-evolution-chip__checkmark{color:var(--mdc-chip-with-icon-disabled-icon-color, var(--mat-sys-on-surface))}.mdc-evolution-chip--selecting .mdc-evolution-chip__checkmark{transition:transform 150ms 0ms cubic-bezier(0.4, 0, 0.2, 1);transform:translate(-75%, -50%)}.mdc-evolution-chip--selected .mdc-evolution-chip__checkmark{transform:translate(-50%, -50%);opacity:1}.mdc-evolution-chip__checkmark-svg{display:block}.mdc-evolution-chip__checkmark-path{stroke-width:2px;stroke-dasharray:29.7833385;stroke-dashoffset:29.7833385;stroke:currentColor}.mdc-evolution-chip--selecting .mdc-evolution-chip__checkmark-path{transition:stroke-dashoffset 150ms 45ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-evolution-chip--selected .mdc-evolution-chip__checkmark-path{stroke-dashoffset:0}@media(forced-colors: active){.mdc-evolution-chip__checkmark-path{stroke:CanvasText !important}}.mat-mdc-standard-chip .mdc-evolution-chip__icon--trailing{height:18px;width:18px;font-size:18px}.mdc-evolution-chip--disabled .mdc-evolution-chip__icon--trailing.mat-mdc-chip-remove{opacity:calc(var(--mat-chip-trailing-action-opacity, 1)*var(--mdc-chip-with-trailing-icon-disabled-trailing-icon-opacity, 0.38))}.mdc-evolution-chip--disabled .mdc-evolution-chip__icon--trailing.mat-mdc-chip-remove:focus{opacity:calc(var(--mat-chip-trailing-action-focus-opacity, 1)*var(--mdc-chip-with-trailing-icon-disabled-trailing-icon-opacity, 0.38))}.mat-mdc-standard-chip{border-radius:var(--mdc-chip-container-shape-radius, 8px);height:var(--mdc-chip-container-height, 32px)}.mat-mdc-standard-chip:not(.mdc-evolution-chip--disabled){background-color:var(--mdc-chip-elevated-container-color, transparent)}.mat-mdc-standard-chip.mdc-evolution-chip--disabled{background-color:var(--mdc-chip-elevated-disabled-container-color)}.mat-mdc-standard-chip.mdc-evolution-chip--selected:not(.mdc-evolution-chip--disabled){background-color:var(--mdc-chip-elevated-selected-container-color, var(--mat-sys-secondary-container))}.mat-mdc-standard-chip.mdc-evolution-chip--selected.mdc-evolution-chip--disabled{background-color:var(--mdc-chip-flat-disabled-selected-container-color, color-mix(in srgb, var(--mat-sys-on-surface) 12%, transparent))}@media(forced-colors: active){.mat-mdc-standard-chip{outline:solid 1px}}.mat-mdc-standard-chip .mdc-evolution-chip__icon--primary{border-radius:var(--mdc-chip-with-avatar-avatar-shape-radius, 24px);width:var(--mdc-chip-with-icon-icon-size, 18px);height:var(--mdc-chip-with-icon-icon-size, 18px);font-size:var(--mdc-chip-with-icon-icon-size, 18px)}.mdc-evolution-chip--selected .mdc-evolution-chip__icon--primary{opacity:0}.mat-mdc-standard-chip:not(.mdc-evolution-chip--disabled) .mdc-evolution-chip__icon--primary{color:var(--mdc-chip-with-icon-icon-color, var(--mat-sys-on-surface-variant))}.mat-mdc-standard-chip.mdc-evolution-chip--disabled .mdc-evolution-chip__icon--primary{color:var(--mdc-chip-with-icon-disabled-icon-color, var(--mat-sys-on-surface))}.mat-mdc-chip-highlighted{--mdc-chip-with-icon-icon-color:var(--mdc-chip-with-icon-selected-icon-color, var(--mat-sys-on-secondary-container));--mdc-chip-elevated-container-color:var(--mdc-chip-elevated-selected-container-color, var(--mat-sys-secondary-container));--mdc-chip-label-text-color:var(--mdc-chip-selected-label-text-color, var(--mat-sys-on-secondary-container));--mdc-chip-outline-width:var(--mdc-chip-flat-selected-outline-width, 0)}.mat-mdc-chip-focus-overlay{background:var(--mdc-chip-focus-state-layer-color, var(--mat-sys-on-surface-variant))}.mat-mdc-chip-selected .mat-mdc-chip-focus-overlay,.mat-mdc-chip-highlighted .mat-mdc-chip-focus-overlay{background:var(--mdc-chip-selected-focus-state-layer-color, var(--mat-sys-on-secondary-container))}.mat-mdc-chip:hover .mat-mdc-chip-focus-overlay{background:var(--mdc-chip-hover-state-layer-color, var(--mat-sys-on-surface-variant));opacity:var(--mdc-chip-hover-state-layer-opacity, var(--mat-sys-hover-state-layer-opacity))}.mat-mdc-chip-focus-overlay .mat-mdc-chip-selected:hover,.mat-mdc-chip-highlighted:hover .mat-mdc-chip-focus-overlay{background:var(--mdc-chip-selected-hover-state-layer-color, var(--mat-sys-on-secondary-container));opacity:var(--mdc-chip-selected-hover-state-layer-opacity, var(--mat-sys-hover-state-layer-opacity))}.mat-mdc-chip.cdk-focused .mat-mdc-chip-focus-overlay{background:var(--mdc-chip-focus-state-layer-color, var(--mat-sys-on-surface-variant));opacity:var(--mdc-chip-focus-state-layer-opacity, var(--mat-sys-focus-state-layer-opacity))}.mat-mdc-chip-selected.cdk-focused .mat-mdc-chip-focus-overlay,.mat-mdc-chip-highlighted.cdk-focused .mat-mdc-chip-focus-overlay{background:var(--mdc-chip-selected-focus-state-layer-color, var(--mat-sys-on-secondary-container));opacity:var(--mdc-chip-selected-focus-state-layer-opacity, var(--mat-sys-focus-state-layer-opacity))}.mdc-evolution-chip--disabled:not(.mdc-evolution-chip--selected) .mat-mdc-chip-avatar{opacity:var(--mdc-chip-with-avatar-disabled-avatar-opacity, 0.38)}.mdc-evolution-chip--disabled .mdc-evolution-chip__icon--trailing{opacity:var(--mdc-chip-with-trailing-icon-disabled-trailing-icon-opacity, 0.38)}.mdc-evolution-chip--disabled.mdc-evolution-chip--selected .mdc-evolution-chip__checkmark{opacity:var(--mdc-chip-with-icon-disabled-icon-opacity, 0.38)}.mat-mdc-standard-chip.mdc-evolution-chip--disabled{opacity:var(--mat-chip-disabled-container-opacity, 1)}.mat-mdc-standard-chip.mdc-evolution-chip--selected .mdc-evolution-chip__icon--trailing,.mat-mdc-standard-chip.mat-mdc-chip-highlighted .mdc-evolution-chip__icon--trailing{color:var(--mat-chip-selected-trailing-icon-color, var(--mat-sys-on-secondary-container))}.mat-mdc-standard-chip.mdc-evolution-chip--selected.mdc-evolution-chip--disabled .mdc-evolution-chip__icon--trailing,.mat-mdc-standard-chip.mat-mdc-chip-highlighted.mdc-evolution-chip--disabled .mdc-evolution-chip__icon--trailing{color:var(--mat-chip-selected-disabled-trailing-icon-color, var(--mat-sys-on-surface))}.mat-mdc-chip-remove{opacity:var(--mat-chip-trailing-action-opacity, 1)}.mat-mdc-chip-remove:focus{opacity:var(--mat-chip-trailing-action-focus-opacity, 1)}.mat-mdc-chip-remove::after{background-color:var(--mat-chip-trailing-action-state-layer-color, var(--mat-sys-on-surface-variant))}.mat-mdc-chip-remove:hover::after{opacity:var(--mat-chip-trailing-action-hover-state-layer-opacity, var(--mat-sys-hover-state-layer-opacity))}.mat-mdc-chip-remove:focus::after{opacity:var(--mat-chip-trailing-action-focus-state-layer-opacity, var(--mat-sys-focus-state-layer-opacity))}.mat-mdc-chip-selected .mat-mdc-chip-remove::after,.mat-mdc-chip-highlighted .mat-mdc-chip-remove::after{background-color:var(--mat-chip-selected-trailing-action-state-layer-color, var(--mat-sys-on-secondary-container))}.mat-mdc-standard-chip{-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-mdc-standard-chip .mdc-evolution-chip__cell--primary,.mat-mdc-standard-chip .mdc-evolution-chip__action--primary,.mat-mdc-standard-chip .mat-mdc-chip-action-label{overflow:visible}.mat-mdc-standard-chip .mat-mdc-chip-graphic,.mat-mdc-standard-chip .mat-mdc-chip-trailing-icon{box-sizing:content-box}.mat-mdc-standard-chip._mat-animation-noopable,.mat-mdc-standard-chip._mat-animation-noopable .mdc-evolution-chip__graphic,.mat-mdc-standard-chip._mat-animation-noopable .mdc-evolution-chip__checkmark,.mat-mdc-standard-chip._mat-animation-noopable .mdc-evolution-chip__checkmark-path{transition-duration:1ms;animation-duration:1ms}.mat-mdc-chip-focus-overlay{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none;opacity:0;border-radius:inherit;transition:opacity 150ms linear}._mat-animation-noopable .mat-mdc-chip-focus-overlay{transition:none}.mat-mdc-basic-chip .mat-mdc-chip-focus-overlay{display:none}.mat-mdc-chip .mat-ripple.mat-mdc-chip-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none;border-radius:inherit}.mat-mdc-chip-avatar{text-align:center;line-height:1;color:var(--mdc-chip-with-icon-icon-color, currentColor)}.mat-mdc-chip{position:relative;z-index:0}.mat-mdc-chip-action-label{text-align:left;z-index:1}[dir=rtl] .mat-mdc-chip-action-label{text-align:right}.mat-mdc-chip.mdc-evolution-chip--with-trailing-action .mat-mdc-chip-action-label{position:relative}.mat-mdc-chip-action-label .mat-mdc-chip-primary-focus-indicator{position:absolute;top:0;right:0;bottom:0;left:0;pointer-events:none}.mat-mdc-chip-action-label .mat-focus-indicator::before{margin:calc(calc(var(--mat-focus-indicator-border-width, 3px) + 2px)*-1)}.mat-mdc-chip-remove::before{margin:calc(var(--mat-focus-indicator-border-width, 3px)*-1);left:8px;right:8px}.mat-mdc-chip-remove::after{content:"";display:block;opacity:0;position:absolute;top:-3px;bottom:-3px;left:5px;right:5px;border-radius:50%;box-sizing:border-box;padding:12px;margin:-12px;background-clip:content-box}.mat-mdc-chip-remove .mat-icon{width:18px;height:18px;font-size:18px;box-sizing:content-box}.mat-chip-edit-input{cursor:text;display:inline-block;color:inherit;outline:0}@media(forced-colors: active){.mat-mdc-chip-selected:not(.mat-mdc-chip-multiple){outline-width:3px}}.mat-mdc-chip-action:focus .mat-focus-indicator::before{content:""}.mdc-evolution-chip__icon,.mat-mdc-chip-remove .mat-icon{min-height:fit-content}
|
|
3
|
-
`,Or=[[["mat-chip-avatar"],["","matChipAvatar",""]],[["","matChipEditInput",""]],"*",[["mat-chip-trailing-icon"],["","matChipRemove",""],["","matChipTrailingIcon",""]]],Mr=["mat-chip-avatar, [matChipAvatar]","[matChipEditInput]","*","mat-chip-trailing-icon,[matChipRemove],[matChipTrailingIcon]"];function Fr(n,o){n&1&&g(0,"span",0)}function Rr(n,o){n&1&&(a(0,"span",2),De(1),r())}function Ar(n,o){n&1&&De(0,1)}function Nr(n,o){n&1&&g(0,"span",7)}function Lr(n,o){if(n&1&&
|
|
4
|
-
`,ia=new xe("mat-chips-default-options",{providedIn:"root",factory:()=>({separatorKeyCodes:[13]})}),Jo=new xe("MatChipAvatar"),Xo=new xe("MatChipTrailingIcon"),Xi=new xe("MatChipRemove"),tn=new xe("MatChip"),Ci=(()=>{class n{_elementRef=f(Ze);_parentChip=f(tn);isInteractive=!0;_isPrimary=!0;get disabled(){return this._disabled||this._parentChip?.disabled||!1}set disabled(e){this._disabled=e}_disabled=!1;tabIndex=-1;_allowFocusWhenDisabled=!1;_getDisabledAttribute(){return this.disabled&&!this._allowFocusWhenDisabled?"":null}_getTabindex(){return this.disabled&&!this._allowFocusWhenDisabled||!this.isInteractive?null:this.tabIndex.toString()}constructor(){f(Ht).load(Li),this._elementRef.nativeElement.nodeName==="BUTTON"&&this._elementRef.nativeElement.setAttribute("type","button")}focus(){this._elementRef.nativeElement.focus()}_handleClick(e){!this.disabled&&this.isInteractive&&this._isPrimary&&(e.preventDefault(),this._parentChip._handlePrimaryActionInteraction())}_handleKeydown(e){(e.keyCode===13||e.keyCode===32)&&!this.disabled&&this.isInteractive&&this._isPrimary&&!this._parentChip._isEditing&&(e.preventDefault(),this._parentChip._handlePrimaryActionInteraction())}static \u0275fac=function(i){return new(i||n)};static \u0275dir=it({type:n,selectors:[["","matChipAction",""]],hostAttrs:[1,"mdc-evolution-chip__action","mat-mdc-chip-action"],hostVars:9,hostBindings:function(i,t){i&1&&C("click",function(d){return t._handleClick(d)})("keydown",function(d){return t._handleKeydown(d)}),i&2&&(we("tabindex",t._getTabindex())("disabled",t._getDisabledAttribute())("aria-disabled",t.disabled),nt("mdc-evolution-chip__action--primary",t._isPrimary)("mdc-evolution-chip__action--presentational",!t.isInteractive)("mdc-evolution-chip__action--trailing",!t._isPrimary))},inputs:{isInteractive:"isInteractive",disabled:[2,"disabled","disabled",ue],tabIndex:[2,"tabIndex","tabIndex",e=>e==null?-1:Vt(e)],_allowFocusWhenDisabled:"_allowFocusWhenDisabled"}})}return n})();var na=(()=>{class n extends Ci{_isPrimary=!1;_handleClick(e){this.disabled||(e.stopPropagation(),e.preventDefault(),this._parentChip.remove())}_handleKeydown(e){(e.keyCode===13||e.keyCode===32)&&!this.disabled&&(e.stopPropagation(),e.preventDefault(),this._parentChip.remove())}static \u0275fac=(()=>{let e;return function(t){return(e||(e=vn(n)))(t||n)}})();static \u0275dir=it({type:n,selectors:[["","matChipRemove",""]],hostAttrs:["role","button",1,"mat-mdc-chip-remove","mat-mdc-chip-trailing-icon","mat-focus-indicator","mdc-evolution-chip__icon","mdc-evolution-chip__icon--trailing"],hostVars:1,hostBindings:function(i,t){i&2&&we("aria-hidden",null)},features:[he([{provide:Xi,useExisting:n}]),oi]})}return n})(),$i=(()=>{class n{_changeDetectorRef=f(Ct);_elementRef=f(Ze);_ngZone=f(bt);_focusMonitor=f(Rn);_globalRippleOptions=f(Jn,{optional:!0});_document=f(St);_onFocus=new B;_onBlur=new B;_isBasicChip;role=null;_hasFocusInternal=!1;_pendingFocus;_actionChanges;_animationsDisabled;_allLeadingIcons;_allTrailingIcons;_allRemoveIcons;_hasFocus(){return this._hasFocusInternal}id=f(Ut).getId("mat-mdc-chip-");ariaLabel=null;ariaDescription=null;_ariaDescriptionId=`${this.id}-aria-description`;_chipListDisabled=!1;_textElement;get value(){return this._value!==void 0?this._value:this._textElement.textContent.trim()}set value(e){this._value=e}_value;color;removable=!0;highlighted=!1;disableRipple=!1;get disabled(){return this._disabled||this._chipListDisabled}set disabled(e){this._disabled=e}_disabled=!1;removed=new j;destroyed=new j;basicChipAttrName="mat-basic-chip";leadingIcon;trailingIcon;removeIcon;primaryAction;_rippleLoader=f(eo);_injector=f(ii);constructor(){let e=f(Ht);e.load(Li),e.load(An);let i=f(bn,{optional:!0});this._animationsDisabled=i==="NoopAnimations",this._monitorFocus(),this._rippleLoader?.configureRipple(this._elementRef.nativeElement,{className:"mat-mdc-chip-ripple",disabled:this._isRippleDisabled()})}ngOnInit(){let e=this._elementRef.nativeElement;this._isBasicChip=e.hasAttribute(this.basicChipAttrName)||e.tagName.toLowerCase()===this.basicChipAttrName}ngAfterViewInit(){this._textElement=this._elementRef.nativeElement.querySelector(".mat-mdc-chip-action-label"),this._pendingFocus&&(this._pendingFocus=!1,this.focus())}ngAfterContentInit(){this._actionChanges=ze(this._allLeadingIcons.changes,this._allTrailingIcons.changes,this._allRemoveIcons.changes).subscribe(()=>this._changeDetectorRef.markForCheck())}ngDoCheck(){this._rippleLoader.setDisabled(this._elementRef.nativeElement,this._isRippleDisabled())}ngOnDestroy(){this._focusMonitor.stopMonitoring(this._elementRef),this._rippleLoader?.destroyRipple(this._elementRef.nativeElement),this._actionChanges?.unsubscribe(),this.destroyed.emit({chip:this}),this.destroyed.complete()}remove(){this.removable&&this.removed.emit({chip:this})}_isRippleDisabled(){return this.disabled||this.disableRipple||this._animationsDisabled||this._isBasicChip||!!this._globalRippleOptions?.disabled}_hasTrailingIcon(){return!!(this.trailingIcon||this.removeIcon)}_handleKeydown(e){(e.keyCode===8&&!e.repeat||e.keyCode===46)&&(e.preventDefault(),this.remove())}focus(){this.disabled||(this.primaryAction?this.primaryAction.focus():this._pendingFocus=!0)}_getSourceAction(e){return this._getActions().find(i=>{let t=i._elementRef.nativeElement;return t===e||t.contains(e)})}_getActions(){let e=[];return this.primaryAction&&e.push(this.primaryAction),this.removeIcon&&e.push(this.removeIcon),this.trailingIcon&&e.push(this.trailingIcon),e}_handlePrimaryActionInteraction(){}_monitorFocus(){this._focusMonitor.monitor(this._elementRef,!0).subscribe(e=>{let i=e!==null;i!==this._hasFocusInternal&&(this._hasFocusInternal=i,i?this._onFocus.next({chip:this}):(this._changeDetectorRef.markForCheck(),setTimeout(()=>this._ngZone.run(()=>this._onBlur.next({chip:this})))))})}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=S({type:n,selectors:[["mat-basic-chip"],["","mat-basic-chip",""],["mat-chip"],["","mat-chip",""]],contentQueries:function(i,t,s){if(i&1&&(Ge(s,Jo,5),Ge(s,Xo,5),Ge(s,Xi,5),Ge(s,Jo,5),Ge(s,Xo,5),Ge(s,Xi,5)),i&2){let d;ke(d=Ee())&&(t.leadingIcon=d.first),ke(d=Ee())&&(t.trailingIcon=d.first),ke(d=Ee())&&(t.removeIcon=d.first),ke(d=Ee())&&(t._allLeadingIcons=d),ke(d=Ee())&&(t._allTrailingIcons=d),ke(d=Ee())&&(t._allRemoveIcons=d)}},viewQuery:function(i,t){if(i&1&&Mi(Ci,5),i&2){let s;ke(s=Ee())&&(t.primaryAction=s.first)}},hostAttrs:[1,"mat-mdc-chip"],hostVars:31,hostBindings:function(i,t){i&1&&C("keydown",function(d){return t._handleKeydown(d)}),i&2&&(ri("id",t.id),we("role",t.role)("aria-label",t.ariaLabel),ai("mat-"+(t.color||"primary")),nt("mdc-evolution-chip",!t._isBasicChip)("mdc-evolution-chip--disabled",t.disabled)("mdc-evolution-chip--with-trailing-action",t._hasTrailingIcon())("mdc-evolution-chip--with-primary-graphic",t.leadingIcon)("mdc-evolution-chip--with-primary-icon",t.leadingIcon)("mdc-evolution-chip--with-avatar",t.leadingIcon)("mat-mdc-chip-with-avatar",t.leadingIcon)("mat-mdc-chip-highlighted",t.highlighted)("mat-mdc-chip-disabled",t.disabled)("mat-mdc-basic-chip",t._isBasicChip)("mat-mdc-standard-chip",!t._isBasicChip)("mat-mdc-chip-with-trailing-icon",t._hasTrailingIcon())("_mat-animation-noopable",t._animationsDisabled))},inputs:{role:"role",id:"id",ariaLabel:[0,"aria-label","ariaLabel"],ariaDescription:[0,"aria-description","ariaDescription"],value:"value",color:"color",removable:[2,"removable","removable",ue],highlighted:[2,"highlighted","highlighted",ue],disableRipple:[2,"disableRipple","disableRipple",ue],disabled:[2,"disabled","disabled",ue]},outputs:{removed:"removed",destroyed:"destroyed"},exportAs:["matChip"],features:[he([{provide:tn,useExisting:n}])],ngContentSelectors:Dr,decls:8,vars:3,consts:[[1,"mat-mdc-chip-focus-overlay"],[1,"mdc-evolution-chip__cell","mdc-evolution-chip__cell--primary"],["matChipAction","",3,"isInteractive"],[1,"mdc-evolution-chip__graphic","mat-mdc-chip-graphic"],[1,"mdc-evolution-chip__text-label","mat-mdc-chip-action-label"],[1,"mat-mdc-chip-primary-focus-indicator","mat-focus-indicator"],[1,"mdc-evolution-chip__cell","mdc-evolution-chip__cell--trailing"]],template:function(i,t){i&1&&(ut(xr),g(0,"span",0),a(1,"span",1)(2,"span",2),h(3,kr,2,0,"span",3),a(4,"span",4),De(5),g(6,"span",5),r()()(),h(7,Er,2,0,"span",6)),i&2&&(l(2),p("isInteractive",!1),l(),b(t.leadingIcon?3:-1),l(4),b(t._hasTrailingIcon()?7:-1))},dependencies:[Ci],styles:[`.mdc-evolution-chip,.mdc-evolution-chip__cell,.mdc-evolution-chip__action{display:inline-flex;align-items:center}.mdc-evolution-chip{position:relative;max-width:100%}.mdc-evolution-chip__cell,.mdc-evolution-chip__action{height:100%}.mdc-evolution-chip__cell--primary{flex-basis:100%;overflow-x:hidden}.mdc-evolution-chip__cell--trailing{flex:1 0 auto}.mdc-evolution-chip__action{align-items:center;background:none;border:none;box-sizing:content-box;cursor:pointer;display:inline-flex;justify-content:center;outline:none;padding:0;text-decoration:none;color:inherit}.mdc-evolution-chip__action--presentational{cursor:auto}.mdc-evolution-chip--disabled,.mdc-evolution-chip__action:disabled{pointer-events:none}@media(forced-colors: active){.mdc-evolution-chip--disabled,.mdc-evolution-chip__action:disabled{forced-color-adjust:none}}.mdc-evolution-chip__action--primary{font:inherit;letter-spacing:inherit;white-space:inherit;overflow-x:hidden}.mat-mdc-standard-chip .mdc-evolution-chip__action--primary::before{border-width:var(--mdc-chip-outline-width, 1px);border-radius:var(--mdc-chip-container-shape-radius, 8px);box-sizing:border-box;content:"";height:100%;left:0;position:absolute;pointer-events:none;top:0;width:100%;z-index:1;border-style:solid}.mat-mdc-standard-chip .mdc-evolution-chip__action--primary{padding-left:12px;padding-right:12px}.mat-mdc-standard-chip.mdc-evolution-chip--with-primary-graphic .mdc-evolution-chip__action--primary{padding-left:0;padding-right:12px}[dir=rtl] .mat-mdc-standard-chip.mdc-evolution-chip--with-primary-graphic .mdc-evolution-chip__action--primary{padding-left:12px;padding-right:0}.mat-mdc-standard-chip:not(.mdc-evolution-chip--disabled) .mdc-evolution-chip__action--primary::before{border-color:var(--mdc-chip-outline-color, var(--mat-sys-outline))}.mdc-evolution-chip__action--primary:not(.mdc-evolution-chip__action--presentational):not(.mdc-ripple-upgraded):focus::before{border-color:var(--mdc-chip-focus-outline-color, var(--mat-sys-on-surface-variant))}.mat-mdc-standard-chip.mdc-evolution-chip--disabled .mdc-evolution-chip__action--primary::before{border-color:var(--mdc-chip-disabled-outline-color, color-mix(in srgb, var(--mat-sys-on-surface) 12%, transparent))}.mat-mdc-standard-chip.mdc-evolution-chip--selected .mdc-evolution-chip__action--primary::before{border-width:var(--mdc-chip-flat-selected-outline-width, 0)}.mat-mdc-basic-chip .mdc-evolution-chip__action--primary{font:inherit}.mat-mdc-standard-chip.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__action--primary{padding-left:12px;padding-right:0}[dir=rtl] .mat-mdc-standard-chip.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__action--primary{padding-left:0;padding-right:12px}.mat-mdc-standard-chip.mdc-evolution-chip--with-primary-graphic.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__action--primary{padding-left:0;padding-right:0}[dir=rtl] .mat-mdc-standard-chip.mdc-evolution-chip--with-primary-graphic.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__action--primary{padding-left:0;padding-right:0}.mdc-evolution-chip--with-avatar.mdc-evolution-chip--with-primary-graphic .mdc-evolution-chip__action--primary{padding-left:0;padding-right:12px}[dir=rtl] .mdc-evolution-chip--with-avatar.mdc-evolution-chip--with-primary-graphic .mdc-evolution-chip__action--primary{padding-left:12px;padding-right:0}.mdc-evolution-chip--with-avatar.mdc-evolution-chip--with-primary-graphic.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__action--primary{padding-left:0;padding-right:0}[dir=rtl] .mdc-evolution-chip--with-avatar.mdc-evolution-chip--with-primary-graphic.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__action--primary{padding-left:0;padding-right:0}.mdc-evolution-chip__action--trailing{position:relative;overflow:visible}.mat-mdc-standard-chip:not(.mdc-evolution-chip--disabled) .mdc-evolution-chip__action--trailing{color:var(--mdc-chip-with-trailing-icon-trailing-icon-color, var(--mat-sys-on-surface-variant))}.mat-mdc-standard-chip.mdc-evolution-chip--disabled .mdc-evolution-chip__action--trailing{color:var(--mdc-chip-with-trailing-icon-disabled-trailing-icon-color, var(--mat-sys-on-surface))}.mat-mdc-standard-chip.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__action--trailing{padding-left:8px;padding-right:8px}.mat-mdc-standard-chip.mdc-evolution-chip--with-primary-graphic.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__action--trailing{padding-left:8px;padding-right:8px}.mdc-evolution-chip--with-avatar.mdc-evolution-chip--with-primary-graphic.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__action--trailing{padding-left:8px;padding-right:8px}[dir=rtl] .mdc-evolution-chip--with-avatar.mdc-evolution-chip--with-primary-graphic.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__action--trailing{padding-left:8px;padding-right:8px}.mdc-evolution-chip__text-label{-webkit-user-select:none;user-select:none;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.mat-mdc-standard-chip .mdc-evolution-chip__text-label{font-family:var(--mdc-chip-label-text-font, var(--mat-sys-label-large-font));line-height:var(--mdc-chip-label-text-line-height, var(--mat-sys-label-large-line-height));font-size:var(--mdc-chip-label-text-size, var(--mat-sys-label-large-size));font-weight:var(--mdc-chip-label-text-weight, var(--mat-sys-label-large-weight));letter-spacing:var(--mdc-chip-label-text-tracking, var(--mat-sys-label-large-tracking))}.mat-mdc-standard-chip:not(.mdc-evolution-chip--disabled) .mdc-evolution-chip__text-label{color:var(--mdc-chip-label-text-color, var(--mat-sys-on-surface-variant))}.mat-mdc-standard-chip.mdc-evolution-chip--selected:not(.mdc-evolution-chip--disabled) .mdc-evolution-chip__text-label{color:var(--mdc-chip-selected-label-text-color, var(--mat-sys-on-secondary-container))}.mat-mdc-standard-chip.mdc-evolution-chip--disabled .mdc-evolution-chip__text-label,.mat-mdc-standard-chip.mdc-evolution-chip--selected.mdc-evolution-chip--disabled .mdc-evolution-chip__text-label{color:var(--mdc-chip-disabled-label-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mdc-evolution-chip__graphic{align-items:center;display:inline-flex;justify-content:center;overflow:hidden;pointer-events:none;position:relative;flex:1 0 auto}.mat-mdc-standard-chip .mdc-evolution-chip__graphic{width:var(--mdc-chip-with-avatar-avatar-size, 24px);height:var(--mdc-chip-with-avatar-avatar-size, 24px);font-size:var(--mdc-chip-with-avatar-avatar-size, 24px)}.mdc-evolution-chip--selecting .mdc-evolution-chip__graphic{transition:width 150ms 0ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-evolution-chip--selectable:not(.mdc-evolution-chip--selected):not(.mdc-evolution-chip--with-primary-icon) .mdc-evolution-chip__graphic{width:0}.mat-mdc-standard-chip.mdc-evolution-chip--with-primary-graphic .mdc-evolution-chip__graphic{padding-left:6px;padding-right:6px}.mdc-evolution-chip--with-avatar.mdc-evolution-chip--with-primary-graphic .mdc-evolution-chip__graphic{padding-left:4px;padding-right:8px}[dir=rtl] .mdc-evolution-chip--with-avatar.mdc-evolution-chip--with-primary-graphic .mdc-evolution-chip__graphic{padding-left:8px;padding-right:4px}.mat-mdc-standard-chip.mdc-evolution-chip--with-primary-graphic.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__graphic{padding-left:6px;padding-right:6px}.mdc-evolution-chip--with-avatar.mdc-evolution-chip--with-primary-graphic.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__graphic{padding-left:4px;padding-right:8px}[dir=rtl] .mdc-evolution-chip--with-avatar.mdc-evolution-chip--with-primary-graphic.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__graphic{padding-left:8px;padding-right:4px}.mdc-evolution-chip__checkmark{position:absolute;opacity:0;top:50%;left:50%;height:20px;width:20px}.mat-mdc-standard-chip:not(.mdc-evolution-chip--disabled) .mdc-evolution-chip__checkmark{color:var(--mdc-chip-with-icon-selected-icon-color, var(--mat-sys-on-secondary-container))}.mat-mdc-standard-chip.mdc-evolution-chip--disabled .mdc-evolution-chip__checkmark{color:var(--mdc-chip-with-icon-disabled-icon-color, var(--mat-sys-on-surface))}.mdc-evolution-chip--selecting .mdc-evolution-chip__checkmark{transition:transform 150ms 0ms cubic-bezier(0.4, 0, 0.2, 1);transform:translate(-75%, -50%)}.mdc-evolution-chip--selected .mdc-evolution-chip__checkmark{transform:translate(-50%, -50%);opacity:1}.mdc-evolution-chip__checkmark-svg{display:block}.mdc-evolution-chip__checkmark-path{stroke-width:2px;stroke-dasharray:29.7833385;stroke-dashoffset:29.7833385;stroke:currentColor}.mdc-evolution-chip--selecting .mdc-evolution-chip__checkmark-path{transition:stroke-dashoffset 150ms 45ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-evolution-chip--selected .mdc-evolution-chip__checkmark-path{stroke-dashoffset:0}@media(forced-colors: active){.mdc-evolution-chip__checkmark-path{stroke:CanvasText !important}}.mat-mdc-standard-chip .mdc-evolution-chip__icon--trailing{height:18px;width:18px;font-size:18px}.mdc-evolution-chip--disabled .mdc-evolution-chip__icon--trailing.mat-mdc-chip-remove{opacity:calc(var(--mat-chip-trailing-action-opacity, 1)*var(--mdc-chip-with-trailing-icon-disabled-trailing-icon-opacity, 0.38))}.mdc-evolution-chip--disabled .mdc-evolution-chip__icon--trailing.mat-mdc-chip-remove:focus{opacity:calc(var(--mat-chip-trailing-action-focus-opacity, 1)*var(--mdc-chip-with-trailing-icon-disabled-trailing-icon-opacity, 0.38))}.mat-mdc-standard-chip{border-radius:var(--mdc-chip-container-shape-radius, 8px);height:var(--mdc-chip-container-height, 32px)}.mat-mdc-standard-chip:not(.mdc-evolution-chip--disabled){background-color:var(--mdc-chip-elevated-container-color, transparent)}.mat-mdc-standard-chip.mdc-evolution-chip--disabled{background-color:var(--mdc-chip-elevated-disabled-container-color)}.mat-mdc-standard-chip.mdc-evolution-chip--selected:not(.mdc-evolution-chip--disabled){background-color:var(--mdc-chip-elevated-selected-container-color, var(--mat-sys-secondary-container))}.mat-mdc-standard-chip.mdc-evolution-chip--selected.mdc-evolution-chip--disabled{background-color:var(--mdc-chip-flat-disabled-selected-container-color, color-mix(in srgb, var(--mat-sys-on-surface) 12%, transparent))}@media(forced-colors: active){.mat-mdc-standard-chip{outline:solid 1px}}.mat-mdc-standard-chip .mdc-evolution-chip__icon--primary{border-radius:var(--mdc-chip-with-avatar-avatar-shape-radius, 24px);width:var(--mdc-chip-with-icon-icon-size, 18px);height:var(--mdc-chip-with-icon-icon-size, 18px);font-size:var(--mdc-chip-with-icon-icon-size, 18px)}.mdc-evolution-chip--selected .mdc-evolution-chip__icon--primary{opacity:0}.mat-mdc-standard-chip:not(.mdc-evolution-chip--disabled) .mdc-evolution-chip__icon--primary{color:var(--mdc-chip-with-icon-icon-color, var(--mat-sys-on-surface-variant))}.mat-mdc-standard-chip.mdc-evolution-chip--disabled .mdc-evolution-chip__icon--primary{color:var(--mdc-chip-with-icon-disabled-icon-color, var(--mat-sys-on-surface))}.mat-mdc-chip-highlighted{--mdc-chip-with-icon-icon-color:var(--mdc-chip-with-icon-selected-icon-color, var(--mat-sys-on-secondary-container));--mdc-chip-elevated-container-color:var(--mdc-chip-elevated-selected-container-color, var(--mat-sys-secondary-container));--mdc-chip-label-text-color:var(--mdc-chip-selected-label-text-color, var(--mat-sys-on-secondary-container));--mdc-chip-outline-width:var(--mdc-chip-flat-selected-outline-width, 0)}.mat-mdc-chip-focus-overlay{background:var(--mdc-chip-focus-state-layer-color, var(--mat-sys-on-surface-variant))}.mat-mdc-chip-selected .mat-mdc-chip-focus-overlay,.mat-mdc-chip-highlighted .mat-mdc-chip-focus-overlay{background:var(--mdc-chip-selected-focus-state-layer-color, var(--mat-sys-on-secondary-container))}.mat-mdc-chip:hover .mat-mdc-chip-focus-overlay{background:var(--mdc-chip-hover-state-layer-color, var(--mat-sys-on-surface-variant));opacity:var(--mdc-chip-hover-state-layer-opacity, var(--mat-sys-hover-state-layer-opacity))}.mat-mdc-chip-focus-overlay .mat-mdc-chip-selected:hover,.mat-mdc-chip-highlighted:hover .mat-mdc-chip-focus-overlay{background:var(--mdc-chip-selected-hover-state-layer-color, var(--mat-sys-on-secondary-container));opacity:var(--mdc-chip-selected-hover-state-layer-opacity, var(--mat-sys-hover-state-layer-opacity))}.mat-mdc-chip.cdk-focused .mat-mdc-chip-focus-overlay{background:var(--mdc-chip-focus-state-layer-color, var(--mat-sys-on-surface-variant));opacity:var(--mdc-chip-focus-state-layer-opacity, var(--mat-sys-focus-state-layer-opacity))}.mat-mdc-chip-selected.cdk-focused .mat-mdc-chip-focus-overlay,.mat-mdc-chip-highlighted.cdk-focused .mat-mdc-chip-focus-overlay{background:var(--mdc-chip-selected-focus-state-layer-color, var(--mat-sys-on-secondary-container));opacity:var(--mdc-chip-selected-focus-state-layer-opacity, var(--mat-sys-focus-state-layer-opacity))}.mdc-evolution-chip--disabled:not(.mdc-evolution-chip--selected) .mat-mdc-chip-avatar{opacity:var(--mdc-chip-with-avatar-disabled-avatar-opacity, 0.38)}.mdc-evolution-chip--disabled .mdc-evolution-chip__icon--trailing{opacity:var(--mdc-chip-with-trailing-icon-disabled-trailing-icon-opacity, 0.38)}.mdc-evolution-chip--disabled.mdc-evolution-chip--selected .mdc-evolution-chip__checkmark{opacity:var(--mdc-chip-with-icon-disabled-icon-opacity, 0.38)}.mat-mdc-standard-chip.mdc-evolution-chip--disabled{opacity:var(--mat-chip-disabled-container-opacity, 1)}.mat-mdc-standard-chip.mdc-evolution-chip--selected .mdc-evolution-chip__icon--trailing,.mat-mdc-standard-chip.mat-mdc-chip-highlighted .mdc-evolution-chip__icon--trailing{color:var(--mat-chip-selected-trailing-icon-color, var(--mat-sys-on-secondary-container))}.mat-mdc-standard-chip.mdc-evolution-chip--selected.mdc-evolution-chip--disabled .mdc-evolution-chip__icon--trailing,.mat-mdc-standard-chip.mat-mdc-chip-highlighted.mdc-evolution-chip--disabled .mdc-evolution-chip__icon--trailing{color:var(--mat-chip-selected-disabled-trailing-icon-color, var(--mat-sys-on-surface))}.mat-mdc-chip-remove{opacity:var(--mat-chip-trailing-action-opacity, 1)}.mat-mdc-chip-remove:focus{opacity:var(--mat-chip-trailing-action-focus-opacity, 1)}.mat-mdc-chip-remove::after{background-color:var(--mat-chip-trailing-action-state-layer-color, var(--mat-sys-on-surface-variant))}.mat-mdc-chip-remove:hover::after{opacity:var(--mat-chip-trailing-action-hover-state-layer-opacity, var(--mat-sys-hover-state-layer-opacity))}.mat-mdc-chip-remove:focus::after{opacity:var(--mat-chip-trailing-action-focus-state-layer-opacity, var(--mat-sys-focus-state-layer-opacity))}.mat-mdc-chip-selected .mat-mdc-chip-remove::after,.mat-mdc-chip-highlighted .mat-mdc-chip-remove::after{background-color:var(--mat-chip-selected-trailing-action-state-layer-color, var(--mat-sys-on-secondary-container))}.mat-mdc-standard-chip{-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-mdc-standard-chip .mdc-evolution-chip__cell--primary,.mat-mdc-standard-chip .mdc-evolution-chip__action--primary,.mat-mdc-standard-chip .mat-mdc-chip-action-label{overflow:visible}.mat-mdc-standard-chip .mat-mdc-chip-graphic,.mat-mdc-standard-chip .mat-mdc-chip-trailing-icon{box-sizing:content-box}.mat-mdc-standard-chip._mat-animation-noopable,.mat-mdc-standard-chip._mat-animation-noopable .mdc-evolution-chip__graphic,.mat-mdc-standard-chip._mat-animation-noopable .mdc-evolution-chip__checkmark,.mat-mdc-standard-chip._mat-animation-noopable .mdc-evolution-chip__checkmark-path{transition-duration:1ms;animation-duration:1ms}.mat-mdc-chip-focus-overlay{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none;opacity:0;border-radius:inherit;transition:opacity 150ms linear}._mat-animation-noopable .mat-mdc-chip-focus-overlay{transition:none}.mat-mdc-basic-chip .mat-mdc-chip-focus-overlay{display:none}.mat-mdc-chip .mat-ripple.mat-mdc-chip-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none;border-radius:inherit}.mat-mdc-chip-avatar{text-align:center;line-height:1;color:var(--mdc-chip-with-icon-icon-color, currentColor)}.mat-mdc-chip{position:relative;z-index:0}.mat-mdc-chip-action-label{text-align:left;z-index:1}[dir=rtl] .mat-mdc-chip-action-label{text-align:right}.mat-mdc-chip.mdc-evolution-chip--with-trailing-action .mat-mdc-chip-action-label{position:relative}.mat-mdc-chip-action-label .mat-mdc-chip-primary-focus-indicator{position:absolute;top:0;right:0;bottom:0;left:0;pointer-events:none}.mat-mdc-chip-action-label .mat-focus-indicator::before{margin:calc(calc(var(--mat-focus-indicator-border-width, 3px) + 2px)*-1)}.mat-mdc-chip-remove::before{margin:calc(var(--mat-focus-indicator-border-width, 3px)*-1);left:8px;right:8px}.mat-mdc-chip-remove::after{content:"";display:block;opacity:0;position:absolute;top:-3px;bottom:-3px;left:5px;right:5px;border-radius:50%;box-sizing:border-box;padding:12px;margin:-12px;background-clip:content-box}.mat-mdc-chip-remove .mat-icon{width:18px;height:18px;font-size:18px;box-sizing:content-box}.mat-chip-edit-input{cursor:text;display:inline-block;color:inherit;outline:0}@media(forced-colors: active){.mat-mdc-chip-selected:not(.mat-mdc-chip-multiple){outline-width:3px}}.mat-mdc-chip-action:focus .mat-focus-indicator::before{content:""}.mdc-evolution-chip__icon,.mat-mdc-chip-remove .mat-icon{min-height:fit-content}
|
|
5
|
-
`],encapsulation:2,changeDetection:0})}return n})();var
|
|
6
|
-
`],encapsulation:2,changeDetection:0})}return n})();var en=class{source;value;constructor(o,e){this.source=o,this.value=e}},oa=(()=>{class n extends Gr{ngControl=f(xn,{optional:!0,self:!0});controlType="mat-chip-grid";_chipInput;_defaultRole="grid";_errorStateTracker;_ariaDescribedbyIds=[];_onTouched=()=>{};_onChange=()=>{};get disabled(){return this.ngControl?!!this.ngControl.disabled:this._disabled}set disabled(e){this._disabled=e,this._syncChipsState(),this.stateChanges.next()}get id(){return this._chipInput.id}get empty(){return(!this._chipInput||this._chipInput.empty)&&(!this._chips||this._chips.length===0)}get placeholder(){return this._chipInput?this._chipInput.placeholder:this._placeholder}set placeholder(e){this._placeholder=e,this.stateChanges.next()}_placeholder;get focused(){return this._chipInput.focused||this._hasFocusedChip()}get required(){return this._required??this.ngControl?.control?.hasValidator(K.required)??!1}set required(e){this._required=e,this.stateChanges.next()}_required;get shouldLabelFloat(){return!this.empty||this.focused}get value(){return this._value}set value(e){this._value=e}_value=[];get errorStateMatcher(){return this._errorStateTracker.matcher}set errorStateMatcher(e){this._errorStateTracker.matcher=e}get chipBlurChanges(){return this._getChipStream(e=>e._onBlur)}change=new j;valueChange=new j;_chips=void 0;stateChanges=new B;get errorState(){return this._errorStateTracker.errorState}set errorState(e){this._errorStateTracker.errorState=e}constructor(){super();let e=f(kn,{optional:!0}),i=f(Z,{optional:!0}),t=f(Wi);this.ngControl&&(this.ngControl.valueAccessor=this),this._errorStateTracker=new $n(t,this.ngControl,i,e,this.stateChanges)}ngAfterContentInit(){this.chipBlurChanges.pipe(Se(this._destroyed)).subscribe(()=>{this._blur(),this.stateChanges.next()}),ze(this.chipFocusChanges,this._chips.changes).pipe(Se(this._destroyed)).subscribe(()=>this.stateChanges.next())}ngAfterViewInit(){super.ngAfterViewInit(),this._chipInput}ngDoCheck(){this.ngControl&&this.updateErrorState()}ngOnDestroy(){super.ngOnDestroy(),this.stateChanges.complete()}registerInput(e){this._chipInput=e,this._chipInput.setDescribedByIds(this._ariaDescribedbyIds)}onContainerClick(e){!this.disabled&&!this._originatesFromChip(e)&&this.focus()}focus(){if(!(this.disabled||this._chipInput.focused)){if(!this._chips.length||this._chips.first.disabled)Promise.resolve().then(()=>this._chipInput.focus());else{let e=this._keyManager.activeItem;e?e.focus():this._keyManager.setFirstItemActive()}this.stateChanges.next()}}setDescribedByIds(e){this._ariaDescribedbyIds=e,this._chipInput?.setDescribedByIds(e)}writeValue(e){this._value=e}registerOnChange(e){this._onChange=e}registerOnTouched(e){this._onTouched=e}setDisabledState(e){this.disabled=e,this.stateChanges.next()}updateErrorState(){this._errorStateTracker.updateErrorState()}_blur(){this.disabled||setTimeout(()=>{this.focused||(this._propagateChanges(),this._markAsTouched())})}_allowFocusEscape(){this._chipInput.focused||super._allowFocusEscape()}_handleKeydown(e){let i=e.keyCode,t=this._keyManager.activeItem;if(i===9)this._chipInput.focused&&Ri(e,"shiftKey")&&this._chips.length&&!this._chips.last.disabled?(e.preventDefault(),t?this._keyManager.setActiveItem(t):this._focusLastChip()):super._allowFocusEscape();else if(!this._chipInput.focused)if((i===38||i===40)&&t){let s=this._chipActions.filter(_=>_._isPrimary===t._isPrimary&&!this._skipPredicate(_)),d=s.indexOf(t),m=e.keyCode===38?-1:1;e.preventDefault(),d>-1&&this._isValidIndex(d+m)&&this._keyManager.setActiveItem(s[d+m])}else super._handleKeydown(e);this.stateChanges.next()}_focusLastChip(){this._chips.length&&this._chips.last.focus()}_propagateChanges(){let e=this._chips.length?this._chips.toArray().map(i=>i.value):[];this._value=e,this.change.emit(new en(this,e)),this.valueChange.emit(e),this._onChange(e),this._changeDetectorRef.markForCheck()}_markAsTouched(){this._onTouched(),this._changeDetectorRef.markForCheck(),this.stateChanges.next()}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=S({type:n,selectors:[["mat-chip-grid"]],contentQueries:function(i,t,s){if(i&1&&Ge(s,nn,5),i&2){let d;ke(d=Ee())&&(t._chips=d)}},hostAttrs:[1,"mat-mdc-chip-set","mat-mdc-chip-grid","mdc-evolution-chip-set"],hostVars:10,hostBindings:function(i,t){i&1&&C("focus",function(){return t.focus()})("blur",function(){return t._blur()}),i&2&&(we("role",t.role)("tabindex",t.disabled||t._chips&&t._chips.length===0?-1:t.tabIndex)("aria-disabled",t.disabled.toString())("aria-invalid",t.errorState),nt("mat-mdc-chip-list-disabled",t.disabled)("mat-mdc-chip-list-invalid",t.errorState)("mat-mdc-chip-list-required",t.required))},inputs:{disabled:[2,"disabled","disabled",ue],placeholder:"placeholder",required:[2,"required","required",ue],value:"value",errorStateMatcher:"errorStateMatcher"},outputs:{change:"change",valueChange:"valueChange"},features:[he([{provide:Kn,useExisting:n}]),oi],ngContentSelectors:ta,decls:2,vars:0,consts:[["role","presentation",1,"mdc-evolution-chip-set__chips"]],template:function(i,t){i&1&&(ut(),a(0,"div",0),De(1),r())},styles:[zr],encapsulation:2,changeDetection:0})}return n})(),aa=(()=>{class n{_elementRef=f(Ze);focused=!1;get chipGrid(){return this._chipGrid}set chipGrid(e){e&&(this._chipGrid=e,this._chipGrid.registerInput(this))}_chipGrid;addOnBlur=!1;separatorKeyCodes;chipEnd=new j;placeholder="";id=f(Ut).getId("mat-mdc-chip-list-input-");get disabled(){return this._disabled||this._chipGrid&&this._chipGrid.disabled}set disabled(e){this._disabled=e}_disabled=!1;get empty(){return!this.inputElement.value}inputElement;constructor(){let e=f(ia),i=f(Zn,{optional:!0});this.inputElement=this._elementRef.nativeElement,this.separatorKeyCodes=e.separatorKeyCodes,i&&this.inputElement.classList.add("mat-mdc-form-field-input-control")}ngOnChanges(){this._chipGrid.stateChanges.next()}ngOnDestroy(){this.chipEnd.complete()}_keydown(e){this.empty&&e.keyCode===8?(e.repeat||this._chipGrid._focusLastChip(),e.preventDefault()):this._emitChipEnd(e)}_blur(){this.addOnBlur&&this._emitChipEnd(),this.focused=!1,this._chipGrid.focused||this._chipGrid._blur(),this._chipGrid.stateChanges.next()}_focus(){this.focused=!0,this._chipGrid.stateChanges.next()}_emitChipEnd(e){(!e||this._isSeparatorKey(e)&&!e.repeat)&&(this.chipEnd.emit({input:this.inputElement,value:this.inputElement.value,chipInput:this}),e?.preventDefault())}_onInput(){this._chipGrid.stateChanges.next()}focus(){this.inputElement.focus()}clear(){this.inputElement.value=""}setDescribedByIds(e){let i=this._elementRef.nativeElement;e.length?i.setAttribute("aria-describedby",e.join(" ")):i.removeAttribute("aria-describedby")}_isSeparatorKey(e){return!Ri(e)&&new Set(this.separatorKeyCodes).has(e.keyCode)}static \u0275fac=function(i){return new(i||n)};static \u0275dir=it({type:n,selectors:[["input","matChipInputFor",""]],hostAttrs:[1,"mat-mdc-chip-input","mat-mdc-input-element","mdc-text-field__input","mat-input-element"],hostVars:6,hostBindings:function(i,t){i&1&&C("keydown",function(d){return t._keydown(d)})("blur",function(){return t._blur()})("focus",function(){return t._focus()})("input",function(){return t._onInput()}),i&2&&(ri("id",t.id),we("disabled",t.disabled||null)("placeholder",t.placeholder||null)("aria-invalid",t._chipGrid&&t._chipGrid.ngControl?t._chipGrid.ngControl.invalid:null)("aria-required",t._chipGrid&&t._chipGrid.required||null)("required",t._chipGrid&&t._chipGrid.required||null))},inputs:{chipGrid:[0,"matChipInputFor","chipGrid"],addOnBlur:[2,"matChipInputAddOnBlur","addOnBlur",ue],separatorKeyCodes:[0,"matChipInputSeparatorKeyCodes","separatorKeyCodes"],placeholder:"placeholder",id:"id",disabled:[2,"disabled","disabled",ue]},outputs:{chipEnd:"matChipInputTokenEnd"},exportAs:["matChipInput","matChipInputFor"],features:[J]})}return n})();var Si=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275mod=tt({type:n});static \u0275inj=et({providers:[Wi,{provide:ia,useValue:{separatorKeyCodes:[13]}}],imports:[Ai,Xn,Ai]})}return n})();var ra=n=>({empty:n}),Hr=(n,o)=>({"mb-2":n,"mb-8":o}),la=n=>({"bg-gradient-warning":n});function Ur(n,o){if(n&1){let e=A();a(0,"mat-chip-row",32),C("removed",function(){let t=x(e).$implicit,s=u();return D(s.removeAdditonalItem(t))}),c(1),a(2,"button",33)(3,"mat-icon"),c(4,"cancel"),r()()()}if(n&2){let e=o.$implicit;p("aria-description","press enter to edit "+e),l(),O(" ",e," "),l(),we("aria-label","remove "+e)}}function jr(n,o){n&1&&(k(0),a(1,"div",5)(2,"div",34)(3,"label",35),c(4,"Order Fulfillment Webhook Handling"),r(),a(5,"div",27)(6,"mat-radio-group",36)(7,"mat-radio-button",37),c(8," Do Nothing "),r(),a(9,"mat-radio-button",37),c(10," Create Outbound Logistic "),r()()()()(),E()),n&2&&(l(7),p("value",0),l(2),p("value",1))}function qr(n,o){n&1&&(a(0,"div",5)(1,"div",38)(2,"label",26),c(3,"Automatic Return Process"),r(),a(4,"div",39)(5,"mat-radio-group",40)(6,"mat-radio-button",37),c(7," Yes "),r(),a(8,"mat-radio-button",37),c(9," No "),r()()()()()),n&2&&(l(6),p("value",!0),l(2),p("value",!1))}function Kr(n,o){n&1&&(k(0),a(1,"div",5)(2,"div",41)(3,"label",42),c(4,"Ignore Cancelled Order for Fulfilled Orders"),r(),a(5,"div",27)(6,"mat-radio-group",43)(7,"mat-radio-button",37),c(8," No "),r(),a(9,"mat-radio-button",37),c(10," Yes "),r()()()()(),E()),n&2&&(l(7),p("value",!1),l(2),p("value",!0))}function Zr(n,o){n&1&&(k(0),a(1,"div",5)(2,"div",44),g(3,"input",45),a(4,"label",46),c(5,"Size Chart"),r()()(),E())}function Yr(n,o){n&1&&(k(0),a(1,"div",5)(2,"div",47),g(3,"input",48),a(4,"label",49),c(5,"ShippingFee"),r()()(),E())}function Qr(n,o){if(n&1&&(a(0,"div",31)(1,"div",50)(2,"label",26),c(3,"Unpaid Order"),r(),a(4,"div",27)(5,"mat-radio-group",51)(6,"mat-radio-button",52),c(7," Yes "),r(),a(8,"mat-radio-button",53),c(9," No "),r()()()()()),n&2){let e,i=u();l(),p("ngClass",y(3,la,!(!(i.syncForm==null||(e=i.syncForm.get("UnpaidOrder"))==null)&&e.value))),l(5),p("value",!0),l(2),p("value",!1)}}var sa=(()=>{class n{constructor(){this.formChannel=f(q),this.channelService=f(Re),this.form=this.formChannel.mainForm,this.advancedForm=this.form.get("advanced"),this.syncForm=this.form.get("sync"),this._channel=new le,this.pricebooks=Nt([]),this.channelType=w,this.additionalItems=[]}set channel(e){e&&(this._channel=e,this.initRegisterOptions())}get channel(){return this._channel}ngOnInit(){this.initAdditionalItems()}initAdditionalItems(){this.additionalItems=this.advancedForm?.get("Additionalitem")?.value||[]}initRegisterOptions(){F.IsNotEmpty(this._channel?.POSOutlet)?this.registers$=this.channelService.getRegisterByOutletName(this._channel?.POSOutlet):this.registers$=Ve([])}addAdditonalItem(e){let i=(e.value||"").trim();this.additionalItems.includes(i)||(this.additionalItems.push(i),this.advancedForm?.get("Additionalitem")?.setValue(this.additionalItems)),e.chipInput.clear()}removeAdditonalItem(e){let i=this.additionalItems.indexOf(e);i>=0&&(this.additionalItems.splice(i,1),this.advancedForm?.get("Additionalitem")?.setValue(this.additionalItems))}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275cmp=S({type:n,selectors:[["app-advanced-config"]],inputs:{pricebooks:[1,"pricebooks"],channel:"channel"},decls:51,vars:29,consts:[["chipGrid",""],[1,"card","pt-12","border-top-0","rounded-0","rounded-bottom"],[3,"formGroup"],[1,"card-body"],["formGroupName","advanced",1,"row"],[1,"col-6"],["matTooltipPosition","above","matTooltip","Register where the transaction is recorded in POS",1,"form-label-group","w-100",3,"ngClass"],["id","registerId","clearable","true","bindLabel","Name","bindValue","Name","placeholder","Register","formControlName","Register","name","registerId",1,"center-text","tall",3,"items"],["for","registerId"],["matTooltipPosition","above","matTooltip","Minimal inventory on channel, if product inventory is below minimum inventory will automatically update to 0",1,"form-label-group"],["type","number","name","MinimumInventory","placeholder","Minimum Inventory","id","MinimumInventory","formControlName","MinimumInventory",1,"form-control"],["for","MinimumInventory"],[1,"col-6","mat-chip-custom"],["appearance","outline","matTooltipPosition","above","matTooltipClass","custom-width-tooltip","matTooltip","Please input SKU Product for add Additional products that will be entered automatically in every transaction from the marketplace, Example : Paperbag",1,"w-100"],["aria-label","Enter fruits"],[3,"aria-description","removed",4,"ngFor","ngForOf"],["placeholder","Input SKU Product",3,"matChipInputTokenEnd","matChipInputFor"],[4,"ngIf"],["matTooltipPosition","above","matTooltip","Warehouse ID for location of the product",1,"form-label-group"],["type","text","name","WarehouseID","placeholder","Warehous ID","id","WarehouseID","formControlName","WarehouseID",1,"form-control"],["for","WarehouseID"],[1,"form-label-group","w-100",3,"ngClass"],["id","pricebookId","clearable","true","bindLabel","Name","bindValue","ID","placeholder","Pricebook","formControlName","PricebookID","name","pricebookId",1,"center-text","tall",3,"items"],["for","pricebookId"],["formGroupName","sync",1,"row"],["matTooltipPosition","above","matTooltip","Automatically sync your orders from channel to POS",1,"form-label-group","radio",3,"ngClass"],["for","SyncOrder"],[1,"mt-3"],["formControlName","SyncOrder","name","SyncOrder"],["matTooltip","Include if the channel makes a transaction",1,"me-5",3,"value"],["matTooltip","No Include if the channel makes a transaction",1,"me-5",3,"value"],[1,"col-sm-12"],[3,"removed","aria-description"],["matChipRemove",""],["matTooltipPosition","above","matTooltip","Enable for record marketplace service fee in POS as Write off",1,"form-label-group","radio"],["for","FulfillmentWebhookHandling"],["formControlName","FulfillmentWebhookHandling","name","FulfillmentWebhookHandling"],[1,"me-5",3,"value"],[1,"form-label-group","radio"],[1,"mt-4"],["formControlName","ReturnProcess","name","ReturnProcess"],["matTooltipPosition","above","matTooltip",`When this configuration is enabled, fulfilled marketplace orders canceled later will not be auto-voided.
|
|
1
|
+
import{a as lo,b as so,c as co,d as po,e as Wi}from"./chunk-77JJJNRM.js";import{a as ro}from"./chunk-SLI26GUH.js";import{a as Re}from"./chunk-64JGYG54.js";import{a as oo,b as ao}from"./chunk-QJJ2WFVX.js";import"./chunk-UEPQYAWE.js";import{a as no,b as hi}from"./chunk-G7R7LUW4.js";import{a as Gn}from"./chunk-PE5AFID4.js";import{a as Ue,b as je,c as Ae}from"./chunk-K5GEJ2GZ.js";import{a as dt}from"./chunk-X743YBE6.js";import{a as $n,d as to}from"./chunk-E4KNET2R.js";import"./chunk-3LRWABHB.js";import{a as Jn}from"./chunk-GIRXMYNI.js";import{a as pi,b as mi}from"./chunk-YPWHTELF.js";import"./chunk-OC2FBL33.js";import"./chunk-NS46QSCM.js";import"./chunk-EH6HWI3G.js";import"./chunk-E3ROEHBW.js";import"./chunk-OLOIQI4D.js";import"./chunk-RECNBAEB.js";import"./chunk-IA6KOBDJ.js";import{a as io}from"./chunk-M5XGP4SG.js";import"./chunk-SN4AOGQK.js";import"./chunk-SB7NWPDS.js";import"./chunk-AYPY47VM.js";import"./chunk-SM3P57SO.js";import{b as eo}from"./chunk-IIZDEGGW.js";import"./chunk-AQTXFEBA.js";import{a as Xn}from"./chunk-SDUUFQUI.js";import"./chunk-5OHRA4AS.js";import{a as Li}from"./chunk-IL5JIRWJ.js";import{c as Qn}from"./chunk-MH4SJTQX.js";import"./chunk-3RK6DDJD.js";import{a as Yn}from"./chunk-CUB2QFUO.js";import{a as jn,c as qn,d as Kn,f as Zn}from"./chunk-KALG6D6L.js";import{a as ft}from"./chunk-UMP6ZMEJ.js";import{b as Un}from"./chunk-PAEIUO2F.js";import"./chunk-OZ7LWNOK.js";import"./chunk-ECRWEMEV.js";import"./chunk-LZCEM2PC.js";import{a as Bn,b as Hn}from"./chunk-IMK2JGZA.js";import{a as Ni}from"./chunk-CMTBBXR5.js";import{a as di}from"./chunk-D6URDVES.js";import"./chunk-WY4BY2ID.js";import"./chunk-Z3ITXK3D.js";import"./chunk-ACIMXBIC.js";import"./chunk-AEOSNAHH.js";import"./chunk-TGMCGROM.js";import{a as Te}from"./chunk-GRIUDEPO.js";import{b as ae,e as ye}from"./chunk-JXSBFTQM.js";import"./chunk-K5XRGNWG.js";import{a as kn,b as En,d as Me,e as te}from"./chunk-5JVEEL2T.js";import{b as w,c as F}from"./chunk-PW42BQIY.js";import{b as Vn,d as xt,j as Ai,k as zn,m as Fe,n as Dt}from"./chunk-UGVEAL7H.js";import{A as lt,B as Y,c as Oe,e as K,g as Tn,h as H,i as X,j as In,k as xn,l as zt,m as wt,n as $,o as Tt,q as Z,r as oe,s as ee,z as Dn}from"./chunk-6QYD6NIJ.js";import{a as gt}from"./chunk-ATZ475FN.js";import{b as It,c as Gt}from"./chunk-SWQXSJ7O.js";import{f as An,h as Nn,i as Ln,r as R,s as W}from"./chunk-IHNN4Q2N.js";import{C as jt,D as Fi,H as Wn,L as Ri,a as Pn,b as On,c as ci,e as Bt,f as st,i as Mi,j as ct,k as Mn,m as Ht,n as Fn,o as Rn,x as Ut}from"./chunk-EQIFZBRG.js";import{E as si,F as wn,G as at,H as Pe,J as rt,a as St,d as L,f as fe,g as z,j as _e,k as He,m as li,n as I}from"./chunk-M2FCTYGU.js";import{$ as mt,$c as P,Ac as Oi,Bc as ke,Ca as fn,Cc as Ee,E as mn,Ea as ti,F as ze,Fc as Be,G as $e,Ga as gn,Gb as S,Gc as c,Hb as tt,Hc as v,Ib as it,Ic as M,Jb as bn,K as ei,Ka as j,Kb as ni,Kc as de,La as bt,Lc as pe,Mb as u,Mc as me,Nc as Cn,O as hn,Oa as Nt,Pa as Ze,Qc as he,Ra as Lt,Rc as Wt,Sa as vn,Sc as y,Tc as ne,Xa as _n,Xb as we,Yb as p,Z as Ce,Zc as Sn,_b as nt,a as yt,aa as Q,ac as oi,ad as G,bd as ce,c as Ei,ca as Se,cb as ii,cd as ot,dc as b,ea as ie,f as B,g as We,ic as a,ja as ge,jc as r,jd as Ct,ka as et,kc as g,l as pn,lc as k,m as At,ma as xe,mc as E,oa as un,oc as A,od as ue,pa as f,pb as ht,pc as ai,pd as Vt,q as Ve,rb as l,tc as C,uc as h,v as se,vb as Pi,vc as ut,wc as De,xa as J,xb as V,xc as ri,ya as x,za as D,zb as yn,zc as Ge}from"./chunk-B7KTCPKC.js";import"./chunk-EU2KAMEK.js";import{a as Ke,b as dn}from"./chunk-66YHNWRR.js";var mo=(()=>{class n{constructor(){this.channelTabs=[{Title:"Channel",Url:"/menu/channel/marketplace"},{Title:"POS",Url:"/menu/channel/pos"},{Title:"Flush Cache",Url:"/menu/channel/flush_cache"}]}ngOnInit(){}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275cmp=S({type:n,selectors:[["app-channels"]],standalone:!1,decls:5,vars:1,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid"],[3,"Tabs"]],template:function(i,t){i&1&&(a(0,"nav",0)(1,"div",1)(2,"div"),g(3,"nav-tab",2),r()()(),g(4,"router-outlet")),i&2&&(l(3),p("Tabs",t.channelTabs))},dependencies:[Bn,wn],styles:[".form-label-group[_ngcontent-%COMP%]{position:relative;margin-bottom:1rem}.form-label-group[_ngcontent-%COMP%] > input[_ngcontent-%COMP%]{height:3.625rem;padding:.75rem;color:#343434;font-size:.875rem;border-radius:.25rem!important;border-color:#c8d3df}.form-label-group[_ngcontent-%COMP%] > input[_ngcontent-%COMP%]:focus{border:solid 1.5px #1A73E8!important}.form-label-group[_ngcontent-%COMP%] > label[_ngcontent-%COMP%]{width:auto;position:absolute;top:1.125rem;left:.75rem;display:block;margin-bottom:0;line-height:1.5;color:#ccc;pointer-events:none;cursor:text;border:1px solid transparent;border-radius:.25rem;transition:all .1s ease-in-out;font-size:.875rem}.form-label-group[_ngcontent-%COMP%] > textarea[_ngcontent-%COMP%]{padding:.75rem;color:#343434;resize:both;font-size:.875rem;border-radius:.25rem;border-color:#c8d3df}.form-label-group[_ngcontent-%COMP%] > textarea[_ngcontent-%COMP%] ~ label[_ngcontent-%COMP%]{top:.9375rem}.form-label-group[_ngcontent-%COMP%] > textarea[_ngcontent-%COMP%]:focus{border:solid 1.5px #1A73E8!important}.form-label-group[_ngcontent-%COMP%] > textarea[_ngcontent-%COMP%]:focus ~ label[_ngcontent-%COMP%]{top:1rem;left:.78125rem}.form-label-group[_ngcontent-%COMP%] > ng-select[_ngcontent-%COMP%] .ng-select-container{min-height:3.625rem;border-color:#c8d3df;box-shadow:none}.form-label-group[_ngcontent-%COMP%] > ng-select[_ngcontent-%COMP%] ~ label[_ngcontent-%COMP%]{display:inline-block;top:-.625rem;background-color:#fff;font-size:.75rem!important;color:#9da2a6;padding:0 .25rem;z-index:1002;left:.5rem}.form-label-group.multiple[_ngcontent-%COMP%] ng-select[_ngcontent-%COMP%] .ng-input{padding-left:.25rem!important}.form-label-group.multiple[_ngcontent-%COMP%] ng-select[_ngcontent-%COMP%] .ng-placeholder{top:18px!important}.form-label-group.radio[_ngcontent-%COMP%]{height:3.625rem;padding:.75rem;color:#343434;border-radius:.25rem!important;border:solid 1px #c8d3df}.form-label-group.radio[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{font-size:.75rem!important;top:-10px!important;padding:0 .25rem;left:.5rem}.form-label-group.empty[_ngcontent-%COMP%] ng-select[_ngcontent-%COMP%] ~ label[_ngcontent-%COMP%]{display:none}.form-label-group[_ngcontent-%COMP%] input[_ngcontent-%COMP%]::-webkit-input-placeholder, .form-label-group[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:-ms-input-placeholder, .form-label-group[_ngcontent-%COMP%] input[_ngcontent-%COMP%]::-ms-input-placeholder, .form-label-group[_ngcontent-%COMP%] input[_ngcontent-%COMP%]::-moz-placeholder, .form-label-group[_ngcontent-%COMP%] input[_ngcontent-%COMP%]::placeholder, .form-label-group[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]::-webkit-input-placeholder, .form-label-group[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]:-ms-input-placeholder, .form-label-group[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]::-ms-input-placeholder, .form-label-group[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]::-moz-placeholder, .form-label-group[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]::placeholder{color:transparent}.form-label-group[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:not(:placeholder-shown) ~ label[_ngcontent-%COMP%], .form-label-group[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]:not(:placeholder-shown) ~ label[_ngcontent-%COMP%]{background-color:#fff;font-size:.75rem!important;color:#9da2a6;top:-10px!important;padding:0 .25rem;left:.5rem}.form-label-group[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:not(:placeholder-shown):focus ~ label[_ngcontent-%COMP%], .form-label-group[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]:not(:placeholder-shown):focus ~ label[_ngcontent-%COMP%]{color:#3f8aec}.form-label-group[_ngcontent-%COMP%] ng-select[_ngcontent-%COMP%] .ng-placeholder{padding-left:.25rem;color:#ccc!important;font-size:.875rem}.form-label-group[_ngcontent-%COMP%] ng-select[_ngcontent-%COMP%] .ng-has-value .ng-value{padding-left:.25rem;font-size:.875rem}.form-label-group[_ngcontent-%COMP%] ng-select[_ngcontent-%COMP%] .ng-value-container{overflow:initial!important}.form-label-group[_ngcontent-%COMP%] ng-select[_ngcontent-%COMP%] .ng-input{top:auto!important;padding-left:.875rem!important;font-size:.875rem}"]})}}return n})();function ko(n){let o=n.cloneNode(!0),e=o.querySelectorAll("[id]"),i=n.nodeName.toLowerCase();o.removeAttribute("id");for(let t=0;t<e.length;t++)e[t].removeAttribute("id");return i==="canvas"?fo(n,o):(i==="input"||i==="select"||i==="textarea")&&uo(n,o),ho("canvas",n,o,fo),ho("input, textarea, select",n,o,uo),o}function ho(n,o,e,i){let t=o.querySelectorAll(n);if(t.length){let s=e.querySelectorAll(n);for(let d=0;d<t.length;d++)i(t[d],s[d])}}var Va=0;function uo(n,o){o.type!=="file"&&(o.value=n.value),o.type==="radio"&&o.name&&(o.name=`mat-clone-${o.name}-${Va++}`)}function fo(n,o){let e=o.getContext("2d");if(e)try{e.drawImage(n,0,0)}catch{}}function qi(n){let o=n.getBoundingClientRect();return{top:o.top,right:o.right,bottom:o.bottom,left:o.left,width:o.width,height:o.height,x:o.x,y:o.y}}function Gi(n,o,e){let{top:i,bottom:t,left:s,right:d}=n;return e>=i&&e<=t&&o>=s&&o<=d}function Zt(n,o,e){n.top+=o,n.bottom=n.top+n.height,n.left+=e,n.right=n.left+n.width}function go(n,o,e,i){let{top:t,right:s,bottom:d,left:m,width:_,height:T}=n,N=_*o,be=T*o;return i>t-be&&i<d+be&&e>m-N&&e<s+N}var ui=class{_document;positions=new Map;constructor(o){this._document=o}clear(){this.positions.clear()}cache(o){this.clear(),this.positions.set(this._document,{scrollPosition:this.getViewportScrollPosition()}),o.forEach(e=>{this.positions.set(e,{scrollPosition:{top:e.scrollTop,left:e.scrollLeft},clientRect:qi(e)})})}handleScroll(o){let e=Bt(o),i=this.positions.get(e);if(!i)return null;let t=i.scrollPosition,s,d;if(e===this._document){let T=this.getViewportScrollPosition();s=T.top,d=T.left}else s=e.scrollTop,d=e.scrollLeft;let m=t.top-s,_=t.left-d;return this.positions.forEach((T,N)=>{T.clientRect&&e!==N&&e.contains(N)&&Zt(T.clientRect,m,_)}),t.top=s,t.left=d,{top:m,left:_}}getViewportScrollPosition(){return{top:window.scrollY,left:window.scrollX}}};function Eo(n,o){let e=n.rootNodes;if(e.length===1&&e[0].nodeType===o.ELEMENT_NODE)return e[0];let i=o.createElement("div");return e.forEach(t=>i.appendChild(t)),i}function Ki(n,o,e){for(let i in o)if(o.hasOwnProperty(i)){let t=o[i];t?n.setProperty(i,t,e?.has(i)?"important":""):n.removeProperty(i)}return n}function Et(n,o){let e=o?"":"none";Ki(n.style,{"touch-action":o?"":"none","-webkit-user-drag":o?"":"none","-webkit-tap-highlight-color":o?"":"transparent","user-select":e,"-ms-user-select":e,"-webkit-user-select":e,"-moz-user-select":e})}function vo(n,o,e){Ki(n.style,{position:o?"":"fixed",top:o?"":"0",opacity:o?"":"0",left:o?"":"-999em"},e)}function fi(n,o){return o&&o!="none"?n+" "+o:n}function _o(n,o){n.style.width=`${o.width}px`,n.style.height=`${o.height}px`,n.style.transform=gi(o.left,o.top)}function gi(n,o){return`translate3d(${Math.round(n)}px, ${Math.round(o)}px, 0)`}function yo(n){let o=n.toLowerCase().indexOf("ms")>-1?1:1e3;return parseFloat(n)*o}function za(n){let o=getComputedStyle(n),e=Vi(o,"transition-property"),i=e.find(m=>m==="transform"||m==="all");if(!i)return 0;let t=e.indexOf(i),s=Vi(o,"transition-duration"),d=Vi(o,"transition-delay");return yo(s[t])+yo(d[t])}function Vi(n,o){return n.getPropertyValue(o).split(",").map(i=>i.trim())}var Ga=new Set(["position"]),Bi=class{_document;_rootElement;_direction;_initialDomRect;_previewTemplate;_previewClass;_pickupPositionOnPage;_initialTransform;_zIndex;_renderer;_previewEmbeddedView;_preview;get element(){return this._preview}constructor(o,e,i,t,s,d,m,_,T,N){this._document=o,this._rootElement=e,this._direction=i,this._initialDomRect=t,this._previewTemplate=s,this._previewClass=d,this._pickupPositionOnPage=m,this._initialTransform=_,this._zIndex=T,this._renderer=N}attach(o){this._preview=this._createPreview(),o.appendChild(this._preview),bo(this._preview)&&this._preview.showPopover()}destroy(){this._preview.remove(),this._previewEmbeddedView?.destroy(),this._preview=this._previewEmbeddedView=null}setTransform(o){this._preview.style.transform=o}getBoundingClientRect(){return this._preview.getBoundingClientRect()}addClass(o){this._preview.classList.add(o)}getTransitionDuration(){return za(this._preview)}addEventListener(o,e){return this._renderer.listen(this._preview,o,e)}_createPreview(){let o=this._previewTemplate,e=this._previewClass,i=o?o.template:null,t;if(i&&o){let s=o.matchSize?this._initialDomRect:null,d=o.viewContainer.createEmbeddedView(i,o.context);d.detectChanges(),t=Eo(d,this._document),this._previewEmbeddedView=d,o.matchSize?_o(t,s):t.style.transform=gi(this._pickupPositionOnPage.x,this._pickupPositionOnPage.y)}else t=ko(this._rootElement),_o(t,this._initialDomRect),this._initialTransform&&(t.style.transform=this._initialTransform);return Ki(t.style,{"pointer-events":"none",margin:bo(t)?"0 auto 0 0":"0",position:"fixed",top:"0",left:"0","z-index":this._zIndex+""},Ga),Et(t,!1),t.classList.add("cdk-drag-preview"),t.setAttribute("popover","manual"),t.setAttribute("dir",this._direction),e&&(Array.isArray(e)?e.forEach(s=>t.classList.add(s)):t.classList.add(e)),t}};function bo(n){return"showPopover"in n}var Ba={passive:!0},Co={passive:!1},Ha={passive:!1,capture:!0},Ua=800,So=new Set(["position"]),Hi=class{_config;_document;_ngZone;_viewportRuler;_dragDropRegistry;_renderer;_rootElementCleanups;_cleanupShadowRootSelectStart;_preview;_previewContainer;_placeholderRef;_placeholder;_pickupPositionInElement;_pickupPositionOnPage;_anchor;_passiveTransform={x:0,y:0};_activeTransform={x:0,y:0};_initialTransform;_hasStartedDragging=Lt(!1);_hasMoved;_initialContainer;_initialIndex;_parentPositions;_moveEvents=new B;_pointerDirectionDelta;_pointerPositionAtLastDirectionChange;_lastKnownPointerPosition;_rootElement;_ownerSVGElement;_rootElementTapHighlight;_pointerMoveSubscription=yt.EMPTY;_pointerUpSubscription=yt.EMPTY;_scrollSubscription=yt.EMPTY;_resizeSubscription=yt.EMPTY;_lastTouchEventTime;_dragStartTime;_boundaryElement=null;_nativeInteractionsEnabled=!0;_initialDomRect;_previewRect;_boundaryRect;_previewTemplate;_placeholderTemplate;_handles=[];_disabledHandles=new Set;_dropContainer;_direction="ltr";_parentDragRef;_cachedShadowRoot;lockAxis;dragStartDelay=0;previewClass;scale=1;get disabled(){return this._disabled||!!(this._dropContainer&&this._dropContainer.disabled)}set disabled(o){o!==this._disabled&&(this._disabled=o,this._toggleNativeDragInteractions(),this._handles.forEach(e=>Et(e,o)))}_disabled=!1;beforeStarted=new B;started=new B;released=new B;ended=new B;entered=new B;exited=new B;dropped=new B;moved=this._moveEvents;data;constrainPosition;constructor(o,e,i,t,s,d,m){this._config=e,this._document=i,this._ngZone=t,this._viewportRuler=s,this._dragDropRegistry=d,this._renderer=m,this.withRootElement(o).withParent(e.parentDragRef||null),this._parentPositions=new ui(i),d.registerDragItem(this)}getPlaceholderElement(){return this._placeholder}getRootElement(){return this._rootElement}getVisibleElement(){return this.isDragging()?this.getPlaceholderElement():this.getRootElement()}withHandles(o){this._handles=o.map(i=>ct(i)),this._handles.forEach(i=>Et(i,this.disabled)),this._toggleNativeDragInteractions();let e=new Set;return this._disabledHandles.forEach(i=>{this._handles.indexOf(i)>-1&&e.add(i)}),this._disabledHandles=e,this}withPreviewTemplate(o){return this._previewTemplate=o,this}withPlaceholderTemplate(o){return this._placeholderTemplate=o,this}withRootElement(o){let e=ct(o);return e!==this._rootElement&&(this._removeRootElementListeners(),this._rootElementCleanups=this._ngZone.runOutsideAngular(()=>[st(this._renderer,e,"mousedown",this._pointerDown,Co),st(this._renderer,e,"touchstart",this._pointerDown,Ba),st(this._renderer,e,"dragstart",this._nativeDragStart,Co)]),this._initialTransform=void 0,this._rootElement=e),typeof SVGElement<"u"&&this._rootElement instanceof SVGElement&&(this._ownerSVGElement=this._rootElement.ownerSVGElement),this}withBoundaryElement(o){return this._boundaryElement=o?ct(o):null,this._resizeSubscription.unsubscribe(),o&&(this._resizeSubscription=this._viewportRuler.change(10).subscribe(()=>this._containInsideBoundaryOnResize())),this}withParent(o){return this._parentDragRef=o,this}dispose(){this._removeRootElementListeners(),this.isDragging()&&this._rootElement?.remove(),this._anchor?.remove(),this._destroyPreview(),this._destroyPlaceholder(),this._dragDropRegistry.removeDragItem(this),this._removeListeners(),this.beforeStarted.complete(),this.started.complete(),this.released.complete(),this.ended.complete(),this.entered.complete(),this.exited.complete(),this.dropped.complete(),this._moveEvents.complete(),this._handles=[],this._disabledHandles.clear(),this._dropContainer=void 0,this._resizeSubscription.unsubscribe(),this._parentPositions.clear(),this._boundaryElement=this._rootElement=this._ownerSVGElement=this._placeholderTemplate=this._previewTemplate=this._anchor=this._parentDragRef=null}isDragging(){return this._hasStartedDragging()&&this._dragDropRegistry.isDragging(this)}reset(){this._rootElement.style.transform=this._initialTransform||"",this._activeTransform={x:0,y:0},this._passiveTransform={x:0,y:0}}disableHandle(o){!this._disabledHandles.has(o)&&this._handles.indexOf(o)>-1&&(this._disabledHandles.add(o),Et(o,!0))}enableHandle(o){this._disabledHandles.has(o)&&(this._disabledHandles.delete(o),Et(o,this.disabled))}withDirection(o){return this._direction=o,this}_withDropContainer(o){this._dropContainer=o}getFreeDragPosition(){let o=this.isDragging()?this._activeTransform:this._passiveTransform;return{x:o.x,y:o.y}}setFreeDragPosition(o){return this._activeTransform={x:0,y:0},this._passiveTransform.x=o.x,this._passiveTransform.y=o.y,this._dropContainer||this._applyRootElementTransform(o.x,o.y),this}withPreviewContainer(o){return this._previewContainer=o,this}_sortFromLastPointerPosition(){let o=this._lastKnownPointerPosition;o&&this._dropContainer&&this._updateActiveDropContainer(this._getConstrainedPointerPosition(o),o)}_removeListeners(){this._pointerMoveSubscription.unsubscribe(),this._pointerUpSubscription.unsubscribe(),this._scrollSubscription.unsubscribe(),this._cleanupShadowRootSelectStart?.(),this._cleanupShadowRootSelectStart=void 0}_destroyPreview(){this._preview?.destroy(),this._preview=null}_destroyPlaceholder(){this._placeholder?.remove(),this._placeholderRef?.destroy(),this._placeholder=this._placeholderRef=null}_pointerDown=o=>{if(this.beforeStarted.next(),this._handles.length){let e=this._getTargetHandle(o);e&&!this._disabledHandles.has(e)&&!this.disabled&&this._initializeDragSequence(e,o)}else this.disabled||this._initializeDragSequence(this._rootElement,o)};_pointerMove=o=>{let e=this._getPointerPositionOnPage(o);if(!this._hasStartedDragging()){let t=Math.abs(e.x-this._pickupPositionOnPage.x),s=Math.abs(e.y-this._pickupPositionOnPage.y);if(t+s>=this._config.dragStartThreshold){let m=Date.now()>=this._dragStartTime+this._getDragStartDelay(o),_=this._dropContainer;if(!m){this._endDragSequence(o);return}(!_||!_.isDragging()&&!_.isReceiving())&&(o.cancelable&&o.preventDefault(),this._hasStartedDragging.set(!0),this._ngZone.run(()=>this._startDragSequence(o)))}return}o.cancelable&&o.preventDefault();let i=this._getConstrainedPointerPosition(e);if(this._hasMoved=!0,this._lastKnownPointerPosition=e,this._updatePointerDirectionDelta(i),this._dropContainer)this._updateActiveDropContainer(i,e);else{let t=this.constrainPosition?this._initialDomRect:this._pickupPositionOnPage,s=this._activeTransform;s.x=i.x-t.x+this._passiveTransform.x,s.y=i.y-t.y+this._passiveTransform.y,this._applyRootElementTransform(s.x,s.y)}this._moveEvents.observers.length&&this._ngZone.run(()=>{this._moveEvents.next({source:this,pointerPosition:i,event:o,distance:this._getDragDistance(i),delta:this._pointerDirectionDelta})})};_pointerUp=o=>{this._endDragSequence(o)};_endDragSequence(o){if(this._dragDropRegistry.isDragging(this)&&(this._removeListeners(),this._dragDropRegistry.stopDragging(this),this._toggleNativeDragInteractions(),this._handles&&(this._rootElement.style.webkitTapHighlightColor=this._rootElementTapHighlight),!!this._hasStartedDragging()))if(this.released.next({source:this,event:o}),this._dropContainer)this._dropContainer._stopScrolling(),this._animatePreviewToPlaceholder().then(()=>{this._cleanupDragArtifacts(o),this._cleanupCachedDimensions(),this._dragDropRegistry.stopDragging(this)});else{this._passiveTransform.x=this._activeTransform.x;let e=this._getPointerPositionOnPage(o);this._passiveTransform.y=this._activeTransform.y,this._ngZone.run(()=>{this.ended.next({source:this,distance:this._getDragDistance(e),dropPoint:e,event:o})}),this._cleanupCachedDimensions(),this._dragDropRegistry.stopDragging(this)}}_startDragSequence(o){qt(o)&&(this._lastTouchEventTime=Date.now()),this._toggleNativeDragInteractions();let e=this._getShadowRoot(),i=this._dropContainer;if(e&&this._ngZone.runOutsideAngular(()=>{this._cleanupShadowRootSelectStart=st(this._renderer,e,"selectstart",ja,Ha)}),i){let t=this._rootElement,s=t.parentNode,d=this._placeholder=this._createPlaceholderElement(),m=this._anchor=this._anchor||this._document.createComment("");s.insertBefore(m,t),this._initialTransform=t.style.transform||"",this._preview=new Bi(this._document,this._rootElement,this._direction,this._initialDomRect,this._previewTemplate||null,this.previewClass||null,this._pickupPositionOnPage,this._initialTransform,this._config.zIndex||1e3,this._renderer),this._preview.attach(this._getPreviewInsertionPoint(s,e)),vo(t,!1,So),this._document.body.appendChild(s.replaceChild(d,t)),this.started.next({source:this,event:o}),i.start(),this._initialContainer=i,this._initialIndex=i.getItemIndex(this)}else this.started.next({source:this,event:o}),this._initialContainer=this._initialIndex=void 0;this._parentPositions.cache(i?i.getScrollableParents():[])}_initializeDragSequence(o,e){this._parentDragRef&&e.stopPropagation();let i=this.isDragging(),t=qt(e),s=!t&&e.button!==0,d=this._rootElement,m=Bt(e),_=!t&&this._lastTouchEventTime&&this._lastTouchEventTime+Ua>Date.now(),T=t?On(e):Pn(e);if(m&&m.draggable&&e.type==="mousedown"&&e.preventDefault(),i||s||_||T)return;if(this._handles.length){let qe=d.style;this._rootElementTapHighlight=qe.webkitTapHighlightColor||"",qe.webkitTapHighlightColor="transparent"}this._hasMoved=!1,this._hasStartedDragging.set(this._hasMoved),this._removeListeners(),this._initialDomRect=this._rootElement.getBoundingClientRect(),this._pointerMoveSubscription=this._dragDropRegistry.pointerMove.subscribe(this._pointerMove),this._pointerUpSubscription=this._dragDropRegistry.pointerUp.subscribe(this._pointerUp),this._scrollSubscription=this._dragDropRegistry.scrolled(this._getShadowRoot()).subscribe(qe=>this._updateOnScroll(qe)),this._boundaryElement&&(this._boundaryRect=qi(this._boundaryElement));let N=this._previewTemplate;this._pickupPositionInElement=N&&N.template&&!N.matchSize?{x:0,y:0}:this._getPointerPositionInElement(this._initialDomRect,o,e);let be=this._pickupPositionOnPage=this._lastKnownPointerPosition=this._getPointerPositionOnPage(e);this._pointerDirectionDelta={x:0,y:0},this._pointerPositionAtLastDirectionChange={x:be.x,y:be.y},this._dragStartTime=Date.now(),this._dragDropRegistry.startDragging(this,e)}_cleanupDragArtifacts(o){vo(this._rootElement,!0,So),this._anchor.parentNode.replaceChild(this._rootElement,this._anchor),this._destroyPreview(),this._destroyPlaceholder(),this._initialDomRect=this._boundaryRect=this._previewRect=this._initialTransform=void 0,this._ngZone.run(()=>{let e=this._dropContainer,i=e.getItemIndex(this),t=this._getPointerPositionOnPage(o),s=this._getDragDistance(t),d=e._isOverContainer(t.x,t.y);this.ended.next({source:this,distance:s,dropPoint:t,event:o}),this.dropped.next({item:this,currentIndex:i,previousIndex:this._initialIndex,container:e,previousContainer:this._initialContainer,isPointerOverContainer:d,distance:s,dropPoint:t,event:o}),e.drop(this,i,this._initialIndex,this._initialContainer,d,s,t,o),this._dropContainer=this._initialContainer})}_updateActiveDropContainer({x:o,y:e},{x:i,y:t}){let s=this._initialContainer._getSiblingContainerFromPosition(this,o,e);!s&&this._dropContainer!==this._initialContainer&&this._initialContainer._isOverContainer(o,e)&&(s=this._initialContainer),s&&s!==this._dropContainer&&this._ngZone.run(()=>{this.exited.next({item:this,container:this._dropContainer}),this._dropContainer.exit(this),this._dropContainer=s,this._dropContainer.enter(this,o,e,s===this._initialContainer&&s.sortingDisabled?this._initialIndex:void 0),this.entered.next({item:this,container:s,currentIndex:s.getItemIndex(this)})}),this.isDragging()&&(this._dropContainer._startScrollingIfNecessary(i,t),this._dropContainer._sortItem(this,o,e,this._pointerDirectionDelta),this.constrainPosition?this._applyPreviewTransform(o,e):this._applyPreviewTransform(o-this._pickupPositionInElement.x,e-this._pickupPositionInElement.y))}_animatePreviewToPlaceholder(){if(!this._hasMoved)return Promise.resolve();let o=this._placeholder.getBoundingClientRect();this._preview.addClass("cdk-drag-animating"),this._applyPreviewTransform(o.left,o.top);let e=this._preview.getTransitionDuration();return e===0?Promise.resolve():this._ngZone.runOutsideAngular(()=>new Promise(i=>{let t=m=>{(!m||this._preview&&Bt(m)===this._preview.element&&m.propertyName==="transform")&&(d(),i(),clearTimeout(s))},s=setTimeout(t,e*1.5),d=this._preview.addEventListener("transitionend",t)}))}_createPlaceholderElement(){let o=this._placeholderTemplate,e=o?o.template:null,i;return e?(this._placeholderRef=o.viewContainer.createEmbeddedView(e,o.context),this._placeholderRef.detectChanges(),i=Eo(this._placeholderRef,this._document)):i=ko(this._rootElement),i.style.pointerEvents="none",i.classList.add("cdk-drag-placeholder"),i}_getPointerPositionInElement(o,e,i){let t=e===this._rootElement?null:e,s=t?t.getBoundingClientRect():o,d=qt(i)?i.targetTouches[0]:i,m=this._getViewportScrollPosition(),_=d.pageX-s.left-m.left,T=d.pageY-s.top-m.top;return{x:s.left-o.left+_,y:s.top-o.top+T}}_getPointerPositionOnPage(o){let e=this._getViewportScrollPosition(),i=qt(o)?o.touches[0]||o.changedTouches[0]||{pageX:0,pageY:0}:o,t=i.pageX-e.left,s=i.pageY-e.top;if(this._ownerSVGElement){let d=this._ownerSVGElement.getScreenCTM();if(d){let m=this._ownerSVGElement.createSVGPoint();return m.x=t,m.y=s,m.matrixTransform(d.inverse())}}return{x:t,y:s}}_getConstrainedPointerPosition(o){let e=this._dropContainer?this._dropContainer.lockAxis:null,{x:i,y:t}=this.constrainPosition?this.constrainPosition(o,this,this._initialDomRect,this._pickupPositionInElement):o;if(this.lockAxis==="x"||e==="x"?t=this._pickupPositionOnPage.y-(this.constrainPosition?this._pickupPositionInElement.y:0):(this.lockAxis==="y"||e==="y")&&(i=this._pickupPositionOnPage.x-(this.constrainPosition?this._pickupPositionInElement.x:0)),this._boundaryRect){let{x:s,y:d}=this.constrainPosition?{x:0,y:0}:this._pickupPositionInElement,m=this._boundaryRect,{width:_,height:T}=this._getPreviewRect(),N=m.top+d,be=m.bottom-(T-d),qe=m.left+s,Di=m.right-(_-s);i=wo(i,qe,Di),t=wo(t,N,be)}return{x:i,y:t}}_updatePointerDirectionDelta(o){let{x:e,y:i}=o,t=this._pointerDirectionDelta,s=this._pointerPositionAtLastDirectionChange,d=Math.abs(e-s.x),m=Math.abs(i-s.y);return d>this._config.pointerDirectionChangeThreshold&&(t.x=e>s.x?1:-1,s.x=e),m>this._config.pointerDirectionChangeThreshold&&(t.y=i>s.y?1:-1,s.y=i),t}_toggleNativeDragInteractions(){if(!this._rootElement||!this._handles)return;let o=this._handles.length>0||!this.isDragging();o!==this._nativeInteractionsEnabled&&(this._nativeInteractionsEnabled=o,Et(this._rootElement,o))}_removeRootElementListeners(){this._rootElementCleanups?.forEach(o=>o()),this._rootElementCleanups=void 0}_applyRootElementTransform(o,e){let i=1/this.scale,t=gi(o*i,e*i),s=this._rootElement.style;this._initialTransform==null&&(this._initialTransform=s.transform&&s.transform!="none"?s.transform:""),s.transform=fi(t,this._initialTransform)}_applyPreviewTransform(o,e){let i=this._previewTemplate?.template?void 0:this._initialTransform,t=gi(o,e);this._preview.setTransform(fi(t,i))}_getDragDistance(o){let e=this._pickupPositionOnPage;return e?{x:o.x-e.x,y:o.y-e.y}:{x:0,y:0}}_cleanupCachedDimensions(){this._boundaryRect=this._previewRect=void 0,this._parentPositions.clear()}_containInsideBoundaryOnResize(){let{x:o,y:e}=this._passiveTransform;if(o===0&&e===0||this.isDragging()||!this._boundaryElement)return;let i=this._rootElement.getBoundingClientRect(),t=this._boundaryElement.getBoundingClientRect();if(t.width===0&&t.height===0||i.width===0&&i.height===0)return;let s=t.left-i.left,d=i.right-t.right,m=t.top-i.top,_=i.bottom-t.bottom;t.width>i.width?(s>0&&(o+=s),d>0&&(o-=d)):o=0,t.height>i.height?(m>0&&(e+=m),_>0&&(e-=_)):e=0,(o!==this._passiveTransform.x||e!==this._passiveTransform.y)&&this.setFreeDragPosition({y:e,x:o})}_getDragStartDelay(o){let e=this.dragStartDelay;return typeof e=="number"?e:qt(o)?e.touch:e?e.mouse:0}_updateOnScroll(o){let e=this._parentPositions.handleScroll(o);if(e){let i=Bt(o);this._boundaryRect&&i!==this._boundaryElement&&i.contains(this._boundaryElement)&&Zt(this._boundaryRect,e.top,e.left),this._pickupPositionOnPage.x+=e.left,this._pickupPositionOnPage.y+=e.top,this._dropContainer||(this._activeTransform.x-=e.left,this._activeTransform.y-=e.top,this._applyRootElementTransform(this._activeTransform.x,this._activeTransform.y))}}_getViewportScrollPosition(){return this._parentPositions.positions.get(this._document)?.scrollPosition||this._parentPositions.getViewportScrollPosition()}_getShadowRoot(){return this._cachedShadowRoot===void 0&&(this._cachedShadowRoot=ci(this._rootElement)),this._cachedShadowRoot}_getPreviewInsertionPoint(o,e){let i=this._previewContainer||"global";if(i==="parent")return o;if(i==="global"){let t=this._document;return e||t.fullscreenElement||t.webkitFullscreenElement||t.mozFullScreenElement||t.msFullscreenElement||t.body}return ct(i)}_getPreviewRect(){return(!this._previewRect||!this._previewRect.width&&!this._previewRect.height)&&(this._previewRect=this._preview?this._preview.getBoundingClientRect():this._initialDomRect),this._previewRect}_nativeDragStart=o=>{if(this._handles.length){let e=this._getTargetHandle(o);e&&!this._disabledHandles.has(e)&&!this.disabled&&o.preventDefault()}else this.disabled||o.preventDefault()};_getTargetHandle(o){return this._handles.find(e=>o.target&&(o.target===e||e.contains(o.target)))}};function wo(n,o,e){return Math.max(o,Math.min(e,n))}function qt(n){return n.type[0]==="t"}function ja(n){n.preventDefault()}function _i(n,o,e){let i=To(o,n.length-1),t=To(e,n.length-1);if(i===t)return;let s=n[i],d=t<i?-1:1;for(let m=i;m!==t;m+=d)n[m]=n[m+d];n[t]=s}function To(n,o){return Math.max(0,Math.min(o,n))}var vi=class{_dragDropRegistry;_element;_sortPredicate;_itemPositions=[];_activeDraggables;orientation="vertical";direction;constructor(o){this._dragDropRegistry=o}_previousSwap={drag:null,delta:0,overlaps:!1};start(o){this.withItems(o)}sort(o,e,i,t){let s=this._itemPositions,d=this._getItemIndexFromPointerPosition(o,e,i,t);if(d===-1&&s.length>0)return null;let m=this.orientation==="horizontal",_=s.findIndex(Ie=>Ie.drag===o),T=s[d],N=s[_].clientRect,be=T.clientRect,qe=_>d?1:-1,Di=this._getItemOffsetPx(N,be,qe),Na=this._getSiblingOffsetPx(_,s,qe),La=s.slice();return _i(s,_,d),s.forEach((Ie,Wa)=>{if(La[Wa]===Ie)return;let ln=Ie.drag===o,ki=ln?Di:Na,sn=ln?o.getPlaceholderElement():Ie.drag.getRootElement();Ie.offset+=ki;let cn=Math.round(Ie.offset*(1/Ie.drag.scale));m?(sn.style.transform=fi(`translate3d(${cn}px, 0, 0)`,Ie.initialTransform),Zt(Ie.clientRect,0,ki)):(sn.style.transform=fi(`translate3d(0, ${cn}px, 0)`,Ie.initialTransform),Zt(Ie.clientRect,ki,0))}),this._previousSwap.overlaps=Gi(be,e,i),this._previousSwap.drag=T.drag,this._previousSwap.delta=m?t.x:t.y,{previousIndex:_,currentIndex:d}}enter(o,e,i,t){let s=t==null||t<0?this._getItemIndexFromPointerPosition(o,e,i):t,d=this._activeDraggables,m=d.indexOf(o),_=o.getPlaceholderElement(),T=d[s];if(T===o&&(T=d[s+1]),!T&&(s==null||s===-1||s<d.length-1)&&this._shouldEnterAsFirstChild(e,i)&&(T=d[0]),m>-1&&d.splice(m,1),T&&!this._dragDropRegistry.isDragging(T)){let N=T.getRootElement();N.parentElement.insertBefore(_,N),d.splice(s,0,o)}else this._element.appendChild(_),d.push(o);_.style.transform="",this._cacheItemPositions()}withItems(o){this._activeDraggables=o.slice(),this._cacheItemPositions()}withSortPredicate(o){this._sortPredicate=o}reset(){this._activeDraggables?.forEach(o=>{let e=o.getRootElement();if(e){let i=this._itemPositions.find(t=>t.drag===o)?.initialTransform;e.style.transform=i||""}}),this._itemPositions=[],this._activeDraggables=[],this._previousSwap.drag=null,this._previousSwap.delta=0,this._previousSwap.overlaps=!1}getActiveItemsSnapshot(){return this._activeDraggables}getItemIndex(o){return(this.orientation==="horizontal"&&this.direction==="rtl"?this._itemPositions.slice().reverse():this._itemPositions).findIndex(i=>i.drag===o)}updateOnScroll(o,e){this._itemPositions.forEach(({clientRect:i})=>{Zt(i,o,e)}),this._itemPositions.forEach(({drag:i})=>{this._dragDropRegistry.isDragging(i)&&i._sortFromLastPointerPosition()})}withElementContainer(o){this._element=o}_cacheItemPositions(){let o=this.orientation==="horizontal";this._itemPositions=this._activeDraggables.map(e=>{let i=e.getVisibleElement();return{drag:e,offset:0,initialTransform:i.style.transform||"",clientRect:qi(i)}}).sort((e,i)=>o?e.clientRect.left-i.clientRect.left:e.clientRect.top-i.clientRect.top)}_getItemOffsetPx(o,e,i){let t=this.orientation==="horizontal",s=t?e.left-o.left:e.top-o.top;return i===-1&&(s+=t?e.width-o.width:e.height-o.height),s}_getSiblingOffsetPx(o,e,i){let t=this.orientation==="horizontal",s=e[o].clientRect,d=e[o+i*-1],m=s[t?"width":"height"]*i;if(d){let _=t?"left":"top",T=t?"right":"bottom";i===-1?m-=d.clientRect[_]-s[T]:m+=s[_]-d.clientRect[T]}return m}_shouldEnterAsFirstChild(o,e){if(!this._activeDraggables.length)return!1;let i=this._itemPositions,t=this.orientation==="horizontal";if(i[0].drag!==this._activeDraggables[0]){let d=i[i.length-1].clientRect;return t?o>=d.right:e>=d.bottom}else{let d=i[0].clientRect;return t?o<=d.left:e<=d.top}}_getItemIndexFromPointerPosition(o,e,i,t){let s=this.orientation==="horizontal",d=this._itemPositions.findIndex(({drag:m,clientRect:_})=>{if(m===o)return!1;if(t){let T=s?t.x:t.y;if(m===this._previousSwap.drag&&this._previousSwap.overlaps&&T===this._previousSwap.delta)return!1}return s?e>=Math.floor(_.left)&&e<Math.floor(_.right):i>=Math.floor(_.top)&&i<Math.floor(_.bottom)});return d===-1||!this._sortPredicate(d,o)?-1:d}},Ui=class{_document;_dragDropRegistry;_element;_sortPredicate;_rootNode;_activeItems;_previousSwap={drag:null,deltaX:0,deltaY:0,overlaps:!1};_relatedNodes=[];constructor(o,e){this._document=o,this._dragDropRegistry=e}start(o){let e=this._element.childNodes;this._relatedNodes=[];for(let i=0;i<e.length;i++){let t=e[i];this._relatedNodes.push([t,t.nextSibling])}this.withItems(o)}sort(o,e,i,t){let s=this._getItemIndexFromPointerPosition(o,e,i),d=this._previousSwap;if(s===-1||this._activeItems[s]===o)return null;let m=this._activeItems[s];if(d.drag===m&&d.overlaps&&d.deltaX===t.x&&d.deltaY===t.y)return null;let _=this.getItemIndex(o),T=o.getPlaceholderElement(),N=m.getRootElement();s>_?N.after(T):N.before(T),_i(this._activeItems,_,s);let be=this._getRootNode().elementFromPoint(e,i);return d.deltaX=t.x,d.deltaY=t.y,d.drag=m,d.overlaps=N===be||N.contains(be),{previousIndex:_,currentIndex:s}}enter(o,e,i,t){let s=t==null||t<0?this._getItemIndexFromPointerPosition(o,e,i):t;s===-1&&(s=this._getClosestItemIndexToPointer(o,e,i));let d=this._activeItems[s],m=this._activeItems.indexOf(o);m>-1&&this._activeItems.splice(m,1),d&&!this._dragDropRegistry.isDragging(d)?(this._activeItems.splice(s,0,o),d.getRootElement().before(o.getPlaceholderElement())):(this._activeItems.push(o),this._element.appendChild(o.getPlaceholderElement()))}withItems(o){this._activeItems=o.slice()}withSortPredicate(o){this._sortPredicate=o}reset(){let o=this._element,e=this._previousSwap;for(let i=this._relatedNodes.length-1;i>-1;i--){let[t,s]=this._relatedNodes[i];t.parentNode===o&&t.nextSibling!==s&&(s===null?o.appendChild(t):s.parentNode===o&&o.insertBefore(t,s))}this._relatedNodes=[],this._activeItems=[],e.drag=null,e.deltaX=e.deltaY=0,e.overlaps=!1}getActiveItemsSnapshot(){return this._activeItems}getItemIndex(o){return this._activeItems.indexOf(o)}updateOnScroll(){this._activeItems.forEach(o=>{this._dragDropRegistry.isDragging(o)&&o._sortFromLastPointerPosition()})}withElementContainer(o){o!==this._element&&(this._element=o,this._rootNode=void 0)}_getItemIndexFromPointerPosition(o,e,i){let t=this._getRootNode().elementFromPoint(Math.floor(e),Math.floor(i)),s=t?this._activeItems.findIndex(d=>{let m=d.getRootElement();return t===m||m.contains(t)}):-1;return s===-1||!this._sortPredicate(s,o)?-1:s}_getRootNode(){return this._rootNode||(this._rootNode=ci(this._element)||this._document),this._rootNode}_getClosestItemIndexToPointer(o,e,i){if(this._activeItems.length===0)return-1;if(this._activeItems.length===1)return 0;let t=1/0,s=-1;for(let d=0;d<this._activeItems.length;d++){let m=this._activeItems[d];if(m!==o){let{x:_,y:T}=m.getRootElement().getBoundingClientRect(),N=Math.hypot(e-_,i-T);N<t&&(t=N,s=d)}}return s}},Io=.05,Po=.05,Ne=function(n){return n[n.NONE=0]="NONE",n[n.UP=1]="UP",n[n.DOWN=2]="DOWN",n}(Ne||{}),ve=function(n){return n[n.NONE=0]="NONE",n[n.LEFT=1]="LEFT",n[n.RIGHT=2]="RIGHT",n}(ve||{}),ji=class{_dragDropRegistry;_ngZone;_viewportRuler;element;disabled=!1;sortingDisabled=!1;lockAxis;autoScrollDisabled=!1;autoScrollStep=2;enterPredicate=()=>!0;sortPredicate=()=>!0;beforeStarted=new B;entered=new B;exited=new B;dropped=new B;sorted=new B;receivingStarted=new B;receivingStopped=new B;data;_container;_isDragging=!1;_parentPositions;_sortStrategy;_domRect;_draggables=[];_siblings=[];_activeSiblings=new Set;_viewportScrollSubscription=yt.EMPTY;_verticalScrollDirection=Ne.NONE;_horizontalScrollDirection=ve.NONE;_scrollNode;_stopScrollTimers=new B;_cachedShadowRoot=null;_document;_scrollableElements=[];_initialScrollSnap;_direction="ltr";constructor(o,e,i,t,s){this._dragDropRegistry=e,this._ngZone=t,this._viewportRuler=s;let d=this.element=ct(o);this._document=i,this.withOrientation("vertical").withElementContainer(d),e.registerDropContainer(this),this._parentPositions=new ui(i)}dispose(){this._stopScrolling(),this._stopScrollTimers.complete(),this._viewportScrollSubscription.unsubscribe(),this.beforeStarted.complete(),this.entered.complete(),this.exited.complete(),this.dropped.complete(),this.sorted.complete(),this.receivingStarted.complete(),this.receivingStopped.complete(),this._activeSiblings.clear(),this._scrollNode=null,this._parentPositions.clear(),this._dragDropRegistry.removeDropContainer(this)}isDragging(){return this._isDragging}start(){this._draggingStarted(),this._notifyReceivingSiblings()}enter(o,e,i,t){this._draggingStarted(),t==null&&this.sortingDisabled&&(t=this._draggables.indexOf(o)),this._sortStrategy.enter(o,e,i,t),this._cacheParentPositions(),this._notifyReceivingSiblings(),this.entered.next({item:o,container:this,currentIndex:this.getItemIndex(o)})}exit(o){this._reset(),this.exited.next({item:o,container:this})}drop(o,e,i,t,s,d,m,_={}){this._reset(),this.dropped.next({item:o,currentIndex:e,previousIndex:i,container:this,previousContainer:t,isPointerOverContainer:s,distance:d,dropPoint:m,event:_})}withItems(o){let e=this._draggables;return this._draggables=o,o.forEach(i=>i._withDropContainer(this)),this.isDragging()&&(e.filter(t=>t.isDragging()).every(t=>o.indexOf(t)===-1)?this._reset():this._sortStrategy.withItems(this._draggables)),this}withDirection(o){return this._direction=o,this._sortStrategy instanceof vi&&(this._sortStrategy.direction=o),this}connectedTo(o){return this._siblings=o.slice(),this}withOrientation(o){if(o==="mixed")this._sortStrategy=new Ui(this._document,this._dragDropRegistry);else{let e=new vi(this._dragDropRegistry);e.direction=this._direction,e.orientation=o,this._sortStrategy=e}return this._sortStrategy.withElementContainer(this._container),this._sortStrategy.withSortPredicate((e,i)=>this.sortPredicate(e,i,this)),this}withScrollableParents(o){let e=this._container;return this._scrollableElements=o.indexOf(e)===-1?[e,...o]:o.slice(),this}withElementContainer(o){if(o===this._container)return this;let e=ct(this.element),i=this._scrollableElements.indexOf(this._container),t=this._scrollableElements.indexOf(o);return i>-1&&this._scrollableElements.splice(i,1),t>-1&&this._scrollableElements.splice(t,1),this._sortStrategy&&this._sortStrategy.withElementContainer(o),this._cachedShadowRoot=null,this._scrollableElements.unshift(o),this._container=o,this}getScrollableParents(){return this._scrollableElements}getItemIndex(o){return this._isDragging?this._sortStrategy.getItemIndex(o):this._draggables.indexOf(o)}isReceiving(){return this._activeSiblings.size>0}_sortItem(o,e,i,t){if(this.sortingDisabled||!this._domRect||!go(this._domRect,Io,e,i))return;let s=this._sortStrategy.sort(o,e,i,t);s&&this.sorted.next({previousIndex:s.previousIndex,currentIndex:s.currentIndex,container:this,item:o})}_startScrollingIfNecessary(o,e){if(this.autoScrollDisabled)return;let i,t=Ne.NONE,s=ve.NONE;if(this._parentPositions.positions.forEach((d,m)=>{m===this._document||!d.clientRect||i||go(d.clientRect,Io,o,e)&&([t,s]=qa(m,d.clientRect,this._direction,o,e),(t||s)&&(i=m))}),!t&&!s){let{width:d,height:m}=this._viewportRuler.getViewportSize(),_={width:d,height:m,top:0,right:d,bottom:m,left:0};t=Oo(_,e),s=Mo(_,o),i=window}i&&(t!==this._verticalScrollDirection||s!==this._horizontalScrollDirection||i!==this._scrollNode)&&(this._verticalScrollDirection=t,this._horizontalScrollDirection=s,this._scrollNode=i,(t||s)&&i?this._ngZone.runOutsideAngular(this._startScrollInterval):this._stopScrolling())}_stopScrolling(){this._stopScrollTimers.next()}_draggingStarted(){let o=this._container.style;this.beforeStarted.next(),this._isDragging=!0,this._initialScrollSnap=o.msScrollSnapType||o.scrollSnapType||"",o.scrollSnapType=o.msScrollSnapType="none",this._sortStrategy.start(this._draggables),this._cacheParentPositions(),this._viewportScrollSubscription.unsubscribe(),this._listenToScrollEvents()}_cacheParentPositions(){this._parentPositions.cache(this._scrollableElements),this._domRect=this._parentPositions.positions.get(this._container).clientRect}_reset(){this._isDragging=!1;let o=this._container.style;o.scrollSnapType=o.msScrollSnapType=this._initialScrollSnap,this._siblings.forEach(e=>e._stopReceiving(this)),this._sortStrategy.reset(),this._stopScrolling(),this._viewportScrollSubscription.unsubscribe(),this._parentPositions.clear()}_startScrollInterval=()=>{this._stopScrolling(),mn(0,pn).pipe(Se(this._stopScrollTimers)).subscribe(()=>{let o=this._scrollNode,e=this.autoScrollStep;this._verticalScrollDirection===Ne.UP?o.scrollBy(0,-e):this._verticalScrollDirection===Ne.DOWN&&o.scrollBy(0,e),this._horizontalScrollDirection===ve.LEFT?o.scrollBy(-e,0):this._horizontalScrollDirection===ve.RIGHT&&o.scrollBy(e,0)})};_isOverContainer(o,e){return this._domRect!=null&&Gi(this._domRect,o,e)}_getSiblingContainerFromPosition(o,e,i){return this._siblings.find(t=>t._canReceive(o,e,i))}_canReceive(o,e,i){if(!this._domRect||!Gi(this._domRect,e,i)||!this.enterPredicate(o,this))return!1;let t=this._getShadowRoot().elementFromPoint(e,i);return t?t===this._container||this._container.contains(t):!1}_startReceiving(o,e){let i=this._activeSiblings;!i.has(o)&&e.every(t=>this.enterPredicate(t,this)||this._draggables.indexOf(t)>-1)&&(i.add(o),this._cacheParentPositions(),this._listenToScrollEvents(),this.receivingStarted.next({initiator:o,receiver:this,items:e}))}_stopReceiving(o){this._activeSiblings.delete(o),this._viewportScrollSubscription.unsubscribe(),this.receivingStopped.next({initiator:o,receiver:this})}_listenToScrollEvents(){this._viewportScrollSubscription=this._dragDropRegistry.scrolled(this._getShadowRoot()).subscribe(o=>{if(this.isDragging()){let e=this._parentPositions.handleScroll(o);e&&this._sortStrategy.updateOnScroll(e.top,e.left)}else this.isReceiving()&&this._cacheParentPositions()})}_getShadowRoot(){if(!this._cachedShadowRoot){let o=ci(this._container);this._cachedShadowRoot=o||this._document}return this._cachedShadowRoot}_notifyReceivingSiblings(){let o=this._sortStrategy.getActiveItemsSnapshot().filter(e=>e.isDragging());this._siblings.forEach(e=>e._startReceiving(this,o))}};function Oo(n,o){let{top:e,bottom:i,height:t}=n,s=t*Po;return o>=e-s&&o<=e+s?Ne.UP:o>=i-s&&o<=i+s?Ne.DOWN:Ne.NONE}function Mo(n,o){let{left:e,right:i,width:t}=n,s=t*Po;return o>=e-s&&o<=e+s?ve.LEFT:o>=i-s&&o<=i+s?ve.RIGHT:ve.NONE}function qa(n,o,e,i,t){let s=Oo(o,t),d=Mo(o,i),m=Ne.NONE,_=ve.NONE;if(s){let T=n.scrollTop;s===Ne.UP?T>0&&(m=Ne.UP):n.scrollHeight-T>n.clientHeight&&(m=Ne.DOWN)}if(d){let T=n.scrollLeft;e==="rtl"?d===ve.RIGHT?T<0&&(_=ve.RIGHT):n.scrollWidth+T>n.clientWidth&&(_=ve.LEFT):d===ve.LEFT?T>0&&(_=ve.LEFT):n.scrollWidth-T>n.clientWidth&&(_=ve.RIGHT)}return[m,_]}var Kt={capture:!0},zi={passive:!1,capture:!0},Ka=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275cmp=S({type:n,selectors:[["ng-component"]],hostAttrs:["cdk-drag-resets-container",""],decls:0,vars:0,template:function(i,t){},styles:[`@layer cdk-resets{.cdk-drag-preview{background:none;border:none;padding:0;color:inherit;inset:auto}}.cdk-drag-placeholder *,.cdk-drag-preview *{pointer-events:none !important}
|
|
2
|
+
`],encapsulation:2,changeDetection:0})}return n})(),Fo=(()=>{class n{_ngZone=f(bt);_document=f(St);_styleLoader=f(Ht);_renderer=f(Pi).createRenderer(null,null);_cleanupDocumentTouchmove;_dropInstances=new Set;_dragInstances=new Set;_activeDragInstances=Lt([]);_globalListeners;_draggingPredicate=e=>e.isDragging();_domNodesToDirectives=null;pointerMove=new B;pointerUp=new B;scroll=new B;constructor(){}registerDropContainer(e){this._dropInstances.has(e)||this._dropInstances.add(e)}registerDragItem(e){this._dragInstances.add(e),this._dragInstances.size===1&&this._ngZone.runOutsideAngular(()=>{this._cleanupDocumentTouchmove?.(),this._cleanupDocumentTouchmove=st(this._renderer,this._document,"touchmove",this._persistentTouchmoveListener,zi)})}removeDropContainer(e){this._dropInstances.delete(e)}removeDragItem(e){this._dragInstances.delete(e),this.stopDragging(e),this._dragInstances.size===0&&this._cleanupDocumentTouchmove?.()}startDragging(e,i){if(!(this._activeDragInstances().indexOf(e)>-1)&&(this._styleLoader.load(Ka),this._activeDragInstances.update(t=>[...t,e]),this._activeDragInstances().length===1)){let t=i.type.startsWith("touch"),s=m=>this.pointerUp.next(m),d=[["scroll",m=>this.scroll.next(m),Kt],["selectstart",this._preventDefaultWhileDragging,zi]];t?d.push(["touchend",s,Kt],["touchcancel",s,Kt]):d.push(["mouseup",s,Kt]),t||d.push(["mousemove",m=>this.pointerMove.next(m),zi]),this._ngZone.runOutsideAngular(()=>{this._globalListeners=d.map(([m,_,T])=>st(this._renderer,this._document,m,_,T))})}}stopDragging(e){this._activeDragInstances.update(i=>{let t=i.indexOf(e);return t>-1?(i.splice(t,1),[...i]):i}),this._activeDragInstances().length===0&&this._clearGlobalListeners()}isDragging(e){return this._activeDragInstances().indexOf(e)>-1}scrolled(e){let i=[this.scroll];return e&&e!==this._document&&i.push(new Ei(t=>this._ngZone.runOutsideAngular(()=>{let s=st(this._renderer,e,"scroll",d=>{this._activeDragInstances().length&&t.next(d)},Kt);return()=>{s()}}))),ze(...i)}registerDirectiveNode(e,i){this._domNodesToDirectives??=new WeakMap,this._domNodesToDirectives.set(e,i)}removeDirectiveNode(e){this._domNodesToDirectives?.delete(e)}getDragDirectiveForNode(e){return this._domNodesToDirectives?.get(e)||null}ngOnDestroy(){this._dragInstances.forEach(e=>this.removeDragItem(e)),this._dropInstances.forEach(e=>this.removeDropContainer(e)),this._domNodesToDirectives=null,this._clearGlobalListeners(),this.pointerMove.complete(),this.pointerUp.complete()}_preventDefaultWhileDragging=e=>{this._activeDragInstances().length>0&&e.preventDefault()};_persistentTouchmoveListener=e=>{this._activeDragInstances().length>0&&(this._activeDragInstances().some(this._draggingPredicate)&&e.preventDefault(),this.pointerMove.next(e))};_clearGlobalListeners(){this._globalListeners?.forEach(e=>e()),this._globalListeners=void 0}static \u0275fac=function(i){return new(i||n)};static \u0275prov=ge({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})(),Za={dragStartThreshold:5,pointerDirectionChangeThreshold:5},Zi=(()=>{class n{_document=f(St);_ngZone=f(bt);_viewportRuler=f(Nn);_dragDropRegistry=f(Fo);_renderer=f(Pi).createRenderer(null,null);constructor(){}createDrag(e,i=Za){return new Hi(e,i,this._document,this._ngZone,this._viewportRuler,this._dragDropRegistry,this._renderer)}createDropList(e){return new ji(e,this._dragDropRegistry,this._document,this._ngZone,this._viewportRuler)}static \u0275fac=function(i){return new(i||n)};static \u0275prov=ge({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})(),xo=new xe("CDK_DRAG_PARENT");var Ya=new xe("CdkDragHandle");var Ro=new xe("CDK_DRAG_CONFIG"),Ao=new xe("CdkDropList"),No=(()=>{class n{element=f(Ze);dropContainer=f(Ao,{optional:!0,skipSelf:!0});_ngZone=f(bt);_viewContainerRef=f(yn);_dir=f(Ut,{optional:!0});_changeDetectorRef=f(Ct);_selfHandle=f(Ya,{optional:!0,self:!0});_parentDrag=f(xo,{optional:!0,skipSelf:!0});_dragDropRegistry=f(Fo);_destroyed=new B;_handles=new We([]);_previewTemplate;_placeholderTemplate;_dragRef;data;lockAxis;rootElementSelector;boundaryElement;dragStartDelay;freeDragPosition;get disabled(){return this._disabled||!!(this.dropContainer&&this.dropContainer.disabled)}set disabled(e){this._disabled=e,this._dragRef.disabled=this._disabled}_disabled;constrainPosition;previewClass;previewContainer;scale=1;started=new j;released=new j;ended=new j;entered=new j;exited=new j;dropped=new j;moved=new Ei(e=>{let i=this._dragRef.moved.pipe(se(t=>({source:this,pointerPosition:t.pointerPosition,event:t.event,delta:t.delta,distance:t.distance}))).subscribe(e);return()=>{i.unsubscribe()}});_injector=f(ti);constructor(){let e=this.dropContainer,i=f(Ro,{optional:!0}),t=f(Zi);this._dragRef=t.createDrag(this.element,{dragStartThreshold:i&&i.dragStartThreshold!=null?i.dragStartThreshold:5,pointerDirectionChangeThreshold:i&&i.pointerDirectionChangeThreshold!=null?i.pointerDirectionChangeThreshold:5,zIndex:i?.zIndex}),this._dragRef.data=this,this._dragDropRegistry.registerDirectiveNode(this.element.nativeElement,this),i&&this._assignDefaults(i),e&&(this._dragRef._withDropContainer(e._dropListRef),e.addItem(this),e._dropListRef.beforeStarted.pipe(Se(this._destroyed)).subscribe(()=>{this._dragRef.scale=this.scale})),this._syncInputs(this._dragRef),this._handleEvents(this._dragRef)}getPlaceholderElement(){return this._dragRef.getPlaceholderElement()}getRootElement(){return this._dragRef.getRootElement()}reset(){this._dragRef.reset()}getFreeDragPosition(){return this._dragRef.getFreeDragPosition()}setFreeDragPosition(e){this._dragRef.setFreeDragPosition(e)}ngAfterViewInit(){ii(()=>{this._updateRootElement(),this._setupHandlesListener(),this._dragRef.scale=this.scale,this.freeDragPosition&&this._dragRef.setFreeDragPosition(this.freeDragPosition)},{injector:this._injector})}ngOnChanges(e){let i=e.rootElementSelector,t=e.freeDragPosition;i&&!i.firstChange&&this._updateRootElement(),this._dragRef.scale=this.scale,t&&!t.firstChange&&this.freeDragPosition&&this._dragRef.setFreeDragPosition(this.freeDragPosition)}ngOnDestroy(){this.dropContainer&&this.dropContainer.removeItem(this),this._dragDropRegistry.removeDirectiveNode(this.element.nativeElement),this._ngZone.runOutsideAngular(()=>{this._handles.complete(),this._destroyed.next(),this._destroyed.complete(),this._dragRef.dispose()})}_addHandle(e){let i=this._handles.getValue();i.push(e),this._handles.next(i)}_removeHandle(e){let i=this._handles.getValue(),t=i.indexOf(e);t>-1&&(i.splice(t,1),this._handles.next(i))}_setPreviewTemplate(e){this._previewTemplate=e}_resetPreviewTemplate(e){e===this._previewTemplate&&(this._previewTemplate=null)}_setPlaceholderTemplate(e){this._placeholderTemplate=e}_resetPlaceholderTemplate(e){e===this._placeholderTemplate&&(this._placeholderTemplate=null)}_updateRootElement(){let e=this.element.nativeElement,i=e;this.rootElementSelector&&(i=e.closest!==void 0?e.closest(this.rootElementSelector):e.parentElement?.closest(this.rootElementSelector)),this._dragRef.withRootElement(i||e)}_getBoundaryElement(){let e=this.boundaryElement;return e?typeof e=="string"?this.element.nativeElement.closest(e):ct(e):null}_syncInputs(e){e.beforeStarted.subscribe(()=>{if(!e.isDragging()){let i=this._dir,t=this.dragStartDelay,s=this._placeholderTemplate?{template:this._placeholderTemplate.templateRef,context:this._placeholderTemplate.data,viewContainer:this._viewContainerRef}:null,d=this._previewTemplate?{template:this._previewTemplate.templateRef,context:this._previewTemplate.data,matchSize:this._previewTemplate.matchSize,viewContainer:this._viewContainerRef}:null;e.disabled=this.disabled,e.lockAxis=this.lockAxis,e.scale=this.scale,e.dragStartDelay=typeof t=="object"&&t?t:Mi(t),e.constrainPosition=this.constrainPosition,e.previewClass=this.previewClass,e.withBoundaryElement(this._getBoundaryElement()).withPlaceholderTemplate(s).withPreviewTemplate(d).withPreviewContainer(this.previewContainer||"global"),i&&e.withDirection(i.value)}}),e.beforeStarted.pipe(hn(1)).subscribe(()=>{if(this._parentDrag){e.withParent(this._parentDrag._dragRef);return}let i=this.element.nativeElement.parentElement;for(;i;){let t=this._dragDropRegistry.getDragDirectiveForNode(i);if(t){e.withParent(t._dragRef);break}i=i.parentElement}})}_handleEvents(e){e.started.subscribe(i=>{this.started.emit({source:this,event:i.event}),this._changeDetectorRef.markForCheck()}),e.released.subscribe(i=>{this.released.emit({source:this,event:i.event})}),e.ended.subscribe(i=>{this.ended.emit({source:this,distance:i.distance,dropPoint:i.dropPoint,event:i.event}),this._changeDetectorRef.markForCheck()}),e.entered.subscribe(i=>{this.entered.emit({container:i.container.data,item:this,currentIndex:i.currentIndex})}),e.exited.subscribe(i=>{this.exited.emit({container:i.container.data,item:this})}),e.dropped.subscribe(i=>{this.dropped.emit({previousIndex:i.previousIndex,currentIndex:i.currentIndex,previousContainer:i.previousContainer.data,container:i.container.data,isPointerOverContainer:i.isPointerOverContainer,item:this,distance:i.distance,dropPoint:i.dropPoint,event:i.event})})}_assignDefaults(e){let{lockAxis:i,dragStartDelay:t,constrainPosition:s,previewClass:d,boundaryElement:m,draggingDisabled:_,rootElementSelector:T,previewContainer:N}=e;this.disabled=_??!1,this.dragStartDelay=t||0,i&&(this.lockAxis=i),s&&(this.constrainPosition=s),d&&(this.previewClass=d),m&&(this.boundaryElement=m),T&&(this.rootElementSelector=T),N&&(this.previewContainer=N)}_setupHandlesListener(){this._handles.pipe(ie(e=>{let i=e.map(t=>t.element);this._selfHandle&&this.rootElementSelector&&i.push(this.element),this._dragRef.withHandles(i)}),Q(e=>ze(...e.map(i=>i._stateChanges.pipe(mt(i))))),Se(this._destroyed)).subscribe(e=>{let i=this._dragRef,t=e.element.nativeElement;e.disabled?i.disableHandle(t):i.enableHandle(t)})}static \u0275fac=function(i){return new(i||n)};static \u0275dir=it({type:n,selectors:[["","cdkDrag",""]],hostAttrs:[1,"cdk-drag"],hostVars:4,hostBindings:function(i,t){i&2&&nt("cdk-drag-disabled",t.disabled)("cdk-drag-dragging",t._dragRef.isDragging())},inputs:{data:[0,"cdkDragData","data"],lockAxis:[0,"cdkDragLockAxis","lockAxis"],rootElementSelector:[0,"cdkDragRootElement","rootElementSelector"],boundaryElement:[0,"cdkDragBoundary","boundaryElement"],dragStartDelay:[0,"cdkDragStartDelay","dragStartDelay"],freeDragPosition:[0,"cdkDragFreeDragPosition","freeDragPosition"],disabled:[2,"cdkDragDisabled","disabled",ue],constrainPosition:[0,"cdkDragConstrainPosition","constrainPosition"],previewClass:[0,"cdkDragPreviewClass","previewClass"],previewContainer:[0,"cdkDragPreviewContainer","previewContainer"],scale:[2,"cdkDragScale","scale",Vt]},outputs:{started:"cdkDragStarted",released:"cdkDragReleased",ended:"cdkDragEnded",entered:"cdkDragEntered",exited:"cdkDragExited",dropped:"cdkDragDropped",moved:"cdkDragMoved"},exportAs:["cdkDrag"],features:[he([{provide:xo,useExisting:n}]),J]})}return n})(),Do=new xe("CdkDropListGroup");var Lo=(()=>{class n{element=f(Ze);_changeDetectorRef=f(Ct);_scrollDispatcher=f(An);_dir=f(Ut,{optional:!0});_group=f(Do,{optional:!0,skipSelf:!0});_latestSortedRefs;_destroyed=new B;_scrollableParentsResolved;static _dropLists=[];_dropListRef;connectedTo=[];data;orientation;id=f(jt).getId("cdk-drop-list-");lockAxis;get disabled(){return this._disabled||!!this._group&&this._group.disabled}set disabled(e){this._dropListRef.disabled=this._disabled=e}_disabled;sortingDisabled;enterPredicate=()=>!0;sortPredicate=()=>!0;autoScrollDisabled;autoScrollStep;elementContainerSelector;dropped=new j;entered=new j;exited=new j;sorted=new j;_unsortedItems=new Set;constructor(){let e=f(Zi),i=f(Ro,{optional:!0});this._dropListRef=e.createDropList(this.element),this._dropListRef.data=this,i&&this._assignDefaults(i),this._dropListRef.enterPredicate=(t,s)=>this.enterPredicate(t.data,s.data),this._dropListRef.sortPredicate=(t,s,d)=>this.sortPredicate(t,s.data,d.data),this._setupInputSyncSubscription(this._dropListRef),this._handleEvents(this._dropListRef),n._dropLists.push(this),this._group&&this._group._items.add(this)}addItem(e){this._unsortedItems.add(e),this._dropListRef.isDragging()&&this._syncItemsWithRef(this.getSortedItems().map(i=>i._dragRef))}removeItem(e){if(this._unsortedItems.delete(e),this._latestSortedRefs){let i=this._latestSortedRefs.indexOf(e._dragRef);i>-1&&(this._latestSortedRefs.splice(i,1),this._syncItemsWithRef(this._latestSortedRefs))}}getSortedItems(){return Array.from(this._unsortedItems).sort((e,i)=>e._dragRef.getVisibleElement().compareDocumentPosition(i._dragRef.getVisibleElement())&Node.DOCUMENT_POSITION_FOLLOWING?-1:1)}ngOnDestroy(){let e=n._dropLists.indexOf(this);e>-1&&n._dropLists.splice(e,1),this._group&&this._group._items.delete(this),this._latestSortedRefs=void 0,this._unsortedItems.clear(),this._dropListRef.dispose(),this._destroyed.next(),this._destroyed.complete()}_setupInputSyncSubscription(e){this._dir&&this._dir.change.pipe(mt(this._dir.value),Se(this._destroyed)).subscribe(i=>e.withDirection(i)),e.beforeStarted.subscribe(()=>{let i=Rn(this.connectedTo).map(t=>{if(typeof t=="string"){let s=n._dropLists.find(d=>d.id===t);return s}return t});if(this._group&&this._group._items.forEach(t=>{i.indexOf(t)===-1&&i.push(t)}),!this._scrollableParentsResolved){let t=this._scrollDispatcher.getAncestorScrollContainers(this.element).map(s=>s.getElementRef().nativeElement);this._dropListRef.withScrollableParents(t),this._scrollableParentsResolved=!0}if(this.elementContainerSelector){let t=this.element.nativeElement.querySelector(this.elementContainerSelector);e.withElementContainer(t)}e.disabled=this.disabled,e.lockAxis=this.lockAxis,e.sortingDisabled=this.sortingDisabled,e.autoScrollDisabled=this.autoScrollDisabled,e.autoScrollStep=Mi(this.autoScrollStep,2),e.connectedTo(i.filter(t=>t&&t!==this).map(t=>t._dropListRef)).withOrientation(this.orientation)})}_handleEvents(e){e.beforeStarted.subscribe(()=>{this._syncItemsWithRef(this.getSortedItems().map(i=>i._dragRef)),this._changeDetectorRef.markForCheck()}),e.entered.subscribe(i=>{this.entered.emit({container:this,item:i.item.data,currentIndex:i.currentIndex})}),e.exited.subscribe(i=>{this.exited.emit({container:this,item:i.item.data}),this._changeDetectorRef.markForCheck()}),e.sorted.subscribe(i=>{this.sorted.emit({previousIndex:i.previousIndex,currentIndex:i.currentIndex,container:this,item:i.item.data})}),e.dropped.subscribe(i=>{this.dropped.emit({previousIndex:i.previousIndex,currentIndex:i.currentIndex,previousContainer:i.previousContainer.data,container:i.container.data,item:i.item.data,isPointerOverContainer:i.isPointerOverContainer,distance:i.distance,dropPoint:i.dropPoint,event:i.event}),this._changeDetectorRef.markForCheck()}),ze(e.receivingStarted,e.receivingStopped).subscribe(()=>this._changeDetectorRef.markForCheck())}_assignDefaults(e){let{lockAxis:i,draggingDisabled:t,sortingDisabled:s,listAutoScrollDisabled:d,listOrientation:m}=e;this.disabled=t??!1,this.sortingDisabled=s??!1,this.autoScrollDisabled=d??!1,this.orientation=m||"vertical",i&&(this.lockAxis=i)}_syncItemsWithRef(e){this._latestSortedRefs=e,this._dropListRef.withItems(e)}static \u0275fac=function(i){return new(i||n)};static \u0275dir=it({type:n,selectors:[["","cdkDropList",""],["cdk-drop-list"]],hostAttrs:[1,"cdk-drop-list"],hostVars:7,hostBindings:function(i,t){i&2&&(we("id",t.id),nt("cdk-drop-list-disabled",t.disabled)("cdk-drop-list-dragging",t._dropListRef.isDragging())("cdk-drop-list-receiving",t._dropListRef.isReceiving()))},inputs:{connectedTo:[0,"cdkDropListConnectedTo","connectedTo"],data:[0,"cdkDropListData","data"],orientation:[0,"cdkDropListOrientation","orientation"],id:"id",lockAxis:[0,"cdkDropListLockAxis","lockAxis"],disabled:[2,"cdkDropListDisabled","disabled",ue],sortingDisabled:[2,"cdkDropListSortingDisabled","sortingDisabled",ue],enterPredicate:[0,"cdkDropListEnterPredicate","enterPredicate"],sortPredicate:[0,"cdkDropListSortPredicate","sortPredicate"],autoScrollDisabled:[2,"cdkDropListAutoScrollDisabled","autoScrollDisabled",ue],autoScrollStep:[0,"cdkDropListAutoScrollStep","autoScrollStep"],elementContainerSelector:[0,"cdkDropListElementContainer","elementContainerSelector"]},outputs:{dropped:"cdkDropListDropped",entered:"cdkDropListEntered",exited:"cdkDropListExited",sorted:"cdkDropListSorted"},exportAs:["cdkDropList"],features:[he([{provide:Do,useValue:void 0},{provide:Ao,useExisting:n}])]})}return n})();var Wo=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275mod=tt({type:n});static \u0275inj=et({providers:[Zi],imports:[Ln]})}return n})();var Pt=(()=>{class n{transform(e){let i=!1;if(e){let t=new Date(e);i=F.isDateExpired(t)}return i}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275pipe=bn({name:"expiredTime",type:n,pure:!0})}}return n})();var $a=n=>[n],Ot=n=>({"bg-gradient-warning":n}),Vo=()=>["/menu/channel/marketplace/view"],zo=n=>({ID:n}),Ho=(n,o)=>({"text-danger":n,"text-success":o});function er(n,o){if(n&1&&(a(0,"span",17),g(1,"img",18),r(),c(2)),n&2){let e=o.item;l(),p("src",e.Logo,ht)("alt",e.Value),l(),M(" ",e.Value," ")}}function tr(n,o){n&1&&(k(0),a(1,"a",20),c(2,"Add"),r(),E())}function ir(n,o){if(n&1&&u(0,tr,3,0,"ng-container",19),n&2){let e=h();p("ngxPermissionsOnly",y(1,$a,e.roleChannelAdd))}}function nr(n,o){if(n&1){let e=A();k(0),a(1,"button",21),C("click",function(){x(e);let t=h();return D(t.onSaveDragAndDrop())}),g(2,"i",22),c(3,"Save Changes "),r(),E()}}function or(n,o){if(n&1){let e=A();a(0,"button",23),C("click",function(){x(e);let t=h();return D(t.cdkDragDisabled=!t.cdkDragDisabled)}),g(1,"i",22),c(2,"Sort "),r()}}function ar(n,o){if(n&1){let e=A();k(0),a(1,"div",42),C("click",function(){x(e);let t=h().$implicit,s=h();return D(s.onAuthorizeChannel(t))}),a(2,"span"),c(3," NOT AUTHORIZED "),r(),g(4,"i",43),r(),E()}}function rr(n,o){if(n&1&&(a(0,"div",34)(1,"span",17),c(2,"Shop Expiration:"),r(),a(3,"span",44),P(4,"expiredTime"),P(5,"expiredTime"),c(6),P(7,"date"),r()()),n&2){let e=h().$implicit;l(3),p("ngClass",ne(10,Ho,G(4,3,e==null?null:e.ExpiredTime),!G(5,5,e==null?null:e.ExpiredTime)))("matTooltip","The expiry date for "+e.Name+" Open API authorization from your account "+e.Name+" to Dealpos"),l(3),M(" ",ce(7,7,e==null?null:e.ExpiredTime,"dd MMM yyyy")," ")}}function lr(n,o){if(n&1&&(a(0,"div",34)(1,"span",17),c(2,"Access Token Expiration:"),r(),a(3,"span",44),P(4,"expiredTime"),P(5,"expiredTime"),c(6),P(7,"date"),r()()),n&2){let e=h().$implicit;l(3),p("ngClass",ne(10,Ho,G(4,3,e==null?null:e.TokenExpired),!G(5,5,e==null?null:e.TokenExpired)))("matTooltip",e.tokenExpiredMsg),l(3),v(ce(7,7,e.TokenExpired,"dd MMM yyyy HH:mm"))}}function sr(n,o){if(n&1&&(a(0,"div")(1,"span"),c(2),r()()),n&2){let e=h().$implicit;l(2),M("[ ",e==null?null:e.TotalMultiwarehouse," Warehouse Registered ]")}}function cr(n,o){if(n&1&&(a(0,"span",46)(1,"button",47),c(2),r()()),n&2){let e=h(2).$implicit,i=h();p("matTooltip",i.filterProductInventory(e.POSInventoryOutletArray,4,e.POSInventoryOutletArray.length)),l(2),M(" ",e.POSInventoryOutletArray.length-3," ")}}function dr(n,o){if(n&1&&(a(0,"span",35),c(1),u(2,cr,3,2,"span",45),r()),n&2){let e=h().$implicit,i=h();l(),M(" ",i.filterProductInventory(e.POSInventoryOutletArray,1,3)," "),l(),p("ngIf",e.POSInventoryOutletArray.length>3)}}function pr(n,o){n&1&&(a(0,"span",35),c(1," [SUM All Outlet] "),r())}function mr(n,o){if(n&1&&(a(0,"div",34),c(1," Additional Item: "),a(2,"span",35),c(3),r()()),n&2){let e=h().$implicit;l(3),M(" ",e==null?null:e.Additionalitem,"")}}function hr(n,o){if(n&1){let e=A();a(0,"tr",24)(1,"td",25)(2,"div",26)(3,"div",27)(4,"a",28),g(5,"img",29),r()(),a(6,"div",30)(7,"div")(8,"a",28)(9,"span",31),c(10),r()()(),a(11,"div")(12,"span"),c(13),r()(),u(14,ar,5,0,"ng-container",32),r()()(),a(15,"td",33)(16,"div",34)(17,"span",17),c(18,"Sync Orders:"),r(),a(19,"span",35),c(20),r()(),a(21,"div",34)(22,"span",17),c(23,"Product Sync:"),r(),a(24,"span",35),c(25),P(26,"date"),r()(),u(27,rr,8,13,"div",34)(28,lr,8,13,"div",34)(29,sr,3,1,"div"),r(),a(30,"td",33)(31,"div",36),c(32," New Order To: "),a(33,"span",35),c(34),r()(),a(35,"div",36),c(36," Dispatch Orders From: "),a(37,"span",35),c(38),r()(),a(39,"div",37),c(40," Product Inventory: "),u(41,dr,3,2,"span",38)(42,pr,2,0,"ng-template",null,1,ot),r(),a(44,"div",34),c(45," Minimum Inventory: "),a(46,"span",35),c(47),r()(),u(48,mr,4,1,"div",39),r(),a(49,"td",33)(50,"div",40)(51,"div",36),c(52," Payment: "),a(53,"span",35),c(54),r()(),a(55,"div",36),c(56," Tag: "),a(57,"span",35),c(58),r()(),a(59,"div",36),c(60," Tax : "),a(61,"span",35),c(62),r()()()(),a(63,"td")(64,"button",41),C("click",function(){let t=x(e).$implicit,s=h();return D(s.onTestChannel(t))}),c(65," Test "),r()()()}if(n&2){let e=o.$implicit,i=Be(43),t=h();p("cdkDragDisabled",t.cdkDragDisabled)("matTooltip",e!=null&&e.isComplete?"":"Please complete your channel configuration"),l(),p("ngClass",y(34,Ot,t.isEmpty(e==null?null:e.isComplete))),l(3),p("routerLink",Wt(36,Vo))("queryParams",y(37,zo,e.ID)),l(),p("src",e.logo,ht),l(3),p("routerLink",Wt(39,Vo))("queryParams",y(40,zo,e.ID)),l(2),v(e==null?null:e.Name),l(3),v(e==null?null:e.URL),l(),p("ngIf",e.Authorized==!1),l(6),v(e==null?null:e.SyncOrder),l(5),v(e!=null&&e.LastSync?ce(26,31,e==null?null:e.LastSync,"dd MMM yyyy HH:mm"):"Never"),l(2),b(e.TypeID!=t.channelType.Tiktok&&(e!=null&&e.ExpiredTime)?27:-1),l(),b(e!=null&&e.TokenExpired?28:-1),l(),b(e.MultiWarehouse&&(e==null?null:e.TotalMultiwarehouse)>0?29:-1),l(2),p("ngClass",y(42,Ot,t.isEmpty(e==null?null:e.POSOutlet))),l(3),M(" ",e==null?null:e.POSOutlet,""),l(),p("ngClass",y(44,Ot,t.isEmpty(e==null?null:e.POSDeliveryOutlet))),l(3),M(" ",e==null?null:e.POSDeliveryOutlet,""),l(3),p("ngIf",e==null?null:e.POSInventoryOutlet)("ngIfElse",i),l(6),M(" ",e==null?null:e.MinimumInventory,""),l(),p("ngIf",e==null?null:e.Additionalitem),l(3),p("ngClass",y(46,Ot,t.isEmpty(e==null?null:e.POSInvoicePaymentMethod))),l(3),v(e==null?null:e.POSInvoicePaymentMethod),l(),p("ngClass",y(48,Ot,t.isEmpty(e==null?null:e.POSSalesOrderType))),l(3),M(" ",e==null?null:e.POSSalesOrderType,""),l(),p("ngClass",y(50,Ot,t.isEmpty(e==null?null:e.POSTax))),l(3),v(e!=null&&e.POSTax?e==null?null:e.POSTax:"-"),l(2),p("hidden",(e==null?null:e.TypeID)==t.channelType.KalCare)}}var Uo=(()=>{class n{constructor(e,i,t){this.toastr=e,this.channelService=i,this.dialog=t,this.roleChannelAdd=ft.ChannelAdd,this.pagination={PageSize:20,PageNumber:1},this.hasClickedRowCount=!1,this.channelType=w,this.channelLoader(),this.pageData={Title:"Channel",Nav:[{Title:"Channel",Url:"/menu/channel",Active:!0},{Title:"POS",Url:"/menu/channel/config",Active:!1}]},this.cdkDragDisabled=!0}channelLoader(){this.channelService.getChannelLoader().subscribe(e=>{this.channelOptions=this.mappingChannelOptionLogo(e.Options),this.getChannels()})}onFilter(e){this.hasClickedRowCount=!1,this.getChannels(e)}getChannels(e){this.pageFilter={TypeID:this.channelTypeID,Text:e,RowCount:this.pagination.PageSize,PageNumber:this.pagination.PageNumber},this.channelService.getChannel(this.pageFilter).subscribe(i=>{this.channels=F.assignChannelLogo(i.Data),this.showWarningChannel(i?.ChannelNotUnique),this.checkFieldComplete(),this.mappingTokenExpiredMsg()})}mappingTokenExpiredMsg(){this.channels=this.channels.map(e=>(e.tokenExpiredMsg=this.generateTokenExpiryMessage(e),e=this.mappingIsExpiredDate(e),e))}mappingIsExpiredDate(e){if(F.IsNotEmpty(e.TokenExpired)){let i=new Date(e.TokenExpired);e.isTokenExpired=F.isDateExpired(i)}if(F.IsNotEmpty(e.ExpiredTime)){let i=new Date(e.ExpiredTime);e.isShopExpired=F.isDateExpired(i)}return e}getRowCount(){this.totalRowCount$=this.channelService.getChannelRowCount(this.pageFilter).pipe(ie(()=>this.hasClickedRowCount=!0),Ce(1))}onAuthorizeChannel(e){this.channelService.authorizedChannel(e.TypeID).subscribe()}showWarningChannel(e=[]){e.length>0&&this.isUniqueChannel(e)==!1&&this.dialog.open(lo,{data:{channels:e}})}isUniqueChannel(e){let i=0;return e.forEach((t,s,d)=>{d.forEach(m=>{t.Value.Out==m.Value.Out&&t.Value.Tg==m.Value.Tg&&t.Key.TypeID!==m.Key.TypeID&&(i+=1)})}),i==0}checkFieldComplete(){this.channels=this.channels.map(e=>(e.isComplete=!1,F.IsNotEmpty(e.POSOutlet)&&F.IsNotEmpty(e.POSTax)&&F.IsNotEmpty(e.POSInvoicePaymentMethod)&&F.IsNotEmpty(e.POSSalesOrderType)&&F.IsNotEmpty(e.POSDeliveryOutlet)&&(e.isComplete=!0),e))}isEmpty(e){return F.IsEmpty(e)}onTestChannel(e){this.channelService.testShopID(e).subscribe({next:i=>{this.getChannels()},error:i=>{this.getChannels()}})}onDeleteChannel(e){confirm("Want to delete?")&&this.channelService.deleteChannel(e).subscribe(t=>{this.getChannels()})}onDrop(e){_i(this.channels,e.previousIndex,e.currentIndex)}onSaveDragAndDrop(){this.cdkDragDisabled=!0,this.channelService.updateChannelIndex(this.channels).subscribe({next:()=>{this.toastr.success("Channel list successfully saved","Success")}})}filterProductInventory(e,i,t){let s=e;return s=s.filter((m,_)=>(_+=1,_>=i&&_<=t)),s.join(", ")}mappingChannelOptionLogo(e){return e=e.map(i=>{let t=parseInt(i.Key);return i.Logo=F.getChannelLogoByTypeId(t),i}),e}generateTokenExpiryMessage(e){let i="";switch(e.TypeID){case w.Shopee:i="The expiry date for a token to call API to channel (automatically update every 4 hours)";break;case w.Lazada:i="The expiry date for a token to call API to channel (automatically update every 1 Month)";break;case w.Tiktok:i="The expiry date for a token to call API to channel (automatically update every 3 Days)";break}return i}static{this.\u0275fac=function(i){return new(i||n)(V(ae),V(Re),V(xt))}}static{this.\u0275cmp=S({type:n,selectors:[["app-marketplace"]],standalone:!1,decls:35,vars:14,consts:[["SORT_BTN",""],["SUM_Outlet",""],["headerTitle","Channel",3,"onSubmit","pageData"],[1,"fw-bold","mb-2"],["bindLabel","Value","name","TypeID","bindValue","Key","placeholder","Select Channel","appendTo","body",1,"center-text",3,"ngModelChange","clearable","items","ngModel"],["ng-option-tmp","","ng-label-tmp",""],[4,"ngIf","ngIfElse"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"table-responsive"],[1,"table","table-hover"],[1,"table-light"],["cdkDropList","",3,"cdkDropListDropped"],["cdkDrag","",3,"cdkDragDisabled","matTooltip",4,"ngFor","ngForOf"],[1,"col-12"],[3,"filterChange","total","next","previous","filter","totaldata","paginationTotal","hasClicked"],[1,"me-2"],[2,"width","18px",3,"src","alt"],[4,"ngxPermissionsOnly"],["role","button","routerLink","/menu/channel/marketplace/add",1,"btn","btn-success","btn-fill","btn-lg","text-white"],["title","Drag and drop the rows of the table below to the order you want then click Save",1,"btn","btn-success","btn-fill","btn-lg","me-3",2,"float","left",3,"click"],[1,"fa","fa-arrows-alt-v","me-3"],["title","Drag and drop the rows of the table below to the order you want then click Save",1,"btn","btn-outline-secondary","btn-lg","me-3",2,"float","left",3,"click"],["cdkDrag","",3,"cdkDragDisabled","matTooltip"],[3,"ngClass"],[1,"d-flex","align-items-center","h-100"],[1,"mx-6"],[3,"routerLink","queryParams"],[2,"width","30px",3,"src"],[1,"lh-base"],[2,"font-size","16px"],[4,"ngIf"],[1,"vertical-align-top",2,"font-size","12px"],[1,"mb-3"],[2,"color","blue"],[1,"mb-3",3,"ngClass"],[1,"mb-3","d-flex","align-items-center"],["style","color: blue",4,"ngIf","ngIfElse"],["class","mb-3",4,"ngIf"],[1,"d-inline-block","align-items-start"],[1,"btn","btn-outline-success","mb-3","ms-2","btn-sm",3,"click","hidden"],["role","button",1,"alert","alert-danger","d-inline-block","px-3","py-1","text-start","mt-2","fw-bold","cursor-pointer",2,"margin-bottom","0px !important",3,"click"],[1,"fa-regular","fa-clock","ms-2"],["matTooltipPosition","above",3,"ngClass","matTooltip"],["class","cursor-pointer",3,"matTooltip",4,"ngIf"],[1,"cursor-pointer",3,"matTooltip"],["type","button",1,"btn","btn-circle","btn-sm"]],template:function(i,t){if(i&1){let s=A();a(0,"mainpanel",2),C("onSubmit",function(m){return x(s),D(t.onFilter(m))}),a(1,"filters")(2,"div")(3,"label",3),c(4,"Channel"),r(),a(5,"ng-select",4),C("ngModelChange",function(m){return x(s),D(t.channelTypeID=m)}),u(6,er,3,3,"ng-template",5),r()()(),a(7,"actions"),u(8,ir,1,3,"ng-container")(9,nr,4,0,"ng-container",6)(10,or,3,0,"ng-template",null,0,ot),r(),a(12,"content")(13,"div",7)(14,"div",8)(15,"div",9)(16,"div",10)(17,"table",11)(18,"thead")(19,"tr",12)(20,"th"),c(21,"Channel"),r(),a(22,"th"),c(23,"Sync Info"),r(),a(24,"th"),c(25,"POS Outlet"),r(),a(26,"th"),c(27,"POS Orders"),r(),g(28,"th"),r()(),a(29,"tbody",13),C("cdkDropListDropped",function(m){return x(s),D(t.onDrop(m))}),u(30,hr,66,52,"tr",14),r()()()()(),a(31,"div",8)(32,"div",15)(33,"app-custom-paginator",16),P(34,"async"),me("filterChange",function(m){return x(s),pe(t.pagination,m)||(t.pagination=m),D(m)}),C("total",function(){return x(s),D(t.getRowCount())})("next",function(){return x(s),D(t.getChannels())})("previous",function(){return x(s),D(t.getChannels())}),r()()()()()()}if(i&2){let s=Be(11);p("pageData",t.pageData),l(5),p("clearable",!0)("items",t.channelOptions)("ngModel",t.channelTypeID),l(3),b(t.cdkDragDisabled?8:-1),l(),p("ngIf",!t.cdkDragDisabled)("ngIfElse",s),l(21),p("ngForOf",t.channels),l(3),de("filter",t.pagination),p("totaldata",t.channels==null?null:t.channels.length)("paginationTotal",G(34,12,t.totalRowCount$))("hasClicked",t.hasClickedRowCount)}},dependencies:[L,fe,z,H,wt,Fe,Me,kn,En,Pe,Lo,No,R,It,di,_e,He,Pt],styles:[".btn-circle.btn-sm[_ngcontent-%COMP%]{width:18px;height:18px;padding:0;border-radius:60px;font-size:10px;text-align:center;background-color:#00f;border-color:#00f;color:#fff}table[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] > td.vertical-align-top[_ngcontent-%COMP%]{vertical-align:inherit}"]})}}return n})();var le=class{constructor(){this.ID="00000000-0000-0000-0000-000000000000",this.ShopID=0,this.Name="",this.TypeID=0,this.LastProductSync=new Date,this.POSOutlet="",this.POSOutletID="00000000-0000-0000-0000-000000000000",this.POSTax="",this.POSInvoicePaymentMethod="",this.POSSalesOrderType="",this.URL="",this.POSDeliveryOutlet="",this.ProductCategoryDefault=null,this.SyncOrder=!0,this.CustomerDefaultEmail=null,this.InventoryLog=2,this.IsComplete=!1,this.OrderLog=3,this.SyncInventory=!0,this.POSInventoryOutlet="",this.POSWriteOff="",this.Register="",this.POSInventoryOutletArray=[],this.MinimumInventory="",this.Additionalitem="",this.ConsumerKey="",this.ConsumerSecret="",this.ShopIDString="",this.Index=0,this.ServiceFeeWriteOffReason="",this.ServiceFeeWriteOff=!1,this.Brand="",this.ShippingFee="",this.ReturnProcess=!1,this.WarehouseID="",this.PaymentSyncTypeID=2}};var q=(()=>{class n{get mainForm(){return this._mainForm}get channel(){return this._channel}constructor(){this.formBuilder=f(Dn),this.http=f(ye),this._channel=new le,this._selectedWarehouse=Lt([]),this._mainForm=this.formBuilder.group({setup:this.formBuilder.group({Name:[null,[K.required]],TypeID:[null],ShopID:[null],ShopIDString:[null],URL:[null],MultiWarehouse:[!1]}),sync:this.formBuilder.group({SyncOrder:[!1],SyncInventory:[!1],UnpaidOrder:[!1],NewOrderSyncTypeID:[null],CancelledOrderSyncTypeID:[null]}),outlet:this.formBuilder.group({POSOutlet:[null],POSOutletID:[null,[K.required]],POSDeliveryOutlet:[null,[K.required]],POSInventoryOutletArray:[null]}),orders:this.formBuilder.group({POSInvoicePaymentMethod:[null,[K.required]],POSTax:[null,[K.required]],POSSalesOrderType:[null,[K.required]]}),invoiceFee:this.formBuilder.group({ServiceFeeWriteOff:[null],ServiceFeeWriteOffReason:[null,[K.required]],PaymentSyncTypeID:[null]}),advanced:this.formBuilder.group({Register:[null],MinimumInventory:[null,[K.required]],Additionalitem:[[]],IgnoreReverseOrder:[null],SizeChart:[null],ShippingFee:[null],FulfillmentWebhookHandling:[1],ReturnProcess:[!1],WarehouseID:[null],PricebookID:[null]}),default:this.formBuilder.group({CustomerDefaultEmail:[null,[K.email]],DefaultCategoryID:[null],Brand:[null],ScanProductSize:[0]}),authorized:this.formBuilder.group({ConsumerKey:[{value:null,disabled:!0}],ConsumerSecret:[{value:null,disabled:!0}],TokenLog:[null]}),webhook:this.formBuilder.control({init:!1,data:[]})})}initFormValue(e,i){this._channel=e;let t=e.POSOutletID;if(!t||t==="00000000-0000-0000-0000-000000000000"){let s=i?.ListOutlet.find(d=>d.Name===e.POSOutlet);s&&(t=s.ID)}this._mainForm.patchValue({setup:{Name:e.Name,TypeID:e.TypeID,ShopID:e.ShopID,ShopIDString:e.ShopIDString,URL:e.URL,MultiWarehouse:e.MultiWarehouse},sync:{SyncOrder:e.SyncOrder,SyncInventory:e.SyncInventory,UnpaidOrder:e.UnpaidOrder,NewOrderSyncTypeID:e.NewOrderSyncTypeID,CancelledOrderSyncTypeID:e.CancelledOrderSyncTypeID},outlet:{POSOutlet:e.POSOutlet,POSOutletID:t??null,POSDeliveryOutlet:e.POSDeliveryOutlet,POSInventoryOutletArray:e.POSInventoryOutletArray},orders:{POSInvoicePaymentMethod:e.POSInvoicePaymentMethod,POSTax:e.POSTax,POSSalesOrderType:e.POSSalesOrderType},invoiceFee:{ServiceFeeWriteOff:e.ServiceFeeWriteOff,ServiceFeeWriteOffReason:e.ServiceFeeWriteOffReason,PaymentSyncTypeID:e.PaymentSyncTypeID},advanced:{Register:e.Register,MinimumInventory:e.MinimumInventory,Additionalitem:e?.Additionalitem?.split(","),IgnoreReverseOrder:e.IgnoreReverseOrder,SizeChart:e.SizeChart,ShippingFee:e.ShippingFee,FulfillmentWebhookHandling:e.FulfillmentWebhookHandling,ReturnProcess:e.ReturnProcess,WarehouseID:e.WarehouseID,PricebookID:e.PricebookID},default:{CustomerDefaultEmail:e.CustomerDefaultEmail,DefaultCategoryID:e.DefaultCategoryID,Brand:e.Brand},authorized:{ConsumerKey:e.ConsumerKey,ConsumerSecret:e.ConsumerSecret,TokenLog:e.TokenLog}})}getLoadForm$(e){return this.http.post("/api/ChannelLoader/GetPOSProperties",{ID:e}).pipe(ie(i=>{this.initFormValue(i.Model,i.Options),this.setWriteOffReasonValidators(i.Model?.ServiceFeeWriteOff),this.addGroupByWarehouseLocation(i.Model?.WarehouseLocations)}))}setWriteOffReasonValidators(e){e?this._mainForm.get("invoiceFee.ServiceFeeWriteOffReason").setValidators([K.required]):this._mainForm.get("invoiceFee.ServiceFeeWriteOffReason").clearValidators(),this._mainForm.get("invoiceFee.ServiceFeeWriteOffReason")?.updateValueAndValidity()}addGroupByWarehouseLocation(e){let i=this.formBuilder.group({});e.forEach(t=>{i.addControl(t.Name,new zt(t.ProductInventoryOutlet,[K.required]))}),this._selectedWarehouse.set(e),this._mainForm.setControl("warehouse",i)}getFormValue(){let e=this._mainForm.getRawValue();e.advanced.Additionalitem=this.toStringAdditionalItem(),e.outlet.POSInventoryOutlet=this.toStringInventoryOutlet();let i=this.mapWarehouseLocation(),t=Object.keys(e),s={};return t.forEach(d=>{s=Ke(Ke({},s),e[d])}),this._channel=dn(Ke(Ke({},this._channel),s),{WarehouseLocations:i}),this._channel}getWebhooks(){return this._mainForm.value?.webhook}mapWarehouseLocation(){let e=this._mainForm.value,i=[],t=this._selectedWarehouse(),s=e?.warehouse;return s&&Object.keys(s)?.forEach(d=>{let m=t.find(_=>_.Name===d);F.IsNotEmpty(m)&&(m.ProductInventoryOutlet=s[d],i.push(m))}),i}toStringAdditionalItem(){let i=this._mainForm.value?.advanced?.Additionalitem,t="";return typeof i=="object"?t=i.join(","):t=i,t}toStringInventoryOutlet(){let i=this._mainForm.value?.outlet?.POSInventoryOutletArray,t="";return F.IsNotEmpty(i)&&i.length>0?t=i.join(","):t=null,t}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275prov=ge({token:n,factory:n.\u0275fac})}}return n})();var Ye=(()=>{class n{constructor(){this.httpService=f(ye),this._webhooksOptions=new We({data:[],isFirstLoad:!1}),this.webhooksOptions$=this._webhooksOptions.asObservable(),this._webhooks=new We({data:[],isFirstLoad:!1}),this.webhooks$=this._webhooks.asObservable()}getWebhookList(e){let i="/api/webhook/ListShopify";return this.webhooks$.pipe(Q(t=>t.isFirstLoad?Ve(t.data):this.httpService.get(i,[{key:"ID",value:e}]).pipe(ie(s=>{this._webhooks.next({data:s,isFirstLoad:!0})}))))}getOptions(){let e="/api/webhook/OptionShopify";return this.webhooksOptions$.pipe(Q(i=>i.isFirstLoad?Ve(i.data):this.httpService.get(e).pipe(ie(t=>{this._webhooksOptions.next({data:t,isFirstLoad:!0})}))))}getWebhookWithState(e){return this.getWebhookList(e).pipe(ei(i=>this.getOptions().pipe(se(t=>this.mappingEnabledWebhook(i,t)))),Ce(1))}mappingEnabledWebhook(e,i){return i.map(t=>(e.find(d=>d.topic===t.topic)?t.enabled=!0:t.enabled=!1,t.addressWithoutHost=this.hideWebhookPath(t.address),Ke({},t)))}hideWebhookPath(e){let i=new URL(e);return i.href.replace(i.host,"*")}updateWebhook(e,i){return this.httpService.post("/api/webhook/AddShopify",{ChannelID:e,Webhook:i})}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275prov=ge({token:n,factory:n.\u0275fac})}}return n})();var Qe=(()=>{class n{constructor(){this.httpService=f(ye),this._webhooksOptions=new We({data:[],isFirstLoad:!1}),this.webhooksOptions$=this._webhooksOptions.asObservable(),this._webhooks=new We({data:[],isFirstLoad:!1}),this.webhooks$=this._webhooks.asObservable()}getWebhookList(e){let i="/api/webhook/ListWoo";return this._webhooks.pipe(Q(t=>t.isFirstLoad?Ve(t.data):this.httpService.get(i,[{key:"ID",value:e}]).pipe(ie(s=>{this._webhooks.next({data:s,isFirstLoad:!0})}))))}getOptions(){let e="/api/webhook/OptionWoo";return this.webhooksOptions$.pipe(Q(i=>i.isFirstLoad?Ve(i.data):this.httpService.get(e).pipe(ie(t=>{this._webhooksOptions.next({data:t,isFirstLoad:!0})}))))}getWebhookWithState(e){return this.getWebhookList(e).pipe(ei(i=>this.getOptions().pipe(se(t=>this.mappingEnabledWebhook(i,t)))),Ce(1))}mappingEnabledWebhook(e,i){return i.map(t=>(t.address=t.delivery_url,e.find(d=>d.topic===t.topic)?t.enabled=!0:t.enabled=!1,t.addressWithoutHost=this.hideWebhookPath(t.address),Ke({},t)))}hideWebhookPath(e){let i=new URL(e);return i.href.replace(i.host,"*")}updateWebhook(e,i){return this.httpService.post("/api/webhook/AddWoo",{ChannelID:e,Webhook:i})}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275prov=ge({token:n,factory:n.\u0275fac})}}return n})();var jo=(n,o)=>({"is-invalid":n,"bg-gradient-warning":o});function ur(n,o){n&1&&(a(0,"div",9),c(1," Outlet is required! "),r())}function fr(n,o){n&1&&(a(0,"div",13)(1,"span"),c(2,"Outlet is required!"),r()())}var qo=(()=>{class n{constructor(){this.formService=f(q),this.form=this.formService.mainForm,this.outletForm=this.form.get("outlet"),this.setupForm=this.form.get("setup");let e=this.setupForm.get("MultiWarehouse");this.disabledOutlet(e.value),this.disabledOutletDelivery(e.value),this.disabledInventoryOutlet(e.value),this.outletForm.get("POSOutletID")?.valueChanges.pipe(gt()).subscribe(i=>{let t=this.outlets?.find(s=>s.OutletID===i);this.outletForm.get("POSOutlet")?.setValue(t?t.Outlet:null,{emitEvent:!1})}),e?.valueChanges.pipe(gt()).subscribe(i=>{this.disabledOutlet(i),this.disabledOutletDelivery(i),this.disabledInventoryOutlet(i)})}disabledOutlet(e){let i=this.outletForm.get("POSOutletID");e?i.disable({onlySelf:!0}):i.enable({onlySelf:!0})}disabledOutletDelivery(e){let i=this.outletForm.get("POSDeliveryOutlet");e?i.disable({onlySelf:!0}):i.enable({onlySelf:!0})}disabledInventoryOutlet(e){let i=this.outletForm.get("POSInventoryOutletArray");e?i.disable({onlySelf:!0}):i.enable({onlySelf:!0})}onSelectOutlet(){let e=this.outletForm.get("POSOutletID")?.value,i=this.outlets?.find(s=>s.ID===e);this.outletForm.get("POSOutlet")?.setValue(i?i.Outlet:null,{emitEvent:!1});let t=this.form?.get("sync")?.get("SyncOrder");F.IsEmpty(e)?t.setValue(!1):t.setValue(!0)}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275cmp=S({type:n,selectors:[["app-outle-config"]],inputs:{outlets:"outlets"},decls:23,vars:17,consts:[[1,"card","pt-12","border-top-0","rounded-0","rounded-bottom"],[3,"formGroup"],["formGroupName","outlet"],[1,"card-body"],[1,"row"],[1,"col-6"],["matTooltip","Outlet where the transaction is recorded in POS","matTooltipPosition","above",1,"form-label-group"],["id","outletOrder","bindLabel","Outlet","bindValue","ID","formControlName","POSOutletID","name","Name",1,"center-text","tall",3,"change","ngClass","items","clearable"],["for","outletOrder"],["id","outletOrder",1,"invalid-feedback"],["matTooltip","Outlet where the stock is deducted in POS","matTooltipPosition","above",1,"form-label-group"],["id","inventorySource","bindLabel","Outlet","bindValue","Outlet","formControlName","POSDeliveryOutlet","name","Delivery",1,"center-text","tall",3,"ngClass","items","clearable"],["for","inventorySource"],["id","inventorySource",1,"invalid-feedback"],[1,"col-12"],["matTooltip","Outlet where the inventory will displayed as inventory in inventory Comparison Menu","matTooltipPosition","above",1,"form-label-group"],["id","ProductInventory","multiple","true","bindLabel","Outlet","bindValue","Outlet","placeholder","Product Inventory","formControlName","POSInventoryOutletArray","name","POSInventoryOutletArray",1,"center-text","tall","multiple-select",3,"items"],["for","ProductInventory"]],template:function(i,t){if(i&1&&(a(0,"div",0)(1,"form",1)(2,"div",2)(3,"div",3)(4,"div",4)(5,"div",5)(6,"div",6)(7,"ng-select",7),C("change",function(){return t.onSelectOutlet()}),r(),a(8,"label",8),c(9),r(),u(10,ur,2,0,"div",9),r()(),a(11,"div",5)(12,"div",10),g(13,"ng-select",11),a(14,"label",12),c(15,"Dispatch Orders From"),r(),u(16,fr,3,0,"div",13),r()()(),a(17,"div",4)(18,"div",14)(19,"div",15),g(20,"ng-select",16),a(21,"label",17),c(22,"Product Inventory"),r()()()()()()()()),i&2){let s,d;l(),p("formGroup",t.form),l(6),p("ngClass",ne(11,jo,t.outletForm.get("POSOutletID").invalid&&(t.outletForm.get("POSOutletID").dirty||t.outletForm.get("POSOutletID").touched),t.outletForm.get("POSOutletID").invalid))("items",t.outlets)("clearable",!1),l(2),M("New Order To ",t.outletForm.get("POSOutlet").value,""),l(),b(t.outletForm.get("POSOutletID").invalid&&(t.outletForm.get("POSOutletID").dirty||t.outletForm.get("POSOutletID").touched)?10:-1),l(3),p("ngClass",ne(14,jo,((s=t.outletForm.get("POSDeliveryOutlet"))==null?null:s.invalid)&&(((s=t.outletForm.get("POSDeliveryOutlet"))==null?null:s.dirty)||((s=t.outletForm.get("POSDeliveryOutlet"))==null?null:s.touched)),(s=t.outletForm.get("POSDeliveryOutlet"))==null?null:s.invalid))("items",t.outlets)("clearable",!1),l(3),b((d=t.outletForm.get("POSDeliveryOutlet"))!=null&&d.invalid&&((d=t.outletForm.get("POSDeliveryOutlet"))!=null&&d.dirty||(d=t.outletForm.get("POSDeliveryOutlet"))!=null&&d.touched)?16:-1),l(4),p("items",t.outlets)}},dependencies:[I,L,W,R,Y,$,H,X,Z,ee,oe,te,Me],encapsulation:2,changeDetection:0})}}return n})();var Yi=(n,o)=>({"is-invalid":n,"bg-gradient-warning":o});function gr(n,o){n&1&&(a(0,"div",9)(1,"span"),c(2,"Payment Method is required!"),r()())}function vr(n,o){n&1&&(a(0,"div",13)(1,"span"),c(2,"Tax Type is required!"),r()())}function _r(n,o){n&1&&(a(0,"div",17)(1,"span"),c(2,"Sales Orders is required!"),r()())}var Ko=(()=>{class n{constructor(){this.formService=f(q),this.form=this.formService.mainForm,this.ordersForm=this.form.get("orders"),this.channel=new le}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275cmp=S({type:n,selectors:[["app-orders-config"]],inputs:{channel:"channel",paymentMethods:"paymentMethods",taxes:"taxes",salesTypes:"salesTypes"},decls:24,vars:19,consts:[[1,"card","pt-12","border-top-0","rounded-0","rounded-bottom"],[3,"formGroup"],["formGroupName","orders"],[1,"card-body"],[1,"row"],[1,"col-6"],["matTooltipPosition","above","matTooltip","Payment that will be recorded in POS if there is a transaction from the marketplace",1,"form-label-group"],["id","paymentOutlet","bindLabel","Name","bindValue","Name","formControlName","POSInvoicePaymentMethod","name","InvoicePaymentMethod",1,"center-text","tall",3,"items","ngClass"],["for","paymentOutlet"],["id","paymentOutlet",1,"invalid-feedback"],["matTooltip","Tax Type that will be recorded in POS if there is a transaction from the marketplace","matTooltipPosition","above",1,"form-label-group"],["id","taxType","bindLabel","Name","bindValue","Name","formControlName","POSTax","name","POSTax",1,"center-text","tall",3,"items","ngClass"],["for","taxType"],["id","taxType",1,"invalid-feedback"],["matTooltip","Tag Type that will be recorded in POS if there is a transaction from the marketplace","matTooltipPosition","above",1,"form-label-group"],["id","salesTag","bindLabel","Name","bindValue","Name","formControlName","POSSalesOrderType","name","SalesType",1,"center-text","tall",3,"items","ngClass"],["for","salesTag"],["id","salesTag",1,"invalid-feedback"]],template:function(i,t){if(i&1&&(a(0,"div",0)(1,"form",1)(2,"div",2)(3,"div",3)(4,"div",4)(5,"div",5)(6,"div",6),g(7,"ng-select",7),a(8,"label",8),c(9,"Payment Method"),r(),u(10,gr,3,0,"div",9),r()(),a(11,"div",5)(12,"div",10),g(13,"ng-select",11),a(14,"label",12),c(15,"Tax"),r(),u(16,vr,3,0,"div",13),r()()(),a(17,"div",4)(18,"div",5)(19,"div",14),g(20,"ng-select",15),a(21,"label",16),c(22,"Sales Orders Tag"),r(),u(23,_r,3,0,"div",17),r()()()()()()()),i&2){let s,d,m,_,T,N;l(),p("formGroup",t.form),l(6),p("items",t.paymentMethods)("ngClass",ne(10,Yi,((s=t.ordersForm.get("POSInvoicePaymentMethod"))==null?null:s.invalid)&&(((s=t.ordersForm.get("POSInvoicePaymentMethod"))==null?null:s.dirty)||((s=t.ordersForm.get("POSInvoicePaymentMethod"))==null?null:s.touched)),(s=t.ordersForm.get("POSInvoicePaymentMethod"))==null?null:s.invalid)),l(3),b((d=t.ordersForm.get("POSInvoicePaymentMethod"))!=null&&d.invalid&&((d=t.ordersForm.get("POSInvoicePaymentMethod"))!=null&&d.dirty||(d=t.ordersForm.get("POSInvoicePaymentMethod"))!=null&&d.touched)?10:-1),l(3),p("items",t.taxes)("ngClass",ne(13,Yi,((m=t.ordersForm.get("POSTax"))==null?null:m.invalid)&&(((m=t.ordersForm.get("POSTax"))==null?null:m.dirty)||((m=t.ordersForm.get("POSTax"))==null?null:m.touched)),(m=t.ordersForm.get("POSTax"))==null?null:m.invalid)),l(3),b((_=t.ordersForm.get("POSTax"))!=null&&_.invalid&&((_=t.ordersForm.get("POSTax"))!=null&&_.dirty||(_=t.ordersForm.get("POSTax"))!=null&&_.touched)?16:-1),l(4),p("items",t.salesTypes)("ngClass",ne(16,Yi,((T=t.ordersForm.get("POSSalesOrderType"))==null?null:T.invalid)&&(((T=t.ordersForm.get("POSSalesOrderType"))==null?null:T.dirty)||((T=t.ordersForm.get("POSSalesOrderType"))==null?null:T.touched)),(T=t.ordersForm.get("POSSalesOrderType"))==null?null:T.invalid)),l(3),b((N=t.ordersForm.get("POSSalesOrderType"))!=null&&N.invalid&&((N=t.ordersForm.get("POSSalesOrderType"))!=null&&N.dirty||(N=t.ordersForm.get("POSSalesOrderType"))!=null&&N.touched)?23:-1)}},dependencies:[I,L,W,R,Y,$,H,X,Z,ee,oe,te,Me],encapsulation:2,changeDetection:0})}}return n})();var yr=n=>({empty:n}),br=n=>({"danger is-invalid":n});function Cr(n,o){n&1&&(a(0,"div",23),c(1," Write off reason is required! "),r())}function Sr(n,o){if(n&1){let e=A();k(0),a(1,"div",5)(2,"div",19)(3,"div",20),g(4,"ng-select",21),a(5,"label",22),c(6,"Write Off Reason"),r(),u(7,Cr,2,0,"div",23),r(),a(8,"div",24)(9,"button",25),C("click",function(){x(e);let t=h();return D(t.onAddWriteOffReason())}),g(10,"i",26),r()()()(),E()}if(n&2){let e,i,t,s=h();l(3),p("ngClass",y(4,yr,((e=s.feeForm.get("ServiceFeeWriteOffReason"))==null?null:e.invalid)&&(((e=s.feeForm.get("ServiceFeeWriteOffReason"))==null?null:e.dirty)||((e=s.feeForm.get("ServiceFeeWriteOffReason"))==null?null:e.touched)))),l(),p("ngClass",y(6,br,!((i=s.feeForm.get("ServiceFeeWriteOffReason"))!=null&&i.value)))("items",s.listWriteOff),l(3),b((t=s.feeForm.get("ServiceFeeWriteOffReason"))!=null&&t.invalid&&((t=s.feeForm.get("ServiceFeeWriteOffReason"))!=null&&t.dirty||(t=s.feeForm.get("ServiceFeeWriteOffReason"))!=null&&t.touched)?7:-1)}}var Zo=(()=>{class n{constructor(e){this.dialog=e,this.formChannel=f(q),this.form=this.formChannel.mainForm,this.feeForm=this.form.get("invoiceFee"),this.channel=new le}onAddWriteOffReason(){this.dialog.open(so,{width:"450px"}).afterClosed().pipe($e(e=>e)).subscribe(e=>{this.listWriteOff=[e,...this.listWriteOff],this.feeForm?.get("ServiceFeeWriteOffReason")?.setValue(e.Name)})}onOptionChange(e){this.setWriteOffReasonValidators(e.value)}setWriteOffReasonValidators(e){e?this.feeForm?.get("ServiceFeeWriteOffReason")?.setValidators([K.required]):this.feeForm?.get("ServiceFeeWriteOffReason")?.clearValidators(),this.feeForm?.get("ServiceFeeWriteOffReason")?.updateValueAndValidity()}static{this.\u0275fac=function(i){return new(i||n)(V(xt))}}static{this.\u0275cmp=S({type:n,selectors:[["app-invoice-fee-config"]],inputs:{channel:"channel",listWriteOff:"listWriteOff"},decls:33,vars:7,consts:[[1,"card","pt-12","border-top-0","rounded-0","rounded-bottom"],[3,"formGroup"],["formGroupName","invoiceFee"],[1,"card-body"],[1,"row"],[1,"col-6"],["matTooltipPosition","above","matTooltip","Enable for record marketplace service fee in POS as Write off",1,"form-label-group","radio"],["for","enableWriteOff"],[1,"mt-3"],["formControlName","ServiceFeeWriteOff","name","enableWriteOff",3,"change"],[1,"me-5",3,"value"],[1,"d-flex","border","mb-4","pt-6","px-6",2,"background","#1f87ac0a","border-radius","5px"],[1,"me-3","pt-1"],[1,"fa","fa-lightbulb","fs-5"],[1,"mb-6"],[1,"form-label-group","radio"],["for","paymentSyncType"],["formControlName","PaymentSyncTypeID","name","PaymentSyncTypeID"],[4,"ngIf"],[1,"d-flex","align-items-center","justify-content-between"],["matTooltipPosition","above","matTooltip","Choose Reason to Write Off",1,"form-label-group","w-100",3,"ngClass"],["id","writeOffReason","clearable","true","bindLabel","Name","bindValue","Name","placeholder","Write Off Reason","formControlName","ServiceFeeWriteOffReason","name","writeOffReason",1,"center-text","tall",3,"ngClass","items"],["for","ServiceFeeWriteOffReason"],[1,"invalid-feedback"],[1,"mb-5","ms-4"],[1,"btn","btn-sm","primary",3,"click"],[1,"fas","fa-plus-circle","fa-lg","fs-1"]],template:function(i,t){if(i&1&&(a(0,"div",0)(1,"form",1)(2,"div",2)(3,"div",3)(4,"div",4)(5,"div",5)(6,"div",6)(7,"label",7),c(8,"Enable Write Off"),r(),a(9,"div",8)(10,"mat-radio-group",9),C("change",function(d){return t.onOptionChange(d)}),a(11,"mat-radio-button",10),c(12," Yes "),r(),a(13,"mat-radio-button",10),c(14," No "),r()()()(),a(15,"div",11)(16,"div",12),g(17,"i",13),r(),a(18,"p",14),c(19," When this configuration is turned on, Invoice Payment value is deducted with Marketplace Service Fee. Ex: $100 Order might only receive $97 Payment, $3 is recorded as Write Off "),r()()(),a(20,"div",5)(21,"div",15)(22,"label",16),c(23,"PaymentSyncType"),r(),a(24,"div",8)(25,"mat-radio-group",17)(26,"mat-radio-button",10),c(27," Never "),r(),a(28,"mat-radio-button",10),c(29," Full "),r(),a(30,"mat-radio-button",10),c(31," Write Off "),r()()()()(),u(32,Sr,11,8,"ng-container",18),r()()()()()),i&2){let s;l(),p("formGroup",t.form),l(10),p("value",!0),l(2),p("value",!1),l(13),p("value",0),l(2),p("value",1),l(2),p("value",2),l(2),p("ngIf",(s=t.feeForm.get("ServiceFeeWriteOff"))==null?null:s.value)}},dependencies:[I,L,z,W,R,Y,$,H,X,Z,ee,oe,te,Me,Ae,Ue,je],styles:["button.btn[_ngcontent-%COMP%]:hover, [_ngcontent-%COMP%]:disabled{border:none}"]})}}return n})();var xr=["*",[["mat-chip-avatar"],["","matChipAvatar",""]],[["mat-chip-trailing-icon"],["","matChipRemove",""],["","matChipTrailingIcon",""]]],Dr=["*","mat-chip-avatar, [matChipAvatar]","mat-chip-trailing-icon,[matChipRemove],[matChipTrailingIcon]"];function kr(n,o){n&1&&(a(0,"span",3),De(1,1),r())}function Er(n,o){n&1&&(a(0,"span",6),De(1,2),r())}var Pr=`.mdc-evolution-chip,.mdc-evolution-chip__cell,.mdc-evolution-chip__action{display:inline-flex;align-items:center}.mdc-evolution-chip{position:relative;max-width:100%}.mdc-evolution-chip__cell,.mdc-evolution-chip__action{height:100%}.mdc-evolution-chip__cell--primary{flex-basis:100%;overflow-x:hidden}.mdc-evolution-chip__cell--trailing{flex:1 0 auto}.mdc-evolution-chip__action{align-items:center;background:none;border:none;box-sizing:content-box;cursor:pointer;display:inline-flex;justify-content:center;outline:none;padding:0;text-decoration:none;color:inherit}.mdc-evolution-chip__action--presentational{cursor:auto}.mdc-evolution-chip--disabled,.mdc-evolution-chip__action:disabled{pointer-events:none}@media(forced-colors: active){.mdc-evolution-chip--disabled,.mdc-evolution-chip__action:disabled{forced-color-adjust:none}}.mdc-evolution-chip__action--primary{font:inherit;letter-spacing:inherit;white-space:inherit;overflow-x:hidden}.mat-mdc-standard-chip .mdc-evolution-chip__action--primary::before{border-width:var(--mdc-chip-outline-width, 1px);border-radius:var(--mdc-chip-container-shape-radius, 8px);box-sizing:border-box;content:"";height:100%;left:0;position:absolute;pointer-events:none;top:0;width:100%;z-index:1;border-style:solid}.mat-mdc-standard-chip .mdc-evolution-chip__action--primary{padding-left:12px;padding-right:12px}.mat-mdc-standard-chip.mdc-evolution-chip--with-primary-graphic .mdc-evolution-chip__action--primary{padding-left:0;padding-right:12px}[dir=rtl] .mat-mdc-standard-chip.mdc-evolution-chip--with-primary-graphic .mdc-evolution-chip__action--primary{padding-left:12px;padding-right:0}.mat-mdc-standard-chip:not(.mdc-evolution-chip--disabled) .mdc-evolution-chip__action--primary::before{border-color:var(--mdc-chip-outline-color, var(--mat-sys-outline))}.mdc-evolution-chip__action--primary:not(.mdc-evolution-chip__action--presentational):not(.mdc-ripple-upgraded):focus::before{border-color:var(--mdc-chip-focus-outline-color, var(--mat-sys-on-surface-variant))}.mat-mdc-standard-chip.mdc-evolution-chip--disabled .mdc-evolution-chip__action--primary::before{border-color:var(--mdc-chip-disabled-outline-color, color-mix(in srgb, var(--mat-sys-on-surface) 12%, transparent))}.mat-mdc-standard-chip.mdc-evolution-chip--selected .mdc-evolution-chip__action--primary::before{border-width:var(--mdc-chip-flat-selected-outline-width, 0)}.mat-mdc-basic-chip .mdc-evolution-chip__action--primary{font:inherit}.mat-mdc-standard-chip.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__action--primary{padding-left:12px;padding-right:0}[dir=rtl] .mat-mdc-standard-chip.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__action--primary{padding-left:0;padding-right:12px}.mat-mdc-standard-chip.mdc-evolution-chip--with-primary-graphic.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__action--primary{padding-left:0;padding-right:0}[dir=rtl] .mat-mdc-standard-chip.mdc-evolution-chip--with-primary-graphic.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__action--primary{padding-left:0;padding-right:0}.mdc-evolution-chip--with-avatar.mdc-evolution-chip--with-primary-graphic .mdc-evolution-chip__action--primary{padding-left:0;padding-right:12px}[dir=rtl] .mdc-evolution-chip--with-avatar.mdc-evolution-chip--with-primary-graphic .mdc-evolution-chip__action--primary{padding-left:12px;padding-right:0}.mdc-evolution-chip--with-avatar.mdc-evolution-chip--with-primary-graphic.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__action--primary{padding-left:0;padding-right:0}[dir=rtl] .mdc-evolution-chip--with-avatar.mdc-evolution-chip--with-primary-graphic.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__action--primary{padding-left:0;padding-right:0}.mdc-evolution-chip__action--trailing{position:relative;overflow:visible}.mat-mdc-standard-chip:not(.mdc-evolution-chip--disabled) .mdc-evolution-chip__action--trailing{color:var(--mdc-chip-with-trailing-icon-trailing-icon-color, var(--mat-sys-on-surface-variant))}.mat-mdc-standard-chip.mdc-evolution-chip--disabled .mdc-evolution-chip__action--trailing{color:var(--mdc-chip-with-trailing-icon-disabled-trailing-icon-color, var(--mat-sys-on-surface))}.mat-mdc-standard-chip.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__action--trailing{padding-left:8px;padding-right:8px}.mat-mdc-standard-chip.mdc-evolution-chip--with-primary-graphic.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__action--trailing{padding-left:8px;padding-right:8px}.mdc-evolution-chip--with-avatar.mdc-evolution-chip--with-primary-graphic.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__action--trailing{padding-left:8px;padding-right:8px}[dir=rtl] .mdc-evolution-chip--with-avatar.mdc-evolution-chip--with-primary-graphic.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__action--trailing{padding-left:8px;padding-right:8px}.mdc-evolution-chip__text-label{-webkit-user-select:none;user-select:none;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.mat-mdc-standard-chip .mdc-evolution-chip__text-label{font-family:var(--mdc-chip-label-text-font, var(--mat-sys-label-large-font));line-height:var(--mdc-chip-label-text-line-height, var(--mat-sys-label-large-line-height));font-size:var(--mdc-chip-label-text-size, var(--mat-sys-label-large-size));font-weight:var(--mdc-chip-label-text-weight, var(--mat-sys-label-large-weight));letter-spacing:var(--mdc-chip-label-text-tracking, var(--mat-sys-label-large-tracking))}.mat-mdc-standard-chip:not(.mdc-evolution-chip--disabled) .mdc-evolution-chip__text-label{color:var(--mdc-chip-label-text-color, var(--mat-sys-on-surface-variant))}.mat-mdc-standard-chip.mdc-evolution-chip--selected:not(.mdc-evolution-chip--disabled) .mdc-evolution-chip__text-label{color:var(--mdc-chip-selected-label-text-color, var(--mat-sys-on-secondary-container))}.mat-mdc-standard-chip.mdc-evolution-chip--disabled .mdc-evolution-chip__text-label,.mat-mdc-standard-chip.mdc-evolution-chip--selected.mdc-evolution-chip--disabled .mdc-evolution-chip__text-label{color:var(--mdc-chip-disabled-label-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mdc-evolution-chip__graphic{align-items:center;display:inline-flex;justify-content:center;overflow:hidden;pointer-events:none;position:relative;flex:1 0 auto}.mat-mdc-standard-chip .mdc-evolution-chip__graphic{width:var(--mdc-chip-with-avatar-avatar-size, 24px);height:var(--mdc-chip-with-avatar-avatar-size, 24px);font-size:var(--mdc-chip-with-avatar-avatar-size, 24px)}.mdc-evolution-chip--selecting .mdc-evolution-chip__graphic{transition:width 150ms 0ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-evolution-chip--selectable:not(.mdc-evolution-chip--selected):not(.mdc-evolution-chip--with-primary-icon) .mdc-evolution-chip__graphic{width:0}.mat-mdc-standard-chip.mdc-evolution-chip--with-primary-graphic .mdc-evolution-chip__graphic{padding-left:6px;padding-right:6px}.mdc-evolution-chip--with-avatar.mdc-evolution-chip--with-primary-graphic .mdc-evolution-chip__graphic{padding-left:4px;padding-right:8px}[dir=rtl] .mdc-evolution-chip--with-avatar.mdc-evolution-chip--with-primary-graphic .mdc-evolution-chip__graphic{padding-left:8px;padding-right:4px}.mat-mdc-standard-chip.mdc-evolution-chip--with-primary-graphic.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__graphic{padding-left:6px;padding-right:6px}.mdc-evolution-chip--with-avatar.mdc-evolution-chip--with-primary-graphic.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__graphic{padding-left:4px;padding-right:8px}[dir=rtl] .mdc-evolution-chip--with-avatar.mdc-evolution-chip--with-primary-graphic.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__graphic{padding-left:8px;padding-right:4px}.mdc-evolution-chip__checkmark{position:absolute;opacity:0;top:50%;left:50%;height:20px;width:20px}.mat-mdc-standard-chip:not(.mdc-evolution-chip--disabled) .mdc-evolution-chip__checkmark{color:var(--mdc-chip-with-icon-selected-icon-color, var(--mat-sys-on-secondary-container))}.mat-mdc-standard-chip.mdc-evolution-chip--disabled .mdc-evolution-chip__checkmark{color:var(--mdc-chip-with-icon-disabled-icon-color, var(--mat-sys-on-surface))}.mdc-evolution-chip--selecting .mdc-evolution-chip__checkmark{transition:transform 150ms 0ms cubic-bezier(0.4, 0, 0.2, 1);transform:translate(-75%, -50%)}.mdc-evolution-chip--selected .mdc-evolution-chip__checkmark{transform:translate(-50%, -50%);opacity:1}.mdc-evolution-chip__checkmark-svg{display:block}.mdc-evolution-chip__checkmark-path{stroke-width:2px;stroke-dasharray:29.7833385;stroke-dashoffset:29.7833385;stroke:currentColor}.mdc-evolution-chip--selecting .mdc-evolution-chip__checkmark-path{transition:stroke-dashoffset 150ms 45ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-evolution-chip--selected .mdc-evolution-chip__checkmark-path{stroke-dashoffset:0}@media(forced-colors: active){.mdc-evolution-chip__checkmark-path{stroke:CanvasText !important}}.mat-mdc-standard-chip .mdc-evolution-chip__icon--trailing{height:18px;width:18px;font-size:18px}.mdc-evolution-chip--disabled .mdc-evolution-chip__icon--trailing.mat-mdc-chip-remove{opacity:calc(var(--mat-chip-trailing-action-opacity, 1)*var(--mdc-chip-with-trailing-icon-disabled-trailing-icon-opacity, 0.38))}.mdc-evolution-chip--disabled .mdc-evolution-chip__icon--trailing.mat-mdc-chip-remove:focus{opacity:calc(var(--mat-chip-trailing-action-focus-opacity, 1)*var(--mdc-chip-with-trailing-icon-disabled-trailing-icon-opacity, 0.38))}.mat-mdc-standard-chip{border-radius:var(--mdc-chip-container-shape-radius, 8px);height:var(--mdc-chip-container-height, 32px)}.mat-mdc-standard-chip:not(.mdc-evolution-chip--disabled){background-color:var(--mdc-chip-elevated-container-color, transparent)}.mat-mdc-standard-chip.mdc-evolution-chip--disabled{background-color:var(--mdc-chip-elevated-disabled-container-color)}.mat-mdc-standard-chip.mdc-evolution-chip--selected:not(.mdc-evolution-chip--disabled){background-color:var(--mdc-chip-elevated-selected-container-color, var(--mat-sys-secondary-container))}.mat-mdc-standard-chip.mdc-evolution-chip--selected.mdc-evolution-chip--disabled{background-color:var(--mdc-chip-flat-disabled-selected-container-color, color-mix(in srgb, var(--mat-sys-on-surface) 12%, transparent))}@media(forced-colors: active){.mat-mdc-standard-chip{outline:solid 1px}}.mat-mdc-standard-chip .mdc-evolution-chip__icon--primary{border-radius:var(--mdc-chip-with-avatar-avatar-shape-radius, 24px);width:var(--mdc-chip-with-icon-icon-size, 18px);height:var(--mdc-chip-with-icon-icon-size, 18px);font-size:var(--mdc-chip-with-icon-icon-size, 18px)}.mdc-evolution-chip--selected .mdc-evolution-chip__icon--primary{opacity:0}.mat-mdc-standard-chip:not(.mdc-evolution-chip--disabled) .mdc-evolution-chip__icon--primary{color:var(--mdc-chip-with-icon-icon-color, var(--mat-sys-on-surface-variant))}.mat-mdc-standard-chip.mdc-evolution-chip--disabled .mdc-evolution-chip__icon--primary{color:var(--mdc-chip-with-icon-disabled-icon-color, var(--mat-sys-on-surface))}.mat-mdc-chip-highlighted{--mdc-chip-with-icon-icon-color:var(--mdc-chip-with-icon-selected-icon-color, var(--mat-sys-on-secondary-container));--mdc-chip-elevated-container-color:var(--mdc-chip-elevated-selected-container-color, var(--mat-sys-secondary-container));--mdc-chip-label-text-color:var(--mdc-chip-selected-label-text-color, var(--mat-sys-on-secondary-container));--mdc-chip-outline-width:var(--mdc-chip-flat-selected-outline-width, 0)}.mat-mdc-chip-focus-overlay{background:var(--mdc-chip-focus-state-layer-color, var(--mat-sys-on-surface-variant))}.mat-mdc-chip-selected .mat-mdc-chip-focus-overlay,.mat-mdc-chip-highlighted .mat-mdc-chip-focus-overlay{background:var(--mdc-chip-selected-focus-state-layer-color, var(--mat-sys-on-secondary-container))}.mat-mdc-chip:hover .mat-mdc-chip-focus-overlay{background:var(--mdc-chip-hover-state-layer-color, var(--mat-sys-on-surface-variant));opacity:var(--mdc-chip-hover-state-layer-opacity, var(--mat-sys-hover-state-layer-opacity))}.mat-mdc-chip-focus-overlay .mat-mdc-chip-selected:hover,.mat-mdc-chip-highlighted:hover .mat-mdc-chip-focus-overlay{background:var(--mdc-chip-selected-hover-state-layer-color, var(--mat-sys-on-secondary-container));opacity:var(--mdc-chip-selected-hover-state-layer-opacity, var(--mat-sys-hover-state-layer-opacity))}.mat-mdc-chip.cdk-focused .mat-mdc-chip-focus-overlay{background:var(--mdc-chip-focus-state-layer-color, var(--mat-sys-on-surface-variant));opacity:var(--mdc-chip-focus-state-layer-opacity, var(--mat-sys-focus-state-layer-opacity))}.mat-mdc-chip-selected.cdk-focused .mat-mdc-chip-focus-overlay,.mat-mdc-chip-highlighted.cdk-focused .mat-mdc-chip-focus-overlay{background:var(--mdc-chip-selected-focus-state-layer-color, var(--mat-sys-on-secondary-container));opacity:var(--mdc-chip-selected-focus-state-layer-opacity, var(--mat-sys-focus-state-layer-opacity))}.mdc-evolution-chip--disabled:not(.mdc-evolution-chip--selected) .mat-mdc-chip-avatar{opacity:var(--mdc-chip-with-avatar-disabled-avatar-opacity, 0.38)}.mdc-evolution-chip--disabled .mdc-evolution-chip__icon--trailing{opacity:var(--mdc-chip-with-trailing-icon-disabled-trailing-icon-opacity, 0.38)}.mdc-evolution-chip--disabled.mdc-evolution-chip--selected .mdc-evolution-chip__checkmark{opacity:var(--mdc-chip-with-icon-disabled-icon-opacity, 0.38)}.mat-mdc-standard-chip.mdc-evolution-chip--disabled{opacity:var(--mat-chip-disabled-container-opacity, 1)}.mat-mdc-standard-chip.mdc-evolution-chip--selected .mdc-evolution-chip__icon--trailing,.mat-mdc-standard-chip.mat-mdc-chip-highlighted .mdc-evolution-chip__icon--trailing{color:var(--mat-chip-selected-trailing-icon-color, var(--mat-sys-on-secondary-container))}.mat-mdc-standard-chip.mdc-evolution-chip--selected.mdc-evolution-chip--disabled .mdc-evolution-chip__icon--trailing,.mat-mdc-standard-chip.mat-mdc-chip-highlighted.mdc-evolution-chip--disabled .mdc-evolution-chip__icon--trailing{color:var(--mat-chip-selected-disabled-trailing-icon-color, var(--mat-sys-on-surface))}.mat-mdc-chip-remove{opacity:var(--mat-chip-trailing-action-opacity, 1)}.mat-mdc-chip-remove:focus{opacity:var(--mat-chip-trailing-action-focus-opacity, 1)}.mat-mdc-chip-remove::after{background-color:var(--mat-chip-trailing-action-state-layer-color, var(--mat-sys-on-surface-variant))}.mat-mdc-chip-remove:hover::after{opacity:var(--mat-chip-trailing-action-hover-state-layer-opacity, var(--mat-sys-hover-state-layer-opacity))}.mat-mdc-chip-remove:focus::after{opacity:var(--mat-chip-trailing-action-focus-state-layer-opacity, var(--mat-sys-focus-state-layer-opacity))}.mat-mdc-chip-selected .mat-mdc-chip-remove::after,.mat-mdc-chip-highlighted .mat-mdc-chip-remove::after{background-color:var(--mat-chip-selected-trailing-action-state-layer-color, var(--mat-sys-on-secondary-container))}.mat-mdc-standard-chip{-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-mdc-standard-chip .mdc-evolution-chip__cell--primary,.mat-mdc-standard-chip .mdc-evolution-chip__action--primary,.mat-mdc-standard-chip .mat-mdc-chip-action-label{overflow:visible}.mat-mdc-standard-chip .mat-mdc-chip-graphic,.mat-mdc-standard-chip .mat-mdc-chip-trailing-icon{box-sizing:content-box}.mat-mdc-standard-chip._mat-animation-noopable,.mat-mdc-standard-chip._mat-animation-noopable .mdc-evolution-chip__graphic,.mat-mdc-standard-chip._mat-animation-noopable .mdc-evolution-chip__checkmark,.mat-mdc-standard-chip._mat-animation-noopable .mdc-evolution-chip__checkmark-path{transition-duration:1ms;animation-duration:1ms}.mat-mdc-chip-focus-overlay{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none;opacity:0;border-radius:inherit;transition:opacity 150ms linear}._mat-animation-noopable .mat-mdc-chip-focus-overlay{transition:none}.mat-mdc-basic-chip .mat-mdc-chip-focus-overlay{display:none}.mat-mdc-chip .mat-ripple.mat-mdc-chip-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none;border-radius:inherit}.mat-mdc-chip-avatar{text-align:center;line-height:1;color:var(--mdc-chip-with-icon-icon-color, currentColor)}.mat-mdc-chip{position:relative;z-index:0}.mat-mdc-chip-action-label{text-align:left;z-index:1}[dir=rtl] .mat-mdc-chip-action-label{text-align:right}.mat-mdc-chip.mdc-evolution-chip--with-trailing-action .mat-mdc-chip-action-label{position:relative}.mat-mdc-chip-action-label .mat-mdc-chip-primary-focus-indicator{position:absolute;top:0;right:0;bottom:0;left:0;pointer-events:none}.mat-mdc-chip-action-label .mat-focus-indicator::before{margin:calc(calc(var(--mat-focus-indicator-border-width, 3px) + 2px)*-1)}.mat-mdc-chip-remove::before{margin:calc(var(--mat-focus-indicator-border-width, 3px)*-1);left:8px;right:8px}.mat-mdc-chip-remove::after{content:"";display:block;opacity:0;position:absolute;top:-3px;bottom:-3px;left:5px;right:5px;border-radius:50%;box-sizing:border-box;padding:12px;margin:-12px;background-clip:content-box}.mat-mdc-chip-remove .mat-icon{width:18px;height:18px;font-size:18px;box-sizing:content-box}.mat-chip-edit-input{cursor:text;display:inline-block;color:inherit;outline:0}@media(forced-colors: active){.mat-mdc-chip-selected:not(.mat-mdc-chip-multiple){outline-width:3px}}.mat-mdc-chip-action:focus .mat-focus-indicator::before{content:""}.mdc-evolution-chip__icon,.mat-mdc-chip-remove .mat-icon{min-height:fit-content}
|
|
3
|
+
`,Or=[[["mat-chip-avatar"],["","matChipAvatar",""]],[["","matChipEditInput",""]],"*",[["mat-chip-trailing-icon"],["","matChipRemove",""],["","matChipTrailingIcon",""]]],Mr=["mat-chip-avatar, [matChipAvatar]","[matChipEditInput]","*","mat-chip-trailing-icon,[matChipRemove],[matChipTrailingIcon]"];function Fr(n,o){n&1&&g(0,"span",0)}function Rr(n,o){n&1&&(a(0,"span",2),De(1),r())}function Ar(n,o){n&1&&De(0,1)}function Nr(n,o){n&1&&g(0,"span",7)}function Lr(n,o){if(n&1&&u(0,Ar,1,0)(1,Nr,1,0,"span",7),n&2){let e=h();b(e.contentEditInput?0:1)}}function Wr(n,o){n&1&&De(0,2)}function Vr(n,o){n&1&&(a(0,"span",5),De(1,3),r())}var ea=["*"],zr=`.mat-mdc-chip-set{display:flex}.mat-mdc-chip-set:focus{outline:none}.mat-mdc-chip-set .mdc-evolution-chip-set__chips{min-width:100%;margin-left:-8px;margin-right:0}.mat-mdc-chip-set .mdc-evolution-chip{margin:4px 0 4px 8px}[dir=rtl] .mat-mdc-chip-set .mdc-evolution-chip-set__chips{margin-left:0;margin-right:-8px}[dir=rtl] .mat-mdc-chip-set .mdc-evolution-chip{margin-left:0;margin-right:8px}.mdc-evolution-chip-set__chips{display:flex;flex-flow:wrap;min-width:0}.mat-mdc-chip-set-stacked{flex-direction:column;align-items:flex-start}.mat-mdc-chip-set-stacked .mat-mdc-chip{width:100%}.mat-mdc-chip-set-stacked .mdc-evolution-chip__graphic{flex-grow:0}.mat-mdc-chip-set-stacked .mdc-evolution-chip__action--primary{flex-basis:100%;justify-content:start}input.mat-mdc-chip-input{flex:1 0 150px;margin-left:8px}[dir=rtl] input.mat-mdc-chip-input{margin-left:0;margin-right:8px}
|
|
4
|
+
`,ta=new xe("mat-chips-default-options",{providedIn:"root",factory:()=>({separatorKeyCodes:[13]})}),Qo=new xe("MatChipAvatar"),Jo=new xe("MatChipTrailingIcon"),Ji=new xe("MatChipRemove"),en=new xe("MatChip"),bi=(()=>{class n{_elementRef=f(Ze);_parentChip=f(en);isInteractive=!0;_isPrimary=!0;get disabled(){return this._disabled||this._parentChip?.disabled||!1}set disabled(e){this._disabled=e}_disabled=!1;tabIndex=-1;_allowFocusWhenDisabled=!1;_getDisabledAttribute(){return this.disabled&&!this._allowFocusWhenDisabled?"":null}_getTabindex(){return this.disabled&&!this._allowFocusWhenDisabled||!this.isInteractive?null:this.tabIndex.toString()}constructor(){f(Ht).load(Ni),this._elementRef.nativeElement.nodeName==="BUTTON"&&this._elementRef.nativeElement.setAttribute("type","button")}focus(){this._elementRef.nativeElement.focus()}_handleClick(e){!this.disabled&&this.isInteractive&&this._isPrimary&&(e.preventDefault(),this._parentChip._handlePrimaryActionInteraction())}_handleKeydown(e){(e.keyCode===13||e.keyCode===32)&&!this.disabled&&this.isInteractive&&this._isPrimary&&!this._parentChip._isEditing&&(e.preventDefault(),this._parentChip._handlePrimaryActionInteraction())}static \u0275fac=function(i){return new(i||n)};static \u0275dir=it({type:n,selectors:[["","matChipAction",""]],hostAttrs:[1,"mdc-evolution-chip__action","mat-mdc-chip-action"],hostVars:9,hostBindings:function(i,t){i&1&&C("click",function(d){return t._handleClick(d)})("keydown",function(d){return t._handleKeydown(d)}),i&2&&(we("tabindex",t._getTabindex())("disabled",t._getDisabledAttribute())("aria-disabled",t.disabled),nt("mdc-evolution-chip__action--primary",t._isPrimary)("mdc-evolution-chip__action--presentational",!t.isInteractive)("mdc-evolution-chip__action--trailing",!t._isPrimary))},inputs:{isInteractive:"isInteractive",disabled:[2,"disabled","disabled",ue],tabIndex:[2,"tabIndex","tabIndex",e=>e==null?-1:Vt(e)],_allowFocusWhenDisabled:"_allowFocusWhenDisabled"}})}return n})();var ia=(()=>{class n extends bi{_isPrimary=!1;_handleClick(e){this.disabled||(e.stopPropagation(),e.preventDefault(),this._parentChip.remove())}_handleKeydown(e){(e.keyCode===13||e.keyCode===32)&&!this.disabled&&(e.stopPropagation(),e.preventDefault(),this._parentChip.remove())}static \u0275fac=(()=>{let e;return function(t){return(e||(e=fn(n)))(t||n)}})();static \u0275dir=it({type:n,selectors:[["","matChipRemove",""]],hostAttrs:["role","button",1,"mat-mdc-chip-remove","mat-mdc-chip-trailing-icon","mat-focus-indicator","mdc-evolution-chip__icon","mdc-evolution-chip__icon--trailing"],hostVars:1,hostBindings:function(i,t){i&2&&we("aria-hidden",null)},features:[he([{provide:Ji,useExisting:n}]),ni]})}return n})(),Xi=(()=>{class n{_changeDetectorRef=f(Ct);_elementRef=f(Ze);_ngZone=f(bt);_focusMonitor=f(Mn);_globalRippleOptions=f(Qn,{optional:!0});_document=f(St);_onFocus=new B;_onBlur=new B;_isBasicChip;role=null;_hasFocusInternal=!1;_pendingFocus;_actionChanges;_animationsDisabled;_allLeadingIcons;_allTrailingIcons;_allRemoveIcons;_hasFocus(){return this._hasFocusInternal}id=f(jt).getId("mat-mdc-chip-");ariaLabel=null;ariaDescription=null;_ariaDescriptionId=`${this.id}-aria-description`;_chipListDisabled=!1;_textElement;get value(){return this._value!==void 0?this._value:this._textElement.textContent.trim()}set value(e){this._value=e}_value;color;removable=!0;highlighted=!1;disableRipple=!1;get disabled(){return this._disabled||this._chipListDisabled}set disabled(e){this._disabled=e}_disabled=!1;removed=new j;destroyed=new j;basicChipAttrName="mat-basic-chip";leadingIcon;trailingIcon;removeIcon;primaryAction;_rippleLoader=f($n);_injector=f(ti);constructor(){let e=f(Ht);e.load(Ni),e.load(Fn);let i=f(_n,{optional:!0});this._animationsDisabled=i==="NoopAnimations",this._monitorFocus(),this._rippleLoader?.configureRipple(this._elementRef.nativeElement,{className:"mat-mdc-chip-ripple",disabled:this._isRippleDisabled()})}ngOnInit(){let e=this._elementRef.nativeElement;this._isBasicChip=e.hasAttribute(this.basicChipAttrName)||e.tagName.toLowerCase()===this.basicChipAttrName}ngAfterViewInit(){this._textElement=this._elementRef.nativeElement.querySelector(".mat-mdc-chip-action-label"),this._pendingFocus&&(this._pendingFocus=!1,this.focus())}ngAfterContentInit(){this._actionChanges=ze(this._allLeadingIcons.changes,this._allTrailingIcons.changes,this._allRemoveIcons.changes).subscribe(()=>this._changeDetectorRef.markForCheck())}ngDoCheck(){this._rippleLoader.setDisabled(this._elementRef.nativeElement,this._isRippleDisabled())}ngOnDestroy(){this._focusMonitor.stopMonitoring(this._elementRef),this._rippleLoader?.destroyRipple(this._elementRef.nativeElement),this._actionChanges?.unsubscribe(),this.destroyed.emit({chip:this}),this.destroyed.complete()}remove(){this.removable&&this.removed.emit({chip:this})}_isRippleDisabled(){return this.disabled||this.disableRipple||this._animationsDisabled||this._isBasicChip||!!this._globalRippleOptions?.disabled}_hasTrailingIcon(){return!!(this.trailingIcon||this.removeIcon)}_handleKeydown(e){(e.keyCode===8&&!e.repeat||e.keyCode===46)&&(e.preventDefault(),this.remove())}focus(){this.disabled||(this.primaryAction?this.primaryAction.focus():this._pendingFocus=!0)}_getSourceAction(e){return this._getActions().find(i=>{let t=i._elementRef.nativeElement;return t===e||t.contains(e)})}_getActions(){let e=[];return this.primaryAction&&e.push(this.primaryAction),this.removeIcon&&e.push(this.removeIcon),this.trailingIcon&&e.push(this.trailingIcon),e}_handlePrimaryActionInteraction(){}_monitorFocus(){this._focusMonitor.monitor(this._elementRef,!0).subscribe(e=>{let i=e!==null;i!==this._hasFocusInternal&&(this._hasFocusInternal=i,i?this._onFocus.next({chip:this}):(this._changeDetectorRef.markForCheck(),setTimeout(()=>this._ngZone.run(()=>this._onBlur.next({chip:this})))))})}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=S({type:n,selectors:[["mat-basic-chip"],["","mat-basic-chip",""],["mat-chip"],["","mat-chip",""]],contentQueries:function(i,t,s){if(i&1&&(Ge(s,Qo,5),Ge(s,Jo,5),Ge(s,Ji,5),Ge(s,Qo,5),Ge(s,Jo,5),Ge(s,Ji,5)),i&2){let d;ke(d=Ee())&&(t.leadingIcon=d.first),ke(d=Ee())&&(t.trailingIcon=d.first),ke(d=Ee())&&(t.removeIcon=d.first),ke(d=Ee())&&(t._allLeadingIcons=d),ke(d=Ee())&&(t._allTrailingIcons=d),ke(d=Ee())&&(t._allRemoveIcons=d)}},viewQuery:function(i,t){if(i&1&&Oi(bi,5),i&2){let s;ke(s=Ee())&&(t.primaryAction=s.first)}},hostAttrs:[1,"mat-mdc-chip"],hostVars:31,hostBindings:function(i,t){i&1&&C("keydown",function(d){return t._handleKeydown(d)}),i&2&&(ai("id",t.id),we("role",t.role)("aria-label",t.ariaLabel),oi("mat-"+(t.color||"primary")),nt("mdc-evolution-chip",!t._isBasicChip)("mdc-evolution-chip--disabled",t.disabled)("mdc-evolution-chip--with-trailing-action",t._hasTrailingIcon())("mdc-evolution-chip--with-primary-graphic",t.leadingIcon)("mdc-evolution-chip--with-primary-icon",t.leadingIcon)("mdc-evolution-chip--with-avatar",t.leadingIcon)("mat-mdc-chip-with-avatar",t.leadingIcon)("mat-mdc-chip-highlighted",t.highlighted)("mat-mdc-chip-disabled",t.disabled)("mat-mdc-basic-chip",t._isBasicChip)("mat-mdc-standard-chip",!t._isBasicChip)("mat-mdc-chip-with-trailing-icon",t._hasTrailingIcon())("_mat-animation-noopable",t._animationsDisabled))},inputs:{role:"role",id:"id",ariaLabel:[0,"aria-label","ariaLabel"],ariaDescription:[0,"aria-description","ariaDescription"],value:"value",color:"color",removable:[2,"removable","removable",ue],highlighted:[2,"highlighted","highlighted",ue],disableRipple:[2,"disableRipple","disableRipple",ue],disabled:[2,"disabled","disabled",ue]},outputs:{removed:"removed",destroyed:"destroyed"},exportAs:["matChip"],features:[he([{provide:en,useExisting:n}])],ngContentSelectors:Dr,decls:8,vars:3,consts:[[1,"mat-mdc-chip-focus-overlay"],[1,"mdc-evolution-chip__cell","mdc-evolution-chip__cell--primary"],["matChipAction","",3,"isInteractive"],[1,"mdc-evolution-chip__graphic","mat-mdc-chip-graphic"],[1,"mdc-evolution-chip__text-label","mat-mdc-chip-action-label"],[1,"mat-mdc-chip-primary-focus-indicator","mat-focus-indicator"],[1,"mdc-evolution-chip__cell","mdc-evolution-chip__cell--trailing"]],template:function(i,t){i&1&&(ut(xr),g(0,"span",0),a(1,"span",1)(2,"span",2),u(3,kr,2,0,"span",3),a(4,"span",4),De(5),g(6,"span",5),r()()(),u(7,Er,2,0,"span",6)),i&2&&(l(2),p("isInteractive",!1),l(),b(t.leadingIcon?3:-1),l(4),b(t._hasTrailingIcon()?7:-1))},dependencies:[bi],styles:[`.mdc-evolution-chip,.mdc-evolution-chip__cell,.mdc-evolution-chip__action{display:inline-flex;align-items:center}.mdc-evolution-chip{position:relative;max-width:100%}.mdc-evolution-chip__cell,.mdc-evolution-chip__action{height:100%}.mdc-evolution-chip__cell--primary{flex-basis:100%;overflow-x:hidden}.mdc-evolution-chip__cell--trailing{flex:1 0 auto}.mdc-evolution-chip__action{align-items:center;background:none;border:none;box-sizing:content-box;cursor:pointer;display:inline-flex;justify-content:center;outline:none;padding:0;text-decoration:none;color:inherit}.mdc-evolution-chip__action--presentational{cursor:auto}.mdc-evolution-chip--disabled,.mdc-evolution-chip__action:disabled{pointer-events:none}@media(forced-colors: active){.mdc-evolution-chip--disabled,.mdc-evolution-chip__action:disabled{forced-color-adjust:none}}.mdc-evolution-chip__action--primary{font:inherit;letter-spacing:inherit;white-space:inherit;overflow-x:hidden}.mat-mdc-standard-chip .mdc-evolution-chip__action--primary::before{border-width:var(--mdc-chip-outline-width, 1px);border-radius:var(--mdc-chip-container-shape-radius, 8px);box-sizing:border-box;content:"";height:100%;left:0;position:absolute;pointer-events:none;top:0;width:100%;z-index:1;border-style:solid}.mat-mdc-standard-chip .mdc-evolution-chip__action--primary{padding-left:12px;padding-right:12px}.mat-mdc-standard-chip.mdc-evolution-chip--with-primary-graphic .mdc-evolution-chip__action--primary{padding-left:0;padding-right:12px}[dir=rtl] .mat-mdc-standard-chip.mdc-evolution-chip--with-primary-graphic .mdc-evolution-chip__action--primary{padding-left:12px;padding-right:0}.mat-mdc-standard-chip:not(.mdc-evolution-chip--disabled) .mdc-evolution-chip__action--primary::before{border-color:var(--mdc-chip-outline-color, var(--mat-sys-outline))}.mdc-evolution-chip__action--primary:not(.mdc-evolution-chip__action--presentational):not(.mdc-ripple-upgraded):focus::before{border-color:var(--mdc-chip-focus-outline-color, var(--mat-sys-on-surface-variant))}.mat-mdc-standard-chip.mdc-evolution-chip--disabled .mdc-evolution-chip__action--primary::before{border-color:var(--mdc-chip-disabled-outline-color, color-mix(in srgb, var(--mat-sys-on-surface) 12%, transparent))}.mat-mdc-standard-chip.mdc-evolution-chip--selected .mdc-evolution-chip__action--primary::before{border-width:var(--mdc-chip-flat-selected-outline-width, 0)}.mat-mdc-basic-chip .mdc-evolution-chip__action--primary{font:inherit}.mat-mdc-standard-chip.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__action--primary{padding-left:12px;padding-right:0}[dir=rtl] .mat-mdc-standard-chip.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__action--primary{padding-left:0;padding-right:12px}.mat-mdc-standard-chip.mdc-evolution-chip--with-primary-graphic.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__action--primary{padding-left:0;padding-right:0}[dir=rtl] .mat-mdc-standard-chip.mdc-evolution-chip--with-primary-graphic.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__action--primary{padding-left:0;padding-right:0}.mdc-evolution-chip--with-avatar.mdc-evolution-chip--with-primary-graphic .mdc-evolution-chip__action--primary{padding-left:0;padding-right:12px}[dir=rtl] .mdc-evolution-chip--with-avatar.mdc-evolution-chip--with-primary-graphic .mdc-evolution-chip__action--primary{padding-left:12px;padding-right:0}.mdc-evolution-chip--with-avatar.mdc-evolution-chip--with-primary-graphic.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__action--primary{padding-left:0;padding-right:0}[dir=rtl] .mdc-evolution-chip--with-avatar.mdc-evolution-chip--with-primary-graphic.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__action--primary{padding-left:0;padding-right:0}.mdc-evolution-chip__action--trailing{position:relative;overflow:visible}.mat-mdc-standard-chip:not(.mdc-evolution-chip--disabled) .mdc-evolution-chip__action--trailing{color:var(--mdc-chip-with-trailing-icon-trailing-icon-color, var(--mat-sys-on-surface-variant))}.mat-mdc-standard-chip.mdc-evolution-chip--disabled .mdc-evolution-chip__action--trailing{color:var(--mdc-chip-with-trailing-icon-disabled-trailing-icon-color, var(--mat-sys-on-surface))}.mat-mdc-standard-chip.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__action--trailing{padding-left:8px;padding-right:8px}.mat-mdc-standard-chip.mdc-evolution-chip--with-primary-graphic.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__action--trailing{padding-left:8px;padding-right:8px}.mdc-evolution-chip--with-avatar.mdc-evolution-chip--with-primary-graphic.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__action--trailing{padding-left:8px;padding-right:8px}[dir=rtl] .mdc-evolution-chip--with-avatar.mdc-evolution-chip--with-primary-graphic.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__action--trailing{padding-left:8px;padding-right:8px}.mdc-evolution-chip__text-label{-webkit-user-select:none;user-select:none;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.mat-mdc-standard-chip .mdc-evolution-chip__text-label{font-family:var(--mdc-chip-label-text-font, var(--mat-sys-label-large-font));line-height:var(--mdc-chip-label-text-line-height, var(--mat-sys-label-large-line-height));font-size:var(--mdc-chip-label-text-size, var(--mat-sys-label-large-size));font-weight:var(--mdc-chip-label-text-weight, var(--mat-sys-label-large-weight));letter-spacing:var(--mdc-chip-label-text-tracking, var(--mat-sys-label-large-tracking))}.mat-mdc-standard-chip:not(.mdc-evolution-chip--disabled) .mdc-evolution-chip__text-label{color:var(--mdc-chip-label-text-color, var(--mat-sys-on-surface-variant))}.mat-mdc-standard-chip.mdc-evolution-chip--selected:not(.mdc-evolution-chip--disabled) .mdc-evolution-chip__text-label{color:var(--mdc-chip-selected-label-text-color, var(--mat-sys-on-secondary-container))}.mat-mdc-standard-chip.mdc-evolution-chip--disabled .mdc-evolution-chip__text-label,.mat-mdc-standard-chip.mdc-evolution-chip--selected.mdc-evolution-chip--disabled .mdc-evolution-chip__text-label{color:var(--mdc-chip-disabled-label-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mdc-evolution-chip__graphic{align-items:center;display:inline-flex;justify-content:center;overflow:hidden;pointer-events:none;position:relative;flex:1 0 auto}.mat-mdc-standard-chip .mdc-evolution-chip__graphic{width:var(--mdc-chip-with-avatar-avatar-size, 24px);height:var(--mdc-chip-with-avatar-avatar-size, 24px);font-size:var(--mdc-chip-with-avatar-avatar-size, 24px)}.mdc-evolution-chip--selecting .mdc-evolution-chip__graphic{transition:width 150ms 0ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-evolution-chip--selectable:not(.mdc-evolution-chip--selected):not(.mdc-evolution-chip--with-primary-icon) .mdc-evolution-chip__graphic{width:0}.mat-mdc-standard-chip.mdc-evolution-chip--with-primary-graphic .mdc-evolution-chip__graphic{padding-left:6px;padding-right:6px}.mdc-evolution-chip--with-avatar.mdc-evolution-chip--with-primary-graphic .mdc-evolution-chip__graphic{padding-left:4px;padding-right:8px}[dir=rtl] .mdc-evolution-chip--with-avatar.mdc-evolution-chip--with-primary-graphic .mdc-evolution-chip__graphic{padding-left:8px;padding-right:4px}.mat-mdc-standard-chip.mdc-evolution-chip--with-primary-graphic.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__graphic{padding-left:6px;padding-right:6px}.mdc-evolution-chip--with-avatar.mdc-evolution-chip--with-primary-graphic.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__graphic{padding-left:4px;padding-right:8px}[dir=rtl] .mdc-evolution-chip--with-avatar.mdc-evolution-chip--with-primary-graphic.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__graphic{padding-left:8px;padding-right:4px}.mdc-evolution-chip__checkmark{position:absolute;opacity:0;top:50%;left:50%;height:20px;width:20px}.mat-mdc-standard-chip:not(.mdc-evolution-chip--disabled) .mdc-evolution-chip__checkmark{color:var(--mdc-chip-with-icon-selected-icon-color, var(--mat-sys-on-secondary-container))}.mat-mdc-standard-chip.mdc-evolution-chip--disabled .mdc-evolution-chip__checkmark{color:var(--mdc-chip-with-icon-disabled-icon-color, var(--mat-sys-on-surface))}.mdc-evolution-chip--selecting .mdc-evolution-chip__checkmark{transition:transform 150ms 0ms cubic-bezier(0.4, 0, 0.2, 1);transform:translate(-75%, -50%)}.mdc-evolution-chip--selected .mdc-evolution-chip__checkmark{transform:translate(-50%, -50%);opacity:1}.mdc-evolution-chip__checkmark-svg{display:block}.mdc-evolution-chip__checkmark-path{stroke-width:2px;stroke-dasharray:29.7833385;stroke-dashoffset:29.7833385;stroke:currentColor}.mdc-evolution-chip--selecting .mdc-evolution-chip__checkmark-path{transition:stroke-dashoffset 150ms 45ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-evolution-chip--selected .mdc-evolution-chip__checkmark-path{stroke-dashoffset:0}@media(forced-colors: active){.mdc-evolution-chip__checkmark-path{stroke:CanvasText !important}}.mat-mdc-standard-chip .mdc-evolution-chip__icon--trailing{height:18px;width:18px;font-size:18px}.mdc-evolution-chip--disabled .mdc-evolution-chip__icon--trailing.mat-mdc-chip-remove{opacity:calc(var(--mat-chip-trailing-action-opacity, 1)*var(--mdc-chip-with-trailing-icon-disabled-trailing-icon-opacity, 0.38))}.mdc-evolution-chip--disabled .mdc-evolution-chip__icon--trailing.mat-mdc-chip-remove:focus{opacity:calc(var(--mat-chip-trailing-action-focus-opacity, 1)*var(--mdc-chip-with-trailing-icon-disabled-trailing-icon-opacity, 0.38))}.mat-mdc-standard-chip{border-radius:var(--mdc-chip-container-shape-radius, 8px);height:var(--mdc-chip-container-height, 32px)}.mat-mdc-standard-chip:not(.mdc-evolution-chip--disabled){background-color:var(--mdc-chip-elevated-container-color, transparent)}.mat-mdc-standard-chip.mdc-evolution-chip--disabled{background-color:var(--mdc-chip-elevated-disabled-container-color)}.mat-mdc-standard-chip.mdc-evolution-chip--selected:not(.mdc-evolution-chip--disabled){background-color:var(--mdc-chip-elevated-selected-container-color, var(--mat-sys-secondary-container))}.mat-mdc-standard-chip.mdc-evolution-chip--selected.mdc-evolution-chip--disabled{background-color:var(--mdc-chip-flat-disabled-selected-container-color, color-mix(in srgb, var(--mat-sys-on-surface) 12%, transparent))}@media(forced-colors: active){.mat-mdc-standard-chip{outline:solid 1px}}.mat-mdc-standard-chip .mdc-evolution-chip__icon--primary{border-radius:var(--mdc-chip-with-avatar-avatar-shape-radius, 24px);width:var(--mdc-chip-with-icon-icon-size, 18px);height:var(--mdc-chip-with-icon-icon-size, 18px);font-size:var(--mdc-chip-with-icon-icon-size, 18px)}.mdc-evolution-chip--selected .mdc-evolution-chip__icon--primary{opacity:0}.mat-mdc-standard-chip:not(.mdc-evolution-chip--disabled) .mdc-evolution-chip__icon--primary{color:var(--mdc-chip-with-icon-icon-color, var(--mat-sys-on-surface-variant))}.mat-mdc-standard-chip.mdc-evolution-chip--disabled .mdc-evolution-chip__icon--primary{color:var(--mdc-chip-with-icon-disabled-icon-color, var(--mat-sys-on-surface))}.mat-mdc-chip-highlighted{--mdc-chip-with-icon-icon-color:var(--mdc-chip-with-icon-selected-icon-color, var(--mat-sys-on-secondary-container));--mdc-chip-elevated-container-color:var(--mdc-chip-elevated-selected-container-color, var(--mat-sys-secondary-container));--mdc-chip-label-text-color:var(--mdc-chip-selected-label-text-color, var(--mat-sys-on-secondary-container));--mdc-chip-outline-width:var(--mdc-chip-flat-selected-outline-width, 0)}.mat-mdc-chip-focus-overlay{background:var(--mdc-chip-focus-state-layer-color, var(--mat-sys-on-surface-variant))}.mat-mdc-chip-selected .mat-mdc-chip-focus-overlay,.mat-mdc-chip-highlighted .mat-mdc-chip-focus-overlay{background:var(--mdc-chip-selected-focus-state-layer-color, var(--mat-sys-on-secondary-container))}.mat-mdc-chip:hover .mat-mdc-chip-focus-overlay{background:var(--mdc-chip-hover-state-layer-color, var(--mat-sys-on-surface-variant));opacity:var(--mdc-chip-hover-state-layer-opacity, var(--mat-sys-hover-state-layer-opacity))}.mat-mdc-chip-focus-overlay .mat-mdc-chip-selected:hover,.mat-mdc-chip-highlighted:hover .mat-mdc-chip-focus-overlay{background:var(--mdc-chip-selected-hover-state-layer-color, var(--mat-sys-on-secondary-container));opacity:var(--mdc-chip-selected-hover-state-layer-opacity, var(--mat-sys-hover-state-layer-opacity))}.mat-mdc-chip.cdk-focused .mat-mdc-chip-focus-overlay{background:var(--mdc-chip-focus-state-layer-color, var(--mat-sys-on-surface-variant));opacity:var(--mdc-chip-focus-state-layer-opacity, var(--mat-sys-focus-state-layer-opacity))}.mat-mdc-chip-selected.cdk-focused .mat-mdc-chip-focus-overlay,.mat-mdc-chip-highlighted.cdk-focused .mat-mdc-chip-focus-overlay{background:var(--mdc-chip-selected-focus-state-layer-color, var(--mat-sys-on-secondary-container));opacity:var(--mdc-chip-selected-focus-state-layer-opacity, var(--mat-sys-focus-state-layer-opacity))}.mdc-evolution-chip--disabled:not(.mdc-evolution-chip--selected) .mat-mdc-chip-avatar{opacity:var(--mdc-chip-with-avatar-disabled-avatar-opacity, 0.38)}.mdc-evolution-chip--disabled .mdc-evolution-chip__icon--trailing{opacity:var(--mdc-chip-with-trailing-icon-disabled-trailing-icon-opacity, 0.38)}.mdc-evolution-chip--disabled.mdc-evolution-chip--selected .mdc-evolution-chip__checkmark{opacity:var(--mdc-chip-with-icon-disabled-icon-opacity, 0.38)}.mat-mdc-standard-chip.mdc-evolution-chip--disabled{opacity:var(--mat-chip-disabled-container-opacity, 1)}.mat-mdc-standard-chip.mdc-evolution-chip--selected .mdc-evolution-chip__icon--trailing,.mat-mdc-standard-chip.mat-mdc-chip-highlighted .mdc-evolution-chip__icon--trailing{color:var(--mat-chip-selected-trailing-icon-color, var(--mat-sys-on-secondary-container))}.mat-mdc-standard-chip.mdc-evolution-chip--selected.mdc-evolution-chip--disabled .mdc-evolution-chip__icon--trailing,.mat-mdc-standard-chip.mat-mdc-chip-highlighted.mdc-evolution-chip--disabled .mdc-evolution-chip__icon--trailing{color:var(--mat-chip-selected-disabled-trailing-icon-color, var(--mat-sys-on-surface))}.mat-mdc-chip-remove{opacity:var(--mat-chip-trailing-action-opacity, 1)}.mat-mdc-chip-remove:focus{opacity:var(--mat-chip-trailing-action-focus-opacity, 1)}.mat-mdc-chip-remove::after{background-color:var(--mat-chip-trailing-action-state-layer-color, var(--mat-sys-on-surface-variant))}.mat-mdc-chip-remove:hover::after{opacity:var(--mat-chip-trailing-action-hover-state-layer-opacity, var(--mat-sys-hover-state-layer-opacity))}.mat-mdc-chip-remove:focus::after{opacity:var(--mat-chip-trailing-action-focus-state-layer-opacity, var(--mat-sys-focus-state-layer-opacity))}.mat-mdc-chip-selected .mat-mdc-chip-remove::after,.mat-mdc-chip-highlighted .mat-mdc-chip-remove::after{background-color:var(--mat-chip-selected-trailing-action-state-layer-color, var(--mat-sys-on-secondary-container))}.mat-mdc-standard-chip{-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-mdc-standard-chip .mdc-evolution-chip__cell--primary,.mat-mdc-standard-chip .mdc-evolution-chip__action--primary,.mat-mdc-standard-chip .mat-mdc-chip-action-label{overflow:visible}.mat-mdc-standard-chip .mat-mdc-chip-graphic,.mat-mdc-standard-chip .mat-mdc-chip-trailing-icon{box-sizing:content-box}.mat-mdc-standard-chip._mat-animation-noopable,.mat-mdc-standard-chip._mat-animation-noopable .mdc-evolution-chip__graphic,.mat-mdc-standard-chip._mat-animation-noopable .mdc-evolution-chip__checkmark,.mat-mdc-standard-chip._mat-animation-noopable .mdc-evolution-chip__checkmark-path{transition-duration:1ms;animation-duration:1ms}.mat-mdc-chip-focus-overlay{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none;opacity:0;border-radius:inherit;transition:opacity 150ms linear}._mat-animation-noopable .mat-mdc-chip-focus-overlay{transition:none}.mat-mdc-basic-chip .mat-mdc-chip-focus-overlay{display:none}.mat-mdc-chip .mat-ripple.mat-mdc-chip-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none;border-radius:inherit}.mat-mdc-chip-avatar{text-align:center;line-height:1;color:var(--mdc-chip-with-icon-icon-color, currentColor)}.mat-mdc-chip{position:relative;z-index:0}.mat-mdc-chip-action-label{text-align:left;z-index:1}[dir=rtl] .mat-mdc-chip-action-label{text-align:right}.mat-mdc-chip.mdc-evolution-chip--with-trailing-action .mat-mdc-chip-action-label{position:relative}.mat-mdc-chip-action-label .mat-mdc-chip-primary-focus-indicator{position:absolute;top:0;right:0;bottom:0;left:0;pointer-events:none}.mat-mdc-chip-action-label .mat-focus-indicator::before{margin:calc(calc(var(--mat-focus-indicator-border-width, 3px) + 2px)*-1)}.mat-mdc-chip-remove::before{margin:calc(var(--mat-focus-indicator-border-width, 3px)*-1);left:8px;right:8px}.mat-mdc-chip-remove::after{content:"";display:block;opacity:0;position:absolute;top:-3px;bottom:-3px;left:5px;right:5px;border-radius:50%;box-sizing:border-box;padding:12px;margin:-12px;background-clip:content-box}.mat-mdc-chip-remove .mat-icon{width:18px;height:18px;font-size:18px;box-sizing:content-box}.mat-chip-edit-input{cursor:text;display:inline-block;color:inherit;outline:0}@media(forced-colors: active){.mat-mdc-chip-selected:not(.mat-mdc-chip-multiple){outline-width:3px}}.mat-mdc-chip-action:focus .mat-focus-indicator::before{content:""}.mdc-evolution-chip__icon,.mat-mdc-chip-remove .mat-icon{min-height:fit-content}
|
|
5
|
+
`],encapsulation:2,changeDetection:0})}return n})();var Qi=(()=>{class n{_elementRef=f(Ze);_document=f(St);constructor(){}initialize(e){this.getNativeElement().focus(),this.setValue(e)}getNativeElement(){return this._elementRef.nativeElement}setValue(e){this.getNativeElement().textContent=e,this._moveCursorToEndOfInput()}getValue(){return this.getNativeElement().textContent||""}_moveCursorToEndOfInput(){let e=this._document.createRange();e.selectNodeContents(this.getNativeElement()),e.collapse(!1);let i=window.getSelection();i.removeAllRanges(),i.addRange(e)}static \u0275fac=function(i){return new(i||n)};static \u0275dir=it({type:n,selectors:[["span","matChipEditInput",""]],hostAttrs:["role","textbox","tabindex","-1","contenteditable","true",1,"mat-chip-edit-input"]})}return n})(),tn=(()=>{class n extends Xi{basicChipAttrName="mat-basic-chip-row";_editStartPending=!1;editable=!1;edited=new j;defaultEditInput;contentEditInput;_isEditing=!1;constructor(){super(),this.role="row",this._onBlur.pipe(Se(this.destroyed)).subscribe(()=>{this._isEditing&&!this._editStartPending&&this._onEditFinish()})}_hasTrailingIcon(){return!this._isEditing&&super._hasTrailingIcon()}_handleFocus(){!this._isEditing&&!this.disabled&&this.focus()}_handleKeydown(e){e.keyCode===13&&!this.disabled?this._isEditing?(e.preventDefault(),this._onEditFinish()):this.editable&&this._startEditing(e):this._isEditing?e.stopPropagation():super._handleKeydown(e)}_handleDoubleclick(e){!this.disabled&&this.editable&&this._startEditing(e)}_startEditing(e){if(!this.primaryAction||this.removeIcon&&this._getSourceAction(e.target)===this.removeIcon)return;let i=this.value;this._isEditing=this._editStartPending=!0,ii(()=>{this._getEditInput().initialize(i),this._editStartPending=!1},{injector:this._injector})}_onEditFinish(){this._isEditing=this._editStartPending=!1,this.edited.emit({chip:this,value:this._getEditInput().getValue()}),(this._document.activeElement===this._getEditInput().getNativeElement()||this._document.activeElement===this._document.body)&&this.primaryAction.focus()}_isRippleDisabled(){return super._isRippleDisabled()||this._isEditing}_getEditInput(){return this.contentEditInput||this.defaultEditInput}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=S({type:n,selectors:[["mat-chip-row"],["","mat-chip-row",""],["mat-basic-chip-row"],["","mat-basic-chip-row",""]],contentQueries:function(i,t,s){if(i&1&&Ge(s,Qi,5),i&2){let d;ke(d=Ee())&&(t.contentEditInput=d.first)}},viewQuery:function(i,t){if(i&1&&Oi(Qi,5),i&2){let s;ke(s=Ee())&&(t.defaultEditInput=s.first)}},hostAttrs:[1,"mat-mdc-chip","mat-mdc-chip-row","mdc-evolution-chip"],hostVars:27,hostBindings:function(i,t){i&1&&C("focus",function(){return t._handleFocus()})("dblclick",function(d){return t._handleDoubleclick(d)}),i&2&&(ai("id",t.id),we("tabindex",t.disabled?null:-1)("aria-label",null)("aria-description",null)("role",t.role),nt("mat-mdc-chip-with-avatar",t.leadingIcon)("mat-mdc-chip-disabled",t.disabled)("mat-mdc-chip-editing",t._isEditing)("mat-mdc-chip-editable",t.editable)("mdc-evolution-chip--disabled",t.disabled)("mdc-evolution-chip--with-trailing-action",t._hasTrailingIcon())("mdc-evolution-chip--with-primary-graphic",t.leadingIcon)("mdc-evolution-chip--with-primary-icon",t.leadingIcon)("mdc-evolution-chip--with-avatar",t.leadingIcon)("mat-mdc-chip-highlighted",t.highlighted)("mat-mdc-chip-with-trailing-icon",t._hasTrailingIcon()))},inputs:{editable:"editable"},outputs:{edited:"edited"},features:[he([{provide:Xi,useExisting:n},{provide:en,useExisting:n}]),ni],ngContentSelectors:Mr,decls:10,vars:9,consts:[[1,"mat-mdc-chip-focus-overlay"],["role","gridcell","matChipAction","",1,"mdc-evolution-chip__cell","mdc-evolution-chip__cell--primary",3,"disabled"],[1,"mdc-evolution-chip__graphic","mat-mdc-chip-graphic"],[1,"mdc-evolution-chip__text-label","mat-mdc-chip-action-label"],["aria-hidden","true",1,"mat-mdc-chip-primary-focus-indicator","mat-focus-indicator"],["role","gridcell",1,"mdc-evolution-chip__cell","mdc-evolution-chip__cell--trailing"],[1,"cdk-visually-hidden",3,"id"],["matChipEditInput",""]],template:function(i,t){i&1&&(ut(Or),u(0,Fr,1,0,"span",0),a(1,"span",1),u(2,Rr,2,0,"span",2),a(3,"span",3),u(4,Lr,2,1)(5,Wr,1,0),g(6,"span",4),r()(),u(7,Vr,2,0,"span",5),a(8,"span",6),c(9),r()),i&2&&(b(t._isEditing?-1:0),l(),p("disabled",t.disabled),we("aria-label",t.ariaLabel)("aria-describedby",t._ariaDescriptionId),l(),b(t.leadingIcon?2:-1),l(2),b(t._isEditing?4:5),l(3),b(t._hasTrailingIcon()?7:-1),l(),p("id",t._ariaDescriptionId),l(),v(t.ariaDescription))},dependencies:[bi,Qi],styles:[Pr],encapsulation:2,changeDetection:0})}return n})(),Gr=(()=>{class n{_elementRef=f(Ze);_changeDetectorRef=f(Ct);_dir=f(Ut,{optional:!0});_lastDestroyedFocusedChipIndex=null;_keyManager;_destroyed=new B;_defaultRole="presentation";get chipFocusChanges(){return this._getChipStream(e=>e._onFocus)}get chipDestroyedChanges(){return this._getChipStream(e=>e.destroyed)}get chipRemovedChanges(){return this._getChipStream(e=>e.removed)}get disabled(){return this._disabled}set disabled(e){this._disabled=e,this._syncChipsState()}_disabled=!1;get empty(){return!this._chips||this._chips.length===0}get role(){return this._explicitRole?this._explicitRole:this.empty?null:this._defaultRole}tabIndex=0;set role(e){this._explicitRole=e}_explicitRole=null;get focused(){return this._hasFocusedChip()}_chips;_chipActions=new vn;constructor(){}ngAfterViewInit(){this._setUpFocusManagement(),this._trackChipSetChanges(),this._trackDestroyedFocusedChip()}ngOnDestroy(){this._keyManager?.destroy(),this._chipActions.destroy(),this._destroyed.next(),this._destroyed.complete()}_hasFocusedChip(){return this._chips&&this._chips.some(e=>e._hasFocus())}_syncChipsState(){this._chips?.forEach(e=>{e._chipListDisabled=this._disabled,e._changeDetectorRef.markForCheck()})}focus(){}_handleKeydown(e){this._originatesFromChip(e)&&this._keyManager.onKeydown(e)}_isValidIndex(e){return e>=0&&e<this._chips.length}_allowFocusEscape(){let e=this._elementRef.nativeElement.tabIndex;e!==-1&&(this._elementRef.nativeElement.tabIndex=-1,setTimeout(()=>this._elementRef.nativeElement.tabIndex=e))}_getChipStream(e){return this._chips.changes.pipe(mt(null),Q(()=>ze(...this._chips.map(e))))}_originatesFromChip(e){let i=e.target;for(;i&&i!==this._elementRef.nativeElement;){if(i.classList.contains("mat-mdc-chip"))return!0;i=i.parentElement}return!1}_setUpFocusManagement(){this._chips.changes.pipe(mt(this._chips)).subscribe(e=>{let i=[];e.forEach(t=>t._getActions().forEach(s=>i.push(s))),this._chipActions.reset(i),this._chipActions.notifyOnChanges()}),this._keyManager=new Wn(this._chipActions).withVerticalOrientation().withHorizontalOrientation(this._dir?this._dir.value:"ltr").withHomeAndEnd().skipPredicate(e=>this._skipPredicate(e)),this.chipFocusChanges.pipe(Se(this._destroyed)).subscribe(({chip:e})=>{let i=e._getSourceAction(document.activeElement);i&&this._keyManager.updateActiveItem(i)}),this._dir?.change.pipe(Se(this._destroyed)).subscribe(e=>this._keyManager.withHorizontalOrientation(e))}_skipPredicate(e){return!e.isInteractive||e.disabled}_trackChipSetChanges(){this._chips.changes.pipe(mt(null),Se(this._destroyed)).subscribe(()=>{this.disabled&&Promise.resolve().then(()=>this._syncChipsState()),this._redirectDestroyedChipFocus()})}_trackDestroyedFocusedChip(){this.chipDestroyedChanges.pipe(Se(this._destroyed)).subscribe(e=>{let t=this._chips.toArray().indexOf(e.chip);this._isValidIndex(t)&&e.chip._hasFocus()&&(this._lastDestroyedFocusedChipIndex=t)})}_redirectDestroyedChipFocus(){if(this._lastDestroyedFocusedChipIndex!=null){if(this._chips.length){let e=Math.min(this._lastDestroyedFocusedChipIndex,this._chips.length-1),i=this._chips.toArray()[e];i.disabled?this._chips.length===1?this.focus():this._keyManager.setPreviousItemActive():i.focus()}else this.focus();this._lastDestroyedFocusedChipIndex=null}}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=S({type:n,selectors:[["mat-chip-set"]],contentQueries:function(i,t,s){if(i&1&&Ge(s,Xi,5),i&2){let d;ke(d=Ee())&&(t._chips=d)}},hostAttrs:[1,"mat-mdc-chip-set","mdc-evolution-chip-set"],hostVars:1,hostBindings:function(i,t){i&1&&C("keydown",function(d){return t._handleKeydown(d)}),i&2&&we("role",t.role)},inputs:{disabled:[2,"disabled","disabled",ue],role:"role",tabIndex:[2,"tabIndex","tabIndex",e=>e==null?0:Vt(e)]},ngContentSelectors:ea,decls:2,vars:0,consts:[["role","presentation",1,"mdc-evolution-chip-set__chips"]],template:function(i,t){i&1&&(ut(),a(0,"div",0),De(1),r())},styles:[`.mat-mdc-chip-set{display:flex}.mat-mdc-chip-set:focus{outline:none}.mat-mdc-chip-set .mdc-evolution-chip-set__chips{min-width:100%;margin-left:-8px;margin-right:0}.mat-mdc-chip-set .mdc-evolution-chip{margin:4px 0 4px 8px}[dir=rtl] .mat-mdc-chip-set .mdc-evolution-chip-set__chips{margin-left:0;margin-right:-8px}[dir=rtl] .mat-mdc-chip-set .mdc-evolution-chip{margin-left:0;margin-right:8px}.mdc-evolution-chip-set__chips{display:flex;flex-flow:wrap;min-width:0}.mat-mdc-chip-set-stacked{flex-direction:column;align-items:flex-start}.mat-mdc-chip-set-stacked .mat-mdc-chip{width:100%}.mat-mdc-chip-set-stacked .mdc-evolution-chip__graphic{flex-grow:0}.mat-mdc-chip-set-stacked .mdc-evolution-chip__action--primary{flex-basis:100%;justify-content:start}input.mat-mdc-chip-input{flex:1 0 150px;margin-left:8px}[dir=rtl] input.mat-mdc-chip-input{margin-left:0;margin-right:8px}
|
|
6
|
+
`],encapsulation:2,changeDetection:0})}return n})();var $i=class{source;value;constructor(o,e){this.source=o,this.value=e}},na=(()=>{class n extends Gr{ngControl=f(Tn,{optional:!0,self:!0});controlType="mat-chip-grid";_chipInput;_defaultRole="grid";_errorStateTracker;_ariaDescribedbyIds=[];_onTouched=()=>{};_onChange=()=>{};get disabled(){return this.ngControl?!!this.ngControl.disabled:this._disabled}set disabled(e){this._disabled=e,this._syncChipsState(),this.stateChanges.next()}get id(){return this._chipInput.id}get empty(){return(!this._chipInput||this._chipInput.empty)&&(!this._chips||this._chips.length===0)}get placeholder(){return this._chipInput?this._chipInput.placeholder:this._placeholder}set placeholder(e){this._placeholder=e,this.stateChanges.next()}_placeholder;get focused(){return this._chipInput.focused||this._hasFocusedChip()}get required(){return this._required??this.ngControl?.control?.hasValidator(K.required)??!1}set required(e){this._required=e,this.stateChanges.next()}_required;get shouldLabelFloat(){return!this.empty||this.focused}get value(){return this._value}set value(e){this._value=e}_value=[];get errorStateMatcher(){return this._errorStateTracker.matcher}set errorStateMatcher(e){this._errorStateTracker.matcher=e}get chipBlurChanges(){return this._getChipStream(e=>e._onBlur)}change=new j;valueChange=new j;_chips=void 0;stateChanges=new B;get errorState(){return this._errorStateTracker.errorState}set errorState(e){this._errorStateTracker.errorState=e}constructor(){super();let e=f(xn,{optional:!0}),i=f(Z,{optional:!0}),t=f(Li);this.ngControl&&(this.ngControl.valueAccessor=this),this._errorStateTracker=new Xn(t,this.ngControl,i,e,this.stateChanges)}ngAfterContentInit(){this.chipBlurChanges.pipe(Se(this._destroyed)).subscribe(()=>{this._blur(),this.stateChanges.next()}),ze(this.chipFocusChanges,this._chips.changes).pipe(Se(this._destroyed)).subscribe(()=>this.stateChanges.next())}ngAfterViewInit(){super.ngAfterViewInit(),this._chipInput}ngDoCheck(){this.ngControl&&this.updateErrorState()}ngOnDestroy(){super.ngOnDestroy(),this.stateChanges.complete()}registerInput(e){this._chipInput=e,this._chipInput.setDescribedByIds(this._ariaDescribedbyIds)}onContainerClick(e){!this.disabled&&!this._originatesFromChip(e)&&this.focus()}focus(){if(!(this.disabled||this._chipInput.focused)){if(!this._chips.length||this._chips.first.disabled)Promise.resolve().then(()=>this._chipInput.focus());else{let e=this._keyManager.activeItem;e?e.focus():this._keyManager.setFirstItemActive()}this.stateChanges.next()}}setDescribedByIds(e){this._ariaDescribedbyIds=e,this._chipInput?.setDescribedByIds(e)}writeValue(e){this._value=e}registerOnChange(e){this._onChange=e}registerOnTouched(e){this._onTouched=e}setDisabledState(e){this.disabled=e,this.stateChanges.next()}updateErrorState(){this._errorStateTracker.updateErrorState()}_blur(){this.disabled||setTimeout(()=>{this.focused||(this._propagateChanges(),this._markAsTouched())})}_allowFocusEscape(){this._chipInput.focused||super._allowFocusEscape()}_handleKeydown(e){let i=e.keyCode,t=this._keyManager.activeItem;if(i===9)this._chipInput.focused&&Fi(e,"shiftKey")&&this._chips.length&&!this._chips.last.disabled?(e.preventDefault(),t?this._keyManager.setActiveItem(t):this._focusLastChip()):super._allowFocusEscape();else if(!this._chipInput.focused)if((i===38||i===40)&&t){let s=this._chipActions.filter(_=>_._isPrimary===t._isPrimary&&!this._skipPredicate(_)),d=s.indexOf(t),m=e.keyCode===38?-1:1;e.preventDefault(),d>-1&&this._isValidIndex(d+m)&&this._keyManager.setActiveItem(s[d+m])}else super._handleKeydown(e);this.stateChanges.next()}_focusLastChip(){this._chips.length&&this._chips.last.focus()}_propagateChanges(){let e=this._chips.length?this._chips.toArray().map(i=>i.value):[];this._value=e,this.change.emit(new $i(this,e)),this.valueChange.emit(e),this._onChange(e),this._changeDetectorRef.markForCheck()}_markAsTouched(){this._onTouched(),this._changeDetectorRef.markForCheck(),this.stateChanges.next()}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=S({type:n,selectors:[["mat-chip-grid"]],contentQueries:function(i,t,s){if(i&1&&Ge(s,tn,5),i&2){let d;ke(d=Ee())&&(t._chips=d)}},hostAttrs:[1,"mat-mdc-chip-set","mat-mdc-chip-grid","mdc-evolution-chip-set"],hostVars:10,hostBindings:function(i,t){i&1&&C("focus",function(){return t.focus()})("blur",function(){return t._blur()}),i&2&&(we("role",t.role)("tabindex",t.disabled||t._chips&&t._chips.length===0?-1:t.tabIndex)("aria-disabled",t.disabled.toString())("aria-invalid",t.errorState),nt("mat-mdc-chip-list-disabled",t.disabled)("mat-mdc-chip-list-invalid",t.errorState)("mat-mdc-chip-list-required",t.required))},inputs:{disabled:[2,"disabled","disabled",ue],placeholder:"placeholder",required:[2,"required","required",ue],value:"value",errorStateMatcher:"errorStateMatcher"},outputs:{change:"change",valueChange:"valueChange"},features:[he([{provide:qn,useExisting:n}]),ni],ngContentSelectors:ea,decls:2,vars:0,consts:[["role","presentation",1,"mdc-evolution-chip-set__chips"]],template:function(i,t){i&1&&(ut(),a(0,"div",0),De(1),r())},styles:[zr],encapsulation:2,changeDetection:0})}return n})(),oa=(()=>{class n{_elementRef=f(Ze);focused=!1;get chipGrid(){return this._chipGrid}set chipGrid(e){e&&(this._chipGrid=e,this._chipGrid.registerInput(this))}_chipGrid;addOnBlur=!1;separatorKeyCodes;chipEnd=new j;placeholder="";id=f(jt).getId("mat-mdc-chip-list-input-");get disabled(){return this._disabled||this._chipGrid&&this._chipGrid.disabled}set disabled(e){this._disabled=e}_disabled=!1;get empty(){return!this.inputElement.value}inputElement;constructor(){let e=f(ta),i=f(Kn,{optional:!0});this.inputElement=this._elementRef.nativeElement,this.separatorKeyCodes=e.separatorKeyCodes,i&&this.inputElement.classList.add("mat-mdc-form-field-input-control")}ngOnChanges(){this._chipGrid.stateChanges.next()}ngOnDestroy(){this.chipEnd.complete()}_keydown(e){this.empty&&e.keyCode===8?(e.repeat||this._chipGrid._focusLastChip(),e.preventDefault()):this._emitChipEnd(e)}_blur(){this.addOnBlur&&this._emitChipEnd(),this.focused=!1,this._chipGrid.focused||this._chipGrid._blur(),this._chipGrid.stateChanges.next()}_focus(){this.focused=!0,this._chipGrid.stateChanges.next()}_emitChipEnd(e){(!e||this._isSeparatorKey(e)&&!e.repeat)&&(this.chipEnd.emit({input:this.inputElement,value:this.inputElement.value,chipInput:this}),e?.preventDefault())}_onInput(){this._chipGrid.stateChanges.next()}focus(){this.inputElement.focus()}clear(){this.inputElement.value=""}setDescribedByIds(e){let i=this._elementRef.nativeElement;e.length?i.setAttribute("aria-describedby",e.join(" ")):i.removeAttribute("aria-describedby")}_isSeparatorKey(e){return!Fi(e)&&new Set(this.separatorKeyCodes).has(e.keyCode)}static \u0275fac=function(i){return new(i||n)};static \u0275dir=it({type:n,selectors:[["input","matChipInputFor",""]],hostAttrs:[1,"mat-mdc-chip-input","mat-mdc-input-element","mdc-text-field__input","mat-input-element"],hostVars:6,hostBindings:function(i,t){i&1&&C("keydown",function(d){return t._keydown(d)})("blur",function(){return t._blur()})("focus",function(){return t._focus()})("input",function(){return t._onInput()}),i&2&&(ai("id",t.id),we("disabled",t.disabled||null)("placeholder",t.placeholder||null)("aria-invalid",t._chipGrid&&t._chipGrid.ngControl?t._chipGrid.ngControl.invalid:null)("aria-required",t._chipGrid&&t._chipGrid.required||null)("required",t._chipGrid&&t._chipGrid.required||null))},inputs:{chipGrid:[0,"matChipInputFor","chipGrid"],addOnBlur:[2,"matChipInputAddOnBlur","addOnBlur",ue],separatorKeyCodes:[0,"matChipInputSeparatorKeyCodes","separatorKeyCodes"],placeholder:"placeholder",id:"id",disabled:[2,"disabled","disabled",ue]},outputs:{chipEnd:"matChipInputTokenEnd"},exportAs:["matChipInput","matChipInputFor"],features:[J]})}return n})();var Ci=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275mod=tt({type:n});static \u0275inj=et({providers:[Li,{provide:ta,useValue:{separatorKeyCodes:[13]}}],imports:[Ri,Jn,Ri]})}return n})();var aa=n=>({empty:n}),Hr=(n,o)=>({"mb-2":n,"mb-8":o}),ra=n=>({"bg-gradient-warning":n});function Ur(n,o){if(n&1){let e=A();a(0,"mat-chip-row",32),C("removed",function(){let t=x(e).$implicit,s=h();return D(s.removeAdditonalItem(t))}),c(1),a(2,"button",33)(3,"mat-icon"),c(4,"cancel"),r()()()}if(n&2){let e=o.$implicit;p("aria-description","press enter to edit "+e),l(),M(" ",e," "),l(),we("aria-label","remove "+e)}}function jr(n,o){n&1&&(k(0),a(1,"div",5)(2,"div",34)(3,"label",35),c(4,"Order Fulfillment Webhook Handling"),r(),a(5,"div",27)(6,"mat-radio-group",36)(7,"mat-radio-button",37),c(8," Do Nothing "),r(),a(9,"mat-radio-button",37),c(10," Create Outbound Logistic "),r()()()()(),E()),n&2&&(l(7),p("value",0),l(2),p("value",1))}function qr(n,o){n&1&&(a(0,"div",5)(1,"div",38)(2,"label",26),c(3,"Automatic Return Process"),r(),a(4,"div",39)(5,"mat-radio-group",40)(6,"mat-radio-button",37),c(7," Yes "),r(),a(8,"mat-radio-button",37),c(9," No "),r()()()()()),n&2&&(l(6),p("value",!0),l(2),p("value",!1))}function Kr(n,o){n&1&&(k(0),a(1,"div",5)(2,"div",41)(3,"label",42),c(4,"Ignore Cancelled Order for Fulfilled Orders"),r(),a(5,"div",27)(6,"mat-radio-group",43)(7,"mat-radio-button",37),c(8," No "),r(),a(9,"mat-radio-button",37),c(10," Yes "),r()()()()(),E()),n&2&&(l(7),p("value",!1),l(2),p("value",!0))}function Zr(n,o){n&1&&(k(0),a(1,"div",5)(2,"div",44),g(3,"input",45),a(4,"label",46),c(5,"Size Chart"),r()()(),E())}function Yr(n,o){n&1&&(k(0),a(1,"div",5)(2,"div",47),g(3,"input",48),a(4,"label",49),c(5,"ShippingFee"),r()()(),E())}function Qr(n,o){if(n&1&&(a(0,"div",31)(1,"div",50)(2,"label",26),c(3,"Unpaid Order"),r(),a(4,"div",27)(5,"mat-radio-group",51)(6,"mat-radio-button",52),c(7," Yes "),r(),a(8,"mat-radio-button",53),c(9," No "),r()()()()()),n&2){let e,i=h();l(),p("ngClass",y(3,ra,!(!(i.syncForm==null||(e=i.syncForm.get("UnpaidOrder"))==null)&&e.value))),l(5),p("value",!0),l(2),p("value",!1)}}var la=(()=>{class n{constructor(){this.formChannel=f(q),this.channelService=f(Re),this.form=this.formChannel.mainForm,this.advancedForm=this.form.get("advanced"),this.syncForm=this.form.get("sync"),this._channel=new le,this.pricebooks=Nt([]),this.channelType=w,this.additionalItems=[]}set channel(e){e&&(this._channel=e,this.initRegisterOptions())}get channel(){return this._channel}ngOnInit(){this.initAdditionalItems()}initAdditionalItems(){this.additionalItems=this.advancedForm?.get("Additionalitem")?.value||[]}initRegisterOptions(){F.IsNotEmpty(this._channel?.POSOutlet)?this.registers$=this.channelService.getRegisterByOutletName(this._channel?.POSOutlet):this.registers$=Ve([])}addAdditonalItem(e){let i=(e.value||"").trim();this.additionalItems.includes(i)||(this.additionalItems.push(i),this.advancedForm?.get("Additionalitem")?.setValue(this.additionalItems)),e.chipInput.clear()}removeAdditonalItem(e){let i=this.additionalItems.indexOf(e);i>=0&&(this.additionalItems.splice(i,1),this.advancedForm?.get("Additionalitem")?.setValue(this.additionalItems))}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275cmp=S({type:n,selectors:[["app-advanced-config"]],inputs:{pricebooks:[1,"pricebooks"],channel:"channel"},decls:51,vars:29,consts:[["chipGrid",""],[1,"card","pt-12","border-top-0","rounded-0","rounded-bottom"],[3,"formGroup"],[1,"card-body"],["formGroupName","advanced",1,"row"],[1,"col-6"],["matTooltipPosition","above","matTooltip","Register where the transaction is recorded in POS",1,"form-label-group","w-100",3,"ngClass"],["id","registerId","clearable","true","bindLabel","Name","bindValue","Name","placeholder","Register","formControlName","Register","name","registerId",1,"center-text","tall",3,"items"],["for","registerId"],["matTooltipPosition","above","matTooltip","Minimal inventory on channel, if product inventory is below minimum inventory will automatically update to 0",1,"form-label-group"],["type","number","name","MinimumInventory","placeholder","Minimum Inventory","id","MinimumInventory","formControlName","MinimumInventory",1,"form-control"],["for","MinimumInventory"],[1,"col-6","mat-chip-custom"],["appearance","outline","matTooltipPosition","above","matTooltipClass","custom-width-tooltip","matTooltip","Please input SKU Product for add Additional products that will be entered automatically in every transaction from the marketplace, Example : Paperbag",1,"w-100"],["aria-label","Enter fruits"],[3,"aria-description","removed",4,"ngFor","ngForOf"],["placeholder","Input SKU Product",3,"matChipInputTokenEnd","matChipInputFor"],[4,"ngIf"],["matTooltipPosition","above","matTooltip","Warehouse ID for location of the product",1,"form-label-group"],["type","text","name","WarehouseID","placeholder","Warehous ID","id","WarehouseID","formControlName","WarehouseID",1,"form-control"],["for","WarehouseID"],[1,"form-label-group","w-100",3,"ngClass"],["id","pricebookId","clearable","true","bindLabel","Name","bindValue","ID","placeholder","Pricebook","formControlName","PricebookID","name","pricebookId",1,"center-text","tall",3,"items"],["for","pricebookId"],["formGroupName","sync",1,"row"],["matTooltipPosition","above","matTooltip","Automatically sync your orders from channel to POS",1,"form-label-group","radio",3,"ngClass"],["for","SyncOrder"],[1,"mt-3"],["formControlName","SyncOrder","name","SyncOrder"],["matTooltip","Include if the channel makes a transaction",1,"me-5",3,"value"],["matTooltip","No Include if the channel makes a transaction",1,"me-5",3,"value"],[1,"col-sm-12"],[3,"removed","aria-description"],["matChipRemove",""],["matTooltipPosition","above","matTooltip","Enable for record marketplace service fee in POS as Write off",1,"form-label-group","radio"],["for","FulfillmentWebhookHandling"],["formControlName","FulfillmentWebhookHandling","name","FulfillmentWebhookHandling"],[1,"me-5",3,"value"],[1,"form-label-group","radio"],[1,"mt-4"],["formControlName","ReturnProcess","name","ReturnProcess"],["matTooltipPosition","above","matTooltip",`When this configuration is enabled, fulfilled marketplace orders canceled later will not be auto-voided.
|
|
7
7
|
|
|
8
8
|
- Fulfilled orders \u2192 not auto-voided (handle manually)
|
|
9
9
|
|
|
10
|
-
- Unfulfilled orders \u2192 still auto-voided`,1,"form-label-group","radio"],["for","enableWriteOff"],["formControlName","IgnoreReverseOrder","name","enableWriteOff"],["matTooltip","Image URL for Tokopedia Product Size Chart","matTooltipPosition","above",1,"form-label-group"],["type","text","id","SizeChart","placeholder","Size Chart","formControlName","SizeChart","name","SizeChart",1,"form-control"],["for","SizeChart"],["matTooltip","Please input Product SKU to automatically add additional product to record the amount of the shipping fee in order","matTooltipPosition","above",1,"form-label-group"],["type","text","id","ShippingFee","placeholder","Shipping Fee","formControlName","ShippingFee","name","ShippingFee",1,"form-control"],["for","ShippingFee"],["matTooltipPosition","above","matTooltip","Insert Order configuration when you have or have not paid",1,"form-label-group","radio",3,"ngClass"],["formControlName","UnpaidOrder","name","UnpaidOrder"],["matTooltip","Insert Order When Unpaid",1,"me-5",3,"value"],["matTooltip","Skip Insert Order When Unpaid",1,"me-5",3,"value"]],template:function(i,t){if(i&1){let s=A();a(0,"div",1)(1,"form",2)(2,"div",3)(3,"div",4)(4,"div",5)(5,"div",6),g(6,"ng-select",7),P(7,"async"),a(8,"label",8),c(9,"Register"),r()()(),a(10,"div",5)(11,"div",9),g(12,"input",10),a(13,"label",11),c(14,"Minimum Inventory"),r()()(),a(15,"div",12)(16,"mat-form-field",13)(17,"mat-label"),c(18,"Additional Item"),r(),a(19,"mat-chip-grid",14,0),h(21,Ur,5,3,"mat-chip-row",15),a(22,"input",16),C("matChipInputTokenEnd",function(m){return x(s),D(t.addAdditonalItem(m))}),r()()()(),h(23,jr,11,2,"ng-container",17)(24,qr,10,2,"div",5)(25,Kr,11,2,"ng-container",17)(26,Zr,6,0,"ng-container",17)(27,Yr,6,0,"ng-container",17),a(28,"div",5)(29,"div",18),g(30,"input",19),a(31,"label",20),c(32,"WarehouseID"),r()()(),a(33,"div",5)(34,"div",21),g(35,"ng-select",22),a(36,"label",23),c(37,"Pricebook"),r()()()(),a(38,"div",24)(39,"div",5)(40,"div",25)(41,"label",26),c(42,"Synchronize Order"),r(),a(43,"div",27)(44,"mat-radio-group",28)(45,"mat-radio-button",29),c(46," Yes "),r(),a(47,"mat-radio-button",30),c(48," No "),r()()()()(),a(49,"div",5),h(50,Qr,10,5,"div",31),r()()()()()}if(i&2){let s,d,m,_=Be(20);l(),p("formGroup",t.form),l(4),p("ngClass",y(20,ra,!((s=t.advancedForm.get("Register"))!=null&&s.value))),l(),p("items",G(7,18,t.registers$)),l(10),ai(ne(22,Hr,t.additionalItems.length==0,t.additionalItems.length>0)),l(5),p("ngForOf",t.additionalItems),l(),p("matChipInputFor",_),l(),p("ngIf",(t.channel==null?null:t.channel.TypeID)==t.channelType.Shopify),l(),b(t.channelType.Shopee==t.channel.TypeID?24:-1),l(),p("ngIf",(t.channel==null?null:t.channel.TypeID)==t.channelType.Tiktok||(t.channel==null?null:t.channel.TypeID)==t.channelType.Shopee),l(),p("ngIf",(t.channel==null?null:t.channel.TypeID)==t.channelType.Tokopedia||(t.channel==null?null:t.channel.TypeID)==t.channelType.Shopee),l(),p("ngIf",(t.channel==null?null:t.channel.TypeID)==t.channelType.WooCommerce),l(7),p("ngClass",y(25,ra,!((d=t.advancedForm.get("PricebookID"))!=null&&d.value))),l(),p("items",t.pricebooks()),l(5),p("ngClass",y(27,la,!(!(t.syncForm==null||(m=t.syncForm.get("SyncOrder"))==null)&&m.value))),l(5),p("value",!0),l(2),p("value",!1),l(3),b((t.channel==null?null:t.channel.TypeID)!==t.channelType.Tokopedia?50:-1)}},dependencies:[I,L,fe,z,_e,te,Me,Y,$,Oe,Tt,H,X,Z,ee,oe,Si,oa,aa,na,nn,Ae,Ue,je,Qn,Yn,qn,ui,oo,W,R],encapsulation:2})}}return n})();var Ft=(()=>{class n{constructor(){this.channelService=f(Re),this._channelWarehouse=new We({isFirstLoad:!1,data:[]}),this._channelWarehouse$=this._channelWarehouse.asObservable()}getChannelWarehouse$(e){return this._channelWarehouse$.pipe(Q(({isFirstLoad:i,data:t})=>i?Ve(t):this.channelService.getChannelWarehouse(e).pipe(ie(s=>{this._channelWarehouse.next({isFirstLoad:!0,data:s.ChannelWarehouseLocation})}),se(s=>s.ChannelWarehouseLocation))))}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275prov=ge({token:n,factory:n.\u0275fac})}}return n})();var on=n=>({"is-invalid":n});function Jr(n,o){n&1&&(a(0,"div",10),c(1,"Channel name is required!"),r())}function Xr(n,o){n&1&&(a(0,"div",6)(1,"div",22),g(2,"input",23),a(3,"label",24),c(4,"Shop ID"),r()()())}function $r(n,o){n&1&&(a(0,"div",10),c(1,"Shop ID is required!"),r())}function el(n,o){if(n&1&&(a(0,"div",6)(1,"div",22),g(2,"input",25),a(3,"label",24),c(4,"Shop ID"),r(),h(5,$r,2,0,"div",10),r()()),n&2){let e=u();l(2),p("ngClass",y(2,on,(e.setupForm==null?null:e.setupForm.get("ShopID").invalid)&&((e.setupForm==null?null:e.setupForm.get("ShopID").dirty)||(e.setupForm==null?null:e.setupForm.get("ShopID").touched)))),l(3),b(e.setupForm!=null&&e.setupForm.get("ShopID").invalid&&(e.setupForm!=null&&e.setupForm.get("ShopID").dirty||e.setupForm!=null&&e.setupForm.get("ShopID").touched)?5:-1)}}function tl(n,o){n&1&&(a(0,"div",10),c(1,"Marketplace Url is required!"),r())}var ca=(()=>{class n{constructor(){this.formChannel=f(q),this.multiwarehouseService=f(Ft),this.form=this.formChannel.mainForm,this.setupForm=this.form.get("setup"),this.destroyRef=f(_n),this.channel=new le,this.channelType=w}ngOnChanges(e){F.IsNotEmpty(this.channel)&&(this.checkShopIdValidators(),this.checkUrlValidators())}checkUrlValidators(){let e=this.setupForm?.get("TypeID")?.value;e===w.WooCommerce||e===w.Shopify?this.setupForm?.get("URL")?.setValidators([K.required]):this.setupForm?.get("URL")?.clearValidators(),this.setupForm?.get("URL")?.updateValueAndValidity()}checkShopIdValidators(){let e=this.setupForm?.get("TypeID")?.value;e===w.Tokopedia||e===w.Shopee?this.setupForm?.get("ShopID")?.setValidators([K.required]):this.setupForm?.get("ShopID")?.clearValidators(),this.setupForm?.get("ShopID")?.updateValueAndValidity()}onChannelTypeChange(){this.checkShopIdValidators(),this.checkUrlValidators()}onMultiwarehouseChange(e){e.value?this.multiwarehouseService.getChannelWarehouse$(this.channel.ID).pipe(gt(this.destroyRef)).subscribe(i=>{this.formChannel.addGroupByWarehouseLocation(i)}):this.form.removeControl("warehouse")}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275cmp=S({type:n,selectors:[["app-marketplace-config"]],inputs:{channel:"channel"},features:[J],decls:39,vars:14,consts:[[3,"formGroup"],["formGroupName","setup"],[1,"card"],[1,"card-header"],[1,"card-body","mt-8"],[1,"row"],[1,"col-sm-6"],["matTooltipPosition","above","matTooltip","Your shop name in marketplace channel",1,"form-label-group"],["type","text","id","Name","placeholder","Name","formControlName","Name",1,"form-control","tall",3,"ngClass"],["for","Name"],[1,"invalid-feedback"],[1,"col-sm-6","me-0"],["matTooltipPosition","above","matTooltip","Marketplace / Website where your product is Sold / Distributed",1,"info-label-group","bg-body-secondary"],["matTooltipPosition","above","matTooltip","Fill with your Marketplace URL",1,"form-label-group"],["type","text","id","URL","placeholder","URL","name","URL","formControlName","URL",1,"form-control",3,"ngClass"],["for","URL"],[1,"col-6"],[1,"form-label-group","radio"],["for","enableWriteOff"],[1,"mt-3"],["formControlName","MultiWarehouse","name","multiWarehouse",3,"change"],[1,"me-5",3,"value"],["matTooltipPosition","above","matTooltip","Fill with your Shop ID",1,"form-label-group"],["type","text","id","ShopIDString","placeholder","Shop ID String","formControlName","ShopIDString","name","ShopIDString",1,"form-control"],["for","ShopID"],["type","number","id","ShopID","placeholder","Shop ID","formControlName","ShopID","name","ShopID",1,"form-control",3,"ngClass"]],template:function(i,t){if(i&1&&(a(0,"form",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"h3"),c(5,"Marketplace Setup"),r()(),a(6,"div",4)(7,"div",5)(8,"div",6)(9,"div",7),g(10,"input",8),a(11,"label",9),c(12,"Name"),r(),h(13,Jr,2,0,"div",10),r()(),a(14,"div",11)(15,"div",12)(16,"label"),c(17,"Type"),r(),a(18,"div")(19,"span"),c(20),r()()()(),h(21,Xr,5,0,"div",6)(22,el,6,4,"div",6),a(23,"div",6)(24,"div",13),g(25,"input",14),a(26,"label",15),c(27,"Marketplace URL"),r(),h(28,tl,2,0,"div",10),r()(),a(29,"div",16)(30,"div",17)(31,"label",18),c(32,"Multiwarehouse"),r(),a(33,"div",19)(34,"mat-radio-group",20),C("change",function(d){return t.onMultiwarehouseChange(d)}),a(35,"mat-radio-button",21),c(36," Yes "),r(),a(37,"mat-radio-button",21),c(38," No "),r()()()()()()()()()()),i&2){let s,d;p("formGroup",t.form),l(10),p("ngClass",y(10,on,(t.setupForm==null?null:t.setupForm.get("Name").invalid)&&((t.setupForm==null?null:t.setupForm.get("Name").dirty)||(t.setupForm==null?null:t.setupForm.get("Name").touched)))),l(3),b(t.setupForm!=null&&t.setupForm.get("Name").invalid&&(t.setupForm!=null&&t.setupForm.get("Name").dirty||t.setupForm!=null&&t.setupForm.get("Name").touched)?13:-1),l(7),v(t.channel==null?null:t.channel.TypeString),l(),b((t.channel==null?null:t.channel.TypeID)==t.channelType.Tiktok||(t.channel==null?null:t.channel.TypeID)==t.channelType.Lazada||(t.channel==null?null:t.channel.TypeID)==t.channelType.Shopify?21:-1),l(),b((t.channel==null?null:t.channel.TypeID)==t.channelType.Tokopedia||(t.channel==null?null:t.channel.TypeID)==t.channelType.Shopee?22:-1),l(3),p("ngClass",y(12,on,(t.setupForm==null||(s=t.setupForm.get("URL"))==null?null:s.invalid)&&((t.setupForm==null||(s=t.setupForm.get("URL"))==null?null:s.dirty)||(t.setupForm==null||(s=t.setupForm.get("URL"))==null?null:s.touched)))),l(3),b(!(t.setupForm==null||(d=t.setupForm.get("URL"))==null)&&d.invalid&&(!(t.setupForm==null||(d=t.setupForm.get("URL"))==null)&&d.dirty||!(t.setupForm==null||(d=t.setupForm.get("URL"))==null)&&d.touched)?28:-1),l(7),p("value",!0),l(2),p("value",!1)}},dependencies:[I,L,W,R,Y,$,Oe,Tt,H,X,Z,ee,oe,te,Ae,Ue,je],encapsulation:2})}}return n})();var an=n=>({"bg-gradient-warning":n}),da=(()=>{class n{constructor(){this.formService=f(q),this.form=this.formService.mainForm,this.syncForm=this.form.get("sync"),this.channel=new le,this.orderSyncOptions=Nt([]),this.cancelOrderSyncOptions=Nt([]),this.channelType=w,this.orderSyncTooltip=["Do not automatically sync orders from the channel to DealPOS.","Sync unpaid orders from the channel and create them as Sales Orders.","Sync only paid orders from the channel and create them as Invoices."],this.syncInventoryTooltip=["Include if the channel makes a transaction","No include if the channel makes a transaction"],this.cancelOrderTooltip=["If the order is already fulfilled, the POS invoice will not be voided.","The POS invoice will always be voided, even if the order is fulfilled."]}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275cmp=S({type:n,selectors:[["app-sync-config"]],inputs:{channel:"channel",orderSyncOptions:[1,"orderSyncOptions"],cancelOrderSyncOptions:[1,"cancelOrderSyncOptions"]},decls:26,vars:15,consts:[[3,"formGroup"],["formGroupName","sync"],[1,"card"],[1,"card-header"],[1,"card-body","mt-8"],[1,"row"],[1,"col-sm-12"],["id","NewOrderSyncTypeID",1,"form-label-group","radio",3,"ngClass"],["for","NewOrderSyncTypeID"],[1,"mt-3"],["formControlName","NewOrderSyncTypeID","name","NewOrderSyncTypeID",3,"options","title"],["id","CancelledOrderSyncTypeID",1,"form-label-group","radio",3,"ngClass"],["for","CancelledOrderSyncTypeID"],["formControlName","CancelledOrderSyncTypeID","name","CancelledOrderSyncTypeID",3,"options","title"],["matTooltipPosition","above","matTooltip","Automatically sync your POS inventory to channel inventory",1,"form-label-group","radio",3,"ngClass"],["for","SyncOrder"],["formControlName","SyncInventory","name","SyncInventory",3,"title"]],template:function(i,t){if(i&1&&(a(0,"form",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"h3"),c(5,"Synchronize"),r()(),a(6,"div",4)(7,"div",5)(8,"div",6)(9,"div",7)(10,"label",8),c(11,"New Order Sync"),r(),a(12,"div",9),g(13,"lib-radio-options",10),r()()(),a(14,"div",6)(15,"div",11)(16,"label",12),c(17,"Cancelled Order Sync"),r(),a(18,"div",9),g(19,"lib-radio-options",13),r()()(),a(20,"div",6)(21,"div",14)(22,"label",15),c(23,"Synchronize Inventory"),r(),a(24,"div",9),g(25,"lib-radio-options",16),r()()()()()()()()),i&2){let s;p("formGroup",t.form),l(9),p("ngClass",y(9,an,t.syncForm.get("NewOrderSyncTypeID").invalid)),l(4),p("options",t.orderSyncOptions())("title",t.orderSyncTooltip),l(2),p("ngClass",y(11,an,t.syncForm.get("CancelledOrderSyncTypeID").invalid)),l(4),p("options",t.cancelOrderSyncOptions())("title",t.cancelOrderTooltip),l(2),p("ngClass",y(13,an,!(!(t.syncForm==null||(s=t.syncForm.get("SyncInventory"))==null)&&s.value))),l(4),p("title",t.syncInventoryTooltip)}},dependencies:[I,L,W,R,Y,$,H,X,Z,ee,oe,Ae,te,jn,lo],styles:["ng-select.syncOrderOption .ng-dropdown-panel{z-index:1003!important}"]})}}return n})();var vt=(()=>{class n{constructor(){this.httpService=f(ye)}generateTokenExpiryMessage(e){let i="";switch(e){case w.Shopee:i="The expiry date for a token to call API to channel (automatically update every 4 hours)";break;case w.Lazada:i="The expiry date for a token to call API to channel (automatically update every 1 Month)";break;case w.Tiktok:i="The expiry date for a token to call API to channel (automatically update every 3 Days)";break}return i}onRefreshToken(e){return this.httpService.post("/api/channel/RefreshToken",{ID:e})}authorizedChannel(e){let i=this.getApiAuthorize(e);return this.httpService.post(`/api/${i}`,null).pipe(ie(t=>{window.open(t.Url,"_blank")}))}getApiAuthorize(e){let i;switch(e){case w.Shopee:i="ChannelAuthorization/ShopeeV2_URL";break;case w.Tiktok:i="ChannelAuthorization/Tiktok_URL";break;case w.Lazada:i="ChannelAuthorization/Lazada_URL";break}return i}isExpiredDate(e){let i=new Date;return e?.getTime()<i.getTime()}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275prov=ge({token:n,factory:n.\u0275fac})}}return n})();var nl=n=>({"bg-gradient-danger":n}),ol=(n,o)=>({"text-success":n,"text-danger":o});function al(n,o){n&1&&(a(0,"div",4)(1,"div",5)(2,"div",6),g(3,"input",7),a(4,"label",8),c(5,"Consumer Key"),r()()(),a(6,"div",9)(7,"div",10),g(8,"input",11),a(9,"label",12),c(10,"Consumer Secret"),r()()()())}function rl(n,o){if(n&1&&(a(0,"div",5)(1,"div",13)(2,"label"),c(3,"Authorized"),r(),a(4,"div")(5,"span"),c(6),r()()()()),n&2){let e=u();l(6),v(e.channel!=null&&e.channel.Authorized?"YES":"NO")}}function ll(n,o){if(n&1&&(a(0,"div",5)(1,"div",14),P(2,"expiredTime"),a(3,"label"),c(4,"Shop Expiration"),r(),a(5,"div")(6,"span"),c(7),P(8,"date"),r()()()()),n&2){let e=u();l(),p("ngClass",y(8,nl,G(2,3,e.channel==null?null:e.channel.ExpiredTime)))("matTooltip","The expiry date for "+(e.channel==null?null:e.channel.Name)+" Open API authorization from your account "+(e.channel==null?null:e.channel.Name)+" to Dealpos"),l(6),v(e.channel.ExpiredTime?me(8,5,e.channel.ExpiredTime,"dd MMM yyyy HH:mm"):"-")}}function sl(n,o){if(n&1&&(a(0,"div",5)(1,"div",15)(2,"label"),c(3,"Token Issued"),r(),a(4,"div")(5,"span"),c(6),P(7,"date"),r()()()()),n&2){let e=u(2);l(6),v(me(7,1,e.channel==null?null:e.channel.TokenIssued,"dd MMM yyyy HH:mm"))}}function cl(n,o){if(n&1){let e=A();a(0,"div",5)(1,"div",15)(2,"label"),c(3,"Refresh Token"),r(),a(4,"div")(5,"span",16),c(6),r()()()(),a(7,"div",5)(8,"div",17)(9,"label"),c(10,"Access Token"),r(),a(11,"div",18)(12,"span",16),c(13),r(),a(14,"span",19)(15,"button",20),C("click",function(){x(e);let t=u();return D(t.onRefreshToken())}),g(16,"i",21),a(17,"span"),c(18,"Refresh"),r()()()()()(),h(19,sl,8,4,"div",5),a(20,"div",5)(21,"div",22)(22,"label"),c(23,"Access Token Expired"),r(),a(24,"div",23)(25,"div",24),c(26),P(27,"date"),r(),a(28,"div",25)(29,"button",26),C("click",function(){x(e);let t=u();return D(t.onAuthorize())}),g(30,"i",27),a(31,"span"),c(32,"Extend"),r()()()()()()}if(n&2){let e=u();l(6),v(e.channel==null?null:e.channel.RefreshToken),l(7),v(e.channel==null?null:e.channel.AccessToken),l(6),b((e.channel==null?null:e.channel.TypeID)==e.channelType.Shopee?19:-1),l(2),p("matTooltip",e.tokenExpiryMessage),l(4),p("ngClass",ne(10,ol,!e.isAccessTokenExpired,e.isAccessTokenExpired)),l(),O(" ",me(27,7,e.channel==null?null:e.channel.TokenExpired,"dd MMM yyyy HH:mm")," "),l(2),li("matTooltip",(e.channel==null?null:e.channel.TypeID)==e.channelType.Shopee?"Extend Shopee Authorization Duration for an additional 1 year":"Update Token Expired date")}}function dl(n,o){n&1&&(a(0,"div",4)(1,"div",5)(2,"div",28)(3,"label",29),c(4,"Token Log"),r(),a(5,"div",30)(6,"mat-radio-group",31)(7,"mat-radio-button",32),c(8," Yes "),r(),a(9,"mat-radio-button",32),c(10," No "),r()()()()()()),n&2&&(l(7),p("value",!0),l(2),p("value",!1))}var pa=(()=>{class n{constructor(){this.formChannel=f(q),this.authorizeService=f(vt),this.toastr=f(ae),this.form=this.formChannel.mainForm,this.authorizedForm=this.form.get("authorized"),this.channelType=w,this.channel=new le,this.onSuccessRefrehToken=new j}ngOnChanges(e){e.data?.currentValue&&(this.checkExpiredToken(),this.tokenExpiryMessage=this.authorizeService.generateTokenExpiryMessage(this.channel.TypeID))}checkExpiredToken(){let e=new Date(this.channel?.TokenExpired),i=new Date(this.channel?.RefreshTokenExpired);this.isAccessTokenExpired=this.authorizeService.isExpiredDate(e),this.isRefreshTokenExpired=this.authorizeService.isExpiredDate(i)}onAuthorize(){this.authorizeService.authorizedChannel(this.channel?.TypeID).subscribe()}onRefreshToken(){this.authorizeService.onRefreshToken(this.channel.ID).subscribe(e=>{this.toastr.success("Token refreshed successfully!","Success").onShown.subscribe(()=>this.onSuccessRefrehToken.emit())})}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275cmp=S({type:n,selectors:[["app-authorized-config"]],inputs:{channel:"channel"},outputs:{onSuccessRefrehToken:"onSuccessRefrehToken"},features:[he([vt]),J],decls:10,vars:6,consts:[[1,"card","pt-12","border-top-0","rounded-0","rounded-bottom"],[3,"formGroup"],["formGroupName","authorized"],[1,"card-body"],[1,"row"],[1,"col-6"],["matTooltipPosition","above","matTooltip","Fill with your Marketplace Consumer Key",1,"form-label-group"],["type","text","id","consumerKey","placeholder","Consumer Key","formControlName","ConsumerKey","name","ConsumerKey",1,"form-control"],["for","consumerKey"],[1,"col-6","pe-8"],["matTooltipPosition","above","matTooltip","Fill with your Marketplace Consumer Secret",1,"form-label-group"],["type","text","id","consumerSecret","placeholder","Consumer Secret","formControlName","ConsumerSecret","name","ConsumerSecret",1,"form-control"],["for","consumerSecret"],["matTooltipPosition","above","matTooltip","Channel has been authorized to be managed by omni.dealpos.app",1,"info-label-group"],["matTooltipPosition","above",1,"info-label-group",3,"ngClass","matTooltip"],[1,"info-label-group"],[1,"text-wrap","text-break"],["matTooltipPosition","above","matTooltip","When your Shop Authorization has not expired you can try generate a new Access Token",1,"info-label-group"],[1,"d-flex","align-items-center","justify-content-between","w-100","text-wrap","text-break","py-3"],[1,"ms-4","text-end",2,"min-width","86px"],["type","button","matTooltip","Generate new access token",1,"btn","btn-outline-secondary","btn-sm",3,"click"],[1,"fa-solid","fa-arrows-rotate","me-2"],["matTooltipPosition","above",1,"info-label-group",3,"matTooltip"],[1,"d-flex","align-items-center","justify-content-between","w-100"],[3,"ngClass"],["matTooltipClass","unset-max-width-tooltip",3,"matTooltip"],["type","button",1,"btn","btn-outline-secondary","btn-sm",3,"click"],[1,"fas","fa-plus-circle","me-2"],[1,"form-label-group","radio"],["for","SyncOrder"],[1,"mt-4"],["formControlName","TokenLog","name","tokenLog"],[1,"me-5",3,"value"]],template:function(i,t){i&1&&(a(0,"div",0)(1,"form",1)(2,"div",2)(3,"div",3),h(4,al,11,0,"div",4),a(5,"div",4),h(6,rl,7,1,"div",5)(7,ll,9,10,"div",5)(8,cl,33,13),r(),h(9,dl,11,2,"div",4),r()()()()),i&2&&(l(),p("formGroup",t.form),l(3),b(t.channelType.WooCommerce==t.channel.TypeID||t.channelType.Shopify==t.channel.TypeID||t.channelType.Plugo==t.channel.TypeID?4:-1),l(2),b(t.channelType.Tokopedia==t.channel.TypeID||t.channelType.Shopee==t.channel.TypeID||t.channelType.Tiktok==t.channel.TypeID||t.channelType.Lazada==t.channel.TypeID?6:-1),l(),b((t.channel==null?null:t.channel.TypeID)==t.channelType.Shopee?7:-1),l(),b((t.channel==null?null:t.channel.TypeID)==t.channelType.Tiktok||(t.channel==null?null:t.channel.TypeID)==t.channelType.Lazada||(t.channel==null?null:t.channel.TypeID)==t.channelType.Shopee?8:-1),l(),b(t.channelType.Shopee==t.channel.TypeID?9:-1))},dependencies:[I,L,He,W,R,Y,$,Oe,H,X,Z,ee,oe,Ae,Ue,je,Pt],encapsulation:2})}}return n})();function ml(n,o){if(n&1){let e=A();a(0,"tr")(1,"td"),c(2),r(),a(3,"td"),c(4),r(),a(5,"td",11)(6,"mat-slide-toggle",12),pe("ngModelChange",function(t){let s=x(e).$implicit;return de(s.enabled,t)||(s.enabled=t),D(t)}),C("ngModelChange",function(){x(e);let t=u().ngIf,s=u();return D(s.onWebhookStateChange(t))}),r()()()}if(n&2){let e=o.$implicit;l(2),v(e.topic),l(2),v(e.addressWithoutHost),l(2),ce("ngModel",e.enabled)}}function hl(n,o){if(n&1&&(k(0),a(1,"table",5)(2,"thead",6)(3,"tr")(4,"th",7),c(5,"Event"),r(),a(6,"th",8),c(7,"Url"),r(),a(8,"th",9),c(9,"State"),r()()(),a(10,"tbody"),h(11,ml,7,3,"tr",10),r()(),E()),n&2){let e=o.ngIf;l(11),p("ngForOf",e)}}var ma=(()=>{class n{constructor(){this.shopifyWebhookService=f(Ye),this.wooCommerceService=f(Qe),this.channelFormService=f(q),this.form=this.channelFormService.mainForm,this.webhookForm=this.form.get("webhook")}ngOnChanges(e){this.channel&&this.initWebhook(this.channel)}initWebhook(e){switch(e.TypeID){case w.Shopify:this.webhooks$=this.shopifyWebhookService.getWebhookWithState(e.ID).pipe(ie(i=>{this.webhookForm.setValue({init:!0,data:i})}));break;case w.WooCommerce:this.webhooks$=this.wooCommerceService.getWebhookWithState(e.ID).pipe(ie(i=>{this.webhookForm.setValue({init:!0,data:i})}));break}}onWebhookStateChange(e){this.webhookForm.setValue({init:!0,data:e})}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275cmp=S({type:n,selectors:[["app-webhook-config"]],inputs:{channel:"channel"},features:[J],decls:7,vars:3,consts:[[1,"card","pt-12","border-top-0","rounded-0","rounded-bottom"],[1,"card-body"],[1,"row"],[1,"col-12"],[4,"ngIf"],[1,"table","mb-6","w-50"],[1,"thead-light"],["scope","col",2,"width","100px"],["scope","col"],["scope","col",1,"text-center",2,"width","100px"],[4,"ngFor","ngForOf"],[1,"text-center"],[3,"ngModelChange","ngModel"]],template:function(i,t){i&1&&(a(0,"div",0)(1,"div")(2,"div",1)(3,"div",2)(4,"div",3),h(5,hl,12,1,"ng-container",4),P(6,"async"),r()()()()()),i&2&&(l(5),p("ngIf",G(6,1,t.webhooks$)))},dependencies:[I,fe,z,_e,te,hi,mi,lt,H,wt],styles:[".example-section[_ngcontent-%COMP%]{display:flex;align-content:center;align-items:center;height:60px}.example-margin[_ngcontent-%COMP%]{margin:10px}"],changeDetection:0})}}return n})();var ul=n=>({"is-invalid":n});function fl(n,o){n&1&&(a(0,"div",9),c(1," Email is not valid "),r())}function gl(n,o){if(n&1&&(a(0,"div",5)(1,"span",10),g(2,"app-channel-category-select",11),r()()),n&2){let e=u();l(2),p("channelId",e.channel.ID)("channelType",e.channel.TypeID)("showClear",!1)("showLabel",!0)}}function vl(n,o){n&1&&(a(0,"div",5)(1,"div",12),g(2,"input",13),a(3,"label",14),c(4,"Brand"),r()()(),a(5,"div",5)(6,"div",15),g(7,"input",16),a(8,"label",14),c(9,"Scan Product Size"),r()()())}var ha=(()=>{class n{constructor(){this.formChannel=f(q),this.form=this.formChannel.mainForm,this.defaultForm=this.form.get("default"),this.channel=new le,this.channelType=w}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275cmp=S({type:n,selectors:[["app-default-config"]],inputs:{channel:"channel"},decls:13,vars:7,consts:[[1,"card","pt-12","border-top-0","rounded-0","rounded-bottom"],[3,"formGroup"],["formGroupName","default"],[1,"card-body"],[1,"row"],[1,"col-6"],["matTooltipPosition","above","matTooltip","Change the customer's name from the order in the marketplace according this email",1,"form-label-group"],["type","email","name","Email","placeholder","Email","formControlName","CustomerDefaultEmail",1,"form-control",3,"ngClass"],["for","Name"],[1,"invalid-feedback"],[1,"p-float-label"],["formControlName","DefaultCategoryID",3,"channelId","channelType","showClear","showLabel"],["matTooltipPosition","above","matTooltip","Brand name for product upload",1,"form-label-group"],["type","text","name","Brand","placeholder","Brand Name","id","Brand","formControlName","Brand",1,"form-control"],["for","Brand"],["matTooltipPosition","above","matTooltip","Customize Scan Product Size",1,"form-label-group"],["type","number","name","ScanProductSize","placeholder","Scan Product Size","id","Brand","formControlName","ScanProductSize",1,"form-control"]],template:function(i,t){if(i&1&&(a(0,"div",0)(1,"form",1)(2,"div",2)(3,"div",3)(4,"div",4)(5,"div",5)(6,"div",6),g(7,"input",7),a(8,"label",8),c(9,"Customer Default Email"),r(),h(10,fl,2,0,"div",9),r()(),h(11,gl,3,4,"div",5)(12,vl,10,0),r()()()()()),i&2){let s,d;l(),p("formGroup",t.form),l(6),p("ngClass",y(5,ul,((s=t.defaultForm.get("CustomerDefaultEmail"))==null?null:s.invalid)&&(((s=t.defaultForm.get("CustomerDefaultEmail"))==null?null:s.dirty)||((s=t.defaultForm.get("CustomerDefaultEmail"))==null?null:s.touched)))),l(3),b((d=t.defaultForm.get("CustomerDefaultEmail"))!=null&&d.invalid&&((d=t.defaultForm.get("CustomerDefaultEmail"))!=null&&d.dirty||(d=t.defaultForm.get("CustomerDefaultEmail"))!=null&&d.touched)?10:-1),l(),b(t.channel.TypeID!=t.channelType.Shopify&&t.channel.TypeID!=t.channelType.Lazada?11:-1),l(),b(t.channel.TypeID==t.channelType.Lazada||t.channel.TypeID==t.channelType.WooCommerce?12:-1)}},dependencies:[I,L,lt,$,Oe,Tt,H,X,W,R,ro,Y,Z,ee,oe],encapsulation:2})}}return n})();function _l(n,o){if(n&1&&(k(0),a(1,"tr")(2,"td",6),c(3),r(),a(4,"td")(5,"ng-select",9),c(6," > "),r()()(),E()),n&2){let e=o.$implicit,i=u(2);l(3),O(" ",e.Name," "),l(2),p("items",i.outlets)("formControlName",e.Name)}}function yl(n,o){if(n&1){let e=A();a(0,"div",8)(1,"button",10),C("click",function(){x(e);let t=u(2);return D(t.unSync())}),g(2,"i",11),a(3,"span"),c(4,"Unsynchronize Warehouse"),r()()()}}function bl(n,o){if(n&1&&(a(0,"form",2)(1,"div",3)(2,"table",4)(3,"thead")(4,"tr",5)(5,"th",6),c(6,"Shopee Warehouse"),r(),a(7,"th",6),c(8,"DealPOS Outlet"),r()()(),a(9,"tbody"),h(10,_l,7,3,"ng-container",7),P(11,"async"),r()()()(),h(12,yl,5,0,"div",8)),n&2){let e=u();p("formGroup",e.form),l(10),p("ngForOf",G(11,3,e.warehouse$)),l(2),b((e.initialWarehouse==null?null:e.initialWarehouse.length)>0?12:-1)}}function Cl(n,o){if(n&1){let e=A();a(0,"div",12)(1,"div",13),g(2,"i",14),r(),a(3,"p",15),c(4," Use the synchronization button to load warehouse on Shopee and map between Shopee warehouse and DealPOS warehouse for Inventory Synchronization "),r()(),a(5,"div",16)(6,"button",10),C("click",function(){x(e);let t=u();return D(t.onSync())}),g(7,"i",11),a(8,"span"),c(9,"Synchronize Warehouse"),r()()()}}var ua=(()=>{class n{constructor(){this.formChannel=f(q),this.toastr=f(ae),this.channelService=f(Re),this.multiwarehouseService=f(Ft),this.form=this.formChannel.mainForm}ngOnChanges(){this.channel?.WarehouseLocations?.length>0&&(this.onSync(),this.initialWarehouse=this.channel.WarehouseLocations)}onSync(){this.warehouse$=this.multiwarehouseService.getChannelWarehouse$(this.channel?.ID).pipe(se(e=>{let i,t=e.map(s=>(i=this.channel.WarehouseLocations.find(d=>d.ID===s.ID),F.IsNotEmpty(i)&&(s.ProductInventoryOutlet=i.ProductInventoryOutlet),s));return this.setFormOnSync(t),t}),Ce(1))}setFormOnSync(e){let i=this.form.get("warehouse")?.value;(F.IsEmpty(i)||Object.keys(i)?.length==0)&&this.formChannel.addGroupByWarehouseLocation(e)}unSync(){this.channelService.unSynchronizedWarehouse(this.channel.ID).subscribe(e=>{this.warehouse$=null,this.toastr.success(e?.Message,"Success"),this.removeWarehouseCtrl(),this.initialWarehouse=[]})}removeWarehouseCtrl(){this.form.removeControl("warehouse")}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275cmp=S({type:n,selectors:[["app-multi-warehouse-config"]],inputs:{channel:"channel",outlets:"outlets"},features:[J],decls:5,vars:3,consts:[[1,"card","pt-12","border-top-0","rounded-0","rounded-bottom"],[1,"card-body"],[3,"formGroup"],["formGroupName","warehouse"],[1,"table","table-bordered","mb-12","w-50"],[1,"table-light"],[1,"text-start"],[4,"ngFor","ngForOf"],[1,"d-flex","justify-content-start","align-items-start","my-6"],["id","outletOrder","bindLabel","Outlet","bindValue","Outlet","name","Outlet","placeholder","Select Outlet",1,"tall",3,"items","formControlName"],["type","button",1,"btn","btn-outline-secondary",3,"click"],[1,"fa-solid","fa-refresh","me-2"],[1,"d-flex","border","p-6","align-items-start","justify-content-start",2,"background","#1f87ac0a","border-radius","5px"],[1,"me-3"],[1,"fa","fa-circle-info","fs-5","pt-1"],[2,"margin-bottom","0px","margin-top","0px"],[1,"d-flex","justify-content-end","align-items-start","my-6"]],template:function(i,t){i&1&&(a(0,"div",0)(1,"div",1),h(2,bl,13,5),P(3,"async"),h(4,Cl,10,0),r()()),i&2&&(l(2),b(G(3,1,t.warehouse$)?2:4))},dependencies:[I,fe,_e,Y,$,H,X,Z,ee,oe,te,Me,lt],encapsulation:2})}}return n})();var _t=n=>({active:n}),Sl=(n,o)=>({"bg-gradient-danger":n,active:o}),pt=n=>({"show active":n});function wl(n,o){if(n&1){let e=A();k(0),a(1,"button",19),C("click",function(){x(e);let t=u();return D(t.currentTabActive="authorized")}),c(2," Authorization "),r(),E()}if(n&2){let e=o.ngIf,i=u();l(),p("ngClass",ne(1,Sl,!(e!=null&&e.Authorized),i.currentTabActive=="authorized"))}}function Tl(n,o){if(n&1){let e=A();a(0,"button",20),C("click",function(){x(e);let t=u();return D(t.currentTabActive="warehouse")}),c(1," Multi Warehouse "),r()}if(n&2){let e=u();p("ngClass",y(1,_t,e.currentTabActive=="warehouse"))}}function Il(n,o){if(n&1){let e=A();a(0,"button",22),C("click",function(){x(e);let t=u(2);return D(t.currentTabActive="webhook")}),c(1," Webhook "),r()}if(n&2){let e=u(2);p("ngClass",y(1,_t,e.currentTabActive=="webhook"))}}function xl(n,o){if(n&1&&(k(0),h(1,Il,2,3,"button",21),E()),n&2){let e=o.ngIf,i=u();l(),b(e.TypeID==i.channelType.WooCommerce||e.TypeID==i.channelType.Shopify?1:-1)}}function Dl(n,o){if(n&1&&(k(0),g(1,"app-outle-config",32),E()),n&2){let e=u().ngIf;l(),p("outlets",e==null||e.Options==null?null:e.Options.ListOutlet)}}function kl(n,o){if(n&1&&(k(0),g(1,"app-orders-config",33),E()),n&2){let e=u().ngIf;l(),p("channel",e==null?null:e.Model)("taxes",e==null||e.Options==null?null:e.Options.ListTax)("salesTypes",e==null||e.Options==null?null:e.Options.ListSalesOrderType)("paymentMethods",e==null||e.Options==null?null:e.Options.ListPaymentMethod)}}function El(n,o){if(n&1&&(k(0),g(1,"app-invoice-fee-config",34),E()),n&2){let e=u().ngIf;l(),p("channel",e==null?null:e.Model)("listWriteOff",e==null||e.Options==null?null:e.Options.ListWriteOff)}}function Pl(n,o){if(n&1&&(k(0),g(1,"app-advanced-config",35),E()),n&2){let e=u().ngIf;l(),p("channel",e==null?null:e.Model)("pricebooks",e==null||e.Options==null?null:e.Options.Pricebooks)}}function Ol(n,o){if(n&1){let e=A();k(0),a(1,"app-authorized-config",36),C("onSuccessRefrehToken",function(){x(e);let t=u(2);return D(t.onRefreshToken())}),r(),E()}if(n&2){let e=u().ngIf;l(),p("channel",e==null?null:e.Model)}}function Ml(n,o){if(n&1&&(k(0),g(1,"app-default-config",6),E()),n&2){let e=u().ngIf;l(),p("channel",e==null?null:e.Model)}}function Fl(n,o){if(n&1&&(a(0,"div",30),g(1,"app-multi-warehouse-config",37),r()),n&2){let e=u().ngIf,i=u();p("ngClass",y(3,pt,i.currentTabActive=="warehouse")),l(),p("channel",e==null?null:e.Model)("outlets",e==null||e.Options==null?null:e.Options.ListOutlet)}}function Rl(n,o){if(n&1&&(k(0),g(1,"app-webhook-config",6),E()),n&2){let e=u().ngIf;l(),p("channel",e==null?null:e.Model)}}function Al(n,o){if(n&1&&(a(0,"div",23)(1,"div",24),h(2,Dl,2,1,"ng-container",15),r(),a(3,"div",25),h(4,kl,2,4,"ng-container",15),r(),a(5,"div",26),h(6,El,2,2,"ng-container",15),r(),a(7,"div",27),h(8,Pl,2,2,"ng-container",15),r(),a(9,"div",28),h(10,Ol,2,1,"ng-container",15),r(),a(11,"div",29),h(12,Ml,2,1,"ng-container",15),r(),h(13,Fl,2,5,"div",30),a(14,"div",31),h(15,Rl,2,1,"ng-container",15),r()()),n&2){let e,i=u();l(),p("ngClass",y(15,pt,i.currentTabActive=="outlet")),l(),p("ngIf",i.currentTabActive=="outlet"),l(),p("ngClass",y(17,pt,i.currentTabActive=="orders")),l(),p("ngIf",i.currentTabActive=="orders"),l(),p("ngClass",y(19,pt,i.currentTabActive=="serviceFee")),l(),p("ngIf",i.currentTabActive=="serviceFee"),l(),p("ngClass",y(21,pt,i.currentTabActive=="advanced")),l(),p("ngIf",i.currentTabActive=="advanced"),l(),p("ngClass",y(23,pt,i.currentTabActive=="authorized")),l(),p("ngIf",i.currentTabActive=="authorized"),l(),p("ngClass",y(25,pt,i.currentTabActive=="default")),l(),p("ngIf",i.currentTabActive=="default"),l(),b(!(i.setupForm==null||(e=i.setupForm.get("MultiWarehouse"))==null)&&e.value?13:-1),l(),p("ngClass",y(27,pt,i.currentTabActive=="webhook")),l(),p("ngIf",i.currentTabActive=="webhook")}}var wi=(()=>{class n{constructor(e,i,t){this.route=e,this.service=i,this.Toastr=t,this.channelService=f(Re),this.shopifyWebhookService=f(Ye),this.wooWebhookService=f(Qe),this.channelFormService=f(q),this.form=this.channelFormService.mainForm,this.setupForm=this.form.get("setup"),this.currentTabActive="outlet",this.channelType=w,this.initLoadForm(),this.onEnabledMultiWarehouse()}initLoadForm(){let e=this.route.snapshot.params,i=F.IsNotEmpty(e.ID)?e.ID:F.GuidEMpty;this.loadForm$=this.channelFormService.getLoadForm$(i).pipe(Ce(1))}onRefreshToken(){this.initLoadForm(),this.currentTabActive="authorized"}onEnabledMultiWarehouse(){this.setupForm?.get("MultiWarehouse").valueChanges.pipe(gt()).subscribe(e=>{this.currentTabActive="outlet"})}onSubmit(){let e=this.channelFormService.getFormValue(),i=this.saveWebhooks(e);ze(this.channelService.saveChannel(e).pipe(se(t=>({type:"CHANNEL",data:t}))),i.pipe(se(t=>({type:"WEBHOOK",data:t})))).subscribe(t=>{t.type==="CHANNEL"&&(this.Toastr.success("Successfully submitted the Channel","Success!"),this.service.navigate(["/menu/channel"]))})}saveWebhooks(e){if(this.channelFormService.getWebhooks().init)switch(e.TypeID){case w.Shopify:return this.shopifyWebhookService.getWebhookWithState(e.ID).pipe(Q(t=>this.checkWebhookChanges(e,t)));case w.WooCommerce:return this.wooWebhookService.getWebhookWithState(e.ID).pipe(Q(t=>this.checkWebhookChanges(e,t)));default:return At}else return At}checkWebhookChanges(e,i){let t=this.channelFormService.getWebhooks(),s=t.data.filter(m=>m.enabled);if(this.isUpdateWebhooks(i,t.data))switch(e.TypeID){case w.Shopify:return this.shopifyWebhookService.updateWebhook(e.ID,s);case w.WooCommerce:return this.wooWebhookService.updateWebhook(e.ID,s);default:return At}else return At}isUpdateWebhooks(e,i){return e.filter(s=>!i.some(d=>d.topic===s.topic&&d.enabled===s.enabled)).length>0}static{this.\u0275fac=function(i){return new(i||n)(V(ci),V(at),V(ae))}}static{this.\u0275cmp=S({type:n,selectors:[["app-marketplace-form"]],features:[he([Qe,Ye,Ft])],decls:34,vars:30,consts:[["headerTitle","Configure Channel",3,"hideSearchBox","hideSearchDropdown"],["role","button","routerLink","/menu/channel",1,"btn","btn-secondary","me-3"],["role","button",1,"btn","btn-success","text-white",3,"click","disabled"],[1,"container-fluid","py-5","bg-light-gray"],[1,"row"],[1,"col-8"],[3,"channel"],[1,"col-4"],[3,"channel","orderSyncOptions","cancelOrderSyncOptions"],[1,"col-12"],["id","nav-tab","role","tablist",1,"nav","nav-tabs"],["id","nav-outlet-config-tab","data-bs-toggle","tab","data-bs-target","#nav-outlet-config","type","button","role","tab","aria-controls","nav-outlet-config","aria-selected","true",1,"nav-link","active",3,"click","ngClass"],["id","nav-order-config-tab","data-bs-toggle","tab","data-bs-target","#nav-order-config","type","button","role","tab","aria-controls","nav-order-config","aria-selected","false",1,"nav-link",3,"click","ngClass"],["id","nav-invoice-fee-tab","data-bs-toggle","tab","data-bs-target","#nav-invoice-fee","type","button","role","tab","aria-controls","nav-invoice-fee","aria-selected","false",1,"nav-link",3,"click","ngClass"],["id","nav-advanced-tab","data-bs-toggle","tab","data-bs-target","#nav-advanced","type","button","role","tab","aria-controls","nav-advanced","aria-selected","false",1,"nav-link",3,"click","ngClass"],[4,"ngIf"],["id","nav-default-tab","data-bs-toggle","tab","data-bs-target","#nav-default","type","button","role","tab","aria-controls","nav-default","aria-selected","false",1,"nav-link",3,"click","ngClass"],["id","nav-warehouse-tab","data-bs-toggle","tab","data-bs-target","#nav-warehouse","type","button","role","tab","aria-controls","nav-warehouse","aria-selected","false",1,"nav-link",3,"ngClass"],["class","tab-content","id","nav-tabContent",4,"ngIf"],["id","nav-authorized-tab","data-bs-toggle","tab","data-bs-target","#nav-authorized","type","button","role","tab","aria-controls","nav-authorized","aria-selected","false",1,"nav-link",3,"click","ngClass"],["id","nav-warehouse-tab","data-bs-toggle","tab","data-bs-target","#nav-warehouse","type","button","role","tab","aria-controls","nav-warehouse","aria-selected","false",1,"nav-link",3,"click","ngClass"],["id","nav-webhook-tab","data-bs-toggle","tab","data-bs-target","#nav-webhook","type","button","role","tab","aria-controls","nav-webhook","aria-selected","false",1,"nav-link",3,"ngClass"],["id","nav-webhook-tab","data-bs-toggle","tab","data-bs-target","#nav-webhook","type","button","role","tab","aria-controls","nav-webhook","aria-selected","false",1,"nav-link",3,"click","ngClass"],["id","nav-tabContent",1,"tab-content"],["id","nav-outlet-config","role","tabpanel","aria-labelledby","nav-outlet-config-tab",1,"tab-pane","fade","show","active",3,"ngClass"],["id","nav-order-config","role","tabpanel","aria-labelledby","nav-order-config-tab",1,"tab-pane","fade",3,"ngClass"],["id","nav-invoice-fee","role","tabpanel","aria-labelledby","nav-invoice-fee-tab",1,"tab-pane","fade",3,"ngClass"],["id","nav-advanced","role","tabpanel","aria-labelledby","nav-advanced-tab",1,"tab-pane","fade",3,"ngClass"],["id","nav-authorized","role","tabpanel","aria-labelledby","nav-authorized-tab",1,"tab-pane","fade",3,"ngClass"],["id","nav-default","role","tabpanel","aria-labelledby","nav-default-tab",1,"tab-pane","fade",3,"ngClass"],["id","nav-warehouse","role","tabpanel","aria-labelledby","nav-warehouse-tab",1,"tab-pane","fade",3,"ngClass"],["id","nav-webhook","role","tabpanel","aria-labelledby","nav-webhook-tab",1,"tab-pane","fade",3,"ngClass"],[3,"outlets"],[3,"channel","taxes","salesTypes","paymentMethods"],[3,"channel","listWriteOff"],[3,"channel","pricebooks"],[3,"onSuccessRefrehToken","channel"],[3,"channel","outlets"]],template:function(i,t){if(i&1){let s=A();a(0,"mainpanel",0)(1,"actions")(2,"button",1),c(3," Cancel "),r(),a(4,"button",2),C("click",function(){return x(s),D(t.onSubmit())}),c(5," Submit "),r()(),a(6,"content"),wn(7),P(8,"async"),a(9,"div",3)(10,"div",4)(11,"div",5),g(12,"app-marketplace-config",6),r(),a(13,"div",7),g(14,"app-sync-config",8),r()(),a(15,"div",4)(16,"div",9)(17,"nav")(18,"div",10)(19,"button",11),C("click",function(){return x(s),D(t.currentTabActive="outlet")}),c(20," Outlet "),r(),a(21,"button",12),C("click",function(){return x(s),D(t.currentTabActive="orders")}),c(22," Orders "),r(),a(23,"button",13),C("click",function(){return x(s),D(t.currentTabActive="serviceFee")}),c(24," Service Fee "),r(),a(25,"button",14),C("click",function(){return x(s),D(t.currentTabActive="advanced")}),c(26," Advanced "),r(),h(27,wl,3,4,"ng-container",15),a(28,"button",16),C("click",function(){return x(s),D(t.currentTabActive="default")}),c(29," Default "),r(),h(30,Tl,2,3,"button",17)(31,xl,2,1,"ng-container",15),r()(),h(32,Al,16,29,"div",18),P(33,"async"),r()()()()()}if(i&2){let s;p("hideSearchBox",!0)("hideSearchDropdown",!0),l(4),p("disabled",t.form.invalid);let d=G(8,16,t.loadForm$);l(8),p("channel",d==null?null:d.Model),l(2),p("channel",d==null?null:d.Model)("orderSyncOptions",d==null||d.Options==null?null:d.Options.NewOrderSyncTypeOptions)("cancelOrderSyncOptions",d==null||d.Options==null?null:d.Options.CancelledOrderSyncOptions),l(5),p("ngClass",y(20,_t,t.currentTabActive=="outlet")),l(2),p("ngClass",y(22,_t,t.currentTabActive=="orders")),l(2),p("ngClass",y(24,_t,t.currentTabActive=="serviceFee")),l(2),p("ngClass",y(26,_t,t.currentTabActive=="advanced")),l(2),p("ngIf",d==null?null:d.Model),l(),p("ngClass",y(28,_t,t.currentTabActive=="default")),l(2),b(!(t.setupForm==null||(s=t.setupForm.get("MultiWarehouse"))==null)&&s.value?30:-1),l(),p("ngIf",d==null?null:d.Model),l(),p("ngIf",G(33,18,t.loadForm$))}},dependencies:[I,L,z,_e,Dt,Fe,Ko,Zo,Yo,sa,ca,da,pa,ma,ha,rt,Pe,ua],styles:[".mb-1rem[_ngcontent-%COMP%]{margin-bottom:1rem} .mat-form-field-appearance-outline .mat-form-field-outline-thick{color:solid 1.5px #1a73e8!important} ng-select.multiple-select>div.ng-select-container div.ng-value-container div.ng-placeholder{top:-10px!important} ng-select.multiple-select>div.ng-select-container input{padding-top:0!important} ng-select.danger>div.ng-select-container{background:repeating-linear-gradient(-60deg,#fcf3cf,#fcf3cf 15px,#f9e79f 15px 30px)!important}.tab-pane[_ngcontent-%COMP%]{margin-top:0!important}"]})}}return n})();function Nl(n,o){if(n&1&&(k(0),a(1,"div",3)(2,"div",10)(3,"label"),c(4,"Order Fulfillment Webhook Handling"),r(),a(5,"div")(6,"span"),c(7),r()()()(),E()),n&2){let e=u();l(7),v((e.data==null?null:e.data.FulfillmentWebhookHandling)==0?"Do Nothing":(e.data==null?null:e.data.FulfillmentWebhookHandling)==1?"Create Outbound Logistic":"Reserve for Future")}}function Ll(n,o){if(n&1&&(k(0),a(1,"div",3)(2,"div",11)(3,"label"),c(4,"Process Automatic Return"),r(),a(5,"div")(6,"span"),c(7),r()()()(),E()),n&2){let e=u();l(7),v(e.data==null?null:e.data.ReturnProcess)}}function Wl(n,o){if(n&1&&(k(0),a(1,"div",3)(2,"div",12)(3,"label"),c(4,"Ignore Cancelled Order for Fulfilled Orders"),r(),a(5,"div")(6,"span"),c(7),r()()()(),E()),n&2){let e=u();l(7),v(e.data.IgnoreReverseOrder?"YES":"NO")}}function Vl(n,o){if(n&1&&(k(0),a(1,"div",3)(2,"div",13)(3,"label"),c(4,"Size Chart"),r(),a(5,"div",14)(6,"a",15),c(7),r()()()(),E()),n&2){let e=u();l(6),p("href",e.data.SizeChart,ht),l(),v(e.data.SizeChart)}}function zl(n,o){if(n&1&&(k(0),a(1,"div",3)(2,"div",16)(3,"label"),c(4,"ShippingFee"),r(),a(5,"div")(6,"span"),c(7),r()()()(),E()),n&2){let e=u();l(7),v(e.data.ShippingFee)}}function Gl(n,o){if(n&1&&(a(0,"div",3)(1,"div",17)(2,"label"),c(3,"Pricebook"),r(),a(4,"div")(5,"span"),c(6),r()()()()),n&2){let e=u();l(6),v(e.data==null?null:e.data.PricebookName)}}function Bl(n,o){if(n&1&&(a(0,"div",3)(1,"div",18)(2,"label"),c(3,"Unpaid Order"),r(),a(4,"div")(5,"span"),c(6),r()()()()),n&2){let e=u();l(6),v(e.data.UnpaidOrder?"YES":"NO")}}var fa=(()=>{class n{constructor(){this.channelType=w}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275cmp=S({type:n,selectors:[["app-advanced-config-info"]],inputs:{data:"data"},decls:46,vars:14,consts:[[1,"card","pt-12","border-top-0","rounded-0","rounded-bottom"],[1,"card-body"],[1,"row"],[1,"col-6"],["matTooltipPosition","above","matTooltip","Register where the transaction is recorded in POS",1,"info-label-group"],["matTooltipPosition","above","matTooltipClass","custom-width-tooltip","matTooltip",`Please input SKU Product for add Additional products that will be entered automatically in every transaction from the marketplace, Example : Paperbag
|
|
10
|
+
- Unfulfilled orders \u2192 still auto-voided`,1,"form-label-group","radio"],["for","enableWriteOff"],["formControlName","IgnoreReverseOrder","name","enableWriteOff"],["matTooltip","Image URL for Tokopedia Product Size Chart","matTooltipPosition","above",1,"form-label-group"],["type","text","id","SizeChart","placeholder","Size Chart","formControlName","SizeChart","name","SizeChart",1,"form-control"],["for","SizeChart"],["matTooltip","Please input Product SKU to automatically add additional product to record the amount of the shipping fee in order","matTooltipPosition","above",1,"form-label-group"],["type","text","id","ShippingFee","placeholder","Shipping Fee","formControlName","ShippingFee","name","ShippingFee",1,"form-control"],["for","ShippingFee"],["matTooltipPosition","above","matTooltip","Insert Order configuration when you have or have not paid",1,"form-label-group","radio",3,"ngClass"],["formControlName","UnpaidOrder","name","UnpaidOrder"],["matTooltip","Insert Order When Unpaid",1,"me-5",3,"value"],["matTooltip","Skip Insert Order When Unpaid",1,"me-5",3,"value"]],template:function(i,t){if(i&1){let s=A();a(0,"div",1)(1,"form",2)(2,"div",3)(3,"div",4)(4,"div",5)(5,"div",6),g(6,"ng-select",7),P(7,"async"),a(8,"label",8),c(9,"Register"),r()()(),a(10,"div",5)(11,"div",9),g(12,"input",10),a(13,"label",11),c(14,"Minimum Inventory"),r()()(),a(15,"div",12)(16,"mat-form-field",13)(17,"mat-label"),c(18,"Additional Item"),r(),a(19,"mat-chip-grid",14,0),u(21,Ur,5,3,"mat-chip-row",15),a(22,"input",16),C("matChipInputTokenEnd",function(m){return x(s),D(t.addAdditonalItem(m))}),r()()()(),u(23,jr,11,2,"ng-container",17)(24,qr,10,2,"div",5)(25,Kr,11,2,"ng-container",17)(26,Zr,6,0,"ng-container",17)(27,Yr,6,0,"ng-container",17),a(28,"div",5)(29,"div",18),g(30,"input",19),a(31,"label",20),c(32,"WarehouseID"),r()()(),a(33,"div",5)(34,"div",21),g(35,"ng-select",22),a(36,"label",23),c(37,"Pricebook"),r()()()(),a(38,"div",24)(39,"div",5)(40,"div",25)(41,"label",26),c(42,"Synchronize Order"),r(),a(43,"div",27)(44,"mat-radio-group",28)(45,"mat-radio-button",29),c(46," Yes "),r(),a(47,"mat-radio-button",30),c(48," No "),r()()()()(),a(49,"div",5),u(50,Qr,10,5,"div",31),r()()()()()}if(i&2){let s,d,m,_=Be(20);l(),p("formGroup",t.form),l(4),p("ngClass",y(20,aa,!((s=t.advancedForm.get("Register"))!=null&&s.value))),l(),p("items",G(7,18,t.registers$)),l(10),oi(ne(22,Hr,t.additionalItems.length==0,t.additionalItems.length>0)),l(5),p("ngForOf",t.additionalItems),l(),p("matChipInputFor",_),l(),p("ngIf",(t.channel==null?null:t.channel.TypeID)==t.channelType.Shopify),l(),b(t.channelType.Shopee==t.channel.TypeID?24:-1),l(),p("ngIf",(t.channel==null?null:t.channel.TypeID)==t.channelType.Tiktok||(t.channel==null?null:t.channel.TypeID)==t.channelType.Shopee),l(),p("ngIf",(t.channel==null?null:t.channel.TypeID)==t.channelType.Tokopedia||(t.channel==null?null:t.channel.TypeID)==t.channelType.Shopee),l(),p("ngIf",(t.channel==null?null:t.channel.TypeID)==t.channelType.WooCommerce),l(7),p("ngClass",y(25,aa,!((d=t.advancedForm.get("PricebookID"))!=null&&d.value))),l(),p("items",t.pricebooks()),l(5),p("ngClass",y(27,ra,!(!(t.syncForm==null||(m=t.syncForm.get("SyncOrder"))==null)&&m.value))),l(5),p("value",!0),l(2),p("value",!1),l(3),b((t.channel==null?null:t.channel.TypeID)!==t.channelType.Tokopedia?50:-1)}},dependencies:[I,L,fe,z,_e,te,Me,Y,$,Oe,Tt,H,X,Z,ee,oe,Ci,na,oa,ia,tn,Ae,Ue,je,Yn,Zn,jn,hi,no,W,R],encapsulation:2})}}return n})();var Ft=(()=>{class n{constructor(){this.channelService=f(Re),this._channelWarehouse=new We({isFirstLoad:!1,data:[]}),this._channelWarehouse$=this._channelWarehouse.asObservable()}getChannelWarehouse$(e){return this._channelWarehouse$.pipe(Q(({isFirstLoad:i,data:t})=>i?Ve(t):this.channelService.getChannelWarehouse(e).pipe(ie(s=>{this._channelWarehouse.next({isFirstLoad:!0,data:s.ChannelWarehouseLocation})}),se(s=>s.ChannelWarehouseLocation))))}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275prov=ge({token:n,factory:n.\u0275fac})}}return n})();var nn=n=>({"is-invalid":n});function Jr(n,o){n&1&&(a(0,"div",10),c(1,"Channel name is required!"),r())}function Xr(n,o){n&1&&(a(0,"div",6)(1,"div",22),g(2,"input",23),a(3,"label",24),c(4,"Shop ID"),r()()())}function $r(n,o){n&1&&(a(0,"div",10),c(1,"Shop ID is required!"),r())}function el(n,o){if(n&1&&(a(0,"div",6)(1,"div",22),g(2,"input",25),a(3,"label",24),c(4,"Shop ID"),r(),u(5,$r,2,0,"div",10),r()()),n&2){let e=h();l(2),p("ngClass",y(2,nn,(e.setupForm==null?null:e.setupForm.get("ShopID").invalid)&&((e.setupForm==null?null:e.setupForm.get("ShopID").dirty)||(e.setupForm==null?null:e.setupForm.get("ShopID").touched)))),l(3),b(e.setupForm!=null&&e.setupForm.get("ShopID").invalid&&(e.setupForm!=null&&e.setupForm.get("ShopID").dirty||e.setupForm!=null&&e.setupForm.get("ShopID").touched)?5:-1)}}function tl(n,o){n&1&&(a(0,"div",10),c(1,"Marketplace Url is required!"),r())}var sa=(()=>{class n{constructor(){this.formChannel=f(q),this.multiwarehouseService=f(Ft),this.form=this.formChannel.mainForm,this.setupForm=this.form.get("setup"),this.destroyRef=f(gn),this.channel=new le,this.channelType=w}ngOnChanges(e){F.IsNotEmpty(this.channel)&&(this.checkShopIdValidators(),this.checkUrlValidators())}checkUrlValidators(){let e=this.setupForm?.get("TypeID")?.value;e===w.WooCommerce||e===w.Shopify?this.setupForm?.get("URL")?.setValidators([K.required]):this.setupForm?.get("URL")?.clearValidators(),this.setupForm?.get("URL")?.updateValueAndValidity()}checkShopIdValidators(){let e=this.setupForm?.get("TypeID")?.value;e===w.Tokopedia||e===w.Shopee?this.setupForm?.get("ShopID")?.setValidators([K.required]):this.setupForm?.get("ShopID")?.clearValidators(),this.setupForm?.get("ShopID")?.updateValueAndValidity()}onChannelTypeChange(){this.checkShopIdValidators(),this.checkUrlValidators()}onMultiwarehouseChange(e){e.value?this.multiwarehouseService.getChannelWarehouse$(this.channel.ID).pipe(gt(this.destroyRef)).subscribe(i=>{this.formChannel.addGroupByWarehouseLocation(i)}):this.form.removeControl("warehouse")}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275cmp=S({type:n,selectors:[["app-marketplace-config"]],inputs:{channel:"channel"},features:[J],decls:39,vars:14,consts:[[3,"formGroup"],["formGroupName","setup"],[1,"card"],[1,"card-header"],[1,"card-body","mt-8"],[1,"row"],[1,"col-sm-6"],["matTooltipPosition","above","matTooltip","Your shop name in marketplace channel",1,"form-label-group"],["type","text","id","Name","placeholder","Name","formControlName","Name",1,"form-control","tall",3,"ngClass"],["for","Name"],[1,"invalid-feedback"],[1,"col-sm-6","me-0"],["matTooltipPosition","above","matTooltip","Marketplace / Website where your product is Sold / Distributed",1,"info-label-group","bg-body-secondary"],["matTooltipPosition","above","matTooltip","Fill with your Marketplace URL",1,"form-label-group"],["type","text","id","URL","placeholder","URL","name","URL","formControlName","URL",1,"form-control",3,"ngClass"],["for","URL"],[1,"col-6"],[1,"form-label-group","radio"],["for","enableWriteOff"],[1,"mt-3"],["formControlName","MultiWarehouse","name","multiWarehouse",3,"change"],[1,"me-5",3,"value"],["matTooltipPosition","above","matTooltip","Fill with your Shop ID",1,"form-label-group"],["type","text","id","ShopIDString","placeholder","Shop ID String","formControlName","ShopIDString","name","ShopIDString",1,"form-control"],["for","ShopID"],["type","number","id","ShopID","placeholder","Shop ID","formControlName","ShopID","name","ShopID",1,"form-control",3,"ngClass"]],template:function(i,t){if(i&1&&(a(0,"form",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"h3"),c(5,"Marketplace Setup"),r()(),a(6,"div",4)(7,"div",5)(8,"div",6)(9,"div",7),g(10,"input",8),a(11,"label",9),c(12,"Name"),r(),u(13,Jr,2,0,"div",10),r()(),a(14,"div",11)(15,"div",12)(16,"label"),c(17,"Type"),r(),a(18,"div")(19,"span"),c(20),r()()()(),u(21,Xr,5,0,"div",6)(22,el,6,4,"div",6),a(23,"div",6)(24,"div",13),g(25,"input",14),a(26,"label",15),c(27,"Marketplace URL"),r(),u(28,tl,2,0,"div",10),r()(),a(29,"div",16)(30,"div",17)(31,"label",18),c(32,"Multiwarehouse"),r(),a(33,"div",19)(34,"mat-radio-group",20),C("change",function(d){return t.onMultiwarehouseChange(d)}),a(35,"mat-radio-button",21),c(36," Yes "),r(),a(37,"mat-radio-button",21),c(38," No "),r()()()()()()()()()()),i&2){let s,d;p("formGroup",t.form),l(10),p("ngClass",y(10,nn,(t.setupForm==null?null:t.setupForm.get("Name").invalid)&&((t.setupForm==null?null:t.setupForm.get("Name").dirty)||(t.setupForm==null?null:t.setupForm.get("Name").touched)))),l(3),b(t.setupForm!=null&&t.setupForm.get("Name").invalid&&(t.setupForm!=null&&t.setupForm.get("Name").dirty||t.setupForm!=null&&t.setupForm.get("Name").touched)?13:-1),l(7),v(t.channel==null?null:t.channel.TypeString),l(),b((t.channel==null?null:t.channel.TypeID)==t.channelType.Tiktok||(t.channel==null?null:t.channel.TypeID)==t.channelType.Lazada||(t.channel==null?null:t.channel.TypeID)==t.channelType.Shopify?21:-1),l(),b((t.channel==null?null:t.channel.TypeID)==t.channelType.Tokopedia||(t.channel==null?null:t.channel.TypeID)==t.channelType.Shopee?22:-1),l(3),p("ngClass",y(12,nn,(t.setupForm==null||(s=t.setupForm.get("URL"))==null?null:s.invalid)&&((t.setupForm==null||(s=t.setupForm.get("URL"))==null?null:s.dirty)||(t.setupForm==null||(s=t.setupForm.get("URL"))==null?null:s.touched)))),l(3),b(!(t.setupForm==null||(d=t.setupForm.get("URL"))==null)&&d.invalid&&(!(t.setupForm==null||(d=t.setupForm.get("URL"))==null)&&d.dirty||!(t.setupForm==null||(d=t.setupForm.get("URL"))==null)&&d.touched)?28:-1),l(7),p("value",!0),l(2),p("value",!1)}},dependencies:[I,L,W,R,Y,$,Oe,Tt,H,X,Z,ee,oe,te,Ae,Ue,je],encapsulation:2})}}return n})();var on=n=>({"bg-gradient-warning":n}),ca=(()=>{class n{constructor(){this.formService=f(q),this.form=this.formService.mainForm,this.syncForm=this.form.get("sync"),this.channel=new le,this.orderSyncOptions=Nt([]),this.cancelOrderSyncOptions=Nt([]),this.channelType=w,this.orderSyncTooltip=["Do not automatically sync orders from the channel to DealPOS.","Sync unpaid orders from the channel and create them as Sales Orders.","Sync only paid orders from the channel and create them as Invoices."],this.syncInventoryTooltip=["Include if the channel makes a transaction","No include if the channel makes a transaction"],this.cancelOrderTooltip=["If the order is already fulfilled, the POS invoice will not be voided.","The POS invoice will always be voided, even if the order is fulfilled."]}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275cmp=S({type:n,selectors:[["app-sync-config"]],inputs:{channel:"channel",orderSyncOptions:[1,"orderSyncOptions"],cancelOrderSyncOptions:[1,"cancelOrderSyncOptions"]},decls:26,vars:15,consts:[[3,"formGroup"],["formGroupName","sync"],[1,"card"],[1,"card-header"],[1,"card-body","mt-8"],[1,"row"],[1,"col-sm-12"],["id","NewOrderSyncTypeID",1,"form-label-group","radio",3,"ngClass"],["for","NewOrderSyncTypeID"],[1,"mt-3"],["formControlName","NewOrderSyncTypeID","name","NewOrderSyncTypeID",3,"options","title"],["id","CancelledOrderSyncTypeID",1,"form-label-group","radio",3,"ngClass"],["for","CancelledOrderSyncTypeID"],["formControlName","CancelledOrderSyncTypeID","name","CancelledOrderSyncTypeID",3,"options","title"],["matTooltipPosition","above","matTooltip","Automatically sync your POS inventory to channel inventory",1,"form-label-group","radio",3,"ngClass"],["for","SyncOrder"],["formControlName","SyncInventory","name","SyncInventory",3,"title"]],template:function(i,t){if(i&1&&(a(0,"form",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"h3"),c(5,"Synchronize"),r()(),a(6,"div",4)(7,"div",5)(8,"div",6)(9,"div",7)(10,"label",8),c(11,"New Order Sync"),r(),a(12,"div",9),g(13,"lib-radio-options",10),r()()(),a(14,"div",6)(15,"div",11)(16,"label",12),c(17,"Cancelled Order Sync"),r(),a(18,"div",9),g(19,"lib-radio-options",13),r()()(),a(20,"div",6)(21,"div",14)(22,"label",15),c(23,"Synchronize Inventory"),r(),a(24,"div",9),g(25,"lib-radio-options",16),r()()()()()()()()),i&2){let s;p("formGroup",t.form),l(9),p("ngClass",y(9,on,t.syncForm.get("NewOrderSyncTypeID").invalid)),l(4),p("options",t.orderSyncOptions())("title",t.orderSyncTooltip),l(2),p("ngClass",y(11,on,t.syncForm.get("CancelledOrderSyncTypeID").invalid)),l(4),p("options",t.cancelOrderSyncOptions())("title",t.cancelOrderTooltip),l(2),p("ngClass",y(13,on,!(!(t.syncForm==null||(s=t.syncForm.get("SyncInventory"))==null)&&s.value))),l(4),p("title",t.syncInventoryTooltip)}},dependencies:[I,L,W,R,Y,$,H,X,Z,ee,oe,Ae,te,Un,ro],styles:["ng-select.syncOrderOption .ng-dropdown-panel{z-index:1003!important}"]})}}return n})();var vt=(()=>{class n{constructor(){this.httpService=f(ye)}generateTokenExpiryMessage(e){let i="";switch(e){case w.Shopee:i="The expiry date for a token to call API to channel (automatically update every 4 hours)";break;case w.Lazada:i="The expiry date for a token to call API to channel (automatically update every 1 Month)";break;case w.Tiktok:i="The expiry date for a token to call API to channel (automatically update every 3 Days)";break}return i}onRefreshToken(e){return this.httpService.post("/api/channel/RefreshToken",{ID:e})}authorizedChannel(e){let i=this.getApiAuthorize(e);return this.httpService.post(`/api/${i}`,null).pipe(ie(t=>{window.open(t.Url,"_blank")}))}getApiAuthorize(e){let i;switch(e){case w.Shopee:i="ChannelAuthorization/ShopeeV2_URL";break;case w.Tiktok:i="ChannelAuthorization/Tiktok_URL";break;case w.Lazada:i="ChannelAuthorization/Lazada_URL";break}return i}isExpiredDate(e){let i=new Date;return e?.getTime()<i.getTime()}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275prov=ge({token:n,factory:n.\u0275fac})}}return n})();var nl=n=>({"bg-gradient-danger":n}),ol=(n,o)=>({"text-success":n,"text-danger":o});function al(n,o){n&1&&(a(0,"div",4)(1,"div",5)(2,"div",6),g(3,"input",7),a(4,"label",8),c(5,"Consumer Key"),r()()(),a(6,"div",9)(7,"div",10),g(8,"input",11),a(9,"label",12),c(10,"Consumer Secret"),r()()()())}function rl(n,o){if(n&1&&(a(0,"div",5)(1,"div",13)(2,"label"),c(3,"Authorized"),r(),a(4,"div")(5,"span"),c(6),r()()()()),n&2){let e=h();l(6),v(e.channel!=null&&e.channel.Authorized?"YES":"NO")}}function ll(n,o){if(n&1&&(a(0,"div",5)(1,"div",14),P(2,"expiredTime"),a(3,"label"),c(4,"Shop Expiration"),r(),a(5,"div")(6,"span"),c(7),P(8,"date"),r()()()()),n&2){let e=h();l(),p("ngClass",y(8,nl,G(2,3,e.channel==null?null:e.channel.ExpiredTime)))("matTooltip","The expiry date for "+(e.channel==null?null:e.channel.Name)+" Open API authorization from your account "+(e.channel==null?null:e.channel.Name)+" to Dealpos"),l(6),v(e.channel.ExpiredTime?ce(8,5,e.channel.ExpiredTime,"dd MMM yyyy HH:mm"):"-")}}function sl(n,o){if(n&1&&(a(0,"div",5)(1,"div",15)(2,"label"),c(3,"Token Issued"),r(),a(4,"div")(5,"span"),c(6),P(7,"date"),r()()()()),n&2){let e=h(2);l(6),v(ce(7,1,e.channel==null?null:e.channel.TokenIssued,"dd MMM yyyy HH:mm"))}}function cl(n,o){if(n&1){let e=A();a(0,"div",5)(1,"div",15)(2,"label"),c(3,"Refresh Token"),r(),a(4,"div")(5,"span",16),c(6),r()()()(),a(7,"div",5)(8,"div",17)(9,"label"),c(10,"Access Token"),r(),a(11,"div",18)(12,"span",16),c(13),r(),a(14,"span",19)(15,"button",20),C("click",function(){x(e);let t=h();return D(t.onRefreshToken())}),g(16,"i",21),a(17,"span"),c(18,"Refresh"),r()()()()()(),u(19,sl,8,4,"div",5),a(20,"div",5)(21,"div",22)(22,"label"),c(23,"Access Token Expired"),r(),a(24,"div",23)(25,"div",24),c(26),P(27,"date"),r(),a(28,"div",25)(29,"button",26),C("click",function(){x(e);let t=h();return D(t.onAuthorize())}),g(30,"i",27),a(31,"span"),c(32,"Extend"),r()()()()()()}if(n&2){let e=h();l(6),v(e.channel==null?null:e.channel.RefreshToken),l(7),v(e.channel==null?null:e.channel.AccessToken),l(6),b((e.channel==null?null:e.channel.TypeID)==e.channelType.Shopee?19:-1),l(2),p("matTooltip",e.tokenExpiryMessage),l(4),p("ngClass",ne(10,ol,!e.isAccessTokenExpired,e.isAccessTokenExpired)),l(),M(" ",ce(27,7,e.channel==null?null:e.channel.TokenExpired,"dd MMM yyyy HH:mm")," "),l(2),ri("matTooltip",(e.channel==null?null:e.channel.TypeID)==e.channelType.Shopee?"Extend Shopee Authorization Duration for an additional 1 year":"Update Token Expired date")}}function dl(n,o){n&1&&(a(0,"div",4)(1,"div",5)(2,"div",28)(3,"label",29),c(4,"Token Log"),r(),a(5,"div",30)(6,"mat-radio-group",31)(7,"mat-radio-button",32),c(8," Yes "),r(),a(9,"mat-radio-button",32),c(10," No "),r()()()()()()),n&2&&(l(7),p("value",!0),l(2),p("value",!1))}var da=(()=>{class n{constructor(){this.formChannel=f(q),this.authorizeService=f(vt),this.toastr=f(ae),this.form=this.formChannel.mainForm,this.authorizedForm=this.form.get("authorized"),this.channelType=w,this.channel=new le,this.onSuccessRefrehToken=new j}ngOnChanges(e){e.data?.currentValue&&(this.checkExpiredToken(),this.tokenExpiryMessage=this.authorizeService.generateTokenExpiryMessage(this.channel.TypeID))}checkExpiredToken(){let e=new Date(this.channel?.TokenExpired),i=new Date(this.channel?.RefreshTokenExpired);this.isAccessTokenExpired=this.authorizeService.isExpiredDate(e),this.isRefreshTokenExpired=this.authorizeService.isExpiredDate(i)}onAuthorize(){this.authorizeService.authorizedChannel(this.channel?.TypeID).subscribe()}onRefreshToken(){this.authorizeService.onRefreshToken(this.channel.ID).subscribe(e=>{this.toastr.success("Token refreshed successfully!","Success").onShown.subscribe(()=>this.onSuccessRefrehToken.emit())})}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275cmp=S({type:n,selectors:[["app-authorized-config"]],inputs:{channel:"channel"},outputs:{onSuccessRefrehToken:"onSuccessRefrehToken"},features:[he([vt]),J],decls:10,vars:6,consts:[[1,"card","pt-12","border-top-0","rounded-0","rounded-bottom"],[3,"formGroup"],["formGroupName","authorized"],[1,"card-body"],[1,"row"],[1,"col-6"],["matTooltipPosition","above","matTooltip","Fill with your Marketplace Consumer Key",1,"form-label-group"],["type","text","id","consumerKey","placeholder","Consumer Key","formControlName","ConsumerKey","name","ConsumerKey",1,"form-control"],["for","consumerKey"],[1,"col-6","pe-8"],["matTooltipPosition","above","matTooltip","Fill with your Marketplace Consumer Secret",1,"form-label-group"],["type","text","id","consumerSecret","placeholder","Consumer Secret","formControlName","ConsumerSecret","name","ConsumerSecret",1,"form-control"],["for","consumerSecret"],["matTooltipPosition","above","matTooltip","Channel has been authorized to be managed by omni.dealpos.app",1,"info-label-group"],["matTooltipPosition","above",1,"info-label-group",3,"ngClass","matTooltip"],[1,"info-label-group"],[1,"text-wrap","text-break"],["matTooltipPosition","above","matTooltip","When your Shop Authorization has not expired you can try generate a new Access Token",1,"info-label-group"],[1,"d-flex","align-items-center","justify-content-between","w-100","text-wrap","text-break","py-3"],[1,"ms-4","text-end",2,"min-width","86px"],["type","button","matTooltip","Generate new access token",1,"btn","btn-outline-secondary","btn-sm",3,"click"],[1,"fa-solid","fa-arrows-rotate","me-2"],["matTooltipPosition","above",1,"info-label-group",3,"matTooltip"],[1,"d-flex","align-items-center","justify-content-between","w-100"],[3,"ngClass"],["matTooltipClass","unset-max-width-tooltip",3,"matTooltip"],["type","button",1,"btn","btn-outline-secondary","btn-sm",3,"click"],[1,"fas","fa-plus-circle","me-2"],[1,"form-label-group","radio"],["for","SyncOrder"],[1,"mt-4"],["formControlName","TokenLog","name","tokenLog"],[1,"me-5",3,"value"]],template:function(i,t){i&1&&(a(0,"div",0)(1,"form",1)(2,"div",2)(3,"div",3),u(4,al,11,0,"div",4),a(5,"div",4),u(6,rl,7,1,"div",5)(7,ll,9,10,"div",5)(8,cl,33,13),r(),u(9,dl,11,2,"div",4),r()()()()),i&2&&(l(),p("formGroup",t.form),l(3),b(t.channelType.WooCommerce==t.channel.TypeID||t.channelType.Shopify==t.channel.TypeID||t.channelType.Plugo==t.channel.TypeID?4:-1),l(2),b(t.channelType.Tokopedia==t.channel.TypeID||t.channelType.Shopee==t.channel.TypeID||t.channelType.Tiktok==t.channel.TypeID||t.channelType.Lazada==t.channel.TypeID?6:-1),l(),b((t.channel==null?null:t.channel.TypeID)==t.channelType.Shopee?7:-1),l(),b((t.channel==null?null:t.channel.TypeID)==t.channelType.Tiktok||(t.channel==null?null:t.channel.TypeID)==t.channelType.Lazada||(t.channel==null?null:t.channel.TypeID)==t.channelType.Shopee?8:-1),l(),b(t.channelType.Shopee==t.channel.TypeID?9:-1))},dependencies:[I,L,He,W,R,Y,$,Oe,H,X,Z,ee,oe,Ae,Ue,je,Pt],encapsulation:2})}}return n})();function ml(n,o){if(n&1){let e=A();a(0,"tr")(1,"td"),c(2),r(),a(3,"td"),c(4),r(),a(5,"td",11)(6,"mat-slide-toggle",12),me("ngModelChange",function(t){let s=x(e).$implicit;return pe(s.enabled,t)||(s.enabled=t),D(t)}),C("ngModelChange",function(){x(e);let t=h().ngIf,s=h();return D(s.onWebhookStateChange(t))}),r()()()}if(n&2){let e=o.$implicit;l(2),v(e.topic),l(2),v(e.addressWithoutHost),l(2),de("ngModel",e.enabled)}}function hl(n,o){if(n&1&&(k(0),a(1,"table",5)(2,"thead",6)(3,"tr")(4,"th",7),c(5,"Event"),r(),a(6,"th",8),c(7,"Url"),r(),a(8,"th",9),c(9,"State"),r()()(),a(10,"tbody"),u(11,ml,7,3,"tr",10),r()(),E()),n&2){let e=o.ngIf;l(11),p("ngForOf",e)}}var pa=(()=>{class n{constructor(){this.shopifyWebhookService=f(Ye),this.wooCommerceService=f(Qe),this.channelFormService=f(q),this.form=this.channelFormService.mainForm,this.webhookForm=this.form.get("webhook")}ngOnChanges(e){this.channel&&this.initWebhook(this.channel)}initWebhook(e){switch(e.TypeID){case w.Shopify:this.webhooks$=this.shopifyWebhookService.getWebhookWithState(e.ID).pipe(ie(i=>{this.webhookForm.setValue({init:!0,data:i})}));break;case w.WooCommerce:this.webhooks$=this.wooCommerceService.getWebhookWithState(e.ID).pipe(ie(i=>{this.webhookForm.setValue({init:!0,data:i})}));break}}onWebhookStateChange(e){this.webhookForm.setValue({init:!0,data:e})}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275cmp=S({type:n,selectors:[["app-webhook-config"]],inputs:{channel:"channel"},features:[J],decls:7,vars:3,consts:[[1,"card","pt-12","border-top-0","rounded-0","rounded-bottom"],[1,"card-body"],[1,"row"],[1,"col-12"],[4,"ngIf"],[1,"table","mb-6","w-50"],[1,"thead-light"],["scope","col",2,"width","100px"],["scope","col"],["scope","col",1,"text-center",2,"width","100px"],[4,"ngFor","ngForOf"],[1,"text-center"],[3,"ngModelChange","ngModel"]],template:function(i,t){i&1&&(a(0,"div",0)(1,"div")(2,"div",1)(3,"div",2)(4,"div",3),u(5,hl,12,1,"ng-container",4),P(6,"async"),r()()()()()),i&2&&(l(5),p("ngIf",G(6,1,t.webhooks$)))},dependencies:[I,fe,z,_e,te,mi,pi,lt,H,wt],styles:[".example-section[_ngcontent-%COMP%]{display:flex;align-content:center;align-items:center;height:60px}.example-margin[_ngcontent-%COMP%]{margin:10px}"],changeDetection:0})}}return n})();var ul=n=>({"is-invalid":n});function fl(n,o){n&1&&(a(0,"div",9),c(1," Email is not valid "),r())}function gl(n,o){if(n&1&&(a(0,"div",5)(1,"span",10),g(2,"app-channel-category-select",11),r()()),n&2){let e=h();l(2),p("channelId",e.channel.ID)("channelType",e.channel.TypeID)("showClear",!1)("showLabel",!0)}}function vl(n,o){n&1&&(a(0,"div",5)(1,"div",12),g(2,"input",13),a(3,"label",14),c(4,"Brand"),r()()(),a(5,"div",5)(6,"div",15),g(7,"input",16),a(8,"label",14),c(9,"Scan Product Size"),r()()())}var ma=(()=>{class n{constructor(){this.formChannel=f(q),this.form=this.formChannel.mainForm,this.defaultForm=this.form.get("default"),this.channel=new le,this.channelType=w}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275cmp=S({type:n,selectors:[["app-default-config"]],inputs:{channel:"channel"},decls:13,vars:7,consts:[[1,"card","pt-12","border-top-0","rounded-0","rounded-bottom"],[3,"formGroup"],["formGroupName","default"],[1,"card-body"],[1,"row"],[1,"col-6"],["matTooltipPosition","above","matTooltip","Change the customer's name from the order in the marketplace according this email",1,"form-label-group"],["type","email","name","Email","placeholder","Email","formControlName","CustomerDefaultEmail",1,"form-control",3,"ngClass"],["for","Name"],[1,"invalid-feedback"],[1,"p-float-label"],["formControlName","DefaultCategoryID",3,"channelId","channelType","showClear","showLabel"],["matTooltipPosition","above","matTooltip","Brand name for product upload",1,"form-label-group"],["type","text","name","Brand","placeholder","Brand Name","id","Brand","formControlName","Brand",1,"form-control"],["for","Brand"],["matTooltipPosition","above","matTooltip","Customize Scan Product Size",1,"form-label-group"],["type","number","name","ScanProductSize","placeholder","Scan Product Size","id","Brand","formControlName","ScanProductSize",1,"form-control"]],template:function(i,t){if(i&1&&(a(0,"div",0)(1,"form",1)(2,"div",2)(3,"div",3)(4,"div",4)(5,"div",5)(6,"div",6),g(7,"input",7),a(8,"label",8),c(9,"Customer Default Email"),r(),u(10,fl,2,0,"div",9),r()(),u(11,gl,3,4,"div",5)(12,vl,10,0),r()()()()()),i&2){let s,d;l(),p("formGroup",t.form),l(6),p("ngClass",y(5,ul,((s=t.defaultForm.get("CustomerDefaultEmail"))==null?null:s.invalid)&&(((s=t.defaultForm.get("CustomerDefaultEmail"))==null?null:s.dirty)||((s=t.defaultForm.get("CustomerDefaultEmail"))==null?null:s.touched)))),l(3),b((d=t.defaultForm.get("CustomerDefaultEmail"))!=null&&d.invalid&&((d=t.defaultForm.get("CustomerDefaultEmail"))!=null&&d.dirty||(d=t.defaultForm.get("CustomerDefaultEmail"))!=null&&d.touched)?10:-1),l(),b(t.channel.TypeID!=t.channelType.Shopify&&t.channel.TypeID!=t.channelType.Lazada?11:-1),l(),b(t.channel.TypeID==t.channelType.Lazada||t.channel.TypeID==t.channelType.WooCommerce?12:-1)}},dependencies:[I,L,lt,$,Oe,Tt,H,X,W,R,ao,Y,Z,ee,oe],encapsulation:2})}}return n})();function _l(n,o){if(n&1&&(k(0),a(1,"tr")(2,"td",6),c(3),r(),a(4,"td")(5,"ng-select",9),c(6," > "),r()()(),E()),n&2){let e=o.$implicit,i=h(2);l(3),M(" ",e.Name," "),l(2),p("items",i.outlets)("formControlName",e.Name)}}function yl(n,o){if(n&1){let e=A();a(0,"div",8)(1,"button",10),C("click",function(){x(e);let t=h(2);return D(t.unSync())}),g(2,"i",11),a(3,"span"),c(4,"Unsynchronize Warehouse"),r()()()}}function bl(n,o){if(n&1&&(a(0,"form",2)(1,"div",3)(2,"table",4)(3,"thead")(4,"tr",5)(5,"th",6),c(6,"Shopee Warehouse"),r(),a(7,"th",6),c(8,"DealPOS Outlet"),r()()(),a(9,"tbody"),u(10,_l,7,3,"ng-container",7),P(11,"async"),r()()()(),u(12,yl,5,0,"div",8)),n&2){let e=h();p("formGroup",e.form),l(10),p("ngForOf",G(11,3,e.warehouse$)),l(2),b((e.initialWarehouse==null?null:e.initialWarehouse.length)>0?12:-1)}}function Cl(n,o){if(n&1){let e=A();a(0,"div",12)(1,"div",13),g(2,"i",14),r(),a(3,"p",15),c(4," Use the synchronization button to load warehouse on Shopee and map between Shopee warehouse and DealPOS warehouse for Inventory Synchronization "),r()(),a(5,"div",16)(6,"button",10),C("click",function(){x(e);let t=h();return D(t.onSync())}),g(7,"i",11),a(8,"span"),c(9,"Synchronize Warehouse"),r()()()}}var ha=(()=>{class n{constructor(){this.formChannel=f(q),this.toastr=f(ae),this.channelService=f(Re),this.multiwarehouseService=f(Ft),this.form=this.formChannel.mainForm}ngOnChanges(){this.channel?.WarehouseLocations?.length>0&&(this.onSync(),this.initialWarehouse=this.channel.WarehouseLocations)}onSync(){this.warehouse$=this.multiwarehouseService.getChannelWarehouse$(this.channel?.ID).pipe(se(e=>{let i,t=e.map(s=>(i=this.channel.WarehouseLocations.find(d=>d.ID===s.ID),F.IsNotEmpty(i)&&(s.ProductInventoryOutlet=i.ProductInventoryOutlet),s));return this.setFormOnSync(t),t}),Ce(1))}setFormOnSync(e){let i=this.form.get("warehouse")?.value;(F.IsEmpty(i)||Object.keys(i)?.length==0)&&this.formChannel.addGroupByWarehouseLocation(e)}unSync(){this.channelService.unSynchronizedWarehouse(this.channel.ID).subscribe(e=>{this.warehouse$=null,this.toastr.success(e?.Message,"Success"),this.removeWarehouseCtrl(),this.initialWarehouse=[]})}removeWarehouseCtrl(){this.form.removeControl("warehouse")}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275cmp=S({type:n,selectors:[["app-multi-warehouse-config"]],inputs:{channel:"channel",outlets:"outlets"},features:[J],decls:5,vars:3,consts:[[1,"card","pt-12","border-top-0","rounded-0","rounded-bottom"],[1,"card-body"],[3,"formGroup"],["formGroupName","warehouse"],[1,"table","table-bordered","mb-12","w-50"],[1,"table-light"],[1,"text-start"],[4,"ngFor","ngForOf"],[1,"d-flex","justify-content-start","align-items-start","my-6"],["id","outletOrder","bindLabel","Outlet","bindValue","Outlet","name","Outlet","placeholder","Select Outlet",1,"tall",3,"items","formControlName"],["type","button",1,"btn","btn-outline-secondary",3,"click"],[1,"fa-solid","fa-refresh","me-2"],[1,"d-flex","border","p-6","align-items-start","justify-content-start",2,"background","#1f87ac0a","border-radius","5px"],[1,"me-3"],[1,"fa","fa-circle-info","fs-5","pt-1"],[2,"margin-bottom","0px","margin-top","0px"],[1,"d-flex","justify-content-end","align-items-start","my-6"]],template:function(i,t){i&1&&(a(0,"div",0)(1,"div",1),u(2,bl,13,5),P(3,"async"),u(4,Cl,10,0),r()()),i&2&&(l(2),b(G(3,1,t.warehouse$)?2:4))},dependencies:[I,fe,_e,Y,$,H,X,Z,ee,oe,te,Me,lt],encapsulation:2})}}return n})();var _t=n=>({active:n}),Sl=(n,o)=>({"bg-gradient-danger":n,active:o}),pt=n=>({"show active":n});function wl(n,o){if(n&1){let e=A();k(0),a(1,"button",19),C("click",function(){x(e);let t=h();return D(t.currentTabActive="authorized")}),c(2," Authorization "),r(),E()}if(n&2){let e=o.ngIf,i=h();l(),p("ngClass",ne(1,Sl,!(e!=null&&e.Authorized),i.currentTabActive=="authorized"))}}function Tl(n,o){if(n&1){let e=A();a(0,"button",20),C("click",function(){x(e);let t=h();return D(t.currentTabActive="warehouse")}),c(1," Multi Warehouse "),r()}if(n&2){let e=h();p("ngClass",y(1,_t,e.currentTabActive=="warehouse"))}}function Il(n,o){if(n&1){let e=A();a(0,"button",22),C("click",function(){x(e);let t=h(2);return D(t.currentTabActive="webhook")}),c(1," Webhook "),r()}if(n&2){let e=h(2);p("ngClass",y(1,_t,e.currentTabActive=="webhook"))}}function xl(n,o){if(n&1&&(k(0),u(1,Il,2,3,"button",21),E()),n&2){let e=o.ngIf,i=h();l(),b(e.TypeID==i.channelType.WooCommerce||e.TypeID==i.channelType.Shopify?1:-1)}}function Dl(n,o){if(n&1&&(k(0),g(1,"app-outle-config",32),E()),n&2){let e=h().ngIf;l(),p("outlets",e==null||e.Options==null?null:e.Options.ListOutlet)}}function kl(n,o){if(n&1&&(k(0),g(1,"app-orders-config",33),E()),n&2){let e=h().ngIf;l(),p("channel",e==null?null:e.Model)("taxes",e==null||e.Options==null?null:e.Options.ListTax)("salesTypes",e==null||e.Options==null?null:e.Options.ListSalesOrderType)("paymentMethods",e==null||e.Options==null?null:e.Options.ListPaymentMethod)}}function El(n,o){if(n&1&&(k(0),g(1,"app-invoice-fee-config",34),E()),n&2){let e=h().ngIf;l(),p("channel",e==null?null:e.Model)("listWriteOff",e==null||e.Options==null?null:e.Options.ListWriteOff)}}function Pl(n,o){if(n&1&&(k(0),g(1,"app-advanced-config",35),E()),n&2){let e=h().ngIf;l(),p("channel",e==null?null:e.Model)("pricebooks",e==null||e.Options==null?null:e.Options.Pricebooks)}}function Ol(n,o){if(n&1){let e=A();k(0),a(1,"app-authorized-config",36),C("onSuccessRefrehToken",function(){x(e);let t=h(2);return D(t.onRefreshToken())}),r(),E()}if(n&2){let e=h().ngIf;l(),p("channel",e==null?null:e.Model)}}function Ml(n,o){if(n&1&&(k(0),g(1,"app-default-config",6),E()),n&2){let e=h().ngIf;l(),p("channel",e==null?null:e.Model)}}function Fl(n,o){if(n&1&&(a(0,"div",30),g(1,"app-multi-warehouse-config",37),r()),n&2){let e=h().ngIf,i=h();p("ngClass",y(3,pt,i.currentTabActive=="warehouse")),l(),p("channel",e==null?null:e.Model)("outlets",e==null||e.Options==null?null:e.Options.ListOutlet)}}function Rl(n,o){if(n&1&&(k(0),g(1,"app-webhook-config",6),E()),n&2){let e=h().ngIf;l(),p("channel",e==null?null:e.Model)}}function Al(n,o){if(n&1&&(a(0,"div",23)(1,"div",24),u(2,Dl,2,1,"ng-container",15),r(),a(3,"div",25),u(4,kl,2,4,"ng-container",15),r(),a(5,"div",26),u(6,El,2,2,"ng-container",15),r(),a(7,"div",27),u(8,Pl,2,2,"ng-container",15),r(),a(9,"div",28),u(10,Ol,2,1,"ng-container",15),r(),a(11,"div",29),u(12,Ml,2,1,"ng-container",15),r(),u(13,Fl,2,5,"div",30),a(14,"div",31),u(15,Rl,2,1,"ng-container",15),r()()),n&2){let e,i=h();l(),p("ngClass",y(15,pt,i.currentTabActive=="outlet")),l(),p("ngIf",i.currentTabActive=="outlet"),l(),p("ngClass",y(17,pt,i.currentTabActive=="orders")),l(),p("ngIf",i.currentTabActive=="orders"),l(),p("ngClass",y(19,pt,i.currentTabActive=="serviceFee")),l(),p("ngIf",i.currentTabActive=="serviceFee"),l(),p("ngClass",y(21,pt,i.currentTabActive=="advanced")),l(),p("ngIf",i.currentTabActive=="advanced"),l(),p("ngClass",y(23,pt,i.currentTabActive=="authorized")),l(),p("ngIf",i.currentTabActive=="authorized"),l(),p("ngClass",y(25,pt,i.currentTabActive=="default")),l(),p("ngIf",i.currentTabActive=="default"),l(),b(!(i.setupForm==null||(e=i.setupForm.get("MultiWarehouse"))==null)&&e.value?13:-1),l(),p("ngClass",y(27,pt,i.currentTabActive=="webhook")),l(),p("ngIf",i.currentTabActive=="webhook")}}var Si=(()=>{class n{constructor(e,i,t){this.route=e,this.service=i,this.Toastr=t,this.channelService=f(Re),this.shopifyWebhookService=f(Ye),this.wooWebhookService=f(Qe),this.channelFormService=f(q),this.form=this.channelFormService.mainForm,this.setupForm=this.form.get("setup"),this.currentTabActive="outlet",this.channelType=w,this.initLoadForm(),this.onEnabledMultiWarehouse()}initLoadForm(){let e=this.route.snapshot.params,i=F.IsNotEmpty(e.ID)?e.ID:F.GuidEMpty;this.loadForm$=this.channelFormService.getLoadForm$(i).pipe(Ce(1))}onRefreshToken(){this.initLoadForm(),this.currentTabActive="authorized"}onEnabledMultiWarehouse(){this.setupForm?.get("MultiWarehouse").valueChanges.pipe(gt()).subscribe(e=>{this.currentTabActive="outlet"})}onSubmit(){let e=this.channelFormService.getFormValue(),i=this.saveWebhooks(e);ze(this.channelService.saveChannel(e).pipe(se(t=>({type:"CHANNEL",data:t}))),i.pipe(se(t=>({type:"WEBHOOK",data:t})))).subscribe(t=>{t.type==="CHANNEL"&&(this.Toastr.success("Successfully submitted the Channel","Success!"),this.service.navigate(["/menu/channel"]))})}saveWebhooks(e){if(this.channelFormService.getWebhooks().init)switch(e.TypeID){case w.Shopify:return this.shopifyWebhookService.getWebhookWithState(e.ID).pipe(Q(t=>this.checkWebhookChanges(e,t)));case w.WooCommerce:return this.wooWebhookService.getWebhookWithState(e.ID).pipe(Q(t=>this.checkWebhookChanges(e,t)));default:return At}else return At}checkWebhookChanges(e,i){let t=this.channelFormService.getWebhooks(),s=t.data.filter(m=>m.enabled);if(this.isUpdateWebhooks(i,t.data))switch(e.TypeID){case w.Shopify:return this.shopifyWebhookService.updateWebhook(e.ID,s);case w.WooCommerce:return this.wooWebhookService.updateWebhook(e.ID,s);default:return At}else return At}isUpdateWebhooks(e,i){return e.filter(s=>!i.some(d=>d.topic===s.topic&&d.enabled===s.enabled)).length>0}static{this.\u0275fac=function(i){return new(i||n)(V(si),V(at),V(ae))}}static{this.\u0275cmp=S({type:n,selectors:[["app-marketplace-form"]],features:[he([Qe,Ye,Ft])],decls:34,vars:30,consts:[["headerTitle","Configure Channel",3,"hideSearchBox","hideSearchDropdown"],["role","button","routerLink","/menu/channel",1,"btn","btn-secondary","me-3"],["role","button",1,"btn","btn-success","text-white",3,"click","disabled"],[1,"container-fluid","py-5","bg-light-gray"],[1,"row"],[1,"col-8"],[3,"channel"],[1,"col-4"],[3,"channel","orderSyncOptions","cancelOrderSyncOptions"],[1,"col-12"],["id","nav-tab","role","tablist",1,"nav","nav-tabs"],["id","nav-outlet-config-tab","data-bs-toggle","tab","data-bs-target","#nav-outlet-config","type","button","role","tab","aria-controls","nav-outlet-config","aria-selected","true",1,"nav-link","active",3,"click","ngClass"],["id","nav-order-config-tab","data-bs-toggle","tab","data-bs-target","#nav-order-config","type","button","role","tab","aria-controls","nav-order-config","aria-selected","false",1,"nav-link",3,"click","ngClass"],["id","nav-invoice-fee-tab","data-bs-toggle","tab","data-bs-target","#nav-invoice-fee","type","button","role","tab","aria-controls","nav-invoice-fee","aria-selected","false",1,"nav-link",3,"click","ngClass"],["id","nav-advanced-tab","data-bs-toggle","tab","data-bs-target","#nav-advanced","type","button","role","tab","aria-controls","nav-advanced","aria-selected","false",1,"nav-link",3,"click","ngClass"],[4,"ngIf"],["id","nav-default-tab","data-bs-toggle","tab","data-bs-target","#nav-default","type","button","role","tab","aria-controls","nav-default","aria-selected","false",1,"nav-link",3,"click","ngClass"],["id","nav-warehouse-tab","data-bs-toggle","tab","data-bs-target","#nav-warehouse","type","button","role","tab","aria-controls","nav-warehouse","aria-selected","false",1,"nav-link",3,"ngClass"],["class","tab-content","id","nav-tabContent",4,"ngIf"],["id","nav-authorized-tab","data-bs-toggle","tab","data-bs-target","#nav-authorized","type","button","role","tab","aria-controls","nav-authorized","aria-selected","false",1,"nav-link",3,"click","ngClass"],["id","nav-warehouse-tab","data-bs-toggle","tab","data-bs-target","#nav-warehouse","type","button","role","tab","aria-controls","nav-warehouse","aria-selected","false",1,"nav-link",3,"click","ngClass"],["id","nav-webhook-tab","data-bs-toggle","tab","data-bs-target","#nav-webhook","type","button","role","tab","aria-controls","nav-webhook","aria-selected","false",1,"nav-link",3,"ngClass"],["id","nav-webhook-tab","data-bs-toggle","tab","data-bs-target","#nav-webhook","type","button","role","tab","aria-controls","nav-webhook","aria-selected","false",1,"nav-link",3,"click","ngClass"],["id","nav-tabContent",1,"tab-content"],["id","nav-outlet-config","role","tabpanel","aria-labelledby","nav-outlet-config-tab",1,"tab-pane","fade","show","active",3,"ngClass"],["id","nav-order-config","role","tabpanel","aria-labelledby","nav-order-config-tab",1,"tab-pane","fade",3,"ngClass"],["id","nav-invoice-fee","role","tabpanel","aria-labelledby","nav-invoice-fee-tab",1,"tab-pane","fade",3,"ngClass"],["id","nav-advanced","role","tabpanel","aria-labelledby","nav-advanced-tab",1,"tab-pane","fade",3,"ngClass"],["id","nav-authorized","role","tabpanel","aria-labelledby","nav-authorized-tab",1,"tab-pane","fade",3,"ngClass"],["id","nav-default","role","tabpanel","aria-labelledby","nav-default-tab",1,"tab-pane","fade",3,"ngClass"],["id","nav-warehouse","role","tabpanel","aria-labelledby","nav-warehouse-tab",1,"tab-pane","fade",3,"ngClass"],["id","nav-webhook","role","tabpanel","aria-labelledby","nav-webhook-tab",1,"tab-pane","fade",3,"ngClass"],[3,"outlets"],[3,"channel","taxes","salesTypes","paymentMethods"],[3,"channel","listWriteOff"],[3,"channel","pricebooks"],[3,"onSuccessRefrehToken","channel"],[3,"channel","outlets"]],template:function(i,t){if(i&1){let s=A();a(0,"mainpanel",0)(1,"actions")(2,"button",1),c(3," Cancel "),r(),a(4,"button",2),C("click",function(){return x(s),D(t.onSubmit())}),c(5," Submit "),r()(),a(6,"content"),Cn(7),P(8,"async"),a(9,"div",3)(10,"div",4)(11,"div",5),g(12,"app-marketplace-config",6),r(),a(13,"div",7),g(14,"app-sync-config",8),r()(),a(15,"div",4)(16,"div",9)(17,"nav")(18,"div",10)(19,"button",11),C("click",function(){return x(s),D(t.currentTabActive="outlet")}),c(20," Outlet "),r(),a(21,"button",12),C("click",function(){return x(s),D(t.currentTabActive="orders")}),c(22," Orders "),r(),a(23,"button",13),C("click",function(){return x(s),D(t.currentTabActive="serviceFee")}),c(24," Service Fee "),r(),a(25,"button",14),C("click",function(){return x(s),D(t.currentTabActive="advanced")}),c(26," Advanced "),r(),u(27,wl,3,4,"ng-container",15),a(28,"button",16),C("click",function(){return x(s),D(t.currentTabActive="default")}),c(29," Default "),r(),u(30,Tl,2,3,"button",17)(31,xl,2,1,"ng-container",15),r()(),u(32,Al,16,29,"div",18),P(33,"async"),r()()()()()}if(i&2){let s;p("hideSearchBox",!0)("hideSearchDropdown",!0),l(4),p("disabled",t.form.invalid);let d=G(8,16,t.loadForm$);l(8),p("channel",d==null?null:d.Model),l(2),p("channel",d==null?null:d.Model)("orderSyncOptions",d==null||d.Options==null?null:d.Options.NewOrderSyncTypeOptions)("cancelOrderSyncOptions",d==null||d.Options==null?null:d.Options.CancelledOrderSyncOptions),l(5),p("ngClass",y(20,_t,t.currentTabActive=="outlet")),l(2),p("ngClass",y(22,_t,t.currentTabActive=="orders")),l(2),p("ngClass",y(24,_t,t.currentTabActive=="serviceFee")),l(2),p("ngClass",y(26,_t,t.currentTabActive=="advanced")),l(2),p("ngIf",d==null?null:d.Model),l(),p("ngClass",y(28,_t,t.currentTabActive=="default")),l(2),b(!(t.setupForm==null||(s=t.setupForm.get("MultiWarehouse"))==null)&&s.value?30:-1),l(),p("ngIf",d==null?null:d.Model),l(),p("ngIf",G(33,18,t.loadForm$))}},dependencies:[I,L,z,_e,Dt,Fe,qo,Ko,Zo,la,sa,ca,da,pa,ma,rt,Pe,ha],styles:[".mb-1rem[_ngcontent-%COMP%]{margin-bottom:1rem} .mat-form-field-appearance-outline .mat-form-field-outline-thick{color:solid 1.5px #1a73e8!important} ng-select.multiple-select>div.ng-select-container div.ng-value-container div.ng-placeholder{top:-10px!important} ng-select.multiple-select>div.ng-select-container input{padding-top:0!important} ng-select.danger>div.ng-select-container{background:repeating-linear-gradient(-60deg,#fcf3cf,#fcf3cf 15px,#f9e79f 15px 30px)!important}.tab-pane[_ngcontent-%COMP%]{margin-top:0!important}"]})}}return n})();function Nl(n,o){if(n&1&&(k(0),a(1,"div",3)(2,"div",10)(3,"label"),c(4,"Order Fulfillment Webhook Handling"),r(),a(5,"div")(6,"span"),c(7),r()()()(),E()),n&2){let e=h();l(7),v((e.data==null?null:e.data.FulfillmentWebhookHandling)==0?"Do Nothing":(e.data==null?null:e.data.FulfillmentWebhookHandling)==1?"Create Outbound Logistic":"Reserve for Future")}}function Ll(n,o){if(n&1&&(k(0),a(1,"div",3)(2,"div",11)(3,"label"),c(4,"Process Automatic Return"),r(),a(5,"div")(6,"span"),c(7),r()()()(),E()),n&2){let e=h();l(7),v(e.data==null?null:e.data.ReturnProcess)}}function Wl(n,o){if(n&1&&(k(0),a(1,"div",3)(2,"div",12)(3,"label"),c(4,"Ignore Cancelled Order for Fulfilled Orders"),r(),a(5,"div")(6,"span"),c(7),r()()()(),E()),n&2){let e=h();l(7),v(e.data.IgnoreReverseOrder?"YES":"NO")}}function Vl(n,o){if(n&1&&(k(0),a(1,"div",3)(2,"div",13)(3,"label"),c(4,"Size Chart"),r(),a(5,"div",14)(6,"a",15),c(7),r()()()(),E()),n&2){let e=h();l(6),p("href",e.data.SizeChart,ht),l(),v(e.data.SizeChart)}}function zl(n,o){if(n&1&&(k(0),a(1,"div",3)(2,"div",16)(3,"label"),c(4,"ShippingFee"),r(),a(5,"div")(6,"span"),c(7),r()()()(),E()),n&2){let e=h();l(7),v(e.data.ShippingFee)}}function Gl(n,o){if(n&1&&(a(0,"div",3)(1,"div",17)(2,"label"),c(3,"Pricebook"),r(),a(4,"div")(5,"span"),c(6),r()()()()),n&2){let e=h();l(6),v(e.data==null?null:e.data.PricebookName)}}function Bl(n,o){if(n&1&&(a(0,"div",3)(1,"div",18)(2,"label"),c(3,"Unpaid Order"),r(),a(4,"div")(5,"span"),c(6),r()()()()),n&2){let e=h();l(6),v(e.data.UnpaidOrder?"YES":"NO")}}var ua=(()=>{class n{constructor(){this.channelType=w}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275cmp=S({type:n,selectors:[["app-advanced-config-info"]],inputs:{data:"data"},decls:46,vars:14,consts:[[1,"card","pt-12","border-top-0","rounded-0","rounded-bottom"],[1,"card-body"],[1,"row"],[1,"col-6"],["matTooltipPosition","above","matTooltip","Register where the transaction is recorded in POS",1,"info-label-group"],["matTooltipPosition","above","matTooltipClass","custom-width-tooltip","matTooltip",`Please input SKU Product for add Additional products that will be entered automatically in every transaction from the marketplace, Example : Paperbag
|
|
11
11
|
`,1,"info-label-group"],["matTooltipPosition","above","matTooltip","Minimal inventory on channel, if product inventory is below minimum inventory will automatically update to 0 ",1,"info-label-group"],[4,"ngIf"],["matTooltipPosition","above","matTooltip","WarehouseID is used to determine the warehouse where the location is stored.",1,"info-label-group"],["matTooltipPosition","above","matTooltip","Automatically sync your orders from channel to POS",1,"info-label-group"],["matTooltipPosition","above","matTooltip","create outbound logistic when webhook sends",1,"info-label-group"],["matTooltipPosition","above","matTooltip","If a return signal is sent from Shopee, we will automatically make a return at POS",1,"info-label-group"],["matTooltipPosition","above","matTooltip",`When this configuration is enabled, fulfilled marketplace orders canceled later will not be auto-voided.
|
|
12
12
|
|
|
13
13
|
- Fulfilled orders \u2192 not auto-voided (handle manually)
|
|
14
14
|
|
|
15
|
-
- Unfulfilled orders \u2192 still auto-voided`,1,"info-label-group"],["matTooltip","Image URL for Tokopedia Product Size Chart","matTooltipPosition","above",1,"info-label-group"],[1,"text-break"],["target","_blank",3,"href"],["matTooltipPosition","above","matTooltip","Please input Product SKU to automatically add additional product to record the amount of the shipping fee in order",1,"info-label-group"],[1,"info-label-group"],["matTooltipPosition","above","matTooltip","When this config is turned off, Order is only Synchronize when it has been paid",1,"info-label-group"]],template:function(i,t){i&1&&(a(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4)(5,"label"),c(6,"Register"),r(),a(7,"div")(8,"span"),c(9),r()()()(),a(10,"div",3)(11,"div",5)(12,"label"),c(13,"Additional Item"),r(),a(14,"div")(15,"span"),c(16),r()()()(),a(17,"div",3)(18,"div",6)(19,"label"),c(20,"Minimum Inventory"),r(),a(21,"div")(22,"span"),c(23),P(24,"number"),r()()()(),h(25,Nl,8,1,"ng-container",7)(26,Ll,8,1,"ng-container",7)(27,Wl,8,1,"ng-container",7)(28,Vl,8,2,"ng-container",7)(29,zl,8,1,"ng-container",7),a(30,"div",3)(31,"div",8)(32,"label"),c(33,"Warehouse ID"),r(),a(34,"div")(35,"span"),c(36),r()()()(),h(37,Gl,7,1,"div",3),a(38,"div",3)(39,"div",9)(40,"label"),c(41,"Order"),r(),a(42,"div")(43,"span"),c(44),r()()()(),h(45,Bl,7,1,"div",3),r()()()),i&2&&(l(9),v(t.data==null?null:t.data.Register),l(7),v(t.data==null?null:t.data.Additionalitem),l(7),v(G(24,12,t.data==null?null:t.data.MinimumInventory)),l(2),p("ngIf",(t.data==null?null:t.data.TypeID)==t.channelType.Shopify),l(),p("ngIf",(t.data==null?null:t.data.TypeID)==t.channelType.Shopee),l(),p("ngIf",(t.data==null?null:t.data.TypeID)==t.channelType.Tiktok||(t.data==null?null:t.data.TypeID)==t.channelType.Shopee),l(),p("ngIf",(t.data==null?null:t.data.TypeID)==t.channelType.Tokopedia||(t.data==null?null:t.data.TypeID)==t.channelType.Shopee),l(),p("ngIf",(t.data==null?null:t.data.TypeID)==t.channelType.WooCommerce),l(7),v(t.data==null?null:t.data.WarehouseID),l(),b(t.data!=null&&t.data.PricebookName?37:-1),l(7),v(t.data.SyncOrder?"YES":"NO"),l(),b((t.data==null?null:t.data.TypeID)!==t.channelType.Tokopedia?45:-1))},dependencies:[I,z,si,W,R],encapsulation:2})}}return n})();function Hl(n,o){if(n&1){let e=A();a(0,"div",4)(1,"div",10)(2,"label"),c(3,"Shop ID"),r(),a(4,"div")(5,"span"),c(6),r()(),a(7,"button",11),C("click",function(){x(e);let t=u();return D(t.onTestChannel(t.channel))}),c(8," Test "),r()()()}if(n&2){let e=u();l(6),v(e.channel.ShopID!=0?e.channel.ShopID:e.channel.ShopIDString)}}function Ul(n,o){if(n&1&&(k(0),a(1,"div",4)(2,"div",12)(3,"label"),c(4,"Marketplace URL"),r(),a(5,"div")(6,"span"),c(7),r()()()(),E()),n&2){let e=u();l(7),v(e.channel.URL)}}function jl(n,o){if(n&1&&(a(0,"div",4)(1,"div",13)(2,"label"),c(3,"Multiwarehouse"),r(),a(4,"div")(5,"span"),c(6),r()()()()),n&2){let e=u();l(6),v(e.channel.MultiWarehouse?"YES":"NO")}}var ga=(()=>{class n{constructor(e){this.channelService=e,this.channelType=w}onTestChannel(e){this.channelService.testShopID(e).subscribe()}static{this.\u0275fac=function(i){return new(i||n)(V(Re))}}static{this.\u0275cmp=S({type:n,selectors:[["app-marketplace-config-info"]],inputs:{channel:"channel"},decls:31,vars:9,consts:[[1,"card"],[1,"card-header"],[1,"card-body","mt-8"],[1,"row"],[1,"col-sm-6"],["matTooltipPosition","above","matTooltip","Your shop name in marketplace channel",1,"info-label-group"],["matTooltipPosition","above","matTooltip","Marketplace / Website where your product is Sold / Distributed",1,"info-label-group"],["class","col-sm-6",4,"ngIf"],[4,"ngIf"],["matTooltipPosition","above","matTooltip","Last Sync Product",1,"info-label-group"],["matTooltipPosition","above","matTooltip","Your shop ID",1,"info-label-group","w-100","d-flex","justify-content-between"],[1,"btn","btn-outline-success","ms-2","btn-sm",3,"click"],["matTooltipPosition","above","matTooltip","Your Marketplace URL",1,"info-label-group"],[1,"info-label-group"]],template:function(i,t){i&1&&(a(0,"div",0)(1,"div",1)(2,"h3"),c(3,"Marketplace Setup"),r()(),a(4,"div",2)(5,"div",3)(6,"div",4)(7,"div",5)(8,"label"),c(9,"Name"),r(),a(10,"div")(11,"span"),c(12),r()()()(),a(13,"div",4)(14,"div",6)(15,"label"),c(16,"Type"),r(),a(17,"div")(18,"span"),c(19),r()()()(),h(20,Hl,9,1,"div",7)(21,Ul,8,1,"ng-container",8),a(22,"div",4)(23,"div",9)(24,"label"),c(25,"Product Sync"),r(),a(26,"div")(27,"span"),c(28),P(29,"date"),r()()()(),h(30,jl,7,1,"div",4),r()()()),i&2&&(l(12),v(t.channel.Name),l(7),v(t.channel.TypeString),l(),p("ngIf",t.channel.TypeID!=2),l(),p("ngIf",t.channel.TypeID!=t.channelType.Tiktok),l(7),v(t.channel.LastSync?me(29,6,t.channel.LastSync,"dd MMM yyyy HH:mm"):"Never"),l(2),b((t.channel==null?null:t.channel.TypeID)==t.channelType.Shopee?30:-1))},dependencies:[I,z,He,W,R],encapsulation:2})}}return n})();var Ti=function(n){return n[n.OFF=0]="OFF",n[n.UNFULFILLED=1]="UNFULFILLED",n[n.ALL=2]="ALL",n}(Ti||{});var $t=function(n){return n[n.NEVER=0]="NEVER",n[n.UNPAID=1]="UNPAID",n[n.PAID=2]="PAID",n}($t||{});function ql(n,o){if(n&1&&(a(0,"div",3)(1,"div",4)(2,"label"),c(3,"New Order Sync"),r(),a(4,"div")(5,"span"),c(6),r()()(),a(7,"div",4)(8,"label"),c(9,"Cancelled Order Sync"),r(),a(10,"div")(11,"span"),c(12),r()()(),a(13,"div",5)(14,"label"),c(15,"Inventory"),r(),a(16,"div")(17,"span"),c(18),r()()()()),n&2){let e=u();l(),p("matTooltip",e.orderSyncTooltip[e.channel.NewOrderSyncTypeID]),l(5),v(e.channel.NewOrderSyncTypeIDString),l(),p("matTooltip",e.cancelOrderTooltip[e.channel.CancelledOrderSyncTypeID]),l(5),v(e.channel.CancelledOrderSyncTypeIDString),l(6),v(e.channel.SyncInventory?"YES":"NO")}}var va=(()=>{class n{constructor(){this.channelType=w,this.orderSyncTooltip={[$t.PAID]:"Sync only paid orders from the channel and create them as Invoices.",[$t.UNPAID]:"Sync unpaid orders from the channel and create them as Sales Orders.",[$t.NEVER]:"Do not automatically sync orders from the channel to DealPOS."},this.cancelOrderTooltip={[Ti.UNFULFILLED]:" If the order is already fulfilled, the POS invoice will not be voided.",[Ti.ALL]:"The POS invoice will always be voided, even if the order is fulfilled."}}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275cmp=S({type:n,selectors:[["app-sync-config-info"]],inputs:{channel:"channel"},decls:5,vars:1,consts:[[1,"card"],[1,"card-header"],["class","card-body mt-8",4,"ngIf"],[1,"card-body","mt-8"],["matTooltipPosition","above",1,"info-label-group",3,"matTooltip"],["matTooltipPosition","above","matTooltip","Automatically sync your POS inventory to channel inventory",1,"info-label-group"]],template:function(i,t){i&1&&(a(0,"div",0)(1,"div",1)(2,"h3"),c(3,"Synchronize"),r()(),h(4,ql,19,5,"div",2),r()),i&2&&(l(4),p("ngIf",t.channel))},dependencies:[I,z,W,R],encapsulation:2})}}return n})();var Kl=n=>({"bg-gradient-danger":n}),Zl=(n,o)=>({"text-success":n,"text-danger":o});function Yl(n,o){if(n&1&&(a(0,"div",2)(1,"div",3)(2,"div",4)(3,"label"),c(4,"Consumer Key"),r(),a(5,"div")(6,"span"),c(7),r()()()(),a(8,"div",5)(9,"div",4)(10,"label"),c(11,"Consumer Secret"),r(),a(12,"div")(13,"span"),c(14),r()()()()()),n&2){let e=u();l(7),v(e.data==null?null:e.data.ConsumerKey),l(7),v(e.data==null?null:e.data.ConsumerSecret)}}function Ql(n,o){if(n&1&&(a(0,"div",3)(1,"div",6)(2,"label"),c(3,"Authorized"),r(),a(4,"div")(5,"span"),c(6),r()()()()),n&2){let e=u();l(6),v(e.data!=null&&e.data.Authorized?"YES":"NO")}}function Jl(n,o){if(n&1&&(a(0,"div",3)(1,"div",7),P(2,"expiredTime"),a(3,"label"),c(4,"Shop Expiration"),r(),a(5,"div")(6,"span"),c(7),P(8,"date"),r()()()()),n&2){let e=u();l(),p("ngClass",y(8,Kl,G(2,3,e.data==null?null:e.data.ExpiredTime)))("matTooltip","The expiry date for "+(e.data==null?null:e.data.Name)+" Open API authorization from your account "+(e.data==null?null:e.data.Name)+" to Dealpos"),l(6),v(e.data.ExpiredTime?me(8,5,e.data.ExpiredTime,"dd MMM yyyy HH:mm"):"-")}}function Xl(n,o){if(n&1&&(a(0,"div",3)(1,"div",21)(2,"label"),c(3,"Token Issued"),r(),a(4,"div")(5,"span"),c(6),P(7,"date"),r()()()()),n&2){let e=u(2);l(6),v(me(7,1,e.data==null?null:e.data.TokenIssued,"dd MMM yyyy HH:mm"))}}function $l(n,o){if(n&1){let e=A();a(0,"div",3)(1,"div",4)(2,"label"),c(3,"Refresh Token"),r(),a(4,"div")(5,"span",8),c(6),r()()()(),a(7,"div",3)(8,"div",9)(9,"label"),c(10,"Access Token"),r(),a(11,"div",10)(12,"span",8),c(13),r(),a(14,"span",11)(15,"button",12),C("click",function(){x(e);let t=u();return D(t.onRefreshToken())}),g(16,"i",13),a(17,"span"),c(18,"Refresh"),r()()()()()(),h(19,Xl,8,4,"div",3),a(20,"div",3)(21,"div",14)(22,"label"),c(23,"Access Token Expired"),r(),a(24,"div",15)(25,"div",16),c(26),P(27,"date"),r(),a(28,"div",17)(29,"button",18),C("click",function(){x(e);let t=u();return D(t.onAuthorize())}),g(30,"i",19),a(31,"span"),c(32,"Extend"),r()()()()()(),a(33,"div",3)(34,"div",20)(35,"label"),c(36,"Token Log"),r(),a(37,"div")(38,"span"),c(39),r()()()()}if(n&2){let e=u();l(6),v(e.data==null?null:e.data.RefreshToken),l(7),v(e.data==null?null:e.data.AccessToken),l(6),b((e.data==null?null:e.data.TypeID)==e.channelType.Shopee?19:-1),l(2),p("matTooltip",e.tokenExpiryMessage),l(4),p("ngClass",ne(11,Zl,!e.isAccessTokenExpired,e.isAccessTokenExpired)),l(),O(" ",me(27,8,e.data.TokenExpired,"dd MMM yyyy HH:mm")," "),l(2),li("matTooltip",e.data.TypeID==e.channelType.Shopee?"Extend Shopee Authorization Duration for an additional 1 year":"Update Token Expired date"),l(11),v(e.data!=null&&e.data.TokenLog?"YES":"NO")}}var _a=(()=>{class n{constructor(e,i){this.toastr=e,this.authorizeService=i,this.isAccessTokenExpired=!1,this.isRefreshTokenExpired=!1,this.channelType=w,this.onSuccessRefrehToken=new j}ngOnChanges(e){e.data?.currentValue&&(this.checkExpiredToken(),this.tokenExpiryMessage=this.authorizeService.generateTokenExpiryMessage(this.data.TypeID))}checkExpiredToken(){let e=new Date(this.data?.TokenExpired),i=new Date(this.data?.RefreshTokenExpired);this.isAccessTokenExpired=this.authorizeService.isExpiredDate(e),this.isRefreshTokenExpired=this.authorizeService.isExpiredDate(i)}onAuthorize(){this.authorizeService.authorizedChannel(this.data.TypeID).subscribe()}onRefreshToken(){this.authorizeService.onRefreshToken(this.data.ID).subscribe(e=>{this.toastr.success("Token refreshed successfully!","Success").onShown.subscribe(()=>this.onSuccessRefrehToken.emit())})}static{this.\u0275fac=function(i){return new(i||n)(V(ae),V(vt))}}static{this.\u0275cmp=S({type:n,selectors:[["app-authorized-config-info"]],inputs:{data:"data"},outputs:{onSuccessRefrehToken:"onSuccessRefrehToken"},features:[he([vt]),J],decls:7,vars:4,consts:[[1,"card","pt-12","border-top-0","rounded-0","rounded-bottom"],[1,"card-body"],[1,"row"],[1,"col-6"],[1,"info-label-group"],[1,"col-6","pe-8"],["matTooltipPosition","above","matTooltip","Channel has been authorized to be managed by omni.dealpos.app",1,"info-label-group"],["matTooltipPosition","above",1,"info-label-group",3,"ngClass","matTooltip"],[1,"text-wrap","text-break"],["matTooltipPosition","above","matTooltip","When your Shop Authorization has not expired you can try generate a new Access Token",1,"info-label-group"],[1,"d-flex","align-items-center","justify-content-between","w-100","text-wrap","text-break","py-3"],[1,"ms-4","text-end",2,"min-width","86px"],["type","button","matTooltip","Generate new access token",1,"btn","btn-outline-secondary","btn-sm",3,"click"],[1,"fa-solid","fa-arrows-rotate","me-2"],["matTooltipPosition","above",1,"info-label-group",3,"matTooltip"],[1,"d-flex","align-items-center","justify-content-between","w-100"],[3,"ngClass"],["matTooltipClass","unset-max-width-tooltip",3,"matTooltip"],["type","button",1,"btn","btn-outline-secondary","btn-sm",3,"click"],[1,"fas","fa-plus-circle","me-2"],["matTooltipPosition","above","matTooltip","Enable for Record log when new token issued",1,"info-label-group"],["matTooltipPosition","above","matTooltip","When a request is made by omni.dealpos.app to get a new access_token from the Channel",1,"info-label-group"]],template:function(i,t){i&1&&(a(0,"div",0)(1,"div",1),h(2,Yl,15,2,"div",2),a(3,"div",2),h(4,Ql,7,1,"div",3)(5,Jl,9,10,"div",3)(6,$l,40,14),r()()()),i&2&&(l(2),b(t.channelType.WooCommerce==(t.data==null?null:t.data.TypeID)||t.channelType.Shopify==(t.data==null?null:t.data.TypeID)||t.channelType.Plugo==(t.data==null?null:t.data.TypeID)?2:-1),l(2),b(t.channelType.Tokopedia==t.data.TypeID||t.channelType.Shopee==t.data.TypeID||t.channelType.Tiktok==t.data.TypeID||t.channelType.Lazada==t.data.TypeID?4:-1),l(),b((t.data==null?null:t.data.TypeID)==t.channelType.Shopee?5:-1),l(),b((t.data==null?null:t.data.TypeID)==t.channelType.Tiktok||(t.data==null?null:t.data.TypeID)==t.channelType.Lazada||(t.data==null?null:t.data.TypeID)==t.channelType.Shopee?6:-1))},dependencies:[I,L,He,W,R,Pt],encapsulation:2})}}return n})();var ya=n=>({"bg-gradient-warning":n});function es(n,o){if(n&1&&(a(0,"div",2)(1,"div",3)(2,"div",4)(3,"div",5)(4,"label"),c(5,"New Order To"),r(),a(6,"div")(7,"span"),c(8),r()()()(),a(9,"div",4)(10,"div",6)(11,"label"),c(12,"Dispatch Orders From"),r(),a(13,"div")(14,"span"),c(15),r()()()()(),a(16,"div",3)(17,"div",7)(18,"div",8)(19,"label"),c(20,"Product Inventory"),r(),a(21,"div")(22,"span"),c(23),r()()()()()()),n&2){let e=u();l(3),p("ngClass",y(5,ya,!e.data.POSOutlet)),l(5),v(e.data.POSOutlet),l(2),p("ngClass",y(7,ya,!e.data.POSDeliveryOutlet)),l(5),v(e.data.POSDeliveryOutlet),l(8),v(e.data.POSInventoryOutlet)}}var ba=(()=>{class n{constructor(){}ngOnInit(){}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275cmp=S({type:n,selectors:[["app-outlet-config-info"]],inputs:{data:"data"},decls:2,vars:1,consts:[[1,"card","pt-12","border-top-0","rounded-0","rounded-bottom"],["class","card-body",4,"ngIf"],[1,"card-body"],[1,"row"],[1,"col-6"],["matTooltipPosition","above","matTooltip","Outlet where the transaction is recorded in POS",1,"info-label-group",3,"ngClass"],["matTooltipPosition","above","matTooltip","Outlet where the stock is deducted in POS",1,"info-label-group",3,"ngClass"],[1,"col-12"],["matTooltipPosition","above","matTooltip","Outlet where the inventory will displayed as inventory in Inventory Comparison Menu",1,"info-label-group"]],template:function(i,t){i&1&&(a(0,"div",0),h(1,es,24,9,"div",1),r()),i&2&&(l(),p("ngIf",t.data))},dependencies:[I,L,z,W,R],encapsulation:2})}}return n})();var rn=n=>({"bg-gradient-warning":n});function ts(n,o){if(n&1&&(a(0,"div",2)(1,"div",3)(2,"div",4)(3,"div",5)(4,"label"),c(5,"Payment Method"),r(),a(6,"div")(7,"span"),c(8),r()()()(),a(9,"div",4)(10,"div",6)(11,"label"),c(12,"Tax"),r(),a(13,"div")(14,"span"),c(15),r()()()()(),a(16,"div",3)(17,"div",4)(18,"div",7)(19,"label"),c(20,"Tag"),r(),a(21,"div")(22,"span"),c(23),r()()()()()()),n&2){let e=u();l(3),p("ngClass",y(6,rn,!e.data.POSInvoicePaymentMethod)),l(5),v(e.data.POSInvoicePaymentMethod),l(2),p("ngClass",y(8,rn,!e.data.POSTax)),l(5),v(e.data.POSTax),l(3),p("ngClass",y(10,rn,!e.data.POSSalesOrderType)),l(5),v(e.data.POSSalesOrderType)}}var Ca=(()=>{class n{constructor(){}ngOnInit(){}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275cmp=S({type:n,selectors:[["app-orders-config-info"]],inputs:{data:"data"},decls:2,vars:1,consts:[[1,"card","pt-12","border-top-0","rounded-0","rounded-bottom"],["class","card-body",4,"ngIf"],[1,"card-body"],[1,"row"],[1,"col-6"],["matTooltipPosition","above","matTooltip","Payment that will be recorded in POS if there is a transaction from the marketplace",1,"info-label-group",3,"ngClass"],["matTooltipPosition","above","matTooltip","Tax Type that will be recorded in POS if there is a transaction from the marketplace",1,"info-label-group",3,"ngClass"],["matTooltipPosition","above","matTooltip","Tag Type that will be recorded in POS if there is a transaction from the marketplace",1,"info-label-group",3,"ngClass"]],template:function(i,t){i&1&&(a(0,"div",0),h(1,ts,24,12,"div",1),r()),i&2&&(l(),p("ngIf",t.data))},dependencies:[I,L,z,W,R],encapsulation:2})}}return n})();var ei=function(n){return n.Never="Never",n.Full="Full",n.WriteOff="Write Off",n}(ei||{});function is(n,o){if(n&1&&(k(0),a(1,"div",3)(2,"div",11)(3,"label"),c(4,"Write Off Reason"),r(),a(5,"div")(6,"span"),c(7),r()()()(),E()),n&2){let e=u();l(7),v(e.data.ServiceFeeWriteOffReason)}}var Sa=(()=>{class n{getPaymentSyncStateEnum(){switch(this.data.PaymentSyncTypeID){case 0:return ei.Never;case 1:return ei.Full;case 2:return ei.WriteOff;default:throw new Error("Unknown PaymentSyncTypeID")}}constructor(){}ngOnInit(){}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275cmp=S({type:n,selectors:[["app-invoiceFee-config-info"]],inputs:{data:"data"},decls:23,vars:3,consts:[[1,"card","pt-12","border-top-0","rounded-0","rounded-bottom"],[1,"card-body"],[1,"row"],[1,"col-6"],[1,"info-label-group","mb-4"],[1,"d-flex","border","mb-4","pt-6","px-6",2,"background","#1f87ac0a","border-radius","5px"],[1,"me-3","pt-1"],[1,"fa","fa-lightbulb","fs-5"],[1,"mb-6"],["matTooltipPosition","above","matTooltip","Select Write Off Account",1,"info-label-group","mb-4"],[4,"ngIf"],["matTooltipPosition","above","matTooltip","Choose Reason to Write Off",1,"info-label-group"]],template:function(i,t){i&1&&(a(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4)(5,"label"),c(6,"Enable Write Off"),r(),a(7,"div")(8,"span"),c(9),r()()(),a(10,"div",5)(11,"div",6),g(12,"i",7),r(),a(13,"p",8),c(14," When this configuration is turned on, Invoice Payment value is deducted with Marketplace Service Fee. Ex: $100 Order might only receive $97 Payment, $3 is recorded as Write Off "),r()()(),a(15,"div",3)(16,"div",9)(17,"label"),c(18,"PaymentSyncType"),r(),a(19,"div")(20,"span"),c(21),r()()()(),h(22,is,8,1,"ng-container",10),r()()()),i&2&&(l(9),v(t.data.ServiceFeeWriteOff==!0?"YES":"NO"),l(12),v(t.getPaymentSyncStateEnum()),l(),p("ngIf",t.data.ServiceFeeWriteOff))},dependencies:[I,z,W,R],encapsulation:2})}}return n})();var ns=n=>({"bg-gradient-warning":n});function os(n,o){if(n&1&&(a(0,"tr")(1,"td"),c(2),r(),a(3,"td"),c(4),r(),a(5,"td",10),c(6),r()()),n&2){let e=o.$implicit;l(2),v(e.topic),l(2),v(e.addressWithoutHost),l(),p("ngClass",y(4,ns,!e.enabled)),l(),O(" ",e.enabled?"ENABLED":"DISABLED"," ")}}function as(n,o){if(n&1&&(k(0),a(1,"table",5)(2,"thead",6)(3,"tr")(4,"th",7),c(5,"Event"),r(),a(6,"th",8),c(7,"Url"),r(),a(8,"th",7),c(9,"State"),r()()(),a(10,"tbody"),h(11,os,7,6,"tr",9),r()(),E()),n&2){let e=o.ngIf;l(11),p("ngForOf",e)}}var wa=(()=>{class n{constructor(){this.shopifyWebhookService=f(Ye),this.wooCommerceService=f(Qe)}ngOnChanges(e){this.channel&&this.initWebhook(this.channel)}initWebhook(e){switch(e.TypeID){case w.Shopify:this.webhooks$=this.shopifyWebhookService.getWebhookWithState(e.ID).pipe(Ce(1));break;case w.WooCommerce:this.webhooks$=this.wooCommerceService.getWebhookWithState(e.ID).pipe(Ce(1));break}}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275cmp=S({type:n,selectors:[["app-webhook-config-info"]],inputs:{channel:"channel"},features:[J],decls:7,vars:3,consts:[[1,"card","pt-12","border-top-0","rounded-0","rounded-bottom"],[1,"card-body"],[1,"row"],[1,"col-12"],[4,"ngIf"],[1,"table","mb-6","w-50"],[1,"thead-light"],["scope","col",2,"width","100px"],["scope","col"],[4,"ngFor","ngForOf"],[3,"ngClass"]],template:function(i,t){i&1&&(a(0,"div",0)(1,"div")(2,"div",1)(3,"div",2)(4,"div",3),h(5,as,12,1,"ng-container",4),P(6,"async"),r()()()()()),i&2&&(l(5),p("ngIf",G(6,1,t.webhooks$)))},dependencies:[I,L,fe,z,_e],encapsulation:2})}}return n})();function rs(n,o){if(n&1&&(a(0,"div",3)(1,"div",5)(2,"label"),c(3,"Category"),r(),a(4,"div")(5,"span"),c(6),P(7,"async"),r()()()()),n&2){let e=u();l(6),v(G(7,1,e.categoryLabel$))}}function ls(n,o){if(n&1&&(a(0,"div",3)(1,"div",6)(2,"label"),c(3,"Brand"),r(),a(4,"div")(5,"span"),c(6),r()()()()),n&2){let e=u();l(6),v(e.data==null?null:e.data.Brand)}}function ss(n,o){if(n&1&&(a(0,"div",3)(1,"div",7)(2,"label"),c(3,"ScanProductSize"),r(),a(4,"div")(5,"span"),c(6),r()()()()),n&2){let e=u();l(6),v(e.data==null?null:e.data.ScanProductSize)}}var Ta=(()=>{class n{constructor(){this.categoryService=f(ao),this.channelType=w}ngOnChanges(){this.data&&(this.categoryLabel$=this.categoryService.getCategories(this.data?.TypeID,this.data?.ID).pipe(se(e=>{let i=this.categoryService.searchByIdWithParentDFS(e,this.data?.DefaultCategoryID),t="";return i&&(t=F.getLabelPathTree(i)),t})))}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275cmp=S({type:n,selectors:[["app-default-config-info"]],inputs:{data:"data"},features:[J],decls:13,vars:4,consts:[[1,"card","pt-12","border-top-0","rounded-0","rounded-bottom"],[1,"card-body"],[1,"row"],[1,"col-6"],["matTooltipPosition","above","matTooltip","Change the customer's name from the order in the marketplace according this email",1,"info-label-group"],["matTooltipPosition","above","matTooltip","Set default category for uploading product to channel",1,"info-label-group"],["matTooltipPosition","above","matTooltip","Brand name for product upload",1,"info-label-group"],["matTooltipPosition","above","matTooltip","Customize Scan Product Size",1,"info-label-group"]],template:function(i,t){i&1&&(a(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4)(5,"label"),c(6,"Customer Default Email"),r(),a(7,"div")(8,"span"),c(9),r()()()(),h(10,rs,8,3,"div",3)(11,ls,7,1,"div",3)(12,ss,7,1,"div",3),r()()()),i&2&&(l(9),v(t.data==null?null:t.data.CustomerDefaultEmail),l(),b(t.data.TypeID!=t.channelType.Shopify&&t.data.TypeID!=t.channelType.Lazada?10:-1),l(),b((t.data==null?null:t.data.TypeID)==t.channelType.Lazada?11:-1),l(),b((t.data==null?null:t.data.TypeID)==t.channelType.Lazada||(t.data==null?null:t.data.TypeID)==t.channelType.WooCommerce?12:-1))},dependencies:[I,_e,W,R],encapsulation:2})}}return n})();function cs(n,o){if(n&1&&(k(0),a(1,"tr")(2,"td",4),c(3),r(),a(4,"td",4),c(5),r()(),E()),n&2){let e=o.$implicit;l(3),O(" ",e.Name," "),l(2),O(" ",e.ProductInventoryOutlet," ")}}var Ia=(()=>{class n{constructor(){this.warehouseLocations=[]}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275cmp=S({type:n,selectors:[["app-warehouse-config-info"]],inputs:{warehouseLocations:"warehouseLocations"},decls:11,vars:1,consts:[[1,"card","pt-12","border-top-0","rounded-0","rounded-bottom"],[1,"card-body"],[1,"table","table-bordered","mb-12","w-50"],[1,"table-light"],[1,"text-start"],[4,"ngFor","ngForOf"]],template:function(i,t){i&1&&(a(0,"div",0)(1,"div",1)(2,"table",2)(3,"thead")(4,"tr",3)(5,"th",4),c(6,"Shopee Warehouse"),r(),a(7,"th",4),c(8,"DealPOS Outlet"),r()()(),a(9,"tbody"),h(10,cs,6,2,"ng-container",5),r()()()()),i&2&&(l(10),p("ngForOf",t.warehouseLocations))},dependencies:[I,fe,te],encapsulation:2})}}return n})();var ln=n=>[n],Da=n=>({ID:n}),ka=n=>["/menu/channel/marketplace/form",n],ds=n=>({"bg-gradient-danger":n});function ps(n,o){}function ms(n,o){}function hs(n,o){if(n&1){let e=A();a(0,"div",7)(1,"a",8),c(2,"Edit"),r(),g(3,"button",9),a(4,"ul",10)(5,"li",11)(6,"a",12),C("click",function(){x(e);let t=u(2);return D(t.onDelete(t.channel))}),c(7,"Delete"),r()()()()}if(n&2){let e=u(2);l(),p("routerLink",y(3,ka,y(1,Da,e.channel==null?null:e.channel.ID)))}}function us(n,o){if(n&1&&(a(0,"button",8),c(1,"Edit"),r()),n&2){let e=u(2);p("routerLink",y(3,ka,y(1,Da,e.channel==null?null:e.channel.ID)))}}function fs(n,o){if(n&1&&h(0,ms,0,0,"ng-template",5)(1,hs,8,5,"ng-template",null,2,ot)(3,us,2,5,"ng-template",null,3,ot),n&2){let e=Be(2),i=Be(4),t=u();p("ngxPermissionsOnly",y(3,ln,t.roleChannelDelete))("ngxPermissionsOnlyThen",e)("ngxPermissionsOnlyElse",i)}}function gs(n,o){if(n&1){let e=A();a(0,"button",14),C("click",function(){x(e);let t=u(2);return D(t.onDelete(t.channel))}),c(1,"Delete"),r()}}function vs(n,o){if(n&1&&h(0,gs,2,0,"ng-template",13),n&2){let e=u();p("ngxPermissionsOnly",y(1,ln,e.roleChannelDelete))}}function _s(n,o){n&1&&(a(0,"button",27),c(1," Multi Warehouse "),r())}function ys(n,o){n&1&&(a(0,"button",29),c(1,"Webhook"),r())}function bs(n,o){if(n&1&&(a(0,"div",41),g(1,"app-webhook-config-info",18),r()),n&2){let e=u(2);l(),p("channel",e.channel)}}function Cs(n,o){if(n&1&&(a(0,"span"),c(1),r()),n&2){let e=u(2);l(),O("/",e.channel.Creator,"")}}function Ss(n,o){if(n&1&&(a(0,"span"),c(1),r()),n&2){let e=u(3);l(),O("/",e.channel.Creator,"")}}function ws(n,o){if(n&1&&(k(0),a(1,"div")(2,"span",46),c(3,"Modified:"),r(),c(4),P(5,"date"),h(6,Ss,2,1,"span",47),r(),E()),n&2){let e=u(2);l(4),O(" ",me(5,2,e.channel.Modified,"dd MMM yyyy HH:mm"),""),l(2),p("ngIf",e.channel.Creator)}}function Ts(n,o){if(n&1){let e=A();a(0,"div",15)(1,"div",16)(2,"div",17),g(3,"app-marketplace-config-info",18),r(),a(4,"div",19),g(5,"app-sync-config-info",18),r()(),a(6,"div",16)(7,"div",20)(8,"nav")(9,"div",21)(10,"button",22),c(11,"Outlet"),r(),a(12,"button",23),c(13,"Orders"),r(),a(14,"button",24),c(15,"Service Fee"),r(),a(16,"button",25),c(17,"Advanced"),r(),a(18,"button",26),c(19,"Authorization"),r(),h(20,_s,2,0,"button",27),a(21,"button",28),c(22,"Default"),r(),h(23,ys,2,0,"button",29),r()(),a(24,"div",30)(25,"div",31),g(26,"app-outlet-config-info",32),r(),a(27,"div",33),g(28,"app-orders-config-info",32),r(),a(29,"div",34),g(30,"app-invoiceFee-config-info",32),r(),a(31,"div",35),g(32,"app-advanced-config-info",32),r(),a(33,"div",36)(34,"app-authorized-config-info",37),C("onSuccessRefrehToken",function(){x(e);let t=u();return D(t.onGetChannel())}),r()(),a(35,"div",38),g(36,"app-warehouse-config-info",39),r(),a(37,"div",40),g(38,"app-default-config-info",32),r(),h(39,bs,2,1,"div",41),r()()(),a(40,"div",42)(41,"div",43),g(42,"i",44),a(43,"div",45)(44,"span",46),c(45,"Created:"),r(),c(46),P(47,"date"),h(48,Cs,2,1,"span",47),r(),h(49,ws,7,5,"ng-container",47),r()()()}if(n&2){let e=u();l(3),p("channel",e.channel),l(2),p("channel",e.channel),l(13),p("ngClass",y(19,ds,!(e.channel!=null&&e.channel.Authorized))),l(2),b((e.channel==null?null:e.channel.TypeID)==e.channelType.Shopee&&(e.channel.WarehouseLocations==null?null:e.channel.WarehouseLocations.length)>0&&(e.channel!=null&&e.channel.MultiWarehouse)?20:-1),l(3),b(e.channelType.Shopify==e.channel.TypeID||e.channelType.WooCommerce==e.channel.TypeID?23:-1),l(3),p("data",e.channel),l(2),p("data",e.channel),l(2),p("data",e.channel),l(2),p("data",e.channel),l(2),p("data",e.channel),l(2),p("warehouseLocations",e.channel.WarehouseLocations),l(2),p("data",e.channel),l(),b(e.channelType.Shopify==e.channel.TypeID||e.channelType.WooCommerce==e.channel.TypeID?39:-1),l(7),O(" ",me(47,16,e.channel.Created,"dd MMM yyyy HH:mm")," "),l(2),p("ngIf",!e.channel.Modified&&e.channel.Creator),l(),p("ngIf",e.channel.Modified)}}var Ii=(()=>{class n{constructor(e,i,t,s){this.route=e,this.http=i,this.router=t,this.toastr=s,this.roleChannelEdit=ft.ChannelEdit,this.roleChannelDelete=ft.ChannelDelete,this.channelType=w,this.route.queryParams.subscribe(d=>{this.ID=d.ID}),this.ID!=null&&this.onGetChannel()}onGetChannel(){var e={ID:this.ID};this.http.post("/api/ChannelLoader/GetChannelView",e).subscribe(i=>{this.channel=i.Model,this.channel.LogMode==1?this.channel.LogModeLabel="None":this.channel.LogMode==2?this.channel.LogModeLabel="Error":this.channel.LogMode==3&&(this.channel.LogModeLabel="Full")})}onDelete(e){if(confirm("Delete channel "+e.Name+" ?")){var t={ID:e.ID};this.http.post("/api/Channel/DeleteChannel",t).subscribe(s=>{this.toastr.success("Channel "+e.Name+" is deleted!","Success",{closeButton:!0,positionClass:"toast-bottom-right"}),this.router.navigate(["menu/channel"])})}}static{this.\u0275fac=function(i){return new(i||n)(V(ci),V(ye),V(at),V(ae))}}static{this.\u0275cmp=S({type:n,selectors:[["app-marketplace-view"]],features:[he([Ye,Qe])],decls:9,vars:9,consts:[["CHANNEL_EDIT",""],["CHANNEL_DELETE",""],["ALL_BUTTON",""],["EDIT_ONLY",""],[3,"headerTitle","hideSearchBox","hideSearchDropdown"],[3,"ngxPermissionsOnly","ngxPermissionsOnlyThen","ngxPermissionsOnlyElse"],["class","container-fluid py-5 bg-light-gray",4,"ngIf"],[1,"btn-group"],["role","button",1,"btn","btn-outline-secondary",3,"routerLink"],["data-bs-toggle","dropdown","aria-expanded","false",1,"btn","btn-outline-secondary","btn-sm","dropdown-toggle"],[1,"dropdown-menu","dropdown-menu-end","pointer"],[1,"dropdown-item"],["role","button",1,"fs-5",3,"click"],[3,"ngxPermissionsOnly"],["role","button",1,"btn","btn-outline-secondary",3,"click"],[1,"container-fluid","py-5","bg-light-gray"],[1,"row"],[1,"col-8"],[3,"channel"],[1,"col-4"],[1,"col-12"],["id","nav-tab","role","tablist",1,"nav","nav-tabs"],["id","nav-outlet-config-tab","data-bs-toggle","tab","data-bs-target","#nav-outlet-config","type","button","role","tab","aria-controls","nav-outlet-config","aria-selected","true",1,"nav-link","active"],["id","nav-order-config-tab","data-bs-toggle","tab","data-bs-target","#nav-order-config","type","button","role","tab","aria-controls","nav-order-config","aria-selected","false",1,"nav-link"],["id","nav-service-fee-tab","data-bs-toggle","tab","data-bs-target","#nav-service-fee","type","button","role","tab","aria-controls","nav-service-fee","aria-selected","false",1,"nav-link"],["id","nav-advanced-tab","data-bs-toggle","tab","data-bs-target","#nav-advanced","type","button","role","tab","aria-controls","nav-advanced","aria-selected","false",1,"nav-link"],["id","nav-advanced-tab","data-bs-toggle","tab","data-bs-target","#nav-authorized","type","button","role","tab","aria-controls","nav-authorized","aria-selected","false",1,"nav-link",3,"ngClass"],["id","nav-warehouse-tab","data-bs-toggle","tab","data-bs-target","#nav-warehouse","type","button","role","tab","aria-controls","nav-warehouse","aria-selected","false",1,"nav-link"],["id","nav-default-tab","data-bs-toggle","tab","data-bs-target","#nav-default","type","button","role","tab","aria-controls","nav-default","aria-selected","false",1,"nav-link"],["id","nav-webhook-tab","data-bs-toggle","tab","data-bs-target","#nav-webhook","type","button","role","tab","aria-controls","nav-webhook","aria-selected","false",1,"nav-link"],["id","nav-tabContent",1,"tab-content"],["id","nav-outlet-config","role","tabpanel","aria-labelledby","nav-outlet-config-tab",1,"tab-pane","fade","show","active"],[3,"data"],["id","nav-order-config","role","tabpanel","aria-labelledby","nav-order-config-tab",1,"tab-pane","fade"],["id","nav-service-fee","role","tabpanel","aria-labelledby","nav-service-fee-tab",1,"tab-pane","fade"],["id","nav-advanced","role","tabpanel","aria-labelledby","nav-advanced-tab",1,"tab-pane","fade"],["id","nav-authorized","role","tabpanel","aria-labelledby","nav-authorized-tab",1,"tab-pane","fade"],[3,"onSuccessRefrehToken","data"],["id","nav-warehouse","role","tabpanel","aria-labelledby","nav-warehouse-tab",1,"tab-pane","fade"],[3,"warehouseLocations"],["id","nav-default","role","tabpanel","aria-labelledby","nav-default-tab",1,"tab-pane","fade"],["id","nav-webhook","role","tabpanel","aria-labelledby","nav-webhook-tab",1,"tab-pane","fade"],[1,"alert","alert-warning","w-100"],[1,"d-flex","align-items-center","justify-content-start","p-4"],["aria-hidden","true",1,"fa-regular","fa-file","me-5"],[1,"me-2"],[1,"fw-bold"],[4,"ngIf"]],template:function(i,t){if(i&1&&(a(0,"mainpanel",4)(1,"actions"),h(2,ps,0,0,"ng-template",5)(3,fs,5,5,"ng-template",null,0,ot)(5,vs,1,3,"ng-template",null,1,ot),r(),a(7,"content"),h(8,Ts,50,21,"div",6),r()()),i&2){let s=Be(4),d=Be(6);p("headerTitle","Marketplace Configuration View")("hideSearchBox",!0)("hideSearchDropdown",!0),l(2),p("ngxPermissionsOnly",y(7,ln,t.roleChannelEdit))("ngxPermissionsOnlyThen",s)("ngxPermissionsOnlyElse",d),l(6),p("ngIf",t.channel)}},dependencies:[I,L,z,He,fa,ga,va,_a,ba,Ca,Sa,Ta,wa,Dt,Fe,rt,Pe,Gt,It,Ia],styles:[".tab-pane[_ngcontent-%COMP%]{margin-top:0!important}"]})}}return n})();var Ea=n=>({"is-invalid":n});function Is(n,o){n&1&&(a(0,"div",6),c(1,"Api Key is required"),r())}function xs(n,o){n&1&&(a(0,"div",6),c(1,"Vendor ID is required"),r())}var Pa=(()=>{class n{constructor(){this.dialogRef=f(Gn),this.config=new Ni,this.initModalConfig(),this.initFormGroup()}initModalConfig(){this.config=new Ni,this.config.title="Register Plugo",this.config.okText="SAVE"}initFormGroup(){this.formGroup=new Dn({ApiKey:new zt(null,[K.required]),VendorID:new zt(null,[K.required])})}onClose(){this.dialogRef.close()}onOk(){if(this.formGroup.markAllAsTouched(),this.formGroup.invalid)return;let e=this.formGroup.value;this.dialogRef.close(e)}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275cmp=S({type:n,selectors:[["app-modal-register-plugo"]],decls:13,vars:10,consts:[[3,"onClose","onCancel","onOk","config"],["content",""],[3,"formGroup"],[1,"form-label-group","has-validation"],["type","text","id","ApiKey","placeholder","Api Key","name","ApiKey","title","Api Key","formControlName","ApiKey",1,"form-control",3,"ngClass"],["for","ApiKey"],[1,"invalid-feedback"],["type","text","id","VendorID","placeholder","Vendor ID","name","VendorID","title","Vendor ID","formControlName","VendorID",1,"form-control",3,"ngClass"],["for","VendorID"]],template:function(i,t){if(i&1&&(a(0,"modal-material",0),C("onClose",function(){return t.onClose()})("onCancel",function(){return t.onClose()})("onOk",function(){return t.onOk()}),a(1,"div",1)(2,"form",2)(3,"div",3),g(4,"input",4),a(5,"label",5),c(6,"Api Key"),r(),h(7,Is,2,0,"div",6),r(),a(8,"div",3),g(9,"input",7),a(10,"label",8),c(11,"Vendor ID"),r(),h(12,xs,2,0,"div",6),r()()()()),i&2){let s,d,m,_;p("config",t.config),l(2),p("formGroup",t.formGroup),l(2),p("ngClass",y(6,Ea,(t.formGroup==null||(s=t.formGroup.get("ApiKey"))==null?null:s.invalid)&&((t.formGroup==null||(s=t.formGroup.get("ApiKey"))==null?null:s.dirty)||(t.formGroup==null||(s=t.formGroup.get("ApiKey"))==null?null:s.touched)))),l(3),b(!(t.formGroup==null||(d=t.formGroup.get("ApiKey"))==null)&&d.getError("required")&&(!(t.formGroup==null||(d=t.formGroup.get("ApiKey"))==null)&&d.dirty||!(t.formGroup==null||(d=t.formGroup.get("ApiKey"))==null)&&d.touched)?7:-1),l(2),p("ngClass",y(8,Ea,(t.formGroup==null||(m=t.formGroup.get("VendorID"))==null?null:m.invalid)&&((t.formGroup==null||(m=t.formGroup.get("VendorID"))==null?null:m.dirty)||(t.formGroup==null||(m=t.formGroup.get("VendorID"))==null?null:m.touched)))),l(3),b(!(t.formGroup==null||(_=t.formGroup.get("VendorID"))==null)&&_.getError("required")&&(!(t.formGroup==null||(_=t.formGroup.get("VendorID"))==null)&&_.dirty||!(t.formGroup==null||(_=t.formGroup.get("VendorID"))==null)&&_.touched)?12:-1)}},dependencies:[I,L,Bn,Y,$,Oe,H,X,Z,ee],encapsulation:2})}}return n})();var Je=function(n){return n.SHOPEE="https://res.cloudinary.com/pos/image/upload/v1605249851/icons/Marketplace%20logo/shopee-logo.png",n.TOKOPEDIA="https://res.cloudinary.com/pos/image/upload/v1605249861/icons/Marketplace%20logo/download_tkpd.png",n.KAL_CARE="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAYwAAAB/CAMAAADLlgV7AAABIFBMVEX///8jHyCAvAAAZUgAAACdyUTD3YwAYEEAY0V6uQAAXT0AWzoAWDUVDxCAfn94uAC7urulpKUMAAQZFBUPBwnf6+ecu7Cjw7jf39/3+vmZmZnn8e4pdl5om4oGblIZblOpvrZNi3draWnc7LxOS0w7gmy/19AAYEhaj3zK3NbW5N+Twk272Immy32Ih4cydFwrdlGgzFE+hEZvnY30+em+2Z4ATiW4ycLI4ZzD27Pu9t2izUTn8tJ9qJrv7+8/PD3U09NZV1gtKSqPxCTP5ar3+vDCwcG42X+kzl3R48TW6bWw1HLk7uLE35aRunidvrMxe00ufDoBakBjYWF/sISWvKdsp0Glz1et0nVvqFFWlzQAUTV8rmlbmUeLr6IARhVkELW6AAAVU0lEQVR4nO1dj3/aOJYnONTGdkqbBKgLhFIKDTTT2QxsyCaQpCFp2GTa7O7cXTs3N8z//1+cnmRLT7L8C5rZ9M7f3c802PKz/L7S+yUZCoUcOXLk+C7RGPUkLP/dHfp/DK9tWxLcVvqLL14GeB46d/b8JcKz1IK8NPd9HuBF+s5+B5i4hgI3jTooLja3d31svlfOnW1s7gpsb8Zq7Zlou3l+lnjfZ5vbPjbj5X5vqNshMqppr322uRFg54N8yjvf2UDYfhonx8Ntt1Vaw3i6xVtvJky57wvfiow38qkPu5iLrQ+xs+35Jm58mTg1EBnbYfuYBt71eNq9vb3qjq9T24E/AQ9DxlNJvTsJpueNNIuSB/t6ZIyvvh4WyxWCMvlvcb44mF5nFvIweBAyXspcXMYb9hdS65DFC2MNMqYHc8JBEYNQUrwZZxPzQHgIMp4r2r2IF/NSMmnEqCU55VXJuL4qVWQiAlT+z5LxTOZiO8nsbCjYfZlwwYpkXM0rWibI5Fikl/KQ+PZkXChcJKn2o9weXEyCU12JjGkpigoyMa7SSnlYBGS8/cdf3n4TMl5I3jghqAW8li8g2PwYf8UqZBzo7ZOPR+LBfTLe/vTuB5+N9cg4u5R0u/s6SYinTgziNBIuyk7GOGZaPB4r5ZPx9qfSuycHjI21yFCSva03iUnD8+0QGUmpRmYyToqx8+KxWClGBuHi9N2Bz8ZaZHzYwkpNCmoB5yErRexUvIqzkjENzwWIquZz9u+jsVKUDMJFqUTIYGysQ8ZrZZhfJMpASYZgJSHVyEjGWGWiSPK88Xh8fT0ed58s5pXHYqWADMoFJYOysQYZ72X7v5vgiOklu4KBc3Fl7IzKSMZcpmJ+LCcV19Npsow/B3WbccHIADZWJ0NJ9hKMDYNI+LYvRPa3G1stzEbGoizNiqvHVIxSUP+NceGTQdhYmQw12Usuv0pJxiU2WbGpRiYyrnAcVT48Sftw/w7U/1mSyHhy8K8VyVCSveSgFvALdxRbTwueqBjGphpZyLiW5kU27zCeTo+PP93dHF9Np8kkjrufbu4+6YRcHR/fagQ0air+o6SQ8eTgP9U2k4jb46nw5kKOihKq5j7OhITdC1ylik01spDxpbwaF9fdmxIUERnI7JofHnSRsxkf+ih16eeTBTSuHMpSTg6IkAoVUZwfyHwMLceW8FswLxAZZG4orZyeXrHPwvkanykpFuwKUpJxWZDrtzHXZyBjioxUuZTaXUxBtaF4uFy8ES2C85Vb+HjDPpaPsZRuqSj7qzscQ/dMuQzl+26Kv//tCWcjqIwEcGraLseRkW459FJMDPAw2E7FaDkDGSWsjbT+olsKM1FUdN0NWlRILHYd3KbcFVJODsN04i7sWdFcFArRbJj6TQrRZGxepHrqC9lKYTsVl2qkJ+MET4ywPddifBhZOqmIIPiWk0H0O+dqF8o+1hMqGshkKFzEsJGVjLQr0++FVs/pAcROzFaD9GTg8uA8XZ+u4konwmlwyRU8/cQ9FlFSuKWSyAhxEc1GRjI2k6rmAdDEYHEwKm3FpBrpyUBKKN+m6tJNXEWxJNrdBcouo0vKX4LTYRMVNOFuB5OBuDj9e9Aggo1sZCRXzX18VK0UTsg3okOA1GR0sUpSdSlyQFNF3omGJT4ZkCnkPgVzQUMpgUowNRAZmnkB+NsNpwOxkYmMrcQ17AAfRDR87h/Cdioy1UhNBrJS5YM0PZKz9UqxdHiKD6BYiddYDkuoge9T7tB9i3d/vbpCcQQvEQsy3v50Gp4XADE3nvxlJTIS1+k4zkJWCuyUEBSZaqQmYx7WUywOsI2qfGXO9lAcEd73Wi54BWANbpEYX/W3oiOBnRJk/OMdh8QFYeMHjn+tQsZ2iuogA0oyAisl+fStKDuVlozrjFaqKyUlvrO+RjKE/z4J8QCbf4rKFeU5v0JMlsDxIDP1mU+Av0oj+ed3pwH+6+0qZGylKUlRiCSDZnwMyE5FKjotGVNExmlyf7DaK9w9IJeA0mt1iaRSuu2ejJnqhd7nIsk75geDnmCfoWfj51JgvhAX2XxG2rj2QmOlZDv1JuLKtGTcItN9F9POx522udAiliGFBmQGoGTuRJya6oRryDAsHRt6LjJGU0n7CXxglV6Iw8hORaWOack4RtpNDmzRPCqjGPZGkIFWZ6X9DZUbLEcEveiwMGu8QCblGRo2fj7UcpE5z7hIfHIyBdDWtUt0HE2YKIuXloyvSL3dmHYMKJIqo4qgCJbKaPhL9UeJC+SoRPsr1DocTWn9RhQXmTPw+IU6/2K0Qnv+QgALjdiYkJaMuyxkIOuCQ1i9/0YUSalgAU9H6mK8k+7xXRFFBjwkU8hQ2CC+W89FZjJ2NpLZ+IBL7psI+LDe4KUl40sWMrDhQYenWv89RpGtsjVURML0JN1fjQ6UuRSVDIkNxMWvStXWHGn7H10o3Enc1/9Cs0MnLEafaqQl4zALGUK9Uh0c+W9kjVAwJRspOZzWQOQqM0dmw8J+A3Mhv1lmOQNt/yUylLWlpA1T6m5nPba1UtKSscjgwJF6K3jVQfgdvLsKBVPKxOjG1bZIa0G01zJUcDZ+4Bn5r20FzYilPunNJWWlbzdhpe9yIw30G3VX8RlJ1RAUeUk+AE0Y5L9RiKWs7X2KnRny4lNVxfKzQsbpfw89BVEPgMl4HdrwHLsGfpHGSkGqobt5WjKwGyjFtAMcaiPYwlgM9LnWf1cU+xe3p7c8T6jJ1J3PEhmnv/620oaE16GdOrHF26fSzsNoaKPkFZK+xF2DYgZUsMbQhEEL6KgyVVHkRJZ9y+V54i7SuuNbqh8Cf7HaVh2YB/ILSxuhN2AFzjR7OrXY0jG6SjkkwWmgXYeSExCxEc6/UWVKLbPgmFfwUCmWblJUKmF752dOxunvq+4opEbpqWx8oheZnqWzUhv6VCN11RZrJN5OYf+NDuvWKgrYf4fWctVq7nxeWtx9SrHTB0A3Pn/2yQAu1iGj8Ea2PpGqepN2ZmgrXanJkPLkWCOBJhEmA4UA2Hod6B0MQJCxuB4DsmyqZq8EfKZkUC7WIsO7VGIqfdHwBeZsJwx89pfw5YiM3VgyJKcRuzlET8ZJWX+5domD4Qs/pYRZaeC/LPOZkMG4WIuMwpkysLe0OTROMnbevA7hHEnQbExAZOy8eaEC2TVcy5DDIRVd7RTAq6f4ahTvqoJE0Jt6Z5BA8BrZ55vS7+u8uRQEshdqVn6huRAlGdo6Oc4mNakGDsV2tpRZtYXfCbmRKhHz6DQcl2y5G5AW/krC3iD/Hdpy8kmbsacEf8Hyf35f652+15qD9ITmfZmPyH1rjf4ZZus8dDo+LsZhw1jOh8t3ckgzvg0ULy0W+Wo/lowcimynMQqfhpdcxbmkgOpbve0qUjz1LfDwLo/XSJmbSQUPTaoRT4ZUeFdysHK59ARW5E5OTqbHd4dFvjcWv1BTLoGBGX+VLsWR7XG0/5YsY/krMm0nV6VK0ja6b0+G8l0V4TIV9isRGwexsQunGhnICIWasOeDghVTufHB7crFxWKh7GXDc0AkdpXwWL8rS4KOpwTdTwvYdpu4p/EByCj8IhcB1TIVTjIi3tiX3tPcUUsiWchQ3yFTwFep1Snk/yuW7Z4ImagYEu76VLKMJN+j/2fbopPWfh+CDOWVV/VVDZxk6K2UtJktnGpkIUNKwzUIDMmJrln54IqTIQwS4le3ZTRmH1xSgewhyFBfBpeLhjjJiNzejJc7Qo0ykUF8c1ztTrOXRpwsieAIFQSR/9YN9Zi5mLTd90HICBVl8StlsYOeAy8EqqnG+9i1kNDK+fg05osqeDIQ1mGZTBuxvxktaAsyjgsahN905khQ6MOQEfpCEBFvenglYzOyPI/f1Ve/2UX3Hn8MGST8ifgyHWnAq8tCdP+Njgwxh9T6uY/IuahxMRLqzupkII2H6uVKgLux/SJ8kbbW4UP6CpJL+dzZZlxpS7cgNV3o6SijlTf5Vcxi5QtYsIWGDOS/IwpP2lc8ypW5diIhDNUvjLSshCuQUp6e+5sIti4v1JPPtzYlBA2e4YMx+xbe43bKBPp4vhkN/WaI8Sf1W7+gsH0nFdZP5gFl5BRz2IeVADyIHRf5sWiz0y1Jd6NfMJa8W6hQcx0M19avdz8ynIVKUgGiV3vHx4u5r0jiS0s3V+EkobugDYqLgKRp18ctnwTXXY64jPrkeBGwViT3SlmoavQlPOJ31v8UXJ98w1fFIdV/LF9MkiNHjhw5cuTIkSNHjhw5cuTIkSNHjhw5cuTIkSNHjhw5cuTIkSNHjhw5cuTIkSNHjhw5cuTIkSNHjhw5cuTIkSNHjhw5cnzXQF89H/st9CkleZklectabXkfPt6vkeOxQrzGcJ3++kK8xlmkFK+2JP9Ld49hfe0v+qjSX9RowJ990zAs/W/IpMIrcr35ikqyiaROyssaR7bttMPHW65tHzUiL6vOmo7ruuZshZ5yeJP9PSLEaS4jzhuO7RjRnUBYuo67hvIYWrZlsd/7bpmW5a7B7iuHSHoFf/XJX2ZqMlzCXJN/9IJHbxFu3Sg9eCPHpsPIqa/cX0JozzWpFFv/0zkFb88yrHYcGby7RJBlrTtPhzCKeyC2bRmpNajDKyIpIMNILwqTMbwfNXv+8TgyGm34zjLTcVxnuHqHq3tgCxzTdFyNmQTEk+ENaq29YDb0HMtuRjRMjw7pETwS2Ba3v4ag9ck4O7JNfl0MGV4btGi1JoNBSoOuRYt02OxNhsPBfsQXnsWTMSHd5XOq0eq1UtmzWIDmbGJ5Rya2FitgfTI8+HPfPx5Dxghms7HOwKE3Bk0340OEeDKcyN8GWxVej9zwR89rWobj/7hS4340Gi25AbgnqHtgqGezGXUvjRo5QpQ+GqFniSLjbDIbje75E3nVSW02W/aDA5yM4f0SlPxj/b4Gt6ZknBXIxTPFkcEVhomdhVftg8wJl0n6RzranwXMDpdEjPJdWlVTo0v50QUZXt1XQoPoYAZWrX8/gvnZI3dq+Eq6D25QrREptSqXSXszXKJjUYCvKXQGQzIx2kxYzSB21LTdjv9sJoQUHlgRYl6pjodHtmM2SLxjJZNRa7vE+DimH7D0m45DPtuONROqpWTUXfrllZZtuzAogAxn0HGhJ3LIVLMNeRL3m3Ygk/VnAJGY13LNI6abDj3tNiVWq/RrAGWfszTZo+97ChmNPaKEPfLXkIhygGMi3e/uEYi1HFAJu2pmUSm2P1SHpHdHgxHtg5kwn2FO2Mt723CYGxu5pAcO2FN/gtIeeUxtJh1r8M2GFphcQyHDfkUCd4mMkUOkm+CPGBsD8sEB6YYfCQoyjuiXV1que1T3ySACabjjSr+HBl7OrqEDQ9eXaTlM5tCCX3qEm7JPJnH2JPoyZdWDHMuoo0fYh47DmLCZ+UJkNMGmNXzRoIR9NnZM0t1Bwf8NRHYRkwJjqUMPVOFcm9BDny7BsRDrYHU6lrVH21FL2BvWqHeLIgPkkid0HYUM68ceQdPiZNSINKvemIFJYFO0t38/6S/p94QOJDLOhgNo3KsOh15AhtkZIWE+4NlsPMI8kDlhMvsBGdA/549CECZWB001WhxaFvDX40zX6SAaQp/tVhIZ1SpV0b7fXUEGXG62hjMwFDNOhmW2WtBEGkUaNNos2GZDFx7eafg2e6gng6WK5miATSCQYbBfWTQC/YFoiA4KPSuQz0YGfJ8uO4CjKdWBw++YDqg03F/qMiSLg2TOOBlEof2qrxxI3EDVljQ1+gYdrE7HfwwDWCYPug+3biSQoThwToZnUB9MH9miCSMlw75n9jUxsJkxY00fCQY9vYBGWbUYMhyFYx0Z1B/Bo5KpYQZqLjSGg6XJ+VLIwKGtA+P8RyLOxb6XkqHmF4HMfU6GT34hyJ8gVnPk33+s7jtsjlNpA9u/HrRMW65CRh+0BENiGeQKlAzTY7q1eoV4sFk943egjzHkqteTEYoKmZnqEPS4ZQHzZNTq9ToZbFaPXTDp7NnUabB+xZIxCMjAU5COetkR1gOZggzLYKdYvEy6QCeOaiQGPZg3Jg1dXgXDDx6dTrFVyAAOaF2AaxLIsIy0ZBQ6lj8KUY+o6jvRZIiBjsggDryAoymI/gziXGEAMvYaHce0bOaqM5CBJwKd9XiIN3pcJiLDf2r6NcqWw4IGO1yEqkMXaeyyDB6AP+gqZMyCflMtzLKTsR8I8PlMRYYaoutC2336pP73FwMZXo9EC0atUbVWJ2NkykMhkDkEgxQiY+CyygnFkcZ9vvKdk0JG65GQQXOCAb8V+DWjynSVkQw6MyYDhqEvHuZgw1ydDJBhWMJwgWMCs9XQksGG0NDvgyawrAYTituVQfCHQkY7rZkCb826VVuLDD5kqdqobiHYAodJ6clGBo0SceBDRzU85hpk0NFh9jwkk4blejIKphFf5xmYAQdBzRS8C7XaKAOHINOuYiUwMoJCoezAQTcwRWj0vjoZhZ5fOOz5IS5Ljoh4b9/MTEaVagJ535EfMPd1ZNA6h+H3I4aMCbU87fthdTjwZQLjAyma4k89srW+gmhrMmx41QmMNZby7Pl36vnKw7UpmmnOCl5H2Mg+jRgaChmQ1ljtKqWPuck1yAAbaxkzWsxlj1CjN223TSszGYUlldaZzVpNGq3BaLL2ljMY3NaeQgYdfpbR7jXiySjMqFO2yYwAa1V3kcxOiAwPVj7MZms56rSxmIZBwoq2AWf9esuEPToMR1ZUR2TMQkooNGhIaLSbEhmsO+1Z0wwqB2uQUai5cD9yves7yQZdx7FMEzjvZCPDa1Fppm0yu+JBKGnZtrMHk0AhgzwHvVM7iQzCMVsVoubTa9pcJhuLEhmFoQ3noQtSWYV6dhrU89rXjD86O4LIqFpMCVbT4tHDiM5kNqYEGVSKRaWwwZyRjJ7rukc8ch804Wcc3D1eFx3skQNue1A7cl32sPA5RAY5e8TIIH+5wU0nTfajEC6rthB24Ich6hPS5g9Kxh+k8Z7f+N6CszRv3Sd/0T61yfk/1ByvOtpzoSlt0YC2rjVZEpkW75/wE42RQ/vgHmFr1acSHNccCeF99uhtnzTPIvdmyXBhYFChQglU7XCMlgdsWL5t4Ed2m75Gq/QckEH+dROXKaoAlMM1+vW69PgD+tmDZrST8OMOoRyYC6HtRNwC0uq8ZF5okA+ekFUYEgivMiSSq8Ef9CK1c1zOoN8feEKm2j+pYDKALgwUKd4guBlShfToVdw3RQlcAps5+DCVIhoF5xS95MiRI8ejxf8CaCHBz1xZMMgAAAAASUVORK5CYII=",n.LAZADA="https://res.cloudinary.com/pos/image/upload/v1641528116/icons/Marketplace%20logo/lazada.png",n.WOOCOMMERCE="https://res.cloudinary.com/pos/image/upload/v1739236630/icons/marketplace_icons/woo.png",n.TIKTOK="https://res.cloudinary.com/pos/image/upload/v1645761565/icons/Marketplace%20logo/tiktok-logo.png",n.SHOPIFY="https://res.cloudinary.com/pos/image/upload/v1710725872/icons/marketplace_icons/Shopify_with_text.png",n.PLUGO="https://res.cloudinary.com/pos/image/upload/v1739236577/icons/marketplace_icons/plugo_biglogo.png",n}(Je||{});var Ds=["*"],ks=(n,o,e,i,t,s,d,m)=>({"btn-shopee":n,"btn-lazada":o,"btn-tiktok":e,"btn-woocommerce":i,"btn-tokopedia":t,"btn-shopify":s,"btn-kalcare":d,"btn-plugo":m});function Es(n,o){n&1&&(k(0),a(1,"div",7)(2,"span"),c(3,"BETA"),r()(),E())}var xi=(()=>{class n{constructor(){this.disabled=!1,this.isBeta=!1,this.authorize=new j,this.channelType=w,this.buttonName="Authorize Account"}ngOnChanges(e){e.type&&(this.initChannelImage(),this.channelType.Shopee)}initChannelImage(){switch(this.type){case w.Tokopedia:this.image=Je.TOKOPEDIA;break;case w.WooCommerce:this.image=Je.WOOCOMMERCE;break;case w.Shopee:this.image=Je.SHOPEE;break;case w.Tiktok:this.image=Je.TIKTOK;break;case w.Lazada:this.image=Je.LAZADA;break;case w.Shopify:this.image=Je.SHOPIFY;break;case w.Plugo:this.image=Je.PLUGO;break}}onAuthorize(){this.authorize.emit()}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275cmp=S({type:n,selectors:[["app-channel-widget"]],inputs:{disabled:"disabled",type:"type",isBeta:"isBeta",buttonName:"buttonName"},outputs:{authorize:"onAuthorize"},features:[J],ngContentSelectors:Ds,decls:10,vars:13,consts:[[1,"card","h-100","ribbon-box"],[4,"ngIf"],[1,"card-header","d-flex","align-items-center","justify-content-center",2,"height","120px","padding","0px"],[1,"w-50",3,"src"],[1,"card-body",2,"min-height","134px"],[1,"card-footer","p-4"],[1,"h4","fw-bold","btn","text-white","w-100","border-0",3,"click","ngClass"],[1,"ribbon","ribbon-top-right"]],template:function(i,t){i&1&&(ut(),a(0,"div",0),h(1,Es,4,0,"ng-container",1),a(2,"div",2),g(3,"img",3),r(),a(4,"div",4)(5,"div"),De(6),r()(),a(7,"div",5)(8,"a",6),C("click",function(){return t.onAuthorize()}),c(9),r()()()),i&2&&(l(),p("ngIf",t.isBeta),l(2),p("src",t.image,ht),l(5),p("ngClass",Tn(4,ks,t.type==t.channelType.Shopee,t.type==t.channelType.Lazada,t.type==t.channelType.Tiktok,t.type==t.channelType.WooCommerce,t.type==t.channelType.Tokopedia,t.type==t.channelType.Shopify,t.type==t.channelType.KalCare,t.type==t.channelType.Plugo)),l(),O(" ",t.buttonName," "))},dependencies:[I,L,z],styles:['.bg-shopee[_ngcontent-%COMP%], .btn-shopee[_ngcontent-%COMP%]{background:linear-gradient(-180deg,#f53d2d,#f63)!important}.bg-tiktok[_ngcontent-%COMP%], .btn-tiktok[_ngcontent-%COMP%]{background:linear-gradient(-173deg,#ee1d52,#69c9d0)!important}.bg-woocommerce[_ngcontent-%COMP%], .btn-woocommerce[_ngcontent-%COMP%]{background:#8053b4!important}.pointer-help[_ngcontent-%COMP%]{cursor:help}.btn-bottom[_ngcontent-%COMP%]{position:absolute;bottom:.5rem;left:.5rem;width:96%}.ribbon-box[_ngcontent-%COMP%]{position:relative}.ribbon[_ngcontent-%COMP%]{width:150px;height:150px;overflow:hidden;position:absolute}.ribbon[_ngcontent-%COMP%]:before, .ribbon[_ngcontent-%COMP%]:after{position:absolute;z-index:1;content:"";display:block;border:5px solid #78c424}.ribbon[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{position:absolute;display:block;width:225px;padding:15px 0;background-color:#78c424;box-shadow:0 5px 10px #0000001a;color:#fff;font:700 18px/1 Lato,sans-serif;text-shadow:0 1px 1px rgba(0,0,0,.2);text-transform:uppercase;text-align:center}.ribbon-top-right[_ngcontent-%COMP%]{top:-10px;right:-10px}.ribbon-top-right[_ngcontent-%COMP%]:before, .ribbon-top-right[_ngcontent-%COMP%]:after{border-top-color:transparent;border-right-color:transparent}.ribbon-top-right[_ngcontent-%COMP%]:before{top:0;left:0}.ribbon-top-right[_ngcontent-%COMP%]:after{bottom:0;right:0}.ribbon-top-right[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{left:-25px;top:30px;transform:rotate(45deg)}.btn-shopify[_ngcontent-%COMP%]{background-color:#96bf48}.btn-tokopedia[_ngcontent-%COMP%]{background-color:#7f7f7f}.btn-lazada[_ngcontent-%COMP%]{background:linear-gradient(90deg,#ff7e5f,#fd04e3)!important}.btn-plugo[_ngcontent-%COMP%]{background-color:#f2a954}']})}}return n})();function Os(n,o){if(n&1){let e=A();a(0,"div",3)(1,"div",6)(2,"app-channel-widget",9),C("onAuthorize",function(){x(e);let t=u();return D(t.openPlugoDialog())}),a(3,"p"),c(4,"Authorize DEALPOS to manage your Plugo Store."),r(),a(5,"p"),c(6," Configure Plugo x DealPOS integration by visiting this "),a(7,"a",14),c(8," article. "),r()()()()()}if(n&2){let e=u();l(2),p("type",e.channelType.Plugo)}}var Oa=(()=>{class n{constructor(e,i,t,s){this.http=e,this.router=i,this.dialog=t,this.toastr=s,this.disabled=!1,this.newFeatureVisible=!1,this.channelType=w}shopeeAuthorize(){this.http.post(Te.ShopeeV2_URL).subscribe(e=>{window.open(e.Url,"_blank")})}tiktokAuthorize(){this.http.post(Te.Tiktok_URL).subscribe(e=>{window.open(e.Url,"_blank")})}lazadaAuthorize(){this.http.post(Te.Lazada_URL).subscribe(e=>{window.open(e.Url,"_blank")})}openTokopediaDialog(){this.dialog.open(mo,{data:{title:"Tokopedia"},width:"30%"}).afterClosed().pipe($e(e=>F.IsNotEmpty(e)),Q(e=>this.http.post(Te.AddTokopedia,{ShopID:e}))).subscribe(e=>{this.onSuccessAddChannel()})}openShopifyDialog(){this.dialog.open(Vi,{data:{title:"Shopify",channelType:w.Shopify},width:"30%"}).afterClosed().pipe($e(e=>F.IsNotEmpty(e)),Q(e=>this.http.post(Te.AddShopify,e))).subscribe(()=>{this.onSuccessAddChannel()})}openWooCommerceDialog(){this.dialog.open(Vi,{data:{title:"WooCommerce",channelType:w.WooCommerce},width:"30%"}).afterClosed().pipe($e(e=>F.IsNotEmpty(e)),Q(e=>this.http.post(Te.AddWoocommerce,e))).subscribe(()=>{this.onSuccessAddChannel()})}openPlugoDialog(){this.dialog.open(Pa,{width:"30%"}).afterClosed().pipe($e(e=>F.IsNotEmpty(e)),Q(e=>this.http.post(Te.AddPlugo,e))).subscribe(()=>{this.onSuccessAddChannel()})}contactSupport(){this.dialog.open(po,{width:"30%"}).afterClosed().pipe($e(e=>F.IsNotEmpty(e)),Q(e=>{let i={URL:e.URL,Email:e.Email};return this.http.post("/api/ChannelAuthorization/Tokopedia_Intercom",i).pipe(se(()=>e))})).subscribe(e=>{this.toastr.success("Your request has been received, we will be in touch at "+e.Email,"Thank you!")})}onSuccessAddChannel(){this.router.navigate(["/menu/channel"]),this.toastr.success("Channel has been added successfully","Success")}onToggleNewVersion(e){this.newFeatureVisible=e}static{this.\u0275fac=function(i){return new(i||n)(V(ye),V(at),V(xt),V(ae))}}static{this.\u0275cmp=S({type:n,selectors:[["app-marketplace-add"]],standalone:!1,decls:56,vars:10,consts:[["headerTitle","Add New Channel",3,"hideSearchBox","hideSearchDropdown"],["role","button","routerLink","/menu/channel",1,"btn","btn-secondary","btn-fill","btn-lg","me-3"],[1,"container"],[1,"row","mt-12"],[1,"col-md-4","ps-md-0"],[3,"onAuthorize","type"],[1,"col-md-4","pe-md-0"],["buttonName","Authorization is Closed",3,"type","disabled"],["type","button","href","https://seller-id.tokopedia.com/university/essay?knowledge_id=1189016095426305&default_language=id-ID&identity=1",1,"button","text-primary","fw-bold"],["buttonName","Register",3,"onAuthorize","type"],["target","_blank","href","https://support.dealpos.com/en/articles/5733019-woocommerce-authorization-at-dealpos-apps",1,"button","text-primary","fw-bold"],["target","_blank","href","https://support.dealpos.com/en/articles/9525716-shopify-authorization-at-dealpos-apps",1,"button","text-primary","fw-bold"],[1,"p-5","text-start"],[3,"change"],["href","https://support.dealpos.com/en/articles/10568056-plugo-authorization-in-dealpos-omnichannel-apps","target","_blank",1,"button","text-primary","fw-bold"]],template:function(i,t){i&1&&(a(0,"mainpanel",0)(1,"actions")(2,"a",1),c(3,"Cancel"),r()(),a(4,"content")(5,"div",2)(6,"div",3)(7,"div",4)(8,"app-channel-widget",5),C("onAuthorize",function(){return t.shopeeAuthorize()}),a(9,"p"),c(10," Authorize DEALPOS versi V2 to manage your shopee, you will be redirected to shopee website to complete this process. "),r(),a(11,"p"),c(12," You will need to sign in to Shopee using your Seller account and confirm the authorization. "),r()()(),a(13,"div",6)(14,"app-channel-widget",7)(15,"p"),c(16," Starting from middle of Quarter 1 2025, Seller can no longer create or authorize their shop to Third Party Service without having a merge to their Tiktok Seller Account. "),r(),g(17,"br"),a(18,"p"),c(19," Please visit "),a(20,"a",8),c(21,"This Article From Tiktok x Tokopedia"),r(),c(22," to complete the merge process. After that seller can authorize their shop to DEALPOS only via Tiktok x Tokopedia Options. "),r()()(),a(23,"div",4)(24,"app-channel-widget",5),C("onAuthorize",function(){return t.tiktokAuthorize()}),a(25,"p"),c(26," Authorize DEALPOS to manage your Tiktok Seller, you will be redirected to Tiktok website to complete this process. "),r(),a(27,"p"),c(28," You will need to sign in to Tiktok using your Seller account and confirm the authorization. "),r()()()(),a(29,"div",3)(30,"div",6)(31,"app-channel-widget",9),C("onAuthorize",function(){return t.openWooCommerceDialog()}),a(32,"p"),c(33,"Authorize DEALPOS to manage your Personal Website."),r(),a(34,"p"),c(35," Configure woocommerce integration by visiting "),a(36,"a",10),c(37,"this article."),r()()()(),a(38,"div",6)(39,"app-channel-widget",5),C("onAuthorize",function(){return t.lazadaAuthorize()}),a(40,"p"),c(41," Authorize DEALPOS versi V2 to manage your lazada, you will be redirected to lazada website to complete this process. "),r(),a(42,"p"),c(43," You will need to sign in to Lazada using your Seller account and confirm the authorization. "),r()()(),a(44,"div",4)(45,"app-channel-widget",9),C("onAuthorize",function(){return t.openShopifyDialog()}),a(46,"p"),c(47,"Authorize DEALPOS to manage your Personal Website."),r(),a(48,"p"),c(49," Configure Shopify integration by visiting "),a(50,"a",11),c(51,"this article."),r()()()()(),h(52,Os,9,1,"div",3),r(),a(53,"div",12)(54,"mat-slide-toggle",13),C("change",function(d){return t.onToggleNewVersion(d.checked)}),c(55,"Show Beta Channel Integration "),r()()()()),i&2&&(p("hideSearchBox",!0)("hideSearchDropdown",!0),l(8),p("type",t.channelType.Shopee),l(6),p("type",t.channelType.Tokopedia)("disabled",t.disabled),l(10),p("type",t.channelType.Tiktok),l(7),p("type",t.channelType.WooCommerce),l(8),p("type",t.channelType.Lazada),l(6),p("type",t.channelType.Shopify),l(7),b(t.newFeatureVisible?52:-1))},dependencies:[Fe,Pe,mi,xi],styles:["p[_ngcontent-%COMP%]{font-size:14px;font-weight:400;line-height:24.48px}"]})}}return n})();var Rt=class{constructor(){this.Host="",this.Username="",this.Password="",this.HostNotification="",this.UsernameNotification="",this.PasswordNotification="",this.ChannelInventoryOutlet="",this.OrderPaymentAmountType=0,this.ClientSecretGuid="",this.IncludeParentInventory=!1,this.IncludeChildrenInventory=!1,this.CompositeVisible=!1,this.ClientIDGuid="",this.AuthorizationMode=qt.Legacy}};var Xe=function(n){return n[n.NONE=0]="NONE",n[n.ERROR=1]="ERROR",n[n.FULL=2]="FULL",n}(Xe||{});var Di=(()=>{class n{constructor(e){this.httpService=e}getLoader(){return this.httpService.post(Te.PosAccountGetConfig,{})}submitConfig(e){return this.httpService.post(Te.SubmitConfig,e)}testChannel(e){return this.httpService.post(Te.PosAccountTest,e)}refreshToken(e){return this.httpService.post(Te.PosAccountRemove,e)}static{this.\u0275fac=function(i){return new(i||n)(gn(ye))}}static{this.\u0275prov=ge({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})();var Ms=n=>[n],Fs=()=>["/menu/channel/pos/edit"];function Rs(n,o){n&1&&(a(0,"a",18),g(1,"i",19),c(2," Edit"),r()),n&2&&p("routerLink",Wt(1,Fs))}function As(n,o){if(n&1&&(a(0,"span",21),c(1),r()),n&2){let e=u().$implicit;p("matTooltip",e.desc),l(),v(e.label)}}function Ns(n,o){if(n&1&&(k(0),h(1,As,2,2,"span",20),E()),n&2){let e=o.$implicit,i=u();l(),p("ngIf",(i.form==null?null:i.form.POSInventoryLog)==e.value)}}function Ls(n,o){if(n&1&&(a(0,"span",21),c(1),r()),n&2){let e=u().$implicit;p("matTooltip",e.desc),l(),v(e.label)}}function Ws(n,o){if(n&1&&(k(0),h(1,Ls,2,2,"span",20),E()),n&2){let e=o.$implicit,i=u();l(),p("ngIf",(i.form==null?null:i.form.ChannelInventoryLog)==e.value)}}function Vs(n,o){if(n&1&&(a(0,"span",21),c(1),r()),n&2){let e=u().$implicit;p("matTooltip",e.desc),l(),v(e.label)}}function zs(n,o){if(n&1&&(k(0),h(1,Vs,2,2,"span",20),E()),n&2){let e=o.$implicit,i=u();l(),p("ngIf",(i.form==null?null:i.form.AuthorizationMode)==e.value)}}var Fa=(()=>{class n{constructor(e,i){this.toastr=e,this.posService=i,this.form=new Rt,this.roleSetupEdit=ft.ChannelEdit,this.inventoryLogTypeOptions=[{value:Xe.NONE,label:"None",desc:"Not record any log from transaction"},{value:Xe.ERROR,label:"Error",desc:"Only record error log from transaction"},{value:Xe.FULL,label:"Full",desc:"Record all log from transaction"}],this.AuthorizationOptions=[{value:qt.Legacy,label:"Legacy",desc:"Legacy authorization mode"},{value:qt.Modern,label:"Modern",desc:"Modern authorization mode"}],this.pageData={Title:"POS",Nav:[{Title:"Channel",Url:"/menu/channel",Active:!1},{Title:"POS",Url:"/menu/channel/config",Active:!0}]},this.initPageLoader()}initPageLoader(){this.posService.getLoader().subscribe(e=>{this.form=e.Form})}onRefreshToken(){this.posService.refreshToken(this.form).subscribe(e=>{this.toastr.success("Token has been refreshed!","Success",{closeButton:!0,positionClass:"toast-bottom-right"})})}onTestChannel(){this.posService.testChannel(this.form).subscribe(e=>{this.toastr.success("Test was successful!","Success",{closeButton:!0,positionClass:"toast-bottom-right"})})}static{this.\u0275fac=function(i){return new(i||n)(V(ae),V(Di))}}static{this.\u0275cmp=S({type:n,selectors:[["app-pos"]],standalone:!1,decls:94,vars:21,consts:[[3,"headerTitle","pageData","hideSearchBox","hideSearchDropdown"],["role","button",1,"btn","btn-outline-success","btn-lg","text-success","me-2",3,"click"],[3,"ngxPermissionsOnly"],[1,"container-fluid","mt-3"],[1,"row","mt-5"],[1,"col-md-6"],[1,"card"],[1,"card-header"],[1,"card-body","mt-8"],["matTooltipPosition","above",1,"info-label-group","w-100"],["matTooltipPosition","above",1,"info-label-group","w-100","d-flex","justify-content-between"],[1,"btn","btn-outline-success","ms-2","btn-sm",3,"click"],[1,"info-label-group"],["matTooltipPosition","above","matTooltip","Omni Inventory Webhook group by JOB ID",1,"info-label-group"],[4,"ngFor","ngForOf"],["matTooltipPosition","above","matTooltip","Omni Inventory Webhook group by Channel ID",1,"info-label-group"],["matTooltipPosition","above","matTooltip","Select where Authentication and Roles are managed, Legacy (from POS) or Modern (from omni.dealpos.app)",1,"info-label-group"],["matTooltipPosition","above","matTooltip","Number of days to look back for orders",1,"info-label-group"],["role","button",1,"btn","btn-success","btn-fill","btn-lg","text-white",3,"routerLink"],[1,"fas","fa-edit",2,"font-size","20px"],["matTooltipPosition","above",3,"matTooltip",4,"ngIf"],["matTooltipPosition","above",3,"matTooltip"]],template:function(i,t){i&1&&(a(0,"mainpanel",0)(1,"actions")(2,"a",1),C("click",function(){return t.onRefreshToken()}),c(3,"Refresh Token"),r(),h(4,Rs,3,2,"ng-template",2),r(),a(5,"content")(6,"div",3)(7,"div",4)(8,"div",5)(9,"div",6)(10,"div",7)(11,"h4"),c(12,"Credentials"),r()(),a(13,"div",8)(14,"div",9)(15,"label"),c(16,"Host"),r(),a(17,"div")(18,"span"),c(19),r()()(),a(20,"div",9)(21,"label"),c(22,"Username "),a(23,"small"),c(24,"(deprecated)"),r()(),a(25,"div")(26,"span"),c(27),r()()(),a(28,"div",9)(29,"label"),c(30,"Client ID Guid "),r(),a(31,"div")(32,"span"),c(33),r()()(),a(34,"div",10)(35,"label"),c(36,"Client Secret Guid"),r(),a(37,"div")(38,"span"),c(39),r()(),a(40,"button",11),C("click",function(){return t.onTestChannel()}),c(41," Validate "),r()()()()(),a(42,"div",5)(43,"div",6)(44,"div",7)(45,"h4"),c(46,"Configuration"),r()(),a(47,"div",8)(48,"div",12)(49,"label"),c(50,"Composite Inventory"),r(),a(51,"div")(52,"span"),c(53),r()()(),a(54,"div",12)(55,"label"),c(56,"Include Parent"),r(),a(57,"div")(58,"span"),c(59),r()()(),a(60,"div",12)(61,"label"),c(62,"Include Child"),r(),a(63,"div")(64,"span"),c(65),r()()(),a(66,"div",12)(67,"label"),c(68,"Identify Order Channel by"),r(),a(69,"div")(70,"span"),c(71),r()()(),a(72,"div",13)(73,"label"),c(74,"Order Inventory Log (Job ID) Mode"),r(),a(75,"div"),h(76,Ns,2,1,"ng-container",14),r()(),a(77,"div",15)(78,"label"),c(79,"Channel Inventory Log Mode"),r(),a(80,"div"),h(81,Ws,2,1,"ng-container",14),r()(),a(82,"div",16)(83,"label"),c(84,"Authorization Mode"),r(),a(85,"div"),h(86,zs,2,1,"ng-container",14),r()(),a(87,"div",17)(88,"label"),c(89,"Order From Default Days"),r(),a(90,"div")(91,"span"),c(92),P(93,"number"),r()()()()()()()()()()),i&2&&(p("headerTitle","POS")("pageData",t.pageData)("hideSearchBox",!0)("hideSearchDropdown",!0),l(4),p("ngxPermissionsOnly",y(19,Ms,t.roleSetupEdit)),l(15),v(t.form.Host),l(8),v(t.form.Username),l(6),v(t.form.ClientIDGuid),l(6),v(t.form.ClientSecretGuid),l(14),v(t.form.CompositeVisible?"Yes":"No"),l(6),v(t.form.IncludeChildrenInventory?"Yes":"No"),l(6),v(t.form.IncludeParentInventory?"Yes":"No"),l(6),O(" ",t.form.InvoiceType==0?"Outlet":"Tag",""),l(5),p("ngForOf",t.inventoryLogTypeOptions),l(5),p("ngForOf",t.inventoryLogTypeOptions),l(5),p("ngForOf",t.AuthorizationOptions),l(6),v(G(93,17,t.form.OrderFromDefaultDays)))},dependencies:[fe,z,Fe,Pe,R,It,si],encapsulation:2})}}return n})();var sn=n=>({empty:n});function Gs(n,o){if(n&1){let e=A();a(0,"div",18)(1,"label",19),c(2,"Include Parent"),r(),a(3,"div",20)(4,"mat-radio-group",21),pe("ngModelChange",function(t){x(e);let s=u();return de(s.form.IncludeParentInventory,t)||(s.form.IncludeParentInventory=t),D(t)}),a(5,"mat-radio-button",38),c(6," Yes "),r(),a(7,"mat-radio-button",39),c(8," No "),r()()()()}if(n&2){let e=u();l(4),ce("ngModel",e.form.IncludeParentInventory),l(),p("value",!0),l(2),p("value",!1)}}function Bs(n,o){if(n&1){let e=A();a(0,"div",18)(1,"label",19),c(2,"Include Child"),r(),a(3,"div",20)(4,"mat-radio-group",21),pe("ngModelChange",function(t){x(e);let s=u();return de(s.form.IncludeChildrenInventory,t)||(s.form.IncludeChildrenInventory=t),D(t)}),a(5,"mat-radio-button",40),c(6," Yes "),r(),a(7,"mat-radio-button",41),c(8," No "),r()()()()}if(n&2){let e=u();l(4),ce("ngModel",e.form.IncludeChildrenInventory),l(),p("value",!0),l(2),p("value",!1)}}function Hs(n,o){if(n&1&&(k(0),a(1,"mat-radio-button",42),c(2),r(),E()),n&2){let e=o.$implicit;l(),p("value",e.value)("matTooltip",e.desc),l(),O(" ",e.label," ")}}function Us(n,o){if(n&1&&(k(0),a(1,"mat-radio-button",42),c(2),r(),E()),n&2){let e=o.$implicit;l(),p("value",e.value)("matTooltip",e.desc),l(),O(" ",e.label," ")}}function js(n,o){if(n&1&&(k(0),a(1,"mat-radio-button",42),c(2),r(),E()),n&2){let e=o.$implicit;l(),p("value",e.value)("matTooltip",e.desc),l(),O(" ",e.label," ")}}var Ra=(()=>{class n{constructor(e,i,t){this._router=e,this.toastr=i,this.posService=t,this.form=new Rt,this.passwordType="password",this.passwordIcon="eye-off",this.inventoryLogTypeOptions=[{value:Xe.NONE,label:"None",desc:"Not record any log from transaction"},{value:Xe.ERROR,label:"Error",desc:"Only record error log from transaction"},{value:Xe.FULL,label:"Full",desc:"Record all log from transaction"}],this.AuthorizationOptions=[{value:0,label:"Legacy",desc:"Authentication and role assignments are inherited from POS"},{value:1,label:"Modern",desc:"Authentication and role assignments are managed directly from Omni.dealpos.app"}],this.pageData={Title:"POS",Nav:[{Title:"Channel",Url:"/menu/channel",Active:!1},{Title:"POS",Url:"/menu/channel/config",Active:!0}]}}ngOnInit(){this.initPageLoader()}hideShowPassword(){this.passwordType=this.passwordType==="text"?"password":"text",this.passwordIcon=this.passwordIcon==="eye-off"?"eye":"eye-off"}initPageLoader(){this.posService.getLoader().subscribe(e=>{this.form=e.Form})}onSubmitHost(){this.posService.submitConfig(this.form).subscribe(e=>{this.toastr.success("Successfully Edited POS Config!","Success!"),this._router.navigate(["menu/channel"])})}static{this.\u0275fac=function(i){return new(i||n)(V(at),V(ae),V(Di))}}static{this.\u0275cmp=S({type:n,selectors:[["app-edit"]],standalone:!1,decls:81,vars:32,consts:[[3,"headerTitle","pageData","hideSearchBox","hideSearchDropdown"],["role","button","routerLink","/menu/channel/pos",1,"btn","btn-secondary","btn-fill","btn-lg","me-3"],["role","button",1,"btn","btn-success","btn-fill","btn-lg","text-white",3,"click"],[1,"container-fluid","mt-3"],[1,"row","mt-5"],[1,"col-md-6"],[1,"card"],[1,"card-header"],[1,"card-body","mt-8"],[1,"form-label-group"],["type","text","id","Host","name","Host","data-toggle","tooltip","title","Host",1,"form-control",3,"ngModelChange","ngModel"],["for","Host"],["type","text","id","Username","name","Username","data-toggle","tooltip","title","Username",1,"form-control",3,"ngModelChange","ngModel"],["for","Username"],["type","text","id","ClientIDGuid","name","ClientIDGuid","data-toggle","tooltip","title","ClientIDGuid",1,"form-control",3,"ngModelChange","ngModel"],["for","ClientIDGuid"],["type","text","id","ClientSecretGuid","name","ClientSecretGuid","data-toggle","tooltip","title","ClientSecretGuid",1,"form-control",3,"ngModelChange","ngModel"],["for","ClientSecretGuid"],[1,"form-label-group","radio"],["for","OrderPaymentAmountType"],[1,"mt-3"],[3,"ngModelChange","ngModel"],["data-toggle","tootip","title","Support composite and trigger component",1,"me-5",3,"value"],["data-toggle","tooltip","title","No support composite and trigger component",1,"me-5",3,"value"],["class","form-label-group radio",4,"ngIf"],["data-toggle","tooltip","title","Order Origin is traced via Outlet",1,"me-5",3,"value"],["data-toggle","tootip","title","Order Origin is traced via Tag",1,"me-5",3,"value"],["matTooltipPosition","above","matTooltip","Your Inventory log status",1,"form-label-group","radio",3,"ngClass"],[2,"top","-11px","background","white"],["name","InventoryLog",3,"ngModelChange","ngModel"],[4,"ngFor","ngForOf"],["matTooltipPosition","above","matTooltip","Channel Inventory log status",1,"form-label-group","radio",3,"ngClass"],["name","ChannelInventoryLog",3,"ngModelChange","ngModel"],["matTooltipPosition","above","matTooltip","Authorization mode status",1,"form-label-group","radio",3,"ngClass"],["name","AuthorizationMode",3,"ngModelChange","ngModel"],["matTooltipPosition","above","matTooltip","Number of days to look back for orders",1,"form-label-group"],["type","text","id","OrderFromDefaultDays","name","OrderFromDefaultDays","autoNum","",1,"form-control",3,"ngModelChange","ngModel"],["for","OrderFromDefaultDays"],["data-toggle","tootip","title","include variant parent component",1,"me-5",3,"value"],["data-toggle","tooltip","title","No include variant parent component",1,"me-5",3,"value"],["data-toggle","tootip","title","Include Include variant child component",1,"me-5",3,"value"],["data-toggle","tooltip","title","No Include variant child component",1,"me-5",3,"value"],["data-toggle","tooltip",1,"me-5",3,"value","matTooltip"]],template:function(i,t){i&1&&(a(0,"mainpanel",0)(1,"actions")(2,"a",1),c(3,"Cancel"),r(),a(4,"a",2),C("click",function(){return t.onSubmitHost()}),c(5,"Save"),r()(),a(6,"content")(7,"div",3)(8,"div",4)(9,"div",5)(10,"div",6)(11,"div",7)(12,"h4"),c(13,"Credentials"),r()(),a(14,"div",8)(15,"div",9)(16,"input",10),pe("ngModelChange",function(d){return de(t.form.Host,d)||(t.form.Host=d),d}),r(),a(17,"label",11),c(18,"Host"),r()(),a(19,"div",9)(20,"input",12),pe("ngModelChange",function(d){return de(t.form.Username,d)||(t.form.Username=d),d}),r(),a(21,"label",13),c(22,"Username "),a(23,"small"),c(24,"(Deprecated)"),r()()(),a(25,"div",9)(26,"input",14),pe("ngModelChange",function(d){return de(t.form.ClientIDGuid,d)||(t.form.ClientIDGuid=d),d}),r(),a(27,"label",15),c(28,"ClientIDGuid"),r()(),a(29,"div",9)(30,"input",16),pe("ngModelChange",function(d){return de(t.form.ClientSecretGuid,d)||(t.form.ClientSecretGuid=d),d}),r(),a(31,"label",17),c(32,"ClientSecretGuid"),r()()()()(),a(33,"div",5)(34,"div",6)(35,"div",7)(36,"h4"),c(37,"Configuration"),r()(),a(38,"div",8)(39,"div",18)(40,"label",19),c(41,"Composite Inventory"),r(),a(42,"div",20)(43,"mat-radio-group",21),pe("ngModelChange",function(d){return de(t.form.CompositeVisible,d)||(t.form.CompositeVisible=d),d}),a(44,"mat-radio-button",22),c(45," Yes "),r(),a(46,"mat-radio-button",23),c(47," No "),r()()()(),h(48,Gs,9,3,"div",24)(49,Bs,9,3,"div",24),a(50,"div",18)(51,"label",19),c(52,"Identify Order Channel by"),r(),a(53,"div",20)(54,"mat-radio-group",21),pe("ngModelChange",function(d){return de(t.form.InvoiceType,d)||(t.form.InvoiceType=d),d}),a(55,"mat-radio-button",25),c(56," Outlet "),r(),a(57,"mat-radio-button",26),c(58," Tag "),r()()()(),a(59,"div",27)(60,"label",28),c(61,"Inventory Log Mode"),r(),a(62,"div",20)(63,"mat-radio-group",29),pe("ngModelChange",function(d){return de(t.form.POSInventoryLog,d)||(t.form.POSInventoryLog=d),d}),h(64,Hs,3,3,"ng-container",30),r()()(),a(65,"div",31)(66,"label",28),c(67,"Channel Inventory Log Mode"),r(),a(68,"div",20)(69,"mat-radio-group",32),pe("ngModelChange",function(d){return de(t.form.ChannelInventoryLog,d)||(t.form.ChannelInventoryLog=d),d}),h(70,Us,3,3,"ng-container",30),r()()(),a(71,"div",33)(72,"label",28),c(73,"Authorization Mode"),r(),a(74,"div",20)(75,"mat-radio-group",34),pe("ngModelChange",function(d){return de(t.form.AuthorizationMode,d)||(t.form.AuthorizationMode=d),d}),h(76,js,3,3,"ng-container",30),r()()(),a(77,"div",35)(78,"input",36),pe("ngModelChange",function(d){return de(t.form.OrderFromDefaultDays,d)||(t.form.OrderFromDefaultDays=d),d}),r(),a(79,"label",37),c(80,"Order From Default Days"),r()()()()()()()()()),i&2&&(p("headerTitle","POS Edit")("pageData",t.pageData)("hideSearchBox",!0)("hideSearchDropdown",!0),l(16),ce("ngModel",t.form.Host),l(4),ce("ngModel",t.form.Username),l(6),ce("ngModel",t.form.ClientIDGuid),l(4),ce("ngModel",t.form.ClientSecretGuid),l(13),ce("ngModel",t.form.CompositeVisible),l(),p("value",!0),l(2),p("value",!1),l(2),p("ngIf",t.form.CompositeVisible),l(),p("ngIf",t.form.CompositeVisible),l(5),ce("ngModel",t.form.InvoiceType),l(),p("value",0),l(2),p("value",1),l(2),p("ngClass",y(26,sn,t.form==null?null:t.form.POSInventoryLog)),l(4),ce("ngModel",t.form.POSInventoryLog),l(),p("ngForOf",t.inventoryLogTypeOptions),l(),p("ngClass",y(28,sn,t.form==null?null:t.form.ChannelInventoryLog)),l(4),ce("ngModel",t.form.ChannelInventoryLog),l(),p("ngForOf",t.inventoryLogTypeOptions),l(),p("ngClass",y(30,sn,t.form==null?null:t.form.AuthorizationMode)),l(4),ce("ngModel",t.form.AuthorizationMode),l(),p("ngForOf",t.AuthorizationOptions),l(2),ce("ngModel",t.form.OrderFromDefaultDays))},dependencies:[L,fe,z,Oe,H,wt,Fe,Ue,je,Pe,R,no],styles:[".passwordIcon[_ngcontent-%COMP%]{top:1.5rem;right:1rem;position:absolute;margin:0 auto!important;cursor:pointer}"]})}}return n})();var qs=[{path:"",component:ho,children:[{path:"",redirectTo:"marketplace",pathMatch:"full"},{path:"marketplace",component:jo,canActivate:[dt],data:{title:"List"}},{path:"marketplace/form",component:wi,canActivate:[dt],data:{title:"Add new Channel"}},{path:"marketplace/view",component:Ii,canActivate:[dt],data:{title:"Marketplace View"}},{path:"marketplace/add",component:Oa,canActivate:[dt],data:{title:"Marketplace Add"}},{path:"pos",component:Fa,canActivate:[dt],data:{title:"POS"}},{path:"pos/edit",component:Ra,canActivate:[dt],data:{title:"POS Edit"}},{path:"flush_cache",loadComponent(){return import("./chunk-DYWTLXMP.js").then(n=>n.FlushCacheComponent)},canActivate:[dt],data:{title:"Flush Cache"}}]}],Aa=(()=>{class n{static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275mod=tt({type:n})}static{this.\u0275inj=et({imports:[I,rt.forChild(qs)]})}}return n})();var N0=(()=>{class n{static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275mod=tt({type:n})}static{this.\u0275inj=et({providers:[q],imports:[I,lt,Un,Dt,Ae,Y,te,Aa,rt,Vo,Si,to,io,ui,W,hi,Gt.forChild(),pi,xi,Ii,wi,Gt]})}}return n})();export{N0 as ChannelsModule};
|
|
15
|
+
- Unfulfilled orders \u2192 still auto-voided`,1,"info-label-group"],["matTooltip","Image URL for Tokopedia Product Size Chart","matTooltipPosition","above",1,"info-label-group"],[1,"text-break"],["target","_blank",3,"href"],["matTooltipPosition","above","matTooltip","Please input Product SKU to automatically add additional product to record the amount of the shipping fee in order",1,"info-label-group"],[1,"info-label-group"],["matTooltipPosition","above","matTooltip","When this config is turned off, Order is only Synchronize when it has been paid",1,"info-label-group"]],template:function(i,t){i&1&&(a(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4)(5,"label"),c(6,"Register"),r(),a(7,"div")(8,"span"),c(9),r()()()(),a(10,"div",3)(11,"div",5)(12,"label"),c(13,"Additional Item"),r(),a(14,"div")(15,"span"),c(16),r()()()(),a(17,"div",3)(18,"div",6)(19,"label"),c(20,"Minimum Inventory"),r(),a(21,"div")(22,"span"),c(23),P(24,"number"),r()()()(),u(25,Nl,8,1,"ng-container",7)(26,Ll,8,1,"ng-container",7)(27,Wl,8,1,"ng-container",7)(28,Vl,8,2,"ng-container",7)(29,zl,8,1,"ng-container",7),a(30,"div",3)(31,"div",8)(32,"label"),c(33,"Warehouse ID"),r(),a(34,"div")(35,"span"),c(36),r()()()(),u(37,Gl,7,1,"div",3),a(38,"div",3)(39,"div",9)(40,"label"),c(41,"Order"),r(),a(42,"div")(43,"span"),c(44),r()()()(),u(45,Bl,7,1,"div",3),r()()()),i&2&&(l(9),v(t.data==null?null:t.data.Register),l(7),v(t.data==null?null:t.data.Additionalitem),l(7),v(G(24,12,t.data==null?null:t.data.MinimumInventory)),l(2),p("ngIf",(t.data==null?null:t.data.TypeID)==t.channelType.Shopify),l(),p("ngIf",(t.data==null?null:t.data.TypeID)==t.channelType.Shopee),l(),p("ngIf",(t.data==null?null:t.data.TypeID)==t.channelType.Tiktok||(t.data==null?null:t.data.TypeID)==t.channelType.Shopee),l(),p("ngIf",(t.data==null?null:t.data.TypeID)==t.channelType.Tokopedia||(t.data==null?null:t.data.TypeID)==t.channelType.Shopee),l(),p("ngIf",(t.data==null?null:t.data.TypeID)==t.channelType.WooCommerce),l(7),v(t.data==null?null:t.data.WarehouseID),l(),b(t.data!=null&&t.data.PricebookName?37:-1),l(7),v(t.data.SyncOrder?"YES":"NO"),l(),b((t.data==null?null:t.data.TypeID)!==t.channelType.Tokopedia?45:-1))},dependencies:[I,z,li,W,R],encapsulation:2})}}return n})();function Hl(n,o){if(n&1){let e=A();a(0,"div",4)(1,"div",10)(2,"label"),c(3,"Shop ID"),r(),a(4,"div")(5,"span"),c(6),r()(),a(7,"button",11),C("click",function(){x(e);let t=h();return D(t.onTestChannel(t.channel))}),c(8," Test "),r()()()}if(n&2){let e=h();l(6),v(e.channel.ShopID!=0?e.channel.ShopID:e.channel.ShopIDString)}}function Ul(n,o){if(n&1&&(k(0),a(1,"div",4)(2,"div",12)(3,"label"),c(4,"Marketplace URL"),r(),a(5,"div")(6,"span"),c(7),r()()()(),E()),n&2){let e=h();l(7),v(e.channel.URL)}}function jl(n,o){if(n&1&&(a(0,"div",4)(1,"div",13)(2,"label"),c(3,"Multiwarehouse"),r(),a(4,"div")(5,"span"),c(6),r()()()()),n&2){let e=h();l(6),v(e.channel.MultiWarehouse?"YES":"NO")}}var fa=(()=>{class n{constructor(e){this.channelService=e,this.channelType=w}onTestChannel(e){this.channelService.testShopID(e).subscribe()}static{this.\u0275fac=function(i){return new(i||n)(V(Re))}}static{this.\u0275cmp=S({type:n,selectors:[["app-marketplace-config-info"]],inputs:{channel:"channel"},decls:31,vars:9,consts:[[1,"card"],[1,"card-header"],[1,"card-body","mt-8"],[1,"row"],[1,"col-sm-6"],["matTooltipPosition","above","matTooltip","Your shop name in marketplace channel",1,"info-label-group"],["matTooltipPosition","above","matTooltip","Marketplace / Website where your product is Sold / Distributed",1,"info-label-group"],["class","col-sm-6",4,"ngIf"],[4,"ngIf"],["matTooltipPosition","above","matTooltip","Last Sync Product",1,"info-label-group"],["matTooltipPosition","above","matTooltip","Your shop ID",1,"info-label-group","w-100","d-flex","justify-content-between"],[1,"btn","btn-outline-success","ms-2","btn-sm",3,"click"],["matTooltipPosition","above","matTooltip","Your Marketplace URL",1,"info-label-group"],[1,"info-label-group"]],template:function(i,t){i&1&&(a(0,"div",0)(1,"div",1)(2,"h3"),c(3,"Marketplace Setup"),r()(),a(4,"div",2)(5,"div",3)(6,"div",4)(7,"div",5)(8,"label"),c(9,"Name"),r(),a(10,"div")(11,"span"),c(12),r()()()(),a(13,"div",4)(14,"div",6)(15,"label"),c(16,"Type"),r(),a(17,"div")(18,"span"),c(19),r()()()(),u(20,Hl,9,1,"div",7)(21,Ul,8,1,"ng-container",8),a(22,"div",4)(23,"div",9)(24,"label"),c(25,"Product Sync"),r(),a(26,"div")(27,"span"),c(28),P(29,"date"),r()()()(),u(30,jl,7,1,"div",4),r()()()),i&2&&(l(12),v(t.channel.Name),l(7),v(t.channel.TypeString),l(),p("ngIf",t.channel.TypeID!=2),l(),p("ngIf",t.channel.TypeID!=t.channelType.Tiktok),l(7),v(t.channel.LastSync?ce(29,6,t.channel.LastSync,"dd MMM yyyy HH:mm"):"Never"),l(2),b((t.channel==null?null:t.channel.TypeID)==t.channelType.Shopee?30:-1))},dependencies:[I,z,He,W,R],encapsulation:2})}}return n})();var wi=function(n){return n[n.OFF=0]="OFF",n[n.UNFULFILLED=1]="UNFULFILLED",n[n.ALL=2]="ALL",n}(wi||{});var Xt=function(n){return n[n.NEVER=0]="NEVER",n[n.UNPAID=1]="UNPAID",n[n.PAID=2]="PAID",n}(Xt||{});function ql(n,o){if(n&1&&(a(0,"div",3)(1,"div",4)(2,"label"),c(3,"New Order Sync"),r(),a(4,"div")(5,"span"),c(6),r()()(),a(7,"div",4)(8,"label"),c(9,"Cancelled Order Sync"),r(),a(10,"div")(11,"span"),c(12),r()()(),a(13,"div",5)(14,"label"),c(15,"Inventory"),r(),a(16,"div")(17,"span"),c(18),r()()()()),n&2){let e=h();l(),p("matTooltip",e.orderSyncTooltip[e.channel.NewOrderSyncTypeID]),l(5),v(e.channel.NewOrderSyncTypeIDString),l(),p("matTooltip",e.cancelOrderTooltip[e.channel.CancelledOrderSyncTypeID]),l(5),v(e.channel.CancelledOrderSyncTypeIDString),l(6),v(e.channel.SyncInventory?"YES":"NO")}}var ga=(()=>{class n{constructor(){this.channelType=w,this.orderSyncTooltip={[Xt.PAID]:"Sync only paid orders from the channel and create them as Invoices.",[Xt.UNPAID]:"Sync unpaid orders from the channel and create them as Sales Orders.",[Xt.NEVER]:"Do not automatically sync orders from the channel to DealPOS."},this.cancelOrderTooltip={[wi.UNFULFILLED]:" If the order is already fulfilled, the POS invoice will not be voided.",[wi.ALL]:"The POS invoice will always be voided, even if the order is fulfilled."}}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275cmp=S({type:n,selectors:[["app-sync-config-info"]],inputs:{channel:"channel"},decls:5,vars:1,consts:[[1,"card"],[1,"card-header"],["class","card-body mt-8",4,"ngIf"],[1,"card-body","mt-8"],["matTooltipPosition","above",1,"info-label-group",3,"matTooltip"],["matTooltipPosition","above","matTooltip","Automatically sync your POS inventory to channel inventory",1,"info-label-group"]],template:function(i,t){i&1&&(a(0,"div",0)(1,"div",1)(2,"h3"),c(3,"Synchronize"),r()(),u(4,ql,19,5,"div",2),r()),i&2&&(l(4),p("ngIf",t.channel))},dependencies:[I,z,W,R],encapsulation:2})}}return n})();var Kl=n=>({"bg-gradient-danger":n}),Zl=(n,o)=>({"text-success":n,"text-danger":o});function Yl(n,o){if(n&1&&(a(0,"div",2)(1,"div",3)(2,"div",4)(3,"label"),c(4,"Consumer Key"),r(),a(5,"div")(6,"span"),c(7),r()()()(),a(8,"div",5)(9,"div",4)(10,"label"),c(11,"Consumer Secret"),r(),a(12,"div")(13,"span"),c(14),r()()()()()),n&2){let e=h();l(7),v(e.data==null?null:e.data.ConsumerKey),l(7),v(e.data==null?null:e.data.ConsumerSecret)}}function Ql(n,o){if(n&1&&(a(0,"div",3)(1,"div",6)(2,"label"),c(3,"Authorized"),r(),a(4,"div")(5,"span"),c(6),r()()()()),n&2){let e=h();l(6),v(e.data!=null&&e.data.Authorized?"YES":"NO")}}function Jl(n,o){if(n&1&&(a(0,"div",3)(1,"div",7),P(2,"expiredTime"),a(3,"label"),c(4,"Shop Expiration"),r(),a(5,"div")(6,"span"),c(7),P(8,"date"),r()()()()),n&2){let e=h();l(),p("ngClass",y(8,Kl,G(2,3,e.data==null?null:e.data.ExpiredTime)))("matTooltip","The expiry date for "+(e.data==null?null:e.data.Name)+" Open API authorization from your account "+(e.data==null?null:e.data.Name)+" to Dealpos"),l(6),v(e.data.ExpiredTime?ce(8,5,e.data.ExpiredTime,"dd MMM yyyy HH:mm"):"-")}}function Xl(n,o){if(n&1&&(a(0,"div",3)(1,"div",21)(2,"label"),c(3,"Token Issued"),r(),a(4,"div")(5,"span"),c(6),P(7,"date"),r()()()()),n&2){let e=h(2);l(6),v(ce(7,1,e.data==null?null:e.data.TokenIssued,"dd MMM yyyy HH:mm"))}}function $l(n,o){if(n&1){let e=A();a(0,"div",3)(1,"div",4)(2,"label"),c(3,"Refresh Token"),r(),a(4,"div")(5,"span",8),c(6),r()()()(),a(7,"div",3)(8,"div",9)(9,"label"),c(10,"Access Token"),r(),a(11,"div",10)(12,"span",8),c(13),r(),a(14,"span",11)(15,"button",12),C("click",function(){x(e);let t=h();return D(t.onRefreshToken())}),g(16,"i",13),a(17,"span"),c(18,"Refresh"),r()()()()()(),u(19,Xl,8,4,"div",3),a(20,"div",3)(21,"div",14)(22,"label"),c(23,"Access Token Expired"),r(),a(24,"div",15)(25,"div",16),c(26),P(27,"date"),r(),a(28,"div",17)(29,"button",18),C("click",function(){x(e);let t=h();return D(t.onAuthorize())}),g(30,"i",19),a(31,"span"),c(32,"Extend"),r()()()()()(),a(33,"div",3)(34,"div",20)(35,"label"),c(36,"Token Log"),r(),a(37,"div")(38,"span"),c(39),r()()()()}if(n&2){let e=h();l(6),v(e.data==null?null:e.data.RefreshToken),l(7),v(e.data==null?null:e.data.AccessToken),l(6),b((e.data==null?null:e.data.TypeID)==e.channelType.Shopee?19:-1),l(2),p("matTooltip",e.tokenExpiryMessage),l(4),p("ngClass",ne(11,Zl,!e.isAccessTokenExpired,e.isAccessTokenExpired)),l(),M(" ",ce(27,8,e.data.TokenExpired,"dd MMM yyyy HH:mm")," "),l(2),ri("matTooltip",e.data.TypeID==e.channelType.Shopee?"Extend Shopee Authorization Duration for an additional 1 year":"Update Token Expired date"),l(11),v(e.data!=null&&e.data.TokenLog?"YES":"NO")}}var va=(()=>{class n{constructor(e,i){this.toastr=e,this.authorizeService=i,this.isAccessTokenExpired=!1,this.isRefreshTokenExpired=!1,this.channelType=w,this.onSuccessRefrehToken=new j}ngOnChanges(e){e.data?.currentValue&&(this.checkExpiredToken(),this.tokenExpiryMessage=this.authorizeService.generateTokenExpiryMessage(this.data.TypeID))}checkExpiredToken(){let e=new Date(this.data?.TokenExpired),i=new Date(this.data?.RefreshTokenExpired);this.isAccessTokenExpired=this.authorizeService.isExpiredDate(e),this.isRefreshTokenExpired=this.authorizeService.isExpiredDate(i)}onAuthorize(){this.authorizeService.authorizedChannel(this.data.TypeID).subscribe()}onRefreshToken(){this.authorizeService.onRefreshToken(this.data.ID).subscribe(e=>{this.toastr.success("Token refreshed successfully!","Success").onShown.subscribe(()=>this.onSuccessRefrehToken.emit())})}static{this.\u0275fac=function(i){return new(i||n)(V(ae),V(vt))}}static{this.\u0275cmp=S({type:n,selectors:[["app-authorized-config-info"]],inputs:{data:"data"},outputs:{onSuccessRefrehToken:"onSuccessRefrehToken"},features:[he([vt]),J],decls:7,vars:4,consts:[[1,"card","pt-12","border-top-0","rounded-0","rounded-bottom"],[1,"card-body"],[1,"row"],[1,"col-6"],[1,"info-label-group"],[1,"col-6","pe-8"],["matTooltipPosition","above","matTooltip","Channel has been authorized to be managed by omni.dealpos.app",1,"info-label-group"],["matTooltipPosition","above",1,"info-label-group",3,"ngClass","matTooltip"],[1,"text-wrap","text-break"],["matTooltipPosition","above","matTooltip","When your Shop Authorization has not expired you can try generate a new Access Token",1,"info-label-group"],[1,"d-flex","align-items-center","justify-content-between","w-100","text-wrap","text-break","py-3"],[1,"ms-4","text-end",2,"min-width","86px"],["type","button","matTooltip","Generate new access token",1,"btn","btn-outline-secondary","btn-sm",3,"click"],[1,"fa-solid","fa-arrows-rotate","me-2"],["matTooltipPosition","above",1,"info-label-group",3,"matTooltip"],[1,"d-flex","align-items-center","justify-content-between","w-100"],[3,"ngClass"],["matTooltipClass","unset-max-width-tooltip",3,"matTooltip"],["type","button",1,"btn","btn-outline-secondary","btn-sm",3,"click"],[1,"fas","fa-plus-circle","me-2"],["matTooltipPosition","above","matTooltip","Enable for Record log when new token issued",1,"info-label-group"],["matTooltipPosition","above","matTooltip","When a request is made by omni.dealpos.app to get a new access_token from the Channel",1,"info-label-group"]],template:function(i,t){i&1&&(a(0,"div",0)(1,"div",1),u(2,Yl,15,2,"div",2),a(3,"div",2),u(4,Ql,7,1,"div",3)(5,Jl,9,10,"div",3)(6,$l,40,14),r()()()),i&2&&(l(2),b(t.channelType.WooCommerce==(t.data==null?null:t.data.TypeID)||t.channelType.Shopify==(t.data==null?null:t.data.TypeID)||t.channelType.Plugo==(t.data==null?null:t.data.TypeID)?2:-1),l(2),b(t.channelType.Tokopedia==t.data.TypeID||t.channelType.Shopee==t.data.TypeID||t.channelType.Tiktok==t.data.TypeID||t.channelType.Lazada==t.data.TypeID?4:-1),l(),b((t.data==null?null:t.data.TypeID)==t.channelType.Shopee?5:-1),l(),b((t.data==null?null:t.data.TypeID)==t.channelType.Tiktok||(t.data==null?null:t.data.TypeID)==t.channelType.Lazada||(t.data==null?null:t.data.TypeID)==t.channelType.Shopee?6:-1))},dependencies:[I,L,He,W,R,Pt],encapsulation:2})}}return n})();var _a=n=>({"bg-gradient-warning":n});function es(n,o){if(n&1&&(a(0,"div",2)(1,"div",3)(2,"div",4)(3,"div",5)(4,"label"),c(5,"New Order To"),r(),a(6,"div")(7,"span"),c(8),r()()()(),a(9,"div",4)(10,"div",6)(11,"label"),c(12,"Dispatch Orders From"),r(),a(13,"div")(14,"span"),c(15),r()()()()(),a(16,"div",3)(17,"div",7)(18,"div",8)(19,"label"),c(20,"Product Inventory"),r(),a(21,"div")(22,"span"),c(23),r()()()()()()),n&2){let e=h();l(3),p("ngClass",y(5,_a,!e.data.POSOutlet)),l(5),v(e.data.POSOutlet),l(2),p("ngClass",y(7,_a,!e.data.POSDeliveryOutlet)),l(5),v(e.data.POSDeliveryOutlet),l(8),v(e.data.POSInventoryOutlet)}}var ya=(()=>{class n{constructor(){}ngOnInit(){}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275cmp=S({type:n,selectors:[["app-outlet-config-info"]],inputs:{data:"data"},decls:2,vars:1,consts:[[1,"card","pt-12","border-top-0","rounded-0","rounded-bottom"],["class","card-body",4,"ngIf"],[1,"card-body"],[1,"row"],[1,"col-6"],["matTooltipPosition","above","matTooltip","Outlet where the transaction is recorded in POS",1,"info-label-group",3,"ngClass"],["matTooltipPosition","above","matTooltip","Outlet where the stock is deducted in POS",1,"info-label-group",3,"ngClass"],[1,"col-12"],["matTooltipPosition","above","matTooltip","Outlet where the inventory will displayed as inventory in Inventory Comparison Menu",1,"info-label-group"]],template:function(i,t){i&1&&(a(0,"div",0),u(1,es,24,9,"div",1),r()),i&2&&(l(),p("ngIf",t.data))},dependencies:[I,L,z,W,R],encapsulation:2})}}return n})();var an=n=>({"bg-gradient-warning":n});function ts(n,o){if(n&1&&(a(0,"div",2)(1,"div",3)(2,"div",4)(3,"div",5)(4,"label"),c(5,"Payment Method"),r(),a(6,"div")(7,"span"),c(8),r()()()(),a(9,"div",4)(10,"div",6)(11,"label"),c(12,"Tax"),r(),a(13,"div")(14,"span"),c(15),r()()()()(),a(16,"div",3)(17,"div",4)(18,"div",7)(19,"label"),c(20,"Tag"),r(),a(21,"div")(22,"span"),c(23),r()()()()()()),n&2){let e=h();l(3),p("ngClass",y(6,an,!e.data.POSInvoicePaymentMethod)),l(5),v(e.data.POSInvoicePaymentMethod),l(2),p("ngClass",y(8,an,!e.data.POSTax)),l(5),v(e.data.POSTax),l(3),p("ngClass",y(10,an,!e.data.POSSalesOrderType)),l(5),v(e.data.POSSalesOrderType)}}var ba=(()=>{class n{constructor(){}ngOnInit(){}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275cmp=S({type:n,selectors:[["app-orders-config-info"]],inputs:{data:"data"},decls:2,vars:1,consts:[[1,"card","pt-12","border-top-0","rounded-0","rounded-bottom"],["class","card-body",4,"ngIf"],[1,"card-body"],[1,"row"],[1,"col-6"],["matTooltipPosition","above","matTooltip","Payment that will be recorded in POS if there is a transaction from the marketplace",1,"info-label-group",3,"ngClass"],["matTooltipPosition","above","matTooltip","Tax Type that will be recorded in POS if there is a transaction from the marketplace",1,"info-label-group",3,"ngClass"],["matTooltipPosition","above","matTooltip","Tag Type that will be recorded in POS if there is a transaction from the marketplace",1,"info-label-group",3,"ngClass"]],template:function(i,t){i&1&&(a(0,"div",0),u(1,ts,24,12,"div",1),r()),i&2&&(l(),p("ngIf",t.data))},dependencies:[I,L,z,W,R],encapsulation:2})}}return n})();var $t=function(n){return n.Never="Never",n.Full="Full",n.WriteOff="Write Off",n}($t||{});function is(n,o){if(n&1&&(k(0),a(1,"div",3)(2,"div",11)(3,"label"),c(4,"Write Off Reason"),r(),a(5,"div")(6,"span"),c(7),r()()()(),E()),n&2){let e=h();l(7),v(e.data.ServiceFeeWriteOffReason)}}var Ca=(()=>{class n{getPaymentSyncStateEnum(){switch(this.data.PaymentSyncTypeID){case 0:return $t.Never;case 1:return $t.Full;case 2:return $t.WriteOff;default:throw new Error("Unknown PaymentSyncTypeID")}}constructor(){}ngOnInit(){}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275cmp=S({type:n,selectors:[["app-invoiceFee-config-info"]],inputs:{data:"data"},decls:23,vars:3,consts:[[1,"card","pt-12","border-top-0","rounded-0","rounded-bottom"],[1,"card-body"],[1,"row"],[1,"col-6"],[1,"info-label-group","mb-4"],[1,"d-flex","border","mb-4","pt-6","px-6",2,"background","#1f87ac0a","border-radius","5px"],[1,"me-3","pt-1"],[1,"fa","fa-lightbulb","fs-5"],[1,"mb-6"],["matTooltipPosition","above","matTooltip","Select Write Off Account",1,"info-label-group","mb-4"],[4,"ngIf"],["matTooltipPosition","above","matTooltip","Choose Reason to Write Off",1,"info-label-group"]],template:function(i,t){i&1&&(a(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4)(5,"label"),c(6,"Enable Write Off"),r(),a(7,"div")(8,"span"),c(9),r()()(),a(10,"div",5)(11,"div",6),g(12,"i",7),r(),a(13,"p",8),c(14," When this configuration is turned on, Invoice Payment value is deducted with Marketplace Service Fee. Ex: $100 Order might only receive $97 Payment, $3 is recorded as Write Off "),r()()(),a(15,"div",3)(16,"div",9)(17,"label"),c(18,"PaymentSyncType"),r(),a(19,"div")(20,"span"),c(21),r()()()(),u(22,is,8,1,"ng-container",10),r()()()),i&2&&(l(9),v(t.data.ServiceFeeWriteOff==!0?"YES":"NO"),l(12),v(t.getPaymentSyncStateEnum()),l(),p("ngIf",t.data.ServiceFeeWriteOff))},dependencies:[I,z,W,R],encapsulation:2})}}return n})();var ns=n=>({"bg-gradient-warning":n});function os(n,o){if(n&1&&(a(0,"tr")(1,"td"),c(2),r(),a(3,"td"),c(4),r(),a(5,"td",10),c(6),r()()),n&2){let e=o.$implicit;l(2),v(e.topic),l(2),v(e.addressWithoutHost),l(),p("ngClass",y(4,ns,!e.enabled)),l(),M(" ",e.enabled?"ENABLED":"DISABLED"," ")}}function as(n,o){if(n&1&&(k(0),a(1,"table",5)(2,"thead",6)(3,"tr")(4,"th",7),c(5,"Event"),r(),a(6,"th",8),c(7,"Url"),r(),a(8,"th",7),c(9,"State"),r()()(),a(10,"tbody"),u(11,os,7,6,"tr",9),r()(),E()),n&2){let e=o.ngIf;l(11),p("ngForOf",e)}}var Sa=(()=>{class n{constructor(){this.shopifyWebhookService=f(Ye),this.wooCommerceService=f(Qe)}ngOnChanges(e){this.channel&&this.initWebhook(this.channel)}initWebhook(e){switch(e.TypeID){case w.Shopify:this.webhooks$=this.shopifyWebhookService.getWebhookWithState(e.ID).pipe(Ce(1));break;case w.WooCommerce:this.webhooks$=this.wooCommerceService.getWebhookWithState(e.ID).pipe(Ce(1));break}}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275cmp=S({type:n,selectors:[["app-webhook-config-info"]],inputs:{channel:"channel"},features:[J],decls:7,vars:3,consts:[[1,"card","pt-12","border-top-0","rounded-0","rounded-bottom"],[1,"card-body"],[1,"row"],[1,"col-12"],[4,"ngIf"],[1,"table","mb-6","w-50"],[1,"thead-light"],["scope","col",2,"width","100px"],["scope","col"],[4,"ngFor","ngForOf"],[3,"ngClass"]],template:function(i,t){i&1&&(a(0,"div",0)(1,"div")(2,"div",1)(3,"div",2)(4,"div",3),u(5,as,12,1,"ng-container",4),P(6,"async"),r()()()()()),i&2&&(l(5),p("ngIf",G(6,1,t.webhooks$)))},dependencies:[I,L,fe,z,_e],encapsulation:2})}}return n})();function rs(n,o){if(n&1&&(a(0,"div",3)(1,"div",5)(2,"label"),c(3,"Category"),r(),a(4,"div")(5,"span"),c(6),P(7,"async"),r()()()()),n&2){let e=h();l(6),v(G(7,1,e.categoryLabel$))}}function ls(n,o){if(n&1&&(a(0,"div",3)(1,"div",6)(2,"label"),c(3,"Brand"),r(),a(4,"div")(5,"span"),c(6),r()()()()),n&2){let e=h();l(6),v(e.data==null?null:e.data.Brand)}}function ss(n,o){if(n&1&&(a(0,"div",3)(1,"div",7)(2,"label"),c(3,"ScanProductSize"),r(),a(4,"div")(5,"span"),c(6),r()()()()),n&2){let e=h();l(6),v(e.data==null?null:e.data.ScanProductSize)}}var wa=(()=>{class n{constructor(){this.categoryService=f(oo),this.channelType=w}ngOnChanges(){this.data&&(this.categoryLabel$=this.categoryService.getCategories(this.data?.TypeID,this.data?.ID).pipe(se(e=>{let i=this.categoryService.searchByIdWithParentDFS(e,this.data?.DefaultCategoryID),t="";return i&&(t=F.getLabelPathTree(i)),t})))}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275cmp=S({type:n,selectors:[["app-default-config-info"]],inputs:{data:"data"},features:[J],decls:13,vars:4,consts:[[1,"card","pt-12","border-top-0","rounded-0","rounded-bottom"],[1,"card-body"],[1,"row"],[1,"col-6"],["matTooltipPosition","above","matTooltip","Change the customer's name from the order in the marketplace according this email",1,"info-label-group"],["matTooltipPosition","above","matTooltip","Set default category for uploading product to channel",1,"info-label-group"],["matTooltipPosition","above","matTooltip","Brand name for product upload",1,"info-label-group"],["matTooltipPosition","above","matTooltip","Customize Scan Product Size",1,"info-label-group"]],template:function(i,t){i&1&&(a(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4)(5,"label"),c(6,"Customer Default Email"),r(),a(7,"div")(8,"span"),c(9),r()()()(),u(10,rs,8,3,"div",3)(11,ls,7,1,"div",3)(12,ss,7,1,"div",3),r()()()),i&2&&(l(9),v(t.data==null?null:t.data.CustomerDefaultEmail),l(),b(t.data.TypeID!=t.channelType.Shopify&&t.data.TypeID!=t.channelType.Lazada?10:-1),l(),b((t.data==null?null:t.data.TypeID)==t.channelType.Lazada?11:-1),l(),b((t.data==null?null:t.data.TypeID)==t.channelType.Lazada||(t.data==null?null:t.data.TypeID)==t.channelType.WooCommerce?12:-1))},dependencies:[I,_e,W,R],encapsulation:2})}}return n})();function cs(n,o){if(n&1&&(k(0),a(1,"tr")(2,"td",4),c(3),r(),a(4,"td",4),c(5),r()(),E()),n&2){let e=o.$implicit;l(3),M(" ",e.Name," "),l(2),M(" ",e.ProductInventoryOutlet," ")}}var Ta=(()=>{class n{constructor(){this.warehouseLocations=[]}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275cmp=S({type:n,selectors:[["app-warehouse-config-info"]],inputs:{warehouseLocations:"warehouseLocations"},decls:11,vars:1,consts:[[1,"card","pt-12","border-top-0","rounded-0","rounded-bottom"],[1,"card-body"],[1,"table","table-bordered","mb-12","w-50"],[1,"table-light"],[1,"text-start"],[4,"ngFor","ngForOf"]],template:function(i,t){i&1&&(a(0,"div",0)(1,"div",1)(2,"table",2)(3,"thead")(4,"tr",3)(5,"th",4),c(6,"Shopee Warehouse"),r(),a(7,"th",4),c(8,"DealPOS Outlet"),r()()(),a(9,"tbody"),u(10,cs,6,2,"ng-container",5),r()()()()),i&2&&(l(10),p("ngForOf",t.warehouseLocations))},dependencies:[I,fe,te],encapsulation:2})}}return n})();var rn=n=>[n],xa=n=>({ID:n}),Da=n=>["/menu/channel/marketplace/form",n],ds=n=>({"bg-gradient-danger":n});function ps(n,o){}function ms(n,o){}function hs(n,o){if(n&1){let e=A();a(0,"div",7)(1,"a",8),c(2,"Edit"),r(),g(3,"button",9),a(4,"ul",10)(5,"li",11)(6,"a",12),C("click",function(){x(e);let t=h(2);return D(t.onDelete(t.channel))}),c(7,"Delete"),r()()()()}if(n&2){let e=h(2);l(),p("routerLink",y(3,Da,y(1,xa,e.channel==null?null:e.channel.ID)))}}function us(n,o){if(n&1&&(a(0,"button",8),c(1,"Edit"),r()),n&2){let e=h(2);p("routerLink",y(3,Da,y(1,xa,e.channel==null?null:e.channel.ID)))}}function fs(n,o){if(n&1&&u(0,ms,0,0,"ng-template",5)(1,hs,8,5,"ng-template",null,2,ot)(3,us,2,5,"ng-template",null,3,ot),n&2){let e=Be(2),i=Be(4),t=h();p("ngxPermissionsOnly",y(3,rn,t.roleChannelDelete))("ngxPermissionsOnlyThen",e)("ngxPermissionsOnlyElse",i)}}function gs(n,o){if(n&1){let e=A();a(0,"button",14),C("click",function(){x(e);let t=h(2);return D(t.onDelete(t.channel))}),c(1,"Delete"),r()}}function vs(n,o){if(n&1&&u(0,gs,2,0,"ng-template",13),n&2){let e=h();p("ngxPermissionsOnly",y(1,rn,e.roleChannelDelete))}}function _s(n,o){n&1&&(a(0,"button",27),c(1," Multi Warehouse "),r())}function ys(n,o){n&1&&(a(0,"button",29),c(1,"Webhook"),r())}function bs(n,o){if(n&1&&(a(0,"div",41),g(1,"app-webhook-config-info",18),r()),n&2){let e=h(2);l(),p("channel",e.channel)}}function Cs(n,o){if(n&1&&(a(0,"span"),c(1),r()),n&2){let e=h(2);l(),M("/",e.channel.Creator,"")}}function Ss(n,o){if(n&1&&(a(0,"span"),c(1),r()),n&2){let e=h(3);l(),M("/",e.channel.Creator,"")}}function ws(n,o){if(n&1&&(k(0),a(1,"div")(2,"span",46),c(3,"Modified:"),r(),c(4),P(5,"date"),u(6,Ss,2,1,"span",47),r(),E()),n&2){let e=h(2);l(4),M(" ",ce(5,2,e.channel.Modified,"dd MMM yyyy HH:mm"),""),l(2),p("ngIf",e.channel.Creator)}}function Ts(n,o){if(n&1){let e=A();a(0,"div",15)(1,"div",16)(2,"div",17),g(3,"app-marketplace-config-info",18),r(),a(4,"div",19),g(5,"app-sync-config-info",18),r()(),a(6,"div",16)(7,"div",20)(8,"nav")(9,"div",21)(10,"button",22),c(11,"Outlet"),r(),a(12,"button",23),c(13,"Orders"),r(),a(14,"button",24),c(15,"Service Fee"),r(),a(16,"button",25),c(17,"Advanced"),r(),a(18,"button",26),c(19,"Authorization"),r(),u(20,_s,2,0,"button",27),a(21,"button",28),c(22,"Default"),r(),u(23,ys,2,0,"button",29),r()(),a(24,"div",30)(25,"div",31),g(26,"app-outlet-config-info",32),r(),a(27,"div",33),g(28,"app-orders-config-info",32),r(),a(29,"div",34),g(30,"app-invoiceFee-config-info",32),r(),a(31,"div",35),g(32,"app-advanced-config-info",32),r(),a(33,"div",36)(34,"app-authorized-config-info",37),C("onSuccessRefrehToken",function(){x(e);let t=h();return D(t.onGetChannel())}),r()(),a(35,"div",38),g(36,"app-warehouse-config-info",39),r(),a(37,"div",40),g(38,"app-default-config-info",32),r(),u(39,bs,2,1,"div",41),r()()(),a(40,"div",42)(41,"div",43),g(42,"i",44),a(43,"div",45)(44,"span",46),c(45,"Created:"),r(),c(46),P(47,"date"),u(48,Cs,2,1,"span",47),r(),u(49,ws,7,5,"ng-container",47),r()()()}if(n&2){let e=h();l(3),p("channel",e.channel),l(2),p("channel",e.channel),l(13),p("ngClass",y(19,ds,!(e.channel!=null&&e.channel.Authorized))),l(2),b((e.channel==null?null:e.channel.TypeID)==e.channelType.Shopee&&(e.channel.WarehouseLocations==null?null:e.channel.WarehouseLocations.length)>0&&(e.channel!=null&&e.channel.MultiWarehouse)?20:-1),l(3),b(e.channelType.Shopify==e.channel.TypeID||e.channelType.WooCommerce==e.channel.TypeID?23:-1),l(3),p("data",e.channel),l(2),p("data",e.channel),l(2),p("data",e.channel),l(2),p("data",e.channel),l(2),p("data",e.channel),l(2),p("warehouseLocations",e.channel.WarehouseLocations),l(2),p("data",e.channel),l(),b(e.channelType.Shopify==e.channel.TypeID||e.channelType.WooCommerce==e.channel.TypeID?39:-1),l(7),M(" ",ce(47,16,e.channel.Created,"dd MMM yyyy HH:mm")," "),l(2),p("ngIf",!e.channel.Modified&&e.channel.Creator),l(),p("ngIf",e.channel.Modified)}}var Ti=(()=>{class n{constructor(e,i,t,s){this.route=e,this.http=i,this.router=t,this.toastr=s,this.roleChannelEdit=ft.ChannelEdit,this.roleChannelDelete=ft.ChannelDelete,this.channelType=w,this.route.queryParams.subscribe(d=>{this.ID=d.ID}),this.ID!=null&&this.onGetChannel()}onGetChannel(){var e={ID:this.ID};this.http.post("/api/ChannelLoader/GetChannelView",e).subscribe(i=>{this.channel=i.Model,this.channel.LogMode==1?this.channel.LogModeLabel="None":this.channel.LogMode==2?this.channel.LogModeLabel="Error":this.channel.LogMode==3&&(this.channel.LogModeLabel="Full")})}onDelete(e){if(confirm("Delete channel "+e.Name+" ?")){var t={ID:e.ID};this.http.post("/api/Channel/DeleteChannel",t).subscribe(s=>{this.toastr.success("Channel "+e.Name+" is deleted!","Success",{closeButton:!0,positionClass:"toast-bottom-right"}),this.router.navigate(["menu/channel"])})}}static{this.\u0275fac=function(i){return new(i||n)(V(si),V(ye),V(at),V(ae))}}static{this.\u0275cmp=S({type:n,selectors:[["app-marketplace-view"]],features:[he([Ye,Qe])],decls:9,vars:9,consts:[["CHANNEL_EDIT",""],["CHANNEL_DELETE",""],["ALL_BUTTON",""],["EDIT_ONLY",""],[3,"headerTitle","hideSearchBox","hideSearchDropdown"],[3,"ngxPermissionsOnly","ngxPermissionsOnlyThen","ngxPermissionsOnlyElse"],["class","container-fluid py-5 bg-light-gray",4,"ngIf"],[1,"btn-group"],["role","button",1,"btn","btn-outline-secondary",3,"routerLink"],["data-bs-toggle","dropdown","aria-expanded","false",1,"btn","btn-outline-secondary","btn-sm","dropdown-toggle"],[1,"dropdown-menu","dropdown-menu-end","pointer"],[1,"dropdown-item"],["role","button",1,"fs-5",3,"click"],[3,"ngxPermissionsOnly"],["role","button",1,"btn","btn-outline-secondary",3,"click"],[1,"container-fluid","py-5","bg-light-gray"],[1,"row"],[1,"col-8"],[3,"channel"],[1,"col-4"],[1,"col-12"],["id","nav-tab","role","tablist",1,"nav","nav-tabs"],["id","nav-outlet-config-tab","data-bs-toggle","tab","data-bs-target","#nav-outlet-config","type","button","role","tab","aria-controls","nav-outlet-config","aria-selected","true",1,"nav-link","active"],["id","nav-order-config-tab","data-bs-toggle","tab","data-bs-target","#nav-order-config","type","button","role","tab","aria-controls","nav-order-config","aria-selected","false",1,"nav-link"],["id","nav-service-fee-tab","data-bs-toggle","tab","data-bs-target","#nav-service-fee","type","button","role","tab","aria-controls","nav-service-fee","aria-selected","false",1,"nav-link"],["id","nav-advanced-tab","data-bs-toggle","tab","data-bs-target","#nav-advanced","type","button","role","tab","aria-controls","nav-advanced","aria-selected","false",1,"nav-link"],["id","nav-advanced-tab","data-bs-toggle","tab","data-bs-target","#nav-authorized","type","button","role","tab","aria-controls","nav-authorized","aria-selected","false",1,"nav-link",3,"ngClass"],["id","nav-warehouse-tab","data-bs-toggle","tab","data-bs-target","#nav-warehouse","type","button","role","tab","aria-controls","nav-warehouse","aria-selected","false",1,"nav-link"],["id","nav-default-tab","data-bs-toggle","tab","data-bs-target","#nav-default","type","button","role","tab","aria-controls","nav-default","aria-selected","false",1,"nav-link"],["id","nav-webhook-tab","data-bs-toggle","tab","data-bs-target","#nav-webhook","type","button","role","tab","aria-controls","nav-webhook","aria-selected","false",1,"nav-link"],["id","nav-tabContent",1,"tab-content"],["id","nav-outlet-config","role","tabpanel","aria-labelledby","nav-outlet-config-tab",1,"tab-pane","fade","show","active"],[3,"data"],["id","nav-order-config","role","tabpanel","aria-labelledby","nav-order-config-tab",1,"tab-pane","fade"],["id","nav-service-fee","role","tabpanel","aria-labelledby","nav-service-fee-tab",1,"tab-pane","fade"],["id","nav-advanced","role","tabpanel","aria-labelledby","nav-advanced-tab",1,"tab-pane","fade"],["id","nav-authorized","role","tabpanel","aria-labelledby","nav-authorized-tab",1,"tab-pane","fade"],[3,"onSuccessRefrehToken","data"],["id","nav-warehouse","role","tabpanel","aria-labelledby","nav-warehouse-tab",1,"tab-pane","fade"],[3,"warehouseLocations"],["id","nav-default","role","tabpanel","aria-labelledby","nav-default-tab",1,"tab-pane","fade"],["id","nav-webhook","role","tabpanel","aria-labelledby","nav-webhook-tab",1,"tab-pane","fade"],[1,"alert","alert-warning","w-100"],[1,"d-flex","align-items-center","justify-content-start","p-4"],["aria-hidden","true",1,"fa-regular","fa-file","me-5"],[1,"me-2"],[1,"fw-bold"],[4,"ngIf"]],template:function(i,t){if(i&1&&(a(0,"mainpanel",4)(1,"actions"),u(2,ps,0,0,"ng-template",5)(3,fs,5,5,"ng-template",null,0,ot)(5,vs,1,3,"ng-template",null,1,ot),r(),a(7,"content"),u(8,Ts,50,21,"div",6),r()()),i&2){let s=Be(4),d=Be(6);p("headerTitle","Marketplace Configuration View")("hideSearchBox",!0)("hideSearchDropdown",!0),l(2),p("ngxPermissionsOnly",y(7,rn,t.roleChannelEdit))("ngxPermissionsOnlyThen",s)("ngxPermissionsOnlyElse",d),l(6),p("ngIf",t.channel)}},dependencies:[I,L,z,He,ua,fa,ga,va,ya,ba,Ca,wa,Sa,Dt,Fe,rt,Pe,Gt,It,Ta],styles:[".tab-pane[_ngcontent-%COMP%]{margin-top:0!important}"]})}}return n})();var ka=n=>({"is-invalid":n});function Is(n,o){n&1&&(a(0,"div",6),c(1,"Api Key is required"),r())}function xs(n,o){n&1&&(a(0,"div",6),c(1,"Vendor ID is required"),r())}var Ea=(()=>{class n{constructor(){this.dialogRef=f(Vn),this.config=new Ai,this.initModalConfig(),this.initFormGroup()}initModalConfig(){this.config=new Ai,this.config.title="Register Plugo",this.config.okText="SAVE"}initFormGroup(){this.formGroup=new In({ApiKey:new zt(null,[K.required]),VendorID:new zt(null,[K.required])})}onClose(){this.dialogRef.close()}onOk(){if(this.formGroup.markAllAsTouched(),this.formGroup.invalid)return;let e=this.formGroup.value;this.dialogRef.close(e)}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275cmp=S({type:n,selectors:[["app-modal-register-plugo"]],decls:13,vars:10,consts:[[3,"onClose","onCancel","onOk","config"],["content",""],[3,"formGroup"],[1,"form-label-group","has-validation"],["type","text","id","ApiKey","placeholder","Api Key","name","ApiKey","title","Api Key","formControlName","ApiKey",1,"form-control",3,"ngClass"],["for","ApiKey"],[1,"invalid-feedback"],["type","text","id","VendorID","placeholder","Vendor ID","name","VendorID","title","Vendor ID","formControlName","VendorID",1,"form-control",3,"ngClass"],["for","VendorID"]],template:function(i,t){if(i&1&&(a(0,"modal-material",0),C("onClose",function(){return t.onClose()})("onCancel",function(){return t.onClose()})("onOk",function(){return t.onOk()}),a(1,"div",1)(2,"form",2)(3,"div",3),g(4,"input",4),a(5,"label",5),c(6,"Api Key"),r(),u(7,Is,2,0,"div",6),r(),a(8,"div",3),g(9,"input",7),a(10,"label",8),c(11,"Vendor ID"),r(),u(12,xs,2,0,"div",6),r()()()()),i&2){let s,d,m,_;p("config",t.config),l(2),p("formGroup",t.formGroup),l(2),p("ngClass",y(6,ka,(t.formGroup==null||(s=t.formGroup.get("ApiKey"))==null?null:s.invalid)&&((t.formGroup==null||(s=t.formGroup.get("ApiKey"))==null?null:s.dirty)||(t.formGroup==null||(s=t.formGroup.get("ApiKey"))==null?null:s.touched)))),l(3),b(!(t.formGroup==null||(d=t.formGroup.get("ApiKey"))==null)&&d.getError("required")&&(!(t.formGroup==null||(d=t.formGroup.get("ApiKey"))==null)&&d.dirty||!(t.formGroup==null||(d=t.formGroup.get("ApiKey"))==null)&&d.touched)?7:-1),l(2),p("ngClass",y(8,ka,(t.formGroup==null||(m=t.formGroup.get("VendorID"))==null?null:m.invalid)&&((t.formGroup==null||(m=t.formGroup.get("VendorID"))==null?null:m.dirty)||(t.formGroup==null||(m=t.formGroup.get("VendorID"))==null?null:m.touched)))),l(3),b(!(t.formGroup==null||(_=t.formGroup.get("VendorID"))==null)&&_.getError("required")&&(!(t.formGroup==null||(_=t.formGroup.get("VendorID"))==null)&&_.dirty||!(t.formGroup==null||(_=t.formGroup.get("VendorID"))==null)&&_.touched)?12:-1)}},dependencies:[I,L,zn,Y,$,Oe,H,X,Z,ee],encapsulation:2})}}return n})();var Je=function(n){return n.SHOPEE="https://res.cloudinary.com/pos/image/upload/v1605249851/icons/Marketplace%20logo/shopee-logo.png",n.TOKOPEDIA="https://res.cloudinary.com/pos/image/upload/v1605249861/icons/Marketplace%20logo/download_tkpd.png",n.KAL_CARE="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAYwAAAB/CAMAAADLlgV7AAABIFBMVEX///8jHyCAvAAAZUgAAACdyUTD3YwAYEEAY0V6uQAAXT0AWzoAWDUVDxCAfn94uAC7urulpKUMAAQZFBUPBwnf6+ecu7Cjw7jf39/3+vmZmZnn8e4pdl5om4oGblIZblOpvrZNi3draWnc7LxOS0w7gmy/19AAYEhaj3zK3NbW5N+Twk272Immy32Ih4cydFwrdlGgzFE+hEZvnY30+em+2Z4ATiW4ycLI4ZzD27Pu9t2izUTn8tJ9qJrv7+8/PD3U09NZV1gtKSqPxCTP5ar3+vDCwcG42X+kzl3R48TW6bWw1HLk7uLE35aRunidvrMxe00ufDoBakBjYWF/sISWvKdsp0Glz1et0nVvqFFWlzQAUTV8rmlbmUeLr6IARhVkELW6AAAVU0lEQVR4nO1dj3/aOJYnONTGdkqbBKgLhFIKDTTT2QxsyCaQpCFp2GTa7O7cXTs3N8z//1+cnmRLT7L8C5rZ9M7f3c802PKz/L7S+yUZCoUcOXLk+C7RGPUkLP/dHfp/DK9tWxLcVvqLL14GeB46d/b8JcKz1IK8NPd9HuBF+s5+B5i4hgI3jTooLja3d31svlfOnW1s7gpsb8Zq7Zlou3l+lnjfZ5vbPjbj5X5vqNshMqppr322uRFg54N8yjvf2UDYfhonx8Ntt1Vaw3i6xVtvJky57wvfiow38qkPu5iLrQ+xs+35Jm58mTg1EBnbYfuYBt71eNq9vb3qjq9T24E/AQ9DxlNJvTsJpueNNIuSB/t6ZIyvvh4WyxWCMvlvcb44mF5nFvIweBAyXspcXMYb9hdS65DFC2MNMqYHc8JBEYNQUrwZZxPzQHgIMp4r2r2IF/NSMmnEqCU55VXJuL4qVWQiAlT+z5LxTOZiO8nsbCjYfZlwwYpkXM0rWibI5Fikl/KQ+PZkXChcJKn2o9weXEyCU12JjGkpigoyMa7SSnlYBGS8/cdf3n4TMl5I3jghqAW8li8g2PwYf8UqZBzo7ZOPR+LBfTLe/vTuB5+N9cg4u5R0u/s6SYinTgziNBIuyk7GOGZaPB4r5ZPx9qfSuycHjI21yFCSva03iUnD8+0QGUmpRmYyToqx8+KxWClGBuHi9N2Bz8ZaZHzYwkpNCmoB5yErRexUvIqzkjENzwWIquZz9u+jsVKUDMJFqUTIYGysQ8ZrZZhfJMpASYZgJSHVyEjGWGWiSPK88Xh8fT0ed58s5pXHYqWADMoFJYOysQYZ72X7v5vgiOklu4KBc3Fl7IzKSMZcpmJ+LCcV19Npsow/B3WbccHIADZWJ0NJ9hKMDYNI+LYvRPa3G1stzEbGoizNiqvHVIxSUP+NceGTQdhYmQw12Usuv0pJxiU2WbGpRiYyrnAcVT48Sftw/w7U/1mSyHhy8K8VyVCSveSgFvALdxRbTwueqBjGphpZyLiW5kU27zCeTo+PP93dHF9Np8kkjrufbu4+6YRcHR/fagQ0air+o6SQ8eTgP9U2k4jb46nw5kKOihKq5j7OhITdC1ylik01spDxpbwaF9fdmxIUERnI7JofHnSRsxkf+ih16eeTBTSuHMpSTg6IkAoVUZwfyHwMLceW8FswLxAZZG4orZyeXrHPwvkanykpFuwKUpJxWZDrtzHXZyBjioxUuZTaXUxBtaF4uFy8ES2C85Vb+HjDPpaPsZRuqSj7qzscQ/dMuQzl+26Kv//tCWcjqIwEcGraLseRkW459FJMDPAw2E7FaDkDGSWsjbT+olsKM1FUdN0NWlRILHYd3KbcFVJODsN04i7sWdFcFArRbJj6TQrRZGxepHrqC9lKYTsVl2qkJ+MET4ywPddifBhZOqmIIPiWk0H0O+dqF8o+1hMqGshkKFzEsJGVjLQr0++FVs/pAcROzFaD9GTg8uA8XZ+u4konwmlwyRU8/cQ9FlFSuKWSyAhxEc1GRjI2k6rmAdDEYHEwKm3FpBrpyUBKKN+m6tJNXEWxJNrdBcouo0vKX4LTYRMVNOFuB5OBuDj9e9Aggo1sZCRXzX18VK0UTsg3okOA1GR0sUpSdSlyQFNF3omGJT4ZkCnkPgVzQUMpgUowNRAZmnkB+NsNpwOxkYmMrcQ17AAfRDR87h/Cdioy1UhNBrJS5YM0PZKz9UqxdHiKD6BYiddYDkuoge9T7tB9i3d/vbpCcQQvEQsy3v50Gp4XADE3nvxlJTIS1+k4zkJWCuyUEBSZaqQmYx7WUywOsI2qfGXO9lAcEd73Wi54BWANbpEYX/W3oiOBnRJk/OMdh8QFYeMHjn+tQsZ2iuogA0oyAisl+fStKDuVlozrjFaqKyUlvrO+RjKE/z4J8QCbf4rKFeU5v0JMlsDxIDP1mU+Av0oj+ed3pwH+6+0qZGylKUlRiCSDZnwMyE5FKjotGVNExmlyf7DaK9w9IJeA0mt1iaRSuu2ejJnqhd7nIsk75geDnmCfoWfj51JgvhAX2XxG2rj2QmOlZDv1JuLKtGTcItN9F9POx522udAiliGFBmQGoGTuRJya6oRryDAsHRt6LjJGU0n7CXxglV6Iw8hORaWOack4RtpNDmzRPCqjGPZGkIFWZ6X9DZUbLEcEveiwMGu8QCblGRo2fj7UcpE5z7hIfHIyBdDWtUt0HE2YKIuXloyvSL3dmHYMKJIqo4qgCJbKaPhL9UeJC+SoRPsr1DocTWn9RhQXmTPw+IU6/2K0Qnv+QgALjdiYkJaMuyxkIOuCQ1i9/0YUSalgAU9H6mK8k+7xXRFFBjwkU8hQ2CC+W89FZjJ2NpLZ+IBL7psI+LDe4KUl40sWMrDhQYenWv89RpGtsjVURML0JN1fjQ6UuRSVDIkNxMWvStXWHGn7H10o3Enc1/9Cs0MnLEafaqQl4zALGUK9Uh0c+W9kjVAwJRspOZzWQOQqM0dmw8J+A3Mhv1lmOQNt/yUylLWlpA1T6m5nPba1UtKSscjgwJF6K3jVQfgdvLsKBVPKxOjG1bZIa0G01zJUcDZ+4Bn5r20FzYilPunNJWWlbzdhpe9yIw30G3VX8RlJ1RAUeUk+AE0Y5L9RiKWs7X2KnRny4lNVxfKzQsbpfw89BVEPgMl4HdrwHLsGfpHGSkGqobt5WjKwGyjFtAMcaiPYwlgM9LnWf1cU+xe3p7c8T6jJ1J3PEhmnv/620oaE16GdOrHF26fSzsNoaKPkFZK+xF2DYgZUsMbQhEEL6KgyVVHkRJZ9y+V54i7SuuNbqh8Cf7HaVh2YB/ILSxuhN2AFzjR7OrXY0jG6SjkkwWmgXYeSExCxEc6/UWVKLbPgmFfwUCmWblJUKmF752dOxunvq+4opEbpqWx8oheZnqWzUhv6VCN11RZrJN5OYf+NDuvWKgrYf4fWctVq7nxeWtx9SrHTB0A3Pn/2yQAu1iGj8Ea2PpGqepN2ZmgrXanJkPLkWCOBJhEmA4UA2Hod6B0MQJCxuB4DsmyqZq8EfKZkUC7WIsO7VGIqfdHwBeZsJwx89pfw5YiM3VgyJKcRuzlET8ZJWX+5domD4Qs/pYRZaeC/LPOZkMG4WIuMwpkysLe0OTROMnbevA7hHEnQbExAZOy8eaEC2TVcy5DDIRVd7RTAq6f4ahTvqoJE0Jt6Z5BA8BrZ55vS7+u8uRQEshdqVn6huRAlGdo6Oc4mNakGDsV2tpRZtYXfCbmRKhHz6DQcl2y5G5AW/krC3iD/Hdpy8kmbsacEf8Hyf35f652+15qD9ITmfZmPyH1rjf4ZZus8dDo+LsZhw1jOh8t3ckgzvg0ULy0W+Wo/lowcimynMQqfhpdcxbmkgOpbve0qUjz1LfDwLo/XSJmbSQUPTaoRT4ZUeFdysHK59ARW5E5OTqbHd4dFvjcWv1BTLoGBGX+VLsWR7XG0/5YsY/krMm0nV6VK0ja6b0+G8l0V4TIV9isRGwexsQunGhnICIWasOeDghVTufHB7crFxWKh7GXDc0AkdpXwWL8rS4KOpwTdTwvYdpu4p/EByCj8IhcB1TIVTjIi3tiX3tPcUUsiWchQ3yFTwFep1Snk/yuW7Z4ImagYEu76VLKMJN+j/2fbopPWfh+CDOWVV/VVDZxk6K2UtJktnGpkIUNKwzUIDMmJrln54IqTIQwS4le3ZTRmH1xSgewhyFBfBpeLhjjJiNzejJc7Qo0ykUF8c1ztTrOXRpwsieAIFQSR/9YN9Zi5mLTd90HICBVl8StlsYOeAy8EqqnG+9i1kNDK+fg05osqeDIQ1mGZTBuxvxktaAsyjgsahN905khQ6MOQEfpCEBFvenglYzOyPI/f1Ve/2UX3Hn8MGST8ifgyHWnAq8tCdP+Njgwxh9T6uY/IuahxMRLqzupkII2H6uVKgLux/SJ8kbbW4UP6CpJL+dzZZlxpS7cgNV3o6SijlTf5Vcxi5QtYsIWGDOS/IwpP2lc8ypW5diIhDNUvjLSshCuQUp6e+5sIti4v1JPPtzYlBA2e4YMx+xbe43bKBPp4vhkN/WaI8Sf1W7+gsH0nFdZP5gFl5BRz2IeVADyIHRf5sWiz0y1Jd6NfMJa8W6hQcx0M19avdz8ynIVKUgGiV3vHx4u5r0jiS0s3V+EkobugDYqLgKRp18ctnwTXXY64jPrkeBGwViT3SlmoavQlPOJ31v8UXJ98w1fFIdV/LF9MkiNHjhw5cuTIkSNHjhw5cuTIkSNHjhw5cuTIkSNHjhw5cuTIkSNHjhw5cuTIkSNHjhw5cuTIkSNHjhw5cuTIkSNHjhw5cnzXQF89H/st9CkleZklectabXkfPt6vkeOxQrzGcJ3++kK8xlmkFK+2JP9Ld49hfe0v+qjSX9RowJ990zAs/W/IpMIrcr35ikqyiaROyssaR7bttMPHW65tHzUiL6vOmo7ruuZshZ5yeJP9PSLEaS4jzhuO7RjRnUBYuo67hvIYWrZlsd/7bpmW5a7B7iuHSHoFf/XJX2ZqMlzCXJN/9IJHbxFu3Sg9eCPHpsPIqa/cX0JozzWpFFv/0zkFb88yrHYcGby7RJBlrTtPhzCKeyC2bRmpNajDKyIpIMNILwqTMbwfNXv+8TgyGm34zjLTcVxnuHqHq3tgCxzTdFyNmQTEk+ENaq29YDb0HMtuRjRMjw7pETwS2Ba3v4ag9ck4O7JNfl0MGV4btGi1JoNBSoOuRYt02OxNhsPBfsQXnsWTMSHd5XOq0eq1UtmzWIDmbGJ5Rya2FitgfTI8+HPfPx5Dxghms7HOwKE3Bk0340OEeDKcyN8GWxVej9zwR89rWobj/7hS4340Gi25AbgnqHtgqGezGXUvjRo5QpQ+GqFniSLjbDIbje75E3nVSW02W/aDA5yM4f0SlPxj/b4Gt6ZknBXIxTPFkcEVhomdhVftg8wJl0n6RzranwXMDpdEjPJdWlVTo0v50QUZXt1XQoPoYAZWrX8/gvnZI3dq+Eq6D25QrREptSqXSXszXKJjUYCvKXQGQzIx2kxYzSB21LTdjv9sJoQUHlgRYl6pjodHtmM2SLxjJZNRa7vE+DimH7D0m45DPtuONROqpWTUXfrllZZtuzAogAxn0HGhJ3LIVLMNeRL3m3Ygk/VnAJGY13LNI6abDj3tNiVWq/RrAGWfszTZo+97ChmNPaKEPfLXkIhygGMi3e/uEYi1HFAJu2pmUSm2P1SHpHdHgxHtg5kwn2FO2Mt723CYGxu5pAcO2FN/gtIeeUxtJh1r8M2GFphcQyHDfkUCd4mMkUOkm+CPGBsD8sEB6YYfCQoyjuiXV1que1T3ySACabjjSr+HBl7OrqEDQ9eXaTlM5tCCX3qEm7JPJnH2JPoyZdWDHMuoo0fYh47DmLCZ+UJkNMGmNXzRoIR9NnZM0t1Bwf8NRHYRkwJjqUMPVOFcm9BDny7BsRDrYHU6lrVH21FL2BvWqHeLIgPkkid0HYUM68ceQdPiZNSINKvemIFJYFO0t38/6S/p94QOJDLOhgNo3KsOh15AhtkZIWE+4NlsPMI8kDlhMvsBGdA/549CECZWB001WhxaFvDX40zX6SAaQp/tVhIZ1SpV0b7fXUEGXG62hjMwFDNOhmW2WtBEGkUaNNos2GZDFx7eafg2e6gng6WK5miATSCQYbBfWTQC/YFoiA4KPSuQz0YGfJ8uO4CjKdWBw++YDqg03F/qMiSLg2TOOBlEof2qrxxI3EDVljQ1+gYdrE7HfwwDWCYPug+3biSQoThwToZnUB9MH9miCSMlw75n9jUxsJkxY00fCQY9vYBGWbUYMhyFYx0Z1B/Bo5KpYQZqLjSGg6XJ+VLIwKGtA+P8RyLOxb6XkqHmF4HMfU6GT34hyJ8gVnPk33+s7jtsjlNpA9u/HrRMW65CRh+0BENiGeQKlAzTY7q1eoV4sFk943egjzHkqteTEYoKmZnqEPS4ZQHzZNTq9ToZbFaPXTDp7NnUabB+xZIxCMjAU5COetkR1gOZggzLYKdYvEy6QCeOaiQGPZg3Jg1dXgXDDx6dTrFVyAAOaF2AaxLIsIy0ZBQ6lj8KUY+o6jvRZIiBjsggDryAoymI/gziXGEAMvYaHce0bOaqM5CBJwKd9XiIN3pcJiLDf2r6NcqWw4IGO1yEqkMXaeyyDB6AP+gqZMyCflMtzLKTsR8I8PlMRYYaoutC2336pP73FwMZXo9EC0atUbVWJ2NkykMhkDkEgxQiY+CyygnFkcZ9vvKdk0JG65GQQXOCAb8V+DWjynSVkQw6MyYDhqEvHuZgw1ydDJBhWMJwgWMCs9XQksGG0NDvgyawrAYTituVQfCHQkY7rZkCb826VVuLDD5kqdqobiHYAodJ6clGBo0SceBDRzU85hpk0NFh9jwkk4blejIKphFf5xmYAQdBzRS8C7XaKAOHINOuYiUwMoJCoezAQTcwRWj0vjoZhZ5fOOz5IS5Ljoh4b9/MTEaVagJ535EfMPd1ZNA6h+H3I4aMCbU87fthdTjwZQLjAyma4k89srW+gmhrMmx41QmMNZby7Pl36vnKw7UpmmnOCl5H2Mg+jRgaChmQ1ljtKqWPuck1yAAbaxkzWsxlj1CjN223TSszGYUlldaZzVpNGq3BaLL2ljMY3NaeQgYdfpbR7jXiySjMqFO2yYwAa1V3kcxOiAwPVj7MZms56rSxmIZBwoq2AWf9esuEPToMR1ZUR2TMQkooNGhIaLSbEhmsO+1Z0wwqB2uQUai5cD9yves7yQZdx7FMEzjvZCPDa1Fppm0yu+JBKGnZtrMHk0AhgzwHvVM7iQzCMVsVoubTa9pcJhuLEhmFoQ3noQtSWYV6dhrU89rXjD86O4LIqFpMCVbT4tHDiM5kNqYEGVSKRaWwwZyRjJ7rukc8ch804Wcc3D1eFx3skQNue1A7cl32sPA5RAY5e8TIIH+5wU0nTfajEC6rthB24Ich6hPS5g9Kxh+k8Z7f+N6CszRv3Sd/0T61yfk/1ByvOtpzoSlt0YC2rjVZEpkW75/wE42RQ/vgHmFr1acSHNccCeF99uhtnzTPIvdmyXBhYFChQglU7XCMlgdsWL5t4Ed2m75Gq/QckEH+dROXKaoAlMM1+vW69PgD+tmDZrST8OMOoRyYC6HtRNwC0uq8ZF5okA+ekFUYEgivMiSSq8Ef9CK1c1zOoN8feEKm2j+pYDKALgwUKd4guBlShfToVdw3RQlcAps5+DCVIhoF5xS95MiRI8ejxf8CaCHBz1xZMMgAAAAASUVORK5CYII=",n.LAZADA="https://res.cloudinary.com/pos/image/upload/v1641528116/icons/Marketplace%20logo/lazada.png",n.WOOCOMMERCE="https://res.cloudinary.com/pos/image/upload/v1739236630/icons/marketplace_icons/woo.png",n.TIKTOK="https://res.cloudinary.com/pos/image/upload/v1645761565/icons/Marketplace%20logo/tiktok-logo.png",n.SHOPIFY="https://res.cloudinary.com/pos/image/upload/v1710725872/icons/marketplace_icons/Shopify_with_text.png",n.PLUGO="https://res.cloudinary.com/pos/image/upload/v1739236577/icons/marketplace_icons/plugo_biglogo.png",n}(Je||{});var Ds=["*"],ks=(n,o,e,i,t,s,d,m)=>({"btn-shopee":n,"btn-lazada":o,"btn-tiktok":e,"btn-woocommerce":i,"btn-tokopedia":t,"btn-shopify":s,"btn-kalcare":d,"btn-plugo":m});function Es(n,o){n&1&&(k(0),a(1,"div",7)(2,"span"),c(3,"BETA"),r()(),E())}var Ii=(()=>{class n{constructor(){this.disabled=!1,this.isBeta=!1,this.authorize=new j,this.channelType=w,this.buttonName="Authorize Account"}ngOnChanges(e){e.type&&(this.initChannelImage(),this.channelType.Shopee)}initChannelImage(){switch(this.type){case w.Tokopedia:this.image=Je.TOKOPEDIA;break;case w.WooCommerce:this.image=Je.WOOCOMMERCE;break;case w.Shopee:this.image=Je.SHOPEE;break;case w.Tiktok:this.image=Je.TIKTOK;break;case w.Lazada:this.image=Je.LAZADA;break;case w.Shopify:this.image=Je.SHOPIFY;break;case w.Plugo:this.image=Je.PLUGO;break}}onAuthorize(){this.authorize.emit()}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275cmp=S({type:n,selectors:[["app-channel-widget"]],inputs:{disabled:"disabled",type:"type",isBeta:"isBeta",buttonName:"buttonName"},outputs:{authorize:"onAuthorize"},features:[J],ngContentSelectors:Ds,decls:10,vars:13,consts:[[1,"card","h-100","ribbon-box"],[4,"ngIf"],[1,"card-header","d-flex","align-items-center","justify-content-center",2,"height","120px","padding","0px"],[1,"w-50",3,"src"],[1,"card-body",2,"min-height","134px"],[1,"card-footer","p-4"],[1,"h4","fw-bold","btn","text-white","w-100","border-0",3,"click","ngClass"],[1,"ribbon","ribbon-top-right"]],template:function(i,t){i&1&&(ut(),a(0,"div",0),u(1,Es,4,0,"ng-container",1),a(2,"div",2),g(3,"img",3),r(),a(4,"div",4)(5,"div"),De(6),r()(),a(7,"div",5)(8,"a",6),C("click",function(){return t.onAuthorize()}),c(9),r()()()),i&2&&(l(),p("ngIf",t.isBeta),l(2),p("src",t.image,ht),l(5),p("ngClass",Sn(4,ks,t.type==t.channelType.Shopee,t.type==t.channelType.Lazada,t.type==t.channelType.Tiktok,t.type==t.channelType.WooCommerce,t.type==t.channelType.Tokopedia,t.type==t.channelType.Shopify,t.type==t.channelType.KalCare,t.type==t.channelType.Plugo)),l(),M(" ",t.buttonName," "))},dependencies:[I,L,z],styles:['.bg-shopee[_ngcontent-%COMP%], .btn-shopee[_ngcontent-%COMP%]{background:linear-gradient(-180deg,#f53d2d,#f63)!important}.bg-tiktok[_ngcontent-%COMP%], .btn-tiktok[_ngcontent-%COMP%]{background:linear-gradient(-173deg,#ee1d52,#69c9d0)!important}.bg-woocommerce[_ngcontent-%COMP%], .btn-woocommerce[_ngcontent-%COMP%]{background:#8053b4!important}.pointer-help[_ngcontent-%COMP%]{cursor:help}.btn-bottom[_ngcontent-%COMP%]{position:absolute;bottom:.5rem;left:.5rem;width:96%}.ribbon-box[_ngcontent-%COMP%]{position:relative}.ribbon[_ngcontent-%COMP%]{width:150px;height:150px;overflow:hidden;position:absolute}.ribbon[_ngcontent-%COMP%]:before, .ribbon[_ngcontent-%COMP%]:after{position:absolute;z-index:1;content:"";display:block;border:5px solid #78c424}.ribbon[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{position:absolute;display:block;width:225px;padding:15px 0;background-color:#78c424;box-shadow:0 5px 10px #0000001a;color:#fff;font:700 18px/1 Lato,sans-serif;text-shadow:0 1px 1px rgba(0,0,0,.2);text-transform:uppercase;text-align:center}.ribbon-top-right[_ngcontent-%COMP%]{top:-10px;right:-10px}.ribbon-top-right[_ngcontent-%COMP%]:before, .ribbon-top-right[_ngcontent-%COMP%]:after{border-top-color:transparent;border-right-color:transparent}.ribbon-top-right[_ngcontent-%COMP%]:before{top:0;left:0}.ribbon-top-right[_ngcontent-%COMP%]:after{bottom:0;right:0}.ribbon-top-right[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{left:-25px;top:30px;transform:rotate(45deg)}.btn-shopify[_ngcontent-%COMP%]{background-color:#96bf48}.btn-tokopedia[_ngcontent-%COMP%]{background-color:#7f7f7f}.btn-lazada[_ngcontent-%COMP%]{background:linear-gradient(90deg,#ff7e5f,#fd04e3)!important}.btn-plugo[_ngcontent-%COMP%]{background-color:#f2a954}']})}}return n})();function Os(n,o){if(n&1){let e=A();a(0,"div",3)(1,"div",6)(2,"app-channel-widget",9),C("onAuthorize",function(){x(e);let t=h();return D(t.openPlugoDialog())}),a(3,"p"),c(4,"Authorize DEALPOS to manage your Plugo Store."),r(),a(5,"p"),c(6," Configure Plugo x DealPOS integration by visiting this "),a(7,"a",14),c(8," article. "),r()()()()()}if(n&2){let e=h();l(2),p("type",e.channelType.Plugo)}}var Pa=(()=>{class n{constructor(e,i,t,s){this.http=e,this.router=i,this.dialog=t,this.toastr=s,this.disabled=!1,this.newFeatureVisible=!1,this.channelType=w}shopeeAuthorize(){this.http.post(Te.ShopeeV2_URL).subscribe(e=>{window.open(e.Url,"_blank")})}tiktokAuthorize(){this.http.post(Te.Tiktok_URL).subscribe(e=>{window.open(e.Url,"_blank")})}lazadaAuthorize(){this.http.post(Te.Lazada_URL).subscribe(e=>{window.open(e.Url,"_blank")})}openTokopediaDialog(){this.dialog.open(po,{data:{title:"Tokopedia"},width:"30%"}).afterClosed().pipe($e(e=>F.IsNotEmpty(e)),Q(e=>this.http.post(Te.AddTokopedia,{ShopID:e}))).subscribe(e=>{this.onSuccessAddChannel()})}openShopifyDialog(){this.dialog.open(Wi,{data:{title:"Shopify",channelType:w.Shopify},width:"30%"}).afterClosed().pipe($e(e=>F.IsNotEmpty(e)),Q(e=>this.http.post(Te.AddShopify,e))).subscribe(()=>{this.onSuccessAddChannel()})}openWooCommerceDialog(){this.dialog.open(Wi,{data:{title:"WooCommerce",channelType:w.WooCommerce},width:"30%"}).afterClosed().pipe($e(e=>F.IsNotEmpty(e)),Q(e=>this.http.post(Te.AddWoocommerce,e))).subscribe(()=>{this.onSuccessAddChannel()})}openPlugoDialog(){this.dialog.open(Ea,{width:"30%"}).afterClosed().pipe($e(e=>F.IsNotEmpty(e)),Q(e=>this.http.post(Te.AddPlugo,e))).subscribe(()=>{this.onSuccessAddChannel()})}contactSupport(){this.dialog.open(co,{width:"30%"}).afterClosed().pipe($e(e=>F.IsNotEmpty(e)),Q(e=>{let i={URL:e.URL,Email:e.Email};return this.http.post("/api/ChannelAuthorization/Tokopedia_Intercom",i).pipe(se(()=>e))})).subscribe(e=>{this.toastr.success("Your request has been received, we will be in touch at "+e.Email,"Thank you!")})}onSuccessAddChannel(){this.router.navigate(["/menu/channel"]),this.toastr.success("Channel has been added successfully","Success")}onToggleNewVersion(e){this.newFeatureVisible=e}static{this.\u0275fac=function(i){return new(i||n)(V(ye),V(at),V(xt),V(ae))}}static{this.\u0275cmp=S({type:n,selectors:[["app-marketplace-add"]],standalone:!1,decls:56,vars:10,consts:[["headerTitle","Add New Channel",3,"hideSearchBox","hideSearchDropdown"],["role","button","routerLink","/menu/channel",1,"btn","btn-secondary","btn-fill","btn-lg","me-3"],[1,"container"],[1,"row","mt-12"],[1,"col-md-4","ps-md-0"],[3,"onAuthorize","type"],[1,"col-md-4","pe-md-0"],["buttonName","Authorization is Closed",3,"type","disabled"],["type","button","href","https://seller-id.tokopedia.com/university/essay?knowledge_id=1189016095426305&default_language=id-ID&identity=1",1,"button","text-primary","fw-bold"],["buttonName","Register",3,"onAuthorize","type"],["target","_blank","href","https://support.dealpos.com/en/articles/5733019-woocommerce-authorization-at-dealpos-apps",1,"button","text-primary","fw-bold"],["target","_blank","href","https://support.dealpos.com/en/articles/9525716-shopify-authorization-at-dealpos-apps",1,"button","text-primary","fw-bold"],[1,"p-5","text-start"],[3,"change"],["href","https://support.dealpos.com/en/articles/10568056-plugo-authorization-in-dealpos-omnichannel-apps","target","_blank",1,"button","text-primary","fw-bold"]],template:function(i,t){i&1&&(a(0,"mainpanel",0)(1,"actions")(2,"a",1),c(3,"Cancel"),r()(),a(4,"content")(5,"div",2)(6,"div",3)(7,"div",4)(8,"app-channel-widget",5),C("onAuthorize",function(){return t.shopeeAuthorize()}),a(9,"p"),c(10," Authorize DEALPOS versi V2 to manage your shopee, you will be redirected to shopee website to complete this process. "),r(),a(11,"p"),c(12," You will need to sign in to Shopee using your Seller account and confirm the authorization. "),r()()(),a(13,"div",6)(14,"app-channel-widget",7)(15,"p"),c(16," Starting from middle of Quarter 1 2025, Seller can no longer create or authorize their shop to Third Party Service without having a merge to their Tiktok Seller Account. "),r(),g(17,"br"),a(18,"p"),c(19," Please visit "),a(20,"a",8),c(21,"This Article From Tiktok x Tokopedia"),r(),c(22," to complete the merge process. After that seller can authorize their shop to DEALPOS only via Tiktok x Tokopedia Options. "),r()()(),a(23,"div",4)(24,"app-channel-widget",5),C("onAuthorize",function(){return t.tiktokAuthorize()}),a(25,"p"),c(26," Authorize DEALPOS to manage your Tiktok Seller, you will be redirected to Tiktok website to complete this process. "),r(),a(27,"p"),c(28," You will need to sign in to Tiktok using your Seller account and confirm the authorization. "),r()()()(),a(29,"div",3)(30,"div",6)(31,"app-channel-widget",9),C("onAuthorize",function(){return t.openWooCommerceDialog()}),a(32,"p"),c(33,"Authorize DEALPOS to manage your Personal Website."),r(),a(34,"p"),c(35," Configure woocommerce integration by visiting "),a(36,"a",10),c(37,"this article."),r()()()(),a(38,"div",6)(39,"app-channel-widget",5),C("onAuthorize",function(){return t.lazadaAuthorize()}),a(40,"p"),c(41," Authorize DEALPOS versi V2 to manage your lazada, you will be redirected to lazada website to complete this process. "),r(),a(42,"p"),c(43," You will need to sign in to Lazada using your Seller account and confirm the authorization. "),r()()(),a(44,"div",4)(45,"app-channel-widget",9),C("onAuthorize",function(){return t.openShopifyDialog()}),a(46,"p"),c(47,"Authorize DEALPOS to manage your Personal Website."),r(),a(48,"p"),c(49," Configure Shopify integration by visiting "),a(50,"a",11),c(51,"this article."),r()()()()(),u(52,Os,9,1,"div",3),r(),a(53,"div",12)(54,"mat-slide-toggle",13),C("change",function(d){return t.onToggleNewVersion(d.checked)}),c(55,"Show Beta Channel Integration "),r()()()()),i&2&&(p("hideSearchBox",!0)("hideSearchDropdown",!0),l(8),p("type",t.channelType.Shopee),l(6),p("type",t.channelType.Tokopedia)("disabled",t.disabled),l(10),p("type",t.channelType.Tiktok),l(7),p("type",t.channelType.WooCommerce),l(8),p("type",t.channelType.Lazada),l(6),p("type",t.channelType.Shopify),l(7),b(t.newFeatureVisible?52:-1))},dependencies:[Fe,Pe,pi,Ii],styles:["p[_ngcontent-%COMP%]{font-size:14px;font-weight:400;line-height:24.48px}"]})}}return n})();var Rt=class{constructor(){this.Host="",this.Username="",this.Password="",this.HostNotification="",this.UsernameNotification="",this.PasswordNotification="",this.ChannelInventoryOutlet="",this.OrderPaymentAmountType=0,this.ClientSecretGuid="",this.IncludeParentInventory=!1,this.IncludeChildrenInventory=!1,this.CompositeVisible=!1,this.ClientIDGuid="",this.AuthorizationMode=Gn.Legacy}};var Xe=function(n){return n[n.NONE=0]="NONE",n[n.ERROR=1]="ERROR",n[n.FULL=2]="FULL",n}(Xe||{});var xi=(()=>{class n{constructor(e){this.httpService=e}getLoader(){return this.httpService.post(Te.PosAccountGetConfig,{})}submitConfig(e){return this.httpService.post(Te.SubmitConfig,e)}testChannel(e){return this.httpService.post(Te.PosAccountTest,e)}refreshToken(e){return this.httpService.post(Te.PosAccountRemove,e)}static{this.\u0275fac=function(i){return new(i||n)(un(ye))}}static{this.\u0275prov=ge({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})();var Ms=n=>[n],Fs=()=>["/menu/channel/pos/edit"];function Rs(n,o){n&1&&(a(0,"a",17),g(1,"i",18),c(2," Edit"),r()),n&2&&p("routerLink",Wt(1,Fs))}function As(n,o){if(n&1&&(a(0,"span",20),c(1),r()),n&2){let e=h().$implicit;p("matTooltip",e.desc),l(),v(e.label)}}function Ns(n,o){if(n&1&&(k(0),u(1,As,2,2,"span",19),E()),n&2){let e=o.$implicit,i=h();l(),p("ngIf",(i.form==null?null:i.form.POSInventoryLog)==e.value)}}function Ls(n,o){if(n&1&&(a(0,"span",20),c(1),r()),n&2){let e=h().$implicit;p("matTooltip",e.desc),l(),v(e.label)}}function Ws(n,o){if(n&1&&(k(0),u(1,Ls,2,2,"span",19),E()),n&2){let e=o.$implicit,i=h();l(),p("ngIf",(i.form==null?null:i.form.ChannelInventoryLog)==e.value)}}var Ma=(()=>{class n{constructor(e,i){this.toastr=e,this.posService=i,this.form=new Rt,this.roleSetupEdit=ft.ChannelEdit,this.inventoryLogTypeOptions=[{value:Xe.NONE,label:"None",desc:"Not record any log from transaction"},{value:Xe.ERROR,label:"Error",desc:"Only record error log from transaction"},{value:Xe.FULL,label:"Full",desc:"Record all log from transaction"}],this.pageData={Title:"POS",Nav:[{Title:"Channel",Url:"/menu/channel",Active:!1},{Title:"POS",Url:"/menu/channel/config",Active:!0}]},this.initPageLoader()}initPageLoader(){this.posService.getLoader().subscribe(e=>{this.form=e.Form})}onRefreshToken(){this.posService.refreshToken(this.form).subscribe(e=>{this.toastr.success("Token has been refreshed!","Success",{closeButton:!0,positionClass:"toast-bottom-right"})})}onTestChannel(){this.posService.testChannel(this.form).subscribe(e=>{this.toastr.success("Test was successful!","Success",{closeButton:!0,positionClass:"toast-bottom-right"})})}static{this.\u0275fac=function(i){return new(i||n)(V(ae),V(xi))}}static{this.\u0275cmp=S({type:n,selectors:[["app-pos"]],standalone:!1,decls:89,vars:20,consts:[[3,"headerTitle","pageData","hideSearchBox","hideSearchDropdown"],["role","button",1,"btn","btn-outline-success","btn-lg","text-success","me-2",3,"click"],[3,"ngxPermissionsOnly"],[1,"container-fluid","mt-3"],[1,"row","mt-5"],[1,"col-md-6"],[1,"card"],[1,"card-header"],[1,"card-body","mt-8"],["matTooltipPosition","above",1,"info-label-group","w-100"],["matTooltipPosition","above",1,"info-label-group","w-100","d-flex","justify-content-between"],[1,"btn","btn-outline-success","ms-2","btn-sm",3,"click"],[1,"info-label-group"],["matTooltipPosition","above","matTooltip","Omni Inventory Webhook group by JOB ID",1,"info-label-group"],[4,"ngFor","ngForOf"],["matTooltipPosition","above","matTooltip","Omni Inventory Webhook group by Channel ID",1,"info-label-group"],["matTooltipPosition","above","matTooltip","Number of days to look back for orders",1,"info-label-group"],["role","button",1,"btn","btn-success","btn-fill","btn-lg","text-white",3,"routerLink"],[1,"fas","fa-edit",2,"font-size","20px"],["matTooltipPosition","above",3,"matTooltip",4,"ngIf"],["matTooltipPosition","above",3,"matTooltip"]],template:function(i,t){i&1&&(a(0,"mainpanel",0)(1,"actions")(2,"a",1),C("click",function(){return t.onRefreshToken()}),c(3,"Refresh Token"),r(),u(4,Rs,3,2,"ng-template",2),r(),a(5,"content")(6,"div",3)(7,"div",4)(8,"div",5)(9,"div",6)(10,"div",7)(11,"h4"),c(12,"Credentials"),r()(),a(13,"div",8)(14,"div",9)(15,"label"),c(16,"Host"),r(),a(17,"div")(18,"span"),c(19),r()()(),a(20,"div",9)(21,"label"),c(22,"Username "),a(23,"small"),c(24,"(deprecated)"),r()(),a(25,"div")(26,"span"),c(27),r()()(),a(28,"div",9)(29,"label"),c(30,"Client ID Guid "),r(),a(31,"div")(32,"span"),c(33),r()()(),a(34,"div",10)(35,"label"),c(36,"Client Secret Guid"),r(),a(37,"div")(38,"span"),c(39),r()(),a(40,"button",11),C("click",function(){return t.onTestChannel()}),c(41," Validate "),r()()()()(),a(42,"div",5)(43,"div",6)(44,"div",7)(45,"h4"),c(46,"Configuration"),r()(),a(47,"div",8)(48,"div",12)(49,"label"),c(50,"Composite Inventory"),r(),a(51,"div")(52,"span"),c(53),r()()(),a(54,"div",12)(55,"label"),c(56,"Include Parent"),r(),a(57,"div")(58,"span"),c(59),r()()(),a(60,"div",12)(61,"label"),c(62,"Include Child"),r(),a(63,"div")(64,"span"),c(65),r()()(),a(66,"div",12)(67,"label"),c(68,"Identify Order Channel by"),r(),a(69,"div")(70,"span"),c(71),r()()(),a(72,"div",13)(73,"label"),c(74,"Order Inventory Log (Job ID) Mode"),r(),a(75,"div"),u(76,Ns,2,1,"ng-container",14),r()(),a(77,"div",15)(78,"label"),c(79,"Channel Inventory Log Mode"),r(),a(80,"div"),u(81,Ws,2,1,"ng-container",14),r()(),a(82,"div",16)(83,"label"),c(84,"Order From Default Days"),r(),a(85,"div")(86,"span"),c(87),P(88,"number"),r()()()()()()()()()()),i&2&&(p("headerTitle","POS")("pageData",t.pageData)("hideSearchBox",!0)("hideSearchDropdown",!0),l(4),p("ngxPermissionsOnly",y(18,Ms,t.roleSetupEdit)),l(15),v(t.form.Host),l(8),v(t.form.Username),l(6),v(t.form.ClientIDGuid),l(6),v(t.form.ClientSecretGuid),l(14),v(t.form.CompositeVisible?"Yes":"No"),l(6),v(t.form.IncludeChildrenInventory?"Yes":"No"),l(6),v(t.form.IncludeParentInventory?"Yes":"No"),l(6),M(" ",t.form.InvoiceType==0?"Outlet":"Tag",""),l(5),p("ngForOf",t.inventoryLogTypeOptions),l(5),p("ngForOf",t.inventoryLogTypeOptions),l(6),v(G(88,16,t.form.OrderFromDefaultDays)))},dependencies:[fe,z,Fe,Pe,R,It,li],encapsulation:2})}}return n})();var Fa=n=>({empty:n});function Vs(n,o){if(n&1){let e=A();a(0,"div",18)(1,"label",19),c(2,"Include Parent"),r(),a(3,"div",20)(4,"mat-radio-group",21),me("ngModelChange",function(t){x(e);let s=h();return pe(s.form.IncludeParentInventory,t)||(s.form.IncludeParentInventory=t),D(t)}),a(5,"mat-radio-button",36),c(6," Yes "),r(),a(7,"mat-radio-button",37),c(8," No "),r()()()()}if(n&2){let e=h();l(4),de("ngModel",e.form.IncludeParentInventory),l(),p("value",!0),l(2),p("value",!1)}}function zs(n,o){if(n&1){let e=A();a(0,"div",18)(1,"label",19),c(2,"Include Child"),r(),a(3,"div",20)(4,"mat-radio-group",21),me("ngModelChange",function(t){x(e);let s=h();return pe(s.form.IncludeChildrenInventory,t)||(s.form.IncludeChildrenInventory=t),D(t)}),a(5,"mat-radio-button",38),c(6," Yes "),r(),a(7,"mat-radio-button",39),c(8," No "),r()()()()}if(n&2){let e=h();l(4),de("ngModel",e.form.IncludeChildrenInventory),l(),p("value",!0),l(2),p("value",!1)}}function Gs(n,o){if(n&1&&(k(0),a(1,"mat-radio-button",40),c(2),r(),E()),n&2){let e=o.$implicit;l(),p("value",e.value)("matTooltip",e.desc),l(),M(" ",e.label," ")}}function Bs(n,o){if(n&1&&(k(0),a(1,"mat-radio-button",40),c(2),r(),E()),n&2){let e=o.$implicit;l(),p("value",e.value)("matTooltip",e.desc),l(),M(" ",e.label," ")}}var Ra=(()=>{class n{constructor(e,i,t){this._router=e,this.toastr=i,this.posService=t,this.form=new Rt,this.passwordType="password",this.passwordIcon="eye-off",this.inventoryLogTypeOptions=[{value:Xe.NONE,label:"None",desc:"Not record any log from transaction"},{value:Xe.ERROR,label:"Error",desc:"Only record error log from transaction"},{value:Xe.FULL,label:"Full",desc:"Record all log from transaction"}],this.pageData={Title:"POS",Nav:[{Title:"Channel",Url:"/menu/channel",Active:!1},{Title:"POS",Url:"/menu/channel/config",Active:!0}]}}ngOnInit(){this.initPageLoader()}hideShowPassword(){this.passwordType=this.passwordType==="text"?"password":"text",this.passwordIcon=this.passwordIcon==="eye-off"?"eye":"eye-off"}initPageLoader(){this.posService.getLoader().subscribe(e=>{this.form=e.Form})}onSubmitHost(){this.posService.submitConfig(this.form).subscribe(e=>{this.toastr.success("Successfully Edited POS Config!","Success!"),this._router.navigate(["menu/channel"])})}static{this.\u0275fac=function(i){return new(i||n)(V(at),V(ae),V(xi))}}static{this.\u0275cmp=S({type:n,selectors:[["app-edit"]],standalone:!1,decls:75,vars:27,consts:[[3,"headerTitle","pageData","hideSearchBox","hideSearchDropdown"],["role","button","routerLink","/menu/channel/pos",1,"btn","btn-secondary","btn-fill","btn-lg","me-3"],["role","button",1,"btn","btn-success","btn-fill","btn-lg","text-white",3,"click"],[1,"container-fluid","mt-3"],[1,"row","mt-5"],[1,"col-md-6"],[1,"card"],[1,"card-header"],[1,"card-body","mt-8"],[1,"form-label-group"],["type","text","id","Host","name","Host","data-toggle","tooltip","title","Host",1,"form-control",3,"ngModelChange","ngModel"],["for","Host"],["type","text","id","Username","name","Username","data-toggle","tooltip","title","Username",1,"form-control",3,"ngModelChange","ngModel"],["for","Username"],["type","text","id","ClientIDGuid","name","ClientIDGuid","data-toggle","tooltip","title","ClientIDGuid",1,"form-control",3,"ngModelChange","ngModel"],["for","ClientIDGuid"],["type","text","id","ClientSecretGuid","name","ClientSecretGuid","data-toggle","tooltip","title","ClientSecretGuid",1,"form-control",3,"ngModelChange","ngModel"],["for","ClientSecretGuid"],[1,"form-label-group","radio"],["for","OrderPaymentAmountType"],[1,"mt-3"],[3,"ngModelChange","ngModel"],["data-toggle","tootip","title","Support composite and trigger component",1,"me-5",3,"value"],["data-toggle","tooltip","title","No support composite and trigger component",1,"me-5",3,"value"],["class","form-label-group radio",4,"ngIf"],["data-toggle","tooltip","title","Order Origin is traced via Outlet",1,"me-5",3,"value"],["data-toggle","tootip","title","Order Origin is traced via Tag",1,"me-5",3,"value"],["matTooltipPosition","above","matTooltip","Your Inventory log status",1,"form-label-group","radio",3,"ngClass"],[2,"top","-11px","background","white"],["name","InventoryLog",3,"ngModelChange","ngModel"],[4,"ngFor","ngForOf"],["matTooltipPosition","above","matTooltip","Channel Inventory log status",1,"form-label-group","radio",3,"ngClass"],["name","ChannelInventoryLog",3,"ngModelChange","ngModel"],["matTooltipPosition","above","matTooltip","Number of days to look back for orders",1,"form-label-group"],["type","text","id","OrderFromDefaultDays","name","OrderFromDefaultDays","autoNum","",1,"form-control",3,"ngModelChange","ngModel"],["for","OrderFromDefaultDays"],["data-toggle","tootip","title","include variant parent component",1,"me-5",3,"value"],["data-toggle","tooltip","title","No include variant parent component",1,"me-5",3,"value"],["data-toggle","tootip","title","Include Include variant child component",1,"me-5",3,"value"],["data-toggle","tooltip","title","No Include variant child component",1,"me-5",3,"value"],["data-toggle","tooltip",1,"me-5",3,"value","matTooltip"]],template:function(i,t){i&1&&(a(0,"mainpanel",0)(1,"actions")(2,"a",1),c(3,"Cancel"),r(),a(4,"a",2),C("click",function(){return t.onSubmitHost()}),c(5,"Save"),r()(),a(6,"content")(7,"div",3)(8,"div",4)(9,"div",5)(10,"div",6)(11,"div",7)(12,"h4"),c(13,"Credentials"),r()(),a(14,"div",8)(15,"div",9)(16,"input",10),me("ngModelChange",function(d){return pe(t.form.Host,d)||(t.form.Host=d),d}),r(),a(17,"label",11),c(18,"Host"),r()(),a(19,"div",9)(20,"input",12),me("ngModelChange",function(d){return pe(t.form.Username,d)||(t.form.Username=d),d}),r(),a(21,"label",13),c(22,"Username "),a(23,"small"),c(24,"(Deprecated)"),r()()(),a(25,"div",9)(26,"input",14),me("ngModelChange",function(d){return pe(t.form.ClientIDGuid,d)||(t.form.ClientIDGuid=d),d}),r(),a(27,"label",15),c(28,"ClientIDGuid"),r()(),a(29,"div",9)(30,"input",16),me("ngModelChange",function(d){return pe(t.form.ClientSecretGuid,d)||(t.form.ClientSecretGuid=d),d}),r(),a(31,"label",17),c(32,"ClientSecretGuid"),r()()()()(),a(33,"div",5)(34,"div",6)(35,"div",7)(36,"h4"),c(37,"Configuration"),r()(),a(38,"div",8)(39,"div",18)(40,"label",19),c(41,"Composite Inventory"),r(),a(42,"div",20)(43,"mat-radio-group",21),me("ngModelChange",function(d){return pe(t.form.CompositeVisible,d)||(t.form.CompositeVisible=d),d}),a(44,"mat-radio-button",22),c(45," Yes "),r(),a(46,"mat-radio-button",23),c(47," No "),r()()()(),u(48,Vs,9,3,"div",24)(49,zs,9,3,"div",24),a(50,"div",18)(51,"label",19),c(52,"Identify Order Channel by"),r(),a(53,"div",20)(54,"mat-radio-group",21),me("ngModelChange",function(d){return pe(t.form.InvoiceType,d)||(t.form.InvoiceType=d),d}),a(55,"mat-radio-button",25),c(56," Outlet "),r(),a(57,"mat-radio-button",26),c(58," Tag "),r()()()(),a(59,"div",27)(60,"label",28),c(61,"Inventory Log Mode"),r(),a(62,"div",20)(63,"mat-radio-group",29),me("ngModelChange",function(d){return pe(t.form.POSInventoryLog,d)||(t.form.POSInventoryLog=d),d}),u(64,Gs,3,3,"ng-container",30),r()()(),a(65,"div",31)(66,"label",28),c(67,"Channel Inventory Log Mode"),r(),a(68,"div",20)(69,"mat-radio-group",32),me("ngModelChange",function(d){return pe(t.form.ChannelInventoryLog,d)||(t.form.ChannelInventoryLog=d),d}),u(70,Bs,3,3,"ng-container",30),r()()(),a(71,"div",33)(72,"input",34),me("ngModelChange",function(d){return pe(t.form.OrderFromDefaultDays,d)||(t.form.OrderFromDefaultDays=d),d}),r(),a(73,"label",35),c(74,"Order From Default Days"),r()()()()()()()()()),i&2&&(p("headerTitle","POS Edit")("pageData",t.pageData)("hideSearchBox",!0)("hideSearchDropdown",!0),l(16),de("ngModel",t.form.Host),l(4),de("ngModel",t.form.Username),l(6),de("ngModel",t.form.ClientIDGuid),l(4),de("ngModel",t.form.ClientSecretGuid),l(13),de("ngModel",t.form.CompositeVisible),l(),p("value",!0),l(2),p("value",!1),l(2),p("ngIf",t.form.CompositeVisible),l(),p("ngIf",t.form.CompositeVisible),l(5),de("ngModel",t.form.InvoiceType),l(),p("value",0),l(2),p("value",1),l(2),p("ngClass",y(23,Fa,t.form==null?null:t.form.POSInventoryLog)),l(4),de("ngModel",t.form.POSInventoryLog),l(),p("ngForOf",t.inventoryLogTypeOptions),l(),p("ngClass",y(25,Fa,t.form==null?null:t.form.ChannelInventoryLog)),l(4),de("ngModel",t.form.ChannelInventoryLog),l(),p("ngForOf",t.inventoryLogTypeOptions),l(2),de("ngModel",t.form.OrderFromDefaultDays))},dependencies:[L,fe,z,Oe,H,wt,Fe,Ue,je,Pe,R,io],styles:[".passwordIcon[_ngcontent-%COMP%]{top:1.5rem;right:1rem;position:absolute;margin:0 auto!important;cursor:pointer}"]})}}return n})();var Hs=[{path:"",component:mo,children:[{path:"",redirectTo:"marketplace",pathMatch:"full"},{path:"marketplace",component:Uo,canActivate:[dt],data:{title:"List"}},{path:"marketplace/form",component:Si,canActivate:[dt],data:{title:"Add new Channel"}},{path:"marketplace/view",component:Ti,canActivate:[dt],data:{title:"Marketplace View"}},{path:"marketplace/add",component:Pa,canActivate:[dt],data:{title:"Marketplace Add"}},{path:"pos",component:Ma,canActivate:[dt],data:{title:"POS"}},{path:"pos/edit",component:Ra,canActivate:[dt],data:{title:"POS Edit"}},{path:"flush_cache",loadComponent(){return import("./chunk-Z5GRNGHJ.js").then(n=>n.FlushCacheComponent)},canActivate:[dt],data:{title:"Flush Cache"}}]}],Aa=(()=>{class n{static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275mod=tt({type:n})}static{this.\u0275inj=et({imports:[I,rt.forChild(Hs)]})}}return n})();var M0=(()=>{class n{static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275mod=tt({type:n})}static{this.\u0275inj=et({providers:[q],imports:[I,lt,Hn,Dt,Ae,Y,te,Aa,rt,Wo,Ci,eo,to,hi,W,mi,Gt.forChild(),di,Ii,Ti,Si,Gt]})}}return n})();export{M0 as ChannelsModule};
|