@abtnode/blocklet-services 1.16.39-beta-20250210-090045-0b8f243f → 1.16.39-beta-20250211-013701-5e3d1ce3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (63) hide show
  1. package/dist/assets/{access-control-DdXj5niw.js → access-control-Cvyyosl7.js} +1 -1
  2. package/dist/assets/{add-component-core-BtRcqhKo.js → add-component-core-DlH-ksP3.js} +1 -1
  3. package/dist/assets/{add-resource-nU5RWMls.js → add-resource-Bi7DpPfy.js} +1 -1
  4. package/dist/assets/{analytics-X9VRwkzm.js → analytics-D5Wg9yw6.js} +1 -1
  5. package/dist/assets/{audit-logs-BJdGmYfI.js → audit-logs-CpENNExh.js} +1 -1
  6. package/dist/assets/{branding-DzXJA2pJ.js → branding-D_9x1yUc.js} +2 -2
  7. package/dist/assets/{bundle-avatar-CYdInmjR.js → bundle-avatar-3QSGrsNA.js} +1 -1
  8. package/dist/assets/{complete-DtNcnxdf.js → complete-DWza6ypd.js} +1 -1
  9. package/dist/assets/{component-DOOz4rgK.js → component-CMPB9eGw.js} +1 -1
  10. package/dist/assets/{config-navigation-B5FcBZZN.js → config-navigation-D-th1tcR.js} +3 -3
  11. package/dist/assets/{config-space-Y_f6nwhj.js → config-space-DQcEAb4q.js} +1 -1
  12. package/dist/assets/{config-CSlXpbL2.js → config-wRVMZtMQ.js} +1 -1
  13. package/dist/assets/{confirm-CpCj_oj-.js → confirm-dIU5y9cG.js} +1 -1
  14. package/dist/assets/{connect-BprUwdvy.js → connect-BCsAv_0T.js} +1 -1
  15. package/dist/assets/connect-Bzzh-qas.js +1 -0
  16. package/dist/assets/{connect-to-BYvNqC5N.js → connect-to-BzwS4rD2.js} +1 -1
  17. package/dist/assets/{dashboard-Cgj1BkGn.js → dashboard-DEaIei4u.js} +3 -3
  18. package/dist/assets/{domain-BD1Bntmg.js → domain-SUtQ2mKp.js} +1 -1
  19. package/dist/assets/{domain-list-h_f8stui.js → domain-list-C6MW__fO.js} +1 -1
  20. package/dist/assets/{email-BaNlnEr5.js → email-C1qoJ5wN.js} +1 -1
  21. package/dist/assets/{exchange-passport-CjaHJzsV.js → exchange-passport-DN1dbwCF.js} +1 -1
  22. package/dist/assets/{form-text-input-DS_PVT1r.js → form-text-input-DixVGGLY.js} +1 -1
  23. package/dist/assets/{fuel-BM8_TX9D.js → fuel-DbSYx7td.js} +1 -1
  24. package/dist/assets/{index-DRwuz-J9.js → index-B19CQ2ic.js} +1 -1
  25. package/dist/assets/{index-D6IQwB0H.js → index-BkTpbxSu.js} +1 -1
  26. package/dist/assets/{index-PcImULKW.js → index-Bv_3agvW.js} +1 -1
  27. package/dist/assets/{index-BMWG7Eya.js → index-Bwql_DnM.js} +1 -1
  28. package/dist/assets/{index-LIf2LIyz.js → index-C85gVBzh.js} +2 -2
  29. package/dist/assets/{index-0u5pzPhR.js → index-Cld1HWxz.js} +1 -1
  30. package/dist/assets/{index-Cqc33Ts_.js → index-DUoD69VU.js} +1 -1
  31. package/dist/assets/{index-C7dWd4bS.js → index-Dz_dMBd6.js} +4 -4
  32. package/dist/assets/{index-DF1jJ-bb.js → index-_suzTPHn.js} +3 -3
  33. package/dist/assets/{index-BA_7CRkd.js → index-aIv-YSXW.js} +1 -1
  34. package/dist/assets/{index-Dzj545ro.js → index-bmafJpME.js} +1 -1
  35. package/dist/assets/{index-ee8g6Cmz.js → index-sPEpq71V.js} +1 -1
  36. package/dist/assets/{index-DzU25sJ1.js → index-xXoK_djD.js} +1 -1
  37. package/dist/assets/{invitation-DSIQ2w-K.js → invitation-CBTcflFA.js} +1 -1
  38. package/dist/assets/{invite-C4uHXoFz.js → invite-BX9Ow66V.js} +1 -1
  39. package/dist/assets/{issue-passport-Dq9lOjJK.js → issue-passport-CgO1vOso.js} +1 -1
  40. package/dist/assets/{item-Ba7fzXuK.js → item-IntWv1pk.js} +1 -1
  41. package/dist/assets/{layout-BwWrVSXk.js → layout-DNDd_arD.js} +1 -1
  42. package/dist/assets/{list-DI-9r9EP.js → list-Cy1my35m.js} +1 -1
  43. package/dist/assets/{log-D4hWjoeK.js → log-BQgDF08N.js} +1 -1
  44. package/dist/assets/{login-DnwZJEBm.js → login-BUeQyCFg.js} +1 -1
  45. package/dist/assets/{logo-uploader-DbSGPbXh.js → logo-uploader-lx0oUxRg.js} +3 -3
  46. package/dist/assets/{lost-passport-Cqpxv9tR.js → lost-passport-C-DfyBDR.js} +1 -1
  47. package/dist/assets/open-window-BCSIX9-I.js +1 -1
  48. package/dist/assets/{overview-DMjokddi.js → overview-BZ7IJTY1.js} +1 -1
  49. package/dist/assets/{publish-resource-BeEqCNhj.js → publish-resource-C6LjZThR.js} +1 -1
  50. package/dist/assets/{relative-time-DpRjdL5Z.js → relative-time-ChYpdg43.js} +1 -1
  51. package/dist/assets/{setup-hqq9REGL.js → setup-BlbLoMQQ.js} +3 -3
  52. package/dist/assets/{start-C1K4M5DN.js → start-C_qLBKVg.js} +1 -1
  53. package/dist/assets/{step-actions-BJ9p7QSx.js → step-actions-BYvMcDu2.js} +1 -1
  54. package/dist/assets/{traffic-DelPjTGb.js → traffic-CctA2CCp.js} +1 -1
  55. package/dist/assets/{transfer-Dqy9gGzf.js → transfer-D5wgUCh5.js} +1 -1
  56. package/dist/assets/{unsubscribe-Bq-uODgj.js → unsubscribe-Fvp6J_a-.js} +1 -1
  57. package/dist/assets/{user-center-D0eTpKkD.js → user-center-BPnFfNIW.js} +1 -1
  58. package/dist/assets/{util-BpKZM3xV.js → util-XV_5OnOm.js} +1 -1
  59. package/dist/assets/{wrap-locale-oTlFUOZf.js → wrap-locale-BQ1e-7Pm.js} +1 -1
  60. package/dist/index.html +1 -1
  61. package/dist/service-worker.js +1 -1
  62. package/package.json +21 -21
  63. package/dist/assets/connect-ByH0XoiE.js +0 -1
