dealpos 25.47.3 → 25.48.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/browser/{chunk-N3ZJVSAM.js → chunk-22Q4GFCS.js} +1 -1
- package/browser/{chunk-X2WSY63G.js → chunk-2YJP5PQJ.js} +1 -1
- package/browser/{chunk-7RE3KKEE.js → chunk-327LILIU.js} +1 -1
- package/browser/chunk-33ZBZA3U.js +16 -0
- package/browser/{chunk-V6QPLTFX.js → chunk-37E4SNZ3.js} +1 -1
- package/browser/chunk-3ALHEPKV.js +1 -0
- package/browser/chunk-3DZLNGPO.js +1 -0
- package/browser/{chunk-WCDIU65Q.js → chunk-3N7EBSCG.js} +1 -1
- package/browser/{chunk-DZMFNFA5.js → chunk-3VKLSTEH.js} +1 -1
- package/browser/{chunk-PLYOYQUA.js → chunk-4F6J35GL.js} +1 -1
- package/browser/{chunk-ND4GYH53.js → chunk-4KLLS7S5.js} +1 -1
- package/browser/{chunk-CIHO7JZT.js → chunk-4OD3JW2M.js} +1 -1
- package/browser/{chunk-HEIMKAYZ.js → chunk-4RYYICV5.js} +2 -2
- package/browser/{chunk-QQAOOI67.js → chunk-5U73W2IZ.js} +1 -1
- package/browser/{chunk-CIF3EY5J.js → chunk-62V34GYI.js} +1 -1
- package/browser/{chunk-FXSXT2A7.js → chunk-6F4WKG7M.js} +1 -1
- package/browser/{chunk-2MBZ34LH.js → chunk-6QBYWFJ4.js} +1 -1
- package/browser/{chunk-AMFIKHL3.js → chunk-7DCWSNUN.js} +1 -1
- package/browser/{chunk-AB3KGYGP.js → chunk-7T6YO3VY.js} +1 -1
- package/browser/{chunk-HJNBLP4I.js → chunk-A4TTSCQT.js} +1 -1
- package/browser/{chunk-WXTL4DH6.js → chunk-A5WQMHVO.js} +1 -1
- package/browser/{chunk-GKTDQXAB.js → chunk-BWEEC6HM.js} +1 -1
- package/browser/{chunk-V754UGKX.js → chunk-BXOQMC5N.js} +1 -1
- package/browser/{chunk-P3SYBLK4.js → chunk-CA6YBQT3.js} +1 -1
- package/browser/{chunk-X47YSKD4.js → chunk-CDFNRJAQ.js} +1 -1
- package/browser/{chunk-FTAKGAQE.js → chunk-CSURZQS6.js} +1 -1
- package/browser/{chunk-W3EKQP4N.js → chunk-CUU2G2CM.js} +1 -1
- package/browser/chunk-CZYGX5TM.js +149 -0
- package/browser/{chunk-2FO3GJYX.js → chunk-D2JKYGM3.js} +1 -1
- package/browser/chunk-DEOVGQZC.js +4 -0
- package/browser/{chunk-DJGTSUJ5.js → chunk-DZ6FWYAF.js} +1 -1
- package/browser/{chunk-2Q3YPOOW.js → chunk-E7ISSVA3.js} +1 -1
- package/browser/{chunk-NX2JM4EW.js → chunk-EHJXCRPX.js} +1 -1
- package/browser/{chunk-G5JII5EF.js → chunk-ETLWM6MW.js} +1 -1
- package/browser/{chunk-OLAL7IPH.js → chunk-EX6JLLRB.js} +1 -1
- package/browser/{chunk-DHVW7O7D.js → chunk-FY3CQQFL.js} +1 -1
- package/browser/{chunk-YQTGQEBY.js → chunk-FYMATMVS.js} +1 -1
- package/browser/{chunk-YJ4MBE2Z.js → chunk-GEMHTJVB.js} +1 -1
- package/browser/{chunk-HSGWISH5.js → chunk-GHBBRGW2.js} +1 -1
- package/browser/{chunk-LBRASTRY.js → chunk-GTJDUG56.js} +1 -1
- package/browser/{chunk-5OFU7KRL.js → chunk-GZ7UUU3F.js} +1 -1
- package/browser/chunk-HIQKF5X3.js +1 -0
- package/browser/{chunk-JUROJCWA.js → chunk-HNK3XQEI.js} +1 -1
- package/browser/chunk-HS44M5L3.js +1 -0
- package/browser/{chunk-3VIKIIPD.js → chunk-HUYWGTVQ.js} +1 -1
- package/browser/{chunk-BOWPKVZI.js → chunk-HVFAKTAO.js} +1 -1
- package/browser/{chunk-C4RHBQ2O.js → chunk-IMM4P55U.js} +1 -1
- package/browser/{chunk-DLUPRWNR.js → chunk-IMSDBLRH.js} +1 -1
- package/browser/chunk-IPKXGQTW.js +1 -0
- package/browser/chunk-KQYNW4DG.js +14 -0
- package/browser/{chunk-6MDTIYP2.js → chunk-KR2YGW5S.js} +3 -3
- package/browser/{chunk-OG43BKR7.js → chunk-L5KVMIM3.js} +3 -3
- package/browser/{chunk-HI65LAJQ.js → chunk-LS5TMLIT.js} +1 -1
- package/browser/{chunk-GCVZ4VSK.js → chunk-LVC4ZU2C.js} +1 -1
- package/browser/{chunk-KV67U4IT.js → chunk-M3CGB5RK.js} +4 -4
- package/browser/{chunk-P5HJ7ZVD.js → chunk-M4HEF65P.js} +1 -1
- package/browser/{chunk-23EZJB4B.js → chunk-MP4RQSWT.js} +10 -10
- package/browser/{chunk-2AOQ56AO.js → chunk-N5SEZOII.js} +1 -1
- package/browser/{chunk-S7FXF6QE.js → chunk-N7SUEV3C.js} +1 -1
- package/browser/{chunk-Y2WP5IQU.js → chunk-NDSWUR7R.js} +1 -1
- package/browser/{chunk-IJVMZMEE.js → chunk-NETNL55X.js} +1 -1
- package/browser/{chunk-7VN7EV7J.js → chunk-NHWTJY64.js} +1 -1
- package/browser/{chunk-KKCO34EO.js → chunk-O5CTER4C.js} +13 -13
- package/browser/{chunk-JOGHB4PJ.js → chunk-OU7YY2CV.js} +1 -1
- package/browser/chunk-P32JEM3L.js +1 -0
- package/browser/{chunk-3ZL5OQ6Y.js → chunk-P3LNLMNH.js} +1 -1
- package/browser/{chunk-XYMU7BEE.js → chunk-P6LF5RPW.js} +1 -1
- package/browser/chunk-PD5SVXID.js +1 -0
- package/browser/chunk-QA67WF7E.js +1 -0
- package/browser/{chunk-GZUGI6EB.js → chunk-QFWPOP7L.js} +1 -1
- package/browser/{chunk-QVANOEOU.js → chunk-RDAIK2LU.js} +1 -1
- package/browser/{chunk-CZI4SXRC.js → chunk-REBD6XHD.js} +1 -1
- package/browser/{chunk-BX6CD7RF.js → chunk-S3K63CGI.js} +1 -1
- package/browser/{chunk-WP2QHWJZ.js → chunk-SVECNUUA.js} +1 -1
- package/browser/{chunk-7KLDH5GP.js → chunk-T2ECIFZW.js} +1 -1
- package/browser/{chunk-CRE24RAG.js → chunk-T2IWW7SS.js} +1 -1
- package/browser/{chunk-TJQAGMJM.js → chunk-THUJIHI7.js} +1 -1
- package/browser/chunk-UAIR26OK.js +3 -0
- package/browser/chunk-UGCO74DQ.js +1 -0
- package/browser/{chunk-E2NURULB.js → chunk-UHVNH2XA.js} +1 -1
- package/browser/{chunk-B5EN7VJN.js → chunk-UILJOKEL.js} +1 -1
- package/browser/{chunk-WLW63T7W.js → chunk-VAVKHKIO.js} +1 -1
- package/browser/{chunk-IRGQPZEN.js → chunk-W4ZCLNTU.js} +1 -1
- package/browser/{chunk-LV2CDSQ5.js → chunk-W7CJ25G5.js} +3 -3
- package/browser/{chunk-VTSK4WGD.js → chunk-X2JCAGKP.js} +1 -1
- package/browser/{chunk-JH4ULIJY.js → chunk-YLLLGS4S.js} +1 -1
- package/browser/{chunk-T7DUQW7O.js → chunk-YRDGEYIV.js} +1 -1
- package/browser/{chunk-KXJZTILI.js → chunk-YU4JSVLL.js} +1 -1
- package/browser/chunk-ZQGXWDT6.js +131 -0
- package/browser/index.html +2 -2
- package/browser/{main-2J3ZHOUZ.js → main-NN7FZ4DK.js} +2 -2
- package/package.json +1 -1
- package/browser/chunk-3D4KZ7MR.js +0 -4
- package/browser/chunk-4F66BWBS.js +0 -149
- package/browser/chunk-5TSMTZZ5.js +0 -1
- package/browser/chunk-5ZMTBZT3.js +0 -1
- package/browser/chunk-77YXHCJX.js +0 -1
- package/browser/chunk-ABMY2VO4.js +0 -131
- package/browser/chunk-AF7DJXVZ.js +0 -1
- package/browser/chunk-DLY4J6A5.js +0 -16
- package/browser/chunk-EJ6MUMDW.js +0 -1
- package/browser/chunk-F2EPGWYK.js +0 -1
- package/browser/chunk-RQ25OTJU.js +0 -1
- package/browser/chunk-UJGUJ222.js +0 -14
- package/browser/chunk-UZP2LOKU.js +0 -3
- package/browser/chunk-X6T3EQSS.js +0 -1
|
@@ -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 e}from"./chunk-
|
|
1
|
+
import{a as e}from"./chunk-GZ7UUU3F.js";import{a as t}from"./chunk-SNAKHGZS.js";var i=class extends e{constructor(r,a,o,l,s,p,F){super(r,a,o,l,s,p,F)}preInitLoader(){this.loaderPayload=t({ListIDs:this.reportFilterService.initOutletFilter([])},this.loaderPayload)}preInitList(){this.pageData.Filter.ListIDs=this.loaderPayload.ListIDs,this.pageData.Filter.From=this.reportFilterService.initDateFromFilter(this.pageData?.Filter?.From),this.pageData.Filter.To=this.reportFilterService.initDateToFilter(this.pageData?.Filter?.To)}onFilterOutlets(){this.reportFilterService.setOutletFilter(this.pageData.Filter.ListIDs)}onFilterFromDate(){this.reportFilterService.setDateFromFilter(this.pageData?.Filter?.From)}onFilterToDate(){this.reportFilterService.setDateToFilter(this.pageData?.Filter?.To)}};export{i as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as z}from"./chunk-HL3ONSX6.js";import{d as $,e as tt}from"./chunk-GN3HVOCN.js";import"./chunk-G4IW5GPY.js";import{a as k,b as G,c as A}from"./chunk-AEXXXOEQ.js";import{a as ot,b as nt}from"./chunk-I3ABVEQL.js";import{f as et}from"./chunk-
|
|
1
|
+
import{a as z}from"./chunk-HL3ONSX6.js";import{d as $,e as tt}from"./chunk-GN3HVOCN.js";import"./chunk-G4IW5GPY.js";import{a as k,b as G,c as A}from"./chunk-AEXXXOEQ.js";import{a as ot,b as nt}from"./chunk-I3ABVEQL.js";import{f as et}from"./chunk-4KLLS7S5.js";import{c as it}from"./chunk-EHJXCRPX.js";import{b as Q}from"./chunk-T2H2XAEJ.js";import{a as q}from"./chunk-LVC4ZU2C.js";import"./chunk-7DCWSNUN.js";import"./chunk-QFON23YX.js";import"./chunk-FIUZN6JU.js";import{e as Y,f as Z}from"./chunk-YLLLGS4S.js";import"./chunk-S3K63CGI.js";import"./chunk-JEL3OND6.js";import"./chunk-IDQUQBKL.js";import"./chunk-VX5HH3BW.js";import"./chunk-VYQEM4T2.js";import"./chunk-UTAQ3FRE.js";import"./chunk-M43HNBJQ.js";import"./chunk-KKLNFVVN.js";import"./chunk-X57HWGVJ.js";import"./chunk-5SFUSWFY.js";import"./chunk-534MIVWD.js";import"./chunk-TGEQUV6Z.js";import"./chunk-3VKLSTEH.js";import{b as K}from"./chunk-HIQKF5X3.js";import"./chunk-CS6HBROS.js";import"./chunk-JUS6LLVX.js";import"./chunk-BA3BDB5Y.js";import"./chunk-C4WJKF7R.js";import{N as X,g as U}from"./chunk-T25N3EEG.js";import"./chunk-7TBS7SPQ.js";import"./chunk-RLQLFW36.js";import"./chunk-EQLHPWVB.js";import{g as J}from"./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 R}from"./chunk-RNLSEEMX.js";import"./chunk-E7ISSVA3.js";import"./chunk-HVFAKTAO.js";import{d as H}from"./chunk-USJ6ILEE.js";import"./chunk-NETNL55X.js";import{Ab as T,Bb as V,Bc as y,Cb as s,Cc as L,Db as i,Dc as F,Eb as o,Fb as v,Hc as N,Mb as _,Ob as S,Qb as m,Xa as p,db as u,dc as l,ec as w,ee as j,fc as P,hb as b,ic as C,jc as x,kc as f,lb as I,nb as M,ta as c,ua as d,vb as D,xb as h,yb as O}from"./chunk-JYZTRN6N.js";import"./chunk-WFMAM73Y.js";import"./chunk-SNAKHGZS.js";function rt(r,g){if(r&1){let t=_();i(0,"button",5),S("click",function(){c(t);let e=m();return d(e.openExportModal())}),v(1,"i",6),l(2," Export "),o()}}function lt(r,g){if(r&1){let t=_();i(0,"h6"),l(1,"Outlet"),o(),i(2,"outlet-selector",7),f("ngModelChange",function(e){c(t);let a=m();return x(a.pageData.Filter.Outlet,e)||(a.pageData.Filter.Outlet=e),d(e)}),o(),i(3,"h6"),l(4,"Category"),o(),i(5,"POS-product-category-select",8),f("selectedCategoryIDChange",function(e){c(t);let a=m();return x(a.pageData.Filter.Category,e)||(a.pageData.Filter.Category=e),d(e)}),o(),i(6,"h6"),l(7,"Discontinued"),o(),i(8,"radio-options",9),f("modelChange",function(e){c(t);let a=m();return x(a.pageData.Filter.Discontinued,e)||(a.pageData.Filter.Discontinued=e),d(e)}),o()}if(r&2){let t=m();p(2),s("accessType",2),C("ngModel",t.pageData.Filter.Outlet),p(3),C("selectedCategoryID",t.pageData.Filter.Category),s("showClear",!0),p(3),s("options",t.pageData==null||t.pageData.Options==null?null:t.pageData.Options.Discontinued),C("model",t.pageData.Filter.Discontinued)}}function pt(r,g){if(r&1&&(i(0,"tr")(1,"td"),l(2),o(),i(3,"td"),l(4),o(),i(5,"td",19),l(6),y(7,"quantityFraction"),o()()),r&2){let t=g.$implicit;p(2),w(t.EntityName),p(2),w(t.Name),p(2),P(" ",L(7,3,t.Inventory)," ")}}function mt(r,g){if(r&1){let t=_();i(0,"div",4)(1,"div",10)(2,"table",11),S("matSortChange",function(e){c(t);let a=m();return d(a.onSortData(e))}),i(3,"thead",12)(4,"tr",13)(5,"th",14),l(6,"Outlet"),o(),i(7,"th",15),l(8,"Storage Location"),o(),i(9,"th",16),l(10," On Hand "),o()()(),i(11,"tbody"),T(12,pt,8,5,"tr",null,O),o(),i(14,"tfoot")(15,"tr",17),v(16,"td",18),i(17,"td",18),l(18,"Total :"),o(),i(19,"td",19),l(20),y(21,"sum"),y(22,"quantityFraction"),o()()()(),i(23,"POS-complex-pagination",20),S("jumpToPage",function(){c(t);let e=m();return d(e.getListData())})("previousPage",function(){c(t);let e=m();return d(e.getListData())})("nextPage",function(){c(t);let e=m();return d(e.getListData())}),o()()()}if(r&2){let t=m();p(12),V(t.data.Data),p(8),P(" ",L(22,6,F(21,3,t.data.Data,"Inventory"))," "),p(3),s("total",t.data.Data==null?null:t.data.Data.length)("pageData",t.pageData)}}var at=class r extends q{constructor(t,n,e,a){super(t,n,"Inventory/GetProductStorageLocation","InventoryLoader/InventoryReport");this.httpService=n;this.dialog=e;this.roleService=a}datasource;postInit(t){this.datasource=JSON.parse(JSON.stringify(t.Data))}openExportModal(){this.dialog.open(Q,{data:{title:"Storage Location",exportTypes:[{ID:"Inventory/GetProductStorageLocation",Value:"Default",FileName:"Storage Location"}],filterExport:this.pageData.Filter,getAllDataLengthAPI:"inventory/GetCountProductStorageLocation",pagination:!0}})}onSortData(t){let n=this.data.Data?.slice();if(!t.active||t.direction===""){this.data.Data=this.datasource;return}let e=t.direction==="asc";this.data.Data=n.sort((a,E)=>this.compare(a[t.active],E[t.active],e))}static \u0275fac=function(n){return new(n||r)(u(K),u(j),u(J),u(H))};static \u0275cmp=b({type:r,selectors:[["app-storage-location"]],features:[I],decls:9,vars:5,consts:[["pageFilterTemplate",""],[3,"onSubmit","pageData","hideSearchBox","isFilterOnDropdown"],[1,"d-flex"],[1,"btn","btn-outline-secondary","me-3"],[1,"container-fluid","mt-3"],[1,"btn","btn-outline-secondary","me-3",3,"click"],["aria-hidden","true",1,"fa-solid","fa-upload"],["placeholder","Choose an outlet","appendTo","body",3,"ngModelChange","accessType","ngModel"],[1,"tree-select-as-filter",3,"selectedCategoryIDChange","selectedCategoryID","showClear"],["name","Discontinued",3,"modelChange","options","model"],[1,"table-responsive"],["id","tableGrid","matSort","",1,"table",3,"matSortChange"],[1,"thead-light","sticky-top-thead"],[1,"header"],["mat-sort-header","EntityName",2,"width","450px"],["mat-sort-header","Brand"],["mat-sort-header","Inventory","arrowPosition","before",1,"text-end",2,"padding-right","100px","width","190px"],[1,"table-footer","fw-bold"],[1,"empty-column"],[1,"text-end",2,"padding-right","100px"],["api","inventory/GetCountProductStorageLocation",3,"jumpToPage","previousPage","nextPage","total","pageData"]],template:function(n,e){if(n&1){let a=_();i(0,"mainpanel-cmp",1),S("onSubmit",function(){return c(a),d(e.searchFromPageOne())}),i(1,"actions")(2,"div",2),D(3,rt,3,0,"button",3),o()(),i(4,"filters"),M(5,lt,9,6,"ng-template",null,0,N),o(),i(7,"content"),D(8,mt,24,8,"div",4),o()()}n&2&&(s("pageData",e.menuData)("hideSearchBox",!0)("isFilterOnDropdown",!1),p(3),h(e.roleService.global.Export?3:-1),p(5),h(e.data?8:-1))},dependencies:[Z,Y,X,tt,$,et,it,W,B,R,nt,ot,A,k,G,z,U],encapsulation:2})};export{at as StorageLocationComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as Q,b as U}from"./chunk-I5W4NCFM.js";import{d as te,e as ie}from"./chunk-QPOOLLKY.js";import{a as X}from"./chunk-
|
|
1
|
+
import{a as Q,b as U}from"./chunk-I5W4NCFM.js";import{d as te,e as ie}from"./chunk-QPOOLLKY.js";import{a as X}from"./chunk-LVC4ZU2C.js";import{e as $,f as ee}from"./chunk-YLLLGS4S.js";import{b as Z}from"./chunk-HIQKF5X3.js";import{d as Y}from"./chunk-7TBS7SPQ.js";import{F as A,c as H,h as z,o as q}from"./chunk-RNLSEEMX.js";import{d as K}from"./chunk-USJ6ILEE.js";import{$d as j,Ab as W,Bb as M,Bc as y,Cb as s,Db as i,Dc as v,Eb as o,Hc as P,Mb as h,Ob as D,Qb as m,Xa as l,Zd as R,be as O,cd as J,db as _,dc as p,ee as G,fc as S,hb as w,ic as u,jc as C,kc as b,lb as F,md as V,nb as k,od as B,rd as N,ta as c,tc as T,ua as g,uc as E,vb as f,vc as I,xb as x,zb as L}from"./chunk-JYZTRN6N.js";var ne=()=>["/menu/Developer/Webhook/Job_Logs/Detail"],ae=n=>({ID:n}),re=(n,d)=>({"text-success":n,"text-danger":d});function le(n,d){if(n&1){let e=h();i(0,"div",12)(1,"h6"),p(2,"Status"),o(),i(3,"ng-select",13),b("ngModelChange",function(t){c(e);let r=m(2);return C(r.pageData.Filter.Status,t)||(r.pageData.Filter.Status=t),g(t)}),o(),i(4,"h6"),p(5,"Job ID"),o(),i(6,"input",14),b("ngModelChange",function(t){c(e);let r=m(2);return C(r.pageData.Filter.JobID,t)||(r.pageData.Filter.JobID=t),g(t)}),o(),i(7,"h6"),p(8,"From"),o(),i(9,"datepicker",15),b("dateChange",function(t){c(e);let r=m(2);return C(r.pageData.Filter.From,t)||(r.pageData.Filter.From=t),g(t)}),o(),i(10,"h6"),p(11,"To"),o(),i(12,"datepicker",16),b("dateChange",function(t){c(e);let r=m(2);return C(r.pageData.Filter.To,t)||(r.pageData.Filter.To=t),g(t)}),o()()}if(n&2){let e=m(2);l(3),s("disabled",!e.role.developer.Edit)("items",e.pageData.Options.Status),u("ngModel",e.pageData.Filter.Status),l(3),u("ngModel",e.pageData.Filter.JobID),l(3),s("isFloatingLabel",!1),u("date",e.pageData.Filter.From),l(3),s("isFloatingLabel",!1),u("date",e.pageData.Filter.To)}}function pe(n,d){if(n&1&&(i(0,"tr",9)(1,"td")(2,"a",17),p(3),y(4,"date"),o()(),i(5,"td"),p(6),y(7,"number"),o(),i(8,"td",18),p(9),o()()),n&2){let e=d.$implicit;l(2),s("routerLink",T(12,ne))("queryParams",E(13,ae,e._id)),l(),S(" ",v(4,6,e._source["@timestamp_received"],"dd MMM yyyy HH:mm")," "),l(3),S("",v(7,9,e.DurationInSecond,"1.1-1")," s"),l(2),s("ngClass",I(15,re,e._source.log.respCode==200,e._source.log.respCode!=200)),l(),S(" ",e._source.log.respCode," ")}}function me(n,d){if(n&1){let e=h();i(0,"mat-paginator",19),D("page",function(t){c(e);let r=m(2);return g(r.onPaginationChange(t))}),o()}if(n&2){let e=m(2);s("length",e.pagination.listTotal)("pageSize",e.pagination.pageSize)("pageIndex",e.pageData.Filter.PageNumber==0?0:e.pageData.Filter.PageNumber-1)}}function se(n,d){if(n&1){let e=h();i(0,"mainpanel-cmp",2),D("onSubmit",function(){c(e);let t=m();return g(t.searchFromPageOne())}),i(1,"filters"),k(2,le,13,8,"ng-template",null,0,P),o(),i(4,"content")(5,"div",3)(6,"div",4)(7,"table",5)(8,"thead",6)(9,"tr",7)(10,"th",8),p(11,"Created"),o(),i(12,"th",8),p(13,"Duration"),o(),i(14,"th",8),p(15,"Status"),o()()(),i(16,"tbody"),W(17,pe,10,18,"tr",9,L),o()()(),i(19,"div",10),f(20,me,1,3,"mat-paginator",11),o()()()()}if(n&2){let e=m();s("pageData",e.menuData)("hideSearchBox",!0)("isFilterOnDropdown",!1),l(17),M(e.data.hits),l(3),x(e.pagination.listTotal>0?20:-1)}}var oe=class n extends X{constructor(e,a,t,r){super(e,a,"Developer/DeveloperSpace/Webhook/JobLogs","Developer/DeveloperSpace/WebhookLoader/GetLogs",t);this.httpService=a;this.role=r}postInit(e){this.data.hits=this.data?.hits.map(a=>(a.DurationInSecond=parseInt(a._source?.Duration)/1e3,a)),this.data.ListTotal=e?.total?.value}static \u0275fac=function(a){return new(a||n)(_(Z),_(G),_(O),_(K))};static \u0275cmp=w({type:n,selectors:[["app-webhook-job-logs"]],features:[F],decls:1,vars:1,consts:[["pageFilterTemplate",""],[3,"pageData","hideSearchBox","isFilterOnDropdown"],[3,"onSubmit","pageData","hideSearchBox","isFilterOnDropdown"],[1,"container-fluid","mt-5"],[1,"table-responsive"],["id","tableGrid",1,"table"],[1,"thead-light","sticky-top-thead"],[1,"header"],[2,"width","50px"],[1,"border-bottom"],[1,"mt-2"],[3,"length","pageSize","pageIndex"],[1,"dialog-filter"],["bindLabel","Value","bindValue","Key","placeholder","Choose a status","appendTo","body",3,"ngModelChange","disabled","items","ngModel"],["type","text",1,"form-control",3,"ngModelChange","ngModel"],["placeholder","From","appearance","outline",3,"dateChange","isFloatingLabel","date"],["placeholder","To","appearance","outline",3,"dateChange","isFloatingLabel","date"],[3,"routerLink","queryParams"],[3,"ngClass"],[3,"page","length","pageSize","pageIndex"]],template:function(a,t){a&1&&f(0,se,21,4,"mainpanel-cmp",1),a&2&&x(t.data?0:-1)},dependencies:[N,J,ee,$,ie,te,U,Q,Y,A,H,z,q,j,R,B,V],encapsulation:2})};export{oe as a};
|