@gct-paas/core-web 0.1.6-dev.12 → 0.1.6-dev.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ColorPicker-DHZwCGHF.js +2 -0
- package/dist/{JsBarcode-DY53cVJ6.js → JsBarcode-BfBOW5vm.js} +2 -1
- package/dist/_plugin-vue_export-helper-B3iGtQVD.js +2 -0
- package/dist/{chunk-DPOkwzLC.js → chunk-CeX__g8u.js} +1 -0
- package/dist/{cropper-DK_hFgpO.js → cropper-DszZbwY0.js} +2 -1
- package/dist/{de_DE-B3f8kAv-.js → de_DE-Cdk5SWSW.js} +2 -1
- package/dist/{defineProperty-Co6UJKQ3.js → defineProperty-DDBtkzz5.js} +1 -0
- package/dist/{diagram-config-item-C5Ha2XJq.js → diagram-config-item-Cbh_tiOl.js} +2 -1
- package/dist/{diagram-config-item-reverse-ChoxnW-Z.js → diagram-config-item-reverse-DWH-lRVD.js} +2 -1
- package/dist/{diagram-config-item-virtual-Cbmggfwt.js → diagram-config-item-virtual-qW8Ufx3F.js} +2 -1
- package/dist/{en_US-BSG3Kz6v.js → en_US-B0wIY6a-.js} +2 -1
- package/dist/{es_ES-BGP8IOmQ.js → es_ES-CFTf_KZi.js} +2 -1
- package/dist/{fr_FR-Y-6CzjUq.js → fr_FR-CSfCfW5D.js} +2 -1
- package/dist/{hooks-yX21uJ6d.js → hooks-DXW0t29_.js} +2 -1
- package/dist/{icon-next-picker-DYiHqnNR.js → icon-next-picker-DP56qrkn.js} +1 -0
- package/dist/index.min.css +1 -1
- package/dist/{ja_JP-CDlH1v8M.js → ja_JP-DXSy7dHj.js} +2 -1
- package/dist/loader.esm.min.js +2 -1
- package/dist/{monaco-editor-CQJ9TMzD.js → monaco-editor-Bj7q97sW.js} +2 -1
- package/dist/{objectSpread2-DARadIQB.js → objectSpread2-C8eu0aH8.js} +1 -0
- package/dist/{overlayscrollbars-vue-Df-3wShc.js → overlayscrollbars-vue-DiDUuAUa.js} +1 -0
- package/dist/paas-bpmn-runtime-B0yNr5W2.js +2 -0
- package/dist/{pt_PT-N-iIoE2_.js → pt_PT-CnUcrrHa.js} +2 -1
- package/dist/{relationship-diagram-config-DstwwXCO.js → relationship-diagram-config-DJB7Hcrl.js} +2 -1
- package/dist/{rich-editor-DVOriJH0.js → rich-editor-Zg0Nr7zv.js} +2 -1
- package/dist/{ru_RU--ESLRHrj.js → ru_RU-BziGAVj5.js} +2 -1
- package/dist/template-Bq8pI82J.js +2 -0
- package/dist/{tr_TR-BOIykdZO.js → tr_TR-y8uLkPdL.js} +2 -1
- package/dist/{useMonacoEditor-DqSQTg7b.js → useMonacoEditor-2RvV9zPk.js} +2 -1
- package/dist/{vi_VN-CmVoM2Rw.js → vi_VN-CXvZpo3W.js} +2 -1
- package/dist/{zh_CN-DhsO5Qwx.js → zh_CN-CO133RFG.js} +2 -1
- package/dist/{zh_TW-DWdp2kVo.js → zh_TW-DaOg9meQ.js} +2 -1
- package/es/components/BpmnRuntime/index.d.ts +5 -2
- package/es/components/BpmnRuntime/index.mjs +5 -1
- package/es/components/field-upload/src/FieldUpload.vue_vue_type_script_setup_true_name_FieldUpload_lang.mjs +1 -0
- package/es/components/field-upload/src/components/base-upload.vue.mjs +2 -2
- package/es/components/field-upload/src/components/base-upload.vue_vue_type_script_name_baseUpload_setup_true_lang.mjs +2 -2
- package/es/components/field-upload/src/components/{base-upload.vue_vue_type_style_index_0_scoped_65872e0a_lang.css → base-upload.vue_vue_type_style_index_0_scoped_6f57e635_lang.css} +18 -18
- package/es/components/field-upload/src/components/file-list.vue_vue_type_script_setup_true_name_fileList_lang.mjs +1 -0
- package/es/components/field-upload/src/types/index.d.ts +1 -4
- package/es/components/field-upload/src/types/index.mjs +2 -6
- package/es/components/image-upload/src/components/base-upload.vue.mjs +2 -2
- package/es/components/image-upload/src/components/base-upload.vue_vue_type_script_name_baseUpload_setup_true_lang.mjs +2 -2
- package/es/components/image-upload/src/components/{base-upload.vue_vue_type_style_index_0_scoped_2a928323_lang.css → base-upload.vue_vue_type_style_index_0_scoped_9b34005c_lang.css} +17 -17
- package/es/components/image-upload/src/types/index.d.ts +1 -4
- package/es/components/image-upload/src/types/index.mjs +1 -8
- package/es/components/index.mjs +0 -1
- package/es/components/monaco-editor/monaco-editor.d.ts +22 -0
- package/es/hooks/index.d.ts +1 -0
- package/es/hooks/index.mjs +1 -0
- package/es/hooks/useKeyParser.d.ts +16 -0
- package/es/hooks/useKeyParser.mjs +79 -0
- package/es/index.mjs +3 -2
- package/es/modules/gct-form/interface/i-form/i-form-item-basic.d.ts +8 -0
- package/package.json +9 -9
- package/dist/ColorPicker-BDeYRWA2.js +0 -1
- package/dist/_plugin-vue_export-helper-CGzGcWFX.js +0 -1
- package/dist/template-Dt6RJclf.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{i as e,n as t,r as n,t as r}from"./chunk-DPOkwzLC.js";import{t as o}from"./defineProperty-Co6UJKQ3.js";import{Modal as i,OverlayContainer as a,OverlayPopoverContainer as s,t as c,useNamespace as u}from"@gct-paas/core";import*as l from"vue";import{Fragment as f,computed as d,createVNode as h,defineComponent as g,getCurrentInstance as p,getCurrentScope as v,h as m,hasInjectionContext as y,inject as w,isRef as b,isVNode as O,nextTick as S,onBeforeMount as D,onBeforeUnmount as T,onMounted as I,onScopeDispose as E,onUnmounted as x,provide as C,reactive as P,ref as j,resolveComponent as R,shallowReadonly as A,shallowRef as N,toRaw as k,toRef as M,toRefs as L,toValue as _,unref as F,watch as H,watchEffect as W}from"vue";import{isFunction as U,isNumber as V,isString as z,merge as B}from"lodash-es";import{ConfigProvider as $,message as q}from"ant-design-vue";function Y(e,t){return!!v()&&(E(e,t),!0)}var X=/* @__PURE__ */new WeakMap,G="undefined"!=typeof window&&"undefined"!=typeof document,K=("undefined"!=typeof WorkerGlobalScope&&(globalThis,WorkerGlobalScope),e=>null!=e),J=Object.prototype.toString,Z=()=>{},Q=/* @__PURE__ */ee();function ee(){var e,t,n;return G&&!!(null===(e=window)||void 0===e||null===(e=e.navigator)||void 0===e?void 0:e.userAgent)&&(/iP(?:ad|hone|od)/.test(window.navigator.userAgent)||(null===(t=window)||void 0===t||null===(t=t.navigator)||void 0===t?void 0:t.maxTouchPoints)>2&&/iPad|Macintosh/.test(null===(n=window)||void 0===n?void 0:n.navigator.userAgent))}function te(e,t){return function(...n){return new Promise((r,o)=>{Promise.resolve(e(()=>t.apply(this,n),{fn:t,thisArg:this,args:n})).then(r).catch(o)})}}var ne=e=>e();function re(e,t={}){let n,r,o=Z;const i=e=>{clearTimeout(e),o(),o=Z};let a;return s=>{const c=_(e),u=_(t.maxWait);return n&&i(n),c<=0||void 0!==u&&u<=0?(r&&(i(r),r=void 0),Promise.resolve(s())):new Promise((e,l)=>{o=t.rejectOnCancel?l:e,a=s,u&&!r&&(r=setTimeout(()=>{n&&i(n),r=void 0,e(a())},u)),n=setTimeout(()=>{r&&i(r),r=void 0,e(s())},c)})}}function oe(e){return e.endsWith("rem")?16*Number.parseFloat(e):Number.parseFloat(e)}function ie(e){return Array.isArray(e)?e:[e]}function ae(e){const t=Object.create(null);return n=>t[n]||(t[n]=e(n))}var se=/\B([A-Z])/g,ce=(ae(e=>e.replace(se,"-$1").toLowerCase()),/-(\w)/g);function ue(e){return e||p()}function le(e,t=200,n={}){return te(re(t,n),e)}function fe(e,t=!0,n){ue(n)?I(e,n):t?e():S(e)}function de(e,t){ue(t)&&x(e,t)}function he(e,t,n={}){const{immediate:r=!0,immediateCallback:o=!1}=n,i=N(!1);let a;function s(){a&&(clearTimeout(a),a=void 0)}function c(){i.value=!1,s()}function u(...n){o&&e(),s(),i.value=!0,a=setTimeout(()=>{i.value=!1,a=void 0,e(...n)},_(t))}return r&&(i.value=!0,G&&u()),Y(c),{isPending:A(i),start:u,stop:c}}function ge(e,t,n={}){const{debounce:r=0,maxWait:o,...i}=n;return function(e,t,n={}){const{eventFilter:r=ne,...o}=n;return H(e,te(r,t),o)}(e,t,{...i,eventFilter:re(r,{maxWait:o})})}ae(e=>e.replace(ce,(e,t)=>t?t.toUpperCase():""));var pe=G?window:void 0,ve=G?window.document:void 0;function me(e){var t;const n=_(e);return null!==(t=null==n?void 0:n.$el)&&void 0!==t?t:n}function ye(...e){const t=d(()=>{const t=ie(_(e[0])).filter(e=>null!=e);return t.every(e=>"string"!=typeof e)?t:void 0});return n=([e,t,n,r],o,i)=>{if(!(null==e?void 0:e.length)||!(null==t?void 0:t.length)||!(null==n?void 0:n.length))return;const a=(s=r,"[object Object]"===J.call(s)?{...r}:r);var s;const c=e.flatMap(e=>t.flatMap(t=>n.map(n=>((e,t,n,r)=>(e.addEventListener(t,n,r),()=>e.removeEventListener(t,n,r)))(e,t,n,a))));i(()=>{c.forEach(e=>e())})},r={flush:"post"},H(()=>{var n,r;return[null!==(n=null===(r=t.value)||void 0===r?void 0:r.map(e=>me(e)))&&void 0!==n?n:[pe].filter(e=>null!=e),ie(_(t.value?e[1]:e[0])),ie(F(t.value?e[2]:e[1])),_(t.value?e[3]:e[2])]},n,{...r,immediate:!0});var n,r}G&&window.navigator,G&&window.location;var we=!1;function be(e,t,n={}){const{window:r=pe,ignore:o=[],capture:i=!0,detectIframe:a=!1,controls:s=!1}=n;if(!r)return s?{stop:Z,cancel:Z,trigger:Z}:Z;if(Q&&!we){we=!0;const e={passive:!0};Array.from(r.document.body.children).forEach(t=>t.addEventListener("click",Z,e)),r.document.documentElement.addEventListener("click",Z,e)}let c=!0;const u=e=>_(o).some(t=>{if("string"==typeof t)return Array.from(r.document.querySelectorAll(t)).some(t=>t===e.target||e.composedPath().includes(t));{const n=me(t);return n&&(e.target===n||e.composedPath().includes(n))}}),l=n=>{const r=me(e);null!=n.target&&(r instanceof Element||!function(e){const t=_(e);return t&&16===t.$.subTree.shapeFlag}(e)||!function(e,t){const n=_(e),r=n.$.subTree&&n.$.subTree.children;return!(null==r||!Array.isArray(r))&&r.some(e=>e.el===t.target||t.composedPath().includes(e.el))}(e,n))&&r&&r!==n.target&&!n.composedPath().includes(r)&&("detail"in n&&0===n.detail&&(c=!u(n)),c?t(n):c=!0)};let f=!1;const d=[ye(r,"click",e=>{f||(f=!0,setTimeout(()=>{f=!1},0),l(e))},{passive:!0,capture:i}),ye(r,"pointerdown",t=>{const n=me(e);c=!u(t)&&!(!n||t.composedPath().includes(n))},{passive:!0}),a&&ye(r,"blur",n=>{setTimeout(()=>{var o;const i=me(e);"IFRAME"!==(null===(o=r.document.activeElement)||void 0===o?void 0:o.tagName)||(null==i?void 0:i.contains(r.document.activeElement))||t(n)},0)},{passive:!0})].filter(Boolean),h=()=>d.forEach(e=>e());return s?{stop:h,cancel:()=>{c=!1},trigger:e=>{c=!0,l(e),c=!1}}:h}function Oe(e){const t=function(){const e=N(!1),t=p();return t&&I(()=>{e.value=!0},t),e}();return d(()=>(t.value,Boolean(e())))}function Se(e,t,n={}){const{window:r=pe,...o}=n;let i;const a=/* @__PURE__ */Oe(()=>r&&"MutationObserver"in r),s=()=>{i&&(i.disconnect(),i=void 0)},c=H(d(()=>{const t=ie(_(e)).map(me).filter(K);return new Set(t)}),e=>{s(),a.value&&e.size&&(i=new MutationObserver(t),e.forEach(e=>i.observe(e,o)))},{immediate:!0,flush:"post"}),u=()=>{c(),s()};return Y(u),{isSupported:a,stop:u,takeRecords:()=>null==i?void 0:i.takeRecords()}}var De=Symbol("vueuse-ssr-width");function Te(){const e=y()?((...e)=>{var t;const n=e[0],r=null===(t=p())||void 0===t?void 0:t.proxy,o=null!=r?r:v();if(null==o&&!y())throw new Error("injectLocal must be called in setup");return o&&X.has(o)&&n in X.get(o)?X.get(o)[n]:w(...e)})(De,null):null;return"number"==typeof e?e:void 0}function Ie(e,t,n={}){const{window:r=pe,...o}=n;let i;const a=/* @__PURE__ */Oe(()=>r&&"ResizeObserver"in r),s=()=>{i&&(i.disconnect(),i=void 0)},c=H(d(()=>{const t=_(e);return Array.isArray(t)?t.map(e=>me(e)):[me(t)]}),e=>{if(s(),a.value&&r){i=new ResizeObserver(t);for(const t of e)t&&i.observe(t,o)}},{immediate:!0,flush:"post"}),u=()=>{s(),c()};return Y(u),{isSupported:a,stop:u}}function Ee(e,t,n={}){const{root:r,rootMargin:o,threshold:i=0,window:a=pe,immediate:s=!0}=n,c=/* @__PURE__ */Oe(()=>a&&"IntersectionObserver"in a),u=d(()=>ie(_(e)).map(me).filter(K));let l=Z;const f=N(s),h=c.value?H(()=>[u.value,me(r),_(o),f.value],([e,n,r])=>{if(l(),!f.value)return;if(!e.length)return;const o=new IntersectionObserver(t,{root:me(n),rootMargin:r,threshold:i});e.forEach(e=>e&&o.observe(e)),l=()=>{o.disconnect(),l=Z}},{immediate:s,flush:"post"}):Z,g=()=>{l(),h(),f.value=!1};return Y(g),{isSupported:c,isActive:f,pause(){l(),f.value=!1},resume(){f.value=!0},stop:g}}function xe(e,t={}){const{window:n=pe,scrollTarget:r,threshold:o=0,rootMargin:i,once:a=!1,initialValue:s=!1}=t,c=N(s),{stop:u}=Ee(e,e=>{let t=c.value,n=0;for(const r of e)r.time>=n&&(n=r.time,t=r.isIntersecting);c.value=t,a&&H(c,()=>{u()},{once:!0})},{root:r,window:n,threshold:o,rootMargin:i});return c}var Ce=["fullscreenchange","webkitfullscreenchange","webkitendfullscreen","mozfullscreenchange","MSFullscreenChange"];function Pe(e,t={}){const{document:n=ve,autoExit:r=!1}=t,o=d(()=>{var t;return null!==(t=me(e))&&void 0!==t?t:null==n?void 0:n.documentElement}),i=N(!1),a=d(()=>["requestFullscreen","webkitRequestFullscreen","webkitEnterFullscreen","webkitEnterFullScreen","webkitRequestFullScreen","mozRequestFullScreen","msRequestFullscreen"].find(e=>n&&e in n||o.value&&e in o.value)),s=d(()=>["exitFullscreen","webkitExitFullscreen","webkitExitFullScreen","webkitCancelFullScreen","mozCancelFullScreen","msExitFullscreen"].find(e=>n&&e in n||o.value&&e in o.value)),c=d(()=>["fullScreen","webkitIsFullScreen","webkitDisplayingFullscreen","mozFullScreen","msFullscreenElement"].find(e=>n&&e in n||o.value&&e in o.value)),u=["fullscreenElement","webkitFullscreenElement","mozFullScreenElement","msFullscreenElement"].find(e=>n&&e in n),l=/* @__PURE__ */Oe(()=>o.value&&n&&void 0!==a.value&&void 0!==s.value&&void 0!==c.value),f=()=>{if(c.value){if(n&&null!=n[c.value])return n[c.value];{const e=o.value;if(null!=(null==e?void 0:e[c.value]))return Boolean(e[c.value])}}return!1};async function h(){if(l.value&&i.value){if(s.value)if(null!=(null==n?void 0:n[s.value]))await n[s.value]();else{const e=o.value;null!=(null==e?void 0:e[s.value])&&await e[s.value]()}i.value=!1}}async function g(){if(!l.value||i.value)return;f()&&await h();const e=o.value;a.value&&null!=(null==e?void 0:e[a.value])&&(await e[a.value](),i.value=!0)}const p=()=>{const e=f();(!e||e&&u&&(null==n?void 0:n[u])===o.value)&&(i.value=e)},v={capture:!1,passive:!0};return ye(n,Ce,p,v),ye(()=>me(o),Ce,p,v),fe(p,!1),r&&Y(h),{isSupported:l,isFullscreen:i,enter:g,exit:h,toggle:async function(){await(i.value?h():g())}}}function je(e,t,n={}){var r;const{direction:o="bottom",interval:i=100,canLoadMore:a=()=>!0}=n,s=P(function(e,t={}){const{throttle:n=0,idle:r=200,onStop:o=Z,onScroll:i=Z,offset:a={left:0,right:0,top:0,bottom:0},observe:s={mutation:!1},eventListenerOptions:c={capture:!1,passive:!0},behavior:u="auto",window:l=pe,onError:f=e=>{console.error(e)}}=t,h="boolean"==typeof s?{mutation:s}:s,g=N(0),p=N(0),v=d({get:()=>g.value,set(e){y(e,void 0)}}),m=d({get:()=>p.value,set(e){y(void 0,e)}});function y(t,n){var r,o,i,a;if(!l)return;const s=_(e);if(!s)return;null===(r=s instanceof Document?l.document.body:s)||void 0===r||r.scrollTo({top:null!==(o=_(n))&&void 0!==o?o:m.value,left:null!==(i=_(t))&&void 0!==i?i:v.value,behavior:_(u)});const c=(null==s||null===(a=s.document)||void 0===a?void 0:a.documentElement)||(null==s?void 0:s.documentElement)||s;null!=v&&(g.value=c.scrollLeft),null!=m&&(p.value=c.scrollTop)}const w=N(!1),O=P({left:!0,right:!1,top:!0,bottom:!1}),S=P({left:!1,right:!1,top:!1,bottom:!1}),D=e=>{w.value&&(w.value=!1,S.left=!1,S.right=!1,S.top=!1,S.bottom=!1,o(e))},T=le(D,n+r),I=e=>{var t;if(!l)return;const n=(null==e||null===(t=e.document)||void 0===t?void 0:t.documentElement)||(null==e?void 0:e.documentElement)||me(e),{display:r,flexDirection:o,direction:i}=l.getComputedStyle(n),s="rtl"===i?-1:1,c=n.scrollLeft;S.left=c<g.value,S.right=c>g.value;const u=Math.abs(c*s)<=(a.left||0),f=Math.abs(c*s)+n.clientWidth>=n.scrollWidth-(a.right||0)-1;"flex"===r&&"row-reverse"===o?(O.left=f,O.right=u):(O.left=u,O.right=f),g.value=c;let d=n.scrollTop;e!==l.document||d||(d=l.document.body.scrollTop),S.top=d<p.value,S.bottom=d>p.value;const h=Math.abs(d)<=(a.top||0),v=Math.abs(d)+n.clientHeight>=n.scrollHeight-(a.bottom||0)-1;"flex"===r&&"column-reverse"===o?(O.top=v,O.bottom=h):(O.top=h,O.bottom=v),p.value=d},E=e=>{var t;l&&(I(null!==(t=e.target.documentElement)&&void 0!==t?t:e.target),w.value=!0,T(e),i(e))};return ye(e,"scroll",n?function(e,t=200,n=!1,r=!0,o=!1){return te(function(...e){let t,n,r,o,i,a,s=0,c=!0,u=Z;b(e[0])||"object"!=typeof e[0]?[r,o=!0,i=!0,a=!1]=e:({delay:r,trailing:o=!0,leading:i=!0,rejectOnCancel:a=!1}=e[0]);const l=()=>{t&&(clearTimeout(t),t=void 0,u(),u=Z)};return e=>{const f=_(r),d=Date.now()-s,h=()=>n=e();return l(),f<=0?(s=Date.now(),h()):(d>f?(s=Date.now(),!i&&c||h()):o&&(n=new Promise((e,n)=>{u=a?n:e,t=setTimeout(()=>{s=Date.now(),c=!0,e(h()),l()},Math.max(0,f-d))})),i||t||(t=setTimeout(()=>c=!0,f)),c=!1,n)}}(t,n,r,o),e)}(E,n,!0,!1):E,c),fe(()=>{try{const t=_(e);if(!t)return;I(t)}catch(t){f(t)}}),(null==h?void 0:h.mutation)&&null!=e&&e!==l&&e!==document&&Se(e,()=>{const t=_(e);t&&I(t)},{attributes:!0,childList:!0,subtree:!0}),ye(e,"scrollend",D,c),{x:v,y:m,isScrolling:w,arrivedState:O,directions:S,measure(){const t=_(e);l&&t&&I(t)}}}(e,{...n,offset:{[o]:null!==(r=n.distance)&&void 0!==r?r:0,...n.offset}})),c=j(),u=d(()=>!!c.value),l=d(()=>{return t=_(e),"undefined"!=typeof Window&&t instanceof Window?t.document.documentElement:"undefined"!=typeof Document&&t instanceof Document?t.documentElement:t;var t}),f=xe(l),h=d(()=>!!l.value&&a(l.value));function g(){if(s.measure(),!l.value||!f.value||!h.value||c.value)return;const{scrollHeight:e,clientHeight:n,scrollWidth:r,clientWidth:a}=l.value,u="bottom"===o||"top"===o?e<=n:r<=a;(s.arrivedState[o]||u)&&(c.value=Promise.all([t(s),new Promise(e=>setTimeout(e,i))]).finally(()=>{c.value=null,S(()=>g())}))}return de(H(()=>[s.arrivedState[o],f.value,h.value],g,{immediate:!0,flush:"post"})),{isLoading:u,reset(){S(()=>g())}}}function Re(e,t){const{containerStyle:n,wrapperProps:r,scrollTo:o,calculateRange:i,currentList:a,containerRef:s}="itemHeight"in t?function(e,t){const n=Ae(t),{state:r,source:o,currentList:i,size:a,containerRef:s}=n,{itemHeight:c,overscan:u=5}=e,l=Ne(r,o,c),f=Me("vertical",u,ke(o,c),l,n),h=Le(c,o),g=d(()=>h(r.value.start)),p=Fe(c,o);return _e(a,t,s,f),{calculateRange:f,scrollTo:We("vertical",f,h,s),containerStyle:{overflowY:"auto"},wrapperProps:d(()=>({style:{width:"100%",height:p.value-g.value+"px",marginTop:`${g.value}px`}})),currentList:i,containerRef:s}}(t,e):function(e,t){const n=Ae(t),{state:r,source:o,currentList:i,size:a,containerRef:s}=n,{itemWidth:c,overscan:u=5}=e,l=Ne(r,o,c),f=Me("horizontal",u,ke(o,c),l,n),h=Le(c,o),g=d(()=>h(r.value.start)),p=Fe(c,o);return _e(a,t,s,f),{scrollTo:We("horizontal",f,h,s),calculateRange:f,wrapperProps:d(()=>({style:{height:"100%",width:p.value-g.value+"px",marginLeft:`${g.value}px`,display:"flex"}})),containerStyle:{overflowX:"auto"},currentList:i,containerRef:s}}(t,e);return{list:a,scrollTo:o,containerProps:{ref:s,onScroll:()=>{i()},style:n},wrapperProps:r}}function Ae(e){const t=N(null),n=function(e,t={width:0,height:0},n={}){const{window:r=pe,box:o="content-box"}=n,i=d(()=>{var t;return null===(t=me(e))||void 0===t||null===(t=t.namespaceURI)||void 0===t?void 0:t.includes("svg")}),a=N(t.width),s=N(t.height),{stop:c}=Ie(e,([t])=>{const n="border-box"===o?t.borderBoxSize:"content-box"===o?t.contentBoxSize:t.devicePixelContentBoxSize;if(r&&i.value){const t=me(e);if(t){const e=t.getBoundingClientRect();a.value=e.width,s.value=e.height}}else if(n){const e=ie(n);a.value=e.reduce((e,{inlineSize:t})=>e+t,0),s.value=e.reduce((e,{blockSize:t})=>e+t,0)}else a.value=t.contentRect.width,s.value=t.contentRect.height},n);fe(()=>{const n=me(e);n&&(a.value="offsetWidth"in n?n.offsetWidth:t.width,s.value="offsetHeight"in n?n.offsetHeight:t.height)});const u=H(()=>me(e),e=>{a.value=e?t.width:0,s.value=e?t.height:0});return{width:a,height:s,stop:function(){c(),u()}}}(t),r=j([]),o=N(e);return{state:j({start:0,end:10}),source:o,currentList:r,size:n,containerRef:t}}function Ne(e,t,n){return r=>{if("number"==typeof n)return Math.ceil(r/n);const{start:o=0}=e.value;let i=0,a=0;for(let e=o;e<t.value.length&&(i+=n(e),a=e,!(i>r));e++);return a-o}}function ke(e,t){return n=>{if("number"==typeof t)return Math.floor(n/t)+1;let r=0,o=0;for(let i=0;i<e.value.length;i++)if(r+=t(i),r>=n){o=i;break}return o+1}}function Me(e,t,n,r,{containerRef:o,state:i,currentList:a,source:s}){return()=>{const c=o.value;if(c){const o=n("vertical"===e?c.scrollTop:c.scrollLeft),u=r("vertical"===e?c.clientHeight:c.clientWidth),l=o-t,f=o+u+t;i.value={start:l<0?0:l,end:f>s.value.length?s.value.length:f},a.value=s.value.slice(i.value.start,i.value.end).map((e,t)=>({data:e,index:t+i.value.start}))}}}function Le(e,t){return n=>"number"==typeof e?n*e:t.value.slice(0,n).reduce((t,n,r)=>t+e(r),0)}function _e(e,t,n,r){H([e.width,e.height,()=>_(t),n],()=>{r()})}function Fe(e,t){return d(()=>"number"==typeof e?t.value.length*e:t.value.reduce((t,n,r)=>t+e(r),0))}Number.POSITIVE_INFINITY;var He={horizontal:"scrollLeft",vertical:"scrollTop"};function We(e,t,n,r){return o=>{r.value&&(r.value[He[e]]=n(o),t())}}function Ue(e={}){const{window:t=pe,initialWidth:n=Number.POSITIVE_INFINITY,initialHeight:r=Number.POSITIVE_INFINITY,listenOrientation:o=!0,includeScrollbar:i=!0,type:a="inner"}=e,s=N(n),c=N(r),u=()=>{if(t)if("outer"===a)s.value=t.outerWidth,c.value=t.outerHeight;else if("visual"===a&&t.visualViewport){const{width:e,height:n,scale:r}=t.visualViewport;s.value=Math.round(e*r),c.value=Math.round(n*r)}else i?(s.value=t.innerWidth,c.value=t.innerHeight):(s.value=t.document.documentElement.clientWidth,c.value=t.document.documentElement.clientHeight)};u(),fe(u);const l={passive:!0};return ye("resize",u,l),t&&"visual"===a&&t.visualViewport&&ye(t.visualViewport,"resize",u,l),o&&H(function(e,t={}){const{window:n=pe,ssrWidth:r=/* @__PURE__ */Te()}=t,o=/* @__PURE__ */Oe(()=>n&&"matchMedia"in n&&"function"==typeof n.matchMedia),i=N("number"==typeof r),a=N(),s=N(!1);return W(()=>{if(i.value)return i.value=!o.value,void(s.value=_(e).split(",").some(e=>{const t=e.includes("not all"),n=e.match(/\(\s*min-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/),o=e.match(/\(\s*max-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/);let i=Boolean(n||o);return n&&i&&(i=r>=oe(n[1])),o&&i&&(i=r<=oe(o[1])),t?!i:i}));o.value&&(a.value=n.matchMedia(_(e)),s.value=a.value.matches)}),ye(a,"change",e=>{s.value=e.matches},{passive:!0}),d(()=>s.value)}("(orientation: portrait)"),()=>u()),{width:s,height:c}}var Ve=class{info(e,t){return new Promise(n=>{q.info(e,null==t?void 0:t.duration,n)})}success(e,t){return new Promise(n=>{q.success(e,null==t?void 0:t.duration,n)})}warning(e,t){return new Promise(n=>{q.warning(e,null==t?void 0:t.duration,n)})}error(e,t){return new Promise(n=>{q.error(e,null==t?void 0:t.duration,n)})}};function ze(e,t,n){const{minValue:r,maxValue:o}=n.specificConfig||{};return"number"==typeof r&&"number"==typeof o&&r>o?Promise.reject(/* @__PURE__ */new Error("MinValue cannot be greater than MaxValue")):Promise.resolve()}function Be(e,t,n,r){if(!t)return Promise.resolve();const{minValue:o,maxValue:i}=n.specificConfig||{},a=i??(null==r?void 0:r.end),s=t.length;return"number"==typeof o&&s<o?Promise.reject(`${c("sys.model.minLengthDefault")}${o}`):"number"==typeof a&&s>a?Promise.reject(`${c("sys.model.maxLengthDefault")}${a}`):Promise.resolve()}function $e(e,t,n,r){if(null==t||""===t)return Promise.resolve();const{minValue:o,maxValue:i}=n.specificConfig||{},a=i??(null==r?void 0:r.end),s=Number(t);return"number"==typeof o&&s<o?Promise.reject(`${c("sys.model.minNumDefault")}${o}`):"number"==typeof a&&s>a?Promise.reject(`${c("sys.model.maxNumDefault")}${a}`):Promise.resolve()}function qe(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Ye(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Xe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Ge(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Xe(Object(n),!0).forEach(function(t){Ye(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Xe(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Ke(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Je(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Ze(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Je(Object(n),!0).forEach(function(t){Ke(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Je(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Qe(e){return function t(){for(var n=this,r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return o.length>=e.length?e.apply(this,o):function(){for(var e=arguments.length,r=new Array(e),i=0;i<e;i++)r[i]=arguments[i];return t.apply(n,[].concat(o,r))}}}function et(e){return{}.toString.call(e).includes("Object")}function tt(e){return"function"==typeof e}var nt=Qe(function(e,t){throw new Error(e[t]||e.default)})({initialIsRequired:"initial state is required",initialType:"initial state should be an object",initialContent:"initial state shouldn't be an empty object",handlerType:"handler should be an object or a function",handlersType:"all handlers should be a functions",selectorType:"selector should be a function",changeType:"provided value of changes should be an object",changeField:'it seams you want to change a field in the state which is not specified in the "initial" state',default:"an unknown error accured in `state-local` package"}),rt=function(e,t){return et(t)||nt("changeType"),Object.keys(t).some(function(t){return n=e,r=t,!Object.prototype.hasOwnProperty.call(n,r);var n,r})&&nt("changeField"),t},ot=function(e){tt(e)||nt("selectorType")},it=function(e){tt(e)||et(e)||nt("handlerType"),et(e)&&Object.values(e).some(function(e){return!tt(e)})&&nt("handlersType")},at=function(e){var t;e||nt("initialIsRequired"),et(e)||nt("initialType"),t=e,Object.keys(t).length||nt("initialContent")};function st(e,t){return tt(t)?t(e.current):t}function ct(e,t){return e.current=Ze(Ze({},e.current),t),t}function ut(e,t,n){return tt(t)?t(e.current):Object.keys(n).forEach(function(n){var r;return null===(r=t[n])||void 0===r?void 0:r.call(t,e.current[n])}),n}var lt,ft=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};at(e),it(t);var n={current:e},r=Qe(ut)(n,t),o=Qe(ct)(n),i=Qe(rt)(e),a=Qe(st)(n);return[function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(e){return e};return ot(e),e(n.current)},function(e){!function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){return t.reduceRight(function(e,t){return t(e)},e)}}(r,o,i,a)(e)}]},dt={configIsRequired:"the configuration object is required",configType:"the configuration object should be an object",default:"an unknown error accured in `@monaco-editor/loader` package",deprecation:"Deprecation warning!\n You are using deprecated way of configuration.\n\n Instead of using\n monaco.config({ urls: { monacoBase: '...' } })\n use\n monaco.config({ paths: { vs: '...' } })\n\n For more please check the link https://github.com/suren-atoyan/monaco-loader#config\n "},ht=(lt=function(e,t){throw new Error(e[t]||e.default)},function e(){for(var t=this,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return r.length>=lt.length?lt.apply(this,r):function(){for(var n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];return e.apply(t,[].concat(r,o))}})(dt),gt=function(e){var t;return e||ht("configIsRequired"),t=e,{}.toString.call(t).includes("Object")||ht("configType"),e.urls?(console.warn(dt.deprecation),{paths:{vs:e.urls.monacoBase}}):e};function pt(e,t){return Object.keys(t).forEach(function(n){t[n]instanceof Object&&e[n]&&Object.assign(t[n],pt(e[n],t[n]))}),Ge(Ge({},e),t)}var vt={type:"cancelation",msg:"operation is manually canceled"};function mt(e){var t=!1,n=new Promise(function(n,r){e.then(function(e){return t?r(vt):n(e)}),e.catch(r)});return n.cancel=function(){return t=!0},n}var yt,wt=["monaco"],bt=function(e){if(Array.isArray(e))return e}(yt=ft({config:{paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.55.1/min/vs"}},isInitialized:!1,resolve:null,reject:null,monaco:null}))||function(e){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var n,r,o,i,a=[],s=!0,c=!1;try{for(o=(t=t.call(e)).next,!2;!(s=(n=o.call(t)).done)&&(a.push(n.value),2!==a.length);s=!0);}catch(e){c=!0,r=e}finally{try{if(!s&&null!=t.return&&(i=t.return(),Object(i)!==i))return}finally{if(c)throw r}}return a}}(yt)||function(e){if(e){if("string"==typeof e)return qe(e,2);var t={}.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?qe(e,2):void 0}}(yt)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),Ot=bt[0],St=bt[1];function Dt(e){return document.body.appendChild(e)}function Tt(e){var t,n,r=Ot(function(e){return{config:e.config,reject:e.reject}}),o=(t="".concat(r.config.paths.vs,"/loader.js"),n=document.createElement("script"),t&&(n.src=t),n);return o.onload=function(){return e()},o.onerror=r.reject,o}function It(){var e=Ot(function(e){return{config:e.config,resolve:e.resolve,reject:e.reject}}),t=window.require;t.config(e.config),t(["vs/editor/editor.main"],function(t){var n=t.m||t;Et(n),e.resolve(n)},function(t){e.reject(t)})}function Et(e){Ot().monaco||St({monaco:e})}var xt=new Promise(function(e,t){return St({resolve:e,reject:t})}),Ct={config:function(e){var t=gt(e),n=t.monaco,r=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(t,wt);St(function(e){return{config:pt(e.config,r),monaco:n}})},init:function(){var e=Ot(function(e){return{monaco:e.monaco,isInitialized:e.isInitialized,resolve:e.resolve}});if(!e.isInitialized){if(St({isInitialized:!0}),e.monaco)return e.resolve(e.monaco),mt(xt);if(window.monaco&&window.monaco.editor)return Et(window.monaco),e.resolve(window.monaco),mt(xt);!function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){return t.reduceRight(function(e,t){return t(e)},e)}}(Dt,Tt)(It)}return mt(xt)},__getMonacoInstance:function(){return Ot(function(e){return e.monaco})}},Pt=new class{constructor(){o(this,"_monacoInstance",null),o(this,"_loadingPromise",null),this._configureLoader()}_configureLoader(){Ct.config({paths:{vs:location.origin+"/extras/monaco-editor/0.55.1/min/vs"}})}async loadMonaco(){if(this._monacoInstance)return this._monacoInstance;if(this._loadingPromise)return this._loadingPromise;this._loadingPromise=Ct.init();try{return this._monacoInstance=await this._loadingPromise,console.info("✓ Monaco Editor loaded successfully"),this._monacoInstance}catch(e){throw console.error("✗ Failed to load Monaco Editor:",e),this._loadingPromise=null,e}}getMonaco(){return this._monacoInstance}isMonacoLoaded(){return null!==this._monacoInstance}async createMonacoEditor(e,t){return(await this.loadMonaco()).editor.create(e,t)}async createMonacoDiffEditor(e,t){return(await this.loadMonaco()).editor.createDiffEditor(e,t)}async createMonacoModel(e,t,n){return(await this.loadMonaco()).editor.createModel(e,t,n)}},jt=/* @__PURE__ */t({Vue:()=>l,Vue2:()=>{},del:()=>kt,install:()=>At,isVue2:()=>!1,isVue3:()=>!0,set:()=>Nt});import*as Rt from"vue";function At(){}function Nt(e,t,n){return Array.isArray(e)?(e.length=Math.max(e.length,t),e.splice(t,1,n),n):(e[t]=n,n)}function kt(e,t){Array.isArray(e)?e.splice(t,1):delete e[t]}n(jt,Rt);var Mt=Symbol.for("DndContextType");function Lt(e){return"Minified Redux error #"+e+"; visit https://redux.js.org/Errors?code="+e+" for the full message or use the non-minified dev environment for full errors. "}var _t="function"==typeof Symbol&&Symbol.observable||"@@observable",Ft=function(){return Math.random().toString(36).substring(7).split("").join(".")},Ht={INIT:"@@redux/INIT"+Ft(),REPLACE:"@@redux/REPLACE"+Ft(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+Ft()}};function Wt(e,t,n){var r;if("function"==typeof t&&"function"==typeof n||"function"==typeof n&&"function"==typeof arguments[3])throw new Error(Lt(0));if("function"==typeof t&&void 0===n&&(n=t,t=void 0),void 0!==n){if("function"!=typeof n)throw new Error(Lt(1));return n(Wt)(e,t)}if("function"!=typeof e)throw new Error(Lt(2));var o=e,i=t,a=[],s=a,c=!1;function u(){s===a&&(s=a.slice())}function l(){if(c)throw new Error(Lt(3));return i}function f(e){if("function"!=typeof e)throw new Error(Lt(4));if(c)throw new Error(Lt(5));var t=!0;return u(),s.push(e),function(){if(t){if(c)throw new Error(Lt(6));t=!1,u();var n=s.indexOf(e);s.splice(n,1),a=null}}}function d(e){if(!function(e){if("object"!=typeof e||null===e)return!1;for(var t=e;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}(e))throw new Error(Lt(7));if(void 0===e.type)throw new Error(Lt(8));if(c)throw new Error(Lt(9));try{c=!0,i=o(i,e)}finally{c=!1}for(var t=a=s,n=0;n<t.length;n++)(0,t[n])();return e}return d({type:Ht.INIT}),(r={dispatch:d,subscribe:f,getState:l,replaceReducer:function(e){if("function"!=typeof e)throw new Error(Lt(10));o=e,d({type:Ht.REPLACE})}})[_t]=function(){var e,t=f;return(e={subscribe:function(e){if("object"!=typeof e||null===e)throw new Error(Lt(11));function n(){e.next&&e.next(l())}return n(),{unsubscribe:t(n)}}})[_t]=function(){return this},e},r}function Ut(e,t,...n){if("undefined"!=typeof process&&void 0===t)throw new Error("invariant requires an error message argument");if(!e){let e;if(void 0===t)e=/* @__PURE__ */new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{let r=0;e=new Error(t.replace(/%s/g,function(){return n[r++]})),e.name="Invariant Violation"}throw e.framesToPop=1,e}}function Vt(e){return"object"==typeof e}var zt="dnd-core/INIT_COORDS",Bt="dnd-core/BEGIN_DRAG",$t="dnd-core/PUBLISH_DRAG_SOURCE",qt="dnd-core/HOVER",Yt="dnd-core/DROP",Xt="dnd-core/END_DRAG";function Gt(e,t){return{type:zt,payload:{sourceClientOffset:t||null,clientOffset:e||null}}}var Kt={type:zt,payload:{clientOffset:null,sourceClientOffset:null}};function Jt(e){return function(t=[],n={publishSource:!0}){const{publishSource:r=!0,clientOffset:o,getSourceClientOffset:i}=n,a=e.getMonitor(),s=e.getRegistry();e.dispatch(Gt(o)),function(e,t,n){Ut(!t.isDragging(),"Cannot call beginDrag while dragging."),e.forEach(function(e){Ut(n.getSource(e),"Expected sourceIds to be registered.")})}(t,a,s);const c=function(e,t){let n=null;for(let r=e.length-1;r>=0;r--)if(t.canDragSource(e[r])){n=e[r];break}return n}(t,a);if(null==c)return void e.dispatch(Kt);let u=null;if(o){if(!i)throw new Error("getSourceClientOffset must be defined");!function(e){Ut("function"==typeof e,"When clientOffset is provided, getSourceClientOffset must be a function.")}(i),u=i(c)}e.dispatch(Gt(o,u));const l=s.getSource(c).beginDrag(a,c);return null!=l?(function(e){Ut(Vt(e),"Item must be an object.")}(l),s.pinSource(c),{type:Bt,payload:{itemType:s.getSourceType(c),item:l,sourceId:c,clientOffset:o||null,sourceClientOffset:u||null,isSourcePublic:!!r}}):void 0}}function Zt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Qt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){Zt(e,t,n[t])})}return e}function en(e){return function(t={}){const n=e.getMonitor(),r=e.getRegistry();!function(e){Ut(e.isDragging(),"Cannot call drop while not dragging."),Ut(!e.didDrop(),"Cannot call drop twice during one drag operation.")}(n),function(e){const t=e.getTargetIds().filter(e.canDropOnTarget,e);return t.reverse(),t}(n).forEach((o,i)=>{const a={type:Yt,payload:{dropResult:Qt({},t,tn(o,i,r,n))}};e.dispatch(a)})}}function tn(e,t,n,r){const o=n.getTarget(e);let i=o?o.drop(r,e):void 0;return function(e){Ut(void 0===e||Vt(e),"Drop result must either be an object or undefined.")}(i),void 0===i&&(i=0===t?{}:r.getDropResult()),i}function nn(e){return function(){const t=e.getMonitor(),n=e.getRegistry();!function(e){Ut(e.isDragging(),"Cannot call endDrag while not dragging.")}(t);const r=t.getSourceId();return null!=r&&(n.getSource(r,!0).endDrag(t,r),n.unpinSource()),{type:Xt}}}function rn(e,t){return null===t?null===e:Array.isArray(e)?e.some(e=>e===t):e===t}function on(e){return function(t,{clientOffset:n}={}){!function(e){Ut(Array.isArray(e),"Expected targetIds to be an array.")}(t);const r=t.slice(0),o=e.getMonitor(),i=e.getRegistry();return function(e,t,n){for(let r=e.length-1;r>=0;r--){const o=e[r];rn(t.getTargetType(o),n)||e.splice(r,1)}}(r,i,o.getItemType()),function(e,t,n){Ut(t.isDragging(),"Cannot call hover while not dragging."),Ut(!t.didDrop(),"Cannot call hover after drop.");for(let r=0;r<e.length;r++){const t=e[r];Ut(e.lastIndexOf(t)===r,"Expected targetIds to be unique in the passed array."),Ut(n.getTarget(t),"Expected targetIds to be registered.")}}(r,o,i),function(e,t,n){e.forEach(function(e){n.getTarget(e).hover(t,e)})}(r,o,i),{type:qt,payload:{targetIds:r,clientOffset:n||null}}}}function an(e){return function(){if(e.getMonitor().isDragging())return{type:$t}}}var sn=class{receiveBackend(e){this.backend=e}getMonitor(){return this.monitor}getBackend(){return this.backend}getRegistry(){return this.monitor.registry}getActions(){const e=this,{dispatch:t}=this.store,n=function(e){return{beginDrag:Jt(e),publishDragSource:an(e),hover:on(e),drop:en(e),endDrag:nn(e)}}(this);return Object.keys(n).reduce((r,o)=>{const i=n[o];var a;return r[o]=(a=i,(...n)=>{const r=a.apply(e,n);void 0!==r&&t(r)}),r},{})}dispatch(e){this.store.dispatch(e)}constructor(e,t){this.isSetUp=!1,this.handleRefCountChange=()=>{const e=this.store.getState().refCount>0;this.backend&&(e&&!this.isSetUp?(this.backend.setup(),this.isSetUp=!0):!e&&this.isSetUp&&(this.backend.teardown(),this.isSetUp=!1))},this.store=e,this.monitor=t,e.subscribe(this.handleRefCountChange)}};function cn(e,t){return{x:e.x-t.x,y:e.y-t.y}}var un=[],ln=[];un.__IS_NONE__=!0,ln.__IS_ALL__=!0;var fn=class{subscribeToStateChange(e,t={}){const{handlerIds:n}=t;Ut("function"==typeof e,"listener must be a function."),Ut(void 0===n||Array.isArray(n),"handlerIds, when specified, must be an array of strings.");let r=this.store.getState().stateId;return this.store.subscribe(()=>{const t=this.store.getState(),o=t.stateId;try{o===r||o===r+1&&!function(e,t){return e!==un&&(e===ln||void 0===t||(n=t,r=e,n.filter(e=>r.indexOf(e)>-1)).length>0);var n,r}(t.dirtyHandlerIds,n)||e()}finally{r=o}})}subscribeToOffsetChange(e){Ut("function"==typeof e,"listener must be a function.");let t=this.store.getState().dragOffset;return this.store.subscribe(()=>{const n=this.store.getState().dragOffset;n!==t&&(t=n,e())})}canDragSource(e){if(!e)return!1;const t=this.registry.getSource(e);return Ut(t,`Expected to find a valid source. sourceId=${e}`),!this.isDragging()&&t.canDrag(this,e)}canDropOnTarget(e){if(!e)return!1;const t=this.registry.getTarget(e);return Ut(t,`Expected to find a valid target. targetId=${e}`),!(!this.isDragging()||this.didDrop())&&rn(this.registry.getTargetType(e),this.getItemType())&&t.canDrop(this,e)}isDragging(){return Boolean(this.getItemType())}isDraggingSource(e){if(!e)return!1;const t=this.registry.getSource(e,!0);return Ut(t,`Expected to find a valid source. sourceId=${e}`),!(!this.isDragging()||!this.isSourcePublic())&&this.registry.getSourceType(e)===this.getItemType()&&t.isDragging(this,e)}isOverTarget(e,t={shallow:!1}){if(!e)return!1;const{shallow:n}=t;if(!this.isDragging())return!1;const r=this.registry.getTargetType(e),o=this.getItemType();if(o&&!rn(r,o))return!1;const i=this.getTargetIds();if(!i.length)return!1;const a=i.indexOf(e);return n?a===i.length-1:a>-1}getItemType(){return this.store.getState().dragOperation.itemType}getItem(){return this.store.getState().dragOperation.item}getSourceId(){return this.store.getState().dragOperation.sourceId}getTargetIds(){return this.store.getState().dragOperation.targetIds}getDropResult(){return this.store.getState().dragOperation.dropResult}didDrop(){return this.store.getState().dragOperation.didDrop}isSourcePublic(){return Boolean(this.store.getState().dragOperation.isSourcePublic)}getInitialClientOffset(){return this.store.getState().dragOffset.initialClientOffset}getInitialSourceClientOffset(){return this.store.getState().dragOffset.initialSourceClientOffset}getClientOffset(){return this.store.getState().dragOffset.clientOffset}getSourceClientOffset(){return function(e){const{clientOffset:t,initialClientOffset:n,initialSourceClientOffset:r}=e;return t&&n&&r?cn((i=r,{x:(o=t).x+i.x,y:o.y+i.y}),n):null;var o,i}(this.store.getState().dragOffset)}getDifferenceFromInitialOffset(){return function(e){const{clientOffset:t,initialClientOffset:n}=e;return t&&n?cn(t,n):null}(this.store.getState().dragOffset)}constructor(e,t){this.store=e,this.registry=t}},dn="undefined"!=typeof global?global:self,hn=dn.MutationObserver||dn.WebKitMutationObserver;function gn(e){return function(){const t=setTimeout(r,0),n=setInterval(r,50);function r(){clearTimeout(t),clearInterval(n),e()}}}var pn,vn="function"==typeof hn?function(e){let t=1;const n=new hn(e),r=document.createTextNode("");return n.observe(r,{characterData:!0}),function(){t=-t,r.data=t}}:gn,mn=class{call(){try{this.task&&this.task()}catch(e){this.onError(e)}finally{this.task=null,this.release(this)}}constructor(e,t){this.onError=e,this.release=t,this.task=null}},yn=new class{enqueueTask(e){const{queue:t,requestFlush:n}=this;t.length||(n(),this.flushing=!0),t[t.length]=e}constructor(){this.queue=[],this.pendingErrors=[],this.flushing=!1,this.index=0,this.capacity=1024,this.flush=()=>{const{queue:e}=this;for(;this.index<e.length;){const t=this.index;if(this.index++,e[t].call(),this.index>this.capacity){for(let t=0,n=e.length-this.index;t<n;t++)e[t]=e[t+this.index];e.length-=this.index,this.index=0}}e.length=0,this.index=0,this.flushing=!1},this.registerPendingError=e=>{this.pendingErrors.push(e),this.requestErrorThrow()},this.requestFlush=vn(this.flush),this.requestErrorThrow=gn(()=>{if(this.pendingErrors.length)throw this.pendingErrors.shift()})}},wn=new class{create(e){const t=this.freeTasks,n=t.length?t.pop():new mn(this.onError,e=>t[t.length]=e);return n.task=e,n}constructor(e){this.onError=e,this.freeTasks=[]}}(yn.registerPendingError),bn="dnd-core/ADD_SOURCE",On="dnd-core/ADD_TARGET",Sn="dnd-core/REMOVE_SOURCE",Dn="dnd-core/REMOVE_TARGET";function Tn(e,t){t&&Array.isArray(e)?e.forEach(e=>Tn(e,!1)):Ut("string"==typeof e||"symbol"==typeof e,t?"Type can only be a string, a symbol, or an array of either.":"Type can only be a string or a symbol.")}!function(e){e.SOURCE="SOURCE",e.TARGET="TARGET"}(pn||(pn={}));var In=0;function En(e){switch(e[0]){case"S":return pn.SOURCE;case"T":return pn.TARGET;default:throw new Error(`Cannot parse handler ID: ${e}`)}}function xn(e,t){const n=e.entries();let r=!1;do{const{done:e,value:[,o]}=n.next();if(o===t)return!0;r=!!e}while(!r);return!1}var Cn=class{addSource(e,t){Tn(e),function(e){Ut("function"==typeof e.canDrag,"Expected canDrag to be a function."),Ut("function"==typeof e.beginDrag,"Expected beginDrag to be a function."),Ut("function"==typeof e.endDrag,"Expected endDrag to be a function.")}(t);const n=this.addHandler(pn.SOURCE,e,t);return this.store.dispatch(function(e){return{type:bn,payload:{sourceId:e}}}(n)),n}addTarget(e,t){Tn(e,!0),function(e){Ut("function"==typeof e.canDrop,"Expected canDrop to be a function."),Ut("function"==typeof e.hover,"Expected hover to be a function."),Ut("function"==typeof e.drop,"Expected beginDrag to be a function.")}(t);const n=this.addHandler(pn.TARGET,e,t);return this.store.dispatch(function(e){return{type:On,payload:{targetId:e}}}(n)),n}containsHandler(e){return xn(this.dragSources,e)||xn(this.dropTargets,e)}getSource(e,t=!1){return Ut(this.isSourceId(e),"Expected a valid source ID."),t&&e===this.pinnedSourceId?this.pinnedSource:this.dragSources.get(e)}getTarget(e){return Ut(this.isTargetId(e),"Expected a valid target ID."),this.dropTargets.get(e)}getSourceType(e){return Ut(this.isSourceId(e),"Expected a valid source ID."),this.types.get(e)}getTargetType(e){return Ut(this.isTargetId(e),"Expected a valid target ID."),this.types.get(e)}isSourceId(e){return En(e)===pn.SOURCE}isTargetId(e){return En(e)===pn.TARGET}removeSource(e){var t;Ut(this.getSource(e),"Expected an existing source."),this.store.dispatch(function(e){return{type:Sn,payload:{sourceId:e}}}(e)),t=()=>{this.dragSources.delete(e),this.types.delete(e)},yn.enqueueTask(wn.create(t))}removeTarget(e){Ut(this.getTarget(e),"Expected an existing target."),this.store.dispatch(function(e){return{type:Dn,payload:{targetId:e}}}(e)),this.dropTargets.delete(e),this.types.delete(e)}pinSource(e){const t=this.getSource(e);Ut(t,"Expected an existing source."),this.pinnedSourceId=e,this.pinnedSource=t}unpinSource(){Ut(this.pinnedSource,"No source is pinned at the time."),this.pinnedSourceId=null,this.pinnedSource=null}addHandler(e,t,n){const r=function(e){const t=(In++).toString();switch(e){case pn.SOURCE:return`S${t}`;case pn.TARGET:return`T${t}`;default:throw new Error(`Unknown Handler Role: ${e}`)}}(e);return this.types.set(r,t),e===pn.SOURCE?this.dragSources.set(r,n):e===pn.TARGET&&this.dropTargets.set(r,n),r}constructor(e){this.types=/* @__PURE__ */new Map,this.dragSources=/* @__PURE__ */new Map,this.dropTargets=/* @__PURE__ */new Map,this.pinnedSourceId=null,this.pinnedSource=null,this.store=e}},Pn=(e,t)=>e===t;function jn(e=un,t){switch(t.type){case qt:break;case bn:case On:case Dn:case Sn:return un;default:return ln}const{targetIds:n=[],prevTargetIds:r=[]}=t.payload,o=function(e,t){const n=/* @__PURE__ */new Map,r=e=>{n.set(e,n.has(e)?n.get(e)+1:1)};e.forEach(r),t.forEach(r);const o=[];return n.forEach((e,t)=>{1===e&&o.push(t)}),o}(n,r);if(!(o.length>0)&&function(e,t,n=Pn){if(e.length!==t.length)return!1;for(let r=0;r<e.length;++r)if(!n(e[r],t[r]))return!1;return!0}(n,r))return un;const i=r[r.length-1],a=n[n.length-1];return i!==a&&(i&&o.push(i),a&&o.push(a)),o}function Rn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var An={initialSourceClientOffset:null,initialClientOffset:null,clientOffset:null};function Nn(e=An,t){const{payload:n}=t;switch(t.type){case zt:case Bt:return{initialSourceClientOffset:n.sourceClientOffset,initialClientOffset:n.clientOffset,clientOffset:n.clientOffset};case qt:return r=e.clientOffset,o=n.clientOffset,!r&&!o||r&&o&&r.x===o.x&&r.y===o.y?e:function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){Rn(e,t,n[t])})}return e}({},e,{clientOffset:n.clientOffset});case Xt:case Yt:return An;default:return e}var r,o}function kn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Mn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){kn(e,t,n[t])})}return e}var Ln={itemType:null,item:null,sourceId:null,targetIds:[],dropResult:null,didDrop:!1,isSourcePublic:null};function _n(e=Ln,t){const{payload:n}=t;switch(t.type){case Bt:return Mn({},e,{itemType:n.itemType,item:n.item,sourceId:n.sourceId,isSourcePublic:n.isSourcePublic,dropResult:null,didDrop:!1});case $t:return Mn({},e,{isSourcePublic:!0});case qt:return Mn({},e,{targetIds:n.targetIds});case Dn:return-1===e.targetIds.indexOf(n.targetId)?e:Mn({},e,{targetIds:(r=e.targetIds,o=n.targetId,r.filter(e=>e!==o))});case Yt:return Mn({},e,{dropResult:n.dropResult,didDrop:!0,targetIds:[]});case Xt:return Mn({},e,{itemType:null,item:null,sourceId:null,dropResult:null,didDrop:!1,isSourcePublic:null,targetIds:[]});default:return e}var r,o}function Fn(e=0,t){switch(t.type){case bn:case On:return e+1;case Sn:case Dn:return e-1;default:return e}}function Hn(e=0){return e+1}function Wn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Un(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){Wn(e,t,n[t])})}return e}function Vn(e={},t){return{dirtyHandlerIds:jn(e.dirtyHandlerIds,{type:t.type,payload:Un({},t.payload,{prevTargetIds:(n=e,r=[],"dragOperation.targetIds".split(".").reduce((e,t)=>e&&e[t]?e[t]:r||null,n))})}),dragOffset:Nn(e.dragOffset,t),refCount:Fn(e.refCount,t),dragOperation:_n(e.dragOperation,t),stateId:Hn(e.stateId)};var n,r}function zn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Bn=0,$n=Symbol.for("__VUE_DND_CONTEXT_INSTANCE__");function qn(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Yn(),n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0,o=t;return o[$n]||(o[$n]=function(e,t,n={},r=!1){const o=function(e){const t="undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION__;return Wt(Vn,e&&t&&t({name:"dnd-core",instanceId:"dnd-core"}))}(r),i=new sn(o,new fn(o,new Cn(o))),a=e(i,t,n);return i.receiveBackend(a),i}(e,t,n,r)),o[$n]}function Yn(){return"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof global?global:window}var Xn=(0,jt.defineComponent)({name:"DndProvider",props:{manager:{type:Object},backend:{type:Function},context:{type:Object},options:{type:Object},debugMode:{type:Boolean}},setup:function(e,t){var n,r,o,i,a=t.slots,s=(o=function(e){return function(e){return"manager"in e&&e.manager}(e)?[e.manager,!1]:[qn(e.backend,e.context,e.options,e.debugMode),!e.context]}(e),i=2,function(e){if(Array.isArray(e))return e}(o)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(c){s=!0,o=c}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}}(o,i)||function(e,t){if(e){if("string"==typeof e)return zn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?zn(e,t):void 0}}(o,i)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),c=s[0],u=s[1];return u&&++Bn,(0,jt.onUnmounted)(function(){if(u){var e=Yn();0===--Bn&&(e[$n]=null)}}),n=c,(0,jt.provide)(Mt,n),function(){var e;return null!==(r=null===(e=a.default)||void 0===e?void 0:e.call(a))&&void 0!==r?r:null}}});(0,jt.defineComponent)({props:{connect:{type:Function,required:!0},src:{type:String,required:!0}},setup:function(e){return(0,jt.watchEffect)(function(){if("undefined"!=typeof Image){var t=!1,n=new Image;return n.src=e.src,n.onload=function(){e.connect(n),t=!0},function(){t&&e.connect(null)}}}),function(){return null}}});var Gn=!1,Kn=!1,Jn=/* @__PURE__ */function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.sourceId=null,this.internalMonitor=t.getMonitor()}var t=e.prototype;return t.receiveHandlerId=function(e){this.sourceId=e},t.getHandlerId=function(){return this.sourceId},t.canDrag=function(){Ut(!Gn,"You may not call monitor.canDrag() inside your canDrag() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{return Gn=!0,this.internalMonitor.canDragSource(this.sourceId)}finally{Gn=!1}},t.isDragging=function(){if(!this.sourceId)return!1;Ut(!Kn,"You may not call monitor.isDragging() inside your isDragging() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{return Kn=!0,this.internalMonitor.isDraggingSource(this.sourceId)}finally{Kn=!1}},t.subscribeToStateChange=function(e,t){return this.internalMonitor.subscribeToStateChange(e,t)},t.isDraggingSource=function(e){return this.internalMonitor.isDraggingSource(e)},t.isOverTarget=function(e,t){return this.internalMonitor.isOverTarget(e,t)},t.getTargetIds=function(){return this.internalMonitor.getTargetIds()},t.isSourcePublic=function(){return this.internalMonitor.isSourcePublic()},t.getSourceId=function(){return this.internalMonitor.getSourceId()},t.subscribeToOffsetChange=function(e){return this.internalMonitor.subscribeToOffsetChange(e)},t.canDragSource=function(e){return this.internalMonitor.canDragSource(e)},t.canDropOnTarget=function(e){return this.internalMonitor.canDropOnTarget(e)},t.getItemType=function(){return this.internalMonitor.getItemType()},t.getItem=function(){return this.internalMonitor.getItem()},t.getDropResult=function(){return this.internalMonitor.getDropResult()},t.didDrop=function(){return this.internalMonitor.didDrop()},t.getInitialClientOffset=function(){return this.internalMonitor.getInitialClientOffset()},t.getInitialSourceClientOffset=function(){return this.internalMonitor.getInitialSourceClientOffset()},t.getSourceClientOffset=function(){return this.internalMonitor.getSourceClientOffset()},t.getClientOffset=function(){return this.internalMonitor.getClientOffset()},t.getDifferenceFromInitialOffset=function(){return this.internalMonitor.getDifferenceFromInitialOffset()},e}(),Zn=!1,Qn=/* @__PURE__ */function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.targetId=null,this.internalMonitor=t.getMonitor()}var t=e.prototype;return t.receiveHandlerId=function(e){this.targetId=e},t.getHandlerId=function(){return this.targetId},t.subscribeToStateChange=function(e,t){return this.internalMonitor.subscribeToStateChange(e,t)},t.canDrop=function(){if(!this.targetId)return!1;Ut(!Zn,"You may not call monitor.canDrop() inside your canDrop() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drop-target-monitor");try{return Zn=!0,this.internalMonitor.canDropOnTarget(this.targetId)}finally{Zn=!1}},t.isOver=function(e){return!!this.targetId&&this.internalMonitor.isOverTarget(this.targetId,e)},t.getItemType=function(){return this.internalMonitor.getItemType()},t.getItem=function(){return this.internalMonitor.getItem()},t.getDropResult=function(){return this.internalMonitor.getDropResult()},t.didDrop=function(){return this.internalMonitor.didDrop()},t.getInitialClientOffset=function(){return this.internalMonitor.getInitialClientOffset()},t.getInitialSourceClientOffset=function(){return this.internalMonitor.getInitialSourceClientOffset()},t.getSourceClientOffset=function(){return this.internalMonitor.getSourceClientOffset()},t.getClientOffset=function(){return this.internalMonitor.getClientOffset()},t.getDifferenceFromInitialOffset=function(){return this.internalMonitor.getDifferenceFromInitialOffset()},e}();function er(e){return function(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if((t=n)&&t.__v_skip&&function(){throw new Error("Only native element nodes can now be passed to Vue DnD connectors.You can either wrap Component into a <div>, or turn it into a drag source or a drop target itself.")}(),!function(e){return!!(n=e)&&!0===n.__v_isVNode&&"symbol"!=((t=e.type)&&"undefined"!=typeof Symbol&&t.constructor===Symbol?"symbol":typeof t);var t,n}(n)){var o=n;return e(o,r),o}}}function tr(e){var t={};return Object.keys(e).forEach(function(n){var r=e[n];if(n.endsWith("Ref"))t[n]=e[n];else{var o=er(r);t[n]=function(){return o}}}),t}function nr(e,t,n,r){let o=n?n.call(r,e,t):void 0;if(void 0!==o)return!!o;if(e===t)return!0;if("object"!=typeof e||!e||"object"!=typeof t||!t)return!1;const i=Object.keys(e),a=Object.keys(t);if(i.length!==a.length)return!1;const s=Object.prototype.hasOwnProperty.bind(t);for(let c=0;c<i.length;c++){const a=i[c];if(!s(a))return!1;const u=e[a],l=t[a];if(o=n?n.call(r,u,l,a):void 0,!1===o||void 0===o&&u!==l)return!1}return!0}function rr(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var or=/* @__PURE__ */function(){function e(t){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.hooks=tr({dragSource:function(e,t){n.clearDragSource(),n.dragSourceOptions=t||null,n.dragSourceNode=e,n.reconnectDragSource()},dragPreview:function(e,t){n.clearDragPreview(),n.dragPreviewOptions=t||null,n.dragPreviewNode=e,n.reconnectDragPreview()}}),this.handlerId=null,this.dragSourceOptionsInternal=null,this.dragPreviewOptionsInternal=null,this.lastConnectedHandlerId=null,this.lastConnectedDragSource=null,this.lastConnectedDragSourceOptions=null,this.lastConnectedDragPreview=null,this.lastConnectedDragPreviewOptions=null,this.backend=t}var t,n,r=e.prototype;return r.receiveHandlerId=function(e){this.handlerId!==e&&(this.handlerId=e,this.reconnect())},r.reconnect=function(){var e=this.reconnectDragSource();this.reconnectDragPreview(e)},r.reconnectDragSource=function(){var e=this.dragSource,t=this.didHandlerIdChange()||this.didConnectedDragSourceChange()||this.didDragSourceOptionsChange();return t&&this.disconnectDragSource(),this.handlerId?e?(t&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragSource=e,this.lastConnectedDragSourceOptions=this.dragSourceOptions,this.dragSourceUnsubscribe=this.backend.connectDragSource(this.handlerId,e,this.dragSourceOptions)),t):(this.lastConnectedDragSource=e,t):t},r.reconnectDragPreview=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.dragPreview,n=e||this.didHandlerIdChange()||this.didConnectedDragPreviewChange()||this.didDragPreviewOptionsChange();n&&this.disconnectDragPreview(),this.handlerId&&(t?n&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragPreview=t,this.lastConnectedDragPreviewOptions=this.dragPreviewOptions,this.dragPreviewUnsubscribe=this.backend.connectDragPreview(this.handlerId,t,this.dragPreviewOptions)):this.lastConnectedDragPreview=t)},r.didHandlerIdChange=function(){return this.lastConnectedHandlerId!==this.handlerId},r.didConnectedDragSourceChange=function(){return this.lastConnectedDragSource!==this.dragSource},r.didConnectedDragPreviewChange=function(){return this.lastConnectedDragPreview!==this.dragPreview},r.didDragSourceOptionsChange=function(){return!nr(this.lastConnectedDragSourceOptions,this.dragSourceOptions)},r.didDragPreviewOptionsChange=function(){return!nr(this.lastConnectedDragPreviewOptions,this.dragPreviewOptions)},r.disconnectDragSource=function(){this.dragSourceUnsubscribe&&(this.dragSourceUnsubscribe(),this.dragSourceUnsubscribe=void 0)},r.disconnectDragPreview=function(){this.dragPreviewUnsubscribe&&(this.dragPreviewUnsubscribe(),this.dragPreviewUnsubscribe=void 0,this.dragPreviewNode=null)},r.clearDragSource=function(){this.dragSourceNode=null},r.clearDragPreview=function(){this.dragPreviewNode=null},t=e,(n=[{key:"connectTarget",get:function(){return this.dragSource}},{key:"dragSourceOptions",get:function(){return this.dragSourceOptionsInternal},set:function(e){this.dragSourceOptionsInternal=e}},{key:"dragPreviewOptions",get:function(){return this.dragPreviewOptionsInternal},set:function(e){this.dragPreviewOptionsInternal=e}},{key:"dragSource",get:function(){return this.dragSourceNode}},{key:"dragPreview",get:function(){return this.dragPreviewNode}}])&&rr(t.prototype,n),e}();function ir(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var ar=/* @__PURE__ */function(){function e(t){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.hooks=tr({dropTarget:function(e,t){n.clearDropTarget(),n.dropTargetOptions=t,(0,jt.isRef)(e)?n.dropTargetRef=e:n.dropTargetNode=e,n.reconnect()}}),this.handlerId=null,this.dropTargetRef=null,this.dropTargetOptionsInternal=null,this.lastConnectedHandlerId=null,this.lastConnectedDropTarget=null,this.lastConnectedDropTargetOptions=null,this.backend=t}var t,n,r=e.prototype;return r.reconnect=function(){var e=this.didHandlerIdChange()||this.didDropTargetChange()||this.didOptionsChange();e&&this.disconnectDropTarget();var t=this.dropTarget;this.handlerId&&(t?e&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDropTarget=t,this.lastConnectedDropTargetOptions=this.dropTargetOptions,this.unsubscribeDropTarget=this.backend.connectDropTarget(this.handlerId,t,this.dropTargetOptions)):this.lastConnectedDropTarget=t)},r.receiveHandlerId=function(e){e!==this.handlerId&&(this.handlerId=e,this.reconnect())},r.didHandlerIdChange=function(){return this.lastConnectedHandlerId!==this.handlerId},r.didDropTargetChange=function(){return this.lastConnectedDropTarget!==this.dropTarget},r.didOptionsChange=function(){return!nr(this.lastConnectedDropTargetOptions,this.dropTargetOptions)},r.disconnectDropTarget=function(){this.unsubscribeDropTarget&&(this.unsubscribeDropTarget(),this.unsubscribeDropTarget=void 0)},r.clearDropTarget=function(){this.dropTargetRef=null,this.dropTargetNode=null},t=e,(n=[{key:"connectTarget",get:function(){return this.dropTarget}},{key:"dropTargetOptions",get:function(){return this.dropTargetOptionsInternal},set:function(e){this.dropTargetOptionsInternal=e}},{key:"dropTarget",get:function(){return this.dropTargetNode||this.dropTargetRef&&this.dropTargetRef.value}}])&&ir(t.prototype,n),e}(),sr=/* @__PURE__ */function(){function e(t,n,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.spec=t,this.monitor=n,this.connector=r}var t=e.prototype;return t.beginDrag=function(){var e,t=this.spec,n=this.monitor;return null!=(e="object"==typeof t.item?t.item:"function"==typeof t.item?t.item(n):{})?e:null},t.canDrag=function(){var e=this.spec,t=this.monitor;return"boolean"==typeof e.canDrag?e.canDrag:"function"!=typeof e.canDrag||e.canDrag(t)},t.isDragging=function(e,t){var n=this.spec,r=this.monitor,o=n.isDragging;return o?o(r):t===e.getSourceId()},t.endDrag=function(){var e=this.spec,t=this.monitor,n=this.connector,r=e.end;r&&r(t.getItem(),t),n.reconnect()},e}();function cr(){var e=(0,jt.inject)(Mt);return Ut(null!=e,"Expected drag drop context"),e}function ur(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function lr(e,t,n){var r=cr(),o=function(e,t,n){var r=(0,jt.computed)(function(){return new sr((0,jt.unref)(e),(0,jt.unref)(t),(0,jt.unref)(n))});return(0,jt.watchEffect)(function(){r.value.spec=(0,jt.unref)(e)}),r}(e,t,n),i=function(e){return(0,jt.computed)(function(){var t=(0,jt.unref)(e).type;return Ut(null!=t,"spec.type must be defined"),t})}(e);(0,jt.watchEffect)(function(e){if(null!=(0,jt.unref)(i)){var a=(u=function(e,t,n){var r=n.getRegistry(),o=r.addSource(e,t);return[o,function(){return r.removeSource(o)}]}((0,jt.unref)(i),(0,jt.unref)(o),(0,jt.unref)(r)),l=2,function(e){if(Array.isArray(e))return e}(u)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(c){s=!0,o=c}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}}(u,l)||function(e,t){if(e){if("string"==typeof e)return ur(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ur(e,t):void 0}}(u,l)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),s=a[0],c=a[1];(0,jt.unref)(t).receiveHandlerId(s),(0,jt.unref)(n).receiveHandlerId(s),e(c)}var u,l})}function fr(e){return(0,jt.computed)(function(){return"function"==typeof e?e():e})}var dr=/* @__PURE__ */e(/* @__PURE__ */r((e,t)=>{t.exports=function e(t,n){if(t===n)return!0;if(t&&n&&"object"==typeof t&&"object"==typeof n){if(t.constructor!==n.constructor)return!1;var r,o,i;if(Array.isArray(t)){if((r=t.length)!=n.length)return!1;for(o=r;0!==o--;)if(!e(t[o],n[o]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if((r=(i=Object.keys(t)).length)!==Object.keys(n).length)return!1;for(o=r;0!==o--;)if(!Object.prototype.hasOwnProperty.call(n,i[o]))return!1;for(o=r;0!==o--;){var a=i[o];if(!e(t[a],n[a]))return!1}return!0}return t!=t&&n!=n}})());function hr(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function gr(e,t,n){var r,o,i=(r=function(e,t,n){var r=(0,jt.ref)((0,jt.unref)(t)((0,jt.unref)(e))),o=function(){var o=(0,jt.unref)(t)((0,jt.unref)(e));(0,dr.default)(r.value,o)||(r.value=o,n&&n())};return(0,jt.watchEffect)(o),[r,o]}(e,t,n),o=2,function(e){if(Array.isArray(e))return e}(r)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(c){s=!0,o=c}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}}(r,o)||function(e,t){if(e){if("string"==typeof e)return hr(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?hr(e,t):void 0}}(r,o)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),a=i[0],s=i[1];return(0,jt.watchEffect)(function(t){var n=(0,jt.unref)(e).getHandlerId();null!=n&&t((0,jt.unref)(e).subscribeToStateChange(s,{handlerIds:[n]}))}),a}function pr(e,t,n){return gr(t,e||function(){return{}},function(){return(0,jt.unref)(n).reconnect()})}function vr(e,t){var n=(0,jt.reactive)({el:null,options:(0,jt.unref)(t)});return(0,jt.watchEffect)(function(){e(n)},{flush:"post"}),function(e,r){Nt(n,"el",e);var o=(0,jt.unref)(t)||r;return(0,dr.default)(n.options,o)||Nt(n,"options",o),(0,jt.unref)(e)}}function mr(e,t){return vr(function(t){(0,jt.unref)(e).hooks.dragSource()(t.el,t.options)},(0,jt.computed)(function(){return(0,jt.unref)(t).options}))}function yr(e,t){return vr(function(t){(0,jt.unref)(e).hooks.dragPreview()(t.el,t.options)},(0,jt.computed)(function(){return(0,jt.unref)(t).previewOptions}))}function wr(e){var t,n=fr(e),r=(t=cr(),(0,jt.computed)(function(){return new Jn((0,jt.unref)(t))})),o=function(e,t){var n=cr(),r=(0,jt.computed)(function(){return new or((0,jt.unref)(n).getBackend())});return(0,jt.watchEffect)(function(t){r.value.dragSourceOptions=(0,jt.unref)(e)||null,(0,jt.unref)(r).reconnect(),t(function(){r.value.disconnectDragSource()})}),(0,jt.watchEffect)(function(e){r.value.dragPreviewOptions=(0,jt.unref)(t)||null,(0,jt.unref)(r).reconnect(),e(function(){r.value.disconnectDragPreview()})}),r}((0,jt.computed)(function(){return(0,jt.unref)(n).options}),(0,jt.computed)(function(){return(0,jt.unref)(n).previewOptions}));return lr(n,r,o),[pr((0,jt.computed)(function(){return(0,jt.unref)(n).collect||function(){return{}}}),r,o),mr(o,n),yr(o,n)]}var br=/* @__PURE__ */function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.spec=t,this.monitor=n}var t=e.prototype;return t.canDrop=function(){var e=this.spec,t=this.monitor;return!e.canDrop||e.canDrop(t.getItem(),t)},t.hover=function(){var e=this.spec,t=this.monitor;e.hover&&e.hover(t.getItem(),t)},t.drop=function(){var e=this.spec,t=this.monitor;if(e.drop)return e.drop(t.getItem(),t)},e}();function Or(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Sr(e,t,n){var r=cr(),o=function(e,t){var n=(0,jt.computed)(function(){return new br((0,jt.unref)(e),(0,jt.unref)(t))});return(0,jt.watchEffect)(function(){n.value.spec=(0,jt.unref)(e)}),n}(e,t),i=function(e){return(0,jt.computed)(function(){var t=(0,jt.unref)(e).accept;return Ut(null!=t,"accept must be defined"),Array.isArray(t)?t:[t]})}(e);(0,jt.watchEffect)(function(e){var a,s,c=(a=function(e,t,n){var r=(0,jt.unref)(n).getRegistry(),o=r.addTarget((0,jt.unref)(e),(0,jt.unref)(t));return[o,function(){return r.removeTarget(o)}]}(i,o,r),s=2,function(e){if(Array.isArray(e))return e}(a)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(c){s=!0,o=c}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}}(a,s)||function(e,t){if(e){if("string"==typeof e)return Or(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Or(e,t):void 0}}(a,s)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),u=c[0],l=c[1];(0,jt.unref)(t).receiveHandlerId(u),(0,jt.unref)(n).receiveHandlerId(u),e(l)})}function Dr(e,t){return vr(function(t){(0,jt.unref)(e).hooks.dropTarget()(t.el,t.options)},(0,jt.computed)(function(){return(0,jt.unref)(t).options}))}function Tr(e){var t,n=fr(e),r=(t=cr(),(0,jt.computed)(function(){return new Qn((0,jt.unref)(t))})),o=function(e){var t=cr(),n=(0,jt.computed)(function(){return new ar((0,jt.unref)(t).getBackend())});return(0,jt.watchEffect)(function(t){n.value.dropTargetOptions=(0,jt.unref)(e)||null,n.value.reconnect(),t(function(){return n.value.disconnectDropTarget()})}),n}((0,jt.computed)(function(){return(0,jt.unref)(n).options}));return Sr(n,r,o),[pr((0,jt.computed)(function(){return(0,jt.unref)(n).collect||function(){return{}}}),r,o),Dr(o,n)]}function Ir(e){let t=null;return()=>(null==t&&(t=e()),t)}var Er=class{enter(e){const t=this.entered.length;return this.entered=function(e,t){const n=/* @__PURE__ */new Set,r=e=>n.add(e);e.forEach(r),t.forEach(r);const o=[];return n.forEach(e=>o.push(e)),o}(this.entered.filter(t=>this.isNodeInDocument(t)&&(!t.contains||t.contains(e))),[e]),0===t&&this.entered.length>0}leave(e){const t=this.entered.length;var n,r;return this.entered=(n=this.entered.filter(this.isNodeInDocument),r=e,n.filter(e=>e!==r)),t>0&&0===this.entered.length}reset(){this.entered=[]}constructor(e){this.entered=[],this.isNodeInDocument=e}},xr=class{initializeExposedProperties(){Object.keys(this.config.exposeProperties).forEach(e=>{Object.defineProperty(this.item,e,{configurable:!0,enumerable:!0,get:()=>(console.warn(`Browser doesn't allow reading "${e}" until the drop event.`),null)})})}loadDataTransfer(e){if(e){const t={};Object.keys(this.config.exposeProperties).forEach(n=>{const r=this.config.exposeProperties[n];null!=r&&(t[n]={value:r(e,this.config.matchesTypes),configurable:!0,enumerable:!0})}),Object.defineProperties(this.item,t)}}canDrag(){return!0}beginDrag(){return this.item}isDragging(e,t){return t===e.getSourceId()}endDrag(){}constructor(e){this.config=e,this.item={},this.initializeExposedProperties()}},Cr=/* @__PURE__ */t({FILE:()=>Pr,HTML:()=>Ar,TEXT:()=>Rr,URL:()=>jr}),Pr="__NATIVE_FILE__",jr="__NATIVE_URL__",Rr="__NATIVE_TEXT__",Ar="__NATIVE_HTML__";function Nr(e,t,n){const r=t.reduce((t,n)=>t||e.getData(n),"");return null!=r?r:n}var kr={[Pr]:{exposeProperties:{files:e=>Array.prototype.slice.call(e.files),items:e=>e.items,dataTransfer:e=>e},matchesTypes:["Files"]},[Ar]:{exposeProperties:{html:(e,t)=>Nr(e,t,""),dataTransfer:e=>e},matchesTypes:["Html","text/html"]},[jr]:{exposeProperties:{urls:(e,t)=>Nr(e,t,"").split("\n"),dataTransfer:e=>e},matchesTypes:["Url","text/uri-list"]},[Rr]:{exposeProperties:{text:(e,t)=>Nr(e,t,""),dataTransfer:e=>e},matchesTypes:["Text","text/plain"]}};function Mr(e){if(!e)return null;const t=Array.prototype.slice.call(e.types||[]);return Object.keys(kr).filter(e=>{const n=kr[e];return!!(null==n?void 0:n.matchesTypes)&&n.matchesTypes.some(e=>t.indexOf(e)>-1)})[0]||null}var Lr=Ir(()=>/firefox/i.test(navigator.userAgent)),_r=Ir(()=>Boolean(window.safari)),Fr=class{interpolate(e){const{xs:t,ys:n,c1s:r,c2s:o,c3s:i}=this;let a=t.length-1;if(e===t[a])return n[a];let s,c=0,u=i.length-1;for(;c<=u;){s=Math.floor(.5*(c+u));const r=t[s];if(r<e)c=s+1;else{if(!(r>e))return n[s];u=s-1}}a=Math.max(0,u);const l=e-t[a],f=l*l;return n[a]+r[a]*l+o[a]*f+i[a]*l*f}constructor(e,t){const{length:n}=e,r=[];for(let h=0;h<n;h++)r.push(h);r.sort((t,n)=>e[t]<e[n]?-1:1);const o=[],i=[],a=[];let s,c;for(let h=0;h<n-1;h++)s=e[h+1]-e[h],c=t[h+1]-t[h],i.push(s),o.push(c),a.push(c/s);const u=[a[0]];for(let h=0;h<i.length-1;h++){const e=a[h],t=a[h+1];if(e*t<=0)u.push(0);else{s=i[h];const n=i[h+1],r=s+n;u.push(3*r/((r+n)/e+(r+s)/t))}}u.push(a[a.length-1]);const l=[],f=[];let d;for(let h=0;h<u.length-1;h++){d=a[h];const e=u[h],t=1/i[h],n=e+u[h+1]-d-d;l.push((d-e-n)*t),f.push(n*t*t)}this.xs=e,this.ys=t,this.c1s=u,this.c2s=l,this.c3s=f}};function Hr(e){const t=1===e.nodeType?e:e.parentElement;if(!t)return null;const{top:n,left:r}=t.getBoundingClientRect();return{x:r,y:n}}function Wr(e){return{x:e.clientX,y:e.clientY}}var Ur=class{get window(){return this.globalContext?this.globalContext:"undefined"!=typeof window?window:void 0}get document(){var e;return(null===(e=this.globalContext)||void 0===e?void 0:e.document)?this.globalContext.document:this.window?this.window.document:void 0}get rootElement(){var e;return(null===(e=this.optionsArgs)||void 0===e?void 0:e.rootElement)||this.window}constructor(e,t){this.ownerDocument=null,this.globalContext=e,this.optionsArgs=t}};function Vr(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function zr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){Vr(e,t,n[t])})}return e}var Br=class{profile(){var e,t;return{sourcePreviewNodes:this.sourcePreviewNodes.size,sourcePreviewNodeOptions:this.sourcePreviewNodeOptions.size,sourceNodeOptions:this.sourceNodeOptions.size,sourceNodes:this.sourceNodes.size,dragStartSourceIds:(null===(e=this.dragStartSourceIds)||void 0===e?void 0:e.length)||0,dropTargetIds:this.dropTargetIds.length,dragEnterTargetIds:this.dragEnterTargetIds.length,dragOverTargetIds:(null===(t=this.dragOverTargetIds)||void 0===t?void 0:t.length)||0}}get window(){return this.options.window}get document(){return this.options.document}get rootElement(){return this.options.rootElement}setup(){const e=this.rootElement;if(void 0!==e){if(e.__isReactDndBackendSetUp)throw new Error("Cannot have two HTML5 backends at the same time.");e.__isReactDndBackendSetUp=!0,this.addEventListeners(e)}}teardown(){const e=this.rootElement;var t;void 0!==e&&(e.__isReactDndBackendSetUp=!1,this.removeEventListeners(this.rootElement),this.clearCurrentDragSourceNode(),this.asyncEndDragFrameId&&(null===(t=this.window)||void 0===t||t.cancelAnimationFrame(this.asyncEndDragFrameId)))}connectDragPreview(e,t,n){return this.sourcePreviewNodeOptions.set(e,n),this.sourcePreviewNodes.set(e,t),()=>{this.sourcePreviewNodes.delete(e),this.sourcePreviewNodeOptions.delete(e)}}connectDragSource(e,t,n){this.sourceNodes.set(e,t),this.sourceNodeOptions.set(e,n);const r=t=>this.handleDragStart(t,e),o=e=>this.handleSelectStart(e);return t.setAttribute("draggable","true"),t.addEventListener("dragstart",r),t.addEventListener("selectstart",o),()=>{this.sourceNodes.delete(e),this.sourceNodeOptions.delete(e),t.removeEventListener("dragstart",r),t.removeEventListener("selectstart",o),t.setAttribute("draggable","false")}}connectDropTarget(e,t){const n=t=>this.handleDragEnter(t,e),r=t=>this.handleDragOver(t,e),o=t=>this.handleDrop(t,e);return t.addEventListener("dragenter",n),t.addEventListener("dragover",r),t.addEventListener("drop",o),()=>{t.removeEventListener("dragenter",n),t.removeEventListener("dragover",r),t.removeEventListener("drop",o)}}addEventListeners(e){e.addEventListener&&(e.addEventListener("dragstart",this.handleTopDragStart),e.addEventListener("dragstart",this.handleTopDragStartCapture,!0),e.addEventListener("dragend",this.handleTopDragEndCapture,!0),e.addEventListener("dragenter",this.handleTopDragEnter),e.addEventListener("dragenter",this.handleTopDragEnterCapture,!0),e.addEventListener("dragleave",this.handleTopDragLeaveCapture,!0),e.addEventListener("dragover",this.handleTopDragOver),e.addEventListener("dragover",this.handleTopDragOverCapture,!0),e.addEventListener("drop",this.handleTopDrop),e.addEventListener("drop",this.handleTopDropCapture,!0))}removeEventListeners(e){e.removeEventListener&&(e.removeEventListener("dragstart",this.handleTopDragStart),e.removeEventListener("dragstart",this.handleTopDragStartCapture,!0),e.removeEventListener("dragend",this.handleTopDragEndCapture,!0),e.removeEventListener("dragenter",this.handleTopDragEnter),e.removeEventListener("dragenter",this.handleTopDragEnterCapture,!0),e.removeEventListener("dragleave",this.handleTopDragLeaveCapture,!0),e.removeEventListener("dragover",this.handleTopDragOver),e.removeEventListener("dragover",this.handleTopDragOverCapture,!0),e.removeEventListener("drop",this.handleTopDrop),e.removeEventListener("drop",this.handleTopDropCapture,!0))}getCurrentSourceNodeOptions(){const e=this.monitor.getSourceId(),t=this.sourceNodeOptions.get(e);return zr({dropEffect:this.altKeyPressed?"copy":"move"},t||{})}getCurrentDropEffect(){return this.isDraggingNativeItem()?"copy":this.getCurrentSourceNodeOptions().dropEffect}getCurrentSourcePreviewNodeOptions(){const e=this.monitor.getSourceId();return zr({anchorX:.5,anchorY:.5,captureDraggingState:!1},this.sourcePreviewNodeOptions.get(e)||{})}isDraggingNativeItem(){const e=this.monitor.getItemType();return Object.keys(Cr).some(t=>Cr[t]===e)}beginDragNativeItem(e,t){this.clearCurrentDragSourceNode(),this.currentNativeSource=function(e,t){const n=kr[e];if(!n)throw new Error(`native type ${e} has no configuration`);const r=new xr(n);return r.loadDataTransfer(t),r}(e,t),this.currentNativeHandle=this.registry.addSource(e,this.currentNativeSource),this.actions.beginDrag([this.currentNativeHandle])}setCurrentDragSourceNode(e){this.clearCurrentDragSourceNode(),this.currentDragSourceNode=e,this.mouseMoveTimeoutTimer=setTimeout(()=>{var e;return null===(e=this.rootElement)||void 0===e?void 0:e.addEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0)},1e3)}clearCurrentDragSourceNode(){var e;return!!this.currentDragSourceNode&&(this.currentDragSourceNode=null,this.rootElement&&(null===(e=this.window)||void 0===e||e.clearTimeout(this.mouseMoveTimeoutTimer||void 0),this.rootElement.removeEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0)),this.mouseMoveTimeoutTimer=null,!0)}handleDragStart(e,t){e.defaultPrevented||(this.dragStartSourceIds||(this.dragStartSourceIds=[]),this.dragStartSourceIds.unshift(t))}handleDragEnter(e,t){this.dragEnterTargetIds.unshift(t)}handleDragOver(e,t){null===this.dragOverTargetIds&&(this.dragOverTargetIds=[]),this.dragOverTargetIds.unshift(t)}handleDrop(e,t){this.dropTargetIds.unshift(t)}constructor(e,t,n){this.sourcePreviewNodes=/* @__PURE__ */new Map,this.sourcePreviewNodeOptions=/* @__PURE__ */new Map,this.sourceNodes=/* @__PURE__ */new Map,this.sourceNodeOptions=/* @__PURE__ */new Map,this.dragStartSourceIds=null,this.dropTargetIds=[],this.dragEnterTargetIds=[],this.currentNativeSource=null,this.currentNativeHandle=null,this.currentDragSourceNode=null,this.altKeyPressed=!1,this.mouseMoveTimeoutTimer=null,this.asyncEndDragFrameId=null,this.dragOverTargetIds=null,this.lastClientOffset=null,this.hoverRafId=null,this.getSourceClientOffset=e=>{const t=this.sourceNodes.get(e);return t&&Hr(t)||null},this.endDragNativeItem=()=>{this.isDraggingNativeItem()&&(this.actions.endDrag(),this.currentNativeHandle&&this.registry.removeSource(this.currentNativeHandle),this.currentNativeHandle=null,this.currentNativeSource=null)},this.isNodeInDocument=e=>Boolean(e&&this.document&&this.document.body&&this.document.body.contains(e)),this.endDragIfSourceWasRemovedFromDOM=()=>{const e=this.currentDragSourceNode;null==e||this.isNodeInDocument(e)||(this.clearCurrentDragSourceNode()&&this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover())},this.scheduleHover=e=>{null===this.hoverRafId&&"undefined"!=typeof requestAnimationFrame&&(this.hoverRafId=requestAnimationFrame(()=>{this.monitor.isDragging()&&this.actions.hover(e||[],{clientOffset:this.lastClientOffset}),this.hoverRafId=null}))},this.cancelHover=()=>{null!==this.hoverRafId&&"undefined"!=typeof cancelAnimationFrame&&(cancelAnimationFrame(this.hoverRafId),this.hoverRafId=null)},this.handleTopDragStartCapture=()=>{this.clearCurrentDragSourceNode(),this.dragStartSourceIds=[]},this.handleTopDragStart=e=>{if(e.defaultPrevented)return;const{dragStartSourceIds:t}=this;this.dragStartSourceIds=null;const n=Wr(e);this.monitor.isDragging()&&(this.actions.endDrag(),this.cancelHover()),this.actions.beginDrag(t||[],{publishSource:!1,getSourceClientOffset:this.getSourceClientOffset,clientOffset:n});const{dataTransfer:r}=e,o=Mr(r);if(this.monitor.isDragging()){if(r&&"function"==typeof r.setDragImage){const e=this.monitor.getSourceId(),t=this.sourceNodes.get(e),o=this.sourcePreviewNodes.get(e)||t;if(o){const{anchorX:e,anchorY:i,offsetX:a,offsetY:s}=this.getCurrentSourcePreviewNodeOptions(),c=function(e,t,n,r,o){const i=function(e){var t;return"IMG"===e.nodeName&&(Lr()||!(null===(t=document.documentElement)||void 0===t?void 0:t.contains(e)))}(t),a=Hr(i?e:t),s={x:n.x-a.x,y:n.y-a.y},{offsetWidth:c,offsetHeight:u}=e,{anchorX:l,anchorY:f}=r,{dragPreviewWidth:d,dragPreviewHeight:h}=function(e,t,n,r){let o=e?t.width:n,i=e?t.height:r;return _r()&&e&&(i/=window.devicePixelRatio,o/=window.devicePixelRatio),{dragPreviewWidth:o,dragPreviewHeight:i}}(i,t,c,u),{offsetX:g,offsetY:p}=o,v=0===p||p;return{x:0===g||g?g:new Fr([0,.5,1],[s.x,s.x/c*d,s.x+d-c]).interpolate(l),y:v?p:(()=>{let e=new Fr([0,.5,1],[s.y,s.y/u*h,s.y+h-u]).interpolate(f);return _r()&&i&&(e+=(window.devicePixelRatio-1)*h),e})()}}(t,o,n,{anchorX:e,anchorY:i},{offsetX:a,offsetY:s});r.setDragImage(o,c.x,c.y)}}try{null==r||r.setData("application/json",{})}catch(i){}this.setCurrentDragSourceNode(e.target);const{captureDraggingState:t}=this.getCurrentSourcePreviewNodeOptions();t?this.actions.publishDragSource():setTimeout(()=>this.actions.publishDragSource(),0)}else if(o)this.beginDragNativeItem(o);else{if(r&&!r.types&&(e.target&&!e.target.hasAttribute||!e.target.hasAttribute("draggable")))return;e.preventDefault()}},this.handleTopDragEndCapture=()=>{this.clearCurrentDragSourceNode()&&this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover()},this.handleTopDragEnterCapture=e=>{var t;if(this.dragEnterTargetIds=[],this.isDraggingNativeItem()&&(null===(t=this.currentNativeSource)||void 0===t||t.loadDataTransfer(e.dataTransfer)),!this.enterLeaveCounter.enter(e.target)||this.monitor.isDragging())return;const{dataTransfer:n}=e,r=Mr(n);r&&this.beginDragNativeItem(r,n)},this.handleTopDragEnter=e=>{const{dragEnterTargetIds:t}=this;this.dragEnterTargetIds=[],this.monitor.isDragging()&&(this.altKeyPressed=e.altKey,t.length>0&&this.actions.hover(t,{clientOffset:Wr(e)}),t.some(e=>this.monitor.canDropOnTarget(e))&&(e.preventDefault(),e.dataTransfer&&(e.dataTransfer.dropEffect=this.getCurrentDropEffect())))},this.handleTopDragOverCapture=e=>{var t;this.dragOverTargetIds=[],this.isDraggingNativeItem()&&(null===(t=this.currentNativeSource)||void 0===t||t.loadDataTransfer(e.dataTransfer))},this.handleTopDragOver=e=>{const{dragOverTargetIds:t}=this;if(this.dragOverTargetIds=[],!this.monitor.isDragging())return e.preventDefault(),void(e.dataTransfer&&(e.dataTransfer.dropEffect="none"));this.altKeyPressed=e.altKey,this.lastClientOffset=Wr(e),this.scheduleHover(t),(t||[]).some(e=>this.monitor.canDropOnTarget(e))?(e.preventDefault(),e.dataTransfer&&(e.dataTransfer.dropEffect=this.getCurrentDropEffect())):this.isDraggingNativeItem()?e.preventDefault():(e.preventDefault(),e.dataTransfer&&(e.dataTransfer.dropEffect="none"))},this.handleTopDragLeaveCapture=e=>{this.isDraggingNativeItem()&&e.preventDefault(),this.enterLeaveCounter.leave(e.target)&&(this.isDraggingNativeItem()&&setTimeout(()=>this.endDragNativeItem(),0),this.cancelHover())},this.handleTopDropCapture=e=>{var t;this.dropTargetIds=[],this.isDraggingNativeItem()?(e.preventDefault(),null===(t=this.currentNativeSource)||void 0===t||t.loadDataTransfer(e.dataTransfer)):Mr(e.dataTransfer)&&e.preventDefault(),this.enterLeaveCounter.reset()},this.handleTopDrop=e=>{const{dropTargetIds:t}=this;this.dropTargetIds=[],this.actions.hover(t,{clientOffset:Wr(e)}),this.actions.drop({dropEffect:this.getCurrentDropEffect()}),this.isDraggingNativeItem()?this.endDragNativeItem():this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover()},this.handleSelectStart=e=>{const t=e.target;"function"==typeof t.dragDrop&&("INPUT"===t.tagName||"SELECT"===t.tagName||"TEXTAREA"===t.tagName||t.isContentEditable||(e.preventDefault(),t.dragDrop()))},this.options=new Ur(t,n),this.actions=e.getActions(),this.monitor=e.getMonitor(),this.registry=e.getRegistry(),this.enterLeaveCounter=new Er(this.isNodeInDocument)}},$r=function(e,t,n){return new Br(e,t,n)},qr={"zh-CN":()=>import("./zh_CN-DhsO5Qwx.js"),"en-US":()=>import("./en_US-BSG3Kz6v.js"),"pt-PT":()=>import("./pt_PT-N-iIoE2_.js"),"tr-TR":()=>import("./tr_TR-BOIykdZO.js"),"zh-TW":()=>import("./zh_TW-DWdp2kVo.js"),"ja-JP":()=>import("./ja_JP-CDlH1v8M.js"),"vi-VN":()=>import("./vi_VN-CmVoM2Rw.js"),"de-GE":()=>import("./de_DE-B3f8kAv-.js"),"fr-FR":()=>import("./fr_FR-Y-6CzjUq.js"),"es-ES":()=>import("./es_ES-BGP8IOmQ.js"),"ru-RU":()=>import("./ru_RU--ESLRHrj.js")},Yr=j({locale:""});function Xr(){if(Yr.value.locale!==_gct.i18n.global.locale.value){const e=qr[_gct.i18n.global.locale.value];e&&e().then(e=>{Yr.value=e.default})}return{getAntdLocale:Yr}}var Gr=P({});function Kr(){return{themeVars:Gr,setPrimaryColor:function(e){Gr.primaryColor=e,$.config({theme:{primaryColor:e}})}}}function Jr(e,t,n={}){const r=n.minValue??10,o=j(e),i=P({offset:"offsetWidth",client:"clientX",clientMove:0,rowType:t,offsetWidth:2e3});function a(e){const t=e-i.clientMove;o.value=s(s(o.value)+t),i.clientMove=e}function s(e){return"right"===i.rowType||"bottom"===i.rowType?i.offsetWidth-e:e}return{moveDomDown:function(e,t,n){const r=t,o=e;i.offsetWidth=r[i.offset]??0,i.clientMove=o[i.client]??0,e.preventDefault(),document.onmousemove=e=>{a(e[i.client]??0)},document.onmouseup=()=>{document.onmouseup=null,document.onmousemove=null,null==n||n()}},moveMobileDomDown:function(e,t,n){const r=t,o=e.touches[0];o&&(i.offsetWidth=r[i.offset]??0,i.clientMove=o[i.client]??0,e.preventDefault(),document.ontouchmove=e=>{a(e.touches[0][i.client]??0)},document.ontouchend=()=>{document.ontouchend=null,document.ontouchmove=null,null==n||n()})},start:d({get:()=>o.value<r?r:o.value>i.offsetWidth-r?i.offsetWidth-r:o.value,set(e){o.value=e}})}}var Zr=/* @__PURE__ */g({props:{opts:{type:Object,default:()=>({})}},setup(e,t){const n=u("modal"),r=j(!1),o=j(!!e.opts.defaultFullscreen),a=()=>{o.value=!o.value},s=j({});e.opts&&Object.assign(s.value,e.opts);let c=null;const l=new i({dismiss:e=>{r.value=!1,c=e,t.emit("dismiss",c)},setOptions(e){Object.assign(s.value,e)}});C("modal",l);const f=e=>l.dismiss(e);t.expose({present:()=>{r.value=!0},dismiss:f});const d=j(!1),g=async()=>{if(l.ok)try{d.value=!0;const e=await l.ok();d.value=!1,!e||!0!==e.ok&&!0!==e.close||f(e)}finally{d.value=!1}else console.warn("打开模态未实现ok方法")},p=async()=>{l.cancel&&!1===await l.cancel()||f()},{getAntdLocale:v}=Xr();return()=>{var e,i;let c;const u=null===(e=(i=t.slots).default)||void 0===e?void 0:e.call(i);return u&&u.length>0&&(u[0].props.modal=l),h($,{locale:v.value},{default:()=>{return[h(Xn,{backend:$r},(e=c=m(R("a-modal"),{visible:r.value,class:[n.b(),s.value.placement&&n.m(s.value.placement),s.value.modalClass,n.is("hidden-footer",!1===s.value.showFooter),n.is("hidden-close-btn",!1===s.value.showCloseBtn),n.is("hidden-cancel-btn",!1===s.value.showCancelBtn),n.is("full-screen",o.value)],centered:!0,onOk:g,confirmLoading:d.value,onCancel:p,okText:"确认",okButtonProps:{disabled:l.state.okDisabled},...s.value},[!1!==s.value.canFullscreen?h("div",{class:n.e("full-screen"),onClick:a},[h("i",{class:"iconfont "+(o.value?"icon-tuichuquanping":"icon-quanping")},null)]):null,u]),"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!O(e)?c:{default:()=>[c]}))];var e}})}}}),Qr=Math.min,eo=Math.max,to=Math.round,no=Math.floor,ro=e=>({x:e,y:e}),oo={left:"right",right:"left",bottom:"top",top:"bottom"};function io(e,t,n){return eo(e,Qr(t,n))}function ao(e,t){return"function"==typeof e?e(t):e}function so(e){return e.split("-")[0]}function co(e){return e.split("-")[1]}function uo(e){return"x"===e?"y":"x"}function lo(e){return"y"===e?"height":"width"}function fo(e){const t=e[0];return"t"===t||"b"===t?"y":"x"}function ho(e){return uo(fo(e))}function go(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}var po=["left","right"],vo=["right","left"],mo=["top","bottom"],yo=["bottom","top"];function wo(e){const t=so(e);return oo[t]+e.slice(t.length)}function bo(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function Oo(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function So(e,t,n){let{reference:r,floating:o}=e;const i=fo(t),a=ho(t),s=lo(a),c=so(t),u="y"===i,l=r.x+r.width/2-o.width/2,f=r.y+r.height/2-o.height/2,d=r[s]/2-o[s]/2;let h;switch(c){case"top":h={x:l,y:r.y-o.height};break;case"bottom":h={x:l,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:f};break;case"left":h={x:r.x-o.width,y:f};break;default:h={x:r.x,y:r.y}}switch(co(t)){case"start":h[a]-=d*(n&&u?-1:1);break;case"end":h[a]+=d*(n&&u?-1:1)}return h}async function Do(e,t){var n;void 0===t&&(t={});const{x:r,y:o,platform:i,rects:a,elements:s,strategy:c}=e,{boundary:u="clippingAncestors",rootBoundary:l="viewport",elementContext:f="floating",altBoundary:d=!1,padding:h=0}=ao(t,e),g=bo(h),p=s[d?"floating"===f?"reference":"floating":f],v=Oo(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(p)))||n?p:p.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(s.floating)),boundary:u,rootBoundary:l,strategy:c})),m="floating"===f?{x:r,y:o,width:a.floating.width,height:a.floating.height}:a.reference,y=await(null==i.getOffsetParent?void 0:i.getOffsetParent(s.floating)),w=await(null==i.isElement?void 0:i.isElement(y))&&await(null==i.getScale?void 0:i.getScale(y))||{x:1,y:1},b=Oo(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:m,offsetParent:y,strategy:c}):m);return{top:(v.top-b.top+g.top)/w.y,bottom:(b.bottom-v.bottom+g.bottom)/w.y,left:(v.left-b.left+g.left)/w.x,right:(b.right-v.right+g.right)/w.x}}var To=/* @__PURE__ */new Set(["left","top"]);function Io(){return"undefined"!=typeof window}function Eo(e){return Po(e)?(e.nodeName||"").toLowerCase():"#document"}function xo(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function Co(e){var t;return null==(t=(Po(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function Po(e){return!!Io()&&(e instanceof Node||e instanceof xo(e).Node)}function jo(e){return!!Io()&&(e instanceof Element||e instanceof xo(e).Element)}function Ro(e){return!!Io()&&(e instanceof HTMLElement||e instanceof xo(e).HTMLElement)}function Ao(e){return!(!Io()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof xo(e).ShadowRoot)}function No(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=zo(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&"inline"!==o&&"contents"!==o}function ko(e){return/^(table|td|th)$/.test(Eo(e))}function Mo(e){try{if(e.matches(":popover-open"))return!0}catch(t){}try{return e.matches(":modal")}catch(t){return!1}}var Lo,_o=/transform|translate|scale|rotate|perspective|filter/,Fo=/paint|layout|strict|content/,Ho=e=>!!e&&"none"!==e;function Wo(e){const t=jo(e)?zo(e):e;return Ho(t.transform)||Ho(t.translate)||Ho(t.scale)||Ho(t.rotate)||Ho(t.perspective)||!Uo()&&(Ho(t.backdropFilter)||Ho(t.filter))||_o.test(t.willChange||"")||Fo.test(t.contain||"")}function Uo(){return null==Lo&&(Lo="undefined"!=typeof CSS&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Lo}function Vo(e){return/^(html|body|#document)$/.test(Eo(e))}function zo(e){return xo(e).getComputedStyle(e)}function Bo(e){return jo(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function $o(e){if("html"===Eo(e))return e;const t=e.assignedSlot||e.parentNode||Ao(e)&&e.host||Co(e);return Ao(t)?t.host:t}function qo(e){const t=$o(e);return Vo(t)?e.ownerDocument?e.ownerDocument.body:e.body:Ro(t)&&No(t)?t:qo(t)}function Yo(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const o=qo(e),i=o===(null==(r=e.ownerDocument)?void 0:r.body),a=xo(o);if(i){const e=Xo(a);return t.concat(a,a.visualViewport||[],No(o)?o:[],e&&n?Yo(e):[])}return t.concat(o,Yo(o,[],n))}function Xo(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Go(e){const t=zo(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Ro(e),i=o?e.offsetWidth:n,a=o?e.offsetHeight:r,s=to(n)!==i||to(r)!==a;return s&&(n=i,r=a),{width:n,height:r,$:s}}function Ko(e){return jo(e)?e:e.contextElement}function Jo(e){const t=Ko(e);if(!Ro(t))return ro(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=Go(t);let a=(i?to(n.width):n.width)/r,s=(i?to(n.height):n.height)/o;return a&&Number.isFinite(a)||(a=1),s&&Number.isFinite(s)||(s=1),{x:a,y:s}}var Zo=/* @__PURE__ */ro(0);function Qo(e){const t=xo(e);return Uo()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:Zo}function ei(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const o=e.getBoundingClientRect(),i=Ko(e);let a=ro(1);t&&(r?jo(r)&&(a=Jo(r)):a=Jo(e));const s=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==xo(e))&&t}(i,n,r)?Qo(i):ro(0);let c=(o.left+s.x)/a.x,u=(o.top+s.y)/a.y,l=o.width/a.x,f=o.height/a.y;if(i){const e=xo(i),t=r&&jo(r)?xo(r):r;let n=e,o=Xo(n);for(;o&&r&&t!==n;){const e=Jo(o),t=o.getBoundingClientRect(),r=zo(o),i=t.left+(o.clientLeft+parseFloat(r.paddingLeft))*e.x,a=t.top+(o.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,u*=e.y,l*=e.x,f*=e.y,c+=i,u+=a,n=xo(o),o=Xo(n)}}return Oo({width:l,height:f,x:c,y:u})}function ti(e,t){const n=Bo(e).scrollLeft;return t?t.left+n:ei(Co(e)).left+n}function ni(e,t){const n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-ti(e,n),y:n.top+t.scrollTop}}function ri(e,t,n){let r;if("viewport"===t)r=function(e,t){const n=xo(e),r=Co(e),o=n.visualViewport;let i=r.clientWidth,a=r.clientHeight,s=0,c=0;if(o){i=o.width,a=o.height;const e=Uo();(!e||e&&"fixed"===t)&&(s=o.offsetLeft,c=o.offsetTop)}const u=ti(r);if(u<=0){const e=r.ownerDocument,t=e.body,n=getComputedStyle(t),o="CSS1Compat"===e.compatMode&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,a=Math.abs(r.clientWidth-t.clientWidth-o);a<=25&&(i-=a)}else u<=25&&(i+=u);return{width:i,height:a,x:s,y:c}}(e,n);else if("document"===t)r=function(e){const t=Co(e),n=Bo(e),r=e.ownerDocument.body,o=eo(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=eo(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+ti(e);const s=-n.scrollTop;return"rtl"===zo(r).direction&&(a+=eo(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:a,y:s}}(Co(e));else if(jo(t))r=function(e,t){const n=ei(e,!0,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=Ro(e)?Jo(e):ro(1);return{width:e.clientWidth*i.x,height:e.clientHeight*i.y,x:o*i.x,y:r*i.y}}(t,n);else{const n=Qo(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return Oo(r)}function oi(e,t){const n=$o(e);return!(n===t||!jo(n)||Vo(n))&&("fixed"===zo(n).position||oi(n,t))}function ii(e,t){const n=t.get(e);if(n)return n;let r=Yo(e,[],!1).filter(e=>jo(e)&&"body"!==Eo(e)),o=null;const i="fixed"===zo(e).position;let a=i?$o(e):e;for(;jo(a)&&!Vo(a);){const t=zo(a),n=Wo(a);n||"fixed"!==t.position||(o=null),(i?!n&&!o:!n&&"static"===t.position&&o&&("absolute"===o.position||"fixed"===o.position)||No(a)&&!n&&oi(e,a))?r=r.filter(e=>e!==a):o=t,a=$o(a)}return t.set(e,r),r}function ai(e,t,n){const r=Ro(t),o=Co(t),i="fixed"===n,a=ei(e,!0,i,t);let s={scrollLeft:0,scrollTop:0};const c=ro(0);function u(){c.x=ti(o)}if(r||!r&&!i)if(("body"!==Eo(t)||No(o))&&(s=Bo(t)),r){const e=ei(t,!0,i,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}else o&&u();i&&!r&&o&&u();const l=!o||r||i?ro(0):ni(o,s);return{x:a.left+s.scrollLeft-c.x-l.x,y:a.top+s.scrollTop-c.y-l.y,width:a.width,height:a.height}}function si(e){return"static"===zo(e).position}function ci(e,t){if(!Ro(e)||"fixed"===zo(e).position)return null;if(t)return t(e);let n=e.offsetParent;return Co(e)===n&&(n=n.ownerDocument.body),n}function ui(e,t){const n=xo(e);if(Mo(e))return n;if(!Ro(e)){let t=$o(e);for(;t&&!Vo(t);){if(jo(t)&&!si(t))return t;t=$o(t)}return n}let r=ci(e,t);for(;r&&ko(r)&&si(r);)r=ci(r,t);return r&&Vo(r)&&si(r)&&!Wo(r)?n:r||function(e){let t=$o(e);for(;Ro(t)&&!Vo(t);){if(Wo(t))return t;if(Mo(t))return null;t=$o(t)}return null}(e)||n}var li={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i="fixed"===o,a=Co(r),s=!!t&&Mo(t.floating);if(r===a||s&&i)return n;let c={scrollLeft:0,scrollTop:0},u=ro(1);const l=ro(0),f=Ro(r);if((f||!f&&!i)&&(("body"!==Eo(r)||No(a))&&(c=Bo(r)),f)){const e=ei(r);u=Jo(r),l.x=e.x+r.clientLeft,l.y=e.y+r.clientTop}const d=!a||f||i?ro(0):ni(a,c);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-c.scrollLeft*u.x+l.x+d.x,y:n.y*u.y-c.scrollTop*u.y+l.y+d.y}},getDocumentElement:Co,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[..."clippingAncestors"===n?Mo(t)?[]:ii(t,this._c):[].concat(n),r],a=ri(t,i[0],o);let s=a.top,c=a.right,u=a.bottom,l=a.left;for(let f=1;f<i.length;f++){const e=ri(t,i[f],o);s=eo(e.top,s),c=Qr(e.right,c),u=Qr(e.bottom,u),l=eo(e.left,l)}return{width:c-l,height:u-s,x:l,y:s}},getOffsetParent:ui,getElementRects:async function(e){const t=this.getOffsetParent||ui,n=this.getDimensions,r=await n(e.floating);return{reference:ai(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:n}=Go(e);return{width:t,height:n}},getScale:Jo,isElement:jo,isRTL:function(e){return"rtl"===zo(e).direction}};function fi(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}var di=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:a,middlewareData:s}=t,c=await async function(e,t){const{placement:n,platform:r,elements:o}=e,i=await(null==r.isRTL?void 0:r.isRTL(o.floating)),a=so(n),s=co(n),c="y"===fo(n),u=To.has(a)?-1:1,l=i&&c?-1:1,f=ao(t,e);let{mainAxis:d,crossAxis:h,alignmentAxis:g}="number"==typeof f?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return s&&"number"==typeof g&&(h="end"===s?-1*g:g),c?{x:h*l,y:d*u}:{x:d*u,y:h*l}}(t,e);return a===(null==(n=s.offset)?void 0:n.placement)&&null!=(r=s.arrow)&&r.alignmentOffset?{}:{x:o+c.x,y:i+c.y,data:{...c,placement:a}}}}},hi=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o,platform:i}=t,{mainAxis:a=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...u}=ao(e,t),l={x:n,y:r},f=await i.detectOverflow(t,u),d=fo(so(o)),h=uo(d);let g=l[h],p=l[d];if(a){const e="y"===h?"bottom":"right";g=io(g+f["y"===h?"top":"left"],g,g-f[e])}if(s){const e="y"===d?"bottom":"right";p=io(p+f["y"===d?"top":"left"],p,p-f[e])}const v=c.fn({...t,[h]:g,[d]:p});return{...v,data:{x:v.x-n,y:v.y-r,enabled:{[h]:a,[d]:s}}}}}},gi=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:a,initialPlacement:s,platform:c,elements:u}=t,{mainAxis:l=!0,crossAxis:f=!0,fallbackPlacements:d,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:p=!0,...v}=ao(e,t);if(null!=(n=i.arrow)&&n.alignmentOffset)return{};const m=so(o),y=fo(s),w=so(s)===s,b=await(null==c.isRTL?void 0:c.isRTL(u.floating)),O=d||(w||!p?[wo(s)]:function(e){const t=wo(e);return[go(e),t,go(t)]}(s)),S="none"!==g;!d&&S&&O.push(...function(e,t,n,r){const o=co(e);let i=function(e,t,n){switch(e){case"top":case"bottom":return n?t?vo:po:t?po:vo;case"left":case"right":return t?mo:yo;default:return[]}}(so(e),"start"===n,r);return o&&(i=i.map(e=>e+"-"+o),t&&(i=i.concat(i.map(go)))),i}(s,p,g,b));const D=[s,...O],T=await c.detectOverflow(t,v),I=[];let E=(null==(r=i.flip)?void 0:r.overflows)||[];if(l&&I.push(T[m]),f){const e=function(e,t,n){void 0===n&&(n=!1);const r=co(e),o=ho(e),i=lo(o);let a="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=wo(a)),[a,wo(a)]}(o,a,b);I.push(T[e[0]],T[e[1]])}if(E=[...E,{placement:o,overflows:I}],!I.every(e=>e<=0)){var x,C;const e=((null==(x=i.flip)?void 0:x.index)||0)+1,t=D[e];if(t&&("alignment"!==f||y===fo(t)||E.every(e=>fo(e.placement)!==y||e.overflows[0]>0)))return{data:{index:e,overflows:E},reset:{placement:t}};let n=null==(C=E.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:C.placement;if(!n)switch(h){case"bestFit":{var P;const e=null==(P=E.filter(e=>{if(S){const t=fo(e.placement);return t===y||"y"===t}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0])?void 0:P[0];e&&(n=e);break}case"initialPlacement":n=s}if(o!==n)return{reset:{placement:n}}}return{}}}},pi=/* @__PURE__ */g({props:{opts:{type:Object,default:()=>({})}},setup(e,t){const n=u("popover"),r=j(!1),o=j(),a=j(),s=P({}),{width:c,height:l,maxHeight:f}=e.opts;c&&(V(c)?s.width=`${c}px`:s.width=c),l&&(V(l)?s.height=`${l}px`:s.height=l),f&&(V(f)?s.maxHeight=`${f}px`:s.maxHeight=f);const d=new i({dismiss:e=>{t.emit("dismiss",e)}});function g(e){return d.dismiss(e)}let p=()=>{};x(()=>{p()}),be(o,()=>{g({ok:!1})}),t.expose({present:async function(t){r.value=!0,p=function(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a="function"==typeof ResizeObserver,layoutShift:s="function"==typeof IntersectionObserver,animationFrame:c=!1}=r,u=Ko(e),l=o||i?[...u?Yo(u):[],...t?Yo(t):[]]:[];l.forEach(e=>{o&&e.addEventListener("scroll",n,{passive:!0}),i&&e.addEventListener("resize",n)});const f=u&&s?function(e,t){let n,r=null;const o=Co(e);function i(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}return function a(s,c){void 0===s&&(s=!1),void 0===c&&(c=1),i();const u=e.getBoundingClientRect(),{left:l,top:f,width:d,height:h}=u;if(s||t(),!d||!h)return;const g={rootMargin:-no(f)+"px "+-no(o.clientWidth-(l+d))+"px "+-no(o.clientHeight-(f+h))+"px "+-no(l)+"px",threshold:eo(0,Qr(1,c))||1};let p=!0;function v(t){const r=t[0].intersectionRatio;if(r!==c){if(!p)return a();r?a(!1,r):n=setTimeout(()=>{a(!1,1e-7)},1e3)}1!==r||fi(u,e.getBoundingClientRect())||a(),p=!1}try{r=new IntersectionObserver(v,{...g,root:o.ownerDocument})}catch(m){r=new IntersectionObserver(v,g)}r.observe(e)}(!0),i}(u,n):null;let d,h=-1,g=null;a&&(g=new ResizeObserver(e=>{let[r]=e;r&&r.target===u&&g&&t&&(g.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var e;null==(e=g)||e.observe(t)})),n()}),u&&!c&&g.observe(u),t&&g.observe(t));let p=c?ei(e):null;return c&&function t(){const r=ei(e);p&&!fi(p,r)&&n(),p=r,d=requestAnimationFrame(t)}(),n(),()=>{var e;l.forEach(e=>{o&&e.removeEventListener("scroll",n),i&&e.removeEventListener("resize",n)}),null==f||f(),null==(e=g)||e.disconnect(),g=null,c&&cancelAnimationFrame(d)}}(t,o.value,()=>async function(e,t,n,r){const o=[di(r.offsetOpts||6),gi(),hi()];r.noArrow||o.push((e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:a,elements:s,middlewareData:c}=t,{element:u,padding:l=0}=ao(e,t)||{};if(null==u)return{};const f=bo(l),d={x:n,y:r},h=ho(o),g=lo(h),p=await a.getDimensions(u),v="y"===h,m=v?"top":"left",y=v?"bottom":"right",w=v?"clientHeight":"clientWidth",b=i.reference[g]+i.reference[h]-d[h]-i.floating[g],O=d[h]-i.reference[h],S=await(null==a.getOffsetParent?void 0:a.getOffsetParent(u));let D=S?S[w]:0;D&&await(null==a.isElement?void 0:a.isElement(S))||(D=s.floating[w]||i.floating[g]);const T=b/2-O/2,I=D/2-p[g]/2-1,E=Qr(f[m],I),x=Qr(f[y],I),C=E,P=D-p[g]-x,j=D/2-p[g]/2+T,R=io(C,j,P),A=!c.arrow&&null!=co(o)&&j!==R&&i.reference[g]/2-(j<C?E:x)-p[g]/2<0,N=A?j<C?j-C:j-P:0;return{[h]:d[h]+N,data:{[h]:R,centerOffset:j-R-N,...A&&{alignmentOffset:N}},reset:A}}}))({element:n}));const i={placement:r.placement,strategy:"absolute",middleware:o};r.options&&Object.assign(i,r.options);const a=await((e,t,n)=>{const r=/* @__PURE__ */new Map,o={platform:li,...n},i={...o.platform,_c:r};return(async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:a}=n,s=a.detectOverflow?a:{...a,detectOverflow:Do},c=await(null==a.isRTL?void 0:a.isRTL(t));let u=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:l,y:f}=So(u,r,c),d=r,h=0;const g={};for(let p=0;p<i.length;p++){const n=i[p];if(!n)continue;const{name:v,fn:m}=n,{x:y,y:w,data:b,reset:O}=await m({x:l,y:f,initialPlacement:r,placement:d,strategy:o,middlewareData:g,rects:u,platform:s,elements:{reference:e,floating:t}});l=null!=y?y:l,f=null!=w?w:f,g[v]={...g[v],...b},O&&h<50&&(h++,"object"==typeof O&&(O.placement&&(d=O.placement),O.rects&&(u=!0===O.rects?await a.getElementRects({reference:e,floating:t,strategy:o}):O.rects),({x:l,y:f}=So(u,d,c))),p=-1)}return{x:l,y:f,placement:d,strategy:o,middlewareData:g}})(e,t,{...o,platform:i})})(e,t,i);{const{x:e,y:o,placement:i,middlewareData:s}=a,{style:c}=t;if(c.left=`${e}px`,c.top=`${o}px`,!r.noArrow){const{x:e,y:t}=s.arrow,r={top:"bottom",right:"left",bottom:"top",left:"right"}[i.split("-")[0]];Object.assign(n.style,{left:null!=e?`${e}px`:"",top:null!=t?`${t}px`:"",right:"",bottom:"",[r]:"-4px"})}}}(t,o.value,a.value,e.opts))},dismiss:g});const{getAntdLocale:v}=Xr();return()=>{var i,c;const u=null===(i=(c=t.slots).default)||void 0===i?void 0:i.call(c);u&&u.length>0&&u[0].props&&(u[0].props.modal=d);const l=h("div",{class:[n.b(),n.is("show",r.value),e.opts.className],ref:o,style:s,onClick:e=>{e.stopPropagation()}},[!e.opts.noArrow&&h("div",{class:[n.e("arrow")],ref:a},null),u]);return!0===e.opts.autoClose?h("div",{class:[n.e("overlay")],onClick:()=>{!0===e.opts.autoClose&&g()}},[l]):h($,{locale:v.value},{default:()=>{return[h(Xn,{backend:$r},(e=l,"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!O(e)?l:{default:()=>[l]}))];var e}})}}}),vi=/* @__PURE__ */g({name:"AppFullScreenContainer",props:{opts:{type:Object,default:()=>({})}},setup(e,t){const n=u("app-full-screen-container"),r=j(!1),o=j({});e.opts&&Object.assign(o.value,e.opts);let a=null;const s=new i({dismiss:e=>{r.value=!1,a=e,t.emit("dismiss",a)}});C("modal",s);const c=e=>s.dismiss(e);t.expose({present:()=>{r.value=!0},dismiss:c,ok:async()=>{if(s.ok){const e=await s.ok();e&&e.ok&&c(e)}else console.warn("打开模态未实现ok方法")},cancel:()=>s.cancel?s.cancel():c()});const{getAntdLocale:l}=Xr();return()=>{var e,i;let a;const c=null===(e=(i=t.slots).default)||void 0===e?void 0:e.call(i);return c&&c.length>0&&c[0].props&&(c[0].props.modal=s),h($,{locale:l.value},{default:()=>{return[h(Xn,{backend:$r},(e=a=m("div",{class:[n.b(),n.is("is-hidden",!0!==r.value),o.value.containerClass],...o.value},[c]),"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!O(e)?a:{default:()=>[a]}))];var e}})}}});function mi(e){return z(e)?R(e):e}var yi=class{async modal(e,t,n){const r=this.createModal(e,t,n);return r.present(),r.onWillDismiss()}createModal(e,t,n){return function(e,t){return new a(Zr,e,t)}(U(e)?e:()=>m(mi(e),{...t}),n)}popover(e,t,n,r){const o=this.createPopover(t,n,r);return o.present(e),o.onWillDismiss()}createPopover(e,t,n){return function(e,t){return new s(pi,e,t)}(U(e)?e:()=>m(mi(e),{...t}),n)}fullScreen(e,t,n){const r=this.createFullScreen(e,t,n);return r.present(),r.onWillDismiss()}createFullScreen(e,t,n){return function(e,t){return new a(vi,e,t)}(U(e)?e:()=>m(mi(e),{...t}),n)}},wi=new yi,bi=(e,t)=>(e.install=n=>{const r=e.name||e.displayName||e.__name;r&&(n.component(r,e),t&&(n.config.globalProperties[t]=e))},e),Oi={childrenFields:["children"]},Si=/* @__PURE__ */new Error("中断操作");function Di(e,t){for(const n of t){const t=e[n];if(Array.isArray(t)&&t.length>0)return t}}function Ti(e,t,n,r){const{childrenFields:o}=B({},Oi,r||{});if(null==t?void 0:t.length)for(let i=0;i<t.length;i++){const a=t[i];if(n({item:a,index:i,parent:e}))throw Si;const s=Di(a,o);(null==s?void 0:s.length)&&Ti(a,s,n,r)}}function Ii(e,t,n){const{childrenFields:r}=B({},Oi,n||{});try{const o=Array.isArray(e)?void 0:e,i=Array.isArray(e)?e:Di(e,r);(null==i?void 0:i.length)?Ti(o,i,t,n):console.warn("没有可遍历的数组",e,n)}catch(o){if(o!==Si)throw o}}var Ei={...Oi,compareField:"id",compareCallback:({item:e,key:t,compareField:n})=>e[n]===t};function xi(e,t,n){const{compareField:r,compareCallback:o}=B({},Ei,n||{});let i,a;return Ii(e,e=>{if(o({...e,key:t,compareField:r}))return i=e.item,a=e.parent,!0},n),i?{child:i,parent:a}:void 0}function Ci(e,t){const n=e=>Ci(e,t);return e.map(e=>t(e,n))}function Pi(e,t,n){const{childrenFields:r}=B({},Oi,n||{});return function e(n,o){return n.filter(n=>{console.log("item",n.title);const i=Di(n,r);let a=[];return(null==i?void 0:i.length)&&(a=e(i,n)),n[r[0]]=a,!!a.length||t(n,o)})}(e)}var ji=(e,t)=>{const n=e.__vccOpts||e;for(const[r,o]of t)n[r]=o;return n};export{he as A,Ee as C,Ue as D,Re as E,de as O,je as S,Ie as T,$e as _,Ci as a,be as b,wi as c,Xr as d,Tr as f,Be as g,Ct as h,Ii as i,ge as j,le as k,Jr as l,Pt as m,Pi as n,bi as o,wr as p,xi as r,yi as s,ji as t,Kr as u,ze as v,Se as w,Pe as x,Ve as y};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{n as e}from"./chunk-DPOkwzLC.js";import{B as t,C as a,D as l,F as n,G as o,H as i,I as r,J as s,K as u,L as d,M as c,N as p,P as v,R as h,S as g,U as m,V as f,W as b,X as y,Y as w,Z as x,j as C,lt as E,q as _,r as k,t as S,w as A,z as B}from"./ColorPicker-BDeYRWA2.js";import{E as T,S as R,T as D,k as L,t as M}from"./_plugin-vue_export-helper-CGzGcWFX.js";import{ExpressionModeEnum as I,ExpressionTabEnum as z,FIELD_TYPE as N,ToolkitEnum as F,t as V,useNamespace as O}from"@gct-paas/core";import{Fragment as P,computed as U,createBlock as W,createCommentVNode as $,createElementBlock as K,createElementVNode as H,createTextVNode as X,createVNode as j,defineComponent as G,h as Y,inject as Z,mergeProps as Q,nextTick as q,normalizeClass as J,normalizeStyle as ee,onMounted as te,onUnmounted as ae,openBlock as le,provide as ne,reactive as oe,ref as ie,renderList as re,renderSlot as se,resolveComponent as ue,resolveDirective as de,resolveDynamicComponent as ce,toDisplayString as pe,toRaw as ve,unref as he,useCssVars as ge,vShow as me,watch as fe,withCtx as be,withDirectives as ye,withKeys as we,withModifiers as xe}from"vue";import{cloneDeep as Ce,isEqual as Ee}from"lodash-es";import{Empty as _e,Tooltip as ke,message as Se}from"ant-design-vue";var Ae=ie(F.OUTLINE),Be=ie([]),Te=ie(!0),Re=ie(!1),De=ie(!1);function Le(){return{toolkit:Ae,toolkitShow:Te,toolkitFixed:Re,toolkitPinned:De,toggleToolkit:function(e,t){De.value&&!t||(Ae.value=e,Te.value=!0)},pinnedToolkit:function(){De.value=!De.value},toolkitWidgets:Be,fixedToolkit:function(){Re.value=!Re.value}}}var Me={class:"element-menu-wrapper"},Ie={class:"title py8px"},ze={class:"comp-menu"},Ne=["title","onDragstart","onClick"],Fe={class:"comp-menu__el"},Ve=/* @__PURE__ */M(/* @__PURE__ */G({__name:"toolkit-widgets",setup(e){const{clearSelectedElements:t,registerElement:a}=r(),{project:l}=B(),n=e=>({zIndex:"auto",top:0,left:0,bottom:"auto",right:"auto",...e});return(e,o)=>(le(),K("div",Me,[(le(!0),K(P,null,re(he(y),e=>(le(),K("div",{key:e.label},[H("div",Ie,pe(e.label),1),H("div",ze,[(le(!0),K(P,null,re(e.children,e=>(le(),K("div",{key:e.type,class:"comp-menu__el-wrap",title:e.displayName,draggable:"true",onDragstart:t=>((e,t)=>{e.dataTransfer&&(e.dataTransfer.dropEffect="copy",e.dataTransfer.effectAllowed="all",e.dataTransfer.setData("text/plain",JSON.stringify(n(t))))})(t,e),onClick:o=>{return i=e,t(),void a({pageId:l.value.id,el:n(i)});var i}},[H("div",Fe,[H("i",{class:J(["iconfont","icon-"+e.iconName])},null,2),H("span",null,pe(e.displayName),1)])],40,Ne))),128))])]))),128))]))}}),[["__scopeId","data-v-a787d212"]]),Oe={class:"designer-toolkit__header"},Pe=/* @__PURE__ */G({name:"LabelToolkit",__name:"toolkit",setup(e){const{fixedToolkit:t,toolkitFixed:a}=Le();return(e,l)=>{const n=ue("pushpin-outlined"),o=ue("pushpin-filled"),i=ue("a-button"),r=de("dragResize");return ye((le(),K("div",{class:J(["designer-toolkit",he(a)?"fixed-panel":null])},[j(i,{type:"link",class:"fixed-icon",onClick:he(t)},{icon:be(()=>[he(a)?(le(),W(o,{key:1})):(le(),W(n,{key:0}))]),_:1},8,["onClick"]),H("div",Oe,pe(he(V)("sys.pageDesigner.widget")),1),H("div",null,[j(Ve)])],2)),[[r,264]])}}}),Ue=/* @__PURE__ */M(Pe,[["__scopeId","data-v-528fc024"]]);function We(e,t,a,l,n,o){o?n.moveTo(e,0):n.moveTo(0,e),n.save(),o?n.translate(e+5,.2*l):n.translate(.1*a,e+32),o||n.rotate(-Math.PI/2),n.fillText(Math.round(t).toString(),4,7),n.restore(),o?n.lineTo(e,l):n.lineTo(a,e),n.stroke(),n.closePath(),n.setTransform(1,0,0,1,0,0)}function $e(e,t,a,l,n,o){l.fillStyle=n.fontShadowColor,l.strokeStyle=n.longfgColor,l.save(),l.translate(e,t),o||l.rotate(-Math.PI/2),l.font="bold 12px Aria",l.fillText(String(a),0,0),l.restore()}function Ke(e,t=100){let a=null;const l=function(...l){null!==a&&clearTimeout(a),a=setTimeout(()=>{e(...l)},t)};return l.cancel=function(){null!==a&&(clearTimeout(a),a=null)},l}function He(e,t){const a=ie(0),l=ie(0),n=ie(!1),o=U(()=>({backgroundColor:e.palette.hoverBg,color:e.palette.hoverColor,[t?"top":"left"]:"-8px",[t?"left":"top"]:`${a.value+10}px`})),i=({offsetX:e,offsetY:l})=>{a.value=t?e:l},r=a=>{const l=t?e.canvasHeight:e.canvasWidth;return a<0||a>l},s=U(()=>r(l.value)?"放开删除":`${t?"Y":"X"}:${l.value*e.rate}`),u=Ke(()=>{n.value=!1},200),d=Ke(()=>{n.value=!0},200);return{showLabel:n,startValue:l,actionStyle:o,labelContent:s,handleMouseDown:(a,n)=>new Promise(o=>{if(e.lockLine)return;const s=t?a.clientY:a.clientX;i(a);const u=n||l.value;let d=u;const c=a=>{let n=((t?a.clientY:a.clientX)-s)/e.scale+u,o=n;const i=(t?e.snapsObj.h:e.snapsObj.v).slice().sort((e,t)=>Math.abs(o-e)-Math.abs(o-t));i.length&&Math.abs(i[0]-n)<e.snapThreshold/e.scale&&(o=i[0],n=o),d=Math.round(n),l.value=d};document.addEventListener("mousemove",c),document.addEventListener("mouseup",()=>{document.removeEventListener("mousemove",c),((a,l)=>{var n,o;const i=t?null===(n=e.lines)||void 0===n?void 0:n.h:null===(o=e.lines)||void 0===o?void 0:o.v,s=r(a);if(i)if(s){if("number"!=typeof l)return;i.splice(l,1)}else"number"!=typeof l?i.push(a):i[l]=a})(d,e.index),o()},{once:!0})}),handleMouseenter:t=>{e.lockLine||(i(t),d(),u.cancel())},handleMouseLeave:()=>{u()}}}var Xe={key:0,class:"value"},je=/* @__PURE__ */G({__name:"ruler-line",props:{scale:{},palette:{},index:{},start:{},vertical:{type:Boolean},value:{},canvasWidth:{},canvasHeight:{},lines:{},isShowReferLine:{type:Boolean},rate:{},snapThreshold:{},snapsObj:{},lockLine:{type:Boolean}},setup(e){const t=e,a=ie(!1),{actionStyle:l,handleMouseDown:n,labelContent:o,startValue:i,showLabel:r,handleMouseenter:s,handleMouseLeave:u}=He(t,t.vertical),d=U(()=>i.value>=t.start),c=U(()=>{const{lineType:e,lockLineColor:l,lineColor:n}=t.palette,o=t.lockLine?l:n??"black",r=t.lockLine||a.value?"none":"auto",s=t.isShowReferLine&&!t.lockLine?t.vertical?"ns-resize":"ew-resize":"default",u=t.vertical?"borderTop":"borderLeft",d=(i.value-t.start)*t.scale;return{[u]:`1px ${e} ${o}`,pointerEvents:r,cursor:s,[t.vertical?"top":"left"]:`${d}px`}});te(()=>{i.value=t.value??0});const p=Ke(()=>{a.value=!1},1e3);return fe([()=>t.scale],()=>{a.value=!0,p()}),(e,t)=>ye((le(),K("div",{class:"line",style:ee(c.value),onMouseenter:t[0]||(t[0]=xe((...e)=>he(s)&&he(s)(...e),["stop"])),onMouseleave:t[1]||(t[1]=xe((...e)=>he(u)&&he(u)(...e),["stop"])),onMousedown:t[2]||(t[2]=xe((...e)=>he(n)&&he(n)(...e),["stop"]))},[H("div",{class:"action",style:ee(he(l))},[he(r)?(le(),K("span",Xe,pe(he(o)),1)):$("",!0)],4)],36)),[[me,d.value]])}}),Ge=/* @__PURE__ */G({__name:"index",props:{scale:{},palette:{},vertical:{type:Boolean},showShadowText:{type:Boolean},start:{},width:{},height:{},selectStart:{},selectLength:{},canvasWidth:{},canvasHeight:{},rate:{},gridRatio:{}},emits:["handleDragStart"],setup(e,{emit:t}){const a=e,l=t,n=oe({isDragging:!1,canvasContext:null});let o=window.devicePixelRatio;const i=ie(null);te(()=>{window.addEventListener("resize",r),s(),d(o),c(o)});const r=()=>{o=window.devicePixelRatio,d(o),c(o)},s=()=>{var e;n.canvasContext=(null===(e=i.value)||void 0===e?void 0:e.getContext("2d"))||null},u=U(()=>({width:a.width+"px",height:a.height+"px",cursor:a.vertical?"ew-resize":"ns-resize",[a.vertical?"borderRight":"borderBottom"]:`1px solid ${a.palette.borderColor||"#eeeeef"} `}));ae(()=>{window.removeEventListener("resize",r)});const d=e=>{if(i.value){i.value.width=Math.round(a.width*e),i.value.height=Math.round(a.height*e);const t=n.canvasContext;t&&(t.font='11px -apple-system,\n "Helvetica Neue", ".SFNSText-Regular",\n "SF UI Text", Arial, "PingFang SC", "Hiragino Sans GB",\n "Microsoft YaHei", "WenQuanYi Zen Hei", sans-serif',t.lineWidth=1,t.textBaseline="middle")}},c=e=>{const t={scale:a.scale,width:a.width,height:a.height,palette:a.palette,canvasWidth:a.canvasWidth,canvasHeight:a.canvasHeight,ratio:e,rate:a.rate,gridRatio:a.gridRatio,showShadowText:a.showShadowText};t.scale=a.scale/a.rate,t.canvasWidth=a.canvasWidth*a.rate,t.canvasHeight=a.canvasHeight*a.rate,n.canvasContext&&((e,t,a,l,n,o)=>{const{scale:i,width:r,height:s,ratio:u,palette:d,gridRatio:c,showShadowText:p}=n,{bgColor:v,fontColor:h,shadowColor:g,longfgColor:m}=d,f=o?n.canvasWidth:n.canvasHeight;e.setTransform(1,0,0,1,0,0),e.scale(u,u),e.clearRect(0,0,r,s),e.fillStyle=v,e.fillRect(0,0,r,s);const b=(e=>e<=.25?40:e<=.5?20:e<=1?10:e<=2?5:e<=4?2:1)(i)*c*10,y=b*i,w=Math.floor(t/b)*b,x=(w-t)/b*y,C=t+Math.ceil((o?r:s)/i);if(l){const n=(a-t)*i,u=l*i;e.fillStyle=g,o?e.fillRect(n,0,u,s):e.fillRect(0,n,r,u),p&&(o?($e(n,.4*s,Math.round(a),e,d,o),$e((a+l-t)*i,.4*s,Math.round(a+l),e,d,o)):($e(.4*r,n,Math.round(a),e,d,o),$e(.4*r,(a+l-t)*i,Math.round(a+l),e,d,o)))}e.beginPath(),e.fillStyle=h,e.strokeStyle=m;for(let E=w,_=0;E<C;E+=b,_++){const t=x+_*y+.5;if(E-b<f&&E>f||E==f)return void We(x+_*y+.5+(f-E)*i,f,r,s,e,o);E>=0&&E<=f&&(0==E?o?(e.moveTo(t,0),e.lineTo(t,s)):(e.moveTo(0,t),e.lineTo(r,t)):o?(e.moveTo(t,20),e.lineTo(t,s/1.3)):(e.moveTo(20,t),e.lineTo(r/1.3,t)),e.save(),0==E?o?e.translate(t-15,.01*s):e.translate(.3*r,t-5):o?e.translate(t-12,.05*s):e.translate(.05*r,t+12),o||e.rotate(-Math.PI/2),f-E>b/2&&(!p||0==l||Math.abs(E-a)>b/2&&Math.abs(E-(a+l))>b/2)&&e.fillText(E.toString(),4,9),e.restore())}e.stroke(),e.closePath()})(n.canvasContext,a.start*a.rate,a.selectStart,a.selectLength,t,!a.vertical)};fe([()=>a.width,()=>a.height,()=>a.start,()=>a.palette,()=>a.selectStart,()=>a.selectLength],()=>{c(o)}),fe([()=>a.width,()=>a.height],()=>{d(o)});const p=e=>{l("handleDragStart",e)};return(e,t)=>(le(),K("canvas",{ref_key:"canvas",ref:i,class:"ruler",style:ee(u.value),onMousedown:xe(p,["stop"])},null,36))}}),Ye={class:"lines"},Ze={key:0,class:"value"},Qe=/* @__PURE__ */G({__name:"ruler-wrapper",props:{scale:{},thick:{},canvasWidth:{},canvasHeight:{},palette:{},vertical:{type:Boolean},width:{},height:{},start:{},startOther:{},lines:{},selectStart:{},selectLength:{},isShowReferLine:{type:Boolean},rate:{},snapThreshold:{},snapsObj:{},gridRatio:{},lockLine:{type:Boolean},showShadowText:{type:Boolean}},emits:["changeLineState"],setup(e,{emit:t}){const a=e,{showLabel:l,actionStyle:n,handleMouseenter:o,handleMouseLeave:i,handleMouseDown:r,labelContent:s,startValue:u}=He(a,!a.vertical),d=ie(!1),c=ie(!1),p=U(()=>a.vertical?"v-container":"h-container"),v=t,h=U(()=>{var e,t;return a.vertical?null===(e=a.lines)||void 0===e?void 0:e.h:null===(t=a.lines)||void 0===t?void 0:t.v}),g=U(()=>{const e=a.palette.lineType;let t=a.vertical?"left":"top",l=a.vertical?"top":"left",n=a.vertical?"borderLeft":"borderBottom";const o=(u.value-a.startOther)*a.scale+a.thick;return{[t]:o+"px",[l]:-a.thick+"px",cursor:a.vertical?"ew-resize":"ns-resize",[n]:`1px ${e} ${a.palette.lineColor}`}}),m=async e=>{const{offsetX:t,offsetY:l}=e,{scale:n,vertical:o,thick:i,startOther:s}=a;if(!d.value){c.value=!0,v("changeLineState",!1);let a=Math.round(s-i/n+(o?t:l)/n);u.value=a,await r(e,a),c.value=!1}};return fe([()=>a.lockLine],()=>{d.value=a.lockLine}),(t,a)=>(le(),K("div",{class:J(p.value)},[j(Ge,Q(t.$props,{onHandleDragStart:m}),null,16),ye(H("div",Ye,[(le(!0),K(P,null,re(h.value,(e,a)=>(le(),W(je,Q({key:e+a,index:a,value:0|e},{ref_for:!0},t.$props),null,16,["index","value"]))),128))],512),[[me,e.isShowReferLine]]),e.isShowReferLine?ye((le(),K("div",{key:0,class:"indicator",style:ee(g.value),onMouseenter:a[0]||(a[0]=(...e)=>he(o)&&he(o)(...e)),onMouseleave:a[1]||(a[1]=(...e)=>he(i)&&he(i)(...e))},[H("div",{class:"action",style:ee(he(n))},[he(l)?(le(),K("span",Ze,pe(he(s)),1)):$("",!0)],4)],36)),[[me,c.value]]):$("",!0)],2))}});function qe(e,t){let a=e.length;for(;a--;)if(e[a].pointerId===t.pointerId)return a;return-1}function Je(e,t){const a=qe(e,t);a>-1&&e.splice(a,1),e.push(t)}function et(e){const t=e.slice(0);let a,l=t.pop();for(;a=t.pop();)l={clientX:(a.clientX-l.clientX)/2+l.clientX,clientY:(a.clientY-l.clientY)/2+l.clientY};return l}var tt={down:"pointerdown",move:"pointermove",up:"pointerup pointerleave pointercancel"};function at(e,t,a,l){tt[e].split(" ").forEach(e=>{t.addEventListener(e,a,l)})}function lt(e,t,a){tt[e].split(" ").forEach(e=>{t.removeEventListener(e,a)})}var nt=["webkit","moz","ms"],ot={};function it(e){if(ot[e])return ot[e];const t=document.createElement("div").style;if(e in t)return ot[e]=e;const a=e[0].toUpperCase()+e.slice(1);for(let l=nt.length-1;l>=0;l--){const n=`${nt[l]}${a}`;if(n in t)return ot[e]=n}return e}function rt(e,t,a){e.style[it(t)]=a}function st(e,t,a=window.getComputedStyle(e)){const l="border"===t?"Width":"";return{left:parseFloat(a[`${t}Left${l}`])||0,right:parseFloat(a[`${t}Right${l}`])||0,top:parseFloat(a[`${t}Top${l}`])||0,bottom:parseFloat(a[`${t}Bottom${l}`])||0}}function ut(e){const t=e.parentNode,a=window.getComputedStyle(e),l=window.getComputedStyle(t),n=e.getBoundingClientRect(),o=t.getBoundingClientRect();return{elem:{width:n.width,height:n.height,left:n.left,top:n.top,margin:st(e,"margin",a),border:st(e,"border",a)},parent:{width:o.width,height:o.height,left:o.left,top:o.top,padding:st(t,"padding",l),border:st(t,"border",l)}}}var dt={animate:!1,canvas:!1,cursor:"move",disablePan:!1,disableZoom:!1,duration:200,easing:"ease-in-out",handleStartEvent:e=>{e.preventDefault(),e.stopPropagation()},maxScale:4,minScale:.125,overflow:"hidden",setTransform:function(e,{x:t,y:a,scale:l},n){rt(e,"transform",`scale(${l}) translate(${t}px, ${a}px)`)},startX:0,startY:0,startScale:1,step:.3,touchAction:"none",origin:"50% 50%"};function ct(e,t){if(!e||1!==e.nodeType)throw new Error("Panzoom requires an element");if(!function(e){let t=e;for(;t&&t.parentNode;){if(t.parentNode===document)return!0;t=t.parentNode instanceof ShadowRoot?t.parentNode.host:t.parentNode}return!1}(e))throw new Error("Panzoom should be called on attached elements");t={...dt,...t};const a=e.parentNode;a.style.overflow=t.overflow,a.style.userSelect="none",a.style.touchAction=t.touchAction,(t.canvas?a:e).style.cursor=t.cursor,e.style.userSelect="none",e.style.touchAction=t.touchAction,rt(e,"transformOrigin","string"==typeof t.origin?t.origin:"50% 50%");let l,n,o,i,r=0,s=0,u=1,d=!1;function c(t,a){const l={x:r,y:s,scale:u};"boolean"==typeof t.animate&&(t.animate?function(e,t){rt(e,"transition",`${it("transform")} ${t.duration}ms ${t.easing}`)}(e,t):rt(e,"transition","none")),t.setTransform(e,l,t);const n=()=>{const l=t.contain&&"none"!==t.contain?ut(e):function(e){const t=e.parentNode,a=e.getBoundingClientRect(),l=t.getBoundingClientRect();return{elem:{width:a.width,height:a.height,left:a.left,top:a.top},parent:{width:l.width,height:l.height,left:l.left,top:l.top}}}(e);!function(t,a){if(a.silent)return;const l=new CustomEvent("panzoomchange",{detail:t});e.dispatchEvent(l)}({x:r,y:s,scale:u,dimsOut:l,originalEvent:a},t)};return t.animate?setTimeout(n,t.duration+50):requestAnimationFrame(n),l}function p(a,l,n,o){const i={...t,...o},d={x:r,y:s,opts:i};if(!i.force&&!0===i.disablePan)return d;if(a=parseFloat(a),l=parseFloat(l),d.x=a,d.y=l,i.contain&&"none"!==i.contain){const t=ut(e),a=t.elem.width/u,l=t.elem.height/u,o=a*n,r=l*n,s=(o-a)/2,c=(r-l)/2;if("inside"===i.contain){const e=(-t.elem.margin.left-t.parent.padding.left+s)/n,a=(t.parent.width-o-t.parent.padding.left-t.elem.margin.left-t.parent.border.left-t.parent.border.right+s)/n;d.x=Math.max(Math.min(d.x,a),e);const l=(-t.elem.margin.top-t.parent.padding.top+c)/n,i=(t.parent.height-r-t.parent.padding.top-t.elem.margin.top-t.parent.border.top-t.parent.border.bottom+c)/n;d.y=Math.max(Math.min(d.y,i),l)}else if("outside"===i.contain){const e=(-(o-t.parent.width)-t.parent.padding.left-t.parent.border.left-t.parent.border.right+s)/n,a=(s-t.parent.padding.left)/n;d.x=Math.max(Math.min(d.x,a),e);const l=(-(r-t.parent.height)-t.parent.padding.top-t.parent.border.top-t.parent.border.bottom+c)/n,i=(c-t.parent.padding.top)/n;d.y=Math.max(Math.min(d.y,i),l)}}return d}function v(a,l){const n={...t,...l},o={scale:u,opts:n};if(!n.force&&n.disableZoom)return o;let i=t.minScale,r=t.maxScale;if(n.contain&&"none"!==n.contain){const a=ut(e),l=a.elem.width/u,n=a.elem.height/u;if(l>1&&n>1){const e=(a.parent.width-a.parent.border.left-a.parent.border.right)/l,o=(a.parent.height-a.parent.border.top-a.parent.border.bottom)/n;"inside"===t.contain?r=Math.min(r,e,o):"outside"===t.contain&&(i=Math.max(i,e,o))}}return o.scale=Math.min(Math.max(a,i),r),o}function h(e,t,a,l){const n=p(e,t,u,a);return r!==n.x||s!==n.y?(r=n.x,s=n.y,c(n.opts,l)):{x:r,y:s,scale:u}}function g(e,t,a){const l=v(e,t),n=l.opts;if(!n.force&&n.disableZoom)return{x:r,y:s,scale:u};e=l.scale;let o=r,i=s;if(n.focal){const t=n.focal;o=(t.x/e-t.x/u+r*e)/e,i=(t.y/e-t.y/u+s*e)/e}const d=p(o,i,e,{relative:!1,force:!0});return r=d.x,s=d.y,u=e,c(n,a)}function m(e,a){const l={...t,animate:!0,...a};return g(u*Math.exp((e?1:-1)*l.step),l)}function f(a,l,n,o){const i=ut(e),r=i.parent.width-i.parent.padding.left-i.parent.padding.right-i.parent.border.left-i.parent.border.right,s=i.parent.height-i.parent.padding.top-i.parent.padding.bottom-i.parent.border.top-i.parent.border.bottom;let d=l.clientX-i.parent.left-i.parent.padding.left-i.parent.border.left-i.elem.margin.left,c=l.clientY-i.parent.top-i.parent.padding.top-i.parent.border.top-i.elem.margin.top;return"0 0"!==t.origin&&(d-=i.elem.width/u/2,c-=i.elem.height/u/2),g(a,{...n,animate:!1,focal:{x:d/r*(r*a),y:c/s*(s*a)}},o)}g(t.startScale,{animate:!1,force:!0}),setTimeout(()=>{h(t.startX,t.startY,{animate:!1,force:!0})});const b=[];function y(e){Je(b,e),d=!0,t.handleStartEvent(e),l=r,n=s;const a=et(b);o=a.clientX,i=a.clientY}function w(e){if(!d||void 0===l||void 0===n||void 0===o||void 0===i)return;Je(b,e);const t=et(b),a=u;h(l+(t.clientX-o)/a,n+(t.clientY-i)/a,{animate:!1},e)}function x(e){(function(e,t){const a=qe(e,t);a>-1&&e.splice(a,1)})(b,e),d&&(d=!1,l=n=o=i=void 0)}let C=!1;function E(){C||(C=!0,at("down",t.canvas?a:e,y),at("move",document,w,{passive:!0}),at("up",document,x,{passive:!0}))}return t.noBind||E(),{bind:E,destroy:function(){C=!1,lt("down",t.canvas?a:e,y),lt("move",document,w),lt("up",document,x)},getPan:()=>({x:r,y:s}),getScale:()=>u,getOptions:()=>function(e){const t={};for(const a in e)Object.prototype.hasOwnProperty.call(e,a)&&(t[a]=e[a]);return t}(t),handleDown:y,handleMove:w,handleUp:x,pan:h,reset:function(e){const a={...t,animate:!0,force:!0,...e};u=v(a.startScale,a).scale;const l=p(a.startX,a.startY,u,a);return r=l.x,s=l.y,c(a)},resetStyle:function(){a.style.overflow="",a.style.userSelect="",a.style.touchAction="",a.style.cursor="",e.style.cursor="",e.style.userSelect="",e.style.touchAction="",rt(e,"transformOrigin","")},setOptions:function(l={}){for(const e in l)Object.prototype.hasOwnProperty.call(l,e)&&(t[e]=l[e]);(l.hasOwnProperty("cursor")||l.hasOwnProperty("canvas"))&&(a.style.cursor=e.style.cursor="",(t.canvas?a:e).style.cursor=t.cursor),l.hasOwnProperty("overflow")&&(a.style.overflow=l.overflow),l.hasOwnProperty("touchAction")&&(a.style.touchAction=l.touchAction,e.style.touchAction=l.touchAction)},setStyle:(t,a)=>rt(e,t,a),zoom:g,zoomIn:function(a){const l={...t,animate:!0,...a};if(!l.focal){const t=ut(e),a=t.parent.width-t.parent.border.left-t.parent.border.right,n=t.parent.height-t.parent.border.top-t.parent.border.bottom,o=t.parent.left+t.parent.border.left+t.parent.padding.left+a/2,i=t.parent.top+t.parent.border.top+t.parent.padding.top+n/2;return f(u*Math.exp(l.step),{clientX:o,clientY:i},l)}return m(!0,a)},zoomOut:function(a){const l={...t,animate:!0,...a};if(!l.focal){const t=ut(e),a=t.parent.width-t.parent.border.left-t.parent.border.right,n=t.parent.height-t.parent.border.top-t.parent.border.bottom,o=t.parent.left+t.parent.border.left+t.parent.padding.left+a/2,i=t.parent.top+t.parent.border.top+t.parent.padding.top+n/2;return f(u*Math.exp(-l.step),{clientX:o,clientY:i},l)}return m(!1,a)},zoomToPoint:f,zoomWithWheel:function(e,a){e.preventDefault();const l={...t,...a,animate:!1},n=(0===e.deltaY&&e.deltaX?e.deltaX:e.deltaY)<0?1:-1;return f(v(u*Math.exp(n*l.step/3),l).scale,e,l,e)}}}ct.defaultOptions=dt;var pt=ct,vt={class:"sketch-ruler"},ht=/* @__PURE__ */G({__name:"index",props:{showRuler:{type:Boolean,default:!0},eyeIcon:{},closeEyeIcon:{},scale:{default:1},rate:{default:1},thick:{default:16},palette:{},width:{default:1400},height:{default:800},paddingRatio:{default:.2},autoCenter:{type:Boolean,default:!0},shadow:{default:()=>({x:0,y:0,width:0,height:0})},lines:{default:()=>({h:[],v:[]})},isShowReferLine:{type:Boolean,default:!0},canvasWidth:{default:700},canvasHeight:{default:700},snapsObj:{default:()=>({h:[],v:[]})},snapThreshold:{default:5},gridRatio:{default:1},lockLine:{type:Boolean,default:!1},selfHandle:{type:Boolean,default:!1},showShadowText:{type:Boolean,default:!0},panzoomOption:{}},emits:["onCornerClick","update:scale","zoomchange","update:lockLine"],setup(e,{expose:t,emit:a}){ge(e=>({v966d287c:l.canvasWidth+"px",v2eec692b:l.canvasHeight+"px",ba416de2:I.value}));const l=e,n=a,o=ie(null),i=ie(null),r=ie(null),s=ie(0),u=ie(0);let d=0,c=0;const p=ie(1),v=ie(l.isShowReferLine),h=ie(null),g=ie("defaultCursor"),m=U(()=>({bgColor:"#f6f7f9",longfgColor:"#BABBBC",fontColor:"#7D8694",fontShadowColor:"#106ebe",shadowColor:"#e9f7fe",lineColor:"#51d6a9",lineType:"solid",lockLineColor:"#d4d7dc",hoverBg:"#000",hoverColor:"#fff",borderColor:"#eeeeef",...l.palette})),f=U(()=>({backgroundImage:v.value?`url(${l.eyeIcon??"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAVCAYAAACpF6WWAAAAAXNSR0IArs4c6QAAAopJREFUOE/FlE9IVEEcx7+/N9ouds1Mu0QUSFZYdIgoUqQoKPBQHsKozpXE7jbTO/U8xLJvn6usBHWQ6hBFXupSkQeVbh0KJEPp0sH+eLGTsKs77xcj78m0ax0E8cHjzZv5zef3/c33xxA24KENYGJzoEEQbNNaN4Zh2OQ4znwYhr9c1/39vwrXVDo0NNS0tLR0GYB5D64BmAMwzMyvlFKz1es10Hw+f4mZ7wHYBeA9gNdENFepVOaEEM3M3OI4Thczn41gt6WUgQ3+C+r7/h0AWQD3mXnYqPA8L9nQ0HCemduIaFpKOWoAhUJhT6VSuQXgOjP3K6W8GLwKzeVyp4jonR0QBEErM48w8zFLyayUsjX+z+VyHhHdZebTSqkxM78CHRgYOKS1/ghgVErZY214RkQ7ADyRUj72ff8qgCtmXUrZGcf5vv8CwEUhxOF0Ov1pBRpla5dSdseBhUJhpznH6tIsZb1KqacW+BGArUaUXX63UuplHJTNZjuEEONSyhozfd/n6mQ1RkXZL2itz7mu+80EDA4ONi8vL/8AcM2UbikyR2BU9cSmmTU70YqKIAj2hWFo2uenlHK/BRg3Y2aeNO5GyU8S0ZbFxcUuz/NKEXAGQKPjOCcymcyX1dIi8DSAiWQyeaavr68cbSgCuBknYubnQoj+TCYzUywWE6VS6S2ADsdx2gxw1X3L7SNENMbMnwE8qK+vf5NKpRaMaeVyeW8ikfiaSqW+R7BuZr5BRMe11p2u607U9Gk8kc/ntzPzQwCmExYATDLzVBiGE0KIowAOADDf3QA+aK2VDaxRajto3K+rq+tl5nYAzQBamHmeiOYBTGmtR6ph/1Rqg9c73pz7dD1qN0TpHyNQRCUDJXrAAAAAAElFTkSuQmCC"})`:`url(${l.closeEyeIcon??"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAVCAYAAACpF6WWAAAAAXNSR0IArs4c6QAAAjtJREFUOE/NlD9oFEEUxn9v9ghC0hpRUogIAUmniGAT/5Q2FrETPSNRJILg7RwimI0ox85eQFCEBGIUO1PYpFM0jSConQoBEZGgGPsgl+w+2eM2bC57SopAFqYZ3v7m+977ZoQt+GQLmGxPaBiGgYiMWWvXBHZUGoZhH3BERPYC+4F+4Keq/urt7b1RLpf/ZEBVHa9Wq0HWyg3QKIoGVPU8cA7wgK/pUtXPQJ8xZk+pVBpuNBqXUoUiEvi+P56fzTpo6+SbwHNg1lo7WzTITGEKXFlZeeB53tVCpa3CK8AFa+1cBgvD8LKIXAQOJkkyICJDeYVBEJS6u7s/qeoLa+1o+l9TqXNuBLhmjDlbqVQ+5ICjInIfOBPH8W9jzGCR5YmJiRNxHM+papgqzqDvgSlr7VTernPuO3An3c9bBt74vv+yrdaKyLDv+/1Sq9UGPc97nY9EVuycU2AQOA7cAm4Dr4D5TvVxHB9rKo2iaEFVp621Ln96FEUngaOqGmSxabVqsh3a2h+x1h5qQjNrae/yE4+iaCwDJkky73neTuBZe129Xk+H+BS4l7ZqLVIZ2BhzuFKpvMsDVXXWGPMxFdAedOfcKeCRqj7MYrUhpz09PfXl5eXrectFWXXODQHpOq2qd/95o/JXr6ura3J1dXU6SZIfwKKIHAD2tVYMPBGRx77vN10UXtO85fTkmZmZHUtLSzUR2QXsBhaAL6r6DXhbrVYXi1yss59GqOgub/bN3Z7v6X/tb9Zmp/q/kN8s+lJb8oEAAAAASUVORK5CYII="})`,width:l.thick+"px",height:l.thick+"px",borderRight:`1px solid ${m.value.borderColor}`,borderBottom:`1px solid ${m.value.borderColor}`})),b=U(()=>({background:m.value.bgColor,width:y.value+"px",height:w.value+"px"})),y=U(()=>l.width-l.thick),w=U(()=>l.height-l.thick),x=e=>{var t;(e.ctrlKey||e.metaKey)&&(e.preventDefault(),null===(t=h.value)||void 0===t||t.zoomWithWheel(e))},C=e=>{var t;const a=document.activeElement;null!=a&&a.closest(".monaco-editor")||"INPUT"===(null==a?void 0:a.tagName)||"TEXTAREA"===(null==a?void 0:a.tagName)||"true"===(null==a?void 0:a.getAttribute("contenteditable"))||" "===e.key&&(g.value="grabCursor",null===(t=h.value)||void 0===t||t.bind(),e.preventDefault())},E=e=>{var t;const a=document.activeElement;null!=a&&a.closest(".monaco-editor")||"INPUT"===(null==a?void 0:a.tagName)||"TEXTAREA"===(null==a?void 0:a.tagName)||"true"===(null==a?void 0:a.getAttribute("contenteditable"))||" "===e.key&&(null===(t=h.value)||void 0===t||t.destroy(),g.value="defaultCursor")};function _(e){var t;e.preventDefault(),e.stopPropagation(),null===(t=h.value)||void 0===t||t.bind()}te(()=>{if(A(),!l.selfHandle&&o.value){const e=o.value.parentElement;if(!e)return;i.value=e,e.addEventListener("wheel",x,{passive:!1}),document.addEventListener("keydown",C),document.addEventListener("keyup",E),e.addEventListener("touchstart",_,{passive:!1})}}),ae(()=>{var e;i.value&&(i.value.removeEventListener("wheel",x),i.value.removeEventListener("touchstart",_)),document.removeEventListener("keydown",C),document.removeEventListener("keyup",E),r.value&&r.value.removeEventListener("panzoomchange",S),null===(e=h.value)||void 0===e||e.destroy()});const k=e=>({noBind:!0,startScale:e,startX:d,startY:c,smoothScroll:!0,canvas:!0,...l.panzoomOption}),S=e=>{const{scale:t,dimsOut:a}=e.detail;if(a){n("update:scale",t),p.value=t;const l=(a.parent.left-a.elem.left)/t,o=(a.parent.top-a.elem.top)/t;s.value=l,n("zoomchange",e.detail),u.value=o}},A=()=>{var e;if(r.value&&r.value.removeEventListener("panzoomchange",S),null===(e=h.value)||void 0===e||e.destroy(),o.value=document.querySelector(".canvasedit"),o.value){let e=l.scale;l.autoCenter&&(e=B()),h.value=pt(o.value,k(e)),o.value.addEventListener("panzoomchange",S),r.value=o.value}},B=()=>{const e=y.value*(1-l.paddingRatio)/l.canvasWidth,t=w.value*(1-l.paddingRatio)/l.canvasHeight,a=Math.min(e,t);return d=(y.value-l.canvasWidth)/2/a,c=(w.value-l.canvasHeight)/2/a,a},T=()=>{var e;return null===(e=h.value)||void 0===e?void 0:e.reset()},R=()=>{var e;return null===(e=h.value)||void 0===e?void 0:e.zoomIn()},D=()=>{var e;return null===(e=h.value)||void 0===e?void 0:e.zoomOut()},L=()=>{v.value=!v.value,n("onCornerClick",v.value)},M=e=>{n("update:lockLine",e)},I=U(()=>l.thick+"px");return fe([()=>l.isShowReferLine],()=>{v.value=l.isShowReferLine}),fe([()=>l.canvasWidth,()=>l.canvasHeight,()=>l.width,()=>l.height],()=>{A()}),fe(()=>l.panzoomOption,()=>{var e;null===(e=h.value)||void 0===e||e.setOptions(k(l.scale))},{deep:!0}),t({initPanzoom:A,panzoomInstance:h,reset:T,zoomIn:R,zoomOut:D,cursorClass:g}),(t,a)=>(le(),K("div",vt,[se(t.$slots,"btn",{reset:T,zoomIn:R,zoomOut:D}),H("div",{class:J(["canvasedit-parent",g.value]),style:ee(b.value)},[H("div",{class:J(["canvasedit",g.value])},[se(t.$slots,"default")],2)],6),ye(j(Qe,{style:ee({marginLeft:e.thick+"px",width:y.value+"px"}),vertical:!1,width:e.width,height:e.thick,"is-show-refer-line":v.value,thick:e.thick,start:s.value,"start-other":u.value,lines:e.lines,"select-start":e.shadow.x,"snap-threshold":e.snapThreshold,"snaps-obj":e.snapsObj,"select-length":e.shadow.width,scale:p.value,palette:m.value,"canvas-width":e.canvasWidth,"show-shadow-text":e.showShadowText,"canvas-height":e.canvasHeight,rate:e.rate,"grid-ratio":e.gridRatio,"lock-line":e.lockLine,onChangeLineState:M},null,8,["style","width","height","is-show-refer-line","thick","start","start-other","lines","select-start","snap-threshold","snaps-obj","select-length","scale","palette","canvas-width","show-shadow-text","canvas-height","rate","grid-ratio","lock-line"]),[[me,e.showRuler]]),ye(j(Qe,{style:ee({marginTop:e.thick+"px",top:0,height:w.value+"px"}),vertical:!0,width:e.thick,height:e.height,"is-show-refer-line":v.value,thick:e.thick,start:u.value,"start-other":s.value,lines:e.lines,"select-start":e.shadow.y,"select-length":e.shadow.height,"snap-threshold":e.snapThreshold,"snaps-obj":e.snapsObj,scale:p.value,palette:m.value,"canvas-width":e.canvasWidth,"canvas-height":e.canvasHeight,"show-shadow-text":e.showShadowText,rate:e.rate,"grid-ratio":e.gridRatio,"lock-line":e.lockLine,onChangeLineState:M},null,8,["style","width","height","is-show-refer-line","thick","start","start-other","lines","select-start","select-length","snap-threshold","snaps-obj","scale","palette","canvas-width","canvas-height","show-shadow-text","rate","grid-ratio","lock-line"]),[[me,e.showRuler]]),ye(H("a",{class:"corner",style:ee(f.value),onClick:L},null,4),[[me,e.showRuler]])]))}}),gt=/* @__PURE__ */G({name:"ActionBar",props:{zoom:{type:Number,default:1},min:{type:Number,default:.3},max:{type:Number,default:3},count:{type:Number,default:0}},emits:["zoomReset","zoomAuto","zoomIn","zoomOut"],setup(e,{emit:t}){const a=O("label-design-action-bar"),l=ie(),n=oe({x:0,y:35}),o=U(()=>({top:n.y+"px",left:n.x+"px"}));te(()=>{l.value&&(n.x=l.value.parentElement.clientWidth-6-160)});const i=U(()=>Math.floor(100*e.zoom)+"%");return{ns:a,rootRef:l,state:n,rootStyle:o,scale:i,zoomIn:function(){t("zoomIn")},zoomOut:function(){t("zoomOut")},reset:function(){t("zoomReset")},zoomAuto:function(){t("zoomAuto")}}},render(){return j("div",{ref:"rootRef",class:this.ns.b()},[j(ke,{title:V("sys.pageDesigner.restore")},{default:()=>[j("div",{class:[this.ns.e("action"),this.ns.e("reset")],onClick:this.reset},[j("i",{class:["iconfont","icon-recover"]},null)])]}),j(ke,{title:V("sys.pageDesigner.selfAdaption")},{default:()=>[j("div",{class:[this.ns.e("action"),this.ns.e("auto")],onClick:this.zoomAuto},[j("i",{class:["iconfont","icon-zishiying"]},null)])]}),j("div",{class:this.ns.e("zoom")},[j("span",{class:[this.ns.e("zoom-action"),this.ns.e("zoom-out")],onClick:this.zoomOut},[j("i",{class:["iconfont","icon-a--"]},null)]),j("span",{class:[this.ns.e("zoom-info")]},[this.scale]),j("span",{class:[this.ns.e("zoom-action"),this.ns.e("zoom-in")],onClick:this.zoomIn},[j("i",{class:["iconfont","icon-a-"]},null)])])])}}),mt={class:"page-history-container"},ft={class:"page-history-title"},bt={class:"page-history-item__time"},yt={style:{display:"flex","justify-content":"space-between","align-items":"center"}},wt={class:"page-history-item__name"},xt={class:"page-history-item__action"},Ct=["onClick"],Et={key:1,style:{display:"flex","justify-content":"center","align-items":"center",height:"100%"}},_t=/* @__PURE__ */G({__name:"panel-history",setup(e){const t=_e.PRESENTED_IMAGE_SIMPLE,a=Z("openDiffModal"),{pageDesignHistoryList:l,recover:n,loadLabelDesignHistoryList:o,loading:i}=B(),r=U(()=>Array.isArray(he(l))&&0!==he(l).length),{list:s,containerProps:u,wrapperProps:d}=T(l,{itemHeight:68,overscan:10});return R(u.ref,async()=>{o()},{distance:20}),(e,l)=>{const o=ue("a-tooltip"),c=ue("a-popconfirm"),p=ue("a-empty"),v=ue("a-spin");return le(),K("div",mt,[H("div",ft,pe(he(V)("sys.pageDesigner.historyTitle")),1),H("div",Q({class:"page-history-wrapper"},he(u)),[H("div",Q({class:"page-history-list"},he(d)),[r.value?(le(!0),K(P,{key:0},re(he(s),e=>{var t,i,r;return le(),K("div",{key:null===(t=e.data)||void 0===t?void 0:t.id,class:"page-history-item"},[H("div",bt,pe(null===(i=e.data)||void 0===i?void 0:i.createTime),1),H("div",yt,[H("div",wt,pe(null===(r=e.data)||void 0===r?void 0:r.createUserName),1),H("div",xt,[j(o,{"arrow-point-at-center":""},{title:be(()=>[X(pe(he(V)("sys.pageDesigner.compare")),1)]),default:be(()=>[H("i",{class:"iconfont icon-Compare mr-12px",onClick:t=>{return l=e.data,void a(!0,{hid:l.id});var l}},null,8,Ct)]),_:2},1024),j(c,{title:he(V)("sys.sureToRecover"),placement:"topRight",onConfirm:()=>{var t;return he(n)((null===(t=e.data)||void 0===t?void 0:t.id)??"")}},{default:be(()=>[j(o,{"arrow-point-at-center":""},{title:be(()=>[X(pe(he(V)("sys.pageDesigner.recover")),1)]),default:be(()=>[l[0]||(l[0]=H("i",{class:"iconfont icon-recover"},null,-1))]),_:1})]),_:1},8,["title","onConfirm"])])])])}),128)):(le(),K("div",Et,[j(p,{image:he(t),description:he(V)("sys.pageDesigner.emptyPageHistory")},null,8,["image","description"])]))],16),he(i)?(le(),W(v,{key:0,tip:`${he(V)("sys.loadingText")}`},{default:be(()=>[...l[1]||(l[1]=[H("div",{class:"load-status w-full"},null,-1)])]),_:1},8,["tip"])):$("",!0)],16)])}}}),kt=/* @__PURE__ */e({default:()=>St}),St=/* @__PURE__ */M(_t,[["__scopeId","data-v-c862a9f6"]]),At={class:"panel-page-wrapper"},Bt={class:"panel-page-title"},Tt={class:"panel-page-con"},Rt=/* @__PURE__ */G({__name:"panel-page",setup:e=>(e,t)=>{const a=ue("a-col"),l=ue("a-row");return le(),K("div",At,[H("div",Bt,pe(he(V)("sys.pageDesigner.pageProp")),1),H("div",Tt,[j(l,null,{default:be(()=>[j(a,{class:"desc-label",span:8},{default:be(()=>[X(pe(he(V)("sys.printDesigner.labelName")),1)]),_:1}),j(a,{class:"desc-value",span:16},{default:be(()=>{var e;return[X(pe(null===(e=he(d))||void 0===e?void 0:e.name),1)]}),_:1})]),_:1}),j(l,null,{default:be(()=>[j(a,{class:"desc-label",span:8},{default:be(()=>[X(pe(he(V)("sys.creator")),1)]),_:1}),j(a,{class:"desc-value",span:16},{default:be(()=>{var e;return[X(pe(null===(e=he(d))||void 0===e?void 0:e.createUserName),1)]}),_:1})]),_:1}),j(l,null,{default:be(()=>[j(a,{class:"desc-label",span:8},{default:be(()=>[X(pe(he(V)("sys.createTime")),1)]),_:1}),j(a,{class:"desc-value",span:16},{default:be(()=>{var e;return[X(pe(null===(e=he(d))||void 0===e?void 0:e.createTime),1)]}),_:1})]),_:1}),j(l,null,{default:be(()=>[j(a,{class:"desc-label",span:8},{default:be(()=>[X(pe(he(V)("sys.updatePerson")),1)]),_:1}),j(a,{class:"desc-value",span:16},{default:be(()=>{var e;return[X(pe(null===(e=he(d))||void 0===e?void 0:e.modifyUserName),1)]}),_:1})]),_:1}),j(l,null,{default:be(()=>[j(a,{class:"desc-label",span:8},{default:be(()=>[X(pe(he(V)("sys.updateTime")),1)]),_:1}),j(a,{class:"desc-value",span:16},{default:be(()=>{var e;return[X(pe(null===(e=he(d))||void 0===e?void 0:e.modifyTime),1)]}),_:1})]),_:1})])])}}),Dt=/* @__PURE__ */e({default:()=>Lt}),Lt=/* @__PURE__ */M(Rt,[["__scopeId","data-v-0601b522"]]),Mt={class:"dim-pos clearfix"},It={key:0,class:"setting-row flex-col"},zt={class:"sub-content"},Nt={class:"sub-content_inner p-8px bg-[#F7F8FA]"},Ft={key:0,class:"setting-col setting-col_left"},Vt={key:1,class:"setting-col setting-col_right"},Ot={key:1,class:"setting-row flex-col"},Pt={class:"sub-content"},Ut={class:"sub-content_inner p-8px bg-[#F7F8FA]"},Wt={key:2,class:"setting-row"},$t={class:"sub-content"},Kt={class:"sub-content_inner flex items-center"},Ht={class:"setting-label row-label rotate flex-1"},Xt={key:3,class:"setting-col setting-col_left"},jt={key:4,class:"setting-col setting-col_right"},Gt=/* @__PURE__ */G({__name:"dim-pos",props:{height:{type:[String,Number]},heightMM:{type:[String,Number]},width:{type:[String,Number]},widthMM:{type:[String,Number]},top:{type:[String,Number]},topMM:{type:[String,Number]},bottom:{type:[String,Number]},left:{type:[String,Number]},leftMM:{type:[String,Number]},right:{type:[String,Number]},rotate:{type:[String,Number],default:0},hasDim:{type:Boolean,default:!0},hasPos:{type:Boolean,default:!0},hasRotate:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},heightDisabled:{type:Boolean,default:!1},widthDisabled:{type:Boolean,default:!1}},emits:["changeEvent"],setup(e,{emit:t}){const{width:a,height:l,project:n}=B(),i=t,r=e,s=(e,t=2)=>{var a;const l=o(Number(e??0),(null===(a=d.value)||void 0===a?void 0:a.dpi)||n.value.dpi);return 0===t?Math.round(l):parseFloat(l.toFixed(t))},u=(e,t=2)=>{var a;const l=b(Number(e??0),(null===(a=d.value)||void 0===a?void 0:a.dpi)||n.value.dpi);return 0===t?Math.round(l):parseFloat(l.toFixed(t))},c=U({get(){if(null!=r.width){const e=s(r.width,0);return f("widthMM",e),e}return"auto"},set(e){m(e,"widthMM"),f("width",u(e??0,0))}}),p=U({get(){if(null!=r.height){const e=s(r.height,0);return f("heightMM",e),e}return"auto"},set(e){m(e,"heightMM"),f("height",u(e??0,0))}}),v=U({get(){if(null!=r.top&&null==r.topMM){const e=s(r.top);return f("topMM",e),e}return null!=r.topMM?r.topMM:"auto"},set(e){m(e,"topMM"),f("top",u(e??0))}}),h=U({get(){if(null!=r.left&&null==r.leftMM){const e=s(r.left);return f("leftMM",e),e}return null!=r.leftMM?r.leftMM:"auto"},set(e){m(e,"leftMM"),f("left",u(e??0))}}),g=ie(r.rotate),m=(e,t)=>{if(f(t,e),"rotate"===t){const e=r.width,t=r.height;f("width",t),f("height",e);const a=r.widthMM,l=r.heightMM;f("widthMM",l),f("heightMM",a)}},f=(e,t)=>{i("changeEvent",{type:e,value:t})};return(t,n)=>{const o=ue("a-input-number"),i=ue("IconNext"),r=ue("a-tooltip");return le(),K("div",Mt,[e.hasPos?(le(),K("div",It,[n[7]||(n[7]=H("div",{class:"sub-title mb-4px"},"位置",-1)),H("div",zt,[H("div",Nt,[e.hasPos?(le(),K("div",Ft,[n[5]||(n[5]=H("div",{class:"setting-label row-label"},[X(" X轴"),H("i",null," / "),H("span",null,"mm")],-1)),j(o,{ref:"left",value:h.value,"onUpdate:value":n[0]||(n[0]=e=>h.value=e),max:he(a)-30,min:0,precision:2,disabled:e.disabled||"auto"===h.value},null,8,["value","max","disabled"])])):$("",!0),e.hasPos?(le(),K("div",Vt,[n[6]||(n[6]=H("div",{class:"setting-label row-label"},[X(" Y轴"),H("i",null," / "),H("span",null,"mm")],-1)),j(o,{ref:"top",value:v.value,"onUpdate:value":n[1]||(n[1]=e=>v.value=e),max:he(l)-30,min:0,precision:2,disabled:e.disabled||"auto"===v.value},null,8,["value","max","disabled"])])):$("",!0)])])])):$("",!0),e.hasDim?(le(),K("div",Ot,[n[10]||(n[10]=H("div",{class:"sub-title mb-4px"},"尺寸",-1)),H("div",Pt,[H("div",Ut,[H("div",{class:J(["setting-col setting-col_right",{"no-check":!e.hasPos}])},[n[8]||(n[8]=H("div",{class:"setting-label row-label"},[X(" 高度"),H("i",null," / "),H("span",null,"mm")],-1)),j(o,{ref:"height",value:p.value,"onUpdate:value":n[2]||(n[2]=e=>p.value=e),min:1,precision:0,disabled:e.disabled||"auto"===p.value||e.heightDisabled},null,8,["value","disabled"])],2),H("div",{class:J(["setting-col",{"no-check":!e.hasPos}])},[n[9]||(n[9]=H("div",{class:"setting-label row-label"},[X(" 宽度"),H("i",null," / "),H("span",null,"mm")],-1)),j(o,{ref:"width",value:c.value,"onUpdate:value":n[3]||(n[3]=e=>c.value=e),min:1,precision:0,disabled:e.disabled||"auto"===c.value||e.widthDisabled},null,8,["value","disabled"])],2)])])])):$("",!0),e.hasRotate?(le(),K("div",Wt,[n[12]||(n[12]=H("div",{class:"sub-title",style:{"line-height":"28px"}},"旋转",-1)),H("div",$t,[H("div",Kt,[H("div",Ht,pe(g.value)+"°",1),j(r,{placement:"topRight"},{title:be(()=>[...n[11]||(n[11]=[X("向右旋转 90°,每点一下转 90°,点 4 下回到原点",-1)])]),default:be(()=>[j(i,{color:"#434855",value:"icon-a-xuanzhuan4",size:16,onClick:n[4]||(n[4]=e=>(g.value=(Number(g.value)+90)%360,void m(g.value,"rotate")))})]),_:1})])])])):$("",!0),e.hasPos?(le(),K("div",Xt)):$("",!0),e.hasPos?(le(),K("div",jt)):$("",!0)])}}}),Yt=/* @__PURE__ */e({default:()=>Zt}),Zt=/* @__PURE__ */M(Gt,[["__scopeId","data-v-a247e0e1"]]),Qt={class:"label-template"},qt=/* @__PURE__ */function(e){return e.ZPL="zpl",e.PNG="png",e}(qt||{}),Jt=/* @__PURE__ */G({__name:"labelTemplate",setup(e){const a=ie(),l=ie([]),n=oe({width:0,height:0}),o=Object.values(qt).map((e,t)=>({value:e,label:Object.keys(qt)[t]})),{project:r,width:s,height:u}=B(),d=e=>{const{width:a,height:l,strWidth:o,strHeight:i}=t(Number(e),r.value.dpi);n.width=a,n.height=l,r.value.width=o,r.value.height=i};async function c(){a.value!==r.value.dpi&&(p(r.value.dpi,a.value),a.value=r.value.dpi)}!async function(){l.value=await _api.apaas.category.getListComplete({})||[]}(),fe(n,e=>{r.value.width=m(e.width,r.value.dpi),r.value.height=m(e.height,r.value.dpi),r.value.labelWidth=n.width,r.value.labelHeight=n.height}),te(()=>{const{labelSize:e,dpi:l,labelWidth:o,labelHeight:i,printType:s}=oe(r.value),{width:u,height:d,strWidth:c,strHeight:p}=t(e,l);n.width=o??(u||0),n.height=i??(d||0),r.value.width=c,r.value.height=p,r.value.printType=s||"zpl",a.value=l});const p=(e,t)=>{const{labelWidth:a,labelHeight:l}=r.value;r.value.width=m(a||0,e||0),r.value.height=m(l||0,e||0),s.value=Number(r.value.width)||0,u.value=Number(r.value.height)||0,r.value.page=r.value.page.map(a=>({...a,top:i(a.top,t||0,e||0),left:i(a.left,t||0,e||0)}))},v=(e,t)=>!t.label&&t.title.includes(e);return(e,t)=>{const a=ue("a-select-option"),i=ue("a-select"),s=ue("a-form-item"),u=ue("a-input-number"),p=ue("a-select-opt-group");return le(),K("div",Qt,[j(s,{label:he(V)("sys.printDesigner.labelSize")},{default:be(()=>[j(i,{value:he(r).labelSize,"onUpdate:value":t[0]||(t[0]=e=>he(r).labelSize=e),onChange:d},{default:be(()=>[(le(!0),K(P,null,re(he(f),e=>(le(),W(a,{key:e.value,value:e.value},{default:be(()=>[X(pe(e.label),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value"])]),_:1},8,["label"]),j(s,{label:he(V)("sys.width"),name:"width"},{default:be(()=>[j(u,{value:n.width,"onUpdate:value":t[1]||(t[1]=e=>n.width=e),disabled:7!==he(r).labelSize,placeholder:he(V)("sys.inputText")},null,8,["value","disabled","placeholder"])]),_:1},8,["label"]),j(s,{label:he(V)("sys.height"),name:"height"},{default:be(()=>[j(u,{value:n.height,"onUpdate:value":t[2]||(t[2]=e=>n.height=e),disabled:7!==he(r).labelSize,placeholder:he(V)("sys.inputText")},null,8,["value","disabled","placeholder"])]),_:1},8,["label"]),j(s,{label:he(V)("sys.printDesigner.printDPI"),name:"dpi"},{default:be(()=>[j(u,{value:he(r).dpi,"onUpdate:value":t[3]||(t[3]=e=>he(r).dpi=e),min:0,placeholder:he(V)("sys.inputText"),onBlur:c},null,8,["value","placeholder"])]),_:1},8,["label"]),j(s,{label:he(V)("sys.printDesigner.refEntity"),name:"modelKey"},{default:be(()=>[j(i,{value:he(r).modelKey,"onUpdate:value":t[4]||(t[4]=e=>he(r).modelKey=e),placeholder:he(V)("sys.chooseText"),"show-search":"","filter-option":v},{default:be(()=>[(le(!0),K(P,null,re(l.value,e=>(le(),W(p,{key:e.name},{label:be(()=>[H("span",null,pe(e.name),1)]),default:be(()=>[(le(!0),K(P,null,re(e.children,e=>(le(),W(a,{key:e.key,value:e.key,title:e.name},{default:be(()=>[X(pe(e.name),1)]),_:2},1032,["value","title"]))),128))]),_:2},1024))),128))]),_:1},8,["value","placeholder"])]),_:1},8,["label"]),j(s,{label:he(V)("sys.printDesigner.labelFormart")},{default:be(()=>[j(i,{value:he(r).printType,"onUpdate:value":t[5]||(t[5]=e=>he(r).printType=e),placeholder:he(V)("sys.appDesigner.pleaseSelect")},{default:be(()=>[(le(!0),K(P,null,re(he(o),e=>(le(),W(a,{key:e.value,value:e.value},{default:be(()=>[X(pe(e.label),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value","placeholder"])]),_:1},8,["label"])])}}}),ea=/* @__PURE__ */e({default:()=>ta}),ta=/* @__PURE__ */M(Jt,[["__scopeId","data-v-c628d318"]]),aa={class:"page-properties"},la=/* @__PURE__ */M(/* @__PURE__ */G({__name:"page-properties",emits:["propchange"],setup(e,{emit:t}){const{project:a}=B(),{emitChanges:l,height:n,width:o,heightMM:i,widthMM:r}=v({emit:t}),s=ie(["common"]);return(e,t)=>{const u=ue("a-collapse-panel"),d=ue("a-collapse");return le(),K("div",aa,[j(d,{"active-key":s.value,"onUpdate:activeKey":t[1]||(t[1]=e=>s.value=e),bordered:!1,"expand-icon-position":"right",ghost:""},{default:be(()=>[j(u,{key:"common",header:"通用"},{default:be(()=>[j(Zt,{height:he(n),width:he(o),"height-m-m":he(i),"width-m-m":he(r),disabled:!0,"has-pos":!1,"has-rotate":!1,onChangeEvent:t[0]||(t[0]=({type:e,value:t})=>he(l)(e,t))},null,8,["height","width","height-m-m","width-m-m"]),he(a).labelSize?(le(),W(ta,{key:0})):$("",!0)]),_:1})]),_:1},8,["active-key"])])}}}),[["__scopeId","data-v-ad548f64"]]),na=/* @__PURE__ */e({default:()=>sa}),oa={class:"setting-row flex-col"},ia={class:"sub-content"},ra={class:"sub-content_inner"},sa=/* @__PURE__ */M({name:"alias-input",props:{alias:{type:[String],default:""}},emits:["changeEvent"],data:()=>({a:""}),watch:{alias(e){e!==this.a&&(this.a=e)}},created(){this.a=this.alias},methods:{checkVal(e,t){return!!e||(this.$message.error("组件名称不可为空"),!1)},onEnterVal(e,t){const a=this.a;this.checkVal(a)?this.emitChanges(a):this.a=this.alias,this.$refs.alias.blur()},emitChanges(e){this.$emit("changeEvent",e)}}},[["render",function(e,t,a,l,n,o){const i=ue("a-input");return le(),K("div",oa,[t[2]||(t[2]=H("div",{class:"sub-title mb-2px"},"名称",-1)),H("div",ia,[H("div",ra,[j(i,{ref:"alias",value:n.a,"onUpdate:value":t[0]||(t[0]=e=>n.a=e),size:"mini","show-count":"",maxlength:32,onKeyup:t[1]||(t[1]=we(e=>o.onEnterVal("a","alias"),["enter"])),onBlur:o.onEnterVal},null,8,["value","onBlur"])])])])}]]),ua={name:"BorderControl",props:{borderColor:{type:String,default:""},borderStyle:{type:String,default:"solid"},borderWidth:{type:[String,Number],default:2},type:{type:String,default:"attr"},tag:{type:Boolean,default:!1},tagAttr:{type:String,default:""},hasBind:{type:Boolean,default:!1},hasDisconnect:{type:Boolean,default:!1}},emits:["changeEvent"],data(){return{presetColor:["#DBDBDB","#FFE4E4","#D1D1D1","#838383","#838383","#FFEECB","#D8E3FF","#FF8888","#FF8888","#0DAA9C","#3370FF"],borderWidthVal:parseInt(String(this.borderWidth))||2}},watch:{borderWidth(){this.borderWidthVal=parseInt(String(this.borderWidth))||2}},methods:{handleUpdateColor(e,t){this.onBorderChange("border-color",t)},onEnterVal(e){this.onBorderChange("border-width",this.borderWidthVal),e.target.blur()},onBorderChange(e,t){this.$emit("changeEvent",{style:e,val:t})},dragstartHandler(e){e.dataTransfer.dropEffect="copy",e.dataTransfer.effectAllowed="all",window.DragTreeTableOutDropData=JSON.stringify({type:"style",prop:this.tagAttr})}}},da=/* @__PURE__ */e({default:()=>ba}),ca={class:"setting-row border-wrapper flex-col"},pa={class:"sub-content"},va={class:"sub-content_inner p-8px bg-[#F7F8FA]"},ha={class:"setting-col style-setting"},ga={class:"setting-col_inner"},ma={class:"setting-col setting-col_right",style:{width:"46%"}},fa={class:"setting-col_inner"},ba=/* @__PURE__ */M(ua,[["render",function(e,t,a,l,n,o){const i=ue("a-select-option"),r=ue("a-select"),s=ue("a-input-number");return le(),K("div",ca,[t[5]||(t[5]=H("div",{class:"sub-title mb-4px"},"边框",-1)),H("div",pa,[H("div",va,[H("div",ha,[t[3]||(t[3]=H("div",{class:"setting-label row-label"},"样式",-1)),H("div",ga,[j(r,{value:a.borderStyle||"inherit",onChange:t[0]||(t[0]=e=>o.onBorderChange("border-style",e))},{default:be(()=>[j(i,{value:"none",label:"无"}),j(i,{value:"solid",label:"实线"}),j(i,{value:"dashed",label:"虚线"})]),_:1},8,["value"])])]),H("div",ma,[t[4]||(t[4]=H("div",{class:"setting-label row-label"},"线宽",-1)),H("div",fa,[j(s,{value:n.borderWidthVal,"onUpdate:value":t[1]||(t[1]=e=>n.borderWidthVal=e),min:1,onChange:t[2]||(t[2]=e=>o.onBorderChange("border-width",e)),onKeyup:we(o.onEnterVal,["enter"])},null,8,["value","onKeyup"])])])])])])}],["__scopeId","data-v-5d5ceddd"]]),ya={class:/* @__PURE__ */J(["border-box","label-print"])},wa={class:"border-div"},xa={class:"border-div-inner"},Ca={class:"border-editor"},Ea=/* @__PURE__ */function(e){return e.NONE="none",e.SOLID="solid",e.DOTTED="dotted",e.DASHED="dashed",e.DOUBLE="double",e}(Ea||{}),_a=/* @__PURE__ */M(/* @__PURE__ */G({__name:"border-editor",props:{isLabelPrint:{type:Boolean,default:!1},value:{type:Object,default:()=>({})}},emits:["changeEvent"],setup(e,{emit:t}){const a=["#DBDBDB","#FFE4E4","#D1D1D1","#838383","#838383","#FFEECB","#D8E3FF","#FF8888","#FF8888","#0DAA9C","#3370FF"],l=e,n=t;let o=U({get:()=>l.value,set(e){n("changeEvent",e)}});const i=ie("borderAll"),r=ie([{label:"1",value:"1"},{label:"2",value:"2"},{label:"3",value:"3"},{label:"4",value:"4"},{label:"5",value:"5"}]);function s(){return{borderStyle:Ea.NONE,borderColor:"#F0F0F0",borderWidth:"1"}}const u=U(()=>{switch(i.value){case"borderAll":{if(o.value.borderAll)return o.value.borderAll;const e=s(),{borderWidth:t,borderStyle:a}=o.value.borderBottom||e,{borderWidth:l,borderStyle:n}=o.value.borderTop||e,{borderWidth:i,borderStyle:r}=o.value.borderRight||e,{borderWidth:u,borderStyle:d}=o.value.borderLeft||e;return 1===new Set([t,l,i,u]).size?e.borderWidth=t:e.borderWidth=void 0,1===new Set([a,n,r,d]).size?e.borderStyle=a:e.borderStyle=void 0,e}case"borderTop":return o.value.borderTop||s();case"borderRight":return o.value.borderRight||s();case"borderLeft":return o.value.borderLeft||s();case"borderBottom":return o.value.borderBottom||s();default:return o.value.borderAll||s()}}),d=[{label:V(`sys.pageDesigner.borderStyle.${Ea.NONE}`),value:Ea.NONE},{label:V(`sys.pageDesigner.borderStyle.${Ea.SOLID}`),value:Ea.SOLID},{label:V(`sys.pageDesigner.borderStyle.${Ea.DOTTED}`),value:Ea.DOTTED},{label:V(`sys.pageDesigner.borderStyle.${Ea.DASHED}`),value:Ea.DASHED}],c=e=>{v("borderWidth",e)},p=(e,t)=>{u.value.borderColor!==t&&(u.value.borderColor=t,"borderAll"===i.value?(o.value.borderRight||(o.value.borderRight=s()),o.value.borderRight.borderColor=t,o.value.borderTop||(o.value.borderTop=s()),o.value.borderTop.borderColor=t,o.value.borderLeft||(o.value.borderLeft=s()),o.value.borderLeft.borderColor=t,o.value.borderBottom||(o.value.borderBottom=s()),o.value.borderBottom.borderColor=t):(o.value[i.value]||(o.value[i.value]=s()),o.value[i.value].borderColor=t),o.value=o.value)};fe([()=>o.value.borderRight,()=>o.value.borderTop,()=>o.value.borderLeft,()=>o.value.borderBottom],()=>{o.value.borderRight&&o.value.borderTop&&o.value.borderLeft&&o.value.borderBottom&&Ee(o.value.borderRight,o.value.borderTop)&&Ee(o.value.borderTop,o.value.borderLeft)&&Ee(o.value.borderLeft,o.value.borderBottom)?o.value.borderAll={...o.value.borderLeft}:delete o.value.borderAll},{deep:!0});const v=(e,t)=>{o.value[i.value]||(o.value[i.value]=s()),"borderAll"===i.value?(o.value.borderRight||(o.value.borderRight=s()),o.value.borderRight[e]=t,o.value.borderTop||(o.value.borderTop=s()),o.value.borderTop[e]=t,o.value.borderLeft||(o.value.borderLeft=s()),o.value.borderLeft[e]=t,o.value.borderBottom||(o.value.borderBottom=s()),o.value.borderBottom[e]=t):o.value[i.value][e]=t,o.value=o.value};return(e,t)=>{const l=ue("a-tooltip"),n=ue("a-col"),o=ue("a-select"),s=ue("a-row"),h=ue("a-input-number"),g=ue("a-auto-complete"),m=ue("down-outlined");return le(),K("div",ya,[H("div",wa,[H("div",xa,[H("div",{class:J(["top","borderTop"===i.value?"focus":null])},null,2),j(l,null,{title:be(()=>[X(pe(he(V)("sys.pageDesigner.topBorder")),1)]),default:be(()=>[H("div",{class:J(["top-rect rect","borderTop"===i.value?"focus-line":null]),onClick:t[0]||(t[0]=e=>i.value="borderTop")},null,2)]),_:1}),H("div",{class:J(["left","borderLeft"===i.value?"focus":null])},null,2),j(l,null,{title:be(()=>[X(pe(he(V)("sys.pageDesigner.leftBorder")),1)]),default:be(()=>[H("div",{class:J(["left-rect rect","borderLeft"===i.value?"focus-line":null]),onClick:t[1]||(t[1]=e=>i.value="borderLeft")},null,2)]),_:1}),H("div",{class:J(["bottom","borderBottom"===i.value?"focus":null])},null,2),j(l,null,{title:be(()=>[X(pe(he(V)("sys.pageDesigner.bottomBorder")),1)]),default:be(()=>[H("div",{class:J(["bottom-rect rect","borderBottom"===i.value?"focus-line":null]),onClick:t[2]||(t[2]=e=>i.value="borderBottom")},null,2)]),_:1}),H("div",{class:J(["right","borderRight"===i.value?"focus":null])},null,2),j(l,null,{title:be(()=>[X(pe(he(V)("sys.pageDesigner.rightBorder")),1)]),default:be(()=>[H("div",{class:J(["right-rect rect","borderRight"===i.value?"focus-line":null]),onClick:t[3]||(t[3]=e=>i.value="borderRight")},null,2)]),_:1}),j(l,null,{title:be(()=>[X(pe(he(V)("sys.pageDesigner.whole")),1)]),default:be(()=>[H("div",{class:J(["center","borderAll"===i.value?"focus-line":null]),onClick:t[4]||(t[4]=e=>i.value="borderAll")},null,2)]),_:1})])]),H("div",Ca,[j(s,{class:"row"},{default:be(()=>[j(n,{span:6},{default:be(()=>[...t[11]||(t[11]=[X("线型",-1)])]),_:1}),j(n,{span:18},{default:be(()=>[j(o,{value:u.value.borderStyle,"onUpdate:value":t[5]||(t[5]=e=>u.value.borderStyle=e),options:d,style:{width:"100%"},size:"small",onChange:t[6]||(t[6]=e=>v("borderStyle",u.value.borderStyle))},null,8,["value"])]),_:1})]),_:1}),j(s,{class:"row"},{default:be(()=>[j(n,{span:6},{default:be(()=>[...t[12]||(t[12]=[X("线宽",-1)])]),_:1}),j(n,{span:18,class:"relative"},{default:be(()=>[j(g,{value:u.value.borderWidth,"onUpdate:value":t[9]||(t[9]=e=>u.value.borderWidth=e),options:r.value,onChange:t[10]||(t[10]=e=>v("borderWidth",u.value.borderWidth))},{default:be(()=>[j(h,{value:u.value.borderWidth,"onUpdate:value":t[7]||(t[7]=e=>u.value.borderWidth=e),min:0,controls:!0,precision:0,style:{width:"100%"},size:"small","addon-after":"px",onChange:c,onBlur:t[8]||(t[8]=e=>!u.value.borderWidth&&v("borderWidth",1))},null,8,["value"])]),_:1},8,["value","options"]),j(m,{class:"ant-select-arrow gct-select-arrow"})]),_:1})]),_:1}),j(s,{class:"row"},{default:be(()=>[j(n,{span:6},{default:be(()=>[...t[13]||(t[13]=[X("颜色",-1)])]),_:1}),j(n,{span:18},{default:be(()=>[j(S,{preset:a,color:u.value.borderColor,"onUpdate:color":p},{icon:be(()=>[H("div",{style:ee({width:"22px",height:"22px",backgroundColor:u.value.borderColor,borderRadius:"4px"})},null,4)]),_:1},8,["color"])]),_:1})]),_:1})])])}}}),[["__scopeId","data-v-10b559c2"]]),ka=/* @__PURE__ */e({default:()=>Sa}),Sa=/* @__PURE__ */M(G({name:"border-config",components:{BorderEditor:_a},props:{value:{type:Object,default:()=>({})}},emits:["changeEvent"],watch:{value(){}},methods:{changeEvent(...e){this.$emit("changeEvent",...e)}}}),[["render",function(e,t,a,l,n,o){const i=ue("BorderEditor");return le(),W(i,{"is-label-print":"",value:e.value,onChangeEvent:e.changeEvent},null,8,["value","onChangeEvent"])}]]),Aa={class:"radius-box"},Ba={class:"radius-div"},Ta={class:"radius-div-inner"},Ra={class:"radius-editor"},Da={class:"radius-col"},La={class:"radius-text"},Ma=/* @__PURE__ */M(/* @__PURE__ */G({name:"LabelDesignRadius",__name:"radius",props:{isLabelPrint:{type:Boolean,default:!1},value:{type:Object,default:()=>({})}},emits:["changeEvent"],setup(e,{emit:t}){const a=e,l=t;let n=U({get:()=>a.value,set(e){l("changeEvent",e)}});const o=ie("all"),i=ie([{label:"2",value:"2"},{label:"4",value:"4"},{label:"6",value:"6"},{label:"8",value:"8"},{label:"10",value:"10"}]),r=U(()=>{const{borderAllRadius:e,borderTopLeftRadius:t,borderBottomLeftRadius:a,borderTopRightRadius:l,borderBottomRightRadius:i}=n.value;switch(o.value){case"all":return 1===new Set([t,a,l,i]).size?t||"0":void 0;case"upLeft":return n.value.borderTopLeftRadius||"0";case"upRight":return n.value.borderTopRightRadius||"0";case"downLeft":return n.value.borderBottomLeftRadius||"0";case"downRight":return n.value.borderBottomRightRadius||"0";default:return n.value.borderAllRadius||"0"}});fe([()=>n.value.borderTopLeftRadius,()=>n.value.borderTopRightRadius,()=>n.value.borderBottomLeftRadius,()=>n.value.borderBottomRightRadius],()=>{n.value.borderTopLeftRadius===n.value.borderTopRightRadius&&n.value.borderTopRightRadius===n.value.borderBottomLeftRadius&&n.value.borderBottomLeftRadius===n.value.borderBottomRightRadius?n.value.borderAllRadius=n.value.borderBottomLeftRadius:n.value.borderAllRadius=""},{deep:!0});const s=e=>{switch(e||(e=0),e=String(e),o.value){case"all":n.value.borderAllRadius=e,n.value.borderTopLeftRadius=e,n.value.borderTopRightRadius=e,n.value.borderBottomLeftRadius=e,n.value.borderBottomRightRadius=e;break;case"upLeft":n.value.borderTopLeftRadius=e;break;case"upRight":n.value.borderTopRightRadius=e;break;case"downLeft":n.value.borderBottomLeftRadius=e;break;case"downRight":n.value.borderBottomRightRadius=e}n.value=n.value};return(e,t)=>{const a=ue("a-tooltip"),l=ue("a-input-number"),n=ue("a-auto-complete");return le(),K("div",Aa,[H("div",Ba,[H("div",Ta,[j(a,null,{title:be(()=>[X(pe(he(V)("sys.pageDesigner.upLeft")),1)]),default:be(()=>[H("div",{class:J(["upLeftGround ground",{highlight:"upLeft"===o.value}]),onClick:t[0]||(t[0]=e=>o.value="upLeft")},null,2)]),_:1}),j(a,null,{title:be(()=>[X(pe(he(V)("sys.pageDesigner.upRight")),1)]),default:be(()=>[H("div",{class:J(["upRightGround ground",{highlight:"upRight"===o.value}]),onClick:t[1]||(t[1]=e=>o.value="upRight")},null,2)]),_:1}),j(a,null,{title:be(()=>[X(pe(he(V)("sys.pageDesigner.downLeft")),1)]),default:be(()=>[H("div",{class:J(["downLeftGround ground",{highlight:"downLeft"===o.value}]),onClick:t[2]||(t[2]=e=>o.value="downLeft")},null,2)]),_:1}),j(a,null,{title:be(()=>[X(pe(he(V)("sys.pageDesigner.downRight")),1)]),default:be(()=>[H("div",{class:J(["downRightGround ground",{highlight:"downRight"===o.value}]),onClick:t[3]||(t[3]=e=>o.value="downRight")},null,2)]),_:1}),j(a,null,{title:be(()=>[X(pe(he(V)("sys.pageDesigner.whole")),1)]),default:be(()=>[H("div",{class:J(["centerGround",{highlight:"all"===o.value}]),onClick:t[4]||(t[4]=e=>o.value="all")},null,2)]),_:1})])]),H("div",Ra,[H("div",Da,[H("span",La,pe(he(V)("sys.pageDesigner.radius")),1),j(n,{value:r.value,"onUpdate:value":t[7]||(t[7]=e=>r.value=e),options:i.value,onChange:t[8]||(t[8]=e=>s(e))},{default:be(()=>[j(l,{value:r.value,"onUpdate:value":t[5]||(t[5]=e=>r.value=e),min:0,controls:!0,precision:0,style:{width:"100%"},size:"small","addon-after":"px",onChange:t[6]||(t[6]=e=>s(e))},null,8,["value"])]),_:1},8,["value","options"])])])])}}}),[["__scopeId","data-v-4b2df5b4"]]),Ia=/* @__PURE__ */e({default:()=>za}),za=/* @__PURE__ */M(G({name:"border-radius",components:{BorderRadius:Ma},props:{value:{type:Object,default:()=>({})}},emits:["changeEvent"],watch:{value(){}},methods:{changeEvent(...e){this.$emit("changeEvent",...e)}}}),[["render",function(e,t,a,l,n,o){const i=ue("BorderRadius",!0);return le(),W(i,{"is-label-print":"",value:e.value,onChangeEvent:e.changeEvent},null,8,["value","onChangeEvent"])}]]),Na={name:"color-picker",components:{GColorPicker:S},props:{value:{type:String,default:"#00000000"},label:{type:String,default:""}},emits:["changeEvent"],data:()=>({presetColor:["#DBDBDB","#FFE4E4","#D1D1D1","#838383","#838383","#FFEECB","#D8E3FF","#FF8888","#FF8888","#0DAA9C","#3370FF"]}),computed:{colorValue:{get(){return this.value},set(e){this.onColorChange(e)}}},methods:{handleUpdateColor(e,t){this.colorValue=t},onColorChange(e){this.$emit("changeEvent",e)}}},Fa=/* @__PURE__ */e({default:()=>Wa}),Va={class:"setting-row color-picker__wrapper"},Oa={class:"sub-title",style:{"line-height":"26px"}},Pa={class:"sub-content"},Ua={class:"sub-content_inner"},Wa=/* @__PURE__ */M(Na,[["render",function(e,t,a,l,n,o){const i=ue("g-color-picker");return le(),K("div",Va,[H("div",Oa,pe(e.label+":"),1),H("div",Pa,[H("div",Ua,[j(i,{preset:e.presetColor,color:e.colorValue,"onUpdate:color":e.handleUpdateColor},{icon:be(()=>[H("div",{style:ee({width:"24px",height:"24px",backgroundColor:e.colorValue,border:"1px solid #E8EBF0",borderRadius:"4px"})},null,4)]),_:1},8,["preset","color","onUpdate:color"])])])])}]]),$a=G({name:"expression-content",props:{isEdhr:{type:Boolean,default:!1},value:{type:Object,default:()=>({})},maxLevel:{type:Number,default:3},modelKey:{type:String,default:""}},emits:["update:value","changeEvent"],setup(e,{emit:t}){const a=U({get:()=>e.value,set(e){t("update:value",e),t("changeEvent",e)}}),{project:n,isEdhr:o}=B(),i=/* @__PURE__ */new Map,r=async(t,a=1)=>{if(a>e.maxLevel)return[];const l=[];let n=[];i.has(t)?n=i.get(t):(n=await _api.apaas.fieldMeta.getList({modelKey:t})??[],n.length>0&&i.set(t,n));const o=[];return n.forEach(t=>{const n={id:t.key,name:t.name,valueType:t.type};if(l.push(n),(t.type===N.REF||t.type===N.RDO_REF)&&a<=e.maxLevel){const e=async()=>{const e=await r(t.bindInfo,a+1);e&&e.length>0&&(n.children=e)};o.push(e())}}),await Promise.all(o),l};return{t:V,openExpress:async()=>{const t=!n.value||o.value||e.isEdhr?[]:await r(n.value.modelKey||e.modelKey);E({expr:a.value.exp,mode:(o.value||e.isEdhr,I.LABEL_PRINT),modelKey:o.value||e.isEdhr?"em_label_param":void 0,identifiers:{[z.FIELD]:t},callback:async(e,t)=>{a.value={exp:e,expression:t,relationColumns:await l(e)}}})},val:a}}}),Ka=/* @__PURE__ */e({default:()=>Ga}),Ha={class:"expression-content w-full"},Xa={class:"setting-row"},ja={class:"sub-content"},Ga=/* @__PURE__ */M($a,[["render",function(e,t,a,l,n,o){var i;const r=ue("a-input");return le(),K("div",Ha,[H("div",Xa,[H("div",ja,[j(r,{value:null===(i=e.val)||void 0===i?void 0:i.expression,placeholder:e.t("sys.pageDesigner.pleaseEnterAnExpression"),readonly:"",onClick:e.openExpress},null,8,["value","placeholder","onClick"])])])])}]]),Ya=G({name:"font-family",components:{GColorPicker:S},props:{value:{type:[String,Number]},type:{type:String,default:"text"},min:{type:Number,default:0},max:{type:Number,default:100},step:{type:Number,default:1},precision:{type:Number,default:0},label:{type:String,default:"text"},validate:{type:Function},filter:{type:Function},tagAttr:{type:String,default:"text"},tag:{type:Boolean,default:!1},hasBind:{type:Boolean,default:!1},hasDisconnect:{type:Boolean,default:!1},defaultValue:{type:Number},color:{type:String},fontFamily:{type:String,default:"Roboto, sans-serif"}},emits:["changeEvent","change2Event","change3Event"],data(){return{aa:[{family:"黑体",fonts:[{name:"微软雅黑",definition:"微软雅黑"},{name:"黑体",definition:"黑体"}]},{family:"宋体",fonts:[{name:"宋体",definition:"宋体"}]},{family:"serif",fonts:[{name:"Georgia",definition:"Georgia, serif"},{name:"Palatino",definition:'"Palatino Linotype", "Book Antiqua", Palatino serif'},{name:"Times",definition:'"Times New Roman", Times serif'},{name:"宋体",definition:"宋体"}]},{family:"sans-serif",fonts:[{name:"Arial",definition:"Arial, Helvetica, sans-serif"},{name:"Arial Black",definition:'"Arial Black", Gadget, sans-serif'},{name:"Impact",definition:"Impact, Charcoal, sans-serif"},{name:"Lucida Sans",definition:'"Lucida Sans Unicode", "Lucida Grande", sans-serif'},{name:"Tahoma",definition:"Tahoma, Geneva, sans-serif"},{name:"Trebuchet",definition:'"Trebuchet MS", Helvetica, sans-serif'},{name:"Verdana",definition:"Verdana, Geneva, sans-serif"}]},{family:"monospace",fonts:[{name:"Courier",definition:'"Courier New", Courier, monospace'},{name:"Lucida Console",definition:'"Lucida Console", Monaco, monospace'}]},{family:"icons",fonts:[{name:"Material Icons",definition:'"Material Icons"'}]}],currentSize:this.value,ns:O("font-size-and-color"),presetColor:["#DBDBDB","#FFE4E4","#D1D1D1","#838383","#838383","#FFEECB","#D8E3FF","#FF8888","#FF8888","#0DAA9C","#3370FF"]}},computed:{colorValue:{get(){return this.color},set(e){this.onColorChange(e)}},currentValue:{get(){return this.fontFamily},set(e){this.$emit("changeEvent",e)}}},watch:{value(e){this.currentSize=e}},created(){(async()=>{const e=await _api.apaas.label.getListFont();if(e){const t=[];e.forEach(e=>{e.key&&e.value&&t.push({name:e.key,definition:e.value})}),this.aa.push({family:"其他",fonts:t})}})()},methods:{blurInput(e){var t;null===(t=e.target)||void 0===t||t.blur()},handleUpdateColor(e){this.colorValue=e},onColorChange(e){this.$emit("change3Event",e)},dragstartHandler(e){e.dataTransfer&&(e.dataTransfer.dropEffect="copy",e.dataTransfer.effectAllowed="all",window.DragTreeTableOutDropData=JSON.stringify({type:"attr",prop:this.tagAttr}))},changeValue(e){if("text"===this.type){let t="string"==typeof e?e.trim():"";this.filter&&(t=this.filter(t)),this.currentSize=t,e=t}this.$emit("change2Event",this.currentSize),"number"===this.type&&this.defaultValue&&(this.currentSize=e??this.defaultValue),this.validate?this.validate(e)?this.$emit("change2Event",e):this.currentSize=this.value:this.$emit("change2Event",e)}}}),Za=/* @__PURE__ */e({default:()=>ll}),Qa={class:"font-family"},qa={class:"setting-row flex-col"},Ja={class:"sub-content overflow-hidden"},el={class:"sub-content_inner overflow-hidden mr8px"},tl={class:"sub-content_inner mr8px"},al={class:"w24px"},ll=/* @__PURE__ */M(Ya,[["render",function(e,t,a,l,n,o){const i=ue("a-select-option"),r=ue("a-select-opt-group"),s=ue("a-select"),u=ue("a-input-number"),d=ue("g-color-picker");return le(),K("div",Qa,[H("div",qa,[t[2]||(t[2]=H("div",{class:"sub-title mb-4px"},"字符",-1)),H("div",Ja,[H("div",el,[j(s,{value:e.currentValue,"onUpdate:value":t[0]||(t[0]=t=>e.currentValue=t),style:{width:"100%"}},{default:be(()=>[(le(!0),K(P,null,re(e.aa,(e,t)=>(le(),W(r,{key:`${e.family}-${t}`},{label:be(()=>[H("span",null,pe(e.family),1)]),default:be(()=>[(le(!0),K(P,null,re(e.fonts,(e,t)=>(le(),W(i,{key:`${e.definition}-${t}`,value:e.definition,label:e.name},null,8,["value","label"]))),128))]),_:2},1024))),128))]),_:1},8,["value"])]),H("div",tl,["number"===e.type?(le(),W(u,{key:0,value:e.currentSize,"onUpdate:value":t[1]||(t[1]=t=>e.currentSize=t),max:e.max,min:e.min,step:e.step,precision:e.precision,"controls-position":"right",disabled:e.hasBind,"addon-after":"px",onKeyup:we(e.blurInput,["enter"]),onChange:e.changeValue},null,8,["value","max","min","step","precision","disabled","onKeyup","onChange"])):$("",!0)]),H("div",al,[j(d,{class:"g-color-picker",preset:e.presetColor,color:e.colorValue,"onUpdate:color":e.handleUpdateColor},{icon:be(()=>[H("div",{style:ee({width:"26px",height:"26px",backgroundColor:e.colorValue,border:"1px solid #E8EBF0",borderRadius:"4px"})},null,4)]),_:1},8,["preset","color","onUpdate:color"])])])])])}]]),nl=G({name:"font-size-and-color",components:{GColorPicker:S},props:{value:{type:[String,Number]},type:{type:String,default:"text"},min:{type:Number,default:0},max:{type:Number,default:100},step:{type:Number,default:1},precision:{type:Number,default:0},label:{type:String,default:"text"},validate:{type:Function},filter:{type:Function},tagAttr:{type:String,default:"text"},tag:{type:Boolean,default:!1},hasBind:{type:Boolean,default:!1},hasDisconnect:{type:Boolean,default:!1},defaultValue:{type:Number},color:{type:String}},emits:["changeEvent","change2Event"],data(){return{currentValue:this.value,ns:O("font-size-and-color"),presetColor:["#DBDBDB","#FFE4E4","#D1D1D1","#838383","#838383","#FFEECB","#D8E3FF","#FF8888","#FF8888","#0DAA9C","#3370FF"]}},computed:{colorValue:{get(){return this.color},set(e){this.onColorChange(e)}}},watch:{value(e){this.currentValue=e}},methods:{blurInput(e){var t;null===(t=e.target)||void 0===t||t.blur()},handleUpdateColor(e){this.colorValue=e},onColorChange(e){this.$emit("change2Event",e)},dragstartHandler(e){e.dataTransfer&&(e.dataTransfer.dropEffect="copy",e.dataTransfer.effectAllowed="all",window.DragTreeTableOutDropData=JSON.stringify({type:"attr",prop:this.tagAttr}))},changeValue(e){if("text"===this.type){let t="string"==typeof e?e.trim():"";this.filter&&(t=this.filter(t)),this.currentValue=t,e=t}this.$emit("changeEvent",this.currentValue),"number"===this.type&&this.defaultValue&&(this.currentValue=e??this.defaultValue),this.validate?this.validate(e)?this.$emit("changeEvent",e):this.currentValue=this.value:this.$emit("changeEvent",e)}}}),ol=/* @__PURE__ */e({default:()=>cl}),il=["input-type","attr-name"],rl={class:"setting-row flex-col"},sl={class:"sub-title mb-4px"},ul={class:"sub-content"},dl={class:"sub-content_inner"},cl=/* @__PURE__ */M(nl,[["render",function(e,t,a,l,n,o){const i=ue("a-input-number"),r=ue("g-color-picker");return le(),K("div",{class:J(e.ns.b()),"input-type":e.type,"attr-name":e.tagAttr},[H("div",rl,[H("div",sl,pe(e.label),1),H("div",ul,[H("div",dl,["number"===e.type?(le(),W(i,{key:0,value:e.currentValue,"onUpdate:value":t[0]||(t[0]=t=>e.currentValue=t),max:e.max,min:e.min,step:e.step,precision:e.precision,"controls-position":"right",disabled:e.hasBind,"addon-after":"px",onKeyup:we(e.blurInput,["enter"]),onChange:e.changeValue},null,8,["value","max","min","step","precision","disabled","onKeyup","onChange"])):$("",!0),j(r,{class:"g-color-picker",preset:e.presetColor,color:e.colorValue,"onUpdate:color":e.handleUpdateColor},{icon:be(()=>[H("div",{style:ee({width:"26px",height:"26px",backgroundColor:e.colorValue,border:"1px solid #E8EBF0",borderRadius:"4px"})},null,4)]),_:1},8,["preset","color","onUpdate:color"])])])])],10,il)}]]),pl={name:"font-style",props:{fontWeight:{type:String,default:"inherit"},fontStyle:{type:String,default:"inherit"},textDecoration:{type:String,default:"inherit"},disabled:{type:Boolean,default:!1}},emits:["changeEvent"],computed:{isBold(){return"bold"===this.fontWeight},isItalic(){return"italic"===this.fontStyle},isUnderlined(){return"underline"===this.textDecoration},isStriked(){return"line-through"===this.textDecoration}},methods:{onToggleProp(e,t,a){this.$emit("changeEvent",{prop:e,value:a?"inherit":t})}}},vl=/* @__PURE__ */e({default:()=>bl}),hl={class:"font-style"},gl={class:"setting-row flex-col"},ml={class:"sub-content"},fl={class:"sub-content_inner"},bl=/* @__PURE__ */M(pl,[["render",function(e,t,a,l,n,o){const i=ue("bold-outlined"),r=ue("italic-outlined"),s=ue("underline-outlined"),u=ue("strikethrough-outlined");return le(),K("div",hl,[H("div",gl,[H("div",ml,[H("div",fl,[H("div",{class:J(["icon-bar",{disabled:a.disabled}])},[H("div",{class:J(["icon-bar_item",{active:o.isBold}]),title:"加粗"},[j(i,{onClick:t[0]||(t[0]=e=>o.onToggleProp("font-weight","bold",o.isBold))})],2),H("div",{class:J(["icon-bar_item",{active:o.isItalic}]),title:"倾斜"},[j(r,{onClick:t[1]||(t[1]=e=>o.onToggleProp("font-style","italic",o.isItalic))})],2),H("div",{class:J(["icon-bar_item",{active:o.isUnderlined}]),title:"下划线"},[j(s,{onClick:t[2]||(t[2]=e=>o.onToggleProp("text-decoration","underline",o.isUnderlined))})],2),H("div",{class:J(["icon-bar_item",{active:o.isStriked}]),title:"删除线"},[j(u,{onClick:t[3]||(t[3]=e=>o.onToggleProp("text-decoration","line-through",o.isStriked))})],2)],2)])])])])}]]),yl={class:"image-data__wrapper"},wl={class:"setting-row flex-col"},xl={class:"sub-title mb-2px"},Cl={class:"text-[#797A7D]",style:{"font-size":"12px"}},El={class:"text-[#C3C3C3]",style:{"font-size":"12px"}},_l={class:"setting-row flex-col"},kl={class:"sub-title mb-2px"},Sl={class:"sub-content"},Al=/* @__PURE__ */G({__name:"ImageData",props:{src:{}},emits:["changeEvent"],setup(e,{emit:t}){const a=t,{project:l}=B();(e=>{if(!e)return;let t=new Image;t.src=e,t.complete||(t.onload=()=>{})})(e.src);const n=async e=>{var t;o(e.file)&&i((await _api.apaas.fileResource.postUpload({type:"LABEL_IMAGE",...(null===(t=l.value)||void 0===t?void 0:t.modelKey)?{modelKey:l.value.modelKey}:{}},{file:e.file})).data)},o=e=>{const t=["image/jpeg","image/png"].includes(e.type),a=e.size/1024/1024<5;return t?!!a||(Se.error("上传图片大小不能超过 5MB!"),!1):(Se.error("上传图片只能是 JPG/PNG 格式!"),!1)},i=e=>{a("changeEvent",e)};return(t,a)=>{const l=ue("a-upload-dragger"),o=ue("a-input");return le(),K("div",yl,[H("div",wl,[H("div",xl,pe(he(V)("sys.pageDesigner.uploadimage")),1),j(l,{"file-list":[],"custom-request":n},{default:be(()=>[a[0]||(a[0]=H("div",{class:"text-[#C3C3C3] h-47px"},[H("i",{class:"iconfont icon-tupian-shili",style:{"font-size":"32px"}})],-1)),H("p",Cl,pe(he(V)("sys.pageDesigner.clickOrDragToUpload")),1),H("p",El,pe(he(V)("sys.pageDesigner.imgUploadTip")),1)]),_:1})]),H("div",_l,[H("div",kl,pe(he(V)("sys.pageDesigner.address")),1),H("div",Sl,[j(o,{disabled:"",value:e.src,placeholder:he(V)("sys.pageDesigner.autoBroughtOut")},null,8,["value","placeholder"])])])])}}}),Bl=/* @__PURE__ */e({default:()=>Tl}),Tl=/* @__PURE__ */M(Al,[["__scopeId","data-v-9232a443"]]),Rl=G({name:"InputContent",props:{value:{type:[String,Number]},type:{type:String,default:"text"},min:{type:Number,default:0},max:{type:Number,default:100},step:{type:Number,default:1},precision:{type:Number,default:0},label:{type:String,default:"text"},validate:{type:Function},filter:{type:Function},tagAttr:{type:String,default:"text"},tag:{type:Boolean,default:!1},hasBind:{type:Boolean,default:!1},hasDisconnect:{type:Boolean,default:!1},defaultValue:{type:Number},isReadonly:{type:Boolean,default:!1}},emits:["changeEvent"],data(){return{currentValue:this.value,formState:{value:""}}},watch:{value(e){this.currentValue=e}},methods:{blurInputNumber(e){var t;null===(t=e.target)||void 0===t||t.blur()},handleClickInput(e){this.isReadonly&&(e.stopPropagation(),this.$emit("changeEvent",this.currentValue))},dragstartHandler(e){e.dataTransfer&&(e.dataTransfer.dropEffect="copy",e.dataTransfer.effectAllowed="all",window.DragTreeTableOutDropData=JSON.stringify({type:"attr",prop:this.tagAttr}))},changeValue(e){if(this.formState.value=e??"","text"===this.type){let t="string"==typeof e?e.trim():"";this.filter&&(t=this.filter(t)),this.currentValue=t,e=t}this.$emit("changeEvent",this.currentValue),"number"===this.type&&this.defaultValue&&(this.currentValue=e??this.defaultValue),this.validate?this.validate(e)?this.$emit("changeEvent",e):this.currentValue=this.value:this.$emit("changeEvent",e)}}}),Dl=/* @__PURE__ */e({default:()=>Fl}),Ll=["input-type","attr-name"],Ml={class:"setting-row flex-col"},Il={class:"sub-title mb-2px"},zl={class:"sub-content"},Nl={class:"sub-content_inner"},Fl=/* @__PURE__ */M(Rl,[["render",function(e,t,a,l,n,o){const i=ue("a-input"),r=ue("a-textarea"),s=ue("a-input-number"),u=ue("a-date-picker"),d=ue("a-form-item"),c=ue("a-form");return le(),K("div",{class:"input-content","input-type":e.type,"attr-name":e.tagAttr},[H("div",Ml,[H("div",Il,pe(e.label),1),H("div",zl,[H("div",Nl,[j(c,{model:e.formState,name:"basic"},{default:be(()=>[j(d,{name:"value",rules:"number"===e.type?"":[{max:1e3,message:"最大1000字"}]},{default:be(()=>["text"===e.type?(le(),W(i,{key:0,value:e.currentValue,"onUpdate:value":t[0]||(t[0]=t=>e.currentValue=t),disabled:e.hasBind,readonly:e.isReadonly,style:{width:"100%"},onClick:e.handleClickInput,onChange:t[1]||(t[1]=t=>e.changeValue(t.target.value))},null,8,["value","disabled","readonly","onClick"])):$("",!0),"textArea"===e.type?(le(),W(r,{key:1,value:e.currentValue,"onUpdate:value":t[2]||(t[2]=t=>e.currentValue=t),disabled:e.hasBind,readonly:e.isReadonly,style:{width:"100%"},placeholder:"请输入文本",onClick:e.handleClickInput,onChange:t[3]||(t[3]=t=>e.changeValue(t.target.value))},null,8,["value","disabled","readonly","onClick"])):$("",!0),"number"===e.type?(le(),W(s,{key:2,value:e.currentValue,"onUpdate:value":t[4]||(t[4]=t=>e.currentValue=t),max:e.max,min:e.min,step:e.step,precision:e.precision,"controls-position":"right",disabled:e.hasBind,style:{width:"100%"},onKeyup:we(e.blurInputNumber,["enter"]),onChange:t[5]||(t[5]=t=>e.changeValue(t))},null,8,["value","max","min","step","precision","disabled","onKeyup"])):"date"===e.type?(le(),W(u,{key:3,value:e.currentValue,"onUpdate:value":t[6]||(t[6]=t=>e.currentValue=t),"value-format":"yyyy-MM-dd",type:"date",placeholder:"选择日期",style:{width:"100%"},disabled:e.hasBind,onChange:t[7]||(t[7]=t=>e.changeValue(t))},null,8,["value","disabled"])):$("",!0)]),_:1},8,["rules"])]),_:1},8,["model"])])])])],8,Ll)}]]),Vl=G({name:"InputNumber",props:{value:{type:Number,default:100},min:{type:Number,default:0},max:{type:Number,default:100},step:{type:Number,default:1},precision:{type:Number,default:1},label:{type:String,default:""}},emits:["changeEvent"],data(){return{currentValue:this.value}},watch:{value(e){this.currentValue=e}},methods:{blurInput(e){var t;null===(t=e.target)||void 0===t||t.blur()}}}),Ol=/* @__PURE__ */e({default:()=>Hl}),Pl={class:"input-number"},Ul={class:"setting-row"},Wl={class:"sub-title"},$l={class:"sub-content"},Kl={class:"sub-content_inner"},Hl=/* @__PURE__ */M(Vl,[["render",function(e,t,a,l,n,o){const i=ue("a-input-number");return le(),K("div",Pl,[H("div",Ul,[H("div",Wl,pe(e.label),1),H("div",$l,[H("div",Kl,[j(i,{value:e.currentValue,"onUpdate:value":t[0]||(t[0]=t=>e.currentValue=t),max:e.max,min:e.min,size:"mini",step:e.step,precision:e.precision,"controls-position":"right",style:{width:"100%"},onKeyup:we(e.blurInput,["enter"]),onChange:t[1]||(t[1]=t=>{e.$emit("changeEvent",null!=t?Math.round(100*t)/100:t)})},null,8,["value","max","min","step","precision","onKeyup"])])])])])}]]);async function Xl(){const e=await _api.apaas.modelComprehensive.postBizServiceModelCategoryModelKeyBsKey({bsKey:"listAll",modelKey:"em_label_param",modelCategory:"entity"},{},{sorts:[{sortField:"create_time_",sortType:"desc"}]});return((null==e?void 0:e.data)||[]).map(e=>({value:e.id_,label:e.name_,_item:e,id:e.id_,name:e.name_,type:e.type_}))}var jl=/* @__PURE__ */G({__name:"LabelParamsSelect",props:{modelValue:{}},emits:["update:modelValue","change","changeEvent"],setup(e,{expose:t,emit:a}){const l=a,n=ie(e.modelValue??void 0),o=ie([]);function i(e){var t;l("update:modelValue",e),l("change",e,o.value.find(t=>t.value===e)),l("changeEvent",{val:e,label:null===(t=o.value.find(t=>t.value===e))||void 0===t?void 0:t.label})}return te(async()=>{o.value=await Xl()}),t({getOptions:async()=>o.value.length?o.value:await Xl(),getParamsData:()=>o.value}),(e,t)=>{const a=ue("a-select");return le(),W(a,{value:n.value,"onUpdate:value":t[0]||(t[0]=e=>n.value=e),options:o.value,"allow-clear":"","show-search":"",placeholder:he(V)("sys.chooseText"),"option-filter-prop":"label",style:{width:"100%"},onChange:i},null,8,["value","options","placeholder"])}}}),Gl=/* @__PURE__ */e({default:()=>Yl}),Yl=jl,Zl=/* @__PURE__ */e({default:()=>ln}),Ql={name:"radio-select",props:{options:{type:Array,default:()=>[]},value:{type:[String,Number,Boolean]},isGroup:{type:Boolean,default:!1},label:{type:String,default:""}},emits:["changeEvent"],data:()=>({}),computed:{currentValue:{get(){return this.value},set(e){this.$emit("changeEvent",e)}}}},ql={class:"select-content"},Jl={class:"setting-row flex-col"},en={class:"sub-title mb-2px"},tn={class:"sub-content"},an={class:"sub-content_inner"},ln=/* @__PURE__ */M(Ql,[["render",function(e,t,a,l,n,o){const i=ue("a-radio-group");return le(),K("div",ql,[H("div",Jl,[H("div",en,pe(a.label),1),H("div",tn,[H("div",an,[j(i,{value:o.currentValue,"onUpdate:value":t[0]||(t[0]=e=>o.currentValue=e),options:a.options},null,8,["value","options"])])])])])}]]),nn=/* @__PURE__ */e({default:()=>pn}),on={name:"select-content",props:{options:{type:Array,default:()=>[]},label:{type:String,default:"选择"},value:{type:[String,Number,Boolean]},isGroup:{type:Boolean,default:!1}},emits:["changeEvent"],data:()=>({}),computed:{currentValue:{get(){return this.value},set(e){this.$emit("changeEvent",e)}}}},rn={class:"select-content"},sn={class:"setting-row flex-col"},un={class:"sub-title mb-2px"},dn={class:"sub-content"},cn={class:"sub-content_inner"},pn=/* @__PURE__ */M(on,[["render",function(e,t,a,l,n,o){const i=ue("a-select");return le(),K("div",rn,[H("div",sn,[H("div",un,pe(a.label),1),H("div",dn,[H("div",cn,[j(i,{value:o.currentValue,"onUpdate:value":t[0]||(t[0]=e=>o.currentValue=e),options:a.options,style:{width:"100%"}},null,8,["value","options"])])])])])}]]),vn=/* @__PURE__ */e({default:()=>yn}),hn={class:"stack-order"},gn={class:"setting-row flex-col"},mn={class:"sub-content"},fn={class:"sub-content_inner"},bn={class:"stack-order-btn-box w-full"},yn=/* @__PURE__ */M({name:"StackOrderWidget",props:{zIndex:{type:[String,Number],default:"auto"}},emits:["changeEvent"]},[["render",function(e,t,a,l,n,o){const i=ue("a-button");return le(),K("div",hn,[H("div",gn,[t[6]||(t[6]=H("div",{class:"sub-title mb-2px"},"Z轴层级",-1)),H("div",mn,[H("div",fn,[H("div",bn,[j(i,{plain:"",size:"mini",onClick:t[0]||(t[0]=t=>e.$emit("changeEvent","auto"))},{default:be(()=>[...t[3]||(t[3]=[X("自动",-1)])]),_:1}),j(i,{plain:"",size:"mini",onClick:t[1]||(t[1]=t=>e.$emit("changeEvent","auto"!==a.zIndex?a.zIndex+1:1))},{default:be(()=>[...t[4]||(t[4]=[X("上移一层",-1)])]),_:1}),j(i,{plain:"",size:"mini",onClick:t[2]||(t[2]=t=>e.$emit("changeEvent","auto"!==a.zIndex&&a.zIndex>0?a.zIndex-1:0))},{default:be(()=>[...t[5]||(t[5]=[X("下移一层",-1)])]),_:1})])])])]),t[7]||(t[7]=H("div",{class:"icon-bar none"},null,-1))])}]]),wn=G({name:"TextAlign",props:{textAlign:{type:String,default:"center"},disabled:{type:Boolean,default:!1}},emits:["changeEvent"],computed:{isAlignedLeft(){return"left"===this.textAlign},isAlignedRight(){return"right"===this.textAlign},isCentered(){return"center"===this.textAlign},isJustified(){return"justify"===this.textAlign}},methods:{onToggleProp(e,t){this.$emit("changeEvent",t?"inherit":e)}}}),xn=/* @__PURE__ */e({default:()=>kn}),Cn={class:"setting-row flex-col"},En={class:"sub-content"},_n={class:"sub-content_inner"},kn=/* @__PURE__ */M(wn,[["render",function(e,t,a,l,n,o){const i=ue("align-left-outlined"),r=ue("align-center-outlined"),s=ue("align-right-outlined"),u=ue("pic-center-outlined");return le(),K("div",Cn,[H("div",En,[H("div",_n,[H("div",{class:J(["icon-bar",{disabled:e.disabled}])},[H("div",{class:J(["icon-bar_item",{active:e.isAlignedLeft}]),title:"左对齐",onClick:t[0]||(t[0]=t=>e.onToggleProp("left",e.isAlignedLeft))},[j(i)],2),H("div",{class:J(["icon-bar_item",{active:e.isCentered}]),title:"居中对齐",onClick:t[1]||(t[1]=t=>e.onToggleProp("center",e.isCentered))},[j(r)],2),H("div",{class:J(["icon-bar_item",{active:e.isAlignedRight}]),title:"右对齐",onClick:t[2]||(t[2]=t=>e.onToggleProp("right",e.isAlignedRight))},[j(s)],2),H("div",{class:J(["icon-bar_item",{active:e.isJustified}]),title:"两端对齐",onClick:t[3]||(t[3]=t=>e.onToggleProp("justify",e.isJustified))},[j(u)],2)],2)])])])}]]),Sn={name:"text-vertical-align",props:{verticalAlign:{type:String,default:"top"},disabled:{type:Boolean,default:!1}},emits:["changeEvent"],computed:{isTop(){return"top"===this.verticalAlign},isBottom(){return"bottom"===this.verticalAlign},isCentered(){return"middle"===this.verticalAlign}},methods:{onToggleProp(e,t){t||this.$emit("changeEvent",e)}}},An=/* @__PURE__ */e({default:()=>Dn}),Bn={class:"setting-row flex-col"},Tn={class:"sub-content"},Rn={class:"sub-content_inner"},Dn=/* @__PURE__ */M(Sn,[["render",function(e,t,a,l,n,o){const i=ue("vertical-align-top-outlined"),r=ue("vertical-align-middle-outlined"),s=ue("vertical-align-bottom-outlined");return le(),K("div",Bn,[H("div",Tn,[H("div",Rn,[H("div",{class:J(["icon-bar",{disabled:a.disabled}])},[H("div",{class:J(["icon-bar_item",{active:o.isTop}]),title:"顶对齐",onClick:t[0]||(t[0]=e=>o.onToggleProp("top",o.isTop))},[j(i)],2),H("div",{class:J(["icon-bar_item",{active:o.isCentered}]),title:"垂直居中",onClick:t[1]||(t[1]=e=>o.onToggleProp("middle",o.isCentered))},[j(r)],2),H("div",{class:J(["icon-bar_item",{active:o.isBottom}]),title:"底对齐",onClick:t[2]||(t[2]=e=>o.onToggleProp("bottom",o.isBottom))},[j(s)],2)],2)])])])}]]),Ln=/* @__PURE__ */G({__name:"label-params-select",props:{modelValue:{}},emits:["update:modelValue","change"],setup(e,{expose:t,emit:a}){const l=a,n=ie(e.modelValue||void 0),o=ie([]);function i(e){l("update:modelValue",e),l("change",e,o.value.find(t=>t.value===e))}return te(async()=>{o.value=await Xl()}),t({getOptions:async()=>o.value.length?o.value:await Xl(),getParamsData:()=>o.value}),(e,t)=>{const a=ue("a-select");return le(),W(a,{value:n.value,"onUpdate:value":t[0]||(t[0]=e=>n.value=e),options:o.value,"allow-clear":"","show-search":"",placeholder:he(V)("sys.chooseText"),"option-filter-prop":"label",style:{width:"100%"},onChange:i},null,8,["value","options","placeholder"])}}}),Mn={class:"select-content w-full"},In={class:"setting-row flex-col"},zn={class:"sub-title mb-2px"},Nn={class:"sub-content"},Fn={class:"sub-content_inner"},Vn=/* @__PURE__ */G({__name:"VariableSelect",props:{value:{},modelKey:{},type:{},options:{},label:{},exp:{},maxLevel:{}},emits:["changeEvent","update:exp"],setup(e,{emit:t}){const{project:a,isEdhr:n}=B(),o=e,i=t,r=ie(),u=ie(),d=/* @__PURE__ */new Map,c=ie(!1),p=ie("");(async()=>{var e;if(null===(e=a.value)||void 0===e?void 0:e.modelKey){c.value=!1;const e=a.value.modelKey,t=await _api.apaas.modelMeta.getInfo({id:e});p.value=(null==t?void 0:t.name)||"";const l=await _api.apaas.fieldMeta.getList({modelKey:e});c.value=!0,r.value=(l||[]).filter(e=>![N.IMAGE,N.ATTACHMENT].includes(e.type)).map(e=>({...e,__bindFields:[]}))}else r.value=[]})();const v=U({get:()=>o.value,set(e){i("changeEvent",{val:e,label:u.value})}}),h=U({get:()=>o.type,set(e){i("changeEvent",{type:e,label:"",val:""})}}),g=U({get:()=>o.exp||{},set(e){i("update:exp",e),i("changeEvent",{exp:e})}}),m=async e=>{await q(),u.value=e},f=async e=>{await q(),v.value=e},b=async(e,t=1)=>{const a=o.maxLevel??3;if(t>a)return[];const l=[];let n=[];d.has(e)?n=d.get(e):(n=await _api.apaas.fieldMeta.getList({modelKey:e})||[],n&&n.length>0?d.set(e,n):n=[]);const i=[];return n.forEach(e=>{const n={id:e.key??"",name:e.name??"",valueType:e.type};if(l.push(n),(e.type===N.REF||e.type===N.RDO_REF)&&t<=a){const a=async()=>{const a=e.bindInfo;if(!a)return;const l=await b(a,t+1);l&&l.length>0&&(n.children=l)};i.push(a())}}),await Promise.all(i),l},y=async()=>{var e;const t=(null===(e=a.value)||void 0===e?void 0:e.modelKey)||o.modelKey,i=a.value&&!n.value&&t?await b(t):[],r=await E({expr:g.value.exp,modelKey:n.value?"em_label_param":void 0,mode:I.LABEL_PRINT,identifiers:{[z.FIELD]:i}});if(!r)return;const s=await l(r.expr);g.value={exp:r.expr,expression:r.exprEcho,relationColumns:s}};return(t,a)=>{const l=ue("a-select"),n=ue("a-input"),o=ue("a-input-group");return le(),K("div",Mn,[H("div",In,[H("div",zn,pe(e.label),1),H("div",Nn,[H("div",Fn,[j(o,{compact:""},{default:be(()=>[j(l,{value:h.value,"onUpdate:value":a[0]||(a[0]=e=>h.value=e),options:e.options,style:{width:"90px"}},null,8,["value","options"]),h.value===he(s).MODEL?(le(),W(he(x),{key:String(c.value),"allow-clear":"","expand-to-left":"","value-separator":".",placeholder:"请选择","model-name":p.value,"field-meta-list":r.value,value:v.value,onLabelChange:m,onFieldClick:f},null,8,["model-name","field-meta-list","value"])):h.value===he(s).LABEL_PARAMS?(le(),W(Ln,{key:1,modelValue:v.value,"onUpdate:modelValue":a[1]||(a[1]=e=>v.value=e)},null,8,["modelValue"])):(le(),W(n,{key:2,style:{width:"133px",height:"28px"},value:g.value.expression,placeholder:he(V)("sys.pageDesigner.pleaseEnterAnExpression"),readonly:"",onClick:y},null,8,["value","placeholder"]))]),_:1})])])])])}}}),On=/* @__PURE__ */e({default:()=>Pn}),Pn=/* @__PURE__ */M(Vn,[["__scopeId","data-v-2c6f0905"]]),Un={class:"select-content w-full"},Wn={class:"setting-row"},$n={class:"sub-content"},Kn=/* @__PURE__ */G({__name:"field-content",props:{value:{},modelKey:{}},emits:["changeEvent"],setup(e,{emit:t}){const{project:a}=B(),l=e,n=t,o=ie(),i=ie(""),r=ie(),s=ie(!1);(async()=>{var e;if(null===(e=a.value)||void 0===e?void 0:e.modelKey){s.value=!0;const e=a.value.modelKey,t=await _api.apaas.modelMeta.getInfo({id:e});i.value=(null==t?void 0:t.name)||"",_api.apaas.fieldMeta.getList({modelKey:e}).then(e=>{o.value=e.filter(e=>![N.IMAGE,N.ATTACHMENT].includes(e.type))}).finally(()=>{s.value=!1})}else o.value=[]})();const u=U({get:()=>l.value,set(e){n("changeEvent",{val:e,label:r.value})}}),d=async e=>{await q(),r.value=e},c=async e=>{await q(),u.value=e};return(e,t)=>(le(),K("div",Un,[H("div",Wn,[H("div",$n,[(le(),W(he(x),{key:String(s.value),"allow-clear":"","expand-to-left":"","value-separator":".",placeholder:"请选择","model-name":i.value,"field-meta-list":o.value,value:u.value,onLabelChange:d,onFieldClick:c},null,8,["model-name","field-meta-list","value"]))])])]))}}),Hn=/* @__PURE__ */e({default:()=>Xn}),Xn=/* @__PURE__ */M(Kn,[["__scopeId","data-v-259bce90"]]),jn={class:"image-data__wrapper"},Gn={class:"setting-row flex-col"},Yn={class:"sub-title mb-2px"},Zn={class:"sub-content"},Qn=/* @__PURE__ */G({__name:"icon-style",props:{icon:{},logoColor:{},logoBgColor:{}},emits:["changeEvent"],setup(e,{emit:t}){const a=t,l=e,n=ie({value:l.icon,logoColor:l.logoColor,logoBgColor:l.logoBgColor});return fe(()=>n.value,e=>{n.value=e,a("changeEvent",n.value)},{immediate:!0,deep:!0}),(e,t)=>{const a=ue("IconNextPicker");return le(),K("div",jn,[H("div",Gn,[H("div",Yn,pe(he(V)("sys.appDesigner.icon")),1),H("div",Zn,[j(a,{value:n.value.value,"onUpdate:value":t[0]||(t[0]=e=>n.value.value=e),color:n.value.logoColor,"onUpdate:color":t[1]||(t[1]=e=>n.value.logoColor=e),background:n.value.logoBgColor,"onUpdate:background":t[2]||(t[2]=e=>n.value.logoBgColor=e),"show-color":"","show-background":""},null,8,["value","color","background"])])])])}}}),qn=/* @__PURE__ */e({default:()=>Jn}),Jn=Qn,eo={name:"rich-btn",props:{value:{type:String},label:{type:String,default:"富文本内容"},type:{type:String,default:""},tagAttr:{type:String,default:""}},emits:["changeEvent"],data(){return{currentValue:this.value}},watch:{value(e){this.currentValue=e}},methods:{handleClick(e){e.stopPropagation(),this.$emit("changeEvent",this.currentValue)}}},to=/* @__PURE__ */e({default:()=>io}),ao=["input-type","attr-name"],lo={class:"setting-row flex-col"},no={class:"sub-title mb-2px"},oo={class:"sub-content"},io=/* @__PURE__ */M(eo,[["render",function(e,t,a,l,n,o){const i=ue("a-button");return le(),K("div",{class:"input-content","input-type":a.type,"attr-name":a.tagAttr},[H("div",lo,[H("div",no,pe(a.label),1),H("div",oo,[j(i,{block:"",type:n.currentValue?"primary":"default",onClick:t[0]||(t[0]=e=>o.handleClick(e))},{default:be(()=>[X(pe(n.currentValue?"编辑内容":"请输入富文本"),1)]),_:1},8,["type"])])])],8,ao)}]]),ro={},so=/* @__PURE__ */Object.assign({"./AliasInput.vue":na,"./Border.vue":da,"./BorderConfig.vue":ka,"./BorderRadius.vue":Ia,"./ColorPicker.vue":Fa,"./ExpressionContent.vue":Ka,"./FontFamily.vue":Za,"./FontSizeAndColor.vue":ol,"./FontStyle.vue":vl,"./ImageData.vue":Bl,"./InputContent.vue":Dl,"./InputNumber.vue":Ol,"./LabelParamsSelect.vue":Gl,"./RadioSelect.vue":Zl,"./SelectContent.vue":nn,"./StackOrder.vue":vn,"./TextAlign.vue":xn,"./TextVerticalAlign.vue":An,"./VariableSelect.vue":On,"./dim-pos.vue":Yt,"./field-content.vue":Hn,"./icon-style.vue":qn,"./labelTemplate.vue":ea,"./rich-btn.vue":to}),uo=e=>e.replace(/\.vue$/i,"").replace(/([a-z0-9])([A-Z])/g,"$1-$2").replace(/([A-Z])([A-Z][a-z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),co=e=>(e.replace(/\\/g,"/").split("/").pop()||"").replace(/\.(vue|tsx)$/i,"");for(const Fo in so){const e=so[Fo].default,t=(null==e?void 0:e.name)||(null==e?void 0:e.__name)||"",a=co(Fo),l=new Set([t,uo(t),a,uo(a)]);l.size&&l.forEach(t=>{t&&(ro[t]=e)})}var po={class:"component-properties"},vo=/* @__PURE__ */M(/* @__PURE__ */G({__name:"component-properties",emits:["propchange"],setup(e,{emit:t}){const a=[w.TEXT,w.RICH_TEXT],{basicProperties:l,componentProperties:n,type:o}=v({emit:t}),i=U(()=>n.value[o.value]||[]),r=U(()=>i.value.map(e=>e.text)),s=ie("1"),u=ie(["basic",...r.value]);return(e,t)=>{const n=ue("a-collapse-panel"),r=ue("a-collapse"),d=ue("a-tab-pane"),c=ue("a-tabs");return le(),K("div",po,[j(c,{"active-key":s.value,"onUpdate:activeKey":t[2]||(t[2]=e=>s.value=e),centered:"",class:"panel-editor-tabs"},{default:be(()=>[j(d,{key:"1",tab:"属性"},{default:be(()=>[j(r,{"active-key":u.value,"onUpdate:activeKey":t[0]||(t[0]=e=>u.value=e),bordered:!1,"expand-icon-position":"right",ghost:""},{default:be(()=>[(le(!0),K(P,null,re(he(l).basic,e=>(le(),K(P,{key:e.text},[(le(),W(n,{key:"basic",header:e.text},{default:be(()=>[(le(!0),K(P,null,re(e.children,e=>(le(),W(ce(he(ro)[e.type]),Q({key:e.type,ref_for:!0},e.props,{onChangeEvent:e.changeEvent}),null,16,["onChangeEvent"]))),128))]),_:2},1032,["header"]))],64))),128)),(le(!0),K(P,null,re(i.value,e=>(le(),K(P,{key:e.text},[e.isStyle?$("",!0):(le(),W(n,{key:e.text,header:e.text},{default:be(()=>[(le(!0),K(P,null,re(e.children,e=>(le(),W(ce(he(ro)[e.type]),Q({key:e.type,ref_for:!0},e.props,{onChangeEvent:e.changeEvent}),null,16,["onChangeEvent"]))),128))]),_:2},1032,["header"]))],64))),128))]),_:1},8,["active-key"])]),_:1}),a.includes(he(o))?(le(),W(d,{key:"2",tab:"样式","force-render":""},{default:be(()=>[j(r,{"active-key":u.value,"onUpdate:activeKey":t[1]||(t[1]=e=>u.value=e),bordered:!1,"expand-icon-position":"right",ghost:""},{default:be(()=>[(le(!0),K(P,null,re(i.value,e=>(le(),K(P,{key:e.text},[e.isStyle?(le(),W(n,{key:e.text,header:e.text},{default:be(()=>[(le(!0),K(P,null,re(e.children,e=>(le(),W(ce(he(ro)[e.type]),Q({key:e.type,ref_for:!0},e.props,{onChangeEvent:e.changeEvent}),null,16,["onChangeEvent"]))),128))]),_:2},1032,["header"])):$("",!0)],64))),128))]),_:1},8,["active-key"])]),_:1})):$("",!0)]),_:1},8,["active-key"])])}}}),[["__scopeId","data-v-4a732e3f"]]),ho={class:"selection-title__wrapper"},go=["title"],mo=/* @__PURE__ */G({__name:"panel-widget",setup(e){const{selectedElements:t,updateEgglement:a}=r(),{selectedItem:l}=v({emit:()=>{}}),n=U(()=>0===t.value.length?"":t.value.length>1?"包含多个元素":t.value[0].displayName);U(()=>0===t.value.length?"pages":t.value.length>1?"multiple":t.value[0].iconName.toLowerCase()).value;const o=U(()=>0===t.value.length?"page":t.value.length>1?"multiple":"component"),i=(...e)=>{const t=e[0];if(""===t.value)return;const a={};["alias"].includes(t.type)||"string"!=typeof t.value||isNaN(Number(t.value))?a[t.type]=t.value:a[t.type]=parseInt(t.value),t.prop&&(a.prop=t.prop),s(a)},s=e=>{a({egglement:l.value,...e})};return(e,t)=>(le(),K("div",{key:he(l).id,class:"panel-box"},[H("div",ho,[H("span",{class:J(n.value?"color-[#797A7D]":"color-[#1A1D23]")},"模板",2),n.value?(le(),K("span",{key:0,class:J(n.value?"color-[#797A7D]":"color-[#1A1D23]")}," > ",2)):$("",!0),n.value?(le(),K("span",{key:1,title:n.value,class:"selection-title color-[#1A1D23]"},pe(n.value),9,go)):$("",!0)]),"page"===o.value?(le(),W(la,{key:0,onPropchange:i})):$("",!0),"component"===o.value?(le(),W(vo,{key:1,onPropchange:i})):$("",!0)]))}}),fo=/* @__PURE__ */e({default:()=>bo}),bo=mo,yo={},wo=/* @__PURE__ */Object.assign({"./page/panel-history.vue":kt,"./page/panel-page.vue":Dt,"./widget/panel-widget.vue":fo});for(const Fo in wo){var xo,Co;const e=wo[Fo],t=(null===(xo=e.default)||void 0===xo?void 0:xo.name)||(null===(Co=e.default)||void 0===Co?void 0:Co.__name);t&&(yo[t]=e.default)}var Eo=/* @__PURE__ */M(/* @__PURE__ */G({__name:"diff-modal",setup(e){let t=null,a=null,l=null,n=null;const{project:o,loadLabelDesignHistoryInfo:i}=B(),{formatJson2Notes:r}=k(),s=ie(),[u,{closeModal:d}]=A(e=>{e&&(a||async function(){t=await window.monacoLoader.loadMonaco(),a=t.editor.createDiffEditor(document.querySelector(".diff-modal__container"),{enableSplitViewResizing:!1,automaticLayout:!0}),c("")}(),s.value=e.hid)});async function c(e=""){t?(l=t.editor.createModel(r(ve(o.value)),"json/string"),n=t.editor.createModel(r(e),"json/string"),a&&a.setModel({original:l,modified:n})):console.warn("[DiffModal] Monaco editor is not available for setModelContent")}fe(s,async e=>{if(e){const t=await i(e);c(null==t?void 0:t.designerJson)}},{immediate:!0});const p=()=>{s.value=null,d()};return(e,t)=>(le(),W(he(g),Q(e.$attrs,{"min-height":40,title:he(V)("sys.pageDesigner.pageDiff"),centered:"",width:"80vw","mask-closable":!1,"after-close":p,"show-cancel-btn":!1,"show-ok-btn":!1,onRegister:he(u)}),{default:be(()=>[...t[0]||(t[0]=[H("div",null,[H("div",{class:"diff-modal__versions"},[H("div",null,"当前版本"),H("div",null,[H("span",{class:"mr-5px"},"对比版本")])]),H("div",{class:"diff-modal__container"})],-1)])]),_:1},16,["title","onRegister"]))}}),[["__scopeId","data-v-16a76e9a"]]),_o=/* @__PURE__ */G({name:"LabelDesignPanel",__name:"panel",setup(e){const[t,{openModal:l}]=a();ne("openDiffModal",l);const{currentPanel:n}=r(),o=U(()=>"panel-"+n.value),i=U(()=>yo[o.value]);return(e,a)=>(le(),K("div",null,[(le(),W(ce(i.value))),j(Eo,{onRegister:he(t)},null,8,["onRegister"])]))}}),ko={name:"StageEl",components:{...C},props:{elem:{type:Object,required:!0},tableData:{type:Object,default:void 0}},emits:["updatePBarcodeWidth"],data(){return{currentSize:{width:this.elem.width,height:this.elem.height}}},computed:{},watch:{"elem.width"(e){this.currentSize.width=e},"elem.height"(e){this.currentSize.height=e}},methods:{updateElementSize(e,t){this.currentSize={width:parseInt(e),height:parseInt(t)}},updatePBarcodeSize({width:e,rotateWidth:t,height:a}){this.$emit("updatePBarcodeWidth",{width:parseInt(e),rotateWidth:parseInt(t),height:parseInt(a),elId:this.elem.id})}},render:function(){let e=this.elem,t=e.styles;90===e.rotate?(t.transform=`rotate(${e.rotate}deg)`,t.height=e.width+"px",t.width=e.height+"px",t.transformOrigin=`${parseInt(t.height)/2}px ${parseInt(t.height)/2}px`):270===e.rotate?(t.transform=`rotate(${e.rotate}deg) translateX(-100%)`,t.height=e.width+"px",t.width=e.height+"px",t.transformOrigin="0 0"):180===e.rotate?(t.transform=`rotate(${e.rotate}deg)`,t.height="100%",t.width="100%",t.transformOrigin="center center"):(t.height="100%",t.width="100%",t.transform="none",t.transformOrigin="none");let a={};for(let s in e.attrs)a[s]=e.attrs[s].value;let l={};e.type===w.BAR_CODE?l={elId:e.id,...e.attrs,height:90===e.rotate?this.currentSize.width:this.currentSize.height,rotate:e.rotate}:e.type===w.QR_CODE?l={...e.attrs}:e.type===w.HORIZONTAL_LINE||e.type===w.VERTICAL_LINE||e.type===w.RECTANGLE?l={"border-width":t["border-width"],color:t.color}:e.type!==w.TEXT&&e.type!==w.RICH_TEXT||(l={"font-size":t["font-size"],"font-family":t["font-family"],"bg-color":t["bg-color"],"border-top":t["border-top"],"border-right":t["border-right"],"border-bottom":t["border-bottom"],"border-left":t["border-left"],"border-top-left-radius":t["border-top-left-radius"],"border-top-right-radius":t["border-top-right-radius"],"border-bottom-left-radius":t["border-bottom-left-radius"],"border-bottom-right-radius":t["border-bottom-right-radius"],type:e.attrs.text.type,label:e.attrs.text.label,isEdit:e.isEdit,styles:t});let n={};e.type===w.BAR_CODE&&(n={onBarcodeChange:this.updatePBarcodeSize});const o={class:e.classes,style:t,id:e.id,ownId:e.ownId,"el-width":this.currentSize.width,"el-height":this.currentSize.height,...JSON.parse(JSON.stringify(a)),...l,...n};let i,r={id:e.id,type:e.type,internal:e.internal,events:e.events,left:e.left,top:e.top,right:e.right,bottom:e.bottom,zIndex:e.zIndex,width:e.width,height:e.height,rotate:e.rotate,minWidth:e.minWidth,minHeight:e.minHeight,elem:this.elem};return e.type===w.QR_CODE?r={...r,handles:null}:e.type===w.BAR_CODE&&(r=90===e.rotate?{...r,handles:["ml","mr","lc","rc"]}:{...r,handles:["mt","mb","tc","bc"]}),i=Y(c,r,[Y(C[e.type]||e.type,o)]),i}},So=/* @__PURE__ */G({__name:"stage-canvas",props:{schema:{}},emits:["movingItem","updatePBarcodeWidth"],setup(e,{emit:t}){const a=t,l=e,{selectedElements:n,snapTracking:o,selectedPage:i,zoom:s,moveElement:d,rebaseSelectedElements:c,resizeElement:v,rotateElement:h,addSelectedElements:g,clearSelectedElements:m,removeElement:f,registerElement:b,resizeBarcodeWidth:y,isModal:w}=r(),{project:x}=B(),C=ie(),E=ie(),k=ie([]),S=ie({width:"",style:"",color:""});fe(E,(e,t)=>{t&&(t.style.borderWidth=S.value.width,t.style.borderStyle=S.value.style,t.style.borderColor=S.value.color),e&&(S.value.width=e.style.borderWidth,S.value.style=e.style.borderStyle,S.value.color=e.style.borderColor,e.style.borderWidth="2px",e.style.borderStyle="solid",e.style.borderColor="#f1867f")});const A=U(()=>w.value?l.schema:i.value),T=U(()=>({height:isNaN(Number(x.value.height))?x.value.height:x.value.height+"px",width:isNaN(Number(x.value.width))?x.value.width:x.value.width+"px",overflow:"hidden"})),R=({direction:e,shiftKey:t})=>{if(n.value.length>0){let a=t?10:1,l=0,o=0,i=0,r=0;switch(e){case"up":l-=a,o+=a,i=r=0;break;case"down":o-=a,l+=a,i=r=0;break;case"left":i-=a,r+=a,l=o=0;break;case"right":r-=a,i+=a,l=o=0}const s=parseInt(window.getComputedStyle(C.value.$el).height),u=parseInt(window.getComputedStyle(C.value.$el).width);n.value.map(e=>{let t=_("top",e),a=_("bottom",e),n=_("left",e),c=_("right",e),p=l&&t+l>=0&&a+o>=0?t+l:null,v=o&&a+o>=0&&t+l>=0?a+o:null,h=i&&n+i>=0&&c+r>=0?n+i:null,g=r&&c+r>=0&&n+i>=0?c+r:null;(p||v||h||g)&&d({elId:e.id,pageId:x.value.id,top:p&&"string"==typeof e.top&&e.top.indexOf("%")>-1?p/s*100+"%":p,bottom:v&&"string"==typeof e.bottom&&e.bottom.indexOf("%")>-1?v/s*100+"%":v,left:h&&"string"==typeof e.left&&e.left.indexOf("%")>-1?h/u*100+"%":h,right:g&&"string"==typeof e.right&&e.right.indexOf("%")>-1?g/u*100+"%":g})}),c()}},D=(e,t)=>{},L=e=>{e.moveElData.map(t=>{d({...t,pageId:x.value.id,parentId:null,mouseX:e.relMouseX,mouseY:e.relMouseY})}),c(),E.value=void 0},M=e=>{e.map(e=>v({...e,pageId:x.value.id})),c()},I=e=>{e.map(e=>h({...e,pageId:x.value.id})),c()},z=e=>{if(e.top===e.bottom&&e.left===e.right||0===i.value.length)return;let t=[];i.value.forEach(a=>{const l=a;let n=_("top",l),o=_("left",l),i=_("height",l,x.value)+n,r=_("width",l,x.value)+o;n>=e.top&&o>=e.left&&i<=e.bottom&&r<=e.right&&t.push(l)}),t.length>0&&g(t)},N=()=>{n.value.length>0&&m()},F=()=>{n.value.length>0&&n.value.forEach(e=>{f({page:x.value,elId:e.id})})},V=()=>{n.value.length>0&&(k.value=[],n.value.map(e=>k.value.push(Ce(e))))},O=()=>{n.value.length>0&&(k.value=[],n.value.map(e=>{k.value.push(Ce(e)),f({page:x.value,elId:e.id})}))},$=()=>{k.value.length>0&&(m(),k.value.map(e=>{e.left+=10,e.top+=10;for(let t in e.attrs)e.attrs[t].tag&&(e.attrs[t].tag=""),e.attrs[t].tagValueArray&&(e.attrs[t].tagValueArray=[]),"alarmGroupId"===t&&(e.attrs[t].value="");b({pageId:x.value.id,el:e})}))},H=e=>{if(window.DragTreeTableOutDropData)return!1;const t=C.value.$el.getBoundingClientRect();let a=JSON.parse(e.dataTransfer.getData("text/plain")),l=_("height",a,x.value),n=_("width",a,x.value),o=e.pageY-t.top-l/2*s.value,i=e.pageX-t.left-n/2*s.value;o=Math.round(o/s.value),i=Math.round(i/s.value);const r=u({top:o,left:i,height:l,width:n},x.value);a={...a,...r},m(),b({pageId:x.value.id,el:a}),C.value.$el.focus()},X=({width:e,rotateWidth:t,height:l,elId:n})=>{y({width:e,rotateWidth:t,height:l,elId:n,pageId:x.value.id}),a("updatePBarcodeWidth",{width:e,rotateWidth:t,height:l,elId:n,pageId:x.value.id}),c()};function j(e,t,l,n){a("movingItem",e,t,l,n)}return(e,t)=>{var a;return le(),W(p,{id:null===(a=he(x))||void 0===a?void 0:a.id,ref_key:"mrContainerRef",ref:C,zoom:he(s),style:ee(T.value),class:J([{stage:!0}]),"is-design":!0,"active-elements":he(n),"snap-tracking":he(o),onArrows:R,onMoving:D,onMovingItem:j,onMovestop:L,onResizestop:M,onRotatestop:I,onSelectstop:z,onClearselection:N,onDelete:F,onCopy:V,onCut:O,onPaste:$,onDrop:H,onUndo:t[0]||(t[0]=t=>{var a;return null===(a=e.$root)||void 0===a?void 0:a.$emit("undo")}),onRedo:t[1]||(t[1]=t=>{var a;return null===(a=e.$root)||void 0===a?void 0:a.$emit("redo")})},{default:be(()=>[(le(!0),K(P,null,re(A.value,e=>(le(),W(ko,{key:e.id,elem:e,onUpdatePBarcodeWidth:X},null,8,["elem"]))),128))]),_:1},8,["id","zoom","style","active-elements","snap-tracking"])}}}),Ao=So,Bo={class:"designer-stage-header"},To=/* @__PURE__ */M({},[["render",function(e,t){return le(),K("div",Bo)}],["__scopeId","data-v-bc7a9820"]]),Ro={class:"designer-stage"},Do={class:"designer-state-canvas"},Lo=/* @__PURE__ */G({name:"LabelDesignStage",__name:"stage",props:{id:{},readonly:{type:Boolean}},setup(e){const t=ht,a=e,l=ie(),o=ie(0),i=ie(),s=ie(null);D(i,()=>{o.value+=1,x()});const u=U(()=>{var e;return null===(e=l.value)||void 0===e?void 0:e.panzoomInstance}),{zoom:d,updateEditorZoom:c,selectedElements:p,togglePanel:v}=r(),g=oe({h:[],v:[]}),m=oe({x:0,y:0,width:0,height:0}),f=U(()=>{var e,t,a,l;return{thick:22,scale:d.value,palette:{bgColor:"#fff",longfgColor:"#ccc",fontColor:"#ccc",fontShadowColor:"#ccc",maxScale:3,minScale:.3},width:null===(e=i.value)||void 0===e?void 0:e.clientWidth,height:null===(t=i.value)||void 0===t?void 0:t.clientHeight,canvasWidth:void 0!==(null===(a=s.value)||void 0===a?void 0:a.width)?Number(s.value.width):void 0,canvasHeight:void 0!==(null===(l=s.value)||void 0===l?void 0:l.height)?Number(s.value.height):void 0,lines:g,shadow:m,count:o.value}});function b(e){1===e.button&&u.value&&(l.value&&(l.value.cursorClass="grabCursor"),u.value.bind(),u.value.handleDown(e),e.preventDefault())}function y(e){1===e.button&&u.value&&(u.value.destroy(),l.value&&(l.value.cursorClass="defaultCursor"))}function w(){v(n.WIDGET)}fe(p,()=>{g.h=[],g.v=[],m.x=0,m.y=0,m.width=0,m.height=0}),te(()=>{document.addEventListener("pointerdown",b),document.addEventListener("pointerup",y)}),ae(()=>{document.removeEventListener("pointerdown",b),document.removeEventListener("pointerup",y)});const x=L(()=>{l.value&&l.value.initPanzoom()},300),C=e=>{c(e.scale)};function E(){u.value&&(u.value.bind(),u.value.zoom(1),u.value.destroy())}function _(){u.value&&(u.value.bind(),u.value.reset(),u.value.destroy())}function k(){u.value&&(u.value.bind(),u.value.zoomIn(),u.value.destroy())}function S(){u.value&&(u.value.bind(),u.value.zoomOut(),u.value.destroy())}function A(e,t,a,l){g.h=[t,t+l],g.v=[e,e+a],Object.assign(m,{x:e,y:t,width:a,height:l})}async function B(e){s.value=await h(e)}return a.readonly||B(),fe(()=>a.id,e=>{B(e)},{immediate:!0}),(a,n)=>(le(),K("div",Ro,[H("div",Do,[j(To,{class:"designer-stage-header"}),H("div",{ref_key:"container",ref:i,class:"designer-canvas"},[j(he(gt),{zoom:he(d),onZoomReset:E,onZoomAuto:_,onZoomIn:k,onZoomOut:S},null,8,["zoom"]),j(he(t),Q({ref_key:"sketchRuleRef",ref:l},f.value,{onZoomchange:C}),{default:be(()=>[j(Ao,{style:ee({pointerEvents:e.readonly?"none":"auto"}),onMovingItem:A,onClick:xe(w,["stop"])},null,8,["style"])]),_:1},16)],512)]),e.readonly?$("",!0):(le(),W(_o,{key:0,class:"designer-panel"}))]))}}),Mo=/* @__PURE__ */M(Lo,[["__scopeId","data-v-9275e9fb"]]),Io={class:"label-designer"},zo={class:"label-designer-content"},No=/* @__PURE__ */M(/* @__PURE__ */G({__name:"template",props:{destroyVm:{type:Function}},setup(e,{expose:l}){const n=e,{selectedElements:o}=r(),{project:i,width:s,height:u}=B(),{destroyVm:d}=oe(n),[c,{openModal:p,closeModal:v}]=a(),h=ie(()=>({}));function m(){setTimeout(()=>{h.value(JSON.stringify(i.value)),v(),d()},200)}function f(e){const{width:a,height:l,strHeight:n,strWidth:o}=t(1,203);i.value={labelWidth:a??0,labelHeight:l??0,height:n,width:o,heightMM:String(l??""),widthMM:String(a??""),id:String(e??""),key:String(e??""),page:[],projectName:"",styles:{position:"relative",margin:"auto",background:"#fff"},labelSize:1,modelKey:void 0,dpi:203}}function b(){d()}return l({open:function(e,t,a){o.value=[],h.value=a??(()=>({}));try{e?i.value=JSON.parse(e):f(t)}catch{f(t)}s.value=parseInt(i.value.width),u.value=parseInt(i.value.height),p()}}),(e,t)=>(le(),W(he(g),{height:640,title:"标签模板设计",centered:"",width:"1200px","wrap-class-name":"label-design-modal","mask-closable":!1,onRegister:he(c),onOk:m,onCancel:b},{default:be(()=>[H("div",Io,[H("div",zo,[j(Ue,{class:"label-designer-toolkit"}),j(Mo,{class:"label-designer-stage"})])])]),_:1},8,["onRegister"]))}}),[["__scopeId","data-v-e795eb1e"]]);export{No as default};
|