dealpos 25.47.1 → 25.48.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.
Files changed (105) hide show
  1. package/browser/{chunk-QBOUUDFD.js → chunk-2IIAMAC2.js} +1 -1
  2. package/browser/{chunk-S7Y36REW.js → chunk-2LYXOQ5N.js} +1 -1
  3. package/browser/{chunk-ICXY7J4B.js → chunk-32RSQ3UU.js} +1 -1
  4. package/browser/{chunk-L72RFTBD.js → chunk-3KNGE65M.js} +1 -1
  5. package/browser/{chunk-JYJW5KAE.js → chunk-3L267ZNV.js} +1 -1
  6. package/browser/{chunk-UNJ5ELA7.js → chunk-3THWKHRL.js} +1 -1
  7. package/browser/{chunk-NWDPSH4M.js → chunk-47T7IWRR.js} +3 -3
  8. package/browser/{chunk-GOZ7JJVG.js → chunk-4AKG7BSF.js} +1 -1
  9. package/browser/{chunk-7FC2PJIW.js → chunk-4IQRI3GN.js} +1 -1
  10. package/browser/{chunk-GSAGOZJT.js → chunk-4KMRZ2TB.js} +1 -1
  11. package/browser/{chunk-F45DK6HY.js → chunk-4RKRHCPA.js} +1 -1
  12. package/browser/{chunk-RPMSR2S2.js → chunk-4XGRIAZ2.js} +1 -1
  13. package/browser/chunk-54W52P5V.js +3 -0
  14. package/browser/{chunk-FUYOSIW5.js → chunk-55K6ABR7.js} +1 -1
  15. package/browser/chunk-56J3O2YI.js +14 -0
  16. package/browser/{chunk-7LCG4V47.js → chunk-5S5ZFAPJ.js} +1 -1
  17. package/browser/chunk-5WZX5UDC.js +1 -0
  18. package/browser/{chunk-V3PWVI2B.js → chunk-63AFDUIT.js} +13 -13
  19. package/browser/{chunk-347WKSZO.js → chunk-6BKNXERF.js} +1 -1
  20. package/browser/{chunk-QDCZBCN5.js → chunk-722XQJ5H.js} +1 -1
  21. package/browser/{chunk-R5SLRG5P.js → chunk-7TWRUF3H.js} +1 -1
  22. package/browser/chunk-7XC4XIHR.js +1 -0
  23. package/browser/chunk-A4H6IBC3.js +1 -0
  24. package/browser/{chunk-5RTCTJUG.js → chunk-AE6CDP2N.js} +1 -1
  25. package/browser/{chunk-DUJXPJ4P.js → chunk-AKFNDMFE.js} +2 -2
  26. package/browser/{chunk-ADC6Y4AB.js → chunk-BMSRWGKX.js} +1 -1
  27. package/browser/{chunk-TRYMZNEH.js → chunk-BNYVOYYX.js} +1 -1
  28. package/browser/{chunk-NU7GDZKC.js → chunk-BTJPSMLV.js} +1 -1
  29. package/browser/{chunk-P3SYBLK4.js → chunk-CA6YBQT3.js} +1 -1
  30. package/browser/{chunk-A56Z62HU.js → chunk-CJII6RPH.js} +1 -1
  31. package/browser/{chunk-L5QFOKO7.js → chunk-CWFUNJQI.js} +1 -1
  32. package/browser/{chunk-CPCDU4HM.js → chunk-DFUQ53YY.js} +1 -1
  33. package/browser/chunk-DSF34FWR.js +131 -0
  34. package/browser/{chunk-DQYDWBIK.js → chunk-ECEHKAWW.js} +1 -1
  35. package/browser/{chunk-D3BHSTT2.js → chunk-FUS5ABYT.js} +1 -1
  36. package/browser/{chunk-O5OL3MSI.js → chunk-H44MWYXB.js} +3 -3
  37. package/browser/{chunk-OBEXYNUM.js → chunk-HEPRCWZT.js} +1 -1
  38. package/browser/{chunk-2ZXSQTN3.js → chunk-HQMGZB3H.js} +1 -1
  39. package/browser/{chunk-BE4SGNNY.js → chunk-HYURPMUC.js} +1 -1
  40. package/browser/{chunk-DT6QJWPF.js → chunk-IMVZUGYH.js} +1 -1
  41. package/browser/chunk-IPKXGQTW.js +1 -0
  42. package/browser/{chunk-FUKBIYWZ.js → chunk-K5L5HMWR.js} +1 -1
  43. package/browser/{chunk-IJ6NUPJY.js → chunk-KVE6HTDK.js} +1 -1
  44. package/browser/chunk-KWKY5NGW.js +149 -0
  45. package/browser/{chunk-QCMMZ67T.js → chunk-KY577SRX.js} +1 -1
  46. package/browser/{chunk-Y4LWALJN.js → chunk-L7CBHHVQ.js} +3 -3
  47. package/browser/{chunk-4VFIXDGC.js → chunk-LB7NU42O.js} +1 -1
  48. package/browser/{chunk-IIDCCGRC.js → chunk-LPWVUN75.js} +1 -1
  49. package/browser/{chunk-HI65LAJQ.js → chunk-LS5TMLIT.js} +1 -1
  50. package/browser/{chunk-2BWSGD3Z.js → chunk-MNVLPMSI.js} +1 -1
  51. package/browser/{chunk-337Y6LKZ.js → chunk-MNZTXNPB.js} +1 -1
  52. package/browser/{chunk-77V3KNIS.js → chunk-MYKOQWDM.js} +1 -1
  53. package/browser/{chunk-N3HGHV2Q.js → chunk-MZIYTJ6Z.js} +1 -1
  54. package/browser/{chunk-XUDYAWGP.js → chunk-NCLOGMP4.js} +1 -1
  55. package/browser/{chunk-5IW47S5R.js → chunk-ND6K5DYL.js} +1 -1
  56. package/browser/chunk-NFAOMT2P.js +4 -0
  57. package/browser/{chunk-5O2O7IB4.js → chunk-NS7V266J.js} +1 -1
  58. package/browser/{chunk-DP3IHIJG.js → chunk-NVYVELCF.js} +3 -3
  59. package/browser/{chunk-TV76G36W.js → chunk-OBXCVFDY.js} +1 -1
  60. package/browser/{chunk-FUZD2YUG.js → chunk-OK5EBIMF.js} +10 -10
  61. package/browser/{chunk-3ZL5OQ6Y.js → chunk-P3LNLMNH.js} +1 -1
  62. package/browser/{chunk-Y3AE3TKV.js → chunk-P43N5BDV.js} +1 -1
  63. package/browser/{chunk-KSDWEFU5.js → chunk-Q6KWA7ML.js} +1 -1
  64. package/browser/{chunk-WPMZWFSL.js → chunk-QHNGMJWX.js} +1 -1
  65. package/browser/chunk-QPMF6WP7.js +1 -0
  66. package/browser/{chunk-QECDT5UJ.js → chunk-QQDH2U6C.js} +1 -1
  67. package/browser/{chunk-PGVKBOVV.js → chunk-QQXPISMR.js} +1 -1
  68. package/browser/{chunk-4QU3FQ4H.js → chunk-R3BLOGD6.js} +1 -1
  69. package/browser/{chunk-TWX33MAO.js → chunk-RFCZ4NNF.js} +1 -1
  70. package/browser/{chunk-6OSOTMIF.js → chunk-RKBLZASG.js} +1 -1
  71. package/browser/{chunk-CZIC4DAI.js → chunk-S5HK3JOC.js} +1 -1
  72. package/browser/{chunk-NJGJFNQG.js → chunk-SDRB6Y54.js} +1 -1
  73. package/browser/chunk-UGCO74DQ.js +1 -0
  74. package/browser/{chunk-R4JXP55V.js → chunk-UJTEC3AC.js} +1 -1
  75. package/browser/{chunk-ERJKTHMS.js → chunk-V4KJNBS7.js} +1 -1
  76. package/browser/{chunk-T6RHBYOY.js → chunk-VC7J7CSQ.js} +1 -1
  77. package/browser/{chunk-NDFDMJU2.js → chunk-VXHN6MWB.js} +1 -1
  78. package/browser/chunk-WCCWWFYE.js +1 -0
  79. package/browser/{chunk-I6RQW6MV.js → chunk-WWQSFAIE.js} +1 -1
  80. package/browser/{chunk-SXAXSC44.js → chunk-YFRQWQ66.js} +1 -1
  81. package/browser/chunk-YJFCUHVH.js +1 -0
  82. package/browser/{chunk-M326IFGL.js → chunk-YOIV5LCG.js} +1 -1
  83. package/browser/{chunk-T7DUQW7O.js → chunk-YRDGEYIV.js} +1 -1
  84. package/browser/{chunk-XZ7GA7NR.js → chunk-YUTT2QKH.js} +1 -1
  85. package/browser/{chunk-QIFLQIWQ.js → chunk-YWDEOTPR.js} +1 -1
  86. package/browser/chunk-YYGLCUQ6.js +4 -0
  87. package/browser/{chunk-IHCO2JK3.js → chunk-Z2CO5BFP.js} +1 -1
  88. package/browser/{chunk-FT2CPNDK.js → chunk-ZEIM63JO.js} +1 -1
  89. package/browser/{chunk-V2HVL2JW.js → chunk-ZNIIYEEO.js} +4 -4
  90. package/browser/index.html +2 -2
  91. package/browser/{main-O34B6LHF.js → main-7GOIEWD6.js} +2 -2
  92. package/package.json +1 -1
  93. package/browser/chunk-3PWKXRXD.js +0 -14
  94. package/browser/chunk-5ZMTBZT3.js +0 -1
  95. package/browser/chunk-6BCNB44A.js +0 -1
  96. package/browser/chunk-75OKQPDZ.js +0 -4
  97. package/browser/chunk-7DG3RSHK.js +0 -1
  98. package/browser/chunk-AS5WHW7W.js +0 -1
  99. package/browser/chunk-BFLDH5QM.js +0 -1
  100. package/browser/chunk-CC2THS3J.js +0 -131
  101. package/browser/chunk-EZRYO7BE.js +0 -1
  102. package/browser/chunk-GEIEF2RB.js +0 -1
  103. package/browser/chunk-HEIZUI6B.js +0 -149
  104. package/browser/chunk-P3RYBCCQ.js +0 -4
  105. package/browser/chunk-SMUNI47Q.js +0 -3
