@yzsf2e/render-core 1.0.2-alpha.82 → 1.0.2-alpha.83

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.
@@ -4,10 +4,10 @@ import * as sl from "@ant-design/icons-vue";
4
4
  import { CloseOutlined as ll, ShrinkOutlined as ul, ArrowsAltOutlined as cl, HolderOutlined as fl, DownOutlined as ho, UpOutlined as dl, SettingOutlined as pl, CopyOutlined as hl, LoadingOutlined as go, FilterOutlined as gl } from "@ant-design/icons-vue";
5
5
  import { useRouter as ml } from "vue-router";
6
6
  /*!
7
- * @yzsf2e/render-core v1.0.2-alpha.82 Tue Aug 06 2024 13:53:25 GMT+0800 (中国标准时间)
7
+ * @yzsf2e/render-core v1.0.2-alpha.83 Tue Aug 06 2024 17:51:12 GMT+0800 (中国标准时间)
8
8
  * (c) 2023 @yzsf2e.
9
9
  */
10
- const vl = "@yzsf2e/render-core", yl = "1.0.2-alpha.82", bl = "dist/render-core", wl = "dist/render-core", Sl = [
10
+ const vl = "@yzsf2e/render-core", yl = "1.0.2-alpha.83", bl = "dist/render-core", wl = "dist/render-core", Sl = [
11
11
  "dist"
12
12
  ], Cl = {
13
13
  dev: "storybook dev -p 6006",
@@ -7581,7 +7581,9 @@ const ro = {
7581
7581
  const K = B || (Pe[e.page.name] ? ke(Pe[e.page.name]) : []);
7582
7582
  Xt(z, K, N);
7583
7583
  }, Qt = async () => {
7584
- M.visible = !1, window.__POWERED_BY_WUJIE__ && b();
7584
+ M.visible = !1, window.__POWERED_BY_WUJIE__ && setTimeout(() => {
7585
+ b();
7586
+ }, 500);
7585
7587
  }, $r = G(() => x.value.map((z) => ({
7586
7588
  ...z,
7587
7589
  show: i ? !0 : V.value.includes(z.columnKey)
@@ -1,7 +1,7 @@
1
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.82 Tue Aug 06 2024 13:53:25 GMT+0800 (中国标准时间)
2
+ * @yzsf2e/render-core v1.0.2-alpha.83 Tue Aug 06 2024 17:51:12 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.82",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=v=>{console.error(v)},initOnMounted:y}=r,m=(d?o.shallowRef:o.ref)(typeof t=="function"?t():t);if(!n)try{n=Es("getDefaultStorage",()=>{var v;return(v=Tt)==null?void 0:v.localStorage})()}catch(v){h(v)}if(!n)return m;const b=ye(t),C=Ts(b),_=(i=r.serializer)!=null?i:Os[C],{pause:w,resume:$}=ms(m,()=>E(m.value),{flush:a,deep:l,eventFilter:p});return f&&s&&ys(()=>{Ot(f,"storage",A),Ot(f,Jr,T),y&&A()}),y||A(),m;function E(v){try{if(v==null)n.removeItem(e);else{const g=_.write(v),S=n.getItem(e);S!==g&&(n.setItem(e,g),f&&f.dispatchEvent(new CustomEvent(Jr,{detail:{key:e,oldValue:S,newValue:g,storageArea:n}})))}}catch(g){h(g)}}function O(v){const g=v?v.newValue:n.getItem(e);if(g==null)return c&&b!=null&&n.setItem(e,_.write(b)),b;if(!v&&u){const S=_.read(g);return typeof u=="function"?u(S,b):C==="object"&&!Array.isArray(S)?{...b,...S}:S}else return typeof g!="string"?g:_.read(g)}function T(v){A(v.detail)}function A(v){if(!(v&&v.storageArea!==n)){if(v&&v.key==null){m.value=b;return}if(!(v&&v.key!==e)){w();try{(v==null?void 0:v.newValue)!==_.write(m.value)&&(m.value=O(v))}catch(g){h(g)}finally{v?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,b=o.ref((n=ye(f))!=null?n:{x:0,y:0}),C=o.ref(),_=T=>i?i.includes(T.pointerType):!0,w=T=>{ye(a)&&T.preventDefault(),ye(l)&&T.stopPropagation()},$=T=>{var A;if(!_(T)||ye(s)&&T.target!==ye(e))return;const v=ye(y),g=(A=v==null?void 0:v.getBoundingClientRect)==null?void 0:A.call(v),S=ye(e).getBoundingClientRect(),N={x:T.clientX-(v?S.left-g.left:S.left),y:T.clientY-(v?S.top-g.top:S.top)};(d==null?void 0:d(N,T))!==!1&&(C.value=N,w(T))},E=T=>{var A;if(!_(T)||!C.value)return;const v=ye(y),g=(A=v==null?void 0:v.getBoundingClientRect)==null?void 0:A.call(v),S=ye(e).getBoundingClientRect();let{x:N,y:x}=b.value;(p==="x"||p==="both")&&(N=T.clientX-C.value.x,v&&(N=Math.min(Math.max(0,N),g.width-S.width))),(p==="y"||p==="both")&&(x=T.clientY-C.value.y,v&&(x=Math.min(Math.max(0,x),g.height-S.height))),b.value={x:N,y:x},c==null||c(b.value,T),w(T)},O=T=>{_(T)&&C.value&&(C.value=void 0,u==null||u(b.value,T),w(T))};if(Qr){const T={capture:(r=t.capture)!=null?r:!0};Ot(m,"pointerdown",$,T),Ot(h,"pointermove",E,T),Ot(h,"pointerup",O,T)}return{...gs(b),position:b,isDragging:o.computed(()=>!!C.value),style:o.computed(()=>`left:${b.value.x}px;top:${b.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 b=w=>s?typeof s=="function"?s(w):vs(w):w,C=()=>ss(e[t])?b(e[t]):f,_=w=>{p?p(w)&&y(m,w):y(m,w)};if(c){const w=C(),$=o.ref(w);let E=!1;return o.watch(()=>e[t],O=>{E||(E=!0,$.value=b(O),o.nextTick(()=>E=!1))}),o.watch($,O=>{!E&&(O!==e[t]||d)&&_(O)},{deep:d}),$}else return o.computed({get(){return C()},set(w){_(w)}})}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(b){const _=b.clientX-h,w=typeof y=="number"?y-_:window.innerWidth-b.x;i.value=Math.min(w<u?u:w,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:b=!0,successMsg:C="操作成功"}=r.value;a.value=!1,y&&y.success&&(m&&K.message.success(C),d(),b&&n("refresh"))}).catch(y=>{var b;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((b=m[0])==null?void 0:b.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=b=>{const C=b.clientX-h.offsetLeft,_=b.clientY-h.offsetTop;let w,$;m.left.includes("%")?(w=+document.body.clientWidth*(+m.left.replace(/%/g,"")/100),$=+document.body.clientHeight*(+m.top.replace(/%/g,"")/100)):(w=+m.left.replace(/\px/g,""),$=+m.top.replace(/\px/g,"")),document.onmousemove=function(E){const O=E.clientX-C,T=E.clientY-_;y.style.left=`${O+w}px`,y.style.top=`${T+$}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="";/*!
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.83",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=v=>{console.error(v)},initOnMounted:y}=r,m=(d?o.shallowRef:o.ref)(typeof t=="function"?t():t);if(!n)try{n=Es("getDefaultStorage",()=>{var v;return(v=Tt)==null?void 0:v.localStorage})()}catch(v){h(v)}if(!n)return m;const b=ye(t),C=Ts(b),_=(i=r.serializer)!=null?i:Os[C],{pause:w,resume:$}=ms(m,()=>E(m.value),{flush:a,deep:l,eventFilter:p});return f&&s&&ys(()=>{Ot(f,"storage",A),Ot(f,Jr,T),y&&A()}),y||A(),m;function E(v){try{if(v==null)n.removeItem(e);else{const g=_.write(v),S=n.getItem(e);S!==g&&(n.setItem(e,g),f&&f.dispatchEvent(new CustomEvent(Jr,{detail:{key:e,oldValue:S,newValue:g,storageArea:n}})))}}catch(g){h(g)}}function O(v){const g=v?v.newValue:n.getItem(e);if(g==null)return c&&b!=null&&n.setItem(e,_.write(b)),b;if(!v&&u){const S=_.read(g);return typeof u=="function"?u(S,b):C==="object"&&!Array.isArray(S)?{...b,...S}:S}else return typeof g!="string"?g:_.read(g)}function T(v){A(v.detail)}function A(v){if(!(v&&v.storageArea!==n)){if(v&&v.key==null){m.value=b;return}if(!(v&&v.key!==e)){w();try{(v==null?void 0:v.newValue)!==_.write(m.value)&&(m.value=O(v))}catch(g){h(g)}finally{v?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,b=o.ref((n=ye(f))!=null?n:{x:0,y:0}),C=o.ref(),_=T=>i?i.includes(T.pointerType):!0,w=T=>{ye(a)&&T.preventDefault(),ye(l)&&T.stopPropagation()},$=T=>{var A;if(!_(T)||ye(s)&&T.target!==ye(e))return;const v=ye(y),g=(A=v==null?void 0:v.getBoundingClientRect)==null?void 0:A.call(v),S=ye(e).getBoundingClientRect(),N={x:T.clientX-(v?S.left-g.left:S.left),y:T.clientY-(v?S.top-g.top:S.top)};(d==null?void 0:d(N,T))!==!1&&(C.value=N,w(T))},E=T=>{var A;if(!_(T)||!C.value)return;const v=ye(y),g=(A=v==null?void 0:v.getBoundingClientRect)==null?void 0:A.call(v),S=ye(e).getBoundingClientRect();let{x:N,y:x}=b.value;(p==="x"||p==="both")&&(N=T.clientX-C.value.x,v&&(N=Math.min(Math.max(0,N),g.width-S.width))),(p==="y"||p==="both")&&(x=T.clientY-C.value.y,v&&(x=Math.min(Math.max(0,x),g.height-S.height))),b.value={x:N,y:x},c==null||c(b.value,T),w(T)},O=T=>{_(T)&&C.value&&(C.value=void 0,u==null||u(b.value,T),w(T))};if(Qr){const T={capture:(r=t.capture)!=null?r:!0};Ot(m,"pointerdown",$,T),Ot(h,"pointermove",E,T),Ot(h,"pointerup",O,T)}return{...gs(b),position:b,isDragging:o.computed(()=>!!C.value),style:o.computed(()=>`left:${b.value.x}px;top:${b.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 b=w=>s?typeof s=="function"?s(w):vs(w):w,C=()=>ss(e[t])?b(e[t]):f,_=w=>{p?p(w)&&y(m,w):y(m,w)};if(c){const w=C(),$=o.ref(w);let E=!1;return o.watch(()=>e[t],O=>{E||(E=!0,$.value=b(O),o.nextTick(()=>E=!1))}),o.watch($,O=>{!E&&(O!==e[t]||d)&&_(O)},{deep:d}),$}else return o.computed({get(){return C()},set(w){_(w)}})}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(b){const _=b.clientX-h,w=typeof y=="number"?y-_:window.innerWidth-b.x;i.value=Math.min(w<u?u:w,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:b=!0,successMsg:C="操作成功"}=r.value;a.value=!1,y&&y.success&&(m&&K.message.success(C),d(),b&&n("refresh"))}).catch(y=>{var b;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((b=m[0])==null?void 0:b.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=b=>{const C=b.clientX-h.offsetLeft,_=b.clientY-h.offsetTop;let w,$;m.left.includes("%")?(w=+document.body.clientWidth*(+m.left.replace(/%/g,"")/100),$=+document.body.clientHeight*(+m.top.replace(/%/g,"")/100)):(w=+m.left.replace(/\px/g,""),$=+m.top.replace(/\px/g,"")),document.onmousemove=function(E){const O=E.clientX-C,T=E.clientY-_;y.style.left=`${O+w}px`,y.style.top=`${T+$}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",$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,"&amp;").replace(/"/g,"&quot;").replace(/'/g,"&#39;").replace(/</g,"&lt;").replace(/>/g,"&gt;"):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,b=c;n.imageInitializing=!1,c*h>s?b=s/h:m=c*h,y=le(y)?y:.9,m=Math.min(m*y,f),b=Math.min(b*y,p);var C=(s-m)/2,_=(c-b)/2,w={left:C,top:_,x:C,y:_,width:m,height:b,oldRatio:1,ratio:m/f,aspectRatio:h,naturalWidth:f,naturalHeight:p},$=be({},w);r.rotatable&&(w.rotate=u.rotate||0,$.rotate=0),r.scalable&&(w.scaleX=u.scaleX||1,w.scaleY=u.scaleY||1,$.scaleX=1,$.scaleY=1),n.imageData=w,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(b){var C=c.getAttribute(b);C!==null&&f.setAttribute(b,C)}),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 C=t.imageData,_=Array.isArray(i.title)?i.title[1]:i.title;a.innerHTML=Js(te(_)?_.call(t,f,C):"".concat(d," (").concat(C.naturalWidth," × ").concat(C.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,b=d.naturalHeight;if(t=Math.max(0,t),le(t)&&this.viewed&&!this.played&&(l||c.zoomable)){if(!l){var C=Math.max(.01,c.minZoomRatio),_=Math.min(100,c.maxZoomRatio);t=Math.min(Math.max(t,C),_)}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 w=m*t,$=b*t,E=w-h,O=$-y,T=d.ratio;if(te(c.zoom)&&Y(s,Do,c.zoom,{once:!0}),fe(s,Do,{ratio:t,oldRatio:T,originalEvent:a})===!1)return this;if(this.zooming=!0,a){var A=tl(this.viewer),v=u&&Object.keys(u).length>0?ol(u):{pageX:a.pageX,pageY:a.pageY};d.x-=E*((v.pageX-A.left-f)/h),d.y-=O*((v.pageY-A.top-p)/y)}else dt(i)&&le(i.x)&&le(i.y)?(d.x-=E*((i.x-f)/h),d.y-=O*((i.y-p)/y)):(d.x-=E/2,d.y-=O/2);d.left=d.x,d.top=d.y,d.width=w,d.height=$,d.oldRatio=T,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:T,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(w){U(l,w)}),r.toolbar){var p=document.createElement("ul"),h=dt(r.toolbar),y=un.slice(0,3),m=un.slice(7,9),b=un.slice(9);h||U(c,dn(r.toolbar)),re(h?r.toolbar:un,function(w,$){var E=h&&dt(w),O=h?tr($):w,T=E&&!ut(w.show)?w.show:w;if(!(!T||!r.zoomable&&y.indexOf(O)!==-1||!r.rotatable&&m.indexOf(O)!==-1||!r.scalable&&b.indexOf(O)!==-1)){var A=E&&!ut(w.size)?w.size:w,v=E&&!ut(w.click)?w.click:w,g=document.createElement("li");r.keyboard&&g.setAttribute("tabindex",0),g.setAttribute("role","button"),U(g,"".concat(G,"-").concat(O)),te(v)||nr(g,cn,O),le(T)&&U(g,dn(T)),["small","large"].indexOf(A)!==-1?U(g,"".concat(G,"-").concat(A)):O==="play"&&U(g,"".concat(G,"-large")),te(v)&&Y(g,ct,v),p.appendChild(g)}}),c.appendChild(p)}else U(c,He);if(!r.rotatable){var C=c.querySelectorAll('li[class*="rotate"]');U(C,At),re(C,function(w){c.appendChild(w)})}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=N=>n("update:show",N),a=o.ref(!1),l=o.ref(null),s={transition:!1,inline:!0,button:!1,toolbar:{rotateLeft:!0,prev:!0,oneToOne:!0,next:!0,rotateRight:!0}},c=o.ref(!1),u=o.ref([]),d=o.ref(0);o.watch([()=>r.imageList,()=>r.imageIndex],()=>{r.imageList&&(u.value=[...r.imageList],d.value=r.imageIndex||0)}),o.watch(()=>r.show,()=>{c.value=r.show});const f=N=>{l.value=N,N.view(d.value)},p=o.ref(null),{x:h,y,isDragging:m}=_s(p),b=o.ref(0),C=o.ref(0),_=o.ref(!1),w=o.ref(0),$=o.ref(0),E=o.ref(0),O=o.ref(0),T=o.ref({left:0,right:0,top:0,bottom:0});o.watch([h,y],()=>{if(!_.value){b.value=h.value,C.value=y.value;const N=document.body.getBoundingClientRect(),x=p.value.getBoundingClientRect();T.value.right=N.width-x.width,T.value.bottom=N.height-x.height,E.value=w.value,O.value=$.value}_.value=!0}),o.watch(m,()=>{m||(_.value=!1)}),o.watchEffect(()=>{_.value&&(w.value=E.value+Math.min(Math.max(T.value.left,h.value),T.value.right)-b.value,$.value=O.value+Math.min(Math.max(T.value.top,y.value),T.value.bottom)-C.value)});const A=o.computed(()=>({transform:`translate(${w.value}px, ${$.value}px)`})),v=(N,x=0,B)=>{B&&(a.value=B),u.value=[...N],d.value=x,c.value=!0},g=()=>{c.value=!1},S=()=>{i(!1)};return t({open:v,close:g}),(N,x)=>(o.openBlock(),o.createBlock(o.unref(K.Modal),{visible:c.value,"onUpdate:visible":x[0]||(x[0]=B=>c.value=B),"destroy-on-close":"",centered:"",width:800,mask:a.value,"mask-closable":!1,"wrap-class-name":"pointer-events-none preview-media-modal","wrap-style":{overflow:"hidden"},footer:null,onOk:g,onCancel:S},{title:o.withCtx(()=>[o.createElementVNode("div",{ref_key:"modalTitleRef",ref:p,style:{width:"100%",cursor:"move"}},[o.createVNode(o.unref(ge.HolderOutlined),{style:{"margin-right":"6px"}}),o.createTextVNode("预览 ")],512)]),modalRender:o.withCtx(({originVNode:B})=>[o.createElementVNode("div",{style:o.normalizeStyle(A.value)},[(o.openBlock(),o.createBlock(o.resolveDynamicComponent(B)))],4)]),default:o.withCtx(()=>[o.createVNode(o.unref(bu),{options:s,images:u.value,onInited:f},{default:o.withCtx(B=>[o.createElementVNode("div",wu,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(B.images,D=>(o.openBlock(),o.createElementBlock("img",{style:{opacity:"0"},src:D,key:D},null,8,vu))),128))])]),_:1},8,["images"])]),_:1},8,["visible","mask"]))}}),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){var r;const t=o.createApp(e),n=document.createElement("div");return(r=document.querySelector("body"))==null||r.appendChild(n),{instance:t.mount(n),unmount(){var i;t.unmount(),(i=document.querySelector("body"))==null||i.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,n){return Eu?(bn||Au(),bn.open({imageList:e,imageIndex:t,mask:n}),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",b=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,C=/\[([^\]]+)]|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(B){var D=["th","st","nd","rd"],P=B%100;return"["+B+(D[(P-20)%10]||D[P]||D[0])+"]"}},w=function(B,D,P){var M=String(B);return!M||M.length>=D?B:""+Array(D+1-M.length).join(P)+B},$={s:w,z:function(B){var D=-B.utcOffset(),P=Math.abs(D),M=Math.floor(P/60),R=P%60;return(D<=0?"+":"-")+w(M,2,"0")+":"+w(R,2,"0")},m:function B(D,P){if(D.date()<P.date())return-B(P,D);var M=12*(P.year()-D.year())+(P.month()-D.month()),R=D.clone().add(M,f),V=P-R<0,z=D.clone().add(M+(V?-1:1),f);return+(-(M+(P-R)/(V?R-z:z-R))||0)},a:function(B){return B<0?Math.ceil(B)||0:Math.floor(B)},p:function(B){return{M:f,y:h,w:d,d:u,D:y,h:c,m:s,s:l,ms:a,Q:p}[B]||String(B||"").toLowerCase().replace(/s$/,"")},u:function(B){return B===void 0}},E="en",O={};O[E]=_;var T="$isDayjsObject",A=function(B){return B instanceof N||!(!B||!B[T])},v=function B(D,P,M){var R;if(!D)return E;if(typeof D=="string"){var V=D.toLowerCase();O[V]&&(R=V),P&&(O[V]=P,R=V);var z=D.split("-");if(!R&&z.length>1)return B(z[0])}else{var q=D.name;O[q]=D,R=q}return!M&&R&&(E=R),R||!M&&E},g=function(B,D){if(A(B))return B.clone();var P=typeof D=="object"?D:{};return P.date=B,P.args=arguments,new N(P)},S=$;S.l=v,S.i=A,S.w=function(B,D){return g(B,{locale:D.$L,utc:D.$u,x:D.$x,$offset:D.$offset})};var N=function(){function B(P){this.$L=v(P.locale,null,!0),this.parse(P),this.$x=this.$x||P.x||{},this[T]=!0}var D=B.prototype;return D.parse=function(P){this.$d=function(M){var R=M.date,V=M.utc;if(R===null)return new Date(NaN);if(S.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(b);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 S},D.isValid=function(){return this.$d.toString()!==m},D.isSame=function(P,M){var R=g(P);return this.startOf(M)<=R&&R<=this.endOf(M)},D.isAfter=function(P,M){return g(P)<this.startOf(M)},D.isBefore=function(P,M){return this.endOf(M)<g(P)},D.$g=function(P,M,R){return S.u(P)?this[M]:this.set(R,P)},D.unix=function(){return Math.floor(this.valueOf()/1e3)},D.valueOf=function(){return this.$d.getTime()},D.startOf=function(P,M){var R=this,V=!!S.u(M)||M,z=S.p(P),q=function(ve,de){var Ce=S.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 S.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,M){var R,V=S.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+(M-this.$W):M;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,M){return this.clone().$set(P,M)},D.get=function(P){return this[S.p(P)]()},D.add=function(P,M){var R,V=this;P=Number(P);var z=S.p(M),q=function(se){var ue=g(V);return S.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 S.w(J,this)},D.subtract=function(P,M){return this.add(-1*P,M)},D.format=function(P){var M=this,R=this.$locale();if(!this.isValid())return R.invalidDate||m;var V=P||"YYYY-MM-DDTHH:mm:ssZ",z=S.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(M,V))||_e[Ce].slice(0,Ie)},Oe=function(de){return S.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(C,function(de,Ce){return Ce||function(_e){switch(_e){case"YY":return String(M.$y).slice(-2);case"YYYY":return S.s(M.$y,4,"0");case"M":return J+1;case"MM":return S.s(J+1,2,"0");case"MMM":return me(R.monthsShort,J,ue,3);case"MMMM":return me(ue,J);case"D":return M.$D;case"DD":return S.s(M.$D,2,"0");case"d":return String(M.$W);case"dd":return me(R.weekdaysMin,M.$W,se,2);case"ddd":return me(R.weekdaysShort,M.$W,se,3);case"dddd":return se[M.$W];case"H":return String(q);case"HH":return S.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 S.s(Q,2,"0");case"s":return String(M.$s);case"ss":return S.s(M.$s,2,"0");case"SSS":return S.s(M.$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,M,R){var V,z=this,q=S.p(M),Q=g(P),J=(Q.utcOffset()-this.utcOffset())*r,se=this-Q,ue=function(){return S.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:S.a(V)},D.daysInMonth=function(){return this.endOf(f).$D},D.$locale=function(){return O[this.$L]},D.locale=function(P,M){if(!P)return this.$L;var R=this.clone(),V=v(P,M,!0);return V&&(R.$L=V),R},D.clone=function(){return S.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()},B}(),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(B){x[B[1]]=function(D){return this.$g(D,B[0],B[1])}}),g.extend=function(B,D){return B.$i||(B(D,N,g),B.$i=!0),g},g.locale=v,g.isDayjs=A,g.unix=function(B){return g(1e3*B)},g.en=O[E],g.Ls=O,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(b){l.add(Nn(b,t,n,b,e,a))}):Eh(e)&&e.forEach(function(b,C){l.set(C,Nn(b,t,n,C,e,a))});var y=u?c?Gi:Tr:c?vr:wt,m=d?void 0:y(e);return kf(m||e,function(b,C){m&&(C=b,b=e[C]),gr(l,C,Nn(b,t,n,C,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 b=l?r(m,y,f,t,e,a):r(y,m,f,e,t,a);if(b!==void 0){if(b)continue;p=!1;break}if(h){if(!im(t,function(C,_){if(!sa(h,_)&&(y===C||i(y,C,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 b=l;++f<c;){p=s[f];var C=e[p],_=t[p];if(r)var w=l?r(_,C,p,t,e,a):r(C,_,p,e,t,a);if(!(w===void 0?C===_||i(C,_,n,r,a):w)){m=!1;break}b||(b=p=="constructor")}if(m&&!b){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,b=y?t.value():t;return a||(a=new Re),i(m,b,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(O){var T=r,A=i;return r=i=void 0,u=O,l=e.apply(A,T),l}function y(O){return u=O,s=setTimeout(C,t),d?h(O):l}function m(O){var T=O-c,A=O-u,v=t-T;return f?ng(v,a-A):v}function b(O){var T=O-c,A=O-u;return c===void 0||T>=t||T<0||f&&A>=a}function C(){var O=Nr();if(b(O))return _(O);s=setTimeout(C,m(O))}function _(O){return s=void 0,p&&r?h(O):(r=i=void 0,l)}function w(){s!==void 0&&clearTimeout(s),u=0,r=c=i=s=void 0}function $(){return s===void 0?l:_(Nr())}function E(){var O=Nr(),T=b(O);if(r=arguments,i=this,c=O,T){if(s===void 0)return y(c);if(f)return clearTimeout(s),s=setTimeout(C,t),h(c)}return s===void 0&&(s=setTimeout(C,t)),l}return E.cancel=w,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 b=kn(u,y||"data"),C=_=>{Object.prototype.toString.call(_)==="[object Array]"?h==="Cascader"?e[i[c]]=_.map(w=>Rr(w,{[f||"value"]:"value",[d||"label"]:"label",[p||"children"]:"children"})):e[i[c]]=[...o.toRaw(e[i[c]]||[]),..._.map(w=>{let $=w[d];return Ca.test(d)&&($=d.replace(Ca,(E,O)=>w[O])),{...m?{group:w[m]}:{},label:$,value:w[f]}})]:Object.prototype.toString.call(_)==="[object Object]"&&Object.keys(_).forEach(w=>{C(_[w])})};C(b)}}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:O,...T}=E;try{const A=JSON.parse(O);return{...T,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,O;return((O=i[h])==null?void 0:O.filter((E=r.value.filterGroups)!=null&&E.length?T=>p.includes(T.group):()=>!0))||[]}),m=o.ref([]),b=Ke(r.value.filterUrl||`/duckbill-data-query-server/table/column/${r.value.filterKey}`,r.value.filterMethod||"post"),C=o.inject("transformFuzzy",{})[r.value.fieldName],_=(E,O)=>{var A;const T=r.value.filterKey||"label";return O[T]||console.warn(`not found key 【${T}】 in option`),((A=O[T])==null?void 0:A.indexOf(E.toString()))>-1},w=o.computed(()=>{switch(r.value.type){case Br:return ma(async function(E){const O=Ir({conditions:r.value.fuzzyCode?{key:E,code:r.value.fuzzyCode}:E,apiConfig:{conditionKey:r.value.conditionKey||"params",metaKey:r.value.metaKey}}),T=await b(O),A=C?C(T):T;m.value=A},200);case Mn:return ma(async function(E){const{category:O,tab:T}=n.meta,A=await b({sliceNumber:"50",category:O,tab:T,code:E});r.value.fuzzyMatch?m.value=A.data.map(v=>({value:v,label:v})):m.value=A.data.map(v=>({value:v.id,label:v.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:w.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(_)})},b=_=>_.label.slice(0,10);o.watch(u,()=>t("changeExpand"));const C=o.computed(()=>u.value||!c.value?(6-a.value.length%6)*4:24);return n({resetFields:p}),{expand:u,pageName:s,formState:d,serachSpan:C,validateInfos:y,showAvailiableTrigger:c,AVAILIABLE_EXPAND_LINE:3,CONDITION_COUNT_PER_LINE:6,onSubmit:m,getItemLabel:b}}});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,b)=>{var C;return o.withDirectives((o.openBlock(),o.createBlock(c,{key:m.fieldName,span:((C=m.otherProps)==null?void 0:C.span)||4,class:"conditions-item-col"},{default:o.withCtx(()=>{var _,w;return[o.createVNode(s,o.mergeProps(e.validateInfos[m.fieldName],{colon:!1,"label-col":(_=m.otherProps)==null?void 0:_.labelCol,"wrapper-col":(w=m.otherProps)==null?void 0:w.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||b<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 O,T,A,v;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,S)=>{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,S)},h=o.computed({get:()=>n.value,set:g=>t("update:current",g)}),y=o.computed({get:()=>r.value,set:g=>{const S=Math.ceil(e.total/g);h.value>S&&(h.value=S),t("update:pageSize",g)}}),m=o.inject("paramsGuard",g=>g),b=(O=i.value)!=null&&O.url?Ke((T=i.value)==null?void 0:T.url,"post",{responseType:"blob",...i.value.requestOptions}):null,C=(v=(A=a.value)==null?void 0:A.children)!=null&&v.length?a.value.children.map(g=>Ke(g.url,"post",{...g.requestOptions})):[],_=async()=>{var N;const{formState:g}=Ut(),S=i.value?Ir({conditions:o.toRaw(g[u]),apiConfig:i.value}):{};m(S,u);try{s.value=!0;const x=await b(S);if(!x)return;const B=/\{\{(.+?)\}\}/g;let D=((N=i.value)==null?void 0:N.fileName)||"",P=null;for(;(P=B.exec(D))!==null;)P[1]==="Date"&&(D=D.replace(P[0],fi().format("YYYY-MM-DD")));const M=document.createElement("a"),R=window.URL.createObjectURL(new Blob([x]));if(M.href=R,M.download=D,document.body.appendChild(M),M.click(),document.body.removeChild(M),window.URL.revokeObjectURL(R),i.value.needFeedback===!1)return;K.message.success("导出成功")}catch(x){console.warn("export error: ",x)}finally{s.value=!1}},w=({url:g,type:S})=>{switch(S){case"TEMPLATE_LOCAL":window.open(g);break}},$=async({accept:g},S)=>{const N=/^\.[a-zA-Z]+$/,x=g==null?void 0:g.reduce((P,M)=>{if(!N.test(M))throw`请提供正确的文件后缀名,是否是 【.${M}】 ?`;return P[Kg[M]]=[M],P},{}),[B]=await window.showOpenFilePicker({types:[{accept:x}]}),D=await B.getFile();if(D){const P=C[S],M=new FormData;M.append("file",D),c.value=!0,P(M).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,S)=>{const{type:N}=g;if(["TEMPLATE_LOCAL"].includes(N)){w(g);return}if(["IMPORT"].includes(N)){$(g,S);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"),b=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,(C,_)=>o.withDirectives((o.openBlock(),o.createBlock(o.resolveDynamicComponent(C.type),o.mergeProps(C.otherProps,{key:`${C.type}${_}`,onClick:w=>e.handleButtonClick(C,w)}),o.createSlots({overlay:o.withCtx(()=>[o.createVNode(c,null,{default:o.withCtx(()=>[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(C.sublist,w=>(o.openBlock(),o.createBlock(s,{key:w.action,onClick:$=>e.handleButtonClick(w,$)},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(w.children),1)]),_:2},1032,["onClick"]))),128))]),_:2},1024)]),default:o.withCtx(()=>[o.createTextVNode(" "+o.toDisplayString(C.children)+" ",1)]),_:2},[C.iconType?{name:"icon",fn:o.withCtx(()=>[o.createVNode(l,{type:C.iconType},null,8,["type"])]),key:"0"}:void 0]),1040,["onClick"])),[[b,C.permissions]])),128))]),_:1})]),o.createElementVNode("div",null,[o.createVNode(u,null,{default:o.withCtx(()=>{var C,_;return[e.hasApiConfig?(o.openBlock(),o.createElementBlock(o.Fragment,{key:0},[(C=e.importConfig)!=null&&C.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,(w,$)=>(o.openBlock(),o.createBlock(s,{key:$,onClick:()=>e.handleImport(w,$)},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(w.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,(w,$)=>(o.openBlock(),o.createBlock(s,{key:$,onClick:()=>e.handleImport(w,$)},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(w.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]=w=>e.handleExport(w.key))},{default:o.withCtx(()=>[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(e.OPERATIONS_EXPORT_MAP,(w,$)=>(o.openBlock(),o.createBlock(s,{key:$},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(w),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]=w=>e.computed_current=w),pageSize:e.computed_pageSize,"onUpdate:pageSize":t[3]||(t[3]=w=>e.computed_pageSize=w),size:"small",simple:"",total:e.total},null,8,["current","pageSize","total"]),o.createVNode(y,{value:e.computed_pageSize,"onUpdate:value":t[4]||(t[4]=w=>e.computed_pageSize=w),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]=w=>e.$emit("customizeSetting",w.key))},{default:o.withCtx(()=>[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(e.hasApiConfig?e.API_CONFIG_SETTINGS_MAP:e.SETTINGS_MAP,(w,$)=>(o.openBlock(),o.createBlock(s,{key:$},{default:o.withCtx(()=>[o.createVNode(m,{style:{"margin-right":"4px"}}),o.createElementVNode("a",Xg,o.toDisplayString(w),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 b=kn(y,`${n.value.dataKey}.${m}`);u[m]=Kt(b)?" - ":b})}).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),b=m.length,C=e,_=C.c=[],w=0,$=l+(C.e=t.e-e.e)+1;for(C.s=a,a=$<0?0:$,p.unshift(0);b++<s;)m.push(0);do{for(u=0;u<10;u++){if(s!=(b=m.length))d=s>b?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=b==s?i:p;b;){if(m[--b]<c[b]){for(f=b;f&&!m[--f];)m[f]=9;--m[f],m[b]+=10}m[b]-=c[b]}for(;!m[0];)m.shift()}else break}_[w++]=d?u:++u,m[0]&&d?m[b]=r[h]||0:m=[r[h]]}while((h++<y||m[0]!==Be)&&a--);return!_[0]&&w!=1&&(_.shift(),C.e--,$--),w>$&&nt(C,$,n.RM,m[0]!==Be),C},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",""),b=o.inject("emitHandler",()=>{}),C=o.ref(e.sort||{});let _=!1;const w=k=>{n("update:sort",k),_&&(_=!1)},$=k=>{w(k),n("search")};o.watch(()=>e.defaultSort,k=>{_=!0,C.value=k}),o.watch(C,(k,F)=>{const I=Object.keys(k)[0];if(I){const j=c.value.find(W=>W.columnKey===I);j!=null&&j.sortable&&(_?w(C.value):$(C.value))}else{const j=Object.keys(F)[0];if(j){const W=c.value.find(ee=>ee.columnKey===j);W!=null&&W.sortable&&(_?w(C.value):$(C.value))}}});const E=o.ref([]),O=o.ref([]),T=o.ref([]),A=o.ref([]),v=o.ref({}),g=o.ref([]),{selectedRows:S,selectedRowKeys:N,selectedErrorRowKeys:x}=Yt();x[m]||(x[m]=[]);const B=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),M=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,S[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,S[m]=Jt.value.filter(W=>I.includes(W[j]))},me=k=>({onclick:()=>he(k),onDblclick:()=>{e.rowDblclickAction&&b(e.rowDblclickAction,[k])}}),Oe=o.computed(()=>{var I;let k=a.value;B.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"&&O.value.push(j),ee==="slot"&&T.value.push(j),ee==="img"&&A.value.push(j),ee==="map"&&Ae&&(v.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[C.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?C.value={[I.columnKey]:wy[I.order]}:C.value={})},Ur=()=>{C.value=e.defaultSort},Zt=o.computed(()=>Object.keys(v.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(v.value[W].refEnumLabel){const Ye=(xe=(ee=i[v.value[W].refEnum])==null?void 0:ee.find(ot=>{var We,Yn;return((We=ot.id)==null?void 0:We.toString())===((Yn=I[v.value[W].refEnum])==null?void 0:Yn.toString())}))==null?void 0:xe[v.value[W].refEnumLabel];j[Ht][W]=Ye}else j[Ht][W]=(Ue=(Ae=i[v.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:O,slotCellKeys:T,imgCellKeys:A,tableCellSlots:M,selectedRows:S,selectedRowKeys:N,selectedErrorRowKeys:x,showSelectionSummaryRow:B,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"),b=o.resolveComponent("a-table-summary-cell"),C=o.resolveComponent("a-table-summary-row"),_=o.resolveComponent("a-table-summary"),w=o.resolveComponent("Table");return o.openBlock(),o.createElementBlock("div",Ey,[o.createVNode(w,{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,O)=>`${O%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 O;return[E.key===e.DATA_SOURCE_INDEX_KEY?(o.openBlock(),o.createElementBlock("div",{key:0,onClick:t[0]||(t[0]=(...T)=>e.headerFilterSwitch&&e.headerFilterSwitch(...T))},[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)),(O=E.key)!=null&&O.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":T=>e.formState[e.pageName][E.dataIndex]=T,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":T=>e.formState[e.pageName][E.dataIndex]=T,onChange:e.onHeaderFilterChange,onPressEnter:e.onSubmit},null,8,["value","onUpdate:value","onChange","onPressEnter"]))])):o.createCommentVNode("",!0)]))]}),bodyCell:o.withCtx(({text:E,record:O,index:T,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,v=>(o.openBlock(),o.createElementBlock(o.Fragment,{key:v.action},[v.show===void 0||e.actionVisible(v.show,O)?(o.openBlock(),o.createElementBlock(o.Fragment,{key:0},[O[e.LOADING_SIGN][`${v.action}Loading`]?(o.openBlock(),o.createBlock(f,{key:1,style:{color:"#1890ff"}})):(o.openBlock(),o.createElementBlock("a",{key:0,onClick:o.withModifiers(g=>{v.disabled&&e.actionVisible(v.disabled,O)||e.handleLinkClick(O,A,g,v.action)},["stop"]),class:o.normalizeClass({"ant-table-action-disabled":v.disabled&&e.actionVisible(v.disabled,O)}),style:o.normalizeStyle({color:v.color})},[v.icon?(o.openBlock(),o.createBlock(d,{key:0,type:v.icon},null,8,["type"])):o.createCommentVNode("",!0),o.createTextVNode(" "+o.toDisplayString(v.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:O,index:T,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:O,copyable:A.copyable,column:A,loading:O[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(C,{class:"table-summary-selection"},{default:o.withCtx(()=>[o.createVNode(b,{index:0},{default:o.withCtx(()=>[$y]),_:1}),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(e.columns,(E,O)=>(o.openBlock(),o.createBlock(b,{key:E.key,index:O+1,style:{"text-align":"center"}},{default:o.withCtx(()=>[O===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(C,{key:0},{default:o.withCtx(()=>[o.createVNode(b,{index:0},{default:o.withCtx(()=>[Iy]),_:1}),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(e.totalList,(E,O)=>(o.openBlock(),o.createBlock(b,{key:O,index:O+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:O,indent:T,expanded:A})=>[(o.openBlock(),o.createBlock(o.resolveDynamicComponent(e.tableProps.expandedRowRender.component),o.normalizeProps(o.guardReactiveProps({row:E,index:O,indent:T,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 O=Ft(o.toRaw(e.columns));const T=l.value[a];if(T){const A=Ft(o.toRaw(e.columns));O=[...T.filter(g=>A.find(S=>S.columnKey===g.columnKey)).map(g=>{const S=A.findIndex(x=>x.columnKey===g.columnKey);return{...A.splice(S,1)[0],show:g.show}}),...A]}u.dataSource=O.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:w,onOk(){l.value[a]=void 0,t("change")}})},p=async()=>{const E=o.toRaw(c.value),{dataSource:O}=u;if(e.hasApiConfig&&e.type==="COLUMN_SETTING"){if(E.length<5){K.message.warn("显示列不能小于 5 项!");return}const g=O.map(S=>({columnKey:S.columnKey,show:E.includes(S.columnKey)}));l.value[a]=g,t("change");return}const{category:T,tab:A}=n.meta,v=E.map(g=>{const S={},N=O.find(x=>x.columnKey===g);if(S.entityId=N.entityId,S.columnKey=N.columnKey,e.type==="SORT_SETTING"){const[x,B]=N.columnKey.split("@");S.columnKey=x,S.sort=B}return S});try{s.value=!0,await My(r,{[xy[e.type]]:v,category:T,label:A}),t("change")}catch(g){console.warn(g)}finally{s.value=!1}},h=()=>i.value=!1,y=({disabled:E,selectedKeys:O,onItemSelectAll:T,onItemSelect:A})=>({getCheckboxProps:v=>({disabled:E||v.disabled}),onSelectAll(v,g){const S=g.filter(N=>!N.disabled).map(({key:N})=>N);T(S,v)},onSelect({key:v},g){A(v,g)},selectedRowKeys:O});let m="",b="";const C=(E,O,T,A)=>({style:{cursor:"move"},onMouseenter:v=>{var S;const g=v||window.event;E.key==="action"||(S=e.columns.find(N=>N.columnKey===E.key))!=null&&S.fixed||(g.target.draggable=!0)},onDragstart:v=>{(v||window.event).stopPropagation(),m=E.key,document.querySelectorAll(".drag-modal-wrapper .source-table .ant-table-row")[O].classList.add("source")},onDragover:v=>{(v||window.event).preventDefault()},onDragenter:v=>{(v||window.event).preventDefault();const S=document.querySelectorAll(".drag-modal-wrapper .ant-table-row");if(u.dataSource[O].disabled)return;const N=document.querySelectorAll(".ant-table-row.target");N.length&&N[0].classList.remove("target"),S[O+(u.dataSource.length-c.value.length)].classList.add("target"),b=E.key},onDrop:v=>{(v||window.event).stopPropagation();const S=document.querySelectorAll(".ant-table-row.target");S.length&&S[0].classList.remove("target");const N=document.querySelectorAll(".ant-table-row.source");if(N.length&&N[0].classList.remove("source"),b===m)return;const x=u.dataSource.slice(),B=x.findIndex(M=>M.key===m),D=x[B];x.splice(B,1);const P=x.findIndex(M=>M.key===b);x.splice(P,0,D),Object.assign(u,{dataSource:x})},onClick:()=>{const{key:v,disabled:g}=E;g||A(v,!T.includes(v))},ondblclick:()=>{const{key:v,disabled:g}=E;if(g)return;const S=c.value.indexOf(v);S>-1?c.value.splice(S,1):c.value.push(v)}}),_=(E,O,T,A)=>({onClick:()=>{const{key:v,disabled:g}=E;g||A(v,!T.includes(v))},ondblclick:()=>{const{key:v,disabled:g}=E;if(g)return;const S=c.value.indexOf(v);S>-1?c.value.splice(S,1):c.value.push(v)}}),w=()=>document.querySelector(".page-renderer-wrapper");return o.watch(i,E=>{E&&o.nextTick(()=>{const O=document.querySelector(".ant-modal-root"),T=O==null?void 0:O.querySelector(".ant-modal-header"),A=O==null?void 0:O.querySelector(".ant-modal");T.style.cursor="move";const v=A.currentStyle||window.getComputedStyle(A,null);T.onmousedown=g=>{const S=g.clientX-T.offsetLeft,N=g.clientY-T.offsetTop;let x,B;v.left.includes("%")?(x=+document.body.clientWidth*(+v.left.replace(/\%/g,"")/100),B=+document.body.clientHeight*(+v.top.replace(/\%/g,"")/100)):(x=+v.left.replace(/\px/g,""),B=+v.top.replace(/\px/g,"")),document.onmousemove=function(D){const P=D.clientX-S,M=D.clientY-N;A.style.left=`${P+x}px`,A.style.top=`${M+B}px`},document.onmouseup=function(){document.onmousemove=null,document.onmouseup=null}}})}),{show:i,loading:s,state:u,toKeys:c,tableColumn:d,handleChange:(E,O,T)=>{const A=E.map(v=>v.split("@")[0]);if(A.length!==kg(A).length){c.value=E.filter(v=>!T.includes(v)),K.message.warn("同一字段不能同时设置升序和降序!");return}},handleReset:f,handleOk:p,customRowRight:C,customRowLeft:_,handleClose:h,getContainer:w,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(b=>!e.toKeys.includes(b.key)):e.state.dataSource.filter(b=>e.toKeys.includes(b.key)),pagination:!1,scroll:{y:300},style:o.normalizeStyle({pointerEvents:h?"none":null}),"custom-row":(b,C)=>f==="left"?e.customRowLeft(b,C,p,m):e.customRowRight(b,C,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 S=r,N=i;return r=i=void 0,u=g,l=e.apply(N,S),l}function m(g,S){return h?(window.cancelAnimationFrame(s),window.requestAnimationFrame(g)):setTimeout(g,S)}function b(g){if(h)return window.cancelAnimationFrame(g);clearTimeout(g)}function C(g){return u=g,s=m($,t),d?y(g):l}function _(g){const S=g-c,N=g-u,x=t-S;return f?Math.min(x,a-N):x}function w(g){const S=g-c,N=g-u;return c===void 0||S>=t||S<0||f&&N>=a}function $(){const g=Date.now();if(w(g))return E(g);s=m($,_(g))}function E(g){return s=void 0,p&&r?y(g):(r=i=void 0,l)}function O(){s!==void 0&&b(s),u=0,r=c=i=s=void 0}function T(){return s===void 0?l:E(Date.now())}function A(){return s!==void 0}function v(){const g=Date.now(),S=w(g);for(var N=arguments.length,x=new Array(N),B=0;B<N;B++)x[B]=arguments[B];if(r=x,i=this,c=g,S){if(s===void 0)return C(c);if(f)return s=m($,t),y(c)}return s===void 0&&(s=m($,t)),l}return v.cancel=O,v.flush=T,v.pending=A,v}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,b=Math.floor(Math.random()*2**Math.min(a.value,m)+y);return h*b}),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"),b={},C=tb({status:m,loading:d,data:f,error:p,params:h},[]),_=function($){for(var E=arguments.length,O=new Array(E>1?E-1:0),T=1;T<E;T++)O[T-1]=arguments[T];if($==="onQuery"){const A=y.value.map(v=>v.onQuery).filter(Boolean);return{servicePromise:nb(A,O[0])()}}else{const A=y.value.map(v=>{var g;return(g=v[$])===null||g===void 0?void 0:g.call(v,...O)});return Object.assign({},...A)}},w=o.ref(0);return b.runAsync=async function(){for(var $=arguments.length,E=new Array($),O=0;O<$;O++)E[O]=arguments[O];C({loading:!0,params:E,status:"pending"}),w.value+=1;const T=w.value,{isBreak:A,breakResult:v=Fr()}=_("onBefore",E);if(A)return C({status:"settled"}),v;c==null||c(E);try{const g=()=>new Promise(x=>x(e(...h.value)));let{servicePromise:S}=_("onQuery",g);S||(S=g());const N=await S;return T!==w.value?Fr():(C({data:N,loading:!1,error:void 0,status:"settled"}),_("onSuccess",N,E),l==null||l(N,E),T===w.value&&_("onAfter",E,N,void 0),u==null||u(E),N)}catch(g){if(T!==w.value)return Fr();throw C({loading:!1,error:g,status:"settled"}),_("onError",g,E),s==null||s(g,E),T===w.value&&_("onAfter",E,void 0,g),u==null||u(E),g}},b.run=function(){b.runAsync(...arguments).catch($=>{s||console.error($)})},b.cancel=()=>{w.value+=1,C({loading:!1}),_("onCancel")},b.refresh=()=>{b.run(...h.value||[])},b.refreshAsync=()=>b.runAsync(...h.value||[]),b.mutate=$=>{const E=xr($)?$(f.value):$,O=Wy(E);C({data:O}),_("onMutate",O)},{status:m,loading:d,data:f,error:p,params:h,plugins:y,context:b}};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=C=>a?a(C):Hy(C),f=(C,_,w)=>{l?l(C,w):Gy(C,_,w),sb(C,w.data)},p=C=>i===-1||C+i>new Date().getTime(),h=(C,_)=>Object.prototype.hasOwnProperty.call(C,_),y=C=>{const _=s(C);return lb(_,w=>{e.data.value=w})},m=s(),b=d(m);return b&&h(b,"data")&&(e.data.value=b.data,e.params.value=b.params),m&&(c.value=y()),o.onUnmounted(()=>{c.value()}),{onBefore(C){const _=s(C),w=d(_);if(!w||!h(w,"data"))return{};if(p(w.time))return e.data.value=w.data,e.loading.value=!1,{isBreak:!0,breakResult:w.data};e.data.value=w.data},onQuery(C){const _=e.params.value,w=s(_);let $=ab(w);return $&&$!==u?()=>$:($=C(),u=$,ib(w,$),()=>$)},onSuccess(C,_){const w=s(_);w&&(c.value(),f(w,r,{data:C,params:_,time:new Date().getTime()}),c.value=y(_))},onMutate(C){const _=s(e.params.value);_&&(c.value(),f(_,r,{data:C,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 b;if(!Xt(c.value)&&c.value>=0)if(p())b=setTimeout(m,c.value);else{s.value=!0;return}return()=>b&&clearTimeout(b)},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=T=>{const[A,...v]=p.value||[],S=[{...A,...T},...v];h(...S)},b=T=>{m({[l]:T})},C=T=>{m({[s]:T})},_=(T,A)=>{m({[l]:T,[s]:A})},w=o.computed(()=>Pa(f.value,c,0)),$=o.computed({get:()=>{var T,A,v;return(T=(A=p.value)===null||A===void 0||(v=A[0])===null||v===void 0?void 0:v[l])!==null&&T!==void 0?T:d.defaultParams[0][l]},set:T=>{b(T)}}),E=o.computed({get:()=>{var T,A,v;return(T=(A=p.value)===null||A===void 0||(v=A[0])===null||v===void 0?void 0:v[s])!==null&&T!==void 0?T:d.defaultParams[0][s]},set:T=>{C(T)}}),O=o.computed(()=>Pa(f.value,u,Math.ceil(w.value/E.value)));return{data:f,params:p,current:$,pageSize:E,total:w,totalPage:O,run:h,changeCurrent:b,changePageSize:C,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),b=o.ref([]),C=o.ref([]),_=o.ref(),w=o.ref(),$=o.ref(),E={导入:w,导出:_},O=o.computed(()=>({COLUMN_SETTING:r.value.fieldShowConfigList,FILTER_SETTING:r.value.fieldFilterConfigList,SORT_SETTING:r.value.fieldSortConfigList})),T=o.ref(),A=o.inject("transformData",(L,k)=>L),v=o.inject("reloadPage",()=>{}),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:S,patchStaticEnumerations:N}=Bn(),x=o.ref(null),B=o.ref(null),D=o.ref(null),P=eo(Ta,{}),M=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(M.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");T.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}`);T.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?C.value.push(L):b.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.warn(`【@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});T.value.run(L)}else{const{category:L,tab:k}=n.meta;T.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=B.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,window.__POWERED_BY_WUJIE__&&v()},Wr=o.computed(()=>M.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});C.value.length>0&&L.unshift({title:"操作",align:"center",columnKey:"action",children:C.value.map(I=>({text:I.children,action:I.action})),width:C.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 S(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;T.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=O.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:!!O.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:T,loaded:m,buttonsConfig:b,exportConfig:_,importConfig:w,summary:d,current:he,pageSize:ue,pageTotal:u,sort:h,tableView:x,conditions:D,summaryBar:B,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 b;const m=(b=e.customEvent)==null?void 0:b[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,S=>{y.value=S}),o.watch(()=>y,S=>{h.value=!!S});const m=o.ref(!1),b=o.inject("actionGuard",null);Dr().interceptors.response.use(S=>{var N,x;if(S.data&&((N=S.data)==null?void 0:N.type)==="string"&&typeof((x=S.data)==null?void 0:x.value)=="string")try{S.data=JSON.parse(S.data.value)}catch{console.warn("response.data is not a json string")}return S}),o.onMounted(()=>{$()});const _=Ke(`/duckbill-data-query-server/table/search/${n.meta.category}`),w=()=>{h.value=!1,o.nextTick(()=>{h.value=!0})},$=async()=>{const{category:S,tab:N}=n.meta;if(!e.options&&S&&N){m.value=!0;try{const x=await _({category:S,tab:N,pageNumber:1,pageSize:100,fetchMode:"ALL",sorts:{},filters:{}});y.value=x.data}catch{K.message.error("页面配置请求失败!")}finally{m.value=!1}}},E={locale:Ib,transformCellText:({text:S,column:N,record:x})=>!N||N.dataIndex==="action"?S:Kt(x[N.dataIndex])||x[N.dataIndex]===""?" - ":S},O=(S,N)=>{var x;(x=s.value)==null||x.open(S,N)};o.provide("materials",(g=e.config)==null?void 0:g.materials),o.provide("previewMediaModalOpen",O),o.provide("tableCellSlots",e.tableCellSlots||{}),o.provide("reloadPage",w),o.provide("emitHandler",(S,N,x)=>{var D,P,M;const B=Ft(N);if(e.form===void 0||!e.form[S]){const R=(D=e.customEvent)==null?void 0:D[S];if(!R)return b?b(S,B):K.message.warn("没有找到自定义事件处理函数"),x==null?void 0:x();try{R(B,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(((M=e.customEvent)==null?void 0:M[S])||(()=>Promise.resolve()))(B,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[S],c.value=p.value.needSelectRows===!1?[]:B,(z=l.value)==null||z.openModal()}).finally(()=>{setTimeout(()=>{x==null||x()},100)})}),Eb();const T=()=>{var S,N;return{basic:(S=r.value)==null?void 0:S.run(),tabs:(N=i.value)==null?void 0:N.run(a.value)}[y.value.type]};return t({run:T,resetSearch:()=>{var S,N;return{basic:(S=r.value)==null?void 0:S.resetSearch(),tabs:(N=i.value)==null?void 0:N.resetSearch(a.value)}[y.value.type]},clearSelect:()=>{var S,N;return{basic:(S=r.value)==null?void 0:S.clearSelect(),tabs:(N=i.value)==null?void 0:N.clearSelect(a.value)}[y.value.type]}}),{run:T,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"}})});
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,"&amp;").replace(/"/g,"&quot;").replace(/'/g,"&#39;").replace(/</g,"&lt;").replace(/>/g,"&gt;"):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,b=c;n.imageInitializing=!1,c*h>s?b=s/h:m=c*h,y=le(y)?y:.9,m=Math.min(m*y,f),b=Math.min(b*y,p);var C=(s-m)/2,_=(c-b)/2,w={left:C,top:_,x:C,y:_,width:m,height:b,oldRatio:1,ratio:m/f,aspectRatio:h,naturalWidth:f,naturalHeight:p},$=be({},w);r.rotatable&&(w.rotate=u.rotate||0,$.rotate=0),r.scalable&&(w.scaleX=u.scaleX||1,w.scaleY=u.scaleY||1,$.scaleX=1,$.scaleY=1),n.imageData=w,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(b){var C=c.getAttribute(b);C!==null&&f.setAttribute(b,C)}),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 C=t.imageData,_=Array.isArray(i.title)?i.title[1]:i.title;a.innerHTML=Js(te(_)?_.call(t,f,C):"".concat(d," (").concat(C.naturalWidth," × ").concat(C.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,b=d.naturalHeight;if(t=Math.max(0,t),le(t)&&this.viewed&&!this.played&&(l||c.zoomable)){if(!l){var C=Math.max(.01,c.minZoomRatio),_=Math.min(100,c.maxZoomRatio);t=Math.min(Math.max(t,C),_)}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 w=m*t,$=b*t,E=w-h,O=$-y,T=d.ratio;if(te(c.zoom)&&Y(s,Do,c.zoom,{once:!0}),fe(s,Do,{ratio:t,oldRatio:T,originalEvent:a})===!1)return this;if(this.zooming=!0,a){var A=tl(this.viewer),v=u&&Object.keys(u).length>0?ol(u):{pageX:a.pageX,pageY:a.pageY};d.x-=E*((v.pageX-A.left-f)/h),d.y-=O*((v.pageY-A.top-p)/y)}else dt(i)&&le(i.x)&&le(i.y)?(d.x-=E*((i.x-f)/h),d.y-=O*((i.y-p)/y)):(d.x-=E/2,d.y-=O/2);d.left=d.x,d.top=d.y,d.width=w,d.height=$,d.oldRatio=T,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:T,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(w){U(l,w)}),r.toolbar){var p=document.createElement("ul"),h=dt(r.toolbar),y=un.slice(0,3),m=un.slice(7,9),b=un.slice(9);h||U(c,dn(r.toolbar)),re(h?r.toolbar:un,function(w,$){var E=h&&dt(w),O=h?tr($):w,T=E&&!ut(w.show)?w.show:w;if(!(!T||!r.zoomable&&y.indexOf(O)!==-1||!r.rotatable&&m.indexOf(O)!==-1||!r.scalable&&b.indexOf(O)!==-1)){var A=E&&!ut(w.size)?w.size:w,v=E&&!ut(w.click)?w.click:w,g=document.createElement("li");r.keyboard&&g.setAttribute("tabindex",0),g.setAttribute("role","button"),U(g,"".concat(G,"-").concat(O)),te(v)||nr(g,cn,O),le(T)&&U(g,dn(T)),["small","large"].indexOf(A)!==-1?U(g,"".concat(G,"-").concat(A)):O==="play"&&U(g,"".concat(G,"-large")),te(v)&&Y(g,ct,v),p.appendChild(g)}}),c.appendChild(p)}else U(c,He);if(!r.rotatable){var C=c.querySelectorAll('li[class*="rotate"]');U(C,At),re(C,function(w){c.appendChild(w)})}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=N=>n("update:show",N),a=o.ref(!1),l=o.ref(null),s={transition:!1,inline:!0,button:!1,toolbar:{rotateLeft:!0,prev:!0,oneToOne:!0,next:!0,rotateRight:!0}},c=o.ref(!1),u=o.ref([]),d=o.ref(0);o.watch([()=>r.imageList,()=>r.imageIndex],()=>{r.imageList&&(u.value=[...r.imageList],d.value=r.imageIndex||0)}),o.watch(()=>r.show,()=>{c.value=r.show});const f=N=>{l.value=N,N.view(d.value)},p=o.ref(null),{x:h,y,isDragging:m}=_s(p),b=o.ref(0),C=o.ref(0),_=o.ref(!1),w=o.ref(0),$=o.ref(0),E=o.ref(0),O=o.ref(0),T=o.ref({left:0,right:0,top:0,bottom:0});o.watch([h,y],()=>{if(!_.value){b.value=h.value,C.value=y.value;const N=document.body.getBoundingClientRect(),x=p.value.getBoundingClientRect();T.value.right=N.width-x.width,T.value.bottom=N.height-x.height,E.value=w.value,O.value=$.value}_.value=!0}),o.watch(m,()=>{m||(_.value=!1)}),o.watchEffect(()=>{_.value&&(w.value=E.value+Math.min(Math.max(T.value.left,h.value),T.value.right)-b.value,$.value=O.value+Math.min(Math.max(T.value.top,y.value),T.value.bottom)-C.value)});const A=o.computed(()=>({transform:`translate(${w.value}px, ${$.value}px)`})),v=(N,x=0,B)=>{B&&(a.value=B),u.value=[...N],d.value=x,c.value=!0},g=()=>{c.value=!1},S=()=>{i(!1)};return t({open:v,close:g}),(N,x)=>(o.openBlock(),o.createBlock(o.unref(K.Modal),{visible:c.value,"onUpdate:visible":x[0]||(x[0]=B=>c.value=B),"destroy-on-close":"",centered:"",width:800,mask:a.value,"mask-closable":!1,"wrap-class-name":"pointer-events-none preview-media-modal","wrap-style":{overflow:"hidden"},footer:null,onOk:g,onCancel:S},{title:o.withCtx(()=>[o.createElementVNode("div",{ref_key:"modalTitleRef",ref:p,style:{width:"100%",cursor:"move"}},[o.createVNode(o.unref(ge.HolderOutlined),{style:{"margin-right":"6px"}}),o.createTextVNode("预览 ")],512)]),modalRender:o.withCtx(({originVNode:B})=>[o.createElementVNode("div",{style:o.normalizeStyle(A.value)},[(o.openBlock(),o.createBlock(o.resolveDynamicComponent(B)))],4)]),default:o.withCtx(()=>[o.createVNode(o.unref(bu),{options:s,images:u.value,onInited:f},{default:o.withCtx(B=>[o.createElementVNode("div",wu,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(B.images,D=>(o.openBlock(),o.createElementBlock("img",{style:{opacity:"0"},src:D,key:D},null,8,vu))),128))])]),_:1},8,["images"])]),_:1},8,["visible","mask"]))}}),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){var r;const t=o.createApp(e),n=document.createElement("div");return(r=document.querySelector("body"))==null||r.appendChild(n),{instance:t.mount(n),unmount(){var i;t.unmount(),(i=document.querySelector("body"))==null||i.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,n){return Eu?(bn||Au(),bn.open({imageList:e,imageIndex:t,mask:n}),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",b=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,C=/\[([^\]]+)]|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(B){var D=["th","st","nd","rd"],P=B%100;return"["+B+(D[(P-20)%10]||D[P]||D[0])+"]"}},w=function(B,D,P){var M=String(B);return!M||M.length>=D?B:""+Array(D+1-M.length).join(P)+B},$={s:w,z:function(B){var D=-B.utcOffset(),P=Math.abs(D),M=Math.floor(P/60),R=P%60;return(D<=0?"+":"-")+w(M,2,"0")+":"+w(R,2,"0")},m:function B(D,P){if(D.date()<P.date())return-B(P,D);var M=12*(P.year()-D.year())+(P.month()-D.month()),R=D.clone().add(M,f),V=P-R<0,z=D.clone().add(M+(V?-1:1),f);return+(-(M+(P-R)/(V?R-z:z-R))||0)},a:function(B){return B<0?Math.ceil(B)||0:Math.floor(B)},p:function(B){return{M:f,y:h,w:d,d:u,D:y,h:c,m:s,s:l,ms:a,Q:p}[B]||String(B||"").toLowerCase().replace(/s$/,"")},u:function(B){return B===void 0}},E="en",O={};O[E]=_;var T="$isDayjsObject",A=function(B){return B instanceof N||!(!B||!B[T])},v=function B(D,P,M){var R;if(!D)return E;if(typeof D=="string"){var V=D.toLowerCase();O[V]&&(R=V),P&&(O[V]=P,R=V);var z=D.split("-");if(!R&&z.length>1)return B(z[0])}else{var q=D.name;O[q]=D,R=q}return!M&&R&&(E=R),R||!M&&E},g=function(B,D){if(A(B))return B.clone();var P=typeof D=="object"?D:{};return P.date=B,P.args=arguments,new N(P)},S=$;S.l=v,S.i=A,S.w=function(B,D){return g(B,{locale:D.$L,utc:D.$u,x:D.$x,$offset:D.$offset})};var N=function(){function B(P){this.$L=v(P.locale,null,!0),this.parse(P),this.$x=this.$x||P.x||{},this[T]=!0}var D=B.prototype;return D.parse=function(P){this.$d=function(M){var R=M.date,V=M.utc;if(R===null)return new Date(NaN);if(S.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(b);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 S},D.isValid=function(){return this.$d.toString()!==m},D.isSame=function(P,M){var R=g(P);return this.startOf(M)<=R&&R<=this.endOf(M)},D.isAfter=function(P,M){return g(P)<this.startOf(M)},D.isBefore=function(P,M){return this.endOf(M)<g(P)},D.$g=function(P,M,R){return S.u(P)?this[M]:this.set(R,P)},D.unix=function(){return Math.floor(this.valueOf()/1e3)},D.valueOf=function(){return this.$d.getTime()},D.startOf=function(P,M){var R=this,V=!!S.u(M)||M,z=S.p(P),q=function(ve,de){var Ce=S.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 S.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,M){var R,V=S.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+(M-this.$W):M;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,M){return this.clone().$set(P,M)},D.get=function(P){return this[S.p(P)]()},D.add=function(P,M){var R,V=this;P=Number(P);var z=S.p(M),q=function(se){var ue=g(V);return S.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 S.w(J,this)},D.subtract=function(P,M){return this.add(-1*P,M)},D.format=function(P){var M=this,R=this.$locale();if(!this.isValid())return R.invalidDate||m;var V=P||"YYYY-MM-DDTHH:mm:ssZ",z=S.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(M,V))||_e[Ce].slice(0,Ie)},Oe=function(de){return S.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(C,function(de,Ce){return Ce||function(_e){switch(_e){case"YY":return String(M.$y).slice(-2);case"YYYY":return S.s(M.$y,4,"0");case"M":return J+1;case"MM":return S.s(J+1,2,"0");case"MMM":return me(R.monthsShort,J,ue,3);case"MMMM":return me(ue,J);case"D":return M.$D;case"DD":return S.s(M.$D,2,"0");case"d":return String(M.$W);case"dd":return me(R.weekdaysMin,M.$W,se,2);case"ddd":return me(R.weekdaysShort,M.$W,se,3);case"dddd":return se[M.$W];case"H":return String(q);case"HH":return S.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 S.s(Q,2,"0");case"s":return String(M.$s);case"ss":return S.s(M.$s,2,"0");case"SSS":return S.s(M.$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,M,R){var V,z=this,q=S.p(M),Q=g(P),J=(Q.utcOffset()-this.utcOffset())*r,se=this-Q,ue=function(){return S.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:S.a(V)},D.daysInMonth=function(){return this.endOf(f).$D},D.$locale=function(){return O[this.$L]},D.locale=function(P,M){if(!P)return this.$L;var R=this.clone(),V=v(P,M,!0);return V&&(R.$L=V),R},D.clone=function(){return S.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()},B}(),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(B){x[B[1]]=function(D){return this.$g(D,B[0],B[1])}}),g.extend=function(B,D){return B.$i||(B(D,N,g),B.$i=!0),g},g.locale=v,g.isDayjs=A,g.unix=function(B){return g(1e3*B)},g.en=O[E],g.Ls=O,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(b){l.add(Nn(b,t,n,b,e,a))}):Eh(e)&&e.forEach(function(b,C){l.set(C,Nn(b,t,n,C,e,a))});var y=u?c?Gi:Tr:c?vr:wt,m=d?void 0:y(e);return kf(m||e,function(b,C){m&&(C=b,b=e[C]),gr(l,C,Nn(b,t,n,C,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 b=l?r(m,y,f,t,e,a):r(y,m,f,e,t,a);if(b!==void 0){if(b)continue;p=!1;break}if(h){if(!im(t,function(C,_){if(!sa(h,_)&&(y===C||i(y,C,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 b=l;++f<c;){p=s[f];var C=e[p],_=t[p];if(r)var w=l?r(_,C,p,t,e,a):r(C,_,p,e,t,a);if(!(w===void 0?C===_||i(C,_,n,r,a):w)){m=!1;break}b||(b=p=="constructor")}if(m&&!b){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,b=y?t.value():t;return a||(a=new Re),i(m,b,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(O){var T=r,A=i;return r=i=void 0,u=O,l=e.apply(A,T),l}function y(O){return u=O,s=setTimeout(C,t),d?h(O):l}function m(O){var T=O-c,A=O-u,v=t-T;return f?ng(v,a-A):v}function b(O){var T=O-c,A=O-u;return c===void 0||T>=t||T<0||f&&A>=a}function C(){var O=Nr();if(b(O))return _(O);s=setTimeout(C,m(O))}function _(O){return s=void 0,p&&r?h(O):(r=i=void 0,l)}function w(){s!==void 0&&clearTimeout(s),u=0,r=c=i=s=void 0}function $(){return s===void 0?l:_(Nr())}function E(){var O=Nr(),T=b(O);if(r=arguments,i=this,c=O,T){if(s===void 0)return y(c);if(f)return clearTimeout(s),s=setTimeout(C,t),h(c)}return s===void 0&&(s=setTimeout(C,t)),l}return E.cancel=w,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 b=kn(u,y||"data"),C=_=>{Object.prototype.toString.call(_)==="[object Array]"?h==="Cascader"?e[i[c]]=_.map(w=>Rr(w,{[f||"value"]:"value",[d||"label"]:"label",[p||"children"]:"children"})):e[i[c]]=[...o.toRaw(e[i[c]]||[]),..._.map(w=>{let $=w[d];return Ca.test(d)&&($=d.replace(Ca,(E,O)=>w[O])),{...m?{group:w[m]}:{},label:$,value:w[f]}})]:Object.prototype.toString.call(_)==="[object Object]"&&Object.keys(_).forEach(w=>{C(_[w])})};C(b)}}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:O,...T}=E;try{const A=JSON.parse(O);return{...T,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,O;return((O=i[h])==null?void 0:O.filter((E=r.value.filterGroups)!=null&&E.length?T=>p.includes(T.group):()=>!0))||[]}),m=o.ref([]),b=Ke(r.value.filterUrl||`/duckbill-data-query-server/table/column/${r.value.filterKey}`,r.value.filterMethod||"post"),C=o.inject("transformFuzzy",{})[r.value.fieldName],_=(E,O)=>{var A;const T=r.value.filterKey||"label";return O[T]||console.warn(`not found key 【${T}】 in option`),((A=O[T])==null?void 0:A.indexOf(E.toString()))>-1},w=o.computed(()=>{switch(r.value.type){case Br:return ma(async function(E){const O=Ir({conditions:r.value.fuzzyCode?{key:E,code:r.value.fuzzyCode}:E,apiConfig:{conditionKey:r.value.conditionKey||"params",metaKey:r.value.metaKey}}),T=await b(O),A=C?C(T):T;m.value=A},200);case Mn:return ma(async function(E){const{category:O,tab:T}=n.meta,A=await b({sliceNumber:"50",category:O,tab:T,code:E});r.value.fuzzyMatch?m.value=A.data.map(v=>({value:v,label:v})):m.value=A.data.map(v=>({value:v.id,label:v.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:w.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(_)})},b=_=>_.label.slice(0,10);o.watch(u,()=>t("changeExpand"));const C=o.computed(()=>u.value||!c.value?(6-a.value.length%6)*4:24);return n({resetFields:p}),{expand:u,pageName:s,formState:d,serachSpan:C,validateInfos:y,showAvailiableTrigger:c,AVAILIABLE_EXPAND_LINE:3,CONDITION_COUNT_PER_LINE:6,onSubmit:m,getItemLabel:b}}});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,b)=>{var C;return o.withDirectives((o.openBlock(),o.createBlock(c,{key:m.fieldName,span:((C=m.otherProps)==null?void 0:C.span)||4,class:"conditions-item-col"},{default:o.withCtx(()=>{var _,w;return[o.createVNode(s,o.mergeProps(e.validateInfos[m.fieldName],{colon:!1,"label-col":(_=m.otherProps)==null?void 0:_.labelCol,"wrapper-col":(w=m.otherProps)==null?void 0:w.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||b<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 O,T,A,v;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,S)=>{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,S)},h=o.computed({get:()=>n.value,set:g=>t("update:current",g)}),y=o.computed({get:()=>r.value,set:g=>{const S=Math.ceil(e.total/g);h.value>S&&(h.value=S),t("update:pageSize",g)}}),m=o.inject("paramsGuard",g=>g),b=(O=i.value)!=null&&O.url?Ke((T=i.value)==null?void 0:T.url,"post",{responseType:"blob",...i.value.requestOptions}):null,C=(v=(A=a.value)==null?void 0:A.children)!=null&&v.length?a.value.children.map(g=>Ke(g.url,"post",{...g.requestOptions})):[],_=async()=>{var N;const{formState:g}=Ut(),S=i.value?Ir({conditions:o.toRaw(g[u]),apiConfig:i.value}):{};m(S,u);try{s.value=!0;const x=await b(S);if(!x)return;const B=/\{\{(.+?)\}\}/g;let D=((N=i.value)==null?void 0:N.fileName)||"",P=null;for(;(P=B.exec(D))!==null;)P[1]==="Date"&&(D=D.replace(P[0],fi().format("YYYY-MM-DD")));const M=document.createElement("a"),R=window.URL.createObjectURL(new Blob([x]));if(M.href=R,M.download=D,document.body.appendChild(M),M.click(),document.body.removeChild(M),window.URL.revokeObjectURL(R),i.value.needFeedback===!1)return;K.message.success("导出成功")}catch(x){console.warn("export error: ",x)}finally{s.value=!1}},w=({url:g,type:S})=>{switch(S){case"TEMPLATE_LOCAL":window.open(g);break}},$=async({accept:g},S)=>{const N=/^\.[a-zA-Z]+$/,x=g==null?void 0:g.reduce((P,M)=>{if(!N.test(M))throw`请提供正确的文件后缀名,是否是 【.${M}】 ?`;return P[Kg[M]]=[M],P},{}),[B]=await window.showOpenFilePicker({types:[{accept:x}]}),D=await B.getFile();if(D){const P=C[S],M=new FormData;M.append("file",D),c.value=!0,P(M).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,S)=>{const{type:N}=g;if(["TEMPLATE_LOCAL"].includes(N)){w(g);return}if(["IMPORT"].includes(N)){$(g,S);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"),b=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,(C,_)=>o.withDirectives((o.openBlock(),o.createBlock(o.resolveDynamicComponent(C.type),o.mergeProps(C.otherProps,{key:`${C.type}${_}`,onClick:w=>e.handleButtonClick(C,w)}),o.createSlots({overlay:o.withCtx(()=>[o.createVNode(c,null,{default:o.withCtx(()=>[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(C.sublist,w=>(o.openBlock(),o.createBlock(s,{key:w.action,onClick:$=>e.handleButtonClick(w,$)},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(w.children),1)]),_:2},1032,["onClick"]))),128))]),_:2},1024)]),default:o.withCtx(()=>[o.createTextVNode(" "+o.toDisplayString(C.children)+" ",1)]),_:2},[C.iconType?{name:"icon",fn:o.withCtx(()=>[o.createVNode(l,{type:C.iconType},null,8,["type"])]),key:"0"}:void 0]),1040,["onClick"])),[[b,C.permissions]])),128))]),_:1})]),o.createElementVNode("div",null,[o.createVNode(u,null,{default:o.withCtx(()=>{var C,_;return[e.hasApiConfig?(o.openBlock(),o.createElementBlock(o.Fragment,{key:0},[(C=e.importConfig)!=null&&C.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,(w,$)=>(o.openBlock(),o.createBlock(s,{key:$,onClick:()=>e.handleImport(w,$)},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(w.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,(w,$)=>(o.openBlock(),o.createBlock(s,{key:$,onClick:()=>e.handleImport(w,$)},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(w.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]=w=>e.handleExport(w.key))},{default:o.withCtx(()=>[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(e.OPERATIONS_EXPORT_MAP,(w,$)=>(o.openBlock(),o.createBlock(s,{key:$},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(w),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]=w=>e.computed_current=w),pageSize:e.computed_pageSize,"onUpdate:pageSize":t[3]||(t[3]=w=>e.computed_pageSize=w),size:"small",simple:"",total:e.total},null,8,["current","pageSize","total"]),o.createVNode(y,{value:e.computed_pageSize,"onUpdate:value":t[4]||(t[4]=w=>e.computed_pageSize=w),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]=w=>e.$emit("customizeSetting",w.key))},{default:o.withCtx(()=>[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(e.hasApiConfig?e.API_CONFIG_SETTINGS_MAP:e.SETTINGS_MAP,(w,$)=>(o.openBlock(),o.createBlock(s,{key:$},{default:o.withCtx(()=>[o.createVNode(m,{style:{"margin-right":"4px"}}),o.createElementVNode("a",Xg,o.toDisplayString(w),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 b=kn(y,`${n.value.dataKey}.${m}`);u[m]=Kt(b)?" - ":b})}).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),b=m.length,C=e,_=C.c=[],w=0,$=l+(C.e=t.e-e.e)+1;for(C.s=a,a=$<0?0:$,p.unshift(0);b++<s;)m.push(0);do{for(u=0;u<10;u++){if(s!=(b=m.length))d=s>b?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=b==s?i:p;b;){if(m[--b]<c[b]){for(f=b;f&&!m[--f];)m[f]=9;--m[f],m[b]+=10}m[b]-=c[b]}for(;!m[0];)m.shift()}else break}_[w++]=d?u:++u,m[0]&&d?m[b]=r[h]||0:m=[r[h]]}while((h++<y||m[0]!==Be)&&a--);return!_[0]&&w!=1&&(_.shift(),C.e--,$--),w>$&&nt(C,$,n.RM,m[0]!==Be),C},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",""),b=o.inject("emitHandler",()=>{}),C=o.ref(e.sort||{});let _=!1;const w=k=>{n("update:sort",k),_&&(_=!1)},$=k=>{w(k),n("search")};o.watch(()=>e.defaultSort,k=>{_=!0,C.value=k}),o.watch(C,(k,F)=>{const I=Object.keys(k)[0];if(I){const j=c.value.find(W=>W.columnKey===I);j!=null&&j.sortable&&(_?w(C.value):$(C.value))}else{const j=Object.keys(F)[0];if(j){const W=c.value.find(ee=>ee.columnKey===j);W!=null&&W.sortable&&(_?w(C.value):$(C.value))}}});const E=o.ref([]),O=o.ref([]),T=o.ref([]),A=o.ref([]),v=o.ref({}),g=o.ref([]),{selectedRows:S,selectedRowKeys:N,selectedErrorRowKeys:x}=Yt();x[m]||(x[m]=[]);const B=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),M=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,S[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,S[m]=Jt.value.filter(W=>I.includes(W[j]))},me=k=>({onclick:()=>he(k),onDblclick:()=>{e.rowDblclickAction&&b(e.rowDblclickAction,[k])}}),Oe=o.computed(()=>{var I;let k=a.value;B.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"&&O.value.push(j),ee==="slot"&&T.value.push(j),ee==="img"&&A.value.push(j),ee==="map"&&Ae&&(v.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[C.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?C.value={[I.columnKey]:wy[I.order]}:C.value={})},Ur=()=>{C.value=e.defaultSort},Zt=o.computed(()=>Object.keys(v.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(v.value[W].refEnumLabel){const Ye=(xe=(ee=i[v.value[W].refEnum])==null?void 0:ee.find(ot=>{var We,Yn;return((We=ot.id)==null?void 0:We.toString())===((Yn=I[v.value[W].refEnum])==null?void 0:Yn.toString())}))==null?void 0:xe[v.value[W].refEnumLabel];j[Ht][W]=Ye}else j[Ht][W]=(Ue=(Ae=i[v.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:O,slotCellKeys:T,imgCellKeys:A,tableCellSlots:M,selectedRows:S,selectedRowKeys:N,selectedErrorRowKeys:x,showSelectionSummaryRow:B,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"),b=o.resolveComponent("a-table-summary-cell"),C=o.resolveComponent("a-table-summary-row"),_=o.resolveComponent("a-table-summary"),w=o.resolveComponent("Table");return o.openBlock(),o.createElementBlock("div",Ey,[o.createVNode(w,{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,O)=>`${O%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 O;return[E.key===e.DATA_SOURCE_INDEX_KEY?(o.openBlock(),o.createElementBlock("div",{key:0,onClick:t[0]||(t[0]=(...T)=>e.headerFilterSwitch&&e.headerFilterSwitch(...T))},[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)),(O=E.key)!=null&&O.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":T=>e.formState[e.pageName][E.dataIndex]=T,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":T=>e.formState[e.pageName][E.dataIndex]=T,onChange:e.onHeaderFilterChange,onPressEnter:e.onSubmit},null,8,["value","onUpdate:value","onChange","onPressEnter"]))])):o.createCommentVNode("",!0)]))]}),bodyCell:o.withCtx(({text:E,record:O,index:T,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,v=>(o.openBlock(),o.createElementBlock(o.Fragment,{key:v.action},[v.show===void 0||e.actionVisible(v.show,O)?(o.openBlock(),o.createElementBlock(o.Fragment,{key:0},[O[e.LOADING_SIGN][`${v.action}Loading`]?(o.openBlock(),o.createBlock(f,{key:1,style:{color:"#1890ff"}})):(o.openBlock(),o.createElementBlock("a",{key:0,onClick:o.withModifiers(g=>{v.disabled&&e.actionVisible(v.disabled,O)||e.handleLinkClick(O,A,g,v.action)},["stop"]),class:o.normalizeClass({"ant-table-action-disabled":v.disabled&&e.actionVisible(v.disabled,O)}),style:o.normalizeStyle({color:v.color})},[v.icon?(o.openBlock(),o.createBlock(d,{key:0,type:v.icon},null,8,["type"])):o.createCommentVNode("",!0),o.createTextVNode(" "+o.toDisplayString(v.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:O,index:T,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:O,copyable:A.copyable,column:A,loading:O[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(C,{class:"table-summary-selection"},{default:o.withCtx(()=>[o.createVNode(b,{index:0},{default:o.withCtx(()=>[$y]),_:1}),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(e.columns,(E,O)=>(o.openBlock(),o.createBlock(b,{key:E.key,index:O+1,style:{"text-align":"center"}},{default:o.withCtx(()=>[O===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(C,{key:0},{default:o.withCtx(()=>[o.createVNode(b,{index:0},{default:o.withCtx(()=>[Iy]),_:1}),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(e.totalList,(E,O)=>(o.openBlock(),o.createBlock(b,{key:O,index:O+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:O,indent:T,expanded:A})=>[(o.openBlock(),o.createBlock(o.resolveDynamicComponent(e.tableProps.expandedRowRender.component),o.normalizeProps(o.guardReactiveProps({row:E,index:O,indent:T,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 O=Ft(o.toRaw(e.columns));const T=l.value[a];if(T){const A=Ft(o.toRaw(e.columns));O=[...T.filter(g=>A.find(S=>S.columnKey===g.columnKey)).map(g=>{const S=A.findIndex(x=>x.columnKey===g.columnKey);return{...A.splice(S,1)[0],show:g.show}}),...A]}u.dataSource=O.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:w,onOk(){l.value[a]=void 0,t("change")}})},p=async()=>{const E=o.toRaw(c.value),{dataSource:O}=u;if(e.hasApiConfig&&e.type==="COLUMN_SETTING"){if(E.length<5){K.message.warn("显示列不能小于 5 项!");return}const g=O.map(S=>({columnKey:S.columnKey,show:E.includes(S.columnKey)}));l.value[a]=g,t("change");return}const{category:T,tab:A}=n.meta,v=E.map(g=>{const S={},N=O.find(x=>x.columnKey===g);if(S.entityId=N.entityId,S.columnKey=N.columnKey,e.type==="SORT_SETTING"){const[x,B]=N.columnKey.split("@");S.columnKey=x,S.sort=B}return S});try{s.value=!0,await My(r,{[xy[e.type]]:v,category:T,label:A}),t("change")}catch(g){console.warn(g)}finally{s.value=!1}},h=()=>i.value=!1,y=({disabled:E,selectedKeys:O,onItemSelectAll:T,onItemSelect:A})=>({getCheckboxProps:v=>({disabled:E||v.disabled}),onSelectAll(v,g){const S=g.filter(N=>!N.disabled).map(({key:N})=>N);T(S,v)},onSelect({key:v},g){A(v,g)},selectedRowKeys:O});let m="",b="";const C=(E,O,T,A)=>({style:{cursor:"move"},onMouseenter:v=>{var S;const g=v||window.event;E.key==="action"||(S=e.columns.find(N=>N.columnKey===E.key))!=null&&S.fixed||(g.target.draggable=!0)},onDragstart:v=>{(v||window.event).stopPropagation(),m=E.key,document.querySelectorAll(".drag-modal-wrapper .source-table .ant-table-row")[O].classList.add("source")},onDragover:v=>{(v||window.event).preventDefault()},onDragenter:v=>{(v||window.event).preventDefault();const S=document.querySelectorAll(".drag-modal-wrapper .ant-table-row");if(u.dataSource[O].disabled)return;const N=document.querySelectorAll(".ant-table-row.target");N.length&&N[0].classList.remove("target"),S[O+(u.dataSource.length-c.value.length)].classList.add("target"),b=E.key},onDrop:v=>{(v||window.event).stopPropagation();const S=document.querySelectorAll(".ant-table-row.target");S.length&&S[0].classList.remove("target");const N=document.querySelectorAll(".ant-table-row.source");if(N.length&&N[0].classList.remove("source"),b===m)return;const x=u.dataSource.slice(),B=x.findIndex(M=>M.key===m),D=x[B];x.splice(B,1);const P=x.findIndex(M=>M.key===b);x.splice(P,0,D),Object.assign(u,{dataSource:x})},onClick:()=>{const{key:v,disabled:g}=E;g||A(v,!T.includes(v))},ondblclick:()=>{const{key:v,disabled:g}=E;if(g)return;const S=c.value.indexOf(v);S>-1?c.value.splice(S,1):c.value.push(v)}}),_=(E,O,T,A)=>({onClick:()=>{const{key:v,disabled:g}=E;g||A(v,!T.includes(v))},ondblclick:()=>{const{key:v,disabled:g}=E;if(g)return;const S=c.value.indexOf(v);S>-1?c.value.splice(S,1):c.value.push(v)}}),w=()=>document.querySelector(".page-renderer-wrapper");return o.watch(i,E=>{E&&o.nextTick(()=>{const O=document.querySelector(".ant-modal-root"),T=O==null?void 0:O.querySelector(".ant-modal-header"),A=O==null?void 0:O.querySelector(".ant-modal");T.style.cursor="move";const v=A.currentStyle||window.getComputedStyle(A,null);T.onmousedown=g=>{const S=g.clientX-T.offsetLeft,N=g.clientY-T.offsetTop;let x,B;v.left.includes("%")?(x=+document.body.clientWidth*(+v.left.replace(/\%/g,"")/100),B=+document.body.clientHeight*(+v.top.replace(/\%/g,"")/100)):(x=+v.left.replace(/\px/g,""),B=+v.top.replace(/\px/g,"")),document.onmousemove=function(D){const P=D.clientX-S,M=D.clientY-N;A.style.left=`${P+x}px`,A.style.top=`${M+B}px`},document.onmouseup=function(){document.onmousemove=null,document.onmouseup=null}}})}),{show:i,loading:s,state:u,toKeys:c,tableColumn:d,handleChange:(E,O,T)=>{const A=E.map(v=>v.split("@")[0]);if(A.length!==kg(A).length){c.value=E.filter(v=>!T.includes(v)),K.message.warn("同一字段不能同时设置升序和降序!");return}},handleReset:f,handleOk:p,customRowRight:C,customRowLeft:_,handleClose:h,getContainer:w,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(b=>!e.toKeys.includes(b.key)):e.state.dataSource.filter(b=>e.toKeys.includes(b.key)),pagination:!1,scroll:{y:300},style:o.normalizeStyle({pointerEvents:h?"none":null}),"custom-row":(b,C)=>f==="left"?e.customRowLeft(b,C,p,m):e.customRowRight(b,C,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 S=r,N=i;return r=i=void 0,u=g,l=e.apply(N,S),l}function m(g,S){return h?(window.cancelAnimationFrame(s),window.requestAnimationFrame(g)):setTimeout(g,S)}function b(g){if(h)return window.cancelAnimationFrame(g);clearTimeout(g)}function C(g){return u=g,s=m($,t),d?y(g):l}function _(g){const S=g-c,N=g-u,x=t-S;return f?Math.min(x,a-N):x}function w(g){const S=g-c,N=g-u;return c===void 0||S>=t||S<0||f&&N>=a}function $(){const g=Date.now();if(w(g))return E(g);s=m($,_(g))}function E(g){return s=void 0,p&&r?y(g):(r=i=void 0,l)}function O(){s!==void 0&&b(s),u=0,r=c=i=s=void 0}function T(){return s===void 0?l:E(Date.now())}function A(){return s!==void 0}function v(){const g=Date.now(),S=w(g);for(var N=arguments.length,x=new Array(N),B=0;B<N;B++)x[B]=arguments[B];if(r=x,i=this,c=g,S){if(s===void 0)return C(c);if(f)return s=m($,t),y(c)}return s===void 0&&(s=m($,t)),l}return v.cancel=O,v.flush=T,v.pending=A,v}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,b=Math.floor(Math.random()*2**Math.min(a.value,m)+y);return h*b}),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"),b={},C=tb({status:m,loading:d,data:f,error:p,params:h},[]),_=function($){for(var E=arguments.length,O=new Array(E>1?E-1:0),T=1;T<E;T++)O[T-1]=arguments[T];if($==="onQuery"){const A=y.value.map(v=>v.onQuery).filter(Boolean);return{servicePromise:nb(A,O[0])()}}else{const A=y.value.map(v=>{var g;return(g=v[$])===null||g===void 0?void 0:g.call(v,...O)});return Object.assign({},...A)}},w=o.ref(0);return b.runAsync=async function(){for(var $=arguments.length,E=new Array($),O=0;O<$;O++)E[O]=arguments[O];C({loading:!0,params:E,status:"pending"}),w.value+=1;const T=w.value,{isBreak:A,breakResult:v=Fr()}=_("onBefore",E);if(A)return C({status:"settled"}),v;c==null||c(E);try{const g=()=>new Promise(x=>x(e(...h.value)));let{servicePromise:S}=_("onQuery",g);S||(S=g());const N=await S;return T!==w.value?Fr():(C({data:N,loading:!1,error:void 0,status:"settled"}),_("onSuccess",N,E),l==null||l(N,E),T===w.value&&_("onAfter",E,N,void 0),u==null||u(E),N)}catch(g){if(T!==w.value)return Fr();throw C({loading:!1,error:g,status:"settled"}),_("onError",g,E),s==null||s(g,E),T===w.value&&_("onAfter",E,void 0,g),u==null||u(E),g}},b.run=function(){b.runAsync(...arguments).catch($=>{s||console.error($)})},b.cancel=()=>{w.value+=1,C({loading:!1}),_("onCancel")},b.refresh=()=>{b.run(...h.value||[])},b.refreshAsync=()=>b.runAsync(...h.value||[]),b.mutate=$=>{const E=xr($)?$(f.value):$,O=Wy(E);C({data:O}),_("onMutate",O)},{status:m,loading:d,data:f,error:p,params:h,plugins:y,context:b}};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=C=>a?a(C):Hy(C),f=(C,_,w)=>{l?l(C,w):Gy(C,_,w),sb(C,w.data)},p=C=>i===-1||C+i>new Date().getTime(),h=(C,_)=>Object.prototype.hasOwnProperty.call(C,_),y=C=>{const _=s(C);return lb(_,w=>{e.data.value=w})},m=s(),b=d(m);return b&&h(b,"data")&&(e.data.value=b.data,e.params.value=b.params),m&&(c.value=y()),o.onUnmounted(()=>{c.value()}),{onBefore(C){const _=s(C),w=d(_);if(!w||!h(w,"data"))return{};if(p(w.time))return e.data.value=w.data,e.loading.value=!1,{isBreak:!0,breakResult:w.data};e.data.value=w.data},onQuery(C){const _=e.params.value,w=s(_);let $=ab(w);return $&&$!==u?()=>$:($=C(),u=$,ib(w,$),()=>$)},onSuccess(C,_){const w=s(_);w&&(c.value(),f(w,r,{data:C,params:_,time:new Date().getTime()}),c.value=y(_))},onMutate(C){const _=s(e.params.value);_&&(c.value(),f(_,r,{data:C,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 b;if(!Xt(c.value)&&c.value>=0)if(p())b=setTimeout(m,c.value);else{s.value=!0;return}return()=>b&&clearTimeout(b)},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=T=>{const[A,...v]=p.value||[],S=[{...A,...T},...v];h(...S)},b=T=>{m({[l]:T})},C=T=>{m({[s]:T})},_=(T,A)=>{m({[l]:T,[s]:A})},w=o.computed(()=>Pa(f.value,c,0)),$=o.computed({get:()=>{var T,A,v;return(T=(A=p.value)===null||A===void 0||(v=A[0])===null||v===void 0?void 0:v[l])!==null&&T!==void 0?T:d.defaultParams[0][l]},set:T=>{b(T)}}),E=o.computed({get:()=>{var T,A,v;return(T=(A=p.value)===null||A===void 0||(v=A[0])===null||v===void 0?void 0:v[s])!==null&&T!==void 0?T:d.defaultParams[0][s]},set:T=>{C(T)}}),O=o.computed(()=>Pa(f.value,u,Math.ceil(w.value/E.value)));return{data:f,params:p,current:$,pageSize:E,total:w,totalPage:O,run:h,changeCurrent:b,changePageSize:C,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),b=o.ref([]),C=o.ref([]),_=o.ref(),w=o.ref(),$=o.ref(),E={导入:w,导出:_},O=o.computed(()=>({COLUMN_SETTING:r.value.fieldShowConfigList,FILTER_SETTING:r.value.fieldFilterConfigList,SORT_SETTING:r.value.fieldSortConfigList})),T=o.ref(),A=o.inject("transformData",(L,k)=>L),v=o.inject("reloadPage",()=>{}),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:S,patchStaticEnumerations:N}=Bn(),x=o.ref(null),B=o.ref(null),D=o.ref(null),P=eo(Ta,{}),M=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(M.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");T.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}`);T.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?C.value.push(L):b.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.warn(`【@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});T.value.run(L)}else{const{category:L,tab:k}=n.meta;T.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=B.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,window.__POWERED_BY_WUJIE__&&setTimeout(()=>{v()},500)},Wr=o.computed(()=>M.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});C.value.length>0&&L.unshift({title:"操作",align:"center",columnKey:"action",children:C.value.map(I=>({text:I.children,action:I.action})),width:C.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 S(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;T.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=O.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:!!O.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:T,loaded:m,buttonsConfig:b,exportConfig:_,importConfig:w,summary:d,current:he,pageSize:ue,pageTotal:u,sort:h,tableView:x,conditions:D,summaryBar:B,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 b;const m=(b=e.customEvent)==null?void 0:b[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,S=>{y.value=S}),o.watch(()=>y,S=>{h.value=!!S});const m=o.ref(!1),b=o.inject("actionGuard",null);Dr().interceptors.response.use(S=>{var N,x;if(S.data&&((N=S.data)==null?void 0:N.type)==="string"&&typeof((x=S.data)==null?void 0:x.value)=="string")try{S.data=JSON.parse(S.data.value)}catch{console.warn("response.data is not a json string")}return S}),o.onMounted(()=>{$()});const _=Ke(`/duckbill-data-query-server/table/search/${n.meta.category}`),w=()=>{h.value=!1,o.nextTick(()=>{h.value=!0})},$=async()=>{const{category:S,tab:N}=n.meta;if(!e.options&&S&&N){m.value=!0;try{const x=await _({category:S,tab:N,pageNumber:1,pageSize:100,fetchMode:"ALL",sorts:{},filters:{}});y.value=x.data}catch{K.message.error("页面配置请求失败!")}finally{m.value=!1}}},E={locale:Ib,transformCellText:({text:S,column:N,record:x})=>!N||N.dataIndex==="action"?S:Kt(x[N.dataIndex])||x[N.dataIndex]===""?" - ":S},O=(S,N)=>{var x;(x=s.value)==null||x.open(S,N)};o.provide("materials",(g=e.config)==null?void 0:g.materials),o.provide("previewMediaModalOpen",O),o.provide("tableCellSlots",e.tableCellSlots||{}),o.provide("reloadPage",w),o.provide("emitHandler",(S,N,x)=>{var D,P,M;const B=Ft(N);if(e.form===void 0||!e.form[S]){const R=(D=e.customEvent)==null?void 0:D[S];if(!R)return b?b(S,B):K.message.warn("没有找到自定义事件处理函数"),x==null?void 0:x();try{R(B,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(((M=e.customEvent)==null?void 0:M[S])||(()=>Promise.resolve()))(B,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[S],c.value=p.value.needSelectRows===!1?[]:B,(z=l.value)==null||z.openModal()}).finally(()=>{setTimeout(()=>{x==null||x()},100)})}),Eb();const T=()=>{var S,N;return{basic:(S=r.value)==null?void 0:S.run(),tabs:(N=i.value)==null?void 0:N.run(a.value)}[y.value.type]};return t({run:T,resetSearch:()=>{var S,N;return{basic:(S=r.value)==null?void 0:S.resetSearch(),tabs:(N=i.value)==null?void 0:N.resetSearch(a.value)}[y.value.type]},clearSelect:()=>{var S,N;return{basic:(S=r.value)==null?void 0:S.clearSelect(),tabs:(N=i.value)==null?void 0:N.clearSelect(a.value)}[y.value.type]}}),{run:T,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"}})});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yzsf2e/render-core",
3
- "version": "1.0.2-alpha.82",
3
+ "version": "1.0.2-alpha.83",
4
4
  "main": "dist/render-core",
5
5
  "module": "dist/render-core",
6
6
  "files": [