@abtnode/webapp 1.17.8-beta-20260116-080047-9fdd00d3 → 1.17.8-beta-20260119-102944-6ba93a16
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/blocklet.js +1 -1
- package/blocklet.yml +1 -1
- package/dist/assets/{AdapterDayjs-CHVRCEwB.js → AdapterDayjs-QPUTgQRV.js} +6 -6
- package/dist/assets/{Add-IxR__ozX.js → Add-vvp5juzF.js} +1 -1
- package/dist/assets/ArrowDropDown-CZ9_k8VG.js +1 -0
- package/dist/assets/{Autocomplete-OhxbbTq9.js → Autocomplete-BqPV4fCq.js} +1 -1
- package/dist/assets/{Breadcrumbs-CfkRwQNu.js → Breadcrumbs-DEV3jkdC.js} +1 -1
- package/dist/assets/{ButtonGroup--8rwLvQ8.js → ButtonGroup-BDg4XqiR.js} +1 -1
- package/dist/assets/{CSSTransition-D4fabzL2.js → CSSTransition-CoGzojVI.js} +1 -1
- package/dist/assets/{CallMerge-Di3dNXj5.js → CallMerge-C5DyJ6fm.js} +1 -1
- package/dist/assets/{CardContent-CPUlyd-R.js → CardContent-rjL6kB_r.js} +1 -1
- package/dist/assets/{ChevronLeft-lzYf4tao.js → ChevronLeft-DqSG9UHo.js} +1 -1
- package/dist/assets/{ChevronRight-CO-Fv8kP.js → ChevronRight-DxsEcvUg.js} +1 -1
- package/dist/assets/{Clear-DriUx9_Q.js → Clear-Bq2o3otF.js} +1 -1
- package/dist/assets/{Delete-DkHujAB7.js → Delete-RCnwfW1g.js} +1 -1
- package/dist/assets/{DeleteOutline-DUcJA7eO.js → DeleteOutline-BXoQnWFj.js} +1 -1
- package/dist/assets/{Done-B_L7rkHk.js → Done-DVQ_2sA2.js} +1 -1
- package/dist/assets/{Edit-DgzPfnB_.js → Edit-DVXYin_T.js} +1 -1
- package/dist/assets/{EditOutlined-yXcT-6A0.js → EditOutlined-CHgCULNs.js} +1 -1
- package/dist/assets/{ErrorOutline-B7jRfGmR.js → ErrorOutline-qdJUw5q6.js} +1 -1
- package/dist/assets/{FilterList-DMbHmf0X.js → FilterList-Dfj9GsZN.js} +1 -1
- package/dist/assets/{Google-DMfPhzx4.js → Google-BtG0IwAt.js} +1 -1
- package/dist/assets/{HelpOutline-Be59cdK1.js → HelpOutline-DaGemEcX.js} +1 -1
- package/dist/assets/{Launch-B8FfXmf_.js → Launch-BsxqWG7C.js} +1 -1
- package/dist/assets/{Link-wdDqdiCm.js → Link-BRsXeoEC.js} +1 -1
- package/dist/assets/{ListItemButton-BHNRxd8I.js → ListItemButton-kpGgMj08.js} +1 -1
- package/dist/assets/{ListSubheader-UFJcQfY_.js → ListSubheader-BTZwmxdp.js} +1 -1
- package/dist/assets/{LoadingButton-CUdpFc0p.js → LoadingButton-DZ6V6Qhe.js} +1 -1
- package/dist/assets/{LottiePlayer.modern-Jxnonfmi.js → LottiePlayer.modern-H3Pn2YNu.js} +1 -1
- package/dist/assets/{MoreVert-BVgcfW7V.js → MoreVert-DxM-B8xa.js} +1 -1
- package/dist/assets/{OpenInNew-CEBJXmxa.js → OpenInNew-BUUx7OSU.js} +1 -1
- package/dist/assets/{Refresh-DrflkqFW.js → Refresh-BV0ShuHj.js} +1 -1
- package/dist/assets/{Replay-qvum4SpI.js → Replay-DyvF6A5F.js} +1 -1
- package/dist/assets/{Search-CtujvL0H.js → Search-m3CMNGDm.js} +1 -1
- package/dist/assets/{Stepper-CJfsKFpi.js → Stepper-DR0cCC-q.js} +1 -1
- package/dist/assets/{TableSearch-CdKaHbVQ.js → TableSearch-okRl0dqT.js} +1 -1
- package/dist/assets/{ToggleButtonGroup-BP4C4KFu.js → ToggleButtonGroup-DxIvj50j.js} +1 -1
- package/dist/assets/{UnfoldMore-BvZuyACH.js → UnfoldMore-CZT-4-ZR.js} +1 -1
- package/dist/assets/Verified-C1aYOY3u.js +1 -0
- package/dist/assets/{VerifiedUser-D0ltmMtV.js → VerifiedUser-CS3FW2sd.js} +1 -1
- package/dist/assets/{ViewList--urcCqVt.js → ViewList-CXrUBR0t.js} +1 -1
- package/dist/assets/{_createAggregator-G6HCftPW.js → _createAggregator-BunO9xPF.js} +1 -1
- package/dist/assets/{actions-5RspfWE_.js → actions-CoszoXjw.js} +1 -1
- package/dist/assets/{actions-DjLoksgL.js → actions-DE2r6nPV.js} +1 -1
- package/dist/assets/{actions-CQAb6_Rz.js → actions-MiEliG9R.js} +1 -1
- package/dist/assets/{agreement-b4V3Z14P.js → agreement-CiVQRYD2.js} +1 -1
- package/dist/assets/api-CKaiYijO.js +1 -0
- package/dist/assets/{appearance-AiyB_V1W.js → appearance-DtyCmGdO.js} +1 -1
- package/dist/assets/{ar-BHqjWgUQ.js → ar-DOhYGTlW.js} +1 -1
- package/dist/assets/{audit-logs-C4Hps2ag.js → audit-logs-DQ3aFS2x.js} +2 -2
- package/dist/assets/{babel-sNEik07f.js → babel-yl1c6pTl.js} +1 -1
- package/dist/assets/{base-chart-BE2BHY3Y.js → base-chart-G_tNYsY8.js} +1 -1
- package/dist/assets/{blocklet-lDvdqhrX.js → blocklet-CzBGFesP.js} +1 -1
- package/dist/assets/{chain-BQMbjNUU.js → chain-z8CuvP-V.js} +1 -1
- package/dist/assets/{click-to-copy-C6h97nXy.js → click-to-copy-DXIfZNln.js} +1 -1
- package/dist/assets/cloneDeep-BDiWjxRu.js +1 -0
- package/dist/assets/config-navigation-BYqsSWyl.js +472 -0
- package/dist/assets/{connect-B1msLBDb.js → connect-64-QZQcE.js} +3 -3
- package/dist/assets/{connect-to-DeMt1m5c.js → connect-to-CeGdVeiX.js} +3 -3
- package/dist/assets/{de-QUGQFv2K.js → de-CtKPdGk6.js} +1 -1
- package/dist/assets/{delete-confirm-DyLbGAy5.js → delete-confirm-Dh3X0iXU.js} +1 -1
- package/dist/assets/{depsEqual-CM0PEscV.js → depsEqual-Bfsv3kHf.js} +1 -1
- package/dist/assets/{detail-C3fs8uRl.js → detail-C4nQbO7d.js} +2 -2
- package/dist/assets/{domains-CVE_fz_I.js → domains-7n5twKTf.js} +2 -2
- package/dist/assets/{download-f9_CnIWg.js → download-CFyTq_FK.js} +1 -1
- package/dist/assets/{edit.svg-Bdq-FCGM.js → edit.svg-DBlxe-2U.js} +1 -1
- package/dist/assets/emotion-cache.browser.esm-Cu824RS4.js +1 -0
- package/dist/assets/engine-Bbh7Mw-7.js +1 -0
- package/dist/assets/{es-C4w6cL07.js → es-BSYtSZPg.js} +1 -1
- package/dist/assets/{fr-Bq3UipEu.js → fr-C35fi7h9.js} +1 -1
- package/dist/assets/{get-safe-url-RPQVYlWr.js → get-safe-url-BTJDduf6.js} +1 -1
- package/dist/assets/getValidReactChildren-T3CvLHYr.js +1 -0
- package/dist/assets/{graphql-5mE8kB37.js → graphql-Cnx2YXBE.js} +1 -1
- package/dist/assets/{graphqlMode-BHMSwqwV.js → graphqlMode-7KCJGlgj.js} +2 -2
- package/dist/assets/{hi-DGZy0DLh.js → hi-5fpYJkiW.js} +1 -1
- package/dist/assets/{html-title-DE0TrRVC.js → html-title-CQe12Cut.js} +1 -1
- package/dist/assets/{id-DOzDilAf.js → id-DoVb0JYr.js} +1 -1
- package/dist/assets/{iframe-B7aYePTd.js → iframe-BWle7w_S.js} +1 -1
- package/dist/assets/{index-r58wskKh.js → index-AaVex2Te.js} +1 -1
- package/dist/assets/{index-B4azxfc8.js → index-B8JpxHJE.js} +1 -1
- package/dist/assets/{index-hG-7kift.js → index-BCrgfevn.js} +2 -2
- package/dist/assets/index-BHLEff7q.js +369 -0
- package/dist/assets/{index-DbRhfp5G.js → index-BMGgZI9D.js} +1 -1
- package/dist/assets/{index-CaLjm3Sr.js → index-BXpvvqAs.js} +1 -1
- package/dist/assets/{index-D7yowN9E.js → index-BcZYQGNY.js} +8 -8
- package/dist/assets/{index-CEn1Olzp.js → index-Bg6faJyI.js} +1 -1
- package/dist/assets/{index-B2xyyyAv.js → index-Bv6Ryg7V.js} +1 -1
- package/dist/assets/index-BzFgWQ5w.js +1 -0
- package/dist/assets/{index-DaEqVg3j.js → index-C73PGWD5.js} +1 -1
- package/dist/assets/{index-B29Pha71.js → index-C97bSDg2.js} +3 -3
- package/dist/assets/index-CBCPHvf_.js +102 -0
- package/dist/assets/{index-B1mmOd5b.js → index-CJ_aJ5dR.js} +1 -1
- package/dist/assets/{index-DmCKwIHx.js → index-CQob6fmR.js} +4 -4
- package/dist/assets/{index-BqqU8gwj.js → index-CTjBZAn9.js} +1 -1
- package/dist/assets/{index-2l_1Jppv.js → index-CUGajpSS.js} +3 -3
- package/dist/assets/{index-CWB_ryH-.js → index-CXEKSKL7.js} +1 -1
- package/dist/assets/{index-BgYMQ-SO.js → index-ChmYDkPv.js} +2 -2
- package/dist/assets/{index-QndNtIi-.js → index-CoHxWTi-.js} +1 -1
- package/dist/assets/{index-9co-KaYp.js → index-D42m9V9f.js} +9 -9
- package/dist/assets/{index-EzJJEvjR.js → index-D4yrNQ5O.js} +3 -3
- package/dist/assets/{index-CPZ5M8hw.js → index-DBtWMsht.js} +1 -1
- package/dist/assets/{index-DaVz8byr.js → index-DHLFobHl.js} +3 -3
- package/dist/assets/{index-nVFW1KOC.js → index-DJt6Q1WW.js} +1 -1
- package/dist/assets/{index-BtOLGXbe.js → index-DSG25x4F.js} +1 -1
- package/dist/assets/{index-BfetuCUm.js → index-DTVaw2Hc.js} +4 -4
- package/dist/assets/{index-BfQLSa8k.js → index-DUEj1V-j.js} +1 -1
- package/dist/assets/{index-Cmj8zxd_.js → index-DVR29wYi.js} +14 -14
- package/dist/assets/index-Denq1UAZ.js +20 -0
- package/dist/assets/{index-BcjR7La5.js → index-DfCxzzye.js} +1 -1
- package/dist/assets/{index-Beek8Qoq.js → index-DftYcsPB.js} +6 -6
- package/dist/assets/{index-B0oOTjeC.js → index-DqCVCPmC.js} +1 -1
- package/dist/assets/{index-BIgX2N1A.js → index-DrI_kbUr.js} +6 -6
- package/dist/assets/{index-ByymZrPq.js → index-DtIwM7gL.js} +2 -2
- package/dist/assets/{index-BBu-RTSN.js → index-DyNVa2Lx.js} +1 -1
- package/dist/assets/{index-DYd4YT_K.js → index-G-jrPGsm.js} +1 -1
- package/dist/assets/{index-BX6YpiBs.js → index-Ii4Xi_du.js} +2 -2
- package/dist/assets/{index-BZ5rC2Lk.js → index-P2FBSyZf.js} +1 -1
- package/dist/assets/{index-Ca61GFb8.js → index-dCiAdDNg.js} +1 -1
- package/dist/assets/{index-Bm8Rp86x.js → index-kSplQjj2.js} +1 -1
- package/dist/assets/{index-82LLl9rh.js → index-nmsk2vjw.js} +2 -2
- package/dist/assets/{index-CVpBdzTr.js → index-nsujgMc_.js} +1 -1
- package/dist/assets/{index-D3SOJZGy.js → index-u76kHZTc.js} +3 -3
- package/dist/assets/{index-gwhKA5OT.js → index-xtzr7R_I.js} +1 -1
- package/dist/assets/{index.esm-C5mhDUsD.js → index.esm-iaB2Jgy_.js} +1 -1
- package/dist/assets/{install-from-url-DPdbO0Jq.js → install-from-url-CzhDO2C0.js} +1 -1
- package/dist/assets/{invitation-3RtS1iUK.js → invitation-C3HrxXln.js} +2 -2
- package/dist/assets/is-path-prefix-equal-dPdZJpAg.js +1 -0
- package/dist/assets/{isEmail-apFH2MvD.js → isEmail-CmCW4Fgq.js} +1 -1
- package/dist/assets/item-C6yFM2Os.js +163 -0
- package/dist/assets/{ja-DMq-YXDX.js → ja-DZPUwZ9l.js} +1 -1
- package/dist/assets/{jsonMode-RjxYywbi.js → jsonMode-BRueWwe6.js} +1 -1
- package/dist/assets/{ko-BrYbXurh.js → ko-q4i4r9g6.js} +1 -1
- package/dist/assets/{list-header-BNS6BF2P.js → list-header-s21LDuvb.js} +1 -1
- package/dist/assets/{lite-C-Ikw2GQ.js → lite-BBz66z5Z.js} +2 -2
- package/dist/assets/{lock.svg-BFdqOrkF.js → lock.svg-DK1hXFWn.js} +1 -1
- package/dist/assets/{log-DZlkZyGX.js → log-DRaCmTGd.js} +1 -1
- package/dist/assets/{login-method-item-ZVrK6tB1.js → login-method-item-DwSmGt8t.js} +1 -1
- package/dist/assets/{lottie-react.esm-A7yQ3Nfv.js → lottie-react.esm-DqwAKW0L.js} +1 -1
- package/dist/assets/{memory-CoCFCBkX.js → memory-VAHG3fjG.js} +1 -1
- package/dist/assets/{metric-B3S53u3H.js → metric-B6TET6QI.js} +1 -1
- package/dist/assets/{monaco-editor-CQ6Pm7Hi.js → monaco-editor-BH4xSgKB.js} +3 -3
- package/dist/assets/{mouseTarget-DxlEpFaz.js → mouseTarget-txK7mk_L.js} +1 -1
- package/dist/assets/omit-B-qG4p98.js +1 -0
- package/dist/assets/{overview-z9AW_vcO.js → overview-D3hqR9Yg.js} +1 -1
- package/dist/assets/{permission-C_g43OOf.js → permission-DET008IY.js} +1 -1
- package/dist/assets/{preference-1qTmAvHN.js → preference-pxwdMSFg.js} +8 -8
- package/dist/assets/{provider-icon-CoJ5ERXe.js → provider-icon-CCZmjsDZ.js} +1 -1
- package/dist/assets/{pt-Dl6732JN.js → pt-BFCHl6F1.js} +1 -1
- package/dist/assets/{raf-schd.esm-CU1FaTjd.js → raf-schd.esm-BuSKwIfR.js} +1 -1
- package/dist/assets/{rotate-session-key-CQOBWeRr.js → rotate-session-key-DE58Q8ag.js} +1 -1
- package/dist/assets/{ru-CVUeN9AX.js → ru-CSTl62kK.js} +1 -1
- package/dist/assets/runtime-b4EXN3II.js +1 -0
- package/dist/assets/schema-DE6tzaXQ.js +1 -0
- package/dist/assets/sdk-CxXstbZm.js +1 -0
- package/dist/assets/{service-iJdsq1ul.js → service-BpzqSJv4.js} +1 -1
- package/dist/assets/{shorten-label-CCnq_MUQ.js → shorten-label-PYNmzpP_.js} +1 -1
- package/dist/assets/{simple-select-0S1qRvRS.js → simple-select-BiJQdJOQ.js} +1 -1
- package/dist/assets/{spaces-BbUa6G9F.js → spaces-MVFShLV4.js} +1 -1
- package/dist/assets/{status-g0Lvwqad.js → status-LmBdrnlB.js} +1 -1
- package/dist/assets/{status-B4gHBixJ.js → status-UZAIOWNB.js} +1 -1
- package/dist/assets/{switch-control-CwXplLu0.js → switch-control-CE57fLeM.js} +1 -1
- package/dist/assets/{table-icons-BwS2Y2wV.js → table-icons-BG66cxZv.js} +1 -1
- package/dist/assets/{team-DETQHkho.js → team-DgQYntrc.js} +1 -1
- package/dist/assets/{th-32eBNQes.js → th-D75Dlluo.js} +1 -1
- package/dist/assets/{toLower-oQZ3J7Wi.js → toLower-DBVF4v1M.js} +1 -1
- package/dist/assets/toUpper-RYfZ9dsZ.js +1 -0
- package/dist/assets/{traffic-Cqk5X-Ty.js → traffic-7oEMp-9f.js} +1 -1
- package/dist/assets/trim-Dm26Hw3f.js +1 -0
- package/dist/assets/{url-evaluation-DyzOKILN.js → url-evaluation-CTsNt3ve.js} +1 -1
- package/dist/assets/{url-join-BM9fQWnd.js → url-join-oxVMh_nl.js} +1 -1
- package/dist/assets/{use-mobile-23djKzeO.js → use-mobile-BS_f_Fn7.js} +1 -1
- package/dist/assets/{use-mobile-BmaqHxmL.js → use-mobile-Czu8FCYf.js} +1 -1
- package/dist/assets/{useAsync-DtsKmLYR.js → useAsync-sbHIoH6-.js} +1 -1
- package/dist/assets/{useAsyncRetry-bd8YRPLB.js → useAsyncRetry-CCLyjAGj.js} +1 -1
- package/dist/assets/{useLocalStorage-Cf0vlWCe.js → useLocalStorage-CnqCtMp_.js} +1 -1
- package/dist/assets/{useThemeProps-CSqQ3Rdj.js → useThemeProps-DrXM-hmA.js} +1 -1
- package/dist/assets/{util-w8OtW6iJ.js → util-odWrmhcv.js} +1 -1
- package/dist/assets/{vi-DF8IinAc.js → vi-D1mKYrmb.js} +1 -1
- package/dist/assets/{wait-container-CoMsFqPE.js → wait-container-D_OCwH7P.js} +1 -1
- package/dist/assets/{without-wallet-U-jwKDa8.js → without-wallet-suCG1vjR.js} +1 -1
- package/dist/assets/wrap-locale-C0daq2dx.js +1 -0
- package/dist/assets/{zh-ByJkLAV1.js → zh-G2I44gfs.js} +1 -1
- package/dist/assets/{zh-tw-34G9tsUP.js → zh-tw-C4Juvs-i.js} +1 -1
- package/dist/index.html +1 -1
- package/package.json +1 -1
- package/dist/assets/ArrowDropDown-BLLloj8o.js +0 -1
- package/dist/assets/KeyboardArrowDown-Dlq5aN05.js +0 -1
- package/dist/assets/Verified-BAR-FN7O.js +0 -1
- package/dist/assets/api-Bv3RStR2.js +0 -1
- package/dist/assets/cloneDeep-CheRvpcx.js +0 -1
- package/dist/assets/config-navigation-D55MBXAB.js +0 -472
- package/dist/assets/emotion-cache.browser.esm-DxLNiXj3.js +0 -1
- package/dist/assets/engine-DGEfu7n8.js +0 -1
- package/dist/assets/getValidReactChildren-CVyZy5bG.js +0 -1
- package/dist/assets/index-CckoDRE8.js +0 -1
- package/dist/assets/index-DciiOEW2.js +0 -20
- package/dist/assets/index-Duu5UY8_.js +0 -1
- package/dist/assets/index-DxkMGrHs.js +0 -358
- package/dist/assets/index-K5eCanEK.js +0 -102
- package/dist/assets/is-path-prefix-equal-Cc6vYZ8N.js +0 -1
- package/dist/assets/item-BinI3jhy.js +0 -163
- package/dist/assets/omit-Bk5eP-SH.js +0 -1
- package/dist/assets/runtime-CVva7EgW.js +0 -1
- package/dist/assets/schema-7NDYbay9.js +0 -1
- package/dist/assets/sdk-Dvt1785F.js +0 -1
- package/dist/assets/toUpper-lxerpjTR.js +0 -1
- package/dist/assets/trim-D7km596D.js +0 -1
- package/dist/assets/wrap-locale-DxhU5ODE.js +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-
|
|
2
|
-
import{c as Gh,j as B,hy as Xh,bo as gt,hd as Zu,j3 as Kh,j4 as Yh,j5 as Qh,cM as vt,c0 as gs,ah as _i,cY as Qn,o as R,r as K,fs as _l,ab as ep,B as J,X as Jn,aB as Cs,y as kl,g2 as Jh,V as Zh,k as ef,fO as tf,fK as af,id as nf,bc as sf,hQ as of,bb as rf,av as Uo,es as Tl,dt as on,fy as tp,dy as ip,fv as mi,j6 as Mo,b5 as lf,ev as _s,al as cf,hp as ks,i as uf,g9 as Ts,x as rn,j7 as pf,j8 as df,C as hf,K as ff,j9 as mf,I as gf,i5 as vf}from"./index-BIgX2N1A.js";import{j as Zn}from"./url-join-BM9fQWnd.js";import{r as bf}from"./index-CEn1Olzp.js";import{c as yf,u as xf}from"./_createAggregator-G6HCftPW.js";import{c as De}from"./index-DaEqVg3j.js";import{x as wf}from"./index-D29L5UKE.js";import{t as Sf}from"./toUpper-lxerpjTR.js";const Ff=Gh(B.jsx("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8m3.59-13L12 10.59 8.41 7 7 8.41 10.59 12 7 15.59 8.41 17 12 13.41 15.59 17 17 15.59 13.41 12 17 8.41z"}));var ap=yf(function(i,e,t){Xh(i,t,e)});function ln(i,e){if(!Object.prototype.hasOwnProperty.call(i,e))throw new TypeError("attempted to use private field on non-instance");return i}var Pf=0;function np(i){return"__private_"+Pf+++"_"+i}function Cf(i,e,t){const a=[];return i.forEach(n=>typeof n!="string"?a.push(n):e[Symbol.split](n).forEach((s,o,r)=>{s!==""&&a.push(s),o<r.length-1&&a.push(t)})),a}function El(i,e){const t=/\$/g,a="$$$$";let n=[i];if(e==null)return n;for(const s of Object.keys(e))if(s!=="_"){let o=e[s];typeof o=="string"&&(o=t[Symbol.replace](o,a)),n=Cf(n,new RegExp(`%\\{${s}\\}`,"g"),o)}return n}const _f=i=>{throw new Error(`missing string: ${i}`)};var $i=np("onMissingKey"),Hi=np("apply");class sp{constructor(e,t){let{onMissingKey:a=_f}=t===void 0?{}:t;Object.defineProperty(this,Hi,{value:kf}),Object.defineProperty(this,$i,{writable:!0,value:void 0}),this.locale={strings:{},pluralize(n){return n===1?0:1}},Array.isArray(e)?e.forEach(ln(this,Hi)[Hi],this):ln(this,Hi)[Hi](e),ln(this,$i)[$i]=a}translate(e,t){return this.translateArray(e,t).join("")}translateArray(e,t){let a=this.locale.strings[e];if(a==null&&(ln(this,$i)[$i](e),a=e),typeof a=="object"){if(t&&typeof t.smart_count<"u"){const s=this.locale.pluralize(t.smart_count);return El(a[s],t)}throw new Error("Attempted to use a string with plural forms, but no value was given for %{smart_count}")}if(typeof a!="string")throw new Error("string was not a string");return El(a,t)}}function kf(i){if(!(i!=null&&i.strings))return;const e=this.locale;Object.assign(this.locale,{strings:{...e.strings,...i.strings},pluralize:i.pluralize||e.pluralize})}var Es,Dl;function Tf(){return Dl||(Dl=1,Es=function(){var e={},t=e._fns={};e.emit=function(o,r,l,c,p,u,f){var x=a(o);x.length&&n(o,x,[r,l,c,p,u,f])},e.on=function(o,r){t[o]||(t[o]=[]),t[o].push(r)},e.once=function(o,r){function l(){r.apply(this,arguments),e.off(o,l)}this.on(o,l)},e.off=function(o,r){var l=[];if(o&&r){var c=this._fns[o],p=0,u=c?c.length:0;for(p;p<u;p++)c[p]!==r&&l.push(c[p])}l.length?this._fns[o]=l:delete this._fns[o]};function a(s){var o=t[s]?t[s]:[],r=s.indexOf(":"),l=r===-1?[s]:[s.substring(0,r),s.substring(r+1)],c=Object.keys(t),p=0,u=c.length;for(p;p<u;p++){var f=c[p];if(f==="*"&&(o=o.concat(t[f])),l.length===2&&l[0]===f){o=o.concat(t[f]);break}}return o}function n(s,o,r){var l=0,c=o.length;for(l;l<c&&o[l];l++)o[l].event=s,o[l].apply(o[l],r)}return e}),Es}var Ef=Tf();const Df=gt(Ef);let Af="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",If=(i=21)=>{let e="",t=i;for(;t--;)e+=Af[Math.random()*64|0];return e};function On(i,e){if(!Object.prototype.hasOwnProperty.call(i,e))throw new TypeError("attempted to use private field on non-instance");return i}var Of=0;function op(i){return"__private_"+Of+++"_"+i}const Rf={version:"3.2.2"};var ti=op("callbacks"),Ds=op("publish");class rp{constructor(){Object.defineProperty(this,Ds,{value:Uf}),this.state={},Object.defineProperty(this,ti,{writable:!0,value:new Set})}getState(){return this.state}setState(e){const t={...this.state},a={...this.state,...e};this.state=a,On(this,Ds)[Ds](t,a,e)}subscribe(e){return On(this,ti)[ti].add(e),()=>{On(this,ti)[ti].delete(e)}}}function Uf(){for(var i=arguments.length,e=new Array(i),t=0;t<i;t++)e[t]=arguments[t];On(this,ti)[ti].forEach(a=>{a(...e)})}rp.VERSION=Rf.version;function Mr(i){const e=i.lastIndexOf(".");return e===-1||e===i.length-1?{name:i,extension:void 0}:{name:i.slice(0,e),extension:i.slice(e+1)}}const Bo={__proto__:null,md:"text/markdown",markdown:"text/markdown",mp4:"video/mp4",mp3:"audio/mp3",svg:"image/svg+xml",jpg:"image/jpeg",png:"image/png",webp:"image/webp",gif:"image/gif",heic:"image/heic",heif:"image/heif",yaml:"text/yaml",yml:"text/yaml",csv:"text/csv",tsv:"text/tab-separated-values",tab:"text/tab-separated-values",avi:"video/x-msvideo",mks:"video/x-matroska",mkv:"video/x-matroska",mov:"video/quicktime",dicom:"application/dicom",doc:"application/msword",docm:"application/vnd.ms-word.document.macroenabled.12",docx:"application/vnd.openxmlformats-officedocument.wordprocessingml.document",dot:"application/msword",dotm:"application/vnd.ms-word.template.macroenabled.12",dotx:"application/vnd.openxmlformats-officedocument.wordprocessingml.template",xla:"application/vnd.ms-excel",xlam:"application/vnd.ms-excel.addin.macroenabled.12",xlc:"application/vnd.ms-excel",xlf:"application/x-xliff+xml",xlm:"application/vnd.ms-excel",xls:"application/vnd.ms-excel",xlsb:"application/vnd.ms-excel.sheet.binary.macroenabled.12",xlsm:"application/vnd.ms-excel.sheet.macroenabled.12",xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",xlt:"application/vnd.ms-excel",xltm:"application/vnd.ms-excel.template.macroenabled.12",xltx:"application/vnd.openxmlformats-officedocument.spreadsheetml.template",xlw:"application/vnd.ms-excel",txt:"text/plain",text:"text/plain",conf:"text/plain",log:"text/plain",pdf:"application/pdf",zip:"application/zip","7z":"application/x-7z-compressed",rar:"application/x-rar-compressed",tar:"application/x-tar",gz:"application/gzip",dmg:"application/x-apple-diskimage"};function lp(i){var e;if(i.type)return i.type;const t=i.name?(e=Mr(i.name).extension)==null?void 0:e.toLowerCase():null;return t&&t in Bo?Bo[t]:"application/octet-stream"}function Mf(i){return i.charCodeAt(0).toString(32)}function Al(i){let e="";return i.replace(/[^A-Z0-9]/gi,t=>(e+=`-${Mf(t)}`,"/"))+e}function Bf(i,e){let t=e||"uppy";return typeof i.name=="string"&&(t+=`-${Al(i.name.toLowerCase())}`),i.type!==void 0&&(t+=`-${i.type}`),i.meta&&typeof i.meta.relativePath=="string"&&(t+=`-${Al(i.meta.relativePath.toLowerCase())}`),i.data.size!==void 0&&(t+=`-${i.data.size}`),i.data.lastModified!==void 0&&(t+=`-${i.data.lastModified}`),t}function Lf(i){return!i.isRemote||!i.remote?!1:new Set(["box","dropbox","drive","facebook","unsplash"]).has(i.remote.provider)}function cp(i,e){if(Lf(i))return i.id;const t=lp(i);return Bf({...i,type:t},e)}function Nf(i){if(i==null&&typeof navigator<"u"&&(i=navigator.userAgent),!i)return!0;const e=/Edge\/(\d+\.\d+)/.exec(i);if(!e)return!0;const a=e[1].split(".",2),n=parseInt(a[0],10),s=parseInt(a[1],10);return n<15||n===15&&s<15063||n>18||n===18&&s>=18218}function zf(i,e){return e.name?e.name:i.split("/")[0]==="image"?`${i.split("/")[0]}.${i.split("/")[1]}`:"noname"}function As(i){return i<10?`0${i}`:i.toString()}function Rn(){const i=new Date,e=As(i.getHours()),t=As(i.getMinutes()),a=As(i.getSeconds());return`${e}:${t}:${a}`}const jf={debug:()=>{},warn:()=>{},error:function(){for(var i=arguments.length,e=new Array(i),t=0;t<i;t++)e[t]=arguments[t];return console.error(`[Uppy] [${Rn()}]`,...e)}},$f={debug:function(){for(var i=arguments.length,e=new Array(i),t=0;t<i;t++)e[t]=arguments[t];return console.debug(`[Uppy] [${Rn()}]`,...e)},warn:function(){for(var i=arguments.length,e=new Array(i),t=0;t<i;t++)e[t]=arguments[t];return console.warn(`[Uppy] [${Rn()}]`,...e)},error:function(){for(var i=arguments.length,e=new Array(i),t=0;t<i;t++)e[t]=arguments[t];return console.error(`[Uppy] [${Rn()}]`,...e)}};var Is,Il;function Hf(){return Il||(Il=1,Is=function(e){if(typeof e!="number"||Number.isNaN(e))throw new TypeError(`Expected a number, got ${typeof e}`);const t=e<0;let a=Math.abs(e);if(t&&(a=-a),a===0)return"0 B";const n=["B","KB","MB","GB","TB","PB","EB","ZB","YB"],s=Math.min(Math.floor(Math.log(a)/Math.log(1024)),n.length-1),o=Number(a/1024**s),r=n[s];return`${o>=10||o%1===0?Math.round(o):o.toFixed(1)} ${r}`}),Is}var qf=Hf();const oi=gt(qf);var Os,Ol;function Vf(){if(Ol)return Os;Ol=1;function i(e,t){this.text=e=e||"",this.hasWild=~e.indexOf("*"),this.separator=t,this.parts=e.split(t)}return i.prototype.match=function(e){var t=!0,a=this.parts,n,s=a.length,o;if(typeof e=="string"||e instanceof String)if(!this.hasWild&&this.text!=e)t=!1;else{for(o=(e||"").split(this.separator),n=0;t&&n<s;n++)a[n]!=="*"&&(n<o.length?t=a[n]===o[n]:t=!1);t=t&&o}else if(typeof e.splice=="function")for(t=[],n=e.length;n--;)this.match(e[n])&&(t[t.length]=e[n]);else if(typeof e=="object"){t={};for(var r in e)this.match(r)&&(t[r]=e[r])}return t},Os=function(e,t,a){var n=new i(e,a||/[\/\.]/);return typeof t<"u"?n.match(t):n},Os}var Rs,Rl;function Wf(){if(Rl)return Rs;Rl=1;var i=Vf(),e=/[\/\+\.]/;return Rs=function(t,a){function n(s){var o=i(s,t,e);return o&&o.length>=2}return a?n(a.split(";")[0]):n},Rs}var Gf=Wf();const Xf=gt(Gf),Kf={maxFileSize:null,minFileSize:null,maxTotalFileSize:null,maxNumberOfFiles:null,minNumberOfFiles:null,allowedFileTypes:null,requiredMetaFields:[]};class it extends Error{constructor(e,t){var a;super(e),this.isRestriction=!0,this.isUserFacing=(a=t?.isUserFacing)!=null?a:!0,t!=null&&t.file&&(this.file=t.file)}}class Yf{constructor(e,t){this.getI18n=t,this.getOpts=()=>{var a;const n=e();if(((a=n.restrictions)==null?void 0:a.allowedFileTypes)!=null&&!Array.isArray(n.restrictions.allowedFileTypes))throw new TypeError("`restrictions.allowedFileTypes` must be an array");return n}}validateAggregateRestrictions(e,t){const{maxTotalFileSize:a,maxNumberOfFiles:n}=this.getOpts().restrictions;if(n&&e.filter(o=>!o.isGhost).length+t.length>n)throw new it(`${this.getI18n()("youCanOnlyUploadX",{smart_count:n})}`);if(a){const s=[...e,...t].reduce((o,r)=>{var l;return o+((l=r.size)!=null?l:0)},0);if(s>a)throw new it(this.getI18n()("aggregateExceedsSize",{sizeAllowed:oi(a),size:oi(s)}))}}validateSingleFile(e){const{maxFileSize:t,minFileSize:a,allowedFileTypes:n}=this.getOpts().restrictions;if(n&&!n.some(o=>o.includes("/")?e.type?Xf(e.type.replace(/;.*?$/,""),o):!1:o[0]==="."&&e.extension?e.extension.toLowerCase()===o.slice(1).toLowerCase():!1)){const o=n.join(", ");throw new it(this.getI18n()("youCanOnlyUploadFileTypes",{types:o}),{file:e})}if(t&&e.size!=null&&e.size>t)throw new it(this.getI18n()("exceedsSize",{size:oi(t),file:e.name}),{file:e});if(a&&e.size!=null&&e.size<a)throw new it(this.getI18n()("inferiorSize",{size:oi(a)}),{file:e})}validate(e,t){t.forEach(a=>{this.validateSingleFile(a)}),this.validateAggregateRestrictions(e,t)}validateMinNumberOfFiles(e){const{minNumberOfFiles:t}=this.getOpts().restrictions;if(t&&Object.keys(e).length<t)throw new it(this.getI18n()("youHaveToAtLeastSelectX",{smart_count:t}))}getMissingRequiredMetaFields(e){const t=new it(this.getI18n()("missingRequiredMetaFieldOnFile",{fileName:e.name})),{requiredMetaFields:a}=this.getOpts().restrictions,n=[];for(const s of a)(!Object.hasOwn(e.meta,s)||e.meta[s]==="")&&n.push(s);return{missingFields:n,error:t}}}const Qf={strings:{addBulkFilesFailed:{0:"Failed to add %{smart_count} file due to an internal error",1:"Failed to add %{smart_count} files due to internal errors"},youCanOnlyUploadX:{0:"You can only upload %{smart_count} file",1:"You can only upload %{smart_count} files"},youHaveToAtLeastSelectX:{0:"You have to select at least %{smart_count} file",1:"You have to select at least %{smart_count} files"},aggregateExceedsSize:"You selected %{size} of files, but maximum allowed size is %{sizeAllowed}",exceedsSize:"%{file} exceeds maximum allowed size of %{size}",missingRequiredMetaField:"Missing required meta fields",missingRequiredMetaFieldOnFile:"Missing required meta fields in %{fileName}",inferiorSize:"This file is smaller than the allowed size of %{size}",youCanOnlyUploadFileTypes:"You can only upload: %{types}",noMoreFilesAllowed:"Cannot add more files",noDuplicates:"Cannot add the duplicate file '%{fileName}', it already exists",companionError:"Connection with Companion failed",authAborted:"Authentication aborted",companionUnauthorizeHint:"To unauthorize to your %{provider} account, please go to %{url}",failedToUpload:"Failed to upload %{file}",noInternetConnection:"No Internet connection",connectedToInternet:"Connected to the Internet",noFilesFound:"You have no files or folders here",noSearchResults:"Unfortunately, there are no results for this search",selectX:{0:"Select %{smart_count}",1:"Select %{smart_count}"},allFilesFromFolderNamed:"All files from folder %{name}",openFolderNamed:"Open folder %{name}",cancel:"Cancel",logOut:"Log out",filter:"Filter",resetFilter:"Reset filter",loading:"Loading...",loadedXFiles:"Loaded %{numFiles} files",authenticateWithTitle:"Please authenticate with %{pluginName} to select files",authenticateWith:"Connect to %{pluginName}",signInWithGoogle:"Sign in with Google",searchImages:"Search for images",enterTextToSearch:"Enter text to search for images",search:"Search",resetSearch:"Reset search",emptyFolderAdded:"No files were added from empty folder",addedNumFiles:"Added %{numFiles} file(s)",folderAlreadyAdded:'The folder "%{folder}" was already added',folderAdded:{0:"Added %{smart_count} file from %{folder}",1:"Added %{smart_count} files from %{folder}"},additionalRestrictionsFailed:"%{count} additional restrictions were not fulfilled",unnamed:"Unnamed"}};let up,pp;function M(i,e){if(!Object.prototype.hasOwnProperty.call(i,e))throw new TypeError("attempted to use private field on non-instance");return i}var Jf=0;function pe(i){return"__private_"+Jf+++"_"+i}const Zf={version:"3.13.1"},cn={totalProgress:0,allowNewUpload:!0,error:null,recoveredState:null};var xe=pe("plugins"),He=pe("restricter"),qi=pe("storeUnsubscribe"),yt=pe("emitter"),ii=pe("preProcessors"),ai=pe("uploaders"),It=pe("postProcessors"),qe=pe("informAndEmit"),Ua=pe("checkRequiredMetaFieldsOnFile"),Us=pe("checkRequiredMetaFields"),Vi=pe("assertNewUploadAllowed"),Lo=pe("transformFile"),Wi=pe("startIfAutoProceed"),Gi=pe("checkAndUpdateFileState"),Ms=pe("addListeners"),st=pe("updateOnlineStatus"),Xi=pe("requestClientById"),xt=pe("createUpload"),Bs=pe("getUpload"),ri=pe("removeUpload"),wt=pe("runUpload");up=Symbol.for("uppy test: getPlugins");pp=Symbol.for("uppy test: createUpload");let Br=class dp{constructor(e){Object.defineProperty(this,wt,{value:pm}),Object.defineProperty(this,ri,{value:um}),Object.defineProperty(this,Bs,{value:cm}),Object.defineProperty(this,xt,{value:lm}),Object.defineProperty(this,Ms,{value:rm}),Object.defineProperty(this,Gi,{value:om}),Object.defineProperty(this,Wi,{value:sm}),Object.defineProperty(this,Lo,{value:nm}),Object.defineProperty(this,Vi,{value:am}),Object.defineProperty(this,Us,{value:im}),Object.defineProperty(this,Ua,{value:tm}),Object.defineProperty(this,qe,{value:em}),Object.defineProperty(this,xe,{writable:!0,value:Object.create(null)}),Object.defineProperty(this,He,{writable:!0,value:void 0}),Object.defineProperty(this,qi,{writable:!0,value:void 0}),Object.defineProperty(this,yt,{writable:!0,value:Df()}),Object.defineProperty(this,ii,{writable:!0,value:new Set}),Object.defineProperty(this,ai,{writable:!0,value:new Set}),Object.defineProperty(this,It,{writable:!0,value:new Set}),this.scheduledAutoProceed=null,this.wasOffline=!1,this.calculateProgress=Zu((n,s)=>{const o=this.getFile(n?.id);if(n==null||!o){this.log(`Not setting progress for a file that has been removed: ${n?.id}`);return}if(o.progress.percentage===100){this.log(`Not setting progress for a file that has been already uploaded: ${n.id}`);return}const r=Number.isFinite(s.bytesTotal)&&s.bytesTotal>0;this.setFileState(n.id,{progress:{...o.progress,bytesUploaded:s.bytesUploaded,bytesTotal:s.bytesTotal,percentage:r?Math.round(s.bytesUploaded/s.bytesTotal*100):0}}),this.calculateTotalProgress()},500,{leading:!0,trailing:!0}),Object.defineProperty(this,st,{writable:!0,value:this.updateOnlineStatus.bind(this)}),Object.defineProperty(this,Xi,{writable:!0,value:new Map}),this.defaultLocale=Qf;const t={id:"uppy",autoProceed:!1,allowMultipleUploadBatches:!0,debug:!1,restrictions:Kf,meta:{},onBeforeFileAdded:(n,s)=>!Object.hasOwn(s,n.id),onBeforeUpload:n=>n,store:new rp,logger:jf,infoTimeout:5e3},a={...t,...e};this.opts={...a,restrictions:{...t.restrictions,...e&&e.restrictions}},e&&e.logger&&e.debug?this.log("You are using a custom `logger`, but also set `debug: true`, which uses built-in logger to output logs to console. Ignoring `debug: true` and using your custom `logger`.","warning"):e&&e.debug&&(this.opts.logger=$f),this.log(`Using Core v${dp.VERSION}`),this.i18nInit(),this.store=this.opts.store,this.setState({...cn,plugins:{},files:{},currentUploads:{},capabilities:{uploadProgress:Nf(),individualCancellation:!0,resumableUploads:!1},meta:{...this.opts.meta},info:[]}),M(this,He)[He]=new Yf(()=>this.opts,()=>this.i18n),M(this,qi)[qi]=this.store.subscribe((n,s,o)=>{this.emit("state-update",n,s,o),this.updateAll(s)}),this.opts.debug&&typeof window<"u"&&(window[this.opts.id]=this),M(this,Ms)[Ms]()}emit(e){for(var t=arguments.length,a=new Array(t>1?t-1:0),n=1;n<t;n++)a[n-1]=arguments[n];M(this,yt)[yt].emit(e,...a)}on(e,t){return M(this,yt)[yt].on(e,t),this}once(e,t){return M(this,yt)[yt].once(e,t),this}off(e,t){return M(this,yt)[yt].off(e,t),this}updateAll(e){this.iteratePlugins(t=>{t.update(e)})}setState(e){this.store.setState(e)}getState(){return this.store.getState()}patchFilesState(e){const t=this.getState().files;this.setState({files:{...t,...Object.fromEntries(Object.entries(e).map(a=>{let[n,s]=a;return[n,{...t[n],...s}]}))}})}setFileState(e,t){if(!this.getState().files[e])throw new Error(`Can’t set state for ${e} (the file could have been removed)`);this.patchFilesState({[e]:t})}i18nInit(){const e=a=>this.log(`Missing i18n string: ${a}`,"error"),t=new sp([this.defaultLocale,this.opts.locale],{onMissingKey:e});this.i18n=t.translate.bind(t),this.i18nArray=t.translateArray.bind(t),this.locale=t.locale}setOptions(e){this.opts={...this.opts,...e,restrictions:{...this.opts.restrictions,...e?.restrictions}},e.meta&&this.setMeta(e.meta),this.i18nInit(),e.locale&&this.iteratePlugins(t=>{t.setOptions(e)}),this.setState(void 0)}resetProgress(){const e={percentage:0,bytesUploaded:0,uploadComplete:!1,uploadStarted:null},t={...this.getState().files},a={};Object.keys(t).forEach(n=>{a[n]={...t[n],progress:{...t[n].progress,...e}}}),this.setState({files:a,...cn}),this.emit("reset-progress")}clearUploadedFiles(){const{capabilities:e,currentUploads:t}=this.getState();if(Object.keys(t).length>0&&!e.individualCancellation)throw new Error("The installed uploader plugin does not allow removing files during an upload.");this.setState({...cn,files:{}})}addPreProcessor(e){M(this,ii)[ii].add(e)}removePreProcessor(e){return M(this,ii)[ii].delete(e)}addPostProcessor(e){M(this,It)[It].add(e)}removePostProcessor(e){return M(this,It)[It].delete(e)}addUploader(e){M(this,ai)[ai].add(e)}removeUploader(e){return M(this,ai)[ai].delete(e)}setMeta(e){const t={...this.getState().meta,...e},a={...this.getState().files};Object.keys(a).forEach(n=>{a[n]={...a[n],meta:{...a[n].meta,...e}}}),this.log("Adding metadata:"),this.log(e),this.setState({meta:t,files:a})}setFileMeta(e,t){const a={...this.getState().files};if(!a[e]){this.log("Was trying to set metadata for a file that has been removed: ",e);return}const n={...a[e].meta,...t};a[e]={...a[e],meta:n},this.setState({files:a})}getFile(e){return this.getState().files[e]}getFiles(){const{files:e}=this.getState();return Object.values(e)}getFilesByIds(e){return e.map(t=>this.getFile(t))}getObjectOfFilesPerState(){const{files:e,totalProgress:t,error:a}=this.getState(),n=Object.values(e),s=[],o=[],r=[],l=[],c=[],p=[],u=[],f=[],x=[];for(const S of n){const{progress:C}=S;!C.uploadComplete&&C.uploadStarted&&(s.push(S),S.isPaused||f.push(S)),C.uploadStarted||o.push(S),(C.uploadStarted||C.preprocess||C.postprocess)&&r.push(S),C.uploadStarted&&l.push(S),S.isPaused&&c.push(S),C.uploadComplete&&p.push(S),S.error&&u.push(S),(C.preprocess||C.postprocess)&&x.push(S)}return{newFiles:o,startedFiles:r,uploadStartedFiles:l,pausedFiles:c,completeFiles:p,erroredFiles:u,inProgressFiles:s,inProgressNotPausedFiles:f,processingFiles:x,isUploadStarted:l.length>0,isAllComplete:t===100&&p.length===n.length&&x.length===0,isAllErrored:!!a&&u.length===n.length,isAllPaused:s.length!==0&&c.length===s.length,isUploadInProgress:s.length>0,isSomeGhost:n.some(S=>S.isGhost)}}validateRestrictions(e,t){t===void 0&&(t=this.getFiles());try{M(this,He)[He].validate(t,[e])}catch(a){return a}return null}checkIfFileAlreadyExists(e){const{files:t}=this.getState();return!!(t[e]&&!t[e].isGhost)}addFile(e){M(this,Vi)[Vi](e);const{nextFilesState:t,validFilesToAdd:a,errors:n}=M(this,Gi)[Gi]([e]),s=n.filter(r=>r.isRestriction);if(M(this,qe)[qe](s),n.length>0)throw n[0];this.setState({files:t});const[o]=a;return this.emit("file-added",o),this.emit("files-added",a),this.log(`Added file: ${o.name}, ${o.id}, mime type: ${o.type}`),M(this,Wi)[Wi](),o.id}addFiles(e){M(this,Vi)[Vi]();const{nextFilesState:t,validFilesToAdd:a,errors:n}=M(this,Gi)[Gi](e),s=n.filter(r=>r.isRestriction);M(this,qe)[qe](s);const o=n.filter(r=>!r.isRestriction);if(o.length>0){let r=`Multiple errors occurred while adding files:
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-DHLFobHl.js","./index-DrI_kbUr.js","./index-BLDnEtdF.css","./Delete-RCnwfW1g.js","./index-Bg6faJyI.js","./url-join-oxVMh_nl.js","./_createAggregator-BunO9xPF.js","./depsEqual-Bfsv3kHf.js","./index-C73PGWD5.js","./index-D29L5UKE.js","./toUpper-RYfZ9dsZ.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{c as Gh,j as B,hz as Xh,bi as gt,he as Zu,j3 as Kh,j4 as Yh,j5 as Qh,cM as vt,c0 as gs,ah as _i,cY as Qn,o as R,r as K,fs as _l,ab as ep,B as J,X as Jn,aB as Cs,y as kl,fR as Jh,V as Zh,k as ef,fB as tf,fx as af,ie as nf,bc as sf,hR as of,bb as rf,av as Uo,es as Tl,dt as on,go as tp,dy as ip,fv as mi,j6 as Mo,b5 as lf,ev as _s,al as cf,hq as ks,i as uf,fZ as Ts,x as rn,j7 as pf,j8 as df,C as hf,K as ff,j9 as mf,I as gf,i6 as vf}from"./index-DrI_kbUr.js";import{j as Zn}from"./url-join-oxVMh_nl.js";import{r as bf}from"./index-Bg6faJyI.js";import{c as yf,u as xf}from"./_createAggregator-BunO9xPF.js";import{c as De}from"./index-C73PGWD5.js";import{x as wf}from"./index-D29L5UKE.js";import{t as Sf}from"./toUpper-RYfZ9dsZ.js";const Ff=Gh(B.jsx("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8m3.59-13L12 10.59 8.41 7 7 8.41 10.59 12 7 15.59 8.41 17 12 13.41 15.59 17 17 15.59 13.41 12 17 8.41z"}));var ap=yf(function(i,e,t){Xh(i,t,e)});function ln(i,e){if(!Object.prototype.hasOwnProperty.call(i,e))throw new TypeError("attempted to use private field on non-instance");return i}var Pf=0;function np(i){return"__private_"+Pf+++"_"+i}function Cf(i,e,t){const a=[];return i.forEach(n=>typeof n!="string"?a.push(n):e[Symbol.split](n).forEach((s,o,r)=>{s!==""&&a.push(s),o<r.length-1&&a.push(t)})),a}function El(i,e){const t=/\$/g,a="$$$$";let n=[i];if(e==null)return n;for(const s of Object.keys(e))if(s!=="_"){let o=e[s];typeof o=="string"&&(o=t[Symbol.replace](o,a)),n=Cf(n,new RegExp(`%\\{${s}\\}`,"g"),o)}return n}const _f=i=>{throw new Error(`missing string: ${i}`)};var $i=np("onMissingKey"),Hi=np("apply");class sp{constructor(e,t){let{onMissingKey:a=_f}=t===void 0?{}:t;Object.defineProperty(this,Hi,{value:kf}),Object.defineProperty(this,$i,{writable:!0,value:void 0}),this.locale={strings:{},pluralize(n){return n===1?0:1}},Array.isArray(e)?e.forEach(ln(this,Hi)[Hi],this):ln(this,Hi)[Hi](e),ln(this,$i)[$i]=a}translate(e,t){return this.translateArray(e,t).join("")}translateArray(e,t){let a=this.locale.strings[e];if(a==null&&(ln(this,$i)[$i](e),a=e),typeof a=="object"){if(t&&typeof t.smart_count<"u"){const s=this.locale.pluralize(t.smart_count);return El(a[s],t)}throw new Error("Attempted to use a string with plural forms, but no value was given for %{smart_count}")}if(typeof a!="string")throw new Error("string was not a string");return El(a,t)}}function kf(i){if(!(i!=null&&i.strings))return;const e=this.locale;Object.assign(this.locale,{strings:{...e.strings,...i.strings},pluralize:i.pluralize||e.pluralize})}var Es,Dl;function Tf(){return Dl||(Dl=1,Es=function(){var e={},t=e._fns={};e.emit=function(o,r,l,c,p,u,f){var x=a(o);x.length&&n(o,x,[r,l,c,p,u,f])},e.on=function(o,r){t[o]||(t[o]=[]),t[o].push(r)},e.once=function(o,r){function l(){r.apply(this,arguments),e.off(o,l)}this.on(o,l)},e.off=function(o,r){var l=[];if(o&&r){var c=this._fns[o],p=0,u=c?c.length:0;for(p;p<u;p++)c[p]!==r&&l.push(c[p])}l.length?this._fns[o]=l:delete this._fns[o]};function a(s){var o=t[s]?t[s]:[],r=s.indexOf(":"),l=r===-1?[s]:[s.substring(0,r),s.substring(r+1)],c=Object.keys(t),p=0,u=c.length;for(p;p<u;p++){var f=c[p];if(f==="*"&&(o=o.concat(t[f])),l.length===2&&l[0]===f){o=o.concat(t[f]);break}}return o}function n(s,o,r){var l=0,c=o.length;for(l;l<c&&o[l];l++)o[l].event=s,o[l].apply(o[l],r)}return e}),Es}var Ef=Tf();const Df=gt(Ef);let Af="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",If=(i=21)=>{let e="",t=i;for(;t--;)e+=Af[Math.random()*64|0];return e};function On(i,e){if(!Object.prototype.hasOwnProperty.call(i,e))throw new TypeError("attempted to use private field on non-instance");return i}var Of=0;function op(i){return"__private_"+Of+++"_"+i}const Rf={version:"3.2.2"};var ti=op("callbacks"),Ds=op("publish");class rp{constructor(){Object.defineProperty(this,Ds,{value:Uf}),this.state={},Object.defineProperty(this,ti,{writable:!0,value:new Set})}getState(){return this.state}setState(e){const t={...this.state},a={...this.state,...e};this.state=a,On(this,Ds)[Ds](t,a,e)}subscribe(e){return On(this,ti)[ti].add(e),()=>{On(this,ti)[ti].delete(e)}}}function Uf(){for(var i=arguments.length,e=new Array(i),t=0;t<i;t++)e[t]=arguments[t];On(this,ti)[ti].forEach(a=>{a(...e)})}rp.VERSION=Rf.version;function Mr(i){const e=i.lastIndexOf(".");return e===-1||e===i.length-1?{name:i,extension:void 0}:{name:i.slice(0,e),extension:i.slice(e+1)}}const Bo={__proto__:null,md:"text/markdown",markdown:"text/markdown",mp4:"video/mp4",mp3:"audio/mp3",svg:"image/svg+xml",jpg:"image/jpeg",png:"image/png",webp:"image/webp",gif:"image/gif",heic:"image/heic",heif:"image/heif",yaml:"text/yaml",yml:"text/yaml",csv:"text/csv",tsv:"text/tab-separated-values",tab:"text/tab-separated-values",avi:"video/x-msvideo",mks:"video/x-matroska",mkv:"video/x-matroska",mov:"video/quicktime",dicom:"application/dicom",doc:"application/msword",docm:"application/vnd.ms-word.document.macroenabled.12",docx:"application/vnd.openxmlformats-officedocument.wordprocessingml.document",dot:"application/msword",dotm:"application/vnd.ms-word.template.macroenabled.12",dotx:"application/vnd.openxmlformats-officedocument.wordprocessingml.template",xla:"application/vnd.ms-excel",xlam:"application/vnd.ms-excel.addin.macroenabled.12",xlc:"application/vnd.ms-excel",xlf:"application/x-xliff+xml",xlm:"application/vnd.ms-excel",xls:"application/vnd.ms-excel",xlsb:"application/vnd.ms-excel.sheet.binary.macroenabled.12",xlsm:"application/vnd.ms-excel.sheet.macroenabled.12",xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",xlt:"application/vnd.ms-excel",xltm:"application/vnd.ms-excel.template.macroenabled.12",xltx:"application/vnd.openxmlformats-officedocument.spreadsheetml.template",xlw:"application/vnd.ms-excel",txt:"text/plain",text:"text/plain",conf:"text/plain",log:"text/plain",pdf:"application/pdf",zip:"application/zip","7z":"application/x-7z-compressed",rar:"application/x-rar-compressed",tar:"application/x-tar",gz:"application/gzip",dmg:"application/x-apple-diskimage"};function lp(i){var e;if(i.type)return i.type;const t=i.name?(e=Mr(i.name).extension)==null?void 0:e.toLowerCase():null;return t&&t in Bo?Bo[t]:"application/octet-stream"}function Mf(i){return i.charCodeAt(0).toString(32)}function Al(i){let e="";return i.replace(/[^A-Z0-9]/gi,t=>(e+=`-${Mf(t)}`,"/"))+e}function Bf(i,e){let t=e||"uppy";return typeof i.name=="string"&&(t+=`-${Al(i.name.toLowerCase())}`),i.type!==void 0&&(t+=`-${i.type}`),i.meta&&typeof i.meta.relativePath=="string"&&(t+=`-${Al(i.meta.relativePath.toLowerCase())}`),i.data.size!==void 0&&(t+=`-${i.data.size}`),i.data.lastModified!==void 0&&(t+=`-${i.data.lastModified}`),t}function Lf(i){return!i.isRemote||!i.remote?!1:new Set(["box","dropbox","drive","facebook","unsplash"]).has(i.remote.provider)}function cp(i,e){if(Lf(i))return i.id;const t=lp(i);return Bf({...i,type:t},e)}function Nf(i){if(i==null&&typeof navigator<"u"&&(i=navigator.userAgent),!i)return!0;const e=/Edge\/(\d+\.\d+)/.exec(i);if(!e)return!0;const a=e[1].split(".",2),n=parseInt(a[0],10),s=parseInt(a[1],10);return n<15||n===15&&s<15063||n>18||n===18&&s>=18218}function zf(i,e){return e.name?e.name:i.split("/")[0]==="image"?`${i.split("/")[0]}.${i.split("/")[1]}`:"noname"}function As(i){return i<10?`0${i}`:i.toString()}function Rn(){const i=new Date,e=As(i.getHours()),t=As(i.getMinutes()),a=As(i.getSeconds());return`${e}:${t}:${a}`}const jf={debug:()=>{},warn:()=>{},error:function(){for(var i=arguments.length,e=new Array(i),t=0;t<i;t++)e[t]=arguments[t];return console.error(`[Uppy] [${Rn()}]`,...e)}},$f={debug:function(){for(var i=arguments.length,e=new Array(i),t=0;t<i;t++)e[t]=arguments[t];return console.debug(`[Uppy] [${Rn()}]`,...e)},warn:function(){for(var i=arguments.length,e=new Array(i),t=0;t<i;t++)e[t]=arguments[t];return console.warn(`[Uppy] [${Rn()}]`,...e)},error:function(){for(var i=arguments.length,e=new Array(i),t=0;t<i;t++)e[t]=arguments[t];return console.error(`[Uppy] [${Rn()}]`,...e)}};var Is,Il;function Hf(){return Il||(Il=1,Is=function(e){if(typeof e!="number"||Number.isNaN(e))throw new TypeError(`Expected a number, got ${typeof e}`);const t=e<0;let a=Math.abs(e);if(t&&(a=-a),a===0)return"0 B";const n=["B","KB","MB","GB","TB","PB","EB","ZB","YB"],s=Math.min(Math.floor(Math.log(a)/Math.log(1024)),n.length-1),o=Number(a/1024**s),r=n[s];return`${o>=10||o%1===0?Math.round(o):o.toFixed(1)} ${r}`}),Is}var qf=Hf();const oi=gt(qf);var Os,Ol;function Vf(){if(Ol)return Os;Ol=1;function i(e,t){this.text=e=e||"",this.hasWild=~e.indexOf("*"),this.separator=t,this.parts=e.split(t)}return i.prototype.match=function(e){var t=!0,a=this.parts,n,s=a.length,o;if(typeof e=="string"||e instanceof String)if(!this.hasWild&&this.text!=e)t=!1;else{for(o=(e||"").split(this.separator),n=0;t&&n<s;n++)a[n]!=="*"&&(n<o.length?t=a[n]===o[n]:t=!1);t=t&&o}else if(typeof e.splice=="function")for(t=[],n=e.length;n--;)this.match(e[n])&&(t[t.length]=e[n]);else if(typeof e=="object"){t={};for(var r in e)this.match(r)&&(t[r]=e[r])}return t},Os=function(e,t,a){var n=new i(e,a||/[\/\.]/);return typeof t<"u"?n.match(t):n},Os}var Rs,Rl;function Wf(){if(Rl)return Rs;Rl=1;var i=Vf(),e=/[\/\+\.]/;return Rs=function(t,a){function n(s){var o=i(s,t,e);return o&&o.length>=2}return a?n(a.split(";")[0]):n},Rs}var Gf=Wf();const Xf=gt(Gf),Kf={maxFileSize:null,minFileSize:null,maxTotalFileSize:null,maxNumberOfFiles:null,minNumberOfFiles:null,allowedFileTypes:null,requiredMetaFields:[]};class it extends Error{constructor(e,t){var a;super(e),this.isRestriction=!0,this.isUserFacing=(a=t?.isUserFacing)!=null?a:!0,t!=null&&t.file&&(this.file=t.file)}}class Yf{constructor(e,t){this.getI18n=t,this.getOpts=()=>{var a;const n=e();if(((a=n.restrictions)==null?void 0:a.allowedFileTypes)!=null&&!Array.isArray(n.restrictions.allowedFileTypes))throw new TypeError("`restrictions.allowedFileTypes` must be an array");return n}}validateAggregateRestrictions(e,t){const{maxTotalFileSize:a,maxNumberOfFiles:n}=this.getOpts().restrictions;if(n&&e.filter(o=>!o.isGhost).length+t.length>n)throw new it(`${this.getI18n()("youCanOnlyUploadX",{smart_count:n})}`);if(a){const s=[...e,...t].reduce((o,r)=>{var l;return o+((l=r.size)!=null?l:0)},0);if(s>a)throw new it(this.getI18n()("aggregateExceedsSize",{sizeAllowed:oi(a),size:oi(s)}))}}validateSingleFile(e){const{maxFileSize:t,minFileSize:a,allowedFileTypes:n}=this.getOpts().restrictions;if(n&&!n.some(o=>o.includes("/")?e.type?Xf(e.type.replace(/;.*?$/,""),o):!1:o[0]==="."&&e.extension?e.extension.toLowerCase()===o.slice(1).toLowerCase():!1)){const o=n.join(", ");throw new it(this.getI18n()("youCanOnlyUploadFileTypes",{types:o}),{file:e})}if(t&&e.size!=null&&e.size>t)throw new it(this.getI18n()("exceedsSize",{size:oi(t),file:e.name}),{file:e});if(a&&e.size!=null&&e.size<a)throw new it(this.getI18n()("inferiorSize",{size:oi(a)}),{file:e})}validate(e,t){t.forEach(a=>{this.validateSingleFile(a)}),this.validateAggregateRestrictions(e,t)}validateMinNumberOfFiles(e){const{minNumberOfFiles:t}=this.getOpts().restrictions;if(t&&Object.keys(e).length<t)throw new it(this.getI18n()("youHaveToAtLeastSelectX",{smart_count:t}))}getMissingRequiredMetaFields(e){const t=new it(this.getI18n()("missingRequiredMetaFieldOnFile",{fileName:e.name})),{requiredMetaFields:a}=this.getOpts().restrictions,n=[];for(const s of a)(!Object.hasOwn(e.meta,s)||e.meta[s]==="")&&n.push(s);return{missingFields:n,error:t}}}const Qf={strings:{addBulkFilesFailed:{0:"Failed to add %{smart_count} file due to an internal error",1:"Failed to add %{smart_count} files due to internal errors"},youCanOnlyUploadX:{0:"You can only upload %{smart_count} file",1:"You can only upload %{smart_count} files"},youHaveToAtLeastSelectX:{0:"You have to select at least %{smart_count} file",1:"You have to select at least %{smart_count} files"},aggregateExceedsSize:"You selected %{size} of files, but maximum allowed size is %{sizeAllowed}",exceedsSize:"%{file} exceeds maximum allowed size of %{size}",missingRequiredMetaField:"Missing required meta fields",missingRequiredMetaFieldOnFile:"Missing required meta fields in %{fileName}",inferiorSize:"This file is smaller than the allowed size of %{size}",youCanOnlyUploadFileTypes:"You can only upload: %{types}",noMoreFilesAllowed:"Cannot add more files",noDuplicates:"Cannot add the duplicate file '%{fileName}', it already exists",companionError:"Connection with Companion failed",authAborted:"Authentication aborted",companionUnauthorizeHint:"To unauthorize to your %{provider} account, please go to %{url}",failedToUpload:"Failed to upload %{file}",noInternetConnection:"No Internet connection",connectedToInternet:"Connected to the Internet",noFilesFound:"You have no files or folders here",noSearchResults:"Unfortunately, there are no results for this search",selectX:{0:"Select %{smart_count}",1:"Select %{smart_count}"},allFilesFromFolderNamed:"All files from folder %{name}",openFolderNamed:"Open folder %{name}",cancel:"Cancel",logOut:"Log out",filter:"Filter",resetFilter:"Reset filter",loading:"Loading...",loadedXFiles:"Loaded %{numFiles} files",authenticateWithTitle:"Please authenticate with %{pluginName} to select files",authenticateWith:"Connect to %{pluginName}",signInWithGoogle:"Sign in with Google",searchImages:"Search for images",enterTextToSearch:"Enter text to search for images",search:"Search",resetSearch:"Reset search",emptyFolderAdded:"No files were added from empty folder",addedNumFiles:"Added %{numFiles} file(s)",folderAlreadyAdded:'The folder "%{folder}" was already added',folderAdded:{0:"Added %{smart_count} file from %{folder}",1:"Added %{smart_count} files from %{folder}"},additionalRestrictionsFailed:"%{count} additional restrictions were not fulfilled",unnamed:"Unnamed"}};let up,pp;function M(i,e){if(!Object.prototype.hasOwnProperty.call(i,e))throw new TypeError("attempted to use private field on non-instance");return i}var Jf=0;function pe(i){return"__private_"+Jf+++"_"+i}const Zf={version:"3.13.1"},cn={totalProgress:0,allowNewUpload:!0,error:null,recoveredState:null};var xe=pe("plugins"),He=pe("restricter"),qi=pe("storeUnsubscribe"),yt=pe("emitter"),ii=pe("preProcessors"),ai=pe("uploaders"),It=pe("postProcessors"),qe=pe("informAndEmit"),Ua=pe("checkRequiredMetaFieldsOnFile"),Us=pe("checkRequiredMetaFields"),Vi=pe("assertNewUploadAllowed"),Lo=pe("transformFile"),Wi=pe("startIfAutoProceed"),Gi=pe("checkAndUpdateFileState"),Ms=pe("addListeners"),st=pe("updateOnlineStatus"),Xi=pe("requestClientById"),xt=pe("createUpload"),Bs=pe("getUpload"),ri=pe("removeUpload"),wt=pe("runUpload");up=Symbol.for("uppy test: getPlugins");pp=Symbol.for("uppy test: createUpload");let Br=class dp{constructor(e){Object.defineProperty(this,wt,{value:pm}),Object.defineProperty(this,ri,{value:um}),Object.defineProperty(this,Bs,{value:cm}),Object.defineProperty(this,xt,{value:lm}),Object.defineProperty(this,Ms,{value:rm}),Object.defineProperty(this,Gi,{value:om}),Object.defineProperty(this,Wi,{value:sm}),Object.defineProperty(this,Lo,{value:nm}),Object.defineProperty(this,Vi,{value:am}),Object.defineProperty(this,Us,{value:im}),Object.defineProperty(this,Ua,{value:tm}),Object.defineProperty(this,qe,{value:em}),Object.defineProperty(this,xe,{writable:!0,value:Object.create(null)}),Object.defineProperty(this,He,{writable:!0,value:void 0}),Object.defineProperty(this,qi,{writable:!0,value:void 0}),Object.defineProperty(this,yt,{writable:!0,value:Df()}),Object.defineProperty(this,ii,{writable:!0,value:new Set}),Object.defineProperty(this,ai,{writable:!0,value:new Set}),Object.defineProperty(this,It,{writable:!0,value:new Set}),this.scheduledAutoProceed=null,this.wasOffline=!1,this.calculateProgress=Zu((n,s)=>{const o=this.getFile(n?.id);if(n==null||!o){this.log(`Not setting progress for a file that has been removed: ${n?.id}`);return}if(o.progress.percentage===100){this.log(`Not setting progress for a file that has been already uploaded: ${n.id}`);return}const r=Number.isFinite(s.bytesTotal)&&s.bytesTotal>0;this.setFileState(n.id,{progress:{...o.progress,bytesUploaded:s.bytesUploaded,bytesTotal:s.bytesTotal,percentage:r?Math.round(s.bytesUploaded/s.bytesTotal*100):0}}),this.calculateTotalProgress()},500,{leading:!0,trailing:!0}),Object.defineProperty(this,st,{writable:!0,value:this.updateOnlineStatus.bind(this)}),Object.defineProperty(this,Xi,{writable:!0,value:new Map}),this.defaultLocale=Qf;const t={id:"uppy",autoProceed:!1,allowMultipleUploadBatches:!0,debug:!1,restrictions:Kf,meta:{},onBeforeFileAdded:(n,s)=>!Object.hasOwn(s,n.id),onBeforeUpload:n=>n,store:new rp,logger:jf,infoTimeout:5e3},a={...t,...e};this.opts={...a,restrictions:{...t.restrictions,...e&&e.restrictions}},e&&e.logger&&e.debug?this.log("You are using a custom `logger`, but also set `debug: true`, which uses built-in logger to output logs to console. Ignoring `debug: true` and using your custom `logger`.","warning"):e&&e.debug&&(this.opts.logger=$f),this.log(`Using Core v${dp.VERSION}`),this.i18nInit(),this.store=this.opts.store,this.setState({...cn,plugins:{},files:{},currentUploads:{},capabilities:{uploadProgress:Nf(),individualCancellation:!0,resumableUploads:!1},meta:{...this.opts.meta},info:[]}),M(this,He)[He]=new Yf(()=>this.opts,()=>this.i18n),M(this,qi)[qi]=this.store.subscribe((n,s,o)=>{this.emit("state-update",n,s,o),this.updateAll(s)}),this.opts.debug&&typeof window<"u"&&(window[this.opts.id]=this),M(this,Ms)[Ms]()}emit(e){for(var t=arguments.length,a=new Array(t>1?t-1:0),n=1;n<t;n++)a[n-1]=arguments[n];M(this,yt)[yt].emit(e,...a)}on(e,t){return M(this,yt)[yt].on(e,t),this}once(e,t){return M(this,yt)[yt].once(e,t),this}off(e,t){return M(this,yt)[yt].off(e,t),this}updateAll(e){this.iteratePlugins(t=>{t.update(e)})}setState(e){this.store.setState(e)}getState(){return this.store.getState()}patchFilesState(e){const t=this.getState().files;this.setState({files:{...t,...Object.fromEntries(Object.entries(e).map(a=>{let[n,s]=a;return[n,{...t[n],...s}]}))}})}setFileState(e,t){if(!this.getState().files[e])throw new Error(`Can’t set state for ${e} (the file could have been removed)`);this.patchFilesState({[e]:t})}i18nInit(){const e=a=>this.log(`Missing i18n string: ${a}`,"error"),t=new sp([this.defaultLocale,this.opts.locale],{onMissingKey:e});this.i18n=t.translate.bind(t),this.i18nArray=t.translateArray.bind(t),this.locale=t.locale}setOptions(e){this.opts={...this.opts,...e,restrictions:{...this.opts.restrictions,...e?.restrictions}},e.meta&&this.setMeta(e.meta),this.i18nInit(),e.locale&&this.iteratePlugins(t=>{t.setOptions(e)}),this.setState(void 0)}resetProgress(){const e={percentage:0,bytesUploaded:0,uploadComplete:!1,uploadStarted:null},t={...this.getState().files},a={};Object.keys(t).forEach(n=>{a[n]={...t[n],progress:{...t[n].progress,...e}}}),this.setState({files:a,...cn}),this.emit("reset-progress")}clearUploadedFiles(){const{capabilities:e,currentUploads:t}=this.getState();if(Object.keys(t).length>0&&!e.individualCancellation)throw new Error("The installed uploader plugin does not allow removing files during an upload.");this.setState({...cn,files:{}})}addPreProcessor(e){M(this,ii)[ii].add(e)}removePreProcessor(e){return M(this,ii)[ii].delete(e)}addPostProcessor(e){M(this,It)[It].add(e)}removePostProcessor(e){return M(this,It)[It].delete(e)}addUploader(e){M(this,ai)[ai].add(e)}removeUploader(e){return M(this,ai)[ai].delete(e)}setMeta(e){const t={...this.getState().meta,...e},a={...this.getState().files};Object.keys(a).forEach(n=>{a[n]={...a[n],meta:{...a[n].meta,...e}}}),this.log("Adding metadata:"),this.log(e),this.setState({meta:t,files:a})}setFileMeta(e,t){const a={...this.getState().files};if(!a[e]){this.log("Was trying to set metadata for a file that has been removed: ",e);return}const n={...a[e].meta,...t};a[e]={...a[e],meta:n},this.setState({files:a})}getFile(e){return this.getState().files[e]}getFiles(){const{files:e}=this.getState();return Object.values(e)}getFilesByIds(e){return e.map(t=>this.getFile(t))}getObjectOfFilesPerState(){const{files:e,totalProgress:t,error:a}=this.getState(),n=Object.values(e),s=[],o=[],r=[],l=[],c=[],p=[],u=[],f=[],x=[];for(const S of n){const{progress:C}=S;!C.uploadComplete&&C.uploadStarted&&(s.push(S),S.isPaused||f.push(S)),C.uploadStarted||o.push(S),(C.uploadStarted||C.preprocess||C.postprocess)&&r.push(S),C.uploadStarted&&l.push(S),S.isPaused&&c.push(S),C.uploadComplete&&p.push(S),S.error&&u.push(S),(C.preprocess||C.postprocess)&&x.push(S)}return{newFiles:o,startedFiles:r,uploadStartedFiles:l,pausedFiles:c,completeFiles:p,erroredFiles:u,inProgressFiles:s,inProgressNotPausedFiles:f,processingFiles:x,isUploadStarted:l.length>0,isAllComplete:t===100&&p.length===n.length&&x.length===0,isAllErrored:!!a&&u.length===n.length,isAllPaused:s.length!==0&&c.length===s.length,isUploadInProgress:s.length>0,isSomeGhost:n.some(S=>S.isGhost)}}validateRestrictions(e,t){t===void 0&&(t=this.getFiles());try{M(this,He)[He].validate(t,[e])}catch(a){return a}return null}checkIfFileAlreadyExists(e){const{files:t}=this.getState();return!!(t[e]&&!t[e].isGhost)}addFile(e){M(this,Vi)[Vi](e);const{nextFilesState:t,validFilesToAdd:a,errors:n}=M(this,Gi)[Gi]([e]),s=n.filter(r=>r.isRestriction);if(M(this,qe)[qe](s),n.length>0)throw n[0];this.setState({files:t});const[o]=a;return this.emit("file-added",o),this.emit("files-added",a),this.log(`Added file: ${o.name}, ${o.id}, mime type: ${o.type}`),M(this,Wi)[Wi](),o.id}addFiles(e){M(this,Vi)[Vi]();const{nextFilesState:t,validFilesToAdd:a,errors:n}=M(this,Gi)[Gi](e),s=n.filter(r=>r.isRestriction);M(this,qe)[qe](s);const o=n.filter(r=>!r.isRestriction);if(o.length>0){let r=`Multiple errors occurred while adding files:
|
|
3
3
|
`;if(o.forEach(l=>{r+=`
|
|
4
4
|
* ${l.message}`}),this.info({message:this.i18n("addBulkFilesFailed",{smart_count:o.length}),details:r},"error",this.opts.infoTimeout),typeof AggregateError=="function")throw new AggregateError(o,r);{const l=new Error(r);throw l.errors=o,l}}this.setState({files:t}),a.forEach(r=>{this.emit("file-added",r)}),this.emit("files-added",a),a.length>5?this.log(`Added batch of ${a.length} files`):Object.values(a).forEach(r=>{this.log(`Added file: ${r.name}
|
|
5
5
|
id: ${r.id}
|
|
@@ -46,5 +46,5 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
46
46
|
</div>
|
|
47
47
|
`,t.addEventListener("click",async()=>{await this.uppy.openPlugin("My Device")}),e.insertBefore(t,e.firstChild),this.addUploadItemFlag=!1}}},{wait:200});convertImgToObject=Qn(()=>{this.canConvertImgToObject&&(document.querySelectorAll("#uploaded img").forEach(t=>{if(!t?.src)return;const{src:a}=t,n=this.uploadedAPIData.files?.find(r=>r.previewUrl===a),s=document.createElement("div");s.style="width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; position: relative; ";const o=document.createElement("div");if(o.className="uppy-ProviderBrowserItem-name",o.style="pointer-events: none; position: absolute; bottom: 0; left: 0; right: 0; padding: 5px; background: #0000004d; color: #fff; ",o.innerHTML=Ph(n.originalname),[".mp4",".webm"].find(r=>t.src?.endsWith(r))){const r=document.createElement("video");r.src=t.src,r.width=t.width,r.height=t.height,r.autoplay=!0,r.setAttribute("playsinline","playsinline"),r.muted=!0,r.loop=!0,r.style="pointer-events: none;",s.appendChild(r)}else if([".pdf"].find(r=>t.src?.endsWith(r))){const r=document.createElement("div");r.className="pdf-icon",r.innerHTML=Mx,s.appendChild(r)}else{const r=document.createElement("object");r.data=a,r.type=n.mimetype||"image/png",r.alt=n.originalname,r.style="pointer-events: none; max-width: 100%; max-height: 100%; webkit-user-drag: none; object-fit: contain;",r.loading="lazy",s.appendChild(r)}s.appendChild(o),t.parentNode.replaceChild(s,t)}),this.canConvertImgToObject=!1)},{wait:200});update(){this.convertImgToObject(),this.addUploadItem()}onFirstRender(){}resetState=()=>{this.uploadedAPIData={...ku},this.uploaded.setPluginState({...Tu}),this.addUploadItemFlag=!0};install(){this.view=new Hr(this,{provider:{},viewType:"grid",showBreadcrumbs:!1,showFilter:!1}),this.uploaded=this.view.plugin,this.uploaded.setPluginState({...Tu}),this.uploaded.uppy.on("dashboard:show-panel",this.resetState),this.view.toggleCheckbox=(t,a)=>{const{currentSelection:n}=this.uploaded.getPluginState(),s=this.uploaded.uppy.opts.restrictions.maxNumberOfFiles,o=s?n.length<s:!0;n.find(r=>r._id===a._id)?this.uploaded.setPluginState({currentSelection:[...n.filter(r=>r._id!==a._id)]}):(o||n.pop(),this.uploaded.setPluginState({currentSelection:[...n,a]}))},this.view.donePicking=()=>{const{currentSelection:t}=this.uploaded.getPluginState();this.uppy.emit("uploaded:selected",t),this.uploaded.parent.hideAllPanels()},this.uploaded.uppy.validateRestrictions=()=>!1,this.view.handleScroll=t=>{const{scrollHeight:a,scrollTop:n,offsetHeight:s}=t.target;a-(n+s)<30&&this.queryUploadedFromMediaKit()};const{target:e}=this.opts;e&&this.mount(e,this)}uninstall(){this.unmount(),this.uploaded.uppy.off("dashboard:show-panel",this.resetState)}}const Eu={initialized:!1,data:[],files:[],pageSize:16,page:1,loading:!1,hasMore:!0,componentDid:"",components:[]},Du={authenticated:!0,files:[],folders:[],breadcrumbs:[],filterInput:"",isSearchVisible:!1,currentSelection:[],loading:!0,loadAllFiles:!0},Lx={padding:"5px 15px",marginRight:"8px",marginTop:"8px",borderRadius:"4px",cursor:"pointer",fontSize:"14px",lineHeight:"24.5px",fontWeight:"bold"};class Nx extends me{constructor(e,t){super(e,t),this.id=this.opts.id||"Resources",this.title=this.opts.title||"Resources",this.params=this.opts.params||{},this.type="acquirer",this.uppy=e,this.componentDid="",this.apiData={...Eu},this.icon=()=>le("svg",{t:"1700146012231",class:"icon",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"15673",width:"200",height:"200",children:[le("path",{d:"M403.2 130.133333h-187.733333c-46.933333 0-85.333333 38.4-85.333334 85.333334v187.733333c0 46.933333 38.4 85.333333 85.333334 85.333333h187.733333c46.933333 0 85.333333-38.4 85.333333-85.333333v-187.733333c0-49.066667-38.4-85.333333-85.333333-85.333334zM426.666667 390.4c0 19.2-17.066667 36.266667-36.266667 36.266667h-160c-21.333333 0-38.4-17.066667-38.4-36.266667v-162.133333c0-19.2 17.066667-36.266667 36.266667-36.266667h160c19.2 0 36.266667 17.066667 36.266666 36.266667v162.133333z",fill:"#0171F1","p-id":"15674"}),le("path",{d:"M808.533333 130.133333h-187.733333c-46.933333 0-85.333333 38.4-85.333333 85.333334v187.733333c0 46.933333 38.4 85.333333 85.333333 85.333333h187.733333c46.933333 0 85.333333-38.4 85.333334-85.333333v-187.733333c0-49.066667-36.266667-85.333333-85.333334-85.333334zM832 390.4c0 19.2-17.066667 36.266667-36.266667 36.266667h-160c-19.2 0-36.266667-17.066667-36.266666-36.266667v-162.133333c-2.133333-19.2 14.933333-36.266667 34.133333-36.266667h160c19.2 0 36.266667 17.066667 36.266667 36.266667v162.133333zM403.2 535.466667h-187.733333c-46.933333 0-85.333333 38.4-85.333334 85.333333V810.666667c0 46.933333 38.4 85.333333 85.333334 85.333333h187.733333c46.933333 0 85.333333-38.4 85.333333-85.333333v-189.866667c0-46.933333-38.4-85.333333-85.333333-85.333333zM426.666667 795.733333c0 21.333333-17.066667 36.266667-36.266667 36.266667h-162.133333c-21.333333 0-36.266667-17.066667-36.266667-36.266667v-162.133333c0-21.333333 17.066667-36.266667 36.266667-36.266667h162.133333c19.2 0 36.266667 17.066667 36.266667 36.266667v162.133333z",fill:"#55ABE5","p-id":"15675"}),le("path",{d:"M808.533333 535.466667h-187.733333c-46.933333 0-85.333333 38.4-85.333333 85.333333V810.666667c0 46.933333 38.4 85.333333 85.333333 85.333333h187.733333c46.933333 0 85.333333-38.4 85.333334-85.333333v-189.866667c0-46.933333-36.266667-85.333333-85.333334-85.333333zM832 795.733333c0 21.333333-17.066667 36.266667-36.266667 36.266667h-162.133333c-19.2 0-36.266667-17.066667-36.266667-36.266667v-162.133333c0-21.333333 17.066667-36.266667 36.266667-36.266667h162.133333c21.333333 0 36.266667 17.066667 36.266667 36.266667v162.133333z",fill:"#0171F1","p-id":"15676"})]})}render(e){return!this.apiData.loading&&!this.apiData.initialized&&this.queryResources(),le("div",{id:"resources",className:"uploaded",children:[le("div",{style:{padding:this.apiData.components.length?"12px":"0",display:"flex",flexWrap:"wrap",marginTop:"-8px"},children:this.apiData.components.map(t=>le("button",{className:this.apiData.componentDid===t.did?"button-color-style button-color-style-active":"button-color-style",style:Lx,id:t.componentDid,onClick:()=>{this.apiData.componentDid!==t.did&&(this.apiData.componentDid=t.did,this.queryResources())},children:Sf(t.name)}))}),this.view.render(e)]})}queryResources=async()=>{if(!this.apiData.loading){this.apiData.loading=!0;const{data:e}=await Ni.get("/api/resources",{params:{componentDid:this.apiData.componentDid}});this.apiData.loading=!1,this.apiData.initialized=!0,this.apiData.components=e.components||[],this.apiData.componentDid=e.componentDid||"",this.apiData.files=ip([...e.resources.map(t=>{let a="file";const{filename:n}=t,s=Qa(n,0,0,mt);return a=Qa(n,400,0,mt),{filename:n,_id:n,id:n,name:n,icon:a,previewUrl:a,fileUrl:s}})],"id"),this.resources.setPluginState({files:this.apiData.files,loading:!1})}};update(){}onFirstRender(){}resetState=()=>{this.apiData={...Eu},this.resources.setPluginState({...Du})};install(){this.view=new Hr(this,{provider:{},viewType:"grid",showBreadcrumbs:!1,showFilter:!1}),this.resources=this.view.plugin,this.resources.setPluginState({...Du}),this.resources.uppy.on("dashboard:show-panel",this.resetState),this.view.toggleCheckbox=(t,a)=>{const{currentSelection:n}=this.resources.getPluginState(),s=this.resources.uppy.opts.restrictions.maxNumberOfFiles,o=s?n.length<s:!0;n.find(r=>r.id===a.id)?this.resources.setPluginState({currentSelection:[...n.filter(r=>r.id!==a.id)]}):(o||n.pop(),this.resources.setPluginState({currentSelection:[...n,a]}))},this.resources.uppy.validateRestrictions=()=>!1,this.view.donePicking=()=>{const{currentSelection:t}=this.resources.getPluginState();this.uppy.emit("resources:selected",t),this.resources.parent.hideAllPanels()};const{target:e}=this.opts;e&&this.mount(e,this)}uninstall(){this.unmount(),this.resources.uppy.off("dashboard:show-panel",this.resetState)}}var Re=Uint8Array,Ci=Uint16Array,zx=Int32Array,kh=new Re([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),Th=new Re([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),jx=new Re([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Eh=function(i,e){for(var t=new Ci(31),a=0;a<31;++a)t[a]=e+=1<<i[a-1];for(var n=new zx(t[30]),a=1;a<30;++a)for(var s=t[a];s<t[a+1];++s)n[s]=s-t[a]<<5|a;return{b:t,r:n}},Dh=Eh(kh,2),Ah=Dh.b,$x=Dh.r;Ah[28]=258,$x[258]=28;var Hx=Eh(Th,0),qx=Hx.b,Fr=new Ci(32768);for(var ie=0;ie<32768;++ie){var Mt=(ie&43690)>>1|(ie&21845)<<1;Mt=(Mt&52428)>>2|(Mt&13107)<<2,Mt=(Mt&61680)>>4|(Mt&3855)<<4,Fr[ie]=((Mt&65280)>>8|(Mt&255)<<8)>>1}var Oa=(function(i,e,t){for(var a=i.length,n=0,s=new Ci(e);n<a;++n)i[n]&&++s[i[n]-1];var o=new Ci(e);for(n=1;n<e;++n)o[n]=o[n-1]+s[n-1]<<1;var r;if(t){r=new Ci(1<<e);var l=15-e;for(n=0;n<a;++n)if(i[n])for(var c=n<<4|i[n],p=e-i[n],u=o[i[n]-1]++<<p,f=u|(1<<p)-1;u<=f;++u)r[Fr[u]>>l]=c}else for(r=new Ci(a),n=0;n<a;++n)i[n]&&(r[n]=Fr[o[i[n]-1]++]>>15-i[n]);return r}),sn=new Re(288);for(var ie=0;ie<144;++ie)sn[ie]=8;for(var ie=144;ie<256;++ie)sn[ie]=9;for(var ie=256;ie<280;++ie)sn[ie]=7;for(var ie=280;ie<288;++ie)sn[ie]=8;var Ih=new Re(32);for(var ie=0;ie<32;++ie)Ih[ie]=5;var Vx=Oa(sn,9,1),Wx=Oa(Ih,5,1),Fo=function(i){for(var e=i[0],t=1;t<i.length;++t)i[t]>e&&(e=i[t]);return e},et=function(i,e,t){var a=e/8|0;return(i[a]|i[a+1]<<8)>>(e&7)&t},Po=function(i,e){var t=e/8|0;return(i[t]|i[t+1]<<8|i[t+2]<<16)>>(e&7)},Gx=function(i){return(i+7)/8|0},ml=function(i,e,t){return(e==null||e<0)&&(e=0),(t==null||t>i.length)&&(t=i.length),new Re(i.subarray(e,t))},Xx=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],Fe=function(i,e,t){var a=new Error(e||Xx[i]);if(a.code=i,Error.captureStackTrace&&Error.captureStackTrace(a,Fe),!t)throw a;return a},gl=function(i,e,t,a){var n=i.length,s=a?a.length:0;if(!n||e.f&&!e.l)return t||new Re(0);var o=!t,r=o||e.i!=2,l=e.i;o&&(t=new Re(n*3));var c=function(bt){var Pl=t.length;if(bt>Pl){var Cl=new Re(Math.max(Pl*2,bt));Cl.set(t),t=Cl}},p=e.f||0,u=e.p||0,f=e.b||0,x=e.l,S=e.d,C=e.m,w=e.n,y=n*8;do{if(!x){p=et(i,u,1);var b=et(i,u+1,3);if(u+=3,b)if(b==1)x=Vx,S=Wx,C=9,w=5;else if(b==2){var g=et(i,u,31)+257,k=et(i,u+10,15)+4,E=g+et(i,u+5,31)+1;u+=14;for(var A=new Re(E),N=new Re(19),z=0;z<k;++z)N[jx[z]]=et(i,u+z*3,7);u+=k*3;for(var j=Fo(N),O=(1<<j)-1,$=Oa(N,j,1),z=0;z<E;){var G=$[et(i,u,O)];u+=G&15;var h=G>>4;if(h<16)A[z++]=h;else{var _=0,P=0;for(h==16?(P=3+et(i,u,3),u+=2,_=A[z-1]):h==17?(P=3+et(i,u,7),u+=3):h==18&&(P=11+et(i,u,127),u+=7);P--;)A[z++]=_}}var F=A.subarray(0,g),T=A.subarray(g);C=Fo(F),w=Fo(T),x=Oa(F,C,1),S=Oa(T,w,1)}else Fe(1);else{var h=Gx(u)+4,m=i[h-4]|i[h-3]<<8,v=h+m;if(v>n){l&&Fe(0);break}r&&c(f+m),t.set(i.subarray(h,v),f),e.b=f+=m,e.p=u=v*8,e.f=p;continue}if(u>y){l&&Fe(0);break}}r&&c(f+131072);for(var I=(1<<C)-1,D=(1<<w)-1,U=u;;U=u){var _=x[Po(i,u)&I],V=_>>4;if(u+=_&15,u>y){l&&Fe(0);break}if(_||Fe(2),V<256)t[f++]=V;else if(V==256){U=u,x=null;break}else{var W=V-254;if(V>264){var z=V-257,Z=kh[z];W=et(i,u,(1<<Z)-1)+Ah[z],u+=Z}var te=S[Po(i,u)&D],Q=te>>4;te||Fe(3),u+=te&15;var T=qx[Q];if(Q>3){var Z=Th[Q];T+=Po(i,u)&(1<<Z)-1,u+=Z}if(u>y){l&&Fe(0);break}r&&c(f+131072);var Ye=f+W;if(f<T){var qt=s-T,ji=Math.min(T,Ye);for(qt+f<0&&Fe(3);f<ji;++f)t[f]=a[qt+f]}for(;f<Ye;++f)t[f]=t[f-T]}}e.l=x,e.p=U,e.b=f,e.f=p,x&&(p=1,e.m=C,e.d=S,e.n=w)}while(!p);return f!=t.length&&o?ml(t,0,f):t.subarray(0,f)},Kx=new Re(0),pt=function(i,e){return i[e]|i[e+1]<<8},ot=function(i,e){return(i[e]|i[e+1]<<8|i[e+2]<<16|i[e+3]<<24)>>>0},Co=function(i,e){return ot(i,e)+ot(i,e+4)*4294967296},Yx=function(i){(i[0]!=31||i[1]!=139||i[2]!=8)&&Fe(6,"invalid gzip data");var e=i[3],t=10;e&4&&(t+=(i[10]|i[11]<<8)+2);for(var a=(e>>3&1)+(e>>4&1);a>0;a-=!i[t++]);return t+(e&2)},Qx=function(i){var e=i.length;return(i[e-4]|i[e-3]<<8|i[e-2]<<16|i[e-1]<<24)>>>0},Jx=function(i,e){return((i[0]&15)!=8||i[0]>>4>7||(i[0]<<8|i[1])%31)&&Fe(6,"invalid zlib data"),(i[1]>>5&1)==+!e&&Fe(6,"invalid zlib data: "+(i[1]&32?"need":"unexpected")+" dictionary"),(i[1]>>3&4)+2};function Oh(i,e){return gl(i,{i:2},e&&e.out,e&&e.dictionary)}function Zx(i,e){var t=Yx(i);return t+8>i.length&&Fe(6,"invalid gzip data"),gl(i.subarray(t,-8),{i:2},e&&e.out||new Re(Qx(i)),e&&e.dictionary)}function ew(i,e){return gl(i.subarray(Jx(i,e&&e.dictionary),-4),{i:2},e&&e.out,e&&e.dictionary)}function _o(i,e){return i[0]==31&&i[1]==139&&i[2]==8?Zx(i,e):(i[0]&15)!=8||i[0]>>4>7||(i[0]<<8|i[1])%31?Oh(i,e):ew(i,e)}var Pr=typeof TextDecoder<"u"&&new TextDecoder,tw=0;try{Pr.decode(Kx,{stream:!0}),tw=1}catch{}var iw=function(i){for(var e="",t=0;;){var a=i[t++],n=(a>127)+(a>223)+(a>239);if(t+n>i.length)return{s:e,r:ml(i,t-1)};n?n==3?(a=((a&15)<<18|(i[t++]&63)<<12|(i[t++]&63)<<6|i[t++]&63)-65536,e+=String.fromCharCode(55296|a>>10,56320|a&1023)):n&1?e+=String.fromCharCode((a&31)<<6|i[t++]&63):e+=String.fromCharCode((a&15)<<12|(i[t++]&63)<<6|i[t++]&63):e+=String.fromCharCode(a)}};function aw(i,e){if(e){for(var t="",a=0;a<i.length;a+=16384)t+=String.fromCharCode.apply(null,i.subarray(a,a+16384));return t}else{if(Pr)return Pr.decode(i);var n=iw(i),s=n.s,t=n.r;return t.length&&Fe(8),s}}var nw=function(i,e){return e+30+pt(i,e+26)+pt(i,e+28)},sw=function(i,e,t){var a=pt(i,e+28),n=aw(i.subarray(e+46,e+46+a),!(pt(i,e+8)&2048)),s=e+46+a,o=ot(i,e+20),r=t&&o==4294967295?ow(i,s):[o,ot(i,e+24),ot(i,e+42)],l=r[0],c=r[1],p=r[2];return[pt(i,e+10),l,c,n,s+pt(i,e+30)+pt(i,e+32),p]},ow=function(i,e){for(;pt(i,e)!=1;e+=4+pt(i,e+2));return[Co(i,e+12),Co(i,e+4),Co(i,e+20)]};function rw(i,e){for(var t={},a=i.length-22;ot(i,a)!=101010256;--a)(!a||i.length-a>65558)&&Fe(13);var n=pt(i,a+8);if(!n)return{};var s=ot(i,a+16),o=s==4294967295||n==65535;if(o){var r=ot(i,a-12);o=ot(i,r)==101075792,o&&(n=ot(i,r+32),s=ot(i,r+48))}for(var l=e&&e.filter,c=0;c<n;++c){var p=sw(i,s,o),u=p[0],f=p[1],x=p[2],S=p[3],C=p[4],w=p[5],y=nw(i,w);s=C,(!l||l({name:S,size:f,originalSize:x,compression:u}))&&(u?u==8?t[S]=Oh(i.subarray(y,y+f),{out:new Re(x)}):Fe(14,"unknown compression type "+u):t[S]=ml(i,y,y+f))}return t}var ko={exports:{}},Au;function lw(){return Au||(Au=1,(function(i,e){(function(t){i.exports=t()})(function(t){var a=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];function n(y,b){var h=y[0],m=y[1],v=y[2],g=y[3];h+=(m&v|~m&g)+b[0]-680876936|0,h=(h<<7|h>>>25)+m|0,g+=(h&m|~h&v)+b[1]-389564586|0,g=(g<<12|g>>>20)+h|0,v+=(g&h|~g&m)+b[2]+606105819|0,v=(v<<17|v>>>15)+g|0,m+=(v&g|~v&h)+b[3]-1044525330|0,m=(m<<22|m>>>10)+v|0,h+=(m&v|~m&g)+b[4]-176418897|0,h=(h<<7|h>>>25)+m|0,g+=(h&m|~h&v)+b[5]+1200080426|0,g=(g<<12|g>>>20)+h|0,v+=(g&h|~g&m)+b[6]-1473231341|0,v=(v<<17|v>>>15)+g|0,m+=(v&g|~v&h)+b[7]-45705983|0,m=(m<<22|m>>>10)+v|0,h+=(m&v|~m&g)+b[8]+1770035416|0,h=(h<<7|h>>>25)+m|0,g+=(h&m|~h&v)+b[9]-1958414417|0,g=(g<<12|g>>>20)+h|0,v+=(g&h|~g&m)+b[10]-42063|0,v=(v<<17|v>>>15)+g|0,m+=(v&g|~v&h)+b[11]-1990404162|0,m=(m<<22|m>>>10)+v|0,h+=(m&v|~m&g)+b[12]+1804603682|0,h=(h<<7|h>>>25)+m|0,g+=(h&m|~h&v)+b[13]-40341101|0,g=(g<<12|g>>>20)+h|0,v+=(g&h|~g&m)+b[14]-1502002290|0,v=(v<<17|v>>>15)+g|0,m+=(v&g|~v&h)+b[15]+1236535329|0,m=(m<<22|m>>>10)+v|0,h+=(m&g|v&~g)+b[1]-165796510|0,h=(h<<5|h>>>27)+m|0,g+=(h&v|m&~v)+b[6]-1069501632|0,g=(g<<9|g>>>23)+h|0,v+=(g&m|h&~m)+b[11]+643717713|0,v=(v<<14|v>>>18)+g|0,m+=(v&h|g&~h)+b[0]-373897302|0,m=(m<<20|m>>>12)+v|0,h+=(m&g|v&~g)+b[5]-701558691|0,h=(h<<5|h>>>27)+m|0,g+=(h&v|m&~v)+b[10]+38016083|0,g=(g<<9|g>>>23)+h|0,v+=(g&m|h&~m)+b[15]-660478335|0,v=(v<<14|v>>>18)+g|0,m+=(v&h|g&~h)+b[4]-405537848|0,m=(m<<20|m>>>12)+v|0,h+=(m&g|v&~g)+b[9]+568446438|0,h=(h<<5|h>>>27)+m|0,g+=(h&v|m&~v)+b[14]-1019803690|0,g=(g<<9|g>>>23)+h|0,v+=(g&m|h&~m)+b[3]-187363961|0,v=(v<<14|v>>>18)+g|0,m+=(v&h|g&~h)+b[8]+1163531501|0,m=(m<<20|m>>>12)+v|0,h+=(m&g|v&~g)+b[13]-1444681467|0,h=(h<<5|h>>>27)+m|0,g+=(h&v|m&~v)+b[2]-51403784|0,g=(g<<9|g>>>23)+h|0,v+=(g&m|h&~m)+b[7]+1735328473|0,v=(v<<14|v>>>18)+g|0,m+=(v&h|g&~h)+b[12]-1926607734|0,m=(m<<20|m>>>12)+v|0,h+=(m^v^g)+b[5]-378558|0,h=(h<<4|h>>>28)+m|0,g+=(h^m^v)+b[8]-2022574463|0,g=(g<<11|g>>>21)+h|0,v+=(g^h^m)+b[11]+1839030562|0,v=(v<<16|v>>>16)+g|0,m+=(v^g^h)+b[14]-35309556|0,m=(m<<23|m>>>9)+v|0,h+=(m^v^g)+b[1]-1530992060|0,h=(h<<4|h>>>28)+m|0,g+=(h^m^v)+b[4]+1272893353|0,g=(g<<11|g>>>21)+h|0,v+=(g^h^m)+b[7]-155497632|0,v=(v<<16|v>>>16)+g|0,m+=(v^g^h)+b[10]-1094730640|0,m=(m<<23|m>>>9)+v|0,h+=(m^v^g)+b[13]+681279174|0,h=(h<<4|h>>>28)+m|0,g+=(h^m^v)+b[0]-358537222|0,g=(g<<11|g>>>21)+h|0,v+=(g^h^m)+b[3]-722521979|0,v=(v<<16|v>>>16)+g|0,m+=(v^g^h)+b[6]+76029189|0,m=(m<<23|m>>>9)+v|0,h+=(m^v^g)+b[9]-640364487|0,h=(h<<4|h>>>28)+m|0,g+=(h^m^v)+b[12]-421815835|0,g=(g<<11|g>>>21)+h|0,v+=(g^h^m)+b[15]+530742520|0,v=(v<<16|v>>>16)+g|0,m+=(v^g^h)+b[2]-995338651|0,m=(m<<23|m>>>9)+v|0,h+=(v^(m|~g))+b[0]-198630844|0,h=(h<<6|h>>>26)+m|0,g+=(m^(h|~v))+b[7]+1126891415|0,g=(g<<10|g>>>22)+h|0,v+=(h^(g|~m))+b[14]-1416354905|0,v=(v<<15|v>>>17)+g|0,m+=(g^(v|~h))+b[5]-57434055|0,m=(m<<21|m>>>11)+v|0,h+=(v^(m|~g))+b[12]+1700485571|0,h=(h<<6|h>>>26)+m|0,g+=(m^(h|~v))+b[3]-1894986606|0,g=(g<<10|g>>>22)+h|0,v+=(h^(g|~m))+b[10]-1051523|0,v=(v<<15|v>>>17)+g|0,m+=(g^(v|~h))+b[1]-2054922799|0,m=(m<<21|m>>>11)+v|0,h+=(v^(m|~g))+b[8]+1873313359|0,h=(h<<6|h>>>26)+m|0,g+=(m^(h|~v))+b[15]-30611744|0,g=(g<<10|g>>>22)+h|0,v+=(h^(g|~m))+b[6]-1560198380|0,v=(v<<15|v>>>17)+g|0,m+=(g^(v|~h))+b[13]+1309151649|0,m=(m<<21|m>>>11)+v|0,h+=(v^(m|~g))+b[4]-145523070|0,h=(h<<6|h>>>26)+m|0,g+=(m^(h|~v))+b[11]-1120210379|0,g=(g<<10|g>>>22)+h|0,v+=(h^(g|~m))+b[2]+718787259|0,v=(v<<15|v>>>17)+g|0,m+=(g^(v|~h))+b[9]-343485551|0,m=(m<<21|m>>>11)+v|0,y[0]=h+y[0]|0,y[1]=m+y[1]|0,y[2]=v+y[2]|0,y[3]=g+y[3]|0}function s(y){var b=[],h;for(h=0;h<64;h+=4)b[h>>2]=y.charCodeAt(h)+(y.charCodeAt(h+1)<<8)+(y.charCodeAt(h+2)<<16)+(y.charCodeAt(h+3)<<24);return b}function o(y){var b=[],h;for(h=0;h<64;h+=4)b[h>>2]=y[h]+(y[h+1]<<8)+(y[h+2]<<16)+(y[h+3]<<24);return b}function r(y){var b=y.length,h=[1732584193,-271733879,-1732584194,271733878],m,v,g,k,E,A;for(m=64;m<=b;m+=64)n(h,s(y.substring(m-64,m)));for(y=y.substring(m-64),v=y.length,g=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],m=0;m<v;m+=1)g[m>>2]|=y.charCodeAt(m)<<(m%4<<3);if(g[m>>2]|=128<<(m%4<<3),m>55)for(n(h,g),m=0;m<16;m+=1)g[m]=0;return k=b*8,k=k.toString(16).match(/(.*?)(.{0,8})$/),E=parseInt(k[2],16),A=parseInt(k[1],16)||0,g[14]=E,g[15]=A,n(h,g),h}function l(y){var b=y.length,h=[1732584193,-271733879,-1732584194,271733878],m,v,g,k,E,A;for(m=64;m<=b;m+=64)n(h,o(y.subarray(m-64,m)));for(y=m-64<b?y.subarray(m-64):new Uint8Array(0),v=y.length,g=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],m=0;m<v;m+=1)g[m>>2]|=y[m]<<(m%4<<3);if(g[m>>2]|=128<<(m%4<<3),m>55)for(n(h,g),m=0;m<16;m+=1)g[m]=0;return k=b*8,k=k.toString(16).match(/(.*?)(.{0,8})$/),E=parseInt(k[2],16),A=parseInt(k[1],16)||0,g[14]=E,g[15]=A,n(h,g),h}function c(y){var b="",h;for(h=0;h<4;h+=1)b+=a[y>>h*8+4&15]+a[y>>h*8&15];return b}function p(y){var b;for(b=0;b<y.length;b+=1)y[b]=c(y[b]);return y.join("")}p(r("hello")),typeof ArrayBuffer<"u"&&!ArrayBuffer.prototype.slice&&(function(){function y(b,h){return b=b|0||0,b<0?Math.max(b+h,0):Math.min(b,h)}ArrayBuffer.prototype.slice=function(b,h){var m=this.byteLength,v=y(b,m),g=m,k,E,A,N;return h!==t&&(g=y(h,m)),v>g?new ArrayBuffer(0):(k=g-v,E=new ArrayBuffer(k),A=new Uint8Array(E),N=new Uint8Array(this,v,k),A.set(N),E)}})();function u(y){return/[\u0080-\uFFFF]/.test(y)&&(y=unescape(encodeURIComponent(y))),y}function f(y,b){var h=y.length,m=new ArrayBuffer(h),v=new Uint8Array(m),g;for(g=0;g<h;g+=1)v[g]=y.charCodeAt(g);return b?v:m}function x(y){return String.fromCharCode.apply(null,new Uint8Array(y))}function S(y,b,h){var m=new Uint8Array(y.byteLength+b.byteLength);return m.set(new Uint8Array(y)),m.set(new Uint8Array(b),y.byteLength),m}function C(y){var b=[],h=y.length,m;for(m=0;m<h-1;m+=2)b.push(parseInt(y.substr(m,2),16));return String.fromCharCode.apply(String,b)}function w(){this.reset()}return w.prototype.append=function(y){return this.appendBinary(u(y)),this},w.prototype.appendBinary=function(y){this._buff+=y,this._length+=y.length;var b=this._buff.length,h;for(h=64;h<=b;h+=64)n(this._hash,s(this._buff.substring(h-64,h)));return this._buff=this._buff.substring(h-64),this},w.prototype.end=function(y){var b=this._buff,h=b.length,m,v=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],g;for(m=0;m<h;m+=1)v[m>>2]|=b.charCodeAt(m)<<(m%4<<3);return this._finish(v,h),g=p(this._hash),y&&(g=C(g)),this.reset(),g},w.prototype.reset=function(){return this._buff="",this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},w.prototype.getState=function(){return{buff:this._buff,length:this._length,hash:this._hash.slice()}},w.prototype.setState=function(y){return this._buff=y.buff,this._length=y.length,this._hash=y.hash,this},w.prototype.destroy=function(){delete this._hash,delete this._buff,delete this._length},w.prototype._finish=function(y,b){var h=b,m,v,g;if(y[h>>2]|=128<<(h%4<<3),h>55)for(n(this._hash,y),h=0;h<16;h+=1)y[h]=0;m=this._length*8,m=m.toString(16).match(/(.*?)(.{0,8})$/),v=parseInt(m[2],16),g=parseInt(m[1],16)||0,y[14]=v,y[15]=g,n(this._hash,y)},w.hash=function(y,b){return w.hashBinary(u(y),b)},w.hashBinary=function(y,b){var h=r(y),m=p(h);return b?C(m):m},w.ArrayBuffer=function(){this.reset()},w.ArrayBuffer.prototype.append=function(y){var b=S(this._buff.buffer,y),h=b.length,m;for(this._length+=y.byteLength,m=64;m<=h;m+=64)n(this._hash,o(b.subarray(m-64,m)));return this._buff=m-64<h?new Uint8Array(b.buffer.slice(m-64)):new Uint8Array(0),this},w.ArrayBuffer.prototype.end=function(y){var b=this._buff,h=b.length,m=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],v,g;for(v=0;v<h;v+=1)m[v>>2]|=b[v]<<(v%4<<3);return this._finish(m,h),g=p(this._hash),y&&(g=C(g)),this.reset(),g},w.ArrayBuffer.prototype.reset=function(){return this._buff=new Uint8Array(0),this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},w.ArrayBuffer.prototype.getState=function(){var y=w.prototype.getState.call(this);return y.buff=x(y.buff),y},w.ArrayBuffer.prototype.setState=function(y){return y.buff=f(y.buff,!0),w.prototype.setState.call(this,y)},w.ArrayBuffer.prototype.destroy=w.prototype.destroy,w.ArrayBuffer.prototype._finish=w.prototype._finish,w.ArrayBuffer.hash=function(y,b){var h=l(new Uint8Array(y)),m=p(h);return b?C(m):m},w})})(ko)),ko.exports}var cw=lw();const uw=gt(cw);var Ss=typeof self<"u"?self:gs;const Ja=typeof navigator<"u",pw=Ja&&typeof HTMLImageElement>"u",ps=!(typeof gs>"u"||typeof _i>"u"||!_i.versions||!_i.versions.node),vl=Ss.Buffer,Cn=Ss.BigInt,bl=!!vl,dw=i=>i;function ds(i,e=dw){if(ps)try{return typeof require=="function"?Promise.resolve(e(require(i))):import(i).then(e)}catch{console.warn(`Couldn't load ${i}`)}}let yl=Ss.fetch;const hw=i=>yl=i;if(!Ss.fetch){const i=ds("http",(a=>a)),e=ds("https",(a=>a)),t=(a,{headers:n}={})=>new Promise((async(s,o)=>{let{port:r,hostname:l,pathname:c,protocol:p,search:u}=new URL(a);const f={method:"GET",hostname:l,path:encodeURI(c)+u,headers:n};r!==""&&(f.port=Number(r));const x=(p==="https:"?await e:await i).request(f,(S=>{if(S.statusCode===301||S.statusCode===302){let C=new URL(S.headers.location,a).toString();return t(C,{headers:n}).then(s).catch(o)}s({status:S.statusCode,arrayBuffer:()=>new Promise((C=>{let w=[];S.on("data",(y=>w.push(y))),S.on("end",(()=>C(vt.concat(w))))}))})}));x.on("error",o),x.end()}));hw(t)}function q(i,e,t){return e in i?Object.defineProperty(i,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):i[e]=t,i}const hs=i=>Rh(i)?void 0:i,fw=i=>i!==void 0;function Rh(i){return i===void 0||(i instanceof Map?i.size===0:Object.values(i).filter(fw).length===0)}function fe(i){let e=new Error(i);throw delete e.stack,e}function ci(i){return(i=(function(e){for(;e.endsWith("\0");)e=e.slice(0,-1);return e})(i).trim())===""?void 0:i}function Cr(i){let e=(function(t){let a=0;return t.ifd0.enabled&&(a+=1024),t.exif.enabled&&(a+=2048),t.makerNote&&(a+=2048),t.userComment&&(a+=1024),t.gps.enabled&&(a+=512),t.interop.enabled&&(a+=100),t.ifd1.enabled&&(a+=1024),a+2048})(i);return i.jfif.enabled&&(e+=50),i.xmp.enabled&&(e+=2e4),i.iptc.enabled&&(e+=14e3),i.icc.enabled&&(e+=6e3),e}const _r=i=>String.fromCharCode.apply(null,i),Iu=typeof TextDecoder<"u"?new TextDecoder("utf-8"):void 0;function Uh(i){return Iu?Iu.decode(i):bl?vt.from(i).toString("utf8"):decodeURIComponent(escape(_r(i)))}class Ue{static from(e,t){return e instanceof this&&e.le===t?e:new Ue(e,void 0,void 0,t)}constructor(e,t=0,a,n){if(typeof n=="boolean"&&(this.le=n),Array.isArray(e)&&(e=new Uint8Array(e)),e===0)this.byteOffset=0,this.byteLength=0;else if(e instanceof ArrayBuffer){a===void 0&&(a=e.byteLength-t);let s=new DataView(e,t,a);this._swapDataView(s)}else if(e instanceof Uint8Array||e instanceof DataView||e instanceof Ue){a===void 0&&(a=e.byteLength-t),(t+=e.byteOffset)+a>e.byteOffset+e.byteLength&&fe("Creating view outside of available memory in ArrayBuffer");let s=new DataView(e.buffer,t,a);this._swapDataView(s)}else if(typeof e=="number"){let s=new DataView(new ArrayBuffer(e));this._swapDataView(s)}else fe("Invalid input argument for BufferView: "+e)}_swapArrayBuffer(e){this._swapDataView(new DataView(e))}_swapBuffer(e){this._swapDataView(new DataView(e.buffer,e.byteOffset,e.byteLength))}_swapDataView(e){this.dataView=e,this.buffer=e.buffer,this.byteOffset=e.byteOffset,this.byteLength=e.byteLength}_lengthToEnd(e){return this.byteLength-e}set(e,t,a=Ue){return e instanceof DataView||e instanceof Ue?e=new Uint8Array(e.buffer,e.byteOffset,e.byteLength):e instanceof ArrayBuffer&&(e=new Uint8Array(e)),e instanceof Uint8Array||fe("BufferView.set(): Invalid data argument."),this.toUint8().set(e,t),new a(this,t,e.byteLength)}subarray(e,t){return t=t||this._lengthToEnd(e),new Ue(this,e,t)}toUint8(){return new Uint8Array(this.buffer,this.byteOffset,this.byteLength)}getUint8Array(e,t){return new Uint8Array(this.buffer,this.byteOffset+e,t)}getString(e=0,t=this.byteLength){return Uh(this.getUint8Array(e,t))}getLatin1String(e=0,t=this.byteLength){let a=this.getUint8Array(e,t);return _r(a)}getUnicodeString(e=0,t=this.byteLength){const a=[];for(let n=0;n<t&&e+n<this.byteLength;n+=2)a.push(this.getUint16(e+n));return _r(a)}getInt8(e){return this.dataView.getInt8(e)}getUint8(e){return this.dataView.getUint8(e)}getInt16(e,t=this.le){return this.dataView.getInt16(e,t)}getInt32(e,t=this.le){return this.dataView.getInt32(e,t)}getUint16(e,t=this.le){return this.dataView.getUint16(e,t)}getUint32(e,t=this.le){return this.dataView.getUint32(e,t)}getFloat32(e,t=this.le){return this.dataView.getFloat32(e,t)}getFloat64(e,t=this.le){return this.dataView.getFloat64(e,t)}getFloat(e,t=this.le){return this.dataView.getFloat32(e,t)}getDouble(e,t=this.le){return this.dataView.getFloat64(e,t)}getUintBytes(e,t,a){switch(t){case 1:return this.getUint8(e,a);case 2:return this.getUint16(e,a);case 4:return this.getUint32(e,a);case 8:return this.getUint64&&this.getUint64(e,a)}}getUint(e,t,a){switch(t){case 8:return this.getUint8(e,a);case 16:return this.getUint16(e,a);case 32:return this.getUint32(e,a);case 64:return this.getUint64&&this.getUint64(e,a)}}toString(e){return this.dataView.toString(e,this.constructor.name)}ensureChunk(){}}function kr(i,e){fe(`${i} '${e}' was not loaded, try using full build of exifr.`)}class xl extends Map{constructor(e){super(),this.kind=e}get(e,t){return this.has(e)||kr(this.kind,e),t&&(e in t||(function(a,n){fe(`Unknown ${a} '${n}'.`)})(this.kind,e),t[e].enabled||kr(this.kind,e)),super.get(e)}keyList(){return Array.from(this.keys())}}var Ui=new xl("file parser"),Pe=new xl("segment parser"),zi=new xl("file reader");function mw(i,e){return typeof i=="string"?Ou(i,e):Ja&&!pw&&i instanceof HTMLImageElement?Ou(i.src,e):i instanceof Uint8Array||i instanceof ArrayBuffer||i instanceof DataView?new Ue(i):Ja&&i instanceof Blob?Tr(i,e,"blob",Ar):void fe("Invalid input argument")}function Ou(i,e){return(t=i).startsWith("data:")||t.length>1e4?Er(i,e,"base64"):ps&&i.includes("://")?Tr(i,e,"url",Dr):ps?Er(i,e,"fs"):Ja?Tr(i,e,"url",Dr):void fe("Invalid input argument");var t}async function Tr(i,e,t,a){return zi.has(t)?Er(i,e,t):a?(async function(n,s){let o=await s(n);return new Ue(o)})(i,a):void fe(`Parser ${t} is not loaded`)}async function Er(i,e,t){let a=new(zi.get(t))(i,e);return await a.read(),a}const Dr=i=>yl(i).then((e=>e.arrayBuffer())),Ar=i=>new Promise(((e,t)=>{let a=new FileReader;a.onloadend=()=>e(a.result||new ArrayBuffer),a.onerror=t,a.readAsArrayBuffer(i)}));class gw extends Map{get tagKeys(){return this.allKeys||(this.allKeys=Array.from(this.keys())),this.allKeys}get tagValues(){return this.allValues||(this.allValues=Array.from(this.values())),this.allValues}}function Se(i,e,t){let a=new gw;for(let[n,s]of t)a.set(n,s);if(Array.isArray(e))for(let n of e)i.set(n,a);else i.set(e,a);return a}function Ir(i,e,t){let a,n=i.get(e);for(a of t)n.set(a[0],a[1])}const Me=new Map,fi=new Map,Kn=new Map,_n=["chunked","firstChunkSize","firstChunkSizeNode","firstChunkSizeBrowser","chunkSize","chunkLimit"],Mh=["jfif","xmp","icc","iptc","ihdr"],Or=["tiff",...Mh],ve=["ifd0","ifd1","exif","gps","interop"],kn=[...Or,...ve],Tn=["makerNote","userComment"],Bh=["translateKeys","translateValues","reviveValues","multiSegment"],En=[...Bh,"sanitize","mergeOutput","silentErrors"];class Lh{get translate(){return this.translateKeys||this.translateValues||this.reviveValues}}class ha extends Lh{get needed(){return this.enabled||this.deps.size>0}constructor(e,t,a,n){if(super(),q(this,"enabled",!1),q(this,"skip",new Set),q(this,"pick",new Set),q(this,"deps",new Set),q(this,"translateKeys",!1),q(this,"translateValues",!1),q(this,"reviveValues",!1),this.key=e,this.enabled=t,this.parse=this.enabled,this.applyInheritables(n),this.canBeFiltered=ve.includes(e),this.canBeFiltered&&(this.dict=Me.get(e)),a!==void 0)if(Array.isArray(a))this.parse=this.enabled=!0,this.canBeFiltered&&a.length>0&&this.translateTagSet(a,this.pick);else if(typeof a=="object"){if(this.enabled=!0,this.parse=a.parse!==!1,this.canBeFiltered){let{pick:s,skip:o}=a;s&&s.length>0&&this.translateTagSet(s,this.pick),o&&o.length>0&&this.translateTagSet(o,this.skip)}this.applyInheritables(a)}else a===!0||a===!1?this.parse=this.enabled=a:fe(`Invalid options argument: ${a}`)}applyInheritables(e){let t,a;for(t of Bh)a=e[t],a!==void 0&&(this[t]=a)}translateTagSet(e,t){if(this.dict){let a,n,{tagKeys:s,tagValues:o}=this.dict;for(a of e)typeof a=="string"?(n=o.indexOf(a),n===-1&&(n=s.indexOf(Number(a))),n!==-1&&t.add(Number(s[n]))):t.add(a)}else for(let a of e)t.add(a)}finalizeFilters(){!this.enabled&&this.deps.size>0?(this.enabled=!0,fs(this.pick,this.deps)):this.enabled&&this.pick.size>0&&fs(this.pick,this.deps)}}var Te={jfif:!1,tiff:!0,xmp:!1,icc:!1,iptc:!1,ifd0:!0,ifd1:!1,exif:!0,gps:!0,interop:!1,ihdr:void 0,makerNote:!1,userComment:!1,multiSegment:!1,skip:[],pick:[],translateKeys:!0,translateValues:!0,reviveValues:!0,sanitize:!0,mergeOutput:!0,silentErrors:!0,chunked:!0,firstChunkSize:void 0,firstChunkSizeNode:512,firstChunkSizeBrowser:65536,chunkSize:65536,chunkLimit:5},Ru=new Map;class wl extends Lh{static useCached(e){let t=Ru.get(e);return t!==void 0||(t=new this(e),Ru.set(e,t)),t}constructor(e){super(),e===!0?this.setupFromTrue():e===void 0?this.setupFromUndefined():Array.isArray(e)?this.setupFromArray(e):typeof e=="object"?this.setupFromObject(e):fe(`Invalid options argument ${e}`),this.firstChunkSize===void 0&&(this.firstChunkSize=Ja?this.firstChunkSizeBrowser:this.firstChunkSizeNode),this.mergeOutput&&(this.ifd1.enabled=!1),this.filterNestedSegmentTags(),this.traverseTiffDependencyTree(),this.checkLoadedPlugins()}setupFromUndefined(){let e;for(e of _n)this[e]=Te[e];for(e of En)this[e]=Te[e];for(e of Tn)this[e]=Te[e];for(e of kn)this[e]=new ha(e,Te[e],void 0,this)}setupFromTrue(){let e;for(e of _n)this[e]=Te[e];for(e of En)this[e]=Te[e];for(e of Tn)this[e]=!0;for(e of kn)this[e]=new ha(e,!0,void 0,this)}setupFromArray(e){let t;for(t of _n)this[t]=Te[t];for(t of En)this[t]=Te[t];for(t of Tn)this[t]=Te[t];for(t of kn)this[t]=new ha(t,!1,void 0,this);this.setupGlobalFilters(e,void 0,ve)}setupFromObject(e){let t;for(t of(ve.ifd0=ve.ifd0||ve.image,ve.ifd1=ve.ifd1||ve.thumbnail,Object.assign(this,e),_n))this[t]=To(e[t],Te[t]);for(t of En)this[t]=To(e[t],Te[t]);for(t of Tn)this[t]=To(e[t],Te[t]);for(t of Or)this[t]=new ha(t,Te[t],e[t],this);for(t of ve)this[t]=new ha(t,Te[t],e[t],this.tiff);this.setupGlobalFilters(e.pick,e.skip,ve,kn),e.tiff===!0?this.batchEnableWithBool(ve,!0):e.tiff===!1?this.batchEnableWithUserValue(ve,e):Array.isArray(e.tiff)?this.setupGlobalFilters(e.tiff,void 0,ve):typeof e.tiff=="object"&&this.setupGlobalFilters(e.tiff.pick,e.tiff.skip,ve)}batchEnableWithBool(e,t){for(let a of e)this[a].enabled=t}batchEnableWithUserValue(e,t){for(let a of e){let n=t[a];this[a].enabled=n!==!1&&n!==void 0}}setupGlobalFilters(e,t,a,n=a){if(e&&e.length){for(let o of n)this[o].enabled=!1;let s=Uu(e,a);for(let[o,r]of s)fs(this[o].pick,r),this[o].enabled=!0}else if(t&&t.length){let s=Uu(t,a);for(let[o,r]of s)fs(this[o].skip,r)}}filterNestedSegmentTags(){let{ifd0:e,exif:t,xmp:a,iptc:n,icc:s}=this;this.makerNote?t.deps.add(37500):t.skip.add(37500),this.userComment?t.deps.add(37510):t.skip.add(37510),a.enabled||e.skip.add(700),n.enabled||e.skip.add(33723),s.enabled||e.skip.add(34675)}traverseTiffDependencyTree(){let{ifd0:e,exif:t,gps:a,interop:n}=this;n.needed&&(t.deps.add(40965),e.deps.add(40965)),t.needed&&e.deps.add(34665),a.needed&&e.deps.add(34853),this.tiff.enabled=ve.some((s=>this[s].enabled===!0))||this.makerNote||this.userComment;for(let s of ve)this[s].finalizeFilters()}get onlyTiff(){return!Mh.map((e=>this[e].enabled)).some((e=>e===!0))&&this.tiff.enabled}checkLoadedPlugins(){for(let e of Or)this[e].enabled&&!Pe.has(e)&&kr("segment parser",e)}}function Uu(i,e){let t,a,n,s,o=[];for(n of e){for(s of(t=Me.get(n),a=[],t))(i.includes(s[0])||i.includes(s[1]))&&a.push(s[0]);a.length&&o.push([n,a])}return o}function To(i,e){return i!==void 0?i:e!==void 0?e:void 0}function fs(i,e){for(let t of e)i.add(t)}q(wl,"default",Te);class vw{constructor(e){q(this,"parsers",{}),q(this,"output",{}),q(this,"errors",[]),q(this,"pushToErrors",(t=>this.errors.push(t))),this.options=wl.useCached(e)}async read(e){this.file=await mw(e,this.options)}setup(){if(this.fileParser)return;let{file:e}=this,t=e.getUint16(0);for(let[a,n]of Ui)if(n.canHandle(e,t))return this.fileParser=new n(this.options,this.file,this.parsers),e[a]=!0;this.file.close&&this.file.close(),fe("Unknown file format")}async parse(){let{output:e,errors:t}=this;return this.setup(),this.options.silentErrors?(await this.executeParsers().catch(this.pushToErrors),t.push(...this.fileParser.errors)):await this.executeParsers(),this.file.close&&this.file.close(),this.options.silentErrors&&t.length>0&&(e.errors=t),hs(e)}async executeParsers(){let{output:e}=this;await this.fileParser.parse();let t=Object.values(this.parsers).map((async a=>{let n=await a.parse();a.assignToOutput(e,n)}));this.options.silentErrors&&(t=t.map((a=>a.catch(this.pushToErrors)))),await Promise.all(t)}async extractThumbnail(){this.setup();let{options:e,file:t}=this,a=Pe.get("tiff",e);var n;if(t.tiff?n={start:0,type:"tiff"}:t.jpeg&&(n=await this.fileParser.getOrFindSegment("tiff")),n===void 0)return;let s=await this.fileParser.ensureSegmentChunk(n),o=this.parsers.tiff=new a(s,e,t),r=await o.extractThumbnail();return t.close&&t.close(),r}}class Fs{constructor(e,t,a){q(this,"errors",[]),q(this,"ensureSegmentChunk",(async n=>{let s=n.start,o=n.size||65536;if(this.file.chunked)if(this.file.available(s,o))n.chunk=this.file.subarray(s,o);else try{n.chunk=await this.file.readChunk(s,o)}catch(r){fe(`Couldn't read segment: ${JSON.stringify(n)}. ${r.message}`)}else this.file.byteLength>s+o?n.chunk=this.file.subarray(s,o):n.size===void 0?n.chunk=this.file.subarray(s):fe("Segment unreachable: "+JSON.stringify(n));return n.chunk})),this.extendOptions&&this.extendOptions(e),this.options=e,this.file=t,this.parsers=a}injectSegment(e,t){this.options[e].enabled&&this.createParser(e,t)}createParser(e,t){let a=new(Pe.get(e))(t,this.options,this.file);return this.parsers[e]=a}createParsers(e){for(let t of e){let{type:a,chunk:n}=t,s=this.options[a];if(s&&s.enabled){let o=this.parsers[a];o&&o.append||o||this.createParser(a,n)}}}async readSegments(e){let t=e.map(this.ensureSegmentChunk);await Promise.all(t)}}class rt{static findPosition(e,t){let a=e.getUint16(t+2)+2,n=typeof this.headerLength=="function"?this.headerLength(e,t,a):this.headerLength,s=t+n,o=a-n;return{offset:t,length:a,headerLength:n,start:s,size:o,end:s+o}}static parse(e,t={}){return new this(e,new wl({[this.type]:t}),e).parse()}normalizeInput(e){return e instanceof Ue?e:new Ue(e)}constructor(e,t={},a){q(this,"errors",[]),q(this,"raw",new Map),q(this,"handleError",(n=>{if(!this.options.silentErrors)throw n;this.errors.push(n.message)})),this.chunk=this.normalizeInput(e),this.file=a,this.type=this.constructor.type,this.globalOptions=this.options=t,this.localOptions=t[this.type],this.canTranslate=this.localOptions&&this.localOptions.translate}translate(){this.canTranslate&&(this.translated=this.translateBlock(this.raw,this.type))}get output(){return this.translated?this.translated:this.raw?Object.fromEntries(this.raw):void 0}translateBlock(e,t){let a=Kn.get(t),n=fi.get(t),s=Me.get(t),o=this.options[t],r=o.reviveValues&&!!a,l=o.translateValues&&!!n,c=o.translateKeys&&!!s,p={};for(let[u,f]of e)r&&a.has(u)?f=a.get(u)(f):l&&n.has(u)&&(f=this.translateValue(f,n.get(u))),c&&s.has(u)&&(u=s.get(u)||u),p[u]=f;return p}translateValue(e,t){return t[e]||t.DEFAULT||e}assignToOutput(e,t){this.assignObjectToOutput(e,this.constructor.type,t)}assignObjectToOutput(e,t,a){if(this.globalOptions.mergeOutput)return Object.assign(e,a);e[t]?Object.assign(e[t],a):e[t]=a}}q(rt,"headerLength",4),q(rt,"type",void 0),q(rt,"multiSegment",!1),q(rt,"canHandle",(()=>!1));function bw(i){return i===192||i===194||i===196||i===219||i===221||i===218||i===254}function yw(i){return i>=224&&i<=239}function xw(i,e,t){for(let[a,n]of Pe)if(n.canHandle(i,e,t))return a}class Mu extends Fs{constructor(...e){super(...e),q(this,"appSegments",[]),q(this,"jpegSegments",[]),q(this,"unknownSegments",[])}static canHandle(e,t){return t===65496}async parse(){await this.findAppSegments(),await this.readSegments(this.appSegments),this.mergeMultiSegments(),this.createParsers(this.mergedAppSegments||this.appSegments)}setupSegmentFinderArgs(e){e===!0?(this.findAll=!0,this.wanted=new Set(Pe.keyList())):(e=e===void 0?Pe.keyList().filter((t=>this.options[t].enabled)):e.filter((t=>this.options[t].enabled&&Pe.has(t))),this.findAll=!1,this.remaining=new Set(e),this.wanted=new Set(e)),this.unfinishedMultiSegment=!1}async findAppSegments(e=0,t){this.setupSegmentFinderArgs(t);let{file:a,findAll:n,wanted:s,remaining:o}=this;if(!n&&this.file.chunked&&(n=Array.from(s).some((r=>{let l=Pe.get(r),c=this.options[r];return l.multiSegment&&c.multiSegment})),n&&await this.file.readWhole()),e=this.findAppSegmentsInRange(e,a.byteLength),!this.options.onlyTiff&&a.chunked){let r=!1;for(;o.size>0&&!r&&(a.canReadNextChunk||this.unfinishedMultiSegment);){let{nextChunkOffset:l}=a,c=this.appSegments.some((p=>!this.file.available(p.offset||p.start,p.length||p.size)));if(r=e>l&&!c?!await a.readNextChunk(e):!await a.readNextChunk(l),(e=this.findAppSegmentsInRange(e,a.byteLength))===void 0)return}}}findAppSegmentsInRange(e,t){t-=2;let a,n,s,o,r,l,{file:c,findAll:p,wanted:u,remaining:f,options:x}=this;for(;e<t;e++)if(c.getUint8(e)===255){if(a=c.getUint8(e+1),yw(a)){if(n=c.getUint16(e+2),s=xw(c,e,n),s&&u.has(s)&&(o=Pe.get(s),r=o.findPosition(c,e),l=x[s],r.type=s,this.appSegments.push(r),!p&&(o.multiSegment&&l.multiSegment?(this.unfinishedMultiSegment=r.chunkNumber<r.chunkCount,this.unfinishedMultiSegment||f.delete(s)):f.delete(s),f.size===0)))break;x.recordUnknownSegments&&(r=rt.findPosition(c,e),r.marker=a,this.unknownSegments.push(r)),e+=n+1}else if(bw(a)){if(n=c.getUint16(e+2),a===218&&x.stopAfterSos!==!1)return;x.recordJpegSegments&&this.jpegSegments.push({offset:e,length:n,marker:a}),e+=n+1}}return e}mergeMultiSegments(){if(!this.appSegments.some((t=>t.multiSegment)))return;let e=(function(t,a){let n,s,o,r=new Map;for(let l=0;l<t.length;l++)n=t[l],s=n[a],r.has(s)?o=r.get(s):r.set(s,o=[]),o.push(n);return Array.from(r)})(this.appSegments,"type");this.mergedAppSegments=e.map((([t,a])=>{let n=Pe.get(t,this.options);return n.handleMultiSegments?{type:t,chunk:n.handleMultiSegments(a)}:a[0]}))}getSegment(e){return this.appSegments.find((t=>t.type===e))}async getOrFindSegment(e){let t=this.getSegment(e);return t===void 0&&(await this.findAppSegments(0,[e]),t=this.getSegment(e)),t}}q(Mu,"type","jpeg"),Ui.set("jpeg",Mu);const ww=[void 0,1,1,2,4,8,1,1,2,4,8,4,8,4];class Sw extends rt{parseHeader(){var e=this.chunk.getUint16();e===18761?this.le=!0:e===19789&&(this.le=!1),this.chunk.le=this.le,this.headerParsed=!0}parseTags(e,t,a=new Map){let{pick:n,skip:s}=this.options[t];n=new Set(n);let o=n.size>0,r=s.size===0,l=this.chunk.getUint16(e);e+=2;for(let c=0;c<l;c++){let p=this.chunk.getUint16(e);if(o){if(n.has(p)&&(a.set(p,this.parseTag(e,p,t)),n.delete(p),n.size===0))break}else!r&&s.has(p)||a.set(p,this.parseTag(e,p,t));e+=12}return a}parseTag(e,t,a){let{chunk:n}=this,s=n.getUint16(e+2),o=n.getUint32(e+4),r=ww[s];if(r*o<=4?e+=8:e=n.getUint32(e+8),(s<1||s>13)&&fe(`Invalid TIFF value type. block: ${a.toUpperCase()}, tag: ${t.toString(16)}, type: ${s}, offset ${e}`),e>n.byteLength&&fe(`Invalid TIFF value offset. block: ${a.toUpperCase()}, tag: ${t.toString(16)}, type: ${s}, offset ${e} is outside of chunk size ${n.byteLength}`),s===1)return n.getUint8Array(e,o);if(s===2)return ci(n.getString(e,o));if(s===7)return n.getUint8Array(e,o);if(o===1)return this.parseTagValue(s,e);{let l=new((function(p){switch(p){case 1:return Uint8Array;case 3:return Uint16Array;case 4:return Uint32Array;case 5:return Array;case 6:return Int8Array;case 8:return Int16Array;case 9:return Int32Array;case 10:return Array;case 11:return Float32Array;case 12:return Float64Array;default:return Array}})(s))(o),c=r;for(let p=0;p<o;p++)l[p]=this.parseTagValue(s,e),e+=c;return l}}parseTagValue(e,t){let{chunk:a}=this;switch(e){case 1:return a.getUint8(t);case 3:return a.getUint16(t);case 4:return a.getUint32(t);case 5:return a.getUint32(t)/a.getUint32(t+4);case 6:return a.getInt8(t);case 8:return a.getInt16(t);case 9:return a.getInt32(t);case 10:return a.getInt32(t)/a.getInt32(t+4);case 11:return a.getFloat(t);case 12:return a.getDouble(t);case 13:return a.getUint32(t);default:fe(`Invalid tiff type ${e}`)}}}class Eo extends Sw{static canHandle(e,t){return e.getUint8(t+1)===225&&e.getUint32(t+4)===1165519206&&e.getUint16(t+8)===0}async parse(){this.parseHeader();let{options:e}=this;return e.ifd0.enabled&&await this.parseIfd0Block(),e.exif.enabled&&await this.safeParse("parseExifBlock"),e.gps.enabled&&await this.safeParse("parseGpsBlock"),e.interop.enabled&&await this.safeParse("parseInteropBlock"),e.ifd1.enabled&&await this.safeParse("parseThumbnailBlock"),this.createOutput()}safeParse(e){let t=this[e]();return t.catch!==void 0&&(t=t.catch(this.handleError)),t}findIfd0Offset(){this.ifd0Offset===void 0&&(this.ifd0Offset=this.chunk.getUint32(4))}findIfd1Offset(){if(this.ifd1Offset===void 0){this.findIfd0Offset();let e=this.chunk.getUint16(this.ifd0Offset),t=this.ifd0Offset+2+12*e;this.ifd1Offset=this.chunk.getUint32(t)}}parseBlock(e,t){let a=new Map;return this[t]=a,this.parseTags(e,t,a),a}async parseIfd0Block(){if(this.ifd0)return;let{file:e}=this;this.findIfd0Offset(),this.ifd0Offset<8&&fe("Malformed EXIF data"),!e.chunked&&this.ifd0Offset>e.byteLength&&fe(`IFD0 offset points to outside of file.
|
|
48
48
|
this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e.byteLength}`),e.tiff&&await e.ensureChunk(this.ifd0Offset,Cr(this.options));let t=this.parseBlock(this.ifd0Offset,"ifd0");return t.size!==0?(this.exifOffset=t.get(34665),this.interopOffset=t.get(40965),this.gpsOffset=t.get(34853),this.xmp=t.get(700),this.iptc=t.get(33723),this.icc=t.get(34675),this.options.sanitize&&(t.delete(34665),t.delete(40965),t.delete(34853),t.delete(700),t.delete(33723),t.delete(34675)),t):void 0}async parseExifBlock(){if(this.exif||(this.ifd0||await this.parseIfd0Block(),this.exifOffset===void 0))return;this.file.tiff&&await this.file.ensureChunk(this.exifOffset,Cr(this.options));let e=this.parseBlock(this.exifOffset,"exif");return this.interopOffset||(this.interopOffset=e.get(40965)),this.makerNote=e.get(37500),this.userComment=e.get(37510),this.options.sanitize&&(e.delete(40965),e.delete(37500),e.delete(37510)),this.unpack(e,41728),this.unpack(e,41729),e}unpack(e,t){let a=e.get(t);a&&a.length===1&&e.set(t,a[0])}async parseGpsBlock(){if(this.gps||(this.ifd0||await this.parseIfd0Block(),this.gpsOffset===void 0))return;let e=this.parseBlock(this.gpsOffset,"gps");return e&&e.has(2)&&e.has(4)&&(e.set("latitude",Bu(...e.get(2),e.get(1))),e.set("longitude",Bu(...e.get(4),e.get(3)))),e}async parseInteropBlock(){if(!this.interop&&(this.ifd0||await this.parseIfd0Block(),this.interopOffset!==void 0||this.exif||await this.parseExifBlock(),this.interopOffset!==void 0))return this.parseBlock(this.interopOffset,"interop")}async parseThumbnailBlock(e=!1){if(!this.ifd1&&!this.ifd1Parsed&&(!this.options.mergeOutput||e))return this.findIfd1Offset(),this.ifd1Offset>0&&(this.parseBlock(this.ifd1Offset,"ifd1"),this.ifd1Parsed=!0),this.ifd1}async extractThumbnail(){if(this.headerParsed||this.parseHeader(),this.ifd1Parsed||await this.parseThumbnailBlock(!0),this.ifd1===void 0)return;let e=this.ifd1.get(513),t=this.ifd1.get(514);return this.chunk.getUint8Array(e,t)}get image(){return this.ifd0}get thumbnail(){return this.ifd1}createOutput(){let e,t,a,n={};for(t of ve)if(e=this[t],!Rh(e))if(a=this.canTranslate?this.translateBlock(e,t):Object.fromEntries(e),this.options.mergeOutput){if(t==="ifd1")continue;Object.assign(n,a)}else n[t]=a;return this.makerNote&&(n.makerNote=this.makerNote),this.userComment&&(n.userComment=this.userComment),n}assignToOutput(e,t){if(this.globalOptions.mergeOutput)Object.assign(e,t);else for(let[a,n]of Object.entries(t))this.assignObjectToOutput(e,a,n)}}function Bu(i,e,t,a){var n=i+e/60+t/3600;return a!=="S"&&a!=="W"||(n*=-1),n}q(Eo,"type","tiff"),q(Eo,"headerLength",10),Pe.set("tiff",Eo);const Sl={ifd0:!1,ifd1:!1,exif:!1,gps:!1,interop:!1,sanitize:!1,reviveValues:!0,translateKeys:!1,translateValues:!1,mergeOutput:!1};Object.assign({},Sl,{firstChunkSize:4e4,gps:[1,2,3,4]});Object.assign({},Sl,{tiff:!1,ifd1:!0,mergeOutput:!1});const Fw=Object.assign({},Sl,{firstChunkSize:4e4,ifd0:[274]});async function Pw(i){let e=new vw(Fw);await e.read(i);let t=await e.parse();if(t&&t.ifd0)return t.ifd0[274]}const Cw=Object.freeze({1:{dimensionSwapped:!1,scaleX:1,scaleY:1,deg:0,rad:0},2:{dimensionSwapped:!1,scaleX:-1,scaleY:1,deg:0,rad:0},3:{dimensionSwapped:!1,scaleX:1,scaleY:1,deg:180,rad:180*Math.PI/180},4:{dimensionSwapped:!1,scaleX:-1,scaleY:1,deg:180,rad:180*Math.PI/180},5:{dimensionSwapped:!0,scaleX:1,scaleY:-1,deg:90,rad:90*Math.PI/180},6:{dimensionSwapped:!0,scaleX:1,scaleY:1,deg:90,rad:90*Math.PI/180},7:{dimensionSwapped:!0,scaleX:1,scaleY:-1,deg:270,rad:270*Math.PI/180},8:{dimensionSwapped:!0,scaleX:1,scaleY:1,deg:270,rad:270*Math.PI/180}});let wa=!0,Sa=!0;if(typeof navigator=="object"){let i=navigator.userAgent;if(i.includes("iPad")||i.includes("iPhone")){let e=i.match(/OS (\d+)_(\d+)/);if(e){let[,t,a]=e;wa=Number(t)+.1*Number(a)<13.4,Sa=!1}}else if(i.includes("OS X 10")){let[,e]=i.match(/OS X 10[_.](\d+)/);wa=Sa=Number(e)<15}if(i.includes("Chrome/")){let[,e]=i.match(/Chrome\/(\d+)/);wa=Sa=Number(e)<81}else if(i.includes("Firefox/")){let[,e]=i.match(/Firefox\/(\d+)/);wa=Sa=Number(e)<77}}async function _w(i){let e=await Pw(i);return Object.assign({canvas:wa,css:Sa},Cw[e])}class kw extends Ue{constructor(...e){super(...e),q(this,"ranges",new Tw),this.byteLength!==0&&this.ranges.add(0,this.byteLength)}_tryExtend(e,t,a){if(e===0&&this.byteLength===0&&a){let n=new DataView(a.buffer||a,a.byteOffset,a.byteLength);this._swapDataView(n)}else{let n=e+t;if(n>this.byteLength){let{dataView:s}=this._extend(n);this._swapDataView(s)}}}_extend(e){let t;t=bl?vl.allocUnsafe(e):new Uint8Array(e);let a=new DataView(t.buffer,t.byteOffset,t.byteLength);return t.set(new Uint8Array(this.buffer,this.byteOffset,this.byteLength),0),{uintView:t,dataView:a}}subarray(e,t,a=!1){return t=t||this._lengthToEnd(e),a&&this._tryExtend(e,t),this.ranges.add(e,t),super.subarray(e,t)}set(e,t,a=!1){a&&this._tryExtend(t,e.byteLength,e);let n=super.set(e,t);return this.ranges.add(t,n.byteLength),n}async ensureChunk(e,t){this.chunked&&(this.ranges.available(e,t)||await this.readChunk(e,t))}available(e,t){return this.ranges.available(e,t)}}class Tw{constructor(){q(this,"list",[])}get length(){return this.list.length}add(e,t,a=0){let n=e+t,s=this.list.filter((o=>Lu(e,o.offset,n)||Lu(e,o.end,n)));if(s.length>0){e=Math.min(e,...s.map((r=>r.offset))),n=Math.max(n,...s.map((r=>r.end))),t=n-e;let o=s.shift();o.offset=e,o.length=t,o.end=n,this.list=this.list.filter((r=>!s.includes(r)))}else this.list.push({offset:e,length:t,end:n})}available(e,t){let a=e+t;return this.list.some((n=>n.offset<=e&&a<=n.end))}}function Lu(i,e,t){return i<=e&&e<=t}class Ps extends kw{constructor(e,t){super(0),q(this,"chunksRead",0),this.input=e,this.options=t}async readWhole(){this.chunked=!1,await this.readChunk(this.nextChunkOffset)}async readChunked(){this.chunked=!0,await this.readChunk(0,this.options.firstChunkSize)}async readNextChunk(e=this.nextChunkOffset){if(this.fullyRead)return this.chunksRead++,!1;let t=this.options.chunkSize,a=await this.readChunk(e,t);return!!a&&a.byteLength===t}async readChunk(e,t){if(this.chunksRead++,(t=this.safeWrapAddress(e,t))!==0)return this._readChunk(e,t)}safeWrapAddress(e,t){return this.size!==void 0&&e+t>this.size?Math.max(0,this.size-e):t}get nextChunkOffset(){if(this.ranges.list.length!==0)return this.ranges.list[0].length}get canReadNextChunk(){return this.chunksRead<this.options.chunkLimit}get fullyRead(){return this.size!==void 0&&this.nextChunkOffset===this.size}read(){return this.options.chunked?this.readChunked():this.readWhole()}close(){}}zi.set("blob",class extends Ps{async readWhole(){this.chunked=!1;let i=await Ar(this.input);this._swapArrayBuffer(i)}readChunked(){return this.chunked=!0,this.size=this.input.size,super.readChunked()}async _readChunk(i,e){let t=e?i+e:void 0,a=this.input.slice(i,t),n=await Ar(a);return this.set(n,i,!0)}});zi.set("url",class extends Ps{async readWhole(){this.chunked=!1;let i=await Dr(this.input);i instanceof ArrayBuffer?this._swapArrayBuffer(i):i instanceof Uint8Array&&this._swapBuffer(i)}async _readChunk(i,e){let t=e?i+e-1:void 0,a=this.options.httpHeaders||{};(i||t)&&(a.range=`bytes=${[i,t].join("-")}`);let n=await yl(this.input,{headers:a}),s=await n.arrayBuffer(),o=s.byteLength;if(n.status!==416)return o!==e&&(this.size=i+o),this.set(s,i,!0)}});Ue.prototype.getUint64=function(i){let e=this.getUint32(i),t=this.getUint32(i+4);return e<1048575?e<<32|t:typeof Cn!==void 0?(console.warn("Using BigInt because of type 64uint but JS can only handle 53b numbers."),Cn(e)<<Cn(32)|Cn(t)):void fe("Trying to read 64b value but JS can only handle 53b numbers.")};class Ew extends Fs{parseBoxes(e=0){let t=[];for(;e<this.file.byteLength-4;){let a=this.parseBoxHead(e);if(t.push(a),a.length===0)break;e+=a.length}return t}parseSubBoxes(e){e.boxes=this.parseBoxes(e.start)}findBox(e,t){return e.boxes===void 0&&this.parseSubBoxes(e),e.boxes.find((a=>a.kind===t))}parseBoxHead(e){let t=this.file.getUint32(e),a=this.file.getString(e+4,4),n=e+8;return t===1&&(t=this.file.getUint64(e+8),n+=8),{offset:e,length:t,kind:a,start:n}}parseBoxFullHead(e){if(e.version!==void 0)return;let t=this.file.getUint32(e.start);e.version=t>>24,e.start+=4}}class Nh extends Ew{static canHandle(e,t){if(t!==0)return!1;let a=e.getUint16(2);if(a>50)return!1;let n=16,s=[];for(;n<a;)s.push(e.getString(n,4)),n+=4;return s.includes(this.type)}async parse(){let e=this.file.getUint32(0),t=this.parseBoxHead(e);for(;t.kind!=="meta";)e+=t.length,await this.file.ensureChunk(e,16),t=this.parseBoxHead(e);await this.file.ensureChunk(t.offset,t.length),this.parseBoxFullHead(t),this.parseSubBoxes(t),this.options.icc.enabled&&await this.findIcc(t),this.options.tiff.enabled&&await this.findExif(t)}async registerSegment(e,t,a){await this.file.ensureChunk(t,a);let n=this.file.subarray(t,a);this.createParser(e,n)}async findIcc(e){let t=this.findBox(e,"iprp");if(t===void 0)return;let a=this.findBox(t,"ipco");if(a===void 0)return;let n=this.findBox(a,"colr");n!==void 0&&await this.registerSegment("icc",n.offset+12,n.length)}async findExif(e){let t=this.findBox(e,"iinf");if(t===void 0)return;let a=this.findBox(e,"iloc");if(a===void 0)return;let n=this.findExifLocIdInIinf(t),s=this.findExtentInIloc(a,n);if(s===void 0)return;let[o,r]=s;await this.file.ensureChunk(o,r);let l=4+this.file.getUint32(o);o+=l,r-=l,await this.registerSegment("tiff",o,r)}findExifLocIdInIinf(e){this.parseBoxFullHead(e);let t,a,n,s,o=e.start,r=this.file.getUint16(o);for(o+=2;r--;){if(t=this.parseBoxHead(o),this.parseBoxFullHead(t),a=t.start,t.version>=2&&(n=t.version===3?4:2,s=this.file.getString(a+n+2,4),s==="Exif"))return this.file.getUintBytes(a,n);o+=t.length}}get8bits(e){let t=this.file.getUint8(e);return[t>>4,15&t]}findExtentInIloc(e,t){this.parseBoxFullHead(e);let a=e.start,[n,s]=this.get8bits(a++),[o,r]=this.get8bits(a++),l=e.version===2?4:2,c=e.version===1||e.version===2?2:0,p=r+n+s,u=e.version===2?4:2,f=this.file.getUintBytes(a,u);for(a+=u;f--;){let x=this.file.getUintBytes(a,l);a+=l+c+2+o;let S=this.file.getUint16(a);if(a+=2,x===t)return S>1&&console.warn(`ILOC box has more than one extent but we're only processing one
|
|
49
|
-
Please create an issue at https://github.com/MikeKovarik/exifr with this file`),[this.file.getUintBytes(a+r,n),this.file.getUintBytes(a+r+n,s)];a+=S*p}}}class zh extends Nh{}q(zh,"type","heic");class Nu extends Nh{}q(Nu,"type","avif"),Ui.set("heic",zh),Ui.set("avif",Nu),Se(Me,["ifd0","ifd1"],[[256,"ImageWidth"],[257,"ImageHeight"],[258,"BitsPerSample"],[259,"Compression"],[262,"PhotometricInterpretation"],[270,"ImageDescription"],[271,"Make"],[272,"Model"],[273,"StripOffsets"],[274,"Orientation"],[277,"SamplesPerPixel"],[278,"RowsPerStrip"],[279,"StripByteCounts"],[282,"XResolution"],[283,"YResolution"],[284,"PlanarConfiguration"],[296,"ResolutionUnit"],[301,"TransferFunction"],[305,"Software"],[306,"ModifyDate"],[315,"Artist"],[316,"HostComputer"],[317,"Predictor"],[318,"WhitePoint"],[319,"PrimaryChromaticities"],[513,"ThumbnailOffset"],[514,"ThumbnailLength"],[529,"YCbCrCoefficients"],[530,"YCbCrSubSampling"],[531,"YCbCrPositioning"],[532,"ReferenceBlackWhite"],[700,"ApplicationNotes"],[33432,"Copyright"],[33723,"IPTC"],[34665,"ExifIFD"],[34675,"ICC"],[34853,"GpsIFD"],[330,"SubIFD"],[40965,"InteropIFD"],[40091,"XPTitle"],[40092,"XPComment"],[40093,"XPAuthor"],[40094,"XPKeywords"],[40095,"XPSubject"]]),Se(Me,"exif",[[33434,"ExposureTime"],[33437,"FNumber"],[34850,"ExposureProgram"],[34852,"SpectralSensitivity"],[34855,"ISO"],[34858,"TimeZoneOffset"],[34859,"SelfTimerMode"],[34864,"SensitivityType"],[34865,"StandardOutputSensitivity"],[34866,"RecommendedExposureIndex"],[34867,"ISOSpeed"],[34868,"ISOSpeedLatitudeyyy"],[34869,"ISOSpeedLatitudezzz"],[36864,"ExifVersion"],[36867,"DateTimeOriginal"],[36868,"CreateDate"],[36873,"GooglePlusUploadCode"],[36880,"OffsetTime"],[36881,"OffsetTimeOriginal"],[36882,"OffsetTimeDigitized"],[37121,"ComponentsConfiguration"],[37122,"CompressedBitsPerPixel"],[37377,"ShutterSpeedValue"],[37378,"ApertureValue"],[37379,"BrightnessValue"],[37380,"ExposureCompensation"],[37381,"MaxApertureValue"],[37382,"SubjectDistance"],[37383,"MeteringMode"],[37384,"LightSource"],[37385,"Flash"],[37386,"FocalLength"],[37393,"ImageNumber"],[37394,"SecurityClassification"],[37395,"ImageHistory"],[37396,"SubjectArea"],[37500,"MakerNote"],[37510,"UserComment"],[37520,"SubSecTime"],[37521,"SubSecTimeOriginal"],[37522,"SubSecTimeDigitized"],[37888,"AmbientTemperature"],[37889,"Humidity"],[37890,"Pressure"],[37891,"WaterDepth"],[37892,"Acceleration"],[37893,"CameraElevationAngle"],[40960,"FlashpixVersion"],[40961,"ColorSpace"],[40962,"ExifImageWidth"],[40963,"ExifImageHeight"],[40964,"RelatedSoundFile"],[41483,"FlashEnergy"],[41486,"FocalPlaneXResolution"],[41487,"FocalPlaneYResolution"],[41488,"FocalPlaneResolutionUnit"],[41492,"SubjectLocation"],[41493,"ExposureIndex"],[41495,"SensingMethod"],[41728,"FileSource"],[41729,"SceneType"],[41730,"CFAPattern"],[41985,"CustomRendered"],[41986,"ExposureMode"],[41987,"WhiteBalance"],[41988,"DigitalZoomRatio"],[41989,"FocalLengthIn35mmFormat"],[41990,"SceneCaptureType"],[41991,"GainControl"],[41992,"Contrast"],[41993,"Saturation"],[41994,"Sharpness"],[41996,"SubjectDistanceRange"],[42016,"ImageUniqueID"],[42032,"OwnerName"],[42033,"SerialNumber"],[42034,"LensInfo"],[42035,"LensMake"],[42036,"LensModel"],[42037,"LensSerialNumber"],[42080,"CompositeImage"],[42081,"CompositeImageCount"],[42082,"CompositeImageExposureTimes"],[42240,"Gamma"],[59932,"Padding"],[59933,"OffsetSchema"],[65e3,"OwnerName"],[65001,"SerialNumber"],[65002,"Lens"],[65100,"RawFile"],[65101,"Converter"],[65102,"WhiteBalance"],[65105,"Exposure"],[65106,"Shadows"],[65107,"Brightness"],[65108,"Contrast"],[65109,"Saturation"],[65110,"Sharpness"],[65111,"Smoothness"],[65112,"MoireFilter"],[40965,"InteropIFD"]]),Se(Me,"gps",[[0,"GPSVersionID"],[1,"GPSLatitudeRef"],[2,"GPSLatitude"],[3,"GPSLongitudeRef"],[4,"GPSLongitude"],[5,"GPSAltitudeRef"],[6,"GPSAltitude"],[7,"GPSTimeStamp"],[8,"GPSSatellites"],[9,"GPSStatus"],[10,"GPSMeasureMode"],[11,"GPSDOP"],[12,"GPSSpeedRef"],[13,"GPSSpeed"],[14,"GPSTrackRef"],[15,"GPSTrack"],[16,"GPSImgDirectionRef"],[17,"GPSImgDirection"],[18,"GPSMapDatum"],[19,"GPSDestLatitudeRef"],[20,"GPSDestLatitude"],[21,"GPSDestLongitudeRef"],[22,"GPSDestLongitude"],[23,"GPSDestBearingRef"],[24,"GPSDestBearing"],[25,"GPSDestDistanceRef"],[26,"GPSDestDistance"],[27,"GPSProcessingMethod"],[28,"GPSAreaInformation"],[29,"GPSDateStamp"],[30,"GPSDifferential"],[31,"GPSHPositioningError"]]),Se(fi,["ifd0","ifd1"],[[274,{1:"Horizontal (normal)",2:"Mirror horizontal",3:"Rotate 180",4:"Mirror vertical",5:"Mirror horizontal and rotate 270 CW",6:"Rotate 90 CW",7:"Mirror horizontal and rotate 90 CW",8:"Rotate 270 CW"}],[296,{1:"None",2:"inches",3:"cm"}]]);let Ra=Se(fi,"exif",[[34850,{0:"Not defined",1:"Manual",2:"Normal program",3:"Aperture priority",4:"Shutter priority",5:"Creative program",6:"Action program",7:"Portrait mode",8:"Landscape mode"}],[37121,{0:"-",1:"Y",2:"Cb",3:"Cr",4:"R",5:"G",6:"B"}],[37383,{0:"Unknown",1:"Average",2:"CenterWeightedAverage",3:"Spot",4:"MultiSpot",5:"Pattern",6:"Partial",255:"Other"}],[37384,{0:"Unknown",1:"Daylight",2:"Fluorescent",3:"Tungsten (incandescent light)",4:"Flash",9:"Fine weather",10:"Cloudy weather",11:"Shade",12:"Daylight fluorescent (D 5700 - 7100K)",13:"Day white fluorescent (N 4600 - 5400K)",14:"Cool white fluorescent (W 3900 - 4500K)",15:"White fluorescent (WW 3200 - 3700K)",17:"Standard light A",18:"Standard light B",19:"Standard light C",20:"D55",21:"D65",22:"D75",23:"D50",24:"ISO studio tungsten",255:"Other"}],[37385,{0:"Flash did not fire",1:"Flash fired",5:"Strobe return light not detected",7:"Strobe return light detected",9:"Flash fired, compulsory flash mode",13:"Flash fired, compulsory flash mode, return light not detected",15:"Flash fired, compulsory flash mode, return light detected",16:"Flash did not fire, compulsory flash mode",24:"Flash did not fire, auto mode",25:"Flash fired, auto mode",29:"Flash fired, auto mode, return light not detected",31:"Flash fired, auto mode, return light detected",32:"No flash function",65:"Flash fired, red-eye reduction mode",69:"Flash fired, red-eye reduction mode, return light not detected",71:"Flash fired, red-eye reduction mode, return light detected",73:"Flash fired, compulsory flash mode, red-eye reduction mode",77:"Flash fired, compulsory flash mode, red-eye reduction mode, return light not detected",79:"Flash fired, compulsory flash mode, red-eye reduction mode, return light detected",89:"Flash fired, auto mode, red-eye reduction mode",93:"Flash fired, auto mode, return light not detected, red-eye reduction mode",95:"Flash fired, auto mode, return light detected, red-eye reduction mode"}],[41495,{1:"Not defined",2:"One-chip color area sensor",3:"Two-chip color area sensor",4:"Three-chip color area sensor",5:"Color sequential area sensor",7:"Trilinear sensor",8:"Color sequential linear sensor"}],[41728,{1:"Film Scanner",2:"Reflection Print Scanner",3:"Digital Camera"}],[41729,{1:"Directly photographed"}],[41985,{0:"Normal",1:"Custom",2:"HDR (no original saved)",3:"HDR (original saved)",4:"Original (for HDR)",6:"Panorama",7:"Portrait HDR",8:"Portrait"}],[41986,{0:"Auto",1:"Manual",2:"Auto bracket"}],[41987,{0:"Auto",1:"Manual"}],[41990,{0:"Standard",1:"Landscape",2:"Portrait",3:"Night",4:"Other"}],[41991,{0:"None",1:"Low gain up",2:"High gain up",3:"Low gain down",4:"High gain down"}],[41996,{0:"Unknown",1:"Macro",2:"Close",3:"Distant"}],[42080,{0:"Unknown",1:"Not a Composite Image",2:"General Composite Image",3:"Composite Image Captured While Shooting"}]]);const zu={1:"No absolute unit of measurement",2:"Inch",3:"Centimeter"};Ra.set(37392,zu),Ra.set(41488,zu);const Do={0:"Normal",1:"Low",2:"High"};function ju(i){return typeof i=="object"&&i.length!==void 0?i[0]:i}function $u(i){let e=Array.from(i).slice(1);return e[1]>15&&(e=e.map((t=>String.fromCharCode(t)))),e[2]!=="0"&&e[2]!==0||e.pop(),e.join(".")}function Ao(i){if(typeof i=="string"){var[e,t,a,n,s,o]=i.trim().split(/[-: ]/g).map(Number),r=new Date(e,t-1,a);return Number.isNaN(n)||Number.isNaN(s)||Number.isNaN(o)||(r.setHours(n),r.setMinutes(s),r.setSeconds(o)),Number.isNaN(+r)?i:r}}function fa(i){if(typeof i=="string")return i;let e=[];if(i[1]===0&&i[i.length-1]===0)for(let t=0;t<i.length;t+=2)e.push(Hu(i[t+1],i[t]));else for(let t=0;t<i.length;t+=2)e.push(Hu(i[t],i[t+1]));return ci(String.fromCodePoint(...e))}function Hu(i,e){return i<<8|e}Ra.set(41992,Do),Ra.set(41993,Do),Ra.set(41994,Do),Se(Kn,["ifd0","ifd1"],[[50827,function(i){return typeof i!="string"?Uh(i):i}],[306,Ao],[40091,fa],[40092,fa],[40093,fa],[40094,fa],[40095,fa]]),Se(Kn,"exif",[[40960,$u],[36864,$u],[36867,Ao],[36868,Ao],[40962,ju],[40963,ju]]),Se(Kn,"gps",[[0,i=>Array.from(i).join(".")],[7,i=>Array.from(i).join(":")]]);class Io extends rt{static canHandle(e,t){return e.getUint8(t+1)===225&&e.getUint32(t+4)===1752462448&&e.getString(t+4,20)==="http://ns.adobe.com/"}static headerLength(e,t){return e.getString(t+4,34)==="http://ns.adobe.com/xmp/extension/"?79:33}static findPosition(e,t){let a=super.findPosition(e,t);return a.multiSegment=a.extended=a.headerLength===79,a.multiSegment?(a.chunkCount=e.getUint8(t+72),a.chunkNumber=e.getUint8(t+76),e.getUint8(t+77)!==0&&a.chunkNumber++):(a.chunkCount=1/0,a.chunkNumber=-1),a}static handleMultiSegments(e){return e.map((t=>t.chunk.getString())).join("")}normalizeInput(e){return typeof e=="string"?e:Ue.from(e).getString()}parse(e=this.chunk){if(!this.localOptions.parse)return e;e=(function(s){let o={},r={};for(let l of qh)o[l]=[],r[l]=0;return s.replace(Ow,((l,c,p)=>{if(c==="<"){let u=++r[p];return o[p].push(u),`${l}#${u}`}return`${l}#${o[p].pop()}`}))})(e);let t=Ii.findAll(e,"rdf","Description");t.length===0&&t.push(new Ii("rdf","Description",void 0,e));let a,n={};for(let s of t)for(let o of s.properties)a=Iw(o.ns,n),jh(o,a);return(function(s){let o;for(let r in s)o=s[r]=hs(s[r]),o===void 0&&delete s[r];return hs(s)})(n)}assignToOutput(e,t){if(this.localOptions.parse)for(let[a,n]of Object.entries(t))switch(a){case"tiff":this.assignObjectToOutput(e,"ifd0",n);break;case"exif":this.assignObjectToOutput(e,"exif",n);break;case"xmlns":break;default:this.assignObjectToOutput(e,a,n)}else e.xmp=t}}q(Io,"type","xmp"),q(Io,"multiSegment",!0),Pe.set("xmp",Io);class ms{static findAll(e){return $h(e,/([a-zA-Z0-9-]+):([a-zA-Z0-9-]+)=("[^"]*"|'[^']*')/gm).map(ms.unpackMatch)}static unpackMatch(e){let t=e[1],a=e[2],n=e[3].slice(1,-1);return n=Hh(n),new ms(t,a,n)}constructor(e,t,a){this.ns=e,this.name=t,this.value=a}serialize(){return this.value}}class Ii{static findAll(e,t,a){if(t!==void 0||a!==void 0){t=t||"[\\w\\d-]+",a=a||"[\\w\\d-]+";var n=new RegExp(`<(${t}):(${a})(#\\d+)?((\\s+?[\\w\\d-:]+=("[^"]*"|'[^']*'))*\\s*)(\\/>|>([\\s\\S]*?)<\\/\\1:\\2\\3>)`,"gm")}else n=/<([\w\d-]+):([\w\d-]+)(#\d+)?((\s+?[\w\d-:]+=("[^"]*"|'[^']*'))*\s*)(\/>|>([\s\S]*?)<\/\1:\2\3>)/gm;return $h(e,n).map(Ii.unpackMatch)}static unpackMatch(e){let t=e[1],a=e[2],n=e[4],s=e[8];return new Ii(t,a,n,s)}constructor(e,t,a,n){this.ns=e,this.name=t,this.attrString=a,this.innerXml=n,this.attrs=ms.findAll(a),this.children=Ii.findAll(n),this.value=this.children.length===0?Hh(n):void 0,this.properties=[...this.attrs,...this.children]}get isPrimitive(){return this.value!==void 0&&this.attrs.length===0&&this.children.length===0}get isListContainer(){return this.children.length===1&&this.children[0].isList}get isList(){let{ns:e,name:t}=this;return e==="rdf"&&(t==="Seq"||t==="Bag"||t==="Alt")}get isListItem(){return this.ns==="rdf"&&this.name==="li"}serialize(){if(this.properties.length===0&&this.value===void 0)return;if(this.isPrimitive)return this.value;if(this.isListContainer)return this.children[0].serialize();if(this.isList)return Aw(this.children.map(Dw));if(this.isListItem&&this.children.length===1&&this.attrs.length===0)return this.children[0].serialize();let e={};for(let t of this.properties)jh(t,e);return this.value!==void 0&&(e.value=this.value),hs(e)}}function jh(i,e){let t=i.serialize();t!==void 0&&(e[i.name]=t)}var Dw=i=>i.serialize(),Aw=i=>i.length===1?i[0]:i,Iw=(i,e)=>e[i]?e[i]:e[i]={};function $h(i,e){let t,a=[];if(!i)return a;for(;(t=e.exec(i))!==null;)a.push(t);return a}function Hh(i){if((function(a){return a==null||a==="null"||a==="undefined"||a===""||a.trim()===""})(i))return;let e=Number(i);if(!Number.isNaN(e))return e;let t=i.toLowerCase();return t==="true"||t!=="false"&&i.trim()}const qh=["rdf:li","rdf:Seq","rdf:Bag","rdf:Alt","rdf:Description"],Ow=new RegExp(`(<|\\/)(${qh.join("|")})`,"g");let qu=ds("fs",(i=>i.promises));zi.set("fs",class extends Ps{async readWhole(){this.chunked=!1,this.fs=await qu;let i=await this.fs.readFile(this.input);this._swapBuffer(i)}async readChunked(){this.chunked=!0,this.fs=await qu,await this.open(),await this.readChunk(0,this.options.firstChunkSize)}async open(){this.fh===void 0&&(this.fh=await this.fs.open(this.input,"r"),this.size=(await this.fh.stat(this.input)).size)}async _readChunk(i,e){this.fh===void 0&&await this.open(),i+e>this.size&&(e=this.size-i);var t=this.subarray(i,e,!0);return await this.fh.read(t.dataView,0,e,i),t}async close(){if(this.fh){let i=this.fh;this.fh=void 0,await i.close()}}});zi.set("base64",class extends Ps{constructor(...i){super(...i),this.input=this.input.replace(/^data:([^;]+);base64,/gim,""),this.size=this.input.length/4*3,this.input.endsWith("==")?this.size-=2:this.input.endsWith("=")&&(this.size-=1)}async _readChunk(i,e){let t,a,n=this.input;i===void 0?(i=0,t=0,a=0):(t=4*Math.floor(i/3),a=i-t/4*3),e===void 0&&(e=this.size);let s=i+e,o=t+4*Math.ceil(s/3);n=n.slice(t,o);let r=Math.min(e,this.size-i);if(bl){let l=vl.from(n,"base64").slice(a,a+r);return this.set(l,i,!0)}{let l=this.subarray(i,r,!0),c=atob(n),p=l.toUint8();for(let u=0;u<r;u++)p[u]=c.charCodeAt(a+u);return l}}});class Vu extends Fs{static canHandle(e,t){return t===18761||t===19789}extendOptions(e){let{ifd0:t,xmp:a,iptc:n,icc:s}=e;a.enabled&&t.deps.add(700),n.enabled&&t.deps.add(33723),s.enabled&&t.deps.add(34675),t.finalizeFilters()}async parse(){let{tiff:e,xmp:t,iptc:a,icc:n}=this.options;if(e.enabled||t.enabled||a.enabled||n.enabled){let s=Math.max(Cr(this.options),this.options.chunkSize);await this.file.ensureChunk(0,s),this.createParser("tiff",this.file),this.parsers.tiff.parseHeader(),await this.parsers.tiff.parseIfd0Block(),this.adaptTiffPropAsSegment("xmp"),this.adaptTiffPropAsSegment("iptc"),this.adaptTiffPropAsSegment("icc")}}adaptTiffPropAsSegment(e){if(this.parsers.tiff[e]){let t=this.parsers.tiff[e];this.injectSegment(e,t)}}}q(Vu,"type","tiff"),Ui.set("tiff",Vu);let Rw=ds("zlib");const Uw=["ihdr","iccp","text","itxt","exif"];class Wu extends Fs{constructor(...e){super(...e),q(this,"catchError",(t=>this.errors.push(t))),q(this,"metaChunks",[]),q(this,"unknownChunks",[])}static canHandle(e,t){return t===35152&&e.getUint32(0)===2303741511&&e.getUint32(4)===218765834}async parse(){let{file:e}=this;await this.findPngChunksInRange(8,e.byteLength),await this.readSegments(this.metaChunks),this.findIhdr(),this.parseTextChunks(),await this.findExif().catch(this.catchError),await this.findXmp().catch(this.catchError),await this.findIcc().catch(this.catchError)}async findPngChunksInRange(e,t){let{file:a}=this;for(;e<t;){let n=a.getUint32(e),s=a.getUint32(e+4),o=a.getString(e+4,4).toLowerCase(),r=n+4+4+4,l={type:o,offset:e,length:r,start:e+4+4,size:n,marker:s};Uw.includes(o)?this.metaChunks.push(l):this.unknownChunks.push(l),e+=r}}parseTextChunks(){let e=this.metaChunks.filter((t=>t.type==="text"));for(let t of e){let[a,n]=this.file.getString(t.start,t.size).split("\0");this.injectKeyValToIhdr(a,n)}}injectKeyValToIhdr(e,t){let a=this.parsers.ihdr;a&&a.raw.set(e,t)}findIhdr(){let e=this.metaChunks.find((t=>t.type==="ihdr"));e&&this.options.ihdr.enabled!==!1&&this.createParser("ihdr",e.chunk)}async findExif(){let e=this.metaChunks.find((t=>t.type==="exif"));e&&this.injectSegment("tiff",e.chunk)}async findXmp(){let e=this.metaChunks.filter((t=>t.type==="itxt"));for(let t of e)t.chunk.getString(0,17)==="XML:com.adobe.xmp"&&this.injectSegment("xmp",t.chunk)}async findIcc(){let e=this.metaChunks.find((r=>r.type==="iccp"));if(!e)return;let{chunk:t}=e,a=t.getUint8Array(0,81),n=0;for(;n<80&&a[n]!==0;)n++;let s=n+2,o=t.getString(0,n);if(this.injectKeyValToIhdr("ProfileName",o),ps){let r=await Rw,l=t.getUint8Array(s);l=r.inflateSync(l),this.injectSegment("icc",l)}}}q(Wu,"type","png"),Ui.set("png",Wu),Se(Me,"interop",[[1,"InteropIndex"],[2,"InteropVersion"],[4096,"RelatedImageFileFormat"],[4097,"RelatedImageWidth"],[4098,"RelatedImageHeight"]]),Ir(Me,"ifd0",[[11,"ProcessingSoftware"],[254,"SubfileType"],[255,"OldSubfileType"],[263,"Thresholding"],[264,"CellWidth"],[265,"CellLength"],[266,"FillOrder"],[269,"DocumentName"],[280,"MinSampleValue"],[281,"MaxSampleValue"],[285,"PageName"],[286,"XPosition"],[287,"YPosition"],[290,"GrayResponseUnit"],[297,"PageNumber"],[321,"HalftoneHints"],[322,"TileWidth"],[323,"TileLength"],[332,"InkSet"],[337,"TargetPrinter"],[18246,"Rating"],[18249,"RatingPercent"],[33550,"PixelScale"],[34264,"ModelTransform"],[34377,"PhotoshopSettings"],[50706,"DNGVersion"],[50707,"DNGBackwardVersion"],[50708,"UniqueCameraModel"],[50709,"LocalizedCameraModel"],[50736,"DNGLensInfo"],[50739,"ShadowScale"],[50740,"DNGPrivateData"],[33920,"IntergraphMatrix"],[33922,"ModelTiePoint"],[34118,"SEMInfo"],[34735,"GeoTiffDirectory"],[34736,"GeoTiffDoubleParams"],[34737,"GeoTiffAsciiParams"],[50341,"PrintIM"],[50721,"ColorMatrix1"],[50722,"ColorMatrix2"],[50723,"CameraCalibration1"],[50724,"CameraCalibration2"],[50725,"ReductionMatrix1"],[50726,"ReductionMatrix2"],[50727,"AnalogBalance"],[50728,"AsShotNeutral"],[50729,"AsShotWhiteXY"],[50730,"BaselineExposure"],[50731,"BaselineNoise"],[50732,"BaselineSharpness"],[50734,"LinearResponseLimit"],[50735,"CameraSerialNumber"],[50741,"MakerNoteSafety"],[50778,"CalibrationIlluminant1"],[50779,"CalibrationIlluminant2"],[50781,"RawDataUniqueID"],[50827,"OriginalRawFileName"],[50828,"OriginalRawFileData"],[50831,"AsShotICCProfile"],[50832,"AsShotPreProfileMatrix"],[50833,"CurrentICCProfile"],[50834,"CurrentPreProfileMatrix"],[50879,"ColorimetricReference"],[50885,"SRawType"],[50898,"PanasonicTitle"],[50899,"PanasonicTitle2"],[50931,"CameraCalibrationSig"],[50932,"ProfileCalibrationSig"],[50933,"ProfileIFD"],[50934,"AsShotProfileName"],[50936,"ProfileName"],[50937,"ProfileHueSatMapDims"],[50938,"ProfileHueSatMapData1"],[50939,"ProfileHueSatMapData2"],[50940,"ProfileToneCurve"],[50941,"ProfileEmbedPolicy"],[50942,"ProfileCopyright"],[50964,"ForwardMatrix1"],[50965,"ForwardMatrix2"],[50966,"PreviewApplicationName"],[50967,"PreviewApplicationVersion"],[50968,"PreviewSettingsName"],[50969,"PreviewSettingsDigest"],[50970,"PreviewColorSpace"],[50971,"PreviewDateTime"],[50972,"RawImageDigest"],[50973,"OriginalRawFileDigest"],[50981,"ProfileLookTableDims"],[50982,"ProfileLookTableData"],[51043,"TimeCodes"],[51044,"FrameRate"],[51058,"TStop"],[51081,"ReelName"],[51089,"OriginalDefaultFinalSize"],[51090,"OriginalBestQualitySize"],[51091,"OriginalDefaultCropSize"],[51105,"CameraLabel"],[51107,"ProfileHueSatMapEncoding"],[51108,"ProfileLookTableEncoding"],[51109,"BaselineExposureOffset"],[51110,"DefaultBlackRender"],[51111,"NewRawImageDigest"],[51112,"RawToPreviewGain"]]);let Gu=[[273,"StripOffsets"],[279,"StripByteCounts"],[288,"FreeOffsets"],[289,"FreeByteCounts"],[291,"GrayResponseCurve"],[292,"T4Options"],[293,"T6Options"],[300,"ColorResponseUnit"],[320,"ColorMap"],[324,"TileOffsets"],[325,"TileByteCounts"],[326,"BadFaxLines"],[327,"CleanFaxData"],[328,"ConsecutiveBadFaxLines"],[330,"SubIFD"],[333,"InkNames"],[334,"NumberofInks"],[336,"DotRange"],[338,"ExtraSamples"],[339,"SampleFormat"],[340,"SMinSampleValue"],[341,"SMaxSampleValue"],[342,"TransferRange"],[343,"ClipPath"],[344,"XClipPathUnits"],[345,"YClipPathUnits"],[346,"Indexed"],[347,"JPEGTables"],[351,"OPIProxy"],[400,"GlobalParametersIFD"],[401,"ProfileType"],[402,"FaxProfile"],[403,"CodingMethods"],[404,"VersionYear"],[405,"ModeNumber"],[433,"Decode"],[434,"DefaultImageColor"],[435,"T82Options"],[437,"JPEGTables"],[512,"JPEGProc"],[515,"JPEGRestartInterval"],[517,"JPEGLosslessPredictors"],[518,"JPEGPointTransforms"],[519,"JPEGQTables"],[520,"JPEGDCTables"],[521,"JPEGACTables"],[559,"StripRowCounts"],[999,"USPTOMiscellaneous"],[18247,"XP_DIP_XML"],[18248,"StitchInfo"],[28672,"SonyRawFileType"],[28688,"SonyToneCurve"],[28721,"VignettingCorrection"],[28722,"VignettingCorrParams"],[28724,"ChromaticAberrationCorrection"],[28725,"ChromaticAberrationCorrParams"],[28726,"DistortionCorrection"],[28727,"DistortionCorrParams"],[29895,"SonyCropTopLeft"],[29896,"SonyCropSize"],[32781,"ImageID"],[32931,"WangTag1"],[32932,"WangAnnotation"],[32933,"WangTag3"],[32934,"WangTag4"],[32953,"ImageReferencePoints"],[32954,"RegionXformTackPoint"],[32955,"WarpQuadrilateral"],[32956,"AffineTransformMat"],[32995,"Matteing"],[32996,"DataType"],[32997,"ImageDepth"],[32998,"TileDepth"],[33300,"ImageFullWidth"],[33301,"ImageFullHeight"],[33302,"TextureFormat"],[33303,"WrapModes"],[33304,"FovCot"],[33305,"MatrixWorldToScreen"],[33306,"MatrixWorldToCamera"],[33405,"Model2"],[33421,"CFARepeatPatternDim"],[33422,"CFAPattern2"],[33423,"BatteryLevel"],[33424,"KodakIFD"],[33445,"MDFileTag"],[33446,"MDScalePixel"],[33447,"MDColorTable"],[33448,"MDLabName"],[33449,"MDSampleInfo"],[33450,"MDPrepDate"],[33451,"MDPrepTime"],[33452,"MDFileUnits"],[33589,"AdventScale"],[33590,"AdventRevision"],[33628,"UIC1Tag"],[33629,"UIC2Tag"],[33630,"UIC3Tag"],[33631,"UIC4Tag"],[33918,"IntergraphPacketData"],[33919,"IntergraphFlagRegisters"],[33921,"INGRReserved"],[34016,"Site"],[34017,"ColorSequence"],[34018,"IT8Header"],[34019,"RasterPadding"],[34020,"BitsPerRunLength"],[34021,"BitsPerExtendedRunLength"],[34022,"ColorTable"],[34023,"ImageColorIndicator"],[34024,"BackgroundColorIndicator"],[34025,"ImageColorValue"],[34026,"BackgroundColorValue"],[34027,"PixelIntensityRange"],[34028,"TransparencyIndicator"],[34029,"ColorCharacterization"],[34030,"HCUsage"],[34031,"TrapIndicator"],[34032,"CMYKEquivalent"],[34152,"AFCP_IPTC"],[34232,"PixelMagicJBIGOptions"],[34263,"JPLCartoIFD"],[34306,"WB_GRGBLevels"],[34310,"LeafData"],[34687,"TIFF_FXExtensions"],[34688,"MultiProfiles"],[34689,"SharedData"],[34690,"T88Options"],[34732,"ImageLayer"],[34750,"JBIGOptions"],[34856,"Opto-ElectricConvFactor"],[34857,"Interlace"],[34908,"FaxRecvParams"],[34909,"FaxSubAddress"],[34910,"FaxRecvTime"],[34929,"FedexEDR"],[34954,"LeafSubIFD"],[37387,"FlashEnergy"],[37388,"SpatialFrequencyResponse"],[37389,"Noise"],[37390,"FocalPlaneXResolution"],[37391,"FocalPlaneYResolution"],[37392,"FocalPlaneResolutionUnit"],[37397,"ExposureIndex"],[37398,"TIFF-EPStandardID"],[37399,"SensingMethod"],[37434,"CIP3DataFile"],[37435,"CIP3Sheet"],[37436,"CIP3Side"],[37439,"StoNits"],[37679,"MSDocumentText"],[37680,"MSPropertySetStorage"],[37681,"MSDocumentTextPosition"],[37724,"ImageSourceData"],[40965,"InteropIFD"],[40976,"SamsungRawPointersOffset"],[40977,"SamsungRawPointersLength"],[41217,"SamsungRawByteOrder"],[41218,"SamsungRawUnknown"],[41484,"SpatialFrequencyResponse"],[41485,"Noise"],[41489,"ImageNumber"],[41490,"SecurityClassification"],[41491,"ImageHistory"],[41494,"TIFF-EPStandardID"],[41995,"DeviceSettingDescription"],[42112,"GDALMetadata"],[42113,"GDALNoData"],[44992,"ExpandSoftware"],[44993,"ExpandLens"],[44994,"ExpandFilm"],[44995,"ExpandFilterLens"],[44996,"ExpandScanner"],[44997,"ExpandFlashLamp"],[46275,"HasselbladRawImage"],[48129,"PixelFormat"],[48130,"Transformation"],[48131,"Uncompressed"],[48132,"ImageType"],[48256,"ImageWidth"],[48257,"ImageHeight"],[48258,"WidthResolution"],[48259,"HeightResolution"],[48320,"ImageOffset"],[48321,"ImageByteCount"],[48322,"AlphaOffset"],[48323,"AlphaByteCount"],[48324,"ImageDataDiscard"],[48325,"AlphaDataDiscard"],[50215,"OceScanjobDesc"],[50216,"OceApplicationSelector"],[50217,"OceIDNumber"],[50218,"OceImageLogic"],[50255,"Annotations"],[50459,"HasselbladExif"],[50547,"OriginalFileName"],[50560,"USPTOOriginalContentType"],[50656,"CR2CFAPattern"],[50710,"CFAPlaneColor"],[50711,"CFALayout"],[50712,"LinearizationTable"],[50713,"BlackLevelRepeatDim"],[50714,"BlackLevel"],[50715,"BlackLevelDeltaH"],[50716,"BlackLevelDeltaV"],[50717,"WhiteLevel"],[50718,"DefaultScale"],[50719,"DefaultCropOrigin"],[50720,"DefaultCropSize"],[50733,"BayerGreenSplit"],[50737,"ChromaBlurRadius"],[50738,"AntiAliasStrength"],[50752,"RawImageSegmentation"],[50780,"BestQualityScale"],[50784,"AliasLayerMetadata"],[50829,"ActiveArea"],[50830,"MaskedAreas"],[50935,"NoiseReductionApplied"],[50974,"SubTileBlockSize"],[50975,"RowInterleaveFactor"],[51008,"OpcodeList1"],[51009,"OpcodeList2"],[51022,"OpcodeList3"],[51041,"NoiseProfile"],[51114,"CacheVersion"],[51125,"DefaultUserCrop"],[51157,"NikonNEFInfo"],[65024,"KdcIFD"]];Ir(Me,"ifd0",Gu),Ir(Me,"exif",Gu),Se(fi,"gps",[[23,{M:"Magnetic North",T:"True North"}],[25,{K:"Kilometers",M:"Miles",N:"Nautical Miles"}]]);class Oo extends rt{static canHandle(e,t){return e.getUint8(t+1)===224&&e.getUint32(t+4)===1246120262&&e.getUint8(t+8)===0}parse(){return this.parseTags(),this.translate(),this.output}parseTags(){this.raw=new Map([[0,this.chunk.getUint16(0)],[2,this.chunk.getUint8(2)],[3,this.chunk.getUint16(3)],[5,this.chunk.getUint16(5)],[7,this.chunk.getUint8(7)],[8,this.chunk.getUint8(8)]])}}q(Oo,"type","jfif"),q(Oo,"headerLength",9),Pe.set("jfif",Oo),Se(Me,"jfif",[[0,"JFIFVersion"],[2,"ResolutionUnit"],[3,"XResolution"],[5,"YResolution"],[7,"ThumbnailWidth"],[8,"ThumbnailHeight"]]);class Xu extends rt{parse(){return this.parseTags(),this.translate(),this.output}parseTags(){this.raw=new Map([[0,this.chunk.getUint32(0)],[4,this.chunk.getUint32(4)],[8,this.chunk.getUint8(8)],[9,this.chunk.getUint8(9)],[10,this.chunk.getUint8(10)],[11,this.chunk.getUint8(11)],[12,this.chunk.getUint8(12)],...Array.from(this.raw)])}}q(Xu,"type","ihdr"),Pe.set("ihdr",Xu),Se(Me,"ihdr",[[0,"ImageWidth"],[4,"ImageHeight"],[8,"BitDepth"],[9,"ColorType"],[10,"Compression"],[11,"Filter"],[12,"Interlace"]]),Se(fi,"ihdr",[[9,{0:"Grayscale",2:"RGB",3:"Palette",4:"Grayscale with Alpha",6:"RGB with Alpha",DEFAULT:"Unknown"}],[10,{0:"Deflate/Inflate",DEFAULT:"Unknown"}],[11,{0:"Adaptive",DEFAULT:"Unknown"}],[12,{0:"Noninterlaced",1:"Adam7 Interlace",DEFAULT:"Unknown"}]]);class Yn extends rt{static canHandle(e,t){return e.getUint8(t+1)===226&&e.getUint32(t+4)===1229144927}static findPosition(e,t){let a=super.findPosition(e,t);return a.chunkNumber=e.getUint8(t+16),a.chunkCount=e.getUint8(t+17),a.multiSegment=a.chunkCount>1,a}static handleMultiSegments(e){return(function(t){let a=(function(n){let s=n[0].constructor,o=0;for(let c of n)o+=c.length;let r=new s(o),l=0;for(let c of n)r.set(c,l),l+=c.length;return r})(t.map((n=>n.chunk.toUint8())));return new Ue(a)})(e)}parse(){return this.raw=new Map,this.parseHeader(),this.parseTags(),this.translate(),this.output}parseHeader(){let{raw:e}=this;this.chunk.byteLength<84&&fe("ICC header is too short");for(let[t,a]of Object.entries(Mw)){t=parseInt(t,10);let n=a(this.chunk,t);n!=="\0\0\0\0"&&e.set(t,n)}}parseTags(){let e,t,a,n,s,{raw:o}=this,r=this.chunk.getUint32(128),l=132,c=this.chunk.byteLength;for(;r--;){if(e=this.chunk.getString(l,4),t=this.chunk.getUint32(l+4),a=this.chunk.getUint32(l+8),n=this.chunk.getString(t,4),t+a>c)return void console.warn("reached the end of the first ICC chunk. Enable options.tiff.multiSegment to read all ICC segments.");s=this.parseTag(n,t,a),s!==void 0&&s!=="\0\0\0\0"&&o.set(e,s),l+=12}}parseTag(e,t,a){switch(e){case"desc":return this.parseDesc(t);case"mluc":return this.parseMluc(t);case"text":return this.parseText(t,a);case"sig ":return this.parseSig(t)}if(!(t+a>this.chunk.byteLength))return this.chunk.getUint8Array(t,a)}parseDesc(e){let t=this.chunk.getUint32(e+8)-1;return ci(this.chunk.getString(e+12,t))}parseText(e,t){return ci(this.chunk.getString(e+8,t-8))}parseSig(e){return ci(this.chunk.getString(e+8,4))}parseMluc(e){let{chunk:t}=this,a=t.getUint32(e+8),n=t.getUint32(e+12),s=e+16,o=[];for(let r=0;r<a;r++){let l=t.getString(s+0,2),c=t.getString(s+2,2),p=t.getUint32(s+4),u=t.getUint32(s+8)+e,f=ci(t.getUnicodeString(u,p));o.push({lang:l,country:c,text:f}),s+=n}return a===1?o[0].text:o}translateValue(e,t){return typeof e=="string"?t[e]||t[e.toLowerCase()]||e:t[e]||e}}q(Yn,"type","icc"),q(Yn,"multiSegment",!0),q(Yn,"headerLength",18);const Mw={4:Tt,8:function(i,e){return[i.getUint8(e),i.getUint8(e+1)>>4,i.getUint8(e+1)%16].map((t=>t.toString(10))).join(".")},12:Tt,16:Tt,20:Tt,24:function(i,e){const t=i.getUint16(e),a=i.getUint16(e+2)-1,n=i.getUint16(e+4),s=i.getUint16(e+6),o=i.getUint16(e+8),r=i.getUint16(e+10);return new Date(Date.UTC(t,a,n,s,o,r))},36:Tt,40:Tt,48:Tt,52:Tt,64:(i,e)=>i.getUint32(e),80:Tt};function Tt(i,e){return ci(i.getString(e,4))}Pe.set("icc",Yn),Se(Me,"icc",[[4,"ProfileCMMType"],[8,"ProfileVersion"],[12,"ProfileClass"],[16,"ColorSpaceData"],[20,"ProfileConnectionSpace"],[24,"ProfileDateTime"],[36,"ProfileFileSignature"],[40,"PrimaryPlatform"],[44,"CMMFlags"],[48,"DeviceManufacturer"],[52,"DeviceModel"],[56,"DeviceAttributes"],[64,"RenderingIntent"],[68,"ConnectionSpaceIlluminant"],[80,"ProfileCreator"],[84,"ProfileID"],["Header","ProfileHeader"],["MS00","WCSProfiles"],["bTRC","BlueTRC"],["bXYZ","BlueMatrixColumn"],["bfd","UCRBG"],["bkpt","MediaBlackPoint"],["calt","CalibrationDateTime"],["chad","ChromaticAdaptation"],["chrm","Chromaticity"],["ciis","ColorimetricIntentImageState"],["clot","ColorantTableOut"],["clro","ColorantOrder"],["clrt","ColorantTable"],["cprt","ProfileCopyright"],["crdi","CRDInfo"],["desc","ProfileDescription"],["devs","DeviceSettings"],["dmdd","DeviceModelDesc"],["dmnd","DeviceMfgDesc"],["dscm","ProfileDescriptionML"],["fpce","FocalPlaneColorimetryEstimates"],["gTRC","GreenTRC"],["gXYZ","GreenMatrixColumn"],["gamt","Gamut"],["kTRC","GrayTRC"],["lumi","Luminance"],["meas","Measurement"],["meta","Metadata"],["mmod","MakeAndModel"],["ncl2","NamedColor2"],["ncol","NamedColor"],["ndin","NativeDisplayInfo"],["pre0","Preview0"],["pre1","Preview1"],["pre2","Preview2"],["ps2i","PS2RenderingIntent"],["ps2s","PostScript2CSA"],["psd0","PostScript2CRD0"],["psd1","PostScript2CRD1"],["psd2","PostScript2CRD2"],["psd3","PostScript2CRD3"],["pseq","ProfileSequenceDesc"],["psid","ProfileSequenceIdentifier"],["psvm","PS2CRDVMSize"],["rTRC","RedTRC"],["rXYZ","RedMatrixColumn"],["resp","OutputResponse"],["rhoc","ReflectionHardcopyOrigColorimetry"],["rig0","PerceptualRenderingIntentGamut"],["rig2","SaturationRenderingIntentGamut"],["rpoc","ReflectionPrintOutputColorimetry"],["sape","SceneAppearanceEstimates"],["scoe","SceneColorimetryEstimates"],["scrd","ScreeningDesc"],["scrn","Screening"],["targ","CharTarget"],["tech","Technology"],["vcgt","VideoCardGamma"],["view","ViewingConditions"],["vued","ViewingCondDesc"],["wtpt","MediaWhitePoint"]]);const Dn={"4d2p":"Erdt Systems",AAMA:"Aamazing Technologies",ACER:"Acer",ACLT:"Acolyte Color Research",ACTI:"Actix Sytems",ADAR:"Adara Technology",ADBE:"Adobe",ADI:"ADI Systems",AGFA:"Agfa Graphics",ALMD:"Alps Electric",ALPS:"Alps Electric",ALWN:"Alwan Color Expertise",AMTI:"Amiable Technologies",AOC:"AOC International",APAG:"Apago",APPL:"Apple Computer",AST:"AST","AT&T":"AT&T",BAEL:"BARBIERI electronic",BRCO:"Barco NV",BRKP:"Breakpoint",BROT:"Brother",BULL:"Bull",BUS:"Bus Computer Systems","C-IT":"C-Itoh",CAMR:"Intel",CANO:"Canon",CARR:"Carroll Touch",CASI:"Casio",CBUS:"Colorbus PL",CEL:"Crossfield",CELx:"Crossfield",CGS:"CGS Publishing Technologies International",CHM:"Rochester Robotics",CIGL:"Colour Imaging Group, London",CITI:"Citizen",CL00:"Candela",CLIQ:"Color IQ",CMCO:"Chromaco",CMiX:"CHROMiX",COLO:"Colorgraphic Communications",COMP:"Compaq",COMp:"Compeq/Focus Technology",CONR:"Conrac Display Products",CORD:"Cordata Technologies",CPQ:"Compaq",CPRO:"ColorPro",CRN:"Cornerstone",CTX:"CTX International",CVIS:"ColorVision",CWC:"Fujitsu Laboratories",DARI:"Darius Technology",DATA:"Dataproducts",DCP:"Dry Creek Photo",DCRC:"Digital Contents Resource Center, Chung-Ang University",DELL:"Dell Computer",DIC:"Dainippon Ink and Chemicals",DICO:"Diconix",DIGI:"Digital","DL&C":"Digital Light & Color",DPLG:"Doppelganger",DS:"Dainippon Screen",DSOL:"DOOSOL",DUPN:"DuPont",EPSO:"Epson",ESKO:"Esko-Graphics",ETRI:"Electronics and Telecommunications Research Institute",EVER:"Everex Systems",EXAC:"ExactCODE",Eizo:"Eizo",FALC:"Falco Data Products",FF:"Fuji Photo Film",FFEI:"FujiFilm Electronic Imaging",FNRD:"Fnord Software",FORA:"Fora",FORE:"Forefront Technology",FP:"Fujitsu",FPA:"WayTech Development",FUJI:"Fujitsu",FX:"Fuji Xerox",GCC:"GCC Technologies",GGSL:"Global Graphics Software",GMB:"Gretagmacbeth",GMG:"GMG",GOLD:"GoldStar Technology",GOOG:"Google",GPRT:"Giantprint",GTMB:"Gretagmacbeth",GVC:"WayTech Development",GW2K:"Sony",HCI:"HCI",HDM:"Heidelberger Druckmaschinen",HERM:"Hermes",HITA:"Hitachi America",HP:"Hewlett-Packard",HTC:"Hitachi",HiTi:"HiTi Digital",IBM:"IBM",IDNT:"Scitex",IEC:"Hewlett-Packard",IIYA:"Iiyama North America",IKEG:"Ikegami Electronics",IMAG:"Image Systems",IMI:"Ingram Micro",INTC:"Intel",INTL:"N/A (INTL)",INTR:"Intra Electronics",IOCO:"Iocomm International Technology",IPS:"InfoPrint Solutions Company",IRIS:"Scitex",ISL:"Ichikawa Soft Laboratory",ITNL:"N/A (ITNL)",IVM:"IVM",IWAT:"Iwatsu Electric",Idnt:"Scitex",Inca:"Inca Digital Printers",Iris:"Scitex",JPEG:"Joint Photographic Experts Group",JSFT:"Jetsoft Development",JVC:"JVC Information Products",KART:"Scitex",KFC:"KFC Computek Components",KLH:"KLH Computers",KMHD:"Konica Minolta",KNCA:"Konica",KODA:"Kodak",KYOC:"Kyocera",Kart:"Scitex",LCAG:"Leica",LCCD:"Leeds Colour",LDAK:"Left Dakota",LEAD:"Leading Technology",LEXM:"Lexmark International",LINK:"Link Computer",LINO:"Linotronic",LITE:"Lite-On",Leaf:"Leaf",Lino:"Linotronic",MAGC:"Mag Computronic",MAGI:"MAG Innovision",MANN:"Mannesmann",MICN:"Micron Technology",MICR:"Microtek",MICV:"Microvitec",MINO:"Minolta",MITS:"Mitsubishi Electronics America",MITs:"Mitsuba",MNLT:"Minolta",MODG:"Modgraph",MONI:"Monitronix",MONS:"Monaco Systems",MORS:"Morse Technology",MOTI:"Motive Systems",MSFT:"Microsoft",MUTO:"MUTOH INDUSTRIES",Mits:"Mitsubishi Electric",NANA:"NANAO",NEC:"NEC",NEXP:"NexPress Solutions",NISS:"Nissei Sangyo America",NKON:"Nikon",NONE:"none",OCE:"Oce Technologies",OCEC:"OceColor",OKI:"Oki",OKID:"Okidata",OKIP:"Okidata",OLIV:"Olivetti",OLYM:"Olympus",ONYX:"Onyx Graphics",OPTI:"Optiquest",PACK:"Packard Bell",PANA:"Matsushita Electric Industrial",PANT:"Pantone",PBN:"Packard Bell",PFU:"PFU",PHIL:"Philips Consumer Electronics",PNTX:"HOYA",POne:"Phase One A/S",PREM:"Premier Computer Innovations",PRIN:"Princeton Graphic Systems",PRIP:"Princeton Publishing Labs",QLUX:"Hong Kong",QMS:"QMS",QPCD:"QPcard AB",QUAD:"QuadLaser",QUME:"Qume",RADI:"Radius",RDDx:"Integrated Color Solutions",RDG:"Roland DG",REDM:"REDMS Group",RELI:"Relisys",RGMS:"Rolf Gierling Multitools",RICO:"Ricoh",RNLD:"Edmund Ronald",ROYA:"Royal",RPC:"Ricoh Printing Systems",RTL:"Royal Information Electronics",SAMP:"Sampo",SAMS:"Samsung",SANT:"Jaime Santana Pomares",SCIT:"Scitex",SCRN:"Dainippon Screen",SDP:"Scitex",SEC:"Samsung",SEIK:"Seiko Instruments",SEIk:"Seikosha",SGUY:"ScanGuy.com",SHAR:"Sharp Laboratories",SICC:"International Color Consortium",SONY:"Sony",SPCL:"SpectraCal",STAR:"Star",STC:"Sampo Technology",Scit:"Scitex",Sdp:"Scitex",Sony:"Sony",TALO:"Talon Technology",TAND:"Tandy",TATU:"Tatung",TAXA:"TAXAN America",TDS:"Tokyo Denshi Sekei",TECO:"TECO Information Systems",TEGR:"Tegra",TEKT:"Tektronix",TI:"Texas Instruments",TMKR:"TypeMaker",TOSB:"Toshiba",TOSH:"Toshiba",TOTK:"TOTOKU ELECTRIC",TRIU:"Triumph",TSBT:"Toshiba",TTX:"TTX Computer Products",TVM:"TVM Professional Monitor",TW:"TW Casper",ULSX:"Ulead Systems",UNIS:"Unisys",UTZF:"Utz Fehlau & Sohn",VARI:"Varityper",VIEW:"Viewsonic",VISL:"Visual communication",VIVO:"Vivo Mobile Communication",WANG:"Wang",WLBR:"Wilbur Imaging",WTG2:"Ware To Go",WYSE:"WYSE Technology",XERX:"Xerox",XRIT:"X-Rite",ZRAN:"Zoran",Zebr:"Zebra Technologies",appl:"Apple Computer",bICC:"basICColor",berg:"bergdesign",ceyd:"Integrated Color Solutions",clsp:"MacDermid ColorSpan",ds:"Dainippon Screen",dupn:"DuPont",ffei:"FujiFilm Electronic Imaging",flux:"FluxData",iris:"Scitex",kart:"Scitex",lcms:"Little CMS",lino:"Linotronic",none:"none",ob4d:"Erdt Systems",obic:"Medigraph",quby:"Qubyx Sarl",scit:"Scitex",scrn:"Dainippon Screen",sdp:"Scitex",siwi:"SIWI GRAFIKA",yxym:"YxyMaster"},Ku={scnr:"Scanner",mntr:"Monitor",prtr:"Printer",link:"Device Link",abst:"Abstract",spac:"Color Space Conversion Profile",nmcl:"Named Color",cenc:"ColorEncodingSpace profile",mid:"MultiplexIdentification profile",mlnk:"MultiplexLink profile",mvis:"MultiplexVisualization profile",nkpf:"Nikon Input Device Profile (NON-STANDARD!)"};Se(fi,"icc",[[4,Dn],[12,Ku],[40,Object.assign({},Dn,Ku)],[48,Dn],[80,Dn],[64,{0:"Perceptual",1:"Relative Colorimetric",2:"Saturation",3:"Absolute Colorimetric"}],["tech",{amd:"Active Matrix Display",crt:"Cathode Ray Tube Display",kpcd:"Photo CD",pmd:"Passive Matrix Display",dcam:"Digital Camera",dcpj:"Digital Cinema Projector",dmpc:"Digital Motion Picture Camera",dsub:"Dye Sublimation Printer",epho:"Electrophotographic Printer",esta:"Electrostatic Printer",flex:"Flexography",fprn:"Film Writer",fscn:"Film Scanner",grav:"Gravure",ijet:"Ink Jet Printer",imgs:"Photo Image Setter",mpfr:"Motion Picture Film Recorder",mpfs:"Motion Picture Film Scanner",offs:"Offset Lithography",pjtv:"Projection Television",rpho:"Photographic Paper Printer",rscn:"Reflective Scanner",silk:"Silkscreen",twax:"Thermal Wax Printer",vidc:"Video Camera",vidm:"Video Monitor"}]]);class An extends rt{static canHandle(e,t,a){return e.getUint8(t+1)===237&&e.getString(t+4,9)==="Photoshop"&&this.containsIptc8bim(e,t,a)!==void 0}static headerLength(e,t,a){let n,s=this.containsIptc8bim(e,t,a);if(s!==void 0)return n=e.getUint8(t+s+7),n%2!=0&&(n+=1),n===0&&(n=4),s+8+n}static containsIptc8bim(e,t,a){for(let n=0;n<a;n++)if(this.isIptcSegmentHead(e,t+n))return n}static isIptcSegmentHead(e,t){return e.getUint8(t)===56&&e.getUint32(t)===943868237&&e.getUint16(t+4)===1028}parse(){let{raw:e}=this,t=this.chunk.byteLength-1,a=!1;for(let n=0;n<t;n++)if(this.chunk.getUint8(n)===28&&this.chunk.getUint8(n+1)===2){a=!0;let s=this.chunk.getUint16(n+3),o=this.chunk.getUint8(n+2),r=this.chunk.getLatin1String(n+5,s);e.set(o,this.pluralizeValue(e.get(o),r)),n+=4+s}else if(a)break;return this.translate(),this.output}pluralizeValue(e,t){return e!==void 0?e instanceof Array?(e.push(t),e):[e,t]:t}}q(An,"type","iptc"),q(An,"translateValues",!1),q(An,"reviveValues",!1),Pe.set("iptc",An),Se(Me,"iptc",[[0,"ApplicationRecordVersion"],[3,"ObjectTypeReference"],[4,"ObjectAttributeReference"],[5,"ObjectName"],[7,"EditStatus"],[8,"EditorialUpdate"],[10,"Urgency"],[12,"SubjectReference"],[15,"Category"],[20,"SupplementalCategories"],[22,"FixtureIdentifier"],[25,"Keywords"],[26,"ContentLocationCode"],[27,"ContentLocationName"],[30,"ReleaseDate"],[35,"ReleaseTime"],[37,"ExpirationDate"],[38,"ExpirationTime"],[40,"SpecialInstructions"],[42,"ActionAdvised"],[45,"ReferenceService"],[47,"ReferenceDate"],[50,"ReferenceNumber"],[55,"DateCreated"],[60,"TimeCreated"],[62,"DigitalCreationDate"],[63,"DigitalCreationTime"],[65,"OriginatingProgram"],[70,"ProgramVersion"],[75,"ObjectCycle"],[80,"Byline"],[85,"BylineTitle"],[90,"City"],[92,"Sublocation"],[95,"State"],[100,"CountryCode"],[101,"Country"],[103,"OriginalTransmissionReference"],[105,"Headline"],[110,"Credit"],[115,"Source"],[116,"CopyrightNotice"],[118,"Contact"],[120,"Caption"],[121,"LocalCaption"],[122,"Writer"],[125,"RasterizedCaption"],[130,"ImageType"],[131,"ImageOrientation"],[135,"LanguageIdentifier"],[150,"AudioType"],[151,"AudioSamplingRate"],[152,"AudioSamplingResolution"],[153,"AudioDuration"],[154,"AudioOutcue"],[184,"JobID"],[185,"MasterDocumentID"],[186,"ShortDocumentID"],[187,"UniqueDocumentID"],[188,"OwnerID"],[200,"ObjectPreviewFileFormat"],[201,"ObjectPreviewFileVersion"],[202,"ObjectPreviewData"],[221,"Prefs"],[225,"ClassifyState"],[228,"SimilarityIndex"],[230,"DocumentNotes"],[231,"DocumentHistory"],[232,"ExifCameraInfo"],[255,"CatalogSets"]]),Se(fi,"iptc",[[10,{0:"0 (reserved)",1:"1 (most urgent)",2:"2",3:"3",4:"4",5:"5 (normal urgency)",6:"6",7:"7",8:"8 (least urgent)",9:"9 (user-defined priority)"}],[75,{a:"Morning",b:"Both Morning and Evening",p:"Evening"}],[131,{L:"Landscape",P:"Portrait",S:"Square"}]]);const In={zip:rw,gz:_o,tgz:_o,deflate:_o};class Bw extends me{constructor(e,t){const a={};super(e,{...a,...t}),this.id=this.opts.id||"PrepareUpload",this.type="progressindicator",this.i18nInit()}setHashFileName=async e=>{const{id:t}=e,a=this.uppy.getFile(t);if(a){const{data:n}=a,s=1024*1024*5,r=await n.slice(0,s).text(),l=new uw;l.append(r);const c=l.end(),p=Di(a),u=`${c}${p?`.${p}`:""}`;this.uppy.setFileState(t,{hashFileName:u})}};setMetaData=async e=>{const{id:t}=e,a=this.uppy.getFile(t);if(a){const{data:{webkitRelativePath:n,relativePath:s,name:o},hashFileName:r,size:l}=a,c=s||n||o||r;this.uppy.setFileMeta(t,{relativePath:c,name:c})}};preventXssAttack=async e=>{const{id:t}=e,a=this.uppy.getFile(t);if(a){const{name:n,meta:s}=this.uppy.getFile(t),o=mi.sanitize(n);if(n!==o){const l=Di(a),c=o.endsWith(`.${l}`)?o:`${o}.${l}`;this.uppy.setFileState(t,{name:c,meta:{...s,name:c,filename:c}})}if(await Ch(a)){const{data:l,name:c,type:p}=this.uppy.getFile(t),u=await l.text(),f=new Set;new DOMParser().parseFromString(u,"image/svg+xml").querySelectorAll("[id]").forEach(w=>f.add(w.id)),mi.addHook("uponSanitizeElement",(w,y)=>{if(y.tagName==="use"){const b=w.getAttribute("xlink:href")||w.getAttribute("href");if(b&&b.startsWith("#")){const h=b.substring(1);f.has(h)&&(y.allowedTags.use=!0,y.forceKeepNode=!0)}}}),mi.addHook("uponSanitizeAttribute",(w,y)=>{if(y.attrName==="xlink:href"&&y.attrValue){if(y.attrValue.startsWith("#")){const b=y.attrValue.substring(1);if(f.has(b)){y.forceKeepAttr=!0;return}}y.keepAttr=!1}["width","height"].includes(y.attrName)&&y.attrValue==="100%"&&(y.forceKeepAttr=!0),y.attrName==="style"&&y.attrValue==="overflow:visible"&&(y.forceKeepAttr=!0)});const C=mi.sanitize(u,{USE_PROFILES:{svg:!0,svgFilters:!0},ALLOWED_TAGS:["svg","circle","ellipse","line","path","polygon","polyline","rect","g","text","use","defs","clipPath","mask","pattern","linearGradient","radialGradient","stop"],ALLOWED_ATTR:["d","points","x","y","width","height","r","cx","cy","rx","ry","x1","y1","x2","y2","transform","fill","stroke","stroke-width","viewBox","xmlns","xmlns:xlink","xml:space","style","id","class","offset","stop-color","stop-opacity","clip-path","mask","fill-opacity","stroke-opacity","gradientTransform","gradientUnits","xlink:href"],FORBID_TAGS:["a","script","iframe","image","foreignObject"],FORBID_ATTR:["href","onclick","onload","onerror"]});if(mi.removeHook("uponSanitizeElement"),mi.removeHook("uponSanitizeAttribute"),u!==C){const w=new Blob([C],{type:p}),y=Wn(w,c);this.uppy.setFileState(t,{...this.uppy.getFile(t),data:y,preview:xa(y)}),console.info("clean svg file xss attack",{name:c,originalFile:a.data.text(),cleanFile:C})}}}};preventZipBombAttack=async e=>{const{id:t}=e,a=this.uppy.getFile(t);try{if(a&&In[a.extension]){const{data:n}=a,s=In[a.extension](new Uint8Array(await n.arrayBuffer())),o=(l,c,p=0)=>Object.entries(l instanceof Uint8Array?{[c||a.name]:l}:l).reduce((u,[f,x])=>{if(!x||x.byteLength===0)return console.warn("Invalid or empty item in unzipped content",{name:f,item:x}),u;const S=u+x.byteLength;if(p>=5||S>a.size*100)throw console.error("Zip bomb detected, please check your file",{depth:p,baseAcc:S,fileSize:a.size}),new Error("Zip bomb detected, please check your file");const C=Ke.extension(Ke.lookup(f));if(In[C]){const w=In[C](x);return S+o(w,f,p+1)}return S},0);if(o(s)>a.size*100)throw new Error("Zip bomb detected, please check your file")}}catch(n){if(n.message.includes("Zip bomb detected"))throw n}};validateImagesRespectCropperOptions=async()=>this.uppy.getFiles().reduce(async(e,t)=>{await e;const{id:a}=t;let n=this.uppy.getFile(a);if(n.isRemote&&(await this.tryDownloadRemoteFile(n),n=this.uppy.getFile(a)),!this.opts.cropperOptions?.aspectRatio||!n?.type?.includes("image")||n.type?.includes("image/svg"))return Promise.resolve();const{aspectRatio:s}=this.opts.cropperOptions,o=this.uppy.getPlugin("ImageEditor"),r=document.querySelector(`[src="${n.preview}"]`)||document.getElementById("uppy_"+a).querySelector("img"),l=r?.naturalWidth,c=r?.naturalHeight,p=Number(l/c).toFixed(2),u=Number(s).toFixed(2);if(p===u)return Promise.resolve();this.uppy.emit("preprocess-progress",n,{mode:"indeterminate",message:this.i18n("editorLoading")}),o.parent.openFileEditor(n);const x=this.i18n("aspectRatioMessage",{imageAspectRatio:p,aspectRatio:u});return this.uppy.info({message:x,details:x}),new Promise((S,C)=>{this.uppy.once("file-editor:complete",()=>{setTimeout(()=>{S()},200)}),this.uppy.once("file-editor:cancel",()=>{})})},Promise.resolve());checkImageOrientation=async e=>{const{id:t}=e,a=this.uppy.getFile(t);if(a?.type?.startsWith("image/"))try{if(!(await _w(a.data).catch(()=>({deg:0}))).deg)return;const s=a.data.size*.98,o=await new Promise((C,w)=>{const y=new Image;let b=URL.createObjectURL(a.data);y.src=b,y.onload=()=>{URL.revokeObjectURL(b),b=null,C(y)},y.onerror=h=>{b&&(URL.revokeObjectURL(b),b=null),w(new Error(`Image load failed: ${h.message}`))}}),r=o.width/o.height;let l=Math.sqrt(s*r),c=l/r;const p=8096;if(l>p||c>p){const C=p/Math.max(l,c);l*=C,c*=C}const u=document.createElement("canvas");u.width=l,u.height=c;const f=u.getContext("2d",{willReadFrequently:!0,alpha:a.type==="image/png"});f.imageSmoothingEnabled=!0,f.imageSmoothingQuality="high",f.translate(u.width/2,u.height/2),f.drawImage(o,-l/2,-c/2,l,c);const x=1,S=await new Promise(C=>{u.toBlob(C,a.type,x)});this.uppy.setFileState(t,{data:S,size:S.size})}catch(n){console.error("Image rotation processing failed:",n);return}};prepareUploadWrapper=async e=>{await this.tryDownloadRemoteFile(e),await this.checkImageOrientation(e),await this.getPreviewFromData(e),await this.setHashFileName(e),this.opts.disableXssAttack||await this.preventXssAttack(e),await this.preventZipBombAttack(e),await this.setMetaData(e)};tryDownloadRemoteFile=async e=>{const{type:t,name:a,preview:n,source:s,isRemote:o,isDownloading:r,id:l,isLoading:c,remote:p,meta:u,errorCount:f=0}=e,x=!c&&o,S=`uploader:${l}:downloaded`,C=Di(e),w=a?.split("?")?.[0],b=(()=>{const h=["jpg","jpeg"];return h.includes(C)&&h.some(m=>w?.endsWith(m))?!0:w?.endsWith(C)})()?w:`${w}${C?`.${C}`:""}`;if(x){const h=yh(n||p?.body?.url);if(f>=3)throw this.uppy.setFileState(l,{error:this.i18n("downloadRemoteFileFailure"),meta:{...u,name:this.i18n("downloadRemoteFileFailure")}}),new Error("Download remote file failure");this.uppy.setFileState(l,{isLoading:!0,isDownloading:!0,size:null,meta:{...u,name:this.i18n("loading")}}),await fetch(h).then(async m=>await m.blob()).then(async m=>{const v=Wn(m,b);this.uppy.setFileState(l,{name:b,extension:C,type:t,data:v,preview:n||xa(v),source:s,size:v.size,isDownloading:!1,isRemote:!1,meta:{...u,name:b,filename:b}}),this.uppy.getFile(l),this.uppy.emit(S,l)}).catch(async m=>{if(console.error("Axios download remote file error: ",m),t.startsWith("image/")){const v=t.includes("svg")?"image/png":t,g=b.endsWith(".svg")?b.replace(".svg",".png"):b;try{const k=await new Promise((N,z)=>{const j=new Image;j.crossOrigin="anonymous",j.onload=()=>{const O=document.createElement("canvas");O.width=j.width,O.height=j.height;const $=O.getContext("2d");$.translate(O.width/2,O.height/2),$.drawImage(j,-j.width/2,-j.height/2,j.width,j.height),O.toBlob(N,v)},j.onerror=z,j.src=h});let E=Wn(k,g);this.uppy.setFileState(l,{name:g,extension:C,type:v,data:E,preview:n||xa(E),source:s,size:E.size,isDownloading:!1,isRemote:!1,meta:{...u,name:g,filename:g}});const A=this.uppy.getFile(l);this.uppy.emit(S,l);return}catch{}}this.uppy.setFileState(l,{isRemote:!0,isLoading:!1,errorCount:f+1}),await this.tryDownloadRemoteFile(this.uppy.getFile(l))})}else r&&await(async()=>new Promise(m=>{this.uppy.once(S,async()=>{m()})}))()};getPreviewFromData=e=>{const{id:t}=e,a=this.uppy.getFile(t);if(a){const{data:n,type:s,preview:o}=a;(s.indexOf("gif")>-1||!o)&&n&&s.indexOf("image")>-1&&setTimeout(()=>{this.uppy.setFileState(t,{preview:xa(n)})},s.indexOf("gif")>-1?1e3:0)}};prepareUpload=async e=>{await this.validateImagesRespectCropperOptions();const t=e.map(async n=>{const s=this.uppy.getFile(n);s.isDownloading&&this.uppy.emit("preprocess-progress",s,{mode:"indeterminate",message:this.i18n("loading")}),await this.prepareUploadWrapper(s)}),a=()=>{e.forEach(n=>{const s=this.uppy.getFile(n);this.uppy.emit("preprocess-complete",s)})};return Promise.all(t).then(a)};install(){this.uppy.addPreProcessor(this.prepareUpload),this.uppy.on("file-added",async e=>{setTimeout(()=>{this.prepareUploadWrapper(e)},200)}),this.uppy.on("file-editor:complete",e=>{this.getPreviewFromData(e)})}uninstall(){this.uppy.removePreProcessor(this.prepareUpload)}render(){return le(Ve,{})}}class Lw extends me{constructor(e,t){super(e,t),this.id=this.opts.id||"AIImage",this.title=this.opts.title||"AI Image",this.type="acquirer",this.uppy=e,this.i18nInit(),this.icon=()=>le("svg",{width:"20",height:"20",viewBox:"0 0 24 24",children:le("g",{fill:"none",stroke:"#a482fe","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",children:[le("path",{d:"M15 8h.01M10 21H6a3 3 0 0 1-3-3V6a3 3 0 0 1 3-3h12a3 3 0 0 1 3 3v5"}),le("path",{d:"m3 16l5-5c.928-.893 2.072-.893 3 0l1 1m2 9v-4a2 2 0 1 1 4 0v4m-4-2h4m3-4v6"})]})})}render(){return le("div",{id:"ai-image",className:"ai-image",children:le("div",{style:{height:"100%",display:"flex",justifyContent:"center",alignItems:"center"},children:this.i18n("loading")})})}update(){}onFirstRender(){}install(){const{target:e}=this.opts;e&&this.mount(e,this)}uninstall(){this.unmount()}}class Nw extends me{constructor(e,t){super(e,t),this.id=t.id,this.title=t.title,this.type="acquirer",this.uppy=e,this.i18nInit(),this.autoHide=t.autoHide??!0,typeof t.icon=="string"&&(this.icon=()=>le("div",{dangerouslySetInnerHTML:{__html:t.icon},style:{width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center"}}))}getDashboard(){return this.uppy.getPlugin(this.id)?.parent}render(){return this.autoHide&&this.getDashboard()?.hideAllPanels&&this.getDashboard().hideAllPanels(),le("div",{id:this.id,className:"uppy-VirtualPlugin"})}update(){}onFirstRender(){}uninstall(){this.unmount()}}const Yu=()=>navigator.userAgent.includes("Safari")&&!navigator.userAgent.includes("Chrome");class zw extends me{constructor(e,t){super(e,t),this.id=t?.id||"safari-paste",this.type="modifier"}onMount(){Yu()&&this.parent?.handlePaste&&document.addEventListener("paste",this.parent.handlePaste)}onUnmount(){Yu()&&this.parent?.handlePaste&&document.removeEventListener("paste",this.parent.handlePaste)}}const jw="z8ia1mAXo8ZE7ytGF36L5uBf9kD2kenhqFGp9",$w=K.lazy(()=>gf(()=>import("./index-DaVz8byr.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10]),import.meta.url)),Qu="uploader-container",Ro="uploader-dashboard",Hw='div[tabindex="-1"]',Ju=50,qw=10,Rr=localStorage.getItem("uppy_debug"),Vw=()=>Mo.get("x-csrf-token")?{"x-csrf-token":Mo.get("x-csrf-token")}:{},Ww=i=>{const{apiPathProps:e,availablePluginMap:t={},uploadedProps:a,resourcesProps:n,imageEditorProps:s={},theme:o,plugins:r,disableXssAttack:l}=i,{companionUrl:c}=fl(e),p=Vw(),u=async x=>(await Ni.post("/api/image/generations",x)).data,f={...i?.restrictions,maxFileSize:1/0};return[{id:"ImageEditor",plugin:Wd,options:{quality:1,...s},alwayUse:!0},(Rr||Ai()&&t.Uploaded&&!wr())&&{id:"Uploaded",plugin:Bx,options:{params:a?.params}},(Rr||Ai()&&t.Resources&&!wr())&&{id:"Resources",plugin:Nx,options:{params:n?.params}},Ai()&&(window.blocklet?.preferences?.useAiImage||t.AIImage)&&{id:"AIImage",plugin:Lw,options:{companionUrl:c,companionHeaders:p},onShowPanel:x=>{function S(){setTimeout(()=>{const C=document.getElementById("ai-image");C?mf.createRoot(C).render(B.jsx($w,{theme:o,api:u,restrictions:f,i18n:x.current?.getUploader()?.i18n,onSelect:w=>{const y=x.current.getUploader();y?.emit("ai-image:selected",w),w.forEach(({src:b,alt:h},m)=>{const v=E=>E?.length>16?`${E?.slice(0,8)}...${E?.slice(-4)}`:E,g=`${v(h)||v(b)}.png`,k={name:g,type:"image/png",data:bh(b,g),source:"AIImage",isRemote:!1};y?.addFile(k)})}})):S()},100)}S()}},{id:"Url",plugin:$t,options:{companionUrl:c,companionHeaders:p}},{id:"Webcam",plugin:Cp,options:{showVideoSourceDropdown:!0,showRecordingLength:!0,mirror:!1,videoConstraints:{facingMode:"environment"}}},!!window?.blocklet?.UNSPLASH_KEY&&t.Unsplash&&{id:"Unsplash",plugin:Vp,options:{companionUrl:c,companionHeaders:p,companionCookiesRule:"same-origin"}},{id:"PrepareUpload",plugin:Bw,options:{companionUrl:c,companionHeaders:p,cropperOptions:s?.cropperOptions||null,disableXssAttack:l},alwayUse:!0},{id:"ThumbnailGeneratorNext",plugin:Yr,options:{thumbnailType:"image/png",thumbnailWidth:"100%"},alwayUse:!0},...(r||[]).filter(x=>x?.id).map(x=>{const{id:S,options:C,onShowPanel:w}=x;return{id:S,plugin:Nw,options:C,onShowPanel:w}}),{id:"safari-paste",plugin:zw,alwayUse:!0}].filter(Boolean)};function Vh(i){const{id:e,plugins:t,locale:a="en",onAfterResponse:n,onUploadFinish:s,coreProps:o,apiPathProps:r,tusProps:l,dropTargetProps:c,pluginList:p,restrictions:u,onChange:f,initialFiles:x}=i,S=ap(p,"id"),{uploaderUrl:C}=fl(r);let w=new Br({id:e,meta:{uploaderId:e},debug:["true",!0].includes(Rr||""),locale:ya[a],onBeforeFileAdded:(h,m)=>{if(Object.hasOwn(m,h.id))return!1;const v=!!Ke.extension(h.type),g=Ke.lookup(h.name)||"";if(!v&&g&&g!==h.type){const k=Di(h);k&&(h.extension=k),h.type=g}return h},...o,restrictions:u}).use(fh,{chunkSize:1024*1024*10,removeFingerprintOnSuccess:!0,withCredentials:!0,endpoint:C,async onBeforeRequest(h,m){const{hashFileName:v,id:g,meta:k}=m,E=w.getFile(g)?.mockResponse||null;h.getMethod()==="PATCH"&&E&&(h.send=()=>E);const A=Di(m);h.setHeader("x-uploader-file-name",`${v}`),h.setHeader("x-uploader-file-id",`${g}`),h.setHeader("x-uploader-file-ext",`${A}`),h.setHeader("x-uploader-base-url",new URL(h.getURL()).pathname),h.setHeader("x-uploader-endpoint-url",C),h.setHeader("x-uploader-metadata",JSON.stringify(k,(j,O)=>typeof O=="string"?encodeURIComponent(O):O));const N=Mo.get("x-csrf-token");N&&h.setHeader("x-csrf-token",N);const z=window?.uploaderComponentId||window?.blocklet?.componentId;z&&h.setHeader("x-component-did",(z||"").split("/").pop())},onAfterResponse:async(h,m)=>{const v={},g=h.getUnderlyingObject();try{g.response&&(v.data=JSON.parse(g.response))}catch{v.data={}}v.method=h.getMethod().toUpperCase(),v.url=h.getURL(),v.status=g.status,v.headers={...h._headers};const k=g.getAllResponseHeaders();k&&k.split(`\r
|
|
49
|
+
Please create an issue at https://github.com/MikeKovarik/exifr with this file`),[this.file.getUintBytes(a+r,n),this.file.getUintBytes(a+r+n,s)];a+=S*p}}}class zh extends Nh{}q(zh,"type","heic");class Nu extends Nh{}q(Nu,"type","avif"),Ui.set("heic",zh),Ui.set("avif",Nu),Se(Me,["ifd0","ifd1"],[[256,"ImageWidth"],[257,"ImageHeight"],[258,"BitsPerSample"],[259,"Compression"],[262,"PhotometricInterpretation"],[270,"ImageDescription"],[271,"Make"],[272,"Model"],[273,"StripOffsets"],[274,"Orientation"],[277,"SamplesPerPixel"],[278,"RowsPerStrip"],[279,"StripByteCounts"],[282,"XResolution"],[283,"YResolution"],[284,"PlanarConfiguration"],[296,"ResolutionUnit"],[301,"TransferFunction"],[305,"Software"],[306,"ModifyDate"],[315,"Artist"],[316,"HostComputer"],[317,"Predictor"],[318,"WhitePoint"],[319,"PrimaryChromaticities"],[513,"ThumbnailOffset"],[514,"ThumbnailLength"],[529,"YCbCrCoefficients"],[530,"YCbCrSubSampling"],[531,"YCbCrPositioning"],[532,"ReferenceBlackWhite"],[700,"ApplicationNotes"],[33432,"Copyright"],[33723,"IPTC"],[34665,"ExifIFD"],[34675,"ICC"],[34853,"GpsIFD"],[330,"SubIFD"],[40965,"InteropIFD"],[40091,"XPTitle"],[40092,"XPComment"],[40093,"XPAuthor"],[40094,"XPKeywords"],[40095,"XPSubject"]]),Se(Me,"exif",[[33434,"ExposureTime"],[33437,"FNumber"],[34850,"ExposureProgram"],[34852,"SpectralSensitivity"],[34855,"ISO"],[34858,"TimeZoneOffset"],[34859,"SelfTimerMode"],[34864,"SensitivityType"],[34865,"StandardOutputSensitivity"],[34866,"RecommendedExposureIndex"],[34867,"ISOSpeed"],[34868,"ISOSpeedLatitudeyyy"],[34869,"ISOSpeedLatitudezzz"],[36864,"ExifVersion"],[36867,"DateTimeOriginal"],[36868,"CreateDate"],[36873,"GooglePlusUploadCode"],[36880,"OffsetTime"],[36881,"OffsetTimeOriginal"],[36882,"OffsetTimeDigitized"],[37121,"ComponentsConfiguration"],[37122,"CompressedBitsPerPixel"],[37377,"ShutterSpeedValue"],[37378,"ApertureValue"],[37379,"BrightnessValue"],[37380,"ExposureCompensation"],[37381,"MaxApertureValue"],[37382,"SubjectDistance"],[37383,"MeteringMode"],[37384,"LightSource"],[37385,"Flash"],[37386,"FocalLength"],[37393,"ImageNumber"],[37394,"SecurityClassification"],[37395,"ImageHistory"],[37396,"SubjectArea"],[37500,"MakerNote"],[37510,"UserComment"],[37520,"SubSecTime"],[37521,"SubSecTimeOriginal"],[37522,"SubSecTimeDigitized"],[37888,"AmbientTemperature"],[37889,"Humidity"],[37890,"Pressure"],[37891,"WaterDepth"],[37892,"Acceleration"],[37893,"CameraElevationAngle"],[40960,"FlashpixVersion"],[40961,"ColorSpace"],[40962,"ExifImageWidth"],[40963,"ExifImageHeight"],[40964,"RelatedSoundFile"],[41483,"FlashEnergy"],[41486,"FocalPlaneXResolution"],[41487,"FocalPlaneYResolution"],[41488,"FocalPlaneResolutionUnit"],[41492,"SubjectLocation"],[41493,"ExposureIndex"],[41495,"SensingMethod"],[41728,"FileSource"],[41729,"SceneType"],[41730,"CFAPattern"],[41985,"CustomRendered"],[41986,"ExposureMode"],[41987,"WhiteBalance"],[41988,"DigitalZoomRatio"],[41989,"FocalLengthIn35mmFormat"],[41990,"SceneCaptureType"],[41991,"GainControl"],[41992,"Contrast"],[41993,"Saturation"],[41994,"Sharpness"],[41996,"SubjectDistanceRange"],[42016,"ImageUniqueID"],[42032,"OwnerName"],[42033,"SerialNumber"],[42034,"LensInfo"],[42035,"LensMake"],[42036,"LensModel"],[42037,"LensSerialNumber"],[42080,"CompositeImage"],[42081,"CompositeImageCount"],[42082,"CompositeImageExposureTimes"],[42240,"Gamma"],[59932,"Padding"],[59933,"OffsetSchema"],[65e3,"OwnerName"],[65001,"SerialNumber"],[65002,"Lens"],[65100,"RawFile"],[65101,"Converter"],[65102,"WhiteBalance"],[65105,"Exposure"],[65106,"Shadows"],[65107,"Brightness"],[65108,"Contrast"],[65109,"Saturation"],[65110,"Sharpness"],[65111,"Smoothness"],[65112,"MoireFilter"],[40965,"InteropIFD"]]),Se(Me,"gps",[[0,"GPSVersionID"],[1,"GPSLatitudeRef"],[2,"GPSLatitude"],[3,"GPSLongitudeRef"],[4,"GPSLongitude"],[5,"GPSAltitudeRef"],[6,"GPSAltitude"],[7,"GPSTimeStamp"],[8,"GPSSatellites"],[9,"GPSStatus"],[10,"GPSMeasureMode"],[11,"GPSDOP"],[12,"GPSSpeedRef"],[13,"GPSSpeed"],[14,"GPSTrackRef"],[15,"GPSTrack"],[16,"GPSImgDirectionRef"],[17,"GPSImgDirection"],[18,"GPSMapDatum"],[19,"GPSDestLatitudeRef"],[20,"GPSDestLatitude"],[21,"GPSDestLongitudeRef"],[22,"GPSDestLongitude"],[23,"GPSDestBearingRef"],[24,"GPSDestBearing"],[25,"GPSDestDistanceRef"],[26,"GPSDestDistance"],[27,"GPSProcessingMethod"],[28,"GPSAreaInformation"],[29,"GPSDateStamp"],[30,"GPSDifferential"],[31,"GPSHPositioningError"]]),Se(fi,["ifd0","ifd1"],[[274,{1:"Horizontal (normal)",2:"Mirror horizontal",3:"Rotate 180",4:"Mirror vertical",5:"Mirror horizontal and rotate 270 CW",6:"Rotate 90 CW",7:"Mirror horizontal and rotate 90 CW",8:"Rotate 270 CW"}],[296,{1:"None",2:"inches",3:"cm"}]]);let Ra=Se(fi,"exif",[[34850,{0:"Not defined",1:"Manual",2:"Normal program",3:"Aperture priority",4:"Shutter priority",5:"Creative program",6:"Action program",7:"Portrait mode",8:"Landscape mode"}],[37121,{0:"-",1:"Y",2:"Cb",3:"Cr",4:"R",5:"G",6:"B"}],[37383,{0:"Unknown",1:"Average",2:"CenterWeightedAverage",3:"Spot",4:"MultiSpot",5:"Pattern",6:"Partial",255:"Other"}],[37384,{0:"Unknown",1:"Daylight",2:"Fluorescent",3:"Tungsten (incandescent light)",4:"Flash",9:"Fine weather",10:"Cloudy weather",11:"Shade",12:"Daylight fluorescent (D 5700 - 7100K)",13:"Day white fluorescent (N 4600 - 5400K)",14:"Cool white fluorescent (W 3900 - 4500K)",15:"White fluorescent (WW 3200 - 3700K)",17:"Standard light A",18:"Standard light B",19:"Standard light C",20:"D55",21:"D65",22:"D75",23:"D50",24:"ISO studio tungsten",255:"Other"}],[37385,{0:"Flash did not fire",1:"Flash fired",5:"Strobe return light not detected",7:"Strobe return light detected",9:"Flash fired, compulsory flash mode",13:"Flash fired, compulsory flash mode, return light not detected",15:"Flash fired, compulsory flash mode, return light detected",16:"Flash did not fire, compulsory flash mode",24:"Flash did not fire, auto mode",25:"Flash fired, auto mode",29:"Flash fired, auto mode, return light not detected",31:"Flash fired, auto mode, return light detected",32:"No flash function",65:"Flash fired, red-eye reduction mode",69:"Flash fired, red-eye reduction mode, return light not detected",71:"Flash fired, red-eye reduction mode, return light detected",73:"Flash fired, compulsory flash mode, red-eye reduction mode",77:"Flash fired, compulsory flash mode, red-eye reduction mode, return light not detected",79:"Flash fired, compulsory flash mode, red-eye reduction mode, return light detected",89:"Flash fired, auto mode, red-eye reduction mode",93:"Flash fired, auto mode, return light not detected, red-eye reduction mode",95:"Flash fired, auto mode, return light detected, red-eye reduction mode"}],[41495,{1:"Not defined",2:"One-chip color area sensor",3:"Two-chip color area sensor",4:"Three-chip color area sensor",5:"Color sequential area sensor",7:"Trilinear sensor",8:"Color sequential linear sensor"}],[41728,{1:"Film Scanner",2:"Reflection Print Scanner",3:"Digital Camera"}],[41729,{1:"Directly photographed"}],[41985,{0:"Normal",1:"Custom",2:"HDR (no original saved)",3:"HDR (original saved)",4:"Original (for HDR)",6:"Panorama",7:"Portrait HDR",8:"Portrait"}],[41986,{0:"Auto",1:"Manual",2:"Auto bracket"}],[41987,{0:"Auto",1:"Manual"}],[41990,{0:"Standard",1:"Landscape",2:"Portrait",3:"Night",4:"Other"}],[41991,{0:"None",1:"Low gain up",2:"High gain up",3:"Low gain down",4:"High gain down"}],[41996,{0:"Unknown",1:"Macro",2:"Close",3:"Distant"}],[42080,{0:"Unknown",1:"Not a Composite Image",2:"General Composite Image",3:"Composite Image Captured While Shooting"}]]);const zu={1:"No absolute unit of measurement",2:"Inch",3:"Centimeter"};Ra.set(37392,zu),Ra.set(41488,zu);const Do={0:"Normal",1:"Low",2:"High"};function ju(i){return typeof i=="object"&&i.length!==void 0?i[0]:i}function $u(i){let e=Array.from(i).slice(1);return e[1]>15&&(e=e.map((t=>String.fromCharCode(t)))),e[2]!=="0"&&e[2]!==0||e.pop(),e.join(".")}function Ao(i){if(typeof i=="string"){var[e,t,a,n,s,o]=i.trim().split(/[-: ]/g).map(Number),r=new Date(e,t-1,a);return Number.isNaN(n)||Number.isNaN(s)||Number.isNaN(o)||(r.setHours(n),r.setMinutes(s),r.setSeconds(o)),Number.isNaN(+r)?i:r}}function fa(i){if(typeof i=="string")return i;let e=[];if(i[1]===0&&i[i.length-1]===0)for(let t=0;t<i.length;t+=2)e.push(Hu(i[t+1],i[t]));else for(let t=0;t<i.length;t+=2)e.push(Hu(i[t],i[t+1]));return ci(String.fromCodePoint(...e))}function Hu(i,e){return i<<8|e}Ra.set(41992,Do),Ra.set(41993,Do),Ra.set(41994,Do),Se(Kn,["ifd0","ifd1"],[[50827,function(i){return typeof i!="string"?Uh(i):i}],[306,Ao],[40091,fa],[40092,fa],[40093,fa],[40094,fa],[40095,fa]]),Se(Kn,"exif",[[40960,$u],[36864,$u],[36867,Ao],[36868,Ao],[40962,ju],[40963,ju]]),Se(Kn,"gps",[[0,i=>Array.from(i).join(".")],[7,i=>Array.from(i).join(":")]]);class Io extends rt{static canHandle(e,t){return e.getUint8(t+1)===225&&e.getUint32(t+4)===1752462448&&e.getString(t+4,20)==="http://ns.adobe.com/"}static headerLength(e,t){return e.getString(t+4,34)==="http://ns.adobe.com/xmp/extension/"?79:33}static findPosition(e,t){let a=super.findPosition(e,t);return a.multiSegment=a.extended=a.headerLength===79,a.multiSegment?(a.chunkCount=e.getUint8(t+72),a.chunkNumber=e.getUint8(t+76),e.getUint8(t+77)!==0&&a.chunkNumber++):(a.chunkCount=1/0,a.chunkNumber=-1),a}static handleMultiSegments(e){return e.map((t=>t.chunk.getString())).join("")}normalizeInput(e){return typeof e=="string"?e:Ue.from(e).getString()}parse(e=this.chunk){if(!this.localOptions.parse)return e;e=(function(s){let o={},r={};for(let l of qh)o[l]=[],r[l]=0;return s.replace(Ow,((l,c,p)=>{if(c==="<"){let u=++r[p];return o[p].push(u),`${l}#${u}`}return`${l}#${o[p].pop()}`}))})(e);let t=Ii.findAll(e,"rdf","Description");t.length===0&&t.push(new Ii("rdf","Description",void 0,e));let a,n={};for(let s of t)for(let o of s.properties)a=Iw(o.ns,n),jh(o,a);return(function(s){let o;for(let r in s)o=s[r]=hs(s[r]),o===void 0&&delete s[r];return hs(s)})(n)}assignToOutput(e,t){if(this.localOptions.parse)for(let[a,n]of Object.entries(t))switch(a){case"tiff":this.assignObjectToOutput(e,"ifd0",n);break;case"exif":this.assignObjectToOutput(e,"exif",n);break;case"xmlns":break;default:this.assignObjectToOutput(e,a,n)}else e.xmp=t}}q(Io,"type","xmp"),q(Io,"multiSegment",!0),Pe.set("xmp",Io);class ms{static findAll(e){return $h(e,/([a-zA-Z0-9-]+):([a-zA-Z0-9-]+)=("[^"]*"|'[^']*')/gm).map(ms.unpackMatch)}static unpackMatch(e){let t=e[1],a=e[2],n=e[3].slice(1,-1);return n=Hh(n),new ms(t,a,n)}constructor(e,t,a){this.ns=e,this.name=t,this.value=a}serialize(){return this.value}}class Ii{static findAll(e,t,a){if(t!==void 0||a!==void 0){t=t||"[\\w\\d-]+",a=a||"[\\w\\d-]+";var n=new RegExp(`<(${t}):(${a})(#\\d+)?((\\s+?[\\w\\d-:]+=("[^"]*"|'[^']*'))*\\s*)(\\/>|>([\\s\\S]*?)<\\/\\1:\\2\\3>)`,"gm")}else n=/<([\w\d-]+):([\w\d-]+)(#\d+)?((\s+?[\w\d-:]+=("[^"]*"|'[^']*'))*\s*)(\/>|>([\s\S]*?)<\/\1:\2\3>)/gm;return $h(e,n).map(Ii.unpackMatch)}static unpackMatch(e){let t=e[1],a=e[2],n=e[4],s=e[8];return new Ii(t,a,n,s)}constructor(e,t,a,n){this.ns=e,this.name=t,this.attrString=a,this.innerXml=n,this.attrs=ms.findAll(a),this.children=Ii.findAll(n),this.value=this.children.length===0?Hh(n):void 0,this.properties=[...this.attrs,...this.children]}get isPrimitive(){return this.value!==void 0&&this.attrs.length===0&&this.children.length===0}get isListContainer(){return this.children.length===1&&this.children[0].isList}get isList(){let{ns:e,name:t}=this;return e==="rdf"&&(t==="Seq"||t==="Bag"||t==="Alt")}get isListItem(){return this.ns==="rdf"&&this.name==="li"}serialize(){if(this.properties.length===0&&this.value===void 0)return;if(this.isPrimitive)return this.value;if(this.isListContainer)return this.children[0].serialize();if(this.isList)return Aw(this.children.map(Dw));if(this.isListItem&&this.children.length===1&&this.attrs.length===0)return this.children[0].serialize();let e={};for(let t of this.properties)jh(t,e);return this.value!==void 0&&(e.value=this.value),hs(e)}}function jh(i,e){let t=i.serialize();t!==void 0&&(e[i.name]=t)}var Dw=i=>i.serialize(),Aw=i=>i.length===1?i[0]:i,Iw=(i,e)=>e[i]?e[i]:e[i]={};function $h(i,e){let t,a=[];if(!i)return a;for(;(t=e.exec(i))!==null;)a.push(t);return a}function Hh(i){if((function(a){return a==null||a==="null"||a==="undefined"||a===""||a.trim()===""})(i))return;let e=Number(i);if(!Number.isNaN(e))return e;let t=i.toLowerCase();return t==="true"||t!=="false"&&i.trim()}const qh=["rdf:li","rdf:Seq","rdf:Bag","rdf:Alt","rdf:Description"],Ow=new RegExp(`(<|\\/)(${qh.join("|")})`,"g");let qu=ds("fs",(i=>i.promises));zi.set("fs",class extends Ps{async readWhole(){this.chunked=!1,this.fs=await qu;let i=await this.fs.readFile(this.input);this._swapBuffer(i)}async readChunked(){this.chunked=!0,this.fs=await qu,await this.open(),await this.readChunk(0,this.options.firstChunkSize)}async open(){this.fh===void 0&&(this.fh=await this.fs.open(this.input,"r"),this.size=(await this.fh.stat(this.input)).size)}async _readChunk(i,e){this.fh===void 0&&await this.open(),i+e>this.size&&(e=this.size-i);var t=this.subarray(i,e,!0);return await this.fh.read(t.dataView,0,e,i),t}async close(){if(this.fh){let i=this.fh;this.fh=void 0,await i.close()}}});zi.set("base64",class extends Ps{constructor(...i){super(...i),this.input=this.input.replace(/^data:([^;]+);base64,/gim,""),this.size=this.input.length/4*3,this.input.endsWith("==")?this.size-=2:this.input.endsWith("=")&&(this.size-=1)}async _readChunk(i,e){let t,a,n=this.input;i===void 0?(i=0,t=0,a=0):(t=4*Math.floor(i/3),a=i-t/4*3),e===void 0&&(e=this.size);let s=i+e,o=t+4*Math.ceil(s/3);n=n.slice(t,o);let r=Math.min(e,this.size-i);if(bl){let l=vl.from(n,"base64").slice(a,a+r);return this.set(l,i,!0)}{let l=this.subarray(i,r,!0),c=atob(n),p=l.toUint8();for(let u=0;u<r;u++)p[u]=c.charCodeAt(a+u);return l}}});class Vu extends Fs{static canHandle(e,t){return t===18761||t===19789}extendOptions(e){let{ifd0:t,xmp:a,iptc:n,icc:s}=e;a.enabled&&t.deps.add(700),n.enabled&&t.deps.add(33723),s.enabled&&t.deps.add(34675),t.finalizeFilters()}async parse(){let{tiff:e,xmp:t,iptc:a,icc:n}=this.options;if(e.enabled||t.enabled||a.enabled||n.enabled){let s=Math.max(Cr(this.options),this.options.chunkSize);await this.file.ensureChunk(0,s),this.createParser("tiff",this.file),this.parsers.tiff.parseHeader(),await this.parsers.tiff.parseIfd0Block(),this.adaptTiffPropAsSegment("xmp"),this.adaptTiffPropAsSegment("iptc"),this.adaptTiffPropAsSegment("icc")}}adaptTiffPropAsSegment(e){if(this.parsers.tiff[e]){let t=this.parsers.tiff[e];this.injectSegment(e,t)}}}q(Vu,"type","tiff"),Ui.set("tiff",Vu);let Rw=ds("zlib");const Uw=["ihdr","iccp","text","itxt","exif"];class Wu extends Fs{constructor(...e){super(...e),q(this,"catchError",(t=>this.errors.push(t))),q(this,"metaChunks",[]),q(this,"unknownChunks",[])}static canHandle(e,t){return t===35152&&e.getUint32(0)===2303741511&&e.getUint32(4)===218765834}async parse(){let{file:e}=this;await this.findPngChunksInRange(8,e.byteLength),await this.readSegments(this.metaChunks),this.findIhdr(),this.parseTextChunks(),await this.findExif().catch(this.catchError),await this.findXmp().catch(this.catchError),await this.findIcc().catch(this.catchError)}async findPngChunksInRange(e,t){let{file:a}=this;for(;e<t;){let n=a.getUint32(e),s=a.getUint32(e+4),o=a.getString(e+4,4).toLowerCase(),r=n+4+4+4,l={type:o,offset:e,length:r,start:e+4+4,size:n,marker:s};Uw.includes(o)?this.metaChunks.push(l):this.unknownChunks.push(l),e+=r}}parseTextChunks(){let e=this.metaChunks.filter((t=>t.type==="text"));for(let t of e){let[a,n]=this.file.getString(t.start,t.size).split("\0");this.injectKeyValToIhdr(a,n)}}injectKeyValToIhdr(e,t){let a=this.parsers.ihdr;a&&a.raw.set(e,t)}findIhdr(){let e=this.metaChunks.find((t=>t.type==="ihdr"));e&&this.options.ihdr.enabled!==!1&&this.createParser("ihdr",e.chunk)}async findExif(){let e=this.metaChunks.find((t=>t.type==="exif"));e&&this.injectSegment("tiff",e.chunk)}async findXmp(){let e=this.metaChunks.filter((t=>t.type==="itxt"));for(let t of e)t.chunk.getString(0,17)==="XML:com.adobe.xmp"&&this.injectSegment("xmp",t.chunk)}async findIcc(){let e=this.metaChunks.find((r=>r.type==="iccp"));if(!e)return;let{chunk:t}=e,a=t.getUint8Array(0,81),n=0;for(;n<80&&a[n]!==0;)n++;let s=n+2,o=t.getString(0,n);if(this.injectKeyValToIhdr("ProfileName",o),ps){let r=await Rw,l=t.getUint8Array(s);l=r.inflateSync(l),this.injectSegment("icc",l)}}}q(Wu,"type","png"),Ui.set("png",Wu),Se(Me,"interop",[[1,"InteropIndex"],[2,"InteropVersion"],[4096,"RelatedImageFileFormat"],[4097,"RelatedImageWidth"],[4098,"RelatedImageHeight"]]),Ir(Me,"ifd0",[[11,"ProcessingSoftware"],[254,"SubfileType"],[255,"OldSubfileType"],[263,"Thresholding"],[264,"CellWidth"],[265,"CellLength"],[266,"FillOrder"],[269,"DocumentName"],[280,"MinSampleValue"],[281,"MaxSampleValue"],[285,"PageName"],[286,"XPosition"],[287,"YPosition"],[290,"GrayResponseUnit"],[297,"PageNumber"],[321,"HalftoneHints"],[322,"TileWidth"],[323,"TileLength"],[332,"InkSet"],[337,"TargetPrinter"],[18246,"Rating"],[18249,"RatingPercent"],[33550,"PixelScale"],[34264,"ModelTransform"],[34377,"PhotoshopSettings"],[50706,"DNGVersion"],[50707,"DNGBackwardVersion"],[50708,"UniqueCameraModel"],[50709,"LocalizedCameraModel"],[50736,"DNGLensInfo"],[50739,"ShadowScale"],[50740,"DNGPrivateData"],[33920,"IntergraphMatrix"],[33922,"ModelTiePoint"],[34118,"SEMInfo"],[34735,"GeoTiffDirectory"],[34736,"GeoTiffDoubleParams"],[34737,"GeoTiffAsciiParams"],[50341,"PrintIM"],[50721,"ColorMatrix1"],[50722,"ColorMatrix2"],[50723,"CameraCalibration1"],[50724,"CameraCalibration2"],[50725,"ReductionMatrix1"],[50726,"ReductionMatrix2"],[50727,"AnalogBalance"],[50728,"AsShotNeutral"],[50729,"AsShotWhiteXY"],[50730,"BaselineExposure"],[50731,"BaselineNoise"],[50732,"BaselineSharpness"],[50734,"LinearResponseLimit"],[50735,"CameraSerialNumber"],[50741,"MakerNoteSafety"],[50778,"CalibrationIlluminant1"],[50779,"CalibrationIlluminant2"],[50781,"RawDataUniqueID"],[50827,"OriginalRawFileName"],[50828,"OriginalRawFileData"],[50831,"AsShotICCProfile"],[50832,"AsShotPreProfileMatrix"],[50833,"CurrentICCProfile"],[50834,"CurrentPreProfileMatrix"],[50879,"ColorimetricReference"],[50885,"SRawType"],[50898,"PanasonicTitle"],[50899,"PanasonicTitle2"],[50931,"CameraCalibrationSig"],[50932,"ProfileCalibrationSig"],[50933,"ProfileIFD"],[50934,"AsShotProfileName"],[50936,"ProfileName"],[50937,"ProfileHueSatMapDims"],[50938,"ProfileHueSatMapData1"],[50939,"ProfileHueSatMapData2"],[50940,"ProfileToneCurve"],[50941,"ProfileEmbedPolicy"],[50942,"ProfileCopyright"],[50964,"ForwardMatrix1"],[50965,"ForwardMatrix2"],[50966,"PreviewApplicationName"],[50967,"PreviewApplicationVersion"],[50968,"PreviewSettingsName"],[50969,"PreviewSettingsDigest"],[50970,"PreviewColorSpace"],[50971,"PreviewDateTime"],[50972,"RawImageDigest"],[50973,"OriginalRawFileDigest"],[50981,"ProfileLookTableDims"],[50982,"ProfileLookTableData"],[51043,"TimeCodes"],[51044,"FrameRate"],[51058,"TStop"],[51081,"ReelName"],[51089,"OriginalDefaultFinalSize"],[51090,"OriginalBestQualitySize"],[51091,"OriginalDefaultCropSize"],[51105,"CameraLabel"],[51107,"ProfileHueSatMapEncoding"],[51108,"ProfileLookTableEncoding"],[51109,"BaselineExposureOffset"],[51110,"DefaultBlackRender"],[51111,"NewRawImageDigest"],[51112,"RawToPreviewGain"]]);let Gu=[[273,"StripOffsets"],[279,"StripByteCounts"],[288,"FreeOffsets"],[289,"FreeByteCounts"],[291,"GrayResponseCurve"],[292,"T4Options"],[293,"T6Options"],[300,"ColorResponseUnit"],[320,"ColorMap"],[324,"TileOffsets"],[325,"TileByteCounts"],[326,"BadFaxLines"],[327,"CleanFaxData"],[328,"ConsecutiveBadFaxLines"],[330,"SubIFD"],[333,"InkNames"],[334,"NumberofInks"],[336,"DotRange"],[338,"ExtraSamples"],[339,"SampleFormat"],[340,"SMinSampleValue"],[341,"SMaxSampleValue"],[342,"TransferRange"],[343,"ClipPath"],[344,"XClipPathUnits"],[345,"YClipPathUnits"],[346,"Indexed"],[347,"JPEGTables"],[351,"OPIProxy"],[400,"GlobalParametersIFD"],[401,"ProfileType"],[402,"FaxProfile"],[403,"CodingMethods"],[404,"VersionYear"],[405,"ModeNumber"],[433,"Decode"],[434,"DefaultImageColor"],[435,"T82Options"],[437,"JPEGTables"],[512,"JPEGProc"],[515,"JPEGRestartInterval"],[517,"JPEGLosslessPredictors"],[518,"JPEGPointTransforms"],[519,"JPEGQTables"],[520,"JPEGDCTables"],[521,"JPEGACTables"],[559,"StripRowCounts"],[999,"USPTOMiscellaneous"],[18247,"XP_DIP_XML"],[18248,"StitchInfo"],[28672,"SonyRawFileType"],[28688,"SonyToneCurve"],[28721,"VignettingCorrection"],[28722,"VignettingCorrParams"],[28724,"ChromaticAberrationCorrection"],[28725,"ChromaticAberrationCorrParams"],[28726,"DistortionCorrection"],[28727,"DistortionCorrParams"],[29895,"SonyCropTopLeft"],[29896,"SonyCropSize"],[32781,"ImageID"],[32931,"WangTag1"],[32932,"WangAnnotation"],[32933,"WangTag3"],[32934,"WangTag4"],[32953,"ImageReferencePoints"],[32954,"RegionXformTackPoint"],[32955,"WarpQuadrilateral"],[32956,"AffineTransformMat"],[32995,"Matteing"],[32996,"DataType"],[32997,"ImageDepth"],[32998,"TileDepth"],[33300,"ImageFullWidth"],[33301,"ImageFullHeight"],[33302,"TextureFormat"],[33303,"WrapModes"],[33304,"FovCot"],[33305,"MatrixWorldToScreen"],[33306,"MatrixWorldToCamera"],[33405,"Model2"],[33421,"CFARepeatPatternDim"],[33422,"CFAPattern2"],[33423,"BatteryLevel"],[33424,"KodakIFD"],[33445,"MDFileTag"],[33446,"MDScalePixel"],[33447,"MDColorTable"],[33448,"MDLabName"],[33449,"MDSampleInfo"],[33450,"MDPrepDate"],[33451,"MDPrepTime"],[33452,"MDFileUnits"],[33589,"AdventScale"],[33590,"AdventRevision"],[33628,"UIC1Tag"],[33629,"UIC2Tag"],[33630,"UIC3Tag"],[33631,"UIC4Tag"],[33918,"IntergraphPacketData"],[33919,"IntergraphFlagRegisters"],[33921,"INGRReserved"],[34016,"Site"],[34017,"ColorSequence"],[34018,"IT8Header"],[34019,"RasterPadding"],[34020,"BitsPerRunLength"],[34021,"BitsPerExtendedRunLength"],[34022,"ColorTable"],[34023,"ImageColorIndicator"],[34024,"BackgroundColorIndicator"],[34025,"ImageColorValue"],[34026,"BackgroundColorValue"],[34027,"PixelIntensityRange"],[34028,"TransparencyIndicator"],[34029,"ColorCharacterization"],[34030,"HCUsage"],[34031,"TrapIndicator"],[34032,"CMYKEquivalent"],[34152,"AFCP_IPTC"],[34232,"PixelMagicJBIGOptions"],[34263,"JPLCartoIFD"],[34306,"WB_GRGBLevels"],[34310,"LeafData"],[34687,"TIFF_FXExtensions"],[34688,"MultiProfiles"],[34689,"SharedData"],[34690,"T88Options"],[34732,"ImageLayer"],[34750,"JBIGOptions"],[34856,"Opto-ElectricConvFactor"],[34857,"Interlace"],[34908,"FaxRecvParams"],[34909,"FaxSubAddress"],[34910,"FaxRecvTime"],[34929,"FedexEDR"],[34954,"LeafSubIFD"],[37387,"FlashEnergy"],[37388,"SpatialFrequencyResponse"],[37389,"Noise"],[37390,"FocalPlaneXResolution"],[37391,"FocalPlaneYResolution"],[37392,"FocalPlaneResolutionUnit"],[37397,"ExposureIndex"],[37398,"TIFF-EPStandardID"],[37399,"SensingMethod"],[37434,"CIP3DataFile"],[37435,"CIP3Sheet"],[37436,"CIP3Side"],[37439,"StoNits"],[37679,"MSDocumentText"],[37680,"MSPropertySetStorage"],[37681,"MSDocumentTextPosition"],[37724,"ImageSourceData"],[40965,"InteropIFD"],[40976,"SamsungRawPointersOffset"],[40977,"SamsungRawPointersLength"],[41217,"SamsungRawByteOrder"],[41218,"SamsungRawUnknown"],[41484,"SpatialFrequencyResponse"],[41485,"Noise"],[41489,"ImageNumber"],[41490,"SecurityClassification"],[41491,"ImageHistory"],[41494,"TIFF-EPStandardID"],[41995,"DeviceSettingDescription"],[42112,"GDALMetadata"],[42113,"GDALNoData"],[44992,"ExpandSoftware"],[44993,"ExpandLens"],[44994,"ExpandFilm"],[44995,"ExpandFilterLens"],[44996,"ExpandScanner"],[44997,"ExpandFlashLamp"],[46275,"HasselbladRawImage"],[48129,"PixelFormat"],[48130,"Transformation"],[48131,"Uncompressed"],[48132,"ImageType"],[48256,"ImageWidth"],[48257,"ImageHeight"],[48258,"WidthResolution"],[48259,"HeightResolution"],[48320,"ImageOffset"],[48321,"ImageByteCount"],[48322,"AlphaOffset"],[48323,"AlphaByteCount"],[48324,"ImageDataDiscard"],[48325,"AlphaDataDiscard"],[50215,"OceScanjobDesc"],[50216,"OceApplicationSelector"],[50217,"OceIDNumber"],[50218,"OceImageLogic"],[50255,"Annotations"],[50459,"HasselbladExif"],[50547,"OriginalFileName"],[50560,"USPTOOriginalContentType"],[50656,"CR2CFAPattern"],[50710,"CFAPlaneColor"],[50711,"CFALayout"],[50712,"LinearizationTable"],[50713,"BlackLevelRepeatDim"],[50714,"BlackLevel"],[50715,"BlackLevelDeltaH"],[50716,"BlackLevelDeltaV"],[50717,"WhiteLevel"],[50718,"DefaultScale"],[50719,"DefaultCropOrigin"],[50720,"DefaultCropSize"],[50733,"BayerGreenSplit"],[50737,"ChromaBlurRadius"],[50738,"AntiAliasStrength"],[50752,"RawImageSegmentation"],[50780,"BestQualityScale"],[50784,"AliasLayerMetadata"],[50829,"ActiveArea"],[50830,"MaskedAreas"],[50935,"NoiseReductionApplied"],[50974,"SubTileBlockSize"],[50975,"RowInterleaveFactor"],[51008,"OpcodeList1"],[51009,"OpcodeList2"],[51022,"OpcodeList3"],[51041,"NoiseProfile"],[51114,"CacheVersion"],[51125,"DefaultUserCrop"],[51157,"NikonNEFInfo"],[65024,"KdcIFD"]];Ir(Me,"ifd0",Gu),Ir(Me,"exif",Gu),Se(fi,"gps",[[23,{M:"Magnetic North",T:"True North"}],[25,{K:"Kilometers",M:"Miles",N:"Nautical Miles"}]]);class Oo extends rt{static canHandle(e,t){return e.getUint8(t+1)===224&&e.getUint32(t+4)===1246120262&&e.getUint8(t+8)===0}parse(){return this.parseTags(),this.translate(),this.output}parseTags(){this.raw=new Map([[0,this.chunk.getUint16(0)],[2,this.chunk.getUint8(2)],[3,this.chunk.getUint16(3)],[5,this.chunk.getUint16(5)],[7,this.chunk.getUint8(7)],[8,this.chunk.getUint8(8)]])}}q(Oo,"type","jfif"),q(Oo,"headerLength",9),Pe.set("jfif",Oo),Se(Me,"jfif",[[0,"JFIFVersion"],[2,"ResolutionUnit"],[3,"XResolution"],[5,"YResolution"],[7,"ThumbnailWidth"],[8,"ThumbnailHeight"]]);class Xu extends rt{parse(){return this.parseTags(),this.translate(),this.output}parseTags(){this.raw=new Map([[0,this.chunk.getUint32(0)],[4,this.chunk.getUint32(4)],[8,this.chunk.getUint8(8)],[9,this.chunk.getUint8(9)],[10,this.chunk.getUint8(10)],[11,this.chunk.getUint8(11)],[12,this.chunk.getUint8(12)],...Array.from(this.raw)])}}q(Xu,"type","ihdr"),Pe.set("ihdr",Xu),Se(Me,"ihdr",[[0,"ImageWidth"],[4,"ImageHeight"],[8,"BitDepth"],[9,"ColorType"],[10,"Compression"],[11,"Filter"],[12,"Interlace"]]),Se(fi,"ihdr",[[9,{0:"Grayscale",2:"RGB",3:"Palette",4:"Grayscale with Alpha",6:"RGB with Alpha",DEFAULT:"Unknown"}],[10,{0:"Deflate/Inflate",DEFAULT:"Unknown"}],[11,{0:"Adaptive",DEFAULT:"Unknown"}],[12,{0:"Noninterlaced",1:"Adam7 Interlace",DEFAULT:"Unknown"}]]);class Yn extends rt{static canHandle(e,t){return e.getUint8(t+1)===226&&e.getUint32(t+4)===1229144927}static findPosition(e,t){let a=super.findPosition(e,t);return a.chunkNumber=e.getUint8(t+16),a.chunkCount=e.getUint8(t+17),a.multiSegment=a.chunkCount>1,a}static handleMultiSegments(e){return(function(t){let a=(function(n){let s=n[0].constructor,o=0;for(let c of n)o+=c.length;let r=new s(o),l=0;for(let c of n)r.set(c,l),l+=c.length;return r})(t.map((n=>n.chunk.toUint8())));return new Ue(a)})(e)}parse(){return this.raw=new Map,this.parseHeader(),this.parseTags(),this.translate(),this.output}parseHeader(){let{raw:e}=this;this.chunk.byteLength<84&&fe("ICC header is too short");for(let[t,a]of Object.entries(Mw)){t=parseInt(t,10);let n=a(this.chunk,t);n!=="\0\0\0\0"&&e.set(t,n)}}parseTags(){let e,t,a,n,s,{raw:o}=this,r=this.chunk.getUint32(128),l=132,c=this.chunk.byteLength;for(;r--;){if(e=this.chunk.getString(l,4),t=this.chunk.getUint32(l+4),a=this.chunk.getUint32(l+8),n=this.chunk.getString(t,4),t+a>c)return void console.warn("reached the end of the first ICC chunk. Enable options.tiff.multiSegment to read all ICC segments.");s=this.parseTag(n,t,a),s!==void 0&&s!=="\0\0\0\0"&&o.set(e,s),l+=12}}parseTag(e,t,a){switch(e){case"desc":return this.parseDesc(t);case"mluc":return this.parseMluc(t);case"text":return this.parseText(t,a);case"sig ":return this.parseSig(t)}if(!(t+a>this.chunk.byteLength))return this.chunk.getUint8Array(t,a)}parseDesc(e){let t=this.chunk.getUint32(e+8)-1;return ci(this.chunk.getString(e+12,t))}parseText(e,t){return ci(this.chunk.getString(e+8,t-8))}parseSig(e){return ci(this.chunk.getString(e+8,4))}parseMluc(e){let{chunk:t}=this,a=t.getUint32(e+8),n=t.getUint32(e+12),s=e+16,o=[];for(let r=0;r<a;r++){let l=t.getString(s+0,2),c=t.getString(s+2,2),p=t.getUint32(s+4),u=t.getUint32(s+8)+e,f=ci(t.getUnicodeString(u,p));o.push({lang:l,country:c,text:f}),s+=n}return a===1?o[0].text:o}translateValue(e,t){return typeof e=="string"?t[e]||t[e.toLowerCase()]||e:t[e]||e}}q(Yn,"type","icc"),q(Yn,"multiSegment",!0),q(Yn,"headerLength",18);const Mw={4:Tt,8:function(i,e){return[i.getUint8(e),i.getUint8(e+1)>>4,i.getUint8(e+1)%16].map((t=>t.toString(10))).join(".")},12:Tt,16:Tt,20:Tt,24:function(i,e){const t=i.getUint16(e),a=i.getUint16(e+2)-1,n=i.getUint16(e+4),s=i.getUint16(e+6),o=i.getUint16(e+8),r=i.getUint16(e+10);return new Date(Date.UTC(t,a,n,s,o,r))},36:Tt,40:Tt,48:Tt,52:Tt,64:(i,e)=>i.getUint32(e),80:Tt};function Tt(i,e){return ci(i.getString(e,4))}Pe.set("icc",Yn),Se(Me,"icc",[[4,"ProfileCMMType"],[8,"ProfileVersion"],[12,"ProfileClass"],[16,"ColorSpaceData"],[20,"ProfileConnectionSpace"],[24,"ProfileDateTime"],[36,"ProfileFileSignature"],[40,"PrimaryPlatform"],[44,"CMMFlags"],[48,"DeviceManufacturer"],[52,"DeviceModel"],[56,"DeviceAttributes"],[64,"RenderingIntent"],[68,"ConnectionSpaceIlluminant"],[80,"ProfileCreator"],[84,"ProfileID"],["Header","ProfileHeader"],["MS00","WCSProfiles"],["bTRC","BlueTRC"],["bXYZ","BlueMatrixColumn"],["bfd","UCRBG"],["bkpt","MediaBlackPoint"],["calt","CalibrationDateTime"],["chad","ChromaticAdaptation"],["chrm","Chromaticity"],["ciis","ColorimetricIntentImageState"],["clot","ColorantTableOut"],["clro","ColorantOrder"],["clrt","ColorantTable"],["cprt","ProfileCopyright"],["crdi","CRDInfo"],["desc","ProfileDescription"],["devs","DeviceSettings"],["dmdd","DeviceModelDesc"],["dmnd","DeviceMfgDesc"],["dscm","ProfileDescriptionML"],["fpce","FocalPlaneColorimetryEstimates"],["gTRC","GreenTRC"],["gXYZ","GreenMatrixColumn"],["gamt","Gamut"],["kTRC","GrayTRC"],["lumi","Luminance"],["meas","Measurement"],["meta","Metadata"],["mmod","MakeAndModel"],["ncl2","NamedColor2"],["ncol","NamedColor"],["ndin","NativeDisplayInfo"],["pre0","Preview0"],["pre1","Preview1"],["pre2","Preview2"],["ps2i","PS2RenderingIntent"],["ps2s","PostScript2CSA"],["psd0","PostScript2CRD0"],["psd1","PostScript2CRD1"],["psd2","PostScript2CRD2"],["psd3","PostScript2CRD3"],["pseq","ProfileSequenceDesc"],["psid","ProfileSequenceIdentifier"],["psvm","PS2CRDVMSize"],["rTRC","RedTRC"],["rXYZ","RedMatrixColumn"],["resp","OutputResponse"],["rhoc","ReflectionHardcopyOrigColorimetry"],["rig0","PerceptualRenderingIntentGamut"],["rig2","SaturationRenderingIntentGamut"],["rpoc","ReflectionPrintOutputColorimetry"],["sape","SceneAppearanceEstimates"],["scoe","SceneColorimetryEstimates"],["scrd","ScreeningDesc"],["scrn","Screening"],["targ","CharTarget"],["tech","Technology"],["vcgt","VideoCardGamma"],["view","ViewingConditions"],["vued","ViewingCondDesc"],["wtpt","MediaWhitePoint"]]);const Dn={"4d2p":"Erdt Systems",AAMA:"Aamazing Technologies",ACER:"Acer",ACLT:"Acolyte Color Research",ACTI:"Actix Sytems",ADAR:"Adara Technology",ADBE:"Adobe",ADI:"ADI Systems",AGFA:"Agfa Graphics",ALMD:"Alps Electric",ALPS:"Alps Electric",ALWN:"Alwan Color Expertise",AMTI:"Amiable Technologies",AOC:"AOC International",APAG:"Apago",APPL:"Apple Computer",AST:"AST","AT&T":"AT&T",BAEL:"BARBIERI electronic",BRCO:"Barco NV",BRKP:"Breakpoint",BROT:"Brother",BULL:"Bull",BUS:"Bus Computer Systems","C-IT":"C-Itoh",CAMR:"Intel",CANO:"Canon",CARR:"Carroll Touch",CASI:"Casio",CBUS:"Colorbus PL",CEL:"Crossfield",CELx:"Crossfield",CGS:"CGS Publishing Technologies International",CHM:"Rochester Robotics",CIGL:"Colour Imaging Group, London",CITI:"Citizen",CL00:"Candela",CLIQ:"Color IQ",CMCO:"Chromaco",CMiX:"CHROMiX",COLO:"Colorgraphic Communications",COMP:"Compaq",COMp:"Compeq/Focus Technology",CONR:"Conrac Display Products",CORD:"Cordata Technologies",CPQ:"Compaq",CPRO:"ColorPro",CRN:"Cornerstone",CTX:"CTX International",CVIS:"ColorVision",CWC:"Fujitsu Laboratories",DARI:"Darius Technology",DATA:"Dataproducts",DCP:"Dry Creek Photo",DCRC:"Digital Contents Resource Center, Chung-Ang University",DELL:"Dell Computer",DIC:"Dainippon Ink and Chemicals",DICO:"Diconix",DIGI:"Digital","DL&C":"Digital Light & Color",DPLG:"Doppelganger",DS:"Dainippon Screen",DSOL:"DOOSOL",DUPN:"DuPont",EPSO:"Epson",ESKO:"Esko-Graphics",ETRI:"Electronics and Telecommunications Research Institute",EVER:"Everex Systems",EXAC:"ExactCODE",Eizo:"Eizo",FALC:"Falco Data Products",FF:"Fuji Photo Film",FFEI:"FujiFilm Electronic Imaging",FNRD:"Fnord Software",FORA:"Fora",FORE:"Forefront Technology",FP:"Fujitsu",FPA:"WayTech Development",FUJI:"Fujitsu",FX:"Fuji Xerox",GCC:"GCC Technologies",GGSL:"Global Graphics Software",GMB:"Gretagmacbeth",GMG:"GMG",GOLD:"GoldStar Technology",GOOG:"Google",GPRT:"Giantprint",GTMB:"Gretagmacbeth",GVC:"WayTech Development",GW2K:"Sony",HCI:"HCI",HDM:"Heidelberger Druckmaschinen",HERM:"Hermes",HITA:"Hitachi America",HP:"Hewlett-Packard",HTC:"Hitachi",HiTi:"HiTi Digital",IBM:"IBM",IDNT:"Scitex",IEC:"Hewlett-Packard",IIYA:"Iiyama North America",IKEG:"Ikegami Electronics",IMAG:"Image Systems",IMI:"Ingram Micro",INTC:"Intel",INTL:"N/A (INTL)",INTR:"Intra Electronics",IOCO:"Iocomm International Technology",IPS:"InfoPrint Solutions Company",IRIS:"Scitex",ISL:"Ichikawa Soft Laboratory",ITNL:"N/A (ITNL)",IVM:"IVM",IWAT:"Iwatsu Electric",Idnt:"Scitex",Inca:"Inca Digital Printers",Iris:"Scitex",JPEG:"Joint Photographic Experts Group",JSFT:"Jetsoft Development",JVC:"JVC Information Products",KART:"Scitex",KFC:"KFC Computek Components",KLH:"KLH Computers",KMHD:"Konica Minolta",KNCA:"Konica",KODA:"Kodak",KYOC:"Kyocera",Kart:"Scitex",LCAG:"Leica",LCCD:"Leeds Colour",LDAK:"Left Dakota",LEAD:"Leading Technology",LEXM:"Lexmark International",LINK:"Link Computer",LINO:"Linotronic",LITE:"Lite-On",Leaf:"Leaf",Lino:"Linotronic",MAGC:"Mag Computronic",MAGI:"MAG Innovision",MANN:"Mannesmann",MICN:"Micron Technology",MICR:"Microtek",MICV:"Microvitec",MINO:"Minolta",MITS:"Mitsubishi Electronics America",MITs:"Mitsuba",MNLT:"Minolta",MODG:"Modgraph",MONI:"Monitronix",MONS:"Monaco Systems",MORS:"Morse Technology",MOTI:"Motive Systems",MSFT:"Microsoft",MUTO:"MUTOH INDUSTRIES",Mits:"Mitsubishi Electric",NANA:"NANAO",NEC:"NEC",NEXP:"NexPress Solutions",NISS:"Nissei Sangyo America",NKON:"Nikon",NONE:"none",OCE:"Oce Technologies",OCEC:"OceColor",OKI:"Oki",OKID:"Okidata",OKIP:"Okidata",OLIV:"Olivetti",OLYM:"Olympus",ONYX:"Onyx Graphics",OPTI:"Optiquest",PACK:"Packard Bell",PANA:"Matsushita Electric Industrial",PANT:"Pantone",PBN:"Packard Bell",PFU:"PFU",PHIL:"Philips Consumer Electronics",PNTX:"HOYA",POne:"Phase One A/S",PREM:"Premier Computer Innovations",PRIN:"Princeton Graphic Systems",PRIP:"Princeton Publishing Labs",QLUX:"Hong Kong",QMS:"QMS",QPCD:"QPcard AB",QUAD:"QuadLaser",QUME:"Qume",RADI:"Radius",RDDx:"Integrated Color Solutions",RDG:"Roland DG",REDM:"REDMS Group",RELI:"Relisys",RGMS:"Rolf Gierling Multitools",RICO:"Ricoh",RNLD:"Edmund Ronald",ROYA:"Royal",RPC:"Ricoh Printing Systems",RTL:"Royal Information Electronics",SAMP:"Sampo",SAMS:"Samsung",SANT:"Jaime Santana Pomares",SCIT:"Scitex",SCRN:"Dainippon Screen",SDP:"Scitex",SEC:"Samsung",SEIK:"Seiko Instruments",SEIk:"Seikosha",SGUY:"ScanGuy.com",SHAR:"Sharp Laboratories",SICC:"International Color Consortium",SONY:"Sony",SPCL:"SpectraCal",STAR:"Star",STC:"Sampo Technology",Scit:"Scitex",Sdp:"Scitex",Sony:"Sony",TALO:"Talon Technology",TAND:"Tandy",TATU:"Tatung",TAXA:"TAXAN America",TDS:"Tokyo Denshi Sekei",TECO:"TECO Information Systems",TEGR:"Tegra",TEKT:"Tektronix",TI:"Texas Instruments",TMKR:"TypeMaker",TOSB:"Toshiba",TOSH:"Toshiba",TOTK:"TOTOKU ELECTRIC",TRIU:"Triumph",TSBT:"Toshiba",TTX:"TTX Computer Products",TVM:"TVM Professional Monitor",TW:"TW Casper",ULSX:"Ulead Systems",UNIS:"Unisys",UTZF:"Utz Fehlau & Sohn",VARI:"Varityper",VIEW:"Viewsonic",VISL:"Visual communication",VIVO:"Vivo Mobile Communication",WANG:"Wang",WLBR:"Wilbur Imaging",WTG2:"Ware To Go",WYSE:"WYSE Technology",XERX:"Xerox",XRIT:"X-Rite",ZRAN:"Zoran",Zebr:"Zebra Technologies",appl:"Apple Computer",bICC:"basICColor",berg:"bergdesign",ceyd:"Integrated Color Solutions",clsp:"MacDermid ColorSpan",ds:"Dainippon Screen",dupn:"DuPont",ffei:"FujiFilm Electronic Imaging",flux:"FluxData",iris:"Scitex",kart:"Scitex",lcms:"Little CMS",lino:"Linotronic",none:"none",ob4d:"Erdt Systems",obic:"Medigraph",quby:"Qubyx Sarl",scit:"Scitex",scrn:"Dainippon Screen",sdp:"Scitex",siwi:"SIWI GRAFIKA",yxym:"YxyMaster"},Ku={scnr:"Scanner",mntr:"Monitor",prtr:"Printer",link:"Device Link",abst:"Abstract",spac:"Color Space Conversion Profile",nmcl:"Named Color",cenc:"ColorEncodingSpace profile",mid:"MultiplexIdentification profile",mlnk:"MultiplexLink profile",mvis:"MultiplexVisualization profile",nkpf:"Nikon Input Device Profile (NON-STANDARD!)"};Se(fi,"icc",[[4,Dn],[12,Ku],[40,Object.assign({},Dn,Ku)],[48,Dn],[80,Dn],[64,{0:"Perceptual",1:"Relative Colorimetric",2:"Saturation",3:"Absolute Colorimetric"}],["tech",{amd:"Active Matrix Display",crt:"Cathode Ray Tube Display",kpcd:"Photo CD",pmd:"Passive Matrix Display",dcam:"Digital Camera",dcpj:"Digital Cinema Projector",dmpc:"Digital Motion Picture Camera",dsub:"Dye Sublimation Printer",epho:"Electrophotographic Printer",esta:"Electrostatic Printer",flex:"Flexography",fprn:"Film Writer",fscn:"Film Scanner",grav:"Gravure",ijet:"Ink Jet Printer",imgs:"Photo Image Setter",mpfr:"Motion Picture Film Recorder",mpfs:"Motion Picture Film Scanner",offs:"Offset Lithography",pjtv:"Projection Television",rpho:"Photographic Paper Printer",rscn:"Reflective Scanner",silk:"Silkscreen",twax:"Thermal Wax Printer",vidc:"Video Camera",vidm:"Video Monitor"}]]);class An extends rt{static canHandle(e,t,a){return e.getUint8(t+1)===237&&e.getString(t+4,9)==="Photoshop"&&this.containsIptc8bim(e,t,a)!==void 0}static headerLength(e,t,a){let n,s=this.containsIptc8bim(e,t,a);if(s!==void 0)return n=e.getUint8(t+s+7),n%2!=0&&(n+=1),n===0&&(n=4),s+8+n}static containsIptc8bim(e,t,a){for(let n=0;n<a;n++)if(this.isIptcSegmentHead(e,t+n))return n}static isIptcSegmentHead(e,t){return e.getUint8(t)===56&&e.getUint32(t)===943868237&&e.getUint16(t+4)===1028}parse(){let{raw:e}=this,t=this.chunk.byteLength-1,a=!1;for(let n=0;n<t;n++)if(this.chunk.getUint8(n)===28&&this.chunk.getUint8(n+1)===2){a=!0;let s=this.chunk.getUint16(n+3),o=this.chunk.getUint8(n+2),r=this.chunk.getLatin1String(n+5,s);e.set(o,this.pluralizeValue(e.get(o),r)),n+=4+s}else if(a)break;return this.translate(),this.output}pluralizeValue(e,t){return e!==void 0?e instanceof Array?(e.push(t),e):[e,t]:t}}q(An,"type","iptc"),q(An,"translateValues",!1),q(An,"reviveValues",!1),Pe.set("iptc",An),Se(Me,"iptc",[[0,"ApplicationRecordVersion"],[3,"ObjectTypeReference"],[4,"ObjectAttributeReference"],[5,"ObjectName"],[7,"EditStatus"],[8,"EditorialUpdate"],[10,"Urgency"],[12,"SubjectReference"],[15,"Category"],[20,"SupplementalCategories"],[22,"FixtureIdentifier"],[25,"Keywords"],[26,"ContentLocationCode"],[27,"ContentLocationName"],[30,"ReleaseDate"],[35,"ReleaseTime"],[37,"ExpirationDate"],[38,"ExpirationTime"],[40,"SpecialInstructions"],[42,"ActionAdvised"],[45,"ReferenceService"],[47,"ReferenceDate"],[50,"ReferenceNumber"],[55,"DateCreated"],[60,"TimeCreated"],[62,"DigitalCreationDate"],[63,"DigitalCreationTime"],[65,"OriginatingProgram"],[70,"ProgramVersion"],[75,"ObjectCycle"],[80,"Byline"],[85,"BylineTitle"],[90,"City"],[92,"Sublocation"],[95,"State"],[100,"CountryCode"],[101,"Country"],[103,"OriginalTransmissionReference"],[105,"Headline"],[110,"Credit"],[115,"Source"],[116,"CopyrightNotice"],[118,"Contact"],[120,"Caption"],[121,"LocalCaption"],[122,"Writer"],[125,"RasterizedCaption"],[130,"ImageType"],[131,"ImageOrientation"],[135,"LanguageIdentifier"],[150,"AudioType"],[151,"AudioSamplingRate"],[152,"AudioSamplingResolution"],[153,"AudioDuration"],[154,"AudioOutcue"],[184,"JobID"],[185,"MasterDocumentID"],[186,"ShortDocumentID"],[187,"UniqueDocumentID"],[188,"OwnerID"],[200,"ObjectPreviewFileFormat"],[201,"ObjectPreviewFileVersion"],[202,"ObjectPreviewData"],[221,"Prefs"],[225,"ClassifyState"],[228,"SimilarityIndex"],[230,"DocumentNotes"],[231,"DocumentHistory"],[232,"ExifCameraInfo"],[255,"CatalogSets"]]),Se(fi,"iptc",[[10,{0:"0 (reserved)",1:"1 (most urgent)",2:"2",3:"3",4:"4",5:"5 (normal urgency)",6:"6",7:"7",8:"8 (least urgent)",9:"9 (user-defined priority)"}],[75,{a:"Morning",b:"Both Morning and Evening",p:"Evening"}],[131,{L:"Landscape",P:"Portrait",S:"Square"}]]);const In={zip:rw,gz:_o,tgz:_o,deflate:_o};class Bw extends me{constructor(e,t){const a={};super(e,{...a,...t}),this.id=this.opts.id||"PrepareUpload",this.type="progressindicator",this.i18nInit()}setHashFileName=async e=>{const{id:t}=e,a=this.uppy.getFile(t);if(a){const{data:n}=a,s=1024*1024*5,r=await n.slice(0,s).text(),l=new uw;l.append(r);const c=l.end(),p=Di(a),u=`${c}${p?`.${p}`:""}`;this.uppy.setFileState(t,{hashFileName:u})}};setMetaData=async e=>{const{id:t}=e,a=this.uppy.getFile(t);if(a){const{data:{webkitRelativePath:n,relativePath:s,name:o},hashFileName:r,size:l}=a,c=s||n||o||r;this.uppy.setFileMeta(t,{relativePath:c,name:c})}};preventXssAttack=async e=>{const{id:t}=e,a=this.uppy.getFile(t);if(a){const{name:n,meta:s}=this.uppy.getFile(t),o=mi.sanitize(n);if(n!==o){const l=Di(a),c=o.endsWith(`.${l}`)?o:`${o}.${l}`;this.uppy.setFileState(t,{name:c,meta:{...s,name:c,filename:c}})}if(await Ch(a)){const{data:l,name:c,type:p}=this.uppy.getFile(t),u=await l.text(),f=new Set;new DOMParser().parseFromString(u,"image/svg+xml").querySelectorAll("[id]").forEach(w=>f.add(w.id)),mi.addHook("uponSanitizeElement",(w,y)=>{if(y.tagName==="use"){const b=w.getAttribute("xlink:href")||w.getAttribute("href");if(b&&b.startsWith("#")){const h=b.substring(1);f.has(h)&&(y.allowedTags.use=!0,y.forceKeepNode=!0)}}}),mi.addHook("uponSanitizeAttribute",(w,y)=>{if(y.attrName==="xlink:href"&&y.attrValue){if(y.attrValue.startsWith("#")){const b=y.attrValue.substring(1);if(f.has(b)){y.forceKeepAttr=!0;return}}y.keepAttr=!1}["width","height"].includes(y.attrName)&&y.attrValue==="100%"&&(y.forceKeepAttr=!0),y.attrName==="style"&&y.attrValue==="overflow:visible"&&(y.forceKeepAttr=!0)});const C=mi.sanitize(u,{USE_PROFILES:{svg:!0,svgFilters:!0},ALLOWED_TAGS:["svg","circle","ellipse","line","path","polygon","polyline","rect","g","text","use","defs","clipPath","mask","pattern","linearGradient","radialGradient","stop"],ALLOWED_ATTR:["d","points","x","y","width","height","r","cx","cy","rx","ry","x1","y1","x2","y2","transform","fill","stroke","stroke-width","viewBox","xmlns","xmlns:xlink","xml:space","style","id","class","offset","stop-color","stop-opacity","clip-path","mask","fill-opacity","stroke-opacity","gradientTransform","gradientUnits","xlink:href"],FORBID_TAGS:["a","script","iframe","image","foreignObject"],FORBID_ATTR:["href","onclick","onload","onerror"]});if(mi.removeHook("uponSanitizeElement"),mi.removeHook("uponSanitizeAttribute"),u!==C){const w=new Blob([C],{type:p}),y=Wn(w,c);this.uppy.setFileState(t,{...this.uppy.getFile(t),data:y,preview:xa(y)}),console.info("clean svg file xss attack",{name:c,originalFile:a.data.text(),cleanFile:C})}}}};preventZipBombAttack=async e=>{const{id:t}=e,a=this.uppy.getFile(t);try{if(a&&In[a.extension]){const{data:n}=a,s=In[a.extension](new Uint8Array(await n.arrayBuffer())),o=(l,c,p=0)=>Object.entries(l instanceof Uint8Array?{[c||a.name]:l}:l).reduce((u,[f,x])=>{if(!x||x.byteLength===0)return console.warn("Invalid or empty item in unzipped content",{name:f,item:x}),u;const S=u+x.byteLength;if(p>=5||S>a.size*100)throw console.error("Zip bomb detected, please check your file",{depth:p,baseAcc:S,fileSize:a.size}),new Error("Zip bomb detected, please check your file");const C=Ke.extension(Ke.lookup(f));if(In[C]){const w=In[C](x);return S+o(w,f,p+1)}return S},0);if(o(s)>a.size*100)throw new Error("Zip bomb detected, please check your file")}}catch(n){if(n.message.includes("Zip bomb detected"))throw n}};validateImagesRespectCropperOptions=async()=>this.uppy.getFiles().reduce(async(e,t)=>{await e;const{id:a}=t;let n=this.uppy.getFile(a);if(n.isRemote&&(await this.tryDownloadRemoteFile(n),n=this.uppy.getFile(a)),!this.opts.cropperOptions?.aspectRatio||!n?.type?.includes("image")||n.type?.includes("image/svg"))return Promise.resolve();const{aspectRatio:s}=this.opts.cropperOptions,o=this.uppy.getPlugin("ImageEditor"),r=document.querySelector(`[src="${n.preview}"]`)||document.getElementById("uppy_"+a).querySelector("img"),l=r?.naturalWidth,c=r?.naturalHeight,p=Number(l/c).toFixed(2),u=Number(s).toFixed(2);if(p===u)return Promise.resolve();this.uppy.emit("preprocess-progress",n,{mode:"indeterminate",message:this.i18n("editorLoading")}),o.parent.openFileEditor(n);const x=this.i18n("aspectRatioMessage",{imageAspectRatio:p,aspectRatio:u});return this.uppy.info({message:x,details:x}),new Promise((S,C)=>{this.uppy.once("file-editor:complete",()=>{setTimeout(()=>{S()},200)}),this.uppy.once("file-editor:cancel",()=>{})})},Promise.resolve());checkImageOrientation=async e=>{const{id:t}=e,a=this.uppy.getFile(t);if(a?.type?.startsWith("image/"))try{if(!(await _w(a.data).catch(()=>({deg:0}))).deg)return;const s=a.data.size*.98,o=await new Promise((C,w)=>{const y=new Image;let b=URL.createObjectURL(a.data);y.src=b,y.onload=()=>{URL.revokeObjectURL(b),b=null,C(y)},y.onerror=h=>{b&&(URL.revokeObjectURL(b),b=null),w(new Error(`Image load failed: ${h.message}`))}}),r=o.width/o.height;let l=Math.sqrt(s*r),c=l/r;const p=8096;if(l>p||c>p){const C=p/Math.max(l,c);l*=C,c*=C}const u=document.createElement("canvas");u.width=l,u.height=c;const f=u.getContext("2d",{willReadFrequently:!0,alpha:a.type==="image/png"});f.imageSmoothingEnabled=!0,f.imageSmoothingQuality="high",f.translate(u.width/2,u.height/2),f.drawImage(o,-l/2,-c/2,l,c);const x=1,S=await new Promise(C=>{u.toBlob(C,a.type,x)});this.uppy.setFileState(t,{data:S,size:S.size})}catch(n){console.error("Image rotation processing failed:",n);return}};prepareUploadWrapper=async e=>{await this.tryDownloadRemoteFile(e),await this.checkImageOrientation(e),await this.getPreviewFromData(e),await this.setHashFileName(e),this.opts.disableXssAttack||await this.preventXssAttack(e),await this.preventZipBombAttack(e),await this.setMetaData(e)};tryDownloadRemoteFile=async e=>{const{type:t,name:a,preview:n,source:s,isRemote:o,isDownloading:r,id:l,isLoading:c,remote:p,meta:u,errorCount:f=0}=e,x=!c&&o,S=`uploader:${l}:downloaded`,C=Di(e),w=a?.split("?")?.[0],b=(()=>{const h=["jpg","jpeg"];return h.includes(C)&&h.some(m=>w?.endsWith(m))?!0:w?.endsWith(C)})()?w:`${w}${C?`.${C}`:""}`;if(x){const h=yh(n||p?.body?.url);if(f>=3)throw this.uppy.setFileState(l,{error:this.i18n("downloadRemoteFileFailure"),meta:{...u,name:this.i18n("downloadRemoteFileFailure")}}),new Error("Download remote file failure");this.uppy.setFileState(l,{isLoading:!0,isDownloading:!0,size:null,meta:{...u,name:this.i18n("loading")}}),await fetch(h).then(async m=>await m.blob()).then(async m=>{const v=Wn(m,b);this.uppy.setFileState(l,{name:b,extension:C,type:t,data:v,preview:n||xa(v),source:s,size:v.size,isDownloading:!1,isRemote:!1,meta:{...u,name:b,filename:b}}),this.uppy.getFile(l),this.uppy.emit(S,l)}).catch(async m=>{if(console.error("Axios download remote file error: ",m),t.startsWith("image/")){const v=t.includes("svg")?"image/png":t,g=b.endsWith(".svg")?b.replace(".svg",".png"):b;try{const k=await new Promise((N,z)=>{const j=new Image;j.crossOrigin="anonymous",j.onload=()=>{const O=document.createElement("canvas");O.width=j.width,O.height=j.height;const $=O.getContext("2d");$.translate(O.width/2,O.height/2),$.drawImage(j,-j.width/2,-j.height/2,j.width,j.height),O.toBlob(N,v)},j.onerror=z,j.src=h});let E=Wn(k,g);this.uppy.setFileState(l,{name:g,extension:C,type:v,data:E,preview:n||xa(E),source:s,size:E.size,isDownloading:!1,isRemote:!1,meta:{...u,name:g,filename:g}});const A=this.uppy.getFile(l);this.uppy.emit(S,l);return}catch{}}this.uppy.setFileState(l,{isRemote:!0,isLoading:!1,errorCount:f+1}),await this.tryDownloadRemoteFile(this.uppy.getFile(l))})}else r&&await(async()=>new Promise(m=>{this.uppy.once(S,async()=>{m()})}))()};getPreviewFromData=e=>{const{id:t}=e,a=this.uppy.getFile(t);if(a){const{data:n,type:s,preview:o}=a;(s.indexOf("gif")>-1||!o)&&n&&s.indexOf("image")>-1&&setTimeout(()=>{this.uppy.setFileState(t,{preview:xa(n)})},s.indexOf("gif")>-1?1e3:0)}};prepareUpload=async e=>{await this.validateImagesRespectCropperOptions();const t=e.map(async n=>{const s=this.uppy.getFile(n);s.isDownloading&&this.uppy.emit("preprocess-progress",s,{mode:"indeterminate",message:this.i18n("loading")}),await this.prepareUploadWrapper(s)}),a=()=>{e.forEach(n=>{const s=this.uppy.getFile(n);this.uppy.emit("preprocess-complete",s)})};return Promise.all(t).then(a)};install(){this.uppy.addPreProcessor(this.prepareUpload),this.uppy.on("file-added",async e=>{setTimeout(()=>{this.prepareUploadWrapper(e)},200)}),this.uppy.on("file-editor:complete",e=>{this.getPreviewFromData(e)})}uninstall(){this.uppy.removePreProcessor(this.prepareUpload)}render(){return le(Ve,{})}}class Lw extends me{constructor(e,t){super(e,t),this.id=this.opts.id||"AIImage",this.title=this.opts.title||"AI Image",this.type="acquirer",this.uppy=e,this.i18nInit(),this.icon=()=>le("svg",{width:"20",height:"20",viewBox:"0 0 24 24",children:le("g",{fill:"none",stroke:"#a482fe","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",children:[le("path",{d:"M15 8h.01M10 21H6a3 3 0 0 1-3-3V6a3 3 0 0 1 3-3h12a3 3 0 0 1 3 3v5"}),le("path",{d:"m3 16l5-5c.928-.893 2.072-.893 3 0l1 1m2 9v-4a2 2 0 1 1 4 0v4m-4-2h4m3-4v6"})]})})}render(){return le("div",{id:"ai-image",className:"ai-image",children:le("div",{style:{height:"100%",display:"flex",justifyContent:"center",alignItems:"center"},children:this.i18n("loading")})})}update(){}onFirstRender(){}install(){const{target:e}=this.opts;e&&this.mount(e,this)}uninstall(){this.unmount()}}class Nw extends me{constructor(e,t){super(e,t),this.id=t.id,this.title=t.title,this.type="acquirer",this.uppy=e,this.i18nInit(),this.autoHide=t.autoHide??!0,typeof t.icon=="string"&&(this.icon=()=>le("div",{dangerouslySetInnerHTML:{__html:t.icon},style:{width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center"}}))}getDashboard(){return this.uppy.getPlugin(this.id)?.parent}render(){return this.autoHide&&this.getDashboard()?.hideAllPanels&&this.getDashboard().hideAllPanels(),le("div",{id:this.id,className:"uppy-VirtualPlugin"})}update(){}onFirstRender(){}uninstall(){this.unmount()}}const Yu=()=>navigator.userAgent.includes("Safari")&&!navigator.userAgent.includes("Chrome");class zw extends me{constructor(e,t){super(e,t),this.id=t?.id||"safari-paste",this.type="modifier"}onMount(){Yu()&&this.parent?.handlePaste&&document.addEventListener("paste",this.parent.handlePaste)}onUnmount(){Yu()&&this.parent?.handlePaste&&document.removeEventListener("paste",this.parent.handlePaste)}}const jw="z8ia1mAXo8ZE7ytGF36L5uBf9kD2kenhqFGp9",$w=K.lazy(()=>gf(()=>import("./index-DHLFobHl.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10]),import.meta.url)),Qu="uploader-container",Ro="uploader-dashboard",Hw='div[tabindex="-1"]',Ju=50,qw=10,Rr=localStorage.getItem("uppy_debug"),Vw=()=>Mo.get("x-csrf-token")?{"x-csrf-token":Mo.get("x-csrf-token")}:{},Ww=i=>{const{apiPathProps:e,availablePluginMap:t={},uploadedProps:a,resourcesProps:n,imageEditorProps:s={},theme:o,plugins:r,disableXssAttack:l}=i,{companionUrl:c}=fl(e),p=Vw(),u=async x=>(await Ni.post("/api/image/generations",x)).data,f={...i?.restrictions,maxFileSize:1/0};return[{id:"ImageEditor",plugin:Wd,options:{quality:1,...s},alwayUse:!0},(Rr||Ai()&&t.Uploaded&&!wr())&&{id:"Uploaded",plugin:Bx,options:{params:a?.params}},(Rr||Ai()&&t.Resources&&!wr())&&{id:"Resources",plugin:Nx,options:{params:n?.params}},Ai()&&(window.blocklet?.preferences?.useAiImage||t.AIImage)&&{id:"AIImage",plugin:Lw,options:{companionUrl:c,companionHeaders:p},onShowPanel:x=>{function S(){setTimeout(()=>{const C=document.getElementById("ai-image");C?mf.createRoot(C).render(B.jsx($w,{theme:o,api:u,restrictions:f,i18n:x.current?.getUploader()?.i18n,onSelect:w=>{const y=x.current.getUploader();y?.emit("ai-image:selected",w),w.forEach(({src:b,alt:h},m)=>{const v=E=>E?.length>16?`${E?.slice(0,8)}...${E?.slice(-4)}`:E,g=`${v(h)||v(b)}.png`,k={name:g,type:"image/png",data:bh(b,g),source:"AIImage",isRemote:!1};y?.addFile(k)})}})):S()},100)}S()}},{id:"Url",plugin:$t,options:{companionUrl:c,companionHeaders:p}},{id:"Webcam",plugin:Cp,options:{showVideoSourceDropdown:!0,showRecordingLength:!0,mirror:!1,videoConstraints:{facingMode:"environment"}}},!!window?.blocklet?.UNSPLASH_KEY&&t.Unsplash&&{id:"Unsplash",plugin:Vp,options:{companionUrl:c,companionHeaders:p,companionCookiesRule:"same-origin"}},{id:"PrepareUpload",plugin:Bw,options:{companionUrl:c,companionHeaders:p,cropperOptions:s?.cropperOptions||null,disableXssAttack:l},alwayUse:!0},{id:"ThumbnailGeneratorNext",plugin:Yr,options:{thumbnailType:"image/png",thumbnailWidth:"100%"},alwayUse:!0},...(r||[]).filter(x=>x?.id).map(x=>{const{id:S,options:C,onShowPanel:w}=x;return{id:S,plugin:Nw,options:C,onShowPanel:w}}),{id:"safari-paste",plugin:zw,alwayUse:!0}].filter(Boolean)};function Vh(i){const{id:e,plugins:t,locale:a="en",onAfterResponse:n,onUploadFinish:s,coreProps:o,apiPathProps:r,tusProps:l,dropTargetProps:c,pluginList:p,restrictions:u,onChange:f,initialFiles:x}=i,S=ap(p,"id"),{uploaderUrl:C}=fl(r);let w=new Br({id:e,meta:{uploaderId:e},debug:["true",!0].includes(Rr||""),locale:ya[a],onBeforeFileAdded:(h,m)=>{if(Object.hasOwn(m,h.id))return!1;const v=!!Ke.extension(h.type),g=Ke.lookup(h.name)||"";if(!v&&g&&g!==h.type){const k=Di(h);k&&(h.extension=k),h.type=g}return h},...o,restrictions:u}).use(fh,{chunkSize:1024*1024*10,removeFingerprintOnSuccess:!0,withCredentials:!0,endpoint:C,async onBeforeRequest(h,m){const{hashFileName:v,id:g,meta:k}=m,E=w.getFile(g)?.mockResponse||null;h.getMethod()==="PATCH"&&E&&(h.send=()=>E);const A=Di(m);h.setHeader("x-uploader-file-name",`${v}`),h.setHeader("x-uploader-file-id",`${g}`),h.setHeader("x-uploader-file-ext",`${A}`),h.setHeader("x-uploader-base-url",new URL(h.getURL()).pathname),h.setHeader("x-uploader-endpoint-url",C),h.setHeader("x-uploader-metadata",JSON.stringify(k,(j,O)=>typeof O=="string"?encodeURIComponent(O):O));const N=Mo.get("x-csrf-token");N&&h.setHeader("x-csrf-token",N);const z=window?.uploaderComponentId||window?.blocklet?.componentId;z&&h.setHeader("x-component-did",(z||"").split("/").pop())},onAfterResponse:async(h,m)=>{const v={},g=h.getUnderlyingObject();try{g.response&&(v.data=JSON.parse(g.response))}catch{v.data={}}v.method=h.getMethod().toUpperCase(),v.url=h.getURL(),v.status=g.status,v.headers={...h._headers};const k=g.getAllResponseHeaders();k&&k.split(`\r
|
|
50
50
|
`).forEach(j=>{const[O,$]=j.split(": ");O&&$&&(v.headers[O]=$)});const E=w.getFile(v.headers["x-uploader-file-id"]);if(h.getMethod()==="PATCH"&&E.mockResponse)return;if(["PATCH","POST"].includes(v.method)&&[200,500].includes(v.status)){const z=[!0,"true"].includes(v.headers["x-uploader-file-exist"]),j=Sh(v.url,v.headers["x-uploader-file-name"]);v.file=E,v.uploadURL=j;const O={uploadURL:j,...v};w.setFileState(E.id,{responseResult:O}),z&&E&&(v.method==="POST"&&w.setFileState(E.id,{mockResponse:m}),w.emit("upload-success",w.getFile(E.id),{...O,body:v.data}),w.emit("postprocess-complete",w.getFile(E.id)),w.calculateTotalProgress()),v.status===200&&(await s?.(v),w.emitUploadSuccess(E,v))}n&&await n?.(g);const A=w.getState().totalProgress===100,N=w.getFiles().every(z=>z.source==="DropTarget");A&&N&&w.close()},...l});const y=({fileIDs:h,id:m})=>{h.forEach(v=>{w.setFileState(v,{uploadID:m})})};w.off("upload",y),w.on("upload",y);const b=h=>{typeof f=="function"&&f(h,w.getFiles())};return w.off("file-added",b),w.on("file-added",b),w.off("file-removed-success",b),w.on("file-removed-success",b),c&&w.use(Dd,{target:document.body,onDrop:h=>{w?.open?.()},...c}),t?.forEach(h=>{if(h?.id||h){const{plugin:m,options:v}=S[h?.id||h]||{};m&&w.use(m,v)}}),Fh(w),x&&x?.length>0&&w.addFiles(x),w}function Ur({ref:i=void 0,...e}){const t={uploader:"/api/uploads",companion:"/api/companion",disableMediaKitPrefix:!1,disableMediaKitStatus:!1,...e?.apiPathProps},a=K.useRef(null),n=K.useRef(null),s=K.useRef(0),o=lf({open:!1,uppy:null,availablePluginMap:{},restrictions:_s(e?.coreProps?.restrictions)||{},isError:!1}),r=ep(),l=r?.palette?.mode,c=Ww({...e,apiPathProps:t,availablePluginMap:o.availablePluginMap,restrictions:o.restrictions,theme:r}),{plugins:p=c.map(F=>F.id),id:u="Uploader",popup:f=!1,onUploadFinish:x,onOpen:S,onClose:C,locale:w="en",installerProps:y}=e,b=ap(c,"id"),h=cf(F=>F?.breakpoints?.down("md")),m=ks([...p,...c.filter(F=>F.alwayUse).map(F=>F.id)]),{loading:v}=uf(async()=>{let F=Ts(e?.coreProps?.restrictions)?{}:_s(e?.coreProps?.restrictions);if(!t.disableMediaKitStatus&&Ai())try{await Ni.get("/api/uploader/status").then(({data:T})=>{o.availablePluginMap=T.availablePluginMap,!t.disableMediaKitPrefix&&Ts(e?.coreProps?.restrictions)&&(F=T.restrictions||{})}),o.isError=!1}catch{o.isError=!0}!F?.allowedFileTypes?.length&&F?.allowedFileExts&&(F.allowedFileTypes=ks(((typeof F?.allowedFileExts=="string"?F?.allowedFileExts.split(","):F?.allowedFileExts)||[])?.map(T=>Ke.lookup(T?.replaceAll(" ","")||""))?.filter(T=>T)),delete F.allowedFileExts),F.maxFileSize&&typeof F.maxFileSize=="string"&&(F.maxFileSize=wf.parseSize(F.maxFileSize,{iec:!1})||void 0),o.restrictions=_s(F)},{refreshDeps:[JSON.stringify({apiPathProps:t,restrictionsProps:e?.coreProps?.restrictions})]}),g=typeof o.restrictions?.allowedFileTypes=="object"&&o.restrictions?.allowedFileTypes?.length===0,k=K.useMemo(()=>ks(o.restrictions?.allowedFileTypes?.flatMap(F=>{if(F.endsWith("/*")){const T=F.split("/")?.[0];switch(T){case"image":return["jpg","jpeg","png","gif","svg","webp","bmp","tiff","avif","heic","ico","apng"];case"video":return["mp4","webm","mov","avi","wmv","flv","mkv","mpg","mpeg","3gp","m4v","ts","m2ts"];case"audio":return["mp3","wav","ogg","aac","flac","m4a","wma","opus","mid","midi","amr"];case"text":return["txt","html","htm","css","csv","md","rtf","xml","json","js","ts","jsx","tsx"];case"application":return["pdf","doc","docx","xls","xlsx","ppt","pptx","zip","rar","7z","tar","gz","exe","msi","apk","dmg","iso"];case"font":return["ttf","otf","woff","woff2","eot"];case"chemical":return["mol","pdb","cml","xyz"];case"model":return["obj","stl","gltf","glb","fbx","3ds","dae"];case"message":return["eml","msg","vcf","ics"];default:return T}}return Ke.extension(F)})||[])?.filter(Boolean)?.join(", ")||"",[o.restrictions?.allowedFileTypes]);let E="";g?E=rn(ya,`${w}.strings.noAllowedFileTypes`,"No allowed file types"):o.restrictions?.allowedFileTypes?.length&&k&&(E=rn(ya,`${w}.strings.allowedFileTypes`,"Allowed file types: ")+k),(Ts(E)||["undefined","null",void 0,null].includes(E))&&(E=""),xf("esc",F=>{o.open&&(F.stopPropagation(),F.preventDefault(),z())},{useCapture:!0}),K.useEffect(()=>{xh(t),o.uppy=Vh({...e,id:u,plugins:m,apiPathProps:t,pluginList:c,restrictions:o.restrictions}),o.uppy.open=N,o.uppy.close=z,o.uppy.openPlugin=A;const F=D=>{const{onShowPanel:U}=b[D];U?.(i)};o.uppy.off("dashboard:show-panel",F),o.uppy.on("dashboard:show-panel",F);const T=(D,U,V,W)=>{const Z=`${W.toLowerCase()}Props`,te=V[Z]?.onSelectedFiles;if(typeof te=="function"){const Q=D.map(Ye=>{const qt={name:Ye.id||Ye.fileUrl?.split("/")?.slice(-1)?.[0],type:Ye.mimetype||Ke.lookup(Ye.fileUrl),data:"",preview:Ye.fileUrl,source:W,isRemote:!0},ji=U.uppy.addFile(qt);return{...Ye,uppyFile:U.uppy.getFile(ji)}});te?.(Q)}else{const Q=[],Ye=[],qt=`Mock-${Math.random().toString(36).substring(2,15)}`;Promise.all(D.map(async ji=>{const bt=_h(ji);bt&&(bt.uploadID=qt,Q.push(bt)),await x?.(bt),U.uppy.emitUploadSuccess(bt.file,bt)})).then(()=>{U.uppy.close()}).finally(()=>{U.uppy.emit("complete",{failed:Ye,successful:Q,uploadID:qt})})}};[{name:"Uploaded",event:"uploaded:selected"},{name:"Resources",event:"resources:selected"}].forEach(({name:D,event:U})=>{m.includes(D)&&(o.uppy.off(U),o.uppy.on(U,V=>T(V,o,e,D)))})},[JSON.stringify({id:u,plugins:m,apiPathProps:t,locale:w,restrictions:o.restrictions,theme:r})]);function A(F){if(F=F.replace(/\s/g,""),["MyDevice",...m.map(I=>I.id||I)].map(I=>I.toLowerCase()).includes(F.toLowerCase())){let I=`div[data-uppy-acquirer-id="${F}"] > button`;document?.getElementById(Ro)?.querySelector(I)?.click?.()}}function N(F){o.open=!0,F&&setTimeout(()=>{A(F)},200),o.uppy.emitOpen(),S?.(),n.current&&(clearInterval(n.current),n.current=null),s.current=0,n.current=setInterval(()=>{const T=a.current?.querySelector(Hw);s.current+=1,(s.current>Ju||T&&T!==document.activeElement)&&(T&&T!==document.activeElement?(T.focus?.(),console.info("[Uploader] Trigger auto focus overlay success")):s.current>Ju&&console.info("[Uploader] Auto focus overlay failed after maximum attempts"),clearInterval(n.current),n.current=null)},qw)}function z(){n.current&&(clearInterval(n.current),n.current=null),o.uppy.getPlugin(Ro)?.hideAllPanels(),o.open=!1,o.uppy.emitClose(),C?.(),setTimeout(()=>{o.uppy.getState().totalProgress===100&&(o.uppy.setState({files:{},currentUploads:{}}),o.uppy.calculateTotalProgress())},500)}const j=(F,T,I)=>{F.forEach(D=>{o.uppy.addFile({name:D.name,type:D.type,data:D,source:T})}),I&&o.uppy.upload()},O=F=>{const T=document.createElement("input");T.type="file",T.style.display="none",T.accept=F?.accept??o.restrictions?.allowedFileTypes?.join(",")??"",T.multiple=F?.multiple??o.restrictions?.maxNumberOfFiles!==1,T.onchange=I=>{const D=I.target,U=Array.from(D.files||[]);j(U,"local",F?.autoUpload!==!1),document.body.removeChild(T)},document.body.appendChild(T),T.click()},$=F=>{const T=F?.autoUpload!==!1;let I=0;return{onDragEnter:D=>{D.preventDefault(),D.stopPropagation(),I++,D.dataTransfer?.items?.length&&D.currentTarget.setAttribute("data-dragging","true")},onDragLeave:D=>{D.preventDefault(),D.stopPropagation(),I--,I===0&&D.currentTarget.removeAttribute("data-dragging")},onDragOver:D=>{D.preventDefault(),D.stopPropagation()},onDrop:D=>{D.preventDefault(),D.stopPropagation(),D.currentTarget.removeAttribute("data-dragging"),I=0;const U=Array.from(D.dataTransfer?.files||[]);U.length&&j(U,"drop",T)},onClick:F?.noClick?void 0:()=>{O({autoUpload:T})}}};K.useImperativeHandle(i,()=>({getUploader:()=>o.uppy,open:N,close:z,triggerFileInput:O,getDropzoneProps:$,addFilesToUppy:j}));const G=f?pf:K.Fragment,_=f?{sx:{zIndex:99999999999,"& > *":{display:o.open?"block":"none"},display:"flex",justifyContent:"center",alignItems:"center",...e?.wrapperProps?.sx},invisible:!0,open:o.open,onClick:F=>{document.activeElement===document.body&&(F.stopPropagation(),z())},...e.wrapperProps}:{...e.wrapperProps},P=h?"42px":"40px";return B.jsx(G,{..._,children:B.jsxs(gh,{onClose:z,did:jw,disabled:!o.open,...y,children:[B.jsx(df,{styles:()=>({".uppy-is-drag-over":{"&::after":{transition:"all 0.3s ease-in-out",border:"2px dashed #bbb !important",borderRadius:4,background:"rgba(234, 234, 234, 0.5)"}}})}),B.jsxs(J,{className:"uploader-container",ref:a,id:Qu,onClick:F=>F.stopPropagation(),sx:{position:"relative",width:h?"90vw":720,animation:o.open?"uppy-Dashboard-fadeIn 150ms ease-in-out":"none","@keyframes uppy-Dashboard-fadeIn":{from:{opacity:0},to:{opacity:1}},".uppy-Dashboard-inner":{borderColor:"divider"},".uppy-ProviderBrowserItem > *":{transition:"all 0.3s ease-in-out"},".uppy-ProviderBrowserItem-inner":{flex:1,color:"transparent","img, object":{objectFit:"contain !important"}},".uppy-ProviderBrowserItem-checkbox":{backgroundColor:`${r?.palette?.primary?.main} !important`},".uppy-Dashboard-Item-previewInnerWrap, .uppy-ProviderBrowserItem-inner":{boxShadow:"none !important",background:"repeating-conic-gradient(#e0e0e0 0 25%,#fff 0 50%) 50%/18px 18px !important"},".uppy-ProviderBrowserItem--selected .uppy-ProviderBrowserItem-inner":{boxShadow:F=>`0 0 0 3px ${F.palette.primary.main} !important`},".uploaded-add-item":{background:r.palette.mode==="dark"?"rgba(255,255,255,0.1) !important":"rgba(0,0,0,0.1) !important",display:"flex",justifyContent:"center",alignItems:"center",transition:"all 0.3s ease-in-out","&:hover":{background:r.palette.mode==="dark"?"rgba(255,255,255,0.13) !important":"rgba(0,0,0,0.13) !important"}},".uppy-StatusBar-actions, .uppy-ProviderBrowser-footer":{justifyContent:"flex-end"},".uppy-ProviderBrowser-footer":{button:{marginRight:"0 !important","&:last-child":{display:"none"}}},".uppy-DashboardContent-panelBody":{height:0},".uppy-Dashboard-AddFiles-title":{whiteSpace:"normal"},".uppy-ProviderBrowser-body":{height:"100%"},".uppy-ProviderBrowser-list":{height:"fit-content",maxHeight:"100%",bgcolor:"background.paper"},".uploaded, .ai-image":{width:"100%",height:"100%",display:"flex",alignItems:"center",flexDirection:"column","& > div":{width:"100%",bgcolor:"background.paper"},"& .uppy-ProviderBrowser-header":{display:"none"}},"& .uppy-Url":{width:"100% !important",display:"flex",justifyContent:"center","& input":{width:"70%"}},"& .uppy-Dashboard-browse, & .uppy-DashboardContent-addMore, & .uppy-DashboardContent-back, & .uppy-StatusBar-actionBtn--done, & .uppy-DashboardContent-save, & .uppy-StatusBar-actionBtn--upload":{color:`${r?.palette?.primary?.main}`,transition:"all 0.3s ease-in-out","&:hover, &:focus":{color:`${r?.palette?.primary?.main}`,filter:"brightness(1.2)"}},"& .uppy-Dashboard-browse":{textDecoration:"underline !important"},"& .uppy-c-btn-primary":{backgroundColor:`${r?.palette?.primary?.main} !important`,transition:"all 0.3s ease-in-out","&:hover, &:focus":{backgroundColor:`${r?.palette?.primary?.main} !important`,filter:"brightness(1.2)"}},"& .button-color-style":{border:"1px solid",borderColor:"primary.main",color:"primary.main",backgroundColor:"transparent",transition:"all 0.3s ease-in-out","&:hover":{filter:"brightness(1.2)"}},"& .button-color-style-active":{backgroundColor:"primary.main",color:"white"}},children:[f&&B.jsx(Uo,{"aria-label":"close",onClick:z,sx:{color:l==="dark"?"#ddd":"#fafafa",position:"absolute",...h?{bottom:`calc(0px - ${P} - 16px)`,left:`calc(50vw - ${P} - 8px)`}:{right:`calc(0px - ${P} - 16px)`,top:-12}},children:B.jsx(Ff,{sx:{fontSize:P}})}),v&&B.jsxs(J,{sx:{position:"absolute",top:0,left:0,width:"100%",height:"100%",display:"flex",justifyContent:"center",alignItems:"center",zIndex:99999999999,flexDirection:"column",background:"rgba(256, 256, 256, 0.2)",backdropFilter:"blur(4px)",borderRadius:1,pointerEvents:"none"},children:[B.jsx(hf,{size:32}),B.jsx(ff,{variant:"body2",color:"primary",sx:{mt:1.5,fontWeight:"bold"},children:rn(ya,`${w}.strings.loadingStatus`,"Loading...")})]}),o.uppy&&B.jsx(xd,{inline:!0,target:`#${Qu}`,id:Ro,disabled:g||o.isError,uppy:o.uppy,plugins:m,fileManagerSelectionType:o.restrictions?.maxNumberOfFiles===1?"files":"both",proudlyDisplayPoweredByUppy:!1,showProgressDetails:!0,disableThumbnailGenerator:!0,theme:l==="dark"?"dark":"light",note:o.isError?rn(ya,`${w}.strings.error`,"Error"):E,doneButtonHandler:z,...e.dashboardProps})]},"uploader-container")]})},"uploader-wrapper")}const Fl=K.createContext(null);function Wh(){const i=K.useContext(Fl);if(!i)throw new Error("useUploaderContext must be used within an UploaderProvider");return i}function Gw({onChange:i,children:e,...t}){const a=Wh(),n=()=>{const s=a?.current?.getUploader();s?.open(),i&&s.onceUploadSuccess((...o)=>{i(...o)})};return B.jsx(J,{onClick:n,...t,children:e})}function Xw({children:i,popup:e,...t}){const a=K.useRef(null),n=K.useMemo(()=>e?vf.createPortal(B.jsx(Ur,{ref:a,popup:!0,...t},"uploader"),document.body):B.jsx(Ur,{ref:a,popup:!1,...t},"uploader"),[a,e,t]);return B.jsxs(Fl.Provider,{value:a,children:[i,n]})}const v3=Object.freeze(Object.defineProperty({__proto__:null,CLOSE:Xn,OPEN:Gn,UPLOADER_UPLOAD_SUCCESS:Sr,Uploader:Ur,UploaderContext:Fl,UploaderProvider:Xw,UploaderTrigger:Gw,api:wh,base64ToFile:bh,blobToFile:Wn,createImageUrl:Qa,getDownloadUrl:yh,getExt:Di,getMediaKitComponent:Ai,getObjectURL:xa,getUploaderEndpoint:fl,getUrl:Sh,initUploader:Vh,initUppy:Fh,isBlob:vh,isMediaKit:wr,isSvgFile:Ch,mediaKitApi:Ni,mediaKitMountPoint:mt,mockUploaderFileResponse:_h,parseStringToDot:Ph,get prefixPath(){return Ht},setPrefixPath:xh,useUploaderContext:Wh},Symbol.toStringTag,{value:"Module"}));export{v3 as i,ap as k,Ni as m};
|