@@ -1 +1 @@
1
- import{a as Pe}from"./chunk-GOZ7JJVG.js";import{a as Ce}from"./chunk-AFBBEIKR.js";import{a as _e}from"./chunk-7LCG4V47.js";import{a as be}from"./chunk-JUS6LLVX.js";import{b as Se,c as Me}from"./chunk-C4WJKF7R.js";import{a as de}from"./chunk-RLQLFW36.js";import"./chunk-EQLHPWVB.js";import"./chunk-NWSIPELM.js";import{F as ge,b as me,h as fe,o as he}from"./chunk-RNLSEEMX.js";import{a as T,c as f}from"./chunk-77V3KNIS.js";import{a as ve}from"./chunk-DQYDWBIK.js";import{a as M,d as I}from"./chunk-USJ6ILEE.js";import{a as pe}from"./chunk-P3RYBCCQ.js";import{$ as q,$d as G,Ab as F,Bb as V,Bc as ie,Cb as h,Db as o,Dc as ne,E,Eb as s,Fb as p,Ob as C,Qb as Z,Sa as Y,Vd as ae,Xa as c,Xd as se,Yd as b,Zd as le,_d as ce,ac as K,be as ue,cc as $,cd as re,d as J,da as D,db as v,dc as m,ec as B,fc as z,hb as W,ib as x,la as d,ma as y,oa as _,pa as l,pc as X,rd as oe,tb as Q,uc as ee,vc as te,zb as j}from"./chunk-JYZTRN6N.js";import"./chunk-WFMAM73Y.js";import"./chunk-SNAKHGZS.js";var r=class e{constructor(i,t){this.authService=i;this.router=t}canLoad(i,t){return this.authService.isTokenExpired()?(this.authService.returnUrl=this.getUrlRedirect(t),this.router.navigate(["/"]),!1):!0}getUrlRedirect(i){let t="/menu";i.forEach(a=>t+=`/${a.path}`);let n=this.router.currentNavigation().extractedUrl.queryParams;return Object.keys(n).forEach((a,g)=>{g==0?t=`${t}?${a}=${n[a]}`:t=`${t}&${a}=${n[a]}`}),t}static \u0275fac=function(t){return new(t||e)(_(f),_(b))};static \u0275prov=d({token:e,factory:e.\u0275fac,providedIn:"root"})};var w=class e{constructor(i){this.toastrService=i;this.initPermissionToastr=!1}isPermissionGranted;initPermissionToastr;initPermission(){try{this.initPermissionToastr||Notification.requestPermission().then(t=>{this.isPermissionGranted=!1,t=="granted"&&(this.isPermissionGranted=!0),this.initPermissionToastr=!0})}catch(i){console.error(i)}}showAlert(i,t,n,u){let a=6e4;if(this.isPermissionGranted)try{let g=new Notification(t,{body:i,icon:u});g.onerror=(N=>{this.toastrService.info(this.setBody(i,n),t,{timeOut:a,enableHtml:this.hasUrl(n)})})}catch(g){console.error(g)}else this.toastrService.info(this.setBody(i,n),t,{timeOut:a,enableHtml:this.hasUrl(n)})}setBody(i,t){return this.hasUrl(t)&&(i=`<a href="${t}" target="_blank" class="ps-0">${i}</a>`),i}hasUrl(i){return!!(i&&i.length!==0)}static \u0275fac=function(t){return new(t||e)(_(ue))};static \u0275prov=d({token:e,factory:e.\u0275fac,providedIn:"root"})};var Oe=[{T:"Dashboard",U:"/menu/Dashboard",I:"fa-solid fa-chart-pie"},{T:"Products",U:"/menu/Products",I:"fa-solid fa-tag"},{T:"Estimate",U:"/menu/Estimate",I:"fa-solid fa-clipboard"},{T:"Sell",U:"/menu/Sell",I:"fa-solid fa-cart-shopping"},{T:"Shift",U:"/menu/Shift/",I:"fa-solid fa-user-clock"},{T:"Reports",U:"/menu/Reports",I:"fa-solid fa-chart-area"},{T:"Contacts",U:"/menu/Contacts",I:"fas fa-address-book"},{T:"Orders",U:"/menu/Orders",I:"fas fa-file-invoice"},{T:"Payment",U:"/menu/Payment",I:"fas fa-money-bill-alt"},{T:"Debt",U:"/menu/Debt",I:"fas fa-dollar-sign"},{T:"Inventory",U:"/menu/Inventory",I:"fas fa-archive"},{T:"Adjustment",U:"/menu/Adjustment",I:"fas fa-scanner-gun"},{T:"Buy",U:"/menu/Buy",I:"fa-solid fa-cart-arrow-down"},{T:"Logistics",U:"/menu/Logistics",I:"fas fa-truck"},{T:"Fulfillment",U:"/menu/Fulfillment",I:"fas fa-dolly"},{T:"Manufacture",U:"/menu/Manufacture",I:"fas fa-industry"},{T:"Prepaid Package",U:"/menu/Prepaid_Package",I:"fa-solid fa-id-card"},{T:"Promotion",U:"/menu/Promotion",I:"fas fa-bullhorn"},{T:"Users",U:"/menu/Users",I:"fas fa-user"},{T:"Outlets",U:"/menu/Outlets",I:"fas fa-map-marker-alt"},{T:"Setup",U:"/menu/Setup",I:"fas fa-gear"},{T:"Developer",U:"/menu/Developer",I:"fas fa-code"}];var k=class e{role=l(I);authService=l(f);menu=Oe;filteredMenu=[];initFilteredMenu(){this.filteredMenu=this.menu.filter(i=>i.T==="Dashboard"?this.role.dashboard.View:i.T==="Products"?this.role.product.View:i.T==="Estimate"?this.role.estimate.Create:i.T==="Sell"?this.role.sell.Create:i.T==="Shift"?this.role.sell.Create:i.T==="Reports"?this.role.report.View:i.T==="Contacts"?this.role.contact.View:i.T==="Orders"?this.role.order.View:i.T==="Payment"?this.role.payment.View:i.T==="Debt"?this.role.debt.View:i.T==="Inventory"?this.role.inventory.View:i.T==="Adjustment"?this.role.adjustment.View:i.T==="Buy"?this.role.buy.Create:i.T==="Logistics"?this.role.logistic.View:i.T==="Manufacture"?this.role.manufacture.View:i.T==="Fulfillment"?this.role.fulfillment.View:i.T==="Prepaid Package"?this.role.prepaidPackage.View:i.T==="Promotion"?this.role.promotion.View:i.T==="Users"?this.role.users.View:i.T==="Outlets"?this.role.outlets.View:i.T==="Setup"?this.role.setup.View:i.T==="Developer"?this.role.developer.View:!0),this.filterBySubscriptionStatus()}filterBySubscriptionStatus(){let i=this.authService.getSubscriptionStatus();this.filteredMenu=this.filteredMenu.filter(t=>{switch(i){case 2:return t.T=="Sell"||t.T=="Shift";case 3:return!1;default:return!0}})}static \u0275fac=function(t){return new(t||e)};static \u0275prov=d({token:e,factory:e.\u0275fac,providedIn:"root"})};var ye=[{T:"My Profile",U:"Profile/Main/My_Profile",I:"fas fa-user"},{T:"My Subscription",U:"Profile/Main/My_Subscription",I:"fa-solid fa-credit-card"},{T:"Notification",U:"Profile/Notification/Push",I:"fas fa-bell"},{T:"My Sales",U:"Profile/Main/My_Sales",I:"fas fa-history"}];var A=class e{role=l(I);authService=l(f);filteredMenu=[];initFilteredMenu(){let i=this.authService.getSubscriptionStatus();this.filteredMenu=ye.filter(t=>t.T=="My Profile"?this.role.profile.View:t.T=="My Subscription"?this.role.profile.Subscription:t.T=="Notification"?this.role.profile.Notification&&i!=2&&i!=3:t.T=="My Sales"?i!=2&&i!=3:!0)}static \u0275fac=function(t){return new(t||e)};static \u0275prov=d({token:e,factory:e.\u0275fac,providedIn:"root"})};var Le=(e,i)=>({"full-container":e,"subscription-bar-visible":i}),Re=e=>[e];function Ne(e,i){if(e&1&&(o(0,"a",11),p(1,"i",35),o(2,"span"),m(3),s()()),e&2){let t=i.$implicit;h("routerLink",t==null?null:t.U),c(),$((t==null?null:t.I)+" me-2"),c(2),B(t==null?null:t.T)}}function Ee(e,i){if(e&1&&(o(0,"li",33,0)(2,"a",36),p(3,"i"),o(4,"p"),m(5),s()()()),e&2){let t=i.$implicit,n=Z();h("routerLinkActiveOptions",n.isActiveMatchOptions),Q("data-cy",t==null?null:t.T),c(2),h("matTooltip",n.toggleSideMenu?t==null?null:t.T:"")("routerLink",ee(7,Re,t==null?null:t.U)),c(),$(t==null?null:t.I),c(2),B(t==null?null:t.T)}}var P=class e{constructor(i,t,n,u,a,g,N,H){this.toggleSidebar=i;this.signalRClientService=t;this.notificationAlertService=n;this.router=u;this.authService=a;this.intercomService=g;N.initFilteredMenu(),H.initFilteredMenu(),this.leftSidebarMenu=N.filteredMenu,this.topMenu=H.filteredMenu,this.accountInfo=JSON.parse(localStorage.getItem("AccountInfo")),this.toggleSidebar.toggleState$.subscribe(Te=>this.isNavOpen=Te),this.destroy$=new J,this.initNotificationPermission()}isActiveMatchOptions={matrixParams:"subset",queryParams:"subset",paths:"subset",fragment:"exact"};toggleSideMenu=!1;isNavOpen;destroy$;activeMenu;appVersion=pe.version;currentSubStatus;subsStatusEnum=T;isFullContainer=!1;isHideIntercomLauncher;leftSidebarMenu;topMenu;accountInfo;ngOnInit(){this.subscribeToPushNotification(),this.getCurrentSubscriptionStatus(),this.initFullContainer()}initFullContainer(){this.router.events.pipe(E(i=>i instanceof ae),q(null),D(this.destroy$)).subscribe(i=>{this.isFullContainer=!1,(this.router.url.includes("Sell")&&!this.router.url.includes("v2")&&!this.router.url.includes("Offline")||this.router.url.includes("Buy")||this.router.url.includes("menu/Estimate")||this.router.url.includes("Transfer_Order/Form")||this.router.url.includes("Adjustment/Archive/Form")||this.router.url.includes("Job_Order/Archive/Form")||this.router.url.includes("/menu/Debt/Debt/Join_Invoice/Form")||this.router.url.includes("/menu/Debt/Debt/Join_Bill/New_Join_Bill"))&&(this.isFullContainer=!0)})}initNotificationPermission(){this.notificationAlertService.initPermission()}getCurrentSubscriptionStatus(){this.currentSubStatus=this.authService.getSubscriptionStatus()}subscribeToPushNotification(){let i=localStorage.getItem("NotificationOutletID");M.IsNotEmpty(i)&&M.isGuid(i)?this.signalRClientService.SubscribeGroup(i):this.signalRClientService.startConnection(),this.signalRClientService.OnReceivePushNotification.pipe(D(this.destroy$),E(t=>M.IsNotEmpty(t))).subscribe(t=>{if(M.IsNotEmpty(t)){let n=JSON.parse(t),u="https://cdn.dealpos.xyz/web-image/info-new.png";M.IsNotEmpty(n.Icon)&&(u=n.Icon),this.notificationAlertService.showAlert(n.Body,n.Header,n.URL,u)}})}ngAfterViewInit(){this.intercomService.inititalizeIntercom()}toggleMenu(){this.toggleSideMenu=!this.toggleSideMenu}logout(){this.authService.logout()}isNotEmpty(i){return M.IsNotEmpty(i)}onShowDropdown(){this.isHideIntercomLauncher=this.intercomService.isHideLauncher()}chatToggleChange(){this.isHideIntercomLauncher==!1?this.intercomService.hideLauncher():this.intercomService.showLauncher(),this.onShowDropdown()}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}static \u0275fac=function(t){return new(t||e)(v(be),v(de),v(w),v(b),v(f),v(ve),v(k),v(A))};static \u0275cmp=W({type:e,selectors:[["POS-menu-master"]],standalone:!1,decls:54,vars:17,consts:[["rla","routerLinkActive"],[1,"wrapper"],["data-color","blue",1,"sidebar",3,"ngClass"],[1,"btn-minimize","d-lg-block","d-none","p-0","border-0","bg-white",3,"click"],[1,"fa-solid",3,"ngClass"],[1,"logo"],[1,"navbar","dropdown","bg-transparent","border-0"],["data-cy","companyName","data-bs-toggle","dropdown","aria-expanded","false","matTooltipPosition","above",1,"simple-text","text-start","dropdown-toggle","d-flex","align-items-center","justify-content-center",2,"cursor","pointer",3,"click","matTooltip"],[1,"dropdown-menu"],[1,"dropdown-header","text-dark","border-bottom"],[1,"divider","m-0"],[1,"dropdown-item","h5",3,"routerLink"],[1,"dropdown-item","h5",2,"cursor","pointer"],[1,"d-flex","align-items-center","justify-content-between"],[1,"fa-solid","fa-comment-dots","me-2"],[1,"checkbox_toggle","ms-3",3,"click"],["type","checkbox","id","chatToggle","name","ChatToggle",3,"ngModelChange","ngModel"],["for","chatToggle",1,"position-relative","rounded-pill","pointer"],[1,"dropdown-item","h5",2,"cursor","pointer",3,"click"],["aria-hidden","true",1,"fa-solid","fa-sign-out-alt","me-2"],[1,"divider"],[1,"dropdown-header","border-top"],["target","_blank",1,"dropdown-item","h5","changelog",3,"href"],["aria-hidden","true",1,"fa-solid","fa-sparkles","me-2"],[1,"fa-solid","fa-circle-exclamation","ms-2",2,"font-size","16px"],["target","_blank","href","http://support.dealpos.com",1,"dropdown-item","h5"],["aria-hidden","true",1,"fa-solid","fa-book","me-2"],["target","_blank","href","https://www.dealpos.app/",1,"dropdown-item","h5"],["aria-hidden","true",1,"fa-solid","fa-table-cells-large","me-2"],["target","_blank","href","http://blog.dealpos.com",1,"dropdown-item","h5"],["aria-hidden","true",1,"fa-brands","fa-blogger","me-2"],[1,"sidebar-wrapper"],[1,"nav"],["routerLinkActive","active",3,"routerLinkActiveOptions"],["id","full-container",1,"main-panel",3,"ngClass"],["aria-hidden","true"],["matTooltipPosition","above",1,"nav-link","position-relative","d-block",3,"matTooltip","routerLink"]],template:function(t,n){t&1&&(o(0,"div",1)(1,"div",2)(2,"button",3),C("click",function(){return n.toggleMenu()}),p(3,"i",4),s(),o(4,"div",5)(5,"div",6)(6,"a",7),C("click",function(){return n.onShowDropdown()}),m(7),ie(8,"limitText"),s(),o(9,"div",8)(10,"div",9),m(11),s(),p(12,"div",10),F(13,Ne,4,4,"a",11,j),o(15,"a",12)(16,"div",13)(17,"div"),p(18,"i",14),o(19,"span"),m(20,"Chat Support"),s()(),o(21,"div",15),C("click",function(a){return a.stopPropagation()}),o(22,"input",16),C("ngModelChange",function(){return n.chatToggleChange()}),s(),p(23,"label",17),s()()(),o(24,"a",18),C("click",function(){return n.logout()}),p(25,"i",19),o(26,"span"),m(27,"Log Out"),s()(),p(28,"div",20),o(29,"div",21),m(30," Links "),s(),o(31,"a",22),p(32,"i",23),o(33,"span"),m(34,"What's New"),p(35,"i",24),s()(),o(36,"a",25),p(37,"i",26),o(38,"span"),m(39,"Help Center"),s()(),o(40,"a",27),p(41,"i",28),o(42,"span"),m(43,"App Store"),s()(),o(44,"a",29),p(45,"i",30),o(46,"span"),m(47,"Company Blog"),s()()()()(),o(48,"div",31)(49,"ul",32),F(50,Ee,6,9,"li",33,j),s()()(),o(52,"div",34),p(53,"router-outlet"),s()()),t&2&&(K("nav-open",n.isNavOpen),c(),h("ngClass",n.toggleSideMenu?"collapses":""),c(2),h("ngClass",n.toggleSideMenu?"fa-angle-left cursor":"fa-angle-right cursor"),c(3),h("matTooltip",n.accountInfo==null?null:n.accountInfo.BrandName),c(),z(" ",ne(8,11,n.accountInfo==null?null:n.accountInfo.BrandName,12)," "),c(4),z("",n.accountInfo==null?null:n.accountInfo.UserName," "),c(2),V(n.topMenu),c(9),h("ngModel",!n.isHideIntercomLauncher),c(9),h("href",X("https://changelog.dealpos.com/?categories=cat_gAZdRhBYU7QVl&view=complete&v=",n.appVersion),Y),c(19),V(n.leftSidebarMenu),c(2),h("ngClass",te(14,Le,n.isFullContainer,n.isNotEmpty(n.currentSubStatus)&&n.currentSubStatus!==n.subsStatusEnum.PAID)))},dependencies:[Se,se,le,ce,me,fe,he,re,Ce],styles:['.sidebar[_ngcontent-%COMP%] .nav[_ngcontent-%COMP%] li[_ngcontent-%COMP%] .nav-link[_ngcontent-%COMP%], body[_ngcontent-%COMP%] > .navbar-collapse[_ngcontent-%COMP%] .nav[_ngcontent-%COMP%] li[_ngcontent-%COMP%] .nav-link[_ngcontent-%COMP%]{padding:10px 0 10px 10px!important}.sidebar-wrapper[_ngcontent-%COMP%]{max-height:calc(100% - 61px)!important;min-height:calc(100% - 61px)!important}@media (max-width: 991px){.sidebar-wrapper[_ngcontent-%COMP%]{overflow-y:scroll!important}}@media (pointer: coarse){.sidebar-wrapper[_ngcontent-%COMP%]{overflow-y:scroll!important}}@media (max-width: 468px){.navbar[_ngcontent-%COMP%] .navbar-brand[_ngcontent-%COMP%]{white-space:nowrap;max-width:7em;overflow:hidden;text-overflow:ellipsis}}@media only screen and (min-width: 992px){.sidebar[_ngcontent-%COMP%]{z-index:1050!important;transition:all .3s}.sidebar[_ngcontent-%COMP%] .sidebar-wrapper[_ngcontent-%COMP%]{transition:all .3s}.sidebar[_ngcontent-%COMP%] + .main-panel[_ngcontent-%COMP%]{transition:all .3s}.sidebar[_ngcontent-%COMP%] + .main-panel[_ngcontent-%COMP%] .navbar.fixed-top[_ngcontent-%COMP%]{transition:all .3s}.sidebar.collapses[_ngcontent-%COMP%], .sidebar.collapses[_ngcontent-%COMP%] .sidebar-wrapper[_ngcontent-%COMP%]{width:70px;transition:all .3s}.sidebar.collapses[_ngcontent-%COMP%] .logo[_ngcontent-%COMP%] .simple-text[_ngcontent-%COMP%]{background-color:#ffffff3b;border-radius:20px;height:40px;width:40px}.sidebar.collapses[_ngcontent-%COMP%] .nav[_ngcontent-%COMP%] li[_ngcontent-%COMP%] .nav-link[_ngcontent-%COMP%]{padding:10px 0 10px 10px!important;height:50px;text-align:center;margin:10px}.sidebar.collapses[_ngcontent-%COMP%] .nav[_ngcontent-%COMP%] li[_ngcontent-%COMP%] .nav-link[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{display:none}.sidebar.collapses[_ngcontent-%COMP%] + .main-panel[_ngcontent-%COMP%]{padding-left:70px}.sidebar.collapses[_ngcontent-%COMP%] + .main-panel[_ngcontent-%COMP%] .navbar.fixed-top[_ngcontent-%COMP%]{left:70px!important;transition:all .3s}.sidebar[_ngcontent-%COMP%] .btn-minimize[_ngcontent-%COMP%]{position:absolute;top:17px;right:-20px;z-index:7;-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg);border-radius:50%;box-shadow:0 0 0 1px #091e4214,0 2px 4px 1px #091e4214;color:#000;cursor:pointer;height:24px;opacity:0;outline:0;width:24px;-webkit-transform-origin:7px;-ms-transform-origin:7px;transform-origin:7px;transition:opacity .5s;-webkit-transition:opacity .5s}.sidebar[_ngcontent-%COMP%] .btn-minimize[_ngcontent-%COMP%]:hover{color:#2996cc}.sidebar[_ngcontent-%COMP%]:hover .btn-minimize[_ngcontent-%COMP%]{opacity:1;background-color:#fff;position:absolute;top:17px;right:-20px;z-index:7;-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg);border:0;border-radius:50%;box-shadow:0 0 0 1px #091e4214,0 2px 4px 1px #091e4214;color:#000;cursor:pointer;height:24px;opacity:0;outline:0;padding:0;width:24px;-webkit-transform-origin:7px;-ms-transform-origin:7px;transform-origin:7px;transition:opacity .5s;-webkit-transition:opacity .5s}.sidebar[_ngcontent-%COMP%]:hover .btn-minimize[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{cursor:pointer}.sidebar[_ngcontent-%COMP%]:hover .btn-minimize[_ngcontent-%COMP%]:hover{color:#2996cc}.sidebar[_ngcontent-%COMP%]:hover:hover .btn-minimize[_ngcontent-%COMP%]{opacity:1}}.full-container[_ngcontent-%COMP%]{padding-top:0!important}.changelog[_ngcontent-%COMP%]{color:#0006b1!important}.changelog[_ngcontent-%COMP%]:visited{color:#2e2e2e!important}.changelog[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{position:relative}.changelog[_ngcontent-%COMP%] span[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{color:#fe3a00!important;position:absolute;top:-4px;right:-18px}.changelog[_ngcontent-%COMP%]:visited span[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{color:#fff!important;position:absolute;top:-4px;right:-18px}.changelog[_ngcontent-%COMP%]:visited:hover span[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{color:#e9ecef!important;position:absolute;top:-4px;right:-18px}.subscription-bar-visible[_ngcontent-%COMP%]{padding-top:98px}.checkbox_toggle[_ngcontent-%COMP%]{position:relative}.checkbox_toggle[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:#868686;display:inline-block;padding-right:38px}.checkbox_toggle[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{width:23px;height:14px;background-color:#ccc;top:2.2px;right:0}.checkbox_toggle[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%]{display:none}.checkbox_toggle[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%]:checked + label[_ngcontent-%COMP%]{background-color:#1f77d0}.checkbox_toggle[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%]:checked + label[_ngcontent-%COMP%]:after{left:10px}.checkbox_toggle[_ngcontent-%COMP%] label[_ngcontent-%COMP%]:after{content:"";width:12px;height:12px;border-radius:50%;position:absolute;top:.8px;left:1px;transition:all .1s;background-color:#fff}']})};function De(e){let i=l(b),t="/menu";e.forEach(a=>t+=`/${a.path}`);let n=i.currentNavigation().extractedUrl.queryParams;return Object.keys(n).forEach((a,g)=>{g==0?t=`${t}?${a}=${n[a]}`:t=`${t}&${a}=${n[a]}`}),t}var O=(e,i)=>{let t=l(f),n=t.isTokenExpired(),u=l(b);return n?(t.returnUrl=De(i),u.navigate(["/"]),!1):e.path=="Dashboard"?je():!0};function je(){let e=l(b),i=l(f),t=!1,n=i.getRedirectUrl();return t=n.includes("Dashboard"),t==!1&&e.navigate([n]),t}var U=class e{paymentStorageService=l(Pe);canActivate(i,t){return this.paymentStorageService.clear(),!0}static \u0275fac=function(t){return new(t||e)};static \u0275prov=d({token:e,factory:e.\u0275fac,providedIn:"root"})};var L=class e{reportService=l(_e);canActivate(i,t){return this.reportService.resetFilter(),!0}static \u0275fac=function(t){return new(t||e)};static \u0275prov=d({token:e,factory:e.\u0275fac,providedIn:"root"})};var Fe=[{path:"",component:P,children:[{path:"Inventory",loadChildren:()=>import("./chunk-2ZXSQTN3.js").then(e=>e.InventoryModule),canLoad:[r]},{path:"Reports",loadChildren:()=>import("./chunk-CC2THS3J.js").then(e=>e.ReportsModule),canLoad:[r],canActivate:[L]},{path:"Sell",loadChildren:()=>import("./chunk-V3PWVI2B.js").then(e=>e.routes),canLoad:[r]},{path:"Print",loadChildren:()=>import("./chunk-AVTYR2I6.js").then(e=>e.PrintModule),canLoad:[r]},{path:"Buy",loadComponent:()=>import("./chunk-DP3IHIJG.js").then(e=>e.BuyV2Component),canMatch:[O]},{path:"Sell/V2",loadComponent:()=>import("./chunk-XUDYAWGP.js").then(e=>e.SellV2Component),canMatch:[O]},{path:"Dashboard",loadComponent:()=>import("./chunk-2BWSGD3Z.js").then(e=>e.DashboardV2Component),canMatch:[O]},{path:"Products",loadChildren:()=>import("./chunk-FUZD2YUG.js").then(e=>e.ProductModule),canLoad:[r]},{path:"Shift",loadChildren:()=>import("./chunk-XZ7GA7NR.js").then(e=>e.ShiftModule),canLoad:[r]},{path:"Debt",loadChildren:()=>import("./chunk-5O2O7IB4.js").then(e=>e.DebtModule),canLoad:[r]},{path:"Logistics",loadChildren:()=>import("./chunk-DUJXPJ4P.js").then(e=>e.DeliveryModule),canLoad:[r]},{path:"Users",loadChildren:()=>import("./chunk-NWDPSH4M.js").then(e=>e.UsersModule),canLoad:[r]},{path:"Setup",loadChildren:()=>import("./chunk-V2HVL2JW.js").then(e=>e.SetupModule),canLoad:[r]},{path:"Developer",loadChildren:()=>import("./chunk-QCMMZ67T.js").then(e=>e.DeveloperModule),canLoad:[r]},{path:"Contacts",loadChildren:()=>import("./chunk-BFLDH5QM.js").then(e=>e.ContactsModule),canLoad:[r]},{path:"Outlets",loadChildren:()=>import("./chunk-75OKQPDZ.js").then(e=>e.OutletsModule),canLoad:[r]},{path:"Orders",loadChildren:()=>import("./chunk-3PWKXRXD.js").then(e=>e.OrdersModule),canLoad:[r]},{path:"Profile",loadChildren:()=>import("./chunk-CPCDU4HM.js").then(e=>e.ProfileModule),canLoad:[r]},{path:"Estimate",loadComponent:()=>import("./chunk-QIFLQIWQ.js").then(e=>e.EstimateV2Component),canMatch:[O]},{path:"Adjustment",loadChildren:()=>import("./chunk-SMUNI47Q.js").then(e=>e.AdjustmentModule),canLoad:[r]},{path:"Payment",loadChildren:()=>import("./chunk-6OSOTMIF.js").then(e=>e.PaymentModule),canLoad:[r],canActivate:[U]},{path:"Promotion",loadChildren:()=>import("./chunk-5RTCTJUG.js").then(e=>e.PromotionModule),canLoad:[r]},{path:"Manufacture",loadChildren:()=>import("./chunk-OBEXYNUM.js").then(e=>e.ManufactureModule),canLoad:[r]},{path:"Prepaid_Package",loadChildren:()=>import("./chunk-7DG3RSHK.js").then(e=>e.PrepaidPackageModule),canLoad:[r]},{path:"Fulfillment",loadChildren:()=>import("./chunk-Y4LWALJN.js").then(e=>e.FulfillmentModule),canLoad:[r]},{path:"Unauthorized",loadChildren:()=>import("./chunk-TWX33MAO.js").then(e=>e.UnauthorizedModule),canLoad:[r]},{path:"Not_Found",loadChildren:()=>import("./chunk-DT6QJWPF.js").then(e=>e.NotFoundModule),canLoad:[r]},{path:"",redirectTo:"/menu/Dashboard",pathMatch:"full"},{path:"**",redirectTo:"Not_Found"}]}],R=class e{static \u0275fac=function(t){return new(t||e)};static \u0275mod=x({type:e});static \u0275inj=y({imports:[G.forChild(Fe),G]})};var xe=class e{constructor(){}static \u0275fac=function(t){return new(t||e)};static \u0275mod=x({type:e,bootstrap:[P]});static \u0275inj=y({imports:[Me,R,ge,oe]})};export{xe as MenuMasterModule};
1
+ import{a as Pe}from"./chunk-4AKG7BSF.js";import{a as Ce}from"./chunk-AFBBEIKR.js";import{a as _e}from"./chunk-5S5ZFAPJ.js";import{a as be}from"./chunk-JUS6LLVX.js";import{b as Se,c as Me}from"./chunk-C4WJKF7R.js";import{a as de}from"./chunk-RLQLFW36.js";import"./chunk-EQLHPWVB.js";import"./chunk-NWSIPELM.js";import{F as ge,b as me,h as fe,o as he}from"./chunk-RNLSEEMX.js";import{a as T,c as f}from"./chunk-MYKOQWDM.js";import{a as ve}from"./chunk-ECEHKAWW.js";import{a as M,d as I}from"./chunk-USJ6ILEE.js";import{a as pe}from"./chunk-YYGLCUQ6.js";import{$ as q,$d as G,Ab as F,Bb as V,Bc as ie,Cb as h,Db as o,Dc as ne,E,Eb as s,Fb as p,Ob as C,Qb as Z,Sa as Y,Vd as ae,Xa as c,Xd as se,Yd as b,Zd as le,_d as ce,ac as K,be as ue,cc as $,cd as re,d as J,da as D,db as v,dc as m,ec as B,fc as z,hb as W,ib as x,la as d,ma as y,oa as _,pa as l,pc as X,rd as oe,tb as Q,uc as ee,vc as te,zb as j}from"./chunk-JYZTRN6N.js";import"./chunk-WFMAM73Y.js";import"./chunk-SNAKHGZS.js";var r=class e{constructor(i,t){this.authService=i;this.router=t}canLoad(i,t){return this.authService.isTokenExpired()?(this.authService.returnUrl=this.getUrlRedirect(t),this.router.navigate(["/"]),!1):!0}getUrlRedirect(i){let t="/menu";i.forEach(a=>t+=`/${a.path}`);let n=this.router.currentNavigation().extractedUrl.queryParams;return Object.keys(n).forEach((a,g)=>{g==0?t=`${t}?${a}=${n[a]}`:t=`${t}&${a}=${n[a]}`}),t}static \u0275fac=function(t){return new(t||e)(_(f),_(b))};static \u0275prov=d({token:e,factory:e.\u0275fac,providedIn:"root"})};var w=class e{constructor(i){this.toastrService=i;this.initPermissionToastr=!1}isPermissionGranted;initPermissionToastr;initPermission(){try{this.initPermissionToastr||Notification.requestPermission().then(t=>{this.isPermissionGranted=!1,t=="granted"&&(this.isPermissionGranted=!0),this.initPermissionToastr=!0})}catch(i){console.error(i)}}showAlert(i,t,n,u){let a=6e4;if(this.isPermissionGranted)try{let g=new Notification(t,{body:i,icon:u});g.onerror=(N=>{this.toastrService.info(this.setBody(i,n),t,{timeOut:a,enableHtml:this.hasUrl(n)})})}catch(g){console.error(g)}else this.toastrService.info(this.setBody(i,n),t,{timeOut:a,enableHtml:this.hasUrl(n)})}setBody(i,t){return this.hasUrl(t)&&(i=`<a href="${t}" target="_blank" class="ps-0">${i}</a>`),i}hasUrl(i){return!!(i&&i.length!==0)}static \u0275fac=function(t){return new(t||e)(_(ue))};static \u0275prov=d({token:e,factory:e.\u0275fac,providedIn:"root"})};var Oe=[{T:"Dashboard",U:"/menu/Dashboard",I:"fa-solid fa-chart-pie"},{T:"Products",U:"/menu/Products",I:"fa-solid fa-tag"},{T:"Estimate",U:"/menu/Estimate",I:"fa-solid fa-clipboard"},{T:"Sell",U:"/menu/Sell",I:"fa-solid fa-cart-shopping"},{T:"Shift",U:"/menu/Shift/",I:"fa-solid fa-user-clock"},{T:"Reports",U:"/menu/Reports",I:"fa-solid fa-chart-area"},{T:"Contacts",U:"/menu/Contacts",I:"fas fa-address-book"},{T:"Orders",U:"/menu/Orders",I:"fas fa-file-invoice"},{T:"Payment",U:"/menu/Payment",I:"fas fa-money-bill-alt"},{T:"Debt",U:"/menu/Debt",I:"fas fa-dollar-sign"},{T:"Inventory",U:"/menu/Inventory",I:"fas fa-archive"},{T:"Adjustment",U:"/menu/Adjustment",I:"fas fa-scanner-gun"},{T:"Buy",U:"/menu/Buy",I:"fa-solid fa-cart-arrow-down"},{T:"Logistics",U:"/menu/Logistics",I:"fas fa-truck"},{T:"Fulfillment",U:"/menu/Fulfillment",I:"fas fa-dolly"},{T:"Manufacture",U:"/menu/Manufacture",I:"fas fa-industry"},{T:"Prepaid Package",U:"/menu/Prepaid_Package",I:"fa-solid fa-id-card"},{T:"Promotion",U:"/menu/Promotion",I:"fas fa-bullhorn"},{T:"Users",U:"/menu/Users",I:"fas fa-user"},{T:"Outlets",U:"/menu/Outlets",I:"fas fa-map-marker-alt"},{T:"Setup",U:"/menu/Setup",I:"fas fa-gear"},{T:"Developer",U:"/menu/Developer",I:"fas fa-code"}];var k=class e{role=l(I);authService=l(f);menu=Oe;filteredMenu=[];initFilteredMenu(){this.filteredMenu=this.menu.filter(i=>i.T==="Dashboard"?this.role.dashboard.View:i.T==="Products"?this.role.product.View:i.T==="Estimate"?this.role.estimate.Create:i.T==="Sell"?this.role.sell.Create:i.T==="Shift"?this.role.sell.Create:i.T==="Reports"?this.role.report.View:i.T==="Contacts"?this.role.contact.View:i.T==="Orders"?this.role.order.View:i.T==="Payment"?this.role.payment.View:i.T==="Debt"?this.role.debt.View:i.T==="Inventory"?this.role.inventory.View:i.T==="Adjustment"?this.role.adjustment.View:i.T==="Buy"?this.role.buy.Create:i.T==="Logistics"?this.role.logistic.View:i.T==="Manufacture"?this.role.manufacture.View:i.T==="Fulfillment"?this.role.fulfillment.View:i.T==="Prepaid Package"?this.role.prepaidPackage.View:i.T==="Promotion"?this.role.promotion.View:i.T==="Users"?this.role.users.View:i.T==="Outlets"?this.role.outlets.View:i.T==="Setup"?this.role.setup.View:i.T==="Developer"?this.role.developer.View:!0),this.filterBySubscriptionStatus()}filterBySubscriptionStatus(){let i=this.authService.getSubscriptionStatus();this.filteredMenu=this.filteredMenu.filter(t=>{switch(i){case 2:return t.T=="Sell"||t.T=="Shift";case 3:return!1;default:return!0}})}static \u0275fac=function(t){return new(t||e)};static \u0275prov=d({token:e,factory:e.\u0275fac,providedIn:"root"})};var ye=[{T:"My Profile",U:"Profile/Main/My_Profile",I:"fas fa-user"},{T:"My Subscription",U:"Profile/Main/My_Subscription",I:"fa-solid fa-credit-card"},{T:"Notification",U:"Profile/Notification/Push",I:"fas fa-bell"},{T:"My Sales",U:"Profile/Main/My_Sales",I:"fas fa-history"}];var A=class e{role=l(I);authService=l(f);filteredMenu=[];initFilteredMenu(){let i=this.authService.getSubscriptionStatus();this.filteredMenu=ye.filter(t=>t.T=="My Profile"?this.role.profile.View:t.T=="My Subscription"?this.role.profile.Subscription:t.T=="Notification"?this.role.profile.Notification&&i!=2&&i!=3:t.T=="My Sales"?i!=2&&i!=3:!0)}static \u0275fac=function(t){return new(t||e)};static \u0275prov=d({token:e,factory:e.\u0275fac,providedIn:"root"})};var Le=(e,i)=>({"full-container":e,"subscription-bar-visible":i}),Re=e=>[e];function Ne(e,i){if(e&1&&(o(0,"a",11),p(1,"i",35),o(2,"span"),m(3),s()()),e&2){let t=i.$implicit;h("routerLink",t==null?null:t.U),c(),$((t==null?null:t.I)+" me-2"),c(2),B(t==null?null:t.T)}}function Ee(e,i){if(e&1&&(o(0,"li",33,0)(2,"a",36),p(3,"i"),o(4,"p"),m(5),s()()()),e&2){let t=i.$implicit,n=Z();h("routerLinkActiveOptions",n.isActiveMatchOptions),Q("data-cy",t==null?null:t.T),c(2),h("matTooltip",n.toggleSideMenu?t==null?null:t.T:"")("routerLink",ee(7,Re,t==null?null:t.U)),c(),$(t==null?null:t.I),c(2),B(t==null?null:t.T)}}var P=class e{constructor(i,t,n,u,a,g,N,H){this.toggleSidebar=i;this.signalRClientService=t;this.notificationAlertService=n;this.router=u;this.authService=a;this.intercomService=g;N.initFilteredMenu(),H.initFilteredMenu(),this.leftSidebarMenu=N.filteredMenu,this.topMenu=H.filteredMenu,this.accountInfo=JSON.parse(localStorage.getItem("AccountInfo")),this.toggleSidebar.toggleState$.subscribe(Te=>this.isNavOpen=Te),this.destroy$=new J,this.initNotificationPermission()}isActiveMatchOptions={matrixParams:"subset",queryParams:"subset",paths:"subset",fragment:"exact"};toggleSideMenu=!1;isNavOpen;destroy$;activeMenu;appVersion=pe.version;currentSubStatus;subsStatusEnum=T;isFullContainer=!1;isHideIntercomLauncher;leftSidebarMenu;topMenu;accountInfo;ngOnInit(){this.subscribeToPushNotification(),this.getCurrentSubscriptionStatus(),this.initFullContainer()}initFullContainer(){this.router.events.pipe(E(i=>i instanceof ae),q(null),D(this.destroy$)).subscribe(i=>{this.isFullContainer=!1,(this.router.url.includes("Sell")&&!this.router.url.includes("v2")&&!this.router.url.includes("Offline")||this.router.url.includes("Buy")||this.router.url.includes("menu/Estimate")||this.router.url.includes("Transfer_Order/Form")||this.router.url.includes("Adjustment/Archive/Form")||this.router.url.includes("Job_Order/Archive/Form")||this.router.url.includes("/menu/Debt/Debt/Join_Invoice/Form")||this.router.url.includes("/menu/Debt/Debt/Join_Bill/New_Join_Bill"))&&(this.isFullContainer=!0)})}initNotificationPermission(){this.notificationAlertService.initPermission()}getCurrentSubscriptionStatus(){this.currentSubStatus=this.authService.getSubscriptionStatus()}subscribeToPushNotification(){let i=localStorage.getItem("NotificationOutletID");M.IsNotEmpty(i)&&M.isGuid(i)?this.signalRClientService.SubscribeGroup(i):this.signalRClientService.startConnection(),this.signalRClientService.OnReceivePushNotification.pipe(D(this.destroy$),E(t=>M.IsNotEmpty(t))).subscribe(t=>{if(M.IsNotEmpty(t)){let n=JSON.parse(t),u="https://cdn.dealpos.xyz/web-image/info-new.png";M.IsNotEmpty(n.Icon)&&(u=n.Icon),this.notificationAlertService.showAlert(n.Body,n.Header,n.URL,u)}})}ngAfterViewInit(){this.intercomService.inititalizeIntercom()}toggleMenu(){this.toggleSideMenu=!this.toggleSideMenu}logout(){this.authService.logout()}isNotEmpty(i){return M.IsNotEmpty(i)}onShowDropdown(){this.isHideIntercomLauncher=this.intercomService.isHideLauncher()}chatToggleChange(){this.isHideIntercomLauncher==!1?this.intercomService.hideLauncher():this.intercomService.showLauncher(),this.onShowDropdown()}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}static \u0275fac=function(t){return new(t||e)(v(be),v(de),v(w),v(b),v(f),v(ve),v(k),v(A))};static \u0275cmp=W({type:e,selectors:[["POS-menu-master"]],standalone:!1,decls:54,vars:17,consts:[["rla","routerLinkActive"],[1,"wrapper"],["data-color","blue",1,"sidebar",3,"ngClass"],[1,"btn-minimize","d-lg-block","d-none","p-0","border-0","bg-white",3,"click"],[1,"fa-solid",3,"ngClass"],[1,"logo"],[1,"navbar","dropdown","bg-transparent","border-0"],["data-cy","companyName","data-bs-toggle","dropdown","aria-expanded","false","matTooltipPosition","above",1,"simple-text","text-start","dropdown-toggle","d-flex","align-items-center","justify-content-center",2,"cursor","pointer",3,"click","matTooltip"],[1,"dropdown-menu"],[1,"dropdown-header","text-dark","border-bottom"],[1,"divider","m-0"],[1,"dropdown-item","h5",3,"routerLink"],[1,"dropdown-item","h5",2,"cursor","pointer"],[1,"d-flex","align-items-center","justify-content-between"],[1,"fa-solid","fa-comment-dots","me-2"],[1,"checkbox_toggle","ms-3",3,"click"],["type","checkbox","id","chatToggle","name","ChatToggle",3,"ngModelChange","ngModel"],["for","chatToggle",1,"position-relative","rounded-pill","pointer"],[1,"dropdown-item","h5",2,"cursor","pointer",3,"click"],["aria-hidden","true",1,"fa-solid","fa-sign-out-alt","me-2"],[1,"divider"],[1,"dropdown-header","border-top"],["target","_blank",1,"dropdown-item","h5","changelog",3,"href"],["aria-hidden","true",1,"fa-solid","fa-sparkles","me-2"],[1,"fa-solid","fa-circle-exclamation","ms-2",2,"font-size","16px"],["target","_blank","href","http://support.dealpos.com",1,"dropdown-item","h5"],["aria-hidden","true",1,"fa-solid","fa-book","me-2"],["target","_blank","href","https://www.dealpos.app/",1,"dropdown-item","h5"],["aria-hidden","true",1,"fa-solid","fa-table-cells-large","me-2"],["target","_blank","href","http://blog.dealpos.com",1,"dropdown-item","h5"],["aria-hidden","true",1,"fa-brands","fa-blogger","me-2"],[1,"sidebar-wrapper"],[1,"nav"],["routerLinkActive","active",3,"routerLinkActiveOptions"],["id","full-container",1,"main-panel",3,"ngClass"],["aria-hidden","true"],["matTooltipPosition","above",1,"nav-link","position-relative","d-block",3,"matTooltip","routerLink"]],template:function(t,n){t&1&&(o(0,"div",1)(1,"div",2)(2,"button",3),C("click",function(){return n.toggleMenu()}),p(3,"i",4),s(),o(4,"div",5)(5,"div",6)(6,"a",7),C("click",function(){return n.onShowDropdown()}),m(7),ie(8,"limitText"),s(),o(9,"div",8)(10,"div",9),m(11),s(),p(12,"div",10),F(13,Ne,4,4,"a",11,j),o(15,"a",12)(16,"div",13)(17,"div"),p(18,"i",14),o(19,"span"),m(20,"Chat Support"),s()(),o(21,"div",15),C("click",function(a){return a.stopPropagation()}),o(22,"input",16),C("ngModelChange",function(){return n.chatToggleChange()}),s(),p(23,"label",17),s()()(),o(24,"a",18),C("click",function(){return n.logout()}),p(25,"i",19),o(26,"span"),m(27,"Log Out"),s()(),p(28,"div",20),o(29,"div",21),m(30," Links "),s(),o(31,"a",22),p(32,"i",23),o(33,"span"),m(34,"What's New"),p(35,"i",24),s()(),o(36,"a",25),p(37,"i",26),o(38,"span"),m(39,"Help Center"),s()(),o(40,"a",27),p(41,"i",28),o(42,"span"),m(43,"App Store"),s()(),o(44,"a",29),p(45,"i",30),o(46,"span"),m(47,"Company Blog"),s()()()()(),o(48,"div",31)(49,"ul",32),F(50,Ee,6,9,"li",33,j),s()()(),o(52,"div",34),p(53,"router-outlet"),s()()),t&2&&(K("nav-open",n.isNavOpen),c(),h("ngClass",n.toggleSideMenu?"collapses":""),c(2),h("ngClass",n.toggleSideMenu?"fa-angle-left cursor":"fa-angle-right cursor"),c(3),h("matTooltip",n.accountInfo==null?null:n.accountInfo.BrandName),c(),z(" ",ne(8,11,n.accountInfo==null?null:n.accountInfo.BrandName,12)," "),c(4),z("",n.accountInfo==null?null:n.accountInfo.UserName," "),c(2),V(n.topMenu),c(9),h("ngModel",!n.isHideIntercomLauncher),c(9),h("href",X("https://changelog.dealpos.com/?categories=cat_gAZdRhBYU7QVl&view=complete&v=",n.appVersion),Y),c(19),V(n.leftSidebarMenu),c(2),h("ngClass",te(14,Le,n.isFullContainer,n.isNotEmpty(n.currentSubStatus)&&n.currentSubStatus!==n.subsStatusEnum.PAID)))},dependencies:[Se,se,le,ce,me,fe,he,re,Ce],styles:['.sidebar[_ngcontent-%COMP%] .nav[_ngcontent-%COMP%] li[_ngcontent-%COMP%] .nav-link[_ngcontent-%COMP%], body[_ngcontent-%COMP%] > .navbar-collapse[_ngcontent-%COMP%] .nav[_ngcontent-%COMP%] li[_ngcontent-%COMP%] .nav-link[_ngcontent-%COMP%]{padding:10px 0 10px 10px!important}.sidebar-wrapper[_ngcontent-%COMP%]{max-height:calc(100% - 61px)!important;min-height:calc(100% - 61px)!important}@media (max-width: 991px){.sidebar-wrapper[_ngcontent-%COMP%]{overflow-y:scroll!important}}@media (pointer: coarse){.sidebar-wrapper[_ngcontent-%COMP%]{overflow-y:scroll!important}}@media (max-width: 468px){.navbar[_ngcontent-%COMP%] .navbar-brand[_ngcontent-%COMP%]{white-space:nowrap;max-width:7em;overflow:hidden;text-overflow:ellipsis}}@media only screen and (min-width: 992px){.sidebar[_ngcontent-%COMP%]{z-index:1050!important;transition:all .3s}.sidebar[_ngcontent-%COMP%] .sidebar-wrapper[_ngcontent-%COMP%]{transition:all .3s}.sidebar[_ngcontent-%COMP%] + .main-panel[_ngcontent-%COMP%]{transition:all .3s}.sidebar[_ngcontent-%COMP%] + .main-panel[_ngcontent-%COMP%] .navbar.fixed-top[_ngcontent-%COMP%]{transition:all .3s}.sidebar.collapses[_ngcontent-%COMP%], .sidebar.collapses[_ngcontent-%COMP%] .sidebar-wrapper[_ngcontent-%COMP%]{width:70px;transition:all .3s}.sidebar.collapses[_ngcontent-%COMP%] .logo[_ngcontent-%COMP%] .simple-text[_ngcontent-%COMP%]{background-color:#ffffff3b;border-radius:20px;height:40px;width:40px}.sidebar.collapses[_ngcontent-%COMP%] .nav[_ngcontent-%COMP%] li[_ngcontent-%COMP%] .nav-link[_ngcontent-%COMP%]{padding:10px 0 10px 10px!important;height:50px;text-align:center;margin:10px}.sidebar.collapses[_ngcontent-%COMP%] .nav[_ngcontent-%COMP%] li[_ngcontent-%COMP%] .nav-link[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{display:none}.sidebar.collapses[_ngcontent-%COMP%] + .main-panel[_ngcontent-%COMP%]{padding-left:70px}.sidebar.collapses[_ngcontent-%COMP%] + .main-panel[_ngcontent-%COMP%] .navbar.fixed-top[_ngcontent-%COMP%]{left:70px!important;transition:all .3s}.sidebar[_ngcontent-%COMP%] .btn-minimize[_ngcontent-%COMP%]{position:absolute;top:17px;right:-20px;z-index:7;-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg);border-radius:50%;box-shadow:0 0 0 1px #091e4214,0 2px 4px 1px #091e4214;color:#000;cursor:pointer;height:24px;opacity:0;outline:0;width:24px;-webkit-transform-origin:7px;-ms-transform-origin:7px;transform-origin:7px;transition:opacity .5s;-webkit-transition:opacity .5s}.sidebar[_ngcontent-%COMP%] .btn-minimize[_ngcontent-%COMP%]:hover{color:#2996cc}.sidebar[_ngcontent-%COMP%]:hover .btn-minimize[_ngcontent-%COMP%]{opacity:1;background-color:#fff;position:absolute;top:17px;right:-20px;z-index:7;-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg);border:0;border-radius:50%;box-shadow:0 0 0 1px #091e4214,0 2px 4px 1px #091e4214;color:#000;cursor:pointer;height:24px;opacity:0;outline:0;padding:0;width:24px;-webkit-transform-origin:7px;-ms-transform-origin:7px;transform-origin:7px;transition:opacity .5s;-webkit-transition:opacity .5s}.sidebar[_ngcontent-%COMP%]:hover .btn-minimize[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{cursor:pointer}.sidebar[_ngcontent-%COMP%]:hover .btn-minimize[_ngcontent-%COMP%]:hover{color:#2996cc}.sidebar[_ngcontent-%COMP%]:hover:hover .btn-minimize[_ngcontent-%COMP%]{opacity:1}}.full-container[_ngcontent-%COMP%]{padding-top:0!important}.changelog[_ngcontent-%COMP%]{color:#0006b1!important}.changelog[_ngcontent-%COMP%]:visited{color:#2e2e2e!important}.changelog[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{position:relative}.changelog[_ngcontent-%COMP%] span[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{color:#fe3a00!important;position:absolute;top:-4px;right:-18px}.changelog[_ngcontent-%COMP%]:visited span[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{color:#fff!important;position:absolute;top:-4px;right:-18px}.changelog[_ngcontent-%COMP%]:visited:hover span[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{color:#e9ecef!important;position:absolute;top:-4px;right:-18px}.subscription-bar-visible[_ngcontent-%COMP%]{padding-top:98px}.checkbox_toggle[_ngcontent-%COMP%]{position:relative}.checkbox_toggle[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:#868686;display:inline-block;padding-right:38px}.checkbox_toggle[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{width:23px;height:14px;background-color:#ccc;top:2.2px;right:0}.checkbox_toggle[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%]{display:none}.checkbox_toggle[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%]:checked + label[_ngcontent-%COMP%]{background-color:#1f77d0}.checkbox_toggle[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%]:checked + label[_ngcontent-%COMP%]:after{left:10px}.checkbox_toggle[_ngcontent-%COMP%] label[_ngcontent-%COMP%]:after{content:"";width:12px;height:12px;border-radius:50%;position:absolute;top:.8px;left:1px;transition:all .1s;background-color:#fff}']})};function De(e){let i=l(b),t="/menu";e.forEach(a=>t+=`/${a.path}`);let n=i.currentNavigation().extractedUrl.queryParams;return Object.keys(n).forEach((a,g)=>{g==0?t=`${t}?${a}=${n[a]}`:t=`${t}&${a}=${n[a]}`}),t}var O=(e,i)=>{let t=l(f),n=t.isTokenExpired(),u=l(b);return n?(t.returnUrl=De(i),u.navigate(["/"]),!1):e.path=="Dashboard"?je():!0};function je(){let e=l(b),i=l(f),t=!1,n=i.getRedirectUrl();return t=n.includes("Dashboard"),t==!1&&e.navigate([n]),t}var U=class e{paymentStorageService=l(Pe);canActivate(i,t){return this.paymentStorageService.clear(),!0}static \u0275fac=function(t){return new(t||e)};static \u0275prov=d({token:e,factory:e.\u0275fac,providedIn:"root"})};var L=class e{reportService=l(_e);canActivate(i,t){return this.reportService.resetFilter(),!0}static \u0275fac=function(t){return new(t||e)};static \u0275prov=d({token:e,factory:e.\u0275fac,providedIn:"root"})};var Fe=[{path:"",component:P,children:[{path:"Inventory",loadChildren:()=>import("./chunk-HQMGZB3H.js").then(e=>e.InventoryModule),canLoad:[r]},{path:"Reports",loadChildren:()=>import("./chunk-DSF34FWR.js").then(e=>e.ReportsModule),canLoad:[r],canActivate:[L]},{path:"Sell",loadChildren:()=>import("./chunk-63AFDUIT.js").then(e=>e.routes),canLoad:[r]},{path:"Print",loadChildren:()=>import("./chunk-AVTYR2I6.js").then(e=>e.PrintModule),canLoad:[r]},{path:"Buy",loadComponent:()=>import("./chunk-NVYVELCF.js").then(e=>e.BuyV2Component),canMatch:[O]},{path:"Sell/V2",loadComponent:()=>import("./chunk-NCLOGMP4.js").then(e=>e.SellV2Component),canMatch:[O]},{path:"Dashboard",loadComponent:()=>import("./chunk-MNVLPMSI.js").then(e=>e.DashboardV2Component),canMatch:[O]},{path:"Products",loadChildren:()=>import("./chunk-OK5EBIMF.js").then(e=>e.ProductModule),canLoad:[r]},{path:"Shift",loadChildren:()=>import("./chunk-YUTT2QKH.js").then(e=>e.ShiftModule),canLoad:[r]},{path:"Debt",loadChildren:()=>import("./chunk-NS7V266J.js").then(e=>e.DebtModule),canLoad:[r]},{path:"Logistics",loadChildren:()=>import("./chunk-AKFNDMFE.js").then(e=>e.DeliveryModule),canLoad:[r]},{path:"Users",loadChildren:()=>import("./chunk-47T7IWRR.js").then(e=>e.UsersModule),canLoad:[r]},{path:"Setup",loadChildren:()=>import("./chunk-ZNIIYEEO.js").then(e=>e.SetupModule),canLoad:[r]},{path:"Developer",loadChildren:()=>import("./chunk-KY577SRX.js").then(e=>e.DeveloperModule),canLoad:[r]},{path:"Contacts",loadChildren:()=>import("./chunk-5WZX5UDC.js").then(e=>e.ContactsModule),canLoad:[r]},{path:"Outlets",loadChildren:()=>import("./chunk-NFAOMT2P.js").then(e=>e.OutletsModule),canLoad:[r]},{path:"Orders",loadChildren:()=>import("./chunk-56J3O2YI.js").then(e=>e.OrdersModule),canLoad:[r]},{path:"Profile",loadChildren:()=>import("./chunk-DFUQ53YY.js").then(e=>e.ProfileModule),canLoad:[r]},{path:"Estimate",loadComponent:()=>import("./chunk-YWDEOTPR.js").then(e=>e.EstimateV2Component),canMatch:[O]},{path:"Adjustment",loadChildren:()=>import("./chunk-54W52P5V.js").then(e=>e.AdjustmentModule),canLoad:[r]},{path:"Payment",loadChildren:()=>import("./chunk-RKBLZASG.js").then(e=>e.PaymentModule),canLoad:[r],canActivate:[U]},{path:"Promotion",loadChildren:()=>import("./chunk-AE6CDP2N.js").then(e=>e.PromotionModule),canLoad:[r]},{path:"Manufacture",loadChildren:()=>import("./chunk-HEPRCWZT.js").then(e=>e.ManufactureModule),canLoad:[r]},{path:"Prepaid_Package",loadChildren:()=>import("./chunk-7XC4XIHR.js").then(e=>e.PrepaidPackageModule),canLoad:[r]},{path:"Fulfillment",loadChildren:()=>import("./chunk-L7CBHHVQ.js").then(e=>e.FulfillmentModule),canLoad:[r]},{path:"Unauthorized",loadChildren:()=>import("./chunk-RFCZ4NNF.js").then(e=>e.UnauthorizedModule),canLoad:[r]},{path:"Not_Found",loadChildren:()=>import("./chunk-IMVZUGYH.js").then(e=>e.NotFoundModule),canLoad:[r]},{path:"",redirectTo:"/menu/Dashboard",pathMatch:"full"},{path:"**",redirectTo:"Not_Found"}]}],R=class e{static \u0275fac=function(t){return new(t||e)};static \u0275mod=x({type:e});static \u0275inj=y({imports:[G.forChild(Fe),G]})};var xe=class e{constructor(){}static \u0275fac=function(t){return new(t||e)};static \u0275mod=x({type:e,bootstrap:[P]});static \u0275inj=y({imports:[Me,R,ge,oe]})};export{xe as MenuMasterModule};
@@ -1 +1 @@
1
- import{c as J}from"./chunk-WPMZWFSL.js";import{a as G}from"./chunk-SXAXSC44.js";import"./chunk-7LCG4V47.js";import"./chunk-QFON23YX.js";import"./chunk-FIUZN6JU.js";import{e as q,f as z}from"./chunk-GSAGOZJT.js";import"./chunk-JYJW5KAE.js";import"./chunk-JEL3OND6.js";import"./chunk-M43HNBJQ.js";import"./chunk-X57HWGVJ.js";import"./chunk-5SFUSWFY.js";import"./chunk-534MIVWD.js";import"./chunk-TGEQUV6Z.js";import"./chunk-TV76G36W.js";import{b as A}from"./chunk-EZRYO7BE.js";import"./chunk-CS6HBROS.js";import"./chunk-JUS6LLVX.js";import"./chunk-BA3BDB5Y.js";import{b as j,c as k}from"./chunk-C4WJKF7R.js";import"./chunk-T25N3EEG.js";import"./chunk-RLQLFW36.js";import"./chunk-EQLHPWVB.js";import"./chunk-A45GTZVV.js";import"./chunk-NWSIPELM.js";import"./chunk-6SGN7MNX.js";import"./chunk-L76WVZW6.js";import"./chunk-2FWFPV5I.js";import"./chunk-O5SLP4JK.js";import{F as W,h as B,o as H}from"./chunk-RNLSEEMX.js";import"./chunk-77V3KNIS.js";import"./chunk-DQYDWBIK.js";import"./chunk-USJ6ILEE.js";import"./chunk-P3RYBCCQ.js";import{Ab as M,Bb as w,Bc as C,Cb as d,Cc as F,Db as i,Dc as T,Eb as n,Hc as E,Mb as v,Ob as N,Qb as S,Xa as l,be as V,db as c,dc as o,ec as u,ee as R,hb as D,ic as _,jc as b,kc as h,lb as y,md as P,nb as I,od as L,rd as O,ta as p,ua as s,yb as x}from"./chunk-JYZTRN6N.js";import"./chunk-WFMAM73Y.js";import"./chunk-SNAKHGZS.js";function U(r,g){if(r&1){let e=v();i(0,"div")(1,"div",9)(2,"h6"),o(3,"Outlet"),n(),i(4,"outlet-selector",10),h("ngModelChange",function(t){p(e);let m=S();return b(m.pageData.Filter.ListIDs,t)||(m.pageData.Filter.ListIDs=t),s(t)}),n()()()}if(r&2){let e=S();l(4),d("accessType",2),_("ngModel",e.pageData.Filter.ListIDs),d("multiple",!0)}}function X(r,g){if(r&1&&(i(0,"tr")(1,"td"),o(2),n(),i(3,"td"),o(4),C(5,"number"),n(),i(6,"td"),o(7),C(8,"date"),n()()),r&2){let e=g.$implicit;l(2),u(e==null?null:e.EntityName),l(2),u(F(5,3,e==null?null:e.Number)),l(3),u(T(8,5,e==null?null:e.Modified,"dd MMM yyyy HH:mm"))}}var K=class r extends G{constructor(e,a,t){super(e,a,"Setup/Data/TransactionInvoiceNumber",null,t);this.httpService=a}preGetList(){let e=this.pageData.Filter?.ListIDs?this.pageData.Filter?.ListIDs:[];this.pageData.Filter={ListIDs:e}}static \u0275fac=function(a){return new(a||r)(c(A),c(R),c(V))};static \u0275cmp=D({type:r,selectors:[["app-invoice-numbering"]],features:[y],decls:19,vars:4,consts:[["pageFilterTemplate",""],[3,"onSubmit","filterChange","pageData","isFilterOnDropdown","hideSearchBox","filter"],[1,"container-fluid","mt-5"],[1,"table-responsive"],["id","tableGrid",1,"table"],[1,"thead-light","sticky-top-thead"],[1,"header"],["matTooltip","Next invoice number index to be generated",2,"width","200px"],[2,"width","200px"],[1,"dialog-filter"],["placeholder","Choose Outlet",3,"ngModelChange","accessType","ngModel","multiple"]],template:function(a,t){if(a&1){let m=v();i(0,"mainpanel-cmp",1),N("onSubmit",function(){return p(m),s(t.searchFromPageOne())}),h("filterChange",function(f){return p(m),b(t.pageData.Filter,f)||(t.pageData.Filter=f),s(f)}),i(1,"filters"),I(2,U,5,3,"ng-template",null,0,E),n(),i(4,"content")(5,"div",2)(6,"div",3)(7,"table",4)(8,"thead",5)(9,"tr",6)(10,"th"),o(11,"Outlet"),n(),i(12,"th",7),o(13," Next Number "),n(),i(14,"th",8),o(15,"Modified"),n()()(),i(16,"tbody"),M(17,X,9,8,"tr",null,x),n()()()()()()}a&2&&(d("pageData",t.menuData)("isFilterOnDropdown",!1)("hideSearchBox",!0),_("filter",t.pageData.Filter),l(17),w(t.data==null?null:t.data.Data))},dependencies:[O,z,q,J,W,B,H,k,j,L,P],encapsulation:2})};export{K as InvoiceNumberingComponent};
1
+ import{c as J}from"./chunk-QHNGMJWX.js";import{a as G}from"./chunk-YFRQWQ66.js";import"./chunk-5S5ZFAPJ.js";import"./chunk-QFON23YX.js";import"./chunk-FIUZN6JU.js";import{e as q,f as z}from"./chunk-4KMRZ2TB.js";import"./chunk-3L267ZNV.js";import"./chunk-JEL3OND6.js";import"./chunk-M43HNBJQ.js";import"./chunk-X57HWGVJ.js";import"./chunk-5SFUSWFY.js";import"./chunk-534MIVWD.js";import"./chunk-TGEQUV6Z.js";import"./chunk-OBXCVFDY.js";import{b as A}from"./chunk-WCCWWFYE.js";import"./chunk-CS6HBROS.js";import"./chunk-JUS6LLVX.js";import"./chunk-BA3BDB5Y.js";import{b as j,c as k}from"./chunk-C4WJKF7R.js";import"./chunk-T25N3EEG.js";import"./chunk-RLQLFW36.js";import"./chunk-EQLHPWVB.js";import"./chunk-A45GTZVV.js";import"./chunk-NWSIPELM.js";import"./chunk-6SGN7MNX.js";import"./chunk-L76WVZW6.js";import"./chunk-2FWFPV5I.js";import"./chunk-O5SLP4JK.js";import{F as W,h as B,o as H}from"./chunk-RNLSEEMX.js";import"./chunk-MYKOQWDM.js";import"./chunk-ECEHKAWW.js";import"./chunk-USJ6ILEE.js";import"./chunk-YYGLCUQ6.js";import{Ab as M,Bb as w,Bc as C,Cb as d,Cc as F,Db as i,Dc as T,Eb as n,Hc as E,Mb as v,Ob as N,Qb as S,Xa as l,be as V,db as c,dc as o,ec as u,ee as R,hb as D,ic as _,jc as b,kc as h,lb as y,md as P,nb as I,od as L,rd as O,ta as p,ua as s,yb as x}from"./chunk-JYZTRN6N.js";import"./chunk-WFMAM73Y.js";import"./chunk-SNAKHGZS.js";function U(r,g){if(r&1){let e=v();i(0,"div")(1,"div",9)(2,"h6"),o(3,"Outlet"),n(),i(4,"outlet-selector",10),h("ngModelChange",function(t){p(e);let m=S();return b(m.pageData.Filter.ListIDs,t)||(m.pageData.Filter.ListIDs=t),s(t)}),n()()()}if(r&2){let e=S();l(4),d("accessType",2),_("ngModel",e.pageData.Filter.ListIDs),d("multiple",!0)}}function X(r,g){if(r&1&&(i(0,"tr")(1,"td"),o(2),n(),i(3,"td"),o(4),C(5,"number"),n(),i(6,"td"),o(7),C(8,"date"),n()()),r&2){let e=g.$implicit;l(2),u(e==null?null:e.EntityName),l(2),u(F(5,3,e==null?null:e.Number)),l(3),u(T(8,5,e==null?null:e.Modified,"dd MMM yyyy HH:mm"))}}var K=class r extends G{constructor(e,a,t){super(e,a,"Setup/Data/TransactionInvoiceNumber",null,t);this.httpService=a}preGetList(){let e=this.pageData.Filter?.ListIDs?this.pageData.Filter?.ListIDs:[];this.pageData.Filter={ListIDs:e}}static \u0275fac=function(a){return new(a||r)(c(A),c(R),c(V))};static \u0275cmp=D({type:r,selectors:[["app-invoice-numbering"]],features:[y],decls:19,vars:4,consts:[["pageFilterTemplate",""],[3,"onSubmit","filterChange","pageData","isFilterOnDropdown","hideSearchBox","filter"],[1,"container-fluid","mt-5"],[1,"table-responsive"],["id","tableGrid",1,"table"],[1,"thead-light","sticky-top-thead"],[1,"header"],["matTooltip","Next invoice number index to be generated",2,"width","200px"],[2,"width","200px"],[1,"dialog-filter"],["placeholder","Choose Outlet",3,"ngModelChange","accessType","ngModel","multiple"]],template:function(a,t){if(a&1){let m=v();i(0,"mainpanel-cmp",1),N("onSubmit",function(){return p(m),s(t.searchFromPageOne())}),h("filterChange",function(f){return p(m),b(t.pageData.Filter,f)||(t.pageData.Filter=f),s(f)}),i(1,"filters"),I(2,U,5,3,"ng-template",null,0,E),n(),i(4,"content")(5,"div",2)(6,"div",3)(7,"table",4)(8,"thead",5)(9,"tr",6)(10,"th"),o(11,"Outlet"),n(),i(12,"th",7),o(13," Next Number "),n(),i(14,"th",8),o(15,"Modified"),n()()(),i(16,"tbody"),M(17,X,9,8,"tr",null,x),n()()()()()()}a&2&&(d("pageData",t.menuData)("isFilterOnDropdown",!1)("hideSearchBox",!0),_("filter",t.pageData.Filter),l(17),w(t.data==null?null:t.data.Data))},dependencies:[O,z,q,J,W,B,H,k,j,L,P],encapsulation:2})};export{K as InvoiceNumberingComponent};
@@ -1 +1 @@
1
- import{c as f}from"./chunk-77V3KNIS.js";import{a as m}from"./chunk-P3RYBCCQ.js";import{Bd as l,I as c,be as v,ee as u,k as n,la as s,oa as e,yd as h}from"./chunk-JYZTRN6N.js";var d=class o{constructor(t,r,p,i){this.httpService=t;this.authService=r;this.httpClientService=p;this.toastr=i}port=window.location.href.split("localhost:")[1]?.split("/")[0];hostURL=t=>m.production?t:`https://localhost:${this.port}${t}`;configure2FA(t){return this.httpService.post("/api/Authentication/Setup_2FA",t)}validateCode(t,r){let p=this.authService.loginResponse?.Token,i=new h({"Content-Type":"application/json","Cache-Control":"no-cache"});i=i.append("Authorization","Bearer "+p);let S={ValidationCode:t,UserID:r};return this.httpClientService.post(this.hostURL("/api/Login/Validate_2FA "),S,{headers:i}).pipe(c(a=>(this.toastr.error(a?.error?.Message,"Error - "+a.status),n)))}disableTwoFactorAuthentication(){let t={enabled:!1};return this.httpService.post("/api/Authentication/Setup_2FA",t)}static \u0275fac=function(r){return new(r||o)(e(u),e(f),e(l),e(v))};static \u0275prov=s({token:o,factory:o.\u0275fac,providedIn:"root"})};export{d as a};
1
+ import{c as f}from"./chunk-MYKOQWDM.js";import{a as m}from"./chunk-YYGLCUQ6.js";import{Bd as l,I as c,be as v,ee as u,k as n,la as s,oa as e,yd as h}from"./chunk-JYZTRN6N.js";var d=class o{constructor(t,r,p,i){this.httpService=t;this.authService=r;this.httpClientService=p;this.toastr=i}port=window.location.href.split("localhost:")[1]?.split("/")[0];hostURL=t=>m.production?t:`https://localhost:${this.port}${t}`;configure2FA(t){return this.httpService.post("/api/Authentication/Setup_2FA",t)}validateCode(t,r){let p=this.authService.loginResponse?.Token,i=new h({"Content-Type":"application/json","Cache-Control":"no-cache"});i=i.append("Authorization","Bearer "+p);let S={ValidationCode:t,UserID:r};return this.httpClientService.post(this.hostURL("/api/Login/Validate_2FA "),S,{headers:i}).pipe(c(a=>(this.toastr.error(a?.error?.Message,"Error - "+a.status),n)))}disableTwoFactorAuthentication(){let t={enabled:!1};return this.httpService.post("/api/Authentication/Setup_2FA",t)}static \u0275fac=function(r){return new(r||o)(e(u),e(f),e(l),e(v))};static \u0275prov=s({token:o,factory:o.\u0275fac,providedIn:"root"})};export{d as a};
@@ -18,4 +18,4 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e.byteLength}`),e.tiff&&
18
18
 
19
19
  ${t.details}`),children:"?"})]})},t.message))})})}};var up=we($e(),1);function oc({activePickerPanel:i,className:e,hideAllPanels:t,i18n:r,state:s,uppy:a}){let o=Dt(null);return l("div",{className:(0,up.default)("uppy-DashboardContent-panel",e),role:"tabpanel","data-uppy-panelType":"PickerPanel",id:`uppy-DashboardContent-panel--${i.id}`,onDragOver:Lt,onDragLeave:Lt,onDrop:Lt,onPaste:Lt,children:[l("div",{className:"uppy-DashboardContent-bar",children:[l("div",{className:"uppy-DashboardContent-title",role:"heading","aria-level":1,children:r("importFrom",{name:i.name})}),l("button",{className:"uppy-DashboardContent-back",type:"button",onClick:t,children:r("cancel")})]}),l("div",{ref:o,className:"uppy-DashboardContent-panelBody",children:a.getPlugin(i.id).render(s,o.current)})]})}var hp=oc;var Rt={STATE_ERROR:"error",STATE_WAITING:"waiting",STATE_PREPROCESSING:"preprocessing",STATE_UPLOADING:"uploading",STATE_POSTPROCESSING:"postprocessing",STATE_COMPLETE:"complete",STATE_PAUSED:"paused"};function nc(i,e,t,r={}){if(i)return Rt.STATE_ERROR;if(e)return Rt.STATE_COMPLETE;if(t)return Rt.STATE_PAUSED;let s=Rt.STATE_WAITING,a=Object.keys(r);for(let o=0;o<a.length;o++){let{progress:n}=r[a[o]];if(n.uploadStarted&&!n.uploadComplete)return Rt.STATE_UPLOADING;n.preprocess&&s!==Rt.STATE_UPLOADING&&(s=Rt.STATE_PREPROCESSING),n.postprocess&&s!==Rt.STATE_UPLOADING&&s!==Rt.STATE_PREPROCESSING&&(s=Rt.STATE_POSTPROCESSING)}return s}function lc({files:i,i18n:e,isAllComplete:t,isAllErrored:r,isAllPaused:s,inProgressNotPausedFiles:a,newFiles:o,processingFiles:n}){switch(nc(r,t,s,i)){case"uploading":return e("uploadingXFiles",{smart_count:a.length});case"preprocessing":case"postprocessing":return e("processingXFiles",{smart_count:n.length});case"paused":return e("uploadPaused");case"waiting":return e("xFilesSelected",{smart_count:o.length});case"complete":return e("uploadComplete");case"error":return e("error");default:}}function pc(i){let{i18n:e,isAllComplete:t,hideCancelButton:r,maxNumberOfFiles:s,toggleAddFilesPanel:a,uppy:o}=i,{allowNewUpload:n}=i;return n&&s&&(n=i.totalFileCount<i.maxNumberOfFiles),l("div",{className:"uppy-DashboardContent-bar",children:[!t&&!r?l("button",{className:"uppy-DashboardContent-back",type:"button",onClick:()=>o.cancelAll(),children:e("cancel")}):l("div",{}),l("div",{className:"uppy-DashboardContent-title",children:l(lc,B({},i))}),n?l("button",{className:"uppy-DashboardContent-addMore",type:"button","aria-label":e("addMoreFiles"),title:e("addMoreFiles"),onClick:()=>a(!0),children:[l("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon",width:"15",height:"15",viewBox:"0 0 15 15",children:l("path",{d:"M8 6.5h6a.5.5 0 0 1 .5.5v.5a.5.5 0 0 1-.5.5H8v6a.5.5 0 0 1-.5.5H7a.5.5 0 0 1-.5-.5V8h-6a.5.5 0 0 1-.5-.5V7a.5.5 0 0 1 .5-.5h6v-6A.5.5 0 0 1 7 0h.5a.5.5 0 0 1 .5.5v6z"})}),l("span",{className:"uppy-DashboardContent-addMoreCaption",children:e("addMore")})]}):l("div",{})]})}var cp=pc;var mp=we($e(),1);var Li="uppy-transition-slideDownUp",fp=250;function dc({children:i}){let[e,t]=nt(null),[r,s]=nt(""),a=Dt(),o=Dt(),n=Dt(),u=Qt(()=>{s(`${Li}-enter`),cancelAnimationFrame(n.current),clearTimeout(o.current),o.current=void 0,n.current=requestAnimationFrame(()=>{s(`${Li}-enter ${Li}-enter-active`),a.current=setTimeout(()=>{s("")},fp)})},[]),c=Qt(()=>{s(`${Li}-leave`),cancelAnimationFrame(n.current),clearTimeout(a.current),a.current=void 0,n.current=requestAnimationFrame(()=>{s(`${Li}-leave ${Li}-leave-active`),o.current=setTimeout(()=>{t(null),s("")},fp)})},[]);return yt(()=>{let m=wt(i)[0];e!==m&&(m&&!e?u():e&&!m&&!o.current&&c(),t(m))},[i,e,u,c]),yt(()=>()=>{clearTimeout(a.current),clearTimeout(o.current),cancelAnimationFrame(n.current)},[]),e?Gr(e,{className:(0,mp.default)(r,e.props.className)}):null}var Qr=dc;var pt={STATE_ERROR:"error",STATE_WAITING:"waiting",STATE_PREPROCESSING:"preprocessing",STATE_UPLOADING:"uploading",STATE_POSTPROCESSING:"postprocessing",STATE_COMPLETE:"complete"};var Oa=we($e(),1);var Va=we(Xi(),1);var Ma=we($e(),1);var uc="\xB7",gp=()=>` ${uc} `;function yp(i){let{newFiles:e,isUploadStarted:t,recoveredState:r,i18n:s,uploadState:a,isSomeGhost:o,startUpload:n}=i,u=(0,Ma.default)("uppy-u-reset","uppy-c-btn","uppy-StatusBar-actionBtn","uppy-StatusBar-actionBtn--upload",{"uppy-c-btn-primary":a===pt.STATE_WAITING},{"uppy-StatusBar-actionBtn--disabled":o}),c=e&&t&&!r?s("uploadXNewFiles",{smart_count:e}):s("uploadXFiles",{smart_count:e});return l("button",{type:"button",className:u,"aria-label":s("uploadXFiles",{smart_count:e}),onClick:n,disabled:o,"data-uppy-super-focusable":!0,children:c})}function Qp(i){let{i18n:e,uppy:t}=i;return l("button",{type:"button",className:"uppy-u-reset uppy-c-btn uppy-StatusBar-actionBtn uppy-StatusBar-actionBtn--retry","aria-label":e("retryUpload"),onClick:()=>t.retryAll().catch(()=>{}),"data-uppy-super-focusable":!0,"data-cy":"retry",children:[l("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon",width:"8",height:"10",viewBox:"0 0 8 10",children:l("path",{d:"M4 2.408a2.75 2.75 0 1 0 2.75 2.75.626.626 0 0 1 1.25.018v.023a4 4 0 1 1-4-4.041V.25a.25.25 0 0 1 .389-.208l2.299 1.533a.25.25 0 0 1 0 .416l-2.3 1.533A.25.25 0 0 1 4 3.316v-.908z"})}),e("retry")]})}function xp(i){let{i18n:e,uppy:t}=i;return l("button",{type:"button",className:"uppy-u-reset uppy-StatusBar-actionCircleBtn",title:e("cancel"),"aria-label":e("cancel"),onClick:()=>t.cancelAll(),"data-cy":"cancel","data-uppy-super-focusable":!0,children:l("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon",width:"16",height:"16",viewBox:"0 0 16 16",children:l("g",{fill:"none",fillRule:"evenodd",children:[l("circle",{fill:"#888",cx:"8",cy:"8",r:"8"}),l("path",{fill:"#FFF",d:"M9.283 8l2.567 2.567-1.283 1.283L8 9.283 5.433 11.85 4.15 10.567 6.717 8 4.15 5.433 5.433 4.15 8 6.717l2.567-2.567 1.283 1.283z"})]})})})}function bp(i){let{isAllPaused:e,i18n:t,isAllComplete:r,resumableUploads:s,uppy:a}=i,o=t(e?"resume":"pause");function n(){if(!r){if(!s){a.cancelAll();return}if(e){a.resumeAll();return}a.pauseAll()}}return l("button",{title:o,"aria-label":o,className:"uppy-u-reset uppy-StatusBar-actionCircleBtn",type:"button",onClick:n,"data-cy":"togglePauseResume","data-uppy-super-focusable":!0,children:l("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-c-icon",width:"16",height:"16",viewBox:"0 0 16 16",children:l("g",{fill:"none",fillRule:"evenodd",children:[l("circle",{fill:"#888",cx:"8",cy:"8",r:"8"}),l("path",{fill:"#FFF",d:e?"M6 4.25L11.5 8 6 11.75z":"M5 4.5h2v7H5v-7zm4 0h2v7H9v-7z"})]})})})}function Fp(i){let{i18n:e,doneButtonHandler:t}=i;return l("button",{type:"button",className:"uppy-u-reset uppy-c-btn uppy-StatusBar-actionBtn uppy-StatusBar-actionBtn--done",onClick:t,"data-uppy-super-focusable":!0,children:e("done")})}function Bp(){return l("svg",{className:"uppy-StatusBar-spinner","aria-hidden":"true",focusable:"false",width:"14",height:"14",children:l("path",{d:"M13.983 6.547c-.12-2.509-1.64-4.893-3.939-5.936-2.48-1.127-5.488-.656-7.556 1.094C.524 3.367-.398 6.048.162 8.562c.556 2.495 2.46 4.52 4.94 5.183 2.932.784 5.61-.602 7.256-3.015-1.493 1.993-3.745 3.309-6.298 2.868-2.514-.434-4.578-2.349-5.153-4.84a6.226 6.226 0 0 1 2.98-6.778C6.34.586 9.74 1.1 11.373 3.493c.407.596.693 1.282.842 1.988.127.598.073 1.197.161 1.794.078.525.543 1.257 1.15.864.525-.341.49-1.05.456-1.592-.007-.15.02.3 0 0",fillRule:"evenodd"})})}function Up(i){let{progress:e}=i,{value:t,mode:r,message:s}=e;return l("div",{className:"uppy-StatusBar-content",children:[l(Bp,{}),r==="determinate"?`${Math.round(t*100)}% \xB7 `:"",s]})}function hc(i){let{numUploads:e,complete:t,totalUploadedSize:r,totalSize:s,totalETA:a,i18n:o}=i,n=e>1,u=(0,Va.default)(r);return l("div",{className:"uppy-StatusBar-statusSecondary",children:[n&&o("filesUploadedOfTotal",{complete:t,smart_count:e}),l("span",{className:"uppy-StatusBar-additionalInfo",children:[n&&gp(),s!=null?o("dataUploadedOfTotal",{complete:u,total:(0,Va.default)(s)}):o("dataUploadedOfUnknown",{complete:u}),gp(),a!=null&&o("xTimeLeft",{time:Mr(a)})]})]})}function Ep(i){let{i18n:e,complete:t,numUploads:r}=i;return l("div",{className:"uppy-StatusBar-statusSecondary",children:e("filesUploadedOfTotal",{complete:t,smart_count:r})})}function cc(i){let{i18n:e,newFiles:t,startUpload:r}=i,s=(0,Ma.default)("uppy-u-reset","uppy-c-btn","uppy-StatusBar-actionBtn","uppy-StatusBar-actionBtn--uploadNewlyAdded");return l("div",{className:"uppy-StatusBar-statusSecondary",children:[l("div",{className:"uppy-StatusBar-statusSecondaryHint",children:e("xMoreFilesAdded",{smart_count:t})}),l("button",{type:"button",className:s,"aria-label":e("uploadXFiles",{smart_count:t}),onClick:r,children:e("upload")})]})}function vp(i){let{i18n:e,supportsUploadProgress:t,totalProgress:r,hideProgressDetails:s,isUploadStarted:a,isAllComplete:o,isAllPaused:n,newFiles:u,numUploads:c,complete:m,totalUploadedSize:f,totalSize:E,totalETA:S,startUpload:D}=i,G=u&&a;if(!a||o)return null;let q=e(n?"paused":"uploading");function W(){return!n&&!G&&!s?t?l(hc,{numUploads:c,complete:m,totalUploadedSize:f,totalSize:E,totalETA:S,i18n:e}):l(Ep,{i18n:e,complete:m,numUploads:c}):null}return l("div",{className:"uppy-StatusBar-content",title:q,children:[n?null:l(Bp,{}),l("div",{className:"uppy-StatusBar-status",children:[l("div",{className:"uppy-StatusBar-statusPrimary",children:t&&r!==0?`${q}: ${r}%`:q}),W(),G?l(cc,{i18n:e,newFiles:u,startUpload:D}):null]})]})}function Sp(i){let{i18n:e}=i;return l("div",{className:"uppy-StatusBar-content",role:"status",title:e("complete"),children:l("div",{className:"uppy-StatusBar-status",children:l("div",{className:"uppy-StatusBar-statusPrimary",children:[l("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-StatusBar-statusIndicator uppy-c-icon",width:"15",height:"11",viewBox:"0 0 15 11",children:l("path",{d:"M.414 5.843L1.627 4.63l3.472 3.472L13.202 0l1.212 1.213L5.1 10.528z"})}),e("complete")]})})})}function wp(i){let{error:e,i18n:t,complete:r,numUploads:s}=i;function a(){let o=`${t("uploadFailed")}
20
20
 
21
- ${e}`;alert(o)}return l("div",{className:"uppy-StatusBar-content",title:t("uploadFailed"),children:[l("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-StatusBar-statusIndicator uppy-c-icon",width:"11",height:"11",viewBox:"0 0 11 11",children:l("path",{d:"M4.278 5.5L0 1.222 1.222 0 5.5 4.278 9.778 0 11 1.222 6.722 5.5 11 9.778 9.778 11 5.5 6.722 1.222 11 0 9.778z"})}),l("div",{className:"uppy-StatusBar-status",children:[l("div",{className:"uppy-StatusBar-statusPrimary",children:[t("uploadFailed"),l("button",{className:"uppy-u-reset uppy-StatusBar-details","aria-label":t("showErrorDetails"),"data-microtip-position":"top-right","data-microtip-size":"medium",onClick:a,type:"button",children:"?"})]}),l(Ep,{i18n:t,complete:r,numUploads:s})]})]})}function xr(i){let e=[],t="indeterminate",r;for(let{progress:a}of Object.values(i)){let{preprocess:o,postprocess:n}=a;r==null&&(o||n)&&({mode:t,message:r}=o||n),o?.mode==="determinate"&&e.push(o.value),n?.mode==="determinate"&&e.push(n.value)}let s=e.reduce((a,o)=>a+o/e.length,0);return{mode:t,message:r,value:s}}var{STATE_ERROR:Dp,STATE_WAITING:fc,STATE_PREPROCESSING:za,STATE_UPLOADING:fs,STATE_POSTPROCESSING:Aa,STATE_COMPLETE:ms}=pt;function Ga({newFiles:i,allowNewUpload:e,isUploadInProgress:t,isAllPaused:r,resumableUploads:s,error:a,hideUploadButton:o=void 0,hidePauseResumeButton:n=!1,hideCancelButton:u=!1,hideRetryButton:c=!1,recoveredState:m,uploadState:f,totalProgress:E,files:S,supportsUploadProgress:D,hideAfterFinish:G=!1,isSomeGhost:q,doneButtonHandler:W=void 0,isUploadStarted:te,i18n:H,startUpload:ue,uppy:$,isAllComplete:Q,hideProgressDetails:x=void 0,numUploads:U,complete:V,totalSize:A,totalETA:Y,totalUploadedSize:fe}){function Ee(){switch(f){case Aa:case za:{let re=xr(S);return re.mode==="determinate"?re.value*100:E}case Dp:return null;case fs:return D?E:null;default:return E}}function Te(){switch(f){case Aa:case za:{let{mode:re}=xr(S);return re==="indeterminate"}case fs:return!D;default:return!1}}let le=Ee(),xe=le??100,ie=!a&&i&&(!t&&!r||m)&&e&&!o,pe=!u&&f!==fc&&f!==ms,ne=s&&!n&&f===fs,de=a&&!Q&&!c,X=W&&f===ms,T=(0,Oa.default)("uppy-StatusBar-progress",{"is-indeterminate":Te()}),v=(0,Oa.default)("uppy-StatusBar",`is-${f}`,{"has-ghosts":q}),N=(()=>{switch(f){case za:case Aa:return l(Up,{progress:xr(S)});case ms:return l(Sp,{i18n:H});case Dp:return l(wp,{error:a,i18n:H,numUploads:U,complete:V});case fs:return l(vp,{i18n:H,supportsUploadProgress:D,totalProgress:E,hideProgressDetails:x,isUploadStarted:te,isAllComplete:Q,isAllPaused:r,newFiles:i,numUploads:U,complete:V,totalUploadedSize:fe,totalSize:A,totalETA:Y,startUpload:ue});default:return null}})();return!(ie||de||ne||pe||X)&&!N||f===ms&&G?null:l("div",{className:v,children:[l("div",{className:T,style:{width:`${xe}%`},role:"progressbar","aria-label":`${xe}%`,"aria-valuetext":`${xe}%`,"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":le}),N,l("div",{className:"uppy-StatusBar-actions",children:[ie?l(yp,{newFiles:i,isUploadStarted:te,recoveredState:m,i18n:H,isSomeGhost:q,startUpload:ue,uploadState:f}):null,de?l(Qp,{i18n:H,uppy:$}):null,ne?l(bp,{isAllPaused:r,i18n:H,isAllComplete:Q,resumableUploads:s,uppy:$}):null,pe?l(xp,{i18n:H,uppy:$}):null,X?l(Fp,{i18n:H,doneButtonHandler:W}):null]})]})}var mc=2e3,gc=2e3;function yc(i,e,t,r){if(i)return pt.STATE_ERROR;if(e)return pt.STATE_COMPLETE;if(t)return pt.STATE_WAITING;let s=pt.STATE_WAITING,a=Object.keys(r);for(let o=0;o<a.length;o++){let{progress:n}=r[a[o]];if(n.uploadStarted&&!n.uploadComplete)return pt.STATE_UPLOADING;n.preprocess&&(s=pt.STATE_PREPROCESSING),n.postprocess&&s!==pt.STATE_PREPROCESSING&&(s=pt.STATE_POSTPROCESSING)}return s}var gs=class extends je{#e;#t;#i;#r;componentDidMount(){this.#e=performance.now(),this.#t=this.props.uppy.getFiles().reduce((e,t)=>e+(t.progress.bytesUploaded||0),0),this.props.uppy.on("upload",this.#s)}componentWillUnmount(){this.props.uppy.off("upload",this.#s)}#s=()=>{let{recoveredState:e}=this.props.uppy.getState();if(this.#i=null,this.#r=null,e){this.#t=Object.values(e.files).reduce((t,{progress:r})=>t+(r.bytesUploaded||0),0);return}this.#e=performance.now(),this.#t=0};#p(e){if(e.total==null||e.total===0)return null;let t=e.total-e.uploaded;if(t<=0)return null;this.#e??=performance.now();let r=performance.now()-this.#e;if(r===0)return Math.round((this.#r??0)/100)/10;if(this.#t==null)return this.#t=e.uploaded,null;let s=e.uploaded-this.#t;if(this.#t=e.uploaded,s<=0)return Math.round((this.#r??0)/100)/10;let a=s/r;if(!Number.isFinite(a)||a<=0)return null;let o=this.#i==null?a:_i(a,this.#i,mc,r);if(!Number.isFinite(o)||o<=0)return null;this.#i=o;let n=t/o;if(!Number.isFinite(n)||n<0)return null;let u=Math.max((this.#r??0)-r,0),c=this.#r==null?n:_i(n,u,gc,r);return!Number.isFinite(c)||c<0?null:(this.#r=c,this.#e=performance.now(),Math.round(c/100)/10)}startUpload=()=>{let{recoveredState:e}=this.props.uppy.getState();e?this.props.uppy.emit("restore-confirmed"):this.props.uppy.upload().catch(()=>{})};render(){let{capabilities:e,files:t,allowNewUpload:r,totalProgress:s,error:a,recoveredState:o}=this.props.uppy.getState(),{newFiles:n,startedFiles:u,completeFiles:c,isUploadStarted:m,isAllComplete:f,isAllPaused:E,isUploadInProgress:S,isSomeGhost:D}=this.props.uppy.getObjectOfFilesPerState(),G=o?Object.values(t):n,q=!!e.resumableUploads,W=e.uploadProgress!==!1,te=null,H=0;u.every($=>$.progress.bytesTotal!=null&&$.progress.bytesTotal!==0)?(te=0,u.forEach($=>{te+=$.progress.bytesTotal||0,H+=$.progress.bytesUploaded||0})):u.forEach($=>{H+=$.progress.bytesUploaded||0});let ue=this.#p({uploaded:H,total:te});return l(Ga,{error:a,uploadState:yc(a,f,o,t||{}),allowNewUpload:r,totalProgress:s,totalSize:te,totalUploadedSize:H,isAllComplete:f,isAllPaused:E,isUploadStarted:m,isUploadInProgress:S,isSomeGhost:D,recoveredState:o,complete:c.length,newFiles:G.length,numUploads:u.length,totalETA:ue,files:t,i18n:this.props.i18n,uppy:this.props.uppy,startUpload:this.startUpload,doneButtonHandler:this.props.doneButtonHandler,resumableUploads:q,supportsUploadProgress:W,hideProgressDetails:this.props.hideProgressDetails,hideUploadButton:this.props.hideUploadButton,hideRetryButton:this.props.hideRetryButton,hidePauseResumeButton:this.props.hidePauseResumeButton,hideCancelButton:this.props.hideCancelButton,hideAfterFinish:this.props.hideAfterFinish})}};var Lp=900,Rp=700,Ha=576,Np=330;function ja(i){let e=i.totalFileCount===0,t=i.totalFileCount===1,r=i.containerWidth>Ha,s=i.containerHeight>Np,a=(0,kp.default)({"uppy-Dashboard":!0,"uppy-Dashboard--isDisabled":i.disabled,"uppy-Dashboard--animateOpenClose":i.animateOpenClose,"uppy-Dashboard--isClosing":i.isClosing,"uppy-Dashboard--isDraggingOver":i.isDraggingOver,"uppy-Dashboard--modal":!i.inline,"uppy-size--md":i.containerWidth>Ha,"uppy-size--lg":i.containerWidth>Rp,"uppy-size--xl":i.containerWidth>Lp,"uppy-size--height-md":i.containerHeight>Np,"uppy-Dashboard--isAddFilesPanelVisible":i.showAddFilesPanel,"uppy-Dashboard--isInnerWrapVisible":i.areInsidesReadyToBeVisible,"uppy-Dashboard--singleFile":i.singleFileFullScreen&&t&&s}),o=1;i.containerWidth>Lp?o=5:i.containerWidth>Rp?o=4:i.containerWidth>Ha&&(o=3);let n=i.showSelectedFiles&&!e,u=i.recoveredState?Object.keys(i.recoveredState.files).length:null,c=i.files?Object.keys(i.files).filter(E=>i.files[E].isGhost).length:0,m=()=>c>0?i.i18n("recoveredXFiles",{smart_count:c}):i.i18n("recoveredAllFiles");return l("div",{className:a,"data-uppy-theme":i.theme,"data-uppy-num-acquirers":i.acquirers.length,"data-uppy-drag-drop-supported":!i.disableLocalFiles&&Vr(),"aria-hidden":i.inline?"false":i.isHidden,"aria-disabled":i.disabled,"aria-label":i.inline?i.i18n("dashboardTitle"):i.i18n("dashboardWindowTitle"),onPaste:i.handlePaste,onDragOver:i.handleDragOver,onDragLeave:i.handleDragLeave,onDrop:i.handleDrop,children:[l("div",{"aria-hidden":"true",className:"uppy-Dashboard-overlay",tabIndex:-1,onClick:i.handleClickOutside}),l("div",{className:"uppy-Dashboard-inner",role:i.inline?void 0:"dialog",style:{width:i.inline&&i.width?i.width:"",height:i.inline&&i.height?i.height:""},children:[i.inline?null:l("button",{className:"uppy-u-reset uppy-Dashboard-close",type:"button","aria-label":i.i18n("closeModal"),title:i.i18n("closeModal"),onClick:i.closeModal,children:l("span",{"aria-hidden":"true",children:"\xD7"})}),l("div",{className:"uppy-Dashboard-innerWrap",children:[l("div",{className:"uppy-Dashboard-dropFilesHereHint",children:i.i18n("dropHint")}),n&&l(cp,B({},i)),u&&l("div",{className:"uppy-Dashboard-serviceMsg",children:[l("svg",{className:"uppy-Dashboard-serviceMsg-icon","aria-hidden":"true",focusable:"false",width:"21",height:"16",viewBox:"0 0 24 19",children:l("g",{transform:"translate(0 -1)",fill:"none",fillRule:"evenodd",children:[l("path",{d:"M12.857 1.43l10.234 17.056A1 1 0 0122.234 20H1.766a1 1 0 01-.857-1.514L11.143 1.429a1 1 0 011.714 0z",fill:"#FFD300"}),l("path",{fill:"#000",d:"M11 6h2l-.3 8h-1.4z"}),l("circle",{fill:"#000",cx:"12",cy:"17",r:"1"})]})}),l("strong",{className:"uppy-Dashboard-serviceMsg-title",children:i.i18n("sessionRestored")}),l("div",{className:"uppy-Dashboard-serviceMsg-text",children:m()})]}),n?l(_a,{id:i.id,i18n:i.i18n,uppy:i.uppy,files:i.files,resumableUploads:i.resumableUploads,hideRetryButton:i.hideRetryButton,hidePauseResumeButton:i.hidePauseResumeButton,hideCancelButton:i.hideCancelButton,showLinkToFileUploadResult:i.showLinkToFileUploadResult,showRemoveButtonAfterComplete:i.showRemoveButtonAfterComplete,metaFields:i.metaFields,toggleFileCard:i.toggleFileCard,handleRequestThumbnail:i.handleRequestThumbnail,handleCancelThumbnail:i.handleCancelThumbnail,recoveredState:i.recoveredState,individualCancellation:i.individualCancellation,openFileEditor:i.openFileEditor,canEditFile:i.canEditFile,toggleAddFilesPanel:i.toggleAddFilesPanel,isSingleFile:t,itemsPerRow:o,containerWidth:i.containerWidth,containerHeight:i.containerHeight}):l(ds,{i18n:i.i18n,i18nArray:i.i18nArray,acquirers:i.acquirers,handleInputChange:i.handleInputChange,maxNumberOfFiles:i.maxNumberOfFiles,allowedFileTypes:i.allowedFileTypes,showNativePhotoCameraButton:i.showNativePhotoCameraButton,showNativeVideoCameraButton:i.showNativeVideoCameraButton,nativeCameraFacingMode:i.nativeCameraFacingMode,showPanel:i.showPanel,activePickerPanel:i.activePickerPanel,disableLocalFiles:i.disableLocalFiles,fileManagerSelectionType:i.fileManagerSelectionType,note:i.note,proudlyDisplayPoweredByUppy:i.proudlyDisplayPoweredByUppy}),l(Qr,{children:i.showAddFilesPanel?l(tp,J(B({},i),{isSizeMD:r}),"AddFiles"):null}),l(Qr,{children:i.fileCardFor?l(La,B({},i),"FileCard"):null}),l(Qr,{children:i.activePickerPanel?l(hp,B({},i),"Picker"):null}),l(Qr,{children:i.showFileEditor?l(rp,B({},i),"Editor"):null}),l("div",{className:"uppy-Dashboard-progressindicators",children:[!i.disableInformer&&l(yr,{uppy:i.uppy}),!i.disableStatusBar&&l(gs,{uppy:i.uppy,i18n:i.i18n,hideProgressDetails:i.hideProgressDetails,hideUploadButton:i.hideUploadButton,hideRetryButton:i.hideRetryButton,hidePauseResumeButton:i.hidePauseResumeButton,hideCancelButton:i.hideCancelButton,hideAfterFinish:i.hideProgressAfterFinish,doneButtonHandler:i.doneButtonHandler}),!i.disableInformer&&l(yr,{uppy:i.uppy}),i.progressindicators.map(E=>i.uppy.getPlugin(E.id).render(i.state))]})]})]})]})}var Cp={strings:{closeModal:"Close Modal",addMoreFiles:"Add more files",addingMoreFiles:"Adding more files",importFrom:"Import from %{name}",dashboardWindowTitle:"Uppy Dashboard Window (Press escape to close)",dashboardTitle:"Uppy Dashboard",copyLinkToClipboardSuccess:"Link copied to clipboard.",copyLinkToClipboardFallback:"Copy the URL below",copyLink:"Copy link",back:"Back",removeFile:"Remove file",editFile:"Edit file",editImage:"Edit image",editing:"Editing %{file}",error:"Error",finishEditingFile:"Finish editing file",saveChanges:"Save changes",myDevice:"My Device",dropHint:"Drop your files here",uploadComplete:"Upload complete",uploadPaused:"Upload paused",resumeUpload:"Resume upload",pauseUpload:"Pause upload",retryUpload:"Retry upload",cancelUpload:"Cancel upload",xFilesSelected:{0:"%{smart_count} file selected",1:"%{smart_count} files selected"},uploadingXFiles:{0:"Uploading %{smart_count} file",1:"Uploading %{smart_count} files"},processingXFiles:{0:"Processing %{smart_count} file",1:"Processing %{smart_count} files"},poweredBy:"Powered by %{uppy}",addMore:"Add more",editFileWithFilename:"Edit file %{file}",save:"Save",cancel:"Cancel",dropPasteFiles:"Drop files here or %{browseFiles}",dropPasteFolders:"Drop files here or %{browseFolders}",dropPasteBoth:"Drop files here, %{browseFiles} or %{browseFolders}",dropPasteImportFiles:"Drop files here, %{browseFiles} or import from:",dropPasteImportFolders:"Drop files here, %{browseFolders} or import from:",dropPasteImportBoth:"Drop files here, %{browseFiles}, %{browseFolders} or import from:",importFiles:"Import files from:",browseFiles:"browse files",browseFolders:"browse folders",recoveredXFiles:{0:"We could not fully recover 1 file. Please re-select it and resume the upload.",1:"We could not fully recover %{smart_count} files. Please re-select them and resume the upload."},recoveredAllFiles:"We restored all files. You can now resume the upload.",sessionRestored:"Session restored",reSelect:"Re-select",missingRequiredMetaFields:{0:"Missing required meta field: %{fields}.",1:"Missing required meta fields: %{fields}."},takePictureBtn:"Take Picture",recordVideoBtn:"Record Video",uploading:"Uploading",complete:"Complete",uploadFailed:"Upload failed",paused:"Paused",retry:"Retry",pause:"Pause",resume:"Resume",done:"Done",filesUploadedOfTotal:{0:"%{complete} of %{smart_count} file uploaded",1:"%{complete} of %{smart_count} files uploaded"},dataUploadedOfTotal:"%{complete} of %{total}",dataUploadedOfUnknown:"%{complete} of unknown",xTimeLeft:"%{time} left",uploadXFiles:{0:"Upload %{smart_count} file",1:"Upload %{smart_count} files"},uploadXNewFiles:{0:"Upload +%{smart_count} file",1:"Upload +%{smart_count} files"},upload:"Upload",xMoreFilesAdded:{0:"%{smart_count} more file added",1:"%{smart_count} more files added"},showErrorDetails:"Show error details"}};var Tp=we(Zr(),1);function br(i,e){if(e){let t=i.querySelector(`[data-uppy-paneltype="${e}"]`);if(t)return t}return i}function Ja(){let i=!1;return(0,Tp.default)((t,r)=>{let s=br(t,r),a=s.contains(document.activeElement);if(a&&i)return;let o=s.querySelector("[data-uppy-super-focusable]");a&&!o||(o?(o.focus({preventScroll:!0}),i=!0):(s.querySelector(Vi)?.focus({preventScroll:!0}),i=!1))},260)}function Ip(i,e){let t=e[0];t&&(t.focus(),i.preventDefault())}function Qc(i,e){let t=e[e.length-1];t&&(t.focus(),i.preventDefault())}function xc(i){return i.contains(document.activeElement)}function Za(i,e,t){let r=br(t,e),s=Tt(r.querySelectorAll(Vi)),a=s.indexOf(document.activeElement);xc(r)?i.shiftKey&&a===0?Qc(i,s):!i.shiftKey&&a===s.length-1&&Ip(i,s):Ip(i,s)}function Pp(i,e,t){e===null||Za(i,e,t)}var _p=9,Fc=27;function Vp(){let i={};return i.promise=new Promise((e,t)=>{i.resolve=e,i.reject=t}),i}var Bc={target:"body",metaFields:[],thumbnailWidth:280,thumbnailType:"image/jpeg",waitForThumbnailsBeforeUpload:!1,defaultPickerIcon:sr,showLinkToFileUploadResult:!1,hideProgressDetails:!1,hideUploadButton:!1,hideCancelButton:!1,hideRetryButton:!1,hidePauseResumeButton:!1,hideProgressAfterFinish:!1,note:null,singleFileFullScreen:!0,disableStatusBar:!1,disableInformer:!1,disableThumbnailGenerator:!1,fileManagerSelectionType:"files",proudlyDisplayPoweredByUppy:!0,showSelectedFiles:!0,showRemoveButtonAfterComplete:!1,showNativePhotoCameraButton:!1,showNativeVideoCameraButton:!1,theme:"light",autoOpen:null,disabled:!1,disableLocalFiles:!1,nativeCameraFacingMode:"",onDragLeave:()=>{},onDragOver:()=>{},onDrop:()=>{},plugins:[],doneButtonHandler:void 0,onRequestCloseModal:null,inline:!1,animateOpenClose:!0,browserBackButtonClose:!1,closeAfterFinish:!1,closeModalOnClickOutside:!1,disablePageScrollWhenModalOpen:!0,trigger:null,width:750,height:550},Ri=class extends ri{static VERSION=$l.version;#e;modalName=`uppy-Dashboard-${zt()}`;superFocus=Ja();ifFocusedOnUppyRecently=!1;dashboardIsDisabled;savedScrollPosition;savedActiveElement;resizeObserver;darkModeMediaQuery;makeDashboardInsidesVisibleAnywayTimeout;constructor(e,t){let r=t?.autoOpen??null;super(e,J(B(B({},Bc),t),{autoOpen:r})),this.id=this.opts.id||"Dashboard",this.title="Dashboard",this.type="orchestrator",this.defaultLocale=Cp,this.opts.doneButtonHandler===void 0&&(this.opts.doneButtonHandler=()=>{this.uppy.clear(),this.requestCloseModal()}),this.opts.onRequestCloseModal??=()=>this.closeModal(),this.i18nInit()}removeTarget=e=>{let r=this.getPluginState().targets.filter(s=>s.id!==e.id);this.setPluginState({targets:r})};addTarget=e=>{let t=e.id||e.constructor.name,r=e.title||t,s=e.type;if(s!=="acquirer"&&s!=="progressindicator"&&s!=="editor")return this.uppy.log("Dashboard: can only be targeted by plugins of types: acquirer, progressindicator, editor","error"),null;let a={id:t,name:r,type:s},n=this.getPluginState().targets.slice();return n.push(a),this.setPluginState({targets:n}),this.el};hideAllPanels=()=>{let e=this.getPluginState(),t={activePickerPanel:void 0,showAddFilesPanel:!1,activeOverlayType:null,fileCardFor:null,showFileEditor:!1};e.activePickerPanel===t.activePickerPanel&&e.showAddFilesPanel===t.showAddFilesPanel&&e.showFileEditor===t.showFileEditor&&e.activeOverlayType===t.activeOverlayType||(this.setPluginState(t),this.uppy.emit("dashboard:close-panel",e.activePickerPanel?.id))};showPanel=e=>{let{targets:t}=this.getPluginState(),r=t.find(s=>s.type==="acquirer"&&s.id===e);this.setPluginState({activePickerPanel:r,activeOverlayType:"PickerPanel"}),this.uppy.emit("dashboard:show-panel",e)};canEditFile=e=>{let{targets:t}=this.getPluginState();return this.#n(t).some(s=>this.uppy.getPlugin(s.id).canEditFile(e))};openFileEditor=e=>{let{targets:t}=this.getPluginState(),r=this.#n(t);this.setPluginState({showFileEditor:!0,fileCardFor:e.id||null,activeOverlayType:"FileEditor"}),r.forEach(s=>{this.uppy.getPlugin(s.id).selectFile(e)})};closeFileEditor=()=>{let{metaFields:e}=this.getPluginState();e&&e.length>0?this.setPluginState({showFileEditor:!1,activeOverlayType:"FileCard"}):this.setPluginState({showFileEditor:!1,fileCardFor:null,activeOverlayType:"AddFiles"})};saveFileEditor=()=>{let{targets:e}=this.getPluginState();this.#n(e).forEach(r=>{this.uppy.getPlugin(r.id).save()}),this.closeFileEditor()};openModal=()=>{let{promise:e,resolve:t}=Vp();if(this.savedScrollPosition=window.pageYOffset,this.savedActiveElement=document.activeElement,this.opts.disablePageScrollWhenModalOpen&&document.body.classList.add("uppy-Dashboard-isFixed"),this.opts.animateOpenClose&&this.getPluginState().isClosing){let r=()=>{this.setPluginState({isHidden:!1}),this.el.removeEventListener("animationend",r,!1),t()};this.el.addEventListener("animationend",r,!1)}else this.setPluginState({isHidden:!1}),t();return this.opts.browserBackButtonClose&&this.updateBrowserHistory(),document.addEventListener("keydown",this.handleKeyDownInModal),this.uppy.emit("dashboard:modal-open"),e};closeModal=e=>{let t=e?.manualClose??!0,{isHidden:r,isClosing:s}=this.getPluginState();if(r||s)return;let{promise:a,resolve:o}=Vp();if(this.opts.disablePageScrollWhenModalOpen&&document.body.classList.remove("uppy-Dashboard-isFixed"),this.opts.animateOpenClose){this.setPluginState({isClosing:!0});let n=()=>{this.setPluginState({isHidden:!0,isClosing:!1}),this.superFocus.cancel(),this.savedActiveElement.focus(),this.el.removeEventListener("animationend",n,!1),o()};this.el.addEventListener("animationend",n,!1)}else this.setPluginState({isHidden:!0}),this.superFocus.cancel(),this.savedActiveElement.focus(),o();return document.removeEventListener("keydown",this.handleKeyDownInModal),t&&this.opts.browserBackButtonClose&&history.state?.[this.modalName]&&history.back(),this.uppy.emit("dashboard:modal-closed"),a};isModalOpen=()=>!this.getPluginState().isHidden||!1;requestCloseModal=()=>this.opts.onRequestCloseModal?this.opts.onRequestCloseModal():this.closeModal();setDarkModeCapability=e=>{let{capabilities:t}=this.uppy.getState();this.uppy.setState({capabilities:J(B({},t),{darkMode:e})})};handleSystemDarkModeChange=e=>{let t=e.matches;this.uppy.log(`[Dashboard] Dark mode is ${t?"on":"off"}`),this.setDarkModeCapability(t)};toggleFileCard=(e,t)=>{let r=this.uppy.getFile(t);e?this.uppy.emit("dashboard:file-edit-start",r):this.uppy.emit("dashboard:file-edit-complete",r),this.setPluginState({fileCardFor:e?t:null,activeOverlayType:e?"FileCard":null})};toggleAddFilesPanel=e=>{this.setPluginState({showAddFilesPanel:e,activeOverlayType:e?"AddFiles":null})};addFiles=e=>{let t=e.map(r=>({source:this.id,name:r.name,type:r.type,data:r,meta:{relativePath:r.relativePath||r.webkitRelativePath||null}}));try{this.uppy.addFiles(t)}catch(r){this.uppy.log(r)}};startListeningToResize=()=>{this.resizeObserver=new ResizeObserver(e=>{let t=e[0],{width:r,height:s}=t.contentRect;this.setPluginState({containerWidth:r,containerHeight:s,areInsidesReadyToBeVisible:!0})}),this.resizeObserver.observe(this.el.querySelector(".uppy-Dashboard-inner")),this.makeDashboardInsidesVisibleAnywayTimeout=setTimeout(()=>{let e=this.getPluginState(),t=!this.opts.inline&&e.isHidden;!e.areInsidesReadyToBeVisible&&!t&&(this.uppy.log("[Dashboard] resize event didn\u2019t fire on time: defaulted to mobile layout","warning"),this.setPluginState({areInsidesReadyToBeVisible:!0}))},1e3)};stopListeningToResize=()=>{this.resizeObserver.disconnect(),clearTimeout(this.makeDashboardInsidesVisibleAnywayTimeout)};recordIfFocusedOnUppyRecently=e=>{this.el.contains(e.target)?this.ifFocusedOnUppyRecently=!0:(this.ifFocusedOnUppyRecently=!1,this.superFocus.cancel())};disableInteractiveElements=e=>{let t=["a[href]","input:not([disabled])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])",'[role="button"]:not([disabled])'],r=this.#e??Tt(this.el.querySelectorAll(t)).filter(s=>!s.classList.contains("uppy-Dashboard-close"));for(let s of r)s.tagName==="A"?s.setAttribute("aria-disabled",e):s.disabled=e;e?this.#e=r:this.#e=null,this.dashboardIsDisabled=e};updateBrowserHistory=()=>{history.state?.[this.modalName]||history.pushState(J(B({},history.state),{[this.modalName]:!0}),""),window.addEventListener("popstate",this.handlePopState,!1)};handlePopState=e=>{this.isModalOpen()&&(!e.state||!e.state[this.modalName])&&this.closeModal({manualClose:!1}),!this.isModalOpen()&&e.state?.[this.modalName]&&history.back()};handleKeyDownInModal=e=>{e.keyCode===Fc&&this.requestCloseModal(),e.keyCode===_p&&Za(e,this.getPluginState().activeOverlayType,this.el)};handleClickOutside=()=>{this.opts.closeModalOnClickOutside&&this.requestCloseModal()};handlePaste=e=>{this.uppy.iteratePlugins(r=>{r.type==="acquirer"&&r.handleRootPaste?.(e)});let t=Tt(e.clipboardData.files);t.length>0&&(this.uppy.log("[Dashboard] Files pasted"),this.addFiles(t))};handleInputChange=e=>{e.preventDefault();let t=Tt(e.currentTarget.files||[]);t.length>0&&(this.uppy.log("[Dashboard] Files selected through input"),this.addFiles(t))};handleDragOver=e=>{e.preventDefault(),e.stopPropagation();let t=()=>{let o=!0;return this.uppy.iteratePlugins(n=>{n.canHandleRootDrop?.(e)&&(o=!0)}),o},r=()=>{let{types:o}=e.dataTransfer;return o.some(n=>n==="Files")},s=t(),a=r();if(!s&&!a||this.opts.disabled||this.opts.disableLocalFiles&&(a||!s)||!this.uppy.getState().allowNewUpload){e.dataTransfer.dropEffect="none";return}e.dataTransfer.dropEffect="copy",this.setPluginState({isDraggingOver:!0}),this.opts.onDragOver(e)};handleDragLeave=e=>{e.preventDefault(),e.stopPropagation(),this.setPluginState({isDraggingOver:!1}),this.opts.onDragLeave(e)};handleDrop=e=>j(this,null,function*(){e.preventDefault(),e.stopPropagation(),this.setPluginState({isDraggingOver:!1}),this.uppy.iteratePlugins(a=>{a.type==="acquirer"&&a.handleRootDrop?.(e)});let t=!1,r=a=>{this.uppy.log(a,"error"),t||(this.uppy.info(a.message,"error"),t=!0)};this.uppy.log("[Dashboard] Processing dropped files");let s=yield _r(e.dataTransfer,{logDropError:r});s.length>0&&(this.uppy.log("[Dashboard] Files dropped"),this.addFiles(s)),this.opts.onDrop(e)});handleRequestThumbnail=e=>{this.opts.waitForThumbnailsBeforeUpload||this.uppy.emit("thumbnail:request",e)};handleCancelThumbnail=e=>{this.opts.waitForThumbnailsBeforeUpload||this.uppy.emit("thumbnail:cancel",e)};handleKeyDownInInline=e=>{e.keyCode===_p&&Pp(e,this.getPluginState().activeOverlayType,this.el)};handlePasteOnBody=e=>{this.el.contains(document.activeElement)&&this.handlePaste(e)};handleComplete=({failed:e})=>{this.opts.closeAfterFinish&&!e?.length&&this.requestCloseModal()};#t=()=>{if(this.opts.disableThumbnailGenerator)return;let e=600,t=this.uppy.getFiles();if(t.length===1){let r=this.uppy.getPlugin(`${this.id}:ThumbnailGenerator`);r?.setOptions({thumbnailWidth:e});let s=J(B({},t[0]),{preview:void 0});r?.requestThumbnail(s).then(()=>{r?.setOptions({thumbnailWidth:this.opts.thumbnailWidth})})}};#i=e=>{let t=e[0],{metaFields:r}=this.getPluginState(),s=r&&r.length>0,a=this.canEditFile(t);s&&this.opts.autoOpen==="metaEditor"?this.toggleFileCard(!0,t.id):a&&this.opts.autoOpen==="imageEditor"&&this.openFileEditor(t)};initEvents=()=>{if(this.opts.trigger&&!this.opts.inline){let e=Ir(this.opts.trigger);e?e.forEach(t=>t.addEventListener("click",this.openModal)):this.uppy.log("Dashboard modal trigger not found. Make sure `trigger` is set in Dashboard options, unless you are planning to call `dashboard.openModal()` method yourself","warning")}this.startListeningToResize(),document.addEventListener("paste",this.handlePasteOnBody),this.uppy.on("plugin-added",this.#l),this.uppy.on("plugin-remove",this.removeTarget),this.uppy.on("file-added",this.hideAllPanels),this.uppy.on("dashboard:modal-closed",this.hideAllPanels),this.uppy.on("complete",this.handleComplete),this.uppy.on("files-added",this.#t),this.uppy.on("file-removed",this.#t),document.addEventListener("focus",this.recordIfFocusedOnUppyRecently,!0),document.addEventListener("click",this.recordIfFocusedOnUppyRecently,!0),this.opts.inline&&this.el.addEventListener("keydown",this.handleKeyDownInInline),this.opts.autoOpen&&this.uppy.on("files-added",this.#i)};removeEvents=()=>{let e=Ir(this.opts.trigger);!this.opts.inline&&e&&e.forEach(t=>t.removeEventListener("click",this.openModal)),this.stopListeningToResize(),document.removeEventListener("paste",this.handlePasteOnBody),window.removeEventListener("popstate",this.handlePopState,!1),this.uppy.off("plugin-added",this.#l),this.uppy.off("plugin-remove",this.removeTarget),this.uppy.off("file-added",this.hideAllPanels),this.uppy.off("dashboard:modal-closed",this.hideAllPanels),this.uppy.off("complete",this.handleComplete),this.uppy.off("files-added",this.#t),this.uppy.off("file-removed",this.#t),document.removeEventListener("focus",this.recordIfFocusedOnUppyRecently),document.removeEventListener("click",this.recordIfFocusedOnUppyRecently),this.opts.inline&&this.el.removeEventListener("keydown",this.handleKeyDownInInline),this.opts.autoOpen&&this.uppy.off("files-added",this.#i)};superFocusOnEachUpdate=()=>{let e=this.el.contains(document.activeElement),t=document.activeElement===document.body||document.activeElement===null,r=this.uppy.getState().info.length===0,s=!this.opts.inline;r&&(s||e||t&&this.ifFocusedOnUppyRecently)?this.superFocus(this.el,this.getPluginState().activeOverlayType):this.superFocus.cancel()};afterUpdate=()=>{if(this.opts.disabled&&!this.dashboardIsDisabled){this.disableInteractiveElements(!0);return}!this.opts.disabled&&this.dashboardIsDisabled&&this.disableInteractiveElements(!1),this.superFocusOnEachUpdate()};saveFileCard=(e,t)=>{this.uppy.setFileMeta(t,e),this.toggleFileCard(!1,t)};#r=e=>{let t=this.uppy.getPlugin(e.id);return J(B({},e),{icon:t.icon||this.opts.defaultPickerIcon,render:t.render})};#s=e=>{let t=this.uppy.getPlugin(e.id);return typeof t.isSupported!="function"?!0:t.isSupported()};#p=e=>e.filter(t=>t.type==="acquirer"&&this.#s(t)).map(this.#r);#o=e=>e.filter(t=>t.type==="progressindicator").map(this.#r);#n=e=>e.filter(t=>t.type==="editor").map(this.#r);render=e=>{let t=this.getPluginState(),{files:r,capabilities:s,allowNewUpload:a}=e,{newFiles:o,uploadStartedFiles:n,completeFiles:u,erroredFiles:c,inProgressFiles:m,inProgressNotPausedFiles:f,processingFiles:E,isUploadStarted:S,isAllComplete:D,isAllPaused:G}=this.uppy.getObjectOfFilesPerState(),q=this.#p(t.targets),W=this.#o(t.targets),te=this.#n(t.targets),H;return this.opts.theme==="auto"?H=s.darkMode?"dark":"light":H=this.opts.theme,["files","folders","both"].indexOf(this.opts.fileManagerSelectionType)<0&&(this.opts.fileManagerSelectionType="files",console.warn(`Unsupported option for "fileManagerSelectionType". Using default of "${this.opts.fileManagerSelectionType}".`)),ja({state:e,isHidden:t.isHidden,files:r,newFiles:o,uploadStartedFiles:n,completeFiles:u,erroredFiles:c,inProgressFiles:m,inProgressNotPausedFiles:f,processingFiles:E,isUploadStarted:S,isAllComplete:D,isAllPaused:G,totalFileCount:Object.keys(r).length,totalProgress:e.totalProgress,allowNewUpload:a,acquirers:q,theme:H,disabled:this.opts.disabled,disableLocalFiles:this.opts.disableLocalFiles,direction:this.opts.direction,activePickerPanel:t.activePickerPanel,showFileEditor:t.showFileEditor,saveFileEditor:this.saveFileEditor,closeFileEditor:this.closeFileEditor,disableInteractiveElements:this.disableInteractiveElements,animateOpenClose:this.opts.animateOpenClose,isClosing:t.isClosing,progressindicators:W,editors:te,autoProceed:this.uppy.opts.autoProceed,id:this.id,closeModal:this.requestCloseModal,handleClickOutside:this.handleClickOutside,handleInputChange:this.handleInputChange,handlePaste:this.handlePaste,inline:this.opts.inline,showPanel:this.showPanel,hideAllPanels:this.hideAllPanels,i18n:this.i18n,i18nArray:this.i18nArray,uppy:this.uppy,note:this.opts.note,recoveredState:e.recoveredState,metaFields:t.metaFields,resumableUploads:s.resumableUploads||!1,individualCancellation:s.individualCancellation,isMobileDevice:s.isMobileDevice,fileCardFor:t.fileCardFor,toggleFileCard:this.toggleFileCard,toggleAddFilesPanel:this.toggleAddFilesPanel,showAddFilesPanel:t.showAddFilesPanel,saveFileCard:this.saveFileCard,openFileEditor:this.openFileEditor,canEditFile:this.canEditFile,width:this.opts.width,height:this.opts.height,showLinkToFileUploadResult:this.opts.showLinkToFileUploadResult,fileManagerSelectionType:this.opts.fileManagerSelectionType,proudlyDisplayPoweredByUppy:this.opts.proudlyDisplayPoweredByUppy,showRemoveButtonAfterComplete:this.opts.showRemoveButtonAfterComplete,containerWidth:t.containerWidth,containerHeight:t.containerHeight,areInsidesReadyToBeVisible:t.areInsidesReadyToBeVisible,parentElement:this.el,allowedFileTypes:this.uppy.opts.restrictions.allowedFileTypes,maxNumberOfFiles:this.uppy.opts.restrictions.maxNumberOfFiles,requiredMetaFields:this.uppy.opts.restrictions.requiredMetaFields,showSelectedFiles:this.opts.showSelectedFiles,showNativePhotoCameraButton:this.opts.showNativePhotoCameraButton,showNativeVideoCameraButton:this.opts.showNativeVideoCameraButton,nativeCameraFacingMode:this.opts.nativeCameraFacingMode,singleFileFullScreen:this.opts.singleFileFullScreen,handleRequestThumbnail:this.handleRequestThumbnail,handleCancelThumbnail:this.handleCancelThumbnail,isDraggingOver:t.isDraggingOver,handleDragOver:this.handleDragOver,handleDragLeave:this.handleDragLeave,handleDrop:this.handleDrop,disableInformer:this.opts.disableInformer,disableStatusBar:this.opts.disableStatusBar,hideProgressDetails:this.opts.hideProgressDetails,hideUploadButton:this.opts.hideUploadButton,hideRetryButton:this.opts.hideRetryButton,hidePauseResumeButton:this.opts.hidePauseResumeButton,hideCancelButton:this.opts.hideCancelButton,hideProgressAfterFinish:this.opts.hideProgressAfterFinish,doneButtonHandler:this.opts.doneButtonHandler})};#a=()=>{let{plugins:e}=this.opts;e.forEach(t=>{let r=this.uppy.getPlugin(t);r?r.mount(this,r):this.uppy.log(`[Uppy] Dashboard could not find plugin '${t}', make sure to uppy.use() the plugins you are specifying`,"warning")})};#c=()=>{this.uppy.iteratePlugins(this.#l)};#l=e=>{let t=["acquirer","editor"];e&&!e.opts?.target&&t.includes(e.type)&&(this.getPluginState().targets.some(s=>e.id===s.id)||e.mount(this,e))};#u(){let{thumbnailWidth:e,thumbnailHeight:t,thumbnailType:r,waitForThumbnailsBeforeUpload:s}=this.opts;return{thumbnailWidth:e,thumbnailHeight:t,thumbnailType:r,waitForThumbnailsBeforeUpload:s,lazy:!s}}setOptions(e){super.setOptions(e),this.uppy.getPlugin(this.#d())?.setOptions(this.#u())}#d(){return`${this.id}:ThumbnailGenerator`}install=()=>{this.setPluginState({isHidden:!0,fileCardFor:null,activeOverlayType:null,showAddFilesPanel:!1,activePickerPanel:void 0,showFileEditor:!1,metaFields:this.opts.metaFields,targets:[],areInsidesReadyToBeVisible:!1,isDraggingOver:!1});let{inline:e,closeAfterFinish:t}=this.opts;if(e&&t)throw new Error("[Dashboard] `closeAfterFinish: true` cannot be used on an inline Dashboard, because an inline Dashboard cannot be closed at all. Either set `inline: false`, or disable the `closeAfterFinish` option.");let{allowMultipleUploads:r,allowMultipleUploadBatches:s}=this.uppy.opts;(r||s)&&t&&this.uppy.log("[Dashboard] When using `closeAfterFinish`, we recommended setting the `allowMultipleUploadBatches` option to `false` in the Uppy constructor. See https://uppy.io/docs/uppy/#allowMultipleUploads-true","warning");let{target:a}=this.opts;a&&this.mount(a,this),this.opts.disableThumbnailGenerator||this.uppy.use(ps,B({id:this.#d()},this.#u())),this.darkModeMediaQuery=typeof window<"u"&&window.matchMedia?window.matchMedia("(prefers-color-scheme: dark)"):null;let o=this.darkModeMediaQuery?this.darkModeMediaQuery.matches:!1;this.uppy.log(`[Dashboard] Dark mode is ${o?"on":"off"}`),this.setDarkModeCapability(o),this.opts.theme==="auto"&&this.darkModeMediaQuery?.addListener(this.handleSystemDarkModeChange),this.#a(),this.#c(),this.initEvents()};uninstall=()=>{if(!this.opts.disableThumbnailGenerator){let t=this.uppy.getPlugin(`${this.id}:ThumbnailGenerator`);t&&this.uppy.removePlugin(t)}let{plugins:e}=this.opts;e.forEach(t=>{let r=this.uppy.getPlugin(t);r&&r.unmount()}),this.opts.theme==="auto"&&this.darkModeMediaQuery?.removeListener(this.handleSystemDarkModeChange),this.opts.disablePageScrollWhenModalOpen&&document.body.classList.remove("uppy-Dashboard-isFixed"),this.unmount(),this.removeEvents()}};var Wa=class{onMount(e,t){this.options=B(B({},e),this.props),this.uppy.use(t,this.options),this.plugin=this.uppy.getPlugin(this.options.id)}handleChanges(e,t){e.uppy&&this.uppy!==e.uppy.previousValue&&e.uppy.previousValue!==void 0&&(this.uninstall(e.uppy.previousValue),this.uppy.use(t,this.options)),this.options=B(B({},this.options),this.props),this.plugin=this.uppy.getPlugin(this.options.id),e.props&&this.props!==e.props.previousValue&&e.props.previousValue!==void 0&&this.plugin.setOptions(B({},this.options))}uninstall(e=this.uppy){e.removePlugin(this.plugin)}},Mp=(()=>{let e=class e extends Wa{constructor(){super(),this.el=Ii(Qo),this.uppy=new Ui,this.props={}}ngOnInit(){this.onMount({id:"angular:Dashboard",inline:!0,target:this.el.nativeElement},Ri)}ngOnChanges(r){this.handleChanges(r,Ri)}ngOnDestroy(){this.uninstall()}};e.\u0275fac=function(s){return new(s||e)},e.\u0275cmp=kr({type:e,selectors:[["uppy-dashboard"]],inputs:{uppy:"uppy",props:"props"},features:[bo,yo],decls:0,vars:0,template:function(s,a){},encapsulation:2,changeDetection:0});let i=e;return i})();var Ka=we(Xi(),1);var Op=we(zp(),1);var Ap={strings:{compressingImages:"Compressing images...",compressedX:"Saved %{size} by compressing images"}};var Uc={quality:.6,limit:10},ys=class extends ii{#e;constructor(e,t){super(e,B(B({},Uc),t)),this.id=this.opts.id||"Compressor",this.type="modifier",this.defaultLocale=Ap,this.#e=new Gi(this.opts.limit),this.i18nInit(),this.prepareUpload=this.prepareUpload.bind(this),this.compress=this.compress.bind(this)}compress(e){return new Promise((t,r)=>{new Op.default(e,J(B({},this.opts),{success:t,error:r}))})}prepareUpload(e){return j(this,null,function*(){let t=0,r=[],s=this.#e.wrapPromiseFunction(o=>j(this,null,function*(){try{if(o.data==null)throw new Error("File data is empty");let n=yield this.compress(o.data),u=o.data.size-n.size;this.uppy.log(`[Image Compressor] Image ${o.id} compressed by ${(0,Ka.default)(u)}`),t+=u;let{name:c,type:m,size:f}=n,E=gt(c),D=`${gt(o.meta.name).name}.${E.extension}`;this.uppy.setFileState(o.id,J(B(B(B(B({},c&&{name:c}),E.extension&&{extension:E.extension}),m&&{type:m}),f&&{size:f}),{data:n,meta:J(B({},o.meta),{type:m,name:D})})),r.push(o)}catch(n){this.uppy.log(`[Image Compressor] Failed to compress ${o.id}:`,"warning"),this.uppy.log(n,"warning")}})),a=e.map(o=>{let n=this.uppy.getFile(o);return this.uppy.emit("preprocess-progress",n,{mode:"indeterminate",message:this.i18n("compressingImages")}),n.isRemote||(n.data.type||(n.data=n.data.slice(0,n.data.size,n.type)),!n.type?.startsWith("image/"))?Promise.resolve():s(n)});yield Promise.all(a),this.uppy.emit("compressor:complete",r),t>1024&&this.uppy.info(this.i18n("compressedX",{size:(0,Ka.default)(t)}),"info");for(let o of e){let n=this.uppy.getFile(o);this.uppy.emit("preprocess-complete",n)}})}install(){this.uppy.addPreProcessor(this.prepareUpload)}uninstall(){this.uppy.removePreProcessor(this.prepareUpload)}};var Gp={name:"@uppy/image-editor",description:"Image editor and cropping UI",version:"4.0.2",license:"MIT",style:"dist/style.min.css",type:"module",sideEffects:["*.css"],scripts:{build:"tsc --build tsconfig.build.json","build:css":"sass --load-path=../../ src/style.scss dist/style.css && postcss dist/style.css -u cssnano -o dist/style.min.css",typecheck:"tsc --build"},keywords:["file uploader","upload","uppy","uppy-plugin","image editor","cropper","crop","rotate","resize"],homepage:"https://uppy.io",bugs:{url:"https://github.com/transloadit/uppy/issues"},repository:{type:"git",url:"git+https://github.com/transloadit/uppy.git"},files:["src","lib","dist","CHANGELOG.md"],exports:{".":"./lib/index.js","./css/style.css":"./dist/style.css","./css/style.min.css":"./dist/style.min.css","./css/style.scss":"./src/style.scss","./package.json":"./package.json"},dependencies:{"@uppy/utils":"^7.1.1",cropperjs:"^1.6.2",preact:"^10.5.13"},peerDependencies:{"@uppy/core":"^5.1.1"},publishConfig:{access:"public"},devDependencies:{cssnano:"^7.0.7",postcss:"^8.5.6","postcss-cli":"^11.0.1",sass:"^1.89.2",typescript:"^5.8.3"}};var Yp=we(Hp(),1);function vc(i,e){let t=i.width/e.width,r=i.height/e.height,s=Math.min(t,r),a=e.width*s,o=e.height*s,n=(i.width-a)/2,u=(i.height-o)/2;return{width:a,height:o,left:n,top:u}}var jp=vc;function Sc(i){return i*(Math.PI/180)}function wc(i,e,t){let r=Math.abs(Sc(t));return Math.max((Math.sin(r)*i+Math.cos(r)*e)/e,(Math.sin(r)*e+Math.cos(r)*i)/i)}var Jp=wc;function Dc(i,e,t){return e.left<i.left?{left:i.left,width:t.width}:e.top<i.top?{top:i.top,height:t.height}:e.left+e.width>i.left+i.width?{left:i.left+i.width-t.width,width:t.width}:e.top+e.height>i.top+i.height?{top:i.top+i.height-t.height,height:t.height}:null}var Zp=Dc;function Lc(i,e,t){return e.left<i.left?{left:i.left,width:t.left+t.width-i.left}:e.top<i.top?{top:i.top,height:t.top+t.height-i.top}:e.left+e.width>i.left+i.width?{left:t.left,width:i.left+i.width-t.left}:e.top+e.height>i.top+i.height?{top:t.top,height:i.top+i.height-t.top}:null}var Wp=Lc;var Qs=class extends je{imgElement;cropper;constructor(e){super(e),this.state={angle90Deg:0,angleGranular:0,prevCropboxData:null},this.storePrevCropboxData=this.storePrevCropboxData.bind(this),this.limitCropboxMovement=this.limitCropboxMovement.bind(this)}componentDidMount(){let{opts:e,storeCropperInstance:t}=this.props;this.cropper=new Yp.default(this.imgElement,e.cropperOptions),this.imgElement.addEventListener("cropstart",this.storePrevCropboxData),this.imgElement.addEventListener("cropend",this.limitCropboxMovement),t(this.cropper)}componentWillUnmount(){this.cropper.destroy(),this.imgElement.removeEventListener("cropstart",this.storePrevCropboxData),this.imgElement.removeEventListener("cropend",this.limitCropboxMovement)}storePrevCropboxData(){this.setState({prevCropboxData:this.cropper.getCropBoxData()})}limitCropboxMovement(e){let t=this.cropper.getCanvasData(),r=this.cropper.getCropBoxData(),{prevCropboxData:s}=this.state;if(e.detail.action==="all"){let a=Zp(t,r,s);a&&this.cropper.setCropBoxData(a)}else{let a=Wp(t,r,s);a&&this.cropper.setCropBoxData(a)}}onRotate90Deg=()=>{let{angle90Deg:e}=this.state,t=e-90;this.setState({angle90Deg:t,angleGranular:0}),this.cropper.scale(1),this.cropper.rotateTo(t);let r=this.cropper.getCanvasData(),s=this.cropper.getContainerData(),a=jp(s,r);this.cropper.setCanvasData(a),this.cropper.setCropBoxData(a)};onRotateGranular=e=>{let t=Number(e.target.value);this.setState({angleGranular:t});let{angle90Deg:r}=this.state,s=r+t;this.cropper.rotateTo(s);let a=this.cropper.getImageData(),o=Jp(a.naturalWidth,a.naturalHeight,t),n=this.cropper.getImageData().scaleX<0?-o:o;this.cropper.scale(n,o)};renderGranularRotate(){let{i18n:e}=this.props,{angleGranular:t}=this.state;return l("label",{role:"tooltip","aria-label":`${t}\xBA`,"data-microtip-position":"top",className:"uppy-ImageCropper-rangeWrapper",children:l("input",{className:"uppy-ImageCropper-range uppy-u-reset",type:"range",onInput:this.onRotateGranular,onChange:this.onRotateGranular,value:t,min:"-45",max:"45","aria-label":e("rotate")})})}renderRevert(){let{i18n:e,opts:t}=this.props;return l("button",{"data-microtip-position":"top",type:"button",className:"uppy-u-reset uppy-c-btn","aria-label":e("revert"),onClick:()=>{this.cropper.reset(),this.cropper.setAspectRatio(t.cropperOptions.initialAspectRatio),this.setState({angle90Deg:0,angleGranular:0})},children:l("svg",{"aria-hidden":"true",className:"uppy-c-icon",width:"24",height:"24",viewBox:"0 0 24 24",children:[l("path",{d:"M0 0h24v24H0z",fill:"none"}),l("path",{d:"M13 3c-4.97 0-9 4.03-9 9H1l3.89 3.89.07.14L9 12H6c0-3.87 3.13-7 7-7s7 3.13 7 7-3.13 7-7 7c-1.93 0-3.68-.79-4.94-2.06l-1.42 1.42C8.27 19.99 10.51 21 13 21c4.97 0 9-4.03 9-9s-4.03-9-9-9zm-1 5v5l4.28 2.54.72-1.21-3.5-2.08V8H12z"})]})})}renderRotate(){let{i18n:e}=this.props;return l("button",{"data-microtip-position":"top",type:"button",className:"uppy-u-reset uppy-c-btn","aria-label":e("rotate"),onClick:this.onRotate90Deg,children:l("svg",{"aria-hidden":"true",className:"uppy-c-icon",width:"24",height:"24",viewBox:"0 0 24 24",children:[l("path",{d:"M0 0h24v24H0V0zm0 0h24v24H0V0z",fill:"none"}),l("path",{d:"M14 10a2 2 0 012 2v7a2 2 0 01-2 2H6a2 2 0 01-2-2v-7a2 2 0 012-2h8zm0 1.75H6a.25.25 0 00-.243.193L5.75 12v7a.25.25 0 00.193.243L6 19.25h8a.25.25 0 00.243-.193L14.25 19v-7a.25.25 0 00-.193-.243L14 11.75zM12 .76V4c2.3 0 4.61.88 6.36 2.64a8.95 8.95 0 012.634 6.025L21 13a1 1 0 01-1.993.117L19 13h-.003a6.979 6.979 0 00-2.047-4.95 6.97 6.97 0 00-4.652-2.044L12 6v3.24L7.76 5 12 .76z"})]})})}renderFlip(){let{i18n:e}=this.props;return l("button",{"data-microtip-position":"top",type:"button",className:"uppy-u-reset uppy-c-btn","aria-label":e("flipHorizontal"),onClick:()=>this.cropper.scaleX(-this.cropper.getData().scaleX||-1),children:l("svg",{"aria-hidden":"true",className:"uppy-c-icon",width:"24",height:"24",viewBox:"0 0 24 24",children:[l("path",{d:"M0 0h24v24H0z",fill:"none"}),l("path",{d:"M15 21h2v-2h-2v2zm4-12h2V7h-2v2zM3 5v14c0 1.1.9 2 2 2h4v-2H5V5h4V3H5c-1.1 0-2 .9-2 2zm16-2v2h2c0-1.1-.9-2-2-2zm-8 20h2V1h-2v22zm8-6h2v-2h-2v2zM15 5h2V3h-2v2zm4 8h2v-2h-2v2zm0 8c1.1 0 2-.9 2-2h-2v2z"})]})})}renderZoomIn(){let{i18n:e}=this.props;return l("button",{"data-microtip-position":"top",type:"button",className:"uppy-u-reset uppy-c-btn","aria-label":e("zoomIn"),onClick:()=>this.cropper.zoom(.1),children:l("svg",{"aria-hidden":"true",className:"uppy-c-icon",height:"24",viewBox:"0 0 24 24",width:"24",children:[l("path",{d:"M0 0h24v24H0V0z",fill:"none"}),l("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"}),l("path",{d:"M12 10h-2v2H9v-2H7V9h2V7h1v2h2v1z"})]})})}renderZoomOut(){let{i18n:e}=this.props;return l("button",{"data-microtip-position":"top",type:"button",className:"uppy-u-reset uppy-c-btn","aria-label":e("zoomOut"),onClick:()=>this.cropper.zoom(-.1),children:l("svg",{"aria-hidden":"true",className:"uppy-c-icon",width:"24",height:"24",viewBox:"0 0 24 24",children:[l("path",{d:"M0 0h24v24H0V0z",fill:"none"}),l("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14zM7 9h5v1H7z"})]})})}renderCropSquare(){let{i18n:e}=this.props;return l("button",{"data-microtip-position":"top",type:"button",className:"uppy-u-reset uppy-c-btn","aria-label":e("aspectRatioSquare"),onClick:()=>this.cropper.setAspectRatio(1),children:l("svg",{"aria-hidden":"true",className:"uppy-c-icon",width:"24",height:"24",viewBox:"0 0 24 24",children:[l("path",{d:"M0 0h24v24H0z",fill:"none"}),l("path",{d:"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"})]})})}renderCropWidescreen(){let{i18n:e}=this.props;return l("button",{"data-microtip-position":"top",type:"button",className:"uppy-u-reset uppy-c-btn","aria-label":e("aspectRatioLandscape"),onClick:()=>this.cropper.setAspectRatio(16/9),children:l("svg",{"aria-hidden":"true",className:"uppy-c-icon",width:"24",height:"24",viewBox:"0 0 24 24",children:[l("path",{d:"M 19,4.9999992 V 17.000001 H 4.9999998 V 6.9999992 H 19 m 0,-2 H 4.9999998 c -1.0999999,0 -1.9999999,0.9000001 -1.9999999,2 V 17.000001 c 0,1.1 0.9,2 1.9999999,2 H 19 c 1.1,0 2,-0.9 2,-2 V 6.9999992 c 0,-1.0999999 -0.9,-2 -2,-2 z"}),l("path",{fill:"none",d:"M0 0h24v24H0z"})]})})}renderCropWidescreenVertical(){let{i18n:e}=this.props;return l("button",{"data-microtip-position":"top",type:"button","aria-label":e("aspectRatioPortrait"),className:"uppy-u-reset uppy-c-btn",onClick:()=>this.cropper.setAspectRatio(9/16),children:l("svg",{"aria-hidden":"true",className:"uppy-c-icon",width:"24",height:"24",viewBox:"0 0 24 24",children:[l("path",{d:"M 19.000001,19 H 6.999999 V 5 h 10.000002 v 14 m 2,0 V 5 c 0,-1.0999999 -0.9,-1.9999999 -2,-1.9999999 H 6.999999 c -1.1,0 -2,0.9 -2,1.9999999 v 14 c 0,1.1 0.9,2 2,2 h 10.000002 c 1.1,0 2,-0.9 2,-2 z"}),l("path",{d:"M0 0h24v24H0z",fill:"none"})]})})}render(){let{currentImage:e,opts:t}=this.props,{actions:r}=t;if(e.data==null)throw new Error("File data is empty");let s=URL.createObjectURL(e.data);return l("div",{className:"uppy-ImageCropper",children:[l("div",{className:"uppy-ImageCropper-container",children:l("img",{className:"uppy-ImageCropper-image",alt:e.name,src:s,ref:a=>{this.imgElement=a}})}),l("div",{className:"uppy-ImageCropper-controls",children:[r.revert&&this.renderRevert(),r.rotate&&this.renderRotate(),r.granularRotate&&this.renderGranularRotate(),r.flip&&this.renderFlip(),r.zoomIn&&this.renderZoomIn(),r.zoomOut&&this.renderZoomOut(),r.cropSquare&&this.renderCropSquare(),r.cropWidescreen&&this.renderCropWidescreen(),r.cropWidescreenVertical&&this.renderCropWidescreenVertical()]})]})}};var qp={strings:{revert:"Reset",rotate:"Rotate 90\xB0",zoomIn:"Zoom in",zoomOut:"Zoom out",flipHorizontal:"Flip horizontally",aspectRatioSquare:"Crop square",aspectRatioLandscape:"Crop landscape (16:9)",aspectRatioPortrait:"Crop portrait (9:16)"}};var Kp={viewMode:0,background:!1,autoCropArea:1,responsive:!0,minCropBoxWidth:70,minCropBoxHeight:70,croppedCanvasOptions:{},initialAspectRatio:0},Xp={revert:!0,rotate:!0,granularRotate:!0,flip:!0,zoomIn:!0,zoomOut:!0,cropSquare:!0,cropWidescreen:!0,cropWidescreenVertical:!0},Rc={quality:.8,actions:Xp,cropperOptions:Kp},Fr=class extends ri{static VERSION=Gp.version;cropper;constructor(e,t){super(e,J(B(B({},Rc),t),{actions:B(B({},Xp),t?.actions),cropperOptions:B(B({},Kp),t?.cropperOptions)})),this.id=this.opts.id||"ImageEditor",this.title="Image Editor",this.type="editor",this.defaultLocale=qp,this.i18nInit()}canEditFile(e){if(!e.type||e.isRemote)return!1;let t=e.type.split("/")[1];return!!/^(jpe?g|gif|png|bmp|webp)$/.test(t)}save=()=>{let e=s=>{let{currentImage:a}=this.getPluginState();this.uppy.setFileState(a.id,{data:new File([s],a.name??this.i18n("unnamed"),{type:s.type}),size:s.size,preview:void 0});let o=this.uppy.getFile(a.id);this.uppy.emit("thumbnail:request",o),this.setPluginState({currentImage:o}),this.uppy.emit("file-editor:complete",o)},{currentImage:t}=this.getPluginState(),r=this.cropper.getCroppedCanvas({});r.width%2!==0&&this.cropper.setData({width:r.width-1}),r.height%2!==0&&this.cropper.setData({height:r.height-1}),this.cropper.getCroppedCanvas(this.opts.cropperOptions.croppedCanvasOptions).toBlob(e,t.type,this.opts.quality)};storeCropperInstance=e=>{this.cropper=e};selectFile=e=>{this.uppy.emit("file-editor:start",e),this.setPluginState({currentImage:e})};install(){this.setPluginState({currentImage:null});let{target:e}=this.opts;e&&this.mount(e,this)}uninstall(){let{currentImage:e}=this.getPluginState();if(e){let t=this.uppy.getFile(e.id);this.uppy.emit("file-editor:cancel",t)}this.unmount()}render(){let{currentImage:e}=this.getPluginState();return e===null||e.isRemote?null:l(Qs,{currentImage:e,storeCropperInstance:this.storeCropperInstance,save:this.save,opts:this.opts,i18n:this.i18n})}};var ed=we($p(),1);var Nc=["*"];function kc(i,e){if(i&1&&(qt(0,"small",4),xi(1),Kt()),i&2){let t=Qi(2);Ct(),Uo(t.subtitle)}}function Cc(i,e){if(i&1&&(qt(0,"a",5),Cr(1,"i",6),xi(2," Download Template "),Kt()),i&2){let t=Qi(2);Es("href",t.sampleUrl,xo)}}function Tc(i,e){if(i&1&&(qt(0,"div",2),gi(1,kc,2,1,"small",4),gi(2,Cc,3,1,"a",5),Bo(3),Kt()),i&2){let t=Qi();Ct(),yi(t.subtitle&&t.showSubtitle?1:-1),Ct(),yi(t.sampleUrl&&t.showSample?2:-1)}}function Ic(i,e){if(i&1&&xi(0),i&2){let t=Qi(2);vs(" - ",t.rowSummary().rowEmpty," empty in the CSV you uploaded ")}}function Pc(i,e){if(i&1&&(qt(0,"div",3)(1,"h4",7),xi(2,"CSV File Content Summary"),Kt(),Cr(3,"hr"),qt(4,"p",8),xi(5),gi(6,Ic,1,1),Kt()()),i&2){let t=Qi();Ct(5),vs(" ",t.rowSummary().rowCount," rows found "),Ct(),yi(t.rowSummary().rowEmpty>0?6:-1)}}var sF=(()=>{let e=class e{constructor(){this.folder="test",this.thumbnailSize="small",this.sampleUrl="",this.subtitle="",this.showSample=!0,this.clear=Pi(!1),this.resetUppy=Pi(!1),this.showSubtitle=!0,this.uppyCoreConfiguration=Pi(),this.dashboardPropsConfiguration=Pi(),this.fileUploaded=new mi,this.fileUploadComplete=new mi,this.fileRemoved=new mi,this.onParser=new mi,this.multipleFilesUploaded=new mi,this.http=Ii(Do),this.csvParser=Ii(wo),this.rowSummary=Nr({rowCount:0,rowEmpty:0}),this.file=Nr(null),this.multipleFiles=Nr([]),this.uppy=new Ui({debug:!0,autoProceed:!0,allowMultipleUploadBatches:!1,restrictions:{allowedFileTypes:[".csv"],maxTotalFileSize:1e6},onBeforeFileAdded:(r,s)=>J(B({},r),{name:r.name?.replace(/ /g,"_")})}).use(ys,{mimeType:"image/jpeg",convertSize:1/0,convertTypes:["image/png"]}).use(Fr),this.dashboardProps={hideUploadButton:!0,height:350},Tr(()=>this.uppy.setOptions(B({},this.uppyCoreConfiguration()))),Tr(()=>this.dashboardProps=B(B({},this.dashboardProps),this.dashboardPropsConfiguration())),Tr(()=>{this.resetUppy()&&this.uppy.cancelAll()}),this.uppy.on("upload",(r,s)=>{let a=s[0]?.data;this.showSample=!1,this.showSubtitle=!1,this.emitFileUpload(a),this.file.set(s[0].data),ed.default.parse(a,{skipEmptyLines:"greedy",header:!0,beforeFirstChunk:o=>{let n=o.split(/\r?\n/).slice(1);return n[n.length-1]===""&&n.pop(),this.rowSummary.update(u=>J(B({},u),{rowCount:n.length})),n.forEach(u=>{u.split(",").every(m=>m==="")&&this.rowSummary.update(m=>J(B({},m),{rowEmpty:m.rowEmpty+1}))}),o},error(o,n){console.log("ERROR",o,n)},complete:(o,n)=>{this.onParser.emit(o.data)}})}),this.uppy.on("complete",r=>{let s=r.successful?.map(o=>({file:o.data,id:o.id}))??[],a=r.successful[0]?.data;this.showSample=!1,this.showSubtitle=!1,this.emitFileUploadComplete(a),this.emitMultipleFilesUploaded(s),this.resetUppyOnComplete(),this.file.set(a),this.multipleFiles.set(s)}),this.uppy.on("file-removed",r=>{this.showSample=!0,this.showSubtitle=!0,this.file.set(null);let a=this.multipleFiles().filter(o=>o.id!=r.id);this.multipleFiles.set(a),this.fileRemoved.emit(r.id),this.rowSummary.set({rowCount:0,rowEmpty:0})}),this.onFileEdited()}onFileEdited(){this.clear()==!1&&(this.uppy.on("file-editor:start",r=>{}),this.uppy.on("file-editor:complete",r=>{this.handlingEditedImage(r)}),this.uppy.on("file-editor:cancel",r=>{}))}handlingEditedImage(r){this.multipleFiles.update(s=>s.map(a=>a.id===r.id?J(B({},a),{file:r.data}):a)),this.file.set(this.multipleFiles()[0].file),this.emitFileUploadComplete(this.file()),this.emitMultipleFilesUploaded(this.multipleFiles())}resetUppyOnComplete(){this.clear()&&this.uppy.clear()}formatFileSize(r,s=2){if(r===0)return"0 bytes";let a=Math.floor(Math.log(r)/Math.log(e.kilobyte));return`${(r/Math.pow(e.kilobyte,a)).toFixed(s)} ${e.sizes[a]}`}ngOnDestroy(){this.file.set(null),this.multipleFiles.set([])}emitFileUpload(r){let s=new File([r],r.name.replace(/ /g,"_"),{type:r.type});this.fileUploaded.emit(s)}emitFileUploadComplete(r){let s=new File([r],r.name.replace(/ /g,"_"),{type:r.type});this.fileUploadComplete.emit(s)}emitMultipleFilesUploaded(r){let s=r.map(a=>({file:new File([a.file],a.file.name.replace(/ /g,"_"),{type:a.file.type}),id:a.id}));this.multipleFilesUploaded.emit(s)}};e.sizes=["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"],e.kilobyte=1024,e.\u0275fac=function(s){return new(s||e)},e.\u0275cmp=kr({type:e,selectors:[["POS-uppy"]],inputs:{folder:"folder",thumbnailSize:"thumbnailSize",sampleUrl:"sampleUrl",subtitle:"subtitle",showSample:"showSample",clear:[1,"clear"],resetUppy:[1,"resetUppy"],uppyCoreConfiguration:[1,"uppyCoreConfiguration"],dashboardPropsConfiguration:[1,"dashboardPropsConfiguration"]},outputs:{fileUploaded:"fileUploaded",fileUploadComplete:"fileUploadComplete",fileRemoved:"fileRemoved",onParser:"onParser",multipleFilesUploaded:"multipleFilesUploaded"},ngContentSelectors:Nc,decls:4,vars:4,consts:[[1,"position-relative"],[3,"uppy","props"],[1,"wrapper"],["role","alert",1,"alert","alert-warning","d-flex","flex-column","gap-2",2,"margin","1rem 0 0 0"],[1,"subtitle"],["role","button",1,"sample",3,"href"],[1,"fa-solid","fa-download","ms-3"],[1,"alert-heading"],[1,"fs-6","m-0"]],template:function(s,a){if(s&1&&(Fo(),qt(0,"div",0),Cr(1,"uppy-dashboard",1),gi(2,Tc,4,2,"div",2),gi(3,Pc,7,2,"div",3),Kt()),s&2){let o;Ct(),Es("uppy",a.uppy)("props",a.dashboardProps),Ct(),yi(a.file()?-1:2),Ct(),yi(a.file()&&((o=a.file())==null?null:o.type)==="text/csv"?3:-1)}},dependencies:[Mp],styles:[".uppy-Dashboard-AddFiles-info{display:none!important} .uppy-Dashboard-AddFiles-list{flex:none;flex-direction:row;flex-wrap:wrap;justify-content:center;max-width:600px;margin-top:15px;padding-top:0;overflow-y:visible}.sample[_ngcontent-%COMP%], .subtitle[_ngcontent-%COMP%]{top:56%;width:100%;text-align:center}.top-58[_ngcontent-%COMP%]{top:61%}.wrapper[_ngcontent-%COMP%]{position:absolute;left:0;bottom:30%;width:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;row-gap:.2rem;z-index:10}"]});let i=e;return i})();export{$p as a,sF as b};
21
+ ${e}`;alert(o)}return l("div",{className:"uppy-StatusBar-content",title:t("uploadFailed"),children:[l("svg",{"aria-hidden":"true",focusable:"false",className:"uppy-StatusBar-statusIndicator uppy-c-icon",width:"11",height:"11",viewBox:"0 0 11 11",children:l("path",{d:"M4.278 5.5L0 1.222 1.222 0 5.5 4.278 9.778 0 11 1.222 6.722 5.5 11 9.778 9.778 11 5.5 6.722 1.222 11 0 9.778z"})}),l("div",{className:"uppy-StatusBar-status",children:[l("div",{className:"uppy-StatusBar-statusPrimary",children:[t("uploadFailed"),l("button",{className:"uppy-u-reset uppy-StatusBar-details","aria-label":t("showErrorDetails"),"data-microtip-position":"top-right","data-microtip-size":"medium",onClick:a,type:"button",children:"?"})]}),l(Ep,{i18n:t,complete:r,numUploads:s})]})]})}function xr(i){let e=[],t="indeterminate",r;for(let{progress:a}of Object.values(i)){let{preprocess:o,postprocess:n}=a;r==null&&(o||n)&&({mode:t,message:r}=o||n),o?.mode==="determinate"&&e.push(o.value),n?.mode==="determinate"&&e.push(n.value)}let s=e.reduce((a,o)=>a+o/e.length,0);return{mode:t,message:r,value:s}}var{STATE_ERROR:Dp,STATE_WAITING:fc,STATE_PREPROCESSING:za,STATE_UPLOADING:fs,STATE_POSTPROCESSING:Aa,STATE_COMPLETE:ms}=pt;function Ga({newFiles:i,allowNewUpload:e,isUploadInProgress:t,isAllPaused:r,resumableUploads:s,error:a,hideUploadButton:o=void 0,hidePauseResumeButton:n=!1,hideCancelButton:u=!1,hideRetryButton:c=!1,recoveredState:m,uploadState:f,totalProgress:E,files:S,supportsUploadProgress:D,hideAfterFinish:G=!1,isSomeGhost:q,doneButtonHandler:W=void 0,isUploadStarted:te,i18n:H,startUpload:ue,uppy:$,isAllComplete:Q,hideProgressDetails:x=void 0,numUploads:U,complete:V,totalSize:A,totalETA:Y,totalUploadedSize:fe}){function Ee(){switch(f){case Aa:case za:{let re=xr(S);return re.mode==="determinate"?re.value*100:E}case Dp:return null;case fs:return D?E:null;default:return E}}function Te(){switch(f){case Aa:case za:{let{mode:re}=xr(S);return re==="indeterminate"}case fs:return!D;default:return!1}}let le=Ee(),xe=le??100,ie=!a&&i&&(!t&&!r||m)&&e&&!o,pe=!u&&f!==fc&&f!==ms,ne=s&&!n&&f===fs,de=a&&!Q&&!c,X=W&&f===ms,T=(0,Oa.default)("uppy-StatusBar-progress",{"is-indeterminate":Te()}),v=(0,Oa.default)("uppy-StatusBar",`is-${f}`,{"has-ghosts":q}),N=(()=>{switch(f){case za:case Aa:return l(Up,{progress:xr(S)});case ms:return l(Sp,{i18n:H});case Dp:return l(wp,{error:a,i18n:H,numUploads:U,complete:V});case fs:return l(vp,{i18n:H,supportsUploadProgress:D,totalProgress:E,hideProgressDetails:x,isUploadStarted:te,isAllComplete:Q,isAllPaused:r,newFiles:i,numUploads:U,complete:V,totalUploadedSize:fe,totalSize:A,totalETA:Y,startUpload:ue});default:return null}})();return!(ie||de||ne||pe||X)&&!N||f===ms&&G?null:l("div",{className:v,children:[l("div",{className:T,style:{width:`${xe}%`},role:"progressbar","aria-label":`${xe}%`,"aria-valuetext":`${xe}%`,"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":le}),N,l("div",{className:"uppy-StatusBar-actions",children:[ie?l(yp,{newFiles:i,isUploadStarted:te,recoveredState:m,i18n:H,isSomeGhost:q,startUpload:ue,uploadState:f}):null,de?l(Qp,{i18n:H,uppy:$}):null,ne?l(bp,{isAllPaused:r,i18n:H,isAllComplete:Q,resumableUploads:s,uppy:$}):null,pe?l(xp,{i18n:H,uppy:$}):null,X?l(Fp,{i18n:H,doneButtonHandler:W}):null]})]})}var mc=2e3,gc=2e3;function yc(i,e,t,r){if(i)return pt.STATE_ERROR;if(e)return pt.STATE_COMPLETE;if(t)return pt.STATE_WAITING;let s=pt.STATE_WAITING,a=Object.keys(r);for(let o=0;o<a.length;o++){let{progress:n}=r[a[o]];if(n.uploadStarted&&!n.uploadComplete)return pt.STATE_UPLOADING;n.preprocess&&(s=pt.STATE_PREPROCESSING),n.postprocess&&s!==pt.STATE_PREPROCESSING&&(s=pt.STATE_POSTPROCESSING)}return s}var gs=class extends je{#e;#t;#i;#r;componentDidMount(){this.#e=performance.now(),this.#t=this.props.uppy.getFiles().reduce((e,t)=>e+(t.progress.bytesUploaded||0),0),this.props.uppy.on("upload",this.#s)}componentWillUnmount(){this.props.uppy.off("upload",this.#s)}#s=()=>{let{recoveredState:e}=this.props.uppy.getState();if(this.#i=null,this.#r=null,e){this.#t=Object.values(e.files).reduce((t,{progress:r})=>t+(r.bytesUploaded||0),0);return}this.#e=performance.now(),this.#t=0};#p(e){if(e.total==null||e.total===0)return null;let t=e.total-e.uploaded;if(t<=0)return null;this.#e??=performance.now();let r=performance.now()-this.#e;if(r===0)return Math.round((this.#r??0)/100)/10;if(this.#t==null)return this.#t=e.uploaded,null;let s=e.uploaded-this.#t;if(this.#t=e.uploaded,s<=0)return Math.round((this.#r??0)/100)/10;let a=s/r;if(!Number.isFinite(a)||a<=0)return null;let o=this.#i==null?a:_i(a,this.#i,mc,r);if(!Number.isFinite(o)||o<=0)return null;this.#i=o;let n=t/o;if(!Number.isFinite(n)||n<0)return null;let u=Math.max((this.#r??0)-r,0),c=this.#r==null?n:_i(n,u,gc,r);return!Number.isFinite(c)||c<0?null:(this.#r=c,this.#e=performance.now(),Math.round(c/100)/10)}startUpload=()=>{let{recoveredState:e}=this.props.uppy.getState();e?this.props.uppy.emit("restore-confirmed"):this.props.uppy.upload().catch(()=>{})};render(){let{capabilities:e,files:t,allowNewUpload:r,totalProgress:s,error:a,recoveredState:o}=this.props.uppy.getState(),{newFiles:n,startedFiles:u,completeFiles:c,isUploadStarted:m,isAllComplete:f,isAllPaused:E,isUploadInProgress:S,isSomeGhost:D}=this.props.uppy.getObjectOfFilesPerState(),G=o?Object.values(t):n,q=!!e.resumableUploads,W=e.uploadProgress!==!1,te=null,H=0;u.every($=>$.progress.bytesTotal!=null&&$.progress.bytesTotal!==0)?(te=0,u.forEach($=>{te+=$.progress.bytesTotal||0,H+=$.progress.bytesUploaded||0})):u.forEach($=>{H+=$.progress.bytesUploaded||0});let ue=this.#p({uploaded:H,total:te});return l(Ga,{error:a,uploadState:yc(a,f,o,t||{}),allowNewUpload:r,totalProgress:s,totalSize:te,totalUploadedSize:H,isAllComplete:f,isAllPaused:E,isUploadStarted:m,isUploadInProgress:S,isSomeGhost:D,recoveredState:o,complete:c.length,newFiles:G.length,numUploads:u.length,totalETA:ue,files:t,i18n:this.props.i18n,uppy:this.props.uppy,startUpload:this.startUpload,doneButtonHandler:this.props.doneButtonHandler,resumableUploads:q,supportsUploadProgress:W,hideProgressDetails:this.props.hideProgressDetails,hideUploadButton:this.props.hideUploadButton,hideRetryButton:this.props.hideRetryButton,hidePauseResumeButton:this.props.hidePauseResumeButton,hideCancelButton:this.props.hideCancelButton,hideAfterFinish:this.props.hideAfterFinish})}};var Lp=900,Rp=700,Ha=576,Np=330;function ja(i){let e=i.totalFileCount===0,t=i.totalFileCount===1,r=i.containerWidth>Ha,s=i.containerHeight>Np,a=(0,kp.default)({"uppy-Dashboard":!0,"uppy-Dashboard--isDisabled":i.disabled,"uppy-Dashboard--animateOpenClose":i.animateOpenClose,"uppy-Dashboard--isClosing":i.isClosing,"uppy-Dashboard--isDraggingOver":i.isDraggingOver,"uppy-Dashboard--modal":!i.inline,"uppy-size--md":i.containerWidth>Ha,"uppy-size--lg":i.containerWidth>Rp,"uppy-size--xl":i.containerWidth>Lp,"uppy-size--height-md":i.containerHeight>Np,"uppy-Dashboard--isAddFilesPanelVisible":i.showAddFilesPanel,"uppy-Dashboard--isInnerWrapVisible":i.areInsidesReadyToBeVisible,"uppy-Dashboard--singleFile":i.singleFileFullScreen&&t&&s}),o=1;i.containerWidth>Lp?o=5:i.containerWidth>Rp?o=4:i.containerWidth>Ha&&(o=3);let n=i.showSelectedFiles&&!e,u=i.recoveredState?Object.keys(i.recoveredState.files).length:null,c=i.files?Object.keys(i.files).filter(E=>i.files[E].isGhost).length:0,m=()=>c>0?i.i18n("recoveredXFiles",{smart_count:c}):i.i18n("recoveredAllFiles");return l("div",{className:a,"data-uppy-theme":i.theme,"data-uppy-num-acquirers":i.acquirers.length,"data-uppy-drag-drop-supported":!i.disableLocalFiles&&Vr(),"aria-hidden":i.inline?"false":i.isHidden,"aria-disabled":i.disabled,"aria-label":i.inline?i.i18n("dashboardTitle"):i.i18n("dashboardWindowTitle"),onPaste:i.handlePaste,onDragOver:i.handleDragOver,onDragLeave:i.handleDragLeave,onDrop:i.handleDrop,children:[l("div",{"aria-hidden":"true",className:"uppy-Dashboard-overlay",tabIndex:-1,onClick:i.handleClickOutside}),l("div",{className:"uppy-Dashboard-inner",role:i.inline?void 0:"dialog",style:{width:i.inline&&i.width?i.width:"",height:i.inline&&i.height?i.height:""},children:[i.inline?null:l("button",{className:"uppy-u-reset uppy-Dashboard-close",type:"button","aria-label":i.i18n("closeModal"),title:i.i18n("closeModal"),onClick:i.closeModal,children:l("span",{"aria-hidden":"true",children:"\xD7"})}),l("div",{className:"uppy-Dashboard-innerWrap",children:[l("div",{className:"uppy-Dashboard-dropFilesHereHint",children:i.i18n("dropHint")}),n&&l(cp,B({},i)),u&&l("div",{className:"uppy-Dashboard-serviceMsg",children:[l("svg",{className:"uppy-Dashboard-serviceMsg-icon","aria-hidden":"true",focusable:"false",width:"21",height:"16",viewBox:"0 0 24 19",children:l("g",{transform:"translate(0 -1)",fill:"none",fillRule:"evenodd",children:[l("path",{d:"M12.857 1.43l10.234 17.056A1 1 0 0122.234 20H1.766a1 1 0 01-.857-1.514L11.143 1.429a1 1 0 011.714 0z",fill:"#FFD300"}),l("path",{fill:"#000",d:"M11 6h2l-.3 8h-1.4z"}),l("circle",{fill:"#000",cx:"12",cy:"17",r:"1"})]})}),l("strong",{className:"uppy-Dashboard-serviceMsg-title",children:i.i18n("sessionRestored")}),l("div",{className:"uppy-Dashboard-serviceMsg-text",children:m()})]}),n?l(_a,{id:i.id,i18n:i.i18n,uppy:i.uppy,files:i.files,resumableUploads:i.resumableUploads,hideRetryButton:i.hideRetryButton,hidePauseResumeButton:i.hidePauseResumeButton,hideCancelButton:i.hideCancelButton,showLinkToFileUploadResult:i.showLinkToFileUploadResult,showRemoveButtonAfterComplete:i.showRemoveButtonAfterComplete,metaFields:i.metaFields,toggleFileCard:i.toggleFileCard,handleRequestThumbnail:i.handleRequestThumbnail,handleCancelThumbnail:i.handleCancelThumbnail,recoveredState:i.recoveredState,individualCancellation:i.individualCancellation,openFileEditor:i.openFileEditor,canEditFile:i.canEditFile,toggleAddFilesPanel:i.toggleAddFilesPanel,isSingleFile:t,itemsPerRow:o,containerWidth:i.containerWidth,containerHeight:i.containerHeight}):l(ds,{i18n:i.i18n,i18nArray:i.i18nArray,acquirers:i.acquirers,handleInputChange:i.handleInputChange,maxNumberOfFiles:i.maxNumberOfFiles,allowedFileTypes:i.allowedFileTypes,showNativePhotoCameraButton:i.showNativePhotoCameraButton,showNativeVideoCameraButton:i.showNativeVideoCameraButton,nativeCameraFacingMode:i.nativeCameraFacingMode,showPanel:i.showPanel,activePickerPanel:i.activePickerPanel,disableLocalFiles:i.disableLocalFiles,fileManagerSelectionType:i.fileManagerSelectionType,note:i.note,proudlyDisplayPoweredByUppy:i.proudlyDisplayPoweredByUppy}),l(Qr,{children:i.showAddFilesPanel?l(tp,J(B({},i),{isSizeMD:r}),"AddFiles"):null}),l(Qr,{children:i.fileCardFor?l(La,B({},i),"FileCard"):null}),l(Qr,{children:i.activePickerPanel?l(hp,B({},i),"Picker"):null}),l(Qr,{children:i.showFileEditor?l(rp,B({},i),"Editor"):null}),l("div",{className:"uppy-Dashboard-progressindicators",children:[!i.disableInformer&&l(yr,{uppy:i.uppy}),!i.disableStatusBar&&l(gs,{uppy:i.uppy,i18n:i.i18n,hideProgressDetails:i.hideProgressDetails,hideUploadButton:i.hideUploadButton,hideRetryButton:i.hideRetryButton,hidePauseResumeButton:i.hidePauseResumeButton,hideCancelButton:i.hideCancelButton,hideAfterFinish:i.hideProgressAfterFinish,doneButtonHandler:i.doneButtonHandler}),!i.disableInformer&&l(yr,{uppy:i.uppy}),i.progressindicators.map(E=>i.uppy.getPlugin(E.id).render(i.state))]})]})]})]})}var Cp={strings:{closeModal:"Close Modal",addMoreFiles:"Add more files",addingMoreFiles:"Adding more files",importFrom:"Import from %{name}",dashboardWindowTitle:"Uppy Dashboard Window (Press escape to close)",dashboardTitle:"Uppy Dashboard",copyLinkToClipboardSuccess:"Link copied to clipboard.",copyLinkToClipboardFallback:"Copy the URL below",copyLink:"Copy link",back:"Back",removeFile:"Remove file",editFile:"Edit file",editImage:"Edit image",editing:"Editing %{file}",error:"Error",finishEditingFile:"Finish editing file",saveChanges:"Save changes",myDevice:"My Device",dropHint:"Drop your files here",uploadComplete:"Upload complete",uploadPaused:"Upload paused",resumeUpload:"Resume upload",pauseUpload:"Pause upload",retryUpload:"Retry upload",cancelUpload:"Cancel upload",xFilesSelected:{0:"%{smart_count} file selected",1:"%{smart_count} files selected"},uploadingXFiles:{0:"Uploading %{smart_count} file",1:"Uploading %{smart_count} files"},processingXFiles:{0:"Processing %{smart_count} file",1:"Processing %{smart_count} files"},poweredBy:"Powered by %{uppy}",addMore:"Add more",editFileWithFilename:"Edit file %{file}",save:"Save",cancel:"Cancel",dropPasteFiles:"Drop files here or %{browseFiles}",dropPasteFolders:"Drop files here or %{browseFolders}",dropPasteBoth:"Drop files here, %{browseFiles} or %{browseFolders}",dropPasteImportFiles:"Drop files here, %{browseFiles} or import from:",dropPasteImportFolders:"Drop files here, %{browseFolders} or import from:",dropPasteImportBoth:"Drop files here, %{browseFiles}, %{browseFolders} or import from:",importFiles:"Import files from:",browseFiles:"browse files",browseFolders:"browse folders",recoveredXFiles:{0:"We could not fully recover 1 file. Please re-select it and resume the upload.",1:"We could not fully recover %{smart_count} files. Please re-select them and resume the upload."},recoveredAllFiles:"We restored all files. You can now resume the upload.",sessionRestored:"Session restored",reSelect:"Re-select",missingRequiredMetaFields:{0:"Missing required meta field: %{fields}.",1:"Missing required meta fields: %{fields}."},takePictureBtn:"Take Picture",recordVideoBtn:"Record Video",uploading:"Uploading",complete:"Complete",uploadFailed:"Upload failed",paused:"Paused",retry:"Retry",pause:"Pause",resume:"Resume",done:"Done",filesUploadedOfTotal:{0:"%{complete} of %{smart_count} file uploaded",1:"%{complete} of %{smart_count} files uploaded"},dataUploadedOfTotal:"%{complete} of %{total}",dataUploadedOfUnknown:"%{complete} of unknown",xTimeLeft:"%{time} left",uploadXFiles:{0:"Upload %{smart_count} file",1:"Upload %{smart_count} files"},uploadXNewFiles:{0:"Upload +%{smart_count} file",1:"Upload +%{smart_count} files"},upload:"Upload",xMoreFilesAdded:{0:"%{smart_count} more file added",1:"%{smart_count} more files added"},showErrorDetails:"Show error details"}};var Tp=we(Zr(),1);function br(i,e){if(e){let t=i.querySelector(`[data-uppy-paneltype="${e}"]`);if(t)return t}return i}function Ja(){let i=!1;return(0,Tp.default)((t,r)=>{let s=br(t,r),a=s.contains(document.activeElement);if(a&&i)return;let o=s.querySelector("[data-uppy-super-focusable]");a&&!o||(o?(o.focus({preventScroll:!0}),i=!0):(s.querySelector(Vi)?.focus({preventScroll:!0}),i=!1))},260)}function Ip(i,e){let t=e[0];t&&(t.focus(),i.preventDefault())}function Qc(i,e){let t=e[e.length-1];t&&(t.focus(),i.preventDefault())}function xc(i){return i.contains(document.activeElement)}function Za(i,e,t){let r=br(t,e),s=Tt(r.querySelectorAll(Vi)),a=s.indexOf(document.activeElement);xc(r)?i.shiftKey&&a===0?Qc(i,s):!i.shiftKey&&a===s.length-1&&Ip(i,s):Ip(i,s)}function Pp(i,e,t){e===null||Za(i,e,t)}var _p=9,Fc=27;function Vp(){let i={};return i.promise=new Promise((e,t)=>{i.resolve=e,i.reject=t}),i}var Bc={target:"body",metaFields:[],thumbnailWidth:280,thumbnailType:"image/jpeg",waitForThumbnailsBeforeUpload:!1,defaultPickerIcon:sr,showLinkToFileUploadResult:!1,hideProgressDetails:!1,hideUploadButton:!1,hideCancelButton:!1,hideRetryButton:!1,hidePauseResumeButton:!1,hideProgressAfterFinish:!1,note:null,singleFileFullScreen:!0,disableStatusBar:!1,disableInformer:!1,disableThumbnailGenerator:!1,fileManagerSelectionType:"files",proudlyDisplayPoweredByUppy:!0,showSelectedFiles:!0,showRemoveButtonAfterComplete:!1,showNativePhotoCameraButton:!1,showNativeVideoCameraButton:!1,theme:"light",autoOpen:null,disabled:!1,disableLocalFiles:!1,nativeCameraFacingMode:"",onDragLeave:()=>{},onDragOver:()=>{},onDrop:()=>{},plugins:[],doneButtonHandler:void 0,onRequestCloseModal:null,inline:!1,animateOpenClose:!0,browserBackButtonClose:!1,closeAfterFinish:!1,closeModalOnClickOutside:!1,disablePageScrollWhenModalOpen:!0,trigger:null,width:750,height:550},Ri=class extends ri{static VERSION=$l.version;#e;modalName=`uppy-Dashboard-${zt()}`;superFocus=Ja();ifFocusedOnUppyRecently=!1;dashboardIsDisabled;savedScrollPosition;savedActiveElement;resizeObserver;darkModeMediaQuery;makeDashboardInsidesVisibleAnywayTimeout;constructor(e,t){let r=t?.autoOpen??null;super(e,J(B(B({},Bc),t),{autoOpen:r})),this.id=this.opts.id||"Dashboard",this.title="Dashboard",this.type="orchestrator",this.defaultLocale=Cp,this.opts.doneButtonHandler===void 0&&(this.opts.doneButtonHandler=()=>{this.uppy.clear(),this.requestCloseModal()}),this.opts.onRequestCloseModal??=()=>this.closeModal(),this.i18nInit()}removeTarget=e=>{let r=this.getPluginState().targets.filter(s=>s.id!==e.id);this.setPluginState({targets:r})};addTarget=e=>{let t=e.id||e.constructor.name,r=e.title||t,s=e.type;if(s!=="acquirer"&&s!=="progressindicator"&&s!=="editor")return this.uppy.log("Dashboard: can only be targeted by plugins of types: acquirer, progressindicator, editor","error"),null;let a={id:t,name:r,type:s},n=this.getPluginState().targets.slice();return n.push(a),this.setPluginState({targets:n}),this.el};hideAllPanels=()=>{let e=this.getPluginState(),t={activePickerPanel:void 0,showAddFilesPanel:!1,activeOverlayType:null,fileCardFor:null,showFileEditor:!1};e.activePickerPanel===t.activePickerPanel&&e.showAddFilesPanel===t.showAddFilesPanel&&e.showFileEditor===t.showFileEditor&&e.activeOverlayType===t.activeOverlayType||(this.setPluginState(t),this.uppy.emit("dashboard:close-panel",e.activePickerPanel?.id))};showPanel=e=>{let{targets:t}=this.getPluginState(),r=t.find(s=>s.type==="acquirer"&&s.id===e);this.setPluginState({activePickerPanel:r,activeOverlayType:"PickerPanel"}),this.uppy.emit("dashboard:show-panel",e)};canEditFile=e=>{let{targets:t}=this.getPluginState();return this.#n(t).some(s=>this.uppy.getPlugin(s.id).canEditFile(e))};openFileEditor=e=>{let{targets:t}=this.getPluginState(),r=this.#n(t);this.setPluginState({showFileEditor:!0,fileCardFor:e.id||null,activeOverlayType:"FileEditor"}),r.forEach(s=>{this.uppy.getPlugin(s.id).selectFile(e)})};closeFileEditor=()=>{let{metaFields:e}=this.getPluginState();e&&e.length>0?this.setPluginState({showFileEditor:!1,activeOverlayType:"FileCard"}):this.setPluginState({showFileEditor:!1,fileCardFor:null,activeOverlayType:"AddFiles"})};saveFileEditor=()=>{let{targets:e}=this.getPluginState();this.#n(e).forEach(r=>{this.uppy.getPlugin(r.id).save()}),this.closeFileEditor()};openModal=()=>{let{promise:e,resolve:t}=Vp();if(this.savedScrollPosition=window.pageYOffset,this.savedActiveElement=document.activeElement,this.opts.disablePageScrollWhenModalOpen&&document.body.classList.add("uppy-Dashboard-isFixed"),this.opts.animateOpenClose&&this.getPluginState().isClosing){let r=()=>{this.setPluginState({isHidden:!1}),this.el.removeEventListener("animationend",r,!1),t()};this.el.addEventListener("animationend",r,!1)}else this.setPluginState({isHidden:!1}),t();return this.opts.browserBackButtonClose&&this.updateBrowserHistory(),document.addEventListener("keydown",this.handleKeyDownInModal),this.uppy.emit("dashboard:modal-open"),e};closeModal=e=>{let t=e?.manualClose??!0,{isHidden:r,isClosing:s}=this.getPluginState();if(r||s)return;let{promise:a,resolve:o}=Vp();if(this.opts.disablePageScrollWhenModalOpen&&document.body.classList.remove("uppy-Dashboard-isFixed"),this.opts.animateOpenClose){this.setPluginState({isClosing:!0});let n=()=>{this.setPluginState({isHidden:!0,isClosing:!1}),this.superFocus.cancel(),this.savedActiveElement.focus(),this.el.removeEventListener("animationend",n,!1),o()};this.el.addEventListener("animationend",n,!1)}else this.setPluginState({isHidden:!0}),this.superFocus.cancel(),this.savedActiveElement.focus(),o();return document.removeEventListener("keydown",this.handleKeyDownInModal),t&&this.opts.browserBackButtonClose&&history.state?.[this.modalName]&&history.back(),this.uppy.emit("dashboard:modal-closed"),a};isModalOpen=()=>!this.getPluginState().isHidden||!1;requestCloseModal=()=>this.opts.onRequestCloseModal?this.opts.onRequestCloseModal():this.closeModal();setDarkModeCapability=e=>{let{capabilities:t}=this.uppy.getState();this.uppy.setState({capabilities:J(B({},t),{darkMode:e})})};handleSystemDarkModeChange=e=>{let t=e.matches;this.uppy.log(`[Dashboard] Dark mode is ${t?"on":"off"}`),this.setDarkModeCapability(t)};toggleFileCard=(e,t)=>{let r=this.uppy.getFile(t);e?this.uppy.emit("dashboard:file-edit-start",r):this.uppy.emit("dashboard:file-edit-complete",r),this.setPluginState({fileCardFor:e?t:null,activeOverlayType:e?"FileCard":null})};toggleAddFilesPanel=e=>{this.setPluginState({showAddFilesPanel:e,activeOverlayType:e?"AddFiles":null})};addFiles=e=>{let t=e.map(r=>({source:this.id,name:r.name,type:r.type,data:r,meta:{relativePath:r.relativePath||r.webkitRelativePath||null}}));try{this.uppy.addFiles(t)}catch(r){this.uppy.log(r)}};startListeningToResize=()=>{this.resizeObserver=new ResizeObserver(e=>{let t=e[0],{width:r,height:s}=t.contentRect;this.setPluginState({containerWidth:r,containerHeight:s,areInsidesReadyToBeVisible:!0})}),this.resizeObserver.observe(this.el.querySelector(".uppy-Dashboard-inner")),this.makeDashboardInsidesVisibleAnywayTimeout=setTimeout(()=>{let e=this.getPluginState(),t=!this.opts.inline&&e.isHidden;!e.areInsidesReadyToBeVisible&&!t&&(this.uppy.log("[Dashboard] resize event didn\u2019t fire on time: defaulted to mobile layout","warning"),this.setPluginState({areInsidesReadyToBeVisible:!0}))},1e3)};stopListeningToResize=()=>{this.resizeObserver.disconnect(),clearTimeout(this.makeDashboardInsidesVisibleAnywayTimeout)};recordIfFocusedOnUppyRecently=e=>{this.el.contains(e.target)?this.ifFocusedOnUppyRecently=!0:(this.ifFocusedOnUppyRecently=!1,this.superFocus.cancel())};disableInteractiveElements=e=>{let t=["a[href]","input:not([disabled])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])",'[role="button"]:not([disabled])'],r=this.#e??Tt(this.el.querySelectorAll(t)).filter(s=>!s.classList.contains("uppy-Dashboard-close"));for(let s of r)s.tagName==="A"?s.setAttribute("aria-disabled",e):s.disabled=e;e?this.#e=r:this.#e=null,this.dashboardIsDisabled=e};updateBrowserHistory=()=>{history.state?.[this.modalName]||history.pushState(J(B({},history.state),{[this.modalName]:!0}),""),window.addEventListener("popstate",this.handlePopState,!1)};handlePopState=e=>{this.isModalOpen()&&(!e.state||!e.state[this.modalName])&&this.closeModal({manualClose:!1}),!this.isModalOpen()&&e.state?.[this.modalName]&&history.back()};handleKeyDownInModal=e=>{e.keyCode===Fc&&this.requestCloseModal(),e.keyCode===_p&&Za(e,this.getPluginState().activeOverlayType,this.el)};handleClickOutside=()=>{this.opts.closeModalOnClickOutside&&this.requestCloseModal()};handlePaste=e=>{this.uppy.iteratePlugins(r=>{r.type==="acquirer"&&r.handleRootPaste?.(e)});let t=Tt(e.clipboardData.files);t.length>0&&(this.uppy.log("[Dashboard] Files pasted"),this.addFiles(t))};handleInputChange=e=>{e.preventDefault();let t=Tt(e.currentTarget.files||[]);t.length>0&&(this.uppy.log("[Dashboard] Files selected through input"),this.addFiles(t))};handleDragOver=e=>{e.preventDefault(),e.stopPropagation();let t=()=>{let o=!0;return this.uppy.iteratePlugins(n=>{n.canHandleRootDrop?.(e)&&(o=!0)}),o},r=()=>{let{types:o}=e.dataTransfer;return o.some(n=>n==="Files")},s=t(),a=r();if(!s&&!a||this.opts.disabled||this.opts.disableLocalFiles&&(a||!s)||!this.uppy.getState().allowNewUpload){e.dataTransfer.dropEffect="none";return}e.dataTransfer.dropEffect="copy",this.setPluginState({isDraggingOver:!0}),this.opts.onDragOver(e)};handleDragLeave=e=>{e.preventDefault(),e.stopPropagation(),this.setPluginState({isDraggingOver:!1}),this.opts.onDragLeave(e)};handleDrop=e=>j(this,null,function*(){e.preventDefault(),e.stopPropagation(),this.setPluginState({isDraggingOver:!1}),this.uppy.iteratePlugins(a=>{a.type==="acquirer"&&a.handleRootDrop?.(e)});let t=!1,r=a=>{this.uppy.log(a,"error"),t||(this.uppy.info(a.message,"error"),t=!0)};this.uppy.log("[Dashboard] Processing dropped files");let s=yield _r(e.dataTransfer,{logDropError:r});s.length>0&&(this.uppy.log("[Dashboard] Files dropped"),this.addFiles(s)),this.opts.onDrop(e)});handleRequestThumbnail=e=>{this.opts.waitForThumbnailsBeforeUpload||this.uppy.emit("thumbnail:request",e)};handleCancelThumbnail=e=>{this.opts.waitForThumbnailsBeforeUpload||this.uppy.emit("thumbnail:cancel",e)};handleKeyDownInInline=e=>{e.keyCode===_p&&Pp(e,this.getPluginState().activeOverlayType,this.el)};handlePasteOnBody=e=>{this.el.contains(document.activeElement)&&this.handlePaste(e)};handleComplete=({failed:e})=>{this.opts.closeAfterFinish&&!e?.length&&this.requestCloseModal()};#t=()=>{if(this.opts.disableThumbnailGenerator)return;let e=600,t=this.uppy.getFiles();if(t.length===1){let r=this.uppy.getPlugin(`${this.id}:ThumbnailGenerator`);r?.setOptions({thumbnailWidth:e});let s=J(B({},t[0]),{preview:void 0});r?.requestThumbnail(s).then(()=>{r?.setOptions({thumbnailWidth:this.opts.thumbnailWidth})})}};#i=e=>{let t=e[0],{metaFields:r}=this.getPluginState(),s=r&&r.length>0,a=this.canEditFile(t);s&&this.opts.autoOpen==="metaEditor"?this.toggleFileCard(!0,t.id):a&&this.opts.autoOpen==="imageEditor"&&this.openFileEditor(t)};initEvents=()=>{if(this.opts.trigger&&!this.opts.inline){let e=Ir(this.opts.trigger);e?e.forEach(t=>t.addEventListener("click",this.openModal)):this.uppy.log("Dashboard modal trigger not found. Make sure `trigger` is set in Dashboard options, unless you are planning to call `dashboard.openModal()` method yourself","warning")}this.startListeningToResize(),document.addEventListener("paste",this.handlePasteOnBody),this.uppy.on("plugin-added",this.#l),this.uppy.on("plugin-remove",this.removeTarget),this.uppy.on("file-added",this.hideAllPanels),this.uppy.on("dashboard:modal-closed",this.hideAllPanels),this.uppy.on("complete",this.handleComplete),this.uppy.on("files-added",this.#t),this.uppy.on("file-removed",this.#t),document.addEventListener("focus",this.recordIfFocusedOnUppyRecently,!0),document.addEventListener("click",this.recordIfFocusedOnUppyRecently,!0),this.opts.inline&&this.el.addEventListener("keydown",this.handleKeyDownInInline),this.opts.autoOpen&&this.uppy.on("files-added",this.#i)};removeEvents=()=>{let e=Ir(this.opts.trigger);!this.opts.inline&&e&&e.forEach(t=>t.removeEventListener("click",this.openModal)),this.stopListeningToResize(),document.removeEventListener("paste",this.handlePasteOnBody),window.removeEventListener("popstate",this.handlePopState,!1),this.uppy.off("plugin-added",this.#l),this.uppy.off("plugin-remove",this.removeTarget),this.uppy.off("file-added",this.hideAllPanels),this.uppy.off("dashboard:modal-closed",this.hideAllPanels),this.uppy.off("complete",this.handleComplete),this.uppy.off("files-added",this.#t),this.uppy.off("file-removed",this.#t),document.removeEventListener("focus",this.recordIfFocusedOnUppyRecently),document.removeEventListener("click",this.recordIfFocusedOnUppyRecently),this.opts.inline&&this.el.removeEventListener("keydown",this.handleKeyDownInInline),this.opts.autoOpen&&this.uppy.off("files-added",this.#i)};superFocusOnEachUpdate=()=>{let e=this.el.contains(document.activeElement),t=document.activeElement===document.body||document.activeElement===null,r=this.uppy.getState().info.length===0,s=!this.opts.inline;r&&(s||e||t&&this.ifFocusedOnUppyRecently)?this.superFocus(this.el,this.getPluginState().activeOverlayType):this.superFocus.cancel()};afterUpdate=()=>{if(this.opts.disabled&&!this.dashboardIsDisabled){this.disableInteractiveElements(!0);return}!this.opts.disabled&&this.dashboardIsDisabled&&this.disableInteractiveElements(!1),this.superFocusOnEachUpdate()};saveFileCard=(e,t)=>{this.uppy.setFileMeta(t,e),this.toggleFileCard(!1,t)};#r=e=>{let t=this.uppy.getPlugin(e.id);return J(B({},e),{icon:t.icon||this.opts.defaultPickerIcon,render:t.render})};#s=e=>{let t=this.uppy.getPlugin(e.id);return typeof t.isSupported!="function"?!0:t.isSupported()};#p=e=>e.filter(t=>t.type==="acquirer"&&this.#s(t)).map(this.#r);#o=e=>e.filter(t=>t.type==="progressindicator").map(this.#r);#n=e=>e.filter(t=>t.type==="editor").map(this.#r);render=e=>{let t=this.getPluginState(),{files:r,capabilities:s,allowNewUpload:a}=e,{newFiles:o,uploadStartedFiles:n,completeFiles:u,erroredFiles:c,inProgressFiles:m,inProgressNotPausedFiles:f,processingFiles:E,isUploadStarted:S,isAllComplete:D,isAllPaused:G}=this.uppy.getObjectOfFilesPerState(),q=this.#p(t.targets),W=this.#o(t.targets),te=this.#n(t.targets),H;return this.opts.theme==="auto"?H=s.darkMode?"dark":"light":H=this.opts.theme,["files","folders","both"].indexOf(this.opts.fileManagerSelectionType)<0&&(this.opts.fileManagerSelectionType="files",console.warn(`Unsupported option for "fileManagerSelectionType". Using default of "${this.opts.fileManagerSelectionType}".`)),ja({state:e,isHidden:t.isHidden,files:r,newFiles:o,uploadStartedFiles:n,completeFiles:u,erroredFiles:c,inProgressFiles:m,inProgressNotPausedFiles:f,processingFiles:E,isUploadStarted:S,isAllComplete:D,isAllPaused:G,totalFileCount:Object.keys(r).length,totalProgress:e.totalProgress,allowNewUpload:a,acquirers:q,theme:H,disabled:this.opts.disabled,disableLocalFiles:this.opts.disableLocalFiles,direction:this.opts.direction,activePickerPanel:t.activePickerPanel,showFileEditor:t.showFileEditor,saveFileEditor:this.saveFileEditor,closeFileEditor:this.closeFileEditor,disableInteractiveElements:this.disableInteractiveElements,animateOpenClose:this.opts.animateOpenClose,isClosing:t.isClosing,progressindicators:W,editors:te,autoProceed:this.uppy.opts.autoProceed,id:this.id,closeModal:this.requestCloseModal,handleClickOutside:this.handleClickOutside,handleInputChange:this.handleInputChange,handlePaste:this.handlePaste,inline:this.opts.inline,showPanel:this.showPanel,hideAllPanels:this.hideAllPanels,i18n:this.i18n,i18nArray:this.i18nArray,uppy:this.uppy,note:this.opts.note,recoveredState:e.recoveredState,metaFields:t.metaFields,resumableUploads:s.resumableUploads||!1,individualCancellation:s.individualCancellation,isMobileDevice:s.isMobileDevice,fileCardFor:t.fileCardFor,toggleFileCard:this.toggleFileCard,toggleAddFilesPanel:this.toggleAddFilesPanel,showAddFilesPanel:t.showAddFilesPanel,saveFileCard:this.saveFileCard,openFileEditor:this.openFileEditor,canEditFile:this.canEditFile,width:this.opts.width,height:this.opts.height,showLinkToFileUploadResult:this.opts.showLinkToFileUploadResult,fileManagerSelectionType:this.opts.fileManagerSelectionType,proudlyDisplayPoweredByUppy:this.opts.proudlyDisplayPoweredByUppy,showRemoveButtonAfterComplete:this.opts.showRemoveButtonAfterComplete,containerWidth:t.containerWidth,containerHeight:t.containerHeight,areInsidesReadyToBeVisible:t.areInsidesReadyToBeVisible,parentElement:this.el,allowedFileTypes:this.uppy.opts.restrictions.allowedFileTypes,maxNumberOfFiles:this.uppy.opts.restrictions.maxNumberOfFiles,requiredMetaFields:this.uppy.opts.restrictions.requiredMetaFields,showSelectedFiles:this.opts.showSelectedFiles,showNativePhotoCameraButton:this.opts.showNativePhotoCameraButton,showNativeVideoCameraButton:this.opts.showNativeVideoCameraButton,nativeCameraFacingMode:this.opts.nativeCameraFacingMode,singleFileFullScreen:this.opts.singleFileFullScreen,handleRequestThumbnail:this.handleRequestThumbnail,handleCancelThumbnail:this.handleCancelThumbnail,isDraggingOver:t.isDraggingOver,handleDragOver:this.handleDragOver,handleDragLeave:this.handleDragLeave,handleDrop:this.handleDrop,disableInformer:this.opts.disableInformer,disableStatusBar:this.opts.disableStatusBar,hideProgressDetails:this.opts.hideProgressDetails,hideUploadButton:this.opts.hideUploadButton,hideRetryButton:this.opts.hideRetryButton,hidePauseResumeButton:this.opts.hidePauseResumeButton,hideCancelButton:this.opts.hideCancelButton,hideProgressAfterFinish:this.opts.hideProgressAfterFinish,doneButtonHandler:this.opts.doneButtonHandler})};#a=()=>{let{plugins:e}=this.opts;e.forEach(t=>{let r=this.uppy.getPlugin(t);r?r.mount(this,r):this.uppy.log(`[Uppy] Dashboard could not find plugin '${t}', make sure to uppy.use() the plugins you are specifying`,"warning")})};#c=()=>{this.uppy.iteratePlugins(this.#l)};#l=e=>{let t=["acquirer","editor"];e&&!e.opts?.target&&t.includes(e.type)&&(this.getPluginState().targets.some(s=>e.id===s.id)||e.mount(this,e))};#u(){let{thumbnailWidth:e,thumbnailHeight:t,thumbnailType:r,waitForThumbnailsBeforeUpload:s}=this.opts;return{thumbnailWidth:e,thumbnailHeight:t,thumbnailType:r,waitForThumbnailsBeforeUpload:s,lazy:!s}}setOptions(e){super.setOptions(e),this.uppy.getPlugin(this.#d())?.setOptions(this.#u())}#d(){return`${this.id}:ThumbnailGenerator`}install=()=>{this.setPluginState({isHidden:!0,fileCardFor:null,activeOverlayType:null,showAddFilesPanel:!1,activePickerPanel:void 0,showFileEditor:!1,metaFields:this.opts.metaFields,targets:[],areInsidesReadyToBeVisible:!1,isDraggingOver:!1});let{inline:e,closeAfterFinish:t}=this.opts;if(e&&t)throw new Error("[Dashboard] `closeAfterFinish: true` cannot be used on an inline Dashboard, because an inline Dashboard cannot be closed at all. Either set `inline: false`, or disable the `closeAfterFinish` option.");let{allowMultipleUploads:r,allowMultipleUploadBatches:s}=this.uppy.opts;(r||s)&&t&&this.uppy.log("[Dashboard] When using `closeAfterFinish`, we recommended setting the `allowMultipleUploadBatches` option to `false` in the Uppy constructor. See https://uppy.io/docs/uppy/#allowMultipleUploads-true","warning");let{target:a}=this.opts;a&&this.mount(a,this),this.opts.disableThumbnailGenerator||this.uppy.use(ps,B({id:this.#d()},this.#u())),this.darkModeMediaQuery=typeof window<"u"&&window.matchMedia?window.matchMedia("(prefers-color-scheme: dark)"):null;let o=this.darkModeMediaQuery?this.darkModeMediaQuery.matches:!1;this.uppy.log(`[Dashboard] Dark mode is ${o?"on":"off"}`),this.setDarkModeCapability(o),this.opts.theme==="auto"&&this.darkModeMediaQuery?.addListener(this.handleSystemDarkModeChange),this.#a(),this.#c(),this.initEvents()};uninstall=()=>{if(!this.opts.disableThumbnailGenerator){let t=this.uppy.getPlugin(`${this.id}:ThumbnailGenerator`);t&&this.uppy.removePlugin(t)}let{plugins:e}=this.opts;e.forEach(t=>{let r=this.uppy.getPlugin(t);r&&r.unmount()}),this.opts.theme==="auto"&&this.darkModeMediaQuery?.removeListener(this.handleSystemDarkModeChange),this.opts.disablePageScrollWhenModalOpen&&document.body.classList.remove("uppy-Dashboard-isFixed"),this.unmount(),this.removeEvents()}};var Wa=class{onMount(e,t){this.options=B(B({},e),this.props),this.uppy.use(t,this.options),this.plugin=this.uppy.getPlugin(this.options.id)}handleChanges(e,t){e.uppy&&this.uppy!==e.uppy.previousValue&&e.uppy.previousValue!==void 0&&(this.uninstall(e.uppy.previousValue),this.uppy.use(t,this.options)),this.options=B(B({},this.options),this.props),this.plugin=this.uppy.getPlugin(this.options.id),e.props&&this.props!==e.props.previousValue&&e.props.previousValue!==void 0&&this.plugin.setOptions(B({},this.options))}uninstall(e=this.uppy){e.removePlugin(this.plugin)}},Mp=(()=>{let e=class e extends Wa{constructor(){super(),this.el=Ii(Qo),this.uppy=new Ui,this.props={}}ngOnInit(){this.onMount({id:"angular:Dashboard",inline:!0,target:this.el.nativeElement},Ri)}ngOnChanges(r){this.handleChanges(r,Ri)}ngOnDestroy(){this.uninstall()}};e.\u0275fac=function(s){return new(s||e)},e.\u0275cmp=kr({type:e,selectors:[["uppy-dashboard"]],inputs:{uppy:"uppy",props:"props"},features:[bo,yo],decls:0,vars:0,template:function(s,a){},encapsulation:2,changeDetection:0});let i=e;return i})();var Ka=we(Xi(),1);var Op=we(zp(),1);var Ap={strings:{compressingImages:"Compressing images...",compressedX:"Saved %{size} by compressing images"}};var Uc={quality:.6,limit:10},ys=class extends ii{#e;constructor(e,t){super(e,B(B({},Uc),t)),this.id=this.opts.id||"Compressor",this.type="modifier",this.defaultLocale=Ap,this.#e=new Gi(this.opts.limit),this.i18nInit(),this.prepareUpload=this.prepareUpload.bind(this),this.compress=this.compress.bind(this)}compress(e){return new Promise((t,r)=>{new Op.default(e,J(B({},this.opts),{success:t,error:r}))})}prepareUpload(e){return j(this,null,function*(){let t=0,r=[],s=this.#e.wrapPromiseFunction(o=>j(this,null,function*(){try{if(o.data==null)throw new Error("File data is empty");let n=yield this.compress(o.data),u=o.data.size-n.size;this.uppy.log(`[Image Compressor] Image ${o.id} compressed by ${(0,Ka.default)(u)}`),t+=u;let{name:c,type:m,size:f}=n,E=gt(c),D=`${gt(o.meta.name).name}.${E.extension}`;this.uppy.setFileState(o.id,J(B(B(B(B({},c&&{name:c}),E.extension&&{extension:E.extension}),m&&{type:m}),f&&{size:f}),{data:n,meta:J(B({},o.meta),{type:m,name:D})})),r.push(o)}catch(n){this.uppy.log(`[Image Compressor] Failed to compress ${o.id}:`,"warning"),this.uppy.log(n,"warning")}})),a=e.map(o=>{let n=this.uppy.getFile(o);return this.uppy.emit("preprocess-progress",n,{mode:"indeterminate",message:this.i18n("compressingImages")}),n.isRemote||(n.data.type||(n.data=n.data.slice(0,n.data.size,n.type)),!n.type?.startsWith("image/"))?Promise.resolve():s(n)});yield Promise.all(a),this.uppy.emit("compressor:complete",r),t>1024&&this.uppy.info(this.i18n("compressedX",{size:(0,Ka.default)(t)}),"info");for(let o of e){let n=this.uppy.getFile(o);this.uppy.emit("preprocess-complete",n)}})}install(){this.uppy.addPreProcessor(this.prepareUpload)}uninstall(){this.uppy.removePreProcessor(this.prepareUpload)}};var Gp={name:"@uppy/image-editor",description:"Image editor and cropping UI",version:"4.0.2",license:"MIT",style:"dist/style.min.css",type:"module",sideEffects:["*.css"],scripts:{build:"tsc --build tsconfig.build.json","build:css":"sass --load-path=../../ src/style.scss dist/style.css && postcss dist/style.css -u cssnano -o dist/style.min.css",typecheck:"tsc --build"},keywords:["file uploader","upload","uppy","uppy-plugin","image editor","cropper","crop","rotate","resize"],homepage:"https://uppy.io",bugs:{url:"https://github.com/transloadit/uppy/issues"},repository:{type:"git",url:"git+https://github.com/transloadit/uppy.git"},files:["src","lib","dist","CHANGELOG.md"],exports:{".":"./lib/index.js","./css/style.css":"./dist/style.css","./css/style.min.css":"./dist/style.min.css","./css/style.scss":"./src/style.scss","./package.json":"./package.json"},dependencies:{"@uppy/utils":"^7.1.1",cropperjs:"^1.6.2",preact:"^10.5.13"},peerDependencies:{"@uppy/core":"^5.1.1"},publishConfig:{access:"public"},devDependencies:{cssnano:"^7.0.7",postcss:"^8.5.6","postcss-cli":"^11.0.1",sass:"^1.89.2",typescript:"^5.8.3"}};var Yp=we(Hp(),1);function vc(i,e){let t=i.width/e.width,r=i.height/e.height,s=Math.min(t,r),a=e.width*s,o=e.height*s,n=(i.width-a)/2,u=(i.height-o)/2;return{width:a,height:o,left:n,top:u}}var jp=vc;function Sc(i){return i*(Math.PI/180)}function wc(i,e,t){let r=Math.abs(Sc(t));return Math.max((Math.sin(r)*i+Math.cos(r)*e)/e,(Math.sin(r)*e+Math.cos(r)*i)/i)}var Jp=wc;function Dc(i,e,t){return e.left<i.left?{left:i.left,width:t.width}:e.top<i.top?{top:i.top,height:t.height}:e.left+e.width>i.left+i.width?{left:i.left+i.width-t.width,width:t.width}:e.top+e.height>i.top+i.height?{top:i.top+i.height-t.height,height:t.height}:null}var Zp=Dc;function Lc(i,e,t){return e.left<i.left?{left:i.left,width:t.left+t.width-i.left}:e.top<i.top?{top:i.top,height:t.top+t.height-i.top}:e.left+e.width>i.left+i.width?{left:t.left,width:i.left+i.width-t.left}:e.top+e.height>i.top+i.height?{top:t.top,height:i.top+i.height-t.top}:null}var Wp=Lc;var Qs=class extends je{imgElement;cropper;constructor(e){super(e),this.state={angle90Deg:0,angleGranular:0,prevCropboxData:null},this.storePrevCropboxData=this.storePrevCropboxData.bind(this),this.limitCropboxMovement=this.limitCropboxMovement.bind(this)}componentDidMount(){let{opts:e,storeCropperInstance:t}=this.props;this.cropper=new Yp.default(this.imgElement,e.cropperOptions),this.imgElement.addEventListener("cropstart",this.storePrevCropboxData),this.imgElement.addEventListener("cropend",this.limitCropboxMovement),t(this.cropper)}componentWillUnmount(){this.cropper.destroy(),this.imgElement.removeEventListener("cropstart",this.storePrevCropboxData),this.imgElement.removeEventListener("cropend",this.limitCropboxMovement)}storePrevCropboxData(){this.setState({prevCropboxData:this.cropper.getCropBoxData()})}limitCropboxMovement(e){let t=this.cropper.getCanvasData(),r=this.cropper.getCropBoxData(),{prevCropboxData:s}=this.state;if(e.detail.action==="all"){let a=Zp(t,r,s);a&&this.cropper.setCropBoxData(a)}else{let a=Wp(t,r,s);a&&this.cropper.setCropBoxData(a)}}onRotate90Deg=()=>{let{angle90Deg:e}=this.state,t=e-90;this.setState({angle90Deg:t,angleGranular:0}),this.cropper.scale(1),this.cropper.rotateTo(t);let r=this.cropper.getCanvasData(),s=this.cropper.getContainerData(),a=jp(s,r);this.cropper.setCanvasData(a),this.cropper.setCropBoxData(a)};onRotateGranular=e=>{let t=Number(e.target.value);this.setState({angleGranular:t});let{angle90Deg:r}=this.state,s=r+t;this.cropper.rotateTo(s);let a=this.cropper.getImageData(),o=Jp(a.naturalWidth,a.naturalHeight,t),n=this.cropper.getImageData().scaleX<0?-o:o;this.cropper.scale(n,o)};renderGranularRotate(){let{i18n:e}=this.props,{angleGranular:t}=this.state;return l("label",{role:"tooltip","aria-label":`${t}\xBA`,"data-microtip-position":"top",className:"uppy-ImageCropper-rangeWrapper",children:l("input",{className:"uppy-ImageCropper-range uppy-u-reset",type:"range",onInput:this.onRotateGranular,onChange:this.onRotateGranular,value:t,min:"-45",max:"45","aria-label":e("rotate")})})}renderRevert(){let{i18n:e,opts:t}=this.props;return l("button",{"data-microtip-position":"top",type:"button",className:"uppy-u-reset uppy-c-btn","aria-label":e("revert"),onClick:()=>{this.cropper.reset(),this.cropper.setAspectRatio(t.cropperOptions.initialAspectRatio),this.setState({angle90Deg:0,angleGranular:0})},children:l("svg",{"aria-hidden":"true",className:"uppy-c-icon",width:"24",height:"24",viewBox:"0 0 24 24",children:[l("path",{d:"M0 0h24v24H0z",fill:"none"}),l("path",{d:"M13 3c-4.97 0-9 4.03-9 9H1l3.89 3.89.07.14L9 12H6c0-3.87 3.13-7 7-7s7 3.13 7 7-3.13 7-7 7c-1.93 0-3.68-.79-4.94-2.06l-1.42 1.42C8.27 19.99 10.51 21 13 21c4.97 0 9-4.03 9-9s-4.03-9-9-9zm-1 5v5l4.28 2.54.72-1.21-3.5-2.08V8H12z"})]})})}renderRotate(){let{i18n:e}=this.props;return l("button",{"data-microtip-position":"top",type:"button",className:"uppy-u-reset uppy-c-btn","aria-label":e("rotate"),onClick:this.onRotate90Deg,children:l("svg",{"aria-hidden":"true",className:"uppy-c-icon",width:"24",height:"24",viewBox:"0 0 24 24",children:[l("path",{d:"M0 0h24v24H0V0zm0 0h24v24H0V0z",fill:"none"}),l("path",{d:"M14 10a2 2 0 012 2v7a2 2 0 01-2 2H6a2 2 0 01-2-2v-7a2 2 0 012-2h8zm0 1.75H6a.25.25 0 00-.243.193L5.75 12v7a.25.25 0 00.193.243L6 19.25h8a.25.25 0 00.243-.193L14.25 19v-7a.25.25 0 00-.193-.243L14 11.75zM12 .76V4c2.3 0 4.61.88 6.36 2.64a8.95 8.95 0 012.634 6.025L21 13a1 1 0 01-1.993.117L19 13h-.003a6.979 6.979 0 00-2.047-4.95 6.97 6.97 0 00-4.652-2.044L12 6v3.24L7.76 5 12 .76z"})]})})}renderFlip(){let{i18n:e}=this.props;return l("button",{"data-microtip-position":"top",type:"button",className:"uppy-u-reset uppy-c-btn","aria-label":e("flipHorizontal"),onClick:()=>this.cropper.scaleX(-this.cropper.getData().scaleX||-1),children:l("svg",{"aria-hidden":"true",className:"uppy-c-icon",width:"24",height:"24",viewBox:"0 0 24 24",children:[l("path",{d:"M0 0h24v24H0z",fill:"none"}),l("path",{d:"M15 21h2v-2h-2v2zm4-12h2V7h-2v2zM3 5v14c0 1.1.9 2 2 2h4v-2H5V5h4V3H5c-1.1 0-2 .9-2 2zm16-2v2h2c0-1.1-.9-2-2-2zm-8 20h2V1h-2v22zm8-6h2v-2h-2v2zM15 5h2V3h-2v2zm4 8h2v-2h-2v2zm0 8c1.1 0 2-.9 2-2h-2v2z"})]})})}renderZoomIn(){let{i18n:e}=this.props;return l("button",{"data-microtip-position":"top",type:"button",className:"uppy-u-reset uppy-c-btn","aria-label":e("zoomIn"),onClick:()=>this.cropper.zoom(.1),children:l("svg",{"aria-hidden":"true",className:"uppy-c-icon",height:"24",viewBox:"0 0 24 24",width:"24",children:[l("path",{d:"M0 0h24v24H0V0z",fill:"none"}),l("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"}),l("path",{d:"M12 10h-2v2H9v-2H7V9h2V7h1v2h2v1z"})]})})}renderZoomOut(){let{i18n:e}=this.props;return l("button",{"data-microtip-position":"top",type:"button",className:"uppy-u-reset uppy-c-btn","aria-label":e("zoomOut"),onClick:()=>this.cropper.zoom(-.1),children:l("svg",{"aria-hidden":"true",className:"uppy-c-icon",width:"24",height:"24",viewBox:"0 0 24 24",children:[l("path",{d:"M0 0h24v24H0V0z",fill:"none"}),l("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14zM7 9h5v1H7z"})]})})}renderCropSquare(){let{i18n:e}=this.props;return l("button",{"data-microtip-position":"top",type:"button",className:"uppy-u-reset uppy-c-btn","aria-label":e("aspectRatioSquare"),onClick:()=>this.cropper.setAspectRatio(1),children:l("svg",{"aria-hidden":"true",className:"uppy-c-icon",width:"24",height:"24",viewBox:"0 0 24 24",children:[l("path",{d:"M0 0h24v24H0z",fill:"none"}),l("path",{d:"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"})]})})}renderCropWidescreen(){let{i18n:e}=this.props;return l("button",{"data-microtip-position":"top",type:"button",className:"uppy-u-reset uppy-c-btn","aria-label":e("aspectRatioLandscape"),onClick:()=>this.cropper.setAspectRatio(16/9),children:l("svg",{"aria-hidden":"true",className:"uppy-c-icon",width:"24",height:"24",viewBox:"0 0 24 24",children:[l("path",{d:"M 19,4.9999992 V 17.000001 H 4.9999998 V 6.9999992 H 19 m 0,-2 H 4.9999998 c -1.0999999,0 -1.9999999,0.9000001 -1.9999999,2 V 17.000001 c 0,1.1 0.9,2 1.9999999,2 H 19 c 1.1,0 2,-0.9 2,-2 V 6.9999992 c 0,-1.0999999 -0.9,-2 -2,-2 z"}),l("path",{fill:"none",d:"M0 0h24v24H0z"})]})})}renderCropWidescreenVertical(){let{i18n:e}=this.props;return l("button",{"data-microtip-position":"top",type:"button","aria-label":e("aspectRatioPortrait"),className:"uppy-u-reset uppy-c-btn",onClick:()=>this.cropper.setAspectRatio(9/16),children:l("svg",{"aria-hidden":"true",className:"uppy-c-icon",width:"24",height:"24",viewBox:"0 0 24 24",children:[l("path",{d:"M 19.000001,19 H 6.999999 V 5 h 10.000002 v 14 m 2,0 V 5 c 0,-1.0999999 -0.9,-1.9999999 -2,-1.9999999 H 6.999999 c -1.1,0 -2,0.9 -2,1.9999999 v 14 c 0,1.1 0.9,2 2,2 h 10.000002 c 1.1,0 2,-0.9 2,-2 z"}),l("path",{d:"M0 0h24v24H0z",fill:"none"})]})})}render(){let{currentImage:e,opts:t}=this.props,{actions:r}=t;if(e.data==null)throw new Error("File data is empty");let s=URL.createObjectURL(e.data);return l("div",{className:"uppy-ImageCropper",children:[l("div",{className:"uppy-ImageCropper-container",children:l("img",{className:"uppy-ImageCropper-image",alt:e.name,src:s,ref:a=>{this.imgElement=a}})}),l("div",{className:"uppy-ImageCropper-controls",children:[r.revert&&this.renderRevert(),r.rotate&&this.renderRotate(),r.granularRotate&&this.renderGranularRotate(),r.flip&&this.renderFlip(),r.zoomIn&&this.renderZoomIn(),r.zoomOut&&this.renderZoomOut(),r.cropSquare&&this.renderCropSquare(),r.cropWidescreen&&this.renderCropWidescreen(),r.cropWidescreenVertical&&this.renderCropWidescreenVertical()]})]})}};var qp={strings:{revert:"Reset",rotate:"Rotate 90\xB0",zoomIn:"Zoom in",zoomOut:"Zoom out",flipHorizontal:"Flip horizontally",aspectRatioSquare:"Crop square",aspectRatioLandscape:"Crop landscape (16:9)",aspectRatioPortrait:"Crop portrait (9:16)"}};var Kp={viewMode:0,background:!1,autoCropArea:1,responsive:!0,minCropBoxWidth:70,minCropBoxHeight:70,croppedCanvasOptions:{},initialAspectRatio:0},Xp={revert:!0,rotate:!0,granularRotate:!0,flip:!0,zoomIn:!0,zoomOut:!0,cropSquare:!0,cropWidescreen:!0,cropWidescreenVertical:!0},Rc={quality:.8,actions:Xp,cropperOptions:Kp},Fr=class extends ri{static VERSION=Gp.version;cropper;constructor(e,t){super(e,J(B(B({},Rc),t),{actions:B(B({},Xp),t?.actions),cropperOptions:B(B({},Kp),t?.cropperOptions)})),this.id=this.opts.id||"ImageEditor",this.title="Image Editor",this.type="editor",this.defaultLocale=qp,this.i18nInit()}canEditFile(e){if(!e.type||e.isRemote)return!1;let t=e.type.split("/")[1];return!!/^(jpe?g|gif|png|bmp|webp)$/.test(t)}save=()=>{let e=s=>{let{currentImage:a}=this.getPluginState();this.uppy.setFileState(a.id,{data:new File([s],a.name??this.i18n("unnamed"),{type:s.type}),size:s.size,preview:void 0});let o=this.uppy.getFile(a.id);this.uppy.emit("thumbnail:request",o),this.setPluginState({currentImage:o}),this.uppy.emit("file-editor:complete",o)},{currentImage:t}=this.getPluginState(),r=this.cropper.getCroppedCanvas({});r.width%2!==0&&this.cropper.setData({width:r.width-1}),r.height%2!==0&&this.cropper.setData({height:r.height-1}),this.cropper.getCroppedCanvas(this.opts.cropperOptions.croppedCanvasOptions).toBlob(e,t.type,this.opts.quality)};storeCropperInstance=e=>{this.cropper=e};selectFile=e=>{this.uppy.emit("file-editor:start",e),this.setPluginState({currentImage:e})};install(){this.setPluginState({currentImage:null});let{target:e}=this.opts;e&&this.mount(e,this)}uninstall(){let{currentImage:e}=this.getPluginState();if(e){let t=this.uppy.getFile(e.id);this.uppy.emit("file-editor:cancel",t)}this.unmount()}render(){let{currentImage:e}=this.getPluginState();return e===null||e.isRemote?null:l(Qs,{currentImage:e,storeCropperInstance:this.storeCropperInstance,save:this.save,opts:this.opts,i18n:this.i18n})}};var ed=we($p(),1);var Nc=["*"];function kc(i,e){if(i&1&&(qt(0,"small",4),xi(1),Kt()),i&2){let t=Qi(2);Ct(),Uo(t.subtitle)}}function Cc(i,e){if(i&1&&(qt(0,"a",5),Cr(1,"i",6),xi(2," Download Template "),Kt()),i&2){let t=Qi(2);Es("href",t.sampleUrl,xo)}}function Tc(i,e){if(i&1&&(qt(0,"div",2),gi(1,kc,2,1,"small",4),gi(2,Cc,3,1,"a",5),Bo(3),Kt()),i&2){let t=Qi();Ct(),yi(t.subtitle&&t.showSubtitle?1:-1),Ct(),yi(t.sampleUrl&&t.showSample?2:-1)}}function Ic(i,e){if(i&1&&xi(0),i&2){let t=Qi(2);vs(" - ",t.rowSummary().rowEmpty," empty in the CSV you uploaded ")}}function Pc(i,e){if(i&1&&(qt(0,"div",3)(1,"h4",7),xi(2,"CSV File Content Summary"),Kt(),Cr(3,"hr"),qt(4,"p",8),xi(5),gi(6,Ic,1,1),Kt()()),i&2){let t=Qi();Ct(5),vs(" ",t.rowSummary().rowCount," rows found "),Ct(),yi(t.rowSummary().rowEmpty>0?6:-1)}}var sF=(()=>{let e=class e{constructor(){this.folder="test",this.thumbnailSize="small",this.sampleUrl="",this.subtitle="",this.showSample=!0,this.clear=Pi(!1),this.resetUppy=Pi(!1),this.showSubtitle=!0,this.uppyCoreConfiguration=Pi(),this.dashboardPropsConfiguration=Pi(),this.fileUploaded=new mi,this.fileUploadComplete=new mi,this.fileRemoved=new mi,this.onParser=new mi,this.multipleFilesUploaded=new mi,this.http=Ii(Do),this.csvParser=Ii(wo),this.rowSummary=Nr({rowCount:0,rowEmpty:0}),this.file=Nr(null),this.multipleFiles=Nr([]),this.uppy=new Ui({debug:!0,autoProceed:!0,allowMultipleUploadBatches:!1,restrictions:{allowedFileTypes:[".csv"],maxTotalFileSize:1e6},onBeforeFileAdded:(r,s)=>J(B({},r),{name:r.name?.replace(/ /g,"_")})}).use(ys,{mimeType:"image/jpeg",convertSize:1/0,convertTypes:["image/png"]}).use(Fr),this.dashboardProps={hideUploadButton:!0,height:350},Tr(()=>this.uppy.setOptions(B({},this.uppyCoreConfiguration()))),Tr(()=>this.dashboardProps=B(B({},this.dashboardProps),this.dashboardPropsConfiguration())),Tr(()=>{this.resetUppy()&&this.uppy.cancelAll()}),this.uppy.on("upload",(r,s)=>{let a=s[0]?.data;this.showSample=!1,this.showSubtitle=!1,this.emitFileUpload(a),this.file.set(s[0].data),ed.default.parse(a,{skipEmptyLines:"greedy",header:!0,beforeFirstChunk:o=>{let n=o.split(/\r?\n/).slice(1);return n[n.length-1]===""&&n.pop(),this.rowSummary.update(u=>J(B({},u),{rowCount:n.length})),n.forEach(u=>{u.split(",").every(m=>m==="")&&this.rowSummary.update(m=>J(B({},m),{rowEmpty:m.rowEmpty+1}))}),o},error(o,n){console.log("ERROR",o,n)},complete:(o,n)=>{this.onParser.emit(o.data)}})}),this.uppy.on("complete",r=>{let s=r.successful?.map(o=>({file:o.data,id:o.id}))??[],a=r.successful[0]?.data;this.showSample=!1,this.showSubtitle=!1,this.emitFileUploadComplete(a),this.emitMultipleFilesUploaded(s),this.resetUppyOnComplete(),this.file.set(a),this.multipleFiles.set(s)}),this.uppy.on("file-removed",r=>{this.showSample=!0,this.showSubtitle=!0,this.file.set(null);let a=this.multipleFiles().filter(o=>o.id!=r.id);this.multipleFiles.set(a),this.fileRemoved.emit(r.id),this.rowSummary.set({rowCount:0,rowEmpty:0})}),this.onFileEdited()}onFileEdited(){this.clear()==!1&&(this.uppy.on("file-editor:start",r=>{}),this.uppy.on("file-editor:complete",r=>{this.handlingEditedImage(r)}),this.uppy.on("file-editor:cancel",r=>{}))}handlingEditedImage(r){this.multipleFiles.update(s=>s.map(a=>a.id===r.id?J(B({},a),{file:r.data}):a)),this.file.set(this.multipleFiles()[0].file),this.emitFileUploadComplete(this.file()),this.emitMultipleFilesUploaded(this.multipleFiles())}resetUppyOnComplete(){this.clear()&&this.uppy.clear()}formatFileSize(r,s=2){if(r===0)return"0 bytes";let a=Math.floor(Math.log(r)/Math.log(e.kilobyte));return`${(r/Math.pow(e.kilobyte,a)).toFixed(s)} ${e.sizes[a]}`}ngOnDestroy(){this.file.set(null),this.multipleFiles.set([])}emitFileUpload(r){let s=new File([r],r.name.replace(/ /g,"_"),{type:r.type});this.fileUploaded.emit(s)}emitFileUploadComplete(r){let s=new File([r],r.name.replace(/ /g,"_"),{type:r.type});this.fileUploadComplete.emit(s)}emitMultipleFilesUploaded(r){let s=r.map(a=>({file:new File([a.file],a.file.name.replace(/ /g,"_"),{type:a.file.type}),id:a.id}));this.multipleFilesUploaded.emit(s)}};e.sizes=["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"],e.kilobyte=1024,e.\u0275fac=function(s){return new(s||e)},e.\u0275cmp=kr({type:e,selectors:[["POS-uppy"]],inputs:{folder:"folder",thumbnailSize:"thumbnailSize",sampleUrl:"sampleUrl",subtitle:"subtitle",showSample:"showSample",clear:[1,"clear"],resetUppy:[1,"resetUppy"],uppyCoreConfiguration:[1,"uppyCoreConfiguration"],dashboardPropsConfiguration:[1,"dashboardPropsConfiguration"]},outputs:{fileUploaded:"fileUploaded",fileUploadComplete:"fileUploadComplete",fileRemoved:"fileRemoved",onParser:"onParser",multipleFilesUploaded:"multipleFilesUploaded"},ngContentSelectors:Nc,decls:4,vars:4,consts:[[1,"position-relative"],[3,"uppy","props"],[1,"wrapper"],["role","alert",1,"alert","alert-warning","d-flex","flex-column","gap-2",2,"margin","1rem 0 0 0"],[1,"subtitle"],["role","button",1,"sample",3,"href"],[1,"fa-solid","fa-download","ms-3"],[1,"alert-heading"],[1,"fs-6","m-0"]],template:function(s,a){if(s&1&&(Fo(),qt(0,"div",0),Cr(1,"uppy-dashboard",1),gi(2,Tc,4,2,"div",2),gi(3,Pc,7,2,"div",3),Kt()),s&2){let o;Ct(),Es("uppy",a.uppy)("props",a.dashboardProps),Ct(),yi(a.file()?-1:2),Ct(),yi(a.file()&&((o=a.file())==null?null:o.type)==="text/csv"?3:-1)}},dependencies:[Mp],styles:[".uppy-Dashboard-AddFiles-info{display:none!important} .uppy-Dashboard-AddFiles-list{flex:none;flex-direction:row;flex-wrap:wrap;justify-content:center;max-width:600px;margin-top:15px;padding-top:0;overflow-y:visible}.sample[_ngcontent-%COMP%], .subtitle[_ngcontent-%COMP%]{top:56%;width:100%;text-align:center}.top-58[_ngcontent-%COMP%]{top:61%}.wrapper[_ngcontent-%COMP%]{position:absolute;left:0;bottom:30%;width:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;row-gap:.2rem;z-index:10}"]});let i=e;return i})();export{Do as a,$p as b,sF as c};
@@ -1 +1 @@
1
- import{a as g}from"./chunk-SXAXSC44.js";import{Ca as l,Lc as h,e as c}from"./chunk-JYZTRN6N.js";var p=class extends g{constructor(t,e,s,i,n,a,o,r){super(t,e,s,i,n,a,o);this.httpService=e;this.toastrService=n;this.route=a;this.cdr=r;r&&h(()=>{this.infiniteListSignal(),this.cdr.markForCheck()})}toastrCount=0;nextPageDisabled=!1;extendData=!1;goToLast=!1;listTotal=0;_infiniteList$=new c([]);infiniteListSignal=l([]);get infiniteList(){return this._infiniteList$.value}set infiniteList(t){this._infiniteList$.next(t),this.infiniteListSignal.set(t)}originalData=[];StoreRowsCountAPIResult(t,e=!1){this.httpService.post("/api/"+t,this.pageData.Filter).subscribe(s=>{this.listTotal=s.Count,this.pageData.HideStoreApiCount=!0,e&&(this.pageData.Filter.RowCount=this.listTotal,this.goToLast=!0,this.pageData.Filter.PageNumber=1,this.getListData()),this.cdr&&this.cdr.markForCheck()})}NextPage(t){this.pageData.Filter.PageNumber=this.pageData.Filter.PageNumber||1,this.pageData.Filter.PageNumber+=1,this.extendData=t,this.getListData()}postInit(t){t?.Data?.length>0&&(this.toastrCount=0),t?.Data?.length===0&&this.toastrCount===0&&(this.toastrService?.info("No more data to load","Info"),this.toastrCount=1);let e=Array.isArray(t.Data?.hits),s=Array.isArray(t.Data?.[0]?.Variants),i=[...this.infiniteList];if(this.extendData){let a=i.at(-1),o=t.Data.find(r=>r.ID===a?.ID);if(s&&a)if(o){let r=t.Data.filter(u=>u.ID!==a?.ID);a.Variants=a.Variants.concat(o.Variants||[]),i=i.concat(r)}else i=i.concat(t.Data);else i=i.concat(e?t.Data.hits:t.Data);this.postExtendData(t),this.extendData=!1}else i=e?t.Data.hits:t.Data,this.assignAggregate(t);this.infiniteList=i,this.originalData=[...i];let n=e?t.Data.hits.length:t.Data.length;this.nextPageDisabled=n<this.pageData.Filter.RowCount,this.menuData.H=this.data.PageTitle||this.menuData.H,this.afterPostInit(t),this.cdr?.markForCheck?.()}afterPostInit(t){}preSearchFromPageOne(){this.goToLast=!1}postExtendData(t){}assignAggregate(t){}};export{p as a};
1
+ import{a as g}from"./chunk-YFRQWQ66.js";import{Ca as l,Lc as h,e as c}from"./chunk-JYZTRN6N.js";var p=class extends g{constructor(t,e,s,i,n,a,o,r){super(t,e,s,i,n,a,o);this.httpService=e;this.toastrService=n;this.route=a;this.cdr=r;r&&h(()=>{this.infiniteListSignal(),this.cdr.markForCheck()})}toastrCount=0;nextPageDisabled=!1;extendData=!1;goToLast=!1;listTotal=0;_infiniteList$=new c([]);infiniteListSignal=l([]);get infiniteList(){return this._infiniteList$.value}set infiniteList(t){this._infiniteList$.next(t),this.infiniteListSignal.set(t)}originalData=[];StoreRowsCountAPIResult(t,e=!1){this.httpService.post("/api/"+t,this.pageData.Filter).subscribe(s=>{this.listTotal=s.Count,this.pageData.HideStoreApiCount=!0,e&&(this.pageData.Filter.RowCount=this.listTotal,this.goToLast=!0,this.pageData.Filter.PageNumber=1,this.getListData()),this.cdr&&this.cdr.markForCheck()})}NextPage(t){this.pageData.Filter.PageNumber=this.pageData.Filter.PageNumber||1,this.pageData.Filter.PageNumber+=1,this.extendData=t,this.getListData()}postInit(t){t?.Data?.length>0&&(this.toastrCount=0),t?.Data?.length===0&&this.toastrCount===0&&(this.toastrService?.info("No more data to load","Info"),this.toastrCount=1);let e=Array.isArray(t.Data?.hits),s=Array.isArray(t.Data?.[0]?.Variants),i=[...this.infiniteList];if(this.extendData){let a=i.at(-1),o=t.Data.find(r=>r.ID===a?.ID);if(s&&a)if(o){let r=t.Data.filter(u=>u.ID!==a?.ID);a.Variants=a.Variants.concat(o.Variants||[]),i=i.concat(r)}else i=i.concat(t.Data);else i=i.concat(e?t.Data.hits:t.Data);this.postExtendData(t),this.extendData=!1}else i=e?t.Data.hits:t.Data,this.assignAggregate(t);this.infiniteList=i,this.originalData=[...i];let n=e?t.Data.hits.length:t.Data.length;this.nextPageDisabled=n<this.pageData.Filter.RowCount,this.menuData.H=this.data.PageTitle||this.menuData.H,this.afterPostInit(t),this.cdr?.markForCheck?.()}afterPostInit(t){}preSearchFromPageOne(){this.goToLast=!1}postExtendData(t){}assignAggregate(t){}};export{p as a};
@@ -1 +1 @@
1
- import{a as le}from"./chunk-A56Z62HU.js";import{a as oe,b as ae,c as re}from"./chunk-AEXXXOEQ.js";import{a as xe,b as fe}from"./chunk-I3ABVEQL.js";import{f as ye}from"./chunk-M326IFGL.js";import{c as ve}from"./chunk-WPMZWFSL.js";import{b as se}from"./chunk-T2H2XAEJ.js";import{a as _e}from"./chunk-4QM23MMO.js";import{e as ue,f as ge}from"./chunk-GSAGOZJT.js";import{b as Ce}from"./chunk-EZRYO7BE.js";import{b as ne,c as ie}from"./chunk-C4WJKF7R.js";import{a as me,d as pe,e as de}from"./chunk-7TBS7SPQ.js";import{g as ce}from"./chunk-A45GTZVV.js";import{F as $,c as U,h as X,o as Y,q as Z}from"./chunk-RNLSEEMX.js";import{d as te}from"./chunk-USJ6ILEE.js";import{Ab as N,Bb as H,Bc as S,Ca as O,Cb as g,Cc as w,Db as o,Eb as a,Fb as j,Hc as G,Jb as F,Kb as M,Lc as R,Mb as T,Ob as V,Qb as r,Xa as i,Zd as K,be as J,db as h,dc as m,ec as D,ee,fc as y,hb as L,ic as v,jc as x,kc as f,lb as W,nb as A,oc as k,od as q,pa as E,rd as z,ta as C,ua as _,uc as Q,vb as d,xb as s,zb as B}from"./chunk-JYZTRN6N.js";import{a as b,b as P}from"./chunk-SNAKHGZS.js";var he=n=>({ID:n});function De(n,p){if(n&1){let e=T();o(0,"button",16),V("click",function(){C(e);let t=r();return _(t.openExportModal())}),j(1,"i",17),m(2," Export "),a()}}function Se(n,p){if(n&1&&(o(0,"span",27),m(1),a()),n&2){let e=p.item;g("matTooltip",k(e.Value)),i(),D(e.Value)}}function we(n,p){if(n&1){let e=T();o(0,"div",18)(1,"div")(2,"h6"),m(3,"Outlet"),a(),o(4,"outlet-selector",19),f("ngModelChange",function(t){C(e);let l=r();return x(l.pageData.Filter.OutletID,t)||(l.pageData.Filter.OutletID=t),_(t)}),a()(),o(5,"div")(6,"h6"),m(7,"Category"),a(),o(8,"POS-product-category-select",20),f("selectedCategoryIDChange",function(t){C(e);let l=r();return x(l.pageData.Filter.ProductCategoryID,t)||(l.pageData.Filter.ProductCategoryID=t),_(t)}),a()(),o(9,"div")(10,"h6"),m(11,"Brand"),a(),o(12,"ng-select",21),f("ngModelChange",function(t){C(e);let l=r();return x(l.pageData.Filter.ProductBrandID,t)||(l.pageData.Filter.ProductBrandID=t),_(t)}),A(13,Se,2,3,"ng-template",22),a()(),o(14,"div")(15,"h6"),m(16,"Product Tags"),a(),o(17,"ng-select",23),f("ngModelChange",function(t){C(e);let l=r();return x(l.pageData.Filter.ProductTagID,t)||(l.pageData.Filter.ProductTagID=t),_(t)}),a()(),o(18,"div")(19,"h6"),m(20,"Quantity From - To"),a(),o(21,"div",24)(22,"input",25),f("ngModelChange",function(t){C(e);let l=r();return x(l.pageData.Filter.QtyFrom,t)||(l.pageData.Filter.QtyFrom=t),_(t)}),a(),m(23," - "),o(24,"input",26),f("ngModelChange",function(t){C(e);let l=r();return x(l.pageData.Filter.QtyTo,t)||(l.pageData.Filter.QtyTo=t),_(t)}),a()()()()}if(n&2){let e=r();i(4),g("accessType",2),v("ngModel",e.pageData.Filter.OutletID),i(4),v("selectedCategoryID",e.pageData.Filter.ProductCategoryID),g("showClear",!0),i(4),g("items",e.pageData.Options==null?null:e.pageData.Options.Brands),v("ngModel",e.pageData.Filter.ProductBrandID),i(5),g("items",e.pageData.Options==null?null:e.pageData.Options.Tags),v("ngModel",e.pageData.Filter.ProductTagID),i(5),v("ngModel",e.pageData.Filter.QtyFrom),i(2),v("ngModel",e.pageData.Filter.QtyTo)}}function Te(n,p){if(n&1&&(o(0,"th",10),m(1),a()),n&2){let e=r();i(),y(" ",e.column.VariantName.name," ")}}function Ve(n,p){if(n&1&&(o(0,"th",11),m(1),a()),n&2){let e=r();i(),y(" ",e.column.VariantCode.name," ")}}function be(n,p){if(n&1&&(o(0,"th",12),m(1),a()),n&2){let e=r();i(),y(" ",e.column.OnHand.name," ")}}function Pe(n,p){if(n&1&&(o(0,"th",13),m(1),a()),n&2){let e=r();i(),y(" ",e.column.DirectAllocated.name," ")}}function Fe(n,p){if(n&1&&(o(0,"th",14),m(1),a()),n&2){let e=r();i(),y(" ",e.column.IndirectAllocated.name," ")}}function Me(n,p){if(n&1&&(o(0,"th",15),m(1),a()),n&2){let e=r();i(),y(" ",e.column.Available.name," ")}}function Ae(n,p){if(n&1&&(o(0,"td")(1,"a",28),m(2),a()()),n&2){let e=r().$implicit;i(),g("routerLink","/menu/Products/Catalog/Variants/Info")("queryParams",Q(3,he,e.VariantID)),i(),y(" ",e.VariantName," ")}}function Ee(n,p){if(n&1&&(o(0,"td"),m(1),a()),n&2){let e=r().$implicit;i(),D(e.VariantCode)}}function Oe(n,p){if(n&1&&(o(0,"td"),m(1),S(2,"number"),a()),n&2){let e=r().$implicit;i(),D(w(2,1,e.OnHand))}}function Le(n,p){if(n&1&&(o(0,"td"),m(1),S(2,"number"),a()),n&2){let e=r(2).$implicit;i(),y(" ",w(2,1,e.DirectAllocated)," ")}}function We(n,p){if(n&1&&d(0,Le,3,3,"td"),n&2){let e=r(2);s(e.column.DirectAllocated&&e.column.DirectAllocated.selected?0:-1)}}function Be(n,p){if(n&1&&(o(0,"td"),m(1),S(2,"number"),a()),n&2){let e=r(2).$implicit;i(),y(" ",w(2,1,e.DirectAllocated)," ")}}function Ne(n,p){if(n&1&&d(0,Be,3,3,"td"),n&2){let e=r(2);s(e.column.DirectAllocated&&e.column.DirectAllocated.selected?0:-1)}}function He(n,p){if(n&1&&(o(0,"td"),m(1),S(2,"number"),a()),n&2){let e=r().$implicit;i(),D(w(2,1,e.IndirectAllocated))}}function je(n,p){if(n&1&&(o(0,"td"),m(1),S(2,"number"),a()),n&2){let e=r().$implicit;i(),D(w(2,1,e.Available))}}function ke(n,p){if(n&1&&(o(0,"tr"),d(1,Ae,3,5,"td"),d(2,Ee,2,1,"td"),d(3,Oe,3,3,"td"),d(4,We,1,1)(5,Ne,1,1),d(6,He,3,3,"td"),d(7,je,3,3,"td"),a()),n&2){let e=r();i(),s(e.column.VariantName&&e.column.VariantName.selected?1:-1),i(),s(e.column.VariantCode&&e.column.VariantCode.selected?2:-1),i(),s(e.column.OnHand&&e.column.OnHand.selected?3:-1),i(),s(e.totalIndirect()>0?4:5),i(2),s(e.column.IndirectAllocated&&e.column.IndirectAllocated.selected&&e.totalIndirect()>0?6:-1),i(),s(e.column.Available&&e.column.Available.selected?7:-1)}}function Qe(n,p){if(n&1){let e=T();o(0,"div")(1,"POS-complex-pagination",29),V("jumpToPage",function(){C(e);let t=r();return _(t.getListData())})("previousPage",function(){C(e);let t=r();return _(t.getListData())})("nextPage",function(){C(e);let t=r();return _(t.getListData())}),a()()}if(n&2){let e=r();i(),g("total",e.data.Data.length)("pageData",e.pageData)}}var Ie=class n extends le{constructor(e,c,t,l,I){super(e,c,"inventory/GetListInventoryComposite","inventoryloader/GetListInventoryComposite",t,void 0,!1);this.httpService=c;this.csvConverter=l;this.roleService=I;R(()=>{let u=this.totalIndirect();u!==null&&u<=0&&(console.log("Indirect allocation is zero or negative"),this.column=P(b({},this.column),{DirectAllocated:P(b({},this.column.DirectAllocated),{name:"Allocated"}),IndirectAllocated:P(b({},this.column.IndirectAllocated),{show:!1})}))})}column={VariantName:{selected:!0,name:"Name",show:!0},VariantCode:{selected:!0,name:"Code",show:!0},OnHand:{selected:!0,name:"On Hand",show:!0},DirectAllocated:{selected:!0,name:"Direct Allocated",show:!0},IndirectAllocated:{selected:!0,name:"Indirect Allocated",show:!0},Available:{selected:!0,name:"Available",show:!0}};totalIndirect=O(null);dialog=E(ce);afterPostInit(e){console.log("Composite Inventory Data",e);let c=e.Data.reduce((t,l)=>t+l.IndirectAllocated,0);console.log("Total Indirect Allocated:",c),this.totalIndirect.set(c)}sortData(e){let c=[...this.data.Data];if(!e.active||e.direction===""){this.infiniteList=c;return}this.infiniteList=c.sort((t,l)=>{let I=e.direction==="asc";return this.compare(t[e.active],l[e.active],I)})}openExportModal(){this.dialog.open(se,{data:{title:"Composite Inventory",exportTypes:[{ID:"inventoryExport/GetExportInventoryComposite",Value:"Default",FileName:"Composite Inventory"}],filterExport:this.pageData.Filter,getAllDataLengthAPI:"inventory/GetCountInventoryComposite",pagination:!0}})}static \u0275fac=function(c){return new(c||n)(h(Ce),h(ee),h(J),h(_e),h(te))};static \u0275cmp=L({type:n,selectors:[["pos-composite-inventory"]],features:[W],decls:22,vars:13,consts:[["pageFilterTemplate",""],["tooltipTitle","Identify and manage unsold inventory that has been stagnant for a long time",3,"textChange","onSubmit","filterChange","pageData","text","isFilterOnDropdown","filter","column"],["ngProjectAs","actions",5,["actions"]],[1,"btn","btn-outline-secondary","me-3"],["ngProjectAs","filters",5,["filters"]],["ngProjectAs","content",5,["content"]],[1,"container-fluid","mt-3"],[1,"table-responsive"],["id","tableGrid","matSort","",1,"table","border-bottom",3,"matSortChange"],[1,"thead-light","sticky-top-thead"],["mat-sort-header","VariantName",2,"width","20%"],["mat-sort-header","VariantCode",2,"width","20%"],["mat-sort-header","OnHand",2,"width","10%"],["mat-sort-header","DirectAllocated",2,"width","10%"],["mat-sort-header","IndirectAllocated",2,"width","10%"],["mat-sort-header","Available",2,"width","10%"],[1,"btn","btn-outline-secondary","me-3",3,"click"],["aria-hidden","true",1,"fa-solid","fa-upload"],[1,"d-flex","flex-column","gap-4"],["placeholder","Choose Outlets (Leave Blank to Choose All)",1,"ng-select-multiple",3,"ngModelChange","accessType","ngModel"],[1,"tree-select-as-filter",3,"selectedCategoryIDChange","selectedCategoryID","showClear"],["bindLabel","Value","bindValue","Key","placeholder","Choose Brand",3,"ngModelChange","items","ngModel"],["ng-option-tmp",""],["appendTo","body","bindLabel","Name","bindValue","ID","placeholder","Choose Tag",3,"ngModelChange","items","ngModel"],[1,"d-flex","align-items-center",2,"column-gap","8px"],["type","number","name","QuantityFrom",1,"form-control","input-filter",3,"ngModelChange","ngModel"],["type","number","name","QuantityTo",1,"form-control","input-filter",3,"ngModelChange","ngModel"],["matTooltipPosition","above",3,"matTooltip"],[3,"routerLink","queryParams"],["api","inventory/GetCountInventoryComposite",3,"jumpToPage","previousPage","nextPage","total","pageData"]],template:function(c,t){if(c&1){let l=T();o(0,"mainpanel-cmp",1),f("textChange",function(u){return C(l),x(t.pageData.Filter.SearchText,u)||(t.pageData.Filter.SearchText=u),_(u)}),V("onSubmit",function(){return C(l),_(t.searchFromPageOne())}),f("filterChange",function(u){return C(l),x(t.pageData.Filter,u)||(t.pageData.Filter=u),_(u)}),F(1,2),d(2,De,3,0,"button",3),M(),F(3,4),A(4,we,25,10,"ng-template",null,0,G),M(),F(6,5),o(7,"div",6)(8,"div",7)(9,"table",8),V("matSortChange",function(u){return C(l),_(t.sortData(u))}),o(10,"thead",9)(11,"tr"),d(12,Te,2,1,"th",10),d(13,Ve,2,1,"th",11),d(14,be,2,1,"th",12),d(15,Pe,2,1,"th",13),d(16,Fe,2,1,"th",14),d(17,Me,2,1,"th",15),a()(),o(18,"tbody"),N(19,ke,8,6,"tr",null,B),a()()(),d(21,Qe,2,2,"div"),a(),M(),a()}c&2&&(g("pageData",t.menuData),v("text",t.pageData.Filter.SearchText),g("isFilterOnDropdown",!1),v("filter",t.pageData.Filter),g("column",t.column),i(2),s(t.roleService.global.Export?2:-1),i(10),s(t.column.VariantName&&t.column.VariantName.selected?12:-1),i(),s(t.column.VariantCode&&t.column.VariantCode.selected?13:-1),i(),s(t.column.OnHand&&t.column.OnHand.selected?14:-1),i(),s(t.column.DirectAllocated&&t.column.DirectAllocated.selected?15:-1),i(),s(t.column.IndirectAllocated&&t.column.IndirectAllocated.selected&&t.totalIndirect()>0?16:-1),i(),s(t.column.Available&&t.column.Available.selected?17:-1),i(2),H(t.infiniteList),i(2),s(t.data?21:-1))},dependencies:[ge,ue,ve,ye,$,U,Z,X,Y,de,pe,me,ie,ne,fe,xe,z,K,re,oe,ae,q],styles:["[_nghost-%COMP%]{display:block}"]})};export{Ie as a};
1
+ import{a as le}from"./chunk-CJII6RPH.js";import{a as oe,b as ae,c as re}from"./chunk-AEXXXOEQ.js";import{a as xe,b as fe}from"./chunk-I3ABVEQL.js";import{f as ye}from"./chunk-YOIV5LCG.js";import{c as ve}from"./chunk-QHNGMJWX.js";import{b as se}from"./chunk-T2H2XAEJ.js";import{a as _e}from"./chunk-4QM23MMO.js";import{e as ue,f as ge}from"./chunk-4KMRZ2TB.js";import{b as Ce}from"./chunk-WCCWWFYE.js";import{b as ne,c as ie}from"./chunk-C4WJKF7R.js";import{a as me,d as pe,e as de}from"./chunk-7TBS7SPQ.js";import{g as ce}from"./chunk-A45GTZVV.js";import{F as $,c as U,h as X,o as Y,q as Z}from"./chunk-RNLSEEMX.js";import{d as te}from"./chunk-USJ6ILEE.js";import{Ab as N,Bb as H,Bc as S,Ca as O,Cb as g,Cc as w,Db as o,Eb as a,Fb as j,Hc as G,Jb as F,Kb as M,Lc as R,Mb as T,Ob as V,Qb as r,Xa as i,Zd as K,be as J,db as h,dc as m,ec as D,ee,fc as y,hb as L,ic as v,jc as x,kc as f,lb as W,nb as A,oc as k,od as q,pa as E,rd as z,ta as C,ua as _,uc as Q,vb as d,xb as s,zb as B}from"./chunk-JYZTRN6N.js";import{a as b,b as P}from"./chunk-SNAKHGZS.js";var he=n=>({ID:n});function De(n,p){if(n&1){let e=T();o(0,"button",16),V("click",function(){C(e);let t=r();return _(t.openExportModal())}),j(1,"i",17),m(2," Export "),a()}}function Se(n,p){if(n&1&&(o(0,"span",27),m(1),a()),n&2){let e=p.item;g("matTooltip",k(e.Value)),i(),D(e.Value)}}function we(n,p){if(n&1){let e=T();o(0,"div",18)(1,"div")(2,"h6"),m(3,"Outlet"),a(),o(4,"outlet-selector",19),f("ngModelChange",function(t){C(e);let l=r();return x(l.pageData.Filter.OutletID,t)||(l.pageData.Filter.OutletID=t),_(t)}),a()(),o(5,"div")(6,"h6"),m(7,"Category"),a(),o(8,"POS-product-category-select",20),f("selectedCategoryIDChange",function(t){C(e);let l=r();return x(l.pageData.Filter.ProductCategoryID,t)||(l.pageData.Filter.ProductCategoryID=t),_(t)}),a()(),o(9,"div")(10,"h6"),m(11,"Brand"),a(),o(12,"ng-select",21),f("ngModelChange",function(t){C(e);let l=r();return x(l.pageData.Filter.ProductBrandID,t)||(l.pageData.Filter.ProductBrandID=t),_(t)}),A(13,Se,2,3,"ng-template",22),a()(),o(14,"div")(15,"h6"),m(16,"Product Tags"),a(),o(17,"ng-select",23),f("ngModelChange",function(t){C(e);let l=r();return x(l.pageData.Filter.ProductTagID,t)||(l.pageData.Filter.ProductTagID=t),_(t)}),a()(),o(18,"div")(19,"h6"),m(20,"Quantity From - To"),a(),o(21,"div",24)(22,"input",25),f("ngModelChange",function(t){C(e);let l=r();return x(l.pageData.Filter.QtyFrom,t)||(l.pageData.Filter.QtyFrom=t),_(t)}),a(),m(23," - "),o(24,"input",26),f("ngModelChange",function(t){C(e);let l=r();return x(l.pageData.Filter.QtyTo,t)||(l.pageData.Filter.QtyTo=t),_(t)}),a()()()()}if(n&2){let e=r();i(4),g("accessType",2),v("ngModel",e.pageData.Filter.OutletID),i(4),v("selectedCategoryID",e.pageData.Filter.ProductCategoryID),g("showClear",!0),i(4),g("items",e.pageData.Options==null?null:e.pageData.Options.Brands),v("ngModel",e.pageData.Filter.ProductBrandID),i(5),g("items",e.pageData.Options==null?null:e.pageData.Options.Tags),v("ngModel",e.pageData.Filter.ProductTagID),i(5),v("ngModel",e.pageData.Filter.QtyFrom),i(2),v("ngModel",e.pageData.Filter.QtyTo)}}function Te(n,p){if(n&1&&(o(0,"th",10),m(1),a()),n&2){let e=r();i(),y(" ",e.column.VariantName.name," ")}}function Ve(n,p){if(n&1&&(o(0,"th",11),m(1),a()),n&2){let e=r();i(),y(" ",e.column.VariantCode.name," ")}}function be(n,p){if(n&1&&(o(0,"th",12),m(1),a()),n&2){let e=r();i(),y(" ",e.column.OnHand.name," ")}}function Pe(n,p){if(n&1&&(o(0,"th",13),m(1),a()),n&2){let e=r();i(),y(" ",e.column.DirectAllocated.name," ")}}function Fe(n,p){if(n&1&&(o(0,"th",14),m(1),a()),n&2){let e=r();i(),y(" ",e.column.IndirectAllocated.name," ")}}function Me(n,p){if(n&1&&(o(0,"th",15),m(1),a()),n&2){let e=r();i(),y(" ",e.column.Available.name," ")}}function Ae(n,p){if(n&1&&(o(0,"td")(1,"a",28),m(2),a()()),n&2){let e=r().$implicit;i(),g("routerLink","/menu/Products/Catalog/Variants/Info")("queryParams",Q(3,he,e.VariantID)),i(),y(" ",e.VariantName," ")}}function Ee(n,p){if(n&1&&(o(0,"td"),m(1),a()),n&2){let e=r().$implicit;i(),D(e.VariantCode)}}function Oe(n,p){if(n&1&&(o(0,"td"),m(1),S(2,"number"),a()),n&2){let e=r().$implicit;i(),D(w(2,1,e.OnHand))}}function Le(n,p){if(n&1&&(o(0,"td"),m(1),S(2,"number"),a()),n&2){let e=r(2).$implicit;i(),y(" ",w(2,1,e.DirectAllocated)," ")}}function We(n,p){if(n&1&&d(0,Le,3,3,"td"),n&2){let e=r(2);s(e.column.DirectAllocated&&e.column.DirectAllocated.selected?0:-1)}}function Be(n,p){if(n&1&&(o(0,"td"),m(1),S(2,"number"),a()),n&2){let e=r(2).$implicit;i(),y(" ",w(2,1,e.DirectAllocated)," ")}}function Ne(n,p){if(n&1&&d(0,Be,3,3,"td"),n&2){let e=r(2);s(e.column.DirectAllocated&&e.column.DirectAllocated.selected?0:-1)}}function He(n,p){if(n&1&&(o(0,"td"),m(1),S(2,"number"),a()),n&2){let e=r().$implicit;i(),D(w(2,1,e.IndirectAllocated))}}function je(n,p){if(n&1&&(o(0,"td"),m(1),S(2,"number"),a()),n&2){let e=r().$implicit;i(),D(w(2,1,e.Available))}}function ke(n,p){if(n&1&&(o(0,"tr"),d(1,Ae,3,5,"td"),d(2,Ee,2,1,"td"),d(3,Oe,3,3,"td"),d(4,We,1,1)(5,Ne,1,1),d(6,He,3,3,"td"),d(7,je,3,3,"td"),a()),n&2){let e=r();i(),s(e.column.VariantName&&e.column.VariantName.selected?1:-1),i(),s(e.column.VariantCode&&e.column.VariantCode.selected?2:-1),i(),s(e.column.OnHand&&e.column.OnHand.selected?3:-1),i(),s(e.totalIndirect()>0?4:5),i(2),s(e.column.IndirectAllocated&&e.column.IndirectAllocated.selected&&e.totalIndirect()>0?6:-1),i(),s(e.column.Available&&e.column.Available.selected?7:-1)}}function Qe(n,p){if(n&1){let e=T();o(0,"div")(1,"POS-complex-pagination",29),V("jumpToPage",function(){C(e);let t=r();return _(t.getListData())})("previousPage",function(){C(e);let t=r();return _(t.getListData())})("nextPage",function(){C(e);let t=r();return _(t.getListData())}),a()()}if(n&2){let e=r();i(),g("total",e.data.Data.length)("pageData",e.pageData)}}var Ie=class n extends le{constructor(e,c,t,l,I){super(e,c,"inventory/GetListInventoryComposite","inventoryloader/GetListInventoryComposite",t,void 0,!1);this.httpService=c;this.csvConverter=l;this.roleService=I;R(()=>{let u=this.totalIndirect();u!==null&&u<=0&&(console.log("Indirect allocation is zero or negative"),this.column=P(b({},this.column),{DirectAllocated:P(b({},this.column.DirectAllocated),{name:"Allocated"}),IndirectAllocated:P(b({},this.column.IndirectAllocated),{show:!1})}))})}column={VariantName:{selected:!0,name:"Name",show:!0},VariantCode:{selected:!0,name:"Code",show:!0},OnHand:{selected:!0,name:"On Hand",show:!0},DirectAllocated:{selected:!0,name:"Direct Allocated",show:!0},IndirectAllocated:{selected:!0,name:"Indirect Allocated",show:!0},Available:{selected:!0,name:"Available",show:!0}};totalIndirect=O(null);dialog=E(ce);afterPostInit(e){console.log("Composite Inventory Data",e);let c=e.Data.reduce((t,l)=>t+l.IndirectAllocated,0);console.log("Total Indirect Allocated:",c),this.totalIndirect.set(c)}sortData(e){let c=[...this.data.Data];if(!e.active||e.direction===""){this.infiniteList=c;return}this.infiniteList=c.sort((t,l)=>{let I=e.direction==="asc";return this.compare(t[e.active],l[e.active],I)})}openExportModal(){this.dialog.open(se,{data:{title:"Composite Inventory",exportTypes:[{ID:"inventoryExport/GetExportInventoryComposite",Value:"Default",FileName:"Composite Inventory"}],filterExport:this.pageData.Filter,getAllDataLengthAPI:"inventory/GetCountInventoryComposite",pagination:!0}})}static \u0275fac=function(c){return new(c||n)(h(Ce),h(ee),h(J),h(_e),h(te))};static \u0275cmp=L({type:n,selectors:[["pos-composite-inventory"]],features:[W],decls:22,vars:13,consts:[["pageFilterTemplate",""],["tooltipTitle","Identify and manage unsold inventory that has been stagnant for a long time",3,"textChange","onSubmit","filterChange","pageData","text","isFilterOnDropdown","filter","column"],["ngProjectAs","actions",5,["actions"]],[1,"btn","btn-outline-secondary","me-3"],["ngProjectAs","filters",5,["filters"]],["ngProjectAs","content",5,["content"]],[1,"container-fluid","mt-3"],[1,"table-responsive"],["id","tableGrid","matSort","",1,"table","border-bottom",3,"matSortChange"],[1,"thead-light","sticky-top-thead"],["mat-sort-header","VariantName",2,"width","20%"],["mat-sort-header","VariantCode",2,"width","20%"],["mat-sort-header","OnHand",2,"width","10%"],["mat-sort-header","DirectAllocated",2,"width","10%"],["mat-sort-header","IndirectAllocated",2,"width","10%"],["mat-sort-header","Available",2,"width","10%"],[1,"btn","btn-outline-secondary","me-3",3,"click"],["aria-hidden","true",1,"fa-solid","fa-upload"],[1,"d-flex","flex-column","gap-4"],["placeholder","Choose Outlets (Leave Blank to Choose All)",1,"ng-select-multiple",3,"ngModelChange","accessType","ngModel"],[1,"tree-select-as-filter",3,"selectedCategoryIDChange","selectedCategoryID","showClear"],["bindLabel","Value","bindValue","Key","placeholder","Choose Brand",3,"ngModelChange","items","ngModel"],["ng-option-tmp",""],["appendTo","body","bindLabel","Name","bindValue","ID","placeholder","Choose Tag",3,"ngModelChange","items","ngModel"],[1,"d-flex","align-items-center",2,"column-gap","8px"],["type","number","name","QuantityFrom",1,"form-control","input-filter",3,"ngModelChange","ngModel"],["type","number","name","QuantityTo",1,"form-control","input-filter",3,"ngModelChange","ngModel"],["matTooltipPosition","above",3,"matTooltip"],[3,"routerLink","queryParams"],["api","inventory/GetCountInventoryComposite",3,"jumpToPage","previousPage","nextPage","total","pageData"]],template:function(c,t){if(c&1){let l=T();o(0,"mainpanel-cmp",1),f("textChange",function(u){return C(l),x(t.pageData.Filter.SearchText,u)||(t.pageData.Filter.SearchText=u),_(u)}),V("onSubmit",function(){return C(l),_(t.searchFromPageOne())}),f("filterChange",function(u){return C(l),x(t.pageData.Filter,u)||(t.pageData.Filter=u),_(u)}),F(1,2),d(2,De,3,0,"button",3),M(),F(3,4),A(4,we,25,10,"ng-template",null,0,G),M(),F(6,5),o(7,"div",6)(8,"div",7)(9,"table",8),V("matSortChange",function(u){return C(l),_(t.sortData(u))}),o(10,"thead",9)(11,"tr"),d(12,Te,2,1,"th",10),d(13,Ve,2,1,"th",11),d(14,be,2,1,"th",12),d(15,Pe,2,1,"th",13),d(16,Fe,2,1,"th",14),d(17,Me,2,1,"th",15),a()(),o(18,"tbody"),N(19,ke,8,6,"tr",null,B),a()()(),d(21,Qe,2,2,"div"),a(),M(),a()}c&2&&(g("pageData",t.menuData),v("text",t.pageData.Filter.SearchText),g("isFilterOnDropdown",!1),v("filter",t.pageData.Filter),g("column",t.column),i(2),s(t.roleService.global.Export?2:-1),i(10),s(t.column.VariantName&&t.column.VariantName.selected?12:-1),i(),s(t.column.VariantCode&&t.column.VariantCode.selected?13:-1),i(),s(t.column.OnHand&&t.column.OnHand.selected?14:-1),i(),s(t.column.DirectAllocated&&t.column.DirectAllocated.selected?15:-1),i(),s(t.column.IndirectAllocated&&t.column.IndirectAllocated.selected&&t.totalIndirect()>0?16:-1),i(),s(t.column.Available&&t.column.Available.selected?17:-1),i(2),H(t.infiniteList),i(2),s(t.data?21:-1))},dependencies:[ge,ue,ve,ye,$,U,Z,X,Y,de,pe,me,ie,ne,fe,xe,z,K,re,oe,ae,q],styles:["[_nghost-%COMP%]{display:block}"]})};export{Ie as a};