@@ -1,5 +1,5 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-ee8g6Cmz.js","assets/vendor-mui-core-xF5F4eT7.js","assets/vendor-react-D-afvo_7.js","assets/vendor-hooks-BKxTDk_P.js","assets/vendor-utils-5TjOM6td.js","assets/vendor-arcblock-DZrZ_x_3.js","assets/vendor-arcblock-DhgPdlEj.css","assets/index-DcfIKM1A.js","assets/index-LIf2LIyz.js","assets/index-C2fPoxDR.js","assets/index-DoZ2YM4T.js"])))=>i.map(i=>d[i]);
2
- var Uh=Object.defineProperty;var Ih=(t,e,i)=>e in t?Uh(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i;var Ee=(t,e,i)=>Ih(t,typeof e!="symbol"?e+"":e,i);import{bT as Bh,bU as Mh,bV as Nh,bW as zh,bX as Lh,aG as Bu,aA as cs,bd as jh,ah as _l,bY as $h}from"./vendor-arcblock-DZrZ_x_3.js";import{r as B,g as qt,e as Sl,d as qh}from"./vendor-react-D-afvo_7.js";import{p as Hh}from"./index-C2fPoxDR.js";import{_ as Mu,aF as Wh}from"./index-LIf2LIyz.js";import{_ as X,c as vt,cL as Ma,d5 as Vh,cP as Fo,d6 as Gh,d7 as Kh,d8 as Xh,d9 as Yh,da as Qh,N as Jh,db as Zh,dc as Nu,dd as em,u as Co,j as J,cI as tm,g as hn,a as ea,l as je,k as mn,de as im,bS as Er,H as am,cU as nm,d as kn,cM as at,m as Pl,df as sm,dg as om,dh as rm,di as lm,b as cm,E as A,a2 as um,dj as pm}from"./vendor-mui-core-xF5F4eT7.js";import{t as zu,g as Lu,p as As,B as ti,d as ko,Z as Fl,U as ju,az as dm,aA as $u,L as Us,aB as Cl,c as Is,b as Bs}from"./vendor-utils-5TjOM6td.js";import{a as hm,n as mm,y as fm}from"./vendor-hooks-BKxTDk_P.js";import{c as Ne}from"./index-DoZ2YM4T.js";const fn="$$material";function gm(t,e){return X({toolbar:{minHeight:56,[t.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[t.up("sm")]:{minHeight:64}}},e)}const Xa={black:"#000",white:"#fff"},vm={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"},Ri={50:"#f3e5f5",100:"#e1bee7",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",600:"#8e24aa",700:"#7b1fa2",800:"#6a1b9a",900:"#4a148c",A100:"#ea80fc",A200:"#e040fb",A400:"#d500f9",A700:"#aa00ff"},Ai={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",A100:"#ff8a80",A200:"#ff5252",A400:"#ff1744",A700:"#d50000"},la={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",A100:"#ffd180",A200:"#ffab40",A400:"#ff9100",A700:"#ff6d00"},Ui={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",A100:"#82b1ff",A200:"#448aff",A400:"#2979ff",A700:"#2962ff"},Ii={50:"#e1f5fe",100:"#b3e5fc",200:"#81d4fa",300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",600:"#039be5",700:"#0288d1",800:"#0277bd",900:"#01579b",A100:"#80d8ff",A200:"#40c4ff",A400:"#00b0ff",A700:"#0091ea"},Bi={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",A100:"#b9f6ca",A200:"#69f0ae",A400:"#00e676",A700:"#00c853"},bm=["mode","contrastThreshold","tonalOffset"],kl={text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:Xa.white,default:Xa.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}},Ms={text:{primary:Xa.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:Xa.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}};function Tl(t,e,i,a){const n=a.light||a,s=a.dark||a*1.5;t[e]||(t.hasOwnProperty(i)?t[e]=t[i]:e==="light"?t.light=Gh(t.main,n):e==="dark"&&(t.dark=Kh(t.main,s)))}function ym(t="light"){return t==="dark"?{main:Ui[200],light:Ui[50],dark:Ui[400]}:{main:Ui[700],light:Ui[400],dark:Ui[800]}}function xm(t="light"){return t==="dark"?{main:Ri[200],light:Ri[50],dark:Ri[400]}:{main:Ri[500],light:Ri[300],dark:Ri[700]}}function wm(t="light"){return t==="dark"?{main:Ai[500],light:Ai[300],dark:Ai[700]}:{main:Ai[700],light:Ai[400],dark:Ai[800]}}function _m(t="light"){return t==="dark"?{main:Ii[400],light:Ii[300],dark:Ii[700]}:{main:Ii[700],light:Ii[500],dark:Ii[900]}}function Sm(t="light"){return t==="dark"?{main:Bi[400],light:Bi[300],dark:Bi[700]}:{main:Bi[800],light:Bi[500],dark:Bi[900]}}function Pm(t="light"){return t==="dark"?{main:la[400],light:la[300],dark:la[700]}:{main:"#ed6c02",light:la[500],dark:la[900]}}function Fm(t){const{mode:e="light",contrastThreshold:i=3,tonalOffset:a=.2}=t,n=vt(t,bm),s=t.primary||ym(e),o=t.secondary||xm(e),r=t.error||wm(e),l=t.info||_m(e),u=t.success||Sm(e),p=t.warning||Pm(e);function c(y){return Vh(y,Ms.text.primary)>=i?Ms.text.primary:kl.text.primary}const h=({color:y,name:f,mainShade:v=500,lightShade:P=300,darkShade:w=700})=>{if(y=X({},y),!y.main&&y[v]&&(y.main=y[v]),!y.hasOwnProperty("main"))throw new Error(Fo(11,f?` (${f})`:"",v));if(typeof y.main!="string")throw new Error(Fo(12,f?` (${f})`:"",JSON.stringify(y.main)));return Tl(y,"light",P,a),Tl(y,"dark",w,a),y.contrastText||(y.contrastText=c(y.main)),y},m={dark:Ms,light:kl};return Ma(X({common:X({},Xa),mode:e,primary:h({color:s,name:"primary"}),secondary:h({color:o,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:h({color:r,name:"error"}),warning:h({color:p,name:"warning"}),info:h({color:l,name:"info"}),success:h({color:u,name:"success"}),grey:vm,contrastThreshold:i,getContrastText:c,augmentColor:h,tonalOffset:a},m[e]),n)}const Cm=["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"];function km(t){return Math.round(t*1e5)/1e5}const El={textTransform:"uppercase"},Dl='"Roboto", "Helvetica", "Arial", sans-serif';function Tm(t,e){const i=typeof e=="function"?e(t):e,{fontFamily:a=Dl,fontSize:n=14,fontWeightLight:s=300,fontWeightRegular:o=400,fontWeightMedium:r=500,fontWeightBold:l=700,htmlFontSize:u=16,allVariants:p,pxToRem:c}=i,h=vt(i,Cm),m=n/14,g=c||(v=>`${v/u*m}rem`),y=(v,P,w,F,k)=>X({fontFamily:a,fontWeight:v,fontSize:g(P),lineHeight:w},a===Dl?{letterSpacing:`${km(F/P)}em`}:{},k,p),f={h1:y(s,96,1.167,-1.5),h2:y(s,60,1.2,-.5),h3:y(o,48,1.167,0),h4:y(o,34,1.235,.25),h5:y(o,24,1.334,0),h6:y(r,20,1.6,.15),subtitle1:y(o,16,1.75,.15),subtitle2:y(r,14,1.57,.1),body1:y(o,16,1.5,.15),body2:y(o,14,1.43,.15),button:y(r,14,1.75,.4,El),caption:y(o,12,1.66,.4),overline:y(o,12,2.66,1,El),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return Ma(X({htmlFontSize:u,pxToRem:g,fontFamily:a,fontSize:n,fontWeightLight:s,fontWeightRegular:o,fontWeightMedium:r,fontWeightBold:l},f),h,{clone:!1})}const Em=.2,Dm=.14,Om=.12;function ne(...t){return[`${t[0]}px ${t[1]}px ${t[2]}px ${t[3]}px rgba(0,0,0,${Em})`,`${t[4]}px ${t[5]}px ${t[6]}px ${t[7]}px rgba(0,0,0,${Dm})`,`${t[8]}px ${t[9]}px ${t[10]}px ${t[11]}px rgba(0,0,0,${Om})`].join(",")}const Rm=["none",ne(0,2,1,-1,0,1,1,0,0,1,3,0),ne(0,3,1,-2,0,2,2,0,0,1,5,0),ne(0,3,3,-2,0,3,4,0,0,1,8,0),ne(0,2,4,-1,0,4,5,0,0,1,10,0),ne(0,3,5,-1,0,5,8,0,0,1,14,0),ne(0,3,5,-1,0,6,10,0,0,1,18,0),ne(0,4,5,-2,0,7,10,1,0,2,16,1),ne(0,5,5,-3,0,8,10,1,0,3,14,2),ne(0,5,6,-3,0,9,12,1,0,3,16,2),ne(0,6,6,-3,0,10,14,1,0,4,18,3),ne(0,6,7,-4,0,11,15,1,0,4,20,3),ne(0,7,8,-4,0,12,17,2,0,5,22,4),ne(0,7,8,-4,0,13,19,2,0,5,24,4),ne(0,7,9,-4,0,14,21,2,0,5,26,4),ne(0,8,9,-5,0,15,22,2,0,6,28,5),ne(0,8,10,-5,0,16,24,2,0,6,30,5),ne(0,8,11,-5,0,17,26,2,0,6,32,5),ne(0,9,11,-5,0,18,28,2,0,7,34,6),ne(0,9,12,-6,0,19,29,2,0,7,36,6),ne(0,10,13,-6,0,20,31,3,0,8,38,7),ne(0,10,13,-6,0,21,33,3,0,8,40,7),ne(0,10,14,-6,0,22,35,3,0,8,42,7),ne(0,11,14,-7,0,23,36,3,0,9,44,8),ne(0,11,15,-7,0,24,38,3,0,9,46,8)],Am=["duration","easing","delay"],Um={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},Im={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function Ol(t){return`${Math.round(t)}ms`}function Bm(t){if(!t)return 0;const e=t/36;return Math.round((4+15*e**.25+e/5)*10)}function Mm(t){const e=X({},Um,t.easing),i=X({},Im,t.duration);return X({getAutoHeightDuration:Bm,create:(n=["all"],s={})=>{const{duration:o=i.standard,easing:r=e.easeInOut,delay:l=0}=s;return vt(s,Am),(Array.isArray(n)?n:[n]).map(u=>`${u} ${typeof o=="string"?o:Ol(o)} ${r} ${typeof l=="string"?l:Ol(l)}`).join(",")}},t,{easing:e,duration:i})}const Nm={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500},zm=["breakpoints","mixins","spacing","palette","transitions","typography","shape"];function qu(t={},...e){const{mixins:i={},palette:a={},transitions:n={},typography:s={}}=t,o=vt(t,zm);if(t.vars)throw new Error(Fo(18));const r=Fm(a),l=Xh(t);let u=Ma(l,{mixins:gm(l.breakpoints,i),palette:r,shadows:Rm.slice(),typography:Tm(r,s),transitions:Mm(n),zIndex:X({},Nm)});return u=Ma(u,o),u=e.reduce((p,c)=>Ma(p,c),u),u.unstable_sxConfig=X({},Yh,o==null?void 0:o.unstable_sxConfig),u.unstable_sx=function(c){return Qh({sx:c,theme:this})},u}const ws=qu();function Hu(){const t=Jh(ws);return t[fn]||t}function ta({props:t,name:e}){return Zh({props:t,name:e,defaultTheme:ws,themeId:fn})}const Lm=t=>Nu(t)&&t!=="classes",i3=Nu,Ei=em({themeId:fn,defaultTheme:ws,rootShouldForwardProp:Lm}),jm=t=>t.scrollTop;function Rl(t,e){var i,a;const{timeout:n,easing:s,style:o={}}=t;return{duration:(i=o.transitionDuration)!=null?i:typeof n=="number"?n:n[e.mode]||0,easing:(a=o.transitionTimingFunction)!=null?a:typeof s=="object"?s[e.mode]:s,delay:o.transitionDelay}}const $m=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"],qm={entering:{opacity:1},entered:{opacity:1}},Hm=B.forwardRef(function(e,i){const a=Hu(),n={enter:a.transitions.duration.enteringScreen,exit:a.transitions.duration.leavingScreen},{addEndListener:s,appear:o=!0,children:r,easing:l,in:u,onEnter:p,onEntered:c,onEntering:h,onExit:m,onExited:g,onExiting:y,style:f,timeout:v=n,TransitionComponent:P=tm}=e,w=vt(e,$m),F=B.useRef(null),k=Co(F,r.ref,i),S=U=>z=>{if(U){const _=F.current;z===void 0?U(_):U(_,z)}},C=S(h),D=S((U,z)=>{jm(U);const _=Rl({style:f,timeout:v,easing:l},{mode:"enter"});U.style.webkitTransition=a.transitions.create("opacity",_),U.style.transition=a.transitions.create("opacity",_),p&&p(U,z)}),R=S(c),j=S(y),N=S(U=>{const z=Rl({style:f,timeout:v,easing:l},{mode:"exit"});U.style.webkitTransition=a.transitions.create("opacity",z),U.style.transition=a.transitions.create("opacity",z),m&&m(U)}),H=S(g),q=U=>{s&&s(F.current,U)};return J.jsx(P,X({appear:o,in:u,nodeRef:F,onEnter:D,onEntered:R,onEntering:C,onExit:N,onExited:H,onExiting:j,addEndListener:q,timeout:v},w,{children:(U,z)=>B.cloneElement(r,X({style:X({opacity:0,visibility:U==="exited"&&!u?"hidden":void 0},qm[U],f,r.props.style),ref:k},z))}))});function Wm(t){return hn("MuiBackdrop",t)}ea("MuiBackdrop",["root","invisible"]);const Vm=["children","className","component","components","componentsProps","invisible","open","slotProps","slots","TransitionComponent","transitionDuration"],Gm=t=>{const{classes:e,invisible:i}=t;return mn({root:["root",i&&"invisible"]},Wm,e)},Km=Ei("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:i}=t;return[e.root,i.invisible&&e.invisible]}})(({ownerState:t})=>X({position:"fixed",display:"flex",alignItems:"center",justifyContent:"center",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent"},t.invisible&&{backgroundColor:"transparent"})),Xm=B.forwardRef(function(e,i){var a,n,s;const o=ta({props:e,name:"MuiBackdrop"}),{children:r,className:l,component:u="div",components:p={},componentsProps:c={},invisible:h=!1,open:m,slotProps:g={},slots:y={},TransitionComponent:f=Hm,transitionDuration:v}=o,P=vt(o,Vm),w=X({},o,{component:u,invisible:h}),F=Gm(w),k=(a=g.root)!=null?a:c.root;return J.jsx(f,X({in:m,timeout:v},P,{children:J.jsx(Km,X({"aria-hidden":!0},k,{as:(n=(s=y.root)!=null?s:p.Root)!=null?n:u,className:je(F.root,l,k==null?void 0:k.className),ownerState:X({},w,k==null?void 0:k.ownerState),classes:F,ref:i,children:r}))}))});function Ym(t){return J.jsx(im,X({},t,{defaultTheme:ws,themeId:fn}))}function Qm(t){const{className:e,classes:i,pulsate:a=!1,rippleX:n,rippleY:s,rippleSize:o,in:r,onExited:l,timeout:u}=t,[p,c]=B.useState(!1),h=je(e,i.ripple,i.rippleVisible,a&&i.ripplePulsate),m={width:o,height:o,top:-(o/2)+s,left:-(o/2)+n},g=je(i.child,p&&i.childLeaving,a&&i.childPulsate);return!r&&!p&&c(!0),B.useEffect(()=>{if(!r&&l!=null){const y=setTimeout(l,u);return()=>{clearTimeout(y)}}},[l,r,u]),J.jsx("span",{className:h,style:m,children:J.jsx("span",{className:g})})}const et=ea("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),Jm=["center","classes","className"];let _s=t=>t,Al,Ul,Il,Bl;const To=550,Zm=80,ef=Er(Al||(Al=_s`
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-sPEpq71V.js","assets/vendor-mui-core-xF5F4eT7.js","assets/vendor-react-D-afvo_7.js","assets/vendor-hooks-BKxTDk_P.js","assets/vendor-utils-5TjOM6td.js","assets/vendor-arcblock-DZrZ_x_3.js","assets/vendor-arcblock-DhgPdlEj.css","assets/index-DcfIKM1A.js","assets/index-C85gVBzh.js","assets/index-C2fPoxDR.js","assets/index-DoZ2YM4T.js"])))=>i.map(i=>d[i]);
2
+ var Uh=Object.defineProperty;var Ih=(t,e,i)=>e in t?Uh(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i;var Ee=(t,e,i)=>Ih(t,typeof e!="symbol"?e+"":e,i);import{bT as Bh,bU as Mh,bV as Nh,bW as zh,bX as Lh,aG as Bu,aA as cs,bd as jh,ah as _l,bY as $h}from"./vendor-arcblock-DZrZ_x_3.js";import{r as B,g as qt,e as Sl,d as qh}from"./vendor-react-D-afvo_7.js";import{p as Hh}from"./index-C2fPoxDR.js";import{_ as Mu,aF as Wh}from"./index-C85gVBzh.js";import{_ as X,c as vt,cL as Ma,d5 as Vh,cP as Fo,d6 as Gh,d7 as Kh,d8 as Xh,d9 as Yh,da as Qh,N as Jh,db as Zh,dc as Nu,dd as em,u as Co,j as J,cI as tm,g as hn,a as ea,l as je,k as mn,de as im,bS as Er,H as am,cU as nm,d as kn,cM as at,m as Pl,df as sm,dg as om,dh as rm,di as lm,b as cm,E as A,a2 as um,dj as pm}from"./vendor-mui-core-xF5F4eT7.js";import{t as zu,g as Lu,p as As,B as ti,d as ko,Z as Fl,U as ju,az as dm,aA as $u,L as Us,aB as Cl,c as Is,b as Bs}from"./vendor-utils-5TjOM6td.js";import{a as hm,n as mm,y as fm}from"./vendor-hooks-BKxTDk_P.js";import{c as Ne}from"./index-DoZ2YM4T.js";const fn="$$material";function gm(t,e){return X({toolbar:{minHeight:56,[t.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[t.up("sm")]:{minHeight:64}}},e)}const Xa={black:"#000",white:"#fff"},vm={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"},Ri={50:"#f3e5f5",100:"#e1bee7",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",600:"#8e24aa",700:"#7b1fa2",800:"#6a1b9a",900:"#4a148c",A100:"#ea80fc",A200:"#e040fb",A400:"#d500f9",A700:"#aa00ff"},Ai={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",A100:"#ff8a80",A200:"#ff5252",A400:"#ff1744",A700:"#d50000"},la={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",A100:"#ffd180",A200:"#ffab40",A400:"#ff9100",A700:"#ff6d00"},Ui={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",A100:"#82b1ff",A200:"#448aff",A400:"#2979ff",A700:"#2962ff"},Ii={50:"#e1f5fe",100:"#b3e5fc",200:"#81d4fa",300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",600:"#039be5",700:"#0288d1",800:"#0277bd",900:"#01579b",A100:"#80d8ff",A200:"#40c4ff",A400:"#00b0ff",A700:"#0091ea"},Bi={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",A100:"#b9f6ca",A200:"#69f0ae",A400:"#00e676",A700:"#00c853"},bm=["mode","contrastThreshold","tonalOffset"],kl={text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:Xa.white,default:Xa.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}},Ms={text:{primary:Xa.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:Xa.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}};function Tl(t,e,i,a){const n=a.light||a,s=a.dark||a*1.5;t[e]||(t.hasOwnProperty(i)?t[e]=t[i]:e==="light"?t.light=Gh(t.main,n):e==="dark"&&(t.dark=Kh(t.main,s)))}function ym(t="light"){return t==="dark"?{main:Ui[200],light:Ui[50],dark:Ui[400]}:{main:Ui[700],light:Ui[400],dark:Ui[800]}}function xm(t="light"){return t==="dark"?{main:Ri[200],light:Ri[50],dark:Ri[400]}:{main:Ri[500],light:Ri[300],dark:Ri[700]}}function wm(t="light"){return t==="dark"?{main:Ai[500],light:Ai[300],dark:Ai[700]}:{main:Ai[700],light:Ai[400],dark:Ai[800]}}function _m(t="light"){return t==="dark"?{main:Ii[400],light:Ii[300],dark:Ii[700]}:{main:Ii[700],light:Ii[500],dark:Ii[900]}}function Sm(t="light"){return t==="dark"?{main:Bi[400],light:Bi[300],dark:Bi[700]}:{main:Bi[800],light:Bi[500],dark:Bi[900]}}function Pm(t="light"){return t==="dark"?{main:la[400],light:la[300],dark:la[700]}:{main:"#ed6c02",light:la[500],dark:la[900]}}function Fm(t){const{mode:e="light",contrastThreshold:i=3,tonalOffset:a=.2}=t,n=vt(t,bm),s=t.primary||ym(e),o=t.secondary||xm(e),r=t.error||wm(e),l=t.info||_m(e),u=t.success||Sm(e),p=t.warning||Pm(e);function c(y){return Vh(y,Ms.text.primary)>=i?Ms.text.primary:kl.text.primary}const h=({color:y,name:f,mainShade:v=500,lightShade:P=300,darkShade:w=700})=>{if(y=X({},y),!y.main&&y[v]&&(y.main=y[v]),!y.hasOwnProperty("main"))throw new Error(Fo(11,f?` (${f})`:"",v));if(typeof y.main!="string")throw new Error(Fo(12,f?` (${f})`:"",JSON.stringify(y.main)));return Tl(y,"light",P,a),Tl(y,"dark",w,a),y.contrastText||(y.contrastText=c(y.main)),y},m={dark:Ms,light:kl};return Ma(X({common:X({},Xa),mode:e,primary:h({color:s,name:"primary"}),secondary:h({color:o,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:h({color:r,name:"error"}),warning:h({color:p,name:"warning"}),info:h({color:l,name:"info"}),success:h({color:u,name:"success"}),grey:vm,contrastThreshold:i,getContrastText:c,augmentColor:h,tonalOffset:a},m[e]),n)}const Cm=["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"];function km(t){return Math.round(t*1e5)/1e5}const El={textTransform:"uppercase"},Dl='"Roboto", "Helvetica", "Arial", sans-serif';function Tm(t,e){const i=typeof e=="function"?e(t):e,{fontFamily:a=Dl,fontSize:n=14,fontWeightLight:s=300,fontWeightRegular:o=400,fontWeightMedium:r=500,fontWeightBold:l=700,htmlFontSize:u=16,allVariants:p,pxToRem:c}=i,h=vt(i,Cm),m=n/14,g=c||(v=>`${v/u*m}rem`),y=(v,P,w,F,k)=>X({fontFamily:a,fontWeight:v,fontSize:g(P),lineHeight:w},a===Dl?{letterSpacing:`${km(F/P)}em`}:{},k,p),f={h1:y(s,96,1.167,-1.5),h2:y(s,60,1.2,-.5),h3:y(o,48,1.167,0),h4:y(o,34,1.235,.25),h5:y(o,24,1.334,0),h6:y(r,20,1.6,.15),subtitle1:y(o,16,1.75,.15),subtitle2:y(r,14,1.57,.1),body1:y(o,16,1.5,.15),body2:y(o,14,1.43,.15),button:y(r,14,1.75,.4,El),caption:y(o,12,1.66,.4),overline:y(o,12,2.66,1,El),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return Ma(X({htmlFontSize:u,pxToRem:g,fontFamily:a,fontSize:n,fontWeightLight:s,fontWeightRegular:o,fontWeightMedium:r,fontWeightBold:l},f),h,{clone:!1})}const Em=.2,Dm=.14,Om=.12;function ne(...t){return[`${t[0]}px ${t[1]}px ${t[2]}px ${t[3]}px rgba(0,0,0,${Em})`,`${t[4]}px ${t[5]}px ${t[6]}px ${t[7]}px rgba(0,0,0,${Dm})`,`${t[8]}px ${t[9]}px ${t[10]}px ${t[11]}px rgba(0,0,0,${Om})`].join(",")}const Rm=["none",ne(0,2,1,-1,0,1,1,0,0,1,3,0),ne(0,3,1,-2,0,2,2,0,0,1,5,0),ne(0,3,3,-2,0,3,4,0,0,1,8,0),ne(0,2,4,-1,0,4,5,0,0,1,10,0),ne(0,3,5,-1,0,5,8,0,0,1,14,0),ne(0,3,5,-1,0,6,10,0,0,1,18,0),ne(0,4,5,-2,0,7,10,1,0,2,16,1),ne(0,5,5,-3,0,8,10,1,0,3,14,2),ne(0,5,6,-3,0,9,12,1,0,3,16,2),ne(0,6,6,-3,0,10,14,1,0,4,18,3),ne(0,6,7,-4,0,11,15,1,0,4,20,3),ne(0,7,8,-4,0,12,17,2,0,5,22,4),ne(0,7,8,-4,0,13,19,2,0,5,24,4),ne(0,7,9,-4,0,14,21,2,0,5,26,4),ne(0,8,9,-5,0,15,22,2,0,6,28,5),ne(0,8,10,-5,0,16,24,2,0,6,30,5),ne(0,8,11,-5,0,17,26,2,0,6,32,5),ne(0,9,11,-5,0,18,28,2,0,7,34,6),ne(0,9,12,-6,0,19,29,2,0,7,36,6),ne(0,10,13,-6,0,20,31,3,0,8,38,7),ne(0,10,13,-6,0,21,33,3,0,8,40,7),ne(0,10,14,-6,0,22,35,3,0,8,42,7),ne(0,11,14,-7,0,23,36,3,0,9,44,8),ne(0,11,15,-7,0,24,38,3,0,9,46,8)],Am=["duration","easing","delay"],Um={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},Im={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function Ol(t){return`${Math.round(t)}ms`}function Bm(t){if(!t)return 0;const e=t/36;return Math.round((4+15*e**.25+e/5)*10)}function Mm(t){const e=X({},Um,t.easing),i=X({},Im,t.duration);return X({getAutoHeightDuration:Bm,create:(n=["all"],s={})=>{const{duration:o=i.standard,easing:r=e.easeInOut,delay:l=0}=s;return vt(s,Am),(Array.isArray(n)?n:[n]).map(u=>`${u} ${typeof o=="string"?o:Ol(o)} ${r} ${typeof l=="string"?l:Ol(l)}`).join(",")}},t,{easing:e,duration:i})}const Nm={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500},zm=["breakpoints","mixins","spacing","palette","transitions","typography","shape"];function qu(t={},...e){const{mixins:i={},palette:a={},transitions:n={},typography:s={}}=t,o=vt(t,zm);if(t.vars)throw new Error(Fo(18));const r=Fm(a),l=Xh(t);let u=Ma(l,{mixins:gm(l.breakpoints,i),palette:r,shadows:Rm.slice(),typography:Tm(r,s),transitions:Mm(n),zIndex:X({},Nm)});return u=Ma(u,o),u=e.reduce((p,c)=>Ma(p,c),u),u.unstable_sxConfig=X({},Yh,o==null?void 0:o.unstable_sxConfig),u.unstable_sx=function(c){return Qh({sx:c,theme:this})},u}const ws=qu();function Hu(){const t=Jh(ws);return t[fn]||t}function ta({props:t,name:e}){return Zh({props:t,name:e,defaultTheme:ws,themeId:fn})}const Lm=t=>Nu(t)&&t!=="classes",i3=Nu,Ei=em({themeId:fn,defaultTheme:ws,rootShouldForwardProp:Lm}),jm=t=>t.scrollTop;function Rl(t,e){var i,a;const{timeout:n,easing:s,style:o={}}=t;return{duration:(i=o.transitionDuration)!=null?i:typeof n=="number"?n:n[e.mode]||0,easing:(a=o.transitionTimingFunction)!=null?a:typeof s=="object"?s[e.mode]:s,delay:o.transitionDelay}}const $m=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"],qm={entering:{opacity:1},entered:{opacity:1}},Hm=B.forwardRef(function(e,i){const a=Hu(),n={enter:a.transitions.duration.enteringScreen,exit:a.transitions.duration.leavingScreen},{addEndListener:s,appear:o=!0,children:r,easing:l,in:u,onEnter:p,onEntered:c,onEntering:h,onExit:m,onExited:g,onExiting:y,style:f,timeout:v=n,TransitionComponent:P=tm}=e,w=vt(e,$m),F=B.useRef(null),k=Co(F,r.ref,i),S=U=>z=>{if(U){const _=F.current;z===void 0?U(_):U(_,z)}},C=S(h),D=S((U,z)=>{jm(U);const _=Rl({style:f,timeout:v,easing:l},{mode:"enter"});U.style.webkitTransition=a.transitions.create("opacity",_),U.style.transition=a.transitions.create("opacity",_),p&&p(U,z)}),R=S(c),j=S(y),N=S(U=>{const z=Rl({style:f,timeout:v,easing:l},{mode:"exit"});U.style.webkitTransition=a.transitions.create("opacity",z),U.style.transition=a.transitions.create("opacity",z),m&&m(U)}),H=S(g),q=U=>{s&&s(F.current,U)};return J.jsx(P,X({appear:o,in:u,nodeRef:F,onEnter:D,onEntered:R,onEntering:C,onExit:N,onExited:H,onExiting:j,addEndListener:q,timeout:v},w,{children:(U,z)=>B.cloneElement(r,X({style:X({opacity:0,visibility:U==="exited"&&!u?"hidden":void 0},qm[U],f,r.props.style),ref:k},z))}))});function Wm(t){return hn("MuiBackdrop",t)}ea("MuiBackdrop",["root","invisible"]);const Vm=["children","className","component","components","componentsProps","invisible","open","slotProps","slots","TransitionComponent","transitionDuration"],Gm=t=>{const{classes:e,invisible:i}=t;return mn({root:["root",i&&"invisible"]},Wm,e)},Km=Ei("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:i}=t;return[e.root,i.invisible&&e.invisible]}})(({ownerState:t})=>X({position:"fixed",display:"flex",alignItems:"center",justifyContent:"center",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent"},t.invisible&&{backgroundColor:"transparent"})),Xm=B.forwardRef(function(e,i){var a,n,s;const o=ta({props:e,name:"MuiBackdrop"}),{children:r,className:l,component:u="div",components:p={},componentsProps:c={},invisible:h=!1,open:m,slotProps:g={},slots:y={},TransitionComponent:f=Hm,transitionDuration:v}=o,P=vt(o,Vm),w=X({},o,{component:u,invisible:h}),F=Gm(w),k=(a=g.root)!=null?a:c.root;return J.jsx(f,X({in:m,timeout:v},P,{children:J.jsx(Km,X({"aria-hidden":!0},k,{as:(n=(s=y.root)!=null?s:p.Root)!=null?n:u,className:je(F.root,l,k==null?void 0:k.className),ownerState:X({},w,k==null?void 0:k.ownerState),classes:F,ref:i,children:r}))}))});function Ym(t){return J.jsx(im,X({},t,{defaultTheme:ws,themeId:fn}))}function Qm(t){const{className:e,classes:i,pulsate:a=!1,rippleX:n,rippleY:s,rippleSize:o,in:r,onExited:l,timeout:u}=t,[p,c]=B.useState(!1),h=je(e,i.ripple,i.rippleVisible,a&&i.ripplePulsate),m={width:o,height:o,top:-(o/2)+s,left:-(o/2)+n},g=je(i.child,p&&i.childLeaving,a&&i.childPulsate);return!r&&!p&&c(!0),B.useEffect(()=>{if(!r&&l!=null){const y=setTimeout(l,u);return()=>{clearTimeout(y)}}},[l,r,u]),J.jsx("span",{className:h,style:m,children:J.jsx("span",{className:g})})}const et=ea("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),Jm=["center","classes","className"];let _s=t=>t,Al,Ul,Il,Bl;const To=550,Zm=80,ef=Er(Al||(Al=_s`
3
3
  0% {
4
4
  transform: scale(0);
5
5
  opacity: 0.1;
@@ -125,5 +125,5 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
125
125
  <div class="uppy-ProviderBrowserItem-inner uploaded-add-item">
126
126
  <svg xmlns="http://www.w3.org/2000/svg" height="48px" viewBox="0 0 24 24" width="48px" fill="#ffffff"><path d="M0 0h24v24H0V0z" fill="none"/><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm5 11h-4v4h-2v-4H7v-2h4V7h2v4h4v2z"/></svg>
127
127
  </div>
128
- `,a.addEventListener("click",async()=>{await this.uppy.openPlugin("My Device")}),i.insertBefore(a,i.firstChild),this.addUploadItemFlag=!1}}},{wait:200}));Ee(this,"convertImgToObject",ko(()=>{this.canConvertImgToObject&&(document.querySelectorAll("#uploaded img").forEach(a=>{var l;if(!(a!=null&&a.src))return;const{src:n}=a,s=(l=this.uploadedAPIData.files)==null?void 0:l.find(u=>u.previewUrl===n),o=document.createElement("div");o.style="width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; position: relative; ";const r=document.createElement("div");if(r.className="uppy-ProviderBrowserItem-name",r.style="pointer-events: none; position: absolute; bottom: 0; left: 0; right: 0; padding: 5px; background: #0000004d; color: #fff; ",r.innerHTML=wh(s.originalname),[".mp4",".webm"].find(u=>{var p;return(p=a.src)==null?void 0:p.endsWith(u)})){const u=document.createElement("video");u.src=a.src,u.width=a.width,u.height=a.height,u.autoplay=!0,u.setAttribute("playsinline","playsinline"),u.muted=!0,u.loop=!0,u.style="pointer-events: none;",o.appendChild(u)}else{const u=document.createElement("object");u.data=n,u.type=s.mimetype||"image/png",u.alt=s.originalname,u.style="pointer-events: none; max-width: 100%; max-height: 100%; webkit-user-drag: none; object-fit: contain;",u.loading="lazy",o.appendChild(u)}o.appendChild(r),a.parentNode.replaceChild(o,a)}),this.canConvertImgToObject=!1)},{wait:200}));Ee(this,"resetState",()=>{this.uploadedAPIData={...ku},this.uploaded.setPluginState({...Tu}),this.addUploadItemFlag=!0});this.id=this.opts.id||"Uploaded",this.title=this.opts.title||"Uploaded",this.params=this.opts.params||{},this.type="acquirer",this.uppy=i,this.uploadedAPIData={...ku},this.addUploadItemFlag=!0,this.icon=()=>ve("svg",{"aria-hidden":"true",focusable:"false",width:"18",height:"18",viewBox:"0 0 1024 1024",children:[ve("path",{d:"M145.6 0c-44.8 0-80 36.8-80 81.6V944c0 44.8 35.2 80 80 80h732.8c44.8 0 81.6-35.2 81.6-80V326.4L657.6 0h-512z",fill:"#49C9A7"}),ve("path",{d:"M960 326.4v16H755.2s-100.8-20.8-99.2-108.8c0 0 4.8 92.8 97.6 92.8H960z",fill:"#49C9A7"}),ve("path",{d:"M657.6 0v233.6c0 25.6 17.6 92.8 97.6 92.8H960L657.6 0z",fill:"#37BB91"}),ve("path",{d:"M225.6 859.2V524.8H560v334.4H225.6z m300.8-300.8H259.2v201.6h267.2V558.4z m-153.6 134.4l62.4-84.8 20.8 33.6 20.8-6.4 16 89.6H283.2l56-52.8 33.6 20.8z m-60.8-59.2c-14.4 0-27.2-9.6-27.2-24 0-12.8 12.8-24 27.2-24 14.4 0 25.6 11.2 25.6 24 0 14.4-11.2 24-25.6 24z",fill:"#FFFFFF"})]})}render(i){var a;return!this.uploadedAPIData.loading&&((a=this.uploadedAPIData.files)==null?void 0:a.length)===0&&this.queryUploadedFromMediaKit(),ve("div",{id:"uploaded",className:"uploaded",children:this.view.render(i)})}update(){this.convertImgToObject(),this.addUploadItem()}onFirstRender(){}install(){this.view=new zr(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=(a,n)=>{const{currentSelection:s}=this.uploaded.getPluginState(),o=this.uploaded.uppy.opts.restrictions.maxNumberOfFiles,r=o?s.length<o:!0;s.find(l=>l._id===n._id)?this.uploaded.setPluginState({currentSelection:[...s.filter(l=>l._id!==n._id)]}):(r||s.pop(),this.uploaded.setPluginState({currentSelection:[...s,n]}))},this.view.donePicking=()=>{const{currentSelection:a}=this.uploaded.getPluginState();this.uppy.emit("uploaded:selected",a),this.uploaded.parent.hideAllPanels()},this.uploaded.uppy.validateRestrictions=()=>!1,this.view.handleScroll=a=>{const{scrollHeight:n,scrollTop:s,offsetHeight:o}=a.target;n-(s+o)<30&&this.queryUploadedFromMediaKit()};const{target:i}=this.opts;i&&this.mount(i,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},Ph={padding:"5px 15px",marginRight:"8px",marginTop:"8px",borderRadius:"4px",cursor:"pointer",border:"1px solid rgb(29, 193, 199)",color:"rgb(29, 193, 199)",backgroundColor:"transparent",fontSize:"14px",lineHeight:"24.5px",fontWeight:"bold"},n2={...Ph,color:"#fff",backgroundColor:"rgb(29, 193, 199)"};class s2 extends Se{constructor(i,a){super(i,a);Ee(this,"queryResources",async()=>{if(!this.apiData.loading){this.apiData.loading=!0;const{data:i}=await oa.get("/api/resources",{params:{componentDid:this.apiData.componentDid}});this.apiData.loading=!1,this.apiData.initialized=!0,this.apiData.components=i.components||[],this.apiData.componentDid=i.componentDid||"",this.apiData.files=ju([...i.resources.map(a=>{let n="file";const{filename:s}=a,o=dn(s,0,0,kt);return n=dn(s,400,0,kt),{filename:s,_id:s,id:s,name:s,icon:n,previewUrl:n,fileUrl:o}})],"id"),this.resources.setPluginState({files:this.apiData.files,loading:!1})}});Ee(this,"resetState",()=>{this.apiData={...Eu},this.resources.setPluginState({...Du})});this.id=this.opts.id||"Resources",this.title=this.opts.title||"Resources",this.params=this.opts.params||{},this.type="acquirer",this.uppy=i,this.componentDid="",this.apiData={...Eu},this.icon=()=>ve("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:[ve("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"}),ve("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"}),ve("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(i){return!this.apiData.loading&&!this.apiData.initialized&&this.queryResources(),ve("div",{id:"resources",className:"uploaded",children:[ve("div",{style:{padding:this.apiData.components.length?"12px":"0",backgroundColor:"#fff",display:"flex",flexWrap:"wrap",marginTop:"-8px"},children:this.apiData.components.map(a=>ve("button",{style:this.apiData.componentDid===a.did?n2:Ph,id:a.componentDid,onClick:()=>{this.apiData.componentDid!==a.did&&(this.apiData.componentDid=a.did,this.queryResources())},children:dm(a.name)}))}),this.view.render(i)]})}update(){}onFirstRender(){}install(){this.view=new zr(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=(a,n)=>{const{currentSelection:s}=this.resources.getPluginState(),o=this.resources.uppy.opts.restrictions.maxNumberOfFiles,r=o?s.length<o:!0;s.find(l=>l.id===n.id)?this.resources.setPluginState({currentSelection:[...s.filter(l=>l.id!==n.id)]}):(r||s.pop(),this.resources.setPluginState({currentSelection:[...s,n]}))},this.resources.uppy.validateRestrictions=()=>!1,this.view.donePicking=()=>{const{currentSelection:a}=this.resources.getPluginState();this.uppy.emit("resources:selected",a),this.resources.parent.hideAllPanels()};const{target:i}=this.opts;i&&this.mount(i,this)}uninstall(){this.unmount(),this.resources.uppy.off("dashboard:show-panel",this.resetState)}}var o2=jh();const r2=qt(o2);var qe=Uint8Array,Wi=Uint16Array,l2=Int32Array,Fh=new qe([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]),Ch=new qe([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]),c2=new qe([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),kh=function(t,e){for(var i=new Wi(31),a=0;a<31;++a)i[a]=e+=1<<t[a-1];for(var n=new l2(i[30]),a=1;a<30;++a)for(var s=i[a];s<i[a+1];++s)n[s]=s-i[a]<<5|a;return{b:i,r:n}},Th=kh(Fh,2),Eh=Th.b,u2=Th.r;Eh[28]=258,u2[258]=28;var p2=kh(Ch,0),d2=p2.b,Cr=new Wi(32768);for(var ae=0;ae<32768;++ae){var Gt=(ae&43690)>>1|(ae&21845)<<1;Gt=(Gt&52428)>>2|(Gt&13107)<<2,Gt=(Gt&61680)>>4|(Gt&3855)<<4,Cr[ae]=((Gt&65280)>>8|(Gt&255)<<8)>>1}var Ka=function(t,e,i){for(var a=t.length,n=0,s=new Wi(e);n<a;++n)t[n]&&++s[t[n]-1];var o=new Wi(e);for(n=1;n<e;++n)o[n]=o[n-1]+s[n-1]<<1;var r;if(i){r=new Wi(1<<e);var l=15-e;for(n=0;n<a;++n)if(t[n])for(var u=n<<4|t[n],p=e-t[n],c=o[t[n]-1]++<<p,h=c|(1<<p)-1;c<=h;++c)r[Cr[c]>>l]=u}else for(r=new Wi(a),n=0;n<a;++n)t[n]&&(r[n]=Cr[o[t[n]-1]++]>>15-t[n]);return r},Sn=new qe(288);for(var ae=0;ae<144;++ae)Sn[ae]=8;for(var ae=144;ae<256;++ae)Sn[ae]=9;for(var ae=256;ae<280;++ae)Sn[ae]=7;for(var ae=280;ae<288;++ae)Sn[ae]=8;var Dh=new qe(32);for(var ae=0;ae<32;++ae)Dh[ae]=5;var h2=Ka(Sn,9,1),m2=Ka(Dh,5,1),wo=function(t){for(var e=t[0],i=1;i<t.length;++i)t[i]>e&&(e=t[i]);return e},ct=function(t,e,i){var a=e/8|0;return(t[a]|t[a+1]<<8)>>(e&7)&i},_o=function(t,e){var i=e/8|0;return(t[i]|t[i+1]<<8|t[i+2]<<16)>>(e&7)},f2=function(t){return(t+7)/8|0},vl=function(t,e,i){return(e==null||e<0)&&(e=0),(i==null||i>t.length)&&(i=t.length),new qe(t.subarray(e,i))},g2=["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"],De=function(t,e,i){var a=new Error(e||g2[t]);if(a.code=t,Error.captureStackTrace&&Error.captureStackTrace(a,De),!i)throw a;return a},bl=function(t,e,i,a){var n=t.length,s=a?a.length:0;if(!n||e.f&&!e.l)return i||new qe(0);var o=!i,r=o||e.i!=2,l=e.i;o&&(i=new qe(n*3));var u=function(ai){var ni=i.length;if(ai>ni){var si=new qe(Math.max(ni*2,ai));si.set(i),i=si}},p=e.f||0,c=e.p||0,h=e.b||0,m=e.l,g=e.d,y=e.m,f=e.n,v=n*8;do{if(!m){p=ct(t,c,1);var P=ct(t,c+1,3);if(c+=3,P)if(P==1)m=h2,g=m2,y=9,f=5;else if(P==2){var S=ct(t,c,31)+257,C=ct(t,c+10,15)+4,D=S+ct(t,c+5,31)+1;c+=14;for(var R=new qe(D),j=new qe(19),N=0;N<C;++N)j[c2[N]]=ct(t,c+N*3,7);c+=C*3;for(var H=wo(j),q=(1<<H)-1,U=Ka(j,H,1),N=0;N<D;){var z=U[ct(t,c,q)];c+=z&15;var w=z>>4;if(w<16)R[N++]=w;else{var _=0,b=0;for(w==16?(b=3+ct(t,c,3),c+=2,_=R[N-1]):w==17?(b=3+ct(t,c,7),c+=3):w==18&&(b=11+ct(t,c,127),c+=7);b--;)R[N++]=_}}var x=R.subarray(0,S),T=R.subarray(S);y=wo(x),f=wo(T),m=Ka(x,y,1),g=Ka(T,f,1)}else De(1);else{var w=f2(c)+4,F=t[w-4]|t[w-3]<<8,k=w+F;if(k>n){l&&De(0);break}r&&u(h+F),i.set(t.subarray(w,k),h),e.b=h+=F,e.p=c=k*8,e.f=p;continue}if(c>v){l&&De(0);break}}r&&u(h+131072);for(var O=(1<<y)-1,E=(1<<f)-1,$=c;;$=c){var _=m[_o(t,c)&O],V=_>>4;if(c+=_&15,c>v){l&&De(0);break}if(_||De(2),V<256)i[h++]=V;else if(V==256){$=c,m=null;break}else{var G=V-254;if(V>264){var N=V-257,Q=Fh[N];G=ct(t,c,(1<<Q)-1)+Eh[N],c+=Q}var Z=g[_o(t,c)&E],te=Z>>4;Z||De(3),c+=Z&15;var T=d2[te];if(te>3){var Q=Ch[te];T+=_o(t,c)&(1<<Q)-1,c+=Q}if(c>v){l&&De(0);break}r&&u(h+131072);var ii=h+G;if(h<T){var Re=s-T,Di=Math.min(T,ii);for(Re+h<0&&De(3);h<Di;++h)i[h]=a[Re+h]}for(;h<ii;++h)i[h]=i[h-T]}}e.l=m,e.p=$,e.b=h,e.f=p,m&&(p=1,e.m=y,e.d=g,e.n=f)}while(!p);return h!=i.length&&o?vl(i,0,h):i.subarray(0,h)},v2=new qe(0),wt=function(t,e){return t[e]|t[e+1]<<8},ft=function(t,e){return(t[e]|t[e+1]<<8|t[e+2]<<16|t[e+3]<<24)>>>0},So=function(t,e){return ft(t,e)+ft(t,e+4)*4294967296},b2=function(t){(t[0]!=31||t[1]!=139||t[2]!=8)&&De(6,"invalid gzip data");var e=t[3],i=10;e&4&&(i+=(t[10]|t[11]<<8)+2);for(var a=(e>>3&1)+(e>>4&1);a>0;a-=!t[i++]);return i+(e&2)},y2=function(t){var e=t.length;return(t[e-4]|t[e-3]<<8|t[e-2]<<16|t[e-1]<<24)>>>0},x2=function(t,e){return((t[0]&15)!=8||t[0]>>4>7||(t[0]<<8|t[1])%31)&&De(6,"invalid zlib data"),(t[1]>>5&1)==+!e&&De(6,"invalid zlib data: "+(t[1]&32?"need":"unexpected")+" dictionary"),(t[1]>>3&4)+2};function Oh(t,e){return bl(t,{i:2},e&&e.out,e&&e.dictionary)}function w2(t,e){var i=b2(t);return i+8>t.length&&De(6,"invalid gzip data"),bl(t.subarray(i,-8),{i:2},e&&e.out||new qe(y2(t)),e&&e.dictionary)}function _2(t,e){return bl(t.subarray(x2(t,e&&e.dictionary),-4),{i:2},e&&e.out,e&&e.dictionary)}function Po(t,e){return t[0]==31&&t[1]==139&&t[2]==8?w2(t,e):(t[0]&15)!=8||t[0]>>4>7||(t[0]<<8|t[1])%31?Oh(t,e):_2(t,e)}var kr=typeof TextDecoder<"u"&&new TextDecoder,S2=0;try{kr.decode(v2,{stream:!0}),S2=1}catch{}var P2=function(t){for(var e="",i=0;;){var a=t[i++],n=(a>127)+(a>223)+(a>239);if(i+n>t.length)return{s:e,r:vl(t,i-1)};n?n==3?(a=((a&15)<<18|(t[i++]&63)<<12|(t[i++]&63)<<6|t[i++]&63)-65536,e+=String.fromCharCode(55296|a>>10,56320|a&1023)):n&1?e+=String.fromCharCode((a&31)<<6|t[i++]&63):e+=String.fromCharCode((a&15)<<12|(t[i++]&63)<<6|t[i++]&63):e+=String.fromCharCode(a)}};function F2(t,e){if(e){for(var i="",a=0;a<t.length;a+=16384)i+=String.fromCharCode.apply(null,t.subarray(a,a+16384));return i}else{if(kr)return kr.decode(t);var n=P2(t),s=n.s,i=n.r;return i.length&&De(8),s}}var C2=function(t,e){return e+30+wt(t,e+26)+wt(t,e+28)},k2=function(t,e,i){var a=wt(t,e+28),n=F2(t.subarray(e+46,e+46+a),!(wt(t,e+8)&2048)),s=e+46+a,o=ft(t,e+20),r=i&&o==4294967295?T2(t,s):[o,ft(t,e+24),ft(t,e+42)],l=r[0],u=r[1],p=r[2];return[wt(t,e+10),l,u,n,s+wt(t,e+30)+wt(t,e+32),p]},T2=function(t,e){for(;wt(t,e)!=1;e+=4+wt(t,e+2));return[So(t,e+12),So(t,e+4),So(t,e+20)]};function E2(t,e){for(var i={},a=t.length-22;ft(t,a)!=101010256;--a)(!a||t.length-a>65558)&&De(13);var n=wt(t,a+8);if(!n)return{};var s=ft(t,a+16),o=s==4294967295||n==65535;if(o){var r=ft(t,a-12);o=ft(t,r)==101075792,o&&(n=ft(t,r+32),s=ft(t,r+48))}for(var l=e&&e.filter,u=0;u<n;++u){var p=k2(t,s,o),c=p[0],h=p[1],m=p[2],g=p[3],y=p[4],f=p[5],v=C2(t,f);s=y,(!l||l({name:g,size:h,originalSize:m,compression:c}))&&(c?c==8?i[g]=Oh(t.subarray(v,v+h),{out:new qe(m)}):De(14,"unknown compression type "+c):i[g]=vl(t,v,v+h))}return i}const Vn={zip:E2,gz:Po,tgz:Po,deflate:Po};class D2 extends Se{constructor(i,a){super(i,{...{},...a});Ee(this,"setHashFileName",async i=>{const{id:a}=i,n=this.uppy.getFile(a);if(n){const{data:s}=n,o=1024*1024*5,r=s.slice(0,o),l=r2.createHash("md5").update(await r.text()).digest("hex"),u=Xi(n),p=`${l}${u?`.${u}`:""}`;this.uppy.setFileState(a,{hashFileName:p})}});Ee(this,"setMetaData",async i=>{const{id:a}=i,n=this.uppy.getFile(a);if(n){const{data:{webkitRelativePath:s,relativePath:o,name:r},hashFileName:l}=n,u=o||s||r||l;this.uppy.setFileMeta(a,{relativePath:u,name:u})}});Ee(this,"preventXssAttack",async i=>{const{id:a}=i,n=this.uppy.getFile(a);if(n){const{name:s,meta:o}=this.uppy.getFile(a),r=_l.sanitize(s);if(s!==r){const u=Xi(n),p=r.endsWith(`.${u}`)?r:`${r}.${u}`;this.uppy.setFileState(a,{name:p,meta:{...o,name:p,filename:p}})}if(await _h(n)){const{data:u,name:p,type:c}=this.uppy.getFile(a),h=await u.text(),m=_l.sanitize(h,{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","style","id","class","offset","stop-color","stop-opacity","clip-path","mask","fill-opacity","stroke-opacity"],FORBID_TAGS:["a","script","iframe","image","foreignObject"],FORBID_ATTR:["href","xlink:href","onclick","onload","onerror"]});if(h!==m){const g=new Blob([m],{type:c}),y=_r(g,p);this.uppy.setFileState(a,{...this.uppy.getFile(a),data:y}),console.info("clean svg file xss attack",{name:p,originalFile:n.data.text(),cleanFile:m})}}}});Ee(this,"preventZipBombAttack",async i=>{const{id:a}=i,n=this.uppy.getFile(a);try{if(n&&Vn[n.extension]){const{data:s}=n,o=Vn[n.extension](new Uint8Array(await s.arrayBuffer())),r=(u,p,c=0)=>Object.entries(u instanceof Uint8Array?{[p||n.name]:u}:u).reduce((h,[m,g])=>{if(!g||g.byteLength===0)return console.warn("Invalid or empty item in unzipped content",{name:m,item:g}),h;const y=h+g.byteLength;if(c>=5||y>n.size*100)throw console.error("Zip bomb detected, please check your file",{depth:c,baseAcc:y,fileSize:n.size}),new Error("Zip bomb detected, please check your file");const f=it.extension(it.lookup(m));if(Vn[f]){const v=Vn[f](g);return y+r(v,m,c+1)}return y},0);if(r(o)>n.size*100)throw new Error("Zip bomb detected, please check your file")}}catch(s){if(s.message.includes("Zip bomb detected"))throw s}});Ee(this,"validateImagesRespectCropperOptions",async()=>this.uppy.getFiles().reduce(async(i,a)=>{var y,f,v;await i;const{id:n}=a;let s=this.uppy.getFile(n);if(s.isRemote&&(await this.tryDownloadRemoteFile(s),s=this.uppy.getFile(n)),!((y=this.opts.cropperOptions)!=null&&y.aspectRatio)||!((f=s==null?void 0:s.type)!=null&&f.includes("image"))||(v=s.type)!=null&&v.includes("image/svg"))return Promise.resolve();const{aspectRatio:o}=this.opts.cropperOptions,r=this.uppy.getPlugin("ImageEditor"),l=document.querySelector(`[src="${s.preview}"]`)||document.getElementById("uppy_"+n).querySelector("img"),u=l==null?void 0:l.naturalWidth,p=l==null?void 0:l.naturalHeight,c=Number(u/p).toFixed(2),h=Number(o).toFixed(2);if(c===h)return Promise.resolve();this.uppy.emit("preprocess-progress",s,{mode:"indeterminate",message:this.i18n("editorLoading")}),r.parent.openFileEditor(s);const g=this.i18n("aspectRatioMessage",{imageAspectRatio:c,aspectRatio:h});return this.uppy.info({message:g,details:g}),new Promise((P,w)=>{this.uppy.once("file-editor:complete",()=>{setTimeout(()=>{P()},200)}),this.uppy.once("file-editor:cancel",()=>{})})},Promise.resolve()));Ee(this,"prepareUploadWrapper",async i=>{await this.tryDownloadRemoteFile(i),await this.getPreviewFromData(i),await this.setHashFileName(i),await this.preventXssAttack(i),await this.preventZipBombAttack(i),await this.setMetaData(i)});Ee(this,"tryDownloadRemoteFile",async i=>{var F,k;const{type:a,name:n,preview:s,source:o,isRemote:r,isDownloading:l,id:u,isLoading:p,remote:c,meta:h,errorCount:m=0}=i,g=!p&&r,y=`uploader:${u}:downloaded`,f=Xi(i),v=(F=n==null?void 0:n.split("?"))==null?void 0:F[0],w=(()=>{const S=["jpg","jpeg"];return S.includes(f)&&S.some(C=>v==null?void 0:v.endsWith(C))?!0:v==null?void 0:v.endsWith(f)})()?v:`${v}${f?`.${f}`:""}`;if(g){const S=gh(s||((k=c==null?void 0:c.body)==null?void 0:k.url));if(m>=3)throw this.uppy.setFileState(u,{error:this.i18n("downloadRemoteFileFailure"),meta:{...h,name:this.i18n("downloadRemoteFileFailure")}}),new Error("Download remote file failure");this.uppy.setFileState(u,{isLoading:!0,isDownloading:!0,size:null,meta:{...h,name:this.i18n("loading")}}),await fl.get(S,{responseType:"blob"}).then(C=>C==null?void 0:C.data).then(async C=>{const D=_r(C,w);this.uppy.setFileState(u,{name:w,extension:f,type:a,data:D,preview:s||wr(D),source:o,size:D.size,isDownloading:!1,isRemote:!1,meta:{...h,name:w,filename:w}}),this.uppy.getFile(u),this.uppy.emit(y,u)}).catch(async C=>{console.error("Axios download remote file error: ",C),this.uppy.setFileState(u,{isRemote:!0,isLoading:!1,errorCount:m+1}),await this.tryDownloadRemoteFile(this.uppy.getFile(u))})}else l&&await(async()=>new Promise(C=>{this.uppy.once(y,async()=>{C()})}))()});Ee(this,"getPreviewFromData",i=>{const{id:a}=i,n=this.uppy.getFile(a);if(n){const{data:s,type:o,preview:r}=n;(o.indexOf("gif")>-1||!r)&&s&&o.indexOf("image")>-1&&setTimeout(()=>{this.uppy.setFileState(a,{preview:wr(s)})},o.indexOf("gif")>-1?1e3:0)}});Ee(this,"prepareUpload",async i=>{await this.validateImagesRespectCropperOptions();const a=i.map(async s=>{const o=this.uppy.getFile(s);o.isDownloading&&this.uppy.emit("preprocess-progress",o,{mode:"indeterminate",message:this.i18n("loading")}),await this.prepareUploadWrapper(o)}),n=()=>{i.forEach(s=>{const o=this.uppy.getFile(s);this.uppy.emit("preprocess-complete",o)})};return Promise.all(a).then(n)});this.id=this.opts.id||"PrepareUpload",this.type="progressindicator",this.i18nInit()}install(){this.uppy.addPreProcessor(this.prepareUpload),this.uppy.on("file-added",async i=>{setTimeout(()=>{this.prepareUploadWrapper(i)},200)}),this.uppy.on("file-editor:complete",i=>{this.getPreviewFromData(i)})}uninstall(){this.uppy.removePreProcessor(this.prepareUpload)}render(){return ve(t2,{})}}class O2 extends Se{constructor(e,i){super(e,i),this.id=this.opts.id||"AIImage",this.title=this.opts.title||"AI Image",this.type="acquirer",this.uppy=e,this.i18nInit(),this.icon=()=>ve("svg",{width:"20",height:"20",viewBox:"0 0 24 24",children:ve("g",{fill:"none",stroke:"#a482fe","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",children:[ve("path",{d:"M15 8h.01M10 21H6a3 3 0 0 1-3-3V6a3 3 0 0 1 3-3h12a3 3 0 0 1 3 3v5"}),ve("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 ve("div",{id:"ai-image",className:"ai-image",children:ve("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()}}const R2="z8ia1mAXo8ZE7ytGF36L5uBf9kD2kenhqFGp9";function A2(t){return hn("MuiTypography",t)}ea("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]);const U2=["align","className","component","gutterBottom","noWrap","paragraph","variant","variantMapping"],I2=t=>{const{align:e,gutterBottom:i,noWrap:a,paragraph:n,variant:s,classes:o}=t,r={root:["root",s,t.align!=="inherit"&&`align${at(e)}`,i&&"gutterBottom",a&&"noWrap",n&&"paragraph"]};return mn(r,A2,o)},B2=Ei("span",{name:"MuiTypography",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:i}=t;return[e.root,i.variant&&e[i.variant],i.align!=="inherit"&&e[`align${at(i.align)}`],i.noWrap&&e.noWrap,i.gutterBottom&&e.gutterBottom,i.paragraph&&e.paragraph]}})(({theme:t,ownerState:e})=>X({margin:0},e.variant==="inherit"&&{font:"inherit"},e.variant!=="inherit"&&t.typography[e.variant],e.align!=="inherit"&&{textAlign:e.align},e.noWrap&&{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},e.gutterBottom&&{marginBottom:"0.35em"},e.paragraph&&{marginBottom:16})),Ou={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},M2={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},N2=t=>M2[t]||t,z2=B.forwardRef(function(e,i){const a=ta({props:e,name:"MuiTypography"}),n=N2(a.color),s=pm(X({},a,{color:n})),{align:o="inherit",className:r,component:l,gutterBottom:u=!1,noWrap:p=!1,paragraph:c=!1,variant:h="body1",variantMapping:m=Ou}=s,g=vt(s,U2),y=X({},s,{align:o,color:n,className:r,component:l,gutterBottom:u,noWrap:p,paragraph:c,variant:h,variantMapping:m}),f=l||(c?"p":m[h]||Ou[h])||"span",v=I2(y);return J.jsx(B2,X({as:f,ref:i,ownerState:y,className:je(v.root,r)},g))}),L2=B.lazy(()=>Mu(()=>import("./index-ee8g6Cmz.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10]))),Ru="uploader-container",Gn="uploader-dashboard",Qi=localStorage.getItem("uppy_debug"),j2=()=>xr.get("x-csrf-token")?{"x-csrf-token":xr.get("x-csrf-token")}:{},$2=t=>{var c;const{apiPathProps:e,availablePluginMap:i={},uploadedProps:a,resourcesProps:n,imageEditorProps:s={},theme:o}=t,{companionUrl:r}=gl(e),l=j2(),u=async h=>(await oa.post("/api/image/generations",h)).data,p={...t==null?void 0:t.restrictions,maxFileSize:1/0};return[{id:"ImageEditor",plugin:Ud,options:{quality:1,...s},alwayUse:!0},(Qi||Yi()&&i.Uploaded&&!Sr())&&{id:"Uploaded",plugin:a2,options:{params:a==null?void 0:a.params}},(Qi||Yi()&&i.Resources&&!Sr())&&{id:"Resources",plugin:s2,options:{params:n==null?void 0:n.params}},Yi()&&vh()&&i.AIImage&&{id:"AIImage",plugin:O2,options:{companionUrl:r,companionHeaders:l},onShowPanel:h=>{function m(){setTimeout(()=>{var y,f;const g=document.getElementById("ai-image");g?Wh(g).render(J.jsx(L2,{theme:o,api:u,restrictions:p,i18n:(f=(y=h.current)==null?void 0:y.getUploader())==null?void 0:f.i18n,onSelect:v=>{const P=h.current.getUploader();P==null||P.emit("ai-image:selected",v),v.forEach(({src:w,alt:F},k)=>{const S=R=>(R==null?void 0:R.length)>16?`${R==null?void 0:R.slice(0,8)}...${R==null?void 0:R.slice(-4)}`:R,C=`${S(F)||S(w)}.png`,D={name:C,type:"image/png",data:fh(w,C),source:"AIImage",isRemote:!1};P==null||P.addFile(D)})}})):m()},100)}m()}},{id:"Url",plugin:bn,options:{companionUrl:r,companionHeaders:l}},{id:"Webcam",plugin:mp,options:{showVideoSourceDropdown:!0,showRecordingLength:!0,mirror:!1,videoConstraints:{facingMode:"environment"}}},!!((c=window==null?void 0:window.blocklet)!=null&&c.UNSPLASH_KEY)&&i.Unsplash&&{id:"Unsplash",plugin:Up,options:{companionUrl:r,companionHeaders:l,companionCookiesRule:"same-origin"}},{id:"PrepareUpload",plugin:D2,options:{companionUrl:r,companionHeaders:l,cropperOptions:(s==null?void 0:s.cropperOptions)||null},alwayUse:!0},{id:"ThumbnailGeneratorNext",plugin:Vr,options:{thumbnailType:"image/png",thumbnailWidth:"100%"},alwayUse:!0}].filter(Boolean)};function yl(t){const{id:e,plugins:i,locale:a="en",onAfterResponse:n,onUploadFinish:s,coreProps:o,apiPathProps:r,tusProps:l,dropTargetProps:u,pluginList:p,restrictions:c,onChange:h,initialFiles:m}=t,g=$u(p,"id"),{uploaderUrl:y}=gl(r);let f=new Or({id:e,meta:{uploaderId:e},debug:["true",!0].includes(Qi||""),locale:os[a],onBeforeFileAdded:(w,F)=>{if(Object.hasOwn(F,w.id))return!1;const k=!!it.extension(w.type),S=it.lookup(w.name)||"";if(!k&&S&&S!==w.type){const C=Xi(w);C&&(w.extension=C),w.type=S}return w},...o,restrictions:c}).use(rh,{chunkSize:1024*1024*10,removeFingerprintOnSuccess:!0,withCredentials:!0,endpoint:y,async onBeforeRequest(w,F){var H,q;const{hashFileName:k,id:S,meta:C}=F,D=((H=f.getFile(S))==null?void 0:H.mockResponse)||null;w.getMethod()==="PATCH"&&D&&(w.send=()=>D);const R=Xi(F);w.setHeader("x-uploader-file-name",`${k}`),w.setHeader("x-uploader-file-id",`${S}`),w.setHeader("x-uploader-file-ext",`${R}`),w.setHeader("x-uploader-base-url",new URL(w.getURL()).pathname),w.setHeader("x-uploader-endpoint-url",y),w.setHeader("x-uploader-metadata",JSON.stringify(C,(U,z)=>typeof z=="string"?encodeURIComponent(z):z));const j=xr.get("x-csrf-token");j&&w.setHeader("x-csrf-token",j);const N=(window==null?void 0:window.uploaderComponentId)||((q=window==null?void 0:window.blocklet)==null?void 0:q.componentId);N&&w.setHeader("x-component-did",(N||"").split("/").pop())},onAfterResponse:async(w,F)=>{const k={},S=w.getUnderlyingObject();try{S.response&&(k.data=JSON.parse(S.response))}catch{k.data={}}k.method=w.getMethod().toUpperCase(),k.url=w.getURL(),k.status=S.status,k.headers={...w._headers};const C=S.getAllResponseHeaders();C&&C.split(`\r
128
+ `,a.addEventListener("click",async()=>{await this.uppy.openPlugin("My Device")}),i.insertBefore(a,i.firstChild),this.addUploadItemFlag=!1}}},{wait:200}));Ee(this,"convertImgToObject",ko(()=>{this.canConvertImgToObject&&(document.querySelectorAll("#uploaded img").forEach(a=>{var l;if(!(a!=null&&a.src))return;const{src:n}=a,s=(l=this.uploadedAPIData.files)==null?void 0:l.find(u=>u.previewUrl===n),o=document.createElement("div");o.style="width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; position: relative; ";const r=document.createElement("div");if(r.className="uppy-ProviderBrowserItem-name",r.style="pointer-events: none; position: absolute; bottom: 0; left: 0; right: 0; padding: 5px; background: #0000004d; color: #fff; ",r.innerHTML=wh(s.originalname),[".mp4",".webm"].find(u=>{var p;return(p=a.src)==null?void 0:p.endsWith(u)})){const u=document.createElement("video");u.src=a.src,u.width=a.width,u.height=a.height,u.autoplay=!0,u.setAttribute("playsinline","playsinline"),u.muted=!0,u.loop=!0,u.style="pointer-events: none;",o.appendChild(u)}else{const u=document.createElement("object");u.data=n,u.type=s.mimetype||"image/png",u.alt=s.originalname,u.style="pointer-events: none; max-width: 100%; max-height: 100%; webkit-user-drag: none; object-fit: contain;",u.loading="lazy",o.appendChild(u)}o.appendChild(r),a.parentNode.replaceChild(o,a)}),this.canConvertImgToObject=!1)},{wait:200}));Ee(this,"resetState",()=>{this.uploadedAPIData={...ku},this.uploaded.setPluginState({...Tu}),this.addUploadItemFlag=!0});this.id=this.opts.id||"Uploaded",this.title=this.opts.title||"Uploaded",this.params=this.opts.params||{},this.type="acquirer",this.uppy=i,this.uploadedAPIData={...ku},this.addUploadItemFlag=!0,this.icon=()=>ve("svg",{"aria-hidden":"true",focusable:"false",width:"18",height:"18",viewBox:"0 0 1024 1024",children:[ve("path",{d:"M145.6 0c-44.8 0-80 36.8-80 81.6V944c0 44.8 35.2 80 80 80h732.8c44.8 0 81.6-35.2 81.6-80V326.4L657.6 0h-512z",fill:"#49C9A7"}),ve("path",{d:"M960 326.4v16H755.2s-100.8-20.8-99.2-108.8c0 0 4.8 92.8 97.6 92.8H960z",fill:"#49C9A7"}),ve("path",{d:"M657.6 0v233.6c0 25.6 17.6 92.8 97.6 92.8H960L657.6 0z",fill:"#37BB91"}),ve("path",{d:"M225.6 859.2V524.8H560v334.4H225.6z m300.8-300.8H259.2v201.6h267.2V558.4z m-153.6 134.4l62.4-84.8 20.8 33.6 20.8-6.4 16 89.6H283.2l56-52.8 33.6 20.8z m-60.8-59.2c-14.4 0-27.2-9.6-27.2-24 0-12.8 12.8-24 27.2-24 14.4 0 25.6 11.2 25.6 24 0 14.4-11.2 24-25.6 24z",fill:"#FFFFFF"})]})}render(i){var a;return!this.uploadedAPIData.loading&&((a=this.uploadedAPIData.files)==null?void 0:a.length)===0&&this.queryUploadedFromMediaKit(),ve("div",{id:"uploaded",className:"uploaded",children:this.view.render(i)})}update(){this.convertImgToObject(),this.addUploadItem()}onFirstRender(){}install(){this.view=new zr(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=(a,n)=>{const{currentSelection:s}=this.uploaded.getPluginState(),o=this.uploaded.uppy.opts.restrictions.maxNumberOfFiles,r=o?s.length<o:!0;s.find(l=>l._id===n._id)?this.uploaded.setPluginState({currentSelection:[...s.filter(l=>l._id!==n._id)]}):(r||s.pop(),this.uploaded.setPluginState({currentSelection:[...s,n]}))},this.view.donePicking=()=>{const{currentSelection:a}=this.uploaded.getPluginState();this.uppy.emit("uploaded:selected",a),this.uploaded.parent.hideAllPanels()},this.uploaded.uppy.validateRestrictions=()=>!1,this.view.handleScroll=a=>{const{scrollHeight:n,scrollTop:s,offsetHeight:o}=a.target;n-(s+o)<30&&this.queryUploadedFromMediaKit()};const{target:i}=this.opts;i&&this.mount(i,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},Ph={padding:"5px 15px",marginRight:"8px",marginTop:"8px",borderRadius:"4px",cursor:"pointer",border:"1px solid rgb(29, 193, 199)",color:"rgb(29, 193, 199)",backgroundColor:"transparent",fontSize:"14px",lineHeight:"24.5px",fontWeight:"bold"},n2={...Ph,color:"#fff",backgroundColor:"rgb(29, 193, 199)"};class s2 extends Se{constructor(i,a){super(i,a);Ee(this,"queryResources",async()=>{if(!this.apiData.loading){this.apiData.loading=!0;const{data:i}=await oa.get("/api/resources",{params:{componentDid:this.apiData.componentDid}});this.apiData.loading=!1,this.apiData.initialized=!0,this.apiData.components=i.components||[],this.apiData.componentDid=i.componentDid||"",this.apiData.files=ju([...i.resources.map(a=>{let n="file";const{filename:s}=a,o=dn(s,0,0,kt);return n=dn(s,400,0,kt),{filename:s,_id:s,id:s,name:s,icon:n,previewUrl:n,fileUrl:o}})],"id"),this.resources.setPluginState({files:this.apiData.files,loading:!1})}});Ee(this,"resetState",()=>{this.apiData={...Eu},this.resources.setPluginState({...Du})});this.id=this.opts.id||"Resources",this.title=this.opts.title||"Resources",this.params=this.opts.params||{},this.type="acquirer",this.uppy=i,this.componentDid="",this.apiData={...Eu},this.icon=()=>ve("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:[ve("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"}),ve("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"}),ve("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(i){return!this.apiData.loading&&!this.apiData.initialized&&this.queryResources(),ve("div",{id:"resources",className:"uploaded",children:[ve("div",{style:{padding:this.apiData.components.length?"12px":"0",backgroundColor:"#fff",display:"flex",flexWrap:"wrap",marginTop:"-8px"},children:this.apiData.components.map(a=>ve("button",{style:this.apiData.componentDid===a.did?n2:Ph,id:a.componentDid,onClick:()=>{this.apiData.componentDid!==a.did&&(this.apiData.componentDid=a.did,this.queryResources())},children:dm(a.name)}))}),this.view.render(i)]})}update(){}onFirstRender(){}install(){this.view=new zr(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=(a,n)=>{const{currentSelection:s}=this.resources.getPluginState(),o=this.resources.uppy.opts.restrictions.maxNumberOfFiles,r=o?s.length<o:!0;s.find(l=>l.id===n.id)?this.resources.setPluginState({currentSelection:[...s.filter(l=>l.id!==n.id)]}):(r||s.pop(),this.resources.setPluginState({currentSelection:[...s,n]}))},this.resources.uppy.validateRestrictions=()=>!1,this.view.donePicking=()=>{const{currentSelection:a}=this.resources.getPluginState();this.uppy.emit("resources:selected",a),this.resources.parent.hideAllPanels()};const{target:i}=this.opts;i&&this.mount(i,this)}uninstall(){this.unmount(),this.resources.uppy.off("dashboard:show-panel",this.resetState)}}var o2=jh();const r2=qt(o2);var qe=Uint8Array,Wi=Uint16Array,l2=Int32Array,Fh=new qe([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]),Ch=new qe([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]),c2=new qe([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),kh=function(t,e){for(var i=new Wi(31),a=0;a<31;++a)i[a]=e+=1<<t[a-1];for(var n=new l2(i[30]),a=1;a<30;++a)for(var s=i[a];s<i[a+1];++s)n[s]=s-i[a]<<5|a;return{b:i,r:n}},Th=kh(Fh,2),Eh=Th.b,u2=Th.r;Eh[28]=258,u2[258]=28;var p2=kh(Ch,0),d2=p2.b,Cr=new Wi(32768);for(var ae=0;ae<32768;++ae){var Gt=(ae&43690)>>1|(ae&21845)<<1;Gt=(Gt&52428)>>2|(Gt&13107)<<2,Gt=(Gt&61680)>>4|(Gt&3855)<<4,Cr[ae]=((Gt&65280)>>8|(Gt&255)<<8)>>1}var Ka=function(t,e,i){for(var a=t.length,n=0,s=new Wi(e);n<a;++n)t[n]&&++s[t[n]-1];var o=new Wi(e);for(n=1;n<e;++n)o[n]=o[n-1]+s[n-1]<<1;var r;if(i){r=new Wi(1<<e);var l=15-e;for(n=0;n<a;++n)if(t[n])for(var u=n<<4|t[n],p=e-t[n],c=o[t[n]-1]++<<p,h=c|(1<<p)-1;c<=h;++c)r[Cr[c]>>l]=u}else for(r=new Wi(a),n=0;n<a;++n)t[n]&&(r[n]=Cr[o[t[n]-1]++]>>15-t[n]);return r},Sn=new qe(288);for(var ae=0;ae<144;++ae)Sn[ae]=8;for(var ae=144;ae<256;++ae)Sn[ae]=9;for(var ae=256;ae<280;++ae)Sn[ae]=7;for(var ae=280;ae<288;++ae)Sn[ae]=8;var Dh=new qe(32);for(var ae=0;ae<32;++ae)Dh[ae]=5;var h2=Ka(Sn,9,1),m2=Ka(Dh,5,1),wo=function(t){for(var e=t[0],i=1;i<t.length;++i)t[i]>e&&(e=t[i]);return e},ct=function(t,e,i){var a=e/8|0;return(t[a]|t[a+1]<<8)>>(e&7)&i},_o=function(t,e){var i=e/8|0;return(t[i]|t[i+1]<<8|t[i+2]<<16)>>(e&7)},f2=function(t){return(t+7)/8|0},vl=function(t,e,i){return(e==null||e<0)&&(e=0),(i==null||i>t.length)&&(i=t.length),new qe(t.subarray(e,i))},g2=["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"],De=function(t,e,i){var a=new Error(e||g2[t]);if(a.code=t,Error.captureStackTrace&&Error.captureStackTrace(a,De),!i)throw a;return a},bl=function(t,e,i,a){var n=t.length,s=a?a.length:0;if(!n||e.f&&!e.l)return i||new qe(0);var o=!i,r=o||e.i!=2,l=e.i;o&&(i=new qe(n*3));var u=function(ai){var ni=i.length;if(ai>ni){var si=new qe(Math.max(ni*2,ai));si.set(i),i=si}},p=e.f||0,c=e.p||0,h=e.b||0,m=e.l,g=e.d,y=e.m,f=e.n,v=n*8;do{if(!m){p=ct(t,c,1);var P=ct(t,c+1,3);if(c+=3,P)if(P==1)m=h2,g=m2,y=9,f=5;else if(P==2){var S=ct(t,c,31)+257,C=ct(t,c+10,15)+4,D=S+ct(t,c+5,31)+1;c+=14;for(var R=new qe(D),j=new qe(19),N=0;N<C;++N)j[c2[N]]=ct(t,c+N*3,7);c+=C*3;for(var H=wo(j),q=(1<<H)-1,U=Ka(j,H,1),N=0;N<D;){var z=U[ct(t,c,q)];c+=z&15;var w=z>>4;if(w<16)R[N++]=w;else{var _=0,b=0;for(w==16?(b=3+ct(t,c,3),c+=2,_=R[N-1]):w==17?(b=3+ct(t,c,7),c+=3):w==18&&(b=11+ct(t,c,127),c+=7);b--;)R[N++]=_}}var x=R.subarray(0,S),T=R.subarray(S);y=wo(x),f=wo(T),m=Ka(x,y,1),g=Ka(T,f,1)}else De(1);else{var w=f2(c)+4,F=t[w-4]|t[w-3]<<8,k=w+F;if(k>n){l&&De(0);break}r&&u(h+F),i.set(t.subarray(w,k),h),e.b=h+=F,e.p=c=k*8,e.f=p;continue}if(c>v){l&&De(0);break}}r&&u(h+131072);for(var O=(1<<y)-1,E=(1<<f)-1,$=c;;$=c){var _=m[_o(t,c)&O],V=_>>4;if(c+=_&15,c>v){l&&De(0);break}if(_||De(2),V<256)i[h++]=V;else if(V==256){$=c,m=null;break}else{var G=V-254;if(V>264){var N=V-257,Q=Fh[N];G=ct(t,c,(1<<Q)-1)+Eh[N],c+=Q}var Z=g[_o(t,c)&E],te=Z>>4;Z||De(3),c+=Z&15;var T=d2[te];if(te>3){var Q=Ch[te];T+=_o(t,c)&(1<<Q)-1,c+=Q}if(c>v){l&&De(0);break}r&&u(h+131072);var ii=h+G;if(h<T){var Re=s-T,Di=Math.min(T,ii);for(Re+h<0&&De(3);h<Di;++h)i[h]=a[Re+h]}for(;h<ii;++h)i[h]=i[h-T]}}e.l=m,e.p=$,e.b=h,e.f=p,m&&(p=1,e.m=y,e.d=g,e.n=f)}while(!p);return h!=i.length&&o?vl(i,0,h):i.subarray(0,h)},v2=new qe(0),wt=function(t,e){return t[e]|t[e+1]<<8},ft=function(t,e){return(t[e]|t[e+1]<<8|t[e+2]<<16|t[e+3]<<24)>>>0},So=function(t,e){return ft(t,e)+ft(t,e+4)*4294967296},b2=function(t){(t[0]!=31||t[1]!=139||t[2]!=8)&&De(6,"invalid gzip data");var e=t[3],i=10;e&4&&(i+=(t[10]|t[11]<<8)+2);for(var a=(e>>3&1)+(e>>4&1);a>0;a-=!t[i++]);return i+(e&2)},y2=function(t){var e=t.length;return(t[e-4]|t[e-3]<<8|t[e-2]<<16|t[e-1]<<24)>>>0},x2=function(t,e){return((t[0]&15)!=8||t[0]>>4>7||(t[0]<<8|t[1])%31)&&De(6,"invalid zlib data"),(t[1]>>5&1)==+!e&&De(6,"invalid zlib data: "+(t[1]&32?"need":"unexpected")+" dictionary"),(t[1]>>3&4)+2};function Oh(t,e){return bl(t,{i:2},e&&e.out,e&&e.dictionary)}function w2(t,e){var i=b2(t);return i+8>t.length&&De(6,"invalid gzip data"),bl(t.subarray(i,-8),{i:2},e&&e.out||new qe(y2(t)),e&&e.dictionary)}function _2(t,e){return bl(t.subarray(x2(t,e&&e.dictionary),-4),{i:2},e&&e.out,e&&e.dictionary)}function Po(t,e){return t[0]==31&&t[1]==139&&t[2]==8?w2(t,e):(t[0]&15)!=8||t[0]>>4>7||(t[0]<<8|t[1])%31?Oh(t,e):_2(t,e)}var kr=typeof TextDecoder<"u"&&new TextDecoder,S2=0;try{kr.decode(v2,{stream:!0}),S2=1}catch{}var P2=function(t){for(var e="",i=0;;){var a=t[i++],n=(a>127)+(a>223)+(a>239);if(i+n>t.length)return{s:e,r:vl(t,i-1)};n?n==3?(a=((a&15)<<18|(t[i++]&63)<<12|(t[i++]&63)<<6|t[i++]&63)-65536,e+=String.fromCharCode(55296|a>>10,56320|a&1023)):n&1?e+=String.fromCharCode((a&31)<<6|t[i++]&63):e+=String.fromCharCode((a&15)<<12|(t[i++]&63)<<6|t[i++]&63):e+=String.fromCharCode(a)}};function F2(t,e){if(e){for(var i="",a=0;a<t.length;a+=16384)i+=String.fromCharCode.apply(null,t.subarray(a,a+16384));return i}else{if(kr)return kr.decode(t);var n=P2(t),s=n.s,i=n.r;return i.length&&De(8),s}}var C2=function(t,e){return e+30+wt(t,e+26)+wt(t,e+28)},k2=function(t,e,i){var a=wt(t,e+28),n=F2(t.subarray(e+46,e+46+a),!(wt(t,e+8)&2048)),s=e+46+a,o=ft(t,e+20),r=i&&o==4294967295?T2(t,s):[o,ft(t,e+24),ft(t,e+42)],l=r[0],u=r[1],p=r[2];return[wt(t,e+10),l,u,n,s+wt(t,e+30)+wt(t,e+32),p]},T2=function(t,e){for(;wt(t,e)!=1;e+=4+wt(t,e+2));return[So(t,e+12),So(t,e+4),So(t,e+20)]};function E2(t,e){for(var i={},a=t.length-22;ft(t,a)!=101010256;--a)(!a||t.length-a>65558)&&De(13);var n=wt(t,a+8);if(!n)return{};var s=ft(t,a+16),o=s==4294967295||n==65535;if(o){var r=ft(t,a-12);o=ft(t,r)==101075792,o&&(n=ft(t,r+32),s=ft(t,r+48))}for(var l=e&&e.filter,u=0;u<n;++u){var p=k2(t,s,o),c=p[0],h=p[1],m=p[2],g=p[3],y=p[4],f=p[5],v=C2(t,f);s=y,(!l||l({name:g,size:h,originalSize:m,compression:c}))&&(c?c==8?i[g]=Oh(t.subarray(v,v+h),{out:new qe(m)}):De(14,"unknown compression type "+c):i[g]=vl(t,v,v+h))}return i}const Vn={zip:E2,gz:Po,tgz:Po,deflate:Po};class D2 extends Se{constructor(i,a){super(i,{...{},...a});Ee(this,"setHashFileName",async i=>{const{id:a}=i,n=this.uppy.getFile(a);if(n){const{data:s}=n,o=1024*1024*5,r=s.slice(0,o),l=r2.createHash("md5").update(await r.text()).digest("hex"),u=Xi(n),p=`${l}${u?`.${u}`:""}`;this.uppy.setFileState(a,{hashFileName:p})}});Ee(this,"setMetaData",async i=>{const{id:a}=i,n=this.uppy.getFile(a);if(n){const{data:{webkitRelativePath:s,relativePath:o,name:r},hashFileName:l}=n,u=o||s||r||l;this.uppy.setFileMeta(a,{relativePath:u,name:u})}});Ee(this,"preventXssAttack",async i=>{const{id:a}=i,n=this.uppy.getFile(a);if(n){const{name:s,meta:o}=this.uppy.getFile(a),r=_l.sanitize(s);if(s!==r){const u=Xi(n),p=r.endsWith(`.${u}`)?r:`${r}.${u}`;this.uppy.setFileState(a,{name:p,meta:{...o,name:p,filename:p}})}if(await _h(n)){const{data:u,name:p,type:c}=this.uppy.getFile(a),h=await u.text(),m=_l.sanitize(h,{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","style","id","class","offset","stop-color","stop-opacity","clip-path","mask","fill-opacity","stroke-opacity"],FORBID_TAGS:["a","script","iframe","image","foreignObject"],FORBID_ATTR:["href","xlink:href","onclick","onload","onerror"]});if(h!==m){const g=new Blob([m],{type:c}),y=_r(g,p);this.uppy.setFileState(a,{...this.uppy.getFile(a),data:y}),console.info("clean svg file xss attack",{name:p,originalFile:n.data.text(),cleanFile:m})}}}});Ee(this,"preventZipBombAttack",async i=>{const{id:a}=i,n=this.uppy.getFile(a);try{if(n&&Vn[n.extension]){const{data:s}=n,o=Vn[n.extension](new Uint8Array(await s.arrayBuffer())),r=(u,p,c=0)=>Object.entries(u instanceof Uint8Array?{[p||n.name]:u}:u).reduce((h,[m,g])=>{if(!g||g.byteLength===0)return console.warn("Invalid or empty item in unzipped content",{name:m,item:g}),h;const y=h+g.byteLength;if(c>=5||y>n.size*100)throw console.error("Zip bomb detected, please check your file",{depth:c,baseAcc:y,fileSize:n.size}),new Error("Zip bomb detected, please check your file");const f=it.extension(it.lookup(m));if(Vn[f]){const v=Vn[f](g);return y+r(v,m,c+1)}return y},0);if(r(o)>n.size*100)throw new Error("Zip bomb detected, please check your file")}}catch(s){if(s.message.includes("Zip bomb detected"))throw s}});Ee(this,"validateImagesRespectCropperOptions",async()=>this.uppy.getFiles().reduce(async(i,a)=>{var y,f,v;await i;const{id:n}=a;let s=this.uppy.getFile(n);if(s.isRemote&&(await this.tryDownloadRemoteFile(s),s=this.uppy.getFile(n)),!((y=this.opts.cropperOptions)!=null&&y.aspectRatio)||!((f=s==null?void 0:s.type)!=null&&f.includes("image"))||(v=s.type)!=null&&v.includes("image/svg"))return Promise.resolve();const{aspectRatio:o}=this.opts.cropperOptions,r=this.uppy.getPlugin("ImageEditor"),l=document.querySelector(`[src="${s.preview}"]`)||document.getElementById("uppy_"+n).querySelector("img"),u=l==null?void 0:l.naturalWidth,p=l==null?void 0:l.naturalHeight,c=Number(u/p).toFixed(2),h=Number(o).toFixed(2);if(c===h)return Promise.resolve();this.uppy.emit("preprocess-progress",s,{mode:"indeterminate",message:this.i18n("editorLoading")}),r.parent.openFileEditor(s);const g=this.i18n("aspectRatioMessage",{imageAspectRatio:c,aspectRatio:h});return this.uppy.info({message:g,details:g}),new Promise((P,w)=>{this.uppy.once("file-editor:complete",()=>{setTimeout(()=>{P()},200)}),this.uppy.once("file-editor:cancel",()=>{})})},Promise.resolve()));Ee(this,"prepareUploadWrapper",async i=>{await this.tryDownloadRemoteFile(i),await this.getPreviewFromData(i),await this.setHashFileName(i),await this.preventXssAttack(i),await this.preventZipBombAttack(i),await this.setMetaData(i)});Ee(this,"tryDownloadRemoteFile",async i=>{var F,k;const{type:a,name:n,preview:s,source:o,isRemote:r,isDownloading:l,id:u,isLoading:p,remote:c,meta:h,errorCount:m=0}=i,g=!p&&r,y=`uploader:${u}:downloaded`,f=Xi(i),v=(F=n==null?void 0:n.split("?"))==null?void 0:F[0],w=(()=>{const S=["jpg","jpeg"];return S.includes(f)&&S.some(C=>v==null?void 0:v.endsWith(C))?!0:v==null?void 0:v.endsWith(f)})()?v:`${v}${f?`.${f}`:""}`;if(g){const S=gh(s||((k=c==null?void 0:c.body)==null?void 0:k.url));if(m>=3)throw this.uppy.setFileState(u,{error:this.i18n("downloadRemoteFileFailure"),meta:{...h,name:this.i18n("downloadRemoteFileFailure")}}),new Error("Download remote file failure");this.uppy.setFileState(u,{isLoading:!0,isDownloading:!0,size:null,meta:{...h,name:this.i18n("loading")}}),await fl.get(S,{responseType:"blob"}).then(C=>C==null?void 0:C.data).then(async C=>{const D=_r(C,w);this.uppy.setFileState(u,{name:w,extension:f,type:a,data:D,preview:s||wr(D),source:o,size:D.size,isDownloading:!1,isRemote:!1,meta:{...h,name:w,filename:w}}),this.uppy.getFile(u),this.uppy.emit(y,u)}).catch(async C=>{console.error("Axios download remote file error: ",C),this.uppy.setFileState(u,{isRemote:!0,isLoading:!1,errorCount:m+1}),await this.tryDownloadRemoteFile(this.uppy.getFile(u))})}else l&&await(async()=>new Promise(C=>{this.uppy.once(y,async()=>{C()})}))()});Ee(this,"getPreviewFromData",i=>{const{id:a}=i,n=this.uppy.getFile(a);if(n){const{data:s,type:o,preview:r}=n;(o.indexOf("gif")>-1||!r)&&s&&o.indexOf("image")>-1&&setTimeout(()=>{this.uppy.setFileState(a,{preview:wr(s)})},o.indexOf("gif")>-1?1e3:0)}});Ee(this,"prepareUpload",async i=>{await this.validateImagesRespectCropperOptions();const a=i.map(async s=>{const o=this.uppy.getFile(s);o.isDownloading&&this.uppy.emit("preprocess-progress",o,{mode:"indeterminate",message:this.i18n("loading")}),await this.prepareUploadWrapper(o)}),n=()=>{i.forEach(s=>{const o=this.uppy.getFile(s);this.uppy.emit("preprocess-complete",o)})};return Promise.all(a).then(n)});this.id=this.opts.id||"PrepareUpload",this.type="progressindicator",this.i18nInit()}install(){this.uppy.addPreProcessor(this.prepareUpload),this.uppy.on("file-added",async i=>{setTimeout(()=>{this.prepareUploadWrapper(i)},200)}),this.uppy.on("file-editor:complete",i=>{this.getPreviewFromData(i)})}uninstall(){this.uppy.removePreProcessor(this.prepareUpload)}render(){return ve(t2,{})}}class O2 extends Se{constructor(e,i){super(e,i),this.id=this.opts.id||"AIImage",this.title=this.opts.title||"AI Image",this.type="acquirer",this.uppy=e,this.i18nInit(),this.icon=()=>ve("svg",{width:"20",height:"20",viewBox:"0 0 24 24",children:ve("g",{fill:"none",stroke:"#a482fe","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",children:[ve("path",{d:"M15 8h.01M10 21H6a3 3 0 0 1-3-3V6a3 3 0 0 1 3-3h12a3 3 0 0 1 3 3v5"}),ve("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 ve("div",{id:"ai-image",className:"ai-image",children:ve("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()}}const R2="z8ia1mAXo8ZE7ytGF36L5uBf9kD2kenhqFGp9";function A2(t){return hn("MuiTypography",t)}ea("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]);const U2=["align","className","component","gutterBottom","noWrap","paragraph","variant","variantMapping"],I2=t=>{const{align:e,gutterBottom:i,noWrap:a,paragraph:n,variant:s,classes:o}=t,r={root:["root",s,t.align!=="inherit"&&`align${at(e)}`,i&&"gutterBottom",a&&"noWrap",n&&"paragraph"]};return mn(r,A2,o)},B2=Ei("span",{name:"MuiTypography",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:i}=t;return[e.root,i.variant&&e[i.variant],i.align!=="inherit"&&e[`align${at(i.align)}`],i.noWrap&&e.noWrap,i.gutterBottom&&e.gutterBottom,i.paragraph&&e.paragraph]}})(({theme:t,ownerState:e})=>X({margin:0},e.variant==="inherit"&&{font:"inherit"},e.variant!=="inherit"&&t.typography[e.variant],e.align!=="inherit"&&{textAlign:e.align},e.noWrap&&{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},e.gutterBottom&&{marginBottom:"0.35em"},e.paragraph&&{marginBottom:16})),Ou={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},M2={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},N2=t=>M2[t]||t,z2=B.forwardRef(function(e,i){const a=ta({props:e,name:"MuiTypography"}),n=N2(a.color),s=pm(X({},a,{color:n})),{align:o="inherit",className:r,component:l,gutterBottom:u=!1,noWrap:p=!1,paragraph:c=!1,variant:h="body1",variantMapping:m=Ou}=s,g=vt(s,U2),y=X({},s,{align:o,color:n,className:r,component:l,gutterBottom:u,noWrap:p,paragraph:c,variant:h,variantMapping:m}),f=l||(c?"p":m[h]||Ou[h])||"span",v=I2(y);return J.jsx(B2,X({as:f,ref:i,ownerState:y,className:je(v.root,r)},g))}),L2=B.lazy(()=>Mu(()=>import("./index-sPEpq71V.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10]))),Ru="uploader-container",Gn="uploader-dashboard",Qi=localStorage.getItem("uppy_debug"),j2=()=>xr.get("x-csrf-token")?{"x-csrf-token":xr.get("x-csrf-token")}:{},$2=t=>{var c;const{apiPathProps:e,availablePluginMap:i={},uploadedProps:a,resourcesProps:n,imageEditorProps:s={},theme:o}=t,{companionUrl:r}=gl(e),l=j2(),u=async h=>(await oa.post("/api/image/generations",h)).data,p={...t==null?void 0:t.restrictions,maxFileSize:1/0};return[{id:"ImageEditor",plugin:Ud,options:{quality:1,...s},alwayUse:!0},(Qi||Yi()&&i.Uploaded&&!Sr())&&{id:"Uploaded",plugin:a2,options:{params:a==null?void 0:a.params}},(Qi||Yi()&&i.Resources&&!Sr())&&{id:"Resources",plugin:s2,options:{params:n==null?void 0:n.params}},Yi()&&vh()&&i.AIImage&&{id:"AIImage",plugin:O2,options:{companionUrl:r,companionHeaders:l},onShowPanel:h=>{function m(){setTimeout(()=>{var y,f;const g=document.getElementById("ai-image");g?Wh(g).render(J.jsx(L2,{theme:o,api:u,restrictions:p,i18n:(f=(y=h.current)==null?void 0:y.getUploader())==null?void 0:f.i18n,onSelect:v=>{const P=h.current.getUploader();P==null||P.emit("ai-image:selected",v),v.forEach(({src:w,alt:F},k)=>{const S=R=>(R==null?void 0:R.length)>16?`${R==null?void 0:R.slice(0,8)}...${R==null?void 0:R.slice(-4)}`:R,C=`${S(F)||S(w)}.png`,D={name:C,type:"image/png",data:fh(w,C),source:"AIImage",isRemote:!1};P==null||P.addFile(D)})}})):m()},100)}m()}},{id:"Url",plugin:bn,options:{companionUrl:r,companionHeaders:l}},{id:"Webcam",plugin:mp,options:{showVideoSourceDropdown:!0,showRecordingLength:!0,mirror:!1,videoConstraints:{facingMode:"environment"}}},!!((c=window==null?void 0:window.blocklet)!=null&&c.UNSPLASH_KEY)&&i.Unsplash&&{id:"Unsplash",plugin:Up,options:{companionUrl:r,companionHeaders:l,companionCookiesRule:"same-origin"}},{id:"PrepareUpload",plugin:D2,options:{companionUrl:r,companionHeaders:l,cropperOptions:(s==null?void 0:s.cropperOptions)||null},alwayUse:!0},{id:"ThumbnailGeneratorNext",plugin:Vr,options:{thumbnailType:"image/png",thumbnailWidth:"100%"},alwayUse:!0}].filter(Boolean)};function yl(t){const{id:e,plugins:i,locale:a="en",onAfterResponse:n,onUploadFinish:s,coreProps:o,apiPathProps:r,tusProps:l,dropTargetProps:u,pluginList:p,restrictions:c,onChange:h,initialFiles:m}=t,g=$u(p,"id"),{uploaderUrl:y}=gl(r);let f=new Or({id:e,meta:{uploaderId:e},debug:["true",!0].includes(Qi||""),locale:os[a],onBeforeFileAdded:(w,F)=>{if(Object.hasOwn(F,w.id))return!1;const k=!!it.extension(w.type),S=it.lookup(w.name)||"";if(!k&&S&&S!==w.type){const C=Xi(w);C&&(w.extension=C),w.type=S}return w},...o,restrictions:c}).use(rh,{chunkSize:1024*1024*10,removeFingerprintOnSuccess:!0,withCredentials:!0,endpoint:y,async onBeforeRequest(w,F){var H,q;const{hashFileName:k,id:S,meta:C}=F,D=((H=f.getFile(S))==null?void 0:H.mockResponse)||null;w.getMethod()==="PATCH"&&D&&(w.send=()=>D);const R=Xi(F);w.setHeader("x-uploader-file-name",`${k}`),w.setHeader("x-uploader-file-id",`${S}`),w.setHeader("x-uploader-file-ext",`${R}`),w.setHeader("x-uploader-base-url",new URL(w.getURL()).pathname),w.setHeader("x-uploader-endpoint-url",y),w.setHeader("x-uploader-metadata",JSON.stringify(C,(U,z)=>typeof z=="string"?encodeURIComponent(z):z));const j=xr.get("x-csrf-token");j&&w.setHeader("x-csrf-token",j);const N=(window==null?void 0:window.uploaderComponentId)||((q=window==null?void 0:window.blocklet)==null?void 0:q.componentId);N&&w.setHeader("x-component-did",(N||"").split("/").pop())},onAfterResponse:async(w,F)=>{const k={},S=w.getUnderlyingObject();try{S.response&&(k.data=JSON.parse(S.response))}catch{k.data={}}k.method=w.getMethod().toUpperCase(),k.url=w.getURL(),k.status=S.status,k.headers={...w._headers};const C=S.getAllResponseHeaders();C&&C.split(`\r
129
129
  `).forEach(H=>{const[q,U]=H.split(": ");q&&U&&(k.headers[q]=U)});const D=f.getFile(k.headers["x-uploader-file-id"]);if(w.getMethod()==="PATCH"&&D.mockResponse)return;if(["PATCH","POST"].includes(k.method)&&[200,500].includes(k.status)){const N=[!0,"true"].includes(k.headers["x-uploader-file-exist"]),H=yh(k.url,k.headers["x-uploader-file-name"]);k.file=D,k.uploadURL=H;const q={uploadURL:H,...k};f.setFileState(D.id,{responseResult:q}),N&&D&&(k.method==="POST"&&f.setFileState(D.id,{mockResponse:F}),f.emit("upload-success",f.getFile(D.id),{...q,body:k.data}),f.emit("postprocess-complete",f.getFile(D.id)),f.calculateTotalProgress()),k.status===200&&(await(s==null?void 0:s(k)),f.emitUploadSuccess(D,k))}n&&await(n==null?void 0:n(S));const R=f.getState().totalProgress===100,j=f.getFiles().every(N=>N.source==="DropTarget");R&&j&&f.close()},...l});const v=({fileIDs:w,id:F})=>{w.forEach(k=>{f.setFileState(k,{uploadID:F})})};f.off("upload",v),f.on("upload",v);const P=w=>{typeof h=="function"&&h(w,f.getFiles())};return f.off("file-added",P),f.on("file-added",P),f.off("file-removed-success",P),f.on("file-removed-success",P),u&&f.use(bd,{target:document.body,onDrop:w=>{var F;(F=f==null?void 0:f.open)==null||F.call(f)},...u}),i==null||i.forEach(w=>{if(w){const{plugin:F,options:k}=g[w]||{};F&&f.use(F,k)}}),xh(f),m&&(m==null?void 0:m.length)>0&&f.addFiles(m),f}const Tr=B.forwardRef((t,e)=>{var q,U,z,_,b,x,T,O,E,$,V,G,Q,Z,te,ii,Re,Di,ai,ni,si;const i={uploader:"/api/uploads",companion:"/api/companion",disableMediaKitPrefix:!1,disableMediaKitStatus:!1,...t==null?void 0:t.apiPathProps},a=B.useRef(null),n=hm({open:!1,uppy:null,availablePluginMap:{},restrictions:Us((q=t==null?void 0:t.coreProps)==null?void 0:q.restrictions)||{}}),s=Hu(),o=$2({...t,apiPathProps:i,availablePluginMap:n.availablePluginMap,restrictions:n.restrictions,theme:s}),{plugins:r=o.map(L=>L.id),id:l="Uploader",popup:u=!1,onUploadFinish:p,onOpen:c,onClose:h,locale:m="en",installerProps:g}=t,y=$u(o,"id"),f=_f(L=>{var le;return(le=L==null?void 0:L.breakpoints)==null?void 0:le.down("md")}),v=Cl([...r,...o.filter(L=>L.alwayUse).map(L=>L.id)]),{loading:P}=mm(async()=>{var le,Ae,ye,ce,st;let L=Is((le=t==null?void 0:t.coreProps)==null?void 0:le.restrictions)?{}:Us((Ae=t==null?void 0:t.coreProps)==null?void 0:Ae.restrictions);if(!i.disableMediaKitStatus&&Yi())try{await oa.get("/api/uploader/status").then(({data:ke})=>{var Ht;n.availablePluginMap=ke.availablePluginMap,!i.disableMediaKitPrefix&&Is((Ht=t==null?void 0:t.coreProps)==null?void 0:Ht.restrictions)&&(L=ke.restrictions||{})})}catch{}!((ye=L==null?void 0:L.allowedFileTypes)!=null&&ye.length)&&(L!=null&&L.allowedFileExts)&&(L.allowedFileTypes=Cl((st=(ce=(typeof(L==null?void 0:L.allowedFileExts)=="string"?L==null?void 0:L.allowedFileExts.split(","):L==null?void 0:L.allowedFileExts)||[])==null?void 0:ce.map(ke=>it.lookup((ke==null?void 0:ke.replaceAll(" ",""))||"")))==null?void 0:st.filter(ke=>ke)),delete L.allowedFileExts),L.maxFileSize&&typeof L.maxFileSize=="string"&&(L.maxFileSize=ie.parseSize(L.maxFileSize,{iec:!1})||void 0),n.restrictions=Us(L)},{refreshDeps:[JSON.stringify({apiPathProps:i,restrictionsProps:(U=t==null?void 0:t.coreProps)==null?void 0:U.restrictions})]}),w=typeof((z=n.restrictions)==null?void 0:z.allowedFileTypes)=="object"&&((b=(_=n.restrictions)==null?void 0:_.allowedFileTypes)==null?void 0:b.length)===0,F=((E=(O=(T=(x=n.restrictions)==null?void 0:x.allowedFileTypes)==null?void 0:T.map(L=>it.extension(L)))==null?void 0:O.filter(Boolean))==null?void 0:E.join(", "))||"";let k="";w?k=Bs(os,`${m}.strings.noAllowedFileTypes`,"No allowed file types"):(V=($=n.restrictions)==null?void 0:$.allowedFileTypes)!=null&&V.length&&F&&(k=Bs(os,`${m}.strings.allowedFileTypes`,"Allowed file types: ")+F),(Is(k)||["undefined","null",void 0,null].includes(k))&&(k=""),fm("esc",L=>{n.open&&(L.stopPropagation(),L.preventDefault(),R())},{useCapture:!0}),B.useEffect(()=>{bh(i),n.uppy=yl({...t,id:l,plugins:v,apiPathProps:i,pluginList:o,restrictions:n.restrictions}),n.uppy.open=D,n.uppy.close=R,n.uppy.openPlugin=S;const L=ye=>{const{onShowPanel:ce}=y[ye];ce==null||ce(e)};n.uppy.off("dashboard:show-panel",L),n.uppy.on("dashboard:show-panel",L);const le=(ye,ce,st,ke)=>{var Pn;const Ht=`${ke.toLowerCase()}Props`,Oi=(Pn=st[Ht])==null?void 0:Pn.onSelectedFiles;if(typeof Oi=="function"){const Wt=ye.map(Te=>{var Cn,K,ra;const Rs={name:Te.id||((ra=(K=(Cn=Te.fileUrl)==null?void 0:Cn.split("/"))==null?void 0:K.slice(-1))==null?void 0:ra[0]),type:Te.mimetype||it.lookup(Te.fileUrl),data:"",preview:Te.fileUrl,source:ke,isRemote:!0},Fn=ce.uppy.addFile(Rs);return{...Te,uppyFile:ce.uppy.getFile(Fn)}});Oi==null||Oi(Wt)}else Promise.all(ye.map(async Wt=>{const Te=Sh(Wt);await(p==null?void 0:p(Te)),ce.uppy.emitUploadSuccess(Te.file,Te)})).then(()=>{ce.uppy.close()})};[{name:"Uploaded",event:"uploaded:selected"},{name:"Resources",event:"resources:selected"}].forEach(({name:ye,event:ce})=>{v.includes(ye)&&(n.uppy.off(ce),n.uppy.on(ce,st=>le(st,n,t,ye)))})},[JSON.stringify({id:l,plugins:v,apiPathProps:i,locale:m,restrictions:n.restrictions,theme:s})]);function S(L){var le,Ae,ye;if(L=L.replace(/\s/g,""),["MyDevice",...v].map(ce=>ce.toLowerCase()).includes(L.toLowerCase())){let ce=`div[data-uppy-acquirer-id="${L}"] > button`;(ye=(Ae=(le=document==null?void 0:document.getElementById(Gn))==null?void 0:le.querySelector(ce))==null?void 0:Ae.click)==null||ye.call(Ae)}}const C=B.useCallback(L=>{Qi&&a.current&&!a.current.contains(L.target)&&console.info("debug focus",a.current,L.target)},[]);function D(L){var Ae,ye,ce,st;n.open=!0,L&&setTimeout(()=>{S(L)},200),n.uppy.emitOpen(),c==null||c(),(ye=(Ae=document.activeElement)==null?void 0:Ae.blur)==null||ye.call(Ae);const le=n.uppy.getPlugin(Gn).el;(ce=le==null?void 0:le.focus)==null||ce.call(le),(st=le==null?void 0:le.click)==null||st.call(le),Qi&&u&&(document.addEventListener("mousedown",C),document.addEventListener("touchstart",C))}function R(){var L;(L=n.uppy.getPlugin(Gn))==null||L.hideAllPanels(),n.open=!1,n.uppy.emitClose(),h==null||h(),setTimeout(()=>{n.uppy.getState().totalProgress===100&&(n.uppy.setState({files:{},currentUploads:{}}),n.uppy.calculateTotalProgress())},500),Qi&&u&&(document.removeEventListener("mousedown",C),document.removeEventListener("touchstart",C))}B.useImperativeHandle(e,()=>({getUploader:()=>n.uppy,open:D,close:R}));const j=u?Xm:B.Fragment,N=u?{sx:{zIndex:99999999999,background:"rgba(0,0,0,0.5)","& > *":{display:n.open?"block":"none"},...(G=t==null?void 0:t.wrapperProps)==null?void 0:G.sx},invisible:!0,open:n.open,onClick:L=>{document.activeElement===document.body&&(L.stopPropagation(),R())},...t.wrapperProps}:{...t.wrapperProps},H=f?"42px":"40px";return J.jsx(j,{...N,children:J.jsxs($h,{onClose:R,did:R2,disabled:!n.open,...g,children:[J.jsx(Ym,{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)"}}})}),J.jsxs(Eo,{className:"uploader-container",ref:a,id:Ru,onClick:L=>L.stopPropagation(),sx:{position:"relative",width:f?"90vw":720,".uppy-ProviderBrowserItem-inner":{flex:1,color:"transparent","img, object":{objectFit:"contain !important"}},".uppy-Dashboard-Item-previewInnerWrap, .uppy-ProviderBrowserItem-inner":{background:"repeating-conic-gradient(#bdbdbd33 0 25%,#fff 0 50%) 50%/16px 16px !important"},".uploaded-add-item":{background:"rgba(0,0,0,0.1) !important",display:"flex",justifyContent:"center",alignItems:"center",transition:"all 0.3s ease-in-out","&:hover":{background:"rgba(0,0,0,0.13)"}},".uppy-StatusBar-actions, .uppy-ProviderBrowser-footer":{justifyContent:"flex-end"},".uppy-ProviderBrowser-footer":{button:{marginRight:"0 !important","&:last-child":{display:"none"}}},".uppy-Dashboard-AddFiles-title":{whiteSpace:"normal"},".uppy-ProviderBrowser-body":{background:"#fff",height:"100%"},".uppy-ProviderBrowser-list":{height:"fit-content",maxHeight:"100%"},".uploaded, .ai-image":{width:"100%",height:"100%",display:"flex",alignItems:"center",flexDirection:"column","& > div":{width:"100%"},"& .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:`${(Z=(Q=s==null?void 0:s.palette)==null?void 0:Q.primary)==null?void 0:Z.main}`,transition:"all 0.3s ease-in-out","&:hover, &:focus":{color:`${(ii=(te=s==null?void 0:s.palette)==null?void 0:te.primary)==null?void 0:ii.main}`,filter:"brightness(1.2)"}},"& .uppy-Dashboard-browse":{textDecoration:"underline !important"},"& .uppy-c-btn-primary":{backgroundColor:`${(Di=(Re=s==null?void 0:s.palette)==null?void 0:Re.primary)==null?void 0:Di.main} !important`,transition:"all 0.3s ease-in-out","&:hover, &:focus":{backgroundColor:`${(ni=(ai=s==null?void 0:s.palette)==null?void 0:ai.primary)==null?void 0:ni.main} !important`,filter:"brightness(1.2)"}}},children:[u&&J.jsx(bf,{"aria-label":"close",onClick:R,sx:{color:"#fafafa",position:"absolute",...f?{bottom:`calc(0px - ${H} - 16px)`,left:`calc(50vw - ${H} - 8px)`}:{right:`calc(0px - ${H} - 16px)`,top:-12}},children:J.jsx(Tf,{sx:{fontSize:H}})}),P&&J.jsxs(Eo,{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:[J.jsx(e2,{size:32}),J.jsx(z2,{variant:"body2",color:"primary",sx:{mt:1.5,fontWeight:"bold"},children:Bs(os,`${m}.strings.loadingStatus`,"Loading...")})]}),n.uppy&&J.jsx(ld,{inline:!0,target:`#${Ru}`,id:Gn,disabled:w,uppy:n.uppy,plugins:v,fileManagerSelectionType:((si=n.restrictions)==null?void 0:si.maxNumberOfFiles)===1?"files":"both",proudlyDisplayPoweredByUppy:!1,showProgressDetails:!0,disableThumbnailGenerator:!0,note:k,doneButtonHandler:R,...t.dashboardProps})]},"uploader-container")]})},"uploader-wrapper")}),q2=Object.freeze(Object.defineProperty({__proto__:null,Uploader:Tr,default:Tr,initUploader:yl},Symbol.toStringTag,{value:"Module"})),Au=B.lazy(()=>Mu(()=>Promise.resolve().then(()=>q2),void 0).then(t=>({default:t.Uploader}))),xl=B.createContext(null);function Rh(){const t=B.useContext(xl);if(!t)throw new Error("useUploaderContext must be used within an UploaderProvider");return t}function H2({onChange:t,children:e,...i}){const a=Rh(),n=()=>{var o;const s=(o=a==null?void 0:a.current)==null?void 0:o.getUploader();s==null||s.open(),t&&s.onceUploadSuccess((...r)=>{t(...r)})};return J.jsx(Eo,{onClick:n,...i,children:e})}function W2({children:t,popup:e,...i}){const a=B.useRef(null),n=B.useMemo(()=>e?qh.createPortal(J.jsx(Au,{ref:a,popup:!0,...i},"uploader"),document.body):J.jsx(Au,{ref:a,popup:!1,...i},"uploader"),[a,e,i]);return J.jsxs(xl.Provider,{value:a,children:[t,n]})}const c3=Object.freeze(Object.defineProperty({__proto__:null,CLOSE:ls,OPEN:rs,UPLOADER_UPLOAD_SUCCESS:Pr,Uploader:Tr,UploaderContext:xl,UploaderProvider:W2,UploaderTrigger:H2,api:fl,base64ToFile:fh,blobToFile:_r,createImageUrl:dn,getAIKitComponent:vh,getDownloadUrl:gh,getExt:Xi,getMediaKitComponent:Yi,getObjectURL:wr,getUploaderEndpoint:gl,getUrl:yh,initUploader:yl,initUppy:xh,isBlob:mh,isMediaKit:Sr,isSvgFile:_h,mediaKitApi:oa,mediaKitMountPoint:kt,mockUploaderFileResponse:Sh,parseStringToDot:wh,get prefixPath(){return ei},setPrefixPath:bh,useUploaderContext:Rh},Symbol.toStringTag,{value:"Module"}));export{df as B,Ym as G,bf as I,z2 as T,Xm as a,Hu as b,kf as c,jm as d,i3 as e,Eo as f,Rl as g,vh as h,c3 as i,Lm as r,Ei as s,ta as u};
@@ -1,4 +1,4 @@
1
- import{g as w}from"./vendor-react-D-afvo_7.js";import{ae as b}from"./index-LIf2LIyz.js";var x=(n,t=1,e)=>{if(e={indent:" ",includeEmptyLines:!1,...e},typeof n!="string")throw new TypeError(`Expected \`input\` to be a \`string\`, got \`${typeof n}\``);if(typeof t!="number")throw new TypeError(`Expected \`count\` to be a \`number\`, got \`${typeof t}\``);if(typeof e.indent!="string")throw new TypeError(`Expected \`options.indent\` to be a \`string\`, got \`${typeof e.indent}\``);if(t===0)return n;const r=e.includeEmptyLines?/^/gm:/^(?!\s*$)/gm;return n.replace(r,e.indent.repeat(t))};const m=b,E=/\s+at.*(?:\(|\s)(.*)\)?/,$=/^(?:(?:(?:node|(?:internal\/[\w/]*|.*node_modules\/(?:babel-polyfill|pirates)\/.*)?\w+)\.js:\d+:\d+)|native)/,j=typeof m.homedir>"u"?"":m.homedir();var v=(n,t)=>(t=Object.assign({pretty:!1},t),n.replace(/\\/g,"/").split(`
1
+ import{g as w}from"./vendor-react-D-afvo_7.js";import{ae as b}from"./index-C85gVBzh.js";var x=(n,t=1,e)=>{if(e={indent:" ",includeEmptyLines:!1,...e},typeof n!="string")throw new TypeError(`Expected \`input\` to be a \`string\`, got \`${typeof n}\``);if(typeof t!="number")throw new TypeError(`Expected \`count\` to be a \`number\`, got \`${typeof t}\``);if(typeof e.indent!="string")throw new TypeError(`Expected \`options.indent\` to be a \`string\`, got \`${typeof e.indent}\``);if(t===0)return n;const r=e.includeEmptyLines?/^/gm:/^(?!\s*$)/gm;return n.replace(r,e.indent.repeat(t))};const m=b,E=/\s+at.*(?:\(|\s)(.*)\)?/,$=/^(?:(?:(?:node|(?:internal\/[\w/]*|.*node_modules\/(?:babel-polyfill|pirates)\/.*)?\w+)\.js:\d+:\d+)|native)/,j=typeof m.homedir>"u"?"":m.homedir();var v=(n,t)=>(t=Object.assign({pretty:!1},t),n.replace(/\\/g,"/").split(`
2
2
  `).filter(e=>{const r=e.match(E);if(r===null||!r[1])return!0;const a=r[1];return a.includes(".app/Contents/Resources/electron.asar")||a.includes(".app/Contents/Resources/default_app.asar")?!1:!$.test(a)}).filter(e=>e.trim()!=="").map(e=>t.pretty?e.replace(E,(r,a)=>r.replace(a,a.replace(j,"~"))):e).join(`
3
3
  `));const A=x,S=v,I=n=>n.replace(/\s+at .*aggregate-error\/index.js:\d+:\d+\)?/g,"");let k=class extends Error{constructor(t){if(!Array.isArray(t))throw new TypeError(`Expected input to be an Array, got ${typeof t}`);t=[...t].map(r=>r instanceof Error?r:r!==null&&typeof r=="object"?Object.assign(new Error(r.message),r):new Error(r));let e=t.map(r=>typeof r.stack=="string"?I(S(r.stack)):String(r)).join(`
4
4
  `);e=`
@@ -1,4 +1,4 @@
1
- import{r as E,g as Ir,a as he,u as Ro}from"./vendor-react-D-afvo_7.js";import{a1 as U,j as e,E as D,aa as ht,P as To,b_ as tn,bM as Oo,M as G,a3 as P,A as la,I as de,a2 as Ke,bN as ca,T as mt,aN as J,bL as ft,br as So,ad as wo,ah as Kt,bO as Me,aO as Pe,bH as Z,x as fe,ac as Le,b$ as Io,e as gt,Z as ua,a4 as le,K as ko,c0 as qo,c1 as Lo,c2 as Do,c3 as ge,bT as Re,c4 as da,c5 as kr,c6 as qr,c7 as Ao,c8 as fa,c9 as Mo,ca as Eo,aw as qe,cb as Bo,cc as $o,cd as Wo,ce as No,cf as Ho,cg as Fo,ch as zo,ci as Uo,cj as Vo,ck as Ko,cl as Go,cm as tr,am as Yo,C as Zo,ao as Jo,bx as pa,by as ma}from"./vendor-mui-core-xF5F4eT7.js";import{I as Xo}from"./iframe-CU0LfRyS.js";import{G as Be,w as Qo,x as Gt,Z as ei,c as rn,A as pt,n as me,an as ti,y as ri,N as rr,ao as ni,ap as nn,L as ha,F as Ee,K as ga}from"./vendor-utils-5TjOM6td.js";import{$ as vt,ae as an,e as ie,a2 as ee,j as z,b as Q,Z as va,at as ai,a6 as Ge,a1 as Te,bi as xt,au as xa,am as Lr,bn as oi,bo as ii,af as Xt,aB as te,bp as si,bq as li,br as ci,bs as ui,bt as di,a9 as on,aY as fi,bu as Pr,bv as pi,bw as mi,aU as nr,Y as hi,bx as Rr,aV as sn}from"./vendor-arcblock-DZrZ_x_3.js";import{a as je,u as k,d as $e,c as gi,n as Yt,k as ya}from"./vendor-hooks-BKxTDk_P.js";import{A as ba,d as ln}from"./config-DjozEU7w.js";import{F as ja,d as vi}from"./form-text-input-DS_PVT1r.js";import{d as cn}from"./ChevronRight-DlIj8Fj2.js";import{y as oe,B as ue,au as xi,f as _a,av as yi,m as bi,h as ae,M as ji,O as _i}from"./index-LIf2LIyz.js";import{B as Ci}from"./bundle-avatar-CYdInmjR.js";import{u as Pi,B as Ri}from"./index-0u5pzPhR.js";import{d as Ti}from"./Loop-B05tzyuy.js";import{d as Oi}from"./Done-DJfjmlFC.js";import{F as Si,R as wi,L as et}from"./logo-uploader-DbSGPbXh.js";import{w as Ca,P as Ii}from"./permission-C0p6f4_S.js";import{C as Dr}from"./confirm-CpCj_oj-.js";import{f as Ar}from"./format-error-C0Ke3VXF.js";import{_ as ki}from"./useSetState-Crt4S51m.js";import{u as qi}from"./session-CM1ewS-k.js";import{C as Li}from"./click-to-copy-Bu9H6mvL.js";import{u as Mr,a as Di}from"./dashboard-Cgj1BkGn.js";import{u as Ie,C as H,a as un,S as cr}from"./simple-select-D06JmA0a.js";import{a as Pa,b as Ai,c as Mi,m as Ei,i as dn}from"./isEmail-BWNRBSAy.js";import{S as ar}from"./switch-control-D2qynQm8.js";import{K as Bi}from"./keyboard-arrow-down-rounded-DadBVmpO.js";import{d as fn}from"./Add-DSPtuudj.js";import{I as $i}from"./index-DGzAI_hi.js";import{b as Wi}from"./base32-BAfsRZF6.js";import"./EditIcon-BOr0kf6I.js";import"./ArrowDropDown-DM9y1OaN.js";import"./index-DoZ2YM4T.js";import"./useLocalStorage-DV4AIe5L.js";import"./PlayArrow-DZfknrYj.js";import"./get-safe-url-DDeO6YpV.js";import"./useAsyncRetry-Bmo6a1Zp.js";import"./useAsync-Ua5iss51.js";import"./InfoOutlined-C_J3Y0fX.js";var Er={},Ni=U;Object.defineProperty(Er,"__esModule",{value:!0});var Ra=Er.default=void 0,Hi=Ni(vt()),Fi=e;Ra=Er.default=(0,Hi.default)((0,Fi.jsx)("path",{d:"M3 18c0 .55.45 1 1 1h5v-2H4c-.55 0-1 .45-1 1M3 6c0 .55.45 1 1 1h9V5H4c-.55 0-1 .45-1 1m10 14v-1h7c.55 0 1-.45 1-1s-.45-1-1-1h-7v-1c0-.55-.45-1-1-1s-1 .45-1 1v4c0 .55.45 1 1 1s1-.45 1-1M7 10v1H4c-.55 0-1 .45-1 1s.45 1 1 1h3v1c0 .55.45 1 1 1s1-.45 1-1v-4c0-.55-.45-1-1-1s-1 .45-1 1m14 2c0-.55-.45-1-1-1h-9v2h9c.55 0 1-.45 1-1m-5-3c.55 0 1-.45 1-1V7h3c.55 0 1-.45 1-1s-.45-1-1-1h-3V4c0-.55-.45-1-1-1s-1 .45-1 1v4c0 .55.45 1 1 1"}),"TuneRounded");var Br={},zi=U;Object.defineProperty(Br,"__esModule",{value:!0});var Ta=Br.default=void 0,Ui=zi(vt()),Vi=e;Ta=Br.default=(0,Ui.default)((0,Vi.jsx)("path",{d:"M21 10h-8.35C11.83 7.67 9.61 6 7 6c-3.31 0-6 2.69-6 6s2.69 6 6 6c2.61 0 4.83-1.67 5.65-4H13l2 2 2-2 2 2 4-4.04zM7 15c-1.65 0-3-1.35-3-3s1.35-3 3-3 3 1.35 3 3-1.35 3-3 3"}),"Key");var $r={},Ki=U;Object.defineProperty($r,"__esModule",{value:!0});var Oa=$r.default=void 0,Gi=Ki(vt()),Yi=e;Oa=$r.default=(0,Gi.default)((0,Yi.jsx)("path",{d:"M11 7 9.6 8.4l2.6 2.6H2v2h10.2l-2.6 2.6L11 17l5-5zm9 12h-8v2h8c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2h-8v2h8z"}),"Login");var Wr={},Zi=U;Object.defineProperty(Wr,"__esModule",{value:!0});var Sa=Wr.default=void 0,Ji=Zi(vt()),Xi=e;Sa=Wr.default=(0,Ji.default)((0,Xi.jsx)("path",{d:"M12 22c1.1 0 2-.9 2-2h-4c0 1.1.9 2 2 2m6-6v-5c0-3.07-1.63-5.64-4.5-6.32V4c0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5v.68C7.64 5.36 6 7.92 6 11v5l-2 2v1h16v-1zm-2 1H8v-6c0-2.48 1.51-4.5 4-4.5s4 2.02 4 4.5z"}),"NotificationsNone");const Qi={width:24,height:24,body:'<path fill="currentColor" d="M4.975 15q-.425 0-.7-.288T4 14q0-.425.288-.713T5 13h14.025q.425 0 .7.288T20 14q0 .425-.288.713T19 15H4.975Zm0 4q-.425 0-.7-.288T4 18q0-.425.288-.713T5 17h14.025q.425 0 .7.288T20 18q0 .425-.288.713T19 19H4.975Zm0-8q-.425 0-.7-.288T4 10q0-.425.288-.713T5 9h14.025q.425 0 .7.288T20 10q0 .425-.288.713T19 11H4.975Zm0-4q-.425 0-.7-.288T4 6q0-.425.288-.713T5 5h14.025q.425 0 .7.288T20 6q0 .425-.288.713T19 7H4.975Z"/>'},es=Qi;function Nr({label:t,disabled:l,required:r,initialValue:o,onChange:u,style:i,onSubmit:m,triggers:n,options:a,formatterBeforeSubmit:s,helperText:d,placeholder:C,renderImage:y,renderLabel:j,filterKeys:O,noEmpty:S,...I}){const[T,c]=E.useState(!1),[p,v]=E.useState(!1),[f,b]=E.useState(""),_=E.useRef(null),[x,g]=E.useState(o),[h,R]=E.useState(x),q=E.useMemo(()=>{if(!a)return{};const L={};return a.forEach($=>{L[$.code]=$}),L},[a]),M=()=>{if(!a)return[];if(!f)return a.map($=>$.code);const L=new RegExp(f.toLowerCase());return a.filter($=>{var V;for(let Y=0;Y<O.length;Y++){const re=O[Y];if(L.test((V=$[re])==null?void 0:V.toLowerCase()))return!0}return!1}).map($=>$.code)},W=async()=>{v(!0);try{await m(typeof s=="function"?s(h):h)===!1?R(x):S&&!h.length?(R(o),g(o)):(R(h),g(h))}catch{R(x)}finally{v(!1),c(!1)}},A=(L,$)=>{if(!Array.isArray($)){R([]),u([]);return}const V=$.filter(Y=>q[Y]);if(!V.length){R([]),u([]);return}R(V),u(V)},w=L=>{L.stopPropagation(),c(!0),setTimeout(()=>{if(_.current){const $=_.current.querySelector("input");$&&$.focus()}},500)},B=T?e.jsx(Oo,{ref:_,options:a,value:h,onChange:A,inputValue:f,onInputChange:(L,$)=>{b($)},PopperComponent:rs,fullWidth:!0,multiple:!0,variant:"outlined",margin:"dense",filterOptions:M,getOptionLabel:L=>{var $;return($=q[L])==null?void 0:$.name},renderInput:L=>e.jsx(G,{...L,label:"",placeholder:C}),renderOption:(L,$)=>{var Y;const V=h.indexOf($)!==-1;return E.createElement(ts,{component:"li",...L,key:$},y(q[$]||{}),e.jsx(P,{sx:{"& > img":{mr:2,flexShrink:0}},style:{flex:1,fontWeight:V?"700":"normal"},children:j($,q[$])||((Y=q[$])==null?void 0:Y.name)}),e.jsx(P,{component:an,sx:{opacity:.5,width:18,height:18},style:{visibility:V?"visible":"hidden"}}))},...I}):e.jsx(P,{px:1,className:"form-item-input slot",onClick:w,style:{whiteSpace:"pre-wrap",cursor:"text"},children:h.filter(L=>a.some($=>$.code===L)).map(L=>e.jsx(la,{label:a.find($=>$.code===L).name,style:{marginRight:8},size:"small"},L))});return e.jsx(Si,{className:"form",style:i,children:e.jsxs(P,{className:"form-item",children:[e.jsxs(P,{className:"form-item-label",children:[t,r&&e.jsx(wi,{})]}),e.jsxs(P,{className:"form-item-body",children:[e.jsx(P,{className:"form-item-input",children:B}),e.jsx(P,{className:"form-item-action",children:T?e.jsxs(e.Fragment,{children:[e.jsx(de,{"data-cy":"schema-form-item-confirm",onClick:W,disabled:l||p,size:"large",children:p?e.jsx(Ke,{size:24}):e.jsx(Oi,{})}),e.jsx(de,{"data-cy":"schema-form-item-cancel",onClick:()=>{R(x),c(!1)},disabled:l||p,size:"large",children:e.jsx(an,{})})]}):null})]}),T&&d&&e.jsx(ca,{children:d})]})})}Nr.propTypes={style:D.object,onSubmit:D.func,onChange:D.func,label:D.string,initialValue:D.string,required:D.bool,disabled:D.bool,triggers:D.array,options:D.array,helperText:D.string,formatterBeforeSubmit:D.func,placeholder:D.string,renderImage:D.func,filterKeys:D.arrayOf(D.string),noEmpty:D.bool,renderLabel:D.func};Nr.defaultProps={style:{},onSubmit:()=>{},onChange:()=>{},label:"",initialValue:"",required:!1,disabled:!1,triggers:[],options:[],helperText:"",formatterBeforeSubmit:t=>t.join(","),placeholder:"",filterKeys:["name"],renderImage:()=>null,renderLabel:(t,l)=>"",noEmpty:!1};const ts=ht.div`
1
+ import{r as E,g as Ir,a as he,u as Ro}from"./vendor-react-D-afvo_7.js";import{a1 as U,j as e,E as D,aa as ht,P as To,b_ as tn,bM as Oo,M as G,a3 as P,A as la,I as de,a2 as Ke,bN as ca,T as mt,aN as J,bL as ft,br as So,ad as wo,ah as Kt,bO as Me,aO as Pe,bH as Z,x as fe,ac as Le,b$ as Io,e as gt,Z as ua,a4 as le,K as ko,c0 as qo,c1 as Lo,c2 as Do,c3 as ge,bT as Re,c4 as da,c5 as kr,c6 as qr,c7 as Ao,c8 as fa,c9 as Mo,ca as Eo,aw as qe,cb as Bo,cc as $o,cd as Wo,ce as No,cf as Ho,cg as Fo,ch as zo,ci as Uo,cj as Vo,ck as Ko,cl as Go,cm as tr,am as Yo,C as Zo,ao as Jo,bx as pa,by as ma}from"./vendor-mui-core-xF5F4eT7.js";import{I as Xo}from"./iframe-CU0LfRyS.js";import{G as Be,w as Qo,x as Gt,Z as ei,c as rn,A as pt,n as me,an as ti,y as ri,N as rr,ao as ni,ap as nn,L as ha,F as Ee,K as ga}from"./vendor-utils-5TjOM6td.js";import{$ as vt,ae as an,e as ie,a2 as ee,j as z,b as Q,Z as va,at as ai,a6 as Ge,a1 as Te,bi as xt,au as xa,am as Lr,bn as oi,bo as ii,af as Xt,aB as te,bp as si,bq as li,br as ci,bs as ui,bt as di,a9 as on,aY as fi,bu as Pr,bv as pi,bw as mi,aU as nr,Y as hi,bx as Rr,aV as sn}from"./vendor-arcblock-DZrZ_x_3.js";import{a as je,u as k,d as $e,c as gi,n as Yt,k as ya}from"./vendor-hooks-BKxTDk_P.js";import{A as ba,d as ln}from"./config-DjozEU7w.js";import{F as ja,d as vi}from"./form-text-input-DixVGGLY.js";import{d as cn}from"./ChevronRight-DlIj8Fj2.js";import{y as oe,B as ue,au as xi,f as _a,av as yi,m as bi,h as ae,M as ji,O as _i}from"./index-C85gVBzh.js";import{B as Ci}from"./bundle-avatar-3QSGrsNA.js";import{u as Pi,B as Ri}from"./index-Cld1HWxz.js";import{d as Ti}from"./Loop-B05tzyuy.js";import{d as Oi}from"./Done-DJfjmlFC.js";import{F as Si,R as wi,L as et}from"./logo-uploader-lx0oUxRg.js";import{w as Ca,P as Ii}from"./permission-C0p6f4_S.js";import{C as Dr}from"./confirm-dIU5y9cG.js";import{f as Ar}from"./format-error-C0Ke3VXF.js";import{_ as ki}from"./useSetState-Crt4S51m.js";import{u as qi}from"./session-CM1ewS-k.js";import{C as Li}from"./click-to-copy-Bu9H6mvL.js";import{u as Mr,a as Di}from"./dashboard-DEaIei4u.js";import{u as Ie,C as H,a as un,S as cr}from"./simple-select-D06JmA0a.js";import{a as Pa,b as Ai,c as Mi,m as Ei,i as dn}from"./isEmail-BWNRBSAy.js";import{S as ar}from"./switch-control-D2qynQm8.js";import{K as Bi}from"./keyboard-arrow-down-rounded-DadBVmpO.js";import{d as fn}from"./Add-DSPtuudj.js";import{I as $i}from"./index-DGzAI_hi.js";import{b as Wi}from"./base32-BAfsRZF6.js";import"./EditIcon-BOr0kf6I.js";import"./ArrowDropDown-DM9y1OaN.js";import"./index-DoZ2YM4T.js";import"./useLocalStorage-DV4AIe5L.js";import"./PlayArrow-DZfknrYj.js";import"./get-safe-url-Du4BhDgB.js";import"./useAsyncRetry-Bmo6a1Zp.js";import"./useAsync-Ua5iss51.js";import"./InfoOutlined-C_J3Y0fX.js";var Er={},Ni=U;Object.defineProperty(Er,"__esModule",{value:!0});var Ra=Er.default=void 0,Hi=Ni(vt()),Fi=e;Ra=Er.default=(0,Hi.default)((0,Fi.jsx)("path",{d:"M3 18c0 .55.45 1 1 1h5v-2H4c-.55 0-1 .45-1 1M3 6c0 .55.45 1 1 1h9V5H4c-.55 0-1 .45-1 1m10 14v-1h7c.55 0 1-.45 1-1s-.45-1-1-1h-7v-1c0-.55-.45-1-1-1s-1 .45-1 1v4c0 .55.45 1 1 1s1-.45 1-1M7 10v1H4c-.55 0-1 .45-1 1s.45 1 1 1h3v1c0 .55.45 1 1 1s1-.45 1-1v-4c0-.55-.45-1-1-1s-1 .45-1 1m14 2c0-.55-.45-1-1-1h-9v2h9c.55 0 1-.45 1-1m-5-3c.55 0 1-.45 1-1V7h3c.55 0 1-.45 1-1s-.45-1-1-1h-3V4c0-.55-.45-1-1-1s-1 .45-1 1v4c0 .55.45 1 1 1"}),"TuneRounded");var Br={},zi=U;Object.defineProperty(Br,"__esModule",{value:!0});var Ta=Br.default=void 0,Ui=zi(vt()),Vi=e;Ta=Br.default=(0,Ui.default)((0,Vi.jsx)("path",{d:"M21 10h-8.35C11.83 7.67 9.61 6 7 6c-3.31 0-6 2.69-6 6s2.69 6 6 6c2.61 0 4.83-1.67 5.65-4H13l2 2 2-2 2 2 4-4.04zM7 15c-1.65 0-3-1.35-3-3s1.35-3 3-3 3 1.35 3 3-1.35 3-3 3"}),"Key");var $r={},Ki=U;Object.defineProperty($r,"__esModule",{value:!0});var Oa=$r.default=void 0,Gi=Ki(vt()),Yi=e;Oa=$r.default=(0,Gi.default)((0,Yi.jsx)("path",{d:"M11 7 9.6 8.4l2.6 2.6H2v2h10.2l-2.6 2.6L11 17l5-5zm9 12h-8v2h8c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2h-8v2h8z"}),"Login");var Wr={},Zi=U;Object.defineProperty(Wr,"__esModule",{value:!0});var Sa=Wr.default=void 0,Ji=Zi(vt()),Xi=e;Sa=Wr.default=(0,Ji.default)((0,Xi.jsx)("path",{d:"M12 22c1.1 0 2-.9 2-2h-4c0 1.1.9 2 2 2m6-6v-5c0-3.07-1.63-5.64-4.5-6.32V4c0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5v.68C7.64 5.36 6 7.92 6 11v5l-2 2v1h16v-1zm-2 1H8v-6c0-2.48 1.51-4.5 4-4.5s4 2.02 4 4.5z"}),"NotificationsNone");const Qi={width:24,height:24,body:'<path fill="currentColor" d="M4.975 15q-.425 0-.7-.288T4 14q0-.425.288-.713T5 13h14.025q.425 0 .7.288T20 14q0 .425-.288.713T19 15H4.975Zm0 4q-.425 0-.7-.288T4 18q0-.425.288-.713T5 17h14.025q.425 0 .7.288T20 18q0 .425-.288.713T19 19H4.975Zm0-8q-.425 0-.7-.288T4 10q0-.425.288-.713T5 9h14.025q.425 0 .7.288T20 10q0 .425-.288.713T19 11H4.975Zm0-4q-.425 0-.7-.288T4 6q0-.425.288-.713T5 5h14.025q.425 0 .7.288T20 6q0 .425-.288.713T19 7H4.975Z"/>'},es=Qi;function Nr({label:t,disabled:l,required:r,initialValue:o,onChange:u,style:i,onSubmit:m,triggers:n,options:a,formatterBeforeSubmit:s,helperText:d,placeholder:C,renderImage:y,renderLabel:j,filterKeys:O,noEmpty:S,...I}){const[T,c]=E.useState(!1),[p,v]=E.useState(!1),[f,b]=E.useState(""),_=E.useRef(null),[x,g]=E.useState(o),[h,R]=E.useState(x),q=E.useMemo(()=>{if(!a)return{};const L={};return a.forEach($=>{L[$.code]=$}),L},[a]),M=()=>{if(!a)return[];if(!f)return a.map($=>$.code);const L=new RegExp(f.toLowerCase());return a.filter($=>{var V;for(let Y=0;Y<O.length;Y++){const re=O[Y];if(L.test((V=$[re])==null?void 0:V.toLowerCase()))return!0}return!1}).map($=>$.code)},W=async()=>{v(!0);try{await m(typeof s=="function"?s(h):h)===!1?R(x):S&&!h.length?(R(o),g(o)):(R(h),g(h))}catch{R(x)}finally{v(!1),c(!1)}},A=(L,$)=>{if(!Array.isArray($)){R([]),u([]);return}const V=$.filter(Y=>q[Y]);if(!V.length){R([]),u([]);return}R(V),u(V)},w=L=>{L.stopPropagation(),c(!0),setTimeout(()=>{if(_.current){const $=_.current.querySelector("input");$&&$.focus()}},500)},B=T?e.jsx(Oo,{ref:_,options:a,value:h,onChange:A,inputValue:f,onInputChange:(L,$)=>{b($)},PopperComponent:rs,fullWidth:!0,multiple:!0,variant:"outlined",margin:"dense",filterOptions:M,getOptionLabel:L=>{var $;return($=q[L])==null?void 0:$.name},renderInput:L=>e.jsx(G,{...L,label:"",placeholder:C}),renderOption:(L,$)=>{var Y;const V=h.indexOf($)!==-1;return E.createElement(ts,{component:"li",...L,key:$},y(q[$]||{}),e.jsx(P,{sx:{"& > img":{mr:2,flexShrink:0}},style:{flex:1,fontWeight:V?"700":"normal"},children:j($,q[$])||((Y=q[$])==null?void 0:Y.name)}),e.jsx(P,{component:an,sx:{opacity:.5,width:18,height:18},style:{visibility:V?"visible":"hidden"}}))},...I}):e.jsx(P,{px:1,className:"form-item-input slot",onClick:w,style:{whiteSpace:"pre-wrap",cursor:"text"},children:h.filter(L=>a.some($=>$.code===L)).map(L=>e.jsx(la,{label:a.find($=>$.code===L).name,style:{marginRight:8},size:"small"},L))});return e.jsx(Si,{className:"form",style:i,children:e.jsxs(P,{className:"form-item",children:[e.jsxs(P,{className:"form-item-label",children:[t,r&&e.jsx(wi,{})]}),e.jsxs(P,{className:"form-item-body",children:[e.jsx(P,{className:"form-item-input",children:B}),e.jsx(P,{className:"form-item-action",children:T?e.jsxs(e.Fragment,{children:[e.jsx(de,{"data-cy":"schema-form-item-confirm",onClick:W,disabled:l||p,size:"large",children:p?e.jsx(Ke,{size:24}):e.jsx(Oi,{})}),e.jsx(de,{"data-cy":"schema-form-item-cancel",onClick:()=>{R(x),c(!1)},disabled:l||p,size:"large",children:e.jsx(an,{})})]}):null})]}),T&&d&&e.jsx(ca,{children:d})]})})}Nr.propTypes={style:D.object,onSubmit:D.func,onChange:D.func,label:D.string,initialValue:D.string,required:D.bool,disabled:D.bool,triggers:D.array,options:D.array,helperText:D.string,formatterBeforeSubmit:D.func,placeholder:D.string,renderImage:D.func,filterKeys:D.arrayOf(D.string),noEmpty:D.bool,renderLabel:D.func};Nr.defaultProps={style:{},onSubmit:()=>{},onChange:()=>{},label:"",initialValue:"",required:!1,disabled:!1,triggers:[],options:[],helperText:"",formatterBeforeSubmit:t=>t.join(","),placeholder:"",filterKeys:["name"],renderImage:()=>null,renderLabel:(t,l)=>"",noEmpty:!1};const ts=ht.div`
2
2
  display: flex;
3
3
  justify-content: space-between;
4
4
  align-items: center;