comp-hub 0.27.18 → 0.27.20

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 (85) hide show
  1. package/README.md +147 -147
  2. package/bin/cli.js +85 -84
  3. package/dist/index.js +1 -1
  4. package/dist/website/container/assets/index-BE50zrUP.css +1 -0
  5. package/dist/website/container/assets/{index-CdaB9oWd.js → index-Cmi2NYAU.js} +1 -1
  6. package/dist/website/container/index.html +34 -34
  7. package/dist/website/container/js/vue2-sfc-loader.js +260 -260
  8. package/dist/website/container/js/vue3-sfc-loader.js +289 -289
  9. package/dist/website/item/assets/{index-B0s1uwsa.js → index-D1z-Gulp.js} +3 -3
  10. package/dist/website/item/assets/index-DMrYn9mD.css +1 -0
  11. package/dist/website/item/index.html +32 -32
  12. package/dist/website/main/assets/{AuthCodeSendBtn.vue_vue_type_script_setup_true_lang-CfufrKbA.js → AuthCodeSendBtn.vue_vue_type_script_setup_true_lang-bvKbrkpk.js} +1 -1
  13. package/dist/website/main/assets/{BaseDialog.vue_vue_type_script_setup_true_lang-B6WkXWm7.js → BaseDialog.vue_vue_type_script_setup_true_lang-CPKWysZj.js} +1 -1
  14. package/dist/website/main/assets/{BaseSegmented.vue_vue_type_script_setup_true_lang-D5yw_wF0.js → BaseSegmented.vue_vue_type_script_setup_true_lang-CIcujGT8.js} +1 -1
  15. package/dist/website/main/assets/{CanvasAnimation.vue_vue_type_script_setup_true_lang-BwtYEYU5.js → CanvasAnimation.vue_vue_type_script_setup_true_lang-Z_wBEKCl.js} +1 -1
  16. package/dist/website/main/assets/{EmptyStatusContainer.vue_vue_type_script_setup_true_lang-DIgE9MGd.js → EmptyStatusContainer.vue_vue_type_script_setup_true_lang-C8xBMnWg.js} +1 -1
  17. package/dist/website/main/assets/{core-DE5-zGKf.js → core-DCZ-eL8G.js} +1 -1
  18. package/dist/website/main/assets/{el-table-column-BiqynxkD.js → el-table-column-Cx9gMgrN.js} +1 -1
  19. package/dist/website/main/assets/{index-BIGvC1SM.js → index-4acODfuo.js} +1 -1
  20. package/dist/website/main/assets/index-B2BmYIO5.js +1 -0
  21. package/dist/website/main/assets/index-B37e-H6y.js +1 -0
  22. package/dist/website/main/assets/index-B63tZaB2.css +1 -0
  23. package/dist/website/main/assets/{index-gOTpUrNM.js → index-BGTVNDSV.js} +1 -1
  24. package/dist/website/main/assets/{index-DvyE3TrH.js → index-BaX-1N8K.js} +2 -2
  25. package/dist/website/main/assets/{index-BGLjC3BV.js → index-BngP265n.js} +1 -1
  26. package/dist/website/main/assets/index-BnpZ3Duk.js +25 -0
  27. package/dist/website/main/assets/{index-BQWeT5qu.js → index-Bw7t67yK.js} +1 -1
  28. package/dist/website/main/assets/{index-CGgS1tZ0.js → index-C7kV7E5j.js} +1 -1
  29. package/dist/website/main/assets/index-C9r8rR8o.js +1 -0
  30. package/dist/website/main/assets/index-CfMcBFhz.js +1 -0
  31. package/dist/website/main/assets/{index-Dl-mwEbG.js → index-CqcYb_O4.js} +1 -1
  32. package/dist/website/main/assets/{index-BfPdLll-.js → index-CvRT9IhX.js} +1 -1
  33. package/dist/website/main/assets/{index-D7eOWAPr.js → index-Cy6hrNNt.js} +1 -1
  34. package/dist/website/main/assets/index-Czj4Va_p.js +1 -0
  35. package/dist/website/main/assets/{index-DBM1x91X.js → index-D4mf-9oL.js} +1 -1
  36. package/dist/website/main/assets/index-DBDOcdx3.js +2 -0
  37. package/dist/website/main/assets/{index-D8WDrGkh.js → index-DGdf8eP2.js} +1 -1
  38. package/dist/website/main/assets/{index-ctwb4cB7.js → index-DMAX-M2Q.js} +1 -1
  39. package/dist/website/main/assets/{index-CFH_ugiT.js → index-DNszuV9Y.js} +1 -1
  40. package/dist/website/main/assets/index-DlO1wWqO.js +1 -0
  41. package/dist/website/main/assets/{index-q4Z3Q7p4.js → index-DsYCIdsq.js} +1 -1
  42. package/dist/website/main/assets/{index-Cu1YAWdz.js → index-DxYo8MHB.js} +1 -1
  43. package/dist/website/main/assets/{index-Cl0SK7oa.css → index-DxyEzkir.css} +1 -1
  44. package/dist/website/main/assets/{index-Oo11MKfd.js → index-Dz7Dj_1u.js} +1 -1
  45. package/dist/website/main/assets/index-FHO37hxp.css +1 -0
  46. package/dist/website/main/assets/{index-uu5oSUvx.js → index-GnkbPU1i.js} +1 -1
  47. package/dist/website/main/assets/{index-C9t3Yhe9.js → index-IUKgsvZv.js} +1 -1
  48. package/dist/website/main/assets/{index-DmO0JQ56.css → index-JFePecD_.css} +1 -1
  49. package/dist/website/main/assets/{index-CTLlcQoM.js → index-O6EResxn.js} +1 -1
  50. package/dist/website/main/assets/index-Pry-PAul.css +1 -0
  51. package/dist/website/main/assets/{index-vnzmxexj.js → index-WuHE7xfi.js} +1 -1
  52. package/dist/website/main/assets/index-ZwxrucVt.js +1 -0
  53. package/dist/website/main/assets/{index-cFhtMyBi.js → index-x3kqy62K.js} +2 -2
  54. package/dist/website/main/assets/{index.vue_vue_type_script_setup_true_lang-BDhf8t5D.js → index.vue_vue_type_script_setup_true_lang-C5L_ugEm.js} +1 -1
  55. package/dist/website/main/assets/{index.vue_vue_type_script_setup_true_lang-aO0L9Tak.js → index.vue_vue_type_script_setup_true_lang-CmisVeEC.js} +1 -1
  56. package/dist/website/main/assets/{index.vue_vue_type_script_setup_true_lang-D_7jZ1zo.js → index.vue_vue_type_script_setup_true_lang-CwhJTB8k.js} +2 -2
  57. package/dist/website/main/assets/{index.vue_vue_type_script_setup_true_lang-B4echric.js → index.vue_vue_type_script_setup_true_lang-DRlqnxVM.js} +1 -1
  58. package/dist/website/main/assets/{index.vue_vue_type_script_setup_true_lang-COryHg9c.js → index.vue_vue_type_script_setup_true_lang-SLaqY8P4.js} +1 -1
  59. package/dist/website/main/assets/{index.vue_vue_type_script_setup_true_lang-Dtuk2wrA.js → index.vue_vue_type_script_setup_true_lang-Y8sQYcwy.js} +1 -1
  60. package/dist/website/main/assets/{index.vue_vue_type_style_index_0_lang-C4fELX8m.js → index.vue_vue_type_style_index_0_lang-BygWE3Ob.js} +1 -1
  61. package/dist/website/main/assets/{index.vue_vue_type_style_index_0_lang-D_eT-tA_.js → index.vue_vue_type_style_index_0_lang-TY8hdvSG.js} +1 -1
  62. package/dist/website/main/assets/{index.vue_vue_type_style_index_0_lang-C3U7f9Ma.js → index.vue_vue_type_style_index_0_lang-vmUTBf-P.js} +1 -1
  63. package/dist/website/main/assets/{md5-BZr8xhBN.js → md5-CDR0X4F9.js} +1 -1
  64. package/dist/website/main/assets/{useCompEditStore-B7KaUbOi.js → useCompEditStore-BaMFNGpl.js} +2 -2
  65. package/dist/website/main/assets/{useCompEditStore-Du_-rNtX.css → useCompEditStore-DdbvUh5w.css} +1 -1
  66. package/dist/website/main/assets/{useKeyword-D1qu8Tz-.js → useKeyword-BMG9y3e4.js} +1 -1
  67. package/dist/website/main/assets/{useMessage-D7WAp245.js → useMessage-CNq7TVBk.js} +1 -1
  68. package/dist/website/main/assets/{useVscodeOpen-DIYbcP1e.js → useVscodeOpen-B7qurnVy.js} +1 -1
  69. package/dist/website/main/assets/{vendor-ui-D6wVBlls.js → vendor-ui-CmoKJ_4A.js} +3 -3
  70. package/dist/website/main/index.html +3 -3
  71. package/package.json +39 -39
  72. package/dist/website/container/assets/index-BnbvpvZL.css +0 -1
  73. package/dist/website/item/assets/index-BIcNxYiU.css +0 -1
  74. package/dist/website/main/assets/index-B6f_06zP.js +0 -1
  75. package/dist/website/main/assets/index-BkUBwon5.css +0 -1
  76. package/dist/website/main/assets/index-CCFHORqg.js +0 -1
  77. package/dist/website/main/assets/index-CWW1M_cy.js +0 -1
  78. package/dist/website/main/assets/index-Cf69_nzt.js +0 -23
  79. package/dist/website/main/assets/index-CuHNNhtE.js +0 -1
  80. package/dist/website/main/assets/index-D6Fz5rH9.css +0 -1
  81. package/dist/website/main/assets/index-DC94GyXj.js +0 -1
  82. package/dist/website/main/assets/index-DrUAgWBX.js +0 -1
  83. package/dist/website/main/assets/index-YUZjR2Eq.js +0 -2
  84. package/dist/website/main/assets/index-tEU6GnSH.js +0 -1
  85. package/dist/website/main/assets/index-y8GEzH-z.css +0 -1
@@ -0,0 +1,25 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-DxYo8MHB.js","assets/vendor-ui-CmoKJ_4A.js","assets/vendor-core-B-Si3WEf.js","assets/LoadingWrapper.vue_vue_type_script_setup_true_lang-5GxduB08.js","assets/EmptyStatusContainer.vue_vue_type_script_setup_true_lang-C8xBMnWg.js","assets/BaseDialog.vue_vue_type_script_setup_true_lang-CPKWysZj.js","assets/el-dropdown-item-BeIfAqTO.css","assets/el-card-BAyktVMS.css","assets/index-Czj4Va_p.js","assets/index.vue_vue_type_script_setup_true_lang-CmisVeEC.js","assets/useCacheOssStore-CU4a8b24.js","assets/index-DOlF0Z_P.css","assets/index.vue_vue_type_script_setup_true_lang-qhJpeu7a.js","assets/index-IUKgsvZv.js","assets/index-B78Rw6nE.css","assets/useVscodeOpen-B7qurnVy.js","assets/index-CMvx8gm3.js","assets/index-8dCw6Y2Z.css","assets/el-link-CPQZ-olG.css","assets/index-O6EResxn.js","assets/md5-CDR0X4F9.js","assets/AuthCodeSendBtn.vue_vue_type_script_setup_true_lang-bvKbrkpk.js","assets/CanvasAnimation.vue_vue_type_script_setup_true_lang-Z_wBEKCl.js","assets/index-wgeiSlf-.css","assets/index-BaX-1N8K.js","assets/core-DCZ-eL8G.js","assets/index-Dt73qBZB.css","assets/el-empty-S7fQQ3B8.css","assets/index-DlO1wWqO.js","assets/index.vue_vue_type_style_index_0_lang-vmUTBf-P.js","assets/index-Dj51p5I8.css","assets/index-DNszuV9Y.js","assets/index-DGdf8eP2.js","assets/index.vue_vue_type_script_setup_true_lang-Y8sQYcwy.js","assets/useMessage-CNq7TVBk.js","assets/PanelBackground.vue_vue_type_script_setup_true_lang-CM6wkI5V.js","assets/index-Pry-PAul.css","assets/index-GnkbPU1i.js","assets/useCompMetaLocalStore-pb1Ikkq3.js","assets/index.vue_vue_type_script_setup_true_lang-SLaqY8P4.js","assets/index-Cy6hrNNt.js","assets/el-table-column-Cx9gMgrN.js","assets/el-table-column-B3ZEEuPD.css","assets/index.vue_vue_type_style_index_0_lang-TY8hdvSG.js","assets/vendor-xterm-DbWxaMay.js","assets/index-Bn5vi5XZ.css","assets/index.vue_vue_type_script_setup_true_lang-C5L_ugEm.js","assets/index.vue_vue_type_script_setup_true_lang-CwhJTB8k.js","assets/useTeamHeaders-DELMIzHt.js","assets/index.vue_vue_type_script_setup_true_lang-DRlqnxVM.js","assets/index-B63tZaB2.css","assets/BaseSegmented.vue_vue_type_script_setup_true_lang-CIcujGT8.js","assets/home-rounded-Dq-TBvLG.js","assets/home-rounded-B4KVwSYb.css","assets/index-CfMcBFhz.js","assets/useKeyword-BMG9y3e4.js","assets/supervised-user-circle-CEgKC7n7.js","assets/supervised-user-circle-CZYpyCV4.css","assets/index-C9r8rR8o.js","assets/index.vue_vue_type_style_index_0_lang-BygWE3Ob.js","assets/useCompEditStore-BaMFNGpl.js","assets/v4-EwEgHOG0.js","assets/useCompEditStore-DdbvUh5w.css","assets/index-CdWXO9ks.css","assets/kid-star-CFLIpXDC.js","assets/kid-star-D1M-aC1C.css","assets/index-DsYCIdsq.js","assets/sync-saved-locally-rounded-CmlRPNS9.js","assets/sync-saved-locally-rounded-wbwASI26.css","assets/index-4acODfuo.js","assets/cloud-upload-CyIQfnxU.js","assets/cloud-upload-j3Y0taC9.css","assets/index-DBDOcdx3.js","assets/index-Bw7t67yK.js","assets/moment-B-YVwB4U.js","assets/index-tWc_GbBW.css","assets/index-Dz7Dj_1u.js","assets/terminal-DykiTSV6.js","assets/terminal-DFt3N_TH.css","assets/index-B37e-H6y.js","assets/settings-B3XnnICj.js","assets/settings-BhagQj3w.css","assets/index-DMAX-M2Q.js","assets/index-FHO37hxp.css","assets/index-x3kqy62K.js","assets/index-DxyEzkir.css","assets/index-CqcYb_O4.js"])))=>i.map(i=>d[i]);
2
+ import{aA as Gi,g as te,v as Ee,aj as ze,ab as b,j as ne,aO as we,r as j,ax as g,w as gr,au as ll,ad as Lt,av as Uu,B as Ri,ao as Qi,aF as Mn,aM as Ae,l as x,ai as Ue,i as _,F as Ie,ah as qe,q as Ge,ap as D,af as K,a7 as it,a9 as xt,Y as Xe,b as Qp,k as ue,aB as hc,ay as mc,aN as Ut,al as $t,X as Ye,ar as Sn,aQ as fi,aR as Qe,W as Xp,aE as R_,aP as st,$ as kt,p as P_,_ as Cn,A as Zn,K as k_,aD as Ta,m as I_,n as M_,aC as vc,c as F_,Z as Pe,Q as xa,S as D_,u as Wn,o as L_,s as j_,h as gc,at as Rt,U as Br,V as Xn,y as cl,a1 as V_,a4 as Oa,aa as Jp,H as Pi,ak as z_,ac as Zp,z as N_,a8 as U_,aK as En,aJ as Xi,T as Aa,aG as $a,t as B_,aI as ul,aH as us}from"./vendor-core-B-Si3WEf.js";import{ac as H_,aw as q_,m as W_,aA as Zr,ax as _c,aa as K_,at as Y_,ab as Bu,ah as G_,ak as Q_,ap as X_,an as J_,aj as Z_,ai as ey,al as ty,aq as ny,am as ry,ar as iy,ao as oy,y as Hu,e as Xr,x as dl,aC as eh,a0 as ay,$ as sy,K as ly,aD as cy,ag as uy,af as jr,z as ki,G as dy,I as fy,Z as py,F as hy,L as fl,B as pl,a1 as my,Y as vy,X as gy,r as _y,R as qu,k as Wu,A as Ku,g as Yu,a3 as Gu,b as Qu,j as Xu,i as Ju,P as Zu,O as ed,N as td,q as nd,h as rd,U as id,a4 as od,a5 as ad,W as sd,Q as ld,l as cd,_ as ud,n as dd,a2 as fd,M as pd,a8 as _o,a9 as ei,a6 as yc,as as Ii,ad as Mi,au as Fi,H as aa,a7 as yy}from"./vendor-ui-CmoKJ_4A.js";(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const a of o.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();const by="local://",wy="main",Sy="container",Cy="item",Ey="/__global_config__",Ty="/node_modules/.prebuild_module",xy="_metadata.json",Oy="/_module_load_prefix_",Ay="/_node_modules_load_prefix_",$y="/_comp_preview_prefix_local_",Ry="/__proxy__",Py="__remote__",ky="__local__",Iy="https://api.comphub.cn:5696",My="http://localhost:7002",Fy="http://localhost:5000",Dy="http://localhost:5001",Ly="Comp Hub",jy="csrfToken",Vy="authorization",zy="x-refresh-token",Ny="x-csrf-token",Uy="accept-language",By="isGuestLogin",Hy="comp-hub-db",qy="file-compiled",Wy="https://oss.comphub.cn",Ky="oss:sts:token",Yy="oss:sts:expire",Gy="comp.json",Qy="README.md",Xy="/.comp_hub_temp",Jy="main.js",Zy="index.vue",th="list_local",nh="list_remote",eb={COMP_LIST_TYPE_LOCAL:th,COMP_LIST_TYPE_REMOTE:nh},rh="config",ih="error",oh="dir",ah="preview",sh="extra",lh="deps",ch="upgradeLog",uh="readme",tb={TAB_TYPE_CONFIG:rh,TAB_TYPE_ERROR:ih,TAB_TYPE_DIR:oh,TAB_TYPE_PREVIEW:ah,TAB_TYPE_EXTRA:sh,TAB_TYPE_DEPS:lh,TAB_TYPE_UPGRADE_LOG:ch,TAB_TYPE_README:uh},dh="mini",fh="full",nb={COMP_EDIT_TAB_TYPE_MINI:dh,COMP_EDIT_TAB_TYPE_FULL:fh},ph="EDIT",hh="ADD",rb={DIALOG_TYPE_EDIT:ph,DIALOG_TYPE_ADD:hh},mh="ONLY_INSTALL",vh="MAJOR_VERSION",gh="MINOR_VERSION",_h="EXACT_VERSION",ib={COMP_MATCH_TYPE_ONLY_INSTALL:mh,COMP_MATCH_TYPE_MAJOR_VERSION:vh,COMP_MATCH_TYPE_MINOR_VERSION:gh,COMP_MATCH_TYPE_EXACT_VERSION:_h},yh="online",bh="offline",ob={COMP_UPDATE_TYPE_ONLINE:yh,COMP_UPDATE_TYPE_OFFLINE:bh},ab=0,sb=1,lb=-1,wh="checkPreviewListForm",Sh="checkExtraInfoForm",Ch="checkCompConfig",Eh="afterCompDel",Th="openCompTerminal",xh="afterCompCancelCollect",Oh="afterCompRenderRetry",Ah="getCompError",$h="checkUpgradeLogForm",cb={COMP_METHOD_KEY_CHECK_PREVIEW_LIST_FORM:wh,COMP_METHOD_KEY_CHECK_EXTRA_INFO_FORM:Sh,COMP_METHOD_KEY_CHECK_COMP_CONFIG:Ch,COMP_METHOD_KEY_AFTER_COMP_DEL:Eh,COMP_METHOD_KEY_OPEN_COMP_TERMINAL:Th,COMP_METHOD_KEY_AFTER_COMP_CANCEL_COLLECT:xh,COMP_METHOD_KEY_AFTER_COMP_RENDER_RETRY:Oh,COMP_METHOD_KEY_GET_COMP_ERROR:Ah,COMP_METHOD_KEY_CHECK_UPGRADE_LOG_FORM:$h},ub={CONTAINER:{SHARE:"share",COLLECT:"collect",LOCAL:"local",MINE:"mine",SIMILAR:"similar",TEAM_ALL:"teamAll",TEAM_MINE:"teamMine",TEAM_GROUP:"teamGroup",TEAM_ADD:"teamAdd"},ITEM:{PREVIEW_REMOTE:"previewRemote",CAROUSEL_REMOTE:"carouselRemote",CAROUSEL_LOCAL:"carouselLocal",EDIT_PANEL:"editPanel"}},db="http://127.0.0.1",fb="http://localhost:8095",pb="http://localhost:8096",hb="http://localhost:5198",mb="/item",vb="/container",gb="CREATE",_b="JOIN",yb="EXIT",bb="teamAddMyComp",wb="teamCompList",Sb="teamCompGroupList",Cb="teamMyCompList",Eb="teamMyCompUpdate",Tb="vue/dist/vue.esm-bundler.js",xb="__v__",Ob="compListStore",Ab="compEditStore",$b="callbacks",Rb="comphubConfig",Pb="local",kb="prod",Ib="local",Mb="prod",Fb="http://localhost:5173/en/",Db="https://docs.comphub.cn/en/",Lb=20,jb=20,yt=Object.freeze(Object.defineProperty({__proto__:null,ACCEPT_LANGUAGE_HEADER_NAME:Uy,AUTHORIZATION_HEADER_NAME:Vy,CACHE_KEY_STS_EXPIRE_TIME:Yy,CACHE_KEY_STS_TOKEN:Ky,COMPHUB_CONFIG_KEY:Rb,COMP_ACTION_ICON_HEIGHT:jb,COMP_ACTION_ICON_WIDTH:Lb,COMP_CONFIG_FILENAME:Gy,COMP_EDIT_TAB_TYPES:nb,COMP_EDIT_TAB_TYPE_FULL:fh,COMP_EDIT_TAB_TYPE_MINI:dh,COMP_ENTRY_FILE:Jy,COMP_HUB_DEV_DOCS_URL:Fb,COMP_HUB_PROD_DOCS_URL:Db,COMP_LIST_TYPES:eb,COMP_LIST_TYPE_LOCAL:th,COMP_LIST_TYPE_REMOTE:nh,COMP_MATCH_TYPES:ib,COMP_MATCH_TYPE_EXACT_VERSION:_h,COMP_MATCH_TYPE_MAJOR_VERSION:vh,COMP_MATCH_TYPE_MINOR_VERSION:gh,COMP_MATCH_TYPE_ONLY_INSTALL:mh,COMP_METHOD_KEY_AFTER_COMP_CANCEL_COLLECT:xh,COMP_METHOD_KEY_AFTER_COMP_DEL:Eh,COMP_METHOD_KEY_AFTER_COMP_RENDER_RETRY:Oh,COMP_METHOD_KEY_CHECK_COMP_CONFIG:Ch,COMP_METHOD_KEY_CHECK_EXTRA_INFO_FORM:Sh,COMP_METHOD_KEY_CHECK_PREVIEW_LIST_FORM:wh,COMP_METHOD_KEY_CHECK_UPGRADE_LOG_FORM:$h,COMP_METHOD_KEY_GET_COMP_ERROR:Ah,COMP_METHOD_KEY_OPEN_COMP_TERMINAL:Th,COMP_PREVIEW_PREFIX_LOCAL:$y,COMP_README_FILENAME:Qy,COMP_SUBMIT_MAX_FILE_COUNT:30,COMP_SUBMIT_MAX_TOTAL_SIZE:10485760,COMP_TEMP_DIR:Xy,COMP_UPDATE_TYPES:ob,COMP_UPDATE_TYPE_OFFLINE:bh,COMP_UPDATE_TYPE_ONLINE:yh,COMP_USE_ENTRY_FILE:Zy,CSRF_KEY:jy,CSRF_TOKEN_HEADER_NAME:Ny,DIALOG_TYPES:rb,DIALOG_TYPE_ADD:hh,DIALOG_TYPE_EDIT:ph,FILE_MANAGER_DIRNAME:by,GLOBAL_CONFIG_PATH:Ey,IFRAME_CONTAINER_WEBSITE_PATH:vb,IFRAME_HOST:db,IFRAME_ITEM_WEBSITE_PATH:mb,IFRAME_ROUTES:ub,INDEX_DB_NAME:Hy,INDEX_DB_TABLE_NAME:qy,IS_GUEST_LOGIN:By,LOCAL_CHILD_IFRAME_URL:fb,LOCAL_LEAF_IFRAME_URL:pb,LOCAL_MIDWAY_ENV_LOCAL:Pb,LOCAL_MIDWAY_ENV_PROD:kb,LOCAL_SERVICE_PREFIX:ky,LOCAL_SERVICE_URL_DEV:Fy,LOCAL_SERVICE_URL_DEV_SUB:Dy,LOCAL_TOP_IFRAME_URL:hb,META_FILE_NAME:xy,MODULE_LOAD_PREFIX:Oy,NODE_MODULES_LOAD_PREFIX:Ay,OSS_CUSTOM_DOMAIN:Wy,PREBUILD_MODULE_DIR:Ty,PROVIDE_KEYS:cb,PROVIDE_KEY_CALLBACKS:$b,PROVIDE_KEY_COMP_EDIT_STORE:Ab,PROVIDE_KEY_COMP_LIST_STORE:Ob,PROXY_PATH_PREFIX:Ry,REFRESH_TOKEN_HEADER_NAME:zy,REMOTE_MIDWAY_ENV_LOCAL:Ib,REMOTE_MIDWAY_ENV_PROD:Mb,REMOTE_SERVICE_PREFIX:Py,REMOTE_SERVICE_URL_DEV:My,REMOTE_SERVICE_URL_PROD:Iy,ROUTE_STATE_KEY_VERSION:xb,SCOPE_ID_TEAM_ADD_MY_COMP:bb,SCOPE_ID_TEAM_COMP_GROUP_LIST:Sb,SCOPE_ID_TEAM_COMP_LIST:wb,SCOPE_ID_TEAM_MY_COMP_LIST:Cb,SCOPE_ID_TEAM_MY_COMP_UPDATE:Eb,SITE_TITLE:Ly,TAB_TYPES:tb,TAB_TYPE_CONFIG:rh,TAB_TYPE_DEPS:lh,TAB_TYPE_DIR:oh,TAB_TYPE_ERROR:ih,TAB_TYPE_EXTRA:sh,TAB_TYPE_PREVIEW:ah,TAB_TYPE_README:uh,TAB_TYPE_UPGRADE_LOG:ch,TEAM_OPERATE_TYPE_CREATE:gb,TEAM_OPERATE_TYPE_EXIT:yb,TEAM_OPERATE_TYPE_JOIN:_b,VERSION_COMPARE_GREATER:sb,VERSION_COMPARE_LESS:lb,VERSION_COMPARE_SAME:ab,VUE_ESM_BUNDLER:Tb,WEBSITE_PATH_CONTAINER:Sy,WEBSITE_PATH_ITEM:Cy,WEBSITE_PATH_MAIN:wy},Symbol.toStringTag,{value:"Module"})),Vb=[{label:"tag.systemRecommended",value:"XTTJ"},{label:"tag.all",value:"QB"},{label:"tag.latest",value:"ZX"},{label:"tag.hottest",value:"ZR"}],zb=[".css"],Nb=[{name:"__id__",label:"comp.fieldId",required:!0,default:""},{name:"name",label:"comp.fieldName",required:!0,default:""},{name:"version",label:"comp.fieldVersion",required:!0,default:"1.0.0"}],cz=Object.freeze(Object.defineProperty({__proto__:null,COMP_DEFAULT_FIELD:Nb,DEFAULT_TAG_GROUP:Vb,PREBUILD_MODULE_SKIP_EXT:zb},Symbol.toStringTag,{value:"Module"})),Ub="comp-hub-locale",Bb=Object.freeze(Object.defineProperty({__proto__:null,LOCALE_KEY:Ub},Symbol.toStringTag,{value:"Module"})),uz=t=>yt.COMP_HUB_PROD_DOCS_URL,Hb=t=>"";var qb={name:"zh-cn",el:{breadcrumb:{label:"面包屑"},colorpicker:{confirm:"确定",clear:"清空",defaultLabel:"颜色选择器",description:"当前颜色 {color},按 Enter 键选择新颜色",alphaLabel:"选择透明度的值",alphaDescription:"透明度 {alpha}, 当前颜色 {color}",hueLabel:"选择色相值",hueDescription:"色相 {hue}, 当前颜色 {color}",svLabel:"选择饱和度与明度的值",svDescription:"饱和度 {saturation}, 明度 {brightness}, 当前颜色 {color}",predefineDescription:"选择 {value} 作为颜色"},datepicker:{now:"此刻",today:"今天",cancel:"取消",clear:"清空",confirm:"确定",dateTablePrompt:"使用方向键与 Enter 键可选择日期",monthTablePrompt:"使用方向键与 Enter 键可选择月份",yearTablePrompt:"使用方向键与 Enter 键可选择年份",selectedDate:"已选日期",selectDate:"选择日期",selectTime:"选择时间",startDate:"开始日期",startTime:"开始时间",endDate:"结束日期",endTime:"结束时间",prevYear:"前一年",nextYear:"后一年",prevMonth:"上个月",nextMonth:"下个月",year:"年",month1:"1 月",month2:"2 月",month3:"3 月",month4:"4 月",month5:"5 月",month6:"6 月",month7:"7 月",month8:"8 月",month9:"9 月",month10:"10 月",month11:"11 月",month12:"12 月",weeks:{sun:"日",mon:"一",tue:"二",wed:"三",thu:"四",fri:"五",sat:"六"},weeksFull:{sun:"星期日",mon:"星期一",tue:"星期二",wed:"星期三",thu:"星期四",fri:"星期五",sat:"星期六"},months:{jan:"一月",feb:"二月",mar:"三月",apr:"四月",may:"五月",jun:"六月",jul:"七月",aug:"八月",sep:"九月",oct:"十月",nov:"十一月",dec:"十二月"}},inputNumber:{decrease:"减少数值",increase:"增加数值"},select:{loading:"加载中",noMatch:"无匹配数据",noData:"无数据",placeholder:"请选择"},mention:{loading:"加载中"},dropdown:{toggleDropdown:"切换下拉选项"},cascader:{noMatch:"无匹配数据",loading:"加载中",placeholder:"请选择",noData:"暂无数据"},pagination:{goto:"前往",pagesize:"条/页",total:"共 {total} 条",pageClassifier:"页",page:"页",prev:"上一页",next:"下一页",currentPage:"第 {pager} 页",prevPages:"向前 {pager} 页",nextPages:"向后 {pager} 页",deprecationWarning:"你使用了一些已被废弃的用法,请参考 el-pagination 的官方文档"},dialog:{close:"关闭此对话框"},drawer:{close:"关闭此对话框"},messagebox:{title:"提示",confirm:"确定",cancel:"取消",error:"输入的数据不合法!",close:"关闭此对话框"},upload:{deleteTip:"按 Delete 键可删除",delete:"删除",preview:"查看图片",continue:"继续上传"},slider:{defaultLabel:"滑块介于 {min} 至 {max}",defaultRangeStartLabel:"选择起始值",defaultRangeEndLabel:"选择结束值"},table:{emptyText:"暂无数据",confirmFilter:"筛选",resetFilter:"重置",clearFilter:"全部",sumText:"合计",selectAllLabel:"选择所有行",selectRowLabel:"选择当前行",expandRowLabel:"展开当前行",collapseRowLabel:"收起当前行",sortLabel:"按 {column} 排序",filterLabel:"按 {column} 过滤"},tag:{close:"关闭此标签"},tour:{next:"下一步",previous:"上一步",finish:"结束导览",close:"关闭此对话框"},tree:{emptyText:"暂无数据"},transfer:{noMatch:"无匹配数据",noData:"无数据",titles:["列表 1","列表 2"],filterPlaceholder:"请输入搜索内容",noCheckedFormat:"共 {total} 项",hasCheckedFormat:"已选 {checked}/{total} 项"},image:{error:"加载失败"},pageHeader:{title:"返回"},popconfirm:{confirmButtonText:"确定",cancelButtonText:"取消"},carousel:{leftArrow:"上一张幻灯片",rightArrow:"下一张幻灯片",indicator:"幻灯片切换至索引 {index}"},inputOTP:{groupLabel:"一次性密码输入框",defaultLabel:"请输入第 {index} 位 OTP 字符"}}};const Wb=()=>{const{locale:t}=Gi(),e={zh:qb,en:H_};return{locale:te(()=>e[t.value])}},Kb=Ee({__name:"App",setup(t){const{locale:e}=Wb();return q_(),(n,r)=>{const i=ze("router-view");return b(),ne(g(W_),{locale:g(e)},{default:we(()=>[j(i)]),_:1},8,["locale"])}}}),Yb="modulepreload",Gb=function(t){return"/main/"+t},hd={},at=function(e,n,r){let i=Promise.resolve();if(n&&n.length>0){let l=function(u){return Promise.all(u.map(c=>Promise.resolve(c).then(d=>({status:"fulfilled",value:d}),d=>({status:"rejected",reason:d}))))};document.getElementsByTagName("link");const a=document.querySelector("meta[property=csp-nonce]"),s=a?.nonce||a?.getAttribute("nonce");i=l(n.map(u=>{if(u=Gb(u),u in hd)return;hd[u]=!0;const c=u.endsWith(".css"),d=c?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${u}"]${d}`))return;const f=document.createElement("link");if(f.rel=c?"stylesheet":Yb,c||(f.as="script"),f.crossOrigin="",f.href=u,s&&f.setAttribute("nonce",s),document.head.appendChild(f),c)return new Promise((m,p)=>{f.addEventListener("load",m),f.addEventListener("error",()=>p(new Error(`Unable to preload CSS for ${u}`)))})}))}function o(a){const s=new Event("vite:preloadError",{cancelable:!0});if(s.payload=a,window.dispatchEvent(s),!s.defaultPrevented)throw a}return i.then(a=>{for(const s of a||[])s.status==="rejected"&&o(s.reason);return e().catch(o)})},ur="authorization",sa=()=>localStorage.getItem(ur),Qb=t=>localStorage.setItem(ur,t),Xb=()=>localStorage.removeItem(ur),Ar="x-refresh-token",Jb=()=>localStorage.getItem(Ar),Zb=t=>localStorage.setItem(Ar,t),e0=()=>localStorage.removeItem(Ar),bc="isGuest",ds=()=>localStorage.getItem(bc),dz=t=>localStorage.setItem(bc,t),t0=()=>localStorage.removeItem(bc),n0="aside_is_collapse",fz="loginType",pz="compUploadFullscreen",hz="terminalCommandHistory",mz="compUploadSidePanelSize",vz="tagSelected",r0="asideSize",i0="headerSize",Rh="tagsViewMaxCache",gz="readUploadAgreement",o0="dependencyMatchRule",_z="teamTabActiveName",yz="settingTabActiveName",bz="compPreviewTabActiveName",Ph="paginationPageSize",a0=()=>localStorage.getItem(Ph),s0=t=>localStorage.setItem(Ph,t),wz="selectedFolderPath",Ji=gr("tagsView",{state:()=>({visitedViews:[],maxCache:Zr(Rh,10),payloadMap:new Map}),actions:{setMaxCache(t){this.$patch(e=>{e.maxCache=t})},addView(t){this.$patch(e=>{const n={...t},r=e.visitedViews.findIndex(o=>o.path===t.path);if(r!==-1){e.visitedViews[r]=n;return}e.visitedViews.unshift(n);const i=e.visitedViews.length-e.maxCache;i>0&&this.spliceVisitedViews(-i,i)})},spliceVisitedViews(t,e){this.$patch(n=>{n.visitedViews.splice(t,e)})},delViewByPath(t){this.$patch(e=>{for(const[n,r]of e.visitedViews.entries())if(r.path===t){e.visitedViews.splice(n,1);break}})},delViewAndJumpToPrev(t,e=!1,n){if(e){const r=this.visitedViews.filter(i=>i.path!==t)?.[0];r?n.push(r.path).then(i=>{i||setTimeout(()=>{this.delViewByPath(t)},250)}):n.push("/").then(i=>{i||this.delViewByPath(t)})}else this.delViewByPath(t)},addPayLoad(t,e){this.$patch(n=>{n.payloadMap.set(t,e)})},getPayLoad(t){return this.payloadMap.get(t)}}}),l0=Ee((t,{slots:e})=>{var n,r;const i=Qi(),{width:o,height:a}=ll(t),s=Lt(_c(i,{width:(n=Uu(o))!==null&&n!==void 0?n:0,height:(r=Uu(a))!==null&&r!==void 0?r:0},{box:t.box,window:t.window}));return()=>{if(e.default)return Ri(t.as||"div",{ref:i},e.default(s))}},{name:"UseElementSize",props:["as","box","height","width","window"]}),c0={ref:"el",class:"relative"},u0={class:"absolute opacity-0 pointer-events-none flex"},d0=["itemKey"],f0=Ee({__name:"AutoWrapRow",props:{list:{},moreWidth:{default:70},gap:{default:5},getKey:{}},setup(t){const e=t,n=K(new Map),r=Mn("el"),i=Mn("items"),{width:o}=_c(r),a=K([]),s=K(!1),l=te(()=>o.value-e.moreWidth),u=te(()=>{const h=a.value.map(v=>v.key);return e.list.filter(v=>h.includes(e.getKey(v)))}),c=te(()=>s.value?e.list.length-a.value.length:0),d=te(()=>{let h=0;for(const v of n.value.values())h+=v;return h});function f(h,v){n.value.set(h,v)}function m(){const h=new Map;for(const v of e.list){const C=e.getKey(v);h.set(C,n.value.get(C)??0)}n.value=h}const p=K_(()=>{let h=0;const v=[];if(!(!i.value||e.list.length===0)){for(const C of e.list){const S=e.getKey(C),w=i.value.find(y=>y.getAttribute("itemKey")===S);if(w){if(h+=w.offsetWidth+e.gap,h>l.value)break;v.push({key:S,value:w.offsetWidth})}}a.value=v,s.value=!0}},100);return Ae([()=>o.value,()=>e.list,()=>d.value],([,,h],[,,v])=>{h!==v&&(s.value=!1),p()},{flush:"post",deep:!0}),Ae(()=>e.list.length,()=>{m()}),(h,v)=>(b(),x("div",c0,[Ue(h.$slots,"display",{visibleList:u.value,overflow:c.value}),_("div",u0,[(b(!0),x(Ie,null,qe(t.list,(C,S)=>(b(),ne(g(l0),{key:t.getKey(C)},{default:we(({width:w})=>[Ge(D(f(t.getKey(C),Number(w)))+" ",1),_("div",{ref_for:!0,ref:"items",itemKey:t.getKey(C),class:"invisible whitespace-nowrap"},[Ue(h.$slots,"measure",{item:C,index:S})],8,d0)]),_:2},1024))),128))])],512))}}),wc=(t,e)=>{const n=t.__vccOpts||t;for(const[r,i]of e)n[r]=i;return n},kh=/^[a-z0-9]+(-[a-z0-9]+)*$/,Ra=(t,e,n,r="")=>{const i=t.split(":");if(t.slice(0,1)==="@"){if(i.length<2||i.length>3)return null;r=i.shift().slice(1)}if(i.length>3||!i.length)return null;if(i.length>1){const s=i.pop(),l=i.pop(),u={provider:i.length>0?i[0]:r,prefix:l,name:s};return e&&!Uo(u)?null:u}const o=i[0],a=o.split("-");if(a.length>1){const s={provider:r,prefix:a.shift(),name:a.join("-")};return e&&!Uo(s)?null:s}if(n&&r===""){const s={provider:r,prefix:"",name:o};return e&&!Uo(s,n)?null:s}return null},Uo=(t,e)=>t?!!((e&&t.prefix===""||t.prefix)&&t.name):!1;function p0(t,e){const n=t.icons,r=t.aliases||Object.create(null),i=Object.create(null);function o(a){if(n[a])return i[a]=[];if(!(a in i)){i[a]=null;const s=r[a]&&r[a].parent,l=s&&o(s);l&&(i[a]=[s].concat(l))}return i[a]}return Object.keys(n).concat(Object.keys(r)).forEach(o),i}const Ih=Object.freeze({left:0,top:0,width:16,height:16}),la=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),Pa=Object.freeze({...Ih,...la}),hl=Object.freeze({...Pa,body:"",hidden:!1});function h0(t,e){const n={};!t.hFlip!=!e.hFlip&&(n.hFlip=!0),!t.vFlip!=!e.vFlip&&(n.vFlip=!0);const r=((t.rotate||0)+(e.rotate||0))%4;return r&&(n.rotate=r),n}function md(t,e){const n=h0(t,e);for(const r in hl)r in la?r in t&&!(r in n)&&(n[r]=la[r]):r in e?n[r]=e[r]:r in t&&(n[r]=t[r]);return n}function m0(t,e,n){const r=t.icons,i=t.aliases||Object.create(null);let o={};function a(s){o=md(r[s]||i[s],o)}return a(e),n.forEach(a),md(t,o)}function Mh(t,e){const n=[];if(typeof t!="object"||typeof t.icons!="object")return n;t.not_found instanceof Array&&t.not_found.forEach(i=>{e(i,null),n.push(i)});const r=p0(t);for(const i in r){const o=r[i];o&&(e(i,m0(t,i,o)),n.push(i))}return n}const v0={provider:"",aliases:{},not_found:{},...Ih};function fs(t,e){for(const n in e)if(n in t&&typeof t[n]!=typeof e[n])return!1;return!0}function Fh(t){if(typeof t!="object"||t===null)return null;const e=t;if(typeof e.prefix!="string"||!t.icons||typeof t.icons!="object"||!fs(t,v0))return null;const n=e.icons;for(const i in n){const o=n[i];if(!i||typeof o.body!="string"||!fs(o,hl))return null}const r=e.aliases||Object.create(null);for(const i in r){const o=r[i],a=o.parent;if(!i||typeof a!="string"||!n[a]&&!r[a]||!fs(o,hl))return null}return e}const vd=Object.create(null);function g0(t,e){return{provider:t,prefix:e,icons:Object.create(null),missing:new Set}}function ti(t,e){const n=vd[t]||(vd[t]=Object.create(null));return n[e]||(n[e]=g0(t,e))}function Dh(t,e){return Fh(e)?Mh(e,(n,r)=>{r?t.icons[n]=r:t.missing.add(n)}):[]}function _0(t,e,n){try{if(typeof n.body=="string")return t.icons[e]={...n},!0}catch{}return!1}let Di=!1;function Lh(t){return typeof t=="boolean"&&(Di=t),Di}function y0(t){const e=typeof t=="string"?Ra(t,!0,Di):t;if(e){const n=ti(e.provider,e.prefix),r=e.name;return n.icons[r]||(n.missing.has(r)?null:void 0)}}function b0(t,e){const n=Ra(t,!0,Di);if(!n)return!1;const r=ti(n.provider,n.prefix);return e?_0(r,n.name,e):(r.missing.add(n.name),!0)}function w0(t,e){if(typeof t!="object")return!1;if(typeof e!="string"&&(e=t.provider||""),Di&&!e&&!t.prefix){let r=!1;return Fh(t)&&(t.prefix="",Mh(t,(i,o)=>{b0(i,o)&&(r=!0)})),r}const n=t.prefix;return Uo({prefix:n,name:"a"})?!!Dh(ti(e,n),t):!1}const jh=Object.freeze({width:null,height:null}),Vh=Object.freeze({...jh,...la}),S0=/(-?[0-9.]*[0-9]+[0-9.]*)/g,C0=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function gd(t,e,n){if(e===1)return t;if(n=n||100,typeof t=="number")return Math.ceil(t*e*n)/n;if(typeof t!="string")return t;const r=t.split(S0);if(r===null||!r.length)return t;const i=[];let o=r.shift(),a=C0.test(o);for(;;){if(a){const s=parseFloat(o);isNaN(s)?i.push(o):i.push(Math.ceil(s*e*n)/n)}else i.push(o);if(o=r.shift(),o===void 0)return i.join("");a=!a}}function E0(t,e="defs"){let n="";const r=t.indexOf("<"+e);for(;r>=0;){const i=t.indexOf(">",r),o=t.indexOf("</"+e);if(i===-1||o===-1)break;const a=t.indexOf(">",o);if(a===-1)break;n+=t.slice(i+1,o).trim(),t=t.slice(0,r).trim()+t.slice(a+1)}return{defs:n,content:t}}function T0(t,e){return t?"<defs>"+t+"</defs>"+e:e}function x0(t,e,n){const r=E0(t);return T0(r.defs,e+r.content+n)}const O0=t=>t==="unset"||t==="undefined"||t==="none";function A0(t,e){const n={...Pa,...t},r={...Vh,...e},i={left:n.left,top:n.top,width:n.width,height:n.height};let o=n.body;[n,r].forEach(h=>{const v=[],C=h.hFlip,S=h.vFlip;let w=h.rotate;C?S?w+=2:(v.push("translate("+(i.width+i.left).toString()+" "+(0-i.top).toString()+")"),v.push("scale(-1 1)"),i.top=i.left=0):S&&(v.push("translate("+(0-i.left).toString()+" "+(i.height+i.top).toString()+")"),v.push("scale(1 -1)"),i.top=i.left=0);let y;switch(w<0&&(w-=Math.floor(w/4)*4),w=w%4,w){case 1:y=i.height/2+i.top,v.unshift("rotate(90 "+y.toString()+" "+y.toString()+")");break;case 2:v.unshift("rotate(180 "+(i.width/2+i.left).toString()+" "+(i.height/2+i.top).toString()+")");break;case 3:y=i.width/2+i.left,v.unshift("rotate(-90 "+y.toString()+" "+y.toString()+")");break}w%2===1&&(i.left!==i.top&&(y=i.left,i.left=i.top,i.top=y),i.width!==i.height&&(y=i.width,i.width=i.height,i.height=y)),v.length&&(o=x0(o,'<g transform="'+v.join(" ")+'">',"</g>"))});const a=r.width,s=r.height,l=i.width,u=i.height;let c,d;a===null?(d=s===null?"1em":s==="auto"?u:s,c=gd(d,l/u)):(c=a==="auto"?l:a,d=s===null?gd(c,u/l):s==="auto"?u:s);const f={},m=(h,v)=>{O0(v)||(f[h]=v.toString())};m("width",c),m("height",d);const p=[i.left,i.top,l,u];return f.viewBox=p.join(" "),{attributes:f,viewBox:p,body:o}}const $0=/\sid="(\S+)"/g,_d=new Map;function R0(t){t=t.replace(/[0-9]+$/,"")||"a";const e=_d.get(t)||0;return _d.set(t,e+1),e?`${t}${e}`:t}function P0(t){const e=[];let n;for(;n=$0.exec(t);)e.push(n[1]);if(!e.length)return t;const r="suffix"+(Math.random()*16777216|Date.now()).toString(16);return e.forEach(i=>{const o=R0(i),a=i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");t=t.replace(new RegExp('([#;"])('+a+')([")]|\\.[a-z])',"g"),"$1"+o+r+"$3")}),t=t.replace(new RegExp(r,"g"),""),t}const ml=Object.create(null);function k0(t,e){ml[t]=e}function vl(t){return ml[t]||ml[""]}function Sc(t){let e;if(typeof t.resources=="string")e=[t.resources];else if(e=t.resources,!(e instanceof Array)||!e.length)return null;return{resources:e,path:t.path||"/",maxURL:t.maxURL||500,rotate:t.rotate||750,timeout:t.timeout||5e3,random:t.random===!0,index:t.index||0,dataAfterTimeout:t.dataAfterTimeout!==!1}}const Cc=Object.create(null),_i=["https://api.simplesvg.com","https://api.unisvg.com"],Bo=[];for(;_i.length>0;)_i.length===1||Math.random()>.5?Bo.push(_i.shift()):Bo.push(_i.pop());Cc[""]=Sc({resources:["https://api.iconify.design"].concat(Bo)});function I0(t,e){const n=Sc(e);return n===null?!1:(Cc[t]=n,!0)}function Ec(t){return Cc[t]}const M0=()=>{let t;try{if(t=fetch,typeof t=="function")return t}catch{}};let yd=M0();function F0(t,e){const n=Ec(t);if(!n)return 0;let r;if(!n.maxURL)r=0;else{let i=0;n.resources.forEach(a=>{i=Math.max(i,a.length)});const o=e+".json?icons=";r=n.maxURL-i-n.path.length-o.length}return r}function D0(t){return t===404}const L0=(t,e,n)=>{const r=[],i=F0(t,e),o="icons";let a={type:o,provider:t,prefix:e,icons:[]},s=0;return n.forEach((l,u)=>{s+=l.length+1,s>=i&&u>0&&(r.push(a),a={type:o,provider:t,prefix:e,icons:[]},s=l.length),a.icons.push(l)}),r.push(a),r};function j0(t){if(typeof t=="string"){const e=Ec(t);if(e)return e.path}return"/"}const V0=(t,e,n)=>{if(!yd){n("abort",424);return}let r=j0(e.provider);switch(e.type){case"icons":{const o=e.prefix,a=e.icons.join(","),s=new URLSearchParams({icons:a});r+=o+".json?"+s.toString();break}case"custom":{const o=e.uri;r+=o.slice(0,1)==="/"?o.slice(1):o;break}default:n("abort",400);return}let i=503;yd(t+r).then(o=>{const a=o.status;if(a!==200){setTimeout(()=>{n(D0(a)?"abort":"next",a)});return}return i=501,o.json()}).then(o=>{if(typeof o!="object"||o===null){setTimeout(()=>{o===404?n("abort",o):n("next",i)});return}setTimeout(()=>{n("success",o)})}).catch(()=>{n("next",i)})},z0={prepare:L0,send:V0};function zh(t,e){t.forEach(n=>{const r=n.loaderCallbacks;r&&(n.loaderCallbacks=r.filter(i=>i.id!==e))})}function N0(t){t.pendingCallbacksFlag||(t.pendingCallbacksFlag=!0,setTimeout(()=>{t.pendingCallbacksFlag=!1;const e=t.loaderCallbacks?t.loaderCallbacks.slice(0):[];if(!e.length)return;let n=!1;const r=t.provider,i=t.prefix;e.forEach(o=>{const a=o.icons,s=a.pending.length;a.pending=a.pending.filter(l=>{if(l.prefix!==i)return!0;const u=l.name;if(t.icons[u])a.loaded.push({provider:r,prefix:i,name:u});else if(t.missing.has(u))a.missing.push({provider:r,prefix:i,name:u});else return n=!0,!0;return!1}),a.pending.length!==s&&(n||zh([t],o.id),o.callback(a.loaded.slice(0),a.missing.slice(0),a.pending.slice(0),o.abort))})}))}let U0=0;function B0(t,e,n){const r=U0++,i=zh.bind(null,n,r);if(!e.pending.length)return i;const o={id:r,icons:e,callback:t,abort:i};return n.forEach(a=>{(a.loaderCallbacks||(a.loaderCallbacks=[])).push(o)}),i}function H0(t){const e={loaded:[],missing:[],pending:[]},n=Object.create(null);t.sort((i,o)=>i.provider!==o.provider?i.provider.localeCompare(o.provider):i.prefix!==o.prefix?i.prefix.localeCompare(o.prefix):i.name.localeCompare(o.name));let r={provider:"",prefix:"",name:""};return t.forEach(i=>{if(r.name===i.name&&r.prefix===i.prefix&&r.provider===i.provider)return;r=i;const o=i.provider,a=i.prefix,s=i.name,l=n[o]||(n[o]=Object.create(null)),u=l[a]||(l[a]=ti(o,a));let c;s in u.icons?c=e.loaded:a===""||u.missing.has(s)?c=e.missing:c=e.pending;const d={provider:o,prefix:a,name:s};c.push(d)}),e}function q0(t,e=!0,n=!1){const r=[];return t.forEach(i=>{const o=typeof i=="string"?Ra(i,e,n):i;o&&r.push(o)}),r}const W0={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function K0(t,e,n,r){const i=t.resources.length,o=t.random?Math.floor(Math.random()*i):t.index;let a;if(t.random){let T=t.resources.slice(0);for(a=[];T.length>1;){const A=Math.floor(Math.random()*T.length);a.push(T[A]),T=T.slice(0,A).concat(T.slice(A+1))}a=a.concat(T)}else a=t.resources.slice(o).concat(t.resources.slice(0,o));const s=Date.now();let l="pending",u=0,c,d=null,f=[],m=[];typeof r=="function"&&m.push(r);function p(){d&&(clearTimeout(d),d=null)}function h(){l==="pending"&&(l="aborted"),p(),f.forEach(T=>{T.status==="pending"&&(T.status="aborted")}),f=[]}function v(T,A){A&&(m=[]),typeof T=="function"&&m.push(T)}function C(){return{startTime:s,payload:e,status:l,queriesSent:u,queriesPending:f.length,subscribe:v,abort:h}}function S(){l="failed",m.forEach(T=>{T(void 0,c)})}function w(){f.forEach(T=>{T.status==="pending"&&(T.status="aborted")}),f=[]}function y(T,A,O){const q=A!=="success";switch(f=f.filter(I=>I!==T),l){case"pending":break;case"failed":if(q||!t.dataAfterTimeout)return;break;default:return}if(A==="abort"){c=O,S();return}if(q){c=O,f.length||(a.length?E():S());return}if(p(),w(),!t.random){const I=t.resources.indexOf(T.resource);I!==-1&&I!==t.index&&(t.index=I)}l="completed",m.forEach(I=>{I(O)})}function E(){if(l!=="pending")return;p();const T=a.shift();if(T===void 0){if(f.length){d=setTimeout(()=>{p(),l==="pending"&&(w(),S())},t.timeout);return}S();return}const A={status:"pending",resource:T,callback:(O,q)=>{y(A,O,q)}};f.push(A),u++,d=setTimeout(E,t.rotate),n(T,e,A.callback)}return setTimeout(E),C}function Nh(t){const e={...W0,...t};let n=[];function r(){n=n.filter(a=>a().status==="pending")}function i(a,s,l){const u=K0(e,a,s,(c,d)=>{r(),l&&l(c,d)});return n.push(u),u}function o(a){return n.find(s=>a(s))||null}return{query:i,find:o,setIndex:a=>{e.index=a},getIndex:()=>e.index,cleanup:r}}function bd(){}const ps=Object.create(null);function Y0(t){if(!ps[t]){const e=Ec(t);if(!e)return;ps[t]={config:e,redundancy:Nh(e)}}return ps[t]}function G0(t,e,n){let r,i;if(typeof t=="string"){const o=vl(t);if(!o)return n(void 0,424),bd;i=o.send;const a=Y0(t);a&&(r=a.redundancy)}else{const o=Sc(t);if(o){r=Nh(o);const a=vl(t.resources?t.resources[0]:"");a&&(i=a.send)}}return!r||!i?(n(void 0,424),bd):r.query(e,i,n)().abort}function wd(){}function Q0(t){t.iconsLoaderFlag||(t.iconsLoaderFlag=!0,setTimeout(()=>{t.iconsLoaderFlag=!1,N0(t)}))}function X0(t){const e=[],n=[];return t.forEach(r=>{(r.match(kh)?e:n).push(r)}),{valid:e,invalid:n}}function yi(t,e,n){function r(){const i=t.pendingIcons;e.forEach(o=>{i&&i.delete(o),t.icons[o]||t.missing.add(o)})}if(n&&typeof n=="object")try{if(!Dh(t,n).length){r();return}}catch(i){console.error(i)}r(),Q0(t)}function Sd(t,e){t instanceof Promise?t.then(n=>{e(n)}).catch(()=>{e(null)}):e(t)}function J0(t,e){t.iconsToLoad?t.iconsToLoad=t.iconsToLoad.concat(e).sort():t.iconsToLoad=e,t.iconsQueueFlag||(t.iconsQueueFlag=!0,setTimeout(()=>{t.iconsQueueFlag=!1;const{provider:n,prefix:r}=t,i=t.iconsToLoad;if(delete t.iconsToLoad,!i||!i.length)return;const o=t.loadIcon;if(t.loadIcons&&(i.length>1||!o)){Sd(t.loadIcons(i,r,n),u=>{yi(t,i,u)});return}if(o){i.forEach(u=>{Sd(o(u,r,n),c=>{yi(t,[u],c?{prefix:r,icons:{[u]:c}}:null)})});return}const{valid:a,invalid:s}=X0(i);if(s.length&&yi(t,s,null),!a.length)return;const l=r.match(kh)?vl(n):null;if(!l){yi(t,a,null);return}l.prepare(n,r,a).forEach(u=>{G0(n,u,c=>{yi(t,u.icons,c)})})}))}const Z0=(t,e)=>{const n=H0(q0(t,!0,Lh()));if(!n.pending.length){let s=!0;return e&&setTimeout(()=>{s&&e(n.loaded,n.missing,n.pending,wd)}),()=>{s=!1}}const r=Object.create(null),i=[];let o,a;return n.pending.forEach(s=>{const{provider:l,prefix:u}=s;if(u===a&&l===o)return;o=l,a=u,i.push(ti(l,u));const c=r[l]||(r[l]=Object.create(null));c[u]||(c[u]=[])}),n.pending.forEach(s=>{const{provider:l,prefix:u,name:c}=s,d=ti(l,u),f=d.pendingIcons||(d.pendingIcons=new Set);f.has(c)||(f.add(c),r[l][u].push(c))}),i.forEach(s=>{const l=r[s.provider][s.prefix];l.length&&J0(s,l)}),e?B0(e,n,i):wd};function ew(t,e){const n={...t};for(const r in e){const i=e[r],o=typeof i;r in jh?(i===null||i&&(o==="string"||o==="number"))&&(n[r]=i):o===typeof n[r]&&(n[r]=r==="rotate"?i%4:i)}return n}const tw=/[\s,]+/;function nw(t,e){e.split(tw).forEach(n=>{switch(n.trim()){case"horizontal":t.hFlip=!0;break;case"vertical":t.vFlip=!0;break}})}function rw(t,e=0){const n=t.replace(/^-?[0-9.]*/,"");function r(i){for(;i<0;)i+=4;return i%4}if(n===""){const i=parseInt(t);return isNaN(i)?0:r(i)}else if(n!==t){let i=0;switch(n){case"%":i=25;break;case"deg":i=90}if(i){let o=parseFloat(t.slice(0,t.length-n.length));return isNaN(o)?0:(o=o/i,o%1===0?r(o):0)}}return e}function iw(t,e){let n=t.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const r in e)n+=" "+r+'="'+e[r]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+n+">"+t+"</svg>"}function ow(t){return t.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function aw(t){return"data:image/svg+xml,"+ow(t)}function sw(t){return'url("'+aw(t)+'")'}const Cd={...Vh,inline:!1},lw={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":!0,role:"img"},cw={display:"inline-block"},gl={backgroundColor:"currentColor"},Uh={backgroundColor:"transparent"},Ed={Image:"var(--svg)",Repeat:"no-repeat",Size:"100% 100%"},Td={webkitMask:gl,mask:gl,background:Uh};for(const t in Td){const e=Td[t];for(const n in Ed)e[t+n]=Ed[n]}const Ho={};["horizontal","vertical"].forEach(t=>{const e=t.slice(0,1)+"Flip";Ho[t+"-flip"]=e,Ho[t.slice(0,1)+"-flip"]=e,Ho[t+"Flip"]=e});function xd(t){return t+(t.match(/^[-0-9.]+$/)?"px":"")}const Od=(t,e)=>{const n=ew(Cd,e),r={...lw},i=e.mode||"svg",o={},a=e.style,s=typeof a=="object"&&!(a instanceof Array)?a:{};for(let h in e){const v=e[h];if(v!==void 0)switch(h){case"icon":case"style":case"onLoad":case"mode":case"ssr":case"customise":break;case"inline":case"hFlip":case"vFlip":n[h]=v===!0||v==="true"||v===1;break;case"flip":typeof v=="string"&&nw(n,v);break;case"color":o.color=v;break;case"rotate":typeof v=="string"?n[h]=rw(v):typeof v=="number"&&(n[h]=v);break;case"ariaHidden":case"aria-hidden":v!==!0&&v!=="true"&&delete r["aria-hidden"];break;default:{const C=Ho[h];C?(v===!0||v==="true"||v===1)&&(n[C]=!0):Cd[h]===void 0&&(r[h]=v)}}}const l=A0(t,n),u=l.attributes;if(n.inline&&(o.verticalAlign="-0.125em"),i==="svg")return r.style={...o,...s},Object.assign(r,u),r.innerHTML=P0(l.body),Ri("svg",r);const{body:c,width:d,height:f}=t,m=i==="mask"||(i==="bg"?!1:c.indexOf("currentColor")!==-1),p=iw(c,{...u,width:d+"",height:f+""});return r.style={...o,"--svg":sw(p),width:xd(u.width),height:xd(u.height),...cw,...m?gl:Uh,...s},Ri("span",r)};Lh(!0);k0("",z0);if(typeof document<"u"&&typeof window<"u"){const t=window;if(t.IconifyPreload!==void 0){const e=t.IconifyPreload,n="Invalid IconifyPreload syntax.";typeof e=="object"&&e!==null&&(e instanceof Array?e:[e]).forEach(r=>{try{(typeof r!="object"||r===null||r instanceof Array||typeof r.icons!="object"||typeof r.prefix!="string"||!w0(r))&&console.error(n)}catch{console.error(n)}})}if(t.IconifyProviders!==void 0){const e=t.IconifyProviders;if(typeof e=="object"&&e!==null)for(let n in e){const r="IconifyProviders["+n+"] is invalid.";try{const i=e[n];if(typeof i!="object"||!i||i.resources===void 0)continue;I0(n,i)||console.error(r)}catch{console.error(r)}}}}const uw={...Pa,body:""},dw=Ee((t,{emit:e})=>{const n=K(null);function r(){n.value&&(n.value.abort?.(),n.value=null)}const i=K(!!t.ssr),o=K(""),a=Qi(null);function s(){const u=t.icon;if(typeof u=="object"&&u!==null&&typeof u.body=="string")return o.value="",{data:u};let c;if(typeof u!="string"||(c=Ra(u,!1,!0))===null)return null;let d=y0(c);if(!d){const p=n.value;return(!p||p.name!==u)&&(d===null?n.value={name:u}:n.value={name:u,abort:Z0([c],l)}),null}r(),o.value!==u&&(o.value=u,Xe(()=>{e("load",u)}));const f=t.customise;if(f){d=Object.assign({},d);const p=f(d.body,c.name,c.prefix,c.provider);typeof p=="string"&&(d.body=p)}const m=["iconify"];return c.prefix!==""&&m.push("iconify--"+c.prefix),c.provider!==""&&m.push("iconify--"+c.provider),{data:d,classes:m}}function l(){const u=s();u?u.data!==a.value?.data&&(a.value=u):a.value=null}return i.value?l():it(()=>{i.value=!0,l()}),Ae(()=>t.icon,l),xt(r),()=>{const u=a.value;if(!u)return Od(uw,t);let c=t;return u.classes&&(c={...t,class:u.classes.join(" ")}),Od({...Pa,...u.data},c)}},{props:["icon","mode","ssr","width","height","style","color","inline","rotate","hFlip","horizontalFlip","vFlip","verticalFlip","flip","id","ariaHidden","customise","title"],emits:["load"]});function fw(t,e,n="_id"){const r=Bu(t,e,n).filter(Boolean),i=Bu(e,t,n).filter(Boolean),o=G_(t,e,(a,s)=>a[n]===s[n]&&!Q_(a,s));return{addedItems:r,deletedItems:i,modifiedItems:o}}const Sz=Object.freeze(Object.defineProperty({__proto__:null,findChangedArrayItems:fw},Symbol.toStringTag,{value:"Module"}));function Tc(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function pw(t,e){if(!e?.trim())return[{text:t,isMatch:!1}];const n=new RegExp(`(${Tc(e)})`,"gi");return t.split(n).map(r=>({text:r,isMatch:n.test(r)&&r.toLowerCase()===e.toLowerCase()}))}function hw(t,e,n="hl"){if(!e?.trim())return t;const r=Tc(e.trim());return t.replace(new RegExp(`(${r})`,"gi"),`<mark class="${n}">$1</mark>`)}function mw(t,e){const n=e?.trim().toLowerCase();return n?t.findIndex(r=>r.toLowerCase().includes(n)):-1}const Bh=t=>t.replace(/[/\\]/g,"/"),vw=(t,e="/")=>t.replace(/[\\/]+/g,e);function gw(){return"#"+Y_(0,16777215).toString(16).padStart(6,"0")}const _w=t=>/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/.test(t),Hh=t=>t.replace(/[-_]([a-z])/g,(e,n)=>n.toUpperCase()).replace(/^[A-Z]/,e=>e.toLowerCase()),_l=t=>{if(Array.isArray(t))return t.map(n=>_l(n));if(t===null||typeof t!="object")return t;const e={};for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)){const r=Hh(n);e[r]=_l(t[n])}return e};function yw(t){return/(^[A-Z][a-z][a-zA-Z0-9]*$)|(^[a-z]+(-[a-z0-9]+)+$)/.test(t.trim())}function bw(t){if(t<=0)throw new Error("长度必须大于0");let e="";for(;e.length<t;){const n=Math.floor(Math.random()*10);e.length===0&&n===0||(e+=n)}return e}function qh(t){if(t==null)return{valid:!1,reason:"validateHash.empty"};if(typeof t!="string")return{valid:!1,reason:"validateHash.notString",reasonParams:{type:typeof t}};const e=t.startsWith("#")?t.slice(1):t;if(e.length===0)return{valid:!1,reason:"validateHash.contentEmpty"};if(/^\d/.test(e))return{valid:!1,reason:"validateHash.startsWithNumber",reasonParams:{char:e[0]}};const n=e.match(/[^\p{L}\p{N}_\-() ]/u);if(n){const r=n[0],i=r.charCodeAt(0);return r==="`"?{valid:!1,reason:"validateHash.invalidCharBacktick"}:r===`
3
+ `?{valid:!1,reason:"validateHash.invalidCharNewline"}:r==="\r"?{valid:!1,reason:"validateHash.invalidCharCarriageReturn"}:r===" "?{valid:!1,reason:"validateHash.invalidCharTab"}:r==="\f"?{valid:!1,reason:"validateHash.invalidCharFormFeed"}:r==="\v"?{valid:!1,reason:"validateHash.invalidCharVerticalTab"}:r==="#"?{valid:!1,reason:"validateHash.invalidCharHash"}:/[<>\\"'&]/.test(r)?{valid:!1,reason:"validateHash.invalidCharHtmlSpecial",reasonParams:{char:r}}:{valid:!1,reason:"validateHash.invalidCharUnknown",reasonParams:{char:r,code:i.toString(16).toUpperCase().padStart(4,"0")}}}return{valid:!0,normalized:e}}function ww(t){return qh(t).valid}const Cz=Object.freeze(Object.defineProperty({__proto__:null,convertKeysToCamelCase:_l,escapeRegExp:Tc,findKeywordLineIndex:mw,generateNumberString:bw,highlightText:hw,isEmail:_w,isValidHash:ww,randomColor:gw,replaceBackslashWithSlash:Bh,replaceSlashWithSpecifiedSeparator:vw,splitTextByKeyword:pw,toCamelCase:Hh,validateCompName:yw,validateHash:qh},Symbol.toStringTag,{value:"Module"}));function Sw(t,e){if(!t||!e.length)throw new Error("组件路径或入口路径为空");const[n]=e.slice(-1);if(!n)throw new Error("入口路径最后一项无效");const r=Bh(n);return`${t.replace(yt.FILE_MANAGER_DIRNAME,"")}${r}`}function Cw(t){const e={};return t.forEach(n=>{n?.parent?e[n?.parent?.name]=n?.parent?.version:e[n.name]=n.version}),Object.entries(e).map(([n,r])=>({name:n,version:r}))}const Ez=Object.freeze(Object.defineProperty({__proto__:null,getPreviewUrl:Sw,handleDepData:Cw},Symbol.toStringTag,{value:"Module"}));function Ew(t){const e={children:[]},n=[e];return t.forEach(({depth:r,tokens:i})=>{if(i[0]){const o=i[0].text,a=i.map(c=>c.text),s=a.join(""),l={title:o,titles:a,href:`#${s}`,children:[]};for(;n.length>r;)n.pop();const u=n[n.length-1];u&&u.children.push(l),n.push(l)}}),e.children}const Tz=Object.freeze(Object.defineProperty({__proto__:null,flatHeadingsToTree:Ew},Symbol.toStringTag,{value:"Module"})),Tw=t=>`Bearer ${t}`,xw=t=>t.replace("Bearer ",""),Tr=Object.freeze(Object.defineProperty({__proto__:null,extractBearerToken:xw,generateBearerToken:Tw},Symbol.toStringTag,{value:"Module"}));function Ow(t,e,n={}){const{idKey:r="id",childrenKey:i="children"}=n,o=Array.isArray(t)?t:[t],a=[];let s=!1;const l=c=>{const d=c[i];Array.isArray(d)&&(a.push(...d),d.forEach(f=>l(f)))},u=c=>{if(s)return!0;for(const d of c){if(d?.[r]===e)return s=!0,l(d),!0;const f=d?.[i];if(Array.isArray(f)&&f.length>0&&u(f))return!0}return!1};return u(o),a}function Wh(t,e){const n=JSON.parse(JSON.stringify(t));return n.children?.length&&(n.children=n.children.map(r=>Wh(r,e))),e(n)}function Aw(t,e,n={}){const{idKey:r="id",childrenKey:i="children"}=n,o=Array.isArray(t)?t:[t],a=l=>{const{[i]:u,...c}=l;return c},s=(l,u)=>{for(const c of l){if(c[r]===e)return[a(c),...u];const d=c[i];if(Array.isArray(d)&&d.length>0){const f=s(d,[a(c),...u]);if(f)return f}}return null};return s(o,[])??[]}function $w(t,e){const{createNode:n,pathSeparator:r="/",skipInvalid:i=!0}=e,o=new Map,a=r,s=n("directory","",a);s.children=[],o.set(a,s);const l=c=>{let d=c.replace(/\\/g,"/");return d=d.replace(/^\.\//,""),d=d.replace(/^\/+|\/+$/g,""),d.replace(/\//g,r)};for(const c of t){const d=l(c.path);if(!d)continue;const f=d.split(r).filter(Boolean);if(f.length===0)continue;let m=a,p="";for(let S=0;S<f.length-1;S++){const w=f[S];if(p=p?`${p}${r}${w}`:w,!o.has(p)){const y=n("directory",w,p);y.children=[],o.set(p,y),o.get(m)?.children?.push(y)}m=p}const h=f[f.length-1];if(!h){if(!i)throw new Error(`无效路径: ${c.path}`);continue}const v=p?`${p}${r}${h}`:h,C=n("file",h,v);o.get(m)?.children?.push(C)}const u=c=>{c.sort((d,f)=>d.type!==f.type?d.type==="directory"?-1:1:d.name.localeCompare(f.name)),c.forEach(d=>d.children?.length&&u(d.children))};return s.children?.length&&u(s.children),s}const xz=Object.freeze(Object.defineProperty({__proto__:null,convertFlatToTree:$w,findTreeNodePathToRoot:Aw,getTreeAllChildren:Ow,mapTree:Wh},Symbol.toStringTag,{value:"Module"}));var Kh=(t=>(t.Added="added",t.Deleted="deleted",t.Unchanged="unchanged",t.Changed="modified",t))(Kh||{}),Yh=(t=>(t.Directory="directory",t.File="file",t))(Yh||{});function Gh(t){return typeof structuredClone=="function"?structuredClone(t):JSON.parse(JSON.stringify(t))}function ca(t,e){for(const n of t)e.set(n.path,n),n.type==="directory"&&n.children?.length&&ca(n.children,e)}function Ad(t){const e=new Map;return ca(t,e),e}function xc(t,e){const n=[];for(const r of t)if(!e.has(r.path)){const i=Gh(r);i.status="deleted",r.type==="directory"&&r.children?.length&&(i.children=xc(r.children,e)),n.push(i)}return n}function Rw(t,e,n){return n?n(t,e):t.hash&&e.hash?t.hash===e.hash:!0}function qo(t,e,n,r){return t.map(i=>{const o=Gh(i),a=e.get(i.path);if(a){if(i.type==="file"){const s=Rw(a,i,r?.contentCompare);o.status=s?"unchanged":"modified"}else o.status="unchanged";if(i.type==="directory"&&i.children&&a.children){const s=Ad(a.children),l=qo(i.children,s,n,r),u=Ad(l),c=xc(a.children,u);o.children=[...l,...c]}else i.type==="directory"&&i.children&&(o.children=qo(i.children,new Map,"added",r))}else o.status=n,i.type==="directory"&&i.children?.length&&(o.children=qo(i.children,new Map,n,r));return o.type==="directory"&&Oc(o),o})}function Oc(t){if(t.type!=="directory"||!t.children?.length)return;for(const n of t.children)n.type==="directory"&&Oc(n);if(t.status==="added"||t.status==="deleted")return;const e=t.children.some(n=>n.status==="added"||n.status==="deleted"||n.status==="modified");t.status=e?"modified":"unchanged"}function Qh(t){const e=[...t].sort((n,r)=>n.type!==r.type?n.type==="directory"?-1:1:n.name.localeCompare(r.name));for(const n of e)n.type==="directory"&&n.children?.length&&(n.children=Qh(n.children));return e}function Pw(t,e,n){const r=new Map,i=new Map;ca(e,r),ca(t,i);const o=qo(t,r,"added",n),a=xc(e,i),s=[...o,...a],l=n?.skipSort?s:Qh(s);for(const u of l)u.type==="directory"&&Oc(u);return l}const Oz=Object.freeze(Object.defineProperty({__proto__:null,NodeStatus:Kh,NodeType:Yh,mergeAndMarkTree:Pw},Symbol.toStringTag,{value:"Module"})),kw=(t,e)=>{const n=Array.isArray(e)?e:[e];let r;return X_(t)?r="string":J_(t)?r="number":Z_(t)?r="boolean":ey(t)?r="array":ty(t)?r="function":ny(t)?r="symbol":ry(t)?r="null":iy(t)?r="undefined":oy(t)?r="object":r="undefined",n.includes(r)},Az=Object.freeze(Object.defineProperty({__proto__:null,isType:kw},Symbol.toStringTag,{value:"Module"})),$d=/^[\^~>=<]+/,Xh=/^(\d+)\.(\d+)\.(\d+)(?:-([a-zA-Z0-9.]+))?(?:\+([a-zA-Z0-9.]+))?$/;function Iw(t){return Xh.test(t)}function Dn(t){if(!t||typeof t!="string")throw new Error(`Invalid version string: ${t}`);const e=t.match($d),n=e?e[0]:"",r=t.replace($d,"").match(Xh);if(!r)throw new Error(`Invalid semver format: ${t}`);const[,i="0",o="0",a="0",s]=r,l=parseInt(i,10),u=parseInt(o,10),c=parseInt(a,10);return{raw:t,prefix:n,major:l,minor:u,patch:c,prerelease:s||null,majorVersion:i,version:`${l}.${u}.${c}`}}function Mw(t,e){const n=Dn(t),r=Dn(e);return n.major===r.major&&n.minor===r.minor&&n.patch===r.patch}function Fw(t){return Dn(t).majorVersion}function Dw(t){const e={};for(const[n,r]of Object.entries(t))try{e[n]=Dn(r)}catch(i){console.warn(`Failed to parse version for ${n}: ${r}`,i)}return e}function Hr(t,e){const n=Dn(t),r=Dn(e),{VERSION_COMPARE_SAME:i,VERSION_COMPARE_LESS:o,VERSION_COMPARE_GREATER:a}=yt;return n.major!==r.major?n.major>r.major?a:o:n.minor!==r.minor?n.minor>r.minor?a:o:n.patch!==r.patch?n.patch>r.patch?a:o:i}function Lw(t,e){const n=Dn(t),r=Dn(e);switch(r.prefix){case"^":return n.major===r.major;case"~":return n.major===r.major&&n.minor===r.minor;case">=":return Hr(t,e.replace(">=",""))>=0;case">":return Hr(t,e.replace(">",""))>0;case"<=":return Hr(t,e.replace("<=",""))<=0;case"<":return Hr(t,e.replace("<",""))<0;case"=":case"":return Hr(t,e.replace("=",""))===0;default:return!1}}function jw(t){if(!t||typeof t!="string")throw new Error("版本号必须是非空字符串");const e=Dn(t),n=(s,l)=>{if(s<0||s>999)throw new Error(`版本号${l}位必须在 0-999 之间,当前值:${s}(原始输入:${t})`);return s},r=n(e.major,"主版本"),i=n(e.minor,"次版本"),o=n(e.patch,"补丁版本"),a=r*1e6+i*1e3+o;if(!Number.isSafeInteger(a))throw new Error(`版本号转换后超出 JavaScript 安全整数范围,结果:${a}(原始输入:${t})`);return a}const $z=Object.freeze(Object.defineProperty({__proto__:null,compareVersions:Hr,getMajorVersion:Fw,isVersionEqual:Mw,parseDependencies:Dw,parseVersion:Dn,satisfiesRange:Lw,validateVersion:Iw,versionToNumber:jw},Symbol.toStringTag,{value:"Module"})),Vw={};function zw(t,e){return b(),ne(Qp,{name:"transition-fade",mode:"out-in",appear:""},{default:we(()=>[Ue(t.$slots,"default")]),_:3})}const Nw=wc(Vw,[["render",zw]]),Uw={key:0,class:"fixed top-0 left-0 w-screen bg-[rgb(94,9,11)] text-white font-sans z-[99999] break-all overflow-auto max-h-[50vh] p-[10px] box-border"},Bw={class:"clear-both"},Hw={class:"whitespace-pre-wrap m-0"},qw={key:0},Ww={class:"whitespace-pre-wrap m-0"},Kw=Ee({__name:"ErrorOverlay",props:{errors:{}},setup(t){const e=K(!1),n=t,r=()=>{e.value=!1};return Ae(()=>n.errors,i=>{e.value=i.length>0},{immediate:!0,deep:!0}),(i,o)=>e.value?(b(),x("div",Uw,[_("button",{class:"sticky top-[10px] right-[10px] float-right bg-white/20 border-none text-white text-lg cursor-pointer w-[30px] h-[30px] rounded-full flex items-center justify-center p-0 ml-[10px] transition-colors duration-200 hover:bg-white/30",onClick:r},"×"),_("div",Bw,[(b(!0),x(Ie,null,qe(t.errors,(a,s)=>(b(),x("div",{key:s,class:"mb-5"},[_("pre",Hw,D(a?.message||a),1),a?.stack?(b(),x("div",qw,[_("pre",Ww,D(a.stack),1)])):ue("",!0)]))),128))])])):ue("",!0)}}),Yw=Ee({__name:"index",props:Xp({config:{}},{modelValue:{type:Object,default:()=>({})},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const{t:e}=Gi(),n=t,r=te(()=>{const c={};return n.config?.column?.forEach(d=>{c[d.prop]=d.value}),c}),i=hc(t,"modelValue"),o=mc();async function a(){o?.onRefresh?.()}async function s(){n.config?.column?.forEach(c=>{c.value=""}),await Xe(),o?.onReset?.()}function l(c){return c??!0}function u(){o?.onSearch?.()}return Ut(()=>{i.value=r.value}),(c,d)=>{const f=ze("Icon");return b(),ne(g(dl),{inline:!0,onSubmit:d[3]||(d[3]=Qe(()=>{},["prevent"])),onKeyup:d[4]||(d[4]=fi(m=>u(),["enter"]))},{default:we(()=>[(b(!0),x(Ie,null,qe(t.config?.column||[],(m,p)=>(b(),ne(g(Hu),{key:p,label:g(m.label)??""},{default:we(()=>[l(m.useVModel)?(b(),ne($t(m.component),Ye({key:1,modelValue:m.value,"onUpdate:modelValue":h=>m.value=h},{ref_for:!0},m?.attributes||{},Sn(m?.events||{})),null,16,["modelValue","onUpdate:modelValue"])):(b(),ne($t(m.component),Ye({key:0,"model-value":m.value},{ref_for:!0},m?.attributes||{},Sn(m?.events||{})),null,16,["model-value"]))]),_:2},1032,["label"]))),128)),t.config?.column?.length?(b(),ne(g(Hu),{key:0},{default:we(()=>[j(g(Xr),{type:"success",onClick:d[0]||(d[0]=m=>u())},{default:we(()=>[Ge(D(g(e)("common.search")),1)]),_:1}),j(g(Xr),{type:"primary",onClick:d[1]||(d[1]=m=>s())},{default:we(()=>[Ge(D(g(e)("common.reset")),1)]),_:1}),j(g(Xr),{onClick:d[2]||(d[2]=m=>a())},{default:we(()=>[j(f,{icon:"material-symbols:refresh-rounded"})]),_:1})]),_:1})):ue("",!0)]),_:1})}}}),Gw={key:0},Qw={ref:"tableContainer",class:"flex-1 overflow-hidden"},Xw={key:1,class:"mt-2"},Jw=Ee({__name:"index",props:{tableConfig:{}},setup(t,{expose:e}){const n=mc(),r=t,i=Mn("tableContainer"),o=Mn("table"),{height:a}=_c(i),s=R_(),l=te(()=>{if(r.tableConfig?.pagination?.getPageSize||r.tableConfig?.pagination?.setPageSize)return{get:r.tableConfig.pagination.getPageSize,set:r.tableConfig.pagination.setPageSize};const M=Zw().paginationStorage;return M?{get:()=>{const k=M.get();return k?Number(k):10},set:k=>M.set(String(k))}:null}),u=K(l.value?.get?.()??10),c=K(!1),d=K(1),f=K(I()),m=K("UNKNOWN"),p=te(()=>Object.keys(s)),h=te(()=>r.tableConfig.size??"default"),v=te(()=>r.tableConfig?.fixedHeight??!0),C=te(()=>v.value?Math.max(a.value,100):"auto"),S=te(()=>r.tableConfig?.autoLoading??!0),w=te(()=>({"--pagination-location":r.tableConfig?.pagination?.location||"center"})),y=te(()=>r.tableConfig?.isPagination??!0),E=te(()=>r.tableConfig?.paginationMap?r.tableConfig.paginationMap:{page:"page",pageSize:"pageSize"}),T=te(()=>({[E.value.page]:d.value,[E.value.pageSize]:u.value})),A=te(()=>({background:!0,pageSizes:[10,20,30,50],layout:"total, sizes, prev, pager, next, jumper",...r.tableConfig?.pagination?.attributes,total:r.tableConfig?.pagination?.total||0,pageSize:u.value,currentPage:d.value})),O=te(()=>({...T.value,...f.value})),q=te(()=>r.tableConfig?.search?.column.filter(M=>M.autoQuery??!0).map(M=>M.prop));function I(){const M={};return r.tableConfig?.search?.column?.forEach(k=>{M[k.prop]=k.value}),M}async function P(){m.value!=="NOT_CHANGE"&&(S.value&&(c.value=!0),r.tableConfig?.fetchData?.(O.value)?.finally(()=>{m.value="NOT_CHANGE",c.value=!1}))}async function z(){await P()}async function F(){m.value="UNKNOWN",await P()}async function Y(){d.value=1,m.value!=="AUTO_QUERY"&&await P()}async function le(M){d.value=1,u.value=M}async function de(M){d.value=M}function Q(){m.value="UNKNOWN",P()}return Ae(()=>JSON.stringify(f.value),(M,k)=>{m.value="UNKNOWN";const X=JSON.parse(M??"{}"),N=JSON.parse(k??"{}"),re=Object.keys(X),ve=Object.keys(N);let oe=[];re.length===ve.length?oe=Object.keys(X).filter(ge=>X[ge]!==N[ge]):oe=cy(re,ve),q.value?.length&&uy(oe,[...q.value]).length&&(m.value="AUTO_QUERY",P())}),Ae(()=>JSON.stringify(T.value),()=>{m.value="UNKNOWN",P()}),Ut(()=>{l.value?.set?.(u.value)}),it(()=>{P()}),e({getTableRef:()=>o.value,forceRefreshData:Q}),(M,k)=>{const X=eh;return st((b(),x("div",{class:"w-full h-full flex flex-col overflow-hidden",style:kt(w.value)},[t.tableConfig.search?(b(),x("div",Gw,[Ue(M.$slots,"search",{},()=>[j(Yw,{modelValue:f.value,"onUpdate:modelValue":k[0]||(k[0]=N=>f.value=N),config:t.tableConfig.search,size:h.value,onSearch:z,onRefresh:F,onReset:Y},null,8,["modelValue","config","size"])],!0)])):ue("",!0),Ue(M.$slots,"tableBefore",{},void 0,!0),_("div",Qw,[Ue(M.$slots,"table",{},()=>[j(g(sy),Ye({ref:"table",size:h.value,data:t.tableConfig.data,height:C.value},g(n)),P_({default:we(()=>[(b(!0),x(Ie,null,qe(t.tableConfig.column,(N,re)=>(b(),x(Ie,null,[N.slot?Ue(M.$slots,N.slot,{key:0,col:N,index:re},void 0,!0):(b(),ne(g(ay),Ye({key:`default-${re}`},{ref_for:!0},N),null,16))],64))),256))]),_:2},[qe(p.value,N=>({name:N,fn:we(re=>[Ue(M.$slots,N,Cn(Zn(re)),void 0,!0)])}))]),1040,["size","data","height"])],!0)],512),y.value?(b(),x("div",Xw,[Ue(M.$slots,"pagination",{},()=>[j(g(ly),Ye({size:h.value},A.value,{onSizeChange:le,onCurrentChange:de},Sn(t.tableConfig?.pagination?.events||{})),null,16,["size"])],!0)])):ue("",!0)],4)),[[X,c.value]])}}}),Rd=wc(Jw,[["__scopeId","data-v-ce25225b"]]);let yl={};const Zw=()=>yl,e1={...Rd,install(t,e){e&&(yl={...yl,...e}),t.component("BaseTable",Rd)}},t1={class:"overflow-hidden size-full"},n1=Ee({__name:"Main",setup(t){const e=Ji(),n=new Map,r=te(()=>e.visitedViews.map(a=>i(a)));function i(a){const{path:s}=a,{[yt.ROUTE_STATE_KEY_VERSION]:l}=a.query;return l?`${s}?${yt.ROUTE_STATE_KEY_VERSION}=${l}`:s}function o(a,s){const l=i(s);if(!n.has(l)){const u=Ee({name:l,setup(){return()=>Ri(a)}});n.set(l,u)}return n.get(l)}return Ae(()=>r.value,(a,s)=>{const l=s.filter(u=>!a.includes(u));l.length&&n.delete(l[0])},{deep:!0}),(a,s)=>{const l=ze("router-view");return b(),x("div",t1,[j(l,null,{default:we(({Component:u,route:c})=>[j(g(Nw),null,{default:we(()=>[(b(),ne(k_,{include:r.value},[(b(),ne($t(o(u,c))))],1032,["include"]))]),_:2},1024)]),_:1})])}}});var hs,Pd;function r1(){if(Pd)return hs;Pd=1;function t(i){if(typeof i!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(i))}function e(i,o){for(var a="",s=0,l=-1,u=0,c,d=0;d<=i.length;++d){if(d<i.length)c=i.charCodeAt(d);else{if(c===47)break;c=47}if(c===47){if(!(l===d-1||u===1))if(l!==d-1&&u===2){if(a.length<2||s!==2||a.charCodeAt(a.length-1)!==46||a.charCodeAt(a.length-2)!==46){if(a.length>2){var f=a.lastIndexOf("/");if(f!==a.length-1){f===-1?(a="",s=0):(a=a.slice(0,f),s=a.length-1-a.lastIndexOf("/")),l=d,u=0;continue}}else if(a.length===2||a.length===1){a="",s=0,l=d,u=0;continue}}o&&(a.length>0?a+="/..":a="..",s=2)}else a.length>0?a+="/"+i.slice(l+1,d):a=i.slice(l+1,d),s=d-l-1;l=d,u=0}else c===46&&u!==-1?++u:u=-1}return a}function n(i,o){var a=o.dir||o.root,s=o.base||(o.name||"")+(o.ext||"");return a?a===o.root?a+s:a+i+s:s}var r={resolve:function(){for(var o="",a=!1,s,l=arguments.length-1;l>=-1&&!a;l--){var u;l>=0?u=arguments[l]:(s===void 0&&(s=process.cwd()),u=s),t(u),u.length!==0&&(o=u+"/"+o,a=u.charCodeAt(0)===47)}return o=e(o,!a),a?o.length>0?"/"+o:"/":o.length>0?o:"."},normalize:function(o){if(t(o),o.length===0)return".";var a=o.charCodeAt(0)===47,s=o.charCodeAt(o.length-1)===47;return o=e(o,!a),o.length===0&&!a&&(o="."),o.length>0&&s&&(o+="/"),a?"/"+o:o},isAbsolute:function(o){return t(o),o.length>0&&o.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var o,a=0;a<arguments.length;++a){var s=arguments[a];t(s),s.length>0&&(o===void 0?o=s:o+="/"+s)}return o===void 0?".":r.normalize(o)},relative:function(o,a){if(t(o),t(a),o===a||(o=r.resolve(o),a=r.resolve(a),o===a))return"";for(var s=1;s<o.length&&o.charCodeAt(s)===47;++s);for(var l=o.length,u=l-s,c=1;c<a.length&&a.charCodeAt(c)===47;++c);for(var d=a.length,f=d-c,m=u<f?u:f,p=-1,h=0;h<=m;++h){if(h===m){if(f>m){if(a.charCodeAt(c+h)===47)return a.slice(c+h+1);if(h===0)return a.slice(c+h)}else u>m&&(o.charCodeAt(s+h)===47?p=h:h===0&&(p=0));break}var v=o.charCodeAt(s+h),C=a.charCodeAt(c+h);if(v!==C)break;v===47&&(p=h)}var S="";for(h=s+p+1;h<=l;++h)(h===l||o.charCodeAt(h)===47)&&(S.length===0?S+="..":S+="/..");return S.length>0?S+a.slice(c+p):(c+=p,a.charCodeAt(c)===47&&++c,a.slice(c))},_makeLong:function(o){return o},dirname:function(o){if(t(o),o.length===0)return".";for(var a=o.charCodeAt(0),s=a===47,l=-1,u=!0,c=o.length-1;c>=1;--c)if(a=o.charCodeAt(c),a===47){if(!u){l=c;break}}else u=!1;return l===-1?s?"/":".":s&&l===1?"//":o.slice(0,l)},basename:function(o,a){if(a!==void 0&&typeof a!="string")throw new TypeError('"ext" argument must be a string');t(o);var s=0,l=-1,u=!0,c;if(a!==void 0&&a.length>0&&a.length<=o.length){if(a.length===o.length&&a===o)return"";var d=a.length-1,f=-1;for(c=o.length-1;c>=0;--c){var m=o.charCodeAt(c);if(m===47){if(!u){s=c+1;break}}else f===-1&&(u=!1,f=c+1),d>=0&&(m===a.charCodeAt(d)?--d===-1&&(l=c):(d=-1,l=f))}return s===l?l=f:l===-1&&(l=o.length),o.slice(s,l)}else{for(c=o.length-1;c>=0;--c)if(o.charCodeAt(c)===47){if(!u){s=c+1;break}}else l===-1&&(u=!1,l=c+1);return l===-1?"":o.slice(s,l)}},extname:function(o){t(o);for(var a=-1,s=0,l=-1,u=!0,c=0,d=o.length-1;d>=0;--d){var f=o.charCodeAt(d);if(f===47){if(!u){s=d+1;break}continue}l===-1&&(u=!1,l=d+1),f===46?a===-1?a=d:c!==1&&(c=1):a!==-1&&(c=-1)}return a===-1||l===-1||c===0||c===1&&a===l-1&&a===s+1?"":o.slice(a,l)},format:function(o){if(o===null||typeof o!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof o);return n("/",o)},parse:function(o){t(o);var a={root:"",dir:"",base:"",ext:"",name:""};if(o.length===0)return a;var s=o.charCodeAt(0),l=s===47,u;l?(a.root="/",u=1):u=0;for(var c=-1,d=0,f=-1,m=!0,p=o.length-1,h=0;p>=u;--p){if(s=o.charCodeAt(p),s===47){if(!m){d=p+1;break}continue}f===-1&&(m=!1,f=p+1),s===46?c===-1?c=p:h!==1&&(h=1):c!==-1&&(h=-1)}return c===-1||f===-1||h===0||h===1&&c===f-1&&c===d+1?f!==-1&&(d===0&&l?a.base=a.name=o.slice(1,f):a.base=a.name=o.slice(d,f)):(d===0&&l?(a.name=o.slice(1,c),a.base=o.slice(1,f)):(a.name=o.slice(d,c),a.base=o.slice(d,f)),a.ext=o.slice(c,f)),d>0?a.dir=o.slice(0,d-1):l&&(a.dir="/"),a},sep:"/",delimiter:":",win32:null,posix:null};return r.posix=r,hs=r,hs}var i1=r1();const o1=jr(i1);function Ac(){const{t}=Gi();return{getTitle:n=>n?n.includes(".")&&!n.startsWith("http")?t(n):n:""}}const a1={class:"truncate"},s1=Ee({__name:"MenuItem",props:{route:{},fullPath:{}},setup(t){const{getTitle:e}=Ac(),n=Ta(),r=t;function i(){n.push({path:r.fullPath})}return(o,a)=>{const s=ki,l=dy;return b(),x("span",{onClick:i},[j(l,{index:t.fullPath},{title:we(()=>[_("span",a1,D(g(e)(t.route.meta?.title)),1)]),default:we(()=>[j(s,null,{default:we(()=>[(b(),ne($t(t.route.meta?.icon)))]),_:1})]),_:1},8,["index"])])}}});function Jh(t,e){return function(){return t.apply(e,arguments)}}const{toString:l1}=Object.prototype,{getPrototypeOf:ka}=Object,{iterator:Ia,toStringTag:Zh}=Symbol,Ma=(t=>e=>{const n=l1.call(e);return t[n]||(t[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Tn=t=>(t=t.toLowerCase(),e=>Ma(e)===t),Fa=t=>e=>typeof e===t,{isArray:pi}=Array,ni=Fa("undefined");function Zi(t){return t!==null&&!ni(t)&&t.constructor!==null&&!ni(t.constructor)&&Kt(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const em=Tn("ArrayBuffer");function c1(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&em(t.buffer),e}const u1=Fa("string"),Kt=Fa("function"),tm=Fa("number"),eo=t=>t!==null&&typeof t=="object",d1=t=>t===!0||t===!1,Wo=t=>{if(Ma(t)!=="object")return!1;const e=ka(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Zh in t)&&!(Ia in t)},f1=t=>{if(!eo(t)||Zi(t))return!1;try{return Object.keys(t).length===0&&Object.getPrototypeOf(t)===Object.prototype}catch{return!1}},p1=Tn("Date"),h1=Tn("File"),m1=t=>!!(t&&typeof t.uri<"u"),v1=t=>t&&typeof t.getParts<"u",g1=Tn("Blob"),_1=Tn("FileList"),y1=t=>eo(t)&&Kt(t.pipe);function b1(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const kd=b1(),Id=typeof kd.FormData<"u"?kd.FormData:void 0,w1=t=>{if(!t)return!1;if(Id&&t instanceof Id)return!0;const e=ka(t);if(!e||e===Object.prototype||!Kt(t.append))return!1;const n=Ma(t);return n==="formdata"||n==="object"&&Kt(t.toString)&&t.toString()==="[object FormData]"},S1=Tn("URLSearchParams"),[C1,E1,T1,x1]=["ReadableStream","Request","Response","Headers"].map(Tn),O1=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function to(t,e,{allOwnKeys:n=!1}={}){if(t===null||typeof t>"u")return;let r,i;if(typeof t!="object"&&(t=[t]),pi(t))for(r=0,i=t.length;r<i;r++)e.call(null,t[r],r,t);else{if(Zi(t))return;const o=n?Object.getOwnPropertyNames(t):Object.keys(t),a=o.length;let s;for(r=0;r<a;r++)s=o[r],e.call(null,t[s],s,t)}}function nm(t,e){if(Zi(t))return null;e=e.toLowerCase();const n=Object.keys(t);let r=n.length,i;for(;r-- >0;)if(i=n[r],e===i.toLowerCase())return i;return null}const xr=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,rm=t=>!ni(t)&&t!==xr;function bl(){const{caseless:t,skipUndefined:e}=rm(this)&&this||{},n={},r=(i,o)=>{if(o==="__proto__"||o==="constructor"||o==="prototype")return;const a=t&&nm(n,o)||o;Wo(n[a])&&Wo(i)?n[a]=bl(n[a],i):Wo(i)?n[a]=bl({},i):pi(i)?n[a]=i.slice():(!e||!ni(i))&&(n[a]=i)};for(let i=0,o=arguments.length;i<o;i++)arguments[i]&&to(arguments[i],r);return n}const A1=(t,e,n,{allOwnKeys:r}={})=>(to(e,(i,o)=>{n&&Kt(i)?Object.defineProperty(t,o,{value:Jh(i,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(t,o,{value:i,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),t),$1=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),R1=(t,e,n,r)=>{t.prototype=Object.create(e.prototype,r),Object.defineProperty(t.prototype,"constructor",{value:t,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(t,"super",{value:e.prototype}),n&&Object.assign(t.prototype,n)},P1=(t,e,n,r)=>{let i,o,a;const s={};if(e=e||{},t==null)return e;do{for(i=Object.getOwnPropertyNames(t),o=i.length;o-- >0;)a=i[o],(!r||r(a,t,e))&&!s[a]&&(e[a]=t[a],s[a]=!0);t=n!==!1&&ka(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},k1=(t,e,n)=>{t=String(t),(n===void 0||n>t.length)&&(n=t.length),n-=e.length;const r=t.indexOf(e,n);return r!==-1&&r===n},I1=t=>{if(!t)return null;if(pi(t))return t;let e=t.length;if(!tm(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},M1=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&ka(Uint8Array)),F1=(t,e)=>{const r=(t&&t[Ia]).call(t);let i;for(;(i=r.next())&&!i.done;){const o=i.value;e.call(t,o[0],o[1])}},D1=(t,e)=>{let n;const r=[];for(;(n=t.exec(e))!==null;)r.push(n);return r},L1=Tn("HTMLFormElement"),j1=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,i){return r.toUpperCase()+i}),Md=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),V1=Tn("RegExp"),im=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),r={};to(n,(i,o)=>{let a;(a=e(i,o,t))!==!1&&(r[o]=a||i)}),Object.defineProperties(t,r)},z1=t=>{im(t,(e,n)=>{if(Kt(t)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=t[n];if(Kt(r)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},N1=(t,e)=>{const n={},r=i=>{i.forEach(o=>{n[o]=!0})};return pi(t)?r(t):r(String(t).split(e)),n},U1=()=>{},B1=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e;function H1(t){return!!(t&&Kt(t.append)&&t[Zh]==="FormData"&&t[Ia])}const q1=t=>{const e=new Array(10),n=(r,i)=>{if(eo(r)){if(e.indexOf(r)>=0)return;if(Zi(r))return r;if(!("toJSON"in r)){e[i]=r;const o=pi(r)?[]:{};return to(r,(a,s)=>{const l=n(a,i+1);!ni(l)&&(o[s]=l)}),e[i]=void 0,o}}return r};return n(t,0)},W1=Tn("AsyncFunction"),K1=t=>t&&(eo(t)||Kt(t))&&Kt(t.then)&&Kt(t.catch),om=((t,e)=>t?setImmediate:e?((n,r)=>(xr.addEventListener("message",({source:i,data:o})=>{i===xr&&o===n&&r.length&&r.shift()()},!1),i=>{r.push(i),xr.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",Kt(xr.postMessage)),Y1=typeof queueMicrotask<"u"?queueMicrotask.bind(xr):typeof process<"u"&&process.nextTick||om,G1=t=>t!=null&&Kt(t[Ia]),G={isArray:pi,isArrayBuffer:em,isBuffer:Zi,isFormData:w1,isArrayBufferView:c1,isString:u1,isNumber:tm,isBoolean:d1,isObject:eo,isPlainObject:Wo,isEmptyObject:f1,isReadableStream:C1,isRequest:E1,isResponse:T1,isHeaders:x1,isUndefined:ni,isDate:p1,isFile:h1,isReactNativeBlob:m1,isReactNative:v1,isBlob:g1,isRegExp:V1,isFunction:Kt,isStream:y1,isURLSearchParams:S1,isTypedArray:M1,isFileList:_1,forEach:to,merge:bl,extend:A1,trim:O1,stripBOM:$1,inherits:R1,toFlatObject:P1,kindOf:Ma,kindOfTest:Tn,endsWith:k1,toArray:I1,forEachEntry:F1,matchAll:D1,isHTMLForm:L1,hasOwnProperty:Md,hasOwnProp:Md,reduceDescriptors:im,freezeMethods:z1,toObjectSet:N1,toCamelCase:j1,noop:U1,toFiniteNumber:B1,findKey:nm,global:xr,isContextDefined:rm,isSpecCompliantForm:H1,toJSONObject:q1,isAsyncFn:W1,isThenable:K1,setImmediate:om,asap:Y1,isIterable:G1};let De=class am extends Error{static from(e,n,r,i,o,a){const s=new am(e.message,n||e.code,r,i,o);return s.cause=e,s.name=e.name,e.status!=null&&s.status==null&&(s.status=e.status),a&&Object.assign(s,a),s}constructor(e,n,r,i,o){super(e),Object.defineProperty(this,"message",{value:e,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,n&&(this.code=n),r&&(this.config=r),i&&(this.request=i),o&&(this.response=o,this.status=o.status)}toJSON(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:G.toJSONObject(this.config),code:this.code,status:this.status}}};De.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";De.ERR_BAD_OPTION="ERR_BAD_OPTION";De.ECONNABORTED="ECONNABORTED";De.ETIMEDOUT="ETIMEDOUT";De.ERR_NETWORK="ERR_NETWORK";De.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";De.ERR_DEPRECATED="ERR_DEPRECATED";De.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";De.ERR_BAD_REQUEST="ERR_BAD_REQUEST";De.ERR_CANCELED="ERR_CANCELED";De.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";De.ERR_INVALID_URL="ERR_INVALID_URL";De.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const Q1=null;function wl(t){return G.isPlainObject(t)||G.isArray(t)}function sm(t){return G.endsWith(t,"[]")?t.slice(0,-2):t}function ms(t,e,n){return t?t.concat(e).map(function(i,o){return i=sm(i),!n&&o?"["+i+"]":i}).join(n?".":""):e}function X1(t){return G.isArray(t)&&!t.some(wl)}const J1=G.toFlatObject(G,{},null,function(e){return/^is[A-Z]/.test(e)});function Da(t,e,n){if(!G.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,n=G.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(v,C){return!G.isUndefined(C[v])});const r=n.metaTokens,i=n.visitor||d,o=n.dots,a=n.indexes,s=n.Blob||typeof Blob<"u"&&Blob,l=n.maxDepth===void 0?100:n.maxDepth,u=s&&G.isSpecCompliantForm(e);if(!G.isFunction(i))throw new TypeError("visitor must be a function");function c(h){if(h===null)return"";if(G.isDate(h))return h.toISOString();if(G.isBoolean(h))return h.toString();if(!u&&G.isBlob(h))throw new De("Blob is not supported. Use a Buffer instead.");return G.isArrayBuffer(h)||G.isTypedArray(h)?u&&typeof Blob=="function"?new Blob([h]):Buffer.from(h):h}function d(h,v,C){let S=h;if(G.isReactNative(e)&&G.isReactNativeBlob(h))return e.append(ms(C,v,o),c(h)),!1;if(h&&!C&&typeof h=="object"){if(G.endsWith(v,"{}"))v=r?v:v.slice(0,-2),h=JSON.stringify(h);else if(G.isArray(h)&&X1(h)||(G.isFileList(h)||G.endsWith(v,"[]"))&&(S=G.toArray(h)))return v=sm(v),S.forEach(function(y,E){!(G.isUndefined(y)||y===null)&&e.append(a===!0?ms([v],E,o):a===null?v:v+"[]",c(y))}),!1}return wl(h)?!0:(e.append(ms(C,v,o),c(h)),!1)}const f=[],m=Object.assign(J1,{defaultVisitor:d,convertValue:c,isVisitable:wl});function p(h,v,C=0){if(!G.isUndefined(h)){if(C>l)throw new De("Object is too deeply nested ("+C+" levels). Max depth: "+l,De.ERR_FORM_DATA_DEPTH_EXCEEDED);if(f.indexOf(h)!==-1)throw Error("Circular reference detected in "+v.join("."));f.push(h),G.forEach(h,function(w,y){(!(G.isUndefined(w)||w===null)&&i.call(e,w,G.isString(y)?y.trim():y,v,m))===!0&&p(w,v?v.concat(y):[y],C+1)}),f.pop()}}if(!G.isObject(t))throw new TypeError("data must be an object");return p(t),e}function Fd(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(t).replace(/[!'()~]|%20/g,function(r){return e[r]})}function $c(t,e){this._pairs=[],t&&Da(t,this,e)}const lm=$c.prototype;lm.append=function(e,n){this._pairs.push([e,n])};lm.toString=function(e){const n=e?function(r){return e.call(this,r,Fd)}:Fd;return this._pairs.map(function(i){return n(i[0])+"="+n(i[1])},"").join("&")};function Z1(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function cm(t,e,n){if(!e)return t;const r=n&&n.encode||Z1,i=G.isFunction(n)?{serialize:n}:n,o=i&&i.serialize;let a;if(o?a=o(e,i):a=G.isURLSearchParams(e)?e.toString():new $c(e,i).toString(r),a){const s=t.indexOf("#");s!==-1&&(t=t.slice(0,s)),t+=(t.indexOf("?")===-1?"?":"&")+a}return t}class Dd{constructor(){this.handlers=[]}use(e,n,r){return this.handlers.push({fulfilled:e,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){G.forEach(this.handlers,function(r){r!==null&&e(r)})}}const Rc={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0},eS=typeof URLSearchParams<"u"?URLSearchParams:$c,tS=typeof FormData<"u"?FormData:null,nS=typeof Blob<"u"?Blob:null,rS={isBrowser:!0,classes:{URLSearchParams:eS,FormData:tS,Blob:nS},protocols:["http","https","file","blob","url","data"]},Pc=typeof window<"u"&&typeof document<"u",Sl=typeof navigator=="object"&&navigator||void 0,iS=Pc&&(!Sl||["ReactNative","NativeScript","NS"].indexOf(Sl.product)<0),oS=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",aS=Pc&&window.location.href||"http://localhost",sS=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Pc,hasStandardBrowserEnv:iS,hasStandardBrowserWebWorkerEnv:oS,navigator:Sl,origin:aS},Symbol.toStringTag,{value:"Module"})),Pt={...sS,...rS};function lS(t,e){return Da(t,new Pt.classes.URLSearchParams,{visitor:function(n,r,i,o){return Pt.isNode&&G.isBuffer(n)?(this.append(r,n.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)},...e})}function cS(t){return G.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function uS(t){const e={},n=Object.keys(t);let r;const i=n.length;let o;for(r=0;r<i;r++)o=n[r],e[o]=t[o];return e}function um(t){function e(n,r,i,o){let a=n[o++];if(a==="__proto__")return!0;const s=Number.isFinite(+a),l=o>=n.length;return a=!a&&G.isArray(i)?i.length:a,l?(G.hasOwnProp(i,a)?i[a]=G.isArray(i[a])?i[a].concat(r):[i[a],r]:i[a]=r,!s):((!i[a]||!G.isObject(i[a]))&&(i[a]=[]),e(n,r,i[a],o)&&G.isArray(i[a])&&(i[a]=uS(i[a])),!s)}if(G.isFormData(t)&&G.isFunction(t.entries)){const n={};return G.forEachEntry(t,(r,i)=>{e(cS(r),i,n,0)}),n}return null}const zr=(t,e)=>t!=null&&G.hasOwnProp(t,e)?t[e]:void 0;function dS(t,e,n){if(G.isString(t))try{return(e||JSON.parse)(t),G.trim(t)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(t)}const no={transitional:Rc,adapter:["xhr","http","fetch"],transformRequest:[function(e,n){const r=n.getContentType()||"",i=r.indexOf("application/json")>-1,o=G.isObject(e);if(o&&G.isHTMLForm(e)&&(e=new FormData(e)),G.isFormData(e))return i?JSON.stringify(um(e)):e;if(G.isArrayBuffer(e)||G.isBuffer(e)||G.isStream(e)||G.isFile(e)||G.isBlob(e)||G.isReadableStream(e))return e;if(G.isArrayBufferView(e))return e.buffer;if(G.isURLSearchParams(e))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let s;if(o){const l=zr(this,"formSerializer");if(r.indexOf("application/x-www-form-urlencoded")>-1)return lS(e,l).toString();if((s=G.isFileList(e))||r.indexOf("multipart/form-data")>-1){const u=zr(this,"env"),c=u&&u.FormData;return Da(s?{"files[]":e}:e,c&&new c,l)}}return o||i?(n.setContentType("application/json",!1),dS(e)):e}],transformResponse:[function(e){const n=zr(this,"transitional")||no.transitional,r=n&&n.forcedJSONParsing,i=zr(this,"responseType"),o=i==="json";if(G.isResponse(e)||G.isReadableStream(e))return e;if(e&&G.isString(e)&&(r&&!i||o)){const s=!(n&&n.silentJSONParsing)&&o;try{return JSON.parse(e,zr(this,"parseReviver"))}catch(l){if(s)throw l.name==="SyntaxError"?De.from(l,De.ERR_BAD_RESPONSE,this,null,zr(this,"response")):l}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Pt.classes.FormData,Blob:Pt.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};G.forEach(["delete","get","head","post","put","patch"],t=>{no.headers[t]={}});const fS=G.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),pS=t=>{const e={};let n,r,i;return t&&t.split(`
4
+ `).forEach(function(a){i=a.indexOf(":"),n=a.substring(0,i).trim().toLowerCase(),r=a.substring(i+1).trim(),!(!n||e[n]&&fS[n])&&(n==="set-cookie"?e[n]?e[n].push(r):e[n]=[r]:e[n]=e[n]?e[n]+", "+r:r)}),e},Ld=Symbol("internals"),hS=/[^\x09\x20-\x7E\x80-\xFF]/g;function mS(t){let e=0,n=t.length;for(;e<n;){const r=t.charCodeAt(e);if(r!==9&&r!==32)break;e+=1}for(;n>e;){const r=t.charCodeAt(n-1);if(r!==9&&r!==32)break;n-=1}return e===0&&n===t.length?t:t.slice(e,n)}function bi(t){return t&&String(t).trim().toLowerCase()}function vS(t){return mS(t.replace(hS,""))}function Ko(t){return t===!1||t==null?t:G.isArray(t)?t.map(Ko):vS(String(t))}function gS(t){const e=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(t);)e[r[1]]=r[2];return e}const _S=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function vs(t,e,n,r,i){if(G.isFunction(r))return r.call(this,e,n);if(i&&(e=n),!!G.isString(e)){if(G.isString(r))return e.indexOf(r)!==-1;if(G.isRegExp(r))return r.test(e)}}function yS(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,n,r)=>n.toUpperCase()+r)}function bS(t,e){const n=G.toCamelCase(" "+e);["get","set","has"].forEach(r=>{Object.defineProperty(t,r+n,{value:function(i,o,a){return this[r].call(this,e,i,o,a)},configurable:!0})})}let Yt=class{constructor(e){e&&this.set(e)}set(e,n,r){const i=this;function o(s,l,u){const c=bi(l);if(!c)throw new Error("header name must be a non-empty string");const d=G.findKey(i,c);(!d||i[d]===void 0||u===!0||u===void 0&&i[d]!==!1)&&(i[d||l]=Ko(s))}const a=(s,l)=>G.forEach(s,(u,c)=>o(u,c,l));if(G.isPlainObject(e)||e instanceof this.constructor)a(e,n);else if(G.isString(e)&&(e=e.trim())&&!_S(e))a(pS(e),n);else if(G.isObject(e)&&G.isIterable(e)){let s={},l,u;for(const c of e){if(!G.isArray(c))throw TypeError("Object iterator must return a key-value pair");s[u=c[0]]=(l=s[u])?G.isArray(l)?[...l,c[1]]:[l,c[1]]:c[1]}a(s,n)}else e!=null&&o(n,e,r);return this}get(e,n){if(e=bi(e),e){const r=G.findKey(this,e);if(r){const i=this[r];if(!n)return i;if(n===!0)return gS(i);if(G.isFunction(n))return n.call(this,i,r);if(G.isRegExp(n))return n.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,n){if(e=bi(e),e){const r=G.findKey(this,e);return!!(r&&this[r]!==void 0&&(!n||vs(this,this[r],r,n)))}return!1}delete(e,n){const r=this;let i=!1;function o(a){if(a=bi(a),a){const s=G.findKey(r,a);s&&(!n||vs(r,r[s],s,n))&&(delete r[s],i=!0)}}return G.isArray(e)?e.forEach(o):o(e),i}clear(e){const n=Object.keys(this);let r=n.length,i=!1;for(;r--;){const o=n[r];(!e||vs(this,this[o],o,e,!0))&&(delete this[o],i=!0)}return i}normalize(e){const n=this,r={};return G.forEach(this,(i,o)=>{const a=G.findKey(r,o);if(a){n[a]=Ko(i),delete n[o];return}const s=e?yS(o):String(o).trim();s!==o&&delete n[o],n[s]=Ko(i),r[s]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const n=Object.create(null);return G.forEach(this,(r,i)=>{r!=null&&r!==!1&&(n[i]=e&&G.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,n])=>e+": "+n).join(`
5
+ `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...n){const r=new this(e);return n.forEach(i=>r.set(i)),r}static accessor(e){const r=(this[Ld]=this[Ld]={accessors:{}}).accessors,i=this.prototype;function o(a){const s=bi(a);r[s]||(bS(i,a),r[s]=!0)}return G.isArray(e)?e.forEach(o):o(e),this}};Yt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);G.reduceDescriptors(Yt.prototype,({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(r){this[n]=r}}});G.freezeMethods(Yt);function gs(t,e){const n=this||no,r=e||n,i=Yt.from(r.headers);let o=r.data;return G.forEach(t,function(s){o=s.call(n,o,i.normalize(),e?e.status:void 0)}),i.normalize(),o}function dm(t){return!!(t&&t.__CANCEL__)}let ro=class extends De{constructor(e,n,r){super(e??"canceled",De.ERR_CANCELED,n,r),this.name="CanceledError",this.__CANCEL__=!0}};function fm(t,e,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?t(n):e(new De("Request failed with status code "+n.status,[De.ERR_BAD_REQUEST,De.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function wS(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function SS(t,e){t=t||10;const n=new Array(t),r=new Array(t);let i=0,o=0,a;return e=e!==void 0?e:1e3,function(l){const u=Date.now(),c=r[o];a||(a=u),n[i]=l,r[i]=u;let d=o,f=0;for(;d!==i;)f+=n[d++],d=d%t;if(i=(i+1)%t,i===o&&(o=(o+1)%t),u-a<e)return;const m=c&&u-c;return m?Math.round(f*1e3/m):void 0}}function CS(t,e){let n=0,r=1e3/e,i,o;const a=(u,c=Date.now())=>{n=c,i=null,o&&(clearTimeout(o),o=null),t(...u)};return[(...u)=>{const c=Date.now(),d=c-n;d>=r?a(u,c):(i=u,o||(o=setTimeout(()=>{o=null,a(i)},r-d)))},()=>i&&a(i)]}const ua=(t,e,n=3)=>{let r=0;const i=SS(50,250);return CS(o=>{const a=o.loaded,s=o.lengthComputable?o.total:void 0,l=s!=null?Math.min(a,s):a,u=Math.max(0,l-r),c=i(u);r=Math.max(r,l);const d={loaded:l,total:s,progress:s?l/s:void 0,bytes:u,rate:c||void 0,estimated:c&&s?(s-l)/c:void 0,event:o,lengthComputable:s!=null,[e?"download":"upload"]:!0};t(d)},n)},jd=(t,e)=>{const n=t!=null;return[r=>e[0]({lengthComputable:n,total:t,loaded:r}),e[1]]},Vd=t=>(...e)=>G.asap(()=>t(...e)),ES=Pt.hasStandardBrowserEnv?((t,e)=>n=>(n=new URL(n,Pt.origin),t.protocol===n.protocol&&t.host===n.host&&(e||t.port===n.port)))(new URL(Pt.origin),Pt.navigator&&/(msie|trident)/i.test(Pt.navigator.userAgent)):()=>!0,TS=Pt.hasStandardBrowserEnv?{write(t,e,n,r,i,o,a){if(typeof document>"u")return;const s=[`${t}=${encodeURIComponent(e)}`];G.isNumber(n)&&s.push(`expires=${new Date(n).toUTCString()}`),G.isString(r)&&s.push(`path=${r}`),G.isString(i)&&s.push(`domain=${i}`),o===!0&&s.push("secure"),G.isString(a)&&s.push(`SameSite=${a}`),document.cookie=s.join("; ")},read(t){if(typeof document>"u")return null;const e=document.cookie.match(new RegExp("(?:^|; )"+t+"=([^;]*)"));return e?decodeURIComponent(e[1]):null},remove(t){this.write(t,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function xS(t){return typeof t!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function OS(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function pm(t,e,n){let r=!xS(e);return t&&(r||n===!1)?OS(t,e):e}const zd=t=>t instanceof Yt?{...t}:t;function Mr(t,e){e=e||{};const n=Object.create(null);Object.defineProperty(n,"hasOwnProperty",{value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function r(u,c,d,f){return G.isPlainObject(u)&&G.isPlainObject(c)?G.merge.call({caseless:f},u,c):G.isPlainObject(c)?G.merge({},c):G.isArray(c)?c.slice():c}function i(u,c,d,f){if(G.isUndefined(c)){if(!G.isUndefined(u))return r(void 0,u,d,f)}else return r(u,c,d,f)}function o(u,c){if(!G.isUndefined(c))return r(void 0,c)}function a(u,c){if(G.isUndefined(c)){if(!G.isUndefined(u))return r(void 0,u)}else return r(void 0,c)}function s(u,c,d){if(G.hasOwnProp(e,d))return r(u,c);if(G.hasOwnProp(t,d))return r(void 0,u)}const l={url:o,method:o,data:o,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,allowedSocketPaths:a,responseEncoding:a,validateStatus:s,headers:(u,c,d)=>i(zd(u),zd(c),d,!0)};return G.forEach(Object.keys({...t,...e}),function(c){if(c==="__proto__"||c==="constructor"||c==="prototype")return;const d=G.hasOwnProp(l,c)?l[c]:i,f=G.hasOwnProp(t,c)?t[c]:void 0,m=G.hasOwnProp(e,c)?e[c]:void 0,p=d(f,m,c);G.isUndefined(p)&&d!==s||(n[c]=p)}),n}const hm=t=>{const e=Mr({},t),n=f=>G.hasOwnProp(e,f)?e[f]:void 0,r=n("data");let i=n("withXSRFToken");const o=n("xsrfHeaderName"),a=n("xsrfCookieName");let s=n("headers");const l=n("auth"),u=n("baseURL"),c=n("allowAbsoluteUrls"),d=n("url");if(e.headers=s=Yt.from(s),e.url=cm(pm(u,d,c),t.params,t.paramsSerializer),l&&s.set("Authorization","Basic "+btoa((l.username||"")+":"+(l.password?unescape(encodeURIComponent(l.password)):""))),G.isFormData(r)){if(Pt.hasStandardBrowserEnv||Pt.hasStandardBrowserWebWorkerEnv)s.setContentType(void 0);else if(G.isFunction(r.getHeaders)){const f=r.getHeaders(),m=["content-type","content-length"];Object.entries(f).forEach(([p,h])=>{m.includes(p.toLowerCase())&&s.set(p,h)})}}if(Pt.hasStandardBrowserEnv&&(G.isFunction(i)&&(i=i(e)),i===!0||i==null&&ES(e.url))){const m=o&&a&&TS.read(a);m&&s.set(o,m)}return e},AS=typeof XMLHttpRequest<"u",$S=AS&&function(t){return new Promise(function(n,r){const i=hm(t);let o=i.data;const a=Yt.from(i.headers).normalize();let{responseType:s,onUploadProgress:l,onDownloadProgress:u}=i,c,d,f,m,p;function h(){m&&m(),p&&p(),i.cancelToken&&i.cancelToken.unsubscribe(c),i.signal&&i.signal.removeEventListener("abort",c)}let v=new XMLHttpRequest;v.open(i.method.toUpperCase(),i.url,!0),v.timeout=i.timeout;function C(){if(!v)return;const w=Yt.from("getAllResponseHeaders"in v&&v.getAllResponseHeaders()),E={data:!s||s==="text"||s==="json"?v.responseText:v.response,status:v.status,statusText:v.statusText,headers:w,config:t,request:v};fm(function(A){n(A),h()},function(A){r(A),h()},E),v=null}"onloadend"in v?v.onloadend=C:v.onreadystatechange=function(){!v||v.readyState!==4||v.status===0&&!(v.responseURL&&v.responseURL.indexOf("file:")===0)||setTimeout(C)},v.onabort=function(){v&&(r(new De("Request aborted",De.ECONNABORTED,t,v)),v=null)},v.onerror=function(y){const E=y&&y.message?y.message:"Network Error",T=new De(E,De.ERR_NETWORK,t,v);T.event=y||null,r(T),v=null},v.ontimeout=function(){let y=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const E=i.transitional||Rc;i.timeoutErrorMessage&&(y=i.timeoutErrorMessage),r(new De(y,E.clarifyTimeoutError?De.ETIMEDOUT:De.ECONNABORTED,t,v)),v=null},o===void 0&&a.setContentType(null),"setRequestHeader"in v&&G.forEach(a.toJSON(),function(y,E){v.setRequestHeader(E,y)}),G.isUndefined(i.withCredentials)||(v.withCredentials=!!i.withCredentials),s&&s!=="json"&&(v.responseType=i.responseType),u&&([f,p]=ua(u,!0),v.addEventListener("progress",f)),l&&v.upload&&([d,m]=ua(l),v.upload.addEventListener("progress",d),v.upload.addEventListener("loadend",m)),(i.cancelToken||i.signal)&&(c=w=>{v&&(r(!w||w.type?new ro(null,t,v):w),v.abort(),v=null)},i.cancelToken&&i.cancelToken.subscribe(c),i.signal&&(i.signal.aborted?c():i.signal.addEventListener("abort",c)));const S=wS(i.url);if(S&&Pt.protocols.indexOf(S)===-1){r(new De("Unsupported protocol "+S+":",De.ERR_BAD_REQUEST,t));return}v.send(o||null)})},RS=(t,e)=>{const{length:n}=t=t?t.filter(Boolean):[];if(e||n){let r=new AbortController,i;const o=function(u){if(!i){i=!0,s();const c=u instanceof Error?u:this.reason;r.abort(c instanceof De?c:new ro(c instanceof Error?c.message:c))}};let a=e&&setTimeout(()=>{a=null,o(new De(`timeout of ${e}ms exceeded`,De.ETIMEDOUT))},e);const s=()=>{t&&(a&&clearTimeout(a),a=null,t.forEach(u=>{u.unsubscribe?u.unsubscribe(o):u.removeEventListener("abort",o)}),t=null)};t.forEach(u=>u.addEventListener("abort",o));const{signal:l}=r;return l.unsubscribe=()=>G.asap(s),l}},PS=function*(t,e){let n=t.byteLength;if(n<e){yield t;return}let r=0,i;for(;r<n;)i=r+e,yield t.slice(r,i),r=i},kS=async function*(t,e){for await(const n of IS(t))yield*PS(n,e)},IS=async function*(t){if(t[Symbol.asyncIterator]){yield*t;return}const e=t.getReader();try{for(;;){const{done:n,value:r}=await e.read();if(n)break;yield r}}finally{await e.cancel()}},Nd=(t,e,n,r)=>{const i=kS(t,e);let o=0,a,s=l=>{a||(a=!0,r&&r(l))};return new ReadableStream({async pull(l){try{const{done:u,value:c}=await i.next();if(u){s(),l.close();return}let d=c.byteLength;if(n){let f=o+=d;n(f)}l.enqueue(new Uint8Array(c))}catch(u){throw s(u),u}},cancel(l){return s(l),i.return()}},{highWaterMark:2})},Ud=64*1024,{isFunction:yo}=G,MS=(({Request:t,Response:e})=>({Request:t,Response:e}))(G.global),{ReadableStream:Bd,TextEncoder:Hd}=G.global,qd=(t,...e)=>{try{return!!t(...e)}catch{return!1}},FS=t=>{t=G.merge.call({skipUndefined:!0},MS,t);const{fetch:e,Request:n,Response:r}=t,i=e?yo(e):typeof fetch=="function",o=yo(n),a=yo(r);if(!i)return!1;const s=i&&yo(Bd),l=i&&(typeof Hd=="function"?(p=>h=>p.encode(h))(new Hd):async p=>new Uint8Array(await new n(p).arrayBuffer())),u=o&&s&&qd(()=>{let p=!1;const h=new n(Pt.origin,{body:new Bd,method:"POST",get duplex(){return p=!0,"half"}}),v=h.headers.has("Content-Type");return h.body!=null&&h.body.cancel(),p&&!v}),c=a&&s&&qd(()=>G.isReadableStream(new r("").body)),d={stream:c&&(p=>p.body)};i&&["text","arrayBuffer","blob","formData","stream"].forEach(p=>{!d[p]&&(d[p]=(h,v)=>{let C=h&&h[p];if(C)return C.call(h);throw new De(`Response type '${p}' is not supported`,De.ERR_NOT_SUPPORT,v)})});const f=async p=>{if(p==null)return 0;if(G.isBlob(p))return p.size;if(G.isSpecCompliantForm(p))return(await new n(Pt.origin,{method:"POST",body:p}).arrayBuffer()).byteLength;if(G.isArrayBufferView(p)||G.isArrayBuffer(p))return p.byteLength;if(G.isURLSearchParams(p)&&(p=p+""),G.isString(p))return(await l(p)).byteLength},m=async(p,h)=>{const v=G.toFiniteNumber(p.getContentLength());return v??f(h)};return async p=>{let{url:h,method:v,data:C,signal:S,cancelToken:w,timeout:y,onDownloadProgress:E,onUploadProgress:T,responseType:A,headers:O,withCredentials:q="same-origin",fetchOptions:I}=hm(p),P=e||fetch;A=A?(A+"").toLowerCase():"text";let z=RS([S,w&&w.toAbortSignal()],y),F=null;const Y=z&&z.unsubscribe&&(()=>{z.unsubscribe()});let le;try{if(T&&u&&v!=="get"&&v!=="head"&&(le=await m(O,C))!==0){let N=new n(h,{method:"POST",body:C,duplex:"half"}),re;if(G.isFormData(C)&&(re=N.headers.get("content-type"))&&O.setContentType(re),N.body){const[ve,oe]=jd(le,ua(Vd(T)));C=Nd(N.body,Ud,ve,oe)}}G.isString(q)||(q=q?"include":"omit");const de=o&&"credentials"in n.prototype;if(G.isFormData(C)){const N=O.getContentType();N&&/^multipart\/form-data/i.test(N)&&!/boundary=/i.test(N)&&O.delete("content-type")}const Q={...I,signal:z,method:v.toUpperCase(),headers:O.normalize().toJSON(),body:C,duplex:"half",credentials:de?q:void 0};F=o&&new n(h,Q);let M=await(o?P(F,I):P(h,Q));const k=c&&(A==="stream"||A==="response");if(c&&(E||k&&Y)){const N={};["status","statusText","headers"].forEach(ge=>{N[ge]=M[ge]});const re=G.toFiniteNumber(M.headers.get("content-length")),[ve,oe]=E&&jd(re,ua(Vd(E),!0))||[];M=new r(Nd(M.body,Ud,ve,()=>{oe&&oe(),Y&&Y()}),N)}A=A||"text";let X=await d[G.findKey(d,A)||"text"](M,p);return!k&&Y&&Y(),await new Promise((N,re)=>{fm(N,re,{data:X,headers:Yt.from(M.headers),status:M.status,statusText:M.statusText,config:p,request:F})})}catch(de){throw Y&&Y(),de&&de.name==="TypeError"&&/Load failed|fetch/i.test(de.message)?Object.assign(new De("Network Error",De.ERR_NETWORK,p,F,de&&de.response),{cause:de.cause||de}):De.from(de,de&&de.code,p,F,de&&de.response)}}},DS=new Map,mm=t=>{let e=t&&t.env||{};const{fetch:n,Request:r,Response:i}=e,o=[r,i,n];let a=o.length,s=a,l,u,c=DS;for(;s--;)l=o[s],u=c.get(l),u===void 0&&c.set(l,u=s?new Map:FS(e)),c=u;return u};mm();const kc={http:Q1,xhr:$S,fetch:{get:mm}};G.forEach(kc,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const Wd=t=>`- ${t}`,LS=t=>G.isFunction(t)||t===null||t===!1;function jS(t,e){t=G.isArray(t)?t:[t];const{length:n}=t;let r,i;const o={};for(let a=0;a<n;a++){r=t[a];let s;if(i=r,!LS(r)&&(i=kc[(s=String(r)).toLowerCase()],i===void 0))throw new De(`Unknown adapter '${s}'`);if(i&&(G.isFunction(i)||(i=i.get(e))))break;o[s||"#"+a]=i}if(!i){const a=Object.entries(o).map(([l,u])=>`adapter ${l} `+(u===!1?"is not supported by the environment":"is not available in the build"));let s=n?a.length>1?`since :
6
+ `+a.map(Wd).join(`
7
+ `):" "+Wd(a[0]):"as no adapter specified";throw new De("There is no suitable adapter to dispatch the request "+s,"ERR_NOT_SUPPORT")}return i}const vm={getAdapter:jS,adapters:kc};function _s(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new ro(null,t)}function Kd(t){return _s(t),t.headers=Yt.from(t.headers),t.data=gs.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),vm.getAdapter(t.adapter||no.adapter,t)(t).then(function(r){return _s(t),r.data=gs.call(t,t.transformResponse,r),r.headers=Yt.from(r.headers),r},function(r){return dm(r)||(_s(t),r&&r.response&&(r.response.data=gs.call(t,t.transformResponse,r.response),r.response.headers=Yt.from(r.response.headers))),Promise.reject(r)})}const gm="1.15.2",La={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{La[t]=function(r){return typeof r===t||"a"+(e<1?"n ":" ")+t}});const Yd={};La.transitional=function(e,n,r){function i(o,a){return"[Axios v"+gm+"] Transitional option '"+o+"'"+a+(r?". "+r:"")}return(o,a,s)=>{if(e===!1)throw new De(i(a," has been removed"+(n?" in "+n:"")),De.ERR_DEPRECATED);return n&&!Yd[a]&&(Yd[a]=!0,console.warn(i(a," has been deprecated since v"+n+" and will be removed in the near future"))),e?e(o,a,s):!0}};La.spelling=function(e){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${e}`),!0)};function VS(t,e,n){if(typeof t!="object")throw new De("options must be an object",De.ERR_BAD_OPTION_VALUE);const r=Object.keys(t);let i=r.length;for(;i-- >0;){const o=r[i],a=Object.prototype.hasOwnProperty.call(e,o)?e[o]:void 0;if(a){const s=t[o],l=s===void 0||a(s,o,t);if(l!==!0)throw new De("option "+o+" must be "+l,De.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new De("Unknown option "+o,De.ERR_BAD_OPTION)}}const Yo={assertOptions:VS,validators:La},sn=Yo.validators;let $r=class{constructor(e){this.defaults=e||{},this.interceptors={request:new Dd,response:new Dd}}async request(e,n){try{return await this._request(e,n)}catch(r){if(r instanceof Error){let i={};Error.captureStackTrace?Error.captureStackTrace(i):i=new Error;const o=(()=>{if(!i.stack)return"";const a=i.stack.indexOf(`
8
+ `);return a===-1?"":i.stack.slice(a+1)})();try{if(!r.stack)r.stack=o;else if(o){const a=o.indexOf(`
9
+ `),s=a===-1?-1:o.indexOf(`
10
+ `,a+1),l=s===-1?"":o.slice(s+1);String(r.stack).endsWith(l)||(r.stack+=`
11
+ `+o)}}catch{}}throw r}}_request(e,n){typeof e=="string"?(n=n||{},n.url=e):n=e||{},n=Mr(this.defaults,n);const{transitional:r,paramsSerializer:i,headers:o}=n;r!==void 0&&Yo.assertOptions(r,{silentJSONParsing:sn.transitional(sn.boolean),forcedJSONParsing:sn.transitional(sn.boolean),clarifyTimeoutError:sn.transitional(sn.boolean),legacyInterceptorReqResOrdering:sn.transitional(sn.boolean)},!1),i!=null&&(G.isFunction(i)?n.paramsSerializer={serialize:i}:Yo.assertOptions(i,{encode:sn.function,serialize:sn.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),Yo.assertOptions(n,{baseUrl:sn.spelling("baseURL"),withXsrfToken:sn.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let a=o&&G.merge(o.common,o[n.method]);o&&G.forEach(["delete","get","head","post","put","patch","common"],p=>{delete o[p]}),n.headers=Yt.concat(a,o);const s=[];let l=!0;this.interceptors.request.forEach(function(h){if(typeof h.runWhen=="function"&&h.runWhen(n)===!1)return;l=l&&h.synchronous;const v=n.transitional||Rc;v&&v.legacyInterceptorReqResOrdering?s.unshift(h.fulfilled,h.rejected):s.push(h.fulfilled,h.rejected)});const u=[];this.interceptors.response.forEach(function(h){u.push(h.fulfilled,h.rejected)});let c,d=0,f;if(!l){const p=[Kd.bind(this),void 0];for(p.unshift(...s),p.push(...u),f=p.length,c=Promise.resolve(n);d<f;)c=c.then(p[d++],p[d++]);return c}f=s.length;let m=n;for(;d<f;){const p=s[d++],h=s[d++];try{m=p(m)}catch(v){h.call(this,v);break}}try{c=Kd.call(this,m)}catch(p){return Promise.reject(p)}for(d=0,f=u.length;d<f;)c=c.then(u[d++],u[d++]);return c}getUri(e){e=Mr(this.defaults,e);const n=pm(e.baseURL,e.url,e.allowAbsoluteUrls);return cm(n,e.params,e.paramsSerializer)}};G.forEach(["delete","get","head","options"],function(e){$r.prototype[e]=function(n,r){return this.request(Mr(r||{},{method:e,url:n,data:(r||{}).data}))}});G.forEach(["post","put","patch"],function(e){function n(r){return function(o,a,s){return this.request(Mr(s||{},{method:e,headers:r?{"Content-Type":"multipart/form-data"}:{},url:o,data:a}))}}$r.prototype[e]=n(),$r.prototype[e+"Form"]=n(!0)});let zS=class _m{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(o){n=o});const r=this;this.promise.then(i=>{if(!r._listeners)return;let o=r._listeners.length;for(;o-- >0;)r._listeners[o](i);r._listeners=null}),this.promise.then=i=>{let o;const a=new Promise(s=>{r.subscribe(s),o=s}).then(i);return a.cancel=function(){r.unsubscribe(o)},a},e(function(o,a,s){r.reason||(r.reason=new ro(o,a,s),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const n=this._listeners.indexOf(e);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const e=new AbortController,n=r=>{e.abort(r)};return this.subscribe(n),e.signal.unsubscribe=()=>this.unsubscribe(n),e.signal}static source(){let e;return{token:new _m(function(i){e=i}),cancel:e}}};function NS(t){return function(n){return t.apply(null,n)}}function US(t){return G.isObject(t)&&t.isAxiosError===!0}const Cl={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Cl).forEach(([t,e])=>{Cl[e]=t});function ym(t){const e=new $r(t),n=Jh($r.prototype.request,e);return G.extend(n,$r.prototype,e,{allOwnKeys:!0}),G.extend(n,e,null,{allOwnKeys:!0}),n.create=function(i){return ym(Mr(t,i))},n}const vt=ym(no);vt.Axios=$r;vt.CanceledError=ro;vt.CancelToken=zS;vt.isCancel=dm;vt.VERSION=gm;vt.toFormData=Da;vt.AxiosError=De;vt.Cancel=vt.CanceledError;vt.all=function(e){return Promise.all(e)};vt.spread=NS;vt.isAxiosError=US;vt.mergeConfig=Mr;vt.AxiosHeaders=Yt;vt.formToJSON=t=>um(G.isHTMLForm(t)?new FormData(t):t);vt.getAdapter=vm.getAdapter;vt.HttpStatusCode=Cl;vt.default=vt;const{Axios:Iz,AxiosError:Mz,CanceledError:Fz,isCancel:Dz,CancelToken:Lz,VERSION:jz,all:Vz,Cancel:zz,isAxiosError:Nz,spread:Uz,toFormData:Bz,AxiosHeaders:Hz,HttpStatusCode:Gd,formToJSON:qz,getAdapter:Wz,mergeConfig:Kz}=vt,bm=new Map,BS={baseURL:"",timeout:1e4};function wm(t,e){const n=vt.create({...BS,...e});return bm.set(t,n),n}function HS(t="default"){const e=bm.get(t);if(!e)throw new Error(`Instance "${t}" not initialized. Call initInstance() first.`);return e}async function Se(t,e){const n=t.split("/")[0],r=HS(n);return t=t.replace(n,""),r.request({url:t,...e})}async function qS(t,e){return Se("__local__/api/v1/comp/check",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function WS(t,e){return Se("__local__/api/v1/comp/checkCompRepeat",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function KS(t,e){return Se("__local__/api/v1/comp/compFileHash",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function YS(t,e){return Se("__local__/api/v1/comp/compFilesOssSignedUrl",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function GS(t,e){return Se("__local__/api/v1/comp/dep",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function QS(t,e){return Se("__local__/api/v1/comp/dir",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function XS(t,e){return Se("__local__/api/v1/comp/download",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function JS(t,e){return Se("__local__/api/v1/comp/file",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function ZS(t,e){return Se("__local__/api/v1/comp/generateCompJson",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function eC(t,e){return Se("__local__/api/v1/comp/localCompDetailByPathHash",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function tC(t,e){return Se("__local__/api/v1/comp/localComps",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function nC(t,e){return Se("__local__/api/v1/comp/localCompsByIds",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function rC(t,e){return Se("__local__/api/v1/comp/openCompPathInVscode",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function iC(t){return Se("__local__/api/v1/comp/packageJson",{method:"POST",...t||{}})}async function oC(t,e){return Se("__local__/api/v1/comp/submit",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function aC(t,e){return Se("__local__/api/v1/comp/update",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function sC(t,e){return Se("__local__/api/v1/comp/updateVersion",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}const lC=Object.freeze(Object.defineProperty({__proto__:null,compcontrollerCheck:qS,compcontrollerCheckcomprepeat:WS,compcontrollerCompfilehash:KS,compcontrollerCompfilesosssignedurl:YS,compcontrollerDep:GS,compcontrollerDir:QS,compcontrollerDownload:XS,compcontrollerFile:JS,compcontrollerGeneratecompjson:ZS,compcontrollerLocalcompdetailbypathhash:eC,compcontrollerLocalcomps:tC,compcontrollerLocalcompsbyids:nC,compcontrollerOpencomppathinvscode:rC,compcontrollerPackagejson:iC,compcontrollerSubmit:oC,compcontrollerUpdate:aC,compcontrollerUpdateversion:sC},Symbol.toStringTag,{value:"Module"}));async function cC(t){return Se("__local__/api/v1/module/clearPreBuild",{method:"POST",...t||{}})}async function uC(t,e){return Se("__local__/api/v1/module/preBuild",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function dC(t){return Se("__local__/api/v1/module/preBuildSize",{method:"POST",...t||{}})}const fC=Object.freeze(Object.defineProperty({__proto__:null,modulecontrollerClearprebuild:cC,modulecontrollerPrebuild:uC,modulecontrollerPrebuildsize:dC},Symbol.toStringTag,{value:"Module"}));async function pC(t,e){return Se("__local__/api/v1/oss/fileSignUrl",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}const hC=Object.freeze(Object.defineProperty({__proto__:null,osscontrollerFilesignurl:pC},Symbol.toStringTag,{value:"Module"}));async function mC(t,e){return Se("__local__/api/v1/preprocessing/preprocess",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}const vC=Object.freeze(Object.defineProperty({__proto__:null,preprocessingcontrollerPreprocess:mC},Symbol.toStringTag,{value:"Module"}));async function gC(t,e){return Se("__local__/api/v1/vuefinder/list",{method:"GET",params:{...t},...e||{}})}const _C=Object.freeze(Object.defineProperty({__proto__:null,vuefindercontrollerList:gC},Symbol.toStringTag,{value:"Module"})),yC={v1Comp:lC,v1Module:fC,v1Oss:hC,v1Preprocessing:vC,v1Vuefinder:_C};async function bC(t,e){return Se("__remote__/api/v1/comp/checkCompExistByHash",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function wC(t,e){return Se("__remote__/api/v1/comp/checkCompExistById",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function SC(t,e){return Se("__remote__/api/v1/comp/checkVersion",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function CC(t,e){return Se("__remote__/api/v1/comp/collect",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function EC(t,e){return Se("__remote__/api/v1/comp/collectedComps",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function TC(t,e){return Se("__remote__/api/v1/comp/compDetail",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function xC(t,e){return Se("__remote__/api/v1/comp/compHash",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function OC(t,e){return Se("__remote__/api/v1/comp/comps",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function AC(t,e){return Se("__remote__/api/v1/comp/compsByIds",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function $C(t,e){return Se("__remote__/api/v1/comp/deleteFailedComp",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function RC(t,e){return Se("__remote__/api/v1/comp/deleteMyComp",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function PC(t,e){return Se("__remote__/api/v1/comp/existCompsByIds",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function kC(t,e){return Se("__remote__/api/v1/comp/myComps",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function IC(t,e){return Se("__remote__/api/v1/comp/similarComps",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function MC(t,e){return Se("__remote__/api/v1/comp/softDelete",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function FC(t,e){return Se("__remote__/api/v1/comp/update",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function DC(t,e){return Se("__remote__/api/v1/comp/updateBasicInfo",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function LC(t,e){return Se("__remote__/api/v1/comp/updateCompDownloadCount",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function jC(t,e){return Se("__remote__/api/v1/comp/updateObjectId",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function VC(t,e){return Se("__remote__/api/v1/comp/upgradeRecords",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function zC(t,e){return Se("__remote__/api/v1/comp/upload",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function NC(t,e){return Se("__remote__/api/v1/comp/versions",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}const UC=Object.freeze(Object.defineProperty({__proto__:null,compcontrollerCheckcompexistbyhash:bC,compcontrollerCheckcompexistbyid:wC,compcontrollerCheckversion:SC,compcontrollerCollect:CC,compcontrollerCollectedcomps:EC,compcontrollerCompdetail:TC,compcontrollerComphash:xC,compcontrollerComps:OC,compcontrollerCompsbyids:AC,compcontrollerDeletefailedcomp:$C,compcontrollerDeletemycomp:RC,compcontrollerExistcompsbyids:PC,compcontrollerMycomps:kC,compcontrollerSimilarcomps:IC,compcontrollerSoftdelete:MC,compcontrollerUpdate:FC,compcontrollerUpdatebasicinfo:DC,compcontrollerUpdatecompdownloadcount:LC,compcontrollerUpdateobjectid:jC,compcontrollerUpgraderecords:VC,compcontrollerUpload:zC,compcontrollerVersions:NC},Symbol.toStringTag,{value:"Module"}));async function BC(t){return Se("__remote__/api/v1/csrf/csrf",{method:"GET",...t||{}})}const HC=Object.freeze(Object.defineProperty({__proto__:null,csrfcontrollerGetcsrftoken:BC},Symbol.toStringTag,{value:"Module"}));async function qC(t,e){return Se("__remote__/api/v1/email/sendCode",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}const WC=Object.freeze(Object.defineProperty({__proto__:null,emailcontrollerSendcode:qC},Symbol.toStringTag,{value:"Module"}));async function KC(t,e){return Se("__remote__/api/v1/keyword/queryKeywordsComp",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}const YC=Object.freeze(Object.defineProperty({__proto__:null,keywordcontrollerQuerykeywordscomp:KC},Symbol.toStringTag,{value:"Module"}));async function GC(t){return Se("__remote__/api/v1/oss/compOssDir",{method:"POST",...t||{}})}async function QC(t){return Se("__remote__/api/v1/oss/getSts",{method:"POST",...t||{}})}async function XC(t,e){return Se("__remote__/api/v1/oss/putPolicy",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}const JC=Object.freeze(Object.defineProperty({__proto__:null,osscontrollerCompossdir:GC,osscontrollerGetsts:QC,osscontrollerPutpolicy:XC},Symbol.toStringTag,{value:"Module"}));async function ZC(t,e){return Se("__remote__/api/v1/team/addToTeamMyComps",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function eE(t){return Se("__remote__/api/v1/team/allMember",{method:"POST",...t||{}})}async function tE(t,e){return Se("__remote__/api/v1/team/applyList",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function nE(t,e){return Se("__remote__/api/v1/team/checkCompUpdatePermission",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function rE(t,e){return Se("__remote__/api/v1/team/copyComp",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function iE(t,e){return Se("__remote__/api/v1/team/create",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function oE(t){return Se("__remote__/api/v1/team/created",{method:"POST",...t||{}})}async function aE(t,e){return Se("__remote__/api/v1/team/delete",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function sE(t){return Se("__remote__/api/v1/team/detail",{method:"POST",...t||{}})}async function lE(t){return Se("__remote__/api/v1/team/exit",{method:"POST",...t||{}})}async function cE(t,e){return Se("__remote__/api/v1/team/findByCode",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function uE(t,e){return Se("__remote__/api/v1/team/handleApply",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function dE(t,e){return Se("__remote__/api/v1/team/join",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function fE(t){return Se("__remote__/api/v1/team/joined",{method:"POST",...t||{}})}async function pE(t,e){return Se("__remote__/api/v1/team/kickOut",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function hE(t,e){return Se("__remote__/api/v1/team/member",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function mE(t,e){return Se("__remote__/api/v1/team/myTeamComps",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function vE(t,e){return Se("__remote__/api/v1/team/removeComp",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function gE(t,e){return Se("__remote__/api/v1/team/removeMyTeamComp",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function _E(t,e){return Se("__remote__/api/v1/team/teamComps",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function yE(t,e){return Se("__remote__/api/v1/team/update",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function bE(t,e){return Se("__remote__/api/v1/team/updateCompCanUpdateUsers",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function wE(t,e){return Se("__remote__/api/v1/team/updateMenu",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function SE(t,e){return Se("__remote__/api/v1/team/updateTeamUserNickname",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}const CE=Object.freeze(Object.defineProperty({__proto__:null,teamcontrollerAddtoteammycomps:ZC,teamcontrollerAllmember:eE,teamcontrollerApplylist:tE,teamcontrollerCheckcompupdatepermission:nE,teamcontrollerCopycomp:rE,teamcontrollerCreate:iE,teamcontrollerCreated:oE,teamcontrollerDelete:aE,teamcontrollerDetail:sE,teamcontrollerExit:lE,teamcontrollerFindbycode:cE,teamcontrollerHandleapply:uE,teamcontrollerJoin:dE,teamcontrollerJoined:fE,teamcontrollerKickout:pE,teamcontrollerMember:hE,teamcontrollerMyteamcomps:mE,teamcontrollerRemovecompfromteam:vE,teamcontrollerRemovemyteamcomp:gE,teamcontrollerTeamcomps:_E,teamcontrollerUpdate:yE,teamcontrollerUpdatecompcanupdateusers:bE,teamcontrollerUpdatemenu:wE,teamcontrollerUpdateteamusernickname:SE},Symbol.toStringTag,{value:"Module"}));async function EE(t){return Se("__remote__/api/v1/token/approachExpire",{method:"POST",...t||{}})}async function TE(t){return Se("__remote__/api/v1/token/refresh",{method:"POST",...t||{}})}const xE=Object.freeze(Object.defineProperty({__proto__:null,tokencontrollerApproachexpire:EE,tokencontrollerRefresh:TE},Symbol.toStringTag,{value:"Module"}));async function OE(t,e){return Se("__remote__/api/v1/upgrade/check",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function AE(t){return Se("__remote__/api/v1/upgrade/logs",{method:"POST",...t||{}})}async function $E(t,e){return Se("__remote__/api/v1/upgrade/publish",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}const RE=Object.freeze(Object.defineProperty({__proto__:null,upgradecontrollerCheck:OE,upgradecontrollerLogs:AE,upgradecontrollerPublish:$E},Symbol.toStringTag,{value:"Module"}));async function PE(t,e){return Se("__remote__/api/v1/user/changeAvatar",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function kE(t,e){return Se("__remote__/api/v1/user/changeNickname",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function IE(t,e){return Se("__remote__/api/v1/user/changePassword",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function ME(t){return Se("__remote__/api/v1/user/checkPassword",{method:"POST",...t||{}})}async function FE(t,e){return Se("__remote__/api/v1/user/login",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function DE(t,e){return Se("__remote__/api/v1/user/setAllowEmailLogin",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function LE(t,e){return Se("__remote__/api/v1/user/updateEmail",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}async function jE(t){return Se("__remote__/api/v1/user/userInfo",{method:"POST",...t||{}})}async function VE(t){return Se("__remote__/api/v1/user/whoAmI",{method:"POST",...t||{}})}const zE=Object.freeze(Object.defineProperty({__proto__:null,usercontrollerChangeavatar:PE,usercontrollerChangenickname:kE,usercontrollerChangepassword:IE,usercontrollerCheckpassword:ME,usercontrollerLogin:FE,usercontrollerSetallowemaillogin:DE,usercontrollerUpdateemail:LE,usercontrollerUserinfo:jE,usercontrollerWhoami:VE},Symbol.toStringTag,{value:"Module"}));async function NE(t,e){return Se("__remote__/api/v2/upgrade/check",{method:"POST",headers:{"Content-Type":"application/json"},data:t,...e||{}})}const UE=Object.freeze(Object.defineProperty({__proto__:null,upgradecontrollerv2Check:NE},Symbol.toStringTag,{value:"Module"})),Rr={v1Comp:UC,v1Csrf:HC,v1Email:WC,v1Keyword:YC,v1Oss:JC,v1Team:CE,v1Token:xE,v1Upgrade:RE,v1User:zE,v2Upgrade:UE},BE=gr("personalStore",{state:()=>({userInfo:{},isPasswordSet:!1}),getters:{isAllowEmailLogin(t){return t.userInfo?.isAllowEmailLogin??!1}},actions:{setUserInfo(t){this.$patch(e=>{e.userInfo=t})},setIsPasswordSet(t){this.$patch(e=>{e.isPasswordSet=t})},async initUserInfo(){const t=await Rr.v1User.usercontrollerUserinfo();t.code===0&&this.setUserInfo(t.data)},async setEmail(t){this.$patch(e=>{e.userInfo.email=t})},async setNickname(t){this.$patch(e=>{e.userInfo.nickname=t})},async setAllowEmailLogin(t){await Rr.v1User.usercontrollerSetallowemaillogin({allow:t}).then(()=>{this.$patch(e=>{e.userInfo.isAllowEmailLogin=t})})}}}),HE=gr("moduleStore",{state:()=>({modules:{}}),actions:{setModules(t,e){this.$patch(n=>{n.modules[t]=e})},async loadModule(t){if(this.modules[t])return this.modules[t];const e=await import(t);return this.setModules(t,e),e}}}),bo=Zr(n0,!0),Ic=gr("appStore",{state:()=>({}),getters:{collapse(){return bo.value}},actions:{toggleSideBar(){bo.value=!bo.value},setSideBarCollapse(t){t!==this.collapse&&(bo.value=t)}}}),qE=gr("team",{state:()=>({joinedTeams:[],createdTeams:[]}),actions:{setJoinedTeams(t){this.$patch(e=>{e.joinedTeams=t})},setCreatedTeams(t){this.$patch(e=>{e.createdTeams=t})},removeCreatedTeam(t){this.$patch(e=>{e.createdTeams=e.createdTeams.filter(n=>n._id!==t)})},addCreatedTeam(t){this.$patch(e=>{e.createdTeams.some(r=>r._id===t._id)||e.createdTeams.push(t)})},addJoinedTeam(t){this.$patch(e=>{e.joinedTeams.some(r=>r._id===t._id)||e.joinedTeams.push(t)})},removeJoinedTeam(t){this.$patch(e=>{e.joinedTeams=e.joinedTeams.filter(n=>n._id!==t)})},updateCreatedTeamItemById(t,e){this.$patch(n=>{const r=n.createdTeams.findIndex(i=>i._id===t);r!==-1&&(n.createdTeams[r]=e)})},getTeamDetail(t){return this.joinedTeams.find(n=>n._id===t)||this.createdTeams.find(n=>n._id===t)}}});function wo(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)r!=="__proto__"&&(t[r]=n[r])}return t}var WE={read:function(t){return t[0]==='"'&&(t=t.slice(1,-1)),t.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(t){return encodeURIComponent(t).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function El(t,e){function n(i,o,a){if(!(typeof document>"u")){a=wo({},e,a),typeof a.expires=="number"&&(a.expires=new Date(Date.now()+a.expires*864e5)),a.expires&&(a.expires=a.expires.toUTCString()),i=encodeURIComponent(i).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var s="";for(var l in a)a[l]&&(s+="; "+l,a[l]!==!0&&(s+="="+a[l].split(";")[0]));return document.cookie=i+"="+t.write(o,i)+s}}function r(i){if(!(typeof document>"u"||arguments.length&&!i)){for(var o=document.cookie?document.cookie.split("; "):[],a={},s=0;s<o.length;s++){var l=o[s].split("="),u=l.slice(1).join("=");try{var c=decodeURIComponent(l[0]);if(c in a||(a[c]=t.read(u,c)),i===c)break}catch{}}return i?a[i]:a}}return Object.create({set:n,get:r,remove:function(i,o){n(i,"",wo({},o,{expires:-1}))},withAttributes:function(i){return El(this.converter,wo({},this.attributes,i))},withConverter:function(i){return El(wo({},this.converter,i),this.attributes)}},{attributes:{value:Object.freeze(e)},converter:{value:Object.freeze(t)}})}var Sm=El(WE,{path:"/"});const KE={keyword:"关键词",confirm:"确定",cancel:"取消",close:"关闭",save:"保存",submit:"提交",delete:"删除",edit:"编辑",add:"添加",update:"更新",upload:"上传",download:"下载",refresh:"刷新",loading:"加载中",success:"成功",error:"错误",warning:"警告",info:"提示",copy:"复制",copied:"已复制",copySuccess:"复制成功",copyFailed:"复制失败",open:"打开",search:"搜索",reset:"重置",clear:"清空",back:"返回",next:"下一步",prev:"上一步",finish:"完成",operation:"操作",status:"状态",yes:"是",no:"否",name:"名称",description:"描述",version:"版本",time:"时间",date:"日期",author:"作者",type:"类型",category:"分类",tag:"标签",content:"内容",setting:"设置",cache:"缓存",cacheSize:"已使用",clearCache:"清空缓存",clearCacheConfirm:"将清空浏览器单文件编译结果以及模块预编译文件,确认清空缓存吗?",cacheCleared:"缓存已清空",newPage:"新页面打开",terminal:"终端",preview:"预览",doc:"文档",readme:"README.md",upgradeRecord:"更新记录",openInNewPage:"新页面打开",depInstall:"依赖安装",fullscreen:"全屏",exitFullscreen:"退出全屏",maximizeRestore:"最大化/还原",siteSlogan:"原子化组件社区,让组件流通更简单。",siteSubtitle:"Vue 组件共享平台",docsTutorial:"文档教程",empty:"暂无数据",noReadme:"组件没有配置README.md文件",dragSort:"拖拽排序",filter:"筛选",apply:"应用",person:"人",unit:"个",pleaseSelect:"请选择",pleaseInput:"请输入",me:"我",generate:"生成",regenerate:"重新生成",generateSuccess:"生成成功",moreOperations:"更多操作",more:"更多",maxTagCount:"最大标签数量"},YE={keywordPlaceholder:"请输入组件名称/描述",title:"组件",name:"组件名称",fieldId:"组件ID",fieldName:"组件名称",fieldVersion:"版本号",desc:"组件描述",remarksDesc:"备注说明",remarksDescRequired:"请输入备注说明",pleaseInputCompName:"请输入组件名称",pleaseInputRemarks:"请输入备注,有助于组件市场检索",compNameRequired:"组件名称不能为空",compNameNamingRule:"组件名只能是「大驼峰(PascalCase)」或「短横线(kebab-case)」命名法",lengthBetween:"长度在 {min} 到 {max} 个字符",version:"组件版本",detail:"组件详情",preview:"组件预览",previewConfig:"预览配置",previewList:"预览列表",uploadPreview:"组件上传预览",updatePreview:"组件更新预览",download:"下载组件",update:"更新组件",upload:"上传组件",submit:"提交组件",edit:"编辑组件",add:"添加组件",delete:"删除组件",local:"本地组件",remote:"远程组件",online:"在线组件",similar:"相似组件",similarTeam:"团队内相似组件",dir:"组件目录",file:"组件文件",entry:"入口文件",previewEntry:"预览入口地址",previewEntryFull:"预览入口地址(全屏窗口)",addPreviewEntry:"添加预览入口",maxPreviewEntry:"最多添加{n}个预览入口",pleaseAddPreviewEntry:"请添加预览入口",miniPreviewFile:"小窗预览文件",fullPreviewFile:"全屏预览文件",pleaseSelectPreviewFile:"请选择预览文件",remarkDesc:"备注说明",dep:"组件依赖",localDep:"组件依赖(本地)",onlineDep:"组件依赖(线上)",finalDep:"最终依赖",localVersion:"本地:",onlineVersion:"线上:",onlineDepEmpty:"线上依赖暂无数据!",versionConsistent:"版本一致",versionChange:"版本变化,请手动选择最终版本",versionChangeConfirmed:"已确认",newDep:"新增依赖",miniPanel:"小窗面板",fullPanel:"全屏面板",reload:"重新加载",uploadProtocol:"组件发布协议",bgPanel:"背景板",compLocation:"组件位置",pleaseSelectFolderFirst:"请先选择文件夹",compAlreadyUploaded:"组件已经上传,更新操作请前往我的组件或团队组件",affirmDep:"组件依赖(确认的版本)",checkConfig:"配置检查",checkError:"报错信息",extraInfo:"附加信息",baseInfo:"基础信息",upgradeLog:"更新说明",pleaseInputUpgradeLog:"请填写更新说明",config:"组件配置",configStatus:"组件配置检查状态",configError:"配置异常",configCheckError:"配置检查报错",needUpgrade:"需要升级",fileChanged:"组件文件有变化",versionChanged:"版本号变化",fileNoChange:"文件没有变化",markdownValid:"Markdown预览校验通过",noMarkdown:"没有md文件",hash:"文件哈希",localHash:"本地组件文件hash",remoteHash:"线上组件文件hash",remoteVersion:"线上组件版本号",remoteVersionPrefix:"线上:",localVersionPrefix:"本地:",versionCompare:"版本号比较结果",carouselIndex:"组件预览走马灯index",bgColor:"组件背景颜色",dialogType:"组件弹窗类型",repeat:"组件重复检查",existLocal:"组件在本地存在",scopeId:"作用域id",tempDir:"组件临时目录",submitLimit:"组件提交限制",maxSize:"总大小限制",maxCount:"文件数量限制",matchType:"匹配类型",updateType:"更新类型",updateOnline:"在线更新",updateOffline:"离线更新",compOfflineUpdate:"组件离线更新",compOnlineUpdate:"组件在线更新",folder:"文件夹",compNotInLocal:"组件不在本地,继续更新只能更新组件描述,预览配置等基础信息,是否继续?",selectUpdateFolder:"请选择要更新的文件夹",openInVscode:"在 VS Code 中打开",openingInEditor:"在编辑器中打开...",updateSuccess:"更新成功",downloadVersionConfirm:"当前选择的版本为:{version},确认下载吗?",downloading:"组件下载中...",downloadPathConfirm:"是否下载组件到【{path}】路径下",downloadCoverConfirm:"组件【{name}】已经下载或者有同名组件,是否覆盖?",uncollectConfirm:"是否取消收藏组件【{name}】,取消收藏后组件将不再显示在收藏列表中,是否继续?",deleteConfirm:"是否删除组件【{name}】,删除组件后会释放占用的组件名称,是否继续?",collect:"收藏",uncollect:"取消收藏",collected:"已收藏",uncollected:"未收藏",entryFile:"入口文件",configFile:"配置文件",fileChangedNeedVersion:"文件内容改变,请增加版本号",viewFileChanges:"查看文件变化",versionChangedButFileSame:"版本号改变,但文件内容未改变,请还原版本号",errorMsg:"错误信息",versionCannotBeLessThanLatest:"版本号不能小于最新版本{version}",uploadAnyway:"仍然上传",compileError:"组件编译失败",formatCode:"格式化代码:",formatCodeTooltip:"仅格式化对比时的文件,不会格式化原始文件",noChanges:"暂无变更",diff:{changed:"M 改变",unchanged:"U 未改变",added:"A 新增",deleted:"D 删除"}},GE={title:"团队",name:"团队名称",code:"团队码",desc:"团队描述",create:"创建团队",join:"加入团队",exit:"退出团队",exitConfirm:"退出确认",manage:"团队管理",setting:"团队设置",member:"团队成员",memberCount:"成员数",maxMember:"最大成员数",compCount:"组件数量",maxCompCount:"最大组件数量",creator:"创建者",downloadCount:"下载量",collectCount:"收藏量",createTime:"创建时间",myTeam:"我的团队",joinedTeam:"已加入团队",space:"团队空间",noJoined:"暂无加入的团队",noCreated:"暂无创建的团队",createCountLimit:"最大允许创建的团队数量",joinCountLimit:"允许最多加入的团队数量",compList:"团队组件列表",myCompList:"我的组件",compGroup:"团队组件分组",compGroupList:"团队组件分组列表",addMyComp:"团队添加我的组件",compUpdate:"团队我的组件更新",addFromMine:"去我的组件添加",applyList:"申请列表",nickname:"团队昵称",noTeamInfo:"暂无团队信息",compLib:"组件库",groupConfig:"分组配置",compManage:"组件管理",unsavedDataLeave:"分组配置数据未保存,确定要离开吗?",leave:"离开",disbandTeam:"解散团队",applyAudit:"申请审核",teamName:"团队名称",fillTeamCode:"填写团队码",pleaseInputTeamCode:"请输入团队码",teamIdNotExist:"团队ID不存在",joinSuccess:"加入团队成功",applyJoinTeam:"申请加入团队",showRepeatComp:"展示重复组件",allowAuthorDelete:"作者删除组件权限",teamIntro:"团队介绍",fillTeamName:"填写团队名称",pleaseInputTeamName:"请输入团队名称",pleaseInputTeamDesc:"请输入团队介绍",createSuccess:"创建团队成功",charLength:"长度在 {min} 到 {max} 个字符",disbandConfirm:"确定解散团队吗,解散后所有成员和组件将被移除,并且无法恢复?",deleteConfirm:"删除确认",inputAuthCode:"请输入验证码",disbandSuccess:"解散团队成功",reject:"拒绝",agree:"同意",approved:"已同意",rejected:"已拒绝",kickOut:"踢出",teamUserNickname:"团队内昵称",pleaseInputTeamNickname:"请输入你在团队的昵称",normalUser:"普通用户",kickOutConfirm:"确定踢出用户【{name}】吗?",kickOutSuccess:"踢出成功",selectCanUpdateUser:"选择可更新用户",authorAutoAuth:"作者自带授权",updateAuth:"更新授权",updateTime:"更新时间",expandAll:"展开全部",createGroup:"创建分组",unsaved:"未保存",pleaseInputGroupName:"请输入分组名称",addComp:"添加组件",added:"已添加",notAdded:"未添加",defaultGroup:"默认分组",deleteGroupConfirm:"确认删除该分组吗?删除后该分组下的所有组件将被移除分组",addSuccess:"添加成功",isGrouped:"是否分组",grouped:"已分组",ungrouped:"未分组",group:"分组",prevVersion:"升级前版本",newVersion:"升级后版本",upgradeDesc:"升级描述",similarCompInTeam:"团队内相似组件",similarComp:"相似组件",deleteCompConfirm:"是否删除团队组件【{name}】,删除组件后团队成员将无法使用该组件,是否继续?",descTitle:"为业务团队打造专属组件空间",descItem1:"创建私密团队,组件仅对成员可见,保护核心资产",descItem2:"每个账号最多可创建 {count} 个团队",descItem3:"每个账号最多可加入 {count} 个团队",descItem4:"基础版团队支持最多 {count} 名成员",descItem5:"基础版团队可管理最多 {count} 个组件",descItem6:"支持创建分组菜单,灵活组织团队组件"},QE={title:"用户",username:"用户名",account:"账号",password:"密码",newPassword:"新密码",confirmPassword:"确认密码",confirmNewPassword:"确认新密码",pleaseInputNewPassword:"请输入新密码",pleaseConfirmNewPassword:"请确认新密码",passwordModified:"密码修改成功",email:"邮箱",oldEmail:"旧邮箱",newEmail:"新邮箱",phone:"手机号",avatar:"头像",nickname:"昵称",login:"登录",logout:"退出登录",register:"注册",forgotPassword:"忘记密码",resetPassword:"重置密码",changePassword:"修改密码",changeNickname:"修改昵称",pleaseInputNickname:"请输入昵称",changeAvatar:"修改头像",avatarModified:"头像修改成功",changeEmail:"修改邮箱",basicInfo:"基本信息",securitySettings:"安全设置",loginPassword:"登录密码",passwordTip:"建议定期更换密码,确保账号安全",setPassword:"设置密码",emailLogin:"邮箱登录",emailLoginTip:"允许使用邮箱作为登录账号",pleaseSetPasswordFirst:"请先设置登录密码",emailLoginEnabled:"邮箱登录已开启",emailLoginDisabled:"邮箱登录已关闭",registerTime:"注册时间",notBound:"未绑定",change:"更换",bind:"绑定",authCode:"验证码",oldAuthCode:"旧验证码",newAuthCode:"新验证码",sendAuthCode:"发送验证码",resendAuthCode:"重新发送",getAuthCode:"获取验证码",pleaseInputAuthCode:"请输入验证码",pleaseInputNewAuthCode:"请输入新验证码",resendAfterSeconds:"{n}秒后重新获取",accountLogin:"账号登录",pleaseInputAccount:"请输入账号",pleaseInputUsername:"请输入用户名",pleaseInputPassword:"请输入密码",pleaseInputEmail:"请输入邮箱",pleaseInputOldEmail:"请输入旧邮箱",pleaseInputNewEmail:"请输入新邮箱",pleaseInputCorrectEmail:"请输入正确的邮箱",emailModified:"邮箱修改成功",newAuthCodeSent:"新验证码已发送",authCodeSent:"验证码已发送",guestLogin:"游客访问",loginSuccess:"登录成功",userInfo:"用户信息",personalCenter:"个人中心",myComp:"我的组件",guest:"游客",notLoggedIn:"未登录",goLogin:"去登录"},XE={title:"文件",name:"文件名",path:"文件路径",size:"文件大小",type:"文件类型",dir:"文件夹",selectDir:"选择文件夹",upload:"文件上传",download:"文件下载",select:"选择",multiSelect:"不支持多选",onlyDir:"只能选择文件夹",rootDir:"根目录",projectPath:"项目路径",currentDir:"当前目录",parentDir:"上级目录",refreshDir:"刷新文件夹列表"},JE={success:{download:"下载成功",update:"更新成功",delete:"删除成功",collect:"收藏成功",uncollect:"取消收藏成功",save:"保存成功",submit:"提交成功",upload:"上传成功",copy:"复制成功",operation:"操作成功",sendAuthCode:"验证码已发送",exitTeam:"退出成功"},error:{download:"下载失败",update:"更新失败",delete:"删除失败",collect:"收藏失败",uncollect:"取消收藏失败",save:"保存失败",submit:"提交失败",upload:"上传失败",copy:"复制失败",operation:"操作失败",load:"加载失败",network:"网络错误",timeout:"请求超时",unknown:"未知错误",pleaseFixCompileError:"请先处理编译错误",loginExpired:"登录已过期,请重新登录",refreshFailed:"刷新失败",requestFailed:"请求失败,请联系管理员",storageNotSupported:"浏览器不支持 storage.estimate API"},noUpdatePermission:"当前组件您没有更新权限,请联系管理员获取权限",confirm:{delete:"确定删除吗?",submit:"确定提交吗?",update:"确定更新吗?",exit:"确定退出吗?",cancel:"确定取消吗?"},loginRequired:"请先登录",fileExceed:"最多只能选择 {limit} 个文件,本次已选择 {selected} 个,共将上传 {total} 个文件",validate:{required:"必填项",format:"格式不正确",min:"不能小于最小值",max:"不能超过最大值",length:"长度不正确",email:"邮箱格式不正确",phone:"手机号格式不正确",imageFormat:"上传文件只能是图片格式",pleaseSelectFile:"请先选择文件",fileMaxSize:"上传文件大小不能超过 {size}MB!"}},ZE={404:"页面不存在",share:"组件市场",collect:"收藏组件",collectSimple:"收藏",mine:"我的组件",mineSimple:"我的",local:"本地组件",localSimple:"本地",team:"团队",upload:"上传组件",uploadSimple:"上传",uploadTeam:"上传团队组件",setting:"设置",userInfo:"用户信息",upgrade:"更新",terminal:"终端",preview:"组件预览",previewLocal:"本地组件预览",previewTeam:"团队组件预览",previewBlank:"预览",similarPreview:"相似组件预览",login:"登录",mdPreview:"文档预览",unknownTag:"未知标签"},e2={parse:"解析 Markdown",loading:"加载 Markdown",error:"加载失败",toc:"目录",anchor:"锚点"},t2={title:"终端",open:"打开终端",close:"关闭终端",execute:"执行命令",shutdown:"关闭进程",timeout:"超时时间",disconnected:"终端已断开连接"},n2={title:"依赖",name:"依赖名称",version:"依赖版本",install:"安装依赖",installing:"安装中",installed:"已安装",prebuild:"预构建",prebuildSize:"预构建大小",clearPrebuild:"清空预构建",batchSetting:"批量设置",dependencies:"dependencies",devDependencies:"devDependencies",match:{onlyInstall:"仅安装",majorVersion:"主版本",minorVersion:"主次版本",exactVersion:"完全一致"}},r2={title:"设置",previewRule:"预览规则",other:"其他设置",theme:"主题",language:"语言",darkMode:"暗黑模式",lightMode:"明亮模式"},i2={title:"版本更新",current:"当前版本",latest:"最新版本",check:"检查更新",upgrading:"更新中",upgraded:"已更新",publish:"发布更新",record:"更新记录",log:"更新日志",hasUpdate:"有更新",betaVersion:"内测版",noUpdate:"暂无更新",updateMethod:"更新方式",openTerminalAndRun:"打开终端,执行以下命令:",cannotIgnoreUpdate:"不可忽略此次更新"},o2={systemRecommended:"系统推荐",all:"全部",latest:"最新",hottest:"最热"},a2={submit:"提交"},s2={empty:"不能为空",notString:"必须是字符串类型,当前类型为: {type}",contentEmpty:"内容不能为空",startsWithNumber:'内容不能以数字开头,当前以 "{char}" 开头',invalidCharBacktick:"内容包含反引号(Markdown 语法标记),特殊字符只允许连字符(-)、下划线(_)、中文括号()、空格",invalidCharNewline:"内容包含换行符,特殊字符只允许连字符(-)、下划线(_)、中文括号()、空格",invalidCharCarriageReturn:"内容包含回车符,特殊字符只允许连字符(-)、下划线(_)、中文括号()、空格",invalidCharTab:"内容包含制表符,特殊字符只允许连字符(-)、下划线(_)、中文括号()、空格",invalidCharFormFeed:"内容包含换页符,特殊字符只允许连字符(-)、下划线(_)、中文括号()、空格",invalidCharVerticalTab:"内容包含垂直制表符,特殊字符只允许连字符(-)、下划线(_)、中文括号()、空格",invalidCharHash:"内容包含 # 字符,特殊字符只允许连字符(-)、下划线(_)、中文括号()、空格",invalidCharHtmlSpecial:'内容包含 HTML 特殊字符 "{char}",特殊字符只允许连字符(-)、下划线(_)、中文括号()、空格',invalidCharUnknown:'内容包含非法字符 "{char}"(Unicode: U+{code}),特殊字符只允许连字符(-)、下划线(_)、中文括号()、空格'},l2={common:KE,comp:YE,team:GE,user:QE,file:XE,message:JE,route:ZE,markdown:e2,terminal:t2,deps:n2,setting:r2,upgrade:i2,tag:o2,formCreate:a2,validateHash:s2},c2={keyword:"Keyword",confirm:"Confirm",cancel:"Cancel",close:"Close",save:"Save",submit:"Submit",delete:"Delete",edit:"Edit",add:"Add",update:"Update",upload:"Upload",download:"Download",refresh:"Refresh",loading:"Loading",success:"Success",error:"Error",warning:"Warning",info:"Info",copy:"Copy",copied:"Copied",copySuccess:"Copy successful",copyFailed:"Copy failed",open:"Open",search:"Search",reset:"Reset",clear:"Clear",back:"Back",next:"Next",prev:"Previous",finish:"Finish",operation:"Operation",status:"Status",yes:"Yes",no:"No",name:"Name",description:"Description",version:"Version",time:"Time",date:"Date",author:"Author",type:"Type",category:"Category",tag:"Tag",content:"Content",setting:"Setting",cache:"Cache",cacheSize:"Used",clearCache:"Clear Cache",clearCacheConfirm:"This will clear browser single-file compilation results and module pre-compilation files. Confirm to clear cache?",cacheCleared:"Cache cleared",newPage:"Open in new page",terminal:"Terminal",preview:"Preview",doc:"Documentation",readme:"README.md",upgradeRecord:"Update Record",openInNewPage:"Open in new page",depInstall:"Dependency Installation",fullscreen:"Fullscreen",exitFullscreen:"Exit Fullscreen",maximizeRestore:"Maximize/Restore",siteSlogan:"Atomic Component Community, Making Component Sharing Easier.",siteSubtitle:"Vue Component Sharing Platform",docsTutorial:"Documentation",empty:"No data",noReadme:"Component has no README.md file configured",dragSort:"Drag to sort",filter:"Filter",apply:"Apply",person:"people",unit:"items",pleaseSelect:"Please select",pleaseInput:"Please input",me:"Me",generate:"Generate",regenerate:"Regenerate",generateSuccess:"Generated successfully",moreOperations:"More Operations",more:"More",maxTagCount:"Max Tag Count"},u2={keywordPlaceholder:"Please input component name or description",title:"Component",name:"Component Name",fieldId:"Component ID",fieldName:"Component Name",fieldVersion:"Version",desc:"Component Description",remarksDesc:"Remarks",remarksDescRequired:"Please enter remarks",pleaseInputCompName:"Please enter component name",pleaseInputRemarks:"Please enter remarks to help with component market search",compNameRequired:"Component name is required",compNameNamingRule:"Component name must be in PascalCase or kebab-case",lengthBetween:"Length must be between {min} and {max} characters",version:"Component Version",detail:"Component Detail",preview:"Component Preview",previewConfig:"Preview Config",previewList:"Preview List",uploadPreview:"Component Upload Preview",updatePreview:"Component Update Preview",download:"Download Component",update:"Update Component",upload:"Upload Component",submit:"Submit Component",edit:"Edit Component",add:"Add Component",delete:"Delete Component",local:"Local Component",remote:"Remote Component",online:"Online Component",similar:"Similar Components",similarTeam:"Similar Components in Team",dir:"Component Directory",file:"Component File",entry:"Entry File",previewEntry:"Preview Entry Address",previewEntryFull:"Preview Entry Address (Fullscreen)",addPreviewEntry:"Add Preview Entry",maxPreviewEntry:"Maximum {n} preview entries allowed",pleaseAddPreviewEntry:"Please add a preview entry",miniPreviewFile:"Mini Preview File",fullPreviewFile:"Full Preview File",pleaseSelectPreviewFile:"Please select preview file",remarkDesc:"Remarks",dep:"Component Dependencies",localDep:"Component Dependencies (Local)",onlineDep:"Component Dependencies (Online)",finalDep:"Final Dependencies",localVersion:"Local: ",onlineVersion:"Online: ",onlineDepEmpty:"No online dependency data!",versionConsistent:"Version Consistent",versionChange:"Version changed, please select final version",versionChangeConfirmed:"Confirmed",newDep:"New Dependency",miniPanel:"Mini Panel",fullPanel:"Full Panel",reload:"Reload",uploadProtocol:"Upload Protocol",bgPanel:"Background",compLocation:"Component Location",pleaseSelectFolderFirst:"Please select a folder first",compAlreadyUploaded:"Component already uploaded, please go to My Components or Team Components to update",affirmDep:"Component Dependencies (Confirmed Version)",checkConfig:"Config Check",checkError:"Error Info",extraInfo:"Extra Info",baseInfo:"Basic Info",upgradeLog:"Upgrade Log",pleaseInputUpgradeLog:"Please enter upgrade description",config:"Component Config",configStatus:"Component Config Check Status",configError:"Config Error",configCheckError:"Config Check Error",needUpgrade:"Needs Upgrade",fileChanged:"Component files changed",versionChanged:"Version changed",fileNoChange:"Files unchanged",markdownValid:"Markdown preview validation passed",noMarkdown:"No markdown file",hash:"File Hash",localHash:"Local Component File Hash",remoteHash:"Remote Component File Hash",remoteVersion:"Remote Component Version",remoteVersionPrefix:"Online: ",localVersionPrefix:"Local: ",versionCompare:"Version Comparison Result",carouselIndex:"Component Preview Carousel Index",bgColor:"Component Background Color",dialogType:"Component Dialog Type",repeat:"Component Repeat Check",existLocal:"Component exists locally",scopeId:"Scope ID",tempDir:"Component Temp Directory",submitLimit:"Component Submit Limit",maxSize:"Total Size Limit",maxCount:"File Count Limit",matchType:"Match Type",updateType:"Update Type",updateOnline:"Online Update",updateOffline:"Offline Update",compOfflineUpdate:"Component Offline Update",compOnlineUpdate:"Component Online Update",folder:"Folder",compNotInLocal:"Component is not local. Continuing will only update basic information like description and preview config. Continue?",selectUpdateFolder:"Please select folder to update",openInVscode:"Open in VS Code",openingInEditor:"Opening in editor...",updateSuccess:"Update successful",downloadVersionConfirm:"The currently selected version is: {version}, confirm download?",downloading:"Downloading component...",downloadPathConfirm:"Download component to path [{path}]?",downloadCoverConfirm:"Component [{name}] already exists or has a duplicate name, overwrite?",uncollectConfirm:"Are you sure you want to uncollect component [{name}]? It will no longer appear in your collection list.",deleteConfirm:"Are you sure you want to delete component [{name}]? This will free up the component name and cannot be undone.",collect:"Collect",uncollect:"Uncollect",collected:"Collected",uncollected:"Not Collected",entryFile:"Entry File",configFile:"Config File",fileChangedNeedVersion:"File content changed, please increment version",viewFileChanges:"View File Changes",versionChangedButFileSame:"Version changed but file content unchanged, please revert version",errorMsg:"Error Message",versionCannotBeLessThanLatest:"Version cannot be less than latest version {version}",uploadAnyway:"Upload Anyway",compileError:"Component compilation failed",formatCode:"Format Code:",formatCodeTooltip:"Only formats files during comparison, original files remain unchanged",noChanges:"No changes",diff:{changed:"M Changed",unchanged:"U Unchanged",added:"A Added",deleted:"D Deleted"}},d2={title:"Team",name:"Team Name",code:"Team Code",desc:"Team Description",create:"Create Team",join:"Join Team",exit:"Exit Team",exitConfirm:"Exit Confirmation",manage:"Team Management",setting:"Team Settings",member:"Team Members",memberCount:"Member Count",maxMember:"Max Members",compCount:"Component Count",maxCompCount:"Max Components",creator:"Creator",downloadCount:"Downloads",collectCount:"Collections",createTime:"Create Time",myTeam:"My Teams",joinedTeam:"Joined Teams",space:"Team Space",noJoined:"No joined teams",noCreated:"No created teams",createCountLimit:"Max teams allowed to create",joinCountLimit:"Max teams allowed to join",compList:"Team Component List",myCompList:"My Component List",compGroup:"Team Component Group",compGroupList:"Team Component Group List",addMyComp:"Team Add My Component",compUpdate:"Team My Component Update",addFromMine:"Add from My Components",applyList:"Apply List",nickname:"Team Nickname",noTeamInfo:"No team information",compLib:"Component Library",groupConfig:"Group Config",compManage:"Component Management",unsavedDataLeave:"Group configuration data is not saved, are you sure you want to leave?",leave:"Leave",disbandTeam:"Disband Team",applyAudit:"Apply Audit",teamName:"Team Name",fillTeamCode:"Fill in Team Code",pleaseInputTeamCode:"Please enter team code",teamIdNotExist:"Team ID does not exist",joinSuccess:"Joined team successfully",applyJoinTeam:"Apply to Join Team",showRepeatComp:"Show Duplicate Components",allowAuthorDelete:"Allow Author Delete",teamIntro:"Team Introduction",fillTeamName:"Fill in Team Name",pleaseInputTeamName:"Please enter team name",pleaseInputTeamDesc:"Please enter team description",createSuccess:"Team created successfully",charLength:"Length must be between {min} and {max} characters",disbandConfirm:"Are you sure you want to disband the team? All members and components will be removed and cannot be recovered.",deleteConfirm:"Delete Confirmation",inputAuthCode:"Please enter verification code",disbandSuccess:"Team disbanded successfully",reject:"Reject",agree:"Agree",approved:"Approved",rejected:"Rejected",kickOut:"Kick Out",teamUserNickname:"Team Nickname",pleaseInputTeamNickname:"Please enter your team nickname",normalUser:"Normal User",kickOutConfirm:"Are you sure you want to kick out user [{name}]?",kickOutSuccess:"Kicked out successfully",selectCanUpdateUser:"Select users who can update",authorAutoAuth:"Author has default authorization",updateAuth:"Update Authorization",updateTime:"Update Time",expandAll:"Expand All",createGroup:"Create Group",unsaved:"Unsaved",pleaseInputGroupName:"Please enter group name",addComp:"Add Component",added:"Added",notAdded:"Not Added",defaultGroup:"Default Group",deleteGroupConfirm:"Are you sure you want to delete this group? All components in this group will be removed from the group.",addSuccess:"Added successfully",isGrouped:"Is Grouped",grouped:"Grouped",ungrouped:"Ungrouped",group:"Group",prevVersion:"Previous Version",newVersion:"New Version",upgradeDesc:"Upgrade Description",similarCompInTeam:"Similar Components in Team",similarComp:"Similar Components",deleteCompConfirm:"Are you sure you want to delete team component [{name}]? Team members will no longer be able to use this component.",descTitle:"Create an Exclusive Component Space for Your Team",descItem1:"Create a private team where components are only visible to members, protecting core assets",descItem2:"Each account can create up to {count} teams",descItem3:"Each account can join up to {count} teams",descItem4:"Basic team supports up to {count} members",descItem5:"Basic team can manage up to {count} components",descItem6:"Support creating group menus to organize team components flexibly"},f2={title:"User",username:"Username",account:"Account",password:"Password",newPassword:"New Password",confirmPassword:"Confirm Password",confirmNewPassword:"Confirm New Password",pleaseInputNewPassword:"Please enter new password",pleaseConfirmNewPassword:"Please confirm new password",passwordModified:"Password modified successfully",email:"Email",oldEmail:"Old Email",newEmail:"New Email",phone:"Phone",avatar:"Avatar",nickname:"Nickname",login:"Login",logout:"Logout",register:"Register",forgotPassword:"Forgot Password",resetPassword:"Reset Password",changePassword:"Change Password",changeNickname:"Change Nickname",pleaseInputNickname:"Please enter nickname",changeAvatar:"Change Avatar",avatarModified:"Avatar updated successfully",changeEmail:"Change Email",basicInfo:"Basic Information",securitySettings:"Security Settings",loginPassword:"Login Password",passwordTip:"Regularly change your password to ensure account security",setPassword:"Set Password",emailLogin:"Email Login",emailLoginTip:"Allow using email as login account",pleaseSetPasswordFirst:"Please set login password first",emailLoginEnabled:"Email login enabled",emailLoginDisabled:"Email login disabled",registerTime:"Registration Time",notBound:"Not Bound",change:"Change",bind:"Bind",authCode:"Verification Code",oldAuthCode:"Old Verification Code",newAuthCode:"New Verification Code",sendAuthCode:"Send Auth Code",resendAuthCode:"Resend",getAuthCode:"Get Code",pleaseInputAuthCode:"Please enter code",pleaseInputNewAuthCode:"Please enter new code",resendAfterSeconds:"Resend in {n}s",accountLogin:"Account Login",pleaseInputAccount:"Please enter account",pleaseInputUsername:"Please enter username",pleaseInputPassword:"Please enter password",pleaseInputEmail:"Please enter email",pleaseInputOldEmail:"Please enter old email",pleaseInputNewEmail:"Please enter new email",pleaseInputCorrectEmail:"Please enter correct email",emailModified:"Email modified successfully",newAuthCodeSent:"New verification code sent",authCodeSent:"Verification code sent",guestLogin:"Guest Access",loginSuccess:"Login successful",userInfo:"User Info",personalCenter:"Personal Center",myComp:"My Components",guest:"Guest",notLoggedIn:"Not logged in",goLogin:"Go to Login"},p2={title:"File",name:"Filename",path:"File Path",size:"File Size",type:"File Type",dir:"Directory",selectDir:"Select Directory",upload:"File Upload",download:"File Download",select:"Select",multiSelect:"Multiple selection not supported",onlyDir:"Only directories can be selected",rootDir:"Root Directory",projectPath:"Project Path",currentDir:"Current Directory",parentDir:"Parent Directory",refreshDir:"Refresh Directory List"},h2={success:{download:"Download successful",update:"Update successful",delete:"Delete successful",collect:"Collect successful",uncollect:"Uncollect successful",save:"Save successful",submit:"Submit successful",upload:"Upload successful",copy:"Copy successful",operation:"Operation successful",sendAuthCode:"Verification code sent",exitTeam:"Exit successful"},error:{download:"Download failed",update:"Update failed",delete:"Delete failed",collect:"Collect failed",uncollect:"Uncollect failed",save:"Save failed",submit:"Submit failed",upload:"Upload failed",copy:"Copy failed",operation:"Operation failed",load:"Load failed",network:"Network error",timeout:"Request timeout",unknown:"Unknown error",pleaseFixCompileError:"Please fix compilation errors first",loginExpired:"Login expired, please log in again",refreshFailed:"Refresh failed",requestFailed:"Request failed, please contact administrator",storageNotSupported:"Browser does not support storage.estimate API"},noUpdatePermission:"You do not have permission to update this component. Please contact the administrator for access.",confirm:{delete:"Are you sure to delete?",submit:"Are you sure to submit?",update:"Are you sure to update?",exit:"Are you sure to exit?",cancel:"Are you sure to cancel?"},loginRequired:"Please login first",fileExceed:"You can select at most {limit} files, {selected} selected this time, {total} total to be uploaded",validate:{required:"Required field",format:"Invalid format",min:"Cannot be less than minimum value",max:"Cannot exceed maximum value",length:"Invalid length",email:"Invalid email format",phone:"Invalid phone format",imageFormat:"Only image files are allowed",pleaseSelectFile:"Please select a file first",fileMaxSize:"File size cannot exceed {size}MB!"}},m2={404:"Page Not Found",share:"Component Market",collect:"Collected Components",collectSimple:"Collection",mine:"My Components",mineSimple:"Mine",local:"Local Components",localSimple:"Local",team:"Team",upload:"Upload Component",uploadSimple:"Upload",uploadTeam:"Upload Team Component",setting:"Settings",userInfo:"User Info",upgrade:"Upgrade",terminal:"Terminal",preview:"Component Preview",previewLocal:"Local Component Preview",previewTeam:"Team Component Preview",previewBlank:"Preview",similarPreview:"Similar Component Preview",login:"Login",mdPreview:"Document Preview",unknownTag:"Unknown Tag"},v2={parse:"Parse Markdown",loading:"Loading Markdown",error:"Load failed",toc:"Table of Contents",anchor:"Anchor"},g2={title:"Terminal",open:"Open Terminal",close:"Close Terminal",execute:"Execute Command",shutdown:"Shutdown Process",timeout:"Timeout",disconnected:"Terminal disconnected"},_2={title:"Dependencies",name:"Dependency Name",version:"Dependency Version",install:"Install Dependencies",installing:"Installing",installed:"Installed",prebuild:"Prebuild",prebuildSize:"Prebuild Size",clearPrebuild:"Clear Prebuild",batchSetting:"Batch Setting",dependencies:"dependencies",devDependencies:"devDependencies",match:{onlyInstall:"Install Only",majorVersion:"Major Version",minorVersion:"Major + Minor",exactVersion:"Exact Match"}},y2={title:"Settings",previewRule:"Preview Rule",other:"Other Settings",theme:"Theme",language:"Language",darkMode:"Dark Mode",lightMode:"Light Mode"},b2={title:"Version Update",current:"Current Version",latest:"Latest Version",check:"Check for Updates",upgrading:"Updating",upgraded:"Updated",publish:"Publish Update",record:"Update Record",log:"Changelog",hasUpdate:"Update Available",betaVersion:"Beta",noUpdate:"No updates available",updateMethod:"Update Method",openTerminalAndRun:"Open terminal and run:",cannotIgnoreUpdate:"This update cannot be ignored"},w2={systemRecommended:"System Recommended",all:"All",latest:"Latest",hottest:"Hottest"},S2={submit:"Submit"},C2={empty:"Cannot be empty",notString:"Must be a string type, current type: {type}",contentEmpty:"Content cannot be empty",startsWithNumber:'Content cannot start with a number, currently starts with "{char}"',invalidCharBacktick:"Content contains backtick (Markdown syntax marker), only hyphen(-), underscore(_), parentheses(), and spaces are allowed",invalidCharNewline:"Content contains newline character, only hyphen(-), underscore(_), parentheses(), and spaces are allowed",invalidCharCarriageReturn:"Content contains carriage return, only hyphen(-), underscore(_), parentheses(), and spaces are allowed",invalidCharTab:"Content contains tab character, only hyphen(-), underscore(_), parentheses(), and spaces are allowed",invalidCharFormFeed:"Content contains form feed character, only hyphen(-), underscore(_), parentheses(), and spaces are allowed",invalidCharVerticalTab:"Content contains vertical tab character, only hyphen(-), underscore(_), parentheses(), and spaces are allowed",invalidCharHash:"Content contains # character, only hyphen(-), underscore(_), parentheses(), and spaces are allowed",invalidCharHtmlSpecial:'Content contains HTML special character "{char}", only hyphen(-), underscore(_), parentheses(), and spaces are allowed',invalidCharUnknown:'Content contains invalid character "{char}" (Unicode: U+{code}), only hyphen(-), underscore(_), parentheses(), and spaces are allowed'},E2={common:c2,comp:u2,team:d2,user:f2,file:p2,message:h2,route:m2,markdown:v2,terminal:g2,deps:_2,setting:y2,upgrade:b2,tag:w2,formCreate:S2,validateHash:C2},T2={zh:l2,en:E2},x2=localStorage.getItem(Bb.LOCALE_KEY)||"zh",Cm=I_({locale:x2,messages:T2,legacy:!1});function Em(t){t.use(Cm)}const Mc=Object.freeze(Object.defineProperty({__proto__:null,i18n:Cm,setup:Em},Symbol.toStringTag,{value:"Module"}));function O2({store:t}){t.$subscribe((...e)=>{const[n]=e;if(n.type==="direct")throw new Error("不允许直接修改store,建议使用action修改")})}const Tl=M_();function Tm(t){Tl.use(O2),t.use(Tl)}const A2=Object.freeze(Object.defineProperty({__proto__:null,pinia:Tl,setup:Tm},Symbol.toStringTag,{value:"Module"}));function $2(t){t.component("Icon",dw)}const{i18n:wi}=Mc,{pinia:ys}=A2,ri=gr("userStore",{state:()=>({userInfo:{},guestUserInfo:{avatar:"",nickname:wi.global.t("user.guest"),account:""},logoutDialogOpen:!1}),getters:{userId:t=>t.userInfo._id,displayName(t){return ds()===yt.IS_GUEST_LOGIN?t.guestUserInfo.nickname:t.userInfo.nickname||t.userInfo.account||wi.global.t("user.notLoggedIn")},avatar:t=>t.userInfo.avatar,avatarStr(t){return ds()===yt.IS_GUEST_LOGIN?t.guestUserInfo.nickname[0]:t.userInfo.nickname?.[0]||t.userInfo.account?.[0]||""}},actions:{async fetchCsrfToken(){Sm.get(yt.CSRF_KEY)||await Rr.v1Csrf.csrfcontrollerGetcsrftoken()},updateAvatar(t){this.$patch(e=>{e.userInfo&&(e.userInfo.avatar=t)})},updateNickname(t){this.$patch(e=>{e.userInfo&&(e.userInfo.nickname=t)})},setLogoutDialogOpen(t){this.$patch(e=>{e.logoutDialogOpen=t})},setUserInfo(t){this.$patch(e=>{e.userInfo=t})},login(t){return Rr.v1User.usercontrollerLogin({...t})},async fetchWhoAmI(){const t=await Rr.v1User.usercontrollerWhoami();t.data&&this.setUserInfo(t.data)},logout(){ja.push("/login?type=logout").then(t=>{t||(this.clearLocalStorage(),this.resetAll(),this.$reset())})},resetAll(){const t=Ji(),e=BE(),n=HE(),r=Ic(),i=qE();t?.$reset(),e?.$reset(),n?.$reset(),r?.$reset(),i?.$reset(),this.clearTeamHomeStores(),this.clearCompListStores(),this.clearCompEditStore()},clearLocalStorage(){Xb(),e0(),t0()},clearTeamHomeStores(){for(const[t,e]of ys._s.entries())t.startsWith("teamHome")&&e.$reset()},clearCompListStores(){for(const[t,e]of ys._s.entries())t.startsWith("compList")&&e.$reset()},clearCompEditStore(){for(const[t,e]of ys._s.entries())t.startsWith("compEdit")&&e.$reset()},isRealUserLogin(){const t=Object.keys(this.userInfo),e=sa();return t.length>0&&e!==null},isAccessTokenExist(){return sa()!==null},isGuestLogin(){return ds()===yt.IS_GUEST_LOGIN},isLogin(){const t=this.isRealUserLogin(),e=this.isGuestLogin();return t||e},logoutDialog(){if(this.logoutDialogOpen)return;this.setLogoutDialogOpen(!0);const t={confirmButtonText:wi.global.t("user.goLogin"),showClose:!0,callback:e=>{this.setLogoutDialogOpen(!1),e==="confirm"&&this.logout()}};fy.alert(wi.global.t("message.loginRequired"),wi.global.t("common.info"),t)}}}),R2=Ee({__name:"SubMenu",props:{route:{},basePath:{}},setup(t){const{getTitle:e}=Ac(),n=t,r=ri(),i=(u,c="")=>o1.resolve(u,c),o=te(()=>i(n.basePath||"",n.route.path)),a=te(()=>(n.route.children||[]).some(u=>!u.meta?.hidden)),s=te(()=>{const{children:u=[]}=n.route;return u.length===0||u.length===1&&!u[0]?.children?.length}),l=te(()=>{const{children:u=[],meta:c={}}=n.route;return c?.hidden?!1:r.isRealUserLogin()||u.length>0?!0:(r.isGuestLogin()||!r.isAccessTokenExist())&&n.route.meta?.noAuth});return(u,c)=>{const d=ze("SubMenu",!0),f=ki,m=py;return l.value?(b(),x(Ie,{key:0},[t.route.meta?.hideParent&&a.value?(b(!0),x(Ie,{key:0},qe(t.route.children,p=>(b(),ne(d,{key:i(o.value,p.path),route:p,"base-path":i(o.value,p.path)},null,8,["route","base-path"]))),128)):(b(),x(Ie,{key:1},[s.value?(b(),ne(s1,{key:0,route:t.route,"full-path":o.value},null,8,["route","full-path"])):(b(),ne(m,{key:1,index:o.value},{title:we(()=>[j(f,null,{default:we(()=>[(b(),ne($t(t.route?.meta?.icon)))]),_:1}),_("span",null,D(g(e)(t.route?.meta?.title)),1)]),default:we(()=>[(b(!0),x(Ie,null,qe(t.route.children,p=>(b(),ne(d,{key:i(o.value,p.path),route:p,"base-path":i(o.value,p.path)},null,8,["route","base-path"]))),128))]),_:1},8,["index"]))],64))],64)):ue("",!0)}}}),P2=Ee({__name:"index",setup(t){const e=Ic(),n=Ta(),r=vc(),i=te(()=>n.options.routes),o=te(()=>r.path);return(a,s)=>{const l=hy;return b(),ne(l,{class:"dark:!bg-gray-800 border-t border-gray-200 dark:border-gray-700",collapse:g(e).collapse,"default-active":o.value},{default:we(()=>[(b(!0),x(Ie,null,qe(i.value,u=>(b(),x(Ie,null,[u?.meta?.hidden?ue("",!0):(b(),ne(R2,{key:u.path,basePath:u.path,route:u},null,8,["basePath","route"]))],64))),256))]),_:1},8,["collapse","default-active"])}}}),k2={class:"flex gap-[20px] items-center pl-[10px] pr-[10px]"},I2=["title"],M2=["title"],F2=["title"],D2={class:"flex items-center gap-[10px]"},L2=Ee({__name:"index",setup(t){const{t:e}=Gi(),n=Ji(),r=Ta(),i=vc(),o=Zr(Rh,10),a=K(n.maxCache),s=()=>{r.back()},l=()=>{r.replace({path:i.path,query:{...i.query,[yt.ROUTE_STATE_KEY_VERSION]:Date.now()}})};function u(c){c&&n.setMaxCache(c)}return Ut(()=>{o.value=n.maxCache}),(c,d)=>{const f=ze("Icon"),m=pl,p=fl;return b(),x("div",k2,[_("span",{title:g(e)("common.back")},[j(f,{icon:"material-symbols:arrow-back-rounded",class:"cursor-pointer",onClick:s})],8,I2),_("span",{title:g(e)("common.refresh")},[j(f,{icon:"material-symbols:refresh-rounded",class:"cursor-pointer",onClick:l})],8,M2),j(p,{placement:"bottom",trigger:"hover",width:"auto"},{reference:we(()=>[_("span",{title:g(e)("common.moreOperations")},[j(f,{icon:"material-symbols:article-outline",class:"cursor-pointer"})],8,F2)]),default:we(()=>[_("div",D2,[_("div",null,D(g(e)("common.maxTagCount"))+":",1),_("div",null,[j(m,{modelValue:a.value,"onUpdate:modelValue":d[0]||(d[0]=h=>a.value=h),min:1,style:{width:"90px"},"controls-position":"right",onChange:u},null,8,["modelValue"])])])]),_:1})])}}}),j2={class:"flex dark:bg-gray-800 py-[2px] h-[40px] border border-gray-200 dark:border-gray-700"},V2=Ee({__name:"index",setup(t){const{t:e}=Gi(),n=Ta(),r=vc(),i=Ji(),{getTitle:o}=Ac();Ae(()=>r,()=>{i.addView(r)},{immediate:!0,deep:!0});const a=te(()=>i.visitedViews),s=te(()=>a.value.length===1);function l(f){const m=u(f);i.delViewAndJumpToPrev(f.path,m,n)}function u(f){return f.path===r.path}function c(f){n.push(f)}function d(f){const m=f?.meta?.title||e("route.unknownTag"),p=i.getPayLoad(f.path);return o(p?.name||m)}return(f,m)=>{const p=ze("Icon"),h=ki,v=Xr,C=my;return b(),x("div",j2,[j(L2),j(g(f0),{class:"flex-1 overflow-hidden",list:a.value,getKey:S=>S.path},{display:we(({visibleList:S,overflow:w})=>[j(F_,{tag:"ul",name:"fade",class:"flex gap-[5px] p-[2px] items-center"},{default:we(()=>[(b(!0),x(Ie,null,qe(S,y=>(b(),x("div",{key:y.path},[j(v,{type:u(y)?"primary":"default",onClick:E=>c(y)},{default:we(()=>[Ge(D(d(y))+" ",1),s.value?ue("",!0):(b(),ne(h,{key:0,style:{"font-size":"16px"},class:"ml-[5px]",onClick:Qe(E=>l(y),["stop"])},{default:we(()=>[j(p,{icon:"material-symbols:close"})]),_:1},8,["onClick"]))]),_:2},1032,["type","onClick"])]))),128)),w>0?(b(),ne(C,{key:0,type:"info"},{default:we(()=>[Ge("+"+D(w)+" "+D(g(e)("common.more")),1)]),_:2},1024)):ue("",!0)]),_:2},1024)]),measure:we(({item:S})=>[j(v,{type:"primary"},{default:we(()=>[Ge(D(d(S))+" ",1),s.value?ue("",!0):(b(),ne(h,{key:0,style:{"font-size":"16px"},class:"ml-[5px]"},{default:we(()=>[j(p,{icon:"material-symbols:close"})]),_:1}))]),_:2},1024)]),_:1},8,["list","getKey"])])}}}),z2=wc(V2,[["__scopeId","data-v-8b93a5e3"]]),N2={class:"size-full overflow-hidden"},U2={class:"h-[60px] dark:bg-gray-800"},B2={class:"size-full overflow-hidden flex flex-col dark:bg-gray-800"},H2={class:"dark:bg-gray-800"},q2={class:"size-full flex flex-col"},W2={class:""},K2={class:"flex-1 overflow-auto"},Y2=Ee({__name:"index",setup(t){const e=Wn(()=>at(()=>import("./index-DxYo8MHB.js"),__vite__mapDeps([0,1,2,3,4,5,6,7]))),n=Wn(()=>at(()=>import("./index-Czj4Va_p.js"),__vite__mapDeps([8,1,2,9,10,11,12,13,14,15,16,17,18,6]))),r=K(68),i=K(200),o=K(60),a=K(""),s=K(""),l=te(()=>a.value?"transition-width duration-400":""),u=te(()=>s.value?"transition-height duration-300":""),c=te(()=>({class:u.value,size:m.value,collapsible:!0,resizable:!1})),d=te(()=>({class:l.value,min:r.value,max:300,collapsible:!0})),f=Zr(r0,r.value),m=Zr(i0,o.value),p=Ic(),h=ri(),v=async(w,y)=>{a.value=y,y==="end"&&f.value===0&&(f.value=i.value)},C=(w,y)=>{s.value=y,y==="start"?m.value=0:y==="end"&&(m.value=o.value)},S=w=>{w==="header"?s.value="":w==="side"&&(a.value="")};return Ut(()=>{p.setSideBarCollapse(f.value===r.value)}),(w,y)=>{const E=vy,T=_y,A=gy;return b(),x("div",N2,[j(A,{layout:"vertical",onCollapse:C},{default:we(()=>[j(E,Ye({class:"!overflow-hidden transform-gpu isolate will-change-height"},c.value,{onTransitionend:y[0]||(y[0]=O=>S("header")),onWebkitTransitionEnd:y[1]||(y[1]=O=>S("header"))}),{default:we(()=>[_("div",U2,[j(g(n))])]),_:1},16),j(E,{class:Pe(["transform-gpu isolate",u.value])},{default:we(()=>[j(A,{onCollapse:v},{default:we(()=>[j(E,Ye(d.value,{size:g(f),"onUpdate:size":y[2]||(y[2]=O=>xa(f)?f.value=O:null),class:"transform-gpu isolate will-change-width",onTransitionend:y[3]||(y[3]=O=>S("side")),onWebkitTransitionEnd:y[4]||(y[4]=O=>S("side"))}),{default:we(()=>[_("div",B2,[j(P2),g(h).isRealUserLogin()?(b(),x(Ie,{key:0},[_("div",H2,[j(T)]),j(g(e))],64)):ue("",!0)])]),_:1},16,["size"]),j(E,{class:Pe(["transform-gpu isolate !overflow-hidden",l.value])},{default:we(()=>[_("div",q2,[_("div",W2,[j(z2)]),_("div",K2,[(b(),ne(D_,null,{default:we(()=>[j(n1)]),_:1}))])])]),_:1},8,["class"])]),_:1})]),_:1},8,["class"])]),_:1})])}}}),ja=L_({history:j_(`/${yt.WEBSITE_PATH_MAIN}/`),routes:[{path:"/login",name:"login",component:()=>at(()=>import("./index-O6EResxn.js"),__vite__mapDeps([19,1,2,12,13,14,20,21,3,22,23,18])),meta:{hidden:!0,noAuth:!0,title:"route.login"}},{path:"/upgrade",name:"upgrade",component:()=>at(()=>import("./index-BaX-1N8K.js"),__vite__mapDeps([24,1,2,12,22,25,26,7,27])),meta:{hidden:!0,noAuth:!0,title:"route.upgrade"}},{path:"/mdPreview",name:"mdPreview",component:()=>at(()=>import("./index-DlO1wWqO.js"),__vite__mapDeps([28,1,2,29,25,30])),meta:{hidden:!0,noAuth:!0,title:"route.mdPreview"}},{path:"/previewBlank/:compId/:version?",name:"previewBlank",component:()=>at(()=>import("./index-DNszuV9Y.js"),__vite__mapDeps([31,2,32,33,1,34,35,36,7,4])),meta:{hidden:!0,noAuth:!0,title:"route.preview"}},{path:"/previewLocalBlank/:compId",name:"previewLocalBlank",component:()=>at(()=>import("./index-GnkbPU1i.js"),__vite__mapDeps([37,2,38,39,1,15,34,35,18,7,4])),meta:{hidden:!0,noAuth:!0,title:"route.previewLocal"}},{path:"/similarPreview/:compId",name:"similarPreview",component:()=>at(()=>import("./index-Cy6hrNNt.js"),__vite__mapDeps([40,1,2,41,42,43,44,45,46,47,32,38,15,5,10,48,4,34,18,49,29,25,30,50,7,33,35,36,51])),meta:{hidden:!0,noAuth:!0,title:"route.similarPreview"}},{path:"/",component:Y2,redirect:"/share",meta:{hideParent:!0},children:[{path:"/share",name:"share",meta:{title:"route.share",icon:Wn(()=>at(()=>import("./home-rounded-Dq-TBvLG.js"),__vite__mapDeps([52,16,2,53]))),noAuth:!0},component:()=>at(()=>import("./index-CfMcBFhz.js"),__vite__mapDeps([54,1,2,47,32,38,15,5,10,48,4,34,18,55]))},{path:"/mine",name:"mine",meta:{title:"route.mine",icon:Wn(()=>at(()=>import("./supervised-user-circle-CEgKC7n7.js"),__vite__mapDeps([56,16,2,57])))},component:()=>at(()=>import("./index-C9r8rR8o.js"),__vite__mapDeps([58,1,2,47,32,38,15,5,10,48,4,34,18,59,60,61,29,25,30,35,51,3,62,7,63,55]))},{path:"/collect",name:"collect",meta:{title:"route.collect",icon:Wn(()=>at(()=>import("./kid-star-CFLIpXDC.js"),__vite__mapDeps([64,16,2,65])))},component:()=>at(()=>import("./index-DsYCIdsq.js"),__vite__mapDeps([66,1,2,47,32,38,15,5,10,48,4,34,18,55]))},{path:"/local",name:"local",meta:{title:"route.local",icon:Wn(()=>at(()=>import("./sync-saved-locally-rounded-CmlRPNS9.js"),__vite__mapDeps([67,16,2,68]))),noAuth:!0},component:()=>at(()=>import("./index-4acODfuo.js"),__vite__mapDeps([69,1,2,47,32,38,15,5,10,48,4,34,18]))},{path:"/upload",name:"upload",meta:{title:"route.upload",icon:Wn(()=>at(()=>import("./cloud-upload-CyIQfnxU.js"),__vite__mapDeps([70,16,2,71]))),noAuth:!0,hidden:!0},component:()=>at(()=>import("./index-DBDOcdx3.js"),__vite__mapDeps([72,1,2,60,32,4,61,34,29,25,30,5,35,51,3,62,7,18,46,48,27]))},{path:"/uploadTeam/:teamId",name:"uploadTeam",meta:{title:"route.uploadTeam",hidden:!0},component:()=>at(()=>import("./index-DBDOcdx3.js"),__vite__mapDeps([72,1,2,60,32,4,61,34,29,25,30,5,35,51,3,62,7,18,46,48,27]))},{path:"/userInfo",name:"userInfo",meta:{title:"route.userInfo",hidden:!0},component:()=>at(()=>import("./index-Bw7t67yK.js"),__vite__mapDeps([73,1,2,21,3,5,20,74,9,10,11,75,7]))},{path:"/preview/:compId",meta:{title:"route.preview",noAuth:!0,hidden:!0},component:()=>at(()=>import("./index-Cy6hrNNt.js"),__vite__mapDeps([40,1,2,41,42,43,44,45,46,47,32,38,15,5,10,48,4,34,18,49,29,25,30,50,7,33,35,36,51]))},{path:"/previewLocal/:compId",meta:{title:"route.previewLocal",hidden:!0,noAuth:!0},component:()=>at(()=>import("./index-Dz7Dj_1u.js"),__vite__mapDeps([76,1,2,38,49,29,25,30,48,47,32,15,5,10,4,34,18,50,7,39,35]))},{path:"/previewTeam/:teamId/:compId",meta:{title:"route.previewTeam",noAuth:!0,hidden:!0},props:{isTeamPreview:!0},component:()=>at(()=>import("./index-Cy6hrNNt.js"),__vite__mapDeps([40,1,2,41,42,43,44,45,46,47,32,38,15,5,10,48,4,34,18,49,29,25,30,50,7,33,35,36,51]))},{path:"/terminal",name:"terminal",meta:{title:"route.terminal",icon:Wn(()=>at(()=>import("./terminal-DykiTSV6.js"),__vite__mapDeps([77,16,2,78]))),noAuth:!0},component:()=>at(()=>import("./index-B37e-H6y.js"),__vite__mapDeps([79,43,2,44,1,45]))},{path:"/setting",name:"setting",meta:{title:"route.setting",icon:Wn(()=>at(()=>import("./settings-B3XnnICj.js"),__vite__mapDeps([80,16,2,81]))),noAuth:!0},component:()=>at(()=>import("./index-DMAX-M2Q.js"),__vite__mapDeps([82,1,2,51,83,7]))},{path:"/team/:teamId",name:"team",meta:{title:"route.team",hidden:!0},component:()=>at(()=>import("./index-x3kqy62K.js"),__vite__mapDeps([84,1,2,41,42,9,10,11,47,32,38,15,5,48,4,34,18,3,55,16,51,85,7]))}]},{path:"/:pathMatch(.*)*",name:"404",meta:{hidden:!0,noAuth:!0,title:"route.404"},component:()=>at(()=>import("./index-CqcYb_O4.js"),__vite__mapDeps([86,2,1]))}]});function G2(t){t.use(ja)}const Q2=K([]);function X2(t){const e=gc(Kw,{errors:Q2.value}),n=document.createElement("div");n.id="error-container",e.mount(n),document.body.appendChild(n)}var Go={exports:{}},J2=Go.exports,Qd;function Z2(){return Qd||(Qd=1,(function(t,e){(function(n,r){t.exports=r()})(J2,function(){function n(J){return(n=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(B){return typeof B}:function(B){return B&&typeof Symbol=="function"&&B.constructor===Symbol&&B!==Symbol.prototype?"symbol":typeof B})(J)}function r(J,B){if(!(J instanceof B))throw new TypeError("Cannot call a class as a function")}function i(J,B){for(var Z=0;Z<B.length;Z++){var ye=B[Z];ye.enumerable=ye.enumerable||!1,ye.configurable=!0,"value"in ye&&(ye.writable=!0),Object.defineProperty(J,ye.key,ye)}}function o(J,B,Z){B&&i(J.prototype,B),Z&&i(J,Z),Object.defineProperty(J,"prototype",{writable:!1})}function a(J,B,Z){B in J?Object.defineProperty(J,B,{value:Z,enumerable:!0,configurable:!0,writable:!0}):J[B]=Z}function s(J,B){if(typeof B!="function"&&B!==null)throw new TypeError("Super expression must either be null or a function");J.prototype=Object.create(B&&B.prototype,{constructor:{value:J,writable:!0,configurable:!0}}),Object.defineProperty(J,"prototype",{writable:!1}),B&&u(J,B)}function l(J){return(l=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(B){return B.__proto__||Object.getPrototypeOf(B)})(J)}function u(J,B){return(u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(Z,ye){return Z.__proto__=ye,Z})(J,B)}function c(J,B){if(B&&(typeof B=="object"||typeof B=="function"))return B;if(B!==void 0)throw new TypeError("Derived constructors may only return object or undefined");if(B=J,B===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return B}function d(J){var B=(function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}})();return function(){var Z,ye=l(J);return c(this,B?(Z=l(this).constructor,Reflect.construct(ye,arguments,Z)):ye.apply(this,arguments))}}function f(J,B){(B==null||B>J.length)&&(B=J.length);for(var Z=0,ye=new Array(B);Z<B;Z++)ye[Z]=J[Z];return ye}function m(J,B){var Z,ye=typeof Symbol<"u"&&J[Symbol.iterator]||J["@@iterator"];if(!ye){if(Array.isArray(J)||(ye=(function(ee,se){if(ee){if(typeof ee=="string")return f(ee,se);var he=Object.prototype.toString.call(ee).slice(8,-1);return(he=he==="Object"&&ee.constructor?ee.constructor.name:he)==="Map"||he==="Set"?Array.from(ee):he==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(he)?f(ee,se):void 0}})(J))||B&&J&&typeof J.length=="number")return ye&&(J=ye),Z=0,{s:B=function(){},n:function(){return Z>=J.length?{done:!0}:{done:!1,value:J[Z++]}},e:function(ee){throw ee},f:B};throw new TypeError(`Invalid attempt to iterate non-iterable instance.
12
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var xe,ae=!0,Me=!1;return{s:function(){ye=ye.call(J)},n:function(){var ee=ye.next();return ae=ee.done,ee},e:function(ee){Me=!0,xe=ee},f:function(){try{ae||ye.return==null||ye.return()}finally{if(Me)throw xe}}}}function p(){if(h.url)window.location.href=h.url;else if(h.rewriteHTML)try{document.documentElement.innerHTML=h.rewriteHTML}catch{document.documentElement.innerText=h.rewriteHTML}else{try{window.opener=null,window.open("","_self"),window.close(),window.history.back()}catch(J){console.log(J)}setTimeout(function(){window.location.href=h.timeOutUrl||"https://theajack.github.io/disable-devtool/404.html?h=".concat(encodeURIComponent(location.host))},500)}}var h={md5:"",ondevtoolopen:p,ondevtoolclose:null,url:"",timeOutUrl:"",tkName:"ddtk",interval:500,disableMenu:!0,stopIntervalTime:5e3,clearIntervalWhenDevOpenTrigger:!1,detectors:[1,3,4,5,6,7],clearLog:!0,disableSelect:!1,disableInputSelect:!1,disableCopy:!1,disableCut:!1,disablePaste:!1,ignore:null,disableIframeParents:!0,seo:!0,rewriteHTML:""},v=["detectors","ondevtoolclose","ignore"];function C(J){var B,Z=0<arguments.length&&J!==void 0?J:{};for(B in Z.onDevtoolOpen&&(Z.ondevtoolopen=Z.onDevtoolOpen),Z.onDevtoolClose&&(Z.ondevtoolclose=Z.onDevtoolClose),h){var ye=B;Z[ye]===void 0||n(h[ye])!==n(Z[ye])&&v.indexOf(ye)===-1||(h[ye]=Z[ye])}typeof h.ondevtoolclose=="function"&&h.clearIntervalWhenDevOpenTrigger===!0&&(h.clearIntervalWhenDevOpenTrigger=!1,console.warn("【DISABLE-DEVTOOL】clearIntervalWhenDevOpenTrigger 在使用 ondevtoolclose 时无效"))}function S(){return new Date().getTime()}function w(J){var B=S();return J(),S()-B}function y(J,B){function Z(Me){return function(){J&&J();var ee=Me.apply(void 0,arguments);return B&&B(),ee}}var ye=window.alert,xe=window.confirm,ae=window.prompt;try{window.alert=Z(ye),window.confirm=Z(xe),window.prompt=Z(ae)}catch{}}var E,T,A,O={iframe:!1,pc:!1,qqBrowser:!1,firefox:!1,macos:!1,edge:!1,oldEdge:!1,ie:!1,iosChrome:!1,iosEdge:!1,chrome:!1,seoBot:!1,mobile:!1};function q(){function J(Vt){return B.indexOf(Vt)!==-1}var B=navigator.userAgent.toLowerCase(),Z=(function(){var Ct=navigator,Vt=Ct.platform,Ct=Ct.maxTouchPoints;if(typeof Ct=="number")return 1<Ct;if(typeof Vt=="string"){if(Ct=Vt.toLowerCase(),/(mac|win)/i.test(Ct))return!1;if(/(android|iphone|ipad|ipod|arch)/i.test(Ct))return!0}return/(iphone|ipad|ipod|ios|android)/i.test(navigator.userAgent.toLowerCase())})(),ye=!!window.top&&window!==window.top,xe=!Z,ae=J("qqbrowser"),Me=J("firefox"),ee=J("macintosh"),se=J("edge"),he=se&&!J("chrome"),ce=he||J("trident")||J("msie"),be=J("crios"),$n=J("edgios"),Zt=J("chrome")||be,an=!Z&&/(googlebot|baiduspider|bingbot|applebot|petalbot|yandexbot|bytespider|chrome\-lighthouse|moto g power)/i.test(B);Object.assign(O,{iframe:ye,pc:xe,qqBrowser:ae,firefox:Me,macos:ee,edge:se,oldEdge:he,ie:ce,iosChrome:be,iosEdge:$n,chrome:Zt,seoBot:an,mobile:Z})}function I(){for(var J=(function(){for(var ye={},xe=0;xe<500;xe++)ye["".concat(xe)]="".concat(xe);return ye})(),B=[],Z=0;Z<50;Z++)B.push(J);return B}function P(){h.clearLog&&A()}var z="",F=!1;function Y(){var J=h.ignore;if(J){if(typeof J=="function")return J();if(J.length!==0){var B=location.href;if(z===B)return F;z=B;var Z,ye=!1,xe=m(J);try{for(xe.s();!(Z=xe.n()).done;){var ae=Z.value;if(typeof ae=="string"){if(B.indexOf(ae)!==-1){ye=!0;break}}else if(ae.test(B)){ye=!0;break}}}catch(Me){xe.e(Me)}finally{xe.f()}return F=ye}}}var le=function(){return!1};function de(J){var B,Z,ye=74,xe=73,ae=85,Me=83,ee=123,se=O.macos?function(ce,be){return ce.metaKey&&ce.altKey&&(be===xe||be===ye)}:function(ce,be){return ce.ctrlKey&&ce.shiftKey&&(be===xe||be===ye)},he=O.macos?function(ce,be){return ce.metaKey&&ce.altKey&&be===ae||ce.metaKey&&be===Me}:function(ce,be){return ce.ctrlKey&&(be===Me||be===ae)};J.addEventListener("keydown",function(ce){var be=(ce=ce||J.event).keyCode||ce.which;if(be===ee||se(ce,be)||he(ce,be))return M(J,ce)},!0),B=J,h.disableMenu&&B.addEventListener("contextmenu",function(ce){if(ce.pointerType!=="touch")return M(B,ce)}),Z=J,(h.disableSelect||h.disableInputSelect)&&Q(Z,"selectstart"),Z=J,h.disableCopy&&Q(Z,"copy"),Z=J,h.disableCut&&Q(Z,"cut"),Z=J,h.disablePaste&&Q(Z,"paste")}function Q(J,B){J.addEventListener(B,function(Z){if(!(ye=Z.target)||ye.tagName!=="INPUT"&&ye.tagName!=="TEXTAREA"&&((xe=ye.getAttribute)==null?void 0:xe.call(ye,"contenteditable"))!=="true"){if(h.disableSelect)return M(J,Z)}else if(h.disableInputSelect)return M(J,Z);var ye,xe})}function M(J,B){if(!Y()&&!le())return(B=B||J.event).returnValue=!1,B.preventDefault(),!1}var k,X=!1,N={};function re(J){N[J]=!1}function ve(){for(var J in N)if(N[J])return X=!0;return X=!1}(Re=k=k||{})[Re.Unknown=-1]="Unknown",Re[Re.RegToString=0]="RegToString",Re[Re.DefineId=1]="DefineId",Re[Re.Size=2]="Size",Re[Re.DateToString=3]="DateToString",Re[Re.FuncToString=4]="FuncToString",Re[Re.Debugger=5]="Debugger",Re[Re.Performance=6]="Performance",Re[Re.DebugLib=7]="DebugLib";var oe=(function(){function J(ye){var Z=ye.type,ye=ye.enabled,ye=ye===void 0||ye;r(this,J),this.type=k.Unknown,this.enabled=!0,this.type=Z,this.enabled=ye,this.enabled&&(Z=this,me.push(Z),this.init())}return o(J,[{key:"onDevToolOpen",value:function(){var B;console.warn("You don't have permission to use DEVTOOL!【type = ".concat(this.type,"】")),h.clearIntervalWhenDevOpenTrigger&&U(),window.clearTimeout(R),h.ondevtoolopen(this.type,p),B=this.type,N[B]=!0}},{key:"init",value:function(){}}]),J})(),ge=(function(){s(B,oe);var J=d(B);function B(){return r(this,B),J.call(this,{type:k.DebugLib})}return o(B,[{key:"init",value:function(){}},{key:"detect",value:function(){var Z;(((Z=(Z=window.eruda)==null?void 0:Z._devTools)==null?void 0:Z._isShow)===!0||window._vcOrigConsole&&window.document.querySelector("#__vconsole.vc-toggle"))&&this.onDevToolOpen()}}],[{key:"isUsing",value:function(){return!!window.eruda||!!window._vcOrigConsole}}]),B})(),_e=0,R=0,me=[],L=0;function $(J){function B(){he=!0}function Z(){he=!1}var ye,xe,ae,Me,ee,se,he=!1;function ce(){(se[Me]===ae?xe:ye)()}y(B,Z),ye=Z,xe=B,(se=document).hidden!==void 0?(ae="hidden",ee="visibilitychange",Me="visibilityState"):se.mozHidden!==void 0?(ae="mozHidden",ee="mozvisibilitychange",Me="mozVisibilityState"):se.msHidden!==void 0?(ae="msHidden",ee="msvisibilitychange",Me="msVisibilityState"):se.webkitHidden!==void 0&&(ae="webkitHidden",ee="webkitvisibilitychange",Me="webkitVisibilityState"),se.removeEventListener(ee,ce,!1),se.addEventListener(ee,ce,!1),_e=window.setInterval(function(){if(!(J.isSuspend||he||Y())){var be,$n,Zt=m(me);try{for(Zt.s();!(be=Zt.n()).done;){var an=be.value;re(an.type),an.detect(L++)}}catch(Vt){Zt.e(Vt)}finally{Zt.f()}P(),typeof h.ondevtoolclose=="function"&&($n=X,!ve()&&$n&&h.ondevtoolclose())}},h.interval),R=setTimeout(function(){O.pc||ge.isUsing()||U()},h.stopIntervalTime)}function U(){window.clearInterval(_e)}var W=8;function V(J){for(var B=(function(ae,Me){ae[Me>>5]|=128<<Me%32,ae[14+(Me+64>>>9<<4)]=Me;for(var ee=1732584193,se=-271733879,he=-1732584194,ce=271733878,be=0;be<ae.length;be+=16){var $n=ee,Zt=se,an=he,Vt=ce;ee=ie(ee,se,he,ce,ae[be+0],7,-680876936),ce=ie(ce,ee,se,he,ae[be+1],12,-389564586),he=ie(he,ce,ee,se,ae[be+2],17,606105819),se=ie(se,he,ce,ee,ae[be+3],22,-1044525330),ee=ie(ee,se,he,ce,ae[be+4],7,-176418897),ce=ie(ce,ee,se,he,ae[be+5],12,1200080426),he=ie(he,ce,ee,se,ae[be+6],17,-1473231341),se=ie(se,he,ce,ee,ae[be+7],22,-45705983),ee=ie(ee,se,he,ce,ae[be+8],7,1770035416),ce=ie(ce,ee,se,he,ae[be+9],12,-1958414417),he=ie(he,ce,ee,se,ae[be+10],17,-42063),se=ie(se,he,ce,ee,ae[be+11],22,-1990404162),ee=ie(ee,se,he,ce,ae[be+12],7,1804603682),ce=ie(ce,ee,se,he,ae[be+13],12,-40341101),he=ie(he,ce,ee,se,ae[be+14],17,-1502002290),se=ie(se,he,ce,ee,ae[be+15],22,1236535329),ee=fe(ee,se,he,ce,ae[be+1],5,-165796510),ce=fe(ce,ee,se,he,ae[be+6],9,-1069501632),he=fe(he,ce,ee,se,ae[be+11],14,643717713),se=fe(se,he,ce,ee,ae[be+0],20,-373897302),ee=fe(ee,se,he,ce,ae[be+5],5,-701558691),ce=fe(ce,ee,se,he,ae[be+10],9,38016083),he=fe(he,ce,ee,se,ae[be+15],14,-660478335),se=fe(se,he,ce,ee,ae[be+4],20,-405537848),ee=fe(ee,se,he,ce,ae[be+9],5,568446438),ce=fe(ce,ee,se,he,ae[be+14],9,-1019803690),he=fe(he,ce,ee,se,ae[be+3],14,-187363961),se=fe(se,he,ce,ee,ae[be+8],20,1163531501),ee=fe(ee,se,he,ce,ae[be+13],5,-1444681467),ce=fe(ce,ee,se,he,ae[be+2],9,-51403784),he=fe(he,ce,ee,se,ae[be+7],14,1735328473),se=fe(se,he,ce,ee,ae[be+12],20,-1926607734),ee=Oe(ee,se,he,ce,ae[be+5],4,-378558),ce=Oe(ce,ee,se,he,ae[be+8],11,-2022574463),he=Oe(he,ce,ee,se,ae[be+11],16,1839030562),se=Oe(se,he,ce,ee,ae[be+14],23,-35309556),ee=Oe(ee,se,he,ce,ae[be+1],4,-1530992060),ce=Oe(ce,ee,se,he,ae[be+4],11,1272893353),he=Oe(he,ce,ee,se,ae[be+7],16,-155497632),se=Oe(se,he,ce,ee,ae[be+10],23,-1094730640),ee=Oe(ee,se,he,ce,ae[be+13],4,681279174),ce=Oe(ce,ee,se,he,ae[be+0],11,-358537222),he=Oe(he,ce,ee,se,ae[be+3],16,-722521979),se=Oe(se,he,ce,ee,ae[be+6],23,76029189),ee=Oe(ee,se,he,ce,ae[be+9],4,-640364487),ce=Oe(ce,ee,se,he,ae[be+12],11,-421815835),he=Oe(he,ce,ee,se,ae[be+15],16,530742520),se=Oe(se,he,ce,ee,ae[be+2],23,-995338651),ee=Ce(ee,se,he,ce,ae[be+0],6,-198630844),ce=Ce(ce,ee,se,he,ae[be+7],10,1126891415),he=Ce(he,ce,ee,se,ae[be+14],15,-1416354905),se=Ce(se,he,ce,ee,ae[be+5],21,-57434055),ee=Ce(ee,se,he,ce,ae[be+12],6,1700485571),ce=Ce(ce,ee,se,he,ae[be+3],10,-1894986606),he=Ce(he,ce,ee,se,ae[be+10],15,-1051523),se=Ce(se,he,ce,ee,ae[be+1],21,-2054922799),ee=Ce(ee,se,he,ce,ae[be+8],6,1873313359),ce=Ce(ce,ee,se,he,ae[be+15],10,-30611744),he=Ce(he,ce,ee,se,ae[be+6],15,-1560198380),se=Ce(se,he,ce,ee,ae[be+13],21,1309151649),ee=Ce(ee,se,he,ce,ae[be+4],6,-145523070),ce=Ce(ce,ee,se,he,ae[be+11],10,-1120210379),he=Ce(he,ce,ee,se,ae[be+2],15,718787259),se=Ce(se,he,ce,ee,ae[be+9],21,-343485551),ee=Ne(ee,$n),se=Ne(se,Zt),he=Ne(he,an),ce=Ne(ce,Vt)}return Array(ee,se,he,ce)})((function(ae){for(var Me=Array(),ee=(1<<W)-1,se=0;se<ae.length*W;se+=W)Me[se>>5]|=(ae.charCodeAt(se/W)&ee)<<se%32;return Me})(J),J.length*W),Z="0123456789abcdef",ye="",xe=0;xe<4*B.length;xe++)ye+=Z.charAt(B[xe>>2]>>xe%4*8+4&15)+Z.charAt(B[xe>>2]>>xe%4*8&15);return ye}function H(J,B,Z,ye,xe,ae){return Ne((B=Ne(Ne(B,J),Ne(ye,ae)))<<xe|B>>>32-xe,Z)}function ie(J,B,Z,ye,xe,ae,Me){return H(B&Z|~B&ye,J,B,xe,ae,Me)}function fe(J,B,Z,ye,xe,ae,Me){return H(B&ye|Z&~ye,J,B,xe,ae,Me)}function Oe(J,B,Z,ye,xe,ae,Me){return H(B^Z^ye,J,B,xe,ae,Me)}function Ce(J,B,Z,ye,xe,ae,Me){return H(Z^(B|~ye),J,B,xe,ae,Me)}function Ne(J,B){var Z=(65535&J)+(65535&B);return(J>>16)+(B>>16)+(Z>>16)<<16|65535&Z}var Re=(function(){s(B,oe);var J=d(B);function B(){return r(this,B),J.call(this,{type:k.RegToString,enabled:O.qqBrowser||O.firefox})}return o(B,[{key:"init",value:function(){var Z=this;this.lastTime=0,this.reg=/./,E(this.reg),this.reg.toString=function(){var ye;return O.qqBrowser?(ye=new Date().getTime(),Z.lastTime&&ye-Z.lastTime<100?Z.onDevToolOpen():Z.lastTime=ye):O.firefox&&Z.onDevToolOpen(),""}}},{key:"detect",value:function(){E(this.reg)}}]),B})(),Ve=(function(){s(B,oe);var J=d(B);function B(){return r(this,B),J.call(this,{type:k.DefineId})}return o(B,[{key:"init",value:function(){var Z=this;this.div=document.createElement("div"),this.div.__defineGetter__("id",function(){Z.onDevToolOpen()}),Object.defineProperty(this.div,"id",{get:function(){Z.onDevToolOpen()}})}},{key:"detect",value:function(){E(this.div)}}]),B})(),ct=(function(){s(B,oe);var J=d(B);function B(){return r(this,B),J.call(this,{type:k.Size,enabled:!O.iframe&&!O.edge})}return o(B,[{key:"init",value:function(){var Z=this;this.checkWindowSizeUneven(),window.addEventListener("resize",function(){setTimeout(function(){Z.checkWindowSizeUneven()},100)},!0)}},{key:"detect",value:function(){}},{key:"checkWindowSizeUneven",value:function(){var Z=(function(){if(Ze(window.devicePixelRatio))return window.devicePixelRatio;var xe=window.screen;return!!(Ze(xe)&&xe.deviceXDPI&&xe.logicalXDPI)&&xe.deviceXDPI/xe.logicalXDPI})();if(Z!==!1){var ye=200<window.outerWidth-window.innerWidth*Z,Z=300<window.outerHeight-window.innerHeight*Z;if(ye||Z)return this.onDevToolOpen(),!1;re(this.type)}return!0}}]),B})();function Ze(J){return J!=null}var et,He=(function(){s(B,oe);var J=d(B);function B(){return r(this,B),J.call(this,{type:k.DateToString,enabled:!O.iosChrome&&!O.iosEdge})}return o(B,[{key:"init",value:function(){var Z=this;this.count=0,this.date=new Date,this.date.toString=function(){return Z.count++,""}}},{key:"detect",value:function(){this.count=0,E(this.date),P(),2<=this.count&&this.onDevToolOpen()}}]),B})(),pt=(function(){s(B,oe);var J=d(B);function B(){return r(this,B),J.call(this,{type:k.FuncToString,enabled:!O.iosChrome&&!O.iosEdge})}return o(B,[{key:"init",value:function(){var Z=this;this.count=0,this.func=function(){},this.func.toString=function(){return Z.count++,""}}},{key:"detect",value:function(){this.count=0,E(this.func),P(),2<=this.count&&this.onDevToolOpen()}}]),B})(),ot=(function(){s(B,oe);var J=d(B);function B(){return r(this,B),J.call(this,{type:k.Debugger,enabled:O.iosChrome||O.iosEdge})}return o(B,[{key:"detect",value:function(){var Z=S();100<S()-Z&&this.onDevToolOpen()}}]),B})(),gt=(function(){s(B,oe);var J=d(B);function B(){var Z;return r(this,B),(Z=J.call(this,{type:k.Performance,enabled:O.chrome||!O.mobile})).count=0,Z}return o(B,[{key:"init",value:function(){this.maxPrintTime=0,this.largeObjectArray=I()}},{key:"detect",value:function(){var Z=this,ye=w(function(){T(Z.largeObjectArray)}),xe=w(function(){E(Z.largeObjectArray)});if(this.maxPrintTime=Math.max(this.maxPrintTime,xe),P(),ye===0||this.maxPrintTime===0)return!1;ye>10*this.maxPrintTime&&(2<=this.count?this.onDevToolOpen():(this.count++,this.detect()))}}]),B})(),jt=(a(et={},k.RegToString,Re),a(et,k.DefineId,Ve),a(et,k.Size,ct),a(et,k.DateToString,He),a(et,k.FuncToString,pt),a(et,k.Debugger,ot),a(et,k.Performance,gt),a(et,k.DebugLib,ge),et),vn=Object.assign(function(J){function B(){var Me=0<arguments.length&&arguments[0]!==void 0?arguments[0]:"";return{success:!Me,reason:Me}}var Z;if(vn.isRunning)return B("already running");if(q(),Z=window.console||{log:function(){},table:function(){},clear:function(){}},A=O.ie?(E=function(){return Z.log.apply(Z,arguments)},T=function(){return Z.table.apply(Z,arguments)},function(){return Z.clear()}):(E=Z.log,T=Z.table,Z.clear),C(J),h.md5&&V((function(Me){var ee=window.location.search,se=window.location.hash;return(ee=ee===""&&se!==""?"?".concat(se.split("?")[1]):ee)!==""&&ee!==void 0&&(se=new RegExp("(^|&)"+Me+"=([^&]*)(&|$)","i"),Me=ee.substr(1).match(se),Me!=null)?unescape(Me[2]):""})(h.tkName))===h.md5)return B("token passed");if(h.seo&&O.seoBot)return B("seobot");vn.isRunning=!0,$(vn);var ye=vn,xe=(le=function(){return ye.isSuspend},window.top),ae=window.parent;if(de(window),h.disableIframeParents&&xe&&ae&&xe!==window){for(;ae!==xe;)de(ae),ae=ae.parent;de(xe)}return(h.detectors==="all"?Object.keys(jt):h.detectors).forEach(function(Me){new jt[Me]}),B()},{isRunning:!1,isSuspend:!1,md5:V,version:"0.3.9",DetectorType:k,isDevToolOpened:ve});return Re=(function(){if(typeof window>"u"||!window.document)return null;var J=document.querySelector("[disable-devtool-auto]");if(!J)return null;var B=["disable-menu","disable-select","disable-copy","disable-cut","disable-paste","clear-log"],Z=["interval"],ye={};return["md5","url","tk-name","detectors"].concat(B,Z).forEach(function(xe){var ae=J.getAttribute(xe);ae!==null&&(Z.indexOf(xe)!==-1?ae=parseInt(ae):B.indexOf(xe)!==-1?ae=ae!=="false":xe==="detector"&&ae!=="all"&&(ae=ae.split(" ")),ye[(function(Me){if(Me.indexOf("-")===-1)return Me;var ee=!1;return Me.split("").map(function(se){return se==="-"?(ee=!0,""):ee?(ee=!1,se.toUpperCase()):se}).join("")})(xe)]=ae)}),ye})(),Re&&vn(Re),vn})})(Go)),Go.exports}var eT=Z2();const tT=jr(eT);function nT(){window.__GLOBAL_CONFIG__.allowDebug||tT({disableMenu:!1})}function Xd(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Te(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Xd(Object(n),!0).forEach(function(r){mt(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Xd(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function Je(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Je=function(e){return typeof e}:Je=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Je(t)}function rT(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function mt(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function iT(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&xl(t,e)}function da(t){return da=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},da(t)}function xl(t,e){return xl=Object.setPrototypeOf||function(r,i){return r.__proto__=i,r},xl(t,e)}function oT(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function aT(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function sT(t,e){if(e&&(typeof e=="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return aT(t)}function lT(t){var e=oT();return function(){var r=da(t),i;if(e){var o=da(this).constructor;i=Reflect.construct(r,arguments,o)}else i=r.apply(this,arguments);return sT(this,i)}}function cT(t,e){return dT(t)||pT(t,e)||xm(t,e)||mT()}function We(t){return uT(t)||fT(t)||xm(t)||hT()}function uT(t){if(Array.isArray(t))return Ol(t)}function dT(t){if(Array.isArray(t))return t}function fT(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function pT(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r=[],i=!0,o=!1,a,s;try{for(n=n.call(t);!(i=(a=n.next()).done)&&(r.push(a.value),!(e&&r.length===e));i=!0);}catch(l){o=!0,s=l}finally{try{!i&&n.return!=null&&n.return()}finally{if(o)throw s}}return r}}function xm(t,e){if(t){if(typeof t=="string")return Ol(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ol(t,e)}}function Ol(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function hT(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
13
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function mT(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
14
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Fc(t,e){return Object.keys(t).reduce(function(n,r){return(!e||e.indexOf(r)===-1)&&(n[r]=t[r]),n},{})}function Ht(t){return Array.isArray(t)?t:[null,void 0,""].indexOf(t)>-1?[]:[t]}var vT="fcCheckbox",gT=Ee({name:vT,inheritAttrs:!1,props:{formCreateInject:Object,modelValue:{type:Array,default:function(){return[]}},type:String,options:Array,input:Boolean,inputValue:String},emits:["update:modelValue","fc.el"],setup:function(e,n){var r=Rt(e.formCreateInject,"options",[]),i=Rt(e,"options"),o=Rt(e,"modelValue"),a=Rt(e,"inputValue",""),s=K(a.value),l=Rt(e,"input",!1),u=function(m){var p=We(Ht(o.value)),h=p.indexOf(s.value);s.value=m,h>-1&&(p.splice(h,1),p.push(m),d(p))};Ae(a,function(f){if(!l.value){s.value=f;return}u(f)});var c=te(function(){var f=r.value||[];return i.value&&(f=i.value||[]),Array.isArray(f)?f:[]});Ae(o,function(f){var m=null;if(!a.value&&f!=null&&Array.isArray(f)&&f.length>0&&l.value){var p=c.value.map(function(h){return h.value});f.forEach(function(h){p.indexOf(h)===-1&&(m=h)})}m!=null&&(s.value=m)},{immediate:!0});var d=function(m){n.emit("update:modelValue",m)};return{options:c,value:o,onInput:d,updateCustomValue:u,makeInput:function(m){if(l.value)return j(m,{value:s.value||void 0,label:s.value||void 0},{default:function(){return[j(ze("ElInput"),{size:"small",modelValue:s.value,"onUpdate:modelValue":u},null)]}})}}},render:function(){var e,n,r=this,i=this.type==="button"?"ElCheckboxButton":"ElCheckbox",o=ze(i);return j(ze("ElCheckboxGroup"),Ye(this.$attrs,{modelValue:this.value===null?void 0:this.value,"onUpdate:modelValue":this.onInput,ref:"el"}),Te({default:function(){return[r.options.map(function(s,l){var u=Te({},s),c=u.value,d=u.label;return delete u.value,delete u.label,j(o,Ye(u,{label:c,value:c,key:i+l+"-"+c}),{default:function(){return[d||c||""]}})}),(e=(n=r.$slots).default)===null||e===void 0?void 0:e.call(n),r.makeInput(o)]}},Fc(this.$slots,["default"])))},mounted:function(){this.$emit("fc.el",this.$refs.el)}});function Om(t){t=t||new Map;var e={$on:function(r,i){var o=t.get(r),a=o&&o.push(i);a||t.set(r,[i])},$once:function(r,i){i._once=!0,e.$on(r,i)},$off:function(r,i){var o=t.get(r);o&&o.splice(o.indexOf(i)>>>0,1)},$emit:function(r){for(var i=arguments.length,o=new Array(i>1?i-1:0),a=1;a<i;a++)o[a-1]=arguments[a];(t.get(r)||[]).slice().map(function(s){s._once&&(e.$off(r,s),delete s._once),s.apply(void 0,o)}),(t.get("*")||[]).slice().map(function(s){s(r,o)})}};return e}function Va(t,e){e===void 0&&(e={});var n=e.insertAt;if(!(!t||typeof document>"u")){var r=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css",n==="top"&&r.firstChild?r.insertBefore(i,r.firstChild):r.appendChild(i),i.styleSheet?i.styleSheet.cssText=t:i.appendChild(document.createTextNode(t))}}var _T="._fc-frame ._fc-files img{display:inline-block;height:100%;vertical-align:top;width:100%}._fc-frame ._fc-upload-btn{border:1px dashed #c0ccda;cursor:pointer}._fc-frame._fc-disabled ._fc-upload-btn,._fc-frame._fc-disabled .el-button{color:#999;cursor:not-allowed!important}._fc-frame ._fc-upload-cover{background:rgba(0,0,0,.6);bottom:0;left:0;opacity:0;position:absolute;right:0;top:0;-webkit-transition:opacity .3s;-o-transition:opacity .3s;transition:opacity .3s}._fc-frame ._fc-upload-cover i{color:#fff;cursor:pointer;font-size:20px;margin:0 2px}._fc-frame ._fc-files:hover ._fc-upload-cover{opacity:1}._fc-frame .el-upload{display:block}._fc-frame ._fc-upload-icon{cursor:pointer}._fc-files,._fc-frame ._fc-upload-btn{background:#fff;border:1px solid #c0ccda;border-radius:4px;-webkit-box-shadow:2px 2px 5px rgba(0,0,0,.1);box-shadow:2px 2px 5px rgba(0,0,0,.1);-webkit-box-sizing:border-box;box-sizing:border-box;display:inline-block;height:58px;line-height:58px;margin-right:4px;overflow:hidden;position:relative;text-align:center;width:58px}";Va(_T);var Am={name:"IconCircleClose"},yT={class:"icon",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg"},bT=_("path",{fill:"currentColor",d:"M466.752 512l-90.496-90.496a32 32 0 0145.248-45.248L512 466.752l90.496-90.496a32 32 0 1145.248 45.248L557.248 512l90.496 90.496a32 32 0 11-45.248 45.248L512 557.248l-90.496 90.496a32 32 0 01-45.248-45.248L466.752 512z"},null,-1),wT=_("path",{fill:"currentColor",d:"M512 896a384 384 0 100-768 384 384 0 000 768zm0 64a448 448 0 110-896 448 448 0 010 896z"},null,-1),ST=[bT,wT];function CT(t,e,n,r,i,o){return b(),x("svg",yT,ST)}Am.render=CT;var $m={name:"IconDocument"},ET={class:"icon",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg"},TT=_("path",{fill:"currentColor",d:"M832 384H576V128H192v768h640V384zm-26.496-64L640 154.496V320h165.504zM160 64h480l256 256v608a32 32 0 01-32 32H160a32 32 0 01-32-32V96a32 32 0 0132-32zm160 448h384v64H320v-64zm0-192h160v64H320v-64zm0 384h384v64H320v-64z"},null,-1),xT=[TT];function OT(t,e,n,r,i,o){return b(),x("svg",ET,xT)}$m.render=OT;var Rm={name:"IconDelete"},AT={class:"icon",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg"},$T=_("path",{fill:"currentColor",d:"M160 256H96a32 32 0 010-64h256V95.936a32 32 0 0132-32h256a32 32 0 0132 32V192h256a32 32 0 110 64h-64v672a32 32 0 01-32 32H192a32 32 0 01-32-32V256zm448-64v-64H416v64h192zM224 896h576V256H224v640zm192-128a32 32 0 01-32-32V416a32 32 0 0164 0v320a32 32 0 01-32 32zm192 0a32 32 0 01-32-32V416a32 32 0 0164 0v320a32 32 0 01-32 32z"},null,-1),RT=[$T];function PT(t,e,n,r,i,o){return b(),x("svg",AT,RT)}Rm.render=PT;var Pm={name:"IconView"},kT={class:"icon",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg"},IT=_("path",{fill:"currentColor",d:"M512 160c320 0 512 352 512 352S832 864 512 864 0 512 0 512s192-352 512-352zm0 64c-225.28 0-384.128 208.064-436.8 288 52.608 79.872 211.456 288 436.8 288 225.28 0 384.128-208.064 436.8-288-52.608-79.872-211.456-288-436.8-288zm0 64a224 224 0 110 448 224 224 0 010-448zm0 64a160.192 160.192 0 00-160 160c0 88.192 71.744 160 160 160s160-71.808 160-160-71.744-160-160-160z"},null,-1),MT=[IT];function FT(t,e,n,r,i,o){return b(),x("svg",kT,MT)}Pm.render=FT;var km={name:"IconFolderOpened"},DT={class:"icon",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg"},LT=_("path",{fill:"currentColor",d:"M878.08 448H241.92l-96 384h636.16l96-384zM832 384v-64H485.76L357.504 192H128v448l57.92-231.744A32 32 0 01216.96 384H832zm-24.96 512H96a32 32 0 01-32-32V160a32 32 0 0132-32h287.872l128.384 128H864a32 32 0 0132 32v96h23.04a32 32 0 0131.04 39.744l-112 448A32 32 0 01807.04 896z"},null,-1),jT=[LT];function VT(t,e,n,r,i,o){return b(),x("svg",DT,jT)}km.render=VT;var zT="fcFrame",NT=Ee({name:zT,props:{type:{type:String,default:"input"},field:String,helper:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},src:{type:String,required:!0},icon:{type:String,default:"IconFolderOpened"},width:{type:String,default:"500px"},height:{type:String,default:"370px"},maxLength:{type:Number,default:0},okBtnText:{type:String,default:""},closeBtnText:{type:String,default:""},modalTitle:String,handleIcon:{type:[String,Boolean],default:void 0},title:String,allowRemove:{type:Boolean,default:!0},onOpen:{type:Function,default:function(){}},onOk:{type:Function,default:function(){}},onCancel:{type:Function,default:function(){}},onLoad:{type:Function,default:function(){}},onBeforeRemove:{type:Function,default:function(){}},onRemove:{type:Function,default:function(){}},onHandle:Function,modal:{type:Object,default:function(){return{}}},srcKey:[String,Number],modelValue:[Array,String,Number,Object],previewMask:void 0,footer:{type:Boolean,default:!0},reload:{type:Boolean,default:!0},closeBtn:{type:Boolean,default:!0},okBtn:{type:Boolean,default:!0},formCreateInject:Object},emits:["update:modelValue","change"],components:{IconFolderOpened:km,IconView:Pm},data:function(){return{fileList:Ht(this.modelValue),previewVisible:!1,frameVisible:!1,previewImage:"",bus:new Om}},watch:{modelValue:function(e){this.fileList=Ht(e)}},methods:{close:function(){this.closeModel(!0)},closeModel:function(e){this.bus.$emit(e?"$close":"$ok"),this.reload&&(this.bus.$off("$ok"),this.bus.$off("$close")),this.frameVisible=!1},handleCancel:function(){this.previewVisible=!1},showModel:function(){this.disabled||this.onOpen()===!1||(this.frameVisible=!0)},input:function(){var e=this.fileList,n=this.maxLength===1?e[0]||"":e;this.$emit("update:modelValue",n),this.$emit("change",n)},makeInput:function(){var e=this;return j(ze("ElInput"),Ye({type:"text",modelValue:this.fileList.map(function(n){return e.getSrc(n)}).toString(),readonly:!0},{key:1}),{append:function(){return j(ze("ElButton"),{icon:ze(e.icon),onClick:function(){return e.showModel()}},null)},suffix:function(){return e.fileList.length&&!e.disabled?j(ze("ElIcon"),{class:"el-input__icon _fc-upload-icon",onClick:function(){e.fileList=[],e.input()}},{default:function(){return[j(Am,null,null)]}}):null}})},makeGroup:function(e){return(!this.maxLength||this.fileList.length<this.maxLength)&&e.push(this.makeBtn()),j("div",{key:2},[e])},makeItem:function(e,n){return j("div",{class:"_fc-files",key:"3"+e},[n])},valid:function(e){var n=this.formCreateInject.field||this.field;if(n&&e!==n)throw new Error("[frame]无效的字段值")},makeIcons:function(e,n){if(this.handleIcon!==!1||this.allowRemove===!0){var r=[];return(this.type!=="file"&&this.handleIcon!==!1||this.type==="file"&&this.handleIcon)&&r.push(this.makeHandleIcon(e,n)),this.allowRemove&&r.push(this.makeRemoveIcon(e,n)),j("div",{class:"_fc-upload-cover",key:4},[r])}},makeHandleIcon:function(e,n){var r=this,i=ze(this.handleIcon===!0||this.handleIcon===void 0?"icon-view":this.handleIcon);return j(ze("ElIcon"),{onClick:function(){return r.handleClick(e)},key:"5"+n},{default:function(){return[j(i,null,null)]}})},makeRemoveIcon:function(e,n){var r=this;return j(ze("ElIcon"),{onClick:function(){return r.handleRemove(e)},key:"6"+n},{default:function(){return[j(Rm,null,null)]}})},makeFiles:function(){var e=this;return this.makeGroup(this.fileList.map(function(n,r){return e.makeItem(r,[j(ze("ElIcon"),{onClick:function(){return e.handleClick(n)}},{default:function(){return[j($m,null,null)]}}),e.makeIcons(n,r)])}))},makeImages:function(){var e=this;return this.makeGroup(this.fileList.map(function(n,r){return e.makeItem(r,[j("img",{src:e.getSrc(n)},null),e.makeIcons(n,r)])}))},makeBtn:function(){var e=this,n=ze(this.icon);return j("div",{class:"_fc-upload-btn",onClick:function(){return e.showModel()},key:7},[j(ze("ElIcon"),null,{default:function(){return[j(n,null,null)]}})])},handleClick:function(e){if(this.onHandle)return this.onHandle(e);this.previewImage=this.getSrc(e),this.previewVisible=!0},handleRemove:function(e){this.disabled||this.onBeforeRemove(e)!==!1&&(this.fileList.splice(this.fileList.indexOf(e),1),this.input(),this.onRemove(e))},getSrc:function(e){return this.srcKey?e[this.srcKey]:e},frameLoad:function(e){var n=this;this.onLoad(e);try{this.helper===!0&&(e.form_create_helper={api:this.formCreateInject.api,close:function(i){n.valid(i),n.closeModel()},set:function(i,o){n.valid(i),!n.disabled&&n.$emit("update:modelValue",o)},get:function(i){return n.valid(i),n.modelValue},onOk:function(i){return n.bus.$on("$ok",i)},onClose:function(i){return n.bus.$on("$close",i)}})}catch(r){console.error(r)}},makeFooter:function(){var e=this,n=this.$props,r=n.okBtnText,i=n.closeBtnText,o=n.closeBtn,a=n.okBtn,s=n.footer;if(s)return j("div",null,[o?j(ze("ElButton"),{onClick:function(){return e.onCancel()!==!1&&(e.frameVisible=!1)}},{default:function(){return[i||e.formCreateInject.t("close")||"关闭"]}}):null,a?j(ze("ElButton"),{type:"primary",onClick:function(){return e.onOk()!==!1&&e.closeModel()}},{default:function(){return[r||e.formCreateInject.t("ok")||"确定"]}}):null])}},render:function(){var e=this,n=this.type,r;n==="input"?r=this.makeInput():n==="image"?r=this.makeImages():r=this.makeFiles();var i=this.$props,o=i.width,a=o===void 0?"30%":o,s=i.height,l=i.src,u=i.title,c=i.modalTitle;return Xe(function(){e.$refs.frame&&e.frameLoad(e.$refs.frame.contentWindow||{})}),j("div",{class:{"_fc-frame":!0,"_fc-disabled":this.disabled}},[r,j(ze("ElDialog"),{appendToBody:!0,modal:this.previewMask,title:c,modelValue:this.previewVisible,onClose:this.handleCancel},{default:function(){return[j("img",{style:"width: 100%",src:e.previewImage},null)]}}),j(ze("ElDialog"),Ye({appendToBody:!0},Te({width:a,title:u},this.modal),{modelValue:this.frameVisible,onClose:function(){return e.closeModel(!0)}}),{default:function(){return[e.frameVisible||!e.reload?j("iframe",{ref:"frame",src:l,frameBorder:"0",style:{height:s,border:"0 none",width:"100%"}},null):null]},footer:function(){return e.makeFooter()}})])},beforeMount:function(){var e=this.formCreateInject,n=e.name,r=e.field,i=e.api;n&&i.on("fc:closeModal:"+n,this.close),r&&i.on("fc:closeModal:"+r,this.close)},beforeUnmount:function(){var e=this.formCreateInject,n=e.name,r=e.field,i=e.api;n&&i.off("fc:closeModal:"+n,this.close),r&&i.off("fc:closeModal:"+r,this.close)}}),UT="fcRadio",BT=Ee({name:UT,inheritAttrs:!1,props:{formCreateInject:Object,modelValue:{type:[String,Number,Boolean],default:""},options:Array,type:String,input:Boolean,inputValue:String},emits:["update:modelValue","fc.el"],setup:function(e,n){var r=Rt(e.formCreateInject,"options",[]),i=Rt(e,"options"),o=Rt(e,"modelValue"),a=Rt(e,"inputValue",""),s=K(a.value),l=Rt(e,"input",!1);Ae(a,function(f){if(!l.value){s.value=f;return}d(f)});var u=te(function(){var f=r.value||[];return i.value&&(f=i.value||[]),Array.isArray(f)?f:[]});Ae(o,function(f){var m=!1;!a.value&&f!=null&&l.value&&(m=u.value.map(function(p){return p.value}).indexOf(f)===-1),m&&(s.value=f)},{immediate:!0});var c=function(m){n.emit("update:modelValue",m)},d=function(m){var p=s.value;s.value=m,o.value===p&&c(m)};return{options:u,value:o,onInput:c,updateCustomValue:d,customValue:s,makeInput:function(m){if(l.value)return j(m,{checked:!1,value:s.value||void 0,label:s.value||void 0},{default:function(){return[j(ze("ElInput"),{size:"small",modelValue:s.value,"onUpdate:modelValue":d},null)]}})}}},render:function(){var e,n,r=this,i=this.type==="button"?"ElRadioButton":"ElRadio",o=ze(i);return j(ze("ElRadioGroup"),Ye(this.$attrs,{modelValue:this.value,"onUpdate:modelValue":this.onInput,ref:"el"}),Te({default:function(){return[r.options.map(function(s,l){var u=Te({},s),c=u.value,d=u.label;return delete u.value,delete u.label,j(o,Ye(u,{label:c,value:c,key:i+l+"-"+c}),{default:function(){return[d||c||""]}})}),(e=(n=r.$slots).default)===null||e===void 0?void 0:e.call(n),r.makeInput(o)]}},Fc(this.$slots,["default"])))},mounted:function(){this.$emit("fc.el",this.$refs.el)}}),pe={type:function(e,n){return Object.prototype.toString.call(e)==="[object "+n+"]"},Undef:function(e){return e==null},Element:function(e){return Je(e)==="object"&&e!==null&&e.nodeType===1&&!pe.Object(e)},trueArray:function(e){return Array.isArray(e)&&e.length>0},Function:function(e){var n=this.getType(e);return n==="Function"||n==="AsyncFunction"},getType:function(e){var n=Object.prototype.toString.call(e);return/^\[object (.*)\]$/.exec(n)[1]},empty:function(e){return e==null||Array.isArray(e)&&Array.isArray(e)&&!e.length?!0:typeof e=="string"&&!e}};["Date","Object","String","Boolean","Array","Number"].forEach(function(t){pe[t]=function(e){return pe.type(e,t)}});function dt(t,e){return{}.hasOwnProperty.call(t,e)}var HT="fcSelect",Im=Ee({name:HT,inheritAttrs:!1,props:{formCreateInject:Object,modelValue:{type:[Array,String,Number,Boolean,Object],default:void 0},type:String},emits:["update:modelValue","fc.el"],setup:function(e,n){var r=n.emit,i=Rt(e.formCreateInject,"options",[]),o=Rt(e,"modelValue"),a=te(function(){return Array.isArray(i.value)?i.value:[]}),s=function(u){r("update:modelValue",u)};return{options:a,value:o,handleUpdate:s,hasProperty:dt,is:pe}},mounted:function(){this.$emit("fc.el",this.$refs.el)}});function qT(t,e,n,r,i,o){var a=ze("el-option"),s=ze("el-option-group"),l=ze("el-select");return b(),ne(l,Ye(t.$attrs,{"model-value":t.value,"onUpdate:modelValue":t.handleUpdate,ref:"el"}),{default:we(function(){return[(b(!0),x(Ie,null,qe(t.options,function(u,c){return b(),x(Ie,null,[t.hasProperty(u,"options")?(b(),ne(s,{label:u.label,key:"".concat(c,"-").concat(u.label)},{default:we(function(){return[(b(!0),x(Ie,null,qe(t.is.trueArray(u.options)?u.options:[],function(d,f){return b(),ne(a,Ye({key:"".concat(f,"-").concat(d.value)},d),null,16)}),128))]}),_:2},1032,["label"])):(b(),ne(a,Ye(mt({key:1},"key","".concat(c,"-").concat(u.value)),u),null,16))],64)}),256)),Ue(t.$slots,"default")]}),_:3},16,["model-value","onUpdate:modelValue"])}Im.render=qT;var WT="fcTree",KT=Ee({name:WT,inheritAttrs:!1,formCreateParser:{mergeProp:function(e){var n=e.prop.props;n.nodeKey||(n.nodeKey="id"),n.props||(n.props={label:"title"})}},props:{type:String,modelValue:{type:[Array,String,Number],default:function(){return[]}}},emits:["update:modelValue","fc.el"],watch:{modelValue:function(){this.setValue()}},methods:{updateValue:function(){if(this.$refs.tree){var e;this.type==="selected"?e=this.$refs.tree.getCurrentKey():e=this.$refs.tree.getCheckedKeys(),this.$emit("update:modelValue",e)}},setValue:function(){if(this.$refs.tree){var e=this.type;e==="selected"?this.$refs.tree.setCurrentKey(this.modelValue):this.$refs.tree.setCheckedKeys(Ht(this.modelValue))}}},render:function(){return j(ze("ElTree"),Ye(this.$attrs,{ref:"tree",onCheck:this.updateValue,onNodeClick:this.updateValue}),this.$slots)},mounted:function(){this.setValue(),this.$emit("fc.el",this.$refs.tree)}}),YT="._fc-upload{width:100%}._fc-exceed .el-upload{display:none}.el-upload-list.is-disabled .el-upload{cursor:not-allowed!important}";Va(YT);var Mm={name:"IconUpload"},GT={class:"icon",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg"},QT=_("path",{fill:"currentColor",d:"M160 832h704a32 32 0 110 64H160a32 32 0 110-64zm384-578.304V704h-64V247.296L237.248 490.048 192 444.8 508.8 128l316.8 316.8-45.312 45.248L544 253.696z"},null,-1),XT=[QT];function JT(t,e,n,r,i,o){return b(),x("svg",GT,XT)}Mm.render=JT;function Jd(t,e){return Je(t)==="object"?t:{url:t,is_string:!0,name:ZT(t),uid:e}}function Zd(t){return Te(Te({},t),{},{file:t,value:t})}function ZT(t){return(""+t).split("/").pop()}var ex="fcUpload",tx=Ee({name:ex,inheritAttrs:!1,formCreateParser:{toFormValue:function(e){return Ht(e)},toValue:function(e,n){return n.prop.props.limit===1?e[0]||"":e}},props:{previewMask:void 0,onPreview:Function,httpRequest:Function,modalTitle:String,listType:String,uploadText:String,formCreateInject:Object,modelValue:[Array,String,Object]},emits:["update:modelValue","change","remove","fc.el"],data:function(){return{previewVisible:!1,previewImage:"",fileList:[]}},created:function(){this.fileList=Ht(this.modelValue).map(Jd).map(Zd)},watch:{modelValue:function(e){this.fileList=Ht(e).map(Jd).map(Zd)}},methods:{handlePreview:function(e){this.onPreview?this.onPreview.apply(this,arguments):this.listType==="text"?window.open(e.url):(this.previewImage=e.url,this.previewVisible=!0)},update:function(e){var n=e.map(function(r){return r.is_string?r.url:r.value||r.url}).filter(function(r){return r!==void 0});this.$emit("update:modelValue",n)},handleCancel:function(){this.previewVisible=!1},handleChange:function(e,n){this.$emit.apply(this,["change"].concat(Array.prototype.slice.call(arguments))),e.status==="success"&&this.update(n)},handleRemove:function(e,n){this.$emit.apply(this,["remove"].concat(Array.prototype.slice.call(arguments))),this.update(n)},doHttpRequest:function(e){if(this.httpRequest)return this.httpRequest(e);e.source="upload",this.formCreateInject.api.fetch(e)}},render:function(){var e,n,r=this,i=Ht(this.modelValue).length;return j("div",{class:"_fc-upload"},[j(ze("ElUpload"),Ye({key:i},this.$attrs,{listType:this.listType||"picture-card",class:{"_fc-exceed":this.$attrs.limit?this.$attrs.limit<=i:!1},onPreview:this.handlePreview,onChange:this.handleChange,onRemove:this.handleRemove,httpRequest:this.doHttpRequest,fileList:this.fileList,ref:"upload"}),Te({default:function(){return[((e=(n=r.$slots).default)===null||e===void 0?void 0:e.call(n))||(["text","picture"].indexOf(r.listType)===-1?j(ze("ElIcon"),null,{default:function(){return[j(Mm,null,null)]}}):j(ze("ElButton"),{type:"primary"},{default:function(){return[r.formCreateInject.t("clickToUpload")||r.uploadText||"点击上传"]}}))]}},Fc(this.$slots,["default"]))),j(ze("ElDialog"),{appendToBody:!0,modal:this.previewMask,title:this.modalTitle,modelValue:this.previewVisible,onClose:this.handleCancel},{default:function(){return[j("img",{style:"width: 100%",src:r.previewImage},null)]}})])},mounted:function(){this.$emit("fc.el",this.$refs.upload)}});function cn(t,e,n){t[e]=n}function wr(t,e){delete t[e]}function io(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0,r=!1;for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var o=e[i];if((r=Array.isArray(o))||pe.Object(o)){var a=t[i]===void 0;if(r)r=!1,a&&cn(t,i,[]);else if(o._clone&&n!==void 0)if(n)o=o.getRule(),a&&cn(t,i,{});else{cn(t,i,o._clone());continue}else a&&cn(t,i,{});t[i]=io(t[i],o,n)}else cn(t,i,o),pe.Undef(o)||(pe.Undef(o.__json)||(t[i].__json=o.__json),pe.Undef(o.__origin)||(t[i].__origin=o.__origin))}return n!==void 0&&Array.isArray(t)?t.filter(function(s){return!s||!s.__ctrl}):t}function Fn(t){return io({},{value:t}).value}var nx=Object.assign||function(t){for(var e,n=1;n<arguments.length;n++)for(var r in e=arguments[n],e)Object.prototype.hasOwnProperty.call(e,r)&&cn(t,r,e[r]);return t};function Fe(){return nx.apply(this,arguments)}function Al(t){return Je(t)!=="object"||t===null?t:t instanceof Array?We(t):Te({},t)}var rx='._fc-group{display:flex;flex-direction:column;justify-content:center;min-height:38px;width:100%}._fc-group-disabled ._fc-group-add,._fc-group-disabled ._fc-group-btn{cursor:not-allowed}._fc-group-handle{background-color:#fff;border:1px dashed #d9d9d9;border-radius:15px;bottom:-15px;display:flex;flex-direction:row;padding:3px 8px;position:absolute;right:30px}._fc-group-btn{cursor:pointer}._fc-group-idx{align-items:center;background:#eee;border-radius:15px;bottom:-15px;display:flex;font-weight:700;height:30px;justify-content:center;left:10px;position:absolute;width:30px}._fc-group-handle ._fc-group-btn+._fc-group-btn{margin-left:7px}._fc-group-container{border:1px dashed #d9d9d9;border-radius:5px;display:flex;flex-direction:column;margin:5px 5px 25px;padding:20px 20px 25px;position:relative}._fc-group-arrow{height:20px;position:relative;width:20px}._fc-group-arrow:before{border-left:2px solid #999;border-top:2px solid #999;content:"";height:9px;left:5px;position:absolute;top:8px;transform:rotate(45deg);width:9px}._fc-group-arrow._fc-group-down{transform:rotate(180deg)}._fc-group-plus-minus{cursor:pointer;height:20px;position:relative;width:20px}._fc-group-plus-minus:after,._fc-group-plus-minus:before{background-color:#409eff;content:"";height:2px;left:50%;position:absolute;top:50%;transform:translate(-50%,-50%);width:60%}._fc-group-plus-minus:before{transform:translate(-50%,-50%) rotate(90deg)}._fc-group-plus-minus._fc-group-minus:before{display:none}._fc-group-plus-minus._fc-group-minus:after{background-color:#f56c6c}._fc-group-add{border:1px solid rgba(64,158,255,.5);border-radius:15px;cursor:pointer;height:25px;width:25px}._fc-group-add._fc-group-plus-minus:after,._fc-group-add._fc-group-plus-minus:before{width:50%}._fc-group._fc-group-card{display:flex;flex-direction:column;gap:16px;width:100%}._fc-group._fc-group-card._fc-group-disabled ._fc-group-add,._fc-group._fc-group-card._fc-group-disabled ._fc-group-btn{cursor:not-allowed;opacity:.5}._fc-group._fc-group-card ._fc-group-container{background:#fff;border:1px solid #f0f0f0;border-radius:6px;display:flex;flex-direction:column;margin:0;overflow:hidden;padding:0;position:relative}._fc-group._fc-group-card ._fc-group-header{align-items:center;background:#fafafa;border-bottom:1px solid #f0f0f0;display:flex;justify-content:space-between;padding:16px 20px 12px}._fc-group._fc-group-card ._fc-group-idx{align-items:center;background:#f0f0f0;border:1px solid #e0e0e0;border-radius:6px;color:#666;display:flex;flex-shrink:0;font-size:12px;font-weight:500;height:24px;justify-content:center;margin-right:12px;position:static;width:24px}._fc-group._fc-group-card ._fc-group-title{color:rgba(0,0,0,.85);flex:1;font-size:14px;font-weight:500;line-height:1.5715}._fc-group._fc-group-card ._fc-group-handle{align-items:center;background-color:transparent;border:none;border-radius:0;bottom:auto;display:flex;flex-direction:row;flex-shrink:0;gap:4px;margin-left:12px;padding:0;position:static;right:auto}._fc-group._fc-group-card ._fc-group-btn{align-items:center;background:#fff;border:1px solid #d9d9d9;border-radius:4px;color:rgba(0,0,0,.45);cursor:pointer;display:flex;height:24px;justify-content:center;position:relative;width:24px}._fc-group._fc-group-card ._fc-group-btn:hover{background:#f0f8ff;border-color:#1890ff;color:#1890ff}._fc-group._fc-group-card ._fc-group-btn:active{border-color:#096dd9;color:#096dd9}._fc-group._fc-group-card ._fc-group-arrow{position:relative}._fc-group._fc-group-card ._fc-group-arrow:before{border-left:1px solid;border-top:1px solid;content:"";height:5px;left:50%;position:absolute;top:50%;transform:translate(-50%,-50%) rotate(45deg);width:5px}._fc-group._fc-group-card ._fc-group-arrow._fc-group-down{transform:rotate(180deg)}._fc-group._fc-group-card ._fc-group-sort{align-items:center;display:flex;flex-direction:column;height:24px;justify-content:center;position:relative}._fc-group._fc-group-card ._fc-group-sort:after,._fc-group._fc-group-card ._fc-group-sort:before{border-left:1px solid;border-top:1px solid;content:"";height:4px;left:50%;position:absolute;transform:translateX(-50%);width:4px}._fc-group._fc-group-card ._fc-group-sort:before{top:6px;transform:translateX(-50%) rotate(45deg)}._fc-group._fc-group-card ._fc-group-sort:after{bottom:6px;transform:translateX(-50%) rotate(225deg)}._fc-group._fc-group-card ._fc-group-sort-down,._fc-group._fc-group-card ._fc-group-sort-up{cursor:pointer;height:12px;left:0;position:absolute;right:0;z-index:1}._fc-group._fc-group-card ._fc-group-sort-up{top:0}._fc-group._fc-group-card ._fc-group-sort-down{bottom:0}._fc-group._fc-group-card ._fc-group-sort-down:hover,._fc-group._fc-group-card ._fc-group-sort-up:hover{background:rgba(24,144,255,.1)}._fc-group._fc-group-card ._fc-group-plus-minus{background:#409eff;border-color:#409eff;color:#fff;height:24px;position:relative;width:24px}._fc-group._fc-group-card ._fc-group-plus-minus:hover{background:#66b1ff;border-color:#66b1ff;color:#fff}._fc-group._fc-group-card ._fc-group-plus-minus:after,._fc-group._fc-group-card ._fc-group-plus-minus:before{background-color:currentColor;content:"";height:1px;left:50%;position:absolute;top:50%;transform:translate(-50%,-50%);width:8px}._fc-group._fc-group-card ._fc-group-plus-minus:before{transform:translate(-50%,-50%) rotate(90deg)}._fc-group._fc-group-card ._fc-group-plus-minus._fc-group-minus{background:#f56c6c;border-color:#f56c6c}._fc-group._fc-group-card ._fc-group-plus-minus._fc-group-minus:hover{background:#f78989;border-color:#f78989}._fc-group._fc-group-card ._fc-group-plus-minus._fc-group-minus:before{display:none}._fc-group._fc-group-card ._fc-group-content{padding:20px}._fc-group._fc-group-card ._fc-group-add{align-items:center;background:#fff;border:1px solid #d9d9d9;border-radius:4px;color:rgba(0,0,0,.45);cursor:pointer;display:flex;height:24px;justify-content:center;position:relative;width:24px}._fc-group._fc-group-card ._fc-group-add:hover{background:#f0f8ff;border-color:#409eff;color:#409eff}._fc-group._fc-group-card ._fc-group-add._fc-group-plus-minus{background:#409eff;border-color:#409eff;color:#fff;height:24px;width:24px}._fc-group._fc-group-card ._fc-group-add._fc-group-plus-minus:hover{background:#66b1ff;border-color:#66b1ff;color:#fff}._fc-group._fc-group-card ._fc-group-add._fc-group-plus-minus:after,._fc-group._fc-group-card ._fc-group-add._fc-group-plus-minus:before{background-color:currentColor;content:"";height:1px;left:50%;position:absolute;top:50%;transform:translate(-50%,-50%);width:8px}._fc-group._fc-group-card ._fc-group-add._fc-group-plus-minus:before{transform:translate(-50%,-50%) rotate(90deg)}._fc-group._fc-group-card ._fc-group-empty{color:rgba(0,0,0,.45);font-size:14px;padding:40px 20px;text-align:center}@media (max-width:768px){._fc-group._fc-group-card ._fc-group-container{border-left:none;border-radius:0;border-right:none;margin:0 -8px}._fc-group._fc-group-card ._fc-group-header{padding:12px 16px 8px}._fc-group._fc-group-card ._fc-group-content{padding:16px}._fc-group._fc-group-card ._fc-group-handle{gap:2px}._fc-group._fc-group-card ._fc-group-btn{height:22px;width:22px}}';Va(rx);function dr(t,e){var n=null;return function(){for(var r=this,i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];n!==null&&clearTimeout(n),n=setTimeout(function(){return t.call.apply(t,[r].concat(o))},e)}}function Fm(t){return t==null?"":Je(t)==="object"?JSON.stringify(t,null,2):String(t)}function ix(t){return t&&Je(t)==="object"&&typeof t.then=="function"}function fa(t){return ix(t)?t:Promise.resolve(t)}function Li(t){var e=t.replace(/([A-Z])/g,"-$1").toLocaleLowerCase();return e.indexOf("-")===0&&(e=e.substr(1)),e}function Dm(t){return t.replace(t[0],t[0].toLocaleUpperCase())}function Lm(t,e,n){return"[form-create ".concat(t,"]: ").concat(e)+""}function Dc(t,e){console.error(Lm("err",t))}function ox(t){Dc(t.toString()),console.error(t)}var $l="[[FORM-CREATE-PREFIX-",Rl="-FORM-CREATE-SUFFIX]]";function ji(t,e){return JSON.stringify(io(Array.isArray(t)?[]:{},t,!0),function(n,r){if(!(r&&r._isVue===!0)){if(typeof r!="function")return r;if(r.__json)return r.__json;if(r.__origin&&(r=r.__origin),!r.__emit)return $l+r+Rl}},e)}function bs(t){return new Function("return "+t)()}function Ln(t,e){if(t&&pe.String(t)&&t.length>4){var n=t.trim(),r=!1;try{if(n.indexOf(Rl)>0&&n.indexOf($l)===0)n=n.replace(Rl,"").replace($l,""),r=!0;else if(n.indexOf("$FN:")===0)n=n.substring(4),r=!0;else if(n.indexOf("$EXEC:")===0)n=n.substring(6),r=!0;else if(n.indexOf("$GLOBAL:")===0){var i=n.substring(8);return n=function(){for(var s=arguments.length,l=new Array(s),u=0;u<s;u++)l[u]=arguments[u];var c=l[0].api.getGlobalEvent(i);if(c)return c.call.apply(c,[this].concat(l))},n.__json=t,n.__inject=!0,n}else{if(n.indexOf("$FNX:")===0)return n=bs(`function($inject){
15
+ `+n.substring(5)+`
16
+ }`),n.__json=t,n.__inject=!0,n;(!e&&n.indexOf("function ")===0&&n!=="function "||!e&&n.indexOf("function(")===0&&n!=="function(")&&(r=!0)}if(!r)return t;var o;try{o=bs(n)}catch{o=bs("function "+n)}return o.__json=t,o}catch(a){Dc("解析失败:".concat(n,`
17
+
18
+ err: `).concat(a));return}}return t}function jm(t,e){return JSON.parse(t,function(n,r){return pe.Undef(r)||!r.indexOf?r:Ln(r,e)})}var ax=0;function za(){var t=370+ ++ax;return"F"+Math.random().toString(36).substr(3,3)+Number("".concat(Date.now())).toString(36)+t.toString(36)+"c"}function vr(t,e,n){var r=t,i;return(e||"").split(".").forEach(function(o){i&&((!r[i]||Je(r[i])!="object")&&(r[i]={}),r=r[i]),i=o}),r[i]=n,r}var sx="fcGroup",lx=Ee({name:sx,props:{field:String,rule:Array,expand:Number,options:Object,button:{type:Boolean,default:!0},max:{type:Number,default:0},min:{type:Number,default:0},modelValue:{type:Array,default:function(){return[]}},defaultValue:Object,sortBtn:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},syncDisabled:{type:Boolean,default:!0},title:{type:[String,Function],default:null},type:{type:String,default:"default"},onBeforeRemove:{type:Function,default:function(){}},onBeforeAdd:{type:Function,default:function(){}},formCreateInject:Object,parse:Function},data:function(){return{len:0,cacheRule:{},cacheValue:{},sort:[],form:Xn(this.formCreateInject.form.$form())}},emits:["update:modelValue","change","itemMounted","remove","add"],watch:{rule:{handler:function(e,n){var r=this;Object.keys(this.cacheRule).forEach(function(i){var o=r.cacheRule[i];if(o.$f){var a=o.$f.formData();if(e===n)o.$f.deferSyncValue(function(){io(o.rule,e),o.$f.setValue(a)},!0);else{var s=o.$f.formData();o.$f.once("reloading",function(){o.$f.setValue(s)}),o.rule=Fn(e)}}})},deep:!0},expand:function(e){var n=e-this.modelValue.length;n>0&&this.expandRule(n)},modelValue:{handler:function(e){var n=this;e=e||[];var r=this.sort,i=r.length,o=i-e.length;if(o<0){for(var a=o;a<0;a++)this.addRule(e.length+a,!0);for(var s=0;s<i;s++)this.setValue(r[s],e[s])}else{if(o>0)for(var l=0;l<o;l++)this.removeRule(r[i-l-1]);e.forEach(function(u,c){n.setValue(r[c],e[c])})}},deep:!0}},methods:{_value:function(e){return e&&dt(e,this.field)?e[this.field]:e},cache:function(e,n){this.cacheValue[e]=JSON.stringify(n)},input:function(e){this.$emit("update:modelValue",e),this.$emit("change",e)},formData:function(e,n){var r=this,i=this.cacheRule,o=this.sort;if(o.filter(function(s){return i[s]&&i[s].$f}).length===o.length){var a=o.map(function(s){var l=e===s?n:Te({},r.cacheRule[s].$f.form),u=r.field?l[r.field]||null:l;return r.cache(s,u),u});this.input(a)}},setValue:function(e,n){var r=this.field;r&&(n=mt({},r,this._value(n))),this.cacheValue[e]!==JSON.stringify(r?n[r]:n)&&(this.cacheRule[e].$f&&this.cacheRule[e].$f.coverValue(n),this.cache(e,n))},addRule:function(e,n){var r=this,i=this.formCreateInject.form.copyRules(this.rule||[]),o=this.options?Te({},this.options):{submitBtn:!1,resetBtn:!1};if(this.defaultValue){o.formData||(o.formData={});var a=Fn(this.defaultValue);Fe(o.formData,this.field?mt({},this.field,a):a)}this.parse&&this.parse({rule:i,options:o,index:this.sort.length}),this.cacheRule[++this.len]={rule:i,options:o},this.sort=Object.keys(this.cacheRule),n&&Xe(function(){return r.$emit("add",i,Object.keys(r.cacheRule).length-1)})},add$f:function(e,n,r){var i=this;this.cacheRule[n].$f=r,Xe(function(){i.$emit("itemMounted",r,Object.keys(i.cacheRule).indexOf(n))})},removeRule:function(e,n){var r=this,i=Object.keys(this.cacheRule).indexOf(e);delete this.cacheRule[e],delete this.cacheValue[e],this.sort=Object.keys(this.cacheRule),n&&Xe(function(){return r.$emit("remove",i)})},add:function(e){if(!(this.disabled||this.onBeforeAdd(this.modelValue)===!1)){var n=We(this.modelValue);n.push(this.defaultValue?Fn(this.defaultValue):this.field?null:{}),this.input(n)}},del:function(e,n){var r=this;if(!this.disabled){var i=function(){r.removeRule(n,!0);var a=We(r.modelValue);a.splice(e,1),r.input(a)};fa(this.onBeforeRemove(this.modelValue,e)).then(function(o){o!==!1&&i()})}},addIcon:function(e){return j("div",{class:"_fc-group-btn _fc-group-plus-minus",onClick:this.add},null)},delIcon:function(e,n){var r=this;return j("div",{class:"_fc-group-btn _fc-group-plus-minus _fc-group-minus",onClick:function(){return r.del(e,n)}},null)},sortUpIcon:function(e){var n=this;return j("div",{class:"_fc-group-btn _fc-group-arrow _fc-group-up",onClick:function(){return n.changeSort(e,-1)}},null)},sortDownIcon:function(e){var n=this;return j("div",{class:"_fc-group-btn _fc-group-arrow _fc-group-down",onClick:function(){return n.changeSort(e,1)}},null)},changeSort:function(e,n){var r=this,i=this.sort[e];this.sort[e]=this.sort[e+n],this.sort[e+n]=i,this.formCreateInject.subForm(this.sort.map(function(o){return r.cacheRule[o].$f})),this.formData(0)},sortIcon:function(e,n){var r=this,i=e>0,o=e<n-1,a=[];return!i&&!o?a:this.type==="card"&&i&&o?(a.push(j("div",{class:"_fc-group-btn _fc-group-sort"},[j("div",{class:" _fc-group-sort-up",onClick:function(){return r.changeSort(e,-1)}},null),j("div",{class:" _fc-group-sort-down",onClick:function(){return r.changeSort(e,1)}},null)])),a):(i&&a.push(this.sortUpIcon(e)),o&&a.push(this.sortDownIcon(e)),a)},makeIcon:function(e,n,r){var i=this;if(this.$slots.button)return this.$slots.button({total:e,index:n,vm:this,key:r,del:function(){return i.del(n,r)},add:this.add});var o=[];if((!this.max||e<this.max)&&e===n+1&&o.push(this.addIcon(r)),e>this.min&&o.push(this.delIcon(n,r)),this.sortBtn){var a=this.sortIcon(n,e);a&&o.push.apply(o,We(a))}return o},expandRule:function(e){for(var n=0;n<e;n++)this.modelValue.push(this.field?null:{});this.input(We(this.modelValue))},getTitle:function(e,n){return typeof this.title=="function"?this.title(e,this.modelValue[e],n):typeof this.title=="string"?this.title.replace("{index}",e+1):!1}},created:function(){for(var e=(this.expand||0)-this.modelValue.length,n=0;n<this.modelValue.length;n++)this.addRule(n);e>0&&this.expandRule(e)},render:function(){var e=this,n=this.sort,r=this.button,i=this.form,o=this.disabled,a=this.type==="card",s=n.length===0?this.$slots.default?this.$slots.default({vm:this,add:this.add}):j("div",{key:"a_def",class:"_fc-group-plus-minus _fc-group-add fc-clock",onClick:this.add},null):n.map(function(l,u){var c=e.cacheRule[l],d=c.rule,f=c.options,m=r&&!o?e.makeIcon(n.length,u,l):[],p=e.getTitle(u,l);return a?j("div",{class:"_fc-group-container",key:l},[j("div",{class:"_fc-group-header"},[p===!1?j("div",{class:"_fc-group-idx"},[u+1]):null,p!==!1?j("div",{class:"_fc-group-title"},[p]):null,j("div",{class:"_fc-group-handle fc-clock"},[m.length?m:null])]),j("div",{class:"_fc-group-content"},[j(i,Ye({key:l},Te(Te({},e.$attrs),{},{disabled:o,"onUpdate:modelValue":function(v){return e.formData(l,v)},"onUpdate:api":function(v){return e.add$f(u,l,v)},inFor:!0,modelValue:e.field?mt({},e.field,e._value(e.modelValue[u])):e.modelValue[u],rule:d,option:f,extendOption:!0})),null)])]):j("div",{class:"_fc-group-container",key:l},[j(i,Ye({key:l},Te(Te({},e.$attrs),{},{disabled:o,"onUpdate:modelValue":function(v){return e.formData(l,v)},"onUpdate:api":function(v){return e.add$f(u,l,v)},inFor:!0,modelValue:e.field?mt({},e.field,e._value(e.modelValue[u])):e.modelValue[u],rule:d,option:f,extendOption:!0})),null),j("div",{class:"_fc-group-idx"},[u+1]),m.length?j("div",{class:"_fc-group-handle fc-clock"},[m]):null])});return j("div",{key:"con",class:"_fc-group "+(o?"_fc-group-disabled":"")+(a?" _fc-group-card":"")},[s])}}),cx="fcSubForm",ux=Ee({name:cx,props:{rule:Array,options:{type:Object,default:function(){return Lt({submitBtn:!1,resetBtn:!1})}},modelValue:{type:Object,default:function(){return{}}},disabled:{type:Boolean,default:!1},syncDisabled:{type:Boolean,default:!0},formCreateInject:Object},data:function(){return{cacheValue:{},subApi:{},form:Xn(this.formCreateInject.form.$form())}},emits:["fc:subform","update:modelValue","change","itemMounted"],watch:{modelValue:function(e){this.setValue(e)}},methods:{formData:function(e){this.cacheValue=JSON.stringify(e),this.$emit("update:modelValue",e),this.$emit("change",e)},setValue:function(e){var n=JSON.stringify(e);this.cacheValue!==n&&(this.cacheValue=n,this.subApi.coverValue(e||{}))},add$f:function(e){var n=this;this.subApi=e,Xe(function(){n.$emit("itemMounted",e)})}},render:function(){var e=this.form;return j(e,{disabled:this.disabled,"onUpdate:modelValue":this.formData,modelValue:this.modelValue,"onUpdate:api":this.add$f,rule:this.rule,option:this.options,extendOption:!0},null)}}),Vm={name:"IconWarning"},dx={class:"icon",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg"},fx=_("path",{fill:"currentColor",d:"M512 64a448 448 0 110 896 448 448 0 010-896zm0 832a384 384 0 000-768 384 384 0 000 768zm48-176a48 48 0 11-96 0 48 48 0 0196 0zm-48-464a32 32 0 0132 32v288a32 32 0 01-64 0V288a32 32 0 0132-32z"},null,-1),px=[fx];function hx(t,e,n,r,i,o){return b(),x("svg",dx,px)}Vm.render=hx;var mx=[gT,NT,BT,Im,KT,tx,lx,ux,Vm],zm=["props"],Nm=["class","style","directives"],Um=["on","hook"],lr=function t(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=[].concat(zm,We(r.normal||[])),o=[].concat(Nm,We(r.array||[])),a=[].concat(Um,We(r.functional||[])),s=r.props||[];return e.reduce(function(l,u){for(var c in u)if(l[c])if(s.indexOf(c)>-1)l[c]=t([u[c]],l[c]);else if(i.indexOf(c)>-1)l[c]=Te(Te({},l[c]),u[c]);else if(o.indexOf(c)>-1){var d=l[c]instanceof Array?l[c]:[l[c]],f=u[c]instanceof Array?u[c]:[u[c]];l[c]=[].concat(We(d),We(f))}else if(a.indexOf(c)>-1)for(var m in u[c])if(l[c][m]){var p=l[c][m]instanceof Array?l[c][m]:[l[c][m]],h=u[c][m]instanceof Array?u[c][m]:[u[c][m]];l[c][m]=[].concat(We(p),We(h))}else l[c][m]=u[c][m];else if(c==="hook")for(var v in u[c])l[c][v]?l[c][v]=vx(l[c][v],u[c][v]):l[c][v]=u[c][v];else l[c]=u[c];else i.indexOf(c)>-1||a.indexOf(c)>-1||s.indexOf(c)>-1?l[c]=Te({},u[c]):o.indexOf(c)>-1?l[c]=u[c]instanceof Array?We(u[c]):Je(u[c])==="object"?Te({},u[c]):u[c]:l[c]=u[c];return l},n)},vx=function(e,n){return function(){e&&e.apply(this,arguments),n&&n.apply(this,arguments)}},Pl=["type","slot","ignore","emitPrefix","value","name","native","hidden","display","inject","options","emit","link","prefix","suffix","update","sync","optionsTo","key","slotUpdate","computed","preview","component","cache","modelEmit"],pa=["validate","children","control"],ha=["effect","deep","renderSlots"];function Bm(){return[].concat(Pl,We(zm),We(Nm),We(Um),pa,ha)}function qt(t){var e=t.replace(/(-[a-z])/g,function(n){return n.replace("-","").toLocaleUpperCase()});return Hm(e)}function Hm(t){return t.replace(t[0],t[0].toLowerCase())}function kl(t,e){return{value:t,enumerable:!1,configurable:!1,writable:!0}}function qm(t,e){return Wm([t],e||!1)[0]}function Wm(t,e){return io([],We(t),e||!1)}function er(t,e){return lr(Array.isArray(e)?e:[e],t,{array:pa,normal:ha}),t}function ef(t){var e=pe.Function(t.getRule)?t.getRule():t;return e.type||(e.type="input"),e}function gx(t,e){return t?(Object.keys(e||{}).forEach(function(n){e[n]&&(t[n]=er(t[n]||{},e[n]))}),t):e}function Km(t,e){Object.defineProperties(t,Object.keys(e).reduce(function(n,r){return n[r]={get:function(){return e[r]()}},n},{}))}function Kn(t){return t.__fc__||(t.__origin__?t.__origin__.__fc__:null)}function Be(t,e){try{e=t()}catch(n){ox(n)}return e}function So(){var t={},e=function(r){return r||"default"};return{setSlot:function(r,i){r=e(r),!(!i||Array.isArray(i)&&i.length)&&(t[r]||(t[r]=[]),t[r].push(i))},getSlot:function(r,i){r=e(r);var o=[];return(t[r]||[]).forEach(function(a){if(Array.isArray(a))o.push.apply(o,We(a));else if(pe.Function(a)){var s=a.apply(void 0,We(i||[]));Array.isArray(s)?o.push.apply(o,We(s)):o.push(s)}else pe.Undef(a)||o.push(a)}),o},getSlots:function(){var r=this,i={};return Object.keys(t).forEach(function(o){i[o]=function(){for(var a=arguments.length,s=new Array(a),l=0;l<a;l++)s[l]=arguments[l];return r.getSlot(o,s)}}),i},slotLen:function(r){return r=e(r),t[r]?t[r].length:0},mergeBag:function(r){var i=this;if(!r)return this;var o=pe.Function(r.getSlots)?r.getSlots():r;return Array.isArray(r)||Br(r)?this.setSlot(void 0,function(){return r}):Object.keys(o).forEach(function(a){i.setSlot(a,o[a])}),this}}}function tf(t){var e=Te({},t.props||{});return Object.keys(t.on||{}).forEach(function(n){n.indexOf("-")>0&&(n=qt(n));var r="on".concat(Dm(n));Array.isArray(e[r])?e[r]=[].concat(We(e[r]),[t.on[n]]):e[r]?e[r]=[e[r],t.on[n]]:e[r]=t.on[n]}),e.key=t.key,e.ref=t.ref,e.class=t.class,e.id=t.id,e.style=t.style,e.slot&&delete e.slot,e}function Co(t,e){return Object.setPrototypeOf(t,e),t}var nf=function(e,n){return typeof e=="string"?String(n):typeof e=="number"?Number(n):n},Pr={"==":function(e,n){return JSON.stringify(e)===JSON.stringify(nf(e,n))},"!=":function(e,n){return!Pr["=="](e,n)},">":function(e,n){return e>n},">=":function(e,n){return e>=n},"<":function(e,n){return e<n},"<=":function(e,n){return e<=n},on:function(e,n){return e&&e.indexOf&&e.indexOf(nf(e[0],n))>-1},notOn:function(e,n){return!Pr.on(e,n)},in:function(e,n){return n&&n.indexOf&&n.indexOf(e)>-1},notIn:function(e,n){return!Pr.in(e,n)},between:function(e,n){return e>n[0]&&e<n[1]},notBetween:function(e,n){return e<n[0]||e>n[1]},empty:function(e){return pe.empty(e)},notEmpty:function(e){return!pe.empty(e)},pattern:function(e,n){return new RegExp(n,"g").test(e)}};function Mt(t,e){return(Array.isArray(e)?e:(e||"").split(".")).forEach(function(n){t!=null&&(t=t[n])}),t}function _x(t){for(var e=/{{\s*(.*?)\s*}}/g,n,r={};(n=e.exec(t))!==null;)n[1]&&(r[n[1]]=!0);return Object.keys(r)}function rf(t){var e=t.split("."),n=[],r="";return e.forEach(function(i,o){o===0?r=i:r+="."+i,n.push(r)}),n.join(" && ")}function Ym(t){for(var e=[],n="",r=0,i=0;i<t.length;i++){var o=t[i];o==="["?(r===0&&n&&(e.push({type:"key",value:n}),n=""),r++,n+=o):o==="]"?(r--,n+=o,r===0&&(e.push({type:"bracket",value:Ym(n.slice(1,-1))}),n="")):o==="."&&r===0?n&&(e.push({type:"key",value:n}),n=""):n+=o}return n&&e.push({type:"key",value:n}),e.map(function(a){return a.type==="key"?{key:a.value}:{children:a.value}})}var Qo=function(e,n){if(!(!e||e===n)){if(e.props.formCreateInject)return e.props.formCreateInject;if(e.parent)return Qo(e.parent,n)}};function yx(t,e,n){return Ee({name:"FormCreate"+(t.isMobile?"Mobile":""),components:e,directives:n,props:{rule:{type:Array,required:!0,default:function(){return[]}},option:{type:Object,default:function(){return{}}},extendOption:Boolean,driver:[String,Object],modelValue:Object,disabled:{type:Boolean,default:void 0},preview:{type:Boolean,default:void 0},index:[String,Number],api:Object,locale:[String,Object],t:Function,name:String,subForm:{type:Boolean,default:!0},inFor:Boolean},emits:["update:api","update:modelValue","mounted","beforeUnmount","submit","reset","change","emit-event","control","remove-rule","remove-field","sync","reload","repeat-field","update","validate-field-fail","validate-fail","created"],render:function(){return this.fc.render()},setup:function(i){var o=cl();Zp("parentFC",o);var a=Pi("parentFC",null),s=a;if(a)for(;s.setupState.parent;)s=s.setupState.parent;else s=o;var l=ll(i),u=l.rule,c=l.modelValue,d=l.subForm,f=l.inFor,m=Lt({ctxInject:{},destroyed:!1,isShow:!0,unique:1,renderRule:We(u.value||[]),updateValue:JSON.stringify(c.value||{})}),p=new t(o),h=p.api(),v=f.value,C=function(){if(a){var q=Qo(o,a);if(q){var I;v?(I=Ht(q.getSubForm()),I.push(h)):I=h,q.subForm(I)}}},S=function(){var q=Qo(o,a);if(q)if(v){var I=Ht(q.getSubForm()),P=I.indexOf(h);P>-1&&I.splice(P,1)}else q.subForm()},w=null;V_(function(){Ut(function(){var O="",q=i.option&&i.option.globalClass||{};Object.keys(q).forEach(function(I){var P="";q[I].style&&Object.keys(q[I].style).forEach(function(z){P+=Li(z)+":"+q[I].style[z]+";"}),q[I].content&&(P+=q[I].content+";"),P&&(O+=".".concat(I,"{").concat(P,"}"))}),i.option&&i.option.style&&(O+=i.option.style),w||(w=document.createElement("style"),w.type="text/css",document.head.appendChild(w)),w.innerHTML=O||""})});var y=dr(function(){p.bus.$emit("$loadData.$topForm")},100),E=dr(function(){p.bus.$emit("$loadData.$scopeForm")},100),T=dr(function(){p.bus.$emit("$loadData.$form")},100),A=function(q){p.bus.$emit("change-$form."+q)};return it(function(){a&&(h.top.bus.$on("$loadData.$form",y),h.top.bus.$on("change",A)),h!==h.scope&&h.scope.bus.$on("$loadData.$scopeForm",E),p.mounted()}),Oa(function(){a&&(h.top.bus.$off("$loadData.$form",y),h.top.bus.$off("change",A)),h!==h.scope&&h.scope.bus.$off("$loadData.$scopeForm",E),S(),m.destroyed=!0,p.unmount(),w&&(w.parentNode||w.parentElement)&&document.head.removeChild(w)}),Jp(function(){p.updated()}),C(),Ae(function(){return i.option},function(){p.initOptions(),h.refresh()},{deep:!0,flush:"sync"}),Ae(function(){return We(u.value)},function(O){p.$handle.isBreakWatch()||O.length===m.renderRule.length&&O.every(function(q){return m.renderRule.indexOf(q)>-1})||(p.$handle.updateAppendData(),p.$handle.reloadRule(u.value),o.setupState.renderRule())}),Ae(function(){return[i.disabled,i.preview]},function(){h.refresh()}),Ae(c,function(O){ji(O||{})!==m.updateValue&&(h.config.forceCoverValue?h.coverValue(O||{}):h.setValue(O||{}))},{deep:!0,flush:"post"}),Ae(function(){return i.index},function(){h.coverValue({}),p.$handle.updateAppendData(),Xe(function(){Xe(function(){h.clearValidateState()})})},{flush:"sync"}),Te(Te({fc:Xn(p),parent:a&&Xn(a),top:Xn(s),fapi:Xn(h)},ll(m)),{},{getGroupInject:function(){return Qo(o,a)},refresh:function(){++m.unique},renderRule:function(){m.renderRule=We(u.value||[])},updateValue:function(q){if(!m.destroyed){var I=ji(q);m.updateValue!==I&&(m.updateValue=I,o.emit("update:modelValue",q),Xe(function(){T(),a?d.value||E():(y(),E())}))}}})},created:function(){var i=cl();i.emit("update:api",i.setupState.fapi),i.setupState.fc.init()}})}function Gm(){return{props:{},on:{},options:[],children:[],hidden:!1,display:!0,value:void 0}}function It(t,e){return function(n,r,i){var o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},a=new Lc(t,n,r,i,o);return e&&(pe.Function(e)?e(a):a.props(e)),a}}function Lc(t,e,n,r,i){this._data=Fe(Gm(),{type:t,title:e,field:n,value:r,props:i||{}}),this.event=this.on}Fe(Lc.prototype,{getRule:function(){return this._data},setProp:function(e,n){return cn(this._data,e,n),this},modelField:function(e){return this._data.modelField=e,this},_clone:function(){var e=new this.constructor;return e._data=qm(this._data),e}});function Qm(t){t.forEach(function(e){Lc.prototype[e]=function(n){return er(this._data,mt({},e,arguments.length<2?n:mt({},n,arguments[1]))),this}})}Qm(Bm());var bx=It("");function wx(t,e,n){var r=bx("",e);return r._data.type=t,r._data.title=n,r}function Sx(){return{create:wx,factory:It}}function Cx(t,e,n){var r="fail to ".concat(t," ").concat(n.status,"'"),i=new Error(r);return i.status=n.status,i.url=t,i}function of(t){var e=t.responseText||t.response;if(!e)return e;try{return JSON.parse(e)}catch{return e}}function Xm(t){if(!(typeof XMLHttpRequest>"u")){var e=new XMLHttpRequest,n=t.action||"";if(e.upload&&t.onProgress&&e.upload.addEventListener("progress",function(s){s.percent=s.total>0?s.loaded/s.total*100:0,t.onProgress(s)}),t.query){var r=pe.String(t.query)?t.query:Object.keys(t.query).reduce(function(s,l){return s[l]=t.query[l]===null||t.query[l]===void 0?"":t.query[l],s},{}),i=new URLSearchParams(r).toString();i&&(n.includes("?")?n+="&".concat(i):n+="?".concat(i))}e.onerror=function(l){t.onError(l)},e.onload=function(){if(e.status<200||e.status>=300)return t.onError(Cx(n,t,e),of(e));t.onSuccess(of(e))},e.open(t.method||"get",n,!0);var o;(t.data||t.file)&&(t.file||(t.dataType||"").toLowerCase()!=="json"?(o=new FormData,Object.keys(t.data||{}).map(function(s){o.append(s,t.data[s])})):(o=JSON.stringify(t.data||{}),e.setRequestHeader("content-type","application/json"))),t.file&&o.append(t.filename,t.file,t.file.name),t.withCredentials&&"withCredentials"in e&&(e.withCredentials=!0);var a=t.headers||{};Object.keys(a).forEach(function(s){a[s]!=null&&e.setRequestHeader(s,a[s])}),e.send(o)}}function af(t,e,n){return new Promise(function(r,i){(e||Xm)(Te(Te({},t),{},{onSuccess:function(a){var s=function(c){return c},l=Ln(t.parse);pe.Function(l)?s=l:l&&pe.String(l)&&(s=function(c){return Mt(c,l)}),fa(s(a,t.targetRule,n)).then(function(u){r(u)})},onError:function(a){i(a)}}))})}function Si(t){return Fn(t)}function Ex(t){function e(o){return pe.Undef(o)?o=t.fields():Array.isArray(o)||(o=[o]),o}function n(o,a,s){pe.Undef(o)?o=Object.keys(Te(Te({},t.fieldCtx),t.nameCtx)):Array.isArray(o)||(o=[o]),o.forEach(function(l){var u=t.fieldCtx[l]||t.nameCtx[l];u&&u.forEach(function(c){cn(c.rule,a,s),t.$render.clearCache(c)})})}function r(){var o=t.subForm;return Object.keys(o).reduce(function(a,s){var l=o[s];return l&&(Array.isArray(l)?a.push.apply(a,We(l)):a.push(l)),a},[])}var i={get isScope(){return t.vm.props.subForm===!1},get isPreview(){return t.preview},get config(){return t.options},set config(o){t.fc.options.value=o},get options(){return t.options},set options(o){t.fc.options.value=o},get form(){return t.form},get rule(){return t.rules},get parent(){return t.vm.setupState.parent&&t.vm.setupState.parent.setupState.fapi},get top(){return i.parent?i.parent.top:i},get scope(){for(var o=t.vm;o&&o.setupState.fapi;)if(o.props.subForm)o=o.setupState.parent;else return o.setupState.fapi;return i.top},get children(){return r()},get siblings(){var o=t.vm.setupState.getGroupInject();if(o){var a=o.getSubForm();if(Array.isArray(a))return We(a)}},get index(){var o=i.siblings;if(o){var a=o.indexOf(i);return a>-1?a:void 0}},get formulas(){return Te({},t.fc.formulas)},formData:function(a){if(a==null||typeof a=="boolean"){var s={};return Object.keys(t.form).forEach(function(l){(a===!0||t.ignoreFields.indexOf(l)===-1)&&(s[l]=Si(t.form[l]))}),s}else return e(a).reduce(function(l,u){return l[u]=i.getValue(u),l},{})},getValue:function(a){var s=t.getFieldCtx(a);return s?Si(s.rule.value):t.options.appendValue!==!1&&dt(t.appendData,a)?Si(t.appendData[a]):void 0},coverValue:function(a){var s=Te({},a||{});t.deferSyncValue(function(){t.appendData={},i.fields().forEach(function(l){var u=t.fieldCtx[l];if(u){var c=dt(a,l);u.forEach(function(d){d.rule.value=c?a[l]:void 0}),delete s[l]}}),Fe(t.appendData,s)},!0)},setValue:function(a){var s=a;arguments.length>=2&&(s=mt({},a,arguments[1])),t.deferSyncValue(function(){Object.keys(s).forEach(function(l){var u=t.fieldCtx[l];if(!u)return t.appendData[l]=s[l];u.forEach(function(c){c.rule.value=s[l]})})},!0)},removeField:function(a){var s=t.getCtx(a);return t.deferSyncValue(function(){t.getCtxs(a).forEach(function(l){l.rm()})},!0),s?s.origin:void 0},removeRule:function(a){var s=a&&Kn(a);if(s)return s.rm(),s.origin},fields:function(){return t.fields()},append:function(a,s,l){var u=t.sort.length-1,c,d=t.getCtx(s);if(d)if(l){if(c=d.getPending("children",d.rule.children),!Array.isArray(c))return;u=d.rule.children.length-1}else u=d.root.indexOf(d.origin),c=d.root;else c=t.rules;c.splice(u+1,0,a)},prepend:function(a,s,l){var u=0,c,d=t.getCtx(s);if(d)if(l){if(c=d.getPending("children",d.rule.children),!Array.isArray(c))return}else u=d.root.indexOf(d.origin),c=d.root;else c=t.rules;c.splice(u,0,a)},hidden:function(a,s){n(s,"hidden",!!a),t.refresh()},hiddenStatus:function(a){var s=t.getCtx(a);if(s)return!!s.rule.hidden},display:function(a,s){n(s,"display",!!a),t.refresh()},displayStatus:function(a){var s=t.getCtx(a);if(s)return!!s.rule.display},disabled:function(a,s){e(s).forEach(function(l){t.getCtxs(l).forEach(function(u){cn(u.rule.props,"disabled",!!a)})}),t.refresh()},all:function(a){return Object.keys(t.ctxs).map(function(s){var l=t.ctxs[s];return a?l.origin:l.rule})},model:function(a){return t.fields().reduce(function(s,l){var u=t.fieldCtx[l][0];return s[l]=a?u.origin:u.rule,s},{})},component:function(a){return Object.keys(t.nameCtx).reduce(function(s,l){var u=t.nameCtx[l].map(function(c){return a?c.origin:c.rule});return s[l]=u.length===1?u[0]:u,s},{})},bind:function(){return i.form},reload:function(a){t.reloadRule(a)},updateOptions:function(a){t.fc.updateOptions(a),i.refresh()},onSubmit:function(a){i.updateOptions({onSubmit:a})},sync:function(a){if(Array.isArray(a)){a.forEach(function(l){return i.sync(l)});return}var s=pe.Object(a)?Kn(a):t.getCtxs(a);s&&(s=Array.isArray(s)?s:[s],s.forEach(function(l){if(!l.deleted){var u=t.subForm[l.id];u&&(Array.isArray(u)?u.forEach(function(c){c.refresh()}):u&&u.refresh()),t.$render.clearCache(l)}}),t.refresh())},refresh:function(){r().forEach(function(a){a.refresh()}),t.$render.clearCacheAll(),t.refresh()},refreshOptions:function(){t.$manager.updateOptions(t.options),i.refresh()},hideForm:function(a){t.vm.setupState.isShow=!a},changeStatus:function(){return t.changeStatus},clearChangeStatus:function(){t.changeStatus=!1},updateRule:function(a,s){t.getCtxs(a).forEach(function(l){Fe(l.rule,s)})},updateRules:function(a){Object.keys(a).forEach(function(s){i.updateRule(s,a[s])})},mergeRule:function(a,s){t.getCtxs(a).forEach(function(l){er(l.rule,s)})},mergeRules:function(a){Object.keys(a).forEach(function(s){i.mergeRule(s,a[s])})},getRule:function(a,s){var l=t.getCtx(a);if(l)return s?l.origin:l.rule},findType:function(a,s){var l=void 0;return Object.keys(t.ctxs).forEach(function(u){var c=t.ctxs[u];c.rule.type===a&&(l=s?c.origin:c.rule)}),l},findTypes:function(a,s){var l=[];return Object.keys(t.ctxs).forEach(function(u){var c=t.ctxs[u];c.rule.type===a&&l.push(s?c.origin:c.rule)}),l},getRenderRule:function(a){var s=t.getCtx(a);if(s)return s.prop},getRefRule:function(a){var s=t.getCtxs(a);if(s){var l=s.map(function(u){return u.rule});return l.length===1?l[0]:l}},setEffect:function(a,s,l){var u=t.getCtx(a);u&&s&&(s[0]==="$"&&(s=s.substr(1)),dt(u.rule,"$"+s)&&cn(u.rule,"$"+s,l),dt(u.rule,"effect")||(u.rule.effect={}),cn(u.rule.effect,s,l))},clearEffectData:function(a,s){var l=t.getCtx(a);l&&(s&&s[0]==="$"&&(s=s.substr(1)),l.clearEffectData(s),i.sync(a))},updateValidate:function(a,s,l){l?i.mergeRule(a,{validate:s}):n(a,"validate",s)},updateValidates:function(a,s){Object.keys(a).forEach(function(l){i.updateValidate(l,a[l],s)})},refreshValidate:function(){i.refresh()},resetFields:function(a){e(a).forEach(function(s){t.getCtxs(s).forEach(function(l){t.$render.clearCache(l),l.rule.value=Si(l.defaultValue)})}),Xe(function(){Xe(function(){Xe(function(){i.clearValidateState(a)})})}),a==null&&(pe.Function(t.options.onReset)&&Be(function(){return t.options.onReset(i)}),t.vm.emit("reset",i))},method:function(a,s){var l=i.el(a);if(!l||!l[s])throw new Error(Lm("err","".concat(s," 方法不存在")));return function(){return l[s].apply(l,arguments)}},exec:function(a,s){for(var l=arguments.length,u=new Array(l>2?l-2:0),c=2;c<l;c++)u[c-2]=arguments[c];return Be(function(){return i.method(a,s).apply(void 0,u)})},toJson:function(a){return ji(i.rule,a)},trigger:function(a,s){for(var l=i.el(a),u=arguments.length,c=new Array(u>2?u-2:0),d=2;d<u;d++)c[d-2]=arguments[d];l&&l.$emit.apply(l,[s].concat(c))},el:function(a){var s=t.getCtx(a);if(s)return s.el||t.vm.refs[s.ref]},scrollTo:function(a){var s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{block:"center",inline:"nearest",behavior:"smooth"},l=i.el(a);if(l){var u=l.$el!==void 0?l.$el:l;if(u){var c=u.nodeType===1?u:u.firstElementChild;c&&typeof c.scrollIntoView=="function"&&c.scrollIntoView(s)}}},focus:function(a){var s=i.el(a);if(s){var l=function(m){return!m||typeof m.focus!="function"?!1:(Be(function(){return m.focus()}),!0)};if(!l(s)){var u=s.$el!==void 0?s.$el:s;if(!l(u)){var c=u&&(u.nodeType===1?u:u.firstElementChild);if(!l(c)&&!(!c||!c.querySelector)){var d=c.querySelector('input:not([type=hidden]):not([disabled]),textarea:not([disabled]),select:not([disabled]),[tabindex]:not([tabindex="-1"])');l(d)}}}}},closeModal:function(a){t.bus.$emit("fc:closeModal:"+a)},getSubForm:function(a){var s=t.getCtx(a);return s?t.subForm[s.id]:void 0},getChildrenRuleList:function(a){var s=Je(a)==="object",l=s?Kn(a):t.getCtx(a),u=l?l.rule:s?a:i.getRule(a);if(!u)return[];var c=[],d=function(m){m&&m.forEach(function(p){Je(p)==="object"&&(p.field&&c.push(p),c.push.apply(c,We(i.getChildrenRuleList(p))))})};return d(l?l.loadChildrenPending():u.children),c},getParentRule:function(a){var s=Je(a)==="object",l=s?Kn(a):t.getCtx(a);return l.parent.rule},getParentSubRule:function(a){var s=Je(a)==="object",l=s?Kn(a):t.getCtx(a);if(l){var u=l.getParentGroup();if(u)return u.rule}},getChildrenFormData:function(a,s){var l=i.getChildrenRuleList(a);return l.reduce(function(u,c){return(c.ignore!==!0||s===!0)&&(u[c.field]=Si(c.value)),u},{})},setChildrenFormData:function(a,s,l){var u=i.getChildrenRuleList(a);t.deferSyncValue(function(){u.forEach(function(c){dt(s,c.field)?c.value=s[c.field]:l&&(c.value=void 0)})})},getGlobalEvent:function(a){var s=i.options.globalEvent[a];if(s)return Je(s)==="object"&&(s=s.handle),Ln(s)},getGlobalData:function(a){return new Promise(function(s,l){var u=i.options.globalData[a];u?u.type==="fetch"?i.fetch(u).then(function(c){s(c)}).catch(l):s(u.data):s(t.fc.loadData[a])})},emitGlobalEvent:function(a){var s=i.getGlobalEvent(a);if(s){for(var l=t.getInjectData({},void 0),u=arguments.length,c=new Array(u>1?u-1:0),d=1;d<u;d++)c[d-1]=arguments[d];return l.args=[].concat(c),c.unshift(l),s.apply(null,c)}},setGlobalData:function(a,s){i.setData("$globalData."+a,s)},setGlobalVar:function(a,s){i.setData("$var."+a,s)},renderRule:function(a,s,l){var u=Je(a)==="object",c=u?Kn(a):t.getCtx(a);return c?t.$render.createRuleVnode(c,s,l):void 0},renderChildren:function(a,s,l){var u=Je(a)==="object",c=u?Kn(a):t.getCtx(a);return c?t.$render.createChildrenVnodes(c,s,l):void 0},nextTick:function(a){t.bus.$once("next-tick",a),t.refresh()},nextRefresh:function(a){t.nextRefresh(),a&&Be(a)},deferSyncValue:function(a,s){t.deferSyncValue(a,s)},emit:function(a){var s;t.vm.emitsOptions&&!t.vm.emitsOptions[a]&&(t.vm.emitsOptions[a]=null);for(var l=arguments.length,u=new Array(l>1?l-1:0),c=1;c<l;c++)u[c-1]=arguments[c];(s=t.vm).emit.apply(s,[a].concat(u))},bus:t.bus,getCurrentFormRule:function(){var a;return(a=t.vm.setupState.getGroupInject())===null||a===void 0?void 0:a.rule},fetch:function(a){return new Promise(function(s,l){var u=Te({},a);u=t.loadFetchVar(u);var c=function(f){Be(function(){return u.onError&&u.onError(f)}),l(f)};t.beforeFetch(u).then(function(){return af(u,t.fc.create.fetch,i).then(function(d){Be(function(){return u.onSuccess&&u.onSuccess(d)}),s(d)}).catch(function(d){c(d)})}).catch(function(d){c(d)})})},watchFetch:function(a,s,l,u){return t.fc.watchLoadData(function(c,d){var f=Te({},a);if(f=t.loadFetchVar(f,c),!(u&&u(f,d)===!1)){var m=function(h){Be(function(){return f.onError&&f.onError(h)}),l&&l(h)};t.beforeFetch(f).then(function(){return af(f,t.fc.create.fetch,i).then(function(p){Be(function(){return f.onSuccess&&f.onSuccess(p)}),s&&s(p,d)}).catch(function(p){m(p)})}).catch(function(p){m(p)})}},a.wait==null?1e3:a.wait)},getData:function(a,s){return t.fc.get?t.fc.get(a,s):t.fc.getLoadData(a,s)},watchData:function(a){return t.fc.watchLoadData(function(s,l){Be(function(){return a(s,l)})})},setData:function(a,s,l){return t.fc.setData(a,s,l)},refreshData:function(a){return t.fc.refreshData(a)},t:function(a,s){return t.fc.t(a,s)},getLocale:function(){return t.fc.getLocale()},helper:{tidyFields:e,props:n}};return["on","once","off"].forEach(function(o){i[o]=function(){var a;(a=t.bus)["$".concat(o)].apply(a,arguments)}}),i.changeValue=i.changeField=i.setValue,i}function Tx(t){Fe(t.prototype,{initCache:function(){this.clearCacheAll()},clearCache:function(n){if(!n.rule.cache){if(!this.cache[n.id]){n.parent&&this.clearCache(n.parent);return}(this.cache[n.id].use===!0||this.cache[n.id].parent)&&this.$handle.refresh(),this.cache[n.id].parent&&this.clearCache(this.cache[n.id].parent),this.cache[n.id]=null}},clearCacheAll:function(){this.cache={}},setCache:function(n,r,i){this.cache[n.id]={vnode:r,use:!1,parent:i,slot:n.rule.slot}},getCache:function(n){var r=this.cache[n.id];if(r)return r.use=!0,r.vnode}})}function xx(t){Fe(t.prototype,{initRender:function(){this.cacheConfig={}},getTypeSlot:function(n){var r=function i(o){if(o){var a=void 0;return n.rule.field&&(a=o.slots["field-"+Li(n.rule.field)]||o.slots["field-"+n.rule.field]),a||(a=o.slots["type-"+Li(n.type)]||o.slots["type-"+n.type]),a||i(o.setupState.parent)}};return r(this.vm)},render:function(){var n=this;if(this.vm.setupState.isShow){this.$manager.beforeRender();var r=So();return this.sort.forEach(function(i){n.renderSlot(r,n.$handle.ctxs[i])}),this.$manager.render(r)}},renderSlot:function(n,r,i){if(this.isFragment(r)){r.initProp(),this.mergeGlobal(r),r.initNone();var o=this.renderChildren(r.loadChildrenPending(),r),a=o.default;a&&n.setSlot(r.rule.slot,function(){return a()}),delete o.default,n.mergeBag(o)}else n.setSlot(r.rule.slot,this.renderCtx(r,i))},mergeGlobal:function(n){var r=this,i=this.$handle.options.global;i&&(this.cacheConfig[n.trueType]||(this.cacheConfig[n.trueType]=te(function(){var o=r.$handle.options.global;return er({},[o["*"]||o.default||{},o[n.originType]||o[n.type]||o[n.type]||{}])})),n.prop=er({},[this.cacheConfig[n.trueType].value,n.prop]))},setOptions:function(n){var r=n.loadPending({key:"options",origin:n.prop.options,def:[]});n.prop.options=r,n.prop.optionsTo&&r&&vr(n.prop,n.prop.optionsTo,r)},deepSet:function(n){var r=n.prop.deep;r&&Object.keys(r).sort(function(i,o){return i.length<o.length?-1:1}).forEach(function(i){vr(n.prop,i,r[i])})},parseSide:function(n,r){return pe.Object(n)?er({props:{formCreateInject:r.prop.props.formCreateInject}},n):n},renderSides:function(n,r,i){var o=r[i?"rule":"prop"];return[this.renderRule(this.parseSide(o.prefix,r)),n,this.renderRule(this.parseSide(o.suffix,r))]},renderId:function(n,r){var i=this,o=this.$handle[r==="field"?"fieldCtx":"nameCtx"][n];return o?o.map(function(a){return i.renderCtx(a,a.parent)}):void 0},renderCtx:function(n,r){var i=this;try{if(n.type==="hidden")return;var o=n.rule;if(this.force||!this.cache[n.id]||this.cache[n.id].slot!==o.slot){var a;n.initProp(),this.mergeGlobal(n),n.initNone(),this.$manager.tidyRule(n),this.deepSet(n),this.setOptions(n),this.ctxProp(n);var s=n.prop;s.preview=!!(s.preview!=null?s.preview:this.$handle.preview),s.props.formCreateInject=this.injectProp(n);var l=s.cache!==!1,u=s.preview;if(s.hidden){this.setCache(n,void 0,r);return}a=function(){for(var d,f=arguments.length,m=new Array(f),p=0;p<f;p++)m[p]=arguments[p];var h={rule:o,prop:s,preview:u,api:i.$handle.api,model:s.model||{},slotValue:m};m.length&&o.slotUpdate&&Be(function(){return o.slotUpdate(h)});var v={},C=n.loadChildrenPending();n.parser.renderChildren?v=n.parser.renderChildren(C,n):n.parser.loadChildren!==!1&&(v=i.renderChildren(C,n)),Object.keys(s.renderSlots||{}).forEach(function(y){v[y]=function(){for(var E=arguments.length,T=new Array(E),A=0;A<E;A++)T[A]=arguments[A];if(pe.Function(s.renderSlots[y]))return Be(function(){var q;return(q=s.renderSlots)[y].apply(q,T)});var O=i.parseSide(s.renderSlots[y],n);return i.renderRule(O)}});var S=i.getTypeSlot(n),w;return S?(h.children=v,w=S(h)):w=u?n.parser.preview(Al(v),n):n.parser.render(Al(v),n),w=i.renderSides(w,n),(!(!n.input&&pe.Undef(s.native))||((d=s.col)===null||d===void 0?void 0:d.show)===!0)&&s.native!==!0&&(i.fc.targetFormDriver("updateWrap",n),w=i.$manager.makeWrap(n,w)),n.none&&(Array.isArray(w)?w=w.map(function(y){return!y||!y.__v_isVNode?y:i.none(y)}):w=i.none(w)),l&&i.setCache(n,function(){return i.stable(w)},r),w},this.setCache(n,a,r)}return function(){var c=i.getCache(n);if(c)return c.apply(void 0,arguments);if(i.cache[n.id])return;var d=i.renderCtx(n,n.parent);if(d)return d()}}catch(c){console.error(c);return}},none:function(n){if(n)return n.props.class=this.mergeClass(n.props.class,"fc-none"),n},mergeClass:function(n,r){if(Array.isArray(n))n.push(r);else return n?[n,r]:r;return n},stable:function(n){var r=this,i=Array.isArray(n)?n:[n];return i.forEach(function(o){o&&o.__v_isVNode&&o.children&&Je(o.children)==="object"&&(o.children.$stable=!0,r.stable(o.children))}),n},getModelField:function(n){return n.prop.modelField||n.parser.modelField||this.fc.modelFields[this.vNode.aliasMap[n.type]]||this.fc.modelFields[n.type]||this.fc.modelFields[n.originType]||"modelValue"},isFragment:function(n){return n.type==="fragment"||n.type==="template"},injectProp:function(n){var r=this,i=this.vm.setupState;i.ctxInject[n.id]||(i.ctxInject[n.id]={api:this.$handle.api,form:this.fc.create,subForm:function(s){r.$handle.addSubForm(n,s)},getSubForm:function(){return r.$handle.subForm[n.id]},slots:function(){return r.vm.setupState.top.slots},getWrap:function(){return r.vm.refs[n.wrapRef]},options:[],children:[],preview:!1,id:n.id,field:n.field,rule:n.rule,input:n.input,t:function(){var s;return(s=r.$handle.api).t.apply(s,arguments)},updateValue:function(s){r.$handle.onUpdateValue(n,s)}});var o=i.ctxInject[n.id];return Fe(o,{preview:n.prop.preview,options:n.prop.options,children:n.loadChildrenPending()}),o},ctxProp:function(n){var r=this,i=n.ref,o=n.key,a=n.rule;this.$manager.mergeProp(n),n.parser.mergeProp(n);var s=[{ref:i,key:a.key||"".concat(o,"fc"),slot:void 0,on:{vnodeMounted:function(f){f.el.__rule__=n.rule,r.onMounted(n,f.el)},vnodeBeforeUnmount:function(){r.$handle.effect(n,"beforeUnmount"),r.$handle.targetHook(n,"beforeUnmount")},"fc.updateValue":function(f){r.$handle.onUpdateValue(n,f)},"fc.el":function(f){n.exportEl=f,f&&((f.$el||f).__rule__=n.rule)}}}];if(n.input){var l=this.tmpInput;this.vm.props.disabled===!0&&(n.prop.props.disabled=!0);var u=this.getModelField(n),c={callback:function(f){l&&l(n.field,f,n.rule),r.onInput(n,f)},modelField:u,value:this.$handle.getFormData(n)};s.push({on:Te(mt({},"update:".concat(u),c.callback),n.prop.modelEmit?mt({},n.prop.modelEmit,function(){return r.onEmitInput(n)}):{}),props:mt({},u,c.value)}),n.prop.model=c}return lr(s,n.prop),n.prop},onMounted:function(n,r){n.el=this.vm.refs[n.ref]||r,n.parser.mounted(n),this.$handle.effect(n,"mounted"),this.$handle.targetHook(n,"mounted")},onInput:function(n,r){if(n.prop.modelEmit){this.$handle.onBaseInput(n,r);return}this.$handle.onInput(n,r)},onEmitInput:function(n){this.$handle.setValue(n,n.parser.toValue(n.modelValue,n),n.modelValue)},renderChildren:function(n,r){var i=this;if(!pe.trueArray(n))return{};var o=So();return n.map(function(a){if(a){if(pe.String(a)||pe.Number(a))return o.setSlot(null,"".concat(a));if(a.__fc__)return i.renderSlot(o,a.__fc__,r);a.type&&Xe(function(){i.$handle.loadChildren(n,r),i.$handle.refresh()})}}),o.getSlots()},defaultRender:function(n,r){var i=n.prop;return i.component?typeof i.component=="string"?this.vNode.make(i.component,i,r):this.vNode.makeComponent(i.component,i,r):this.vNode[n.type]?this.vNode[n.type](i,r):this.vNode[n.originType]?this.vNode[n.originType](i,r):this.vNode.make(Hm(i.type),i,r)},createChildrenVnodes:function(n,r,i){this.force=i!==!1,this.tmpInput=r;var o=this.renderChildren(n.rule.children,n);return this.force=!1,this.tmpInput=null,o},createRuleVnode:function(n,r,i){this.force=i!==!1,this.tmpInput=r;var o=So();return this.renderSlot(o,n,n.parent),this.force=!1,this.tmpInput=null,o.getSlots()},renderRule:function(n,r,i){var o=this;if(n){if(pe.String(n)||pe.Number(n))return"".concat(n);var a;if(i)a=n.type;else if(a=n.is,n.type){a=qt(n.type);var s=this.vNode.aliasMap[a];s&&(a=qt(s))}if(a){var l=So();pe.trueArray(n.children)&&n.children.forEach(function(c){c&&l.setSlot(c?.slot,function(){return o.renderRule(c)})});var u=Te({},n);return delete u.type,delete u.is,this.vNode.make(a,u,l.mergeBag(r).getSlots())}}}})}var Ox=1;function jc(t){Fe(this,{$handle:t,fc:t.fc,vm:t.vm,$manager:t.$manager,vNode:new t.fc.CreateNode(t),force:!1,tmpInput:null,id:Ox++}),Km(this,{options:function(){return t.options},sort:function(){return t.sort}}),this.initCache(),this.initRender()}Tx(jc);xx(jc);function Ax(t){Fe(t.prototype,{parseInjectEvent:function(n,r){var i=n.inject||this.options.injectEvent;return this.parseEventLst(n,r,i)},parseEventLst:function(n,r,i,o){var a=this;return Object.keys(r).forEach(function(s){var l=a.parseEvent(n,r[s],i,o);l&&(r[s]=l)}),r},parseEvent:function(n,r,i,o){if(pe.Function(r)&&(i!==!1&&!pe.Undef(i)||r.__inject))return this.inject(n,r,i);if(!o&&Array.isArray(r)&&r[0]&&(pe.String(r[0])||pe.Function(r[0])))return this.parseEventLst(n,r,i,!0);if(pe.String(r)){var a=Ln(r);if(a&&r!==a)return a.__inject?this.parseEvent(n,a,i,!0):a}},parseEmit:function(n){var r=this,i={},o=n.rule,a=o.emitPrefix,s=o.field,l=o.name,u=o.inject,c=o.emit||[];return pe.trueArray(c)&&c.forEach(function(d){if(d){var f,m=a||s||l;if(pe.Object(d)&&(f=d.inject,d=d.name,m=d.prefix||m),m){var p=Li("".concat(m,"-").concat(d)),h=function(){var S,w,y;r.vm.emitsOptions&&!r.vm.emitsOptions[p]&&(r.vm.emitsOptions[p]=null);for(var E=arguments.length,T=new Array(E),A=0;A<E;A++)T[A]=arguments[A];(S=r.vm).emit.apply(S,[p].concat(T)),(w=r.vm).emit.apply(w,["emit-event",p].concat(T)),(y=r.bus).$emit.apply(y,[p].concat(T))};if(h.__emit=!0,!f&&u===!1)i[qt(d)]=h;else{var v=f||u||r.options.injectEvent;i[qt(d)]=pe.Undef(v)?h:r.inject(o,h,v)}}}}),n.computed.on=i,i},getInjectData:function(n,r){var i=n.__fc__&&n.__fc__.$api,o=n.__fc__&&n.__fc__.$handle.vm||this.vm,a=o.props,s=a.option,l=a.rule;return{$f:i||this.api,api:i||this.api,rule:l,self:n.__origin__,option:s,inject:r}},inject:function(n,r,i){if(r.__origin){if(this.watching&&!this.loading)return r;r=r.__origin}var o=this,a=function(){for(var l=o.getInjectData(n,i),u=arguments.length,c=new Array(u),d=0;d<u;d++)c[d]=arguments[d];return l.args=[].concat(c),c.unshift(l),r.apply(this,c)};return a.__origin=r,a.__json=r.__json,a},loadStrVar:function(n,r,i){var o=this;if(n&&typeof n=="string"&&n.indexOf("{{")>-1&&n.indexOf("}}")>-1){var a=n,s=_x(n),l=function(f){var m=!1,p;if(i&&f.indexOf("$form.")===0){var h=f.split(".");h.shift(),dt(i.value,h[0])&&(m=!0,p=r?r({id:"$form."+h[0]+"_"+i.rule.__fc__.id,getValue:function(){return Mt(i.value,h)}}):Mt(i.value,h))}return m||(p=r?r(f):o.fc.getLoadData(f)),p},u=function d(f){var m=[];f.forEach(function(h){h.key?m.push(h.key):h.children&&m.push(d(h.children))});var p=!1;return m.forEach(function(h,v){h!=null&&(h.indexOf("'")===0||h.indexOf('"')===0)&&(m[v]=h.slice(1,-1),p=!0)}),m.length===1&&(p||!isNaN(Number(m[0])))?m[0]:l(m.join("."))},c;if(s.forEach(function(d){var f=d.split("||"),m=f[0].trim();if(m){var p=(f[1]||"").trim(),h=Ym(m),v=Be(function(){return u(h)});(v==null||v==="")&&f.length>1&&(v=p),c=v,n=n.replaceAll("{{".concat(d,"}}"),v??"")}}),s.length===1&&a==="{{".concat(s[0],"}}"))return c}return n},loadFetchVar:function(n,r,i){var o=this,a;i&&i.__fc__&&(a=i.__fc__.getParentGroup()),!a&&n.targetRule&&n.targetRule.__fc__&&(a=n.targetRule.__fc__.getParentGroup());var s=function(u){return o.loadStrVar(u,r,a?{rule:i,value:o.subRuleData[a.id]||{}}:null)};return n.action=s(n.action||""),["headers","data","query"].forEach(function(l){if(n[l]){var u=Array.isArray(n[l])?[]:{};Object.keys(n[l]).forEach(function(c){u[s(c)]=s(n[l][c])}),n[l]=u}}),n}})}var sf=["hook:updated","hook:mounted"];function $x(t){Fe(t.prototype,{usePage:function(){var n=this,r=this.options.page;if(r){var i=25,o=Rx(this.rules);pe.Object(r)&&(r.first&&(i=parseInt(r.first,10)||i),r.limit&&(o=parseInt(r.limit,10)||o)),Fe(this,{first:i,limit:o,pageEnd:this.rules.length<=i}),this.bus.$on("page-end",function(){return n.vm.emit("page-end",n.api)}),this.pageLoad()}},pageLoad:function(){var n=this,r=function i(){n.pageEnd?(n.bus.$off(sf,i),n.bus.$emit("page-end")):(n.first+=n.limit,n.pageEnd=n.rules.length<=n.first,n.loadRule(),n.refresh())};this.bus.$on(sf,r)}})}function Rx(t){return t.length<31?31:Math.ceil(t.length/3)}function Px(t){Fe(t.prototype,{clearNextTick:function(){this.nextTick&&clearTimeout(this.nextTick),this.nextTick=null},bindNextTick:function(n){var r=this;this.clearNextTick(),this.nextTick=setTimeout(function(){n(),r.nextTick=null},10)},render:function(){return++this.loadedId,this.vm.setupState.unique>0?this.$render.render():(this.vm.setupState.unique=1,[])}})}function kx(t){Object.defineProperties(t.origin,{__fc__:kl(Xn(t))}),t.rule!==t.origin&&Object.defineProperties(t.rule,{__fc__:kl(Xn(t))})}function Jm(t,e,n){var r=za(),i=!!e.field;Fe(this,{id:r,ref:r,wrapRef:r+"fi",rule:e,origin:e.__origin__||e,name:e.name,pending:{},none:!1,watch:[],linkOn:[],root:[],ctrlRule:[],children:[],parent:null,group:e.subRule?this:null,cacheConfig:null,prop:Te({},e),computed:{},payload:{},refRule:{},input:i,el:void 0,exportEl:void 0,defaultValue:i?Fn(n):void 0,field:e.field||void 0}),this.updateKey(),kx(this),this.update(t,!0)}Fe(Jm.prototype,{getParentGroup:function(){for(var e=this.parent;e;){if(e.group)return e;e=e.parent}},loadChildrenPending:function(){var e=this,n=this.rule.children||[];return Array.isArray(n)?n:this.loadPending({key:"children",origin:n,def:[],onLoad:function(i){e.$handle&&e.$handle.loadChildren(i,e)},onUpdate:function(i,o){e.$handle&&(i===o?e.$handle.loadChildren(i,e):e.$handle.updateChildren(e,i,o))},onReload:function(i){e.$handle?e.$handle.updateChildren(e,[],i):delete e.pending.children}})},loadPending:function(e){var n=this,r=e.key,i=e.origin,o=e.def,a=e.onLoad,s=e.onReload,l=e.onUpdate;if(this.pending[r]&&this.pending[r].origin===i)return this.getPending(r,o);delete this.pending[r];var u=i;if(pe.Function(i)){var c=Be(function(){return i({rule:n.rule,api:n.$api,update:function(f){var m=f||o,p=n.getPending(r,o);n.setPending(r,i,m),l&&l(m,p)},reload:function(){var f=n.getPending(r,o);delete n.pending[r],s&&s(f),n.$api&&n.$api.sync(n.rule)}})});c&&pe.Function(c.then)?(c.then(function(d){var f=d||o;n.setPending(r,i,f),a&&a(f),n.$api&&n.$api.sync(n.rule)}).catch(function(d){console.error(d)}),u=o,this.setPending(r,i,u)):(u=c||o,this.setPending(r,i,u),a&&a(u))}return u},getPending:function(e,n){return this.pending[e]&&this.pending[e].value||n},setPending:function(e,n,r){this.pending[e]={origin:n,value:Lt(r)}},effectData:function(e){return this.payload[e]||(this.payload[e]={}),this.payload[e]},clearEffectData:function(e){e===void 0?this.payload={}:delete this.payload[e]},updateKey:function(e){this.key=za(),e&&this.parent&&this.parent.updateKey(e)},updateType:function(){this.originType=this.rule.type,this.type=qt(this.rule.type),this.trueType=this.$handle.getType(this.originType)},setParser:function(e){this.parser=e,e.init(this)},initProp:function(){var e=this,n,r,i,o=Te({},this.rule);delete o.children,delete o.validate,this.prop=er({},[o].concat(We(Object.keys(this.payload).map(function(a){return e.payload[a]})),[this.computed])),o.col&&((n=o.col)===null||n===void 0?void 0:n.show)!==!1&&(this.prop.col.show=!0),this.prop.validate=[].concat(We(((r=this.refRule)===null||r===void 0||(i=r.__$validate)===null||i===void 0?void 0:i.value)||[]),We(this.prop.validate||[]))},initNone:function(){this.none=!(pe.Undef(this.prop.display)||this.prop.display)},hasHidden:function(){return!!this.rule.hidden||(this.parent?this.parent.hasHidden():!1)},injectValidate:function(){return this.prop.validate},check:function(e){return this.vm===e.vm},unwatch:function(){var e=this;this.watch.forEach(function(n){return n()}),this.watch=[],Object.keys(this.refRule).forEach(function(n){n.indexOf("__$")!==0&&delete e.refRule[n]})},unlink:function(){this.linkOn.forEach(function(e){return e()}),this.linkOn=[]},link:function(){this.unlink(),this.$handle.appendLink(this)},watchTo:function(){this.$handle.watchCtx(this)},delete:function(){this.unwatch(),this.unlink(),this.rmCtrl(),this.parent&&this.parent.children.splice(this.parent.children.indexOf(this)>>>0,1),Fe(this,{deleted:!0,computed:{},parent:null,children:[],cacheConfig:null,none:!1})},rmCtrl:function(){this.ctrlRule.forEach(function(e){return e.__fc__&&e.__fc__.rm()}),this.ctrlRule=[]},rm:function(){var e=this,n=function(){var i=e.root.indexOf(e.origin);i>-1&&(e.root.splice(i,1),e.$handle&&e.$handle.refresh())};if(this.deleted){n();return}this.$handle.noWatch(function(){e.$handle.deferSyncValue(function(){e.rmCtrl(),n(),e.$handle.rmCtx(e),Fe(e,{root:[]})},e.input)})},update:function(e,n){Fe(this,{deleted:!1,$handle:e,$render:e.$render,$api:e.api,vm:e.vm,vNode:e.$render.vNode,updated:!1,cacheValue:this.rule.value}),!n&&this.unwatch(),this.watchTo(),this.link(),this.updateType()}});function Ix(t){Fe(t.prototype,{nextRefresh:function(n){var r=this,i=this.loadedId;Xe(function(){i===r.loadedId&&(n?n():r.refresh())})},parseRule:function(n){var r=this,i=ef(n);return Object.defineProperties(i,{__origin__:kl(n)}),Mx(i),this.appendValue(i),[i,i.prefix,i.suffix].forEach(function(o){o&&r.loadFn(o,i)}),this.loadCtrl(i),i.update&&(i.update=Ln(i.update)),i},loadFn:function(n,r){var i=this;["on","props","deep"].forEach(function(o){n[o]&&i.parseInjectEvent(r,n[o])})},loadCtrl:function(n){n.control&&n.control.forEach(function(r){r.handle&&(r.handle=Ln(r.handle))})},syncProp:function(n){var r=this,i=n.rule;pe.trueArray(i.sync)&&lr([{on:i.sync.reduce(function(o,a){return o[Je(a)==="object"&&a.event||"update:".concat(a)]=function(s){i.props[Je(a)==="object"&&a.prop||a]=s,r.vm.emit("sync",a,s,i,r.fapi)},o},{})}],n.computed)},loadRule:function(){var n=this;this.cycleLoad=!1,this.loading=!0,this.pageEnd&&this.bus.$emit("load-start"),this.deferSyncValue(function(){if(n._loadRule(n.rules),n.loading=!1,n.cycleLoad&&n.pageEnd)return n.loadRule();n.syncForm(),n.pageEnd&&n.bus.$emit("load-end"),n.vm.setupState.renderRule()})},loadChildren:function(n,r){if(this.cycleLoad=!1,this.loading=!0,this.bus.$emit("load-start"),this._loadRule(n,r),this.loading=!1,this.cycleLoad)return this.loadRule();this.syncForm(),this.bus.$emit("load-end"),this.$render.clearCache(r)},_loadRule:function(n,r){var i=this,o=function l(u){var c=n[u-1];if(!c||!c.__fc__)return u>0?l(u-1):-1;var d=i.sort.indexOf(c.__fc__.id);return d>-1?d:l(u-1)},a=function(u,c){pe.trueArray(u)&&i._loadRule(u,c)},s=n.map(function(l,u){if(!(r&&!pe.Object(l))&&!(!i.pageEnd&&!r&&u>=i.first)){if(l.__fc__&&l.__fc__.root===n&&i.ctxs[l.__fc__.id])return a(l.__fc__.loadChildrenPending(),l.__fc__),l.__fc__;var c=ef(l),d=function(){return!!(c.field&&i.fieldCtx[c.field]&&i.fieldCtx[c.field][0]!==l.__fc__)};i.fc.targetFormDriver("loadRule",{rule:c,api:i.api},i.fc),i.ruleEffect(c,"init",{repeat:d()}),d()&&i.vm.emit("repeat-field",l,i.api);var f,m=!1,p=!!l.__fc__,h=c.value;if(p){if(f=l.__fc__,h=f.defaultValue,f.deleted){if(lf(f))return;f.update(i)}else if(!f.check(i)){if(lf(f))return;n[u]=l=l._clone?l._clone():jm(ji(l)),f=null,m=!0}}if(f)f.originType!==f.rule.type&&f.updateType(),i.bindParser(f),i.appendValue(f.rule),f.parent&&f.parent!==r&&i.rmSubRuleData(f);else{var v=i.parseRule(l);f=new Jm(i,v,h),i.bindParser(f)}i.parseEmit(f),i.syncProp(f),f.parent=r||null,f.root=n,i.setCtx(f),!m&&!p&&(i.effect(f,"load"),i.targetHook(f,"load")),i.effect(f,"created");var C=f.loadChildrenPending();if(f.parser.loadChildren===!1||a(C,f),!r){var S=o(u);S>-1||!u?i.sort.splice(S+1,0,f.id):i.sort.push(f.id)}var w=f.rule;return f.updated||(f.updated=!0,pe.Function(w.update)&&i.bus.$once("load-end",function(){i.refreshUpdate(f,w.value,"init")}),i.effect(f,"loaded")),i.refreshControl(f)&&(i.cycleLoad=!0),f}}).filter(function(l){return!!l});r&&(r.children=s)},refreshControl:function(n){return n.input&&n.rule.control&&this.useCtrl(n)},useCtrl:function(n){var r=this,i=Fx(n),o=[],a=this.api;if(!i.length)return!1;for(var s=function(m){var p=i[m],h=p.handle||function(C){return(Pr[p.condition||"=="]||Pr["=="])(C,p.value)};if(!pe.trueArray(p.rule))return"continue";var v=Te(Te({},p),{},{valid:Be(function(){return h(n.rule.value,a)}),ctrl:Dx(n,p.rule),isHidden:pe.String(p.rule[0])});if(v.valid&&v.ctrl||!v.valid&&!v.ctrl&&!v.isHidden)return"continue";o.push(v)},l=0;l<i.length;l++)var u=s(l);if(!o.length)return!1;var c=[],d=!1;return this.deferSyncValue(function(){o.reverse().forEach(function(f){var m=f.isHidden,p=f.valid,h=f.rule,v=f.prepend,C=f.append,S=f.child,w=f.ctrl,y=f.method;if(m){p?n.ctrlRule.push({__ctrl:!0,children:h,valid:p}):w&&n.ctrlRule.splice(n.ctrlRule.indexOf(w)>>>0,1),c[p?"push":"unshift"](function(){y==="disabled"||y==="enabled"?r.api.disabled(!p,h):y==="display"||y==="show"?r.api.display(p,h):y==="required"?(h.forEach(function(A){r.api.setEffect(A,"required",p)}),p||r.api.clearValidateState(h)):r.api.hidden(!p,h)});return}if(p){d=!0;var E={type:"fragment",native:!0,__ctrl:!0,children:h};n.ctrlRule.push(E),r.bus.$once("load-start",function(){v?a.prepend(E,v,S):C||S?a.append(E,C||n.id,S):n.root.splice(n.root.indexOf(n.origin)+1,0,E)})}else{n.ctrlRule.splice(n.ctrlRule.indexOf(w),1);var T=Kn(w);T&&T.rm()}})}),c.length&&(this.loading?c.length&&this.bus.$once("load-end",function(){c.forEach(function(f){return f()})}):c.length&&Xe(function(){c.forEach(function(f){return f()})})),this.vm.emit("control",n.origin,this.api),this.effect(n,"control"),d},reloadRule:function(n){return this._reloadRule(n)},_reloadRule:function(n){var r=this;n||(n=this.rules);var i=Te({},this.ctxs);this.clearNextTick(),this.initData(n),this.fc.rules=n,this.deferSyncValue(function(){r.bus.$once("load-end",function(){Object.keys(i).filter(function(o){return r.ctxs[o]===void 0}).forEach(function(o){return r.rmCtx(i[o])}),r.$render.clearCacheAll()}),r.reloading=!0,r.loadRule(),r.reloading=!1,r.refresh(),r.bus.$emit("reloading",r.api)}),this.bus.$off("next-tick",this.nextReload),this.bus.$once("next-tick",this.nextReload),this.bus.$emit("update",this.api)},refresh:function(){this.vm.setupState.refresh()}})}function Mx(t){var e=Gm();return Object.keys(e).forEach(function(n){dt(t,n)||(t[n]=e[n])}),t}function Fx(t){var e=t.rule.control||[];return pe.Object(e)?[e]:e}function Dx(t,e){for(var n=0;n<t.ctrlRule.length;n++){var r=t.ctrlRule[n];if(r.children===e)return r}}function lf(t){return!!t.rule.__ctrl}function Lx(t){Fe(t.prototype,{setValue:function(n,r,i,o){var a=this;n.deleted||(n.rule.value=r,this.changeStatus=!0,this.nextRefresh(),this.$render.clearCache(n),this.setFormData(n,i),this.syncValue(),this.valueChange(n,r),this.vm.emit("change",n.field,r,n.origin,this.api,o||!1),this.effect(n,"value"),this.targetHook(n,"value",{value:r}),this.emitEvent("change",n.field,r,{rule:n.origin,api:this.api,setFlag:o||!1}),o&&Xe(function(){Xe(function(){Xe(function(){a.api.clearValidateState(n.id)})})}),this.$manager.fieldChange(n,r,i,o))},onInput:function(n,r){var i;n.input&&(this.isQuote(n,i=n.parser.toValue(r,n))||this.isChange(n,r))&&this.setValue(n,i,r)},onUpdateValue:function(n,r){var i=this;this.deferSyncValue(function(){var o=n.getParentGroup(),a=o?i.subRuleData[o.id]:null,s={};Object.keys(r||{}).forEach(function(l){a&&dt(a,l)?s[l]=r[l]:dt(i.api.form,l)?i.api.form[l]=r[l]:i.api.top!==i.api&&dt(i.api.top.form,l)&&(i.api.top.form[l]=r[l])}),Object.keys(s).length&&i.api.setChildrenFormData(o.rule,s)})},onBaseInput:function(n,r){this.setFormData(n,r),n.modelValue=r,this.nextRefresh(),this.$render.clearCache(n)},setFormData:function(n,r){n.modelValue=r;var i=n.getParentGroup();i&&(this.subRuleData[i.id]||(this.subRuleData[i.id]={}),this.subRuleData[i.id][n.field]=n.rule.value),cn(this.formData,n.id,r)},rmSubRuleData:function(n){var r=n.getParentGroup();r&&this.subRuleData[r.id]&&delete this.subRuleData[r.id][n.field]},getFormData:function(n){return this.formData[n.id]},syncForm:function(){var n=this,r=Lt({}),i=this.fields(),o=[];this.options.appendValue!==!1&&Object.keys(this.appendData).reduce(function(a,s){return i.indexOf(s)===-1&&(a[s]=Rt(n.appendData,s)),a},r),i.reduce(function(a,s){var l=(n.fieldCtx[s]||[]).filter(function(u){return!n.isIgnore(u)})[0];return l||(l=n.fieldCtx[s][0],o.push(s)),a[s]=Rt(l.rule,"value"),a},r),this.form=r,this.ignoreFields=o,this.syncValue()},isIgnore:function(n){return n.rule.ignore===!0||(n.rule.ignore==="hidden"||this.options.ignoreHiddenFields)&&n.hasHidden()},appendValue:function(n){(!n.field||!dt(this.appendData,n.field))&&(!pe.Undef(n.value)||!this.options.forceCoverValue)||(n.value=this.appendData[n.field],delete this.appendData[n.field])},addSubForm:function(n,r){this.subForm[n.id]=r},deferSyncValue:function(n,r){this.deferSyncFn||(this.deferSyncFn=n),this.deferSyncFn.sync||(this.deferSyncFn.sync=r),Be(n),this.deferSyncFn===n&&(this.deferSyncFn=null,n.sync&&this.syncForm())},syncValue:function(){var n=this;if(this.deferSyncFn)return this.deferSyncFn.sync=!0;var r={};Object.keys(this.form).forEach(function(i){n.ignoreFields.indexOf(i)===-1&&(r[i]=n.form[i])}),this.vm.setupState.updateValue(r)},isChange:function(n,r){return JSON.stringify(this.getFormData(n),cf)!==JSON.stringify(r,cf)},isQuote:function(n,r){return(r instanceof Function||pe.Object(r)||Array.isArray(r))&&r===n.rule.value},refreshUpdate:function(n,r,i,o){var a=this;if(pe.Function(n.rule.update)){var s=Be(function(){return n.rule.update(r,n.origin,a.api,{origin:i||"change",linkField:o})});if(s===void 0)return;n.rule.hidden=s===!0}},valueChange:function(n,r){this.refreshRule(n,r),this.bus.$emit("change-"+n.field,r)},refreshRule:function(n,r,i,o){this.refreshControl(n)&&(this.$render.clearCacheAll(),this.loadRule(),this.bus.$emit("update",this.api),this.refresh()),this.refreshUpdate(n,r,i,o)},appendLink:function(n){var r=this,i=n.rule.link;pe.trueArray(i)&&i.forEach(function(o){var a=function(){return r.refreshRule(n,n.rule.value,"link",o)};r.bus.$on("change-"+o,a),n.linkOn.push(function(){return r.bus.$off("change-"+o,a)})})},fields:function(){return Object.keys(this.fieldCtx)}})}function cf(t,e){return typeof e=="function"?""+e:e}var Oi={init:function(e){},toFormValue:function(e,n){return e},toValue:function(e,n){return e},mounted:function(e){},render:function(e,n){return n.$handle.fc.renderDriver&&n.$handle.fc.renderDriver.defaultRender?n.$handle.fc.renderDriver.defaultRender(n,e):n.$render.defaultRender(n,e)},preview:function(e,n){return n.$handle.fc.renderDriver&&n.$handle.fc.renderDriver.defaultPreview?n.$handle.fc.renderDriver.defaultPreview(n,e):this.render(e,n)},mergeProp:function(e){}},jx=["field","value","vm","template","name","config","control","inject","sync","payload","optionsTo","update","slotUpdate","computed","component","cache"],Ci=Symbol("oldValue");function Vx(t){Fe(t.prototype,{getCtx:function(n){return this.getFieldCtx(n)||this.getNameCtx(n)[0]||this.ctxs[n]},getCtxs:function(n){return this.fieldCtx[n]||this.nameCtx[n]||(this.ctxs[n]?[this.ctxs[n]]:[])},setIdCtx:function(n,r,i){var o="".concat(i,"Ctx");this[o][r]?this[o][r].push(n):this[o][r]=[n]},rmIdCtx:function(n,r,i){var o="".concat(i,"Ctx"),a=this[o][r];if(!a)return!1;var s=a.splice(a.indexOf(n)>>>0,1).length>0;return a.length||delete this[o][r],s},getFieldCtx:function(n){return(this.fieldCtx[n]||[])[0]},getNameCtx:function(n){return this.nameCtx[n]||[]},setCtx:function(n){var r=n.id,i=n.field,o=n.name,a=n.rule;this.ctxs[r]=n,o&&this.setIdCtx(n,o,"name"),n.input&&(this.setIdCtx(n,i,"field"),this.setFormData(n,n.parser.toFormValue(a.value,n)),this.isMounted&&!this.reloading&&this.vm.emit("change",n.field,a.value,n.origin,this.api,!1,!0))},getParser:function(n){var r=this.fc.parsers,i=this.fc.renderDriver;if(i){var o=i.parsers||{},a=o[n.originType]||o[qt(n.type)]||o[n.trueType];if(a)return a}return r[n.originType]||r[qt(n.type)]||r[n.trueType]||Oi},bindParser:function(n){n.setParser(this.getParser(n))},getType:function(n){var r=this.fc.CreateNode.aliasMap,i=r[n]||r[qt(n)]||n;return qt(i)},noWatch:function(n){this.noWatchFn||(this.noWatchFn=n),Be(n),this.noWatchFn===n&&(this.noWatchFn=null)},watchCtx:function(n){var r=this,i=Bm();if(i.filter(function(a){return a[0]!=="_"&&a[0]!=="$"&&jx.indexOf(a)===-1}).forEach(function(a){var s=Rt(n.rule,a),l=a==="children";n.refRule[a]=s,n.watch.push(Ae(l?function(){return pe.Function(s.value)?s.value:We(s.value||[])}:function(){return s.value},function(u,c){var d=s.value;if(!r.isBreakWatch()){if(l&&n.parser.loadChildren===!1){r.$render.clearCache(n),r.nextRefresh();return}if(r.watching=!0,Xe(function(){r.targetHook(n,"watch",{key:a,oldValue:c,newValue:d})}),a==="hidden"&&!!d!=!!c&&(r.$render.clearCacheAll(),Xe(function(){r.targetHook(n,"hidden",{value:d})})),a==="ignore"&&n.input||a==="hidden"&&(n.rule.ignore==="hidden"||r.options.ignoreHiddenFields))r.syncForm();else if(a==="link"){n.link();return}else["props","on","deep"].indexOf(a)>-1?(r.parseInjectEvent(n.rule,d||{}),a==="props"&&n.input&&r.setFormData(n,n.parser.toFormValue(n.rule.value,n))):a==="emit"?r.parseEmit(n):["prefix","suffix"].indexOf(a)>-1?d&&r.loadFn(d,n.rule):a==="type"?(n.updateType(),r.bindParser(n)):l&&(pe.Function(c)&&(c=n.getPending("children",[])),pe.Function(d)&&(d=n.loadChildrenPending()),r.updateChildren(n,d,c));r.$render.clearCache(n),r.refresh(),r.watching=!1}},{deep:!l,sync:l}))}),n.refRule.__$title=te(function(){var a=(Je(n.rule.title)==="object"?n.rule.title.title:n.rule.title)||"";if(a){var s=a.match(/^\{\{\s*\$t\.(.+)\s*\}\}$/);s&&(a=r.api.t(s[1]))}return a}),n.refRule.__$info=te(function(){var a=(Je(n.rule.info)==="object"?n.rule.info.info:n.rule.info)||"";if(a){var s=a.match(/^\{\{\s*\$t\.(.+)\s*\}\}$/);s&&(a=r.api.t(s[1]))}return a}),n.refRule.__$validate=te(function(){var a=function(l){var u=l.match(/^\{\{\s*\$t\.(.+)\s*\}\}$/);if(u){var c,d;return r.api.t(u[1],{title:(c=n.refRule)===null||c===void 0||(d=c.__$title)===null||d===void 0?void 0:d.value})}return l};return Ht(n.rule.validate).map(function(s){var l=Te({},s);if(l.message&&(l.message=a(l.message)),pe.Function(l.validator)){var u=n;l.validator=function(){for(var d,f=arguments.length,m=new Array(f),p=0;p<f;p++)m[p]=arguments[p];return(d=s.validator).call.apply(d,[{that:this,id:u.id,field:u.field,rule:u.rule,api:u.$handle.api}].concat(m))}}if(l.adapter){if(Je(l.error)==="object"){var c=Te({},l.error);Object.keys(c).forEach(function(d){c[d]=a(c[d])}),l.error=c}return r.adapterValidate(l,n)}return l})}),n.input){var o=Rt(n.rule,"value");n.watch.push(Ae(function(){return o.value},function(){var a=n.parser.toFormValue(o.value,n);r.isChange(n,a)&&r.setValue(n,o.value,a,!0)}))}this.bus.$once("load-end",function(){var a=n.rule.computed;a&&(Je(a)!=="object"&&(a={value:a}),Object.keys(a).forEach(function(s){var l=te(function(){var c=a[s];if(c){var d=r.compute(n,c);return(c.linkage||c.linkageVariable)&&d===Ci?Ci:d}}),u=function(d){s==="value"?r.onInput(n,d):s[0]==="$"?r.api.setEffect(n.id,s,d):vr(n.rule,s,d)};(s==="value"?[void 0,null,""].indexOf(n.rule.value)>-1:l.value!==Mt(n.rule,s))&&u(l.value),n.watch.push(Ae(l,function(c){c!==Ci&&setTimeout(function(){u(c)})},{deep:!0}))}))}),this.watchEffect(n)},adapterValidate:function(n,r){var i=this,o=function(s,l){var u=n.beforeValidate&&Be(function(){return n.beforeValidate({value:s,api:i.api,validate:n,rule:r.rule})});if(u===!1)l();else{var c=i.validator(r,s,n);if(c){var f="";Je(n.error)==="object"&&(f=n.error[c]||n.error.default),!f&&typeof n.message=="string"&&(f=n.message),f||(f=i.getValidateMessage(r,{key:c,rule:n[c]})),l(f)}else if(n.validator){var d=n.validator&&Be(function(){return n.validator(s,l)});d&&pe.Function(d.then)&&d.then(function(){return l()}).catch(function(m){return l(m)})}else l()}};return this.$manager.adapterValidate({required:n.required,message:n.message,trigger:n.trigger},o)},getValidateMessage:function(n,r){var i,o,a,s=Array.isArray(r.rule)?r.rule.join(","):""+r.rule;return this.api.t(r.key==="required"?r.key:"validate."+r.key,(a={},mt(a,r.key,s),mt(a,"title",(i=n.refRule)===null||i===void 0||(o=i.__$title)===null||o===void 0?void 0:o.value),a))},validator:function(n,r,i){var o=this,a=pe.empty(r);if(a)return i.required?"required":void 0;for(var s=function(){var f=cT(u[l],2),m=f[0],p=f[1];switch(m){case"len":case"maxLen":case"minLen":var h=function(A){return m==="len"?A===p:m==="maxLen"?A<=p:A>=p};if(Array.isArray(r)){if(!h(r.length))return{v:m}}else{if(Je(r)==="object")return{v:m};if(!h((""+r).length))return{v:m}}break;case"pattern":var v=typeof p=="string"?new RegExp(p):p;if(!v.test(""+r))return{v:m};break;case"uppercase":if(p&&(typeof r!="string"||!/^[A-Z]*$/.test(r)))return{v:m};break;case"lowercase":if(p&&(typeof r!="string"||!/^[a-z]*$/.test(r)))return{v:m};break;case"min":case"max":case"positive":case"negative":case"integer":case"number":var C=Number(r);if(Number.isNaN(C))return{v:m};if(m==="min"&&C<p)return{v:m};if(m==="max"&&C>p)return{v:m};if(m==="positive"&&C<=0)return{v:m};if(m==="negative"&&C>=0)return{v:m};if(m==="integer"&&!Number.isInteger(C))return{v:m};break;case"equal":if(r!==p)return{v:m};break;case"enum":if(Array.isArray(p)&&!p.includes(r))return{v:m};break;case"hasKeys":if(Je(r)!=="object"||Array.isArray(p)&&p.some(function(T){return!(T in r)}))return{v:m};break;case"email":var S=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;if(!S.test(""+r))return{v:m};break;case"url":var w=new RegExp("^(?!mailto:)(?:(?:http|https|ftp)://)(?:\\S+(?::\\S*)?@)?(?:(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[0-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]+-?)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]+-?)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))|localhost)(?::\\d{2,5})?(?:(/|\\?|#)[^\\s]*)?$","i");if(!w.test(""+r))return{v:m};break;case"ip":var y=/^(2(5[0-5]{1}|[0-4]\d{1})|[0-1]?\d{1,2})(\.(2(5[0-5]{1}|[0-4]\d{1})|[0-1]?\d{1,2})){3}$/;if(!y.test(""+r))return{v:m};break;case"phone":var E=/^(?:(?:\+|00)86)?1[3-9]\d{9}$/;if(!E.test(""+r))return{v:m};break;case"computed":if(!o.compute(n,p))return{v:m};break}},l=0,u=Object.entries(i);l<u.length;l++){var c=s();if(Je(c)==="object")return c.v}},compute:function(n,r){var i=this,o;if(Je(r)==="object"){var a=n.getParentGroup(),s=function c(d){if(d=Array.isArray(d)?{mode:"AND",group:d}:d,!pe.trueArray(d.group))return!0;for(var f=d.mode==="OR",m=!0,p=function(S){var w=d.group[S],y=void 0,E=null,T=null;if(w.variable)T=i.fc.getLoadData(w.variable);else if(w.field)E=rf(w.field||"");else if(!w.mode)return{v:!0};var A=w.compare;if(A&&(A=rf(A||"")),w.mode?y=c(w):Pr[w.condition]?pe.Function(w.handler)?y=Be(function(){return w.handler(i.api,n.rule)}):y=Be(function(){return new Function("$condition","$variableVal","$val","$form","$scope","$group","$rule","with($form){with($scope){with(this){with($group){ return $condition['".concat(w.condition,"'](").concat(w.variable?"$variableVal":E,", ").concat(A||"$val","); }}}}")).call(i.api.form,Pr,T,w.value,i.api.top.form,i.api.top===i.api.scope?{}:i.api.scope.form,a?i.subRuleData[a.id]||{}:{},n.rule)}):y=!1,f&&y)return{v:!0};f||(m=m&&y)},h=0;h<d.group.length;h++){var v=p(h);if(Je(v)==="object")return v.v}return f?!1:m},l=s(r);return l=r.invert===!0?!l:l,r.linkage?l?Be(function(){return i.computeValue(r.linkage,n,a)},void 0):Ci:r.linkageVariable?l?Be(function(){return i.fc.getLoadData(r.linkageVariable)},void 0):Ci:l}else if(pe.Function(r))o=function(){return r(i.api.form,i.api,n.rule)};else{var u=n.getParentGroup();o=function(){return i.computeValue(r,n,u)}}return Be(o,void 0)},computeValue:function(n,r,i){var o=this,a=this,s=Object.keys(this.fc.formulas).reduce(function(l,u){return l[u]=function(){for(var c,d=arguments.length,f=new Array(d),m=0;m<d;m++)f[m]=arguments[m];return(c=a.fc.formulas[u]).call.apply(c,[{that:this,rule:r.rule,api:a.api,fc:a.fc}].concat(f))},l},{});return Be(function(){return new Function("$formulas","$form","$scope","$group","$rule","$api","with($form){with($scope){with(this){with($group){with($formulas){ return ".concat(n," }}}}}")).call(o.api.form,s,o.api.top.form,o.api.top===o.api.scope?{}:o.api.scope.form,i?o.subRuleData[i.id]||{}:{},r.rule,o.api)},void 0)},updateChildren:function(n,r,i){var o=this;this.deferSyncValue(function(){i&&i.forEach(function(a){(r||[]).indexOf(a)===-1&&a&&!pe.String(a)&&a.__fc__&&a.__fc__.parent===n&&o.rmCtx(a.__fc__)}),pe.trueArray(r)&&(o.loadChildren(r,n),o.bus.$emit("update",o.api))})},rmSub:function(n){var r=this;pe.trueArray(n)&&n.forEach(function(i){i&&i.__fc__&&r.rmCtx(i.__fc__)})},rmCtx:function(n){var r=this;if(!n.deleted){var i=n.id,o=n.field,a=n.input,s=n.name;wr(this.ctxs,i),wr(this.formData,i),wr(this.subForm,i),wr(this.vm.setupState.ctxInject,i);var l=n.getParentGroup();l&&this.subRuleData[l.id]&&wr(this.subRuleData[l.id],o),n.group&&wr(this.subRuleData,i),a&&this.rmIdCtx(n,o,"field"),s&&this.rmIdCtx(n,s,"name"),a&&!dt(this.fieldCtx,o)&&wr(this.form,o),this.deferSyncValue(function(){if(!r.reloading){if(n.parser.loadChildren!==!1){var c=n.getPending("children",n.rule.children);pe.trueArray(c)&&c.forEach(function(d){return d&&d.__fc__&&r.rmCtx(d.__fc__)})}n.root===r.rules&&r.vm.setupState.renderRule()}},a);var u=this.sort.indexOf(i);return u>-1&&this.sort.splice(u,1),this.$render.clearCache(n),n.delete(),this.effect(n,"deleted"),this.targetHook(n,"deleted"),a&&!this.fieldCtx[o]&&this.vm.emit("remove-field",o,n.rule,this.api),n.rule.__ctrl||this.vm.emit("remove-rule",n.rule,this.api),n}}})}function zx(t){Fe(t.prototype,{mounted:function(){var n=this,r=function(){n.isMounted=!0,n.lifecycle("mounted")};this.pageEnd?r():this.bus.$once("page-end",r)},lifecycle:function(n){this.fc.targetFormDriver(n,this.api,this.fc),this.vm.emit(n,this.api),this.emitEvent(n,this.api)},emitEvent:function(n){for(var r,i=arguments.length,o=new Array(i>1?i-1:0),a=1;a<i;a++)o[a-1]=arguments[a];var s=this.options[n]||this.options[qt("on-"+n)];if(s){var l=Ln(s);pe.Function(l)&&Be(function(){return l.apply(void 0,o)})}(r=this.bus).$emit.apply(r,[n].concat(o))},targetHook:function(n,r,i){var o,a,s=this,l=(o=n.prop)===null||o===void 0||(a=o.hook)===null||a===void 0?void 0:a[r],u=function(v,C){v&&(v=Array.isArray(v)?v:[v],v.forEach(function(S){Be(function(){return S(Te(Te({args:Object.values(i||{})},i||{}),{},{self:n.rule,rule:n.rule,parent:C?.rule,$f:s.api,api:s.api,option:s.vm.props.option}))})}))};u(l);for(var c="deep"+Dm(r),d=n.parent;d;){var f,m,p=(f=d.prop)===null||f===void 0||(m=f.hook)===null||m===void 0?void 0:m[c];u(p,d),d=d.parent}}})}function Nx(t){Fe(t.prototype,{useProvider:function(){var n=this,r=this.fc.providers;Object.keys(r).forEach(function(i){var o=r[i];pe.Function(o)&&(o=o(n.fc)),o._c=Bx(o),n.onEffect(o,i),n.providers[i]=o})},onEffect:function(n,r){var i=this,o=[];(n._c||["*"]).forEach(function(a){var s=a==="*"?"*":i.getType(a);o.indexOf(s)>-1||(o.push(s),i.bus.$on("p:".concat(r||n.name,":").concat(s,":").concat(n.input?1:0),function(l,u){n[l]&&n[l].apply(n,We(u))}))}),n._used=o},watchEffect:function(n){var r=this,i={required:function(){var a,s;return(dt(n.rule,"$required")?n.rule.$required:(a=n.rule)===null||a===void 0||(s=a.effect)===null||s===void 0?void 0:s.required)||!1}};Object.keys(n.rule.effect||{}).forEach(function(o){i[o]=function(){return n.rule.effect[o]}}),Object.keys(n.rule).forEach(function(o){o[0]==="$"&&(i[o.substr(1)]=function(){return n.rule[o]})}),Object.keys(i).forEach(function(o){n.watch.push(Ae(i[o],function(a){r.effect(n,"watch",mt({},o,a))},{deep:!0}))})},ruleEffect:function(n,r,i){this.emitEffect({rule:n,input:!!n.field,type:this.getType(n.type)},r,i)},effect:function(n,r,i){this.emitEffect({rule:n.rule,input:n.input,type:n.trueType,ctx:n,custom:i},r)},getEffect:function(n,r){if(dt(n,"$"+r))return n["$"+r];if(dt(n,"effect")&&dt(n.effect,r))return n.effect[r]},emitEffect:function(n,r,i){var o=this,a=n.ctx,s=n.rule,l=n.input,u=n.type,c=n.custom;if(!(!u||["fcFragment","fragment"].indexOf(u)>-1)){var d=c||Object.keys(s).reduce(function(f,m){return m[0]==="$"&&(f[m.substr(1)]=s[m]),f},Te({},s.effect||{}));Object.keys(d).forEach(function(f){var m=o.providers[f];if(!(!m||m.input&&!l)){var p;if(!m._c)p="*";else if(m._used.indexOf(u)>-1)p=u;else return;var h=Te({value:d[f],getValue:function(){return o.getEffect(s,f)}},i||{});a&&(h.getProp=function(){return a.effectData(f)},h.clearProp=function(){return a.clearEffectData(f)},h.mergeProp=function(v){return er(h.getProp(),[v])},h.id=a.id),o.bus.$emit("p:".concat(f,":").concat(p,":").concat(m.input?1:0),r,[h,s,o.api])}})}}})}function Ux(t){return t.filter(function(e,n,r){return r.indexOf(e,0)===n})}function Bx(t){var e=t.components;if(Array.isArray(e)){var n=Ux(e.filter(function(r){return r!=="*"}));return n.length?n:!1}else return pe.String(e)?[e]:!1}function Nn(t){var e=this;Km(this,{options:function(){return t.options.value||{}},bus:function(){return t.bus},preview:function(){return t.vm.props.preview!=null?t.vm.props.preview:t.vm.setupState.parent&&t.vm.setupState.parent.props.preview!=null?t.vm.setupState.parent.props.preview:t.options.value.preview||!1}}),Fe(this,{fc:t,vm:t.vm,watching:!1,loading:!1,reloading:!1,noWatchFn:null,deferSyncFn:null,isMounted:!1,formData:Lt({}),subRuleData:Lt({}),subForm:{},form:Lt({}),appendData:{},ignoreFields:[],providers:{},cycleLoad:null,loadedId:1,nextTick:null,changeStatus:!1,pageEnd:!0,nextReload:function(){e.lifecycle("reload")}}),this.initData(t.rules),this.$manager=new t.manager(this),this.$render=new jc(this),this.api=t.extendApiFn.reduce(function(n,r){var i=Be(function(){return r(n,e)});return i&&i!==n&&Fe(n,i),n},Ex(this))}Fe(Nn.prototype,{initData:function(e){Fe(this,{ctxs:{},fieldCtx:{},nameCtx:{},sort:[],rules:e})},init:function(){this.updateAppendData(),this.useProvider(),this.usePage(),this.loadRule(),this.$manager.__init(),this.lifecycle("created")},updateAppendData:function(){this.appendData=Te(Te(Te({},Fn(this.options.formData||{})),this.fc.vm.props.modelValue||{}),this.appendData)},isBreakWatch:function(){return this.loading||this.noWatchFn||this.reloading},globalBeforeFetch:function(e){var n=this;return new Promise(function(r,i){var o=n.options.beforeFetch&&Be(function(){return n.options.beforeFetch(e,{api:n.api})});o&&pe.Function(o.then)?o.then(r).catch(i):r()})},beforeFetch:function(e){var n=this;return new Promise(function(r,i){var o=e&&e.beforeFetch&&Be(function(){return e.beforeFetch(e,{api:n.api})});o&&pe.Function(o.then)?o.then(r).catch(i):o===!1?i():r()}).then(function(){return n.globalBeforeFetch(e)})},beforeSubmit:function(e){var n=this;return new Promise(function(r,i){var o=n.options.beforeSubmit&&Be(function(){return n.options.beforeSubmit(e,{api:n.api})});o&&pe.Function(o.then)?o.then(r).catch(i):o===!1?i():r()})}});Ax(Nn);$x(Nn);Px(Nn);Ix(Nn);Lx(Nn);Vx(Nn);zx(Nn);Nx(Nn);var Hx="fcFragment",ws=Ee({name:Hx,inheritAttrs:!1,props:["vnode"],render:function(){return this.vnode}});function qx(t){return Object.keys(t).map(function(e){var n=t[e],r=z_(e);if(r)return[r,n.value,n.arg,n.modifiers]}).filter(function(e){return!!e})}function uf(t,e){var n=t.directives;return n?(Array.isArray(n)||(n=[n]),st(e,n.reduce(function(r,i){return r.concat(qx(i))},[]))):e}function Wx(){var t={};function e(n){this.vm=n.vm,this.handle=n}return Fe(e.prototype,{make:function(r,i,o){return uf(i,this.h(r,tf(i),o))},makeComponent:function(r,i,o){try{return uf(i,j(r,tf(i),o))}catch(a){return console.error(a),j("")}},h:function(r,i,o){var a=this.vm||cl(),s=a.appContext.config.isNativeTag(r),l=this.handle.fc.prop.components[r];!l&&s&&delete i.formCreateInject;try{return j(l||(s?r:ze(r)),i,o)}catch(u){return console.error(u),j("")}},aliasMap:t}),Fe(e,{aliasMap:t,alias:function(r,i){t[r]=i},use:function(r){Object.keys(r).forEach(function(i){var o=Li(i),a=Fm(i).toLocaleLowerCase(),s=r[i];e.alias(i,s),[i,o,a].forEach(function(l){e.prototype[l]=function(u,c){return this.make(t[i]||l,u,c)}})})}}),e}function Kx(t){var e=(function(n){iT(i,n);var r=lT(i);function i(){return rT(this,i),r.apply(this,arguments)}return i})(Zm);return Object.assign(e.prototype,t),e}function Zm(t){Fe(this,{$handle:t,vm:t.vm,options:{},ref:"fcForm",mergeOptionsRule:{normal:["form","row","info","submitBtn","resetBtn"]}}),this.updateKey(),this.init()}Fe(Zm.prototype,{__init:function(){var e=this;this.$render=this.$handle.$render,this.$r=function(){var n;return(n=e.$render).renderRule.apply(n,arguments)}},updateKey:function(){this.key=za()},init:function(){},update:function(){},beforeRender:function(){},form:function(){return this.vm.refs[this.ref]},adapterValidate:function(e,n){return e.validator=function(r,i,o){return n(i,o)},e},getSlot:function(e){var n=function r(i){if(i){var o=i.slots[e];return o||r(i.setupState.parent)}};return n(this.vm)},mergeOptions:function(e,n){var r=this;return lr(e.map(function(i){return r.tidyOptions(i)}),n,this.mergeOptionsRule)},updateOptions:function(e){this.$handle.fc.targetFormDriver("updateOptions",e,{handle:this.$handle,api:this.$handle.api}),this.options=this.mergeOptions([e],this.getDefaultOptions()),this.update()},tidyOptions:function(e){return e},tidyRule:function(e){},mergeProp:function(e){},getDefaultOptions:function(){return{}},fieldChange:function(e,n,r,i){},render:function(e){}});var Yx=function(e){var n={name:"loadData",_fn:[],loaded:function(i,o,a){var s=this;this.deleted(i),Xe(function(){var l=Ht(i.getValue()),u=[];l.forEach(function(c){if(c&&(c.attr||c.template)){var d=function(h){var v;o&&o.__fc__&&(v=o.__fc__.getParentGroup());var C;c.template?C=e.$handle.loadStrVar(c.template,h,v?{rule:o,value:e.$handle.subRuleData[v.id]||{}}:null):c.handler&&pe.Function(c.handler)?C=c.handler(h,o,a):C=e.$handle.loadStrVar("{{".concat(c.attr,"}}"),h,v?{rule:o,value:e.$handle.subRuleData[v.id]||{}}:null),(C==null||C==="")&&c.default!=null&&(C=c.default),c.copy!==!1&&(C=Fn(C));var S=c.modify?o:i.getProp();c.to==="child"?S.children?S.children[0]=C:S.children=[C]:vr(S,c.to||"options",C),a.sync(o)},f=function(h){return d(h)},m=e.watchLoadData(f);d=dr(d,c.wait||300),c.watch!==!1?u.push(m):m()}}),s._fn[i.id]=u})},deleted:function(i){this._fn[i.id]&&(this._fn[i.id].forEach(function(o){o()}),delete this._fn[i.id]),i.clearProp()}};return n.watch=n.loaded,n},Gx=function(e){var n={name:"t",_fn:[],loaded:function(i,o,a){this.deleted(i);var s=i.getValue()||{},l=[];Object.keys(s).forEach(function(u){var c=s[u];if(c){var d=Je(c)==="object",f=function(v){var C=e.t(d?c.attr:c,d?c.params:null,v),S=d&&c.modify?o:i.getProp();u==="child"?S.children?S.children[0]=C:S.children=[C]:vr(S,u,C),a.sync(o)},m=function(v){return f(v)},p=e.watchLoadData(m);f=dr(f,c.wait||300),c.watch!==!1?l.push(p):p()}}),this._fn[i.id]=l},deleted:function(i){this._fn[i.id]&&(this._fn[i.id].forEach(function(o){o()}),delete this._fn[i.id]),i.clearProp()}};return n.watch=n.loaded,n},Il={name:"componentValidate",load:function(e,n,r){var i=e.getValue();if(!i||i.method===!1)e.clearProp(),r.clearValidateState([n.field]);else{pe.Object(i)||(i={method:i});var o=i.method,a=Te(Te({},i),{},{validator:function(){var l=Kn(n);if(l){for(var u=arguments.length,c=new Array(u),d=0;d<u;d++)c[d]=arguments[d];return r.exec.apply(r,[l.id,pe.String(o)?o:"formCreateValidate"].concat(c,[{attr:e,rule:n,api:r}]))}}});delete a.method,e.getProp().validate=[a]}},watch:function(){Il.load.apply(Il,arguments)}},Qx=function(e){function n(o){return pe.String(o)&&(o={action:o,to:"options"}),o}function r(o,a,s){var l=o.value;i.deleted(o),pe.Function(l)&&(l=l(a,s)),l=n(l);var u=function(m){m===void 0?o.clearProp():vr(o.getProp(),l.to||"options",m),m!=null&&l&&l.key&&e.$handle.options.globalData[l.key]&&e.fetchCache.set(e.$handle.options.globalData[l.key],{status:!0,data:m}),s.sync(a)};if(!l||!l.action&&!l.key){u(void 0);return}l=Fn(l),l.to||(l.to="options");var c=l.onError,d=function(){if(!o.getValue())return o.clearProp(),s.sync(a),!0};i._fn[o.id]=e.watchLoadData(dr(function(f,m){if(m&&l.watch===!1)return i._fn[o.id]();if(l.key){e.targetRule=a;var p=f("$globalData."+l.key);if(delete e.targetRule,p){if(d())return;u(p)}return}var h=e.$handle.loadFetchVar(Fn(l),f,a),v=Te(Te({headers:{}},h),{},{onSuccess:function(S,w){if(!d()){var y=function(A){return w?A:dt(A,"data")?A.data:A},E=Ln(h.parse);pe.Function(E)?y=E:E&&pe.String(E)&&(y=function(A){return Mt(A,E)}),fa(y(S,a,s)).then(function(T){u(T)})}},onError:function(S){u(void 0),!d()&&(c||function(w){return Dc(w.message||"fetch fail "+h.action)})(S,a,s)}});e.$handle.beforeFetch(v,{rule:a,api:s}).then(function(){if(pe.Function(h.action)){fa(h.action(a,s)).then(function(C){v.onSuccess(C,!0)}).catch(function(C){v.onError(C)});return}Be(function(){return e.create.fetch(v,{inject:o,rule:a,api:s})})}).catch(function(C){})},l.wait||600))}var i={name:"fetch",_fn:[],loaded:function(){r.apply(void 0,arguments)},watch:function(){r.apply(void 0,arguments)},deleted:function(a){this._fn[a.id]&&(this._fn[a.id](),delete this._fn[a.id]),a.clearProp()}};return i},Xx={fetch:Qx,loadData:Yx,t:Gx,componentValidate:Il},Jx="html",Zx={name:Jx,loadChildren:!1,render:function(e,n){return n.prop.props.innerHTML=e.default(),n.vNode.make(n.prop.props.tag||"div",n.prop)},renderChildren:function(e){return{default:function(){return e.filter(function(r){return pe.String(r)}).join("")}}}};function eO(t){t=t+"=";for(var e=decodeURIComponent(document.cookie),n=e.split(";"),r=0;r<n.length;r++){for(var i=n[r];i.charAt(0)===" ";)i=i.substring(1);if(i.indexOf(t)===0){i=i.substring(t.length,i.length);try{return JSON.parse(i)}catch{return i}}}return null}function tO(t){var e=localStorage.getItem(t);if(e)try{return JSON.parse(e)}catch{return e}return null}function nO(t){var e=sessionStorage.getItem(t);if(e)try{return JSON.parse(e)}catch{return e}return null}function Vc(t,e){if(!e)return null;var n=e.split("."),r=t(n.shift());return n.length?r==null?null:Mt(r,n):r}function rO(t){return Vc(eO,t)}function iO(t){return Vc(tO,t)}function oO(t){return Vc(nO,t)}var aO={en:{required:"{title} is required",validate:{url:"{title} is not a valid url",email:"{title} is not a valid email",ip:"{title} {title} is not a valid ip",phone:"{title} {title} is not a valid phone",pattern:"{title} does not match pattern {pattern}",uppercase:"{title} must be all uppercase",lowercase:"{title} must be all lowercased",positive:"{title} is not a positive number",negative:"{title} is not a negative number",equal:"{title} is not equal to {equal}",min:"{title} cannot be less than {min}",max:"{title} cannot be greater than {max}",enum:"{title} must be one of {enum}",hasKeys:"{title} does not contain required fields {hasKeys}",minLen:"{title} must be at least {minLen}",maxLen:"{title} cannot be longer than {maxLen}",len:"{title} must be exactly {len}",integer:"{title} is not an integer",number:"{title} is not an number"}},"zh-cn":{required:"{title}不能为空",validate:{url:"{title}不是有效的 url 地址",email:"{title}不是有效的邮箱地址",ip:"{title}不是有效的 IP 地址",phone:"{title}不是正确的手机号",pattern:"{title}必须匹配 {pattern}",uppercase:"{title}必须全大写",lowercase:"{title}必须全小写",positive:"{title}不是正数",negative:"{title}不是负数",equal:"{title}必须等于 {equal}",min:"{title}必须大于等于 {min}",max:"{title}必须小于等于 {max}",enum:"{title}必须是 {enum} 之一",hasKeys:"{title}必须包含 {hasKeys} 字段",minLen:"{title}长度必须大于 {minLen}",maxLen:"{title}长度必须小于 {maxLen}",len:"{title}长度必须为 {len}",integer:"{title}必须为整数",number:"{title}必须为数字"}}};function sO(t,e){var n;return arguments.length===2?(n=arguments[1],e=n[t]):n=arguments[2],{id:e,prop:n}}function Ss(){return sO.apply(void 0,["name"].concat(Array.prototype.slice.call(arguments)))}function lO(t){var e=t.key||[],n=t.array||[],r=t.normal||[];Pl.push.apply(Pl,We(e)),pa.push.apply(pa,We(n)),ha.push.apply(ha,We(r)),Qm([].concat(We(e),We(n),We(r)))}var cO=1,ln={},df=Symbol("defValue");function ev(t){var e=mt({},ws.name,ws),n={},r={},i={},o={},a=[],s=[],l=[t.extendApi],u=Te({},Xx),c=Sx(),d={global:{}},f=t.isMobile===!0,m=Lt({$mobile:f}),p=Wx(),h={},v={};lO(t.attrs||{});function C(L){var $=ln[L];if(Array.isArray($))return $.map(function(U){return U.api()});if($)return $.api()}function S(L){a.push(L)}function w(){var L=Ss.apply(void 0,arguments);L.id&&L.prop&&(r[L.id]=L.prop)}function y(){var L=Ss.apply(void 0,arguments);L.id&&L.prop&&(u[L.id]=pe.Function(L.prop)?L.prop:Te(Te({},L.prop),{},{name:L.id}))}function E(L){p.use(L)}function T(L){if(arguments.length===0)return Oi;if(typeof L=="string"&&arguments.length===1)return n[qt(L)];var $=Ss.apply(void 0,arguments);if(!$.id||!$.prop)return Oi;var U=qt($.id),W=$.prop,V=W.merge===!0?n[U]:void 0;n[U]=Co(W,V||Oi),c[U]=It(U),W.maker&&Fe(c,W.maker)}function A(L,$){var U;if(pe.String(L)){if(U=L,$===void 0)return e[U]}else U=L.displayName||L.name,$=L;if(!(!U||!$)){var W=qt(U);e[U]=$,e[W]=$,delete p.aliasMap[U],delete p.aliasMap[W],delete n[U],delete n[W],$.formCreateParser&&T(U,$.formCreateParser)}}function O(){return yx(oe,e,r)}function q(L,$){var U=O();return gc({data:function(){return Lt({rule:L,option:$})},render:function(){return Ri(U,Te({ref:"fc"},this.$data))}})}function I(){return ws}function P(L,$){return pe.Function(L.install)?L.install(z,$):pe.Function(L)&&L(z,$),this}function z(L,$){var U=q(L,$||{});a.forEach(function(H){Be(function(){return H(z,U)})});var W=document.createElement("div");($?.el||document.body).appendChild(W);var V=U.mount(W);return V.$refs.fc.fapi}Co(z,v);function F(L){var $=Te({},t);return L?$.inherit={components:e,parsers:n,directives:r,modelFields:i,providers:u,useApps:a,maker:c,formulas:h,loadData:m}:delete $.inherit,ev($)}function Y(L,$){i[L]=$}function le(L,$){h[L]=$}function de(L,$){var U=o[L]||{},W=U.parsers||{};$.parsers&&Object.keys($.parsers).forEach(function(V){W[V]=Co($.parsers[V],Oi)}),$.name=L,o[L]=Te(Te(Te({},U),$),{},{parsers:W})}function Q(L){L&&Object.keys(ln).forEach(function($){var U=Array.isArray(ln[$])?ln[$]:[ln[$]];U.forEach(function(W){W.bus.$emit("$loadData."+L)})})}function M(L,$){vr(m,L,$),Q(L)}function k(L,$){var U=function(){for(var V=arguments.length,H=new Array(V),ie=0;ie<V;ie++)H[ie]=arguments[ie];return Be(function(){return $.apply(void 0,H)})};U._driver=!0,M(L,U)}function X(L,$){var U=(L||"").split(".");L=U.shift();var W=U.join(".");if(dt(m,L)||(m[L]=df),m[L]!==df){var V=m[L];return V&&V._driver?V=V(W):U.length&&(V=Mt(V,U)),V==null||V===""?$:V}else return $}function N(L){l.push(L)}function re(L){delete m[L],Q(L)}function ve(L,$){s.push({name:L,callback:$})}function oe(L){var $=this;Fe(this,{id:cO++,create:z,vm:L,manager:Kx(t.manager),parsers:n,providers:u,modelFields:i,formulas:h,isMobile:f,rules:L.props.rule,name:L.props.name||za(),inFor:L.props.inFor,prop:{components:e,directives:r},get:null,drivers:o,renderDriver:null,refreshData:Q,loadData:m,CreateNode:p,bus:new Om,unwatch:[],options:K({}),extendApiFn:l,fetchCache:new WeakMap,tmpData:Lt({})}),s.forEach(function(U){$.bus.$on(U.name,U.callback)}),Xe(function(){Ae($.options,function(){$.$handle.$manager.updateOptions($.options.value),$.api().refresh()},{deep:!0})}),Fe(L.appContext.components,e),Fe(L.appContext.directives,r),this.$handle=new Nn(this),this.name&&(this.inFor?(ln[this.name]||(ln[this.name]=[]),ln[this.name].push(this)):ln[this.name]=this)}oe.isMobile=f,Fe(oe.prototype,{init:function(){var $=this;this.isSub()&&this.unwatch.push(Ae(function(){return $.vm.setupState.parent.setupState.fc.options.value},function(){$.initOptions(),$.$handle.api.refresh()},{deep:!0,flush:"sync"})),this.vm.props.driver&&(this.renderDriver=Je(this.vm.props.driver)==="object"?this.vm.props.driver:this.drivers[this.vm.props.driver]),!this.renderDriver&&this.vm.setupState.parent&&(this.renderDriver=this.vm.setupState.parent.setupState.fc.renderDriver),this.renderDriver||(this.renderDriver=this.drivers.default),this.initOptions(),this.$handle.init()},targetFormDriver:function($){for(var U,W=this,V=arguments.length,H=new Array(V>1?V-1:0),ie=1;ie<V;ie++)H[ie-1]=arguments[ie];if((U=this.bus).$emit.apply(U,[$].concat(H)),this.renderDriver&&this.renderDriver[$])return Be(function(){var fe;return(fe=W.renderDriver)[$].apply(fe,H)})},t:function($,U,W){var V=W?W("$t."+$):this.globalLanguageDriver($);return V==null&&(V=""),V&&U&&Object.keys(U).forEach(function(H){var ie=new RegExp("{".concat(H,"}"),"g");V=V.replace(ie,U[H])}),V},globalDataDriver:function($){var U=this,W=$.split("."),V=W.shift(),H=this.options.value.globalData&&this.options.value.globalData[V];if(H){if(H.type==="static")return Mt(H.data,W);var ie,fe=this.fetchCache.get(H);if(fe){if(fe.status&&(ie=Mt(fe.data,W)),!fe.loading)return ie;fe.loading=!1,this.fetchCache.set(H,fe)}else this.fetchCache.set(H,{status:!1});var Oe=dr(function(){Re();var Ve=U.fetchCache.get(H);U.options.value.globalData&&Object.values(U.options.value.globalData).indexOf(H)!==-1?(Ve&&(Ve.loading=!0,U.fetchCache.set(H,Ve)),U.bus.$emit("$loadData.$globalData."+V)):U.fetchCache.delete(H)},H.wait||600),Ce=function(ct){U.fetchCache.set(H,{status:!0,data:ct}),U.bus.$emit("$loadData.$globalData."+V)},Ne=function(ct,Ze){if(Ze&&H.watch===!1)return Re();if(Ze){Oe();return}var et=U.$handle.loadFetchVar(Al(H),ct);et.targetRule=U.targetRule,U.$handle.api.fetch(et).then(function(He){Ce(He)}).catch(function(He){Ce(null)})},Re=this.watchLoadData(Ne);return H.watch===!1&&Re(),this.unwatch.push(Re),ie}},getLocale:function(){var $=this.vm.setupState.top.props.locale;return $&&Je($)==="object"?$.name:typeof $=="string"?$:"zh-cn"},globalLanguageDriver:function($){var U=this.vm.setupState.top.props.t,W=this.vm.setupState.top.props.locale,V=void 0;if(U&&(V=Be(function(){return U($)})),V==null&&W&&Je(W)==="object"&&(V=Mt(W,$)),V==null){var H=this.options.value.language||{},ie=this.getLocale();V=Mt(H[ie]||{},$),V==null&&(V=Mt(aO[ie]||{},$))}return V},globalVarDriver:function($){var U=this,W=$.split("."),V=W.shift(),H=this.options.value.globalVariable&&this.options.value.globalVariable[V];if(H){var ie=pe.Function(H)?H:Ln(H.handle);if(ie){var fe=ie(function(){var Oe;return(Oe=U.$handle.api).getData.apply(Oe,arguments)},this.$handle.api);return Mt(fe,W)}}},setData:function($,U,W){W?M($,U):(vr(this.vm.setupState.top.setupState.fc.tmpData,$,U),this.bus.$emit("$loadData."+$))},getLoadData:function($,U){var W=null;if($!=null){var V=$.split("."),H=V.shift();if(W=Mt(this.vm.setupState.top.setupState.fc.tmpData,$),W!=null)return W;if(H==="$topForm")W=this.$handle.api.top.formData(!0);else if(H==="$scopeForm")W=this.$handle.api.scope.formData(!0);else if(H==="$form")W=this.$handle.api.formData(!0);else if(H==="$options")W=this.options.value;else if(H==="$globalData")W=this.globalDataDriver(V.join(".")),V=[];else if(H==="$var")W=this.globalVarDriver(V.join(".")),V=[];else if(H==="$locale")W=this.getLocale(),V=[];else if(H==="$t")W=this.globalLanguageDriver(V.join(".")),V=[];else{if(H==="$preview")return this.$handle.preview;W=X($),V=[]}W&&V.length&&(W=Mt(W,V))}return W==null||W===""?U:W},watchLoadData:function($,U){var W=this,V={},H=function(Ce){W.get||(W.get=ie),Be(function(){$(ie,Ce)}),W.get===ie&&(W.get=void 0)},ie=function(Ce,Ne){var Re;if(Je(Ce)==="object"&&(Re=Ce.getValue,Ce=Ce.id),V[Ce])return V[Ce].val;var Ve=te(function(){return Re?Re():W.getLoadData(Ce,Ne)}),ct=Ce.split("."),Ze=ct.shift(),et=ct.shift()||"",He=dr(function(){var ot=Re?Re():W.getLoadData(Ce,Ne);if(V[Ce])((ot instanceof Function||pe.Object(ot)||Array.isArray(ot))&&ot===V[Ce].val||JSON.stringify(ot)!==JSON.stringify(V[Ce].val))&&(V[Ce].val=ot,H(!0));else return},U||0),pt=Ae(Ve,function(ot){He()});return W.bus.$on("$loadData."+Ze,He),et&&W.bus.$on("$loadData."+Ze+"."+et,He),V[Ce]={fn:function(){W.bus.$off("$loadData."+Ze,He),et&&W.bus.$off("$loadData."+Ze+"."+et,He),pt()},val:Ve.value},Ve.value};H(!1);var fe=function(){Object.keys(V).forEach(function(Ce){return V[Ce].fn()}),V={}};return this.unwatch.push(fe),fe},isSub:function(){return this.vm.setupState.parent&&this.vm.props.extendOption},initOptions:function(){this.options.value={};var $=Te({formData:{},submitBtn:{},resetBtn:{},globalEvent:{},globalData:{}},Fn(d)),U=this.isSub();U&&($=this.mergeOptions($,this.vm.setupState.parent.setupState.fc.options.value||{},!0)),$=this.mergeOptions($,this.vm.props.option);var W=this.api();this.targetFormDriver("initOptions",$,{api:W,isSubForm:U}),this.updateOptions($)},mergeOptions:function($,U,W){return U=Te({},U||{}),W&&["page","onSubmit","onReset","onCreated","onChange","onMounted","mounted","beforeUnmount","beforeSubmit","onBeforeUnmount","onReload","reload","formData","el","globalClass","style"].forEach(function(V){delete U[V]}),U.global&&($.global=gx($.global,U.global),delete U.global),this.$handle.$manager.mergeOptions([U],$),$},updateOptions:function($){this.options.value=this.mergeOptions(this.options.value,$),this.$handle.$manager.updateOptions(this.options.value),this.bus.$emit("$loadData.$options")},api:function(){return this.$handle.api},render:function(){return this.$handle.render()},mounted:function(){this.$handle.mounted()},unmount:function(){var $=this;if(Be(function(){return $.$handle.lifecycle("beforeUnmount")}),this.name)if(this.inFor){var U=ln[this.name].indexOf(this);ln[this.name].splice(U,1)}else delete ln[this.name];s.forEach(function(W){$.bus.$off(W.name,W.callback)}),this.tmpData={},this.unwatch.forEach(function(W){return W()}),this.unwatch=[],this.$handle.reloadRule([])},updated:function(){var $=this;this.$handle.bindNextTick(function(){return $.bus.$emit("next-tick",$.$handle.api)})}});function ge(L){Fe(L,{version:t.version,ui:t.ui,isMobile:f,extendApi:N,getData:X,setDataDriver:k,setData:M,removeData:re,refreshData:Q,maker:c,component:A,directive:w,setModelField:Y,setFormula:le,setDriver:de,register:y,$vnode:I,parser:T,use:P,factory:F,componentAlias:E,copyRule:qm,copyRules:Wm,mergeRule:er,fetch:Xm,$form:O,parseFn:Ln,parseJson:jm,toJson:ji,useApp:S,getApi:C,on:ve})}function _e(L){Fe(L,{create:z,install:function(U,W){d=Te(Te({},d),W||{});var V="_installedFormCreate".concat(f?"Mobile":"","_").concat(t.ui);if(U[V]!==!0){U[V]=!0;var H=function(Oe){var Ce=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return z(Oe,Ce)};ge(H),U.config.globalProperties.$formCreate=H;var ie=O();U.component(ie.name,ie),a.forEach(function(fe){Be(function(){return fe(L,U)})})}}})}if(ge(v),_e(v),k("$cookie",rO),k("$localStorage",iO),k("$sessionStorage",oO),p.use({fragment:"fcFragment"}),t.install&&z.use(t),S(function(L,$){$.mixin({props:["formCreateInject"]})}),T(Zx),t.inherit){var R=t.inherit;R.components&&Fe(e,R.components),R.parsers&&Fe(n,R.parsers),R.directives&&Fe(r,R.directives),R.modelFields&&Fe(i,R.modelFields),R.providers&&Fe(u,R.providers),R.useApps&&Fe(a,R.useApps),R.maker&&Fe(c,R.maker),R.loadData&&Fe(m,R.loadData),R.formulas&&Fe(h,R.formulas)}var me=O();return Co(me,v),Object.defineProperties(me,{fetch:{get:function(){return v.fetch},set:function($){v.fetch=$}}}),me.util=v,me}var ff={date:"YYYY-MM-DD",month:"YYYY-MM",week:"YYYY-wo",datetime:"YYYY-MM-DD HH:mm:ss",timerange:"HH:mm:ss",daterange:"YYYY-MM-DD",monthrange:"YYYY-MM",datetimerange:"YYYY-MM-DD HH:mm:ss",year:"YYYY"},pf="datePicker",uO={name:pf,maker:(function(){return["year","month","date","dates","week","datetime","datetimeRange","dateRange","monthRange"].reduce(function(t,e){return t[e]=It(pf,{type:e.toLowerCase()}),t},{})})(),mergeProp:function(e){var n=e.prop.props;n.valueFormat||(n.valueFormat=ff[n.type]||ff.date)}},Cs="hidden",dO={name:Cs,maker:mt({},Cs,function(t,e){return It(Cs)("",t,e)}),render:function(){return[]}},Es="input",fO={name:Es,maker:(function(){var t=["password","url","email","text","textarea"].reduce(function(e,n){return e[n]=It(Es,{type:n}),e},{});return t.idate=It(Es,{type:"date"}),t})(),mergeProp:function(e){var n=e.prop.props;n&&n.autosize&&n.autosize.minRows&&(n.rows=n.autosize.minRows||2)}},pO="textarea",hO={name:pO,mergeProp:function(e){var n=e.prop.props;n.type="textarea",n&&n.autosize&&n.autosize.minRows&&(n.rows=n.autosize.minRows||2)}},hf="slider",mO={name:hf,maker:{sliderRange:It(hf,{range:!0})},toFormValue:function(e,n){var r=Array.isArray(e),i=n.prop.props,o=i.min||0,a;return i.range===!0?a=r?e:[o,parseFloat(e)||o]:a=r?parseFloat(e[0])||o:parseFloat(e),a}},Ts="timePicker",vO={name:Ts,maker:{time:It(Ts,function(t){return t.props.isRange=!1}),timeRange:It(Ts,function(t){return t.props.isRange=!0})},mergeProp:function(e){var n=e.prop.props;n.valueFormat||(n.valueFormat="HH:mm:ss")}},gO={name:"FcRow",render:function(e,n){return n.vNode.col({props:{span:24}},{default:function(){return[n.vNode.row(n.prop,e)]}})}},_O="select",yO={name:_O,toFormValue:function(e,n){return n.prop.props.multiple&&!Array.isArray(e)?Ht(e):e}},bO=[uO,dO,fO,hO,mO,vO,gO,yO],ht="el",wO={button:ht+"-button",icon:ht+"-icon",slider:ht+"-slider",rate:ht+"-rate",upload:"fc-upload",cascader:ht+"-cascader",popover:ht+"-popover",tooltip:ht+"-tooltip",colorPicker:ht+"-colorPicker",timePicker:ht+"-time-picker",timeSelect:ht+"-time-select",datePicker:ht+"-date-picker",switch:ht+"-switch",select:"fc-select",checkbox:"fc-checkbox",radio:"fc-radio",inputNumber:ht+"-input-number",number:ht+"-input-number",input:ht+"-input",textarea:ht+"-input",formItem:ht+"-form-item",form:ht+"-form",frame:"fc-frame",col:ht+"-col",row:ht+"-row",tree:"fc-tree",autoComplete:ht+"-autocomplete",auto:ht+"-autocomplete",group:"fc-group",array:"fc-group",object:"fc-sub-form",subForm:"fc-sub-form"};function SO(){return{form:{inline:!1,labelPosition:"right",labelWidth:"125px",disabled:!1,size:void 0},row:{show:!0,gutter:0},submitBtn:{type:"primary",loading:!1,disabled:!1,innerText:"",show:!0,col:void 0,click:void 0},resetBtn:{type:"default",loading:!1,disabled:!1,innerText:"",show:!1,col:void 0,click:void 0}}}function CO(t){return t.type==="tooltip"}function mf(t,e){if(dt(t,e)&&pe.String(t[e])){var n;t[e]=(n={},mt(n,e,t[e]),mt(n,"show",!0),n)}}function Bn(t){return t===!1}function EO(t,e){dt(t,e)&&!pe.Object(t[e])&&(t[e]={show:!!t[e]})}function xs(t){var e=Te({},t);return delete e.children,e}var TO={validate:function(){var e=this.form();return e?e.validate():new Promise(function(n){return n()})},validateField:function(e){var n=this;return new Promise(function(r,i){var o=n.form();o?o.validateField(e,function(a,s){s?i(s):r(a)}):r()})},clearValidateState:function(e){var n=this.vm.refs[e.wrapRef];n&&n.clearValidate()},fieldChange:function(e,n,r,i){if(!i){var o,a;(o=this.vm.refs[e.wrapRef])===null||o===void 0||(a=o.validate("change"))===null||a===void 0||a.catch(function(){})}},tidyOptions:function(e){return["submitBtn","resetBtn","row","info","wrap","col","title"].forEach(function(n){EO(e,n)}),e},tidyRule:function(e){var n=e.prop;return mf(n,"title"),mf(n,"info"),n},mergeProp:function(e){var n=this,r={info:{trigger:"hover",placement:"top-start",icon:!0},title:{},col:{span:24},wrap:{}};["info","wrap","col","title"].forEach(function(i){e.prop[i]=lr([n.options[i]||{},e.prop[i]||{}],r[i])})},getDefaultOptions:function(){return SO()},update:function(){var e=this.options.form;this.rule={props:Te({},e),on:{submit:function(r){r.preventDefault()}},style:e.style,type:"form"}},beforeRender:function(){var e=this.key,n=this.ref,r=this.$handle,i=this.options.form;Fe(this.rule,{key:e,ref:n,class:[i.className,i.class,"form-create",this.$handle.preview?"is-preview":""]}),Fe(this.rule.props,{model:r.formData})},render:function(e){var n=this;return e.slotLen()&&!this.$handle.preview&&e.setSlot(void 0,function(){return n.makeFormBtn()}),this.$r(this.rule,Bn(this.options.row.show)?e.getSlots():[this.makeRow(e)])},makeWrap:function(e,n){var r=this,i=e.prop,o="".concat(this.key).concat(e.key),a=i.col,s=this.isTitle(i)&&i.wrap.title!==!1,l=!a.labelWidth&&!s?0:a.labelWidth,u=this.rule.props,c=u.inline,d=u.col,f=i.wrap.class;delete i.wrap.class,delete i.wrap.title;var m=(pe.Undef(i.wrap.show)?!e.input:Bn(i.wrap.show))?n:this.$r(lr([i.wrap,{props:Te(Te({labelWidth:l===void 0?l:Fm(l),label:s?i.title.title:void 0},xs(i.wrap||{})),{},{prop:e.id,rules:e.injectValidate()}),class:this.$render.mergeClass(f||i.className,"fc-form-item"),key:"".concat(o,"fi"),ref:e.wrapRef,type:"formItem"}]),Te({default:function(){return n}},s?{label:function(){return r.makeInfo(i,o,e)}}:{}));return c===!0||Bn(d)||Bn(a.show)?m:this.makeCol(i,o,[m])},isTitle:function(e){if(this.options.form.title===!1)return!1;var n=e.title;return!(!n.title&&!n.native||Bn(n.show))},makeInfo:function(e,n,r){var i,o,a,s,l=this,u=Te({},e.title),c=Te({},e.info),d=CO(c),f=this.options.form,m=this.getSlot("title"),p=[m?m({title:(i=r.refRule)===null||i===void 0||(o=i.__$title)===null||o===void 0?void 0:o.value,rule:r.rule,options:this.options}):((a=r.refRule)===null||a===void 0||(s=a.__$title)===null||s===void 0?void 0:s.value)+(f.labelSuffix||f["label-suffix"]||"")];if(!Bn(c.show)&&(c.info||c.native)&&!Bn(c.icon)){var h={type:c.type||"popover",props:xs(c),key:"".concat(n,"pop")};delete h.props.icon,delete h.props.show,delete h.props.info,delete h.props.align,delete h.props.native;var v="content";if(c.info&&!dt(h.props,v)){var C,S;h.props[v]=(C=r.refRule)===null||C===void 0||(S=C.__$info)===null||S===void 0?void 0:S.value}p[c.align!=="left"?"unshift":"push"](this.$r(lr([c,h]),mt({},u.slot||(d?"default":"reference"),function(){return l.$r({type:"ElIcon",style:"top:2px",key:"".concat(n,"i")},{default:function(){return l.$r({type:c.icon===!0?"icon-warning":c.icon})}},!0)})))}var w=lr([u,{props:xs(u),key:"".concat(n,"tit"),class:"fc-form-title",type:u.type||"span",on:{click:function(){for(var E=arguments.length,T=new Array(E),A=0;A<E;A++)T[A]=arguments[A];l.$handle.targetHook(r,"titleClick",{args:T})}}}]);return delete w.props.show,delete w.props.title,delete w.props.native,this.$r(w,p)},makeCol:function(e,n,r){var i=Te({},e.col);return delete i.show,this.$r({class:this.$render.mergeClass(i.class,"fc-form-col"),type:"col",props:i||{span:24},key:"".concat(n,"col")},r)},makeRow:function(e){var n=this.options.row||{};return this.$r({type:"row",props:n,class:this.$render.mergeClass(n.class,"fc-form-row"),key:"".concat(this.key,"row")},e)},makeFormBtn:function(){var e=[];if(Bn(this.options.submitBtn.show)||e.push(this.makeSubmitBtn()),Bn(this.options.resetBtn.show)||e.push(this.makeResetBtn()),!!e.length){var n=this.$r({type:"formItem",class:"fc-form-item",key:"".concat(this.key,"fb")},e);return this.rule.props.inline===!0?n:this.$r({type:"col",class:"fc-form-col fc-form-footer",props:{span:24},key:"".concat(this.key,"fc")},[n])}},makeResetBtn:function(){var e=this,n=Te({},this.options.resetBtn),r=n.innerText||this.$handle.api.t("reset")||"重置";return delete n.innerText,delete n.click,delete n.col,delete n.show,this.$r({type:"button",props:n,class:"fc-reset-btn",style:{width:n.width},on:{click:function(){var o=e.$handle.api;e.options.resetBtn.click?e.options.resetBtn.click(o):o.resetFields()}},key:"".concat(this.key,"b2")},[r])},makeSubmitBtn:function(){var e=this,n=Te({},this.options.submitBtn),r=n.innerText||this.$handle.api.t("submit")||"提交";return delete n.innerText,delete n.click,delete n.col,delete n.show,this.$r({type:"button",props:n,class:"fc-submit-btn",style:{width:n.width},on:{click:function(){var o=e.$handle.api;e.options.submitBtn.click?e.options.submitBtn.click(o):o.submit().catch(function(){})}},key:"".concat(this.key,"b1")},[r])}},Fr={};xO(Fr);OO(Fr);AO(Fr);$O(Fr);RO(Fr);function xO(t){["group","tree","switch","upload","autoComplete","checkbox","cascader","colorPicker","datePicker","frame","inputNumber","radio","rate"].forEach(function(e){t[e]=It(e)}),t.auto=t.autoComplete,t.number=t.inputNumber,t.color=t.colorPicker}function OO(t){var e="select",n="multiple";t.selectMultiple=It(e,mt({},n,!0)),t.selectOne=It(e,mt({},n,!1))}function AO(t){var e="tree",n={treeSelected:"selected",treeChecked:"checked"};Object.keys(n).reduce(function(r,i){return r[i]=It(e,{type:n[i]}),r},t)}function $O(t){var e="upload",n={image:["image",0],file:["file",0],uploadFileOne:["file",1],uploadImageOne:["image",1]};Object.keys(n).reduce(function(r,i){return r[i]=It(e,function(o){return o.props({uploadType:n[i][0],maxLength:n[i][1]})}),r},t),t.uploadImage=t.image,t.uploadFile=t.file}function RO(t){var e={frameInputs:["input",0],frameFiles:["file",0],frameImages:["image",0],frameInputOne:["input",1],frameFileOne:["file",1],frameImageOne:["image",1]};return Object.keys(e).reduce(function(n,r){return n[r]=It("frame",function(i){return i.props({type:e[r][0],maxLength:e[r][1]})}),n},t),t.frameInput=t.frameInputs,t.frameFile=t.frameFiles,t.frameImage=t.frameImages,t}var PO=".form-create .form-create .el-form-item{margin-bottom:22px}.form-create{width:100%}.form-create .fc-none,.form-create.is-preview .el-form-item.is-required>.el-form-item__label-wrap>.el-form-item__label:before,.form-create.is-preview .el-form-item.is-required>.el-form-item__label:before,.form-create.is-preview .fc-clock{display:none!important}.fc-wrap-right>.el-form-item__label{display:flex;justify-content:flex-end}.fc-wrap-left>.el-form-item__label{display:flex;justify-content:flex-start}.fc-wrap-top.el-form-item{display:block}.fc-wrap-top.el-form-item>.el-form-item__label{display:block;float:unset;height:auto;line-height:22px;margin-bottom:8px;text-align:left}.el-form--large .fc-wrap-top.el-form-item>.el-form-item__label{line-height:22px;margin-bottom:12px}.el-form--default .fc-wrap-top.el-form-item>.el-form-item__label{line-height:22px;margin-bottom:8px}.el-form--small .fc-wrap-top.el-form-item>.el-form-item__label{line-height:20px;margin-bottom:4px}.fc-form-footer{margin-top:12px}";Va(PO);function vf(t,e){return pe.Boolean(t)?t={show:t}:!pe.Undef(t)&&!pe.Object(t)&&(t={show:e}),t}function kO(t,e){return{formEl:function(){return e.$manager.form()},wrapEl:function(r){var i=e.getFieldCtx(r);if(i)return e.vm.refs[i.wrapRef]},validate:function(r){return new Promise(function(i,o){var a=t.children,s=[e.$manager.validate()];a.filter(function(l){return!l.isScope}).forEach(function(l){s.push(l.validate())}),Promise.all(s).then(function(){i(!0),r&&r(!0)}).catch(function(l){o(l),r&&r(l),e.vm.emit("validate-fail",l,{api:t}),e.emitEvent("validate-fail",l,{api:t})})})},validateField:function(r,i){return new Promise(function(o,a){var s=e.getFieldCtx(r);if(!s){o(null),i&&i(null);return}var l=e.subForm[s.id],u=[e.$manager.validateField(s.id)];Ht(l).filter(function(c){return!c.isScope}).forEach(function(c){u.push(c.validate())}),Promise.all(u).then(function(){o(null),i&&i(null)}).catch(function(c){a(c),i&&i(c),e.vm.emit("validate-field-fail",c,{field:r,api:t})})})},validateFields:function(r,i){return new Promise(function(o,a){Array.isArray(r)||(r=[r]);var s=r.map(function(l){return t.validateField(l)});Promise.all(s).then(function(){o(null),i&&i(null)}).catch(function(l){a(l),i&&i(l)})})},clearValidateState:function(r){var i=this,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;t.helper.tidyFields(r).forEach(function(a){o&&i.clearSubValidateState(a),e.getCtxs(a).forEach(function(s){e.$manager.clearValidateState(s)})})},clearSubValidateState:function(r){t.helper.tidyFields(r).forEach(function(i){e.getCtxs(i).forEach(function(o){var a=e.subForm[o.id];a&&(Array.isArray(a)?a.forEach(function(s){s.clearValidateState()}):a&&a.clearValidateState())})})},btn:{loading:function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;t.submitBtnProps({loading:!!r})},disabled:function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;t.submitBtnProps({disabled:!!r})},show:function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;t.submitBtnProps({show:!!r})}},resetBtn:{loading:function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;t.resetBtnProps({loading:!!r})},disabled:function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;t.resetBtnProps({disabled:!!r})},show:function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;t.resetBtnProps({show:!!r})}},submitBtnProps:function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=vf(e.options.submitBtn,!0);Fe(i,r),e.options.submitBtn=i,t.refreshOptions()},resetBtnProps:function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=vf(e.options.resetBtn,!1);Fe(i,r),e.options.resetBtn=i,t.refreshOptions()},submit:function(r,i){return new Promise(function(o,a){var s=e.options.validateOnSubmit===!1?Promise.resolve():t.validate();s.then(function(){var l=t.formData();e.beforeSubmit(l).then(function(){pe.Function(r)&&Be(function(){return r(l,t)}),pe.Function(e.options.onSubmit)&&Be(function(){return e.options.onSubmit(l,t)}),e.vm.emit("submit",l,t),o(l)}).catch(function(u){})}).catch(function(){for(var l=arguments.length,u=new Array(l),c=0;c<l;c++)u[c]=arguments[c];pe.Function(i)&&Be(function(){return i.apply(void 0,[t].concat(u))}),a.apply(void 0,u)})})}}}var Ml={name:"required",load:function(e,n,r){var i=IO(e.getValue()),o=void 0;if(i.required===!1)e.clearProp(),r.clearValidateState([n.field]);else{var a=Te({required:!0,validator:function(u,c,d){s(),pe.empty(c)?d(a.message):d()}},i),s=function(){var u,c=(u=n.__fc__.refRule.__$title)===null||u===void 0?void 0:u.value;if(o!==c)if(o=c,!i.message)a.message=r.t("required",{title:c})||c+(r.getLocale()==="en"?" is required":"不能为空");else{var d=i.message.match(/^\{\{\s*\$t\.(.+)\s*\}\}$/);d&&(a.message=r.t(d[1],{title:c}))}};s(),e.getProp().validate=[a]}r.sync(n)},watch:function(){Ml.load.apply(Ml,arguments)}};function IO(t){return pe.Boolean(t)?{required:t}:pe.String(t)?{message:t}:pe.Undef(t)?{required:!1}:pe.Function(t)?{validator:t}:pe.Object(t)?t:{}}function MO(t){t.componentAlias(wO),mx.forEach(function(e){t.component(e.name,e)}),t.register(Ml),bO.forEach(function(e){t.parser(e)}),Object.keys(Fr).forEach(function(e){t.maker[e]=Fr[e]}),typeof window<"u"&&window.ElementPlus&&t.useApp(function(e,n){n.use(window.ElementPlus)})}function FO(){return ev({ui:"element-ui",version:"3.2.42",manager:TO,extendApi:kO,install:MO,attrs:{normal:["col","wrap"],array:["className"],key:["title","info"]}})}var Na=FO();typeof window<"u"&&(window.formCreate=Na);Na.maker;function DO(t){t.useApp((e,n)=>{n.component(dl.name)||n.use(dl),n.component(Xr.name)||n.use(Xr),n.component(qu.name)||n.use(qu),n.component(Wu.name)||n.use(Wu),n.component(Ku.name)||n.use(Ku),n.component(pl.name)||n.use(pl),n.component(Yu.name)||n.use(Yu),n.component(fl.name)||n.use(fl),n.component(Gu.name)||n.use(Gu),n.component(Qu.name)||n.use(Qu),n.component(Xu.name)||n.use(Xu),n.component(Ju.name)||n.use(Ju),n.component(Zu.name)||n.use(Zu),n.component(ed.name)||n.use(ed),n.component(td.name)||n.use(td),n.component(nd.name)||n.use(nd),n.component(rd.name)||n.use(rd),n.component(id.name)||n.use(id),n.component(od.name)||n.use(od),n.component(ad.name)||n.use(ad),n.component(sd.name)||n.use(sd),n.component(ld.name)||n.use(ld),n.component(cd.name)||n.use(cd),n.component(ud.name)||n.use(ud),n.component(dd.name)||n.use(dd),n.component(ki.name)||n.use(ki),n.component(fd.name)||n.use(fd),n.component(pd.name)||n.use(pd)})}Na.use(DO);function LO(t){t.use(Na)}async function jO(){}function VO(t){t.use(e1,{paginationStorage:{get:()=>a0(),set:e=>s0(e)}})}function zO(t){t.directive("loading",eh)}function NO(t){return{all:t=t||new Map,on:function(e,n){var r=t.get(e);r?r.push(n):t.set(e,[n])},off:function(e,n){var r=t.get(e);r&&(n?r.splice(r.indexOf(n)>>>0,1):t.set(e,[]))},emit:function(e,n){var r=t.get(e);r&&r.slice().map(function(i){i(n)}),(r=t.get("*"))&&r.slice().map(function(i){i(e,n)})}}}function $e(t){let e=Qi();if(typeof window<"u"){let n=t.subscribe(r=>{e.value=r});N_()&&U_(n)}else e.value=t.get();return e}let gn=[],nr=0;const Eo=4,Xo=globalThis.nanostoresGlobal||={epoch:0},At=t=>{let e=[],n={get(){return n.lc||n.listen(()=>{})(),n.value},init:t,lc:0,listen(r){return n.lc=e.push(r),()=>{for(let o=nr+Eo;o<gn.length;)gn[o]===r?gn.splice(o,Eo):o+=Eo;let i=e.indexOf(r);~i&&(e.splice(i,1),--n.lc||n.off())}},notify(r,i){Xo.epoch++;let o=!gn.length;for(let a of e)gn.push(a,n.value,r,i);if(o){for(nr=0;nr<gn.length;nr+=Eo)gn[nr](gn[nr+1],gn[nr+2],gn[nr+3]);gn.length=0}},off(){},set(r){let i=n.value;i!==r&&(n.value=r,n.notify(i))},subscribe(r){let i=n.listen(r);return r(n.value),i},value:t};return n},UO=5,To=6,xo=10;let BO=(t,e,n,r)=>(t.events=t.events||{},t.events[n+xo]||(t.events[n+xo]=r(i=>{t.events[n].reduceRight((o,a)=>(a(o),o),{shared:{},...i})})),t.events[n]=t.events[n]||[],t.events[n].push(e),()=>{let i=t.events[n],o=i.indexOf(e);i.splice(o,1),i.length||(delete t.events[n],t.events[n+xo](),delete t.events[n+xo])});const HO=1e3;let tv=(t,e)=>BO(t,r=>{let i=e(r);i&&t.events[To].push(i)},UO,r=>{let i=t.listen;t.listen=(...a)=>(!t.lc&&!t.active&&(t.active=!0,r()),i(...a));let o=t.off;return t.events[To]=[],t.off=()=>{o(),setTimeout(()=>{if(t.active&&!t.lc){t.active=!1;for(let a of t.events[To])a();t.events[To]=[]}},HO)},()=>{t.listen=i,t.off=o}}),qO=(t,e,n)=>{Array.isArray(t)||(t=[t]);let r,i,o=()=>{if(i===Xo.epoch)return;i=Xo.epoch;let u=t.map(c=>c.get());if(!r||u.some((c,d)=>c!==r[d])){r=u;let c=e(...u);c&&c.then&&c.t?c.then(d=>{r===u&&a.set(d)}):(a.set(c),i=Xo.epoch)}},a=At(void 0),s=a.get;a.get=()=>(o(),s());let l=o;return tv(a,()=>{let u=t.map(c=>c.listen(l));return o(),()=>{for(let c of u)c()}}),a};const ar=(t,e)=>qO(t,e);let gf=t=>t,qn={},Fl={addEventListener(){},removeEventListener(){}};function WO(){try{return typeof localStorage<"u"}catch{return!1}}WO()&&(qn=localStorage);let KO={addEventListener(t,e,n){window.addEventListener("storage",e),window.addEventListener("pageshow",n)},removeEventListener(t,e,n){window.removeEventListener("storage",e),window.removeEventListener("pageshow",n)}};typeof window<"u"&&(Fl=KO);function nv(t,e,n={}){let r=n.encode||gf,i=n.decode||gf,o=qn[t],a=At(t in qn?i(o):e),s=a.set;a.set=c=>{o=r(c),typeof o>"u"?delete qn[t]:qn[t]=o,s(c)};function l(c){c.key===t?c.newValue===null?s(e):s(i(c.newValue)):t in qn||s(e)}function u(){o!==qn[t]&&a.set(t in qn?i(qn[t]):e)}return tv(a,()=>{if(u(),n.listen!==!1)return Fl.addEventListener(t,l,u),()=>{Fl.removeEventListener(t,l,u)}}),a}let Dl=1;var YO=class{subscribers;toasts;dismissedToasts;constructor(){this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}subscribe=t=>(this.subscribers.push(t),()=>{const e=this.subscribers.indexOf(t);this.subscribers.splice(e,1)});publish=t=>{this.subscribers.forEach(e=>e(t))};addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]};create=t=>{const{message:e,...n}=t,r=typeof t.id=="number"||t.id&&t.id?.length>0?t.id:Dl++,i=this.toasts.find(a=>a.id===r),o=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(r)&&this.dismissedToasts.delete(r),i?this.toasts=this.toasts.map(a=>a.id===r?(this.publish({...a,...t,id:r,title:e}),{...a,...t,id:r,dismissible:o,title:e}):a):this.addToast({title:e,...n,dismissible:o,id:r}),r};dismiss=t=>(t?(this.dismissedToasts.add(t),requestAnimationFrame(()=>this.subscribers.forEach(e=>e({id:t,dismiss:!0})))):this.toasts.forEach(e=>{this.subscribers.forEach(n=>n({id:e.id,dismiss:!0}))}),t);message=(t,e)=>this.create({...e,message:t,type:"default"});error=(t,e)=>this.create({...e,type:"error",message:t});success=(t,e)=>this.create({...e,type:"success",message:t});info=(t,e)=>this.create({...e,type:"info",message:t});warning=(t,e)=>this.create({...e,type:"warning",message:t});loading=(t,e)=>this.create({...e,type:"loading",message:t});promise=(t,e)=>{if(!e)return;let n;e.loading!==void 0&&(n=this.create({...e,promise:t,type:"loading",message:e.loading,description:typeof e.description!="function"?e.description:void 0}));const r=Promise.resolve(t instanceof Function?t():t);let i=n!==void 0,o;const a=r.then(async l=>{if(o=["resolve",l],Br(l))i=!1,this.create({id:n,type:"default",message:l});else if(QO(l)&&!l.ok){i=!1;const c=typeof e.error=="function"?await e.error(`HTTP error! status: ${l.status}`):e.error,d=typeof e.description=="function"?await e.description(`HTTP error! status: ${l.status}`):e.description,m=typeof c=="object"&&!Br(c)?c:{message:c||"",id:n||""};this.create({id:n,type:"error",description:d,...m})}else if(l instanceof Error){i=!1;const c=typeof e.error=="function"?await e.error(l):e.error,d=typeof e.description=="function"?await e.description(l):e.description,m=typeof c=="object"&&!Br(c)?c:{message:c||"",id:n||""};this.create({id:n,type:"error",description:d,...m})}else if(e.success!==void 0){i=!1;const c=typeof e.success=="function"?await e.success(l):e.success,d=typeof e.description=="function"?await e.description(l):e.description,m=typeof c=="object"&&!Br(c)?c:{message:c||"",id:n||""};this.create({id:n,type:"success",description:d,...m})}}).catch(async l=>{if(o=["reject",l],e.error!==void 0){i=!1;const u=typeof e.error=="function"?await e.error(l):e.error,c=typeof e.description=="function"?await e.description(l):e.description,f=typeof u=="object"&&!Br(u)?u:{message:u||"",id:n||""};this.create({id:n,type:"error",description:c,...f})}}).finally(()=>{i&&(this.dismiss(n),n=void 0),e.finally?.()}),s=()=>new Promise((l,u)=>a.then(()=>o[0]==="reject"?u(o[1]):l(o[1])).catch(u));return typeof n!="string"&&typeof n!="number"?{unwrap:s}:Object.assign(n,{unwrap:s})};custom=(t,e)=>{const n=e?.id||Dl++,r=this.toasts.find(o=>o.id===n),i=e?.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(n)&&this.dismissedToasts.delete(n),r?this.toasts=this.toasts.map(o=>o.id===n?(this.publish({...o,component:t,dismissible:i,id:n,...e}),{...o,component:t,dismissible:i,id:n,...e}):o):this.addToast({component:t,dismissible:i,id:n,...e}),n};getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id))};const Nt=new YO;function GO(t,e){const n=e?.id||Dl++;return Nt.create({message:t,id:n,type:"default",...e}),n}const QO=t=>t&&typeof t=="object"&&"ok"in t&&typeof t.ok=="boolean"&&"status"in t&&typeof t.status=="number",XO=GO,JO=()=>Nt.toasts,ZO=()=>Nt.getActiveToasts(),Oo=Object.assign(XO,{success:Nt.success,info:Nt.info,warning:Nt.warning,error:Nt.error,custom:Nt.custom,message:Nt.message,promise:Nt.promise,dismiss:Nt.dismiss,loading:Nt.loading},{getHistory:JO,getToasts:ZO});function Ao(t){return t.label!==void 0}const eA=3,rv="24px",iv="16px",_f=4e3,tA=356,nA=14,rA=45,ov=200;function iA(){const t=K(!1);return Ut(()=>{const e=()=>{t.value=document.hidden};return document.addEventListener("visibilitychange",e),()=>window.removeEventListener("visibilitychange",e)}),{isDocumentHidden:t}}function rr(...t){return t.filter(Boolean).join(" ")}function oA(t){const[e,n]=t.split("-"),r=[];return e&&r.push(e),n&&r.push(n),r}function aA(t,e){const n={};return[t,e].forEach((r,i)=>{const o=i===1,a=o?"--mobile-offset":"--offset",s=o?iv:rv;function l(u){["top","right","bottom","left"].forEach(c=>{n[`${a}-${c}`]=typeof u=="number"?`${u}px`:u})}typeof r=="number"||typeof r=="string"?l(r):typeof r=="object"?["top","right","bottom","left"].forEach(u=>{r[u]===void 0?n[`${a}-${u}`]=s:n[`${a}-${u}`]=typeof r[u]=="number"?`${r[u]}px`:r[u]}):l(s)}),n}const sA=["data-rich-colors","data-styled","data-mounted","data-promise","data-swiped","data-removed","data-visible","data-y-position","data-x-position","data-index","data-front","data-swiping","data-dismissible","data-type","data-invert","data-swipe-out","data-swipe-direction","data-expanded","data-testid"],lA=["aria-label","data-disabled","data-close-button-position"];var cA=Ee({__name:"Toast",props:{toast:{},toasts:{},index:{},swipeDirections:{},expanded:{type:Boolean},invert:{type:Boolean},heights:{},gap:{},position:{},closeButtonPosition:{},visibleToasts:{},expandByDefault:{type:Boolean},closeButton:{type:Boolean},interacting:{type:Boolean},style:{},cancelButtonStyle:{},actionButtonStyle:{},duration:{},class:{},unstyled:{type:Boolean},descriptionClass:{},loadingIcon:{},classes:{},icons:{},closeButtonAriaLabel:{},defaultRichColors:{type:Boolean}},emits:["update:heights","update:height","removeToast"],setup(t,{emit:e}){const n=t,r=e,i=K(null),o=K(null),a=K(!1),s=K(!1),l=K(!1),u=K(!1),c=K(!1),d=K(0),f=K(0),m=K(n.toast.duration||n.duration||_f),p=K(null),h=K(null),v=te(()=>n.index===0),C=te(()=>n.index+1<=n.visibleToasts),S=te(()=>n.toast.type),w=te(()=>n.toast.dismissible!==!1),y=te(()=>n.toast.class||""),E=te(()=>n.descriptionClass||""),T=te(()=>{const R=n.toast.position||n.position,L=n.heights.filter($=>$.position===R).findIndex($=>$.toastId===n.toast.id);return L>=0?L:0}),A=te(()=>{const R=n.toast.position||n.position;return n.heights.filter(L=>L.position===R).reduce((L,$,U)=>U>=T.value?L:L+$.height,0)}),O=te(()=>T.value*n.gap+A.value||0),q=te(()=>n.toast.closeButton??n.closeButton),I=te(()=>n.toast.duration||n.duration||_f),P=K(0),z=K(0),F=K(null),Y=te(()=>n.position.split("-")),le=te(()=>Y.value[0]),de=te(()=>Y.value[1]),Q=te(()=>typeof n.toast.title!="string"),M=te(()=>typeof n.toast.description!="string"),{isDocumentHidden:k}=iA(),X=te(()=>S.value&&S.value==="loading");it(()=>{a.value=!0,m.value=I.value}),Ut(async()=>{if(!a.value||!h.value)return;await Xe();const R=h.value,me=R.style.height;R.style.height="auto";const L=R.getBoundingClientRect().height;R.style.height=me,f.value=L,r("update:height",{toastId:n.toast.id,height:L,position:n.toast.position||n.position})});function N(){s.value=!0,d.value=O.value,setTimeout(()=>{r("removeToast",n.toast)},ov)}function re(){if(X.value||!w.value)return{};N(),n.toast.onDismiss?.(n.toast)}function ve(R){R.button!==2&&(X.value||!w.value||(p.value=new Date,d.value=O.value,R.target.setPointerCapture(R.pointerId),R.target.tagName!=="BUTTON"&&(l.value=!0,F.value={x:R.clientX,y:R.clientY})))}function oe(){if(u.value||!w.value)return;F.value=null;const R=Number(h.value?.style.getPropertyValue("--swipe-amount-x").replace("px","")||0),me=Number(h.value?.style.getPropertyValue("--swipe-amount-y").replace("px","")||0),L=new Date().getTime()-(p.value?.getTime()||0),$=i.value==="x"?R:me,U=Math.abs($)/L;if(Math.abs($)>=rA||U>.11){d.value=O.value,n.toast.onDismiss?.(n.toast),i.value==="x"?o.value=R>0?"right":"left":o.value=me>0?"down":"up",N(),u.value=!0;return}else h.value?.style.setProperty("--swipe-amount-x","0px"),h.value?.style.setProperty("--swipe-amount-y","0px");c.value=!1,l.value=!1,i.value=null}function ge(R){if(!F.value||!w.value||(window?.getSelection()?.toString()?.length??!1))return;const L=R.clientY-F.value.y,$=R.clientX-F.value.x,U=n.swipeDirections??oA(n.position);!i.value&&(Math.abs($)>1||Math.abs(L)>1)&&(i.value=Math.abs($)>Math.abs(L)?"x":"y");let W={x:0,y:0};const V=H=>1/(1.5+Math.abs(H)/20);if(i.value==="y"){if(U.includes("top")||U.includes("bottom"))if(U.includes("top")&&L<0||U.includes("bottom")&&L>0)W.y=L;else{const H=L*V(L);W.y=Math.abs(H)<Math.abs(L)?H:L}}else if(i.value==="x"&&(U.includes("left")||U.includes("right")))if(U.includes("left")&&$<0||U.includes("right")&&$>0)W.x=$;else{const H=$*V($);W.x=Math.abs(H)<Math.abs($)?H:$}(Math.abs(W.x)>0||Math.abs(W.y)>0)&&(c.value=!0),h.value?.style.setProperty("--swipe-amount-x",`${W.x}px`),h.value?.style.setProperty("--swipe-amount-y",`${W.y}px`)}it(()=>{if(a.value=!0,!h.value)return;const R=h.value.getBoundingClientRect().height;f.value=R;const me=[{toastId:n.toast.id,height:R,position:n.toast.position},...n.heights];r("update:heights",me)}),Oa(()=>{h.value&&r("removeToast",n.toast)}),Ut(R=>{if(n.toast.promise&&S.value==="loading"||n.toast.duration===1/0||n.toast.type==="loading")return;let me;const L=()=>{if(z.value<P.value){const U=new Date().getTime()-P.value;m.value=m.value-U}z.value=new Date().getTime()},$=()=>{m.value!==1/0&&(P.value=new Date().getTime(),me=setTimeout(()=>{n.toast.onAutoClose?.(n.toast),N()},m.value))};n.expanded||n.interacting||k.value?L():$(),R(()=>{clearTimeout(me)})}),Ae(()=>n.toast.delete,R=>{R!==void 0&&R&&(N(),n.toast.onDismiss?.(n.toast))},{deep:!0});function _e(){l.value=!1,i.value=null,F.value=null}return(R,me)=>(b(),x("li",{tabindex:"0",ref_key:"toastRef",ref:h,class:Pe(g(rr)(n.class,y.value,R.classes?.toast,R.toast.classes?.toast,R.classes?.[S.value],R.toast?.classes?.[S.value])),"data-sonner-toast":"","data-rich-colors":R.toast.richColors??R.defaultRichColors,"data-styled":!(R.toast.component||R.toast?.unstyled||R.unstyled),"data-mounted":a.value,"data-promise":!!R.toast.promise,"data-swiped":c.value,"data-removed":s.value,"data-visible":C.value,"data-y-position":le.value,"data-x-position":de.value,"data-index":R.index,"data-front":v.value,"data-swiping":l.value,"data-dismissible":w.value,"data-type":S.value,"data-invert":R.toast.invert||R.invert,"data-swipe-out":u.value,"data-swipe-direction":o.value,"data-expanded":!!(R.expanded||R.expandByDefault&&a.value),"data-testid":R.toast.testId,style:kt({"--index":R.index,"--toasts-before":R.index,"--z-index":R.toasts.length-R.index,"--offset":`${s.value?d.value:O.value}px`,"--initial-height":R.expandByDefault?"auto":`${f.value}px`,...R.style,...n.toast.style}),onDragend:_e,onPointerdown:ve,onPointerup:oe,onPointermove:ge},[q.value&&!R.toast.component&&S.value!=="loading"?(b(),x("button",{key:0,"aria-label":R.closeButtonAriaLabel||"Close toast","data-disabled":X.value,"data-close-button":"true","data-close-button-position":R.closeButtonPosition,class:Pe(g(rr)(R.classes?.closeButton,R.toast?.classes?.closeButton)),onClick:re},[R.icons?.close?(b(),ne($t(R.icons?.close),{key:0})):Ue(R.$slots,"close-icon",{key:1})],10,lA)):ue("v-if",!0),R.toast.component?(b(),ne($t(R.toast.component),Ye({key:1},R.toast.componentProps,{onCloseToast:re,isPaused:R.$props.expanded||R.$props.interacting||g(k)}),null,16,["isPaused"])):(b(),x(Ie,{key:2},[S.value!=="default"||R.toast.icon||R.toast.promise?(b(),x("div",{key:0,"data-icon":"",class:Pe(g(rr)(R.classes?.icon,R.toast?.classes?.icon))},[R.toast.icon?(b(),ne($t(R.toast.icon),{key:0})):(b(),x(Ie,{key:1},[S.value==="loading"?Ue(R.$slots,"loading-icon",{key:0}):S.value==="success"?Ue(R.$slots,"success-icon",{key:1}):S.value==="error"?Ue(R.$slots,"error-icon",{key:2}):S.value==="warning"?Ue(R.$slots,"warning-icon",{key:3}):S.value==="info"?Ue(R.$slots,"info-icon",{key:4}):ue("v-if",!0)],64))],2)):ue("v-if",!0),_("div",{"data-content":"",class:Pe(g(rr)(R.classes?.content,R.toast?.classes?.content))},[_("div",{"data-title":"",class:Pe(g(rr)(R.classes?.title,R.toast.classes?.title))},[Q.value?(b(),ne($t(R.toast.title),Cn(Ye({key:0},R.toast.componentProps)),null,16)):(b(),x(Ie,{key:1},[Ge(D(R.toast.title),1)],64))],2),R.toast.description?(b(),x("div",{key:0,"data-description":"",class:Pe(g(rr)(R.descriptionClass,E.value,R.classes?.description,R.toast.classes?.description))},[M.value?(b(),ne($t(R.toast.description),Cn(Ye({key:0},R.toast.componentProps)),null,16)):(b(),x(Ie,{key:1},[Ge(D(R.toast.description),1)],64))],2)):ue("v-if",!0)],2),R.toast.cancel?(b(),x("button",{key:1,style:kt(R.toast.cancelButtonStyle||R.cancelButtonStyle),class:Pe(g(rr)(R.classes?.cancelButton,R.toast.classes?.cancelButton)),"data-button":"","data-cancel":"",onClick:me[0]||(me[0]=L=>{g(Ao)(R.toast.cancel)&&w.value&&(R.toast.cancel.onClick?.(L),N())})},D(g(Ao)(R.toast.cancel)?R.toast.cancel?.label:R.toast.cancel),7)):ue("v-if",!0),R.toast.action?(b(),x("button",{key:2,style:kt(R.toast.actionButtonStyle||R.actionButtonStyle),class:Pe(g(rr)(R.classes?.actionButton,R.toast.classes?.actionButton)),"data-button":"","data-action":"",onClick:me[1]||(me[1]=L=>{g(Ao)(R.toast.action)&&(R.toast.action.onClick?.(L),!L.defaultPrevented&&N())})},D(g(Ao)(R.toast.action)?R.toast.action?.label:R.toast.action),7)):ue("v-if",!0)],64))],46,sA))}}),uA=cA,oo=(t,e)=>{const n=t.__vccOpts||t;for(const[r,i]of e)n[r]=i;return n};const dA={},fA={xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stoke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"};function pA(t,e){return b(),x("svg",fA,e[0]||(e[0]=[_("line",{x1:"18",y1:"6",x2:"6",y2:"18"},null,-1),_("line",{x1:"6",y1:"6",x2:"18",y2:"18"},null,-1)]))}var hA=oo(dA,[["render",pA]]);const mA=["data-visible"],vA={class:"sonner-spinner"};var gA=Ee({__name:"Loader",props:{visible:{type:Boolean}},setup(t){const e=Array(12).fill(0);return(n,r)=>(b(),x("div",{class:"sonner-loading-wrapper","data-visible":n.visible},[_("div",vA,[(b(!0),x(Ie,null,qe(g(e),i=>(b(),x("div",{key:`spinner-bar-${i}`,class:"sonner-loading-bar"}))),128))])],8,mA))}}),_A=gA;const yA={},bA={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"};function wA(t,e){return b(),x("svg",bA,e[0]||(e[0]=[_("path",{"fill-rule":"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z","clip-rule":"evenodd"},null,-1)]))}var SA=oo(yA,[["render",wA]]);const CA={},EA={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"};function TA(t,e){return b(),x("svg",EA,e[0]||(e[0]=[_("path",{"fill-rule":"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z","clip-rule":"evenodd"},null,-1)]))}var xA=oo(CA,[["render",TA]]);const OA={},AA={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"};function $A(t,e){return b(),x("svg",AA,e[0]||(e[0]=[_("path",{"fill-rule":"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z","clip-rule":"evenodd"},null,-1)]))}var RA=oo(OA,[["render",$A]]);const PA={},kA={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"};function IA(t,e){return b(),x("svg",kA,e[0]||(e[0]=[_("path",{"fill-rule":"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z","clip-rule":"evenodd"},null,-1)]))}var MA=oo(PA,[["render",IA]]);const FA=["aria-label"],DA=["data-sonner-theme","dir","data-theme","data-rich-colors","data-y-position","data-x-position"],LA=typeof window<"u"&&typeof document<"u";function jA(){if(typeof window>"u"||typeof document>"u")return"ltr";const t=document.documentElement.getAttribute("dir");return t==="auto"||!t?window.getComputedStyle(document.documentElement).direction:t}var VA=Ee({name:"Toaster",inheritAttrs:!1,__name:"Toaster",props:{id:{},invert:{type:Boolean,default:!1},theme:{default:"light"},position:{default:"bottom-right"},closeButtonPosition:{default:"top-left"},hotkey:{default:()=>["altKey","KeyT"]},richColors:{type:Boolean,default:!1},expand:{type:Boolean,default:!1},duration:{},gap:{default:nA},visibleToasts:{default:eA},closeButton:{type:Boolean,default:!1},toastOptions:{default:()=>({})},class:{default:""},style:{},offset:{default:rv},mobileOffset:{default:iv},dir:{default:"auto"},swipeDirections:{},icons:{},containerAriaLabel:{default:"Notifications"}},setup(t){const e=t,n=mc(),r=K([]),i=te(()=>e.id?r.value.filter(I=>I.toasterId===e.id):r.value.filter(I=>!I.toasterId));function o(I,P){return i.value.filter(z=>!z.position&&P===0||z.position===I)}const a=te(()=>{const I=i.value.filter(P=>P.position).map(P=>P.position);return I.length>0?Array.from(new Set([e.position].concat(I))):[e.position]}),s=te(()=>{const I={};return a.value.forEach(P=>{I[P]=r.value.filter(z=>z.position===P)}),I}),l=K([]),u=K({}),c=K(!1);Ut(()=>{a.value.forEach(I=>{I in u.value||(u.value[I]=!1)})});const d=K(e.theme!=="system"?e.theme:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),f=K(null),m=K(null),p=K(!1),h=e.hotkey.join("+").replace(/Key/g,"").replace(/Digit/g,"");function v(I){r.value.find(P=>P.id===I.id)?.delete||Nt.dismiss(I.id),r.value=r.value.filter(({id:P})=>P!==I.id),setTimeout(()=>{r.value.find(P=>P.id===I.id)||(l.value=l.value.filter(P=>P.toastId!==I.id))},ov+50)}function C(I){p.value&&!I.currentTarget?.contains?.(I.relatedTarget)&&(p.value=!1,m.value&&(m.value.focus({preventScroll:!0}),m.value=null))}function S(I){I.target instanceof HTMLElement&&I.target.dataset.dismissible==="false"||p.value||(p.value=!0,m.value=I.relatedTarget)}function w(I){I.target&&I.target instanceof HTMLElement&&I.target.dataset.dismissible==="false"||(c.value=!0)}Ut(I=>{const P=Nt.subscribe(z=>{if(z.dismiss){requestAnimationFrame(()=>{r.value=r.value.map(F=>F.id===z.id?{...F,delete:!0}:F)});return}Xe(()=>{const F=r.value.findIndex(Y=>Y.id===z.id);F!==-1?r.value=[...r.value.slice(0,F),{...r.value[F],...z},...r.value.slice(F+1)]:r.value=[z,...r.value]})});I(P)}),Ut(I=>{if(typeof window>"u")return;if(e.theme!=="system"){d.value=e.theme;return}const P=window.matchMedia("(prefers-color-scheme: dark)"),z=Y=>{d.value=Y?"dark":"light"};z(P.matches);const F=Y=>{z(Y.matches)};try{P.addEventListener("change",F)}catch{P.addListener(F)}I(()=>{try{P.removeEventListener("change",F)}catch{P.removeListener(F)}})}),Ut(()=>{f.value&&m.value&&(m.value.focus({preventScroll:!0}),m.value=null,p.value=!1)}),Ut(()=>{r.value.length<=1&&Object.keys(u.value).forEach(I=>{u.value[I]=!1})}),Ut(I=>{function P(z){const F=e.hotkey.every(de=>z[de]||z.code===de),Y=Array.isArray(f.value)?f.value[0]:f.value;F&&(a.value.forEach(de=>{u.value[de]=!0}),Y?.focus());const le=document.activeElement===f.value||Y?.contains(document.activeElement);z.code==="Escape"&&le&&a.value.forEach(de=>{u.value[de]=!1})}LA&&(document.addEventListener("keydown",P),I(()=>{document.removeEventListener("keydown",P)}))});function y(I){const P=I.currentTarget,z=P.getAttribute("data-y-position")+"-"+P.getAttribute("data-x-position");u.value[z]=!0}function E(I){if(!c.value){const P=I.currentTarget,z=P.getAttribute("data-y-position")+"-"+P.getAttribute("data-x-position");u.value[z]=!1}}function T(){Object.keys(u.value).forEach(I=>{u.value[I]=!1})}function A(){c.value=!1}function O(I){l.value=I}function q(I){const P=l.value.findIndex(z=>z.toastId===I.toastId);if(P!==-1)l.value[P]=I;else{const z=l.value.findIndex(F=>F.position===I.position);z!==-1?l.value.splice(z,0,I):l.value.unshift(I)}}return(I,P)=>(b(),x(Ie,null,[ue(" Remove item from normal navigation flow, only available via hotkey "),_("section",{"aria-label":`${I.containerAriaLabel} ${g(h)}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false"},[(b(!0),x(Ie,null,qe(a.value,(z,F)=>(b(),x("ol",Ye({key:z,ref_for:!0,ref_key:"listRef",ref:f,"data-sonner-toaster":"","data-sonner-theme":d.value,class:e.class,dir:I.dir==="auto"?jA():I.dir,tabIndex:-1,"data-theme":I.theme,"data-rich-colors":I.richColors,"data-y-position":z.split("-")[0],"data-x-position":z.split("-")[1],style:{"--front-toast-height":`${l.value[0]?.height||0}px`,"--width":`${g(tA)}px`,"--gap":`${I.gap}px`,...I.style,...g(n).style,...g(aA)(I.offset,I.mobileOffset)}},{ref_for:!0},I.$attrs,{onBlur:C,onFocus:S,onMouseenter:y,onMousemove:y,onMouseleave:E,onDragend:T,onPointerdown:w,onPointerup:A}),[(b(!0),x(Ie,null,qe(o(z,F),(Y,le)=>(b(),ne(uA,{key:Y.id,heights:l.value,icons:I.icons,index:le,toast:Y,defaultRichColors:I.richColors,duration:I.toastOptions?.duration??I.duration,class:Pe(I.toastOptions?.class??""),descriptionClass:I.toastOptions?.descriptionClass,invert:I.invert,visibleToasts:I.visibleToasts,closeButton:I.toastOptions?.closeButton??I.closeButton,interacting:c.value,position:z,closeButtonPosition:I.toastOptions?.closeButtonPosition??I.closeButtonPosition,style:kt(I.toastOptions?.style),unstyled:I.toastOptions?.unstyled,classes:I.toastOptions?.classes,cancelButtonStyle:I.toastOptions?.cancelButtonStyle,actionButtonStyle:I.toastOptions?.actionButtonStyle,"close-button-aria-label":I.toastOptions?.closeButtonAriaLabel,toasts:s.value[z],expandByDefault:I.expand,gap:I.gap,expanded:u.value[z]||!1,swipeDirections:e.swipeDirections,"onUpdate:heights":O,"onUpdate:height":q,onRemoveToast:v},{"close-icon":we(()=>[Ue(I.$slots,"close-icon",{},()=>[j(hA)])]),"loading-icon":we(()=>[Ue(I.$slots,"loading-icon",{},()=>[j(_A,{visible:Y.type==="loading"},null,8,["visible"])])]),"success-icon":we(()=>[Ue(I.$slots,"success-icon",{},()=>[j(SA)])]),"error-icon":we(()=>[Ue(I.$slots,"error-icon",{},()=>[j(MA)])]),"warning-icon":we(()=>[Ue(I.$slots,"warning-icon",{},()=>[j(RA)])]),"info-icon":we(()=>[Ue(I.$slots,"info-icon",{},()=>[j(xA)])]),_:2},1032,["heights","icons","index","toast","defaultRichColors","duration","class","descriptionClass","invert","visibleToasts","closeButton","interacting","position","closeButtonPosition","style","unstyled","classes","cancelButtonStyle","actionButtonStyle","close-button-aria-label","toasts","expandByDefault","gap","expanded","swipeDirections"]))),128))],16,DA))),128))],8,FA)],2112))}}),zA=VA,Ua=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(t){return this.listeners.add(t),this.onSubscribe(),()=>{this.listeners.delete(t),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},NA=class extends Ua{#e;#t;#n;constructor(){super(),this.#n=t=>{if(typeof window<"u"&&window.addEventListener){const e=()=>t();return window.addEventListener("visibilitychange",e,!1),()=>{window.removeEventListener("visibilitychange",e)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(t){this.#n=t,this.#t?.(),this.#t=t(e=>{typeof e=="boolean"?this.setFocused(e):this.onFocus()})}setFocused(t){this.#e!==t&&(this.#e=t,this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(e=>{e(t)})}isFocused(){return typeof this.#e=="boolean"?this.#e:globalThis.document?.visibilityState!=="hidden"}},av=new NA,UA={setTimeout:(t,e)=>setTimeout(t,e),clearTimeout:t=>clearTimeout(t),setInterval:(t,e)=>setInterval(t,e),clearInterval:t=>clearInterval(t)},BA=class{#e=UA;#t=!1;setTimeoutProvider(t){this.#e=t}setTimeout(t,e){return this.#e.setTimeout(t,e)}clearTimeout(t){this.#e.clearTimeout(t)}setInterval(t,e){return this.#e.setInterval(t,e)}clearInterval(t){this.#e.clearInterval(t)}},Ll=new BA;function HA(t){setTimeout(t,0)}var qA=typeof window>"u"||"Deno"in globalThis;function yn(){}function WA(t,e){return typeof t=="function"?t(e):t}function KA(t){return typeof t=="number"&&t>=0&&t!==1/0}function YA(t,e){return Math.max(t+(e||0)-Date.now(),0)}function jl(t,e){return typeof t=="function"?t(e):t}function GA(t,e){return typeof t=="function"?t(e):t}function yf(t,e){const{type:n="all",exact:r,fetchStatus:i,predicate:o,queryKey:a,stale:s}=t;if(a){if(r){if(e.queryHash!==zc(a,e.options))return!1}else if(!zi(e.queryKey,a))return!1}if(n!=="all"){const l=e.isActive();if(n==="active"&&!l||n==="inactive"&&l)return!1}return!(typeof s=="boolean"&&e.isStale()!==s||i&&i!==e.state.fetchStatus||o&&!o(e))}function bf(t,e){const{exact:n,status:r,predicate:i,mutationKey:o}=t;if(o){if(!e.options.mutationKey)return!1;if(n){if(Vi(e.options.mutationKey)!==Vi(o))return!1}else if(!zi(e.options.mutationKey,o))return!1}return!(r&&e.state.status!==r||i&&!i(e))}function zc(t,e){return(e?.queryKeyHashFn||Vi)(t)}function Vi(t){return JSON.stringify(t,(e,n)=>Vl(n)?Object.keys(n).sort().reduce((r,i)=>(r[i]=n[i],r),{}):n)}function zi(t,e){return t===e?!0:typeof t!=typeof e?!1:t&&e&&typeof t=="object"&&typeof e=="object"?Object.keys(e).every(n=>zi(t[n],e[n])):!1}var QA=Object.prototype.hasOwnProperty;function sv(t,e,n=0){if(t===e)return t;if(n>500)return e;const r=wf(t)&&wf(e);if(!r&&!(Vl(t)&&Vl(e)))return e;const o=(r?t:Object.keys(t)).length,a=r?e:Object.keys(e),s=a.length,l=r?new Array(s):{};let u=0;for(let c=0;c<s;c++){const d=r?c:a[c],f=t[d],m=e[d];if(f===m){l[d]=f,(r?c<o:QA.call(t,d))&&u++;continue}if(f===null||m===null||typeof f!="object"||typeof m!="object"){l[d]=m;continue}const p=sv(f,m,n+1);l[d]=p,p===f&&u++}return o===s&&u===o?t:l}function wf(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function Vl(t){if(!Sf(t))return!1;const e=t.constructor;if(e===void 0)return!0;const n=e.prototype;return!(!Sf(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(t)!==Object.prototype)}function Sf(t){return Object.prototype.toString.call(t)==="[object Object]"}function XA(t){return new Promise(e=>{Ll.setTimeout(e,t)})}function JA(t,e,n){return typeof n.structuralSharing=="function"?n.structuralSharing(t,e):n.structuralSharing!==!1?sv(t,e):e}function ZA(t,e,n=0){const r=[...t,e];return n&&r.length>n?r.slice(1):r}function e$(t,e,n=0){const r=[e,...t];return n&&r.length>n?r.slice(0,-1):r}var Nc=Symbol();function lv(t,e){return!t.queryFn&&e?.initialPromise?()=>e.initialPromise:!t.queryFn||t.queryFn===Nc?()=>Promise.reject(new Error(`Missing queryFn: '${t.queryHash}'`)):t.queryFn}function t$(t,e,n){let r=!1,i;return Object.defineProperty(t,"signal",{enumerable:!0,get:()=>(i??=e(),r||(r=!0,i.aborted?n():i.addEventListener("abort",n,{once:!0})),i)}),t}var cv=(()=>{let t=()=>qA;return{isServer(){return t()},setIsServer(e){t=e}}})();function n$(){let t,e;const n=new Promise((i,o)=>{t=i,e=o});n.status="pending",n.catch(()=>{});function r(i){Object.assign(n,i),delete n.resolve,delete n.reject}return n.resolve=i=>{r({status:"fulfilled",value:i}),t(i)},n.reject=i=>{r({status:"rejected",reason:i}),e(i)},n}var r$=HA;function i$(){let t=[],e=0,n=s=>{s()},r=s=>{s()},i=r$;const o=s=>{e?t.push(s):i(()=>{n(s)})},a=()=>{const s=t;t=[],s.length&&i(()=>{r(()=>{s.forEach(l=>{n(l)})})})};return{batch:s=>{let l;e++;try{l=s()}finally{e--,e||a()}return l},batchCalls:s=>(...l)=>{o(()=>{s(...l)})},schedule:o,setNotifyFunction:s=>{n=s},setBatchNotifyFunction:s=>{r=s},setScheduler:s=>{i=s}}}var Ft=i$(),o$=class extends Ua{#e=!0;#t;#n;constructor(){super(),this.#n=t=>{if(typeof window<"u"&&window.addEventListener){const e=()=>t(!0),n=()=>t(!1);return window.addEventListener("online",e,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",e),window.removeEventListener("offline",n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(t){this.#n=t,this.#t?.(),this.#t=t(this.setOnline.bind(this))}setOnline(t){this.#e!==t&&(this.#e=t,this.listeners.forEach(n=>{n(t)}))}isOnline(){return this.#e}},ma=new o$;function a$(t){return Math.min(1e3*2**t,3e4)}function uv(t){return(t??"online")==="online"?ma.isOnline():!0}var zl=class extends Error{constructor(t){super("CancelledError"),this.revert=t?.revert,this.silent=t?.silent}};function dv(t){let e=!1,n=0,r;const i=n$(),o=()=>i.status!=="pending",a=h=>{if(!o()){const v=new zl(h);f(v),t.onCancel?.(v)}},s=()=>{e=!0},l=()=>{e=!1},u=()=>av.isFocused()&&(t.networkMode==="always"||ma.isOnline())&&t.canRun(),c=()=>uv(t.networkMode)&&t.canRun(),d=h=>{o()||(r?.(),i.resolve(h))},f=h=>{o()||(r?.(),i.reject(h))},m=()=>new Promise(h=>{r=v=>{(o()||u())&&h(v)},t.onPause?.()}).then(()=>{r=void 0,o()||t.onContinue?.()}),p=()=>{if(o())return;let h;const v=n===0?t.initialPromise:void 0;try{h=v??t.fn()}catch(C){h=Promise.reject(C)}Promise.resolve(h).then(d).catch(C=>{if(o())return;const S=t.retry??(cv.isServer()?0:3),w=t.retryDelay??a$,y=typeof w=="function"?w(n,C):w,E=S===!0||typeof S=="number"&&n<S||typeof S=="function"&&S(n,C);if(e||!E){f(C);return}n++,t.onFail?.(n,C),XA(y).then(()=>u()?void 0:m()).then(()=>{e?f(C):p()})})};return{promise:i,status:()=>i.status,cancel:a,continue:()=>(r?.(),i),cancelRetry:s,continueRetry:l,canStart:c,start:()=>(c()?p():m().then(p),i)}}var fv=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),KA(this.gcTime)&&(this.#e=Ll.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(t){this.gcTime=Math.max(this.gcTime||0,t??(cv.isServer()?1/0:300*1e3))}clearGcTimeout(){this.#e!==void 0&&(Ll.clearTimeout(this.#e),this.#e=void 0)}};function s$(t){return{onFetch:(e,n)=>{const r=e.options,i=e.fetchOptions?.meta?.fetchMore?.direction,o=e.state.data?.pages||[],a=e.state.data?.pageParams||[];let s={pages:[],pageParams:[]},l=0;const u=async()=>{let c=!1;const d=p=>{t$(p,()=>e.signal,()=>c=!0)},f=lv(e.options,e.fetchOptions),m=async(p,h,v)=>{if(c)return Promise.reject(e.signal.reason);if(h==null&&p.pages.length)return Promise.resolve(p);const S=(()=>{const T={client:e.client,queryKey:e.queryKey,pageParam:h,direction:v?"backward":"forward",meta:e.options.meta};return d(T),T})(),w=await f(S),{maxPages:y}=e.options,E=v?e$:ZA;return{pages:E(p.pages,w,y),pageParams:E(p.pageParams,h,y)}};if(i&&o.length){const p=i==="backward",h=p?l$:Cf,v={pages:o,pageParams:a},C=h(r,v);s=await m(v,C,p)}else{const p=t??o.length;do{const h=l===0?a[0]??r.initialPageParam:Cf(r,s);if(l>0&&h==null)break;s=await m(s,h),l++}while(l<p)}return s};e.options.persister?e.fetchFn=()=>e.options.persister?.(u,{client:e.client,queryKey:e.queryKey,meta:e.options.meta,signal:e.signal},n):e.fetchFn=u}}}function Cf(t,{pages:e,pageParams:n}){const r=e.length-1;return e.length>0?t.getNextPageParam(e[r],e,n[r],n):void 0}function l$(t,{pages:e,pageParams:n}){return e.length>0?t.getPreviousPageParam?.(e[0],e,n[0],n):void 0}var c$=class extends fv{#e;#t;#n;#r;#o;#i;#s;#a;constructor(t){super(),this.#a=!1,this.#s=t.defaultOptions,this.setOptions(t.options),this.observers=[],this.#o=t.client,this.#r=this.#o.getQueryCache(),this.queryKey=t.queryKey,this.queryHash=t.queryHash,this.#t=Tf(this.options),this.state=t.state??this.#t,this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return this.#e}get promise(){return this.#i?.promise}setOptions(t){if(this.options={...this.#s,...t},t?._type&&(this.#e=t._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const e=Tf(this.options);e.data!==void 0&&(this.setState(Ef(e.data,e.dataUpdatedAt)),this.#t=e)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#r.remove(this)}setData(t,e){const n=JA(this.state.data,t,this.options);return this.#l({data:n,type:"success",dataUpdatedAt:e?.updatedAt,manual:e?.manual}),n}setState(t){this.#l({type:"setState",state:t})}cancel(t){const e=this.#i?.promise;return this.#i?.cancel(t),e?e.then(yn).catch(yn):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#t}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(t=>GA(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Nc||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>jl(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!YA(this.state.dataUpdatedAt,t)}onFocus(){this.observers.find(e=>e.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#i?.continue()}onOnline(){this.observers.find(e=>e.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#i?.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),this.#r.notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(e=>e!==t),this.observers.length||(this.#i&&(this.#a||this.#u()?this.#i.cancel({revert:!0}):this.#i.cancelRetry()),this.scheduleGc()),this.#r.notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}#u(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"}invalidate(){this.state.isInvalidated||this.#l({type:"invalidate"})}async fetch(t,e){if(this.state.fetchStatus!=="idle"&&this.#i?.status()!=="rejected"){if(this.state.data!==void 0&&e?.cancelRefetch)this.cancel({silent:!0});else if(this.#i)return this.#i.continueRetry(),this.#i.promise}if(t&&this.setOptions(t),!this.options.queryFn){const l=this.observers.find(u=>u.options.queryFn);l&&this.setOptions(l.options)}const n=new AbortController,r=l=>{Object.defineProperty(l,"signal",{enumerable:!0,get:()=>(this.#a=!0,n.signal)})},i=()=>{const l=lv(this.options,e),c=(()=>{const d={client:this.#o,queryKey:this.queryKey,meta:this.meta};return r(d),d})();return this.#a=!1,this.options.persister?this.options.persister(l,c,this):l(c)},a=(()=>{const l={fetchOptions:e,options:this.options,queryKey:this.queryKey,client:this.#o,state:this.state,fetchFn:i};return r(l),l})();(this.#e==="infinite"?s$(this.options.pages):this.options.behavior)?.onFetch(a,this),this.#n=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==a.fetchOptions?.meta)&&this.#l({type:"fetch",meta:a.fetchOptions?.meta}),this.#i=dv({initialPromise:e?.initialPromise,fn:a.fetchFn,onCancel:l=>{l instanceof zl&&l.revert&&this.setState({...this.#n,fetchStatus:"idle"}),n.abort()},onFail:(l,u)=>{this.#l({type:"failed",failureCount:l,error:u})},onPause:()=>{this.#l({type:"pause"})},onContinue:()=>{this.#l({type:"continue"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0});try{const l=await this.#i.start();if(l===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(l),this.#r.config.onSuccess?.(l,this),this.#r.config.onSettled?.(l,this.state.error,this),l}catch(l){if(l instanceof zl){if(l.silent)return this.#i.promise;if(l.revert){if(this.state.data===void 0)throw l;return this.state.data}}throw this.#l({type:"error",error:l}),this.#r.config.onError?.(l,this),this.#r.config.onSettled?.(this.state.data,l,this),l}finally{this.scheduleGc()}}#l(t){const e=n=>{switch(t.type){case"failed":return{...n,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...u$(n.data,this.options),fetchMeta:t.meta??null};case"success":const r={...n,...Ef(t.data,t.dataUpdatedAt),dataUpdateCount:n.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#n=t.manual?r:void 0,r;case"error":const i=t.error;return{...n,error:i,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...t.state}}};this.state=e(this.state),Ft.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),this.#r.notify({query:this,type:"updated",action:t})})}};function u$(t,e){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:uv(e.networkMode)?"fetching":"paused",...t===void 0&&{error:null,status:"pending"}}}function Ef(t,e){return{data:t,dataUpdatedAt:e??Date.now(),error:null,isInvalidated:!1,status:"success"}}function Tf(t){const e=typeof t.initialData=="function"?t.initialData():t.initialData,n=e!==void 0,r=n?typeof t.initialDataUpdatedAt=="function"?t.initialDataUpdatedAt():t.initialDataUpdatedAt:0;return{data:e,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var d$=class extends fv{#e;#t;#n;#r;constructor(t){super(),this.#e=t.client,this.mutationId=t.mutationId,this.#n=t.mutationCache,this.#t=[],this.state=t.state||f$(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){this.#t.includes(t)||(this.#t.push(t),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){this.#t=this.#t.filter(e=>e!==t),this.scheduleGc(),this.#n.notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){this.#t.length||(this.state.status==="pending"?this.scheduleGc():this.#n.remove(this))}continue(){return this.#r?.continue()??this.execute(this.state.variables)}async execute(t){const e=()=>{this.#o({type:"continue"})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#r=dv({fn:()=>this.options.mutationFn?this.options.mutationFn(t,n):Promise.reject(new Error("No mutationFn found")),onFail:(o,a)=>{this.#o({type:"failed",failureCount:o,error:a})},onPause:()=>{this.#o({type:"pause"})},onContinue:e,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});const r=this.state.status==="pending",i=!this.#r.canStart();try{if(r)e();else{this.#o({type:"pending",variables:t,isPaused:i}),this.#n.config.onMutate&&await this.#n.config.onMutate(t,this,n);const a=await this.options.onMutate?.(t,n);a!==this.state.context&&this.#o({type:"pending",context:a,variables:t,isPaused:i})}const o=await this.#r.start();return await this.#n.config.onSuccess?.(o,t,this.state.context,this,n),await this.options.onSuccess?.(o,t,this.state.context,n),await this.#n.config.onSettled?.(o,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(o,null,t,this.state.context,n),this.#o({type:"success",data:o}),o}catch(o){try{await this.#n.config.onError?.(o,t,this.state.context,this,n)}catch(a){Promise.reject(a)}try{await this.options.onError?.(o,t,this.state.context,n)}catch(a){Promise.reject(a)}try{await this.#n.config.onSettled?.(void 0,o,this.state.variables,this.state.context,this,n)}catch(a){Promise.reject(a)}try{await this.options.onSettled?.(void 0,o,t,this.state.context,n)}catch(a){Promise.reject(a)}throw this.#o({type:"error",error:o}),o}finally{this.#n.runNext(this)}}#o(t){const e=n=>{switch(t.type){case"failed":return{...n,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...n,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:t.error,failureCount:n.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=e(this.state),Ft.batch(()=>{this.#t.forEach(n=>{n.onMutationUpdate(t)}),this.#n.notify({mutation:this,type:"updated",action:t})})}};function f$(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var pv=class extends Ua{constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}#e;#t;#n;build(e,n,r){const i=new d$({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(n),state:r});return this.add(i),i}add(e){this.#e.add(e);const n=$o(e);if(typeof n=="string"){const r=this.#t.get(n);r?r.push(e):this.#t.set(n,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#e.delete(e)){const n=$o(e);if(typeof n=="string"){const r=this.#t.get(n);if(r)if(r.length>1){const i=r.indexOf(e);i!==-1&&r.splice(i,1)}else r[0]===e&&this.#t.delete(n)}}this.notify({type:"removed",mutation:e})}canRun(e){const n=$o(e);if(typeof n=="string"){const i=this.#t.get(n)?.find(o=>o.state.status==="pending");return!i||i===e}else return!0}runNext(e){const n=$o(e);return typeof n=="string"?this.#t.get(n)?.find(i=>i!==e&&i.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){Ft.batch(()=>{this.#e.forEach(e=>{this.notify({type:"removed",mutation:e})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(e){const n={exact:!0,...e};return this.getAll().find(r=>bf(n,r))}findAll(e={}){return this.getAll().filter(n=>bf(e,n))}notify(e){Ft.batch(()=>{this.listeners.forEach(n=>{n(e)})})}resumePausedMutations(){const e=this.getAll().filter(n=>n.state.isPaused);return Ft.batch(()=>Promise.all(e.map(n=>n.continue().catch(yn))))}};function $o(t){return t.options.scope?.id}var hv=class extends Ua{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,n,r){const i=n.queryKey,o=n.queryHash??zc(i,n);let a=this.get(o);return a||(a=new c$({client:e,queryKey:i,queryHash:o,options:e.defaultQueryOptions(n),state:r,defaultOptions:e.getQueryDefaults(i)}),this.add(a)),a}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const n=this.#e.get(e.queryHash);n&&(e.destroy(),n===e&&this.#e.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){Ft.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){const n={exact:!0,...e};return this.getAll().find(r=>yf(n,r))}findAll(e={}){const n=this.getAll();return Object.keys(e).length>0?n.filter(r=>yf(e,r)):n}notify(e){Ft.batch(()=>{this.listeners.forEach(n=>{n(e)})})}onFocus(){Ft.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){Ft.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},p$=class{#e;#t;#n;#r;#o;#i;#s;#a;constructor(e={}){this.#e=e.queryCache||new hv,this.#t=e.mutationCache||new pv,this.#n=e.defaultOptions||{},this.#r=new Map,this.#o=new Map,this.#i=0}mount(){this.#i++,this.#i===1&&(this.#s=av.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#a=ma.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#i--,this.#i===0&&(this.#s?.(),this.#s=void 0,this.#a?.(),this.#a=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#t.findAll({...e,status:"pending"}).length}getQueryData(e){const n=this.defaultQueryOptions({queryKey:e});return this.#e.get(n.queryHash)?.state.data}ensureQueryData(e){const n=this.defaultQueryOptions(e),r=this.#e.build(this,n),i=r.state.data;return i===void 0?this.fetchQuery(e):(e.revalidateIfStale&&r.isStaleByTime(jl(n.staleTime,r))&&this.prefetchQuery(n),Promise.resolve(i))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:n,state:r})=>{const i=r.data;return[n,i]})}setQueryData(e,n,r){const i=this.defaultQueryOptions({queryKey:e}),a=this.#e.get(i.queryHash)?.state.data,s=WA(n,a);if(s!==void 0)return this.#e.build(this,i).setData(s,{...r,manual:!0})}setQueriesData(e,n,r){return Ft.batch(()=>this.#e.findAll(e).map(({queryKey:i})=>[i,this.setQueryData(i,n,r)]))}getQueryState(e){const n=this.defaultQueryOptions({queryKey:e});return this.#e.get(n.queryHash)?.state}removeQueries(e){const n=this.#e;Ft.batch(()=>{n.findAll(e).forEach(r=>{n.remove(r)})})}resetQueries(e,n){const r=this.#e;return Ft.batch(()=>(r.findAll(e).forEach(i=>{i.reset()}),this.refetchQueries({type:"active",...e},n)))}cancelQueries(e,n={}){const r={revert:!0,...n},i=Ft.batch(()=>this.#e.findAll(e).map(o=>o.cancel(r)));return Promise.all(i).then(yn).catch(yn)}invalidateQueries(e,n={}){return Ft.batch(()=>(this.#e.findAll(e).forEach(r=>{r.invalidate()}),e?.refetchType==="none"?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},n)))}refetchQueries(e,n={}){const r={...n,cancelRefetch:n.cancelRefetch??!0},i=Ft.batch(()=>this.#e.findAll(e).filter(o=>!o.isDisabled()&&!o.isStatic()).map(o=>{let a=o.fetch(void 0,r);return r.throwOnError||(a=a.catch(yn)),o.state.fetchStatus==="paused"?Promise.resolve():a}));return Promise.all(i).then(yn)}fetchQuery(e){const n=this.defaultQueryOptions(e);n.retry===void 0&&(n.retry=!1);const r=this.#e.build(this,n);return r.isStaleByTime(jl(n.staleTime,r))?r.fetch(n):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(yn).catch(yn)}fetchInfiniteQuery(e){return e._type="infinite",this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(yn).catch(yn)}ensureInfiniteQueryData(e){return e._type="infinite",this.ensureQueryData(e)}resumePausedMutations(){return ma.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,n){this.#r.set(Vi(e),{queryKey:e,defaultOptions:n})}getQueryDefaults(e){const n=[...this.#r.values()],r={};return n.forEach(i=>{zi(e,i.queryKey)&&Object.assign(r,i.defaultOptions)}),r}setMutationDefaults(e,n){this.#o.set(Vi(e),{mutationKey:e,defaultOptions:n})}getMutationDefaults(e){const n=[...this.#o.values()],r={};return n.forEach(i=>{zi(e,i.mutationKey)&&Object.assign(r,i.defaultOptions)}),r}defaultQueryOptions(e){if(e._defaulted)return e;const n={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return n.queryHash||(n.queryHash=zc(n.queryKey,n)),n.refetchOnReconnect===void 0&&(n.refetchOnReconnect=n.networkMode!=="always"),n.throwOnError===void 0&&(n.throwOnError=!!n.suspense),!n.networkMode&&n.persister&&(n.networkMode="offlineFirst"),n.queryFn===Nc&&(n.enabled=!1),n}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}};function Nl(t,e,n="",r=0){if(e){const i=e(t,n,r);if(i===void 0&&xa(t)||i!==void 0)return i}if(Array.isArray(t))return t.map((i,o)=>Nl(i,e,String(o),r+1));if(typeof t=="object"&&m$(t)){const i=Object.entries(t).map(([o,a])=>[o,Nl(a,e,o,r+1)]);return Object.fromEntries(i)}return t}function h$(t,e){return Nl(t,e)}function Ke(t,e=!1){return h$(t,(n,r,i)=>{if(i===1&&r==="queryKey")return Ke(n,!0);if(e&&v$(n))return Ke(n(),e);if(xa(n))return Ke(g(n),e)})}function m$(t){if(Object.prototype.toString.call(t)!=="[object Object]")return!1;const e=Object.getPrototypeOf(t);return e===null||e===Object.prototype}function v$(t){return typeof t=="function"}var g$=class extends hv{find(t){return super.find(Ke(t))}findAll(t={}){return super.findAll(Ke(t))}},_$=class extends pv{find(t){return super.find(Ke(t))}findAll(t={}){return super.findAll(Ke(t))}},y$=class extends p${constructor(t={}){const e={defaultOptions:t.defaultOptions,queryCache:t.queryCache||new g$,mutationCache:t.mutationCache||new _$};super(e),this.isRestoring=K(!1)}isFetching(t={}){return super.isFetching(Ke(t))}isMutating(t={}){return super.isMutating(Ke(t))}getQueryData(t){return super.getQueryData(Ke(t))}ensureQueryData(t){return super.ensureQueryData(Ke(t))}getQueriesData(t){return super.getQueriesData(Ke(t))}setQueryData(t,e,n={}){return super.setQueryData(Ke(t),e,Ke(n))}setQueriesData(t,e,n={}){return super.setQueriesData(Ke(t),e,Ke(n))}getQueryState(t){return super.getQueryState(Ke(t))}removeQueries(t={}){return super.removeQueries(Ke(t))}resetQueries(t={},e={}){return super.resetQueries(Ke(t),Ke(e))}cancelQueries(t={},e={}){return super.cancelQueries(Ke(t),Ke(e))}invalidateQueries(t={},e={}){const n=Ke(t),r=Ke(e);if(super.invalidateQueries({...n,refetchType:"none"},r),n.refetchType==="none")return Promise.resolve();const i={...n,type:n.refetchType??n.type??"active"};return Xe().then(()=>super.refetchQueries(i,r))}refetchQueries(t={},e={}){return super.refetchQueries(Ke(t),Ke(e))}fetchQuery(t){return super.fetchQuery(Ke(t))}prefetchQuery(t){return super.prefetchQuery(Ke(t))}fetchInfiniteQuery(t){return super.fetchInfiniteQuery(Ke(t))}prefetchInfiniteQuery(t){return super.prefetchInfiniteQuery(Ke(t))}setDefaultOptions(t){super.setDefaultOptions(Ke(t))}setQueryDefaults(t,e){super.setQueryDefaults(Ke(t),Ke(e))}getQueryDefaults(t){return super.getQueryDefaults(Ke(t))}setMutationDefaults(t,e){super.setMutationDefaults(Ke(t),Ke(e))}getMutationDefaults(t){return super.getMutationDefaults(Ke(t))}};class Ul extends Error{cause;isNetworkError;request;constructor(e,n=null){super("This looks like a network error, the endpoint might be blocked by an internet provider or a firewall."),this.cause=e,this.isNetworkError=!0,this.request=n}}class b${#e;#t=!1;#n;#r;constructor(e,n){this.#r=e,this.#n=()=>n(e)}progress(){this.#t||this.#r>0&&(clearTimeout(this.#e),this.#e=setTimeout(this.#n,this.#r))}done(){this.#t||(clearTimeout(this.#e),this.#e=void 0,this.#t=!0)}}const Ro=()=>{};function w$(t,e={}){const{body:n=null,headers:r={},method:i="GET",onBeforeRequest:o=Ro,onUploadProgress:a=Ro,shouldRetry:s=()=>!0,onAfterResponse:l=Ro,onTimeout:u=Ro,responseType:c,retries:d=3,signal:f=null,timeout:m=3e4,withCredentials:p=!1}=e,h=S=>.3*2**(S-1)*1e3,v=new b$(m,u);function C(S=0){return new Promise(async(w,y)=>{const E=new XMLHttpRequest,T=O=>{s(E)&&S<d?setTimeout(()=>{C(S+1).then(w,y)},h(S)):(v.done(),y(O))};E.open(i,t,!0),E.withCredentials=p,c&&(E.responseType=c),E.onload=async()=>{try{await l(E,S)}catch(O){O.request=E,T(O);return}E.status>=200&&E.status<300?(v.done(),w(E)):s(E)&&S<d?setTimeout(()=>{C(S+1).then(w,y)},h(S)):(v.done(),y(new Ul(E.statusText,E)))},E.onerror=()=>T(new Ul(E.statusText,E)),E.upload.onprogress=O=>{v.progress(),a(O)},r&&Object.keys(r).forEach(O=>{E.setRequestHeader(O,r[O])});function A(){E.abort(),y(new DOMException("Aborted","AbortError"))}if(f?.addEventListener("abort",A),f?.aborted){A();return}await o(E,S),E.send(n)})}return C()}const S$=t=>"error"in t&&!!t.error,C$=t=>t.progress.uploadComplete;function E$(t){return t.filter(e=>!S$(e)&&!C$(e))}function T$(t){return t.filter(e=>!e.progress?.uploadStarted||!e.isRestored)}function mv(t){const e=t.lastIndexOf(".");return e===-1||e===t.length-1?{name:t,extension:void 0}:{name:t.slice(0,e),extension:t.slice(e+1)}}const xf={__proto__:null,md:"text/markdown",markdown:"text/markdown",mp4:"video/mp4",mp3:"audio/mp3",svg:"image/svg+xml",jpg:"image/jpeg",png:"image/png",webp:"image/webp",gif:"image/gif",heic:"image/heic",heif:"image/heif",yaml:"text/yaml",yml:"text/yaml",csv:"text/csv",tsv:"text/tab-separated-values",tab:"text/tab-separated-values",avi:"video/x-msvideo",mks:"video/x-matroska",mkv:"video/x-matroska",mov:"video/quicktime",dicom:"application/dicom",doc:"application/msword",msg:"application/vnd.ms-outlook",docm:"application/vnd.ms-word.document.macroenabled.12",docx:"application/vnd.openxmlformats-officedocument.wordprocessingml.document",dot:"application/msword",dotm:"application/vnd.ms-word.template.macroenabled.12",dotx:"application/vnd.openxmlformats-officedocument.wordprocessingml.template",xla:"application/vnd.ms-excel",xlam:"application/vnd.ms-excel.addin.macroenabled.12",xlc:"application/vnd.ms-excel",xlf:"application/x-xliff+xml",xlm:"application/vnd.ms-excel",xls:"application/vnd.ms-excel",xlsb:"application/vnd.ms-excel.sheet.binary.macroenabled.12",xlsm:"application/vnd.ms-excel.sheet.macroenabled.12",xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",xlt:"application/vnd.ms-excel",xltm:"application/vnd.ms-excel.template.macroenabled.12",xltx:"application/vnd.openxmlformats-officedocument.spreadsheetml.template",xlw:"application/vnd.ms-excel",txt:"text/plain",text:"text/plain",conf:"text/plain",log:"text/plain",pdf:"application/pdf",zip:"application/zip","7z":"application/x-7z-compressed",rar:"application/x-rar-compressed",tar:"application/x-tar",gz:"application/gzip",dmg:"application/x-apple-diskimage"};function vv(t){if(t.type)return t.type;const e=t.name?mv(t.name).extension?.toLowerCase():null;return e&&e in xf?xf[e]:"application/octet-stream"}function x$(t){return t.charCodeAt(0).toString(32)}function Of(t){let e="";return t.replace(/[^A-Z0-9]/gi,n=>(e+=`-${x$(n)}`,"/"))+e}function O$(t,e){let n=e||"uppy";return typeof t.name=="string"&&(n+=`-${Of(t.name.toLowerCase())}`),t.type!==void 0&&(n+=`-${t.type}`),t.meta&&typeof t.meta.relativePath=="string"&&(n+=`-${Of(t.meta.relativePath.toLowerCase())}`),t.data?.size!==void 0&&(n+=`-${t.data.size}`),t.data.lastModified!==void 0&&(n+=`-${t.data.lastModified}`),n}function A$(t){return!t.isRemote||!t.remote?!1:new Set(["box","dropbox","drive","facebook","unsplash"]).has(t.remote.provider)}function $$(t,e){if(A$(t))return t.id;const n=vv(t);return O$({...t,type:n},e)}function Af(t,e){return t===!0?Object.keys(e):Array.isArray(t)?t:[]}function Os(t){return t<10?`0${t}`:t.toString()}function Jo(){const t=new Date,e=Os(t.getHours()),n=Os(t.getMinutes()),r=Os(t.getSeconds());return`${e}:${n}:${r}`}function R$(t){return t?t.readyState===4&&t.status===0:!1}class P${#e=[];#t=0;#n;#r=!1;constructor(e){const n=e?.concurrency;this.#n=typeof n!="number"||n===0?1/0:n}add(e){const n=new AbortController;let r,i;const o=new Promise((s,l)=>{r=s,i=l}),a={run:()=>e(n.signal),resolve:r,reject:i,controller:n};return n.signal.addEventListener("abort",()=>{const s=this.#e.indexOf(a);s!==-1&&(this.#e.splice(s,1),i(n.signal.reason??new DOMException("Aborted","AbortError")))},{once:!0}),o.abort=s=>{n.abort(s??new DOMException("Aborted","AbortError"))},o.abortOn=s=>{if(s){const l=()=>o.abort(s.reason);s.addEventListener("abort",l,{once:!0}),o.then(()=>s.removeEventListener("abort",l),()=>s.removeEventListener("abort",l))}return o},!this.#r&&this.#t<this.#n?this.#o(a):this.#e.push(a),o}#o(e){if(this.#t++,e.controller.signal.aborted){this.#t--,e.reject(e.controller.signal.reason??new DOMException("Aborted","AbortError")),this.#i();return}let n;try{n=e.run()}catch(r){n=Promise.reject(r)}n.then(r=>{e.controller.signal.aborted?e.reject(e.controller.signal.reason??new DOMException("Aborted","AbortError")):e.resolve(r)},r=>{e.reject(r)}).finally(()=>{this.#t--,this.#i()})}#i(){queueMicrotask(()=>{if(!(this.#r||this.#t>=this.#n))for(;this.#e.length>0;){const e=this.#e.shift();if(!e.controller.signal.aborted){this.#o(e);return}}})}pause(){this.#r=!0}resume(){this.#r=!1;const e=this.#n-this.#t;for(let n=0;n<e;n++)this.#i()}clear(e){const n=this.#e.splice(0),r=e??new DOMException("Cleared","AbortError");for(const i of n)i.controller.abort(r),i.reject(r)}get concurrency(){return this.#n}set concurrency(e){if(this.#n=typeof e!="number"||e===0?1/0:e,!this.#r){const n=this.#n-this.#t;for(let r=0;r<n;r++)this.#i()}}get pending(){return this.#e.length}get running(){return this.#t}get isPaused(){return this.#r}wrapPromiseFunction(e){return(...n)=>this.add(r=>e(...n))}}function k$(t,e,n){const r=[];return t.forEach(i=>typeof i!="string"?r.push(i):e[Symbol.split](i).forEach((o,a,s)=>{o!==""&&r.push(o),a<s.length-1&&r.push(n)})),r}function $f(t,e){const n=/\$/g,r="$$$$";let i=[t];if(e==null)return i;for(const o of Object.keys(e))if(o!=="_"){let a=e[o];typeof a=="string"&&(a=n[Symbol.replace](a,r)),i=k$(i,new RegExp(`%\\{${o}\\}`,"g"),a)}return i}const I$=t=>{throw new Error(`missing string: ${t}`)};class gv{locale;constructor(e,{onMissingKey:n=I$}={}){this.locale={strings:{},pluralize(r){return r===1?0:1}},Array.isArray(e)?e.forEach(this.#t,this):this.#t(e),this.#e=n}#e;#t(e){if(!e?.strings)return;const n=this.locale;Object.assign(this.locale,{strings:{...n.strings,...e.strings},pluralize:e.pluralize||n.pluralize})}translate(e,n){return this.translateArray(e,n).join("")}translateArray(e,n){let r=this.locale.strings[e];if(r==null&&(this.#e(e),r=e),typeof r=="object"){if(n&&typeof n.smart_count<"u"){const o=this.locale.pluralize(n.smart_count);return $f(r[o],n)}throw new Error("Attempted to use a string with plural forms, but no value was given for %{smart_count}")}if(typeof r!="string")throw new Error("string was not a string");return $f(r,n)}}class M${uppy;opts;id;defaultLocale;i18n;i18nArray;type;VERSION;constructor(e,n){this.uppy=e,this.opts=n??{}}getPluginState(){const{plugins:e}=this.uppy.getState();return e?.[this.id]||{}}setPluginState(e){const{plugins:n}=this.uppy.getState();this.uppy.setState({plugins:{...n,[this.id]:{...n[this.id],...e}}})}setOptions(e){this.opts={...this.opts,...e},this.setPluginState(void 0),this.i18nInit()}i18nInit(){const e=new gv([this.defaultLocale,this.uppy.locale,this.opts.locale]);this.i18n=e.translate.bind(e),this.i18nArray=e.translateArray.bind(e),this.setPluginState(void 0)}addTarget(e){throw new Error("Extend the addTarget method to add your plugin to another plugin's target")}install(){}uninstall(){}update(e){}afterUpdate(){}}class F${#e;#t=[];constructor(e){this.#e=e}on(e,n){return this.#t.push([e,n]),this.#e.on(e,n)}remove(){for(const[e,n]of this.#t.splice(0))this.#e.off(e,n)}onFilePause(e,n){this.on("upload-pause",(r,i)=>{e===r?.id&&n(i)})}onFileRemove(e,n){this.on("file-removed",r=>{e===r.id&&n(r.id)})}onPause(e,n){this.on("upload-pause",(r,i)=>{e===r?.id&&n(i)})}onRetry(e,n){this.on("upload-retry",r=>{e===r?.id&&n()})}onRetryAll(e,n){this.on("retry-all",()=>{this.#e.getFile(e)&&n()})}onPauseAll(e,n){this.on("pause-all",()=>{this.#e.getFile(e)&&n()})}onCancelAll(e,n){this.on("cancel-all",(...r)=>{this.#e.getFile(e)&&n(...r)})}onResumeAll(e,n){this.on("resume-all",()=>{this.#e.getFile(e)&&n()})}}const D$={debug:()=>{},warn:()=>{},error:(...t)=>console.error(`[Uppy] [${Jo()}]`,...t)},L$={debug:(...t)=>console.debug(`[Uppy] [${Jo()}]`,...t),warn:(...t)=>console.warn(`[Uppy] [${Jo()}]`,...t),error:(...t)=>console.error(`[Uppy] [${Jo()}]`,...t)};var As,Rf;function j$(){return Rf||(Rf=1,As=function(e){if(typeof e!="number"||Number.isNaN(e))throw new TypeError(`Expected a number, got ${typeof e}`);const n=e<0;let r=Math.abs(e);if(n&&(r=-r),r===0)return"0 B";const i=["B","KB","MB","GB","TB","PB","EB","ZB","YB"],o=Math.min(Math.floor(Math.log(r)/Math.log(1024)),i.length-1),a=Number(r/1024**o),s=i[o];return`${a>=10||a%1===0?Math.round(a):a.toFixed(1)} ${s}`}),As}var V$=j$();const Po=jr(V$);var $s,Pf;function z$(){if(Pf)return $s;Pf=1;function t(e,n){this.text=e=e||"",this.hasWild=~e.indexOf("*"),this.separator=n,this.parts=e.split(n)}return t.prototype.match=function(e){var n=!0,r=this.parts,i,o=r.length,a;if(typeof e=="string"||e instanceof String)if(!this.hasWild&&this.text!=e)n=!1;else{for(a=(e||"").split(this.separator),i=0;n&&i<o;i++)r[i]!=="*"&&(i<a.length?n=r[i]===a[i]:n=!1);n=n&&a}else if(typeof e.splice=="function")for(n=[],i=e.length;i--;)this.match(e[i])&&(n[n.length]=e[i]);else if(typeof e=="object"){n={};for(var s in e)this.match(s)&&(n[s]=e[s])}return n},$s=function(e,n,r){var i=new t(e,r||/[\/\.]/);return typeof n<"u"?i.match(n):i},$s}var Rs,kf;function N$(){if(kf)return Rs;kf=1;var t=z$(),e=/[\/\+\.]/;return Rs=function(n,r){function i(o){var a=t(o,n,e);return a&&a.length>=2}return r?i(r.split(";")[0]):i},Rs}var U$=N$();const B$=jr(U$),H$={maxFileSize:null,minFileSize:null,maxTotalFileSize:null,maxNumberOfFiles:null,minNumberOfFiles:null,allowedFileTypes:null,requiredMetaFields:[]};class bn extends Error{isUserFacing;file;constructor(e,n){super(e),this.isUserFacing=n?.isUserFacing??!0,n?.file&&(this.file=n.file)}isRestriction=!0}class q${getI18n;getOpts;constructor(e,n){this.getI18n=n,this.getOpts=()=>{const r=e();if(r.restrictions?.allowedFileTypes!=null&&!Array.isArray(r.restrictions.allowedFileTypes))throw new TypeError("`restrictions.allowedFileTypes` must be an array");return r}}validateAggregateRestrictions(e,n){const{maxTotalFileSize:r,maxNumberOfFiles:i}=this.getOpts().restrictions;if(i&&e.filter(a=>!a.isGhost).length+n.length>i)throw new bn(`${this.getI18n()("youCanOnlyUploadX",{smart_count:i})}`);if(r){const o=[...e,...n].reduce((a,s)=>a+(s.size??0),0);if(o>r)throw new bn(this.getI18n()("aggregateExceedsSize",{sizeAllowed:Po(r),size:Po(o)}))}}validateSingleFile(e){const{maxFileSize:n,minFileSize:r,allowedFileTypes:i}=this.getOpts().restrictions;if(i&&!i.some(a=>a.includes("/")?e.type?B$(e.type.replace(/;.*?$/,""),a):!1:a[0]==="."&&e.extension?e.extension.toLowerCase()===a.slice(1).toLowerCase():!1)){const a=i.join(", ");throw new bn(this.getI18n()("youCanOnlyUploadFileTypes",{types:a}),{file:e})}if(n&&e.size!=null&&e.size>n)throw new bn(this.getI18n()("exceedsSize",{size:Po(n),file:e.name??this.getI18n()("unnamed")}),{file:e});if(r&&e.size!=null&&e.size<r)throw new bn(this.getI18n()("inferiorSize",{size:Po(r)}),{file:e})}validate(e,n){n.forEach(r=>{this.validateSingleFile(r)}),this.validateAggregateRestrictions(e,n)}validateMinNumberOfFiles(e){const{minNumberOfFiles:n}=this.getOpts().restrictions;if(n&&Object.keys(e).length<n)throw new bn(this.getI18n()("youHaveToAtLeastSelectX",{smart_count:n}))}getMissingRequiredMetaFields(e){const n=new bn(this.getI18n()("missingRequiredMetaFieldOnFile",{fileName:e.name??this.getI18n()("unnamed")})),{requiredMetaFields:r}=this.getOpts().restrictions,i=[];for(const o of r)(!Object.hasOwn(e.meta,o)||e.meta[o]==="")&&i.push(o);return{missingFields:i,error:n}}}const W$="5.0.0",K$={version:W$};class Y${static VERSION=K$.version;state={};#e=new Set;getState(){return this.state}setState(e){const n={...this.state},r={...this.state,...e};this.state=r,this.#t(n,r,e)}subscribe(e){return this.#e.add(e),()=>{this.#e.delete(e)}}#t(...e){this.#e.forEach(n=>{n(...e)})}}var Ps,If;function Uc(){if(If)return Ps;If=1;function t(e){var n=typeof e;return e!=null&&(n=="object"||n=="function")}return Ps=t,Ps}var ks,Mf;function G$(){if(Mf)return ks;Mf=1;var t=typeof _o=="object"&&_o&&_o.Object===Object&&_o;return ks=t,ks}var Is,Ff;function _v(){if(Ff)return Is;Ff=1;var t=G$(),e=typeof self=="object"&&self&&self.Object===Object&&self,n=t||e||Function("return this")();return Is=n,Is}var Ms,Df;function Q$(){if(Df)return Ms;Df=1;var t=_v(),e=function(){return t.Date.now()};return Ms=e,Ms}var Fs,Lf;function X$(){if(Lf)return Fs;Lf=1;var t=/\s/;function e(n){for(var r=n.length;r--&&t.test(n.charAt(r)););return r}return Fs=e,Fs}var Ds,jf;function J$(){if(jf)return Ds;jf=1;var t=X$(),e=/^\s+/;function n(r){return r&&r.slice(0,t(r)+1).replace(e,"")}return Ds=n,Ds}var Ls,Vf;function yv(){if(Vf)return Ls;Vf=1;var t=_v(),e=t.Symbol;return Ls=e,Ls}var js,zf;function Z$(){if(zf)return js;zf=1;var t=yv(),e=Object.prototype,n=e.hasOwnProperty,r=e.toString,i=t?t.toStringTag:void 0;function o(a){var s=n.call(a,i),l=a[i];try{a[i]=void 0;var u=!0}catch{}var c=r.call(a);return u&&(s?a[i]=l:delete a[i]),c}return js=o,js}var Vs,Nf;function eR(){if(Nf)return Vs;Nf=1;var t=Object.prototype,e=t.toString;function n(r){return e.call(r)}return Vs=n,Vs}var zs,Uf;function tR(){if(Uf)return zs;Uf=1;var t=yv(),e=Z$(),n=eR(),r="[object Null]",i="[object Undefined]",o=t?t.toStringTag:void 0;function a(s){return s==null?s===void 0?i:r:o&&o in Object(s)?e(s):n(s)}return zs=a,zs}var Ns,Bf;function nR(){if(Bf)return Ns;Bf=1;function t(e){return e!=null&&typeof e=="object"}return Ns=t,Ns}var Us,Hf;function rR(){if(Hf)return Us;Hf=1;var t=tR(),e=nR(),n="[object Symbol]";function r(i){return typeof i=="symbol"||e(i)&&t(i)==n}return Us=r,Us}var Bs,qf;function iR(){if(qf)return Bs;qf=1;var t=J$(),e=Uc(),n=rR(),r=NaN,i=/^[-+]0x[0-9a-f]+$/i,o=/^0b[01]+$/i,a=/^0o[0-7]+$/i,s=parseInt;function l(u){if(typeof u=="number")return u;if(n(u))return r;if(e(u)){var c=typeof u.valueOf=="function"?u.valueOf():u;u=e(c)?c+"":c}if(typeof u!="string")return u===0?u:+u;u=t(u);var d=o.test(u);return d||a.test(u)?s(u.slice(2),d?2:8):i.test(u)?r:+u}return Bs=l,Bs}var Hs,Wf;function oR(){if(Wf)return Hs;Wf=1;var t=Uc(),e=Q$(),n=iR(),r="Expected a function",i=Math.max,o=Math.min;function a(s,l,u){var c,d,f,m,p,h,v=0,C=!1,S=!1,w=!0;if(typeof s!="function")throw new TypeError(r);l=n(l)||0,t(u)&&(C=!!u.leading,S="maxWait"in u,f=S?i(n(u.maxWait)||0,l):f,w="trailing"in u?!!u.trailing:w);function y(F){var Y=c,le=d;return c=d=void 0,v=F,m=s.apply(le,Y),m}function E(F){return v=F,p=setTimeout(O,l),C?y(F):m}function T(F){var Y=F-h,le=F-v,de=l-Y;return S?o(de,f-le):de}function A(F){var Y=F-h,le=F-v;return h===void 0||Y>=l||Y<0||S&&le>=f}function O(){var F=e();if(A(F))return q(F);p=setTimeout(O,T(F))}function q(F){return p=void 0,w&&c?y(F):(c=d=void 0,m)}function I(){p!==void 0&&clearTimeout(p),v=0,c=h=d=p=void 0}function P(){return p===void 0?m:q(e())}function z(){var F=e(),Y=A(F);if(c=arguments,d=this,h=F,Y){if(p===void 0)return E(h);if(S)return clearTimeout(p),p=setTimeout(O,l),y(h)}return p===void 0&&(p=setTimeout(O,l)),m}return z.cancel=I,z.flush=P,z}return Hs=a,Hs}var qs,Kf;function aR(){if(Kf)return qs;Kf=1;var t=oR(),e=Uc(),n="Expected a function";function r(i,o,a){var s=!0,l=!0;if(typeof i!="function")throw new TypeError(n);return e(a)&&(s="leading"in a?!!a.leading:s,l="trailing"in a?!!a.trailing:l),t(i,o,{leading:s,maxWait:o,trailing:l})}return qs=r,qs}var sR=aR();const lR=jr(sR);var Ws,Yf;function cR(){return Yf||(Yf=1,Ws=function(){var e={},n=e._fns={};e.emit=function(a,s,l,u,c,d,f){var m=r(a);m.length&&i(a,m,[s,l,u,c,d,f])},e.on=function(a,s){n[a]||(n[a]=[]),n[a].push(s)},e.once=function(a,s){function l(){s.apply(this,arguments),e.off(a,l)}this.on(a,l)},e.off=function(a,s){var l=[];if(a&&s){var u=this._fns[a],c=0,d=u?u.length:0;for(c;c<d;c++)u[c]!==s&&l.push(u[c])}l.length?this._fns[a]=l:delete this._fns[a]};function r(o){var a=n[o]?n[o]:[],s=o.indexOf(":"),l=s===-1?[o]:[o.substring(0,s),o.substring(s+1)],u=Object.keys(n),c=0,d=u.length;for(c;c<d;c++){var f=u[c];if(f==="*"&&(a=a.concat(n[f])),l.length===2&&l[0]===f){a=a.concat(n[f]);break}}return a}function i(o,a,s){var l=0,u=a.length;for(l;l<u&&a[l];l++)a[l].event=o,a[l].apply(a[l],s)}return e}),Ws}var uR=cR();const dR=jr(uR);let fR="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",pR=(t=21)=>{let e="",n=t|0;for(;n--;)e+=fR[Math.random()*64|0];return e};const hR="5.2.0",mR={version:hR};function vR(t,e){return e.name?e.name:t.split("/")[0]==="image"?`${t.split("/")[0]}.${t.split("/")[1]}`:"noname"}const gR={strings:{addBulkFilesFailed:{0:"Failed to add %{smart_count} file due to an internal error",1:"Failed to add %{smart_count} files due to internal errors"},youCanOnlyUploadX:{0:"You can only upload %{smart_count} file",1:"You can only upload %{smart_count} files"},youHaveToAtLeastSelectX:{0:"You have to select at least %{smart_count} file",1:"You have to select at least %{smart_count} files"},aggregateExceedsSize:"You selected %{size} of files, but maximum allowed size is %{sizeAllowed}",exceedsSize:"%{file} exceeds maximum allowed size of %{size}",missingRequiredMetaField:"Missing required meta fields",missingRequiredMetaFieldOnFile:"Missing required meta fields in %{fileName}",inferiorSize:"This file is smaller than the allowed size of %{size}",youCanOnlyUploadFileTypes:"You can only upload: %{types}",noMoreFilesAllowed:"Cannot add more files",noDuplicates:"Cannot add the duplicate file '%{fileName}', it already exists",companionError:"Connection with Companion failed",authAborted:"Authentication aborted",companionUnauthorizeHint:"To unauthorize to your %{provider} account, please go to %{url}",failedToUpload:"Failed to upload %{file}",noInternetConnection:"No Internet connection",connectedToInternet:"Connected to the Internet",noFilesFound:"You have no files or folders here",noSearchResults:"Unfortunately, there are no results for this search",selectX:{0:"Select %{smart_count}",1:"Select %{smart_count}"},allFilesFromFolderNamed:"All files from folder %{name}",openFolderNamed:"Open folder %{name}",cancel:"Cancel",logOut:"Log out",logIn:"Log in",pickFiles:"Pick files",pickPhotos:"Pick photos",filter:"Filter",resetFilter:"Reset filter",loading:"Loading...",loadedXFiles:"Loaded %{numFiles} files",authenticateWithTitle:"Please authenticate with %{pluginName} to select files",authenticateWith:"Connect to %{pluginName}",signInWithGoogle:"Sign in with Google",searchImages:"Search for images",enterTextToSearch:"Enter text to search for images",search:"Search",resetSearch:"Reset search",emptyFolderAdded:"No files were added from empty folder",addedNumFiles:"Added %{numFiles} file(s)",folderAlreadyAdded:'The folder "%{folder}" was already added',folderAdded:{0:"Added %{smart_count} file from %{folder}",1:"Added %{smart_count} files from %{folder}"},additionalRestrictionsFailed:"%{count} additional restrictions were not fulfilled",unnamed:"Unnamed",pleaseWait:"Please wait"}};function _R(t){if(t==null&&typeof navigator<"u"&&(t=navigator.userAgent),!t)return!0;const e=/Edge\/(\d+\.\d+)/.exec(t);if(!e)return!0;const r=e[1].split(".",2),i=parseInt(r[0],10),o=parseInt(r[1],10);return i<15||i===15&&o<15063||i>18||i===18&&o>=18218}const ko={totalProgress:0,allowNewUpload:!0,error:null,recoveredState:null};class Bc{static VERSION=mR.version;#e=Object.create(null);#t;#n;#r=dR();#o=new Set;#i=new Set;#s=new Set;defaultLocale;locale;opts;store;i18n;i18nArray;scheduledAutoProceed=null;wasOffline=!1;constructor(e){this.defaultLocale=gR;const n={id:"uppy",autoProceed:!1,allowMultipleUploadBatches:!0,debug:!1,restrictions:H$,meta:{},onBeforeFileAdded:(i,o)=>!Object.hasOwn(o,i.id),onBeforeUpload:i=>i,store:new Y$,logger:D$,infoTimeout:5e3},r={...n,...e};this.opts={...r,restrictions:{...n.restrictions,...e?.restrictions}},e?.logger&&e.debug?this.log("You are using a custom `logger`, but also set `debug: true`, which uses built-in logger to output logs to console. Ignoring `debug: true` and using your custom `logger`.","warning"):e?.debug&&(this.opts.logger=L$),this.log(`Using Core v${Bc.VERSION}`),this.i18nInit(),this.store=this.opts.store,this.setState({...ko,plugins:{},files:{},currentUploads:{},capabilities:{uploadProgress:_R(),individualCancellation:!0,resumableUploads:!1},meta:{...this.opts.meta},info:[]}),this.#t=new q$(()=>this.opts,()=>this.i18n),this.#n=this.store.subscribe((i,o,a)=>{this.emit("state-update",i,o,a),this.updateAll(o)}),this.opts.debug&&typeof window<"u"&&(window[this.opts.id]=this),this.#T()}emit(e,...n){this.#r.emit(e,...n)}on(e,n){return this.#r.on(e,n),this}once(e,n){return this.#r.once(e,n),this}off(e,n){return this.#r.off(e,n),this}updateAll(e){this.iteratePlugins(n=>{n.update(e)})}setState(e){this.store.setState(e)}getState(){return this.store.getState()}patchFilesState(e){const n=this.getState().files;this.setState({files:{...n,...Object.fromEntries(Object.entries(e).map(([r,i])=>[r,{...n[r],...i}]))}})}setFileState(e,n){if(!this.getState().files[e])throw new Error(`Can’t set state for ${e} (the file could have been removed)`);this.patchFilesState({[e]:n})}i18nInit(){const e=r=>this.log(`Missing i18n string: ${r}`,"error"),n=new gv([this.defaultLocale,this.opts.locale],{onMissingKey:e});this.i18n=n.translate.bind(n),this.i18nArray=n.translateArray.bind(n),this.locale=n.locale}setOptions(e){this.opts={...this.opts,...e,restrictions:{...this.opts.restrictions,...e?.restrictions}},e.meta&&this.setMeta(e.meta),this.i18nInit(),e.locale&&this.iteratePlugins(n=>{n.setOptions(e)}),this.setState(void 0)}resetProgress(){const e={percentage:0,bytesUploaded:!1,uploadComplete:!1,uploadStarted:null},n={...this.getState().files},r=Object.create(null);Object.keys(n).forEach(i=>{r[i]={...n[i],progress:{...n[i].progress,...e},tus:void 0,transloadit:void 0}}),this.setState({files:r,...ko})}clear(){const{capabilities:e,currentUploads:n}=this.getState();if(Object.keys(n).length>0&&!e.individualCancellation)throw new Error("The installed uploader plugin does not allow removing files during an upload.");this.setState({...ko,files:{}})}addPreProcessor(e){this.#o.add(e)}removePreProcessor(e){return this.#o.delete(e)}addPostProcessor(e){this.#s.add(e)}removePostProcessor(e){return this.#s.delete(e)}addUploader(e){this.#i.add(e)}removeUploader(e){return this.#i.delete(e)}setMeta(e){const n={...this.getState().meta,...e},r={...this.getState().files};Object.keys(r).forEach(i=>{r[i]={...r[i],meta:{...r[i].meta,...e}}}),this.log("Adding metadata:"),this.log(e),this.setState({meta:n,files:r})}setFileMeta(e,n){const r={...this.getState().files};if(!r[e]){this.log(`Was trying to set metadata for a file that has been removed: ${e}`);return}const i={...r[e].meta,...n};r[e]={...r[e],meta:i},this.setState({files:r})}getFile(e){return this.getState().files[e]}getFiles(){const{files:e}=this.getState();return Object.values(e)}getFilesByIds(e){return e.map(n=>this.getFile(n))}getObjectOfFilesPerState(){const{files:e,totalProgress:n,error:r}=this.getState(),i=Object.values(e),o=[],a=[],s=[],l=[],u=[],c=[],d=[],f=[],m=[];for(const p of i){const{progress:h}=p;!h.uploadComplete&&h.uploadStarted&&(o.push(p),p.isPaused||f.push(p)),h.uploadStarted||a.push(p),(h.uploadStarted||h.preprocess||h.postprocess)&&s.push(p),h.uploadStarted&&l.push(p),p.isPaused&&u.push(p),h.uploadComplete&&c.push(p),p.error&&d.push(p),(h.preprocess||h.postprocess)&&m.push(p)}return{newFiles:a,startedFiles:s,uploadStartedFiles:l,pausedFiles:u,completeFiles:c,erroredFiles:d,inProgressFiles:o,inProgressNotPausedFiles:f,processingFiles:m,isUploadStarted:l.length>0,isAllComplete:n===100&&c.length===i.length&&m.length===0,isAllErrored:!!r&&d.length===i.length,isAllPaused:o.length!==0&&u.length===o.length,isUploadInProgress:o.length>0,isSomeGhost:i.some(p=>p.isGhost)}}#a(e){for(const a of e)a.isRestriction?this.emit("restriction-failed",a.file,a):this.emit("error",a,a.file),this.log(a,"warning");const n=e.filter(a=>a.isUserFacing),r=4,i=n.slice(0,r),o=n.slice(r);i.forEach(({message:a,details:s=""})=>{this.info({message:a,details:s},"error",this.opts.infoTimeout)}),o.length>0&&this.info({message:this.i18n("additionalRestrictionsFailed",{count:o.length})})}validateRestrictions(e,n=this.getFiles()){try{this.#t.validate(n,[e])}catch(r){return r}return null}validateSingleFile(e){try{this.#t.validateSingleFile(e)}catch(n){return n.message}return null}validateAggregateRestrictions(e){const n=this.getFiles();try{this.#t.validateAggregateRestrictions(n,e)}catch(r){return r.message}return null}#u(e){const{missingFields:n,error:r}=this.#t.getMissingRequiredMetaFields(e);return n.length>0?(this.setFileState(e.id,{missingRequiredMetaFields:n,error:r.message}),this.log(r.message),this.emit("restriction-failed",e,r),!1):(n.length===0&&e.missingRequiredMetaFields&&this.setFileState(e.id,{missingRequiredMetaFields:[]}),!0)}#l(e){let n=!0;for(const r of Object.values(e))this.#u(r)||(n=!1);return n}#w(e){const{allowNewUpload:n}=this.getState();if(n===!1){const r=new bn(this.i18n("noMoreFilesAllowed"),{file:e});throw this.#a([r]),r}}checkIfFileAlreadyExists(e){const{files:n}=this.getState();return!!(n[e]&&!n[e].isGhost)}#S(e){const n=e instanceof File?{name:e.name,type:e.type,size:e.size,data:e,meta:{},isRemote:!1,source:void 0,preview:void 0}:e,r=vv(n),i=vR(r,n),o=mv(i).extension,a=$$(n,this.getID()),s={...n.meta,name:i,type:r},l=Number.isFinite(n.data.size)?n.data.size:null;return{source:n.source||"",id:a,name:i,extension:o||"",meta:{...this.getState().meta,...s},type:r,progress:{percentage:0,bytesUploaded:!1,bytesTotal:l,uploadComplete:!1,uploadStarted:null},size:l,isGhost:!1,...n.isRemote?{isRemote:!0,remote:n.remote,data:n.data}:{isRemote:!1,data:n.data},preview:n.preview}}#h(){this.opts.autoProceed&&!this.scheduledAutoProceed&&(this.scheduledAutoProceed=setTimeout(()=>{this.scheduledAutoProceed=null,this.upload().catch(e=>{e.isRestriction||this.log(e.stack||e.message||e)})},4))}#m(e){let{files:n}=this.getState(),r={...n};const i=[],o=[];for(const a of e)try{let s=this.#S(a);this.#w(s);const l=n[s.id],u=l?.isGhost;if(u&&!s.isRemote){if(s.data==null)throw new Error("File data is missing");s={...l,isGhost:!1,data:s.data},this.log(`Replaced the blob in the restored ghost file: ${s.name}, ${s.id}`)}const c=this.opts.onBeforeFileAdded(s,r);if(n=this.getState().files,r={...n,...r},!c&&this.checkIfFileAlreadyExists(s.id))throw new bn(this.i18n("noDuplicates",{fileName:s.name??this.i18n("unnamed")}),{file:s});if(c===!1&&!u)throw new bn("Cannot add the file because onBeforeFileAdded returned false.",{isUserFacing:!1,file:s});typeof c=="object"&&c!==null&&(s=c),this.#t.validateSingleFile(s),r[s.id]=s,i.push(s)}catch(s){o.push(s)}try{this.#t.validateAggregateRestrictions(Object.values(n),i)}catch(a){return o.push(a),{nextFilesState:n,validFilesToAdd:[],errors:o}}return{nextFilesState:r,validFilesToAdd:i,errors:o}}addFile(e){const{nextFilesState:n,validFilesToAdd:r,errors:i}=this.#m([e]),o=i.filter(s=>s.isRestriction);if(this.#a(o),i.length>0)throw i[0];this.setState({files:n});const[a]=r;return this.emit("file-added",a),this.emit("files-added",r),this.log(`Added file: ${a.name}, ${a.id}, mime type: ${a.type}`),this.#h(),a.id}addFiles(e){const{nextFilesState:n,validFilesToAdd:r,errors:i}=this.#m(e),o=i.filter(s=>s.isRestriction);this.#a(o);const a=i.filter(s=>!s.isRestriction);if(a.length>0){let s=`Multiple errors occurred while adding files:
19
+ `;if(a.forEach(l=>{s+=`
20
+ * ${l.message}`}),this.info({message:this.i18n("addBulkFilesFailed",{smart_count:a.length}),details:s},"error",this.opts.infoTimeout),typeof AggregateError=="function")throw new AggregateError(a,s);{const l=new Error(s);throw l.errors=a,l}}this.setState({files:n}),r.forEach(s=>{this.emit("file-added",s)}),this.emit("files-added",r),r.length>5?this.log(`Added batch of ${r.length} files`):Object.values(r).forEach(s=>{this.log(`Added file: ${s.name}
21
+ id: ${s.id}
22
+ type: ${s.type}`)}),r.length>0&&this.#h()}removeFiles(e){const{files:n,currentUploads:r}=this.getState(),i={...n},o={...r},a=Object.create(null);e.forEach(c=>{n[c]&&(a[c]=n[c],delete i[c])});function s(c){return a[c]===void 0}Object.keys(o).forEach(c=>{const d=r[c].fileIDs.filter(s);if(d.length===0){delete o[c];return}const{capabilities:f}=this.getState();if(d.length!==r[c].fileIDs.length&&!f.individualCancellation)throw new Error("The installed uploader plugin does not allow removing files during an upload.");o[c]={...r[c],fileIDs:d}});const l={currentUploads:o,files:i};Object.keys(i).length===0&&(l.allowNewUpload=!0,l.error=null,l.recoveredState=null),this.setState(l),this.#d();const u=Object.keys(a);u.forEach(c=>{this.emit("file-removed",a[c])}),u.length>5?this.log(`Removed ${u.length} files`):this.log(`Removed files: ${u.join(", ")}`)}removeFile(e){this.removeFiles([e])}pauseResume(e){if(!this.getState().capabilities.resumableUploads||this.getFile(e).progress.uploadComplete)return;const n=this.getFile(e),i=!(n.isPaused||!1);return this.setFileState(e,{isPaused:i}),this.emit("upload-pause",n,i),i}pauseAll(){const e={...this.getState().files};Object.keys(e).filter(r=>!e[r].progress.uploadComplete&&e[r].progress.uploadStarted).forEach(r=>{const i={...e[r],isPaused:!0};e[r]=i}),this.setState({files:e}),this.emit("pause-all")}resumeAll(){const e={...this.getState().files};Object.keys(e).filter(r=>!e[r].progress.uploadComplete&&e[r].progress.uploadStarted).forEach(r=>{const i={...e[r],isPaused:!1,error:null};e[r]=i}),this.setState({files:e}),this.emit("resume-all")}#v(){const{files:e}=this.getState();return Object.keys(e).filter(n=>{const r=e[n];return r.error&&(!r.missingRequiredMetaFields||r.missingRequiredMetaFields.length===0)})}async#g(){const e=this.#v(),n={...this.getState().files};if(e.forEach(i=>{n[i]={...n[i],isPaused:!1,error:null}}),this.setState({files:n,error:null}),this.emit("retry-all",this.getFilesByIds(e)),e.length===0)return{successful:[],failed:[]};const r=this.#f(e,{forceAllowNewUpload:!0});return this.#p(r)}async retryAll(){const e=await this.#g();return this.emit("complete",e),e}cancelAll(){this.emit("cancel-all");const{files:e}=this.getState(),n=Object.keys(e);n.length&&this.removeFiles(n),this.setState(ko)}retryUpload(e){this.setFileState(e,{error:null,isPaused:!1}),this.emit("upload-retry",this.getFile(e));const n=this.#f([e],{forceAllowNewUpload:!0});return this.#p(n)}logout(){this.iteratePlugins(e=>{e.provider?.logout?.()})}#C=(e,n)=>{const r=e?this.getFile(e.id):void 0;if(e==null||!r){this.log(`Not setting progress for a file that has been removed: ${e?.id}`);return}if(r.progress.percentage===100){this.log(`Not setting progress for a file that has been already uploaded: ${e.id}`);return}const i={bytesTotal:n.bytesTotal,percentage:n.bytesTotal!=null&&Number.isFinite(n.bytesTotal)&&n.bytesTotal>0?Math.round(n.bytesUploaded/n.bytesTotal*100):void 0};r.progress.uploadStarted!=null?this.setFileState(e.id,{progress:{...r.progress,...i,bytesUploaded:n.bytesUploaded}}):this.setFileState(e.id,{progress:{...r.progress,...i}}),this.#d()};#_(){const e=this.#E();let n=null;e!=null&&(n=Math.round(e*100),n>100?n=100:n<0&&(n=0)),this.emit("progress",n??0),this.setState({totalProgress:n??0})}#d=lR(()=>this.#_(),500,{leading:!0,trailing:!0});[Symbol.for("uppy test: updateTotalProgress")](){return this.#_()}#E(){const n=this.getFiles().filter(l=>l.progress.uploadStarted||l.progress.preprocess||l.progress.postprocess);if(n.length===0)return 0;if(n.every(l=>l.progress.uploadComplete))return 1;const r=l=>l.progress.bytesTotal!=null&&l.progress.bytesTotal!==0,i=n.filter(r),o=n.filter(l=>!r(l));if(i.every(l=>l.progress.uploadComplete)&&o.length>0&&!o.every(l=>l.progress.uploadComplete))return null;const a=i.reduce((l,u)=>l+(u.progress.bytesTotal??0),0),s=i.reduce((l,u)=>l+(u.progress.bytesUploaded||0),0);return a===0?0:s/a}#T(){const e=(i,o,a)=>{let s=i.message||"Unknown error";i.details&&(s+=` ${i.details}`),this.setState({error:s}),o!=null&&o.id in this.getState().files&&this.setFileState(o.id,{error:s,response:a})};this.on("error",e),this.on("upload-error",(i,o,a)=>{if(e(o,i,a),typeof o=="object"&&o.message){this.log(o.message,"error");const s=new Error(this.i18n("failedToUpload",{file:i?.name??""}));s.isUserFacing=!0,s.details=o.message,o.details&&(s.details+=` ${o.details}`),this.#a([s])}else this.#a([o])});let n=null;this.on("upload-stalled",(i,o)=>{const{message:a}=i,s=o.map(l=>l.meta.name).join(", ");n||(this.info({message:a,details:s},"warning",this.opts.infoTimeout),n=setTimeout(()=>{n=null},this.opts.infoTimeout)),this.log(`${a} ${s}`.trim(),"warning")}),this.on("upload",()=>{this.setState({error:null})});const r=i=>{const o=i.filter(s=>{const l=s!=null&&this.getFile(s.id);return l||this.log(`Not setting progress for a file that has been removed: ${s?.id}`),l}),a=Object.fromEntries(o.map(s=>[s.id,{progress:{uploadStarted:Date.now(),uploadComplete:!1,bytesUploaded:0,bytesTotal:s.size}}]));this.patchFilesState(a)};this.on("upload-start",r),this.on("upload-progress",this.#C),this.on("upload-success",(i,o)=>{if(i==null||!this.getFile(i.id)){this.log(`Not setting progress for a file that has been removed: ${i?.id}`);return}const a=this.getFile(i.id).progress,s=this.#s.size>0;this.setFileState(i.id,{progress:{...a,postprocess:s?{mode:"indeterminate"}:void 0,uploadComplete:!0,...!s&&{complete:!0},percentage:100,bytesUploaded:a.bytesTotal},response:o,uploadURL:o.uploadURL,isPaused:!1}),i.size==null&&this.setFileState(i.id,{size:o.bytesUploaded||a.bytesTotal}),this.#d()}),this.on("preprocess-progress",(i,o)=>{if(i==null||!this.getFile(i.id)){this.log(`Not setting progress for a file that has been removed: ${i?.id}`);return}this.setFileState(i.id,{progress:{...this.getFile(i.id).progress,preprocess:o}})}),this.on("preprocess-complete",i=>{if(i==null||!this.getFile(i.id)){this.log(`Not setting progress for a file that has been removed: ${i?.id}`);return}const o={...this.getState().files};o[i.id]={...o[i.id],progress:{...o[i.id].progress}},delete o[i.id].progress.preprocess,this.setState({files:o})}),this.on("postprocess-progress",(i,o)=>{if(i==null||!this.getFile(i.id)){this.log(`Not setting progress for a file that has been removed: ${i?.id}`);return}this.setFileState(i.id,{progress:{...this.getState().files[i.id].progress,postprocess:o}})}),this.on("postprocess-complete",i=>{const o=i&&this.getFile(i.id);if(o==null){this.log(`Not setting progress for a file that has been removed: ${i?.id}`);return}const{postprocess:a,...s}=o.progress;this.patchFilesState({[o.id]:{progress:{...s,complete:!0}}})}),this.on("restored",()=>{this.#d()}),this.on("dashboard:file-edit-complete",i=>{i&&this.#u(i)}),typeof window<"u"&&window.addEventListener&&(window.addEventListener("online",this.#c),window.addEventListener("offline",this.#c),setTimeout(this.#c,3e3))}updateOnlineStatus(){window.navigator.onLine??!0?(this.emit("is-online"),this.wasOffline&&(this.emit("back-online"),this.info(this.i18n("connectedToInternet"),"success",3e3),this.wasOffline=!1)):(this.emit("is-offline"),this.info(this.i18n("noInternetConnection"),"error",0),this.wasOffline=!0)}#c=this.updateOnlineStatus.bind(this);getID(){return this.opts.id}use(e,...n){if(typeof e!="function"){const a=`Expected a plugin class, but got ${e===null?"null":typeof e}. Please verify that the plugin was imported and spelled correctly.`;throw new TypeError(a)}const r=new e(this,...n),i=r.id;if(!i)throw new Error("Your plugin must have an id");if(!r.type)throw new Error("Your plugin must have a type");const o=this.getPlugin(i);if(o){const a=`Already found a plugin named '${o.id}'. Tried to use: '${i}'.
23
+ Uppy plugins must have unique \`id\` options.`;throw new Error(a)}return e.VERSION&&this.log(`Using ${i} v${e.VERSION}`),r.type in this.#e?this.#e[r.type].push(r):this.#e[r.type]=[r],r.install(),this.emit("plugin-added",r),this}getPlugin(e){for(const n of Object.values(this.#e)){const r=n.find(i=>i.id===e);if(r!=null)return r}}[Symbol.for("uppy test: getPlugins")](e){return this.#e[e]}iteratePlugins(e){Object.values(this.#e).flat(1).forEach(e)}removePlugin(e){this.log(`Removing plugin ${e.id}`),this.emit("plugin-remove",e),e.uninstall&&e.uninstall();const n=this.#e[e.type],r=n.findIndex(a=>a.id===e.id);r!==-1&&n.splice(r,1);const o={plugins:{...this.getState().plugins,[e.id]:void 0}};this.setState(o)}destroy(){this.log(`Closing Uppy instance ${this.opts.id}: removing all files and uninstalling plugins`),this.cancelAll(),this.#n(),this.iteratePlugins(e=>{this.removePlugin(e)}),typeof window<"u"&&window.removeEventListener&&(window.removeEventListener("online",this.#c),window.removeEventListener("offline",this.#c))}hideInfo(){const{info:e}=this.getState();this.setState({info:e.slice(1)}),this.emit("info-hidden")}info(e,n="info",r=3e3){const i=typeof e=="object";this.setState({info:[...this.getState().info,{type:n,message:i?e.message:e,details:i?e.details:null}]}),setTimeout(()=>this.hideInfo(),r),this.emit("info-visible")}log(e,n){const{logger:r}=this.opts;switch(n){case"error":r.error(e);break;case"warning":r.warn(e);break;default:r.debug(e);break}}#y=new Map;registerRequestClient(e,n){this.#y.set(e,n)}getRequestClientForFile(e){if(!("remote"in e&&e.remote))throw new Error(`Tried to get RequestClient for a non-remote file ${e.id}`);const n=this.#y.get(e.remote.requestClientId);if(n==null)throw new Error(`requestClientId "${e.remote.requestClientId}" not registered for file "${e.id}"`);return n}async restore(e){this.log(`Core: Running restored upload "${e}"`);const n=await this.#p(e);return this.emit("complete",n),n}#f(e,n={}){const{forceAllowNewUpload:r=!1}=n,{allowNewUpload:i,currentUploads:o}=this.getState();if(!i&&!r)throw new Error("Cannot create a new upload: already uploading.");const a=pR();return this.emit("upload",a,this.getFilesByIds(e)),this.setState({allowNewUpload:this.opts.allowMultipleUploadBatches!==!1&&this.opts.allowMultipleUploads!==!1,currentUploads:{...o,[a]:{fileIDs:e,step:0,result:{}}}}),a}[Symbol.for("uppy test: createUpload")](...e){return this.#f(...e)}#x(e){const{currentUploads:n}=this.getState();return n[e]}addResultData(e,n){if(!this.#x(e)){this.log(`Not setting result for an upload that has been removed: ${e}`);return}const{currentUploads:r}=this.getState(),i={...r[e],result:{...r[e].result,...n}};this.setState({currentUploads:{...r,[e]:i}})}#b(e){const{[e]:n,...r}=this.getState().currentUploads;this.setState({currentUploads:r})}async#p(e){const n=()=>{const{currentUploads:a}=this.getState();return a[e]};let r=n();if(!r)throw new Error("Nonexistent upload");const i=[...this.#o,...this.#i,...this.#s];try{for(let a=r.step||0;a<i.length;a++){const s=i[a];this.setState({currentUploads:{...this.getState().currentUploads,[e]:{...r,step:a}}});const{fileIDs:l}=r;if(await s(l,e),r=n(),!r)break}}catch(a){throw this.#b(e),a}if(r){r.fileIDs.forEach(u=>{const c=this.getFile(u);c?.progress.postprocess&&this.emit("postprocess-complete",c)});const a=r.fileIDs.map(u=>this.getFile(u)),s=a.filter(u=>!u.error),l=a.filter(u=>u.error);this.addResultData(e,{successful:s,failed:l,uploadID:e}),r=n()}let o;return r&&(o=r.result,this.#b(e)),o==null&&(this.log(`Not setting result for an upload that has been removed: ${e}`),o={successful:[],failed:[],uploadID:e}),o}async upload(){this.#e.uploader?.length||this.log("No uploader type plugins are used","warning");let{files:e}=this.getState();if(this.#v().length>0){const i=await this.#g();if(!(this.getFiles().filter(a=>a.progress.uploadStarted==null).length>0))return this.emit("complete",i),i;({files:e}=this.getState())}const r=this.opts.onBeforeUpload(e);if(r===!1)throw new Error("Not starting the upload because onBeforeUpload returned false");r&&typeof r=="object"&&(e=r,this.setState({files:e}));try{if(this.#t.validateMinNumberOfFiles(e),!this.#l(e))throw new bn(this.i18n("missingRequiredMetaField"));const{currentUploads:i}=this.getState(),o=Object.values(i).flatMap(u=>u.fileIDs),a=Object.keys(e).filter(u=>{const c=this.getFile(u);return c&&!c.progress.uploadStarted&&!o.includes(u)}),s=this.#f(a),l=await this.#p(s);return this.emit("complete",l),l}catch(i){throw this.#a([i]),i}}}function Gf(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable}))),n.push.apply(n,r)}return n}function tt(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Gf(Object(n),!0).forEach((function(r){un(t,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Gf(Object(n)).forEach((function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))}))}return t}function un(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function yR(t,e){if(t==null)return{};var n,r,i=(function(a,s){if(a==null)return{};var l,u,c={},d=Object.keys(a);for(u=0;u<d.length;u++)l=d[u],s.indexOf(l)>=0||(c[l]=a[l]);return c})(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(r=0;r<o.length;r++)n=o[r],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}function Dr(t){return(function(e){if(Array.isArray(e))return Ks(e)})(t)||(function(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)})(t)||(function(e,n){if(e){if(typeof e=="string")return Ks(e,n);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Ks(e,n)}})(t)||(function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
24
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function Ks(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var Qf,bR,Io,wt=(Qf=function(t){(function(){var e={}.hasOwnProperty;function n(){for(var r=[],i=0;i<arguments.length;i++){var o=arguments[i];if(o){var a=typeof o;if(a==="string"||a==="number")r.push(o);else if(Array.isArray(o)){if(o.length){var s=n.apply(null,o);s&&r.push(s)}}else if(a==="object")if(o.toString===Object.prototype.toString)for(var l in o)e.call(o,l)&&o[l]&&r.push(l);else r.push(o.toString())}}return r.join(" ")}t.exports?(n.default=n,t.exports=n):window.classNames=n})()},Qf(Io={path:bR,exports:{},require:function(t,e){return(function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")})(e==null&&Io.path)}},Io.exports),Io.exports),xn=function(t){return function(e,n){if(!e)return t;var r;typeof e=="string"?r=e:n=e;var i=t;return r&&(i+="__"+r),i+(n?Object.keys(n).reduce((function(o,a){var s=n[a];return s&&(o+=" "+(typeof s=="boolean"?i+"--"+a:i+"--"+a+"_"+s)),o}),""):"")}};function Bl(t,e,n){var r,i,o,a,s;function l(){var c=Date.now()-a;c<e&&c>=0?r=setTimeout(l,e-c):(r=null,n||(s=t.apply(o,i),o=i=null))}e==null&&(e=100);var u=function(){o=this,i=arguments,a=Date.now();var c=n&&!r;return r||(r=setTimeout(l,e)),c&&(s=t.apply(o,i),o=i=null),s};return u.clear=function(){r&&(clearTimeout(r),r=null)},u.flush=function(){r&&(s=t.apply(o,i),o=i=null,clearTimeout(r),r=null)},u}Bl.debounce=Bl;var Hl=Bl,ke=function(){return ke=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},ke.apply(this,arguments)};function bv(t,e){var n,r;return t&&e?(n=""+t+e[0].toUpperCase()+e.slice(1),r=t+"-"+e):(n=t||e,r=t||e),{name:n,classname:r}}function wv(t){return/^blob:/.test(t)}function Xf(t){return wv(t)||(function(e){return/^data:/.test(e)})(t)}function Nr(t){return!!(t&&t.constructor&&t.call&&t.apply)}function St(t){return t===void 0}function Zo(t){return typeof t=="object"&&t!==null}function ql(t,e,n){var r={};return Zo(t)?(Object.keys(e).forEach((function(i){St(t[i])?r[i]=e[i]:Zo(e[i])?Zo(t[i])?r[i]=ql(t[i],e[i],n[i]):r[i]=t[i]?e[i]:n[i]:e[i]===!0||e[i]===!1?r[i]=!!t[i]:r[i]=t[i]})),r):t?e:n}function Mo(t){var e=Number(t);return Number.isNaN(e)?t:e}function Jf(t){return typeof(t=="number"||(function(e){return typeof e=="object"&&e!==null})(t)&&toString.call(t)=="[object Number]")&&!Sv(t)}function Sv(t){return t!=t}function Cv(t,e){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}var $i=function(t,e){t===void 0&&(t={}),e===void 0&&(e={}),this.type="manipulateImage",this.move=t,this.scale=e},wR=function(t,e){e===void 0&&(e={}),this.type="resize",this.directions=t,this.params=e},Hc=function(t){this.type="move",this.directions=t},SR=(function(){function t(e,n,r,i,o){this.type="drag",this.nativeEvent=e,this.position=r,this.previousPosition=i,this.element=n,this.anchor=o}return t.prototype.shift=function(){var e=this,n=e.element,r=e.anchor,i=e.position;if(n){var o=n.getBoundingClientRect(),a=o.left,s=o.top;return{left:i.left-a-r.left,top:i.top-s-r.top}}return{left:0,top:0}},t})(),qc={name:"DraggableElement",props:{classname:{type:String}},beforeMount:function(){window.addEventListener("mouseup",this.onMouseUp,{passive:!1}),window.addEventListener("mousemove",this.onMouseMove,{passive:!1}),window.addEventListener("touchmove",this.onTouchMove,{passive:!1}),window.addEventListener("touchend",this.onTouchEnd,{passive:!1})},beforeUnmount:function(){window.removeEventListener("mouseup",this.onMouseUp),window.removeEventListener("mousemove",this.onMouseMove),window.removeEventListener("touchmove",this.onTouchMove),window.removeEventListener("touchend",this.onTouchEnd)},mounted:function(){if(!this.$refs.draggable)throw new Error('You should add ref "draggable" to your root element to use draggable mixin');this.touches=[],this.hovered=!1},methods:{onMouseOver:function(){this.hovered||(this.hovered=!0,this.$emit("enter"))},onMouseLeave:function(){this.hovered&&!this.touches.length&&(this.hovered=!1,this.$emit("leave"))},onTouchStart:function(t){t.cancelable&&!this.disabled&&t.touches.length===1&&(this.touches=Dr(t.touches),this.hovered||(this.$emit("enter"),this.hovered=!0),t.touches.length&&this.initAnchor(this.touches.reduce((function(e,n){return{clientX:e.clientX+n.clientX/t.touches.length,clientY:e.clientY+n.clientY/t.touches.length}}),{clientX:0,clientY:0})),t.preventDefault&&t.preventDefault(),t.stopPropagation())},onTouchEnd:function(){this.processEnd()},onTouchMove:function(t){this.touches.length&&(this.processMove(t,t.touches),t.preventDefault&&t.preventDefault(),t.stopPropagation&&t.stopPropagation())},onMouseDown:function(t){if(!this.disabled){var e={fake:!0,clientX:t.clientX,clientY:t.clientY};this.touches=[e],this.initAnchor(e),t.stopPropagation()}},onMouseMove:function(t){this.touches.length&&(this.processMove(t,[{fake:!0,clientX:t.clientX,clientY:t.clientY}]),t.preventDefault&&t.preventDefault())},onMouseUp:function(){this.processEnd()},initAnchor:function(t){var e=this.$refs.draggable.getBoundingClientRect(),n=e.left,r=e.right,i=e.bottom,o=e.top;this.anchor={left:t.clientX-n,top:t.clientY-o,bottom:i-t.clientY,right:r-t.clientX}},processMove:function(t,e){var n=Dr(e);if(this.touches.length){if(this.touches.length===1&&n.length===1){var r=this.$refs.draggable;this.$emit("drag",new SR(t,r,{left:n[0].clientX,top:n[0].clientY},{left:this.touches[0].clientX,top:this.touches[0].clientY},this.anchor))}this.touches=n}},processEnd:function(){this.touches.length&&this.$emit("drag-end"),this.hovered&&(this.$emit("leave"),this.hovered=!1),this.touches=[]}},emits:["drag","drag-end","leave","enter"]};qc.render=function(t,e,n,r,i,o){return b(),ne("div",{ref:"draggable",class:n.classname,onTouchstart:e[1]||(e[1]=function(){return o.onTouchStart&&o.onTouchStart.apply(o,arguments)}),onMousedown:e[2]||(e[2]=function(){return o.onMouseDown&&o.onMouseDown.apply(o,arguments)}),onMouseover:e[3]||(e[3]=function(){return o.onMouseOver&&o.onMouseOver.apply(o,arguments)}),onMouseleave:e[4]||(e[4]=function(){return o.onMouseLeave&&o.onMouseLeave.apply(o,arguments)})},[Ue(t.$slots,"default")],34)};var Ys=xn("vue-handler-wrapper"),Ev={name:"HandlerWrapper",components:{DraggableElement:qc},props:{horizontalPosition:{type:String},verticalPosition:{type:String},disabled:{type:Boolean,default:!1}},computed:{classes:function(){var t;if(this.horizontalPosition||this.verticalPosition){var e,n=bv(this.horizontalPosition,this.verticalPosition);t=Ys((un(e={},n.classname,!0),un(e,"disabled",this.disabled),e))}else t=Ys({disabled:this.disabled});return{root:t,draggable:Ys("draggable")}}},emits:["leave","enter","drag","drag-end"]};Ev.render=function(t,e,n,r,i,o){var a=ze("DraggableElement");return b(),ne("div",{class:o.classes.root},[j(a,{class:o.classes.draggable,onDrag:e[1]||(e[1]=function(s){return t.$emit("drag",s)}),onDragEnd:e[2]||(e[2]=function(s){return t.$emit("drag-end")}),onLeave:e[3]||(e[3]=function(s){return t.$emit("leave")}),onEnter:e[4]||(e[4]=function(s){return t.$emit("enter")})},{default:we((function(){return[Ue(t.$slots,"default")]})),_:3},8,["class"])],2)};var CR=xn("vue-line-wrapper"),Tv={name:"LineWrapper",components:{DraggableElement:qc},props:{position:{type:String,required:!0},disabled:{type:Boolean,default:!1}},computed:{classname:function(){var t;return CR((un(t={},this.position,!0),un(t,"disabled",this.disabled),t))}},emits:["leave","enter","drag","drag-end"]};Tv.render=function(t,e,n,r,i,o){var a=ze("DraggableElement");return b(),ne(a,{class:o.classname,onDrag:e[1]||(e[1]=function(s){return t.$emit("drag",s)}),onDragEnd:e[2]||(e[2]=function(s){return t.$emit("drag-end")}),onLeave:e[3]||(e[3]=function(s){return t.$emit("leave")}),onEnter:e[4]||(e[4]=function(s){return t.$emit("enter")})},{default:we((function(){return[Ue(t.$slots,"default")]})),_:3},8,["class"])};var In=["left","right","top","bottom"],ER=["left","right"],TR=["top","bottom"],xR=["left","top"],OR=["fill-area","fit-area","stencil","none"],Zf={left:0,top:0,width:0,height:0};function ep(t,e,n){return!(n=n||["width","height","left","top"]).some((function(r){return t[r]!==e[r]}))}function jn(t){return{left:t.left,top:t.top,right:t.left+t.width,bottom:t.top+t.height}}function ii(t,e){return{left:t.left-e.left,top:t.top-e.top}}function Et(t){return{left:t.left+t.width/2,top:t.top+t.height/2}}function Ni(t,e){var n={left:0,top:0,right:0,bottom:0};return In.forEach((function(r){var i=e[r],o=jn(t)[r];n[r]=i!==void 0&&o!==void 0?r==="left"||r==="top"?Math.max(0,i-o):Math.max(0,o-i):0})),n}function Pn(t,e){return{left:t.left-e.left,top:t.top-e.top,width:t.width+e.left+e.right,height:t.height+e.top+e.bottom}}function Ba(t){return{left:-t.left,top:-t.top}}function Gt(t,e){return ke(ke({},t),{left:t.left+e.left,top:t.top+e.top})}function fn(t,e,n,r){if(e!==1){if(n){var i=Et(t);return{width:t.width*e,height:t.height*e,left:t.left+t.width*(1-e)/2+(n.left-i.left)*(1-e),top:t.top+t.height*(1-e)/2+(n.top-i.top)*(1-e)}}return{width:t.width*e,height:t.height*e,left:t.left+t.width*(1-e)/2,top:t.top+t.height*(1-e)/2}}return t}function nt(t){return t.width/t.height}function oi(t,e){return Math.min(e.right!==void 0&&e.left!==void 0?(e.right-e.left)/t.width:1/0,e.bottom!==void 0&&e.top!==void 0?(e.bottom-e.top)/t.height:1/0)}function ai(t,e){var n={left:0,top:0},r=Ni(t,e);return r.left&&r.left>0?n.left=r.left:r.right&&r.right>0&&(n.left=-r.right),r.top&&r.top>0?n.top=r.top:r.bottom&&r.bottom>0&&(n.top=-r.bottom),n}function Gs(t,e){var n;return e.minimum&&t<e.minimum?n=e.minimum:e.maximum&&t>e.maximum&&(n=e.maximum),n}function xv(t,e){var n=nt(t),r=nt(e);return e.width<1/0&&e.height<1/0?n>r?{width:e.width,height:e.width/n}:{width:e.height*n,height:e.height}:e.width<1/0?{width:e.width,height:e.width/n}:e.height<1/0?{width:e.height*n,height:e.height}:t}function Ov(t,e){var n=e*Math.PI/180;return{width:Math.abs(t.width*Math.cos(n))+Math.abs(t.height*Math.sin(n)),height:Math.abs(t.width*Math.sin(n))+Math.abs(t.height*Math.cos(n))}}function sr(t,e){var n=e*Math.PI/180;return{left:t.left*Math.cos(n)-t.top*Math.sin(n),top:t.left*Math.sin(n)+t.top*Math.cos(n)}}function Ha(t,e){var n=Ni(Tt(t,e),e);return n.left+n.right+n.top+n.bottom?n.left+n.right>n.top+n.bottom?Math.min((t.width+n.left+n.right)/t.width,oi(t,e)):Math.min((t.height+n.top+n.bottom)/t.height,oi(t,e)):1}function Tt(t,e,n){n===void 0&&(n=!1);var r=ai(t,e);return Gt(t,n?Ba(r):r)}function Wl(t){return{width:t.right!==void 0&&t.left!==void 0?t.right-t.left:1/0,height:t.bottom!==void 0&&t.top!==void 0?t.bottom-t.top:1/0}}function AR(t,e){return ke(ke({},t),{minWidth:Math.min(e.width,t.minWidth),minHeight:Math.min(e.height,t.minHeight),maxWidth:Math.min(e.width,t.maxWidth),maxHeight:Math.min(e.height,t.maxHeight)})}function Av(t,e,n){n===void 0&&(n=!0);var r={};return In.forEach((function(i){var o=t[i],a=e[i];o!==void 0&&a!==void 0?r[i]=i==="left"||i==="top"?n?Math.max(o,a):Math.min(o,a):n?Math.min(o,a):Math.max(o,a):a!==void 0?r[i]=a:o!==void 0&&(r[i]=o)})),r}function qa(t,e){return Av(t,e,!0)}function tp(t){var e=t.size,n=t.aspectRatio,r=t.ignoreMinimum,i=t.sizeRestrictions;return!!((e.correctRatio||nt(e)>=n.minimum&&nt(e)<=n.maximum)&&e.height<=i.maxHeight&&e.width<=i.maxWidth&&e.width&&e.height&&(r||e.height>=i.minHeight&&e.width>=i.minWidth))}function np(t,e){return Math.pow(t.width-e.width,2)+Math.pow(t.height-e.height,2)}function Jn(t){var e=t.width,n=t.height,r=t.sizeRestrictions,i={minimum:t.aspectRatio&&t.aspectRatio.minimum||0,maximum:t.aspectRatio&&t.aspectRatio.maximum||1/0},o={width:Math.max(r.minWidth,Math.min(r.maxWidth,e)),height:Math.max(r.minHeight,Math.min(r.maxHeight,n))};function a(u,c){return c===void 0&&(c=!1),u.reduce((function(d,f){return tp({size:f,aspectRatio:i,sizeRestrictions:r,ignoreMinimum:c})&&(!d||np(f,{width:e,height:n})<np(d,{width:e,height:n}))?f:d}),null)}var s=[];i&&[i.minimum,i.maximum].forEach((function(u){u&&s.push({width:o.width,height:o.width/u,correctRatio:!0},{width:o.height*u,height:o.height,correctRatio:!0})})),tp({size:o,aspectRatio:i,sizeRestrictions:r})&&s.push(o);var l=a(s)||a(s,!0);return l&&{width:l.width,height:l.height}}function Kl(t){var e=t.event,n=t.coordinates,r=t.positionRestrictions,i=r===void 0?{}:r,o=Gt(n,e.directions);return Gt(o,ai(o,i))}function $R(t){var e=t.coordinates,n=t.transform,r=t.imageSize,i=t.sizeRestrictions,o=t.positionRestrictions,a=t.aspectRatio,s=t.visibleArea,l=function(c,d){return Kl({coordinates:c,positionRestrictions:o,event:new Hc({left:d.left-c.left,top:d.top-c.top})})},u=ke({},e);return(Array.isArray(n)?n:[n]).forEach((function(c){var d={};St((d=typeof c=="function"?c({coordinates:u,imageSize:r,visibleArea:s}):c).width)&&St(d.height)||(u=(function(f,m){var p=ke(ke(ke({},f),Jn({width:m.width,height:m.height,sizeRestrictions:i,aspectRatio:a})),{left:0,top:0});return l(p,{left:f.left,top:f.top})})(u,ke(ke({},u),d))),St(d.left)&&St(d.top)||(u=l(u,ke(ke({},u),d)))})),u}function RR(t){t.event;var e=t.getAreaRestrictions,n=t.boundaries,r=t.coordinates,i=t.visibleArea;t.aspectRatio;var o=t.stencilSize,a=t.sizeRestrictions,s=t.positionRestrictions;t.stencilReference;var l,u,c,d=ke({},r),f=ke({},i),m=ke({},o);l=nt(m),u=nt(d),c===void 0&&(c=.001),(l===0||u===0?Math.abs(u-l)<c:Math.abs(u/l)<1+c&&Math.abs(u/l)>1-c)||(d=ke(ke({},d),Jn({sizeRestrictions:a,width:d.width,height:d.height,aspectRatio:{minimum:nt(m),maximum:nt(m)}})));var p=Ha(f=fn(f,d.width*n.width/(f.width*m.width)),e({visibleArea:f,type:"resize"}));return p!==1&&(f=fn(f,p),d=fn(d,p)),f=Tt(f=Gt(f,ii(Et(d),Et(f))),e({visibleArea:f,type:"move"})),{coordinates:d=Tt(d,qa(jn(f),s)),visibleArea:f}}function PR(t){var e=t.event,n=t.getAreaRestrictions,r=t.boundaries,i=t.coordinates,o=t.visibleArea;t.aspectRatio,t.stencilSize,t.sizeRestrictions;var a=t.positionRestrictions;t.stencilReference;var s=ke({},i),l=ke({},o);if(i&&o&&e.type!=="manipulateImage"){var u={width:0,height:0};l.width,r.width,nt(r)>nt(s)?(u.height=.8*r.height,u.width=u.height*nt(s)):(u.width=.8*r.width,u.height=u.width*nt(s));var c=Ha(l=fn(l,s.width*r.width/(l.width*u.width)),n({visibleArea:l,type:"resize"}));l=fn(l,c),c!==1&&(u.height/=c,u.width/=c),l=Tt(l=Gt(l,ii(Et(s),Et(l))),n({visibleArea:l,type:"move"})),s=Tt(s,qa(jn(l),a))}return{coordinates:s,visibleArea:l}}function kR(t){var e=t.event,n=t.coordinates,r=t.visibleArea,i=t.getAreaRestrictions,o=ke({},r),a=ke({},n);if(e.type==="setCoordinates"){var s=Math.max(0,a.width-o.width),l=Math.max(0,a.height-o.height);s>l?o=fn(o,Math.min(a.width/o.width,oi(o,i({visibleArea:o,type:"resize"})))):l>s&&(o=fn(o,Math.min(a.height/o.height,oi(o,i({visibleArea:o,type:"resize"}))))),o=Tt(o=Gt(o,Ba(ai(a,jn(o)))),i({visibleArea:o,type:"move"}))}return{visibleArea:o,coordinates:a}}function IR(t){var e=t.imageSize,n=t.visibleArea,r=t.coordinates,i=n||e;return{left:(n?n.left:0)+i.width/2-r.width/2,top:(n?n.top:0)+i.height/2-r.height/2}}function MR(t){var e=t.imageSize,n=t.visibleArea,r=t.aspectRatio,i=t.sizeRestrictions,o=n||e,a=Math.min(r.maximum||1/0,Math.max(r.minimum||0,nt(o))),s=o.width<o.height?{width:.8*o.width,height:.8*o.width/a}:{height:.8*o.height,width:.8*o.height*a};return Jn(ke(ke({},s),{aspectRatio:r,sizeRestrictions:i}))}function FR(t){var e,n,r=t.imageSize,i=t.visibleArea,o=t.boundaries,a=t.aspectRatio,s=t.sizeRestrictions,l=t.stencilSize,u=i||r;return nt(u)>nt(o)?n=(e=l.height*u.height/o.height)*nt(l):e=(n=l.width*u.width/o.width)/nt(l),Jn({width:n,height:e,aspectRatio:a,sizeRestrictions:s})}function DR(t){var e=t.getAreaRestrictions,n=t.coordinates,r=t.imageSize,i=nt(t.boundaries);if(n){var o={height:Math.max(n.height,r.height),width:Math.max(n.width,r.width)},a=xv({width:nt(o)>i?o.width:o.height*i,height:nt(o)>i?o.width/i:o.height},Wl(e())),s={left:n.left+n.width/2-a.width/2,top:n.top+n.height/2-a.height/2,width:a.width,height:a.height},l=Ni(n,jn(ke({left:0,top:0},r))),u={};return!l.left&&!l.right&&s.width<=r.width&&(u.left=0,u.right=r.width),!l.top&&!l.bottom&&s.height<=r.height&&(u.top=0,u.bottom=r.height),Tt(s,u)}var c=nt(r);return a={height:c>i?r.height:r.width/i,width:c>i?r.height*i:r.width},{left:r.width/2-a.width/2,top:r.height/2-a.height/2,width:a.width,height:a.height}}function Fo(t,e){return Av(t,jn(e))}function LR(t){var e=t.event,n=t.coordinates,r=t.visibleArea,i=t.sizeRestrictions,o=t.getAreaRestrictions,a=t.positionRestrictions,s=t.adjustStencil,l=e.scale,u=e.move,c=ke({},r),d=ke({},n),f=1,m=1,p=l.factor&&Math.abs(l.factor-1)>.001;c=Gt(c,{left:u.left||0,top:u.top||0});var h={stencil:{minimum:Math.max(i.minWidth?i.minWidth/d.width:0,i.minHeight?i.minHeight/d.height:0),maximum:Math.min(i.maxWidth?i.maxWidth/d.width:1/0,i.maxHeight?i.maxHeight/d.height:1/0,oi(d,a))},area:{maximum:oi(c,o({visibleArea:c,type:"resize"}))}};l.factor&&p&&(l.factor<1?(m=Math.max(l.factor,h.stencil.minimum))>1&&(m=1):l.factor>1&&(m=Math.min(l.factor,Math.min(h.area.maximum,h.stencil.maximum)))<1&&(m=1)),m&&(c=fn(c,m,l.center));var v=n.left-r.left,C=r.width+r.left-(n.width+n.left),S=n.top-r.top,w=r.height+r.top-(n.height+n.top);return c=Tt(c=Gt(c,ai(c,{left:a.left!==void 0?a.left-v*m:void 0,top:a.top!==void 0?a.top-S*m:void 0,bottom:a.bottom!==void 0?a.bottom+w*m:void 0,right:a.right!==void 0?a.right+C*m:void 0})),o({visibleArea:c,type:"move"})),d.width=d.width*m,d.height=d.height*m,d.left=c.left+v*m,d.top=c.top+S*m,d=Tt(d,qa(jn(c),a)),l.factor&&p&&s&&(l.factor>1?f=Math.min(h.area.maximum,l.factor)/m:l.factor<1&&(f=Math.max(d.height/c.height,d.width/c.width,l.factor/m)),f!==1&&(c=Gt(c=Tt(c=fn(c,f,l.factor>1?l.center:Et(d)),o({visibleArea:c,type:"move"})),Ba(ai(d,jn(c)))))),{coordinates:d,visibleArea:c}}function jR(t){var e=t.aspectRatio,n=t.getAreaRestrictions,r=t.coordinates,i=t.visibleArea,o=t.sizeRestrictions,a=t.positionRestrictions,s=t.imageSize,l=t.previousImageSize,u=t.angle,c=ke({},r),d=ke({},i),f=sr(Et(ke({left:0,top:0},l)),u);return(c=ke(ke({},Jn({sizeRestrictions:o,aspectRatio:e,width:c.width,height:c.height})),sr(Et(c),u))).left-=f.left-s.width/2+c.width/2,c.top-=f.top-s.height/2+c.height/2,d=fn(d,Ha(d,n({visibleArea:d,type:"resize"}))),{coordinates:c=Tt(c,a),visibleArea:d=Tt(d=Gt(d,ii(Et(c),Et(r))),n({visibleArea:d,type:"move"}))}}function VR(t){var e=t.flip,n=t.previousFlip,r=t.rotate,i=t.getAreaRestrictions,o=t.coordinates,a=t.visibleArea,s=t.imageSize,l=ke({},o),u=ke({},a),c=n.horizontal!==e.horizontal,d=n.vertical!==e.vertical;if(c||d){var f=sr({left:s.width/2,top:s.height/2},-r),m=sr(Et(l),-r),p=sr({left:c?f.left-(m.left-f.left):m.left,top:d?f.top-(m.top-f.top):m.top},r);l=Gt(l,ii(p,Et(l))),m=sr(Et(u),-r),u=Tt(u=Gt(u,ii(p=sr({left:c?f.left-(m.left-f.left):m.left,top:d?f.top-(m.top-f.top):m.top},r),Et(u))),i({visibleArea:u,type:"move"}))}return{coordinates:l,visibleArea:u}}function rp(t){var e=t.directions,n=t.coordinates,r=t.positionRestrictions,i=r===void 0?{}:r,o=t.sizeRestrictions,a=t.preserveRatio,s=t.compensate,l=ke({},e),u=Pn(n,l).width,c=Pn(n,l).height;u<0&&(l.left<0&&l.right<0?(l.left=-(n.width-o.minWidth)/(l.left/l.right),l.right=-(n.width-o.minWidth)/(l.right/l.left)):l.left<0?l.left=-(n.width-o.minWidth):l.right<0&&(l.right=-(n.width-o.minWidth))),c<0&&(l.top<0&&l.bottom<0?(l.top=-(n.height-o.minHeight)/(l.top/l.bottom),l.bottom=-(n.height-o.minHeight)/(l.bottom/l.top)):l.top<0?l.top=-(n.height-o.minHeight):l.bottom<0&&(l.bottom=-(n.height-o.minHeight)));var d=Ni(Pn(n,l),i);s&&(d.left&&d.left>0&&d.right===0?(l.right+=d.left,l.left-=d.left):d.right&&d.right>0&&d.left===0&&(l.left+=d.right,l.right-=d.right),d.top&&d.top>0&&d.bottom===0?(l.bottom+=d.top,l.top-=d.top):d.bottom&&d.bottom>0&&d.top===0&&(l.top+=d.bottom,l.bottom-=d.bottom),d=Ni(Pn(n,l),i));var f={width:1/0,height:1/0,left:1/0,right:1/0,top:1/0,bottom:1/0};if(In.forEach((function(h){var v=d[h];v&&l[h]&&(f[h]=Math.max(0,1-v/l[h]))})),a){var m=Math.min.apply(null,In.map((function(h){return f[h]})));m!==1/0&&In.forEach((function(h){l[h]*=m}))}else In.forEach((function(h){f[h]!==1/0&&(l[h]*=f[h])}));if(u=Pn(n,l).width,c=Pn(n,l).height,l.right+l.left&&(u>o.maxWidth?f.width=(o.maxWidth-n.width)/(l.right+l.left):u<o.minWidth&&(f.width=(o.minWidth-n.width)/(l.right+l.left))),l.bottom+l.top&&(c>o.maxHeight?f.height=(o.maxHeight-n.height)/(l.bottom+l.top):c<o.minHeight&&(f.height=(o.minHeight-n.height)/(l.bottom+l.top))),a){var p=Math.min(f.width,f.height);p!==1/0&&In.forEach((function(h){l[h]*=p}))}else f.width!==1/0&&ER.forEach((function(h){l[h]*=f.width})),f.height!==1/0&&TR.forEach((function(h){l[h]*=f.height}));return l}function Do(t,e,n){return e==0&&n==0?t/2:e==0?0:n==0?t:t*Math.abs(e/(e+n))}var zR=xn("vue-simple-handler"),NR=xn("vue-simple-handler-wrapper"),Wc={name:"SimpleHandler",components:{HandlerWrapper:Ev},props:{defaultClass:{type:String},hoverClass:{type:String},wrapperClass:{type:String},horizontalPosition:{type:String},verticalPosition:{type:String},disabled:{type:Boolean,default:!1}},data:function(){return{hover:!1}},computed:{classes:function(){var t,e=(un(t={},this.horizontalPosition,!!this.horizontalPosition),un(t,this.verticalPosition,!!this.verticalPosition),un(t,"".concat(this.horizontalPosition,"-").concat(this.verticalPosition),!!(this.verticalPosition&&this.horizontalPosition)),un(t,"hover",this.hover),t);return{default:wt(zR(e),this.defaultClass,this.hover&&this.hoverClass),wrapper:wt(NR(e),this.wrapperClass)}}},methods:{onDrag:function(t){this.$emit("drag",t)},onEnter:function(){this.hover=!0},onLeave:function(){this.hover=!1},onDragEnd:function(){this.$emit("drag-end")}},emits:["drag","drag-end"]};Wc.render=function(t,e,n,r,i,o){var a=ze("HandlerWrapper");return b(),ne(a,{class:o.classes.wrapper,"vertical-position":n.verticalPosition,"horizontal-position":n.horizontalPosition,disabled:n.disabled,onDrag:o.onDrag,onDragEnd:o.onDragEnd,onEnter:o.onEnter,onLeave:o.onLeave},{default:we((function(){return[j("div",{class:o.classes.default},null,2)]})),_:1},8,["class","vertical-position","horizontal-position","disabled","onDrag","onDragEnd","onEnter","onLeave"])};var UR=xn("vue-simple-line"),BR=xn("vue-simple-line-wrapper"),Kc={name:"SimpleLine",components:{LineWrapper:Tv},props:{defaultClass:{type:String},hoverClass:{type:String},wrapperClass:{type:String},position:{type:String},disabled:{type:Boolean,default:!1}},data:function(){return{hover:!1}},computed:{classes:function(){return{root:wt(UR(un({},this.position,!0)),this.defaultClass,this.hover&&this.hoverClass),wrapper:wt(BR(un({},this.position,!0)),this.wrapperClass)}}},methods:{onDrag:function(t){this.$emit("drag",t)},onEnter:function(){this.hover=!0},onLeave:function(){this.hover=!1},onDragEnd:function(){this.$emit("drag-end")}},emits:["drag","drag-end"]};Kc.render=function(t,e,n,r,i,o){var a=ze("LineWrapper");return b(),ne(a,{class:o.classes.wrapper,position:n.position,disabled:n.disabled,onDrag:o.onDrag,onDragEnd:o.onDragEnd,onEnter:o.onEnter,onLeave:o.onLeave},{default:we((function(){return[j("div",{class:o.classes.root},null,2)]})),_:1},8,["class","position","disabled","onDrag","onDragEnd","onEnter","onLeave"])};var Qs=xn("vue-bounding-box"),HR=["east","west",null],qR=["south","north",null],$v={name:"BoundingBox",props:{width:{type:Number},height:{type:Number},transitions:{type:Object},handlers:{type:Object,default:function(){return{eastNorth:!0,north:!0,westNorth:!0,west:!0,westSouth:!0,south:!0,eastSouth:!0,east:!0}}},handlersComponent:{type:[Object,String],default:function(){return Wc}},handlersClasses:{type:Object,default:function(){return{}}},handlersWrappersClasses:{type:Object,default:function(){return{}}},lines:{type:Object,default:function(){return{west:!0,north:!0,east:!0,south:!0}}},linesComponent:{type:[Object,String],default:function(){return Kc}},linesClasses:{type:Object,default:function(){return{}}},linesWrappersClasses:{type:Object,default:function(){return{}}},resizable:{type:Boolean,default:!0}},data:function(){var t=[];return HR.forEach((function(e){qR.forEach((function(n){if(e!==n){var r=bv(e,n),i=r.name,o=r.classname;t.push({name:i,classname:o,verticalDirection:n,horizontalDirection:e})}}))})),{points:t}},computed:{style:function(){var t={};return this.width&&this.height&&(t.width="".concat(this.width,"px"),t.height="".concat(this.height,"px"),this.transitions&&this.transitions.enabled&&(t.transition="".concat(this.transitions.time,"ms ").concat(this.transitions.timingFunction))),t},classes:function(){var t=this.handlersClasses,e=this.handlersWrappersClasses,n=this.linesClasses,r=this.linesWrappersClasses;return{root:Qs(),handlers:t,handlersWrappers:e,lines:n,linesWrappers:r}},lineNodes:function(){var t=this,e=[];return this.points.forEach((function(n){n.horizontalDirection&&n.verticalDirection||!t.lines[n.name]||e.push({name:n.name,component:t.linesComponent,class:wt(t.classes.lines.default,t.classes.lines[n.name],!t.resizable&&t.classes.lines.disabled),wrapperClass:wt(t.classes.linesWrappers.default,t.classes.linesWrappers[n.name],!t.resizable&&t.classes.linesWrappers.disabled),hoverClass:t.classes.lines.hover,verticalDirection:n.verticalDirection,horizontalDirection:n.horizontalDirection,disabled:!t.resizable})})),e},handlerNodes:function(){var t=this,e=[],n=this.width,r=this.height;return this.points.forEach((function(i){if(t.handlers[i.name]){var o={name:i.name,component:t.handlersComponent,class:wt(t.classes.handlers.default,t.classes.handlers[i.name]),wrapperClass:wt(t.classes.handlersWrappers.default,t.classes.handlersWrappers[i.name]),hoverClass:t.classes.handlers.hover,verticalDirection:i.verticalDirection,horizontalDirection:i.horizontalDirection,disabled:!t.resizable};if(n&&r){var a=i.horizontalDirection,s=i.verticalDirection,l=a==="east"?n:a==="west"?0:n/2,u=s==="south"?r:s==="north"?0:r/2;o.wrapperClass=Qs("handler"),o.wrapperStyle={transform:"translate(".concat(l,"px, ").concat(u,"px)")},t.transitions&&t.transitions.enabled&&(o.wrapperStyle.transition="".concat(t.transitions.time,"ms ").concat(t.transitions.timingFunction))}else o.wrapperClass=Qs("handler",un({},i.classname,!0));e.push(o)}})),e}},beforeMount:function(){window.addEventListener("mouseup",this.onMouseUp,{passive:!1}),window.addEventListener("mousemove",this.onMouseMove,{passive:!1}),window.addEventListener("touchmove",this.onTouchMove,{passive:!1}),window.addEventListener("touchend",this.onTouchEnd,{passive:!1})},beforeUnmount:function(){window.removeEventListener("mouseup",this.onMouseUp),window.removeEventListener("mousemove",this.onMouseMove),window.removeEventListener("touchmove",this.onTouchMove),window.removeEventListener("touchend",this.onTouchEnd)},mounted:function(){this.touches=[]},methods:{onEnd:function(){this.$emit("resize-end")},onHandlerDrag:function(t,e,n){var r,i=t.shift(),o=i.left,a=i.top,s={left:0,right:0,top:0,bottom:0};e==="west"?s.left-=o:e==="east"&&(s.right+=o),n==="north"?s.top-=a:n==="south"&&(s.bottom+=a),!n&&e?r="width":n&&!e&&(r="height"),this.resizable&&this.$emit("resize",new wR(s,{allowedDirections:{left:e==="west"||!e,right:e==="east"||!e,bottom:n==="south"||!n,top:n==="north"||!n},preserveAspectRatio:t.nativeEvent&&t.nativeEvent.shiftKey,respectDirection:r}))}},emits:["resize","resize-end"]};$v.render=function(t,e,n,r,i,o){return b(),ne("div",{ref:"box",class:o.classes.root,style:o.style},[Ue(t.$slots,"default"),j("div",null,[(b(!0),ne(Ie,null,qe(o.lineNodes,(function(a){return b(),ne($t(a.component),{key:a.name,"default-class":a.class,"hover-class":a.hoverClass,"wrapper-class":a.wrapperClass,position:a.name,disabled:a.disabled,onDrag:function(s){return o.onHandlerDrag(s,a.horizontalDirection,a.verticalDirection)},onDragEnd:e[1]||(e[1]=function(s){return o.onEnd()})},null,8,["default-class","hover-class","wrapper-class","position","disabled","onDrag"])})),128))]),(b(!0),ne(Ie,null,qe(o.handlerNodes,(function(a){return b(),ne("div",{key:a.name,style:a.wrapperStyle,class:a.wrapperClass},[(b(),ne($t(a.component),{"default-class":a.class,"hover-class":a.hoverClass,"wrapper-class":a.wrapperClass,"horizontal-position":a.horizontalDirection,"vertical-position":a.verticalDirection,disabled:a.disabled,onDrag:function(s){return o.onHandlerDrag(s,a.horizontalDirection,a.verticalDirection)},onDragEnd:e[2]||(e[2]=function(s){return o.onEnd()})},null,8,["default-class","hover-class","wrapper-class","horizontal-position","vertical-position","disabled","onDrag"]))],6)})),128))],6)};var WR=xn("vue-draggable-area"),Rv={name:"DraggableArea",props:{movable:{type:Boolean,default:!0},activationDistance:{type:Number,default:20}},computed:{classnames:function(){return{default:WR()}}},beforeMount:function(){window.addEventListener("mouseup",this.onMouseUp,{passive:!1}),window.addEventListener("mousemove",this.onMouseMove,{passive:!1}),window.addEventListener("touchmove",this.onTouchMove,{passive:!1}),window.addEventListener("touchend",this.onTouchEnd,{passive:!1})},beforeUnmount:function(){window.removeEventListener("mouseup",this.onMouseUp),window.removeEventListener("mousemove",this.onMouseMove),window.removeEventListener("touchmove",this.onTouchMove),window.removeEventListener("touchend",this.onTouchEnd)},mounted:function(){this.touches=[],this.touchStarted=!1},methods:{onTouchStart:function(t){if(t.cancelable){var e=this.movable&&t.touches.length===1;e&&(this.touches=Dr(t.touches)),(this.touchStarted||e)&&(t.preventDefault(),t.stopPropagation())}},onTouchEnd:function(){this.touchStarted=!1,this.processEnd()},onTouchMove:function(t){this.touches.length>=1&&(this.touchStarted?(this.processMove(t,t.touches),t.preventDefault(),t.stopPropagation()):Cv({x:this.touches[0].clientX,y:this.touches[0].clientY},{x:t.touches[0].clientX,y:t.touches[0].clientY})>this.activationDistance&&(this.initAnchor({clientX:t.touches[0].clientX,clientY:t.touches[0].clientY}),this.touchStarted=!0))},onMouseDown:function(t){if(this.movable&&t.button===0){var e={fake:!0,clientX:t.clientX,clientY:t.clientY};this.touches=[e],this.initAnchor(e),t.stopPropagation()}},onMouseMove:function(t){this.touches.length&&(this.processMove(t,[{fake:!0,clientX:t.clientX,clientY:t.clientY}]),t.preventDefault&&t.cancelable&&t.preventDefault(),t.stopPropagation())},onMouseUp:function(){this.processEnd()},initAnchor:function(t){var e=this.$refs.container.getBoundingClientRect(),n=e.left,r=e.top;this.anchor={x:t.clientX-n,y:t.clientY-r}},processMove:function(t,e){var n=Dr(e);if(this.touches.length){var r=this.$refs.container.getBoundingClientRect(),i=r.left,o=r.top;this.touches.length===1&&n.length===1&&this.$emit("move",new Hc({left:n[0].clientX-(i+this.anchor.x),top:n[0].clientY-(o+this.anchor.y)}))}},processEnd:function(){this.touches.length&&this.$emit("move-end"),this.touches=[]}},emits:["move","move-end"]};Rv.render=function(t,e,n,r,i,o){return b(),ne("div",{ref:"container",onTouchstart:e[1]||(e[1]=function(){return o.onTouchStart&&o.onTouchStart.apply(o,arguments)}),onMousedown:e[2]||(e[2]=function(){return o.onMouseDown&&o.onMouseDown.apply(o,arguments)})},[Ue(t.$slots,"default")],544)};function Xs(t){var e,n;return{rotate:t.rotate||0,flip:{horizontal:((e=t?.flip)===null||e===void 0?void 0:e.horizontal)||!1,vertical:((n=t?.flip)===null||n===void 0?void 0:n.vertical)||!1}}}function KR(t){return new Promise((function(e,n){try{if(t)if(/^data:/i.test(t))e((function(l){l=l.replace(/^data:([^;]+);base64,/gim,"");for(var u=atob(l),c=u.length,d=new ArrayBuffer(c),f=new Uint8Array(d),m=0;m<c;m++)f[m]=u.charCodeAt(m);return d})(t));else if(/^blob:/i.test(t)){var r=new FileReader;r.onload=function(l){e(l.target.result)},o=t,a=function(l){r.readAsArrayBuffer(l)},(s=new XMLHttpRequest).open("GET",o,!0),s.responseType="blob",s.onload=function(){this.status!=200&&this.status!==0||a(this.response)},s.send()}else{var i=new XMLHttpRequest;i.onreadystatechange=function(){i.readyState===4&&(i.status===200||i.status===0?e(i.response):n("Warning: could not load an image to parse its orientation"),i=null)},i.onprogress=function(){i.getResponseHeader("content-type")!=="image/jpeg"&&i.abort()},i.withCredentials=!1,i.open("GET",t,!0),i.responseType="arraybuffer",i.send(null)}else n("Error: the image is empty")}catch(l){n(l)}var o,a,s}))}function Pv(t){var e=t.rotate,n=t.flip,r=t.scaleX,i=t.scaleY,o="";return o+=" rotate("+e+"deg) ",o+=" scaleX("+r*(n.horizontal?-1:1)+") ",o+=" scaleY("+i*(n.vertical?-1:1)+") "}function YR(t){try{var e,n=new DataView(t),r=void 0,i=void 0,o=void 0,a=void 0;if(n.getUint8(0)===255&&n.getUint8(1)===216)for(var s=n.byteLength,l=2;l+1<s;){if(n.getUint8(l)===255&&n.getUint8(l+1)===225){o=l;break}l++}if(o&&(r=o+10,(function(m,p,h){var v,C="";for(v=p,h+=p;v<h;v++)C+=String.fromCharCode(m.getUint8(v));return C})(n,o+4,4)==="Exif")){var u=n.getUint16(r);if(((i=u===18761)||u===19789)&&n.getUint16(r+2,i)===42){var c=n.getUint32(r+4,i);c>=8&&(a=r+c)}}if(a){for(var d=n.getUint16(a,i),f=0;f<d;f++)if(l=a+12*f+2,n.getUint16(l,i)===274){l+=8,e=n.getUint16(l,i),n.setUint16(l,1,i);break}}return e}catch{return null}}function ip(t,e){var n=e.getBoundingClientRect(),r=n.left,i=n.top,o={left:0,top:0},a=0;return t.forEach((function(s){o.left+=(s.clientX-r)/t.length,o.top+=(s.clientY-i)/t.length})),t.forEach((function(s){a+=Cv({x:o.left,y:o.top},{x:s.clientX-r,y:s.clientY-i})})),{centerMass:o,spread:a,count:t.length}}var kv={props:{touchMove:{type:Boolean,required:!0},mouseMove:{type:Boolean,required:!0},touchResize:{type:Boolean,required:!0},wheelResize:{type:[Boolean,Object],required:!0},eventsFilter:{type:Function,required:!1}},beforeMount:function(){window.addEventListener("mouseup",this.onMouseUp,{passive:!1}),window.addEventListener("mousemove",this.onMouseMove,{passive:!1}),window.addEventListener("touchmove",this.onTouchMove,{passive:!1}),window.addEventListener("touchend",this.onTouchEnd,{passive:!1})},beforeUnmount:function(){window.removeEventListener("mouseup",this.onMouseUp),window.removeEventListener("mousemove",this.onMouseMove),window.removeEventListener("touchmove",this.onTouchMove),window.removeEventListener("touchend",this.onTouchEnd)},created:function(){this.transforming=!1,this.debouncedProcessEnd=Hl(this.processEnd),this.touches=[]},methods:{processMove:function(t,e){if(this.touches.length){if(this.touches.length===1&&e.length===1)this.$emit("move",new $i({left:this.touches[0].clientX-e[0].clientX,top:this.touches[0].clientY-e[0].clientY}));else if(this.touches.length>1&&this.touchResize){var n=ip(e,this.$refs.container),r=this.oldGeometricProperties;r.count===n.count&&r.count>1&&this.$emit("resize",new $i({left:r.centerMass.left-n.centerMass.left,top:r.centerMass.top-n.centerMass.top},{factor:r.spread/n.spread,center:n.centerMass})),this.oldGeometricProperties=n}this.touches=e}},processEnd:function(){this.transforming&&(this.transforming=!1,this.$emit("transform-end"))},processStart:function(){this.transforming=!0,this.debouncedProcessEnd.clear()},processEvent:function(t){return this.eventsFilter?this.eventsFilter(t,this.transforming)!==!1:(t.preventDefault(),t.stopPropagation(),!0)},onTouchStart:function(t){if(t.cancelable&&(this.touchMove||this.touchResize&&t.touches.length>1)&&this.processEvent(t)){var e=this.$refs.container,n=e.getBoundingClientRect(),r=n.left,i=n.top,o=n.bottom,a=n.right;this.touches=Dr(t.touches).filter((function(s){return s.clientX>r&&s.clientX<a&&s.clientY>i&&s.clientY<o})),this.oldGeometricProperties=ip(this.touches,e)}},onTouchEnd:function(t){t.touches.length===0&&(this.touches=[],this.processEnd())},onTouchMove:function(t){var e=this;if(this.touches.length){var n=Dr(t.touches).filter((function(r){return!r.identifier||e.touches.find((function(i){return i.identifier===r.identifier}))}));this.processEvent(t)&&(this.processMove(t,n),this.processStart())}},onMouseDown:function(t){if(this.mouseMove&&"buttons"in t&&t.buttons===1&&this.processEvent(t)){var e={fake:!0,clientX:t.clientX,clientY:t.clientY};this.touches=[e],this.processStart()}},onMouseMove:function(t){this.touches.length&&this.processEvent(t)&&this.processMove(t,[{clientX:t.clientX,clientY:t.clientY}])},onMouseUp:function(){this.touches=[],this.processEnd()},onWheel:function(t){if(this.wheelResize&&this.processEvent(t)){var e=this.$refs.container.getBoundingClientRect(),n=e.left,r=e.top,i=1+this.wheelResize.ratio*(a=t.deltaY||t.detail||t.wheelDelta,(s=+a)==0||Sv(s)?s:s>0?1:-1),o={left:t.clientX-n,top:t.clientY-r};this.$emit("resize",new $i({},{factor:i,center:o})),this.touches.length||this.debouncedProcessEnd()}var a,s}},emits:["resize","move","transform-end"]};kv.render=function(t,e,n,r,i,o){return b(),ne("div",{ref:"container",onTouchstart:e[1]||(e[1]=function(){return o.onTouchStart&&o.onTouchStart.apply(o,arguments)}),onMousedown:e[2]||(e[2]=function(){return o.onMouseDown&&o.onMouseDown.apply(o,arguments)}),onWheel:e[3]||(e[3]=function(){return o.onWheel&&o.onWheel.apply(o,arguments)})},[Ue(t.$slots,"default")],544)};var Yl={components:{TransformableImage:kv},props:{touchMove:{type:Boolean,required:!0},mouseMove:{type:Boolean,required:!0},touchResize:{type:Boolean,required:!0},wheelResize:{type:[Boolean,Object],required:!0}},emits:["resize","move"]};Yl.render=function(t,e,n,r,i,o){var a=ze("transformable-image");return b(),ne(a,{"touch-move":n.touchMove,"touch-resize":n.touchResize,"mouse-move":n.mouseMove,"wheel-resize":n.wheelResize,onMove:e[1]||(e[1]=function(s){return t.$emit("move",s)}),onResize:e[2]||(e[2]=function(s){return t.$emit("resize",s)})},{default:we((function(){return[Ue(t.$slots,"default")]})),_:3},8,["touch-move","touch-resize","mouse-move","wheel-resize"])};var Lo=xn("vue-preview"),Iv={props:{coordinates:{type:Object},transitions:{type:Object},image:{type:Object,default:function(){return{}}},imageClass:{type:String},width:{type:Number},height:{type:Number},fill:{type:Boolean}},data:function(){return{calculatedImageSize:{width:0,height:0},calculatedSize:{width:0,height:0}}},computed:{classes:function(){return{root:Lo({fill:this.fill}),wrapper:Lo("wrapper"),imageWrapper:Lo("image-wrapper"),image:wt(Lo("image"),this.imageClass)}},style:function(){if(this.fill)return{};var t={};return this.width&&(t.width="".concat(this.size.width,"px")),this.height&&(t.height="".concat(this.size.height,"px")),this.transitions&&this.transitions.enabled&&(t.transition="".concat(this.transitions.time,"ms ").concat(this.transitions.timingFunction)),t},wrapperStyle:function(){var t={width:"".concat(this.size.width,"px"),height:"".concat(this.size.height,"px"),left:"calc(50% - ".concat(this.size.width/2,"px)"),top:"calc(50% - ".concat(this.size.height/2,"px)")};return this.transitions&&this.transitions.enabled&&(t.transition="".concat(this.transitions.time,"ms ").concat(this.transitions.timingFunction)),t},imageStyle:function(){if(this.coordinates&&this.image){var t=this.coordinates.width/this.size.width,e=tt(tt({rotate:0,flip:{horizontal:!1,vertical:!1}},this.image.transforms),{},{scaleX:1/t,scaleY:1/t}),n=this.imageSize.width,r=this.imageSize.height,i=Ov({width:n,height:r},e.rotate),o={width:"".concat(n,"px"),height:"".concat(r,"px"),left:"0px",top:"0px"},a={rotate:{left:(n-i.width)*e.scaleX/2,top:(r-i.height)*e.scaleY/2},scale:{left:(1-e.scaleX)*n/2,top:(1-e.scaleY)*r/2}};return o.transform=`translate(
25
+ `.concat(-this.coordinates.left/t-a.rotate.left-a.scale.left,"px,").concat(-this.coordinates.top/t-a.rotate.top-a.scale.top,"px) ")+Pv(e),this.transitions&&this.transitions.enabled&&(o.transition="".concat(this.transitions.time,"ms ").concat(this.transitions.timingFunction)),o}return{}},size:function(){return{width:this.width||this.calculatedSize.width,height:this.height||this.calculatedSize.height}},imageSize:function(){return{width:this.image.width||this.calculatedImageSize.width,height:this.image.height||this.calculatedImageSize.height}}},watch:{image:function(t){(t.width||t.height)&&this.onChangeImage()}},mounted:function(){var t=this;this.onChangeImage(),this.$refs.image.addEventListener("load",(function(){t.refreshImage()})),window.addEventListener("resize",this.refresh),window.addEventListener("orientationchange",this.refresh)},unmounted:function(){window.removeEventListener("resize",this.refresh),window.removeEventListener("orientationchange",this.refresh)},methods:{refreshImage:function(){var t=this.$refs.image;this.calculatedImageSize.height=t.naturalHeight,this.calculatedImageSize.width=t.naturalWidth},refresh:function(){var t=this.$refs.root;this.width||(this.calculatedSize.width=t.clientWidth),this.height||(this.calculatedSize.height=t.clientHeight)},onChangeImage:function(){var t=this.$refs.image;t&&t.complete&&this.refreshImage(),this.refresh()}}};Iv.render=function(t,e,n,r,i,o){return b(),ne("div",{ref:"root",class:o.classes.root,style:o.style},[j("div",{ref:"wrapper",class:o.classes.wrapper,style:o.wrapperStyle},[st(j("img",{ref:"image",src:n.image&&n.image.src,class:o.classes.image,style:o.imageStyle},null,14,["src"]),[[En,n.image&&n.image.src]])],6)],6)};var Mv={components:{Preview:Iv},inheritAttrs:!1};Mv.render=function(t,e,n,r,i,o){var a=ze("preview");return b(),ne(a,Ye(t.$attrs,{fill:!0}),null,16)};var Js=xn("vue-rectangle-stencil"),Fv={name:"RectangleStencil",components:{StencilPreview:Mv,BoundingBox:$v,DraggableArea:Rv},props:{image:{type:Object},coordinates:{type:Object},stencilCoordinates:{type:Object},handlers:{type:Object},handlersComponent:{type:[Object,String],default:function(){return Wc}},lines:{type:Object},linesComponent:{type:[Object,String],default:function(){return Kc}},aspectRatio:{type:[Number,String]},minAspectRatio:{type:[Number,String]},maxAspectRatio:{type:[Number,String]},movable:{type:Boolean,default:!0},resizable:{type:Boolean,default:!0},transitions:{type:Object},movingClass:{type:String},resizingClass:{type:String},previewClass:{type:String},boundingBoxClass:{type:String},linesClasses:{type:Object,default:function(){return{}}},linesWrappersClasses:{type:Object,default:function(){return{}}},handlersClasses:{type:Object,default:function(){return{}}},handlersWrappersClasses:{type:Object,default:function(){return{}}}},data:function(){return{moving:!1,resizing:!1}},computed:{classes:function(){return{stencil:wt(Js({movable:this.movable,moving:this.moving,resizing:this.resizing}),this.moving&&this.movingClass,this.resizing&&this.resizingClass),preview:wt(Js("preview"),this.previewClass),boundingBox:wt(Js("bounding-box"),this.boundingBoxClass)}},style:function(){var t=this.stencilCoordinates,e=t.height,n=t.width,r=t.left,i=t.top,o={width:"".concat(n,"px"),height:"".concat(e,"px"),transform:"translate(".concat(r,"px, ").concat(i,"px)")};return this.transitions&&this.transitions.enabled&&(o.transition="".concat(this.transitions.time,"ms ").concat(this.transitions.timingFunction)),o}},methods:{onMove:function(t){this.$emit("move",t),this.moving=!0},onMoveEnd:function(){this.$emit("move-end"),this.moving=!1},onResize:function(t){this.$emit("resize",t),this.resizing=!0},onResizeEnd:function(){this.$emit("resize-end"),this.resizing=!1},aspectRatios:function(){return{minimum:this.aspectRatio||this.minAspectRatio,maximum:this.aspectRatio||this.maxAspectRatio}}},emits:["resize","resize-end","move","move-end"]};Fv.render=function(t,e,n,r,i,o){var a=ze("stencil-preview"),s=ze("draggable-area"),l=ze("bounding-box");return b(),ne("div",{class:o.classes.stencil,style:o.style},[j(l,{width:n.stencilCoordinates.width,height:n.stencilCoordinates.height,transitions:n.transitions,class:o.classes.boundingBox,handlers:n.handlers,"handlers-component":n.handlersComponent,"handlers-classes":n.handlersClasses,"handlers-wrappers-classes":n.handlersWrappersClasses,lines:n.lines,"lines-component":n.linesComponent,"lines-classes":n.linesClasses,"lines-wrappers-classes":n.linesWrappersClasses,resizable:n.resizable,onResize:o.onResize,onResizeEnd:o.onResizeEnd},{default:we((function(){return[j(s,{movable:n.movable,onMove:o.onMove,onMoveEnd:o.onMoveEnd},{default:we((function(){return[j(a,{image:n.image,coordinates:n.coordinates,width:n.stencilCoordinates.width,height:n.stencilCoordinates.height,class:o.classes.preview,transitions:n.transitions},null,8,["image","coordinates","width","height","class","transitions"])]})),_:1},8,["movable","onMove","onMoveEnd"])]})),_:1},8,["width","height","transitions","class","handlers","handlers-component","handlers-classes","handlers-wrappers-classes","lines","lines-component","lines-classes","lines-wrappers-classes","resizable","onResize","onResizeEnd"])],6)};var GR=["transitions"],Hn=xn("vue-advanced-cropper"),Dv={name:"Cropper",components:{BackgroundWrapper:Yl},props:{src:{type:String,default:null},stencilComponent:{type:[Object,String],default:function(){return Fv}},backgroundWrapperComponent:{type:[Object,String],default:function(){return Yl}},stencilProps:{type:Object,default:function(){return{}}},autoZoom:{type:Boolean,default:!1},imageClass:{type:String},boundariesClass:{type:String},backgroundClass:{type:String},foregroundClass:{type:String},minWidth:{type:[Number,String]},minHeight:{type:[Number,String]},maxWidth:{type:[Number,String]},maxHeight:{type:[Number,String]},debounce:{type:[Boolean,Number],default:500},transitions:{type:Boolean,default:!0},checkOrientation:{type:Boolean,default:!0},canvas:{type:[Object,Boolean],default:!0},crossOrigin:{type:[Boolean,String],default:void 0},transitionTime:{type:Number,default:300},imageRestriction:{type:String,default:"fit-area",validator:function(t){return OR.indexOf(t)!==-1}},roundResult:{type:Boolean,default:!0},defaultSize:{type:[Function,Object]},defaultPosition:{type:[Function,Object]},defaultVisibleArea:{type:[Function,Object]},defaultTransforms:{type:[Function,Object]},defaultBoundaries:{type:[Function,String],validator:function(t){return!(typeof t=="string"&&t!=="fill"&&t!=="fit")}},priority:{type:String,default:"coordinates"},stencilSize:{type:[Object,Function]},resizeImage:{type:[Boolean,Object],default:!0},moveImage:{type:[Boolean,Object],default:!0},autoZoomAlgorithm:{type:Function},resizeAlgorithm:{type:Function,default:function(t){var e=t.event,n=t.coordinates,r=t.aspectRatio,i=t.positionRestrictions,o=t.sizeRestrictions,a=ke(ke({},n),{right:n.left+n.width,bottom:n.top+n.height}),s=e.params||{},l=ke({},e.directions),u=s.allowedDirections||{left:!0,right:!0,bottom:!0,top:!0};o.widthFrozen&&(l.left=0,l.right=0),o.heightFrozen&&(l.top=0,l.bottom=0),In.forEach((function(y){u[y]||(l[y]=0)}));var c=Pn(a,l=rp({coordinates:a,directions:l,sizeRestrictions:o,positionRestrictions:i})).width,d=Pn(a,l).height,f=s.preserveRatio?nt(a):Gs(c/d,r);if(f){var m=s.respectDirection;if(m||(m=a.width>=a.height||f===1?"width":"height"),m==="width"){var p=c/f-a.height;if(u.top&&u.bottom){var h=l.top,v=l.bottom;l.bottom=Do(p,v,h),l.top=Do(p,h,v)}else u.bottom?l.bottom=p:u.top?l.top=p:u.right?l.right=0:u.left&&(l.left=0)}else if(m==="height"){var C=a.width-d*f;if(u.left&&u.right){var S=l.left,w=l.right;l.left=-Do(C,S,w),l.right=-Do(C,w,S)}else u.left?l.left=-C:u.right?l.right=-C:u.top?l.top=0:u.bottom&&(l.bottom=0)}l=rp({directions:l,coordinates:a,sizeRestrictions:o,positionRestrictions:i,preserveRatio:!0,compensate:s.compensate})}return c=Pn(a,l).width,d=Pn(a,l).height,(f=s.preserveRatio?nt(a):Gs(c/d,r))&&Math.abs(f-c/d)>.001&&In.forEach((function(y){u[y]||(l[y]=0)})),Kl({event:new Hc({left:-l.left,top:-l.top}),coordinates:{width:n.width+l.right+l.left,height:n.height+l.top+l.bottom,left:n.left,top:n.top},positionRestrictions:i})}},moveAlgorithm:{type:Function,default:Kl},initStretcher:{type:Function,default:function(t){var e=t.stretcher,n=t.imageSize,r=nt(n);e.style.width=n.width+"px",e.style.height=e.clientWidth/r+"px",e.style.width=e.clientWidth+"px"}},fitCoordinates:{type:Function,default:function(t){var e=t.visibleArea,n=t.coordinates,r=t.aspectRatio,i=t.sizeRestrictions,o=t.positionRestrictions,a=ke(ke({},n),Jn({width:n.width,height:n.height,aspectRatio:r,sizeRestrictions:{maxWidth:e.width,maxHeight:e.height,minHeight:Math.min(e.height,i.minHeight),minWidth:Math.min(e.width,i.minWidth)}}));return a=Tt(a=Gt(a,ii(Et(n),Et(a))),qa(jn(e),o))}},fitVisibleArea:{type:Function,default:function(t){var e=t.visibleArea,n=t.boundaries,r=t.getAreaRestrictions,i=t.coordinates,o=ke({},e);o.height=o.width/nt(n),o.top+=(e.height-o.height)/2,(i.height-o.height>0||i.width-o.width>0)&&(o=fn(o,Math.max(i.height/o.height,i.width/o.width)));var a=Ba(ai(i,jn(o=fn(o,Ha(o,r({visibleArea:o,type:"resize"}))))));return o.width<i.width&&(a.left=0),o.height<i.height&&(a.top=0),o=Tt(o=Gt(o,a),r({visibleArea:o,type:"move"}))}},areaRestrictionsAlgorithm:{type:Function,default:function(t){var e=t.visibleArea,n=t.boundaries,r=t.imageSize,i=t.imageRestriction,o=t.type,a={};return i==="fill-area"?a={left:0,top:0,right:r.width,bottom:r.height}:i==="fit-area"&&(nt(n)>nt(r)?(a={top:0,bottom:r.height},e&&o==="move"&&(e.width>r.width?(a.left=-(e.width-r.width)/2,a.right=r.width-a.left):(a.left=0,a.right=r.width))):(a={left:0,right:r.width},e&&o==="move"&&(e.height>r.height?(a.top=-(e.height-r.height)/2,a.bottom=r.height-a.top):(a.top=0,a.bottom=r.height)))),a}},sizeRestrictionsAlgorithm:{type:Function,default:function(t){return{minWidth:t.minWidth,minHeight:t.minHeight,maxWidth:t.maxWidth,maxHeight:t.maxHeight}}},positionRestrictionsAlgorithm:{type:Function,default:function(t){var e=t.imageSize,n={};return t.imageRestriction!=="none"&&(n={left:0,top:0,right:e.width,bottom:e.height}),n}}},data:function(){return{transitionsActive:!1,imageLoaded:!1,imageAttributes:{width:null,height:null,crossOrigin:null,src:null},defaultImageTransforms:{rotate:0,flip:{horizontal:!1,vertical:!1}},appliedImageTransforms:{rotate:0,flip:{horizontal:!1,vertical:!1}},boundaries:{width:0,height:0},visibleArea:null,coordinates:tt({},Zf)}},computed:{image:function(){return{src:this.imageAttributes.src,width:this.imageAttributes.width,height:this.imageAttributes.height,transforms:this.imageTransforms}},imageTransforms:function(){return{rotate:this.appliedImageTransforms.rotate,flip:{horizontal:this.appliedImageTransforms.flip.horizontal,vertical:this.appliedImageTransforms.flip.vertical},translateX:this.visibleArea?this.visibleArea.left/this.coefficient:0,translateY:this.visibleArea?this.visibleArea.top/this.coefficient:0,scaleX:1/this.coefficient,scaleY:1/this.coefficient}},imageSize:function(){var t=(function(e){return e*Math.PI/180})(this.imageTransforms.rotate);return{width:Math.abs(this.imageAttributes.width*Math.cos(t))+Math.abs(this.imageAttributes.height*Math.sin(t)),height:Math.abs(this.imageAttributes.width*Math.sin(t))+Math.abs(this.imageAttributes.height*Math.cos(t))}},initialized:function(){return!!(this.visibleArea&&this.imageLoaded)},settings:function(){var t=ql(this.resizeImage,{touch:!0,wheel:{ratio:.1},adjustStencil:!0},{touch:!1,wheel:!1,adjustStencil:!1});return{moveImage:ql(this.moveImage,{touch:!0,mouse:!0},{touch:!1,mouse:!1}),resizeImage:t}},coefficient:function(){return this.visibleArea?this.visibleArea.width/this.boundaries.width:0},areaRestrictions:function(){return this.imageLoaded?this.areaRestrictionsAlgorithm({imageSize:this.imageSize,imageRestriction:this.imageRestriction,boundaries:this.boundaries}):{}},transitionsOptions:function(){return{enabled:this.transitionsActive,timingFunction:"ease-in-out",time:350}},sizeRestrictions:function(){if(this.boundaries.width&&this.boundaries.height&&this.imageSize.width&&this.imageSize.height){var t=this.sizeRestrictionsAlgorithm({imageSize:this.imageSize,minWidth:St(this.minWidth)?0:Mo(this.minWidth),minHeight:St(this.minHeight)?0:Mo(this.minHeight),maxWidth:St(this.maxWidth)?1/0:Mo(this.maxWidth),maxHeight:St(this.maxHeight)?1/0:Mo(this.maxHeight)});if(t=(function(r){var i=r.areaRestrictions,o=r.sizeRestrictions,a=r.boundaries,s=r.positionRestrictions,l=ke(ke({},o),{minWidth:o.minWidth!==void 0?o.minWidth:0,minHeight:o.minHeight!==void 0?o.minHeight:0,maxWidth:o.maxWidth!==void 0?o.maxWidth:1/0,maxHeight:o.maxHeight!==void 0?o.maxHeight:1/0});s.left!==void 0&&s.right!==void 0&&(l.maxWidth=Math.min(l.maxWidth,s.right-s.left)),s.bottom!==void 0&&s.top!==void 0&&(l.maxHeight=Math.min(l.maxHeight,s.bottom-s.top));var u=Wl(i),c=xv(a,u);return u.width<1/0&&(!l.maxWidth||l.maxWidth>c.width)&&(l.maxWidth=Math.min(l.maxWidth,c.width)),u.height<1/0&&(!l.maxHeight||l.maxHeight>c.height)&&(l.maxHeight=Math.min(l.maxHeight,c.height)),l.minWidth>l.maxWidth&&(l.minWidth=l.maxWidth,l.widthFrozen=!0),l.minHeight>l.maxHeight&&(l.minHeight=l.maxHeight,l.heightFrozen=!0),l})({sizeRestrictions:t,areaRestrictions:this.getAreaRestrictions({visibleArea:this.visibleArea,type:"resize"}),imageSize:this.imageSize,boundaries:this.boundaries,positionRestrictions:this.positionRestrictions,imageRestriction:this.imageRestriction,visibleArea:this.visibleArea,stencilSize:this.getStencilSize()}),this.visibleArea&&this.stencilSize){var e=this.getStencilSize(),n=Wl(this.getAreaRestrictions({visibleArea:this.visibleArea,type:"resize"}));t.maxWidth=Math.min(t.maxWidth,n.width*e.width/this.boundaries.width),t.maxHeight=Math.min(t.maxHeight,n.height*e.height/this.boundaries.height),t.maxWidth<t.minWidth&&(t.minWidth=t.maxWidth),t.maxHeight<t.minHeight&&(t.minHeight=t.maxHeight)}return t}return{minWidth:0,minHeight:0,maxWidth:0,maxHeight:0}},positionRestrictions:function(){return this.positionRestrictionsAlgorithm({imageSize:this.imageSize,imageRestriction:this.imageRestriction})},classes:function(){return{cropper:Hn(),image:wt(Hn("image"),this.imageClass),stencil:Hn("stencil"),boundaries:wt(Hn("boundaries"),this.boundariesClass),stretcher:wt(Hn("stretcher")),background:wt(Hn("background"),this.backgroundClass),foreground:wt(Hn("foreground"),this.foregroundClass),imageWrapper:wt(Hn("image-wrapper")),cropperWrapper:wt(Hn("cropper-wrapper"))}},stencilCoordinates:function(){if(this.initialized){var t=this.coordinates,e=t.width,n=t.height,r=t.left,i=t.top;return{width:e/this.coefficient,height:n/this.coefficient,left:(r-this.visibleArea.left)/this.coefficient,top:(i-this.visibleArea.top)/this.coefficient}}return this.defaultCoordinates()},boundariesStyle:function(){var t={width:this.boundaries.width?"".concat(Math.round(this.boundaries.width),"px"):"auto",height:this.boundaries.height?"".concat(Math.round(this.boundaries.height),"px"):"auto",transition:"opacity ".concat(this.transitionTime,"ms"),pointerEvents:this.imageLoaded?"all":"none"};return this.imageLoaded||(t.opacity="0"),t},imageStyle:function(){var t=this.imageAttributes.width>this.imageAttributes.height?{width:Math.min(1024,this.imageAttributes.width),height:Math.min(1024,this.imageAttributes.width)/(this.imageAttributes.width/this.imageAttributes.height)}:{height:Math.min(1024,this.imageAttributes.height),width:Math.min(1024,this.imageAttributes.height)*(this.imageAttributes.width/this.imageAttributes.height)},e={left:(t.width-this.imageSize.width)/(2*this.coefficient),top:(t.height-this.imageSize.height)/(2*this.coefficient)},n={left:(1-1/this.coefficient)*t.width/2,top:(1-1/this.coefficient)*t.height/2},r=tt(tt({},this.imageTransforms),{},{scaleX:this.imageTransforms.scaleX*(this.imageAttributes.width/t.width),scaleY:this.imageTransforms.scaleY*(this.imageAttributes.height/t.height)}),i={width:"".concat(t.width,"px"),height:"".concat(t.height,"px"),left:"0px",top:"0px",transform:"translate(".concat(-e.left-n.left-this.imageTransforms.translateX,"px, ").concat(-e.top-n.top-this.imageTransforms.translateY,"px)")+Pv(r)};return this.transitionsOptions.enabled&&(i.transition="".concat(this.transitionsOptions.time,"ms ").concat(this.transitionsOptions.timingFunction)),i}},watch:{src:function(){this.onChangeImage()},stencilComponent:function(){var t=this;this.$nextTick((function(){t.resetCoordinates(),t.runAutoZoom("setCoordinates"),t.onChange()}))},minWidth:function(){this.onPropsChange()},maxWidth:function(){this.onPropsChange()},minHeight:function(){this.onPropsChange()},maxHeight:function(){this.onPropsChange()},imageRestriction:function(){this.reset()},stencilProps:function(t,e){["aspectRatio","minAspectRatio","maxAspectRatio"].find((function(n){return t[n]!==e[n]}))&&this.$nextTick(this.onPropsChange)}},created:function(){this.debouncedUpdate=Hl(this.update,this.debounce),this.debouncedDisableTransitions=Hl(this.disableTransitions,this.transitionsOptions.time),this.awaiting=!1},mounted:function(){this.$refs.image.addEventListener("load",this.onSuccessLoadImage),this.$refs.image.addEventListener("error",this.onFailLoadImage),this.onChangeImage(),window.addEventListener("resize",this.refresh),window.addEventListener("orientationchange",this.refresh)},unmounted:function(){window.removeEventListener("resize",this.refresh),window.removeEventListener("orientationchange",this.refresh),this.imageAttributes.revoke&&this.imageAttributes.src&&URL.revokeObjectURL(this.imageAttributes.src),this.debouncedUpdate.clear(),this.debouncedDisableTransitions.clear()},methods:{getResult:function(){var t=this.initialized?this.prepareResult(tt({},this.coordinates)):this.defaultCoordinates(),e={rotate:this.imageTransforms.rotate%360,flip:tt({},this.imageTransforms.flip)};if(this.src&&this.imageLoaded){var n=this;return{image:this.image,coordinates:t,visibleArea:this.visibleArea?tt({},this.visibleArea):null,imageTransforms:e,get canvas(){return n.canvas?n.getCanvas():void 0}}}return{image:this.image,coordinates:t,visibleArea:this.visibleArea?tt({},this.visibleArea):null,canvas:void 0,imageTransforms:e}},zoom:function(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=n.transitions,i=r===void 0||r;this.onManipulateImage(new $i({},{factor:1/t,center:e}),{normalize:!1,transitions:i})},move:function(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=n.transitions,i=r===void 0||r;this.onManipulateImage(new $i({left:t||0,top:e||0}),{normalize:!1,transitions:i})},setCoordinates:function(t){var e=this,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=n.autoZoom,i=r===void 0||r,o=n.transitions,a=o===void 0||o;this.$nextTick((function(){e.imageLoaded?(e.transitionsActive||(a&&e.enableTransitions(),e.coordinates=e.applyTransform(t),i&&e.runAutoZoom("setCoordinates"),a&&e.debouncedDisableTransitions()),e.onChange()):e.delayedTransforms=t}))},refresh:function(){var t=this,e=this.$refs.image;if(this.src&&e)return this.initialized?this.updateVisibleArea().then((function(){t.onChange()})):this.resetVisibleArea().then((function(){t.onChange()}))},reset:function(){var t=this;return this.resetVisibleArea().then((function(){t.onChange(!1)}))},awaitRender:function(t){var e=this;this.awaiting||(this.awaiting=!0,this.$nextTick((function(){t(),e.awaiting=!1})))},prepareResult:function(t){return this.roundResult?(function(e){var n=e.coordinates,r=e.sizeRestrictions,i=e.positionRestrictions,o={width:Math.round(n.width),height:Math.round(n.height),left:Math.round(n.left),top:Math.round(n.top)};return o.width>r.maxWidth?o.width=Math.floor(n.width):o.width<r.minWidth&&(o.width=Math.ceil(n.width)),o.height>r.maxHeight?o.height=Math.floor(n.height):o.height<r.minHeight&&(o.height=Math.ceil(n.height)),Tt(o,i)})(tt(tt({},this.getPublicProperties()),{},{positionRestrictions:Fo(this.positionRestrictions,this.visibleArea),coordinates:t})):t},processAutoZoom:function(t,e,n,r){var i=this.autoZoomAlgorithm;i||(i=this.stencilSize?RR:this.autoZoom?PR:kR);var o=i({event:{type:t,params:r},visibleArea:e,coordinates:n,boundaries:this.boundaries,aspectRatio:this.getAspectRatio(),positionRestrictions:this.positionRestrictions,getAreaRestrictions:this.getAreaRestrictions,sizeRestrictions:this.sizeRestrictions,stencilSize:this.getStencilSize()});return tt(tt({},o),{},{changed:!ep(o.visibleArea,e)||!ep(o.coordinates,n)})},runAutoZoom:function(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=e.transitions,r=n!==void 0&&n,i=yR(e,GR),o=this.processAutoZoom(t,this.visibleArea,this.coordinates,i),a=o.visibleArea,s=o.coordinates,l=o.changed;r&&l&&this.enableTransitions(),this.visibleArea=a,this.coordinates=s,r&&l&&this.debouncedDisableTransitions()},normalizeEvent:function(t){return(function(e){var n=e.event,r=e.visibleArea,i=e.coefficient;if(n.type==="manipulateImage")return ke(ke({},n),{move:{left:n.move&&n.move.left?i*n.move.left:0,top:n.move&&n.move.top?i*n.move.top:0},scale:{factor:n.scale&&n.scale.factor?n.scale.factor:1,center:n.scale&&n.scale.center?{left:n.scale.center.left*i+r.left,top:n.scale.center.top*i+r.top}:null}});if(n.type==="resize"){var o=ke(ke({},n),{directions:ke({},n.directions)});return In.forEach((function(s){o.directions[s]*=i})),o}if(n.type==="move"){var a=ke(ke({},n),{directions:ke({},n.directions)});return xR.forEach((function(s){a.directions[s]*=i})),a}return n})(tt(tt({},this.getPublicProperties()),{},{event:t}))},getCanvas:function(){if(this.$refs.canvas){var t=this.$refs.canvas,e=this.$refs.image,n=this.imageTransforms.rotate!==0||this.imageTransforms.flip.horizontal||this.imageTransforms.flip.vertical?(function(s,l,u){var c=u.rotate,d=u.flip,f={width:l.naturalWidth,height:l.naturalHeight},m=Ov(f,c),p=s.getContext("2d");s.height=m.height,s.width=m.width,p.save();var h=sr(Et(ke({left:0,top:0},f)),c);return p.translate(-(h.left-m.width/2),-(h.top-m.height/2)),p.rotate(c*Math.PI/180),p.translate(d.horizontal?f.width:0,d.vertical?f.height:0),p.scale(d.horizontal?-1:1,d.vertical?-1:1),p.drawImage(l,0,0,f.width,f.height),p.restore(),s})(this.$refs.sourceCanvas,e,this.imageTransforms):e,r=tt({minWidth:0,minHeight:0,maxWidth:1/0,maxHeight:1/0,maxArea:this.maxCanvasSize,imageSmoothingEnabled:!0,imageSmoothingQuality:"high",fillColor:"transparent"},this.canvas),i=function(s){return s.find((function(l){return u=l,!Number.isNaN(parseFloat(u))&&isFinite(u);var u}))},o=Jn({sizeRestrictions:{minWidth:i([r.width,r.minWidth])||0,minHeight:i([r.height,r.minHeight])||0,maxWidth:i([r.width,r.maxWidth])||1/0,maxHeight:i([r.height,r.maxHeight])||1/0},width:this.coordinates.width,height:this.coordinates.height,aspectRatio:{minimum:this.coordinates.width/this.coordinates.height,maximum:this.coordinates.width/this.coordinates.height}});if(r.maxArea&&o.width*o.height>r.maxArea){var a=Math.sqrt(r.maxArea/(o.width*o.height));o={width:Math.round(a*o.width),height:Math.round(a*o.height)}}return(function(s,l,u,c,d){s.width=c?c.width:u.width,s.height=c?c.height:u.height;var f=s.getContext("2d");f.clearRect(0,0,s.width,s.height),d&&(d.imageSmoothingEnabled&&(f.imageSmoothingEnabled=d.imageSmoothingEnabled),d.imageSmoothingQuality&&(f.imageSmoothingQuality=d.imageSmoothingQuality),d.fillColor&&(f.fillStyle=d.fillColor,f.fillRect(0,0,s.width,s.height),f.save()));var m=u.left<0?-u.left:0,p=u.top<0?-u.top:0;f.drawImage(l,u.left+m,u.top+p,u.width,u.height,m*(s.width/u.width),p*(s.height/u.height),s.width,s.height)})(t,n,this.coordinates,o,r),t}},update:function(){this.$emit("change",this.getResult())},applyTransform:function(t){var e=arguments.length>1&&arguments[1]!==void 0&&arguments[1],n=this.visibleArea&&e?AR(this.sizeRestrictions,this.visibleArea):this.sizeRestrictions,r=this.visibleArea&&e?Fo(this.positionRestrictions,this.visibleArea):this.positionRestrictions;return $R({transform:t,coordinates:this.coordinates,imageSize:this.imageSize,sizeRestrictions:n,positionRestrictions:r,aspectRatio:this.getAspectRatio(),visibleArea:this.visibleArea})},resetCoordinates:function(){var t=this;if(this.$refs.image){this.$refs.cropper,this.$refs.image;var e=this.defaultSize;e||(e=this.stencilSize?FR:MR);var n=this.sizeRestrictions;n.minWidth,n.minHeight,n.maxWidth,n.maxHeight;var r=Nr(e)?e({boundaries:this.boundaries,imageSize:this.imageSize,aspectRatio:this.getAspectRatio(),sizeRestrictions:this.sizeRestrictions,stencilSize:this.getStencilSize(),visibleArea:this.visibleArea}):e,i=this.defaultPosition||IR,o=[r,function(a){var s=a.coordinates;return tt({},Nr(i)?i({coordinates:s,imageSize:t.imageSize,visibleArea:t.visibleArea}):t.defaultPosition)}];this.delayedTransforms&&o.push.apply(o,Dr(Array.isArray(this.delayedTransforms)?this.delayedTransforms:[this.delayedTransforms])),this.coordinates=this.applyTransform(o,!0),this.delayedTransforms=null}},clearImage:function(){var t=this;this.imageLoaded=!1,setTimeout((function(){var e=t.$refs.stretcher;e&&(e.style.height="auto",e.style.width="auto"),t.coordinates=t.defaultCoordinates(),t.boundaries={width:0,height:0}}),this.transitionTime)},enableTransitions:function(){this.transitions&&(this.transitionsActive=!0)},disableTransitions:function(){this.transitionsActive=!1},updateBoundaries:function(){var t=this,e=this.$refs.stretcher,n=this.$refs.cropper;return this.initStretcher({cropper:n,stretcher:e,imageSize:this.imageSize}),this.$nextTick().then((function(){var r={cropper:n,imageSize:t.imageSize};if(Nr(t.defaultBoundaries)?t.boundaries=t.defaultBoundaries(r):t.defaultBoundaries==="fit"?t.boundaries=(function(i){var o=i.cropper,a=i.imageSize,s=o.clientHeight,l=o.clientWidth,u=s,c=a.width*s/a.height;return c>l&&(c=l,u=a.height*l/a.width),{width:c,height:u}})(r):t.boundaries=(function(i){var o=i.cropper;return{width:o.clientWidth,height:o.clientHeight}})(r),!t.boundaries.width||!t.boundaries.height)throw new Error("It's impossible to fit the cropper in the current container")}))},resetVisibleArea:function(){var t=this;return this.appliedImageTransforms=tt(tt({},this.defaultImageTransforms),{},{flip:tt({},this.defaultImageTransforms.flip)}),this.updateBoundaries().then((function(){t.priority!=="visible-area"&&(t.visibleArea=null,t.resetCoordinates());var e,n,r,i,o,a,s=t.defaultVisibleArea||DR;t.visibleArea=Nr(s)?s({imageSize:t.imageSize,boundaries:t.boundaries,coordinates:t.priority!=="visible-area"?t.coordinates:null,getAreaRestrictions:t.getAreaRestrictions,stencilSize:t.getStencilSize()}):t.defaultVisibleArea,t.visibleArea=(e={visibleArea:t.visibleArea,boundaries:t.boundaries,getAreaRestrictions:t.getAreaRestrictions},n=e.visibleArea,r=e.boundaries,i=e.getAreaRestrictions,o=ke({},n),a=nt(r),o.width/o.height!==a&&(o.height=o.width/a),Tt(o,i({visibleArea:o,type:"move"}))),t.priority==="visible-area"?t.resetCoordinates():t.coordinates=t.fitCoordinates({visibleArea:t.visibleArea,coordinates:t.coordinates,aspectRatio:t.getAspectRatio(),positionRestrictions:t.positionRestrictions,sizeRestrictions:t.sizeRestrictions}),t.runAutoZoom("resetVisibleArea")})).catch((function(){t.visibleArea=null}))},updateVisibleArea:function(){var t=this;return this.updateBoundaries().then((function(){t.visibleArea=t.fitVisibleArea({imageSize:t.imageSize,boundaries:t.boundaries,visibleArea:t.visibleArea,coordinates:t.coordinates,getAreaRestrictions:t.getAreaRestrictions}),t.coordinates=t.fitCoordinates({visibleArea:t.visibleArea,coordinates:t.coordinates,aspectRatio:t.getAspectRatio(),positionRestrictions:t.positionRestrictions,sizeRestrictions:t.sizeRestrictions}),t.runAutoZoom("updateVisibleArea")})).catch((function(){t.visibleArea=null}))},onChange:function(){var t=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];t&&this.debounce?this.debouncedUpdate():this.update()},onChangeImage:function(){var t,e=this;if(this.imageLoaded=!1,this.delayedTransforms=null,this.src){if((function(i){if(Xf(i))return!1;var o=window.location,a=/(\w+:)?(?:\/\/)([\w.-]+)?(?::(\d+))?\/?/.exec(i)||[],s={protocol:a[1]||"",host:a[2]||"",port:a[3]||""},l=function(u){return u.port||((u.protocol||o.protocol)==="http"?80:433)};return!(!s.protocol&&!s.host&&!s.port||s.protocol&&s.protocol==o.protocol&&s.host&&s.host==o.host&&s.host&&l(s)==l(o))})(this.src)){var n=St(this.crossOrigin)?this.canvas:this.crossOrigin;n===!0&&(n="anonymous"),this.imageAttributes.crossOrigin=n||null}if(this.checkOrientation){var r=(t=this.src,new Promise((function(i){KR(t).then((function(o){var a=YR(o);i(o?{source:t,arrayBuffer:o,orientation:a}:{source:t,arrayBuffer:null,orientation:null})})).catch((function(o){console.warn(o),i({source:t,arrayBuffer:null,orientation:null})}))})));setTimeout((function(){r.then(e.onParseImage)}),this.transitionTime)}else setTimeout((function(){e.onParseImage({source:e.src})}),this.transitionTime)}else this.clearImage()},onFailLoadImage:function(){this.imageAttributes.src&&(this.clearImage(),this.$emit("error"))},onSuccessLoadImage:function(){var t=this,e=this.$refs.image;e&&!this.imageLoaded&&(this.imageAttributes.height=e.naturalHeight,this.imageAttributes.width=e.naturalWidth,this.imageLoaded=!0,this.resetVisibleArea().then((function(){t.$emit("ready"),t.onChange(!1)})))},onParseImage:function(t){var e=this,n=t.source,r=t.arrayBuffer,i=t.orientation;this.imageAttributes.revoke&&this.imageAttributes.src&&URL.revokeObjectURL(this.imageAttributes.src),this.imageAttributes.revoke=!1,r&&i&&i>1?wv(n)||!Xf(n)?(this.imageAttributes.src=URL.createObjectURL(new Blob([r])),this.imageAttributes.revoke=!0):this.imageAttributes.src=(function(o){for(var a=[],s=new Uint8Array(o);s.length>0;){var l=s.subarray(0,8192);a.push(String.fromCharCode.apply(null,Array.from?Array.from(l):l.slice())),s=s.subarray(8192)}return"data:image/jpeg;base64,"+btoa(a.join(""))})(r):this.imageAttributes.src=n,Nr(this.defaultTransforms)?this.appliedImageTransforms=Xs(this.defaultTransforms()):Zo(this.defaultTransforms)?this.appliedImageTransforms=Xs(this.defaultTransforms):this.appliedImageTransforms=(function(o){var a=Xs({});if(o)switch(o){case 2:a.flip.horizontal=!0;break;case 3:a.rotate=-180;break;case 4:a.flip.vertical=!0;break;case 5:a.rotate=90,a.flip.vertical=!0;break;case 6:a.rotate=90;break;case 7:a.rotate=90,a.flip.horizontal=!0;break;case 8:a.rotate=-90}return a})(i),this.defaultImageTransforms=tt(tt({},this.appliedImageTransforms),{},{flip:tt({},this.appliedImageTransforms.flip)}),this.$nextTick((function(){var o=e.$refs.image;o&&o.complete&&((function(a){return!!a.naturalWidth})(o)?e.onSuccessLoadImage():e.onFailLoadImage())}))},onResizeEnd:function(){this.runAutoZoom("resize",{transitions:!0})},onMoveEnd:function(){this.runAutoZoom("move",{transitions:!0})},onMove:function(t){var e=this;this.transitionsOptions.enabled||this.awaitRender((function(){e.coordinates=e.moveAlgorithm(tt(tt({},e.getPublicProperties()),{},{positionRestrictions:Fo(e.positionRestrictions,e.visibleArea),coordinates:e.coordinates,event:e.normalizeEvent(t)})),e.onChange()}))},onResize:function(t){var e=this;this.transitionsOptions.enabled||this.stencilSize&&!this.autoZoom||this.awaitRender((function(){var n=e.sizeRestrictions,r=Math.min(e.coordinates.width,e.coordinates.height,20*e.coefficient);e.coordinates=e.resizeAlgorithm(tt(tt({},e.getPublicProperties()),{},{positionRestrictions:Fo(e.positionRestrictions,e.visibleArea),sizeRestrictions:{maxWidth:Math.min(n.maxWidth,e.visibleArea.width),maxHeight:Math.min(n.maxHeight,e.visibleArea.height),minWidth:Math.max(n.minWidth,r),minHeight:Math.max(n.minHeight,r)},event:e.normalizeEvent(t)})),e.onChange(),e.ticking=!1}))},onManipulateImage:function(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.transitionsOptions.enabled){var n=e.transitions,r=n!==void 0&&n,i=e.normalize,o=i===void 0||i;r&&this.enableTransitions();var a=LR(tt(tt({},this.getPublicProperties()),{},{event:o?this.normalizeEvent(t):t,getAreaRestrictions:this.getAreaRestrictions,imageRestriction:this.imageRestriction,adjustStencil:!this.stencilSize&&this.settings.resizeImage.adjustStencil})),s=a.visibleArea,l=a.coordinates;this.visibleArea=s,this.coordinates=l,this.runAutoZoom("manipulateImage"),this.onChange(),r&&this.debouncedDisableTransitions()}},onPropsChange:function(){this.coordinates=this.applyTransform(this.coordinates,!0),this.onChange(!1)},getAreaRestrictions:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e=t.visibleArea,n=t.type,r=n===void 0?"move":n;return this.areaRestrictionsAlgorithm({boundaries:this.boundaries,imageSize:this.imageSize,imageRestriction:this.imageRestriction,visibleArea:e,type:r})},getAspectRatio:function(t){var e,n,r=this.stencilProps,i=r.aspectRatio,o=r.minAspectRatio,a=r.maxAspectRatio;if(this.$refs.stencil&&this.$refs.stencil.aspectRatios){var s=this.$refs.stencil.aspectRatios();e=s.minimum,n=s.maximum}if(St(e)&&(e=St(i)?o:i),St(n)&&(n=St(i)?a:i),!t&&(St(e)||St(n))){var l=this.getStencilSize(),u=l?nt(l):null;St(e)&&(e=Jf(u)?u:void 0),St(n)&&(n=Jf(u)?u:void 0)}return{minimum:e,maximum:n}},getStencilSize:function(){if(this.stencilSize)return t={currentStencilSize:{width:this.stencilCoordinates.width,height:this.stencilCoordinates.height},stencilSize:this.stencilSize,boundaries:this.boundaries,coefficient:this.coefficient,coordinates:this.coordinates,aspectRatio:this.getAspectRatio(!0)},e=t.boundaries,n=t.stencilSize,r=t.aspectRatio,Gs(nt(i=Nr(n)?n({boundaries:e,aspectRatio:r}):n),r)&&(i=Jn({sizeRestrictions:{maxWidth:e.width,maxHeight:e.height,minWidth:0,minHeight:0},width:i.width,height:i.height,aspectRatio:{minimum:r.minimum,maximum:r.maximum}})),(i.width>e.width||i.height>e.height)&&(i=Jn({sizeRestrictions:{maxWidth:e.width,maxHeight:e.height,minWidth:0,minHeight:0},width:i.width,height:i.height,aspectRatio:{minimum:nt(i),maximum:nt(i)}})),i;var t,e,n,r,i},getPublicProperties:function(){return{coefficient:this.coefficient,visibleArea:this.visibleArea,coordinates:this.coordinates,boundaries:this.boundaries,sizeRestrictions:this.sizeRestrictions,positionRestrictions:this.positionRestrictions,aspectRatio:this.getAspectRatio(),imageRestriction:this.imageRestriction}},defaultCoordinates:function(){return tt({},Zf)},flip:function(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=n.transitions,i=r===void 0||r;if(!this.transitionsActive){i&&this.enableTransitions();var o=tt({},this.imageTransforms.flip),a=VR({flip:{horizontal:t?!o.horizontal:o.horizontal,vertical:e?!o.vertical:o.vertical},previousFlip:o,rotate:this.imageTransforms.rotate,visibleArea:this.visibleArea,coordinates:this.coordinates,imageSize:this.imageSize,positionRestrictions:this.positionRestrictions,sizeRestrictions:this.sizeRestrictions,getAreaRestrictions:this.getAreaRestrictions,aspectRatio:this.getAspectRatio()}),s=a.visibleArea,l=a.coordinates;t&&(this.appliedImageTransforms.flip.horizontal=!this.appliedImageTransforms.flip.horizontal),e&&(this.appliedImageTransforms.flip.vertical=!this.appliedImageTransforms.flip.vertical),this.visibleArea=s,this.coordinates=l,this.onChange(),i&&this.debouncedDisableTransitions()}},rotate:function(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=e.transitions,r=n===void 0||n;if(!this.transitionsActive){r&&this.enableTransitions();var i=tt({},this.imageSize);this.appliedImageTransforms.rotate+=t;var o=jR({visibleArea:this.visibleArea,coordinates:this.coordinates,previousImageSize:i,imageSize:this.imageSize,angle:t,positionRestrictions:this.positionRestrictions,sizeRestrictions:this.sizeRestrictions,getAreaRestrictions:this.getAreaRestrictions,aspectRatio:this.getAspectRatio()}),a=o.visibleArea,s=o.coordinates,l=this.processAutoZoom("rotateImage",a,s);a=l.visibleArea,s=l.coordinates,this.visibleArea=a,this.coordinates=s,this.onChange(),r&&this.debouncedDisableTransitions()}}},emits:["change","error","ready"]},QR={key:0,ref:"canvas",style:{display:"none"}},XR={key:1,ref:"sourceCanvas",style:{display:"none"}};Dv.render=function(t,e,n,r,i,o){return b(),ne("div",{ref:"cropper",class:o.classes.cropper},[j("div",{ref:"stretcher",class:o.classes.stretcher},null,2),j("div",{class:o.classes.boundaries,style:o.boundariesStyle},[(b(),ne($t(n.backgroundWrapperComponent),{class:o.classes.cropperWrapper,"wheel-resize":o.settings.resizeImage.wheel,"touch-resize":o.settings.resizeImage.touch,"touch-move":o.settings.moveImage.touch,"mouse-move":o.settings.moveImage.mouse,onMove:o.onManipulateImage,onResize:o.onManipulateImage},{default:we((function(){return[j("div",{class:o.classes.background,style:o.boundariesStyle},null,6),j("div",{class:o.classes.imageWrapper},[j("img",{ref:"image",crossorigin:i.imageAttributes.crossOrigin,src:i.imageAttributes.src,class:o.classes.image,style:o.imageStyle,onMousedown:e[1]||(e[1]=Qe((function(){}),["prevent"]))},null,46,["crossorigin","src"])],2),j("div",{class:o.classes.foreground,style:o.boundariesStyle},null,6),st((b(),ne($t(n.stencilComponent),Ye({ref:"stencil",image:o.image,coordinates:i.coordinates,"stencil-coordinates":o.stencilCoordinates,transitions:o.transitionsOptions},n.stencilProps,{onResize:o.onResize,onResizeEnd:o.onResizeEnd,onMove:o.onMove,onMoveEnd:o.onMoveEnd}),null,16,["image","coordinates","stencil-coordinates","transitions","onResize","onResizeEnd","onMove","onMoveEnd"])),[[En,i.imageLoaded]]),n.canvas?(b(),ne("canvas",QR,null,512)):ue("",!0),n.canvas?(b(),ne("canvas",XR,null,512)):ue("",!0)]})),_:1},8,["class","wheel-resize","touch-resize","touch-move","mouse-move","onMove","onResize"]))],6)],2)};const _r=typeof window<"u",Lv=_r&&!("onscroll"in window)||typeof navigator<"u"&&/(gle|ing|ro)bot|crawl|spider/i.test(navigator.userAgent),jv=_r&&window.devicePixelRatio>1,JR={elements_selector:".lazy",container:Lv||_r?document:null,threshold:300,thresholds:null,data_src:"src",data_srcset:"srcset",data_sizes:"sizes",data_bg:"bg",data_bg_hidpi:"bg-hidpi",data_bg_multi:"bg-multi",data_bg_multi_hidpi:"bg-multi-hidpi",data_bg_set:"bg-set",data_poster:"poster",class_applied:"applied",class_loading:"loading",class_loaded:"loaded",class_error:"error",class_entered:"entered",class_exited:"exited",unobserve_completed:!0,unobserve_entered:!1,cancel_on_exit:!0,callback_enter:null,callback_exit:null,callback_applied:null,callback_loading:null,callback_loaded:null,callback_error:null,callback_finish:null,callback_cancel:null,use_native:!1,restore_on_error:!1},Vv=t=>Object.assign({},JR,t),op=function(t,e){let n;const r="LazyLoad::Initialized",i=new t(e);try{n=new CustomEvent(r,{detail:{instance:i}})}catch{n=document.createEvent("CustomEvent"),n.initCustomEvent(r,!1,!1,{instance:i})}window.dispatchEvent(n)},ZR=(t,e)=>{if(e)if(e.length)for(let n,r=0;n=e[r];r+=1)op(t,n);else op(t,e)},tr="src",Yc="srcset",Gc="sizes",zv="poster",ao="llOriginalAttrs",Nv="data",Qc="loading",Uv="loaded",Bv="applied",eP="entered",Xc="error",Hv="native",qv="data-",Wv="ll-status",Qt=(t,e)=>t.getAttribute(qv+e),tP=(t,e,n)=>{const r=qv+e;n!==null?t.setAttribute(r,n):t.removeAttribute(r)},so=t=>Qt(t,Wv),Vr=(t,e)=>tP(t,Wv,e),Wa=t=>Vr(t,null),Jc=t=>so(t)===null,nP=t=>so(t)===Qc,rP=t=>so(t)===Xc,Zc=t=>so(t)===Hv,iP=[Qc,Uv,Bv,Xc],oP=t=>iP.indexOf(so(t))>=0,yr=(t,e,n,r)=>{t&&typeof t=="function"&&(r===void 0?n===void 0?t(e):t(e,n):t(e,n,r))},hi=(t,e)=>{_r&&e!==""&&t.classList.add(e)},kn=(t,e)=>{_r&&e!==""&&t.classList.remove(e)},aP=t=>{t.llTempImage=document.createElement("IMG")},sP=t=>{delete t.llTempImage},Kv=t=>t.llTempImage,Ka=(t,e)=>{if(!e)return;const n=e._observer;n&&n.unobserve(t)},lP=t=>{t.disconnect()},cP=(t,e,n)=>{e.unobserve_entered&&Ka(t,n)},eu=(t,e)=>{t&&(t.loadingCount+=e)},uP=t=>{t&&(t.toLoadCount-=1)},Yv=(t,e)=>{t&&(t.toLoadCount=e)},dP=t=>t.loadingCount>0,fP=t=>t.toLoadCount>0,Gv=t=>{let e=[];for(let n,r=0;n=t.children[r];r+=1)n.tagName==="SOURCE"&&e.push(n);return e},tu=(t,e)=>{const n=t.parentNode;n&&n.tagName==="PICTURE"&&Gv(n).forEach(e)},Qv=(t,e)=>{Gv(t).forEach(e)},Ya=[tr],Xv=[tr,zv],Ui=[tr,Yc,Gc],Jv=[Nv],Ga=t=>!!t[ao],Zv=t=>t[ao],eg=t=>delete t[ao],si=(t,e)=>{if(Ga(t))return;const n={};e.forEach((r=>{n[r]=t.getAttribute(r)})),t[ao]=n},pP=t=>{Ga(t)||(t[ao]={backgroundImage:t.style.backgroundImage})},Lr=(t,e)=>{if(!Ga(t))return;const n=Zv(t);e.forEach((r=>{((i,o,a)=>{a?i.setAttribute(o,a):i.removeAttribute(o)})(t,r,n[r])}))},hP=t=>{if(!Ga(t))return;const e=Zv(t);t.style.backgroundImage=e.backgroundImage},tg=(t,e,n)=>{hi(t,e.class_applied),Vr(t,Bv),n&&(e.unobserve_completed&&Ka(t,e),yr(e.callback_applied,t,n))},ng=(t,e,n)=>{hi(t,e.class_loading),Vr(t,Qc),n&&(eu(n,1),yr(e.callback_loading,t,n))},fr=(t,e,n)=>{n&&t.setAttribute(e,n)},ap=(t,e)=>{fr(t,Gc,Qt(t,e.data_sizes)),fr(t,Yc,Qt(t,e.data_srcset)),fr(t,tr,Qt(t,e.data_src))},mP=(t,e)=>{tu(t,(n=>{si(n,Ui),ap(n,e)})),si(t,Ui),ap(t,e)},vP=(t,e)=>{si(t,Ya),fr(t,tr,Qt(t,e.data_src))},gP=(t,e)=>{Qv(t,(n=>{si(n,Ya),fr(n,tr,Qt(n,e.data_src))})),si(t,Xv),fr(t,zv,Qt(t,e.data_poster)),fr(t,tr,Qt(t,e.data_src)),t.load()},_P=(t,e)=>{si(t,Jv),fr(t,Nv,Qt(t,e.data_src))},yP=(t,e,n)=>{const r=Qt(t,e.data_bg),i=Qt(t,e.data_bg_hidpi),o=jv&&i?i:r;o&&(t.style.backgroundImage=`url("${o}")`,Kv(t).setAttribute(tr,o),ng(t,e,n))},bP=(t,e,n)=>{const r=Qt(t,e.data_bg_multi),i=Qt(t,e.data_bg_multi_hidpi),o=jv&&i?i:r;o&&(t.style.backgroundImage=o,tg(t,e,n))},wP=(t,e,n)=>{const r=Qt(t,e.data_bg_set);if(!r)return;let i=r.split("|").map((o=>`image-set(${o})`));t.style.backgroundImage=i.join(),tg(t,e,n)},rg={IMG:mP,IFRAME:vP,VIDEO:gP,OBJECT:_P},SP=(t,e)=>{const n=rg[t.tagName];n&&n(t,e)},CP=(t,e,n)=>{const r=rg[t.tagName];r&&(r(t,e),ng(t,e,n))},EP=["IMG","IFRAME","VIDEO","OBJECT"],TP=t=>EP.indexOf(t.tagName)>-1,ig=(t,e)=>{!e||dP(e)||fP(e)||yr(t.callback_finish,e)},sp=(t,e,n)=>{t.addEventListener(e,n),t.llEvLisnrs[e]=n},xP=(t,e,n)=>{t.removeEventListener(e,n)},nu=t=>!!t.llEvLisnrs,OP=(t,e,n)=>{nu(t)||(t.llEvLisnrs={});const r=t.tagName==="VIDEO"?"loadeddata":"load";sp(t,r,e),sp(t,"error",n)},Gl=t=>{if(!nu(t))return;const e=t.llEvLisnrs;for(let n in e){const r=e[n];xP(t,n,r)}delete t.llEvLisnrs},og=(t,e,n)=>{sP(t),eu(n,-1),uP(n),kn(t,e.class_loading),e.unobserve_completed&&Ka(t,n)},AP=(t,e,n,r)=>{const i=Zc(e);og(e,n,r),hi(e,n.class_loaded),Vr(e,Uv),yr(n.callback_loaded,e,r),i||ig(n,r)},$P=(t,e,n,r)=>{const i=Zc(e);og(e,n,r),hi(e,n.class_error),Vr(e,Xc),yr(n.callback_error,e,r),n.restore_on_error&&Lr(e,Ui),i||ig(n,r)},Ql=(t,e,n)=>{const r=Kv(t)||t;nu(r)||OP(r,(i=>{AP(0,t,e,n),Gl(r)}),(i=>{$P(0,t,e,n),Gl(r)}))},Xl=(t,e,n)=>{TP(t)?((r,i,o)=>{Ql(r,i,o),CP(r,i,o)})(t,e,n):((r,i,o)=>{aP(r),Ql(r,i,o),pP(r),yP(r,i,o),bP(r,i,o),wP(r,i,o)})(t,e,n)},RP=(t,e,n)=>{t.setAttribute("loading","lazy"),Ql(t,e,n),SP(t,e),Vr(t,Hv)},lp=t=>{t.removeAttribute(tr),t.removeAttribute(Yc),t.removeAttribute(Gc)},PP=t=>{tu(t,(e=>{lp(e)})),lp(t)},ag=t=>{tu(t,(e=>{Lr(e,Ui)})),Lr(t,Ui)},kP=t=>{Qv(t,(e=>{Lr(e,Ya)})),Lr(t,Xv),t.load()},IP=t=>{Lr(t,Ya)},MP=t=>{Lr(t,Jv)},FP={IMG:ag,IFRAME:IP,VIDEO:kP,OBJECT:MP},DP=(t,e)=>{(n=>{const r=FP[n.tagName];r?r(n):hP(n)})(t),((n,r)=>{Jc(n)||Zc(n)||(kn(n,r.class_entered),kn(n,r.class_exited),kn(n,r.class_applied),kn(n,r.class_loading),kn(n,r.class_loaded),kn(n,r.class_error))})(t,e),Wa(t),eg(t)},LP=(t,e,n,r)=>{n.cancel_on_exit&&nP(t)&&t.tagName==="IMG"&&(Gl(t),PP(t),ag(t),kn(t,n.class_loading),eu(r,-1),Wa(t),yr(n.callback_cancel,t,e,r))},jP=(t,e,n,r)=>{const i=oP(t);Vr(t,eP),hi(t,n.class_entered),kn(t,n.class_exited),cP(t,n,r),yr(n.callback_enter,t,e,r),i||Xl(t,n,r)},VP=(t,e,n,r)=>{Jc(t)||(hi(t,n.class_exited),LP(t,e,n,r),yr(n.callback_exit,t,e,r))},zP=["IMG","IFRAME","VIDEO"],sg=t=>t.use_native&&"loading"in HTMLImageElement.prototype,NP=(t,e,n)=>{t.forEach((r=>{zP.indexOf(r.tagName)!==-1&&RP(r,e,n)})),Yv(n,0)},UP=t=>t.isIntersecting||t.intersectionRatio>0,BP=(t,e)=>{e.forEach((n=>{t.observe(n)}))},HP=(t,e)=>{lP(t),BP(t,e)},qP=(t,e)=>{sg(t)||(e._observer=new IntersectionObserver((n=>{((r,i,o)=>{r.forEach((a=>UP(a)?jP(a.target,a,i,o):VP(a.target,a,i,o)))})(n,t,e)}),(n=>({root:n.container===document?null:n.container,rootMargin:n.thresholds||n.threshold+"px"}))(t)))},lg=t=>Array.prototype.slice.call(t),va=t=>t.container.querySelectorAll(t.elements_selector),WP=t=>lg(t).filter(Jc),KP=t=>rP(t),YP=t=>lg(t).filter(KP),cp=(t,e)=>WP(t||va(e)),GP=(t,e)=>{YP(va(t)).forEach((n=>{kn(n,t.class_error),Wa(n)})),e.update()},QP=(t,e)=>{_r&&(e._onlineHandler=()=>{GP(t,e)},window.addEventListener("online",e._onlineHandler))},XP=t=>{_r&&window.removeEventListener("online",t._onlineHandler)},Wr=function(t,e){const n=Vv(t);this._settings=n,this.loadingCount=0,qP(n,this),QP(n,this),this.update(e)};Wr.prototype={update:function(t){const e=this._settings,n=cp(t,e);Yv(this,n.length),Lv?this.loadAll(n):sg(e)?NP(n,e,this):HP(this._observer,n)},destroy:function(){this._observer&&this._observer.disconnect(),XP(this),va(this._settings).forEach((t=>{eg(t)})),delete this._observer,delete this._settings,delete this._onlineHandler,delete this.loadingCount,delete this.toLoadCount},loadAll:function(t){const e=this._settings;cp(t,e).forEach((n=>{Ka(n,this),Xl(n,e,this)}))},restoreAll:function(){const t=this._settings;va(t).forEach((e=>{DP(e,t)}))}},Wr.load=(t,e)=>{const n=Vv(e);Xl(t,n)},Wr.resetStatus=t=>{Wa(t)},_r&&ZR(Wr,window.lazyLoadOptions);const en=(t,e)=>{const{o:n,i:r,u:i}=t;let o=n,a;const s=(c,d)=>{const f=o,m=c,p=d||(r?!r(f,m):f!==m);return(p||i)&&(o=m,a=f),[o,p,a]};return[e?c=>s(e(o,a),c):s,c=>[o,!!c,a]]},JP=typeof window<"u"&&typeof HTMLElement<"u"&&!!window.document,Wt=JP?window:{},cg=Math.max,ZP=Math.min,Jl=Math.round,cr=Math.abs,up=Math.sign,ru=Wt.cancelAnimationFrame,Bi=Wt.requestAnimationFrame,iu=Wt.setTimeout,ug=Wt.clearTimeout,Qa=t=>typeof Wt[t]<"u"?Wt[t]:void 0,ek=Qa("MutationObserver"),dp=Qa("IntersectionObserver"),Kr=Qa("ResizeObserver"),Ai=Qa("ScrollTimeline"),ou=t=>t===void 0,Xa=t=>t===null,pr=t=>typeof t=="number",mi=t=>typeof t=="string",Ja=t=>typeof t=="boolean",On=t=>typeof t=="function",pn=t=>Array.isArray(t),ga=t=>typeof t=="object"&&!pn(t)&&!Xa(t),au=t=>{const e=!!t&&t.length,n=pr(e)&&e>-1&&e%1==0;return pn(t)||!On(t)&&n?e>0&&ga(t)?e-1 in t:!0:!1},Hi=t=>!!t&&t.constructor===Object,_a=t=>t instanceof HTMLElement,Za=t=>t instanceof Element;function lt(t,e){if(au(t))for(let n=0;n<t.length&&e(t[n],n,t)!==!1;n++);else t&&lt(Object.keys(t),(n=>e(t[n],n,t)));return t}const dg=(t,e)=>t.indexOf(e)>=0,li=(t,e)=>t.concat(e),ft=(t,e,n)=>(!mi(e)&&au(e)?Array.prototype.push.apply(t,e):t.push(e),t),br=t=>Array.from(t||[]),su=t=>pn(t)?t:!mi(t)&&au(t)?br(t):[t],ya=t=>!!t&&!t.length,ba=t=>br(new Set(t)),nn=(t,e,n)=>{lt(t,i=>i?i.apply(void 0,e||[]):!0),n||(t.length=0)},fg="paddingTop",pg="paddingRight",hg="paddingLeft",mg="paddingBottom",vg="marginLeft",gg="marginRight",_g="marginBottom",lu="overflowX",cu="overflowY",lo="width",co="height",Qn="visible",wn="hidden",kr="scroll",tk=t=>{const e=String(t||"");return e?e[0].toUpperCase()+e.slice(1):""},es=(t,e,n,r)=>{if(t&&e){let i=!0;return lt(n,(o=>{const a=t[o],s=e[o];a!==s&&(i=!1)})),i}return!1},uu=(t,e)=>es(t,e,["w","h"]),ea=(t,e)=>es(t,e,["x","y"]),nk=(t,e)=>es(t,e,["t","r","b","l"]),Le=(t,...e)=>t.bind(0,...e),Yr=t=>{let e;const n=t?iu:Bi,r=t?ug:ru;return[i=>{r(e),e=n((()=>i()),On(t)?t():t)},()=>r(e)]},fp=t=>{const e=On(t)?t():t;if(pr(e)){const n=e?iu:Bi,r=e?ug:ru;return i=>{const o=n((()=>i()),e);return()=>{r(o)}}}return e&&e._},yg=(t,e)=>{const{p:n,v:r,S:i,m:o}=e||{};let a,s,l,u;const c=function(h){s&&s(),a&&a(),u=s=a=l=void 0,t.apply(this,h)},d=p=>o&&l?o(l,p):p,f=()=>{s&&l&&c(d(l)||l)},m=function(){const h=br(arguments),v=fp(n);if(v){const C=typeof i=="function"?i():i,S=fp(r),y=d(h)||h,E=c.bind(0,y);s&&s(),C&&!u?(E(),u=!0,s=v((()=>u=void 0))):(s=v(E),S&&!a&&(a=S(f))),l=y}else c(h)};return m.O=f,m},bg=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),Bt=t=>t?Object.keys(t):[],rt=(t,e,n,r,i,o,a)=>{const s=[e,n,r,i,o,a];return(typeof t!="object"||Xa(t))&&!On(t)&&(t={}),lt(s,(l=>{lt(l,((u,c)=>{const d=l[c];if(t===d)return!0;const f=pn(d);if(d&&Hi(d)){const m=t[c];let p=m;f&&!pn(m)?p=[]:!f&&!Hi(m)&&(p={}),t[c]=rt(p,d)}else t[c]=f?d.slice():d}))})),t},wg=(t,e)=>lt(rt({},t),((n,r,i)=>{n===void 0?delete i[r]:n&&Hi(n)&&(i[r]=wg(n))})),du=t=>!Bt(t).length,qi=()=>{},Sg=(t,e,n)=>cg(t,ZP(e,n)),Ir=t=>ba((pn(t)?t:(t||"").split(" ")).filter((e=>e))),fu=(t,e)=>t&&t.getAttribute(e),pp=(t,e)=>t&&t.hasAttribute(e),Yn=(t,e,n)=>{lt(Ir(e),(r=>{t&&t.setAttribute(r,String(n||""))}))},Rn=(t,e)=>{lt(Ir(e),(n=>t&&t.removeAttribute(n)))},ts=(t,e)=>{const n=Ir(fu(t,e)),r=Le(Yn,t,e),i=(o,a)=>{const s=new Set(n);return lt(Ir(o),(l=>{s[a](l)})),br(s).join(" ")};return{C:o=>r(i(o,"delete")),$:o=>r(i(o,"add")),H:o=>{const a=Ir(o);return a.reduce(((s,l)=>s&&n.includes(l)),a.length>0)}}},Cg=(t,e,n)=>(ts(t,e).C(n),Le(pu,t,e,n)),pu=(t,e,n)=>(ts(t,e).$(n),Le(Cg,t,e,n)),wa=(t,e,n,r)=>(r?pu:Cg)(t,e,n),hu=(t,e,n)=>ts(t,e).H(n),Eg=t=>ts(t,"class"),Tg=(t,e)=>{Eg(t).C(e)},ns=(t,e)=>(Eg(t).$(e),Le(Tg,t,e)),xg=(t,e)=>{const n=e?Za(e)&&e:document;return n?br(n.querySelectorAll(t)):[]},rk=(t,e)=>{const n=e?Za(e)&&e:document;return n&&n.querySelector(t)},Zl=(t,e)=>Za(t)&&t.matches(e),Og=t=>Zl(t,"body"),ec=t=>t?br(t.childNodes):[],Wi=t=>t&&t.parentElement,Gr=(t,e)=>Za(t)&&t.closest(e),tc=t=>document.activeElement,ik=(t,e,n)=>{const r=Gr(t,e),i=t&&rk(n,r),o=Gr(i,e)===r;return r&&i?r===t||i===t||o&&Gr(Gr(t,n),e)!==r:!1},ci=t=>{lt(su(t),(e=>{const n=Wi(e);e&&n&&n.removeChild(e)}))},Dt=(t,e)=>Le(ci,t&&e&&lt(su(e),(n=>{n&&t.appendChild(n)})));let Ag;const ok=()=>Ag,ak=t=>{Ag=t},Jr=t=>{const e=document.createElement("div");return Yn(e,"class",t),e},mu=t=>{const e=Jr(),n=ok(),r=t.trim();return e.innerHTML=n?n.createHTML(r):r,lt(ec(e),(i=>ci(i)))},hp=(t,e)=>t.getPropertyValue(e)||t[e]||"",$g=t=>{const e=t||0;return isFinite(e)?e:0},jo=t=>$g(parseFloat(t||"")),nc=t=>Math.round(t*1e4)/1e4,Rg=t=>`${nc($g(t))}px`;function ui(t,e){t&&e&&lt(e,((n,r)=>{try{const i=t.style,o=Xa(n)||Ja(n)?"":pr(n)?Rg(n):n;r.indexOf("--")===0?i.setProperty(r,o):i[r]=o}catch{}}))}function Vn(t,e,n){const r=mi(e);let i=r?"":{};if(t){const o=Wt.getComputedStyle(t,n)||t.style;i=r?hp(o,e):br(e).reduce(((a,s)=>(a[s]=hp(o,s),a)),i)}return i}const mp=(t,e,n)=>{const r=e?`${e}-`:"",i=n?`-${n}`:"",o=`${r}top${i}`,a=`${r}right${i}`,s=`${r}bottom${i}`,l=`${r}left${i}`,u=Vn(t,[o,a,s,l]);return{t:jo(u[o]),r:jo(u[a]),b:jo(u[s]),l:jo(u[l])}},Zs=(t,e)=>`translate${ga(t)?`(${t.x},${t.y})`:`${e?"X":"Y"}(${t})`}`,sk=t=>!!(t.offsetWidth||t.offsetHeight||t.getClientRects().length),lk={w:0,h:0},rs=(t,e)=>e?{w:e[`${t}Width`],h:e[`${t}Height`]}:lk,ck=t=>rs("inner",t||Wt),hr=Le(rs,"offset"),Pg=Le(rs,"client"),Sa=Le(rs,"scroll"),vu=t=>{const e=parseFloat(Vn(t,lo))||0,n=parseFloat(Vn(t,co))||0;return{w:e-Jl(e),h:n-Jl(n)}},el=t=>t.getBoundingClientRect(),uk=t=>!!t&&sk(t),rc=t=>!!(t&&(t[co]||t[lo])),kg=(t,e)=>{const n=rc(t);return!rc(e)&&n},vp=(t,e,n,r)=>{lt(Ir(e),(i=>{t&&t.removeEventListener(i,n,r)}))},ut=(t,e,n,r)=>{var i;const o=(i=r&&r.D)!=null?i:!0,a=r&&r.I||!1,s=r&&r.A||!1,l={passive:o,capture:a};return Le(nn,Ir(e).map((u=>{const c=s?d=>{vp(t,u,c,a),n&&n(d)}:n;return t&&t.addEventListener(u,c,l),Le(vp,t,u,c,a)})))},gu=t=>t.stopPropagation(),ic=t=>t.preventDefault(),Ig=t=>gu(t)||ic(t),dn=(t,e)=>{const{x:n,y:r}=pr(e)?{x:e,y:e}:e||{};pr(n)&&(t.scrollLeft=n),pr(r)&&(t.scrollTop=r)},tn=t=>({x:t.scrollLeft,y:t.scrollTop}),Mg=()=>({T:{x:0,y:0},k:{x:0,y:0}}),dk=(t,e)=>{const{T:n,k:r}=t,{w:i,h:o}=e,a=(d,f,m)=>{let p=up(d)*m,h=up(f)*m;if(p===h){const v=cr(d),C=cr(f);h=v>C?0:h,p=v<C?0:p}return p=p===h?0:p,[p+0,h+0]},[s,l]=a(n.x,r.x,i),[u,c]=a(n.y,r.y,o);return{T:{x:s,y:u},k:{x:l,y:c}}},tl=({T:t,k:e})=>{const n=(r,i)=>r===0&&r<=i;return{x:n(t.x,e.x),y:n(t.y,e.y)}},gp=({T:t,k:e},n)=>{const r=(i,o,a)=>Sg(0,1,(i-a)/(i-o)||0);return{x:r(t.x,e.x,n.x),y:r(t.y,e.y,n.y)}},oc=t=>{t&&t.focus&&t.focus({preventScroll:!0,focusVisible:!1})},_p=(t,e)=>{lt(su(e),t)},ac=t=>{const e=new Map,n=(o,a)=>{if(o){const s=e.get(o);_p((l=>{s&&s[l?"delete":"clear"](l)}),a)}else e.forEach((s=>{s.clear()})),e.clear()},r=(o,a)=>{if(mi(o)){const u=e.get(o)||new Set;return e.set(o,u),_p((c=>{On(c)&&u.add(c)}),a),Le(n,o,a)}Ja(a)&&a&&n();const s=Bt(o),l=[];return lt(s,(u=>{const c=o[u];c&&ft(l,r(u,c))})),Le(nn,l)},i=(o,a)=>{lt(br(e.get(o)),(s=>{a&&!ya(a)?s.apply(0,a):s()}))};return r(t||{}),[r,n,i]},Fg={},Dg={},fk=t=>{lt(t,(e=>lt(e,((n,r)=>{Fg[r]=e[r]}))))},Lg=(t,e,n)=>Bt(t).map((r=>{const{static:i,instance:o}=t[r],[a,s,l]=n||[],u=n?o:i;if(u){const c=n?u(a,s,e):u(e);return(l||Dg)[r]=c}})),pk=(t,e)=>t[e],vi=t=>pk(Dg,t),hk="__osOptionsValidationPlugin",gi="data-overlayscrollbars",ta="os-environment",Vo=`${ta}-scrollbar-hidden`,nl=`${gi}-initialize`,na="noClipping",yp=`${gi}-body`,mr=gi,mk="host",Gn=`${gi}-viewport`,vk=lu,gk=cu,_k="arrange",jg="measuring",yk="scrolling",Vg="scrollbarHidden",bk="noContent",sc=`${gi}-padding`,bp=`${gi}-content`,_u="os-size-observer",wk=`${_u}-appear`,yu=`${_u}-listener`,Sk=`${yu}-scroll`,ra=`${yu}-item`,wp=`${ra}-final`,Ck="os-trinsic-observer",Ek="os-theme-none",rn="os-scrollbar",Tk=`${rn}-rtl`,xk=`${rn}-horizontal`,Ok=`${rn}-vertical`,zg=`${rn}-track`,bu=`${rn}-handle`,Ak=`${rn}-visible`,$k=`${rn}-cornerless`,Sp=`${rn}-interaction`,Cp=`${rn}-unusable`,lc=`${rn}-auto-hide`,Rk=`${lc}-hidden`,Ep=`${rn}-wheel`,Pk=`${zg}-interactive`,kk=`${bu}-interactive`,Ng="__osSizeObserverPlugin",Ik={[Ng]:{static:()=>(t,e,n)=>{const i="scroll",o=mu(`<div class="${ra}" dir="ltr"><div class="${ra}"><div class="${wp}"></div></div><div class="${ra}"><div class="${wp}" style="width: 200%; height: 200%"></div></div></div>`),a=o[0],s=a.lastChild,l=a.firstChild,u=l?.firstChild;let c=hr(a),d=c,f=!1,m;const p=()=>{dn(l,3333333),dn(s,3333333)},h=S=>{m=0,f&&(c=d,e(S===!0))},v=S=>{d=hr(a),f=!S||!uu(d,c),S?(gu(S),f&&!m&&(ru(m),m=Bi(h))):h(S===!1),p()},C=[Dt(t,o),ut(l,i,v),ut(s,i,v)];return ns(t,Sk),ui(u,{[lo]:3333333,[co]:3333333}),Bi(p),[n?Le(v,!1):p,C]}}},Mk=(t,e)=>{const{M:n}=e,[r,i]=t("showNativeOverlaidScrollbars");return[r&&n.x&&n.y,i]},Qr=t=>t.indexOf(Qn)===0,Fk=t=>t.replace(`${Qn}-`,""),cc=(t,e)=>{if(t==="auto")return e?kr:wn;const n=t||wn;return[wn,kr,Qn].includes(n)?n:wn},Dk=(t,e)=>{const{overflowX:n,overflowY:r}=Vn(t,[lu,cu]);return{x:cc(n,e.x),y:cc(r,e.y)}},wu="__osScrollbarsHidingPlugin",Lk="__osClickScrollPlugin",Tp=t=>JSON.stringify(t,((e,n)=>{if(On(n))throw 0;return n})),xp=(t,e)=>t?`${e}`.split(".").reduce(((n,r)=>n&&bg(n,r)?n[r]:void 0),t):void 0,jk=[0,33],Ug=[33,99],Bg=[222,666,!0],Vk={paddingAbsolute:!1,showNativeOverlaidScrollbars:!1,update:{elementEvents:[["img","load"]],debounce:{mutation:jk,resize:null,event:Ug,env:Bg},attributes:null,ignoreMutation:null,flowDirectionStyles:null},overflow:{x:"scroll",y:"scroll"},scrollbars:{theme:"os-theme-dark",visibility:"auto",autoHide:"never",autoHideDelay:1300,autoHideSuspend:!1,dragScroll:!0,clickScroll:!1,pointers:["mouse","touch","pen"]}},Hg=(t,e)=>{const n={},r=li(Bt(e),Bt(t));return lt(r,(i=>{const o=t[i],a=e[i];if(ga(o)&&ga(a))rt(n[i]={},Hg(o,a)),du(n[i])&&delete n[i];else if(bg(e,i)&&a!==o){let s=!0;if(pn(o)||pn(a))try{Tp(o)===Tp(a)&&(s=!1)}catch{}s&&(n[i]=a)}})),n},rl=(t,e,n)=>r=>[xp(t,r),n||xp(e,r)!==void 0];let qg;const zk=()=>qg,Nk=t=>{qg=t};let il;const Uk=()=>{const t=(y,E,T)=>{Dt(document.body,y),Dt(document.body,y);const A=Pg(y),O=hr(y),q=vu(E);return T&&ci(y),{x:O.h-A.h+q.h,y:O.w-A.w+q.w}},e=y=>{let E=!1;const T=ns(y,Vo);try{E=Vn(y,"scrollbar-width")==="none"||Vn(y,"display","::-webkit-scrollbar")==="none"}catch{}return T(),E},n=`.${ta}{scroll-behavior:auto!important;position:fixed;opacity:0;visibility:hidden;overflow:scroll;height:200px;width:200px;z-index:-1}.${ta} div{width:200%;height:200%;margin:10px 0}.${Vo}{scrollbar-width:none!important}.${Vo}::-webkit-scrollbar,.${Vo}::-webkit-scrollbar-corner{appearance:none!important;display:none!important;width:0!important;height:0!important}`,i=mu(`<div class="${ta}"><div></div><style>${n}</style></div>`)[0],o=i.firstChild,a=i.lastChild,s=zk();s&&(a.nonce=s);const[l,,u]=ac(),[c,d]=en({o:t(i,o),i:ea},Le(t,i,o,!0)),[f]=d(),m=e(i),p={x:f.x===0,y:f.y===0},h={elements:{host:null,padding:!m,viewport:y=>m&&Og(y)&&y,content:!1},scrollbars:{slot:!0},cancel:{nativeScrollbarsOverlaid:!1,body:null}},v=rt({},Vk),C=Le(rt,{},v),S=Le(rt,{},h),w={U:f,M:p,P:m,J:!!Ai,G:Le(l,"r"),K:S,Z:y=>rt(h,y)&&S(),tt:C,nt:y=>rt(v,y)&&C(),ot:rt({},h),st:rt({},v)};if(Rn(i,"style"),ci(i),ut(Wt,"resize",(()=>{u("r",[])})),On(Wt.matchMedia)&&!m&&(!p.x||!p.y)){const y=E=>{const T=Wt.matchMedia(`(resolution: ${Wt.devicePixelRatio}dppx)`);ut(T,"change",(()=>{E(),y(E)}),{A:!0})};y((()=>{const[E,T]=c();rt(w.U,E),u("r",[T])}))}return w},Un=()=>(il||(il=Uk()),il),Bk=(t,e,n)=>{let r=!1;const i=n?new WeakMap:!1,o=()=>{r=!0},a=s=>{if(i&&n){const l=n.map((u=>{const[c,d]=u||[];return[d&&c?(s||xg)(c,t):[],d]}));lt(l,(u=>lt(u[0],(c=>{const d=u[1],f=i.get(c)||[];if(t.contains(c)&&d){const p=ut(c,d,(h=>{r?(p(),i.delete(c)):e(h)}));i.set(c,ft(f,p))}else nn(f),i.delete(c)}))))}};return a(),[o,a]},Op=(t,e,n,r)=>{let i=!1;const{et:o,ct:a,rt:s,it:l,lt:u,ut:c}=r||{},[d,f]=Bk(t,(()=>i&&n(!0)),s),m=o||[],p=a||[],h=li(m,p),v=(S,w)=>{if(!ya(w)){const y=u||qi,E=c||qi,T=[],A=[];let O=!1,q=!1;if(lt(w,(I=>{const{attributeName:P,target:z,type:F,oldValue:Y,addedNodes:le,removedNodes:de}=I,Q=F==="attributes",M=F==="childList",k=t===z,X=Q&&P,N=X&&fu(z,P||""),re=mi(N)?N:null,ve=X&&Y!==re,oe=dg(p,P)&&ve;if(e&&(M||!k)){const ge=Q&&ve,_e=ge&&l&&Zl(z,l),me=(_e?!y(z,P,Y,re):!Q||ge)&&!E(I,!!_e,t,r);lt(le,(L=>ft(T,L))),lt(de,(L=>ft(T,L))),q=q||me}!e&&k&&ve&&!y(z,P,Y,re)&&(ft(A,P),O=O||oe)})),f((I=>ba(T).reduce(((P,z)=>(ft(P,xg(I,z)),Zl(z,I)?ft(P,z):P)),[]))),e)return!S&&q&&n(!1),[!1];if(!ya(A)||O){const I=[ba(A),O];return S||n.apply(0,I),I}}},C=new ek(Le(v,!1));return[()=>(C.observe(t,{attributes:!0,attributeOldValue:!0,attributeFilter:h,subtree:e,childList:e,characterData:e}),i=!0,()=>{i&&(d(),C.disconnect(),i=!1)}),()=>{if(i)return v(!0,C.takeRecords())}]};let Sr=null;const Wg=(t,e,n)=>{const{ft:r}=n||{},i=vi(Ng),[o]=en({o:!1,u:!0});return()=>{const a=[],l=mu(`<div class="${_u}"><div class="${yu}"></div></div>`)[0],u=l.firstChild,c=d=>{const f=pn(d)&&!ya(d);let m=!1,p=!1;if(f){const h=d[0],[v,,C]=o(h.contentRect),S=rc(v);p=kg(v,C),m=!p&&!S}else p=d===!0;m||e({_t:!0,ft:p})};if(Kr){if(!Ja(Sr)){const p=new Kr(qi);p.observe(t,{get box(){Sr=!0}}),Sr=Sr||!1,p.disconnect()}const d=yg(c,{p:0,v:0}),f=p=>d(p),m=new Kr(f);if(m.observe(Sr?t:u),ft(a,[()=>{m.disconnect()},!Sr&&Dt(t,l)]),Sr){const p=new Kr(f);p.observe(t,{box:"border-box"}),ft(a,(()=>p.disconnect()))}}else if(i){const[d,f]=i(u,c,r);ft(a,li([ns(l,wk),ut(l,"animationstart",d),Dt(t,l)],f))}else return qi;return Le(nn,a)}},Hk=(t,e)=>{let n;const r=l=>l.h===0||l.isIntersecting||l.intersectionRatio>0,i=Jr(Ck),[o]=en({o:!1}),a=(l,u)=>{if(l){const c=o(r(l)),[,d]=c;return d&&!u&&e(c)&&[c]}},s=(l,u)=>a(u.pop(),l);return[()=>{const l=[];if(dp)n=new dp(Le(s,!1),{root:t}),n.observe(i),ft(l,(()=>{n.disconnect()}));else{const u=()=>{const c=hr(i);a(c)};ft(l,Wg(i,u)()),u()}return Le(nn,ft(l,Dt(t,i)))},()=>n&&s(!0,n.takeRecords())]},qk=(t,e,n,r)=>{let i,o,a,s,l,u,c,d;const f=`[${mr}]`,m=`[${Gn}]`,p=["id","class","style","open","wrap","cols","rows"],{dt:h,vt:v,L:C,gt:S,ht:w,V:y,bt:E,yt:T,wt:A,St:O}=t,q=R=>Vn(R,"direction")==="rtl",I=()=>{let R,me,L;const $=yg(r,{p:()=>R,v:()=>me,S:()=>L,m(W,V){const[H]=W,[ie]=V;return[li(Bt(H),Bt(ie)).reduce(((fe,Oe)=>(fe[Oe]=H[Oe]||ie[Oe],fe)),{})]}}),U=(W,V)=>{if(pn(V)){const[H,ie,fe]=V;R=H,me=ie,L=fe}else pr(V)?(R=V,me=!1,L=!1):(R=!1,me=!1,L=!1);$(W)};return U.O=$.O,U},P={Ot:!1,B:q(h)},z=Un(),F=vi(wu),[Y]=en({i:uu,o:{w:0,h:0}},(()=>{const R=F&&F.R(t,e,P,z,n).Y,L=!(E&&y)&&hu(v,mr,na),$=!y&&T(_k),U=$&&tn(S),W=U&&O(),V=A(jg,L),H=$&&R&&R(),ie=Sa(C),fe=vu(C);return H&&H(),dn(S,U),W&&W(),L&&V(),{w:ie.w+fe.w,h:ie.h+fe.h}})),le=I(),de=R=>{const me=q(h);rt(R,{Ct:d!==me}),rt(P,{B:me}),d=me},Q=(R,me)=>{const[L,$]=R,U={$t:$};return rt(P,{Ot:L}),me||r(U),U},M=({_t:R,ft:me})=>{const L=me?r:le,$={_t:R||me,ft:me};de($),L($,o)},k=(R,me)=>{const[,L]=Y(),$={xt:L};return de($),L&&!me&&le($,R?a:i),$},X=(R,me,L)=>{const $={Ht:me};return de($),me&&!L&&le($,i),$},[N,re]=w?Hk(v,Q):[],ve=!y&&Wg(v,M,{ft:!0}),[oe,ge]=Op(v,!1,X,{ct:p,et:p}),_e=y&&Kr&&new Kr((R=>{const me=R[R.length-1].contentRect;M({_t:!0,ft:kg(me,c)}),c=me}));return[()=>{_e&&_e.observe(v);const R=ve&&ve(),me=N&&N(),L=oe(),$=z.G((U=>{const[,W]=Y();le({Et:U,xt:W,_t:E},s)}));return()=>{_e&&_e.disconnect(),R&&R(),me&&me(),u&&u(),L(),$()}},({Dt:R,zt:me,It:L})=>{const $={},[U]=R("update.ignoreMutation"),[W,V]=R("update.attributes"),[H,ie]=R("update.elementEvents"),[fe,Oe]=R("update.debounce"),Ce=ie||V,Ne=me||L,Re=Ve=>On(U)&&!!U(Ve);if(Ce){l&&l(),u&&u();const[Ve,ct]=Op(w||C,!0,k,{et:li(p,W||[]),rt:H,it:f,ut:(Ze,et)=>{const{target:He,attributeName:pt}=Ze;return(!et&&pt&&!y?ik(He,f,m):!1)||!!Gr(He,`.${rn}`)||Re(Ze)}});u=Ve(),l=ct}if(Oe&&(le.O(),pn(fe)||pr(fe)?(i=fe,o=!1,a=Ug,s=Bg):Hi(fe)?(i=fe.mutation,o=fe.resize,a=fe.event,s=fe.env):(i=!1,o=!1,a=!1,s=!1)),Ne){const Ve=ge(),ct=re&&re(),Ze=l&&l();Ve&&rt($,X(Ve[0],Ve[1],Ne)),ct&&rt($,Q(ct[0],Ne)),Ze&&rt($,k(Ze[0],Ne))}return de($),$},P]},Kg=(t,e)=>On(e)?e.apply(0,t):e,Wk=(t,e,n,r)=>{const i=ou(r)?n:r;return Kg(t,i)||e.apply(0,t)},Yg=(t,e,n,r)=>{const i=ou(r)?n:r,o=Kg(t,i);return!!o&&(_a(o)?o:e.apply(0,t))},Kk=(t,e)=>{const{nativeScrollbarsOverlaid:n,body:r}=e||{},{M:i,P:o,K:a}=Un(),{nativeScrollbarsOverlaid:s,body:l}=a().cancel,u=n??s,c=ou(r)?l:r,d=(i.x||i.y)&&u,f=t&&(Xa(c)?!o:c);return!!d||!!f},Yk=(t,e,n,r)=>{const i="--os-viewport-percent",o="--os-scroll-percent",a="--os-scroll-direction",{K:s}=Un(),{scrollbars:l}=s(),{slot:u}=l,{dt:c,vt:d,L:f,At:m,gt:p,bt:h,V:v}=e,{scrollbars:C}=m?{}:t,{slot:S}=C||{},w=[],y=[],E=[],T=Yg([c,d,f],(()=>v&&h?c:d),u,S),A=N=>{if(Ai){let re=null,ve=[];const oe=new Ai({source:p,axis:N}),ge=()=>{re&&re.cancel(),re=null};return{Mt:R=>{const{Tt:me}=n,L=tl(me)[N],$=N==="x",U=[Zs(0,$),Zs(`calc(-100% + 100cq${$?"w":"h"})`,$)],W=L?U:U.reverse();return ve[0]===W[0]&&ve[1]===W[1]||(ve=W,ge(),re=R.kt.animate({clear:["left"],transform:W},{timeline:oe})),ge}}}},O={x:A("x"),y:A("y")},q=()=>{const{Rt:N,Vt:re}=n,ve=(oe,ge)=>Sg(0,1,oe/(oe+ge)||0);return{x:ve(re.x,N.x),y:ve(re.y,N.y)}},I=(N,re,ve)=>{const oe=ve?ns:Tg;lt(N,(ge=>{oe(ge.Lt,re)}))},P=(N,re)=>{lt(N,(ve=>{const[oe,ge]=re(ve);ui(oe,ge)}))},z=(N,re,ve)=>{const oe=Ja(ve),ge=oe?ve:!0,_e=oe?!ve:!0;ge&&I(y,N,re),_e&&I(E,N,re)},F=()=>{const N=q(),re=ve=>oe=>[oe.Lt,{[i]:nc(ve)+""}];P(y,re(N.x)),P(E,re(N.y))},Y=()=>{if(!Ai){const{Tt:N}=n,re=gp(N,tn(p)),ve=oe=>ge=>[ge.Lt,{[o]:nc(oe)+""}];P(y,ve(re.x)),P(E,ve(re.y))}},le=()=>{const{Tt:N}=n,re=tl(N),ve=oe=>ge=>[ge.Lt,{[a]:oe?"0":"1"}];P(y,ve(re.x)),P(E,ve(re.y)),Ai&&(y.forEach(O.x.Mt),E.forEach(O.y.Mt))},de=()=>{if(v&&!h){const{Rt:N,Tt:re}=n,ve=tl(re),oe=gp(re,tn(p)),ge=_e=>{const{Lt:R}=_e,me=Wi(R)===f&&R,L=($,U,W)=>{const V=U*$;return Rg(W?V:-V)};return[me,me&&{transform:Zs({x:L(oe.x,N.x,ve.x),y:L(oe.y,N.y,ve.y)})}]};P(y,ge),P(E,ge)}},Q=N=>{const re=N?"x":"y",oe=Jr(`${rn} ${N?xk:Ok}`),ge=Jr(zg),_e=Jr(bu),R={Lt:oe,Pt:ge,kt:_e},me=O[re];return ft(N?y:E,R),ft(w,[Dt(oe,ge),Dt(ge,_e),Le(ci,oe),me&&me.Mt(R),r(R,z,N)]),R},M=Le(Q,!0),k=Le(Q,!1),X=()=>(Dt(T,y[0].Lt),Dt(T,E[0].Lt),Le(nn,w));return M(),k(),[{Ut:F,Nt:Y,qt:le,Bt:de,Ft:z,jt:{Xt:y,Yt:M,Wt:Le(P,y)},Jt:{Xt:E,Yt:k,Wt:Le(P,E)}},X]},Gk=(t,e,n,r,i)=>(o,a,s)=>{const{vt:l,L:u,V:c,gt:d,Gt:f,St:m}=e,{Lt:p,Pt:h,kt:v}=o,[C,S]=Yr(333),[w,y]=Yr(444),E=O=>{On(d.scrollBy)&&d.scrollBy({behavior:"smooth",left:O.x,top:O.y})},T=()=>{const O="pointerup pointercancel lostpointercapture",q=`client${s?"X":"Y"}`,I=s?lo:co,P=s?"left":"top",z=s?"w":"h",F=s?"x":"y",Y=[];return ut(h,"pointerdown",r((le=>{const de=Gr(le.target,`.${bu}`)===v,Q=de?v:h,M=t.scrollbars,k=M[de?"dragScroll":"clickScroll"],{button:X,isPrimary:N,pointerType:re}=le,{pointers:ve}=M;if(X===0&&N&&k&&(ve||[]).includes(re)){nn(Y),y();const ge=!de&&(le.shiftKey||k==="instant"),_e=Le(el,v),R=Le(el,h),me=(He,pt)=>(He||_e())[P]-(pt||R())[P],L=Jl(el(d)[I])/hr(d)[z]||1,$=tn(d)[F],U=He=>{dn(d,{[F]:$+He})},W=He=>{const{Rt:pt}=n,ot=hr(h)[z]-hr(v)[z],gt=1/L*He/ot;U(gt*pt[F])},V=le[q],H=_e(),ie=R(),fe=H[I],Oe=me(H,ie)+fe/2,Ne=V-ie[P]-Oe,Re=de?0:Ne,Ve=He=>{nn(et),Q.releasePointerCapture(He.pointerId)},ct=de||ge,Ze=m(),et=[ut(f,O,Ve),ut(f,"selectstart",(He=>ic(He)),{D:!1}),ut(h,O,Ve),ct&&ut(h,"pointermove",(He=>W(Re+He[q]-V))),ct&&(()=>{const He=tn(d);Ze();const pt=tn(d),ot={x:pt.x-He.x,y:pt.y-He.y};(cr(ot.x)>3||cr(ot.y)>3)&&(m(),dn(d,He),E(ot),w(Ze))})];if(Q.setPointerCapture(le.pointerId),ge)W(Ne);else if(!de){const He=vi(Lk);if(He){const{Vt:pt}=n,ot=He(U,W,Le(me),Ne,pt[F],k,!!s,(gt=>{gt?Ze():ft(et,Ze)}));ft(et,ot),ft(Y,Le(ot,!0))}}}})))};let A=!0;return Le(nn,[ut(v,"pointermove pointerleave",r(i)),ut(p,"pointerenter",r((()=>{a(Sp,!0)}))),ut(p,"pointerleave pointercancel",r((()=>{a(Sp,!1)}))),ut(p,"wheel",r((O=>{const{deltaX:q,deltaY:I,deltaMode:P}=O;A&&P===0&&Wi(p)===l&&E({x:q,y:I}),A=!1,a(Ep,!0),C((()=>{A=!0,a(Ep)})),ic(O)})),{D:!1,I:!0}),!c&&ut(p,"mousedown",r((()=>{const O=tc();(pp(O,Gn)||pp(O,mr)||O===document.body)&&iu(Le(oc,u),25)}))),ut(p,"pointerdown",(()=>{const O=ut(f,"click",(I=>{q(),Ig(I)}),{A:!0,I:!0,D:!1}),q=ut(f,"pointerup pointercancel",(()=>{q(),setTimeout(O,150)}),{I:!0,D:!0})}),{I:!0,D:!0}),T(),S,y])},Qk=(t,e,n,r,i,o,a)=>{let s,l,u,c,d,f=qi,m=0;const p=["mouse","pen"],h=_e=>R=>{n.Kt||_e(R)},v=_e=>p.includes(_e.pointerType),[C,S]=Yr(),[w,y]=Yr(100),[E,T]=Yr(50),[A,O]=Yr((()=>m)),[q,I]=Yk(t,o,i,Gk(e,o,i,h,(_e=>v(_e)&&X()))),{vt:P,Qt:z,bt:F}=o,{Ft:Y,Ut:le,Nt:de,qt:Q,Bt:M}=q,k=(_e,R)=>{O();const me=L=>{n.Kt||Y(Rk,L)};if(_e)me();else{const L=u?!s:!0;m>0&&!R?A(Le(me,L)):me(L)}},X=()=>{(u?!s:!c)&&(k(!0),w((()=>{k(!1)})))},N=_e=>{v(_e)&&(s=!0,!n.Kt&&u&&k(!0))},re=_e=>{v(_e)&&(s=!1,!n.Kt&&u&&k(!1))},ve=_e=>{Y(lc,_e,!0),Y(lc,_e,!1)},oe=[O,y,T,S,()=>f(),ut(P,"pointerover",N,{A:!0}),ut(P,"pointerenter",N),ut(P,"pointerleave",re),ut(P,"pointermove",h((_e=>{v(_e)&&l&&X()}))),ut(z,"scroll",h((_e=>{C((()=>{de(),X()})),a(_e),M()})))],ge=vi(wu);return[()=>Le(nn,ft(oe,I())),({Dt:_e,It:R,Zt:me,tn:L})=>{const{nn:$,sn:U,en:W,cn:V}=L||{},{Ct:H,ft:ie}=me||{},{B:fe}=r,{M:Oe,P:Ce}=Un(),{rn:Ne,j:Re}=i,[Ve,ct]=_e("showNativeOverlaidScrollbars"),[Ze,et]=_e("scrollbars.theme"),[He,pt]=_e("scrollbars.visibility"),[ot,gt]=_e("scrollbars.autoHide"),[jt,vn]=_e("scrollbars.autoHideSuspend"),[J]=_e("scrollbars.autoHideDelay"),[B,Z]=_e("scrollbars.dragScroll"),[ye,xe]=_e("scrollbars.clickScroll"),[ae,Me]=_e("overflow"),ee=ie&&!R,se=$||U||V||H||R,he=W||pt||Me,ce=Ve&&Oe.x&&Oe.y,be=!Ce&&!ge,$n=ce||be,Zt=(an,Vt,Ct)=>{const po=an.includes(kr)&&(He===Qn||He==="auto"&&Vt===kr);return Y(Ak,po,Ct),po};if(m=J,(ct||be)&&Y(Ek,$n),et&&(Y(d),Y(Ze,!0),d=Ze),(vn||ee)&&(ve(!jt),ee&&jt&&(Re.x||Re.y?(f(),E((()=>{f=ut(z,kr,h(Le(ve,!0)),{A:!0})}))):ve(!0))),gt&&(l=ot==="move",u=ot==="leave",c=ot==="never",k(c,!0)),Z&&Y(kk,B),xe&&Y(Pk,!!ye),he){const an=Zt(ae.x,Ne.x,!0),Vt=Zt(ae.y,Ne.y,!1);Y($k,!(an&&Vt))}se&&(de(),le(),M(),V&&Q(),Y(Cp,!Re.x,!0),Y(Cp,!Re.y,!1),Y(Tk,fe&&!F))},{},q]},Xk=t=>{const e=Un(),{K:n,P:r}=e,{elements:i}=n(),{padding:o,viewport:a,content:s}=i,l=_a(t),u=l?{}:t,{elements:c}=u,{padding:d,viewport:f,content:m}=c||{},p=l?t:u.target,h=Og(p),v=p.ownerDocument,C=v.documentElement,S=()=>v.defaultView||Wt,w=Le(Wk,[p]),y=Le(Yg,[p]),E=Le(Jr,""),T=Le(w,E,a),A=Le(y,E,s),O=H=>{const ie=hr(H),fe=Sa(H),Oe=Vn(H,lu),Ce=Vn(H,cu);return fe.w-ie.w>0&&!Qr(Oe)||fe.h-ie.h>0&&!Qr(Ce)},q=T(f),I=q===p,P=I&&h,z=!I&&A(m),F=!I&&q===z,Y=P?C:q,le=P?Y:p,de=!I&&y(E,o,d),Q=!F&&z,M=[Q,Y,de,le].map((H=>_a(H)&&!Wi(H)&&H)),k=H=>H&&dg(M,H),X=!k(Y)&&O(Y)?Y:p,N=P?C:Y,ve={dt:p,vt:le,L:Y,ln:de,ht:Q,gt:N,Qt:P?v:Y,an:h?C:X,Gt:v,bt:h,At:l,V:I,un:S,yt:H=>hu(Y,Gn,H),wt:(H,ie)=>wa(Y,Gn,H,ie),St:()=>wa(N,Gn,yk,!0)},{dt:oe,vt:ge,ln:_e,L:R,ht:me}=ve,L=[()=>{Rn(ge,[mr,nl]),Rn(oe,nl),h&&Rn(C,[nl,mr])}];let $=ec([me,R,_e,ge,oe].find((H=>H&&!k(H))));const U=P?oe:me||R,W=Le(nn,L);return[ve,()=>{const H=S(),ie=tc(),fe=Ve=>{Dt(Wi(Ve),ec(Ve)),ci(Ve)},Oe=Ve=>ut(Ve,"focusin focusout focus blur",Ig,{I:!0,D:!1}),Ce="tabindex",Ne=fu(R,Ce),Re=Oe(ie);return Yn(ge,mr,I?"":mk),Yn(_e,sc,""),Yn(R,Gn,""),Yn(me,bp,""),I||(Yn(R,Ce,Ne||"-1"),h&&Yn(C,yp,"")),Dt(U,$),Dt(ge,_e),Dt(_e||ge,!I&&R),Dt(R,me),ft(L,[Re,()=>{const Ve=tc(),ct=k(R),Ze=ct&&Ve===R?oe:Ve,et=Oe(Ze);Rn(_e,sc),Rn(me,bp),Rn(R,Gn),h&&Rn(C,yp),Ne?Yn(R,Ce,Ne):Rn(R,Ce),k(me)&&fe(me),ct&&fe(R),k(_e)&&fe(_e),oc(Ze),et()}]),r&&!I&&(pu(R,Gn,Vg),ft(L,Le(Rn,R,Gn))),oc(!I&&h&&ie===oe&&H.top===H?R:ie),Re(),$=0,W},W]},Jk=({ht:t})=>({Zt:e,fn:n,It:r})=>{const{$t:i}=e||{},{Ot:o}=n;t&&(i||r)&&ui(t,{[co]:o&&"100%"})},Zk=({vt:t,ln:e,L:n,V:r},i)=>{const[o,a]=en({i:nk,o:mp()},Le(mp,t,"padding",""));return({Dt:s,Zt:l,fn:u,It:c})=>{let[d,f]=a(c);const{P:m}=Un(),{_t:p,xt:h,Ct:v}=l||{},{B:C}=u,[S,w]=s("paddingAbsolute");(p||f||(c||h))&&([d,f]=o(c));const E=!r&&(w||v||f);if(E){const T=!S||!e&&!m,A=d.r+d.l,O=d.t+d.b,q={[gg]:T&&!C?-A:0,[_g]:T?-O:0,[vg]:T&&C?-A:0,top:T?-d.t:0,right:T?C?-d.r:"auto":0,left:T?C?"auto":-d.l:0,[lo]:T&&`calc(100% + ${A}px)`},I={[fg]:T?d.t:0,[pg]:T?d.r:0,[mg]:T?d.b:0,[hg]:T?d.l:0};ui(e||n,q),ui(n,I),rt(i,{ln:d,_n:!T,F:e?I:rt({},q,I)})}return{dn:E}}},eI=(t,e)=>{const n=Un(),{vt:r,ln:i,L:o,V:a,Qt:s,gt:l,bt:u,wt:c,un:d}=t,{P:f}=n,m=u&&a,p=Le(cg,0),h={display:()=>!1,direction:oe=>oe!=="ltr",flexDirection:oe=>oe.endsWith("-reverse"),writingMode:oe=>oe!=="horizontal-tb"},v=Bt(h),C={i:uu,o:{w:0,h:0}},S={i:ea,o:{}},w=oe=>{c(jg,!m&&oe)},y=()=>Vn(o,v),E=(oe,ge)=>{const _e=!Bt(oe).length,R=ge?!0:v.some((Ce=>{const Ne=oe[Ce];return mi(Ne)&&h[Ce](Ne)}));if(_e||!R||!uk(o))return{T:{x:0,y:0},k:{x:1,y:1}};w(!0);const me=tn(l),L=ut(s,kr,(Ce=>{const Ne=tn(l);Ce.isTrusted&&Ne.x===me.x&&Ne.y===me.y&&gu(Ce)}),{I:!0,A:!0}),$=c(bk,!0);dn(l,{x:0,y:0}),$();const U=tn(l),W=Sa(l);dn(l,{x:W.w,y:W.h});const V=tn(l),H={x:V.x-U.x,y:V.y-U.y};dn(l,{x:-W.w,y:-W.h});const ie=tn(l),fe={x:ie.x-U.x,y:ie.y-U.y},Oe={x:cr(H.x)>=cr(fe.x)?V.x:ie.x,y:cr(H.y)>=cr(fe.y)?V.y:ie.y};return dn(l,me),Bi((()=>L())),{T:U,k:Oe}},T=(oe,ge)=>{const _e=Wt.devicePixelRatio%1!==0?1:0,R={w:p(oe.w-ge.w),h:p(oe.h-ge.h)};return{w:R.w>_e?R.w:0,h:R.h>_e?R.h:0}},A=(oe,ge)=>{const _e=(R,me,L,$)=>{const U=R===Qn?wn:Fk(R),W=Qr(R),V=Qr(L);return!me&&!$?wn:W&&V?Qn:W?me&&$?U:me?Qn:wn:me?U:V&&$?Qn:wn};return{x:_e(ge.x,oe.x,ge.y,oe.y),y:_e(ge.y,oe.y,ge.x,oe.x)}},O=oe=>{const ge=R=>[Qn,wn,kr].map((me=>ve(cc(me),R))),_e=ge(!0).concat(ge()).join(" ");c(_e),c(Bt(oe).map((R=>ve(oe[R],R==="x"))).join(" "),!0)},[q,I]=en(C,Le(vu,o)),[P,z]=en(C,Le(Sa,o)),[F,Y]=en(C),[le]=en(S),[de,Q]=en(C),[M]=en(S),[k]=en({i:(oe,ge)=>es(oe,ge,ba(li(Bt(oe),Bt(ge)))),o:{}}),[X,N]=en({i:(oe,ge)=>ea(oe.T,ge.T)&&ea(oe.k,ge.k),o:Mg()}),re=vi(wu),ve=(oe,ge)=>`${ge?vk:gk}${tk(oe)}`;return({Dt:oe,Zt:ge,fn:_e,It:R},{dn:me})=>{const{_t:L,Ht:$,xt:U,Ct:W,ft:V,Et:H}=ge||{},ie=re&&re.R(t,e,_e,n,oe),{X:fe,Y:Oe,W:Ce}=ie||{},[Ne,Re]=Mk(oe,n),[Ve,ct]=oe("overflow"),Ze=Qr(Ve.x),et=Qr(Ve.y),He=L||me||U||W||H||Re;let pt=I(R),ot=z(R),gt=Y(R),jt=Q(R);if(Re&&f&&c(Vg,!Ne),He){hu(r,mr,na)&&w(!0);const zu=Oe&&Oe(),[ho]=pt=q(R),[mo]=ot=P(R),vo=Pg(o),go=m&&ck(d()),$_={w:p(mo.w+ho.w),h:p(mo.h+ho.h)},Nu={w:p((go?go.w:vo.w+p(vo.w-mo.w))+ho.w),h:p((go?go.h:vo.h+p(vo.h-mo.h))+ho.h)};zu&&zu(),jt=de(Nu),gt=F(T($_,Nu),R)}const[vn,J]=jt,[B,Z]=gt,[ye,xe]=ot,[ae,Me]=pt,[ee]=le({x:B.w>0,y:B.h>0}),se=Ze&&et&&(ee.x||ee.y)||Ze&&ee.x&&!ee.y||et&&ee.y&&!ee.x,he=me||W||H||Me||xe||J||Z||ct||Re||He||$&&m,[ce]=oe("update.flowDirectionStyles"),[be,$n]=k(ce?ce(o)||{}:y(),R),Zt=W||V||$n||R,[an,Vt]=Zt?X(E(be,!!ce),R):N();let Ct=A(ee,Ve);w(!1),he&&(O(Ct),Ct=Dk(o,ee),Ce&&fe&&(fe(Ct,ye,ae),ui(o,Ce(Ct))));const[po,A_]=M(Ct);return wa(r,mr,na,se),wa(i,sc,na,se),rt(e,{rn:po,Vt:{x:vn.w,y:vn.h},Rt:{x:B.w,y:B.h},j:ee,Tt:dk(an,B)}),{en:A_,nn:J,sn:Z,cn:Vt||Z}}},tI=t=>{const[e,n,r]=Xk(t),i={ln:{t:0,r:0,b:0,l:0},_n:!1,F:{[gg]:0,[_g]:0,[vg]:0,[fg]:0,[pg]:0,[mg]:0,[hg]:0},Vt:{x:0,y:0},Rt:{x:0,y:0},rn:{x:wn,y:wn},j:{x:!1,y:!1},Tt:Mg()},{dt:o,gt:a,V:s,St:l}=e,{P:u,M:c}=Un(),d=!u&&(c.x||c.y),f=[Jk(e),Zk(e,i),eI(e,i)];return[n,m=>{const p={},v=d&&tn(a),C=v&&l();return lt(f,(S=>{rt(p,S(m,p)||{})})),dn(a,v),C&&C(),s||dn(o,0),p},i,e,r]},nI=(t,e,n,r)=>{let i=!1;const o={Kt:!1,pn:!1},a=rl(e,{}),[s,l,u,c,d]=tI(t),[f,m,p]=qk(c,u,a,(y=>{w({},y)})),[h,v,,C]=Qk(t,e,o,p,u,c,r),S=y=>Bt(y).some((E=>!!y[E])),w=(y,E)=>{const{Kt:T,pn:A}=o;if(A||T&&i)return!1;const{vn:O,It:q,zt:I}=y,P=O||{},z=!!q||!i,F={Dt:rl(e,P,z),vn:P,It:z},Y=E||m(rt({},F,{zt:I})),le=l(rt({},F,{fn:p,Zt:Y}));v(rt({},F,{Zt:Y,tn:le}));const de=S(Y),Q=S(le),M=de||Q||!du(P)||z;return i=!0,M&&n(y,{Zt:Y,tn:le}),M};return[()=>{const{an:y,gt:E,St:T}=c,A=tn(y),O=[f(),s(),h(),()=>{o.pn=!0}],q=T();return dn(E,A),q(),Le(nn,O)},w,y=>{const E=o.Kt;o.Kt=y,!y&&E!==y&&w({It:!0,zt:!0})},()=>{v({Dt:rl(e,{},!1),vn:{},It:!1})},()=>({gn:o,hn:p,bn:u}),{yn:c,wn:C},d]},Su=new WeakMap,rI=(t,e)=>{Su.set(t,e)},iI=t=>{Su.delete(t)},Gg=t=>Su.get(t),hn=(t,e,n)=>{const{tt:r}=Un(),i=_a(t),o=i?t:t.target,a=Gg(o);if(e&&!a){const s=[],l={},u=z=>{const F=wg(z),Y=vi(hk);return Y?Y(F,!0):F},c=rt({},r(),u(e)),[d,f,m]=ac(),[p,h,v]=ac(n),C=(z,F)=>{v(z,F),m(z,F)},[S,w,y,E,T,A,O]=nI(t,c,(({vn:z,It:F},{Zt:Y,tn:le})=>{const{_t:de,Ct:Q,$t:M,xt:k,Ht:X,ft:N}=Y,{nn:re,sn:ve,en:oe,cn:ge}=le;C("updated",[P,{updateHints:{sizeChanged:!!de,directionChanged:!!Q,heightIntrinsicChanged:!!M,overflowEdgeChanged:!!re,overflowAmountChanged:!!ve,overflowStyleChanged:!!oe,scrollCoordinatesChanged:!!ge,contentMutation:!!k,hostMutation:!!X,appear:!!N},changedOptions:z||{},force:!!F}])}),(z=>C("scroll",[P,z]))),q=z=>{const{gn:F}=T(),{pn:Y}=F;Y||(iI(o),nn(s),C("destroyed",[P,z]),f(),h())},P={options(z,F){if(z){const Y=F?r():{},le=Hg(c,rt(Y,u(z)));du(le)||(rt(c,le),w({vn:le}))}return rt({},c)},on:p,off:(z,F)=>{z&&F&&h(z,F)},state(){const{gn:z,hn:F,bn:Y}=T(),{pn:le,Kt:de}=z,{B:Q}=F,{Vt:M,Rt:k,rn:X,j:N,ln:re,_n:ve,Tt:oe}=Y;return rt({},{overflowEdge:M,overflowAmount:k,overflowStyle:X,hasOverflow:N,scrollCoordinates:{start:oe.T,end:oe.k},padding:re,paddingAbsolute:ve,directionRTL:Q,sleeping:de,destroyed:le})},elements(){const{dt:z,vt:F,ln:Y,L:le,ht:de,gt:Q,Qt:M}=A.yn,{jt:k,Jt:X}=A.wn,N=ve=>{const{kt:oe,Pt:ge,Lt:_e}=ve;return{scrollbar:_e,track:ge,handle:oe}},re=ve=>{const{Xt:oe,Yt:ge}=ve,_e=N(oe[0]);return rt({},_e,{clone:()=>{const R=N(ge());return E(),R}})};return rt({},{target:z,host:F,padding:Y||le,viewport:le,content:de||le,scrollOffsetElement:Q,scrollEventElement:M,scrollbarHorizontal:re(k),scrollbarVertical:re(X)})},update:z=>w({It:z,zt:!0}),destroy:Le(q,!1),sleep:y,plugin:z=>l[Bt(z)[0]]};return ft(s,[O]),rI(o,P),Lg(Fg,hn,[P,d,l]),Kk(A.yn.bt,!i&&t.cancel)?(q(!0),P):(ft(s,S()),C("initialized",[P]),P.update(),P)}return a};hn.plugin=t=>{const e=pn(t),n=e?t:[t],r=n.map((i=>Lg(i,hn)[0]));return fk(n),e?r:r[0]};hn.valid=t=>{const e=t&&t.elements,n=On(e)&&e();return Hi(n)&&!!Gg(n.target)};hn.env=()=>{const{U:t,M:e,P:n,J:r,ot:i,st:o,K:a,Z:s,tt:l,nt:u}=Un();return rt({},{scrollbarsSize:t,scrollbarsOverlaid:e,scrollbarsHiding:n,scrollTimeline:r,staticDefaultInitialization:i,staticDefaultOptions:o,getDefaultInitialization:a,setDefaultInitialization:s,getDefaultOptions:l,setDefaultOptions:u})};hn.nonce=Nk;hn.trustedTypePolicy=ak;class oI{constructor(){this._listeners=new Map,this.on=this.addEventListener,this.off=this.removeEventListener,this.emit=this.dispatchEvent}addEventListener(e,n){const r=this._listeners.get(e)??new Set;return this._listeners.set(e,r),r.add(n),this}removeEventListener(e,n){var r;return(r=this._listeners.get(e))==null||r.delete(n),this}dispatchEvent(e,...n){let r=!0;for(const i of this._listeners.get(e)??[])r=i(...n)!==!1&&r;return r}unbindAllListeners(){this._listeners.clear()}}const Ap=(t,e="px")=>typeof t=="number"?t+e:t,ir=({style:t},e,n)=>{if(typeof e=="object")for(const[r,i]of Object.entries(e))i!==void 0&&(t[r]=Ap(i));else n!==void 0&&(t[e]=Ap(n))},$p=(t=0,e=0,n=0,r=0)=>{const i={x:t,y:e,width:n,height:r,top:e,left:t,right:t+n,bottom:e+r};return{...i,toJSON:()=>JSON.stringify(i)}},aI=t=>{let e,n=-1,r=!1;return{next:(...i)=>{e=i,r||(r=!0,n=requestAnimationFrame(()=>{t(...e),r=!1}))},cancel:()=>{cancelAnimationFrame(n),r=!1}}},Rp=(t,e,n="touch")=>{switch(n){case"center":{const r=e.left+e.width/2,i=e.top+e.height/2;return r>=t.left&&r<=t.right&&i>=t.top&&i<=t.bottom}case"cover":return e.left>=t.left&&e.top>=t.top&&e.right<=t.right&&e.bottom<=t.bottom;case"touch":return t.right>=e.left&&t.left<=e.right&&t.bottom>=e.top&&t.top<=e.bottom}},sI=()=>matchMedia("(hover: none), (pointer: coarse)").matches,lI=()=>"safari"in window,uc=t=>Array.isArray(t)?t:[t],Qg=t=>(e,n,r,i={})=>{(e instanceof HTMLCollection||e instanceof NodeList)&&(e=Array.from(e)),n=uc(n),e=uc(e);for(const o of e)if(o)for(const a of n)o[t](a,r,{capture:!1,...i})},or=Qg("addEventListener"),_n=Qg("removeEventListener"),zo=t=>{var e;const{clientX:n,clientY:r,target:i}=((e=t.touches)==null?void 0:e[0])??t;return{x:n,y:r,target:i}},Ur=(t,e=document)=>uc(t).map(n=>typeof n=="string"?Array.from(e.querySelectorAll(n)):n instanceof Element?n:null).flat().filter(Boolean),cI=(t,e)=>e.some(n=>typeof n=="number"?t.button===n:typeof n=="object"?n.button!==t.button?!1:n.modifiers.every(r=>{switch(r){case"alt":return t.altKey;case"ctrl":return t.ctrlKey||t.metaKey;case"shift":return t.shiftKey}}):!1),{abs:Cr,max:Pp,min:kp,ceil:Ip}=Math,Mp=(t=[])=>({stored:t,selected:[],touched:[],changed:{added:[],removed:[]}}),Xg=class extends oI{constructor(e){var n,r,i,o,a;super(),this._selection=Mp(),this._targetBoundaryScrolled=!0,this._selectables=[],this._areaLocation={y1:0,x2:0,y2:0,x1:0},this._areaRect=$p(),this._singleClick=!0,this._scrollAvailable=!0,this._scrollingActive=!1,this._scrollSpeed={x:0,y:0},this._scrollDelta={x:0,y:0},this._lastMousePosition={x:0,y:0},this.enable=this._toggleStartEvents,this.disable=this._toggleStartEvents.bind(this,!1),this._options={selectionAreaClass:"selection-area",selectionContainerClass:void 0,selectables:[],document:window.document,startAreas:["html"],boundaries:["html"],container:"body",...e,behaviour:{overlap:"invert",intersect:"touch",triggers:[0],...e.behaviour,startThreshold:(n=e.behaviour)!=null&&n.startThreshold?typeof e.behaviour.startThreshold=="number"?e.behaviour.startThreshold:{x:10,y:10,...e.behaviour.startThreshold}:{x:10,y:10},scrolling:{speedDivider:10,manualSpeed:750,...(r=e.behaviour)==null?void 0:r.scrolling,startScrollMargins:{x:0,y:0,...(o=(i=e.behaviour)==null?void 0:i.scrolling)==null?void 0:o.startScrollMargins}}},features:{range:!0,touch:!0,deselectOnBlur:!1,...e.features,singleTap:{allow:!0,intersect:"native",...(a=e.features)==null?void 0:a.singleTap}}};for(const c of Object.getOwnPropertyNames(Object.getPrototypeOf(this)))typeof this[c]=="function"&&(this[c]=this[c].bind(this));const{document:s,selectionAreaClass:l,selectionContainerClass:u}=this._options;this._area=s.createElement("div"),this._clippingElement=s.createElement("div"),this._clippingElement.appendChild(this._area),this._area.classList.add(l),u&&this._clippingElement.classList.add(u),ir(this._area,{willChange:"top, left, bottom, right, width, height",top:0,left:0,position:"fixed"}),ir(this._clippingElement,{overflow:"hidden",position:"fixed",transform:"translate3d(0, 0, 0)",pointerEvents:"none",zIndex:"1"}),this._frame=aI(c=>{this._recalculateSelectionAreaRect(),this._updateElementSelection(),this._emitEvent("move",c),this._redrawSelectionArea()}),this.enable()}_toggleStartEvents(e=!0){const{document:n,features:r}=this._options,i=e?or:_n;i(n,"mousedown",this._onTapStart),r.touch&&i(n,"touchstart",this._onTapStart,{passive:!1})}_onTapStart(e,n=!1){const{x:r,y:i,target:o}=zo(e),{document:a,startAreas:s,boundaries:l,features:u,behaviour:c}=this._options,d=o.getBoundingClientRect();if(e instanceof MouseEvent&&!cI(e,c.triggers))return;const f=Ur(s,a),m=Ur(l,a);this._targetElement=m.find(C=>Rp(C.getBoundingClientRect(),d));const p=e.composedPath(),h=f.find(C=>p.includes(C));if(this._targetBoundary=m.find(C=>p.includes(C)),!this._targetElement||!h||!this._targetBoundary||!n&&this._emitEvent("beforestart",e)===!1)return;this._areaLocation={x1:r,y1:i,x2:0,y2:0};const v=a.scrollingElement??a.body;this._scrollDelta={x:v.scrollLeft,y:v.scrollTop},this._singleClick=!0,this.clearSelection(!1,!0),or(a,["touchmove","mousemove"],this._delayedTapMove,{passive:!1}),or(a,["mouseup","touchcancel","touchend"],this._onTapStop),or(a,"scroll",this._onScroll),u.deselectOnBlur&&(this._targetBoundaryScrolled=!1,or(this._targetBoundary,"scroll",this._onStartAreaScroll))}_onSingleTap(e){const{singleTap:{intersect:n},range:r}=this._options.features,i=zo(e);let o;if(n==="native")o=i.target;else if(n==="touch"){this.resolveSelectables();const{x:s,y:l}=i;o=this._selectables.find(u=>{const{right:c,left:d,top:f,bottom:m}=u.getBoundingClientRect();return s<c&&s>d&&l<m&&l>f})}if(!o)return;for(this.resolveSelectables();!this._selectables.includes(o);)if(o.parentElement)o=o.parentElement;else{this._targetBoundaryScrolled||this.clearSelection();return}const{stored:a}=this._selection;if(this._emitEvent("start",e),e.shiftKey&&r&&this._latestElement){const s=this._latestElement,[l,u]=s.compareDocumentPosition(o)&4?[o,s]:[s,o],c=[...this._selectables.filter(d=>d.compareDocumentPosition(l)&4&&d.compareDocumentPosition(u)&2),l,u];this.select(c),this._latestElement=s}else a.includes(o)&&(a.length===1||e.ctrlKey||a.every(s=>this._selection.stored.includes(s)))?this.deselect(o):(this.select(o),this._latestElement=o)}_delayedTapMove(e){const{container:n,document:r,behaviour:{startThreshold:i}}=this._options,{x1:o,y1:a}=this._areaLocation,{x:s,y:l}=zo(e);if(typeof i=="number"&&Cr(s+l-(o+a))>=i||typeof i=="object"&&Cr(s-o)>=i.x||Cr(l-a)>=i.y){if(_n(r,["mousemove","touchmove"],this._delayedTapMove,{passive:!1}),this._emitEvent("beforedrag",e)===!1){_n(r,["mouseup","touchcancel","touchend"],this._onTapStop);return}or(r,["mousemove","touchmove"],this._onTapMove,{passive:!1}),ir(this._area,"display","block"),Ur(n,r)[0].appendChild(this._clippingElement),this.resolveSelectables(),this._singleClick=!1,this._targetRect=this._targetElement.getBoundingClientRect(),this._scrollAvailable=this._targetElement.scrollHeight!==this._targetElement.clientHeight||this._targetElement.scrollWidth!==this._targetElement.clientWidth,this._scrollAvailable&&(or(this._targetElement,"wheel",this._wheelScroll,{passive:!1}),or(this._options.document,"keydown",this._keyboardScroll,{passive:!1}),this._selectables=this._selectables.filter(u=>this._targetElement.contains(u))),this._setupSelectionArea(),this._emitEvent("start",e),this._onTapMove(e)}this._handleMoveEvent(e)}_setupSelectionArea(){const{_clippingElement:e,_targetElement:n,_area:r}=this,i=this._targetRect=n.getBoundingClientRect();this._scrollAvailable?(ir(e,{top:i.top,left:i.left,width:i.width,height:i.height}),ir(r,{marginTop:-i.top,marginLeft:-i.left})):(ir(e,{top:0,left:0,width:"100%",height:"100%"}),ir(r,{marginTop:0,marginLeft:0}))}_onTapMove(e){const{_scrollSpeed:n,_areaLocation:r,_options:i,_frame:o}=this,{speedDivider:a}=i.behaviour.scrolling,s=this._targetElement,{x:l,y:u}=zo(e);if(r.x2=l,r.y2=u,this._lastMousePosition.x=l,this._lastMousePosition.y=u,this._scrollAvailable&&!this._scrollingActive&&(n.y||n.x)){this._scrollingActive=!0;const c=()=>{if(!n.x&&!n.y){this._scrollingActive=!1;return}const{scrollTop:d,scrollLeft:f}=s;n.y&&(s.scrollTop+=Ip(n.y/a),r.y1-=s.scrollTop-d),n.x&&(s.scrollLeft+=Ip(n.x/a),r.x1-=s.scrollLeft-f),o.next(e),requestAnimationFrame(c)};requestAnimationFrame(c)}else o.next(e);this._handleMoveEvent(e)}_handleMoveEvent(e){const{features:n}=this._options;(n.touch&&sI()||this._scrollAvailable&&lI())&&e.preventDefault()}_onScroll(){const{_scrollDelta:e,_options:{document:n}}=this,{scrollTop:r,scrollLeft:i}=n.scrollingElement??n.body;this._areaLocation.x1+=e.x-i,this._areaLocation.y1+=e.y-r,e.x=i,e.y=r,this._setupSelectionArea(),this._frame.next(null)}_onStartAreaScroll(){this._targetBoundaryScrolled=!0,_n(this._targetElement,"scroll",this._onStartAreaScroll)}_wheelScroll(e){const{manualSpeed:n}=this._options.behaviour.scrolling,r=e.deltaY?e.deltaY>0?1:-1:0,i=e.deltaX?e.deltaX>0?1:-1:0;this._scrollSpeed.y+=r*n,this._scrollSpeed.x+=i*n,this._onTapMove(e),e.preventDefault()}_keyboardScroll(e){const{manualSpeed:n}=this._options.behaviour.scrolling,r=e.key==="ArrowLeft"?-1:e.key==="ArrowRight"?1:0,i=e.key==="ArrowUp"?-1:e.key==="ArrowDown"?1:0;this._scrollSpeed.x+=Math.sign(r)*n,this._scrollSpeed.y+=Math.sign(i)*n,e.preventDefault(),this._onTapMove({clientX:this._lastMousePosition.x,clientY:this._lastMousePosition.y,preventDefault:()=>{}})}_recalculateSelectionAreaRect(){const{_scrollSpeed:e,_areaLocation:n,_targetElement:r,_options:i}=this,{scrollTop:o,scrollHeight:a,clientHeight:s,scrollLeft:l,scrollWidth:u,clientWidth:c}=r,d=this._targetRect,{x1:f,y1:m}=n;let{x2:p,y2:h}=n;const{behaviour:{scrolling:{startScrollMargins:v}}}=i;p<d.left+v.x?(e.x=l?-Cr(d.left-p+v.x):0,p=p<d.left?d.left:p):p>d.right-v.x?(e.x=u-l-c?Cr(d.left+d.width-p-v.x):0,p=p>d.right?d.right:p):e.x=0,h<d.top+v.y?(e.y=o?-Cr(d.top-h+v.y):0,h=h<d.top?d.top:h):h>d.bottom-v.y?(e.y=a-o-s?Cr(d.top+d.height-h-v.y):0,h=h>d.bottom?d.bottom:h):e.y=0;const C=kp(f,p),S=kp(m,h),w=Pp(f,p),y=Pp(m,h);this._areaRect=$p(C,S,w-C,y-S)}_redrawSelectionArea(){const{x:e,y:n,width:r,height:i}=this._areaRect,{style:o}=this._area;o.left=`${e}px`,o.top=`${n}px`,o.width=`${r}px`,o.height=`${i}px`}_onTapStop(e,n){var r;const{document:i,features:o}=this._options,{_singleClick:a}=this;_n(this._targetElement,"scroll",this._onStartAreaScroll),_n(i,["mousemove","touchmove"],this._delayedTapMove),_n(i,["touchmove","mousemove"],this._onTapMove),_n(i,["mouseup","touchcancel","touchend"],this._onTapStop),_n(i,"scroll",this._onScroll),this._keepSelection(),e&&a&&o.singleTap.allow?this._onSingleTap(e):!a&&!n&&(this._updateElementSelection(),this._emitEvent("stop",e)),this._scrollSpeed.x=0,this._scrollSpeed.y=0,_n(this._targetElement,"wheel",this._wheelScroll,{passive:!0}),_n(this._options.document,"keydown",this._keyboardScroll,{passive:!0}),this._clippingElement.remove(),(r=this._frame)==null||r.cancel(),ir(this._area,"display","none")}_updateElementSelection(){const{_selectables:e,_options:n,_selection:r,_areaRect:i}=this,{stored:o,selected:a,touched:s}=r,{intersect:l,overlap:u}=n.behaviour,c=u==="invert",d=[],f=[],m=[];for(let h=0;h<e.length;h++){const v=e[h];if(Rp(i,v.getBoundingClientRect(),l)){if(a.includes(v))o.includes(v)&&!s.includes(v)&&s.push(v);else if(c&&o.includes(v)){m.push(v);continue}else f.push(v);d.push(v)}}c&&f.push(...o.filter(h=>!a.includes(h)));const p=u==="keep";for(let h=0;h<a.length;h++){const v=a[h];!d.includes(v)&&!(p&&o.includes(v))&&m.push(v)}r.selected=d,r.changed={added:f,removed:m},this._latestElement=void 0}_emitEvent(e,n){return this.emit(e,{event:n,store:this._selection,selection:this})}_keepSelection(){const{_options:e,_selection:n}=this,{selected:r,changed:i,touched:o,stored:a}=n,s=r.filter(l=>!a.includes(l));switch(e.behaviour.overlap){case"drop":{n.stored=[...s,...a.filter(l=>!o.includes(l))];break}case"invert":{n.stored=[...s,...a.filter(l=>!i.removed.includes(l))];break}case"keep":{n.stored=[...a,...r.filter(l=>!a.includes(l))];break}}}trigger(e,n=!0){this._onTapStart(e,n)}resolveSelectables(){this._selectables=Ur(this._options.selectables,this._options.document)}clearSelection(e=!0,n=!1){const{selected:r,stored:i,changed:o}=this._selection;o.added=[],o.removed.push(...r,...e?i:[]),n||(this._emitEvent("move",null),this._emitEvent("stop",null)),this._selection=Mp(e?[]:i)}getSelection(){return this._selection.stored}getSelectionArea(){return this._area}getSelectables(){return this._selectables}setAreaLocation(e){Object.assign(this._areaLocation,e),this._redrawSelectionArea()}getAreaLocation(){return this._areaLocation}cancel(e=!1){this._onTapStop(null,!e)}destroy(){this.cancel(),this.disable(),this._clippingElement.remove(),super.unbindAllListeners()}select(e,n=!1){const{changed:r,selected:i,stored:o}=this._selection,a=Ur(e,this._options.document).filter(s=>!i.includes(s)&&!o.includes(s));return o.push(...a),i.push(...a),r.added.push(...a),r.removed=[],this._latestElement=void 0,n||(this._emitEvent("move",null),this._emitEvent("stop",null)),a}deselect(e,n=!1){const{selected:r,stored:i,changed:o}=this._selection,a=Ur(e,this._options.document).filter(s=>r.includes(s)||i.includes(s));this._selection.stored=i.filter(s=>!a.includes(s)),this._selection.selected=r.filter(s=>!a.includes(s)),this._selection.changed.added=[],this._selection.changed.removed.push(...a.filter(s=>!o.removed.includes(s))),this._latestElement=void 0,n||(this._emitEvent("move",null),this._emitEvent("stop",null))}};Xg.version="3.9.0";let uI=Xg;const dI="5.2.0",fI={version:dI},pI={strings:{uploadStalled:"Upload has not made any progress for %{seconds} seconds. You may want to retry it."}};function hI(t,e){let n=e;return n||(n=new Error("Upload error")),typeof n=="string"&&(n=new Error(n)),n instanceof Error||(n=Object.assign(new Error("Upload error"),{data:n})),R$(t)?(n=new Ul(n,t),n):(n.request=t,n)}function Fp(t){return t.data.slice(0,t.data.size,t.meta.type)}const mI={formData:!0,fieldName:"file",method:"post",allowedMetaFields:!0,bundle:!1,headers:{},timeout:30*1e3,limit:5,withCredentials:!1,responseType:""};class vI extends M${static VERSION=fI.version;#e;#t;uploaderEvents;constructor(e,n){if(super(e,{...mI,fieldName:n.bundle?"files[]":"file",...n}),this.type="uploader",this.id=this.opts.id||"XHRUpload",this.defaultLocale=pI,this.i18nInit(),this.#t=new P$({concurrency:this.opts.limit}),this.opts.bundle&&!this.opts.formData)throw new Error("`opts.formData` must be true when `opts.bundle` is enabled.");if(this.opts.bundle&&typeof this.opts.headers=="function")throw new Error("`opts.headers` can not be a function when the `bundle: true` option is set.");if(n?.allowedMetaFields===void 0&&"metaFields"in this.opts)throw new Error("The `metaFields` option has been renamed to `allowedMetaFields`.");this.uploaderEvents=Object.create(null),this.#e=r=>async(i,o)=>{try{const a=await w$(i,{...o,onBeforeRequest:(u,c)=>this.opts.onBeforeRequest?.(u,c,r),shouldRetry:this.opts.shouldRetry,onAfterResponse:this.opts.onAfterResponse,onTimeout:u=>{const c=Math.ceil(u/1e3),d=new Error(this.i18n("uploadStalled",{seconds:c}));this.uppy.emit("upload-stalled",d,r)},onUploadProgress:u=>{if(u.lengthComputable)for(const{id:c}of r){const d=this.uppy.getFile(c);d!=null&&this.uppy.emit("upload-progress",d,{uploadStarted:d.progress.uploadStarted??0,bytesUploaded:u.loaded/u.total*d.size,bytesTotal:d.size})}}});let s=await this.opts.getResponseData?.(a);if(a.responseType==="json")s??=a.response;else try{s??=JSON.parse(a.responseText)}catch(u){throw new Error("@uppy/xhr-upload expects a JSON response (with a `url` property). To parse non-JSON responses, use `getResponseData` to turn your response into JSON.",{cause:u})}const l=typeof s?.url=="string"?s.url:void 0;for(const{id:u}of r)this.uppy.emit("upload-success",this.uppy.getFile(u),{status:a.status,body:s,uploadURL:l});return a}catch(a){if(a.name==="AbortError")return;const s=a.request;for(const l of r)this.uppy.emit("upload-error",this.uppy.getFile(l.id),hI(s,a),s);throw a}}}getOptions(e){const n=this.uppy.getState().xhrUpload,{headers:r}=this.opts,i={...this.opts,...n||{},...e.xhrUpload||{},headers:{}};return typeof r=="function"?i.headers=r(e):Object.assign(i.headers,this.opts.headers),n&&Object.assign(i.headers,n.headers),e.xhrUpload&&Object.assign(i.headers,e.xhrUpload.headers),i}addMetadata(e,n,r){Af(r.allowedMetaFields,n).forEach(o=>{const a=n[o];Array.isArray(a)?a.forEach(s=>e.append(o,s)):e.append(o,a)})}createFormDataUpload(e,n){const r=new FormData;this.addMetadata(r,e.meta,n);const i=Fp(e);return e.name?r.append(n.fieldName,i,e.meta.name):r.append(n.fieldName,i),r}createBundledUpload(e,n){const r=new FormData,{meta:i}=this.uppy.getState();return this.addMetadata(r,i,n),e.forEach(o=>{const a=this.getOptions(o),s=Fp(o);o.name?r.append(a.fieldName,s,o.name):r.append(a.fieldName,s)}),r}async#n(e){const n=new F$(this.uppy),r=new AbortController;n.onFileRemove(e.id,()=>r.abort()),n.onCancelAll(e.id,()=>r.abort());try{await this.#t.add(async i=>{const o=this.getOptions(e),a=this.#e([e]),s=o.formData?this.createFormDataUpload(e,o):e.data,l=typeof o.endpoint=="string"?o.endpoint:await o.endpoint(e);return a(l,{...o,body:s,signal:AbortSignal.any([i,r.signal])})})}catch(i){if(i.name==="AbortError")return;throw i}finally{n.remove()}}async#r(e){const n=new AbortController;function r(){n.abort()}this.uppy.once("cancel-all",r);try{await this.#t.add(async i=>{const o=this.uppy.getState().xhrUpload??{},a=this.#e(e),s=this.createBundledUpload(e,{...this.opts,...o}),l=typeof this.opts.endpoint=="string"?this.opts.endpoint:await this.opts.endpoint(e);return a(l,{...this.opts,body:s,signal:AbortSignal.any([i,n.signal])})})}catch(i){if(i.name==="AbortError")return;throw i}finally{this.uppy.off("cancel-all",r)}}#o(e){const n=this.getOptions(e),r=Af(n.allowedMetaFields,e.meta);return{...e.remote?.body,protocol:"multipart",endpoint:n.endpoint,size:e.data.size,fieldname:n.fieldName,metadata:Object.fromEntries(r.map(i=>[i,e.meta[i]])),httpMethod:n.method,useFormData:n.formData,headers:n.headers}}async#i(e){await Promise.allSettled(e.map(n=>{if(n.isRemote){const r=()=>this.#t,i=new AbortController,o=a=>{a.id===n.id&&i.abort()};return this.uppy.on("file-removed",o),this.uppy.getRequestClientForFile(n).uploadRemoteFile(n,this.#o(n),{signal:i.signal,getQueue:r}).finally(()=>{this.uppy.off("file-removed",o)})}return this.#n(n)}))}#s=async e=>{if(e.length===0){this.uppy.log("[XHRUpload] No files to upload!");return}this.opts.limit===0&&this.uppy.log("[XHRUpload] When uploading multiple files at once, consider setting the `limit` option (to `10` for example), to limit the number of concurrent uploads, which helps prevent memory and network issues: https://uppy.io/docs/xhr-upload/#limit-0","warning"),this.uppy.log("[XHRUpload] Uploading...");const n=this.uppy.getFilesByIds(e),r=E$(n),i=T$(r);if(this.uppy.emit("upload-start",i),this.opts.bundle){if(r.some(a=>a.isRemote))throw new Error("Can’t upload remote files when the `bundle: true` option is set");if(typeof this.opts.headers=="function")throw new TypeError("`headers` may not be a function when the `bundle: true` option is set");await this.#r(r)}else await this.#i(r)};install(){if(this.opts.bundle){const{capabilities:e}=this.uppy.getState();this.uppy.setState({capabilities:{...e,individualCancellation:!1}})}this.uppy.addUploader(this.#s)}uninstall(){if(this.opts.bundle){const{capabilities:e}=this.uppy.getState();this.uppy.setState({capabilities:{...e,individualCancellation:!0}})}this.uppy.removeUploader(this.#s)}}const Cu=new Map,dc=Symbol("ServiceContainerId");function gI(t,e){Cu.set(t,e)}function _I(t){Cu.delete(t)}function je(t){const e=t??Pi(dc);if(!e)throw new Error("No VueFinder app instance found. Make sure VueFinder component is mounted and provide the id explicitly or use within a VueFinder component tree.");const n=Cu.get(e);if(!n)throw new Error(`VueFinder app instance with id "${e}" was not found. Make sure the VueFinder component with id="${e}" is mounted.`);return n}function yI(t){const e=localStorage.getItem(t+"_storage"),n=Lt(JSON.parse(e??"{}"));Ae(n,r);function r(){Object.keys(n).length?localStorage.setItem(t+"_storage",JSON.stringify(n)):localStorage.removeItem(t+"_storage")}function i(s,l){n[s]=l}function o(s){delete n[s]}function a(){Object.keys(n).forEach(s=>o(s))}return{getStore:(s,l=null)=>s in n?n[s]:l,setStore:i,removeStore:o,clearStore:a}}function Xt(t,e="An error occurred"){if(!t)return e;if(typeof t=="string")return t||e;if(t instanceof Error)return t.message||e;if(typeof t=="object"&&t!==null){const n=t;if(typeof n.message=="string"&&n.message)return n.message;if(typeof n.error=="string"&&n.error)return n.error}return e}function bI(t,e){return nv(t,e,{encode:JSON.stringify,decode:JSON.parse})}function wI(t){if(!t?.config?.get)return!0;try{return!!t.config.get("notificationsEnabled")}catch{return!0}}function qr(t,e,n){const r={type:e,message:n};if(t?.emitter?.emit?.("vf-notify",r),!!wI(t))switch(e){case"success":Oo.success(n);break;case"error":Oo.error(n);break;case"warning":Oo.warning(n);break;default:Oo.info(n);break}}function Jt(t){return{success(e){qr(t,"success",e)},error(e){qr(t,"error",e)},info(e){qr(t,"info",e)},warning(e){qr(t,"warning",e)},emit(e,n){qr(t,e,n)}}}const ol=new Map;async function al(t,e){const n=e[t];return typeof n=="function"?(await n()).default:n}function SI(t,e,n,r,i){const o=Jt({emitter:n,config:i}),a="vuefinder_locale",s="global";let l;if(ol.has(s))l=ol.get(s),e&&e!==l.get()&&l.set(e);else{const y=localStorage.getItem(a)?JSON.parse(localStorage.getItem(a)):null;l=bI(a,e||y||"en"),ol.set(s,l)}const u="vuefinder_translations",c=y=>{try{const E=localStorage.getItem(u);if(E)return JSON.parse(E)[y]||null}catch{}return null},d=(y,E)=>{try{const T=localStorage.getItem(u),A=T?JSON.parse(T):{};A[y]=E,localStorage.setItem(u,JSON.stringify(A))}catch{}},f=$e(l),m=String(f.value),p=c(m),h=K(p||{});let v=!1;!p&&Object.keys(r).length>0&&al(m,r).then(y=>{h.value=y,d(m,y)}).catch(()=>{}),Ae(f,async(y,E)=>{if(E&&y===E)return;if(!v){v=!0;const A=c(String(y));if(A)h.value=A;else if(Object.keys(r).length>0)try{const O=await al(String(y),r);h.value=O,d(String(y),O)}catch{}return}const T=c(String(y));if(T)h.value=T;else try{const A=await al(String(y),r);h.value=A,d(String(y),A)}catch(A){const O=Xt(A,"Locale cannot be loaded!");o.error(O);return}Object.values(r).length>1&&(o.success("The language is set to "+y),n.emit("vf-language-saved"))},{immediate:!1});const C=(y,...E)=>E.length?C(y=y.replace("%s",String(E.shift())),...E):y;function S(y,...E){return h.value&&Object.prototype.hasOwnProperty.call(h.value,y)?C(h.value[y]||y,...E):C(y,...E)}const w=te({get:()=>f.value,set:y=>{l.set(y)}});return Lt({t:S,locale:w,localeAtom:l})}const CI=["edit","newfile","newfolder","preview","archive","unarchive","search","rename","upload","delete","fullscreen","download","language","move","copy","history","theme","pinned"],Jg={simple:{search:!0,preview:!0,rename:!0,upload:!0,delete:!0,newfile:!0,newfolder:!0,download:!0},advanced:CI.reduce((t,e)=>(t[e]=!0,t),{})};function Dp(){return Jg.advanced}function Zg(t){return t?t==="simple"||t==="advanced"?{...Jg[t]}:{...Dp(),...t}:Dp()}const EI="4.1.2";function Eu(t,e,n,r,i){return e=Math,n=e.log,r=1024,i=n(t)/n(r)|0,(t/e.pow(r,i)).toFixed(0)+" "+(i?"KMGTPEZY"[--i]+"iB":"B")}function e_(t,e,n,r,i){return e=Math,n=e.log,r=1e3,i=n(t)/n(r)|0,(t/e.pow(r,i)).toFixed(0)+" "+(i?"KMGTPEZY"[--i]+"B":"B")}function TI(t){if(typeof t=="number")return t;const e={k:1,m:2,g:3,t:4},n=/(\d+(?:\.\d+)?)\s?(k|m|g|t)?b?/i.exec(t);if(!n)return 0;const r=parseFloat(n[1]||"0"),i=(n[2]||"").toLowerCase(),o=e[i]??0;return Math.round(r*Math.pow(1024,o))}function xI(t){const e=Qi(null),n=K(!1),r=K(),i=K(!1);return{visible:n,type:e,data:r,open:(o,a=null)=>{t.get("fullScreen")||(document.querySelector("body").style.overflow="hidden"),n.value=!0,e.value=o,r.value=a},close:()=>{t.get("fullScreen")||(document.querySelector("body").style.overflow=""),n.value=!1,e.value=null},setEditMode:o=>{i.value=o},editMode:i}}const Ca={view:"grid",theme:"silver",fullScreen:!1,showTreeView:!1,showHiddenFiles:!0,metricUnits:!1,showThumbnails:!0,persist:!1,path:"",pinnedFolders:[],notificationsEnabled:!0,expandTreeByDefault:!1,expandedTreePaths:[]},Ea={initialPath:null,maxFileSize:null,loadingIndicator:"circular",showMenuBar:!0,showToolbar:!0,gridItemWidth:96,gridItemHeight:80,gridItemGap:8,gridIconSize:48,listItemHeight:32,listItemGap:2,listIconSize:16,notificationPosition:"bottom-center",notificationDuration:3e3,notificationVisibleToasts:4,notificationRichColors:!0},OI=new Set(Object.keys(Ea));function AI(t){return t||"silver"}function t_(t){return OI.has(t)}function Lp(t){const e={},n={},r=t;for(const i in r)if(t_(i))n[i]=r[i];else if(i in Ca){const o=i;e[o]=r[i]}return{persistenceConfig:e,nonPersistenceConfig:n}}function jp(t,e){const n={...Ca,...e,...t};return n.theme=AI(n.theme),n}function Vp(t,e){return{...Ea,...e,...t}}const $I=(t,e={})=>{const n=`vuefinder_config_${t}`,{persistenceConfig:r,nonPersistenceConfig:i}=Lp(e),o=jp(r,Ca),a=Vp(i,Ea),s=nv(n,o,{encode:JSON.stringify,decode:JSON.parse}),l=At(a),u=ar([s,l],(p,h)=>({...p,...h})),c=(p={})=>{const h=s.get(),v=l.get(),{persistenceConfig:C,nonPersistenceConfig:S}=Lp(p),w=jp(C,h),y=Vp(S,v);s.set(w),l.set(y)},d=p=>t_(p)?l.get()[p]:s.get()[p],f=()=>({...s.get(),...l.get()}),m=(p,h)=>{const v=s.get();typeof p=="object"&&p!==null?s.set({...v,...p}):s.set({...v,[p]:h})};return{state:u,init:c,get:d,set:m,toggle:p=>{const h=s.get();m(p,!h[p])},all:f,reset:()=>{s.set({...Ca}),l.set({...Ea})}}};function RI(t,e){if(typeof t=="string"&&typeof e=="string")return t.toLowerCase().localeCompare(e.toLowerCase());const n=Number(t)||0,r=Number(e)||0;return n===r?0:n<r?-1:1}const PI=()=>{const t=At(""),e=At([]),n=At(!1),r=At([]),i=At({active:!1,column:"",order:""}),o=At({kind:"all",showHidden:!1}),a=At(new Set),s=At({type:"copy",path:"",items:new Set}),l=At(null),u=At(0),c=At(!1),d=At([]),f=At(-1),m=ar([t],V=>{const H=(V??"").trim(),ie=H.indexOf("://"),fe=ie>=0?H.slice(0,ie):"",Oe=(ie>=0?H.slice(ie+3):H).split("/").filter(Boolean);let Ce="";const Ne=Oe.map(Re=>(Ce=Ce?`${Ce}/${Re}`:Re,{basename:Re,name:Re,path:fe?`${fe}://${Ce}`:Ce,type:"dir"}));return{storage:fe,breadcrumb:Ne,path:H}}),p=ar([r,i,o],(V,H,ie)=>{let fe=V;ie.kind==="files"?fe=fe.filter(Ve=>Ve.type==="file"):ie.kind==="folders"&&(fe=fe.filter(Ve=>Ve.type==="dir")),ie.showHidden||(fe=fe.filter(Ve=>!Ve.basename.startsWith(".")));const{active:Oe,column:Ce,order:Ne}=H;if(!Oe||!Ce)return fe;const Re=Ne==="asc"?1:-1;return fe.slice().sort((Ve,ct)=>RI(Ve[Ce],ct[Ce])*Re)}),h=ar([r,a],(V,H)=>H.size===0?[]:V.filter(ie=>H.has(ie.path))),v=(V,H)=>{const ie=t.get();if((H??!0)&&ie!==V){const fe=d.get(),Oe=f.get();Oe<fe.length-1&&fe.splice(Oe+1),fe.length===0&&ie&&fe.push(ie),fe.push(V),d.set([...fe]),f.set(fe.length-1)}t.set(V)},C=V=>{r.set(V??[])},S=V=>{e.set(V??[])},w=(V,H)=>{i.set({active:!0,column:V,order:H})},y=V=>{const H=i.get();H.active&&H.column===V?i.set({active:H.order==="asc",column:V,order:"desc"}):i.set({active:!0,column:V,order:"asc"})},E=()=>{i.set({active:!1,column:"",order:""})},T=(V,H)=>{o.set({kind:V,showHidden:H})},A=()=>{o.set({kind:"all",showHidden:!1})},O=(V,H="multiple")=>{const ie=new Set(a.get());H==="single"&&ie.clear(),ie.add(V),a.set(ie)},q=(V,H="multiple")=>{const ie=new Set(a.get());H==="single"&&ie.clear(),V.forEach(fe=>ie.add(fe)),a.set(ie)},I=V=>{const H=new Set(a.get());H.delete(V),a.set(H)},P=V=>a.get().has(V),z=(V,H="multiple")=>{const ie=new Set(a.get());ie.has(V)?ie.delete(V):(H==="single"&&ie.clear(),ie.add(V)),a.set(ie)},F=(V="multiple",H)=>{if(V==="single"){const ie=r.get()[0];if(ie){const fe=ie.path;a.set(new Set([fe])),u.set(1)}}else{if(H?.selectionFilterType||H?.selectionFilterMimeIncludes&&H.selectionFilterMimeIncludes.length>0){const ie=r.get().filter(fe=>{const Oe=H.selectionFilterType,Ce=H.selectionFilterMimeIncludes;return Oe==="files"&&fe.type==="dir"||Oe==="dirs"&&fe.type==="file"?!1:Ce&&Array.isArray(Ce)&&Ce.length>0&&fe.type!=="dir"?fe.mime_type?Ce.some(Ne=>fe.mime_type?.startsWith(Ne)):!1:!0}).map(fe=>fe.path);a.set(new Set(ie))}else{const ie=new Set(r.get().map(fe=>fe.path));a.set(ie)}de(a.get().size)}},Y=()=>{a.set(new Set),u.set(0)},le=V=>{const H=new Set(V??[]);a.set(H),u.set(H.size)},de=V=>{u.set(V)},Q=V=>{c.set(!!V)},M=()=>c.get(),k=(V,H)=>{const ie=r.get().filter(fe=>H.has(fe.path));s.set({type:V,path:m.get().path,items:new Set(ie)})},X=V=>ar([s],H=>H.type==="cut"&&Array.from(H.items).some(ie=>ie.path===V)),N=V=>ar([s],H=>H.type==="copy"&&Array.from(H.items).some(ie=>ie.path===V));return{files:r,storages:e,currentPath:t,sort:i,filter:o,selectedKeys:a,selectedCount:u,loading:c,draggedItem:l,clipboardItems:s,path:m,sortedFiles:p,selectedItems:h,setPath:v,setFiles:C,setStorages:S,setSort:w,toggleSort:y,clearSort:E,setFilter:T,clearFilter:A,select:O,selectMultiple:q,deselect:I,toggleSelect:z,selectAll:F,isSelected:P,clearSelection:Y,setSelection:le,setSelectedCount:de,setLoading:Q,isLoading:M,setClipboard:k,createIsCut:X,createIsCopied:N,isCut:V=>{const H=X(V);return $e(H).value??!1},isCopied:V=>{const H=N(V);return $e(H).value??!1},clearClipboard:()=>{s.set({type:"copy",path:"",items:new Set})},getClipboard:()=>s.get(),setDraggedItem:V=>{l.set(V)},getDraggedItem:()=>l.get(),clearDraggedItem:()=>{l.set(null)},setReadOnly:V=>{n.set(V)},getReadOnly:()=>n.get(),isReadOnly:V=>n.get()?!0:V.read_only??!1,goBack:()=>{const V=d.get(),H=f.get();if(H>0){const ie=H-1,fe=V[ie];fe&&(f.set(ie),v(fe,!1))}},goForward:()=>{const V=d.get(),H=f.get();if(H<V.length-1){const ie=H+1,fe=V[ie];fe&&(f.set(ie),v(fe,!1))}},canGoBack:ar([f],V=>V>0),canGoForward:ar([d,f],(V,H)=>H<V.length-1),navigationHistory:d,historyIndex:f}};class kI{validateParam(e,n){if(e==null)throw new Error(`${n} is required`)}validatePath(e){if(!e)throw new Error("Path must be a non-empty string")}parsePath(e){if(!e)return{};if(e.includes("://")){const[n,...r]=e.split("://");return{storage:n,path:r.join("://")}}return{path:e}}combinePath(e,n){return e&&n?`${e}://${n}`:n||""}}function zp(t,e,n){const r=`HTTP ${e}: ${n}`;if(!t)return r;try{const i=JSON.parse(t);if(i.message)return i.message;if(i.error){if(typeof i.error=="string")return i.error;if(i.error.message)return i.error.message}if(i.errors&&Array.isArray(i.errors)&&i.errors.length>0){const o=i.errors.map(a=>a.message).filter(a=>!!a);if(o.length>0)return o.join(", ")}return i.detail?i.detail:i.title?i.title:t}catch{return t||r}}class n_ extends kI{config;static DEFAULT_URLS={list:"",upload:"/upload",delete:"/delete",rename:"/rename",copy:"/copy",move:"/move",archive:"/archive",unarchive:"/unarchive",createFile:"/create-file",createFolder:"/create-folder",preview:"/preview",download:"/download",search:"/search",save:"/save"};constructor(e){super();const n={...n_.DEFAULT_URLS,...e.url||{}};this.config={...e,baseURL:e.baseURL||"",url:n}}setBaseURL(e){this.config.baseURL=e||""}setToken(e){this.config.token=e}configureUploader(e,n){const r=this.getHeaders();delete r["Content-Type"],e.use(vI,{endpoint:`${this.config.baseURL}${this.config.url.upload}`,fieldName:"file",bundle:!1,headers:r,formData:!0}),e.on("upload",()=>{const i=n.getTargetPath();e.getFiles().forEach(o=>{e.setFileMeta(o.id,{path:i})})})}getHeaders(){const e={"Content-Type":"application/json",...this.config.headers};return this.config.token&&(e.Authorization=`Bearer ${this.config.token}`),e}async request(e,n={}){const r=`${this.config.baseURL}${e}`,i=await fetch(r,{...n,headers:{...this.getHeaders(),...n.headers}});if(!i.ok){const o=await i.text(),a=zp(o,i.status,i.statusText);throw new Error(a)}return(i.headers.get("content-type")||"").includes("application/json")?await i.json():await i.text()}async list(e){const n=new URLSearchParams;e?.path&&n.append("path",e.path);const r=n.toString()?`${this.config.url.list}?${n.toString()}`:this.config.url.list;return await this.request(r,{method:"GET"})}async delete(e){return this.validateParam(e.items,"items"),this.validateParam(e.path,"path"),await this.request(this.config.url.delete,{method:"POST",body:JSON.stringify({path:e.path,items:e.items})})}async rename(e){return this.validateParam(e.path,"path"),this.validateParam(e.item,"item"),this.validateParam(e.name,"name"),this.validatePath(e.path),await this.request(this.config.url.rename,{method:"POST",body:JSON.stringify({path:e.path,item:e.item,name:e.name})})}async copy(e){return this.validateParam(e.sources,"sources"),this.validateParam(e.destination,"destination"),e.path&&this.validatePath(e.path),await this.request(this.config.url.copy,{method:"POST",body:JSON.stringify({sources:e.sources,destination:e.destination,path:e.path})})}async move(e){return this.validateParam(e.sources,"sources"),this.validateParam(e.destination,"destination"),e.path&&this.validatePath(e.path),await this.request(this.config.url.move,{method:"POST",body:JSON.stringify({sources:e.sources,destination:e.destination,path:e.path})})}async archive(e){return this.validateParam(e.items,"items"),this.validateParam(e.name,"name"),this.validateParam(e.path,"path"),await this.request(this.config.url.archive,{method:"POST",body:JSON.stringify({items:e.items,path:e.path,name:e.name})})}async unarchive(e){return this.validateParam(e.item,"item"),this.validateParam(e.path,"path"),await this.request(this.config.url.unarchive,{method:"POST",body:JSON.stringify({item:e.item,path:e.path})})}async createFile(e){return this.validateParam(e.name,"name"),this.validateParam(e.path,"path"),await this.request(this.config.url.createFile,{method:"POST",body:JSON.stringify({path:e.path,name:e.name})})}async createFolder(e){return this.validateParam(e.name,"name"),this.validateParam(e.path,"path"),await this.request(this.config.url.createFolder,{method:"POST",body:JSON.stringify({path:e.path,name:e.name})})}getPreviewUrl(e){this.validatePath(e.path);const n=new URLSearchParams({path:e.path});return`${this.config.baseURL}${this.config.url.preview}?${n.toString()}`}async getContent(e){this.validatePath(e.path);const n=new URLSearchParams({path:e.path}),r=`${this.config.baseURL}${this.config.url.preview}?${n.toString()}`,i=await fetch(r,{headers:this.getHeaders()});if(!i.ok){const o=await i.text(),a=zp(o,i.status,i.statusText);throw new Error(a)}return{content:await i.text(),mimeType:i.headers.get("Content-Type")||void 0}}getDownloadUrl(e){this.validatePath(e.path);const n=new URLSearchParams({path:e.path});return`${this.config.baseURL}${this.config.url.download}?${n.toString()}`}async search(e){const n=this.config.url.search,r=new URLSearchParams;e.path&&r.set("path",e.path),e.filter&&r.set("filter",e.filter),e.deep&&r.set("deep","1"),e.size&&e.size!=="all"&&r.set("size",e.size);const i=r.toString()?`${n}?${r.toString()}`:n;return(await this.request(i,{method:"GET"})).files||[]}async save(e){return this.validateParam(e.path,"path"),await this.request(this.config.url.save,{method:"POST",body:JSON.stringify({path:e.path,content:e.content}),headers:this.getHeaders()})}}const Np={list:t=>["adapter","list",t],search:(t,e,n,r)=>["adapter","search",t,e,n,r],delete:t=>["adapter","delete",t],rename:()=>["adapter","rename"],copy:()=>["adapter","copy"],move:()=>["adapter","move"],archive:()=>["adapter","archive"],unarchive:()=>["adapter","unarchive"],createFile:()=>["adapter","createFile"],createFolder:()=>["adapter","createFolder"]};class II{driver;queryClient;config;onBeforeOpen;onAfterOpen;constructor(e,n={}){this.driver=e,this.onBeforeOpen=n.onBeforeOpen,this.onAfterOpen=n.onAfterOpen,this.queryClient=n.queryClient||new y$({defaultOptions:{queries:{refetchOnWindowFocus:n.refetchOnWindowFocus??!1,staleTime:n.staleTime??300*1e3,retry:n.retry??2},mutations:{retry:n.retry??1}}}),this.config={queryClient:this.queryClient,refetchOnWindowFocus:n.refetchOnWindowFocus??!1,staleTime:n.staleTime??300*1e3,cacheTime:n.cacheTime??600*1e3,retry:n.retry??2,onBeforeOpen:this.onBeforeOpen??(()=>{}),onAfterOpen:this.onAfterOpen??(()=>{})}}getDriver(){return this.driver}getQueryClient(){return this.queryClient}async list(e){const n=Np.list(e);return await this.queryClient.fetchQuery({queryKey:n,queryFn:()=>this.driver.list({path:e}),staleTime:this.config.staleTime})}async open(e){this.onBeforeOpen&&this.onBeforeOpen();const n=await this.list(e);return this.onAfterOpen&&this.onAfterOpen(n),n}async delete(e){const n=await this.driver.delete(e);return this.invalidateListQueries(),n}async rename(e){const n=await this.driver.rename(e);return this.invalidateListQueries(),n}async copy(e){const n=await this.driver.copy(e);return this.invalidateListQueries(),n}async move(e){const n=await this.driver.move(e);return this.invalidateListQueries(),n}async archive(e){const n=await this.driver.archive(e);return this.invalidateListQueries(),n}async unarchive(e){const n=await this.driver.unarchive(e);return this.invalidateListQueries(),n}async createFile(e){const n=await this.driver.createFile(e);return this.invalidateListQueries(),n}async createFolder(e){const n=await this.driver.createFolder(e);return this.invalidateListQueries(),n}async getContent(e){const n=["adapter","content",e.path];return await this.queryClient.fetchQuery({queryKey:n,queryFn:()=>this.driver.getContent(e),staleTime:this.config.staleTime})}getPreviewUrl(e){return this.driver.getPreviewUrl(e)}getDownloadUrl(e){return this.driver.getDownloadUrl(e)}async search(e){const n=Np.search(e.path,e.filter,e.deep,e.size);return await this.queryClient.fetchQuery({queryKey:n,queryFn:()=>this.driver.search(e),staleTime:this.config.staleTime})}async save(e){const n=await this.driver.save(e);return this.invalidateListQueries(),n}invalidateListQueries(){this.queryClient.invalidateQueries({queryKey:["adapter"],exact:!1})}invalidateListQuery(e){this.queryClient.invalidateQueries({queryKey:["adapter","list",e],exact:!0})}clearCache(){this.queryClient.clear()}}function MI(t){const e=$e(t.state);return{current:te(()=>e.value.theme||"silver"),set:n=>{t.set("theme",n)}}}const FI=(t,e)=>{const n=yI(t.id??"vf"),r=NO(),i=e.i18n,o=t.locale??e.locale,a=$I(t.id??"vf",t.config??{}),s=PI();if(!t.driver)throw new Error("Driver is required for VueFinder");const l=new II(t.driver);return Lt({version:EI,config:a,theme:(()=>{const u=MI(a);return{current:u.current,set:u.set}})(),fs:s,root:null,debug:t.debug??!1,emitter:r,storage:n,i18n:SI(n,o,r,i,a),modal:xI(a),adapter:Xn(l),features:Zg(t.features),selectionMode:t.selectionMode||"multiple",selectionFilterType:te(()=>t.selectionFilterType||"both"),selectionFilterMimeIncludes:te(()=>t.selectionFilterMimeIncludes||[]),treeViewData:[],filesize:a.get("metricUnits")?e_:Eu,contextMenuItems:t.contextMenuItems,customUploader:t.customUploader})},DI=["data-theme"],LI={class:"vuefinder__modal-layout__container"},jI={class:"vuefinder__modal-layout__content"},VI={key:0,class:"vuefinder__modal-layout__footer"},zI={key:0,class:"vuefinder__modal-drag-overlay"},NI={class:"vuefinder__modal-drag-message"},on=Ee({__name:"ModalLayout",props:{showDragOverlay:{type:Boolean},dragOverlayText:{}},setup(t){const e=K(null),n=je();n.config;const r=t;it(()=>{const o=document.querySelector(".v-f-modal input");o&&o.focus(),Xe(()=>{if(document.querySelector(".v-f-modal input")&&window.innerWidth<768&&e.value){const a=e.value.getBoundingClientRect().bottom+16;window.scrollTo({top:a,left:0,behavior:"smooth"})}})});const i=o=>{o.target.classList.contains("vuefinder__modal-layout__wrapper")&&(o.preventDefault(),o.stopPropagation())};return(o,a)=>(b(),x("div",{"data-theme":g(n).theme.current,class:"vuefinder__themer vuefinder__modal-layout","aria-labelledby":"modal-title",role:"dialog","aria-modal":"true",tabindex:"0",onKeyup:a[1]||(a[1]=fi(s=>g(n).modal.close(),["esc"]))},[a[2]||(a[2]=_("div",{class:"vuefinder__modal-layout__overlay"},null,-1)),_("div",LI,[_("div",{class:"vuefinder__modal-layout__wrapper",onContextmenu:i,onMousedown:a[0]||(a[0]=Qe(s=>g(n).modal.close(),["self"]))},[_("div",{ref_key:"modalBody",ref:e,class:"vuefinder__modal-layout__body"},[_("div",jI,[Ue(o.$slots,"default")]),o.$slots.buttons?(b(),x("div",VI,[Ue(o.$slots,"buttons")])):ue("",!0)],512)],32)]),r.showDragOverlay?(b(),x("div",zI,[_("div",NI,D(r.dragOverlayText||"Drag and drop the files/folders to here."),1)])):ue("",!0)],40,DI))}}),UI={class:"vuefinder__modal-header"},BI={class:"vuefinder__modal-header__icon-container"},HI={id:"modal-title",class:"vuefinder__modal-header__title"},mn=Ee({__name:"ModalHeader",props:{title:{},icon:{}},setup(t){return(e,n)=>(b(),x("div",UI,[_("div",BI,[(b(),ne($t(t.icon),{class:"vuefinder__modal-header__icon"}))]),_("div",HI,D(t.title),1)]))}}),qI={xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor","stroke-width":"1.8",viewBox:"0 0 24 24"};function WI(t,e){return b(),x("svg",qI,[...e[0]||(e[0]=[_("circle",{cx:"12",cy:"12",r:"9"},null,-1),_("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 8.2h.01M10.75 11.25H12v4.5m0 0h1.25m-1.25 0h-2"},null,-1)])])}const r_={render:WI},KI={class:"vuefinder__about-modal__content"},YI={class:"vuefinder__about-modal__main"},GI={class:"vuefinder__about-modal__tab-content"},QI={class:"vuefinder__about-modal__lead"},XI={class:"vuefinder__about-modal__description"},JI={class:"vuefinder__about-modal__links"},ZI={href:"https://vuefinder.ozdemir.be",class:"vuefinder__about-modal__link-btn",target:"_blank",rel:"noopener noreferrer"},eM={class:"vuefinder__about-modal__meta"},tM={class:"vuefinder__about-modal__meta-item"},nM={class:"vuefinder__about-modal__meta-label"},rM={class:"vuefinder__about-modal__meta-value"},iM={class:"vuefinder__about-modal__meta-item"},oM={class:"vuefinder__about-modal__meta-label"},i_=Ee({__name:"ModalAbout",setup(t){const e=je(),{t:n}=e.i18n;return(r,i)=>(b(),ne(on,null,{buttons:we(()=>[_("button",{type:"button",class:"vf-btn vf-btn-secondary",onClick:i[0]||(i[0]=o=>g(e).modal.close())},D(g(n)("Close")),1)]),default:we(()=>[_("div",KI,[j(mn,{icon:g(r_),title:"Vuefinder "+g(e).version},null,8,["icon","title"]),_("div",YI,[_("div",GI,[_("div",QI,D(g(n)("A modern, customizable file manager component built for Vue.")),1),_("div",XI,D(g(n)("If you like it, please follow and ⭐ star on GitHub.")),1),_("div",JI,[_("a",ZI,D(g(n)("Project Home")),1),i[1]||(i[1]=_("a",{href:"https://github.com/n1crack/vuefinder",class:"vuefinder__about-modal__link-btn",target:"_blank",rel:"noopener noreferrer"}," GitHub ",-1))]),_("div",eM,[_("div",tM,[_("span",nM,D(g(n)("Version")),1),_("span",rM,D(g(e).version),1)]),_("div",iM,[_("span",oM,D(g(n)("License")),1),i[2]||(i[2]=_("span",{class:"vuefinder__about-modal__meta-value"},"MIT",-1))])])])])])]),_:1}))}}),aM={xmlns:"http://www.w3.org/2000/svg",fill:"none","stroke-width":"1.5",viewBox:"0 0 24 24"};function sM(t,e){return b(),x("svg",aM,[...e[0]||(e[0]=[_("path",{d:"m14.74 9-.346 9m-4.788 0L9.26 9m9.968-3.21q.512.078 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 0 1-2.244 2.077H8.084a2.25 2.25 0 0 1-2.244-2.077L4.772 5.79m14.456 0a48 48 0 0 0-3.478-.397m-12 .562q.51-.089 1.022-.165m0 0a48 48 0 0 1 3.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a52 52 0 0 0-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a49 49 0 0 0-7.5 0"},null,-1)])])}const o_={render:sM},lM={class:"vuefinder__delete-modal__content"},cM={class:"vuefinder__delete-modal__form"},uM={class:"vuefinder__delete-modal__description"},dM={class:"vuefinder__delete-modal__files vf-scrollbar"},fM={key:0,class:"vuefinder__delete-modal__icon vuefinder__delete-modal__icon--dir",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"1"},pM={key:1,class:"vuefinder__delete-modal__icon",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"1"},hM={class:"vuefinder__delete-modal__file-name"},mM={class:"vuefinder__delete-modal__confirmation"},vM={class:"vuefinder__delete-modal__confirmation-label"},gM={class:"vuefinder__delete-modal__confirmation-text"},_M=["disabled"],is=Ee({__name:"ModalDelete",setup(t){const e=je(),n=Jt(e),{t:r}=e.i18n,i=e.fs,o=$e(i.path),a=K(e.modal.data.items),s=K(!1),l=()=>{a.value.length&&s.value&&e.adapter.delete({path:o.value.path,items:a.value.map(({path:u,type:c})=>({path:u,type:c}))}).then(u=>{n.success(r("Files deleted.")),e.fs.setFiles(u.files),e.modal.close()}).catch(u=>{n.error(Xt(u,r("Failed to delete files")))})};return(u,c)=>(b(),ne(on,null,{buttons:we(()=>[_("div",mM,[_("label",vM,[st(_("input",{"onUpdate:modelValue":c[0]||(c[0]=d=>s.value=d),type:"checkbox",class:"vuefinder__delete-modal__checkbox"},null,512),[[$a,s.value]]),_("span",gM,D(g(r)("I'm sure delete it, This action cannot be undone.")),1)])]),_("button",{type:"button",class:"vf-btn vf-btn-danger",disabled:!s.value,onClick:l},D(g(r)("Yes, Delete!")),9,_M),_("button",{type:"button",class:"vf-btn vf-btn-secondary",onClick:c[1]||(c[1]=d=>g(e).modal.close())},D(g(r)("Cancel")),1)]),default:we(()=>[_("div",null,[j(mn,{icon:g(o_),title:g(r)("Delete files")},null,8,["icon","title"]),_("div",lM,[_("div",cM,[_("p",uM,D(g(r)("Are you sure you want to delete these files?")),1),_("div",dM,[(b(!0),x(Ie,null,qe(a.value,d=>(b(),x("p",{key:d.path,class:"vuefinder__delete-modal__file"},[d.type==="dir"?(b(),x("svg",fM,[...c[2]||(c[2]=[_("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"},null,-1)])])):(b(),x("svg",pM,[...c[3]||(c[3]=[_("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"},null,-1)])])),_("span",hM,D(d.basename),1)]))),128))])])])])]),_:1}))}}),yM={xmlns:"http://www.w3.org/2000/svg",fill:"none","stroke-width":"1.5",viewBox:"0 0 24 24"};function bM(t,e){return b(),x("svg",yM,[...e[0]||(e[0]=[_("path",{d:"m16.862 4.487 1.687-1.688a1.875 1.875 0 1 1 2.652 2.652L10.582 16.07a4.5 4.5 0 0 1-1.897 1.13L6 18l.8-2.685a4.5 4.5 0 0 1 1.13-1.897zm0 0L19.5 7.125M18 14v4.75A2.25 2.25 0 0 1 15.75 21H5.25A2.25 2.25 0 0 1 3 18.75V8.25A2.25 2.25 0 0 1 5.25 6H10"},null,-1)])])}const a_={render:bM},wM={class:"vuefinder__rename-modal__content"},SM={class:"vuefinder__rename-modal__item"},CM={class:"vuefinder__rename-modal__item-info"},EM={key:0,class:"vuefinder__rename-modal__icon vuefinder__rename-modal__icon--dir",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"1"},TM={key:1,class:"vuefinder__rename-modal__icon",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"1"},xM={class:"vuefinder__rename-modal__item-name"},os=Ee({__name:"ModalRename",setup(t){const e=je(),n=Jt(e),{t:r}=e.i18n,i=e.fs,o=$e(i.path),a=K(e.modal.data.items[0]),s=K(a.value.basename),l=()=>{s.value!=a.value.basename&&e.adapter.rename({path:o.value.path,item:a.value.path,name:s.value}).then(u=>{n.success(r("%s is renamed.",s.value)),e.fs.setFiles(u.files),e.modal.close()}).catch(u=>{n.error(Xt(u,r("Failed to rename")))})};return(u,c)=>(b(),ne(on,null,{buttons:we(()=>[_("button",{type:"button",class:"vf-btn vf-btn-primary",onClick:l},D(g(r)("Rename")),1),_("button",{type:"button",class:"vf-btn vf-btn-secondary",onClick:c[1]||(c[1]=d=>g(e).modal.close())},D(g(r)("Cancel")),1)]),default:we(()=>[_("div",null,[j(mn,{icon:g(a_),title:g(r)("Rename")},null,8,["icon","title"]),_("div",wM,[_("div",SM,[_("p",CM,[a.value.type==="dir"?(b(),x("svg",EM,[...c[2]||(c[2]=[_("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"},null,-1)])])):(b(),x("svg",TM,[...c[3]||(c[3]=[_("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"},null,-1)])])),_("span",xM,D(a.value.basename),1)]),st(_("input",{"onUpdate:modelValue":c[0]||(c[0]=d=>s.value=d),class:"vuefinder__rename-modal__input",placeholder:"Name",type:"text",onKeyup:fi(l,["enter"])},null,544),[[Xi,s.value]])])])])]),_:1}))}});function An(){const t=je(),e=te(()=>t.features);return{enabled:n=>e.value[n]??!1}}const OM={class:"vuefinder__text-preview"},AM={class:"vuefinder__text-preview__header"},$M=["title"],RM={class:"vuefinder__text-preview__actions"},PM={key:0,class:"vuefinder__text-preview__content"},kM={key:1},IM=Ee({__name:"Text",emits:["success"],setup(t,{emit:e}){const n=e,r=K(""),i=K(""),o=K(null),a=K(!1),s=je(),l=Jt(s),{enabled:u}=An(),{t:c}=s.i18n;it(async()=>{try{const m=await s.adapter.getContent({path:s.modal.data.item.path});r.value=m.content,n("success")}catch(m){Xt(m,"Failed to load text content"),n("success")}});const d=()=>{a.value=!a.value,i.value=r.value,s.modal.setEditMode(a.value)},f=async()=>{try{const m=s.modal.data.item.path;await s.adapter.save({path:m,content:i.value}),r.value=i.value,l.success(c("Updated.")),n("success"),a.value=!a.value}catch(m){l.error(Xt(m,c("Failed to save file")))}};return(m,p)=>(b(),x("div",OM,[_("div",AM,[_("div",{id:"modal-title",class:"vuefinder__text-preview__title",title:g(s).modal.data.item.path},D(g(s).modal.data.item.basename),9,$M),_("div",RM,[a.value?(b(),x("button",{key:0,class:"vuefinder__text-preview__save-button",onClick:f},D(g(c)("Save")),1)):ue("",!0),g(u)("edit")?(b(),x("button",{key:1,class:"vuefinder__text-preview__edit-button",onClick:p[0]||(p[0]=h=>d())},D(a.value?g(c)("Cancel"):g(c)("Edit")),1)):ue("",!0)])]),_("div",null,[a.value?(b(),x("div",kM,[st(_("textarea",{ref_key:"editInput",ref:o,"onUpdate:modelValue":p[1]||(p[1]=h=>i.value=h),class:"vuefinder__text-preview__textarea",name:"text",cols:"30",rows:"10"},null,512),[[Xi,i.value]])])):(b(),x("pre",PM,D(r.value),1))])]))}}),Tu=async(t,e)=>{if(e){if(e.isFile){const n=await new Promise(r=>{e.file(r)});t(e,n)}if(e.isDirectory){const n=e.createReader(),r=await new Promise(i=>{n.readEntries(i)});for(const i of r)await Tu(t,i)}}},bt={PENDING:0,CANCELED:1,UPLOADING:2,ERROR:3,DONE:10};function s_(t){const e=je(),{t:n}=e.i18n,r=e.fs,i=$e(r.path),o=e.config,a=K({QUEUE_ENTRY_STATUS:bt}),s=K(null),l=K(null),u=K(null),c=K(null),d=K(null),f=K([]),m=K(""),p=K(!1),h=K(!1),v=K(null);let C;const S=Q=>{Q.preventDefault(),Q.stopPropagation(),h.value=!0},w=Q=>{Q.preventDefault(),Q.stopPropagation(),h.value=!0},y=Q=>{Q.preventDefault(),Q.stopPropagation(),(!Q.relatedTarget||Q.relatedTarget===document.body)&&(h.value=!1)},E=Q=>{Q.preventDefault(),Q.stopPropagation(),h.value=!1;const M=/^[/\\](.+)/,k=Q.dataTransfer;k&&(k.items&&k.items.length?Array.from(k.items).forEach(X=>{if(X.kind==="file"){const N=X.webkitGetAsEntry?.();if(N)Tu((re,ve)=>{const oe=M.exec(re?.fullPath||"");A(ve,oe?oe[1]:ve.name)},N);else{const re=X.getAsFile?.();re&&A(re)}}}):k.files&&k.files.length&&Array.from(k.files).forEach(X=>A(X)))},T=Q=>f.value.findIndex(M=>M.id===Q),A=(Q,M)=>C.addFile({name:M||Q.name,type:Q.type,data:Q,source:"Local"}),O=Q=>Q.status===bt.DONE?"text-green-600":Q.status===bt.ERROR||Q.status===bt.CANCELED?"text-red-600":"",q=Q=>Q.status===bt.DONE?"✓":Q.status===bt.ERROR||Q.status===bt.CANCELED?"!":"...",I=()=>c.value?.click(),P=()=>e.modal.close(),z=Q=>{if(p.value||!f.value.filter(M=>M.status!==bt.DONE).length){p.value||(m.value=n("Please select file to upload first."));return}m.value="",v.value=Q||i.value,C.upload()},F=()=>{C.cancelAll(),f.value.forEach(Q=>{Q.status!==bt.DONE&&(Q.status=bt.CANCELED,Q.statusName=n("Canceled"))}),p.value=!1},Y=Q=>{p.value||(C.removeFile(Q.id),f.value.splice(T(Q.id),1))},le=Q=>{if(!p.value)if(C.cancelAll(),Q){const M=f.value.filter(k=>k.status!==bt.DONE);f.value=[],M.forEach(k=>A(k.originalFile,k.name))}else f.value=[]},de=Q=>{Q.forEach(M=>{A(M)})};return it(()=>{C=new Bc({debug:e.debug,restrictions:{maxFileSize:TI(o.get("maxFileSize")??"10mb")},locale:e.i18n.t("uppy"),onBeforeFileAdded:(X,N)=>{if(N[X.id]!=null){const re=T(X.id);f.value[re]?.status===bt.PENDING&&(m.value=C.i18n("noDuplicates",{fileName:X.name})),f.value=f.value.filter(ve=>ve.id!==X.id)}return f.value.push({id:X.id,name:X.name,size:e.filesize(X.size),status:bt.PENDING,statusName:n("Pending upload"),percent:null,originalFile:X.data}),!0}});const Q={getTargetPath:()=>(v.value||i.value).path};if(t)t(C,Q);else if(e.adapter.getDriver().configureUploader)e.adapter.getDriver().configureUploader(C,Q);else throw new Error("No uploader configured");C.on("restriction-failed",(X,N)=>{const re=f.value[T(X.id)];re&&Y(re),m.value=N.message}),C.on("upload-start",X=>{X.forEach(N=>{const re=f.value[T(N.id)];re&&(re.status=bt.UPLOADING,re.statusName=n("Uploading"),re.percent="0%")})}),C.on("upload-progress",(X,N)=>{const re=N.bytesTotal??1,ve=Math.floor(N.bytesUploaded/re*100),oe=T(X.id);oe!==-1&&f.value[oe]&&(f.value[oe].percent=`${ve}%`)}),C.on("upload-success",X=>{const N=f.value[T(X.id)];N&&(N.status=bt.DONE,N.statusName=n("Done"))}),C.on("upload-error",(X,N)=>{const re=f.value[T(X.id)];re&&(re.percent=null,re.status=bt.ERROR,re.statusName=N?.isNetworkError?n("Network Error, Unable establish connection to the server or interrupted."):N?.message||n("Unknown Error"))}),C.on("error",X=>{m.value=X.message,p.value=!1}),C.on("complete",X=>{p.value=!1;const N=v.value||i.value;e.adapter.invalidateListQuery(N.path),e.adapter.open(N.path);const re=f.value.filter(ve=>ve.status===bt.DONE&&X.successful.includes(ve.id)).map(ve=>ve.name);e.emitter.emit("vf-upload-complete",re)}),c.value?.addEventListener("click",()=>l.value?.click()),d.value?.addEventListener("click",()=>u.value?.click());const M={capture:!0};document.addEventListener("dragover",S,M),document.addEventListener("dragenter",w,M),document.addEventListener("dragleave",y,M),document.addEventListener("drop",E,M);const k=X=>{const N=X.target,re=N.files;if(re){for(const ve of re)A(ve);N.value=""}};l.value?.addEventListener("change",k),u.value?.addEventListener("change",k)}),xt(()=>{const Q={capture:!0};document.removeEventListener("dragover",S,Q),document.removeEventListener("dragenter",w,Q),document.removeEventListener("dragleave",y,Q),document.removeEventListener("drop",E,Q)}),{container:s,internalFileInput:l,internalFolderInput:u,pickFiles:c,pickFolders:d,queue:f,message:m,uploading:p,hasFilesInDropArea:h,definitions:a,openFileSelector:I,upload:z,cancel:F,remove:Y,clear:le,close:P,getClassNameForEntry:O,getIconForEntry:q,addExternalFiles:de}}const MM={class:"vuefinder__image-preview"},FM={class:"vuefinder__image-preview__header"},DM=["title"],LM={class:"vuefinder__image-preview__actions"},jM={class:"vuefinder__image-preview__image-container"},VM=["src"],zM=Ee({name:"ImagePreview",__name:"Image",emits:["success"],setup(t,{emit:e}){const n=e,r=je(),i=Jt(r),{enabled:o}=An(),{t:a}=r.i18n,s=K(!1),l=K(r.modal.data.item.previewUrl??r.adapter.getPreviewUrl({path:r.modal.data.item.path})),u=K(l.value),{addExternalFiles:c,upload:d,queue:f}=s_(r.customUploader),m=r.fs,p=$e(m.path),h=Mn("cropperRef"),v=async()=>{s.value=!s.value,r.modal.setEditMode(s.value)},C=async()=>{const S=h.value?.getResult({size:{width:795,height:341},fillColor:"#ffffff"})?.canvas;if(!S)return;let w=S;if(S.width>1200||S.height>1200){const O=Math.min(1200/S.width,1200/S.height),q=document.createElement("canvas");q.width=Math.floor(S.width*O),q.height=Math.floor(S.height*O);const I=q.getContext("2d");I&&(I.drawImage(S,0,0,q.width,q.height),w=q)}const y=r.modal.data.item.basename,E=y.split(".").pop()?.toLowerCase()||"jpg",T=E==="png"?"image/png":E==="gif"?"image/gif":"image/jpeg",A=await new Promise(O=>{w.toBlob(q=>O(q),T)});if(!A){i.error(a("Failed to save image"));return}try{const O=new File([A],y,{type:T}),q=r.modal.data.item.path.split("/");q.pop();const I={path:q.join("/")||(p.value?.path??"")};c([O]),await new Promise(Y=>setTimeout(Y,100));const P=f.value.find(Y=>Y.name===O.name);if(!P)throw new Error("File was not added to upload queue");d(I);let z=0;for(;z<150;){await new Promise(le=>setTimeout(le,200));const Y=f.value.find(le=>le.id===P.id);if(Y?.status===bt.DONE)break;if(Y?.status===bt.ERROR)throw new Error(Y.statusName||"Upload failed");z++}i.success(a("Updated.")),await fetch(l.value,{cache:"reload",mode:"no-cors"});const F=r.root?.querySelector?.('[data-src="'+l.value+'"]');F&&F instanceof HTMLElement&&Wr.resetStatus(F),r.emitter.emit("vf-refresh-thumbnails"),await v(),n("success")}catch(O){i.error(Xt(O,a("Failed to save image")))}};return it(()=>{n("success")}),(S,w)=>(b(),x("div",MM,[_("div",FM,[_("h3",{id:"modal-title",class:"vuefinder__image-preview__title",title:g(r).modal.data.item.path},D(g(r).modal.data.item.basename),9,DM),_("div",LM,[s.value?(b(),x("button",{key:0,class:"vuefinder__image-preview__crop-button",onClick:C},D(g(a)("Crop")),1)):ue("",!0),g(o)("edit")?(b(),x("button",{key:1,class:"vuefinder__image-preview__edit-button",onClick:w[0]||(w[0]=y=>v())},D(s.value?g(a)("Cancel"):g(a)("Edit")),1)):ue("",!0)])]),_("div",jM,[s.value?(b(),ne(g(Dv),{key:1,ref_key:"cropperRef",ref:h,class:"h-full w-full",crossorigin:"anonymous",src:u.value,"auto-zoom":!0,priority:"image",transitions:!0},null,8,["src"])):(b(),x("img",{key:0,style:{},src:g(r).modal.data.item.previewUrl??g(r).adapter.getPreviewUrl({path:g(r).modal.data.item.path}),class:"vuefinder__image-preview__image h-full w-full"},null,8,VM))])]))}}),NM={xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"};function UM(t,e){return b(),x("svg",NM,[...e[0]||(e[0]=[_("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M7 21h10a2 2 0 0 0 2-2V9.414a1 1 0 0 0-.293-.707l-5.414-5.414A1 1 0 0 0 12.586 3H7a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2"},null,-1)])])}const Ki={render:UM},BM={class:"vuefinder__default-preview"},HM={class:"vuefinder__default-preview__content"},qM={class:"vuefinder__default-preview__header"},WM=["title"],KM={class:"vuefinder__default-preview__icon-container"},YM=["title"],GM=Ee({__name:"Default",emits:["success"],setup(t,{emit:e}){const n=je(),r=e;return it(()=>{r("success")}),(i,o)=>(b(),x("div",BM,[_("div",HM,[_("div",qM,[_("h3",{id:"modal-title",class:"vuefinder__default-preview__title",title:g(n).modal.data.item.path},D(g(n).modal.data.item.basename),9,WM)]),_("div",KM,[j(g(Ki),{class:"vuefinder__default-preview__file-icon"}),_("div",{id:"modal-title",class:"vuefinder__default-preview__file-name",title:g(n).modal.data.item.path},D(g(n).modal.data.item.basename),9,YM)])])]))}}),QM={class:"vuefinder__video-preview"},XM=["title"],JM={class:"vuefinder__video-preview__video",preload:"metadata",controls:""},ZM=["src"],eF=Ee({__name:"Video",emits:["success"],setup(t,{emit:e}){const n=je(),r=e,i=()=>n.adapter.getPreviewUrl({path:n.modal.data.item.path});return it(()=>{r("success")}),(o,a)=>(b(),x("div",QM,[_("h3",{id:"modal-title",class:"vuefinder__video-preview__title",title:g(n).modal.data.item.path},D(g(n).modal.data.item.basename),9,XM),_("div",null,[_("video",JM,[_("source",{src:i(),type:"video/mp4"},null,8,ZM),a[0]||(a[0]=Ge(" Your browser does not support the video tag. ",-1))])])]))}}),tF={class:"vuefinder__audio-preview"},nF=["title"],rF={class:"vuefinder__audio-preview__audio",controls:""},iF=["src"],oF=Ee({__name:"Audio",emits:["success"],setup(t,{emit:e}){const n=e,r=je(),i=()=>{const o=je();return o.adapter.getPreviewUrl({path:o.modal.data.item.path})};return it(()=>{n("success")}),(o,a)=>(b(),x("div",tF,[_("h3",{id:"modal-title",class:"vuefinder__audio-preview__title",title:g(r).modal.data.item.path},D(g(r).modal.data.item.basename),9,nF),_("div",null,[_("audio",rF,[_("source",{src:i(),type:"audio/mpeg"},null,8,iF),a[0]||(a[0]=Ge(" Your browser does not support the audio element. ",-1))])])]))}}),aF={class:"vuefinder__pdf-preview"},sF=["title"],lF=["data"],cF=["src"],uF=Ee({__name:"Pdf",emits:["success"],setup(t,{emit:e}){const n=je(),r=e,i=()=>{const o=je();return o.adapter.getPreviewUrl({path:o.modal.data.item.path})};return it(()=>{r("success")}),(o,a)=>(b(),x("div",aF,[_("h3",{id:"modal-title",class:"vuefinder__pdf-preview__title",title:g(n).modal.data.item.path},D(g(n).modal.data.item.basename),9,sF),_("div",null,[_("object",{class:"vuefinder__pdf-preview__object",data:i(),type:"application/pdf",width:"100%",height:"100%"},[_("iframe",{class:"vuefinder__pdf-preview__iframe",src:i(),width:"100%",height:"100%"}," Your browser does not support PDFs ",8,cF)],8,lF)])]))}});function dF(t,e=null){return new Date(t*1e3).toLocaleString(e??navigator.language??"en-US")}const fF={key:0,class:"vuefinder__preview-modal__nav-overlay"},pF=["disabled","title"],hF=["disabled","title"],mF={class:"vuefinder__preview-modal__content"},vF={key:0},gF={class:"vuefinder__preview-modal__loading"},_F={key:0,class:"vuefinder__preview-modal__loading-indicator"},yF={class:"vuefinder__preview-modal__details"},bF={class:"font-bold"},wF={class:"pl-2 font-bold"},SF={key:0,class:"vuefinder__preview-modal__note"},CF=["download","href"],uo=Ee({__name:"ModalPreview",setup(t){const e=je(),{enabled:n}=An(),{t:r}=e.i18n,i=K(!1),o=S=>{const w=(S||"").split("/").pop()||"",y=w.lastIndexOf(".");return y>=0?w.slice(y+1).toLowerCase():""},a=(S,w)=>w?S==="image"?new Set(["png","jpg","jpeg","gif","webp","svg","bmp","ico","avif"]).has(w):S==="video"?new Set(["mp4","webm","ogg","ogv","mov","m4v"]).has(w):S==="audio"?new Set(["mp3","wav","ogg","oga","m4a","flac","aac"]).has(w):S==="text"?new Set(["txt","md","json","js","ts","css","scss","html","xml","csv","log","yml","yaml"]).has(w):S==="application/pdf"?w==="pdf":!1:!1,s=S=>{const w=e.modal.data.item.mime_type;if(w&&typeof w=="string")return w.startsWith(S);const y=o(e.modal.data.item.path);return a(S,y)},l=n("preview");l||(i.value=!0);const u=te(()=>e.modal.data.item),c=$e(e.fs.sortedFiles),d=te(()=>c.value.filter(S=>S.type==="file")),f=te(()=>d.value.findIndex(S=>S.path===u.value.path)),m=te(()=>f.value>0),p=te(()=>f.value<d.value.length-1),h=()=>{if(e.modal.editMode||!m.value)return;const S=d.value[f.value-1];S&&(e.fs.clearSelection(),e.fs.select(S.path),e.modal.data.item=S)},v=()=>{if(e.modal.editMode||!p.value)return;const S=d.value[f.value+1];S&&(e.fs.clearSelection(),e.fs.select(S.path),e.modal.data.item=S)},C=S=>{if(S.key==="Escape"){S.preventDefault(),S.stopPropagation(),e.modal.close();return}(S.key==="ArrowLeft"||S.key==="ArrowRight")&&(S.preventDefault(),S.stopPropagation(),S.key==="ArrowLeft"?h():v())};return it(()=>{const S=document.querySelector(".vuefinder__preview-modal");S&&S.focus()}),(S,w)=>(b(),ne(on,null,{buttons:we(()=>[_("button",{type:"button",class:"vf-btn vf-btn-secondary",onClick:w[6]||(w[6]=y=>g(e).modal.close())},D(g(r)("Close")),1),g(n)("download")?(b(),x("a",{key:0,target:"_blank",class:"vf-btn vf-btn-primary",download:g(e).adapter.getDownloadUrl(g(e).modal.data.item),href:g(e).adapter.getDownloadUrl(g(e).modal.data.item)},D(g(r)("Download")),9,CF)):ue("",!0)]),default:we(()=>[_("div",{class:"vuefinder__preview-modal",tabindex:"0",onKeydown:C},[g(e).modal.editMode?ue("",!0):(b(),x("div",fF,[_("button",{disabled:!m.value,class:"vuefinder__preview-modal__nav-side vuefinder__preview-modal__nav-side--left",title:g(r)("Previous file"),onClick:h},[...w[7]||(w[7]=[_("svg",{class:"vuefinder__preview-modal__nav-icon",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[_("polyline",{points:"15,18 9,12 15,6"})],-1)])],8,pF),_("button",{disabled:!p.value,class:"vuefinder__preview-modal__nav-side vuefinder__preview-modal__nav-side--right",title:g(r)("Next file"),onClick:v},[...w[8]||(w[8]=[_("svg",{class:"vuefinder__preview-modal__nav-icon",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[_("polyline",{points:"9,18 15,12 9,6"})],-1)])],8,hF)])),_("div",mF,[g(l)?(b(),x("div",vF,[s("text")?(b(),ne(IM,{key:`text-${u.value.path}`,onSuccess:w[0]||(w[0]=y=>i.value=!0)})):s("image")?(b(),ne(zM,{key:`image-${u.value.path}`,onSuccess:w[1]||(w[1]=y=>i.value=!0)})):s("video")?(b(),ne(eF,{key:`video-${u.value.path}`,onSuccess:w[2]||(w[2]=y=>i.value=!0)})):s("audio")?(b(),ne(oF,{key:`audio-${u.value.path}`,onSuccess:w[3]||(w[3]=y=>i.value=!0)})):s("application/pdf")?(b(),ne(uF,{key:`pdf-${u.value.path}`,onSuccess:w[4]||(w[4]=y=>i.value=!0)})):(b(),ne(GM,{key:`default-${u.value.path}`,onSuccess:w[5]||(w[5]=y=>i.value=!0)}))])):ue("",!0),_("div",gF,[i.value===!1?(b(),x("div",_F,[w[9]||(w[9]=_("svg",{class:"vuefinder__preview-modal__spinner",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},[_("circle",{class:"vuefinder__preview-modal__spinner-circle",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"}),_("path",{class:"vuefinder__preview-modal__spinner-path",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})],-1)),_("span",null,D(g(r)("Loading")),1)])):ue("",!0)])])],32),_("div",yF,[_("div",null,[_("span",bF,D(g(r)("File Size"))+": ",1),Ge(D(g(e).filesize(g(e).modal.data.item.file_size)),1)]),_("div",null,[_("span",wF,D(g(r)("Last Modified"))+": ",1),Ge(" "+D(g(dF)(g(e).modal.data.item.last_modified)),1)])]),g(n)("download")?(b(),x("div",SF,[_("span",null,D(g(r)(`Download doesn't work? You can try right-click "Download" button, select "Save link as...".`)),1)])):ue("",!0)]),_:1}))}}),EF={xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"};function TF(t,e){return b(),x("svg",EF,[...e[0]||(e[0]=[_("path",{stroke:"none",d:"M0 0h24v24H0z"},null,-1),_("path",{d:"M13 19H5a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h4l3 3h7a2 2 0 0 1 2 2v4M16 22l5-5M21 21.5V17h-4.5"},null,-1)])])}const xF={render:TF},OF={xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"};function AF(t,e){return b(),x("svg",OF,[...e[0]||(e[0]=[_("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.5",d:"M8 16H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v2m-6 12h8a2 2 0 0 0 2-2v-8a2 2 0 0 0-2-2h-8a2 2 0 0 0-2 2v8a2 2 0 0 0 2 2"},null,-1)])])}const xu={render:AF},$F={xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"};function RF(t,e){return b(),x("svg",$F,[...e[0]||(e[0]=[_("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M3 7v10a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-6l-2-2H5a2 2 0 0 0-2 2"},null,-1)])])}const zn={render:RF},PF={xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",viewBox:"0 0 24 24"};function kF(t,e){return b(),x("svg",PF,[...e[0]||(e[0]=[_("path",{stroke:"none",d:"M0 0h24v24H0z"},null,-1),_("path",{d:"M12 5v14M5 12h14"},null,-1)])])}const as={render:kF},IF={xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",viewBox:"0 0 24 24"};function MF(t,e){return b(),x("svg",IF,[...e[0]||(e[0]=[_("path",{stroke:"none",d:"M0 0h24v24H0z"},null,-1),_("path",{d:"M5 12h14"},null,-1)])])}const ss={render:MF},FF={xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",class:"h-5 w-5",viewBox:"0 0 24 24"};function DF(t,e){return b(),x("svg",FF,[...e[0]||(e[0]=[_("path",{stroke:"none",d:"M0 0h24v24H0z"},null,-1),_("path",{d:"m15 4.5-4 4L7 10l-1.5 1.5 7 7L14 17l1.5-4 4-4M9 15l-4.5 4.5M14.5 4 20 9.5"},null,-1)])])}const Ou={render:DF},LF={xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"};function jF(t,e){return b(),x("svg",LF,[...e[0]||(e[0]=[_("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M4 7v10c0 2.21 3.582 4 8 4s8-1.79 8-4V7M4 7c0 2.21 3.582 4 8 4s8-1.79 8-4M4 7c0-2.21 3.582-4 8-4s8 1.79 8 4m0 5c0 2.21-3.582 4-8 4s-8-1.79-8-4"},null,-1)])])}const Au={render:jF},VF={xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor","stroke-width":"1.5",viewBox:"0 0 24 24"};function zF(t,e){return b(),x("svg",VF,[...e[0]||(e[0]=[_("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M3.75 9.776q.168-.026.344-.026h15.812q.176 0 .344.026m-16.5 0a2.25 2.25 0 0 0-1.883 2.542l.857 6a2.25 2.25 0 0 0 2.227 1.932H19.05a2.25 2.25 0 0 0 2.227-1.932l.857-6a2.25 2.25 0 0 0-1.883-2.542m-16.5 0V6A2.25 2.25 0 0 1 6 3.75h3.879a1.5 1.5 0 0 1 1.06.44l2.122 2.12a1.5 1.5 0 0 0 1.06.44H18A2.25 2.25 0 0 1 20.25 9v.776"},null,-1)])])}const $u={render:zF},NF={class:"vuefinder__modal-tree__folder-item"},UF={class:"vuefinder__modal-tree__folder-content"},BF={key:1,class:"vuefinder__modal-tree__folder-spacer"},HF={class:"vuefinder__modal-tree__folder-text"},qF={key:0,class:"vuefinder__modal-tree__subfolders"},WF={key:0,class:"vuefinder__modal-tree__more-note"},KF=300,YF=Ee({__name:"ModalTreeFolderItem",props:{folder:{},storage:{},modelValue:{},expandedFolders:{},modalTreeData:{},currentPath:{}},emits:["update:modelValue","selectAndClose","toggleFolder"],setup(t,{emit:e}){const n=je(),{t:r}=n.i18n,i=n.fs,o=K({}),a=t,s=e;$e(i.path);const l=te(()=>{const A=`${a.storage}:${a.folder.path}`;return a.expandedFolders[A]||!1}),u=te(()=>a.modelValue?.path===a.folder.path),c=te(()=>a.currentPath?.path===a.folder.path),d=te(()=>a.modalTreeData[a.folder.path]||[]),f=te(()=>{const A=d.value,O=o.value[a.folder.path]||50;return A.length>O?A.slice(0,O):A}),m=te(()=>d.value.length),p=te(()=>o.value[a.folder.path]||50),h=te(()=>m.value>p.value),v=()=>{o.value[a.folder.path]=(p.value||50)+50},C=te(()=>d.value.length>0||a.folder.type==="dir"),S=()=>{s("toggleFolder",a.storage,a.folder.path)},w=()=>{s("update:modelValue",a.folder)},y=()=>{s("update:modelValue",a.folder),s("selectAndClose",a.folder)};let E=0;const T=()=>{const A=Date.now();A-E<KF?y():w(),E=A};return(A,O)=>{const q=ze("ModalTreeFolderItem",!0);return b(),x("div",NF,[_("div",UF,[C.value?(b(),x("div",{key:0,class:"vuefinder__modal-tree__folder-toggle",onClick:S},[l.value?(b(),ne(g(ss),{key:1,class:"vuefinder__modal-tree__folder-toggle-icon"})):(b(),ne(g(as),{key:0,class:"vuefinder__modal-tree__folder-toggle-icon"}))])):(b(),x("div",BF)),_("div",{class:Pe(["vuefinder__modal-tree__folder-link",{"vuefinder__modal-tree__folder-link--selected":u.value,"vuefinder__modal-tree__folder-link--current":c.value}]),onClick:w,onDblclick:y,onTouchend:T},[l.value?(b(),ne(g($u),{key:1,class:"vuefinder__item-icon__folder--open vuefinder__modal-tree__folder-icon"})):(b(),ne(g(zn),{key:0,class:"vuefinder__modal-tree__folder-icon vuefinder__item-icon__folder"})),_("span",HF,D(t.folder.basename),1)],34)]),l.value&&C.value?(b(),x("div",qF,[(b(!0),x(Ie,null,qe(f.value,I=>(b(),ne(q,{key:I.path,folder:I,storage:t.storage,"model-value":t.modelValue,"expanded-folders":t.expandedFolders,"modal-tree-data":t.modalTreeData,"current-path":t.currentPath,"onUpdate:modelValue":O[0]||(O[0]=P=>A.$emit("update:modelValue",P)),onSelectAndClose:O[1]||(O[1]=P=>A.$emit("selectAndClose",P)),onToggleFolder:O[2]||(O[2]=(P,z)=>A.$emit("toggleFolder",P,z))},null,8,["folder","storage","model-value","expanded-folders","modal-tree-data","current-path"]))),128)),h.value?(b(),x("div",WF,[_("div",{class:"vuefinder__modal-tree__load-more",onClick:v},D(g(r)("load more")),1)])):ue("",!0)])):ue("",!0)])}}}),GF={class:"vuefinder__modal-tree"},QF={class:"vuefinder__modal-tree__header"},XF={class:"vuefinder__modal-tree__title"},JF={key:0,class:"vuefinder__modal-tree__section"},ZF={class:"vuefinder__modal-tree__section-title"},eD={class:"vuefinder__modal-tree__list"},tD=["onClick","onDblclick","onTouchend"],nD={class:"vuefinder__modal-tree__text"},rD={class:"vuefinder__modal-tree__text-storage"},iD={class:"vuefinder__modal-tree__section-title"},oD={class:"vuefinder__modal-tree__list"},aD={class:"vuefinder__modal-tree__storage-item"},sD={class:"vuefinder__modal-tree__storage-content"},lD=["onClick"],cD=["onClick","onDblclick","onTouchend"],uD={class:"vuefinder__modal-tree__storage-text"},dD={key:0,class:"vuefinder__modal-tree__subfolders"},fD={key:0,class:"vuefinder__modal-tree__more-note"},pD=["onClick"],Up=300,Ru=Ee({__name:"ModalTreeSelector",props:{modelValue:{},showPinnedFolders:{type:Boolean},currentPath:{}},emits:["update:modelValue","selectAndClose"],setup(t,{emit:e}){const n=je(),{t:r}=n.i18n,i=n.fs,o=n.config,a=e,s=$e(i.sortedFiles),l=$e(i.storages),u=te(()=>l.value||[]),c=$e(i.path),d=K(null),f=K({}),m=K({}),p=K({});Ae(s,F=>{const Y=F.filter(de=>de.type==="dir"),le=c.value?.path||"";le&&(m.value[le]=Y.map(de=>({...de,type:"dir"})))});const h=(F,Y)=>{const le=`${F}:${Y}`;f.value={...f.value,[le]:!f.value[le]},f.value[le]&&!m.value[Y]&&n.adapter.list(Y).then(de=>{const Q=(de.files||[]).filter(M=>M.type==="dir");m.value[Y]=Q.map(M=>({...M,type:"dir"}))})},v=F=>m.value[F]||[],C=F=>p.value[F]||50,S=F=>{const Y=v(F),le=C(F);return Y.length>le?Y.slice(0,le):Y},w=F=>v(F).length,y=F=>w(F)>C(F),E=F=>{p.value[F]=C(F)+50},T=F=>{F&&a("update:modelValue",F)},A=F=>{F&&(a("update:modelValue",F),a("selectAndClose",F))},O=F=>{const Y={storage:F,path:F+"://",basename:F,type:"dir",extension:"",file_size:null,last_modified:null,mime_type:null,visibility:"public",dir:F+"://"};a("update:modelValue",Y)},q=F=>{const Y={storage:F,path:F+"://",basename:F,type:"dir",extension:"",file_size:null,last_modified:null,mime_type:null,visibility:"public",dir:F+"://"};a("update:modelValue",Y),a("selectAndClose",Y)};let I=0;const P=F=>{if(!F)return;const Y=Date.now();Y-I<Up?A(F):T(F),I=Y},z=F=>{const Y=Date.now();Y-I<Up?q(F):O(F),I=Y};return it(()=>{d.value&&hn(d.value,{overflow:{x:"hidden"},scrollbars:{theme:"vf-scrollbars-theme"}})}),(F,Y)=>(b(),x("div",GF,[_("div",QF,[_("div",XF,D(g(r)("Select Target Folder")),1)]),_("div",{ref_key:"modalContentElement",ref:d,class:"vuefinder__modal-tree__content"},[t.showPinnedFolders&&g(n).features.pinned&&g(o).get("pinnedFolders").length?(b(),x("div",JF,[_("div",ZF,D(g(r)("Pinned Folders")),1),_("div",eD,[(b(!0),x(Ie,null,qe(g(o).get("pinnedFolders"),le=>(b(),x("div",{key:le.path,class:Pe(["vuefinder__modal-tree__item",{"vuefinder__modal-tree__item--selected":t.modelValue?.path===le.path}]),onClick:de=>T(le),onDblclick:de=>A(le),onTouchend:de=>P(le)},[j(g(zn),{class:"vuefinder__modal-tree__icon vuefinder__item-icon__folder"}),_("div",nD,D(le.basename),1),_("div",rD,D(le.storage),1),j(g(Ou),{class:"vuefinder__modal-tree__icon vuefinder__modal-tree__icon--pin"})],42,tD))),128))])])):ue("",!0),_("div",iD,D(g(r)("Storages")),1),(b(!0),x(Ie,null,qe(u.value,le=>(b(),x("div",{key:le,class:"vuefinder__modal-tree__section"},[_("div",oD,[_("div",aD,[_("div",sD,[_("div",{class:"vuefinder__modal-tree__storage-toggle",onClick:Qe(de=>h(le,le+"://"),["stop"])},[f.value[`${le}:${le}://`]?(b(),ne(g(ss),{key:1,class:"vuefinder__modal-tree__toggle-icon"})):(b(),ne(g(as),{key:0,class:"vuefinder__modal-tree__toggle-icon"}))],8,lD),_("div",{class:Pe(["vuefinder__modal-tree__storage-link",{"vuefinder__modal-tree__storage-link--selected":t.modelValue?.path===le+"://"}]),onClick:de=>O(le),onDblclick:de=>q(le),onTouchend:de=>z(le)},[j(g(Au),{class:"vuefinder__modal-tree__storage-icon"}),_("span",uD,D(le),1)],42,cD)]),f.value[`${le}:${le}://`]?(b(),x("div",dD,[(b(!0),x(Ie,null,qe(S(le+"://"),de=>(b(),ne(YF,{key:de.path,folder:de,storage:le,"model-value":t.modelValue,"expanded-folders":f.value,"modal-tree-data":m.value,"current-path":t.currentPath,"onUpdate:modelValue":T,onSelectAndClose:A,onToggleFolder:h},null,8,["folder","storage","model-value","expanded-folders","modal-tree-data","current-path"]))),128)),y(le+"://")?(b(),x("div",fD,[_("div",{class:"vuefinder__modal-tree__load-more",onClick:de=>E(le+"://")},D(g(r)("load more")),9,pD)])):ue("",!0)])):ue("",!0)])])]))),128))],512)]))}}),hD=["title"],fc=Ee({__name:"Message",props:{error:{type:Boolean}},emits:["hidden"],setup(t,{emit:e}){const n=e,r=je(),{t:i}=r.i18n,o=K(!1),a=K(null),s=K(a.value?.innerHTML);Ae(s,()=>o.value=!1);const l=()=>{n("hidden"),o.value=!0};return(u,c)=>(b(),x("div",null,[o.value?ue("",!0):(b(),x("div",{key:0,ref_key:"strMessage",ref:a,class:Pe(["vuefinder__message",t.error?"vuefinder__message--error":"vuefinder__message--success"])},[Ue(u.$slots,"default"),_("div",{class:"vuefinder__message__close",title:g(i)("Close"),onClick:l},[...c[0]||(c[0]=[_("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",class:"vuefinder__message__icon"},[_("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6 18L18 6M6 6l12 12"})],-1)])],8,hD)],2))]))}}),mD={class:"vuefinder__move-modal__content"},vD={class:"vuefinder__move-modal__description"},gD={class:"vuefinder__move-modal__files vf-scrollbar"},_D={class:"vuefinder__move-modal__file-name"},yD={class:"vuefinder__move-modal__target-title"},bD={class:"vuefinder__move-modal__target-container"},wD={class:"vuefinder__move-modal__target-path"},SD={class:"vuefinder__move-modal__target-storage"},CD={key:0,class:"vuefinder__move-modal__destination-folder"},ED={class:"vuefinder__move-modal__target-badge"},TD={key:0,class:"vuefinder__move-modal__options"},xD={class:"vuefinder__move-modal__checkbox-label"},OD={class:"vuefinder__move-modal__checkbox-text"},AD=["disabled"],$D={class:"vuefinder__move-modal__selected-items"},l_=Ee({__name:"ModalTransfer",props:{copy:{type:Boolean}},setup(t){const e=je(),n=Jt(e),{enabled:r}=An(),{t:i}=e.i18n,o=t,a=K(e.modal.data.items.from),s=K(e.modal.data.items.to),l=K(""),u=K(o.copy||!r("move")),c=te(()=>u.value?"copy":"move"),d=K(!1),f=$e(e.fs.path),m=te(()=>u.value?i("Copy files"):i("Move files")),p=te(()=>u.value?i("Are you sure you want to copy these files?"):i("Are you sure you want to move these files?")),h=te(()=>u.value?i("Yes, Copy!"):i("Yes, Move!")),v=T=>{T&&(s.value=T)},C=T=>{T&&(s.value=T,d.value=!1)},S=te(()=>{const T=s.value;return T?a.value.some(A=>!!(T.path===A.path||A.path.startsWith(T.path+"/")||A.type==="dir"&&T.path.startsWith(A.path+"/"))):!0}),w=te(()=>{if(!S.value)return"";const T=s.value;return T?a.value.find(A=>T.path===A.path||A.path.startsWith(T.path+"/")||A.type==="dir"&&T.path.startsWith(A.path+"/"))?i("Cannot move/copy item to itself or its parent/child directory"):i("Invalid destination directory"):i("Please select a destination directory")}),y=()=>{const T=s.value.path;if(!T)return{storage:"local",path:""};if(T.endsWith("://"))return{storage:T.replace("://",""),path:""};const A=T.split("://");return{storage:A[0]||"local",path:A[1]||""}},E=async()=>{if(a.value.length)try{const{files:T}=await e.adapter[c.value]({path:f.value.path,sources:a.value.map(({path:A})=>A),destination:s.value.path});e.fs.setFiles(T),e.modal.close()}catch(T){n.error(Xt(T,i("Failed to transfer files")))}};return(T,A)=>(b(),ne(on,null,{buttons:we(()=>[_("button",{type:"button",class:"vf-btn vf-btn-primary",disabled:S.value,onClick:E},D(h.value),9,AD),_("button",{type:"button",class:"vf-btn vf-btn-secondary",onClick:A[4]||(A[4]=O=>g(e).modal.close())},D(g(i)("Cancel")),1),_("div",$D,D(g(i)("%s item(s) selected.",a.value.length)),1)]),default:we(()=>[_("div",null,[j(mn,{icon:u.value?g(xu):g(xF),title:m.value},null,8,["icon","title"]),_("div",mD,[_("p",vD,D(p.value),1),_("div",gD,[(b(!0),x(Ie,null,qe(a.value,O=>(b(),x("div",{key:O.path,class:"vuefinder__move-modal__file"},[_("div",null,[O.type==="dir"?(b(),ne(g(zn),{key:0,class:"vuefinder__move-modal__icon vuefinder__move-modal__icon--dir"})):(b(),ne(g(Ki),{key:1,class:"vuefinder__move-modal__icon"}))]),_("div",_D,D(O.path),1)]))),128))]),_("h4",yD,D(g(i)("Target Directory")),1),_("div",bD,[_("div",{class:"vuefinder__move-modal__target-display",onClick:A[0]||(A[0]=O=>d.value=!d.value)},[_("div",wD,[_("span",SD,D(y().storage)+"://",1),y().path?(b(),x("span",CD,D(y().path),1)):ue("",!0)]),_("span",ED,D(g(i)("Browse")),1)])]),_("div",{class:Pe(["vuefinder__move-modal__tree-selector",d.value?"vuefinder__move-modal__tree-selector--expanded":"vuefinder__move-modal__tree-selector--collapsed"])},[j(Ru,{modelValue:s.value,"onUpdate:modelValue":[A[1]||(A[1]=O=>s.value=O),v],"show-pinned-folders":!0,onSelectAndClose:C},null,8,["modelValue"])],2),g(r)("copy")&&g(r)("move")?(b(),x("div",TD,[_("label",xD,[st(_("input",{"onUpdate:modelValue":A[2]||(A[2]=O=>u.value=O),type:"checkbox",class:"vuefinder__move-modal__checkbox"},null,512),[[$a,u.value]]),_("span",OD,D(g(i)("Create a copy instead of moving")),1)])])):ue("",!0),w.value?(b(),ne(fc,{key:1,error:""},{default:we(()=>[Ge(D(w.value),1)]),_:1})):ue("",!0),l.value.length&&!w.value?(b(),ne(fc,{key:2,error:"",onHidden:A[3]||(A[3]=O=>l.value="")},{default:we(()=>[Ge(D(l.value),1)]),_:1})):ue("",!0)])])]),_:1}))}}),di=Ee({__name:"ModalMove",setup(t){return(e,n)=>(b(),ne(l_,{copy:!1}))}}),Pu=Ee({__name:"ModalCopy",setup(t){return(e,n)=>(b(),ne(l_,{copy:!0}))}}),RD=(t,e=0,n=!1)=>{let r;return(...i)=>{n&&!r&&t(...i),clearTimeout(r),r=setTimeout(()=>{t(...i)},e)}},c_=(t,e,n)=>{const r=K(t);return B_((i,o)=>({get(){return i(),r.value},set:RD(a=>{r.value=a,o()},e,!1)}))},PD={xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 20 20"};function kD(t,e){return b(),x("svg",PD,[...e[0]||(e[0]=[_("path",{d:"m21 21-5.197-5.197m0 0A7.5 7.5 0 1 0 5.196 5.196a7.5 7.5 0 0 0 10.607 10.607"},null,-1)])])}const ku={render:kD},ID={xmlns:"http://www.w3.org/2000/svg",fill:"none",class:"animate-spin p-0.5 h-5 w-5 text-white ml-auto",viewBox:"0 0 24 24"};function MD(t,e){return b(),x("svg",ID,[...e[0]||(e[0]=[_("circle",{cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4",class:"opacity-25 stroke-blue-900"},null,-1),_("path",{fill:"currentColor",d:"M4 12a8 8 0 0 1 8-8V0C5.373 0 0 5.373 0 12zm2 5.291A7.96 7.96 0 0 1 4 12H0c0 3.042 1.135 5.824 3 7.938z",class:"opacity-75"},null,-1)])])}const ls={render:MD},FD={class:"vuefinder__search-modal__search-input"},DD=["value","placeholder","disabled"],LD={key:0,class:"vuefinder__search-modal__loading"},jD=Ee({name:"SearchInput",__name:"SearchInput",props:{modelValue:{},isSearching:{type:Boolean},disabled:{type:Boolean}},emits:["update:modelValue","keydown"],setup(t,{expose:e,emit:n}){const r=n,i=je(),{t:o}=i.i18n,a=K(null),s=u=>{const c=u.target;r("update:modelValue",c.value)},l=u=>{r("keydown",u)};return e({focus:()=>{a.value&&a.value.focus()}}),(u,c)=>(b(),x("div",FD,[j(g(ku),{class:"vuefinder__search-modal__search-icon"}),_("input",{ref_key:"searchInput",ref:a,value:t.modelValue,type:"text",placeholder:g(o)("Search files"),disabled:t.disabled,class:"vuefinder__search-modal__input",onKeydown:l,onKeyup:c[0]||(c[0]=Qe(()=>{},["stop"])),onInput:s},null,40,DD),t.isSearching?(b(),x("div",LD,[j(g(ls),{class:"vuefinder__search-modal__loading-icon"})])):ue("",!0)]))}}),VD={xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor","stroke-width":"1.5",viewBox:"0 0 24 24"};function zD(t,e){return b(),x("svg",VD,[...e[0]||(e[0]=[_("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M9.594 3.94c.09-.542.56-.94 1.11-.94h2.593c.55 0 1.02.398 1.11.94l.213 1.281c.063.374.313.686.645.87q.11.06.22.127c.325.196.72.257 1.075.124l1.217-.456a1.125 1.125 0 0 1 1.37.49l1.296 2.247a1.125 1.125 0 0 1-.26 1.431l-1.003.827c-.293.241-.438.613-.43.992a8 8 0 0 1 0 .255c-.008.378.137.75.43.991l1.004.827c.424.35.534.955.26 1.43l-1.298 2.247a1.125 1.125 0 0 1-1.369.491l-1.217-.456c-.355-.133-.75-.072-1.076.124a7 7 0 0 1-.22.128c-.331.183-.581.495-.644.869l-.213 1.281c-.09.543-.56.94-1.11.94h-2.594c-.55 0-1.019-.398-1.11-.94l-.213-1.281c-.062-.374-.312-.686-.644-.87a7 7 0 0 1-.22-.127c-.325-.196-.72-.257-1.076-.124l-1.217.456a1.125 1.125 0 0 1-1.369-.49l-1.297-2.247a1.125 1.125 0 0 1 .26-1.431l1.004-.827c.292-.24.437-.613.43-.991a7 7 0 0 1 0-.255c.007-.38-.138-.751-.43-.992l-1.004-.827a1.125 1.125 0 0 1-.26-1.43l1.297-2.247a1.125 1.125 0 0 1 1.37-.491l1.216.456c.356.133.751.072 1.076-.124q.108-.066.22-.128c.332-.183.582-.495.644-.869z"},null,-1),_("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0"},null,-1)])])}const u_={render:zD},ND=["disabled","title"],UD=["data-theme"],BD={class:"vuefinder__search-modal__dropdown-content"},HD={class:"vuefinder__search-modal__dropdown-section"},qD={class:"vuefinder__search-modal__dropdown-title"},WD={class:"vuefinder__search-modal__dropdown-options"},KD={key:0,class:"vuefinder__search-modal__dropdown-option-check"},YD={key:0,class:"vuefinder__search-modal__dropdown-option-check"},GD={key:0,class:"vuefinder__search-modal__dropdown-option-check"},QD={key:0,class:"vuefinder__search-modal__dropdown-option-check"},XD=Ee({name:"SearchOptionsDropdown",__name:"SearchOptionsDropdown",props:{visible:{type:Boolean},disabled:{type:Boolean,default:!1},sizeFilter:{},selectedOption:{}},emits:["update:visible","update:sizeFilter","update:selectedOption","keydown"],setup(t,{expose:e,emit:n}){const r=t,i=n,o=je(),{t:a}=o.i18n,s=K(null),l=K(null);let u=null;const c=h=>{if(i("update:selectedOption",h),h.startsWith("size-")){const v=h.split("-")[1];i("update:sizeFilter",v)}},d=async()=>{r.disabled||(r.visible?(i("update:visible",!1),u&&(u(),u=null)):(i("update:visible",!0),await Xe(),await f()))},f=async()=>{if(!(!s.value||!l.value)&&(await Xe(),!(!s.value||!l.value))){Object.assign(l.value.style,{position:"fixed",zIndex:"10001",opacity:"0",transform:"translateY(-8px)",transition:"opacity 150ms ease-out, transform 150ms ease-out"});try{const{x:h,y:v}=await ei(s.value,l.value,{placement:"bottom-start",strategy:"fixed",middleware:[Ii(8),Mi({padding:16}),Fi({padding:16})]});Object.assign(l.value.style,{left:`${h}px`,top:`${v}px`}),requestAnimationFrame(()=>{l.value&&Object.assign(l.value.style,{opacity:"1",transform:"translateY(0)"})})}catch(h){console.warn("Floating UI initial positioning error:",h);return}try{u=yc(s.value,l.value,async()=>{if(!(!s.value||!l.value))try{const{x:h,y:v}=await ei(s.value,l.value,{placement:"bottom-start",strategy:"fixed",middleware:[Ii(8),Mi({padding:16}),Fi({padding:16})]});Object.assign(l.value.style,{left:`${h}px`,top:`${v}px`})}catch(h){console.warn("Floating UI positioning error:",h)}})}catch(h){console.warn("Floating UI autoUpdate setup error:",h),u=null}}},m=h=>{if(!r.visible)return;const v=["size-all","size-small","size-medium","size-large"],C=v.findIndex(S=>S===r.selectedOption);if(h.key==="ArrowDown"){h.preventDefault();const S=(C+1)%v.length;i("update:selectedOption",v[S]||null)}else if(h.key==="ArrowUp"){h.preventDefault();const S=C<=0?v.length-1:C-1;i("update:selectedOption",v[S]||null)}else h.key==="Enter"?(h.preventDefault(),r.selectedOption?.startsWith("size-")&&i("update:sizeFilter",r.selectedOption.split("-")[1])):h.key==="Escape"&&(h.preventDefault(),i("update:visible",!1),u&&(u(),u=null))},p=()=>{u&&(u(),u=null)};return Ae(()=>r.visible,h=>{!h&&u&&(u(),u=null)}),xt(()=>{p()}),e({cleanup:p}),(h,v)=>(b(),x(Ie,null,[_("button",{ref_key:"dropdownBtn",ref:s,class:Pe(["vuefinder__search-modal__dropdown-btn",{"vuefinder__search-modal__dropdown-btn--active":t.visible}]),disabled:t.disabled,title:g(a)("Search Options"),onClick:Qe(d,["stop"])},[j(g(u_),{class:"vuefinder__search-modal__dropdown-icon"})],10,ND),(b(),ne(Aa,{to:"body"},[t.visible?(b(),x("div",{key:0,ref_key:"dropdownContent",ref:l,class:"vuefinder__themer vuefinder__search-modal__dropdown vuefinder__search-modal__dropdown--visible","data-theme":g(o).theme.current,tabindex:"-1",onClick:v[4]||(v[4]=Qe(()=>{},["stop"])),onKeydown:m},[_("div",BD,[_("div",HD,[_("div",qD,D(g(a)("File Size")),1),_("div",WD,[_("div",{class:Pe(["vuefinder__search-modal__dropdown-option",{"vuefinder__search-modal__dropdown-option--selected":t.sizeFilter==="all"}]),onClick:v[0]||(v[0]=Qe(C=>c("size-all"),["stop"]))},[_("span",null,D(g(a)("All Files")),1),t.sizeFilter==="all"?(b(),x("div",KD,[...v[5]||(v[5]=[_("svg",{viewBox:"0 0 16 16",fill:"currentColor"},[_("path",{d:"M13.854 3.646a.5.5 0 0 1 0 .708l-7 7a.5.5 0 0 1-.708 0l-3.5-3.5a.5.5 0 1 1 .708-.708L6.5 10.293l6.646-6.647a.5.5 0 0 1 .708 0z"})],-1)])])):ue("",!0)],2),_("div",{class:Pe(["vuefinder__search-modal__dropdown-option",{"vuefinder__search-modal__dropdown-option--selected":t.sizeFilter==="small"}]),onClick:v[1]||(v[1]=Qe(C=>c("size-small"),["stop"]))},[_("span",null,D(g(a)("Small (< 1MB)")),1),t.sizeFilter==="small"?(b(),x("div",YD,[...v[6]||(v[6]=[_("svg",{viewBox:"0 0 16 16",fill:"currentColor"},[_("path",{d:"M13.854 3.646a.5.5 0 0 1 0 .708l-7 7a.5.5 0 0 1-.708 0l-3.5-3.5a.5.5 0 1 1 .708-.708L6.5 10.293l6.646-6.647a.5.5 0 0 1 .708 0z"})],-1)])])):ue("",!0)],2),_("div",{class:Pe(["vuefinder__search-modal__dropdown-option",{"vuefinder__search-modal__dropdown-option--selected":t.sizeFilter==="medium"}]),onClick:v[2]||(v[2]=Qe(C=>c("size-medium"),["stop"]))},[_("span",null,D(g(a)("Medium (1-10MB)")),1),t.sizeFilter==="medium"?(b(),x("div",GD,[...v[7]||(v[7]=[_("svg",{viewBox:"0 0 16 16",fill:"currentColor"},[_("path",{d:"M13.854 3.646a.5.5 0 0 1 0 .708l-7 7a.5.5 0 0 1-.708 0l-3.5-3.5a.5.5 0 1 1 .708-.708L6.5 10.293l6.646-6.647a.5.5 0 0 1 .708 0z"})],-1)])])):ue("",!0)],2),_("div",{class:Pe(["vuefinder__search-modal__dropdown-option",{"vuefinder__search-modal__dropdown-option--selected":t.sizeFilter==="large"}]),onClick:v[3]||(v[3]=Qe(C=>c("size-large"),["stop"]))},[_("span",null,D(g(a)("Large (> 10MB)")),1),t.sizeFilter==="large"?(b(),x("div",QD,[...v[8]||(v[8]=[_("svg",{viewBox:"0 0 16 16",fill:"currentColor"},[_("path",{d:"M13.854 3.646a.5.5 0 0 1 0 .708l-7 7a.5.5 0 0 1-.708 0l-3.5-3.5a.5.5 0 1 1 .708-.708L6.5 10.293l6.646-6.647a.5.5 0 0 1 .708 0z"})],-1)])])):ue("",!0)],2)])])])],40,UD)):ue("",!0)]))],64))}});function d_(t,e=40){const n=t.match(/^([^:]+:\/\/)(.*)$/);if(!n)return t;const r=n[1],i=n[2]??"",o=i.split("/").filter(Boolean),a=o.pop();if(!a)return r+i;let s=`${r}${o.join("/")}${o.length?"/":""}${a}`;if(s.length<=e)return s;const l=a.split(/\.(?=[^\.]+$)/),u=l[0]??"",c=l[1]??"",d=u.length>10?`${u.slice(0,6)}...${u.slice(-5)}`:u,f=c?`${d}.${c}`:d;return s=`${r}${o.join("/")}${o.length?"/":""}${f}`,s.length>e&&(s=`${r}.../${f}`),s}async function f_(t){try{await navigator.clipboard.writeText(t)}catch{const e=document.createElement("textarea");e.value=t,document.body.appendChild(e),e.select(),document.execCommand("copy"),document.body.removeChild(e)}}async function Yi(t){await f_(t)}async function JD(t){await f_(t)}const ZD={xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 448 512"};function e5(t,e){return b(),x("svg",ZD,[...e[0]||(e[0]=[_("path",{d:"M8 256a56 56 0 1 1 112 0 56 56 0 1 1-112 0m160 0a56 56 0 1 1 112 0 56 56 0 1 1-112 0m216-56a56 56 0 1 1 0 112 56 56 0 1 1 0-112"},null,-1)])])}const p_={render:e5},t5=["title"],n5={class:"vuefinder__search-modal__result-icon"},r5={class:"vuefinder__search-modal__result-content"},i5={class:"vuefinder__search-modal__result-name"},o5={key:0,class:"vuefinder__search-modal__result-size"},a5=["title"],s5=["title"],l5=["data-item-dropdown","data-theme"],c5={class:"vuefinder__search-modal__item-dropdown-content"},u5=Ee({name:"SearchResultItem",__name:"SearchResultItem",props:{item:{},index:{},selectedIndex:{},expandedPaths:{},activeDropdown:{},selectedItemDropdownOption:{}},emits:["select","selectWithDropdown","togglePathExpansion","toggleItemDropdown","update:selectedItemDropdownOption","copyPath","openContainingFolder","preview"],setup(t,{emit:e}){const n=t,r=e,i=je(),{t:o}=i.i18n,a=K(null);let s=null,l=null,u=[],c=null;Ae(()=>n.activeDropdown,A=>{s&&(s(),s=null),l&&(u.forEach(O=>{O===window?window.removeEventListener("scroll",l,!0):O.removeEventListener("scroll",l,!0)}),l=null,u=[]),c&&(document.removeEventListener("mousedown",c,!0),document.removeEventListener("touchstart",c,!0),c=null),A===n.item.path&&a.value&&Xe(()=>{C(n.item.path,a.value),f(),m()})});const d=A=>{const O=[];let q=A;for(;q&&q!==document.body&&q!==document.documentElement;){const I=window.getComputedStyle(q),P=I.overflow+I.overflowX+I.overflowY;(P.includes("scroll")||P.includes("auto"))&&O.push(q),q=q.parentElement}return O},f=()=>{if(n.activeDropdown!==n.item.path)return;const A=d(a.value);u=[window,...A],l=()=>{n.activeDropdown===n.item.path&&r("toggleItemDropdown",n.item.path,new MouseEvent("click"))};const O=l;O&&u.forEach(q=>{q===window?window.addEventListener("scroll",O,!0):q.addEventListener("scroll",O,!0)})},m=()=>{n.activeDropdown===n.item.path&&(c=A=>{if(n.activeDropdown!==n.item.path)return;const O=A.target;if(!O)return;const q=document.querySelector(`[data-item-dropdown="${n.item.path}"]`);if(q&&q.contains(O)||a.value&&a.value.contains(O))return;const I=i.root;if(I&&I.contains(O)){r("toggleItemDropdown",n.item.path,new MouseEvent("click"));return}const P=document.querySelector(".vuefinder__modal-layout");if(P&&P.contains(O)){r("toggleItemDropdown",n.item.path,new MouseEvent("click"));return}r("toggleItemDropdown",n.item.path,new MouseEvent("click"))},setTimeout(()=>{c&&(document.addEventListener("mousedown",c,!0),document.addEventListener("touchstart",c,!0))},100))};xt(()=>{s&&(s(),s=null),l&&(u.forEach(A=>{A===window?window.removeEventListener("scroll",l,!0):A.removeEventListener("scroll",l,!0)}),l=null,u=[]),c&&(document.removeEventListener("mousedown",c,!0),document.removeEventListener("touchstart",c,!0),c=null)});const p=A=>n.expandedPaths.has(A),h=A=>A.type==="dir"||!A.file_size?"":Eu(A.file_size),v=(A,O)=>{O.stopPropagation(),r("toggleItemDropdown",A,O)},C=async(A,O)=>{const q=document.querySelector(`[data-item-dropdown="${A}"]`);if(!(!q||!O)&&(await Xe(),!(!q||!O))){Object.assign(q.style,{position:"fixed",zIndex:"10001",opacity:"0",transform:"translateY(-8px)",transition:"opacity 150ms ease-out, transform 150ms ease-out"});try{const{x:I,y:P}=await ei(O,q,{placement:"left-start",strategy:"fixed",middleware:[Ii(8),Mi({padding:16}),Fi({padding:16})]});Object.assign(q.style,{left:`${I}px`,top:`${P}px`}),requestAnimationFrame(()=>{q&&Object.assign(q.style,{opacity:"1",transform:"translateY(0)"})})}catch(I){console.warn("Floating UI initial positioning error:",I);return}try{s=yc(O,q,async()=>{if(!(!O||!q))try{const{x:I,y:P}=await ei(O,q,{placement:"left-start",strategy:"fixed",middleware:[Ii(8),Mi({padding:16}),Fi({padding:16})]});Object.assign(q.style,{left:`${I}px`,top:`${P}px`})}catch(I){console.warn("Floating UI positioning error:",I)}})}catch(I){console.warn("Floating UI autoUpdate setup error:",I),s=null}}},S=A=>{r("update:selectedItemDropdownOption",A)},w=async A=>{await Yi(A.path),r("copyPath",A)},y=A=>{r("openContainingFolder",A)},E=A=>{r("preview",A)},T=A=>{if(!n.activeDropdown)return;const O=["copy-path","open-folder","preview"],q=n.selectedItemDropdownOption,I=O.findIndex(P=>q?.includes(P));if(A.key==="ArrowDown"){A.preventDefault();const P=(I+1)%O.length;r("update:selectedItemDropdownOption",`${O[P]||""}-${n.activeDropdown}`)}else if(A.key==="ArrowUp"){A.preventDefault();const P=I<=0?O.length-1:I-1;r("update:selectedItemDropdownOption",`${O[P]||""}-${n.activeDropdown}`)}else A.key==="Enter"?(A.preventDefault(),q&&(q.includes("copy-path")?w(n.item):q.includes("open-folder")?y(n.item):q.includes("preview")&&E(n.item))):A.key==="Escape"&&(A.preventDefault(),r("update:selectedItemDropdownOption",null))};return(A,O)=>(b(),x("div",{class:Pe(["vuefinder__search-modal__result-item",{"vuefinder__search-modal__result-item--selected":t.index===t.selectedIndex}]),title:t.item.basename,onClick:O[9]||(O[9]=q=>r("select",t.index))},[_("div",n5,[t.item.type==="dir"?(b(),ne(g(zn),{key:0})):(b(),ne(g(Ki),{key:1}))]),_("div",r5,[_("div",i5,[Ge(D(t.item.basename)+" ",1),h(t.item)?(b(),x("span",o5,D(h(t.item)),1)):ue("",!0)]),_("div",{class:"vuefinder__search-modal__result-path",title:t.item.path,onClick:O[0]||(O[0]=Qe(q=>{r("select",t.index),r("togglePathExpansion",t.item.path)},["stop"]))},D(p(t.item.path)?t.item.path:g(d_)(t.item.path)),9,a5)]),_("button",{ref_key:"buttonElementRef",ref:a,class:"vuefinder__search-modal__result-actions",title:g(o)("More actions"),onClick:O[1]||(O[1]=q=>{r("selectWithDropdown",t.index),v(t.item.path,q)})},[j(g(p_),{class:"vuefinder__search-modal__result-actions-icon"})],8,s5),(b(),ne(Aa,{to:"body"},[t.activeDropdown===t.item.path?(b(),x("div",{key:0,"data-item-dropdown":t.item.path,class:"vuefinder__themer vuefinder__search-modal__item-dropdown vuefinder__search-modal__item-dropdown--visible","data-theme":g(i).theme.current,tabindex:"-1",onClick:O[8]||(O[8]=Qe(()=>{},["stop"])),onKeydown:T},[_("div",c5,[_("div",{class:Pe(["vuefinder__search-modal__item-dropdown-option",{"vuefinder__search-modal__item-dropdown-option--selected":t.selectedItemDropdownOption===`copy-path-${t.item.path}`}]),onClick:O[2]||(O[2]=q=>{S(`copy-path-${t.item.path}`),w(t.item)}),onFocus:O[3]||(O[3]=q=>S(`copy-path-${t.item.path}`))},[j(g(xu),{class:"vuefinder__search-modal__item-dropdown-icon"}),_("span",null,D(g(o)("Copy Path")),1)],34),_("div",{class:Pe(["vuefinder__search-modal__item-dropdown-option",{"vuefinder__search-modal__item-dropdown-option--selected":t.selectedItemDropdownOption===`open-folder-${t.item.path}`}]),onClick:O[4]||(O[4]=q=>{S(`open-folder-${t.item.path}`),y(t.item)}),onFocus:O[5]||(O[5]=q=>S(`open-folder-${t.item.path}`))},[j(g(zn),{class:"vuefinder__search-modal__item-dropdown-icon"}),_("span",null,D(g(o)("Open Containing Folder")),1)],34),_("div",{class:Pe(["vuefinder__search-modal__item-dropdown-option",{"vuefinder__search-modal__item-dropdown-option--selected":t.selectedItemDropdownOption===`preview-${t.item.path}`}]),onClick:O[6]||(O[6]=q=>{S(`preview-${t.item.path}`),E(t.item)}),onFocus:O[7]||(O[7]=q=>S(`preview-${t.item.path}`))},[j(g(Ki),{class:"vuefinder__search-modal__item-dropdown-icon"}),_("span",null,D(g(o)("Preview")),1)],34)])],40,l5)):ue("",!0)]))],10,t5))}}),d5={key:0,class:"vuefinder__search-modal__searching"},f5={class:"vuefinder__search-modal__loading-icon"},p5={key:1,class:"vuefinder__search-modal__no-results"},h5={key:2,class:"vuefinder__search-modal__results-list"},m5={class:"vuefinder__search-modal__results-header"},Er=60,Bp=5,v5=Ee({name:"SearchResultsList",__name:"SearchResultsList",props:{searchResults:{},isSearching:{type:Boolean},selectedIndex:{},expandedPaths:{},activeDropdown:{},selectedItemDropdownOption:{},resultsEnter:{type:Boolean}},emits:["selectResultItem","selectResultItemWithDropdown","togglePathExpansion","toggleItemDropdown","update:selectedItemDropdownOption","copyPath","openContainingFolder","preview"],setup(t,{expose:e,emit:n}){const r=t,i=n,o=je(),{t:a}=o.i18n,s=Mn("scrollableContainer"),l=te(()=>r.searchResults.length>0),u=te(()=>r.searchResults.length),c=K(0),d=K(600),f=te(()=>r.searchResults.length*Er),m=te(()=>{const w=Math.max(0,Math.floor(c.value/Er)-Bp),y=Math.min(r.searchResults.length,Math.ceil((c.value+d.value)/Er)+Bp);return{start:w,end:y}}),p=te(()=>{const{start:w,end:y}=m.value;return r.searchResults.slice(w,y).map((E,T)=>({item:E,index:w+T,top:(w+T)*Er}))}),h=w=>{const y=w.target;c.value=y.scrollTop},v=()=>{s.value&&(d.value=s.value.clientHeight)},C=()=>{if(r.selectedIndex>=0&&s.value){const w=r.selectedIndex*Er,y=w+Er,E=s.value.scrollTop,T=s.value.clientHeight,A=E+T;let O=E;w<E?O=w:y>A&&(O=y-T),O!==E&&s.value.scrollTo({top:O,behavior:"smooth"})}},S=()=>{s.value&&(s.value.scrollTop=0,c.value=0)};return it(()=>{v(),window.addEventListener("resize",v)}),xt(()=>{window.removeEventListener("resize",v)}),Ae(()=>s.value,()=>{v()}),e({scrollSelectedIntoView:C,resetScroll:S,getContainerHeight:()=>d.value,scrollTop:()=>c.value}),(w,y)=>(b(),x("div",{class:Pe(["vuefinder__search-modal__results",{"vuefinder__search-modal__results--enter":t.resultsEnter}])},[t.isSearching?(b(),x("div",d5,[_("div",f5,[j(g(ls),{class:"vuefinder__search-modal__loading-icon"})]),_("span",null,D(g(a)("Searching...")),1)])):l.value?(b(),x("div",h5,[_("div",m5,[_("span",null,D(g(a)("Found %s results",u.value)),1)]),_("div",{ref_key:"scrollableContainer",ref:s,class:"vuefinder__search-modal__results-scrollable",onScroll:h},[_("div",{class:"vuefinder__search-modal__results-items",style:kt({height:`${f.value}px`,position:"relative"})},[(b(!0),x(Ie,null,qe(p.value,E=>(b(),x("div",{key:E.item.path,style:kt({position:"absolute",top:`${E.top}px`,left:"0",width:"100%",height:`${Er}px`})},[j(u5,{item:E.item,index:E.index,"selected-index":t.selectedIndex,"expanded-paths":t.expandedPaths,"active-dropdown":t.activeDropdown,"selected-item-dropdown-option":t.selectedItemDropdownOption,onSelect:y[0]||(y[0]=T=>i("selectResultItem",T)),onSelectWithDropdown:y[1]||(y[1]=T=>i("selectResultItemWithDropdown",T)),onTogglePathExpansion:y[2]||(y[2]=T=>i("togglePathExpansion",T)),onToggleItemDropdown:y[3]||(y[3]=(T,A)=>i("toggleItemDropdown",T,A)),"onUpdate:selectedItemDropdownOption":y[4]||(y[4]=T=>i("update:selectedItemDropdownOption",T)),onCopyPath:y[5]||(y[5]=T=>i("copyPath",T)),onOpenContainingFolder:y[6]||(y[6]=T=>i("openContainingFolder",T)),onPreview:y[7]||(y[7]=T=>i("preview",T))},null,8,["item","index","selected-index","expanded-paths","active-dropdown","selected-item-dropdown-option"])],4))),128))],4)],544)])):(b(),x("div",p5,[_("span",null,D(g(a)("No results found")),1)]))],2))}}),g5={class:"vuefinder__search-modal"},_5={class:"vuefinder__search-modal__content"},y5={class:"vuefinder__search-modal__search-bar"},b5={class:"vuefinder__search-modal__search-location"},w5=["title"],S5=["disabled"],C5={key:0,class:"vuefinder__search-modal__folder-selector"},E5={class:"vuefinder__search-modal__folder-selector-content"},T5={key:1,class:"vuefinder__search-modal__instructions"},x5={class:"vuefinder__search-modal__instructions-text"},Iu=Ee({name:"ModalSearch",__name:"ModalSearch",setup(t){const e=je(),n=Jt(e),{t:r}=e.i18n,i=e.fs,o=K(null),a=K(null),s=K(null),l=c_("",300),u=K([]),c=K(!1),d=K(-1),f=K(!1),m=K(!1),p=K(null),h=K("all"),v=K(!1),C=K(`size-${h.value}`),S=K(null),w=K(new Set),y=K(null),E=$e(i.path),T=k=>{w.value.has(k)?w.value.delete(k):w.value.add(k)},A=(k,X)=>{X&&typeof X.stopPropagation=="function"&&X.stopPropagation(),y.value===k?y.value=null:y.value=k},O=()=>{y.value=null},q=k=>{try{const X=k.dir||`${k.storage}://`;e.adapter.open(X),e.modal.close(),O()}catch{n.error(r("Failed to open containing folder"))}},I=k=>{e.modal.open(uo,{storage:E?.value?.storage??"local",item:k}),O()},P=k=>{d.value=k,O()},z=k=>{d.value=k},F=async k=>{await Yi(k.path),O()};Ae(l,async k=>{k.trim()?(await Y(k.trim()),d.value=0):(u.value=[],c.value=!1,d.value=-1)}),Ae(h,async k=>{C.value=`size-${k}`,l.value.trim()&&!m.value&&(await Y(l.value.trim()),d.value=0)}),Ae(v,async()=>{l.value.trim()&&!m.value&&(await Y(l.value.trim()),d.value=0)});const Y=async k=>{if(k){c.value=!0;try{const X=p.value?.path||E?.value?.path,N=await e.adapter.search({path:X,filter:k,deep:v.value,size:h.value});u.value=N||[],c.value=!1}catch(X){n.error(Xt(X,r("Search failed"))),u.value=[],c.value=!1}}};it(()=>{document.addEventListener("click",M),C.value=`size-${h.value}`});const le=()=>{m.value?(m.value=!1,l.value.trim()&&(Y(l.value.trim()),d.value=0)):(f.value=!1,m.value=!0)},de=k=>{k&&(p.value=k)},Q=k=>{k&&(de(k),m.value=!1,l.value.trim()&&(Y(l.value.trim()),d.value=0))};xt(()=>{document.removeEventListener("click",M),a.value&&a.value.cleanup()});const M=k=>{const X=k.target;if(f.value&&(X.closest(".vuefinder__search-modal__dropdown")||(f.value=!1,Xe(()=>{o.value&&o.value.focus()}))),y.value){const N=X.closest(".vuefinder__search-modal__item-dropdown"),re=X.closest(".vuefinder__search-modal__result-item");!N&&!re&&O()}};return(k,X)=>(b(),ne(on,{class:"vuefinder__search-modal-layout"},{default:we(()=>[_("div",g5,[j(mn,{icon:g(ku),title:g(r)("Search files")},null,8,["icon","title"]),_("div",_5,[_("div",y5,[j(jD,{ref_key:"searchInputRef",ref:o,modelValue:g(l),"onUpdate:modelValue":X[0]||(X[0]=N=>xa(l)?l.value=N:null),"is-searching":c.value,disabled:m.value},null,8,["modelValue","is-searching","disabled"]),j(XD,{ref_key:"searchOptionsDropdownRef",ref:a,visible:f.value,"onUpdate:visible":X[1]||(X[1]=N=>f.value=N),"size-filter":h.value,"onUpdate:sizeFilter":X[2]||(X[2]=N=>h.value=N),"selected-option":C.value,"onUpdate:selectedOption":X[3]||(X[3]=N=>C.value=N),disabled:m.value},null,8,["visible","size-filter","selected-option","disabled"])]),_("div",{class:"vuefinder__search-modal__options",onClick:X[7]||(X[7]=Qe(()=>{},["stop"]))},[_("div",b5,[_("button",{class:Pe(["vuefinder__search-modal__location-btn",{"vuefinder__search-modal__location-btn--open":m.value}]),onClick:Qe(le,["stop"])},[j(g(zn),{class:"vuefinder__search-modal__location-icon"}),_("span",{class:"vuefinder__search-modal__location-text",title:p.value?.path||g(E).path},D(g(d_)(p.value?.path||g(E).path)),9,w5),X[10]||(X[10]=_("svg",{class:"vuefinder__search-modal__location-arrow",viewBox:"0 0 16 16",fill:"currentColor"},[_("path",{d:"M4.427 7.427l3.396 3.396a.25.25 0 00.354 0l3.396-3.396A.25.25 0 0011.396 7H4.604a.25.25 0 00-.177.427z"})],-1))],2)]),_("label",{class:"vuefinder__search-modal__deep-search",onClick:X[6]||(X[6]=Qe(()=>{},["stop"]))},[st(_("input",{"onUpdate:modelValue":X[4]||(X[4]=N=>v.value=N),type:"checkbox",disabled:m.value,class:"vuefinder__search-modal__checkbox",onClick:X[5]||(X[5]=Qe(()=>{},["stop"]))},null,8,S5),[[$a,v.value]]),_("span",null,D(g(r)("Include subfolders")),1)])]),m.value?(b(),x("div",C5,[_("div",E5,[j(Ru,{modelValue:p.value,"onUpdate:modelValue":[X[8]||(X[8]=N=>p.value=N),de],"show-pinned-folders":!0,"current-path":g(E),onSelectAndClose:Q},null,8,["modelValue","current-path"])])])):ue("",!0),!g(l).trim()&&!m.value?(b(),x("div",T5,[_("p",x5,D(g(r)("Start typing to search files. Use options to filter or include subfolders.")),1)])):ue("",!0),g(l).trim()&&!m.value?(b(),ne(v5,{key:2,ref_key:"searchResultsListRef",ref:s,"search-results":u.value,"is-searching":c.value,"selected-index":d.value,"expanded-paths":w.value,"active-dropdown":y.value,"selected-item-dropdown-option":S.value,"results-enter":!0,onSelectResultItem:P,onSelectResultItemWithDropdown:z,onTogglePathExpansion:T,onToggleItemDropdown:A,"onUpdate:selectedItemDropdownOption":X[9]||(X[9]=N=>S.value=N),onCopyPath:F,onOpenContainingFolder:q,onPreview:I},null,8,["search-results","is-searching","selected-index","expanded-paths","active-dropdown","selected-item-dropdown-option"])):ue("",!0)])])]),_:1}))}}),O5={props:{on:{type:String,required:!0}},setup(t,{emit:e,slots:n}){const r=je(),i=K(!1),{t:o}=r.i18n;let a=null;const s=()=>{a&&clearTimeout(a),i.value=!0,a=setTimeout(()=>{i.value=!1},2e3)};return it(()=>{r.emitter.on(t.on,s)}),xt(()=>{a&&clearTimeout(a)}),{shown:i,t:o}}},A5=(t,e)=>{const n=t.__vccOpts||t;for(const[r,i]of e)n[r]=i;return n},$5={key:1};function R5(t,e,n,r,i,o){return b(),x("div",{class:Pe(["vuefinder__action-message",{"vuefinder__action-message--hidden":!r.shown}])},[t.$slots.default?Ue(t.$slots,"default",{key:0}):(b(),x("span",$5,D(r.t("Saved.")),1))],2)}const Hp=A5(O5,[["render",R5]]),P5=[{name:"silver",displayName:"Silver"},{name:"valorite",displayName:"Valorite"},{name:"midnight",displayName:"Midnight"},{name:"latte",displayName:"Latte"},{name:"rose",displayName:"Rose"},{name:"mythril",displayName:"Mythril"},{name:"lime",displayName:"lime"},{name:"sky",displayName:"Sky"},{name:"ocean",displayName:"Oceanic"},{name:"palenight",displayName:"Palenight"},{name:"arctic",displayName:"Arctic"},{name:"code",displayName:"Code"}],k5={class:"vuefinder__settings-modal__content"},I5={class:"vuefinder__settings-modal__main"},M5={class:"vuefinder__settings-modal__sections"},F5={key:0,class:"vuefinder__settings-modal__section"},D5={for:"theme",class:"vuefinder__settings-modal__label"},L5={class:"vuefinder__settings-modal__input-group"},j5=["value"],V5=["value"],z5={key:1,class:"vuefinder__settings-modal__section"},N5={for:"language",class:"vuefinder__settings-modal__label"},U5={class:"vuefinder__settings-modal__input-group"},B5=["value"],H5={class:"vuefinder__settings-modal__reset-section"},q5={class:"vuefinder__settings-modal__reset-content"},W5={class:"vuefinder__settings-modal__reset-title"},K5={class:"vuefinder__settings-modal__reset-description"},h_=Ee({__name:"ModalSettings",setup(t){const e=je(),{enabled:n}=An(),r=e.config,{clearStore:i}=e.storage,{t:o,localeAtom:a}=e.i18n,s=$e(a),l=te({get:()=>String(s.value||"en"),set:h=>a.set(h||"en")}),u=$e(r.state),c=te(()=>u.value.theme||"silver"),d=async()=>{r.reset(),i(),localStorage.removeItem("vuefinder_locale"),localStorage.removeItem("vuefinder_translations"),location.reload()},f=h=>{r.set("theme",h),e.emitter.emit("vf-theme-saved")},{i18n:m}=Pi("VueFinderOptions"),p=Object.fromEntries(Object.entries({ar:"Arabic (العربيّة)",zhCN:"Chinese-Simplified (简体中文)",zhTW:"Chinese-Traditional (繁體中文)",nl:"Dutch (Nederlands)",en:"English",fr:"French (Français)",de:"German (Deutsch)",he:"Hebrew (עִברִית)",hi:"Hindi (हिंदी)",it:"Italian (Italiano)",ja:"Japanese (日本語)",fa:"Persian (فارسی)",pl:"Polish (Polski)",pt:"Portuguese (Português)",ru:"Russian (Pусский)",es:"Spanish (Español)",sv:"Swedish (Svenska)",tr:"Turkish (Türkçe)"}).filter(([h])=>Object.keys(m).includes(h)));return(h,v)=>(b(),ne(on,null,{buttons:we(()=>[_("button",{type:"button",class:"vf-btn vf-btn-secondary",onClick:v[2]||(v[2]=C=>g(e).modal.close())},D(g(o)("Close")),1)]),default:we(()=>[_("div",k5,[j(mn,{icon:g(u_),title:g(o)("Settings")},null,8,["icon","title"]),_("div",I5,[_("div",M5,[g(n)("theme")?(b(),x("div",F5,[_("label",D5,[Ge(D(g(o)("Theme"))+" ",1),j(Hp,{class:"vuefinder__settings-modal__message",on:"vf-theme-saved"},{default:we(()=>[Ge(D(g(o)("Saved.")),1)]),_:1})]),_("div",L5,[_("select",{id:"theme",value:c.value,class:"vuefinder__settings-modal__select",onChange:v[0]||(v[0]=C=>f(C.target?.value))},[(b(!0),x(Ie,null,qe(g(P5),C=>(b(),x("option",{key:C.name,value:C.name},D(C.displayName),9,V5))),128))],40,j5)])])):ue("",!0),Object.keys(g(p)).length>1?(b(),x("div",z5,[_("label",N5,[Ge(D(g(o)("Language"))+" ",1),j(Hp,{class:"vuefinder__settings-modal__message",on:"vf-language-saved"},{default:we(()=>[Ge(D(g(o)("Saved.")),1)]),_:1})]),_("div",U5,[st(_("select",{id:"language","onUpdate:modelValue":v[1]||(v[1]=C=>l.value=C),class:"vuefinder__settings-modal__select"},[(b(!0),x(Ie,null,qe(g(p),(C,S)=>(b(),x("option",{key:S,value:S},D(C),9,B5))),128))],512),[[ul,l.value]])])])):ue("",!0)]),_("div",H5,[_("div",q5,[_("div",W5,D(g(o)("Reset")),1),_("div",K5,D(g(o)("Reset all settings to default")),1)]),_("button",{type:"button",class:"vuefinder__settings-modal__reset-button",onClick:d},D(g(o)("Reset Settings")),1)])])])]),_:1}))}}),zt={ESCAPE:"Escape",DELETE:"Delete",ENTER:"Enter",BACKSLASH:"Backslash",KEY_A:"KeyA",KEY_E:"KeyE",KEY_F:"KeyF",SPACE:"Space",KEY_C:"KeyC",KEY_X:"KeyX",KEY_V:"KeyV",KEY_S:"KeyS",KEY_R:"KeyR"};function Y5(){const t=je(),e=Jt(t),n=t.fs,r=t.config,{enabled:i}=An(),o=$e(n.path),a=$e(n.selectedItems),s=l=>{if(l.code===zt.ESCAPE&&(t.modal.close(),t.root.focus()),!t.modal.visible){if(l.metaKey&&l.code===zt.KEY_R&&!l.shiftKey&&(t.adapter.invalidateListQuery(o.value.path),t.adapter.open(o.value.path),l.preventDefault()),l.metaKey&&l.shiftKey&&l.code===zt.KEY_R&&i("rename")&&a.value.length===1&&(t.modal.open(os,{items:a.value}),l.preventDefault()),l.code===zt.DELETE&&a.value.length!==0&&t.modal.open(is,{items:a.value}),l.metaKey&&l.code===zt.BACKSLASH&&t.modal.open(i_),l.metaKey&&l.code===zt.KEY_F&&i("search")&&(t.modal.open(Iu),l.preventDefault()),l.metaKey&&l.code===zt.KEY_E&&(r.toggle("showTreeView"),l.preventDefault()),l.metaKey&&l.code===zt.KEY_S&&(t.modal.open(h_),l.preventDefault()),l.metaKey&&l.code===zt.ENTER&&(r.toggle("fullScreen"),t.root.focus()),l.metaKey&&l.code===zt.KEY_A&&(n.selectAll(t.selectionMode||"multiple",t),l.preventDefault()),l.code===zt.SPACE&&a.value.length===1&&a.value[0]?.type!=="dir"&&t.modal.open(uo,{storage:n.path.get().storage,item:a.value[0]}),l.metaKey&&l.code===zt.KEY_C&&i("copy")){if(a.value.length===0){e.error(t.i18n.t("No items selected"));return}n.setClipboard("copy",new Set(a.value.map(u=>u.path))),e.success(a.value.length===1?t.i18n.t("Item copied to clipboard"):t.i18n.t("%s items copied to clipboard",a.value.length)),l.preventDefault()}if(l.metaKey&&l.code===zt.KEY_X&&i("copy")){if(a.value.length===0){e.error(t.i18n.t("No items selected"));return}n.setClipboard("cut",new Set(a.value.map(u=>u.path))),e.success(a.value.length===1?t.i18n.t("Item cut to clipboard"):t.i18n.t("%s items cut to clipboard",a.value.length)),l.preventDefault()}if(l.metaKey&&l.code===zt.KEY_V&&i("copy")){if(n.getClipboard().items.size===0){e.error(t.i18n.t("No items in clipboard"));return}if(n.getClipboard().path===n.path.get().path){e.error(t.i18n.t("Cannot paste items to the same directory"));return}if(n.getClipboard().type==="cut"){t.modal.open(di,{items:{from:Array.from(n.getClipboard().items),to:n.path.get()}}),n.clearClipboard();return}if(n.getClipboard().type==="copy"){t.modal.open(Pu,{items:{from:Array.from(n.getClipboard().items),to:n.path.get()}});return}l.preventDefault()}}};it(async()=>{if(await Xe(),!t.root){console.warn("app.root is not available. Event listeners will not be attached.");return}t.root.addEventListener("keydown",s)}),Oa(()=>{t.root&&t.root.removeEventListener("keydown",s)})}function G5(){const t=K(!1),e=K([]);return{isDraggingExternal:t,externalFiles:e,handleDragEnter:n=>{n.preventDefault(),n.stopPropagation();const r=n.dataTransfer?.items;r&&Array.from(r).some(i=>i.kind==="file")&&(t.value=!0,n.isExternalDrag=!0)},handleDragOver:n=>{t.value&&n.dataTransfer&&(n.dataTransfer.dropEffect="copy",n.preventDefault(),n.stopPropagation())},handleDragLeave:n=>{n.preventDefault();const r=n.currentTarget.getBoundingClientRect(),i=n.clientX,o=n.clientY;(i<r.left||i>r.right||o<r.top||o>r.bottom)&&(t.value=!1)},handleDrop:async n=>{n.preventDefault(),n.stopPropagation(),t.value=!1;const r=n.dataTransfer?.items;if(r){const i=Array.from(r).filter(o=>o.kind==="file");if(i.length>0){e.value=[];for(const o of i){const a=o.webkitGetAsEntry?.();if(a)await Tu((s,l)=>{e.value.push({name:l.name,size:l.size,type:l.type,lastModified:new Date(l.lastModified),file:l})},a);else{const s=o.getAsFile();s&&e.value.push({name:s.name,size:s.size,type:s.type,lastModified:new Date(s.lastModified),file:s})}}return e.value}}return[]},clearExternalFiles:()=>{e.value=[]}}}const Q5={xmlns:"http://www.w3.org/2000/svg",fill:"none","stroke-width":"1.5",class:"h-6 w-6 md:h-8 md:w-8 m-auto vf-toolbar-icon",viewBox:"0 0 24 24"};function X5(t,e){return b(),x("svg",Q5,[...e[0]||(e[0]=[_("path",{d:"M12 10.5v6m3-3H9m4.06-7.19-2.12-2.12a1.5 1.5 0 0 0-1.061-.44H4.5A2.25 2.25 0 0 0 2.25 6v12a2.25 2.25 0 0 0 2.25 2.25h15A2.25 2.25 0 0 0 21.75 18V9a2.25 2.25 0 0 0-2.25-2.25h-5.379a1.5 1.5 0 0 1-1.06-.44z"},null,-1)])])}const m_={render:X5},J5={class:"vuefinder__new-folder-modal__content"},Z5={class:"vuefinder__new-folder-modal__form"},e4={class:"vuefinder__new-folder-modal__description"},t4=["placeholder"],Mu=Ee({__name:"ModalNewFolder",setup(t){const e=je(),n=Jt(e),{t:r}=e.i18n,i=e.fs,o=$e(i.path),a=K(""),s=()=>{a.value!==""&&e.adapter.createFolder({path:o.value.path,name:a.value}).then(l=>{n.success(r("%s is created.",a.value)),e.fs.setFiles(l.files),e.modal.close()}).catch(l=>{n.error(Xt(l,r("Failed to create folder")))})};return(l,u)=>(b(),ne(on,null,{buttons:we(()=>[_("button",{type:"button",class:"vf-btn vf-btn-primary",onClick:s},D(g(r)("Create")),1),_("button",{type:"button",class:"vf-btn vf-btn-secondary",onClick:u[1]||(u[1]=c=>g(e).modal.close())},D(g(r)("Cancel")),1)]),default:we(()=>[_("div",null,[j(mn,{icon:g(m_),title:g(r)("New Folder")},null,8,["icon","title"]),_("div",J5,[_("div",Z5,[_("p",e4,D(g(r)("Create a new folder")),1),st(_("input",{"onUpdate:modelValue":u[0]||(u[0]=c=>a.value=c),class:"vuefinder__new-folder-modal__input",placeholder:g(r)("Folder Name"),type:"text",autofocus:"",onKeyup:fi(s,["enter"])},null,40,t4),[[Xi,a.value]])])])])]),_:1}))}}),n4={xmlns:"http://www.w3.org/2000/svg",fill:"none","stroke-width":"1.5",class:"h-6 w-6 md:h-8 md:w-8 m-auto vf-toolbar-icon",viewBox:"0 0 24 24"};function r4(t,e){return b(),x("svg",n4,[...e[0]||(e[0]=[_("path",{d:"M19.5 14.25v-2.625a3.375 3.375 0 0 0-3.375-3.375h-1.5A1.125 1.125 0 0 1 13.5 7.125v-1.5a3.375 3.375 0 0 0-3.375-3.375H8.25m3.75 9v6m3-3H9m1.5-12H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 0 0-9-9"},null,-1)])])}const v_={render:r4},i4={class:"vuefinder__new-file-modal__content"},o4={class:"vuefinder__new-file-modal__form"},a4={class:"vuefinder__new-file-modal__description"},s4=["placeholder"],g_=Ee({__name:"ModalNewFile",setup(t){const e=je(),n=Jt(e),{t:r}=e.i18n,i=e.fs,o=$e(i.path),a=K(""),s=()=>{a.value!==""&&e.adapter.createFile({path:o.value.path,name:a.value}).then(l=>{n.success(r("%s is created.",a.value)),e.fs.setFiles(l.files),e.modal.close()}).catch(l=>{n.error(Xt(l,r("Failed to create file")))})};return(l,u)=>(b(),ne(on,null,{buttons:we(()=>[_("button",{type:"button",class:"vf-btn vf-btn-primary",onClick:s},D(g(r)("Create")),1),_("button",{type:"button",class:"vf-btn vf-btn-secondary",onClick:u[1]||(u[1]=c=>g(e).modal.close())},D(g(r)("Cancel")),1)]),default:we(()=>[_("div",null,[j(mn,{icon:g(v_),title:g(r)("New File")},null,8,["icon","title"]),_("div",i4,[_("div",o4,[_("p",a4,D(g(r)("Create a new file")),1),st(_("input",{"onUpdate:modelValue":u[0]||(u[0]=c=>a.value=c),class:"vuefinder__new-file-modal__input",placeholder:g(r)("File Name"),type:"text",onKeyup:fi(s,["enter"])},null,40,s4),[[Xi,a.value]])])])])]),_:1}))}}),l4={xmlns:"http://www.w3.org/2000/svg",fill:"none","stroke-width":"1.5",class:"h-6 w-6 md:h-8 md:w-8 m-auto vf-toolbar-icon",viewBox:"0 0 24 24"};function c4(t,e){return b(),x("svg",l4,[...e[0]||(e[0]=[_("path",{d:"M3 16.5v2.25A2.25 2.25 0 0 0 5.25 21h13.5A2.25 2.25 0 0 0 21 18.75V16.5m-13.5-9L12 3m0 0 4.5 4.5M12 3v13.5"},null,-1)])])}const __={render:c4};function pc(t,e=14){const n=`((?=([\\w\\W]{0,${e}}))([\\w\\W]{${e+1},})([\\w\\W]{8,}))`;return t.replace(new RegExp(n),"$2..$4")}const u4={class:"vuefinder__upload-modal__content relative"},d4={class:"vuefinder__upload-modal__target-section"},f4={class:"vuefinder__upload-modal__target-label"},p4={class:"vuefinder__upload-modal__target-container"},h4={class:"vuefinder__upload-modal__target-path"},m4={class:"vuefinder__upload-modal__target-storage"},v4={key:0,class:"vuefinder__upload-modal__target-folder"},g4={class:"vuefinder__upload-modal__target-badge"},_4={class:"vuefinder__upload-modal__drag-hint"},y4={class:"vuefinder__upload-modal__file-list vf-scrollbar"},b4=["textContent"],w4={class:"vuefinder__upload-modal__file-info"},S4={class:"vuefinder__upload-modal__file-name hidden md:block"},C4={class:"vuefinder__upload-modal__file-name md:hidden"},E4={key:0,class:"ml-auto"},T4=["title","disabled","onClick"],x4={key:0,class:"py-2"},O4=["aria-expanded"],A4={key:0,class:"vuefinder__upload-actions__menu absolute right-0 bottom-full left-0 mb-2"},$4=["disabled"],R4=["aria-expanded"],P4={key:0,class:"vuefinder__upload-actions__menu"},Fu=Ee({__name:"ModalUpload",setup(t){const e=je(),{t:n}=e.i18n,r=e.fs,i=$e(r.path),o=K(i.value),a=K(!1),s=()=>{const Q=o.value.path;if(!Q)return{storage:"local",path:""};if(Q.endsWith("://"))return{storage:Q.replace("://",""),path:""};const M=Q.split("://");return{storage:M[0]||"local",path:M[1]||""}},l=Q=>{Q&&(o.value=Q)},u=Q=>{Q&&(o.value=Q,a.value=!1)},{container:c,internalFileInput:d,internalFolderInput:f,pickFiles:m,queue:p,message:h,uploading:v,hasFilesInDropArea:C,definitions:S,openFileSelector:w,upload:y,cancel:E,remove:T,clear:A,close:O,getClassNameForEntry:q,getIconForEntry:I,addExternalFiles:P}=s_(e.customUploader),z=()=>{y(o.value)};it(()=>{e.emitter.on("vf-external-files-dropped",Q=>{P(Q)})}),xt(()=>{e.emitter.off("vf-external-files-dropped")});const F=K(!1),Y=K(null),le=K(null),de=Q=>{if(!F.value)return;const M=Q.target,k=Y.value?.contains(M)??!1,X=le.value?.contains(M)??!1;!k&&!X&&(F.value=!1)};return it(()=>document.addEventListener("click",de)),xt(()=>document.removeEventListener("click",de)),(Q,M)=>(b(),ne(on,{"show-drag-overlay":g(C),"drag-overlay-text":g(n)("Drag and drop the files/folders to here.")},{buttons:we(()=>[_("div",{ref_key:"actionsMenuMobileRef",ref:Y,class:"relative mb-2 w-full sm:hidden"},[_("div",{class:Pe(["vuefinder__upload-actions","vuefinder__upload-actions--block",F.value?"vuefinder__upload-actions--ring":""])},[_("button",{type:"button",class:"vuefinder__upload-actions__main",onClick:M[3]||(M[3]=k=>g(w)())},D(g(n)("Select Files")),1),_("button",{type:"button",class:"vuefinder__upload-actions__trigger","aria-haspopup":"menu","aria-expanded":F.value?"true":"false",onClick:M[4]||(M[4]=Qe(k=>F.value=!F.value,["stop"]))},[...M[17]||(M[17]=[_("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-4 w-4",viewBox:"0 0 20 20",fill:"currentColor"},[_("path",{"fill-rule":"evenodd",d:"M5.23 7.21a.75.75 0 011.06.02L10 10.94l3.71-3.71a.75.75 0 111.06 1.06l-4.24 4.24a.75.75 0 01-1.06 0L5.21 8.29a.75.75 0 01.02-1.08z","clip-rule":"evenodd"})],-1)])],8,O4)],2),F.value?(b(),x("div",A4,[_("div",{class:"vuefinder__upload-actions__item",onClick:M[5]||(M[5]=k=>{g(w)(),F.value=!1})},D(g(n)("Select Files")),1),_("div",{class:"vuefinder__upload-actions__item",onClick:M[6]||(M[6]=k=>{g(f)?.click(),F.value=!1})},D(g(n)("Select Folders")),1),M[18]||(M[18]=_("div",{class:"vuefinder__upload-actions__separator"},null,-1)),_("div",{class:Pe(["vuefinder__upload-actions__item",g(v)?"disabled":""]),onClick:M[7]||(M[7]=k=>g(v)?null:(g(A)(!1),F.value=!1))},D(g(n)("Clear all")),3),_("div",{class:Pe(["vuefinder__upload-actions__item",g(v)?"disabled":""]),onClick:M[8]||(M[8]=k=>g(v)?null:(g(A)(!0),F.value=!1))},D(g(n)("Clear only successful")),3)])):ue("",!0)],512),_("button",{type:"button",class:"vf-btn vf-btn-primary",disabled:g(v)||!g(p).length,onClick:Qe(z,["prevent"])},D(g(n)("Upload")),9,$4),g(v)?(b(),x("button",{key:0,type:"button",class:"vf-btn vf-btn-secondary",onClick:M[9]||(M[9]=Qe((...k)=>g(E)&&g(E)(...k),["prevent"]))},D(g(n)("Cancel")),1)):(b(),x("button",{key:1,type:"button",class:"vf-btn vf-btn-secondary",onClick:M[10]||(M[10]=Qe((...k)=>g(O)&&g(O)(...k),["prevent"]))},D(g(n)("Close")),1)),_("div",{ref_key:"actionsMenuDesktopRef",ref:le,class:"relative mr-auto hidden sm:block"},[_("div",{class:Pe(["vuefinder__upload-actions",F.value?"vuefinder__upload-actions--ring":""])},[_("button",{ref_key:"pickFiles",ref:m,type:"button",class:"vuefinder__upload-actions__main"},D(g(n)("Select Files")),513),_("button",{type:"button",class:"vuefinder__upload-actions__trigger","aria-haspopup":"menu","aria-expanded":F.value?"true":"false",onClick:M[11]||(M[11]=Qe(k=>F.value=!F.value,["stop"]))},[...M[19]||(M[19]=[_("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-4 w-4",viewBox:"0 0 20 20",fill:"currentColor"},[_("path",{"fill-rule":"evenodd",d:"M5.23 7.21a.75.75 0 011.06.02L10 10.94l3.71-3.71a.75.75 0 111.06 1.06l-4.24 4.24a.75.75 0 01-1.06 0L5.21 8.29a.75.75 0 01.02-1.08z","clip-rule":"evenodd"})],-1)])],8,R4)],2),F.value?(b(),x("div",P4,[_("div",{class:"vuefinder__upload-actions__item",onClick:M[12]||(M[12]=k=>{g(w)(),F.value=!1})},D(g(n)("Select Files")),1),_("div",{class:"vuefinder__upload-actions__item",onClick:M[13]||(M[13]=k=>{g(f)?.click(),F.value=!1})},D(g(n)("Select Folders")),1),M[20]||(M[20]=_("div",{class:"vuefinder__upload-actions__separator"},null,-1)),_("div",{class:Pe(["vuefinder__upload-actions__item",g(v)?"disabled":""]),onClick:M[14]||(M[14]=k=>g(v)?null:(g(A)(!1),F.value=!1))},D(g(n)("Clear all")),3),_("div",{class:Pe(["vuefinder__upload-actions__item",g(v)?"disabled":""]),onClick:M[15]||(M[15]=k=>g(v)?null:(g(A)(!0),F.value=!1))},D(g(n)("Clear only successful")),3)])):ue("",!0)],512)]),default:we(()=>[_("div",null,[j(mn,{icon:g(__),title:g(n)("Upload Files")},null,8,["icon","title"]),_("div",u4,[_("div",d4,[_("div",f4,D(g(n)("Target Directory")),1),_("div",p4,[_("div",{class:"vuefinder__upload-modal__target-display",onClick:M[0]||(M[0]=k=>a.value=!a.value)},[_("div",h4,[_("span",m4,D(s().storage)+"://",1),s().path?(b(),x("span",v4,D(s().path),1)):ue("",!0)]),_("span",g4,D(g(n)("Browse")),1)])]),_("div",{class:Pe(["vuefinder__upload-modal__tree-selector",a.value?"vuefinder__upload-modal__tree-selector--expanded":"vuefinder__upload-modal__tree-selector--collapsed"])},[j(Ru,{modelValue:o.value,"onUpdate:modelValue":[M[1]||(M[1]=k=>o.value=k),l],"show-pinned-folders":!0,onSelectAndClose:u},null,8,["modelValue"])],2)]),_("div",_4,D(g(n)("You can drag & drop files anywhere while this modal is open.")),1),_("div",{ref_key:"container",ref:c,class:"hidden"},null,512),_("div",y4,[(b(!0),x(Ie,null,qe(g(p),k=>(b(),x("div",{key:k.id,class:"vuefinder__upload-modal__file-entry"},[_("span",{class:Pe(["vuefinder__upload-modal__file-icon",g(q)(k)])},[_("span",{class:"vuefinder__upload-modal__file-icon-text",textContent:D(g(I)(k))},null,8,b4)],2),_("div",w4,[_("div",S4,D(g(pc)(k.name,40))+" ("+D(k.size)+") ",1),_("div",C4,D(g(pc)(k.name,16))+" ("+D(k.size)+") ",1),_("div",{class:Pe(["vuefinder__upload-modal__file-status",g(q)(k)])},[Ge(D(k.statusName)+" ",1),k.status===g(S).QUEUE_ENTRY_STATUS.UPLOADING?(b(),x("b",E4,D(k.percent),1)):ue("",!0)],2)]),_("button",{type:"button",class:Pe(["vuefinder__upload-modal__file-remove",g(v)?"disabled":""]),title:g(n)("Delete"),disabled:g(v),onClick:X=>g(T)(k)},[...M[16]||(M[16]=[_("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",class:"vuefinder__upload-modal__file-remove-icon"},[_("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6 18L18 6M6 6l12 12"})],-1)])],10,T4)]))),128)),g(p).length?ue("",!0):(b(),x("div",x4,D(g(n)("No files selected!")),1))]),g(h).length?(b(),ne(fc,{key:0,error:"",onHidden:M[2]||(M[2]=k=>h.value="")},{default:we(()=>[Ge(D(g(h)),1)]),_:1})):ue("",!0)])]),_("input",{ref_key:"internalFileInput",ref:d,type:"file",multiple:"",class:"hidden"},null,512),_("input",{ref_key:"internalFolderInput",ref:f,type:"file",multiple:"",webkitdirectory:"",class:"hidden"},null,512)]),_:1},8,["show-drag-overlay","drag-overlay-text"]))}}),k4={xmlns:"http://www.w3.org/2000/svg",fill:"none","stroke-width":"1.5",class:"h-6 w-6 md:h-8 md:w-8 m-auto",viewBox:"0 0 24 24"};function I4(t,e){return b(),x("svg",k4,[...e[0]||(e[0]=[_("path",{d:"m20.25 7.5-.625 10.632a2.25 2.25 0 0 1-2.247 2.118H6.622a2.25 2.25 0 0 1-2.247-2.118L3.75 7.5m6 4.125 2.25 2.25m0 0 2.25 2.25M12 13.875l2.25-2.25M12 13.875l-2.25 2.25M3.375 7.5h17.25c.621 0 1.125-.504 1.125-1.125v-1.5c0-.621-.504-1.125-1.125-1.125H3.375c-.621 0-1.125.504-1.125 1.125v1.5c0 .621.504 1.125 1.125 1.125"},null,-1)])])}const y_={render:I4},M4={class:"vuefinder__unarchive-modal__content"},F4={class:"vuefinder__unarchive-modal__items"},D4={key:0,class:"vuefinder__unarchive-modal__icon vuefinder__unarchive-modal__icon--dir",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"1"},L4={key:1,class:"vuefinder__unarchive-modal__icon vuefinder__unarchive-modal__icon--file",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"1"},j4={class:"vuefinder__unarchive-modal__item-name"},V4={class:"vuefinder__unarchive-modal__info"},Du=Ee({__name:"ModalUnarchive",setup(t){const e=je(),n=Jt(e),r=e.fs,i=$e(r.path),{t:o}=e.i18n,a=K(e.modal.data.items[0]),s=K([]),l=()=>{e.adapter.unarchive({item:a.value.path,path:i.value.path}).then(u=>{n.success(o("The file unarchived.")),e.fs.setFiles(u.files),e.modal.close()}).catch(u=>{n.error(Xt(u,o("Failed to unarchive")))})};return(u,c)=>(b(),ne(on,null,{buttons:we(()=>[_("button",{type:"button",class:"vf-btn vf-btn-primary",onClick:l},D(g(o)("Unarchive")),1),_("button",{type:"button",class:"vf-btn vf-btn-secondary",onClick:c[0]||(c[0]=d=>g(e).modal.close())},D(g(o)("Cancel")),1)]),default:we(()=>[_("div",null,[j(mn,{icon:g(y_),title:g(o)("Unarchive")},null,8,["icon","title"]),_("div",M4,[_("div",F4,[(b(!0),x(Ie,null,qe(s.value,d=>(b(),x("p",{key:d.path,class:"vuefinder__unarchive-modal__item"},[d.type==="dir"?(b(),x("svg",D4,[...c[1]||(c[1]=[_("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"},null,-1)])])):(b(),x("svg",L4,[...c[2]||(c[2]=[_("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"},null,-1)])])),_("span",j4,D(d.basename),1)]))),128)),_("p",V4,D(g(o)("The archive will be unarchived at"))+" ("+D(g(i).path)+") ",1)])])])]),_:1}))}}),z4={xmlns:"http://www.w3.org/2000/svg",fill:"none","stroke-width":"1.5",viewBox:"0 0 24 24"};function N4(t,e){return b(),x("svg",z4,[...e[0]||(e[0]=[_("path",{d:"m20.25 7.5-.625 10.632a2.25 2.25 0 0 1-2.247 2.118H6.622a2.25 2.25 0 0 1-2.247-2.118L3.75 7.5M10 11.25h4M3.375 7.5h17.25c.621 0 1.125-.504 1.125-1.125v-1.5c0-.621-.504-1.125-1.125-1.125H3.375c-.621 0-1.125.504-1.125 1.125v1.5c0 .621.504 1.125 1.125 1.125"},null,-1)])])}const b_={render:N4},U4={class:"vuefinder__archive-modal__content"},B4={class:"vuefinder__archive-modal__form"},H4={class:"vuefinder__archive-modal__files vf-scrollbar"},q4={key:0,class:"vuefinder__archive-modal__icon vuefinder__archive-modal__icon--dir",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"1"},W4={key:1,class:"vuefinder__archive-modal__icon",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"1"},K4={class:"vuefinder__archive-modal__file-name"},Y4=["placeholder"],Lu=Ee({__name:"ModalArchive",setup(t){const e=je(),n=Jt(e),{t:r}=e.i18n,i=e.fs,o=$e(i.path),a=K(""),s=K(e.modal.data.items),l=()=>{s.value.length&&e.adapter.archive({path:o.value.path,items:s.value.map(({path:u,type:c})=>({path:u,type:c})),name:a.value}).then(u=>{n.success(r("The file(s) archived.")),e.fs.setFiles(u.files),e.modal.close()}).catch(u=>{n.error(Xt(u,r("Failed to archive files")))})};return(u,c)=>(b(),ne(on,null,{buttons:we(()=>[_("button",{type:"button",class:"vf-btn vf-btn-primary",onClick:l},D(g(r)("Archive")),1),_("button",{type:"button",class:"vf-btn vf-btn-secondary",onClick:c[1]||(c[1]=d=>g(e).modal.close())},D(g(r)("Cancel")),1)]),default:we(()=>[_("div",null,[j(mn,{icon:g(b_),title:g(r)("Archive the files")},null,8,["icon","title"]),_("div",U4,[_("div",B4,[_("div",H4,[(b(!0),x(Ie,null,qe(s.value,d=>(b(),x("p",{key:d.path,class:"vuefinder__archive-modal__file"},[d.type==="dir"?(b(),x("svg",q4,[...c[2]||(c[2]=[_("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"},null,-1)])])):(b(),x("svg",W4,[...c[3]||(c[3]=[_("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"},null,-1)])])),_("span",K4,D(d.basename),1)]))),128))]),st(_("input",{"onUpdate:modelValue":c[0]||(c[0]=d=>a.value=d),class:"vuefinder__archive-modal__input",placeholder:g(r)("Archive name. (.zip file will be created)"),type:"text",onKeyup:fi(l,["enter"])},null,40,Y4),[[Xi,a.value]])])])])]),_:1}))}}),G4={class:"vuefinder__about-modal__content"},Q4={class:"vuefinder__about-modal__main"},X4={class:"vuefinder__about-modal__shortcuts"},J4={class:"vuefinder__about-modal__shortcut"},Z4={key:0,class:"vuefinder__about-modal__shortcut"},eL={key:1,class:"vuefinder__about-modal__shortcut"},tL={class:"vuefinder__about-modal__shortcut"},nL={class:"vuefinder__about-modal__shortcut"},rL={key:2,class:"vuefinder__about-modal__shortcut"},iL={key:3,class:"vuefinder__about-modal__shortcut"},oL={key:4,class:"vuefinder__about-modal__shortcut"},aL={key:5,class:"vuefinder__about-modal__shortcut"},sL={class:"vuefinder__about-modal__shortcut"},lL={class:"vuefinder__about-modal__shortcut"},cL={key:6,class:"vuefinder__about-modal__shortcut"},uL={key:7,class:"vuefinder__about-modal__shortcut"},dL=Ee({__name:"ModalShortcuts",setup(t){const e=je(),{enabled:n}=An(),{t:r}=e.i18n;return(i,o)=>(b(),ne(on,null,{buttons:we(()=>[_("button",{type:"button",class:"vf-btn vf-btn-secondary",onClick:o[0]||(o[0]=a=>g(e).modal.close())},D(g(r)("Close")),1)]),default:we(()=>[_("div",G4,[j(mn,{icon:g(r_),title:g(r)("Shortcuts")},null,8,["icon","title"]),_("div",Q4,[_("div",X4,[_("div",J4,[_("div",null,D(g(r)("Refresh")),1),o[1]||(o[1]=_("div",null,[_("kbd",null,"⌘"),Ge(" + "),_("kbd",null,"R")],-1))]),g(n)("rename")?(b(),x("div",Z4,[_("div",null,D(g(r)("Rename")),1),o[2]||(o[2]=_("div",null,[_("kbd",null,"⌘"),Ge(" + "),_("kbd",null,"Shift"),Ge(" + "),_("kbd",null,"R")],-1))])):ue("",!0),g(n)("delete")?(b(),x("div",eL,[_("div",null,D(g(r)("Delete")),1),o[3]||(o[3]=_("kbd",null,"Del",-1))])):ue("",!0),_("div",tL,[_("div",null,D(g(r)("Escape")),1),o[4]||(o[4]=_("kbd",null,"Esc",-1))]),_("div",nL,[_("div",null,D(g(r)("Select All")),1),o[5]||(o[5]=_("div",null,[_("kbd",null,"⌘"),Ge(" + "),_("kbd",null,"A")],-1))]),g(n)("copy")?(b(),x("div",rL,[_("div",null,D(g(r)("Cut")),1),o[6]||(o[6]=_("div",null,[_("kbd",null,"⌘"),Ge(" + "),_("kbd",null,"X")],-1))])):ue("",!0),g(n)("copy")?(b(),x("div",iL,[_("div",null,D(g(r)("Copy")),1),o[7]||(o[7]=_("div",null,[_("kbd",null,"⌘"),Ge(" + "),_("kbd",null,"C")],-1))])):ue("",!0),g(n)("copy")?(b(),x("div",oL,[_("div",null,D(g(r)("Paste")),1),o[8]||(o[8]=_("div",null,[_("kbd",null,"⌘"),Ge(" + "),_("kbd",null,"V")],-1))])):ue("",!0),g(n)("search")?(b(),x("div",aL,[_("div",null,D(g(r)("Search")),1),o[9]||(o[9]=_("div",null,[_("kbd",null,"⌘"),Ge(" + "),_("kbd",null,"F")],-1))])):ue("",!0),_("div",sL,[_("div",null,D(g(r)("Toggle Sidebar")),1),o[10]||(o[10]=_("div",null,[_("kbd",null,"⌘"),Ge(" + "),_("kbd",null,"E")],-1))]),_("div",lL,[_("div",null,D(g(r)("Open Settings")),1),o[11]||(o[11]=_("div",null,[_("kbd",null,"⌘"),Ge(" + "),_("kbd",null,"S")],-1))]),g(n)("fullscreen")?(b(),x("div",cL,[_("div",null,D(g(r)("Toggle Full Screen")),1),o[12]||(o[12]=_("div",null,[_("kbd",null,"⌘"),Ge(" + "),_("kbd",null,"Enter")],-1))])):ue("",!0),g(n)("preview")?(b(),x("div",uL,[_("div",null,D(g(r)("Preview")),1),o[13]||(o[13]=_("kbd",null,"Space",-1))])):ue("",!0)])])])]),_:1}))}}),fL={class:"vuefinder__menubar__container"},pL=["onClick","onMouseenter"],hL={class:"vuefinder__menubar__label"},mL=["onMouseenter"],vL=["onClick"],gL={key:0,class:"vuefinder__menubar__dropdown__label"},_L={key:1,class:"vuefinder__menubar__dropdown__checkmark"},yL=Ee({__name:"MenuBar",setup(t){const e=je(),n=Jt(e),{enabled:r}=An(),{t:i}=e?.i18n||{t:w=>w},o=e?.fs,a=e?.config,s=$e(a.state),l=$e(o.selectedItems),u=$e(o?.storages||[]),c=K(null),d=K(!1),f=te(()=>window.opener!==null||window.name!==""||window.history.length<=1),m=te(()=>[{id:"file",label:i("File"),items:[{id:"new-folder",label:i("New Folder"),action:()=>e?.modal?.open(Mu,{items:l.value}),hidden:()=>!r("newfolder")},{id:"new-file",label:i("New File"),action:()=>e?.modal?.open(g_,{items:l.value}),hidden:()=>!r("newfile")},{type:"separator",hidden:()=>!r("newfolder")&&!r("newfile")||!r("upload")},{id:"upload",label:i("Upload"),action:()=>e?.modal?.open(Fu,{items:l.value}),hidden:()=>!r("upload")},{type:"separator",hidden:()=>!r("search")},{id:"search",label:i("Search"),action:()=>e.modal.open(Iu),hidden:()=>!r("search")},{type:"separator",hidden:()=>!r("archive")&&!r("unarchive")},{id:"archive",label:i("Archive"),action:()=>{l.value.length>0&&e?.modal?.open(Lu,{items:l.value})},enabled:()=>l.value.length>0,hidden:()=>!r("archive")},{id:"unarchive",label:i("Unarchive"),action:()=>{l.value.length===1&&l.value[0]?.mime_type==="application/zip"&&e?.modal?.open(Du,{items:l.value})},enabled:()=>l.value.length===1&&l.value[0]?.mime_type==="application/zip",hidden:()=>!r("unarchive")},{type:"separator",hidden:()=>!r("preview")},{id:"preview",label:i("Preview"),action:()=>{l.value.length===1&&l.value[0]?.type!=="dir"&&e?.modal?.open(uo,{storage:o?.path?.get()?.storage,item:l.value[0]})},enabled:()=>l.value.length===1&&l.value[0]?.type!=="dir",hidden:()=>!r("preview")},...f.value?[{type:"separator"},{id:"exit",label:i("Exit"),action:()=>{try{window.close()}catch{}},enabled:()=>!0}]:[]]},{id:"edit",label:i("Edit"),items:[...e?.selectionMode==="multiple"?[{id:"select-all",label:i("Select All"),action:()=>o?.selectAll(e?.selectionMode||"multiple",e),enabled:()=>!0},{id:"deselect",label:i("Deselect All"),action:()=>o?.clearSelection(),enabled:()=>l.value.length>0},{type:"separator"}]:[],...r("copy")?[{id:"cut",label:i("Cut"),action:()=>{l.value.length>0&&o?.setClipboard("cut",new Set(l.value.map(w=>w.path)))},enabled:()=>l.value.length>0},{id:"copy",label:i("Copy"),action:()=>{l.value.length>0&&o?.setClipboard("copy",new Set(l.value.map(w=>w.path)))},enabled:()=>l.value.length>0},{id:"paste",label:i("Paste"),action:()=>{const w=o?.getClipboard();w?.items?.size>0&&e?.modal?.open(w.type==="cut"?di:Pu,{items:{from:Array.from(w.items),to:o?.path?.get()}})},enabled:()=>o?.getClipboard()?.items?.size>0}]:[],...r("move")?[{id:"move",label:i("Move files"),action:()=>{if(l.value.length>0){const w=e?.fs,y={storage:w?.path?.get()?.storage||"",path:w?.path?.get()?.path||"",type:"dir"};e?.modal?.open(di,{items:{from:l.value,to:y}})}},enabled:()=>l.value.length>0},{type:"separator"}]:[],{id:"copy-path",label:i("Copy Path"),action:async()=>{if(l.value.length===1){const w=l.value[0];await Yi(w.path)}else{const w=o?.path?.get();w?.path&&await Yi(w.path)}},enabled:()=>!0},{id:"copy-download-url",label:i("Copy Download URL"),action:async()=>{if(l.value.length===1){const w=l.value[0];o?.path?.get()?.storage;const y=e?.adapter?.getDownloadUrl({path:w.path});y&&await JD(y)}},enabled:()=>l.value.length===1&&l.value[0]?.type!=="dir"},{type:"separator",hidden:()=>!r("rename")&&!r("delete")},{id:"rename",label:i("Rename"),action:()=>{l.value.length===1&&e?.modal?.open(os,{items:l.value})},enabled:()=>l.value.length===1,hidden:()=>!r("rename")},{id:"delete",label:i("Delete"),action:()=>{l.value.length>0&&e?.modal?.open(is,{items:l.value})},enabled:()=>l.value.length>0,hidden:()=>!r("delete")}]},{id:"view",label:i("View"),items:[{id:"refresh",label:i("Refresh"),action:()=>{e.adapter.invalidateListQuery(o.path.get().path),e.adapter.open(o.path.get().path)},enabled:()=>!0},{type:"separator"},{id:"grid-view",label:i("Grid View"),action:()=>a?.set("view","grid"),enabled:()=>!0,checked:()=>s.value?.view==="grid"},{id:"list-view",label:i("List View"),action:()=>a?.set("view","list"),enabled:()=>!0,checked:()=>s.value?.view==="list"},{type:"separator"},{id:"tree-view",label:i("Tree View"),action:()=>a?.toggle("showTreeView"),enabled:()=>!0,checked:()=>s.value?.showTreeView},{id:"thumbnails",label:i("Show Thumbnails"),action:()=>a?.toggle("showThumbnails"),enabled:()=>!0,checked:()=>s.value?.showThumbnails},{id:"show-hidden-files",label:i("Show Hidden Files"),action:()=>a?.toggle("showHiddenFiles"),enabled:()=>!0,checked:()=>s.value?.showHiddenFiles},{type:"separator",hidden:()=>!r("fullscreen")},{id:"fullscreen",label:i("Full Screen"),action:()=>a?.toggle("fullScreen"),enabled:()=>r("fullscreen"),checked:()=>s.value?.fullScreen,hidden:()=>!r("fullscreen")},{type:"separator"},{id:"persist-path",label:i("Persist Path"),action:()=>{a?.toggle("persist"),e.emitter.emit("vf-persist-path-saved")},enabled:()=>!0,checked:()=>s.value?.persist},{id:"metric-units",label:i("Metric Units"),action:()=>{a?.toggle("metricUnits"),e.filesize=a?.get("metricUnits")?e_:Eu,e.emitter.emit("vf-metric-units-saved")},enabled:()=>!0,checked:()=>s.value?.metricUnits}]},{id:"go",label:i("Go"),items:[...r("history")?[{id:"forward",label:i("Forward"),action:()=>{o?.goForward();const w=o?.path?.get();w?.path&&e?.adapter.open(w.path)},enabled:()=>o?.canGoForward?.get()??!1},{id:"back",label:i("Back"),action:()=>{o?.goBack();const w=o?.path?.get();w?.path&&e?.adapter.open(w.path)},enabled:()=>o?.canGoBack?.get()??!1}]:[],{id:"open-containing-folder",label:i("Open containing folder"),action:()=>{const w=o?.path?.get();if(w?.breadcrumb&&w.breadcrumb.length>1){const y=w.breadcrumb[w.breadcrumb.length-2]?.path??`${w.storage}://`;e?.adapter.open(y)}},enabled:()=>{const w=o?.path?.get();return w?.breadcrumb&&w.breadcrumb.length>1}},{type:"separator"},...(u.value||[]).map(w=>({id:`storage-${w}`,label:w,action:()=>{const y=`${w}://`;e?.adapter.open(y)},enabled:()=>!0})),{type:"separator"},{id:"go-to-folder",label:i("Go to Folder"),action:async()=>{const w=prompt(i("Enter folder path:"));if(w){if(!w.includes("://")){alert(i("Invalid path format. Path must be in format: storage://path/to/folder"));return}const y=w.indexOf("://"),E=w.slice(0,y);if(!u.value||!u.value.includes(E)){alert(i('Invalid storage. Storage "%s" is not available.',E));return}try{await e?.adapter.open(w)}catch(T){const A=Xt(T,i("Failed to navigate to folder"));n.error(A),e.fs.setLoading(!1)}}},enabled:()=>!0}]},{id:"help",label:i("Help"),items:[{id:"settings",label:i("Settings"),action:()=>e?.modal?.open(h_),enabled:()=>!0},{id:"shortcuts",label:i("Shortcuts"),action:()=>e?.modal?.open(dL),enabled:()=>!0},{id:"about",label:i("About"),action:()=>e?.modal?.open(i_),enabled:()=>!0}]}]),p=w=>{c.value===w?v():(c.value=w,d.value=!0)},h=w=>{d.value&&(c.value=w)},v=()=>{c.value=null,d.value=!1},C=w=>{v(),w()},S=w=>{w.target.closest(".vuefinder__menubar")||v()};return it(()=>{document.addEventListener("click",S)}),xt(()=>{document.removeEventListener("click",S)}),(w,y)=>(b(),x("div",{class:"vuefinder__menubar",onClick:y[0]||(y[0]=Qe(()=>{},["stop"]))},[_("div",fL,[(b(!0),x(Ie,null,qe(m.value,E=>(b(),x("div",{key:E.id,class:Pe(["vuefinder__menubar__item",{"vuefinder__menubar__item--active":c.value===E.id}]),onClick:T=>p(E.id),onMouseenter:T=>h(E.id)},[_("span",hL,D(E.label),1),c.value===E.id?(b(),x("div",{key:0,class:"vuefinder__menubar__dropdown",onMouseenter:T=>h(E.id)},[(b(!0),x(Ie,null,qe(E.items,T=>(b(),x("div",{key:T.id||T.type,class:Pe(["vuefinder__menubar__dropdown__item",{"vuefinder__menubar__dropdown__item--separator":T.type==="separator","vuefinder__menubar__dropdown__item--disabled":T.enabled&&!T.enabled(),"vuefinder__menubar__dropdown__item--checked":T.checked&&T.checked(),"vuefinder__menubar__dropdown__item--hidden":T.hidden&&T.hidden()}]),onClick:Qe(A=>T.type!=="separator"&&T.enabled&&T.enabled()?C(T.action):null,["stop"])},[T.type!=="separator"?(b(),x("span",gL,D(T.label),1)):ue("",!0),T.checked&&T.checked()?(b(),x("span",_L," ✓ ")):ue("",!0)],10,vL))),128))],40,mL)):ue("",!0)],42,pL))),128))])]))}}),bL={xmlns:"http://www.w3.org/2000/svg",fill:"none","stroke-width":"1.5",viewBox:"0 0 24 24"};function wL(t,e){return b(),x("svg",bL,[...e[0]||(e[0]=[_("path",{d:"M3.75 3.75v4.5m0-4.5h4.5m-4.5 0L9 9M3.75 20.25v-4.5m0 4.5h4.5m-4.5 0L9 15M20.25 3.75h-4.5m4.5 0v4.5m0-4.5L15 9m5.25 11.25h-4.5m4.5 0v-4.5m0 4.5L15 15"},null,-1)])])}const SL={render:wL},CL={xmlns:"http://www.w3.org/2000/svg",fill:"none","stroke-width":"1.5",class:"h-6 w-6 md:h-8 md:w-8 m-auto vf-toolbar-icon",viewBox:"0 0 24 24"};function EL(t,e){return b(),x("svg",CL,[...e[0]||(e[0]=[_("path",{d:"M9 9V4.5M9 9H4.5M9 9 3.75 3.75M9 15v4.5M9 15H4.5M9 15l-5.25 5.25M15 9h4.5M15 9V4.5M15 9l5.25-5.25M15 15h4.5M15 15v4.5m0-4.5 5.25 5.25"},null,-1)])])}const TL={render:EL},xL={xmlns:"http://www.w3.org/2000/svg",fill:"none","stroke-width":"1.5",class:"h-6 w-6 md:h-8 md:w-8 m-auto",viewBox:"0 0 24 24"};function OL(t,e){return b(),x("svg",xL,[...e[0]||(e[0]=[_("path",{d:"M3.75 6A2.25 2.25 0 0 1 6 3.75h2.25A2.25 2.25 0 0 1 10.5 6v2.25a2.25 2.25 0 0 1-2.25 2.25H6a2.25 2.25 0 0 1-2.25-2.25zm0 9.75A2.25 2.25 0 0 1 6 13.5h2.25a2.25 2.25 0 0 1 2.25 2.25V18a2.25 2.25 0 0 1-2.25 2.25H6A2.25 2.25 0 0 1 3.75 18zM13.5 6a2.25 2.25 0 0 1 2.25-2.25H18A2.25 2.25 0 0 1 20.25 6v2.25A2.25 2.25 0 0 1 18 10.5h-2.25a2.25 2.25 0 0 1-2.25-2.25zm0 9.75a2.25 2.25 0 0 1 2.25-2.25H18a2.25 2.25 0 0 1 2.25 2.25V18A2.25 2.25 0 0 1 18 20.25h-2.25A2.25 2.25 0 0 1 13.5 18z"},null,-1)])])}const AL={render:OL},$L={xmlns:"http://www.w3.org/2000/svg",fill:"none","stroke-width":"1.5",class:"h-6 w-6 md:h-8 md:w-8 m-auto",viewBox:"0 0 24 24"};function RL(t,e){return b(),x("svg",$L,[...e[0]||(e[0]=[_("path",{d:"M3.75 12h16.5m-16.5 3.75h16.5M3.75 19.5h16.5M5.625 4.5h12.75a1.875 1.875 0 0 1 0 3.75H5.625a1.875 1.875 0 0 1 0-3.75"},null,-1)])])}const PL={render:RL},kL={fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"};function IL(t,e){return b(),x("svg",kL,[...e[0]||(e[0]=[_("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.5",d:"M3 4a1 1 0 0 1 1-1h16a1 1 0 0 1 1 1v2.586a1 1 0 0 1-.293.707l-6.414 6.414a1 1 0 0 0-.293.707V17l-4 4v-6.586a1 1 0 0 0-.293-.707L3.293 7.293A1 1 0 0 1 3 6.586z"},null,-1)])])}const ML={render:IL},FL={class:"vuefinder__toolbar"},DL={class:"vuefinder__toolbar__actions"},LL=["title"],jL=["title"],VL=["title"],zL=["title"],NL=["title"],UL=["title"],BL=["title"],HL={class:"vuefinder__toolbar__controls"},qL=["title"],WL={class:"vuefinder__toolbar__control vuefinder__toolbar__dropdown-container"},KL=["title"],YL={class:"relative"},GL={key:0,class:"vuefinder__toolbar__filter-indicator"},QL={key:0,class:"vuefinder__toolbar__dropdown"},XL={class:"vuefinder__toolbar__dropdown-content"},JL={class:"vuefinder__toolbar__dropdown-section"},ZL={class:"vuefinder__toolbar__dropdown-label"},e3={class:"vuefinder__toolbar__dropdown-row"},t3={value:"name"},n3={value:"size"},r3={value:"modified"},i3={value:""},o3={value:"asc"},a3={value:"desc"},s3={class:"vuefinder__toolbar__dropdown-section"},l3={class:"vuefinder__toolbar__dropdown-label"},c3={class:"vuefinder__toolbar__dropdown-options"},u3={class:"vuefinder__toolbar__dropdown-option"},d3={class:"vuefinder__toolbar__option-text"},f3={class:"vuefinder__toolbar__dropdown-option"},p3={class:"vuefinder__toolbar__option-text"},h3={class:"vuefinder__toolbar__dropdown-option"},m3={class:"vuefinder__toolbar__option-text"},v3={class:"vuefinder__toolbar__dropdown-toggle"},g3={for:"showHidden",class:"vuefinder__toolbar__toggle-label"},_3={class:"vuefinder__toolbar__dropdown-reset"},y3=["title"],b3=["title"],w3=Ee({name:"VfToolbar",__name:"Toolbar",setup(t){const e=je(),{enabled:n}=An(),{t:r}=e.i18n,i=e.fs,o=e.config,a=$e(o.state),s=$e(i.selectedItems),l=$e(i.sort),u=$e(i.filter);Ae(()=>a.value.fullScreen,()=>{const v=document.querySelector("body");v&&(v.style.overflow=a.value.fullScreen?"hidden":"")},{immediate:!0});const c=K(!1),d=v=>{v.target.closest(".vuefinder__toolbar__dropdown-container")||(c.value=!1)};it(()=>{const v=document.querySelector("body");v&&a.value.fullScreen&&setTimeout(()=>v.style.overflow="hidden"),document.addEventListener("click",d)}),xt(()=>{document.removeEventListener("click",d)});const f=K({sortBy:"name",sortOrder:"",filterKind:"all",showHidden:a.value.showHiddenFiles});Ae(()=>f.value.sortBy,v=>{if(!f.value.sortOrder){i.clearSort();return}v==="name"?i.setSort("basename",f.value.sortOrder):v==="size"?i.setSort("file_size",f.value.sortOrder):v==="modified"&&i.setSort("last_modified",f.value.sortOrder)}),Ae(()=>f.value.sortOrder,v=>{if(!v){i.clearSort();return}f.value.sortBy==="name"?i.setSort("basename",v):f.value.sortBy==="size"?i.setSort("file_size",v):f.value.sortBy==="modified"&&i.setSort("last_modified",v)}),Ae(l,v=>{v.active?(v.column==="basename"?f.value.sortBy="name":v.column==="file_size"?f.value.sortBy="size":v.column==="last_modified"&&(f.value.sortBy="modified"),f.value.sortOrder=v.order):f.value.sortOrder=""},{immediate:!0}),Ae(()=>f.value.filterKind,v=>{i.setFilter(v,a.value.showHiddenFiles)}),Ae(()=>f.value.showHidden,v=>{o.set("showHiddenFiles",v),i.setFilter(f.value.filterKind,v)}),Ae(u,v=>{f.value.filterKind=v.kind},{immediate:!0}),Ae(()=>a.value.showHiddenFiles,v=>{f.value.showHidden=v,i.setFilter(f.value.filterKind,v)},{immediate:!0});const m=()=>o.set("view",a.value.view==="grid"?"list":"grid"),p=te(()=>u.value.kind!=="all"||!a.value.showHiddenFiles||l.value.active),h=()=>{f.value={sortBy:"name",sortOrder:"",filterKind:"all",showHidden:!0},o.set("showHiddenFiles",!0),i.clearSort(),i.clearFilter()};return(v,C)=>(b(),x("div",FL,[_("div",DL,[g(n)("newfolder")?(b(),x("div",{key:0,class:"mx-1.5",title:g(r)("New Folder"),onClick:C[0]||(C[0]=S=>g(e).modal.open(Mu,{items:g(s)}))},[j(g(m_))],8,LL)):ue("",!0),g(n)("newfile")?(b(),x("div",{key:1,class:"mx-1.5",title:g(r)("New File"),onClick:C[1]||(C[1]=S=>g(e).modal.open(g_,{items:g(s)}))},[j(g(v_))],8,jL)):ue("",!0),g(n)("rename")?(b(),x("div",{key:2,class:"mx-1.5",title:g(r)("Rename"),onClick:C[2]||(C[2]=S=>g(s).length!==1||g(e).modal.open(os,{items:g(s)}))},[j(g(a_),{class:Pe(g(s).length===1?"vf-toolbar-icon":"vf-toolbar-icon-disabled")},null,8,["class"])],8,VL)):ue("",!0),g(n)("delete")?(b(),x("div",{key:3,class:"mx-1.5",title:g(r)("Delete"),onClick:C[3]||(C[3]=S=>!g(s).length||g(e).modal.open(is,{items:g(s)}))},[j(g(o_),{class:Pe(g(s).length?"vf-toolbar-icon":"vf-toolbar-icon-disabled")},null,8,["class"])],8,zL)):ue("",!0),g(n)("upload")?(b(),x("div",{key:4,class:"mx-1.5",title:g(r)("Upload"),onClick:C[4]||(C[4]=S=>g(e).modal.open(Fu,{items:g(s)}))},[j(g(__))],8,NL)):ue("",!0),g(n)("unarchive")&&g(s).length===1&&g(s)[0].mime_type==="application/zip"?(b(),x("div",{key:5,class:"mx-1.5",title:g(r)("Unarchive"),onClick:C[5]||(C[5]=S=>!g(s).length||g(e).modal.open(Du,{items:g(s)}))},[j(g(y_),{class:Pe(g(s).length?"vf-toolbar-icon":"vf-toolbar-icon-disabled")},null,8,["class"])],8,UL)):ue("",!0),g(n)("archive")?(b(),x("div",{key:6,class:"mx-1.5",title:g(r)("Archive"),onClick:C[6]||(C[6]=S=>!g(s).length||g(e).modal.open(Lu,{items:g(s)}))},[j(g(b_),{class:Pe(g(s).length?"vf-toolbar-icon":"vf-toolbar-icon-disabled")},null,8,["class"])],8,BL)):ue("",!0)]),_("div",HL,[g(n)("search")?(b(),x("div",{key:0,class:"mx-1.5",title:g(r)("Search Files"),onClick:C[7]||(C[7]=S=>g(e).modal.open(Iu))},[j(g(ku),{class:"vf-toolbar-icon text-(--vf-bg-primary)"})],8,qL)):ue("",!0),_("div",WL,[_("div",{title:g(r)("Filter"),class:"vuefinder__toolbar__dropdown-trigger",onClick:C[8]||(C[8]=S=>c.value=!c.value)},[_("div",YL,[j(g(ML),{class:"vf-toolbar-icon vuefinder__toolbar__icon h-6 w-6"}),p.value?(b(),x("div",GL)):ue("",!0)])],8,KL),c.value?(b(),x("div",QL,[_("div",XL,[_("div",JL,[_("div",ZL,D(g(r)("Sorting")),1),_("div",e3,[st(_("select",{"onUpdate:modelValue":C[9]||(C[9]=S=>f.value.sortBy=S),class:"vuefinder__toolbar__dropdown-select"},[_("option",t3,D(g(r)("Name")),1),_("option",n3,D(g(r)("Size")),1),_("option",r3,D(g(r)("Date")),1)],512),[[ul,f.value.sortBy]]),st(_("select",{"onUpdate:modelValue":C[10]||(C[10]=S=>f.value.sortOrder=S),class:"vuefinder__toolbar__dropdown-select"},[_("option",i3,D(g(r)("None")),1),_("option",o3,D(g(r)("Asc")),1),_("option",a3,D(g(r)("Desc")),1)],512),[[ul,f.value.sortOrder]])])]),_("div",s3,[_("div",l3,D(g(r)("Show")),1),_("div",c3,[_("label",u3,[st(_("input",{"onUpdate:modelValue":C[11]||(C[11]=S=>f.value.filterKind=S),type:"radio",name:"filterKind",value:"all",class:"vuefinder__toolbar__radio"},null,512),[[us,f.value.filterKind]]),_("span",d3,D(g(r)("All items")),1)]),_("label",f3,[st(_("input",{"onUpdate:modelValue":C[12]||(C[12]=S=>f.value.filterKind=S),type:"radio",name:"filterKind",value:"files",class:"vuefinder__toolbar__radio"},null,512),[[us,f.value.filterKind]]),_("span",p3,D(g(r)("Files only")),1)]),_("label",h3,[st(_("input",{"onUpdate:modelValue":C[13]||(C[13]=S=>f.value.filterKind=S),type:"radio",name:"filterKind",value:"folders",class:"vuefinder__toolbar__radio"},null,512),[[us,f.value.filterKind]]),_("span",m3,D(g(r)("Folders only")),1)])])]),_("div",v3,[_("label",g3,D(g(r)("Show hidden files")),1),st(_("input",{id:"showHidden","onUpdate:modelValue":C[14]||(C[14]=S=>f.value.showHidden=S),type:"checkbox",class:"vuefinder__toolbar__checkbox"},null,512),[[$a,f.value.showHidden]])]),_("div",_3,[_("button",{class:"vuefinder__toolbar__reset-button",onClick:h},D(g(r)("Reset")),1)])])])):ue("",!0)]),g(n)("fullscreen")?(b(),x("div",{key:1,class:"mx-1.5",title:g(r)("Toggle Full Screen"),onClick:C[15]||(C[15]=S=>g(o).toggle("fullScreen"))},[g(a).fullScreen?(b(),ne(g(TL),{key:0,class:"vf-toolbar-icon"})):(b(),ne(g(SL),{key:1,class:"vf-toolbar-icon"}))],8,y3)):ue("",!0),_("div",{class:"mx-1.5",title:g(r)("Change View"),onClick:C[16]||(C[16]=S=>m())},[g(a).view==="grid"?(b(),ne(g(AL),{key:0,class:"vf-toolbar-icon"})):ue("",!0),g(a).view==="list"?(b(),ne(g(PL),{key:1,class:"vf-toolbar-icon"})):ue("",!0)],8,b3)])]))}}),S3={xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",class:"vuefinder__breadcrumb__refresh-icon",viewBox:"-40 -40 580 580"};function C3(t,e){return b(),x("svg",S3,[...e[0]||(e[0]=[_("path",{d:"M463.5 224h8.5c13.3 0 24-10.7 24-24V72c0-9.7-5.8-18.5-14.8-22.2S461.9 48.1 455 55l-41.6 41.6c-87.6-86.5-228.7-86.2-315.8 1-87.5 87.5-87.5 229.3 0 316.8s229.3 87.5 316.8 0c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0c-62.5 62.5-163.8 62.5-226.3 0s-62.5-163.8 0-226.3c62.2-62.2 162.7-62.5 225.3-1L327 183c-6.9 6.9-8.9 17.2-5.2 26.2S334.3 224 344 224z"},null,-1)])])}const E3={render:C3},T3={xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",class:"h-6 w-6 p-0.5 rounded",viewBox:"0 0 20 20"};function x3(t,e){return b(),x("svg",T3,[...e[0]||(e[0]=[_("path",{"fill-rule":"evenodd",d:"M5.293 9.707a1 1 0 0 1 0-1.414l4-4a1 1 0 0 1 1.414 0l4 4a1 1 0 0 1-1.414 1.414L11 7.414V15a1 1 0 1 1-2 0V7.414L6.707 9.707a1 1 0 0 1-1.414 0",class:"pointer-events-none","clip-rule":"evenodd"},null,-1)])])}const O3={render:x3},A3={xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor","stroke-width":"1.5",class:"vuefinder__breadcrumb__close-icon",viewBox:"0 0 24 24"};function $3(t,e){return b(),x("svg",A3,[...e[0]||(e[0]=[_("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6 18 18 6M6 6l12 12"},null,-1)])])}const R3={render:$3},P3={xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 20 20"};function k3(t,e){return b(),x("svg",P3,[...e[0]||(e[0]=[_("path",{d:"M10.707 2.293a1 1 0 0 0-1.414 0l-7 7a1 1 0 0 0 1.414 1.414L4 10.414V17a1 1 0 0 0 1 1h2a1 1 0 0 0 1-1v-2a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1v2a1 1 0 0 0 1 1h2a1 1 0 0 0 1-1v-6.586l.293.293a1 1 0 0 0 1.414-1.414z",class:"pointer-events-none"},null,-1)])])}const I3={render:k3},M3={xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor","stroke-width":"1.5",class:"w-6 h-6 cursor-pointer",viewBox:"0 0 24 24"};function F3(t,e){return b(),x("svg",M3,[...e[0]||(e[0]=[_("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6 18 18 6M6 6l12 12"},null,-1)])])}const D3={render:F3},L3={xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",viewBox:"0 0 24 24"};function j3(t,e){return b(),x("svg",L3,[...e[0]||(e[0]=[_("path",{stroke:"none",d:"M0 0h24v24H0z"},null,-1),_("path",{d:"M9 6h11M12 12h8M15 18h5M5 6v.01M8 12v.01M11 18v.01"},null,-1)])])}const V3={render:j3},z3={xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"};function N3(t,e){return b(),x("svg",z3,[...e[0]||(e[0]=[_("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M8 7h12m0 0-4-4m4 4-4 4m0 6H4m0 0 4 4m-4-4 4-4"},null,-1)])])}const U3={render:N3};function fo(t,e=[]){const n="vfDragEnterCounter",r=t.fs,i=$e(r.selectedItems);function o(d,f){return!!(!d||d.type!=="dir"||d.path.startsWith(f)||i.value.some(m=>m.path===f?!1:!!d.path.startsWith(m.path)))}function a(d,f){if(d.isExternalDrag)return;if(!(t.features?.move??!1)){d.dataTransfer&&(d.dataTransfer.dropEffect="none",d.dataTransfer.effectAllowed="none");return}d.preventDefault();const m=r.getDraggedItem();o(f,m)?d.dataTransfer&&(d.dataTransfer.dropEffect="none",d.dataTransfer.effectAllowed="none"):(d.dataTransfer&&(d.dataTransfer.dropEffect="copy",d.dataTransfer.effectAllowed="all"),d.currentTarget.classList.add(...e))}function s(d){if(d.isExternalDrag||!(t.features?.move??!1))return;d.preventDefault();const f=d.currentTarget,m=Number(f.dataset[n]||0);f.dataset[n]=String(m+1)}function l(d){if(d.isExternalDrag||!(t.features?.move??!1))return;d.preventDefault();const f=d.currentTarget,m=Number(f.dataset[n]||0)-1;m<=0?(delete f.dataset[n],f.classList.remove(...e)):f.dataset[n]=String(m)}function u(d,f){if(d.isExternalDrag||!(t.features?.move??!1)||!f)return;d.preventDefault();const m=d.currentTarget;delete m.dataset[n],m.classList.remove(...e);const p=d.dataTransfer?.getData("items")||"[]",h=JSON.parse(p).map(v=>r.sortedFiles.get().find(C=>C.path===v));r.clearDraggedItem(),t.modal.open(di,{items:{from:h,to:f}})}function c(d){return{dragover:f=>a(f,d),dragenter:s,dragleave:l,drop:f=>u(f,d)}}return{events:c}}const B3={class:"vuefinder__breadcrumb__container"},H3=["title"],q3=["title"],W3=["title"],K3=["title"],Y3={class:"vuefinder__breadcrumb__path-container"},G3={class:"vuefinder__breadcrumb__list"},Q3={key:0,class:"vuefinder__breadcrumb__hidden-list"},X3={class:"relative"},J3=["title","onClick"],Z3=["title"],ej={class:"vuefinder__breadcrumb__path-mode"},tj={class:"vuefinder__breadcrumb__path-mode-content"},nj=["title"],rj={class:"vuefinder__breadcrumb__path-text"},ij=["title"],oj=["data-theme"],aj=["onClick"],sj={class:"vuefinder__breadcrumb__hidden-item-content"},lj={class:"vuefinder__breadcrumb__hidden-item-text"},cj=Ee({__name:"Breadcrumb",setup(t){const e=je(),n=Jt(e),{t:r}=e.i18n,i=e.fs,o=e.config,a=$e(o.state),s=$e(i.path),l=$e(i.loading),u=K(null),c=c_(0,100),d=K(5),f=K(!1),m=K(!1),p=te(()=>s.value?.breadcrumb??[]);function h(Q,M){return Q.length>M?[Q.slice(-M),Q.slice(0,-M)]:[Q,[]]}const v=te(()=>h(p.value,d.value)[0]),C=te(()=>h(p.value,d.value)[1]);Ae(c,()=>{if(!u.value)return;const Q=u.value.children;let M=0,k=0;const X=5,N=1;d.value=X,Xe(()=>{for(let re=Q.length-1;re>=0;re--){const ve=Q[re];if(M+ve.offsetWidth>c.value-40)break;M+=parseInt(ve.offsetWidth.toString(),10),k++}k<N&&(k=N),k>X&&(k=X),d.value=k})});const S=()=>{u.value&&(c.value=u.value.offsetWidth)},w=K(null);it(()=>{w.value=new ResizeObserver(S),u.value&&w.value.observe(u.value)}),xt(()=>{w.value&&w.value.disconnect()});const y=fo(e,["vuefinder__drag-over"]);function E(Q=null){Q??=p.value.length-2;const M={basename:s.value?.storage??"local",extension:"",path:(s.value?.storage??"local")+"://",storage:s.value?.storage??"local",type:"dir",file_size:null,last_modified:null,mime_type:null,visibility:""};return p.value[Q]??M}const T=()=>{e.adapter.invalidateListQuery(s.value.path),e.adapter.open(s.value.path)},A=()=>{v.value.length>0&&e.adapter.open(p.value[p.value.length-2]?.path??(s.value?.storage??"local")+"://")},O=Q=>{e.adapter.open(Q.path),f.value=!1},q=()=>{f.value&&(f.value=!1)},I={mounted(Q,M){Q.clickOutsideEvent=function(k){Q===k.target||Q.contains(k.target)||M.value()},document.body.addEventListener("click",Q.clickOutsideEvent)},beforeUnmount(Q){document.body.removeEventListener("click",Q.clickOutsideEvent)}},P=()=>{o.toggle("showTreeView")},z=K({x:0,y:0}),F=(Q,M=null)=>{if(Q.currentTarget instanceof HTMLElement){const{x:k,y:X,height:N}=Q.currentTarget.getBoundingClientRect();z.value={x:k,y:X+N}}f.value=M??!f.value},Y=()=>{m.value=!m.value},le=async()=>{await Yi(s.value?.path||""),n.success(r("Path copied to clipboard"))},de=()=>{m.value=!1};return(Q,M)=>(b(),x("div",B3,[_("span",{title:g(r)("Toggle Tree View")},[j(g(V3),{class:Pe(["vuefinder__breadcrumb__toggle-tree",g(a).showTreeView?"vuefinder__breadcrumb__toggle-tree--active":""]),onClick:P},null,8,["class"])],8,H3),_("span",{title:g(r)("Go up a directory")},[j(g(O3),Ye({class:p.value.length?"vuefinder__breadcrumb__go-up--active":"vuefinder__breadcrumb__go-up--inactive"},Sn(p.value.length?g(y).events(E()):{}),{onClick:A}),null,16,["class"])],8,q3),g(i).isLoading()?(b(),x("span",{key:1,title:g(r)("Cancel")},[j(g(R3),{onClick:M[0]||(M[0]=k=>g(e).emitter.emit("vf-fetch-abort"))})],8,K3)):(b(),x("span",{key:0,title:g(r)("Refresh")},[j(g(E3),{onClick:T})],8,W3)),st(_("div",Y3,[_("div",null,[j(g(I3),Ye({class:"vuefinder__breadcrumb__home-icon"},Sn(g(y).events(E(-1))),{onClick:M[1]||(M[1]=Qe(k=>g(e).adapter.open(g(s).storage+"://"),["stop"]))}),null,16)]),_("div",G3,[C.value.length?st((b(),x("div",Q3,[M[3]||(M[3]=_("div",{class:"vuefinder__breadcrumb__separator"},"/",-1)),_("div",X3,[_("span",{class:"vuefinder__breadcrumb__hidden-toggle",onDragenter:M[2]||(M[2]=k=>F(k,!0)),onClick:Qe(F,["stop"])},[j(g(p_),{class:"vuefinder__breadcrumb__hidden-toggle-icon"})],32)])])),[[I,q]]):ue("",!0)]),_("div",{ref_key:"breadcrumbContainer",ref:u,class:"vuefinder__breadcrumb__visible-list pointer-events-none"},[(b(!0),x(Ie,null,qe(v.value,(k,X)=>(b(),x("div",{key:X},[M[4]||(M[4]=_("span",{class:"vuefinder__breadcrumb__separator"},"/",-1)),_("span",Ye({class:"vuefinder__breadcrumb__item pointer-events-auto",title:k.basename},Sn(g(y).events(k),!0),{onClick:Qe(N=>g(e).adapter.open(k.path),["stop"])}),D(k.name),17,J3)]))),128))],512),g(o).get("loadingIndicator")==="circular"&&g(l)?(b(),ne(g(ls),{key:0})):ue("",!0),_("span",{title:g(r)("Toggle Path Copy Mode"),onClick:Y},[j(g(U3),{class:"vuefinder__breadcrumb__toggle-icon"})],8,Z3)],512),[[En,!m.value]]),st(_("div",ej,[_("div",tj,[_("div",{title:g(r)("Copy Path")},[j(g(xu),{class:"vuefinder__breadcrumb__copy-icon",onClick:le})],8,nj),_("div",rj,D(g(s).path),1),_("div",{title:g(r)("Exit")},[j(g(D3),{class:"vuefinder__breadcrumb__exit-icon",onClick:de})],8,ij)])],512),[[En,m.value]]),(b(),ne(Aa,{to:"body"},[_("div",null,[st(_("div",{style:kt({position:"absolute",top:z.value.y+"px",left:z.value.x+"px"}),class:"vuefinder__themer vuefinder__breadcrumb__hidden-dropdown","data-theme":g(e).theme.current},[(b(!0),x(Ie,null,qe(C.value,(k,X)=>(b(),x("div",Ye({key:X,class:"vuefinder__breadcrumb__hidden-item"},Sn(g(y).events(k),!0),{onClick:N=>O(k)}),[_("div",sj,[_("span",null,[j(g(zn),{class:"vuefinder__breadcrumb__hidden-item-icon"})]),_("span",lj,D(k.name),1)])],16,aj))),128))],12,oj),[[En,f.value]])])]))]))}}),uj={xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"};function dj(t,e){return b(),x("svg",uj,[...e[0]||(e[0]=[_("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M7 21h10a2 2 0 0 0 2-2V9.414a1 1 0 0 0-.293-.707l-5.414-5.414A1 1 0 0 0 12.586 3H7a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2"},null,-1)])])}const qp={render:dj},fj={class:"vuefinder__drag-item__container"},pj={class:"vuefinder__drag-item__count"},hj=Ee({__name:"DragItem",props:{count:{}},setup(t){const e=t;return(n,r)=>(b(),x("div",fj,[e.count>1?(b(),ne(g(qp),{key:0,class:"vuefinder__drag-item__icon translate-x-1 translate-y-1"})):ue("",!0),j(g(qp),{class:"vuefinder__drag-item__icon"}),_("div",pj,D(e.count),1)]))}}),mj={key:2,class:"vuefinder__item-icon__extension"},Wp=Ee({__name:"ItemIcon",props:{item:{},ext:{type:Boolean},small:{type:Boolean},view:{}},setup(t){const e=t,n=je(),r=$e(n.config.state),i=te(()=>e.small!==void 0?e.small?"small":"large":e.view==="list"?"small":"large"),o=te(()=>{const s=i.value,l=r.value?.listIconSize,u=r.value?.gridIconSize;return r.value?.gridItemWidth,r.value?.gridItemHeight,e.view==="list"||s==="small"?{"--vf-icon-size":`${l??16}px`}:{"--vf-icon-size":`${u??48}px`}}),a={app:n,config:r.value,item:e.item,view:e.view};return(s,l)=>(b(),x("div",{class:Pe(["vuefinder__item-icon",{"vuefinder__item-icon--small":i.value==="small","vuefinder__item-icon--large":i.value==="large","vuefinder__item-icon--grid":t.view==="grid","vuefinder__item-icon--list":t.view==="list"}]),style:kt(o.value)},[Ue(s.$slots,"icon",Cn(Zn(a)),()=>[t.item.type==="dir"?(b(),ne(g(zn),{key:0,class:"vuefinder__item-icon__folder"})):(b(),ne(g(Ki),{key:1,class:"vuefinder__item-icon__file"})),t.ext&&t.item.type!=="dir"&&t.item.extension?(b(),x("div",mj,D(t.item.extension.substring(0,3)),1)):ue("",!0)])],6))}}),vj={xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 24 24"};function gj(t,e){return b(),x("svg",vj,[...e[0]||(e[0]=[_("path",{fill:"none",d:"M0 0h24v24H0z"},null,-1),_("path",{d:"M12 2a5 5 0 0 1 5 5v3a3 3 0 0 1 3 3v6a3 3 0 0 1-3 3H7a3 3 0 0 1-3-3v-6a3 3 0 0 1 3-3V7a5 5 0 0 1 5-5m0 12a2 2 0 0 0-1.995 1.85L10 16a2 2 0 1 0 2-2m0-10a3 3 0 0 0-3 3v3h6V7a3 3 0 0 0-3-3"},null,-1)])])}const Kp={render:gj},_j=["data-key","data-row","data-col","draggable"],yj={key:0},bj={class:"vuefinder__explorer__item-grid-content"},wj=["data-src","alt"],Sj={class:"vuefinder__explorer__item-title"},Cj={key:1,class:"vuefinder__explorer__item-list-content"},Ej={class:"vuefinder__explorer__item-list-name"},Tj={class:"vuefinder__explorer__item-list-icon"},xj={class:"vuefinder__explorer__item-name"},Oj={key:0,class:"vuefinder__explorer__item-path"},Aj={key:1,class:"vuefinder__explorer__item-size"},$j={key:0},Rj={key:2,class:"vuefinder__explorer__item-date"},Pj=Ee({__name:"FileItem",props:{item:{},view:{},showThumbnails:{type:Boolean},isSelected:{type:Boolean},isDragging:{type:Boolean},rowIndex:{},colIndex:{},showPath:{type:Boolean},explorerId:{}},emits:["click","dblclick","contextmenu","dragstart","dragend"],setup(t,{emit:e}){const n=t,r=e,i=je(),o=i.fs,a=i.config,s=te(()=>{const P=i.selectionFilterType;return!P||P==="both"?!0:P==="files"&&n.item.type==="file"||P==="dirs"&&n.item.type==="dir"}),l=te(()=>{const P=i.selectionFilterMimeIncludes;return!P||!P.length||n.item.type==="dir"?!0:n.item.mime_type?P.some(z=>n.item.mime_type?.startsWith(z)):!1}),u=te(()=>s.value&&l.value),c=te(()=>["file-item-"+n.explorerId,n.view==="grid"?"vf-explorer-item-grid":"vf-explorer-item-list",n.isSelected?"vf-explorer-selected":"",u.value?"":"vf-explorer-item--unselectable"]),d=te(()=>({opacity:n.isDragging||o.isCut(n.item.path)||!u.value?.5:""})),f=K(null);let m=!1,p=null,h=null,v=!1;const{enabled:C}=An(),S=typeof window<"u"&&("ontouchstart"in window||navigator.maxTouchPoints>0),w=te(()=>S?!1:C("move")),y=()=>{p&&(clearTimeout(p),p=null),h=null},E=P=>{y(),h=P,v=!1,P.stopPropagation(),p=setTimeout(()=>{!h||p===null||(v=!0,h.cancelable&&h.preventDefault(),h.stopPropagation(),r("contextmenu",h),y())},500)},T=P=>{if(v){P.preventDefault(),P.stopPropagation(),y();return}setTimeout(()=>{v||(y(),I(P))},100)},A=P=>{if(!h)return;const z=h.touches[0]||h.changedTouches[0],F=P.touches[0]||P.changedTouches[0];if(z&&F){const Y=Math.abs(F.clientX-z.clientX),le=Math.abs(F.clientY-z.clientY);(Y>15||le>15)&&y()}},O=P=>{S&&P.type!=="click"||r("click",P)},q=P=>{if(v)return P.preventDefault(),P.stopPropagation(),!1;r("dragstart",P)},I=P=>{if(!m)m=!0,r("click",P),f.value=setTimeout(()=>{m=!1},300);else return m=!1,r("dblclick",P),!1};return(P,z)=>(b(),x("div",{class:Pe(c.value),style:kt(d.value),"data-key":t.item.path,"data-row":t.rowIndex,"data-col":t.colIndex,draggable:w.value,onTouchstartCapture:z[1]||(z[1]=F=>E(F)),onTouchendCapture:z[2]||(z[2]=F=>T(F)),onTouchmoveCapture:A,onTouchcancelCapture:z[3]||(z[3]=()=>y()),onClick:O,onDblclick:z[4]||(z[4]=F=>r("dblclick",F)),onContextmenu:z[5]||(z[5]=Qe(F=>r("contextmenu",F),["prevent","stop"])),onDragstart:q,onDragend:z[6]||(z[6]=F=>r("dragend",F))},[t.view==="grid"?(b(),x("div",yj,[g(o).isReadOnly(t.item)?(b(),ne(g(Kp),{key:0,class:"vuefinder__item--readonly vuefinder__item--readonly--left",title:"Read Only"})):ue("",!0),_("div",bj,[(t.item.mime_type??"").startsWith("image")&&t.showThumbnails?(b(),x("img",{key:0,src:"data:image/png;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",class:"vuefinder__explorer__item-thumbnail lazy","data-src":t.item.previewUrl??g(i).adapter.getPreviewUrl({path:t.item.path}),alt:t.item.basename,onTouchstart:z[0]||(z[0]=F=>F.preventDefault())},null,40,wj)):(b(),ne(Wp,{key:1,item:t.item,ext:!0,view:t.view},{icon:we(F=>[Ue(P.$slots,"icon",Cn(Zn(F)))]),_:3},8,["item","view"]))]),_("span",Sj,D(g(pc)(t.item.basename)),1)])):(b(),x("div",Cj,[_("div",Ej,[_("div",Tj,[j(Wp,{item:t.item,view:t.view},{icon:we(F=>[Ue(P.$slots,"icon",Cn(Zn(F)))]),_:3},8,["item","view"])]),_("span",xj,D(t.item.basename),1),_("div",null,[g(o).isReadOnly(t.item)?(b(),ne(g(Kp),{key:0,class:"vuefinder__item--readonly vuefinder__item--readonly--list",title:"Read Only"})):ue("",!0)])]),t.showPath?(b(),x("div",Oj,D(t.item.path),1)):ue("",!0),t.showPath?ue("",!0):(b(),x("div",Aj,[t.item.file_size?(b(),x("div",$j,D(g(i).filesize(t.item.file_size)),1)):ue("",!0)])),!t.showPath&&t.item.last_modified?(b(),x("div",Rj,D(new Date(t.item.last_modified*1e3).toLocaleString()),1)):ue("",!0)])),g(C)("pinned")&&g(a).get("pinnedFolders").find(F=>F.path===t.item.path)?(b(),ne(g(Ou),{key:2,class:"vuefinder__item--pinned"})):ue("",!0)],46,_j))}}),kj=["data-row"],Yp=Ee({__name:"FileRow",props:{rowIndex:{},rowHeight:{},view:{},itemsPerRow:{},items:{},showThumbnails:{type:Boolean},showPath:{type:Boolean},isDraggingItem:{type:Function},isSelected:{type:Function},dragNDropEvents:{type:Function},explorerId:{}},emits:["click","dblclick","contextmenu","dragstart","dragend"],setup(t,{emit:e}){const n=t,r=e,i=te(()=>[n.view==="grid"?"vf-explorer-item-grid-row":"vf-explorer-item-list-row","pointer-events-none"]),o=te(()=>({position:"absolute",top:0,left:0,width:"100%",height:`${n.rowHeight}px`,transform:`translateY(${n.rowIndex*n.rowHeight}px)`})),a=te(()=>n.view==="grid"?{gridTemplateColumns:`repeat(${n.itemsPerRow||1}, 1fr)`}:{gridTemplateColumns:"1fr"});return(s,l)=>(b(),x("div",{class:Pe(i.value),"data-row":t.rowIndex,style:kt(o.value)},[_("div",{class:Pe(["grid justify-self-start",{"w-full":t.view==="list"}]),style:kt(a.value)},[(b(!0),x(Ie,null,qe(t.items,(u,c)=>(b(),ne(Pj,Ye({key:u.path,item:u,view:t.view,"show-thumbnails":t.showThumbnails,"show-path":t.showPath,"is-selected":t.isSelected(u.path),"is-dragging":t.isDraggingItem(u.path),"row-index":t.rowIndex,"col-index":c,"explorer-id":t.explorerId},Sn(t.dragNDropEvents(u)),{onClick:l[0]||(l[0]=d=>r("click",d)),onDblclick:l[1]||(l[1]=d=>r("dblclick",d)),onContextmenu:l[2]||(l[2]=d=>r("contextmenu",d)),onDragstart:l[3]||(l[3]=d=>r("dragstart",d)),onDragend:l[4]||(l[4]=d=>r("dragend",d))}),{icon:we(d=>[Ue(s.$slots,"icon",Ye({ref_for:!0},d))]),_:3},16,["item","view","show-thumbnails","show-path","is-selected","is-dragging","row-index","col-index","explorer-id"]))),128))],6)],14,kj))}}),Ij={xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 20 20"};function Mj(t,e){return b(),x("svg",Ij,[...e[0]||(e[0]=[_("path",{"fill-rule":"evenodd",d:"M5.293 7.293a1 1 0 0 1 1.414 0L10 10.586l3.293-3.293a1 1 0 1 1 1.414 1.414l-4 4a1 1 0 0 1-1.414 0l-4-4a1 1 0 0 1 0-1.414","clip-rule":"evenodd"},null,-1)])])}const Fj={render:Mj},Dj={xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 20 20"};function Lj(t,e){return b(),x("svg",Dj,[...e[0]||(e[0]=[_("path",{"fill-rule":"evenodd",d:"M14.707 12.707a1 1 0 0 1-1.414 0L10 9.414l-3.293 3.293a1 1 0 0 1-1.414-1.414l4-4a1 1 0 0 1 1.414 0l4 4a1 1 0 0 1 0 1.414","clip-rule":"evenodd"},null,-1)])])}const jj={render:Lj},sl=Ee({__name:"SortIcon",props:{direction:{}},setup(t){return(e,n)=>(b(),x("div",null,[t.direction==="asc"?(b(),ne(g(Fj),{key:0,class:"vuefinder__explorer__sort-icon"})):ue("",!0),t.direction==="desc"?(b(),ne(g(jj),{key:1,class:"vuefinder__explorer__sort-icon"})):ue("",!0)]))}}),Vj={class:"vuefinder__explorer__header"},zj=Ee({__name:"ExplorerHeader",setup(t){const e=je(),n=e.fs,{t:r}=e.i18n,i=$e(n.sort);return(o,a)=>(b(),x("div",Vj,[_("div",{class:"vuefinder__explorer__sort-button vuefinder__explorer__sort-button--name vf-sort-button",onClick:a[0]||(a[0]=s=>g(n).toggleSort("basename"))},[Ge(D(g(r)("Name"))+" ",1),st(j(sl,{direction:g(i).order},null,8,["direction"]),[[En,g(i).active&&g(i).column==="basename"]])]),_("div",{class:"vuefinder__explorer__sort-button vuefinder__explorer__sort-button--size vf-sort-button",onClick:a[1]||(a[1]=s=>g(n).toggleSort("file_size"))},[Ge(D(g(r)("Size"))+" ",1),st(j(sl,{direction:g(i).order},null,8,["direction"]),[[En,g(i).active&&g(i).column==="file_size"]])]),_("div",{class:"vuefinder__explorer__sort-button vuefinder__explorer__sort-button--date vf-sort-button",onClick:a[2]||(a[2]=s=>g(n).toggleSort("last_modified"))},[Ge(D(g(r)("Date"))+" ",1),st(j(sl,{direction:g(i).order},null,8,["direction"]),[[En,g(i).active&&g(i).column==="last_modified"]])])]))}});function Nj(t,e){const{scrollContainer:n,itemWidth:r=100,rowHeight:i,overscan:o=2,containerPadding:a=48,lockItemsPerRow:s}=e,l=t,u=()=>typeof i=="number"?i:i.value,c=()=>r?typeof r=="number"?r:r.value:100,d=()=>a?typeof a=="number"?a:a.value:0,f=K(0),m=K(6),p=K(600);let h=null;const v=te(()=>Math.ceil(l.value.length/m.value)),C=te(()=>v.value*u()),S=te(()=>{const P=u(),z=Math.max(0,Math.floor(f.value/P)-o),F=Math.min(v.value,Math.ceil((f.value+p.value)/P)+o);return{start:z,end:F}}),w=te(()=>{const{start:P,end:z}=S.value;return Array.from({length:z-P},(F,Y)=>P+Y)}),y=()=>p.value,E=()=>typeof s=="object"?s.value:!1,T=()=>{if(E()){m.value=1;return}if(n.value){const P=d(),z=n.value.clientWidth-P,F=c();F>0&&(m.value=Math.max(Math.floor(z/F),2))}},A=P=>{const z=P.target;f.value=z.scrollTop};Ae(()=>l.value.length,()=>{T()}),r&&typeof r!="number"&&Ae(r,()=>{T()}),a&&typeof a!="number"&&Ae(a,()=>{T()}),i&&typeof i!="number"&&Ae(i,()=>{});const O=(P,z)=>{if(!P||!Array.isArray(P))return[];const F=z*m.value;return P.slice(F,F+m.value)},q=(P,z,F,Y,le)=>{if(!P||!Array.isArray(P))return[];const de=[];for(let Q=z;Q<=F;Q++)for(let M=Y;M<=le;M++){const k=Q*m.value+M;k<P.length&&P[k]&&de.push(P[k])}return de},I=P=>({row:Math.floor(P/m.value),col:P%m.value});return it(async()=>{await Xe(),n.value&&(p.value=n.value.clientHeight||600),T(),window.addEventListener("resize",()=>{n.value&&(p.value=n.value.clientHeight||600),T()}),n.value&&"ResizeObserver"in window&&(h=new ResizeObserver(P=>{const z=P[0];z&&(p.value=Math.round(z.contentRect.height)),T()}),h.observe(n.value))}),xt(()=>{window.removeEventListener("resize",T),h&&(h.disconnect(),h=null)}),{scrollTop:f,itemsPerRow:m,totalRows:v,totalHeight:C,visibleRange:S,visibleRows:w,updateItemsPerRow:T,handleScroll:A,getRowItems:O,getItemsInRange:q,getItemPosition:I,getContainerHeight:y}}function Uj(t){const{itemsPerRow:e,totalHeight:n,getItemsInRange:r,getKey:i,selectionObject:o,rowHeight:a,itemWidth:s,osInstance:l}=t,u=()=>typeof s=="number"?s:s.value,c=Math.floor(Math.random()*2**32).toString(),d=je(),f=d.fs,m=$e(f.selectedKeys),p=$e(f.sortedFiles),h=te(()=>{const M=new Map;return p.value&&p.value.forEach(k=>{M.set(i(k),k)}),M}),v=K(new Set),C=K(!1),S=K(!1),w=M=>M.map(k=>k.getAttribute("data-key")).filter(k=>!!k),y=M=>{M.selection.clearSelection(!0,!0)},E=M=>{if(m.value&&m.value.size>0){const k=document.querySelectorAll(`.file-item-${c}[data-key]`),X=new Map;k.forEach(re=>{const ve=re.getAttribute("data-key");ve&&X.set(ve,re)});const N=[];m.value.forEach(re=>{const ve=X.get(re);ve&&T(re)&&N.push(ve)}),N.forEach(re=>{M.selection.select(re,!0)})}},T=M=>{const k=h.value.get(M);if(!k)return!1;const X=d.selectionFilterType,N=d.selectionFilterMimeIncludes;return X==="files"&&k.type==="dir"||X==="dirs"&&k.type==="file"?!1:N&&Array.isArray(N)&&N.length>0?k.type==="dir"?!0:k.mime_type?N.some(re=>k.mime_type?.startsWith(re)):!1:!0},A=M=>{if(d.selectionMode==="single")return!1;C.value=!1,!M.event?.metaKey&&!M.event?.ctrlKey&&(S.value=!0),M.selection.resolveSelectables(),y(M),E(M)},O=K(0),q=({event:M,selection:k})=>{O.value=(o.value?.getAreaLocation().y1??0)-(d.root.getBoundingClientRect().top??0);const X=document.querySelector(".selection-area-container");if(X&&(X.dataset.theme=d.theme.current),d.selectionMode==="single")return;const N=M;N&&"type"in N&&N.type==="touchend"&&N.preventDefault();const re=M;!re?.ctrlKey&&!re?.metaKey&&(f.clearSelection(),k.clearSelection(!0,!0)),v.value.clear()},I=M=>{if(d.selectionMode==="single")return;const k=w(M.store.changed.added),X=w(M.store.changed.removed);S.value=!1,C.value=!0,k.forEach(N=>{m.value&&!m.value.has(N)&&T(N)&&(v.value.add(N),f.select(N,d.selectionMode||"multiple"))}),X.forEach(N=>{document.querySelector(`[data-key="${N}"]`)&&h.value.has(N)&&v.value.delete(N),f.deselect(N)}),M.selection.resolveSelectables(),E(M)},P=()=>{v.value.clear()},z=M=>{if(!M.event)return;const k=document.querySelector(".scroller-"+c);if(!k)return;const X=k.getBoundingClientRect(),N=X.left,re=X.top;let ve=k.scrollTop;if(l?.value){const{viewport:gt}=l.value.elements();gt&&(ve=gt.scrollTop)}const oe=o.value?.getAreaLocation();if(!oe)return;const ge=Math.min(oe.x1,oe.x2),_e=ve+Math.min(oe.y1,oe.y2),R=Math.max(oe.x1,oe.x2),me=ve+Math.max(oe.y1,oe.y2),L=4,$=u();let U=Math.floor((ge-N-L)/$),W=Math.floor((R-N-L)/$);const V=ge-N-L-U*$,H=R-N-L-W*$;V>$-L&&(U=U+1),H<L&&(W=W-1);const ie=Math.max(0,U),fe=Math.min(e.value-1,W);let Oe=Math.floor((_e-re-L)/a.value),Ce=Math.floor((me-re-L)/a.value);const Ne=_e-re-L-Oe*a.value,Re=me-re-L-Ce*a.value,Ve=Math.floor((n.value-L)/a.value);Ne>a.value-L&&(Oe=Oe+1),Re<L&&(Ce=Ce-1);const ct=Math.max(0,Oe),Ze=Math.min(Ce,Ve),et=r(p.value,ct,Ze,ie,fe),He=document.querySelectorAll(`.file-item-${c}[data-key]`),pt=new Map;He.forEach(gt=>{const jt=gt.getAttribute("data-key");jt&&pt.set(jt,gt)});const ot=[];if(et.forEach(gt=>{const jt=i(gt);pt.get(jt)||ot.push(jt)}),ot.length>0){const gt=d.selectionMode||"multiple";f.selectMultiple(ot,gt)}},F=M=>{z(M),y(M),E(M),f.setSelectedCount(m.value?.size||0),C.value=!1},Y=()=>{let M=[".scroller-"+c];if(l?.value){const{viewport:k}=l.value.elements();k&&(M=k)}o.value=new uI({selectables:[".file-item-"+c+":not(.vf-explorer-item--unselectable)"],boundaries:M,selectionContainerClass:"selection-area-container",behaviour:{overlap:"invert",intersect:"touch",startThreshold:0,triggers:[0],scrolling:{speedDivider:10,manualSpeed:750,startScrollMargins:{x:0,y:10}}},features:{touch:!0,range:!0,deselectOnBlur:!0,singleTap:{allow:!1,intersect:"native"}}}),o.value.on("beforestart",A),o.value.on("start",q),o.value.on("move",I),o.value.on("stop",F)},le=()=>{o.value&&(o.value.destroy(),o.value=null)},de=()=>{o.value&&(Array.from(m.value??new Set).forEach(M=>{T(M)||f.deselect(M)}),le(),Y())},Q=M=>{S.value&&(o.value?.clearSelection(),P(),S.value=!1);const k=M;!v.value.size&&!S.value&&!k?.ctrlKey&&!k?.metaKey&&(f.clearSelection(),o.value?.clearSelection())};return it(()=>{const M=k=>{!k.buttons&&C.value&&(C.value=!1)};document.addEventListener("dragleave",M),xt(()=>{document.removeEventListener("dragleave",M)})}),{explorerId:c,isDragging:C,initializeSelectionArea:Y,updateSelectionArea:de,handleContentClick:Q}}function Bj(t){const e=n=>{if(!n)return{typeAllowed:!1,mimeAllowed:!1};const r=t.selectionFilterType,i=t.selectionFilterMimeIncludes,o=!r||r==="both"||r==="files"&&n.type==="file"||r==="dirs"&&n.type==="dir";let a=!0;return i&&Array.isArray(i)&&i.length>0&&(n.type==="dir"?a=!0:n.mime_type?a=i.some(s=>n.mime_type.startsWith(s)):a=!1),{typeAllowed:o,mimeAllowed:a}};return{isItemSelectable:e,canSelectItem:n=>{const{typeAllowed:r,mimeAllowed:i}=e(n);return r&&i}}}function Hj(t){const e=n=>({item:n,defaultPrevented:!1,preventDefault(){this.defaultPrevented=!0}});return{createCancelableEvent:e,openItem:(n,r,i)=>{const o=e(n);if(n.type==="file"&&r){if(t.emitter.emit("vf-file-dclick",o),o.defaultPrevented)return}else if(n.type==="dir"&&i&&(t.emitter.emit("vf-folder-dclick",o),o.defaultPrevented))return;const a=t.contextMenuItems?.find(s=>s.show(t,{items:[n],target:n,searchQuery:""}));a&&a.action(t,[n])}}}function qj(t,e,n,r,i,o,a){const s=t.fs,{canSelectItem:l}=Bj(t),{openItem:u}=Hj(t),c=f=>{const m=f.target?.closest(".file-item-"+e);if(!m)return null;const p=String(m.getAttribute("data-key")),h=n.value?.find(v=>v.path===p);return{key:p,item:h}},d=()=>{const f=r.value;return n.value?.filter(m=>f?.has(m.path))||[]};return{handleItemClick:f=>{const m=c(f);if(!m)return;const{key:p,item:h}=m,v=f;if(!l(h))return;const C=t.selectionMode||"multiple";!v?.ctrlKey&&!v?.metaKey&&(f.type!=="touchstart"||!s.isSelected(p))&&(s.clearSelection(),i.value?.clearSelection(!0,!0)),i.value?.resolveSelectables(),f.type==="touchstart"&&s.isSelected(p)?s.select(p,C):s.toggleSelect(p,C),s.setSelectedCount(r.value?.size||0)},handleItemDblClick:f=>{const m=c(f);if(!m)return;const{item:p}=m;l(p)&&p&&u(p,o,a)},handleItemContextMenu:f=>{f.preventDefault(),f.stopPropagation();const m=c(f);if(!m)return;const{key:p,item:h}=m;l(h)&&(r.value?.has(p)||(s.clearSelection(),s.select(p)),t.emitter.emit("vf-contextmenu-show",{event:f,items:d(),target:h}))},handleContentContextMenu:f=>{f.preventDefault(),t.emitter.emit("vf-contextmenu-show",{event:f,items:d()})},getSelectedItems:d}}function Wj(t,e){const n=K(null);return it(()=>{if(hn.plugin([Ik]),t.value){const r=hn(t.value,{scrollbars:{theme:"vf-scrollbars-theme"}},{initialized:i=>{n.value=i;const{viewport:o}=i.elements();o&&o.addEventListener("scroll",e)},updated:i=>{const{viewport:o}=i.elements()}});n.value=r}}),xt(()=>{if(n.value){const{viewport:r}=n.value.elements();r&&r.removeEventListener("scroll",e),n.value.destroy(),n.value=null}}),{osInstance:n}}function Kj(t,e){const n=K(null);return it(()=>{t.value&&(n.value=new Wr({elements_selector:".lazy",container:t.value})),e?.emitter&&e.emitter.on("vf-refresh-thumbnails",()=>{n.value&&n.value.update()})}),Jp(()=>{n.value&&n.value.update()}),xt(()=>{n.value&&(n.value.destroy(),n.value=null)}),{vfLazyLoad:n}}const Yj={class:"vuefinder__explorer__container"},Gj={key:0,class:"vuefinder__linear-loader"},Qj=Ee({__name:"Explorer",props:{onFileDclick:{type:Function},onFolderDclick:{type:Function}},setup(t){const e=t,n=je(),r=fo(n,["vuefinder__drag-over"]),i=Mn("dragImage"),o=Qi(null),a=Mn("scrollContainer"),s=Mn("scrollContent"),l=n.fs,u=n.config,c=$e(u.state),d=$e(l.sortedFiles),f=$e(l.selectedKeys),m=$e(l.loading),p=$=>f.value?.has($)??!1,h=te(()=>{if(c.value?.view==="grid"){const W=c.value?.gridItemHeight??80,V=c.value?.gridItemGap??8;return W+V*2}const $=c.value?.listItemHeight??32,U=c.value?.listItemGap??2;return $+U*2}),v=te(()=>{if(c.value?.view==="grid"){const $=c.value?.gridItemWidth??96,U=c.value?.gridItemGap??8;return $+U*2}return 104}),C=te(()=>c.value?.view==="grid"?(c.value?.gridItemGap??8)*2:0),{t:S}=n.i18n,{itemsPerRow:w,totalHeight:y,visibleRows:E,handleScroll:T,getRowItems:A,getItemsInRange:O,updateItemsPerRow:q}=Nj(te(()=>d.value??[]),{scrollContainer:a,itemWidth:v,rowHeight:h,overscan:2,containerPadding:C,lockItemsPerRow:te(()=>c.value.view==="list")}),{osInstance:I}=Wj(a,T),{explorerId:P,isDragging:z,initializeSelectionArea:F,updateSelectionArea:Y,handleContentClick:le}=Uj({itemsPerRow:w,totalHeight:y,getItemsInRange:O,getKey:$=>$.path,selectionObject:o,rowHeight:h,itemWidth:v,osInstance:I}),de=K(null),Q=$=>{if(!$||!de.value)return!1;const U=f.value?.has(de.value)??!1;return z.value&&(U?f.value?.has($)??!1:$===de.value)};Ae(()=>u.get("view"),$=>{$==="list"?w.value=1:q()},{immediate:!0}),Ae(w,$=>{u.get("view")==="list"&&$!==1&&(w.value=1)});const M=$=>d.value?.[$];Kj(a,n);const{handleItemClick:k,handleItemDblClick:X,handleItemContextMenu:N,handleContentContextMenu:re}=qj(n,P,d,f,o,e.onFileDclick,e.onFolderDclick);it(()=>{const $=()=>{o.value||F(),o.value&&o.value.on("beforestart",({event:U})=>{const W=U?.target===s.value;if(!U?.metaKey&&!U?.ctrlKey&&!U?.altKey&&!W)return!1})};if(I.value)$();else{const U=setInterval(()=>{I.value&&(clearInterval(U),$())},50);setTimeout(()=>{clearInterval(U),o.value||$()},500)}Ae(()=>[n.selectionFilterType,n.selectionFilterMimeIncludes],Y,{deep:!0})});const ve=$=>{if(!(n.features?.move??!1)||$.altKey||$.ctrlKey||$.metaKey)return $.preventDefault(),!1;z.value=!0;const U=$.target?.closest(".file-item-"+P);if(de.value=U?String(U.dataset.key):null,$.dataTransfer&&de.value){$.dataTransfer.setDragImage(i.value,0,15),$.dataTransfer.effectAllowed="all",$.dataTransfer.dropEffect="copy";const W=f.value?.has(de.value)?Array.from(f.value):[de.value];$.dataTransfer.setData("items",JSON.stringify(W)),l.setDraggedItem(de.value)}},oe=()=>{de.value=null};let ge=null,_e=null;const R=$=>{$.target?.closest(".file-item-"+P)||(_e=$,ge&&clearTimeout(ge),ge=setTimeout(()=>{_e&&(_e.cancelable&&_e.preventDefault(),_e.stopPropagation(),re(_e)),_e=null,ge=null},500))},me=$=>{ge&&(clearTimeout(ge),ge=null),_e=null},L=$=>{if(!_e)return;const U=_e.touches[0]||_e.changedTouches[0],W=$.touches[0]||$.changedTouches[0];if(U&&W){const V=Math.abs(W.clientX-U.clientX),H=Math.abs(W.clientY-U.clientY);(V>15||H>15)&&(ge&&(clearTimeout(ge),ge=null),_e=null)}};return($,U)=>(b(),x("div",Yj,[g(c).view==="list"?(b(),ne(zj,{key:0})):ue("",!0),_("div",{ref_key:"scrollContainer",ref:a,class:Pe(["vuefinder__explorer__selector-area","scroller-"+g(P)])},[g(u).get("loadingIndicator")==="linear"&&g(m)?(b(),x("div",Gj)):ue("",!0),_("div",{ref_key:"scrollContent",ref:s,class:"scrollContent vuefinder__explorer__scroll-content",style:kt({height:`${g(y)}px`,position:"relative",width:"100%"}),onContextmenu:U[0]||(U[0]=Qe((...W)=>g(re)&&g(re)(...W),["self","prevent"])),onClick:U[1]||(U[1]=Qe((...W)=>g(le)&&g(le)(...W),["self"])),onTouchstartCapture:Qe(R,["self"]),onTouchendCapture:Qe(me,["self"]),onTouchmoveCapture:Qe(L,["self"]),onTouchcancelCapture:Qe(me,["self"])},[_("div",{ref_key:"dragImage",ref:i,class:"vuefinder__explorer__drag-item"},[j(hj,{count:de.value&&g(f).has(de.value)?g(f).size:1},null,8,["count"])],512),g(c).view==="grid"?(b(!0),x(Ie,{key:0},qe(g(E),W=>(b(),ne(Yp,{key:W,"row-index":W,"row-height":h.value,view:"grid","items-per-row":g(w),items:g(A)(g(d),W),"show-thumbnails":g(c).showThumbnails,"is-dragging-item":Q,"is-selected":p,"drag-n-drop-events":V=>g(r).events(V),"explorer-id":g(P),onClick:g(k),onDblclick:g(X),onContextmenu:g(N),onDragstart:ve,onDragend:oe},{icon:we(V=>[Ue($.$slots,"icon",Ye({ref_for:!0},V))]),_:3},8,["row-index","row-height","items-per-row","items","show-thumbnails","drag-n-drop-events","explorer-id","onClick","onDblclick","onContextmenu"]))),128)):(b(!0),x(Ie,{key:1},qe(g(E),W=>(b(),ne(Yp,{key:W,"row-index":W,"row-height":h.value,view:"list",items:M(W)?[M(W)]:[],"is-dragging-item":Q,"is-selected":p,"drag-n-drop-events":V=>g(r).events(V),"explorer-id":g(P),onClick:g(k),onDblclick:g(X),onContextmenu:g(N),onDragstart:ve,onDragend:oe},{icon:we(V=>[Ue($.$slots,"icon",Ye({ref_for:!0},V))]),_:3},8,["row-index","row-height","items","drag-n-drop-events","explorer-id","onClick","onDblclick","onContextmenu"]))),128))],36)],2)]))}}),Xj=["href","download"],Jj=["onClick"],Zj=Ee({__name:"ContextMenu",setup(t){const e=je(),n=K(null),r=K([]);let i=null,o=null,a=null,s=[],l=null;const u=Lt({active:!1,items:[],positions:{}});e.emitter.on("vf-context-selected",m=>{r.value=m});const c=m=>m.link(e,r.value),d=m=>{e.emitter.emit("vf-contextmenu-hide"),m.action(e,r.value)};e.emitter.on("vf-contextmenu-show",m=>{const{event:p,items:h,target:v=null}=m||{};u.items=(e.contextMenuItems||[]).filter(C=>C.show(e,{items:h,target:v})).sort((C,S)=>{const w=C.order??1/0,y=S.order??1/0;return w-y}),v?h.length>1&&h.some(C=>C.path===v.path)?e.emitter.emit("vf-context-selected",h):e.emitter.emit("vf-context-selected",[v]):e.emitter.emit("vf-context-selected",[]),f(p)}),e.emitter.on("vf-contextmenu-hide",()=>{u.active=!1,i&&(i(),i=null),a&&(s.forEach(m=>{m===window?window.removeEventListener("scroll",a,!0):m.removeEventListener("scroll",a,!0)}),a=null,s=[]),l&&(document.removeEventListener("mousedown",l,!0),document.removeEventListener("touchstart",l,!0),l=null),o=null,u.positions={}});const f=async m=>{i&&(i(),i=null);const p=(y=>{if("clientX"in y&&"clientY"in y)return{x:y.clientX,y:y.clientY};const E="touches"in y&&y.touches[0]||"changedTouches"in y&&y.changedTouches[0];return E?{x:E.clientX,y:E.clientY}:{x:0,y:0}})(m);if(o={getBoundingClientRect:()=>({width:0,height:0,x:p.x,y:p.y,top:p.y,left:p.x,right:p.x,bottom:p.y})},u.positions={position:"fixed",zIndex:"10001",opacity:"0",visibility:"hidden",left:"-9999px",top:"-9999px"},u.active=!0,await Xe(),!n.value||!o)return;await new Promise(y=>{requestAnimationFrame(()=>{requestAnimationFrame(y)})});const h=[Ii(8),Mi({padding:16,fallbackPlacements:["left-start","right-end","left-end","top-start","bottom-start"]}),Fi({padding:16})];let v=0,C=0;try{const y=await ei(o,n.value,{placement:"right-start",strategy:"fixed",middleware:h});v=y.x,C=y.y}catch(y){console.warn("[ContextMenu] Floating UI initial positioning error:",y);return}u.positions={position:"fixed",zIndex:"10001",left:`${v}px`,top:`${C}px`,opacity:"0",visibility:"visible",transform:"translateY(-8px)",transition:"opacity 150ms ease-out, transform 150ms ease-out"},requestAnimationFrame(()=>{n.value&&(u.positions={...u.positions,opacity:"1",transform:"translateY(0)"})});const S=(y=>{const E=[];let T=y;for(;T&&T!==document.body&&T!==document.documentElement;){const A=window.getComputedStyle(T),O=A.overflow+A.overflowX+A.overflowY;(O.includes("scroll")||O.includes("auto"))&&E.push(T),T=T.parentElement}return E})(n.value);s=[window,...S],a=()=>{u.active&&e.emitter.emit("vf-contextmenu-hide")};const w=a;w&&s.forEach(y=>{y===window?window.addEventListener("scroll",w,!0):y.addEventListener("scroll",w,!0)}),l=y=>{if(!u.active)return;const E=y.target;if(!E||n.value&&n.value.contains(E))return;const T=e.root;T&&T.contains(E)||e.emitter.emit("vf-contextmenu-hide")},setTimeout(()=>{l&&(document.addEventListener("mousedown",l,!0),document.addEventListener("touchstart",l,!0))},100),setTimeout(()=>{if(!(!n.value||!o))try{i=yc(o,n.value,async()=>{if(!(!o||!n.value))try{const{x:y,y:E}=await ei(o,n.value,{placement:"right-start",strategy:"fixed",middleware:h});u.positions={...u.positions,left:`${y}px`,top:`${E}px`}}catch(y){console.warn("Floating UI positioning error:",y)}})}catch(y){console.warn("Floating UI autoUpdate setup error:",y),i=null}},200)};return xt(()=>{i&&(i(),i=null),a&&(s.forEach(m=>{m===window?window.removeEventListener("scroll",a,!0):m.removeEventListener("scroll",a,!0)}),a=null,s=[]),l&&(document.removeEventListener("mousedown",l,!0),document.removeEventListener("touchstart",l,!0),l=null),o=null}),(m,p)=>st((b(),x("ul",{ref_key:"contextmenu",ref:n,class:Pe([{"vuefinder__context-menu--active":u.active,"vuefinder__context-menu--inactive":!u.active},"vuefinder__context-menu"]),style:kt(u.positions)},[(b(!0),x(Ie,null,qe(u.items,h=>(b(),x("li",{key:h.title,class:"vuefinder__context-menu__item"},[h.link?(b(),x("a",{key:0,class:"vuefinder__context-menu__link",target:"_blank",href:c(h),download:c(h),onClick:p[0]||(p[0]=v=>g(e).emitter.emit("vf-contextmenu-hide"))},[_("span",null,D(h.title(g(e).i18n)),1)],8,Xj)):(b(),x("div",{key:1,class:"vuefinder__context-menu__action",onClick:v=>d(h)},[_("span",null,D(h.title(g(e).i18n)),1)],8,Jj))]))),128))],6)),[[En,u.active]])}}),eV={class:"vuefinder__status-bar__wrapper"},tV={class:"vuefinder__status-bar__storage"},nV=["title"],rV={class:"vuefinder__status-bar__storage-icon"},iV=["value"],oV=["value"],aV={class:"vuefinder__status-bar__info space-x-2"},sV={key:0},lV={key:1},cV={key:0,class:"vuefinder__status-bar__size"},uV={class:"vuefinder__status-bar__actions"},dV=Ee({__name:"Statusbar",setup(t){const e=je(),{t:n}=e.i18n,r=e.fs,i=$e(r.sortedFiles),o=$e(r.path),a=$e(r.selectedCount),s=$e(r.storages),l=$e(r.selectedItems),u=$e(r.path),c=v=>{const C=v.target.value;e.adapter.open(C+"://")},d=te(()=>!l.value||l.value.length===0?0:l.value.reduce((v,C)=>v+(C.file_size||0),0)),f=te(()=>s.value),m=te(()=>i.value),p=te(()=>a.value||0),h=te(()=>l.value||[]);return(v,C)=>(b(),x("div",eV,[_("div",tV,[_("div",{class:"vuefinder__status-bar__storage-container",title:g(n)("Storage")},[_("div",rV,[j(g(Au))]),_("select",{name:"vuefinder-media-selector",value:g(o).storage,class:"vuefinder__status-bar__storage-select",tabindex:"-1",onChange:c},[(b(!0),x(Ie,null,qe(f.value,S=>(b(),x("option",{key:S,value:S},D(S),9,oV))),128))],40,iV),C[0]||(C[0]=_("span",{class:"vuefinder__status-bar__storage-caret","aria-hidden":"true"},null,-1))],8,nV),_("div",aV,[p.value===0?(b(),x("span",sV,D(m.value.length)+" "+D(g(n)("items")),1)):(b(),x("span",lV,[Ge(D(p.value)+" "+D(g(n)("selected"))+" ",1),d.value?(b(),x("span",cV,D(g(e).filesize(d.value)),1)):ue("",!0)]))])]),_("div",uV,[Ue(v.$slots,"actions",{path:g(u).path,count:p.value||0,selected:h.value})])]))}}),fV={xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",class:"h-5 w-5",viewBox:"0 0 24 24"};function pV(t,e){return b(),x("svg",fV,[...e[0]||(e[0]=[_("path",{fill:"none",d:"M0 0h24v24H0z"},null,-1),_("path",{d:"M12 2c5.523 0 10 4.477 10 10s-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2m3.6 5.2a1 1 0 0 0-1.4.2L12 10.333 9.8 7.4a1 1 0 1 0-1.6 1.2l2.55 3.4-2.55 3.4a1 1 0 1 0 1.6 1.2l2.2-2.933 2.2 2.933a1 1 0 0 0 1.6-1.2L13.25 12l2.55-3.4a1 1 0 0 0-.2-1.4"},null,-1)])])}const hV={render:pV};function w_(t,e){const n=t.findIndex(r=>r.path===e.path);n>-1?t[n]=e:t.push(e)}const mV={class:"vuefinder__folder-loader-indicator"},vV={key:1,class:"vuefinder__folder-loader-indicator--icon"},S_=Ee({__name:"FolderLoaderIndicator",props:Xp({storage:{},path:{}},{modelValue:{type:Boolean},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const e=t,n=je(),r=hc(t,"modelValue"),i=K(!1);Ae(()=>r.value,()=>o());const o=async()=>{i.value=!0;try{const a=(await n.adapter.list(e.path)).files.filter(s=>s.type==="dir");w_(n.treeViewData,{path:e.path,type:"dir",folders:a})}catch(a){Xt(a,"Failed to fetch subfolders")}finally{i.value=!1}};return(a,s)=>(b(),x("div",mV,[i.value?(b(),ne(g(ls),{key:0,class:"vuefinder__folder-loader-indicator--loading"})):(b(),x("div",vV,[r.value?(b(),ne(g(ss),{key:0,class:"vuefinder__folder-loader-indicator--minus"})):ue("",!0),r.value?ue("",!0):(b(),ne(g(as),{key:1,class:"vuefinder__folder-loader-indicator--plus"}))]))]))}}),gV={key:0},_V={class:"vuefinder__treesubfolderlist__no-folders"},yV={class:"vuefinder__treesubfolderlist__item-content"},bV=["onClick"],wV=["title","onDblclick","onClick"],SV={class:"vuefinder__treesubfolderlist__item-icon"},CV={class:"vuefinder__treesubfolderlist__subfolder"},EV={key:1,class:"vuefinder__treesubfolderlist__more-note"},TV=Ee({__name:"TreeSubfolderList",props:{storage:{},path:{}},setup(t){const e=je(),n=e.fs,r=fo(e,["vuefinder__drag-over"]),i=K({}),o=e.config,a=$e(o.state),{t:s}=e.i18n,l=$e(n.path),u=t,c=K(null),d=K(50);it(()=>{u.path===u.storage+"://"&&c.value&&hn(c.value,{scrollbars:{theme:"vf-scrollbars-theme"}})});const f=te(()=>{const S=e.treeViewData.find(w=>w.path===u.path)?.folders||[];return S.length>d.value?S.slice(0,d.value):S}),m=te(()=>e.treeViewData.find(S=>S.path===u.path)?.folders?.length||0),p=te(()=>m.value>d.value),h=te(()=>`${u.storage}://`),v=(S,w)=>S===w||S.startsWith(`${w}/`);Ae(f,S=>{const w=a.value.expandTreeByDefault&&u.path===h.value,y=a.value.expandedTreePaths||[];S.forEach(E=>{const T=y.some(A=>v(A,E.path));(w||T)&&i.value[E.path]===void 0&&(i.value[E.path]=!0)})},{immediate:!0});const C=()=>{d.value+=50};return(S,w)=>{const y=ze("TreeSubfolderList",!0);return b(),x("ul",{ref_key:"parentSubfolderList",ref:c,class:"vuefinder__treesubfolderlist__container"},[f.value.length?ue("",!0):(b(),x("li",gV,[_("div",_V,D(g(s)("No folders")),1)])),(b(!0),x(Ie,null,qe(f.value,E=>(b(),x("li",{key:E.path,class:"vuefinder__treesubfolderlist__item"},[_("div",yV,[_("div",{class:"vuefinder__treesubfolderlist__item-toggle",onClick:T=>i.value[E.path]=!i.value[E.path]},[j(S_,{modelValue:i.value[E.path],"onUpdate:modelValue":T=>i.value[E.path]=T,storage:t.storage,path:E.path},null,8,["modelValue","onUpdate:modelValue","storage","path"])],8,bV),_("div",Ye({class:"vuefinder__treesubfolderlist__item-link",title:E.path},Sn(g(r).events({...E,dir:E.path,extension:"",file_size:null,last_modified:null,mime_type:null,visibility:"public"}),!0),{onDblclick:T=>i.value[E.path]=!i.value[E.path],onClick:T=>g(e).adapter.open(E.path)}),[_("div",SV,[g(l)?.path===E.path?(b(),ne(g($u),{key:0,class:"vuefinder__item-icon__folder--open"})):(b(),ne(g(zn),{key:1,class:"vuefinder__item-icon__folder"}))]),_("div",{class:Pe(["vuefinder__treesubfolderlist__item-text",{"vuefinder__treesubfolderlist__item-text--active":g(l).path===E.path}])},D(E.basename),3)],16,wV)]),_("div",CV,[st(j(y,{storage:u.storage,path:E.path},null,8,["storage","path"]),[[En,i.value[E.path]]])])]))),128)),p.value?(b(),x("li",EV,[_("div",{class:"vuefinder__treesubfolderlist__load-more",onClick:C},D(g(s)("load more")),1)])):ue("",!0)],512)}}}),xV=Ee({__name:"TreeStorageItem",props:{storage:{}},setup(t){const e=je(),n=e.fs,r=e.config,i=t,o=$e(r.state),a=te(()=>{const m=o.value.expandedTreePaths||[],p=`${i.storage}://`;return m.some(h=>h===p||h.startsWith(`${p}`))}),s=K(o.value.expandTreeByDefault||a.value),l=fo(e,["vuefinder__drag-over"]),u=$e(n.path),c=te(()=>i.storage===u.value?.storage);Ae(()=>({expandTreeByDefault:o.value.expandTreeByDefault,hasExpandedPathInStorage:a.value}),m=>{(m.expandTreeByDefault||m.hasExpandedPathInStorage)&&(s.value=!0)});const d={storage:i.storage,path:i.storage+"://",dir:i.storage+"://",type:"dir",basename:i.storage,extension:"",file_size:null,last_modified:null,mime_type:null,visibility:"public"};function f(m){m===u.value?.storage?s.value=!s.value:e.adapter.open(m+"://")}return(m,p)=>(b(),x(Ie,null,[_("div",{class:"vuefinder__treestorageitem__header",onClick:p[2]||(p[2]=h=>f(t.storage))},[_("div",Ye({class:["vuefinder__treestorageitem__info",c.value?"vuefinder__treestorageitem__info--active":""]},Sn(g(l).events(d),!0)),[_("div",{class:Pe(["vuefinder__treestorageitem__icon",c.value?"vuefinder__treestorageitem__icon--active":""])},[j(g(Au))],2),_("div",null,D(t.storage),1)],16),_("div",{class:"vuefinder__treestorageitem__loader",onClick:p[1]||(p[1]=Qe(h=>s.value=!s.value,["stop"]))},[j(S_,{modelValue:s.value,"onUpdate:modelValue":p[0]||(p[0]=h=>s.value=h),storage:t.storage,path:t.storage+"://"},null,8,["modelValue","storage","path"])])]),st(j(TV,{storage:t.storage,path:t.storage+"://",class:"vuefinder__treestorageitem__subfolder"},null,8,["storage","path"]),[[En,s.value]])],64))}}),OV={class:"vuefinder__folder-indicator"},AV={class:"vuefinder__folder-indicator--icon"},$V=Ee({__name:"FolderIndicator",props:{modelValue:{type:Boolean},modelModifiers:{}},emits:["update:modelValue"],setup(t){const e=hc(t,"modelValue");return(n,r)=>(b(),x("div",OV,[_("div",AV,[e.value?(b(),ne(g(ss),{key:0,class:"vuefinder__folder-indicator--minus"})):ue("",!0),e.value?ue("",!0):(b(),ne(g(as),{key:1,class:"vuefinder__folder-indicator--plus"}))])]))}}),RV={key:0,class:"vuefinder__treeview__header"},PV={class:"vuefinder__treeview__pinned-label"},kV={class:"vuefinder__treeview__pin-text text-nowrap"},IV={key:0,class:"vuefinder__treeview__pinned-list"},MV=["onClick"],FV=["title"],DV=["onClick"],LV={key:0},jV={class:"vuefinder__treeview__no-pinned"},VV=Ee({__name:"TreeView",setup(t){const e=je(),{enabled:n}=An(),{t:r}=e.i18n,{getStore:i,setStore:o}=e.storage,a=e.fs,s=e.config,l=$e(s.state),u=$e(a.sortedFiles),c=$e(a.storages),d=te(()=>c.value||[]),f=$e(a.path),m=fo(e,["vuefinder__drag-over"]),p=K(190),h=K(i("pinned-folders-opened",!0));Ae(h,w=>o("pinned-folders-opened",w));const v=w=>{const y=s.get("pinnedFolders");s.set("pinnedFolders",y.filter(E=>E.path!==w.path))},C=w=>{const y=w.clientX,E=w.target.parentElement;if(!E)return;const T=E.getBoundingClientRect().width;E.classList.remove("transition-[width]"),E.classList.add("transition-none");const A=q=>{p.value=T+q.clientX-y,p.value<50&&(p.value=0,s.set("showTreeView",!1)),p.value>50&&s.set("showTreeView",!0)},O=()=>{const q=E.getBoundingClientRect();p.value=q.width,E.classList.add("transition-[width]"),E.classList.remove("transition-none"),window.removeEventListener("mousemove",A),window.removeEventListener("mouseup",O)};window.addEventListener("mousemove",A),window.addEventListener("mouseup",O)},S=K(null);return it(()=>{S.value&&hn(S.value,{overflow:{x:"hidden"},scrollbars:{theme:"vf-scrollbars-theme"}})}),Ae(u,w=>{const y=w.filter(E=>E.type==="dir");w_(e.treeViewData,{path:f.value.path||"",folders:y.map(E=>({storage:E.storage,path:E.path,basename:E.basename,type:"dir"}))})}),(w,y)=>(b(),x(Ie,null,[_("div",{class:Pe(["vuefinder__treeview__overlay",g(l).showTreeView?"vuefinder__treeview__backdrop":"hidden"]),onClick:y[0]||(y[0]=E=>g(s).toggle("showTreeView"))},null,2),_("div",{style:kt(g(l).showTreeView?"min-width:100px;max-width:75%; width: "+p.value+"px":"width: 0"),class:"vuefinder__treeview__container"},[_("div",{ref_key:"treeViewScrollElement",ref:S,class:"vuefinder__treeview__scroll"},[g(n)("pinned")?(b(),x("div",RV,[_("div",{class:"vuefinder__treeview__pinned-toggle",onClick:y[2]||(y[2]=E=>h.value=!h.value)},[_("div",PV,[j(g(Ou),{class:"vuefinder__treeview__pin-icon"}),_("div",kV,D(g(r)("Pinned Folders")),1)]),j($V,{modelValue:h.value,"onUpdate:modelValue":y[1]||(y[1]=E=>h.value=E)},null,8,["modelValue"])]),h.value?(b(),x("ul",IV,[(b(!0),x(Ie,null,qe(g(l).pinnedFolders,E=>(b(),x("li",{key:E.path,class:"vuefinder__treeview__pinned-item"},[_("div",Ye({class:"vuefinder__treeview__pinned-folder"},Sn(g(m).events(E),!0),{onClick:T=>g(e).adapter.open(E.path)}),[g(f).path!==E.path?(b(),ne(g(zn),{key:0,class:"vuefinder__treeview__folder-icon vuefinder__item-icon__folder"})):ue("",!0),g(f).path===E.path?(b(),ne(g($u),{key:1,class:"vuefinder__item-icon__folder--open vuefinder__treeview__open-folder-icon"})):ue("",!0),_("div",{title:E.path,class:Pe(["vuefinder__treeview__folder-name",{"vuefinder__treeview__folder-name--active":g(f).path===E.path}])},D(E.basename),11,FV)],16,MV),_("div",{class:"vuefinder__treeview__remove-folder",onClick:T=>v(E)},[j(g(hV),{class:"vuefinder__treeview__remove-icon"})],8,DV)]))),128)),g(l).pinnedFolders.length?ue("",!0):(b(),x("li",LV,[_("div",jV,D(g(r)("No folders pinned")),1)]))])):ue("",!0)])):ue("",!0),(b(!0),x(Ie,null,qe(d.value,E=>(b(),x("div",{key:E,class:"vuefinder__treeview__storage"},[j(xV,{storage:E},null,8,["storage"])]))),128))],512),_("div",{class:"vuefinder__treeview__resize-handle",onMousedown:C},null,32)],4)],64))}}),Ot={new_folder:"new_folder",selectAll:"selectAll",pinFolder:"pinFolder",unpinFolder:"unpinFolder",delete:"delete",refresh:"refresh",preview:"preview",open:"open",openDir:"openDir",download:"download",archive:"archive",unarchive:"unarchive",rename:"rename",move:"move",copy:"copy",paste:"paste"};function zV(t){return t.items.length>1&&t.items.some(e=>e.path===t.target?.path)?"many":t.target?"one":"none"}function _t(t){const e=Object.assign({needsSearchQuery:!1},t);return(n,r)=>!(e.needsSearchQuery!==!!r.searchQuery||e.target!==void 0&&e.target!==zV(r)||e.targetType!==void 0&&e.targetType!==r.target?.type||e.mimeType!==void 0&&e.mimeType!==r.target?.mime_type||e.feature!==void 0&&!(n.features[e.feature]??!1))}function Ei(...t){return(e,n)=>t.some(r=>r(e,n))}function Ti(...t){return(e,n)=>t.every(r=>r(e,n))}const C_=[{id:Ot.openDir,title:({t})=>t("Open containing folder"),action:(t,e)=>{const n=e[0];n&&t.adapter.open(n.dir)},show:_t({target:"one",needsSearchQuery:!0}),order:10},{id:Ot.refresh,title:({t})=>t("Refresh"),action:t=>{const e=t.fs;t.adapter.invalidateListQuery(e.path.get().path),t.adapter.open(e.path.get().path)},show:Ei(_t({target:"none"}),_t({target:"many"})),order:20},{id:Ot.selectAll,title:({t})=>t("Select All"),action:t=>{t.fs.selectAll(t.selectionMode||"multiple")},show:(t,e)=>t.selectionMode==="multiple"&&_t({target:"none"})(t,e),order:30},{id:Ot.new_folder,title:({t})=>t("New Folder"),action:t=>t.modal.open(Mu),show:_t({target:"none",feature:"newfolder"}),order:40},{id:Ot.open,title:({t})=>t("Open"),action:(t,e)=>{e[0]&&t.adapter.open(e[0].path)},show:_t({target:"one",targetType:"dir"}),order:50},{id:Ot.pinFolder,title:({t})=>t("Pin Folder"),action:(t,e)=>{const n=t.config,r=n.get("pinnedFolders"),i=r.concat(e.filter(o=>r.findIndex(a=>a.path===o.path)===-1));n.set("pinnedFolders",i)},show:Ti(_t({target:"one",targetType:"dir",feature:"pinned"}),(t,e)=>t.config.get("pinnedFolders").findIndex(n=>n.path===e.target?.path)===-1),order:60},{id:Ot.unpinFolder,title:({t})=>t("Unpin Folder"),action:(t,e)=>{const n=t.config,r=n.get("pinnedFolders");n.set("pinnedFolders",r.filter(i=>!e.find(o=>o.path===i.path)))},show:Ti(_t({target:"one",targetType:"dir",feature:"pinned"}),(t,e)=>t.config.get("pinnedFolders").findIndex(n=>n.path===e.target?.path)!==-1),order:70},{id:Ot.preview,title:({t})=>t("Preview"),action:(t,e)=>t.modal.open(uo,{storage:e[0]?.storage,item:e[0]}),show:Ti(_t({target:"one",feature:"preview"}),(t,e)=>e.target?.type!=="dir"),order:80},{id:Ot.download,link:(t,e)=>{if(e[0])return t.adapter.getDownloadUrl(e[0])},title:({t})=>t("Download"),action:()=>{},show:Ti(_t({target:"one",feature:"download"}),(t,e)=>e.target?.type!=="dir"),order:90},{id:Ot.rename,title:({t})=>t("Rename"),action:(t,e)=>t.modal.open(os,{items:e}),show:_t({target:"one",feature:"rename"}),order:100},{id:Ot.move,title:({t})=>t("Move files"),action:(t,e)=>{const n=t.fs,r={storage:n.path.get().storage||"",path:n.path.get().path||"",type:"dir"};t.modal.open(di,{items:{from:e,to:r}})},show:Ei(_t({target:"one",feature:"move"}),_t({target:"many",feature:"move"})),order:110},{id:Ot.copy,title:({t})=>t("Copy"),action:(t,e)=>{e.length>0&&t.fs.setClipboard("copy",new Set(e.map(n=>n.path)))},show:Ei(_t({target:"one",feature:"copy"}),_t({target:"many",feature:"copy"})),order:120},{id:Ot.paste,title:({t})=>t("Paste"),action:(t,e)=>{const n=t.fs.getClipboard();if(n?.items?.size>0){const r=t.fs.path.get();let i=r.path,o=r.storage;e.length===1&&e[0]?.type==="dir"&&(i=e[0].path,o=e[0].storage);const a={storage:o||"",path:i||"",type:"dir"};t.modal.open(n.type==="cut"?di:Pu,{items:{from:Array.from(n.items),to:a}})}},show:(t,e)=>t.features?.copy??!1?t.fs.getClipboard()?.items?.size>0:!1,order:130},{id:Ot.archive,title:({t})=>t("Archive"),action:(t,e)=>t.modal.open(Lu,{items:e}),show:Ei(_t({target:"many",feature:"archive"}),Ti(_t({target:"one",feature:"archive"}),(t,e)=>e.target?.mime_type!=="application/zip")),order:140},{id:Ot.unarchive,title:({t})=>t("Unarchive"),action:(t,e)=>t.modal.open(Du,{items:e}),show:_t({target:"one",feature:"unarchive",mimeType:"application/zip"}),order:150},{id:Ot.delete,title:({t})=>t("Delete"),action:(t,e)=>{t.modal.open(is,{items:e})},show:Ei(_t({feature:"delete",target:"one"}),_t({feature:"delete",target:"many"})),order:160}],NV=["data-theme"],UV={key:0,class:"vuefinder__external-drop-overlay vuefinder__external-drop-overlay--relative"},BV={class:"vuefinder__external-drop-message"},HV={class:"vuefinder__main__content"},qV=Ee({__name:"VueFinderView",props:{id:{},driver:{},config:{},features:{},debug:{type:Boolean},locale:{},contextMenuItems:{},selectionMode:{},selectionFilterType:{},selectionFilterMimeIncludes:{},onError:{type:Function},onSelect:{type:Function},onPathChange:{type:Function},onUploadComplete:{type:Function},onDeleteComplete:{type:Function},onNotify:{type:Function},onReady:{type:Function},onFileDclick:{type:Function},onFolderDclick:{type:Function},customUploader:{type:Function}},emits:["select","path-change","upload-complete","delete-complete","notify","error","ready","file-dclick","folder-dclick","update:locale"],setup(t,{emit:e}){const n=e,r=t,i=je(),o=Mn("root"),a=i.config;Ae(()=>r.features,S=>{const w=Zg(S);Object.keys(i.features).forEach(y=>{delete i.features[y]}),Object.assign(i.features,w)},{deep:!0});const s=i.fs,l=$e(i.i18n.localeAtom),u=$e(a.state),c=te(()=>{const S=u.value;return{"--vf-grid-item-width":`${S.gridItemWidth}px`,"--vf-grid-item-height":`${S.gridItemHeight}px`,"--vf-grid-item-gap":`${S.gridItemGap}px`,"--vf-grid-icon-size":`${S.gridIconSize}px`,"--vf-list-item-height":`${S.listItemHeight}px`,"--vf-list-item-gap":`${S.listItemGap}px`,"--vf-list-icon-size":`${S.listIconSize}px`}});Y5();const{isDraggingExternal:d,handleDragEnter:f,handleDragOver:m,handleDragLeave:p,handleDrop:h}=G5();function v(S){s.setPath(S.dirname),a.get("persist")&&a.set("path",S.dirname),s.setReadOnly(S.read_only??!1),i.modal.close(),s.setFiles(S.files),s.clearSelection(),s.setSelectedCount(0),s.setStorages(S.storages)}i.adapter.onBeforeOpen=()=>{s.setLoading(!0)},i.adapter.onAfterOpen=S=>{v(S),s.setLoading(!1)},i.emitter.on("vf-upload-complete",S=>{n("upload-complete",S)}),i.emitter.on("vf-delete-complete",S=>{n("delete-complete",S)}),i.emitter.on("vf-notify",S=>{n("notify",S)}),i.emitter.on("vf-file-dclick",S=>{n("file-dclick",S)}),i.emitter.on("vf-folder-dclick",S=>{n("folder-dclick",S)}),Ae(()=>r.config?.theme,S=>{S&&a.set("theme",g(S))},{immediate:!0}),Ae(l,(S,w)=>{S!==w&&n("update:locale",String(S))},{immediate:!1}),it(()=>{i.root=o.value,Ae(()=>a.get("path"),w=>{i.adapter.open(w)});const S=a.get("persist")?a.get("path"):a.get("initialPath")??"";s.setPath(S),i.adapter.open(S),s.path.listen(w=>{n("path-change",w.path)}),s.selectedItems.listen(w=>{n("select",w)}),n("ready")});const C=async S=>{const w=await h(S);w.length>0&&(i.modal.open(Fu),setTimeout(()=>{i.emitter.emit("vf-external-files-dropped",w.map(y=>y.file))},100))};return(S,w)=>(b(),x("div",{ref_key:"root",ref:o,tabindex:"0",class:Pe(["vuefinder vuefinder__main vuefinder__themer",{"vuefinder--dragging-external":g(d)}]),"data-theme":g(i).theme.current,style:kt(c.value),onDragenter:w[2]||(w[2]=(...y)=>g(f)&&g(f)(...y)),onDragover:w[3]||(w[3]=(...y)=>g(m)&&g(m)(...y)),onDragleave:w[4]||(w[4]=(...y)=>g(p)&&g(p)(...y)),onDrop:C},[_("div",{class:Pe(g(i).theme.current),style:{height:"100%",width:"100%"}},[_("div",{class:Pe([g(u)?.fullScreen?"vuefinder__main__fixed":"vuefinder__main__relative","vuefinder__main__container"]),onMousedown:w[0]||(w[0]=y=>g(i).emitter.emit("vf-contextmenu-hide")),onTouchstart:w[1]||(w[1]=y=>g(i).emitter.emit("vf-contextmenu-hide"))},[g(d)?(b(),x("div",UV,[_("div",BV,D(g(i).i18n.t("Drag and drop the files/folders to here.")),1)])):ue("",!0),g(u).showMenuBar?(b(),ne(yL,{key:1})):ue("",!0),g(u).showToolbar?(b(),ne(w3,{key:2})):ue("",!0),j(cj),_("div",HV,[j(VV),j(Qj,{"on-file-dclick":r.onFileDclick,"on-folder-dclick":r.onFolderDclick},{icon:we(y=>[Ue(S.$slots,"icon",Cn(Zn(y)))]),_:3},8,["on-file-dclick","on-folder-dclick"])]),j(dV,null,{actions:we(y=>[Ue(S.$slots,"status-bar",Cn(Zn(y)))]),_:3})],34),(b(),ne(Aa,{to:"body"},[j(Qp,{name:"fade"},{default:we(()=>[g(i).modal.visible?(b(),ne($t(g(i).modal.type),{key:0})):ue("",!0)]),_:1})])),j(Zj,{items:g(C_)},null,8,["items"]),g(u).notificationsEnabled?(b(),ne(g(zA),{key:0,position:g(u).notificationPosition,duration:g(u).notificationDuration,"visible-toasts":g(u).notificationVisibleToasts,"rich-colors":g(u).notificationRichColors},null,8,["position","duration","visible-toasts","rich-colors"])):ue("",!0)],2)],46,NV))}}),WV=Ee({__name:"VueFinderProvider",props:{id:{},driver:{},config:{},features:{},debug:{type:Boolean,default:!1},locale:{},contextMenuItems:{default:()=>C_},selectionMode:{default:"multiple"},selectionFilterType:{default:"both"},selectionFilterMimeIncludes:{default:()=>[]},onError:{},onSelect:{},onPathChange:{},onUploadComplete:{},onDeleteComplete:{},onNotify:{},onReady:{},onFileDclick:{},onFolderDclick:{},customUploader:{}},setup(t){const e=t,n=e.id??Pi(dc);if(!n)throw new Error('VueFinderProvider requires an "id" prop.');const r=FI(e,Pi("VueFinderOptions")||{});return Ae(()=>e.config,i=>{if(i){const o={};for(const a in i){const s=g(i[a]);s!==void 0&&(o[a]=s)}r.config.init(o)}},{deep:!0,immediate:!0}),Ae(()=>e.locale,i=>{i&&r.i18n.localeAtom&&r.i18n.localeAtom.get()!==i&&r.i18n.localeAtom.set(i)},{immediate:!0}),gI(n,r),Zp(dc,n),Oa(()=>{_I(n)}),(i,o)=>(b(),ne(qV,Cn(Zn(e)),{icon:we(a=>[Ue(i.$slots,"icon",Cn(Zn(a)))]),"status-bar":we(a=>[Ue(i.$slots,"status-bar",Cn(Zn(a)))]),_:3},16))}});function Jz(t){const e=je(t),n=i=>i||e.fs.path.get().path||"",r=i=>{Array.isArray(i.files)&&e.fs.setFiles(i.files)};return{async refresh(){const i=e.fs.path.get().path||"";e.adapter.invalidateListQuery(i),await e.adapter.open(i)},async open(i){await e.adapter.open(i)},preview(i){const o=(e.fs.files.get()||[]).find(a=>a.path===i);!o||o.type!=="file"||e.modal.open(uo,{storage:o.storage,item:o})},notify(i,o){qr(e,i,o)},getPath(){return e.fs.path.get().path||""},select(i){const o=new Set((e.fs.files.get()||[]).map(s=>s.path)),a=(i||[]).filter(s=>o.has(s));e.fs.setSelection(a)},selectOne(i){new Set((e.fs.files.get()||[]).map(o=>o.path)).has(i)&&e.fs.setSelection([i])},clearSelection(){e.fs.clearSelection()},getSelectedPaths(){return(e.fs.selectedItems.get()||[]).map(i=>i.path)},async createFolder(i,o){const a=await e.adapter.createFolder({path:n(o),name:i});r(a)},async createFile(i,o){const a=await e.adapter.createFile({path:n(o),name:i});r(a)},async delete(i,o){const a=n(o),s=new Map((e.fs.files.get()||[]).map(c=>[c.path,c])),l=(i||[]).map(c=>s.get(c)).filter(c=>!!c).map(c=>({path:c.path,type:c.type})),u=await e.adapter.delete({path:a,items:l});r(u)},async rename(i,o,a){const s=await e.adapter.rename({path:n(a),item:i,name:o});r(s)},async copy(i,o,a){const s=await e.adapter.copy({path:n(a),sources:i,destination:o});r(s)},async move(i,o,a){const s=await e.adapter.move({path:n(a),sources:i,destination:o});r(s)},getFiles(){return e.fs.files.get()||[]},getStorages(){return e.fs.storages.get()||[]},isLoading(){return e.fs.isLoading()},isReadOnly(){return e.fs.getReadOnly()}}}const KV={install(t,e={}){e.i18n=e.i18n??{};const[n]=Object.keys(e.i18n);e.locale=e.locale??n??"en",t.provide("VueFinderOptions",e),t.component("VueFinder",WV)}};function YV(t){t.use(KV,{i18n:{zhCN:()=>at(()=>import("./zhCN-0_iHo67e.js"),[]),en:()=>at(()=>import("./en-C_Tot-hO.js"),[])}})}const{i18n:Or}=Mc;let ia=!1,xi=null,No=[];async function GV(){return ia&&xi||(ia=!0,xi=(async()=>{try{return(await Rr.v1Token.tokencontrollerRefresh({headers:{[Ar]:Tr.generateBearerToken(Jb())}})).code===0}catch(t){return console.error(t),!1}finally{ia=!1,xi=null}})()),xi}async function QV(t){return JV(t)?(aa.error(Or.global.t("message.error.loginExpired")),ri().logoutDialog(),Promise.reject(Or.global.t("message.error.loginExpired"))):new Promise((e,n)=>{No.push({resolve:e,reject:n,config:t}),ia||GV().then(r=>{r?No.forEach(({resolve:i,reject:o,config:a})=>{a.headers[ur]=Tr.generateBearerToken(sa()),XV(a),ju.request(a).then(i).catch(o)}):(No.forEach(({reject:i})=>i(Or.global.t("message.error.refreshFailed"))),aa.error(Or.global.t("message.error.loginExpired")),ri().logoutDialog()),No=[]})})}function E_(t){return t.headers[yt.CSRF_TOKEN_HEADER_NAME]=Sm.get(yt.CSRF_KEY),t.headers[ur]=Tr.generateBearerToken(sa()),t.headers[yt.ACCEPT_LANGUAGE_HEADER_NAME]=Or.global.locale.value,t}function XV(t){t.headers["X-Token-Refreshed"]="true"}function JV(t){return t.headers["X-Token-Refreshed"]==="true"}async function T_(t){if(t.headers[ur]){const e=Tr.extractBearerToken(t.headers[ur]);Qb(e),t.config.headers[ur]=Tr.generateBearerToken(e)}if(t.headers[Ar]){const e=Tr.extractBearerToken(t.headers[Ar]);Zb(e),t.config.headers[Ar]=Tr.generateBearerToken(e)}if(t.data.code===Gd.Unauthorized&&!t.config.url?.includes("/api/v1/token/refresh"))return QV(t.config);if(t.data.code===Gd.Forbidden)return ri().logoutDialog(),Promise.reject(Or.global.t("user.notLoggedIn"));if(t.data.code!==0){const e=t.data.message||Or.global.t("message.error.requestFailed");return aa.error(e),Promise.reject(e)}return t.data}function cs(t){return console.error(t),aa.error(t.message),Promise.reject(t)}const ju=wm(yt.REMOTE_SERVICE_PREFIX,{baseURL:`/${yt.REMOTE_SERVICE_PREFIX}`});ju.interceptors.request.use(E_,cs);ju.interceptors.response.use(T_,cs);const ZV=Hb(),x_=wm(yt.LOCAL_SERVICE_PREFIX,{baseURL:ZV});x_.interceptors.request.use(E_,cs);x_.interceptors.response.use(T_,cs);var oa={exports:{}};var ez=oa.exports,Gp;function tz(){return Gp||(Gp=1,(function(t,e){(function(n,r){t.exports=r()})(ez,function(){var n={};n.version="0.2.0";var r=n.settings={minimum:.08,easing:"ease",positionUsing:"",speed:200,trickle:!0,trickleRate:.02,trickleSpeed:800,showSpinner:!0,barSelector:'[role="bar"]',spinnerSelector:'[role="spinner"]',parent:"body",template:'<div class="bar" role="bar"><div class="peg"></div></div><div class="spinner" role="spinner"><div class="spinner-icon"></div></div>'};n.configure=function(p){var h,v;for(h in p)v=p[h],v!==void 0&&p.hasOwnProperty(h)&&(r[h]=v);return this},n.status=null,n.set=function(p){var h=n.isStarted();p=i(p,r.minimum,1),n.status=p===1?null:p;var v=n.render(!h),C=v.querySelector(r.barSelector),S=r.speed,w=r.easing;return v.offsetWidth,s(function(y){r.positionUsing===""&&(r.positionUsing=n.getPositioningCSS()),l(C,a(p,S,w)),p===1?(l(v,{transition:"none",opacity:1}),v.offsetWidth,setTimeout(function(){l(v,{transition:"all "+S+"ms linear",opacity:0}),setTimeout(function(){n.remove(),y()},S)},S)):setTimeout(y,S)}),this},n.isStarted=function(){return typeof n.status=="number"},n.start=function(){n.status||n.set(0);var p=function(){setTimeout(function(){n.status&&(n.trickle(),p())},r.trickleSpeed)};return r.trickle&&p(),this},n.done=function(p){return!p&&!n.status?this:n.inc(.3+.5*Math.random()).set(1)},n.inc=function(p){var h=n.status;return h?(typeof p!="number"&&(p=(1-h)*i(Math.random()*h,.1,.95)),h=i(h+p,0,.994),n.set(h)):n.start()},n.trickle=function(){return n.inc(Math.random()*r.trickleRate)},(function(){var p=0,h=0;n.promise=function(v){return!v||v.state()==="resolved"?this:(h===0&&n.start(),p++,h++,v.always(function(){h--,h===0?(p=0,n.done()):n.set((p-h)/p)}),this)}})(),n.render=function(p){if(n.isRendered())return document.getElementById("nprogress");c(document.documentElement,"nprogress-busy");var h=document.createElement("div");h.id="nprogress",h.innerHTML=r.template;var v=h.querySelector(r.barSelector),C=p?"-100":o(n.status||0),S=document.querySelector(r.parent),w;return l(v,{transition:"all 0 linear",transform:"translate3d("+C+"%,0,0)"}),r.showSpinner||(w=h.querySelector(r.spinnerSelector),w&&m(w)),S!=document.body&&c(S,"nprogress-custom-parent"),S.appendChild(h),h},n.remove=function(){d(document.documentElement,"nprogress-busy"),d(document.querySelector(r.parent),"nprogress-custom-parent");var p=document.getElementById("nprogress");p&&m(p)},n.isRendered=function(){return!!document.getElementById("nprogress")},n.getPositioningCSS=function(){var p=document.body.style,h="WebkitTransform"in p?"Webkit":"MozTransform"in p?"Moz":"msTransform"in p?"ms":"OTransform"in p?"O":"";return h+"Perspective"in p?"translate3d":h+"Transform"in p?"translate":"margin"};function i(p,h,v){return p<h?h:p>v?v:p}function o(p){return(-1+p)*100}function a(p,h,v){var C;return r.positionUsing==="translate3d"?C={transform:"translate3d("+o(p)+"%,0,0)"}:r.positionUsing==="translate"?C={transform:"translate("+o(p)+"%,0)"}:C={"margin-left":o(p)+"%"},C.transition="all "+h+"ms "+v,C}var s=(function(){var p=[];function h(){var v=p.shift();v&&v(h)}return function(v){p.push(v),p.length==1&&h()}})(),l=(function(){var p=["Webkit","O","Moz","ms"],h={};function v(y){return y.replace(/^-ms-/,"ms-").replace(/-([\da-z])/gi,function(E,T){return T.toUpperCase()})}function C(y){var E=document.body.style;if(y in E)return y;for(var T=p.length,A=y.charAt(0).toUpperCase()+y.slice(1),O;T--;)if(O=p[T]+A,O in E)return O;return y}function S(y){return y=v(y),h[y]||(h[y]=C(y))}function w(y,E,T){E=S(E),y.style[E]=T}return function(y,E){var T=arguments,A,O;if(T.length==2)for(A in E)O=E[A],O!==void 0&&E.hasOwnProperty(A)&&w(y,A,O);else w(y,T[1],T[2])}})();function u(p,h){var v=typeof p=="string"?p:f(p);return v.indexOf(" "+h+" ")>=0}function c(p,h){var v=f(p),C=v+h;u(v,h)||(p.className=C.substring(1))}function d(p,h){var v=f(p),C;u(p,h)&&(C=v.replace(" "+h+" "," "),p.className=C.substring(1,C.length-1))}function f(p){return(" "+(p.className||"")+" ").replace(/\s+/gi," ")}function m(p){p&&p.parentNode&&p.parentNode.removeChild(p)}return n})})(oa)),oa.exports}var nz=tz();const Vu=jr(nz);Vu.configure({easing:"ease",speed:500,showSpinner:!1,trickleSpeed:200,parent:"body"});async function rz(t){await jO(),Em(t),Tm(t),$2(t),G2(t),X2(),nT(),LO(t),VO(t),zO(t),YV(t)}const O_=gr("setting",{state:()=>({dependencies:[],devDependencies:[],packageJson:{}}),getters:{vueVersion:t=>t.dependencies.find(e=>e.name==="vue")?.version||"",deps:t=>[...t.dependencies,...t.devDependencies],compHubVersion:()=>window.__GLOBAL_CONFIG__.version||""},actions:{setDependencies(t){this.$patch(e=>{e.dependencies=t})},setDevDependencies(t){this.$patch(e=>{e.devDependencies=t})},setPackageJson(t){this.$patch(e=>{e.packageJson=t})},async initSetting(){await this.fetchPackageJson(),await this.initPreviewSetting()},async fetchPackageJson(){await yC.v1Comp.compcontrollerPackagejson().then(t=>{const e=t.data?.packageJson??{};this.setPackageJson(e)})},async initPreviewSetting(){const t=Zr(o0,{dependencies:[],devDependencies:[]}),{dependencies:e=[],devDependencies:n=[]}=t.value,r=Object.entries(this.packageJson?.dependencies??{}).map(([o,a])=>{const s=e.find(l=>l.name===o);return{name:o,version:a,match:s?.match??yt.COMP_MATCH_TYPE_MAJOR_VERSION}}),i=Object.entries(this.packageJson?.devDependencies??{}).map(([o,a])=>{const s=n.find(l=>l.name===o);return{name:o,version:a,match:s?.match??yt.COMP_MATCH_TYPE_MAJOR_VERSION}});t.value={dependencies:r,devDependencies:i},this.setDependencies(r),this.setDevDependencies(i)}}}),iz=gr("upgrade",{state:()=>({upgradeInfo:{}}),getters:{isForceUpgrade:t=>t.upgradeInfo.hasUpgrade&&t.upgradeInfo.isForce,isUpgrade:t=>t.upgradeInfo.hasUpgrade,upgradeDesc:t=>t.upgradeInfo.desc,latestVersion:t=>t.upgradeInfo.latestVersion,hasUpgrade:t=>t.upgradeInfo.hasUpgrade},actions:{setUpgradeInfo(t){this.$patch(e=>{e.upgradeInfo=t})},async getUpgradeInfo(){if(Object.keys(this.upgradeInfo).length>0)return;const t=O_(),e=await Rr.v2Upgrade.upgradecontrollerv2Check({compHubVersion:t.compHubVersion});this.setUpgradeInfo(e.data)}}}),{i18n:oz}=Mc;ja.beforeEach(async(t,e)=>{Vu.start();const n=Ji(),r=ri(),i=O_(),o=iz();if(t.path!==e.path&&(await i.initSetting(),await r.fetchCsrfToken(),await o.getUpgradeInfo()),o.isForceUpgrade&&!t.path.startsWith("/upgrade"))return{path:"/upgrade"};if(t.path===e.path&&t.fullPath!==e.fullPath)return;const a=n.visitedViews.find(l=>l.path===t.path);if(a){if(t.fullPath===a.fullPath)return;const{hash:l="",query:u={}}=t,{query:c={},hash:d=""}=a,f=yy(c);if(!t.redirectedFrom){const m={query:{...f,...u},hash:l||d};return{path:t.path,...m}}}if(r.isGuestLogin()||!r.isAccessTokenExist()){if(!t.meta.noAuth)return r.logoutDialog(),!1}else{if(t.meta.noAuth){if(t.path.startsWith("/login")){const l=t.query.type==="logout";if(r.isAccessTokenExist()&&!l)return"/"}else r.isRealUserLogin()||await r.fetchWhoAmI();return}if(r.isRealUserLogin()||await r.fetchWhoAmI(),!r.isRealUserLogin())return r.logoutDialog(),!1}});ja.afterEach(t=>{const e=t.meta.title;document.title=oz.global.t(e)||yt.SITE_TITLE,Vu.done()});async function az(){const t=gc(Kb);await rz(t),t.mount("#app")}az();export{O_ as A,e1 as B,bz as C,o0 as D,Ji as E,qE as F,C_ as G,Tz as H,t0 as I,iz as J,Az as K,fz as L,ri as M,Sz as N,Cz as O,gz as R,wz as S,vz as T,xz as V,yt as _,Oz as a,pz as b,mz as c,n_ as d,dz as e,dw as f,Ez as g,yz as h,_z as i,hz as j,Nw as k,at as l,wc as m,f0 as n,Mc as o,$z as p,Jz as q,cz as r,yC as s,o1 as t,Bb as u,Rr as v,Ic as w,uz as x,Hb as y,BE as z};