diff --git a/www/js/zui3/zui.zentao.js b/www/js/zui3/zui.zentao.js index 9760eb5950..7b26cae98a 100644 --- a/www/js/zui3/zui.zentao.js +++ b/www/js/zui3/zui.zentao.js @@ -1,46 +1,15 @@ -var xd=($,st,Ot)=>{if(!st.has($))throw TypeError("Cannot "+Ot)};var Rt=($,st,Ot)=>(xd($,st,"read from private field"),Ot?Ot.call($):st.get($)),qt=($,st,Ot)=>{if(st.has($))throw TypeError("Cannot add the same private member more than once");st instanceof WeakSet?st.add($):st.set($,Ot)},Xt=($,st,Ot,Al)=>(xd($,st,"write to private field"),Al?Al.call($,Ot):st.set($,Ot),Ot);var Sd=($,st,Ot)=>(xd($,st,"access private method"),Ot);(function($,st){typeof exports=="object"&&typeof module<"u"?st(exports):typeof define=="function"&&define.amd?define(["exports"],st):($=typeof globalThis<"u"?globalThis:$||self,st($.zui={}))})(this,function($){var Za,el,Ur,Wr,Vr,Kr,qr,Gr,tl,Pv,nl,Lv,ii,si;"use strict";const st="",Ot="",Al="",vT="",_T="",bT="",wT="",CT="",xT="",ST="",kT="",TT="",jv="3.0.0",Bv="production",wn=document,uo=window,Id=wn.documentElement,pi=wn.createElement.bind(wn),$d=pi("div"),El=pi("table"),Hv=pi("tbody"),Ad=pi("tr"),{isArray:ho,prototype:Ed}=Array,{concat:Uv,filter:Nl,indexOf:Nd,map:Md,push:Wv,slice:Pd,some:Ml,splice:Vv}=Ed,Kv=/^#(?:[\w-]|\\.|[^\x00-\xa0])*$/,qv=/^\.(?:[\w-]|\\.|[^\x00-\xa0])*$/,Gv=/<.+>/,Yv=/^\w+$/;function Pl(n,e){const t=Xv(e);return!n||!t&&!mi(e)&&!at(e)?[]:!t&&qv.test(n)?e.getElementsByClassName(n.slice(1).replace(/\\/g,"")):!t&&Yv.test(n)?e.getElementsByTagName(n):e.querySelectorAll(n)}class fo{constructor(e,t){if(!e)return;if(Ll(e))return e;let i=e;if(kt(e)){const s=t||wn;if(i=Kv.test(e)&&mi(s)?s.getElementById(e.slice(1).replace(/\\/g,"")):Gv.test(e)?jd(e):Ll(s)?s.find(e):kt(s)?y(s).find(e):Pl(e,s),!i)return}else if(gi(e))return this.ready(e);(i.nodeType||i===uo)&&(i=[i]),this.length=i.length;for(let s=0,r=this.length;s{for(;e.firstChild;)e.removeChild(e.firstChild)})};function po(...n){const e=Jv(n[0])?n.shift():!1,t=n.shift(),i=n.length;if(!t)return{};if(!i)return po(e,y,t);for(let s=0;s{at(r)&&mt(t,(o,a)=>{i?e?r.classList.add(a):r.classList.remove(a):r.classList.toggle(a)})})},ie.addClass=function(n){return this.toggleClass(n,!0)},ie.removeAttr=function(n){const e=mo(n);return this.each((t,i)=>{at(i)&&mt(e,(s,r)=>{i.removeAttribute(r)})})};function e_(n,e){if(n){if(kt(n)){if(arguments.length<2){if(!this[0]||!at(this[0]))return;const t=this[0].getAttribute(n);return js(t)?void 0:t}return Ft(e)?this:js(e)?this.removeAttr(n):this.each((t,i)=>{at(i)&&i.setAttribute(n,e)})}for(const t in n)this.attr(t,n[t]);return this}}ie.attr=e_,ie.removeClass=function(n){return arguments.length?this.toggleClass(n,!1):this.attr("class","")},ie.hasClass=function(n){return!!n&&Ml.call(this,e=>at(e)&&e.classList.contains(n))},ie.get=function(n){return Ft(n)?Pd.call(this):(n=Number(n),this[n<0?n+this.length:n])},ie.eq=function(n){return y(this.get(n))},ie.first=function(){return this.eq(0)},ie.last=function(){return this.eq(-1)};function t_(n){return Ft(n)?this.get().map(e=>at(e)||Qv(e)?e.textContent:"").join(""):this.each((e,t)=>{at(t)&&(t.textContent=n)})}ie.text=t_;function Cn(n,e,t){if(!at(n))return;const i=uo.getComputedStyle(n,null);return t?i.getPropertyValue(e)||void 0:i[e]||n.style[e]}function ln(n,e){return parseInt(Cn(n,e),10)||0}function Rd(n,e){return ln(n,`border${e?"Left":"Top"}Width`)+ln(n,`padding${e?"Left":"Top"}`)+ln(n,`padding${e?"Right":"Bottom"}`)+ln(n,`border${e?"Right":"Bottom"}Width`)}const Ol={};function n_(n){if(Ol[n])return Ol[n];const e=pi(n);wn.body.insertBefore(e,null);const t=Cn(e,"display");return wn.body.removeChild(e),Ol[n]=t!=="none"?t:"block"}function Od(n){return Cn(n,"display")==="none"}function Fd(n,e){const t=n&&(n.matches||n.webkitMatchesSelector||n.msMatchesSelector);return!!t&&!!e&&t.call(n,e)}function go(n){return kt(n)?(e,t)=>Fd(t,n):gi(n)?n:Ll(n)?(e,t)=>n.is(t):n?(e,t)=>t===n:()=>!1}ie.filter=function(n){const e=go(n);return y(Nl.call(this,(t,i)=>e.call(t,i,t)))};function zn(n,e){return e?n.filter(e):n}ie.detach=function(n){return zn(this,n).each((e,t)=>{t.parentNode&&t.parentNode.removeChild(t)}),this};const i_=/^\s*<(\w+)[^>]*>/,s_=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,zd={"*":$d,tr:Hv,td:Ad,th:Ad,thead:El,tbody:El,tfoot:El};function jd(n){if(!kt(n))return[];if(s_.test(n))return[pi(RegExp.$1)];const e=i_.test(n)&&RegExp.$1,t=zd[e]||zd["*"];return t.innerHTML=n,y(t.childNodes).detach().get()}y.parseHTML=jd,ie.has=function(n){const e=kt(n)?(t,i)=>Pl(n,i).length:(t,i)=>i.contains(n);return this.filter(e)},ie.not=function(n){const e=go(n);return this.filter((t,i)=>(!kt(n)||at(i))&&!e.call(i,t,i))};function xn(n,e,t,i){const s=[],r=gi(e),o=i&&go(i);for(let a=0,l=n.length;ae.selected&&!e.disabled&&!e.parentNode.disabled),"value"):n.value||""}function r_(n){return arguments.length?this.each((e,t)=>{const i=t.multiple&&t.options;if(i||Jd.test(t.type)){const s=ho(n)?Md.call(n,String):js(n)?[]:[String(n)];i?mt(t.options,(r,o)=>{o.selected=s.indexOf(o.value)>=0},!0):t.checked=s.indexOf(t.value)>=0}else t.value=Ft(n)||js(n)?"":n}):this[0]&&Bd(this[0])}ie.val=r_,ie.is=function(n){const e=go(n);return Ml.call(this,(t,i)=>e.call(t,i,t))},y.guid=1;function cn(n){return n.length>1?Nl.call(n,(e,t,i)=>Nd.call(i,e)===t):n}y.unique=cn,ie.add=function(n,e){return y(cn(this.get().concat(y(n,e).get())))},ie.children=function(n){return zn(y(cn(xn(this,e=>e.children))),n)},ie.parent=function(n){return zn(y(cn(xn(this,"parentNode"))),n)},ie.index=function(n){const e=n?y(n)[0]:this[0],t=n?this:y(e).parent().children();return Nd.call(t,e)},ie.closest=function(n){const e=this.filter(n);if(e.length)return e;const t=this.parent();return t.length?t.closest(n):e},ie.siblings=function(n){return zn(y(cn(xn(this,e=>y(e).parent().children().not(e)))),n)},ie.find=function(n){return y(cn(xn(this,e=>Pl(n,e))))};const o_=/^\s*\s*$/g,a_=/^$|^module$|\/(java|ecma)script/i,l_=["type","src","nonce","noModule"];function c_(n,e){const t=y(n);t.filter("script").add(t.find("script")).each((i,s)=>{if(a_.test(s.type)&&Id.contains(s)){const r=pi("script");r.text=s.textContent.replace(o_,""),mt(l_,(o,a)=>{s[a]&&(r[a]=s[a])}),e.head.insertBefore(r,null),e.head.removeChild(r)}})}function u_(n,e,t,i,s){i?n.insertBefore(e,t?n.firstChild:null):n.nodeName==="HTML"?n.parentNode.replaceChild(e,n):n.parentNode.insertBefore(e,t?n:n.nextSibling),s&&c_(e,n.ownerDocument)}function jn(n,e,t,i,s,r,o,a){return mt(n,(l,c)=>{mt(y(c),(h,u)=>{mt(y(e),(p,m)=>{const v=t?u:m,b=t?m:u,C=t?h:p;u_(v,C?b.cloneNode(!0):b,i,s,!C)},a)},o)},r),e}ie.after=function(){return jn(arguments,this,!1,!1,!1,!0,!0)},ie.append=function(){return jn(arguments,this,!1,!1,!0)};function h_(n){if(!arguments.length)return this[0]&&this[0].innerHTML;if(Ft(n))return this;const e=/]/.test(n);return this.each((t,i)=>{at(i)&&(e?y(i).empty().append(n):i.innerHTML=n)})}ie.html=h_,ie.appendTo=function(n){return jn(arguments,this,!0,!1,!0)},ie.wrapInner=function(n){return this.each((e,t)=>{const i=y(t),s=i.contents();s.length?s.wrapAll(n):i.append(n)})},ie.before=function(){return jn(arguments,this,!1,!0)},ie.wrapAll=function(n){let e=y(n),t=e[0];for(;t.children.length;)t=t.firstElementChild;return this.first().before(e),this.appendTo(t)},ie.wrap=function(n){return this.each((e,t)=>{const i=y(n)[0];y(t).wrapAll(e?i.cloneNode(!0):i)})},ie.insertAfter=function(n){return jn(arguments,this,!0,!1,!1,!1,!1,!0)},ie.insertBefore=function(n){return jn(arguments,this,!0,!0)},ie.prepend=function(){return jn(arguments,this,!1,!0,!0,!0,!0)},ie.prependTo=function(n){return jn(arguments,this,!0,!0,!0,!1,!1,!0)},ie.contents=function(){return y(cn(xn(this,n=>n.tagName==="IFRAME"?[n.contentDocument]:n.tagName==="TEMPLATE"?n.content.childNodes:n.childNodes)))},ie.next=function(n,e,t){return zn(y(cn(xn(this,"nextElementSibling",e,t))),n)},ie.nextAll=function(n){return this.next(n,!0)},ie.nextUntil=function(n,e){return this.next(e,!0,n)},ie.parents=function(n,e){return zn(y(cn(xn(this,"parentElement",!0,e))),n)},ie.parentsUntil=function(n,e){return this.parents(e,n)},ie.prev=function(n,e,t){return zn(y(cn(xn(this,"previousElementSibling",e,t))),n)},ie.prevAll=function(n){return this.prev(n,!0)},ie.prevUntil=function(n,e){return this.prev(e,!0,n)},ie.map=function(n){return y(Uv.apply([],Md.call(this,(e,t)=>n.call(e,t,e))))},ie.clone=function(){return this.map((n,e)=>e.cloneNode(!0))},ie.offsetParent=function(){return this.map((n,e)=>{let t=e.offsetParent;for(;t&&Cn(t,"position")==="static";)t=t.offsetParent;return t||Id})},ie.slice=function(n,e){return y(Pd.call(this,n,e))};const d_=/-([a-z])/g;function Fl(n){return n.replace(d_,(e,t)=>t.toUpperCase())}ie.ready=function(n){const e=()=>setTimeout(n,0,y);return wn.readyState!=="loading"?e():wn.addEventListener("DOMContentLoaded",e),this},ie.unwrap=function(){return this.parent().each((n,e)=>{if(e.tagName==="BODY")return;const t=y(e);t.replaceWith(t.children())}),this},ie.offset=function(){const n=this[0];if(!n)return;const e=n.getBoundingClientRect();return{top:e.top+uo.pageYOffset,left:e.left+uo.pageXOffset}},ie.position=function(){const n=this[0];if(!n)return;const e=Cn(n,"position")==="fixed",t=e?n.getBoundingClientRect():this.offset();if(!e){const i=n.ownerDocument;let s=n.offsetParent||i.documentElement;for(;(s===i.body||s===i.documentElement)&&Cn(s,"position")==="static";)s=s.parentNode;if(s!==n&&at(s)){const r=y(s).offset();t.top-=r.top+ln(s,"borderTopWidth"),t.left-=r.left+ln(s,"borderLeftWidth")}}return{top:t.top-ln(n,"marginTop"),left:t.left-ln(n,"marginLeft")}};const Hd={class:"className",contenteditable:"contentEditable",for:"htmlFor",readonly:"readOnly",maxlength:"maxLength",tabindex:"tabIndex",colspan:"colSpan",rowspan:"rowSpan",usemap:"useMap"};ie.prop=function(n,e){if(n){if(kt(n))return n=Hd[n]||n,arguments.length<2?this[0]&&this[0][n]:this.each((t,i)=>{i[n]=e});for(const t in n)this.prop(t,n[t]);return this}},ie.removeProp=function(n){return this.each((e,t)=>{delete t[Hd[n]||n]})};const f_=/^--/;function zl(n){return f_.test(n)}const jl={},{style:p_}=$d,m_=["webkit","moz","ms"];function g_(n,e=zl(n)){if(e)return n;if(!jl[n]){const t=Fl(n),i=`${t[0].toUpperCase()}${t.slice(1)}`,s=`${t} ${m_.join(`${i} `)}${i}`.split(" ");mt(s,(r,o)=>{if(o in p_)return jl[n]=o,!1})}return jl[n]}const y_={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 Ud(n,e,t=zl(n)){return!t&&!y_[n]&&Ld(e)?`${e}px`:e}function v_(n,e){if(kt(n)){const t=zl(n);return n=g_(n,t),arguments.length<2?this[0]&&Cn(this[0],n,t):n?(e=Ud(n,e,t),this.each((i,s)=>{at(s)&&(t?s.style.setProperty(n,e):s.style[n]=e)})):this}for(const t in n)this.css(t,n[t]);return this}ie.css=v_;function Wd(n,e){try{return n(e)}catch{return e}}const __=/^\s+|\s+$/;function Vd(n,e){const t=n.dataset[e]||n.dataset[Fl(e)];return __.test(t)?t:Wd(JSON.parse,t)}function b_(n,e,t){t=Wd(JSON.stringify,t),n.dataset[Fl(e)]=t}function w_(n,e){if(!n){if(!this[0])return;const t={};for(const i in this[0].dataset)t[i]=Vd(this[0],i);return t}if(kt(n))return arguments.length<2?this[0]&&Vd(this[0],n):Ft(e)?this:this.each((t,i)=>{b_(i,n,e)});for(const t in n)this.data(t,n[t]);return this}ie.data=w_;function Kd(n,e){const t=n.documentElement;return Math.max(n.body[`scroll${e}`],t[`scroll${e}`],n.body[`offset${e}`],t[`offset${e}`],t[`client${e}`])}mt([!0,!1],(n,e)=>{mt(["Width","Height"],(t,i)=>{const s=`${e?"outer":"inner"}${i}`;ie[s]=function(r){if(this[0])return Gi(this[0])?e?this[0][`inner${i}`]:this[0].document.documentElement[`client${i}`]:mi(this[0])?Kd(this[0],i):this[0][`${e?"offset":"client"}${i}`]+(r&&e?ln(this[0],`margin${t?"Top":"Left"}`)+ln(this[0],`margin${t?"Bottom":"Right"}`):0)}})}),mt(["Width","Height"],(n,e)=>{const t=e.toLowerCase();ie[t]=function(i){if(!this[0])return Ft(i)?void 0:this;if(!arguments.length)return Gi(this[0])?this[0].document.documentElement[`client${e}`]:mi(this[0])?Kd(this[0],e):this[0].getBoundingClientRect()[t]-Rd(this[0],!n);const s=parseInt(i,10);return this.each((r,o)=>{if(!at(o))return;const a=Cn(o,"boxSizing");o.style[t]=Ud(t,s+(a==="border-box"?Rd(o,!n):0))})}});const qd="___cd";ie.toggle=function(n){return this.each((e,t)=>{if(!at(t))return;const i=Od(t);(Ft(n)?i:n)?(t.style.display=t[qd]||"",Od(t)&&(t.style.display=n_(t.tagName))):i||(t[qd]=Cn(t,"display"),t.style.display="none")})},ie.hide=function(){return this.toggle(!1)},ie.show=function(){return this.toggle(!0)};const Gd="___ce",Bl=".",Hl={focus:"focusin",blur:"focusout"},Yd={mouseenter:"mouseover",mouseleave:"mouseout"},C_=/^(mouse|pointer|contextmenu|drag|drop|click|dblclick)/i;function Ul(n){return Yd[n]||Hl[n]||n}function Wl(n){const e=n.split(Bl);return[e[0],e.slice(1).sort()]}ie.trigger=function(n,e){if(kt(n)){const[i,s]=Wl(n),r=Ul(i);if(!r)return this;const o=C_.test(r)?"MouseEvents":"HTMLEvents";n=wn.createEvent(o),n.initEvent(r,!0,!0),n.namespace=s.join(Bl),n.___ot=i}n.___td=e;const t=n.___ot in Hl;return this.each((i,s)=>{t&&gi(s[n.___ot])&&(s[`___i${n.type}`]=!0,s[n.___ot](),s[`___i${n.type}`]=!1),s.dispatchEvent(n)})};function Xd(n){return n[Gd]=n[Gd]||{}}function x_(n,e,t,i,s){const r=Xd(n);r[e]=r[e]||[],r[e].push([t,i,s]),n.addEventListener(e,s)}function Qd(n,e){return!e||!Ml.call(e,t=>n.indexOf(t)<0)}function yo(n,e,t,i,s){const r=Xd(n);if(e)r[e]&&(r[e]=r[e].filter(([o,a,l])=>{if(s&&l.guid!==s.guid||!Qd(o,t)||i&&i!==a)return!0;n.removeEventListener(e,l)}));else for(e in r)yo(n,e,t,i,s)}ie.off=function(n,e,t){if(Ft(n))this.each((i,s)=>{!at(s)&&!mi(s)&&!Gi(s)||yo(s)});else if(kt(n))gi(e)&&(t=e,e=""),mt(mo(n),(i,s)=>{const[r,o]=Wl(s),a=Ul(r);this.each((l,c)=>{!at(c)&&!mi(c)&&!Gi(c)||yo(c,a,o,e,t)})});else for(const i in n)this.off(i,n[i]);return this},ie.remove=function(n){return zn(this,n).detach().off(),this},ie.replaceWith=function(n){return this.before(n).remove()},ie.replaceAll=function(n){return y(n).replaceWith(this),this};function S_(n,e,t,i,s){if(!kt(n)){for(const r in n)this.on(r,e,t,n[r],s);return this}return kt(e)||(Ft(e)||js(e)?e="":Ft(t)?(t=e,e=""):(i=t,t=e,e="")),gi(i)||(i=t,t=void 0),i?(mt(mo(n),(r,o)=>{const[a,l]=Wl(o),c=Ul(a),h=a in Yd,u=a in Hl;c&&this.each((p,m)=>{if(!at(m)&&!mi(m)&&!Gi(m))return;const v=function(b){if(b.target[`___i${b.type}`])return b.stopImmediatePropagation();if(b.namespace&&!Qd(l,b.namespace.split(Bl))||!e&&(u&&(b.target!==m||b.___ot===c)||h&&b.relatedTarget&&m.contains(b.relatedTarget)))return;let C=m;if(e){let D=b.target;for(;!Fd(D,e);)if(D===m||(D=D.parentNode,!D))return;C=D}Object.defineProperty(b,"currentTarget",{configurable:!0,get(){return C}}),Object.defineProperty(b,"delegateTarget",{configurable:!0,get(){return m}}),Object.defineProperty(b,"data",{configurable:!0,get(){return t}});const S=i.call(C,b,b.___td);s&&yo(m,c,l,e,v),S===!1&&(b.preventDefault(),b.stopPropagation())};v.guid=i.guid=i.guid||y.guid++,x_(m,c,l,e,v)})}),this):this}ie.on=S_;function k_(n,e,t,i){return this.on(n,e,t,i,!0)}ie.one=k_;const T_=/\r?\n/g;function D_(n,e){return`&${encodeURIComponent(n)}=${encodeURIComponent(e.replace(T_,`\r -`))}`}const I_=/file|reset|submit|button|image/i,Jd=/radio|checkbox/i;ie.serialize=function(){let n="";return this.each((e,t)=>{mt(t.elements||[t],(i,s)=>{if(s.disabled||!s.name||s.tagName==="FIELDSET"||I_.test(s.type)||Jd.test(s.type)&&!s.checked)return;const r=Bd(s);if(!Ft(r)){const o=ho(r)?r:[r];mt(o,(a,l)=>{n+=D_(s.name,l)})}})}),n.slice(1)},window.$=y;function Zd(n,e){if(n==null)return[n,void 0];typeof e=="string"&&(e=e.split("."));const t=e.join(".");let i=n;const s=[i];for(;typeof i=="object"&&i!==null&&e.length;){let r=e.shift(),o;const a=r.indexOf("[");if(a>0&&a{const s=t[i]??"";n=n.replace(new RegExp(`\\{${i}\\}`,"g"),`${s}`)}),n}for(let t=0;t(n[n.B=1]="B",n[n.KB=1024]="KB",n[n.MB=1048576]="MB",n[n.GB=1073741824]="GB",n[n.TB=1099511627776]="TB",n))(Vl||{});function vt(n,e=2,t){return Number.isNaN(n)?"?KB":(t||(n<1024?t="B":n<1048576?t="KB":n<1073741824?t="MB":n<1099511627776?t="GB":t="TB"),(n/Vl[t]).toFixed(e)+t)}const Sn=n=>{const e=/^[0-9]*(B|KB|MB|GB|TB)$/;n=n.toUpperCase(),n.endsWith("B")||(n+="B");const t=n.match(e);if(!t)return 0;const i=t[1];return n=n.replace(i,""),Number.parseInt(n,10)*Vl[i]};let Kl=(document.documentElement.getAttribute("lang")||"zh_cn").toLowerCase().replace("-","_"),kn;function ef(){return Kl}function A_(n){Kl=n.toLowerCase().replace("-","_")}function tf(n,e){kn||(kn={}),typeof n=="string"&&(n={[n]:e??{}}),y.extend(!0,kn,n)}function Ne(n,e,t,i,s,r){Array.isArray(n)?kn&&n.unshift(kn):n=kn?[kn,n]:[n],typeof t=="string"&&(r=s,s=i,i=t,t=void 0);const o=s||Kl;let a;for(const l of n){if(!l)continue;const c=l[o]||l.default;if(!c)continue;const h=r&&l===kn?`${r}.${e}`:e;if(a=Bs(c,h),a!==void 0)break}return a===void 0?i:t?we(a,...Array.isArray(t)?t:[t]):a}function E_(n,e,t,i){return Ne(void 0,n,e,t,i)}Ne.addLang=tf,Ne.getLang=E_,Ne.getCode=ef,Ne.setCode=A_,Ne.map=kn,tf({zh_cn:{confirm:"确定",save:"保存",cancel:"取消",delete:"删除",reset:"重置",add:"添加",copy:"复制",close:"关闭"},zh_tw:{confirm:"確定",save:"儲存",cancel:"取消",delete:"刪除",reset:"重置",add:"添加",Copy:"複製",close:"關閉"},en:{confirm:"Confirm",save:"Save",cancel:"Cancel",delete:"Delete",reset:"Reset",add:"Add",copy:"Copy",close:"Close"}});function yi(n,e,t){t!=null&&(Array.isArray(t)?t.forEach(i=>yi(n,e,i)):!(t instanceof Blob)&&y.isPlainObject(t)?Object.entries(t).forEach(([i,s])=>{yi(n,`${e}[${i}]`,s)}):n.append(e,t instanceof Blob?t:String(t)))}function vo(n,e){const t=e||new FormData;return n&&(typeof n=="string"&&(n=new URLSearchParams(n)),n instanceof URLSearchParams?n.forEach((i,s)=>{yi(t,s,i)}):Array.isArray(n)?n.forEach(([i,s])=>{yi(t,i,s)}):n instanceof FormData?n.forEach((i,s)=>{yi(t,s,i)}):typeof n=="object"&&n&&Object.entries(n).forEach(([i,s])=>{yi(t,i,s)})),t}function nf(n,e,t){n instanceof Headers?n.set(e,t):Array.isArray(n)?n.push([e,t]):n[e]=t}function N_(n,e){if(n){const t={text:"text/plain",html:"text/html",json:"application/json",...e};for(const[i,s]of Object.entries(t))if(s.split(",").map(r=>r.trim()).includes(n))return i}return"text"}class Hs{get completed(){return this.data!==void 0||this.error!==void 0}get[Symbol.toStringTag](){return"Ajax"}constructor(e){this.setting=e,this._controller=new AbortController,this._callbacks={success:[],error:[],complete:[]}}on(e,t){return this._callbacks[e].push(t),this}success(e){return this.on("success",e)}done(e){return this.success(e)}fail(e){return this.on("error",e)}complete(e){return this.on("complete",e)}always(e){return this.complete(e)}then(e,t){return this.completed?t&&this.error?t(this.error):e(this.data):(this.success(i=>e(i)),t&&this.fail(t)),this}catch(e){return this.error?(e(this.error),this):this.on("error",t=>e(t))}finally(e){return this.completed?(e(),this):this.complete(()=>e())}abort(e){return this.completed?!1:(this._abortError=e,this._controller.abort(),!0)}getResponseHeader(e){var t;return(t=this.response)==null?void 0:t.headers.get(e)}_init(){if(this.completed)return;const{url:e,type:t,data:i,processData:s=!0,contentType:r,crossDomain:o,accepts:a,dataType:l,timeout:c,dataFilter:h,beforeSend:u,success:p,error:m,complete:v,...b}=this.setting;t&&(b.method=t);let C=i;C&&(s&&(C=vo(C)),b.body=C),o&&(b.mode="cors");const S=b.headers||{};nf(S,"X-Requested-With","XMLHttpRequest"),r&&nf(S,"Content-Type",r),b.headers=S,b.signal&&b.signal.addEventListener("abort",()=>{this.abort()});const D=[...this.constructor.globalBeforeSends,u];for(const N of D){if(!N)continue;const P=N.call(this,b);if(P===!1)return;P&&Object.assign(b,P)}p&&this.success(p),m&&this.fail(m),v&&this.complete(v),b.signal=this._controller.signal,this.url=e,this.request=b}_emit(e,...t){this._callbacks[e].forEach(i=>{i.call(this,...t)})}async send(){var h;if(this.completed)return[];this._init();const{timeout:e,dataType:t,accepts:i,dataFilter:s,throws:r,jsonParser:o}=this.setting;e&&(this._timeoutID=window.setTimeout(()=>{this.abort(new Error("timeout"))},e));let a,l,c;try{a=await fetch(this.url,this.request),this.response=a;const{statusText:u}=a;if(a.ok){const p=(h=a.headers.get("Content-Disposition"))==null?void 0:h.startsWith("attachment"),m=p?"blob":t||N_(a.headers.get("Content-Type"),i);p||m==="blob"||m==="file"?c=await a.blob():m==="json"?typeof o=="function"?(c=await a.text(),c=o(c)):c=await a.json():c=await a.text(),this.data=c;const v=(s==null?void 0:s(c,m))??c;this._emit("success",v,u,a)}else throw this.data=await a.text(),new Error(u)}catch(u){this.data===void 0&&c!==void 0&&(this.data=c),l=u;let p=!1;l.name==="AbortError"&&(this._abortError?l=this._abortError:p=!0),this.error=l,p||this._emit("error",l,a==null?void 0:a.statusText,l.message)}if(this._timeoutID&&clearTimeout(this._timeoutID),this._emit("complete",a,a==null?void 0:a.statusText),l&&r)throw l;return[c,l,a]}}Hs.globalBeforeSends=[],y.ajax=(n,e)=>{e=e||{},typeof n=="string"?e.url=n:y.extend(e,n);const t=new Hs(e);return t.send(),t},y.getJSON=(n,e,t)=>(typeof e=="function"&&(t=e,e=void 0),y.ajax({url:n,data:e,success:t,dataType:"json"})),y.get=(n,e,t,i,s="GET")=>{let r,o;return typeof e=="function"?(r=e,o=void 0):o=e,typeof t=="function"?(r=t,i=void 0):i=t,y.ajax({method:s,url:n,data:o,success:r,dataType:i})},y.post=(n,e,t,i)=>y.get(n,e,t,i,"POST"),y.fn.load=function(n,e,t){typeof e=="function"&&(t=e,e=void 0);const[i,s]=n.split(" ");return y.get(i,e,(r,o,a)=>{s&&(r=y(r).find(s).html()),y(this).html(r).zuiInit(),t==null||t.call(this,r,o,a)},"html"),this};async function _t(n,e=[],t,i,s){const r={throws:!0,dataType:"json"};if(typeof n=="string")r.url=n;else if(typeof n=="object")y.extend(r,n);else if(typeof n=="function"){const l=n.call(i,...e);return l instanceof Promise?await l:l}t&&y.extend(r,typeof t=="function"?t(r):t),r.url&&(r.url=we(r.url,...e));const o=new Hs(r);s==null||s(o);const[a]=await o.send();return a}function ql(n){return!!(n&&(typeof n=="string"||typeof n=="object"&&n.url||typeof n=="function"))}y.fetch=_t;function Tt(){return y.guid++}function _o(n,e){if(n===e)return!1;if(n&&e){const t=typeof n,i=typeof e;if(t!==i)return!0;if(t==="object"&&i==="object"){const s=Array.isArray(n),r=Array.isArray(e);if(s!==r)return!0;if(s&&r){if(n.length!==e.length)return!0;for(let l=0;li instanceof vi?i.value!==t[s]:_o(i,t[s])))&&(this._value=this._compute(),this._lastDependencies=e.map(i=>i instanceof vi?i.cache:i)),this._value}}function Gl(...n){const e=[],t=new Map,i=(s,r)=>{if(Array.isArray(s)&&(r=s[1],s=s[0]),!s.length)return;const o=t.get(s);typeof o=="number"?e[o][1]=!!r:(t.set(s,e.length),e.push([s,!!r]))};return n.forEach(s=>{typeof s=="function"&&(s=s()),Array.isArray(s)?Gl(...s).forEach(i):s&&typeof s=="object"?Object.entries(s).forEach(i):typeof s=="string"&&s.split(" ").forEach(r=>i(r,!0))}),e.sort((s,r)=>(t.get(s[0])||0)-(t.get(r[0])||0))}const V=(...n)=>Gl(...n).reduce((e,[t,i])=>(i&&e.push(t),e),[]).join(" ");y.classes=V,y.fn.setClass=function(n,...e){return this.each((t,i)=>{const s=y(i);n===!0?s.attr("class",V(s.attr("class"),...e)):s.addClass(V(n,...e))})};const Yi=new WeakMap;function bo(n,e,t){const i=Yi.has(n),s=i?Yi.get(n):{};typeof e=="string"?s[e]=t:e===null?Object.keys(s).forEach(r=>{delete s[r]}):Object.assign(s,e),Object.keys(s).forEach(r=>{s[r]===void 0&&delete s[r]}),Object.keys(s).length?(!i&&n instanceof Element&&Object.assign(s,y(n).dataset(),s),Yi.set(n,s)):Yi.delete(n)}function Us(n,e,t){let i=Yi.get(n)||{};return t&&n instanceof Element&&(i=Object.assign({},y(n).dataset(),i)),e===void 0?i:i[e]}function M_(n){Yi.delete(n)}y.fn.dataset=y.fn.data,y.fn.data=function(...n){const[e,t]=n;return!n.length||n.length===1&&typeof e=="string"?this.length?Us(this[0],e,!0):void 0:this.each((i,s)=>bo(s,e,t))},y.fn.removeData=function(n=null){return this.each((e,t)=>bo(t,n))};function _i(n,...e){return n.includes("RAWJS")&&(n=n.split('"RAWJS<').join("").split('>RAWJS"').join("").split("").join('"').split("").join(` -`)),new Function(`return ${n}`)(...e)}function Yl(n,...e){return n.includes("RAWJS")?_i(n,...e):JSON.parse(n)}function P_(n){return JSON.stringify(n,(e,t)=>{if(typeof t=="function")return`RAWJS<${t.toString().split('"').join("").split(` -`).join("")}>RAWJS`})}function Xi(n,e){const t=y(n)[0];if(!t)return;const{prefix:i,getter:s,evalValue:r,json:o=!0,evalArgs:a=[]}={prefix:"z-",...typeof e=="string"?{prefix:e}:e},l=Array.isArray(r)?new Set(r):void 0;return Array.from(t.attributes).reduce((c,h)=>{let{name:u}=h;const{value:p}=h;let m=p;if(u.startsWith(i)){if(u=u.slice(i.length).replace(/-([a-z])/g,v=>v[1].toUpperCase()),s)m=s(u,p);else try{r&&(!l||l.has(u))||r===void 0&&p.includes("RAWJS")?m=_i(p,...a):o&&(m=JSON.parse(p))}catch{}c[u]=m}return c},{})}function Xl(n,e,t="z-"){const i=y(n);Object.keys(e).forEach(s=>{let r=e[s];typeof r=="function"&&(r=`RAWJS<${r}>RAWJS`),typeof r!="string"&&(r=JSON.stringify(r)),s=s.replace(/[A-Z]/g,o=>`-${o.toLowerCase()}`),i.attr(`${t}${s}`,r)})}function L_(...n){var t;const e=n.length;if(!e)return Xi(this);if(e===1){const[i]=n;return typeof i=="string"?(t=Xi(this))==null?void 0:t[i]:(y.isPlainObject(i)&&Xl(this,i),this)}return Xl(this,{[n[0]]:n[1]}),this}y.fn.z=L_,y.fn._attr=y.fn.attr,y.fn.extend({attr(...n){const[e,t]=n;return!n.length||n.length===1&&typeof e=="string"?this._attr.apply(this,n):typeof e=="object"?(e&&Object.keys(e).forEach(i=>{const s=e[i];s===null?this.removeAttr(i):this._attr(i,s)}),this):t===null?this.removeAttr(e):this._attr(e,t)}}),y.Event||(y.Event=(n,e)=>{const[t,...i]=n.split("."),s=new Event(t,{bubbles:!0,cancelable:!0});return s.namespace=i.join("."),s.___ot=t,s.___td=e,s});const bi=(n,e)=>new Promise(t=>{const i=window.setTimeout(t,n);e&&e(i)}),sf={};y.share=sf;var wo,Ue,rf;$.isValidElement=void 0;var wi,of,af,Ql,Jl,Zl,ec,Ws={},lf=[],R_=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Co=Array.isArray;function Hn(n,e){for(var t in e)n[t]=e[t];return n}function cf(n){n&&n.parentNode&&n.parentNode.removeChild(n)}function w(n,e,t){var i,s,r,o={};for(r in e)r=="key"?i=e[r]:r=="ref"?s=e[r]:o[r]=e[r];if(arguments.length>2&&(o.children=arguments.length>3?wo.call(arguments,2):t),typeof n=="function"&&n.defaultProps!=null)for(r in n.defaultProps)o[r]===void 0&&(o[r]=n.defaultProps[r]);return xo(n,o,i,s,null)}function xo(n,e,t,i,s){var r={type:n,props:e,key:t,ref:i,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:s??++rf,__i:-1,__u:0};return s==null&&Ue.vnode!=null&&Ue.vnode(r),r}function he(){return{current:null}}function Tn(n){return n.children}function me(n,e){this.props=n,this.context=e}function Qi(n,e){if(e==null)return n.__?Qi(n.__,n.__i+1):null;for(var t;ee&&wi.sort(Ql));So.__r=0}function df(n,e,t,i,s,r,o,a,l,c,h){var u,p,m,v,b,C=i&&i.__k||lf,S=e.length;for(t.__d=l,O_(t,e,C),l=t.__d,u=0;u0?xo(s.type,s.props,s.key,s.ref?s.ref:null,s.__v):s).__=n,s.__b=n.__b+1,r=null,(a=s.__i=F_(s,t,o,h))!==-1&&(h--,(r=t[a])&&(r.__u|=131072)),r==null||r.__v===null?(a==-1&&u--,typeof s.type!="function"&&(s.__u|=65536)):a!==o&&(a==o-1?u--:a==o+1?u++:(a>o?u--:u++,s.__u|=65536))):s=n.__k[i]=null;if(h)for(i=0;i(l!=null&&!(131072&l.__u)?1:0))for(;o>=0||a=0){if((l=e[o])&&!(131072&l.__u)&&s==l.key&&r===l.type)return o;o--}if(a{!t||typeof t!="object"||Object.keys(t).forEach(i=>{let s=t[i];const r=n[i];s!==r&&(r!==void 0&&(i==="className"||i.endsWith("Class")?s=[r,s]:i==="children"?s=[...ko(r),...ko(s)]:typeof r=="object"&&(i==="style"||i.endsWith("Style")||i==="attrs"||i.endsWith("Attrs")||i==="props")&&(s=y.extend(r,s))),n[i]=s)})}),n}function ic(n){return Object.keys(n).forEach(e=>{n[e]===void 0&&delete n[e]}),n}function vf(n,e=!0){const t=y(n),i=t[0],s="zui-disable-scroll";if(e){if(t.data(s))return;if((t.css("scrollbar-gutter")||"").includes("stable")){t.data(s,{overflow:t.css("overflow")}).css("overflow","hidden");return}const r=i===document.body||t.is("html")?window.innerWidth-document.body.clientWidth:i.offsetWidth-i.clientWidth;if(!r)return;const o=t.css("paddingRight")||"0";t.data(s,{paddingRight:o,overflow:t.css("overflow")}).css({paddingRight:`${r+Number.parseInt(o,10)}px`,overflow:"hidden"})}else{const r=t.data(s);if(!r)return;t.css(r).removeData(s)}}y.fn.disableScroll=function(n=!0){return this.each((e,t)=>{vf(t,n)})},y.fn.enableScroll=function(n=!0){return this.disableScroll(!n)};function sc(n,e,t){if(!(t.on||"click").split(" ").includes(e.type))return;const i=t.selector?y(e.target).closest(t.selector):n;if(!i.length)return;const s=c=>c===""?!0:c,r=c=>{if(typeof c=="string")try{c=JSON.parse(c)}catch{}return c};if(s(t.once)){if(t.onceCalled)return;n.dataset("once-called",!0)}if(s(t.prevent)&&e.preventDefault(),s(t.stop)&&e.stopPropagation(),s(t.self)&&e.currentTarget!==e.target)return;const o=[["$element",n],["event",e],["options",t],["$target",i]],a=c=>typeof c=="function"?c(...o):y.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)?Bs(window,l):a(l):c=l,typeof c=="function"){const h=[],u=t.params;t.params=h,typeof u=="string"&&u.length?u[0]==="["?h.push(...r(u)):h.push(...u.split(", ").map(p=>(p=p.trim(),p==="$element"?n:p==="event"?e:p==="options"?t:p.startsWith("$element.")||p.startsWith("event.")||p.startsWith("options.")?a(p):r(p)))):Array.isArray(u)?h.push(...u):h.push(u),c(...h)}}t.do&&a(t.do)}function B_(n){const e=y(this),t=n.type,i=e.attr("zui-on");if(i){const[o,a]=i.split("~").map(l=>l.trim());o&&o.split(" ").includes(t)&&sc(e,n,y.extend({on:o},a?a.startsWith("{")?_i(a):{do:a}:Xi(e,{prefix:"data-",evalValue:["call","if","do"]})))}const s=e.attr(`zui-on-${t}`);s&&sc(e,n,y.extend({on:t},s.startsWith("{")?_i(s):{do:s}));const r=e.attr("data-on");r&&r.split(" ").includes(t)&&sc(e,n,Xi(e,{prefix:"data-",evalValue:["call","if","do"]}))}function _f(n){y(document).off(".zui.global").on(n.map(e=>`${e}.zui.global`).join(" "),`[zui-on],${n.map(e=>`[zui-on-${e}]`)},[data-on]`,B_)}y(()=>{_f(["click","change","inited"])});function xi(n,e){if(typeof n=="function")return xi(n(...e||[]));if(typeof n=="number")return[n];let t=n.match(/(\d+)(%|px)?/);return t?[parseInt(t[1]),t[2]]:(t=n.match(/(\d+)\/(\d+)/),t?[100*parseInt(t[1])/parseInt(t[2]),"%"]:[NaN])}function Ge(n,e){if(n==null)return null;const[t,i="px"]=xi(n,e);return Number.isNaN(t)?typeof n=="string"?n:null:`${t}${i}`}async function Ji(n,e){var i,s,r;if(n instanceof Blob){const o=document.createElement("a");return o.href=window.URL.createObjectURL(n),e&&(o.download=decodeURIComponent(e)),o.click(),o.remove(),n}if(n instanceof Response){const o=await n.blob();return e=e||((r=(s=(i=n.headers.get("Content-Disposition"))==null?void 0:i.split(";")[1])==null?void 0:s.split("=")[1])==null?void 0:r.replace(/"/g,"")),Ji(o,e)}const t=await fetch(n);return Ji(t)}class bf{constructor(e){this._$target=y(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 un=new bf(document);y.bus=un,y.on=un.on.bind(un),y.one=un.one.bind(un),y.off=un.off.bind(un),y.trigger=un.trigger.bind(un);var H_=["Shift","Meta","Alt","Control"],wf=typeof navigator=="object"?navigator.platform:"",Cf=/Mac|iPod|iPhone|iPad/.test(wf),U_=Cf?"Meta":"Control",W_=wf==="Win32"?["Control","Alt"]:Cf?["Alt"]:[];function rc(n,e){return typeof n.getModifierState=="function"&&(n.getModifierState(e)||W_.includes(e)&&n.getModifierState("AltGraph"))}function V_(n){return n.trim().split(" ").map(function(e){var t=e.split(/\b\+/),i=t.pop();return[t=t.map(function(s){return s==="$mod"?U_:s}),i]})}function xf(n,e){var t;e===void 0&&(e={});var i=(t=e.timeout)!=null?t:1e3,s=Object.keys(n).map(function(a){return[V_(a),n[a]]}),r=new Map,o=null;return function(a){a instanceof KeyboardEvent&&(s.forEach(function(l){var c=l[0],h=l[1],u=r.get(c)||c;(function(p,m){return!(m[1].toUpperCase()!==p.key.toUpperCase()&&m[1]!==p.code||m[0].find(function(v){return!rc(p,v)})||H_.find(function(v){return!m[0].includes(v)&&m[1]!==v&&rc(p,v)}))})(a,u[0])?u.length>1?r.set(c,u.slice(1)):(r.delete(c),h(a)):rc(a,a.key)||r.delete(c)}),o&&clearTimeout(o),o=setTimeout(r.clear.bind(r),i))}}function K_(n,e,t){var i;t===void 0&&(t={});var s=(i=t.event)!=null?i:"keydown",r=xf(e,t);return n.addEventListener(s,r),function(){n.removeEventListener(s,r)}}function oc(n,e={}){if(!n)return;const t=Object.keys(e).reduce((i,s)=>(e[s].optional||(i[s]={...e[s]}),i),{});return Object.keys(n).forEach(i=>{const s=n[i];s?s===!0?e[i]&&(t[i]={...e[i]}):t[i]=s:delete t[i]}),Object.keys(t).reduce((i,s)=>{const{keys:r,handler:o}=t[s];return typeof r=="string"?i[r]=o:r.forEach(a=>{i[a]=o}),i},{})}function ac(n,e,t){const{timeout:i,event:s="keydown",scope:r,when:o}=t||{},a=xf(e,{timeout:i}),l=`.zui.hotkeys${r?`.${r}`:""}`,c="zui-hotkeys-composing";return y(n).on(`${s}${l}`,function(h){o&&o(h)===!1||y(h.target).data(c)||a(h)}).on(`compositionstart${l}`,h=>{y(h.target).data(c,!0)}).on(`compositionend${l}`,h=>{y(h.target).removeData(c)})}function lc(n,e){return y(n).off(`.zui.hotkeys${e?`.${e}`:""}`)}const q_=K_;y.fn.hotkeys=function(n,e){return ac(this,n,e)},y.fn.unbindHotkeys=function(n){return lc(this,n)},y.hotkeys=function(n,e){ac(window,n,e)},y.unbindHotkeys=function(n){lc(window,n)};function Do(){return document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement}async function Sf(n){(typeof n=="string"||n instanceof Element||n instanceof y)&&(n={target:n});const{target:e,onError:t,onSuccess:i,afterExit:s,afterEnter:r}=n,o=y(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),i==null||i.call(a),y(a).off(".zui.fullscreen"),s&&o.on("exitFullscreen.zui.fullscreen",s),r&&o.on("enterFullscreen.zui.fullscreen",r)}catch(c){t==null||t.call(a,c)}document.zuiBindFullscreenChange||(document.zuiBindFullscreenChange=!0,y(document).on("fullscreenchange.zui webkitfullscreenchange.zui mozfullscreenchange.zui",c=>{const h=Do();let u=h;h?y(h).addClass("is-in-fullscreen"):(u=y(document).find(".is-in-fullscreen")[0]||document,y(u).removeClass("is-in-fullscreen")),y("body").toggleClass("has-in-fullscreen",!!h);const p={event:c,target:u,fullscreenElement:h};y(u).trigger(h?"enterFullscreen":"exitFullscreen",p).trigger("toggleFullscreen",p)}))}async function cc(n){const e=Do();return n===!1&&!!e===n?n:e?(document.exitFullscreen(),!1):(await Sf(n),!0)}y.fn.fullscreen=function(n){return cc({target:this,...n})},y.getFullscreenElement=Do,y.toggleFullscreen=cc;function Un(n){return!n||n.parentNode===document?!1:n.parentNode?Un(n.parentNode):!0}y.isDetached=Un,y.fn.isDetached=function(){const n=this[0];return!n||Un(n)};const Si=class Iv{constructor(e,t){var v;this._inited=!1,this._autoDestory=0,this._destroyed=!1;const{KEY:i,DATA_KEY:s,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=y(e);if(h.data(i)&&!r)throw new Error(`[ZUI] The component "${o}" has been initialized on element.`);const u=h[0];if(!u)throw new Error(`[ZUI] Invalid selector "${e}" for component "${o}", can not find the element matched.`);const p=Tt();this._gid=p,this._element=u,this.resetOptions(t),this._key=this.options.key??`__${p}`;let m=l.get(u);if(m?m.add(this):(m=new Set([this]),l.set(u,m)),c.has(o)?c.get(o).add(this):c.set(o,new Set([this])),h.data(i,this).attr(a,"").attr(s,`${p}`).attr("z-use",[...new Set([...m].map(b=>b.constructor.NAME))].join(",")),r){const b=`${i}:ALL`;let C=h.data(b);C||(C=new Map,h.data(b,C)),C.set(this._key,this)}this.init(),(v=this.options.$onCreate)==null||v.call(this),requestAnimationFrame(async()=>{var b;this._inited=!0,await this.afterInit(),this.emit("inited",this.options),(b=this.options.$onInited)==null||b.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(){return this._element}get key(){return this._key}get options(){return this._options}get gid(){return this._gid}get $element(){return y(this.element)}get $emitter(){return this.$element}get i18nData(){return[this.options.i18n,this.constructor.i18n]}init(){}afterInit(){}render(e,t){this.setOptions(e,t)}destroy(){var m;const{KEY:e,DATA_KEY:t,ALL:i,TYPED_ALL:s,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 v=this.$element.data(`${e}:ALL`);if(v)if(v.delete(this._key),v.size===0)this.$element.removeData(`${e}:ALL`);else{const b=v.values().next().value;l.data(e,b).attr(t,String(b==null?void 0:b.gid))}}const h=i.get(c);h&&(h.delete(this),h.size===0&&i.delete(c));const u=s.get(r);u&&(u.delete(this),u.size===0&&s.delete(r));const p=i.get(c);p!=null&&p.size?l.attr("z-use",[...new Set([...p].map(v=>v.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,Un(this.element)&&this.destroy()},e)}setOptions(e,t){if(t){const i={...this.constructor.DEFAULT,...(e==null?void 0:e.$optionsFromDataset)!==!1?this.$element.dataset():{},...e},{$options:s}=i;if(s){const r=typeof s=="function"?s.call(this,this.element,i):s;r&&y.extend(i,r),delete i.$options}this._options=i}else e&&y.extend(this._options,e);return this._options}resetOptions(e){return this.setOptions(e,!0)}emit(e,...t){const i=y.Event(e);return i.__src=this,this.$emitter.trigger(i,[this,...t]),i}on(e,t,i){const s=this;this.$element[i!=null&&i.once?"one":"on"](this._wrapEvent(e),function(r,o){(!r.__src||r.__src===s)&&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,i){const{i18nData:s}=this;return Ne(s,e,t,i,this.options.lang,this.constructor.NAME)??Ne(s,e,t,i,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 i=y(e);if(this.MULTI_INSTANCE&&t!==void 0){const s=i.data(`${this.KEY}:ALL`);return s?s.get(t):void 0}return i.data(this.KEY)}static isValid(e){return!0}static ensure(e,t){const i=this.get(e,t==null?void 0:t.key);if(i){if(this.isValid(i))return t&&i.setOptions(t),i;i.destroy()}return new this(e,t)}static getAll(e,t){var l;const{SELECTOR:i,ALL:s,TYPED_ALL:r}=this,o=[],a=c=>{c instanceof this&&(!t||t(c)!==!1)&&o.push(c)};return e?y(e).find(i).each((c,h)=>{var u;(u=s.get(h))==null||u.forEach(a)}):this!==Iv?(l=r.get(this.NAME))==null||l.forEach(a):s.forEach(c=>{c.forEach(a)}),o.sort((c,h)=>c.gid-h.gid)}static query(e,t,i){return e===void 0?this.getAll(void 0,i).pop():this.get(y(e).closest(this.SELECTOR),t)}static defineFn(e){let t=e||this.ZUI;y.fn[t]&&(t=`zui${this.NAME}`);const i=this;y.fn.extend({[t](s,...r){const o=typeof s=="object"?s:void 0,a=typeof s=="string"?s:void 0;let l;return this.each((c,h)=>{let u=i.get(h);if(u)o&&u.render(o);else{if(a)return;u=new i(h,o)}if(a){let p=u[a],m=u;p===void 0&&(m=u.$,p=m[a]),typeof p=="function"?l=p.call(m,...r):l=p}}),l!==void 0?l:this}})}static register(e,t){var s,r;e=e||this,t=(t??e.NAME).toLowerCase(),this.map.set(t,e);const i=(r=(s=e.toggle)==null?void 0:s.name)==null?void 0:r.toLowerCase();i&&i!==t&&this.toggleMap.set(i,e)}};Si.DEFAULT={},Si.MULTI_INSTANCE=!1,Si.ALL=new Map,Si.TYPED_ALL=new Map,Si.map=new Map,Si.toggleMap=new Map;let We=Si;function Vs(n){return We.map.get(n.toLowerCase())}function Io(n,e,t={}){let i=Vs(n);if(i||(i=uc(n)),!i)return null;const{$update:s,...r}=t;if(!i.MULTI_INSTANCE){const o=i.get(e);if(o)return s&&o.render(r,s==="reset"),o}return new i(e,r)}function G_(n,e,t={}){requestAnimationFrame(()=>Io(n,e,t))}function kf(n,e){We.register(n,e)}function uc(n){const{zui:e}=window;if(e){n=n==null?void 0:n.toLowerCase();for(const t in e){const i=t.toLowerCase()===n;if(n&&!i)continue;const s=e[t];if(!(typeof s!="function"||!s.NAME||!s.ZUI)&&(We.map.has(t.toLowerCase())||kf(s),i))return s}}}function Y_(n){var e;n?(e=Vs(n))==null||e.defineFn():window._zuiDefined||(uc(),We.map.forEach(t=>{t.defineFn()}),Object.assign(window,{_zuiDefined:!0}))}function X_(n,e={}){const t=y(n);let i=t.attr("zui-create");const{update:s,onCreate:r}=e,o=(a,l)=>{if(l={$update:s,$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,y.getLib(c).then(()=>Io(a,n,l));return}G_(a,n,l)};if(typeof i=="string"){i=i.trim();const a=i.length?i.split(",").map(h=>h.trim()):[],l=Xi(n,{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(u=>{if(h.has(u))return;const p=l[u];o(u,p),delete l[u],h.add(u)})}}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:n,options:e}),delete a.zui,o(l,a)}}function Q_(){y(document).on("click.zui.toggle mouseenter.zui.toggle","[data-toggle],[zui-toggle]",function(n){const e=y(this),t=e.dataset("toggle")||e.attr("zui-toggle");if(!t)return;const i=We.toggleMap.get(t)||Vs(t),s=i==null?void 0:i.toggle;if(!s)return;const{trigger:r="click",skip:o="[disabled],.disabled",check:a}=s,l=n.type==="mouseover"?"hover":"click";if(!r.includes(l)||a&&!a.call(i,this,l,n)||o&&e.is(o))return;const{onGet:c,onCreate:h,setOptions:u=!0,getOptions:p,prevent:m=!0,handler:v,onToggle:b,convertHref:C}=s;let S=e.dataset();const D=e.attr(`zui-toggle-${t}`);if(D&&(S=y.extend(S,_i(D))),C&&e.is("a")){const P=e.attr("href");if(P){const H=C===!0?{selector:"target",url:"url"}:C;"#.".includes(P[0])?H.selector&&S[H.selector]===void 0&&(S[H.selector]=P):H.url&&S[H.url]===void 0&&(S[H.url]=P)}}if(p&&(S=p.call(i,this,S,n)),v){v.call(i,this,S,l,n),m&&n.preventDefault();return}let N=c?c.call(i,this):i.get(this);if(N)u&&N.setOptions(S);else{const P=h?h.call(i,this,n,S):new i(this,S);if(!P)return;N=P}if(b){if(b.call(i,N,this,n)===!1)return}else{const{shown:P,show:H,hide:q,toggle:Y}=N;let Q;if(Y?Q=Y:H&&q?P?Q=q:Q=H:H&&(Q=H),Q)Q.call(N);else return}m&&n.preventDefault()})}function J_(n,e){const t=Us(n),i=[];return Object.keys(t).forEach(s=>{if(!s.startsWith("zui."))return;const r=t[s];(e==null?void 0:e(r,s))!==!1&&i.push(t[s])}),i}let $o=0;function Tf(n=100){if($o&&clearTimeout($o),n){$o=window.setTimeout(()=>Tf(0),n);return}$o=0,We.ALL.forEach(e=>{e.forEach(t=>t.autoDestroy())})}function Z_(){if(!document.body||Us(document.body,"_autoDestoryMob"))return;const n=new MutationObserver(e=>{let t=!1;for(const i of e)if(i.removedNodes.length){t=!0;break}t&&Tf()});n.observe(document.body,{childList:!0,subtree:!0}),bo(document.body,"_autoDestoryMob",n)}function hc(n,e){const t=y(n);t.find("[zui-create],[data-zui]").each(function(){var i;((i=e==null?void 0:e.beforeCreate)==null?void 0:i.call(e,this))!==!1&&X_(this,e)}),t.find("[zui-init]").each(function(){this.hasAttribute("z-zui-inited")||(this.setAttribute("z-zui-inited",""),y.runJS(this.getAttribute("zui-init"),["$element",y(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((i,s)=>{const r=y(s);r.zui()||r.trigger("inited")}),e!=null&&e.runJS&&t.runJS()}y.fn.zuiInit=function(n){return hc(this,n),this},y.fn.zui=function(n,e){const t=this[0];if(!t)return;if(typeof n!="string"){const s={};let r;return J_(t,(o,a)=>{s[a]=o,(!r||r.gid1?t[0]:void 0,s=t[t.length>1?1:0],r=y(this).zui(i),o=r==null?void 0:r[s];typeof o=="function"&&o.apply(r,e)}),this},y(()=>{y("body").zuiInit({update:!0}),Q_(),Z_()});class Ao extends We{get $targets(){const{$element:e}=this,{targets:t}=this.options;return t?e.find(t):e}_handleScroll(e,t,i){const{offset:s=1}=this.options,r=this.$targets,o=e.getBoundingClientRect(),{scrollTop:a,scrollLeft:l}=e;r.each((c,h)=>{const u=h.getBoundingClientRect(),p=t==="top"&&a>0&&u.top<=o.top+s||t==="bottom"&&u.bottom>=o.bottom-s||t==="left"&&l>0&&u.left<=o.left+s||t==="right"&&l{this._raf&&cancelAnimationFrame(this._raf),this._raf=requestAnimationFrame(()=>{this._raf=0,this._handleScroll(l,t,s)})};this._scrollListener=c,l.addEventListener("scroll",c)}this._container=l,requestAnimationFrame(()=>{this._handleScroll(l,t,s)})}else this._ob=new IntersectionObserver(l=>{l.forEach(c=>{c.target.classList.toggle(s,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))}}Ao.NAME="Sticky";const Zi=24*60*60*1e3,Ve=n=>n===void 0?new Date:(n instanceof Date||(typeof n=="string"&&(n=n.trim(),/^\d+$/.test(n)&&(n=Number.parseInt(n,10))),typeof n=="number"&&n<1e10&&(n*=1e3),n=new Date(n)),n),Df=(n,e,t="day")=>{if(typeof e=="string"){const i=Number.parseInt(e,10);t=e.replace(i.toString(),""),e=i}return n=new Date(Ve(n).getTime()),t==="month"?n.setMonth(n.getMonth()+e):t==="year"?n.setFullYear(n.getFullYear()+e):t==="week"?n.setDate(n.getDate()+e*7):t==="hour"?n.setHours(n.getHours()+e):t==="minute"?n.setMinutes(n.getMinutes()+e):t==="second"?n.setSeconds(n.getSeconds()+e):n.setDate(n.getDate()+e),n},Wn=(n,e=new Date)=>Ve(n).toDateString()===Ve(e).toDateString(),Ks=(n,e=new Date)=>Ve(n).getFullYear()===Ve(e).getFullYear(),dc=(n,e=new Date)=>(n=Ve(n),e=Ve(e),n.getFullYear()===e.getFullYear()&&n.getMonth()===e.getMonth()),eb=(n,e=new Date)=>{n=Ve(n),e=Ve(e);const t=1e3*60*60*24,i=Math.floor(n.getTime()/t),s=Math.floor(e.getTime()/t);return Math.floor((i+4)/7)===Math.floor((s+4)/7)},tb=(n,e)=>Wn(Ve(e),n),nb=(n,e)=>Wn(Ve(e).getTime()-Zi,n),ib=(n,e)=>Wn(Ve(e).getTime()+Zi,n),fc=n=>n!=null&&!isNaN(Ve(n).getTime()),lt=(n,e="yyyy-MM-dd hh:mm",t="")=>{if(n=Ve(n),!fc(n))return t;if(typeof e=="function")return e(n);const i={"M+":n.getMonth()+1,"d+":n.getDate(),"h+":n.getHours(),"H+":n.getHours()%12,"m+":n.getMinutes(),"s+":n.getSeconds(),"S+":n.getMilliseconds()};return/(y+)/i.test(e)&&(e.includes("[yyyy-]")&&(e=e.replace("[yyyy-]",Ks(n)?"":"yyyy-")),e=e.replace(RegExp.$1,`${n.getFullYear()}`.substring(4-RegExp.$1.length))),Object.keys(i).forEach(s=>{if(new RegExp(`(${s})`).test(e)){const r=`${i[s]}`;e=e.replace(RegExp.$1,RegExp.$1.length===1?r:`00${r}`.substring(r.length))}}),e},sb=(n,e,t)=>{const i={full:"yyyy-M-d",month:"M-d",day:"d",str:"{0} ~ {1}",...t},s=lt(n,Ks(n)?i.month:i.full);if(Wn(n,e))return s;const r=lt(e,Ks(n,e)?dc(n,e)?i.day:i.month:i.full);return i.str.replace("{0}",s).replace("{1}",r)};function pc(n){let e=0;if(typeof n!="string"&&(n=String(n)),n&&n.length)for(let t=0;t{try{a.includes("%")&&(a=decodeURIComponent(a)),a=JSON.parse(a)}catch{}return[o,a]})),params:i.map(o=>{if(o!=="undefined"){if(o==="null")return null;try{return o.includes("%")&&(o=decodeURIComponent(o)),JSON.parse(o)}catch{return o}}})}}function If(n){if(Array.isArray(n))return{commands:n.map(Eo).filter(Boolean)};if(typeof n=="object")return n;n=n.replace(/^#!?/,"");const e=n.includes(">"),t=n.split(e?">":"|").map(Eo);return{async:e,commands:t.filter(Boolean)}}function mc(n,e,t){if(typeof n=="string"&&(n=Eo(n)),!n)return;const{execute:i,event:s,scope:r}=e;if(!(r&&n.scope&&n.scope!==r))return i({name:n.name,options:{...e.options,...n.options},event:s,scope:n.scope,prevResult:t},n.params)}async function $f(n,e){const{async:t,commands:i}=If(n);if(!i.length)return[];const{signal:s}=e;if(t){const o=[];let a;for(const l of i){if(!(s!=null&&s.aborted))break;a=await mc(l,e,a),s!=null&&s.aborted&&(a=void 0),o.push(a)}return o}return await Promise.all(i.map(o=>{if(!(s!=null&&s.aborted))return mc(o,e)}))}const es="zui.commands",ts="z-commands",gc="zui-commands-proxy",Af="zui-command";function No(n,e){typeof e=="string"?e={scope:e}:typeof e=="function"&&(e={onCommand:e});const{scope:t="",events:i="click"}=e??{},s=y(n),r=(s.attr(ts)||"").split(",");t&&!r.includes(t)&&r.push(t),s.attr(ts,r.join(",")).data(es,{[t]:{...e,scope:t,events:i,gid:Tt()},...s.data(es)})}function Mo(n,e=!0){const t=y(n);if(e===!0)t.removeAttr(ts),t.removeData(es);else if(e.length){const i=t.data(es)||{};e.split(",").forEach(r=>{delete i[r]});const s=Object.keys(i);s.length?t.attr(ts,s.join(",")).data(es,No):Mo(t,!0)}}function Ef(n,e){let t=n.closest(`[${ts}],[${gc}]`).first();if(t.attr(gc)!==void 0&&(t=y(t.data("zui.commandProxy")||t.attr(gc)).closest(`[${ts}]`)),!t.length)return;const i=t.data(es)||{},s=Object.values(i).sort((o,a)=>a.gid-o.gid);let r;return e!=null&&e.length?(r=s.find(o=>o.scope===e),r||(r=s.find(o=>{var a;return!((a=o.scope)!=null&&a.length)&&!o.scoped})),r):(r=s.find(o=>{var a;return!((a=o.scope)!=null&&a.length)&&!o.scoped}),r||(r=s.find(o=>!o.scoped)),r?r.element=t[0]:r=Ef(n.parent(),e),r)}function rb(n){if(!n.currentTarget)return;const e=y(n.currentTarget);if(e.closest(".disabled,[disabled]").length)return;const t=e.attr(Af)||(e.is('a[href^="#!"]')?e.attr("href"):"");if(!t)return;const i=new AbortController,s=()=>i.abort();$f(t,{signal:i.signal,execute:(r,o)=>{const{scope:a,name:l}=r,c={...r,abort:s};let h;const u=Ef(e,a);if(u){c.element=u.element;const m=(u.commands?u.commands[`${a}~${l}`]||u.commands[l]:null)||u.onCommand;if(m&&(h=m(c,o),n.commandHandled))return h}const p=[c,o];if(e.trigger("command",p).trigger(`command:${a?`${l}.${a}`:l}`,p),a&&e.trigger(`command:.${a}`,p),n.commandHandled)return h;if(a==="event"){l==="stop"?n.stopPropagation():l==="prevent"?n.preventDefault():Bn(n,l,o);return}return a==="window"?Bn(window,l,o):a==="zui"?Bn(window.zui,l,o):a==="target"?Bn(e[0],l,o):a==="$target"?Bn(e,l,o):a==="$"?Bn(y,l,o):h},event:n})}y.fn.command=function(n,e){return this.on(`command:${n}`,e)},y.fn.offCommand=function(n,e){return this.off(`command:${n}`,e)},y.fn.commands=function(n){return this.each((e,t)=>No(t,n)),this},y.fn.unbindCommands=function(n){return this.each((e,t)=>Mo(t,n)),this},y(()=>{y(document).on("click.zui.command",`[${Af}],a[href^="#!"]`,rb)});function qs(n,e,t=!1){var s;const i=y(n);if(e!==void 0){if(typeof e=="string"&&e.length){const r=`zui-runjs-${Tt()}`;i.append(`