From 2e31ba7ff8dffbaabd6e55c16c2b2e2a92aed8f4 Mon Sep 17 00:00:00 2001 From: sunhao Date: Fri, 23 Jan 2026 14:11:42 +0800 Subject: [PATCH] * [misc] update zui3 lib. --- www/js/zui3/zui.zentao.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/www/js/zui3/zui.zentao.js b/www/js/zui3/zui.zentao.js index 436ecf7c64..0b0f138be4 100644 --- a/www/js/zui3/zui.zentao.js +++ b/www/js/zui3/zui.zentao.js @@ -1,7 +1,7 @@ var q_=(N,kt,as)=>{if(!kt.has(N))throw TypeError("Cannot "+as)};var hr=(N,kt,as)=>(q_(N,kt,"read from private field"),as?as.call(N):kt.get(N)),Tf=(N,kt,as)=>{if(kt.has(N))throw TypeError("Cannot add the same private member more than once");kt instanceof WeakSet?kt.add(N):kt.set(N,as)},dr=(N,kt,as,xc)=>(q_(N,kt,"write to private field"),xc?xc.call(N,as):kt.set(N,as),as);(function(N,kt){typeof exports=="object"&&typeof module<"u"?kt(exports):typeof define=="function"&&define.amd?define(["exports"],kt):(N=typeof globalThis<"u"?globalThis:N||self,kt(N.zui={}))})(this,function(N){var $n,Dn,h_,d_;"use strict";const kt="",as="",xc="",wT="",CT="",xT="",kT="",ST="",TT="",$T="",DT="",IT="",kc="3.0.0",Af="production",Pf="a73945e35b2dba0a360bed6b86eb323674c124de",js=document,Po=window,Lf=js.documentElement,zn=js.createElement.bind(js),Rf=zn("div"),Sc=zn("table"),hb=zn("tbody"),zf=zn("tr"),{isArray:Lo,prototype:Ff}=Array,{concat:db,filter:Tc,indexOf:Of,map:jf,push:ub,slice:Bf,some:$c,splice:fb}=Ff,pb=/^#(?:[\w-]|\\.|[^\x00-\xa0])*$/,mb=/^\.(?:[\w-]|\\.|[^\x00-\xa0])*$/,gb=/<.+>/,yb=/^\w+$/;function Dc(i,e){const t=vb(e);return!i||!t&&!Fn(e)&&!yt(e)?[]:!t&&mb.test(i)?e.getElementsByClassName(i.slice(1).replace(/\\/g,"")):!t&&yb.test(i)?e.getElementsByTagName(i):e.querySelectorAll(i)}class Ro{constructor(e,t){if(!e)return;if(Ic(e))return e;let s=e;if(Lt(e)){const n=t||js;if(s=pb.test(e)&&Fn(n)?n.getElementById(e.slice(1).replace(/\\/g,"")):gb.test(e)?qf(e):Ic(n)?n.find(e):Lt(n)?v(n).find(e):Dc(e,n),!s)return}else if(On(e))return this.ready(e);(s.nodeType||s===Po)&&(s=[s]),this.length=s.length;for(let n=0,r=this.length;n{for(;e.firstChild;)e.removeChild(e.firstChild)})};function zo(...i){const e=bb(i[0])?i.shift():!1,t=i.shift(),s=i.length;if(!t)return{};if(!s)return zo(e,v,t);for(let n=0;n{yt(r)&&St(t,(o,a)=>{s?e?r.classList.add(a):r.classList.remove(a):r.classList.toggle(a)})})},ce.addClass=function(i){return this.toggleClass(i,!0)},ce.removeAttr=function(i){const e=Fo(i);return this.each((t,s)=>{yt(s)&&St(e,(n,r)=>{s.removeAttribute(r)})})};function Cb(i,e){if(i){if(Lt(i)){if(arguments.length<2){if(!this[0]||!yt(this[0]))return;const t=this[0].getAttribute(i);return pr(t)?void 0:t}return Ut(e)?this:pr(e)?this.removeAttr(i):this.each((t,s)=>{yt(s)&&s.setAttribute(i,e)})}for(const t in i)this.attr(t,i[t]);return this}}ce.attr=Cb,ce.removeClass=function(i){return arguments.length?this.toggleClass(i,!1):this.attr("class","")},ce.hasClass=function(i){return!!i&&$c.call(this,e=>yt(e)&&e.classList.contains(i))},ce.get=function(i){return Ut(i)?Bf.call(this):(i=Number(i),this[i<0?i+this.length:i])},ce.eq=function(i){return v(this.get(i))},ce.first=function(){return this.eq(0)},ce.last=function(){return this.eq(-1)};function xb(i){return Ut(i)?this.get().map(e=>yt(e)||_b(e)?e.textContent:"").join(""):this.each((e,t)=>{yt(t)&&(t.textContent=i)})}ce.text=xb;function Bs(i,e,t){if(!yt(i))return;const s=Po.getComputedStyle(i,null);return t?s.getPropertyValue(e)||void 0:s[e]||i.style[e]}function Cs(i,e){return parseInt(Bs(i,e),10)||0}function Uf(i,e){return Cs(i,`border${e?"Left":"Top"}Width`)+Cs(i,`padding${e?"Left":"Top"}`)+Cs(i,`padding${e?"Right":"Bottom"}`)+Cs(i,`border${e?"Right":"Bottom"}Width`)}const Nc={};function kb(i){if(Nc[i])return Nc[i];const e=zn(i);js.body.insertBefore(e,null);const t=Bs(e,"display");return js.body.removeChild(e),Nc[i]=t!=="none"?t:"block"}function Vf(i){return Bs(i,"display")==="none"}function Wf(i,e){const t=i&&(i.matches||i.webkitMatchesSelector||i.msMatchesSelector);return!!t&&!!e&&t.call(i,e)}function Oo(i){return Lt(i)?(e,t)=>Wf(t,i):On(i)?i:Ic(i)?(e,t)=>i.is(t):i?(e,t)=>t===i:()=>!1}ce.filter=function(i){const e=Oo(i);return v(Tc.call(this,(t,s)=>e.call(t,s,t)))};function on(i,e){return e?i.filter(e):i}ce.detach=function(i){return on(this,i).each((e,t)=>{t.parentNode&&t.parentNode.removeChild(t)}),this};const Sb=/^\s*<(\w+)[^>]*>/,Tb=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,Kf={"*":Rf,tr:hb,td:zf,th:zf,thead:Sc,tbody:Sc,tfoot:Sc};function qf(i){if(!Lt(i))return[];if(Tb.test(i))return[zn(RegExp.$1)];const e=Sb.test(i)&&RegExp.$1,t=Kf[e]||Kf["*"];return t.innerHTML=i,v(t.childNodes).detach().get()}v.parseHTML=qf,ce.has=function(i){const e=Lt(i)?(t,s)=>Dc(i,s).length:(t,s)=>s.contains(i);return this.filter(e)},ce.not=function(i){const e=Oo(i);return this.filter((t,s)=>(!Lt(i)||yt(s))&&!e.call(s,t,s))};function Hs(i,e,t,s){const n=[],r=On(e),o=s&&Oo(s);for(let a=0,l=i.length;ae.selected&&!e.disabled&&!e.parentNode.disabled),"value"):i.value||""}function $b(i){return arguments.length?this.each((e,t)=>{const s=t.multiple&&t.options;if(s||rp.test(t.type)){const n=Lo(i)?jf.call(i,String):pr(i)?[]:[String(i)];s?St(t.options,(r,o)=>{o.selected=n.indexOf(o.value)>=0},!0):t.checked=n.indexOf(t.value)>=0}else t.value=Ut(i)||pr(i)?"":i}):this[0]&&Gf(this[0])}ce.val=$b,ce.is=function(i){const e=Oo(i);return $c.call(this,(t,s)=>e.call(t,s,t))},v.guid=1;function xs(i){return i.length>1?Tc.call(i,(e,t,s)=>Of.call(s,e)===t):i}v.unique=xs,ce.add=function(i,e){return v(xs(this.get().concat(v(i,e).get())))},ce.children=function(i){return on(v(xs(Hs(this,e=>e.children))),i)},ce.parent=function(i){return on(v(xs(Hs(this,"parentNode"))),i)},ce.index=function(i){const e=i?v(i)[0]:this[0],t=i?this:v(e).parent().children();return Of.call(t,e)},ce.closest=function(i){const e=this.filter(i);if(e.length)return e;const t=this.parent();return t.length?t.closest(i):e},ce.siblings=function(i){return on(v(xs(Hs(this,e=>v(e).parent().children().not(e)))),i)},ce.find=function(i){return v(xs(Hs(this,e=>Dc(i,e))))};const Db=/^\s*\s*$/g,Ib=/^$|^module$|\/(java|ecma)script/i,Mb=["type","src","nonce","noModule"];function Nb(i,e){const t=v(i);t.filter("script").add(t.find("script")).each((s,n)=>{if(Ib.test(n.type)&&Lf.contains(n)){const r=zn("script");r.text=n.textContent.replace(Db,""),St(Mb,(o,a)=>{n[a]&&(r[a]=n[a])}),e.head.insertBefore(r,null),e.head.removeChild(r)}})}function Eb(i,e,t,s,n){s?i.insertBefore(e,t?i.firstChild:null):i.nodeName==="HTML"?i.parentNode.replaceChild(e,i):i.parentNode.insertBefore(e,t?i:i.nextSibling),n&&Nb(e,i.ownerDocument)}function an(i,e,t,s,n,r,o,a){return St(i,(l,c)=>{St(v(c),(h,d)=>{St(v(e),(f,m)=>{const y=t?d:m,b=t?m:d,w=t?h:f;Eb(y,w?b.cloneNode(!0):b,s,n,!w)},a)},o)},r),e}ce.after=function(){return an(arguments,this,!1,!1,!1,!0,!0)},ce.append=function(){return an(arguments,this,!1,!1,!0)};function Ab(i){if(!arguments.length)return this[0]&&this[0].innerHTML;if(Ut(i))return this;const e=/]/.test(i);return this.each((t,s)=>{yt(s)&&(e?v(s).empty().append(i):s.innerHTML=i)})}ce.html=Ab,ce.appendTo=function(i){return an(arguments,this,!0,!1,!0)},ce.wrapInner=function(i){return this.each((e,t)=>{const s=v(t),n=s.contents();n.length?n.wrapAll(i):s.append(i)})},ce.before=function(){return an(arguments,this,!1,!0)},ce.wrapAll=function(i){let e=v(i),t=e[0];for(;t.children.length;)t=t.firstElementChild;return this.first().before(e),this.appendTo(t)},ce.wrap=function(i){return this.each((e,t)=>{const s=v(i)[0];v(t).wrapAll(e?s.cloneNode(!0):s)})},ce.insertAfter=function(i){return an(arguments,this,!0,!1,!1,!1,!1,!0)},ce.insertBefore=function(i){return an(arguments,this,!0,!0)},ce.prepend=function(){return an(arguments,this,!1,!0,!0,!0,!0)},ce.prependTo=function(i){return an(arguments,this,!0,!0,!0,!1,!1,!0)},ce.contents=function(){return v(xs(Hs(this,i=>i.tagName==="IFRAME"?[i.contentDocument]:i.tagName==="TEMPLATE"?i.content.childNodes:i.childNodes)))},ce.next=function(i,e,t){return on(v(xs(Hs(this,"nextElementSibling",e,t))),i)},ce.nextAll=function(i){return this.next(i,!0)},ce.nextUntil=function(i,e){return this.next(e,!0,i)},ce.parents=function(i,e){return on(v(xs(Hs(this,"parentElement",!0,e))),i)},ce.parentsUntil=function(i,e){return this.parents(e,i)},ce.prev=function(i,e,t){return on(v(xs(Hs(this,"previousElementSibling",e,t))),i)},ce.prevAll=function(i){return this.prev(i,!0)},ce.prevUntil=function(i,e){return this.prev(e,!0,i)},ce.map=function(i){return v(db.apply([],jf.call(this,(e,t)=>i.call(e,t,e))))},ce.clone=function(){return this.map((i,e)=>e.cloneNode(!0))},ce.offsetParent=function(){return this.map((i,e)=>{let t=e.offsetParent;for(;t&&Bs(t,"position")==="static";)t=t.offsetParent;return t||Lf})},ce.slice=function(i,e){return v(Bf.call(this,i,e))};const Pb=/-([a-z])/g;function Ec(i){return i.replace(Pb,(e,t)=>t.toUpperCase())}ce.ready=function(i){const e=()=>setTimeout(i,0,v);return js.readyState!=="loading"?e():js.addEventListener("DOMContentLoaded",e),this},ce.unwrap=function(){return this.parent().each((i,e)=>{if(e.tagName==="BODY")return;const t=v(e);t.replaceWith(t.children())}),this},ce.offset=function(){const i=this[0];if(!i)return;const e=i.getBoundingClientRect();return{top:e.top+Po.pageYOffset,left:e.left+Po.pageXOffset}},ce.position=function(){const i=this[0];if(!i)return;const e=Bs(i,"position")==="fixed",t=e?i.getBoundingClientRect():this.offset();if(!e){const s=i.ownerDocument;let n=i.offsetParent||s.documentElement;for(;(n===s.body||n===s.documentElement)&&Bs(n,"position")==="static";)n=n.parentNode;if(n!==i&&yt(n)){const r=v(n).offset();t.top-=r.top+Cs(n,"borderTopWidth"),t.left-=r.left+Cs(n,"borderLeftWidth")}}return{top:t.top-Cs(i,"marginTop"),left:t.left-Cs(i,"marginLeft")}};const Zf={class:"className",contenteditable:"contentEditable",for:"htmlFor",readonly:"readOnly",maxlength:"maxLength",tabindex:"tabIndex",colspan:"colSpan",rowspan:"rowSpan",usemap:"useMap"};ce.prop=function(i,e){if(i){if(Lt(i))return i=Zf[i]||i,arguments.length<2?this[0]&&this[0][i]:this.each((t,s)=>{s[i]=e});for(const t in i)this.prop(t,i[t]);return this}},ce.removeProp=function(i){return this.each((e,t)=>{delete t[Zf[i]||i]})};const Lb=/^--/;function Ac(i){return Lb.test(i)}const Pc={},{style:Rb}=Rf,zb=["webkit","moz","ms"];function Fb(i,e=Ac(i)){if(e)return i;if(!Pc[i]){const t=Ec(i),s=`${t[0].toUpperCase()}${t.slice(1)}`,n=`${t} ${zb.join(`${s} `)}${s}`.split(" ");St(n,(r,o)=>{if(o in Rb)return Pc[i]=o,!1})}return Pc[i]}const Ob={animationIterationCount:!0,columnCount:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0};function Yf(i,e,t=Ac(i)){return!t&&!Ob[i]&&Hf(e)?`${e}px`:e}function jb(i,e){if(Lt(i)){const t=Ac(i);return i=Fb(i,t),arguments.length<2?this[0]&&Bs(this[0],i,t):i?(e=Yf(i,e,t),this.each((s,n)=>{yt(n)&&(t?n.style.setProperty(i,e):n.style[i]=e)})):this}for(const t in i)this.css(t,i[t]);return this}ce.css=jb;function Jf(i,e){try{return i(e)}catch{return e}}const Bb=/^\s+|\s+$/;function Xf(i,e){const t=i.dataset[e]||i.dataset[Ec(e)];return Bb.test(t)?t:Jf(JSON.parse,t)}function Hb(i,e,t){t=Jf(JSON.stringify,t),i.dataset[Ec(e)]=t}function Ub(i,e){if(!i){if(!this[0])return;const t={};for(const s in this[0].dataset)t[s]=Xf(this[0],s);return t}if(Lt(i))return arguments.length<2?this[0]&&Xf(this[0],i):Ut(e)?this:this.each((t,s)=>{Hb(s,i,e)});for(const t in i)this.data(t,i[t]);return this}ce.data=Ub;function Qf(i,e){const t=i.documentElement;return Math.max(i.body[`scroll${e}`],t[`scroll${e}`],i.body[`offset${e}`],t[`offset${e}`],t[`client${e}`])}St([!0,!1],(i,e)=>{St(["Width","Height"],(t,s)=>{const n=`${e?"outer":"inner"}${s}`;ce[n]=function(r){if(this[0])return wi(this[0])?e?this[0][`inner${s}`]:this[0].document.documentElement[`client${s}`]:Fn(this[0])?Qf(this[0],s):this[0][`${e?"offset":"client"}${s}`]+(r&&e?Cs(this[0],`margin${t?"Top":"Left"}`)+Cs(this[0],`margin${t?"Bottom":"Right"}`):0)}})}),St(["Width","Height"],(i,e)=>{const t=e.toLowerCase();ce[t]=function(s){if(!this[0])return Ut(s)?void 0:this;if(!arguments.length)return wi(this[0])?this[0].document.documentElement[`client${e}`]:Fn(this[0])?Qf(this[0],e):this[0].getBoundingClientRect()[t]-Uf(this[0],!i);const n=parseInt(s,10);return this.each((r,o)=>{if(!yt(o))return;const a=Bs(o,"boxSizing");o.style[t]=Yf(t,n+(a==="border-box"?Uf(o,!i):0))})}});const ep="___cd";ce.toggle=function(i){return this.each((e,t)=>{if(!yt(t))return;const s=Vf(t);(Ut(i)?s:i)?(t.style.display=t[ep]||"",Vf(t)&&(t.style.display=kb(t.tagName))):s||(t[ep]=Bs(t,"display"),t.style.display="none")})},ce.hide=function(){return this.toggle(!1)},ce.show=function(){return this.toggle(!0)};const tp="___ce",Lc=".",Rc={focus:"focusin",blur:"focusout"},sp={mouseenter:"mouseover",mouseleave:"mouseout"},Vb=/^(mouse|pointer|contextmenu|drag|drop|click|dblclick)/i;function zc(i){return sp[i]||Rc[i]||i}function Fc(i){const e=i.split(Lc);return[e[0],e.slice(1).sort()]}ce.trigger=function(i,e){if(Lt(i)){const[s,n]=Fc(i),r=zc(s);if(!r)return this;const o=Vb.test(r)?"MouseEvents":"HTMLEvents";i=js.createEvent(o),i.initEvent(r,!0,!0),i.namespace=n.join(Lc),i.___ot=s}i.___td=e;const t=i.___ot in Rc;return this.each((s,n)=>{t&&On(n[i.___ot])&&(n[`___i${i.type}`]=!0,n[i.___ot](),n[`___i${i.type}`]=!1),n.dispatchEvent(i)})};function np(i){return i[tp]=i[tp]||{}}function Wb(i,e,t,s,n){const r=np(i);r[e]=r[e]||[],r[e].push([t,s,n]),i.addEventListener(e,n)}function ip(i,e){return!e||!$c.call(e,t=>i.indexOf(t)<0)}function jo(i,e,t,s,n){const r=np(i);if(e)r[e]&&(r[e]=r[e].filter(([o,a,l])=>{if(n&&l.guid!==n.guid||!ip(o,t)||s&&s!==a)return!0;i.removeEventListener(e,l)}));else for(e in r)jo(i,e,t,s,n)}ce.off=function(i,e,t){if(Ut(i))this.each((s,n)=>{!yt(n)&&!Fn(n)&&!wi(n)||jo(n)});else if(Lt(i))On(e)&&(t=e,e=""),St(Fo(i),(s,n)=>{const[r,o]=Fc(n),a=zc(r);this.each((l,c)=>{!yt(c)&&!Fn(c)&&!wi(c)||jo(c,a,o,e,t)})});else for(const s in i)this.off(s,i[s]);return this},ce.remove=function(i){return on(this,i).detach().off(),this},ce.replaceWith=function(i){return this.before(i).remove()},ce.replaceAll=function(i){return v(i).replaceWith(this),this};function Kb(i,e,t,s,n){if(!Lt(i)){for(const r in i)this.on(r,e,t,i[r],n);return this}return Lt(e)||(Ut(e)||pr(e)?e="":Ut(t)?(t=e,e=""):(s=t,t=e,e="")),On(s)||(s=t,t=void 0),s?(St(Fo(i),(r,o)=>{const[a,l]=Fc(o),c=zc(a),h=a in sp,d=a in Rc;c&&this.each((f,m)=>{if(!yt(m)&&!Fn(m)&&!wi(m))return;const y=function(b){if(b.target[`___i${b.type}`])return b.stopImmediatePropagation();if(b.namespace&&!ip(l,b.namespace.split(Lc))||!e&&(d&&(b.target!==m||b.___ot===c)||h&&b.relatedTarget&&m.contains(b.relatedTarget)))return;let w=m;if(e){let D=b.target;for(;!Wf(D,e);)if(D===m||(D=D.parentNode,!D))return;w=D}Object.defineProperty(b,"currentTarget",{configurable:!0,get(){return w}}),Object.defineProperty(b,"delegateTarget",{configurable:!0,get(){return m}}),Object.defineProperty(b,"data",{configurable:!0,get(){return t}});const x=s.call(w,b,b.___td);n&&jo(m,c,l,e,y),x===!1&&(b.preventDefault(),b.stopPropagation())};y.guid=s.guid=s.guid||v.guid++,Wb(m,c,l,e,y)})}),this):this}ce.on=Kb;function qb(i,e,t,s){return this.on(i,e,t,s,!0)}ce.one=qb;const Gb=/\r?\n/g;function Zb(i,e){return`&${encodeURIComponent(i)}=${encodeURIComponent(e.replace(Gb,`\r `))}`}const Yb=/file|reset|submit|button|image/i,rp=/radio|checkbox/i;ce.serialize=function(){let i="";return this.each((e,t)=>{St(t.elements||[t],(s,n)=>{if(n.disabled||!n.name||n.tagName==="FIELDSET"||Yb.test(n.type)||rp.test(n.type)&&!n.checked)return;const r=Gf(n);if(!Ut(r)){const o=Lo(r)?r:[r];St(o,(a,l)=>{i+=Zb(n.name,l)})}})}),i.slice(1)},window.$=v;function op(i,e){if(i==null)return[i,void 0];typeof e=="string"&&(e=e.split("."));const t=e.join(".");let s=i;const n=[s];for(;typeof s=="object"&&s!==null&&e.length;){let r=e.shift(),o;const a=r.indexOf("[");if(a>0&&a1?n[r-2]:i,e[e.length-1]),o===void 0?t:o}catch{return t}}function ls(i,e,t,s){let n;const r=mr(i,e,void 0,o=>{n=o});return typeof r=="function"?r.apply(s??n,t):r}function jn(i){return typeof i=="string"&&i!==""}function $e(i,...e){if(e.length===0)return i;if(e.length===1&&typeof e[0]=="object"&&e[0]){const t=e[0];return Object.keys(t).forEach(s=>{const n=t[s]??"";i=i.replace(new RegExp(`\\{${s}\\}`,"g"),`${n}`)}),i}for(let t=0;t(i[i.B=1]="B",i[i.KB=1024]="KB",i[i.MB=1048576]="MB",i[i.GB=1073741824]="GB",i[i.TB=1099511627776]="TB",i))(Oc||{});function pt(i,e=2,t){return Number.isNaN(i)?"?KB":(t||(i<1024?t="B":i<1048576?t="KB":i<1073741824?t="MB":i<1099511627776?t="GB":t="TB"),(i/Oc[t]).toFixed(e)+t)}const ks=i=>{const e=/^[0-9]*(B|KB|MB|GB|TB)$/;i=i.toUpperCase(),i.endsWith("B")||(i+="B");const t=i.match(e);if(!t)return 0;const s=t[1];return i=i.replace(s,""),Number.parseInt(i,10)*Oc[s]},Us=i=>i.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'");let jc=(document.documentElement.getAttribute("lang")||"zh_cn").toLowerCase().replace("-","_"),Vs;function ap(){return jc}function Jb(i){jc=i.toLowerCase().replace("-","_")}function lp(i,e){Vs||(Vs={}),typeof i=="string"&&(i={[i]:e??{}}),v.extend(!0,Vs,i)}function Pe(i,e,t,s,n,r){Array.isArray(i)?Vs&&i.unshift(Vs):i=Vs?[Vs,i]:[i],typeof t=="string"&&(r=n,n=s,s=t,t=void 0);const o=n||jc;let a;for(const l of i){if(!l)continue;const c=l[o]||l.default;if(!c)continue;const h=r&&l===Vs?`${r}.${e}`:e;if(a=mr(c,h),a!==void 0)break}return a===void 0?s:t?$e(a,...Array.isArray(t)?t:[t]):a}function Xb(i,e,t,s){return Pe(void 0,i,e,t,s)}Pe.addLang=lp,Pe.getLang=Xb,Pe.getCode=ap,Pe.setCode=Jb,Pe.map=Vs,lp({zh_cn:{confirm:"确定",save:"保存",cancel:"取消",delete:"删除",reset:"重置",add:"添加",copy:"复制",close:"关闭",edit:"编辑",open:"打开"},zh_tw:{confirm:"確定",save:"儲存",cancel:"取消",delete:"刪除",reset:"重置",add:"添加",Copy:"複製",close:"關閉",edit:"編輯",open:"打開"},en:{confirm:"Confirm",save:"Save",cancel:"Cancel",delete:"Delete",reset:"Reset",add:"Add",copy:"Copy",close:"Close",edit:"Edit",open:"Open"}});function Bn(i,e,t){t!=null&&(Array.isArray(t)?t.forEach(s=>Bn(i,e,s)):!(t instanceof Blob)&&v.isPlainObject(t)?Object.entries(t).forEach(([s,n])=>{Bn(i,`${e}[${s}]`,n)}):i.append(e,t instanceof Blob?t:String(t)))}function gr(i,e){const t=e||new FormData;return i&&(typeof i=="string"&&(i=new URLSearchParams(i)),i instanceof URLSearchParams?i.forEach((s,n)=>{Bn(t,n,s)}):Array.isArray(i)?i.forEach(([s,n])=>{Bn(t,s,n)}):i instanceof FormData?i.forEach((s,n)=>{Bn(t,n,s)}):typeof i=="object"&&i&&Object.entries(i).forEach(([s,n])=>{Bn(t,s,n)})),t}function Xe(){return v.guid++}function yr(i,e){if(i===e)return!1;if(i&&e){const t=typeof i,s=typeof e;if(t!==s)return!0;if(t==="object"&&s==="object"){const n=Array.isArray(i),r=Array.isArray(e);if(n!==r)return!0;if(n&&r){if(i.length!==e.length)return!0;for(let l=0;ls instanceof Hn?s.value!==t[n]:yr(s,t[n])))&&(this._value=this._compute(),this._lastDependencies=e.map(s=>s instanceof Hn?s.cache:s)),this._value}}function Bc(...i){const e=[],t=new Map,s=(n,r)=>{if(Array.isArray(n)&&(r=n[1],n=n[0]),!n.length)return;const o=t.get(n);typeof o=="number"?e[o][1]=!!r:(t.set(n,e.length),e.push([n,!!r]))};return i.forEach(n=>{typeof n=="function"&&(n=n()),Array.isArray(n)?Bc(...n).forEach(s):n&&typeof n=="object"?Object.entries(n).forEach(s):typeof n=="string"&&n.split(" ").forEach(r=>s(r,!0))}),e.sort((n,r)=>(t.get(n[0])||0)-(t.get(r[0])||0))}const K=(...i)=>Bc(...i).reduce((e,[t,s])=>(s&&e.push(t),e),[]).join(" ");v.classes=K,v.fn.setClass=function(i,...e){return this.each((t,s)=>{const n=v(s);i===!0?n.attr("class",K(n.attr("class"),...e)):n.addClass(K(i,...e))})};const Ci=new WeakMap;function Bo(i,e,t){const s=Ci.has(i),n=s?Ci.get(i):{};typeof e=="string"?n[e]=t:e===null?Object.keys(n).forEach(r=>{delete n[r]}):Object.assign(n,e),Object.keys(n).forEach(r=>{n[r]===void 0&&delete n[r]}),Object.keys(n).length?(!s&&i instanceof Element&&Object.assign(n,v(i).dataset(),n),Ci.set(i,n)):Ci.delete(i)}function vr(i,e,t){let s=Ci.get(i)||{};return t&&i instanceof Element&&(s=Object.assign({},v(i).dataset(),s)),e===void 0?s:s[e]}function Qb(i){Ci.delete(i)}v.fn.dataset=v.fn.data,v.fn.data=function(...i){const[e,t]=i;return!i.length||i.length===1&&typeof e=="string"?this.length?vr(this[0],e,!0):void 0:this.each((s,n)=>Bo(n,e,t))},v.fn.removeData=function(i=null){return this.each((e,t)=>Bo(t,i))};function ln(i,...e){return i.includes("RAWJS")&&(i=i.split('"RAWJS<').join("").split('>RAWJS"').join("").split("").join('"').split("").join(` `)),new Function(...e.map(([s])=>s),`return ${i}`)(...e.map(([,s])=>s))}function Ho(i,...e){return i.includes("RAWJS")?ln(i,...e):JSON.parse(i)}function ew(i){return JSON.stringify(i,(e,t)=>typeof t=="function"?`RAWJS<${t.toString().split('"').join("").split(` -`).join("")}>RAWJS`:t)}function xi(i,e){const t=v(i),s=t[0];if(!s)return;const{prefix:n,getter:r,evalValue:o,json:a=!0,evalArgs:l=[["_element",s],["_$element",t]]}={prefix:"z-",...typeof e=="string"?{prefix:e}:e},c=Array.isArray(o)?new Set(o):void 0;return Array.from(s.attributes).reduce((h,d)=>{let{name:f}=d;const{value:m}=d;let y=m;if(f.startsWith(n)){if(f=f.slice(n.length).replace(/-([a-z])/g,b=>b[1].toUpperCase()),r)y=r(f,m);else try{o&&(!c||c.has(f))||o===void 0&&m.includes("RAWJS")?y=ln(m,...l):a&&(y=JSON.parse(m))}catch{}h[f]=y}return h},{})}function Hc(i,e,t="z-"){const s=v(i);Object.keys(e).forEach(n=>{let r=e[n];typeof r=="function"&&(r=`RAWJS<${r}>RAWJS`),typeof r!="string"&&(r=JSON.stringify(r)),n=n.replace(/[A-Z]/g,o=>`-${o.toLowerCase()}`),s.attr(`${t}${n}`,r)})}function tw(...i){var t;const e=i.length;if(!e)return xi(this);if(e===1){const[s]=i;return typeof s=="string"?(t=xi(this))==null?void 0:t[s]:(v.isPlainObject(s)&&Hc(this,s),this)}return Hc(this,{[i[0]]:i[1]}),this}v.fn.z=tw,v.fn._attr=v.fn.attr,v.fn.extend({attr(...i){const[e,t]=i;return!i.length||i.length===1&&typeof e=="string"?this._attr.apply(this,i):typeof e=="object"?(e&&Object.keys(e).forEach(s=>{const n=e[s];n===null?this.removeAttr(s):this._attr(s,n)}),this):t===null?this.removeAttr(e):this._attr(e,t)}}),v.Event||(v.Event=(i,e)=>{const[t,...s]=i.split("."),n=new Event(t,{bubbles:!0,cancelable:!0});return n.namespace=s.join("."),n.___ot=t,n.___td=e,n});const Ss=(i,e)=>new Promise(t=>{const s=window.setTimeout(t,i);e&&e(s)}),cp={};v.share=cp;var Uo,tt,hp;N.isValidElement=void 0;var Un,dp,up,fp,pp,Uc,Vc,Wc,_r={},mp=[],sw=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,br=Array.isArray;function Ws(i,e){for(var t in e)i[t]=e[t];return i}function Kc(i){i&&i.parentNode&&i.parentNode.removeChild(i)}function g(i,e,t){var s,n,r,o={};for(r in e)r=="key"?s=e[r]:r=="ref"?n=e[r]:o[r]=e[r];if(arguments.length>2&&(o.children=arguments.length>3?Uo.call(arguments,2):t),typeof i=="function"&&i.defaultProps!=null)for(r in i.defaultProps)o[r]===void 0&&(o[r]=i.defaultProps[r]);return Vo(i,o,s,n,null)}function Vo(i,e,t,s,n){var r={type:i,props:e,key:t,ref:s,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:n??++hp,__i:-1,__u:0};return n==null&&tt.vnode!=null&&tt.vnode(r),r}function ye(){return{current:null}}function cn(i){return i.children}function ae(i,e){this.props=i,this.context=e}function ki(i,e){if(e==null)return i.__?ki(i.__,i.__i+1):null;for(var t;ea&&Un.sort(fp),i=Un.shift(),a=Un.length,i.__d&&(t=void 0,s=void 0,n=(s=(e=i).__v).__e,r=[],o=[],e.__P&&((t=Ws({},s)).__v=s.__v+1,tt.vnode&&tt.vnode(t),qc(e.__P,t,s,e.__n,e.__P.namespaceURI,32&s.__u?[n]:null,r,n??ki(s),!!(32&s.__u),o),t.__v=s.__v,t.__.__k[t.__i]=t,Cp(r,t,o),s.__e=s.__=null,t.__e!=n&&gp(t)));Wo.__r=0}function vp(i,e,t,s,n,r,o,a,l,c,h){var d,f,m,y,b,w,x,D=s&&s.__k||mp,I=e.length;for(l=nw(t,e,D,l,I),d=0;d0?o=i.__k[r]=Vo(o.type,o.props,o.key,o.ref?o.ref:null,o.__v):i.__k[r]=o,l=r+f,o.__=i,o.__b=i.__b+1,a=null,(c=o.__i=iw(o,t,l,d))!=-1&&(d--,(a=t[c])&&(a.__u|=2)),a==null||a.__v==null?(c==-1&&(n>h?f--:nl?f--:f++,o.__u|=4))):i.__k[r]=null;if(d)for(r=0;r(h?1:0)){for(n=t-1,r=t+1;n>=0||r=0?n--:r++])!=null&&!(2&c.__u)&&a==c.key&&l==c.type)return o}return-1}function bp(i,e,t){e[0]=="-"?i.setProperty(e,t??""):i[e]=t==null?"":typeof t!="number"||sw.test(e)?t:t+"px"}function qo(i,e,t,s,n){var r,o;e:if(e=="style")if(typeof t=="string")i.style.cssText=t;else{if(typeof s=="string"&&(i.style.cssText=s=""),s)for(e in s)t&&e in t||bp(i.style,e,"");if(t)for(e in t)s&&t[e]==s[e]||bp(i.style,e,t[e])}else if(e[0]=="o"&&e[1]=="n")r=e!=(e=e.replace(pp,"$1")),o=e.toLowerCase(),e=o in i||e=="onFocusOut"||e=="onFocusIn"?o.slice(2):e.slice(2),i.l||(i.l={}),i.l[e+r]=t,t?s?t.u=s.u:(t.u=Uc,i.addEventListener(e,r?Wc:Vc,r)):i.removeEventListener(e,r?Wc:Vc,r);else{if(n=="http://www.w3.org/2000/svg")e=e.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(e!="width"&&e!="height"&&e!="href"&&e!="list"&&e!="form"&&e!="tabIndex"&&e!="download"&&e!="rowSpan"&&e!="colSpan"&&e!="role"&&e!="popover"&&e in i)try{i[e]=t??"";break e}catch{}typeof t=="function"||(t==null||t===!1&&e[4]!="-"?i.removeAttribute(e):i.setAttribute(e,e=="popover"&&t==1?"":t))}}function wp(i){return function(e){if(this.l){var t=this.l[e.type+i];if(e.t==null)e.t=Uc++;else if(e.t0?i:br(i)?i.map(xp):Ws({},i)}function rw(i,e,t,s,n,r,o,a,l){var c,h,d,f,m,y,b,w=t.props||_r,x=e.props,D=e.type;if(D=="svg"?n="http://www.w3.org/2000/svg":D=="math"?n="http://www.w3.org/1998/Math/MathML":n||(n="http://www.w3.org/1999/xhtml"),r!=null){for(c=0;c{!t||typeof t!="object"||Object.keys(t).forEach(s=>{let n=t[s];const r=i[s];n!==r&&(r!==void 0&&(s==="className"||s.endsWith("Class")?n=[r,n]:s==="children"?n=[...Ko(r),...Ko(n)]:typeof r=="object"&&(s==="style"||s.endsWith("Style")||s==="attrs"||s.endsWith("Attrs")||s==="props")&&(n=v.extend(r,n))),i[s]=n)})}),i}function Yc(i){return Object.keys(i).forEach(e=>{i[e]===void 0&&delete i[e]}),i}function Go(i,e=!0){const t=v(i),s=t[0],n="zui-disable-scroll";if(e){if(t.data(n))return;if((t.css("scrollbar-gutter")||"").includes("stable")){t.data(n,{overflow:t.css("overflow")}).css("overflow","hidden");return}const r=s===document.body||t.is("html")?window.innerWidth-document.body.clientWidth:s.offsetWidth-s.clientWidth;if(!r)return;const o=t.css("paddingRight")||"0";t.data(n,{paddingRight:o,overflow:t.css("overflow")}).css({paddingRight:`${r+Number.parseInt(o,10)}px`,overflow:"hidden"})}else{const r=t.data(n);if(!r)return;t.css(r).removeData(n)}}v.fn.disableScroll=function(i=!0){return this.each((e,t)=>{Go(t,i)})},v.fn.enableScroll=function(i=!0){return this.disableScroll(!i)};function Jc(i,e,t){if(!(t.on||"click").split(" ").includes(e.type))return;const s=t.selector?v(e.target).closest(t.selector):i;if(!s.length)return;const n=c=>c===""?!0:c,r=c=>{if(typeof c=="string")try{c=JSON.parse(c)}catch{}return c};if(n(t.once)){if(t.onceCalled)return;i.dataset("once-called",!0)}if(n(t.prevent)&&e.preventDefault(),n(t.stop)&&e.stopPropagation(),n(t.self)&&e.currentTarget!==e.target)return;const o=[["$element",i],["event",e],["options",t],["$target",s]],a=c=>typeof c=="function"?c(...o):v.runJS(c,...o);if(t.if!==void 0&&!a(t.if))return;const l=t.call;if(l){let c;if(typeof l=="string"?c=/^[$A-Z_][0-9A-Z_$.]*$/i.test(l)?mr(window,l):a(l):c=l,typeof c=="function"){const h=[],d=t.params;t.params=h,typeof d=="string"&&d.length?d[0]==="["?h.push(...r(d)):h.push(...d.split(", ").map(f=>(f=f.trim(),f==="$element"?i:f==="event"?e:f==="options"?t:f.startsWith("$element.")||f.startsWith("event.")||f.startsWith("options.")?a(f):r(f)))):Array.isArray(d)?h.push(...d):h.push(d),c(...h)}}t.do&&a(t.do)}function aw(i){const e=v(this),t=i.type,s=e.attr("zui-on");if(s){const[o,a]=s.split("~").map(l=>l.trim());o&&o.split(" ").includes(t)&&Jc(e,i,v.extend({on:o},a?a.startsWith("{")?ln(a):{do:a}:xi(e,{prefix:"data-",evalValue:["call","if","do"]})))}const n=e.attr(`zui-on-${t}`);n&&Jc(e,i,v.extend({on:t},n.startsWith("{")?ln(n):{do:n}));const r=e.attr("data-on");r&&r.split(" ").includes(t)&&Jc(e,i,xi(e,{prefix:"data-",evalValue:["call","if","do"]}))}function Sp(i){v(document).off(".zui.global").on(i.map(e=>`${e}.zui.global`).join(" "),`[zui-on],${i.map(e=>`[zui-on-${e}]`)},[data-on]`,aw)}v(()=>{Sp(["click","change","inited"])});function dn(i,e){if(typeof i=="function")return dn(i(...e||[]));if(typeof i=="number")return[i];let t=i.match(/(\d+)(%|px)?/);return t?[parseInt(t[1]),t[2]]:(t=i.match(/(\d+)\/(\d+)/),t?[100*parseInt(t[1])/parseInt(t[2]),"%"]:[NaN])}function je(i,e){if(i==null)return null;const[t,s="px"]=dn(i,e);return Number.isNaN(t)?typeof i=="string"?i:null:`${t}${s}`}async function Ks(i,e){var s,n,r;if(i instanceof Blob){const o=document.createElement("a");return o.href=window.URL.createObjectURL(i),e&&(o.download=decodeURIComponent(e)),o.click(),o.remove(),i}if(i instanceof Response){const o=await i.blob();return e=e||((r=(n=(s=i.headers.get("Content-Disposition"))==null?void 0:s.split(";")[1])==null?void 0:n.split("=")[1])==null?void 0:r.replace(/"/g,"")),Ks(o,e)}const t=await fetch(i);return Ks(t)}class Tp{constructor(e){this._$target=v(e)}on(...e){return this._$target.on(...e),this}one(...e){return this._$target.one(...e),this}off(...e){return this._$target.off(...e),this}trigger(...e){return this._$target.trigger(...e),this}}const Ts=new Tp(document);v.bus=Ts,v.on=Ts.on.bind(Ts),v.one=Ts.one.bind(Ts),v.off=Ts.off.bind(Ts),v.trigger=Ts.trigger.bind(Ts);var lw=["Shift","Meta","Alt","Control"],$p=typeof navigator=="object"?navigator.platform:"",Dp=/Mac|iPod|iPhone|iPad/.test($p),cw=Dp?"Meta":"Control",hw=$p==="Win32"?["Control","Alt"]:Dp?["Alt"]:[];function Xc(i,e){return typeof i.getModifierState=="function"&&(i.getModifierState(e)||hw.includes(e)&&i.getModifierState("AltGraph"))}function dw(i){return i.trim().split(" ").map(function(e){var t=e.split(/\b\+/),s=t.pop();return[t=t.map(function(n){return n==="$mod"?cw:n}),s]})}function Ip(i,e){var t;e===void 0&&(e={});var s=(t=e.timeout)!=null?t:1e3,n=Object.keys(i).map(function(a){return[dw(a),i[a]]}),r=new Map,o=null;return function(a){a instanceof KeyboardEvent&&(n.forEach(function(l){var c=l[0],h=l[1],d=r.get(c)||c;(function(f,m){return!(m[1].toUpperCase()!==f.key.toUpperCase()&&m[1]!==f.code||m[0].find(function(y){return!Xc(f,y)})||lw.find(function(y){return!m[0].includes(y)&&m[1]!==y&&Xc(f,y)}))})(a,d[0])?d.length>1?r.set(c,d.slice(1)):(r.delete(c),h(a)):Xc(a,a.key)||r.delete(c)}),o&&clearTimeout(o),o=setTimeout(r.clear.bind(r),s))}}function uw(i,e,t){var s;t===void 0&&(t={});var n=(s=t.event)!=null?s:"keydown",r=Ip(e,t);return i.addEventListener(n,r),function(){i.removeEventListener(n,r)}}function Qc(i,e={}){if(!i)return;const t=Object.keys(e).reduce((s,n)=>(e[n].optional||(s[n]={...e[n]}),s),{});return Object.keys(i).forEach(s=>{const n=i[s];n?n===!0?e[s]&&(t[s]={...e[s]}):t[s]=n:delete t[s]}),Object.keys(t).reduce((s,n)=>{const{keys:r,handler:o}=t[n];return typeof r=="string"?s[r]=o:r.forEach(a=>{s[a]=o}),s},{})}function eh(i,e,t){const{timeout:s,event:n="keydown",scope:r,when:o}=t||{},a=Ip(e,{timeout:s}),l=`.zui.hotkeys${r?`.${r}`:""}`,c="zui-hotkeys-composing";return v(i).on(`${n}${l}`,function(h){o&&o(h)===!1||v(h.target).data(c)||a(h)}).on(`compositionstart${l}`,h=>{v(h.target).data(c,!0)}).on(`compositionend${l}`,h=>{v(h.target).removeData(c)})}function th(i,e){return v(i).off(`.zui.hotkeys${e?`.${e}`:""}`)}const fw=uw;v.fn.hotkeys=function(i,e){return eh(this,i,e)},v.fn.unbindHotkeys=function(i){return th(this,i)},v.hotkeys=function(i,e){eh(window,i,e)},v.unbindHotkeys=function(i){th(window,i)};function Zo(){return document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement}async function Mp(i){(typeof i=="string"||i instanceof Element||i instanceof v)&&(i={target:i});const{target:e,onError:t,onSuccess:s,afterExit:n,afterEnter:r}=i,o=v(e),a=o[0];if(!a)return;const l=a.requestFullscreen||a.webkitRequestFullscreen||a.mozRequestFullScreen;if(!l){t==null||t.call(a,new Error("[ZUI] The browser does not support full screen feature."));return}try{await l.call(a),s==null||s.call(a),v(a).off(".zui.fullscreen"),n&&o.on("exitFullscreen.zui.fullscreen",n),r&&o.on("enterFullscreen.zui.fullscreen",r)}catch(c){t==null||t.call(a,c)}document.zuiBindFullscreenChange||(document.zuiBindFullscreenChange=!0,v(document).on("fullscreenchange.zui webkitfullscreenchange.zui mozfullscreenchange.zui",c=>{const h=Zo();let d=h;h?v(h).addClass("is-in-fullscreen"):(d=v(document).find(".is-in-fullscreen")[0]||document,v(d).removeClass("is-in-fullscreen")),v("body").toggleClass("has-in-fullscreen",!!h);const f={event:c,target:d,fullscreenElement:h};v(d).trigger(h?"enterFullscreen":"exitFullscreen",f).trigger("toggleFullscreen",f)}))}async function Yo(i){const e=Zo();return i===!1&&!!e===i?i:e?(document.exitFullscreen(),!1):(await Mp(i),!0)}v.fn.fullscreen=function(i){return Yo({target:this,...i})},v.getFullscreenElement=Zo,v.toggleFullscreen=Yo;function $s(i){return!i||i.parentNode===document?!1:i.parentNode?$s(i.parentNode):!0}v.isDetached=$s,v.fn.isDetached=function(){const i=this[0];return!i||$s(i)};const Vn=class G_{constructor(e,t){var y,b;this._inited=!1,this._autoDestory=0,this._destroyed=!1;const{KEY:s,DATA_KEY:n,MULTI_INSTANCE:r,NAME:o,ATTR_KEY:a,ALL:l,TYPED_ALL:c}=this.constructor;if(!o)throw new Error('[ZUI] The component must have a "NAME" static property.');const h=v(e);if(h.data(s)&&!r)throw new Error(`[ZUI] The component "${o}" has been initialized on element.`);const d=h[0];if(!d)throw new Error(`[ZUI] Invalid selector "${e}" for component "${o}", can not find the element matched.`);const f=Xe();this._gid=f,this._element=d,this.resetOptions(t),this._key=this.options.key??`__${f}`;let m=l.get(d);if(m?m.add(this):(m=new Set([this]),l.set(d,m)),c.has(o)?(y=c.get(o))==null||y.add(this):c.set(o,new Set([this])),h.data(s,this).attr(a,"").attr(n,`${f}`).attr("z-use",[...new Set([...m||[]].map(w=>w.constructor.NAME))].join(",")),r){const w=`${s}:ALL`;let x=h.data(w);x||(x=new Map,h.data(w,x)),x.set(this._key,this)}this.init(),(b=this.options.$onCreate)==null||b.call(this),requestAnimationFrame(async()=>{var x;const{$fetcher:w}=this.options;if(w){const D=await Ne(w,[],{dataType:"js"});if(this.destroyed)return;D&&this.setOptions(D)}this._inited=!0,await this.afterInit(),this.emit("inited",this.options),(x=this.options.$onInited)==null||x.call(this)})}static get ZUI(){return this.NAME.replace(/(^[A-Z]+)/,e=>e.toLowerCase())}static get KEY(){return`zui.${this.NAME}`}static get NAMESPACE(){return`.zui.${this.ZUI}`}static get DATA_KEY(){return`data-zui-${this.NAME}`}static get ATTR_KEY(){return`z-use-${this.NAME}`}static get SELECTOR(){return`[${this.DATA_KEY}]`}get inited(){return this._inited}get destroyed(){return this._destroyed}get element(){if(!this._element)throw new Error("[ZUI] Component element is not available.");return this._element}get key(){return this._key}get options(){if(!this._options)throw new Error("[ZUI] Component options are not available.");return this._options}get gid(){return this._gid}get $element(){return v(this.element)}get $emitter(){return this.$element}get i18nData(){return[this.options.i18n,this.constructor.i18n]}init(){}afterInit(){}render(e,t){this._options=this.setOptions(e,t);const{$class:s,$style:n}=this.options;s&&this.$element.setClass(s),n&&this.$element.css(n)}destroy(){var m;const{KEY:e,DATA_KEY:t,ALL:s,TYPED_ALL:n,NAME:r,MULTI_INSTANCE:o,ATTR_KEY:a}=this.constructor,{$element:l,element:c}=this;if(this.emit("destroyed"),this._destroyed=!0,l.off(this.namespace).removeData(e).removeAttr(a).removeAttr(t),o){const y=this.$element.data(`${e}:ALL`);if(y)if(y.delete(this._key),y.size===0)this.$element.removeData(`${e}:ALL`);else{const b=y.values().next().value;l.data(e,b).attr(t,String(b==null?void 0:b.gid))}}const h=s.get(c);h&&(h.delete(this),h.size===0&&s.delete(c));const d=n.get(r);d&&(d.delete(this),d.size===0&&n.delete(r));const f=s.get(c);f!=null&&f.size?l.attr("z-use",[...new Set([...f].map(y=>y.constructor.NAME))].join(",")):l.removeAttr("z-use"),(m=this.options.$onDestroy)==null||m.call(this)}autoDestroy(e=100){this._autoDestory&&clearTimeout(this._autoDestory),this._autoDestory=window.setTimeout(()=>{this._autoDestory=0,$s(this.element)&&this.destroy()},e)}setOptions(e,t){if(t){const s={...this.constructor.DEFAULT,...(e==null?void 0:e.$optionsFromDataset)!==!1?this.$element.dataset():{},...e},{$options:n}=s;if(n){const r=typeof n=="function"?n.call(this,this.element,s):n;r&&v.extend(s,r),delete s.$options}this._options=s}else e&&v.extend(this._options,e);if(!this._options)throw new Error("[ZUI] Component options are not available.");return this._options}resetOptions(e){return this.setOptions(e,!0)}emit(e,...t){const s=v.Event(e);return s.__src=this,this.$emitter.trigger(s,[this,...t]),s}on(e,t,s){const n=this;this.$element[s!=null&&s.once?"one":"on"](this._wrapEvent(e),function(r,o){(!r.__src||r.__src===n)&&t.call(this,r,o)})}one(e,t){this.on(e,t,{once:!0})}off(e){this.$element.off(this._wrapEvent(e))}i18n(e,t,s){const{i18nData:n}=this;return Pe(n,e,t,s,this.options.lang,this.constructor.NAME)??Pe(n,e,t,s,this.options.lang)??`{i18n:${e}}`}get namespace(){return`${this.constructor.NAMESPACE}.${this._key}`}_wrapEvent(e){return e.split(" ").map(t=>t.includes(".")?t:`${t}${this.namespace}`).join(" ")}static get(e,t){const s=v(e);if(this.MULTI_INSTANCE&&t!==void 0){const n=s.data(`${this.KEY}:ALL`);return n?n.get(t):void 0}return s.data(this.KEY)}static isValid(e){return!0}static ensure(e,t){const s=this.get(e,t==null?void 0:t.key);if(s){if(this.isValid(s))return t&&s.setOptions(t),s;s.destroy()}return new this(e,t)}static getAll(e,t){var l;const{SELECTOR:s,ALL:n,TYPED_ALL:r}=this,o=[],a=c=>{c instanceof this&&(!t||t(c)!==!1)&&o.push(c)};return e?v(e).find(s).each((c,h)=>{var d;(d=n.get(h))==null||d.forEach(a)}):this!==G_?(l=r.get(this.NAME))==null||l.forEach(a):n.forEach(c=>{c.forEach(a)}),o.sort((c,h)=>c.gid-h.gid)}static query(e,t,s){return e===void 0?this.getAll(void 0,s).pop():this.get(v(e).closest(this.SELECTOR),t)}static defineFn(e){let t=e||this.ZUI;v.fn[t]&&(t=`zui${this.NAME}`);const s=this;v.fn.extend({[t](n,...r){const o=typeof n=="object"?n:void 0,a=typeof n=="string"?n:void 0;let l;return this.each((c,h)=>{let d=s.get(h);if(d)o&&d.render(o);else{if(a)return;d=new s(h,o)}if(a){let f=d[a],m=d;f===void 0&&(m=d.$,f=m[a]),typeof f=="function"?l=f.call(m,...r):l=f}}),l!==void 0?l:this}})}static register(e,t){var n,r;e=e||this,t=(t??e.NAME).toLowerCase(),this.map.set(t,e);const s=(r=(n=e.toggle)==null?void 0:n.name)==null?void 0:r.toLowerCase();s&&s!==t&&this.toggleMap.set(s,e)}};Vn.DEFAULT={},Vn.MULTI_INSTANCE=!1,Vn.ALL=new Map,Vn.TYPED_ALL=new Map,Vn.map=new Map,Vn.toggleMap=new Map;let Ge=Vn;function wr(i){return Ge.map.get(i.toLowerCase())}function Jo(i,e,t={}){let s=typeof i=="function"?i:wr(i);if(s||(s=sh(i)),!s)return null;const{$update:n,...r}=t;if(!s.MULTI_INSTANCE){const o=s.get(e);if(o)return n&&o.render(r,n==="reset"),o}return new s(e,r)}function Np(i,e,t={}){requestAnimationFrame(()=>Jo(i,e,t))}function Ep(i,e){Ge.register(i,e)}function sh(i){const{zui:e}=window;if(e){i=i==null?void 0:i.toLowerCase();for(const t in e){const s=t.toLowerCase()===i;if(i&&!s)continue;const n=e[t];if(!(typeof n!="function"||!n.NAME||!n.ZUI)&&(Ge.map.has(t.toLowerCase())||Ep(n),s))return n}}}function pw(i){var e;i?(e=wr(i))==null||e.defineFn():window._zuiDefined||(sh(),Ge.map.forEach(t=>{t.defineFn()}),Object.assign(window,{_zuiDefined:!0}))}function mw(i,e={}){const t=v(i);let s=t.attr("zui-create");const{update:n,onCreate:r}=e,o=(a,l)=>{if(l={$update:n,$optionsFromDataset:!1,...l},r){const h=r(a,l);if(h===!1)return;h&&(l=h)}const c=l.$lib;if(c){delete l.$lib,v.getLib(c).then(()=>Np(a,i,l));return}Np(a,i,l)};if(typeof s=="string"){s=s.trim();const a=s.length?s.split(",").map(h=>h.trim()):[],l=xi(i,{prefix:"zui-create-",evalValue:!0})||{},c=Object.keys(l);if(!c.length&&a.length===1)o(a[0],t.dataset());else{const h=new Set;[...a,...c].forEach(d=>{if(h.has(d))return;const f=l[d];o(d,f),delete l[d],h.add(d)})}}else{const a=t.dataset(),l=a==null?void 0:a.zui;if(!l)return;console.warn("[ZUI] create component instance with [data-zui] is deprecated, use [zui-create] instead.",{element:i,options:e}),a==null||delete a.zui,o(l,a)}}function gw(){v(document).on("click.zui.toggle mouseenter.zui.toggle","[data-toggle],[zui-toggle]",function(i){const e=v(this),t=e.dataset("toggle")||e.attr("zui-toggle");if(!t)return;const s=Ge.toggleMap.get(t)||wr(t),n=s==null?void 0:s.toggle;if(!n)return;const{trigger:r="click",skip:o="[disabled],.disabled",check:a}=n,l=i.type==="mouseover"?"hover":"click";if(!r.includes(l)||a&&!a.call(s,this,l,i)||o&&e.is(o))return;const{onGet:c,onCreate:h,setOptions:d=!0,getOptions:f,prevent:m=!0,handler:y,onToggle:b,convertHref:w}=n;let x=e.dataset();const D=e.attr(`zui-toggle-${t}`);if(D&&(x=v.extend(x,ln(D,["_element",this],["_$element",e]))),w&&e.is("a")){const E=e.attr("href");if(E){const P=w===!0?{selector:"target",url:"url"}:w;"#.".includes(E[0])?P.selector&&x[P.selector]===void 0&&(x[P.selector]=E):P.url&&x[P.url]===void 0&&(x[P.url]=E)}}if(f&&(x=f.call(s,this,x,i)),y){y.call(s,this,x,l,i),m&&i.preventDefault();return}let I=c?c.call(s,this):s.get(this);if(I)d&&I.setOptions(x);else{const E=h?h.call(s,this,i,x):new s(this,x);if(!E)return;I=E}if(b){if(b.call(s,I,this,i)===!1)return}else{const{shown:E,show:P,hide:O,toggle:U}=I;let J;if(U?J=U:P&&O?E?J=O:J=P:P&&(J=P),J)J.call(I);else return}m&&i.preventDefault()})}function yw(i,e){const t=vr(i),s=[];return Object.keys(t).forEach(n=>{if(!n.startsWith("zui."))return;const r=t[n];(e==null?void 0:e(r,n))!==!1&&s.push(t[n])}),s}let Xo=0;function Ap(i=100){if(Xo&&clearTimeout(Xo),i){Xo=window.setTimeout(()=>Ap(0),i);return}Xo=0,Ge.ALL.forEach(e=>{e.forEach(t=>!t.options.$notDestroyOnDetach&&t.autoDestroy())})}function vw(){if(!document.body||vr(document.body,"_autoDestoryMob"))return;const i=new MutationObserver(e=>{let t=!1;for(const s of e)if(s.removedNodes.length){t=!0;break}t&&Ap()});i.observe(document.body,{childList:!0,subtree:!0}),Bo(document.body,"_autoDestoryMob",i)}function nh(i,e){const t=v(i);t.find("[zui-create],[data-zui]").each(function(){var s;((s=e==null?void 0:e.beforeCreate)==null?void 0:s.call(e,this))!==!1&&mw(this,e)}),t.find("[zui-init]").each(function(){if(this.hasAttribute("z-zui-inited"))return;this.setAttribute("z-zui-inited","");const s=this.getAttribute("zui-init");s&&v.runJS(s,["$element",v(this)])}),t.find(".hide-before-init").removeClass("invisible hidden opacity-0"),t.find(".scroll-into-view").scrollIntoView(),t.find('[data-on="inited"],[zui-on-inited]').each((s,n)=>{const r=v(n);r.zui()||r.trigger("inited")}),e!=null&&e.runJS&&t.runJS()}v.fn.zuiInit=function(i){return nh(this,i),this},v.fn.zui=function(i,e){const t=this[0];if(!t)return;if(typeof i!="string"){const n={};let r;return yw(t,(o,a)=>{n[a]=o,(!r||r.gid1?t[0]:void 0,n=t[t.length>1?1:0],r=v(this).zui(s),o=r==null?void 0:r[n];typeof o=="function"&&o.apply(r,e)}),this},v(()=>{v("body").zuiInit({update:!0}),gw(),vw()});class Qo extends Ge{get $targets(){const{$element:e}=this,{targets:t}=this.options;return t?e.find(t):e}_handleScroll(e,t,s){const{offset:n=1}=this.options,r=this.$targets,o=e.getBoundingClientRect(),{scrollTop:a,scrollLeft:l}=e;r.each((c,h)=>{const d=h.getBoundingClientRect(),f=t==="top"&&a>0&&d.top<=o.top+n||t==="bottom"&&d.bottom>=o.bottom-n||t==="left"&&l>0&&d.left<=o.left+n||t==="right"&&l{this._raf&&cancelAnimationFrame(this._raf),this._raf=requestAnimationFrame(()=>{this._raf=0,this._handleScroll(l,t,n)})};this._scrollListener=c,l.addEventListener("scroll",c)}this._container=l,requestAnimationFrame(()=>{this._handleScroll(l,t,n)})}else this._ob=new IntersectionObserver(l=>{l.forEach(c=>{c.target.classList.toggle(n,c.intersectionRatiothis._ob.observe(c))}destroy(){var e;(e=this._ob)==null||e.disconnect(),this._container&&(this._container.removeEventListener("scroll",this._scrollListener),this._raf&&cancelAnimationFrame(this._raf))}}Qo.NAME="Sticky";const Si=24*60*60*1e3,Je=i=>i===void 0?new Date:(i instanceof Date||(typeof i=="string"&&(i=i.trim(),/^\d+$/.test(i)&&(i=Number.parseInt(i,10))),typeof i=="number"&&i<1e10&&(i*=1e3),i=new Date(i)),i),Pp=(i,e,t="day")=>{if(typeof e=="string"){const s=Number.parseInt(e,10);t=e.replace(s.toString(),""),e=s}return i=new Date(Je(i).getTime()),t==="month"?i.setMonth(i.getMonth()+e):t==="year"?i.setFullYear(i.getFullYear()+e):t==="week"?i.setDate(i.getDate()+e*7):t==="hour"?i.setHours(i.getHours()+e):t==="minute"?i.setMinutes(i.getMinutes()+e):t==="second"?i.setSeconds(i.getSeconds()+e):i.setDate(i.getDate()+e),i},un=(i,e=new Date)=>Je(i).toDateString()===Je(e).toDateString(),Cr=(i,e=new Date)=>Je(i).getFullYear()===Je(e).getFullYear(),ea=(i,e=new Date)=>(i=Je(i),e=Je(e),i.getFullYear()===e.getFullYear()&&i.getMonth()===e.getMonth()),_w=(i,e=new Date)=>{i=Je(i),e=Je(e);const t=1e3*60*60*24,s=Math.floor(i.getTime()/t),n=Math.floor(e.getTime()/t);return Math.floor((s+4)/7)===Math.floor((n+4)/7)},Lp=(i,e)=>un(Je(e),i),Rp=(i,e)=>un(Je(e).getTime()-Si,i),bw=(i,e)=>un(Je(e).getTime()+Si,i),ih=i=>i!=null&&!isNaN(Je(i).getTime()),rt=(i,e="yyyy-MM-dd hh:mm",t="")=>{if(i=Je(i),!ih(i))return t;if(typeof e=="function")return e(i);const s={"M+":i.getMonth()+1,"d+":i.getDate(),"h+":i.getHours(),"H+":i.getHours()%12,"m+":i.getMinutes(),"s+":i.getSeconds(),"S+":i.getMilliseconds()};return/(y+)/i.test(e)&&(e.includes("[yyyy-]")&&(e=e.replace("[yyyy-]",Cr(i)?"":"yyyy-")),e=e.replace(RegExp.$1,`${i.getFullYear()}`.substring(4-RegExp.$1.length))),Object.keys(s).forEach(n=>{if(new RegExp(`(${n})`).test(e)){const r=`${s[n]}`;e=e.replace(RegExp.$1,RegExp.$1.length===1?r:`00${r}`.substring(r.length))}}),e},ww=(i,e,t)=>{const s={full:"yyyy-M-d",month:"M-d",day:"d",str:"{0} ~ {1}",...t},n=rt(i,Cr(i)?s.month:s.full);if(un(i,e))return n;const r=rt(e,Cr(i,e)?ea(i,e)?s.day:s.month:s.full);return s.str.replace("{0}",n).replace("{1}",r)};function rh(i){let e=0;if(typeof i!="string"&&(i=String(i)),i&&i.length)for(let t=0;t{try{a.includes("%")&&(a=decodeURIComponent(a)),a=JSON.parse(a)}catch{}return[o,a]})),params:s.map(o=>{if(o!=="undefined"){if(o==="null")return null;try{return o.includes("%")&&(o=decodeURIComponent(o)),JSON.parse(o)}catch{return o}}})}}function zp(i){if(Array.isArray(i))return{commands:i.map(ta).filter(Boolean)};if(typeof i=="object")return i;i=i.replace(/^#!?/,"");const e=i.includes(">"),t=i.split(e?">":"|").map(ta);return{async:e,commands:t.filter(Boolean)}}function oh(i,e,t){if(typeof i=="string"&&(i=ta(i)),!i)return;const{execute:s,event:n,scope:r}=e;if(!(r&&i.scope&&i.scope!==r))return s({name:i.name,options:{...e.options,...i.options},event:n,scope:i.scope,prevResult:t},i.params)}async function ah(i,e){const{async:t,commands:s}=zp(i);if(!s.length)return[];const{signal:n}=e;if(t){const o=[];let a;for(const l of s){if(!(n!=null&&n.aborted))break;a=await oh(l,e,a),n!=null&&n.aborted&&(a=void 0),o.push(a)}return o}return await Promise.all(s.map(o=>{if(!(n!=null&&n.aborted))return oh(o,e)}))}const Ti="zui.commands",$i="z-commands",lh="zui-commands-proxy",Fp="zui-command",sa={};function Op(i,e){typeof i=="string"&&e?sa[i]=e:typeof i=="object"&&Object.assign(sa,i)}function Di(i,e){typeof e=="string"?e={scope:e}:typeof e=="function"&&(e={onCommand:e});const{scope:t="",events:s="click"}=e??{},n=v(i),r=(n.attr($i)||"").split(",");t&&!r.includes(t)&&r.push(t),n.attr($i,r.join(",")).data(Ti,{[t]:{...e,scope:t,events:s,gid:Xe()},...n.data(Ti)})}function xr(i,e=!0){const t=v(i);if(e===!0)t.removeAttr($i),t.removeData(Ti);else if(e.length){const s=t.data(Ti)||{};e.split(",").forEach(r=>{delete s[r]});const n=Object.keys(s);n.length?t.attr($i,n.join(",")).data(Ti,Di):xr(t,!0)}}function jp(i,e){let t=i.closest(`[${$i}],[${lh}]`).first();if(t.attr(lh)!==void 0&&(t=v(t.data("zui.commandProxy")||t.attr(lh)).closest(`[${$i}]`)),!t.length)return;const s=t.data(Ti)||{},n=Object.values(s).sort((o,a)=>a.gid-o.gid);let r;return e!=null&&e.length?(r=n.find(o=>o.scope===e),r||(r=n.find(o=>{var a;return!((a=o.scope)!=null&&a.length)&&!o.scoped})),r):(r=n.find(o=>{var a;return!((a=o.scope)!=null&&a.length)&&!o.scoped}),r||(r=n.find(o=>!o.scoped)),r?r.element=t[0]:r=jp(i.parent(),e),r)}function Cw(i){if(!i.currentTarget)return;const e=v(i.currentTarget);if(e.closest(".disabled,[disabled]").length)return;const t=e.attr(Fp)||(e.is('a[href^="#!"]')?e.attr("href"):"");if(!t)return;const s=new AbortController,n=()=>s.abort();ah(t,{signal:s.signal,execute:(r,o)=>{const{scope:a,name:l}=r,c={...r,abort:n};let h;const d=jp(e,a);if(d){c.element=d.element;const m=(d.commands?d.commands[`${a}~${l}`]||d.commands[l]:null)||d.onCommand;if(m&&(h=m(c,o),i.commandHandled))return h}const f=[c,o];if(e.trigger("command",f).trigger(`command:${a?`${l}.${a}`:l}`,f),a&&e.trigger(`command:.${a}`,f),i.commandHandled)return h;if(a==="event"){l==="stop"?i.stopPropagation():l==="prevent"?i.preventDefault():ls(i,l,o);return}if(a!=null&&a.startsWith(".")){let m;if(a===".")m=e.closest("[z-use]").zui();else{const y=a.substring(1);m=e.closest(`[z-use-${y}]`).zui(y)}if(m)return ls(m,l,o);console.warn(`[ZUI] Command "${l}" not found in scope "${a}".`);return}return a==="window"?ls(window,l,o):a==="zui"?ls(window.zui,l,o):a==="target"?ls(e[0],l,o):a==="$target"?ls(e,l,o):a==="$"?ls(v,l,o):a===""&&sa[l]!==void 0?sa[l](c,o):h},event:i})}v.fn.command=function(i,e){return this.on(`command:${i}`,e)},v.fn.offCommand=function(i,e){return this.off(`command:${i}`,e)},v.fn.commands=function(i){return this.each((e,t)=>Di(t,i)),this},v.fn.unbindCommands=function(i){return this.each((e,t)=>xr(t,i)),this},v(()=>{v(document).on("click.zui.command",`[${Fp}],a[href^="#!"]`,Cw)});function kr(i,e,t=!1){var n;const s=v(i);if(e!==void 0){if(typeof e=="string"&&e.length){const r=`zui-runjs-${Xe()}`;s.append(`