@yzsf2e/render-core 1.0.2-alpha.77 → 1.0.2-alpha.78
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/render-core.mjs +1431 -1420
- package/dist/render-core.umd.js +4 -4
- package/package.json +1 -1
package/dist/render-core.umd.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
(function(H,o){typeof exports=="object"&&typeof module<"u"?o(exports,require("vue"),require("ant-design-vue"),require("@ant-design/icons-vue"),require("vue-router")):typeof define=="function"&&define.amd?define(["exports","vue","ant-design-vue","@ant-design/icons-vue","vue-router"],o):(H=typeof globalThis<"u"?globalThis:H||self,o(H["render-core"]={},H.Vue,H.AntDesignVue,H.AntDesignIconsVue,H.VueRouter))})(this,function(H,o,
|
|
2
|
-
* @yzsf2e/render-core v1.0.2-alpha.
|
|
1
|
+
(function(H,o){typeof exports=="object"&&typeof module<"u"?o(exports,require("vue"),require("ant-design-vue"),require("@ant-design/icons-vue"),require("vue-router")):typeof define=="function"&&define.amd?define(["exports","vue","ant-design-vue","@ant-design/icons-vue","vue-router"],o):(H=typeof globalThis<"u"?globalThis:H||self,o(H["render-core"]={},H.Vue,H.AntDesignVue,H.AntDesignIconsVue,H.VueRouter))})(this,function(H,o,K,ge,Qa){"use strict";/*!
|
|
2
|
+
* @yzsf2e/render-core v1.0.2-alpha.78 Mon Aug 05 2024 13:53:47 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2023 @yzsf2e.
|
|
4
|
-
*/function Za(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const Ja=Za(ge),es={name:"@yzsf2e/render-core",version:"1.0.2-alpha.77",main:"dist/render-core",module:"dist/render-core",files:["dist"],scripts:{dev:"storybook dev -p 6006",build:"vite build",lint:"vite lint",release:"node scripts/release.js --gitTag","build-storybook":"storybook build"},publishConfig:{registry:"https://registry.npmjs.org/",access:"public"},author:"yzsf2e",keywords:["vue3","antdv","frontend","component","components"],dependencies:{"@ant-design/icons-vue":"7.0.1","@vueuse/components":"^10.5.0","@vueuse/core":"^10.5.0","@yzsf2e/use":"workspace:^","ant-design-vue":"3.2.20",axios:"^1.6.2","big.js":"^6.2.1",dayjs:"1.11.10","lodash-es":"^4.17.21",store:"^2.0.12","v-viewer":"^3.0.13",viewerjs:"^1.11.6","vue-request":"^2.0.3","vue-router":"^4.2.5"},peerDependencies:{axios:"^1.6.2"},devDependencies:{"@storybook/addon-essentials":"^7.6.6","@storybook/addon-interactions":"^7.6.6","@storybook/addon-links":"^7.6.6","@storybook/blocks":"^7.6.6","@storybook/test":"^7.6.6","@storybook/vue3":"^7.6.6","@storybook/vue3-vite":"^7.6.6","@types/node":"^18.16.3","@vitejs/plugin-vue":"^4.0.0","@vitejs/plugin-vue-jsx":"^3.0.0",autoprefixer:"^10.4.16",postcss:"^8.4.32",react:"^18.2.0","react-dom":"^18.2.0",sass:"^1.69.5",storybook:"^7.6.6",typescript:"^5.0.4",vite:"^4.4.2",vue:"3.3.4"}},Wn=Object.assign;function St(e){return[`yzs-${e}`]}const ts=/-(\w)/g,ns=e=>e.replace(ts,(t,n)=>n.toUpperCase()),Et=e=>{const t=e;return t.install=function(n){n.component(t.name,t),n.component(ns(`-${t.name}`),t)},e},[rs]=St("date-picker"),os={allowClear:!0,autofocus:!1,bordered:!0,format:"YYYY-MM-DD",nextIcon:"icon-right",open:!1,placement:"bottomLeft",popupStyle:{},prevIcon:"icon-left",size:"small",suffixIcon:"icon-calendar",superNextIcon:"icon-double-right",superPrevIcon:"icon-double-left",valueFormat:"YYYY-MM-DD",renderExtraFooter:()=>null,showNow:!0,showTime:!1,showToday:!0},Gr={dateRender:Function,disabled:Boolean,disabledDate:Function,dropdownClassName:String,getPopupContainer:Function,inputReadOnly:Boolean,locale:Object,mode:String,picker:String,placeholder:String,presets:Array,status:String,defaultPickerValue:Object,disabledTime:Function,format:String,value:Object},qr=Et(o.defineComponent({name:rs,props:Gr,emits:["change","ok","update:value","openChange","panelChange"],setup(e,{emit:t,expose:n}){const r=o.ref(null),i=o.computed(()=>Wn(e,os)),a=h=>{t("ok",h)},l=h=>{t("change",h),t("update:value",h)},s=h=>{t("openChange",h)},c=(h,p)=>{t("openChange",h,p)};n({blur:()=>{var h;(h=r.value)==null||h.blur()},focus:()=>{var h;(h=r.value)==null||h.focus()}});const f={...i.value,ok:a,onChange:l,onOpenChange:s,panelChange:c};return()=>o.createVNode(z.DatePicker,o.mergeProps({ref:r},f),null)}})),is=o.defineComponent({name:"AIcon",components:Ja,props:{type:{required:!0,type:String}}}),$e=(e,t)=>{const n=e.__vccOpts||e;for(const[r,i]of t)n[r]=i;return n};function as(e,t,n,r,i,a){return o.openBlock(),o.createBlock(o.resolveDynamicComponent(e.type))}const tn=$e(is,[["render",as]]);function Xr(e){return o.getCurrentScope()?(o.onScopeDispose(e),!0):!1}function Hn(e){let t=!1,n;const r=o.effectScope(!0);return(...i)=>(t||(n=r.run(()=>e(...i)),t=!0),n)}function ye(e){return typeof e=="function"?e():o.unref(e)}const Qr=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const ss=e=>typeof e<"u",ls=Object.prototype.toString,cs=e=>ls.call(e)==="[object Object]",us=()=>{};function fs(e,t){function n(...r){return new Promise((i,a)=>{Promise.resolve(e(()=>t.apply(this,r),{fn:t,thisArg:this,args:r})).then(i).catch(a)})}return n}const Zr=e=>e();function ds(e=Zr){const t=o.ref(!0);function n(){t.value=!1}function r(){t.value=!0}const i=(...a)=>{t.value&&e(...a)};return{isActive:o.readonly(t),pause:n,resume:r,eventFilter:i}}function ps(e){return e||o.getCurrentInstance()}function hs(e,t,n={}){const{eventFilter:r=Zr,...i}=n;return o.watch(e,fs(r,t),i)}function ms(e,t,n={}){const{eventFilter:r,...i}=n,{eventFilter:a,pause:l,resume:s,isActive:c}=ds(r);return{stop:hs(e,t,{...i,eventFilter:a}),pause:l,resume:s,isActive:c}}function gs(e,t={}){if(!o.isRef(e))return o.toRefs(e);const n=Array.isArray(e.value)?Array.from({length:e.value.length}):{};for(const r in e.value)n[r]=o.customRef(()=>({get(){return e.value[r]},set(i){var a;if((a=ye(t.replaceRef))!=null?a:!0)if(Array.isArray(e.value)){const s=[...e.value];s[r]=i,e.value=s}else{const s={...e.value,[r]:i};Object.setPrototypeOf(s,Object.getPrototypeOf(e.value)),e.value=s}else e.value[r]=i}}));return n}function ys(e,t=!0,n){const r=ps(n);r?o.onMounted(e,r):t?e():o.nextTick(e)}function Gn(e){var t;const n=ye(e);return(t=n==null?void 0:n.$el)!=null?t:n}const Tt=Qr?window:void 0;function Ot(...e){let t,n,r,i;if(typeof e[0]=="string"||Array.isArray(e[0])?([n,r,i]=e,t=Tt):[t,n,r,i]=e,!t)return us;Array.isArray(n)||(n=[n]),Array.isArray(r)||(r=[r]);const a=[],l=()=>{a.forEach(d=>d()),a.length=0},s=(d,f,h,p)=>(d.addEventListener(f,h,p),()=>d.removeEventListener(f,h,p)),c=o.watch(()=>[Gn(t),ye(i)],([d,f])=>{if(l(),!d)return;const h=cs(f)?{...f}:f;a.push(...n.flatMap(p=>r.map(C=>s(d,p,C,h))))},{immediate:!0,flush:"post"}),u=()=>{c(),l()};return Xr(u),u}function bs(){const e=o.ref(!1);return o.getCurrentInstance()&&o.onMounted(()=>{e.value=!0}),e}function ws(e){const t=bs();return o.computed(()=>(t.value,!!e()))}function vs(e){return JSON.parse(JSON.stringify(e))}const nn=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},rn="__vueuse_ssr_handlers__",Cs=Ss();function Ss(){return rn in nn||(nn[rn]=nn[rn]||{}),nn[rn]}function Es(e,t){return Cs[e]||t}function Ts(e){return e==null?"any":e instanceof Set?"set":e instanceof Map?"map":e instanceof Date?"date":typeof e=="boolean"?"boolean":typeof e=="string"?"string":typeof e=="object"?"object":Number.isNaN(e)?"any":"number"}const Os={boolean:{read:e=>e==="true",write:e=>String(e)},object:{read:e=>JSON.parse(e),write:e=>JSON.stringify(e)},number:{read:e=>Number.parseFloat(e),write:e=>String(e)},any:{read:e=>e,write:e=>String(e)},string:{read:e=>e,write:e=>String(e)},map:{read:e=>new Map(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e.entries()))},set:{read:e=>new Set(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e))},date:{read:e=>new Date(e),write:e=>e.toISOString()}},Jr="vueuse-storage";function eo(e,t,n,r={}){var i;const{flush:a="pre",deep:l=!0,listenToStorageChanges:s=!0,writeDefaults:c=!0,mergeDefaults:u=!1,shallow:d,window:f=Tt,eventFilter:h,onError:p=g=>{console.error(g)},initOnMounted:C}=r,m=(d?o.shallowRef:o.ref)(typeof t=="function"?t():t);if(!n)try{n=Es("getDefaultStorage",()=>{var g;return(g=Tt)==null?void 0:g.localStorage})()}catch(g){p(g)}if(!n)return m;const w=ye(t),v=Ts(w),_=(i=r.serializer)!=null?i:Os[v],{pause:b,resume:k}=ms(m,()=>S(m.value),{flush:a,deep:l,eventFilter:h});return f&&s&&ys(()=>{Ot(f,"storage",A),Ot(f,Jr,O),C&&A()}),C||A(),m;function S(g){try{if(g==null)n.removeItem(e);else{const y=_.write(g),E=n.getItem(e);E!==y&&(n.setItem(e,y),f&&f.dispatchEvent(new CustomEvent(Jr,{detail:{key:e,oldValue:E,newValue:y,storageArea:n}})))}}catch(y){p(y)}}function T(g){const y=g?g.newValue:n.getItem(e);if(y==null)return c&&w!=null&&n.setItem(e,_.write(w)),w;if(!g&&u){const E=_.read(y);return typeof u=="function"?u(E,w):v==="object"&&!Array.isArray(E)?{...w,...E}:E}else return typeof y!="string"?y:_.read(y)}function O(g){A(g.detail)}function A(g){if(!(g&&g.storageArea!==n)){if(g&&g.key==null){m.value=w;return}if(!(g&&g.key!==e)){b();try{(g==null?void 0:g.newValue)!==_.write(m.value)&&(m.value=T(g))}catch(y){p(y)}finally{g?o.nextTick(k):k()}}}}}function _s(e,t={}){var n,r;const{pointerTypes:i,preventDefault:a,stopPropagation:l,exact:s,onMove:c,onEnd:u,onStart:d,initialValue:f,axis:h="both",draggingElement:p=Tt,containerElement:C,handle:m=e}=t,w=o.ref((n=ye(f))!=null?n:{x:0,y:0}),v=o.ref(),_=O=>i?i.includes(O.pointerType):!0,b=O=>{ye(a)&&O.preventDefault(),ye(l)&&O.stopPropagation()},k=O=>{var A;if(!_(O)||ye(s)&&O.target!==ye(e))return;const g=ye(C),y=(A=g==null?void 0:g.getBoundingClientRect)==null?void 0:A.call(g),E=ye(e).getBoundingClientRect(),B={x:O.clientX-(g?E.left-y.left:E.left),y:O.clientY-(g?E.top-y.top:E.top)};(d==null?void 0:d(B,O))!==!1&&(v.value=B,b(O))},S=O=>{var A;if(!_(O)||!v.value)return;const g=ye(C),y=(A=g==null?void 0:g.getBoundingClientRect)==null?void 0:A.call(g),E=ye(e).getBoundingClientRect();let{x:B,y:j}=w.value;(h==="x"||h==="both")&&(B=O.clientX-v.value.x,g&&(B=Math.min(Math.max(0,B),y.width-E.width))),(h==="y"||h==="both")&&(j=O.clientY-v.value.y,g&&(j=Math.min(Math.max(0,j),y.height-E.height))),w.value={x:B,y:j},c==null||c(w.value,O),b(O)},T=O=>{_(O)&&v.value&&(v.value=void 0,u==null||u(w.value,O),b(O))};if(Qr){const O={capture:(r=t.capture)!=null?r:!0};Ot(m,"pointerdown",k,O),Ot(p,"pointermove",S,O),Ot(p,"pointerup",T,O)}return{...gs(w),position:w,isDragging:o.computed(()=>!!v.value),style:o.computed(()=>`left:${w.value.x}px;top:${w.value.y}px;`)}}function As(e,t,n={}){const{window:r=Tt,...i}=n;let a;const l=ws(()=>r&&"ResizeObserver"in r),s=()=>{a&&(a.disconnect(),a=void 0)},c=o.computed(()=>Array.isArray(e)?e.map(f=>Gn(f)):[Gn(e)]),u=o.watch(c,f=>{if(s(),l.value&&r){a=new ResizeObserver(t);for(const h of f)h&&a.observe(h,i)}},{immediate:!0,flush:"post",deep:!0}),d=()=>{s(),u()};return Xr(d),{isSupported:l,stop:d}}function to(e,t,n,r={}){var i,a,l;const{clone:s=!1,passive:c=!1,eventName:u,deep:d=!1,defaultValue:f,shouldEmit:h}=r,p=o.getCurrentInstance(),C=n||(p==null?void 0:p.emit)||((i=p==null?void 0:p.$emit)==null?void 0:i.bind(p))||((l=(a=p==null?void 0:p.proxy)==null?void 0:a.$emit)==null?void 0:l.bind(p==null?void 0:p.proxy));let m=u;t||(t="modelValue"),m=m||`update:${t.toString()}`;const w=b=>s?typeof s=="function"?s(b):vs(b):b,v=()=>ss(e[t])?w(e[t]):f,_=b=>{h?h(b)&&C(m,b):C(m,b)};if(c){const b=v(),k=o.ref(b);let S=!1;return o.watch(()=>e[t],T=>{S||(S=!0,k.value=w(T),o.nextTick(()=>S=!1))}),o.watch(k,T=>{!S&&(T!==e[t]||d)&&_(T)},{deep:d}),k}else return o.computed({get(){return v()},set(b){_(b)}})}const[$s]=St("drag-drawer"),ks=o.defineComponent({name:$s,components:{CloseOutlined:ge.CloseOutlined,ShrinkOutlined:ge.ShrinkOutlined,ArrowsAltOutlined:ge.ArrowsAltOutlined},props:{visible:{type:Boolean,default:!1},title:{type:String,default:""},width:{type:[Number,String],default:500},getContainer:{type:Function,default:()=>document.querySelector(".page-renderer-wrapper")},hideFooter:{type:Boolean,default:!1}},setup(e,{emit:t}){const n=o.ref(null),r=to(e,"visible",t),i=o.ref(e.width),a=o.ref(!1),l=()=>r.value=!1,s=()=>e.getContainer(),c=s(),u=500,d=()=>{i.value=a.value?e.width:"100%",a.value=!a.value};return o.watch(r,h=>{h||(a.value=!1,i.value=e.width)}),{show:r,fullScreen:a,dragDrawer:n,actualWidth:i,getContainerFn:s,handleClose:l,toggleFullScreen:d,handleMouseDown:h=>{const p=h.clientX,C=i.value,m=(c==null?void 0:c.clientWidth)||document.body.clientWidth;document.body.classList.add("disable-select-in-dragging"),window.onmousemove=function(w){const _=w.clientX-p,b=typeof C=="number"?C-_:window.innerWidth-w.x;i.value=Math.min(b<u?u:b,m)},window.onmouseup=()=>{window.onmousemove=null,document.body.classList.remove("disable-select-in-dragging")}}}}}),nw="",Ns={key:0,style:{position:"absolute",bottom:"0",left:"0",height:"50px","line-height":"49px",width:"100%","border-top":"1px solid #eee","box-sizing":"content-box","background-color":"#fff","z-index":"2"}};function Ps(e,t,n,r,i,a){const l=o.resolveComponent("ArrowsAltOutlined"),s=o.resolveComponent("ShrinkOutlined"),c=o.resolveComponent("CloseOutlined"),u=o.resolveComponent("a-space"),d=o.resolveComponent("a-button"),f=o.resolveComponent("a-drawer");return o.openBlock(),o.createBlock(f,{ref:"dragDrawer",class:"drag-drawer-warpper",placement:"right",mask:!1,width:e.actualWidth,"get-container":e.getContainerFn,closable:!1,"destroy-on-close":!0,push:!0,visible:e.show,"onUpdate:visible":t[1]||(t[1]=h=>e.show=h)},{title:o.withCtx(()=>[e.title?(o.openBlock(),o.createElementBlock(o.Fragment,{key:0},[o.createTextVNode(o.toDisplayString(e.title),1)],64)):o.renderSlot(e.$slots,"title",{key:1})]),extra:o.withCtx(()=>[o.createVNode(u,{style:{transform:"translateY(2px)"}},{default:o.withCtx(()=>[e.fullScreen?(o.openBlock(),o.createBlock(s,{key:1,style:{color:"#fff","font-size":"18px",cursor:"pointer","margin-right":"10px"},onClick:e.toggleFullScreen},null,8,["onClick"])):(o.openBlock(),o.createBlock(l,{key:0,style:{color:"#fff","font-size":"18px",cursor:"pointer","margin-right":"10px"},onClick:e.toggleFullScreen},null,8,["onClick"])),o.createVNode(c,{style:{color:"#fff","font-size":"18px",cursor:"pointer","margin-right":"10px"},onClick:e.handleClose},null,8,["onClick"])]),_:1})]),default:o.withCtx(()=>[o.renderSlot(e.$slots,"default"),o.createElementVNode("div",{class:"drag-trigger",onMousedown:t[0]||(t[0]=h=>e.handleMouseDown(h))},null,32),e.hideFooter?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("div",Ns,[o.createVNode(u,{style:{"padding-left":"20px"}},{default:o.withCtx(()=>[o.renderSlot(e.$slots,"footBtn"),o.createVNode(d,{onClick:e.handleClose},{default:o.withCtx(()=>[o.createTextVNode("关闭")]),_:1},8,["onClick"])]),_:3})]))]),_:3},8,["width","get-container","visible"])}const no=Et($e(ks,[["render",Ps]])),[Is]=St("page-renderer-form-modal"),Ds=o.defineComponent({name:Is,components:{Modal:z.Modal,Button:z.Button,Space:z.Space},props:{form:{type:Object,required:!0},rows:{type:Array,default:()=>[]},extraData:{type:Object},getContainer:{type:Function,default:()=>document.querySelector(".page-renderer-wrapper")}},emits:["refresh"],setup(e,{expose:t,emit:n}){const{form:r}=o.toRefs(e),i=o.ref(!1),a=o.ref(!1),l=o.ref(null),s=o.reactive({showOk:!0}),c=async()=>{var h,p;a.value=!0;const f=((h=l.value)==null?void 0:h.finish)||(()=>Promise.resolve({success:!0}));(p=l.value)!=null&&p.finish||console.warn("form组件没有提供finish方法"),f().then(C=>{const{needFeedback:m=!0,needRefresh:w=!0,successMsg:v="操作成功"}=r.value;a.value=!1,C&&C.success&&(m&&z.message.success(v),d(),w&&n("refresh"))}).catch(C=>{var w;if(a.value=!1,console.log("[PageRendererFormModal handleOk Error]: ",C),typeof C=="string")return z.message.warn(C);const{errorFields:m}=C;m&&m.length&&z.message.warn((w=m[0])==null?void 0:w.errors.join("、"))})};o.watch(i,f=>{f&&o.nextTick(()=>{const h=document.querySelector(".ant-modal-root"),p=h==null?void 0:h.querySelector(".ant-modal-header"),C=h==null?void 0:h.querySelector(".ant-modal");p.style.cursor="move";const m=C.currentStyle||window.getComputedStyle(C,null);p.onmousedown=w=>{const v=w.clientX-p.offsetLeft,_=w.clientY-p.offsetTop;let b,k;m.left.includes("%")?(b=+document.body.clientWidth*(+m.left.replace(/%/g,"")/100),k=+document.body.clientHeight*(+m.top.replace(/%/g,"")/100)):(b=+m.left.replace(/\px/g,""),k=+m.top.replace(/\px/g,"")),document.onmousemove=function(S){const T=S.clientX-v,O=S.clientY-_;C.style.left=`${T+b}px`,C.style.top=`${O+k}px`},document.onmouseup=function(){document.onmousemove=null,document.onmouseup=null}}})});const u=()=>i.value=!0,d=()=>{var f,h;(h=(f=l.value)==null?void 0:f.reset)==null||h.call(f),i.value=!1};return t({openModal:u,closeModal:d}),{handleOk:c,closeModal:d,visible:i,modalConfig:s,currentForm:l,confirmLoading:a}}}),ow="",Rs={key:1};function Bs(e,t,n,r,i,a){const l=o.resolveComponent("Button"),s=o.resolveComponent("Space"),c=o.resolveComponent("Modal");return o.openBlock(),o.createBlock(c,o.mergeProps({"wrap-class-name":"drag-modal-wrapper",visible:e.visible,"onUpdate:visible":t[1]||(t[1]=u=>e.visible=u)},e.form.modalProps,{"destroy-on-close":!0,"get-container":e.getContainer,"mask-style":{"background-color":"rgba(255, 255, 255, 0.4)"},onCancel:e.closeModal}),{title:o.withCtx(()=>[o.createElementVNode("span",null,o.toDisplayString(e.form.title),1)]),footer:o.withCtx(()=>{var u;return[((u=e.form.modalProps)==null?void 0:u.hideFooter)!==!0?(o.openBlock(),o.createBlock(s,{key:0},{default:o.withCtx(()=>{var d;return[o.createVNode(l,{onClick:e.closeModal},{default:o.withCtx(()=>{var f;return[o.createTextVNode(o.toDisplayString(((f=e.form.modalProps)==null?void 0:f.cancelText)||"取消"),1)]}),_:1},8,["onClick"]),((d=e.form.modalProps)==null?void 0:d.hideOkButton)!==!0&&e.modalConfig.showOk?(o.openBlock(),o.createBlock(l,{key:0,type:"primary",onClick:e.handleOk,loading:e.confirmLoading},{default:o.withCtx(()=>{var f;return[o.createTextVNode(o.toDisplayString(((f=e.form.modalProps)==null?void 0:f.okText)||"确定"),1)]}),_:1},8,["onClick","loading"])):o.createCommentVNode("",!0)]}),_:1})):o.createCommentVNode("",!0)]}),default:o.withCtx(()=>[e.form.component?(o.openBlock(),o.createBlock(o.resolveDynamicComponent(e.form.component),o.mergeProps({key:0,rows:e.rows,"extra-data":e.extraData},e.form.props,{modalConfig:e.modalConfig,"onUpdate:modalConfig":t[0]||(t[0]=u=>e.modalConfig=u),ref:"currentForm"}),null,16,["rows","extra-data","modalConfig"])):(o.openBlock(),o.createElementBlock("span",Rs,"form配置中没有为【"+o.toDisplayString(e.form.title)+"】事件提供组件",1))]),_:1},16,["visible","get-container","mask-style","onCancel"])}const ro=$e(Ds,[["render",Bs]]),oo=Et(ro),iw="";/*!
|
|
4
|
+
*/function Za(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const Ja=Za(ge),es={name:"@yzsf2e/render-core",version:"1.0.2-alpha.78",main:"dist/render-core",module:"dist/render-core",files:["dist"],scripts:{dev:"storybook dev -p 6006",build:"vite build",lint:"vite lint",release:"node scripts/release.js --gitTag","build-storybook":"storybook build"},publishConfig:{registry:"https://registry.npmjs.org/",access:"public"},author:"yzsf2e",keywords:["vue3","antdv","frontend","component","components"],dependencies:{"@ant-design/icons-vue":"7.0.1","@vueuse/components":"^10.5.0","@vueuse/core":"^10.5.0","@yzsf2e/use":"workspace:^","ant-design-vue":"3.2.20",axios:"^1.6.2","big.js":"^6.2.1",dayjs:"1.11.10","lodash-es":"^4.17.21",store:"^2.0.12","v-viewer":"^3.0.13",viewerjs:"^1.11.6","vue-request":"^2.0.3","vue-router":"^4.2.5"},peerDependencies:{axios:"^1.6.2"},devDependencies:{"@storybook/addon-essentials":"^7.6.6","@storybook/addon-interactions":"^7.6.6","@storybook/addon-links":"^7.6.6","@storybook/blocks":"^7.6.6","@storybook/test":"^7.6.6","@storybook/vue3":"^7.6.6","@storybook/vue3-vite":"^7.6.6","@types/node":"^18.16.3","@vitejs/plugin-vue":"^4.0.0","@vitejs/plugin-vue-jsx":"^3.0.0",autoprefixer:"^10.4.16",postcss:"^8.4.32",react:"^18.2.0","react-dom":"^18.2.0",sass:"^1.69.5",storybook:"^7.6.6",typescript:"^5.0.4",vite:"^4.4.2",vue:"3.3.4"}},Wn=Object.assign;function St(e){return[`yzs-${e}`]}const ts=/-(\w)/g,ns=e=>e.replace(ts,(t,n)=>n.toUpperCase()),Et=e=>{const t=e;return t.install=function(n){n.component(t.name,t),n.component(ns(`-${t.name}`),t)},e},[rs]=St("date-picker"),os={allowClear:!0,autofocus:!1,bordered:!0,format:"YYYY-MM-DD",nextIcon:"icon-right",open:!1,placement:"bottomLeft",popupStyle:{},prevIcon:"icon-left",size:"small",suffixIcon:"icon-calendar",superNextIcon:"icon-double-right",superPrevIcon:"icon-double-left",valueFormat:"YYYY-MM-DD",renderExtraFooter:()=>null,showNow:!0,showTime:!1,showToday:!0},Gr={dateRender:Function,disabled:Boolean,disabledDate:Function,dropdownClassName:String,getPopupContainer:Function,inputReadOnly:Boolean,locale:Object,mode:String,picker:String,placeholder:String,presets:Array,status:String,defaultPickerValue:Object,disabledTime:Function,format:String,value:Object},qr=Et(o.defineComponent({name:rs,props:Gr,emits:["change","ok","update:value","openChange","panelChange"],setup(e,{emit:t,expose:n}){const r=o.ref(null),i=o.computed(()=>Wn(e,os)),a=p=>{t("ok",p)},l=p=>{t("change",p),t("update:value",p)},s=p=>{t("openChange",p)},c=(p,h)=>{t("openChange",p,h)};n({blur:()=>{var p;(p=r.value)==null||p.blur()},focus:()=>{var p;(p=r.value)==null||p.focus()}});const f={...i.value,ok:a,onChange:l,onOpenChange:s,panelChange:c};return()=>o.createVNode(K.DatePicker,o.mergeProps({ref:r},f),null)}})),is=o.defineComponent({name:"AIcon",components:Ja,props:{type:{required:!0,type:String}}}),ke=(e,t)=>{const n=e.__vccOpts||e;for(const[r,i]of t)n[r]=i;return n};function as(e,t,n,r,i,a){return o.openBlock(),o.createBlock(o.resolveDynamicComponent(e.type))}const tn=ke(is,[["render",as]]);function Xr(e){return o.getCurrentScope()?(o.onScopeDispose(e),!0):!1}function Hn(e){let t=!1,n;const r=o.effectScope(!0);return(...i)=>(t||(n=r.run(()=>e(...i)),t=!0),n)}function ye(e){return typeof e=="function"?e():o.unref(e)}const Qr=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const ss=e=>typeof e<"u",ls=Object.prototype.toString,cs=e=>ls.call(e)==="[object Object]",us=()=>{};function fs(e,t){function n(...r){return new Promise((i,a)=>{Promise.resolve(e(()=>t.apply(this,r),{fn:t,thisArg:this,args:r})).then(i).catch(a)})}return n}const Zr=e=>e();function ds(e=Zr){const t=o.ref(!0);function n(){t.value=!1}function r(){t.value=!0}const i=(...a)=>{t.value&&e(...a)};return{isActive:o.readonly(t),pause:n,resume:r,eventFilter:i}}function ps(e){return e||o.getCurrentInstance()}function hs(e,t,n={}){const{eventFilter:r=Zr,...i}=n;return o.watch(e,fs(r,t),i)}function ms(e,t,n={}){const{eventFilter:r,...i}=n,{eventFilter:a,pause:l,resume:s,isActive:c}=ds(r);return{stop:hs(e,t,{...i,eventFilter:a}),pause:l,resume:s,isActive:c}}function gs(e,t={}){if(!o.isRef(e))return o.toRefs(e);const n=Array.isArray(e.value)?Array.from({length:e.value.length}):{};for(const r in e.value)n[r]=o.customRef(()=>({get(){return e.value[r]},set(i){var a;if((a=ye(t.replaceRef))!=null?a:!0)if(Array.isArray(e.value)){const s=[...e.value];s[r]=i,e.value=s}else{const s={...e.value,[r]:i};Object.setPrototypeOf(s,Object.getPrototypeOf(e.value)),e.value=s}else e.value[r]=i}}));return n}function ys(e,t=!0,n){const r=ps(n);r?o.onMounted(e,r):t?e():o.nextTick(e)}function Gn(e){var t;const n=ye(e);return(t=n==null?void 0:n.$el)!=null?t:n}const Tt=Qr?window:void 0;function Ot(...e){let t,n,r,i;if(typeof e[0]=="string"||Array.isArray(e[0])?([n,r,i]=e,t=Tt):[t,n,r,i]=e,!t)return us;Array.isArray(n)||(n=[n]),Array.isArray(r)||(r=[r]);const a=[],l=()=>{a.forEach(d=>d()),a.length=0},s=(d,f,p,h)=>(d.addEventListener(f,p,h),()=>d.removeEventListener(f,p,h)),c=o.watch(()=>[Gn(t),ye(i)],([d,f])=>{if(l(),!d)return;const p=cs(f)?{...f}:f;a.push(...n.flatMap(h=>r.map(y=>s(d,h,y,p))))},{immediate:!0,flush:"post"}),u=()=>{c(),l()};return Xr(u),u}function bs(){const e=o.ref(!1);return o.getCurrentInstance()&&o.onMounted(()=>{e.value=!0}),e}function ws(e){const t=bs();return o.computed(()=>(t.value,!!e()))}function vs(e){return JSON.parse(JSON.stringify(e))}const nn=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},rn="__vueuse_ssr_handlers__",Cs=Ss();function Ss(){return rn in nn||(nn[rn]=nn[rn]||{}),nn[rn]}function Es(e,t){return Cs[e]||t}function Ts(e){return e==null?"any":e instanceof Set?"set":e instanceof Map?"map":e instanceof Date?"date":typeof e=="boolean"?"boolean":typeof e=="string"?"string":typeof e=="object"?"object":Number.isNaN(e)?"any":"number"}const Os={boolean:{read:e=>e==="true",write:e=>String(e)},object:{read:e=>JSON.parse(e),write:e=>JSON.stringify(e)},number:{read:e=>Number.parseFloat(e),write:e=>String(e)},any:{read:e=>e,write:e=>String(e)},string:{read:e=>e,write:e=>String(e)},map:{read:e=>new Map(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e.entries()))},set:{read:e=>new Set(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e))},date:{read:e=>new Date(e),write:e=>e.toISOString()}},Jr="vueuse-storage";function eo(e,t,n,r={}){var i;const{flush:a="pre",deep:l=!0,listenToStorageChanges:s=!0,writeDefaults:c=!0,mergeDefaults:u=!1,shallow:d,window:f=Tt,eventFilter:p,onError:h=C=>{console.error(C)},initOnMounted:y}=r,m=(d?o.shallowRef:o.ref)(typeof t=="function"?t():t);if(!n)try{n=Es("getDefaultStorage",()=>{var C;return(C=Tt)==null?void 0:C.localStorage})()}catch(C){h(C)}if(!n)return m;const w=ye(t),S=Ts(w),_=(i=r.serializer)!=null?i:Os[S],{pause:v,resume:$}=ms(m,()=>E(m.value),{flush:a,deep:l,eventFilter:p});return f&&s&&ys(()=>{Ot(f,"storage",A),Ot(f,Jr,O),y&&A()}),y||A(),m;function E(C){try{if(C==null)n.removeItem(e);else{const g=_.write(C),b=n.getItem(e);b!==g&&(n.setItem(e,g),f&&f.dispatchEvent(new CustomEvent(Jr,{detail:{key:e,oldValue:b,newValue:g,storageArea:n}})))}}catch(g){h(g)}}function T(C){const g=C?C.newValue:n.getItem(e);if(g==null)return c&&w!=null&&n.setItem(e,_.write(w)),w;if(!C&&u){const b=_.read(g);return typeof u=="function"?u(b,w):S==="object"&&!Array.isArray(b)?{...w,...b}:b}else return typeof g!="string"?g:_.read(g)}function O(C){A(C.detail)}function A(C){if(!(C&&C.storageArea!==n)){if(C&&C.key==null){m.value=w;return}if(!(C&&C.key!==e)){v();try{(C==null?void 0:C.newValue)!==_.write(m.value)&&(m.value=T(C))}catch(g){h(g)}finally{C?o.nextTick($):$()}}}}}function _s(e,t={}){var n,r;const{pointerTypes:i,preventDefault:a,stopPropagation:l,exact:s,onMove:c,onEnd:u,onStart:d,initialValue:f,axis:p="both",draggingElement:h=Tt,containerElement:y,handle:m=e}=t,w=o.ref((n=ye(f))!=null?n:{x:0,y:0}),S=o.ref(),_=O=>i?i.includes(O.pointerType):!0,v=O=>{ye(a)&&O.preventDefault(),ye(l)&&O.stopPropagation()},$=O=>{var A;if(!_(O)||ye(s)&&O.target!==ye(e))return;const C=ye(y),g=(A=C==null?void 0:C.getBoundingClientRect)==null?void 0:A.call(C),b=ye(e).getBoundingClientRect(),N={x:O.clientX-(C?b.left-g.left:b.left),y:O.clientY-(C?b.top-g.top:b.top)};(d==null?void 0:d(N,O))!==!1&&(S.value=N,v(O))},E=O=>{var A;if(!_(O)||!S.value)return;const C=ye(y),g=(A=C==null?void 0:C.getBoundingClientRect)==null?void 0:A.call(C),b=ye(e).getBoundingClientRect();let{x:N,y:x}=w.value;(p==="x"||p==="both")&&(N=O.clientX-S.value.x,C&&(N=Math.min(Math.max(0,N),g.width-b.width))),(p==="y"||p==="both")&&(x=O.clientY-S.value.y,C&&(x=Math.min(Math.max(0,x),g.height-b.height))),w.value={x:N,y:x},c==null||c(w.value,O),v(O)},T=O=>{_(O)&&S.value&&(S.value=void 0,u==null||u(w.value,O),v(O))};if(Qr){const O={capture:(r=t.capture)!=null?r:!0};Ot(m,"pointerdown",$,O),Ot(h,"pointermove",E,O),Ot(h,"pointerup",T,O)}return{...gs(w),position:w,isDragging:o.computed(()=>!!S.value),style:o.computed(()=>`left:${w.value.x}px;top:${w.value.y}px;`)}}function As(e,t,n={}){const{window:r=Tt,...i}=n;let a;const l=ws(()=>r&&"ResizeObserver"in r),s=()=>{a&&(a.disconnect(),a=void 0)},c=o.computed(()=>Array.isArray(e)?e.map(f=>Gn(f)):[Gn(e)]),u=o.watch(c,f=>{if(s(),l.value&&r){a=new ResizeObserver(t);for(const p of f)p&&a.observe(p,i)}},{immediate:!0,flush:"post",deep:!0}),d=()=>{s(),u()};return Xr(d),{isSupported:l,stop:d}}function to(e,t,n,r={}){var i,a,l;const{clone:s=!1,passive:c=!1,eventName:u,deep:d=!1,defaultValue:f,shouldEmit:p}=r,h=o.getCurrentInstance(),y=n||(h==null?void 0:h.emit)||((i=h==null?void 0:h.$emit)==null?void 0:i.bind(h))||((l=(a=h==null?void 0:h.proxy)==null?void 0:a.$emit)==null?void 0:l.bind(h==null?void 0:h.proxy));let m=u;t||(t="modelValue"),m=m||`update:${t.toString()}`;const w=v=>s?typeof s=="function"?s(v):vs(v):v,S=()=>ss(e[t])?w(e[t]):f,_=v=>{p?p(v)&&y(m,v):y(m,v)};if(c){const v=S(),$=o.ref(v);let E=!1;return o.watch(()=>e[t],T=>{E||(E=!0,$.value=w(T),o.nextTick(()=>E=!1))}),o.watch($,T=>{!E&&(T!==e[t]||d)&&_(T)},{deep:d}),$}else return o.computed({get(){return S()},set(v){_(v)}})}const[ks]=St("drag-drawer"),$s=o.defineComponent({name:ks,components:{CloseOutlined:ge.CloseOutlined,ShrinkOutlined:ge.ShrinkOutlined,ArrowsAltOutlined:ge.ArrowsAltOutlined},props:{visible:{type:Boolean,default:!1},title:{type:String,default:""},width:{type:[Number,String],default:500},getContainer:{type:Function,default:()=>document.querySelector(".page-renderer-wrapper")},hideFooter:{type:Boolean,default:!1}},setup(e,{emit:t}){const n=o.ref(null),r=to(e,"visible",t),i=o.ref(e.width),a=o.ref(!1),l=()=>r.value=!1,s=()=>e.getContainer(),c=s(),u=500,d=()=>{i.value=a.value?e.width:"100%",a.value=!a.value};return o.watch(r,p=>{p||(a.value=!1,i.value=e.width)}),{show:r,fullScreen:a,dragDrawer:n,actualWidth:i,getContainerFn:s,handleClose:l,toggleFullScreen:d,handleMouseDown:p=>{const h=p.clientX,y=i.value,m=(c==null?void 0:c.clientWidth)||document.body.clientWidth;document.body.classList.add("disable-select-in-dragging"),window.onmousemove=function(w){const _=w.clientX-h,v=typeof y=="number"?y-_:window.innerWidth-w.x;i.value=Math.min(v<u?u:v,m)},window.onmouseup=()=>{window.onmousemove=null,document.body.classList.remove("disable-select-in-dragging")}}}}}),nw="",Ns={key:0,style:{position:"absolute",bottom:"0",left:"0",height:"50px","line-height":"49px",width:"100%","border-top":"1px solid #eee","box-sizing":"content-box","background-color":"#fff","z-index":"2"}};function Ps(e,t,n,r,i,a){const l=o.resolveComponent("ArrowsAltOutlined"),s=o.resolveComponent("ShrinkOutlined"),c=o.resolveComponent("CloseOutlined"),u=o.resolveComponent("a-space"),d=o.resolveComponent("a-button"),f=o.resolveComponent("a-drawer");return o.openBlock(),o.createBlock(f,{ref:"dragDrawer",class:"drag-drawer-warpper",placement:"right",mask:!1,width:e.actualWidth,"get-container":e.getContainerFn,closable:!1,"destroy-on-close":!0,push:!0,visible:e.show,"onUpdate:visible":t[1]||(t[1]=p=>e.show=p)},{title:o.withCtx(()=>[e.title?(o.openBlock(),o.createElementBlock(o.Fragment,{key:0},[o.createTextVNode(o.toDisplayString(e.title),1)],64)):o.renderSlot(e.$slots,"title",{key:1})]),extra:o.withCtx(()=>[o.createVNode(u,{style:{transform:"translateY(2px)"}},{default:o.withCtx(()=>[e.fullScreen?(o.openBlock(),o.createBlock(s,{key:1,style:{color:"#fff","font-size":"18px",cursor:"pointer","margin-right":"10px"},onClick:e.toggleFullScreen},null,8,["onClick"])):(o.openBlock(),o.createBlock(l,{key:0,style:{color:"#fff","font-size":"18px",cursor:"pointer","margin-right":"10px"},onClick:e.toggleFullScreen},null,8,["onClick"])),o.createVNode(c,{style:{color:"#fff","font-size":"18px",cursor:"pointer","margin-right":"10px"},onClick:e.handleClose},null,8,["onClick"])]),_:1})]),default:o.withCtx(()=>[o.renderSlot(e.$slots,"default"),o.createElementVNode("div",{class:"drag-trigger",onMousedown:t[0]||(t[0]=p=>e.handleMouseDown(p))},null,32),e.hideFooter?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("div",Ns,[o.createVNode(u,{style:{"padding-left":"20px"}},{default:o.withCtx(()=>[o.renderSlot(e.$slots,"footBtn"),o.createVNode(d,{onClick:e.handleClose},{default:o.withCtx(()=>[o.createTextVNode("关闭")]),_:1},8,["onClick"])]),_:3})]))]),_:3},8,["width","get-container","visible"])}const no=Et(ke($s,[["render",Ps]])),[Is]=St("page-renderer-form-modal"),Ds=o.defineComponent({name:Is,components:{Modal:K.Modal,Button:K.Button,Space:K.Space},props:{form:{type:Object,required:!0},rows:{type:Array,default:()=>[]},extraData:{type:Object},getContainer:{type:Function,default:()=>document.querySelector(".page-renderer-wrapper")}},emits:["refresh"],setup(e,{expose:t,emit:n}){const{form:r}=o.toRefs(e),i=o.ref(!1),a=o.ref(!1),l=o.ref(null),s=o.reactive({showOk:!0}),c=async()=>{var p,h;a.value=!0;const f=((p=l.value)==null?void 0:p.finish)||(()=>Promise.resolve({success:!0}));(h=l.value)!=null&&h.finish||console.warn("form组件没有提供finish方法"),f().then(y=>{const{needFeedback:m=!0,needRefresh:w=!0,successMsg:S="操作成功"}=r.value;a.value=!1,y&&y.success&&(m&&K.message.success(S),d(),w&&n("refresh"))}).catch(y=>{var w;if(a.value=!1,console.log("[PageRendererFormModal handleOk Error]: ",y),typeof y=="string")return K.message.warn(y);const{errorFields:m}=y;m&&m.length&&K.message.warn((w=m[0])==null?void 0:w.errors.join("、"))})};o.watch(i,f=>{f&&o.nextTick(()=>{const p=document.querySelector(".ant-modal-root"),h=p==null?void 0:p.querySelector(".ant-modal-header"),y=p==null?void 0:p.querySelector(".ant-modal");h.style.cursor="move";const m=y.currentStyle||window.getComputedStyle(y,null);h.onmousedown=w=>{const S=w.clientX-h.offsetLeft,_=w.clientY-h.offsetTop;let v,$;m.left.includes("%")?(v=+document.body.clientWidth*(+m.left.replace(/%/g,"")/100),$=+document.body.clientHeight*(+m.top.replace(/%/g,"")/100)):(v=+m.left.replace(/\px/g,""),$=+m.top.replace(/\px/g,"")),document.onmousemove=function(E){const T=E.clientX-S,O=E.clientY-_;y.style.left=`${T+v}px`,y.style.top=`${O+$}px`},document.onmouseup=function(){document.onmousemove=null,document.onmouseup=null}}})});const u=()=>i.value=!0,d=()=>{var f,p;(p=(f=l.value)==null?void 0:f.reset)==null||p.call(f),i.value=!1};return t({openModal:u,closeModal:d}),{handleOk:c,closeModal:d,visible:i,modalConfig:s,currentForm:l,confirmLoading:a}}}),ow="",Rs={key:1};function Bs(e,t,n,r,i,a){const l=o.resolveComponent("Button"),s=o.resolveComponent("Space"),c=o.resolveComponent("Modal");return o.openBlock(),o.createBlock(c,o.mergeProps({"wrap-class-name":"drag-modal-wrapper",visible:e.visible,"onUpdate:visible":t[1]||(t[1]=u=>e.visible=u)},e.form.modalProps,{"destroy-on-close":!0,"get-container":e.getContainer,"mask-style":{"background-color":"rgba(255, 255, 255, 0.4)"},onCancel:e.closeModal}),{title:o.withCtx(()=>[o.createElementVNode("span",null,o.toDisplayString(e.form.title),1)]),footer:o.withCtx(()=>{var u;return[((u=e.form.modalProps)==null?void 0:u.hideFooter)!==!0?(o.openBlock(),o.createBlock(s,{key:0},{default:o.withCtx(()=>{var d;return[o.createVNode(l,{onClick:e.closeModal},{default:o.withCtx(()=>{var f;return[o.createTextVNode(o.toDisplayString(((f=e.form.modalProps)==null?void 0:f.cancelText)||"取消"),1)]}),_:1},8,["onClick"]),((d=e.form.modalProps)==null?void 0:d.hideOkButton)!==!0&&e.modalConfig.showOk?(o.openBlock(),o.createBlock(l,{key:0,type:"primary",onClick:e.handleOk,loading:e.confirmLoading},{default:o.withCtx(()=>{var f;return[o.createTextVNode(o.toDisplayString(((f=e.form.modalProps)==null?void 0:f.okText)||"确定"),1)]}),_:1},8,["onClick","loading"])):o.createCommentVNode("",!0)]}),_:1})):o.createCommentVNode("",!0)]}),default:o.withCtx(()=>[e.form.component?(o.openBlock(),o.createBlock(o.resolveDynamicComponent(e.form.component),o.mergeProps({key:0,rows:e.rows,"extra-data":e.extraData},e.form.props,{modalConfig:e.modalConfig,"onUpdate:modalConfig":t[0]||(t[0]=u=>e.modalConfig=u),ref:"currentForm"}),null,16,["rows","extra-data","modalConfig"])):(o.openBlock(),o.createElementBlock("span",Rs,"form配置中没有为【"+o.toDisplayString(e.form.title)+"】事件提供组件",1))]),_:1},16,["visible","get-container","mask-style","onCancel"])}const ro=ke(Ds,[["render",Bs]]),oo=Et(ro),iw="";/*!
|
|
5
5
|
* Viewer.js v1.11.6
|
|
6
6
|
* https://fengyuanchen.github.io/viewerjs
|
|
7
7
|
*
|
|
@@ -9,4 +9,4 @@
|
|
|
9
9
|
* Released under the MIT license
|
|
10
10
|
*
|
|
11
11
|
* Date: 2023-09-17T03:16:38.052Z
|
|
12
|
-
*/function io(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function qn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?io(Object(n),!0).forEach(function(r){Ls(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):io(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Xn(e){"@babel/helpers - typeof";return Xn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Xn(e)}function Ms(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ao(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,so(r.key),r)}}function xs(e,t,n){return t&&ao(e.prototype,t),n&&ao(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Ls(e,t,n){return t=so(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Fs(e,t){if(typeof e!="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function so(e){var t=Fs(e,"string");return typeof t=="symbol"?t:String(t)}var lo={backdrop:!0,button:!0,navbar:!0,title:!0,toolbar:!0,className:"",container:"body",filter:null,fullscreen:!0,inheritedAttributes:["crossOrigin","decoding","isMap","loading","referrerPolicy","sizes","srcset","useMap"],initialCoverage:.9,initialViewIndex:0,inline:!1,interval:5e3,keyboard:!0,focus:!0,loading:!0,loop:!0,minWidth:200,minHeight:100,movable:!0,rotatable:!0,scalable:!0,zoomable:!0,zoomOnTouch:!0,zoomOnWheel:!0,slideOnTouch:!0,toggleOnDblclick:!0,tooltip:!0,transition:!0,zIndex:2015,zIndexInline:0,zoomRatio:.1,minZoomRatio:.01,maxZoomRatio:100,url:"src",ready:null,show:null,shown:null,hide:null,hidden:null,view:null,viewed:null,move:null,moved:null,rotate:null,rotated:null,scale:null,scaled:null,zoom:null,zoomed:null,play:null,stop:null},js='<div class="viewer-container" tabindex="-1" touch-action="none"><div class="viewer-canvas"></div><div class="viewer-footer"><div class="viewer-title"></div><div class="viewer-toolbar"></div><div class="viewer-navbar"><ul class="viewer-list" role="navigation"></ul></div></div><div class="viewer-tooltip" role="alert" aria-hidden="true"></div><div class="viewer-button" data-viewer-action="mix" role="button"></div><div class="viewer-player"></div></div>',on=typeof window<"u"&&typeof window.document<"u",Le=on?window:{},at=on&&Le.document.documentElement?"ontouchstart"in Le.document.documentElement:!1,Qn=on?"PointerEvent"in Le:!1,G="viewer",an="move",co="switch",_t="zoom",sn="".concat(G,"-active"),zs="".concat(G,"-close"),ln="".concat(G,"-fade"),Zn="".concat(G,"-fixed"),Ks="".concat(G,"-fullscreen"),uo="".concat(G,"-fullscreen-exit"),He="".concat(G,"-hide"),Vs="".concat(G,"-hide-md-down"),Us="".concat(G,"-hide-sm-down"),Ys="".concat(G,"-hide-xs-down"),Se="".concat(G,"-in"),At="".concat(G,"-invisible"),st="".concat(G,"-loading"),Ws="".concat(G,"-move"),fo="".concat(G,"-open"),lt="".concat(G,"-show"),ce="".concat(G,"-transition"),ct="click",Jn="dblclick",po="dragstart",ho="focusin",mo="keydown",Ee="load",Ge="error",Hs=at?"touchend touchcancel":"mouseup",Gs=at?"touchmove":"mousemove",qs=at?"touchstart":"mousedown",go=Qn?"pointerdown":qs,yo=Qn?"pointermove":Gs,bo=Qn?"pointerup pointercancel":Hs,wo="resize",ke="transitionend",vo="wheel",Co="ready",So="show",Eo="shown",To="hide",Oo="hidden",_o="view",$t="viewed",Ao="move",$o="moved",ko="rotate",No="rotated",Po="scale",Io="scaled",Do="zoom",Ro="zoomed",Bo="play",Mo="stop",cn="".concat(G,"Action"),er=/\s\s*/,un=["zoom-in","zoom-out","one-to-one","reset","prev","play","next","rotate-left","rotate-right","flip-horizontal","flip-vertical"];function kt(e){return typeof e=="string"}var Xs=Number.isNaN||Le.isNaN;function se(e){return typeof e=="number"&&!Xs(e)}function ut(e){return typeof e>"u"}function ft(e){return Xn(e)==="object"&&e!==null}var Qs=Object.prototype.hasOwnProperty;function dt(e){if(!ft(e))return!1;try{var t=e.constructor,n=t.prototype;return t&&n&&Qs.call(n,"isPrototypeOf")}catch{return!1}}function J(e){return typeof e=="function"}function te(e,t){if(e&&J(t))if(Array.isArray(e)||se(e.length)){var n=e.length,r;for(r=0;r<n&&t.call(e,e[r],r,e)!==!1;r+=1);}else ft(e)&&Object.keys(e).forEach(function(i){t.call(e,e[i],i,e)});return e}var be=Object.assign||function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return ft(t)&&r.length>0&&r.forEach(function(a){ft(a)&&Object.keys(a).forEach(function(l){t[l]=a[l]})}),t},Zs=/^(?:width|height|left|top|marginLeft|marginTop)$/;function Ne(e,t){var n=e.style;te(t,function(r,i){Zs.test(i)&&se(r)&&(r+="px"),n[i]=r})}function Js(e){return kt(e)?e.replace(/&(?!amp;|quot;|#39;|lt;|gt;)/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<").replace(/>/g,">"):e}function pt(e,t){return!e||!t?!1:e.classList?e.classList.contains(t):e.className.indexOf(t)>-1}function U(e,t){if(!(!e||!t)){if(se(e.length)){te(e,function(r){U(r,t)});return}if(e.classList){e.classList.add(t);return}var n=e.className.trim();n?n.indexOf(t)<0&&(e.className="".concat(n," ").concat(t)):e.className=t}}function X(e,t){if(!(!e||!t)){if(se(e.length)){te(e,function(n){X(n,t)});return}if(e.classList){e.classList.remove(t);return}e.className.indexOf(t)>=0&&(e.className=e.className.replace(t,""))}}function Nt(e,t,n){if(t){if(se(e.length)){te(e,function(r){Nt(r,t,n)});return}n?U(e,t):X(e,t)}}var el=/([a-z\d])([A-Z])/g;function tr(e){return e.replace(el,"$1-$2").toLowerCase()}function ht(e,t){return ft(e[t])?e[t]:e.dataset?e.dataset[t]:e.getAttribute("data-".concat(tr(t)))}function nr(e,t,n){ft(n)?e[t]=n:e.dataset?e.dataset[t]=n:e.setAttribute("data-".concat(tr(t)),n)}var xo=function(){var e=!1;if(on){var t=!1,n=function(){},r=Object.defineProperty({},"once",{get:function(){return e=!0,t},set:function(a){t=a}});Le.addEventListener("test",n,r),Le.removeEventListener("test",n,r)}return e}();function ee(e,t,n){var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},i=n;t.trim().split(er).forEach(function(a){if(!xo){var l=e.listeners;l&&l[a]&&l[a][n]&&(i=l[a][n],delete l[a][n],Object.keys(l[a]).length===0&&delete l[a],Object.keys(l).length===0&&delete e.listeners)}e.removeEventListener(a,i,r)})}function Y(e,t,n){var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},i=n;t.trim().split(er).forEach(function(a){if(r.once&&!xo){var l=e.listeners,s=l===void 0?{}:l;i=function(){delete s[a][n],e.removeEventListener(a,i,r);for(var u=arguments.length,d=new Array(u),f=0;f<u;f++)d[f]=arguments[f];n.apply(e,d)},s[a]||(s[a]={}),s[a][n]&&e.removeEventListener(a,s[a][n],r),s[a][n]=i,e.listeners=s}e.addEventListener(a,i,r)})}function fe(e,t,n,r){var i;return J(Event)&&J(CustomEvent)?i=new CustomEvent(t,qn({bubbles:!0,cancelable:!0,detail:n},r)):(i=document.createEvent("CustomEvent"),i.initCustomEvent(t,!0,!0,n)),e.dispatchEvent(i)}function tl(e){var t=e.getBoundingClientRect();return{left:t.left+(window.pageXOffset-document.documentElement.clientLeft),top:t.top+(window.pageYOffset-document.documentElement.clientTop)}}function fn(e){var t=e.rotate,n=e.scaleX,r=e.scaleY,i=e.translateX,a=e.translateY,l=[];se(i)&&i!==0&&l.push("translateX(".concat(i,"px)")),se(a)&&a!==0&&l.push("translateY(".concat(a,"px)")),se(t)&&t!==0&&l.push("rotate(".concat(t,"deg)")),se(n)&&n!==1&&l.push("scaleX(".concat(n,")")),se(r)&&r!==1&&l.push("scaleY(".concat(r,")"));var s=l.length?l.join(" "):"none";return{WebkitTransform:s,msTransform:s,transform:s}}function nl(e){return kt(e)?decodeURIComponent(e.replace(/^.*\//,"").replace(/[?&#].*$/,"")):""}var rr=Le.navigator&&/Version\/\d+(\.\d+)+?\s+Safari/i.test(Le.navigator.userAgent);function Lo(e,t,n){var r=document.createElement("img");if(e.naturalWidth&&!rr)return n(e.naturalWidth,e.naturalHeight),r;var i=document.body||document.documentElement;return r.onload=function(){n(r.width,r.height),rr||i.removeChild(r)},te(t.inheritedAttributes,function(a){var l=e.getAttribute(a);l!==null&&r.setAttribute(a,l)}),r.src=e.src,rr||(r.style.cssText="left:0;max-height:none!important;max-width:none!important;min-height:0!important;min-width:0!important;opacity:0;position:absolute;top:0;z-index:-1;",i.appendChild(r)),r}function dn(e){switch(e){case 2:return Ys;case 3:return Us;case 4:return Vs;default:return""}}function rl(e){var t=qn({},e),n=[];return te(e,function(r,i){delete t[i],te(t,function(a){var l=Math.abs(r.startX-a.startX),s=Math.abs(r.startY-a.startY),c=Math.abs(r.endX-a.endX),u=Math.abs(r.endY-a.endY),d=Math.sqrt(l*l+s*s),f=Math.sqrt(c*c+u*u),h=(f-d)/d;n.push(h)})}),n.sort(function(r,i){return Math.abs(r)<Math.abs(i)}),n[0]}function pn(e,t){var n=e.pageX,r=e.pageY,i={endX:n,endY:r};return t?i:qn({timeStamp:Date.now(),startX:n,startY:r},i)}function ol(e){var t=0,n=0,r=0;return te(e,function(i){var a=i.startX,l=i.startY;t+=a,n+=l,r+=1}),t/=r,n/=r,{pageX:t,pageY:n}}var il={render:function(){this.initContainer(),this.initViewer(),this.initList(),this.renderViewer()},initBody:function(){var t=this.element.ownerDocument,n=t.body||t.documentElement;this.body=n,this.scrollbarWidth=window.innerWidth-t.documentElement.clientWidth,this.initialBodyPaddingRight=n.style.paddingRight,this.initialBodyComputedPaddingRight=window.getComputedStyle(n).paddingRight},initContainer:function(){this.containerData={width:window.innerWidth,height:window.innerHeight}},initViewer:function(){var t=this.options,n=this.parent,r;t.inline&&(r={width:Math.max(n.offsetWidth,t.minWidth),height:Math.max(n.offsetHeight,t.minHeight)},this.parentData=r),(this.fulled||!r)&&(r=this.containerData),this.viewerData=be({},r)},renderViewer:function(){this.options.inline&&!this.fulled&&Ne(this.viewer,this.viewerData)},initList:function(){var t=this,n=this.element,r=this.options,i=this.list,a=[];i.innerHTML="",te(this.images,function(l,s){var c=l.src,u=l.alt||nl(c),d=t.getImageURL(l);if(c||d){var f=document.createElement("li"),h=document.createElement("img");te(r.inheritedAttributes,function(p){var C=l.getAttribute(p);C!==null&&h.setAttribute(p,C)}),r.navbar&&(h.src=c||d),h.alt=u,h.setAttribute("data-original-url",d||c),f.setAttribute("data-index",s),f.setAttribute("data-viewer-action","view"),f.setAttribute("role","button"),r.keyboard&&f.setAttribute("tabindex",0),f.appendChild(h),i.appendChild(f),a.push(f)}}),this.items=a,te(a,function(l){var s=l.firstElementChild,c,u;nr(s,"filled",!0),r.loading&&U(l,st),Y(s,Ee,c=function(f){ee(s,Ge,u),r.loading&&X(l,st),t.loadImage(f)},{once:!0}),Y(s,Ge,u=function(){ee(s,Ee,c),r.loading&&X(l,st)},{once:!0})}),r.transition&&Y(n,$t,function(){U(i,ce)},{once:!0})},renderList:function(){var t=this.index,n=this.items[t];if(n){var r=n.nextElementSibling,i=parseInt(window.getComputedStyle(r||n).marginLeft,10),a=n.offsetWidth,l=a+i;Ne(this.list,be({width:l*this.length-i},fn({translateX:(this.viewerData.width-a)/2-l*t})))}},resetList:function(){var t=this.list;t.innerHTML="",X(t,ce),Ne(t,fn({translateX:0}))},initImage:function(t){var n=this,r=this.options,i=this.image,a=this.viewerData,l=this.footer.offsetHeight,s=a.width,c=Math.max(a.height-l,l),u=this.imageData||{},d;this.imageInitializing={abort:function(){d.onload=null}},d=Lo(i,r,function(f,h){var p=f/h,C=Math.max(0,Math.min(1,r.initialCoverage)),m=s,w=c;n.imageInitializing=!1,c*p>s?w=s/p:m=c*p,C=se(C)?C:.9,m=Math.min(m*C,f),w=Math.min(w*C,h);var v=(s-m)/2,_=(c-w)/2,b={left:v,top:_,x:v,y:_,width:m,height:w,oldRatio:1,ratio:m/f,aspectRatio:p,naturalWidth:f,naturalHeight:h},k=be({},b);r.rotatable&&(b.rotate=u.rotate||0,k.rotate=0),r.scalable&&(b.scaleX=u.scaleX||1,b.scaleY=u.scaleY||1,k.scaleX=1,k.scaleY=1),n.imageData=b,n.initialImageData=k,t&&t()})},renderImage:function(t){var n=this,r=this.image,i=this.imageData;if(Ne(r,be({width:i.width,height:i.height,marginLeft:i.x,marginTop:i.y},fn(i))),t)if((this.viewing||this.moving||this.rotating||this.scaling||this.zooming)&&this.options.transition&&pt(r,ce)){var a=function(){n.imageRendering=!1,t()};this.imageRendering={abort:function(){ee(r,ke,a)}},Y(r,ke,a,{once:!0})}else t()},resetImage:function(){var t=this.image;t&&(this.viewing&&this.viewing.abort(),t.parentNode.removeChild(t),this.image=null,this.title.innerHTML="")}},al={bind:function(){var t=this.options,n=this.viewer,r=this.canvas,i=this.element.ownerDocument;Y(n,ct,this.onClick=this.click.bind(this)),Y(n,po,this.onDragStart=this.dragstart.bind(this)),Y(r,go,this.onPointerDown=this.pointerdown.bind(this)),Y(i,yo,this.onPointerMove=this.pointermove.bind(this)),Y(i,bo,this.onPointerUp=this.pointerup.bind(this)),Y(i,mo,this.onKeyDown=this.keydown.bind(this)),Y(window,wo,this.onResize=this.resize.bind(this)),t.zoomable&&t.zoomOnWheel&&Y(n,vo,this.onWheel=this.wheel.bind(this),{passive:!1,capture:!0}),t.toggleOnDblclick&&Y(r,Jn,this.onDblclick=this.dblclick.bind(this))},unbind:function(){var t=this.options,n=this.viewer,r=this.canvas,i=this.element.ownerDocument;ee(n,ct,this.onClick),ee(n,po,this.onDragStart),ee(r,go,this.onPointerDown),ee(i,yo,this.onPointerMove),ee(i,bo,this.onPointerUp),ee(i,mo,this.onKeyDown),ee(window,wo,this.onResize),t.zoomable&&t.zoomOnWheel&&ee(n,vo,this.onWheel,{passive:!1,capture:!0}),t.toggleOnDblclick&&ee(r,Jn,this.onDblclick)}},sl={click:function(t){var n=this.options,r=this.imageData,i=t.target,a=ht(i,cn);switch(!a&&i.localName==="img"&&i.parentElement.localName==="li"&&(i=i.parentElement,a=ht(i,cn)),at&&t.isTrusted&&i===this.canvas&&clearTimeout(this.clickCanvasTimeout),a){case"mix":this.played?this.stop():n.inline?this.fulled?this.exit():this.full():this.hide();break;case"hide":this.pointerMoved||this.hide();break;case"view":this.view(ht(i,"index"));break;case"zoom-in":this.zoom(.1,!0);break;case"zoom-out":this.zoom(-.1,!0);break;case"one-to-one":this.toggle();break;case"reset":this.reset();break;case"prev":this.prev(n.loop);break;case"play":this.play(n.fullscreen);break;case"next":this.next(n.loop);break;case"rotate-left":this.rotate(-90);break;case"rotate-right":this.rotate(90);break;case"flip-horizontal":this.scaleX(-r.scaleX||-1);break;case"flip-vertical":this.scaleY(-r.scaleY||-1);break;default:this.played&&this.stop()}},dblclick:function(t){t.preventDefault(),this.viewed&&t.target===this.image&&(at&&t.isTrusted&&clearTimeout(this.doubleClickImageTimeout),this.toggle(t.isTrusted?t:t.detail&&t.detail.originalEvent))},load:function(){var t=this;this.timeout&&(clearTimeout(this.timeout),this.timeout=!1);var n=this.element,r=this.options,i=this.image,a=this.index,l=this.viewerData;X(i,At),r.loading&&X(this.canvas,st),i.style.cssText="height:0;"+"margin-left:".concat(l.width/2,"px;")+"margin-top:".concat(l.height/2,"px;")+"max-width:none!important;position:relative;width:0;",this.initImage(function(){Nt(i,Ws,r.movable),Nt(i,ce,r.transition),t.renderImage(function(){t.viewed=!0,t.viewing=!1,J(r.viewed)&&Y(n,$t,r.viewed,{once:!0}),fe(n,$t,{originalImage:t.images[a],index:a,image:i},{cancelable:!1})})})},loadImage:function(t){var n=t.target,r=n.parentNode,i=r.offsetWidth||30,a=r.offsetHeight||50,l=!!ht(n,"filled");Lo(n,this.options,function(s,c){var u=s/c,d=i,f=a;a*u>i?l?d=a*u:f=i/u:l?f=i/u:d=a*u,Ne(n,be({width:d,height:f},fn({translateX:(i-d)/2,translateY:(a-f)/2})))})},keydown:function(t){var n=this.options;if(n.keyboard){var r=t.keyCode||t.which||t.charCode;switch(r){case 13:this.viewer.contains(t.target)&&this.click(t);break}if(this.fulled)switch(r){case 27:this.played?this.stop():n.inline?this.fulled&&this.exit():this.hide();break;case 32:this.played&&this.stop();break;case 37:this.played&&this.playing?this.playing.prev():this.prev(n.loop);break;case 38:t.preventDefault(),this.zoom(n.zoomRatio,!0);break;case 39:this.played&&this.playing?this.playing.next():this.next(n.loop);break;case 40:t.preventDefault(),this.zoom(-n.zoomRatio,!0);break;case 48:case 49:t.ctrlKey&&(t.preventDefault(),this.toggle());break}}},dragstart:function(t){t.target.localName==="img"&&t.preventDefault()},pointerdown:function(t){var n=this.options,r=this.pointers,i=t.buttons,a=t.button;if(this.pointerMoved=!1,!(!this.viewed||this.showing||this.viewing||this.hiding||(t.type==="mousedown"||t.type==="pointerdown"&&t.pointerType==="mouse")&&(se(i)&&i!==1||se(a)&&a!==0||t.ctrlKey))){t.preventDefault(),t.changedTouches?te(t.changedTouches,function(s){r[s.identifier]=pn(s)}):r[t.pointerId||0]=pn(t);var l=n.movable?an:!1;n.zoomOnTouch&&n.zoomable&&Object.keys(r).length>1?l=_t:n.slideOnTouch&&(t.pointerType==="touch"||t.type==="touchstart")&&this.isSwitchable()&&(l=co),n.transition&&(l===an||l===_t)&&X(this.image,ce),this.action=l}},pointermove:function(t){var n=this.pointers,r=this.action;!this.viewed||!r||(t.preventDefault(),t.changedTouches?te(t.changedTouches,function(i){be(n[i.identifier]||{},pn(i,!0))}):be(n[t.pointerId||0]||{},pn(t,!0)),this.change(t))},pointerup:function(t){var n=this,r=this.options,i=this.action,a=this.pointers,l;t.changedTouches?te(t.changedTouches,function(s){l=a[s.identifier],delete a[s.identifier]}):(l=a[t.pointerId||0],delete a[t.pointerId||0]),i&&(t.preventDefault(),r.transition&&(i===an||i===_t)&&U(this.image,ce),this.action=!1,at&&i!==_t&&l&&Date.now()-l.timeStamp<500&&(clearTimeout(this.clickCanvasTimeout),clearTimeout(this.doubleClickImageTimeout),r.toggleOnDblclick&&this.viewed&&t.target===this.image?this.imageClicked?(this.imageClicked=!1,this.doubleClickImageTimeout=setTimeout(function(){fe(n.image,Jn,{originalEvent:t})},50)):(this.imageClicked=!0,this.doubleClickImageTimeout=setTimeout(function(){n.imageClicked=!1},500)):(this.imageClicked=!1,r.backdrop&&r.backdrop!=="static"&&t.target===this.canvas&&(this.clickCanvasTimeout=setTimeout(function(){fe(n.canvas,ct,{originalEvent:t})},50)))))},resize:function(){var t=this;if(!(!this.isShown||this.hiding)&&(this.fulled&&(this.close(),this.initBody(),this.open()),this.initContainer(),this.initViewer(),this.renderViewer(),this.renderList(),this.viewed&&this.initImage(function(){t.renderImage()}),this.played)){if(this.options.fullscreen&&this.fulled&&!(document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement)){this.stop();return}te(this.player.getElementsByTagName("img"),function(n){Y(n,Ee,t.loadImage.bind(t),{once:!0}),fe(n,Ee)})}},wheel:function(t){var n=this;if(this.viewed&&(t.preventDefault(),!this.wheeling)){this.wheeling=!0,setTimeout(function(){n.wheeling=!1},50);var r=Number(this.options.zoomRatio)||.1,i=1;t.deltaY?i=t.deltaY>0?1:-1:t.wheelDelta?i=-t.wheelDelta/120:t.detail&&(i=t.detail>0?1:-1),this.zoom(-i*r,!0,null,t)}}},ll={show:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,n=this.element,r=this.options;if(r.inline||this.showing||this.isShown||this.showing)return this;if(!this.ready)return this.build(),this.ready&&this.show(t),this;if(J(r.show)&&Y(n,So,r.show,{once:!0}),fe(n,So)===!1||!this.ready)return this;this.hiding&&this.transitioning.abort(),this.showing=!0,this.open();var i=this.viewer;if(X(i,He),i.setAttribute("role","dialog"),i.setAttribute("aria-labelledby",this.title.id),i.setAttribute("aria-modal",!0),i.removeAttribute("aria-hidden"),r.transition&&!t){var a=this.shown.bind(this);this.transitioning={abort:function(){ee(i,ke,a),X(i,Se)}},U(i,ce),i.initialOffsetWidth=i.offsetWidth,Y(i,ke,a,{once:!0}),U(i,Se)}else U(i,Se),this.shown();return this},hide:function(){var t=this,n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,r=this.element,i=this.options;if(i.inline||this.hiding||!(this.isShown||this.showing))return this;if(J(i.hide)&&Y(r,To,i.hide,{once:!0}),fe(r,To)===!1)return this;this.showing&&this.transitioning.abort(),this.hiding=!0,this.played?this.stop():this.viewing&&this.viewing.abort();var a=this.viewer,l=this.image,s=function(){X(a,Se),t.hidden()};if(i.transition&&!n){var c=function d(f){f&&f.target===a&&(ee(a,ke,d),t.hidden())},u=function(){pt(a,ce)?(Y(a,ke,c),X(a,Se)):s()};this.transitioning={abort:function(){t.viewed&&pt(l,ce)?ee(l,ke,u):pt(a,ce)&&ee(a,ke,c)}},this.viewed&&pt(l,ce)?(Y(l,ke,u,{once:!0}),this.zoomTo(0,!1,null,null,!0)):u()}else s();return this},view:function(){var t=this,n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.initialViewIndex;if(n=Number(n)||0,this.hiding||this.played||n<0||n>=this.length||this.viewed&&n===this.index)return this;if(!this.isShown)return this.index=n,this.show();this.viewing&&this.viewing.abort();var r=this.element,i=this.options,a=this.title,l=this.canvas,s=this.items[n],c=s.querySelector("img"),u=ht(c,"originalUrl"),d=c.getAttribute("alt"),f=document.createElement("img");if(te(i.inheritedAttributes,function(w){var v=c.getAttribute(w);v!==null&&f.setAttribute(w,v)}),f.src=u,f.alt=d,J(i.view)&&Y(r,_o,i.view,{once:!0}),fe(r,_o,{originalImage:this.images[n],index:n,image:f})===!1||!this.isShown||this.hiding||this.played)return this;var h=this.items[this.index];h&&(X(h,sn),h.removeAttribute("aria-selected")),U(s,sn),s.setAttribute("aria-selected",!0),i.focus&&s.focus(),this.image=f,this.viewed=!1,this.index=n,this.imageData={},U(f,At),i.loading&&U(l,st),l.innerHTML="",l.appendChild(f),this.renderList(),a.innerHTML="";var p=function(){var v=t.imageData,_=Array.isArray(i.title)?i.title[1]:i.title;a.innerHTML=Js(J(_)?_.call(t,f,v):"".concat(d," (").concat(v.naturalWidth," × ").concat(v.naturalHeight,")"))},C,m;return Y(r,$t,p,{once:!0}),this.viewing={abort:function(){ee(r,$t,p),f.complete?t.imageRendering?t.imageRendering.abort():t.imageInitializing&&t.imageInitializing.abort():(f.src="",ee(f,Ee,C),t.timeout&&clearTimeout(t.timeout))}},f.complete?this.load():(Y(f,Ee,C=function(){ee(f,Ge,m),t.load()},{once:!0}),Y(f,Ge,m=function(){ee(f,Ee,C),t.timeout&&(clearTimeout(t.timeout),t.timeout=!1),X(f,At),i.loading&&X(t.canvas,st)},{once:!0}),this.timeout&&clearTimeout(this.timeout),this.timeout=setTimeout(function(){X(f,At),t.timeout=!1},1e3)),this},prev:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,n=this.index-1;return n<0&&(n=t?this.length-1:0),this.view(n),this},next:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,n=this.length-1,r=this.index+1;return r>n&&(r=t?0:n),this.view(r),this},move:function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t,r=this.imageData;return this.moveTo(ut(t)?t:r.x+Number(t),ut(n)?n:r.y+Number(n)),this},moveTo:function(t){var n=this,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,a=this.element,l=this.options,s=this.imageData;if(t=Number(t),r=Number(r),this.viewed&&!this.played&&l.movable){var c=s.x,u=s.y,d=!1;if(se(t)?d=!0:t=c,se(r)?d=!0:r=u,d){if(J(l.move)&&Y(a,Ao,l.move,{once:!0}),fe(a,Ao,{x:t,y:r,oldX:c,oldY:u,originalEvent:i})===!1)return this;s.x=t,s.y=r,s.left=t,s.top=r,this.moving=!0,this.renderImage(function(){n.moving=!1,J(l.moved)&&Y(a,$o,l.moved,{once:!0}),fe(a,$o,{x:t,y:r,oldX:c,oldY:u,originalEvent:i},{cancelable:!1})})}}return this},rotate:function(t){return this.rotateTo((this.imageData.rotate||0)+Number(t)),this},rotateTo:function(t){var n=this,r=this.element,i=this.options,a=this.imageData;if(t=Number(t),se(t)&&this.viewed&&!this.played&&i.rotatable){var l=a.rotate;if(J(i.rotate)&&Y(r,ko,i.rotate,{once:!0}),fe(r,ko,{degree:t,oldDegree:l})===!1)return this;a.rotate=t,this.rotating=!0,this.renderImage(function(){n.rotating=!1,J(i.rotated)&&Y(r,No,i.rotated,{once:!0}),fe(r,No,{degree:t,oldDegree:l},{cancelable:!1})})}return this},scaleX:function(t){return this.scale(t,this.imageData.scaleY),this},scaleY:function(t){return this.scale(this.imageData.scaleX,t),this},scale:function(t){var n=this,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t,i=this.element,a=this.options,l=this.imageData;if(t=Number(t),r=Number(r),this.viewed&&!this.played&&a.scalable){var s=l.scaleX,c=l.scaleY,u=!1;if(se(t)?u=!0:t=s,se(r)?u=!0:r=c,u){if(J(a.scale)&&Y(i,Po,a.scale,{once:!0}),fe(i,Po,{scaleX:t,scaleY:r,oldScaleX:s,oldScaleY:c})===!1)return this;l.scaleX=t,l.scaleY=r,this.scaling=!0,this.renderImage(function(){n.scaling=!1,J(a.scaled)&&Y(i,Io,a.scaled,{once:!0}),fe(i,Io,{scaleX:t,scaleY:r,oldScaleX:s,oldScaleY:c},{cancelable:!1})})}}return this},zoom:function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null,a=this.imageData;return t=Number(t),t<0?t=1/(1-t):t=1+t,this.zoomTo(a.width*t/a.naturalWidth,n,r,i),this},zoomTo:function(t){var n=this,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null,l=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1,s=this.element,c=this.options,u=this.pointers,d=this.imageData,f=d.x,h=d.y,p=d.width,C=d.height,m=d.naturalWidth,w=d.naturalHeight;if(t=Math.max(0,t),se(t)&&this.viewed&&!this.played&&(l||c.zoomable)){if(!l){var v=Math.max(.01,c.minZoomRatio),_=Math.min(100,c.maxZoomRatio);t=Math.min(Math.max(t,v),_)}if(a)switch(a.type){case"wheel":c.zoomRatio>=.055&&t>.95&&t<1.05&&(t=1);break;case"pointermove":case"touchmove":case"mousemove":t>.99&&t<1.01&&(t=1);break}var b=m*t,k=w*t,S=b-p,T=k-C,O=d.ratio;if(J(c.zoom)&&Y(s,Do,c.zoom,{once:!0}),fe(s,Do,{ratio:t,oldRatio:O,originalEvent:a})===!1)return this;if(this.zooming=!0,a){var A=tl(this.viewer),g=u&&Object.keys(u).length>0?ol(u):{pageX:a.pageX,pageY:a.pageY};d.x-=S*((g.pageX-A.left-f)/p),d.y-=T*((g.pageY-A.top-h)/C)}else dt(i)&&se(i.x)&&se(i.y)?(d.x-=S*((i.x-f)/p),d.y-=T*((i.y-h)/C)):(d.x-=S/2,d.y-=T/2);d.left=d.x,d.top=d.y,d.width=b,d.height=k,d.oldRatio=O,d.ratio=t,this.renderImage(function(){n.zooming=!1,J(c.zoomed)&&Y(s,Ro,c.zoomed,{once:!0}),fe(s,Ro,{ratio:t,oldRatio:O,originalEvent:a},{cancelable:!1})}),r&&this.tooltip()}return this},play:function(){var t=this,n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;if(!this.isShown||this.played)return this;var r=this.element,i=this.options;if(J(i.play)&&Y(r,Bo,i.play,{once:!0}),fe(r,Bo)===!1)return this;var a=this.player,l=this.loadImage.bind(this),s=[],c=0,u=0;if(this.played=!0,this.onLoadWhenPlay=l,n&&this.requestFullscreen(n),U(a,lt),te(this.items,function(h,p){var C=h.querySelector("img"),m=document.createElement("img");m.src=ht(C,"originalUrl"),m.alt=C.getAttribute("alt"),m.referrerPolicy=C.referrerPolicy,c+=1,U(m,ln),Nt(m,ce,i.transition),pt(h,sn)&&(U(m,Se),u=p),s.push(m),Y(m,Ee,l,{once:!0}),a.appendChild(m)}),se(i.interval)&&i.interval>0){var d=function h(){clearTimeout(t.playing.timeout),X(s[u],Se),u-=1,u=u>=0?u:c-1,U(s[u],Se),t.playing.timeout=setTimeout(h,i.interval)},f=function h(){clearTimeout(t.playing.timeout),X(s[u],Se),u+=1,u=u<c?u:0,U(s[u],Se),t.playing.timeout=setTimeout(h,i.interval)};c>1&&(this.playing={prev:d,next:f,timeout:setTimeout(f,i.interval)})}return this},stop:function(){var t=this;if(!this.played)return this;var n=this.element,r=this.options;if(J(r.stop)&&Y(n,Mo,r.stop,{once:!0}),fe(n,Mo)===!1)return this;var i=this.player;return clearTimeout(this.playing.timeout),this.playing=!1,this.played=!1,te(i.getElementsByTagName("img"),function(a){ee(a,Ee,t.onLoadWhenPlay)}),X(i,lt),i.innerHTML="",this.exitFullscreen(),this},full:function(){var t=this,n=this.options,r=this.viewer,i=this.image,a=this.list;return!this.isShown||this.played||this.fulled||!n.inline?this:(this.fulled=!0,this.open(),U(this.button,uo),n.transition&&(X(a,ce),this.viewed&&X(i,ce)),U(r,Zn),r.setAttribute("role","dialog"),r.setAttribute("aria-labelledby",this.title.id),r.setAttribute("aria-modal",!0),r.removeAttribute("style"),Ne(r,{zIndex:n.zIndex}),n.focus&&this.enforceFocus(),this.initContainer(),this.viewerData=be({},this.containerData),this.renderList(),this.viewed&&this.initImage(function(){t.renderImage(function(){n.transition&&setTimeout(function(){U(i,ce),U(a,ce)},0)})}),this)},exit:function(){var t=this,n=this.options,r=this.viewer,i=this.image,a=this.list;return!this.isShown||this.played||!this.fulled||!n.inline?this:(this.fulled=!1,this.close(),X(this.button,uo),n.transition&&(X(a,ce),this.viewed&&X(i,ce)),n.focus&&this.clearEnforceFocus(),r.removeAttribute("role"),r.removeAttribute("aria-labelledby"),r.removeAttribute("aria-modal"),X(r,Zn),Ne(r,{zIndex:n.zIndexInline}),this.viewerData=be({},this.parentData),this.renderViewer(),this.renderList(),this.viewed&&this.initImage(function(){t.renderImage(function(){n.transition&&setTimeout(function(){U(i,ce),U(a,ce)},0)})}),this)},tooltip:function(){var t=this,n=this.options,r=this.tooltipBox,i=this.imageData;return!this.viewed||this.played||!n.tooltip?this:(r.textContent="".concat(Math.round(i.ratio*100),"%"),this.tooltipping?clearTimeout(this.tooltipping):n.transition?(this.fading&&fe(r,ke),U(r,lt),U(r,ln),U(r,ce),r.removeAttribute("aria-hidden"),r.initialOffsetWidth=r.offsetWidth,U(r,Se)):(U(r,lt),r.removeAttribute("aria-hidden")),this.tooltipping=setTimeout(function(){n.transition?(Y(r,ke,function(){X(r,lt),X(r,ln),X(r,ce),r.setAttribute("aria-hidden",!0),t.fading=!1},{once:!0}),X(r,Se),t.fading=!0):(X(r,lt),r.setAttribute("aria-hidden",!0)),t.tooltipping=!1},1e3),this)},toggle:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null;return this.imageData.ratio===1?this.zoomTo(this.imageData.oldRatio,!0,null,t):this.zoomTo(1,!0,null,t),this},reset:function(){return this.viewed&&!this.played&&(this.imageData=be({},this.initialImageData),this.renderImage()),this},update:function(){var t=this,n=this.element,r=this.options,i=this.isImg;if(i&&!n.parentNode)return this.destroy();var a=[];if(te(i?[n]:n.querySelectorAll("img"),function(u){J(r.filter)?r.filter.call(t,u)&&a.push(u):t.getImageURL(u)&&a.push(u)}),!a.length)return this;if(this.images=a,this.length=a.length,this.ready){var l=[];if(te(this.items,function(u,d){var f=u.querySelector("img"),h=a[d];h&&f?(h.src!==f.src||h.alt!==f.alt)&&l.push(d):l.push(d)}),Ne(this.list,{width:"auto"}),this.initList(),this.isShown)if(this.length){if(this.viewed){var s=l.indexOf(this.index);if(s>=0)this.viewed=!1,this.view(Math.max(Math.min(this.index-s,this.length-1),0));else{var c=this.items[this.index];U(c,sn),c.setAttribute("aria-selected",!0)}}}else this.image=null,this.viewed=!1,this.index=0,this.imageData={},this.canvas.innerHTML="",this.title.innerHTML=""}else this.build();return this},destroy:function(){var t=this.element,n=this.options;return t[G]?(this.destroyed=!0,this.ready?(this.played&&this.stop(),n.inline?(this.fulled&&this.exit(),this.unbind()):this.isShown?(this.viewing&&(this.imageRendering?this.imageRendering.abort():this.imageInitializing&&this.imageInitializing.abort()),this.hiding&&this.transitioning.abort(),this.hidden()):this.showing&&(this.transitioning.abort(),this.hidden()),this.ready=!1,this.viewer.parentNode.removeChild(this.viewer)):n.inline&&(this.delaying?this.delaying.abort():this.initializing&&this.initializing.abort()),n.inline||ee(t,ct,this.onStart),t[G]=void 0,this):this}},cl={getImageURL:function(t){var n=this.options.url;return kt(n)?n=t.getAttribute(n):J(n)?n=n.call(this,t):n="",n},enforceFocus:function(){var t=this;this.clearEnforceFocus(),Y(document,ho,this.onFocusin=function(n){var r=t.viewer,i=n.target;if(!(i===document||i===r||r.contains(i))){for(;i;){if(i.getAttribute("tabindex")!==null||i.getAttribute("aria-modal")==="true")return;i=i.parentElement}r.focus()}})},clearEnforceFocus:function(){this.onFocusin&&(ee(document,ho,this.onFocusin),this.onFocusin=null)},open:function(){var t=this.body;U(t,fo),this.scrollbarWidth>0&&(t.style.paddingRight="".concat(this.scrollbarWidth+(parseFloat(this.initialBodyComputedPaddingRight)||0),"px"))},close:function(){var t=this.body;X(t,fo),this.scrollbarWidth>0&&(t.style.paddingRight=this.initialBodyPaddingRight)},shown:function(){var t=this.element,n=this.options,r=this.viewer;this.fulled=!0,this.isShown=!0,this.render(),this.bind(),this.showing=!1,n.focus&&(r.focus(),this.enforceFocus()),J(n.shown)&&Y(t,Eo,n.shown,{once:!0}),fe(t,Eo)!==!1&&this.ready&&this.isShown&&!this.hiding&&this.view(this.index)},hidden:function(){var t=this.element,n=this.options,r=this.viewer;n.fucus&&this.clearEnforceFocus(),this.close(),this.unbind(),U(r,He),r.removeAttribute("role"),r.removeAttribute("aria-labelledby"),r.removeAttribute("aria-modal"),r.setAttribute("aria-hidden",!0),this.resetList(),this.resetImage(),this.fulled=!1,this.viewed=!1,this.isShown=!1,this.hiding=!1,this.destroyed||(J(n.hidden)&&Y(t,Oo,n.hidden,{once:!0}),fe(t,Oo,null,{cancelable:!1}))},requestFullscreen:function(t){var n=this.element.ownerDocument;if(this.fulled&&!(n.fullscreenElement||n.webkitFullscreenElement||n.mozFullScreenElement||n.msFullscreenElement)){var r=n.documentElement;r.requestFullscreen?dt(t)?r.requestFullscreen(t):r.requestFullscreen():r.webkitRequestFullscreen?r.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT):r.mozRequestFullScreen?r.mozRequestFullScreen():r.msRequestFullscreen&&r.msRequestFullscreen()}},exitFullscreen:function(){var t=this.element.ownerDocument;this.fulled&&(t.fullscreenElement||t.webkitFullscreenElement||t.mozFullScreenElement||t.msFullscreenElement)&&(t.exitFullscreen?t.exitFullscreen():t.webkitExitFullscreen?t.webkitExitFullscreen():t.mozCancelFullScreen?t.mozCancelFullScreen():t.msExitFullscreen&&t.msExitFullscreen())},change:function(t){var n=this.options,r=this.pointers,i=r[Object.keys(r)[0]];if(i){var a=i.endX-i.startX,l=i.endY-i.startY;switch(this.action){case an:(a!==0||l!==0)&&(this.pointerMoved=!0,this.move(a,l,t));break;case _t:this.zoom(rl(r),!1,null,t);break;case co:{this.action="switched";var s=Math.abs(a);s>1&&s>Math.abs(l)&&(this.pointers={},a>1?this.prev(n.loop):a<-1&&this.next(n.loop));break}}te(r,function(c){c.startX=c.endX,c.startY=c.endY})}},isSwitchable:function(){var t=this.imageData,n=this.viewerData;return this.length>1&&t.x>=0&&t.y>=0&&t.width<=n.width&&t.height<=n.height}},ul=Le.Viewer,fl=function(e){return function(){return e+=1,e}}(-1),Fo=function(){function e(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(Ms(this,e),!t||t.nodeType!==1)throw new Error("The first argument is required and must be an element.");this.element=t,this.options=be({},lo,dt(n)&&n),this.action=!1,this.fading=!1,this.fulled=!1,this.hiding=!1,this.imageClicked=!1,this.imageData={},this.index=this.options.initialViewIndex,this.isImg=!1,this.isShown=!1,this.length=0,this.moving=!1,this.played=!1,this.playing=!1,this.pointers={},this.ready=!1,this.rotating=!1,this.scaling=!1,this.showing=!1,this.timeout=!1,this.tooltipping=!1,this.viewed=!1,this.viewing=!1,this.wheeling=!1,this.zooming=!1,this.pointerMoved=!1,this.id=fl(),this.init()}return xs(e,[{key:"init",value:function(){var n=this,r=this.element,i=this.options;if(!r[G]){r[G]=this,i.focus&&!i.keyboard&&(i.focus=!1);var a=r.localName==="img",l=[];if(te(a?[r]:r.querySelectorAll("img"),function(u){J(i.filter)?i.filter.call(n,u)&&l.push(u):n.getImageURL(u)&&l.push(u)}),this.isImg=a,this.length=l.length,this.images=l,this.initBody(),ut(document.createElement(G).style.transition)&&(i.transition=!1),i.inline){var s=0,c=function(){if(s+=1,s===n.length){var d;n.initializing=!1,n.delaying={abort:function(){clearTimeout(d)}},d=setTimeout(function(){n.delaying=!1,n.build()},0)}};this.initializing={abort:function(){te(l,function(d){d.complete||(ee(d,Ee,c),ee(d,Ge,c))})}},te(l,function(u){if(u.complete)c();else{var d,f;Y(u,Ee,d=function(){ee(u,Ge,f),c()},{once:!0}),Y(u,Ge,f=function(){ee(u,Ee,d),c()},{once:!0})}})}else Y(r,ct,this.onStart=function(u){var d=u.target;d.localName==="img"&&(!J(i.filter)||i.filter.call(n,d))&&n.view(n.images.indexOf(d))})}}},{key:"build",value:function(){if(!this.ready){var n=this.element,r=this.options,i=n.parentNode,a=document.createElement("div");a.innerHTML=js;var l=a.querySelector(".".concat(G,"-container")),s=l.querySelector(".".concat(G,"-title")),c=l.querySelector(".".concat(G,"-toolbar")),u=l.querySelector(".".concat(G,"-navbar")),d=l.querySelector(".".concat(G,"-button")),f=l.querySelector(".".concat(G,"-canvas"));if(this.parent=i,this.viewer=l,this.title=s,this.toolbar=c,this.navbar=u,this.button=d,this.canvas=f,this.footer=l.querySelector(".".concat(G,"-footer")),this.tooltipBox=l.querySelector(".".concat(G,"-tooltip")),this.player=l.querySelector(".".concat(G,"-player")),this.list=l.querySelector(".".concat(G,"-list")),l.id="".concat(G).concat(this.id),s.id="".concat(G,"Title").concat(this.id),U(s,r.title?dn(Array.isArray(r.title)?r.title[0]:r.title):He),U(u,r.navbar?dn(r.navbar):He),Nt(d,He,!r.button),r.keyboard&&d.setAttribute("tabindex",0),r.backdrop&&(U(l,"".concat(G,"-backdrop")),!r.inline&&r.backdrop!=="static"&&nr(f,cn,"hide")),kt(r.className)&&r.className&&r.className.split(er).forEach(function(b){U(l,b)}),r.toolbar){var h=document.createElement("ul"),p=dt(r.toolbar),C=un.slice(0,3),m=un.slice(7,9),w=un.slice(9);p||U(c,dn(r.toolbar)),te(p?r.toolbar:un,function(b,k){var S=p&&dt(b),T=p?tr(k):b,O=S&&!ut(b.show)?b.show:b;if(!(!O||!r.zoomable&&C.indexOf(T)!==-1||!r.rotatable&&m.indexOf(T)!==-1||!r.scalable&&w.indexOf(T)!==-1)){var A=S&&!ut(b.size)?b.size:b,g=S&&!ut(b.click)?b.click:b,y=document.createElement("li");r.keyboard&&y.setAttribute("tabindex",0),y.setAttribute("role","button"),U(y,"".concat(G,"-").concat(T)),J(g)||nr(y,cn,T),se(O)&&U(y,dn(O)),["small","large"].indexOf(A)!==-1?U(y,"".concat(G,"-").concat(A)):T==="play"&&U(y,"".concat(G,"-large")),J(g)&&Y(y,ct,g),h.appendChild(y)}}),c.appendChild(h)}else U(c,He);if(!r.rotatable){var v=c.querySelectorAll('li[class*="rotate"]');U(v,At),te(v,function(b){c.appendChild(b)})}if(r.inline)U(d,Ks),Ne(l,{zIndex:r.zIndexInline}),window.getComputedStyle(i).position==="static"&&Ne(i,{position:"relative"}),i.insertBefore(l,n.nextSibling);else{U(d,zs),U(l,Zn),U(l,ln),U(l,He),Ne(l,{zIndex:r.zIndex});var _=r.container;kt(_)&&(_=n.ownerDocument.querySelector(_)),_||(_=this.body),_.appendChild(l)}if(r.inline&&(this.render(),this.bind(),this.isShown=!0),this.ready=!0,J(r.ready)&&Y(n,Co,r.ready,{once:!0}),fe(n,Co)===!1){this.ready=!1;return}this.ready&&r.inline&&this.view(this.index)}}}],[{key:"noConflict",value:function(){return window.Viewer=ul,e}},{key:"setDefaults",value:function(n){be(lo,dt(n)&&n)}}]),e}();be(Fo.prototype,il,al,sl,ll,cl);var dl=typeof global=="object"&&global&&global.Object===Object&&global;const jo=dl;var pl=typeof self=="object"&&self&&self.Object===Object&&self,hl=jo||pl||Function("return this")();const or=hl;var ml=or.Symbol;const hn=ml;var zo=Object.prototype,gl=zo.hasOwnProperty,yl=zo.toString,Pt=hn?hn.toStringTag:void 0;function bl(e){var t=gl.call(e,Pt),n=e[Pt];try{e[Pt]=void 0;var r=!0}catch{}var i=yl.call(e);return r&&(t?e[Pt]=n:delete e[Pt]),i}var wl=Object.prototype,vl=wl.toString;function Cl(e){return vl.call(e)}var Sl="[object Null]",El="[object Undefined]",Ko=hn?hn.toStringTag:void 0;function ir(e){return e==null?e===void 0?El:Sl:Ko&&Ko in Object(e)?bl(e):Cl(e)}function ar(e){return e!=null&&typeof e=="object"}var Tl=Array.isArray;const Ol=Tl;function mn(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}function Vo(e){return e}var _l="[object AsyncFunction]",Al="[object Function]",$l="[object GeneratorFunction]",kl="[object Proxy]";function Uo(e){if(!mn(e))return!1;var t=ir(e);return t==Al||t==$l||t==_l||t==kl}var Nl=or["__core-js_shared__"];const sr=Nl;var Yo=function(){var e=/[^.]+$/.exec(sr&&sr.keys&&sr.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function Pl(e){return!!Yo&&Yo in e}var Il=Function.prototype,Dl=Il.toString;function Rl(e){if(e!=null){try{return Dl.call(e)}catch{}try{return e+""}catch{}}return""}var Bl=/[\\^$.*+?()[\]{}|]/g,Ml=/^\[object .+?Constructor\]$/,xl=Function.prototype,Ll=Object.prototype,Fl=xl.toString,jl=Ll.hasOwnProperty,zl=RegExp("^"+Fl.call(jl).replace(Bl,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Kl(e){if(!mn(e)||Pl(e))return!1;var t=Uo(e)?zl:Ml;return t.test(Rl(e))}function Vl(e,t){return e==null?void 0:e[t]}function Ul(e,t){var n=Vl(e,t);return Kl(n)?n:void 0}function Yl(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}var Wl=800,Hl=16,Gl=Date.now;function ql(e){var t=0,n=0;return function(){var r=Gl(),i=Hl-(r-n);if(n=r,i>0){if(++t>=Wl)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function Xl(e){return function(){return e}}var Ql=function(){try{var e=Ul(Object,"defineProperty");return e({},"",{}),e}catch{}}();const gn=Ql;var Zl=gn?function(e,t){return gn(e,"toString",{configurable:!0,enumerable:!1,value:Xl(t),writable:!0})}:Vo,Jl=ql(Zl);const ec=Jl;var tc=9007199254740991,nc=/^(?:0|[1-9]\d*)$/;function Wo(e,t){var n=typeof e;return t=t??tc,!!t&&(n=="number"||n!="symbol"&&nc.test(e))&&e>-1&&e%1==0&&e<t}function Ho(e,t,n){t=="__proto__"&&gn?gn(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function lr(e,t){return e===t||e!==e&&t!==t}var rc=Object.prototype,oc=rc.hasOwnProperty;function Go(e,t,n){var r=e[t];(!(oc.call(e,t)&&lr(r,n))||n===void 0&&!(t in e))&&Ho(e,t,n)}function ic(e,t,n,r){var i=!n;n||(n={});for(var a=-1,l=t.length;++a<l;){var s=t[a],c=r?r(n[s],e[s],s,n,e):void 0;c===void 0&&(c=e[s]),i?Ho(n,s,c):Go(n,s,c)}return n}var qo=Math.max;function ac(e,t,n){return t=qo(t===void 0?e.length-1:t,0),function(){for(var r=arguments,i=-1,a=qo(r.length-t,0),l=Array(a);++i<a;)l[i]=r[t+i];i=-1;for(var s=Array(t+1);++i<t;)s[i]=r[i];return s[t]=n(l),Yl(e,this,s)}}function Xo(e,t){return ec(ac(e,t,Vo),e+"")}var sc=9007199254740991;function Qo(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=sc}function yn(e){return e!=null&&Qo(e.length)&&!Uo(e)}function Zo(e,t,n){if(!mn(n))return!1;var r=typeof t;return(r=="number"?yn(n)&&Wo(t,n.length):r=="string"&&t in n)?lr(n[t],e):!1}function lc(e){return Xo(function(t,n){var r=-1,i=n.length,a=i>1?n[i-1]:void 0,l=i>2?n[2]:void 0;for(a=e.length>3&&typeof a=="function"?(i--,a):void 0,l&&Zo(n[0],n[1],l)&&(a=i<3?void 0:a,i=1),t=Object(t);++r<i;){var s=n[r];s&&e(t,s,r,a)}return t})}var cc=Object.prototype;function cr(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||cc;return e===n}function uc(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var fc="[object Arguments]";function Jo(e){return ar(e)&&ir(e)==fc}var ei=Object.prototype,dc=ei.hasOwnProperty,pc=ei.propertyIsEnumerable,hc=Jo(function(){return arguments}())?Jo:function(e){return ar(e)&&dc.call(e,"callee")&&!pc.call(e,"callee")};const mc=hc;function gc(){return!1}var ti=typeof H=="object"&&H&&!H.nodeType&&H,ni=ti&&typeof module=="object"&&module&&!module.nodeType&&module,yc=ni&&ni.exports===ti,ri=yc?or.Buffer:void 0,bc=ri?ri.isBuffer:void 0,wc=bc||gc;const vc=wc;var Cc="[object Arguments]",Sc="[object Array]",Ec="[object Boolean]",Tc="[object Date]",Oc="[object Error]",_c="[object Function]",Ac="[object Map]",$c="[object Number]",kc="[object Object]",Nc="[object RegExp]",Pc="[object Set]",Ic="[object String]",Dc="[object WeakMap]",Rc="[object ArrayBuffer]",Bc="[object DataView]",Mc="[object Float32Array]",xc="[object Float64Array]",Lc="[object Int8Array]",Fc="[object Int16Array]",jc="[object Int32Array]",zc="[object Uint8Array]",Kc="[object Uint8ClampedArray]",Vc="[object Uint16Array]",Uc="[object Uint32Array]",re={};re[Mc]=re[xc]=re[Lc]=re[Fc]=re[jc]=re[zc]=re[Kc]=re[Vc]=re[Uc]=!0,re[Cc]=re[Sc]=re[Rc]=re[Ec]=re[Bc]=re[Tc]=re[Oc]=re[_c]=re[Ac]=re[$c]=re[kc]=re[Nc]=re[Pc]=re[Ic]=re[Dc]=!1;function Yc(e){return ar(e)&&Qo(e.length)&&!!re[ir(e)]}function Wc(e){return function(t){return e(t)}}var oi=typeof H=="object"&&H&&!H.nodeType&&H,It=oi&&typeof module=="object"&&module&&!module.nodeType&&module,Hc=It&&It.exports===oi,ur=Hc&&jo.process,Gc=function(){try{var e=It&&It.require&&It.require("util").types;return e||ur&&ur.binding&&ur.binding("util")}catch{}}();const ii=Gc;var ai=ii&&ii.isTypedArray,qc=ai?Wc(ai):Yc;const Xc=qc;var Qc=Object.prototype,Zc=Qc.hasOwnProperty;function si(e,t){var n=Ol(e),r=!n&&mc(e),i=!n&&!r&&vc(e),a=!n&&!r&&!i&&Xc(e),l=n||r||i||a,s=l?uc(e.length,String):[],c=s.length;for(var u in e)(t||Zc.call(e,u))&&!(l&&(u=="length"||i&&(u=="offset"||u=="parent")||a&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||Wo(u,c)))&&s.push(u);return s}function Jc(e,t){return function(n){return e(t(n))}}var eu=Jc(Object.keys,Object);const tu=eu;var nu=Object.prototype,ru=nu.hasOwnProperty;function ou(e){if(!cr(e))return tu(e);var t=[];for(var n in Object(e))ru.call(e,n)&&n!="constructor"&&t.push(n);return t}function iu(e){return yn(e)?si(e):ou(e)}var au=Object.prototype,su=au.hasOwnProperty;lc(function(e,t){if(cr(t)||yn(t)){ic(t,iu(t),e);return}for(var n in t)su.call(t,n)&&Go(e,n,t[n])});function lu(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var cu=Object.prototype,uu=cu.hasOwnProperty;function fu(e){if(!mn(e))return lu(e);var t=cr(e),n=[];for(var r in e)r=="constructor"&&(t||!uu.call(e,r))||n.push(r);return n}function du(e){return yn(e)?si(e,!0):fu(e)}var li=Object.prototype,pu=li.hasOwnProperty;Xo(function(e,t){e=Object(e);var n=-1,r=t.length,i=r>2?t[2]:void 0;for(i&&Zo(t[0],t[1],i)&&(r=1);++n<r;)for(var a=t[n],l=du(a),s=-1,c=l.length;++s<c;){var u=l[s],d=e[u];(d===void 0||lr(d,li[u])&&!pu.call(e,u))&&(e[u]=a[u])}return e});const hu=o.defineComponent({name:"Viewer",props:{images:{type:Array,default:()=>[]},rebuild:{type:Boolean,default:!1},trigger:{type:Object,default:null},options:{type:Object,default:()=>null}},emits:["inited"],setup(e,{emit:t}){let n;const r=o.ref();function i(){n=new Fo(r.value,e.options),t("inited",n)}function a(){n&&n.destroy()}function l(){a(),i()}function s(){n?(n.update(),t("inited",n)):i()}function c(){e.rebuild?l():s()}const u={deep:!0};return o.watch(()=>e.images,()=>{o.nextTick(()=>{c()})},u),o.watch(()=>e.trigger,()=>{o.nextTick(()=>{c()})},u),o.watch(()=>e.options,()=>{o.nextTick(()=>{l()})},u),o.onMounted(()=>i()),o.onUnmounted(()=>a()),{root:r,createViewer:i,rebuildViewer:l,updateViewer:s,destroyViewer:a}}}),mu=(e,t)=>{const n=e.__vccOpts||e;for(const[r,i]of t)n[r]=i;return n},gu={ref:"root"};function yu(e,t,n,r,i,a){return o.openBlock(),o.createElementBlock("div",gu,[o.renderSlot(e.$slots,"default",{images:e.images,options:e.options})],512)}const bu=mu(hu,[["render",yu]]),wu={style:{height:"800px",overflow:"hidden"}},vu=["src"],[Cu]=St("preview-media-modal"),Su={name:Cu},fr=o.defineComponent({...Su,props:{show:{type:Boolean},imageList:{},imageIndex:{}},emits:["update:show"],setup(e,{expose:t,emit:n}){const r=e,i=E=>n("update:show",E),a=o.ref(null),l={transition:!1,inline:!0,button:!1,toolbar:{rotateLeft:!0,prev:!0,oneToOne:!0,next:!0,rotateRight:!0}},s=o.ref(!1),c=o.ref([]),u=o.ref(0);o.watch([()=>r.imageList,()=>r.imageIndex],()=>{r.imageList&&(c.value=[...r.imageList],u.value=r.imageIndex||0)}),o.watch(()=>r.show,()=>{s.value=r.show});const d=E=>{a.value=E,E.view(u.value)},f=o.ref(null),{x:h,y:p,isDragging:C}=_s(f),m=o.ref(0),w=o.ref(0),v=o.ref(!1),_=o.ref(0),b=o.ref(0),k=o.ref(0),S=o.ref(0),T=o.ref({left:0,right:0,top:0,bottom:0});o.watch([h,p],()=>{if(!v.value){m.value=h.value,w.value=p.value;const E=document.body.getBoundingClientRect(),B=f.value.getBoundingClientRect();T.value.right=E.width-B.width,T.value.bottom=E.height-B.height,k.value=_.value,S.value=b.value}v.value=!0}),o.watch(C,()=>{C||(v.value=!1)}),o.watchEffect(()=>{v.value&&(_.value=k.value+Math.min(Math.max(T.value.left,h.value),T.value.right)-m.value,b.value=S.value+Math.min(Math.max(T.value.top,p.value),T.value.bottom)-w.value)});const O=o.computed(()=>({transform:`translate(${_.value}px, ${b.value}px)`})),A=(E,B=0)=>{c.value=[...E],u.value=B,s.value=!0},g=()=>{s.value=!1},y=()=>{i(!1)};return t({open:A,close:g}),(E,B)=>(o.openBlock(),o.createBlock(o.unref(z.Modal),{visible:s.value,"onUpdate:visible":B[0]||(B[0]=j=>s.value=j),"destroy-on-close":"",centered:"",width:800,mask:!1,"mask-closable":!1,"wrap-class-name":"pointer-events-none preview-media-modal","wrap-style":{overflow:"hidden"},footer:null,onOk:g,onCancel:y},{title:o.withCtx(()=>[o.createElementVNode("div",{ref_key:"modalTitleRef",ref:f,style:{width:"100%",cursor:"move"}},[o.createVNode(o.unref(ge.HolderOutlined),{style:{"margin-right":"6px"}}),o.createTextVNode("预览 ")],512)]),modalRender:o.withCtx(({originVNode:j})=>[o.createElementVNode("div",{style:o.normalizeStyle(O.value)},[(o.openBlock(),o.createBlock(o.resolveDynamicComponent(j)))],4)]),default:o.withCtx(()=>[o.createVNode(o.unref(bu),{options:l,images:c.value,onInited:d},{default:o.withCtx(j=>[o.createElementVNode("div",wu,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(j.images,M=>(o.openBlock(),o.createElementBlock("img",{style:{opacity:"0"},src:M,key:M},null,8,vu))),128))])]),_:1},8,["images"])]),_:1},8,["visible"]))}}),sw="";var Eu=typeof window<"u";function Tu(e){const t=o.getCurrentInstance();t&&Wn(t.proxy,e)}function Ou(){const e=o.reactive({show:!1}),t=i=>{e.show=i},n=i=>{Wn(e,i,{transitionAppear:!0}),t(!0)},r=()=>t(!1);return Tu({open:n,close:r,toggle:t}),{open:n,close:r,state:e,toggle:t}}function _u(e){const t=o.createApp(e),n=document.createElement("div");return document.body.appendChild(n),{instance:t.mount(n),unmount(){t.unmount(),document.body.removeChild(n)}}}let bn;function Au(){({instance:bn}=_u({setup(){const{state:e,toggle:t}=Ou();return()=>o.createVNode(fr,o.mergeProps(e,{"onUpdate:show":t}),null)}}))}function $u(e,t){return Eu?(bn||Au(),bn.open({imageList:e,imageIndex:t}),bn):Promise.resolve(void 0)}const ci=Et(fr);var ku=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Nu(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ui={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(ku,function(){var n=1e3,r=6e4,i=36e5,a="millisecond",l="second",s="minute",c="hour",u="day",d="week",f="month",h="quarter",p="year",C="date",m="Invalid Date",w=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,v=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,_={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(M){var R=["th","st","nd","rd"],N=M%100;return"["+M+(R[(N-20)%10]||R[N]||R[0])+"]"}},b=function(M,R,N){var D=String(M);return!D||D.length>=R?M:""+Array(R+1-D.length).join(N)+M},k={s:b,z:function(M){var R=-M.utcOffset(),N=Math.abs(R),D=Math.floor(N/60),P=N%60;return(R<=0?"+":"-")+b(D,2,"0")+":"+b(P,2,"0")},m:function M(R,N){if(R.date()<N.date())return-M(N,R);var D=12*(N.year()-R.year())+(N.month()-R.month()),P=R.clone().add(D,f),K=N-P<0,V=R.clone().add(D+(K?-1:1),f);return+(-(D+(N-P)/(K?P-V:V-P))||0)},a:function(M){return M<0?Math.ceil(M)||0:Math.floor(M)},p:function(M){return{M:f,y:p,w:d,d:u,D:C,h:c,m:s,s:l,ms:a,Q:h}[M]||String(M||"").toLowerCase().replace(/s$/,"")},u:function(M){return M===void 0}},S="en",T={};T[S]=_;var O="$isDayjsObject",A=function(M){return M instanceof B||!(!M||!M[O])},g=function M(R,N,D){var P;if(!R)return S;if(typeof R=="string"){var K=R.toLowerCase();T[K]&&(P=K),N&&(T[K]=N,P=K);var V=R.split("-");if(!P&&V.length>1)return M(V[0])}else{var q=R.name;T[q]=R,P=q}return!D&&P&&(S=P),P||!D&&S},y=function(M,R){if(A(M))return M.clone();var N=typeof R=="object"?R:{};return N.date=M,N.args=arguments,new B(N)},E=k;E.l=g,E.i=A,E.w=function(M,R){return y(M,{locale:R.$L,utc:R.$u,x:R.$x,$offset:R.$offset})};var B=function(){function M(N){this.$L=g(N.locale,null,!0),this.parse(N),this.$x=this.$x||N.x||{},this[O]=!0}var R=M.prototype;return R.parse=function(N){this.$d=function(D){var P=D.date,K=D.utc;if(P===null)return new Date(NaN);if(E.u(P))return new Date;if(P instanceof Date)return new Date(P);if(typeof P=="string"&&!/Z$/i.test(P)){var V=P.match(w);if(V){var q=V[2]-1||0,ie=(V[7]||"0").substring(0,3);return K?new Date(Date.UTC(V[1],q,V[3]||1,V[4]||0,V[5]||0,V[6]||0,ie)):new Date(V[1],q,V[3]||1,V[4]||0,V[5]||0,V[6]||0,ie)}}return new Date(P)}(N),this.init()},R.init=function(){var N=this.$d;this.$y=N.getFullYear(),this.$M=N.getMonth(),this.$D=N.getDate(),this.$W=N.getDay(),this.$H=N.getHours(),this.$m=N.getMinutes(),this.$s=N.getSeconds(),this.$ms=N.getMilliseconds()},R.$utils=function(){return E},R.isValid=function(){return this.$d.toString()!==m},R.isSame=function(N,D){var P=y(N);return this.startOf(D)<=P&&P<=this.endOf(D)},R.isAfter=function(N,D){return y(N)<this.startOf(D)},R.isBefore=function(N,D){return this.endOf(D)<y(N)},R.$g=function(N,D,P){return E.u(N)?this[D]:this.set(P,N)},R.unix=function(){return Math.floor(this.valueOf()/1e3)},R.valueOf=function(){return this.$d.getTime()},R.startOf=function(N,D){var P=this,K=!!E.u(D)||D,V=E.p(N),q=function(ve,de){var Ce=E.w(P.$u?Date.UTC(P.$y,de,ve):new Date(P.$y,de,ve),P);return K?Ce:Ce.endOf(u)},ie=function(ve,de){return E.w(P.toDate()[ve].apply(P.toDate("s"),(K?[0,0,0,0]:[23,59,59,999]).slice(de)),P)},le=this.$W,ae=this.$M,ue=this.$D,he="set"+(this.$u?"UTC":"");switch(V){case p:return K?q(1,0):q(31,11);case f:return K?q(1,ae):q(0,ae+1);case d:var me=this.$locale().weekStart||0,Oe=(le<me?le+7:le)-me;return q(K?ue-Oe:ue+(6-Oe),ae);case u:case C:return ie(he+"Hours",0);case c:return ie(he+"Minutes",1);case s:return ie(he+"Seconds",2);case l:return ie(he+"Milliseconds",3);default:return this.clone()}},R.endOf=function(N){return this.startOf(N,!1)},R.$set=function(N,D){var P,K=E.p(N),V="set"+(this.$u?"UTC":""),q=(P={},P[u]=V+"Date",P[C]=V+"Date",P[f]=V+"Month",P[p]=V+"FullYear",P[c]=V+"Hours",P[s]=V+"Minutes",P[l]=V+"Seconds",P[a]=V+"Milliseconds",P)[K],ie=K===u?this.$D+(D-this.$W):D;if(K===f||K===p){var le=this.clone().set(C,1);le.$d[q](ie),le.init(),this.$d=le.set(C,Math.min(this.$D,le.daysInMonth())).$d}else q&&this.$d[q](ie);return this.init(),this},R.set=function(N,D){return this.clone().$set(N,D)},R.get=function(N){return this[E.p(N)]()},R.add=function(N,D){var P,K=this;N=Number(N);var V=E.p(D),q=function(ae){var ue=y(K);return E.w(ue.date(ue.date()+Math.round(ae*N)),K)};if(V===f)return this.set(f,this.$M+N);if(V===p)return this.set(p,this.$y+N);if(V===u)return q(1);if(V===d)return q(7);var ie=(P={},P[s]=r,P[c]=i,P[l]=n,P)[V]||1,le=this.$d.getTime()+N*ie;return E.w(le,this)},R.subtract=function(N,D){return this.add(-1*N,D)},R.format=function(N){var D=this,P=this.$locale();if(!this.isValid())return P.invalidDate||m;var K=N||"YYYY-MM-DDTHH:mm:ssZ",V=E.z(this),q=this.$H,ie=this.$m,le=this.$M,ae=P.weekdays,ue=P.months,he=P.meridiem,me=function(de,Ce,_e,Ie){return de&&(de[Ce]||de(D,K))||_e[Ce].slice(0,Ie)},Oe=function(de){return E.s(q%12||12,de,"0")},ve=he||function(de,Ce,_e){var Ie=de<12?"AM":"PM";return _e?Ie.toLowerCase():Ie};return K.replace(v,function(de,Ce){return Ce||function(_e){switch(_e){case"YY":return String(D.$y).slice(-2);case"YYYY":return E.s(D.$y,4,"0");case"M":return le+1;case"MM":return E.s(le+1,2,"0");case"MMM":return me(P.monthsShort,le,ue,3);case"MMMM":return me(ue,le);case"D":return D.$D;case"DD":return E.s(D.$D,2,"0");case"d":return String(D.$W);case"dd":return me(P.weekdaysMin,D.$W,ae,2);case"ddd":return me(P.weekdaysShort,D.$W,ae,3);case"dddd":return ae[D.$W];case"H":return String(q);case"HH":return E.s(q,2,"0");case"h":return Oe(1);case"hh":return Oe(2);case"a":return ve(q,ie,!0);case"A":return ve(q,ie,!1);case"m":return String(ie);case"mm":return E.s(ie,2,"0");case"s":return String(D.$s);case"ss":return E.s(D.$s,2,"0");case"SSS":return E.s(D.$ms,3,"0");case"Z":return V}return null}(de)||V.replace(":","")})},R.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},R.diff=function(N,D,P){var K,V=this,q=E.p(D),ie=y(N),le=(ie.utcOffset()-this.utcOffset())*r,ae=this-ie,ue=function(){return E.m(V,ie)};switch(q){case p:K=ue()/12;break;case f:K=ue();break;case h:K=ue()/3;break;case d:K=(ae-le)/6048e5;break;case u:K=(ae-le)/864e5;break;case c:K=ae/i;break;case s:K=ae/r;break;case l:K=ae/n;break;default:K=ae}return P?K:E.a(K)},R.daysInMonth=function(){return this.endOf(f).$D},R.$locale=function(){return T[this.$L]},R.locale=function(N,D){if(!N)return this.$L;var P=this.clone(),K=g(N,D,!0);return K&&(P.$L=K),P},R.clone=function(){return E.w(this.$d,this)},R.toDate=function(){return new Date(this.valueOf())},R.toJSON=function(){return this.isValid()?this.toISOString():null},R.toISOString=function(){return this.$d.toISOString()},R.toString=function(){return this.$d.toUTCString()},M}(),j=B.prototype;return y.prototype=j,[["$ms",a],["$s",l],["$m",s],["$H",c],["$W",u],["$M",f],["$y",p],["$D",C]].forEach(function(M){j[M[1]]=function(R){return this.$g(R,M[0],M[1])}}),y.extend=function(M,R){return M.$i||(M(R,B,y),M.$i=!0),y},y.locale=g,y.isDayjs=A,y.unix=function(M){return y(1e3*M)},y.en=T[S],y.Ls=T,y.p={},y})})(ui);var Pu=ui.exports;const fi=Nu(Pu);var Iu=typeof global=="object"&&global&&global.Object===Object&&global;const di=Iu;var Du=typeof self=="object"&&self&&self.Object===Object&&self,Ru=di||Du||Function("return this")();const Pe=Ru;var Bu=Pe.Symbol;const De=Bu;var pi=Object.prototype,Mu=pi.hasOwnProperty,xu=pi.toString,Dt=De?De.toStringTag:void 0;function Lu(e){var t=Mu.call(e,Dt),n=e[Dt];try{e[Dt]=void 0;var r=!0}catch{}var i=xu.call(e);return r&&(t?e[Dt]=n:delete e[Dt]),i}var Fu=Object.prototype,ju=Fu.toString;function zu(e){return ju.call(e)}var Ku="[object Null]",Vu="[object Undefined]",hi=De?De.toStringTag:void 0;function qe(e){return e==null?e===void 0?Vu:Ku:hi&&hi in Object(e)?Lu(e):zu(e)}function Fe(e){return e!=null&&typeof e=="object"}var Uu="[object Symbol]";function mt(e){return typeof e=="symbol"||Fe(e)&&qe(e)==Uu}function gt(e,t){for(var n=-1,r=e==null?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}var Yu=Array.isArray;const pe=Yu;var Wu=1/0,mi=De?De.prototype:void 0,gi=mi?mi.toString:void 0;function yi(e){if(typeof e=="string")return e;if(pe(e))return gt(e,yi)+"";if(mt(e))return gi?gi.call(e):"";var t=e+"";return t=="0"&&1/e==-Wu?"-0":t}var Hu=/\s/;function Gu(e){for(var t=e.length;t--&&Hu.test(e.charAt(t)););return t}var qu=/^\s+/;function Xu(e){return e&&e.slice(0,Gu(e)+1).replace(qu,"")}function Te(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var bi=0/0,Qu=/^[-+]0x[0-9a-f]+$/i,Zu=/^0b[01]+$/i,Ju=/^0o[0-7]+$/i,ef=parseInt;function dr(e){if(typeof e=="number")return e;if(mt(e))return bi;if(Te(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Te(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=Xu(e);var n=Zu.test(e);return n||Ju.test(e)?ef(e.slice(2),n?2:8):Qu.test(e)?bi:+e}var wi=1/0,tf=17976931348623157e292;function nf(e){if(!e)return e===0?e:0;if(e=dr(e),e===wi||e===-wi){var t=e<0?-1:1;return t*tf}return e===e?e:0}function rf(e){var t=nf(e),n=t%1;return t===t?n?t-n:t:0}function vi(e){return e}var of="[object AsyncFunction]",af="[object Function]",sf="[object GeneratorFunction]",lf="[object Proxy]";function Ci(e){if(!Te(e))return!1;var t=qe(e);return t==af||t==sf||t==of||t==lf}var cf=Pe["__core-js_shared__"];const pr=cf;var Si=function(){var e=/[^.]+$/.exec(pr&&pr.keys&&pr.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function uf(e){return!!Si&&Si in e}var ff=Function.prototype,df=ff.toString;function Xe(e){if(e!=null){try{return df.call(e)}catch{}try{return e+""}catch{}}return""}var pf=/[\\^$.*+?()[\]{}|]/g,hf=/^\[object .+?Constructor\]$/,mf=Function.prototype,gf=Object.prototype,yf=mf.toString,bf=gf.hasOwnProperty,wf=RegExp("^"+yf.call(bf).replace(pf,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function vf(e){if(!Te(e)||uf(e))return!1;var t=Ci(e)?wf:hf;return t.test(Xe(e))}function Cf(e,t){return e==null?void 0:e[t]}function Qe(e,t){var n=Cf(e,t);return vf(n)?n:void 0}var Sf=Qe(Pe,"WeakMap");const hr=Sf;var Ei=Object.create,Ef=function(){function e(){}return function(t){if(!Te(t))return{};if(Ei)return Ei(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();const Tf=Ef;function Of(){}function _f(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}var Af=function(){try{var e=Qe(Object,"defineProperty");return e({},"",{}),e}catch{}}();const Ti=Af;function $f(e,t){for(var n=-1,r=e==null?0:e.length;++n<r&&t(e[n],n,e)!==!1;);return e}function kf(e,t,n,r){for(var i=e.length,a=n+(r?1:-1);r?a--:++a<i;)if(t(e[a],a,e))return a;return-1}function Nf(e){return e!==e}function Pf(e,t,n){for(var r=n-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1}function Oi(e,t,n){return t===t?Pf(e,t,n):kf(e,Nf,n)}function If(e,t){var n=e==null?0:e.length;return!!n&&Oi(e,t,0)>-1}var Df=9007199254740991,Rf=/^(?:0|[1-9]\d*)$/;function wn(e,t){var n=typeof e;return t=t??Df,!!t&&(n=="number"||n!="symbol"&&Rf.test(e))&&e>-1&&e%1==0&&e<t}function mr(e,t,n){t=="__proto__"&&Ti?Ti(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function vn(e,t){return e===t||e!==e&&t!==t}var Bf=Object.prototype,Mf=Bf.hasOwnProperty;function gr(e,t,n){var r=e[t];(!(Mf.call(e,t)&&vn(r,n))||n===void 0&&!(t in e))&&mr(e,t,n)}function Cn(e,t,n,r){var i=!n;n||(n={});for(var a=-1,l=t.length;++a<l;){var s=t[a],c=r?r(n[s],e[s],s,n,e):void 0;c===void 0&&(c=e[s]),i?mr(n,s,c):gr(n,s,c)}return n}var xf=9007199254740991;function yr(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=xf}function yt(e){return e!=null&&yr(e.length)&&!Ci(e)}function Lf(e,t,n){if(!Te(n))return!1;var r=typeof t;return(r=="number"?yt(n)&&wn(t,n.length):r=="string"&&t in n)?vn(n[t],e):!1}var Ff=Object.prototype;function br(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||Ff;return e===n}function jf(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var zf="[object Arguments]";function _i(e){return Fe(e)&&qe(e)==zf}var Ai=Object.prototype,Kf=Ai.hasOwnProperty,Vf=Ai.propertyIsEnumerable,Uf=_i(function(){return arguments}())?_i:function(e){return Fe(e)&&Kf.call(e,"callee")&&!Vf.call(e,"callee")};const $i=Uf;function Yf(){return!1}var ki=typeof H=="object"&&H&&!H.nodeType&&H,Ni=ki&&typeof module=="object"&&module&&!module.nodeType&&module,Wf=Ni&&Ni.exports===ki,Pi=Wf?Pe.Buffer:void 0,Hf=Pi?Pi.isBuffer:void 0,Gf=Hf||Yf;const Sn=Gf;var qf="[object Arguments]",Xf="[object Array]",Qf="[object Boolean]",Zf="[object Date]",Jf="[object Error]",ed="[object Function]",td="[object Map]",nd="[object Number]",rd="[object Object]",od="[object RegExp]",id="[object Set]",ad="[object String]",sd="[object WeakMap]",ld="[object ArrayBuffer]",cd="[object DataView]",ud="[object Float32Array]",fd="[object Float64Array]",dd="[object Int8Array]",pd="[object Int16Array]",hd="[object Int32Array]",md="[object Uint8Array]",gd="[object Uint8ClampedArray]",yd="[object Uint16Array]",bd="[object Uint32Array]",oe={};oe[ud]=oe[fd]=oe[dd]=oe[pd]=oe[hd]=oe[md]=oe[gd]=oe[yd]=oe[bd]=!0,oe[qf]=oe[Xf]=oe[ld]=oe[Qf]=oe[cd]=oe[Zf]=oe[Jf]=oe[ed]=oe[td]=oe[nd]=oe[rd]=oe[od]=oe[id]=oe[ad]=oe[sd]=!1;function wd(e){return Fe(e)&&yr(e.length)&&!!oe[qe(e)]}function En(e){return function(t){return e(t)}}var Ii=typeof H=="object"&&H&&!H.nodeType&&H,Rt=Ii&&typeof module=="object"&&module&&!module.nodeType&&module,vd=Rt&&Rt.exports===Ii,wr=vd&&di.process,Cd=function(){try{var e=Rt&&Rt.require&&Rt.require("util").types;return e||wr&&wr.binding&&wr.binding("util")}catch{}}();const bt=Cd;var Di=bt&&bt.isTypedArray,Sd=Di?En(Di):wd;const Ri=Sd;var Ed=Object.prototype,Td=Ed.hasOwnProperty;function Bi(e,t){var n=pe(e),r=!n&&$i(e),i=!n&&!r&&Sn(e),a=!n&&!r&&!i&&Ri(e),l=n||r||i||a,s=l?jf(e.length,String):[],c=s.length;for(var u in e)(t||Td.call(e,u))&&!(l&&(u=="length"||i&&(u=="offset"||u=="parent")||a&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||wn(u,c)))&&s.push(u);return s}function Mi(e,t){return function(n){return e(t(n))}}var Od=Mi(Object.keys,Object);const _d=Od;var Ad=Object.prototype,$d=Ad.hasOwnProperty;function kd(e){if(!br(e))return _d(e);var t=[];for(var n in Object(e))$d.call(e,n)&&n!="constructor"&&t.push(n);return t}function wt(e){return yt(e)?Bi(e):kd(e)}function Nd(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var Pd=Object.prototype,Id=Pd.hasOwnProperty;function Dd(e){if(!Te(e))return Nd(e);var t=br(e),n=[];for(var r in e)r=="constructor"&&(t||!Id.call(e,r))||n.push(r);return n}function vr(e){return yt(e)?Bi(e,!0):Dd(e)}var Rd=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Bd=/^\w*$/;function Cr(e,t){if(pe(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||mt(e)?!0:Bd.test(e)||!Rd.test(e)||t!=null&&e in Object(t)}var Md=Qe(Object,"create");const Bt=Md;function xd(){this.__data__=Bt?Bt(null):{},this.size=0}function Ld(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var Fd="__lodash_hash_undefined__",jd=Object.prototype,zd=jd.hasOwnProperty;function Kd(e){var t=this.__data__;if(Bt){var n=t[e];return n===Fd?void 0:n}return zd.call(t,e)?t[e]:void 0}var Vd=Object.prototype,Ud=Vd.hasOwnProperty;function Yd(e){var t=this.__data__;return Bt?t[e]!==void 0:Ud.call(t,e)}var Wd="__lodash_hash_undefined__";function Hd(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Bt&&t===void 0?Wd:t,this}function Ze(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Ze.prototype.clear=xd,Ze.prototype.delete=Ld,Ze.prototype.get=Kd,Ze.prototype.has=Yd,Ze.prototype.set=Hd;function Gd(){this.__data__=[],this.size=0}function Tn(e,t){for(var n=e.length;n--;)if(vn(e[n][0],t))return n;return-1}var qd=Array.prototype,Xd=qd.splice;function Qd(e){var t=this.__data__,n=Tn(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():Xd.call(t,n,1),--this.size,!0}function Zd(e){var t=this.__data__,n=Tn(t,e);return n<0?void 0:t[n][1]}function Jd(e){return Tn(this.__data__,e)>-1}function ep(e,t){var n=this.__data__,r=Tn(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function je(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}je.prototype.clear=Gd,je.prototype.delete=Qd,je.prototype.get=Zd,je.prototype.has=Jd,je.prototype.set=ep;var tp=Qe(Pe,"Map");const Mt=tp;function np(){this.size=0,this.__data__={hash:new Ze,map:new(Mt||je),string:new Ze}}function rp(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function On(e,t){var n=e.__data__;return rp(t)?n[typeof t=="string"?"string":"hash"]:n.map}function op(e){var t=On(this,e).delete(e);return this.size-=t?1:0,t}function ip(e){return On(this,e).get(e)}function ap(e){return On(this,e).has(e)}function sp(e,t){var n=On(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}function ze(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}ze.prototype.clear=np,ze.prototype.delete=op,ze.prototype.get=ip,ze.prototype.has=ap,ze.prototype.set=sp;var lp="Expected a function";function Sr(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(lp);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],a=n.cache;if(a.has(i))return a.get(i);var l=e.apply(this,r);return n.cache=a.set(i,l)||a,l};return n.cache=new(Sr.Cache||ze),n}Sr.Cache=ze;var cp=500;function up(e){var t=Sr(e,function(r){return n.size===cp&&n.clear(),r}),n=t.cache;return t}var fp=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,dp=/\\(\\)?/g,pp=up(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(fp,function(n,r,i,a){t.push(i?a.replace(dp,"$1"):r||n)}),t});const hp=pp;function mp(e){return e==null?"":yi(e)}function _n(e,t){return pe(e)?e:Cr(e,t)?[e]:hp(mp(e))}var gp=1/0;function xt(e){if(typeof e=="string"||mt(e))return e;var t=e+"";return t=="0"&&1/e==-gp?"-0":t}function An(e,t){t=_n(t,e);for(var n=0,r=t.length;e!=null&&n<r;)e=e[xt(t[n++])];return n&&n==r?e:void 0}function $n(e,t,n){var r=e==null?void 0:An(e,t);return r===void 0?n:r}function xi(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}var yp=Mi(Object.getPrototypeOf,Object);const Li=yp;function bp(){this.__data__=new je,this.size=0}function wp(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function vp(e){return this.__data__.get(e)}function Cp(e){return this.__data__.has(e)}var Sp=200;function Ep(e,t){var n=this.__data__;if(n instanceof je){var r=n.__data__;if(!Mt||r.length<Sp-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new ze(r)}return n.set(e,t),this.size=n.size,this}function Re(e){var t=this.__data__=new je(e);this.size=t.size}Re.prototype.clear=bp,Re.prototype.delete=wp,Re.prototype.get=vp,Re.prototype.has=Cp,Re.prototype.set=Ep;function Tp(e,t){return e&&Cn(t,wt(t),e)}function Op(e,t){return e&&Cn(t,vr(t),e)}var Fi=typeof H=="object"&&H&&!H.nodeType&&H,ji=Fi&&typeof module=="object"&&module&&!module.nodeType&&module,_p=ji&&ji.exports===Fi,zi=_p?Pe.Buffer:void 0,Ki=zi?zi.allocUnsafe:void 0;function Ap(e,t){if(t)return e.slice();var n=e.length,r=Ki?Ki(n):new e.constructor(n);return e.copy(r),r}function Vi(e,t){for(var n=-1,r=e==null?0:e.length,i=0,a=[];++n<r;){var l=e[n];t(l,n,e)&&(a[i++]=l)}return a}function Ui(){return[]}var $p=Object.prototype,kp=$p.propertyIsEnumerable,Yi=Object.getOwnPropertySymbols,Np=Yi?function(e){return e==null?[]:(e=Object(e),Vi(Yi(e),function(t){return kp.call(e,t)}))}:Ui;const Er=Np;function Pp(e,t){return Cn(e,Er(e),t)}var Ip=Object.getOwnPropertySymbols,Dp=Ip?function(e){for(var t=[];e;)xi(t,Er(e)),e=Li(e);return t}:Ui;const Wi=Dp;function Rp(e,t){return Cn(e,Wi(e),t)}function Hi(e,t,n){var r=t(e);return pe(e)?r:xi(r,n(e))}function Tr(e){return Hi(e,wt,Er)}function Gi(e){return Hi(e,vr,Wi)}var Bp=Qe(Pe,"DataView");const Or=Bp;var Mp=Qe(Pe,"Promise");const _r=Mp;var xp=Qe(Pe,"Set");const vt=xp;var qi="[object Map]",Lp="[object Object]",Xi="[object Promise]",Qi="[object Set]",Zi="[object WeakMap]",Ji="[object DataView]",Fp=Xe(Or),jp=Xe(Mt),zp=Xe(_r),Kp=Xe(vt),Vp=Xe(hr),Je=qe;(Or&&Je(new Or(new ArrayBuffer(1)))!=Ji||Mt&&Je(new Mt)!=qi||_r&&Je(_r.resolve())!=Xi||vt&&Je(new vt)!=Qi||hr&&Je(new hr)!=Zi)&&(Je=function(e){var t=qe(e),n=t==Lp?e.constructor:void 0,r=n?Xe(n):"";if(r)switch(r){case Fp:return Ji;case jp:return qi;case zp:return Xi;case Kp:return Qi;case Vp:return Zi}return t});const Lt=Je;var Up=Object.prototype,Yp=Up.hasOwnProperty;function Wp(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]=="string"&&Yp.call(e,"index")&&(n.index=e.index,n.input=e.input),n}var Hp=Pe.Uint8Array;const kn=Hp;function Ar(e){var t=new e.constructor(e.byteLength);return new kn(t).set(new kn(e)),t}function Gp(e,t){var n=t?Ar(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}var qp=/\w*$/;function Xp(e){var t=new e.constructor(e.source,qp.exec(e));return t.lastIndex=e.lastIndex,t}var ea=De?De.prototype:void 0,ta=ea?ea.valueOf:void 0;function Qp(e){return ta?Object(ta.call(e)):{}}function Zp(e,t){var n=t?Ar(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}var Jp="[object Boolean]",eh="[object Date]",th="[object Map]",nh="[object Number]",rh="[object RegExp]",oh="[object Set]",ih="[object String]",ah="[object Symbol]",sh="[object ArrayBuffer]",lh="[object DataView]",ch="[object Float32Array]",uh="[object Float64Array]",fh="[object Int8Array]",dh="[object Int16Array]",ph="[object Int32Array]",hh="[object Uint8Array]",mh="[object Uint8ClampedArray]",gh="[object Uint16Array]",yh="[object Uint32Array]";function bh(e,t,n){var r=e.constructor;switch(t){case sh:return Ar(e);case Jp:case eh:return new r(+e);case lh:return Gp(e,n);case ch:case uh:case fh:case dh:case ph:case hh:case mh:case gh:case yh:return Zp(e,n);case th:return new r;case nh:case ih:return new r(e);case rh:return Xp(e);case oh:return new r;case ah:return Qp(e)}}function wh(e){return typeof e.constructor=="function"&&!br(e)?Tf(Li(e)):{}}var vh="[object Map]";function Ch(e){return Fe(e)&&Lt(e)==vh}var na=bt&&bt.isMap,Sh=na?En(na):Ch;const Eh=Sh;var Th="[object Set]";function Oh(e){return Fe(e)&&Lt(e)==Th}var ra=bt&&bt.isSet,_h=ra?En(ra):Oh;const Ah=_h;var $h=1,kh=2,Nh=4,oa="[object Arguments]",Ph="[object Array]",Ih="[object Boolean]",Dh="[object Date]",Rh="[object Error]",ia="[object Function]",Bh="[object GeneratorFunction]",Mh="[object Map]",xh="[object Number]",aa="[object Object]",Lh="[object RegExp]",Fh="[object Set]",jh="[object String]",zh="[object Symbol]",Kh="[object WeakMap]",Vh="[object ArrayBuffer]",Uh="[object DataView]",Yh="[object Float32Array]",Wh="[object Float64Array]",Hh="[object Int8Array]",Gh="[object Int16Array]",qh="[object Int32Array]",Xh="[object Uint8Array]",Qh="[object Uint8ClampedArray]",Zh="[object Uint16Array]",Jh="[object Uint32Array]",ne={};ne[oa]=ne[Ph]=ne[Vh]=ne[Uh]=ne[Ih]=ne[Dh]=ne[Yh]=ne[Wh]=ne[Hh]=ne[Gh]=ne[qh]=ne[Mh]=ne[xh]=ne[aa]=ne[Lh]=ne[Fh]=ne[jh]=ne[zh]=ne[Xh]=ne[Qh]=ne[Zh]=ne[Jh]=!0,ne[Rh]=ne[ia]=ne[Kh]=!1;function Nn(e,t,n,r,i,a){var l,s=t&$h,c=t&kh,u=t&Nh;if(n&&(l=i?n(e,r,i,a):n(e)),l!==void 0)return l;if(!Te(e))return e;var d=pe(e);if(d){if(l=Wp(e),!s)return _f(e,l)}else{var f=Lt(e),h=f==ia||f==Bh;if(Sn(e))return Ap(e,s);if(f==aa||f==oa||h&&!i){if(l=c||h?{}:wh(e),!s)return c?Rp(e,Op(l,e)):Pp(e,Tp(l,e))}else{if(!ne[f])return i?e:{};l=bh(e,f,s)}}a||(a=new Re);var p=a.get(e);if(p)return p;a.set(e,l),Ah(e)?e.forEach(function(w){l.add(Nn(w,t,n,w,e,a))}):Eh(e)&&e.forEach(function(w,v){l.set(v,Nn(w,t,n,v,e,a))});var C=u?c?Gi:Tr:c?vr:wt,m=d?void 0:C(e);return $f(m||e,function(w,v){m&&(v=w,w=e[v]),gr(l,v,Nn(w,t,n,v,e,a))}),l}var em=1,tm=4;function Ft(e){return Nn(e,em|tm)}var nm="__lodash_hash_undefined__";function rm(e){return this.__data__.set(e,nm),this}function om(e){return this.__data__.has(e)}function jt(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new ze;++t<n;)this.add(e[t])}jt.prototype.add=jt.prototype.push=rm,jt.prototype.has=om;function im(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}function sa(e,t){return e.has(t)}var am=1,sm=2;function la(e,t,n,r,i,a){var l=n&am,s=e.length,c=t.length;if(s!=c&&!(l&&c>s))return!1;var u=a.get(e),d=a.get(t);if(u&&d)return u==t&&d==e;var f=-1,h=!0,p=n&sm?new jt:void 0;for(a.set(e,t),a.set(t,e);++f<s;){var C=e[f],m=t[f];if(r)var w=l?r(m,C,f,t,e,a):r(C,m,f,e,t,a);if(w!==void 0){if(w)continue;h=!1;break}if(p){if(!im(t,function(v,_){if(!sa(p,_)&&(C===v||i(C,v,n,r,a)))return p.push(_)})){h=!1;break}}else if(!(C===m||i(C,m,n,r,a))){h=!1;break}}return a.delete(e),a.delete(t),h}function lm(e){var t=-1,n=Array(e.size);return e.forEach(function(r,i){n[++t]=[i,r]}),n}function $r(e){var t=-1,n=Array(e.size);return e.forEach(function(r){n[++t]=r}),n}var cm=1,um=2,fm="[object Boolean]",dm="[object Date]",pm="[object Error]",hm="[object Map]",mm="[object Number]",gm="[object RegExp]",ym="[object Set]",bm="[object String]",wm="[object Symbol]",vm="[object ArrayBuffer]",Cm="[object DataView]",ca=De?De.prototype:void 0,kr=ca?ca.valueOf:void 0;function Sm(e,t,n,r,i,a,l){switch(n){case Cm:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case vm:return!(e.byteLength!=t.byteLength||!a(new kn(e),new kn(t)));case fm:case dm:case mm:return vn(+e,+t);case pm:return e.name==t.name&&e.message==t.message;case gm:case bm:return e==t+"";case hm:var s=lm;case ym:var c=r&cm;if(s||(s=$r),e.size!=t.size&&!c)return!1;var u=l.get(e);if(u)return u==t;r|=um,l.set(e,t);var d=la(s(e),s(t),r,i,a,l);return l.delete(e),d;case wm:if(kr)return kr.call(e)==kr.call(t)}return!1}var Em=1,Tm=Object.prototype,Om=Tm.hasOwnProperty;function _m(e,t,n,r,i,a){var l=n&Em,s=Tr(e),c=s.length,u=Tr(t),d=u.length;if(c!=d&&!l)return!1;for(var f=c;f--;){var h=s[f];if(!(l?h in t:Om.call(t,h)))return!1}var p=a.get(e),C=a.get(t);if(p&&C)return p==t&&C==e;var m=!0;a.set(e,t),a.set(t,e);for(var w=l;++f<c;){h=s[f];var v=e[h],_=t[h];if(r)var b=l?r(_,v,h,t,e,a):r(v,_,h,e,t,a);if(!(b===void 0?v===_||i(v,_,n,r,a):b)){m=!1;break}w||(w=h=="constructor")}if(m&&!w){var k=e.constructor,S=t.constructor;k!=S&&"constructor"in e&&"constructor"in t&&!(typeof k=="function"&&k instanceof k&&typeof S=="function"&&S instanceof S)&&(m=!1)}return a.delete(e),a.delete(t),m}var Am=1,ua="[object Arguments]",fa="[object Array]",Pn="[object Object]",$m=Object.prototype,da=$m.hasOwnProperty;function km(e,t,n,r,i,a){var l=pe(e),s=pe(t),c=l?fa:Lt(e),u=s?fa:Lt(t);c=c==ua?Pn:c,u=u==ua?Pn:u;var d=c==Pn,f=u==Pn,h=c==u;if(h&&Sn(e)){if(!Sn(t))return!1;l=!0,d=!1}if(h&&!d)return a||(a=new Re),l||Ri(e)?la(e,t,n,r,i,a):Sm(e,t,c,n,r,i,a);if(!(n&Am)){var p=d&&da.call(e,"__wrapped__"),C=f&&da.call(t,"__wrapped__");if(p||C){var m=p?e.value():e,w=C?t.value():t;return a||(a=new Re),i(m,w,n,r,a)}}return h?(a||(a=new Re),_m(e,t,n,r,i,a)):!1}function In(e,t,n,r,i){return e===t?!0:e==null||t==null||!Fe(e)&&!Fe(t)?e!==e&&t!==t:km(e,t,n,r,In,i)}var Nm=1,Pm=2;function Im(e,t,n,r){var i=n.length,a=i,l=!r;if(e==null)return!a;for(e=Object(e);i--;){var s=n[i];if(l&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++i<a;){s=n[i];var c=s[0],u=e[c],d=s[1];if(l&&s[2]){if(u===void 0&&!(c in e))return!1}else{var f=new Re;if(r)var h=r(u,d,c,e,t,f);if(!(h===void 0?In(d,u,Nm|Pm,r,f):h))return!1}}return!0}function pa(e){return e===e&&!Te(e)}function Dm(e){for(var t=wt(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,pa(i)]}return t}function ha(e,t){return function(n){return n==null?!1:n[e]===t&&(t!==void 0||e in Object(n))}}function Rm(e){var t=Dm(e);return t.length==1&&t[0][2]?ha(t[0][0],t[0][1]):function(n){return n===e||Im(n,e,t)}}function Bm(e,t){return e!=null&&t in Object(e)}function Mm(e,t,n){t=_n(t,e);for(var r=-1,i=t.length,a=!1;++r<i;){var l=xt(t[r]);if(!(a=e!=null&&n(e,l)))break;e=e[l]}return a||++r!=i?a:(i=e==null?0:e.length,!!i&&yr(i)&&wn(l,i)&&(pe(e)||$i(e)))}function xm(e,t){return e!=null&&Mm(e,t,Bm)}var Lm=1,Fm=2;function jm(e,t){return Cr(e)&&pa(t)?ha(xt(e),t):function(n){var r=$n(n,e);return r===void 0&&r===t?xm(n,e):In(t,r,Lm|Fm)}}function zm(e){return function(t){return t==null?void 0:t[e]}}function Km(e){return function(t){return An(t,e)}}function Vm(e){return Cr(e)?zm(xt(e)):Km(e)}function zt(e){return typeof e=="function"?e:e==null?vi:typeof e=="object"?pe(e)?jm(e[0],e[1]):Rm(e):Vm(e)}function Um(e,t,n,r){for(var i=-1,a=e==null?0:e.length;++i<a;){var l=e[i];t(r,l,n(l),e)}return r}function Ym(e){return function(t,n,r){for(var i=-1,a=Object(t),l=r(t),s=l.length;s--;){var c=l[e?s:++i];if(n(a[c],c,a)===!1)break}return t}}var Wm=Ym();const Hm=Wm;function Gm(e,t){return e&&Hm(e,t,wt)}function qm(e,t){return function(n,r){if(n==null)return n;if(!yt(n))return e(n,r);for(var i=n.length,a=t?i:-1,l=Object(n);(t?a--:++a<i)&&r(l[a],a,l)!==!1;);return n}}var Xm=qm(Gm);const Dn=Xm;function Qm(e,t,n,r){return Dn(e,function(i,a,l){t(r,i,n(i),l)}),r}function Zm(e,t){return function(n,r){var i=pe(n)?Um:Qm,a=t?t():{};return i(n,e,zt(r),a)}}var Jm=function(){return Pe.Date.now()};const Nr=Jm;var eg="Expected a function",tg=Math.max,ng=Math.min;function ma(e,t,n){var r,i,a,l,s,c,u=0,d=!1,f=!1,h=!0;if(typeof e!="function")throw new TypeError(eg);t=dr(t)||0,Te(n)&&(d=!!n.leading,f="maxWait"in n,a=f?tg(dr(n.maxWait)||0,t):a,h="trailing"in n?!!n.trailing:h);function p(T){var O=r,A=i;return r=i=void 0,u=T,l=e.apply(A,O),l}function C(T){return u=T,s=setTimeout(v,t),d?p(T):l}function m(T){var O=T-c,A=T-u,g=t-O;return f?ng(g,a-A):g}function w(T){var O=T-c,A=T-u;return c===void 0||O>=t||O<0||f&&A>=a}function v(){var T=Nr();if(w(T))return _(T);s=setTimeout(v,m(T))}function _(T){return s=void 0,h&&r?p(T):(r=i=void 0,l)}function b(){s!==void 0&&clearTimeout(s),u=0,r=c=i=s=void 0}function k(){return s===void 0?l:_(Nr())}function S(){var T=Nr(),O=w(T);if(r=arguments,i=this,c=T,O){if(s===void 0)return C(c);if(f)return clearTimeout(s),s=setTimeout(v,t),p(c)}return s===void 0&&(s=setTimeout(v,t)),l}return S.cancel=b,S.flush=k,S}function rg(e,t,n){for(var r=-1,i=e==null?0:e.length;++r<i;)if(n(t,e[r]))return!0;return!1}function og(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(!t(e[n],n,e))return!1;return!0}function ig(e,t){var n=!0;return Dn(e,function(r,i,a){return n=!!t(r,i,a),n}),n}function ag(e,t,n){var r=pe(e)?og:ig;return n&&Lf(e,t,n)&&(t=void 0),r(e,zt(t))}function sg(e,t){var n=[];return Dn(e,function(r,i,a){t(r,i,a)&&n.push(r)}),n}function ga(e,t){var n=pe(e)?Vi:sg;return n(e,zt(t))}function lg(e,t){var n=-1,r=yt(e)?Array(e.length):[];return Dn(e,function(i,a,l){r[++n]=t(i,a,l)}),r}var cg="[object String]";function ug(e){return typeof e=="string"||!pe(e)&&Fe(e)&&qe(e)==cg}function fg(e,t){return gt(t,function(n){return e[n]})}function dg(e){return e==null?[]:fg(e,wt(e))}var pg=Math.max;function hg(e,t,n,r){e=yt(e)?e:dg(e),n=n&&!r?rf(n):0;var i=e.length;return n<0&&(n=pg(i+n,0)),ug(e)?n<=i&&e.indexOf(t,n)>-1:!!i&&Oi(e,t,n)>-1}function ya(e,t){return In(e,t)}function Kt(e){return e==null}function mg(e){return e===null}var gg=Zm(function(e,t,n){mr(e,n,t)});const ba=gg;function wa(e,t,n,r){if(!Te(e))return e;t=_n(t,e);for(var i=-1,a=t.length,l=a-1,s=e;s!=null&&++i<a;){var c=xt(t[i]),u=n;if(c==="__proto__"||c==="constructor"||c==="prototype")return e;if(i!=l){var d=s[c];u=r?r(d,c,s):void 0,u===void 0&&(u=Te(d)?d:wn(t[i+1])?[]:{})}gr(s,c,u),s=s[c]}return e}function yg(e,t,n){for(var r=-1,i=t.length,a={};++r<i;){var l=t[r],s=An(e,l);n(s,l)&&wa(a,_n(l,e),s)}return a}function Vt(e,t){if(e==null)return{};var n=gt(Gi(e),function(r){return[r]});return t=zt(t),yg(e,n,function(r,i){return t(r,i[0])})}function bg(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}function wg(e,t){if(e!==t){var n=e!==void 0,r=e===null,i=e===e,a=mt(e),l=t!==void 0,s=t===null,c=t===t,u=mt(t);if(!s&&!u&&!a&&e>t||a&&l&&c&&!s&&!u||r&&l&&c||!n&&c||!i)return 1;if(!r&&!a&&!u&&e<t||u&&n&&i&&!r&&!a||s&&n&&i||!l&&i||!c)return-1}return 0}function vg(e,t,n){for(var r=-1,i=e.criteria,a=t.criteria,l=i.length,s=n.length;++r<l;){var c=wg(i[r],a[r]);if(c){if(r>=s)return c;var u=n[r];return c*(u=="desc"?-1:1)}}return e.index-t.index}function Cg(e,t,n){t.length?t=gt(t,function(a){return pe(a)?function(l){return An(l,a.length===1?a[0]:a)}:a}):t=[vi];var r=-1;t=gt(t,En(zt));var i=lg(e,function(a,l,s){var c=gt(t,function(u){return u(a)});return{criteria:c,index:++r,value:a}});return bg(i,function(a,l){return vg(a,l,n)})}function Sg(e,t,n,r){return e==null?[]:(pe(t)||(t=t==null?[]:[t]),n=r?void 0:n,pe(n)||(n=n==null?[]:[n]),Cg(e,t,n))}function Pr(e,t,n){return e==null?e:wa(e,t,n)}var Eg=1/0,Tg=vt&&1/$r(new vt([,-0]))[1]==Eg?function(e){return new vt(e)}:Of;const Og=Tg;var _g=200;function Ag(e,t,n){var r=-1,i=If,a=e.length,l=!0,s=[],c=s;if(n)l=!1,i=rg;else if(a>=_g){var u=t?null:Og(e);if(u)return $r(u);l=!1,i=sa,c=new jt}else c=t?[]:s;e:for(;++r<a;){var d=e[r],f=t?t(d):d;if(d=n||d!==0?d:0,l&&f===f){for(var h=c.length;h--;)if(c[h]===f)continue e;t&&c.push(f),s.push(d)}else i(c,f,n)||(c!==s&&c.push(f),s.push(d))}return s}function $g(e){return e&&e.length?Ag(e):[]}const kg=(e,t,n="post",r={})=>i=>e({url:t,method:n,[n==="get"?"params":"data"]:i,...r}),va=()=>({meta:{code:"VEHICLE-MANAGEMENT-CLIENT-V3",client:"web-H5",tag:"保险",time:new Date().getTime()}}),Ir=({conditions:e,apiConfig:t})=>{const{conditionKey:n,metaKey:r}=t,i=r===null?{}:va();return n===null?Object.assign(i,e):Pr(i,n||"condition",e),i},Ng=({conditions:e,pager:t,sort:n,listApiConfig:r})=>{const{pageNoKey:i,pageSizeKey:a,conditionKey:l,metaKey:s}=r,c=s===null?{}:va();return i&&a&&(Pr(c,i,t.pageNo),Pr(c,a,t.pageSize)),l===null?Object.assign(c,e):c[l||"condition"]=e,c.sort=n,c},Rn=()=>o.getCurrentInstance().appContext.config.globalProperties.$route,Dr=()=>o.getCurrentInstance().appContext.config.globalProperties.$axios,Ke=(e,t,n)=>{const r=Dr();return kg(r,e,t,n)};async function Pg(e,t,n,r){return(await e({url:t,method:"POST",data:n,...r})).data}const Ca=/\{\{(.+?)\}\}/g;function Rr(e,t){if(Array.isArray(e)){const n=[];return e.forEach(r=>{n.push(Rr(r,t))}),n}else if(typeof e=="object"){const n={};for(const r in e)n[t[r]||r]=typeof e[r]=="object"?Rr(e[r],t):e[r];return n}}const Bn=Hn(()=>{const e=o.reactive({});return{enumerations:e,patchEnumerations:async r=>{const i=r?Object.keys(r).filter(s=>e[s]===void 0):[],a=i.map(s=>{const{apiUrl:c,apiMethod:u,params:d}=r[s];if(!c)throw`enum api ${s} 没有提供apiUrl`;const f=u&&u.toLocaleLowerCase()==="get";return Ke(c,u,f?{params:d}:void 0)(d)});(await Promise.allSettled(a)).forEach((s,c)=>{if(s.status==="fulfilled"){const{value:u}=s,{labelKey:d,valueKey:f,childrenKey:h,dataType:p,dataKey:C,groupKey:m}=r[i[c]];if(u.success){const w=$n(u,C||"data"),v=_=>{Object.prototype.toString.call(_)==="[object Array]"?p==="Cascader"?e[i[c]]=_.map(b=>Rr(b,{[f||"value"]:"value",[d||"label"]:"label",[h||"children"]:"children"})):e[i[c]]=[...o.toRaw(e[i[c]]||[]),..._.map(b=>{let k=b[d];return Ca.test(d)&&(k=d.replace(Ca,(S,T)=>b[T])),{...m?{group:b[m]}:{},label:k,value:b[f]}})]:Object.prototype.toString.call(_)==="[object Object]"&&Object.keys(_).forEach(b=>{v(_[b])})};v(w)}}else console.warn(`【enumeration】: ${i[c]}: 获取失败`)})},patchStaticEnumerations:r=>{Object.keys(r).forEach(a=>{e[a]=r[a]})}}}),Ig={Input:z.Input,Select:z.Select,Cascader:z.Cascader,FuzzySelect:z.Select,QuerySelect:z.Select,DatePicker:z.DatePicker,RangePicker:z.RangePicker},Dg="Enter",Rg=13,Br="FuzzySelect",Mn="QuerySelect",Bg=["RangePicker"],Sa=o.defineComponent({name:"ConditionBuilder",props:{materials:{type:Object,default:()=>{}}},emits:["pressEnter"],setup(e,{emit:t}){const n=Rn(),{materials:r}=o.toRefs(e),{enumerations:i}=Bn(),a=o.inject("materials",{});let s={...Ig,...a}[r.value.type];const c=o.computed(()=>Bg.includes(r.value.type)?["开始时间","结束时间"]:"请输入"),{otherProps:u}=r.value;function d(S){if(!S||!S.style||Object.prototype.toString.call(S.style)==="[object Object]")return S;const{style:T,...O}=S;try{const A=JSON.parse(T);return{...O,style:A}}catch(A){return console.warn("Failed to parse style:",A),S}}const f=d(u),h=r.value.filterGroups||[],p=r.value.refEnum||"",C=o.computed(()=>{var S,T;return((T=i[p])==null?void 0:T.filter((S=r.value.filterGroups)!=null&&S.length?O=>h.includes(O.group):()=>!0))||[]}),m=o.ref([]),w=Ke(r.value.filterUrl||`/duckbill-data-query-server/table/column/${r.value.filterKey}`,r.value.filterMethod||"post"),v=o.inject("transformFuzzy",{})[r.value.fieldName],_=(S,T)=>{var A;const O=r.value.filterKey||"label";return T[O]||console.warn(`not found key 【${O}】 in option`),((A=T[O])==null?void 0:A.indexOf(S.toString()))>-1},b=o.computed(()=>{switch(r.value.type){case Br:return ma(async function(S){const T=Ir({conditions:r.value.fuzzyCode?{key:S,code:r.value.fuzzyCode}:S,apiConfig:{conditionKey:r.value.conditionKey||"params",metaKey:r.value.metaKey}}),O=await w(T),A=v?v(O):O;m.value=A},200);case Mn:return ma(async function(S){const{category:T,tab:O}=n.meta,A=await w({sliceNumber:"50",category:T,tab:O,code:S});r.value.fuzzyMatch?m.value=A.data.map(g=>({value:g,label:g})):m.value=A.data.map(g=>({value:g.id,label:g.name}))},200);default:return null}}),k=o.computed(()=>{switch(r.value.type){case"Cascader":return C.value;case"Select":return C.value;case Br:return m.value;case Mn:return m.value;default:return C.value}});return()=>s?o.h(s,{size:"small",placeholder:c.value,onkeydown:function(S){["Cascader"].includes(r.value.type)||(S.keyCode===Rg||S.key===Dg)&&setTimeout(()=>t("pressEnter"))},filterOption:[Br,Mn].includes(r.value.type)?!1:_,...Vt({notFoundContent:Mn===r.value.type?null:!0},mg),onSearch:b.value,options:k.value,...f}):o.h("span","Invalid Type")}}),Ut=Hn(()=>{const e=o.reactive({}),t=(r,i)=>{Object.assign(e[i],r)};return{formState:e,dispatchFormState:t,initFormState:(r=[],i=Object.create(null),a)=>(e[a]||(e[a]=Object.create(null)),r.forEach(l=>{e[a][l.fieldName]=void 0}),t(i,a),e[a])}}),{Item:Mg,useForm:xg}=z.Form,Lg=o.defineComponent({name:"PageRendererConditions",components:{DownOutlined:ge.DownOutlined,UpOutlined:ge.UpOutlined,Col:z.Col,Row:z.Row,Form:z.Form,Item:Mg,Space:z.Space,Button:z.Button,ConditionBuilder:Sa},props:{config:{type:Array,default:()=>[]},searching:{type:Boolean,default:!1},current:{type:Number,default:1},defaultQuery:{type:Object,default:()=>{}},immediateQuery:{type:Boolean,default:!1}},emits:["search","changeExpand","update:current","resetSearch"],setup(e,{emit:t,expose:n}){const{config:a,immediateQuery:l}=o.toRefs(e),s=o.inject("pageName",""),c=o.computed(()=>a.value.length>6*3),u=o.ref(!c.value),{formState:d,dispatchFormState:f}=Ut(),{resetFields:h,validate:p,validateInfos:C}=xg(d[s]);o.watch(()=>e.defaultQuery,_=>{o.nextTick(()=>{f(_,s),t("search")})},{deep:!0,immediate:l.value});const m=()=>{p().then(()=>e.current===1?t("search"):t("update:current",1)).catch(_=>{console.log(_)})},w=_=>_.label.slice(0,10);o.watch(u,()=>t("changeExpand"));const v=o.computed(()=>u.value||!c.value?(6-a.value.length%6)*4:24);return n({resetFields:h}),{expand:u,pageName:s,formState:d,serachSpan:v,validateInfos:C,showAvailiableTrigger:c,AVAILIABLE_EXPAND_LINE:3,CONDITION_COUNT_PER_LINE:6,onSubmit:m,getItemLabel:w}}});function Fg(e,t,n,r,i,a){const l=o.resolveComponent("ConditionBuilder"),s=o.resolveComponent("Item"),c=o.resolveComponent("Col"),u=o.resolveComponent("Button"),d=o.resolveComponent("UpOutlined"),f=o.resolveComponent("DownOutlined"),h=o.resolveComponent("Space"),p=o.resolveComponent("Row"),C=o.resolveComponent("Form");return o.openBlock(),o.createBlock(C,{class:"page-renderer-conditions","label-col":{span:8},"wrapper-col":{span:16}},{default:o.withCtx(()=>[o.createVNode(p,{gutter:24},{default:o.withCtx(()=>[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(e.config,(m,w)=>{var v;return o.withDirectives((o.openBlock(),o.createBlock(c,{key:m.fieldName,span:((v=m.otherProps)==null?void 0:v.span)||4,class:"conditions-item-col"},{default:o.withCtx(()=>{var _,b;return[o.createVNode(s,o.mergeProps(e.validateInfos[m.fieldName],{colon:!1,"label-col":(_=m.otherProps)==null?void 0:_.labelCol,"wrapper-col":(b=m.otherProps)==null?void 0:b.wrapperCol,label:e.getItemLabel(m),class:{"form-item-with-small-fonts":e.getItemLabel(m).length>4,[`form-item-words${e.getItemLabel(m).length}`]:!0}}),{default:o.withCtx(()=>[o.createVNode(l,{value:e.formState[e.pageName][m.fieldName],"onUpdate:value":k=>e.formState[e.pageName][m.fieldName]=k,materials:m,onPressEnter:e.onSubmit},null,8,["value","onUpdate:value","materials","onPressEnter"])]),_:2},1040,["label-col","wrapper-col","label","class"])]}),_:2},1032,["span"])),[[o.vShow,e.expand||!e.showAvailiableTrigger||w<e.CONDITION_COUNT_PER_LINE]])}),128)),o.createVNode(c,{span:e.serachSpan},{default:o.withCtx(()=>[o.createVNode(h,{style:{float:"right","padding-right":"12px"}},{default:o.withCtx(()=>[o.createVNode(u,{type:"primary",size:"small",onClick:o.withModifiers(e.onSubmit,["prevent"]),loading:e.searching},{default:o.withCtx(()=>[o.createTextVNode("查询")]),_:1},8,["onClick","loading"]),o.createVNode(u,{size:"small",onClick:t[0]||(t[0]=m=>e.$emit("resetSearch"))},{default:o.withCtx(()=>[o.createTextVNode("重置")]),_:1}),e.showAvailiableTrigger?(o.openBlock(),o.createElementBlock("a",{key:0,style:{"font-size":"12px"},onClick:t[1]||(t[1]=m=>e.expand=!e.expand)},[e.expand?(o.openBlock(),o.createElementBlock(o.Fragment,{key:0},[o.createVNode(d),o.createTextVNode(" 收起 ")],64)):(o.openBlock(),o.createElementBlock(o.Fragment,{key:1},[o.createVNode(f),o.createTextVNode(" 展开 ")],64))])):o.createCommentVNode("",!0)]),_:1})]),_:1},8,["span"])]),_:1})]),_:1})}const jg=$e(Lg,[["render",Fg]]),Yt=Hn(()=>{const e=o.reactive(Object.create(null)),t=o.reactive(Object.create(null)),n=o.reactive(Object.create(null));return o.watch(t,()=>{for(const r in n)n[r]=[]},{deep:!0}),{selectedRows:e,selectedRowKeys:t,selectedErrorRowKeys:n}}),Wt="__$$loading",Ht="__$$map",zg="__$$rowClassName",Ea=[{value:100,label:100},{value:200,label:200},{value:500,label:500}],Ta="[@yzsf2e/render-core]COLUMN_SCHEME",Kg={".xlsx":"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",".xls":"application/vnd.ms-excel",".png":"image/png",".jpg":"image/jpeg",".jpeg":"image/jpeg"},Vg={ALL:"导出全部",SELECTED:"导出选中"},Mr={COLUMN_SETTING:"列表设置",FILTER_SETTING:"筛选设置",SORT_SETTING:"排序设置"},Ug={COLUMN_SETTING:"列表设置"},Yg=o.defineComponent({name:"PageRendererButtons",components:{aicon:tn,Menu:z.Menu,MenuItem:z.MenuItem,Space:z.Space,Button:z.Button,Select:z.Select,Dropdown:z.Dropdown,Pagination:z.Pagination,DropdownButton:z.DropdownButton,SettingOutlined:ge.SettingOutlined,DownOutlined:ge.DownOutlined},props:{config:{type:Array,default:()=>[]},hasApiConfig:{type:Boolean,required:!0},exportConfig:{type:Object},importConfig:{type:Object},handleExport:{type:Function,default:null},total:{type:Number,default:0},current:{type:Number,default:1},pageSize:{type:Number,default:100},pageSizeOptions:{type:Array,default:null}},emits:["buttonClick","update:current","update:pageSize","customizeSetting","refresh"],setup(e,{emit:t}){var T,O,A,g;const{current:n,pageSize:r,exportConfig:i,importConfig:a,pageSizeOptions:l}=o.toRefs(e),s=o.ref(!1),c=o.ref(!1),u=o.inject("pageName",""),{selectedRows:d}=Yt(),f=o.computed(()=>l.value||Ea),h=(y,E)=>{if(y.needSelectRows){if(!d[u].length){z.message.warn("请选择数据");return}if(y.mode==="single"&&d[u].length>1){z.message.warn("只能选择一条数据");return}}t("buttonClick",y.action,E)},p=o.computed({get:()=>n.value,set:y=>t("update:current",y)}),C=o.computed({get:()=>r.value,set:y=>{const E=Math.ceil(e.total/y);p.value>E&&(p.value=E),t("update:pageSize",y)}}),m=o.inject("paramsGuard",y=>y),w=(T=i.value)!=null&&T.url?Ke((O=i.value)==null?void 0:O.url,"post",{responseType:"blob",...i.value.requestOptions}):null,v=(g=(A=a.value)==null?void 0:A.children)!=null&&g.length?a.value.children.map(y=>Ke(y.url,"post",{...y.requestOptions})):[],_=async()=>{var B;const{formState:y}=Ut(),E=i.value?Ir({conditions:o.toRaw(y[u]),apiConfig:i.value}):{};m(E,u);try{s.value=!0;const j=await w(E);if(!j)return;const M=/\{\{(.+?)\}\}/g;let R=((B=i.value)==null?void 0:B.fileName)||"",N=null;for(;(N=M.exec(R))!==null;)N[1]==="Date"&&(R=R.replace(N[0],fi().format("YYYY-MM-DD")));const D=document.createElement("a"),P=window.URL.createObjectURL(new Blob([j]));if(D.href=P,D.download=R,document.body.appendChild(D),D.click(),document.body.removeChild(D),window.URL.revokeObjectURL(P),i.value.needFeedback===!1)return;z.message.success("导出成功")}catch(j){console.warn("export error: ",j)}finally{s.value=!1}},b=({url:y,type:E})=>{switch(E){case"TEMPLATE_LOCAL":window.open(y);break}},k=async({accept:y},E)=>{const B=/^\.[a-zA-Z]+$/,j=y==null?void 0:y.reduce((N,D)=>{if(!B.test(D))throw`请提供正确的文件后缀名,是否是 【.${D}】 ?`;return N[Kg[D]]=[D],N},{}),[M]=await window.showOpenFilePicker({types:[{accept:j}]}),R=await M.getFile();if(R){const N=v[E],D=new FormData;D.append("file",R),c.value=!0,N(D).finally(()=>{c.value=!1})}};return{SETTINGS_MAP:Mr,API_CONFIG_SETTINGS_MAP:Ug,importLoading:c,exportLoading:s,computed_current:p,computed_pageSize:C,paginationSizeOptions:f,OPERATIONS_EXPORT_MAP:Vg,handleImport:(y,E)=>{const{type:B}=y;if(["TEMPLATE_LOCAL"].includes(B)){b(y);return}if(["IMPORT"].includes(B)){k(y,E);return}z.message.warn(`请确认ImportConfigItem.type是否正确: ${B}`)},handleApiConfigExport:_,handleButtonClick:h}}}),cw="",Wg={class:"page-renderer-buttons"},Hg={class:"page-renderer-buttons-left"},Gg={key:2},qg={class:"page-renderer-setting-trigger"},Xg={href:"javascript:;"};function Qg(e,t,n,r,i,a){const l=o.resolveComponent("aicon"),s=o.resolveComponent("MenuItem"),c=o.resolveComponent("Menu"),u=o.resolveComponent("Space"),d=o.resolveComponent("Button"),f=o.resolveComponent("Dropdown"),h=o.resolveComponent("DownOutlined"),p=o.resolveComponent("Pagination"),C=o.resolveComponent("Select"),m=o.resolveComponent("SettingOutlined"),w=o.resolveDirective("permission");return o.openBlock(),o.createElementBlock("div",Wg,[o.createElementVNode("div",Hg,[o.createVNode(u,null,{default:o.withCtx(()=>[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(e.config,(v,_)=>o.withDirectives((o.openBlock(),o.createBlock(o.resolveDynamicComponent(v.type),o.mergeProps(v.otherProps,{key:`${v.type}${_}`,onClick:b=>e.handleButtonClick(v,b)}),o.createSlots({overlay:o.withCtx(()=>[o.createVNode(c,null,{default:o.withCtx(()=>[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(v.sublist,b=>(o.openBlock(),o.createBlock(s,{key:b.action,onClick:k=>e.handleButtonClick(b,k)},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(b.children),1)]),_:2},1032,["onClick"]))),128))]),_:2},1024)]),default:o.withCtx(()=>[o.createTextVNode(" "+o.toDisplayString(v.children)+" ",1)]),_:2},[v.iconType?{name:"icon",fn:o.withCtx(()=>[o.createVNode(l,{type:v.iconType},null,8,["type"])]),key:"0"}:void 0]),1040,["onClick"])),[[w,v.permissions]])),128))]),_:1})]),o.createElementVNode("div",null,[o.createVNode(u,null,{default:o.withCtx(()=>{var v,_;return[e.hasApiConfig?(o.openBlock(),o.createElementBlock(o.Fragment,{key:0},[(v=e.importConfig)!=null&&v.children?(o.openBlock(),o.createBlock(f,{key:0,trigger:["click"],disabled:e.importLoading},{overlay:o.withCtx(()=>[o.createVNode(c,null,{default:o.withCtx(()=>[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(e.importConfig.children,(b,k)=>(o.openBlock(),o.createBlock(s,{key:k,onClick:()=>e.handleImport(b,k)},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(b.title),1)]),_:2},1032,["onClick"]))),128))]),_:1})]),default:o.withCtx(()=>[o.createVNode(d,{loading:e.importLoading,size:"small",type:"primary"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(e.importConfig.title||"导入"),1)]),_:1},8,["loading"])]),_:1},8,["disabled"])):o.createCommentVNode("",!0),e.exportConfig?(o.openBlock(),o.createBlock(d,{key:1,size:"small",type:"primary",loading:e.exportLoading,onClick:t[0]||(t[0]=()=>e.handleApiConfigExport())},{default:o.withCtx(()=>[o.createTextVNode(" 导出 ")]),_:1},8,["loading"])):o.createCommentVNode("",!0)],64)):(o.openBlock(),o.createElementBlock(o.Fragment,{key:1},[(_=e.importConfig)!=null&&_.sublist?(o.openBlock(),o.createBlock(f,{key:0,trigger:["click"],disabled:e.importLoading},{overlay:o.withCtx(()=>[o.createVNode(c,null,{default:o.withCtx(()=>[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(e.importConfig.sublist,(b,k)=>(o.openBlock(),o.createBlock(s,{key:k,onClick:()=>e.handleImport(b,k)},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(b.title),1)]),_:2},1032,["onClick"]))),128))]),_:1})]),default:o.withCtx(()=>[o.createVNode(d,{loading:e.importLoading,size:"small",type:"primary"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(e.importConfig.title||"导入"),1)]),_:1},8,["loading"])]),_:1},8,["disabled"])):o.createCommentVNode("",!0),e.exportConfig?(o.openBlock(),o.createBlock(f,{key:1},{overlay:o.withCtx(()=>[o.createVNode(c,{onClick:t[1]||(t[1]=b=>e.handleExport(b.key))},{default:o.withCtx(()=>[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(e.OPERATIONS_EXPORT_MAP,(b,k)=>(o.openBlock(),o.createBlock(s,{key:k},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(b),1)]),_:2},1024))),128))]),_:1})]),default:o.withCtx(()=>[o.createVNode(d,{size:"small",type:"primary",loading:e.exportLoading},{default:o.withCtx(()=>[o.createTextVNode(" 导出 "),o.createVNode(h)]),_:1},8,["loading"])]),_:1})):o.createCommentVNode("",!0)],64)),e.hasApiConfig?(o.openBlock(),o.createElementBlock("div",Gg,"共 "+o.toDisplayString(e.total)+" 条",1)):o.createCommentVNode("",!0),o.createVNode(p,{class:"operations-pagination-simple",current:e.computed_current,"onUpdate:current":t[2]||(t[2]=b=>e.computed_current=b),pageSize:e.computed_pageSize,"onUpdate:pageSize":t[3]||(t[3]=b=>e.computed_pageSize=b),size:"small",simple:"",total:e.total},null,8,["current","pageSize","total"]),o.createVNode(C,{value:e.computed_pageSize,"onUpdate:value":t[4]||(t[4]=b=>e.computed_pageSize=b),size:"small",options:e.paginationSizeOptions},null,8,["value","options"]),o.createVNode(f,{placement:"bottomRight",trigger:["click"]},{overlay:o.withCtx(()=>[o.createVNode(c,{onClick:t[5]||(t[5]=b=>e.$emit("customizeSetting",b.key))},{default:o.withCtx(()=>[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(e.hasApiConfig?e.API_CONFIG_SETTINGS_MAP:e.SETTINGS_MAP,(b,k)=>(o.openBlock(),o.createBlock(s,{key:k},{default:o.withCtx(()=>[o.createVNode(m,{style:{"margin-right":"4px"}}),o.createElementVNode("a",Xg,o.toDisplayString(b),1)]),_:2},1024))),128))]),_:1})]),default:o.withCtx(()=>[o.createElementVNode("div",qg,[o.createVNode(m,{style:{"font-size":"15px",transform:"translateY(2px)"}})])]),_:1})]}),_:1})])])}const Zg=$e(Yg,[["render",Qg]]),Jg=o.defineComponent({name:"PageRendererSummaryBar",components:{Alert:z.Alert},props:{config:{type:Object,required:!0}},setup(e,{expose:t}){const{config:n}=o.toRefs(e),{template:r}=n.value,i=o.ref(!1),{formState:a}=Ut(),l=o.inject("pageName",""),s=o.inject("paramsGuard",p=>p),c=()=>{const p=/\{\{(.+?)\}\}/g;let C={},m=[];for(;(m=p.exec(r))!==null;)C[m[1].trim()]=" - ";return C},u=o.reactive(c()),d=Ke(n.value.url),f=async()=>{const p=Ir({conditions:a[l],apiConfig:n.value});s(p,l),i.value=!0,d(p).then(C=>{Object.keys(u).forEach(m=>{const w=$n(C,`${n.value.dataKey}.${m}`);u[m]=Kt(w)?" - ":w})}).finally(()=>i.value=!1)},h={data:()=>o.toRaw(u),template:r};return t({fetchSummary:f}),()=>o.h(z.Alert,{class:"page-renderer-summary-bar"},{message:()=>i.value?o.h(z.Spin,{size:"small",style:{height:"20px"}}):o.h(h)})}}),uw="",ey=e=>{const t=document.createElement("textarea");t.value=e,document.body.appendChild(t),t.select(),t.setSelectionRange(0,99999);try{document.execCommand("copy"),z.message.success("复制成功")}catch(n){z.message.error("复制失败"),console.error("【@yzsf2e/render-core】execCommand 复制失败: ",n)}document.body.removeChild(t)},ty=e=>{navigator.clipboard.writeText(e).then(()=>{z.message.success("复制成功")}).catch(t=>{console.error("【@yzsf2e/render-core】复制失败: ",t),ey(e)})},xn=e=>o.h("span",[o.h({template:e}),o.h(ge.CopyOutlined,{style:{marginLeft:"8px",cursor:"pointer",color:"#1890ff"},onClick:t=>{t.stopPropagation(),ty(e)},onDblclick:t=>{t.stopPropagation()}})]),ny=o.defineComponent({name:"PageRendererTableCell",props:{column:{type:Object,default:()=>{}},row:{type:Object,default:()=>{}},copyable:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},handleLinkClick:{type:Function,required:!0},linkCellKeys:{type:Array,default:()=>[]},keywords:{type:Array,default:()=>[]}},setup(e){const{copyable:t,column:n,row:r,linkCellKeys:i,keywords:a}=o.toRefs(e),l=o.computed(()=>{let s=r.value[n.value.dataIndex];return a.value.includes(n.value.dataIndex)&&(s=r.value[Ht][n.value.dataIndex]),s});return()=>i.value.includes(n.value.dataIndex)?e.loading?o.h(ge.LoadingOutlined,{style:{color:"#1890ff"}}):o.h("a",{onclick:c=>{c.stopPropagation(),e.handleLinkClick(r.value,n.value,c)}},t.value?xn(l.value):l.value):t.value?xn(l.value):o.h({template:l.value})}}),ry=o.defineComponent({name:"TableCopyCell",props:{text:{type:String,default:""}},setup(e){return()=>xn(e.text)}}),oy=o.defineComponent({name:"TableImageCell",props:{image:{type:String||Array,required:!0}},setup(e){const{image:t}=o.toRefs(e),n=o.inject("previewMediaModalOpen",()=>{}),r=o.computed(()=>typeof t.value=="string"?[t.value]:t.value);return{imageList:r,preview:a=>{n([...r.value],a)}}}}),iy=["src","onClick"];function ay(e,t,n,r,i,a){const l=o.resolveComponent("a-space");return o.openBlock(),o.createElementBlock("div",null,[o.createVNode(l,null,{default:o.withCtx(()=>[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(e.imageList,(s,c)=>(o.openBlock(),o.createElementBlock("img",{src:s,key:c,onClick:()=>e.preview(c),style:{width:"30px",height:"30px",cursor:"pointer",border:"1px solid #ccc"}},null,8,iy))),128))]),_:1})])}const sy=$e(oy,[["render",ay]]);var ly=20,cy=1,et=1e6,Oa=1e6,uy=-7,fy=21,dy=!1,Gt="[big.js] ",tt=Gt+"Invalid ",Ln=tt+"decimal places",py=tt+"rounding mode",_a=Gt+"Division by zero",Q={},Be=void 0,hy=/^-?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i;function Aa(){function e(t){var n=this;if(!(n instanceof e))return t===Be?Aa():new e(t);if(t instanceof e)n.s=t.s,n.e=t.e,n.c=t.c.slice();else{if(typeof t!="string"){if(e.strict===!0&&typeof t!="bigint")throw TypeError(tt+"value");t=t===0&&1/t<0?"-0":String(t)}my(n,t)}n.constructor=e}return e.prototype=Q,e.DP=ly,e.RM=cy,e.NE=uy,e.PE=fy,e.strict=dy,e.roundDown=0,e.roundHalfUp=1,e.roundHalfEven=2,e.roundUp=3,e}function my(e,t){var n,r,i;if(!hy.test(t))throw Error(tt+"number");for(e.s=t.charAt(0)=="-"?(t=t.slice(1),-1):1,(n=t.indexOf("."))>-1&&(t=t.replace(".","")),(r=t.search(/e/i))>0?(n<0&&(n=r),n+=+t.slice(r+1),t=t.substring(0,r)):n<0&&(n=t.length),i=t.length,r=0;r<i&&t.charAt(r)=="0";)++r;if(r==i)e.c=[e.e=0];else{for(;i>0&&t.charAt(--i)=="0";);for(e.e=n-r-1,e.c=[],n=0;r<=i;)e.c[n++]=+t.charAt(r++)}return e}function nt(e,t,n,r){var i=e.c;if(n===Be&&(n=e.constructor.RM),n!==0&&n!==1&&n!==2&&n!==3)throw Error(py);if(t<1)r=n===3&&(r||!!i[0])||t===0&&(n===1&&i[0]>=5||n===2&&(i[0]>5||i[0]===5&&(r||i[1]!==Be))),i.length=1,r?(e.e=e.e-t+1,i[0]=1):i[0]=e.e=0;else if(t<i.length){if(r=n===1&&i[t]>=5||n===2&&(i[t]>5||i[t]===5&&(r||i[t+1]!==Be||i[t-1]&1))||n===3&&(r||!!i[0]),i.length=t,r){for(;++i[--t]>9;)if(i[t]=0,t===0){++e.e,i.unshift(1);break}}for(t=i.length;!i[--t];)i.pop()}return e}function Ct(e,t,n){var r=e.e,i=e.c.join(""),a=i.length;if(t)i=i.charAt(0)+(a>1?"."+i.slice(1):"")+(r<0?"e":"e+")+r;else if(r<0){for(;++r;)i="0"+i;i="0."+i}else if(r>0)if(++r>a)for(r-=a;r--;)i+="0";else r<a&&(i=i.slice(0,r)+"."+i.slice(r));else a>1&&(i=i.charAt(0)+"."+i.slice(1));return e.s<0&&n?"-"+i:i}Q.abs=function(){var e=new this.constructor(this);return e.s=1,e},Q.cmp=function(e){var t,n=this,r=n.c,i=(e=new n.constructor(e)).c,a=n.s,l=e.s,s=n.e,c=e.e;if(!r[0]||!i[0])return r[0]?a:i[0]?-l:0;if(a!=l)return a;if(t=a<0,s!=c)return s>c^t?1:-1;for(l=(s=r.length)<(c=i.length)?s:c,a=-1;++a<l;)if(r[a]!=i[a])return r[a]>i[a]^t?1:-1;return s==c?0:s>c^t?1:-1},Q.div=function(e){var t=this,n=t.constructor,r=t.c,i=(e=new n(e)).c,a=t.s==e.s?1:-1,l=n.DP;if(l!==~~l||l<0||l>et)throw Error(Ln);if(!i[0])throw Error(_a);if(!r[0])return e.s=a,e.c=[e.e=0],e;var s,c,u,d,f,h=i.slice(),p=s=i.length,C=r.length,m=r.slice(0,s),w=m.length,v=e,_=v.c=[],b=0,k=l+(v.e=t.e-e.e)+1;for(v.s=a,a=k<0?0:k,h.unshift(0);w++<s;)m.push(0);do{for(u=0;u<10;u++){if(s!=(w=m.length))d=s>w?1:-1;else for(f=-1,d=0;++f<s;)if(i[f]!=m[f]){d=i[f]>m[f]?1:-1;break}if(d<0){for(c=w==s?i:h;w;){if(m[--w]<c[w]){for(f=w;f&&!m[--f];)m[f]=9;--m[f],m[w]+=10}m[w]-=c[w]}for(;!m[0];)m.shift()}else break}_[b++]=d?u:++u,m[0]&&d?m[w]=r[p]||0:m=[r[p]]}while((p++<C||m[0]!==Be)&&a--);return!_[0]&&b!=1&&(_.shift(),v.e--,k--),b>k&&nt(v,k,n.RM,m[0]!==Be),v},Q.eq=function(e){return this.cmp(e)===0},Q.gt=function(e){return this.cmp(e)>0},Q.gte=function(e){return this.cmp(e)>-1},Q.lt=function(e){return this.cmp(e)<0},Q.lte=function(e){return this.cmp(e)<1},Q.minus=Q.sub=function(e){var t,n,r,i,a=this,l=a.constructor,s=a.s,c=(e=new l(e)).s;if(s!=c)return e.s=-c,a.plus(e);var u=a.c.slice(),d=a.e,f=e.c,h=e.e;if(!u[0]||!f[0])return f[0]?e.s=-c:u[0]?e=new l(a):e.s=1,e;if(s=d-h){for((i=s<0)?(s=-s,r=u):(h=d,r=f),r.reverse(),c=s;c--;)r.push(0);r.reverse()}else for(n=((i=u.length<f.length)?u:f).length,s=c=0;c<n;c++)if(u[c]!=f[c]){i=u[c]<f[c];break}if(i&&(r=u,u=f,f=r,e.s=-e.s),(c=(n=f.length)-(t=u.length))>0)for(;c--;)u[t++]=0;for(c=t;n>s;){if(u[--n]<f[n]){for(t=n;t&&!u[--t];)u[t]=9;--u[t],u[n]+=10}u[n]-=f[n]}for(;u[--c]===0;)u.pop();for(;u[0]===0;)u.shift(),--h;return u[0]||(e.s=1,u=[h=0]),e.c=u,e.e=h,e},Q.mod=function(e){var t,n=this,r=n.constructor,i=n.s,a=(e=new r(e)).s;if(!e.c[0])throw Error(_a);return n.s=e.s=1,t=e.cmp(n)==1,n.s=i,e.s=a,t?new r(n):(i=r.DP,a=r.RM,r.DP=r.RM=0,n=n.div(e),r.DP=i,r.RM=a,this.minus(n.times(e)))},Q.neg=function(){var e=new this.constructor(this);return e.s=-e.s,e},Q.plus=Q.add=function(e){var t,n,r,i=this,a=i.constructor;if(e=new a(e),i.s!=e.s)return e.s=-e.s,i.minus(e);var l=i.e,s=i.c,c=e.e,u=e.c;if(!s[0]||!u[0])return u[0]||(s[0]?e=new a(i):e.s=i.s),e;if(s=s.slice(),t=l-c){for(t>0?(c=l,r=u):(t=-t,r=s),r.reverse();t--;)r.push(0);r.reverse()}for(s.length-u.length<0&&(r=u,u=s,s=r),t=u.length,n=0;t;s[t]%=10)n=(s[--t]=s[t]+u[t]+n)/10|0;for(n&&(s.unshift(n),++c),t=s.length;s[--t]===0;)s.pop();return e.c=s,e.e=c,e},Q.pow=function(e){var t=this,n=new t.constructor("1"),r=n,i=e<0;if(e!==~~e||e<-Oa||e>Oa)throw Error(tt+"exponent");for(i&&(e=-e);e&1&&(r=r.times(t)),e>>=1,!!e;)t=t.times(t);return i?n.div(r):r},Q.prec=function(e,t){if(e!==~~e||e<1||e>et)throw Error(tt+"precision");return nt(new this.constructor(this),e,t)},Q.round=function(e,t){if(e===Be)e=0;else if(e!==~~e||e<-et||e>et)throw Error(Ln);return nt(new this.constructor(this),e+this.e+1,t)},Q.sqrt=function(){var e,t,n,r=this,i=r.constructor,a=r.s,l=r.e,s=new i("0.5");if(!r.c[0])return new i(r);if(a<0)throw Error(Gt+"No square root");a=Math.sqrt(r+""),a===0||a===1/0?(t=r.c.join(""),t.length+l&1||(t+="0"),a=Math.sqrt(t),l=((l+1)/2|0)-(l<0||l&1),e=new i((a==1/0?"5e":(a=a.toExponential()).slice(0,a.indexOf("e")+1))+l)):e=new i(a+""),l=e.e+(i.DP+=4);do n=e,e=s.times(n.plus(r.div(n)));while(n.c.slice(0,l).join("")!==e.c.slice(0,l).join(""));return nt(e,(i.DP-=4)+e.e+1,i.RM)},Q.times=Q.mul=function(e){var t,n=this,r=n.constructor,i=n.c,a=(e=new r(e)).c,l=i.length,s=a.length,c=n.e,u=e.e;if(e.s=n.s==e.s?1:-1,!i[0]||!a[0])return e.c=[e.e=0],e;for(e.e=c+u,l<s&&(t=i,i=a,a=t,u=l,l=s,s=u),t=new Array(u=l+s);u--;)t[u]=0;for(c=s;c--;){for(s=0,u=l+c;u>c;)s=t[u]+a[c]*i[u-c-1]+s,t[u--]=s%10,s=s/10|0;t[u]=s}for(s?++e.e:t.shift(),c=t.length;!t[--c];)t.pop();return e.c=t,e},Q.toExponential=function(e,t){var n=this,r=n.c[0];if(e!==Be){if(e!==~~e||e<0||e>et)throw Error(Ln);for(n=nt(new n.constructor(n),++e,t);n.c.length<e;)n.c.push(0)}return Ct(n,!0,!!r)},Q.toFixed=function(e,t){var n=this,r=n.c[0];if(e!==Be){if(e!==~~e||e<0||e>et)throw Error(Ln);for(n=nt(new n.constructor(n),e+n.e+1,t),e=e+n.e+1;n.c.length<e;)n.c.push(0)}return Ct(n,!1,!!r)},Q[Symbol.for("nodejs.util.inspect.custom")]=Q.toJSON=Q.toString=function(){var e=this,t=e.constructor;return Ct(e,e.e<=t.NE||e.e>=t.PE,!!e.c[0])},Q.toNumber=function(){var e=Number(Ct(this,!0,!0));if(this.constructor.strict===!0&&!this.eq(e.toString()))throw Error(Gt+"Imprecise conversion");return e},Q.toPrecision=function(e,t){var n=this,r=n.constructor,i=n.c[0];if(e!==Be){if(e!==~~e||e<1||e>et)throw Error(tt+"precision");for(n=nt(new r(n),e,t);n.c.length<e;)n.c.push(0)}return Ct(n,e<=n.e||n.e<=r.NE||n.e>=r.PE,!!i)},Q.valueOf=function(){var e=this,t=e.constructor;if(t.strict===!0)throw Error(Gt+"valueOf disallowed");return Ct(e,e.e<=t.NE||e.e>=t.PE,!0)};var gy=Aa();const yy={sum:e=>{const{selectedRows:t}=Yt(),n=o.inject("pageName","");return t[n].reduce((r,i)=>r=r.plus(Number(i[e.dataIndex])),new gy(0))}},by=(e,t)=>yy[e](t),wy={ascend:"ASC",descend:"DESC"},vy={ASC:"ascend",DESC:"descend"},{useForm:Cy}=z.Form,Sy=o.defineComponent({name:"PageRendererTableView",components:{aicon:tn,Table:z.Table,Space:z.Space,TableCell:ny,TableCopyCell:ry,TableImageCell:sy,LoadingOutlined:ge.LoadingOutlined,ConditionBuilder:Sa},props:{tableProps:{type:Object,default:()=>{}},config:{type:Array,default:()=>[]},conditions:{type:Array,default:()=>[]},current:{type:Number,default:1},hasApiConfig:{type:Boolean,required:!0},rowKey:{type:String||Function,default:(e,t)=>t},rowDblclickAction:{type:String,default:null},data:{type:Object,default:()=>{}},loading:{type:Boolean,default:!1},total:{type:Object,default:()=>{}},defaultSort:{type:Object,default:()=>{}},sort:{type:Object,default:()=>{}}},emits:["filter","search","changeExpand","update:current","update:sort","linkClick"],setup(e,{expose:t,emit:n}){var x;const r=async()=>{await o.nextTick(),As(C,$=>{const L=$[0],{height:I}=L.contentRect;a.value=I-44-(e.hasApiConfig?0:30)})};o.onMounted(r);const{enumerations:i}=Bn(),a=o.ref(0),l="filter_",s="_index",{config:c,conditions:u,hasApiConfig:d,rowKey:f,data:h,total:p}=o.toRefs(e),C=o.ref(null),m=o.inject("pageName",""),w=o.inject("emitHandler",()=>{}),v=o.ref(e.sort||{});let _=!1;const b=$=>{n("update:sort",$),_&&(_=!1)},k=$=>{b($),n("search")};o.watch(()=>e.defaultSort,$=>{_=!0,v.value=$}),o.watch(v,($,L)=>{const I=Object.keys($)[0];if(I){const F=c.value.find(W=>W.columnKey===I);F!=null&&F.sortable&&(_?b(v.value):k(v.value))}else{const F=Object.keys(L)[0];if(F){const W=c.value.find(Z=>Z.columnKey===F);W!=null&&W.sortable&&(_?b(v.value):k(v.value))}}});const S=o.ref([]),T=o.ref([]),O=o.ref([]),A=o.ref([]),g=o.ref({}),y=o.ref([]),{selectedRows:E,selectedRowKeys:B,selectedErrorRowKeys:j}=Yt();j[m]||(j[m]=[]);const M=o.computed(()=>B[m].length>0),R=o.computed(()=>{if(d.value)return ba(u.value,"fieldName");{const $=c.value.reduce((L,I)=>(I.filterable&&L.push({...I,label:I.title,type:I.filterType,fieldName:I.columnKey,filterKey:I.columnKey,otherProps:{...I,...I.otherProps?I.otherProps:{}}}),L),[]);return ba($,"columnKey")}}),N=o.ref(!d.value),D=o.inject("tableCellSlots",{}),P=()=>{N.value=!N.value},K=$=>$&&$.dataIndex===s,V=$=>$.dataIndex==="action"||$.cellValueType==="slot",q=($,L)=>Kt($[L.dataIndex])||$[L.dataIndex]==="",ie=({text:$,column:L,record:I,index:F})=>K(L)?F+1:o.isVNode($)||!L||V(L)?$:q(I,L)?" - ":$,le=($,L)=>{B[m]=$,E[m]=L},ae=()=>{le([],[])},ue=o.ref((x=e.tableProps)!=null&&x.expandedRowKeys?[...e.tableProps.expandedRowKeys]:[]);o.watch(()=>{var $;return($=e.tableProps)==null?void 0:$.expandedRowKeys},$=>{$&&(ue.value=[...$])},{immediate:!0});const he=$=>{const L=window.getSelection();if(L&&(L==null?void 0:L.toString().length)>0)return;const I=[...B[m]],F=f.value;I.indexOf($[F])>=0?I.splice(I.indexOf($[F]),1):I.push($[F]),B[m]=I,E[m]=Jt.value.filter(W=>I.includes(W[F]))},me=$=>({onclick:()=>he($),onDblclick:()=>{e.rowDblclickAction&&w(e.rowDblclickAction,[$])}}),Oe=o.computed(()=>{var I;let $=a.value;M.value&&($-=31),N.value&&($-=33);const L=(I=C.value)==null?void 0:I.querySelector(".ant-table-body");return L&&(L.style.minHeight=`${$}px`),$});o.watchEffect(()=>{y.value=[{align:"center",children:N.value?[{title:"筛选",dataIndex:s,key:"TITLE_"+s,fixed:"left",width:40,align:"center"}]:[],dataIndex:s,fixed:"left",key:s,width:40},...c.value.filter($=>$.show!==!1).map($=>{const{title:L,width:I=150,columnKey:F,cellRenderType:W,cellValueType:Z,copyable:xe,refEnum:Ae,action:Ue,children:Ye,summary:ot,fixed:We,filterable:Yn,sortable:Ga}=$;W==="Link"&&S.value.push(F),W==="HTML"&&T.value.push(F),Z==="slot"&&O.value.push(F),Z==="img"&&A.value.push(F),Z==="map"&&Ae&&(g.value[F]=$);const qa=F!=="action"&&Array.isArray(Ye),Kb=qa?Ye.map(it=>({...it,align:"center",action:Ue,dataIndex:it.columnKey,ellipsis:!0,key:it.columnKey,resizable:!0,width:I})):N.value?[{action:Ue,align:"center",cellValueType:Z,copyable:xe,childActions:F==="action"?Ye:[],dataIndex:F,ellipsis:!0,filterable:Yn,fixed:F==="action"?!0:We,key:l+F,resizable:!0,summary:ot,title:"",width:I}]:[];return{action:Ue,align:"center",cellValueType:Z,copyable:xe,childActions:F==="action"?Ye:[],children:Kb,dataIndex:F,ellipsis:!0,fixed:F==="action"?!0:We,key:F,resizable:!0,summary:ot,sortable:Ga,sorter:qa?!1:Ga||((it,Xa)=>typeof it[F]=="string"?it[F].localeCompare(Xa[F]):it[F]-Xa[F]),sortOrder:vy[v.value[F]],showSorterTooltip:!1,title:L,width:I}})]});function ve($){let L=[];return $.forEach(I=>{I.children&&I.children.length>0?L=L.concat(ve(I.children)):L.push(I.dataIndex)}),L}const de=o.computed(()=>ve(y.value).map($=>$===s?p.value.count:p.value[$])),{formState:Ce}=Ut(),{validate:_e}=Cy(Ce[m]),Ie=()=>{_e().then(()=>e.current===1?n("search"):n("update:current",1)).catch($=>{console.warn($)})},Vn=()=>{n("filter")},Un=$=>{R.value[$].type==="Input"?Vn():o.nextTick(Ie)},Vr=($,L,I)=>{Array.isArray(I)||(I.columnKey&&I.order?v.value={[I.columnKey]:wy[I.order]}:v.value={})},Ur=()=>{v.value=e.defaultSort},Zt=o.computed(()=>Object.keys(g.value)),Jt=o.computed(()=>{const $=y.value.filter(I=>I.action!==void 0||I.key==="action").reduce((I,F)=>{var W;return F.key==="action"?(W=F.child)==null||W.forEach(Z=>{I[`${Z.action}Loading`]=!1}):I[`${F.action}Loading`]=!1,I},{});return Array.isArray(h.value)?h.value.map(I=>({...I,...Zt.value.reduce((F,W)=>{var Z,xe,Ae,Ue;if(g.value[W].refEnumLabel){const Ye=(xe=(Z=i[g.value[W].refEnum])==null?void 0:Z.find(ot=>{var We,Yn;return((We=ot.id)==null?void 0:We.toString())===((Yn=I[g.value[W].refEnum])==null?void 0:Yn.toString())}))==null?void 0:xe[g.value[W].refEnumLabel];F[Ht][W]=Ye}else F[Ht][W]=(Ue=(Ae=i[g.value[W].refEnum])==null?void 0:Ae.find(Ye=>{var ot,We;return((ot=Ye.value)==null?void 0:ot.toString())===((We=I[W])==null?void 0:We.toString())}))==null?void 0:Ue.label;return F},{[Ht]:o.reactive({})}),[Wt]:o.reactive(Ft($))})):[]});o.watch(Jt,()=>{ue.value=[]});const Yr=($,L)=>{L.width=$,L.children&&L.children.length>0&&(L.children[L.children.length-1].width=$)},en=($,L)=>{var I;return((I=c.value.find(F=>F.columnKey===L.dataIndex))==null?void 0:I[$])||""},Wr=($,L,I,F)=>{const W=en("action",L)||F;$[Wt][`${W}Loading`]=!0,n("linkClick",en("action",L)||F,I,[{...$}],()=>$[Wt][`${W}Loading`]=!1)},Hr=($,L)=>{if($.length!==3)return console.warn(`【${$}】表达式不合法,默认计算为显示`),!0;const[I,F,W]=$;return F==="equal"?ya(L[I],W):F==="unequal"?!ya(L[I],W):!0};return o.onRenderTriggered($=>{}),t({clearSort:Ur,clearSelect:ae,toggleTableHeight:r}),{h:o.h,y:a,isNil:Kt,columns:y,totalList:de,pageName:m,keywords:Zt,computedY:Oe,dataSource:Jt,LOADING_SIGN:Wt,tableWrapper:C,linkCellKeys:S,htmlCellKeys:T,slotCellKeys:O,imgCellKeys:A,tableCellSlots:D,selectedRows:E,selectedRowKeys:B,selectedErrorRowKeys:j,showSelectionSummaryRow:M,DATA_SOURCE_FILTER_PREFIX:l,DATA_SOURCE_INDEX_KEY:s,formState:Ce,fieldNameConditionsByKey:R,isHeaderFilterable:N,FilterOutlined:ge.FilterOutlined,TABLE_ROW_CLASS_NAME:zg,localExpandedRowKeys:ue,headerFilterSwitch:P,onSubmit:Ie,onTableChange:Vr,onConditionChange:Un,onHeaderFilterChange:Vn,emit:n,customRow:me,actionVisible:Hr,onSelectChange:le,handleLinkClick:Wr,transformSummary:by,transformCellText:ie,handleResizeColumn:Yr,findConfigByColumnKey:en,copyTextRender:xn}}}),fw="",Ey={ref:"tableWrapper",style:{flex:"auto",overflow:"hidden"}},Ty={key:1},Oy={style:{color:"#999"}},_y={key:1},Ay={key:2},$y=["onClick"],ky=o.createElementVNode("span",{class:"table-summary-cell-text"},"选中",-1),Ny={key:0,class:"table-summary-cell-text"},Py={key:1,class:"table-summary-cell-text"},Iy=o.createElementVNode("span",{class:"table-summary-cell-text"},"总计",-1),Dy={class:"table-summary-cell-text"};function Ry(e,t,n,r,i,a){var k;const l=o.resolveComponent("a-button"),s=o.resolveComponent("a-tooltip"),c=o.resolveComponent("ConditionBuilder"),u=o.resolveComponent("a-input"),d=o.resolveComponent("aicon"),f=o.resolveComponent("LoadingOutlined"),h=o.resolveComponent("Space"),p=o.resolveComponent("TableImageCell"),C=o.resolveComponent("TableCell"),m=o.resolveComponent("TableCopyCell"),w=o.resolveComponent("a-table-summary-cell"),v=o.resolveComponent("a-table-summary-row"),_=o.resolveComponent("a-table-summary"),b=o.resolveComponent("Table");return o.openBlock(),o.createElementBlock("div",Ey,[o.createVNode(b,{bordered:"",size:"small","data-source":e.dataSource,columns:e.columns,"expand-column-width":40,loading:e.loading,pagination:!1,scroll:{y:e.computedY},"row-key":e.rowKey,"custom-row":e.customRow,"expanded-row-keys":e.localExpandedRowKeys,"onUpdate:expandedRowKeys":t[1]||(t[1]=S=>e.localExpandedRowKeys=S),"row-class-name":(S,T)=>`${T%2===1?"table-striped-row":""} ${e.selectedErrorRowKeys[e.pageName].includes(S[e.rowKey])?"table-error-row":""} ${S[e.TABLE_ROW_CLASS_NAME]?S[e.TABLE_ROW_CLASS_NAME]:""}`,"row-selection":{fixed:!0,columnWidth:40,onChange:e.onSelectChange,selectedRowKeys:e.selectedRowKeys[e.pageName]},"transform-cell-text":e.transformCellText,onResizeColumn:e.handleResizeColumn,onChange:e.onTableChange},o.createSlots({headerCell:o.withCtx(({column:S})=>{var T;return[S.key===e.DATA_SOURCE_INDEX_KEY?(o.openBlock(),o.createElementBlock("div",{key:0,onClick:t[0]||(t[0]=(...O)=>e.headerFilterSwitch&&e.headerFilterSwitch(...O))},[o.createVNode(s,{title:e.isHeaderFilterable?"关闭筛选表头":"开启筛选表头"},{default:o.withCtx(()=>[o.createVNode(l,{type:"text",icon:e.h(e.FilterOutlined)},null,8,["icon"])]),_:1},8,["title"])])):(o.openBlock(),o.createElementBlock("div",Ty,[S.sortable===!1?(o.openBlock(),o.createBlock(s,{key:0},{title:o.withCtx(()=>[o.createTextVNode("仅支持当前页的筛选排序,不支持跨页筛选排序。如需统计全部数据,请点[导出全部],在 excel 统计。")]),default:o.withCtx(()=>[o.createElementVNode("span",Oy,o.toDisplayString(S.title),1)]),_:2},1024)):(o.openBlock(),o.createElementBlock("div",_y,o.toDisplayString(S.title),1)),(T=S.key)!=null&&T.startsWith(e.DATA_SOURCE_FILTER_PREFIX)?(o.openBlock(),o.createElementBlock("div",Ay,[e.fieldNameConditionsByKey[S.dataIndex]?(o.openBlock(),o.createBlock(c,{key:0,value:e.formState[e.pageName][S.dataIndex],"onUpdate:value":O=>e.formState[e.pageName][S.dataIndex]=O,materials:e.fieldNameConditionsByKey[S.dataIndex],onChange:()=>{e.onConditionChange(S.dataIndex)},onPressEnter:e.onSubmit,style:{width:"100%"}},null,8,["value","onUpdate:value","materials","onChange","onPressEnter"])):(o.openBlock(),o.createBlock(u,{key:1,disabled:"",size:"small",value:e.formState[e.pageName][S.dataIndex],"onUpdate:value":O=>e.formState[e.pageName][S.dataIndex]=O,onChange:e.onHeaderFilterChange,onPressEnter:e.onSubmit},null,8,["value","onUpdate:value","onChange","onPressEnter"]))])):o.createCommentVNode("",!0)]))]}),bodyCell:o.withCtx(({text:S,record:T,index:O,column:A})=>[A.dataIndex==="action"?(o.openBlock(),o.createBlock(h,{key:0},{default:o.withCtx(()=>[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(A.childActions,g=>(o.openBlock(),o.createElementBlock(o.Fragment,{key:g.action},[g.show===void 0||e.actionVisible(g.show,T)?(o.openBlock(),o.createElementBlock(o.Fragment,{key:0},[T[e.LOADING_SIGN][`${g.action}Loading`]?(o.openBlock(),o.createBlock(f,{key:1,style:{color:"#1890ff"}})):(o.openBlock(),o.createElementBlock("a",{key:0,onClick:o.withModifiers(y=>{g.disabled&&e.actionVisible(g.disabled,T)||e.handleLinkClick(T,A,y,g.action)},["stop"]),class:o.normalizeClass({"ant-table-action-disabled":g.disabled&&e.actionVisible(g.disabled,T)}),style:o.normalizeStyle({color:g.color})},[g.icon?(o.openBlock(),o.createBlock(d,{key:0,type:g.icon},null,8,["type"])):o.createCommentVNode("",!0),o.createTextVNode(" "+o.toDisplayString(g.text),1)],14,$y))],64)):o.createCommentVNode("",!0)],64))),128))]),_:2},1024)):o.createCommentVNode("",!0),e.slotCellKeys.includes(A.dataIndex)?(o.openBlock(),o.createElementBlock(o.Fragment,{key:1},[e.tableCellSlots[A.dataIndex].component?(o.openBlock(),o.createBlock(o.resolveDynamicComponent(e.tableCellSlots[A.dataIndex].component),o.normalizeProps(o.mergeProps({key:0},{text:S,row:T,index:O,column:A,...e.tableCellSlots[A.dataIndex].props})),null,16)):o.createCommentVNode("",!0)],64)):e.imgCellKeys.includes(A.dataIndex)?(o.openBlock(),o.createElementBlock(o.Fragment,{key:2},[S?(o.openBlock(),o.createBlock(p,o.normalizeProps(o.mergeProps({key:0},{image:S})),null,16)):o.createCommentVNode("",!0)],64)):[...e.linkCellKeys,...e.keywords,...e.htmlCellKeys].includes(A.dataIndex)?(o.openBlock(),o.createBlock(C,o.normalizeProps(o.mergeProps({key:3},{row:T,copyable:A.copyable,column:A,loading:T[e.LOADING_SIGN][`${A.action}Loading`],keywords:e.keywords,linkCellKeys:e.linkCellKeys,handleLinkClick:e.handleLinkClick})),null,16)):A.copyable?(o.openBlock(),o.createElementBlock(o.Fragment,{key:4},[S?(o.openBlock(),o.createBlock(m,o.normalizeProps(o.mergeProps({key:0},{text:S})),null,16)):o.createCommentVNode("",!0)],64)):o.createCommentVNode("",!0)]),summary:o.withCtx(()=>[o.createVNode(_,{fixed:""},{default:o.withCtx(()=>[o.withDirectives(o.createVNode(v,{class:"table-summary-selection"},{default:o.withCtx(()=>[o.createVNode(w,{index:0},{default:o.withCtx(()=>[ky]),_:1}),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(e.columns,(S,T)=>(o.openBlock(),o.createBlock(w,{key:S.key,index:T+1,style:{"text-align":"center"}},{default:o.withCtx(()=>[T===0?(o.openBlock(),o.createElementBlock("span",Ny,o.toDisplayString(e.selectedRowKeys[e.pageName].length),1)):(o.openBlock(),o.createElementBlock("span",Py,o.toDisplayString(S.summary?e.transformSummary(S.summary,S):null),1))]),_:2},1032,["index"]))),128))]),_:1},512),[[o.vShow,e.showSelectionSummaryRow]]),e.hasApiConfig?o.createCommentVNode("",!0):(o.openBlock(),o.createBlock(v,{key:0},{default:o.withCtx(()=>[o.createVNode(w,{index:0},{default:o.withCtx(()=>[Iy]),_:1}),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(e.totalList,(S,T)=>(o.openBlock(),o.createBlock(w,{key:T,index:T+1,style:{"text-align":"center"}},{default:o.withCtx(()=>[o.createElementVNode("span",Dy,o.toDisplayString(S),1)]),_:2},1032,["index"]))),128))]),_:1}))]),_:1})]),_:2},[(k=e.tableProps)!=null&&k.expandedRowRender?{name:"expandedRowRender",fn:o.withCtx(({record:S,index:T,indent:O,expanded:A})=>[(o.openBlock(),o.createBlock(o.resolveDynamicComponent(e.tableProps.expandedRowRender.component),o.normalizeProps(o.guardReactiveProps({row:S,index:T,indent:O,expanded:A,...e.tableProps.expandedRowRender.props})),null,16))]),key:"0"}:void 0]),1032,["data-source","columns","loading","scroll","row-key","custom-row","expanded-row-keys","row-class-name","row-selection","transform-cell-text","onResizeColumn","onChange"])],512)}const By=$e(Sy,[["render",Ry]]);async function My(e,t){return Pg(e,"/meta-server-web/page/customPageConfig",t)}const xy={COLUMN_SETTING:"fieldShowConfigList",FILTER_SETTING:"fieldFilterConfigList",SORT_SETTING:"fieldSortConfigList"},Ly=o.defineComponent({name:"PageRendererColumnSettingModal",components:{Modal:z.Modal,Space:z.Space,Button:z.Button,Transfer:z.Transfer},props:{hasApiConfig:{type:Boolean,required:!0},visible:{type:Boolean,default:!1,required:!0},type:{type:String,default:"SORT_SETTING"},title:{type:String,default:"标题"},columns:{type:Array,default:()=>[]}},emits:["change","update:visible"],setup(e,{emit:t}){const n=Rn(),r=Dr(),i=to(e,"visible",t),a=o.inject("pageName",""),l=eo(Ta,{}),s=o.ref(!1),c=o.ref([]),u=o.reactive({dataSource:[]});o.watch(i,S=>{if(!S)c.value=[],u.dataSource=[];else{let T=Ft(o.toRaw(e.columns));const O=l.value[a];if(O){const A=Ft(o.toRaw(e.columns));T=[...O.filter(y=>A.find(E=>E.columnKey===y.columnKey)).map(y=>{const E=A.findIndex(j=>j.columnKey===y.columnKey);return{...A.splice(E,1)[0],show:y.show}}),...A]}u.dataSource=T.map(A=>(A.show!==!1&&c.value.push(A.columnKey),{...A,disabled:A.columnKey==="action"||A.fixed!==void 0||A.disabled,key:A.columnKey,rowExpandable:!1}))}});const d=[{title:"列名",dataIndex:"title"}],f=()=>{e.hasApiConfig&&e.type==="COLUMN_SETTING"&&z.Modal.confirm({title:"确认重置为默认值吗?",getContainer:b,onOk(){l.value[a]=void 0,t("change")}})},h=async()=>{const S=o.toRaw(c.value),{dataSource:T}=u;if(e.hasApiConfig&&e.type==="COLUMN_SETTING"){if(S.length<5){z.message.warn("显示列不能小于 5 项!");return}const y=T.map(E=>({columnKey:E.columnKey,show:S.includes(E.columnKey)}));l.value[a]=y,t("change");return}const{category:O,tab:A}=n.meta,g=S.map(y=>{const E={},B=T.find(j=>j.columnKey===y);if(E.entityId=B.entityId,E.columnKey=B.columnKey,e.type==="SORT_SETTING"){const[j,M]=B.columnKey.split("@");E.columnKey=j,E.sort=M}return E});try{s.value=!0,await My(r,{[xy[e.type]]:g,category:O,label:A}),t("change")}catch(y){console.warn(y)}finally{s.value=!1}},p=()=>i.value=!1,C=({disabled:S,selectedKeys:T,onItemSelectAll:O,onItemSelect:A})=>({getCheckboxProps:g=>({disabled:S||g.disabled}),onSelectAll(g,y){const E=y.filter(B=>!B.disabled).map(({key:B})=>B);O(E,g)},onSelect({key:g},y){A(g,y)},selectedRowKeys:T});let m="",w="";const v=(S,T,O,A)=>({style:{cursor:"move"},onMouseenter:g=>{var E;const y=g||window.event;S.key==="action"||(E=e.columns.find(B=>B.columnKey===S.key))!=null&&E.fixed||(y.target.draggable=!0)},onDragstart:g=>{(g||window.event).stopPropagation(),m=S.key,document.querySelectorAll(".drag-modal-wrapper .source-table .ant-table-row")[T].classList.add("source")},onDragover:g=>{(g||window.event).preventDefault()},onDragenter:g=>{(g||window.event).preventDefault();const E=document.querySelectorAll(".drag-modal-wrapper .ant-table-row");if(u.dataSource[T].disabled)return;const B=document.querySelectorAll(".ant-table-row.target");B.length&&B[0].classList.remove("target"),E[T+(u.dataSource.length-c.value.length)].classList.add("target"),w=S.key},onDrop:g=>{(g||window.event).stopPropagation();const E=document.querySelectorAll(".ant-table-row.target");E.length&&E[0].classList.remove("target");const B=document.querySelectorAll(".ant-table-row.source");if(B.length&&B[0].classList.remove("source"),w===m)return;const j=u.dataSource.slice(),M=j.findIndex(D=>D.key===m),R=j[M];j.splice(M,1);const N=j.findIndex(D=>D.key===w);j.splice(N,0,R),Object.assign(u,{dataSource:j})},onClick:()=>{const{key:g,disabled:y}=S;y||A(g,!O.includes(g))},ondblclick:()=>{const{key:g,disabled:y}=S;if(y)return;const E=c.value.indexOf(g);E>-1?c.value.splice(E,1):c.value.push(g)}}),_=(S,T,O,A)=>({onClick:()=>{const{key:g,disabled:y}=S;y||A(g,!O.includes(g))},ondblclick:()=>{const{key:g,disabled:y}=S;if(y)return;const E=c.value.indexOf(g);E>-1?c.value.splice(E,1):c.value.push(g)}}),b=()=>document.querySelector(".page-renderer-wrapper");return o.watch(i,S=>{S&&o.nextTick(()=>{const T=document.querySelector(".ant-modal-root"),O=T==null?void 0:T.querySelector(".ant-modal-header"),A=T==null?void 0:T.querySelector(".ant-modal");O.style.cursor="move";const g=A.currentStyle||window.getComputedStyle(A,null);O.onmousedown=y=>{const E=y.clientX-O.offsetLeft,B=y.clientY-O.offsetTop;let j,M;g.left.includes("%")?(j=+document.body.clientWidth*(+g.left.replace(/\%/g,"")/100),M=+document.body.clientHeight*(+g.top.replace(/\%/g,"")/100)):(j=+g.left.replace(/\px/g,""),M=+g.top.replace(/\px/g,"")),document.onmousemove=function(R){const N=R.clientX-E,D=R.clientY-B;A.style.left=`${N+j}px`,A.style.top=`${D+M}px`},document.onmouseup=function(){document.onmousemove=null,document.onmouseup=null}}})}),{show:i,loading:s,state:u,toKeys:c,tableColumn:d,handleChange:(S,T,O)=>{const A=S.map(g=>g.split("@")[0]);if(A.length!==$g(A).length){c.value=S.filter(g=>!O.includes(g)),z.message.warn("同一字段不能同时设置升序和降序!");return}},handleReset:f,handleOk:h,customRowRight:v,customRowLeft:_,handleClose:p,getContainer:b,getRowSelection:C}}}),dw="";function Fy(e,t,n,r,i,a){const l=o.resolveComponent("a-table"),s=o.resolveComponent("Transfer"),c=o.resolveComponent("Button"),u=o.resolveComponent("Space"),d=o.resolveComponent("Modal");return o.openBlock(),o.createBlock(d,{"wrap-class-name":"drag-modal-wrapper",visible:e.show,"onUpdate:visible":t[1]||(t[1]=f=>e.show=f),"get-container":e.getContainer,"mask-style":{"background-color":"rgba(255, 255, 255, 0.4)"},"destroy-on-close":!0,onCancel:e.handleClose},{title:o.withCtx(()=>[o.createElementVNode("span",null,o.toDisplayString(e.title),1)]),footer:o.withCtx(()=>[o.createVNode(u,null,{default:o.withCtx(()=>[e.hasApiConfig&&e.type==="COLUMN_SETTING"?(o.openBlock(),o.createBlock(c,{key:0,onClick:e.handleReset},{default:o.withCtx(()=>[o.createTextVNode("重置")]),_:1},8,["onClick"])):o.createCommentVNode("",!0),o.createVNode(c,{type:"primary",loading:e.loading,onClick:e.handleOk},{default:o.withCtx(()=>[o.createTextVNode("确定")]),_:1},8,["loading","onClick"])]),_:1})]),default:o.withCtx(()=>[o.createVNode(s,{"target-keys":e.toKeys,"onUpdate:targetKeys":t[0]||(t[0]=f=>e.toKeys=f),"show-select-all":!1,"data-source":e.state.dataSource,"show-search":!0,titles:["隐藏列","显示列"],"list-style":{"min-height":"430px"},"row-key":f=>f.key,style:{"justify-content":"center"},"filter-option":(f,h)=>{var p;return((p=h.title)==null?void 0:p.indexOf(f))!==-1},onChange:e.handleChange},{children:o.withCtx(({direction:f,selectedKeys:h,disabled:p,onItemSelectAll:C,onItemSelect:m})=>[o.createVNode(l,{size:"small",class:o.normalizeClass(f==="right"?"source-table":""),"row-selection":e.getRowSelection({disabled:p,selectedKeys:h,onItemSelectAll:C,onItemSelect:m}),"show-expand-column":!1,columns:e.tableColumn,"data-source":f==="left"?e.state.dataSource.filter(w=>!e.toKeys.includes(w.key)):e.state.dataSource.filter(w=>e.toKeys.includes(w.key)),pagination:!1,scroll:{y:300},style:o.normalizeStyle({pointerEvents:p?"none":null}),"custom-row":(w,v)=>f==="left"?e.customRowLeft(w,v,h,m):e.customRowRight(w,v,h,m)},null,8,["class","row-selection","columns","data-source","style","custom-row"])]),_:1},8,["target-keys","data-source","row-key","filter-option","onChange"])]),_:1},8,["visible","get-container","mask-style","onCancel"])}const jy=$e(Ly,[["render",Fy]]),zy={},$a=Symbol("GLOBAL_OPTIONS_PROVIDE_KEY"),ka=()=>zy,Ve=e=>e,Ky=Object.prototype.toString,Vy=e=>Ky.call(e),Uy=e=>Vy(e)==="[object Object]",Fn=e=>Array.isArray(e),qt=e=>e!==null&&typeof e=="object",xr=e=>e instanceof Function,Xt=e=>e==null,Lr=typeof window>"u",Na=()=>{var e;return Lr||Xt((e=window.document)===null||e===void 0?void 0:e.visibilityState)?!0:window.document.visibilityState==="visible"},Yy=()=>{var e,t;return(e=!Lr&&((t=window.navigator)===null||t===void 0?void 0:t.onLine))!==null&&e!==void 0?e:!0},Fr=()=>new Promise(()=>{}),Pa=function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0;const r=t.replace(/\[(\d+)\]/g,".$1").split(".");let i=e;for(const a of r)if(i=Object(i)[a],i===void 0)return n;return i},Me=e=>o.isRef(e)?e.value:e,Wy=e=>qt(e)?Object.assign(Fn(e)?[]:{},e):e,jn=new Map,Hy=e=>Xt(e)?void 0:jn.get(e),Gy=(e,t,n)=>{const r=jn.get(e);r!=null&&r.timer&&clearTimeout(r.timer);const i=setTimeout(()=>jn.delete(e),t);jn.set(e,{...n,timer:i})};function Ia(e,t,n){let r,i,a,l,s,c,u=0,d=!1,f=!1,h=!0;const p=!t&&t!==0&&typeof window.requestAnimationFrame=="function";if(typeof e!="function")throw new TypeError("Expected a function");t=+t||0,qt(n)&&(d=!!n.leading,f="maxWait"in n,a=f?Math.max(+n.maxWait||0,t):a,h="trailing"in n?!!n.trailing:h);function C(y){const E=r,B=i;return r=i=void 0,u=y,l=e.apply(B,E),l}function m(y,E){return p?(window.cancelAnimationFrame(s),window.requestAnimationFrame(y)):setTimeout(y,E)}function w(y){if(p)return window.cancelAnimationFrame(y);clearTimeout(y)}function v(y){return u=y,s=m(k,t),d?C(y):l}function _(y){const E=y-c,B=y-u,j=t-E;return f?Math.min(j,a-B):j}function b(y){const E=y-c,B=y-u;return c===void 0||E>=t||E<0||f&&B>=a}function k(){const y=Date.now();if(b(y))return S(y);s=m(k,_(y))}function S(y){return s=void 0,h&&r?C(y):(r=i=void 0,l)}function T(){s!==void 0&&w(s),u=0,r=c=i=s=void 0}function O(){return s===void 0?l:S(Date.now())}function A(){return s!==void 0}function g(){const y=Date.now(),E=b(y);for(var B=arguments.length,j=new Array(B),M=0;M<B;M++)j[M]=arguments[M];if(r=j,i=this,c=y,E){if(s===void 0)return v(c);if(f)return s=m(k,t),C(c)}return s===void 0&&(s=m(k,t)),l}return g.cancel=T,g.flush=O,g.pending=A,g}function Da(e,t){for(const n in t)if(t[n]!==void 0){if(!qt(t[n])||!qt(e[n])||!(n in e)){e[n]=t[n];continue}(Uy(t[n])||Fn(t[n]))&&Da(e[n],t[n])}}function Ra(e){const t=Object.assign({},e);for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];if(!r.length)return t;for(const a of r)Da(t,a);return t}function qy(e,t,n){let r=!0,i=!0;if(typeof e!="function")throw new TypeError("Expected a function");return qt(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),Ia(e,t,{leading:r,trailing:i,maxWait:t})}var Xy=Ve((e,t)=>{let{debounceInterval:n,debounceOptions:r,manual:i}=t;const a=o.ref(!1),l=o.ref(),s=o.computed(()=>r),c=o.computed(()=>Me(n)),u=o.ref(e.context.runAsync);return i||(a.value=!0),o.watchEffect(d=>{Xt(c.value)||(l.value=Ia(f=>f(),c.value,s.value),e.context.runAsync=function(){for(var f=arguments.length,h=new Array(f),p=0;p<f;p++)h[p]=arguments[p];return new Promise((C,m)=>{a.value?(a.value=!1,u.value(...h).then(C).catch(m)):l.value(()=>{u.value(...h).then(C).catch(m)})})},d(()=>{var f;(f=l.value)===null||f===void 0||f.cancel(),e.context.runAsync=u.value}))}),{onCancel(){var d;(d=l.value)===null||d===void 0||d.cancel()}}}),Qy=Ve((e,t)=>{let{errorRetryCount:n=0,errorRetryInterval:r=0}=t;const i=o.ref(),a=o.ref(0),l=o.computed(()=>Me(n)),s=o.computed(()=>Me(r));let c=!1;const u=()=>{a.value=0},d=o.computed(()=>{if(s.value)return s.value;const p=1e3,C=1,m=9,w=Math.floor(Math.random()*2**Math.min(a.value,m)+C);return p*w}),f=()=>{let p;const C=l.value===-1,m=a.value<l.value;return(C||m)&&(C||(a.value+=1),p=setTimeout(()=>{c=!0,e.context.refresh()},d.value)),()=>p&&clearTimeout(p)},h=()=>{i.value&&i.value()};return{onBefore(){c||u(),c=!1,h()},onSuccess(){u()},onError(){i.value=f()},onCancel(){u(),h()}}}),Zy=Ve((e,t)=>{let{ready:n=o.ref(!0),manual:r,defaultParams:i=[]}=t;return o.watch(n,a=>{!r&&a&&e.context.run(...i)},{flush:"sync"}),{onBefore(){if(!(xr(n)?n():n.value))return e.loading.value=!1,{isBreak:!0}}}}),Jy=Ve((e,t)=>{let{refreshDeps:n,refreshDepsAction:r,manual:i}=t;if(n===void 0||Fn(n)&&n.length===0)return{};const a=Fn(n)?n:[n];return o.watch(a,()=>{r?r():!i&&e.context.refresh()}),{}}),eb=Ve((e,t)=>{let{throttleInterval:n,throttleOptions:r}=t;const i=o.ref(),a=o.computed(()=>Me(n)),l=o.computed(()=>r),s=o.ref(e.context.runAsync);return o.watchEffect(c=>{if(Xt(n))return{};i.value=qy(u=>u(),a.value,l.value),e.context.runAsync=function(){for(var u=arguments.length,d=new Array(u),f=0;f<u;f++)d[f]=arguments[f];return new Promise((h,p)=>{i.value(()=>{s.value(...d).then(h).catch(p)})})},c(()=>{var u;(u=i.value)===null||u===void 0||u.cancel(),e.context.runAsync=s.value})}),{onCancel(){var c;(c=i.value)===null||c===void 0||c.cancel()}}});const tb=(e,t)=>n=>{Object.keys(n).forEach(r=>{e[r].value=n[r]}),t.forEach(r=>r(e))},nb=(e,t)=>()=>{let n=t;for(let r=e.length;r-- >0;)n=e[r](n);return n()},rb=(e,t,n)=>{var r,i;const{initialData:a,onSuccess:l,onError:s,onBefore:c,onAfter:u}=t,d=o.ref((r=n==null?void 0:n.loading)!==null&&r!==void 0?r:!1),f=o.shallowRef((i=n==null?void 0:n.data)!==null&&i!==void 0?i:a),h=o.shallowRef(n==null?void 0:n.error),p=o.ref(n==null?void 0:n.params),C=o.ref([]),m=o.shallowRef("pending"),w={},v=tb({status:m,loading:d,data:f,error:h,params:p},[]),_=function(k){for(var S=arguments.length,T=new Array(S>1?S-1:0),O=1;O<S;O++)T[O-1]=arguments[O];if(k==="onQuery"){const A=C.value.map(g=>g.onQuery).filter(Boolean);return{servicePromise:nb(A,T[0])()}}else{const A=C.value.map(g=>{var y;return(y=g[k])===null||y===void 0?void 0:y.call(g,...T)});return Object.assign({},...A)}},b=o.ref(0);return w.runAsync=async function(){for(var k=arguments.length,S=new Array(k),T=0;T<k;T++)S[T]=arguments[T];v({loading:!0,params:S,status:"pending"}),b.value+=1;const O=b.value,{isBreak:A,breakResult:g=Fr()}=_("onBefore",S);if(A)return v({status:"settled"}),g;c==null||c(S);try{const y=()=>new Promise(j=>j(e(...p.value)));let{servicePromise:E}=_("onQuery",y);E||(E=y());const B=await E;return O!==b.value?Fr():(v({data:B,loading:!1,error:void 0,status:"settled"}),_("onSuccess",B,S),l==null||l(B,S),O===b.value&&_("onAfter",S,B,void 0),u==null||u(S),B)}catch(y){if(O!==b.value)return Fr();throw v({loading:!1,error:y,status:"settled"}),_("onError",y,S),s==null||s(y,S),O===b.value&&_("onAfter",S,void 0,y),u==null||u(S),y}},w.run=function(){w.runAsync(...arguments).catch(k=>{s||console.error(k)})},w.cancel=()=>{b.value+=1,v({loading:!1}),_("onCancel")},w.refresh=()=>{w.run(...p.value||[])},w.refreshAsync=()=>w.runAsync(...p.value||[]),w.mutate=k=>{const S=xr(k)?k(f.value):k,T=Wy(S);v({data:T}),_("onMutate",T)},{status:m,loading:d,data:f,error:h,params:p,plugins:C,context:w}};function ob(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;const r=o.inject($a,{}),i={...ka(),...r,...t},{manual:a=!1,defaultParams:l=[]}=i,s=rb(e,i);if(s.plugins.value=n.map(c=>c(s,i)),!a){const c=s.params.value||l;s.context.run(...c)}return o.onUnmounted(()=>{s.context.cancel()}),{loading:s.loading,data:s.data,error:s.error,params:s.params,cancel:s.context.cancel,refresh:s.context.refresh,refreshAsync:s.context.refreshAsync,mutate:s.context.mutate,run:s.context.run,runAsync:s.context.runAsync}}const zn=new Map,ib=(e,t)=>{zn.set(e,t),t.then(n=>(zn.delete(e),n)).catch(()=>{zn.delete(e)})},ab=e=>zn.get(e),rt=new Map,sb=(e,t)=>{rt.has(e)&&rt.get(e).forEach(n=>n(t))},lb=(e,t)=>(rt.has(e)?rt.get(e).push(t):rt.set(e,[t]),()=>{const n=rt.get(e).indexOf(t);rt.get(e).splice(n,1)});var cb=Ve((e,t)=>{let{cacheKey:n,cacheTime:r=6e5,staleTime:i=0,getCache:a,setCache:l}=t;if(!n)return{};const s=xr(n)?n:()=>n,c=o.ref(()=>{});let u;const d=v=>a?a(v):Hy(v),f=(v,_,b)=>{l?l(v,b):Gy(v,_,b),sb(v,b.data)},h=v=>i===-1||v+i>new Date().getTime(),p=(v,_)=>Object.prototype.hasOwnProperty.call(v,_),C=v=>{const _=s(v);return lb(_,b=>{e.data.value=b})},m=s(),w=d(m);return w&&p(w,"data")&&(e.data.value=w.data,e.params.value=w.params),m&&(c.value=C()),o.onUnmounted(()=>{c.value()}),{onBefore(v){const _=s(v),b=d(_);if(!b||!p(b,"data"))return{};if(h(b.time))return e.data.value=b.data,e.loading.value=!1,{isBreak:!0,breakResult:b.data};e.data.value=b.data},onQuery(v){const _=e.params.value,b=s(_);let k=ab(b);return k&&k!==u?()=>k:(k=v(),u=k,ib(b,k),()=>k)},onSuccess(v,_){const b=s(_);b&&(c.value(),f(b,r,{data:v,params:_,time:new Date().getTime()}),c.value=C(_))},onMutate(v){const _=s(e.params.value);_&&(c.value(),f(_,r,{data:v,params:e.params.value,time:new Date().getTime()}),c.value=C(e.params.value))}}});function ub(e){let t,n;class r extends Promise{constructor(a){super(a),this.cancel=()=>{n(),clearTimeout(t)}}}return new r(i=>{n=i,t=setTimeout(n,e)})}function jr(){return new Date().getTime()}var fb=Ve((e,t)=>{let{loadingDelay:n=0,loadingKeep:r=0}=t;const i=o.ref(()=>{}),a=o.computed(()=>Me(n)),l=o.computed(()=>Me(r));let s=0,c={};const u=()=>{let d;return a.value&&(d=setTimeout(()=>{e.status.value==="pending"&&(e.loading.value=!0)},a.value)),()=>d&&clearTimeout(d)};return{onBefore(){e.loading.value=!a.value,i.value(),i.value=u(),s=jr()},onQuery(d){if(!l.value)return()=>d();c=ub(l.value+a.value);const f=async()=>{try{const p=await d();return jr()-s<=a.value&&c.cancel(),Promise.resolve(p)}catch(p){return jr()-s<=a.value&&c.cancel(),Promise.reject(p)}},h=Promise.allSettled([f(),c]).then(p=>{const C=p[0];return C.status==="fulfilled"?C.value:Promise.reject(C.reason)});return()=>h},onCancel(){i.value()},onAfter(){i.value()}}}),zr;const Ba=new Set,Ma=new Set,xa=new Set,Kn=(e,t)=>{let n;switch(e){case"FOCUS_LISTENER":n=Ba;break;case"RECONNECT_LISTENER":n=xa;break;case"VISIBLE_LISTENER":n=Ma;break}if(!n.has(t))return n.add(t),()=>{n.delete(t)}},Kr=e=>{e.forEach(t=>{t()})};!Lr&&(zr=window)!==null&&zr!==void 0&&zr.addEventListener&&(window.addEventListener("visibilitychange",()=>{Na()&&Kr(Ma)},!1),window.addEventListener("focus",()=>Kr(Ba),!1),window.addEventListener("online",()=>Kr(xa),!1));var db=Ve((e,t)=>{let{pollingInterval:n,pollingWhenHidden:r=!1,pollingWhenOffline:i=!1,errorRetryCount:a=0}=t;const l=o.ref(),s=o.ref(!1),c=o.computed(()=>Me(n)),u=o.computed(()=>Me(a)),d=[],f=m=>{m&&d.push(m)},h=()=>(r||Na())&&(i||Yy()),p=m=>{if(e.error.value&&u.value!==0)return;let w;if(!Xt(c.value)&&c.value>=0)if(h())w=setTimeout(m,c.value);else{s.value=!0;return}return()=>w&&clearTimeout(w)},C=()=>{s.value&&h()&&(e.context.refresh(),s.value=!1)};return o.watch(c,()=>{l.value&&(l.value(),l.value=p(()=>e.context.refresh()))}),r||f(Kn("VISIBLE_LISTENER",C)),i||f(Kn("RECONNECT_LISTENER",C)),o.onUnmounted(()=>{d.forEach(m=>m())}),{onBefore(){var m;(m=l.value)===null||m===void 0||m.call(l)},onCancel(){var m;(m=l.value)===null||m===void 0||m.call(l)},onAfter(){l.value=p(()=>e.context.refresh())}}});const pb=(e,t)=>{let n=!1;return function(){n||(n=!0,e(...arguments),setTimeout(()=>{n=!1},t))}};var hb=Ve((e,t)=>{let{refreshOnWindowFocus:n=!1,refocusTimespan:r=5e3}=t;const i=o.computed(()=>Me(n)),a=o.computed(()=>Me(r)),l=[],s=u=>{u&&l.push(u)},c=()=>{l.forEach(u=>u())};return o.watchEffect(()=>{if(c(),i.value){const u=pb(e.context.refresh,a.value);s(Kn("VISIBLE_LISTENER",u)),s(Kn("FOCUS_LISTENER",u))}}),o.onUnmounted(()=>{c()}),{}});function mb(e,t,n){return ob(e,t,[...n||[],fb,Qy,Xy,db,eb,hb,Jy,Zy,cb])}function La(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const n={currentKey:"current",pageSizeKey:"pageSize",totalKey:"total",totalPageKey:"totalPage"},r=o.inject($a,{}),{pagination:i,...a}=t,{currentKey:l,pageSizeKey:s,totalKey:c,totalPageKey:u}=Ra(n,ka().pagination||{},r.pagination||{},i||{}),d=Ra({defaultParams:[{[l]:1,[s]:10}]},a),{data:f,params:h,run:p,...C}=mb(e,d),m=O=>{const[A,...g]=h.value||[],E=[{...A,...O},...g];p(...E)},w=O=>{m({[l]:O})},v=O=>{m({[s]:O})},_=(O,A)=>{m({[l]:O,[s]:A})},b=o.computed(()=>Pa(f.value,c,0)),k=o.computed({get:()=>{var O,A,g;return(O=(A=h.value)===null||A===void 0||(g=A[0])===null||g===void 0?void 0:g[l])!==null&&O!==void 0?O:d.defaultParams[0][l]},set:O=>{w(O)}}),S=o.computed({get:()=>{var O,A,g;return(O=(A=h.value)===null||A===void 0||(g=A[0])===null||g===void 0?void 0:g[s])!==null&&O!==void 0?O:d.defaultParams[0][s]},set:O=>{v(O)}}),T=o.computed(()=>Pa(f.value,u,Math.ceil(b.value/S.value)));return{data:f,params:h,current:k,pageSize:S,total:b,totalPage:T,run:p,changeCurrent:w,changePageSize:v,changePagination:_,...C}}const Fa={ASC:"升序",DESC:"降序"},gb=o.defineComponent({name:"PageRendererTablePage",components:{Conditions:jg,Operations:Zg,SummaryBar:Jg,TableView:By,ColumnSettingModal:jy},props:{page:{type:Object,default:()=>{}},config:{type:Object,default:()=>{}}},setup(e,{expose:t}){const n=Rn(),{page:r}=o.toRefs(e),{apiConfig:i,buttons:a,data:l,page_size_options:s,sort:c}=r.value,u=o.ref(r.value.total),d=o.ref(i==null?void 0:i.summary),f=o.ref(l),h=o.ref(l),p=o.ref(c),C=o.ref(!1),m=o.ref(!1),w=o.ref([]),v=o.ref([]),_=o.ref(),b=o.ref(),k=o.ref(),S={导入:b,导出:_},T=o.computed(()=>({COLUMN_SETTING:r.value.fieldShowConfigList,FILTER_SETTING:r.value.fieldFilterConfigList,SORT_SETTING:r.value.fieldSortConfigList})),O=o.ref(),A=o.inject("transformData",(x,$)=>x),g=o.inject("refreshPage",()=>{}),y=()=>{h.value=ga(f.value,x=>ag(ae,($,L)=>{var I;return["",void 0,null].includes($)||Array.isArray($)?!0:Object.hasOwn(x,L)?hg((I=x[L])==null?void 0:I.toString().toLocaleLowerCase(),$.toString().toLocaleLowerCase()):!0}))};o.watch(f,()=>{y()});const{patchEnumerations:E,patchStaticEnumerations:B}=Bn(),j=o.ref(null),M=o.ref(null),R=o.ref(null),N=eo(Ta,{}),D=o.ref(r.value.columns),P=o.reactive({type:"COLUMN_SETTING",title:"",columns:[],visible:!1}),K=o.computed(()=>r.value.fieldShowConfigList?r.value.fieldShowConfigList.map(x=>x.columnKey):[]),V=o.ref(),q=o.computed(()=>{if(i)return r.value.rowKey||console.warn("【TablePage】rowKey 列表唯一键没有定义"),r.value.rowKey;{const x=ga(D.value,{isUniqueKey:!0});return x.length===0?console.warn("【TablePage】isUniqueKey 请设置唯一键"):x.length>1&&console.warn("【TablePage】isUniqueKey 唯一键应该只有一个"),x[0].columnKey}});(()=>{if(i){const x=Ke(i.list.url,i.list.method||"post");O.value=La(x,{manual:!0,loadingKeep:100,onBefore($){$.forEach(L=>de(L,r.value.name))},onSuccess($){u.value.count=$n($,i.list.totalKey),f.value=A($,e.page.name)}})}else{const x=Ke(`/duckbill-data-query-server/table/search/${n.meta.category}`);O.value=La(x,{manual:!0,loadingKeep:100,pagination:{totalKey:"data.page.total.count"},onBefore($){$.forEach(L=>de(L,r.value.name))},onSuccess($){u.value=$.data.page.total,f.value=$.data.page.data,B($.data.page.enumerations)}}),k.value=Ke(`/duckbill-data-query-server/data/export/${n.meta.category}`,"post",{responseType:"blob"})}})(),o.watchEffect(()=>{a.forEach(x=>{const $=S[x.children];$?$.value=x:x.columnAction?v.value.push(x):w.value.push(x)})});const{initFormState:le}=Ut(),ae=le(r.value.conditions,r.value.defaultQuery,r.value.name),ue=o.ref(s?s[0].value:Ea[0].value),he=o.ref(1),{selectedRows:me,selectedRowKeys:Oe}=Yt();me[e.page.name]&&console.error(`【@yzsf2e/render-core】页面名 ${e.page.name} 重复!`);const ve=()=>{me[e.page.name]=[],Oe[e.page.name]=[]};h.value&&ve();const de=o.inject("paramsGuard",x=>x),Ce=[...r.value.conditions.map(x=>x.fieldName),...Object.keys(r.value.defaultQuery)],_e=(x,$)=>!Kt(x)&&x!==""&&Ce.includes($),Ie=()=>{if(i){const x=Ng({conditions:Vt({...o.toRaw(ae)},_e),pager:{pageNo:he.value,pageSize:ue.value},sort:p.value,listApiConfig:i.list});O.value.run(x)}else{const{category:x,tab:$}=n.meta;O.value.run({category:x,tab:$,pageNumber:he.value,pageSize:ue.value,fetchMode:"BODY",sorts:{},filters:Vt({...o.toRaw(ae)},_e)})}ve(),Zt()},Vn=async x=>{let $;if(x==="SELECTED"){if(Oe[e.page.name]&&Oe[e.page.name].length===0){z.message.warn("至少选中一条数据!");return}$=Oe[e.page.name]}const{category:L,tab:I}=n.meta,F=await k.value({category:L,tab:I,fetchMode:"BODY",sorts:p.value,filters:Vt({...o.toRaw(ae)},_e),ids:$});if(!F)return;const W=/\{\{(.+?)\}\}/g;let Z=`${e.page.name}-{{Date}}.xlsx`,xe=null;for(;(xe=W.exec(Z))!==null;)xe[1]==="Date"&&(Z=Z.replace(xe[0],fi().format("YYYY-MM-DD")));const Ae=document.createElement("a"),Ue=window.URL.createObjectURL(new Blob([F]));Ae.href=Ue,Ae.download=Z,document.body.appendChild(Ae),Ae.click(),document.body.removeChild(Ae),window.URL.revokeObjectURL(Ue)},Un=()=>{var x,$;(x=R.value)==null||x.resetFields(),($=j.value)==null||$.clearSort()},Vr=()=>{var x;(x=j.value)==null||x.clearSelect()},Ur=()=>{var x;return(x=j.value)==null?void 0:x.toggleTableHeight()},Zt=()=>{var x;return(x=M.value)==null?void 0:x.fetchSummary()},Jt=o.inject("emitHandler",()=>{});o.provide("pageName",e.page.name);const Yr=(x,$,L,I)=>{const F=L||(me[e.page.name]?o.toRaw(me[e.page.name]):[]);Jt(x,F,I)},en=async()=>{P.visible=!1,setTimeout(()=>{g()},500)},Wr=o.computed(()=>D.value.map(x=>({...x,show:i?!0:K.value.includes(x.columnKey)})));o.watchEffect(()=>{const x=Wr.value.sort((I,F)=>{const W=K.value.indexOf(I.columnKey),Z=K.value.indexOf(F.columnKey);return W-Z});v.value.length>0&&x.unshift({title:"操作",align:"center",columnKey:"action",children:v.value.map(I=>({text:I.children,action:I.action})),width:v.value.reduce((I,F)=>I+Number(F.columnActionWidth||50),0)});let $=x;const L=N.value[e.page.name];if(L){const I=Ft(o.toRaw(x));$=[...L.filter(W=>I.find(Z=>Z.columnKey===W.columnKey)).map(W=>{const Z=I.findIndex(Ae=>Ae.columnKey===W.columnKey);return{...I.splice(Z,1)[0],show:W.show}}),...I]}V.value=$}),o.onMounted(async()=>{B(e.page.enumerations),await E(e.page.enumapi),m.value=!0,o.nextTick().then(()=>{Zt()})}),i?o.watch([he,ue],()=>{Ie()}):o.watch([he,ue,p],([x,$,L])=>{const{category:I,tab:F}=n.meta;O.value.run({category:I,tab:F,pageNumber:x,pageSize:$,fetchMode:"BODY",sorts:L.value,filters:Vt({...o.toRaw(ae)},_e)})});const Hr=x=>{if(i){P.columns=[...r.value.columns],P.type=x,P.title=Mr[x],P.visible=!0;return}const $=r.value.fieldList.reduce((L,I)=>{const F={COLUMN_SETTING:!1,SORT_SETTING:!I.sortable,FILTER_SETTING:!I.filterable};if(x==="SORT_SETTING"){const W=T.value[x].find(Z=>Z.columnKey===I.columnKey);Object.keys(Fa).forEach(Z=>{L.push({...I,title:`${I.title}_${Fa[Z]}`,columnKey:`${I.columnKey}@${Z}`,show:W?W.sort===Z:!1,disabled:F[x]})})}else L.push({...I,show:!!T.value[x].find(W=>W.columnKey===I.columnKey),disabled:F[x]});return L},[]);P.columns=Sg($,["disabled"],["asc"]),P.type=x,P.title=Mr[x],P.visible=!0};return t({run:Ie,resetSearch:Un,clearSelect:Vr}),{apiConfig:i,tableData:h,rowKey:q,paginationQuery:O,loaded:m,buttonsConfig:w,exportConfig:_,importConfig:b,summary:d,current:he,pageSize:ue,pageTotal:u,sort:p,tableView:j,conditions:R,summaryBar:M,sortedColumns:V,columnSettingState:P,columnSettingVisible:C,handleSearch:Ie,handleExport:Vn,resetSearch:Un,headerFilterHandle:y,handleEmitAction:Yr,columnSettingChange:en,resizeTableHeight:Ur,handleCustomizeSetting:Hr}}});function yb(e,t,n,r,i,a){var f,h;const l=o.resolveComponent("Conditions"),s=o.resolveComponent("Operations"),c=o.resolveComponent("SummaryBar"),u=o.resolveComponent("TableView"),d=o.resolveComponent("ColumnSettingModal");return e.loaded?(o.openBlock(),o.createElementBlock(o.Fragment,{key:0},[o.createVNode(l,{ref:"conditions",config:e.page.conditions,"default-query":e.page.defaultQuery,searching:e.paginationQuery.loading,"immediate-query":!!e.apiConfig,current:e.current,"onUpdate:current":t[0]||(t[0]=p=>e.current=p),onSearch:e.handleSearch,onResetSearch:e.resetSearch,onChangeExpand:e.resizeTableHeight},null,8,["config","default-query","searching","immediate-query","current","onSearch","onResetSearch","onChangeExpand"]),o.createVNode(s,{total:(f=e.pageTotal)==null?void 0:f.count,config:e.buttonsConfig,"has-api-config":!!e.apiConfig,"export-config":e.apiConfig?e.apiConfig.export:e.exportConfig,"import-config":e.apiConfig?e.apiConfig.import:e.importConfig,"page-size-options":e.page.page_size_options,"handle-export":e.handleExport,pageSize:e.pageSize,"onUpdate:pageSize":t[1]||(t[1]=p=>e.pageSize=p),current:e.current,"onUpdate:current":t[2]||(t[2]=p=>e.current=p),onRefresh:e.handleSearch,onButtonClick:e.handleEmitAction,onCustomizeSetting:e.handleCustomizeSetting},null,8,["total","config","has-api-config","export-config","import-config","page-size-options","handle-export","pageSize","current","onRefresh","onButtonClick","onCustomizeSetting"]),e.summary?(o.openBlock(),o.createBlock(c,{key:0,ref:"summaryBar",config:e.summary},null,8,["config"])):o.renderSlot(e.$slots,"summaryBar",{key:1}),o.createVNode(u,{ref:"tableView","table-props":(h=e.config)==null?void 0:h.table,config:e.sortedColumns,conditions:e.page.conditions,"row-key":e.rowKey,"row-dblclick-action":e.page.rowDblclickAction,data:e.tableData,"has-api-config":!!e.apiConfig,loading:e.paginationQuery.loading,total:e.pageTotal,"default-sort":e.page.sort,current:e.current,"onUpdate:current":t[3]||(t[3]=p=>e.current=p),sort:e.sort,"onUpdate:sort":t[4]||(t[4]=p=>e.sort=p),onFilter:e.headerFilterHandle,onSearch:e.handleSearch,onLinkClick:e.handleEmitAction},null,8,["table-props","config","conditions","row-key","row-dblclick-action","data","has-api-config","loading","total","default-sort","current","sort","onFilter","onSearch","onLinkClick"]),o.createVNode(d,{visible:e.columnSettingState.visible,"onUpdate:visible":t[5]||(t[5]=p=>e.columnSettingState.visible=p),"has-api-config":!!e.apiConfig,type:e.columnSettingState.type,title:e.columnSettingState.title,columns:e.columnSettingState.columns,onChange:e.columnSettingChange},null,8,["visible","has-api-config","type","title","columns","onChange"])],64)):o.createCommentVNode("",!0)}const ja=$e(gb,[["render",yb]]),bb=o.defineComponent({name:"PageRendererTabsPage",components:{TablePage:ja},props:{tabClickAction:{type:String,default:""},pages:{type:Array,default:()=>[]},activePageName:{type:String,default:""},customEvent:{type:Object}},emits:["update:activePageName"],setup(e,{expose:t,emit:n}){const{pages:r}=o.toRefs(e),i=o.inject("actionGuard",null);o.onMounted(()=>{a(r.value[0].name)});const a=p=>{n("update:activePageName",p),u(p,e.pages.findIndex(C=>C.name==p))},l={},s=o.ref({}),c=(p,C)=>{p!==null&&(s.value[C]=p,l[C]=()=>s.value[C].run())},u=(p,C)=>{var w;const m=(w=e.customEvent)==null?void 0:w[e.tabClickAction];if(m)return m({name:p,index:C});if(i)return i(e.tabClickAction,{name:p,index:C});e.tabClickAction&&z.message.warn("没有监听 tab 切换的事件处理函数")};return t({run:p=>{s.value[p]&&l[p]()},resetSearch:p=>{s.value[p]&&s.value[p].resetSearch()},clearSelect:p=>{s.value[p]&&s.value[p].clearSelect()}}),{activeChange:a,setItemRef:c}}});function wb(e,t,n,r,i,a){const l=o.resolveComponent("TablePage"),s=o.resolveComponent("a-tab-pane"),c=o.resolveComponent("a-tabs");return o.openBlock(),o.createBlock(c,{type:"card",size:"small",class:"tabs-page-renderer","active-key":e.activePageName,"tab-bar-gutter":0,onChange:e.activeChange},{default:o.withCtx(()=>[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(e.pages,u=>(o.openBlock(),o.createBlock(s,{key:u.name,tab:u.title},{default:o.withCtx(()=>[o.createVNode(l,{page:u,ref_for:!0,ref:d=>e.setItemRef(d,u.name)},null,8,["page"])]),_:2},1032,["tab"]))),128))]),_:1},8,["active-key","onChange"])}const vb=$e(bb,[["render",wb]]),Cb=e=>({mounted(t,n){var d,f,h;const i=(d=e.currentRoute.value.meta)==null?void 0:d.permissions,{value:a,modifiers:l}=n,s=(f=o.toRaw(a))==null?void 0:f.length;if(!s)return;let c=!1,u=0;i.forEach(p=>{a.includes(p)&&u++}),l.all?c=u===s:c=u>0,c||(h=t.parentNode)==null||h.removeChild(t)}}),Sb=()=>o.getCurrentInstance().appContext,Eb=()=>{const e=Sb(),t=Qa.useRouter();e.directives.permission||e.app.directive("permission",Cb(t))},Tb={items_per_page:"条/页",jump_to:"跳至",jump_to_confirm:"确定",page:"页",prev_page:"上一页",next_page:"下一页",prev_5:"向前 5 页",next_5:"向后 5 页",prev_3:"向前 3 页",next_3:"向后 3 页"};function Qt(e){"@babel/helpers - typeof";return Qt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Qt(e)}function Ob(e,t){if(Qt(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Qt(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function _b(e){var t=Ob(e,"string");return Qt(t)=="symbol"?t:String(t)}function Ab(e,t,n){return t=_b(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function za(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Ka(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?za(Object(n),!0).forEach(function(r){Ab(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):za(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var $b={locale:"zh_CN",today:"今天",now:"此刻",backToToday:"返回今天",ok:"确定",timeSelect:"选择时间",dateSelect:"选择日期",weekSelect:"选择周",clear:"清除",month:"月",year:"年",previousMonth:"上个月 (翻页上键)",nextMonth:"下个月 (翻页下键)",monthSelect:"选择月份",yearSelect:"选择年份",decadeSelect:"选择年代",yearFormat:"YYYY年",dayFormat:"D日",dateFormat:"YYYY年M月D日",dateTimeFormat:"YYYY年M月D日 HH时mm分ss秒",previousYear:"上一年 (Control键加左方向键)",nextYear:"下一年 (Control键加右方向键)",previousDecade:"上一年代",nextDecade:"下一年代",previousCentury:"上一世纪",nextCentury:"下一世纪"};const kb=$b;var Nb={placeholder:"请选择时间",rangePlaceholder:["开始时间","结束时间"]};const Va=Nb;var Ua={lang:Ka({placeholder:"请选择日期",yearPlaceholder:"请选择年份",quarterPlaceholder:"请选择季度",monthPlaceholder:"请选择月份",weekPlaceholder:"请选择周",rangePlaceholder:["开始日期","结束日期"],rangeYearPlaceholder:["开始年份","结束年份"],rangeMonthPlaceholder:["开始月份","结束月份"],rangeQuarterPlaceholder:["开始季度","结束季度"],rangeWeekPlaceholder:["开始周","结束周"]},kb),timePickerLocale:Ka({},Va)};Ua.lang.ok="确定";const Ya=Ua;var we="${label}不是一个有效的${type}",Pb={locale:"zh-cn",Pagination:Tb,DatePicker:Ya,TimePicker:Va,Calendar:Ya,global:{placeholder:"请选择"},Table:{filterTitle:"筛选",filterConfirm:"确定",filterReset:"重置",filterEmptyText:"无筛选项",filterCheckall:"全选",filterSearchPlaceholder:"在筛选项中搜索",selectAll:"全选当页",selectInvert:"反选当页",selectNone:"清空所有",selectionAll:"全选所有",sortTitle:"排序",expand:"展开行",collapse:"关闭行",triggerDesc:"点击降序",triggerAsc:"点击升序",cancelSort:"取消排序"},Modal:{okText:"确定",cancelText:"取消",justOkText:"知道了"},Popconfirm:{cancelText:"取消",okText:"确定"},Transfer:{searchPlaceholder:"请输入搜索内容",itemUnit:"项",itemsUnit:"项",remove:"删除",selectCurrent:"全选当页",removeCurrent:"删除当页",selectAll:"全选所有",removeAll:"删除全部",selectInvert:"反选当页"},Upload:{uploading:"文件上传中",removeFile:"删除文件",uploadError:"上传错误",previewFile:"预览文件",downloadFile:"下载文件"},Empty:{description:"暂无数据"},Icon:{icon:"图标"},Text:{edit:"编辑",copy:"复制",copied:"复制成功",expand:"展开"},PageHeader:{back:"返回"},Form:{optional:"(可选)",defaultValidateMessages:{default:"字段验证错误${label}",required:"请输入${label}",enum:"${label}必须是其中一个[${enum}]",whitespace:"${label}不能为空字符",date:{format:"${label}日期格式无效",parse:"${label}不能转换为日期",invalid:"${label}是一个无效日期"},types:{string:we,method:we,array:we,object:we,number:we,date:we,boolean:we,integer:we,float:we,regexp:we,email:we,url:we,hex:we},string:{len:"${label}须为${len}个字符",min:"${label}最少${min}个字符",max:"${label}最多${max}个字符",range:"${label}须在${min}-${max}字符之间"},number:{len:"${label}必须等于${len}",min:"${label}最小值为${min}",max:"${label}最大值为${max}",range:"${label}须在${min}-${max}之间"},array:{len:"须为${len}个${label}",min:"最少${min}个${label}",max:"最多${max}个${label}",range:"${label}数量须在${min}-${max}之间"},pattern:{mismatch:"${label}与模式不匹配${pattern}"}}},Image:{preview:"预览"}};const Ib=Pb,[Db]=St("page-renderer"),Rb=o.defineComponent({name:Db,components:{TablePage:ja,TabsPage:vb,FormModal:ro,PreviewMediaModal:fr,ConfigProvider:z.ConfigProvider},props:{options:{type:Object,default:null},config:{type:Object,default:()=>{}},form:{type:Object,default:()=>{}},tableCellSlots:{type:Object,default:()=>{}},customEvent:{type:Object}},setup(e,{expose:t}){var A;const n=Rn(),r=o.ref(null),i=o.ref(null),a=o.ref(""),l=o.ref(null),s=o.ref(null),c=o.ref([]),u=o.ref(),d={title:"",component:null},{selectedErrorRowKeys:f}=Yt(),h=o.shallowRef(d),p=o.ref(e.options);o.watch(()=>e.options,g=>{p.value=g});const C=o.ref(!1),m=o.inject("actionGuard",null);Dr().interceptors.response.use(g=>{var y,E;if(g.data&&((y=g.data)==null?void 0:y.type)==="string"&&typeof((E=g.data)==null?void 0:E.value)=="string")try{g.data=JSON.parse(g.data.value)}catch{console.warn("response.data is not a json string")}return g}),o.onMounted(()=>{_()});const v=Ke(`/duckbill-data-query-server/table/search/${n.meta.category}`),_=async()=>{const{category:g,tab:y}=n.meta;if(!e.options&&g&&y){C.value=!0;try{const E=await v({category:g,tab:y,pageNumber:1,pageSize:100,fetchMode:"ALL",sorts:{},filters:{}});p.value=E.data}catch{z.message.error("页面配置请求失败!")}finally{C.value=!1}}},b={locale:Ib,transformCellText:({text:g,column:y,record:E})=>!y||y.dataIndex==="action"?g:Kt(E[y.dataIndex])||E[y.dataIndex]===""?" - ":g},k=(g,y)=>{var E;(E=s.value)==null||E.open(g,y)};o.provide("materials",(A=e.config)==null?void 0:A.materials),o.provide("previewMediaModalOpen",k),o.provide("tableCellSlots",e.tableCellSlots||{}),o.provide("refreshPage",_),o.provide("emitHandler",(g,y,E)=>{var j,M,R;const B=Ft(y);if(e.form===void 0||!e.form[g]){const N=(j=e.customEvent)==null?void 0:j[g];if(!N)return m?m(g,B):z.message.warn("没有找到自定义事件处理函数"),E==null?void 0:E();try{N(B,D=>{var K;const P=(K=p.value.page)==null?void 0:K.rowKey;P&&D.forEach(V=>{var q;V[P]&&f[(q=p.value.page)==null?void 0:q.name].push(V[P])})}).finally(()=>{setTimeout(()=>{E==null||E()},100)})}catch(D){((M=D.message)==null?void 0:M.indexOf("finally"))>-1?z.message.warn("自定义事件处理函数必须返回一个Promise"):z.message.warn(D.message)}}else(((R=e.customEvent)==null?void 0:R[g])||(()=>Promise.resolve()))(B,D=>{var K;const P=(K=p.value.page)==null?void 0:K.rowKey;P&&D.forEach(V=>{var q;V[P]&&f[(q=p.value.page)==null?void 0:q.name].push(V[P])})}).then(D=>{var P;u.value=D,h.value=e.form[g],c.value=h.value.needSelectRows===!1?[]:B,(P=l.value)==null||P.openModal()}).finally(()=>{setTimeout(()=>{E==null||E()},100)})}),Eb();const S=()=>{var g,y;return{basic:(g=r.value)==null?void 0:g.run(),tabs:(y=i.value)==null?void 0:y.run(a.value)}[p.value.type]};return t({run:S,resetSearch:()=>{var g,y;return{basic:(g=r.value)==null?void 0:g.resetSearch(),tabs:(y=i.value)==null?void 0:y.resetSearch(a.value)}[p.value.type]},clearSelect:()=>{var g,y;return{basic:(g=r.value)==null?void 0:g.clearSelect(),tabs:(y=i.value)==null?void 0:y.clearSelect(a.value)}[p.value.type]}}),{run:S,rows:c,tabs:i,table:r,formModal:l,previewMediaModalRef:s,extraData:u,activePageName:a,currentComponent:h,getPopupContainer:b,rendererOptions:p}}}),Bb={class:"page-renderer-wrapper"};function Mb(e,t,n,r,i,a){const l=o.resolveComponent("TablePage"),s=o.resolveComponent("TabsPage"),c=o.resolveComponent("FormModal"),u=o.resolveComponent("PreviewMediaModal"),d=o.resolveComponent("ConfigProvider");return e.rendererOptions?(o.openBlock(),o.createBlock(d,o.normalizeProps(o.mergeProps({key:0},e.getPopupContainer)),{default:o.withCtx(()=>[o.createElementVNode("div",Bb,[e.rendererOptions.type==="basic"?(o.openBlock(),o.createBlock(l,{key:0,page:e.rendererOptions.page,config:e.config,ref:"table"},{summaryBar:o.withCtx(()=>[o.renderSlot(e.$slots,"summaryBar")]),_:3},8,["page","config"])):o.createCommentVNode("",!0),e.rendererOptions.type==="tabs"?(o.openBlock(),o.createBlock(s,{key:1,"tab-click-action":e.rendererOptions.tabClickAction,pages:e.rendererOptions.pages,config:e.config,"custom-event":e.customEvent,activePageName:e.activePageName,"onUpdate:activePageName":t[0]||(t[0]=f=>e.activePageName=f),ref:"tabs"},null,8,["tab-click-action","pages","config","custom-event","activePageName"])):o.createCommentVNode("",!0),o.createVNode(c,{ref:"formModal",form:e.currentComponent,rows:e.rows,"extra-data":e.extraData,onRefresh:e.run},null,8,["form","rows","extra-data","onRefresh"]),o.createVNode(u,{ref:"previewMediaModalRef"},null,512)])]),_:3},16)):o.createCommentVNode("",!0)}const xb=$e(Rb,[["render",Mb]]),pw="",Wa=Et(xb);window["@yzsf2e/render-core"]={version:es.version};const Lb=[tn,qr,no,oo,ci,Wa],{enumerations:Fb}=Bn();function jb(e){return e.replace(/^yzs-/,"").replace(/(?:^|-)([a-z])/g,(t,n)=>n.toUpperCase())}function Ha(e){Lb.forEach(t=>{t.install?(e.use(t),["yzs-date-picker","yzs-drag-drawer","yzs-page-renderer-form-modal","yzs-page-renderer"].includes(t.name)&&e.component(jb(t.name),t)):t.name&&e.component(t.name,t)})}const zb={install:Ha};H.AIcon=tn,H.DatePicker=qr,H.DragDrawer=no,H.DragModal=oo,H.LOADING_SIGN=Wt,H.MAP_SIGN=Ht,H.PageRenderer=Wa,H.PreviewMediaModal=ci,H.datePickerProps=Gr,H.default=zb,H.enumerations=Fb,H.install=Ha,H.showPreviewMediaModal=$u,Object.defineProperties(H,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
12
|
+
*/function io(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function qn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?io(Object(n),!0).forEach(function(r){Ls(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):io(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Xn(e){"@babel/helpers - typeof";return Xn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Xn(e)}function Ms(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ao(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,so(r.key),r)}}function xs(e,t,n){return t&&ao(e.prototype,t),n&&ao(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Ls(e,t,n){return t=so(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Fs(e,t){if(typeof e!="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function so(e){var t=Fs(e,"string");return typeof t=="symbol"?t:String(t)}var lo={backdrop:!0,button:!0,navbar:!0,title:!0,toolbar:!0,className:"",container:"body",filter:null,fullscreen:!0,inheritedAttributes:["crossOrigin","decoding","isMap","loading","referrerPolicy","sizes","srcset","useMap"],initialCoverage:.9,initialViewIndex:0,inline:!1,interval:5e3,keyboard:!0,focus:!0,loading:!0,loop:!0,minWidth:200,minHeight:100,movable:!0,rotatable:!0,scalable:!0,zoomable:!0,zoomOnTouch:!0,zoomOnWheel:!0,slideOnTouch:!0,toggleOnDblclick:!0,tooltip:!0,transition:!0,zIndex:2015,zIndexInline:0,zoomRatio:.1,minZoomRatio:.01,maxZoomRatio:100,url:"src",ready:null,show:null,shown:null,hide:null,hidden:null,view:null,viewed:null,move:null,moved:null,rotate:null,rotated:null,scale:null,scaled:null,zoom:null,zoomed:null,play:null,stop:null},js='<div class="viewer-container" tabindex="-1" touch-action="none"><div class="viewer-canvas"></div><div class="viewer-footer"><div class="viewer-title"></div><div class="viewer-toolbar"></div><div class="viewer-navbar"><ul class="viewer-list" role="navigation"></ul></div></div><div class="viewer-tooltip" role="alert" aria-hidden="true"></div><div class="viewer-button" data-viewer-action="mix" role="button"></div><div class="viewer-player"></div></div>',on=typeof window<"u"&&typeof window.document<"u",Le=on?window:{},at=on&&Le.document.documentElement?"ontouchstart"in Le.document.documentElement:!1,Qn=on?"PointerEvent"in Le:!1,G="viewer",an="move",co="switch",_t="zoom",sn="".concat(G,"-active"),zs="".concat(G,"-close"),ln="".concat(G,"-fade"),Zn="".concat(G,"-fixed"),Ks="".concat(G,"-fullscreen"),uo="".concat(G,"-fullscreen-exit"),He="".concat(G,"-hide"),Vs="".concat(G,"-hide-md-down"),Us="".concat(G,"-hide-sm-down"),Ys="".concat(G,"-hide-xs-down"),Se="".concat(G,"-in"),At="".concat(G,"-invisible"),st="".concat(G,"-loading"),Ws="".concat(G,"-move"),fo="".concat(G,"-open"),lt="".concat(G,"-show"),ce="".concat(G,"-transition"),ct="click",Jn="dblclick",po="dragstart",ho="focusin",mo="keydown",Ee="load",Ge="error",Hs=at?"touchend touchcancel":"mouseup",Gs=at?"touchmove":"mousemove",qs=at?"touchstart":"mousedown",go=Qn?"pointerdown":qs,yo=Qn?"pointermove":Gs,bo=Qn?"pointerup pointercancel":Hs,wo="resize",$e="transitionend",vo="wheel",Co="ready",So="show",Eo="shown",To="hide",Oo="hidden",_o="view",kt="viewed",Ao="move",ko="moved",$o="rotate",No="rotated",Po="scale",Io="scaled",Do="zoom",Ro="zoomed",Bo="play",Mo="stop",cn="".concat(G,"Action"),er=/\s\s*/,un=["zoom-in","zoom-out","one-to-one","reset","prev","play","next","rotate-left","rotate-right","flip-horizontal","flip-vertical"];function $t(e){return typeof e=="string"}var Xs=Number.isNaN||Le.isNaN;function le(e){return typeof e=="number"&&!Xs(e)}function ut(e){return typeof e>"u"}function ft(e){return Xn(e)==="object"&&e!==null}var Qs=Object.prototype.hasOwnProperty;function dt(e){if(!ft(e))return!1;try{var t=e.constructor,n=t.prototype;return t&&n&&Qs.call(n,"isPrototypeOf")}catch{return!1}}function te(e){return typeof e=="function"}function re(e,t){if(e&&te(t))if(Array.isArray(e)||le(e.length)){var n=e.length,r;for(r=0;r<n&&t.call(e,e[r],r,e)!==!1;r+=1);}else ft(e)&&Object.keys(e).forEach(function(i){t.call(e,e[i],i,e)});return e}var be=Object.assign||function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return ft(t)&&r.length>0&&r.forEach(function(a){ft(a)&&Object.keys(a).forEach(function(l){t[l]=a[l]})}),t},Zs=/^(?:width|height|left|top|marginLeft|marginTop)$/;function Ne(e,t){var n=e.style;re(t,function(r,i){Zs.test(i)&&le(r)&&(r+="px"),n[i]=r})}function Js(e){return $t(e)?e.replace(/&(?!amp;|quot;|#39;|lt;|gt;)/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<").replace(/>/g,">"):e}function pt(e,t){return!e||!t?!1:e.classList?e.classList.contains(t):e.className.indexOf(t)>-1}function U(e,t){if(!(!e||!t)){if(le(e.length)){re(e,function(r){U(r,t)});return}if(e.classList){e.classList.add(t);return}var n=e.className.trim();n?n.indexOf(t)<0&&(e.className="".concat(n," ").concat(t)):e.className=t}}function X(e,t){if(!(!e||!t)){if(le(e.length)){re(e,function(n){X(n,t)});return}if(e.classList){e.classList.remove(t);return}e.className.indexOf(t)>=0&&(e.className=e.className.replace(t,""))}}function Nt(e,t,n){if(t){if(le(e.length)){re(e,function(r){Nt(r,t,n)});return}n?U(e,t):X(e,t)}}var el=/([a-z\d])([A-Z])/g;function tr(e){return e.replace(el,"$1-$2").toLowerCase()}function ht(e,t){return ft(e[t])?e[t]:e.dataset?e.dataset[t]:e.getAttribute("data-".concat(tr(t)))}function nr(e,t,n){ft(n)?e[t]=n:e.dataset?e.dataset[t]=n:e.setAttribute("data-".concat(tr(t)),n)}var xo=function(){var e=!1;if(on){var t=!1,n=function(){},r=Object.defineProperty({},"once",{get:function(){return e=!0,t},set:function(a){t=a}});Le.addEventListener("test",n,r),Le.removeEventListener("test",n,r)}return e}();function ne(e,t,n){var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},i=n;t.trim().split(er).forEach(function(a){if(!xo){var l=e.listeners;l&&l[a]&&l[a][n]&&(i=l[a][n],delete l[a][n],Object.keys(l[a]).length===0&&delete l[a],Object.keys(l).length===0&&delete e.listeners)}e.removeEventListener(a,i,r)})}function Y(e,t,n){var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},i=n;t.trim().split(er).forEach(function(a){if(r.once&&!xo){var l=e.listeners,s=l===void 0?{}:l;i=function(){delete s[a][n],e.removeEventListener(a,i,r);for(var u=arguments.length,d=new Array(u),f=0;f<u;f++)d[f]=arguments[f];n.apply(e,d)},s[a]||(s[a]={}),s[a][n]&&e.removeEventListener(a,s[a][n],r),s[a][n]=i,e.listeners=s}e.addEventListener(a,i,r)})}function fe(e,t,n,r){var i;return te(Event)&&te(CustomEvent)?i=new CustomEvent(t,qn({bubbles:!0,cancelable:!0,detail:n},r)):(i=document.createEvent("CustomEvent"),i.initCustomEvent(t,!0,!0,n)),e.dispatchEvent(i)}function tl(e){var t=e.getBoundingClientRect();return{left:t.left+(window.pageXOffset-document.documentElement.clientLeft),top:t.top+(window.pageYOffset-document.documentElement.clientTop)}}function fn(e){var t=e.rotate,n=e.scaleX,r=e.scaleY,i=e.translateX,a=e.translateY,l=[];le(i)&&i!==0&&l.push("translateX(".concat(i,"px)")),le(a)&&a!==0&&l.push("translateY(".concat(a,"px)")),le(t)&&t!==0&&l.push("rotate(".concat(t,"deg)")),le(n)&&n!==1&&l.push("scaleX(".concat(n,")")),le(r)&&r!==1&&l.push("scaleY(".concat(r,")"));var s=l.length?l.join(" "):"none";return{WebkitTransform:s,msTransform:s,transform:s}}function nl(e){return $t(e)?decodeURIComponent(e.replace(/^.*\//,"").replace(/[?&#].*$/,"")):""}var rr=Le.navigator&&/Version\/\d+(\.\d+)+?\s+Safari/i.test(Le.navigator.userAgent);function Lo(e,t,n){var r=document.createElement("img");if(e.naturalWidth&&!rr)return n(e.naturalWidth,e.naturalHeight),r;var i=document.body||document.documentElement;return r.onload=function(){n(r.width,r.height),rr||i.removeChild(r)},re(t.inheritedAttributes,function(a){var l=e.getAttribute(a);l!==null&&r.setAttribute(a,l)}),r.src=e.src,rr||(r.style.cssText="left:0;max-height:none!important;max-width:none!important;min-height:0!important;min-width:0!important;opacity:0;position:absolute;top:0;z-index:-1;",i.appendChild(r)),r}function dn(e){switch(e){case 2:return Ys;case 3:return Us;case 4:return Vs;default:return""}}function rl(e){var t=qn({},e),n=[];return re(e,function(r,i){delete t[i],re(t,function(a){var l=Math.abs(r.startX-a.startX),s=Math.abs(r.startY-a.startY),c=Math.abs(r.endX-a.endX),u=Math.abs(r.endY-a.endY),d=Math.sqrt(l*l+s*s),f=Math.sqrt(c*c+u*u),p=(f-d)/d;n.push(p)})}),n.sort(function(r,i){return Math.abs(r)<Math.abs(i)}),n[0]}function pn(e,t){var n=e.pageX,r=e.pageY,i={endX:n,endY:r};return t?i:qn({timeStamp:Date.now(),startX:n,startY:r},i)}function ol(e){var t=0,n=0,r=0;return re(e,function(i){var a=i.startX,l=i.startY;t+=a,n+=l,r+=1}),t/=r,n/=r,{pageX:t,pageY:n}}var il={render:function(){this.initContainer(),this.initViewer(),this.initList(),this.renderViewer()},initBody:function(){var t=this.element.ownerDocument,n=t.body||t.documentElement;this.body=n,this.scrollbarWidth=window.innerWidth-t.documentElement.clientWidth,this.initialBodyPaddingRight=n.style.paddingRight,this.initialBodyComputedPaddingRight=window.getComputedStyle(n).paddingRight},initContainer:function(){this.containerData={width:window.innerWidth,height:window.innerHeight}},initViewer:function(){var t=this.options,n=this.parent,r;t.inline&&(r={width:Math.max(n.offsetWidth,t.minWidth),height:Math.max(n.offsetHeight,t.minHeight)},this.parentData=r),(this.fulled||!r)&&(r=this.containerData),this.viewerData=be({},r)},renderViewer:function(){this.options.inline&&!this.fulled&&Ne(this.viewer,this.viewerData)},initList:function(){var t=this,n=this.element,r=this.options,i=this.list,a=[];i.innerHTML="",re(this.images,function(l,s){var c=l.src,u=l.alt||nl(c),d=t.getImageURL(l);if(c||d){var f=document.createElement("li"),p=document.createElement("img");re(r.inheritedAttributes,function(h){var y=l.getAttribute(h);y!==null&&p.setAttribute(h,y)}),r.navbar&&(p.src=c||d),p.alt=u,p.setAttribute("data-original-url",d||c),f.setAttribute("data-index",s),f.setAttribute("data-viewer-action","view"),f.setAttribute("role","button"),r.keyboard&&f.setAttribute("tabindex",0),f.appendChild(p),i.appendChild(f),a.push(f)}}),this.items=a,re(a,function(l){var s=l.firstElementChild,c,u;nr(s,"filled",!0),r.loading&&U(l,st),Y(s,Ee,c=function(f){ne(s,Ge,u),r.loading&&X(l,st),t.loadImage(f)},{once:!0}),Y(s,Ge,u=function(){ne(s,Ee,c),r.loading&&X(l,st)},{once:!0})}),r.transition&&Y(n,kt,function(){U(i,ce)},{once:!0})},renderList:function(){var t=this.index,n=this.items[t];if(n){var r=n.nextElementSibling,i=parseInt(window.getComputedStyle(r||n).marginLeft,10),a=n.offsetWidth,l=a+i;Ne(this.list,be({width:l*this.length-i},fn({translateX:(this.viewerData.width-a)/2-l*t})))}},resetList:function(){var t=this.list;t.innerHTML="",X(t,ce),Ne(t,fn({translateX:0}))},initImage:function(t){var n=this,r=this.options,i=this.image,a=this.viewerData,l=this.footer.offsetHeight,s=a.width,c=Math.max(a.height-l,l),u=this.imageData||{},d;this.imageInitializing={abort:function(){d.onload=null}},d=Lo(i,r,function(f,p){var h=f/p,y=Math.max(0,Math.min(1,r.initialCoverage)),m=s,w=c;n.imageInitializing=!1,c*h>s?w=s/h:m=c*h,y=le(y)?y:.9,m=Math.min(m*y,f),w=Math.min(w*y,p);var S=(s-m)/2,_=(c-w)/2,v={left:S,top:_,x:S,y:_,width:m,height:w,oldRatio:1,ratio:m/f,aspectRatio:h,naturalWidth:f,naturalHeight:p},$=be({},v);r.rotatable&&(v.rotate=u.rotate||0,$.rotate=0),r.scalable&&(v.scaleX=u.scaleX||1,v.scaleY=u.scaleY||1,$.scaleX=1,$.scaleY=1),n.imageData=v,n.initialImageData=$,t&&t()})},renderImage:function(t){var n=this,r=this.image,i=this.imageData;if(Ne(r,be({width:i.width,height:i.height,marginLeft:i.x,marginTop:i.y},fn(i))),t)if((this.viewing||this.moving||this.rotating||this.scaling||this.zooming)&&this.options.transition&&pt(r,ce)){var a=function(){n.imageRendering=!1,t()};this.imageRendering={abort:function(){ne(r,$e,a)}},Y(r,$e,a,{once:!0})}else t()},resetImage:function(){var t=this.image;t&&(this.viewing&&this.viewing.abort(),t.parentNode.removeChild(t),this.image=null,this.title.innerHTML="")}},al={bind:function(){var t=this.options,n=this.viewer,r=this.canvas,i=this.element.ownerDocument;Y(n,ct,this.onClick=this.click.bind(this)),Y(n,po,this.onDragStart=this.dragstart.bind(this)),Y(r,go,this.onPointerDown=this.pointerdown.bind(this)),Y(i,yo,this.onPointerMove=this.pointermove.bind(this)),Y(i,bo,this.onPointerUp=this.pointerup.bind(this)),Y(i,mo,this.onKeyDown=this.keydown.bind(this)),Y(window,wo,this.onResize=this.resize.bind(this)),t.zoomable&&t.zoomOnWheel&&Y(n,vo,this.onWheel=this.wheel.bind(this),{passive:!1,capture:!0}),t.toggleOnDblclick&&Y(r,Jn,this.onDblclick=this.dblclick.bind(this))},unbind:function(){var t=this.options,n=this.viewer,r=this.canvas,i=this.element.ownerDocument;ne(n,ct,this.onClick),ne(n,po,this.onDragStart),ne(r,go,this.onPointerDown),ne(i,yo,this.onPointerMove),ne(i,bo,this.onPointerUp),ne(i,mo,this.onKeyDown),ne(window,wo,this.onResize),t.zoomable&&t.zoomOnWheel&&ne(n,vo,this.onWheel,{passive:!1,capture:!0}),t.toggleOnDblclick&&ne(r,Jn,this.onDblclick)}},sl={click:function(t){var n=this.options,r=this.imageData,i=t.target,a=ht(i,cn);switch(!a&&i.localName==="img"&&i.parentElement.localName==="li"&&(i=i.parentElement,a=ht(i,cn)),at&&t.isTrusted&&i===this.canvas&&clearTimeout(this.clickCanvasTimeout),a){case"mix":this.played?this.stop():n.inline?this.fulled?this.exit():this.full():this.hide();break;case"hide":this.pointerMoved||this.hide();break;case"view":this.view(ht(i,"index"));break;case"zoom-in":this.zoom(.1,!0);break;case"zoom-out":this.zoom(-.1,!0);break;case"one-to-one":this.toggle();break;case"reset":this.reset();break;case"prev":this.prev(n.loop);break;case"play":this.play(n.fullscreen);break;case"next":this.next(n.loop);break;case"rotate-left":this.rotate(-90);break;case"rotate-right":this.rotate(90);break;case"flip-horizontal":this.scaleX(-r.scaleX||-1);break;case"flip-vertical":this.scaleY(-r.scaleY||-1);break;default:this.played&&this.stop()}},dblclick:function(t){t.preventDefault(),this.viewed&&t.target===this.image&&(at&&t.isTrusted&&clearTimeout(this.doubleClickImageTimeout),this.toggle(t.isTrusted?t:t.detail&&t.detail.originalEvent))},load:function(){var t=this;this.timeout&&(clearTimeout(this.timeout),this.timeout=!1);var n=this.element,r=this.options,i=this.image,a=this.index,l=this.viewerData;X(i,At),r.loading&&X(this.canvas,st),i.style.cssText="height:0;"+"margin-left:".concat(l.width/2,"px;")+"margin-top:".concat(l.height/2,"px;")+"max-width:none!important;position:relative;width:0;",this.initImage(function(){Nt(i,Ws,r.movable),Nt(i,ce,r.transition),t.renderImage(function(){t.viewed=!0,t.viewing=!1,te(r.viewed)&&Y(n,kt,r.viewed,{once:!0}),fe(n,kt,{originalImage:t.images[a],index:a,image:i},{cancelable:!1})})})},loadImage:function(t){var n=t.target,r=n.parentNode,i=r.offsetWidth||30,a=r.offsetHeight||50,l=!!ht(n,"filled");Lo(n,this.options,function(s,c){var u=s/c,d=i,f=a;a*u>i?l?d=a*u:f=i/u:l?f=i/u:d=a*u,Ne(n,be({width:d,height:f},fn({translateX:(i-d)/2,translateY:(a-f)/2})))})},keydown:function(t){var n=this.options;if(n.keyboard){var r=t.keyCode||t.which||t.charCode;switch(r){case 13:this.viewer.contains(t.target)&&this.click(t);break}if(this.fulled)switch(r){case 27:this.played?this.stop():n.inline?this.fulled&&this.exit():this.hide();break;case 32:this.played&&this.stop();break;case 37:this.played&&this.playing?this.playing.prev():this.prev(n.loop);break;case 38:t.preventDefault(),this.zoom(n.zoomRatio,!0);break;case 39:this.played&&this.playing?this.playing.next():this.next(n.loop);break;case 40:t.preventDefault(),this.zoom(-n.zoomRatio,!0);break;case 48:case 49:t.ctrlKey&&(t.preventDefault(),this.toggle());break}}},dragstart:function(t){t.target.localName==="img"&&t.preventDefault()},pointerdown:function(t){var n=this.options,r=this.pointers,i=t.buttons,a=t.button;if(this.pointerMoved=!1,!(!this.viewed||this.showing||this.viewing||this.hiding||(t.type==="mousedown"||t.type==="pointerdown"&&t.pointerType==="mouse")&&(le(i)&&i!==1||le(a)&&a!==0||t.ctrlKey))){t.preventDefault(),t.changedTouches?re(t.changedTouches,function(s){r[s.identifier]=pn(s)}):r[t.pointerId||0]=pn(t);var l=n.movable?an:!1;n.zoomOnTouch&&n.zoomable&&Object.keys(r).length>1?l=_t:n.slideOnTouch&&(t.pointerType==="touch"||t.type==="touchstart")&&this.isSwitchable()&&(l=co),n.transition&&(l===an||l===_t)&&X(this.image,ce),this.action=l}},pointermove:function(t){var n=this.pointers,r=this.action;!this.viewed||!r||(t.preventDefault(),t.changedTouches?re(t.changedTouches,function(i){be(n[i.identifier]||{},pn(i,!0))}):be(n[t.pointerId||0]||{},pn(t,!0)),this.change(t))},pointerup:function(t){var n=this,r=this.options,i=this.action,a=this.pointers,l;t.changedTouches?re(t.changedTouches,function(s){l=a[s.identifier],delete a[s.identifier]}):(l=a[t.pointerId||0],delete a[t.pointerId||0]),i&&(t.preventDefault(),r.transition&&(i===an||i===_t)&&U(this.image,ce),this.action=!1,at&&i!==_t&&l&&Date.now()-l.timeStamp<500&&(clearTimeout(this.clickCanvasTimeout),clearTimeout(this.doubleClickImageTimeout),r.toggleOnDblclick&&this.viewed&&t.target===this.image?this.imageClicked?(this.imageClicked=!1,this.doubleClickImageTimeout=setTimeout(function(){fe(n.image,Jn,{originalEvent:t})},50)):(this.imageClicked=!0,this.doubleClickImageTimeout=setTimeout(function(){n.imageClicked=!1},500)):(this.imageClicked=!1,r.backdrop&&r.backdrop!=="static"&&t.target===this.canvas&&(this.clickCanvasTimeout=setTimeout(function(){fe(n.canvas,ct,{originalEvent:t})},50)))))},resize:function(){var t=this;if(!(!this.isShown||this.hiding)&&(this.fulled&&(this.close(),this.initBody(),this.open()),this.initContainer(),this.initViewer(),this.renderViewer(),this.renderList(),this.viewed&&this.initImage(function(){t.renderImage()}),this.played)){if(this.options.fullscreen&&this.fulled&&!(document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement)){this.stop();return}re(this.player.getElementsByTagName("img"),function(n){Y(n,Ee,t.loadImage.bind(t),{once:!0}),fe(n,Ee)})}},wheel:function(t){var n=this;if(this.viewed&&(t.preventDefault(),!this.wheeling)){this.wheeling=!0,setTimeout(function(){n.wheeling=!1},50);var r=Number(this.options.zoomRatio)||.1,i=1;t.deltaY?i=t.deltaY>0?1:-1:t.wheelDelta?i=-t.wheelDelta/120:t.detail&&(i=t.detail>0?1:-1),this.zoom(-i*r,!0,null,t)}}},ll={show:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,n=this.element,r=this.options;if(r.inline||this.showing||this.isShown||this.showing)return this;if(!this.ready)return this.build(),this.ready&&this.show(t),this;if(te(r.show)&&Y(n,So,r.show,{once:!0}),fe(n,So)===!1||!this.ready)return this;this.hiding&&this.transitioning.abort(),this.showing=!0,this.open();var i=this.viewer;if(X(i,He),i.setAttribute("role","dialog"),i.setAttribute("aria-labelledby",this.title.id),i.setAttribute("aria-modal",!0),i.removeAttribute("aria-hidden"),r.transition&&!t){var a=this.shown.bind(this);this.transitioning={abort:function(){ne(i,$e,a),X(i,Se)}},U(i,ce),i.initialOffsetWidth=i.offsetWidth,Y(i,$e,a,{once:!0}),U(i,Se)}else U(i,Se),this.shown();return this},hide:function(){var t=this,n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,r=this.element,i=this.options;if(i.inline||this.hiding||!(this.isShown||this.showing))return this;if(te(i.hide)&&Y(r,To,i.hide,{once:!0}),fe(r,To)===!1)return this;this.showing&&this.transitioning.abort(),this.hiding=!0,this.played?this.stop():this.viewing&&this.viewing.abort();var a=this.viewer,l=this.image,s=function(){X(a,Se),t.hidden()};if(i.transition&&!n){var c=function d(f){f&&f.target===a&&(ne(a,$e,d),t.hidden())},u=function(){pt(a,ce)?(Y(a,$e,c),X(a,Se)):s()};this.transitioning={abort:function(){t.viewed&&pt(l,ce)?ne(l,$e,u):pt(a,ce)&&ne(a,$e,c)}},this.viewed&&pt(l,ce)?(Y(l,$e,u,{once:!0}),this.zoomTo(0,!1,null,null,!0)):u()}else s();return this},view:function(){var t=this,n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.initialViewIndex;if(n=Number(n)||0,this.hiding||this.played||n<0||n>=this.length||this.viewed&&n===this.index)return this;if(!this.isShown)return this.index=n,this.show();this.viewing&&this.viewing.abort();var r=this.element,i=this.options,a=this.title,l=this.canvas,s=this.items[n],c=s.querySelector("img"),u=ht(c,"originalUrl"),d=c.getAttribute("alt"),f=document.createElement("img");if(re(i.inheritedAttributes,function(w){var S=c.getAttribute(w);S!==null&&f.setAttribute(w,S)}),f.src=u,f.alt=d,te(i.view)&&Y(r,_o,i.view,{once:!0}),fe(r,_o,{originalImage:this.images[n],index:n,image:f})===!1||!this.isShown||this.hiding||this.played)return this;var p=this.items[this.index];p&&(X(p,sn),p.removeAttribute("aria-selected")),U(s,sn),s.setAttribute("aria-selected",!0),i.focus&&s.focus(),this.image=f,this.viewed=!1,this.index=n,this.imageData={},U(f,At),i.loading&&U(l,st),l.innerHTML="",l.appendChild(f),this.renderList(),a.innerHTML="";var h=function(){var S=t.imageData,_=Array.isArray(i.title)?i.title[1]:i.title;a.innerHTML=Js(te(_)?_.call(t,f,S):"".concat(d," (").concat(S.naturalWidth," × ").concat(S.naturalHeight,")"))},y,m;return Y(r,kt,h,{once:!0}),this.viewing={abort:function(){ne(r,kt,h),f.complete?t.imageRendering?t.imageRendering.abort():t.imageInitializing&&t.imageInitializing.abort():(f.src="",ne(f,Ee,y),t.timeout&&clearTimeout(t.timeout))}},f.complete?this.load():(Y(f,Ee,y=function(){ne(f,Ge,m),t.load()},{once:!0}),Y(f,Ge,m=function(){ne(f,Ee,y),t.timeout&&(clearTimeout(t.timeout),t.timeout=!1),X(f,At),i.loading&&X(t.canvas,st)},{once:!0}),this.timeout&&clearTimeout(this.timeout),this.timeout=setTimeout(function(){X(f,At),t.timeout=!1},1e3)),this},prev:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,n=this.index-1;return n<0&&(n=t?this.length-1:0),this.view(n),this},next:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,n=this.length-1,r=this.index+1;return r>n&&(r=t?0:n),this.view(r),this},move:function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t,r=this.imageData;return this.moveTo(ut(t)?t:r.x+Number(t),ut(n)?n:r.y+Number(n)),this},moveTo:function(t){var n=this,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,a=this.element,l=this.options,s=this.imageData;if(t=Number(t),r=Number(r),this.viewed&&!this.played&&l.movable){var c=s.x,u=s.y,d=!1;if(le(t)?d=!0:t=c,le(r)?d=!0:r=u,d){if(te(l.move)&&Y(a,Ao,l.move,{once:!0}),fe(a,Ao,{x:t,y:r,oldX:c,oldY:u,originalEvent:i})===!1)return this;s.x=t,s.y=r,s.left=t,s.top=r,this.moving=!0,this.renderImage(function(){n.moving=!1,te(l.moved)&&Y(a,ko,l.moved,{once:!0}),fe(a,ko,{x:t,y:r,oldX:c,oldY:u,originalEvent:i},{cancelable:!1})})}}return this},rotate:function(t){return this.rotateTo((this.imageData.rotate||0)+Number(t)),this},rotateTo:function(t){var n=this,r=this.element,i=this.options,a=this.imageData;if(t=Number(t),le(t)&&this.viewed&&!this.played&&i.rotatable){var l=a.rotate;if(te(i.rotate)&&Y(r,$o,i.rotate,{once:!0}),fe(r,$o,{degree:t,oldDegree:l})===!1)return this;a.rotate=t,this.rotating=!0,this.renderImage(function(){n.rotating=!1,te(i.rotated)&&Y(r,No,i.rotated,{once:!0}),fe(r,No,{degree:t,oldDegree:l},{cancelable:!1})})}return this},scaleX:function(t){return this.scale(t,this.imageData.scaleY),this},scaleY:function(t){return this.scale(this.imageData.scaleX,t),this},scale:function(t){var n=this,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t,i=this.element,a=this.options,l=this.imageData;if(t=Number(t),r=Number(r),this.viewed&&!this.played&&a.scalable){var s=l.scaleX,c=l.scaleY,u=!1;if(le(t)?u=!0:t=s,le(r)?u=!0:r=c,u){if(te(a.scale)&&Y(i,Po,a.scale,{once:!0}),fe(i,Po,{scaleX:t,scaleY:r,oldScaleX:s,oldScaleY:c})===!1)return this;l.scaleX=t,l.scaleY=r,this.scaling=!0,this.renderImage(function(){n.scaling=!1,te(a.scaled)&&Y(i,Io,a.scaled,{once:!0}),fe(i,Io,{scaleX:t,scaleY:r,oldScaleX:s,oldScaleY:c},{cancelable:!1})})}}return this},zoom:function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null,a=this.imageData;return t=Number(t),t<0?t=1/(1-t):t=1+t,this.zoomTo(a.width*t/a.naturalWidth,n,r,i),this},zoomTo:function(t){var n=this,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null,l=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1,s=this.element,c=this.options,u=this.pointers,d=this.imageData,f=d.x,p=d.y,h=d.width,y=d.height,m=d.naturalWidth,w=d.naturalHeight;if(t=Math.max(0,t),le(t)&&this.viewed&&!this.played&&(l||c.zoomable)){if(!l){var S=Math.max(.01,c.minZoomRatio),_=Math.min(100,c.maxZoomRatio);t=Math.min(Math.max(t,S),_)}if(a)switch(a.type){case"wheel":c.zoomRatio>=.055&&t>.95&&t<1.05&&(t=1);break;case"pointermove":case"touchmove":case"mousemove":t>.99&&t<1.01&&(t=1);break}var v=m*t,$=w*t,E=v-h,T=$-y,O=d.ratio;if(te(c.zoom)&&Y(s,Do,c.zoom,{once:!0}),fe(s,Do,{ratio:t,oldRatio:O,originalEvent:a})===!1)return this;if(this.zooming=!0,a){var A=tl(this.viewer),C=u&&Object.keys(u).length>0?ol(u):{pageX:a.pageX,pageY:a.pageY};d.x-=E*((C.pageX-A.left-f)/h),d.y-=T*((C.pageY-A.top-p)/y)}else dt(i)&&le(i.x)&&le(i.y)?(d.x-=E*((i.x-f)/h),d.y-=T*((i.y-p)/y)):(d.x-=E/2,d.y-=T/2);d.left=d.x,d.top=d.y,d.width=v,d.height=$,d.oldRatio=O,d.ratio=t,this.renderImage(function(){n.zooming=!1,te(c.zoomed)&&Y(s,Ro,c.zoomed,{once:!0}),fe(s,Ro,{ratio:t,oldRatio:O,originalEvent:a},{cancelable:!1})}),r&&this.tooltip()}return this},play:function(){var t=this,n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;if(!this.isShown||this.played)return this;var r=this.element,i=this.options;if(te(i.play)&&Y(r,Bo,i.play,{once:!0}),fe(r,Bo)===!1)return this;var a=this.player,l=this.loadImage.bind(this),s=[],c=0,u=0;if(this.played=!0,this.onLoadWhenPlay=l,n&&this.requestFullscreen(n),U(a,lt),re(this.items,function(p,h){var y=p.querySelector("img"),m=document.createElement("img");m.src=ht(y,"originalUrl"),m.alt=y.getAttribute("alt"),m.referrerPolicy=y.referrerPolicy,c+=1,U(m,ln),Nt(m,ce,i.transition),pt(p,sn)&&(U(m,Se),u=h),s.push(m),Y(m,Ee,l,{once:!0}),a.appendChild(m)}),le(i.interval)&&i.interval>0){var d=function p(){clearTimeout(t.playing.timeout),X(s[u],Se),u-=1,u=u>=0?u:c-1,U(s[u],Se),t.playing.timeout=setTimeout(p,i.interval)},f=function p(){clearTimeout(t.playing.timeout),X(s[u],Se),u+=1,u=u<c?u:0,U(s[u],Se),t.playing.timeout=setTimeout(p,i.interval)};c>1&&(this.playing={prev:d,next:f,timeout:setTimeout(f,i.interval)})}return this},stop:function(){var t=this;if(!this.played)return this;var n=this.element,r=this.options;if(te(r.stop)&&Y(n,Mo,r.stop,{once:!0}),fe(n,Mo)===!1)return this;var i=this.player;return clearTimeout(this.playing.timeout),this.playing=!1,this.played=!1,re(i.getElementsByTagName("img"),function(a){ne(a,Ee,t.onLoadWhenPlay)}),X(i,lt),i.innerHTML="",this.exitFullscreen(),this},full:function(){var t=this,n=this.options,r=this.viewer,i=this.image,a=this.list;return!this.isShown||this.played||this.fulled||!n.inline?this:(this.fulled=!0,this.open(),U(this.button,uo),n.transition&&(X(a,ce),this.viewed&&X(i,ce)),U(r,Zn),r.setAttribute("role","dialog"),r.setAttribute("aria-labelledby",this.title.id),r.setAttribute("aria-modal",!0),r.removeAttribute("style"),Ne(r,{zIndex:n.zIndex}),n.focus&&this.enforceFocus(),this.initContainer(),this.viewerData=be({},this.containerData),this.renderList(),this.viewed&&this.initImage(function(){t.renderImage(function(){n.transition&&setTimeout(function(){U(i,ce),U(a,ce)},0)})}),this)},exit:function(){var t=this,n=this.options,r=this.viewer,i=this.image,a=this.list;return!this.isShown||this.played||!this.fulled||!n.inline?this:(this.fulled=!1,this.close(),X(this.button,uo),n.transition&&(X(a,ce),this.viewed&&X(i,ce)),n.focus&&this.clearEnforceFocus(),r.removeAttribute("role"),r.removeAttribute("aria-labelledby"),r.removeAttribute("aria-modal"),X(r,Zn),Ne(r,{zIndex:n.zIndexInline}),this.viewerData=be({},this.parentData),this.renderViewer(),this.renderList(),this.viewed&&this.initImage(function(){t.renderImage(function(){n.transition&&setTimeout(function(){U(i,ce),U(a,ce)},0)})}),this)},tooltip:function(){var t=this,n=this.options,r=this.tooltipBox,i=this.imageData;return!this.viewed||this.played||!n.tooltip?this:(r.textContent="".concat(Math.round(i.ratio*100),"%"),this.tooltipping?clearTimeout(this.tooltipping):n.transition?(this.fading&&fe(r,$e),U(r,lt),U(r,ln),U(r,ce),r.removeAttribute("aria-hidden"),r.initialOffsetWidth=r.offsetWidth,U(r,Se)):(U(r,lt),r.removeAttribute("aria-hidden")),this.tooltipping=setTimeout(function(){n.transition?(Y(r,$e,function(){X(r,lt),X(r,ln),X(r,ce),r.setAttribute("aria-hidden",!0),t.fading=!1},{once:!0}),X(r,Se),t.fading=!0):(X(r,lt),r.setAttribute("aria-hidden",!0)),t.tooltipping=!1},1e3),this)},toggle:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null;return this.imageData.ratio===1?this.zoomTo(this.imageData.oldRatio,!0,null,t):this.zoomTo(1,!0,null,t),this},reset:function(){return this.viewed&&!this.played&&(this.imageData=be({},this.initialImageData),this.renderImage()),this},update:function(){var t=this,n=this.element,r=this.options,i=this.isImg;if(i&&!n.parentNode)return this.destroy();var a=[];if(re(i?[n]:n.querySelectorAll("img"),function(u){te(r.filter)?r.filter.call(t,u)&&a.push(u):t.getImageURL(u)&&a.push(u)}),!a.length)return this;if(this.images=a,this.length=a.length,this.ready){var l=[];if(re(this.items,function(u,d){var f=u.querySelector("img"),p=a[d];p&&f?(p.src!==f.src||p.alt!==f.alt)&&l.push(d):l.push(d)}),Ne(this.list,{width:"auto"}),this.initList(),this.isShown)if(this.length){if(this.viewed){var s=l.indexOf(this.index);if(s>=0)this.viewed=!1,this.view(Math.max(Math.min(this.index-s,this.length-1),0));else{var c=this.items[this.index];U(c,sn),c.setAttribute("aria-selected",!0)}}}else this.image=null,this.viewed=!1,this.index=0,this.imageData={},this.canvas.innerHTML="",this.title.innerHTML=""}else this.build();return this},destroy:function(){var t=this.element,n=this.options;return t[G]?(this.destroyed=!0,this.ready?(this.played&&this.stop(),n.inline?(this.fulled&&this.exit(),this.unbind()):this.isShown?(this.viewing&&(this.imageRendering?this.imageRendering.abort():this.imageInitializing&&this.imageInitializing.abort()),this.hiding&&this.transitioning.abort(),this.hidden()):this.showing&&(this.transitioning.abort(),this.hidden()),this.ready=!1,this.viewer.parentNode.removeChild(this.viewer)):n.inline&&(this.delaying?this.delaying.abort():this.initializing&&this.initializing.abort()),n.inline||ne(t,ct,this.onStart),t[G]=void 0,this):this}},cl={getImageURL:function(t){var n=this.options.url;return $t(n)?n=t.getAttribute(n):te(n)?n=n.call(this,t):n="",n},enforceFocus:function(){var t=this;this.clearEnforceFocus(),Y(document,ho,this.onFocusin=function(n){var r=t.viewer,i=n.target;if(!(i===document||i===r||r.contains(i))){for(;i;){if(i.getAttribute("tabindex")!==null||i.getAttribute("aria-modal")==="true")return;i=i.parentElement}r.focus()}})},clearEnforceFocus:function(){this.onFocusin&&(ne(document,ho,this.onFocusin),this.onFocusin=null)},open:function(){var t=this.body;U(t,fo),this.scrollbarWidth>0&&(t.style.paddingRight="".concat(this.scrollbarWidth+(parseFloat(this.initialBodyComputedPaddingRight)||0),"px"))},close:function(){var t=this.body;X(t,fo),this.scrollbarWidth>0&&(t.style.paddingRight=this.initialBodyPaddingRight)},shown:function(){var t=this.element,n=this.options,r=this.viewer;this.fulled=!0,this.isShown=!0,this.render(),this.bind(),this.showing=!1,n.focus&&(r.focus(),this.enforceFocus()),te(n.shown)&&Y(t,Eo,n.shown,{once:!0}),fe(t,Eo)!==!1&&this.ready&&this.isShown&&!this.hiding&&this.view(this.index)},hidden:function(){var t=this.element,n=this.options,r=this.viewer;n.fucus&&this.clearEnforceFocus(),this.close(),this.unbind(),U(r,He),r.removeAttribute("role"),r.removeAttribute("aria-labelledby"),r.removeAttribute("aria-modal"),r.setAttribute("aria-hidden",!0),this.resetList(),this.resetImage(),this.fulled=!1,this.viewed=!1,this.isShown=!1,this.hiding=!1,this.destroyed||(te(n.hidden)&&Y(t,Oo,n.hidden,{once:!0}),fe(t,Oo,null,{cancelable:!1}))},requestFullscreen:function(t){var n=this.element.ownerDocument;if(this.fulled&&!(n.fullscreenElement||n.webkitFullscreenElement||n.mozFullScreenElement||n.msFullscreenElement)){var r=n.documentElement;r.requestFullscreen?dt(t)?r.requestFullscreen(t):r.requestFullscreen():r.webkitRequestFullscreen?r.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT):r.mozRequestFullScreen?r.mozRequestFullScreen():r.msRequestFullscreen&&r.msRequestFullscreen()}},exitFullscreen:function(){var t=this.element.ownerDocument;this.fulled&&(t.fullscreenElement||t.webkitFullscreenElement||t.mozFullScreenElement||t.msFullscreenElement)&&(t.exitFullscreen?t.exitFullscreen():t.webkitExitFullscreen?t.webkitExitFullscreen():t.mozCancelFullScreen?t.mozCancelFullScreen():t.msExitFullscreen&&t.msExitFullscreen())},change:function(t){var n=this.options,r=this.pointers,i=r[Object.keys(r)[0]];if(i){var a=i.endX-i.startX,l=i.endY-i.startY;switch(this.action){case an:(a!==0||l!==0)&&(this.pointerMoved=!0,this.move(a,l,t));break;case _t:this.zoom(rl(r),!1,null,t);break;case co:{this.action="switched";var s=Math.abs(a);s>1&&s>Math.abs(l)&&(this.pointers={},a>1?this.prev(n.loop):a<-1&&this.next(n.loop));break}}re(r,function(c){c.startX=c.endX,c.startY=c.endY})}},isSwitchable:function(){var t=this.imageData,n=this.viewerData;return this.length>1&&t.x>=0&&t.y>=0&&t.width<=n.width&&t.height<=n.height}},ul=Le.Viewer,fl=function(e){return function(){return e+=1,e}}(-1),Fo=function(){function e(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(Ms(this,e),!t||t.nodeType!==1)throw new Error("The first argument is required and must be an element.");this.element=t,this.options=be({},lo,dt(n)&&n),this.action=!1,this.fading=!1,this.fulled=!1,this.hiding=!1,this.imageClicked=!1,this.imageData={},this.index=this.options.initialViewIndex,this.isImg=!1,this.isShown=!1,this.length=0,this.moving=!1,this.played=!1,this.playing=!1,this.pointers={},this.ready=!1,this.rotating=!1,this.scaling=!1,this.showing=!1,this.timeout=!1,this.tooltipping=!1,this.viewed=!1,this.viewing=!1,this.wheeling=!1,this.zooming=!1,this.pointerMoved=!1,this.id=fl(),this.init()}return xs(e,[{key:"init",value:function(){var n=this,r=this.element,i=this.options;if(!r[G]){r[G]=this,i.focus&&!i.keyboard&&(i.focus=!1);var a=r.localName==="img",l=[];if(re(a?[r]:r.querySelectorAll("img"),function(u){te(i.filter)?i.filter.call(n,u)&&l.push(u):n.getImageURL(u)&&l.push(u)}),this.isImg=a,this.length=l.length,this.images=l,this.initBody(),ut(document.createElement(G).style.transition)&&(i.transition=!1),i.inline){var s=0,c=function(){if(s+=1,s===n.length){var d;n.initializing=!1,n.delaying={abort:function(){clearTimeout(d)}},d=setTimeout(function(){n.delaying=!1,n.build()},0)}};this.initializing={abort:function(){re(l,function(d){d.complete||(ne(d,Ee,c),ne(d,Ge,c))})}},re(l,function(u){if(u.complete)c();else{var d,f;Y(u,Ee,d=function(){ne(u,Ge,f),c()},{once:!0}),Y(u,Ge,f=function(){ne(u,Ee,d),c()},{once:!0})}})}else Y(r,ct,this.onStart=function(u){var d=u.target;d.localName==="img"&&(!te(i.filter)||i.filter.call(n,d))&&n.view(n.images.indexOf(d))})}}},{key:"build",value:function(){if(!this.ready){var n=this.element,r=this.options,i=n.parentNode,a=document.createElement("div");a.innerHTML=js;var l=a.querySelector(".".concat(G,"-container")),s=l.querySelector(".".concat(G,"-title")),c=l.querySelector(".".concat(G,"-toolbar")),u=l.querySelector(".".concat(G,"-navbar")),d=l.querySelector(".".concat(G,"-button")),f=l.querySelector(".".concat(G,"-canvas"));if(this.parent=i,this.viewer=l,this.title=s,this.toolbar=c,this.navbar=u,this.button=d,this.canvas=f,this.footer=l.querySelector(".".concat(G,"-footer")),this.tooltipBox=l.querySelector(".".concat(G,"-tooltip")),this.player=l.querySelector(".".concat(G,"-player")),this.list=l.querySelector(".".concat(G,"-list")),l.id="".concat(G).concat(this.id),s.id="".concat(G,"Title").concat(this.id),U(s,r.title?dn(Array.isArray(r.title)?r.title[0]:r.title):He),U(u,r.navbar?dn(r.navbar):He),Nt(d,He,!r.button),r.keyboard&&d.setAttribute("tabindex",0),r.backdrop&&(U(l,"".concat(G,"-backdrop")),!r.inline&&r.backdrop!=="static"&&nr(f,cn,"hide")),$t(r.className)&&r.className&&r.className.split(er).forEach(function(v){U(l,v)}),r.toolbar){var p=document.createElement("ul"),h=dt(r.toolbar),y=un.slice(0,3),m=un.slice(7,9),w=un.slice(9);h||U(c,dn(r.toolbar)),re(h?r.toolbar:un,function(v,$){var E=h&&dt(v),T=h?tr($):v,O=E&&!ut(v.show)?v.show:v;if(!(!O||!r.zoomable&&y.indexOf(T)!==-1||!r.rotatable&&m.indexOf(T)!==-1||!r.scalable&&w.indexOf(T)!==-1)){var A=E&&!ut(v.size)?v.size:v,C=E&&!ut(v.click)?v.click:v,g=document.createElement("li");r.keyboard&&g.setAttribute("tabindex",0),g.setAttribute("role","button"),U(g,"".concat(G,"-").concat(T)),te(C)||nr(g,cn,T),le(O)&&U(g,dn(O)),["small","large"].indexOf(A)!==-1?U(g,"".concat(G,"-").concat(A)):T==="play"&&U(g,"".concat(G,"-large")),te(C)&&Y(g,ct,C),p.appendChild(g)}}),c.appendChild(p)}else U(c,He);if(!r.rotatable){var S=c.querySelectorAll('li[class*="rotate"]');U(S,At),re(S,function(v){c.appendChild(v)})}if(r.inline)U(d,Ks),Ne(l,{zIndex:r.zIndexInline}),window.getComputedStyle(i).position==="static"&&Ne(i,{position:"relative"}),i.insertBefore(l,n.nextSibling);else{U(d,zs),U(l,Zn),U(l,ln),U(l,He),Ne(l,{zIndex:r.zIndex});var _=r.container;$t(_)&&(_=n.ownerDocument.querySelector(_)),_||(_=this.body),_.appendChild(l)}if(r.inline&&(this.render(),this.bind(),this.isShown=!0),this.ready=!0,te(r.ready)&&Y(n,Co,r.ready,{once:!0}),fe(n,Co)===!1){this.ready=!1;return}this.ready&&r.inline&&this.view(this.index)}}}],[{key:"noConflict",value:function(){return window.Viewer=ul,e}},{key:"setDefaults",value:function(n){be(lo,dt(n)&&n)}}]),e}();be(Fo.prototype,il,al,sl,ll,cl);var dl=typeof global=="object"&&global&&global.Object===Object&&global;const jo=dl;var pl=typeof self=="object"&&self&&self.Object===Object&&self,hl=jo||pl||Function("return this")();const or=hl;var ml=or.Symbol;const hn=ml;var zo=Object.prototype,gl=zo.hasOwnProperty,yl=zo.toString,Pt=hn?hn.toStringTag:void 0;function bl(e){var t=gl.call(e,Pt),n=e[Pt];try{e[Pt]=void 0;var r=!0}catch{}var i=yl.call(e);return r&&(t?e[Pt]=n:delete e[Pt]),i}var wl=Object.prototype,vl=wl.toString;function Cl(e){return vl.call(e)}var Sl="[object Null]",El="[object Undefined]",Ko=hn?hn.toStringTag:void 0;function ir(e){return e==null?e===void 0?El:Sl:Ko&&Ko in Object(e)?bl(e):Cl(e)}function ar(e){return e!=null&&typeof e=="object"}var Tl=Array.isArray;const Ol=Tl;function mn(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}function Vo(e){return e}var _l="[object AsyncFunction]",Al="[object Function]",kl="[object GeneratorFunction]",$l="[object Proxy]";function Uo(e){if(!mn(e))return!1;var t=ir(e);return t==Al||t==kl||t==_l||t==$l}var Nl=or["__core-js_shared__"];const sr=Nl;var Yo=function(){var e=/[^.]+$/.exec(sr&&sr.keys&&sr.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function Pl(e){return!!Yo&&Yo in e}var Il=Function.prototype,Dl=Il.toString;function Rl(e){if(e!=null){try{return Dl.call(e)}catch{}try{return e+""}catch{}}return""}var Bl=/[\\^$.*+?()[\]{}|]/g,Ml=/^\[object .+?Constructor\]$/,xl=Function.prototype,Ll=Object.prototype,Fl=xl.toString,jl=Ll.hasOwnProperty,zl=RegExp("^"+Fl.call(jl).replace(Bl,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Kl(e){if(!mn(e)||Pl(e))return!1;var t=Uo(e)?zl:Ml;return t.test(Rl(e))}function Vl(e,t){return e==null?void 0:e[t]}function Ul(e,t){var n=Vl(e,t);return Kl(n)?n:void 0}function Yl(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}var Wl=800,Hl=16,Gl=Date.now;function ql(e){var t=0,n=0;return function(){var r=Gl(),i=Hl-(r-n);if(n=r,i>0){if(++t>=Wl)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function Xl(e){return function(){return e}}var Ql=function(){try{var e=Ul(Object,"defineProperty");return e({},"",{}),e}catch{}}();const gn=Ql;var Zl=gn?function(e,t){return gn(e,"toString",{configurable:!0,enumerable:!1,value:Xl(t),writable:!0})}:Vo,Jl=ql(Zl);const ec=Jl;var tc=9007199254740991,nc=/^(?:0|[1-9]\d*)$/;function Wo(e,t){var n=typeof e;return t=t??tc,!!t&&(n=="number"||n!="symbol"&&nc.test(e))&&e>-1&&e%1==0&&e<t}function Ho(e,t,n){t=="__proto__"&&gn?gn(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function lr(e,t){return e===t||e!==e&&t!==t}var rc=Object.prototype,oc=rc.hasOwnProperty;function Go(e,t,n){var r=e[t];(!(oc.call(e,t)&&lr(r,n))||n===void 0&&!(t in e))&&Ho(e,t,n)}function ic(e,t,n,r){var i=!n;n||(n={});for(var a=-1,l=t.length;++a<l;){var s=t[a],c=r?r(n[s],e[s],s,n,e):void 0;c===void 0&&(c=e[s]),i?Ho(n,s,c):Go(n,s,c)}return n}var qo=Math.max;function ac(e,t,n){return t=qo(t===void 0?e.length-1:t,0),function(){for(var r=arguments,i=-1,a=qo(r.length-t,0),l=Array(a);++i<a;)l[i]=r[t+i];i=-1;for(var s=Array(t+1);++i<t;)s[i]=r[i];return s[t]=n(l),Yl(e,this,s)}}function Xo(e,t){return ec(ac(e,t,Vo),e+"")}var sc=9007199254740991;function Qo(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=sc}function yn(e){return e!=null&&Qo(e.length)&&!Uo(e)}function Zo(e,t,n){if(!mn(n))return!1;var r=typeof t;return(r=="number"?yn(n)&&Wo(t,n.length):r=="string"&&t in n)?lr(n[t],e):!1}function lc(e){return Xo(function(t,n){var r=-1,i=n.length,a=i>1?n[i-1]:void 0,l=i>2?n[2]:void 0;for(a=e.length>3&&typeof a=="function"?(i--,a):void 0,l&&Zo(n[0],n[1],l)&&(a=i<3?void 0:a,i=1),t=Object(t);++r<i;){var s=n[r];s&&e(t,s,r,a)}return t})}var cc=Object.prototype;function cr(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||cc;return e===n}function uc(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var fc="[object Arguments]";function Jo(e){return ar(e)&&ir(e)==fc}var ei=Object.prototype,dc=ei.hasOwnProperty,pc=ei.propertyIsEnumerable,hc=Jo(function(){return arguments}())?Jo:function(e){return ar(e)&&dc.call(e,"callee")&&!pc.call(e,"callee")};const mc=hc;function gc(){return!1}var ti=typeof H=="object"&&H&&!H.nodeType&&H,ni=ti&&typeof module=="object"&&module&&!module.nodeType&&module,yc=ni&&ni.exports===ti,ri=yc?or.Buffer:void 0,bc=ri?ri.isBuffer:void 0,wc=bc||gc;const vc=wc;var Cc="[object Arguments]",Sc="[object Array]",Ec="[object Boolean]",Tc="[object Date]",Oc="[object Error]",_c="[object Function]",Ac="[object Map]",kc="[object Number]",$c="[object Object]",Nc="[object RegExp]",Pc="[object Set]",Ic="[object String]",Dc="[object WeakMap]",Rc="[object ArrayBuffer]",Bc="[object DataView]",Mc="[object Float32Array]",xc="[object Float64Array]",Lc="[object Int8Array]",Fc="[object Int16Array]",jc="[object Int32Array]",zc="[object Uint8Array]",Kc="[object Uint8ClampedArray]",Vc="[object Uint16Array]",Uc="[object Uint32Array]",ie={};ie[Mc]=ie[xc]=ie[Lc]=ie[Fc]=ie[jc]=ie[zc]=ie[Kc]=ie[Vc]=ie[Uc]=!0,ie[Cc]=ie[Sc]=ie[Rc]=ie[Ec]=ie[Bc]=ie[Tc]=ie[Oc]=ie[_c]=ie[Ac]=ie[kc]=ie[$c]=ie[Nc]=ie[Pc]=ie[Ic]=ie[Dc]=!1;function Yc(e){return ar(e)&&Qo(e.length)&&!!ie[ir(e)]}function Wc(e){return function(t){return e(t)}}var oi=typeof H=="object"&&H&&!H.nodeType&&H,It=oi&&typeof module=="object"&&module&&!module.nodeType&&module,Hc=It&&It.exports===oi,ur=Hc&&jo.process,Gc=function(){try{var e=It&&It.require&&It.require("util").types;return e||ur&&ur.binding&&ur.binding("util")}catch{}}();const ii=Gc;var ai=ii&&ii.isTypedArray,qc=ai?Wc(ai):Yc;const Xc=qc;var Qc=Object.prototype,Zc=Qc.hasOwnProperty;function si(e,t){var n=Ol(e),r=!n&&mc(e),i=!n&&!r&&vc(e),a=!n&&!r&&!i&&Xc(e),l=n||r||i||a,s=l?uc(e.length,String):[],c=s.length;for(var u in e)(t||Zc.call(e,u))&&!(l&&(u=="length"||i&&(u=="offset"||u=="parent")||a&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||Wo(u,c)))&&s.push(u);return s}function Jc(e,t){return function(n){return e(t(n))}}var eu=Jc(Object.keys,Object);const tu=eu;var nu=Object.prototype,ru=nu.hasOwnProperty;function ou(e){if(!cr(e))return tu(e);var t=[];for(var n in Object(e))ru.call(e,n)&&n!="constructor"&&t.push(n);return t}function iu(e){return yn(e)?si(e):ou(e)}var au=Object.prototype,su=au.hasOwnProperty;lc(function(e,t){if(cr(t)||yn(t)){ic(t,iu(t),e);return}for(var n in t)su.call(t,n)&&Go(e,n,t[n])});function lu(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var cu=Object.prototype,uu=cu.hasOwnProperty;function fu(e){if(!mn(e))return lu(e);var t=cr(e),n=[];for(var r in e)r=="constructor"&&(t||!uu.call(e,r))||n.push(r);return n}function du(e){return yn(e)?si(e,!0):fu(e)}var li=Object.prototype,pu=li.hasOwnProperty;Xo(function(e,t){e=Object(e);var n=-1,r=t.length,i=r>2?t[2]:void 0;for(i&&Zo(t[0],t[1],i)&&(r=1);++n<r;)for(var a=t[n],l=du(a),s=-1,c=l.length;++s<c;){var u=l[s],d=e[u];(d===void 0||lr(d,li[u])&&!pu.call(e,u))&&(e[u]=a[u])}return e});const hu=o.defineComponent({name:"Viewer",props:{images:{type:Array,default:()=>[]},rebuild:{type:Boolean,default:!1},trigger:{type:Object,default:null},options:{type:Object,default:()=>null}},emits:["inited"],setup(e,{emit:t}){let n;const r=o.ref();function i(){n=new Fo(r.value,e.options),t("inited",n)}function a(){n&&n.destroy()}function l(){a(),i()}function s(){n?(n.update(),t("inited",n)):i()}function c(){e.rebuild?l():s()}const u={deep:!0};return o.watch(()=>e.images,()=>{o.nextTick(()=>{c()})},u),o.watch(()=>e.trigger,()=>{o.nextTick(()=>{c()})},u),o.watch(()=>e.options,()=>{o.nextTick(()=>{l()})},u),o.onMounted(()=>i()),o.onUnmounted(()=>a()),{root:r,createViewer:i,rebuildViewer:l,updateViewer:s,destroyViewer:a}}}),mu=(e,t)=>{const n=e.__vccOpts||e;for(const[r,i]of t)n[r]=i;return n},gu={ref:"root"};function yu(e,t,n,r,i,a){return o.openBlock(),o.createElementBlock("div",gu,[o.renderSlot(e.$slots,"default",{images:e.images,options:e.options})],512)}const bu=mu(hu,[["render",yu]]),wu={style:{height:"800px",overflow:"hidden"}},vu=["src"],[Cu]=St("preview-media-modal"),Su={name:Cu},fr=o.defineComponent({...Su,props:{show:{type:Boolean},imageList:{},imageIndex:{}},emits:["update:show"],setup(e,{expose:t,emit:n}){const r=e,i=b=>n("update:show",b),a=o.ref(null),l={transition:!1,inline:!0,button:!1,toolbar:{rotateLeft:!0,prev:!0,oneToOne:!0,next:!0,rotateRight:!0}},s=o.ref(!1),c=o.ref([]),u=o.ref(0);o.watch([()=>r.imageList,()=>r.imageIndex],()=>{r.imageList&&(c.value=[...r.imageList],u.value=r.imageIndex||0)}),o.watch(()=>r.show,()=>{s.value=r.show});const d=b=>{a.value=b,b.view(u.value)},f=o.ref(null),{x:p,y:h,isDragging:y}=_s(f),m=o.ref(0),w=o.ref(0),S=o.ref(!1),_=o.ref(0),v=o.ref(0),$=o.ref(0),E=o.ref(0),T=o.ref({left:0,right:0,top:0,bottom:0});o.watch([p,h],()=>{if(!S.value){m.value=p.value,w.value=h.value;const b=document.body.getBoundingClientRect(),N=f.value.getBoundingClientRect();T.value.right=b.width-N.width,T.value.bottom=b.height-N.height,$.value=_.value,E.value=v.value}S.value=!0}),o.watch(y,()=>{y||(S.value=!1)}),o.watchEffect(()=>{S.value&&(_.value=$.value+Math.min(Math.max(T.value.left,p.value),T.value.right)-m.value,v.value=E.value+Math.min(Math.max(T.value.top,h.value),T.value.bottom)-w.value)});const O=o.computed(()=>({transform:`translate(${_.value}px, ${v.value}px)`})),A=(b,N=0)=>{c.value=[...b],u.value=N,s.value=!0},C=()=>{s.value=!1},g=()=>{i(!1)};return t({open:A,close:C}),(b,N)=>(o.openBlock(),o.createBlock(o.unref(K.Modal),{visible:s.value,"onUpdate:visible":N[0]||(N[0]=x=>s.value=x),"destroy-on-close":"",centered:"",width:800,mask:!1,"mask-closable":!1,"wrap-class-name":"pointer-events-none preview-media-modal","wrap-style":{overflow:"hidden"},footer:null,onOk:C,onCancel:g},{title:o.withCtx(()=>[o.createElementVNode("div",{ref_key:"modalTitleRef",ref:f,style:{width:"100%",cursor:"move"}},[o.createVNode(o.unref(ge.HolderOutlined),{style:{"margin-right":"6px"}}),o.createTextVNode("预览 ")],512)]),modalRender:o.withCtx(({originVNode:x})=>[o.createElementVNode("div",{style:o.normalizeStyle(O.value)},[(o.openBlock(),o.createBlock(o.resolveDynamicComponent(x)))],4)]),default:o.withCtx(()=>[o.createVNode(o.unref(bu),{options:l,images:c.value,onInited:d},{default:o.withCtx(x=>[o.createElementVNode("div",wu,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(x.images,M=>(o.openBlock(),o.createElementBlock("img",{style:{opacity:"0"},src:M,key:M},null,8,vu))),128))])]),_:1},8,["images"])]),_:1},8,["visible"]))}}),sw="";var Eu=typeof window<"u";function Tu(e){const t=o.getCurrentInstance();t&&Wn(t.proxy,e)}function Ou(){const e=o.reactive({show:!1}),t=i=>{e.show=i},n=i=>{Wn(e,i,{transitionAppear:!0}),t(!0)},r=()=>t(!1);return Tu({open:n,close:r,toggle:t}),{open:n,close:r,state:e,toggle:t}}function _u(e){const t=o.createApp(e),n=document.createElement("div");return document.body.appendChild(n),{instance:t.mount(n),unmount(){t.unmount(),document.body.removeChild(n)}}}let bn;function Au(){({instance:bn}=_u({setup(){const{state:e,toggle:t}=Ou();return()=>o.createVNode(fr,o.mergeProps(e,{"onUpdate:show":t}),null)}}))}function ku(e,t){return Eu?(bn||Au(),bn.open({imageList:e,imageIndex:t}),bn):Promise.resolve(void 0)}const ci=Et(fr);var $u=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Nu(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ui={exports:{}};(function(e,t){(function(n,r){e.exports=r()})($u,function(){var n=1e3,r=6e4,i=36e5,a="millisecond",l="second",s="minute",c="hour",u="day",d="week",f="month",p="quarter",h="year",y="date",m="Invalid Date",w=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,S=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,_={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(M){var D=["th","st","nd","rd"],P=M%100;return"["+M+(D[(P-20)%10]||D[P]||D[0])+"]"}},v=function(M,D,P){var B=String(M);return!B||B.length>=D?M:""+Array(D+1-B.length).join(P)+M},$={s:v,z:function(M){var D=-M.utcOffset(),P=Math.abs(D),B=Math.floor(P/60),R=P%60;return(D<=0?"+":"-")+v(B,2,"0")+":"+v(R,2,"0")},m:function M(D,P){if(D.date()<P.date())return-M(P,D);var B=12*(P.year()-D.year())+(P.month()-D.month()),R=D.clone().add(B,f),V=P-R<0,z=D.clone().add(B+(V?-1:1),f);return+(-(B+(P-R)/(V?R-z:z-R))||0)},a:function(M){return M<0?Math.ceil(M)||0:Math.floor(M)},p:function(M){return{M:f,y:h,w:d,d:u,D:y,h:c,m:s,s:l,ms:a,Q:p}[M]||String(M||"").toLowerCase().replace(/s$/,"")},u:function(M){return M===void 0}},E="en",T={};T[E]=_;var O="$isDayjsObject",A=function(M){return M instanceof N||!(!M||!M[O])},C=function M(D,P,B){var R;if(!D)return E;if(typeof D=="string"){var V=D.toLowerCase();T[V]&&(R=V),P&&(T[V]=P,R=V);var z=D.split("-");if(!R&&z.length>1)return M(z[0])}else{var q=D.name;T[q]=D,R=q}return!B&&R&&(E=R),R||!B&&E},g=function(M,D){if(A(M))return M.clone();var P=typeof D=="object"?D:{};return P.date=M,P.args=arguments,new N(P)},b=$;b.l=C,b.i=A,b.w=function(M,D){return g(M,{locale:D.$L,utc:D.$u,x:D.$x,$offset:D.$offset})};var N=function(){function M(P){this.$L=C(P.locale,null,!0),this.parse(P),this.$x=this.$x||P.x||{},this[O]=!0}var D=M.prototype;return D.parse=function(P){this.$d=function(B){var R=B.date,V=B.utc;if(R===null)return new Date(NaN);if(b.u(R))return new Date;if(R instanceof Date)return new Date(R);if(typeof R=="string"&&!/Z$/i.test(R)){var z=R.match(w);if(z){var q=z[2]-1||0,Q=(z[7]||"0").substring(0,3);return V?new Date(Date.UTC(z[1],q,z[3]||1,z[4]||0,z[5]||0,z[6]||0,Q)):new Date(z[1],q,z[3]||1,z[4]||0,z[5]||0,z[6]||0,Q)}}return new Date(R)}(P),this.init()},D.init=function(){var P=this.$d;this.$y=P.getFullYear(),this.$M=P.getMonth(),this.$D=P.getDate(),this.$W=P.getDay(),this.$H=P.getHours(),this.$m=P.getMinutes(),this.$s=P.getSeconds(),this.$ms=P.getMilliseconds()},D.$utils=function(){return b},D.isValid=function(){return this.$d.toString()!==m},D.isSame=function(P,B){var R=g(P);return this.startOf(B)<=R&&R<=this.endOf(B)},D.isAfter=function(P,B){return g(P)<this.startOf(B)},D.isBefore=function(P,B){return this.endOf(B)<g(P)},D.$g=function(P,B,R){return b.u(P)?this[B]:this.set(R,P)},D.unix=function(){return Math.floor(this.valueOf()/1e3)},D.valueOf=function(){return this.$d.getTime()},D.startOf=function(P,B){var R=this,V=!!b.u(B)||B,z=b.p(P),q=function(ve,de){var Ce=b.w(R.$u?Date.UTC(R.$y,de,ve):new Date(R.$y,de,ve),R);return V?Ce:Ce.endOf(u)},Q=function(ve,de){return b.w(R.toDate()[ve].apply(R.toDate("s"),(V?[0,0,0,0]:[23,59,59,999]).slice(de)),R)},J=this.$W,se=this.$M,ue=this.$D,he="set"+(this.$u?"UTC":"");switch(z){case h:return V?q(1,0):q(31,11);case f:return V?q(1,se):q(0,se+1);case d:var me=this.$locale().weekStart||0,Oe=(J<me?J+7:J)-me;return q(V?ue-Oe:ue+(6-Oe),se);case u:case y:return Q(he+"Hours",0);case c:return Q(he+"Minutes",1);case s:return Q(he+"Seconds",2);case l:return Q(he+"Milliseconds",3);default:return this.clone()}},D.endOf=function(P){return this.startOf(P,!1)},D.$set=function(P,B){var R,V=b.p(P),z="set"+(this.$u?"UTC":""),q=(R={},R[u]=z+"Date",R[y]=z+"Date",R[f]=z+"Month",R[h]=z+"FullYear",R[c]=z+"Hours",R[s]=z+"Minutes",R[l]=z+"Seconds",R[a]=z+"Milliseconds",R)[V],Q=V===u?this.$D+(B-this.$W):B;if(V===f||V===h){var J=this.clone().set(y,1);J.$d[q](Q),J.init(),this.$d=J.set(y,Math.min(this.$D,J.daysInMonth())).$d}else q&&this.$d[q](Q);return this.init(),this},D.set=function(P,B){return this.clone().$set(P,B)},D.get=function(P){return this[b.p(P)]()},D.add=function(P,B){var R,V=this;P=Number(P);var z=b.p(B),q=function(se){var ue=g(V);return b.w(ue.date(ue.date()+Math.round(se*P)),V)};if(z===f)return this.set(f,this.$M+P);if(z===h)return this.set(h,this.$y+P);if(z===u)return q(1);if(z===d)return q(7);var Q=(R={},R[s]=r,R[c]=i,R[l]=n,R)[z]||1,J=this.$d.getTime()+P*Q;return b.w(J,this)},D.subtract=function(P,B){return this.add(-1*P,B)},D.format=function(P){var B=this,R=this.$locale();if(!this.isValid())return R.invalidDate||m;var V=P||"YYYY-MM-DDTHH:mm:ssZ",z=b.z(this),q=this.$H,Q=this.$m,J=this.$M,se=R.weekdays,ue=R.months,he=R.meridiem,me=function(de,Ce,_e,Ie){return de&&(de[Ce]||de(B,V))||_e[Ce].slice(0,Ie)},Oe=function(de){return b.s(q%12||12,de,"0")},ve=he||function(de,Ce,_e){var Ie=de<12?"AM":"PM";return _e?Ie.toLowerCase():Ie};return V.replace(S,function(de,Ce){return Ce||function(_e){switch(_e){case"YY":return String(B.$y).slice(-2);case"YYYY":return b.s(B.$y,4,"0");case"M":return J+1;case"MM":return b.s(J+1,2,"0");case"MMM":return me(R.monthsShort,J,ue,3);case"MMMM":return me(ue,J);case"D":return B.$D;case"DD":return b.s(B.$D,2,"0");case"d":return String(B.$W);case"dd":return me(R.weekdaysMin,B.$W,se,2);case"ddd":return me(R.weekdaysShort,B.$W,se,3);case"dddd":return se[B.$W];case"H":return String(q);case"HH":return b.s(q,2,"0");case"h":return Oe(1);case"hh":return Oe(2);case"a":return ve(q,Q,!0);case"A":return ve(q,Q,!1);case"m":return String(Q);case"mm":return b.s(Q,2,"0");case"s":return String(B.$s);case"ss":return b.s(B.$s,2,"0");case"SSS":return b.s(B.$ms,3,"0");case"Z":return z}return null}(de)||z.replace(":","")})},D.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},D.diff=function(P,B,R){var V,z=this,q=b.p(B),Q=g(P),J=(Q.utcOffset()-this.utcOffset())*r,se=this-Q,ue=function(){return b.m(z,Q)};switch(q){case h:V=ue()/12;break;case f:V=ue();break;case p:V=ue()/3;break;case d:V=(se-J)/6048e5;break;case u:V=(se-J)/864e5;break;case c:V=se/i;break;case s:V=se/r;break;case l:V=se/n;break;default:V=se}return R?V:b.a(V)},D.daysInMonth=function(){return this.endOf(f).$D},D.$locale=function(){return T[this.$L]},D.locale=function(P,B){if(!P)return this.$L;var R=this.clone(),V=C(P,B,!0);return V&&(R.$L=V),R},D.clone=function(){return b.w(this.$d,this)},D.toDate=function(){return new Date(this.valueOf())},D.toJSON=function(){return this.isValid()?this.toISOString():null},D.toISOString=function(){return this.$d.toISOString()},D.toString=function(){return this.$d.toUTCString()},M}(),x=N.prototype;return g.prototype=x,[["$ms",a],["$s",l],["$m",s],["$H",c],["$W",u],["$M",f],["$y",h],["$D",y]].forEach(function(M){x[M[1]]=function(D){return this.$g(D,M[0],M[1])}}),g.extend=function(M,D){return M.$i||(M(D,N,g),M.$i=!0),g},g.locale=C,g.isDayjs=A,g.unix=function(M){return g(1e3*M)},g.en=T[E],g.Ls=T,g.p={},g})})(ui);var Pu=ui.exports;const fi=Nu(Pu);var Iu=typeof global=="object"&&global&&global.Object===Object&&global;const di=Iu;var Du=typeof self=="object"&&self&&self.Object===Object&&self,Ru=di||Du||Function("return this")();const Pe=Ru;var Bu=Pe.Symbol;const De=Bu;var pi=Object.prototype,Mu=pi.hasOwnProperty,xu=pi.toString,Dt=De?De.toStringTag:void 0;function Lu(e){var t=Mu.call(e,Dt),n=e[Dt];try{e[Dt]=void 0;var r=!0}catch{}var i=xu.call(e);return r&&(t?e[Dt]=n:delete e[Dt]),i}var Fu=Object.prototype,ju=Fu.toString;function zu(e){return ju.call(e)}var Ku="[object Null]",Vu="[object Undefined]",hi=De?De.toStringTag:void 0;function qe(e){return e==null?e===void 0?Vu:Ku:hi&&hi in Object(e)?Lu(e):zu(e)}function Fe(e){return e!=null&&typeof e=="object"}var Uu="[object Symbol]";function mt(e){return typeof e=="symbol"||Fe(e)&&qe(e)==Uu}function gt(e,t){for(var n=-1,r=e==null?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}var Yu=Array.isArray;const pe=Yu;var Wu=1/0,mi=De?De.prototype:void 0,gi=mi?mi.toString:void 0;function yi(e){if(typeof e=="string")return e;if(pe(e))return gt(e,yi)+"";if(mt(e))return gi?gi.call(e):"";var t=e+"";return t=="0"&&1/e==-Wu?"-0":t}var Hu=/\s/;function Gu(e){for(var t=e.length;t--&&Hu.test(e.charAt(t)););return t}var qu=/^\s+/;function Xu(e){return e&&e.slice(0,Gu(e)+1).replace(qu,"")}function Te(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var bi=0/0,Qu=/^[-+]0x[0-9a-f]+$/i,Zu=/^0b[01]+$/i,Ju=/^0o[0-7]+$/i,ef=parseInt;function dr(e){if(typeof e=="number")return e;if(mt(e))return bi;if(Te(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Te(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=Xu(e);var n=Zu.test(e);return n||Ju.test(e)?ef(e.slice(2),n?2:8):Qu.test(e)?bi:+e}var wi=1/0,tf=17976931348623157e292;function nf(e){if(!e)return e===0?e:0;if(e=dr(e),e===wi||e===-wi){var t=e<0?-1:1;return t*tf}return e===e?e:0}function rf(e){var t=nf(e),n=t%1;return t===t?n?t-n:t:0}function vi(e){return e}var of="[object AsyncFunction]",af="[object Function]",sf="[object GeneratorFunction]",lf="[object Proxy]";function Ci(e){if(!Te(e))return!1;var t=qe(e);return t==af||t==sf||t==of||t==lf}var cf=Pe["__core-js_shared__"];const pr=cf;var Si=function(){var e=/[^.]+$/.exec(pr&&pr.keys&&pr.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function uf(e){return!!Si&&Si in e}var ff=Function.prototype,df=ff.toString;function Xe(e){if(e!=null){try{return df.call(e)}catch{}try{return e+""}catch{}}return""}var pf=/[\\^$.*+?()[\]{}|]/g,hf=/^\[object .+?Constructor\]$/,mf=Function.prototype,gf=Object.prototype,yf=mf.toString,bf=gf.hasOwnProperty,wf=RegExp("^"+yf.call(bf).replace(pf,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function vf(e){if(!Te(e)||uf(e))return!1;var t=Ci(e)?wf:hf;return t.test(Xe(e))}function Cf(e,t){return e==null?void 0:e[t]}function Qe(e,t){var n=Cf(e,t);return vf(n)?n:void 0}var Sf=Qe(Pe,"WeakMap");const hr=Sf;var Ei=Object.create,Ef=function(){function e(){}return function(t){if(!Te(t))return{};if(Ei)return Ei(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();const Tf=Ef;function Of(){}function _f(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}var Af=function(){try{var e=Qe(Object,"defineProperty");return e({},"",{}),e}catch{}}();const Ti=Af;function kf(e,t){for(var n=-1,r=e==null?0:e.length;++n<r&&t(e[n],n,e)!==!1;);return e}function $f(e,t,n,r){for(var i=e.length,a=n+(r?1:-1);r?a--:++a<i;)if(t(e[a],a,e))return a;return-1}function Nf(e){return e!==e}function Pf(e,t,n){for(var r=n-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1}function Oi(e,t,n){return t===t?Pf(e,t,n):$f(e,Nf,n)}function If(e,t){var n=e==null?0:e.length;return!!n&&Oi(e,t,0)>-1}var Df=9007199254740991,Rf=/^(?:0|[1-9]\d*)$/;function wn(e,t){var n=typeof e;return t=t??Df,!!t&&(n=="number"||n!="symbol"&&Rf.test(e))&&e>-1&&e%1==0&&e<t}function mr(e,t,n){t=="__proto__"&&Ti?Ti(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function vn(e,t){return e===t||e!==e&&t!==t}var Bf=Object.prototype,Mf=Bf.hasOwnProperty;function gr(e,t,n){var r=e[t];(!(Mf.call(e,t)&&vn(r,n))||n===void 0&&!(t in e))&&mr(e,t,n)}function Cn(e,t,n,r){var i=!n;n||(n={});for(var a=-1,l=t.length;++a<l;){var s=t[a],c=r?r(n[s],e[s],s,n,e):void 0;c===void 0&&(c=e[s]),i?mr(n,s,c):gr(n,s,c)}return n}var xf=9007199254740991;function yr(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=xf}function yt(e){return e!=null&&yr(e.length)&&!Ci(e)}function Lf(e,t,n){if(!Te(n))return!1;var r=typeof t;return(r=="number"?yt(n)&&wn(t,n.length):r=="string"&&t in n)?vn(n[t],e):!1}var Ff=Object.prototype;function br(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||Ff;return e===n}function jf(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var zf="[object Arguments]";function _i(e){return Fe(e)&&qe(e)==zf}var Ai=Object.prototype,Kf=Ai.hasOwnProperty,Vf=Ai.propertyIsEnumerable,Uf=_i(function(){return arguments}())?_i:function(e){return Fe(e)&&Kf.call(e,"callee")&&!Vf.call(e,"callee")};const ki=Uf;function Yf(){return!1}var $i=typeof H=="object"&&H&&!H.nodeType&&H,Ni=$i&&typeof module=="object"&&module&&!module.nodeType&&module,Wf=Ni&&Ni.exports===$i,Pi=Wf?Pe.Buffer:void 0,Hf=Pi?Pi.isBuffer:void 0,Gf=Hf||Yf;const Sn=Gf;var qf="[object Arguments]",Xf="[object Array]",Qf="[object Boolean]",Zf="[object Date]",Jf="[object Error]",ed="[object Function]",td="[object Map]",nd="[object Number]",rd="[object Object]",od="[object RegExp]",id="[object Set]",ad="[object String]",sd="[object WeakMap]",ld="[object ArrayBuffer]",cd="[object DataView]",ud="[object Float32Array]",fd="[object Float64Array]",dd="[object Int8Array]",pd="[object Int16Array]",hd="[object Int32Array]",md="[object Uint8Array]",gd="[object Uint8ClampedArray]",yd="[object Uint16Array]",bd="[object Uint32Array]",ae={};ae[ud]=ae[fd]=ae[dd]=ae[pd]=ae[hd]=ae[md]=ae[gd]=ae[yd]=ae[bd]=!0,ae[qf]=ae[Xf]=ae[ld]=ae[Qf]=ae[cd]=ae[Zf]=ae[Jf]=ae[ed]=ae[td]=ae[nd]=ae[rd]=ae[od]=ae[id]=ae[ad]=ae[sd]=!1;function wd(e){return Fe(e)&&yr(e.length)&&!!ae[qe(e)]}function En(e){return function(t){return e(t)}}var Ii=typeof H=="object"&&H&&!H.nodeType&&H,Rt=Ii&&typeof module=="object"&&module&&!module.nodeType&&module,vd=Rt&&Rt.exports===Ii,wr=vd&&di.process,Cd=function(){try{var e=Rt&&Rt.require&&Rt.require("util").types;return e||wr&&wr.binding&&wr.binding("util")}catch{}}();const bt=Cd;var Di=bt&&bt.isTypedArray,Sd=Di?En(Di):wd;const Ri=Sd;var Ed=Object.prototype,Td=Ed.hasOwnProperty;function Bi(e,t){var n=pe(e),r=!n&&ki(e),i=!n&&!r&&Sn(e),a=!n&&!r&&!i&&Ri(e),l=n||r||i||a,s=l?jf(e.length,String):[],c=s.length;for(var u in e)(t||Td.call(e,u))&&!(l&&(u=="length"||i&&(u=="offset"||u=="parent")||a&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||wn(u,c)))&&s.push(u);return s}function Mi(e,t){return function(n){return e(t(n))}}var Od=Mi(Object.keys,Object);const _d=Od;var Ad=Object.prototype,kd=Ad.hasOwnProperty;function $d(e){if(!br(e))return _d(e);var t=[];for(var n in Object(e))kd.call(e,n)&&n!="constructor"&&t.push(n);return t}function wt(e){return yt(e)?Bi(e):$d(e)}function Nd(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var Pd=Object.prototype,Id=Pd.hasOwnProperty;function Dd(e){if(!Te(e))return Nd(e);var t=br(e),n=[];for(var r in e)r=="constructor"&&(t||!Id.call(e,r))||n.push(r);return n}function vr(e){return yt(e)?Bi(e,!0):Dd(e)}var Rd=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Bd=/^\w*$/;function Cr(e,t){if(pe(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||mt(e)?!0:Bd.test(e)||!Rd.test(e)||t!=null&&e in Object(t)}var Md=Qe(Object,"create");const Bt=Md;function xd(){this.__data__=Bt?Bt(null):{},this.size=0}function Ld(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var Fd="__lodash_hash_undefined__",jd=Object.prototype,zd=jd.hasOwnProperty;function Kd(e){var t=this.__data__;if(Bt){var n=t[e];return n===Fd?void 0:n}return zd.call(t,e)?t[e]:void 0}var Vd=Object.prototype,Ud=Vd.hasOwnProperty;function Yd(e){var t=this.__data__;return Bt?t[e]!==void 0:Ud.call(t,e)}var Wd="__lodash_hash_undefined__";function Hd(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Bt&&t===void 0?Wd:t,this}function Ze(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Ze.prototype.clear=xd,Ze.prototype.delete=Ld,Ze.prototype.get=Kd,Ze.prototype.has=Yd,Ze.prototype.set=Hd;function Gd(){this.__data__=[],this.size=0}function Tn(e,t){for(var n=e.length;n--;)if(vn(e[n][0],t))return n;return-1}var qd=Array.prototype,Xd=qd.splice;function Qd(e){var t=this.__data__,n=Tn(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():Xd.call(t,n,1),--this.size,!0}function Zd(e){var t=this.__data__,n=Tn(t,e);return n<0?void 0:t[n][1]}function Jd(e){return Tn(this.__data__,e)>-1}function ep(e,t){var n=this.__data__,r=Tn(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function je(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}je.prototype.clear=Gd,je.prototype.delete=Qd,je.prototype.get=Zd,je.prototype.has=Jd,je.prototype.set=ep;var tp=Qe(Pe,"Map");const Mt=tp;function np(){this.size=0,this.__data__={hash:new Ze,map:new(Mt||je),string:new Ze}}function rp(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function On(e,t){var n=e.__data__;return rp(t)?n[typeof t=="string"?"string":"hash"]:n.map}function op(e){var t=On(this,e).delete(e);return this.size-=t?1:0,t}function ip(e){return On(this,e).get(e)}function ap(e){return On(this,e).has(e)}function sp(e,t){var n=On(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}function ze(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}ze.prototype.clear=np,ze.prototype.delete=op,ze.prototype.get=ip,ze.prototype.has=ap,ze.prototype.set=sp;var lp="Expected a function";function Sr(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(lp);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],a=n.cache;if(a.has(i))return a.get(i);var l=e.apply(this,r);return n.cache=a.set(i,l)||a,l};return n.cache=new(Sr.Cache||ze),n}Sr.Cache=ze;var cp=500;function up(e){var t=Sr(e,function(r){return n.size===cp&&n.clear(),r}),n=t.cache;return t}var fp=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,dp=/\\(\\)?/g,pp=up(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(fp,function(n,r,i,a){t.push(i?a.replace(dp,"$1"):r||n)}),t});const hp=pp;function mp(e){return e==null?"":yi(e)}function _n(e,t){return pe(e)?e:Cr(e,t)?[e]:hp(mp(e))}var gp=1/0;function xt(e){if(typeof e=="string"||mt(e))return e;var t=e+"";return t=="0"&&1/e==-gp?"-0":t}function An(e,t){t=_n(t,e);for(var n=0,r=t.length;e!=null&&n<r;)e=e[xt(t[n++])];return n&&n==r?e:void 0}function kn(e,t,n){var r=e==null?void 0:An(e,t);return r===void 0?n:r}function xi(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}var yp=Mi(Object.getPrototypeOf,Object);const Li=yp;function bp(){this.__data__=new je,this.size=0}function wp(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function vp(e){return this.__data__.get(e)}function Cp(e){return this.__data__.has(e)}var Sp=200;function Ep(e,t){var n=this.__data__;if(n instanceof je){var r=n.__data__;if(!Mt||r.length<Sp-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new ze(r)}return n.set(e,t),this.size=n.size,this}function Re(e){var t=this.__data__=new je(e);this.size=t.size}Re.prototype.clear=bp,Re.prototype.delete=wp,Re.prototype.get=vp,Re.prototype.has=Cp,Re.prototype.set=Ep;function Tp(e,t){return e&&Cn(t,wt(t),e)}function Op(e,t){return e&&Cn(t,vr(t),e)}var Fi=typeof H=="object"&&H&&!H.nodeType&&H,ji=Fi&&typeof module=="object"&&module&&!module.nodeType&&module,_p=ji&&ji.exports===Fi,zi=_p?Pe.Buffer:void 0,Ki=zi?zi.allocUnsafe:void 0;function Ap(e,t){if(t)return e.slice();var n=e.length,r=Ki?Ki(n):new e.constructor(n);return e.copy(r),r}function Vi(e,t){for(var n=-1,r=e==null?0:e.length,i=0,a=[];++n<r;){var l=e[n];t(l,n,e)&&(a[i++]=l)}return a}function Ui(){return[]}var kp=Object.prototype,$p=kp.propertyIsEnumerable,Yi=Object.getOwnPropertySymbols,Np=Yi?function(e){return e==null?[]:(e=Object(e),Vi(Yi(e),function(t){return $p.call(e,t)}))}:Ui;const Er=Np;function Pp(e,t){return Cn(e,Er(e),t)}var Ip=Object.getOwnPropertySymbols,Dp=Ip?function(e){for(var t=[];e;)xi(t,Er(e)),e=Li(e);return t}:Ui;const Wi=Dp;function Rp(e,t){return Cn(e,Wi(e),t)}function Hi(e,t,n){var r=t(e);return pe(e)?r:xi(r,n(e))}function Tr(e){return Hi(e,wt,Er)}function Gi(e){return Hi(e,vr,Wi)}var Bp=Qe(Pe,"DataView");const Or=Bp;var Mp=Qe(Pe,"Promise");const _r=Mp;var xp=Qe(Pe,"Set");const vt=xp;var qi="[object Map]",Lp="[object Object]",Xi="[object Promise]",Qi="[object Set]",Zi="[object WeakMap]",Ji="[object DataView]",Fp=Xe(Or),jp=Xe(Mt),zp=Xe(_r),Kp=Xe(vt),Vp=Xe(hr),Je=qe;(Or&&Je(new Or(new ArrayBuffer(1)))!=Ji||Mt&&Je(new Mt)!=qi||_r&&Je(_r.resolve())!=Xi||vt&&Je(new vt)!=Qi||hr&&Je(new hr)!=Zi)&&(Je=function(e){var t=qe(e),n=t==Lp?e.constructor:void 0,r=n?Xe(n):"";if(r)switch(r){case Fp:return Ji;case jp:return qi;case zp:return Xi;case Kp:return Qi;case Vp:return Zi}return t});const Lt=Je;var Up=Object.prototype,Yp=Up.hasOwnProperty;function Wp(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]=="string"&&Yp.call(e,"index")&&(n.index=e.index,n.input=e.input),n}var Hp=Pe.Uint8Array;const $n=Hp;function Ar(e){var t=new e.constructor(e.byteLength);return new $n(t).set(new $n(e)),t}function Gp(e,t){var n=t?Ar(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}var qp=/\w*$/;function Xp(e){var t=new e.constructor(e.source,qp.exec(e));return t.lastIndex=e.lastIndex,t}var ea=De?De.prototype:void 0,ta=ea?ea.valueOf:void 0;function Qp(e){return ta?Object(ta.call(e)):{}}function Zp(e,t){var n=t?Ar(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}var Jp="[object Boolean]",eh="[object Date]",th="[object Map]",nh="[object Number]",rh="[object RegExp]",oh="[object Set]",ih="[object String]",ah="[object Symbol]",sh="[object ArrayBuffer]",lh="[object DataView]",ch="[object Float32Array]",uh="[object Float64Array]",fh="[object Int8Array]",dh="[object Int16Array]",ph="[object Int32Array]",hh="[object Uint8Array]",mh="[object Uint8ClampedArray]",gh="[object Uint16Array]",yh="[object Uint32Array]";function bh(e,t,n){var r=e.constructor;switch(t){case sh:return Ar(e);case Jp:case eh:return new r(+e);case lh:return Gp(e,n);case ch:case uh:case fh:case dh:case ph:case hh:case mh:case gh:case yh:return Zp(e,n);case th:return new r;case nh:case ih:return new r(e);case rh:return Xp(e);case oh:return new r;case ah:return Qp(e)}}function wh(e){return typeof e.constructor=="function"&&!br(e)?Tf(Li(e)):{}}var vh="[object Map]";function Ch(e){return Fe(e)&&Lt(e)==vh}var na=bt&&bt.isMap,Sh=na?En(na):Ch;const Eh=Sh;var Th="[object Set]";function Oh(e){return Fe(e)&&Lt(e)==Th}var ra=bt&&bt.isSet,_h=ra?En(ra):Oh;const Ah=_h;var kh=1,$h=2,Nh=4,oa="[object Arguments]",Ph="[object Array]",Ih="[object Boolean]",Dh="[object Date]",Rh="[object Error]",ia="[object Function]",Bh="[object GeneratorFunction]",Mh="[object Map]",xh="[object Number]",aa="[object Object]",Lh="[object RegExp]",Fh="[object Set]",jh="[object String]",zh="[object Symbol]",Kh="[object WeakMap]",Vh="[object ArrayBuffer]",Uh="[object DataView]",Yh="[object Float32Array]",Wh="[object Float64Array]",Hh="[object Int8Array]",Gh="[object Int16Array]",qh="[object Int32Array]",Xh="[object Uint8Array]",Qh="[object Uint8ClampedArray]",Zh="[object Uint16Array]",Jh="[object Uint32Array]",oe={};oe[oa]=oe[Ph]=oe[Vh]=oe[Uh]=oe[Ih]=oe[Dh]=oe[Yh]=oe[Wh]=oe[Hh]=oe[Gh]=oe[qh]=oe[Mh]=oe[xh]=oe[aa]=oe[Lh]=oe[Fh]=oe[jh]=oe[zh]=oe[Xh]=oe[Qh]=oe[Zh]=oe[Jh]=!0,oe[Rh]=oe[ia]=oe[Kh]=!1;function Nn(e,t,n,r,i,a){var l,s=t&kh,c=t&$h,u=t&Nh;if(n&&(l=i?n(e,r,i,a):n(e)),l!==void 0)return l;if(!Te(e))return e;var d=pe(e);if(d){if(l=Wp(e),!s)return _f(e,l)}else{var f=Lt(e),p=f==ia||f==Bh;if(Sn(e))return Ap(e,s);if(f==aa||f==oa||p&&!i){if(l=c||p?{}:wh(e),!s)return c?Rp(e,Op(l,e)):Pp(e,Tp(l,e))}else{if(!oe[f])return i?e:{};l=bh(e,f,s)}}a||(a=new Re);var h=a.get(e);if(h)return h;a.set(e,l),Ah(e)?e.forEach(function(w){l.add(Nn(w,t,n,w,e,a))}):Eh(e)&&e.forEach(function(w,S){l.set(S,Nn(w,t,n,S,e,a))});var y=u?c?Gi:Tr:c?vr:wt,m=d?void 0:y(e);return kf(m||e,function(w,S){m&&(S=w,w=e[S]),gr(l,S,Nn(w,t,n,S,e,a))}),l}var em=1,tm=4;function Ft(e){return Nn(e,em|tm)}var nm="__lodash_hash_undefined__";function rm(e){return this.__data__.set(e,nm),this}function om(e){return this.__data__.has(e)}function jt(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new ze;++t<n;)this.add(e[t])}jt.prototype.add=jt.prototype.push=rm,jt.prototype.has=om;function im(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}function sa(e,t){return e.has(t)}var am=1,sm=2;function la(e,t,n,r,i,a){var l=n&am,s=e.length,c=t.length;if(s!=c&&!(l&&c>s))return!1;var u=a.get(e),d=a.get(t);if(u&&d)return u==t&&d==e;var f=-1,p=!0,h=n&sm?new jt:void 0;for(a.set(e,t),a.set(t,e);++f<s;){var y=e[f],m=t[f];if(r)var w=l?r(m,y,f,t,e,a):r(y,m,f,e,t,a);if(w!==void 0){if(w)continue;p=!1;break}if(h){if(!im(t,function(S,_){if(!sa(h,_)&&(y===S||i(y,S,n,r,a)))return h.push(_)})){p=!1;break}}else if(!(y===m||i(y,m,n,r,a))){p=!1;break}}return a.delete(e),a.delete(t),p}function lm(e){var t=-1,n=Array(e.size);return e.forEach(function(r,i){n[++t]=[i,r]}),n}function kr(e){var t=-1,n=Array(e.size);return e.forEach(function(r){n[++t]=r}),n}var cm=1,um=2,fm="[object Boolean]",dm="[object Date]",pm="[object Error]",hm="[object Map]",mm="[object Number]",gm="[object RegExp]",ym="[object Set]",bm="[object String]",wm="[object Symbol]",vm="[object ArrayBuffer]",Cm="[object DataView]",ca=De?De.prototype:void 0,$r=ca?ca.valueOf:void 0;function Sm(e,t,n,r,i,a,l){switch(n){case Cm:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case vm:return!(e.byteLength!=t.byteLength||!a(new $n(e),new $n(t)));case fm:case dm:case mm:return vn(+e,+t);case pm:return e.name==t.name&&e.message==t.message;case gm:case bm:return e==t+"";case hm:var s=lm;case ym:var c=r&cm;if(s||(s=kr),e.size!=t.size&&!c)return!1;var u=l.get(e);if(u)return u==t;r|=um,l.set(e,t);var d=la(s(e),s(t),r,i,a,l);return l.delete(e),d;case wm:if($r)return $r.call(e)==$r.call(t)}return!1}var Em=1,Tm=Object.prototype,Om=Tm.hasOwnProperty;function _m(e,t,n,r,i,a){var l=n&Em,s=Tr(e),c=s.length,u=Tr(t),d=u.length;if(c!=d&&!l)return!1;for(var f=c;f--;){var p=s[f];if(!(l?p in t:Om.call(t,p)))return!1}var h=a.get(e),y=a.get(t);if(h&&y)return h==t&&y==e;var m=!0;a.set(e,t),a.set(t,e);for(var w=l;++f<c;){p=s[f];var S=e[p],_=t[p];if(r)var v=l?r(_,S,p,t,e,a):r(S,_,p,e,t,a);if(!(v===void 0?S===_||i(S,_,n,r,a):v)){m=!1;break}w||(w=p=="constructor")}if(m&&!w){var $=e.constructor,E=t.constructor;$!=E&&"constructor"in e&&"constructor"in t&&!(typeof $=="function"&&$ instanceof $&&typeof E=="function"&&E instanceof E)&&(m=!1)}return a.delete(e),a.delete(t),m}var Am=1,ua="[object Arguments]",fa="[object Array]",Pn="[object Object]",km=Object.prototype,da=km.hasOwnProperty;function $m(e,t,n,r,i,a){var l=pe(e),s=pe(t),c=l?fa:Lt(e),u=s?fa:Lt(t);c=c==ua?Pn:c,u=u==ua?Pn:u;var d=c==Pn,f=u==Pn,p=c==u;if(p&&Sn(e)){if(!Sn(t))return!1;l=!0,d=!1}if(p&&!d)return a||(a=new Re),l||Ri(e)?la(e,t,n,r,i,a):Sm(e,t,c,n,r,i,a);if(!(n&Am)){var h=d&&da.call(e,"__wrapped__"),y=f&&da.call(t,"__wrapped__");if(h||y){var m=h?e.value():e,w=y?t.value():t;return a||(a=new Re),i(m,w,n,r,a)}}return p?(a||(a=new Re),_m(e,t,n,r,i,a)):!1}function In(e,t,n,r,i){return e===t?!0:e==null||t==null||!Fe(e)&&!Fe(t)?e!==e&&t!==t:$m(e,t,n,r,In,i)}var Nm=1,Pm=2;function Im(e,t,n,r){var i=n.length,a=i,l=!r;if(e==null)return!a;for(e=Object(e);i--;){var s=n[i];if(l&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++i<a;){s=n[i];var c=s[0],u=e[c],d=s[1];if(l&&s[2]){if(u===void 0&&!(c in e))return!1}else{var f=new Re;if(r)var p=r(u,d,c,e,t,f);if(!(p===void 0?In(d,u,Nm|Pm,r,f):p))return!1}}return!0}function pa(e){return e===e&&!Te(e)}function Dm(e){for(var t=wt(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,pa(i)]}return t}function ha(e,t){return function(n){return n==null?!1:n[e]===t&&(t!==void 0||e in Object(n))}}function Rm(e){var t=Dm(e);return t.length==1&&t[0][2]?ha(t[0][0],t[0][1]):function(n){return n===e||Im(n,e,t)}}function Bm(e,t){return e!=null&&t in Object(e)}function Mm(e,t,n){t=_n(t,e);for(var r=-1,i=t.length,a=!1;++r<i;){var l=xt(t[r]);if(!(a=e!=null&&n(e,l)))break;e=e[l]}return a||++r!=i?a:(i=e==null?0:e.length,!!i&&yr(i)&&wn(l,i)&&(pe(e)||ki(e)))}function xm(e,t){return e!=null&&Mm(e,t,Bm)}var Lm=1,Fm=2;function jm(e,t){return Cr(e)&&pa(t)?ha(xt(e),t):function(n){var r=kn(n,e);return r===void 0&&r===t?xm(n,e):In(t,r,Lm|Fm)}}function zm(e){return function(t){return t==null?void 0:t[e]}}function Km(e){return function(t){return An(t,e)}}function Vm(e){return Cr(e)?zm(xt(e)):Km(e)}function zt(e){return typeof e=="function"?e:e==null?vi:typeof e=="object"?pe(e)?jm(e[0],e[1]):Rm(e):Vm(e)}function Um(e,t,n,r){for(var i=-1,a=e==null?0:e.length;++i<a;){var l=e[i];t(r,l,n(l),e)}return r}function Ym(e){return function(t,n,r){for(var i=-1,a=Object(t),l=r(t),s=l.length;s--;){var c=l[e?s:++i];if(n(a[c],c,a)===!1)break}return t}}var Wm=Ym();const Hm=Wm;function Gm(e,t){return e&&Hm(e,t,wt)}function qm(e,t){return function(n,r){if(n==null)return n;if(!yt(n))return e(n,r);for(var i=n.length,a=t?i:-1,l=Object(n);(t?a--:++a<i)&&r(l[a],a,l)!==!1;);return n}}var Xm=qm(Gm);const Dn=Xm;function Qm(e,t,n,r){return Dn(e,function(i,a,l){t(r,i,n(i),l)}),r}function Zm(e,t){return function(n,r){var i=pe(n)?Um:Qm,a=t?t():{};return i(n,e,zt(r),a)}}var Jm=function(){return Pe.Date.now()};const Nr=Jm;var eg="Expected a function",tg=Math.max,ng=Math.min;function ma(e,t,n){var r,i,a,l,s,c,u=0,d=!1,f=!1,p=!0;if(typeof e!="function")throw new TypeError(eg);t=dr(t)||0,Te(n)&&(d=!!n.leading,f="maxWait"in n,a=f?tg(dr(n.maxWait)||0,t):a,p="trailing"in n?!!n.trailing:p);function h(T){var O=r,A=i;return r=i=void 0,u=T,l=e.apply(A,O),l}function y(T){return u=T,s=setTimeout(S,t),d?h(T):l}function m(T){var O=T-c,A=T-u,C=t-O;return f?ng(C,a-A):C}function w(T){var O=T-c,A=T-u;return c===void 0||O>=t||O<0||f&&A>=a}function S(){var T=Nr();if(w(T))return _(T);s=setTimeout(S,m(T))}function _(T){return s=void 0,p&&r?h(T):(r=i=void 0,l)}function v(){s!==void 0&&clearTimeout(s),u=0,r=c=i=s=void 0}function $(){return s===void 0?l:_(Nr())}function E(){var T=Nr(),O=w(T);if(r=arguments,i=this,c=T,O){if(s===void 0)return y(c);if(f)return clearTimeout(s),s=setTimeout(S,t),h(c)}return s===void 0&&(s=setTimeout(S,t)),l}return E.cancel=v,E.flush=$,E}function rg(e,t,n){for(var r=-1,i=e==null?0:e.length;++r<i;)if(n(t,e[r]))return!0;return!1}function og(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(!t(e[n],n,e))return!1;return!0}function ig(e,t){var n=!0;return Dn(e,function(r,i,a){return n=!!t(r,i,a),n}),n}function ag(e,t,n){var r=pe(e)?og:ig;return n&&Lf(e,t,n)&&(t=void 0),r(e,zt(t))}function sg(e,t){var n=[];return Dn(e,function(r,i,a){t(r,i,a)&&n.push(r)}),n}function ga(e,t){var n=pe(e)?Vi:sg;return n(e,zt(t))}function lg(e,t){var n=-1,r=yt(e)?Array(e.length):[];return Dn(e,function(i,a,l){r[++n]=t(i,a,l)}),r}var cg="[object String]";function ug(e){return typeof e=="string"||!pe(e)&&Fe(e)&&qe(e)==cg}function fg(e,t){return gt(t,function(n){return e[n]})}function dg(e){return e==null?[]:fg(e,wt(e))}var pg=Math.max;function hg(e,t,n,r){e=yt(e)?e:dg(e),n=n&&!r?rf(n):0;var i=e.length;return n<0&&(n=pg(i+n,0)),ug(e)?n<=i&&e.indexOf(t,n)>-1:!!i&&Oi(e,t,n)>-1}function ya(e,t){return In(e,t)}function Kt(e){return e==null}function mg(e){return e===null}var gg=Zm(function(e,t,n){mr(e,n,t)});const ba=gg;function wa(e,t,n,r){if(!Te(e))return e;t=_n(t,e);for(var i=-1,a=t.length,l=a-1,s=e;s!=null&&++i<a;){var c=xt(t[i]),u=n;if(c==="__proto__"||c==="constructor"||c==="prototype")return e;if(i!=l){var d=s[c];u=r?r(d,c,s):void 0,u===void 0&&(u=Te(d)?d:wn(t[i+1])?[]:{})}gr(s,c,u),s=s[c]}return e}function yg(e,t,n){for(var r=-1,i=t.length,a={};++r<i;){var l=t[r],s=An(e,l);n(s,l)&&wa(a,_n(l,e),s)}return a}function Vt(e,t){if(e==null)return{};var n=gt(Gi(e),function(r){return[r]});return t=zt(t),yg(e,n,function(r,i){return t(r,i[0])})}function bg(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}function wg(e,t){if(e!==t){var n=e!==void 0,r=e===null,i=e===e,a=mt(e),l=t!==void 0,s=t===null,c=t===t,u=mt(t);if(!s&&!u&&!a&&e>t||a&&l&&c&&!s&&!u||r&&l&&c||!n&&c||!i)return 1;if(!r&&!a&&!u&&e<t||u&&n&&i&&!r&&!a||s&&n&&i||!l&&i||!c)return-1}return 0}function vg(e,t,n){for(var r=-1,i=e.criteria,a=t.criteria,l=i.length,s=n.length;++r<l;){var c=wg(i[r],a[r]);if(c){if(r>=s)return c;var u=n[r];return c*(u=="desc"?-1:1)}}return e.index-t.index}function Cg(e,t,n){t.length?t=gt(t,function(a){return pe(a)?function(l){return An(l,a.length===1?a[0]:a)}:a}):t=[vi];var r=-1;t=gt(t,En(zt));var i=lg(e,function(a,l,s){var c=gt(t,function(u){return u(a)});return{criteria:c,index:++r,value:a}});return bg(i,function(a,l){return vg(a,l,n)})}function Sg(e,t,n,r){return e==null?[]:(pe(t)||(t=t==null?[]:[t]),n=r?void 0:n,pe(n)||(n=n==null?[]:[n]),Cg(e,t,n))}function Pr(e,t,n){return e==null?e:wa(e,t,n)}var Eg=1/0,Tg=vt&&1/kr(new vt([,-0]))[1]==Eg?function(e){return new vt(e)}:Of;const Og=Tg;var _g=200;function Ag(e,t,n){var r=-1,i=If,a=e.length,l=!0,s=[],c=s;if(n)l=!1,i=rg;else if(a>=_g){var u=t?null:Og(e);if(u)return kr(u);l=!1,i=sa,c=new jt}else c=t?[]:s;e:for(;++r<a;){var d=e[r],f=t?t(d):d;if(d=n||d!==0?d:0,l&&f===f){for(var p=c.length;p--;)if(c[p]===f)continue e;t&&c.push(f),s.push(d)}else i(c,f,n)||(c!==s&&c.push(f),s.push(d))}return s}function kg(e){return e&&e.length?Ag(e):[]}const $g=(e,t,n="post",r={})=>i=>e({url:t,method:n,[n==="get"?"params":"data"]:i,...r}),va=()=>({meta:{code:"VEHICLE-MANAGEMENT-CLIENT-V3",client:"web-H5",tag:"保险",time:new Date().getTime()}}),Ir=({conditions:e,apiConfig:t})=>{const{conditionKey:n,metaKey:r}=t,i=r===null?{}:va();return n===null?Object.assign(i,e):Pr(i,n||"condition",e),i},Ng=({conditions:e,pager:t,sort:n,listApiConfig:r})=>{const{pageNoKey:i,pageSizeKey:a,conditionKey:l,metaKey:s}=r,c=s===null?{}:va();return i&&a&&(Pr(c,i,t.pageNo),Pr(c,a,t.pageSize)),l===null?Object.assign(c,e):c[l||"condition"]=e,c.sort=n,c},Rn=()=>o.getCurrentInstance().appContext.config.globalProperties.$route,Dr=()=>o.getCurrentInstance().appContext.config.globalProperties.$axios,Ke=(e,t,n)=>{const r=Dr();return $g(r,e,t,n)};async function Pg(e,t,n,r){return(await e({url:t,method:"POST",data:n,...r})).data}const Ca=/\{\{(.+?)\}\}/g;function Rr(e,t){if(Array.isArray(e)){const n=[];return e.forEach(r=>{n.push(Rr(r,t))}),n}else if(typeof e=="object"){const n={};for(const r in e)n[t[r]||r]=typeof e[r]=="object"?Rr(e[r],t):e[r];return n}}const Bn=Hn(()=>{const e=o.reactive({});return{enumerations:e,patchEnumerations:async r=>{const i=r?Object.keys(r).filter(s=>e[s]===void 0):[],a=i.map(s=>{const{apiUrl:c,apiMethod:u,params:d}=r[s];if(!c)throw`enum api ${s} 没有提供apiUrl`;const f=u&&u.toLocaleLowerCase()==="get";return Ke(c,u,f?{params:d}:void 0)(d)});(await Promise.allSettled(a)).forEach((s,c)=>{if(s.status==="fulfilled"){const{value:u}=s,{labelKey:d,valueKey:f,childrenKey:p,dataType:h,dataKey:y,groupKey:m}=r[i[c]];if(u.success){const w=kn(u,y||"data"),S=_=>{Object.prototype.toString.call(_)==="[object Array]"?h==="Cascader"?e[i[c]]=_.map(v=>Rr(v,{[f||"value"]:"value",[d||"label"]:"label",[p||"children"]:"children"})):e[i[c]]=[...o.toRaw(e[i[c]]||[]),..._.map(v=>{let $=v[d];return Ca.test(d)&&($=d.replace(Ca,(E,T)=>v[T])),{...m?{group:v[m]}:{},label:$,value:v[f]}})]:Object.prototype.toString.call(_)==="[object Object]"&&Object.keys(_).forEach(v=>{S(_[v])})};S(w)}}else console.warn(`【enumeration】: ${i[c]}: 获取失败`)})},patchStaticEnumerations:r=>{Object.keys(r).forEach(a=>{e[a]=r[a]})}}}),Ig={Input:K.Input,Select:K.Select,Cascader:K.Cascader,FuzzySelect:K.Select,QuerySelect:K.Select,DatePicker:K.DatePicker,RangePicker:K.RangePicker},Dg="Enter",Rg=13,Br="FuzzySelect",Mn="QuerySelect",Bg=["RangePicker"],Sa=o.defineComponent({name:"ConditionBuilder",props:{materials:{type:Object,default:()=>{}}},emits:["pressEnter"],setup(e,{emit:t}){const n=Rn(),{materials:r}=o.toRefs(e),{enumerations:i}=Bn(),a=o.inject("materials",{});let s={...Ig,...a}[r.value.type];const c=o.computed(()=>Bg.includes(r.value.type)?["开始时间","结束时间"]:"请输入"),{otherProps:u}=r.value;function d(E){if(!E||!E.style||Object.prototype.toString.call(E.style)==="[object Object]")return E;const{style:T,...O}=E;try{const A=JSON.parse(T);return{...O,style:A}}catch(A){return console.warn("Failed to parse style:",A),E}}const f=d(u),p=r.value.filterGroups||[],h=r.value.refEnum||"",y=o.computed(()=>{var E,T;return((T=i[h])==null?void 0:T.filter((E=r.value.filterGroups)!=null&&E.length?O=>p.includes(O.group):()=>!0))||[]}),m=o.ref([]),w=Ke(r.value.filterUrl||`/duckbill-data-query-server/table/column/${r.value.filterKey}`,r.value.filterMethod||"post"),S=o.inject("transformFuzzy",{})[r.value.fieldName],_=(E,T)=>{var A;const O=r.value.filterKey||"label";return T[O]||console.warn(`not found key 【${O}】 in option`),((A=T[O])==null?void 0:A.indexOf(E.toString()))>-1},v=o.computed(()=>{switch(r.value.type){case Br:return ma(async function(E){const T=Ir({conditions:r.value.fuzzyCode?{key:E,code:r.value.fuzzyCode}:E,apiConfig:{conditionKey:r.value.conditionKey||"params",metaKey:r.value.metaKey}}),O=await w(T),A=S?S(O):O;m.value=A},200);case Mn:return ma(async function(E){const{category:T,tab:O}=n.meta,A=await w({sliceNumber:"50",category:T,tab:O,code:E});r.value.fuzzyMatch?m.value=A.data.map(C=>({value:C,label:C})):m.value=A.data.map(C=>({value:C.id,label:C.name}))},200);default:return null}}),$=o.computed(()=>{switch(r.value.type){case"Cascader":return y.value;case"Select":return y.value;case Br:return m.value;case Mn:return m.value;default:return y.value}});return()=>s?o.h(s,{size:"small",placeholder:c.value,onkeydown:function(E){["Cascader"].includes(r.value.type)||(E.keyCode===Rg||E.key===Dg)&&setTimeout(()=>t("pressEnter"))},filterOption:[Br,Mn].includes(r.value.type)?!1:_,...Vt({notFoundContent:Mn===r.value.type?null:!0},mg),onSearch:v.value,options:$.value,...f}):o.h("span","Invalid Type")}}),Ut=Hn(()=>{const e=o.reactive({}),t=(r,i)=>{Object.assign(e[i],r)};return{formState:e,dispatchFormState:t,initFormState:(r=[],i=Object.create(null),a)=>(e[a]||(e[a]=Object.create(null)),r.forEach(l=>{e[a][l.fieldName]=void 0}),t(i,a),e[a])}}),{Item:Mg,useForm:xg}=K.Form,Lg=o.defineComponent({name:"PageRendererConditions",components:{DownOutlined:ge.DownOutlined,UpOutlined:ge.UpOutlined,Col:K.Col,Row:K.Row,Form:K.Form,Item:Mg,Space:K.Space,Button:K.Button,ConditionBuilder:Sa},props:{config:{type:Array,default:()=>[]},searching:{type:Boolean,default:!1},current:{type:Number,default:1},defaultQuery:{type:Object,default:()=>{}},immediateQuery:{type:Boolean,default:!1}},emits:["search","changeExpand","update:current","resetSearch"],setup(e,{emit:t,expose:n}){const{config:a,immediateQuery:l}=o.toRefs(e),s=o.inject("pageName",""),c=o.computed(()=>a.value.length>6*3),u=o.ref(!c.value),{formState:d,dispatchFormState:f}=Ut(),{resetFields:p,validate:h,validateInfos:y}=xg(d[s]);o.watch(()=>e.defaultQuery,_=>{o.nextTick(()=>{f(_,s),t("search")})},{deep:!0,immediate:l.value});const m=()=>{h().then(()=>e.current===1?t("search"):t("update:current",1)).catch(_=>{console.log(_)})},w=_=>_.label.slice(0,10);o.watch(u,()=>t("changeExpand"));const S=o.computed(()=>u.value||!c.value?(6-a.value.length%6)*4:24);return n({resetFields:p}),{expand:u,pageName:s,formState:d,serachSpan:S,validateInfos:y,showAvailiableTrigger:c,AVAILIABLE_EXPAND_LINE:3,CONDITION_COUNT_PER_LINE:6,onSubmit:m,getItemLabel:w}}});function Fg(e,t,n,r,i,a){const l=o.resolveComponent("ConditionBuilder"),s=o.resolveComponent("Item"),c=o.resolveComponent("Col"),u=o.resolveComponent("Button"),d=o.resolveComponent("UpOutlined"),f=o.resolveComponent("DownOutlined"),p=o.resolveComponent("Space"),h=o.resolveComponent("Row"),y=o.resolveComponent("Form");return o.openBlock(),o.createBlock(y,{class:"page-renderer-conditions","label-col":{span:8},"wrapper-col":{span:16}},{default:o.withCtx(()=>[o.createVNode(h,{gutter:24},{default:o.withCtx(()=>[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(e.config,(m,w)=>{var S;return o.withDirectives((o.openBlock(),o.createBlock(c,{key:m.fieldName,span:((S=m.otherProps)==null?void 0:S.span)||4,class:"conditions-item-col"},{default:o.withCtx(()=>{var _,v;return[o.createVNode(s,o.mergeProps(e.validateInfos[m.fieldName],{colon:!1,"label-col":(_=m.otherProps)==null?void 0:_.labelCol,"wrapper-col":(v=m.otherProps)==null?void 0:v.wrapperCol,label:e.getItemLabel(m),class:{"form-item-with-small-fonts":e.getItemLabel(m).length>4,[`form-item-words${e.getItemLabel(m).length}`]:!0}}),{default:o.withCtx(()=>[o.createVNode(l,{value:e.formState[e.pageName][m.fieldName],"onUpdate:value":$=>e.formState[e.pageName][m.fieldName]=$,materials:m,onPressEnter:e.onSubmit},null,8,["value","onUpdate:value","materials","onPressEnter"])]),_:2},1040,["label-col","wrapper-col","label","class"])]}),_:2},1032,["span"])),[[o.vShow,e.expand||!e.showAvailiableTrigger||w<e.CONDITION_COUNT_PER_LINE]])}),128)),o.createVNode(c,{span:e.serachSpan},{default:o.withCtx(()=>[o.createVNode(p,{style:{float:"right","padding-right":"12px"}},{default:o.withCtx(()=>[o.createVNode(u,{type:"primary",size:"small",onClick:o.withModifiers(e.onSubmit,["prevent"]),loading:e.searching},{default:o.withCtx(()=>[o.createTextVNode("查询")]),_:1},8,["onClick","loading"]),o.createVNode(u,{size:"small",onClick:t[0]||(t[0]=m=>e.$emit("resetSearch"))},{default:o.withCtx(()=>[o.createTextVNode("重置")]),_:1}),e.showAvailiableTrigger?(o.openBlock(),o.createElementBlock("a",{key:0,style:{"font-size":"12px"},onClick:t[1]||(t[1]=m=>e.expand=!e.expand)},[e.expand?(o.openBlock(),o.createElementBlock(o.Fragment,{key:0},[o.createVNode(d),o.createTextVNode(" 收起 ")],64)):(o.openBlock(),o.createElementBlock(o.Fragment,{key:1},[o.createVNode(f),o.createTextVNode(" 展开 ")],64))])):o.createCommentVNode("",!0)]),_:1})]),_:1},8,["span"])]),_:1})]),_:1})}const jg=ke(Lg,[["render",Fg]]),Yt=Hn(()=>{const e=o.reactive(Object.create(null)),t=o.reactive(Object.create(null)),n=o.reactive(Object.create(null));return o.watch(t,()=>{for(const r in n)n[r]=[]},{deep:!0}),{selectedRows:e,selectedRowKeys:t,selectedErrorRowKeys:n}}),Wt="__$$loading",Ht="__$$map",zg="__$$rowClassName",Ea=[{value:100,label:100},{value:200,label:200},{value:500,label:500}],Ta="[@yzsf2e/render-core]COLUMN_SCHEME",Kg={".xlsx":"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",".xls":"application/vnd.ms-excel",".png":"image/png",".jpg":"image/jpeg",".jpeg":"image/jpeg"},Vg={ALL:"导出全部",SELECTED:"导出选中"},Mr={COLUMN_SETTING:"列表设置",FILTER_SETTING:"筛选设置",SORT_SETTING:"排序设置"},Ug={COLUMN_SETTING:"列表设置"},Yg=o.defineComponent({name:"PageRendererButtons",components:{aicon:tn,Menu:K.Menu,MenuItem:K.MenuItem,Space:K.Space,Button:K.Button,Select:K.Select,Dropdown:K.Dropdown,Pagination:K.Pagination,DropdownButton:K.DropdownButton,SettingOutlined:ge.SettingOutlined,DownOutlined:ge.DownOutlined},props:{config:{type:Array,default:()=>[]},hasApiConfig:{type:Boolean,required:!0},exportConfig:{type:Object},importConfig:{type:Object},handleExport:{type:Function,default:null},total:{type:Number,default:0},current:{type:Number,default:1},pageSize:{type:Number,default:100},pageSizeOptions:{type:Array,default:null}},emits:["buttonClick","update:current","update:pageSize","customizeSetting","refresh"],setup(e,{emit:t}){var T,O,A,C;const{current:n,pageSize:r,exportConfig:i,importConfig:a,pageSizeOptions:l}=o.toRefs(e),s=o.ref(!1),c=o.ref(!1),u=o.inject("pageName",""),{selectedRows:d}=Yt(),f=o.computed(()=>l.value||Ea),p=(g,b)=>{if(g.needSelectRows){if(!d[u].length){K.message.warn("请选择数据");return}if(g.mode==="single"&&d[u].length>1){K.message.warn("只能选择一条数据");return}}t("buttonClick",g.action,b)},h=o.computed({get:()=>n.value,set:g=>t("update:current",g)}),y=o.computed({get:()=>r.value,set:g=>{const b=Math.ceil(e.total/g);h.value>b&&(h.value=b),t("update:pageSize",g)}}),m=o.inject("paramsGuard",g=>g),w=(T=i.value)!=null&&T.url?Ke((O=i.value)==null?void 0:O.url,"post",{responseType:"blob",...i.value.requestOptions}):null,S=(C=(A=a.value)==null?void 0:A.children)!=null&&C.length?a.value.children.map(g=>Ke(g.url,"post",{...g.requestOptions})):[],_=async()=>{var N;const{formState:g}=Ut(),b=i.value?Ir({conditions:o.toRaw(g[u]),apiConfig:i.value}):{};m(b,u);try{s.value=!0;const x=await w(b);if(!x)return;const M=/\{\{(.+?)\}\}/g;let D=((N=i.value)==null?void 0:N.fileName)||"",P=null;for(;(P=M.exec(D))!==null;)P[1]==="Date"&&(D=D.replace(P[0],fi().format("YYYY-MM-DD")));const B=document.createElement("a"),R=window.URL.createObjectURL(new Blob([x]));if(B.href=R,B.download=D,document.body.appendChild(B),B.click(),document.body.removeChild(B),window.URL.revokeObjectURL(R),i.value.needFeedback===!1)return;K.message.success("导出成功")}catch(x){console.warn("export error: ",x)}finally{s.value=!1}},v=({url:g,type:b})=>{switch(b){case"TEMPLATE_LOCAL":window.open(g);break}},$=async({accept:g},b)=>{const N=/^\.[a-zA-Z]+$/,x=g==null?void 0:g.reduce((P,B)=>{if(!N.test(B))throw`请提供正确的文件后缀名,是否是 【.${B}】 ?`;return P[Kg[B]]=[B],P},{}),[M]=await window.showOpenFilePicker({types:[{accept:x}]}),D=await M.getFile();if(D){const P=S[b],B=new FormData;B.append("file",D),c.value=!0,P(B).finally(()=>{c.value=!1})}};return{SETTINGS_MAP:Mr,API_CONFIG_SETTINGS_MAP:Ug,importLoading:c,exportLoading:s,computed_current:h,computed_pageSize:y,paginationSizeOptions:f,OPERATIONS_EXPORT_MAP:Vg,handleImport:(g,b)=>{const{type:N}=g;if(["TEMPLATE_LOCAL"].includes(N)){v(g);return}if(["IMPORT"].includes(N)){$(g,b);return}K.message.warn(`请确认ImportConfigItem.type是否正确: ${N}`)},handleApiConfigExport:_,handleButtonClick:p}}}),cw="",Wg={class:"page-renderer-buttons"},Hg={class:"page-renderer-buttons-left"},Gg={key:2},qg={class:"page-renderer-setting-trigger"},Xg={href:"javascript:;"};function Qg(e,t,n,r,i,a){const l=o.resolveComponent("aicon"),s=o.resolveComponent("MenuItem"),c=o.resolveComponent("Menu"),u=o.resolveComponent("Space"),d=o.resolveComponent("Button"),f=o.resolveComponent("Dropdown"),p=o.resolveComponent("DownOutlined"),h=o.resolveComponent("Pagination"),y=o.resolveComponent("Select"),m=o.resolveComponent("SettingOutlined"),w=o.resolveDirective("permission");return o.openBlock(),o.createElementBlock("div",Wg,[o.createElementVNode("div",Hg,[o.createVNode(u,null,{default:o.withCtx(()=>[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(e.config,(S,_)=>o.withDirectives((o.openBlock(),o.createBlock(o.resolveDynamicComponent(S.type),o.mergeProps(S.otherProps,{key:`${S.type}${_}`,onClick:v=>e.handleButtonClick(S,v)}),o.createSlots({overlay:o.withCtx(()=>[o.createVNode(c,null,{default:o.withCtx(()=>[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(S.sublist,v=>(o.openBlock(),o.createBlock(s,{key:v.action,onClick:$=>e.handleButtonClick(v,$)},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(v.children),1)]),_:2},1032,["onClick"]))),128))]),_:2},1024)]),default:o.withCtx(()=>[o.createTextVNode(" "+o.toDisplayString(S.children)+" ",1)]),_:2},[S.iconType?{name:"icon",fn:o.withCtx(()=>[o.createVNode(l,{type:S.iconType},null,8,["type"])]),key:"0"}:void 0]),1040,["onClick"])),[[w,S.permissions]])),128))]),_:1})]),o.createElementVNode("div",null,[o.createVNode(u,null,{default:o.withCtx(()=>{var S,_;return[e.hasApiConfig?(o.openBlock(),o.createElementBlock(o.Fragment,{key:0},[(S=e.importConfig)!=null&&S.children?(o.openBlock(),o.createBlock(f,{key:0,trigger:["click"],disabled:e.importLoading},{overlay:o.withCtx(()=>[o.createVNode(c,null,{default:o.withCtx(()=>[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(e.importConfig.children,(v,$)=>(o.openBlock(),o.createBlock(s,{key:$,onClick:()=>e.handleImport(v,$)},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(v.title),1)]),_:2},1032,["onClick"]))),128))]),_:1})]),default:o.withCtx(()=>[o.createVNode(d,{loading:e.importLoading,size:"small",type:"primary"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(e.importConfig.title||"导入"),1)]),_:1},8,["loading"])]),_:1},8,["disabled"])):o.createCommentVNode("",!0),e.exportConfig?(o.openBlock(),o.createBlock(d,{key:1,size:"small",type:"primary",loading:e.exportLoading,onClick:t[0]||(t[0]=()=>e.handleApiConfigExport())},{default:o.withCtx(()=>[o.createTextVNode(" 导出 ")]),_:1},8,["loading"])):o.createCommentVNode("",!0)],64)):(o.openBlock(),o.createElementBlock(o.Fragment,{key:1},[(_=e.importConfig)!=null&&_.sublist?(o.openBlock(),o.createBlock(f,{key:0,trigger:["click"],disabled:e.importLoading},{overlay:o.withCtx(()=>[o.createVNode(c,null,{default:o.withCtx(()=>[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(e.importConfig.sublist,(v,$)=>(o.openBlock(),o.createBlock(s,{key:$,onClick:()=>e.handleImport(v,$)},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(v.title),1)]),_:2},1032,["onClick"]))),128))]),_:1})]),default:o.withCtx(()=>[o.createVNode(d,{loading:e.importLoading,size:"small",type:"primary"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(e.importConfig.title||"导入"),1)]),_:1},8,["loading"])]),_:1},8,["disabled"])):o.createCommentVNode("",!0),e.exportConfig?(o.openBlock(),o.createBlock(f,{key:1},{overlay:o.withCtx(()=>[o.createVNode(c,{onClick:t[1]||(t[1]=v=>e.handleExport(v.key))},{default:o.withCtx(()=>[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(e.OPERATIONS_EXPORT_MAP,(v,$)=>(o.openBlock(),o.createBlock(s,{key:$},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(v),1)]),_:2},1024))),128))]),_:1})]),default:o.withCtx(()=>[o.createVNode(d,{size:"small",type:"primary",loading:e.exportLoading},{default:o.withCtx(()=>[o.createTextVNode(" 导出 "),o.createVNode(p)]),_:1},8,["loading"])]),_:1})):o.createCommentVNode("",!0)],64)),e.hasApiConfig?(o.openBlock(),o.createElementBlock("div",Gg,"共 "+o.toDisplayString(e.total)+" 条",1)):o.createCommentVNode("",!0),o.createVNode(h,{class:"operations-pagination-simple",current:e.computed_current,"onUpdate:current":t[2]||(t[2]=v=>e.computed_current=v),pageSize:e.computed_pageSize,"onUpdate:pageSize":t[3]||(t[3]=v=>e.computed_pageSize=v),size:"small",simple:"",total:e.total},null,8,["current","pageSize","total"]),o.createVNode(y,{value:e.computed_pageSize,"onUpdate:value":t[4]||(t[4]=v=>e.computed_pageSize=v),size:"small",options:e.paginationSizeOptions},null,8,["value","options"]),o.createVNode(f,{placement:"bottomRight",trigger:["click"]},{overlay:o.withCtx(()=>[o.createVNode(c,{onClick:t[5]||(t[5]=v=>e.$emit("customizeSetting",v.key))},{default:o.withCtx(()=>[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(e.hasApiConfig?e.API_CONFIG_SETTINGS_MAP:e.SETTINGS_MAP,(v,$)=>(o.openBlock(),o.createBlock(s,{key:$},{default:o.withCtx(()=>[o.createVNode(m,{style:{"margin-right":"4px"}}),o.createElementVNode("a",Xg,o.toDisplayString(v),1)]),_:2},1024))),128))]),_:1})]),default:o.withCtx(()=>[o.createElementVNode("div",qg,[o.createVNode(m,{style:{"font-size":"15px",transform:"translateY(2px)"}})])]),_:1})]}),_:1})])])}const Zg=ke(Yg,[["render",Qg]]),Jg=o.defineComponent({name:"PageRendererSummaryBar",components:{Alert:K.Alert},props:{config:{type:Object,required:!0}},setup(e,{expose:t}){const{config:n}=o.toRefs(e),{template:r}=n.value,i=o.ref(!1),{formState:a}=Ut(),l=o.inject("pageName",""),s=o.inject("paramsGuard",h=>h),c=()=>{const h=/\{\{(.+?)\}\}/g;let y={},m=[];for(;(m=h.exec(r))!==null;)y[m[1].trim()]=" - ";return y},u=o.reactive(c()),d=Ke(n.value.url),f=async()=>{const h=Ir({conditions:a[l],apiConfig:n.value});s(h,l),i.value=!0,d(h).then(y=>{Object.keys(u).forEach(m=>{const w=kn(y,`${n.value.dataKey}.${m}`);u[m]=Kt(w)?" - ":w})}).finally(()=>i.value=!1)},p={data:()=>o.toRaw(u),template:r};return t({fetchSummary:f}),()=>o.h(K.Alert,{class:"page-renderer-summary-bar"},{message:()=>i.value?o.h(K.Spin,{size:"small",style:{height:"20px"}}):o.h(p)})}}),uw="",ey=e=>{const t=document.createElement("textarea");t.value=e,document.body.appendChild(t),t.select(),t.setSelectionRange(0,99999);try{document.execCommand("copy"),K.message.success("复制成功")}catch(n){K.message.error("复制失败"),console.error("【@yzsf2e/render-core】execCommand 复制失败: ",n)}document.body.removeChild(t)},ty=e=>{navigator.clipboard.writeText(e).then(()=>{K.message.success("复制成功")}).catch(t=>{console.error("【@yzsf2e/render-core】复制失败: ",t),ey(e)})},xn=e=>o.h("span",[o.h({template:e}),o.h(ge.CopyOutlined,{style:{marginLeft:"8px",cursor:"pointer",color:"#1890ff"},onClick:t=>{t.stopPropagation(),ty(e)},onDblclick:t=>{t.stopPropagation()}})]),ny=o.defineComponent({name:"PageRendererTableCell",props:{column:{type:Object,default:()=>{}},row:{type:Object,default:()=>{}},copyable:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},handleLinkClick:{type:Function,required:!0},linkCellKeys:{type:Array,default:()=>[]},keywords:{type:Array,default:()=>[]}},setup(e){const{copyable:t,column:n,row:r,linkCellKeys:i,keywords:a}=o.toRefs(e),l=o.computed(()=>{let s=r.value[n.value.dataIndex];return a.value.includes(n.value.dataIndex)&&(s=r.value[Ht][n.value.dataIndex]),s});return()=>i.value.includes(n.value.dataIndex)?e.loading?o.h(ge.LoadingOutlined,{style:{color:"#1890ff"}}):o.h("a",{onclick:c=>{c.stopPropagation(),e.handleLinkClick(r.value,n.value,c)}},t.value?xn(l.value):l.value):t.value?xn(l.value):o.h({template:l.value})}}),ry=o.defineComponent({name:"TableCopyCell",props:{text:{type:String,default:""}},setup(e){return()=>xn(e.text)}}),oy=o.defineComponent({name:"TableImageCell",props:{image:{type:String||Array,required:!0}},setup(e){const{image:t}=o.toRefs(e),n=o.inject("previewMediaModalOpen",()=>{}),r=o.computed(()=>typeof t.value=="string"?[t.value]:t.value);return{imageList:r,preview:a=>{n([...r.value],a)}}}}),iy=["src","onClick"];function ay(e,t,n,r,i,a){const l=o.resolveComponent("a-space");return o.openBlock(),o.createElementBlock("div",null,[o.createVNode(l,null,{default:o.withCtx(()=>[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(e.imageList,(s,c)=>(o.openBlock(),o.createElementBlock("img",{src:s,key:c,onClick:()=>e.preview(c),style:{width:"30px",height:"30px",cursor:"pointer",border:"1px solid #ccc"}},null,8,iy))),128))]),_:1})])}const sy=ke(oy,[["render",ay]]);var ly=20,cy=1,et=1e6,Oa=1e6,uy=-7,fy=21,dy=!1,Gt="[big.js] ",tt=Gt+"Invalid ",Ln=tt+"decimal places",py=tt+"rounding mode",_a=Gt+"Division by zero",Z={},Be=void 0,hy=/^-?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i;function Aa(){function e(t){var n=this;if(!(n instanceof e))return t===Be?Aa():new e(t);if(t instanceof e)n.s=t.s,n.e=t.e,n.c=t.c.slice();else{if(typeof t!="string"){if(e.strict===!0&&typeof t!="bigint")throw TypeError(tt+"value");t=t===0&&1/t<0?"-0":String(t)}my(n,t)}n.constructor=e}return e.prototype=Z,e.DP=ly,e.RM=cy,e.NE=uy,e.PE=fy,e.strict=dy,e.roundDown=0,e.roundHalfUp=1,e.roundHalfEven=2,e.roundUp=3,e}function my(e,t){var n,r,i;if(!hy.test(t))throw Error(tt+"number");for(e.s=t.charAt(0)=="-"?(t=t.slice(1),-1):1,(n=t.indexOf("."))>-1&&(t=t.replace(".","")),(r=t.search(/e/i))>0?(n<0&&(n=r),n+=+t.slice(r+1),t=t.substring(0,r)):n<0&&(n=t.length),i=t.length,r=0;r<i&&t.charAt(r)=="0";)++r;if(r==i)e.c=[e.e=0];else{for(;i>0&&t.charAt(--i)=="0";);for(e.e=n-r-1,e.c=[],n=0;r<=i;)e.c[n++]=+t.charAt(r++)}return e}function nt(e,t,n,r){var i=e.c;if(n===Be&&(n=e.constructor.RM),n!==0&&n!==1&&n!==2&&n!==3)throw Error(py);if(t<1)r=n===3&&(r||!!i[0])||t===0&&(n===1&&i[0]>=5||n===2&&(i[0]>5||i[0]===5&&(r||i[1]!==Be))),i.length=1,r?(e.e=e.e-t+1,i[0]=1):i[0]=e.e=0;else if(t<i.length){if(r=n===1&&i[t]>=5||n===2&&(i[t]>5||i[t]===5&&(r||i[t+1]!==Be||i[t-1]&1))||n===3&&(r||!!i[0]),i.length=t,r){for(;++i[--t]>9;)if(i[t]=0,t===0){++e.e,i.unshift(1);break}}for(t=i.length;!i[--t];)i.pop()}return e}function Ct(e,t,n){var r=e.e,i=e.c.join(""),a=i.length;if(t)i=i.charAt(0)+(a>1?"."+i.slice(1):"")+(r<0?"e":"e+")+r;else if(r<0){for(;++r;)i="0"+i;i="0."+i}else if(r>0)if(++r>a)for(r-=a;r--;)i+="0";else r<a&&(i=i.slice(0,r)+"."+i.slice(r));else a>1&&(i=i.charAt(0)+"."+i.slice(1));return e.s<0&&n?"-"+i:i}Z.abs=function(){var e=new this.constructor(this);return e.s=1,e},Z.cmp=function(e){var t,n=this,r=n.c,i=(e=new n.constructor(e)).c,a=n.s,l=e.s,s=n.e,c=e.e;if(!r[0]||!i[0])return r[0]?a:i[0]?-l:0;if(a!=l)return a;if(t=a<0,s!=c)return s>c^t?1:-1;for(l=(s=r.length)<(c=i.length)?s:c,a=-1;++a<l;)if(r[a]!=i[a])return r[a]>i[a]^t?1:-1;return s==c?0:s>c^t?1:-1},Z.div=function(e){var t=this,n=t.constructor,r=t.c,i=(e=new n(e)).c,a=t.s==e.s?1:-1,l=n.DP;if(l!==~~l||l<0||l>et)throw Error(Ln);if(!i[0])throw Error(_a);if(!r[0])return e.s=a,e.c=[e.e=0],e;var s,c,u,d,f,p=i.slice(),h=s=i.length,y=r.length,m=r.slice(0,s),w=m.length,S=e,_=S.c=[],v=0,$=l+(S.e=t.e-e.e)+1;for(S.s=a,a=$<0?0:$,p.unshift(0);w++<s;)m.push(0);do{for(u=0;u<10;u++){if(s!=(w=m.length))d=s>w?1:-1;else for(f=-1,d=0;++f<s;)if(i[f]!=m[f]){d=i[f]>m[f]?1:-1;break}if(d<0){for(c=w==s?i:p;w;){if(m[--w]<c[w]){for(f=w;f&&!m[--f];)m[f]=9;--m[f],m[w]+=10}m[w]-=c[w]}for(;!m[0];)m.shift()}else break}_[v++]=d?u:++u,m[0]&&d?m[w]=r[h]||0:m=[r[h]]}while((h++<y||m[0]!==Be)&&a--);return!_[0]&&v!=1&&(_.shift(),S.e--,$--),v>$&&nt(S,$,n.RM,m[0]!==Be),S},Z.eq=function(e){return this.cmp(e)===0},Z.gt=function(e){return this.cmp(e)>0},Z.gte=function(e){return this.cmp(e)>-1},Z.lt=function(e){return this.cmp(e)<0},Z.lte=function(e){return this.cmp(e)<1},Z.minus=Z.sub=function(e){var t,n,r,i,a=this,l=a.constructor,s=a.s,c=(e=new l(e)).s;if(s!=c)return e.s=-c,a.plus(e);var u=a.c.slice(),d=a.e,f=e.c,p=e.e;if(!u[0]||!f[0])return f[0]?e.s=-c:u[0]?e=new l(a):e.s=1,e;if(s=d-p){for((i=s<0)?(s=-s,r=u):(p=d,r=f),r.reverse(),c=s;c--;)r.push(0);r.reverse()}else for(n=((i=u.length<f.length)?u:f).length,s=c=0;c<n;c++)if(u[c]!=f[c]){i=u[c]<f[c];break}if(i&&(r=u,u=f,f=r,e.s=-e.s),(c=(n=f.length)-(t=u.length))>0)for(;c--;)u[t++]=0;for(c=t;n>s;){if(u[--n]<f[n]){for(t=n;t&&!u[--t];)u[t]=9;--u[t],u[n]+=10}u[n]-=f[n]}for(;u[--c]===0;)u.pop();for(;u[0]===0;)u.shift(),--p;return u[0]||(e.s=1,u=[p=0]),e.c=u,e.e=p,e},Z.mod=function(e){var t,n=this,r=n.constructor,i=n.s,a=(e=new r(e)).s;if(!e.c[0])throw Error(_a);return n.s=e.s=1,t=e.cmp(n)==1,n.s=i,e.s=a,t?new r(n):(i=r.DP,a=r.RM,r.DP=r.RM=0,n=n.div(e),r.DP=i,r.RM=a,this.minus(n.times(e)))},Z.neg=function(){var e=new this.constructor(this);return e.s=-e.s,e},Z.plus=Z.add=function(e){var t,n,r,i=this,a=i.constructor;if(e=new a(e),i.s!=e.s)return e.s=-e.s,i.minus(e);var l=i.e,s=i.c,c=e.e,u=e.c;if(!s[0]||!u[0])return u[0]||(s[0]?e=new a(i):e.s=i.s),e;if(s=s.slice(),t=l-c){for(t>0?(c=l,r=u):(t=-t,r=s),r.reverse();t--;)r.push(0);r.reverse()}for(s.length-u.length<0&&(r=u,u=s,s=r),t=u.length,n=0;t;s[t]%=10)n=(s[--t]=s[t]+u[t]+n)/10|0;for(n&&(s.unshift(n),++c),t=s.length;s[--t]===0;)s.pop();return e.c=s,e.e=c,e},Z.pow=function(e){var t=this,n=new t.constructor("1"),r=n,i=e<0;if(e!==~~e||e<-Oa||e>Oa)throw Error(tt+"exponent");for(i&&(e=-e);e&1&&(r=r.times(t)),e>>=1,!!e;)t=t.times(t);return i?n.div(r):r},Z.prec=function(e,t){if(e!==~~e||e<1||e>et)throw Error(tt+"precision");return nt(new this.constructor(this),e,t)},Z.round=function(e,t){if(e===Be)e=0;else if(e!==~~e||e<-et||e>et)throw Error(Ln);return nt(new this.constructor(this),e+this.e+1,t)},Z.sqrt=function(){var e,t,n,r=this,i=r.constructor,a=r.s,l=r.e,s=new i("0.5");if(!r.c[0])return new i(r);if(a<0)throw Error(Gt+"No square root");a=Math.sqrt(r+""),a===0||a===1/0?(t=r.c.join(""),t.length+l&1||(t+="0"),a=Math.sqrt(t),l=((l+1)/2|0)-(l<0||l&1),e=new i((a==1/0?"5e":(a=a.toExponential()).slice(0,a.indexOf("e")+1))+l)):e=new i(a+""),l=e.e+(i.DP+=4);do n=e,e=s.times(n.plus(r.div(n)));while(n.c.slice(0,l).join("")!==e.c.slice(0,l).join(""));return nt(e,(i.DP-=4)+e.e+1,i.RM)},Z.times=Z.mul=function(e){var t,n=this,r=n.constructor,i=n.c,a=(e=new r(e)).c,l=i.length,s=a.length,c=n.e,u=e.e;if(e.s=n.s==e.s?1:-1,!i[0]||!a[0])return e.c=[e.e=0],e;for(e.e=c+u,l<s&&(t=i,i=a,a=t,u=l,l=s,s=u),t=new Array(u=l+s);u--;)t[u]=0;for(c=s;c--;){for(s=0,u=l+c;u>c;)s=t[u]+a[c]*i[u-c-1]+s,t[u--]=s%10,s=s/10|0;t[u]=s}for(s?++e.e:t.shift(),c=t.length;!t[--c];)t.pop();return e.c=t,e},Z.toExponential=function(e,t){var n=this,r=n.c[0];if(e!==Be){if(e!==~~e||e<0||e>et)throw Error(Ln);for(n=nt(new n.constructor(n),++e,t);n.c.length<e;)n.c.push(0)}return Ct(n,!0,!!r)},Z.toFixed=function(e,t){var n=this,r=n.c[0];if(e!==Be){if(e!==~~e||e<0||e>et)throw Error(Ln);for(n=nt(new n.constructor(n),e+n.e+1,t),e=e+n.e+1;n.c.length<e;)n.c.push(0)}return Ct(n,!1,!!r)},Z[Symbol.for("nodejs.util.inspect.custom")]=Z.toJSON=Z.toString=function(){var e=this,t=e.constructor;return Ct(e,e.e<=t.NE||e.e>=t.PE,!!e.c[0])},Z.toNumber=function(){var e=Number(Ct(this,!0,!0));if(this.constructor.strict===!0&&!this.eq(e.toString()))throw Error(Gt+"Imprecise conversion");return e},Z.toPrecision=function(e,t){var n=this,r=n.constructor,i=n.c[0];if(e!==Be){if(e!==~~e||e<1||e>et)throw Error(tt+"precision");for(n=nt(new r(n),e,t);n.c.length<e;)n.c.push(0)}return Ct(n,e<=n.e||n.e<=r.NE||n.e>=r.PE,!!i)},Z.valueOf=function(){var e=this,t=e.constructor;if(t.strict===!0)throw Error(Gt+"valueOf disallowed");return Ct(e,e.e<=t.NE||e.e>=t.PE,!0)};var gy=Aa();const yy={sum:e=>{const{selectedRows:t}=Yt(),n=o.inject("pageName","");return t[n].reduce((r,i)=>r=r.plus(Number(i[e.dataIndex])),new gy(0))}},by=(e,t)=>yy[e](t),wy={ascend:"ASC",descend:"DESC"},vy={ASC:"ascend",DESC:"descend"},{useForm:Cy}=K.Form,Sy=o.defineComponent({name:"PageRendererTableView",components:{aicon:tn,Table:K.Table,Space:K.Space,TableCell:ny,TableCopyCell:ry,TableImageCell:sy,LoadingOutlined:ge.LoadingOutlined,ConditionBuilder:Sa},props:{tableProps:{type:Object,default:()=>{}},config:{type:Array,default:()=>[]},conditions:{type:Array,default:()=>[]},current:{type:Number,default:1},hasApiConfig:{type:Boolean,required:!0},rowKey:{type:String||Function,default:(e,t)=>t},rowDblclickAction:{type:String,default:null},data:{type:Object,default:()=>{}},loading:{type:Boolean,default:!1},total:{type:Object,default:()=>{}},defaultSort:{type:Object,default:()=>{}},sort:{type:Object,default:()=>{}}},emits:["filter","search","changeExpand","update:current","update:sort","linkClick"],setup(e,{expose:t,emit:n}){var L;const r=async()=>{await o.nextTick(),As(y,k=>{const F=k[0],{height:I}=F.contentRect;a.value=I-44-(e.hasApiConfig?0:30)})};o.onMounted(r);const{enumerations:i}=Bn(),a=o.ref(0),l="filter_",s="_index",{config:c,conditions:u,hasApiConfig:d,rowKey:f,data:p,total:h}=o.toRefs(e),y=o.ref(null),m=o.inject("pageName",""),w=o.inject("emitHandler",()=>{}),S=o.ref(e.sort||{});let _=!1;const v=k=>{n("update:sort",k),_&&(_=!1)},$=k=>{v(k),n("search")};o.watch(()=>e.defaultSort,k=>{_=!0,S.value=k}),o.watch(S,(k,F)=>{const I=Object.keys(k)[0];if(I){const j=c.value.find(W=>W.columnKey===I);j!=null&&j.sortable&&(_?v(S.value):$(S.value))}else{const j=Object.keys(F)[0];if(j){const W=c.value.find(ee=>ee.columnKey===j);W!=null&&W.sortable&&(_?v(S.value):$(S.value))}}});const E=o.ref([]),T=o.ref([]),O=o.ref([]),A=o.ref([]),C=o.ref({}),g=o.ref([]),{selectedRows:b,selectedRowKeys:N,selectedErrorRowKeys:x}=Yt();x[m]||(x[m]=[]);const M=o.computed(()=>N[m].length>0),D=o.computed(()=>{if(d.value)return ba(u.value,"fieldName");{const k=c.value.reduce((F,I)=>(I.filterable&&F.push({...I,label:I.title,type:I.filterType,fieldName:I.columnKey,filterKey:I.columnKey,otherProps:{...I,...I.otherProps?I.otherProps:{}}}),F),[]);return ba(k,"columnKey")}}),P=o.ref(!d.value),B=o.inject("tableCellSlots",{}),R=()=>{P.value=!P.value},V=k=>k&&k.dataIndex===s,z=k=>k.dataIndex==="action"||k.cellValueType==="slot",q=(k,F)=>Kt(k[F.dataIndex])||k[F.dataIndex]==="",Q=({text:k,column:F,record:I,index:j})=>V(F)?j+1:o.isVNode(k)||!F||z(F)?k:q(I,F)?" - ":k,J=(k,F)=>{N[m]=k,b[m]=F},se=()=>{J([],[])},ue=o.ref((L=e.tableProps)!=null&&L.expandedRowKeys?[...e.tableProps.expandedRowKeys]:[]);o.watch(()=>{var k;return(k=e.tableProps)==null?void 0:k.expandedRowKeys},k=>{k&&(ue.value=[...k])},{immediate:!0});const he=k=>{const F=window.getSelection();if(F&&(F==null?void 0:F.toString().length)>0)return;const I=[...N[m]],j=f.value;I.indexOf(k[j])>=0?I.splice(I.indexOf(k[j]),1):I.push(k[j]),N[m]=I,b[m]=Jt.value.filter(W=>I.includes(W[j]))},me=k=>({onclick:()=>he(k),onDblclick:()=>{e.rowDblclickAction&&w(e.rowDblclickAction,[k])}}),Oe=o.computed(()=>{var I;let k=a.value;M.value&&(k-=31),P.value&&(k-=33);const F=(I=y.value)==null?void 0:I.querySelector(".ant-table-body");return F&&(F.style.minHeight=`${k}px`),k});o.watchEffect(()=>{g.value=[{align:"center",children:P.value?[{title:"筛选",dataIndex:s,key:"TITLE_"+s,fixed:"left",width:40,align:"center"}]:[],dataIndex:s,fixed:"left",key:s,width:40},...c.value.filter(k=>k.show!==!1).map(k=>{const{title:F,width:I=150,columnKey:j,cellRenderType:W,cellValueType:ee,copyable:xe,refEnum:Ae,action:Ue,children:Ye,summary:ot,fixed:We,filterable:Yn,sortable:Ga}=k;W==="Link"&&E.value.push(j),W==="HTML"&&T.value.push(j),ee==="slot"&&O.value.push(j),ee==="img"&&A.value.push(j),ee==="map"&&Ae&&(C.value[j]=k);const qa=j!=="action"&&Array.isArray(Ye),Kb=qa?Ye.map(it=>({...it,align:"center",action:Ue,dataIndex:it.columnKey,ellipsis:!0,key:it.columnKey,resizable:!0,width:I})):P.value?[{action:Ue,align:"center",cellValueType:ee,copyable:xe,childActions:j==="action"?Ye:[],dataIndex:j,ellipsis:!0,filterable:Yn,fixed:j==="action"?!0:We,key:l+j,resizable:!0,summary:ot,title:"",width:I}]:[];return{action:Ue,align:"center",cellValueType:ee,copyable:xe,childActions:j==="action"?Ye:[],children:Kb,dataIndex:j,ellipsis:!0,fixed:j==="action"?!0:We,key:j,resizable:!0,summary:ot,sortable:Ga,sorter:qa?!1:Ga||((it,Xa)=>typeof it[j]=="string"?it[j].localeCompare(Xa[j]):it[j]-Xa[j]),sortOrder:vy[S.value[j]],showSorterTooltip:!1,title:F,width:I}})]});function ve(k){let F=[];return k.forEach(I=>{I.children&&I.children.length>0?F=F.concat(ve(I.children)):F.push(I.dataIndex)}),F}const de=o.computed(()=>ve(g.value).map(k=>k===s?h.value.count:h.value[k])),{formState:Ce}=Ut(),{validate:_e}=Cy(Ce[m]),Ie=()=>{_e().then(()=>e.current===1?n("search"):n("update:current",1)).catch(k=>{console.warn(k)})},Vn=()=>{n("filter")},Un=k=>{D.value[k].type==="Input"?Vn():o.nextTick(Ie)},Vr=(k,F,I)=>{Array.isArray(I)||(I.columnKey&&I.order?S.value={[I.columnKey]:wy[I.order]}:S.value={})},Ur=()=>{S.value=e.defaultSort},Zt=o.computed(()=>Object.keys(C.value)),Jt=o.computed(()=>{const k=g.value.filter(I=>I.action!==void 0||I.key==="action").reduce((I,j)=>{var W;return j.key==="action"?(W=j.child)==null||W.forEach(ee=>{I[`${ee.action}Loading`]=!1}):I[`${j.action}Loading`]=!1,I},{});return Array.isArray(p.value)?p.value.map(I=>({...I,...Zt.value.reduce((j,W)=>{var ee,xe,Ae,Ue;if(C.value[W].refEnumLabel){const Ye=(xe=(ee=i[C.value[W].refEnum])==null?void 0:ee.find(ot=>{var We,Yn;return((We=ot.id)==null?void 0:We.toString())===((Yn=I[C.value[W].refEnum])==null?void 0:Yn.toString())}))==null?void 0:xe[C.value[W].refEnumLabel];j[Ht][W]=Ye}else j[Ht][W]=(Ue=(Ae=i[C.value[W].refEnum])==null?void 0:Ae.find(Ye=>{var ot,We;return((ot=Ye.value)==null?void 0:ot.toString())===((We=I[W])==null?void 0:We.toString())}))==null?void 0:Ue.label;return j},{[Ht]:o.reactive({})}),[Wt]:o.reactive(Ft(k))})):[]});o.watch(Jt,()=>{ue.value=[]});const Yr=(k,F)=>{F.width=k,F.children&&F.children.length>0&&(F.children[F.children.length-1].width=k)},en=(k,F)=>{var I;return((I=c.value.find(j=>j.columnKey===F.dataIndex))==null?void 0:I[k])||""},Wr=(k,F,I,j)=>{const W=en("action",F)||j;k[Wt][`${W}Loading`]=!0,n("linkClick",en("action",F)||j,I,[{...k}],()=>k[Wt][`${W}Loading`]=!1)},Hr=(k,F)=>{if(k.length!==3)return console.warn(`【${k}】表达式不合法,默认计算为显示`),!0;const[I,j,W]=k;return j==="equal"?ya(F[I],W):j==="unequal"?!ya(F[I],W):!0};return o.onRenderTriggered(k=>{}),t({clearSort:Ur,clearSelect:se,toggleTableHeight:r}),{h:o.h,y:a,isNil:Kt,columns:g,totalList:de,pageName:m,keywords:Zt,computedY:Oe,dataSource:Jt,LOADING_SIGN:Wt,tableWrapper:y,linkCellKeys:E,htmlCellKeys:T,slotCellKeys:O,imgCellKeys:A,tableCellSlots:B,selectedRows:b,selectedRowKeys:N,selectedErrorRowKeys:x,showSelectionSummaryRow:M,DATA_SOURCE_FILTER_PREFIX:l,DATA_SOURCE_INDEX_KEY:s,formState:Ce,fieldNameConditionsByKey:D,isHeaderFilterable:P,FilterOutlined:ge.FilterOutlined,TABLE_ROW_CLASS_NAME:zg,localExpandedRowKeys:ue,headerFilterSwitch:R,onSubmit:Ie,onTableChange:Vr,onConditionChange:Un,onHeaderFilterChange:Vn,emit:n,customRow:me,actionVisible:Hr,onSelectChange:J,handleLinkClick:Wr,transformSummary:by,transformCellText:Q,handleResizeColumn:Yr,findConfigByColumnKey:en,copyTextRender:xn}}}),fw="",Ey={ref:"tableWrapper",style:{flex:"auto",overflow:"hidden"}},Ty={key:1},Oy={style:{color:"#999"}},_y={key:1},Ay={key:2},ky=["onClick"],$y=o.createElementVNode("span",{class:"table-summary-cell-text"},"选中",-1),Ny={key:0,class:"table-summary-cell-text"},Py={key:1,class:"table-summary-cell-text"},Iy=o.createElementVNode("span",{class:"table-summary-cell-text"},"总计",-1),Dy={class:"table-summary-cell-text"};function Ry(e,t,n,r,i,a){var $;const l=o.resolveComponent("a-button"),s=o.resolveComponent("a-tooltip"),c=o.resolveComponent("ConditionBuilder"),u=o.resolveComponent("a-input"),d=o.resolveComponent("aicon"),f=o.resolveComponent("LoadingOutlined"),p=o.resolveComponent("Space"),h=o.resolveComponent("TableImageCell"),y=o.resolveComponent("TableCell"),m=o.resolveComponent("TableCopyCell"),w=o.resolveComponent("a-table-summary-cell"),S=o.resolveComponent("a-table-summary-row"),_=o.resolveComponent("a-table-summary"),v=o.resolveComponent("Table");return o.openBlock(),o.createElementBlock("div",Ey,[o.createVNode(v,{bordered:"",size:"small","data-source":e.dataSource,columns:e.columns,"expand-column-width":40,loading:e.loading,pagination:!1,scroll:{y:e.computedY},"row-key":e.rowKey,"custom-row":e.customRow,"expanded-row-keys":e.localExpandedRowKeys,"onUpdate:expandedRowKeys":t[1]||(t[1]=E=>e.localExpandedRowKeys=E),"row-class-name":(E,T)=>`${T%2===1?"table-striped-row":""} ${e.selectedErrorRowKeys[e.pageName].includes(E[e.rowKey])?"table-error-row":""} ${E[e.TABLE_ROW_CLASS_NAME]?E[e.TABLE_ROW_CLASS_NAME]:""}`,"row-selection":{fixed:!0,columnWidth:40,onChange:e.onSelectChange,selectedRowKeys:e.selectedRowKeys[e.pageName]},"transform-cell-text":e.transformCellText,onResizeColumn:e.handleResizeColumn,onChange:e.onTableChange},o.createSlots({headerCell:o.withCtx(({column:E})=>{var T;return[E.key===e.DATA_SOURCE_INDEX_KEY?(o.openBlock(),o.createElementBlock("div",{key:0,onClick:t[0]||(t[0]=(...O)=>e.headerFilterSwitch&&e.headerFilterSwitch(...O))},[o.createVNode(s,{title:e.isHeaderFilterable?"关闭筛选表头":"开启筛选表头"},{default:o.withCtx(()=>[o.createVNode(l,{type:"text",icon:e.h(e.FilterOutlined)},null,8,["icon"])]),_:1},8,["title"])])):(o.openBlock(),o.createElementBlock("div",Ty,[E.sortable===!1?(o.openBlock(),o.createBlock(s,{key:0},{title:o.withCtx(()=>[o.createTextVNode("仅支持当前页的筛选排序,不支持跨页筛选排序。如需统计全部数据,请点[导出全部],在 excel 统计。")]),default:o.withCtx(()=>[o.createElementVNode("span",Oy,o.toDisplayString(E.title),1)]),_:2},1024)):(o.openBlock(),o.createElementBlock("div",_y,o.toDisplayString(E.title),1)),(T=E.key)!=null&&T.startsWith(e.DATA_SOURCE_FILTER_PREFIX)?(o.openBlock(),o.createElementBlock("div",Ay,[e.fieldNameConditionsByKey[E.dataIndex]?(o.openBlock(),o.createBlock(c,{key:0,value:e.formState[e.pageName][E.dataIndex],"onUpdate:value":O=>e.formState[e.pageName][E.dataIndex]=O,materials:e.fieldNameConditionsByKey[E.dataIndex],onChange:()=>{e.onConditionChange(E.dataIndex)},onPressEnter:e.onSubmit,style:{width:"100%"}},null,8,["value","onUpdate:value","materials","onChange","onPressEnter"])):(o.openBlock(),o.createBlock(u,{key:1,disabled:"",size:"small",value:e.formState[e.pageName][E.dataIndex],"onUpdate:value":O=>e.formState[e.pageName][E.dataIndex]=O,onChange:e.onHeaderFilterChange,onPressEnter:e.onSubmit},null,8,["value","onUpdate:value","onChange","onPressEnter"]))])):o.createCommentVNode("",!0)]))]}),bodyCell:o.withCtx(({text:E,record:T,index:O,column:A})=>[A.dataIndex==="action"?(o.openBlock(),o.createBlock(p,{key:0},{default:o.withCtx(()=>[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(A.childActions,C=>(o.openBlock(),o.createElementBlock(o.Fragment,{key:C.action},[C.show===void 0||e.actionVisible(C.show,T)?(o.openBlock(),o.createElementBlock(o.Fragment,{key:0},[T[e.LOADING_SIGN][`${C.action}Loading`]?(o.openBlock(),o.createBlock(f,{key:1,style:{color:"#1890ff"}})):(o.openBlock(),o.createElementBlock("a",{key:0,onClick:o.withModifiers(g=>{C.disabled&&e.actionVisible(C.disabled,T)||e.handleLinkClick(T,A,g,C.action)},["stop"]),class:o.normalizeClass({"ant-table-action-disabled":C.disabled&&e.actionVisible(C.disabled,T)}),style:o.normalizeStyle({color:C.color})},[C.icon?(o.openBlock(),o.createBlock(d,{key:0,type:C.icon},null,8,["type"])):o.createCommentVNode("",!0),o.createTextVNode(" "+o.toDisplayString(C.text),1)],14,ky))],64)):o.createCommentVNode("",!0)],64))),128))]),_:2},1024)):o.createCommentVNode("",!0),e.slotCellKeys.includes(A.dataIndex)?(o.openBlock(),o.createElementBlock(o.Fragment,{key:1},[e.tableCellSlots[A.dataIndex].component?(o.openBlock(),o.createBlock(o.resolveDynamicComponent(e.tableCellSlots[A.dataIndex].component),o.normalizeProps(o.mergeProps({key:0},{text:E,row:T,index:O,column:A,...e.tableCellSlots[A.dataIndex].props})),null,16)):o.createCommentVNode("",!0)],64)):e.imgCellKeys.includes(A.dataIndex)?(o.openBlock(),o.createElementBlock(o.Fragment,{key:2},[E?(o.openBlock(),o.createBlock(h,o.normalizeProps(o.mergeProps({key:0},{image:E})),null,16)):o.createCommentVNode("",!0)],64)):[...e.linkCellKeys,...e.keywords,...e.htmlCellKeys].includes(A.dataIndex)?(o.openBlock(),o.createBlock(y,o.normalizeProps(o.mergeProps({key:3},{row:T,copyable:A.copyable,column:A,loading:T[e.LOADING_SIGN][`${A.action}Loading`],keywords:e.keywords,linkCellKeys:e.linkCellKeys,handleLinkClick:e.handleLinkClick})),null,16)):A.copyable?(o.openBlock(),o.createElementBlock(o.Fragment,{key:4},[E?(o.openBlock(),o.createBlock(m,o.normalizeProps(o.mergeProps({key:0},{text:E})),null,16)):o.createCommentVNode("",!0)],64)):o.createCommentVNode("",!0)]),summary:o.withCtx(()=>[o.createVNode(_,{fixed:""},{default:o.withCtx(()=>[o.withDirectives(o.createVNode(S,{class:"table-summary-selection"},{default:o.withCtx(()=>[o.createVNode(w,{index:0},{default:o.withCtx(()=>[$y]),_:1}),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(e.columns,(E,T)=>(o.openBlock(),o.createBlock(w,{key:E.key,index:T+1,style:{"text-align":"center"}},{default:o.withCtx(()=>[T===0?(o.openBlock(),o.createElementBlock("span",Ny,o.toDisplayString(e.selectedRowKeys[e.pageName].length),1)):(o.openBlock(),o.createElementBlock("span",Py,o.toDisplayString(E.summary?e.transformSummary(E.summary,E):null),1))]),_:2},1032,["index"]))),128))]),_:1},512),[[o.vShow,e.showSelectionSummaryRow]]),e.hasApiConfig?o.createCommentVNode("",!0):(o.openBlock(),o.createBlock(S,{key:0},{default:o.withCtx(()=>[o.createVNode(w,{index:0},{default:o.withCtx(()=>[Iy]),_:1}),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(e.totalList,(E,T)=>(o.openBlock(),o.createBlock(w,{key:T,index:T+1,style:{"text-align":"center"}},{default:o.withCtx(()=>[o.createElementVNode("span",Dy,o.toDisplayString(E),1)]),_:2},1032,["index"]))),128))]),_:1}))]),_:1})]),_:2},[($=e.tableProps)!=null&&$.expandedRowRender?{name:"expandedRowRender",fn:o.withCtx(({record:E,index:T,indent:O,expanded:A})=>[(o.openBlock(),o.createBlock(o.resolveDynamicComponent(e.tableProps.expandedRowRender.component),o.normalizeProps(o.guardReactiveProps({row:E,index:T,indent:O,expanded:A,...e.tableProps.expandedRowRender.props})),null,16))]),key:"0"}:void 0]),1032,["data-source","columns","loading","scroll","row-key","custom-row","expanded-row-keys","row-class-name","row-selection","transform-cell-text","onResizeColumn","onChange"])],512)}const By=ke(Sy,[["render",Ry]]);async function My(e,t){return Pg(e,"/meta-server-web/page/customPageConfig",t)}const xy={COLUMN_SETTING:"fieldShowConfigList",FILTER_SETTING:"fieldFilterConfigList",SORT_SETTING:"fieldSortConfigList"},Ly=o.defineComponent({name:"PageRendererColumnSettingModal",components:{Modal:K.Modal,Space:K.Space,Button:K.Button,Transfer:K.Transfer},props:{hasApiConfig:{type:Boolean,required:!0},visible:{type:Boolean,default:!1,required:!0},type:{type:String,default:"SORT_SETTING"},title:{type:String,default:"标题"},columns:{type:Array,default:()=>[]}},emits:["change","update:visible"],setup(e,{emit:t}){const n=Rn(),r=Dr(),i=to(e,"visible",t),a=o.inject("pageName",""),l=eo(Ta,{}),s=o.ref(!1),c=o.ref([]),u=o.reactive({dataSource:[]});o.watch(i,E=>{if(!E)c.value=[],u.dataSource=[];else{let T=Ft(o.toRaw(e.columns));const O=l.value[a];if(O){const A=Ft(o.toRaw(e.columns));T=[...O.filter(g=>A.find(b=>b.columnKey===g.columnKey)).map(g=>{const b=A.findIndex(x=>x.columnKey===g.columnKey);return{...A.splice(b,1)[0],show:g.show}}),...A]}u.dataSource=T.map(A=>(A.show!==!1&&c.value.push(A.columnKey),{...A,disabled:A.columnKey==="action"||A.fixed!==void 0||A.disabled,key:A.columnKey,rowExpandable:!1}))}});const d=[{title:"列名",dataIndex:"title"}],f=()=>{e.hasApiConfig&&e.type==="COLUMN_SETTING"&&K.Modal.confirm({title:"确认重置为默认值吗?",getContainer:v,onOk(){l.value[a]=void 0,t("change")}})},p=async()=>{const E=o.toRaw(c.value),{dataSource:T}=u;if(e.hasApiConfig&&e.type==="COLUMN_SETTING"){if(E.length<5){K.message.warn("显示列不能小于 5 项!");return}const g=T.map(b=>({columnKey:b.columnKey,show:E.includes(b.columnKey)}));l.value[a]=g,t("change");return}const{category:O,tab:A}=n.meta,C=E.map(g=>{const b={},N=T.find(x=>x.columnKey===g);if(b.entityId=N.entityId,b.columnKey=N.columnKey,e.type==="SORT_SETTING"){const[x,M]=N.columnKey.split("@");b.columnKey=x,b.sort=M}return b});try{s.value=!0,await My(r,{[xy[e.type]]:C,category:O,label:A}),t("change")}catch(g){console.warn(g)}finally{s.value=!1}},h=()=>i.value=!1,y=({disabled:E,selectedKeys:T,onItemSelectAll:O,onItemSelect:A})=>({getCheckboxProps:C=>({disabled:E||C.disabled}),onSelectAll(C,g){const b=g.filter(N=>!N.disabled).map(({key:N})=>N);O(b,C)},onSelect({key:C},g){A(C,g)},selectedRowKeys:T});let m="",w="";const S=(E,T,O,A)=>({style:{cursor:"move"},onMouseenter:C=>{var b;const g=C||window.event;E.key==="action"||(b=e.columns.find(N=>N.columnKey===E.key))!=null&&b.fixed||(g.target.draggable=!0)},onDragstart:C=>{(C||window.event).stopPropagation(),m=E.key,document.querySelectorAll(".drag-modal-wrapper .source-table .ant-table-row")[T].classList.add("source")},onDragover:C=>{(C||window.event).preventDefault()},onDragenter:C=>{(C||window.event).preventDefault();const b=document.querySelectorAll(".drag-modal-wrapper .ant-table-row");if(u.dataSource[T].disabled)return;const N=document.querySelectorAll(".ant-table-row.target");N.length&&N[0].classList.remove("target"),b[T+(u.dataSource.length-c.value.length)].classList.add("target"),w=E.key},onDrop:C=>{(C||window.event).stopPropagation();const b=document.querySelectorAll(".ant-table-row.target");b.length&&b[0].classList.remove("target");const N=document.querySelectorAll(".ant-table-row.source");if(N.length&&N[0].classList.remove("source"),w===m)return;const x=u.dataSource.slice(),M=x.findIndex(B=>B.key===m),D=x[M];x.splice(M,1);const P=x.findIndex(B=>B.key===w);x.splice(P,0,D),Object.assign(u,{dataSource:x})},onClick:()=>{const{key:C,disabled:g}=E;g||A(C,!O.includes(C))},ondblclick:()=>{const{key:C,disabled:g}=E;if(g)return;const b=c.value.indexOf(C);b>-1?c.value.splice(b,1):c.value.push(C)}}),_=(E,T,O,A)=>({onClick:()=>{const{key:C,disabled:g}=E;g||A(C,!O.includes(C))},ondblclick:()=>{const{key:C,disabled:g}=E;if(g)return;const b=c.value.indexOf(C);b>-1?c.value.splice(b,1):c.value.push(C)}}),v=()=>document.querySelector(".page-renderer-wrapper");return o.watch(i,E=>{E&&o.nextTick(()=>{const T=document.querySelector(".ant-modal-root"),O=T==null?void 0:T.querySelector(".ant-modal-header"),A=T==null?void 0:T.querySelector(".ant-modal");O.style.cursor="move";const C=A.currentStyle||window.getComputedStyle(A,null);O.onmousedown=g=>{const b=g.clientX-O.offsetLeft,N=g.clientY-O.offsetTop;let x,M;C.left.includes("%")?(x=+document.body.clientWidth*(+C.left.replace(/\%/g,"")/100),M=+document.body.clientHeight*(+C.top.replace(/\%/g,"")/100)):(x=+C.left.replace(/\px/g,""),M=+C.top.replace(/\px/g,"")),document.onmousemove=function(D){const P=D.clientX-b,B=D.clientY-N;A.style.left=`${P+x}px`,A.style.top=`${B+M}px`},document.onmouseup=function(){document.onmousemove=null,document.onmouseup=null}}})}),{show:i,loading:s,state:u,toKeys:c,tableColumn:d,handleChange:(E,T,O)=>{const A=E.map(C=>C.split("@")[0]);if(A.length!==kg(A).length){c.value=E.filter(C=>!O.includes(C)),K.message.warn("同一字段不能同时设置升序和降序!");return}},handleReset:f,handleOk:p,customRowRight:S,customRowLeft:_,handleClose:h,getContainer:v,getRowSelection:y}}}),dw="";function Fy(e,t,n,r,i,a){const l=o.resolveComponent("a-table"),s=o.resolveComponent("Transfer"),c=o.resolveComponent("Button"),u=o.resolveComponent("Space"),d=o.resolveComponent("Modal");return o.openBlock(),o.createBlock(d,{"wrap-class-name":"drag-modal-wrapper",visible:e.show,"onUpdate:visible":t[1]||(t[1]=f=>e.show=f),"get-container":e.getContainer,"mask-style":{"background-color":"rgba(255, 255, 255, 0.4)"},"destroy-on-close":!0,onCancel:e.handleClose},{title:o.withCtx(()=>[o.createElementVNode("span",null,o.toDisplayString(e.title),1)]),footer:o.withCtx(()=>[o.createVNode(u,null,{default:o.withCtx(()=>[e.hasApiConfig&&e.type==="COLUMN_SETTING"?(o.openBlock(),o.createBlock(c,{key:0,onClick:e.handleReset},{default:o.withCtx(()=>[o.createTextVNode("重置")]),_:1},8,["onClick"])):o.createCommentVNode("",!0),o.createVNode(c,{type:"primary",loading:e.loading,onClick:e.handleOk},{default:o.withCtx(()=>[o.createTextVNode("确定")]),_:1},8,["loading","onClick"])]),_:1})]),default:o.withCtx(()=>[o.createVNode(s,{"target-keys":e.toKeys,"onUpdate:targetKeys":t[0]||(t[0]=f=>e.toKeys=f),"show-select-all":!1,"data-source":e.state.dataSource,"show-search":!0,titles:["隐藏列","显示列"],"list-style":{"min-height":"430px"},"row-key":f=>f.key,style:{"justify-content":"center"},"filter-option":(f,p)=>{var h;return((h=p.title)==null?void 0:h.indexOf(f))!==-1},onChange:e.handleChange},{children:o.withCtx(({direction:f,selectedKeys:p,disabled:h,onItemSelectAll:y,onItemSelect:m})=>[o.createVNode(l,{size:"small",class:o.normalizeClass(f==="right"?"source-table":""),"row-selection":e.getRowSelection({disabled:h,selectedKeys:p,onItemSelectAll:y,onItemSelect:m}),"show-expand-column":!1,columns:e.tableColumn,"data-source":f==="left"?e.state.dataSource.filter(w=>!e.toKeys.includes(w.key)):e.state.dataSource.filter(w=>e.toKeys.includes(w.key)),pagination:!1,scroll:{y:300},style:o.normalizeStyle({pointerEvents:h?"none":null}),"custom-row":(w,S)=>f==="left"?e.customRowLeft(w,S,p,m):e.customRowRight(w,S,p,m)},null,8,["class","row-selection","columns","data-source","style","custom-row"])]),_:1},8,["target-keys","data-source","row-key","filter-option","onChange"])]),_:1},8,["visible","get-container","mask-style","onCancel"])}const jy=ke(Ly,[["render",Fy]]),zy={},ka=Symbol("GLOBAL_OPTIONS_PROVIDE_KEY"),$a=()=>zy,Ve=e=>e,Ky=Object.prototype.toString,Vy=e=>Ky.call(e),Uy=e=>Vy(e)==="[object Object]",Fn=e=>Array.isArray(e),qt=e=>e!==null&&typeof e=="object",xr=e=>e instanceof Function,Xt=e=>e==null,Lr=typeof window>"u",Na=()=>{var e;return Lr||Xt((e=window.document)===null||e===void 0?void 0:e.visibilityState)?!0:window.document.visibilityState==="visible"},Yy=()=>{var e,t;return(e=!Lr&&((t=window.navigator)===null||t===void 0?void 0:t.onLine))!==null&&e!==void 0?e:!0},Fr=()=>new Promise(()=>{}),Pa=function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0;const r=t.replace(/\[(\d+)\]/g,".$1").split(".");let i=e;for(const a of r)if(i=Object(i)[a],i===void 0)return n;return i},Me=e=>o.isRef(e)?e.value:e,Wy=e=>qt(e)?Object.assign(Fn(e)?[]:{},e):e,jn=new Map,Hy=e=>Xt(e)?void 0:jn.get(e),Gy=(e,t,n)=>{const r=jn.get(e);r!=null&&r.timer&&clearTimeout(r.timer);const i=setTimeout(()=>jn.delete(e),t);jn.set(e,{...n,timer:i})};function Ia(e,t,n){let r,i,a,l,s,c,u=0,d=!1,f=!1,p=!0;const h=!t&&t!==0&&typeof window.requestAnimationFrame=="function";if(typeof e!="function")throw new TypeError("Expected a function");t=+t||0,qt(n)&&(d=!!n.leading,f="maxWait"in n,a=f?Math.max(+n.maxWait||0,t):a,p="trailing"in n?!!n.trailing:p);function y(g){const b=r,N=i;return r=i=void 0,u=g,l=e.apply(N,b),l}function m(g,b){return h?(window.cancelAnimationFrame(s),window.requestAnimationFrame(g)):setTimeout(g,b)}function w(g){if(h)return window.cancelAnimationFrame(g);clearTimeout(g)}function S(g){return u=g,s=m($,t),d?y(g):l}function _(g){const b=g-c,N=g-u,x=t-b;return f?Math.min(x,a-N):x}function v(g){const b=g-c,N=g-u;return c===void 0||b>=t||b<0||f&&N>=a}function $(){const g=Date.now();if(v(g))return E(g);s=m($,_(g))}function E(g){return s=void 0,p&&r?y(g):(r=i=void 0,l)}function T(){s!==void 0&&w(s),u=0,r=c=i=s=void 0}function O(){return s===void 0?l:E(Date.now())}function A(){return s!==void 0}function C(){const g=Date.now(),b=v(g);for(var N=arguments.length,x=new Array(N),M=0;M<N;M++)x[M]=arguments[M];if(r=x,i=this,c=g,b){if(s===void 0)return S(c);if(f)return s=m($,t),y(c)}return s===void 0&&(s=m($,t)),l}return C.cancel=T,C.flush=O,C.pending=A,C}function Da(e,t){for(const n in t)if(t[n]!==void 0){if(!qt(t[n])||!qt(e[n])||!(n in e)){e[n]=t[n];continue}(Uy(t[n])||Fn(t[n]))&&Da(e[n],t[n])}}function Ra(e){const t=Object.assign({},e);for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];if(!r.length)return t;for(const a of r)Da(t,a);return t}function qy(e,t,n){let r=!0,i=!0;if(typeof e!="function")throw new TypeError("Expected a function");return qt(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),Ia(e,t,{leading:r,trailing:i,maxWait:t})}var Xy=Ve((e,t)=>{let{debounceInterval:n,debounceOptions:r,manual:i}=t;const a=o.ref(!1),l=o.ref(),s=o.computed(()=>r),c=o.computed(()=>Me(n)),u=o.ref(e.context.runAsync);return i||(a.value=!0),o.watchEffect(d=>{Xt(c.value)||(l.value=Ia(f=>f(),c.value,s.value),e.context.runAsync=function(){for(var f=arguments.length,p=new Array(f),h=0;h<f;h++)p[h]=arguments[h];return new Promise((y,m)=>{a.value?(a.value=!1,u.value(...p).then(y).catch(m)):l.value(()=>{u.value(...p).then(y).catch(m)})})},d(()=>{var f;(f=l.value)===null||f===void 0||f.cancel(),e.context.runAsync=u.value}))}),{onCancel(){var d;(d=l.value)===null||d===void 0||d.cancel()}}}),Qy=Ve((e,t)=>{let{errorRetryCount:n=0,errorRetryInterval:r=0}=t;const i=o.ref(),a=o.ref(0),l=o.computed(()=>Me(n)),s=o.computed(()=>Me(r));let c=!1;const u=()=>{a.value=0},d=o.computed(()=>{if(s.value)return s.value;const h=1e3,y=1,m=9,w=Math.floor(Math.random()*2**Math.min(a.value,m)+y);return h*w}),f=()=>{let h;const y=l.value===-1,m=a.value<l.value;return(y||m)&&(y||(a.value+=1),h=setTimeout(()=>{c=!0,e.context.refresh()},d.value)),()=>h&&clearTimeout(h)},p=()=>{i.value&&i.value()};return{onBefore(){c||u(),c=!1,p()},onSuccess(){u()},onError(){i.value=f()},onCancel(){u(),p()}}}),Zy=Ve((e,t)=>{let{ready:n=o.ref(!0),manual:r,defaultParams:i=[]}=t;return o.watch(n,a=>{!r&&a&&e.context.run(...i)},{flush:"sync"}),{onBefore(){if(!(xr(n)?n():n.value))return e.loading.value=!1,{isBreak:!0}}}}),Jy=Ve((e,t)=>{let{refreshDeps:n,refreshDepsAction:r,manual:i}=t;if(n===void 0||Fn(n)&&n.length===0)return{};const a=Fn(n)?n:[n];return o.watch(a,()=>{r?r():!i&&e.context.refresh()}),{}}),eb=Ve((e,t)=>{let{throttleInterval:n,throttleOptions:r}=t;const i=o.ref(),a=o.computed(()=>Me(n)),l=o.computed(()=>r),s=o.ref(e.context.runAsync);return o.watchEffect(c=>{if(Xt(n))return{};i.value=qy(u=>u(),a.value,l.value),e.context.runAsync=function(){for(var u=arguments.length,d=new Array(u),f=0;f<u;f++)d[f]=arguments[f];return new Promise((p,h)=>{i.value(()=>{s.value(...d).then(p).catch(h)})})},c(()=>{var u;(u=i.value)===null||u===void 0||u.cancel(),e.context.runAsync=s.value})}),{onCancel(){var c;(c=i.value)===null||c===void 0||c.cancel()}}});const tb=(e,t)=>n=>{Object.keys(n).forEach(r=>{e[r].value=n[r]}),t.forEach(r=>r(e))},nb=(e,t)=>()=>{let n=t;for(let r=e.length;r-- >0;)n=e[r](n);return n()},rb=(e,t,n)=>{var r,i;const{initialData:a,onSuccess:l,onError:s,onBefore:c,onAfter:u}=t,d=o.ref((r=n==null?void 0:n.loading)!==null&&r!==void 0?r:!1),f=o.shallowRef((i=n==null?void 0:n.data)!==null&&i!==void 0?i:a),p=o.shallowRef(n==null?void 0:n.error),h=o.ref(n==null?void 0:n.params),y=o.ref([]),m=o.shallowRef("pending"),w={},S=tb({status:m,loading:d,data:f,error:p,params:h},[]),_=function($){for(var E=arguments.length,T=new Array(E>1?E-1:0),O=1;O<E;O++)T[O-1]=arguments[O];if($==="onQuery"){const A=y.value.map(C=>C.onQuery).filter(Boolean);return{servicePromise:nb(A,T[0])()}}else{const A=y.value.map(C=>{var g;return(g=C[$])===null||g===void 0?void 0:g.call(C,...T)});return Object.assign({},...A)}},v=o.ref(0);return w.runAsync=async function(){for(var $=arguments.length,E=new Array($),T=0;T<$;T++)E[T]=arguments[T];S({loading:!0,params:E,status:"pending"}),v.value+=1;const O=v.value,{isBreak:A,breakResult:C=Fr()}=_("onBefore",E);if(A)return S({status:"settled"}),C;c==null||c(E);try{const g=()=>new Promise(x=>x(e(...h.value)));let{servicePromise:b}=_("onQuery",g);b||(b=g());const N=await b;return O!==v.value?Fr():(S({data:N,loading:!1,error:void 0,status:"settled"}),_("onSuccess",N,E),l==null||l(N,E),O===v.value&&_("onAfter",E,N,void 0),u==null||u(E),N)}catch(g){if(O!==v.value)return Fr();throw S({loading:!1,error:g,status:"settled"}),_("onError",g,E),s==null||s(g,E),O===v.value&&_("onAfter",E,void 0,g),u==null||u(E),g}},w.run=function(){w.runAsync(...arguments).catch($=>{s||console.error($)})},w.cancel=()=>{v.value+=1,S({loading:!1}),_("onCancel")},w.refresh=()=>{w.run(...h.value||[])},w.refreshAsync=()=>w.runAsync(...h.value||[]),w.mutate=$=>{const E=xr($)?$(f.value):$,T=Wy(E);S({data:T}),_("onMutate",T)},{status:m,loading:d,data:f,error:p,params:h,plugins:y,context:w}};function ob(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;const r=o.inject(ka,{}),i={...$a(),...r,...t},{manual:a=!1,defaultParams:l=[]}=i,s=rb(e,i);if(s.plugins.value=n.map(c=>c(s,i)),!a){const c=s.params.value||l;s.context.run(...c)}return o.onUnmounted(()=>{s.context.cancel()}),{loading:s.loading,data:s.data,error:s.error,params:s.params,cancel:s.context.cancel,refresh:s.context.refresh,refreshAsync:s.context.refreshAsync,mutate:s.context.mutate,run:s.context.run,runAsync:s.context.runAsync}}const zn=new Map,ib=(e,t)=>{zn.set(e,t),t.then(n=>(zn.delete(e),n)).catch(()=>{zn.delete(e)})},ab=e=>zn.get(e),rt=new Map,sb=(e,t)=>{rt.has(e)&&rt.get(e).forEach(n=>n(t))},lb=(e,t)=>(rt.has(e)?rt.get(e).push(t):rt.set(e,[t]),()=>{const n=rt.get(e).indexOf(t);rt.get(e).splice(n,1)});var cb=Ve((e,t)=>{let{cacheKey:n,cacheTime:r=6e5,staleTime:i=0,getCache:a,setCache:l}=t;if(!n)return{};const s=xr(n)?n:()=>n,c=o.ref(()=>{});let u;const d=S=>a?a(S):Hy(S),f=(S,_,v)=>{l?l(S,v):Gy(S,_,v),sb(S,v.data)},p=S=>i===-1||S+i>new Date().getTime(),h=(S,_)=>Object.prototype.hasOwnProperty.call(S,_),y=S=>{const _=s(S);return lb(_,v=>{e.data.value=v})},m=s(),w=d(m);return w&&h(w,"data")&&(e.data.value=w.data,e.params.value=w.params),m&&(c.value=y()),o.onUnmounted(()=>{c.value()}),{onBefore(S){const _=s(S),v=d(_);if(!v||!h(v,"data"))return{};if(p(v.time))return e.data.value=v.data,e.loading.value=!1,{isBreak:!0,breakResult:v.data};e.data.value=v.data},onQuery(S){const _=e.params.value,v=s(_);let $=ab(v);return $&&$!==u?()=>$:($=S(),u=$,ib(v,$),()=>$)},onSuccess(S,_){const v=s(_);v&&(c.value(),f(v,r,{data:S,params:_,time:new Date().getTime()}),c.value=y(_))},onMutate(S){const _=s(e.params.value);_&&(c.value(),f(_,r,{data:S,params:e.params.value,time:new Date().getTime()}),c.value=y(e.params.value))}}});function ub(e){let t,n;class r extends Promise{constructor(a){super(a),this.cancel=()=>{n(),clearTimeout(t)}}}return new r(i=>{n=i,t=setTimeout(n,e)})}function jr(){return new Date().getTime()}var fb=Ve((e,t)=>{let{loadingDelay:n=0,loadingKeep:r=0}=t;const i=o.ref(()=>{}),a=o.computed(()=>Me(n)),l=o.computed(()=>Me(r));let s=0,c={};const u=()=>{let d;return a.value&&(d=setTimeout(()=>{e.status.value==="pending"&&(e.loading.value=!0)},a.value)),()=>d&&clearTimeout(d)};return{onBefore(){e.loading.value=!a.value,i.value(),i.value=u(),s=jr()},onQuery(d){if(!l.value)return()=>d();c=ub(l.value+a.value);const f=async()=>{try{const h=await d();return jr()-s<=a.value&&c.cancel(),Promise.resolve(h)}catch(h){return jr()-s<=a.value&&c.cancel(),Promise.reject(h)}},p=Promise.allSettled([f(),c]).then(h=>{const y=h[0];return y.status==="fulfilled"?y.value:Promise.reject(y.reason)});return()=>p},onCancel(){i.value()},onAfter(){i.value()}}}),zr;const Ba=new Set,Ma=new Set,xa=new Set,Kn=(e,t)=>{let n;switch(e){case"FOCUS_LISTENER":n=Ba;break;case"RECONNECT_LISTENER":n=xa;break;case"VISIBLE_LISTENER":n=Ma;break}if(!n.has(t))return n.add(t),()=>{n.delete(t)}},Kr=e=>{e.forEach(t=>{t()})};!Lr&&(zr=window)!==null&&zr!==void 0&&zr.addEventListener&&(window.addEventListener("visibilitychange",()=>{Na()&&Kr(Ma)},!1),window.addEventListener("focus",()=>Kr(Ba),!1),window.addEventListener("online",()=>Kr(xa),!1));var db=Ve((e,t)=>{let{pollingInterval:n,pollingWhenHidden:r=!1,pollingWhenOffline:i=!1,errorRetryCount:a=0}=t;const l=o.ref(),s=o.ref(!1),c=o.computed(()=>Me(n)),u=o.computed(()=>Me(a)),d=[],f=m=>{m&&d.push(m)},p=()=>(r||Na())&&(i||Yy()),h=m=>{if(e.error.value&&u.value!==0)return;let w;if(!Xt(c.value)&&c.value>=0)if(p())w=setTimeout(m,c.value);else{s.value=!0;return}return()=>w&&clearTimeout(w)},y=()=>{s.value&&p()&&(e.context.refresh(),s.value=!1)};return o.watch(c,()=>{l.value&&(l.value(),l.value=h(()=>e.context.refresh()))}),r||f(Kn("VISIBLE_LISTENER",y)),i||f(Kn("RECONNECT_LISTENER",y)),o.onUnmounted(()=>{d.forEach(m=>m())}),{onBefore(){var m;(m=l.value)===null||m===void 0||m.call(l)},onCancel(){var m;(m=l.value)===null||m===void 0||m.call(l)},onAfter(){l.value=h(()=>e.context.refresh())}}});const pb=(e,t)=>{let n=!1;return function(){n||(n=!0,e(...arguments),setTimeout(()=>{n=!1},t))}};var hb=Ve((e,t)=>{let{refreshOnWindowFocus:n=!1,refocusTimespan:r=5e3}=t;const i=o.computed(()=>Me(n)),a=o.computed(()=>Me(r)),l=[],s=u=>{u&&l.push(u)},c=()=>{l.forEach(u=>u())};return o.watchEffect(()=>{if(c(),i.value){const u=pb(e.context.refresh,a.value);s(Kn("VISIBLE_LISTENER",u)),s(Kn("FOCUS_LISTENER",u))}}),o.onUnmounted(()=>{c()}),{}});function mb(e,t,n){return ob(e,t,[...n||[],fb,Qy,Xy,db,eb,hb,Jy,Zy,cb])}function La(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const n={currentKey:"current",pageSizeKey:"pageSize",totalKey:"total",totalPageKey:"totalPage"},r=o.inject(ka,{}),{pagination:i,...a}=t,{currentKey:l,pageSizeKey:s,totalKey:c,totalPageKey:u}=Ra(n,$a().pagination||{},r.pagination||{},i||{}),d=Ra({defaultParams:[{[l]:1,[s]:10}]},a),{data:f,params:p,run:h,...y}=mb(e,d),m=O=>{const[A,...C]=p.value||[],b=[{...A,...O},...C];h(...b)},w=O=>{m({[l]:O})},S=O=>{m({[s]:O})},_=(O,A)=>{m({[l]:O,[s]:A})},v=o.computed(()=>Pa(f.value,c,0)),$=o.computed({get:()=>{var O,A,C;return(O=(A=p.value)===null||A===void 0||(C=A[0])===null||C===void 0?void 0:C[l])!==null&&O!==void 0?O:d.defaultParams[0][l]},set:O=>{w(O)}}),E=o.computed({get:()=>{var O,A,C;return(O=(A=p.value)===null||A===void 0||(C=A[0])===null||C===void 0?void 0:C[s])!==null&&O!==void 0?O:d.defaultParams[0][s]},set:O=>{S(O)}}),T=o.computed(()=>Pa(f.value,u,Math.ceil(v.value/E.value)));return{data:f,params:p,current:$,pageSize:E,total:v,totalPage:T,run:h,changeCurrent:w,changePageSize:S,changePagination:_,...y}}const Fa={ASC:"升序",DESC:"降序"},gb=o.defineComponent({name:"PageRendererTablePage",components:{Conditions:jg,Operations:Zg,SummaryBar:Jg,TableView:By,ColumnSettingModal:jy},props:{page:{type:Object,default:()=>{}},config:{type:Object,default:()=>{}}},setup(e,{expose:t}){const n=Rn(),{page:r}=o.toRefs(e),{apiConfig:i,buttons:a,data:l,page_size_options:s,sort:c}=r.value,u=o.ref(r.value.total),d=o.ref(i==null?void 0:i.summary),f=o.ref(l),p=o.ref(l),h=o.ref(c),y=o.ref(!1),m=o.ref(!1),w=o.ref([]),S=o.ref([]),_=o.ref(),v=o.ref(),$=o.ref(),E={导入:v,导出:_},T=o.computed(()=>({COLUMN_SETTING:r.value.fieldShowConfigList,FILTER_SETTING:r.value.fieldFilterConfigList,SORT_SETTING:r.value.fieldSortConfigList})),O=o.ref(),A=o.inject("transformData",(L,k)=>L),C=o.inject("refreshPage",()=>{}),g=()=>{p.value=ga(f.value,L=>ag(se,(k,F)=>{var I;return["",void 0,null].includes(k)||Array.isArray(k)?!0:Object.hasOwn(L,F)?hg((I=L[F])==null?void 0:I.toString().toLocaleLowerCase(),k.toString().toLocaleLowerCase()):!0}))};o.watch(f,()=>{g()});const{patchEnumerations:b,patchStaticEnumerations:N}=Bn(),x=o.ref(null),M=o.ref(null),D=o.ref(null),P=eo(Ta,{}),B=o.ref(r.value.columns),R=o.reactive({type:"COLUMN_SETTING",title:"",columns:[],visible:!1}),V=o.computed(()=>r.value.fieldShowConfigList?r.value.fieldShowConfigList.map(L=>L.columnKey):[]),z=o.ref(),q=o.computed(()=>{if(i)return r.value.rowKey||console.warn("【TablePage】rowKey 列表唯一键没有定义"),r.value.rowKey;{const L=ga(B.value,{isUniqueKey:!0});return L.length===0?console.warn("【TablePage】isUniqueKey 请设置唯一键"):L.length>1&&console.warn("【TablePage】isUniqueKey 唯一键应该只有一个"),L[0].columnKey}});(()=>{if(i){const L=Ke(i.list.url,i.list.method||"post");O.value=La(L,{manual:!0,loadingKeep:100,onBefore(k){k.forEach(F=>de(F,r.value.name))},onSuccess(k){u.value.count=kn(k,i.list.totalKey),f.value=A(k,e.page.name)}})}else{const L=Ke(`/duckbill-data-query-server/table/search/${n.meta.category}`);O.value=La(L,{manual:!0,loadingKeep:100,pagination:{totalKey:"data.page.total.count"},onBefore(k){k.forEach(F=>de(F,r.value.name))},onSuccess(k){u.value=k.data.page.total,f.value=k.data.page.data,N(k.data.page.enumerations)}}),$.value=Ke(`/duckbill-data-query-server/data/export/${n.meta.category}`,"post",{responseType:"blob"})}})(),o.watchEffect(()=>{a.forEach(L=>{const k=E[L.children];k?k.value=L:L.columnAction?S.value.push(L):w.value.push(L)})});const{initFormState:J}=Ut(),se=J(r.value.conditions,r.value.defaultQuery,r.value.name),ue=o.ref(s?s[0].value:Ea[0].value),he=o.ref(1),{selectedRows:me,selectedRowKeys:Oe}=Yt();me[e.page.name]&&console.error(`【@yzsf2e/render-core】页面名 ${e.page.name} 重复!`);const ve=()=>{me[e.page.name]=[],Oe[e.page.name]=[]};p.value&&ve();const de=o.inject("paramsGuard",L=>L),Ce=[...r.value.conditions.map(L=>L.fieldName),...Object.keys(r.value.defaultQuery)],_e=(L,k)=>!Kt(L)&&L!==""&&Ce.includes(k),Ie=()=>{if(i){const L=Ng({conditions:Vt({...o.toRaw(se)},_e),pager:{pageNo:he.value,pageSize:ue.value},sort:h.value,listApiConfig:i.list});O.value.run(L)}else{const{category:L,tab:k}=n.meta;O.value.run({category:L,tab:k,pageNumber:he.value,pageSize:ue.value,fetchMode:"BODY",sorts:{},filters:Vt({...o.toRaw(se)},_e)})}ve(),Zt()},Vn=async L=>{let k;if(L==="SELECTED"){if(Oe[e.page.name]&&Oe[e.page.name].length===0){K.message.warn("至少选中一条数据!");return}k=Oe[e.page.name]}const{category:F,tab:I}=n.meta,j=await $.value({category:F,tab:I,fetchMode:"BODY",sorts:h.value,filters:Vt({...o.toRaw(se)},_e),ids:k});if(!j)return;const W=/\{\{(.+?)\}\}/g;let ee=`${e.page.name}-{{Date}}.xlsx`,xe=null;for(;(xe=W.exec(ee))!==null;)xe[1]==="Date"&&(ee=ee.replace(xe[0],fi().format("YYYY-MM-DD")));const Ae=document.createElement("a"),Ue=window.URL.createObjectURL(new Blob([j]));Ae.href=Ue,Ae.download=ee,document.body.appendChild(Ae),Ae.click(),document.body.removeChild(Ae),window.URL.revokeObjectURL(Ue)},Un=()=>{var L,k;(L=D.value)==null||L.resetFields(),(k=x.value)==null||k.clearSort()},Vr=()=>{var L;(L=x.value)==null||L.clearSelect()},Ur=()=>{var L;return(L=x.value)==null?void 0:L.toggleTableHeight()},Zt=()=>{var L;return(L=M.value)==null?void 0:L.fetchSummary()},Jt=o.inject("emitHandler",()=>{});o.provide("pageName",e.page.name);const Yr=(L,k,F,I)=>{const j=F||(me[e.page.name]?o.toRaw(me[e.page.name]):[]);Jt(L,j,I)},en=async()=>{R.visible=!1,setTimeout(()=>{C()},500)},Wr=o.computed(()=>B.value.map(L=>({...L,show:i?!0:V.value.includes(L.columnKey)})));o.watchEffect(()=>{const L=Wr.value.sort((I,j)=>{const W=V.value.indexOf(I.columnKey),ee=V.value.indexOf(j.columnKey);return W-ee});S.value.length>0&&L.unshift({title:"操作",align:"center",columnKey:"action",children:S.value.map(I=>({text:I.children,action:I.action})),width:S.value.reduce((I,j)=>I+Number(j.columnActionWidth||50),0)});let k=L;const F=P.value[e.page.name];if(F){const I=Ft(o.toRaw(L));k=[...F.filter(W=>I.find(ee=>ee.columnKey===W.columnKey)).map(W=>{const ee=I.findIndex(Ae=>Ae.columnKey===W.columnKey);return{...I.splice(ee,1)[0],show:W.show}}),...I]}z.value=k}),o.onMounted(async()=>{N(e.page.enumerations),await b(e.page.enumapi),m.value=!0,o.nextTick().then(()=>{Zt()})}),i?o.watch([he,ue],()=>{Ie()}):o.watch([he,ue,h],([L,k,F])=>{const{category:I,tab:j}=n.meta;O.value.run({category:I,tab:j,pageNumber:L,pageSize:k,fetchMode:"BODY",sorts:F.value,filters:Vt({...o.toRaw(se)},_e)})});const Hr=L=>{if(i){R.columns=[...r.value.columns],R.type=L,R.title=Mr[L],R.visible=!0;return}const k=r.value.fieldList.reduce((F,I)=>{const j={COLUMN_SETTING:!1,SORT_SETTING:!I.sortable,FILTER_SETTING:!I.filterable};if(L==="SORT_SETTING"){const W=T.value[L].find(ee=>ee.columnKey===I.columnKey);Object.keys(Fa).forEach(ee=>{F.push({...I,title:`${I.title}_${Fa[ee]}`,columnKey:`${I.columnKey}@${ee}`,show:W?W.sort===ee:!1,disabled:j[L]})})}else F.push({...I,show:!!T.value[L].find(W=>W.columnKey===I.columnKey),disabled:j[L]});return F},[]);R.columns=Sg(k,["disabled"],["asc"]),R.type=L,R.title=Mr[L],R.visible=!0};return t({run:Ie,resetSearch:Un,clearSelect:Vr}),{apiConfig:i,tableData:p,rowKey:q,paginationQuery:O,loaded:m,buttonsConfig:w,exportConfig:_,importConfig:v,summary:d,current:he,pageSize:ue,pageTotal:u,sort:h,tableView:x,conditions:D,summaryBar:M,sortedColumns:z,columnSettingState:R,columnSettingVisible:y,handleSearch:Ie,handleExport:Vn,resetSearch:Un,headerFilterHandle:g,handleEmitAction:Yr,columnSettingChange:en,resizeTableHeight:Ur,handleCustomizeSetting:Hr}}});function yb(e,t,n,r,i,a){var f,p;const l=o.resolveComponent("Conditions"),s=o.resolveComponent("Operations"),c=o.resolveComponent("SummaryBar"),u=o.resolveComponent("TableView"),d=o.resolveComponent("ColumnSettingModal");return e.loaded?(o.openBlock(),o.createElementBlock(o.Fragment,{key:0},[o.createVNode(l,{ref:"conditions",config:e.page.conditions,"default-query":e.page.defaultQuery,searching:e.paginationQuery.loading,"immediate-query":!!e.apiConfig,current:e.current,"onUpdate:current":t[0]||(t[0]=h=>e.current=h),onSearch:e.handleSearch,onResetSearch:e.resetSearch,onChangeExpand:e.resizeTableHeight},null,8,["config","default-query","searching","immediate-query","current","onSearch","onResetSearch","onChangeExpand"]),o.createVNode(s,{total:(f=e.pageTotal)==null?void 0:f.count,config:e.buttonsConfig,"has-api-config":!!e.apiConfig,"export-config":e.apiConfig?e.apiConfig.export:e.exportConfig,"import-config":e.apiConfig?e.apiConfig.import:e.importConfig,"page-size-options":e.page.page_size_options,"handle-export":e.handleExport,pageSize:e.pageSize,"onUpdate:pageSize":t[1]||(t[1]=h=>e.pageSize=h),current:e.current,"onUpdate:current":t[2]||(t[2]=h=>e.current=h),onRefresh:e.handleSearch,onButtonClick:e.handleEmitAction,onCustomizeSetting:e.handleCustomizeSetting},null,8,["total","config","has-api-config","export-config","import-config","page-size-options","handle-export","pageSize","current","onRefresh","onButtonClick","onCustomizeSetting"]),e.summary?(o.openBlock(),o.createBlock(c,{key:0,ref:"summaryBar",config:e.summary},null,8,["config"])):o.renderSlot(e.$slots,"summaryBar",{key:1}),o.createVNode(u,{ref:"tableView","table-props":(p=e.config)==null?void 0:p.table,config:e.sortedColumns,conditions:e.page.conditions,"row-key":e.rowKey,"row-dblclick-action":e.page.rowDblclickAction,data:e.tableData,"has-api-config":!!e.apiConfig,loading:e.paginationQuery.loading,total:e.pageTotal,"default-sort":e.page.sort,current:e.current,"onUpdate:current":t[3]||(t[3]=h=>e.current=h),sort:e.sort,"onUpdate:sort":t[4]||(t[4]=h=>e.sort=h),onFilter:e.headerFilterHandle,onSearch:e.handleSearch,onLinkClick:e.handleEmitAction},null,8,["table-props","config","conditions","row-key","row-dblclick-action","data","has-api-config","loading","total","default-sort","current","sort","onFilter","onSearch","onLinkClick"]),o.createVNode(d,{visible:e.columnSettingState.visible,"onUpdate:visible":t[5]||(t[5]=h=>e.columnSettingState.visible=h),"has-api-config":!!e.apiConfig,type:e.columnSettingState.type,title:e.columnSettingState.title,columns:e.columnSettingState.columns,onChange:e.columnSettingChange},null,8,["visible","has-api-config","type","title","columns","onChange"])],64)):o.createCommentVNode("",!0)}const ja=ke(gb,[["render",yb]]),bb=o.defineComponent({name:"PageRendererTabsPage",components:{TablePage:ja},props:{tabClickAction:{type:String,default:""},pages:{type:Array,default:()=>[]},activePageName:{type:String,default:""},customEvent:{type:Object}},emits:["update:activePageName"],setup(e,{expose:t,emit:n}){const{pages:r}=o.toRefs(e),i=o.inject("actionGuard",null);o.onMounted(()=>{a(r.value[0].name)});const a=h=>{n("update:activePageName",h),u(h,e.pages.findIndex(y=>y.name==h))},l={},s=o.ref({}),c=(h,y)=>{h!==null&&(s.value[y]=h,l[y]=()=>s.value[y].run())},u=(h,y)=>{var w;const m=(w=e.customEvent)==null?void 0:w[e.tabClickAction];if(m)return m({name:h,index:y});if(i)return i(e.tabClickAction,{name:h,index:y});e.tabClickAction&&K.message.warn("没有监听 tab 切换的事件处理函数")};return t({run:h=>{s.value[h]&&l[h]()},resetSearch:h=>{s.value[h]&&s.value[h].resetSearch()},clearSelect:h=>{s.value[h]&&s.value[h].clearSelect()}}),{activeChange:a,setItemRef:c}}});function wb(e,t,n,r,i,a){const l=o.resolveComponent("TablePage"),s=o.resolveComponent("a-tab-pane"),c=o.resolveComponent("a-tabs");return o.openBlock(),o.createBlock(c,{type:"card",size:"small",class:"tabs-page-renderer","active-key":e.activePageName,"tab-bar-gutter":0,onChange:e.activeChange},{default:o.withCtx(()=>[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(e.pages,u=>(o.openBlock(),o.createBlock(s,{key:u.name,tab:u.title},{default:o.withCtx(()=>[o.createVNode(l,{page:u,ref_for:!0,ref:d=>e.setItemRef(d,u.name)},null,8,["page"])]),_:2},1032,["tab"]))),128))]),_:1},8,["active-key","onChange"])}const vb=ke(bb,[["render",wb]]),Cb=e=>({mounted(t,n){var d,f,p;const i=(d=e.currentRoute.value.meta)==null?void 0:d.permissions,{value:a,modifiers:l}=n,s=(f=o.toRaw(a))==null?void 0:f.length;if(!s)return;let c=!1,u=0;i.forEach(h=>{a.includes(h)&&u++}),l.all?c=u===s:c=u>0,c||(p=t.parentNode)==null||p.removeChild(t)}}),Sb=()=>o.getCurrentInstance().appContext,Eb=()=>{const e=Sb(),t=Qa.useRouter();e.directives.permission||e.app.directive("permission",Cb(t))},Tb={items_per_page:"条/页",jump_to:"跳至",jump_to_confirm:"确定",page:"页",prev_page:"上一页",next_page:"下一页",prev_5:"向前 5 页",next_5:"向后 5 页",prev_3:"向前 3 页",next_3:"向后 3 页"};function Qt(e){"@babel/helpers - typeof";return Qt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Qt(e)}function Ob(e,t){if(Qt(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Qt(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function _b(e){var t=Ob(e,"string");return Qt(t)=="symbol"?t:String(t)}function Ab(e,t,n){return t=_b(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function za(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Ka(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?za(Object(n),!0).forEach(function(r){Ab(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):za(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var kb={locale:"zh_CN",today:"今天",now:"此刻",backToToday:"返回今天",ok:"确定",timeSelect:"选择时间",dateSelect:"选择日期",weekSelect:"选择周",clear:"清除",month:"月",year:"年",previousMonth:"上个月 (翻页上键)",nextMonth:"下个月 (翻页下键)",monthSelect:"选择月份",yearSelect:"选择年份",decadeSelect:"选择年代",yearFormat:"YYYY年",dayFormat:"D日",dateFormat:"YYYY年M月D日",dateTimeFormat:"YYYY年M月D日 HH时mm分ss秒",previousYear:"上一年 (Control键加左方向键)",nextYear:"下一年 (Control键加右方向键)",previousDecade:"上一年代",nextDecade:"下一年代",previousCentury:"上一世纪",nextCentury:"下一世纪"};const $b=kb;var Nb={placeholder:"请选择时间",rangePlaceholder:["开始时间","结束时间"]};const Va=Nb;var Ua={lang:Ka({placeholder:"请选择日期",yearPlaceholder:"请选择年份",quarterPlaceholder:"请选择季度",monthPlaceholder:"请选择月份",weekPlaceholder:"请选择周",rangePlaceholder:["开始日期","结束日期"],rangeYearPlaceholder:["开始年份","结束年份"],rangeMonthPlaceholder:["开始月份","结束月份"],rangeQuarterPlaceholder:["开始季度","结束季度"],rangeWeekPlaceholder:["开始周","结束周"]},$b),timePickerLocale:Ka({},Va)};Ua.lang.ok="确定";const Ya=Ua;var we="${label}不是一个有效的${type}",Pb={locale:"zh-cn",Pagination:Tb,DatePicker:Ya,TimePicker:Va,Calendar:Ya,global:{placeholder:"请选择"},Table:{filterTitle:"筛选",filterConfirm:"确定",filterReset:"重置",filterEmptyText:"无筛选项",filterCheckall:"全选",filterSearchPlaceholder:"在筛选项中搜索",selectAll:"全选当页",selectInvert:"反选当页",selectNone:"清空所有",selectionAll:"全选所有",sortTitle:"排序",expand:"展开行",collapse:"关闭行",triggerDesc:"点击降序",triggerAsc:"点击升序",cancelSort:"取消排序"},Modal:{okText:"确定",cancelText:"取消",justOkText:"知道了"},Popconfirm:{cancelText:"取消",okText:"确定"},Transfer:{searchPlaceholder:"请输入搜索内容",itemUnit:"项",itemsUnit:"项",remove:"删除",selectCurrent:"全选当页",removeCurrent:"删除当页",selectAll:"全选所有",removeAll:"删除全部",selectInvert:"反选当页"},Upload:{uploading:"文件上传中",removeFile:"删除文件",uploadError:"上传错误",previewFile:"预览文件",downloadFile:"下载文件"},Empty:{description:"暂无数据"},Icon:{icon:"图标"},Text:{edit:"编辑",copy:"复制",copied:"复制成功",expand:"展开"},PageHeader:{back:"返回"},Form:{optional:"(可选)",defaultValidateMessages:{default:"字段验证错误${label}",required:"请输入${label}",enum:"${label}必须是其中一个[${enum}]",whitespace:"${label}不能为空字符",date:{format:"${label}日期格式无效",parse:"${label}不能转换为日期",invalid:"${label}是一个无效日期"},types:{string:we,method:we,array:we,object:we,number:we,date:we,boolean:we,integer:we,float:we,regexp:we,email:we,url:we,hex:we},string:{len:"${label}须为${len}个字符",min:"${label}最少${min}个字符",max:"${label}最多${max}个字符",range:"${label}须在${min}-${max}字符之间"},number:{len:"${label}必须等于${len}",min:"${label}最小值为${min}",max:"${label}最大值为${max}",range:"${label}须在${min}-${max}之间"},array:{len:"须为${len}个${label}",min:"最少${min}个${label}",max:"最多${max}个${label}",range:"${label}数量须在${min}-${max}之间"},pattern:{mismatch:"${label}与模式不匹配${pattern}"}}},Image:{preview:"预览"}};const Ib=Pb,[Db]=St("page-renderer"),Rb=o.defineComponent({name:Db,components:{TablePage:ja,TabsPage:vb,FormModal:ro,PreviewMediaModal:fr,ConfigProvider:K.ConfigProvider},props:{options:{type:Object,default:null},config:{type:Object,default:()=>{}},form:{type:Object,default:()=>{}},tableCellSlots:{type:Object,default:()=>{}},customEvent:{type:Object}},setup(e,{expose:t}){var g;const n=Rn(),r=o.ref(null),i=o.ref(null),a=o.ref(""),l=o.ref(null),s=o.ref(null),c=o.ref([]),u=o.ref(),d={title:"",component:null},{selectedErrorRowKeys:f}=Yt(),p=o.shallowRef(d),h=o.ref(!!e.options),y=o.ref(e.options);o.watch(()=>e.options,b=>{y.value=b}),o.watch(()=>y,b=>{h.value=!!b});const m=o.ref(!1),w=o.inject("actionGuard",null);Dr().interceptors.response.use(b=>{var N,x;if(b.data&&((N=b.data)==null?void 0:N.type)==="string"&&typeof((x=b.data)==null?void 0:x.value)=="string")try{b.data=JSON.parse(b.data.value)}catch{console.warn("response.data is not a json string")}return b}),o.onMounted(()=>{$()});const _=Ke(`/duckbill-data-query-server/table/search/${n.meta.category}`),v=()=>{h.value=!1,o.nextTick(()=>{h.value=!0})},$=async()=>{const{category:b,tab:N}=n.meta;if(!e.options&&b&&N){m.value=!0;try{const x=await _({category:b,tab:N,pageNumber:1,pageSize:100,fetchMode:"ALL",sorts:{},filters:{}});y.value=x.data}catch{K.message.error("页面配置请求失败!")}finally{m.value=!1}}window.__POWERED_BY_WUJIE__&&v()},E={locale:Ib,transformCellText:({text:b,column:N,record:x})=>!N||N.dataIndex==="action"?b:Kt(x[N.dataIndex])||x[N.dataIndex]===""?" - ":b},T=(b,N)=>{var x;(x=s.value)==null||x.open(b,N)};o.provide("materials",(g=e.config)==null?void 0:g.materials),o.provide("previewMediaModalOpen",T),o.provide("tableCellSlots",e.tableCellSlots||{}),o.provide("refreshPage",$),o.provide("emitHandler",(b,N,x)=>{var D,P,B;const M=Ft(N);if(e.form===void 0||!e.form[b]){const R=(D=e.customEvent)==null?void 0:D[b];if(!R)return w?w(b,M):K.message.warn("没有找到自定义事件处理函数"),x==null?void 0:x();try{R(M,V=>{var q;const z=(q=y.value.page)==null?void 0:q.rowKey;z&&V.forEach(Q=>{var J;Q[z]&&f[(J=y.value.page)==null?void 0:J.name].push(Q[z])})}).finally(()=>{setTimeout(()=>{x==null||x()},100)})}catch(V){((P=V.message)==null?void 0:P.indexOf("finally"))>-1?K.message.warn("自定义事件处理函数必须返回一个Promise"):K.message.warn(V.message)}}else(((B=e.customEvent)==null?void 0:B[b])||(()=>Promise.resolve()))(M,V=>{var q;const z=(q=y.value.page)==null?void 0:q.rowKey;z&&V.forEach(Q=>{var J;Q[z]&&f[(J=y.value.page)==null?void 0:J.name].push(Q[z])})}).then(V=>{var z;u.value=V,p.value=e.form[b],c.value=p.value.needSelectRows===!1?[]:M,(z=l.value)==null||z.openModal()}).finally(()=>{setTimeout(()=>{x==null||x()},100)})}),Eb();const O=()=>{var b,N;return{basic:(b=r.value)==null?void 0:b.run(),tabs:(N=i.value)==null?void 0:N.run(a.value)}[y.value.type]};return t({run:O,resetSearch:()=>{var b,N;return{basic:(b=r.value)==null?void 0:b.resetSearch(),tabs:(N=i.value)==null?void 0:N.resetSearch(a.value)}[y.value.type]},clearSelect:()=>{var b,N;return{basic:(b=r.value)==null?void 0:b.clearSelect(),tabs:(N=i.value)==null?void 0:N.clearSelect(a.value)}[y.value.type]}}),{run:O,loaded:h,rows:c,tabs:i,table:r,formModal:l,previewMediaModalRef:s,extraData:u,activePageName:a,currentComponent:p,getPopupContainer:E,rendererOptions:y}}}),Bb={class:"page-renderer-wrapper"};function Mb(e,t,n,r,i,a){const l=o.resolveComponent("TablePage"),s=o.resolveComponent("TabsPage"),c=o.resolveComponent("FormModal"),u=o.resolveComponent("PreviewMediaModal"),d=o.resolveComponent("ConfigProvider");return e.loaded?(o.openBlock(),o.createBlock(d,o.normalizeProps(o.mergeProps({key:0},e.getPopupContainer)),{default:o.withCtx(()=>[o.createElementVNode("div",Bb,[e.rendererOptions.type==="basic"?(o.openBlock(),o.createBlock(l,{key:0,page:e.rendererOptions.page,config:e.config,ref:"table"},{summaryBar:o.withCtx(()=>[o.renderSlot(e.$slots,"summaryBar")]),_:3},8,["page","config"])):o.createCommentVNode("",!0),e.rendererOptions.type==="tabs"?(o.openBlock(),o.createBlock(s,{key:1,"tab-click-action":e.rendererOptions.tabClickAction,pages:e.rendererOptions.pages,config:e.config,"custom-event":e.customEvent,activePageName:e.activePageName,"onUpdate:activePageName":t[0]||(t[0]=f=>e.activePageName=f),ref:"tabs"},null,8,["tab-click-action","pages","config","custom-event","activePageName"])):o.createCommentVNode("",!0),o.createVNode(c,{ref:"formModal",form:e.currentComponent,rows:e.rows,"extra-data":e.extraData,onRefresh:e.run},null,8,["form","rows","extra-data","onRefresh"]),o.createVNode(u,{ref:"previewMediaModalRef"},null,512)])]),_:3},16)):o.createCommentVNode("",!0)}const xb=ke(Rb,[["render",Mb]]),pw="",Wa=Et(xb);window["@yzsf2e/render-core"]={version:es.version};const Lb=[tn,qr,no,oo,ci,Wa],{enumerations:Fb}=Bn();function jb(e){return e.replace(/^yzs-/,"").replace(/(?:^|-)([a-z])/g,(t,n)=>n.toUpperCase())}function Ha(e){Lb.forEach(t=>{t.install?(e.use(t),["yzs-date-picker","yzs-drag-drawer","yzs-page-renderer-form-modal","yzs-page-renderer"].includes(t.name)&&e.component(jb(t.name),t)):t.name&&e.component(t.name,t)})}const zb={install:Ha};H.AIcon=tn,H.DatePicker=qr,H.DragDrawer=no,H.DragModal=oo,H.LOADING_SIGN=Wt,H.MAP_SIGN=Ht,H.PageRenderer=Wa,H.PreviewMediaModal=ci,H.datePickerProps=Gr,H.default=zb,H.enumerations=Fb,H.install=Ha,H.showPreviewMediaModal=ku,Object.defineProperties(H,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|