@kubex/zinc 1.1.49 → 1.1.51

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/zn.min.js CHANGED
@@ -1,8 +1,8 @@
1
1
  import{a as kn,b as H1,c as ar,d as c,e as V}from"./chunks/zn.UBLZO6CI.js";var Bv=kn((oJ,Fv)=>{var ro=-1,kr=1,Re=0;function sl(i,o,t,r,n){if(i===o)return i?[[Re,i]]:[];if(t!=null){var a=AC(i,o,t);if(a)return a}var s=Fh(i,o),l=i.substring(0,s);i=i.substring(s),o=o.substring(s),s=Jc(i,o);var d=i.substring(i.length-s);i=i.substring(0,i.length-s),o=o.substring(0,o.length-s);var h=zC(i,o);return l&&h.unshift([Re,l]),d&&h.push([Re,d]),Bh(h,n),r&&kC(h),h}function zC(i,o){var t;if(!i)return[[kr,o]];if(!o)return[[ro,i]];var r=i.length>o.length?i:o,n=i.length>o.length?o:i,a=r.indexOf(n);if(a!==-1)return t=[[kr,r.substring(0,a)],[Re,n],[kr,r.substring(a+n.length)]],i.length>o.length&&(t[0][0]=t[2][0]=ro),t;if(n.length===1)return[[ro,i],[kr,o]];var s=_C(i,o);if(s){var l=s[0],d=s[1],h=s[2],m=s[3],f=s[4],b=sl(l,h),g=sl(d,m);return b.concat([[Re,f]],g)}return wC(i,o)}function wC(i,o){for(var t=i.length,r=o.length,n=Math.ceil((t+r)/2),a=n,s=2*n,l=new Array(s),d=new Array(s),h=0;h<s;h++)l[h]=-1,d[h]=-1;l[a+1]=0,d[a+1]=0;for(var m=t-r,f=m%2!==0,b=0,g=0,v=0,x=0,k=0;k<n;k++){for(var _=-k+b;_<=k-g;_+=2){var O=a+_,j;_===-k||_!==k&&l[O-1]<l[O+1]?j=l[O+1]:j=l[O-1]+1;for(var I=j-_;j<t&&I<r&&i.charAt(j)===o.charAt(I);)j++,I++;if(l[O]=j,j>t)g+=2;else if(I>r)b+=2;else if(f){var w=a+m-_;if(w>=0&&w<s&&d[w]!==-1){var T=t-d[w];if(j>=T)return qv(i,o,j,I)}}}for(var L=-k+v;L<=k-x;L+=2){var w=a+L,T;L===-k||L!==k&&d[w-1]<d[w+1]?T=d[w+1]:T=d[w-1]+1;for(var W=T-L;T<t&&W<r&&i.charAt(t-T-1)===o.charAt(r-W-1);)T++,W++;if(d[w]=T,T>t)x+=2;else if(W>r)v+=2;else if(!f){var O=a+m-L;if(O>=0&&O<s&&l[O]!==-1){var j=l[O],I=a+j-O;if(T=t-T,j>=T)return qv(i,o,j,I)}}}}return[[ro,i],[kr,o]]}function qv(i,o,t,r){var n=i.substring(0,t),a=o.substring(0,r),s=i.substring(t),l=o.substring(r),d=sl(n,a),h=sl(s,l);return d.concat(h)}function Fh(i,o){if(!i||!o||i.charAt(0)!==o.charAt(0))return 0;for(var t=0,r=Math.min(i.length,o.length),n=r,a=0;t<n;)i.substring(a,n)==o.substring(a,n)?(t=n,a=t):r=n,n=Math.floor((r-t)/2+t);return Rv(i.charCodeAt(n-1))&&n--,n}function Mv(i,o){var t=i.length,r=o.length;if(t==0||r==0)return 0;t>r?i=i.substring(t-r):t<r&&(o=o.substring(0,t));var n=Math.min(t,r);if(i==o)return n;for(var a=0,s=1;;){var l=i.substring(n-s),d=o.indexOf(l);if(d==-1)return a;s+=d,(d==0||i.substring(n-s)==o.substring(0,s))&&(a=s,s++)}}function Jc(i,o){if(!i||!o||i.slice(-1)!==o.slice(-1))return 0;for(var t=0,r=Math.min(i.length,o.length),n=r,a=0;t<n;)i.substring(i.length-n,i.length-a)==o.substring(o.length-n,o.length-a)?(t=n,a=t):r=n,n=Math.floor((r-t)/2+t);return Ov(i.charCodeAt(i.length-n))&&n--,n}function _C(i,o){var t=i.length>o.length?i:o,r=i.length>o.length?o:i;if(t.length<4||r.length*2<t.length)return null;function n(g,v,x){for(var k=g.substring(x,x+Math.floor(g.length/4)),_=-1,O="",j,I,w,T;(_=v.indexOf(k,_+1))!==-1;){var L=Fh(g.substring(x),v.substring(_)),W=Jc(g.substring(0,x),v.substring(0,_));O.length<W+L&&(O=v.substring(_-W,_)+v.substring(_,_+L),j=g.substring(0,x-W),I=g.substring(x+L),w=v.substring(0,_-W),T=v.substring(_+L))}return O.length*2>=g.length?[j,I,w,T,O]:null}var a=n(t,r,Math.ceil(t.length/4)),s=n(t,r,Math.ceil(t.length/2)),l;if(!a&&!s)return null;s?a?l=a[4].length>s[4].length?a:s:l=s:l=a;var d,h,m,f;i.length>o.length?(d=l[0],h=l[1],m=l[2],f=l[3]):(m=l[0],f=l[1],d=l[2],h=l[3]);var b=l[4];return[d,h,m,f,b]}function kC(i){for(var o=!1,t=[],r=0,n=null,a=0,s=0,l=0,d=0,h=0;a<i.length;)i[a][0]==Re?(t[r++]=a,s=d,l=h,d=0,h=0,n=i[a][1]):(i[a][0]==kr?d+=i[a][1].length:h+=i[a][1].length,n&&n.length<=Math.max(s,l)&&n.length<=Math.max(d,h)&&(i.splice(t[r-1],0,[ro,n]),i[t[r-1]+1][0]=kr,r--,r--,a=r>0?t[r-1]:-1,s=0,l=0,d=0,h=0,n=null,o=!0)),a++;for(o&&Bh(i),EC(i),a=1;a<i.length;){if(i[a-1][0]==ro&&i[a][0]==kr){var m=i[a-1][1],f=i[a][1],b=Mv(m,f),g=Mv(f,m);b>=g?(b>=m.length/2||b>=f.length/2)&&(i.splice(a,0,[Re,f.substring(0,b)]),i[a-1][1]=m.substring(0,m.length-b),i[a+1][1]=f.substring(b),a++):(g>=m.length/2||g>=f.length/2)&&(i.splice(a,0,[Re,m.substring(0,g)]),i[a-1][0]=kr,i[a-1][1]=f.substring(0,f.length-g),i[a+1][0]=ro,i[a+1][1]=m.substring(g),a++),a++}a++}}var Iv=/[^a-zA-Z0-9]/,Nv=/\s/,Dv=/[\r\n]/,SC=/\n\r?\n$/,CC=/^\r?\n\r?\n/;function EC(i){function o(g,v){if(!g||!v)return 6;var x=g.charAt(g.length-1),k=v.charAt(0),_=x.match(Iv),O=k.match(Iv),j=_&&x.match(Nv),I=O&&k.match(Nv),w=j&&x.match(Dv),T=I&&k.match(Dv),L=w&&g.match(SC),W=T&&v.match(CC);return L||W?5:w||T?4:_&&!j&&I?3:j||I?2:_||O?1:0}for(var t=1;t<i.length-1;){if(i[t-1][0]==Re&&i[t+1][0]==Re){var r=i[t-1][1],n=i[t][1],a=i[t+1][1],s=Jc(r,n);if(s){var l=n.substring(n.length-s);r=r.substring(0,r.length-s),n=l+n.substring(0,n.length-s),a=l+a}for(var d=r,h=n,m=a,f=o(r,n)+o(n,a);n.charAt(0)===a.charAt(0);){r+=n.charAt(0),n=n.substring(1)+a.charAt(0),a=a.substring(1);var b=o(r,n)+o(n,a);b>=f&&(f=b,d=r,h=n,m=a)}i[t-1][1]!=d&&(d?i[t-1][1]=d:(i.splice(t-1,1),t--),i[t][1]=h,m?i[t+1][1]=m:(i.splice(t+1,1),t--))}t++}}function Bh(i,o){i.push([Re,""]);for(var t=0,r=0,n=0,a="",s="",l;t<i.length;){if(t<i.length-1&&!i[t][1]){i.splice(t,1);continue}switch(i[t][0]){case kr:n++,s+=i[t][1],t++;break;case ro:r++,a+=i[t][1],t++;break;case Re:var d=t-n-r-1;if(o){if(d>=0&&Hv(i[d][1])){var h=i[d][1].slice(-1);if(i[d][1]=i[d][1].slice(0,-1),a=h+a,s=h+s,!i[d][1]){i.splice(d,1),t--;var m=d-1;i[m]&&i[m][0]===kr&&(n++,s=i[m][1]+s,m--),i[m]&&i[m][0]===ro&&(r++,a=i[m][1]+a,m--),d=m}}if(Pv(i[t][1])){var h=i[t][1].charAt(0);i[t][1]=i[t][1].slice(1),a+=h,s+=h}}if(t<i.length-1&&!i[t][1]){i.splice(t,1);break}if(a.length>0||s.length>0){a.length>0&&s.length>0&&(l=Fh(s,a),l!==0&&(d>=0?i[d][1]+=s.substring(0,l):(i.splice(0,0,[Re,s.substring(0,l)]),t++),s=s.substring(l),a=a.substring(l)),l=Jc(s,a),l!==0&&(i[t][1]=s.substring(s.length-l)+i[t][1],s=s.substring(0,s.length-l),a=a.substring(0,a.length-l)));var f=n+r;a.length===0&&s.length===0?(i.splice(t-f,f),t=t-f):a.length===0?(i.splice(t-f,f,[kr,s]),t=t-f+1):s.length===0?(i.splice(t-f,f,[ro,a]),t=t-f+1):(i.splice(t-f,f,[ro,a],[kr,s]),t=t-f+2)}t!==0&&i[t-1][0]===Re?(i[t-1][1]+=i[t][1],i.splice(t,1)):t++,n=0,r=0,a="",s="";break}}i[i.length-1][1]===""&&i.pop();var b=!1;for(t=1;t<i.length-1;)i[t-1][0]===Re&&i[t+1][0]===Re&&(i[t][1].substring(i[t][1].length-i[t-1][1].length)===i[t-1][1]?(i[t][1]=i[t-1][1]+i[t][1].substring(0,i[t][1].length-i[t-1][1].length),i[t+1][1]=i[t-1][1]+i[t+1][1],i.splice(t-1,1),b=!0):i[t][1].substring(0,i[t+1][1].length)==i[t+1][1]&&(i[t-1][1]+=i[t+1][1],i[t][1]=i[t][1].substring(i[t+1][1].length)+i[t+1][1],i.splice(t+1,1),b=!0)),t++;b&&Bh(i,o)}function Rv(i){return i>=55296&&i<=56319}function Ov(i){return i>=56320&&i<=57343}function Pv(i){return Ov(i.charCodeAt(0))}function Hv(i){return Rv(i.charCodeAt(i.length-1))}function TC(i){for(var o=[],t=0;t<i.length;t++)i[t][1].length>0&&o.push(i[t]);return o}function Hh(i,o,t,r){return Hv(i)||Pv(r)?null:TC([[Re,i],[ro,o],[kr,t],[Re,r]])}function AC(i,o,t){var r=typeof t=="number"?{index:t,length:0}:t.oldRange,n=typeof t=="number"?null:t.newRange,a=i.length,s=o.length;if(r.length===0&&(n===null||n.length===0)){var l=r.index,d=i.slice(0,l),h=i.slice(l),m=n?n.index:null;t:{var f=l+s-a;if(m!==null&&m!==f||f<0||f>s)break t;var b=o.slice(0,f),g=o.slice(f);if(g!==h)break t;var v=Math.min(l,f),x=d.slice(0,v),k=b.slice(0,v);if(x!==k)break t;var _=d.slice(v),O=b.slice(v);return Hh(x,_,O,h)}t:{if(m!==null&&m!==l)break t;var j=l,b=o.slice(0,j),g=o.slice(j);if(b!==d)break t;var I=Math.min(a-j,s-j),w=h.slice(h.length-I),T=g.slice(g.length-I);if(w!==T)break t;var _=h.slice(0,h.length-I),O=g.slice(0,g.length-I);return Hh(d,_,O,w)}}if(r.length>0&&n&&n.length===0)t:{var x=i.slice(0,r.index),w=i.slice(r.index+r.length),v=x.length,I=w.length;if(s<v+I)break t;var k=o.slice(0,v),T=o.slice(s-I);if(x!==k||w!==T)break t;var _=i.slice(v,a-I),O=o.slice(v,s-I);return Hh(x,_,O,w)}return null}function Zc(i,o,t,r){return sl(i,o,t,r,!0)}Zc.INSERT=kr;Zc.DELETE=ro;Zc.EQUAL=Re;Fv.exports=Zc});var ou=kn((ll,Ba)=>{var $C=200,tx="__lodash_hash_undefined__",ex=9007199254740991,Xh="[object Arguments]",LC="[object Array]",rx="[object Boolean]",ox="[object Date]",qC="[object Error]",Qh="[object Function]",nx="[object GeneratorFunction]",td="[object Map]",ix="[object Number]",Jh="[object Object]",Vv="[object Promise]",ax="[object RegExp]",ed="[object Set]",sx="[object String]",lx="[object Symbol]",Uh="[object WeakMap]",cx="[object ArrayBuffer]",rd="[object DataView]",dx="[object Float32Array]",px="[object Float64Array]",hx="[object Int8Array]",ux="[object Int16Array]",mx="[object Int32Array]",fx="[object Uint8Array]",gx="[object Uint8ClampedArray]",bx="[object Uint16Array]",vx="[object Uint32Array]",MC=/[\\^$.*+?()[\]{}|]/g,IC=/\w*$/,NC=/^\[object .+?Constructor\]$/,DC=/^(?:0|[1-9]\d*)$/,Ft={};Ft[Xh]=Ft[LC]=Ft[cx]=Ft[rd]=Ft[rx]=Ft[ox]=Ft[dx]=Ft[px]=Ft[hx]=Ft[ux]=Ft[mx]=Ft[td]=Ft[ix]=Ft[Jh]=Ft[ax]=Ft[ed]=Ft[sx]=Ft[lx]=Ft[fx]=Ft[gx]=Ft[bx]=Ft[vx]=!0;Ft[qC]=Ft[Qh]=Ft[Uh]=!1;var RC=typeof global=="object"&&global&&global.Object===Object&&global,OC=typeof self=="object"&&self&&self.Object===Object&&self,In=RC||OC||Function("return this")(),xx=typeof ll=="object"&&ll&&!ll.nodeType&&ll,Uv=xx&&typeof Ba=="object"&&Ba&&!Ba.nodeType&&Ba,PC=Uv&&Uv.exports===xx;function HC(i,o){return i.set(o[0],o[1]),i}function FC(i,o){return i.add(o),i}function BC(i,o){for(var t=-1,r=i?i.length:0;++t<r&&o(i[t],t,i)!==!1;);return i}function VC(i,o){for(var t=-1,r=o.length,n=i.length;++t<r;)i[n+t]=o[t];return i}function yx(i,o,t,r){var n=-1,a=i?i.length:0;for(r&&a&&(t=i[++n]);++n<a;)t=o(t,i[n],n,i);return t}function UC(i,o){for(var t=-1,r=Array(i);++t<i;)r[t]=o(t);return r}function jC(i,o){return i?.[o]}function zx(i){var o=!1;if(i!=null&&typeof i.toString!="function")try{o=!!(i+"")}catch{}return o}function jv(i){var o=-1,t=Array(i.size);return i.forEach(function(r,n){t[++o]=[n,r]}),t}function Zh(i,o){return function(t){return i(o(t))}}function Gv(i){var o=-1,t=Array(i.size);return i.forEach(function(r){t[++o]=r}),t}var GC=Array.prototype,WC=Function.prototype,od=Object.prototype,Vh=In["__core-js_shared__"],Wv=(function(){var i=/[^.]+$/.exec(Vh&&Vh.keys&&Vh.keys.IE_PROTO||"");return i?"Symbol(src)_1."+i:""})(),wx=WC.toString,ci=od.hasOwnProperty,nd=od.toString,KC=RegExp("^"+wx.call(ci).replace(MC,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Kv=PC?In.Buffer:void 0,Yv=In.Symbol,Xv=In.Uint8Array,YC=Zh(Object.getPrototypeOf,Object),XC=Object.create,QC=od.propertyIsEnumerable,JC=GC.splice,Qv=Object.getOwnPropertySymbols,ZC=Kv?Kv.isBuffer:void 0,tE=Zh(Object.keys,Object),jh=ja(In,"DataView"),cl=ja(In,"Map"),Gh=ja(In,"Promise"),Wh=ja(In,"Set"),Kh=ja(In,"WeakMap"),dl=ja(Object,"create"),eE=ia(jh),rE=ia(cl),oE=ia(Gh),nE=ia(Wh),iE=ia(Kh),Jv=Yv?Yv.prototype:void 0,Zv=Jv?Jv.valueOf:void 0;function na(i){var o=-1,t=i?i.length:0;for(this.clear();++o<t;){var r=i[o];this.set(r[0],r[1])}}function aE(){this.__data__=dl?dl(null):{}}function sE(i){return this.has(i)&&delete this.__data__[i]}function lE(i){var o=this.__data__;if(dl){var t=o[i];return t===tx?void 0:t}return ci.call(o,i)?o[i]:void 0}function cE(i){var o=this.__data__;return dl?o[i]!==void 0:ci.call(o,i)}function dE(i,o){var t=this.__data__;return t[i]=dl&&o===void 0?tx:o,this}na.prototype.clear=aE;na.prototype.delete=sE;na.prototype.get=lE;na.prototype.has=cE;na.prototype.set=dE;function Nn(i){var o=-1,t=i?i.length:0;for(this.clear();++o<t;){var r=i[o];this.set(r[0],r[1])}}function pE(){this.__data__=[]}function hE(i){var o=this.__data__,t=id(o,i);if(t<0)return!1;var r=o.length-1;return t==r?o.pop():JC.call(o,t,1),!0}function uE(i){var o=this.__data__,t=id(o,i);return t<0?void 0:o[t][1]}function mE(i){return id(this.__data__,i)>-1}function fE(i,o){var t=this.__data__,r=id(t,i);return r<0?t.push([i,o]):t[r][1]=o,this}Nn.prototype.clear=pE;Nn.prototype.delete=hE;Nn.prototype.get=uE;Nn.prototype.has=mE;Nn.prototype.set=fE;function Va(i){var o=-1,t=i?i.length:0;for(this.clear();++o<t;){var r=i[o];this.set(r[0],r[1])}}function gE(){this.__data__={hash:new na,map:new(cl||Nn),string:new na}}function bE(i){return ad(this,i).delete(i)}function vE(i){return ad(this,i).get(i)}function xE(i){return ad(this,i).has(i)}function yE(i,o){return ad(this,i).set(i,o),this}Va.prototype.clear=gE;Va.prototype.delete=bE;Va.prototype.get=vE;Va.prototype.has=xE;Va.prototype.set=yE;function Ua(i){this.__data__=new Nn(i)}function zE(){this.__data__=new Nn}function wE(i){return this.__data__.delete(i)}function _E(i){return this.__data__.get(i)}function kE(i){return this.__data__.has(i)}function SE(i,o){var t=this.__data__;if(t instanceof Nn){var r=t.__data__;if(!cl||r.length<$C-1)return r.push([i,o]),this;t=this.__data__=new Va(r)}return t.set(i,o),this}Ua.prototype.clear=zE;Ua.prototype.delete=wE;Ua.prototype.get=_E;Ua.prototype.has=kE;Ua.prototype.set=SE;function CE(i,o){var t=eu(i)||XE(i)?UC(i.length,String):[],r=t.length,n=!!r;for(var a in i)(o||ci.call(i,a))&&!(n&&(a=="length"||GE(a,r)))&&t.push(a);return t}function _x(i,o,t){var r=i[o];(!(ci.call(i,o)&&Ex(r,t))||t===void 0&&!(o in i))&&(i[o]=t)}function id(i,o){for(var t=i.length;t--;)if(Ex(i[t][0],o))return t;return-1}function EE(i,o){return i&&kx(o,ru(o),i)}function Yh(i,o,t,r,n,a,s){var l;if(r&&(l=a?r(i,n,a,s):r(i)),l!==void 0)return l;if(!sd(i))return i;var d=eu(i);if(d){if(l=VE(i),!o)return HE(i,l)}else{var h=oa(i),m=h==Qh||h==nx;if(JE(i))return ME(i,o);if(h==Jh||h==Xh||m&&!a){if(zx(i))return a?i:{};if(l=UE(m?{}:i),!o)return FE(i,EE(l,i))}else{if(!Ft[h])return a?i:{};l=jE(i,h,Yh,o)}}s||(s=new Ua);var f=s.get(i);if(f)return f;if(s.set(i,l),!d)var b=t?BE(i):ru(i);return BC(b||i,function(g,v){b&&(v=g,g=i[v]),_x(l,v,Yh(g,o,t,r,v,i,s))}),l}function TE(i){return sd(i)?XC(i):{}}function AE(i,o,t){var r=o(i);return eu(i)?r:VC(r,t(i))}function $E(i){return nd.call(i)}function LE(i){if(!sd(i)||KE(i))return!1;var o=Ax(i)||zx(i)?KC:NC;return o.test(ia(i))}function qE(i){if(!Cx(i))return tE(i);var o=[];for(var t in Object(i))ci.call(i,t)&&t!="constructor"&&o.push(t);return o}function ME(i,o){if(o)return i.slice();var t=new i.constructor(i.length);return i.copy(t),t}function tu(i){var o=new i.constructor(i.byteLength);return new Xv(o).set(new Xv(i)),o}function IE(i,o){var t=o?tu(i.buffer):i.buffer;return new i.constructor(t,i.byteOffset,i.byteLength)}function NE(i,o,t){var r=o?t(jv(i),!0):jv(i);return yx(r,HC,new i.constructor)}function DE(i){var o=new i.constructor(i.source,IC.exec(i));return o.lastIndex=i.lastIndex,o}function RE(i,o,t){var r=o?t(Gv(i),!0):Gv(i);return yx(r,FC,new i.constructor)}function OE(i){return Zv?Object(Zv.call(i)):{}}function PE(i,o){var t=o?tu(i.buffer):i.buffer;return new i.constructor(t,i.byteOffset,i.length)}function HE(i,o){var t=-1,r=i.length;for(o||(o=Array(r));++t<r;)o[t]=i[t];return o}function kx(i,o,t,r){t||(t={});for(var n=-1,a=o.length;++n<a;){var s=o[n],l=r?r(t[s],i[s],s,t,i):void 0;_x(t,s,l===void 0?i[s]:l)}return t}function FE(i,o){return kx(i,Sx(i),o)}function BE(i){return AE(i,ru,Sx)}function ad(i,o){var t=i.__data__;return WE(o)?t[typeof o=="string"?"string":"hash"]:t.map}function ja(i,o){var t=jC(i,o);return LE(t)?t:void 0}var Sx=Qv?Zh(Qv,Object):e2,oa=$E;(jh&&oa(new jh(new ArrayBuffer(1)))!=rd||cl&&oa(new cl)!=td||Gh&&oa(Gh.resolve())!=Vv||Wh&&oa(new Wh)!=ed||Kh&&oa(new Kh)!=Uh)&&(oa=function(i){var o=nd.call(i),t=o==Jh?i.constructor:void 0,r=t?ia(t):void 0;if(r)switch(r){case eE:return rd;case rE:return td;case oE:return Vv;case nE:return ed;case iE:return Uh}return o});function VE(i){var o=i.length,t=i.constructor(o);return o&&typeof i[0]=="string"&&ci.call(i,"index")&&(t.index=i.index,t.input=i.input),t}function UE(i){return typeof i.constructor=="function"&&!Cx(i)?TE(YC(i)):{}}function jE(i,o,t,r){var n=i.constructor;switch(o){case cx:return tu(i);case rx:case ox:return new n(+i);case rd:return IE(i,r);case dx:case px:case hx:case ux:case mx:case fx:case gx:case bx:case vx:return PE(i,r);case td:return NE(i,r,t);case ix:case sx:return new n(i);case ax:return DE(i);case ed:return RE(i,r,t);case lx:return OE(i)}}function GE(i,o){return o=o??ex,!!o&&(typeof i=="number"||DC.test(i))&&i>-1&&i%1==0&&i<o}function WE(i){var o=typeof i;return o=="string"||o=="number"||o=="symbol"||o=="boolean"?i!=="__proto__":i===null}function KE(i){return!!Wv&&Wv in i}function Cx(i){var o=i&&i.constructor,t=typeof o=="function"&&o.prototype||od;return i===t}function ia(i){if(i!=null){try{return wx.call(i)}catch{}try{return i+""}catch{}}return""}function YE(i){return Yh(i,!0,!0)}function Ex(i,o){return i===o||i!==i&&o!==o}function XE(i){return QE(i)&&ci.call(i,"callee")&&(!QC.call(i,"callee")||nd.call(i)==Xh)}var eu=Array.isArray;function Tx(i){return i!=null&&ZE(i.length)&&!Ax(i)}function QE(i){return t2(i)&&Tx(i)}var JE=ZC||r2;function Ax(i){var o=sd(i)?nd.call(i):"";return o==Qh||o==nx}function ZE(i){return typeof i=="number"&&i>-1&&i%1==0&&i<=ex}function sd(i){var o=typeof i;return!!i&&(o=="object"||o=="function")}function t2(i){return!!i&&typeof i=="object"}function ru(i){return Tx(i)?CE(i):qE(i)}function e2(){return[]}function r2(){return!1}Ba.exports=YE});var fu=kn((pl,Wa)=>{var o2=200,mu="__lodash_hash_undefined__",fd=1,Fx=2,Bx=9007199254740991,ld="[object Arguments]",su="[object Array]",n2="[object AsyncFunction]",Vx="[object Boolean]",Ux="[object Date]",jx="[object Error]",Gx="[object Function]",i2="[object GeneratorFunction]",cd="[object Map]",Wx="[object Number]",a2="[object Null]",Ga="[object Object]",$x="[object Promise]",s2="[object Proxy]",Kx="[object RegExp]",dd="[object Set]",Yx="[object String]",l2="[object Symbol]",c2="[object Undefined]",lu="[object WeakMap]",Xx="[object ArrayBuffer]",pd="[object DataView]",d2="[object Float32Array]",p2="[object Float64Array]",h2="[object Int8Array]",u2="[object Int16Array]",m2="[object Int32Array]",f2="[object Uint8Array]",g2="[object Uint8ClampedArray]",b2="[object Uint16Array]",v2="[object Uint32Array]",x2=/[\\^$.*+?()[\]{}|]/g,y2=/^\[object .+?Constructor\]$/,z2=/^(?:0|[1-9]\d*)$/,Kt={};Kt[d2]=Kt[p2]=Kt[h2]=Kt[u2]=Kt[m2]=Kt[f2]=Kt[g2]=Kt[b2]=Kt[v2]=!0;Kt[ld]=Kt[su]=Kt[Xx]=Kt[Vx]=Kt[pd]=Kt[Ux]=Kt[jx]=Kt[Gx]=Kt[cd]=Kt[Wx]=Kt[Ga]=Kt[Kx]=Kt[dd]=Kt[Yx]=Kt[lu]=!1;var Qx=typeof global=="object"&&global&&global.Object===Object&&global,w2=typeof self=="object"&&self&&self.Object===Object&&self,Dn=Qx||w2||Function("return this")(),Jx=typeof pl=="object"&&pl&&!pl.nodeType&&pl,Lx=Jx&&typeof Wa=="object"&&Wa&&!Wa.nodeType&&Wa,Zx=Lx&&Lx.exports===Jx,nu=Zx&&Qx.process,qx=(function(){try{return nu&&nu.binding&&nu.binding("util")}catch{}})(),Mx=qx&&qx.isTypedArray;function _2(i,o){for(var t=-1,r=i==null?0:i.length,n=0,a=[];++t<r;){var s=i[t];o(s,t,i)&&(a[n++]=s)}return a}function k2(i,o){for(var t=-1,r=o.length,n=i.length;++t<r;)i[n+t]=o[t];return i}function S2(i,o){for(var t=-1,r=i==null?0:i.length;++t<r;)if(o(i[t],t,i))return!0;return!1}function C2(i,o){for(var t=-1,r=Array(i);++t<i;)r[t]=o(t);return r}function E2(i){return function(o){return i(o)}}function T2(i,o){return i.has(o)}function A2(i,o){return i?.[o]}function $2(i){var o=-1,t=Array(i.size);return i.forEach(function(r,n){t[++o]=[n,r]}),t}function L2(i,o){return function(t){return i(o(t))}}function q2(i){var o=-1,t=Array(i.size);return i.forEach(function(r){t[++o]=r}),t}var M2=Array.prototype,I2=Function.prototype,gd=Object.prototype,iu=Dn["__core-js_shared__"],t0=I2.toString,hn=gd.hasOwnProperty,Ix=(function(){var i=/[^.]+$/.exec(iu&&iu.keys&&iu.keys.IE_PROTO||"");return i?"Symbol(src)_1."+i:""})(),e0=gd.toString,N2=RegExp("^"+t0.call(hn).replace(x2,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Nx=Zx?Dn.Buffer:void 0,hd=Dn.Symbol,Dx=Dn.Uint8Array,r0=gd.propertyIsEnumerable,D2=M2.splice,aa=hd?hd.toStringTag:void 0,Rx=Object.getOwnPropertySymbols,R2=Nx?Nx.isBuffer:void 0,O2=L2(Object.keys,Object),cu=Ka(Dn,"DataView"),hl=Ka(Dn,"Map"),du=Ka(Dn,"Promise"),pu=Ka(Dn,"Set"),hu=Ka(Dn,"WeakMap"),ul=Ka(Object,"create"),P2=ca(cu),H2=ca(hl),F2=ca(du),B2=ca(pu),V2=ca(hu),Ox=hd?hd.prototype:void 0,au=Ox?Ox.valueOf:void 0;function sa(i){var o=-1,t=i==null?0:i.length;for(this.clear();++o<t;){var r=i[o];this.set(r[0],r[1])}}function U2(){this.__data__=ul?ul(null):{},this.size=0}function j2(i){var o=this.has(i)&&delete this.__data__[i];return this.size-=o?1:0,o}function G2(i){var o=this.__data__;if(ul){var t=o[i];return t===mu?void 0:t}return hn.call(o,i)?o[i]:void 0}function W2(i){var o=this.__data__;return ul?o[i]!==void 0:hn.call(o,i)}function K2(i,o){var t=this.__data__;return this.size+=this.has(i)?0:1,t[i]=ul&&o===void 0?mu:o,this}sa.prototype.clear=U2;sa.prototype.delete=j2;sa.prototype.get=G2;sa.prototype.has=W2;sa.prototype.set=K2;function Rn(i){var o=-1,t=i==null?0:i.length;for(this.clear();++o<t;){var r=i[o];this.set(r[0],r[1])}}function Y2(){this.__data__=[],this.size=0}function X2(i){var o=this.__data__,t=bd(o,i);if(t<0)return!1;var r=o.length-1;return t==r?o.pop():D2.call(o,t,1),--this.size,!0}function Q2(i){var o=this.__data__,t=bd(o,i);return t<0?void 0:o[t][1]}function J2(i){return bd(this.__data__,i)>-1}function Z2(i,o){var t=this.__data__,r=bd(t,i);return r<0?(++this.size,t.push([i,o])):t[r][1]=o,this}Rn.prototype.clear=Y2;Rn.prototype.delete=X2;Rn.prototype.get=Q2;Rn.prototype.has=J2;Rn.prototype.set=Z2;function la(i){var o=-1,t=i==null?0:i.length;for(this.clear();++o<t;){var r=i[o];this.set(r[0],r[1])}}function tT(){this.size=0,this.__data__={hash:new sa,map:new(hl||Rn),string:new sa}}function eT(i){var o=vd(this,i).delete(i);return this.size-=o?1:0,o}function rT(i){return vd(this,i).get(i)}function oT(i){return vd(this,i).has(i)}function nT(i,o){var t=vd(this,i),r=t.size;return t.set(i,o),this.size+=t.size==r?0:1,this}la.prototype.clear=tT;la.prototype.delete=eT;la.prototype.get=rT;la.prototype.has=oT;la.prototype.set=nT;function ud(i){var o=-1,t=i==null?0:i.length;for(this.__data__=new la;++o<t;)this.add(i[o])}function iT(i){return this.__data__.set(i,mu),this}function aT(i){return this.__data__.has(i)}ud.prototype.add=ud.prototype.push=iT;ud.prototype.has=aT;function pi(i){var o=this.__data__=new Rn(i);this.size=o.size}function sT(){this.__data__=new Rn,this.size=0}function lT(i){var o=this.__data__,t=o.delete(i);return this.size=o.size,t}function cT(i){return this.__data__.get(i)}function dT(i){return this.__data__.has(i)}function pT(i,o){var t=this.__data__;if(t instanceof Rn){var r=t.__data__;if(!hl||r.length<o2-1)return r.push([i,o]),this.size=++t.size,this;t=this.__data__=new la(r)}return t.set(i,o),this.size=t.size,this}pi.prototype.clear=sT;pi.prototype.delete=lT;pi.prototype.get=cT;pi.prototype.has=dT;pi.prototype.set=pT;function hT(i,o){var t=md(i),r=!t&&ET(i),n=!t&&!r&&uu(i),a=!t&&!r&&!n&&c0(i),s=t||r||n||a,l=s?C2(i.length,String):[],d=l.length;for(var h in i)(o||hn.call(i,h))&&!(s&&(h=="length"||n&&(h=="offset"||h=="parent")||a&&(h=="buffer"||h=="byteLength"||h=="byteOffset")||wT(h,d)))&&l.push(h);return l}function bd(i,o){for(var t=i.length;t--;)if(i0(i[t][0],o))return t;return-1}function uT(i,o,t){var r=o(i);return md(i)?r:k2(r,t(i))}function fl(i){return i==null?i===void 0?c2:a2:aa&&aa in Object(i)?yT(i):CT(i)}function Px(i){return ml(i)&&fl(i)==ld}function o0(i,o,t,r,n){return i===o?!0:i==null||o==null||!ml(i)&&!ml(o)?i!==i&&o!==o:mT(i,o,t,r,o0,n)}function mT(i,o,t,r,n,a){var s=md(i),l=md(o),d=s?su:di(i),h=l?su:di(o);d=d==ld?Ga:d,h=h==ld?Ga:h;var m=d==Ga,f=h==Ga,b=d==h;if(b&&uu(i)){if(!uu(o))return!1;s=!0,m=!1}if(b&&!m)return a||(a=new pi),s||c0(i)?n0(i,o,t,r,n,a):vT(i,o,d,t,r,n,a);if(!(t&fd)){var g=m&&hn.call(i,"__wrapped__"),v=f&&hn.call(o,"__wrapped__");if(g||v){var x=g?i.value():i,k=v?o.value():o;return a||(a=new pi),n(x,k,t,r,a)}}return b?(a||(a=new pi),xT(i,o,t,r,n,a)):!1}function fT(i){if(!l0(i)||kT(i))return!1;var o=a0(i)?N2:y2;return o.test(ca(i))}function gT(i){return ml(i)&&s0(i.length)&&!!Kt[fl(i)]}function bT(i){if(!ST(i))return O2(i);var o=[];for(var t in Object(i))hn.call(i,t)&&t!="constructor"&&o.push(t);return o}function n0(i,o,t,r,n,a){var s=t&fd,l=i.length,d=o.length;if(l!=d&&!(s&&d>l))return!1;var h=a.get(i);if(h&&a.get(o))return h==o;var m=-1,f=!0,b=t&Fx?new ud:void 0;for(a.set(i,o),a.set(o,i);++m<l;){var g=i[m],v=o[m];if(r)var x=s?r(v,g,m,o,i,a):r(g,v,m,i,o,a);if(x!==void 0){if(x)continue;f=!1;break}if(b){if(!S2(o,function(k,_){if(!T2(b,_)&&(g===k||n(g,k,t,r,a)))return b.push(_)})){f=!1;break}}else if(!(g===v||n(g,v,t,r,a))){f=!1;break}}return a.delete(i),a.delete(o),f}function vT(i,o,t,r,n,a,s){switch(t){case pd:if(i.byteLength!=o.byteLength||i.byteOffset!=o.byteOffset)return!1;i=i.buffer,o=o.buffer;case Xx:return!(i.byteLength!=o.byteLength||!a(new Dx(i),new Dx(o)));case Vx:case Ux:case Wx:return i0(+i,+o);case jx:return i.name==o.name&&i.message==o.message;case Kx:case Yx:return i==o+"";case cd:var l=$2;case dd:var d=r&fd;if(l||(l=q2),i.size!=o.size&&!d)return!1;var h=s.get(i);if(h)return h==o;r|=Fx,s.set(i,o);var m=n0(l(i),l(o),r,n,a,s);return s.delete(i),m;case l2:if(au)return au.call(i)==au.call(o)}return!1}function xT(i,o,t,r,n,a){var s=t&fd,l=Hx(i),d=l.length,h=Hx(o),m=h.length;if(d!=m&&!s)return!1;for(var f=d;f--;){var b=l[f];if(!(s?b in o:hn.call(o,b)))return!1}var g=a.get(i);if(g&&a.get(o))return g==o;var v=!0;a.set(i,o),a.set(o,i);for(var x=s;++f<d;){b=l[f];var k=i[b],_=o[b];if(r)var O=s?r(_,k,b,o,i,a):r(k,_,b,i,o,a);if(!(O===void 0?k===_||n(k,_,t,r,a):O)){v=!1;break}x||(x=b=="constructor")}if(v&&!x){var j=i.constructor,I=o.constructor;j!=I&&"constructor"in i&&"constructor"in o&&!(typeof j=="function"&&j instanceof j&&typeof I=="function"&&I instanceof I)&&(v=!1)}return a.delete(i),a.delete(o),v}function Hx(i){return uT(i,$T,zT)}function vd(i,o){var t=i.__data__;return _T(o)?t[typeof o=="string"?"string":"hash"]:t.map}function Ka(i,o){var t=A2(i,o);return fT(t)?t:void 0}function yT(i){var o=hn.call(i,aa),t=i[aa];try{i[aa]=void 0;var r=!0}catch{}var n=e0.call(i);return r&&(o?i[aa]=t:delete i[aa]),n}var zT=Rx?function(i){return i==null?[]:(i=Object(i),_2(Rx(i),function(o){return r0.call(i,o)}))}:LT,di=fl;(cu&&di(new cu(new ArrayBuffer(1)))!=pd||hl&&di(new hl)!=cd||du&&di(du.resolve())!=$x||pu&&di(new pu)!=dd||hu&&di(new hu)!=lu)&&(di=function(i){var o=fl(i),t=o==Ga?i.constructor:void 0,r=t?ca(t):"";if(r)switch(r){case P2:return pd;case H2:return cd;case F2:return $x;case B2:return dd;case V2:return lu}return o});function wT(i,o){return o=o??Bx,!!o&&(typeof i=="number"||z2.test(i))&&i>-1&&i%1==0&&i<o}function _T(i){var o=typeof i;return o=="string"||o=="number"||o=="symbol"||o=="boolean"?i!=="__proto__":i===null}function kT(i){return!!Ix&&Ix in i}function ST(i){var o=i&&i.constructor,t=typeof o=="function"&&o.prototype||gd;return i===t}function CT(i){return e0.call(i)}function ca(i){if(i!=null){try{return t0.call(i)}catch{}try{return i+""}catch{}}return""}function i0(i,o){return i===o||i!==i&&o!==o}var ET=Px((function(){return arguments})())?Px:function(i){return ml(i)&&hn.call(i,"callee")&&!r0.call(i,"callee")},md=Array.isArray;function TT(i){return i!=null&&s0(i.length)&&!a0(i)}var uu=R2||qT;function AT(i,o){return o0(i,o)}function a0(i){if(!l0(i))return!1;var o=fl(i);return o==Gx||o==i2||o==n2||o==s2}function s0(i){return typeof i=="number"&&i>-1&&i%1==0&&i<=Bx}function l0(i){var o=typeof i;return i!=null&&(o=="object"||o=="function")}function ml(i){return i!=null&&typeof i=="object"}var c0=Mx?E2(Mx):gT;function $T(i){return TT(i)?hT(i):bT(i)}function LT(){return[]}function qT(){return!1}Wa.exports=AT});var d0=kn(bu=>{"use strict";Object.defineProperty(bu,"__esModule",{value:!0});var MT=ou(),IT=fu(),gu;(function(i){function o(a={},s={},l=!1){typeof a!="object"&&(a={}),typeof s!="object"&&(s={});let d=MT(s);l||(d=Object.keys(d).reduce((h,m)=>(d[m]!=null&&(h[m]=d[m]),h),{}));for(let h in a)a[h]!==void 0&&s[h]===void 0&&(d[h]=a[h]);return Object.keys(d).length>0?d:void 0}i.compose=o;function t(a={},s={}){typeof a!="object"&&(a={}),typeof s!="object"&&(s={});let l=Object.keys(a).concat(Object.keys(s)).reduce((d,h)=>(IT(a[h],s[h])||(d[h]=s[h]===void 0?null:s[h]),d),{});return Object.keys(l).length>0?l:void 0}i.diff=t;function r(a={},s={}){a=a||{};let l=Object.keys(s).reduce((d,h)=>(s[h]!==a[h]&&a[h]!==void 0&&(d[h]=s[h]),d),{});return Object.keys(a).reduce((d,h)=>(a[h]!==s[h]&&s[h]===void 0&&(d[h]=null),d),l)}i.invert=r;function n(a,s,l=!1){if(typeof a!="object")return s;if(typeof s!="object")return;if(!l)return s;let d=Object.keys(s).reduce((h,m)=>(a[m]===void 0&&(h[m]=s[m]),h),{});return Object.keys(d).length>0?d:void 0}i.transform=n})(gu||(gu={}));bu.default=gu});var yu=kn(xu=>{"use strict";Object.defineProperty(xu,"__esModule",{value:!0});var vu;(function(i){function o(t){return typeof t.delete=="number"?t.delete:typeof t.retain=="number"?t.retain:typeof t.retain=="object"&&t.retain!==null?1:typeof t.insert=="string"?t.insert.length:1}i.length=o})(vu||(vu={}));xu.default=vu});var h0=kn(wu=>{"use strict";Object.defineProperty(wu,"__esModule",{value:!0});var p0=yu(),zu=class{constructor(o){this.ops=o,this.index=0,this.offset=0}hasNext(){return this.peekLength()<1/0}next(o){o||(o=1/0);let t=this.ops[this.index];if(t){let r=this.offset,n=p0.default.length(t);if(o>=n-r?(o=n-r,this.index+=1,this.offset=0):this.offset+=o,typeof t.delete=="number")return{delete:o};{let a={};return t.attributes&&(a.attributes=t.attributes),typeof t.retain=="number"?a.retain=o:typeof t.retain=="object"&&t.retain!==null?a.retain=t.retain:typeof t.insert=="string"?a.insert=t.insert.substr(r,o):a.insert=t.insert,a}}else return{retain:1/0}}peek(){return this.ops[this.index]}peekLength(){return this.ops[this.index]?p0.default.length(this.ops[this.index])-this.offset:1/0}peekType(){let o=this.ops[this.index];return o?typeof o.delete=="number"?"delete":typeof o.retain=="number"||typeof o.retain=="object"&&o.retain!==null?"retain":"insert":"retain"}rest(){if(this.hasNext()){if(this.offset===0)return this.ops.slice(this.index);{let o=this.offset,t=this.index,r=this.next(),n=this.ops.slice(this.index);return this.offset=o,this.index=t,[r].concat(n)}}else return[]}};wu.default=zu});var Or=kn((Pn,yd)=>{"use strict";Object.defineProperty(Pn,"__esModule",{value:!0});Pn.AttributeMap=Pn.OpIterator=Pn.Op=void 0;var xd=Bv(),NT=ou(),_u=fu(),da=d0();Pn.AttributeMap=da.default;var On=yu();Pn.Op=On.default;var vo=h0();Pn.OpIterator=vo.default;var DT="\0",u0=(i,o)=>{if(typeof i!="object"||i===null)throw new Error(`cannot retain a ${typeof i}`);if(typeof o!="object"||o===null)throw new Error(`cannot retain a ${typeof o}`);let t=Object.keys(i)[0];if(!t||t!==Object.keys(o)[0])throw new Error(`embed types not matched: ${t} != ${Object.keys(o)[0]}`);return[t,i[t],o[t]]},Hn=class i{constructor(o){Array.isArray(o)?this.ops=o:o!=null&&Array.isArray(o.ops)?this.ops=o.ops:this.ops=[]}static registerEmbed(o,t){this.handlers[o]=t}static unregisterEmbed(o){delete this.handlers[o]}static getHandler(o){let t=this.handlers[o];if(!t)throw new Error(`no handlers for embed type "${o}"`);return t}insert(o,t){let r={};return typeof o=="string"&&o.length===0?this:(r.insert=o,t!=null&&typeof t=="object"&&Object.keys(t).length>0&&(r.attributes=t),this.push(r))}delete(o){return o<=0?this:this.push({delete:o})}retain(o,t){if(typeof o=="number"&&o<=0)return this;let r={retain:o};return t!=null&&typeof t=="object"&&Object.keys(t).length>0&&(r.attributes=t),this.push(r)}push(o){let t=this.ops.length,r=this.ops[t-1];if(o=NT(o),typeof r=="object"){if(typeof o.delete=="number"&&typeof r.delete=="number")return this.ops[t-1]={delete:r.delete+o.delete},this;if(typeof r.delete=="number"&&o.insert!=null&&(t-=1,r=this.ops[t-1],typeof r!="object"))return this.ops.unshift(o),this;if(_u(o.attributes,r.attributes)){if(typeof o.insert=="string"&&typeof r.insert=="string")return this.ops[t-1]={insert:r.insert+o.insert},typeof o.attributes=="object"&&(this.ops[t-1].attributes=o.attributes),this;if(typeof o.retain=="number"&&typeof r.retain=="number")return this.ops[t-1]={retain:r.retain+o.retain},typeof o.attributes=="object"&&(this.ops[t-1].attributes=o.attributes),this}}return t===this.ops.length?this.ops.push(o):this.ops.splice(t,0,o),this}chop(){let o=this.ops[this.ops.length-1];return o&&typeof o.retain=="number"&&!o.attributes&&this.ops.pop(),this}filter(o){return this.ops.filter(o)}forEach(o){this.ops.forEach(o)}map(o){return this.ops.map(o)}partition(o){let t=[],r=[];return this.forEach(n=>{(o(n)?t:r).push(n)}),[t,r]}reduce(o,t){return this.ops.reduce(o,t)}changeLength(){return this.reduce((o,t)=>t.insert?o+On.default.length(t):t.delete?o-t.delete:o,0)}length(){return this.reduce((o,t)=>o+On.default.length(t),0)}slice(o=0,t=1/0){let r=[],n=new vo.default(this.ops),a=0;for(;a<t&&n.hasNext();){let s;a<o?s=n.next(o-a):(s=n.next(t-a),r.push(s)),a+=On.default.length(s)}return new i(r)}compose(o){let t=new vo.default(this.ops),r=new vo.default(o.ops),n=[],a=r.peek();if(a!=null&&typeof a.retain=="number"&&a.attributes==null){let l=a.retain;for(;t.peekType()==="insert"&&t.peekLength()<=l;)l-=t.peekLength(),n.push(t.next());a.retain-l>0&&r.next(a.retain-l)}let s=new i(n);for(;t.hasNext()||r.hasNext();)if(r.peekType()==="insert")s.push(r.next());else if(t.peekType()==="delete")s.push(t.next());else{let l=Math.min(t.peekLength(),r.peekLength()),d=t.next(l),h=r.next(l);if(h.retain){let m={};if(typeof d.retain=="number")m.retain=typeof h.retain=="number"?l:h.retain;else if(typeof h.retain=="number")d.retain==null?m.insert=d.insert:m.retain=d.retain;else{let b=d.retain==null?"insert":"retain",[g,v,x]=u0(d[b],h.retain),k=i.getHandler(g);m[b]={[g]:k.compose(v,x,b==="retain")}}let f=da.default.compose(d.attributes,h.attributes,typeof d.retain=="number");if(f&&(m.attributes=f),s.push(m),!r.hasNext()&&_u(s.ops[s.ops.length-1],m)){let b=new i(t.rest());return s.concat(b).chop()}}else typeof h.delete=="number"&&(typeof d.retain=="number"||typeof d.retain=="object"&&d.retain!==null)&&s.push(h)}return s.chop()}concat(o){let t=new i(this.ops.slice());return o.ops.length>0&&(t.push(o.ops[0]),t.ops=t.ops.concat(o.ops.slice(1))),t}diff(o,t){if(this.ops===o.ops)return new i;let r=[this,o].map(d=>d.map(h=>{if(h.insert!=null)return typeof h.insert=="string"?h.insert:DT;let m=d===o?"on":"with";throw new Error("diff() called "+m+" non-document")}).join("")),n=new i,a=xd(r[0],r[1],t,!0),s=new vo.default(this.ops),l=new vo.default(o.ops);return a.forEach(d=>{let h=d[1].length;for(;h>0;){let m=0;switch(d[0]){case xd.INSERT:m=Math.min(l.peekLength(),h),n.push(l.next(m));break;case xd.DELETE:m=Math.min(h,s.peekLength()),s.next(m),n.delete(m);break;case xd.EQUAL:m=Math.min(s.peekLength(),l.peekLength(),h);let f=s.next(m),b=l.next(m);_u(f.insert,b.insert)?n.retain(m,da.default.diff(f.attributes,b.attributes)):n.push(b).delete(m);break}h-=m}}),n.chop()}eachLine(o,t=`
2
- `){let r=new vo.default(this.ops),n=new i,a=0;for(;r.hasNext();){if(r.peekType()!=="insert")return;let s=r.peek(),l=On.default.length(s)-r.peekLength(),d=typeof s.insert=="string"?s.insert.indexOf(t,l)-l:-1;if(d<0)n.push(r.next());else if(d>0)n.push(r.next(d));else{if(o(n,r.next(1).attributes||{},a)===!1)return;a+=1,n=new i}}n.length()>0&&o(n,{},a)}invert(o){let t=new i;return this.reduce((r,n)=>{if(n.insert)t.delete(On.default.length(n));else{if(typeof n.retain=="number"&&n.attributes==null)return t.retain(n.retain),r+n.retain;if(n.delete||typeof n.retain=="number"){let a=n.delete||n.retain;return o.slice(r,r+a).forEach(l=>{n.delete?t.push(l):n.retain&&n.attributes&&t.retain(On.default.length(l),da.default.invert(n.attributes,l.attributes))}),r+a}else if(typeof n.retain=="object"&&n.retain!==null){let a=o.slice(r,r+1),s=new vo.default(a.ops).next(),[l,d,h]=u0(n.retain,s.insert),m=i.getHandler(l);return t.retain({[l]:m.invert(d,h)},da.default.invert(n.attributes,s.attributes)),r+1}}return r},0),t.chop()}transform(o,t=!1){if(t=!!t,typeof o=="number")return this.transformPosition(o,t);let r=o,n=new vo.default(this.ops),a=new vo.default(r.ops),s=new i;for(;n.hasNext()||a.hasNext();)if(n.peekType()==="insert"&&(t||a.peekType()!=="insert"))s.retain(On.default.length(n.next()));else if(a.peekType()==="insert")s.push(a.next());else{let l=Math.min(n.peekLength(),a.peekLength()),d=n.next(l),h=a.next(l);if(d.delete)continue;if(h.delete)s.push(h);else{let m=d.retain,f=h.retain,b=typeof f=="object"&&f!==null?f:l;if(typeof m=="object"&&m!==null&&typeof f=="object"&&f!==null){let g=Object.keys(m)[0];if(g===Object.keys(f)[0]){let v=i.getHandler(g);v&&(b={[g]:v.transform(m[g],f[g],t)})}}s.retain(b,da.default.transform(d.attributes,h.attributes,t))}}return s.chop()}transformPosition(o,t=!1){t=!!t;let r=new vo.default(this.ops),n=0;for(;r.hasNext()&&n<=o;){let a=r.peekLength(),s=r.peekType();if(r.next(),s==="delete"){o-=Math.min(a,o-n);continue}else s==="insert"&&(n<o||!t)&&(o+=a);n+=a}return o}};Hn.Op=On.default;Hn.OpIterator=vo.default;Hn.AttributeMap=da.default;Hn.handlers={};Pn.default=Hn;typeof yd=="object"&&(yd.exports=Hn,yd.exports.default=Hn)});var Az=kn((nat,Bu)=>{"use strict";var v3=Object.prototype.hasOwnProperty,Cr="~";function Cl(){}Object.create&&(Cl.prototype=Object.create(null),new Cl().__proto__||(Cr=!1));function x3(i,o,t){this.fn=i,this.context=o,this.once=t||!1}function Tz(i,o,t,r,n){if(typeof t!="function")throw new TypeError("The listener must be a function");var a=new x3(t,r||i,n),s=Cr?Cr+o:o;return i._events[s]?i._events[s].fn?i._events[s]=[i._events[s],a]:i._events[s].push(a):(i._events[s]=a,i._eventsCount++),i}function Wd(i,o){--i._eventsCount===0?i._events=new Cl:delete i._events[o]}function mr(){this._events=new Cl,this._eventsCount=0}mr.prototype.eventNames=function(){var o=[],t,r;if(this._eventsCount===0)return o;for(r in t=this._events)v3.call(t,r)&&o.push(Cr?r.slice(1):r);return Object.getOwnPropertySymbols?o.concat(Object.getOwnPropertySymbols(t)):o};mr.prototype.listeners=function(o){var t=Cr?Cr+o:o,r=this._events[t];if(!r)return[];if(r.fn)return[r.fn];for(var n=0,a=r.length,s=new Array(a);n<a;n++)s[n]=r[n].fn;return s};mr.prototype.listenerCount=function(o){var t=Cr?Cr+o:o,r=this._events[t];return r?r.fn?1:r.length:0};mr.prototype.emit=function(o,t,r,n,a,s){var l=Cr?Cr+o:o;if(!this._events[l])return!1;var d=this._events[l],h=arguments.length,m,f;if(d.fn){switch(d.once&&this.removeListener(o,d.fn,void 0,!0),h){case 1:return d.fn.call(d.context),!0;case 2:return d.fn.call(d.context,t),!0;case 3:return d.fn.call(d.context,t,r),!0;case 4:return d.fn.call(d.context,t,r,n),!0;case 5:return d.fn.call(d.context,t,r,n,a),!0;case 6:return d.fn.call(d.context,t,r,n,a,s),!0}for(f=1,m=new Array(h-1);f<h;f++)m[f-1]=arguments[f];d.fn.apply(d.context,m)}else{var b=d.length,g;for(f=0;f<b;f++)switch(d[f].once&&this.removeListener(o,d[f].fn,void 0,!0),h){case 1:d[f].fn.call(d[f].context);break;case 2:d[f].fn.call(d[f].context,t);break;case 3:d[f].fn.call(d[f].context,t,r);break;case 4:d[f].fn.call(d[f].context,t,r,n);break;default:if(!m)for(g=1,m=new Array(h-1);g<h;g++)m[g-1]=arguments[g];d[f].fn.apply(d[f].context,m)}}return!0};mr.prototype.on=function(o,t,r){return Tz(this,o,t,r,!1)};mr.prototype.once=function(o,t,r){return Tz(this,o,t,r,!0)};mr.prototype.removeListener=function(o,t,r,n){var a=Cr?Cr+o:o;if(!this._events[a])return this;if(!t)return Wd(this,a),this;var s=this._events[a];if(s.fn)s.fn===t&&(!n||s.once)&&(!r||s.context===r)&&Wd(this,a);else{for(var l=0,d=[],h=s.length;l<h;l++)(s[l].fn!==t||n&&!s[l].once||r&&s[l].context!==r)&&d.push(s[l]);d.length?this._events[a]=d.length===1?d[0]:d:Wd(this,a)}return this};mr.prototype.removeAllListeners=function(o){var t;return o?(t=Cr?Cr+o:o,this._events[t]&&Wd(this,t)):(this._events=new Cl,this._eventsCount=0),this};mr.prototype.off=mr.prototype.removeListener;mr.prototype.addListener=mr.prototype.on;mr.prefixed=Cr;mr.EventEmitter=mr;typeof Bu<"u"&&(Bu.exports=mr)});var Am=kn((Zl,Tm)=>{(function(i,o){typeof Zl=="object"&&typeof Tm=="object"?Tm.exports=o():typeof define=="function"&&define.amd?define([],o):typeof Zl=="object"?Zl.AirDatepicker=o():i.AirDatepicker=o()})(Zl,(function(){return(function(){"use strict";var i={d:function(D,y){for(var S in y)i.o(y,S)&&!i.o(D,S)&&Object.defineProperty(D,S,{enumerable:!0,get:y[S]})},o:function(D,y){return Object.prototype.hasOwnProperty.call(D,y)}},o={};i.d(o,{default:function(){return nt}});var t={days:"days",months:"months",years:"years",day:"day",month:"month",year:"year",eventChangeViewDate:"changeViewDate",eventChangeCurrentView:"changeCurrentView",eventChangeFocusDate:"changeFocusDate",eventChangeSelectedDate:"changeSelectedDate",eventChangeTime:"changeTime",eventChangeLastSelectedDate:"changeLastSelectedDate",actionSelectDate:"selectDate",actionUnselectDate:"unselectDate",cssClassWeekend:"-weekend-"},r={classes:"",inline:!1,locale:{days:["\u0412\u043E\u0441\u043A\u0440\u0435\u0441\u0435\u043D\u044C\u0435","\u041F\u043E\u043D\u0435\u0434\u0435\u043B\u044C\u043D\u0438\u043A","\u0412\u0442\u043E\u0440\u043D\u0438\u043A","\u0421\u0440\u0435\u0434\u0430","\u0427\u0435\u0442\u0432\u0435\u0440\u0433","\u041F\u044F\u0442\u043D\u0438\u0446\u0430","\u0421\u0443\u0431\u0431\u043E\u0442\u0430"],daysShort:["\u0412\u043E\u0441","\u041F\u043E\u043D","\u0412\u0442\u043E","\u0421\u0440\u0435","\u0427\u0435\u0442","\u041F\u044F\u0442","\u0421\u0443\u0431"],daysMin:["\u0412\u0441","\u041F\u043D","\u0412\u0442","\u0421\u0440","\u0427\u0442","\u041F\u0442","\u0421\u0431"],months:["\u042F\u043D\u0432\u0430\u0440\u044C","\u0424\u0435\u0432\u0440\u0430\u043B\u044C","\u041C\u0430\u0440\u0442","\u0410\u043F\u0440\u0435\u043B\u044C","\u041C\u0430\u0439","\u0418\u044E\u043D\u044C","\u0418\u044E\u043B\u044C","\u0410\u0432\u0433\u0443\u0441\u0442","\u0421\u0435\u043D\u0442\u044F\u0431\u0440\u044C","\u041E\u043A\u0442\u044F\u0431\u0440\u044C","\u041D\u043E\u044F\u0431\u0440\u044C","\u0414\u0435\u043A\u0430\u0431\u0440\u044C"],monthsShort:["\u042F\u043D\u0432","\u0424\u0435\u0432","\u041C\u0430\u0440","\u0410\u043F\u0440","\u041C\u0430\u0439","\u0418\u044E\u043D","\u0418\u044E\u043B","\u0410\u0432\u0433","\u0421\u0435\u043D","\u041E\u043A\u0442","\u041D\u043E\u044F","\u0414\u0435\u043A"],today:"\u0421\u0435\u0433\u043E\u0434\u043D\u044F",clear:"\u041E\u0447\u0438\u0441\u0442\u0438\u0442\u044C",dateFormat:"dd.MM.yyyy",timeFormat:"HH:mm",firstDay:1},startDate:new Date,firstDay:"",weekends:[6,0],dateFormat:"",altField:"",altFieldDateFormat:"T",toggleSelected:!0,keyboardNav:!0,selectedDates:!1,container:"",isMobile:!1,visible:!1,position:"bottom left",offset:12,view:t.days,minView:t.days,showOtherMonths:!0,selectOtherMonths:!0,moveToOtherMonthsOnSelect:!0,showOtherYears:!0,selectOtherYears:!0,moveToOtherYearsOnSelect:!0,minDate:"",maxDate:"",disableNavWhenOutOfRange:!0,multipleDates:!1,multipleDatesSeparator:", ",range:!1,dynamicRange:!0,buttons:!1,monthsField:"monthsShort",showEvent:"focus",autoClose:!1,fixedHeight:!1,prevHtml:'<svg><path d="M 17,12 l -5,5 l 5,5"></path></svg>',nextHtml:'<svg><path d="M 14,12 l 5,5 l -5,5"></path></svg>',navTitles:{days:"MMMM, <i>yyyy</i>",months:"yyyy",years:"yyyy1 - yyyy2"},timepicker:!1,onlyTimepicker:!1,dateTimeSeparator:" ",timeFormat:"",minHours:0,maxHours:24,minMinutes:0,maxMinutes:59,hoursStep:1,minutesStep:1,onSelect:!1,onChangeViewDate:!1,onChangeView:!1,onRenderCell:!1,onShow:!1,onHide:!1,onClickDayName:!1};function n(D){let y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:document;return typeof D=="string"?y.querySelector(D):D}function a(){let{tagName:D="div",className:y="",innerHtml:S="",id:z="",attrs:M={}}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},q=document.createElement(D);return y&&q.classList.add(...y.split(" ")),z&&(q.id=z),S&&(q.innerHTML=S),M&&s(q,M),q}function s(D,y){for(let[S,z]of Object.entries(y))z!==void 0&&D.setAttribute(S,z);return D}function l(D){return new Date(D.getFullYear(),D.getMonth()+1,0).getDate()}function d(D){let y=D.getHours(),{hours:S,dayPeriod:z}=h(y);return{year:D.getFullYear(),month:D.getMonth(),fullMonth:D.getMonth()+1<10?"0"+(D.getMonth()+1):D.getMonth()+1,date:D.getDate(),fullDate:D.getDate()<10?"0"+D.getDate():D.getDate(),day:D.getDay(),hours:y,fullHours:m(y),hours12:S,dayPeriod:z,fullHours12:m(S),minutes:D.getMinutes(),fullMinutes:D.getMinutes()<10?"0"+D.getMinutes():D.getMinutes()}}function h(D){return{dayPeriod:D>11?"pm":"am",hours:D%12==0?12:D%12}}function m(D){return D<10?"0"+D:D}function f(D){let y=10*Math.floor(D.getFullYear()/10);return[y,y+9]}function b(){let D=[];for(var y=arguments.length,S=new Array(y),z=0;z<y;z++)S[z]=arguments[z];return S.forEach((M=>{if(typeof M=="object")for(let q in M)M[q]&&D.push(q);else M&&D.push(M)})),D.join(" ")}function g(D,y){let S=arguments.length>2&&arguments[2]!==void 0?arguments[2]:t.days;if(!D||!y)return!1;let z=d(D),M=d(y);return{[t.days]:z.date===M.date&&z.month===M.month&&z.year===M.year,[t.months]:z.month===M.month&&z.year===M.year,[t.years]:z.year===M.year}[S]}function v(D,y,S){let z=k(D,!1).getTime(),M=k(y,!1).getTime();return S?z>=M:z>M}function x(D,y){return!v(D,y,!0)}function k(D){let y=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],S=new Date(D.getTime());return typeof y!="boolean"||y||(function(z){z.setHours(0,0,0,0)})(S),S}function _(D,y,S){D.length?D.forEach((z=>{z.addEventListener(y,S)})):D.addEventListener(y,S)}function O(D,y){return!(!D||D===document||D instanceof DocumentFragment)&&(D.matches(y)?D:O(D.parentNode,y))}function j(D,y,S){return D>S?S:D<y?y:D}function I(D){for(var y=arguments.length,S=new Array(y>1?y-1:0),z=1;z<y;z++)S[z-1]=arguments[z];return S.filter((M=>M)).forEach((M=>{for(let[q,$]of Object.entries(M))if($!==void 0&&$.toString()==="[object Object]"){let R=D[q]!==void 0?D[q].toString():void 0,B=$.toString(),Y=Array.isArray($)?[]:{};D[q]=D[q]?R!==B?Y:D[q]:Y,I(D[q],$)}else D[q]=$})),D}function w(D){let y=D;return D instanceof Date||(typeof D=="string"&&/^\d{4}-\d{2}-\d{2}$/.test(D)&&(D+="T00:00:00"),y=new Date(D)),isNaN(y.getTime())&&(console.log(`Unable to convert value "${D}" to Date object`),y=!1),y}function T(D){let y="\\s|\\.|-|/|\\\\|,|\\$|\\!|\\?|:|;";return new RegExp("(^|>|"+y+")("+D+")($|<|"+y+")","g")}function L(D,y,S){return(y=(function(z){var M=(function(q,$){if(typeof q!="object"||q===null)return q;var R=q[Symbol.toPrimitive];if(R!==void 0){var B=R.call(q,"string");if(typeof B!="object")return B;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(q)})(z);return typeof M=="symbol"?M:String(M)})(y))in D?Object.defineProperty(D,y,{value:S,enumerable:!0,configurable:!0,writable:!0}):D[y]=S,D}class W{constructor(){let{type:y,date:S,dp:z,opts:M,body:q}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};L(this,"focus",(()=>{this.$cell.classList.add("-focus-"),this.focused=!0})),L(this,"removeFocus",(()=>{this.$cell.classList.remove("-focus-"),this.focused=!1})),L(this,"select",(()=>{this.$cell.classList.add("-selected-"),this.selected=!0})),L(this,"removeSelect",(()=>{this.$cell.classList.remove("-selected-","-range-from-","-range-to-"),this.selected=!1})),L(this,"onChangeSelectedDate",(()=>{this.isDisabled||(this._handleSelectedStatus(),this.opts.range&&this._handleRangeStatus())})),L(this,"onChangeFocusDate",($=>{if(!$)return void(this.focused&&this.removeFocus());let R=g($,this.date,this.type);R?this.focus():!R&&this.focused&&this.removeFocus(),this.opts.range&&this._handleRangeStatus()})),L(this,"render",(()=>(this.$cell.innerHTML=this._getHtml(),this._handleClasses(),this.$cell))),this.type=y,this.singleType=this.type.slice(0,-1),this.date=S,this.dp=z,this.opts=M,this.body=q,this.customData=!1,this.init()}init(){var y,S;let{onRenderCell:z}=this.opts;z&&(this.customData=z({date:this.date,cellType:this.singleType,datepicker:this.dp})),this._createElement(),this._bindDatepickerEvents(),(y=this.customData)!==null&&y!==void 0&&y.disabled?this.dp.disableDate(this.date):((S=this.customData)===null||S===void 0?void 0:S.disabled)===!1&&this.dp.enableDate(this.date)}_bindDatepickerEvents(){this.dp.on(t.eventChangeSelectedDate,this.onChangeSelectedDate),this.dp.on(t.eventChangeFocusDate,this.onChangeFocusDate)}unbindDatepickerEvents(){this.dp.off(t.eventChangeSelectedDate,this.onChangeSelectedDate),this.dp.off(t.eventChangeFocusDate,this.onChangeFocusDate)}_createElement(){var y;let{year:S,month:z,fullMonth:M,date:q,fullDate:$}=d(this.date),R=((y=this.customData)===null||y===void 0?void 0:y.attrs)||{};this.$cell=a({attrs:{"data-year":S,"data-month":z,"data-date":q,"data-iso-date":`${S}-${M}-${$}`,...R}}),this.$cell.adpCell=this}_getClassName(){var y;let S=new Date,{selectOtherMonths:z,selectOtherYears:M}=this.opts,{minDate:q,maxDate:$,isDateDisabled:R}=this.dp,{day:B}=d(this.date),Y=this._isOutOfMinMaxRange(),rt=R(this.date),et=b("air-datepicker-cell",`-${this.singleType}-`,{"-current-":g(S,this.date,this.type),"-min-date-":q&&g(q,this.date,this.type),"-max-date-":$&&g($,this.date,this.type)}),it="";switch(this.type){case t.days:it=b({"-weekend-":this.dp.isWeekend(B),"-other-month-":this.isOtherMonth,"-disabled-":this.isOtherMonth&&!z||Y||rt});break;case t.months:it=b({"-disabled-":Y});break;case t.years:it=b({"-other-decade-":this.isOtherDecade,"-disabled-":Y||this.isOtherDecade&&!M})}return b(et,it,(y=this.customData)===null||y===void 0?void 0:y.classes).split(" ")}_getHtml(){var y;let{year:S,month:z,date:M}=d(this.date),{showOtherMonths:q,showOtherYears:$}=this.opts;if((y=this.customData)!==null&&y!==void 0&&y.html)return this.customData.html;switch(this.type){case t.days:return!q&&this.isOtherMonth?"":M;case t.months:return this.dp.locale[this.opts.monthsField][z];case t.years:return!$&&this.isOtherDecade?"":S}}_isOutOfMinMaxRange(){let{minDate:y,maxDate:S}=this.dp,{type:z,date:M}=this,{month:q,year:$,date:R}=d(M),B=z===t.days,Y=z===t.years,rt=!!y&&new Date($,Y?y.getMonth():q,B?R:y.getDate()),et=!!S&&new Date($,Y?S.getMonth():q,B?R:S.getDate());return y&&S?x(rt,y)||v(et,S):y?x(rt,y):S?v(et,S):void 0}destroy(){this.unbindDatepickerEvents()}_handleRangeStatus(){let{selectedDates:y,focusDate:S,rangeDateTo:z,rangeDateFrom:M}=this.dp,q=y.length;if(this.$cell.classList.remove("-range-from-","-range-to-","-in-range-"),!q)return;let $=M,R=z;if(q===1&&S){let it=v(S,y[0]);$=it?y[0]:S,R=it?S:y[0]}let B=b({"-in-range-":$&&R&&(Y=this.date,rt=$,et=R,v(Y,rt)&&x(Y,et)),"-range-from-":$&&g(this.date,$,this.type),"-range-to-":R&&g(this.date,R,this.type)});var Y,rt,et;B&&this.$cell.classList.add(...B.split(" "))}_handleSelectedStatus(){let y=this.dp._checkIfDateIsSelected(this.date,this.type);y?this.select():!y&&this.selected&&this.removeSelect()}_handleInitialFocusStatus(){g(this.dp.focusDate,this.date,this.type)&&this.focus()}_handleClasses(){this.$cell.setAttribute("class",""),this._handleInitialFocusStatus(),this.dp.hasSelectedDates&&(this._handleSelectedStatus(),this.dp.opts.range&&this._handleRangeStatus()),this.$cell.classList.add(...this._getClassName())}get isDisabled(){return this.$cell.matches(".-disabled-")}get isOtherMonth(){return this.dp.isOtherMonth(this.date)}get isOtherDecade(){return this.dp.isOtherDecade(this.date)}}function tt(D,y,S){return(y=(function(z){var M=(function(q,$){if(typeof q!="object"||q===null)return q;var R=q[Symbol.toPrimitive];if(R!==void 0){var B=R.call(q,"string");if(typeof B!="object")return B;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(q)})(z);return typeof M=="symbol"?M:String(M)})(y))in D?Object.defineProperty(D,y,{value:S,enumerable:!0,configurable:!0,writable:!0}):D[y]=S,D}let ut={[t.days]:`<div class="air-datepicker-body--day-names"></div><div class="air-datepicker-body--cells -${t.days}-"></div>`,[t.months]:`<div class="air-datepicker-body--cells -${t.months}-"></div>`,[t.years]:`<div class="air-datepicker-body--cells -${t.years}-"></div>`},pt=".air-datepicker-cell";class gt{constructor(y){let{dp:S,type:z,opts:M}=y;tt(this,"handleClick",(q=>{let $=q.target.closest(pt).adpCell;if($.isDisabled)return;if(!this.dp.isMinViewReached)return void this.dp.down();let R=this.dp._checkIfDateIsSelected($.date,$.type);R?this.dp._handleAlreadySelectedDates(R,$.date):this.dp.selectDate($.date)})),tt(this,"handleDayNameClick",(q=>{let $=q.target.getAttribute("data-day-index");this.opts.onClickDayName({dayIndex:Number($),datepicker:this.dp})})),tt(this,"onChangeCurrentView",(q=>{q!==this.type?this.hide():(this.show(),this.render())})),tt(this,"onMouseOverCell",(q=>{let $=O(q.target,pt);this.dp.setFocusDate(!!$&&$.adpCell.date)})),tt(this,"onMouseOutCell",(()=>{this.dp.setFocusDate(!1)})),tt(this,"onClickBody",(q=>{let{onClickDayName:$}=this.opts,R=q.target;R.closest(pt)&&this.handleClick(q),$&&R.closest(".air-datepicker-body--day-name")&&this.handleDayNameClick(q)})),tt(this,"onMouseDown",(q=>{this.pressed=!0;let $=O(q.target,pt),R=$&&$.adpCell;g(R.date,this.dp.rangeDateFrom)&&(this.rangeFromFocused=!0),g(R.date,this.dp.rangeDateTo)&&(this.rangeToFocused=!0)})),tt(this,"onMouseMove",(q=>{if(!this.pressed||!this.dp.isMinViewReached)return;q.preventDefault();let $=O(q.target,pt),R=$&&$.adpCell,{selectedDates:B,rangeDateTo:Y,rangeDateFrom:rt}=this.dp;if(!R||R.isDisabled)return;let{date:et}=R;if(B.length===2){if(this.rangeFromFocused&&!v(et,Y)){let{hours:it,minutes:he}=d(rt);et.setHours(it),et.setMinutes(he),this.dp.rangeDateFrom=et,this.dp.replaceDate(rt,et)}if(this.rangeToFocused&&!x(et,rt)){let{hours:it,minutes:he}=d(Y);et.setHours(it),et.setMinutes(he),this.dp.rangeDateTo=et,this.dp.replaceDate(Y,et)}}})),tt(this,"onMouseUp",(()=>{this.pressed=!1,this.rangeFromFocused=!1,this.rangeToFocused=!1})),tt(this,"onChangeViewDate",((q,$)=>{if(!this.isVisible)return;let R=f(q),B=f($);switch(this.dp.currentView){case t.days:if(g(q,$,t.months))return;break;case t.months:if(g(q,$,t.years))return;break;case t.years:if(R[0]===B[0]&&R[1]===B[1])return}this.render()})),tt(this,"render",(()=>{this.destroyCells(),this._generateCells(),this.cells.forEach((q=>{this.$cells.appendChild(q.render())}))})),this.dp=S,this.type=z,this.opts=M,this.cells=[],this.$el="",this.pressed=!1,this.isVisible=!0,this.init()}init(){this._buildBaseHtml(),this.type===t.days&&this.renderDayNames(),this.render(),this._bindEvents(),this._bindDatepickerEvents()}_bindEvents(){let{range:y,dynamicRange:S}=this.opts;_(this.$el,"mouseover",this.onMouseOverCell),_(this.$el,"mouseout",this.onMouseOutCell),_(this.$el,"click",this.onClickBody),y&&S&&(_(this.$el,"mousedown",this.onMouseDown),_(this.$el,"mousemove",this.onMouseMove),_(window.document,"mouseup",this.onMouseUp))}_bindDatepickerEvents(){this.dp.on(t.eventChangeViewDate,this.onChangeViewDate),this.dp.on(t.eventChangeCurrentView,this.onChangeCurrentView)}_buildBaseHtml(){this.$el=a({className:`air-datepicker-body -${this.type}-`,innerHtml:ut[this.type]}),this.$names=n(".air-datepicker-body--day-names",this.$el),this.$cells=n(".air-datepicker-body--cells",this.$el)}_getDayNamesHtml(){let y=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.dp.locale.firstDay,S="",z=this.dp.isWeekend,{onClickDayName:M}=this.opts,q=y,$=0;for(;$<7;){let R=q%7;S+=`<div class="${b("air-datepicker-body--day-name",{[t.cssClassWeekend]:z(R),"-clickable-":!!M})}" data-day-index='${R}'>${this.dp.locale.daysMin[R]}</div>`,$++,q++}return S}renderDayNames(){this.$names.innerHTML=this._getDayNamesHtml()}_generateCell(y){let{type:S,dp:z,opts:M}=this;return new W({type:S,dp:z,opts:M,date:y,body:this})}_generateCells(){gt.getDatesFunction(this.type)(this.dp,(y=>{this.cells.push(this._generateCell(y))}))}show(){this.isVisible=!0,this.$el.classList.remove("-hidden-")}hide(){this.isVisible=!1,this.$el.classList.add("-hidden-")}destroyCells(){this.cells.forEach((y=>y.destroy())),this.cells=[],this.$cells.innerHTML=""}destroy(){this.destroyCells(),this.dp.off(t.eventChangeViewDate,this.onChangeViewDate),this.dp.off(t.eventChangeCurrentView,this.onChangeCurrentView)}static getDaysDates(y,S){let{viewDate:z,opts:{fixedHeight:M},locale:{firstDay:q}}=y,$=l(z),{year:R,month:B}=d(z),Y=new Date(R,B,1),rt=new Date(R,B,$),et=Y.getDay()-q,it=6-rt.getDay()+q;et=et<0?et+7:et,it=it>6?it-7:it;let he=(function(Pi,Rp){let{year:hc,month:O1,date:P1}=d(Pi);return new Date(hc,O1,P1-Rp)})(Y,et),Mr=$+et+it,ir=he.getDate(),{year:Zo,month:qs}=d(he),Ri=0;M&&(Mr=42);let Oi=[];for(;Ri<Mr;){let Pi=new Date(Zo,qs,ir+Ri);S&&S(Pi),Oi.push(Pi),Ri++}return Oi}static getMonthsDates(y,S){let{year:z}=y.parsedViewDate,M=0,q=[];for(;M<12;){let $=new Date(z,M);q.push($),S&&S($),M++}return q}static getYearsDates(y,S){let z=f(y.viewDate),M=z[0]-1,q=z[1]+1,$=M,R=[];for(;$<=q;){let B=new Date($,0);R.push(B),S&&S(B),$++}return R}static getDatesFunction(){let y=arguments.length>0&&arguments[0]!==void 0?arguments[0]:t.days;return{[t.days]:gt.getDaysDates,[t.months]:gt.getMonthsDates,[t.years]:gt.getYearsDates}[y]}}function Ut(D,y,S){return(y=(function(z){var M=(function(q,$){if(typeof q!="object"||q===null)return q;var R=q[Symbol.toPrimitive];if(R!==void 0){var B=R.call(q,"string");if(typeof B!="object")return B;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(q)})(z);return typeof M=="symbol"?M:String(M)})(y))in D?Object.defineProperty(D,y,{value:S,enumerable:!0,configurable:!0,writable:!0}):D[y]=S,D}class jt{constructor(y){let{dp:S,opts:z}=y;Ut(this,"onClickNav",(M=>{let q=O(M.target,".air-datepicker-nav--action");if(!q)return;let $=q.dataset.action;this.dp[$]()})),Ut(this,"onChangeViewDate",(()=>{this.render(),this._resetNavStatus(),this.handleNavStatus()})),Ut(this,"onChangeCurrentView",(()=>{this.render(),this._resetNavStatus(),this.handleNavStatus()})),Ut(this,"onClickNavTitle",(()=>{this.dp.isFinalView||this.dp.up()})),Ut(this,"update",(()=>{let{prevHtml:M,nextHtml:q}=this.opts;this.$prev.innerHTML=M,this.$next.innerHTML=q,this._resetNavStatus(),this.render(),this.handleNavStatus()})),Ut(this,"renderDelay",(()=>{setTimeout(this.render)})),Ut(this,"render",(()=>{this.$title.innerHTML=this._getTitle(),(function(M,q){for(let $ in q)q[$]?M.classList.add($):M.classList.remove($)})(this.$title,{"-disabled-":this.dp.isFinalView})})),this.dp=S,this.opts=z,this.init()}init(){this._createElement(),this._buildBaseHtml(),this._defineDOM(),this.render(),this.handleNavStatus(),this._bindEvents(),this._bindDatepickerEvents()}_defineDOM(){this.$title=n(".air-datepicker-nav--title",this.$el),this.$prev=n('[data-action="prev"]',this.$el),this.$next=n('[data-action="next"]',this.$el)}_bindEvents(){this.$el.addEventListener("click",this.onClickNav),this.$title.addEventListener("click",this.onClickNavTitle)}_bindDatepickerEvents(){this.dp.on(t.eventChangeViewDate,this.onChangeViewDate),this.dp.on(t.eventChangeCurrentView,this.onChangeCurrentView),this.isNavIsFunction&&(this.dp.on(t.eventChangeSelectedDate,this.renderDelay),this.dp.opts.timepicker&&this.dp.on(t.eventChangeTime,this.render))}destroy(){this.dp.off(t.eventChangeViewDate,this.onChangeViewDate),this.dp.off(t.eventChangeCurrentView,this.onChangeCurrentView),this.isNavIsFunction&&(this.dp.off(t.eventChangeSelectedDate,this.renderDelay),this.dp.opts.timepicker&&this.dp.off(t.eventChangeTime,this.render))}_createElement(){this.$el=a({tagName:"nav",className:"air-datepicker-nav"})}_getTitle(){let{dp:y,opts:S}=this,z=S.navTitles[y.currentView];return typeof z=="function"?z(y):y.formatDate(y.viewDate,z)}handleNavStatus(){let{disableNavWhenOutOfRange:y}=this.opts,{minDate:S,maxDate:z}=this.dp;if(!S&&!z||!y)return;let{year:M,month:q}=this.dp.parsedViewDate,$=!!S&&d(S),R=!!z&&d(z);switch(this.dp.currentView){case t.days:S&&$.month>=q&&$.year>=M&&this._disableNav("prev"),z&&R.month<=q&&R.year<=M&&this._disableNav("next");break;case t.months:S&&$.year>=M&&this._disableNav("prev"),z&&R.year<=M&&this._disableNav("next");break;case t.years:{let B=f(this.dp.viewDate);S&&$.year>=B[0]&&this._disableNav("prev"),z&&R.year<=B[1]&&this._disableNav("next");break}}}_disableNav(y){n('[data-action="'+y+'"]',this.$el).classList.add("-disabled-")}_resetNavStatus(){(function(y){for(var S=arguments.length,z=new Array(S>1?S-1:0),M=1;M<S;M++)z[M-1]=arguments[M];y.length?y.forEach((q=>{q.classList.remove(...z)})):y.classList.remove(...z)})(this.$el.querySelectorAll(".air-datepicker-nav--action"),"-disabled-")}_buildBaseHtml(){let{prevHtml:y,nextHtml:S}=this.opts;this.$el.innerHTML=`<div class="air-datepicker-nav--action" data-action="prev">${y}</div><div class="air-datepicker-nav--title"></div><div class="air-datepicker-nav--action" data-action="next">${S}</div>`}get isNavIsFunction(){let{navTitles:y}=this.opts;return Object.keys(y).find((S=>typeof y[S]=="function"))}}var Ve={today:{content:D=>D.locale.today,onClick:D=>D.setViewDate(new Date)},clear:{content:D=>D.locale.clear,onClick:D=>D.clear()}};class nr{constructor(y){let{dp:S,opts:z}=y;this.dp=S,this.opts=z,this.init()}init(){this.createElement(),this.render()}createElement(){this.$el=a({className:"air-datepicker-buttons"})}destroy(){this.$el.parentNode.removeChild(this.$el)}clearHtml(){return this.$el.innerHTML="",this}generateButtons(){let{buttons:y}=this.opts;Array.isArray(y)||(y=[y]),y.forEach((S=>{let z=S;typeof S=="string"&&Ve[S]&&(z=Ve[S]);let M=this.createButton(z);z.onClick&&this.attachEventToButton(M,z.onClick),this.$el.appendChild(M)}))}attachEventToButton(y,S){y.addEventListener("click",(()=>{S(this.dp)}))}createButton(y){let{content:S,className:z,tagName:M="button",attrs:q={}}=y;return a({tagName:M,innerHtml:`<span tabindex='-1'>${typeof S=="function"?S(this.dp):S}</span>`,className:b("air-datepicker-button",z),attrs:q})}render(){this.generateButtons()}}function Jt(D,y,S){return(y=(function(z){var M=(function(q,$){if(typeof q!="object"||q===null)return q;var R=q[Symbol.toPrimitive];if(R!==void 0){var B=R.call(q,"string");if(typeof B!="object")return B;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(q)})(z);return typeof M=="symbol"?M:String(M)})(y))in D?Object.defineProperty(D,y,{value:S,enumerable:!0,configurable:!0,writable:!0}):D[y]=S,D}class Ue{constructor(){let{opts:y,dp:S}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Jt(this,"toggleTimepickerIsActive",(M=>{this.dp.timepickerIsActive=M})),Jt(this,"onChangeSelectedDate",(M=>{let{date:q,updateTime:$=!1}=M;q&&(this.setMinMaxTime(q),this.setCurrentTime(!!$&&q),this.addTimeToDate(q))})),Jt(this,"onChangeLastSelectedDate",(M=>{M&&(this.setTime(M),this.render())})),Jt(this,"onChangeInputRange",(M=>{let q=M.target;this[q.getAttribute("name")]=q.value,this.updateText(),this.dp.trigger(t.eventChangeTime,{hours:this.hours,minutes:this.minutes})})),Jt(this,"onMouseEnterLeave",(M=>{let q=M.target.getAttribute("name"),$=this.$minutesText;q==="hours"&&($=this.$hoursText),$.classList.toggle("-focus-")})),Jt(this,"onFocus",(()=>{this.toggleTimepickerIsActive(!0)})),Jt(this,"onBlur",(()=>{this.toggleTimepickerIsActive(!1)})),this.opts=y,this.dp=S;let{timeFormat:z}=this.dp.locale;z&&(z.match(T("h"))||z.match(T("hh")))&&(this.ampm=!0),this.init()}init(){this.setTime(this.dp.lastSelectedDate||this.dp.viewDate),this.createElement(),this.buildHtml(),this.defineDOM(),this.render(),this.bindDatepickerEvents(),this.bindDOMEvents()}bindDatepickerEvents(){this.dp.on(t.eventChangeSelectedDate,this.onChangeSelectedDate),this.dp.on(t.eventChangeLastSelectedDate,this.onChangeLastSelectedDate)}bindDOMEvents(){let y="input";navigator.userAgent.match(/trident/gi)&&(y="change"),_(this.$ranges,y,this.onChangeInputRange),_(this.$ranges,"mouseenter",this.onMouseEnterLeave),_(this.$ranges,"mouseleave",this.onMouseEnterLeave),_(this.$ranges,"focus",this.onFocus),_(this.$ranges,"mousedown",this.onFocus),_(this.$ranges,"blur",this.onBlur)}createElement(){this.$el=a({className:b("air-datepicker-time",{"-am-pm-":this.dp.ampm})})}destroy(){this.dp.off(t.eventChangeSelectedDate,this.onChangeSelectedDate),this.dp.off(t.eventChangeLastSelectedDate,this.onChangeLastSelectedDate),this.$el.parentNode.removeChild(this.$el)}buildHtml(){let{ampm:y,hours:S,displayHours:z,minutes:M,minHours:q,minMinutes:$,maxHours:R,maxMinutes:B,dayPeriod:Y,opts:{hoursStep:rt,minutesStep:et}}=this;this.$el.innerHTML=`<div class="air-datepicker-time--current"> <span class="air-datepicker-time--current-hours">${m(z)}</span> <span class="air-datepicker-time--current-colon">:</span> <span class="air-datepicker-time--current-minutes">${m(M)}</span> `+(y?`<span class='air-datepicker-time--current-ampm'>${Y}</span>`:"")+`</div><div class="air-datepicker-time--sliders"> <div class="air-datepicker-time--row"> <input type="range" name="hours" value="${S}" min="${q}" max="${R}" step="${rt}"/> </div> <div class="air-datepicker-time--row"> <input type="range" name="minutes" value="${M}" min="${$}" max="${B}" step="${et}"/> </div></div>`}defineDOM(){let y=S=>n(S,this.$el);this.$ranges=this.$el.querySelectorAll('[type="range"]'),this.$hours=y('[name="hours"]'),this.$minutes=y('[name="minutes"]'),this.$hoursText=y(".air-datepicker-time--current-hours"),this.$minutesText=y(".air-datepicker-time--current-minutes"),this.$ampm=y(".air-datepicker-time--current-ampm")}setTime(y){this.setMinMaxTime(y),this.setCurrentTime(y)}addTimeToDate(y){y&&(y.setHours(this.hours),y.setMinutes(this.minutes))}setMinMaxTime(y){if(this.setMinMaxTimeFromOptions(),y){let{minDate:S,maxDate:z}=this.dp;S&&g(y,S)&&this.setMinTimeFromMinDate(S),z&&g(y,z)&&this.setMaxTimeFromMaxDate(z)}}setCurrentTime(y){let{hours:S,minutes:z}=y?d(y):this;this.hours=j(S,this.minHours,this.maxHours),this.minutes=j(z,this.minMinutes,this.maxMinutes)}setMinMaxTimeFromOptions(){let{minHours:y,minMinutes:S,maxHours:z,maxMinutes:M}=this.opts;this.minHours=j(y,0,23),this.minMinutes=j(S,0,59),this.maxHours=j(z,0,23),this.maxMinutes=j(M,0,59)}setMinTimeFromMinDate(y){let{lastSelectedDate:S}=this.dp;this.minHours=y.getHours(),S&&S.getHours()>y.getHours()?this.minMinutes=this.opts.minMinutes:this.minMinutes=y.getMinutes()}setMaxTimeFromMaxDate(y){let{lastSelectedDate:S}=this.dp;this.maxHours=y.getHours(),S&&S.getHours()<y.getHours()?this.maxMinutes=this.opts.maxMinutes:this.maxMinutes=y.getMinutes()}updateSliders(){s(this.$hours,{min:this.minHours,max:this.maxHours}).value=this.hours,s(this.$minutes,{min:this.minMinutes,max:this.maxMinutes}).value=this.minutes}updateText(){this.$hoursText.innerHTML=m(this.displayHours),this.$minutesText.innerHTML=m(this.minutes),this.ampm&&(this.$ampm.innerHTML=this.dayPeriod)}set hours(y){this._hours=y;let{hours:S,dayPeriod:z}=h(y);this.displayHours=this.ampm?S:y,this.dayPeriod=z}get hours(){return this._hours}render(){this.updateSliders(),this.updateText()}}function ve(D,y,S){return(y=(function(z){var M=(function(q,$){if(typeof q!="object"||q===null)return q;var R=q[Symbol.toPrimitive];if(R!==void 0){var B=R.call(q,"string");if(typeof B!="object")return B;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(q)})(z);return typeof M=="symbol"?M:String(M)})(y))in D?Object.defineProperty(D,y,{value:S,enumerable:!0,configurable:!0,writable:!0}):D[y]=S,D}class Jn{constructor(y){let{dp:S,opts:z}=y;ve(this,"pressedKeys",new Set),ve(this,"hotKeys",new Map([[[["Control","ArrowRight"],["Control","ArrowUp"]],M=>M.month++],[[["Control","ArrowLeft"],["Control","ArrowDown"]],M=>M.month--],[[["Shift","ArrowRight"],["Shift","ArrowUp"]],M=>M.year++],[[["Shift","ArrowLeft"],["Shift","ArrowDown"]],M=>M.year--],[[["Alt","ArrowRight"],["Alt","ArrowUp"]],M=>M.year+=10],[[["Alt","ArrowLeft"],["Alt","ArrowDown"]],M=>M.year-=10],[["Control","Shift","ArrowUp"],(M,q)=>q.up()]])),ve(this,"handleHotKey",(M=>{let q=this.hotKeys.get(M),$=d(this.getInitialFocusDate());q($,this.dp);let{year:R,month:B,date:Y}=$,rt=l(new Date(R,B));rt<Y&&(Y=rt);let et=this.dp.getClampedDate(new Date(R,B,Y));this.dp.setFocusDate(et,{viewDateTransition:!0})})),ve(this,"isHotKeyPressed",(()=>{let M=!1,q=this.pressedKeys.size,$=R=>this.pressedKeys.has(R);for(let[R]of this.hotKeys){if(M)break;if(Array.isArray(R[0]))R.forEach((B=>{M||q!==B.length||(M=B.every($)&&R)}));else{if(q!==R.length)continue;M=R.every($)&&R}}return M})),ve(this,"isArrow",(M=>M>=37&&M<=40)),ve(this,"onKeyDown",(M=>{if(!this.dp.visible&&!this.dp.treatAsInline)return;let{key:q,which:$}=M,{dp:R,dp:{focusDate:B},opts:Y}=this;this.registerKey(q);let rt=this.isHotKeyPressed();if(rt)return M.preventDefault(),void this.handleHotKey(rt);if(this.isArrow($))return M.preventDefault(),void this.focusNextCell(q);if(q==="Enter"){if(R.currentView!==Y.minView)return void R.down();if(B){let et=R._checkIfDateIsSelected(B);return void(et?R._handleAlreadySelectedDates(et,B):R.selectDate(B))}}q==="Escape"&&this.dp.hide()})),ve(this,"onKeyUp",(M=>{this.removeKey(M.key)})),this.dp=S,this.opts=z,this.init()}init(){this.bindKeyboardEvents()}bindKeyboardEvents(){let{$el:y}=this.dp;y.addEventListener("keydown",this.onKeyDown),y.addEventListener("keyup",this.onKeyUp)}destroy(){let{$el:y}=this.dp;y.removeEventListener("keydown",this.onKeyDown),y.removeEventListener("keyup",this.onKeyUp),this.hotKeys=null,this.pressedKeys=null}getInitialFocusDate(){let{focusDate:y,currentView:S,selectedDates:z,parsedViewDate:{year:M,month:q}}=this.dp,$=y||z[z.length-1];if(!$)switch(S){case t.days:$=new Date(M,q,new Date().getDate());break;case t.months:$=new Date(M,q,1);break;case t.years:$=new Date(M,0,1)}return $}focusNextCell(y){let S=this.getInitialFocusDate(),{currentView:z}=this.dp,{days:M,months:q,years:$}=t,R=d(S),B=R.year,Y=R.month,rt=R.date;switch(y){case"ArrowLeft":z===M&&(rt-=1),z===q&&(Y-=1),z===$&&(B-=1);break;case"ArrowUp":z===M&&(rt-=7),z===q&&(Y-=3),z===$&&(B-=4);break;case"ArrowRight":z===M&&(rt+=1),z===q&&(Y+=1),z===$&&(B+=1);break;case"ArrowDown":z===M&&(rt+=7),z===q&&(Y+=3),z===$&&(B+=4)}let et=this.dp.getClampedDate(new Date(B,Y,rt));this.dp.setFocusDate(et,{viewDateTransition:!0})}registerKey(y){this.pressedKeys.add(y)}removeKey(y){this.pressedKeys.delete(y)}}let ka={on(D,y){this.__events||(this.__events={}),this.__events[D]?this.__events[D].push(y):this.__events[D]=[y]},off(D,y){this.__events&&this.__events[D]&&(this.__events[D]=this.__events[D].filter((S=>S!==y)))},removeAllEvents(){this.__events={}},trigger(D){for(var y=arguments.length,S=new Array(y>1?y-1:0),z=1;z<y;z++)S[z-1]=arguments[z];this.__events&&this.__events[D]&&this.__events[D].forEach((M=>{M(...S)}))}};function ht(D,y,S){return(y=(function(z){var M=(function(q,$){if(typeof q!="object"||q===null)return q;var R=q[Symbol.toPrimitive];if(R!==void 0){var B=R.call(q,"string");if(typeof B!="object")return B;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(q)})(z);return typeof M=="symbol"?M:String(M)})(y))in D?Object.defineProperty(D,y,{value:S,enumerable:!0,configurable:!0,writable:!0}):D[y]=S,D}let $o="",Lo="",dt=!1;class nt{static buildGlobalContainer(y){dt=!0,$o=a({className:y,id:y}),n("body").appendChild($o)}constructor(y,S){var z=this;if(ht(this,"viewIndexes",[t.days,t.months,t.years]),ht(this,"next",(()=>{let{year:$,month:R}=this.parsedViewDate;switch(this.currentView){case t.days:this.setViewDate(new Date($,R+1,1));break;case t.months:this.setViewDate(new Date($+1,R,1));break;case t.years:this.setViewDate(new Date($+10,0,1))}})),ht(this,"prev",(()=>{let{year:$,month:R}=this.parsedViewDate;switch(this.currentView){case t.days:this.setViewDate(new Date($,R-1,1));break;case t.months:this.setViewDate(new Date($-1,R,1));break;case t.years:this.setViewDate(new Date($-10,0,1))}})),ht(this,"_finishHide",(()=>{this.hideAnimation=!1,this._destroyComponents(),this.$container.removeChild(this.$datepicker)})),ht(this,"setPosition",(function($){let R=arguments.length>1&&arguments[1]!==void 0&&arguments[1];if(typeof($=$||z.opts.position)=="function")return void(z.customHide=$({$datepicker:z.$datepicker,$target:z.$el,$pointer:z.$pointer,isViewChange:R,done:z._finishHide}));let B,Y,{isMobile:rt}=z.opts,et=z.$el.getBoundingClientRect(),it=z.$el.getBoundingClientRect(),he=z.$datepicker.offsetParent,Mr=z.$el.offsetParent,ir=z.$datepicker.getBoundingClientRect(),Zo=$.split(" "),qs=window.scrollY,Ri=window.scrollX,Oi=z.opts.offset,Pi=Zo[0],Rp=Zo[1];if(rt)z.$datepicker.style.cssText="left: 50%; top: 50%";else{if(he===Mr&&he!==document.body&&(it={top:z.$el.offsetTop,left:z.$el.offsetLeft,width:et.width,height:z.$el.offsetHeight},qs=0,Ri=0),he!==Mr&&he!==document.body){let hc=he.getBoundingClientRect();it={top:et.top-hc.top,left:et.left-hc.left,width:et.width,height:et.height},qs=0,Ri=0}switch(Pi){case"top":B=it.top-ir.height-Oi;break;case"right":Y=it.left+it.width+Oi;break;case"bottom":B=it.top+it.height+Oi;break;case"left":Y=it.left-ir.width-Oi}switch(Rp){case"top":B=it.top;break;case"right":Y=it.left+it.width-ir.width;break;case"bottom":B=it.top+it.height-ir.height;break;case"left":Y=it.left;break;case"center":/left|right/.test(Pi)?B=it.top+it.height/2-ir.height/2:Y=it.left+it.width/2-ir.width/2}z.$datepicker.style.cssText=`left: ${Y+Ri}px; top: ${B+qs}px`}})),ht(this,"_setInputValue",(()=>{let{opts:$,$altField:R,locale:{dateFormat:B}}=this,{altFieldDateFormat:Y,altField:rt}=$;rt&&R&&(R.value=this._getInputValue(Y)),this.$el.value=this._getInputValue(B),this.$el.dispatchEvent(new Event("change"))})),ht(this,"_getInputValue",($=>{let{selectedDates:R,opts:B}=this,{multipleDates:Y,multipleDatesSeparator:rt}=B;if(!R.length)return"";let et=typeof $=="function",it=et?$(Y?R:R[0]):R.map((he=>this.formatDate(he,$)));return it=et?it:it.join(rt),it})),ht(this,"_checkIfDateIsSelected",(function($){let R=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t.days,B=!1;return z.selectedDates.some((Y=>{let rt=g($,Y,R);return B=rt&&Y,rt})),B})),ht(this,"_scheduleCallAfterTransition",($=>{this._cancelScheduledCall(),$&&$(!1),this._onTransitionEnd=()=>{$&&$(!0)},this.$datepicker.addEventListener("transitionend",this._onTransitionEnd,{once:!0})})),ht(this,"_cancelScheduledCall",(()=>{this.$datepicker.removeEventListener("transitionend",this._onTransitionEnd)})),ht(this,"setViewDate",($=>{if(!(($=w($))instanceof Date)||g($,this.viewDate))return;let R=this.viewDate;this.viewDate=$;let{onChangeViewDate:B}=this.opts;if(B){let{month:Y,year:rt}=this.parsedViewDate;B({month:Y,year:rt,decade:this.curDecade})}this.trigger(t.eventChangeViewDate,$,R)})),ht(this,"setFocusDate",(function($){let R=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};(!$||($=w($))instanceof Date)&&(z.focusDate=$,z.trigger(t.eventChangeFocusDate,$,R))})),ht(this,"setCurrentView",(function($){let R=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(z.viewIndexes.includes($)){if(z.currentView=$,z.elIsInput&&z.visible&&z.setPosition(void 0,!0),z.trigger(t.eventChangeCurrentView,$),!z.views[$]){let B=z.views[$]=new gt({dp:z,opts:z.opts,type:$});z.shouldUpdateDOM&&z.$content.appendChild(B.$el)}z.opts.onChangeView&&!R.silent&&z.opts.onChangeView($)}})),ht(this,"_updateLastSelectedDate",($=>{this.lastSelectedDate=$,this.trigger(t.eventChangeLastSelectedDate,$)})),ht(this,"destroy",(()=>{if(this.isDestroyed)return;let{showEvent:$,isMobile:R}=this.opts,B=this.$datepicker.parentNode;B&&B.removeChild(this.$datepicker),this.$el.removeEventListener($,this._onFocus),this.$el.removeEventListener("blur",this._onBlur),window.removeEventListener("resize",this._onResize),R&&this._removeMobileAttributes(),this.keyboardNav&&this.keyboardNav.destroy(),this.views=null,this.nav=null,this.$datepicker=null,this.opts={},this.$customContainer=null,this.viewDate=null,this.focusDate=null,this.selectedDates=[],this.rangeDateFrom=null,this.rangeDateTo=null,this.isDestroyed=!0})),ht(this,"update",(function(){let $=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},R=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},B=I({},z.opts),{silent:Y}=R;I(z.opts,$);let{timepicker:rt,buttons:et,range:it,selectedDates:he,isMobile:Mr}=z.opts,ir=z.visible||z.treatAsInline;z._createMinMaxDates(),z._limitViewDateByMaxMinDates(),z._handleLocale(),he&&(z.selectedDates=[],z.selectDate(he,{silent:Y})),$.view&&z.setCurrentView($.view,{silent:Y}),z._setInputValue(),B.range&&!it?(z.rangeDateTo=!1,z.rangeDateFrom=!1):!B.range&&it&&z.selectedDates.length&&(z.rangeDateFrom=z.selectedDates[0],z.rangeDateTo=z.selectedDates[1]),B.timepicker&&!rt?(ir&&z.timepicker.destroy(),z.timepicker=!1,z.$timepicker.parentNode.removeChild(z.$timepicker)):!B.timepicker&&rt&&z._addTimepicker(),!B.buttons&&et?z._addButtons():B.buttons&&!et?(z.buttons.destroy(),z.$buttons.parentNode.removeChild(z.$buttons)):ir&&B.buttons&&et&&z.buttons.clearHtml().render(),!B.isMobile&&Mr?(z.treatAsInline||Lo||z._createMobileOverlay(),z._addMobileAttributes(),z.visible&&z._showMobileOverlay()):B.isMobile&&!Mr&&(z._removeMobileAttributes(),z.visible&&(Lo.classList.remove("-active-"),typeof z.opts.position!="function"&&z.setPosition())),ir&&(z.nav.update(),z.views[z.currentView].render(),z.currentView===t.days&&z.views[z.currentView].renderDayNames())})),ht(this,"disableDate",(($,R)=>{(Array.isArray($)?$:[$]).forEach((B=>{let Y=w(B);if(!Y)return;let rt=R?"delete":"add";this.disabledDates[rt](this.formatDate(Y,"yyyy-MM-dd"));let et=this.getCell(Y,this.currentViewSingular);et&&et.adpCell.render()}),[])})),ht(this,"enableDate",($=>{this.disableDate($,!0)})),ht(this,"isDateDisabled",($=>{let R=w($);return this.disabledDates.has(this.formatDate(R,"yyyy-MM-dd"))})),ht(this,"isOtherMonth",($=>{let{month:R}=d($);return R!==this.parsedViewDate.month})),ht(this,"isOtherYear",($=>{let{year:R}=d($);return R!==this.parsedViewDate.year})),ht(this,"isOtherDecade",($=>{let{year:R}=d($),[B,Y]=f(this.viewDate);return R<B||R>Y})),ht(this,"_onChangeSelectedDate",($=>{let{silent:R}=$;setTimeout((()=>{this._setInputValue(),this.opts.onSelect&&!R&&this._triggerOnSelect()}))})),ht(this,"_onChangeFocusedDate",(function($){let{viewDateTransition:R}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!$)return;let B=!1;R&&(B=z.isOtherMonth($)||z.isOtherYear($)||z.isOtherDecade($)),B&&z.setViewDate($),z.opts.onFocus&&z.opts.onFocus({datepicker:z,date:$})})),ht(this,"_onChangeTime",($=>{let{hours:R,minutes:B}=$,Y=new Date,{lastSelectedDate:rt,opts:{onSelect:et}}=this,it=rt;rt||(it=Y);let he=this.getCell(it,this.currentViewSingular),Mr=he&&he.adpCell;Mr&&Mr.isDisabled||(it.setHours(R),it.setMinutes(B),rt?(this._setInputValue(),et&&this._triggerOnSelect()):this.selectDate(it))})),ht(this,"_onFocus",($=>{this.visible||this.show()})),ht(this,"_onBlur",($=>{this.inFocus||!this.visible||this.opts.isMobile||this.hide()})),ht(this,"_onMouseDown",($=>{this.inFocus=!0})),ht(this,"_onMouseUp",($=>{this.inFocus=!1,this.$el.focus()})),ht(this,"_onResize",(()=>{this.visible&&typeof this.opts.position!="function"&&this.setPosition()})),ht(this,"_onClickOverlay",(()=>{this.visible&&this.hide()})),ht(this,"getViewDates",(function(){let $=arguments.length>0&&arguments[0]!==void 0?arguments[0]:t.days;return gt.getDatesFunction($)(z)})),ht(this,"isWeekend",($=>this.opts.weekends.includes($))),ht(this,"getClampedDate",($=>{let{minDate:R,maxDate:B}=this,Y=$;return B&&v($,B)?Y=B:R&&x($,R)&&(Y=R),Y})),this.$el=n(y),!this.$el)return;this.$datepicker=a({className:"air-datepicker"}),this.opts=I({},r,S),this.$customContainer=!!this.opts.container&&n(this.opts.container),this.$altField=n(this.opts.altField||!1);let{view:M,startDate:q}=this.opts;q||(this.opts.startDate=new Date),this.$el.nodeName==="INPUT"&&(this.elIsInput=!0),this.inited=!1,this.visible=!1,this.viewDate=w(this.opts.startDate),this.focusDate=!1,this.initialReadonly=this.$el.getAttribute("readonly"),this.customHide=!1,this.currentView=M,this.selectedDates=[],this.disabledDates=new Set,this.isDestroyed=!1,this.views={},this.keys=[],this.rangeDateFrom="",this.rangeDateTo="",this.timepickerIsActive=!1,this.treatAsInline=this.opts.inline||!this.elIsInput,this.init()}init(){let{opts:y,treatAsInline:S,opts:{inline:z,isMobile:M,selectedDates:q,keyboardNav:$,onlyTimepicker:R}}=this,B=n("body");(!dt||dt&&$o&&!B.contains($o))&&!z&&this.elIsInput&&!this.$customContainer&&nt.buildGlobalContainer(nt.defaultGlobalContainerId),!M||Lo||S||this._createMobileOverlay(),this._handleLocale(),this._bindSubEvents(),this._createMinMaxDates(),this._limitViewDateByMaxMinDates(),this.elIsInput&&(z||this._bindEvents(),$&&!R&&(this.keyboardNav=new Jn({dp:this,opts:y}))),q&&this.selectDate(q,{silent:!0}),this.opts.visible&&!S&&this.show(),M&&!S&&this.$el.setAttribute("readonly",!0),S&&this._createComponents()}_createMobileOverlay(){Lo=a({className:"air-datepicker-overlay"}),$o.appendChild(Lo)}_createComponents(){let{opts:y,treatAsInline:S,opts:{inline:z,buttons:M,timepicker:q,position:$,classes:R,onlyTimepicker:B,isMobile:Y}}=this;this._buildBaseHtml(),this.elIsInput&&(z||this._setPositionClasses($)),!z&&this.elIsInput||this.$datepicker.classList.add("-inline-"),R&&this.$datepicker.classList.add(...R.split(" ")),B&&this.$datepicker.classList.add("-only-timepicker-"),Y&&!S&&this._addMobileAttributes(),this.views[this.currentView]=new gt({dp:this,type:this.currentView,opts:y}),this.nav=new jt({dp:this,opts:y}),q&&this._addTimepicker(),M&&this._addButtons(),this.$content.appendChild(this.views[this.currentView].$el),this.$nav.appendChild(this.nav.$el)}_destroyComponents(){for(let y in this.views)this.views[y].destroy();this.views={},this.nav.destroy(),this.timepicker&&this.timepicker.destroy()}_addMobileAttributes(){Lo.addEventListener("click",this._onClickOverlay),this.$datepicker.classList.add("-is-mobile-"),this.$el.setAttribute("readonly",!0)}_removeMobileAttributes(){Lo.removeEventListener("click",this._onClickOverlay),this.$datepicker.classList.remove("-is-mobile-"),this.initialReadonly||this.initialReadonly===""||this.$el.removeAttribute("readonly")}_createMinMaxDates(){let{minDate:y,maxDate:S}=this.opts;this.minDate=!!y&&w(y),this.maxDate=!!S&&w(S)}_addTimepicker(){this.$timepicker=a({className:"air-datepicker--time"}),this.$datepicker.appendChild(this.$timepicker),this.timepicker=new Ue({dp:this,opts:this.opts}),this.$timepicker.appendChild(this.timepicker.$el)}_addButtons(){this.$buttons=a({className:"air-datepicker--buttons"}),this.$datepicker.appendChild(this.$buttons),this.buttons=new nr({dp:this,opts:this.opts}),this.$buttons.appendChild(this.buttons.$el)}_bindSubEvents(){this.on(t.eventChangeSelectedDate,this._onChangeSelectedDate),this.on(t.eventChangeFocusDate,this._onChangeFocusedDate),this.on(t.eventChangeTime,this._onChangeTime)}_buildBaseHtml(){let{inline:y}=this.opts;var S,z;this.elIsInput?y?(S=this.$datepicker,(z=this.$el).parentNode.insertBefore(S,z.nextSibling)):this.$container.appendChild(this.$datepicker):this.$el.appendChild(this.$datepicker),this.$datepicker.innerHTML='<i class="air-datepicker--pointer"></i><div class="air-datepicker--navigation"></div><div class="air-datepicker--content"></div>',this.$content=n(".air-datepicker--content",this.$datepicker),this.$pointer=n(".air-datepicker--pointer",this.$datepicker),this.$nav=n(".air-datepicker--navigation",this.$datepicker)}_handleLocale(){let{locale:y,dateFormat:S,firstDay:z,timepicker:M,onlyTimepicker:q,timeFormat:$,dateTimeSeparator:R}=this.opts;var B;this.locale=(B=y,JSON.parse(JSON.stringify(B))),S&&(this.locale.dateFormat=S),$!==void 0&&$!==""&&(this.locale.timeFormat=$);let{timeFormat:Y}=this.locale;if(z!==""&&(this.locale.firstDay=z),M&&typeof S!="function"){let rt=Y?R:"";this.locale.dateFormat=[this.locale.dateFormat,Y||""].join(rt)}q&&typeof S!="function"&&(this.locale.dateFormat=this.locale.timeFormat)}_setPositionClasses(y){if(typeof y=="function")return void this.$datepicker.classList.add("-custom-position-");let S=(y=y.split(" "))[0],z=`air-datepicker -${S}-${y[1]}- -from-${S}-`;this.$datepicker.classList.add(...z.split(" "))}_bindEvents(){this.$el.addEventListener(this.opts.showEvent,this._onFocus),this.$el.addEventListener("blur",this._onBlur),this.$datepicker.addEventListener("mousedown",this._onMouseDown),this.$datepicker.addEventListener("mouseup",this._onMouseUp),window.addEventListener("resize",this._onResize)}_limitViewDateByMaxMinDates(){let{viewDate:y,minDate:S,maxDate:z}=this;z&&v(y,z)&&this.setViewDate(z),S&&x(y,S)&&this.setViewDate(S)}formatDate(){let y=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.viewDate,S=arguments.length>1?arguments[1]:void 0;if(y=w(y),!(y instanceof Date))return;let z=S,M=this.locale,q=d(y),$=q.dayPeriod,R=f(y),B=nt.replacer,Y={T:y.getTime(),m:q.minutes,mm:q.fullMinutes,h:q.hours12,hh:q.fullHours12,H:q.hours,HH:q.fullHours,aa:$,AA:$.toUpperCase(),E:M.daysShort[q.day],EEEE:M.days[q.day],d:q.date,dd:q.fullDate,M:q.month+1,MM:q.fullMonth,MMM:M.monthsShort[q.month],MMMM:M.months[q.month],yy:q.year.toString().slice(-2),yyyy:q.year,yyyy1:R[0],yyyy2:R[1]};for(let[rt,et]of Object.entries(Y))z=B(z,T(rt),et);return z}down(y){this._handleUpDownActions(y,"down")}up(y){this._handleUpDownActions(y,"up")}selectDate(y){let S,z=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{currentView:M,parsedViewDate:q,selectedDates:$}=this,{updateTime:R,silent:B}=z,{moveToOtherMonthsOnSelect:Y,moveToOtherYearsOnSelect:rt,multipleDates:et,range:it,autoClose:he,onBeforeSelect:Mr}=this.opts,ir=$.length;if(Array.isArray(y))return y.forEach((Zo=>{this.selectDate(Zo,z)})),new Promise((Zo=>{setTimeout(Zo)}));if((y=w(y))instanceof Date){if(Mr&&!B&&!Mr({date:y,datepicker:this}))return Promise.resolve();if(M===t.days&&y.getMonth()!==q.month&&Y&&(S=new Date(y.getFullYear(),y.getMonth(),1)),M===t.years&&y.getFullYear()!==q.year&&rt&&(S=new Date(y.getFullYear(),0,1)),S&&this.setViewDate(S),et&&!it){if(ir===et)return;this._checkIfDateIsSelected(y)||$.push(y)}else if(it)switch(ir){case 1:$.push(y),this.rangeDateTo||(this.rangeDateTo=y),v(this.rangeDateFrom,this.rangeDateTo)&&(this.rangeDateTo=this.rangeDateFrom,this.rangeDateFrom=y),this.selectedDates=[this.rangeDateFrom,this.rangeDateTo];break;case 2:this.selectedDates=[y],this.rangeDateFrom=y,this.rangeDateTo="";break;default:this.selectedDates=[y],this.rangeDateFrom=y}else this.selectedDates=[y];return this.trigger(t.eventChangeSelectedDate,{action:t.actionSelectDate,silent:z?.silent,date:y,updateTime:R}),this._updateLastSelectedDate(y),he&&!this.timepickerIsActive&&this.visible&&(et||it?it&&ir===1&&this.hide():this.hide()),new Promise((Zo=>{setTimeout(Zo)}))}}unselectDate(y){let S=this.selectedDates,z=this;if((y=w(y))instanceof Date)return S.some(((M,q)=>{if(g(M,y))return S.splice(q,1),z.selectedDates.length?(z.rangeDateTo="",z.rangeDateFrom=S[0],z._updateLastSelectedDate(z.selectedDates[z.selectedDates.length-1])):(z.rangeDateFrom="",z.rangeDateTo="",z._updateLastSelectedDate(!1)),this.trigger(t.eventChangeSelectedDate,{action:t.actionUnselectDate,date:y}),!0}))}replaceDate(y,S){let z=this.selectedDates.find((q=>g(q,y,this.currentView))),M=this.selectedDates.indexOf(z);M<0||g(this.selectedDates[M],S,this.currentView)||(this.selectedDates[M]=S,this.trigger(t.eventChangeSelectedDate,{action:t.actionSelectDate,date:S,updateTime:!0}),this._updateLastSelectedDate(S))}clear(){let y=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return this.selectedDates=[],this.rangeDateFrom=!1,this.rangeDateTo=!1,this.lastSelectedDate=!1,this.trigger(t.eventChangeSelectedDate,{action:t.actionUnselectDate,silent:y.silent}),new Promise((S=>{setTimeout(S)}))}show(){let{onShow:y,isMobile:S}=this.opts;this._cancelScheduledCall(),this.visible||this.hideAnimation||this._createComponents(),this.setPosition(this.opts.position),this.$datepicker.classList.add("-active-"),this.visible=!0,y&&this._scheduleCallAfterTransition(y),S&&this._showMobileOverlay()}hide(){let{onHide:y,isMobile:S}=this.opts,z=this._hasTransition();this.visible=!1,this.hideAnimation=!0,this.$datepicker.classList.remove("-active-"),this.customHide&&this.customHide(),this.elIsInput&&this.$el.blur(),this._scheduleCallAfterTransition((M=>{!this.customHide&&(M&&z||!M&&!z)&&this._finishHide(),y&&y(M)})),S&&Lo.classList.remove("-active-")}_triggerOnSelect(){let y=[],S=[],{selectedDates:z,locale:M,opts:{onSelect:q,multipleDates:$,range:R}}=this,B=$||R,Y=typeof M.dateFormat=="function";z.length&&(y=z.map(k),S=Y?$?M.dateFormat(y):y.map((rt=>M.dateFormat(rt))):y.map((rt=>this.formatDate(rt,M.dateFormat)))),q({date:B?y:y[0],formattedDate:B?S:S[0],datepicker:this})}_handleAlreadySelectedDates(y,S){let{selectedDates:z,rangeDateFrom:M,rangeDateTo:q}=this,{range:$,toggleSelected:R}=this.opts,B=z.length,Y=typeof R=="function"?R({datepicker:this,date:S}):R,rt=!!($&&B===1&&y),et=rt?k(S):S;$&&!Y&&(B!==2&&this.selectDate(et),B===2&&g(M,q))||(Y?this.unselectDate(et):this._updateLastSelectedDate(rt?et:y))}_handleUpDownActions(y,S){if(!((y=w(y||this.focusDate||this.viewDate))instanceof Date))return;let z=S==="up"?this.viewIndex+1:this.viewIndex-1;z>2&&(z=2),z<0&&(z=0),this.setViewDate(new Date(y.getFullYear(),y.getMonth(),1)),this.setCurrentView(this.viewIndexes[z])}getCell(y){let S=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t.day;if(!((y=w(y))instanceof Date))return;let{year:z,month:M,date:q}=d(y),$=`[data-year="${z}"]`,R=`[data-month="${M}"]`,B={[t.day]:`${$}${R}[data-date="${q}"]`,[t.month]:`${$}${R}`,[t.year]:`${$}`};return this.views[this.currentView]?this.views[this.currentView].$el.querySelector(B[S]):void 0}_showMobileOverlay(){Lo.classList.add("-active-")}_hasTransition(){return window.getComputedStyle(this.$datepicker).getPropertyValue("transition-duration").split(", ").reduce(((y,S)=>parseFloat(S)+y),0)>0}get shouldUpdateDOM(){return this.visible||this.treatAsInline}get parsedViewDate(){return d(this.viewDate)}get currentViewSingular(){return this.currentView.slice(0,-1)}get curDecade(){return f(this.viewDate)}get viewIndex(){return this.viewIndexes.indexOf(this.currentView)}get isFinalView(){return this.currentView===t.years}get hasSelectedDates(){return this.selectedDates.length>0}get isMinViewReached(){return this.currentView===this.opts.minView||this.currentView===t.days}get $container(){return this.$customContainer||$o}static replacer(y,S,z){return y.replace(S,(function(M,q,$,R){return q+z+R}))}}var yt;return ht(nt,"defaults",r),ht(nt,"version","3.6.0"),ht(nt,"defaultGlobalContainerId","air-datepicker-global-container"),yt=nt.prototype,Object.assign(yt,ka),o.default})()}))});var Is=globalThis,bf=i=>i,uc=Is.trustedTypes,vf=uc?uc.createPolicy("lit-html",{createHTML:i=>i}):void 0,Pp="$lit$",Sn=`lit$${Math.random().toFixed(9).slice(2)}$`,Hp="?"+Sn,F1=`<${Hp}>`,Bi=document,Ns=()=>Bi.createComment(""),Ds=i=>i===null||typeof i!="object"&&typeof i!="function",Fp=Array.isArray,kf=i=>Fp(i)||typeof i?.[Symbol.iterator]=="function",Op=`[
2
+ `){let r=new vo.default(this.ops),n=new i,a=0;for(;r.hasNext();){if(r.peekType()!=="insert")return;let s=r.peek(),l=On.default.length(s)-r.peekLength(),d=typeof s.insert=="string"?s.insert.indexOf(t,l)-l:-1;if(d<0)n.push(r.next());else if(d>0)n.push(r.next(d));else{if(o(n,r.next(1).attributes||{},a)===!1)return;a+=1,n=new i}}n.length()>0&&o(n,{},a)}invert(o){let t=new i;return this.reduce((r,n)=>{if(n.insert)t.delete(On.default.length(n));else{if(typeof n.retain=="number"&&n.attributes==null)return t.retain(n.retain),r+n.retain;if(n.delete||typeof n.retain=="number"){let a=n.delete||n.retain;return o.slice(r,r+a).forEach(l=>{n.delete?t.push(l):n.retain&&n.attributes&&t.retain(On.default.length(l),da.default.invert(n.attributes,l.attributes))}),r+a}else if(typeof n.retain=="object"&&n.retain!==null){let a=o.slice(r,r+1),s=new vo.default(a.ops).next(),[l,d,h]=u0(n.retain,s.insert),m=i.getHandler(l);return t.retain({[l]:m.invert(d,h)},da.default.invert(n.attributes,s.attributes)),r+1}}return r},0),t.chop()}transform(o,t=!1){if(t=!!t,typeof o=="number")return this.transformPosition(o,t);let r=o,n=new vo.default(this.ops),a=new vo.default(r.ops),s=new i;for(;n.hasNext()||a.hasNext();)if(n.peekType()==="insert"&&(t||a.peekType()!=="insert"))s.retain(On.default.length(n.next()));else if(a.peekType()==="insert")s.push(a.next());else{let l=Math.min(n.peekLength(),a.peekLength()),d=n.next(l),h=a.next(l);if(d.delete)continue;if(h.delete)s.push(h);else{let m=d.retain,f=h.retain,b=typeof f=="object"&&f!==null?f:l;if(typeof m=="object"&&m!==null&&typeof f=="object"&&f!==null){let g=Object.keys(m)[0];if(g===Object.keys(f)[0]){let v=i.getHandler(g);v&&(b={[g]:v.transform(m[g],f[g],t)})}}s.retain(b,da.default.transform(d.attributes,h.attributes,t))}}return s.chop()}transformPosition(o,t=!1){t=!!t;let r=new vo.default(this.ops),n=0;for(;r.hasNext()&&n<=o;){let a=r.peekLength(),s=r.peekType();if(r.next(),s==="delete"){o-=Math.min(a,o-n);continue}else s==="insert"&&(n<o||!t)&&(o+=a);n+=a}return o}};Hn.Op=On.default;Hn.OpIterator=vo.default;Hn.AttributeMap=da.default;Hn.handlers={};Pn.default=Hn;typeof yd=="object"&&(yd.exports=Hn,yd.exports.default=Hn)});var Az=kn((nat,Bu)=>{"use strict";var v3=Object.prototype.hasOwnProperty,Cr="~";function Cl(){}Object.create&&(Cl.prototype=Object.create(null),new Cl().__proto__||(Cr=!1));function x3(i,o,t){this.fn=i,this.context=o,this.once=t||!1}function Tz(i,o,t,r,n){if(typeof t!="function")throw new TypeError("The listener must be a function");var a=new x3(t,r||i,n),s=Cr?Cr+o:o;return i._events[s]?i._events[s].fn?i._events[s]=[i._events[s],a]:i._events[s].push(a):(i._events[s]=a,i._eventsCount++),i}function Wd(i,o){--i._eventsCount===0?i._events=new Cl:delete i._events[o]}function mr(){this._events=new Cl,this._eventsCount=0}mr.prototype.eventNames=function(){var o=[],t,r;if(this._eventsCount===0)return o;for(r in t=this._events)v3.call(t,r)&&o.push(Cr?r.slice(1):r);return Object.getOwnPropertySymbols?o.concat(Object.getOwnPropertySymbols(t)):o};mr.prototype.listeners=function(o){var t=Cr?Cr+o:o,r=this._events[t];if(!r)return[];if(r.fn)return[r.fn];for(var n=0,a=r.length,s=new Array(a);n<a;n++)s[n]=r[n].fn;return s};mr.prototype.listenerCount=function(o){var t=Cr?Cr+o:o,r=this._events[t];return r?r.fn?1:r.length:0};mr.prototype.emit=function(o,t,r,n,a,s){var l=Cr?Cr+o:o;if(!this._events[l])return!1;var d=this._events[l],h=arguments.length,m,f;if(d.fn){switch(d.once&&this.removeListener(o,d.fn,void 0,!0),h){case 1:return d.fn.call(d.context),!0;case 2:return d.fn.call(d.context,t),!0;case 3:return d.fn.call(d.context,t,r),!0;case 4:return d.fn.call(d.context,t,r,n),!0;case 5:return d.fn.call(d.context,t,r,n,a),!0;case 6:return d.fn.call(d.context,t,r,n,a,s),!0}for(f=1,m=new Array(h-1);f<h;f++)m[f-1]=arguments[f];d.fn.apply(d.context,m)}else{var b=d.length,g;for(f=0;f<b;f++)switch(d[f].once&&this.removeListener(o,d[f].fn,void 0,!0),h){case 1:d[f].fn.call(d[f].context);break;case 2:d[f].fn.call(d[f].context,t);break;case 3:d[f].fn.call(d[f].context,t,r);break;case 4:d[f].fn.call(d[f].context,t,r,n);break;default:if(!m)for(g=1,m=new Array(h-1);g<h;g++)m[g-1]=arguments[g];d[f].fn.apply(d[f].context,m)}}return!0};mr.prototype.on=function(o,t,r){return Tz(this,o,t,r,!1)};mr.prototype.once=function(o,t,r){return Tz(this,o,t,r,!0)};mr.prototype.removeListener=function(o,t,r,n){var a=Cr?Cr+o:o;if(!this._events[a])return this;if(!t)return Wd(this,a),this;var s=this._events[a];if(s.fn)s.fn===t&&(!n||s.once)&&(!r||s.context===r)&&Wd(this,a);else{for(var l=0,d=[],h=s.length;l<h;l++)(s[l].fn!==t||n&&!s[l].once||r&&s[l].context!==r)&&d.push(s[l]);d.length?this._events[a]=d.length===1?d[0]:d:Wd(this,a)}return this};mr.prototype.removeAllListeners=function(o){var t;return o?(t=Cr?Cr+o:o,this._events[t]&&Wd(this,t)):(this._events=new Cl,this._eventsCount=0),this};mr.prototype.off=mr.prototype.removeListener;mr.prototype.addListener=mr.prototype.on;mr.prefixed=Cr;mr.EventEmitter=mr;typeof Bu<"u"&&(Bu.exports=mr)});var Am=kn((Zl,Tm)=>{(function(i,o){typeof Zl=="object"&&typeof Tm=="object"?Tm.exports=o():typeof define=="function"&&define.amd?define([],o):typeof Zl=="object"?Zl.AirDatepicker=o():i.AirDatepicker=o()})(Zl,(function(){return(function(){"use strict";var i={d:function(D,y){for(var S in y)i.o(y,S)&&!i.o(D,S)&&Object.defineProperty(D,S,{enumerable:!0,get:y[S]})},o:function(D,y){return Object.prototype.hasOwnProperty.call(D,y)}},o={};i.d(o,{default:function(){return nt}});var t={days:"days",months:"months",years:"years",day:"day",month:"month",year:"year",eventChangeViewDate:"changeViewDate",eventChangeCurrentView:"changeCurrentView",eventChangeFocusDate:"changeFocusDate",eventChangeSelectedDate:"changeSelectedDate",eventChangeTime:"changeTime",eventChangeLastSelectedDate:"changeLastSelectedDate",actionSelectDate:"selectDate",actionUnselectDate:"unselectDate",cssClassWeekend:"-weekend-"},r={classes:"",inline:!1,locale:{days:["\u0412\u043E\u0441\u043A\u0440\u0435\u0441\u0435\u043D\u044C\u0435","\u041F\u043E\u043D\u0435\u0434\u0435\u043B\u044C\u043D\u0438\u043A","\u0412\u0442\u043E\u0440\u043D\u0438\u043A","\u0421\u0440\u0435\u0434\u0430","\u0427\u0435\u0442\u0432\u0435\u0440\u0433","\u041F\u044F\u0442\u043D\u0438\u0446\u0430","\u0421\u0443\u0431\u0431\u043E\u0442\u0430"],daysShort:["\u0412\u043E\u0441","\u041F\u043E\u043D","\u0412\u0442\u043E","\u0421\u0440\u0435","\u0427\u0435\u0442","\u041F\u044F\u0442","\u0421\u0443\u0431"],daysMin:["\u0412\u0441","\u041F\u043D","\u0412\u0442","\u0421\u0440","\u0427\u0442","\u041F\u0442","\u0421\u0431"],months:["\u042F\u043D\u0432\u0430\u0440\u044C","\u0424\u0435\u0432\u0440\u0430\u043B\u044C","\u041C\u0430\u0440\u0442","\u0410\u043F\u0440\u0435\u043B\u044C","\u041C\u0430\u0439","\u0418\u044E\u043D\u044C","\u0418\u044E\u043B\u044C","\u0410\u0432\u0433\u0443\u0441\u0442","\u0421\u0435\u043D\u0442\u044F\u0431\u0440\u044C","\u041E\u043A\u0442\u044F\u0431\u0440\u044C","\u041D\u043E\u044F\u0431\u0440\u044C","\u0414\u0435\u043A\u0430\u0431\u0440\u044C"],monthsShort:["\u042F\u043D\u0432","\u0424\u0435\u0432","\u041C\u0430\u0440","\u0410\u043F\u0440","\u041C\u0430\u0439","\u0418\u044E\u043D","\u0418\u044E\u043B","\u0410\u0432\u0433","\u0421\u0435\u043D","\u041E\u043A\u0442","\u041D\u043E\u044F","\u0414\u0435\u043A"],today:"\u0421\u0435\u0433\u043E\u0434\u043D\u044F",clear:"\u041E\u0447\u0438\u0441\u0442\u0438\u0442\u044C",dateFormat:"dd.MM.yyyy",timeFormat:"HH:mm",firstDay:1},startDate:new Date,firstDay:"",weekends:[6,0],dateFormat:"",altField:"",altFieldDateFormat:"T",toggleSelected:!0,keyboardNav:!0,selectedDates:!1,container:"",isMobile:!1,visible:!1,position:"bottom left",offset:12,view:t.days,minView:t.days,showOtherMonths:!0,selectOtherMonths:!0,moveToOtherMonthsOnSelect:!0,showOtherYears:!0,selectOtherYears:!0,moveToOtherYearsOnSelect:!0,minDate:"",maxDate:"",disableNavWhenOutOfRange:!0,multipleDates:!1,multipleDatesSeparator:", ",range:!1,dynamicRange:!0,buttons:!1,monthsField:"monthsShort",showEvent:"focus",autoClose:!1,fixedHeight:!1,prevHtml:'<svg><path d="M 17,12 l -5,5 l 5,5"></path></svg>',nextHtml:'<svg><path d="M 14,12 l 5,5 l -5,5"></path></svg>',navTitles:{days:"MMMM, <i>yyyy</i>",months:"yyyy",years:"yyyy1 - yyyy2"},timepicker:!1,onlyTimepicker:!1,dateTimeSeparator:" ",timeFormat:"",minHours:0,maxHours:24,minMinutes:0,maxMinutes:59,hoursStep:1,minutesStep:1,onSelect:!1,onChangeViewDate:!1,onChangeView:!1,onRenderCell:!1,onShow:!1,onHide:!1,onClickDayName:!1};function n(D){let y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:document;return typeof D=="string"?y.querySelector(D):D}function a(){let{tagName:D="div",className:y="",innerHtml:S="",id:z="",attrs:M={}}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},q=document.createElement(D);return y&&q.classList.add(...y.split(" ")),z&&(q.id=z),S&&(q.innerHTML=S),M&&s(q,M),q}function s(D,y){for(let[S,z]of Object.entries(y))z!==void 0&&D.setAttribute(S,z);return D}function l(D){return new Date(D.getFullYear(),D.getMonth()+1,0).getDate()}function d(D){let y=D.getHours(),{hours:S,dayPeriod:z}=h(y);return{year:D.getFullYear(),month:D.getMonth(),fullMonth:D.getMonth()+1<10?"0"+(D.getMonth()+1):D.getMonth()+1,date:D.getDate(),fullDate:D.getDate()<10?"0"+D.getDate():D.getDate(),day:D.getDay(),hours:y,fullHours:m(y),hours12:S,dayPeriod:z,fullHours12:m(S),minutes:D.getMinutes(),fullMinutes:D.getMinutes()<10?"0"+D.getMinutes():D.getMinutes()}}function h(D){return{dayPeriod:D>11?"pm":"am",hours:D%12==0?12:D%12}}function m(D){return D<10?"0"+D:D}function f(D){let y=10*Math.floor(D.getFullYear()/10);return[y,y+9]}function b(){let D=[];for(var y=arguments.length,S=new Array(y),z=0;z<y;z++)S[z]=arguments[z];return S.forEach((M=>{if(typeof M=="object")for(let q in M)M[q]&&D.push(q);else M&&D.push(M)})),D.join(" ")}function g(D,y){let S=arguments.length>2&&arguments[2]!==void 0?arguments[2]:t.days;if(!D||!y)return!1;let z=d(D),M=d(y);return{[t.days]:z.date===M.date&&z.month===M.month&&z.year===M.year,[t.months]:z.month===M.month&&z.year===M.year,[t.years]:z.year===M.year}[S]}function v(D,y,S){let z=k(D,!1).getTime(),M=k(y,!1).getTime();return S?z>=M:z>M}function x(D,y){return!v(D,y,!0)}function k(D){let y=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],S=new Date(D.getTime());return typeof y!="boolean"||y||(function(z){z.setHours(0,0,0,0)})(S),S}function _(D,y,S){D.length?D.forEach((z=>{z.addEventListener(y,S)})):D.addEventListener(y,S)}function O(D,y){return!(!D||D===document||D instanceof DocumentFragment)&&(D.matches(y)?D:O(D.parentNode,y))}function j(D,y,S){return D>S?S:D<y?y:D}function I(D){for(var y=arguments.length,S=new Array(y>1?y-1:0),z=1;z<y;z++)S[z-1]=arguments[z];return S.filter((M=>M)).forEach((M=>{for(let[q,$]of Object.entries(M))if($!==void 0&&$.toString()==="[object Object]"){let R=D[q]!==void 0?D[q].toString():void 0,B=$.toString(),Y=Array.isArray($)?[]:{};D[q]=D[q]?R!==B?Y:D[q]:Y,I(D[q],$)}else D[q]=$})),D}function w(D){let y=D;return D instanceof Date||(typeof D=="string"&&/^\d{4}-\d{2}-\d{2}$/.test(D)&&(D+="T00:00:00"),y=new Date(D)),isNaN(y.getTime())&&(console.log(`Unable to convert value "${D}" to Date object`),y=!1),y}function T(D){let y="\\s|\\.|-|/|\\\\|,|\\$|\\!|\\?|:|;";return new RegExp("(^|>|"+y+")("+D+")($|<|"+y+")","g")}function L(D,y,S){return(y=(function(z){var M=(function(q,$){if(typeof q!="object"||q===null)return q;var R=q[Symbol.toPrimitive];if(R!==void 0){var B=R.call(q,"string");if(typeof B!="object")return B;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(q)})(z);return typeof M=="symbol"?M:String(M)})(y))in D?Object.defineProperty(D,y,{value:S,enumerable:!0,configurable:!0,writable:!0}):D[y]=S,D}class W{constructor(){let{type:y,date:S,dp:z,opts:M,body:q}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};L(this,"focus",(()=>{this.$cell.classList.add("-focus-"),this.focused=!0})),L(this,"removeFocus",(()=>{this.$cell.classList.remove("-focus-"),this.focused=!1})),L(this,"select",(()=>{this.$cell.classList.add("-selected-"),this.selected=!0})),L(this,"removeSelect",(()=>{this.$cell.classList.remove("-selected-","-range-from-","-range-to-"),this.selected=!1})),L(this,"onChangeSelectedDate",(()=>{this.isDisabled||(this._handleSelectedStatus(),this.opts.range&&this._handleRangeStatus())})),L(this,"onChangeFocusDate",($=>{if(!$)return void(this.focused&&this.removeFocus());let R=g($,this.date,this.type);R?this.focus():!R&&this.focused&&this.removeFocus(),this.opts.range&&this._handleRangeStatus()})),L(this,"render",(()=>(this.$cell.innerHTML=this._getHtml(),this._handleClasses(),this.$cell))),this.type=y,this.singleType=this.type.slice(0,-1),this.date=S,this.dp=z,this.opts=M,this.body=q,this.customData=!1,this.init()}init(){var y,S;let{onRenderCell:z}=this.opts;z&&(this.customData=z({date:this.date,cellType:this.singleType,datepicker:this.dp})),this._createElement(),this._bindDatepickerEvents(),(y=this.customData)!==null&&y!==void 0&&y.disabled?this.dp.disableDate(this.date):((S=this.customData)===null||S===void 0?void 0:S.disabled)===!1&&this.dp.enableDate(this.date)}_bindDatepickerEvents(){this.dp.on(t.eventChangeSelectedDate,this.onChangeSelectedDate),this.dp.on(t.eventChangeFocusDate,this.onChangeFocusDate)}unbindDatepickerEvents(){this.dp.off(t.eventChangeSelectedDate,this.onChangeSelectedDate),this.dp.off(t.eventChangeFocusDate,this.onChangeFocusDate)}_createElement(){var y;let{year:S,month:z,fullMonth:M,date:q,fullDate:$}=d(this.date),R=((y=this.customData)===null||y===void 0?void 0:y.attrs)||{};this.$cell=a({attrs:{"data-year":S,"data-month":z,"data-date":q,"data-iso-date":`${S}-${M}-${$}`,...R}}),this.$cell.adpCell=this}_getClassName(){var y;let S=new Date,{selectOtherMonths:z,selectOtherYears:M}=this.opts,{minDate:q,maxDate:$,isDateDisabled:R}=this.dp,{day:B}=d(this.date),Y=this._isOutOfMinMaxRange(),rt=R(this.date),et=b("air-datepicker-cell",`-${this.singleType}-`,{"-current-":g(S,this.date,this.type),"-min-date-":q&&g(q,this.date,this.type),"-max-date-":$&&g($,this.date,this.type)}),it="";switch(this.type){case t.days:it=b({"-weekend-":this.dp.isWeekend(B),"-other-month-":this.isOtherMonth,"-disabled-":this.isOtherMonth&&!z||Y||rt});break;case t.months:it=b({"-disabled-":Y});break;case t.years:it=b({"-other-decade-":this.isOtherDecade,"-disabled-":Y||this.isOtherDecade&&!M})}return b(et,it,(y=this.customData)===null||y===void 0?void 0:y.classes).split(" ")}_getHtml(){var y;let{year:S,month:z,date:M}=d(this.date),{showOtherMonths:q,showOtherYears:$}=this.opts;if((y=this.customData)!==null&&y!==void 0&&y.html)return this.customData.html;switch(this.type){case t.days:return!q&&this.isOtherMonth?"":M;case t.months:return this.dp.locale[this.opts.monthsField][z];case t.years:return!$&&this.isOtherDecade?"":S}}_isOutOfMinMaxRange(){let{minDate:y,maxDate:S}=this.dp,{type:z,date:M}=this,{month:q,year:$,date:R}=d(M),B=z===t.days,Y=z===t.years,rt=!!y&&new Date($,Y?y.getMonth():q,B?R:y.getDate()),et=!!S&&new Date($,Y?S.getMonth():q,B?R:S.getDate());return y&&S?x(rt,y)||v(et,S):y?x(rt,y):S?v(et,S):void 0}destroy(){this.unbindDatepickerEvents()}_handleRangeStatus(){let{selectedDates:y,focusDate:S,rangeDateTo:z,rangeDateFrom:M}=this.dp,q=y.length;if(this.$cell.classList.remove("-range-from-","-range-to-","-in-range-"),!q)return;let $=M,R=z;if(q===1&&S){let it=v(S,y[0]);$=it?y[0]:S,R=it?S:y[0]}let B=b({"-in-range-":$&&R&&(Y=this.date,rt=$,et=R,v(Y,rt)&&x(Y,et)),"-range-from-":$&&g(this.date,$,this.type),"-range-to-":R&&g(this.date,R,this.type)});var Y,rt,et;B&&this.$cell.classList.add(...B.split(" "))}_handleSelectedStatus(){let y=this.dp._checkIfDateIsSelected(this.date,this.type);y?this.select():!y&&this.selected&&this.removeSelect()}_handleInitialFocusStatus(){g(this.dp.focusDate,this.date,this.type)&&this.focus()}_handleClasses(){this.$cell.setAttribute("class",""),this._handleInitialFocusStatus(),this.dp.hasSelectedDates&&(this._handleSelectedStatus(),this.dp.opts.range&&this._handleRangeStatus()),this.$cell.classList.add(...this._getClassName())}get isDisabled(){return this.$cell.matches(".-disabled-")}get isOtherMonth(){return this.dp.isOtherMonth(this.date)}get isOtherDecade(){return this.dp.isOtherDecade(this.date)}}function tt(D,y,S){return(y=(function(z){var M=(function(q,$){if(typeof q!="object"||q===null)return q;var R=q[Symbol.toPrimitive];if(R!==void 0){var B=R.call(q,"string");if(typeof B!="object")return B;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(q)})(z);return typeof M=="symbol"?M:String(M)})(y))in D?Object.defineProperty(D,y,{value:S,enumerable:!0,configurable:!0,writable:!0}):D[y]=S,D}let ut={[t.days]:`<div class="air-datepicker-body--day-names"></div><div class="air-datepicker-body--cells -${t.days}-"></div>`,[t.months]:`<div class="air-datepicker-body--cells -${t.months}-"></div>`,[t.years]:`<div class="air-datepicker-body--cells -${t.years}-"></div>`},pt=".air-datepicker-cell";class gt{constructor(y){let{dp:S,type:z,opts:M}=y;tt(this,"handleClick",(q=>{let $=q.target.closest(pt).adpCell;if($.isDisabled)return;if(!this.dp.isMinViewReached)return void this.dp.down();let R=this.dp._checkIfDateIsSelected($.date,$.type);R?this.dp._handleAlreadySelectedDates(R,$.date):this.dp.selectDate($.date)})),tt(this,"handleDayNameClick",(q=>{let $=q.target.getAttribute("data-day-index");this.opts.onClickDayName({dayIndex:Number($),datepicker:this.dp})})),tt(this,"onChangeCurrentView",(q=>{q!==this.type?this.hide():(this.show(),this.render())})),tt(this,"onMouseOverCell",(q=>{let $=O(q.target,pt);this.dp.setFocusDate(!!$&&$.adpCell.date)})),tt(this,"onMouseOutCell",(()=>{this.dp.setFocusDate(!1)})),tt(this,"onClickBody",(q=>{let{onClickDayName:$}=this.opts,R=q.target;R.closest(pt)&&this.handleClick(q),$&&R.closest(".air-datepicker-body--day-name")&&this.handleDayNameClick(q)})),tt(this,"onMouseDown",(q=>{this.pressed=!0;let $=O(q.target,pt),R=$&&$.adpCell;g(R.date,this.dp.rangeDateFrom)&&(this.rangeFromFocused=!0),g(R.date,this.dp.rangeDateTo)&&(this.rangeToFocused=!0)})),tt(this,"onMouseMove",(q=>{if(!this.pressed||!this.dp.isMinViewReached)return;q.preventDefault();let $=O(q.target,pt),R=$&&$.adpCell,{selectedDates:B,rangeDateTo:Y,rangeDateFrom:rt}=this.dp;if(!R||R.isDisabled)return;let{date:et}=R;if(B.length===2){if(this.rangeFromFocused&&!v(et,Y)){let{hours:it,minutes:ue}=d(rt);et.setHours(it),et.setMinutes(ue),this.dp.rangeDateFrom=et,this.dp.replaceDate(rt,et)}if(this.rangeToFocused&&!x(et,rt)){let{hours:it,minutes:ue}=d(Y);et.setHours(it),et.setMinutes(ue),this.dp.rangeDateTo=et,this.dp.replaceDate(Y,et)}}})),tt(this,"onMouseUp",(()=>{this.pressed=!1,this.rangeFromFocused=!1,this.rangeToFocused=!1})),tt(this,"onChangeViewDate",((q,$)=>{if(!this.isVisible)return;let R=f(q),B=f($);switch(this.dp.currentView){case t.days:if(g(q,$,t.months))return;break;case t.months:if(g(q,$,t.years))return;break;case t.years:if(R[0]===B[0]&&R[1]===B[1])return}this.render()})),tt(this,"render",(()=>{this.destroyCells(),this._generateCells(),this.cells.forEach((q=>{this.$cells.appendChild(q.render())}))})),this.dp=S,this.type=z,this.opts=M,this.cells=[],this.$el="",this.pressed=!1,this.isVisible=!0,this.init()}init(){this._buildBaseHtml(),this.type===t.days&&this.renderDayNames(),this.render(),this._bindEvents(),this._bindDatepickerEvents()}_bindEvents(){let{range:y,dynamicRange:S}=this.opts;_(this.$el,"mouseover",this.onMouseOverCell),_(this.$el,"mouseout",this.onMouseOutCell),_(this.$el,"click",this.onClickBody),y&&S&&(_(this.$el,"mousedown",this.onMouseDown),_(this.$el,"mousemove",this.onMouseMove),_(window.document,"mouseup",this.onMouseUp))}_bindDatepickerEvents(){this.dp.on(t.eventChangeViewDate,this.onChangeViewDate),this.dp.on(t.eventChangeCurrentView,this.onChangeCurrentView)}_buildBaseHtml(){this.$el=a({className:`air-datepicker-body -${this.type}-`,innerHtml:ut[this.type]}),this.$names=n(".air-datepicker-body--day-names",this.$el),this.$cells=n(".air-datepicker-body--cells",this.$el)}_getDayNamesHtml(){let y=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.dp.locale.firstDay,S="",z=this.dp.isWeekend,{onClickDayName:M}=this.opts,q=y,$=0;for(;$<7;){let R=q%7;S+=`<div class="${b("air-datepicker-body--day-name",{[t.cssClassWeekend]:z(R),"-clickable-":!!M})}" data-day-index='${R}'>${this.dp.locale.daysMin[R]}</div>`,$++,q++}return S}renderDayNames(){this.$names.innerHTML=this._getDayNamesHtml()}_generateCell(y){let{type:S,dp:z,opts:M}=this;return new W({type:S,dp:z,opts:M,date:y,body:this})}_generateCells(){gt.getDatesFunction(this.type)(this.dp,(y=>{this.cells.push(this._generateCell(y))}))}show(){this.isVisible=!0,this.$el.classList.remove("-hidden-")}hide(){this.isVisible=!1,this.$el.classList.add("-hidden-")}destroyCells(){this.cells.forEach((y=>y.destroy())),this.cells=[],this.$cells.innerHTML=""}destroy(){this.destroyCells(),this.dp.off(t.eventChangeViewDate,this.onChangeViewDate),this.dp.off(t.eventChangeCurrentView,this.onChangeCurrentView)}static getDaysDates(y,S){let{viewDate:z,opts:{fixedHeight:M},locale:{firstDay:q}}=y,$=l(z),{year:R,month:B}=d(z),Y=new Date(R,B,1),rt=new Date(R,B,$),et=Y.getDay()-q,it=6-rt.getDay()+q;et=et<0?et+7:et,it=it>6?it-7:it;let ue=(function(Pi,Rp){let{year:hc,month:O1,date:P1}=d(Pi);return new Date(hc,O1,P1-Rp)})(Y,et),Mr=$+et+it,ir=ue.getDate(),{year:Zo,month:qs}=d(ue),Ri=0;M&&(Mr=42);let Oi=[];for(;Ri<Mr;){let Pi=new Date(Zo,qs,ir+Ri);S&&S(Pi),Oi.push(Pi),Ri++}return Oi}static getMonthsDates(y,S){let{year:z}=y.parsedViewDate,M=0,q=[];for(;M<12;){let $=new Date(z,M);q.push($),S&&S($),M++}return q}static getYearsDates(y,S){let z=f(y.viewDate),M=z[0]-1,q=z[1]+1,$=M,R=[];for(;$<=q;){let B=new Date($,0);R.push(B),S&&S(B),$++}return R}static getDatesFunction(){let y=arguments.length>0&&arguments[0]!==void 0?arguments[0]:t.days;return{[t.days]:gt.getDaysDates,[t.months]:gt.getMonthsDates,[t.years]:gt.getYearsDates}[y]}}function Ut(D,y,S){return(y=(function(z){var M=(function(q,$){if(typeof q!="object"||q===null)return q;var R=q[Symbol.toPrimitive];if(R!==void 0){var B=R.call(q,"string");if(typeof B!="object")return B;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(q)})(z);return typeof M=="symbol"?M:String(M)})(y))in D?Object.defineProperty(D,y,{value:S,enumerable:!0,configurable:!0,writable:!0}):D[y]=S,D}class jt{constructor(y){let{dp:S,opts:z}=y;Ut(this,"onClickNav",(M=>{let q=O(M.target,".air-datepicker-nav--action");if(!q)return;let $=q.dataset.action;this.dp[$]()})),Ut(this,"onChangeViewDate",(()=>{this.render(),this._resetNavStatus(),this.handleNavStatus()})),Ut(this,"onChangeCurrentView",(()=>{this.render(),this._resetNavStatus(),this.handleNavStatus()})),Ut(this,"onClickNavTitle",(()=>{this.dp.isFinalView||this.dp.up()})),Ut(this,"update",(()=>{let{prevHtml:M,nextHtml:q}=this.opts;this.$prev.innerHTML=M,this.$next.innerHTML=q,this._resetNavStatus(),this.render(),this.handleNavStatus()})),Ut(this,"renderDelay",(()=>{setTimeout(this.render)})),Ut(this,"render",(()=>{this.$title.innerHTML=this._getTitle(),(function(M,q){for(let $ in q)q[$]?M.classList.add($):M.classList.remove($)})(this.$title,{"-disabled-":this.dp.isFinalView})})),this.dp=S,this.opts=z,this.init()}init(){this._createElement(),this._buildBaseHtml(),this._defineDOM(),this.render(),this.handleNavStatus(),this._bindEvents(),this._bindDatepickerEvents()}_defineDOM(){this.$title=n(".air-datepicker-nav--title",this.$el),this.$prev=n('[data-action="prev"]',this.$el),this.$next=n('[data-action="next"]',this.$el)}_bindEvents(){this.$el.addEventListener("click",this.onClickNav),this.$title.addEventListener("click",this.onClickNavTitle)}_bindDatepickerEvents(){this.dp.on(t.eventChangeViewDate,this.onChangeViewDate),this.dp.on(t.eventChangeCurrentView,this.onChangeCurrentView),this.isNavIsFunction&&(this.dp.on(t.eventChangeSelectedDate,this.renderDelay),this.dp.opts.timepicker&&this.dp.on(t.eventChangeTime,this.render))}destroy(){this.dp.off(t.eventChangeViewDate,this.onChangeViewDate),this.dp.off(t.eventChangeCurrentView,this.onChangeCurrentView),this.isNavIsFunction&&(this.dp.off(t.eventChangeSelectedDate,this.renderDelay),this.dp.opts.timepicker&&this.dp.off(t.eventChangeTime,this.render))}_createElement(){this.$el=a({tagName:"nav",className:"air-datepicker-nav"})}_getTitle(){let{dp:y,opts:S}=this,z=S.navTitles[y.currentView];return typeof z=="function"?z(y):y.formatDate(y.viewDate,z)}handleNavStatus(){let{disableNavWhenOutOfRange:y}=this.opts,{minDate:S,maxDate:z}=this.dp;if(!S&&!z||!y)return;let{year:M,month:q}=this.dp.parsedViewDate,$=!!S&&d(S),R=!!z&&d(z);switch(this.dp.currentView){case t.days:S&&$.month>=q&&$.year>=M&&this._disableNav("prev"),z&&R.month<=q&&R.year<=M&&this._disableNav("next");break;case t.months:S&&$.year>=M&&this._disableNav("prev"),z&&R.year<=M&&this._disableNav("next");break;case t.years:{let B=f(this.dp.viewDate);S&&$.year>=B[0]&&this._disableNav("prev"),z&&R.year<=B[1]&&this._disableNav("next");break}}}_disableNav(y){n('[data-action="'+y+'"]',this.$el).classList.add("-disabled-")}_resetNavStatus(){(function(y){for(var S=arguments.length,z=new Array(S>1?S-1:0),M=1;M<S;M++)z[M-1]=arguments[M];y.length?y.forEach((q=>{q.classList.remove(...z)})):y.classList.remove(...z)})(this.$el.querySelectorAll(".air-datepicker-nav--action"),"-disabled-")}_buildBaseHtml(){let{prevHtml:y,nextHtml:S}=this.opts;this.$el.innerHTML=`<div class="air-datepicker-nav--action" data-action="prev">${y}</div><div class="air-datepicker-nav--title"></div><div class="air-datepicker-nav--action" data-action="next">${S}</div>`}get isNavIsFunction(){let{navTitles:y}=this.opts;return Object.keys(y).find((S=>typeof y[S]=="function"))}}var Ve={today:{content:D=>D.locale.today,onClick:D=>D.setViewDate(new Date)},clear:{content:D=>D.locale.clear,onClick:D=>D.clear()}};class nr{constructor(y){let{dp:S,opts:z}=y;this.dp=S,this.opts=z,this.init()}init(){this.createElement(),this.render()}createElement(){this.$el=a({className:"air-datepicker-buttons"})}destroy(){this.$el.parentNode.removeChild(this.$el)}clearHtml(){return this.$el.innerHTML="",this}generateButtons(){let{buttons:y}=this.opts;Array.isArray(y)||(y=[y]),y.forEach((S=>{let z=S;typeof S=="string"&&Ve[S]&&(z=Ve[S]);let M=this.createButton(z);z.onClick&&this.attachEventToButton(M,z.onClick),this.$el.appendChild(M)}))}attachEventToButton(y,S){y.addEventListener("click",(()=>{S(this.dp)}))}createButton(y){let{content:S,className:z,tagName:M="button",attrs:q={}}=y;return a({tagName:M,innerHtml:`<span tabindex='-1'>${typeof S=="function"?S(this.dp):S}</span>`,className:b("air-datepicker-button",z),attrs:q})}render(){this.generateButtons()}}function Jt(D,y,S){return(y=(function(z){var M=(function(q,$){if(typeof q!="object"||q===null)return q;var R=q[Symbol.toPrimitive];if(R!==void 0){var B=R.call(q,"string");if(typeof B!="object")return B;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(q)})(z);return typeof M=="symbol"?M:String(M)})(y))in D?Object.defineProperty(D,y,{value:S,enumerable:!0,configurable:!0,writable:!0}):D[y]=S,D}class Ue{constructor(){let{opts:y,dp:S}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Jt(this,"toggleTimepickerIsActive",(M=>{this.dp.timepickerIsActive=M})),Jt(this,"onChangeSelectedDate",(M=>{let{date:q,updateTime:$=!1}=M;q&&(this.setMinMaxTime(q),this.setCurrentTime(!!$&&q),this.addTimeToDate(q))})),Jt(this,"onChangeLastSelectedDate",(M=>{M&&(this.setTime(M),this.render())})),Jt(this,"onChangeInputRange",(M=>{let q=M.target;this[q.getAttribute("name")]=q.value,this.updateText(),this.dp.trigger(t.eventChangeTime,{hours:this.hours,minutes:this.minutes})})),Jt(this,"onMouseEnterLeave",(M=>{let q=M.target.getAttribute("name"),$=this.$minutesText;q==="hours"&&($=this.$hoursText),$.classList.toggle("-focus-")})),Jt(this,"onFocus",(()=>{this.toggleTimepickerIsActive(!0)})),Jt(this,"onBlur",(()=>{this.toggleTimepickerIsActive(!1)})),this.opts=y,this.dp=S;let{timeFormat:z}=this.dp.locale;z&&(z.match(T("h"))||z.match(T("hh")))&&(this.ampm=!0),this.init()}init(){this.setTime(this.dp.lastSelectedDate||this.dp.viewDate),this.createElement(),this.buildHtml(),this.defineDOM(),this.render(),this.bindDatepickerEvents(),this.bindDOMEvents()}bindDatepickerEvents(){this.dp.on(t.eventChangeSelectedDate,this.onChangeSelectedDate),this.dp.on(t.eventChangeLastSelectedDate,this.onChangeLastSelectedDate)}bindDOMEvents(){let y="input";navigator.userAgent.match(/trident/gi)&&(y="change"),_(this.$ranges,y,this.onChangeInputRange),_(this.$ranges,"mouseenter",this.onMouseEnterLeave),_(this.$ranges,"mouseleave",this.onMouseEnterLeave),_(this.$ranges,"focus",this.onFocus),_(this.$ranges,"mousedown",this.onFocus),_(this.$ranges,"blur",this.onBlur)}createElement(){this.$el=a({className:b("air-datepicker-time",{"-am-pm-":this.dp.ampm})})}destroy(){this.dp.off(t.eventChangeSelectedDate,this.onChangeSelectedDate),this.dp.off(t.eventChangeLastSelectedDate,this.onChangeLastSelectedDate),this.$el.parentNode.removeChild(this.$el)}buildHtml(){let{ampm:y,hours:S,displayHours:z,minutes:M,minHours:q,minMinutes:$,maxHours:R,maxMinutes:B,dayPeriod:Y,opts:{hoursStep:rt,minutesStep:et}}=this;this.$el.innerHTML=`<div class="air-datepicker-time--current"> <span class="air-datepicker-time--current-hours">${m(z)}</span> <span class="air-datepicker-time--current-colon">:</span> <span class="air-datepicker-time--current-minutes">${m(M)}</span> `+(y?`<span class='air-datepicker-time--current-ampm'>${Y}</span>`:"")+`</div><div class="air-datepicker-time--sliders"> <div class="air-datepicker-time--row"> <input type="range" name="hours" value="${S}" min="${q}" max="${R}" step="${rt}"/> </div> <div class="air-datepicker-time--row"> <input type="range" name="minutes" value="${M}" min="${$}" max="${B}" step="${et}"/> </div></div>`}defineDOM(){let y=S=>n(S,this.$el);this.$ranges=this.$el.querySelectorAll('[type="range"]'),this.$hours=y('[name="hours"]'),this.$minutes=y('[name="minutes"]'),this.$hoursText=y(".air-datepicker-time--current-hours"),this.$minutesText=y(".air-datepicker-time--current-minutes"),this.$ampm=y(".air-datepicker-time--current-ampm")}setTime(y){this.setMinMaxTime(y),this.setCurrentTime(y)}addTimeToDate(y){y&&(y.setHours(this.hours),y.setMinutes(this.minutes))}setMinMaxTime(y){if(this.setMinMaxTimeFromOptions(),y){let{minDate:S,maxDate:z}=this.dp;S&&g(y,S)&&this.setMinTimeFromMinDate(S),z&&g(y,z)&&this.setMaxTimeFromMaxDate(z)}}setCurrentTime(y){let{hours:S,minutes:z}=y?d(y):this;this.hours=j(S,this.minHours,this.maxHours),this.minutes=j(z,this.minMinutes,this.maxMinutes)}setMinMaxTimeFromOptions(){let{minHours:y,minMinutes:S,maxHours:z,maxMinutes:M}=this.opts;this.minHours=j(y,0,23),this.minMinutes=j(S,0,59),this.maxHours=j(z,0,23),this.maxMinutes=j(M,0,59)}setMinTimeFromMinDate(y){let{lastSelectedDate:S}=this.dp;this.minHours=y.getHours(),S&&S.getHours()>y.getHours()?this.minMinutes=this.opts.minMinutes:this.minMinutes=y.getMinutes()}setMaxTimeFromMaxDate(y){let{lastSelectedDate:S}=this.dp;this.maxHours=y.getHours(),S&&S.getHours()<y.getHours()?this.maxMinutes=this.opts.maxMinutes:this.maxMinutes=y.getMinutes()}updateSliders(){s(this.$hours,{min:this.minHours,max:this.maxHours}).value=this.hours,s(this.$minutes,{min:this.minMinutes,max:this.maxMinutes}).value=this.minutes}updateText(){this.$hoursText.innerHTML=m(this.displayHours),this.$minutesText.innerHTML=m(this.minutes),this.ampm&&(this.$ampm.innerHTML=this.dayPeriod)}set hours(y){this._hours=y;let{hours:S,dayPeriod:z}=h(y);this.displayHours=this.ampm?S:y,this.dayPeriod=z}get hours(){return this._hours}render(){this.updateSliders(),this.updateText()}}function ve(D,y,S){return(y=(function(z){var M=(function(q,$){if(typeof q!="object"||q===null)return q;var R=q[Symbol.toPrimitive];if(R!==void 0){var B=R.call(q,"string");if(typeof B!="object")return B;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(q)})(z);return typeof M=="symbol"?M:String(M)})(y))in D?Object.defineProperty(D,y,{value:S,enumerable:!0,configurable:!0,writable:!0}):D[y]=S,D}class Jn{constructor(y){let{dp:S,opts:z}=y;ve(this,"pressedKeys",new Set),ve(this,"hotKeys",new Map([[[["Control","ArrowRight"],["Control","ArrowUp"]],M=>M.month++],[[["Control","ArrowLeft"],["Control","ArrowDown"]],M=>M.month--],[[["Shift","ArrowRight"],["Shift","ArrowUp"]],M=>M.year++],[[["Shift","ArrowLeft"],["Shift","ArrowDown"]],M=>M.year--],[[["Alt","ArrowRight"],["Alt","ArrowUp"]],M=>M.year+=10],[[["Alt","ArrowLeft"],["Alt","ArrowDown"]],M=>M.year-=10],[["Control","Shift","ArrowUp"],(M,q)=>q.up()]])),ve(this,"handleHotKey",(M=>{let q=this.hotKeys.get(M),$=d(this.getInitialFocusDate());q($,this.dp);let{year:R,month:B,date:Y}=$,rt=l(new Date(R,B));rt<Y&&(Y=rt);let et=this.dp.getClampedDate(new Date(R,B,Y));this.dp.setFocusDate(et,{viewDateTransition:!0})})),ve(this,"isHotKeyPressed",(()=>{let M=!1,q=this.pressedKeys.size,$=R=>this.pressedKeys.has(R);for(let[R]of this.hotKeys){if(M)break;if(Array.isArray(R[0]))R.forEach((B=>{M||q!==B.length||(M=B.every($)&&R)}));else{if(q!==R.length)continue;M=R.every($)&&R}}return M})),ve(this,"isArrow",(M=>M>=37&&M<=40)),ve(this,"onKeyDown",(M=>{if(!this.dp.visible&&!this.dp.treatAsInline)return;let{key:q,which:$}=M,{dp:R,dp:{focusDate:B},opts:Y}=this;this.registerKey(q);let rt=this.isHotKeyPressed();if(rt)return M.preventDefault(),void this.handleHotKey(rt);if(this.isArrow($))return M.preventDefault(),void this.focusNextCell(q);if(q==="Enter"){if(R.currentView!==Y.minView)return void R.down();if(B){let et=R._checkIfDateIsSelected(B);return void(et?R._handleAlreadySelectedDates(et,B):R.selectDate(B))}}q==="Escape"&&this.dp.hide()})),ve(this,"onKeyUp",(M=>{this.removeKey(M.key)})),this.dp=S,this.opts=z,this.init()}init(){this.bindKeyboardEvents()}bindKeyboardEvents(){let{$el:y}=this.dp;y.addEventListener("keydown",this.onKeyDown),y.addEventListener("keyup",this.onKeyUp)}destroy(){let{$el:y}=this.dp;y.removeEventListener("keydown",this.onKeyDown),y.removeEventListener("keyup",this.onKeyUp),this.hotKeys=null,this.pressedKeys=null}getInitialFocusDate(){let{focusDate:y,currentView:S,selectedDates:z,parsedViewDate:{year:M,month:q}}=this.dp,$=y||z[z.length-1];if(!$)switch(S){case t.days:$=new Date(M,q,new Date().getDate());break;case t.months:$=new Date(M,q,1);break;case t.years:$=new Date(M,0,1)}return $}focusNextCell(y){let S=this.getInitialFocusDate(),{currentView:z}=this.dp,{days:M,months:q,years:$}=t,R=d(S),B=R.year,Y=R.month,rt=R.date;switch(y){case"ArrowLeft":z===M&&(rt-=1),z===q&&(Y-=1),z===$&&(B-=1);break;case"ArrowUp":z===M&&(rt-=7),z===q&&(Y-=3),z===$&&(B-=4);break;case"ArrowRight":z===M&&(rt+=1),z===q&&(Y+=1),z===$&&(B+=1);break;case"ArrowDown":z===M&&(rt+=7),z===q&&(Y+=3),z===$&&(B+=4)}let et=this.dp.getClampedDate(new Date(B,Y,rt));this.dp.setFocusDate(et,{viewDateTransition:!0})}registerKey(y){this.pressedKeys.add(y)}removeKey(y){this.pressedKeys.delete(y)}}let ka={on(D,y){this.__events||(this.__events={}),this.__events[D]?this.__events[D].push(y):this.__events[D]=[y]},off(D,y){this.__events&&this.__events[D]&&(this.__events[D]=this.__events[D].filter((S=>S!==y)))},removeAllEvents(){this.__events={}},trigger(D){for(var y=arguments.length,S=new Array(y>1?y-1:0),z=1;z<y;z++)S[z-1]=arguments[z];this.__events&&this.__events[D]&&this.__events[D].forEach((M=>{M(...S)}))}};function ht(D,y,S){return(y=(function(z){var M=(function(q,$){if(typeof q!="object"||q===null)return q;var R=q[Symbol.toPrimitive];if(R!==void 0){var B=R.call(q,"string");if(typeof B!="object")return B;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(q)})(z);return typeof M=="symbol"?M:String(M)})(y))in D?Object.defineProperty(D,y,{value:S,enumerable:!0,configurable:!0,writable:!0}):D[y]=S,D}let $o="",Lo="",dt=!1;class nt{static buildGlobalContainer(y){dt=!0,$o=a({className:y,id:y}),n("body").appendChild($o)}constructor(y,S){var z=this;if(ht(this,"viewIndexes",[t.days,t.months,t.years]),ht(this,"next",(()=>{let{year:$,month:R}=this.parsedViewDate;switch(this.currentView){case t.days:this.setViewDate(new Date($,R+1,1));break;case t.months:this.setViewDate(new Date($+1,R,1));break;case t.years:this.setViewDate(new Date($+10,0,1))}})),ht(this,"prev",(()=>{let{year:$,month:R}=this.parsedViewDate;switch(this.currentView){case t.days:this.setViewDate(new Date($,R-1,1));break;case t.months:this.setViewDate(new Date($-1,R,1));break;case t.years:this.setViewDate(new Date($-10,0,1))}})),ht(this,"_finishHide",(()=>{this.hideAnimation=!1,this._destroyComponents(),this.$container.removeChild(this.$datepicker)})),ht(this,"setPosition",(function($){let R=arguments.length>1&&arguments[1]!==void 0&&arguments[1];if(typeof($=$||z.opts.position)=="function")return void(z.customHide=$({$datepicker:z.$datepicker,$target:z.$el,$pointer:z.$pointer,isViewChange:R,done:z._finishHide}));let B,Y,{isMobile:rt}=z.opts,et=z.$el.getBoundingClientRect(),it=z.$el.getBoundingClientRect(),ue=z.$datepicker.offsetParent,Mr=z.$el.offsetParent,ir=z.$datepicker.getBoundingClientRect(),Zo=$.split(" "),qs=window.scrollY,Ri=window.scrollX,Oi=z.opts.offset,Pi=Zo[0],Rp=Zo[1];if(rt)z.$datepicker.style.cssText="left: 50%; top: 50%";else{if(ue===Mr&&ue!==document.body&&(it={top:z.$el.offsetTop,left:z.$el.offsetLeft,width:et.width,height:z.$el.offsetHeight},qs=0,Ri=0),ue!==Mr&&ue!==document.body){let hc=ue.getBoundingClientRect();it={top:et.top-hc.top,left:et.left-hc.left,width:et.width,height:et.height},qs=0,Ri=0}switch(Pi){case"top":B=it.top-ir.height-Oi;break;case"right":Y=it.left+it.width+Oi;break;case"bottom":B=it.top+it.height+Oi;break;case"left":Y=it.left-ir.width-Oi}switch(Rp){case"top":B=it.top;break;case"right":Y=it.left+it.width-ir.width;break;case"bottom":B=it.top+it.height-ir.height;break;case"left":Y=it.left;break;case"center":/left|right/.test(Pi)?B=it.top+it.height/2-ir.height/2:Y=it.left+it.width/2-ir.width/2}z.$datepicker.style.cssText=`left: ${Y+Ri}px; top: ${B+qs}px`}})),ht(this,"_setInputValue",(()=>{let{opts:$,$altField:R,locale:{dateFormat:B}}=this,{altFieldDateFormat:Y,altField:rt}=$;rt&&R&&(R.value=this._getInputValue(Y)),this.$el.value=this._getInputValue(B),this.$el.dispatchEvent(new Event("change"))})),ht(this,"_getInputValue",($=>{let{selectedDates:R,opts:B}=this,{multipleDates:Y,multipleDatesSeparator:rt}=B;if(!R.length)return"";let et=typeof $=="function",it=et?$(Y?R:R[0]):R.map((ue=>this.formatDate(ue,$)));return it=et?it:it.join(rt),it})),ht(this,"_checkIfDateIsSelected",(function($){let R=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t.days,B=!1;return z.selectedDates.some((Y=>{let rt=g($,Y,R);return B=rt&&Y,rt})),B})),ht(this,"_scheduleCallAfterTransition",($=>{this._cancelScheduledCall(),$&&$(!1),this._onTransitionEnd=()=>{$&&$(!0)},this.$datepicker.addEventListener("transitionend",this._onTransitionEnd,{once:!0})})),ht(this,"_cancelScheduledCall",(()=>{this.$datepicker.removeEventListener("transitionend",this._onTransitionEnd)})),ht(this,"setViewDate",($=>{if(!(($=w($))instanceof Date)||g($,this.viewDate))return;let R=this.viewDate;this.viewDate=$;let{onChangeViewDate:B}=this.opts;if(B){let{month:Y,year:rt}=this.parsedViewDate;B({month:Y,year:rt,decade:this.curDecade})}this.trigger(t.eventChangeViewDate,$,R)})),ht(this,"setFocusDate",(function($){let R=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};(!$||($=w($))instanceof Date)&&(z.focusDate=$,z.trigger(t.eventChangeFocusDate,$,R))})),ht(this,"setCurrentView",(function($){let R=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(z.viewIndexes.includes($)){if(z.currentView=$,z.elIsInput&&z.visible&&z.setPosition(void 0,!0),z.trigger(t.eventChangeCurrentView,$),!z.views[$]){let B=z.views[$]=new gt({dp:z,opts:z.opts,type:$});z.shouldUpdateDOM&&z.$content.appendChild(B.$el)}z.opts.onChangeView&&!R.silent&&z.opts.onChangeView($)}})),ht(this,"_updateLastSelectedDate",($=>{this.lastSelectedDate=$,this.trigger(t.eventChangeLastSelectedDate,$)})),ht(this,"destroy",(()=>{if(this.isDestroyed)return;let{showEvent:$,isMobile:R}=this.opts,B=this.$datepicker.parentNode;B&&B.removeChild(this.$datepicker),this.$el.removeEventListener($,this._onFocus),this.$el.removeEventListener("blur",this._onBlur),window.removeEventListener("resize",this._onResize),R&&this._removeMobileAttributes(),this.keyboardNav&&this.keyboardNav.destroy(),this.views=null,this.nav=null,this.$datepicker=null,this.opts={},this.$customContainer=null,this.viewDate=null,this.focusDate=null,this.selectedDates=[],this.rangeDateFrom=null,this.rangeDateTo=null,this.isDestroyed=!0})),ht(this,"update",(function(){let $=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},R=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},B=I({},z.opts),{silent:Y}=R;I(z.opts,$);let{timepicker:rt,buttons:et,range:it,selectedDates:ue,isMobile:Mr}=z.opts,ir=z.visible||z.treatAsInline;z._createMinMaxDates(),z._limitViewDateByMaxMinDates(),z._handleLocale(),ue&&(z.selectedDates=[],z.selectDate(ue,{silent:Y})),$.view&&z.setCurrentView($.view,{silent:Y}),z._setInputValue(),B.range&&!it?(z.rangeDateTo=!1,z.rangeDateFrom=!1):!B.range&&it&&z.selectedDates.length&&(z.rangeDateFrom=z.selectedDates[0],z.rangeDateTo=z.selectedDates[1]),B.timepicker&&!rt?(ir&&z.timepicker.destroy(),z.timepicker=!1,z.$timepicker.parentNode.removeChild(z.$timepicker)):!B.timepicker&&rt&&z._addTimepicker(),!B.buttons&&et?z._addButtons():B.buttons&&!et?(z.buttons.destroy(),z.$buttons.parentNode.removeChild(z.$buttons)):ir&&B.buttons&&et&&z.buttons.clearHtml().render(),!B.isMobile&&Mr?(z.treatAsInline||Lo||z._createMobileOverlay(),z._addMobileAttributes(),z.visible&&z._showMobileOverlay()):B.isMobile&&!Mr&&(z._removeMobileAttributes(),z.visible&&(Lo.classList.remove("-active-"),typeof z.opts.position!="function"&&z.setPosition())),ir&&(z.nav.update(),z.views[z.currentView].render(),z.currentView===t.days&&z.views[z.currentView].renderDayNames())})),ht(this,"disableDate",(($,R)=>{(Array.isArray($)?$:[$]).forEach((B=>{let Y=w(B);if(!Y)return;let rt=R?"delete":"add";this.disabledDates[rt](this.formatDate(Y,"yyyy-MM-dd"));let et=this.getCell(Y,this.currentViewSingular);et&&et.adpCell.render()}),[])})),ht(this,"enableDate",($=>{this.disableDate($,!0)})),ht(this,"isDateDisabled",($=>{let R=w($);return this.disabledDates.has(this.formatDate(R,"yyyy-MM-dd"))})),ht(this,"isOtherMonth",($=>{let{month:R}=d($);return R!==this.parsedViewDate.month})),ht(this,"isOtherYear",($=>{let{year:R}=d($);return R!==this.parsedViewDate.year})),ht(this,"isOtherDecade",($=>{let{year:R}=d($),[B,Y]=f(this.viewDate);return R<B||R>Y})),ht(this,"_onChangeSelectedDate",($=>{let{silent:R}=$;setTimeout((()=>{this._setInputValue(),this.opts.onSelect&&!R&&this._triggerOnSelect()}))})),ht(this,"_onChangeFocusedDate",(function($){let{viewDateTransition:R}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!$)return;let B=!1;R&&(B=z.isOtherMonth($)||z.isOtherYear($)||z.isOtherDecade($)),B&&z.setViewDate($),z.opts.onFocus&&z.opts.onFocus({datepicker:z,date:$})})),ht(this,"_onChangeTime",($=>{let{hours:R,minutes:B}=$,Y=new Date,{lastSelectedDate:rt,opts:{onSelect:et}}=this,it=rt;rt||(it=Y);let ue=this.getCell(it,this.currentViewSingular),Mr=ue&&ue.adpCell;Mr&&Mr.isDisabled||(it.setHours(R),it.setMinutes(B),rt?(this._setInputValue(),et&&this._triggerOnSelect()):this.selectDate(it))})),ht(this,"_onFocus",($=>{this.visible||this.show()})),ht(this,"_onBlur",($=>{this.inFocus||!this.visible||this.opts.isMobile||this.hide()})),ht(this,"_onMouseDown",($=>{this.inFocus=!0})),ht(this,"_onMouseUp",($=>{this.inFocus=!1,this.$el.focus()})),ht(this,"_onResize",(()=>{this.visible&&typeof this.opts.position!="function"&&this.setPosition()})),ht(this,"_onClickOverlay",(()=>{this.visible&&this.hide()})),ht(this,"getViewDates",(function(){let $=arguments.length>0&&arguments[0]!==void 0?arguments[0]:t.days;return gt.getDatesFunction($)(z)})),ht(this,"isWeekend",($=>this.opts.weekends.includes($))),ht(this,"getClampedDate",($=>{let{minDate:R,maxDate:B}=this,Y=$;return B&&v($,B)?Y=B:R&&x($,R)&&(Y=R),Y})),this.$el=n(y),!this.$el)return;this.$datepicker=a({className:"air-datepicker"}),this.opts=I({},r,S),this.$customContainer=!!this.opts.container&&n(this.opts.container),this.$altField=n(this.opts.altField||!1);let{view:M,startDate:q}=this.opts;q||(this.opts.startDate=new Date),this.$el.nodeName==="INPUT"&&(this.elIsInput=!0),this.inited=!1,this.visible=!1,this.viewDate=w(this.opts.startDate),this.focusDate=!1,this.initialReadonly=this.$el.getAttribute("readonly"),this.customHide=!1,this.currentView=M,this.selectedDates=[],this.disabledDates=new Set,this.isDestroyed=!1,this.views={},this.keys=[],this.rangeDateFrom="",this.rangeDateTo="",this.timepickerIsActive=!1,this.treatAsInline=this.opts.inline||!this.elIsInput,this.init()}init(){let{opts:y,treatAsInline:S,opts:{inline:z,isMobile:M,selectedDates:q,keyboardNav:$,onlyTimepicker:R}}=this,B=n("body");(!dt||dt&&$o&&!B.contains($o))&&!z&&this.elIsInput&&!this.$customContainer&&nt.buildGlobalContainer(nt.defaultGlobalContainerId),!M||Lo||S||this._createMobileOverlay(),this._handleLocale(),this._bindSubEvents(),this._createMinMaxDates(),this._limitViewDateByMaxMinDates(),this.elIsInput&&(z||this._bindEvents(),$&&!R&&(this.keyboardNav=new Jn({dp:this,opts:y}))),q&&this.selectDate(q,{silent:!0}),this.opts.visible&&!S&&this.show(),M&&!S&&this.$el.setAttribute("readonly",!0),S&&this._createComponents()}_createMobileOverlay(){Lo=a({className:"air-datepicker-overlay"}),$o.appendChild(Lo)}_createComponents(){let{opts:y,treatAsInline:S,opts:{inline:z,buttons:M,timepicker:q,position:$,classes:R,onlyTimepicker:B,isMobile:Y}}=this;this._buildBaseHtml(),this.elIsInput&&(z||this._setPositionClasses($)),!z&&this.elIsInput||this.$datepicker.classList.add("-inline-"),R&&this.$datepicker.classList.add(...R.split(" ")),B&&this.$datepicker.classList.add("-only-timepicker-"),Y&&!S&&this._addMobileAttributes(),this.views[this.currentView]=new gt({dp:this,type:this.currentView,opts:y}),this.nav=new jt({dp:this,opts:y}),q&&this._addTimepicker(),M&&this._addButtons(),this.$content.appendChild(this.views[this.currentView].$el),this.$nav.appendChild(this.nav.$el)}_destroyComponents(){for(let y in this.views)this.views[y].destroy();this.views={},this.nav.destroy(),this.timepicker&&this.timepicker.destroy()}_addMobileAttributes(){Lo.addEventListener("click",this._onClickOverlay),this.$datepicker.classList.add("-is-mobile-"),this.$el.setAttribute("readonly",!0)}_removeMobileAttributes(){Lo.removeEventListener("click",this._onClickOverlay),this.$datepicker.classList.remove("-is-mobile-"),this.initialReadonly||this.initialReadonly===""||this.$el.removeAttribute("readonly")}_createMinMaxDates(){let{minDate:y,maxDate:S}=this.opts;this.minDate=!!y&&w(y),this.maxDate=!!S&&w(S)}_addTimepicker(){this.$timepicker=a({className:"air-datepicker--time"}),this.$datepicker.appendChild(this.$timepicker),this.timepicker=new Ue({dp:this,opts:this.opts}),this.$timepicker.appendChild(this.timepicker.$el)}_addButtons(){this.$buttons=a({className:"air-datepicker--buttons"}),this.$datepicker.appendChild(this.$buttons),this.buttons=new nr({dp:this,opts:this.opts}),this.$buttons.appendChild(this.buttons.$el)}_bindSubEvents(){this.on(t.eventChangeSelectedDate,this._onChangeSelectedDate),this.on(t.eventChangeFocusDate,this._onChangeFocusedDate),this.on(t.eventChangeTime,this._onChangeTime)}_buildBaseHtml(){let{inline:y}=this.opts;var S,z;this.elIsInput?y?(S=this.$datepicker,(z=this.$el).parentNode.insertBefore(S,z.nextSibling)):this.$container.appendChild(this.$datepicker):this.$el.appendChild(this.$datepicker),this.$datepicker.innerHTML='<i class="air-datepicker--pointer"></i><div class="air-datepicker--navigation"></div><div class="air-datepicker--content"></div>',this.$content=n(".air-datepicker--content",this.$datepicker),this.$pointer=n(".air-datepicker--pointer",this.$datepicker),this.$nav=n(".air-datepicker--navigation",this.$datepicker)}_handleLocale(){let{locale:y,dateFormat:S,firstDay:z,timepicker:M,onlyTimepicker:q,timeFormat:$,dateTimeSeparator:R}=this.opts;var B;this.locale=(B=y,JSON.parse(JSON.stringify(B))),S&&(this.locale.dateFormat=S),$!==void 0&&$!==""&&(this.locale.timeFormat=$);let{timeFormat:Y}=this.locale;if(z!==""&&(this.locale.firstDay=z),M&&typeof S!="function"){let rt=Y?R:"";this.locale.dateFormat=[this.locale.dateFormat,Y||""].join(rt)}q&&typeof S!="function"&&(this.locale.dateFormat=this.locale.timeFormat)}_setPositionClasses(y){if(typeof y=="function")return void this.$datepicker.classList.add("-custom-position-");let S=(y=y.split(" "))[0],z=`air-datepicker -${S}-${y[1]}- -from-${S}-`;this.$datepicker.classList.add(...z.split(" "))}_bindEvents(){this.$el.addEventListener(this.opts.showEvent,this._onFocus),this.$el.addEventListener("blur",this._onBlur),this.$datepicker.addEventListener("mousedown",this._onMouseDown),this.$datepicker.addEventListener("mouseup",this._onMouseUp),window.addEventListener("resize",this._onResize)}_limitViewDateByMaxMinDates(){let{viewDate:y,minDate:S,maxDate:z}=this;z&&v(y,z)&&this.setViewDate(z),S&&x(y,S)&&this.setViewDate(S)}formatDate(){let y=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.viewDate,S=arguments.length>1?arguments[1]:void 0;if(y=w(y),!(y instanceof Date))return;let z=S,M=this.locale,q=d(y),$=q.dayPeriod,R=f(y),B=nt.replacer,Y={T:y.getTime(),m:q.minutes,mm:q.fullMinutes,h:q.hours12,hh:q.fullHours12,H:q.hours,HH:q.fullHours,aa:$,AA:$.toUpperCase(),E:M.daysShort[q.day],EEEE:M.days[q.day],d:q.date,dd:q.fullDate,M:q.month+1,MM:q.fullMonth,MMM:M.monthsShort[q.month],MMMM:M.months[q.month],yy:q.year.toString().slice(-2),yyyy:q.year,yyyy1:R[0],yyyy2:R[1]};for(let[rt,et]of Object.entries(Y))z=B(z,T(rt),et);return z}down(y){this._handleUpDownActions(y,"down")}up(y){this._handleUpDownActions(y,"up")}selectDate(y){let S,z=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{currentView:M,parsedViewDate:q,selectedDates:$}=this,{updateTime:R,silent:B}=z,{moveToOtherMonthsOnSelect:Y,moveToOtherYearsOnSelect:rt,multipleDates:et,range:it,autoClose:ue,onBeforeSelect:Mr}=this.opts,ir=$.length;if(Array.isArray(y))return y.forEach((Zo=>{this.selectDate(Zo,z)})),new Promise((Zo=>{setTimeout(Zo)}));if((y=w(y))instanceof Date){if(Mr&&!B&&!Mr({date:y,datepicker:this}))return Promise.resolve();if(M===t.days&&y.getMonth()!==q.month&&Y&&(S=new Date(y.getFullYear(),y.getMonth(),1)),M===t.years&&y.getFullYear()!==q.year&&rt&&(S=new Date(y.getFullYear(),0,1)),S&&this.setViewDate(S),et&&!it){if(ir===et)return;this._checkIfDateIsSelected(y)||$.push(y)}else if(it)switch(ir){case 1:$.push(y),this.rangeDateTo||(this.rangeDateTo=y),v(this.rangeDateFrom,this.rangeDateTo)&&(this.rangeDateTo=this.rangeDateFrom,this.rangeDateFrom=y),this.selectedDates=[this.rangeDateFrom,this.rangeDateTo];break;case 2:this.selectedDates=[y],this.rangeDateFrom=y,this.rangeDateTo="";break;default:this.selectedDates=[y],this.rangeDateFrom=y}else this.selectedDates=[y];return this.trigger(t.eventChangeSelectedDate,{action:t.actionSelectDate,silent:z?.silent,date:y,updateTime:R}),this._updateLastSelectedDate(y),ue&&!this.timepickerIsActive&&this.visible&&(et||it?it&&ir===1&&this.hide():this.hide()),new Promise((Zo=>{setTimeout(Zo)}))}}unselectDate(y){let S=this.selectedDates,z=this;if((y=w(y))instanceof Date)return S.some(((M,q)=>{if(g(M,y))return S.splice(q,1),z.selectedDates.length?(z.rangeDateTo="",z.rangeDateFrom=S[0],z._updateLastSelectedDate(z.selectedDates[z.selectedDates.length-1])):(z.rangeDateFrom="",z.rangeDateTo="",z._updateLastSelectedDate(!1)),this.trigger(t.eventChangeSelectedDate,{action:t.actionUnselectDate,date:y}),!0}))}replaceDate(y,S){let z=this.selectedDates.find((q=>g(q,y,this.currentView))),M=this.selectedDates.indexOf(z);M<0||g(this.selectedDates[M],S,this.currentView)||(this.selectedDates[M]=S,this.trigger(t.eventChangeSelectedDate,{action:t.actionSelectDate,date:S,updateTime:!0}),this._updateLastSelectedDate(S))}clear(){let y=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return this.selectedDates=[],this.rangeDateFrom=!1,this.rangeDateTo=!1,this.lastSelectedDate=!1,this.trigger(t.eventChangeSelectedDate,{action:t.actionUnselectDate,silent:y.silent}),new Promise((S=>{setTimeout(S)}))}show(){let{onShow:y,isMobile:S}=this.opts;this._cancelScheduledCall(),this.visible||this.hideAnimation||this._createComponents(),this.setPosition(this.opts.position),this.$datepicker.classList.add("-active-"),this.visible=!0,y&&this._scheduleCallAfterTransition(y),S&&this._showMobileOverlay()}hide(){let{onHide:y,isMobile:S}=this.opts,z=this._hasTransition();this.visible=!1,this.hideAnimation=!0,this.$datepicker.classList.remove("-active-"),this.customHide&&this.customHide(),this.elIsInput&&this.$el.blur(),this._scheduleCallAfterTransition((M=>{!this.customHide&&(M&&z||!M&&!z)&&this._finishHide(),y&&y(M)})),S&&Lo.classList.remove("-active-")}_triggerOnSelect(){let y=[],S=[],{selectedDates:z,locale:M,opts:{onSelect:q,multipleDates:$,range:R}}=this,B=$||R,Y=typeof M.dateFormat=="function";z.length&&(y=z.map(k),S=Y?$?M.dateFormat(y):y.map((rt=>M.dateFormat(rt))):y.map((rt=>this.formatDate(rt,M.dateFormat)))),q({date:B?y:y[0],formattedDate:B?S:S[0],datepicker:this})}_handleAlreadySelectedDates(y,S){let{selectedDates:z,rangeDateFrom:M,rangeDateTo:q}=this,{range:$,toggleSelected:R}=this.opts,B=z.length,Y=typeof R=="function"?R({datepicker:this,date:S}):R,rt=!!($&&B===1&&y),et=rt?k(S):S;$&&!Y&&(B!==2&&this.selectDate(et),B===2&&g(M,q))||(Y?this.unselectDate(et):this._updateLastSelectedDate(rt?et:y))}_handleUpDownActions(y,S){if(!((y=w(y||this.focusDate||this.viewDate))instanceof Date))return;let z=S==="up"?this.viewIndex+1:this.viewIndex-1;z>2&&(z=2),z<0&&(z=0),this.setViewDate(new Date(y.getFullYear(),y.getMonth(),1)),this.setCurrentView(this.viewIndexes[z])}getCell(y){let S=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t.day;if(!((y=w(y))instanceof Date))return;let{year:z,month:M,date:q}=d(y),$=`[data-year="${z}"]`,R=`[data-month="${M}"]`,B={[t.day]:`${$}${R}[data-date="${q}"]`,[t.month]:`${$}${R}`,[t.year]:`${$}`};return this.views[this.currentView]?this.views[this.currentView].$el.querySelector(B[S]):void 0}_showMobileOverlay(){Lo.classList.add("-active-")}_hasTransition(){return window.getComputedStyle(this.$datepicker).getPropertyValue("transition-duration").split(", ").reduce(((y,S)=>parseFloat(S)+y),0)>0}get shouldUpdateDOM(){return this.visible||this.treatAsInline}get parsedViewDate(){return d(this.viewDate)}get currentViewSingular(){return this.currentView.slice(0,-1)}get curDecade(){return f(this.viewDate)}get viewIndex(){return this.viewIndexes.indexOf(this.currentView)}get isFinalView(){return this.currentView===t.years}get hasSelectedDates(){return this.selectedDates.length>0}get isMinViewReached(){return this.currentView===this.opts.minView||this.currentView===t.days}get $container(){return this.$customContainer||$o}static replacer(y,S,z){return y.replace(S,(function(M,q,$,R){return q+z+R}))}}var yt;return ht(nt,"defaults",r),ht(nt,"version","3.6.0"),ht(nt,"defaultGlobalContainerId","air-datepicker-global-container"),yt=nt.prototype,Object.assign(yt,ka),o.default})()}))});var Is=globalThis,bf=i=>i,uc=Is.trustedTypes,vf=uc?uc.createPolicy("lit-html",{createHTML:i=>i}):void 0,Pp="$lit$",Sn=`lit$${Math.random().toFixed(9).slice(2)}$`,Hp="?"+Sn,F1=`<${Hp}>`,Bi=document,Ns=()=>Bi.createComment(""),Ds=i=>i===null||typeof i!="object"&&typeof i!="function",Fp=Array.isArray,kf=i=>Fp(i)||typeof i?.[Symbol.iterator]=="function",Op=`[
3
3
  \f\r]`,Ms=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,xf=/-->/g,yf=/>/g,Hi=RegExp(`>|${Op}(?:([^\\s"'>=/]+)(${Op}*=${Op}*(?:[^
4
4
  \f\r"'\`<>=]|("|')|))|$)`,"g"),zf=/'/g,wf=/"/g,Sf=/^(?:script|style|textarea|title)$/i,Bp=i=>(o,...t)=>({_$litType$:i,strings:o,values:t}),u=Bp(1),qo=Bp(2),Cf=Bp(3),ne=Symbol.for("lit-noChange"),G=Symbol.for("lit-nothing"),_f=new WeakMap,Fi=Bi.createTreeWalker(Bi,129);function Ef(i,o){if(!Fp(i)||!i.hasOwnProperty("raw"))throw Error("invalid template strings array");return vf!==void 0?vf.createHTML(o):o}var Tf=(i,o)=>{let t=i.length-1,r=[],n,a=o===2?"<svg>":o===3?"<math>":"",s=Ms;for(let l=0;l<t;l++){let d=i[l],h,m,f=-1,b=0;for(;b<d.length&&(s.lastIndex=b,m=s.exec(d),m!==null);)b=s.lastIndex,s===Ms?m[1]==="!--"?s=xf:m[1]!==void 0?s=yf:m[2]!==void 0?(Sf.test(m[2])&&(n=RegExp("</"+m[2],"g")),s=Hi):m[3]!==void 0&&(s=Hi):s===Hi?m[0]===">"?(s=n??Ms,f=-1):m[1]===void 0?f=-2:(f=s.lastIndex-m[2].length,h=m[1],s=m[3]===void 0?Hi:m[3]==='"'?wf:zf):s===wf||s===zf?s=Hi:s===xf||s===yf?s=Ms:(s=Hi,n=void 0);let g=s===Hi&&i[l+1].startsWith("/>")?" ":"";a+=s===Ms?d+F1:f>=0?(r.push(h),d.slice(0,f)+Pp+d.slice(f)+Sn+g):d+Sn+(f===-2?l:g)}return[Ef(i,a+(i[t]||"<?>")+(o===2?"</svg>":o===3?"</math>":"")),r]},Rs=class i{constructor({strings:o,_$litType$:t},r){let n;this.parts=[];let a=0,s=0,l=o.length-1,d=this.parts,[h,m]=Tf(o,t);if(this.el=i.createElement(h,r),Fi.currentNode=this.el.content,t===2||t===3){let f=this.el.content.firstChild;f.replaceWith(...f.childNodes)}for(;(n=Fi.nextNode())!==null&&d.length<l;){if(n.nodeType===1){if(n.hasAttributes())for(let f of n.getAttributeNames())if(f.endsWith(Pp)){let b=m[s++],g=n.getAttribute(f).split(Sn),v=/([.?@])?(.*)/.exec(b);d.push({type:1,index:a,name:v[2],strings:g,ctor:v[1]==="."?fc:v[1]==="?"?gc:v[1]==="@"?bc:Ui}),n.removeAttribute(f)}else f.startsWith(Sn)&&(d.push({type:6,index:a}),n.removeAttribute(f));if(Sf.test(n.tagName)){let f=n.textContent.split(Sn),b=f.length-1;if(b>0){n.textContent=uc?uc.emptyScript:"";for(let g=0;g<b;g++)n.append(f[g],Ns()),Fi.nextNode(),d.push({type:2,index:++a});n.append(f[b],Ns())}}}else if(n.nodeType===8)if(n.data===Hp)d.push({type:2,index:a});else{let f=-1;for(;(f=n.data.indexOf(Sn,f+1))!==-1;)d.push({type:7,index:a}),f+=Sn.length-1}a++}}static createElement(o,t){let r=Bi.createElement("template");return r.innerHTML=o,r}};function Vi(i,o,t=i,r){if(o===ne)return o;let n=r!==void 0?t._$Co?.[r]:t._$Cl,a=Ds(o)?void 0:o._$litDirective$;return n?.constructor!==a&&(n?._$AO?.(!1),a===void 0?n=void 0:(n=new a(i),n._$AT(i,t,r)),r!==void 0?(t._$Co??(t._$Co=[]))[r]=n:t._$Cl=n),n!==void 0&&(o=Vi(i,n._$AS(i,o.values),n,r)),o}var mc=class{constructor(o,t){this._$AV=[],this._$AN=void 0,this._$AD=o,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(o){let{el:{content:t},parts:r}=this._$AD,n=(o?.creationScope??Bi).importNode(t,!0);Fi.currentNode=n;let a=Fi.nextNode(),s=0,l=0,d=r[0];for(;d!==void 0;){if(s===d.index){let h;d.type===2?h=new Sa(a,a.nextSibling,this,o):d.type===1?h=new d.ctor(a,d.name,d.strings,this,o):d.type===6&&(h=new vc(a,this,o)),this._$AV.push(h),d=r[++l]}s!==d?.index&&(a=Fi.nextNode(),s++)}return Fi.currentNode=Bi,n}p(o){let t=0;for(let r of this._$AV)r!==void 0&&(r.strings!==void 0?(r._$AI(o,r,t),t+=r.strings.length-2):r._$AI(o[t])),t++}},Sa=class i{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(o,t,r,n){this.type=2,this._$AH=G,this._$AN=void 0,this._$AA=o,this._$AB=t,this._$AM=r,this.options=n,this._$Cv=n?.isConnected??!0}get parentNode(){let o=this._$AA.parentNode,t=this._$AM;return t!==void 0&&o?.nodeType===11&&(o=t.parentNode),o}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(o,t=this){o=Vi(this,o,t),Ds(o)?o===G||o==null||o===""?(this._$AH!==G&&this._$AR(),this._$AH=G):o!==this._$AH&&o!==ne&&this._(o):o._$litType$!==void 0?this.$(o):o.nodeType!==void 0?this.T(o):kf(o)?this.k(o):this._(o)}O(o){return this._$AA.parentNode.insertBefore(o,this._$AB)}T(o){this._$AH!==o&&(this._$AR(),this._$AH=this.O(o))}_(o){this._$AH!==G&&Ds(this._$AH)?this._$AA.nextSibling.data=o:this.T(Bi.createTextNode(o)),this._$AH=o}$(o){let{values:t,_$litType$:r}=o,n=typeof r=="number"?this._$AC(o):(r.el===void 0&&(r.el=Rs.createElement(Ef(r.h,r.h[0]),this.options)),r);if(this._$AH?._$AD===n)this._$AH.p(t);else{let a=new mc(n,this),s=a.u(this.options);a.p(t),this.T(s),this._$AH=a}}_$AC(o){let t=_f.get(o.strings);return t===void 0&&_f.set(o.strings,t=new Rs(o)),t}k(o){Fp(this._$AH)||(this._$AH=[],this._$AR());let t=this._$AH,r,n=0;for(let a of o)n===t.length?t.push(r=new i(this.O(Ns()),this.O(Ns()),this,this.options)):r=t[n],r._$AI(a),n++;n<t.length&&(this._$AR(r&&r._$AB.nextSibling,n),t.length=n)}_$AR(o=this._$AA.nextSibling,t){for(this._$AP?.(!1,!0,t);o!==this._$AB;){let r=bf(o).nextSibling;bf(o).remove(),o=r}}setConnected(o){this._$AM===void 0&&(this._$Cv=o,this._$AP?.(o))}},Ui=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(o,t,r,n,a){this.type=1,this._$AH=G,this._$AN=void 0,this.element=o,this.name=t,this._$AM=n,this.options=a,r.length>2||r[0]!==""||r[1]!==""?(this._$AH=Array(r.length-1).fill(new String),this.strings=r):this._$AH=G}_$AI(o,t=this,r,n){let a=this.strings,s=!1;if(a===void 0)o=Vi(this,o,t,0),s=!Ds(o)||o!==this._$AH&&o!==ne,s&&(this._$AH=o);else{let l=o,d,h;for(o=a[0],d=0;d<a.length-1;d++)h=Vi(this,l[r+d],t,d),h===ne&&(h=this._$AH[d]),s||(s=!Ds(h)||h!==this._$AH[d]),h===G?o=G:o!==G&&(o+=(h??"")+a[d+1]),this._$AH[d]=h}s&&!n&&this.j(o)}j(o){o===G?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,o??"")}},fc=class extends Ui{constructor(){super(...arguments),this.type=3}j(o){this.element[this.name]=o===G?void 0:o}},gc=class extends Ui{constructor(){super(...arguments),this.type=4}j(o){this.element.toggleAttribute(this.name,!!o&&o!==G)}},bc=class extends Ui{constructor(o,t,r,n,a){super(o,t,r,n,a),this.type=5}_$AI(o,t=this){if((o=Vi(this,o,t,0)??G)===ne)return;let r=this._$AH,n=o===G&&r!==G||o.capture!==r.capture||o.once!==r.once||o.passive!==r.passive,a=o!==G&&(r===G||n);n&&this.element.removeEventListener(this.name,this,r),a&&this.element.addEventListener(this.name,this,o),this._$AH=o}handleEvent(o){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,o):this._$AH.handleEvent(o)}},vc=class{constructor(o,t,r){this.element=o,this.type=6,this._$AN=void 0,this._$AM=t,this.options=r}get _$AU(){return this._$AM._$AU}_$AI(o){Vi(this,o)}},Af={M:Pp,P:Sn,A:Hp,C:1,L:Tf,R:mc,D:kf,V:Vi,I:Sa,H:Ui,N:gc,U:bc,B:fc,F:vc},B1=Is.litHtmlPolyfillSupport;B1?.(Rs,Sa),(Is.litHtmlVersions??(Is.litHtmlVersions=[])).push("3.3.3");var Ca=(i,o,t)=>{let r=t?.renderBefore??o,n=r._$litPart$;if(n===void 0){let a=t?.renderBefore??null;r._$litPart$=n=new Sa(o.insertBefore(Ns(),a),a,void 0,t??{})}return n._$AI(i),n};var Je={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},ie=i=>(...o)=>({_$litDirective$:i,values:o}),je=class{constructor(o){}get _$AU(){return this._$AM._$AU}_$AT(o,t,r){this._$Ct=o,this._$AM=t,this._$Ci=r}_$AS(o,t){return this.update(o,t)}update(o,t){return this.render(...t)}};var N=ie(class extends je{constructor(i){if(super(i),i.type!==Je.ATTRIBUTE||i.name!=="class"||i.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(i){return" "+Object.keys(i).filter(o=>i[o]).join(" ")+" "}update(i,[o]){if(this.st===void 0){this.st=new Set,i.strings!==void 0&&(this.nt=new Set(i.strings.join(" ").split(/\s/).filter(r=>r!=="")));for(let r in o)o[r]&&!this.nt?.has(r)&&this.st.add(r);return this.render(o)}let t=i.element.classList;for(let r of this.st)r in o||(t.remove(r),this.st.delete(r));for(let r in o){let n=!!o[r];n===this.st.has(r)||this.nt?.has(r)||(n?(t.add(r),this.st.add(r)):(t.remove(r),this.st.delete(r)))}return ne}});var xc=globalThis,yc=xc.ShadowRoot&&(xc.ShadyCSS===void 0||xc.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Vp=Symbol(),$f=new WeakMap,Os=class{constructor(o,t,r){if(this._$cssResult$=!0,r!==Vp)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=o,this.t=t}get styleSheet(){let o=this.o,t=this.t;if(yc&&o===void 0){let r=t!==void 0&&t.length===1;r&&(o=$f.get(t)),o===void 0&&((this.o=o=new CSSStyleSheet).replaceSync(this.cssText),r&&$f.set(t,o))}return o}toString(){return this.cssText}},E=i=>new Os(typeof i=="string"?i:i+"",void 0,Vp),A=(i,...o)=>{let t=i.length===1?i[0]:o.reduce((r,n,a)=>r+(s=>{if(s._$cssResult$===!0)return s.cssText;if(typeof s=="number")return s;throw Error("Value passed to 'css' function must be a 'css' function result: "+s+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(n)+i[a+1],i[0]);return new Os(t,i,Vp)},Lf=(i,o)=>{if(yc)i.adoptedStyleSheets=o.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet);else for(let t of o){let r=document.createElement("style"),n=xc.litNonce;n!==void 0&&r.setAttribute("nonce",n),r.textContent=t.cssText,i.appendChild(r)}},Up=yc?i=>i:i=>i instanceof CSSStyleSheet?(o=>{let t="";for(let r of o.cssRules)t+=r.cssText;return E(t)})(i):i;var{is:V1,defineProperty:U1,getOwnPropertyDescriptor:j1,getOwnPropertyNames:G1,getOwnPropertySymbols:W1,getPrototypeOf:K1}=Object,Zn=globalThis,qf=Zn.trustedTypes,Y1=qf?qf.emptyScript:"",X1=Zn.reactiveElementPolyfillSupport,Ps=(i,o)=>i,ti={toAttribute(i,o){switch(o){case Boolean:i=i?Y1:null;break;case Object:case Array:i=i==null?i:JSON.stringify(i)}return i},fromAttribute(i,o){let t=i;switch(o){case Boolean:t=i!==null;break;case Number:t=i===null?null:Number(i);break;case Object:case Array:try{t=JSON.parse(i)}catch{t=null}}return t}},Ea=(i,o)=>!V1(i,o),Mf={attribute:!0,type:String,converter:ti,reflect:!1,useDefault:!1,hasChanged:Ea};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),Zn.litPropertyMetadata??(Zn.litPropertyMetadata=new WeakMap);var Cn=class extends HTMLElement{static addInitializer(o){this._$Ei(),(this.l??(this.l=[])).push(o)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(o,t=Mf){if(t.state&&(t.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(o)&&((t=Object.create(t)).wrapped=!0),this.elementProperties.set(o,t),!t.noAccessor){let r=Symbol(),n=this.getPropertyDescriptor(o,r,t);n!==void 0&&U1(this.prototype,o,n)}}static getPropertyDescriptor(o,t,r){let{get:n,set:a}=j1(this.prototype,o)??{get(){return this[t]},set(s){this[t]=s}};return{get:n,set(s){let l=n?.call(this);a?.call(this,s),this.requestUpdate(o,l,r)},configurable:!0,enumerable:!0}}static getPropertyOptions(o){return this.elementProperties.get(o)??Mf}static _$Ei(){if(this.hasOwnProperty(Ps("elementProperties")))return;let o=K1(this);o.finalize(),o.l!==void 0&&(this.l=[...o.l]),this.elementProperties=new Map(o.elementProperties)}static finalize(){if(this.hasOwnProperty(Ps("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(Ps("properties"))){let t=this.properties,r=[...G1(t),...W1(t)];for(let n of r)this.createProperty(n,t[n])}let o=this[Symbol.metadata];if(o!==null){let t=litPropertyMetadata.get(o);if(t!==void 0)for(let[r,n]of t)this.elementProperties.set(r,n)}this._$Eh=new Map;for(let[t,r]of this.elementProperties){let n=this._$Eu(t,r);n!==void 0&&this._$Eh.set(n,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(o){let t=[];if(Array.isArray(o)){let r=new Set(o.flat(1/0).reverse());for(let n of r)t.unshift(Up(n))}else o!==void 0&&t.push(Up(o));return t}static _$Eu(o,t){let r=t.attribute;return r===!1?void 0:typeof r=="string"?r:typeof o=="string"?o.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(o=>this.enableUpdating=o),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(o=>o(this))}addController(o){(this._$EO??(this._$EO=new Set)).add(o),this.renderRoot!==void 0&&this.isConnected&&o.hostConnected?.()}removeController(o){this._$EO?.delete(o)}_$E_(){let o=new Map,t=this.constructor.elementProperties;for(let r of t.keys())this.hasOwnProperty(r)&&(o.set(r,this[r]),delete this[r]);o.size>0&&(this._$Ep=o)}createRenderRoot(){let o=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return Lf(o,this.constructor.elementStyles),o}connectedCallback(){this.renderRoot??(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),this._$EO?.forEach(o=>o.hostConnected?.())}enableUpdating(o){}disconnectedCallback(){this._$EO?.forEach(o=>o.hostDisconnected?.())}attributeChangedCallback(o,t,r){this._$AK(o,r)}_$ET(o,t){let r=this.constructor.elementProperties.get(o),n=this.constructor._$Eu(o,r);if(n!==void 0&&r.reflect===!0){let a=(r.converter?.toAttribute!==void 0?r.converter:ti).toAttribute(t,r.type);this._$Em=o,a==null?this.removeAttribute(n):this.setAttribute(n,a),this._$Em=null}}_$AK(o,t){let r=this.constructor,n=r._$Eh.get(o);if(n!==void 0&&this._$Em!==n){let a=r.getPropertyOptions(n),s=typeof a.converter=="function"?{fromAttribute:a.converter}:a.converter?.fromAttribute!==void 0?a.converter:ti;this._$Em=n;let l=s.fromAttribute(t,a.type);this[n]=l??this._$Ej?.get(n)??l,this._$Em=null}}requestUpdate(o,t,r,n=!1,a){if(o!==void 0){let s=this.constructor;if(n===!1&&(a=this[o]),r??(r=s.getPropertyOptions(o)),!((r.hasChanged??Ea)(a,t)||r.useDefault&&r.reflect&&a===this._$Ej?.get(o)&&!this.hasAttribute(s._$Eu(o,r))))return;this.C(o,t,r)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(o,t,{useDefault:r,reflect:n,wrapped:a},s){r&&!(this._$Ej??(this._$Ej=new Map)).has(o)&&(this._$Ej.set(o,s??t??this[o]),a!==!0||s!==void 0)||(this._$AL.has(o)||(this.hasUpdated||r||(t=void 0),this._$AL.set(o,t)),n===!0&&this._$Em!==o&&(this._$Eq??(this._$Eq=new Set)).add(o))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}let o=this.scheduleUpdate();return o!=null&&await o,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??(this.renderRoot=this.createRenderRoot()),this._$Ep){for(let[n,a]of this._$Ep)this[n]=a;this._$Ep=void 0}let r=this.constructor.elementProperties;if(r.size>0)for(let[n,a]of r){let{wrapped:s}=a,l=this[n];s!==!0||this._$AL.has(n)||l===void 0||this.C(n,void 0,a,l)}}let o=!1,t=this._$AL;try{o=this.shouldUpdate(t),o?(this.willUpdate(t),this._$EO?.forEach(r=>r.hostUpdate?.()),this.update(t)):this._$EM()}catch(r){throw o=!1,this._$EM(),r}o&&this._$AE(t)}willUpdate(o){}_$AE(o){this._$EO?.forEach(t=>t.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(o)),this.updated(o)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(o){return!0}update(o){this._$Eq&&(this._$Eq=this._$Eq.forEach(t=>this._$ET(t,this[t]))),this._$EM()}updated(o){}firstUpdated(o){}};Cn.elementStyles=[],Cn.shadowRootOptions={mode:"open"},Cn[Ps("elementProperties")]=new Map,Cn[Ps("finalized")]=new Map,X1?.({ReactiveElement:Cn}),(Zn.reactiveElementVersions??(Zn.reactiveElementVersions=[])).push("2.1.2");var Hs=globalThis,ei=class extends Cn{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var t;let o=super.createRenderRoot();return(t=this.renderOptions).renderBefore??(t.renderBefore=o.firstChild),o}update(o){let t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(o),this._$Do=Ca(t,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return ne}};ei._$litElement$=!0,ei.finalized=!0,Hs.litElementHydrateSupport?.({LitElement:ei});var Q1=Hs.litElementPolyfillSupport;Q1?.({LitElement:ei});(Hs.litElementVersions??(Hs.litElementVersions=[])).push("4.2.2");var If=new WeakMap;function Nf(i){let o=If.get(i);return o||(o=window.getComputedStyle(i,null),If.set(i,o)),o}function J1(i){if(typeof i.checkVisibility=="function")return i.checkVisibility({checkOpacity:!1,checkVisibilityCSS:!0});let o=Nf(i);return o.visibility!=="hidden"&&o.display!=="none"}function Z1(i){let o=Nf(i),{overflowY:t,overflowX:r}=o;return t==="scroll"||r==="scroll"?!0:t!=="auto"||r!=="auto"?!1:i.scrollHeight>i.clientHeight&&t==="auto"||i.scrollWidth>i.clientWidth&&r==="auto"}function tk(i){let o=i.tagName.toLowerCase(),t=Number(i.getAttribute("tabindex"));return i.hasAttribute("tabindex")&&(isNaN(t)||t<=-1)||i.hasAttribute("disabled")||i.closest("[inert]")||o==="input"&&i.getAttribute("type")==="radio"&&!i.hasAttribute("checked")||!J1(i)?!1:(o==="audio"||o==="video")&&i.hasAttribute("controls")||i.hasAttribute("tabindex")||i.hasAttribute("contenteditable")&&i.getAttribute("contenteditable")!=="false"||["button","input","select","textarea","a","audio","video","summary","iframe"].includes(o)?!0:Z1(i)}function Df(i){let o=jp(i),t=o[0]??null,r=o[o.length-1]??null;return{start:t,end:r}}function ek(i,o){return i.getRootNode({composed:!0})?.host!==o}function jp(i){let o=new WeakMap,t=[];function r(n){if(n instanceof Element){if(n.hasAttribute("inert")||n.closest("[inert]")||o.has(n))return;o.set(n,!0),!t.includes(n)&&tk(n)&&t.push(n),n instanceof HTMLSlotElement&&ek(n,i)&&n.assignedElements({flatten:!0}).forEach(a=>{r(a)}),n.shadowRoot!==null&&n.shadowRoot.mode==="open"&&r(n.shadowRoot)}for(let a of n.children)r(a)}return r(i),t.sort((n,a)=>{let s=Number(n.getAttribute("tabindex"))||0;return(Number(a.getAttribute("tabindex"))||0)-s})}var Rf=new WeakMap,Gp=class{constructor(o){this.handleKeyDown=o=>{if(o.key==="Enter"){if(o.altKey||o.ctrlKey||o.metaKey||o.shiftKey||o.isComposing||o.defaultPrevented)return;let r=o.target;if(this.isSelectOption(r)){o.preventDefault(),setTimeout(()=>{let a=this.findParentSelect(r);a&&this.focusNextControl(a)},0);return}if(this.shouldSkipEnterKey(r))return;let n=this.findParentGroup(r);if(n){o.preventDefault(),this.focusNextInGroup(r,n)||this.focusNextControl(n);return}o.preventDefault(),this.areRequiredFieldsFilled()?this.submitForm():this.focusNextControl(r);return}if(o.key==="ArrowDown"){let t=o.target,r=t.tagName;if(!(o.altKey||o.ctrlKey||o.metaKey||o.shiftKey)&&!o.defaultPrevented){let a=this.findParentGroup(t);if(a){o.preventDefault(),this.focusNextInGroup(t,a)||this.focusNextControl(a);return}(r==="ZN-CHECKBOX"||r==="ZN-TOGGLE")&&(o.preventDefault(),this.focusNextControl(t))}}if(o.key==="ArrowUp"){let t=o.target,r=t.tagName;if(!(o.altKey||o.ctrlKey||o.metaKey||o.shiftKey)&&!o.defaultPrevented){let a=this.findParentGroup(t);if(a){o.preventDefault(),this.focusPreviousInGroup(t,a)||this.focusPreviousControl(a);return}(r==="ZN-CHECKBOX"||r==="ZN-TOGGLE")&&(o.preventDefault(),this.focusPreviousControl(t))}}};this.form=o,this.form.addEventListener("keydown",this.handleKeyDown,!0)}shouldSkipEnterKey(o){let t=o.tagName.toLowerCase();return t==="zn-textarea"||t==="textarea"||(t==="zn-input"||t==="input")&&o.getAttribute("type")==="search"?!0:t==="button"||t==="zn-button"}shouldExcludeFromNavigation(o){let t=o.tagName.toLowerCase();return t==="button"||t==="zn-button"}isSelectOption(o){return o.tagName.toLowerCase()==="zn-option"}findParentSelect(o){let t=o;for(;t;){if(t.tagName.toLowerCase()==="zn-select")return t;let r=t.getRootNode();if(r instanceof ShadowRoot)t=r.host;else if(t.parentElement)t=t.parentElement;else break}return null}findParentGroup(o){let t=o;for(;t;){let r=t.tagName;if(r==="ZN-RADIO-GROUP"||r==="ZN-CHECKBOX-GROUP")return t;let n=t.getRootNode();if(n instanceof ShadowRoot)t=n.host;else if(t.parentElement)t=t.parentElement;else break}return null}getGroupItems(o){let t=o.tagName==="ZN-RADIO-GROUP"?"ZN-RADIO":"ZN-CHECKBOX",r=[],n=document.createTreeWalker(o,NodeFilter.SHOW_ELEMENT,{acceptNode:s=>s.tagName===t?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}),a;for(;a=n.nextNode();)r.push(a);return r}focusNextInGroup(o,t){let r=this.getGroupItems(t);if(r.length===0)return!1;let n=-1;for(let a=0;a<r.length;a++)if(r[a]===o||r[a].contains(o)){n=a;break}if(n>=0&&n<r.length-1){let a=r[n+1];if(typeof a.focus=="function")return a.focus(),!0}return!1}focusPreviousInGroup(o,t){let r=this.getGroupItems(t);if(r.length===0)return!1;let n=-1;for(let a=0;a<r.length;a++)if(r[a]===o||r[a].contains(o)){n=a;break}if(n>0){let a=r[n-1];if(typeof a.focus=="function")return a.focus(),!0}return!1}areRequiredFieldsFilled(){let o=ji.get(this.form);if(!o)return!0;for(let t of o){let r=t;if(!r.name||r.disabled)continue;let n=r.value;if(!(n!=null&&n!=="")||typeof r.checkValidity=="function"&&!r.checkValidity())return!1}return!0}getNavigableControls(){let o=jp(this.form),t=[],r=new Set;for(let n of o){let a=n.tagName.toLowerCase();if(["zn-input","zn-select","zn-datepicker","zn-textarea","zn-file","zn-checkbox","zn-radio","zn-radio-group","zn-toggle"].includes(a)){if(a==="zn-radio"){let h=n.closest("zn-radio-group");if(h){r.has(h)||(r.add(h),this.shouldExcludeFromNavigation(h)||t.push(h));continue}}if(r.has(n)||(r.add(n),this.shouldExcludeFromNavigation(n)))continue;t.push(n);continue}let l=n.getRootNode().host;if(l&&l!==this.form){let h=l.tagName.toLowerCase();if(["zn-input","zn-select","zn-datepicker","zn-textarea","zn-file","zn-checkbox","zn-radio","zn-radio-group","zn-toggle"].includes(h)){if(h==="zn-radio"){let f=l.closest("zn-radio-group");if(f){r.has(f)||(r.add(f),this.shouldExcludeFromNavigation(f)||t.push(f));continue}}if(r.has(l)||(r.add(l),this.shouldExcludeFromNavigation(l)))continue;t.push(l);continue}}if(["input","select"].includes(a)){if(r.has(n)||(r.add(n),n.getAttribute("type")==="search"))continue;t.push(n)}}return t}findCurrentControlIndex(o,t){for(let r=0;r<t.length;r++){let n=t[r];if(n===o)return r;let a=o.getRootNode();if(a instanceof ShadowRoot&&a.host===n||n.contains(o)||o.contains(n))return r}return-1}focusNextControl(o){let t=this.getNavigableControls(),r=this.findCurrentControlIndex(o,t);if(r>=0&&r<t.length-1){let n=t[r+1];if(typeof n.focus=="function"&&(n.focus(),n.tagName.toLowerCase()==="zn-select")){let s=n;typeof s.show=="function"&&setTimeout(()=>{s.show?.()},0)}}}focusPreviousControl(o){let t=this.getNavigableControls(),r=this.findCurrentControlIndex(o,t);if(r>0){let n=t[r-1];if(typeof n.focus=="function"&&(n.focus(),n.tagName.toLowerCase()==="zn-select")){let s=n;typeof s.show=="function"&&setTimeout(()=>{s.show?.()},0)}}}submitForm(){let o=this.form.querySelector('[type="submit"]');if(o)o.click();else if(typeof this.form.requestSubmit=="function")this.form.requestSubmit();else{let t=new Event("submit",{bubbles:!0,cancelable:!0});this.form.dispatchEvent(t)}}destroy(){this.form.removeEventListener("keydown",this.handleKeyDown,!0)}};function Of(i){let o=Rf.get(i);return o||(o=new Gp(i),Rf.set(i,o)),o}var sr=class{constructor(o,t,r=0){this.storage=o,this.prefix=t,this.ttl=r*1e3,this.cleanup()}get(o){return!o||o.length<1?null:this.stripTtl(this.storage.getItem(this.prefix+o))}stripTtl(o){if(o===null)return null;let t=o.split(",");if(t.length===1)return t[0];let r=t.shift(),n=r?parseInt(r):0;return n>0&&n<Date.now()?null:t.join(",")||""}setWithTTL(o,t,r){!o||o.length<1||(r=r>0?Date.now()+r*1e3:0,this.storage.setItem(this.prefix+o,r+","+t))}set(o,t){this.setWithTTL(o,t,this.ttl)}remove(o){this.storage.removeItem(this.prefix+o)}cleanup(){for(let o=0;o<this.storage.length;o++){let t=this.storage.key(o);t!==null&&t.startsWith(this.prefix)&&this.stripTtl(this.storage.getItem(t))===null&&this.storage.removeItem(t)}}};var ji=new WeakMap,Fs=new WeakMap,Bs=new WeakMap,zc=new WeakMap,Wp=new WeakSet,wc=new WeakMap,Vf="znform:";function Kp(i=!1){try{return i?window.localStorage:window.sessionStorage}catch{return null}}function rk(i=!1,o=0){let t=Kp(i);return t?new sr(t,Vf,o):null}function Pf(i){let o=i?.getAttribute("store-ttl");return o&&Number(o)||0}function Hf(i){return!!i?.hasAttribute("local-storage")}function Uf(i){return i?.getAttribute("store-key")||""}function ok(i){return i.getAttribute("store-key")||""}function nk(i){return i.getAttribute("name")||("name"in i&&typeof i.name=="string"?i.name:"")}function jf(i,o){let t=ok(i),r=Uf(o);if(t)return r?`${r}:${t}`:t;let n=nk(i);return r&&n?`${r}:${n}`:""}function Gf(i,o){let t=Hf(i)||Hf(o),r=Pf(i)||Pf(o);return rk(t,r)}function Wf(i,o){let t=jf(i,o),n=(t?Gf(i,o):null)?.get(t);if(!n)return null;try{return JSON.parse(n)}catch{return{value:n}}}function Kf(i,o,t){let r=jf(i,o),n=r?Gf(i,o):null;n&&n.set(r,JSON.stringify(t))}function ik(i){return i instanceof HTMLInputElement||i instanceof HTMLTextAreaElement||i instanceof HTMLSelectElement}function ak(i){return i instanceof HTMLInputElement&&(i.type==="checkbox"||i.type==="radio")?{checked:i.checked,value:i.value}:{value:i.value}}function sk(i){i.querySelectorAll("input, textarea, select").forEach(t=>{let r=Wf(t,i);if(r){if(t instanceof HTMLInputElement&&(t.type==="checkbox"||t.type==="radio")){typeof r.checked=="boolean"&&(t.checked=r.checked);return}"value"in r&&(t.value=String(r.value??""))}})}function Ff(i,o){!ik(i)||i.form!==o||Kf(i,o,ak(i))}function lk(i,o){let t={value:o};return"checked"in i&&typeof i.checked=="boolean"&&(t.checked=i.checked),"indeterminate"in i&&typeof i.indeterminate=="boolean"&&(t.indeterminate=i.indeterminate),t}function Bf(i,o){let t=[],r=Vf+o;for(let n=0;n<i.length;n++){let a=i.key(n);(a===r||a?.startsWith(r+":"))&&t.push(a)}t.forEach(n=>i.removeItem(n))}function ck(i){let o=typeof i=="string"?i:Uf(i);if(!o)return;let t=Kp(!0),r=Kp(!1);t&&Bf(t,o),r&&r!==t&&Bf(r,o)}var ot=class{constructor(o,t){this.handleFormData=o=>{let t=this.options.disabled(this.host),r=this.options.name(this.host),n=this.options.value(this.host),a=this.host.tagName.toLowerCase()==="zn-button";if(this.host.isConnected&&!t&&!a&&r.length>0&&typeof n<"u"){let s=m=>{o.formData.append(r,m.toString())},l=(m,f)=>{let b=m,g=f??(typeof b.name=="string"?b.name:void 0);typeof g=="string"?o.formData.append(r,m,g):o.formData.append(r,m)},d=m=>typeof FileList<"u"&&m instanceof FileList,h=m=>typeof Blob<"u"&&m instanceof Blob;if(d(n)){if(n.length>0)for(let m=0;m<n.length;m++){let f=n.item(m);f&&l(f,f.name)}}else h(n)?l(n,n.name):Array.isArray(n)?n.forEach(m=>{if(h(m))l(m,m.name);else if(d(m)){let f=m;for(let b=0;b<f.length;b++){let g=f.item(b);g&&l(g,g.name)}}else s(m)}):s(n);this.host.dispatchEvent(new CustomEvent("zn-formdata",{bubbles:!0,composed:!0}))}};this.handleFormSubmit=o=>{let t=this.options.disabled(this.host),r=this.options.reportValidity;this.form&&!this.form.noValidate&&ji.get(this.form)?.forEach(s=>{this.setUserInteracted(s,!0)});let n=this.form?.querySelector('[type="submit"]'),a=n?.innerHTML??"Submit";n&&(n.setAttribute("data-original-text",a),setTimeout(()=>{n.disabled=!0,n.innerHTML=this.form?.hasAttribute("data-no-loading-text")?a:this.form?.getAttribute("data-loading-text")||"Processing..."},20),setTimeout(()=>{n.disabled=!1,n.innerHTML=a},15e3)),this.form&&!this.form.noValidate&&!t&&!r(this.host)&&(o.preventDefault(),o.stopImmediatePropagation(),n&&(n.disabled=!1,n.innerHTML=a))};this.enableSubmit=o=>{if(o.target!==this.form)return;let r=this.form?.querySelector('[type="submit"]');if(r){let n=r.getAttribute("data-original-text")??r.innerHTML;r.disabled=!1,r.innerHTML=n}};this.handleFormReset=()=>{this.options.setValue(this.host,this.options.defaultValue(this.host)),this.setUserInteracted(this.host,!1),wc.set(this.host,[])};this.handleInteraction=o=>{let t=wc.get(this.host);t.includes(o.type)||t.push(o.type),t.length===this.options.assumeInteractionOn.length&&this.setUserInteracted(this.host,!0),this.persistHostValue(),this.checkFormValidity()};this.checkFormValidity=()=>{let o=this.form?.querySelector('[type="submit"]');if(this.form&&!this.form.noValidate){let t=this.form.querySelectorAll("*");for(let r of t)if(typeof r.checkValidity=="function"&&!r.checkValidity())return o?.setAttribute("disabled","disabled"),!1}return o?.removeAttribute("disabled"),!0};this.reportFormValidity=()=>{if(this.form&&!this.form.noValidate){let o=this.form.querySelectorAll("*");for(let t of o)if(typeof t.reportValidity=="function"&&!t.reportValidity())return!1}return!0};(this.host=o).addController(this),this.options={form:r=>{let n=r.form;if(n){let s=r.getRootNode().querySelector(`#${n}`);if(s)return s}return r.closest("form")},name:r=>r.name,value:r=>r.value,defaultValue:r=>r.defaultValue,disabled:r=>r.disabled??!1,reportValidity:r=>typeof r.reportValidity=="function"?r.reportValidity():!0,checkValidity:r=>typeof r.checkValidity=="function"?r.checkValidity():!0,setValue:(r,n)=>r.value=n,assumeInteractionOn:["zn-input"],...t}}async hostConnected(){let o=this.options.form(this.host);o&&this.attachForm(o),wc.set(this.host,[]),this.options.assumeInteractionOn.forEach(t=>{this.host.addEventListener(t,this.handleInteraction)}),await this.host.updateComplete,this.restorePersistedValue(),o&&this.checkFormValidity()}hostDisconnected(){this.detachForm(),wc.delete(this.host),this.options.assumeInteractionOn.forEach(o=>{this.host.removeEventListener(o,this.handleInteraction)})}hostUpdated(){let o=this.options.form(this.host);o||this.detachForm(),o&&this.form!==o&&(this.detachForm(),this.attachForm(o)),this.host.hasUpdated&&this.setValidity(this.host.validity?.valid)}attachForm(o){if(!o){this.form=void 0;return}this.form=o,ji.has(this.form)?ji.get(this.form).add(this.host):ji.set(this.form,new Set([this.host])),this.form.hasAttribute("data-enter-navigation")&&Of(this.form),this.form.addEventListener("formdata",this.handleFormData),this.form.addEventListener("submit",this.handleFormSubmit),this.form.addEventListener("reset",this.handleFormReset),this.form.addEventListener("complete",this.enableSubmit),this.form.addEventListener("cancelled",this.enableSubmit),this.form.addEventListener("error",this.enableSubmit),this.attachFormPersistence(this.form),Fs.has(this.form)||(Fs.set(this.form,this.form.reportValidity),this.form.reportValidity=()=>this.reportFormValidity()),Bs.has(this.form)||(Bs.set(this.form,this.form.checkValidity),this.form.checkValidity=()=>this.checkFormValidity())}detachForm(){if(!this.form)return;let o=ji.get(this.form);o&&(o.delete(this.host),o.size<=0&&(this.form.removeEventListener("formdata",this.handleFormData),this.form.removeEventListener("submit",this.handleFormSubmit),this.form.removeEventListener("reset",this.handleFormReset),this.form.removeEventListener("complete",this.enableSubmit),this.form.removeEventListener("cancelled",this.enableSubmit),this.form.removeEventListener("error",this.enableSubmit),this.detachFormPersistence(this.form),Fs.has(this.form)&&(this.form.reportValidity=Fs.get(this.form),Fs.delete(this.form)),Bs.has(this.form)&&(this.form.checkValidity=Bs.get(this.form),Bs.delete(this.form)),this.form=void 0))}attachFormPersistence(o){if(zc.has(o))return;let t=n=>Ff(n.target,o),r=n=>Ff(n.target,o);o.addEventListener("input",t),o.addEventListener("change",r),zc.set(o,{handleInput:t,handleChange:r}),sk(o)}detachFormPersistence(o){let t=zc.get(o);t&&(o.removeEventListener("input",t.handleInput),o.removeEventListener("change",t.handleChange),zc.delete(o))}restorePersistedValue(){let o=Wf(this.host,this.form);o&&("checked"in this.host&&typeof o.checked=="boolean"?this.options.setValue(this.host,o.checked):"value"in o&&this.options.setValue(this.host,o.value),"indeterminate"in this.host&&typeof o.indeterminate=="boolean"&&(this.host.indeterminate=o.indeterminate))}persistHostValue(){Kf(this.host,this.form,lk(this.host,this.options.value(this.host)))}setUserInteracted(o,t){t?Wp.add(o):Wp.delete(o),o.requestUpdate()}doAction(o,t){if(this.form){let r=document.createElement("button");r.type=o,r.style.position="absolute",r.style.width="0",r.style.height="0",r.style.clipPath="inset(50%)",r.style.overflow="hidden",r.style.whiteSpace="nowrap",t&&(r.name=t.name,r.value=t.value,["formaction","formenctype","formmethod","formnovalidate","formtarget"].forEach(n=>{t.hasAttribute(n)&&r.setAttribute(n,t.getAttribute(n))})),this.form.append(r),this.form instanceof HTMLFormElement&&document.dispatchEvent(new CustomEvent("zn-register-element",{detail:{element:this.form}})),r.click(),r.remove()}}getForm(){return this.form??null}reset(o){this.doAction("reset",o)}submit(o){this.doAction("submit",o)}setValidity(o){let t=this.host,r=!!Wp.has(t),n=!!t.required;t.toggleAttribute("data-required",n),t.toggleAttribute("data-optional",!n),t.toggleAttribute("data-invalid",!o),t.toggleAttribute("data-valid",o),t.toggleAttribute("data-user-invalid",!o&&r),t.toggleAttribute("data-user-valid",o&&r)}updateValidity(){let o=this.host;this.setValidity(o.validity?.valid)}emitInvalidEvent(o){let t=new CustomEvent("zn-invalid",{bubbles:!1,composed:!1,cancelable:!0,detail:{}});o||t.preventDefault(),this.host.dispatchEvent(t)||o?.preventDefault()}},Se=Object.freeze({badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:!0,valueMissing:!1}),_c=Object.freeze({...Se,customError:!0,valid:!1}),kc=Object.freeze({...Se,valueMissing:!0,valid:!1});var J=class{constructor(o,...t){this.slotNames=[];this.handleSlotChange=o=>{let t=o.target;(this.slotNames.includes("[default]")&&!t.name||t.name&&this.slotNames.includes(t.name))&&this.host.requestUpdate()};(this.host=o).addController(this),this.slotNames=t}hasDefaultSlot(){return[...this.host.childNodes].some(o=>{if(o.nodeType===o.TEXT_NODE&&o.textContent.trim()!=="")return!0;if(o.nodeType===o.ELEMENT_NODE){let t=o;if(t.tagName.toLowerCase()==="zn-visually-hidden")return!1;if(!t.hasAttribute("slot"))return!0}return!1})}hasNamedSlot(o){return this.host.querySelector(`:scope > [slot="${o}"]`)!==null}test(o){return o==="[default]"?this.hasDefaultSlot():this.hasNamedSlot(o)}hostConnected(){this.host.shadowRoot.addEventListener("slotchange",this.handleSlotChange)}hostDisconnected(){this.host.shadowRoot.removeEventListener("slotchange",this.handleSlotChange)}getSlot(o){return this.host.querySelector(`:scope > [slot="${o}"]`)}getDefaultSlot(){return[...this.host.childNodes].filter(o=>{if(o.nodeType===o.TEXT_NODE&&o.textContent.trim()!=="")return!0;if(o.nodeType===o.ELEMENT_NODE){let t=o;if(t.tagName.toLowerCase()==="zn-visually-hidden")return!1;if(!t.hasAttribute("slot"))return!0}return!1})}getSlots(o){return this.host.querySelectorAll(`:scope > [slot="${o}"]`)}};function Yf(i){if(!i)return"";let o=i.assignedNodes({flatten:!0}),t="";return[...o].forEach(r=>{r.nodeType===Node.TEXT_NODE&&(t+=r.textContent)}),t}var Qf=Symbol.for(""),dk=i=>{if(i?.r===Qf)return i?._$litStatic$};var En=(i,...o)=>({_$litStatic$:o.reduce((t,r,n)=>t+(a=>{if(a._$litStatic$!==void 0)return a._$litStatic$;throw Error(`Value passed to 'literal' function must be a 'literal' result: ${a}. Use 'unsafeStatic' to pass non-literal values, but
5
- take care to ensure page security.`)})(r)+i[n+1],i[0]),r:Qf}),Xf=new Map,Yp=i=>(o,...t)=>{let r=t.length,n,a,s=[],l=[],d,h=0,m=!1;for(;h<r;){for(d=o[h];h<r&&(a=t[h],(n=dk(a))!==void 0);)d+=n+o[++h],m=!0;h!==r&&l.push(a),s.push(d),h++}if(h===r&&s.push(o[r]),m){let f=s.join("$$lit$$");(o=Xf.get(f))===void 0&&(s.raw=s,Xf.set(f,o=s)),t=l}return i(o,...t)},ue=Yp(u),WI=Yp(qo),KI=Yp(Cf);var P=i=>i??G;var Jf=i=>(o,t)=>{t!==void 0?t.addInitializer(()=>{customElements.define(i,o)}):customElements.define(i,o)};var pk={attribute:!0,type:String,converter:ti,reflect:!1,hasChanged:Ea},hk=(i=pk,o,t)=>{let{kind:r,metadata:n}=t,a=globalThis.litPropertyMetadata.get(n);if(a===void 0&&globalThis.litPropertyMetadata.set(n,a=new Map),r==="setter"&&((i=Object.create(i)).wrapped=!0),a.set(t.name,i),r==="accessor"){let{name:s}=t;return{set(l){let d=o.get.call(this);o.set.call(this,l),this.requestUpdate(s,d,i,!0,l)},init(l){return l!==void 0&&this.C(s,void 0,i,l),l}}}if(r==="setter"){let{name:s}=t;return function(l){let d=this[s];o.call(this,l),this.requestUpdate(s,d,i,!0,l)}}throw Error("Unsupported decorator location: "+r)};function p(i){return(o,t)=>typeof t=="object"?hk(i,o,t):((r,n,a)=>{let s=n.hasOwnProperty(a);return n.constructor.createProperty(a,r),s?Object.getOwnPropertyDescriptor(n,a):void 0})(i,o,t)}function H(i){return p({...i,state:!0,attribute:!1})}function Zf(i){return(o,t)=>{let r=typeof o=="function"?o:o[t];Object.assign(r,i)}}var tn=(i,o,t)=>(t.configurable=!0,t.enumerable=!0,Reflect.decorate&&typeof o!="object"&&Object.defineProperty(i,o,t),t);function F(i,o){return(t,r,n)=>{let a=s=>s.renderRoot?.querySelector(i)??null;if(o){let{get:s,set:l}=typeof r=="object"?t:n??(()=>{let d=Symbol();return{get(){return this[d]},set(h){this[d]=h}}})();return tn(t,r,{get(){let d=s.call(this);return d===void 0&&(d=a(this),(d!==null||this.hasUpdated)&&l.call(this,d)),d}})}return tn(t,r,{get(){return a(this)}})}}var uk;function Sc(i){return(o,t)=>tn(o,t,{get(){return(this.renderRoot??uk??(uk=document.createDocumentFragment())).querySelectorAll(i)}})}function tg(i){return(o,t)=>tn(o,t,{async get(){return await this.updateComplete,this.renderRoot?.querySelector(i)??null}})}function eg(i){return(o,t)=>{let{slot:r}=i??{},n="slot"+(r?`[name=${r}]`:":not([name])");return tn(o,t,{get(){return this.renderRoot?.querySelector(n)?.assignedNodes(i)??[]}})}}var rg="important",mk=" !"+rg,Mo=ie(class extends je{constructor(i){if(super(i),i.type!==Je.ATTRIBUTE||i.name!=="style"||i.strings?.length>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(i){return Object.keys(i).reduce((o,t)=>{let r=i[t];return r==null?o:o+`${t=t.includes("-")?t:t.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${r};`},"")}update(i,[o]){let{style:t}=i.element;if(this.ft===void 0)return this.ft=new Set(Object.keys(o)),this.render(o);for(let r of this.ft)o[r]==null&&(this.ft.delete(r),r.includes("-")?t.removeProperty(r):t[r]=null);for(let r in o){let n=o[r];if(n!=null){this.ft.add(r);let a=typeof n=="string"&&n.endsWith(mk);r.includes("-")||a?t.setProperty(r,a?n.slice(0,-11):n,a?rg:""):t[r]=n}}return ne}});function K(i,o){let t={waitUntilFirstUpdate:!1,...o};return(r,n)=>{let{update:a}=r,s=Array.isArray(i)?i:[i];r.update=function(l){s.forEach(d=>{let h=d;if(l.has(h)){let m=l.get(h),f=this[h];m!==f&&(!t.waitUntilFirstUpdate||this.hasUpdated)&&this[n](m,f)}}),a.call(this,l)}}}var fk=Object.defineProperty,gk=(i,o,t)=>o in i?fk(i,o,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[o]=t,Xp=(i,o,t)=>(gk(i,typeof o!="symbol"?o+"":o,t),t),bk=(i,o,t)=>{if(!o.has(i))throw TypeError("Cannot "+t)},Qp=(i,o)=>{if(Object(o)!==o)throw TypeError('Cannot use the "in" operator on this value');return i.has(o)},Cc=(i,o,t)=>{if(o.has(i))throw TypeError("Cannot add the same private member more than once");o instanceof WeakSet?o.add(i):o.set(i,t)},og=(i,o,t)=>(bk(i,o,"access private method"),t);function ng(i,o){return Object.is(i,o)}var Ce=null,Vs=!1,Ec=1,Tc=Symbol("SIGNAL");function Ta(i){let o=Ce;return Ce=i,o}function vk(){return Ce}function xk(){return Vs}var rh={version:0,lastCleanEpoch:0,dirty:!1,producerNode:void 0,producerLastReadVersion:void 0,producerIndexOfThis:void 0,nextProducerIndex:0,liveConsumerNode:void 0,liveConsumerIndexOfThis:void 0,consumerAllowSignalWrites:!1,consumerIsAlwaysLive:!1,producerMustRecompute:()=>!1,producerRecomputeValue:()=>{},consumerMarkedDirty:()=>{},consumerOnSignalRead:()=>{}};function Ac(i){if(Vs)throw new Error(typeof ngDevMode<"u"&&ngDevMode?"Assertion error: signal read during notification phase":"");if(Ce===null)return;Ce.consumerOnSignalRead(i);let o=Ce.nextProducerIndex++;if(Aa(Ce),o<Ce.producerNode.length&&Ce.producerNode[o]!==i&&th(Ce)){let t=Ce.producerNode[o];$c(t,Ce.producerIndexOfThis[o])}Ce.producerNode[o]!==i&&(Ce.producerNode[o]=i,Ce.producerIndexOfThis[o]=th(Ce)?sg(i,Ce,o):0),Ce.producerLastReadVersion[o]=i.version}function yk(){Ec++}function ig(i){if(!(!i.dirty&&i.lastCleanEpoch===Ec)){if(!i.producerMustRecompute(i)&&!Sk(i)){i.dirty=!1,i.lastCleanEpoch=Ec;return}i.producerRecomputeValue(i),i.dirty=!1,i.lastCleanEpoch=Ec}}function ag(i){if(i.liveConsumerNode===void 0)return;let o=Vs;Vs=!0;try{for(let t of i.liveConsumerNode)t.dirty||wk(t)}finally{Vs=o}}function zk(){return Ce?.consumerAllowSignalWrites!==!1}function wk(i){var o;i.dirty=!0,ag(i),(o=i.consumerMarkedDirty)==null||o.call(i.wrapper??i)}function _k(i){return i&&(i.nextProducerIndex=0),Ta(i)}function kk(i,o){if(Ta(o),!(!i||i.producerNode===void 0||i.producerIndexOfThis===void 0||i.producerLastReadVersion===void 0)){if(th(i))for(let t=i.nextProducerIndex;t<i.producerNode.length;t++)$c(i.producerNode[t],i.producerIndexOfThis[t]);for(;i.producerNode.length>i.nextProducerIndex;)i.producerNode.pop(),i.producerLastReadVersion.pop(),i.producerIndexOfThis.pop()}}function Sk(i){Aa(i);for(let o=0;o<i.producerNode.length;o++){let t=i.producerNode[o],r=i.producerLastReadVersion[o];if(r!==t.version||(ig(t),r!==t.version))return!0}return!1}function sg(i,o,t){var r;if(oh(i),Aa(i),i.liveConsumerNode.length===0){(r=i.watched)==null||r.call(i.wrapper);for(let n=0;n<i.producerNode.length;n++)i.producerIndexOfThis[n]=sg(i.producerNode[n],i,n)}return i.liveConsumerIndexOfThis.push(t),i.liveConsumerNode.push(o)-1}function $c(i,o){var t;if(oh(i),Aa(i),typeof ngDevMode<"u"&&ngDevMode&&o>=i.liveConsumerNode.length)throw new Error(`Assertion error: active consumer index ${o} is out of bounds of ${i.liveConsumerNode.length} consumers)`);if(i.liveConsumerNode.length===1){(t=i.unwatched)==null||t.call(i.wrapper);for(let n=0;n<i.producerNode.length;n++)$c(i.producerNode[n],i.producerIndexOfThis[n])}let r=i.liveConsumerNode.length-1;if(i.liveConsumerNode[o]=i.liveConsumerNode[r],i.liveConsumerIndexOfThis[o]=i.liveConsumerIndexOfThis[r],i.liveConsumerNode.length--,i.liveConsumerIndexOfThis.length--,o<i.liveConsumerNode.length){let n=i.liveConsumerIndexOfThis[o],a=i.liveConsumerNode[o];Aa(a),a.producerIndexOfThis[n]=o}}function th(i){var o;return i.consumerIsAlwaysLive||(((o=i?.liveConsumerNode)==null?void 0:o.length)??0)>0}function Aa(i){i.producerNode??(i.producerNode=[]),i.producerIndexOfThis??(i.producerIndexOfThis=[]),i.producerLastReadVersion??(i.producerLastReadVersion=[])}function oh(i){i.liveConsumerNode??(i.liveConsumerNode=[]),i.liveConsumerIndexOfThis??(i.liveConsumerIndexOfThis=[])}function lg(i){if(ig(i),Ac(i),i.value===eh)throw i.error;return i.value}function Ck(i){let o=Object.create(Ek);o.computation=i;let t=()=>lg(o);return t[Tc]=o,t}var Jp=Symbol("UNSET"),Zp=Symbol("COMPUTING"),eh=Symbol("ERRORED"),Ek={...rh,value:Jp,dirty:!0,error:null,equal:ng,producerMustRecompute(i){return i.value===Jp||i.value===Zp},producerRecomputeValue(i){if(i.value===Zp)throw new Error("Detected cycle in computations.");let o=i.value;i.value=Zp;let t=_k(i),r,n=!1;try{r=i.computation.call(i.wrapper),n=o!==Jp&&o!==eh&&i.equal.call(i.wrapper,o,r)}catch(a){r=eh,i.error=a}finally{kk(i,t)}if(n){i.value=o;return}i.value=r,i.version++}};function Tk(){throw new Error}var Ak=Tk;function $k(){Ak()}function Lk(i){let o=Object.create(Ik);o.value=i;let t=()=>(Ac(o),o.value);return t[Tc]=o,t}function qk(){return Ac(this),this.value}function Mk(i,o){zk()||$k(),i.equal.call(i.wrapper,i.value,o)||(i.value=o,Nk(i))}var Ik={...rh,equal:ng,value:void 0};function Nk(i){i.version++,yk(),ag(i)}var Ze=Symbol("node"),Gt;(i=>{var o,t,r,n,a,s;class l{constructor(m,f={}){Cc(this,t),Xp(this,o);let g=Lk(m)[Tc];if(this[Ze]=g,g.wrapper=this,f){let v=f.equals;v&&(g.equal=v),g.watched=f[i.subtle.watched],g.unwatched=f[i.subtle.unwatched]}}get(){if(!(0,i.isState)(this))throw new TypeError("Wrong receiver type for Signal.State.prototype.get");return qk.call(this[Ze])}set(m){if(!(0,i.isState)(this))throw new TypeError("Wrong receiver type for Signal.State.prototype.set");if(xk())throw new Error("Writes to signals not permitted during Watcher callback");let f=this[Ze];Mk(f,m)}}o=Ze,t=new WeakSet,r=function(){},i.isState=h=>typeof h=="object"&&Qp(t,h),i.State=l;class d{constructor(m,f){Cc(this,a),Xp(this,n);let g=Ck(m)[Tc];if(g.consumerAllowSignalWrites=!0,this[Ze]=g,g.wrapper=this,f){let v=f.equals;v&&(g.equal=v),g.watched=f[i.subtle.watched],g.unwatched=f[i.subtle.unwatched]}}get(){if(!(0,i.isComputed)(this))throw new TypeError("Wrong receiver type for Signal.Computed.prototype.get");return lg(this[Ze])}}n=Ze,a=new WeakSet,s=function(){},i.isComputed=h=>typeof h=="object"&&Qp(a,h),i.Computed=d,(h=>{var m,f,b,g,v;function x(T){let L,W=null;try{W=Ta(null),L=T()}finally{Ta(W)}return L}h.untrack=x;function k(T){var L;if(!(0,i.isComputed)(T)&&!(0,i.isWatcher)(T))throw new TypeError("Called introspectSources without a Computed or Watcher argument");return((L=T[Ze].producerNode)==null?void 0:L.map(W=>W.wrapper))??[]}h.introspectSources=k;function _(T){var L;if(!(0,i.isComputed)(T)&&!(0,i.isState)(T))throw new TypeError("Called introspectSinks without a Signal argument");return((L=T[Ze].liveConsumerNode)==null?void 0:L.map(W=>W.wrapper))??[]}h.introspectSinks=_;function O(T){if(!(0,i.isComputed)(T)&&!(0,i.isState)(T))throw new TypeError("Called hasSinks without a Signal argument");let L=T[Ze].liveConsumerNode;return L?L.length>0:!1}h.hasSinks=O;function j(T){if(!(0,i.isComputed)(T)&&!(0,i.isWatcher)(T))throw new TypeError("Called hasSources without a Computed or Watcher argument");let L=T[Ze].producerNode;return L?L.length>0:!1}h.hasSources=j;class I{constructor(L){Cc(this,f),Cc(this,g),Xp(this,m);let W=Object.create(rh);W.wrapper=this,W.consumerMarkedDirty=L,W.consumerIsAlwaysLive=!0,W.consumerAllowSignalWrites=!1,W.producerNode=[],this[Ze]=W}watch(...L){if(!(0,i.isWatcher)(this))throw new TypeError("Called unwatch without Watcher receiver");og(this,g,v).call(this,L);let W=this[Ze];W.dirty=!1;let tt=Ta(W);for(let ut of L)Ac(ut[Ze]);Ta(tt)}unwatch(...L){if(!(0,i.isWatcher)(this))throw new TypeError("Called unwatch without Watcher receiver");og(this,g,v).call(this,L);let W=this[Ze];Aa(W);for(let tt=W.producerNode.length-1;tt>=0;tt--)if(L.includes(W.producerNode[tt].wrapper)){$c(W.producerNode[tt],W.producerIndexOfThis[tt]);let ut=W.producerNode.length-1;if(W.producerNode[tt]=W.producerNode[ut],W.producerIndexOfThis[tt]=W.producerIndexOfThis[ut],W.producerNode.length--,W.producerIndexOfThis.length--,W.nextProducerIndex--,tt<W.producerNode.length){let pt=W.producerIndexOfThis[tt],gt=W.producerNode[tt];oh(gt),gt.liveConsumerIndexOfThis[pt]=tt}}}getPending(){if(!(0,i.isWatcher)(this))throw new TypeError("Called getPending without Watcher receiver");return this[Ze].producerNode.filter(W=>W.dirty).map(W=>W.wrapper)}}m=Ze,f=new WeakSet,b=function(){},g=new WeakSet,v=function(T){for(let L of T)if(!(0,i.isComputed)(L)&&!(0,i.isState)(L))throw new TypeError("Called watch/unwatch without a Computed or State argument")},i.isWatcher=T=>Qp(f,T),h.Watcher=I;function w(){var T;return(T=vk())==null?void 0:T.wrapper}h.currentComputed=w,h.watched=Symbol("watched"),h.unwatched=Symbol("unwatched")})(i.subtle||(i.subtle={}))})(Gt||(Gt={}));var nh=!1,cg=new Gt.subtle.Watcher(()=>{nh||(nh=!0,queueMicrotask(()=>{nh=!1;for(let i of cg.getPending())i.get();cg.watch()}))}),Dk=Symbol("SignalWatcherBrand"),Rk=new FinalizationRegistry(i=>{i.unwatch(...Gt.subtle.introspectSources(i))}),dg=new WeakMap;function Lc(i){return i[Dk]===!0?(console.warn("SignalWatcher should not be applied to the same class more than once."),i):class extends i{constructor(){super(...arguments),this._$St=new Map,this._$So=new Gt.State(0),this._$Si=!1}_$Sl(){var o,t;let r=[],n=[];this._$St.forEach((s,l)=>{(s?.beforeUpdate?r:n).push(l)});let a=(o=this.h)===null||o===void 0?void 0:o.getPending().filter(s=>s!==this._$Su&&!this._$St.has(s));r.forEach(s=>s.get()),(t=this._$Su)===null||t===void 0||t.get(),a.forEach(s=>s.get()),n.forEach(s=>s.get())}_$Sv(){this.isUpdatePending||queueMicrotask(()=>{this.isUpdatePending||this._$Sl()})}_$S_(){if(this.h!==void 0)return;this._$Su=new Gt.Computed(()=>{this._$So.get(),super.performUpdate()});let o=this.h=new Gt.subtle.Watcher(function(){let t=dg.get(this);t!==void 0&&(t._$Si===!1&&(new Set(this.getPending()).has(t._$Su)?t.requestUpdate():t._$Sv()),this.watch())});dg.set(o,this),Rk.register(this,o),o.watch(this._$Su),o.watch(...Array.from(this._$St).map(([t])=>t))}_$Sp(){if(this.h===void 0)return;let o=!1;this.h.unwatch(...Gt.subtle.introspectSources(this.h).filter(t=>{var r;let n=((r=this._$St.get(t))===null||r===void 0?void 0:r.manualDispose)!==!0;return n&&this._$St.delete(t),o||(o=!n),n})),o||(this._$Su=void 0,this.h=void 0,this._$St.clear())}updateEffect(o,t){var r;this._$S_();let n=new Gt.Computed(()=>{o()});return this.h.watch(n),this._$St.set(n,t),(r=t?.beforeUpdate)!==null&&r!==void 0&&r?Gt.subtle.untrack(()=>n.get()):this.updateComplete.then(()=>Gt.subtle.untrack(()=>n.get())),()=>{this._$St.delete(n),this.h.unwatch(n),this.isConnected===!1&&this._$Sp()}}performUpdate(){this.isUpdatePending&&(this._$S_(),this._$Si=!0,this._$So.set(this._$So.get()+1),this._$Si=!1,this._$Sl())}connectedCallback(){super.connectedCallback(),this.requestUpdate()}disconnectedCallback(){super.disconnectedCallback(),queueMicrotask(()=>{this.isConnected===!1&&this._$Sp()})}}}var{I:Ok}=Af,pg=i=>i;var qc=i=>i.strings===void 0,hg=()=>document.createComment(""),$a=(i,o,t)=>{let r=i._$AA.parentNode,n=o===void 0?i._$AB:o._$AA;if(t===void 0){let a=r.insertBefore(hg(),n),s=r.insertBefore(hg(),n);t=new Ok(a,s,i,i.options)}else{let a=t._$AB.nextSibling,s=t._$AM,l=s!==i;if(l){let d;t._$AQ?.(i),t._$AM=i,t._$AP!==void 0&&(d=i._$AU)!==s._$AU&&t._$AP(d)}if(a!==n||l){let d=t._$AA;for(;d!==a;){let h=pg(d).nextSibling;pg(r).insertBefore(d,n),d=h}}}return t},ri=(i,o,t=i)=>(i._$AI(o,t),i),Pk={},La=(i,o=Pk)=>i._$AH=o,ug=i=>i._$AH,Mc=i=>{i._$AR(),i._$AA.remove()};var Us=(i,o)=>{let t=i._$AN;if(t===void 0)return!1;for(let r of t)r._$AO?.(o,!1),Us(r,o);return!0},Ic=i=>{let o,t;do{if((o=i._$AM)===void 0)break;t=o._$AN,t.delete(i),i=o}while(t?.size===0)},mg=i=>{for(let o;o=i._$AM;i=o){let t=o._$AN;if(t===void 0)o._$AN=t=new Set;else if(t.has(i))break;t.add(i),Bk(o)}};function Hk(i){this._$AN!==void 0?(Ic(this),this._$AM=i,mg(this)):this._$AM=i}function Fk(i,o=!1,t=0){let r=this._$AH,n=this._$AN;if(n!==void 0&&n.size!==0)if(o)if(Array.isArray(r))for(let a=t;a<r.length;a++)Us(r[a],!1),Ic(r[a]);else r!=null&&(Us(r,!1),Ic(r));else Us(this,i)}var Bk=i=>{i.type==Je.CHILD&&(i._$AP??(i._$AP=Fk),i._$AQ??(i._$AQ=Hk))},oi=class extends je{constructor(){super(...arguments),this._$AN=void 0}_$AT(o,t,r){super._$AT(o,t,r),mg(this),this.isConnected=o._$AU}_$AO(o,t=!0){o!==this.isConnected&&(this.isConnected=o,o?this.reconnected?.():this.disconnected?.()),t&&(Us(this,o),Ic(this))}setValue(o){if(qc(this._$Ct))this._$Ct._$AI(o,this);else{let t=[...this._$Ct._$AH];t[this._$Ci]=o,this._$Ct._$AI(t,this,0)}}disconnected(){}reconnected(){}};var ih=!1,ah=new Gt.subtle.Watcher(async()=>{ih||(ih=!0,queueMicrotask(()=>{ih=!1;for(let i of ah.getPending())i.get();ah.watch()}))}),Nc=class extends oi{_$S_(){var o,t;this._$Sm===void 0&&(this._$Sj=new Gt.Computed(()=>{var r;let n=(r=this._$SW)===null||r===void 0?void 0:r.get();return this.setValue(n),n}),this._$Sm=(t=(o=this._$Sk)===null||o===void 0?void 0:o.h)!==null&&t!==void 0?t:ah,this._$Sm.watch(this._$Sj),Gt.subtle.untrack(()=>{var r;return(r=this._$Sj)===null||r===void 0?void 0:r.get()}))}_$Sp(){this._$Sm!==void 0&&(this._$Sm.unwatch(this._$SW),this._$Sm=void 0)}render(o){return Gt.subtle.untrack(()=>o.get())}update(o,[t]){var r,n;return(r=this._$Sk)!==null&&r!==void 0||(this._$Sk=(n=o.options)===null||n===void 0?void 0:n.host),t!==this._$SW&&this._$SW!==void 0&&this._$Sp(),this._$SW=t,this._$S_(),Gt.subtle.untrack(()=>this._$SW.get())}disconnected(){this._$Sp()}reconnected(){this._$S_()}},sh=ie(Nc);var lh=i=>(o,...t)=>i(o,...t.map(r=>r instanceof Gt.State||r instanceof Gt.Computed?sh(r):r)),Vk=lh(u),Uk=lh(qo);var sD=Gt.State,lD=Gt.Computed,fg=(i,o)=>new Gt.State(i,o);function bg(){return typeof document>"u"?"light":document.documentElement.getAttribute("t")||document.body.getAttribute("t")||"light"}var Dc=fg(bg()),gg=!1;function jk(){gg||typeof window>"u"||(gg=!0,window.addEventListener("theme-change",i=>{let o=i.detail,t;typeof o=="string"?t=o:o&&typeof o=="object"&&"theme"in o&&typeof o.theme=="string"?t=o.theme:t=bg(),t!==Dc.get()&&Dc.set(t)}))}jk();var Gk=Lc(ei),C=class extends Gk{willUpdate(o){this.t=Dc.get(),super.willUpdate(o)}static define(o,t=this,r={}){let n=customElements.get(o);if(!n){customElements.define(o,class extends t{},r);return}let a=" (unknown version)",s=a;"version"in t&&t.version&&typeof t.version=="string"&&(a=` v${t.version}`),"version"in n&&n.version&&typeof n.version=="string"&&(s=` v${n.version}`),!(a&&s&&a===s)&&console.warn(`Attempted to register <${o}>${a} but it is already registered as <${o}>${s}.`)}constructor(){super(),Object.entries(this.constructor.dependencies).forEach(([o,t])=>{this.constructor.define(o,t)})}emit(o,t){let r=new CustomEvent(o,{bubbles:!0,cancelable:!0,composed:!0,detail:{element:this},...t});return this.dispatchEvent(r),r}};C.dependencies={},c([p()],C.prototype,"dir",2),c([p()],C.prototype,"lang",2),c([p({reflect:!0})],C.prototype,"t",2);var Gi=class extends je{constructor(o){if(super(o),this.it=G,o.type!==Je.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(o){if(o===G||o==null)return this._t=void 0,this.it=o;if(o===ne)return o;if(typeof o!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(o===this.it)return this._t;this.it=o;let t=[o];return t.raw=t,this._t={_$litType$:this.constructor.resultType,strings:t,values:[]}}};Gi.directiveName="unsafeHTML",Gi.resultType=1;var Ge=ie(Gi);function co(i,o){return new Promise(t=>{function r(n){n.target===i&&(i.removeEventListener(o,r),t())}i.addEventListener(o,r)})}var ch=class{constructor(){this.openDropdowns=new Set;this.openTooltips=new Set}registerDropdown(o){this.openDropdowns.add(o)}unregisterDropdown(o){this.openDropdowns.delete(o)}isDropdownOpen(){return this.openDropdowns.size>0}registerTooltip(o){this.openTooltips.add(o)}unregisterTooltip(o){this.openTooltips.delete(o)}isTooltipOpen(){return this.openTooltips.size>0}},Wk=new ch,Io=Wk;var vg=A`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}:host *,:host *::before,:host *::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{display:inline-block}.dropdown::part(popup){z-index:var(--zn-z-index-dropdown)}`;var me=class extends C{constructor(){super(...arguments);this.open=!1;this.placement="bottom-start";this.disabled=!1;this.stayOpenOnSelect=!1;this.distance=0;this.skidding=0;this.hoist=!0;this.sync=void 0;this.fetchedContent="";this.handlePanelSelect=t=>{let r=t.target;!this.stayOpenOnSelect&&r.tagName.toLowerCase()==="zn-menu"&&(this.hide().then(n=>n),this.focusOnTrigger())};this.handlePreload=()=>{this.preloadContent().then(t=>t)}}connectedCallback(){super.connectedCallback(),this.containingElement||(this.containingElement=this)}focusOnTrigger(){let t=this.trigger?.assignedElements({flatten:!0})[0];typeof t?.focus=="function"&&t.focus()}firstUpdated(t){this.panel.hidden=!this.open,this.open&&(this.addOpenListeners(),this.popup.active=!0),super.firstUpdated(t)}disconnectedCallback(){super.disconnectedCallback(),this.removeOpenListeners(),this.hide().then(t=>t)}getMenu(){return this.panel.assignedElements({flatten:!0}).find(t=>t.tagName.toLowerCase()==="zn-menu")}addOpenListeners(){this.panel.addEventListener("zn-select",this.handlePanelSelect),"CloseWatcher"in window?(this.closeWatcher?.destroy(),this.closeWatcher=new CloseWatcher,this.closeWatcher.onclose=()=>{this.hide().then(t=>t),this.focusOnTrigger()}):this.panel.addEventListener("keydown",this.handleKeyDown),document.addEventListener("keydown",this.handleDocumentKeyDown.bind(this)),document.addEventListener("mousedown",this.handleDocumentMouseDown.bind(this)),this.closeWatcher?.destroy()}removeOpenListeners(){this.panel&&(this.panel.removeEventListener("zn-select",this.handlePanelSelect),this.panel.removeEventListener("keydown",this.handleKeyDown)),document.removeEventListener("keydown",this.handleDocumentKeyDown),document.removeEventListener("mousedown",this.handleDocumentMouseDown),this.closeWatcher?.destroy()}async preloadContent(){if(this.uri&&!this.fetchedContent){let t=await fetch(this.uri,{credentials:"same-origin",headers:{"x-kx-inline":"inline"}});this.fetchedContent=await t.text(),this.requestUpdate()}}async handleTriggerClick(){this.open?await this.hide():(await this.show(),this.focusOnTrigger())}handleKeyDown(t){this.open&&t.key==="Escape"&&(t.stopPropagation(),this.hide().then(r=>r),this.focusOnTrigger())}async handleTriggerKeyDown(t){if([" ","Enter","Tab"].includes(t.key)){t.preventDefault(),await this.handleTriggerClick();return}let r=this.getMenu();if(r){let n=r.getAllItems(),a=n[0],s=n[n.length-1];["ArrowDown","ArrowUp","Home","End"].includes(t.key)&&(t.preventDefault(),this.open||(this.show().then(l=>l),await this.updateComplete),n.length>0&&this.updateComplete.then(()=>{(t.key==="ArrowDown"||t.key==="Home")&&(r.setCurrentItem(a),a.focus()),(t.key==="ArrowUp"||t.key==="End")&&(r.setCurrentItem(s),s.focus())}))}}handleTriggerKeyUp(t){t.key===" "&&t.preventDefault()}handleTriggerSlotChange(){this.updateAccessibleTrigger()}handleDocumentMouseDown(t){let r=t.composedPath();this.containingElement&&!r.includes(this.containingElement)&&this.hide().then(n=>n)}handleDocumentKeyDown(t){if(t.key==="Escape"&&this.open&&!this.closeWatcher){t.stopPropagation(),this.focusOnTrigger(),this.hide().then(r=>r);return}if(t.key==="Tab"){if(this.open){t.preventDefault(),this.hide().then(r=>r),this.focusOnTrigger();return}setTimeout(()=>{let r=this.containingElement?.getRootNode()instanceof ShadowRoot?document.activeElement?.shadowRoot?.activeElement:document.activeElement;(!this.containingElement||r?.closest(this.containingElement.tagName.toLowerCase())!==this.containingElement)&&this.hide().then(n=>n)})}}async show(){if(!this.open)return this.open=!0,co(this,"zn-after-show")}async hide(){if(this.open)return this.open=!1,co(this,"zn-after-hide")}reposition(){this.popup.reposition()}updateAccessibleTrigger(){let r=this.trigger.assignedElements({flatten:!0}).find(a=>Df(a).start),n=null;r&&(r.tagName.toLowerCase()==="zn-button"?n=r.button:n=r),n&&(n.setAttribute("aria-haspopup","true"),n.setAttribute("aria-expanded",this.open.toString()))}handleOpenChange(){if(this.disabled){this.open=!1;return}this.updateAccessibleTrigger(),this.open?(this.emit("zn-show"),Io.registerDropdown(this),this.addOpenListeners(),this.panel.hidden=!1,this.popup.active=!0,this.panel.focus(),this.emit("zn-after-show")):(this.emit("zn-hide"),Io.unregisterDropdown(this),this.removeOpenListeners(),this.panel.blur(),this.panel.hidden=!0,this.popup.active=!1,this.emit("zn-after-hide"))}render(){return u`
5
+ take care to ensure page security.`)})(r)+i[n+1],i[0]),r:Qf}),Xf=new Map,Yp=i=>(o,...t)=>{let r=t.length,n,a,s=[],l=[],d,h=0,m=!1;for(;h<r;){for(d=o[h];h<r&&(a=t[h],(n=dk(a))!==void 0);)d+=n+o[++h],m=!0;h!==r&&l.push(a),s.push(d),h++}if(h===r&&s.push(o[r]),m){let f=s.join("$$lit$$");(o=Xf.get(f))===void 0&&(s.raw=s,Xf.set(f,o=s)),t=l}return i(o,...t)},ae=Yp(u),WI=Yp(qo),KI=Yp(Cf);var P=i=>i??G;var Jf=i=>(o,t)=>{t!==void 0?t.addInitializer(()=>{customElements.define(i,o)}):customElements.define(i,o)};var pk={attribute:!0,type:String,converter:ti,reflect:!1,hasChanged:Ea},hk=(i=pk,o,t)=>{let{kind:r,metadata:n}=t,a=globalThis.litPropertyMetadata.get(n);if(a===void 0&&globalThis.litPropertyMetadata.set(n,a=new Map),r==="setter"&&((i=Object.create(i)).wrapped=!0),a.set(t.name,i),r==="accessor"){let{name:s}=t;return{set(l){let d=o.get.call(this);o.set.call(this,l),this.requestUpdate(s,d,i,!0,l)},init(l){return l!==void 0&&this.C(s,void 0,i,l),l}}}if(r==="setter"){let{name:s}=t;return function(l){let d=this[s];o.call(this,l),this.requestUpdate(s,d,i,!0,l)}}throw Error("Unsupported decorator location: "+r)};function p(i){return(o,t)=>typeof t=="object"?hk(i,o,t):((r,n,a)=>{let s=n.hasOwnProperty(a);return n.constructor.createProperty(a,r),s?Object.getOwnPropertyDescriptor(n,a):void 0})(i,o,t)}function H(i){return p({...i,state:!0,attribute:!1})}function Zf(i){return(o,t)=>{let r=typeof o=="function"?o:o[t];Object.assign(r,i)}}var tn=(i,o,t)=>(t.configurable=!0,t.enumerable=!0,Reflect.decorate&&typeof o!="object"&&Object.defineProperty(i,o,t),t);function F(i,o){return(t,r,n)=>{let a=s=>s.renderRoot?.querySelector(i)??null;if(o){let{get:s,set:l}=typeof r=="object"?t:n??(()=>{let d=Symbol();return{get(){return this[d]},set(h){this[d]=h}}})();return tn(t,r,{get(){let d=s.call(this);return d===void 0&&(d=a(this),(d!==null||this.hasUpdated)&&l.call(this,d)),d}})}return tn(t,r,{get(){return a(this)}})}}var uk;function Sc(i){return(o,t)=>tn(o,t,{get(){return(this.renderRoot??uk??(uk=document.createDocumentFragment())).querySelectorAll(i)}})}function tg(i){return(o,t)=>tn(o,t,{async get(){return await this.updateComplete,this.renderRoot?.querySelector(i)??null}})}function eg(i){return(o,t)=>{let{slot:r}=i??{},n="slot"+(r?`[name=${r}]`:":not([name])");return tn(o,t,{get(){return this.renderRoot?.querySelector(n)?.assignedNodes(i)??[]}})}}var rg="important",mk=" !"+rg,Mo=ie(class extends je{constructor(i){if(super(i),i.type!==Je.ATTRIBUTE||i.name!=="style"||i.strings?.length>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(i){return Object.keys(i).reduce((o,t)=>{let r=i[t];return r==null?o:o+`${t=t.includes("-")?t:t.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${r};`},"")}update(i,[o]){let{style:t}=i.element;if(this.ft===void 0)return this.ft=new Set(Object.keys(o)),this.render(o);for(let r of this.ft)o[r]==null&&(this.ft.delete(r),r.includes("-")?t.removeProperty(r):t[r]=null);for(let r in o){let n=o[r];if(n!=null){this.ft.add(r);let a=typeof n=="string"&&n.endsWith(mk);r.includes("-")||a?t.setProperty(r,a?n.slice(0,-11):n,a?rg:""):t[r]=n}}return ne}});function K(i,o){let t={waitUntilFirstUpdate:!1,...o};return(r,n)=>{let{update:a}=r,s=Array.isArray(i)?i:[i];r.update=function(l){s.forEach(d=>{let h=d;if(l.has(h)){let m=l.get(h),f=this[h];m!==f&&(!t.waitUntilFirstUpdate||this.hasUpdated)&&this[n](m,f)}}),a.call(this,l)}}}var fk=Object.defineProperty,gk=(i,o,t)=>o in i?fk(i,o,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[o]=t,Xp=(i,o,t)=>(gk(i,typeof o!="symbol"?o+"":o,t),t),bk=(i,o,t)=>{if(!o.has(i))throw TypeError("Cannot "+t)},Qp=(i,o)=>{if(Object(o)!==o)throw TypeError('Cannot use the "in" operator on this value');return i.has(o)},Cc=(i,o,t)=>{if(o.has(i))throw TypeError("Cannot add the same private member more than once");o instanceof WeakSet?o.add(i):o.set(i,t)},og=(i,o,t)=>(bk(i,o,"access private method"),t);function ng(i,o){return Object.is(i,o)}var Ce=null,Vs=!1,Ec=1,Tc=Symbol("SIGNAL");function Ta(i){let o=Ce;return Ce=i,o}function vk(){return Ce}function xk(){return Vs}var rh={version:0,lastCleanEpoch:0,dirty:!1,producerNode:void 0,producerLastReadVersion:void 0,producerIndexOfThis:void 0,nextProducerIndex:0,liveConsumerNode:void 0,liveConsumerIndexOfThis:void 0,consumerAllowSignalWrites:!1,consumerIsAlwaysLive:!1,producerMustRecompute:()=>!1,producerRecomputeValue:()=>{},consumerMarkedDirty:()=>{},consumerOnSignalRead:()=>{}};function Ac(i){if(Vs)throw new Error(typeof ngDevMode<"u"&&ngDevMode?"Assertion error: signal read during notification phase":"");if(Ce===null)return;Ce.consumerOnSignalRead(i);let o=Ce.nextProducerIndex++;if(Aa(Ce),o<Ce.producerNode.length&&Ce.producerNode[o]!==i&&th(Ce)){let t=Ce.producerNode[o];$c(t,Ce.producerIndexOfThis[o])}Ce.producerNode[o]!==i&&(Ce.producerNode[o]=i,Ce.producerIndexOfThis[o]=th(Ce)?sg(i,Ce,o):0),Ce.producerLastReadVersion[o]=i.version}function yk(){Ec++}function ig(i){if(!(!i.dirty&&i.lastCleanEpoch===Ec)){if(!i.producerMustRecompute(i)&&!Sk(i)){i.dirty=!1,i.lastCleanEpoch=Ec;return}i.producerRecomputeValue(i),i.dirty=!1,i.lastCleanEpoch=Ec}}function ag(i){if(i.liveConsumerNode===void 0)return;let o=Vs;Vs=!0;try{for(let t of i.liveConsumerNode)t.dirty||wk(t)}finally{Vs=o}}function zk(){return Ce?.consumerAllowSignalWrites!==!1}function wk(i){var o;i.dirty=!0,ag(i),(o=i.consumerMarkedDirty)==null||o.call(i.wrapper??i)}function _k(i){return i&&(i.nextProducerIndex=0),Ta(i)}function kk(i,o){if(Ta(o),!(!i||i.producerNode===void 0||i.producerIndexOfThis===void 0||i.producerLastReadVersion===void 0)){if(th(i))for(let t=i.nextProducerIndex;t<i.producerNode.length;t++)$c(i.producerNode[t],i.producerIndexOfThis[t]);for(;i.producerNode.length>i.nextProducerIndex;)i.producerNode.pop(),i.producerLastReadVersion.pop(),i.producerIndexOfThis.pop()}}function Sk(i){Aa(i);for(let o=0;o<i.producerNode.length;o++){let t=i.producerNode[o],r=i.producerLastReadVersion[o];if(r!==t.version||(ig(t),r!==t.version))return!0}return!1}function sg(i,o,t){var r;if(oh(i),Aa(i),i.liveConsumerNode.length===0){(r=i.watched)==null||r.call(i.wrapper);for(let n=0;n<i.producerNode.length;n++)i.producerIndexOfThis[n]=sg(i.producerNode[n],i,n)}return i.liveConsumerIndexOfThis.push(t),i.liveConsumerNode.push(o)-1}function $c(i,o){var t;if(oh(i),Aa(i),typeof ngDevMode<"u"&&ngDevMode&&o>=i.liveConsumerNode.length)throw new Error(`Assertion error: active consumer index ${o} is out of bounds of ${i.liveConsumerNode.length} consumers)`);if(i.liveConsumerNode.length===1){(t=i.unwatched)==null||t.call(i.wrapper);for(let n=0;n<i.producerNode.length;n++)$c(i.producerNode[n],i.producerIndexOfThis[n])}let r=i.liveConsumerNode.length-1;if(i.liveConsumerNode[o]=i.liveConsumerNode[r],i.liveConsumerIndexOfThis[o]=i.liveConsumerIndexOfThis[r],i.liveConsumerNode.length--,i.liveConsumerIndexOfThis.length--,o<i.liveConsumerNode.length){let n=i.liveConsumerIndexOfThis[o],a=i.liveConsumerNode[o];Aa(a),a.producerIndexOfThis[n]=o}}function th(i){var o;return i.consumerIsAlwaysLive||(((o=i?.liveConsumerNode)==null?void 0:o.length)??0)>0}function Aa(i){i.producerNode??(i.producerNode=[]),i.producerIndexOfThis??(i.producerIndexOfThis=[]),i.producerLastReadVersion??(i.producerLastReadVersion=[])}function oh(i){i.liveConsumerNode??(i.liveConsumerNode=[]),i.liveConsumerIndexOfThis??(i.liveConsumerIndexOfThis=[])}function lg(i){if(ig(i),Ac(i),i.value===eh)throw i.error;return i.value}function Ck(i){let o=Object.create(Ek);o.computation=i;let t=()=>lg(o);return t[Tc]=o,t}var Jp=Symbol("UNSET"),Zp=Symbol("COMPUTING"),eh=Symbol("ERRORED"),Ek={...rh,value:Jp,dirty:!0,error:null,equal:ng,producerMustRecompute(i){return i.value===Jp||i.value===Zp},producerRecomputeValue(i){if(i.value===Zp)throw new Error("Detected cycle in computations.");let o=i.value;i.value=Zp;let t=_k(i),r,n=!1;try{r=i.computation.call(i.wrapper),n=o!==Jp&&o!==eh&&i.equal.call(i.wrapper,o,r)}catch(a){r=eh,i.error=a}finally{kk(i,t)}if(n){i.value=o;return}i.value=r,i.version++}};function Tk(){throw new Error}var Ak=Tk;function $k(){Ak()}function Lk(i){let o=Object.create(Ik);o.value=i;let t=()=>(Ac(o),o.value);return t[Tc]=o,t}function qk(){return Ac(this),this.value}function Mk(i,o){zk()||$k(),i.equal.call(i.wrapper,i.value,o)||(i.value=o,Nk(i))}var Ik={...rh,equal:ng,value:void 0};function Nk(i){i.version++,yk(),ag(i)}var Ze=Symbol("node"),Gt;(i=>{var o,t,r,n,a,s;class l{constructor(m,f={}){Cc(this,t),Xp(this,o);let g=Lk(m)[Tc];if(this[Ze]=g,g.wrapper=this,f){let v=f.equals;v&&(g.equal=v),g.watched=f[i.subtle.watched],g.unwatched=f[i.subtle.unwatched]}}get(){if(!(0,i.isState)(this))throw new TypeError("Wrong receiver type for Signal.State.prototype.get");return qk.call(this[Ze])}set(m){if(!(0,i.isState)(this))throw new TypeError("Wrong receiver type for Signal.State.prototype.set");if(xk())throw new Error("Writes to signals not permitted during Watcher callback");let f=this[Ze];Mk(f,m)}}o=Ze,t=new WeakSet,r=function(){},i.isState=h=>typeof h=="object"&&Qp(t,h),i.State=l;class d{constructor(m,f){Cc(this,a),Xp(this,n);let g=Ck(m)[Tc];if(g.consumerAllowSignalWrites=!0,this[Ze]=g,g.wrapper=this,f){let v=f.equals;v&&(g.equal=v),g.watched=f[i.subtle.watched],g.unwatched=f[i.subtle.unwatched]}}get(){if(!(0,i.isComputed)(this))throw new TypeError("Wrong receiver type for Signal.Computed.prototype.get");return lg(this[Ze])}}n=Ze,a=new WeakSet,s=function(){},i.isComputed=h=>typeof h=="object"&&Qp(a,h),i.Computed=d,(h=>{var m,f,b,g,v;function x(T){let L,W=null;try{W=Ta(null),L=T()}finally{Ta(W)}return L}h.untrack=x;function k(T){var L;if(!(0,i.isComputed)(T)&&!(0,i.isWatcher)(T))throw new TypeError("Called introspectSources without a Computed or Watcher argument");return((L=T[Ze].producerNode)==null?void 0:L.map(W=>W.wrapper))??[]}h.introspectSources=k;function _(T){var L;if(!(0,i.isComputed)(T)&&!(0,i.isState)(T))throw new TypeError("Called introspectSinks without a Signal argument");return((L=T[Ze].liveConsumerNode)==null?void 0:L.map(W=>W.wrapper))??[]}h.introspectSinks=_;function O(T){if(!(0,i.isComputed)(T)&&!(0,i.isState)(T))throw new TypeError("Called hasSinks without a Signal argument");let L=T[Ze].liveConsumerNode;return L?L.length>0:!1}h.hasSinks=O;function j(T){if(!(0,i.isComputed)(T)&&!(0,i.isWatcher)(T))throw new TypeError("Called hasSources without a Computed or Watcher argument");let L=T[Ze].producerNode;return L?L.length>0:!1}h.hasSources=j;class I{constructor(L){Cc(this,f),Cc(this,g),Xp(this,m);let W=Object.create(rh);W.wrapper=this,W.consumerMarkedDirty=L,W.consumerIsAlwaysLive=!0,W.consumerAllowSignalWrites=!1,W.producerNode=[],this[Ze]=W}watch(...L){if(!(0,i.isWatcher)(this))throw new TypeError("Called unwatch without Watcher receiver");og(this,g,v).call(this,L);let W=this[Ze];W.dirty=!1;let tt=Ta(W);for(let ut of L)Ac(ut[Ze]);Ta(tt)}unwatch(...L){if(!(0,i.isWatcher)(this))throw new TypeError("Called unwatch without Watcher receiver");og(this,g,v).call(this,L);let W=this[Ze];Aa(W);for(let tt=W.producerNode.length-1;tt>=0;tt--)if(L.includes(W.producerNode[tt].wrapper)){$c(W.producerNode[tt],W.producerIndexOfThis[tt]);let ut=W.producerNode.length-1;if(W.producerNode[tt]=W.producerNode[ut],W.producerIndexOfThis[tt]=W.producerIndexOfThis[ut],W.producerNode.length--,W.producerIndexOfThis.length--,W.nextProducerIndex--,tt<W.producerNode.length){let pt=W.producerIndexOfThis[tt],gt=W.producerNode[tt];oh(gt),gt.liveConsumerIndexOfThis[pt]=tt}}}getPending(){if(!(0,i.isWatcher)(this))throw new TypeError("Called getPending without Watcher receiver");return this[Ze].producerNode.filter(W=>W.dirty).map(W=>W.wrapper)}}m=Ze,f=new WeakSet,b=function(){},g=new WeakSet,v=function(T){for(let L of T)if(!(0,i.isComputed)(L)&&!(0,i.isState)(L))throw new TypeError("Called watch/unwatch without a Computed or State argument")},i.isWatcher=T=>Qp(f,T),h.Watcher=I;function w(){var T;return(T=vk())==null?void 0:T.wrapper}h.currentComputed=w,h.watched=Symbol("watched"),h.unwatched=Symbol("unwatched")})(i.subtle||(i.subtle={}))})(Gt||(Gt={}));var nh=!1,cg=new Gt.subtle.Watcher(()=>{nh||(nh=!0,queueMicrotask(()=>{nh=!1;for(let i of cg.getPending())i.get();cg.watch()}))}),Dk=Symbol("SignalWatcherBrand"),Rk=new FinalizationRegistry(i=>{i.unwatch(...Gt.subtle.introspectSources(i))}),dg=new WeakMap;function Lc(i){return i[Dk]===!0?(console.warn("SignalWatcher should not be applied to the same class more than once."),i):class extends i{constructor(){super(...arguments),this._$St=new Map,this._$So=new Gt.State(0),this._$Si=!1}_$Sl(){var o,t;let r=[],n=[];this._$St.forEach((s,l)=>{(s?.beforeUpdate?r:n).push(l)});let a=(o=this.h)===null||o===void 0?void 0:o.getPending().filter(s=>s!==this._$Su&&!this._$St.has(s));r.forEach(s=>s.get()),(t=this._$Su)===null||t===void 0||t.get(),a.forEach(s=>s.get()),n.forEach(s=>s.get())}_$Sv(){this.isUpdatePending||queueMicrotask(()=>{this.isUpdatePending||this._$Sl()})}_$S_(){if(this.h!==void 0)return;this._$Su=new Gt.Computed(()=>{this._$So.get(),super.performUpdate()});let o=this.h=new Gt.subtle.Watcher(function(){let t=dg.get(this);t!==void 0&&(t._$Si===!1&&(new Set(this.getPending()).has(t._$Su)?t.requestUpdate():t._$Sv()),this.watch())});dg.set(o,this),Rk.register(this,o),o.watch(this._$Su),o.watch(...Array.from(this._$St).map(([t])=>t))}_$Sp(){if(this.h===void 0)return;let o=!1;this.h.unwatch(...Gt.subtle.introspectSources(this.h).filter(t=>{var r;let n=((r=this._$St.get(t))===null||r===void 0?void 0:r.manualDispose)!==!0;return n&&this._$St.delete(t),o||(o=!n),n})),o||(this._$Su=void 0,this.h=void 0,this._$St.clear())}updateEffect(o,t){var r;this._$S_();let n=new Gt.Computed(()=>{o()});return this.h.watch(n),this._$St.set(n,t),(r=t?.beforeUpdate)!==null&&r!==void 0&&r?Gt.subtle.untrack(()=>n.get()):this.updateComplete.then(()=>Gt.subtle.untrack(()=>n.get())),()=>{this._$St.delete(n),this.h.unwatch(n),this.isConnected===!1&&this._$Sp()}}performUpdate(){this.isUpdatePending&&(this._$S_(),this._$Si=!0,this._$So.set(this._$So.get()+1),this._$Si=!1,this._$Sl())}connectedCallback(){super.connectedCallback(),this.requestUpdate()}disconnectedCallback(){super.disconnectedCallback(),queueMicrotask(()=>{this.isConnected===!1&&this._$Sp()})}}}var{I:Ok}=Af,pg=i=>i;var qc=i=>i.strings===void 0,hg=()=>document.createComment(""),$a=(i,o,t)=>{let r=i._$AA.parentNode,n=o===void 0?i._$AB:o._$AA;if(t===void 0){let a=r.insertBefore(hg(),n),s=r.insertBefore(hg(),n);t=new Ok(a,s,i,i.options)}else{let a=t._$AB.nextSibling,s=t._$AM,l=s!==i;if(l){let d;t._$AQ?.(i),t._$AM=i,t._$AP!==void 0&&(d=i._$AU)!==s._$AU&&t._$AP(d)}if(a!==n||l){let d=t._$AA;for(;d!==a;){let h=pg(d).nextSibling;pg(r).insertBefore(d,n),d=h}}}return t},ri=(i,o,t=i)=>(i._$AI(o,t),i),Pk={},La=(i,o=Pk)=>i._$AH=o,ug=i=>i._$AH,Mc=i=>{i._$AR(),i._$AA.remove()};var Us=(i,o)=>{let t=i._$AN;if(t===void 0)return!1;for(let r of t)r._$AO?.(o,!1),Us(r,o);return!0},Ic=i=>{let o,t;do{if((o=i._$AM)===void 0)break;t=o._$AN,t.delete(i),i=o}while(t?.size===0)},mg=i=>{for(let o;o=i._$AM;i=o){let t=o._$AN;if(t===void 0)o._$AN=t=new Set;else if(t.has(i))break;t.add(i),Bk(o)}};function Hk(i){this._$AN!==void 0?(Ic(this),this._$AM=i,mg(this)):this._$AM=i}function Fk(i,o=!1,t=0){let r=this._$AH,n=this._$AN;if(n!==void 0&&n.size!==0)if(o)if(Array.isArray(r))for(let a=t;a<r.length;a++)Us(r[a],!1),Ic(r[a]);else r!=null&&(Us(r,!1),Ic(r));else Us(this,i)}var Bk=i=>{i.type==Je.CHILD&&(i._$AP??(i._$AP=Fk),i._$AQ??(i._$AQ=Hk))},oi=class extends je{constructor(){super(...arguments),this._$AN=void 0}_$AT(o,t,r){super._$AT(o,t,r),mg(this),this.isConnected=o._$AU}_$AO(o,t=!0){o!==this.isConnected&&(this.isConnected=o,o?this.reconnected?.():this.disconnected?.()),t&&(Us(this,o),Ic(this))}setValue(o){if(qc(this._$Ct))this._$Ct._$AI(o,this);else{let t=[...this._$Ct._$AH];t[this._$Ci]=o,this._$Ct._$AI(t,this,0)}}disconnected(){}reconnected(){}};var ih=!1,ah=new Gt.subtle.Watcher(async()=>{ih||(ih=!0,queueMicrotask(()=>{ih=!1;for(let i of ah.getPending())i.get();ah.watch()}))}),Nc=class extends oi{_$S_(){var o,t;this._$Sm===void 0&&(this._$Sj=new Gt.Computed(()=>{var r;let n=(r=this._$SW)===null||r===void 0?void 0:r.get();return this.setValue(n),n}),this._$Sm=(t=(o=this._$Sk)===null||o===void 0?void 0:o.h)!==null&&t!==void 0?t:ah,this._$Sm.watch(this._$Sj),Gt.subtle.untrack(()=>{var r;return(r=this._$Sj)===null||r===void 0?void 0:r.get()}))}_$Sp(){this._$Sm!==void 0&&(this._$Sm.unwatch(this._$SW),this._$Sm=void 0)}render(o){return Gt.subtle.untrack(()=>o.get())}update(o,[t]){var r,n;return(r=this._$Sk)!==null&&r!==void 0||(this._$Sk=(n=o.options)===null||n===void 0?void 0:n.host),t!==this._$SW&&this._$SW!==void 0&&this._$Sp(),this._$SW=t,this._$S_(),Gt.subtle.untrack(()=>this._$SW.get())}disconnected(){this._$Sp()}reconnected(){this._$S_()}},sh=ie(Nc);var lh=i=>(o,...t)=>i(o,...t.map(r=>r instanceof Gt.State||r instanceof Gt.Computed?sh(r):r)),Vk=lh(u),Uk=lh(qo);var sD=Gt.State,lD=Gt.Computed,fg=(i,o)=>new Gt.State(i,o);function bg(){return typeof document>"u"?"light":document.documentElement.getAttribute("t")||document.body.getAttribute("t")||"light"}var Dc=fg(bg()),gg=!1;function jk(){gg||typeof window>"u"||(gg=!0,window.addEventListener("theme-change",i=>{let o=i.detail,t;typeof o=="string"?t=o:o&&typeof o=="object"&&"theme"in o&&typeof o.theme=="string"?t=o.theme:t=bg(),t!==Dc.get()&&Dc.set(t)}))}jk();var Gk=Lc(ei),C=class extends Gk{willUpdate(o){this.t=Dc.get(),super.willUpdate(o)}static define(o,t=this,r={}){let n=customElements.get(o);if(!n){customElements.define(o,class extends t{},r);return}let a=" (unknown version)",s=a;"version"in t&&t.version&&typeof t.version=="string"&&(a=` v${t.version}`),"version"in n&&n.version&&typeof n.version=="string"&&(s=` v${n.version}`),!(a&&s&&a===s)&&console.warn(`Attempted to register <${o}>${a} but it is already registered as <${o}>${s}.`)}constructor(){super(),Object.entries(this.constructor.dependencies).forEach(([o,t])=>{this.constructor.define(o,t)})}emit(o,t){let r=new CustomEvent(o,{bubbles:!0,cancelable:!0,composed:!0,detail:{element:this},...t});return this.dispatchEvent(r),r}};C.dependencies={},c([p()],C.prototype,"dir",2),c([p()],C.prototype,"lang",2),c([p({reflect:!0})],C.prototype,"t",2);var Gi=class extends je{constructor(o){if(super(o),this.it=G,o.type!==Je.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(o){if(o===G||o==null)return this._t=void 0,this.it=o;if(o===ne)return o;if(typeof o!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(o===this.it)return this._t;this.it=o;let t=[o];return t.raw=t,this._t={_$litType$:this.constructor.resultType,strings:t,values:[]}}};Gi.directiveName="unsafeHTML",Gi.resultType=1;var Ge=ie(Gi);function co(i,o){return new Promise(t=>{function r(n){n.target===i&&(i.removeEventListener(o,r),t())}i.addEventListener(o,r)})}var ch=class{constructor(){this.openDropdowns=new Set;this.openTooltips=new Set}registerDropdown(o){this.openDropdowns.add(o)}unregisterDropdown(o){this.openDropdowns.delete(o)}isDropdownOpen(){return this.openDropdowns.size>0}registerTooltip(o){this.openTooltips.add(o)}unregisterTooltip(o){this.openTooltips.delete(o)}isTooltipOpen(){return this.openTooltips.size>0}},Wk=new ch,Io=Wk;var vg=A`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}:host *,:host *::before,:host *::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{display:inline-block}.dropdown::part(popup){z-index:var(--zn-z-index-dropdown)}`;var me=class extends C{constructor(){super(...arguments);this.open=!1;this.placement="bottom-start";this.disabled=!1;this.stayOpenOnSelect=!1;this.distance=0;this.skidding=0;this.hoist=!0;this.sync=void 0;this.fetchedContent="";this.handlePanelSelect=t=>{let r=t.target;!this.stayOpenOnSelect&&r.tagName.toLowerCase()==="zn-menu"&&(this.hide().then(n=>n),this.focusOnTrigger())};this.handlePreload=()=>{this.preloadContent().then(t=>t)}}connectedCallback(){super.connectedCallback(),this.containingElement||(this.containingElement=this)}focusOnTrigger(){let t=this.trigger?.assignedElements({flatten:!0})[0];typeof t?.focus=="function"&&t.focus()}firstUpdated(t){this.panel.hidden=!this.open,this.open&&(this.addOpenListeners(),this.popup.active=!0),super.firstUpdated(t)}disconnectedCallback(){super.disconnectedCallback(),this.removeOpenListeners(),this.hide().then(t=>t)}getMenu(){return this.panel.assignedElements({flatten:!0}).find(t=>t.tagName.toLowerCase()==="zn-menu")}addOpenListeners(){this.panel.addEventListener("zn-select",this.handlePanelSelect),"CloseWatcher"in window?(this.closeWatcher?.destroy(),this.closeWatcher=new CloseWatcher,this.closeWatcher.onclose=()=>{this.hide().then(t=>t),this.focusOnTrigger()}):this.panel.addEventListener("keydown",this.handleKeyDown),document.addEventListener("keydown",this.handleDocumentKeyDown.bind(this)),document.addEventListener("mousedown",this.handleDocumentMouseDown.bind(this)),this.closeWatcher?.destroy()}removeOpenListeners(){this.panel&&(this.panel.removeEventListener("zn-select",this.handlePanelSelect),this.panel.removeEventListener("keydown",this.handleKeyDown)),document.removeEventListener("keydown",this.handleDocumentKeyDown),document.removeEventListener("mousedown",this.handleDocumentMouseDown),this.closeWatcher?.destroy()}async preloadContent(){if(this.uri&&!this.fetchedContent){let t=await fetch(this.uri,{credentials:"same-origin",headers:{"x-kx-inline":"inline"}});this.fetchedContent=await t.text(),this.requestUpdate()}}async handleTriggerClick(){this.open?await this.hide():(await this.show(),this.focusOnTrigger())}handleKeyDown(t){this.open&&t.key==="Escape"&&(t.stopPropagation(),this.hide().then(r=>r),this.focusOnTrigger())}async handleTriggerKeyDown(t){if([" ","Enter","Tab"].includes(t.key)){t.preventDefault(),await this.handleTriggerClick();return}let r=this.getMenu();if(r){let n=r.getAllItems(),a=n[0],s=n[n.length-1];["ArrowDown","ArrowUp","Home","End"].includes(t.key)&&(t.preventDefault(),this.open||(this.show().then(l=>l),await this.updateComplete),n.length>0&&this.updateComplete.then(()=>{(t.key==="ArrowDown"||t.key==="Home")&&(r.setCurrentItem(a),a.focus()),(t.key==="ArrowUp"||t.key==="End")&&(r.setCurrentItem(s),s.focus())}))}}handleTriggerKeyUp(t){t.key===" "&&t.preventDefault()}handleTriggerSlotChange(){this.updateAccessibleTrigger()}handleDocumentMouseDown(t){let r=t.composedPath();this.containingElement&&!r.includes(this.containingElement)&&this.hide().then(n=>n)}handleDocumentKeyDown(t){if(t.key==="Escape"&&this.open&&!this.closeWatcher){t.stopPropagation(),this.focusOnTrigger(),this.hide().then(r=>r);return}if(t.key==="Tab"){if(this.open){t.preventDefault(),this.hide().then(r=>r),this.focusOnTrigger();return}setTimeout(()=>{let r=this.containingElement?.getRootNode()instanceof ShadowRoot?document.activeElement?.shadowRoot?.activeElement:document.activeElement;(!this.containingElement||r?.closest(this.containingElement.tagName.toLowerCase())!==this.containingElement)&&this.hide().then(n=>n)})}}async show(){if(!this.open)return this.open=!0,co(this,"zn-after-show")}async hide(){if(this.open)return this.open=!1,co(this,"zn-after-hide")}reposition(){this.popup.reposition()}updateAccessibleTrigger(){let r=this.trigger.assignedElements({flatten:!0}).find(a=>Df(a).start),n=null;r&&(r.tagName.toLowerCase()==="zn-button"?n=r.button:n=r),n&&(n.setAttribute("aria-haspopup","true"),n.setAttribute("aria-expanded",this.open.toString()))}handleOpenChange(){if(this.disabled){this.open=!1;return}this.updateAccessibleTrigger(),this.open?(this.emit("zn-show"),Io.registerDropdown(this),this.addOpenListeners(),this.panel.hidden=!1,this.popup.active=!0,this.panel.focus(),this.emit("zn-after-show")):(this.emit("zn-hide"),Io.unregisterDropdown(this),this.removeOpenListeners(),this.panel.blur(),this.panel.hidden=!0,this.popup.active=!1,this.emit("zn-after-hide"))}render(){return u`
6
6
  <zn-popup
7
7
  part="base"
8
8
  exportparts="popup:base__popup"
@@ -93,10 +93,10 @@ import{a as kn,b as H1,c as ar,d as c,e as V}from"./chunks/zn.UBLZO6CI.js";var B
93
93
  aria-label="tooltip">
94
94
  <slot name="content">${this.content}</slot>
95
95
  </div>
96
- </zn-popup>`}};xe.styles=E(Sg),c([F("slot:not([name])")],xe.prototype,"defaultSlot",2),c([F(".tooltip__body")],xe.prototype,"body",2),c([F("zn-popup")],xe.prototype,"popup",2),c([p()],xe.prototype,"content",2),c([p()],xe.prototype,"placement",2),c([p({type:Boolean,reflect:!0})],xe.prototype,"disabled",2),c([p({type:Number})],xe.prototype,"distance",2),c([p({type:Boolean,reflect:!0})],xe.prototype,"open",2),c([p({type:Number})],xe.prototype,"skidding",2),c([p()],xe.prototype,"trigger",2),c([p({type:Boolean})],xe.prototype,"hoist",2),c([K("open",{waitUntilFirstUpdate:!0})],xe.prototype,"handleOpenChange",1),c([K(["content","distance","hoist","placement","skidding"])],xe.prototype,"handleOptionsChange",1),c([K("disabled")],xe.prototype,"handleDisabledChange",1);var No=xe;xe.define("zn-tooltip");var Cg=A`:host,html,body{color:rgba(var(--zn-text),var(--zn-text-opacity));font-family:var(--zn-font-family-sans);font-feature-settings:normal;font-variation-settings:normal;font-size:var(--zn-text-paragraph-font-size);-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:rgba(0,0,0,0);-moz-tab-size:4;-o-tab-size:4;tab-size:4;margin:0}html,body{background-color:rgba(var(--zn-body),var(--zn-bg-opacity));container-type:size;min-height:100%;height:100%}.inline-container{container-type:inline-size}.app-container{container-type:inline-size;display:flex;flex:1;flex-direction:column;position:relative;max-height:100%;height:100%;width:100%;max-width:100%}.inline-app-container,.app-container.inline-app-container,[inline-container] .app-container{display:block;height:auto;flex:unset}hr{height:0;border:none;border-top:1px solid rgb(var(--zn-border-color))}code,kbd,samp,pre,.mono{font-family:var(--zn-font-family-mono);font-size:1em}small{font-size:80%}.hidden{display:none !important}.visibility-hidden{visibility:hidden}p{font-size:var(--zn-text-paragraph-font-size);line-height:var(--zn-text-paragraph-line-height);font-weight:var(--zn-text-paragraph-font-weight)}h1,h2,h3,h4,h5,h6{color:rgb(var(--zn-text-heading))}h1{font-size:var(--zn-text-h1-font-size);line-height:var(--zn-text-h1-line-height);font-weight:var(--zn-text-h1-font-weight)}h2{font-size:var(--zn-text-h2-font-size);line-height:var(--zn-text-h2-line-height);font-weight:var(--zn-text-h2-font-weight)}h3,h4,h5,h6{font-size:var(--zn-text-h3-font-size);line-height:var(--zn-text-h3-line-height);font-weight:var(--zn-text-h3-font-weight)}kbd{font-family:monospace;background-color:#eee;color:#333;border:1px solid rgb(var(--zn-border-color));border-radius:3px;box-shadow:0 1px 1px rgba(0,0,0,0.2),0 1px 0 0 rgba(255,255,255,0.5) inset;display:inline-block;font-size:13px;line-height:20px;padding:1px 6px;white-space:nowrap;min-width:15px;color:rgba(0,0,0,0.5)}[t=dark] kbd{background-color:rgb(25,25,25);box-shadow:0 1px 1px rgba(0,0,0,0.2),0 1px 0 0 rgba(110,110,110,0.5) inset;color:#eee}[tab]{cursor:pointer}.zn-link:hover{--zn-text:rgb(var(--zn-primary));--icon-color:rgb(var(--zn-primary));--zn-text-heading:rgb(var(--zn-primary));--property-color:rgb(var(--zn-primary));opacity:1}.grow{flex-grow:1}.no-grow{flex-grow:0}.shrink{flex-shrink:1}.no-shrink{flex-shrink:0}.block{display:block}.flex{display:flex}.flex-wrap{display:flex;flex-wrap:wrap}.flex-col{display:flex;flex-direction:column}.flex-mid{display:flex;align-items:center}.flex-jc{justify-content:center}.flex-between{display:flex;justify-content:space-between}.flex-end{display:flex;justify-content:flex-end}.flex-bottom{display:flex;align-items:flex-end}.equal{flex-basis:50%}.m-auto{margin:auto}.mt-auto{margin-top:auto}.zn-pad{padding:var(--zn-base-gap,0)}.zn-pad-y,.zn-py{padding-top:16px;padding-bottom:16px}.zn-pad-x,.zn-px{padding-left:16px;padding-right:16px}.zn-pr{padding-right:16px}.zn-pl{padding-left:16px}.zn-pt{padding-top:16px}.zn-pb{padding-bottom:16px}.zn-margin{margin:16px}.zn-mx{margin-left:16px;margin-right:16px}.zn-my{margin-top:16px;margin-bottom:16px}.zn-mt{margin-top:16px}.zn-mb{margin-bottom:16px}.zn-ml{margin-left:16px}.zn-mr{margin-right:16px}.zn-mxa{margin-left:auto;margin-right:auto}.zn-mya{margin-top:auto;margin-bottom:auto}.zn-mta{margin-top:auto}.zn-mba{margin-bottom:auto}.zn-mla{margin-left:auto}.zn-mra{margin-right:auto}.rotate-45{transform:rotate(45deg)}.rotate-90{transform:rotate(90deg)}.rotate-180{transform:rotate(180deg)}@keyframes act-vanish{from{transform:scale(1);opacity:1;max-height:100%}to{transform:scale(0.8);opacity:0;max-height:0}}.act-vanish{animation:ease-in act-vanish 600ms forwards;transform-origin:top center;background-color:rgba(var(--zn-color-error),0.3);display:block;overflow:hidden}.h-full{height:100%}.w-full{width:100%}.zn-panel-bg{--zn-page-surface-background:var(--zn-panel);background-color:rgba(var(--zn-panel),var(--zn-panel-opacity))}.zn-panel{background-color:rgba(var(--zn-panel),var(--zn-panel-opacity));border:1px solid rgb(var(--zn-border-color));border-radius:var(--zn-border-radius);--zn-page-surface-background:var(--zn-panel)}.zn-container{display:flex;flex-direction:column;flex-grow:1;max-height:100%;overflow:hidden}.tar{text-align:right}.tal{text-align:left}.tac{text-align:center}.zn-empty-hide:empty{display:none}.ml-auto{margin-left:auto}.zn-b-dash{border-style:dashed}.zn-b-dotted{border-style:dotted}.zn-border{border-style:solid;border-width:1px !important}.zn-bt{border-top-style:solid;border-top-width:1px !important}.zn-bb{border-bottom-style:solid;border-bottom-width:1px !important}.zn-bl{border-left-style:solid;border-left-width:1px !important}.zn-br{border-right-style:solid;border-right-width:1px !important}.unifi-action{display:flex;gap:10px;padding:10px 0;align-items:center}.zn-panel-bar{border-bottom:1px solid rgb(var(--zn-border-color));background-color:rgba(var(--zn-panel),0.9);padding:var(--zn-base-px);gap:var(--zn-base-px);display:flex;flex-wrap:wrap;align-items:center;z-index:1}.zn-panel-bar--pill{border-radius:var(--zn-border-radius);border:1px solid rgb(var(--zn-border-color))}.zn-panel-bar--large{padding:var(--zn-base-px) calc(var(--zn-base-gap) + var(--zn-gutter));gap:var(--zn-base-px);height:50px}.scroll-container{overflow:auto;flex-grow:1;position:relative;display:flex;flex-direction:column;max-height:100%}.zn-divide{display:flex;flex-direction:column}.zn-divide>*:not(:first-child){border-top:1px solid rgb(var(--zn-border-color))}.zn-divide>div:empty+div:not(:first-child){border-top:0}.zn-divide-y{display:flex;flex-direction:row}.zn-divide-y>*:not(:first-child):not(:empty){border-left:1px solid rgb(var(--zn-border-color))}.zn-c-pad{--zn-pad-spacing:var(--zn-spacing-large)}.zn-c-pad-x>*{padding-left:var(--zn-pad-spacing);padding-right:var(--zn-pad-spacing)}.zn-c-pad-y>*:not(:first-child){padding-top:var(--zn-pad-spacing)}.zn-c-pad-y>*:not(:last-child){padding-bottom:var(--zn-pad-spacing)}.zn-nav.zn-transparent{background:transparent}.zn-nav{background:rgba(var(--zn-panel),var(--zn-panel-opacity));border-right:1px solid rgb(var(--zn-border-color));max-width:320px;height:100%;padding-top:5px}.zn-nav ul{list-style:none;padding-bottom:10px;margin:0;display:flex;flex-direction:column;position:relative}.zn-nav ul:after{content:"";height:1px;left:18px;right:18px;bottom:0;position:absolute;background:rgb(var(--zn-border-color))}.zn-nav ul li a{text-decoration:none;color:rgb(var(--zn-text));display:block;font-weight:500;cursor:pointer}.zn-nav ul li a:hover,.zn-nav ul li a.zn-tb-active{background:rgb(var(--zn-body))}.zn-nav ul li a.zn-tb-active{color:rgb(var(--zn-purple-text))}.zn-nav ul:last-child:after{display:none}.zn-nav strong,.zn-nav li a{padding:10px 20px}.zn-nav strong{display:block;margin-top:10px;font-size:13px;letter-spacing:0.93px;color:rgb(var(--zn-text-heading));font-weight:600;padding-bottom:5px;text-transform:uppercase}@keyframes shimmer-text-sweep{0%{background-position:100% center}100%{background-position:0% center}}@media (prefers-reduced-motion:no-preference){.shimmer-text{--shimmer-base:rgb(var(--zn-text));--shimmer-highlight:rgb(var(--zn-text-heading));--shimmer-core:0.5ch;--shimmer-spread:1.5ch;--shimmer-duration:1.5s;display:inline-block;width:-moz-fit-content;width:fit-content;max-width:100%;background-image:linear-gradient(90deg,transparent calc(50% - var(--shimmer-spread)),var(--shimmer-highlight) calc(50% - var(--shimmer-core)),var(--shimmer-highlight) calc(50% + var(--shimmer-core)),transparent calc(50% + var(--shimmer-spread))),linear-gradient(var(--shimmer-base),var(--shimmer-base));background-size:250% 100%,auto;background-clip:text;-webkit-background-clip:text;-webkit-text-fill-color:transparent !important;color:transparent !important;animation:var(--shimmer-duration) linear infinite shimmer-text-sweep}.shimmer-text.zn-error{--shimmer-base:rgb(var(--zn-color-error));--shimmer-highlight:color-mix(in srgb,rgb(var(--zn-color-error)) 55%,white)}.shimmer-text.zn-success{--shimmer-base:rgb(var(--zn-color-success));--shimmer-highlight:color-mix(in srgb,rgb(var(--zn-color-success)) 55%,white)}.shimmer-text.zn-info{--shimmer-base:rgb(var(--zn-color-info));--shimmer-highlight:color-mix(in srgb,rgb(var(--zn-color-info)) 55%,white)}.shimmer-text.zn-warning{--shimmer-base:rgb(var(--zn-color-warning));--shimmer-highlight:color-mix(in srgb,rgb(var(--zn-color-warning)) 55%,white)}.shimmer-text.zn-primary{--shimmer-base:rgb(var(--zn-primary));--shimmer-highlight:color-mix(in srgb,rgb(var(--zn-primary)) 55%,white)}.shimmer-text.zn-accent{--shimmer-base:rgb(var(--zn-accent));--shimmer-highlight:color-mix(in srgb,rgb(var(--zn-accent)) 55%,white)}}@media (prefers-reduced-motion:reduce){.shimmer-text{color:rgb(var(--zn-text))}.shimmer-text.zn-error{color:rgb(var(--zn-color-error)) !important}.shimmer-text.zn-success{color:rgb(var(--zn-color-success)) !important}.shimmer-text.zn-info{color:rgb(var(--zn-color-info)) !important}.shimmer-text.zn-warning{color:rgb(var(--zn-color-warning)) !important}.shimmer-text.zn-primary{color:rgb(var(--zn-primary)) !important}.shimmer-text.zn-accent{color:rgb(var(--zn-accent)) !important}}*,*::before,*::after{box-sizing:border-box}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}a{color:inherit;text-decoration:inherit}strong{font-weight:bolder}b{font-weight:600}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:inline-block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}button,.zn-button{border-radius:var(--zn-border-radius);display:inline-flex;align-items:center;justify-content:center;padding:var(--zn-base-px);margin:auto;width:-moz-fit-content;width:fit-content;background-color:rgb(var(--zn-primary));color:rgba(255,255,255,0.9);font-size:var(--zn-text-button-label-font-size);font-weight:var(--zn-text-button-label-font-weight);line-height:var(--zn-text-button-label-line-height);text-transform:var(--zn-text-button-label-transform);cursor:pointer;vertical-align:middle;border-color:transparent;white-space:nowrap;max-height:36px;height:36px;min-height:36px}button:hover:not([disabled]),.zn-button:hover:not([disabled]){background-color:rgba(var(--zn-primary),0.8)}input[type=date],input[type=datetime-local],input[type=email],input[type=month],input[type=number],input[type=password],input[type=search],input[type=tel],input[type=text],input[type=time],input[type=url],input[type=week],input[type=file],input[list],textarea,select{display:block;width:100%;border-radius:5px;border-style:solid;border-width:1px !important;border-color:rgb(var(--zn-border-color));background-color:rgb(var(--zn-input-bg));outline:none}input[type=date]:focus,input[type=datetime-local]:focus,input[type=email]:focus,input[type=month]:focus,input[type=number]:focus,input[type=password]:focus,input[type=search]:focus,input[type=tel]:focus,input[type=text]:focus,input[type=time]:focus,input[type=url]:focus,input[type=week]:focus,input[type=file]:focus,input[list]:focus,textarea:focus,select:focus{border-color:rgb(var(--zn-primary));box-shadow:0 0 0 3px rgba(var(--zn-primary),0.3)}input[type=date]::-moz-placeholder, input[type=datetime-local]::-moz-placeholder, input[type=email]::-moz-placeholder, input[type=month]::-moz-placeholder, input[type=number]::-moz-placeholder, input[type=password]::-moz-placeholder, input[type=search]::-moz-placeholder, input[type=tel]::-moz-placeholder, input[type=text]::-moz-placeholder, input[type=time]::-moz-placeholder, input[type=url]::-moz-placeholder, input[type=week]::-moz-placeholder, input[type=file]::-moz-placeholder, input[list]::-moz-placeholder, textarea::-moz-placeholder, select::-moz-placeholder{font-weight:400;color:rgba(var(--zn-text),0.6)}input[type=date]::placeholder,input[type=datetime-local]::placeholder,input[type=email]::placeholder,input[type=month]::placeholder,input[type=number]::placeholder,input[type=password]::placeholder,input[type=search]::placeholder,input[type=tel]::placeholder,input[type=text]::placeholder,input[type=time]::placeholder,input[type=url]::placeholder,input[type=week]::placeholder,input[type=file]::placeholder,input[list]::placeholder,textarea::placeholder,select::placeholder{font-weight:400;color:rgba(var(--zn-text),0.6)}@media (min-width:360px){input[type=date],input[type=datetime-local],input[type=email],input[type=month],input[type=number],input[type=password],input[type=search],input[type=tel],input[type=text],input[type=time],input[type=url],input[type=week],input[type=file],input[list],textarea,select{padding:8px}}label{font-weight:600;font-size:rgb(var(--zn-font-size-medium));line-height:var(--zn-spacing-medium);color:rgb(var(--zn-text-heading));display:block;margin-bottom:4px;margin-top:16px}input[type=checkbox],input[type=radio]{border-radius:5px}input[type=radio]{border-radius:50%}input[type=range]{-webkit-appearance:none;-moz-appearance:none;appearance:none;border-radius:10px;background-color:rgb(var(--zn-border-color));height:8px;accent-color:rgb(var(--zn-primary));width:100%;max-width:768px}fieldset{border-color:rgba(var(--zn-primary),20%);border-width:2px;padding:0 16px 16px}select option{padding:4px}select>option:checked{background-color:rgba(var(--zn-primary),20%);border-radius:5px}fieldset>legend{padding:4px}input[type=button],input[type=submit],button[type=submit]:not(.button),button[type=button]:not(.button){border-radius:var(--zn-border-radius);display:inline-flex;align-items:center;justify-content:center;padding:var(--zn-base-px);margin:auto;width:-moz-fit-content;width:fit-content;background-color:rgb(var(--zn-primary));color:rgba(255,255,255,0.9);font-size:var(--zn-text-button-label-font-size);font-weight:var(--zn-text-button-label-font-weight);line-height:var(--zn-text-button-label-line-height);text-transform:var(--zn-text-button-label-transform);cursor:pointer;vertical-align:middle;border-color:transparent;white-space:nowrap;max-height:36px;height:36px;min-height:36px}input[type=button]:hover:not([disabled]),input[type=submit]:hover:not([disabled]),button[type=submit]:not(.button):hover:not([disabled]),button[type=button]:not(.button):hover:not([disabled]){background-color:rgba(var(--zn-primary),0.8)}input[type=button],input[type=submit],button[type=submit]:not(.button),button[type=button]:not(.button){width:auto}div+button{margin-top:16px}input[type=file]::-webkit-file-upload-button{border-radius:var(--zn-border-radius);display:inline-flex;align-items:center;justify-content:center;padding:var(--zn-base-px);margin:auto;width:fit-content;background-color:rgb(var(--zn-primary));color:rgba(255,255,255,0.9);font-size:var(--zn-text-button-label-font-size);font-weight:var(--zn-text-button-label-font-weight);line-height:var(--zn-text-button-label-line-height);text-transform:var(--zn-text-button-label-transform);cursor:pointer;vertical-align:middle;border-color:transparent;white-space:nowrap;max-height:36px;height:36px;min-height:36px}input[type=file]::-webkit-file-upload-button:hover:not([disabled]){background-color:rgba(var(--zn-primary),0.8)}input[type=file]::-webkit-file-upload-button{margin-right:8px}input::-webkit-calendar-picker-indicator{cursor:pointer;padding:8px}input[list]::-webkit-calendar-picker-indicator{padding:8px 4px}.input--with-icon{position:relative}.input--with-icon zn-icon{padding:14px;position:absolute;top:50%;pointer-events:none;transform:translateY(-50%);left:8px;background-color:rgb(var(--zn-primary));color:rgb(var(--zn-text));border-radius:50%}.input--with-icon input{padding-left:40px}input:-webkit-autofill,input:-webkit-autofill:hover,input:-webkit-autofill:focus,input:-webkit-autofill:active{-webkit-background-clip:text;-webkit-text-fill-color:rgb(var(--zn-text));-webkit-transition:background-color 5000s ease-in-out 0s;transition:background-color 5000s ease-in-out 0s;box-shadow:inset 0 0 20px 20px rgba(35,35,35,0.1607843137)}select{height:43px}.no-border{border:none !important}table:not(.remarkd-table){border-collapse:separate !important;border-spacing:0;width:100%;max-width:100%;table-layout:auto;text-align:left;font-family:var(--zn-font-sans);font-size:var(--zn-text-table-content-font-size);font-weight:var(--zn-text-table-content-font-weight);line-height:var(--zn-text-table-content-line-height);color:var(--zn-text-table-content-color);text-transform:var(--zn-text-table-content-transform)}table:not(.remarkd-table) thead{font-weight:var(--zn-font-weight-medium)}table:not(.remarkd-table) thead tr th{background-color:rgb(var(--zn-table-header-background-color))}table:not(.remarkd-table) tbody a{cursor:pointer;color:rgb(var(--zn-primary))}table:not(.remarkd-table) tbody tr td{border-top:1px solid rgb(var(--zn-border-color)) !important}table:not(.remarkd-table) tbody tr:first-of-type td{border-top:0 !important}table:not(.remarkd-table) th,table:not(.remarkd-table) td{padding:var(--zn-spacing-small) var(--zn-spacing-medium);min-width:90px;white-space:nowrap}table:not(.remarkd-table) td>span{white-space:normal}table:not(.remarkd-table) th{font-family:var(--zn-font-sans);font-size:var(--zn-text-button-label-font-size);font-weight:var(--zn-text-button-label-font-weight);line-height:var(--zn-text-button-label-line-height);color:var(--zn-text-button-label-color);text-transform:var(--zn-text-button-label-transform);text-transform:capitalize;border-bottom:1px solid rgb(var(--zn-border-color))}.zn-table-fixed{table-layout:fixed}.opacity-100{opacity:1}.opacity-90{opacity:0.9}.opacity-80{opacity:0.8}.opacity-60{opacity:0.6}.opacity-50{opacity:0.5}.opacity-40{opacity:0.4}.opacity-10{opacity:0.1}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}:host *,:host *::before,:host *::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{display:inline-block;position:relative;width:auto;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none}:host button,:host a{width:100%}.button{border-radius:var(--zn-border-radius);display:inline-flex;align-items:center;justify-content:center;padding:var(--zn-base-px);margin:auto;width:-moz-fit-content;width:fit-content;background-color:rgb(var(--zn-primary));color:rgba(255,255,255,0.9);font-size:var(--zn-text-button-label-font-size);font-weight:var(--zn-text-button-label-font-weight);line-height:var(--zn-text-button-label-line-height);text-transform:var(--zn-text-button-label-transform);cursor:pointer;vertical-align:middle;border-color:transparent;white-space:nowrap;max-height:36px;height:36px;min-height:36px}.button:hover:not([disabled]){background-color:rgba(var(--zn-primary),0.8)}.button{--btn-color:var(--zn-primary);--notification-color:rgb(var(--zn-color-error));border-width:var(--zn-button-border-width,1px);border-top-width:var(--zn-button-border-top-width,var(--zn-button-border-width,1px));border-right-width:var(--zn-button-border-right-width,var(--zn-button-border-width,1px));border-bottom-width:var(--zn-button-border-bottom-width,var(--zn-button-border-width,1px));border-left-width:var(--zn-button-border-left-width,var(--zn-button-border-width,1px));border-color:var(--zn-button-border-color,transparent);display:inline-flex;position:relative}.button.button--info{--btn-color:var(--zn-color-info)}.button.button--error{--btn-color:var(--zn-color-error)}.button.button--warning{--btn-color:var(--zn-color-warning)}.button.button--success{--btn-color:var(--zn-color-success)}.button__label--hidden{visibility:hidden}.button.button--muted-notification{--notification-color:rgb(var(--zn-color-info))}.button--has-notification{position:relative;overflow:visible}.button--has-notification::after{content:attr(data-notification);position:absolute;display:flex;justify-content:center;align-items:center;top:-4px;left:auto;inset-inline-end:-4px;box-sizing:border-box;min-width:13px;height:13px;padding:0 3px;border-radius:999px;font-size:var(--zn-text-notification-font-size);font-weight:var(--zn-text-notification-font-weight);line-height:var(--zn-text-notification-line-height);color:var(--zn-text-notification-color);background-color:var(--notification-color)}.button--has-notification.button--notification-dot::after{content:"";min-width:0;width:8px;height:8px;padding:0;border-radius:50%}.button::-moz-focus-inner{border:0}.button:focus{outline:none}.button:focus-visible{outline:2px solid rgb(var(--btn-color));outline-offset:2px}[disabled]{cursor:not-allowed;opacity:0.5}[disabled] *{pointer-events:none}.button--standard.button--secondary{background-color:var(--zn-color-neutral-50);border-color:var(--zn-button-border-color,var(--zn-color-neutral-50));color:rgb(var(--zn-primary))}.button--standard.button--secondary:hover:not([disabled]){background-color:var(--zn-color-neutral-100)}.button--standard.button--secondary:active:not([disabled]){background-color:var(--zn-color-neutral-100)}.button--standard{background-color:rgba(var(--btn-color),0.85);border-color:var(--zn-button-border-color,rgb(var(--btn-color)));color:rgba(255,255,255,0.9)}.button--standard:hover:not([disabled]){background-color:rgba(var(--btn-color),0.8)}.button--standard:active:not([disabled]){background-color:rgba(var(--btn-color))}.button--outline{background:none;border-width:var(--zn-button-border-width,1px);border-top-width:var(--zn-button-border-top-width,var(--zn-button-border-width,1px));border-right-width:var(--zn-button-border-right-width,var(--zn-button-border-width,1px));border-bottom-width:var(--zn-button-border-bottom-width,var(--zn-button-border-width,1px));border-left-width:var(--zn-button-border-left-width,var(--zn-button-border-width,1px));border-color:var(--zn-button-border-color,rgb(var(--btn-color)));color:rgb(var(--btn-color))}.button--outline:hover:not([disabled]),.button--outline:active:not([disabled]){background-color:rgb(var(--btn-color));color:white}.button--outline.button--secondary{border-color:var(--zn-button-border-color,var(--zn-color-neutral-100))}.button--outline.button--secondary:hover:not([disabled]),.button--outline.button--secondary:active:not([disabled]){background-color:var(--zn-color-neutral-100);color:rgb(var(--btn-color))}.button--text{background:none;color:rgb(var(--btn-color))}.button--text:hover:not([disabled]),.button--text:active:not([disabled]){background-color:rgba(var(--btn-color),0.1)}.button--text.button--secondary{font-weight:normal}.button--grow{width:100%}.button--with-icon.button--with-content:not(.button--icon-button).button--icon-left zn-icon{margin-right:var(--zn-base-px)}.button--with-icon.button--with-content:not(.button--icon-button).button--icon-right zn-icon{margin-left:var(--zn-base-px)}.button--square{border-radius:0}.button--transparent{background-color:transparent;border-color:var(--zn-button-border-color,transparent) !important;color:inherit}.button--transparent:hover:not([disabled]){background-color:rgba(var(--zn-primary),0.1)}.button--transparent:active:not([disabled]){background-color:rgba(var(--zn-primary),0.2)}.button--star{--btn-color:var(--zn-orange);background-color:rgb(var(--btn-color));border-color:var(--zn-button-border-color,rgb(var(--btn-color)));color:white;opacity:1 !important}.button--star:hover:not([disabled]){background-color:rgb(var(--btn-color))}.button--star:active{background-color:rgb(var(--btn-color))}.button--star.button--outline{background-color:transparent;border-color:var(--zn-button-border-color,rgb(var(--btn-color)));color:rgb(var(--btn-color))}.button--star.button--outline:hover:not([disabled]),.button--star.button--outline:active:not([disabled]){background-color:rgba(var(--btn-color));color:white}.button.button--icon-button{--icon-button-color:rgb(var(--zn-text));--icon-button-hover-color:rgb(var(--zn-primary));width:40px;min-width:40px;height:36px;min-height:36px;max-height:36px;padding:6px;margin:0;background:rgb(var(--zn-panel));border-color:var(--zn-button-border-color,rgb(var(--zn-border-color))) !important;border-radius:var(--zn-border-radius);color:var(--icon-button-color);font-weight:inherit;line-height:0}.button.button--icon-button zn-icon,.button.button--icon-button ::slotted(zn-icon){--icon-color:currentColor;color:inherit;line-height:0}.button.button--icon-button:hover:not([disabled]),.button.button--icon-button:active:not([disabled]){background:rgba(var(--zn-color-tab),0.5)}.button.button--icon-button.button--icon-button-small{width:36px;min-width:36px}.button.button--icon-button.button--icon-button-round{width:36px;min-width:36px;padding:8px;background:rgb(var(--zn-color-tab));border-color:var(--zn-button-border-color,transparent) !important;border-radius:var(--zn-border-radius-circle)}.button.button--icon-button.button--icon-button-round:hover:not([disabled]),.button.button--icon-button.button--icon-button-round:active:not([disabled]){background:rgb(var(--zn-color-border))}.button.button--icon-button.button--plain{background:transparent;border-color:var(--zn-button-border-color,transparent) !important}.button.button--icon-button.button--plain:hover:not([disabled]),.button.button--icon-button.button--plain:active:not([disabled]){background:rgb(var(--zn-color-tab))}.button.button--icon-button.button--no-hover:hover:not([disabled]),.button.button--icon-button.button--no-hover:active:not([disabled]){background:rgb(var(--zn-panel))}.button.button--icon-button.button--no-hover.button--icon-button-round:hover:not([disabled]),.button.button--icon-button.button--no-hover.button--icon-button-round:active:not([disabled]){background:rgb(var(--zn-color-tab))}.button.button--icon-button.button--no-hover.button--plain:hover:not([disabled]),.button.button--icon-button.button--no-hover.button--plain:active:not([disabled]){background:transparent}.button.button--icon-button.button--has-notification::after{--icon-inset:calc((100% - var(--notification-icon-size,20px)) / 2);top:calc(var(--icon-inset) - 4px);inset-inline-end:calc(var(--icon-inset) - 4px);transform:translate(50%,-50%)}.button--loading-bg-transparent{background-color:transparent}.button--loading-fill{pointer-events:none;position:absolute;z-index:1;background-color:rgba(var(--btn-color),0.85);border-radius:inherit;transition:width 0s;animation:loading-fill-grow var(--loading-duration,2s) linear forwards;inset:-1px}.button--loading-fill-transparent{background-color:rgba(var(--zn-primary),0.1)}.button--loading-container{position:absolute;top:0;left:0;width:100%;height:100%;display:flex;align-items:center;justify-content:center;pointer-events:none}.button--loading-text{z-index:5;width:100%;height:100%;display:flex;align-items:center;justify-content:center;font-size:inherit;font-weight:inherit;-webkit-user-select:none;-moz-user-select:none;user-select:none;position:absolute;pointer-events:none;color:inherit}.button--loading-text .loading-countdown{margin-left:3px}.button--loading-text-left{justify-content:flex-start;padding-inline-start:7px}.button--loading-text-right{justify-content:flex-end;padding-inline-end:7px}.button--relative-wrapper{position:relative;display:inline-flex;height:100%;width:100%}@keyframes loading-fill-grow{from{width:0}to{width:100%}}:host([vertical-align=center]){align-self:center}:host([vertical-align=end]){align-self:end}:host([vertical-align=start]){align-self:start}:host([grow]){width:100%}:host([grow]) button{width:100%}:host([data-zn-button-group__button--grow]){flex-grow:1;flex-basis:0}:host([data-zn-button-group__button--inner]) .button{border-radius:0 !important;border-left:0 !important;border-right:0 !important}:host([data-zn-button-group__button]:not([data-zn-button-group__button--first]):not(:hover)) .button:after{content:"";position:absolute;top:0;inset-inline-start:0;bottom:0;border-left:solid 1px;mix-blend-mode:multiply;color:rgb(var(--zn-border-color))}:host([data-zn-button-group__button--first]:not([data-zn-button-group__button--last])) .button{border-radius:5px 0 0 5px !important;border-right:0 !important}:host([data-zn-button-group__button--last]:not([data-zn-button-group__button--first])) .button{border-radius:0 5px 5px 0 !important;border-left:0 !important}.button--panel-bg{background:rgb(var(--zn-panel));border-color:var(--zn-button-border-color,rgb(var(--zn-border-color)));color:rgb(var(--zn-text))}.button--panel-bg:hover:not([disabled]),.button--panel-bg:active:not([disabled]){background:rgba(var(--zn-color-tab),0.5)}`;var st=class extends C{constructor(){super(...arguments);this.formControlController=new ot(this);this.hasSlotController=new J(this,"[default]");this._loadingState={countdown:null,interval:void 0};this.color="default";this.text=!1;this.outline=!1;this.disabled=!1;this.grow=!1;this.square=!1;this.iconButton=!1;this.plain=!1;this.noHover=!1;this.panelBackground=!1;this.dropdownCloser=!1;this.mutedNotifications=!1;this.content="";this.icon="";this.gaid="";this.iconPosition="left";this.rel="noreferrer noopener";this.autoClick=!1;this.autoClickDelay=2e3;this.loadingText="Loading...";this.loadingTextPosition="center";this.loading=!1;this.handleClick=()=>{if(!this.disabled){if(this.dropdownCloser){let t=null,r=this,n=0,a=30;for(;r&&n<a;){if(r instanceof vr){t=r;break}r=r.parentElement||(r.getRootNode()instanceof ShadowRoot?r.getRootNode().host:null),n++}t?.hide()}this.type==="submit"&&this.formControlController.submit()}}}get validity(){return this._isButton()&&this.button?this.button.validity:Se}get validationMessage(){return this._isButton()&&this.button?this.button.validationMessage:""}firstUpdated(){this._isButton()&&this.formControlController.updateValidity()}disconnectedCallback(){super.disconnectedCallback(),this.teardownAutoClick()}async handleAutoClickChange(t,r){r?(await this.updateComplete,this.setupAutoClick()):this.teardownAutoClick()}updated(t){if(super.updated(t),this.button){let r=this.button.querySelector(".button--loading-fill");if(r&&r.remove(),this.loading){let n=`${this.autoClickDelay/1e3}s`,a=document.createElement("div");a.classList.add("button--loading-fill"),a.setAttribute("style",`--loading-duration: ${n}`),this.button.classList.contains("button--transparent")&&(a.classList.add("button--loading-fill-transparent"),this.button.classList.add("button--loading-bg-transparent")),this.button.prepend(a),this.button.classList.add("button--loading-bg")}else this.button.classList.remove("button--loading-bg"),this.button.classList.remove("button--loading-bg-transparent");this.updateCountdownText()}}checkValidity(){return this._isButton()&&this.button?this.button.checkValidity():!0}getForm(){return this.formControlController.getForm()}reportValidity(){return this._isButton()&&this.button?this.button.reportValidity():!0}setCustomValidity(t){this._isButton()&&(this.button.setCustomValidity(t),this.formControlController.updateValidity())}click(){this.handleClick()}_isLink(){return this.href!==void 0}_isButton(){return!this._isLink()}getIconButtonColor(t){switch(t){case void 0:case"":case"default":return"rgb(var(--zn-text))";case"primary":return"rgb(var(--zn-primary))";case"secondary":return"rgb(var(--zn-text))";case"error":return"rgb(var(--zn-color-error))";case"info":return"rgb(var(--zn-color-info))";case"success":return"rgb(var(--zn-color-success))";case"warning":return"rgb(var(--zn-color-warning))";case"transparent":return"inherit";case"star":return"rgb(var(--zn-orange))";default:return t}}setupAutoClick(){this.button&&(this._autoClickTimeout&&(window.clearTimeout(this._autoClickTimeout),this._autoClickTimeout=void 0),this._loadingState.interval&&(window.clearInterval(this._loadingState.interval),this._loadingState.interval=void 0),this.loading=!0,this._loadingState.countdown=Math.ceil(this.autoClickDelay/1e3),this.updateCountdownText(),this._loadingState.interval=window.setInterval(()=>{this._loadingState.countdown&&this._loadingState.countdown>0&&(this._loadingState.countdown--,this.updateCountdownText())},1e3),this._autoClickTimeout=window.setTimeout(()=>{this.loading=!1,this._loadingState.countdown=null,this.updateCountdownText(),this._loadingState.interval&&(window.clearInterval(this._loadingState.interval),this._loadingState.interval=void 0),this.button?.click()},this.autoClickDelay))}updateCountdownText(){let t=this._loadingState.countdown&&this._loadingState.countdown>0?` (${this._loadingState.countdown}s)`:"";if(this.countdownContainer)for(let r of this.countdownContainer)r.textContent=t}teardownAutoClick(){this._autoClickTimeout&&(window.clearTimeout(this._autoClickTimeout),this._autoClickTimeout=void 0),this._loadingState.interval&&(window.clearInterval(this._loadingState.interval),this._loadingState.interval=void 0),this.loading=!1,this._loadingState.countdown=null,this.button&&(this.button.style.width="")}render(){let t=this._isLink(),r=this.loading&&this.autoClick,n=this.icon&&!this.loading?ue`
96
+ </zn-popup>`}};xe.styles=E(Sg),c([F("slot:not([name])")],xe.prototype,"defaultSlot",2),c([F(".tooltip__body")],xe.prototype,"body",2),c([F("zn-popup")],xe.prototype,"popup",2),c([p()],xe.prototype,"content",2),c([p()],xe.prototype,"placement",2),c([p({type:Boolean,reflect:!0})],xe.prototype,"disabled",2),c([p({type:Number})],xe.prototype,"distance",2),c([p({type:Boolean,reflect:!0})],xe.prototype,"open",2),c([p({type:Number})],xe.prototype,"skidding",2),c([p()],xe.prototype,"trigger",2),c([p({type:Boolean})],xe.prototype,"hoist",2),c([K("open",{waitUntilFirstUpdate:!0})],xe.prototype,"handleOpenChange",1),c([K(["content","distance","hoist","placement","skidding"])],xe.prototype,"handleOptionsChange",1),c([K("disabled")],xe.prototype,"handleDisabledChange",1);var No=xe;xe.define("zn-tooltip");var Cg=A`:host,html,body{color:rgba(var(--zn-text),var(--zn-text-opacity));font-family:var(--zn-font-family-sans);font-feature-settings:normal;font-variation-settings:normal;font-size:var(--zn-text-paragraph-font-size);-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:rgba(0,0,0,0);-moz-tab-size:4;-o-tab-size:4;tab-size:4;margin:0}html,body{background-color:rgba(var(--zn-body),var(--zn-bg-opacity));container-type:size;min-height:100%;height:100%}.inline-container{container-type:inline-size}.app-container{container-type:inline-size;display:flex;flex:1;flex-direction:column;position:relative;max-height:100%;height:100%;width:100%;max-width:100%}.inline-app-container,.app-container.inline-app-container,[inline-container] .app-container{display:block;height:auto;flex:unset}hr{height:0;border:none;border-top:1px solid rgb(var(--zn-border-color))}code,kbd,samp,pre,.mono{font-family:var(--zn-font-family-mono);font-size:1em}small{font-size:80%}.hidden{display:none !important}.visibility-hidden{visibility:hidden}p{font-size:var(--zn-text-paragraph-font-size);line-height:var(--zn-text-paragraph-line-height);font-weight:var(--zn-text-paragraph-font-weight)}h1,h2,h3,h4,h5,h6{color:rgb(var(--zn-text-heading))}h1{font-size:var(--zn-text-h1-font-size);line-height:var(--zn-text-h1-line-height);font-weight:var(--zn-text-h1-font-weight)}h2{font-size:var(--zn-text-h2-font-size);line-height:var(--zn-text-h2-line-height);font-weight:var(--zn-text-h2-font-weight)}h3,h4,h5,h6{font-size:var(--zn-text-h3-font-size);line-height:var(--zn-text-h3-line-height);font-weight:var(--zn-text-h3-font-weight)}kbd{font-family:monospace;background-color:#eee;color:#333;border:1px solid rgb(var(--zn-border-color));border-radius:3px;box-shadow:0 1px 1px rgba(0,0,0,0.2),0 1px 0 0 rgba(255,255,255,0.5) inset;display:inline-block;font-size:13px;line-height:20px;padding:1px 6px;white-space:nowrap;min-width:15px;color:rgba(0,0,0,0.5)}[t=dark] kbd{background-color:rgb(25,25,25);box-shadow:0 1px 1px rgba(0,0,0,0.2),0 1px 0 0 rgba(110,110,110,0.5) inset;color:#eee}[tab]{cursor:pointer}.zn-link:hover{--zn-text:rgb(var(--zn-primary));--icon-color:rgb(var(--zn-primary));--zn-text-heading:rgb(var(--zn-primary));--property-color:rgb(var(--zn-primary));opacity:1}.grow{flex-grow:1}.no-grow{flex-grow:0}.shrink{flex-shrink:1}.no-shrink{flex-shrink:0}.block{display:block}.flex{display:flex}.flex-wrap{display:flex;flex-wrap:wrap}.flex-col{display:flex;flex-direction:column}.flex-mid{display:flex;align-items:center}.flex-jc{justify-content:center}.flex-between{display:flex;justify-content:space-between}.flex-end{display:flex;justify-content:flex-end}.flex-bottom{display:flex;align-items:flex-end}.equal{flex-basis:50%}.m-auto{margin:auto}.mt-auto{margin-top:auto}.zn-pad{padding:var(--zn-base-gap,0)}.zn-pad-y,.zn-py{padding-top:16px;padding-bottom:16px}.zn-pad-x,.zn-px{padding-left:16px;padding-right:16px}.zn-pr{padding-right:16px}.zn-pl{padding-left:16px}.zn-pt{padding-top:16px}.zn-pb{padding-bottom:16px}.zn-margin{margin:16px}.zn-mx{margin-left:16px;margin-right:16px}.zn-my{margin-top:16px;margin-bottom:16px}.zn-mt{margin-top:16px}.zn-mb{margin-bottom:16px}.zn-ml{margin-left:16px}.zn-mr{margin-right:16px}.zn-mxa{margin-left:auto;margin-right:auto}.zn-mya{margin-top:auto;margin-bottom:auto}.zn-mta{margin-top:auto}.zn-mba{margin-bottom:auto}.zn-mla{margin-left:auto}.zn-mra{margin-right:auto}.rotate-45{transform:rotate(45deg)}.rotate-90{transform:rotate(90deg)}.rotate-180{transform:rotate(180deg)}@keyframes act-vanish{from{transform:scale(1);opacity:1;max-height:100%}to{transform:scale(0.8);opacity:0;max-height:0}}.act-vanish{animation:ease-in act-vanish 600ms forwards;transform-origin:top center;background-color:rgba(var(--zn-color-error),0.3);display:block;overflow:hidden}.h-full{height:100%}.w-full{width:100%}.zn-panel-bg{--zn-page-surface-background:var(--zn-panel);background-color:rgba(var(--zn-panel),var(--zn-panel-opacity))}.zn-panel{background-color:rgba(var(--zn-panel),var(--zn-panel-opacity));border:1px solid rgb(var(--zn-border-color));border-radius:var(--zn-border-radius);--zn-page-surface-background:var(--zn-panel)}.zn-container{display:flex;flex-direction:column;flex-grow:1;max-height:100%;overflow:hidden}.tar{text-align:right}.tal{text-align:left}.tac{text-align:center}.zn-empty-hide:empty{display:none}.ml-auto{margin-left:auto}.zn-b-dash{border-style:dashed}.zn-b-dotted{border-style:dotted}.zn-border{border-style:solid;border-width:1px !important}.zn-bt{border-top-style:solid;border-top-width:1px !important}.zn-bb{border-bottom-style:solid;border-bottom-width:1px !important}.zn-bl{border-left-style:solid;border-left-width:1px !important}.zn-br{border-right-style:solid;border-right-width:1px !important}.unifi-action{display:flex;gap:10px;padding:10px 0;align-items:center}.zn-panel-bar{border-bottom:1px solid rgb(var(--zn-border-color));background-color:rgba(var(--zn-panel),0.9);padding:var(--zn-base-px);gap:var(--zn-base-px);display:flex;flex-wrap:wrap;align-items:center;z-index:1}.zn-panel-bar--pill{border-radius:var(--zn-border-radius);border:1px solid rgb(var(--zn-border-color))}.zn-panel-bar--large{padding:var(--zn-base-px) calc(var(--zn-base-gap) + var(--zn-gutter));gap:var(--zn-base-px);height:50px}.scroll-container{overflow:auto;flex-grow:1;position:relative;display:flex;flex-direction:column;max-height:100%}.zn-divide{display:flex;flex-direction:column}.zn-divide>*:not(:first-child){border-top:1px solid rgb(var(--zn-border-color))}.zn-divide>div:empty+div:not(:first-child){border-top:0}.zn-divide-y{display:flex;flex-direction:row}.zn-divide-y>*:not(:first-child):not(:empty){border-left:1px solid rgb(var(--zn-border-color))}.zn-c-pad{--zn-pad-spacing:var(--zn-spacing-large)}.zn-c-pad-x>*{padding-left:var(--zn-pad-spacing);padding-right:var(--zn-pad-spacing)}.zn-c-pad-y>*:not(:first-child){padding-top:var(--zn-pad-spacing)}.zn-c-pad-y>*:not(:last-child){padding-bottom:var(--zn-pad-spacing)}.zn-nav.zn-transparent{background:transparent}.zn-nav{background:rgba(var(--zn-panel),var(--zn-panel-opacity));border-right:1px solid rgb(var(--zn-border-color));max-width:320px;height:100%;padding-top:5px}.zn-nav ul{list-style:none;padding-bottom:10px;margin:0;display:flex;flex-direction:column;position:relative}.zn-nav ul:after{content:"";height:1px;left:18px;right:18px;bottom:0;position:absolute;background:rgb(var(--zn-border-color))}.zn-nav ul li a{text-decoration:none;color:rgb(var(--zn-text));display:block;font-weight:500;cursor:pointer}.zn-nav ul li a:hover,.zn-nav ul li a.zn-tb-active{background:rgb(var(--zn-body))}.zn-nav ul li a.zn-tb-active{color:rgb(var(--zn-purple-text))}.zn-nav ul:last-child:after{display:none}.zn-nav strong,.zn-nav li a{padding:10px 20px}.zn-nav strong{display:block;margin-top:10px;font-size:13px;letter-spacing:0.93px;color:rgb(var(--zn-text-heading));font-weight:600;padding-bottom:5px;text-transform:uppercase}@keyframes shimmer-text-sweep{0%{background-position:100% center}100%{background-position:0% center}}@media (prefers-reduced-motion:no-preference){.shimmer-text{--shimmer-base:rgb(var(--zn-text));--shimmer-highlight:rgb(var(--zn-text-heading));--shimmer-core:0.5ch;--shimmer-spread:1.5ch;--shimmer-duration:1.5s;display:inline-block;width:-moz-fit-content;width:fit-content;max-width:100%;background-image:linear-gradient(90deg,transparent calc(50% - var(--shimmer-spread)),var(--shimmer-highlight) calc(50% - var(--shimmer-core)),var(--shimmer-highlight) calc(50% + var(--shimmer-core)),transparent calc(50% + var(--shimmer-spread))),linear-gradient(var(--shimmer-base),var(--shimmer-base));background-size:250% 100%,auto;background-clip:text;-webkit-background-clip:text;-webkit-text-fill-color:transparent !important;color:transparent !important;animation:var(--shimmer-duration) linear infinite shimmer-text-sweep}.shimmer-text.zn-error{--shimmer-base:rgb(var(--zn-color-error));--shimmer-highlight:color-mix(in srgb,rgb(var(--zn-color-error)) 55%,white)}.shimmer-text.zn-success{--shimmer-base:rgb(var(--zn-color-success));--shimmer-highlight:color-mix(in srgb,rgb(var(--zn-color-success)) 55%,white)}.shimmer-text.zn-info{--shimmer-base:rgb(var(--zn-color-info));--shimmer-highlight:color-mix(in srgb,rgb(var(--zn-color-info)) 55%,white)}.shimmer-text.zn-warning{--shimmer-base:rgb(var(--zn-color-warning));--shimmer-highlight:color-mix(in srgb,rgb(var(--zn-color-warning)) 55%,white)}.shimmer-text.zn-primary{--shimmer-base:rgb(var(--zn-primary));--shimmer-highlight:color-mix(in srgb,rgb(var(--zn-primary)) 55%,white)}.shimmer-text.zn-accent{--shimmer-base:rgb(var(--zn-accent));--shimmer-highlight:color-mix(in srgb,rgb(var(--zn-accent)) 55%,white)}}@media (prefers-reduced-motion:reduce){.shimmer-text{color:rgb(var(--zn-text))}.shimmer-text.zn-error{color:rgb(var(--zn-color-error)) !important}.shimmer-text.zn-success{color:rgb(var(--zn-color-success)) !important}.shimmer-text.zn-info{color:rgb(var(--zn-color-info)) !important}.shimmer-text.zn-warning{color:rgb(var(--zn-color-warning)) !important}.shimmer-text.zn-primary{color:rgb(var(--zn-primary)) !important}.shimmer-text.zn-accent{color:rgb(var(--zn-accent)) !important}}*,*::before,*::after{box-sizing:border-box}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}a{color:inherit;text-decoration:inherit}strong{font-weight:bolder}b{font-weight:600}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:inline-block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}button,.zn-button{border-radius:var(--zn-border-radius);display:inline-flex;align-items:center;justify-content:center;padding:var(--zn-base-px);margin:auto;width:-moz-fit-content;width:fit-content;background-color:rgb(var(--zn-primary));color:rgba(255,255,255,0.9);font-size:var(--zn-text-button-label-font-size);font-weight:var(--zn-text-button-label-font-weight);line-height:var(--zn-text-button-label-line-height);text-transform:var(--zn-text-button-label-transform);cursor:pointer;vertical-align:middle;border-color:transparent;white-space:nowrap;max-height:36px;height:36px;min-height:36px}button:hover:not([disabled]),.zn-button:hover:not([disabled]){background-color:rgba(var(--zn-primary),0.8)}input[type=date],input[type=datetime-local],input[type=email],input[type=month],input[type=number],input[type=password],input[type=search],input[type=tel],input[type=text],input[type=time],input[type=url],input[type=week],input[type=file],input[list],textarea,select{display:block;width:100%;border-radius:5px;border-style:solid;border-width:1px !important;border-color:rgb(var(--zn-border-color));background-color:rgb(var(--zn-input-bg));outline:none}input[type=date]:focus,input[type=datetime-local]:focus,input[type=email]:focus,input[type=month]:focus,input[type=number]:focus,input[type=password]:focus,input[type=search]:focus,input[type=tel]:focus,input[type=text]:focus,input[type=time]:focus,input[type=url]:focus,input[type=week]:focus,input[type=file]:focus,input[list]:focus,textarea:focus,select:focus{border-color:rgb(var(--zn-primary));box-shadow:0 0 0 3px rgba(var(--zn-primary),0.3)}input[type=date]::-moz-placeholder, input[type=datetime-local]::-moz-placeholder, input[type=email]::-moz-placeholder, input[type=month]::-moz-placeholder, input[type=number]::-moz-placeholder, input[type=password]::-moz-placeholder, input[type=search]::-moz-placeholder, input[type=tel]::-moz-placeholder, input[type=text]::-moz-placeholder, input[type=time]::-moz-placeholder, input[type=url]::-moz-placeholder, input[type=week]::-moz-placeholder, input[type=file]::-moz-placeholder, input[list]::-moz-placeholder, textarea::-moz-placeholder, select::-moz-placeholder{font-weight:400;color:rgba(var(--zn-text),0.6)}input[type=date]::placeholder,input[type=datetime-local]::placeholder,input[type=email]::placeholder,input[type=month]::placeholder,input[type=number]::placeholder,input[type=password]::placeholder,input[type=search]::placeholder,input[type=tel]::placeholder,input[type=text]::placeholder,input[type=time]::placeholder,input[type=url]::placeholder,input[type=week]::placeholder,input[type=file]::placeholder,input[list]::placeholder,textarea::placeholder,select::placeholder{font-weight:400;color:rgba(var(--zn-text),0.6)}@media (min-width:360px){input[type=date],input[type=datetime-local],input[type=email],input[type=month],input[type=number],input[type=password],input[type=search],input[type=tel],input[type=text],input[type=time],input[type=url],input[type=week],input[type=file],input[list],textarea,select{padding:8px}}label{font-weight:600;font-size:rgb(var(--zn-font-size-medium));line-height:var(--zn-spacing-medium);color:rgb(var(--zn-text-heading));display:block;margin-bottom:4px;margin-top:16px}input[type=checkbox],input[type=radio]{border-radius:5px}input[type=radio]{border-radius:50%}input[type=range]{-webkit-appearance:none;-moz-appearance:none;appearance:none;border-radius:10px;background-color:rgb(var(--zn-border-color));height:8px;accent-color:rgb(var(--zn-primary));width:100%;max-width:768px}fieldset{border-color:rgba(var(--zn-primary),20%);border-width:2px;padding:0 16px 16px}select option{padding:4px}select>option:checked{background-color:rgba(var(--zn-primary),20%);border-radius:5px}fieldset>legend{padding:4px}input[type=button],input[type=submit],button[type=submit]:not(.button),button[type=button]:not(.button){border-radius:var(--zn-border-radius);display:inline-flex;align-items:center;justify-content:center;padding:var(--zn-base-px);margin:auto;width:-moz-fit-content;width:fit-content;background-color:rgb(var(--zn-primary));color:rgba(255,255,255,0.9);font-size:var(--zn-text-button-label-font-size);font-weight:var(--zn-text-button-label-font-weight);line-height:var(--zn-text-button-label-line-height);text-transform:var(--zn-text-button-label-transform);cursor:pointer;vertical-align:middle;border-color:transparent;white-space:nowrap;max-height:36px;height:36px;min-height:36px}input[type=button]:hover:not([disabled]),input[type=submit]:hover:not([disabled]),button[type=submit]:not(.button):hover:not([disabled]),button[type=button]:not(.button):hover:not([disabled]){background-color:rgba(var(--zn-primary),0.8)}input[type=button],input[type=submit],button[type=submit]:not(.button),button[type=button]:not(.button){width:auto}div+button{margin-top:16px}input[type=file]::-webkit-file-upload-button{border-radius:var(--zn-border-radius);display:inline-flex;align-items:center;justify-content:center;padding:var(--zn-base-px);margin:auto;width:fit-content;background-color:rgb(var(--zn-primary));color:rgba(255,255,255,0.9);font-size:var(--zn-text-button-label-font-size);font-weight:var(--zn-text-button-label-font-weight);line-height:var(--zn-text-button-label-line-height);text-transform:var(--zn-text-button-label-transform);cursor:pointer;vertical-align:middle;border-color:transparent;white-space:nowrap;max-height:36px;height:36px;min-height:36px}input[type=file]::-webkit-file-upload-button:hover:not([disabled]){background-color:rgba(var(--zn-primary),0.8)}input[type=file]::-webkit-file-upload-button{margin-right:8px}input::-webkit-calendar-picker-indicator{cursor:pointer;padding:8px}input[list]::-webkit-calendar-picker-indicator{padding:8px 4px}.input--with-icon{position:relative}.input--with-icon zn-icon{padding:14px;position:absolute;top:50%;pointer-events:none;transform:translateY(-50%);left:8px;background-color:rgb(var(--zn-primary));color:rgb(var(--zn-text));border-radius:50%}.input--with-icon input{padding-left:40px}input:-webkit-autofill,input:-webkit-autofill:hover,input:-webkit-autofill:focus,input:-webkit-autofill:active{-webkit-background-clip:text;-webkit-text-fill-color:rgb(var(--zn-text));-webkit-transition:background-color 5000s ease-in-out 0s;transition:background-color 5000s ease-in-out 0s;box-shadow:inset 0 0 20px 20px rgba(35,35,35,0.1607843137)}select{height:43px}.no-border{border:none !important}table:not(.remarkd-table){border-collapse:separate !important;border-spacing:0;width:100%;max-width:100%;table-layout:auto;text-align:left;font-family:var(--zn-font-sans);font-size:var(--zn-text-table-content-font-size);font-weight:var(--zn-text-table-content-font-weight);line-height:var(--zn-text-table-content-line-height);color:var(--zn-text-table-content-color);text-transform:var(--zn-text-table-content-transform)}table:not(.remarkd-table) thead{font-weight:var(--zn-font-weight-medium)}table:not(.remarkd-table) thead tr th{background-color:rgb(var(--zn-table-header-background-color))}table:not(.remarkd-table) tbody a{cursor:pointer;color:rgb(var(--zn-primary))}table:not(.remarkd-table) tbody tr td{border-top:1px solid rgb(var(--zn-border-color)) !important}table:not(.remarkd-table) tbody tr:first-of-type td{border-top:0 !important}table:not(.remarkd-table) th,table:not(.remarkd-table) td{padding:var(--zn-spacing-small) var(--zn-spacing-medium);min-width:90px;white-space:nowrap}table:not(.remarkd-table) td>span{white-space:normal}table:not(.remarkd-table) th{font-family:var(--zn-font-sans);font-size:var(--zn-text-button-label-font-size);font-weight:var(--zn-text-button-label-font-weight);line-height:var(--zn-text-button-label-line-height);color:var(--zn-text-button-label-color);text-transform:var(--zn-text-button-label-transform);text-transform:capitalize;border-bottom:1px solid rgb(var(--zn-border-color))}.zn-table-fixed{table-layout:fixed}.opacity-100{opacity:1}.opacity-90{opacity:0.9}.opacity-80{opacity:0.8}.opacity-60{opacity:0.6}.opacity-50{opacity:0.5}.opacity-40{opacity:0.4}.opacity-10{opacity:0.1}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}:host *,:host *::before,:host *::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{display:inline-block;position:relative;width:auto;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none}:host button,:host a{width:100%}.button{border-radius:var(--zn-border-radius);display:inline-flex;align-items:center;justify-content:center;padding:var(--zn-base-px);margin:auto;width:-moz-fit-content;width:fit-content;background-color:rgb(var(--zn-primary));color:rgba(255,255,255,0.9);font-size:var(--zn-text-button-label-font-size);font-weight:var(--zn-text-button-label-font-weight);line-height:var(--zn-text-button-label-line-height);text-transform:var(--zn-text-button-label-transform);cursor:pointer;vertical-align:middle;border-color:transparent;white-space:nowrap;max-height:36px;height:36px;min-height:36px}.button:hover:not([disabled]){background-color:rgba(var(--zn-primary),0.8)}.button{--btn-color:var(--zn-primary);--notification-color:rgb(var(--zn-color-error));border-width:var(--zn-button-border-width,1px);border-top-width:var(--zn-button-border-top-width,var(--zn-button-border-width,1px));border-right-width:var(--zn-button-border-right-width,var(--zn-button-border-width,1px));border-bottom-width:var(--zn-button-border-bottom-width,var(--zn-button-border-width,1px));border-left-width:var(--zn-button-border-left-width,var(--zn-button-border-width,1px));border-color:var(--zn-button-border-color,transparent);display:inline-flex;position:relative}.button.button--info{--btn-color:var(--zn-color-info)}.button.button--error{--btn-color:var(--zn-color-error)}.button.button--warning{--btn-color:var(--zn-color-warning)}.button.button--success{--btn-color:var(--zn-color-success)}.button__label--hidden{visibility:hidden}.button.button--muted-notification{--notification-color:rgb(var(--zn-color-info))}.button--has-notification{position:relative;overflow:visible}.button--has-notification::after{content:attr(data-notification);position:absolute;display:flex;justify-content:center;align-items:center;top:-4px;left:auto;inset-inline-end:-4px;box-sizing:border-box;min-width:13px;height:13px;padding:0 3px;border-radius:999px;font-size:var(--zn-text-notification-font-size);font-weight:var(--zn-text-notification-font-weight);line-height:var(--zn-text-notification-line-height);color:var(--zn-text-notification-color);background-color:var(--notification-color)}.button--has-notification.button--notification-dot::after{content:"";min-width:0;width:8px;height:8px;padding:0;border-radius:50%}.button::-moz-focus-inner{border:0}.button:focus{outline:none}.button:focus-visible{outline:2px solid rgb(var(--btn-color));outline-offset:2px}[disabled]{cursor:not-allowed;opacity:0.5}[disabled] *{pointer-events:none}.button--standard.button--secondary{background-color:var(--zn-color-neutral-50);border-color:var(--zn-button-border-color,var(--zn-color-neutral-50));color:rgb(var(--zn-primary))}.button--standard.button--secondary:hover:not([disabled]){background-color:var(--zn-color-neutral-100)}.button--standard.button--secondary:active:not([disabled]){background-color:var(--zn-color-neutral-100)}.button--standard{background-color:rgba(var(--btn-color),0.85);border-color:var(--zn-button-border-color,rgb(var(--btn-color)));color:rgba(255,255,255,0.9)}.button--standard:hover:not([disabled]){background-color:rgba(var(--btn-color),0.8)}.button--standard:active:not([disabled]){background-color:rgba(var(--btn-color))}.button--outline{background:none;border-width:var(--zn-button-border-width,1px);border-top-width:var(--zn-button-border-top-width,var(--zn-button-border-width,1px));border-right-width:var(--zn-button-border-right-width,var(--zn-button-border-width,1px));border-bottom-width:var(--zn-button-border-bottom-width,var(--zn-button-border-width,1px));border-left-width:var(--zn-button-border-left-width,var(--zn-button-border-width,1px));border-color:var(--zn-button-border-color,rgb(var(--btn-color)));color:rgb(var(--btn-color))}.button--outline:hover:not([disabled]),.button--outline:active:not([disabled]){background-color:rgb(var(--btn-color));color:white}.button--outline.button--secondary{border-color:var(--zn-button-border-color,var(--zn-color-neutral-100))}.button--outline.button--secondary:hover:not([disabled]),.button--outline.button--secondary:active:not([disabled]){background-color:var(--zn-color-neutral-100);color:rgb(var(--btn-color))}.button--text{background:none;color:rgb(var(--btn-color))}.button--text:hover:not([disabled]),.button--text:active:not([disabled]){background-color:rgba(var(--btn-color),0.1)}.button--text.button--secondary{font-weight:normal}.button--grow{width:100%}.button--with-icon.button--with-content:not(.button--icon-button).button--icon-left zn-icon{margin-right:var(--zn-base-px)}.button--with-icon.button--with-content:not(.button--icon-button).button--icon-right zn-icon{margin-left:var(--zn-base-px)}.button--square{border-radius:0}.button--transparent{background-color:transparent;border-color:var(--zn-button-border-color,transparent) !important;color:inherit}.button--transparent:hover:not([disabled]){background-color:rgba(var(--zn-primary),0.1)}.button--transparent:active:not([disabled]){background-color:rgba(var(--zn-primary),0.2)}.button--star{--btn-color:var(--zn-orange);background-color:rgb(var(--btn-color));border-color:var(--zn-button-border-color,rgb(var(--btn-color)));color:white;opacity:1 !important}.button--star:hover:not([disabled]){background-color:rgb(var(--btn-color))}.button--star:active{background-color:rgb(var(--btn-color))}.button--star.button--outline{background-color:transparent;border-color:var(--zn-button-border-color,rgb(var(--btn-color)));color:rgb(var(--btn-color))}.button--star.button--outline:hover:not([disabled]),.button--star.button--outline:active:not([disabled]){background-color:rgba(var(--btn-color));color:white}.button.button--icon-button{--icon-button-color:rgb(var(--zn-text));--icon-button-hover-color:rgb(var(--zn-primary));width:40px;min-width:40px;height:36px;min-height:36px;max-height:36px;padding:6px;margin:0;background:rgb(var(--zn-panel));border-color:var(--zn-button-border-color,rgb(var(--zn-border-color))) !important;border-radius:var(--zn-border-radius);color:var(--icon-button-color);font-weight:inherit;line-height:0}.button.button--icon-button zn-icon,.button.button--icon-button ::slotted(zn-icon){--icon-color:currentColor;color:inherit;line-height:0}.button.button--icon-button:hover:not([disabled]),.button.button--icon-button:active:not([disabled]){background:rgba(var(--zn-color-tab),0.5)}.button.button--icon-button.button--icon-button-small{width:36px;min-width:36px}.button.button--icon-button.button--icon-button-round{width:36px;min-width:36px;padding:8px;background:rgb(var(--zn-color-tab));border-color:var(--zn-button-border-color,transparent) !important;border-radius:var(--zn-border-radius-circle)}.button.button--icon-button.button--icon-button-round:hover:not([disabled]),.button.button--icon-button.button--icon-button-round:active:not([disabled]){background:rgb(var(--zn-color-border))}.button.button--icon-button.button--plain{background:transparent;border-color:var(--zn-button-border-color,transparent) !important}.button.button--icon-button.button--plain:hover:not([disabled]),.button.button--icon-button.button--plain:active:not([disabled]){background:rgb(var(--zn-color-tab))}.button.button--icon-button.button--no-hover:hover:not([disabled]),.button.button--icon-button.button--no-hover:active:not([disabled]){background:rgb(var(--zn-panel))}.button.button--icon-button.button--no-hover.button--icon-button-round:hover:not([disabled]),.button.button--icon-button.button--no-hover.button--icon-button-round:active:not([disabled]){background:rgb(var(--zn-color-tab))}.button.button--icon-button.button--no-hover.button--plain:hover:not([disabled]),.button.button--icon-button.button--no-hover.button--plain:active:not([disabled]){background:transparent}.button.button--icon-button.button--has-notification::after{--icon-inset:calc((100% - var(--notification-icon-size,20px)) / 2);top:calc(var(--icon-inset) - 4px);inset-inline-end:calc(var(--icon-inset) - 4px);transform:translate(50%,-50%)}.button--loading-bg-transparent{background-color:transparent}.button--loading-fill{pointer-events:none;position:absolute;z-index:1;background-color:rgba(var(--btn-color),0.85);border-radius:inherit;transition:width 0s;animation:loading-fill-grow var(--loading-duration,2s) linear forwards;inset:-1px}.button--loading-fill-transparent{background-color:rgba(var(--zn-primary),0.1)}.button--loading-container{position:absolute;top:0;left:0;width:100%;height:100%;display:flex;align-items:center;justify-content:center;pointer-events:none}.button--loading-text{z-index:5;width:100%;height:100%;display:flex;align-items:center;justify-content:center;font-size:inherit;font-weight:inherit;-webkit-user-select:none;-moz-user-select:none;user-select:none;position:absolute;pointer-events:none;color:inherit}.button--loading-text .loading-countdown{margin-left:3px}.button--loading-text-left{justify-content:flex-start;padding-inline-start:7px}.button--loading-text-right{justify-content:flex-end;padding-inline-end:7px}.button--relative-wrapper{position:relative;display:inline-flex;height:100%;width:100%}@keyframes loading-fill-grow{from{width:0}to{width:100%}}:host([vertical-align=center]){align-self:center}:host([vertical-align=end]){align-self:end}:host([vertical-align=start]){align-self:start}:host([grow]){width:100%}:host([grow]) button{width:100%}:host([data-zn-button-group__button--grow]){flex-grow:1;flex-basis:0}:host([data-zn-button-group__button--inner]) .button{border-radius:0 !important;border-left:0 !important;border-right:0 !important}:host([data-zn-button-group__button]:not([data-zn-button-group__button--first]):not(:hover)) .button:after{content:"";position:absolute;top:0;inset-inline-start:0;bottom:0;border-left:solid 1px;mix-blend-mode:multiply;color:rgb(var(--zn-border-color))}:host([data-zn-button-group__button--first]:not([data-zn-button-group__button--last])) .button{border-radius:5px 0 0 5px !important;border-right:0 !important}:host([data-zn-button-group__button--last]:not([data-zn-button-group__button--first])) .button{border-radius:0 5px 5px 0 !important;border-left:0 !important}.button--panel-bg{background:rgb(var(--zn-panel));border-color:var(--zn-button-border-color,rgb(var(--zn-border-color)));color:rgb(var(--zn-text))}.button--panel-bg:hover:not([disabled]),.button--panel-bg:active:not([disabled]){background:rgba(var(--zn-color-tab),0.5)}`;var st=class extends C{constructor(){super(...arguments);this.formControlController=new ot(this);this.hasSlotController=new J(this,"[default]");this._loadingState={countdown:null,interval:void 0};this.color="default";this.text=!1;this.outline=!1;this.disabled=!1;this.grow=!1;this.square=!1;this.iconButton=!1;this.plain=!1;this.noHover=!1;this.panelBackground=!1;this.dropdownCloser=!1;this.mutedNotifications=!1;this.content="";this.icon="";this.gaid="";this.iconPosition="left";this.rel="noreferrer noopener";this.autoClick=!1;this.autoClickDelay=2e3;this.loadingText="Loading...";this.loadingTextPosition="center";this.loading=!1;this.handleClick=()=>{if(!this.disabled){if(this.dropdownCloser){let t=null,r=this,n=0,a=30;for(;r&&n<a;){if(r instanceof vr){t=r;break}r=r.parentElement||(r.getRootNode()instanceof ShadowRoot?r.getRootNode().host:null),n++}t?.hide()}this.type==="submit"&&this.formControlController.submit()}}}get validity(){return this._isButton()&&this.button?this.button.validity:Se}get validationMessage(){return this._isButton()&&this.button?this.button.validationMessage:""}firstUpdated(){this._isButton()&&this.formControlController.updateValidity()}disconnectedCallback(){super.disconnectedCallback(),this.teardownAutoClick()}async handleAutoClickChange(t,r){r?(await this.updateComplete,this.setupAutoClick()):this.teardownAutoClick()}updated(t){if(super.updated(t),this.button){let r=this.button.querySelector(".button--loading-fill");if(r&&r.remove(),this.loading){let n=`${this.autoClickDelay/1e3}s`,a=document.createElement("div");a.classList.add("button--loading-fill"),a.setAttribute("style",`--loading-duration: ${n}`),this.button.classList.contains("button--transparent")&&(a.classList.add("button--loading-fill-transparent"),this.button.classList.add("button--loading-bg-transparent")),this.button.prepend(a),this.button.classList.add("button--loading-bg")}else this.button.classList.remove("button--loading-bg"),this.button.classList.remove("button--loading-bg-transparent");this.updateCountdownText()}}checkValidity(){return this._isButton()&&this.button?this.button.checkValidity():!0}getForm(){return this.formControlController.getForm()}reportValidity(){return this._isButton()&&this.button?this.button.reportValidity():!0}setCustomValidity(t){this._isButton()&&(this.button.setCustomValidity(t),this.formControlController.updateValidity())}click(){this.handleClick()}_isLink(){return this.href!==void 0}_isButton(){return!this._isLink()}getIconButtonColor(t){switch(t){case void 0:case"":case"default":return"rgb(var(--zn-text))";case"primary":return"rgb(var(--zn-primary))";case"secondary":return"rgb(var(--zn-text))";case"error":return"rgb(var(--zn-color-error))";case"info":return"rgb(var(--zn-color-info))";case"success":return"rgb(var(--zn-color-success))";case"warning":return"rgb(var(--zn-color-warning))";case"transparent":return"inherit";case"star":return"rgb(var(--zn-orange))";default:return t}}setupAutoClick(){this.button&&(this._autoClickTimeout&&(window.clearTimeout(this._autoClickTimeout),this._autoClickTimeout=void 0),this._loadingState.interval&&(window.clearInterval(this._loadingState.interval),this._loadingState.interval=void 0),this.loading=!0,this._loadingState.countdown=Math.ceil(this.autoClickDelay/1e3),this.updateCountdownText(),this._loadingState.interval=window.setInterval(()=>{this._loadingState.countdown&&this._loadingState.countdown>0&&(this._loadingState.countdown--,this.updateCountdownText())},1e3),this._autoClickTimeout=window.setTimeout(()=>{this.loading=!1,this._loadingState.countdown=null,this.updateCountdownText(),this._loadingState.interval&&(window.clearInterval(this._loadingState.interval),this._loadingState.interval=void 0),this.button?.click()},this.autoClickDelay))}updateCountdownText(){let t=this._loadingState.countdown&&this._loadingState.countdown>0?` (${this._loadingState.countdown}s)`:"";if(this.countdownContainer)for(let r of this.countdownContainer)r.textContent=t}teardownAutoClick(){this._autoClickTimeout&&(window.clearTimeout(this._autoClickTimeout),this._autoClickTimeout=void 0),this._loadingState.interval&&(window.clearInterval(this._loadingState.interval),this._loadingState.interval=void 0),this.loading=!1,this._loadingState.countdown=null,this.button&&(this.button.style.width="")}render(){let t=this._isLink(),r=this.loading&&this.autoClick,n=this.icon&&!this.loading?ae`
97
97
  <zn-icon part="icon" src="${this.icon}" id="xy2" size="${this.iconSize?this.iconSize:20}"
98
98
  color="${P(this.iconColor)}" fill="${P(this.iconFill)}"
99
- library="${P(this.iconLibrary)}"></zn-icon>`:"",a=t?En`a`:En`button`,s=this.iconButton?{"--icon-button-color":this.getIconButtonColor(this.color),"--icon-button-hover-color":this.getIconButtonColor(this.hoverColor||"primary")}:{},l=ue`
99
+ library="${P(this.iconLibrary)}"></zn-icon>`:"",a=t?En`a`:En`button`,s=this.iconButton?{"--icon-button-color":this.getIconButtonColor(this.color),"--icon-button-hover-color":this.getIconButtonColor(this.hoverColor||"primary")}:{},l=ae`
100
100
  <${a}
101
101
  part="base"
102
102
  class="${N({button:!0,"button--default":this.color==="default","button--secondary":this.color==="secondary","button--panel-bg":this.panelBackground,"button--error":this.color==="error","button--info":this.color==="info","button--success":this.color==="success","button--warning":this.color==="warning","button--transparent":this.color==="transparent","button--star":this.color==="star","button--outline":this.outline,"button--text":this.text&&!this.outline,"button--icon-button":!!this.iconButton,"button--plain":!!this.iconButton&&this.plain,"button--no-hover":this.noHover,"button--icon-button-small":this.iconButton==="small","button--icon-button-round":this.iconButton==="round","button--grow":this.grow,"button--standard":!this.outline&&!this.text,"button--with-icon":this.icon,"button--icon-left":this.iconPosition==="left","button--icon-right":this.iconPosition==="right","button--with-content":this.hasSlotController.test("[default]")||this.content,"button--square":this.square,"button--has-notification":this.notification!==void 0&&this.notification!==0,"button--muted-notification":this.mutedNotifications||this.notification!==void 0&&this.notification===-2,"button--notification-dot":this.notification!==void 0&&this.notification<0})}"
@@ -118,18 +118,18 @@ import{a as kn,b as H1,c as ar,d as c,e as V}from"./chunks/zn.UBLZO6CI.js";var B
118
118
  </slot>
119
119
  ${this.iconPosition==="right"?n:""}
120
120
  ${this._getLoadingContainer()}
121
- </${a}>`,d=this.autoClick?ue`
121
+ </${a}>`,d=this.autoClick?ae`
122
122
  <div class="button--relative-wrapper">
123
123
  ${l}
124
- ${r?ue`
124
+ ${r?ae`
125
125
  <slot name="cancel" @click="${this.teardownAutoClick}"></slot>
126
126
  `:null}
127
127
  </div>
128
- `:l;return this.tooltip!==void 0&&(d=ue`
128
+ `:l;return this.tooltip!==void 0&&(d=ae`
129
129
  <zn-tooltip placement="top" content="${this.tooltip}">
130
130
  ${d}
131
- </zn-tooltip>`),d}_getLoadingContainer(){return ue`
132
- ${this.loading?ue`
131
+ </zn-tooltip>`),d}_getLoadingContainer(){return ae`
132
+ ${this.loading?ae`
133
133
  <div class="button--loading-container">
134
134
  <span class="button--loading-text">
135
135
  ${this.loadingText}<span class="loading-countdown"></span>
@@ -569,7 +569,7 @@ import{a as kn,b as H1,c as ar,d as c,e as V}from"./chunks/zn.UBLZO6CI.js";var B
569
569
  <slot name="submenu"></slot>
570
570
  </zn-popup>
571
571
  `:u`
572
- <slot name="submenu" hidden></slot> `}};var Nb=A`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}:host *,:host *::before,:host *::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{--submenu-offset:-2px;--color:var(--zn-text-menu-link-color);--hover-color:rgb(var(--zn-primary));--hover-bg:rgba(var(--zn-color-navigation-highlight),var(--zn-panel-highlight-opacity));--active-color:rgb(var(--zn-primary));display:block}:host([variant=dropdown]){--hover-color:var(--color);--hover-bg:rgba(0,0,0,0.06)}:host([variant=shell]){--color:rgb(var(--zn-text));--hover-color:rgb(var(--zn-primary));--hover-bg:rgba(var(--zn-primary),0.05)}:host([inert]){display:none}.menu-item{position:relative;display:flex;align-items:stretch;padding:var(--zn-spacing-small) var(--zn-spacing-medium);transition:0.4s fill;-moz-user-select:none;user-select:none;-webkit-user-select:none;white-space:nowrap;cursor:pointer;border-bottom-width:1px;width:100%;text-decoration:none;font-size:var(--zn-text-menu-link-font-size);line-height:var(--zn-text-menu-link-line-height);font-weight:var(--zn-text-menu-link-font-weight);color:var(--color)}:host([variant=dropdown]) .menu-item{align-items:center;padding:var(--zn-spacing-small) var(--zn-spacing-large);border-bottom-width:0}:host([variant=shell]) .menu-item{align-items:center;gap:var(--zn-spacing-x-small);padding:var(--zn-spacing-x-small);border-bottom-width:0;border-radius:var(--zn-border-radius);line-height:25px}.menu-item__label::slotted(*){text-decoration:none;color:inherit}.menu-item.menu-item--disabled{outline:none;opacity:0.5;cursor:not-allowed}.menu-item.menu-item--loading{outline:none;cursor:wait}.menu-item--flush{padding:0}.menu-item--flush-x{padding-left:0;padding-right:0}.menu-item--flush-y{padding-top:0;padding-bottom:0}.menu-item--no-border{border-bottom-width:0}.menu-item--active::before{content:"";position:absolute;left:0;top:0;bottom:0;width:3px;background-color:var(--active-color)}.menu-item.menu-item--active .menu-item__label{font-weight:700;color:var(--active-color)}.menu-item--rtl.menu-item--active::before{left:auto;right:0}.menu-item--active.menu-item--primary::before{background-color:rgb(var(--zn-primary))}.menu-item--active.menu-item--error::before{background-color:rgb(var(--zn-color-error))}.menu-item--active.menu-item--info::before{background-color:rgb(var(--zn-color-info))}.menu-item--active.menu-item--warning::before{background-color:rgb(var(--zn-color-warning))}.menu-item--active.menu-item--success::before{background-color:rgb(var(--zn-color-success))}.menu-item--active.menu-item--secondary::before{background-color:rgb(var(--zn-accent))}.menu-item .menu-item__label{display:flex;flex:1 1 auto;text-overflow:ellipsis;align-items:center;overflow:hidden;color:var(--color)}.menu-item:hover .menu-item__label{color:var(--hover-color)}.menu-item .menu-item__prefix{flex:0 0 auto;display:flex;align-items:center}.menu-item .menu-item__prefix::slotted(*){--icon-size:var(--zn-font-size-small);margin-inline-end:var(--zn-spacing-small)}:host([variant=shell]) .menu-item .menu-item__prefix::slotted(*){margin-inline-end:0}.menu-item .menu-item__suffix{flex:0 0 auto;display:flex;align-items:center}.menu-item .menu-item__suffix::slotted(*){margin-inline-start:var(--zn-spacing-x-small)}.menu-item--submenu-expanded::after{content:"";position:fixed;z-index:calc(var(--zn-z-index-dropdown) - 1);top:0;right:0;bottom:0;left:0;clip-path:polygon(var(--safe-triangle-cursor-x,0) var(--safe-triangle-cursor-y,0),var(--safe-triangle-submenu-start-x,0) var(--safe-triangle-submenu-start-y,0),var(--safe-triangle-submenu-end-x,0) var(--safe-triangle-submenu-end-y,0))}:host(:focus-visible){outline:none}:host(:hover:not([aria-disabled=true],:focus-visible)) .menu-item,.menu-item--submenu-expanded{background-color:var(--hover-bg);color:var(--hover-color)}.menu-item--active{background-color:var(--hover-bg);color:var(--active-color)}:host(:focus-visible) .menu-item{outline:none;background-color:var(--hover-bg);color:var(--hover-color);opacity:1}.menu-item .menu-item__check,.menu-item .menu-item__chevron{flex:0 0 auto;display:flex;align-items:center;justify-content:center;width:1.5em;height:1.5em;visibility:hidden}.menu-item .menu-item__chevron{display:none}.menu-item--has-submenu .menu-item__chevron{display:flex}:host(:not([role=menuitemcheckbox])) .menu-item .menu-item__check{display:none}.menu-item--checked .menu-item__check,.menu-item--has-submenu .menu-item__chevron{visibility:visible;display:flex}zn-popup::part(popup){box-shadow:var(--zn-shadow-large);z-index:100;margin-left:var(--submenu-offset)}.menu-item--rtl zn-popup::part(popup){margin-left:calc(-1 * var(--submenu-offset))}@media (forced-colors:active){:host(:hover:not([aria-disabled=true])) .menu-item,:host(:focus-visible) .menu-item{outline:dashed 1px SelectedItem;outline-offset:-1px}}::slotted(zn-menu){max-width:var(--auto-size-available-width) !important;max-height:var(--auto-size-available-height) !important}.menu-item--primary{--color:rgba(var(--zn-primary),0.9);--hover-color:#ffffff;--hover-bg:rgba(var(--zn-primary),0.9)}.menu-item--error{--color:rgb(var(--zn-color-error));--hover-color:#ffffff;--hover-bg:rgba(var(--zn-color-error),0.9)}.menu-item--info{--color:rgb(var(--zn-color-info));--hover-color:#ffffff;--hover-bg:rgba(var(--zn-color-info),0.9)}.menu-item--warning{--color:rgb(var(--zn-color-warning));--hover-color:#ffffff;--hover-bg:rgba(var(--zn-color-warning),0.9)}.menu-item--success{--color:rgb(var(--zn-color-success));--hover-color:#ffffff;--hover-bg:rgba(var(--zn-color-success),0.9)}.menu-item--secondary{--color:rgb(var(--zn-accent))}.menu-item--transparent{--color:rgb(var(--zn-text))}`;var kt=class extends C{constructor(){super(...arguments);this.type="normal";this.variant="default";this.checked=!1;this.checkedPosition="left";this.value="";this.loading=!1;this.disabled=!1;this.rel="noreferrer noopener";this.confirm=!1;this.flush=!1;this.flushX=!1;this.flushY=!1;this.noBorder=!1;this.active=!1;this.localize=new Ye(this);this.hasSlotController=new J(this,"submenu");this.submenuController=new Wc(this,this.hasSlotController,this.localize);this.handleHostClick=t=>{if(this.disabled&&(t.preventDefault(),t.stopImmediatePropagation()),!this.isSubmenu()){let n=t.composedPath().find(a=>a?.getAttribute?.("role")==="menu");if(this.confirm)return;n?.closest("zn-dropdown")?.hide(),this.emit("zn-menu-select",{detail:{value:this.value,element:this}})}};this.handleMouseOver=t=>{this.focus(),t.stopPropagation()}}connectedCallback(){super.connectedCallback(),this.addEventListener("click",this.handleHostClick),this.addEventListener("mouseover",this.handleMouseOver)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("click",this.handleHostClick),this.removeEventListener("mouseover",this.handleMouseOver)}handleDefaultSlotChange(){let t=this.getTextLabel();if(typeof this.cachedTextLabel>"u"){this.cachedTextLabel=t;return}t!==this.cachedTextLabel&&(this.cachedTextLabel=t,this.emit("slotchange",{bubbles:!0,composed:!1,cancelable:!1}))}handleCheckedChange(){if(this.checked&&this.type!=="checkbox"){this.checked=!1,console.error('The checked attribute can only be used on menu items with type="checkbox"',this);return}this.type==="checkbox"?this.setAttribute("aria-checked",this.checked?"true":"false"):this.removeAttribute("aria-checked")}handleDisabledChange(){this.setAttribute("aria-disabled",this.disabled?"true":"false")}handleTypeChange(){this.type==="checkbox"?(this.setAttribute("role","menuitemcheckbox"),this.setAttribute("aria-checked",this.checked?"true":"false")):(this.setAttribute("role","menuitem"),this.removeAttribute("aria-checked"))}getTextLabel(){return Yf(this.defaultSlot)}isSubmenu(){return this.hasSlotController.test("submenu")}_isLink(){return this.href!==void 0||this.dataPath!==void 0}render(){let t=this.localize.dir()==="rtl",r=this.submenuController.isExpanded(),n=this._isLink(),a=n?En`a`:En`div`;return ue`
572
+ <slot name="submenu" hidden></slot> `}};var Nb=A`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}:host *,:host *::before,:host *::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{--submenu-offset:-2px;--color:var(--zn-text-menu-link-color);--hover-color:rgb(var(--zn-primary));--hover-bg:rgba(var(--zn-color-navigation-highlight),var(--zn-panel-highlight-opacity));--active-color:rgb(var(--zn-primary));display:block}:host([variant=dropdown]){--hover-color:var(--color);--hover-bg:rgba(0,0,0,0.06)}:host([variant=shell]){--color:rgb(var(--zn-text));--hover-color:rgb(var(--zn-primary));--hover-bg:rgba(var(--zn-primary),0.05)}:host([inert]){display:none}.menu-item{position:relative;display:flex;align-items:stretch;padding:var(--zn-spacing-small) var(--zn-spacing-medium);transition:0.4s fill;-moz-user-select:none;user-select:none;-webkit-user-select:none;white-space:nowrap;cursor:pointer;border-bottom-width:1px;width:100%;text-decoration:none;font-size:var(--zn-text-menu-link-font-size);line-height:var(--zn-text-menu-link-line-height);font-weight:var(--zn-text-menu-link-font-weight);color:var(--color)}:host([variant=dropdown]) .menu-item{align-items:center;padding:var(--zn-spacing-small) var(--zn-spacing-large);border-bottom-width:0}:host([variant=shell]) .menu-item{align-items:center;gap:var(--zn-spacing-x-small);padding:var(--zn-spacing-x-small);border-bottom-width:0;border-radius:var(--zn-border-radius);line-height:25px}.menu-item__label::slotted(*){text-decoration:none;color:inherit}.menu-item.menu-item--disabled{outline:none;opacity:0.5;cursor:not-allowed}.menu-item.menu-item--loading{outline:none;cursor:wait}.menu-item--flush{padding:0}.menu-item--flush-x{padding-left:0;padding-right:0}.menu-item--flush-y{padding-top:0;padding-bottom:0}.menu-item--no-border{border-bottom-width:0}.menu-item--active::before{content:"";position:absolute;left:0;top:0;bottom:0;width:3px;background-color:var(--active-color)}.menu-item.menu-item--active .menu-item__label{font-weight:700;color:var(--active-color)}.menu-item--rtl.menu-item--active::before{left:auto;right:0}.menu-item--active.menu-item--primary::before{background-color:rgb(var(--zn-primary))}.menu-item--active.menu-item--error::before{background-color:rgb(var(--zn-color-error))}.menu-item--active.menu-item--info::before{background-color:rgb(var(--zn-color-info))}.menu-item--active.menu-item--warning::before{background-color:rgb(var(--zn-color-warning))}.menu-item--active.menu-item--success::before{background-color:rgb(var(--zn-color-success))}.menu-item--active.menu-item--secondary::before{background-color:rgb(var(--zn-accent))}.menu-item .menu-item__label{display:flex;flex:1 1 auto;text-overflow:ellipsis;align-items:center;overflow:hidden;color:var(--color)}.menu-item:hover .menu-item__label{color:var(--hover-color)}.menu-item .menu-item__prefix{flex:0 0 auto;display:flex;align-items:center}.menu-item .menu-item__prefix::slotted(*){--icon-size:var(--zn-font-size-small);margin-inline-end:var(--zn-spacing-small)}:host([variant=shell]) .menu-item .menu-item__prefix::slotted(*){margin-inline-end:0}.menu-item .menu-item__suffix{flex:0 0 auto;display:flex;align-items:center}.menu-item .menu-item__suffix::slotted(*){margin-inline-start:var(--zn-spacing-x-small)}.menu-item--submenu-expanded::after{content:"";position:fixed;z-index:calc(var(--zn-z-index-dropdown) - 1);top:0;right:0;bottom:0;left:0;clip-path:polygon(var(--safe-triangle-cursor-x,0) var(--safe-triangle-cursor-y,0),var(--safe-triangle-submenu-start-x,0) var(--safe-triangle-submenu-start-y,0),var(--safe-triangle-submenu-end-x,0) var(--safe-triangle-submenu-end-y,0))}:host(:focus-visible){outline:none}:host(:hover:not([aria-disabled=true],:focus-visible)) .menu-item,.menu-item--submenu-expanded{background-color:var(--hover-bg);color:var(--hover-color)}.menu-item--active{background-color:var(--hover-bg);color:var(--active-color)}:host(:focus-visible) .menu-item{outline:none;background-color:var(--hover-bg);color:var(--hover-color);opacity:1}.menu-item .menu-item__check,.menu-item .menu-item__chevron{flex:0 0 auto;display:flex;align-items:center;justify-content:center;width:1.5em;height:1.5em;visibility:hidden}.menu-item .menu-item__chevron{display:none}.menu-item--has-submenu .menu-item__chevron{display:flex}:host(:not([role=menuitemcheckbox])) .menu-item .menu-item__check{display:none}.menu-item--checked .menu-item__check,.menu-item--has-submenu .menu-item__chevron{visibility:visible;display:flex}zn-popup::part(popup){box-shadow:var(--zn-shadow-large);z-index:100;margin-left:var(--submenu-offset)}.menu-item--rtl zn-popup::part(popup){margin-left:calc(-1 * var(--submenu-offset))}@media (forced-colors:active){:host(:hover:not([aria-disabled=true])) .menu-item,:host(:focus-visible) .menu-item{outline:dashed 1px SelectedItem;outline-offset:-1px}}::slotted(zn-menu){max-width:var(--auto-size-available-width) !important;max-height:var(--auto-size-available-height) !important}.menu-item--primary{--color:rgba(var(--zn-primary),0.9);--hover-color:#ffffff;--hover-bg:rgba(var(--zn-primary),0.9)}.menu-item--error{--color:rgb(var(--zn-color-error));--hover-color:#ffffff;--hover-bg:rgba(var(--zn-color-error),0.9)}.menu-item--info{--color:rgb(var(--zn-color-info));--hover-color:#ffffff;--hover-bg:rgba(var(--zn-color-info),0.9)}.menu-item--warning{--color:rgb(var(--zn-color-warning));--hover-color:#ffffff;--hover-bg:rgba(var(--zn-color-warning),0.9)}.menu-item--success{--color:rgb(var(--zn-color-success));--hover-color:#ffffff;--hover-bg:rgba(var(--zn-color-success),0.9)}.menu-item--secondary{--color:rgb(var(--zn-accent))}.menu-item--transparent{--color:rgb(var(--zn-text))}`;var kt=class extends C{constructor(){super(...arguments);this.type="normal";this.variant="default";this.checked=!1;this.checkedPosition="left";this.value="";this.loading=!1;this.disabled=!1;this.rel="noreferrer noopener";this.confirm=!1;this.flush=!1;this.flushX=!1;this.flushY=!1;this.noBorder=!1;this.active=!1;this.localize=new Ye(this);this.hasSlotController=new J(this,"submenu");this.submenuController=new Wc(this,this.hasSlotController,this.localize);this.handleHostClick=t=>{if(this.disabled&&(t.preventDefault(),t.stopImmediatePropagation()),!this.isSubmenu()){let n=t.composedPath().find(a=>a?.getAttribute?.("role")==="menu");if(this.confirm)return;n?.closest("zn-dropdown")?.hide(),this.emit("zn-menu-select",{detail:{value:this.value,element:this}})}};this.handleMouseOver=t=>{this.focus(),t.stopPropagation()}}connectedCallback(){super.connectedCallback(),this.addEventListener("click",this.handleHostClick),this.addEventListener("mouseover",this.handleMouseOver)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("click",this.handleHostClick),this.removeEventListener("mouseover",this.handleMouseOver)}handleDefaultSlotChange(){let t=this.getTextLabel();if(typeof this.cachedTextLabel>"u"){this.cachedTextLabel=t;return}t!==this.cachedTextLabel&&(this.cachedTextLabel=t,this.emit("slotchange",{bubbles:!0,composed:!1,cancelable:!1}))}handleCheckedChange(){if(this.checked&&this.type!=="checkbox"){this.checked=!1,console.error('The checked attribute can only be used on menu items with type="checkbox"',this);return}this.type==="checkbox"?this.setAttribute("aria-checked",this.checked?"true":"false"):this.removeAttribute("aria-checked")}handleDisabledChange(){this.setAttribute("aria-disabled",this.disabled?"true":"false")}handleTypeChange(){this.type==="checkbox"?(this.setAttribute("role","menuitemcheckbox"),this.setAttribute("aria-checked",this.checked?"true":"false")):(this.setAttribute("role","menuitem"),this.removeAttribute("aria-checked"))}getTextLabel(){return Yf(this.defaultSlot)}isSubmenu(){return this.hasSlotController.test("submenu")}_isLink(){return this.href!==void 0||this.dataPath!==void 0}render(){let t=this.localize.dir()==="rtl",r=this.submenuController.isExpanded(),n=this._isLink(),a=n?En`a`:En`div`;return ae`
573
573
  <${a}
574
574
  id="anchor"
575
575
  part="base"
@@ -582,7 +582,7 @@ import{a as kn,b as H1,c as ar,d as c,e as V}from"./chunks/zn.UBLZO6CI.js";var B
582
582
  class=${N({"menu-item":!0,"menu-item--rtl":t,"menu-item--checked":this.checked,"menu-item--disabled":this.disabled,"menu-item--loading":this.loading,"menu-item--has-submenu":this.isSubmenu(),"menu-item--submenu-expanded":r,"menu-item--primary":this.color==="primary","menu-item--secondary":this.color==="secondary","menu-item--error":this.color==="error","menu-item--info":this.color==="info","menu-item--success":this.color==="success","menu-item--warning":this.color==="warning","menu-item--transparent":this.color==="transparent","menu-item--flush":this.flush,"menu-item--flush-x":this.flushX&&!this.flush,"menu-item--flush-y":this.flushY&&!this.flush,"menu-item--no-border":this.noBorder,"menu-item--active":this.active})}
583
583
  ?aria-haspopup="${this.isSubmenu()}"
584
584
  ?aria-expanded="${r}">
585
- ${this.checkedPosition==="left"?ue`
585
+ ${this.checkedPosition==="left"?ae`
586
586
  <span part="checked-icon" class="menu-item__check">
587
587
  <zn-icon src="check@lu" size="18" aria-hidden="true"></zn-icon>
588
588
  </span>`:""}
@@ -593,7 +593,7 @@ import{a as kn,b as H1,c as ar,d as c,e as V}from"./chunks/zn.UBLZO6CI.js";var B
593
593
 
594
594
  <slot name="suffix" part="suffix" class="menu-item__suffix"></slot>
595
595
 
596
- ${this.checkedPosition==="right"?ue`
596
+ ${this.checkedPosition==="right"?ae`
597
597
  <span part="checked-icon" class="menu-item__check">
598
598
  <zn-icon src="check@lu" size="18" aria-hidden="true"></zn-icon>
599
599
  </span>`:""}
@@ -603,7 +603,7 @@ import{a as kn,b as H1,c as ar,d as c,e as V}from"./chunks/zn.UBLZO6CI.js";var B
603
603
  </span>
604
604
 
605
605
  ${this.submenuController.renderSubmenu()}
606
- ${this.loading?ue`
606
+ ${this.loading?ae`
607
607
  <zn-spinner part="spinner" exportparts="base:spinner__base"></zn-spinner> `:""}
608
608
  </div>
609
609
  `}};kt.styles=E(Nb),kt.dependencies={"zn-icon":ct,"zn-popup":Zs},c([F("slot:not([name])")],kt.prototype,"defaultSlot",2),c([F(".menu-item")],kt.prototype,"menuItem",2),c([p()],kt.prototype,"type",2),c([p({reflect:!0})],kt.prototype,"variant",2),c([p({type:Boolean,reflect:!0})],kt.prototype,"checked",2),c([p({attribute:"checked-position",reflect:!0})],kt.prototype,"checkedPosition",2),c([p()],kt.prototype,"value",2),c([p({type:Boolean,reflect:!0})],kt.prototype,"loading",2),c([p({type:Boolean,reflect:!0})],kt.prototype,"disabled",2),c([p()],kt.prototype,"color",2),c([p()],kt.prototype,"href",2),c([p({attribute:"data-path"})],kt.prototype,"dataPath",2),c([p()],kt.prototype,"target",2),c([p({attribute:"data-target"})],kt.prototype,"dataTarget",2),c([p()],kt.prototype,"rel",2),c([p({attribute:"gaid"})],kt.prototype,"gaid",2),c([p({type:Boolean,reflect:!0})],kt.prototype,"confirm",2),c([p({type:Boolean,reflect:!0})],kt.prototype,"flush",2),c([p({type:Boolean,reflect:!0,attribute:"flush-x"})],kt.prototype,"flushX",2),c([p({type:Boolean,reflect:!0,attribute:"flush-y"})],kt.prototype,"flushY",2),c([p({type:Boolean,reflect:!0,attribute:"no-border"})],kt.prototype,"noBorder",2),c([p({type:Boolean,reflect:!0})],kt.prototype,"active",2),c([K("checked")],kt.prototype,"handleCheckedChange",1),c([K("disabled")],kt.prototype,"handleDisabledChange",1),c([K("type")],kt.prototype,"handleTypeChange",1);var Ln=kt;kt.define("zn-menu-item");var Db=A`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}:host *,:host *::before,:host *::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}.menu{display:block;position:relative;padding:1px;border:1px solid rgb(var(--zn-border-color)) !important;border-radius:var(--zn-border-radius);width:-moz-fit-content;width:fit-content;min-width:var(--zn-size-spanel);overflow:auto;overscroll-behavior:none;box-shadow:0 4px 8px -4px rgba(33,33,33,0.1);background-color:rgb(var(--zn-panel))}.menu--shell{display:flex;flex-direction:column;gap:var(--zn-spacing-2x-small);padding:var(--zn-spacing-2x-small);border:1px solid rgb(var(--zn-border-color));border-radius:var(--zn-border-radius);min-width:245px;max-width:min(320px,100vw - 16px);overflow-x:hidden;overflow-y:auto;box-shadow:none;filter:drop-shadow(0 10px 8px rgba(0,0,0,0.04)) drop-shadow(0 4px 3px rgba(0,0,0,0.1));background-color:rgba(var(--zn-color-navigation,255,255,255),0.95);backdrop-filter:blur(3px)}::slotted(zn-menu-item+zn-menu-item){border-top:1px solid rgb(var(--zn-border-color))}`;var Oo=class extends C{constructor(){super(...arguments);this.actions=[];this.variant="default"}connectedCallback(){super.connectedCallback(),this.setAttribute("role","menu")}getAllItems(){return[...this.defaultSlot.assignedElements({flatten:!0})].filter(t=>!(t.inert||!this.isMenuItem(t)))}getCurrentItem(){return this.getAllItems().find(t=>t.getAttribute("tabindex")==="0")}setCurrentItem(t){this.getAllItems().forEach(n=>{n.setAttribute("tabindex",n===t?"0":"-1")})}render(){return u`
@@ -1080,35 +1080,38 @@ import{a as kn,b as H1,c as ar,d as c,e as V}from"./chunks/zn.UBLZO6CI.js";var B
1080
1080
  </div>`:""}
1081
1081
  <slot name="footer" class="note__footer"></slot>
1082
1082
  </div>
1083
- `}};mo.styles=E(Ub),c([p({reflect:!0})],mo.prototype,"color",2),c([p({reflect:!0})],mo.prototype,"caption",2),c([p({reflect:!0})],mo.prototype,"date",2),c([p({type:HTMLElement,reflect:!0})],mo.prototype,"body",2),c([H()],mo.prototype,"expanded",2);var DS=mo;mo.define("zn-note");var jb=A`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}:host *,:host *::before,:host *::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{display:block}.tile{position:relative;display:flex;align-items:center;justify-content:space-between;min-height:48px;-moz-column-gap:var(--zn-spacing-large);column-gap:var(--zn-spacing-large);font-size:var(--zn-text-table-content-font-size);line-height:var(--zn-text-table-content-line-height);font-weight:var(--zn-text-table-content-font-weight);color:var(--zn-text-table-content-color)}.tile--has-image,.tile--has-caption,.tile--has-description,.tile--has-properties,.tile--has-actions{padding-inline:var(--zn-base-gap)}.tile--has-image{padding:var(--zn-base-gap)}.tile--has-href{cursor:pointer}.tile--has-href:hover{background-color:var(--zn-color-neutral-100)}.tile--flush{padding:0}.tile--flush-x{padding-inline:0}.tile--flush-y{padding-block:0}a{color:inherit;text-decoration:none;cursor:pointer}::slotted(zn-icon){display:flex;justify-content:center;align-items:center}.tile__link{display:flex;align-items:center;-moz-column-gap:var(--zn-spacing-small);column-gap:var(--zn-spacing-small);min-width:0}.tile__left{display:flex;align-items:center;-moz-column-gap:var(--zn-spacing-small);column-gap:var(--zn-spacing-small);min-width:0}.tile__image{display:flex;align-items:center;flex-shrink:0}.tile__content{display:flex;flex-direction:column;justify-content:center;min-width:0}.tile--inline .tile__content{flex-direction:row;align-items:center;-moz-column-gap:var(--zn-spacing-x-small);column-gap:var(--zn-spacing-x-small)}.tile__caption{margin:0;font-weight:600;color:rgb(var(--zn-text-heading));white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.tile--plain .tile__caption{font-weight:var(--zn-text-table-content-font-weight);color:var(--zn-text-table-content-color)}.tile__description{margin:var(--zn-spacing-3x-small) 0 0;font-weight:var(--zn-text-table-content-font-weight);color:var(--zn-text-table-content-color);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.tile--inline .tile__description{margin:0}.tile__right{display:flex;align-items:center;justify-content:flex-end;-moz-column-gap:var(--zn-spacing-large);column-gap:var(--zn-spacing-large);min-width:0}.tile__properties{display:flex;flex-direction:row;align-items:center;-moz-column-gap:var(--zn-spacing-large);column-gap:var(--zn-spacing-large);min-width:0;overflow:hidden}.tile__properties ::slotted(*){white-space:nowrap}@container (max-width:359px){.tile__properties{display:none}}.tile__actions{display:flex;align-items:center;-moz-column-gap:var(--zn-spacing-small);column-gap:var(--zn-spacing-small);flex-shrink:0}:host([grouped]){display:grid;grid-column:1/-1;grid-template-columns:subgrid;align-items:center}:host([grouped]) .tile{display:grid;grid-column:1/-1;grid-template-columns:subgrid;align-items:center;justify-items:end;min-height:48px}:host([grouped]) .tile__link,:host([grouped]) .tile__right,:host([grouped]) .tile__properties,:host([grouped]) .tile__actions{display:contents}:host([grouped]) .tile__left{grid-column:1;justify-self:stretch;min-width:0;overflow:hidden}`;var Me=class extends C{constructor(){super(...arguments);this.hasSlotController=new J(this,"[default]","properties","actions","image")}_isLink(){return this.href||this.dataUri}_handleActionsClick(t){this._isLink()&&(t.preventDefault(),t.stopPropagation())}render(){let t=this._isLink(),r=t?En`a`:En`div`,n=this.caption&&this.caption.length>0,a=this.description&&this.description.length>0,s=this.hasSlotController.test("properties"),l=this.hasSlotController.test("actions"),d=this.hasSlotController.test("image");return ue`
1083
+ `}};mo.styles=E(Ub),c([p({reflect:!0})],mo.prototype,"color",2),c([p({reflect:!0})],mo.prototype,"caption",2),c([p({reflect:!0})],mo.prototype,"date",2),c([p({type:HTMLElement,reflect:!0})],mo.prototype,"body",2),c([H()],mo.prototype,"expanded",2);var DS=mo;mo.define("zn-note");var jb=A`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}:host *,:host *::before,:host *::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{display:block}.tile{position:relative;display:flex;align-items:center;justify-content:space-between;min-height:48px;-moz-column-gap:var(--zn-spacing-large);column-gap:var(--zn-spacing-large);font-size:var(--zn-text-table-content-font-size);line-height:var(--zn-text-table-content-line-height);font-weight:var(--zn-text-table-content-font-weight);color:var(--zn-text-table-content-color)}.tile--has-image,.tile--has-caption,.tile--has-description,.tile--has-properties,.tile--has-actions{padding-inline:var(--zn-base-gap)}.tile--has-image{padding:var(--zn-base-gap)}.tile--has-href{cursor:pointer}.tile--has-href:hover{background-color:var(--zn-color-neutral-100)}.tile--flush{padding:0}.tile--flush-x{padding-inline:0}.tile--flush-y{padding-block:0}a{color:inherit;text-decoration:none;cursor:pointer}::slotted(zn-icon){display:flex;justify-content:center;align-items:center}.tile__link{display:flex;align-items:center;-moz-column-gap:var(--zn-spacing-small);column-gap:var(--zn-spacing-small);min-width:0}.tile__left{display:flex;align-items:center;-moz-column-gap:var(--zn-spacing-small);column-gap:var(--zn-spacing-small);min-width:0}.tile__image{display:flex;align-items:center;flex-shrink:0}.tile__content{display:flex;flex-direction:column;justify-content:center;min-width:0}.tile--inline .tile__content{flex-direction:row;align-items:center;-moz-column-gap:var(--zn-spacing-x-small);column-gap:var(--zn-spacing-x-small)}.tile__caption{margin:0;font-weight:600;color:rgb(var(--zn-text-heading));white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.tile--plain .tile__caption{font-weight:var(--zn-text-table-content-font-weight);color:var(--zn-text-table-content-color)}.tile__description{margin:var(--zn-spacing-3x-small) 0 0;font-weight:var(--zn-text-table-content-font-weight);color:var(--zn-text-table-content-color);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.tile--inline .tile__description{margin:0}.tile__right{display:flex;align-items:center;justify-content:flex-end;-moz-column-gap:var(--zn-spacing-large);column-gap:var(--zn-spacing-large);min-width:0}.tile__properties{display:flex;flex-direction:row;align-items:center;-moz-column-gap:var(--zn-spacing-large);column-gap:var(--zn-spacing-large);min-width:0;overflow:hidden}.tile__properties ::slotted(*){white-space:nowrap}@container (max-width:359px){.tile__properties{display:none}}.tile__actions{display:flex;align-items:center;-moz-column-gap:var(--zn-spacing-small);column-gap:var(--zn-spacing-small);flex-shrink:0}:host([grouped]){display:grid;grid-column:1/-1;grid-template-columns:subgrid;align-items:center}:host([grouped]) .tile{display:grid;grid-column:1/-1;grid-template-columns:subgrid;align-items:center;justify-items:end;min-height:48px}:host([grouped]) .tile__link,:host([grouped]) .tile__right,:host([grouped]) .tile__properties,:host([grouped]) .tile__actions{display:contents}:host([grouped]) .tile__left{grid-column:1;justify-self:stretch;min-width:0;overflow:hidden}`;var Me=class extends C{constructor(){super(...arguments);this.hasSlotController=new J(this,"[default]","properties","actions","image")}_isLink(){return this.href||this.dataUri}_handleActionsClick(t){this._isLink()&&(t.preventDefault(),t.stopPropagation())}render(){let t=this._isLink(),r=t?En`a`:En`div`,n=this.caption&&this.caption.length>0,a=this.description&&this.description.length>0,s=this.hasSlotController.test("properties"),l=this.hasSlotController.test("actions"),d=this.hasSlotController.test("image");return ae`
1084
1084
  <${r}
1085
1085
  href="${P(this.href)}"
1086
1086
  data-uri="${P(this.dataUri)}"
1087
1087
  gaid="${P(this.gaid)}"
1088
1088
  data-target="${P(this.dataTarget)}"
1089
1089
  class="${N({tile:!0,"tile--flush":this.flush,"tile--flush-x":this.flushX,"tile--flush-y":this.flushY,"tile--inline":this.inline,"tile--plain":this.plain,"tile--has-href":t,"tile--has-caption":n,"tile--has-description":a,"tile--has-properties":s,"tile--has-actions":l,"tile--has-image":d})}">
1090
- ${!n&&!a&&!s&&!l?ue`
1090
+ ${!n&&!a&&!s&&!l?ae`
1091
1091
  <slot></slot>
1092
- `:ue`
1092
+ `:ae`
1093
1093
  <div
1094
1094
  class="tile__link">
1095
1095
  <div class="tile__left">
1096
- ${d?ue`<slot name="image" part="image" class="tile__image"></slot>`:ue``}
1096
+ ${d?ae`
1097
+ <slot name="image" part="image" class="tile__image"></slot>`:ae``}
1097
1098
  <div class="tile__content">
1098
1099
  <p part="caption" class="tile__caption">
1099
1100
  <slot name="caption">${this.caption}</slot>
1100
1101
  </p>
1101
- ${a?ue`
1102
- <p part="description" class="tile__description">${this.description}</p>`:""}
1102
+ ${a?ae`
1103
+ <p part="description" class="tile__description">
1104
+ ${this.description}</p>`:ae`<slot name="description" class="tile__description"></slot>`}
1103
1105
  </div>
1104
1106
  </div>
1105
1107
  </div>
1106
1108
 
1107
1109
  <div class="tile__right">
1108
- ${s?ue`
1110
+ ${s?ae`
1109
1111
  <slot name="properties" part="properties" class="tile__properties"></slot>`:""}
1110
- ${l?ue`
1111
- <slot name="actions" part="actions" class="tile__actions" @click=${this._handleActionsClick}></slot>`:""}
1112
+ ${l?ae`
1113
+ <slot name="actions" part="actions" class="tile__actions"
1114
+ @click=${this._handleActionsClick}></slot>`:""}
1112
1115
  </div>`}
1113
1116
  </${r}>`}};Me.styles=E(jb),c([p({attribute:"caption"})],Me.prototype,"caption",2),c([p({attribute:"description"})],Me.prototype,"description",2),c([p({attribute:"href"})],Me.prototype,"href",2),c([p({attribute:"data-target"})],Me.prototype,"dataTarget",2),c([p({attribute:"gaid"})],Me.prototype,"gaid",2),c([p({attribute:"data-uri"})],Me.prototype,"dataUri",2),c([p({type:Boolean})],Me.prototype,"flush",2),c([p({attribute:"flush-x",type:Boolean})],Me.prototype,"flushX",2),c([p({attribute:"flush-y",type:Boolean})],Me.prototype,"flushY",2),c([p({type:Boolean})],Me.prototype,"inline",2),c([p({type:Boolean})],Me.prototype,"plain",2),c([p({type:Boolean,reflect:!0})],Me.prototype,"grouped",2);var RS=Me;Me.define("zn-tile");var Gb=A`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}:host *,:host *::before,:host *::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{display:block;width:100%}.tile-group{display:grid;width:100%;grid-template-columns:minmax(min(100%,var(--zn-tile-caption-min-width,7.5rem)),1fr) repeat(var(--zn-tile-cols,1),auto);align-items:center;-moz-column-gap:var(--zn-spacing-large);column-gap:var(--zn-spacing-large);row-gap:0}slot{display:contents}:host([divide]) ::slotted(zn-tile:not(:first-child)){border-top:1px solid rgb(var(--zn-border-color))}`;var ii=class extends C{constructor(){super(...arguments);this.divide=!1;this._mutationObserver=null;this._handleSlotChange=()=>this._sync()}connectedCallback(){super.connectedCallback(),this._mutationObserver=new MutationObserver(()=>this._sync()),this._mutationObserver.observe(this,{childList:!0,subtree:!0})}disconnectedCallback(){super.disconnectedCallback(),this._mutationObserver?.disconnect(),this._mutationObserver=null}_sync(){let t=Array.from(this.querySelectorAll(":scope > zn-tile")),r=0;for(let n of t){n.setAttribute("grouped","");let a=n.querySelectorAll(':scope > [slot="properties"], :scope > [slot="actions"]').length;r=Math.max(r,a)}this.style.setProperty("--zn-tile-cols",String(Math.max(1,r)))}render(){return u`
1114
1117
  <div part="base" class="tile-group">
@@ -1176,7 +1179,7 @@ import{a as kn,b as H1,c as ar,d as c,e as V}from"./chunks/zn.UBLZO6CI.js";var B
1176
1179
  gaid=${this.acceptGaid}
1177
1180
  no-hover>
1178
1181
  </zn-button>
1179
- </slot>`}};Pt.styles=E(Kb),c([p({type:Boolean,reflect:!0})],Pt.prototype,"available",2),c([p({type:Boolean,reflect:!0})],Pt.prototype,"incoming",2),c([p({reflect:!0})],Pt.prototype,"variant",2),c([p()],Pt.prototype,"header",2),c([p()],Pt.prototype,"icon",2),c([p({reflect:!0})],Pt.prototype,"color",2),c([p()],Pt.prototype,"title",2),c([p()],Pt.prototype,"subtitle",2),c([p({type:Number})],Pt.prototype,"progress",2),c([p({attribute:"progress-color"})],Pt.prototype,"progressColor",2),c([p({attribute:"item-id"})],Pt.prototype,"itemId",2),c([p({attribute:"accept-uri"})],Pt.prototype,"acceptUri",2),c([p({type:Number,attribute:"reserved-until"})],Pt.prototype,"reservedUntil",2),c([p({type:Number,attribute:"auto-accept-delay"})],Pt.prototype,"autoAcceptDelay",2),c([p({type:Boolean,reflect:!0})],Pt.prototype,"rejectable",2),c([p({attribute:"accept-icon"})],Pt.prototype,"acceptIcon",2),c([p({attribute:"accept-gaid"})],Pt.prototype,"acceptGaid",2),c([p({attribute:"reject-icon"})],Pt.prototype,"rejectIcon",2),c([p({attribute:"reject-label"})],Pt.prototype,"rejectLabel",2);var HS=Pt;Pt.define("zn-channel-tile");function $h(i){let o=i.theme==="dark"?"rgb(161, 161, 170)":"rgb(113, 113, 122)",t=i.textColor??o,r=i.enableAnimations!==!1&&i.enableAnimations!==0,n=typeof i.enableAnimations=="number"?i.enableAnimations:1500;return{animation:r,animationDuration:n,animationEasing:"cubicOut",...i.colors?{color:i.colors}:{},textStyle:{color:t},tooltip:{trigger:"axis",appendTo:"body",valueFormatter:i.yAxisAppend?a=>`${a}${i.yAxisAppend}`:void 0},legend:{top:0,right:0,icon:"circle",textStyle:{color:t}},grid:{left:40,right:20,top:40,bottom:30}}}function FS(i){return i.length===0||i.every(o=>!o.data||o.data.length===0)}function Lh(i){let o=FS(i.data)?{min:0,max:6}:{},t=i.scale?{scale:!0,...typeof i.scale=="number"?{boundaryGap:[`${i.scale}%`,`${i.scale}%`]}:{}}:{};return{type:"value",...i.borderColor?{splitLine:{lineStyle:{color:i.borderColor}}}:{},...o,...t,axisLabel:i.yAxisAppend?{formatter:n=>`${n}${i.yAxisAppend}`}:{}}}function qh(i,o=!1){let t=i.borderColor?{axisLine:{lineStyle:{color:i.borderColor}}}:{};return i.xAxisType==="datetime"?{type:"time",...t}:i.xAxisType==="numeric"?{type:"value",...t}:{type:"category",data:i.categories,...o?{boundaryGap:!1}:{},...t}}function BS(i){return i.map(o=>o&&typeof o=="object"&&!Array.isArray(o)&&"x"in o&&"y"in o?[o.x,o.y]:o)}function Mh(i,o,t=()=>({})){return i.data.map(r=>({type:o,name:r.name,data:BS(r.data),...r.color?{itemStyle:{color:r.color}}:{},...i.stacked?{stack:"total"}:{},...i.enableAnimations!==!1&&i.enableAnimations!==0&&o==="bar"?{animationDelay:n=>n*50}:{},...t(r)}))}function Ih(i){return{...$h(i),xAxis:qh(i),yAxis:Lh(i),series:Mh(i,"bar")}}function Yb(i){return{...$h(i),xAxis:qh(i,!0),yAxis:Lh(i),series:Mh(i,"line",()=>({symbolSize:i.datapointSize,smooth:i.smooth}))}}function Xb(i){return{...$h(i),xAxis:qh(i,!0),yAxis:Lh(i),series:Mh(i,"line",()=>({symbolSize:i.datapointSize,smooth:i.smooth,areaStyle:{opacity:.1}}))}}function VS(i){let o=new Set,t=[];for(let r of i)o.has(r.source)||(o.add(r.source),t.push({name:r.source})),o.has(r.target)||(o.add(r.target),t.push({name:r.target}));return t}function Qb(i){let o=i.data[0]??{name:"",data:[]},t=o.data??[],n=o.nodes??VS(t),a=i.theme==="dark"?"rgb(161, 161, 170)":"rgb(113, 113, 122)",s=i.textColor??a,l=i.enableAnimations!==!1&&i.enableAnimations!==0,d=typeof i.enableAnimations=="number"?i.enableAnimations:1500;return{animation:l,animationDuration:d,animationEasing:"cubicOut",...i.colors?{color:i.colors}:{},textStyle:{color:s},tooltip:{trigger:"item",appendTo:"body"},series:[{type:"sankey",name:o.name,data:n,links:t,label:{color:s,textBorderWidth:0},lineStyle:{color:"source",opacity:i.theme==="dark"?.4:.3},emphasis:{focus:"adjacency"}}]}}var Jb;function Kc(){return Jb??(Jb=(async()=>{let[i,o,t,r]=await Promise.all([import("./chunks/zn.AI3T35DX.js"),import("./chunks/zn.EHO4QQOL.js"),import("./chunks/zn.6RARZYEJ.js"),import("./chunks/zn.S4ZVBYAS.js")]);return i.use([o.BarChart,o.LineChart,o.SankeyChart,t.GridComponent,t.TooltipComponent,t.LegendComponent,t.TitleComponent,t.DataZoomComponent,r.CanvasRenderer]),i})()),Jb}var Zb=A`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}:host *,:host *::before,:host *::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{display:inline-block;width:100%}.chart{position:relative}`;var ae=class extends C{constructor(){super(...arguments);this.type="bar";this.data=[];this.categories=[];this.datapointSize=1;this.stacked=!1;this.live=!1;this.dataUrl="";this.liveInterval=1e3;this.height=300;this.enableAnimations=!1;this.smooth=!1;this.scale=!1;this.resizeObserver=new Zt(this,{target:null,skipInitial:!0,callback:()=>this.chart?.resize()})}firstUpdated(t){this.initPromise=this.initChart().catch(()=>{}),super.firstUpdated(t)}async getUpdateComplete(){let t=await super.getUpdateComplete();return await this.initPromise,t}getTheme(){return this.getAttribute("t")==="dark"?"dark":"light"}getTextColor(){let t=getComputedStyle(this),r=t.getPropertyValue("--zn-text").trim();if(!r)return;let n=t.getPropertyValue("--zn-text-opacity").trim()||"1";return`rgba(${r}, ${n})`}getBorderColor(){let t=getComputedStyle(this).getPropertyValue("--zn-border-color").trim();return t?`rgb(${t})`:void 0}buildOption(){let t={type:this.type,data:this.data??[],categories:Array.isArray(this.categories)?this.categories:[],xAxisType:this.xAxis,yAxisAppend:this.yAxisAppend,stacked:this.stacked,enableAnimations:this.enableAnimations,datapointSize:this.datapointSize,colors:this.colors,theme:this.getTheme(),smooth:this.smooth,scale:this.scale,textColor:this.getTextColor(),borderColor:this.getBorderColor()};switch(this.type){case"bar":return Ih(t);case"line":return Yb(t);case"area":return Xb(t);case"sankey":return Qb(t);default:return Ih(t)}}async initChart(){let t=this.shadowRoot?.getElementById("chart");if(!t)return;t.style.height=`${this.height}px`;let r=await Kc();!this.isConnected||this.chart||(this.echarts=r,this.chart=r.init(t),this.chart.setOption(this.buildOption()),this.syncGroup&&(this.chart.group=this.syncGroup,r.connect(this.syncGroup)),this.resizeObserver.observe(t),this.live&&this.dataUrl&&this.startLive())}startLive(){this.liveTimer=window.setInterval(async()=>{try{let r=await(await fetch(this.dataUrl)).json();this.data=r,this.chart?.setOption({...this.buildOption()})}catch{}},this.liveInterval)}reinit(){this.chart?.dispose(),this.chart=void 0,this.initPromise=this.initChart().catch(()=>{})}attributeChangedCallback(t,r,n){if(super.attributeChangedCallback(t,r,n),!!this.chart){if(t==="t"){this.reinit();return}if(t==="type"){this.reinit();return}if(t==="height"){let a=this.shadowRoot?.getElementById("chart");a&&(a.style.height=`${this.height}px`),this.chart.resize();return}if(t==="sync-group"){n?(this.chart.group=n,this.echarts?.connect(n)):this.chart.group="";return}this.chart.setOption({...this.buildOption()})}}disconnectedCallback(){super.disconnectedCallback(),this.liveTimer&&clearInterval(this.liveTimer),this.chart?.dispose(),this.chart=void 0}render(){return u`<div class="chart"><div id="chart"></div></div>`}};ae.styles=E(Zb),c([p()],ae.prototype,"type",2),c([p({type:Array})],ae.prototype,"data",2),c([p({type:Array})],ae.prototype,"categories",2),c([p({attribute:"xaxis"})],ae.prototype,"xAxis",2),c([p({type:Number,attribute:"d-size"})],ae.prototype,"datapointSize",2),c([p({type:Boolean})],ae.prototype,"stacked",2),c([p({type:Boolean})],ae.prototype,"live",2),c([p({attribute:"data-url"})],ae.prototype,"dataUrl",2),c([p({attribute:"live-interval",type:Number})],ae.prototype,"liveInterval",2),c([p({type:Number,reflect:!0})],ae.prototype,"height",2),c([p({attribute:"enable-animations",converter:{fromAttribute:t=>{if(t===null)return!1;if(t===""||t==="true")return!0;let r=parseFloat(t);return Number.isNaN(r)?!0:r}}})],ae.prototype,"enableAnimations",2),c([p({attribute:"y-axis-append"})],ae.prototype,"yAxisAppend",2),c([p({type:Array})],ae.prototype,"colors",2),c([p({attribute:"sync-group"})],ae.prototype,"syncGroup",2),c([p({type:Boolean})],ae.prototype,"smooth",2),c([p({converter:{fromAttribute:t=>{if(t===null)return!1;if(t===""||t==="true")return!0;let r=parseFloat(t);return Number.isNaN(r)?!0:r}}})],ae.prototype,"scale",2);var US=ae;ae.define("zn-chart");var tv=A`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}:host *,:host *::before,:host *::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host>div,zn-simplechart>div{width:115px;height:50px;cursor:pointer}`;var jS=["Jun 2016","Jul 2016","Aug 2016","Sep 2016","Oct 2016","Nov 2016","Dec 2016","Jan 2017","Feb 2017","Mar 2017","Apr 2017","May 2017"],GS=[56.4,39.8,66.8,66.4,40.6,55.2,77.4,69.8,57.8,76,110.8,142.6],sn=class extends C{constructor(){super(...arguments);this.enableAnimations=!1;this.resizeObserver=new Zt(this,{target:null,skipInitial:!0,callback:()=>this.chart?.resize()})}firstUpdated(){this.initPromise=this.initChart().catch(()=>{})}async getUpdateComplete(){let t=await super.getUpdateComplete();return await this.initPromise,t}async initChart(){let t=this.shadowRoot?.getElementById("chart");if(!t)return;let r=await Kc();if(!this.isConnected||this.chart)return;this.chart=r.init(t);let n=this.datasets?.[0]?.data??GS,a=this.labels??jS,s=this.enableAnimations!==!1&&this.enableAnimations!==0,l=typeof this.enableAnimations=="number"?this.enableAnimations:1500;this.chart.setOption({animation:s,animationDuration:l,animationEasing:"cubicOut",tooltip:{trigger:"axis",appendTo:"body",backgroundColor:"rgba(0,0,0,0.7)",borderWidth:0,textStyle:{color:"#fff"}},xAxis:{type:"category",data:a,show:!1},yAxis:{type:"value",show:!1},grid:{left:0,right:0,top:0,bottom:0},series:[{type:"bar",data:n,barWidth:7,itemStyle:{color:"#29C1BC",borderRadius:10},emphasis:{itemStyle:{color:"#19837f"}}}]}),this.resizeObserver.observe(t)}disconnectedCallback(){super.disconnectedCallback(),this.chart?.dispose()}render(){return u`<div id="chart"></div>`}};sn.styles=E(tv),c([p({attribute:"datasets",type:Array})],sn.prototype,"datasets",2),c([p({attribute:"labels",type:Array})],sn.prototype,"labels",2),c([p({attribute:"enable-animations",converter:{fromAttribute:t=>{if(t===null)return!1;if(t===""||t==="true")return!0;let r=parseFloat(t);return Number.isNaN(r)?!0:r}}})],sn.prototype,"enableAnimations",2);var WS=sn;sn.define("zn-simple-chart");var ev=A`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}:host *,:host *::before,:host *::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{display:block}.header{flex-grow:1}.header .caption{justify-content:space-between;gap:var(--zn-base-gap);max-width:100%}.header__caption{font-weight:var(--zn-text-h1-font-weight);font-size:var(--zn-text-h1-font-size);color:rgba(var(--zn-text-panel-title),100%);line-height:var(--zn-icon-size,20px);margin:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;display:flex;gap:var(--zn-spacing-x-small);align-items:center;text-wrap:auto}.caption__back{display:flex;justify-content:center;align-items:center;color:inherit}:host([transparent])>div{background-color:transparent}:host([with-closer]) .content{padding-right:40px}:host([navigation])>div h1{padding-bottom:0}:host #nav-container{gap:0;border-bottom:1px solid rgb(var(--zn-border-color));margin:0 3px}.alt-overlay{display:none}:host(.alt-pressed) .alt-overlay:empty{display:none !important}:host(.alt-pressed) .alt-overlay{display:flex;gap:10px;align-items:flex-end;position:absolute;left:0;top:10px;padding:6px 15px;background:rgba(var(--zn-panel),0.95);z-index:10}:host(.alt-pressed) .alt-overlay a{display:flex}:host(.alt-pressed) .alt-overlay zn-icon:hover{color:rgb(var(--zn-primary));cursor:pointer}:host([transparent]) .header{margin:0}.header{display:flex;flex-direction:column;margin:0;overflow:hidden}.header .content{display:flex;flex-wrap:wrap;width:100%;max-width:100%;height:-moz-fit-content;height:fit-content;gap:10px;margin:0 auto;padding:var(--zn-base-gap)}.header__left{display:flex;justify-content:center;flex-direction:column;gap:1px;flex-shrink:1;max-width:100%}.header__right{flex-grow:1;flex-shrink:1;overflow-x:clip;overflow-y:visible;min-width:20px}.header .navless{min-height:10px}.header .content{position:relative;gap:10px}.header .breadcrumb{display:inline-flex;align-items:center;gap:var(--zn-spacing-2x-small);font:inherit;color:inherit}.header .breadcrumb::slotted(a){font:inherit;color:inherit;text-decoration:inherit}.header .breadcrumb::slotted(a:hover){color:rgb(var(--zn-primary))}.header .breadcrumb::slotted(a)::after{content:">";margin-left:var(--zn-spacing-2x-small);color:rgb(var(--zn-text-muted));font-weight:var(--zn-font-weight-normal)}.header .caption{flex-grow:1;display:flex;align-items:center;gap:10px;max-width:100%;line-height:var(--zn-icon-size,20px)}.header .caption a{display:flex;align-items:center;color:inherit;text-decoration:none}.header .caption a zn-icon{cursor:pointer}.header .caption a zn-icon:hover{color:rgb(var(--zn-primary))}.header h1{flex-grow:1;overflow:hidden;text-overflow:ellipsis;color:rgb(var(--zn-text-page-title));margin:0;font-size:var(--zn-font-size-medium);font-weight:var(--zn-font-weight-medium)}@media screen and (min-width:var(--zn-container-lg)){.header h1{font-size:var(--zn-font-size-large)}}.header h1:empty{display:none}.header slot{display:flex;align-items:center;flex-wrap:wrap;gap:var(--zn-spacing-small);word-break:break-word}.header slot[name=nav]{flex-basis:100%}.header slot[name=actions]{justify-content:end;flex-wrap:nowrap;height:var(--zn-icon-size,20px)}.header slot[name=actions]::slotted(zn-button-menu){flex-grow:1;flex-shrink:1}.header .actions{display:flex}:host([baseless]) .header{border-bottom:none !important}`;var Ie=class extends C{constructor(){super(...arguments);this.hasSlotController=new J(this,"[default]","nav","breadcrumb");this.transparent=!1;this.navigation=[];this.hideBreadcrumb=!1;this.handleAltPress=()=>{this.classList.toggle("alt-pressed",!0)};this.handleAltUp=()=>{this.classList.toggle("alt-pressed",!1)}}connectedCallback(){super.connectedCallback(),window.addEventListener("alt-press",this.handleAltPress),window.addEventListener("alt-up",this.handleAltUp)}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("alt-press",this.handleAltPress),window.removeEventListener("alt-up",this.handleAltUp)}firstUpdated(t){super.firstUpdated(t),this.navbar=this.querySelector("zn-navbar"),this.updateNav()}updateNav(){if(!this.navbar&&this.navigation&&this.navigation.length>0){this.navbar=document.createElement("zn-navbar");let t=this.shadowRoot?.querySelector("#nav-container");t&&t.appendChild(this.navbar)}this.navbar&&(this.navbar.navigation=this.navigation,this.navbar.setAttribute("baseless",""))}render(){let t=this.hasSlotController.test("[default]"),r=this.hasSlotController.test("nav"),n=this.navigation&&this.navigation.length>0||r,a=this.previousPath,s=this.entityId,l=this.fullLocation,d=!this.hideBreadcrumb&&this.hasSlotController.test("breadcrumb"),h=u`
1182
+ </slot>`}};Pt.styles=E(Kb),c([p({type:Boolean,reflect:!0})],Pt.prototype,"available",2),c([p({type:Boolean,reflect:!0})],Pt.prototype,"incoming",2),c([p({reflect:!0})],Pt.prototype,"variant",2),c([p()],Pt.prototype,"header",2),c([p()],Pt.prototype,"icon",2),c([p({reflect:!0})],Pt.prototype,"color",2),c([p()],Pt.prototype,"title",2),c([p()],Pt.prototype,"subtitle",2),c([p({type:Number})],Pt.prototype,"progress",2),c([p({attribute:"progress-color"})],Pt.prototype,"progressColor",2),c([p({attribute:"item-id"})],Pt.prototype,"itemId",2),c([p({attribute:"accept-uri"})],Pt.prototype,"acceptUri",2),c([p({type:Number,attribute:"reserved-until"})],Pt.prototype,"reservedUntil",2),c([p({type:Number,attribute:"auto-accept-delay"})],Pt.prototype,"autoAcceptDelay",2),c([p({type:Boolean,reflect:!0})],Pt.prototype,"rejectable",2),c([p({attribute:"accept-icon"})],Pt.prototype,"acceptIcon",2),c([p({attribute:"accept-gaid"})],Pt.prototype,"acceptGaid",2),c([p({attribute:"reject-icon"})],Pt.prototype,"rejectIcon",2),c([p({attribute:"reject-label"})],Pt.prototype,"rejectLabel",2);var HS=Pt;Pt.define("zn-channel-tile");function $h(i){let o=i.theme==="dark"?"rgb(161, 161, 170)":"rgb(113, 113, 122)",t=i.textColor??o,r=i.enableAnimations!==!1&&i.enableAnimations!==0,n=typeof i.enableAnimations=="number"?i.enableAnimations:1500;return{animation:r,animationDuration:n,animationEasing:"cubicOut",...i.colors?{color:i.colors}:{},textStyle:{color:t},tooltip:{trigger:"axis",appendTo:"body",valueFormatter:i.yAxisAppend?a=>`${a}${i.yAxisAppend}`:void 0},legend:{top:0,right:0,icon:"circle",textStyle:{color:t}},grid:{left:40,right:20,top:40,bottom:30}}}function FS(i){return i.length===0||i.every(o=>!o.data||o.data.length===0)}function Lh(i){let o=FS(i.data)?{min:0,max:6}:{},t=i.scale?{scale:!0,...typeof i.scale=="number"?{boundaryGap:[`${i.scale}%`,`${i.scale}%`]}:{}}:{};return{type:"value",...i.borderColor?{splitLine:{lineStyle:{color:i.borderColor}}}:{},...o,...t,axisLabel:i.yAxisAppend?{formatter:n=>`${n}${i.yAxisAppend}`}:{}}}function qh(i,o=!1){let t=i.borderColor?{axisLine:{lineStyle:{color:i.borderColor}}}:{};return i.xAxisType==="datetime"?{type:"time",...t}:i.xAxisType==="numeric"?{type:"value",...t}:{type:"category",data:i.categories,...o?{boundaryGap:!1}:{},...t}}function BS(i){return i.map(o=>o&&typeof o=="object"&&!Array.isArray(o)&&"x"in o&&"y"in o?[o.x,o.y]:o)}function Mh(i,o,t=()=>({})){return i.data.map(r=>({type:o,name:r.name,data:BS(r.data),...r.color?{itemStyle:{color:r.color}}:{},...i.stacked?{stack:"total"}:{},...i.enableAnimations!==!1&&i.enableAnimations!==0&&o==="bar"?{animationDelay:n=>n*50}:{},...t(r)}))}function Ih(i){return{...$h(i),xAxis:qh(i),yAxis:Lh(i),series:Mh(i,"bar")}}function Yb(i){return{...$h(i),xAxis:qh(i,!0),yAxis:Lh(i),series:Mh(i,"line",()=>({symbolSize:i.datapointSize,smooth:i.smooth}))}}function Xb(i){return{...$h(i),xAxis:qh(i,!0),yAxis:Lh(i),series:Mh(i,"line",()=>({symbolSize:i.datapointSize,smooth:i.smooth,areaStyle:{opacity:.1}}))}}function VS(i){let o=new Set,t=[];for(let r of i)o.has(r.source)||(o.add(r.source),t.push({name:r.source})),o.has(r.target)||(o.add(r.target),t.push({name:r.target}));return t}function Qb(i){let o=i.data[0]??{name:"",data:[]},t=o.data??[],n=o.nodes??VS(t),a=i.theme==="dark"?"rgb(161, 161, 170)":"rgb(113, 113, 122)",s=i.textColor??a,l=i.enableAnimations!==!1&&i.enableAnimations!==0,d=typeof i.enableAnimations=="number"?i.enableAnimations:1500;return{animation:l,animationDuration:d,animationEasing:"cubicOut",...i.colors?{color:i.colors}:{},textStyle:{color:s},tooltip:{trigger:"item",appendTo:"body"},series:[{type:"sankey",name:o.name,data:n,links:t,label:{color:s,textBorderWidth:0},lineStyle:{color:"source",opacity:i.theme==="dark"?.4:.3},emphasis:{focus:"adjacency"}}]}}var Jb;function Kc(){return Jb??(Jb=(async()=>{let[i,o,t,r]=await Promise.all([import("./chunks/zn.AI3T35DX.js"),import("./chunks/zn.EHO4QQOL.js"),import("./chunks/zn.6RARZYEJ.js"),import("./chunks/zn.S4ZVBYAS.js")]);return i.use([o.BarChart,o.LineChart,o.SankeyChart,t.GridComponent,t.TooltipComponent,t.LegendComponent,t.TitleComponent,t.DataZoomComponent,r.CanvasRenderer]),i})()),Jb}var Zb=A`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}:host *,:host *::before,:host *::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{display:inline-block;width:100%}.chart{position:relative}`;var se=class extends C{constructor(){super(...arguments);this.type="bar";this.data=[];this.categories=[];this.datapointSize=1;this.stacked=!1;this.live=!1;this.dataUrl="";this.liveInterval=1e3;this.height=300;this.enableAnimations=!1;this.smooth=!1;this.scale=!1;this.resizeObserver=new Zt(this,{target:null,skipInitial:!0,callback:()=>this.chart?.resize()})}firstUpdated(t){this.initPromise=this.initChart().catch(()=>{}),super.firstUpdated(t)}async getUpdateComplete(){let t=await super.getUpdateComplete();return await this.initPromise,t}getTheme(){return this.getAttribute("t")==="dark"?"dark":"light"}getTextColor(){let t=getComputedStyle(this),r=t.getPropertyValue("--zn-text").trim();if(!r)return;let n=t.getPropertyValue("--zn-text-opacity").trim()||"1";return`rgba(${r}, ${n})`}getBorderColor(){let t=getComputedStyle(this).getPropertyValue("--zn-border-color").trim();return t?`rgb(${t})`:void 0}buildOption(){let t={type:this.type,data:this.data??[],categories:Array.isArray(this.categories)?this.categories:[],xAxisType:this.xAxis,yAxisAppend:this.yAxisAppend,stacked:this.stacked,enableAnimations:this.enableAnimations,datapointSize:this.datapointSize,colors:this.colors,theme:this.getTheme(),smooth:this.smooth,scale:this.scale,textColor:this.getTextColor(),borderColor:this.getBorderColor()};switch(this.type){case"bar":return Ih(t);case"line":return Yb(t);case"area":return Xb(t);case"sankey":return Qb(t);default:return Ih(t)}}async initChart(){let t=this.shadowRoot?.getElementById("chart");if(!t)return;t.style.height=`${this.height}px`;let r=await Kc();!this.isConnected||this.chart||(this.echarts=r,this.chart=r.init(t),this.chart.setOption(this.buildOption()),this.syncGroup&&(this.chart.group=this.syncGroup,r.connect(this.syncGroup)),this.resizeObserver.observe(t),this.live&&this.dataUrl&&this.startLive())}startLive(){this.liveTimer=window.setInterval(async()=>{try{let r=await(await fetch(this.dataUrl)).json();this.data=r,this.chart?.setOption({...this.buildOption()})}catch{}},this.liveInterval)}reinit(){this.chart?.dispose(),this.chart=void 0,this.initPromise=this.initChart().catch(()=>{})}attributeChangedCallback(t,r,n){if(super.attributeChangedCallback(t,r,n),!!this.chart){if(t==="t"){this.reinit();return}if(t==="type"){this.reinit();return}if(t==="height"){let a=this.shadowRoot?.getElementById("chart");a&&(a.style.height=`${this.height}px`),this.chart.resize();return}if(t==="sync-group"){n?(this.chart.group=n,this.echarts?.connect(n)):this.chart.group="";return}this.chart.setOption({...this.buildOption()})}}disconnectedCallback(){super.disconnectedCallback(),this.liveTimer&&clearInterval(this.liveTimer),this.chart?.dispose(),this.chart=void 0}render(){return u`<div class="chart"><div id="chart"></div></div>`}};se.styles=E(Zb),c([p()],se.prototype,"type",2),c([p({type:Array})],se.prototype,"data",2),c([p({type:Array})],se.prototype,"categories",2),c([p({attribute:"xaxis"})],se.prototype,"xAxis",2),c([p({type:Number,attribute:"d-size"})],se.prototype,"datapointSize",2),c([p({type:Boolean})],se.prototype,"stacked",2),c([p({type:Boolean})],se.prototype,"live",2),c([p({attribute:"data-url"})],se.prototype,"dataUrl",2),c([p({attribute:"live-interval",type:Number})],se.prototype,"liveInterval",2),c([p({type:Number,reflect:!0})],se.prototype,"height",2),c([p({attribute:"enable-animations",converter:{fromAttribute:t=>{if(t===null)return!1;if(t===""||t==="true")return!0;let r=parseFloat(t);return Number.isNaN(r)?!0:r}}})],se.prototype,"enableAnimations",2),c([p({attribute:"y-axis-append"})],se.prototype,"yAxisAppend",2),c([p({type:Array})],se.prototype,"colors",2),c([p({attribute:"sync-group"})],se.prototype,"syncGroup",2),c([p({type:Boolean})],se.prototype,"smooth",2),c([p({converter:{fromAttribute:t=>{if(t===null)return!1;if(t===""||t==="true")return!0;let r=parseFloat(t);return Number.isNaN(r)?!0:r}}})],se.prototype,"scale",2);var US=se;se.define("zn-chart");var tv=A`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}:host *,:host *::before,:host *::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host>div,zn-simplechart>div{width:115px;height:50px;cursor:pointer}`;var jS=["Jun 2016","Jul 2016","Aug 2016","Sep 2016","Oct 2016","Nov 2016","Dec 2016","Jan 2017","Feb 2017","Mar 2017","Apr 2017","May 2017"],GS=[56.4,39.8,66.8,66.4,40.6,55.2,77.4,69.8,57.8,76,110.8,142.6],sn=class extends C{constructor(){super(...arguments);this.enableAnimations=!1;this.resizeObserver=new Zt(this,{target:null,skipInitial:!0,callback:()=>this.chart?.resize()})}firstUpdated(){this.initPromise=this.initChart().catch(()=>{})}async getUpdateComplete(){let t=await super.getUpdateComplete();return await this.initPromise,t}async initChart(){let t=this.shadowRoot?.getElementById("chart");if(!t)return;let r=await Kc();if(!this.isConnected||this.chart)return;this.chart=r.init(t);let n=this.datasets?.[0]?.data??GS,a=this.labels??jS,s=this.enableAnimations!==!1&&this.enableAnimations!==0,l=typeof this.enableAnimations=="number"?this.enableAnimations:1500;this.chart.setOption({animation:s,animationDuration:l,animationEasing:"cubicOut",tooltip:{trigger:"axis",appendTo:"body",backgroundColor:"rgba(0,0,0,0.7)",borderWidth:0,textStyle:{color:"#fff"}},xAxis:{type:"category",data:a,show:!1},yAxis:{type:"value",show:!1},grid:{left:0,right:0,top:0,bottom:0},series:[{type:"bar",data:n,barWidth:7,itemStyle:{color:"#29C1BC",borderRadius:10},emphasis:{itemStyle:{color:"#19837f"}}}]}),this.resizeObserver.observe(t)}disconnectedCallback(){super.disconnectedCallback(),this.chart?.dispose()}render(){return u`<div id="chart"></div>`}};sn.styles=E(tv),c([p({attribute:"datasets",type:Array})],sn.prototype,"datasets",2),c([p({attribute:"labels",type:Array})],sn.prototype,"labels",2),c([p({attribute:"enable-animations",converter:{fromAttribute:t=>{if(t===null)return!1;if(t===""||t==="true")return!0;let r=parseFloat(t);return Number.isNaN(r)?!0:r}}})],sn.prototype,"enableAnimations",2);var WS=sn;sn.define("zn-simple-chart");var ev=A`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}:host *,:host *::before,:host *::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{display:block}.header{flex-grow:1}.header .caption{justify-content:space-between;gap:var(--zn-base-gap);max-width:100%}.header__caption{font-weight:var(--zn-text-h1-font-weight);font-size:var(--zn-text-h1-font-size);color:rgba(var(--zn-text-panel-title),100%);line-height:var(--zn-icon-size,20px);margin:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;display:flex;gap:var(--zn-spacing-x-small);align-items:center;text-wrap:auto}.caption__back{display:flex;justify-content:center;align-items:center;color:inherit}:host([transparent])>div{background-color:transparent}:host([with-closer]) .content{padding-right:40px}:host([navigation])>div h1{padding-bottom:0}:host #nav-container{gap:0;border-bottom:1px solid rgb(var(--zn-border-color));margin:0 3px}.alt-overlay{display:none}:host(.alt-pressed) .alt-overlay:empty{display:none !important}:host(.alt-pressed) .alt-overlay{display:flex;gap:10px;align-items:flex-end;position:absolute;left:0;top:10px;padding:6px 15px;background:rgba(var(--zn-panel),0.95);z-index:10}:host(.alt-pressed) .alt-overlay a{display:flex}:host(.alt-pressed) .alt-overlay zn-icon:hover{color:rgb(var(--zn-primary));cursor:pointer}:host([transparent]) .header{margin:0}.header{display:flex;flex-direction:column;margin:0;overflow:hidden}.header .content{display:flex;flex-wrap:wrap;width:100%;max-width:100%;height:-moz-fit-content;height:fit-content;gap:10px;margin:0 auto;padding:var(--zn-base-gap)}.header__left{display:flex;justify-content:center;flex-direction:column;gap:1px;flex-shrink:1;max-width:100%}.header__right{flex-grow:1;flex-shrink:1;overflow-x:clip;overflow-y:visible;min-width:20px}.header .navless{min-height:10px}.header .content{position:relative;gap:10px}.header .breadcrumb{display:inline-flex;align-items:center;gap:var(--zn-spacing-2x-small);font:inherit;color:inherit}.header .breadcrumb::slotted(a){font:inherit;color:inherit;text-decoration:inherit}.header .breadcrumb::slotted(a:hover){color:rgb(var(--zn-primary))}.header .breadcrumb::slotted(a)::after{content:">";margin-left:var(--zn-spacing-2x-small);color:rgb(var(--zn-text-muted));font-weight:var(--zn-font-weight-normal)}.header .caption{flex-grow:1;display:flex;align-items:center;gap:10px;max-width:100%;line-height:var(--zn-icon-size,20px)}.header .caption a{display:flex;align-items:center;color:inherit;text-decoration:none}.header .caption a zn-icon{cursor:pointer}.header .caption a zn-icon:hover{color:rgb(var(--zn-primary))}.header h1{flex-grow:1;overflow:hidden;text-overflow:ellipsis;color:rgb(var(--zn-text-page-title));margin:0;font-size:var(--zn-font-size-medium);font-weight:var(--zn-font-weight-medium)}@media screen and (min-width:var(--zn-container-lg)){.header h1{font-size:var(--zn-font-size-large)}}.header h1:empty{display:none}.header slot{display:flex;align-items:center;flex-wrap:wrap;gap:var(--zn-spacing-small);word-break:break-word}.header slot[name=nav]{flex-basis:100%}.header slot[name=actions]{justify-content:end;flex-wrap:nowrap;height:var(--zn-icon-size,20px)}.header slot[name=actions]::slotted(zn-button-menu){flex-grow:1;flex-shrink:1}.header .actions{display:flex}:host([baseless]) .header{border-bottom:none !important}`;var Ie=class extends C{constructor(){super(...arguments);this.hasSlotController=new J(this,"[default]","nav","breadcrumb");this.transparent=!1;this.navigation=[];this.hideBreadcrumb=!1;this.handleAltPress=()=>{this.classList.toggle("alt-pressed",!0)};this.handleAltUp=()=>{this.classList.toggle("alt-pressed",!1)}}connectedCallback(){super.connectedCallback(),window.addEventListener("alt-press",this.handleAltPress),window.addEventListener("alt-up",this.handleAltUp)}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("alt-press",this.handleAltPress),window.removeEventListener("alt-up",this.handleAltUp)}firstUpdated(t){super.firstUpdated(t),this.navbar=this.querySelector("zn-navbar"),this.updateNav()}updateNav(){if(!this.navbar&&this.navigation&&this.navigation.length>0){this.navbar=document.createElement("zn-navbar");let t=this.shadowRoot?.querySelector("#nav-container");t&&t.appendChild(this.navbar)}this.navbar&&(this.navbar.navigation=this.navigation,this.navbar.setAttribute("baseless",""))}render(){let t=this.hasSlotController.test("[default]"),r=this.hasSlotController.test("nav"),n=this.navigation&&this.navigation.length>0||r,a=this.previousPath,s=this.entityId,l=this.fullLocation,d=!this.hideBreadcrumb&&this.hasSlotController.test("breadcrumb"),h=u`
1180
1183
  <div class="${N({header:!0,"header--transparent":this.transparent,"header--full-width":this.fullWidth,"header--has-nav":n,"header--has-breadcrumb":d,"header--has-previous":a,"header--has-entity-id":s,"header--has-full-location":l})}" part="base">
1181
1184
 
1182
1185
  ${l||s?u`
@@ -2125,7 +2128,7 @@ import{a as kn,b as H1,c as ar,d as c,e as V}from"./chunks/zn.UBLZO6CI.js";var B
2125
2128
  <slot name="footer"></slot>
2126
2129
  </div>
2127
2130
  </div>
2128
- `}};pn.styles=E(Sv),c([p({attribute:"start-scrolled",type:Boolean,reflect:!0})],pn.prototype,"startScrolled",2),c([F(".scroll-container")],pn.prototype,"container",2),c([F(".scroll-footer")],pn.prototype,"footer",2);var uC=pn;pn.define("zn-scroll-container");function se(i){let o=document.createDocumentFragment();return Ca(i,o),o.firstElementChild}var Cv=A`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}:host *,:host *::before,:host *::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}button,.zn-button{border-radius:var(--zn-border-radius);display:inline-flex;align-items:center;justify-content:center;padding:var(--zn-base-px);margin:auto;width:-moz-fit-content;width:fit-content;background-color:rgb(var(--zn-primary));color:rgba(255,255,255,0.9);font-size:var(--zn-text-button-label-font-size);font-weight:var(--zn-text-button-label-font-weight);line-height:var(--zn-text-button-label-line-height);text-transform:var(--zn-text-button-label-transform);cursor:pointer;vertical-align:middle;border-color:transparent;white-space:nowrap;max-height:36px;height:36px;min-height:36px}button:hover:not([disabled]),.zn-button:hover:not([disabled]){background-color:rgba(var(--zn-primary),0.8)}input[type=date],input[type=datetime-local],input[type=email],input[type=month],input[type=number],input[type=password],input[type=search],input[type=tel],input[type=text],input[type=time],input[type=url],input[type=week],input[type=file],input[list],textarea,select{display:block;width:100%;border-radius:5px;border-style:solid;border-width:1px !important;border-color:rgb(var(--zn-border-color));background-color:rgb(var(--zn-input-bg));outline:none}input[type=date]:focus,input[type=datetime-local]:focus,input[type=email]:focus,input[type=month]:focus,input[type=number]:focus,input[type=password]:focus,input[type=search]:focus,input[type=tel]:focus,input[type=text]:focus,input[type=time]:focus,input[type=url]:focus,input[type=week]:focus,input[type=file]:focus,input[list]:focus,textarea:focus,select:focus{border-color:rgb(var(--zn-primary));box-shadow:0 0 0 3px rgba(var(--zn-primary),0.3)}input[type=date]::-moz-placeholder, input[type=datetime-local]::-moz-placeholder, input[type=email]::-moz-placeholder, input[type=month]::-moz-placeholder, input[type=number]::-moz-placeholder, input[type=password]::-moz-placeholder, input[type=search]::-moz-placeholder, input[type=tel]::-moz-placeholder, input[type=text]::-moz-placeholder, input[type=time]::-moz-placeholder, input[type=url]::-moz-placeholder, input[type=week]::-moz-placeholder, input[type=file]::-moz-placeholder, input[list]::-moz-placeholder, textarea::-moz-placeholder, select::-moz-placeholder{font-weight:400;color:rgba(var(--zn-text),0.6)}input[type=date]::placeholder,input[type=datetime-local]::placeholder,input[type=email]::placeholder,input[type=month]::placeholder,input[type=number]::placeholder,input[type=password]::placeholder,input[type=search]::placeholder,input[type=tel]::placeholder,input[type=text]::placeholder,input[type=time]::placeholder,input[type=url]::placeholder,input[type=week]::placeholder,input[type=file]::placeholder,input[list]::placeholder,textarea::placeholder,select::placeholder{font-weight:400;color:rgba(var(--zn-text),0.6)}@media (min-width:360px){input[type=date],input[type=datetime-local],input[type=email],input[type=month],input[type=number],input[type=password],input[type=search],input[type=tel],input[type=text],input[type=time],input[type=url],input[type=week],input[type=file],input[list],textarea,select{padding:8px}}label{font-weight:600;font-size:rgb(var(--zn-font-size-medium));line-height:var(--zn-spacing-medium);color:rgb(var(--zn-text-heading));display:block;margin-bottom:4px;margin-top:16px}input[type=checkbox],input[type=radio]{border-radius:5px}input[type=radio]{border-radius:50%}input[type=range]{-webkit-appearance:none;-moz-appearance:none;appearance:none;border-radius:10px;background-color:rgb(var(--zn-border-color));height:8px;accent-color:rgb(var(--zn-primary));width:100%;max-width:768px}fieldset{border-color:rgba(var(--zn-primary),20%);border-width:2px;padding:0 16px 16px}select option{padding:4px}select>option:checked{background-color:rgba(var(--zn-primary),20%);border-radius:5px}fieldset>legend{padding:4px}input[type=button],input[type=submit],button[type=submit]:not(.button),button[type=button]:not(.button){border-radius:var(--zn-border-radius);display:inline-flex;align-items:center;justify-content:center;padding:var(--zn-base-px);margin:auto;width:-moz-fit-content;width:fit-content;background-color:rgb(var(--zn-primary));color:rgba(255,255,255,0.9);font-size:var(--zn-text-button-label-font-size);font-weight:var(--zn-text-button-label-font-weight);line-height:var(--zn-text-button-label-line-height);text-transform:var(--zn-text-button-label-transform);cursor:pointer;vertical-align:middle;border-color:transparent;white-space:nowrap;max-height:36px;height:36px;min-height:36px}input[type=button]:hover:not([disabled]),input[type=submit]:hover:not([disabled]),button[type=submit]:not(.button):hover:not([disabled]),button[type=button]:not(.button):hover:not([disabled]){background-color:rgba(var(--zn-primary),0.8)}input[type=button],input[type=submit],button[type=submit]:not(.button),button[type=button]:not(.button){width:auto}div+button{margin-top:16px}input[type=file]::-webkit-file-upload-button{border-radius:var(--zn-border-radius);display:inline-flex;align-items:center;justify-content:center;padding:var(--zn-base-px);margin:auto;width:fit-content;background-color:rgb(var(--zn-primary));color:rgba(255,255,255,0.9);font-size:var(--zn-text-button-label-font-size);font-weight:var(--zn-text-button-label-font-weight);line-height:var(--zn-text-button-label-line-height);text-transform:var(--zn-text-button-label-transform);cursor:pointer;vertical-align:middle;border-color:transparent;white-space:nowrap;max-height:36px;height:36px;min-height:36px}input[type=file]::-webkit-file-upload-button:hover:not([disabled]){background-color:rgba(var(--zn-primary),0.8)}input[type=file]::-webkit-file-upload-button{margin-right:8px}input::-webkit-calendar-picker-indicator{cursor:pointer;padding:8px}input[list]::-webkit-calendar-picker-indicator{padding:8px 4px}.input--with-icon{position:relative}.input--with-icon zn-icon{padding:14px;position:absolute;top:50%;pointer-events:none;transform:translateY(-50%);left:8px;background-color:rgb(var(--zn-primary));color:rgb(var(--zn-text));border-radius:50%}.input--with-icon input{padding-left:40px}input:-webkit-autofill,input:-webkit-autofill:hover,input:-webkit-autofill:focus,input:-webkit-autofill:active{-webkit-background-clip:text;-webkit-text-fill-color:rgb(var(--zn-text));-webkit-transition:background-color 5000s ease-in-out 0s;transition:background-color 5000s ease-in-out 0s;box-shadow:inset 0 0 20px 20px rgba(35,35,35,0.1607843137)}select{height:43px}.no-border{border:none !important}.air-datepicker-cell.-year-.-other-decade-,.air-datepicker-cell.-day-.-other-month-{color:var(--adp-color-other-month)}.air-datepicker-cell.-year-.-other-decade-:hover,.air-datepicker-cell.-day-.-other-month-:hover{color:var(--adp-color-other-month-hover)}.-disabled-.-focus-.air-datepicker-cell.-year-.-other-decade-,.-disabled-.-focus-.air-datepicker-cell.-day-.-other-month-{color:var(--adp-color-other-month)}.-selected-.air-datepicker-cell.-year-.-other-decade-,.-selected-.air-datepicker-cell.-day-.-other-month-{color:#fff;background:var(--adp-background-color-selected-other-month)}.-selected-.-focus-.air-datepicker-cell.-year-.-other-decade-,.-selected-.-focus-.air-datepicker-cell.-day-.-other-month-{background:var(--adp-background-color-selected-other-month-focused)}.-in-range-.air-datepicker-cell.-year-.-other-decade-,.-in-range-.air-datepicker-cell.-day-.-other-month-{background-color:var(--adp-background-color-in-range);color:var(--adp-color)}.-in-range-.-focus-.air-datepicker-cell.-year-.-other-decade-,.-in-range-.-focus-.air-datepicker-cell.-day-.-other-month-{background-color:var(--adp-background-color-in-range-focused)}.air-datepicker-cell.-year-.-other-decade-:empty,.air-datepicker-cell.-day-.-other-month-:empty{background:none;border:none}.air-datepicker-cell{border-radius:var(--adp-cell-border-radius);box-sizing:border-box;cursor:pointer;display:flex;position:relative;align-items:center;justify-content:center;z-index:1}.air-datepicker-cell.-focus-{background:var(--adp-cell-background-color-hover)}.air-datepicker-cell.-current-{color:var(--adp-color-current-date)}.air-datepicker-cell.-current-.-focus-{color:var(--adp-color)}.air-datepicker-cell.-current-.-in-range-{color:var(--adp-color-current-date)}.air-datepicker-cell.-disabled-{cursor:default;color:var(--adp-color-disabled)}.air-datepicker-cell.-disabled-.-focus-{color:var(--adp-color-disabled)}.air-datepicker-cell.-disabled-.-in-range-{color:var(--adp-color-disabled-in-range)}.air-datepicker-cell.-disabled-.-current-.-focus-{color:var(--adp-color-disabled)}.air-datepicker-cell.-in-range-{background:var(--adp-cell-background-color-in-range);border-radius:0}.air-datepicker-cell.-in-range-:hover,.air-datepicker-cell.-in-range-.-focus-{background:var(--adp-cell-background-color-in-range-hover)}.air-datepicker-cell.-range-from-{border:1px solid var(--adp-cell-border-color-in-range);background-color:var(--adp-cell-background-color-in-range);border-radius:var(--adp-cell-border-radius) 0 0 var(--adp-cell-border-radius)}.air-datepicker-cell.-range-to-{border:1px solid var(--adp-cell-border-color-in-range);background-color:var(--adp-cell-background-color-in-range);border-radius:0 var(--adp-cell-border-radius) var(--adp-cell-border-radius) 0}.air-datepicker-cell.-range-to-.-range-from-{border-radius:var(--adp-cell-border-radius)}.air-datepicker-cell.-selected-{color:#fff;border:none;background:var(--adp-cell-background-color-selected)}.air-datepicker-cell.-selected-.-current-{color:#fff;background:var(--adp-cell-background-color-selected)}.air-datepicker-cell.-selected-.-focus-{background:var(--adp-cell-background-color-selected-hover)}.air-datepicker-body{transition:all var(--adp-transition-duration) var(--adp-transition-ease)}.air-datepicker-body.-hidden-{display:none}.air-datepicker-body--day-names{display:grid;grid-template-columns:repeat(7,var(--adp-day-cell-width));margin:8px 0 3px}.air-datepicker-body--day-name{color:var(--adp-day-name-color);display:flex;align-items:center;justify-content:center;flex:1;text-align:center;text-transform:uppercase;font-size:0.8em}.air-datepicker-body--day-name.-clickable-{cursor:pointer}.air-datepicker-body--day-name.-clickable-:hover{color:var(--adp-day-name-color-hover)}.air-datepicker-body--cells{display:grid}.air-datepicker-body--cells.-days-{grid-template-columns:repeat(7,var(--adp-day-cell-width));grid-auto-rows:var(--adp-day-cell-height)}.air-datepicker-body--cells.-months-{grid-template-columns:repeat(3,1fr);grid-auto-rows:var(--adp-month-cell-height)}.air-datepicker-body--cells.-years-{grid-template-columns:repeat(4,1fr);grid-auto-rows:var(--adp-year-cell-height)}.air-datepicker-nav{display:flex;justify-content:space-between;border-bottom:1px solid var(--adp-border-color-inner);min-height:var(--adp-nav-height);padding:var(--adp-padding);box-sizing:content-box}.-only-timepicker- .air-datepicker-nav{display:none}.air-datepicker-nav--title,.air-datepicker-nav--action{display:flex;cursor:pointer;align-items:center;justify-content:center}.air-datepicker-nav--action{width:var(--adp-nav-action-size);border-radius:var(--adp-border-radius);-webkit-user-select:none;-moz-user-select:none;user-select:none}.air-datepicker-nav--action:hover{background:var(--adp-background-color-hover)}.air-datepicker-nav--action:active{background:var(--adp-background-color-active)}.air-datepicker-nav--action.-disabled-{visibility:hidden}.air-datepicker-nav--action svg{width:32px;height:32px}.air-datepicker-nav--action path{fill:none;stroke:var(--adp-nav-arrow-color);stroke-width:2px}.air-datepicker-nav--title{border-radius:var(--adp-border-radius);padding:0 8px}.air-datepicker-nav--title i{font-style:normal;color:var(--adp-nav-color-secondary);margin-left:0.3em}.air-datepicker-nav--title:hover{background:var(--adp-background-color-hover)}.air-datepicker-nav--title:active{background:var(--adp-background-color-active)}.air-datepicker-nav--title.-disabled-{cursor:default;background:none}.air-datepicker-buttons{display:grid;grid-auto-columns:1fr;grid-auto-flow:column}.air-datepicker-button{display:inline-flex;color:var(--adp-btn-color);border-radius:var(--adp-btn-border-radius);cursor:pointer;height:var(--adp-btn-height);border:none;background:rgba(255,255,255,0)}.air-datepicker-button:hover{color:var(--adp-btn-color-hover);background:var(--adp-btn-background-color-hover)}.air-datepicker-button:focus{color:var(--adp-btn-color-hover);background:var(--adp-btn-background-color-hover);outline:none}.air-datepicker-button:active{background:var(--adp-btn-background-color-active)}.air-datepicker-button span{outline:none;display:flex;align-items:center;justify-content:center;width:100%;height:100%}.air-datepicker-time{display:grid;grid-template-columns:max-content 1fr;grid-column-gap:12px;align-items:center;position:relative;padding:0 var(--adp-time-padding-inner)}.-only-timepicker- .air-datepicker-time{border-top:none}.air-datepicker-time--current{display:flex;align-items:center;flex:1;font-size:14px;text-align:center}.air-datepicker-time--current-colon{margin:0 2px 3px;line-height:1}.air-datepicker-time--current-hours,.air-datepicker-time--current-minutes{line-height:1;font-size:19px;font-family:"Century Gothic",CenturyGothic,AppleGothic,sans-serif;position:relative;z-index:1}.air-datepicker-time--current-hours:after,.air-datepicker-time--current-minutes:after{content:"";background:var(--adp-background-color-hover);border-radius:var(--adp-border-radius);position:absolute;left:-2px;top:-3px;right:-2px;bottom:-2px;z-index:-1;opacity:0}.air-datepicker-time--current-hours.-focus-:after,.air-datepicker-time--current-minutes.-focus-:after{opacity:1}.air-datepicker-time--current-ampm{text-transform:uppercase;align-self:flex-end;color:var(--adp-time-day-period-color);margin-left:6px;font-size:11px;margin-bottom:1px}.air-datepicker-time--row{display:flex;align-items:center;font-size:11px;height:17px;background:linear-gradient(to right,var(--adp-time-track-color),var(--adp-time-track-color)) left 50%/100% var(--adp-time-track-height) no-repeat}.air-datepicker-time--row:first-child{margin-bottom:4px}.air-datepicker-time--row input[type=range]{background:none;cursor:pointer;flex:1;height:100%;width:100%;padding:0;margin:0;-webkit-appearance:none}.air-datepicker-time--row input[type=range]::-webkit-slider-thumb{-webkit-appearance:none}.air-datepicker-time--row input[type=range]::-ms-tooltip{display:none}.air-datepicker-time--row input[type=range]:hover::-webkit-slider-thumb{border-color:var(--adp-time-track-color-hover)}.air-datepicker-time--row input[type=range]:hover::-moz-range-thumb{border-color:var(--adp-time-track-color-hover)}.air-datepicker-time--row input[type=range]:hover::-ms-thumb{border-color:var(--adp-time-track-color-hover)}.air-datepicker-time--row input[type=range]:focus{outline:none}.air-datepicker-time--row input[type=range]:focus::-webkit-slider-thumb{background:var(--adp-cell-background-color-selected);border-color:var(--adp-cell-background-color-selected)}.air-datepicker-time--row input[type=range]:focus::-moz-range-thumb{background:var(--adp-cell-background-color-selected);border-color:var(--adp-cell-background-color-selected)}.air-datepicker-time--row input[type=range]:focus::-ms-thumb{background:var(--adp-cell-background-color-selected);border-color:var(--adp-cell-background-color-selected)}.air-datepicker-time--row input[type=range]::-webkit-slider-thumb{box-sizing:border-box;height:12px;width:12px;border-radius:3px;border:1px solid var(--adp-time-track-color);background:#fff;cursor:pointer;-webkit-transition:background var(--adp-transition-duration);transition:background var(--adp-transition-duration)}.air-datepicker-time--row input[type=range]::-moz-range-thumb{box-sizing:border-box;height:12px;width:12px;border-radius:3px;border:1px solid var(--adp-time-track-color);background:#fff;cursor:pointer;-moz-transition:background var(--adp-transition-duration);transition:background var(--adp-transition-duration)}.air-datepicker-time--row input[type=range]::-ms-thumb{box-sizing:border-box;height:12px;width:12px;border-radius:3px;border:1px solid var(--adp-time-track-color);background:#fff;cursor:pointer;-ms-transition:background var(--adp-transition-duration);transition:background var(--adp-transition-duration)}.air-datepicker-time--row input[type=range]::-webkit-slider-thumb{margin-top:calc(var(--adp-time-thumb-size) / 2 * -1)}.air-datepicker-time--row input[type=range]::-webkit-slider-runnable-track{border:none;height:var(--adp-time-track-height);cursor:pointer;color:rgba(0,0,0,0);background:rgba(0,0,0,0)}.air-datepicker-time--row input[type=range]::-moz-range-track{border:none;height:var(--adp-time-track-height);cursor:pointer;color:rgba(0,0,0,0);background:rgba(0,0,0,0)}.air-datepicker-time--row input[type=range]::-ms-track{border:none;height:var(--adp-time-track-height);cursor:pointer;color:rgba(0,0,0,0);background:rgba(0,0,0,0)}.air-datepicker-time--row input[type=range]::-ms-fill-lower{background:rgba(0,0,0,0)}.air-datepicker-time--row input[type=range]::-ms-fill-upper{background:rgba(0,0,0,0)}.air-datepicker{--adp-font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";--adp-font-size:14px;--adp-width:246px;--adp-z-index:100;--adp-padding:4px;--adp-grid-areas:"nav" "body" "timepicker" "buttons";--adp-transition-duration:.3s;--adp-transition-ease:ease-out;--adp-transition-offset:8px;--adp-background-color:#fff;--adp-background-color-hover:#f0f0f0;--adp-background-color-active:#eaeaea;--adp-background-color-in-range:rgba(92,196,239,.1);--adp-background-color-in-range-focused:rgba(92,196,239,.2);--adp-background-color-selected-other-month-focused:#8ad5f4;--adp-background-color-selected-other-month:#a2ddf6;--adp-color:#4a4a4a;--adp-color-secondary:#9c9c9c;--adp-accent-color:#4eb5e6;--adp-color-current-date:var(--adp-accent-color);--adp-color-other-month:#dedede;--adp-color-disabled:#aeaeae;--adp-color-disabled-in-range:#939393;--adp-color-other-month-hover:#c5c5c5;--adp-border-color:#dbdbdb;--adp-border-color-inner:#efefef;--adp-border-radius:4px;--adp-border-color-inline:#d7d7d7;--adp-nav-height:32px;--adp-nav-arrow-color:var(--adp-color-secondary);--adp-nav-action-size:32px;--adp-nav-color-secondary:var(--adp-color-secondary);--adp-day-name-color:#ff9a19;--adp-day-name-color-hover:#8ad5f4;--adp-day-cell-width:1fr;--adp-day-cell-height:32px;--adp-month-cell-height:42px;--adp-year-cell-height:56px;--adp-pointer-size:10px;--adp-poiner-border-radius:2px;--adp-pointer-offset:14px;--adp-cell-border-radius:4px;--adp-cell-background-color-hover:var(--adp-background-color-hover);--adp-cell-background-color-selected:#5cc4ef;--adp-cell-background-color-selected-hover:#45bced;--adp-cell-background-color-in-range:rgba(92,196,239,0.1);--adp-cell-background-color-in-range-hover:rgba(92,196,239,0.2);--adp-cell-border-color-in-range:var(--adp-cell-background-color-selected);--adp-btn-height:32px;--adp-btn-color:var(--adp-accent-color);--adp-btn-color-hover:var(--adp-color);--adp-btn-border-radius:var(--adp-border-radius);--adp-btn-background-color-hover:var(--adp-background-color-hover);--adp-btn-background-color-active:var(--adp-background-color-active);--adp-time-track-height:1px;--adp-time-track-color:#dedede;--adp-time-track-color-hover:#b1b1b1;--adp-time-thumb-size:12px;--adp-time-padding-inner:10px;--adp-time-day-period-color:var(--adp-color-secondary);--adp-mobile-font-size:16px;--adp-mobile-nav-height:40px;--adp-mobile-width:320px;--adp-mobile-day-cell-height:38px;--adp-mobile-month-cell-height:48px;--adp-mobile-year-cell-height:64px}.air-datepicker-overlay{--adp-overlay-background-color:rgba(0,0,0,.3);--adp-overlay-transition-duration:.3s;--adp-overlay-transition-ease:ease-out;--adp-overlay-z-index:99}.air-datepicker{background:var(--adp-background-color);border:1px solid var(--adp-border-color);box-shadow:0 4px 12px rgba(0,0,0,0.15);border-radius:var(--adp-border-radius);box-sizing:content-box;display:grid;grid-template-columns:1fr;grid-template-rows:repeat(4,max-content);grid-template-areas:var(--adp-grid-areas);font-family:var(--adp-font-family),sans-serif;font-size:var(--adp-font-size);color:var(--adp-color);width:var(--adp-width);position:absolute;transition:opacity var(--adp-transition-duration) var(--adp-transition-ease),transform var(--adp-transition-duration) var(--adp-transition-ease);z-index:var(--adp-z-index)}.air-datepicker:not(.-custom-position-){opacity:0}.air-datepicker.-from-top-{transform:translateY(calc(var(--adp-transition-offset) * -1))}.air-datepicker.-from-right-{transform:translateX(var(--adp-transition-offset))}.air-datepicker.-from-bottom-{transform:translateY(var(--adp-transition-offset))}.air-datepicker.-from-left-{transform:translateX(calc(var(--adp-transition-offset) * -1))}.air-datepicker.-active-:not(.-custom-position-){transform:translate(0,0);opacity:1}.air-datepicker.-active-.-custom-position-{transition:none}.air-datepicker.-inline-{border-color:var(--adp-border-color-inline);box-shadow:none;position:static;left:auto;right:auto;opacity:1;transform:none}.air-datepicker.-inline- .air-datepicker--pointer{display:none}.air-datepicker.-is-mobile-{--adp-font-size:var(--adp-mobile-font-size);--adp-day-cell-height:var(--adp-mobile-day-cell-height);--adp-month-cell-height:var(--adp-mobile-month-cell-height);--adp-year-cell-height:var(--adp-mobile-year-cell-height);--adp-nav-height:var(--adp-mobile-nav-height);--adp-nav-action-size:var(--adp-mobile-nav-height);position:fixed;width:var(--adp-mobile-width);border:none}.air-datepicker.-is-mobile- *{-webkit-tap-highlight-color:rgba(0,0,0,0)}.air-datepicker.-is-mobile- .air-datepicker--pointer{display:none}.air-datepicker.-is-mobile-:not(.-custom-position-){transform:translate(-50%,calc(-50% + var(--adp-transition-offset)))}.air-datepicker.-is-mobile-.-active-:not(.-custom-position-){transform:translate(-50%,-50%)}.air-datepicker.-custom-position-{transition:none}.air-datepicker-global-container{position:absolute;left:0;top:0}.air-datepicker--pointer{--pointer-half-size:calc(var(--adp-pointer-size) / 2);position:absolute;width:var(--adp-pointer-size);height:var(--adp-pointer-size);z-index:-1}.air-datepicker--pointer:after{content:"";position:absolute;background:#fff;border-top:1px solid var(--adp-border-color-inline);border-right:1px solid var(--adp-border-color-inline);border-top-right-radius:var(--adp-poiner-border-radius);width:var(--adp-pointer-size);height:var(--adp-pointer-size);box-sizing:border-box}.-top-left- .air-datepicker--pointer,.-top-center- .air-datepicker--pointer,.-top-right- .air-datepicker--pointer,[data-popper-placement^=top] .air-datepicker--pointer{top:calc(100% - var(--pointer-half-size) + 1px)}.-top-left- .air-datepicker--pointer:after,.-top-center- .air-datepicker--pointer:after,.-top-right- .air-datepicker--pointer:after,[data-popper-placement^=top] .air-datepicker--pointer:after{transform:rotate(135deg)}.-right-top- .air-datepicker--pointer,.-right-center- .air-datepicker--pointer,.-right-bottom- .air-datepicker--pointer,[data-popper-placement^=right] .air-datepicker--pointer{right:calc(100% - var(--pointer-half-size) + 1px)}.-right-top- .air-datepicker--pointer:after,.-right-center- .air-datepicker--pointer:after,.-right-bottom- .air-datepicker--pointer:after,[data-popper-placement^=right] .air-datepicker--pointer:after{transform:rotate(225deg)}.-bottom-left- .air-datepicker--pointer,.-bottom-center- .air-datepicker--pointer,.-bottom-right- .air-datepicker--pointer,[data-popper-placement^=bottom] .air-datepicker--pointer{bottom:calc(100% - var(--pointer-half-size) + 1px)}.-bottom-left- .air-datepicker--pointer:after,.-bottom-center- .air-datepicker--pointer:after,.-bottom-right- .air-datepicker--pointer:after,[data-popper-placement^=bottom] .air-datepicker--pointer:after{transform:rotate(315deg)}.-left-top- .air-datepicker--pointer,.-left-center- .air-datepicker--pointer,.-left-bottom- .air-datepicker--pointer,[data-popper-placement^=left] .air-datepicker--pointer{left:calc(100% - var(--pointer-half-size) + 1px)}.-left-top- .air-datepicker--pointer:after,.-left-center- .air-datepicker--pointer:after,.-left-bottom- .air-datepicker--pointer:after,[data-popper-placement^=left] .air-datepicker--pointer:after{transform:rotate(45deg)}.-top-left- .air-datepicker--pointer,.-bottom-left- .air-datepicker--pointer{left:var(--adp-pointer-offset)}.-top-right- .air-datepicker--pointer,.-bottom-right- .air-datepicker--pointer{right:var(--adp-pointer-offset)}.-top-center- .air-datepicker--pointer,.-bottom-center- .air-datepicker--pointer{left:calc(50% - var(--adp-pointer-size) / 2)}.-left-top- .air-datepicker--pointer,.-right-top- .air-datepicker--pointer{top:var(--adp-pointer-offset)}.-left-bottom- .air-datepicker--pointer,.-right-bottom- .air-datepicker--pointer{bottom:var(--adp-pointer-offset)}.-left-center- .air-datepicker--pointer,.-right-center- .air-datepicker--pointer{top:calc(50% - var(--adp-pointer-size) / 2)}.air-datepicker--navigation{grid-area:nav}.air-datepicker--content{box-sizing:content-box;padding:var(--adp-padding);grid-area:body}.-only-timepicker- .air-datepicker--content{display:none}.air-datepicker--time{grid-area:timepicker}.air-datepicker--buttons{grid-area:buttons}.air-datepicker--buttons,.air-datepicker--time{padding:var(--adp-padding);border-top:1px solid var(--adp-border-color-inner)}.air-datepicker-overlay{position:fixed;background:var(--adp-overlay-background-color);left:0;top:0;width:0;height:0;opacity:0;transition:opacity var(--adp-overlay-transition-duration) var(--adp-overlay-transition-ease),left 0s,height 0s,width 0s;transition-delay:0s,var(--adp-overlay-transition-duration),var(--adp-overlay-transition-duration),var(--adp-overlay-transition-duration);z-index:var(--adp-overlay-z-index)}.air-datepicker-overlay.-active-{opacity:1;width:100%;height:100%;transition:opacity var(--adp-overlay-transition-duration) var(--adp-overlay-transition-ease),height 0s,width 0s}.air-datepicker{--adp-color:rgba(var(--zn-text),var(--zn-text-opacity));--adp-nav-color-secondary:rgb(var(--zn-purple-text));--adp-day-name-color:var(--zn-color-primary-600);--adp-day-name-color-hover:var(--zn-color-primary-700);--adp-cell-background-color-selected:var(--zn-color-primary-600);--adp-cell-background-color-selected-hover:var(--zn-color-primary-700);--adp-color-current-date:var(--zn-color-primary-600);--adp-background-color:var(--zn-input-background-color);--adp-background-color-hover:var(--zn-input-background-color-hover);--adp-background-color-active:var(--zn-input-background-color-hover);--adp-background-color-selected-other-month:var(--zn-color-primary-300);--adp-background-color-in-range:var(--zn-color-primary-100);--adp-border-color:rgb(var(--zn-border-color));--adp-border-color-inline:rgb(var(--zn-border-color));--adp-border-color-inner:rgb(var(--zn-border-color));--adp-cell-background-color-in-range:var(--zn-color-primary-100);--adp-cell-background-color-in-range-hover:var(--zn-color-primary-200)}.air-datepicker--pointer:after{background-color:var(--zn-input-background-color)}.air-datepicker-global-container{z-index:1000000}.air-datepicker-button{border:none;padding:var(--zn-spacing-2x-small) var(--zn-spacing-x-small);border-radius:var(--adp-border-radius);font-family:var(--adp-font-family),sans-serif;font-size:var(--zn-font-size-medium);font-weight:var(--zn-font-weight-normal);cursor:pointer;color:rgba(var(--zn-text),var(--zn-text-opacity))}.air-datepicker-button:hover{background-color:var(--zn-input-background-color-hover) !important}:host{display:contents;--zn-input-bg:var(--zn-panel)}.add-rule{max-width:250px;margin-bottom:10px}.query-builder{display:flex;flex-direction:column;flex-wrap:wrap}.query-builder zn-button{align-self:flex-end}.query-builder--popup:has(.query-builder__row){min-width:990px}.query-builder__row,.query-builder__wrapper{display:flex;width:100%;gap:10px}.query-builder__row{padding-bottom:10px}.query-builder__key,.query-builder__comparator{flex-basis:60%}.query-builder__value{flex-grow:1}.query-builder--dropdown:has(.query-builder__row){min-width:900px}`;var mC={eq:"Equals",neq:"Not Equals",eqi:"Equals (Insensitive)",neqi:"Not Equals (Insensitive)",before:"Was Before",after:"Was After",in:"In",nin:"Not In",matchphrasepre:"Match Phrase Prefix",nmatchphrasepre:"Does Not Match Phrase Prefix",matchphrase:"Match Phrase",nmatchphrase:"Does Not Match Phrase",match:"Match",nmatch:"Does Not Match",contains:"Contains",doesnotcontain:"Does Not Contain",starts:"Starts With",nstarts:"Does Not Start With",ends:"Ends With",nends:"Does Not End With",wild:"Wildcard Match",nwild:"Does Not Match Wildcard",like:"Like Match With",nlike:"Does Not Like Match With",fuzzy:"Fuzzy Match With",nfuzzy:"Does Not Match Fuzzy With",gte:"Greater Than or Equals",gt:"Greater Than",lt:"Less Than",lte:"Less Than or Equals"},cr=class extends C{constructor(){super(...arguments);this._selectedRules=new Map;this._formController=new ot(this,{});this.filters=[];this.dropdown=!1;this.showValues=[]}get validationMessage(){return""}get validity(){return this.input?.validity}firstUpdated(t){super.firstUpdated(t),this.showValues&&this.showValues.forEach(r=>{this._addRule(null,r)}),this._handleChange(),this._formController.updateValidity()}render(){return u`
2131
+ `}};pn.styles=E(Sv),c([p({attribute:"start-scrolled",type:Boolean,reflect:!0})],pn.prototype,"startScrolled",2),c([F(".scroll-container")],pn.prototype,"container",2),c([F(".scroll-footer")],pn.prototype,"footer",2);var uC=pn;pn.define("zn-scroll-container");function le(i){let o=document.createDocumentFragment();return Ca(i,o),o.firstElementChild}var Cv=A`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}:host *,:host *::before,:host *::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}button,.zn-button{border-radius:var(--zn-border-radius);display:inline-flex;align-items:center;justify-content:center;padding:var(--zn-base-px);margin:auto;width:-moz-fit-content;width:fit-content;background-color:rgb(var(--zn-primary));color:rgba(255,255,255,0.9);font-size:var(--zn-text-button-label-font-size);font-weight:var(--zn-text-button-label-font-weight);line-height:var(--zn-text-button-label-line-height);text-transform:var(--zn-text-button-label-transform);cursor:pointer;vertical-align:middle;border-color:transparent;white-space:nowrap;max-height:36px;height:36px;min-height:36px}button:hover:not([disabled]),.zn-button:hover:not([disabled]){background-color:rgba(var(--zn-primary),0.8)}input[type=date],input[type=datetime-local],input[type=email],input[type=month],input[type=number],input[type=password],input[type=search],input[type=tel],input[type=text],input[type=time],input[type=url],input[type=week],input[type=file],input[list],textarea,select{display:block;width:100%;border-radius:5px;border-style:solid;border-width:1px !important;border-color:rgb(var(--zn-border-color));background-color:rgb(var(--zn-input-bg));outline:none}input[type=date]:focus,input[type=datetime-local]:focus,input[type=email]:focus,input[type=month]:focus,input[type=number]:focus,input[type=password]:focus,input[type=search]:focus,input[type=tel]:focus,input[type=text]:focus,input[type=time]:focus,input[type=url]:focus,input[type=week]:focus,input[type=file]:focus,input[list]:focus,textarea:focus,select:focus{border-color:rgb(var(--zn-primary));box-shadow:0 0 0 3px rgba(var(--zn-primary),0.3)}input[type=date]::-moz-placeholder, input[type=datetime-local]::-moz-placeholder, input[type=email]::-moz-placeholder, input[type=month]::-moz-placeholder, input[type=number]::-moz-placeholder, input[type=password]::-moz-placeholder, input[type=search]::-moz-placeholder, input[type=tel]::-moz-placeholder, input[type=text]::-moz-placeholder, input[type=time]::-moz-placeholder, input[type=url]::-moz-placeholder, input[type=week]::-moz-placeholder, input[type=file]::-moz-placeholder, input[list]::-moz-placeholder, textarea::-moz-placeholder, select::-moz-placeholder{font-weight:400;color:rgba(var(--zn-text),0.6)}input[type=date]::placeholder,input[type=datetime-local]::placeholder,input[type=email]::placeholder,input[type=month]::placeholder,input[type=number]::placeholder,input[type=password]::placeholder,input[type=search]::placeholder,input[type=tel]::placeholder,input[type=text]::placeholder,input[type=time]::placeholder,input[type=url]::placeholder,input[type=week]::placeholder,input[type=file]::placeholder,input[list]::placeholder,textarea::placeholder,select::placeholder{font-weight:400;color:rgba(var(--zn-text),0.6)}@media (min-width:360px){input[type=date],input[type=datetime-local],input[type=email],input[type=month],input[type=number],input[type=password],input[type=search],input[type=tel],input[type=text],input[type=time],input[type=url],input[type=week],input[type=file],input[list],textarea,select{padding:8px}}label{font-weight:600;font-size:rgb(var(--zn-font-size-medium));line-height:var(--zn-spacing-medium);color:rgb(var(--zn-text-heading));display:block;margin-bottom:4px;margin-top:16px}input[type=checkbox],input[type=radio]{border-radius:5px}input[type=radio]{border-radius:50%}input[type=range]{-webkit-appearance:none;-moz-appearance:none;appearance:none;border-radius:10px;background-color:rgb(var(--zn-border-color));height:8px;accent-color:rgb(var(--zn-primary));width:100%;max-width:768px}fieldset{border-color:rgba(var(--zn-primary),20%);border-width:2px;padding:0 16px 16px}select option{padding:4px}select>option:checked{background-color:rgba(var(--zn-primary),20%);border-radius:5px}fieldset>legend{padding:4px}input[type=button],input[type=submit],button[type=submit]:not(.button),button[type=button]:not(.button){border-radius:var(--zn-border-radius);display:inline-flex;align-items:center;justify-content:center;padding:var(--zn-base-px);margin:auto;width:-moz-fit-content;width:fit-content;background-color:rgb(var(--zn-primary));color:rgba(255,255,255,0.9);font-size:var(--zn-text-button-label-font-size);font-weight:var(--zn-text-button-label-font-weight);line-height:var(--zn-text-button-label-line-height);text-transform:var(--zn-text-button-label-transform);cursor:pointer;vertical-align:middle;border-color:transparent;white-space:nowrap;max-height:36px;height:36px;min-height:36px}input[type=button]:hover:not([disabled]),input[type=submit]:hover:not([disabled]),button[type=submit]:not(.button):hover:not([disabled]),button[type=button]:not(.button):hover:not([disabled]){background-color:rgba(var(--zn-primary),0.8)}input[type=button],input[type=submit],button[type=submit]:not(.button),button[type=button]:not(.button){width:auto}div+button{margin-top:16px}input[type=file]::-webkit-file-upload-button{border-radius:var(--zn-border-radius);display:inline-flex;align-items:center;justify-content:center;padding:var(--zn-base-px);margin:auto;width:fit-content;background-color:rgb(var(--zn-primary));color:rgba(255,255,255,0.9);font-size:var(--zn-text-button-label-font-size);font-weight:var(--zn-text-button-label-font-weight);line-height:var(--zn-text-button-label-line-height);text-transform:var(--zn-text-button-label-transform);cursor:pointer;vertical-align:middle;border-color:transparent;white-space:nowrap;max-height:36px;height:36px;min-height:36px}input[type=file]::-webkit-file-upload-button:hover:not([disabled]){background-color:rgba(var(--zn-primary),0.8)}input[type=file]::-webkit-file-upload-button{margin-right:8px}input::-webkit-calendar-picker-indicator{cursor:pointer;padding:8px}input[list]::-webkit-calendar-picker-indicator{padding:8px 4px}.input--with-icon{position:relative}.input--with-icon zn-icon{padding:14px;position:absolute;top:50%;pointer-events:none;transform:translateY(-50%);left:8px;background-color:rgb(var(--zn-primary));color:rgb(var(--zn-text));border-radius:50%}.input--with-icon input{padding-left:40px}input:-webkit-autofill,input:-webkit-autofill:hover,input:-webkit-autofill:focus,input:-webkit-autofill:active{-webkit-background-clip:text;-webkit-text-fill-color:rgb(var(--zn-text));-webkit-transition:background-color 5000s ease-in-out 0s;transition:background-color 5000s ease-in-out 0s;box-shadow:inset 0 0 20px 20px rgba(35,35,35,0.1607843137)}select{height:43px}.no-border{border:none !important}.air-datepicker-cell.-year-.-other-decade-,.air-datepicker-cell.-day-.-other-month-{color:var(--adp-color-other-month)}.air-datepicker-cell.-year-.-other-decade-:hover,.air-datepicker-cell.-day-.-other-month-:hover{color:var(--adp-color-other-month-hover)}.-disabled-.-focus-.air-datepicker-cell.-year-.-other-decade-,.-disabled-.-focus-.air-datepicker-cell.-day-.-other-month-{color:var(--adp-color-other-month)}.-selected-.air-datepicker-cell.-year-.-other-decade-,.-selected-.air-datepicker-cell.-day-.-other-month-{color:#fff;background:var(--adp-background-color-selected-other-month)}.-selected-.-focus-.air-datepicker-cell.-year-.-other-decade-,.-selected-.-focus-.air-datepicker-cell.-day-.-other-month-{background:var(--adp-background-color-selected-other-month-focused)}.-in-range-.air-datepicker-cell.-year-.-other-decade-,.-in-range-.air-datepicker-cell.-day-.-other-month-{background-color:var(--adp-background-color-in-range);color:var(--adp-color)}.-in-range-.-focus-.air-datepicker-cell.-year-.-other-decade-,.-in-range-.-focus-.air-datepicker-cell.-day-.-other-month-{background-color:var(--adp-background-color-in-range-focused)}.air-datepicker-cell.-year-.-other-decade-:empty,.air-datepicker-cell.-day-.-other-month-:empty{background:none;border:none}.air-datepicker-cell{border-radius:var(--adp-cell-border-radius);box-sizing:border-box;cursor:pointer;display:flex;position:relative;align-items:center;justify-content:center;z-index:1}.air-datepicker-cell.-focus-{background:var(--adp-cell-background-color-hover)}.air-datepicker-cell.-current-{color:var(--adp-color-current-date)}.air-datepicker-cell.-current-.-focus-{color:var(--adp-color)}.air-datepicker-cell.-current-.-in-range-{color:var(--adp-color-current-date)}.air-datepicker-cell.-disabled-{cursor:default;color:var(--adp-color-disabled)}.air-datepicker-cell.-disabled-.-focus-{color:var(--adp-color-disabled)}.air-datepicker-cell.-disabled-.-in-range-{color:var(--adp-color-disabled-in-range)}.air-datepicker-cell.-disabled-.-current-.-focus-{color:var(--adp-color-disabled)}.air-datepicker-cell.-in-range-{background:var(--adp-cell-background-color-in-range);border-radius:0}.air-datepicker-cell.-in-range-:hover,.air-datepicker-cell.-in-range-.-focus-{background:var(--adp-cell-background-color-in-range-hover)}.air-datepicker-cell.-range-from-{border:1px solid var(--adp-cell-border-color-in-range);background-color:var(--adp-cell-background-color-in-range);border-radius:var(--adp-cell-border-radius) 0 0 var(--adp-cell-border-radius)}.air-datepicker-cell.-range-to-{border:1px solid var(--adp-cell-border-color-in-range);background-color:var(--adp-cell-background-color-in-range);border-radius:0 var(--adp-cell-border-radius) var(--adp-cell-border-radius) 0}.air-datepicker-cell.-range-to-.-range-from-{border-radius:var(--adp-cell-border-radius)}.air-datepicker-cell.-selected-{color:#fff;border:none;background:var(--adp-cell-background-color-selected)}.air-datepicker-cell.-selected-.-current-{color:#fff;background:var(--adp-cell-background-color-selected)}.air-datepicker-cell.-selected-.-focus-{background:var(--adp-cell-background-color-selected-hover)}.air-datepicker-body{transition:all var(--adp-transition-duration) var(--adp-transition-ease)}.air-datepicker-body.-hidden-{display:none}.air-datepicker-body--day-names{display:grid;grid-template-columns:repeat(7,var(--adp-day-cell-width));margin:8px 0 3px}.air-datepicker-body--day-name{color:var(--adp-day-name-color);display:flex;align-items:center;justify-content:center;flex:1;text-align:center;text-transform:uppercase;font-size:0.8em}.air-datepicker-body--day-name.-clickable-{cursor:pointer}.air-datepicker-body--day-name.-clickable-:hover{color:var(--adp-day-name-color-hover)}.air-datepicker-body--cells{display:grid}.air-datepicker-body--cells.-days-{grid-template-columns:repeat(7,var(--adp-day-cell-width));grid-auto-rows:var(--adp-day-cell-height)}.air-datepicker-body--cells.-months-{grid-template-columns:repeat(3,1fr);grid-auto-rows:var(--adp-month-cell-height)}.air-datepicker-body--cells.-years-{grid-template-columns:repeat(4,1fr);grid-auto-rows:var(--adp-year-cell-height)}.air-datepicker-nav{display:flex;justify-content:space-between;border-bottom:1px solid var(--adp-border-color-inner);min-height:var(--adp-nav-height);padding:var(--adp-padding);box-sizing:content-box}.-only-timepicker- .air-datepicker-nav{display:none}.air-datepicker-nav--title,.air-datepicker-nav--action{display:flex;cursor:pointer;align-items:center;justify-content:center}.air-datepicker-nav--action{width:var(--adp-nav-action-size);border-radius:var(--adp-border-radius);-webkit-user-select:none;-moz-user-select:none;user-select:none}.air-datepicker-nav--action:hover{background:var(--adp-background-color-hover)}.air-datepicker-nav--action:active{background:var(--adp-background-color-active)}.air-datepicker-nav--action.-disabled-{visibility:hidden}.air-datepicker-nav--action svg{width:32px;height:32px}.air-datepicker-nav--action path{fill:none;stroke:var(--adp-nav-arrow-color);stroke-width:2px}.air-datepicker-nav--title{border-radius:var(--adp-border-radius);padding:0 8px}.air-datepicker-nav--title i{font-style:normal;color:var(--adp-nav-color-secondary);margin-left:0.3em}.air-datepicker-nav--title:hover{background:var(--adp-background-color-hover)}.air-datepicker-nav--title:active{background:var(--adp-background-color-active)}.air-datepicker-nav--title.-disabled-{cursor:default;background:none}.air-datepicker-buttons{display:grid;grid-auto-columns:1fr;grid-auto-flow:column}.air-datepicker-button{display:inline-flex;color:var(--adp-btn-color);border-radius:var(--adp-btn-border-radius);cursor:pointer;height:var(--adp-btn-height);border:none;background:rgba(255,255,255,0)}.air-datepicker-button:hover{color:var(--adp-btn-color-hover);background:var(--adp-btn-background-color-hover)}.air-datepicker-button:focus{color:var(--adp-btn-color-hover);background:var(--adp-btn-background-color-hover);outline:none}.air-datepicker-button:active{background:var(--adp-btn-background-color-active)}.air-datepicker-button span{outline:none;display:flex;align-items:center;justify-content:center;width:100%;height:100%}.air-datepicker-time{display:grid;grid-template-columns:max-content 1fr;grid-column-gap:12px;align-items:center;position:relative;padding:0 var(--adp-time-padding-inner)}.-only-timepicker- .air-datepicker-time{border-top:none}.air-datepicker-time--current{display:flex;align-items:center;flex:1;font-size:14px;text-align:center}.air-datepicker-time--current-colon{margin:0 2px 3px;line-height:1}.air-datepicker-time--current-hours,.air-datepicker-time--current-minutes{line-height:1;font-size:19px;font-family:"Century Gothic",CenturyGothic,AppleGothic,sans-serif;position:relative;z-index:1}.air-datepicker-time--current-hours:after,.air-datepicker-time--current-minutes:after{content:"";background:var(--adp-background-color-hover);border-radius:var(--adp-border-radius);position:absolute;left:-2px;top:-3px;right:-2px;bottom:-2px;z-index:-1;opacity:0}.air-datepicker-time--current-hours.-focus-:after,.air-datepicker-time--current-minutes.-focus-:after{opacity:1}.air-datepicker-time--current-ampm{text-transform:uppercase;align-self:flex-end;color:var(--adp-time-day-period-color);margin-left:6px;font-size:11px;margin-bottom:1px}.air-datepicker-time--row{display:flex;align-items:center;font-size:11px;height:17px;background:linear-gradient(to right,var(--adp-time-track-color),var(--adp-time-track-color)) left 50%/100% var(--adp-time-track-height) no-repeat}.air-datepicker-time--row:first-child{margin-bottom:4px}.air-datepicker-time--row input[type=range]{background:none;cursor:pointer;flex:1;height:100%;width:100%;padding:0;margin:0;-webkit-appearance:none}.air-datepicker-time--row input[type=range]::-webkit-slider-thumb{-webkit-appearance:none}.air-datepicker-time--row input[type=range]::-ms-tooltip{display:none}.air-datepicker-time--row input[type=range]:hover::-webkit-slider-thumb{border-color:var(--adp-time-track-color-hover)}.air-datepicker-time--row input[type=range]:hover::-moz-range-thumb{border-color:var(--adp-time-track-color-hover)}.air-datepicker-time--row input[type=range]:hover::-ms-thumb{border-color:var(--adp-time-track-color-hover)}.air-datepicker-time--row input[type=range]:focus{outline:none}.air-datepicker-time--row input[type=range]:focus::-webkit-slider-thumb{background:var(--adp-cell-background-color-selected);border-color:var(--adp-cell-background-color-selected)}.air-datepicker-time--row input[type=range]:focus::-moz-range-thumb{background:var(--adp-cell-background-color-selected);border-color:var(--adp-cell-background-color-selected)}.air-datepicker-time--row input[type=range]:focus::-ms-thumb{background:var(--adp-cell-background-color-selected);border-color:var(--adp-cell-background-color-selected)}.air-datepicker-time--row input[type=range]::-webkit-slider-thumb{box-sizing:border-box;height:12px;width:12px;border-radius:3px;border:1px solid var(--adp-time-track-color);background:#fff;cursor:pointer;-webkit-transition:background var(--adp-transition-duration);transition:background var(--adp-transition-duration)}.air-datepicker-time--row input[type=range]::-moz-range-thumb{box-sizing:border-box;height:12px;width:12px;border-radius:3px;border:1px solid var(--adp-time-track-color);background:#fff;cursor:pointer;-moz-transition:background var(--adp-transition-duration);transition:background var(--adp-transition-duration)}.air-datepicker-time--row input[type=range]::-ms-thumb{box-sizing:border-box;height:12px;width:12px;border-radius:3px;border:1px solid var(--adp-time-track-color);background:#fff;cursor:pointer;-ms-transition:background var(--adp-transition-duration);transition:background var(--adp-transition-duration)}.air-datepicker-time--row input[type=range]::-webkit-slider-thumb{margin-top:calc(var(--adp-time-thumb-size) / 2 * -1)}.air-datepicker-time--row input[type=range]::-webkit-slider-runnable-track{border:none;height:var(--adp-time-track-height);cursor:pointer;color:rgba(0,0,0,0);background:rgba(0,0,0,0)}.air-datepicker-time--row input[type=range]::-moz-range-track{border:none;height:var(--adp-time-track-height);cursor:pointer;color:rgba(0,0,0,0);background:rgba(0,0,0,0)}.air-datepicker-time--row input[type=range]::-ms-track{border:none;height:var(--adp-time-track-height);cursor:pointer;color:rgba(0,0,0,0);background:rgba(0,0,0,0)}.air-datepicker-time--row input[type=range]::-ms-fill-lower{background:rgba(0,0,0,0)}.air-datepicker-time--row input[type=range]::-ms-fill-upper{background:rgba(0,0,0,0)}.air-datepicker{--adp-font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";--adp-font-size:14px;--adp-width:246px;--adp-z-index:100;--adp-padding:4px;--adp-grid-areas:"nav" "body" "timepicker" "buttons";--adp-transition-duration:.3s;--adp-transition-ease:ease-out;--adp-transition-offset:8px;--adp-background-color:#fff;--adp-background-color-hover:#f0f0f0;--adp-background-color-active:#eaeaea;--adp-background-color-in-range:rgba(92,196,239,.1);--adp-background-color-in-range-focused:rgba(92,196,239,.2);--adp-background-color-selected-other-month-focused:#8ad5f4;--adp-background-color-selected-other-month:#a2ddf6;--adp-color:#4a4a4a;--adp-color-secondary:#9c9c9c;--adp-accent-color:#4eb5e6;--adp-color-current-date:var(--adp-accent-color);--adp-color-other-month:#dedede;--adp-color-disabled:#aeaeae;--adp-color-disabled-in-range:#939393;--adp-color-other-month-hover:#c5c5c5;--adp-border-color:#dbdbdb;--adp-border-color-inner:#efefef;--adp-border-radius:4px;--adp-border-color-inline:#d7d7d7;--adp-nav-height:32px;--adp-nav-arrow-color:var(--adp-color-secondary);--adp-nav-action-size:32px;--adp-nav-color-secondary:var(--adp-color-secondary);--adp-day-name-color:#ff9a19;--adp-day-name-color-hover:#8ad5f4;--adp-day-cell-width:1fr;--adp-day-cell-height:32px;--adp-month-cell-height:42px;--adp-year-cell-height:56px;--adp-pointer-size:10px;--adp-poiner-border-radius:2px;--adp-pointer-offset:14px;--adp-cell-border-radius:4px;--adp-cell-background-color-hover:var(--adp-background-color-hover);--adp-cell-background-color-selected:#5cc4ef;--adp-cell-background-color-selected-hover:#45bced;--adp-cell-background-color-in-range:rgba(92,196,239,0.1);--adp-cell-background-color-in-range-hover:rgba(92,196,239,0.2);--adp-cell-border-color-in-range:var(--adp-cell-background-color-selected);--adp-btn-height:32px;--adp-btn-color:var(--adp-accent-color);--adp-btn-color-hover:var(--adp-color);--adp-btn-border-radius:var(--adp-border-radius);--adp-btn-background-color-hover:var(--adp-background-color-hover);--adp-btn-background-color-active:var(--adp-background-color-active);--adp-time-track-height:1px;--adp-time-track-color:#dedede;--adp-time-track-color-hover:#b1b1b1;--adp-time-thumb-size:12px;--adp-time-padding-inner:10px;--adp-time-day-period-color:var(--adp-color-secondary);--adp-mobile-font-size:16px;--adp-mobile-nav-height:40px;--adp-mobile-width:320px;--adp-mobile-day-cell-height:38px;--adp-mobile-month-cell-height:48px;--adp-mobile-year-cell-height:64px}.air-datepicker-overlay{--adp-overlay-background-color:rgba(0,0,0,.3);--adp-overlay-transition-duration:.3s;--adp-overlay-transition-ease:ease-out;--adp-overlay-z-index:99}.air-datepicker{background:var(--adp-background-color);border:1px solid var(--adp-border-color);box-shadow:0 4px 12px rgba(0,0,0,0.15);border-radius:var(--adp-border-radius);box-sizing:content-box;display:grid;grid-template-columns:1fr;grid-template-rows:repeat(4,max-content);grid-template-areas:var(--adp-grid-areas);font-family:var(--adp-font-family),sans-serif;font-size:var(--adp-font-size);color:var(--adp-color);width:var(--adp-width);position:absolute;transition:opacity var(--adp-transition-duration) var(--adp-transition-ease),transform var(--adp-transition-duration) var(--adp-transition-ease);z-index:var(--adp-z-index)}.air-datepicker:not(.-custom-position-){opacity:0}.air-datepicker.-from-top-{transform:translateY(calc(var(--adp-transition-offset) * -1))}.air-datepicker.-from-right-{transform:translateX(var(--adp-transition-offset))}.air-datepicker.-from-bottom-{transform:translateY(var(--adp-transition-offset))}.air-datepicker.-from-left-{transform:translateX(calc(var(--adp-transition-offset) * -1))}.air-datepicker.-active-:not(.-custom-position-){transform:translate(0,0);opacity:1}.air-datepicker.-active-.-custom-position-{transition:none}.air-datepicker.-inline-{border-color:var(--adp-border-color-inline);box-shadow:none;position:static;left:auto;right:auto;opacity:1;transform:none}.air-datepicker.-inline- .air-datepicker--pointer{display:none}.air-datepicker.-is-mobile-{--adp-font-size:var(--adp-mobile-font-size);--adp-day-cell-height:var(--adp-mobile-day-cell-height);--adp-month-cell-height:var(--adp-mobile-month-cell-height);--adp-year-cell-height:var(--adp-mobile-year-cell-height);--adp-nav-height:var(--adp-mobile-nav-height);--adp-nav-action-size:var(--adp-mobile-nav-height);position:fixed;width:var(--adp-mobile-width);border:none}.air-datepicker.-is-mobile- *{-webkit-tap-highlight-color:rgba(0,0,0,0)}.air-datepicker.-is-mobile- .air-datepicker--pointer{display:none}.air-datepicker.-is-mobile-:not(.-custom-position-){transform:translate(-50%,calc(-50% + var(--adp-transition-offset)))}.air-datepicker.-is-mobile-.-active-:not(.-custom-position-){transform:translate(-50%,-50%)}.air-datepicker.-custom-position-{transition:none}.air-datepicker-global-container{position:absolute;left:0;top:0}.air-datepicker--pointer{--pointer-half-size:calc(var(--adp-pointer-size) / 2);position:absolute;width:var(--adp-pointer-size);height:var(--adp-pointer-size);z-index:-1}.air-datepicker--pointer:after{content:"";position:absolute;background:#fff;border-top:1px solid var(--adp-border-color-inline);border-right:1px solid var(--adp-border-color-inline);border-top-right-radius:var(--adp-poiner-border-radius);width:var(--adp-pointer-size);height:var(--adp-pointer-size);box-sizing:border-box}.-top-left- .air-datepicker--pointer,.-top-center- .air-datepicker--pointer,.-top-right- .air-datepicker--pointer,[data-popper-placement^=top] .air-datepicker--pointer{top:calc(100% - var(--pointer-half-size) + 1px)}.-top-left- .air-datepicker--pointer:after,.-top-center- .air-datepicker--pointer:after,.-top-right- .air-datepicker--pointer:after,[data-popper-placement^=top] .air-datepicker--pointer:after{transform:rotate(135deg)}.-right-top- .air-datepicker--pointer,.-right-center- .air-datepicker--pointer,.-right-bottom- .air-datepicker--pointer,[data-popper-placement^=right] .air-datepicker--pointer{right:calc(100% - var(--pointer-half-size) + 1px)}.-right-top- .air-datepicker--pointer:after,.-right-center- .air-datepicker--pointer:after,.-right-bottom- .air-datepicker--pointer:after,[data-popper-placement^=right] .air-datepicker--pointer:after{transform:rotate(225deg)}.-bottom-left- .air-datepicker--pointer,.-bottom-center- .air-datepicker--pointer,.-bottom-right- .air-datepicker--pointer,[data-popper-placement^=bottom] .air-datepicker--pointer{bottom:calc(100% - var(--pointer-half-size) + 1px)}.-bottom-left- .air-datepicker--pointer:after,.-bottom-center- .air-datepicker--pointer:after,.-bottom-right- .air-datepicker--pointer:after,[data-popper-placement^=bottom] .air-datepicker--pointer:after{transform:rotate(315deg)}.-left-top- .air-datepicker--pointer,.-left-center- .air-datepicker--pointer,.-left-bottom- .air-datepicker--pointer,[data-popper-placement^=left] .air-datepicker--pointer{left:calc(100% - var(--pointer-half-size) + 1px)}.-left-top- .air-datepicker--pointer:after,.-left-center- .air-datepicker--pointer:after,.-left-bottom- .air-datepicker--pointer:after,[data-popper-placement^=left] .air-datepicker--pointer:after{transform:rotate(45deg)}.-top-left- .air-datepicker--pointer,.-bottom-left- .air-datepicker--pointer{left:var(--adp-pointer-offset)}.-top-right- .air-datepicker--pointer,.-bottom-right- .air-datepicker--pointer{right:var(--adp-pointer-offset)}.-top-center- .air-datepicker--pointer,.-bottom-center- .air-datepicker--pointer{left:calc(50% - var(--adp-pointer-size) / 2)}.-left-top- .air-datepicker--pointer,.-right-top- .air-datepicker--pointer{top:var(--adp-pointer-offset)}.-left-bottom- .air-datepicker--pointer,.-right-bottom- .air-datepicker--pointer{bottom:var(--adp-pointer-offset)}.-left-center- .air-datepicker--pointer,.-right-center- .air-datepicker--pointer{top:calc(50% - var(--adp-pointer-size) / 2)}.air-datepicker--navigation{grid-area:nav}.air-datepicker--content{box-sizing:content-box;padding:var(--adp-padding);grid-area:body}.-only-timepicker- .air-datepicker--content{display:none}.air-datepicker--time{grid-area:timepicker}.air-datepicker--buttons{grid-area:buttons}.air-datepicker--buttons,.air-datepicker--time{padding:var(--adp-padding);border-top:1px solid var(--adp-border-color-inner)}.air-datepicker-overlay{position:fixed;background:var(--adp-overlay-background-color);left:0;top:0;width:0;height:0;opacity:0;transition:opacity var(--adp-overlay-transition-duration) var(--adp-overlay-transition-ease),left 0s,height 0s,width 0s;transition-delay:0s,var(--adp-overlay-transition-duration),var(--adp-overlay-transition-duration),var(--adp-overlay-transition-duration);z-index:var(--adp-overlay-z-index)}.air-datepicker-overlay.-active-{opacity:1;width:100%;height:100%;transition:opacity var(--adp-overlay-transition-duration) var(--adp-overlay-transition-ease),height 0s,width 0s}.air-datepicker{--adp-color:rgba(var(--zn-text),var(--zn-text-opacity));--adp-nav-color-secondary:rgb(var(--zn-purple-text));--adp-day-name-color:var(--zn-color-primary-600);--adp-day-name-color-hover:var(--zn-color-primary-700);--adp-cell-background-color-selected:var(--zn-color-primary-600);--adp-cell-background-color-selected-hover:var(--zn-color-primary-700);--adp-color-current-date:var(--zn-color-primary-600);--adp-background-color:var(--zn-input-background-color);--adp-background-color-hover:var(--zn-input-background-color-hover);--adp-background-color-active:var(--zn-input-background-color-hover);--adp-background-color-selected-other-month:var(--zn-color-primary-300);--adp-background-color-in-range:var(--zn-color-primary-100);--adp-border-color:rgb(var(--zn-border-color));--adp-border-color-inline:rgb(var(--zn-border-color));--adp-border-color-inner:rgb(var(--zn-border-color));--adp-cell-background-color-in-range:var(--zn-color-primary-100);--adp-cell-background-color-in-range-hover:var(--zn-color-primary-200)}.air-datepicker--pointer:after{background-color:var(--zn-input-background-color)}.air-datepicker-global-container{z-index:1000000}.air-datepicker-button{border:none;padding:var(--zn-spacing-2x-small) var(--zn-spacing-x-small);border-radius:var(--adp-border-radius);font-family:var(--adp-font-family),sans-serif;font-size:var(--zn-font-size-medium);font-weight:var(--zn-font-weight-normal);cursor:pointer;color:rgba(var(--zn-text),var(--zn-text-opacity))}.air-datepicker-button:hover{background-color:var(--zn-input-background-color-hover) !important}:host{display:contents;--zn-input-bg:var(--zn-panel)}.add-rule{max-width:250px;margin-bottom:10px}.query-builder{display:flex;flex-direction:column;flex-wrap:wrap}.query-builder zn-button{align-self:flex-end}.query-builder--popup:has(.query-builder__row){min-width:990px}.query-builder__row,.query-builder__wrapper{display:flex;width:100%;gap:10px}.query-builder__row{padding-bottom:10px}.query-builder__key,.query-builder__comparator{flex-basis:60%}.query-builder__value{flex-grow:1}.query-builder--dropdown:has(.query-builder__row){min-width:900px}`;var mC={eq:"Equals",neq:"Not Equals",eqi:"Equals (Insensitive)",neqi:"Not Equals (Insensitive)",before:"Was Before",after:"Was After",in:"In",nin:"Not In",matchphrasepre:"Match Phrase Prefix",nmatchphrasepre:"Does Not Match Phrase Prefix",matchphrase:"Match Phrase",nmatchphrase:"Does Not Match Phrase",match:"Match",nmatch:"Does Not Match",contains:"Contains",doesnotcontain:"Does Not Contain",starts:"Starts With",nstarts:"Does Not Start With",ends:"Ends With",nends:"Does Not End With",wild:"Wildcard Match",nwild:"Does Not Match Wildcard",like:"Like Match With",nlike:"Does Not Like Match With",fuzzy:"Fuzzy Match With",nfuzzy:"Does Not Match Fuzzy With",gte:"Greater Than or Equals",gt:"Greater Than",lt:"Less Than",lte:"Less Than or Equals"},cr=class extends C{constructor(){super(...arguments);this._selectedRules=new Map;this._formController=new ot(this,{});this.filters=[];this.dropdown=!1;this.showValues=[]}get validationMessage(){return""}get validity(){return this.input?.validity}firstUpdated(t){super.firstUpdated(t),this.showValues&&this.showValues.forEach(r=>{this._addRule(null,r)}),this._handleChange(),this._formController.updateValidity()}render(){return u`
2129
2132
  <div class=${N({"query-builder":!0,"query-builder--dropdown":this.dropdown})}>
2130
2133
  <zn-select class="add-rule"
2131
2134
  size="medium"
@@ -2173,16 +2176,16 @@ import{a as kn,b as H1,c as ar,d as c,e as V}from"./chunks/zn.UBLZO6CI.js";var B
2173
2176
  ${m}
2174
2177
  ${v}
2175
2178
  </div>
2176
- `,k=se(x);if(k){if(n!==void 0?this.container.insertBefore(k,this.container.children[n]):this.container.insertBefore(k,this.addRule),this.addRule.value="",this.addRule.displayLabel="",this.addRule.selectedOptions[0].selected=!1,a===this.addRule&&this.parentElement?.classList.contains("dropdown__query-builder")){let _=this.parentElement;requestAnimationFrame(()=>{_.scrollTop=_.scrollHeight})}this._handleChange()}}_createInput(t,r,n){let a;switch(t.type){case"bool":case"boolean":{a=this._createBooleanInput(r);break}case"number":{a=this._createNumberInput(r);break}case"date":{a=this._createDateInput(r,!1,t.dateSubmitFormat);break}case"dateTime":{a=this._createDateInput(r,!0,t.dateSubmitFormat);break}default:{a=t.options?this._createSelectInput(r,t,n):this._createDefaultInput(r);break}}return a}_changeValueInput(t,r,n){if(!n.options)return;let a=r.target;if(a.value===this._previousOperator)return;let s=a.parentElement?.querySelector(".query-builder__value");if(!s)return;let l=s?.parentElement;l.removeChild(s);let d=this._createInput(n,t,a.value);d&&l.prepend(d)}_createBooleanInput(t){let r=u`
2179
+ `,k=le(x);if(k){if(n!==void 0?this.container.insertBefore(k,this.container.children[n]):this.container.insertBefore(k,this.addRule),this.addRule.value="",this.addRule.displayLabel="",this.addRule.selectedOptions[0].selected=!1,a===this.addRule&&this.parentElement?.classList.contains("dropdown__query-builder")){let _=this.parentElement;requestAnimationFrame(()=>{_.scrollTop=_.scrollHeight})}this._handleChange()}}_createInput(t,r,n){let a;switch(t.type){case"bool":case"boolean":{a=this._createBooleanInput(r);break}case"number":{a=this._createNumberInput(r);break}case"date":{a=this._createDateInput(r,!1,t.dateSubmitFormat);break}case"dateTime":{a=this._createDateInput(r,!0,t.dateSubmitFormat);break}default:{a=t.options?this._createSelectInput(r,t,n):this._createDefaultInput(r);break}}return a}_changeValueInput(t,r,n){if(!n.options)return;let a=r.target;if(a.value===this._previousOperator)return;let s=a.parentElement?.querySelector(".query-builder__value");if(!s)return;let l=s?.parentElement;l.removeChild(s);let d=this._createInput(n,t,a.value);d&&l.prepend(d)}_createBooleanInput(t){let r=u`
2177
2180
  <zn-select class="query-builder__value"
2178
2181
  @zn-change="${n=>this._updateValue(t,n)}">
2179
2182
  <zn-option value="1">True</zn-option>
2180
2183
  <zn-option value="0">False</zn-option>
2181
- </zn-select>`;return se(r)}_createNumberInput(t){let r=u`
2184
+ </zn-select>`;return le(r)}_createNumberInput(t){let r=u`
2182
2185
  <zn-input type="number"
2183
2186
  class="query-builder__value"
2184
2187
  @zn-input="${n=>this._updateValue(t,n)}">
2185
- </zn-input>`;return se(r)}_createDateInput(t,r,n="legacy"){let a=u`
2188
+ </zn-input>`;return le(r)}_createDateInput(t,r,n="legacy"){let a=u`
2186
2189
  <zn-datepicker
2187
2190
  name="${t}"
2188
2191
  format-time="HH:mm"
@@ -2192,7 +2195,7 @@ import{a as kn,b as H1,c as ar,d as c,e as V}from"./chunks/zn.UBLZO6CI.js";var B
2192
2195
  @zn-change="${s=>this._updateDateValue(t,s,n)}"
2193
2196
  >
2194
2197
  </zn-datepicker>
2195
- `;return se(a)}_createSelectInput(t,r,n){let a=this.filters.find(d=>d.id===r?.id)?.options;if(a===void 0)return null;let s=n==="in"||n==="nin",l=u`
2198
+ `;return le(a)}_createSelectInput(t,r,n){let a=this.filters.find(d=>d.id===r?.id)?.options;if(a===void 0)return null;let s=n==="in"||n==="nin",l=u`
2196
2199
  <zn-select class="query-builder__value"
2197
2200
  @zn-change="${d=>this.updateInValue(t,d)}"
2198
2201
  name=${(s?"value":void 0)||G}
@@ -2204,11 +2207,11 @@ import{a as kn,b as H1,c as ar,d as c,e as V}from"./chunks/zn.UBLZO6CI.js";var B
2204
2207
  <zn-option value="${d}">
2205
2208
  ${a[d]}
2206
2209
  </zn-option>`)}
2207
- </zn-select>`;return se(l)}_createDefaultInput(t){let r=u`
2210
+ </zn-select>`;return le(l)}_createDefaultInput(t){let r=u`
2208
2211
  <zn-input type="text"
2209
2212
  class="query-builder__value"
2210
2213
  @zn-input="${n=>this._updateValue(t,n)}">
2211
- </zn-input>`;return se(r)}_updateOperatorValue(t,r){let n=this._selectedRules.get(t);if(!n)return;let a=r.target;this._previousOperator=n.operator,n.operator=a.value,this._selectedRules.set(t,n),this._handleChange()}_updateDateValue(t,r,n="legacy"){let a=this._selectedRules.get(t);if(!a)return;let s=r.target,l=a.operator,d,h;switch(n){case"legacy":if(l==="eq"||l==="neq")h=(s.timestamp/1e3).toString();else{let m=l==="before"?-1:1;h=(Math.floor((Date.now()-s.timestamp)/1e3/60)*m).toString()}break;case"timestamp":h=s.timestamp.toString();break;case"iso":d=new Date(s.timestamp),h=new Date(d.getTime()-d.getTimezoneOffset()*6e4).toISOString();break}a.value=h,this._selectedRules.set(t,a),this._handleChange()}_updateValue(t,r){let n=this._selectedRules.get(t);if(!n)return;let a=r.target;n.value=a.value,this._selectedRules.set(t,n),this._handleChange()}updateInValue(t,r){let n=this._selectedRules.get(t);if(!n)return;let a=r.target;n.value=a.value,this._selectedRules.set(t,n),this._handleChange()}_changeRule(t,r){let n=this._getRulePosition(t),a=r.target;a.popup.active=!1,a?.parentElement?.remove(),this._removeRule(t,r),this._addRule(r,"",n)}_getRulePosition(t){let r=this.container.querySelectorAll(".query-builder__row"),n=-1;return r.forEach((a,s)=>{a.id===t&&(n=s)}),n}_removeRule(t,r){this._selectedRules.delete(t),r.target?.closest(".query-builder__row")?.remove(),this._handleChange()}clear(){this._selectedRules.clear(),this.value="",this.container.querySelectorAll(".query-builder__row").forEach(r=>{r.remove()}),this.requestUpdate(),this._formController.updateValidity()}reset(){this.clear(),this.showValues.forEach(t=>{this._addRule(null,t)}),this._handleChange(),this._formController.updateValidity()}checkValidity(){return this.input.checkValidity()}getForm(){return this._formController.getForm()}reportValidity(){return this.input.reportValidity()}setCustomValidity(t){this.input.setCustomValidity(t),this._formController.updateValidity()}};cr.styles=E(Cv),cr.dependencies={"zn-button":Tt,"zn-input":qe,"zn-option":wr,"zn-select":De},c([F(".query-builder")],cr.prototype,"container",2),c([F(".add-rule")],cr.prototype,"addRule",2),c([F("input#main-input")],cr.prototype,"input",2),c([p({type:Array})],cr.prototype,"filters",2),c([p({type:Boolean})],cr.prototype,"dropdown",2),c([p()],cr.prototype,"name",2),c([p()],cr.prototype,"value",2),c([p({attribute:"show-values",converter:{fromAttribute:t=>t.split(" "),toAttribute:t=>t.join(" ")}})],cr.prototype,"showValues",2);var fC=cr;cr.define("zn-query-builder");var Ev=A`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}:host *,:host *::before,:host *::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:ost{display:contents}.progress-tile{display:flex;width:100%;align-items:center;flex-direction:row;gap:12px;margin-bottom:20px}.progress-tile zn-icon{display:flex;flex-shrink:0;overflow:hidden}.progress-tile__content{display:flex;flex-direction:column;flex-grow:1}.progress-tile__header{display:flex;justify-content:space-between}.progress-tile__header .header__caption{display:flex;flex-direction:row;align-items:center;gap:var(--zn-spacing-x-small);margin-bottom:var(--zn-spacing-2x-small)}.progress-tile__header .header__caption p{font-size:14px;font-weight:400;margin:0;color:rgb(var(--zn-text))}.progress-tile__header .header__wait-time{display:flex;flex-direction:row;gap:3px;font-size:12px;font-weight:400;color:rgb(var(--zn-primary))}.progress-tile__header .header__wait-time p{margin:0}.progress-tile__progress-bars{flex-grow:1;background:rgba(0,0,0,0.02)}.progress-tile__progress-bars__first,.progress-tile__progress-bars__second{height:4px;background-color:rgba(var(--zn-border-color));transition:width 0.3s}.progress-tile__progress-bars__second{background-color:rgb(var(--zn-color-success))}.progress-tile__total-time{min-width:40px;text-align:end;font-size:14px;font-weight:400;color:rgb(var(--zn-text-heading))}.progress-tile--with-hours .progress-tile__total-time{min-width:60px}.progress-tile--ended .progress-tile__progress-bars__first{background-color:rgb(var(--zn-primary))}.progress-tile--ended .progress-tile__progress-bars__second{display:none}.progress-tile--warning .progress-tile__progress-bars__second{background-color:rgb(var(--zn-color-warning))}.progress-tile--warning .header__wait-time{color:rgb(var(--zn-color-warning))}.progress-tile--danger .progress-tile__progress-bars__second{background-color:rgb(var(--zn-color-error))}.progress-tile--danger .header__wait-time{color:rgb(var(--zn-color-error))}`;var dr=class extends C{constructor(){super(...arguments);this.maxWaitTime=300}connectedCallback(){super.connectedCallback(),this.status!=="Ended"&&(this._timerInterval=setInterval(()=>this.requestUpdate(),1e3))}disconnectedCallback(){super.disconnectedCallback(),this._timerInterval&&clearInterval(this._timerInterval)}getHumanReadableTime(t){t=Math.round(t);let r=Math.floor(t/3600),n=Math.floor(t%3600/60),a=t%60;return r>=24?"1 Day+":r?`${r.toString().padStart(2,"0")}:${n.toString().padStart(2,"0")}:${a.toString().padStart(2,"0")}`:`${n.toString().padStart(2,"0")}:${a.toString().padStart(2,"0")}`}render(){let t=new Date().getTime()/1e3,r=t-this.startTime,n=t-this.maxTime;this.waitingAgentResponse&&(this.waitTime+=1);let a=r/n*100;a=a>100?100:a;let s=this.waitTime/this.maxWaitTime*100;s=s>100?100:s;let l=this.getHumanReadableTime(r),d=this.getHumanReadableTime(this.waitTime),h=this.waitingAgentResponse?"Waiting for Agent":this.status,m=l.match(/:/g)?.length===2||d.match(/:/g)?.length===2;return u`
2214
+ </zn-input>`;return le(r)}_updateOperatorValue(t,r){let n=this._selectedRules.get(t);if(!n)return;let a=r.target;this._previousOperator=n.operator,n.operator=a.value,this._selectedRules.set(t,n),this._handleChange()}_updateDateValue(t,r,n="legacy"){let a=this._selectedRules.get(t);if(!a)return;let s=r.target,l=a.operator,d,h;switch(n){case"legacy":if(l==="eq"||l==="neq")h=(s.timestamp/1e3).toString();else{let m=l==="before"?-1:1;h=(Math.floor((Date.now()-s.timestamp)/1e3/60)*m).toString()}break;case"timestamp":h=s.timestamp.toString();break;case"iso":d=new Date(s.timestamp),h=new Date(d.getTime()-d.getTimezoneOffset()*6e4).toISOString();break}a.value=h,this._selectedRules.set(t,a),this._handleChange()}_updateValue(t,r){let n=this._selectedRules.get(t);if(!n)return;let a=r.target;n.value=a.value,this._selectedRules.set(t,n),this._handleChange()}updateInValue(t,r){let n=this._selectedRules.get(t);if(!n)return;let a=r.target;n.value=a.value,this._selectedRules.set(t,n),this._handleChange()}_changeRule(t,r){let n=this._getRulePosition(t),a=r.target;a.popup.active=!1,a?.parentElement?.remove(),this._removeRule(t,r),this._addRule(r,"",n)}_getRulePosition(t){let r=this.container.querySelectorAll(".query-builder__row"),n=-1;return r.forEach((a,s)=>{a.id===t&&(n=s)}),n}_removeRule(t,r){this._selectedRules.delete(t),r.target?.closest(".query-builder__row")?.remove(),this._handleChange()}clear(){this._selectedRules.clear(),this.value="",this.container.querySelectorAll(".query-builder__row").forEach(r=>{r.remove()}),this.requestUpdate(),this._formController.updateValidity()}reset(){this.clear(),this.showValues.forEach(t=>{this._addRule(null,t)}),this._handleChange(),this._formController.updateValidity()}checkValidity(){return this.input.checkValidity()}getForm(){return this._formController.getForm()}reportValidity(){return this.input.reportValidity()}setCustomValidity(t){this.input.setCustomValidity(t),this._formController.updateValidity()}};cr.styles=E(Cv),cr.dependencies={"zn-button":Tt,"zn-input":qe,"zn-option":wr,"zn-select":De},c([F(".query-builder")],cr.prototype,"container",2),c([F(".add-rule")],cr.prototype,"addRule",2),c([F("input#main-input")],cr.prototype,"input",2),c([p({type:Array})],cr.prototype,"filters",2),c([p({type:Boolean})],cr.prototype,"dropdown",2),c([p()],cr.prototype,"name",2),c([p()],cr.prototype,"value",2),c([p({attribute:"show-values",converter:{fromAttribute:t=>t.split(" "),toAttribute:t=>t.join(" ")}})],cr.prototype,"showValues",2);var fC=cr;cr.define("zn-query-builder");var Ev=A`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}:host *,:host *::before,:host *::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:ost{display:contents}.progress-tile{display:flex;width:100%;align-items:center;flex-direction:row;gap:12px;margin-bottom:20px}.progress-tile zn-icon{display:flex;flex-shrink:0;overflow:hidden}.progress-tile__content{display:flex;flex-direction:column;flex-grow:1}.progress-tile__header{display:flex;justify-content:space-between}.progress-tile__header .header__caption{display:flex;flex-direction:row;align-items:center;gap:var(--zn-spacing-x-small);margin-bottom:var(--zn-spacing-2x-small)}.progress-tile__header .header__caption p{font-size:14px;font-weight:400;margin:0;color:rgb(var(--zn-text))}.progress-tile__header .header__wait-time{display:flex;flex-direction:row;gap:3px;font-size:12px;font-weight:400;color:rgb(var(--zn-primary))}.progress-tile__header .header__wait-time p{margin:0}.progress-tile__progress-bars{flex-grow:1;background:rgba(0,0,0,0.02)}.progress-tile__progress-bars__first,.progress-tile__progress-bars__second{height:4px;background-color:rgba(var(--zn-border-color));transition:width 0.3s}.progress-tile__progress-bars__second{background-color:rgb(var(--zn-color-success))}.progress-tile__total-time{min-width:40px;text-align:end;font-size:14px;font-weight:400;color:rgb(var(--zn-text-heading))}.progress-tile--with-hours .progress-tile__total-time{min-width:60px}.progress-tile--ended .progress-tile__progress-bars__first{background-color:rgb(var(--zn-primary))}.progress-tile--ended .progress-tile__progress-bars__second{display:none}.progress-tile--warning .progress-tile__progress-bars__second{background-color:rgb(var(--zn-color-warning))}.progress-tile--warning .header__wait-time{color:rgb(var(--zn-color-warning))}.progress-tile--danger .progress-tile__progress-bars__second{background-color:rgb(var(--zn-color-error))}.progress-tile--danger .header__wait-time{color:rgb(var(--zn-color-error))}`;var dr=class extends C{constructor(){super(...arguments);this.maxWaitTime=300}connectedCallback(){super.connectedCallback(),this.status!=="Ended"&&(this._timerInterval=setInterval(()=>this.requestUpdate(),1e3))}disconnectedCallback(){super.disconnectedCallback(),this._timerInterval&&clearInterval(this._timerInterval)}getHumanReadableTime(t){t=Math.round(t);let r=Math.floor(t/3600),n=Math.floor(t%3600/60),a=t%60;return r>=24?"1 Day+":r?`${r.toString().padStart(2,"0")}:${n.toString().padStart(2,"0")}:${a.toString().padStart(2,"0")}`:`${n.toString().padStart(2,"0")}:${a.toString().padStart(2,"0")}`}render(){let t=new Date().getTime()/1e3,r=t-this.startTime,n=t-this.maxTime;this.waitingAgentResponse&&(this.waitTime+=1);let a=r/n*100;a=a>100?100:a;let s=this.waitTime/this.maxWaitTime*100;s=s>100?100:s;let l=this.getHumanReadableTime(r),d=this.getHumanReadableTime(this.waitTime),h=this.waitingAgentResponse?"Waiting for Agent":this.status,m=l.match(/:/g)?.length===2||d.match(/:/g)?.length===2;return u`
2212
2215
  <div class="${N({"progress-tile":!0,"progress-tile--with-hours":m,"progress-tile--ended":this.status==="Ended","progress-tile--waiting-agent":this.waitingAgentResponse,"progress-tile--interacting":this.status==="Interacting","progress-tile--warn":this.waitTime>60&&this.waitTime<this.maxWaitTime/2,"progress-tile--danger":this.waitTime>=this.maxWaitTime})}">
2213
2216
  <zn-icon size="36" src="${this.avatar}"></zn-icon>
2214
2217
  <div class="progress-tile__content">
@@ -2435,7 +2438,7 @@ import{a as kn,b as H1,c as ar,d as c,e as V}from"./chunks/zn.UBLZO6CI.js";var B
2435
2438
  ${h}
2436
2439
  ${b}
2437
2440
  </div>
2438
- `,v=se(g);v&&(n!==void 0?this.container.insertBefore(v,this.container.children[n]):this.container.insertBefore(v,this.addRule),this.addRule.value="",this.addRule.displayLabel="",this.addRule.selectedOptions?.length&&(this.addRule.selectedOptions[0].selected=!1),this._handleChange())}_createInput(t,r){if(r.options){let a=u`
2441
+ `,v=le(g);v&&(n!==void 0?this.container.insertBefore(v,this.container.children[n]):this.container.insertBefore(v,this.addRule),this.addRule.value="",this.addRule.displayLabel="",this.addRule.selectedOptions?.length&&(this.addRule.selectedOptions[0].selected=!1),this._handleChange())}_createInput(t,r){if(r.options){let a=u`
2439
2442
  <zn-select class="query-builder__value"
2440
2443
  @zn-change="${l=>this._updateValue(t,l)}">
2441
2444
  ${Object.keys(r.options).map(l=>u`
@@ -2443,24 +2446,24 @@ import{a as kn,b as H1,c as ar,d as c,e as V}from"./chunks/zn.UBLZO6CI.js";var B
2443
2446
  ${r.options?r.options[l]:""}
2444
2447
  </zn-option>
2445
2448
  `)}
2446
- </zn-select>`,s=se(a);return s&&this._updateValue(t,{target:s}),s}if(r.type==="bool"||r.type==="boolean"){let a=u`
2449
+ </zn-select>`,s=le(a);return s&&this._updateValue(t,{target:s}),s}if(r.type==="bool"||r.type==="boolean"){let a=u`
2447
2450
  <zn-select class="query-builder__value"
2448
2451
  @zn-change="${s=>this._updateValue(t,s)}">
2449
2452
  <zn-option value="1">True</zn-option>
2450
2453
  <zn-option value="0">False</zn-option>
2451
- </zn-select>`;return se(a)}if(r.type==="number"){let a=u`
2454
+ </zn-select>`;return le(a)}if(r.type==="number"){let a=u`
2452
2455
  <zn-input type="number"
2453
2456
  class="query-builder__value"
2454
2457
  @zn-input="${s=>this._updateValue(t,s)}">
2455
- </zn-input>`;return se(a)}if(r.type==="date"){let a=u`
2458
+ </zn-input>`;return le(a)}if(r.type==="date"){let a=u`
2456
2459
  <zn-input type="date"
2457
2460
  class="query-builder__value"
2458
2461
  @zn-input="${s=>this._updateValue(t,s)}">
2459
- </zn-input>`;return se(a)}let n=u`
2462
+ </zn-input>`;return le(a)}let n=u`
2460
2463
  <zn-input type="text"
2461
2464
  class="query-builder__value"
2462
2465
  @zn-input="${a=>this._updateValue(t,a)}">
2463
- </zn-input>`;return se(n)}_updateValue(t,r){let n=this._selectedRules.get(t);if(!n)return;let a=r.target;n.value=a.value,this._selectedRules.set(t,n),this._handleChange()}_getRulePosition(t){let r=this.container.querySelectorAll(".query-builder__row"),n=-1;return r.forEach((a,s)=>{a.id===t&&(n=s)}),n}_changeRule(t,r){let n=this._getRulePosition(t),a=r.target;a.popup.active=!1,a?.parentElement?.remove(),this._removeRule(t,r),this._addRule(r,"",n)}_removeRule(t,r){this._selectedRules.delete(t),r.target?.closest(".query-builder__row")?.remove(),this._handleChange()}checkValidity(){return this.input.checkValidity()}getForm(){return this._formController.getForm()}reportValidity(){return this.input.reportValidity()}setCustomValidity(t){this.input.setCustomValidity(t),this._formController.updateValidity()}};Rr.styles=E($v),Rr.dependencies={"zn-button":Tt,"zn-input":qe,"zn-option":wr,"zn-select":De},c([F(".bulk-actions")],Rr.prototype,"container",2),c([F(".add-rule")],Rr.prototype,"addRule",2),c([F("input#main-input")],Rr.prototype,"input",2),c([p()],Rr.prototype,"name",2),c([p()],Rr.prototype,"value",2),c([p({type:Array})],Rr.prototype,"actions",2);var xC=Rr;Rr.define("zn-bulk-actions");var yC=()=>{let i="attachment",o=new Date().getTime();return`${i}_${o}`},al=class{constructor(o,t){this._attachmentContainer=document.createElement("div");this._quill=o,this._options=t,typeof this._options.upload!="function"&&console.warn("[Quill Attachment Module] No upload function provided"),typeof this._options.onFileUploaded!="function"&&console.warn("[Quill Attachment Module] No file uploaded function provided"),this._quill.getModule("toolbar").addHandler("attachment",this._selectLocalImage.bind(this)),this._createAttachmentContainer()}_selectLocalImage(){this._fileHolder=document.createElement("input"),this._fileHolder.setAttribute("type","file"),this._fileHolder.setAttribute("accept","*/*"),this._fileHolder.onchange=this._fileChanged.bind(this),this._fileHolder.click()}_fileChanged(){if(!this._fileHolder?.files||this._fileHolder.files.length<0)return;let o=this._fileHolder.files[0];this.addAttachment(o)}addAttachment(o,t){let r=yC(),n=a=>{this._insertAttachment({dataUrl:a,file:o,id:r})};if(t)n(t);else{let a=new FileReader;a.addEventListener("load",()=>{let s=a.result;n(s)},!1),a.readAsDataURL(o)}typeof this._options.upload=="function"&&this._options.upload(o).then(async({path:a,url:s})=>{await this._uploadAttachment(o,s),this._updateAttachment(r,s,a)}).catch(a=>{console.warn(a.message)})}_createAttachmentContainer(){let o=this._attachmentContainer;o.id="attachment-container",o.style.display="flex",o.style.flexWrap="wrap",o.style.gap="10px",o.style.position="absolute",o.style.bottom="0",o.style.left="0",o.style.right="0",o.style.padding="10px",this._quill.container.appendChild(o)}_insertAttachment({dataUrl:o,file:t,id:r}){this._attachmentContainer.appendChild(this._createAttachment(o,t,r))}_updateAttachment(o,t,r){let n=this._quill.container.querySelector(`#${o}`);if(!n)return;n.setAttribute("href",t);let a=n.querySelector(".attachment-name");a&&(r?a.textContent=r:a.textContent="Error uploading file"),this._options.onFileUploaded&&this._options.onFileUploaded(n,{url:t});let s=this._options.attachmentInput;if(s&&r){let l=s.value,d=l?JSON.parse(l):[];d.push(r),s.value=JSON.stringify(d)}}_createAttachment(o,t,r){let n=document.createElement("a");n.setAttribute("href",o),n.setAttribute("id",r),n.setAttribute("download",t.name),n.style.padding="10px",n.style.backgroundColor="white",n.style.border="1px solid #ccc",n.style.borderRadius="5px",n.style.display="flex",n.style.alignItems="center",n.style.gap="5px";let a=document.createElement("p");a.classList.add("attachment-name"),a.textContent="Uploading...",n.appendChild(a);let s=document.createElement("button");return s.innerHTML='<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 30 30"><path d="M7 4a.995.995 0 0 0-.707.293l-2 2a.999.999 0 0 0 0 1.414L11.586 15l-7.293 7.293a.999.999 0 0 0 0 1.414l2 2a.999.999 0 0 0 1.414 0L15 18.414l7.293 7.293a.999.999 0 0 0 1.414 0l2-2a.999.999 0 0 0 0-1.414L18.414 15l7.293-7.293a.999.999 0 0 0 0-1.414l-2-2a.999.999 0 0 0-1.414 0L15 11.586 7.707 4.293A.996.996 0 0 0 7 4z"/></svg>',s.onclick=l=>{l.preventDefault(),l.stopImmediatePropagation(),this._removeAttachment(r)},n.appendChild(s),n}reset(){this._attachmentContainer.replaceChildren();let o=this._options.attachmentInput;o&&(o.value="")}_removeAttachment(o){let t=this._quill.container.querySelector(`#${o}`);t&&t.remove();let r=this._options.attachmentInput;if(r){let n=r.value,a=t?.querySelector(".attachment-name"),s=n?JSON.parse(n):[],l=s.indexOf(a?.textContent?a.textContent:"");l>-1&&(s.splice(l,1),r.value=JSON.stringify(s))}}_uploadAttachment(o,t){return new Promise((r,n)=>{let a=new XMLHttpRequest;a.open("PUT",t,!0),a.setRequestHeader("Content-Type",o.type),a.onload=()=>{a.status>=200&&a.status<300?r():n(new Error(`[Quill Attachment Module] Failed to upload file. Status: ${a.status}`))},a.onerror=()=>{n(new Error("[Quill Attachment Module] Error occurred while uploading file."))},a.send(o)})}};var Lv=A`:host{position:absolute;z-index:var(--zn-z-index-editor-action);display:none;background:var(--zn-panel-background-color);border:1px solid var(--zn-border-color);border-radius:8px;box-shadow:var(--zn-shadow-medium);padding:6px 0;max-height:220px;overflow-y:auto;min-width:360px}:host([open]){display:block}.header{padding:4px 6px;font-size:var(--zn-font-size-x-small);opacity:0.6}.item{display:flex;align-items:center;gap:8px;padding:8px;width:100%;border:none;background:transparent;cursor:pointer;font:inherit}.item[aria-selected=true],.item:hover{background:var(--zn-input-background-color-hover)}.label{opacity:0.7}.empty{padding:8px;opacity:0.7}`;var Mn=class extends C{constructor(){super(...arguments);this.open=!1;this.query="";this.results=[];this._activeIndex=-1;this._onClickItem=t=>{let r=t.currentTarget;if(!r)return;let n=parseInt(r.dataset.index||"-1",10);if(Number.isNaN(n))return;this.setActiveIndex(n);let a=this.results?.[n];a&&this.dispatchEvent(new CustomEvent("zn-format-select",{bubbles:!0,composed:!0,detail:{icon:a.icon,label:a.label,format:a.format,value:a.value,key:a.key}}))}}show(){this.open=!0}hide(){this.open=!1,this._activeIndex=-1}setPosition(t,r){this.style.left=`${Math.max(0,t)}px`,this.style.top=`${r}px`}setActiveIndex(t){let r=this.results?.length??0;if(!r){this._activeIndex=-1;return}t<0&&(t=r-1),t>=r&&(t=0),this._activeIndex=t,this.requestUpdate(),requestAnimationFrame(()=>{Array.from(this.renderRoot.querySelectorAll("[data-toolbar-option]"))[this._activeIndex]?.scrollIntoView?.({block:"nearest"})})}getActiveIndex(){return this._activeIndex}willUpdate(t){t.has("results")&&(this._activeIndex=this.results?.length?0:-1)}render(){return u`
2466
+ </zn-input>`;return le(n)}_updateValue(t,r){let n=this._selectedRules.get(t);if(!n)return;let a=r.target;n.value=a.value,this._selectedRules.set(t,n),this._handleChange()}_getRulePosition(t){let r=this.container.querySelectorAll(".query-builder__row"),n=-1;return r.forEach((a,s)=>{a.id===t&&(n=s)}),n}_changeRule(t,r){let n=this._getRulePosition(t),a=r.target;a.popup.active=!1,a?.parentElement?.remove(),this._removeRule(t,r),this._addRule(r,"",n)}_removeRule(t,r){this._selectedRules.delete(t),r.target?.closest(".query-builder__row")?.remove(),this._handleChange()}checkValidity(){return this.input.checkValidity()}getForm(){return this._formController.getForm()}reportValidity(){return this.input.reportValidity()}setCustomValidity(t){this.input.setCustomValidity(t),this._formController.updateValidity()}};Rr.styles=E($v),Rr.dependencies={"zn-button":Tt,"zn-input":qe,"zn-option":wr,"zn-select":De},c([F(".bulk-actions")],Rr.prototype,"container",2),c([F(".add-rule")],Rr.prototype,"addRule",2),c([F("input#main-input")],Rr.prototype,"input",2),c([p()],Rr.prototype,"name",2),c([p()],Rr.prototype,"value",2),c([p({type:Array})],Rr.prototype,"actions",2);var xC=Rr;Rr.define("zn-bulk-actions");var yC=()=>{let i="attachment",o=new Date().getTime();return`${i}_${o}`},al=class{constructor(o,t){this._attachmentContainer=document.createElement("div");this._quill=o,this._options=t,typeof this._options.upload!="function"&&console.warn("[Quill Attachment Module] No upload function provided"),typeof this._options.onFileUploaded!="function"&&console.warn("[Quill Attachment Module] No file uploaded function provided"),this._quill.getModule("toolbar").addHandler("attachment",this._selectLocalImage.bind(this)),this._createAttachmentContainer()}_selectLocalImage(){this._fileHolder=document.createElement("input"),this._fileHolder.setAttribute("type","file"),this._fileHolder.setAttribute("accept","*/*"),this._fileHolder.onchange=this._fileChanged.bind(this),this._fileHolder.click()}_fileChanged(){if(!this._fileHolder?.files||this._fileHolder.files.length<0)return;let o=this._fileHolder.files[0];this.addAttachment(o)}addAttachment(o,t){let r=yC(),n=a=>{this._insertAttachment({dataUrl:a,file:o,id:r})};if(t)n(t);else{let a=new FileReader;a.addEventListener("load",()=>{let s=a.result;n(s)},!1),a.readAsDataURL(o)}typeof this._options.upload=="function"&&this._options.upload(o).then(async({path:a,url:s})=>{await this._uploadAttachment(o,s),this._updateAttachment(r,s,a)}).catch(a=>{console.warn(a.message)})}_createAttachmentContainer(){let o=this._attachmentContainer;o.id="attachment-container",o.style.display="flex",o.style.flexWrap="wrap",o.style.gap="10px",o.style.position="absolute",o.style.bottom="0",o.style.left="0",o.style.right="0",o.style.padding="10px",this._quill.container.appendChild(o)}_insertAttachment({dataUrl:o,file:t,id:r}){this._attachmentContainer.appendChild(this._createAttachment(o,t,r))}_updateAttachment(o,t,r){let n=this._quill.container.querySelector(`#${o}`);if(!n)return;n.setAttribute("href",t);let a=n.querySelector(".attachment-name");a&&(r?a.textContent=r:a.textContent="Error uploading file"),this._options.onFileUploaded&&this._options.onFileUploaded(n,{url:t});let s=this._options.attachmentInput;if(s&&r){let l=s.value,d=l?JSON.parse(l):[];d.push(r),s.value=JSON.stringify(d)}}_createAttachment(o,t,r){let n=document.createElement("a");n.setAttribute("href",o),n.setAttribute("id",r),n.setAttribute("download",t.name),n.style.padding="10px",n.style.backgroundColor="white",n.style.border="1px solid #ccc",n.style.borderRadius="5px",n.style.display="flex",n.style.alignItems="center",n.style.gap="5px";let a=document.createElement("p");a.classList.add("attachment-name"),a.textContent="Uploading...",n.appendChild(a);let s=document.createElement("button");return s.innerHTML='<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 30 30"><path d="M7 4a.995.995 0 0 0-.707.293l-2 2a.999.999 0 0 0 0 1.414L11.586 15l-7.293 7.293a.999.999 0 0 0 0 1.414l2 2a.999.999 0 0 0 1.414 0L15 18.414l7.293 7.293a.999.999 0 0 0 1.414 0l2-2a.999.999 0 0 0 0-1.414L18.414 15l7.293-7.293a.999.999 0 0 0 0-1.414l-2-2a.999.999 0 0 0-1.414 0L15 11.586 7.707 4.293A.996.996 0 0 0 7 4z"/></svg>',s.onclick=l=>{l.preventDefault(),l.stopImmediatePropagation(),this._removeAttachment(r)},n.appendChild(s),n}reset(){this._attachmentContainer.replaceChildren();let o=this._options.attachmentInput;o&&(o.value="")}_removeAttachment(o){let t=this._quill.container.querySelector(`#${o}`);t&&t.remove();let r=this._options.attachmentInput;if(r){let n=r.value,a=t?.querySelector(".attachment-name"),s=n?JSON.parse(n):[],l=s.indexOf(a?.textContent?a.textContent:"");l>-1&&(s.splice(l,1),r.value=JSON.stringify(s))}}_uploadAttachment(o,t){return new Promise((r,n)=>{let a=new XMLHttpRequest;a.open("PUT",t,!0),a.setRequestHeader("Content-Type",o.type),a.onload=()=>{a.status>=200&&a.status<300?r():n(new Error(`[Quill Attachment Module] Failed to upload file. Status: ${a.status}`))},a.onerror=()=>{n(new Error("[Quill Attachment Module] Error occurred while uploading file."))},a.send(o)})}};var Lv=A`:host{position:absolute;z-index:var(--zn-z-index-editor-action);display:none;background:var(--zn-panel-background-color);border:1px solid var(--zn-border-color);border-radius:8px;box-shadow:var(--zn-shadow-medium);padding:6px 0;max-height:220px;overflow-y:auto;min-width:360px}:host([open]){display:block}.header{padding:4px 6px;font-size:var(--zn-font-size-x-small);opacity:0.6}.item{display:flex;align-items:center;gap:8px;padding:8px;width:100%;border:none;background:transparent;cursor:pointer;font:inherit}.item[aria-selected=true],.item:hover{background:var(--zn-input-background-color-hover)}.label{opacity:0.7}.empty{padding:8px;opacity:0.7}`;var Mn=class extends C{constructor(){super(...arguments);this.open=!1;this.query="";this.results=[];this._activeIndex=-1;this._onClickItem=t=>{let r=t.currentTarget;if(!r)return;let n=parseInt(r.dataset.index||"-1",10);if(Number.isNaN(n))return;this.setActiveIndex(n);let a=this.results?.[n];a&&this.dispatchEvent(new CustomEvent("zn-format-select",{bubbles:!0,composed:!0,detail:{icon:a.icon,label:a.label,format:a.format,value:a.value,key:a.key}}))}}show(){this.open=!0}hide(){this.open=!1,this._activeIndex=-1}setPosition(t,r){this.style.left=`${Math.max(0,t)}px`,this.style.top=`${r}px`}setActiveIndex(t){let r=this.results?.length??0;if(!r){this._activeIndex=-1;return}t<0&&(t=r-1),t>=r&&(t=0),this._activeIndex=t,this.requestUpdate(),requestAnimationFrame(()=>{Array.from(this.renderRoot.querySelectorAll("[data-toolbar-option]"))[this._activeIndex]?.scrollIntoView?.({block:"nearest"})})}getActiveIndex(){return this._activeIndex}willUpdate(t){t.has("results")&&(this._activeIndex=this.results?.length?0:-1)}render(){return u`
2464
2467
  <div class="header">${this.query?`Search: ${this.query}`:"Options"}</div>
2465
2468
  ${Array.isArray(this.results)&&this.results.length>0?this.results.slice(0,20).map((t,r)=>u`
2466
2469
  <button
@@ -2477,19 +2480,19 @@ import{a as kn,b as H1,c as ar,d as c,e as V}from"./chunks/zn.UBLZO6CI.js";var B
2477
2480
  </button>
2478
2481
  `):u`
2479
2482
  <div class="empty">${this.query?"No results":"Type something"}</div>`}
2480
- `}};Mn.styles=E(Lv),c([p({type:Boolean,reflect:!0})],Mn.prototype,"open",2),c([p({type:String})],Mn.prototype,"query",2),c([p({type:Array})],Mn.prototype,"results",2),c([H()],Mn.prototype,"_activeIndex",2);Mn.define("zn-context-menu");var Aw=ar(Or(),1);var RT=typeof global=="object"&&global&&global.Object===Object&&global,zd=RT;var OT=typeof self=="object"&&self&&self.Object===Object&&self,PT=zd||OT||Function("return this")(),Ee=PT;var HT=Ee.Symbol,xo=HT;var m0=Object.prototype,FT=m0.hasOwnProperty,BT=m0.toString,gl=xo?xo.toStringTag:void 0;function VT(i){var o=FT.call(i,gl),t=i[gl];try{i[gl]=void 0;var r=!0}catch{}var n=BT.call(i);return r&&(o?i[gl]=t:delete i[gl]),n}var f0=VT;var UT=Object.prototype,jT=UT.toString;function GT(i){return jT.call(i)}var g0=GT;var WT="[object Null]",KT="[object Undefined]",b0=xo?xo.toStringTag:void 0;function YT(i){return i==null?i===void 0?KT:WT:b0&&b0 in Object(i)?f0(i):g0(i)}var jo=YT;function XT(i){return i!=null&&typeof i=="object"}var rr=XT;var QT=Array.isArray,yo=QT;function JT(i){var o=typeof i;return i!=null&&(o=="object"||o=="function")}var pr=JT;function ZT(i){return i}var wd=ZT;var t5="[object AsyncFunction]",e5="[object Function]",r5="[object GeneratorFunction]",o5="[object Proxy]";function n5(i){if(!pr(i))return!1;var o=jo(i);return o==e5||o==r5||o==t5||o==o5}var Ya=n5;var i5=Ee["__core-js_shared__"],_d=i5;var v0=(function(){var i=/[^.]+$/.exec(_d&&_d.keys&&_d.keys.IE_PROTO||"");return i?"Symbol(src)_1."+i:""})();function a5(i){return!!v0&&v0 in i}var x0=a5;var s5=Function.prototype,l5=s5.toString;function c5(i){if(i!=null){try{return l5.call(i)}catch{}try{return i+""}catch{}}return""}var Fn=c5;var d5=/[\\^$.*+?()[\]{}|]/g,p5=/^\[object .+?Constructor\]$/,h5=Function.prototype,u5=Object.prototype,m5=h5.toString,f5=u5.hasOwnProperty,g5=RegExp("^"+m5.call(f5).replace(d5,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function b5(i){if(!pr(i)||x0(i))return!1;var o=Ya(i)?g5:p5;return o.test(Fn(i))}var y0=b5;function v5(i,o){return i?.[o]}var z0=v5;function x5(i,o){var t=z0(i,o);return y0(t)?t:void 0}var Pr=x5;var y5=Pr(Ee,"WeakMap"),kd=y5;var w0=Object.create,z5=(function(){function i(){}return function(o){if(!pr(o))return{};if(w0)return w0(o);i.prototype=o;var t=new i;return i.prototype=void 0,t}})(),_0=z5;function w5(i,o,t){switch(t.length){case 0:return i.call(o);case 1:return i.call(o,t[0]);case 2:return i.call(o,t[0],t[1]);case 3:return i.call(o,t[0],t[1],t[2])}return i.apply(o,t)}var k0=w5;function _5(i,o){var t=-1,r=i.length;for(o||(o=Array(r));++t<r;)o[t]=i[t];return o}var Sd=_5;var k5=800,S5=16,C5=Date.now;function E5(i){var o=0,t=0;return function(){var r=C5(),n=S5-(r-t);if(t=r,n>0){if(++o>=k5)return arguments[0]}else o=0;return i.apply(void 0,arguments)}}var S0=E5;function T5(i){return function(){return i}}var C0=T5;var A5=(function(){try{var i=Pr(Object,"defineProperty");return i({},"",{}),i}catch{}})(),Xa=A5;var $5=Xa?function(i,o){return Xa(i,"toString",{configurable:!0,enumerable:!1,value:C0(o),writable:!0})}:wd,E0=$5;var L5=S0(E0),T0=L5;function q5(i,o){for(var t=-1,r=i==null?0:i.length;++t<r&&o(i[t],t,i)!==!1;);return i}var A0=q5;var M5=9007199254740991,I5=/^(?:0|[1-9]\d*)$/;function N5(i,o){var t=typeof i;return o=o??M5,!!o&&(t=="number"||t!="symbol"&&I5.test(i))&&i>-1&&i%1==0&&i<o}var Cd=N5;function D5(i,o,t){o=="__proto__"&&Xa?Xa(i,o,{configurable:!0,enumerable:!0,value:t,writable:!0}):i[o]=t}var Qa=D5;function R5(i,o){return i===o||i!==i&&o!==o}var un=R5;var O5=Object.prototype,P5=O5.hasOwnProperty;function H5(i,o,t){var r=i[o];(!(P5.call(i,o)&&un(r,t))||t===void 0&&!(o in i))&&Qa(i,o,t)}var Ed=H5;function F5(i,o,t,r){var n=!t;t||(t={});for(var a=-1,s=o.length;++a<s;){var l=o[a],d=r?r(t[l],i[l],l,t,i):void 0;d===void 0&&(d=i[l]),n?Qa(t,l,d):Ed(t,l,d)}return t}var mn=F5;var $0=Math.max;function B5(i,o,t){return o=$0(o===void 0?i.length-1:o,0),function(){for(var r=arguments,n=-1,a=$0(r.length-o,0),s=Array(a);++n<a;)s[n]=r[o+n];n=-1;for(var l=Array(o+1);++n<o;)l[n]=r[n];return l[o]=t(s),k0(i,this,l)}}var L0=B5;function V5(i,o){return T0(L0(i,o,wd),i+"")}var q0=V5;var U5=9007199254740991;function j5(i){return typeof i=="number"&&i>-1&&i%1==0&&i<=U5}var Td=j5;function G5(i){return i!=null&&Td(i.length)&&!Ya(i)}var hi=G5;function W5(i,o,t){if(!pr(t))return!1;var r=typeof o;return(r=="number"?hi(t)&&Cd(o,t.length):r=="string"&&o in t)?un(t[o],i):!1}var M0=W5;function K5(i){return q0(function(o,t){var r=-1,n=t.length,a=n>1?t[n-1]:void 0,s=n>2?t[2]:void 0;for(a=i.length>3&&typeof a=="function"?(n--,a):void 0,s&&M0(t[0],t[1],s)&&(a=n<3?void 0:a,n=1),o=Object(o);++r<n;){var l=t[r];l&&i(o,l,r,a)}return o})}var I0=K5;var Y5=Object.prototype;function X5(i){var o=i&&i.constructor,t=typeof o=="function"&&o.prototype||Y5;return i===t}var Ja=X5;function Q5(i,o){for(var t=-1,r=Array(i);++t<i;)r[t]=o(t);return r}var N0=Q5;var J5="[object Arguments]";function Z5(i){return rr(i)&&jo(i)==J5}var ku=Z5;var D0=Object.prototype,tA=D0.hasOwnProperty,eA=D0.propertyIsEnumerable,rA=ku((function(){return arguments})())?ku:function(i){return rr(i)&&tA.call(i,"callee")&&!eA.call(i,"callee")},bl=rA;function oA(){return!1}var R0=oA;var H0=typeof exports=="object"&&exports&&!exports.nodeType&&exports,O0=H0&&typeof module=="object"&&module&&!module.nodeType&&module,nA=O0&&O0.exports===H0,P0=nA?Ee.Buffer:void 0,iA=P0?P0.isBuffer:void 0,aA=iA||R0,Bn=aA;var sA="[object Arguments]",lA="[object Array]",cA="[object Boolean]",dA="[object Date]",pA="[object Error]",hA="[object Function]",uA="[object Map]",mA="[object Number]",fA="[object Object]",gA="[object RegExp]",bA="[object Set]",vA="[object String]",xA="[object WeakMap]",yA="[object ArrayBuffer]",zA="[object DataView]",wA="[object Float32Array]",_A="[object Float64Array]",kA="[object Int8Array]",SA="[object Int16Array]",CA="[object Int32Array]",EA="[object Uint8Array]",TA="[object Uint8ClampedArray]",AA="[object Uint16Array]",$A="[object Uint32Array]",Yt={};Yt[wA]=Yt[_A]=Yt[kA]=Yt[SA]=Yt[CA]=Yt[EA]=Yt[TA]=Yt[AA]=Yt[$A]=!0;Yt[sA]=Yt[lA]=Yt[yA]=Yt[cA]=Yt[zA]=Yt[dA]=Yt[pA]=Yt[hA]=Yt[uA]=Yt[mA]=Yt[fA]=Yt[gA]=Yt[bA]=Yt[vA]=Yt[xA]=!1;function LA(i){return rr(i)&&Td(i.length)&&!!Yt[jo(i)]}var F0=LA;function qA(i){return function(o){return i(o)}}var Za=qA;var B0=typeof exports=="object"&&exports&&!exports.nodeType&&exports,vl=B0&&typeof module=="object"&&module&&!module.nodeType&&module,MA=vl&&vl.exports===B0,Su=MA&&zd.process,IA=(function(){try{var i=vl&&vl.require&&vl.require("util").types;return i||Su&&Su.binding&&Su.binding("util")}catch{}})(),Vn=IA;var V0=Vn&&Vn.isTypedArray,NA=V0?Za(V0):F0,ts=NA;var DA=Object.prototype,RA=DA.hasOwnProperty;function OA(i,o){var t=yo(i),r=!t&&bl(i),n=!t&&!r&&Bn(i),a=!t&&!r&&!n&&ts(i),s=t||r||n||a,l=s?N0(i.length,String):[],d=l.length;for(var h in i)(o||RA.call(i,h))&&!(s&&(h=="length"||n&&(h=="offset"||h=="parent")||a&&(h=="buffer"||h=="byteLength"||h=="byteOffset")||Cd(h,d)))&&l.push(h);return l}var Ad=OA;function PA(i,o){return function(t){return i(o(t))}}var $d=PA;var HA=$d(Object.keys,Object),U0=HA;var FA=Object.prototype,BA=FA.hasOwnProperty;function VA(i){if(!Ja(i))return U0(i);var o=[];for(var t in Object(i))BA.call(i,t)&&t!="constructor"&&o.push(t);return o}var j0=VA;function UA(i){return hi(i)?Ad(i):j0(i)}var es=UA;function jA(i){var o=[];if(i!=null)for(var t in Object(i))o.push(t);return o}var G0=jA;var GA=Object.prototype,WA=GA.hasOwnProperty;function KA(i){if(!pr(i))return G0(i);var o=Ja(i),t=[];for(var r in i)r=="constructor"&&(o||!WA.call(i,r))||t.push(r);return t}var W0=KA;function YA(i){return hi(i)?Ad(i,!0):W0(i)}var fn=YA;var XA=Pr(Object,"create"),Un=XA;function QA(){this.__data__=Un?Un(null):{},this.size=0}var K0=QA;function JA(i){var o=this.has(i)&&delete this.__data__[i];return this.size-=o?1:0,o}var Y0=JA;var ZA="__lodash_hash_undefined__",t$=Object.prototype,e$=t$.hasOwnProperty;function r$(i){var o=this.__data__;if(Un){var t=o[i];return t===ZA?void 0:t}return e$.call(o,i)?o[i]:void 0}var X0=r$;var o$=Object.prototype,n$=o$.hasOwnProperty;function i$(i){var o=this.__data__;return Un?o[i]!==void 0:n$.call(o,i)}var Q0=i$;var a$="__lodash_hash_undefined__";function s$(i,o){var t=this.__data__;return this.size+=this.has(i)?0:1,t[i]=Un&&o===void 0?a$:o,this}var J0=s$;function rs(i){var o=-1,t=i==null?0:i.length;for(this.clear();++o<t;){var r=i[o];this.set(r[0],r[1])}}rs.prototype.clear=K0;rs.prototype.delete=Y0;rs.prototype.get=X0;rs.prototype.has=Q0;rs.prototype.set=J0;var Cu=rs;function l$(){this.__data__=[],this.size=0}var Z0=l$;function c$(i,o){for(var t=i.length;t--;)if(un(i[t][0],o))return t;return-1}var ui=c$;var d$=Array.prototype,p$=d$.splice;function h$(i){var o=this.__data__,t=ui(o,i);if(t<0)return!1;var r=o.length-1;return t==r?o.pop():p$.call(o,t,1),--this.size,!0}var ty=h$;function u$(i){var o=this.__data__,t=ui(o,i);return t<0?void 0:o[t][1]}var ey=u$;function m$(i){return ui(this.__data__,i)>-1}var ry=m$;function f$(i,o){var t=this.__data__,r=ui(t,i);return r<0?(++this.size,t.push([i,o])):t[r][1]=o,this}var oy=f$;function os(i){var o=-1,t=i==null?0:i.length;for(this.clear();++o<t;){var r=i[o];this.set(r[0],r[1])}}os.prototype.clear=Z0;os.prototype.delete=ty;os.prototype.get=ey;os.prototype.has=ry;os.prototype.set=oy;var mi=os;var g$=Pr(Ee,"Map"),fi=g$;function b$(){this.size=0,this.__data__={hash:new Cu,map:new(fi||mi),string:new Cu}}var ny=b$;function v$(i){var o=typeof i;return o=="string"||o=="number"||o=="symbol"||o=="boolean"?i!=="__proto__":i===null}var iy=v$;function x$(i,o){var t=i.__data__;return iy(o)?t[typeof o=="string"?"string":"hash"]:t.map}var gi=x$;function y$(i){var o=gi(this,i).delete(i);return this.size-=o?1:0,o}var ay=y$;function z$(i){return gi(this,i).get(i)}var sy=z$;function w$(i){return gi(this,i).has(i)}var ly=w$;function _$(i,o){var t=gi(this,i),r=t.size;return t.set(i,o),this.size+=t.size==r?0:1,this}var cy=_$;function ns(i){var o=-1,t=i==null?0:i.length;for(this.clear();++o<t;){var r=i[o];this.set(r[0],r[1])}}ns.prototype.clear=ny;ns.prototype.delete=ay;ns.prototype.get=sy;ns.prototype.has=ly;ns.prototype.set=cy;var Ld=ns;function k$(i,o){for(var t=-1,r=o.length,n=i.length;++t<r;)i[n+t]=o[t];return i}var qd=k$;var S$=$d(Object.getPrototypeOf,Object),is=S$;var C$="[object Object]",E$=Function.prototype,T$=Object.prototype,dy=E$.toString,A$=T$.hasOwnProperty,$$=dy.call(Object);function L$(i){if(!rr(i)||jo(i)!=C$)return!1;var o=is(i);if(o===null)return!0;var t=A$.call(o,"constructor")&&o.constructor;return typeof t=="function"&&t instanceof t&&dy.call(t)==$$}var py=L$;function q$(){this.__data__=new mi,this.size=0}var hy=q$;function M$(i){var o=this.__data__,t=o.delete(i);return this.size=o.size,t}var uy=M$;function I$(i){return this.__data__.get(i)}var my=I$;function N$(i){return this.__data__.has(i)}var fy=N$;var D$=200;function R$(i,o){var t=this.__data__;if(t instanceof mi){var r=t.__data__;if(!fi||r.length<D$-1)return r.push([i,o]),this.size=++t.size,this;t=this.__data__=new Ld(r)}return t.set(i,o),this.size=t.size,this}var gy=R$;function as(i){var o=this.__data__=new mi(i);this.size=o.size}as.prototype.clear=hy;as.prototype.delete=uy;as.prototype.get=my;as.prototype.has=fy;as.prototype.set=gy;var bi=as;function O$(i,o){return i&&mn(o,es(o),i)}var by=O$;function P$(i,o){return i&&mn(o,fn(o),i)}var vy=P$;var wy=typeof exports=="object"&&exports&&!exports.nodeType&&exports,xy=wy&&typeof module=="object"&&module&&!module.nodeType&&module,H$=xy&&xy.exports===wy,yy=H$?Ee.Buffer:void 0,zy=yy?yy.allocUnsafe:void 0;function F$(i,o){if(o)return i.slice();var t=i.length,r=zy?zy(t):new i.constructor(t);return i.copy(r),r}var Md=F$;function B$(i,o){for(var t=-1,r=i==null?0:i.length,n=0,a=[];++t<r;){var s=i[t];o(s,t,i)&&(a[n++]=s)}return a}var _y=B$;function V$(){return[]}var Id=V$;var U$=Object.prototype,j$=U$.propertyIsEnumerable,ky=Object.getOwnPropertySymbols,G$=ky?function(i){return i==null?[]:(i=Object(i),_y(ky(i),function(o){return j$.call(i,o)}))}:Id,ss=G$;function W$(i,o){return mn(i,ss(i),o)}var Sy=W$;var K$=Object.getOwnPropertySymbols,Y$=K$?function(i){for(var o=[];i;)qd(o,ss(i)),i=is(i);return o}:Id,Nd=Y$;function X$(i,o){return mn(i,Nd(i),o)}var Cy=X$;function Q$(i,o,t){var r=o(i);return yo(i)?r:qd(r,t(i))}var Dd=Q$;function J$(i){return Dd(i,es,ss)}var xl=J$;function Z$(i){return Dd(i,fn,Nd)}var Ey=Z$;var tL=Pr(Ee,"DataView"),Rd=tL;var eL=Pr(Ee,"Promise"),Od=eL;var rL=Pr(Ee,"Set"),Pd=rL;var Ty="[object Map]",oL="[object Object]",Ay="[object Promise]",$y="[object Set]",Ly="[object WeakMap]",qy="[object DataView]",nL=Fn(Rd),iL=Fn(fi),aL=Fn(Od),sL=Fn(Pd),lL=Fn(kd),pa=jo;(Rd&&pa(new Rd(new ArrayBuffer(1)))!=qy||fi&&pa(new fi)!=Ty||Od&&pa(Od.resolve())!=Ay||Pd&&pa(new Pd)!=$y||kd&&pa(new kd)!=Ly)&&(pa=function(i){var o=jo(i),t=o==oL?i.constructor:void 0,r=t?Fn(t):"";if(r)switch(r){case nL:return qy;case iL:return Ty;case aL:return Ay;case sL:return $y;case lL:return Ly}return o});var jn=pa;var cL=Object.prototype,dL=cL.hasOwnProperty;function pL(i){var o=i.length,t=new i.constructor(o);return o&&typeof i[0]=="string"&&dL.call(i,"index")&&(t.index=i.index,t.input=i.input),t}var My=pL;var hL=Ee.Uint8Array,ls=hL;function uL(i){var o=new i.constructor(i.byteLength);return new ls(o).set(new ls(i)),o}var cs=uL;function mL(i,o){var t=o?cs(i.buffer):i.buffer;return new i.constructor(t,i.byteOffset,i.byteLength)}var Iy=mL;var fL=/\w*$/;function gL(i){var o=new i.constructor(i.source,fL.exec(i));return o.lastIndex=i.lastIndex,o}var Ny=gL;var Dy=xo?xo.prototype:void 0,Ry=Dy?Dy.valueOf:void 0;function bL(i){return Ry?Object(Ry.call(i)):{}}var Oy=bL;function vL(i,o){var t=o?cs(i.buffer):i.buffer;return new i.constructor(t,i.byteOffset,i.length)}var Hd=vL;var xL="[object Boolean]",yL="[object Date]",zL="[object Map]",wL="[object Number]",_L="[object RegExp]",kL="[object Set]",SL="[object String]",CL="[object Symbol]",EL="[object ArrayBuffer]",TL="[object DataView]",AL="[object Float32Array]",$L="[object Float64Array]",LL="[object Int8Array]",qL="[object Int16Array]",ML="[object Int32Array]",IL="[object Uint8Array]",NL="[object Uint8ClampedArray]",DL="[object Uint16Array]",RL="[object Uint32Array]";function OL(i,o,t){var r=i.constructor;switch(o){case EL:return cs(i);case xL:case yL:return new r(+i);case TL:return Iy(i,t);case AL:case $L:case LL:case qL:case ML:case IL:case NL:case DL:case RL:return Hd(i,t);case zL:return new r;case wL:case SL:return new r(i);case _L:return Ny(i);case kL:return new r;case CL:return Oy(i)}}var Py=OL;function PL(i){return typeof i.constructor=="function"&&!Ja(i)?_0(is(i)):{}}var Fd=PL;var HL="[object Map]";function FL(i){return rr(i)&&jn(i)==HL}var Hy=FL;var Fy=Vn&&Vn.isMap,BL=Fy?Za(Fy):Hy,By=BL;var VL="[object Set]";function UL(i){return rr(i)&&jn(i)==VL}var Vy=UL;var Uy=Vn&&Vn.isSet,jL=Uy?Za(Uy):Vy,jy=jL;var GL=1,WL=2,KL=4,Gy="[object Arguments]",YL="[object Array]",XL="[object Boolean]",QL="[object Date]",JL="[object Error]",Wy="[object Function]",ZL="[object GeneratorFunction]",tq="[object Map]",eq="[object Number]",Ky="[object Object]",rq="[object RegExp]",oq="[object Set]",nq="[object String]",iq="[object Symbol]",aq="[object WeakMap]",sq="[object ArrayBuffer]",lq="[object DataView]",cq="[object Float32Array]",dq="[object Float64Array]",pq="[object Int8Array]",hq="[object Int16Array]",uq="[object Int32Array]",mq="[object Uint8Array]",fq="[object Uint8ClampedArray]",gq="[object Uint16Array]",bq="[object Uint32Array]",Bt={};Bt[Gy]=Bt[YL]=Bt[sq]=Bt[lq]=Bt[XL]=Bt[QL]=Bt[cq]=Bt[dq]=Bt[pq]=Bt[hq]=Bt[uq]=Bt[tq]=Bt[eq]=Bt[Ky]=Bt[rq]=Bt[oq]=Bt[nq]=Bt[iq]=Bt[mq]=Bt[fq]=Bt[gq]=Bt[bq]=!0;Bt[JL]=Bt[Wy]=Bt[aq]=!1;function Bd(i,o,t,r,n,a){var s,l=o&GL,d=o&WL,h=o&KL;if(t&&(s=n?t(i,r,n,a):t(i)),s!==void 0)return s;if(!pr(i))return i;var m=yo(i);if(m){if(s=My(i),!l)return Sd(i,s)}else{var f=jn(i),b=f==Wy||f==ZL;if(Bn(i))return Md(i,l);if(f==Ky||f==Gy||b&&!n){if(s=d||b?{}:Fd(i),!l)return d?Cy(i,vy(s,i)):Sy(i,by(s,i))}else{if(!Bt[f])return n?i:{};s=Py(i,f,l)}}a||(a=new bi);var g=a.get(i);if(g)return g;a.set(i,s),jy(i)?i.forEach(function(k){s.add(Bd(k,o,t,k,i,a))}):By(i)&&i.forEach(function(k,_){s.set(_,Bd(k,o,t,_,i,a))});var v=h?d?Ey:xl:d?fn:es,x=m?void 0:v(i);return A0(x||i,function(k,_){x&&(_=k,k=i[_]),Ed(s,_,Bd(k,o,t,_,i,a))}),s}var Yy=Bd;var vq=1,xq=4;function yq(i){return Yy(i,vq|xq)}var gn=yq;var zq="__lodash_hash_undefined__";function wq(i){return this.__data__.set(i,zq),this}var Xy=wq;function _q(i){return this.__data__.has(i)}var Qy=_q;function Vd(i){var o=-1,t=i==null?0:i.length;for(this.__data__=new Ld;++o<t;)this.add(i[o])}Vd.prototype.add=Vd.prototype.push=Xy;Vd.prototype.has=Qy;var Jy=Vd;function kq(i,o){for(var t=-1,r=i==null?0:i.length;++t<r;)if(o(i[t],t,i))return!0;return!1}var Zy=kq;function Sq(i,o){return i.has(o)}var tz=Sq;var Cq=1,Eq=2;function Tq(i,o,t,r,n,a){var s=t&Cq,l=i.length,d=o.length;if(l!=d&&!(s&&d>l))return!1;var h=a.get(i),m=a.get(o);if(h&&m)return h==o&&m==i;var f=-1,b=!0,g=t&Eq?new Jy:void 0;for(a.set(i,o),a.set(o,i);++f<l;){var v=i[f],x=o[f];if(r)var k=s?r(x,v,f,o,i,a):r(v,x,f,i,o,a);if(k!==void 0){if(k)continue;b=!1;break}if(g){if(!Zy(o,function(_,O){if(!tz(g,O)&&(v===_||n(v,_,t,r,a)))return g.push(O)})){b=!1;break}}else if(!(v===x||n(v,x,t,r,a))){b=!1;break}}return a.delete(i),a.delete(o),b}var Ud=Tq;function Aq(i){var o=-1,t=Array(i.size);return i.forEach(function(r,n){t[++o]=[n,r]}),t}var ez=Aq;function $q(i){var o=-1,t=Array(i.size);return i.forEach(function(r){t[++o]=r}),t}var rz=$q;var Lq=1,qq=2,Mq="[object Boolean]",Iq="[object Date]",Nq="[object Error]",Dq="[object Map]",Rq="[object Number]",Oq="[object RegExp]",Pq="[object Set]",Hq="[object String]",Fq="[object Symbol]",Bq="[object ArrayBuffer]",Vq="[object DataView]",oz=xo?xo.prototype:void 0,Eu=oz?oz.valueOf:void 0;function Uq(i,o,t,r,n,a,s){switch(t){case Vq:if(i.byteLength!=o.byteLength||i.byteOffset!=o.byteOffset)return!1;i=i.buffer,o=o.buffer;case Bq:return!(i.byteLength!=o.byteLength||!a(new ls(i),new ls(o)));case Mq:case Iq:case Rq:return un(+i,+o);case Nq:return i.name==o.name&&i.message==o.message;case Oq:case Hq:return i==o+"";case Dq:var l=ez;case Pq:var d=r&Lq;if(l||(l=rz),i.size!=o.size&&!d)return!1;var h=s.get(i);if(h)return h==o;r|=qq,s.set(i,o);var m=Ud(l(i),l(o),r,n,a,s);return s.delete(i),m;case Fq:if(Eu)return Eu.call(i)==Eu.call(o)}return!1}var nz=Uq;var jq=1,Gq=Object.prototype,Wq=Gq.hasOwnProperty;function Kq(i,o,t,r,n,a){var s=t&jq,l=xl(i),d=l.length,h=xl(o),m=h.length;if(d!=m&&!s)return!1;for(var f=d;f--;){var b=l[f];if(!(s?b in o:Wq.call(o,b)))return!1}var g=a.get(i),v=a.get(o);if(g&&v)return g==o&&v==i;var x=!0;a.set(i,o),a.set(o,i);for(var k=s;++f<d;){b=l[f];var _=i[b],O=o[b];if(r)var j=s?r(O,_,b,o,i,a):r(_,O,b,i,o,a);if(!(j===void 0?_===O||n(_,O,t,r,a):j)){x=!1;break}k||(k=b=="constructor")}if(x&&!k){var I=i.constructor,w=o.constructor;I!=w&&"constructor"in i&&"constructor"in o&&!(typeof I=="function"&&I instanceof I&&typeof w=="function"&&w instanceof w)&&(x=!1)}return a.delete(i),a.delete(o),x}var iz=Kq;var Yq=1,az="[object Arguments]",sz="[object Array]",jd="[object Object]",Xq=Object.prototype,lz=Xq.hasOwnProperty;function Qq(i,o,t,r,n,a){var s=yo(i),l=yo(o),d=s?sz:jn(i),h=l?sz:jn(o);d=d==az?jd:d,h=h==az?jd:h;var m=d==jd,f=h==jd,b=d==h;if(b&&Bn(i)){if(!Bn(o))return!1;s=!0,m=!1}if(b&&!m)return a||(a=new bi),s||ts(i)?Ud(i,o,t,r,n,a):nz(i,o,d,t,r,n,a);if(!(t&Yq)){var g=m&&lz.call(i,"__wrapped__"),v=f&&lz.call(o,"__wrapped__");if(g||v){var x=g?i.value():i,k=v?o.value():o;return a||(a=new bi),n(x,k,t,r,a)}}return b?(a||(a=new bi),iz(i,o,t,r,n,a)):!1}var cz=Qq;function dz(i,o,t,r,n){return i===o?!0:i==null||o==null||!rr(i)&&!rr(o)?i!==i&&o!==o:cz(i,o,t,r,dz,n)}var pz=dz;function Jq(i){return function(o,t,r){for(var n=-1,a=Object(o),s=r(o),l=s.length;l--;){var d=s[i?l:++n];if(t(a[d],d,a)===!1)break}return o}}var hz=Jq;var Zq=hz(),uz=Zq;function t3(i,o,t){(t!==void 0&&!un(i[o],t)||t===void 0&&!(o in i))&&Qa(i,o,t)}var yl=t3;function e3(i){return rr(i)&&hi(i)}var mz=e3;function r3(i,o){if(!(o==="constructor"&&typeof i[o]=="function")&&o!="__proto__")return i[o]}var zl=r3;function o3(i){return mn(i,fn(i))}var fz=o3;function n3(i,o,t,r,n,a,s){var l=zl(i,t),d=zl(o,t),h=s.get(d);if(h){yl(i,t,h);return}var m=a?a(l,d,t+"",i,o,s):void 0,f=m===void 0;if(f){var b=yo(d),g=!b&&Bn(d),v=!b&&!g&&ts(d);m=d,b||g||v?yo(l)?m=l:mz(l)?m=Sd(l):g?(f=!1,m=Md(d,!0)):v?(f=!1,m=Hd(d,!0)):m=[]:py(d)||bl(d)?(m=l,bl(l)?m=fz(l):(!pr(l)||Ya(l))&&(m=Fd(d))):f=!1}f&&(s.set(d,m),n(m,d,r,a,s),s.delete(d)),yl(i,t,m)}var gz=n3;function bz(i,o,t,r,n){i!==o&&uz(o,function(a,s){if(n||(n=new bi),pr(a))gz(i,o,s,t,bz,r,n);else{var l=r?r(zl(i,s),a,s+"",i,o,n):void 0;l===void 0&&(l=a),yl(i,s,l)}},fn)}var vz=bz;function i3(i,o){return pz(i,o)}var ha=i3;var a3=I0(function(i,o,t){vz(i,o,t)}),Hr=a3;var kl={};H1(kl,{Attributor:()=>Sr,AttributorStore:()=>wl,BlockBlot:()=>ua,ClassAttributor:()=>Te,ContainerBlot:()=>ms,EmbedBlot:()=>le,InlineBlot:()=>Gd,LeafBlot:()=>Ae,ParentBlot:()=>Fr,Registry:()=>yi,Scope:()=>X,ScrollBlot:()=>_l,StyleAttributor:()=>Br,TextBlot:()=>fs});var X=(i=>(i[i.TYPE=3]="TYPE",i[i.LEVEL=12]="LEVEL",i[i.ATTRIBUTE=13]="ATTRIBUTE",i[i.BLOT=14]="BLOT",i[i.INLINE=7]="INLINE",i[i.BLOCK=11]="BLOCK",i[i.BLOCK_BLOT=10]="BLOCK_BLOT",i[i.INLINE_BLOT=6]="INLINE_BLOT",i[i.BLOCK_ATTRIBUTE=9]="BLOCK_ATTRIBUTE",i[i.INLINE_ATTRIBUTE=5]="INLINE_ATTRIBUTE",i[i.ANY=15]="ANY",i))(X||{}),Sr=class{constructor(o,t,r={}){this.attrName=o,this.keyName=t;let n=X.TYPE&X.ATTRIBUTE;this.scope=r.scope!=null?r.scope&X.LEVEL|n:X.ATTRIBUTE,r.whitelist!=null&&(this.whitelist=r.whitelist)}static keys(o){return Array.from(o.attributes).map(t=>t.name)}add(o,t){return this.canAdd(o,t)?(o.setAttribute(this.keyName,t),!0):!1}canAdd(o,t){return this.whitelist==null?!0:typeof t=="string"?this.whitelist.indexOf(t.replace(/["']/g,""))>-1:this.whitelist.indexOf(t)>-1}remove(o){o.removeAttribute(this.keyName)}value(o){let t=o.getAttribute(this.keyName);return this.canAdd(o,t)&&t?t:""}},xi=class extends Error{constructor(o){o="[Parchment] "+o,super(o),this.message=o,this.name=this.constructor.name}},zz=class Au{constructor(){this.attributes={},this.classes={},this.tags={},this.types={}}static find(o,t=!1){if(o==null)return null;if(this.blots.has(o))return this.blots.get(o)||null;if(t){let r=null;try{r=o.parentNode}catch{return null}return this.find(r,t)}return null}create(o,t,r){let n=this.query(t);if(n==null)throw new xi(`Unable to create ${t} blot`);let a=n,s=t instanceof Node||t.nodeType===Node.TEXT_NODE?t:a.create(r),l=new a(o,s,r);return Au.blots.set(l.domNode,l),l}find(o,t=!1){return Au.find(o,t)}query(o,t=X.ANY){let r;return typeof o=="string"?r=this.types[o]||this.attributes[o]:o instanceof Text||o.nodeType===Node.TEXT_NODE?r=this.types.text:typeof o=="number"?o&X.LEVEL&X.BLOCK?r=this.types.block:o&X.LEVEL&X.INLINE&&(r=this.types.inline):o instanceof Element&&((o.getAttribute("class")||"").split(/\s+/).some(n=>(r=this.classes[n],!!r)),r=r||this.tags[o.tagName]),r==null?null:"scope"in r&&t&X.LEVEL&r.scope&&t&X.TYPE&r.scope?r:null}register(...o){return o.map(t=>{let r="blotName"in t,n="attrName"in t;if(!r&&!n)throw new xi("Invalid definition");if(r&&t.blotName==="abstract")throw new xi("Cannot register abstract class");let a=r?t.blotName:n?t.attrName:void 0;return this.types[a]=t,n?typeof t.keyName=="string"&&(this.attributes[t.keyName]=t):r&&(t.className&&(this.classes[t.className]=t),t.tagName&&(Array.isArray(t.tagName)?t.tagName=t.tagName.map(s=>s.toUpperCase()):t.tagName=t.tagName.toUpperCase(),(Array.isArray(t.tagName)?t.tagName:[t.tagName]).forEach(s=>{(this.tags[s]==null||t.className==null)&&(this.tags[s]=t)}))),t})}};zz.blots=new WeakMap;var yi=zz;function xz(i,o){return(i.getAttribute("class")||"").split(/\s+/).filter(t=>t.indexOf(`${o}-`)===0)}var $u=class extends Sr{static keys(o){return(o.getAttribute("class")||"").split(/\s+/).map(t=>t.split("-").slice(0,-1).join("-"))}add(o,t){return this.canAdd(o,t)?(this.remove(o),o.classList.add(`${this.keyName}-${t}`),!0):!1}remove(o){xz(o,this.keyName).forEach(t=>{o.classList.remove(t)}),o.classList.length===0&&o.removeAttribute("class")}value(o){let t=(xz(o,this.keyName)[0]||"").slice(this.keyName.length+1);return this.canAdd(o,t)?t:""}},Te=$u;function Tu(i){let o=i.split("-"),t=o.slice(1).map(r=>r[0].toUpperCase()+r.slice(1)).join("");return o[0]+t}var Lu=class extends Sr{static keys(o){return(o.getAttribute("style")||"").split(";").map(t=>t.split(":")[0].trim())}add(o,t){return this.canAdd(o,t)?(o.style[Tu(this.keyName)]=t,!0):!1}remove(o){o.style[Tu(this.keyName)]="",o.getAttribute("style")||o.removeAttribute("style")}value(o){let t=o.style[Tu(this.keyName)];return this.canAdd(o,t)?t:""}},Br=Lu,qu=class{constructor(o){this.attributes={},this.domNode=o,this.build()}attribute(o,t){t?o.add(this.domNode,t)&&(o.value(this.domNode)!=null?this.attributes[o.attrName]=o:delete this.attributes[o.attrName]):(o.remove(this.domNode),delete this.attributes[o.attrName])}build(){this.attributes={};let o=yi.find(this.domNode);if(o==null)return;let t=Sr.keys(this.domNode),r=Te.keys(this.domNode),n=Br.keys(this.domNode);t.concat(r).concat(n).forEach(a=>{let s=o.scroll.query(a,X.ATTRIBUTE);s instanceof Sr&&(this.attributes[s.attrName]=s)})}copy(o){Object.keys(this.attributes).forEach(t=>{let r=this.attributes[t].value(this.domNode);o.format(t,r)})}move(o){this.copy(o),Object.keys(this.attributes).forEach(t=>{this.attributes[t].remove(this.domNode)}),this.attributes={}}values(){return Object.keys(this.attributes).reduce((o,t)=>(o[t]=this.attributes[t].value(this.domNode),o),{})}},wl=qu,wz=class{constructor(o,t){this.scroll=o,this.domNode=t,yi.blots.set(t,this),this.prev=null,this.next=null}static create(o){if(this.tagName==null)throw new xi("Blot definition missing tagName");let t,r;return Array.isArray(this.tagName)?(typeof o=="string"?(r=o.toUpperCase(),parseInt(r,10).toString()===r&&(r=parseInt(r,10))):typeof o=="number"&&(r=o),typeof r=="number"?t=document.createElement(this.tagName[r-1]):r&&this.tagName.indexOf(r)>-1?t=document.createElement(r):t=document.createElement(this.tagName[0])):t=document.createElement(this.tagName),this.className&&t.classList.add(this.className),t}get statics(){return this.constructor}attach(){}clone(){let o=this.domNode.cloneNode(!1);return this.scroll.create(o)}detach(){this.parent!=null&&this.parent.removeChild(this),yi.blots.delete(this.domNode)}deleteAt(o,t){this.isolate(o,t).remove()}formatAt(o,t,r,n){let a=this.isolate(o,t);if(this.scroll.query(r,X.BLOT)!=null&&n)a.wrap(r,n);else if(this.scroll.query(r,X.ATTRIBUTE)!=null){let s=this.scroll.create(this.statics.scope);a.wrap(s),s.format(r,n)}}insertAt(o,t,r){let n=r==null?this.scroll.create("text",t):this.scroll.create(t,r),a=this.split(o);this.parent.insertBefore(n,a||void 0)}isolate(o,t){let r=this.split(o);if(r==null)throw new Error("Attempt to isolate at end");return r.split(t),r}length(){return 1}offset(o=this.parent){return this.parent==null||this===o?0:this.parent.children.offset(this)+this.parent.offset(o)}optimize(o){this.statics.requiredContainer&&!(this.parent instanceof this.statics.requiredContainer)&&this.wrap(this.statics.requiredContainer.blotName)}remove(){this.domNode.parentNode!=null&&this.domNode.parentNode.removeChild(this.domNode),this.detach()}replaceWith(o,t){let r=typeof o=="string"?this.scroll.create(o,t):o;return this.parent!=null&&(this.parent.insertBefore(r,this.next||void 0),this.remove()),r}split(o,t){return o===0?this:this.next}update(o,t){}wrap(o,t){let r=typeof o=="string"?this.scroll.create(o,t):o;if(this.parent!=null&&this.parent.insertBefore(r,this.next||void 0),typeof r.appendChild!="function")throw new xi(`Cannot wrap ${o}`);return r.appendChild(this),r}};wz.blotName="abstract";var _z=wz,kz=class extends _z{static value(o){return!0}index(o,t){return this.domNode===o||this.domNode.compareDocumentPosition(o)&Node.DOCUMENT_POSITION_CONTAINED_BY?Math.min(t,1):-1}position(o,t){let r=Array.from(this.parent.domNode.childNodes).indexOf(this.domNode);return o>0&&(r+=1),[this.parent.domNode,r]}value(){return{[this.statics.blotName]:this.statics.value(this.domNode)||!0}}};kz.scope=X.INLINE_BLOT;var s3=kz,Ae=s3,Mu=class{constructor(){this.head=null,this.tail=null,this.length=0}append(...o){if(this.insertBefore(o[0],null),o.length>1){let t=o.slice(1);this.append(...t)}}at(o){let t=this.iterator(),r=t();for(;r&&o>0;)o-=1,r=t();return r}contains(o){let t=this.iterator(),r=t();for(;r;){if(r===o)return!0;r=t()}return!1}indexOf(o){let t=this.iterator(),r=t(),n=0;for(;r;){if(r===o)return n;n+=1,r=t()}return-1}insertBefore(o,t){o!=null&&(this.remove(o),o.next=t,t!=null?(o.prev=t.prev,t.prev!=null&&(t.prev.next=o),t.prev=o,t===this.head&&(this.head=o)):this.tail!=null?(this.tail.next=o,o.prev=this.tail,this.tail=o):(o.prev=null,this.head=this.tail=o),this.length+=1)}offset(o){let t=0,r=this.head;for(;r!=null;){if(r===o)return t;t+=r.length(),r=r.next}return-1}remove(o){this.contains(o)&&(o.prev!=null&&(o.prev.next=o.next),o.next!=null&&(o.next.prev=o.prev),o===this.head&&(this.head=o.next),o===this.tail&&(this.tail=o.prev),this.length-=1)}iterator(o=this.head){return()=>{let t=o;return o!=null&&(o=o.next),t}}find(o,t=!1){let r=this.iterator(),n=r();for(;n;){let a=n.length();if(o<a||t&&o===a&&(n.next==null||n.next.length()!==0))return[n,o];o-=a,n=r()}return[null,0]}forEach(o){let t=this.iterator(),r=t();for(;r;)o(r),r=t()}forEachAt(o,t,r){if(t<=0)return;let[n,a]=this.find(o),s=o-a,l=this.iterator(n),d=l();for(;d&&s<o+t;){let h=d.length();o>s?r(d,o-s,Math.min(t,s+h-o)):r(d,0,Math.min(h,o+t-s)),s+=h,d=l()}}map(o){return this.reduce((t,r)=>(t.push(o(r)),t),[])}reduce(o,t){let r=this.iterator(),n=r();for(;n;)t=o(t,n),n=r();return t}};function yz(i,o){let t=o.find(i);if(t)return t;try{return o.create(i)}catch{let r=o.create(X.INLINE);return Array.from(i.childNodes).forEach(n=>{r.domNode.appendChild(n)}),i.parentNode&&i.parentNode.replaceChild(r.domNode,i),r.attach(),r}}var Sz=class vi extends _z{constructor(o,t){super(o,t),this.uiNode=null,this.build()}appendChild(o){this.insertBefore(o)}attach(){super.attach(),this.children.forEach(o=>{o.attach()})}attachUI(o){this.uiNode!=null&&this.uiNode.remove(),this.uiNode=o,vi.uiClass&&this.uiNode.classList.add(vi.uiClass),this.uiNode.setAttribute("contenteditable","false"),this.domNode.insertBefore(this.uiNode,this.domNode.firstChild)}build(){this.children=new Mu,Array.from(this.domNode.childNodes).filter(o=>o!==this.uiNode).reverse().forEach(o=>{try{let t=yz(o,this.scroll);this.insertBefore(t,this.children.head||void 0)}catch(t){if(t instanceof xi)return;throw t}})}deleteAt(o,t){if(o===0&&t===this.length())return this.remove();this.children.forEachAt(o,t,(r,n,a)=>{r.deleteAt(n,a)})}descendant(o,t=0){let[r,n]=this.children.find(t);return o.blotName==null&&o(r)||o.blotName!=null&&r instanceof o?[r,n]:r instanceof vi?r.descendant(o,n):[null,-1]}descendants(o,t=0,r=Number.MAX_VALUE){let n=[],a=r;return this.children.forEachAt(t,r,(s,l,d)=>{(o.blotName==null&&o(s)||o.blotName!=null&&s instanceof o)&&n.push(s),s instanceof vi&&(n=n.concat(s.descendants(o,l,a))),a-=d}),n}detach(){this.children.forEach(o=>{o.detach()}),super.detach()}enforceAllowedChildren(){let o=!1;this.children.forEach(t=>{o||this.statics.allowedChildren.some(r=>t instanceof r)||(t.statics.scope===X.BLOCK_BLOT?(t.next!=null&&this.splitAfter(t),t.prev!=null&&this.splitAfter(t.prev),t.parent.unwrap(),o=!0):t instanceof vi?t.unwrap():t.remove())})}formatAt(o,t,r,n){this.children.forEachAt(o,t,(a,s,l)=>{a.formatAt(s,l,r,n)})}insertAt(o,t,r){let[n,a]=this.children.find(o);if(n)n.insertAt(a,t,r);else{let s=r==null?this.scroll.create("text",t):this.scroll.create(t,r);this.appendChild(s)}}insertBefore(o,t){o.parent!=null&&o.parent.children.remove(o);let r=null;this.children.insertBefore(o,t||null),o.parent=this,t!=null&&(r=t.domNode),(this.domNode.parentNode!==o.domNode||this.domNode.nextSibling!==r)&&this.domNode.insertBefore(o.domNode,r),o.attach()}length(){return this.children.reduce((o,t)=>o+t.length(),0)}moveChildren(o,t){this.children.forEach(r=>{o.insertBefore(r,t)})}optimize(o){if(super.optimize(o),this.enforceAllowedChildren(),this.uiNode!=null&&this.uiNode!==this.domNode.firstChild&&this.domNode.insertBefore(this.uiNode,this.domNode.firstChild),this.children.length===0)if(this.statics.defaultChild!=null){let t=this.scroll.create(this.statics.defaultChild.blotName);this.appendChild(t)}else this.remove()}path(o,t=!1){let[r,n]=this.children.find(o,t),a=[[this,o]];return r instanceof vi?a.concat(r.path(n,t)):(r!=null&&a.push([r,n]),a)}removeChild(o){this.children.remove(o)}replaceWith(o,t){let r=typeof o=="string"?this.scroll.create(o,t):o;return r instanceof vi&&this.moveChildren(r),super.replaceWith(r)}split(o,t=!1){if(!t){if(o===0)return this;if(o===this.length())return this.next}let r=this.clone();return this.parent&&this.parent.insertBefore(r,this.next||void 0),this.children.forEachAt(o,this.length(),(n,a,s)=>{let l=n.split(a,t);l!=null&&r.appendChild(l)}),r}splitAfter(o){let t=this.clone();for(;o.next!=null;)t.appendChild(o.next);return this.parent&&this.parent.insertBefore(t,this.next||void 0),t}unwrap(){this.parent&&this.moveChildren(this.parent,this.next||void 0),this.remove()}update(o,t){let r=[],n=[];o.forEach(a=>{a.target===this.domNode&&a.type==="childList"&&(r.push(...a.addedNodes),n.push(...a.removedNodes))}),n.forEach(a=>{if(a.parentNode!=null&&a.tagName!=="IFRAME"&&document.body.compareDocumentPosition(a)&Node.DOCUMENT_POSITION_CONTAINED_BY)return;let s=this.scroll.find(a);s!=null&&(s.domNode.parentNode==null||s.domNode.parentNode===this.domNode)&&s.detach()}),r.filter(a=>a.parentNode===this.domNode&&a!==this.uiNode).sort((a,s)=>a===s?0:a.compareDocumentPosition(s)&Node.DOCUMENT_POSITION_FOLLOWING?1:-1).forEach(a=>{let s=null;a.nextSibling!=null&&(s=this.scroll.find(a.nextSibling));let l=yz(a,this.scroll);(l.next!==s||l.next==null)&&(l.parent!=null&&l.parent.removeChild(this),this.insertBefore(l,s||void 0))}),this.enforceAllowedChildren()}};Sz.uiClass="";var l3=Sz,Fr=l3;function c3(i,o){if(Object.keys(i).length!==Object.keys(o).length)return!1;for(let t in i)if(i[t]!==o[t])return!1;return!0}var ds=class ps extends Fr{static create(o){return super.create(o)}static formats(o,t){let r=t.query(ps.blotName);if(!(r!=null&&o.tagName===r.tagName)){if(typeof this.tagName=="string")return!0;if(Array.isArray(this.tagName))return o.tagName.toLowerCase()}}constructor(o,t){super(o,t),this.attributes=new wl(this.domNode)}format(o,t){if(o===this.statics.blotName&&!t)this.children.forEach(r=>{r instanceof ps||(r=r.wrap(ps.blotName,!0)),this.attributes.copy(r)}),this.unwrap();else{let r=this.scroll.query(o,X.INLINE);if(r==null)return;r instanceof Sr?this.attributes.attribute(r,t):t&&(o!==this.statics.blotName||this.formats()[o]!==t)&&this.replaceWith(o,t)}}formats(){let o=this.attributes.values(),t=this.statics.formats(this.domNode,this.scroll);return t!=null&&(o[this.statics.blotName]=t),o}formatAt(o,t,r,n){this.formats()[r]!=null||this.scroll.query(r,X.ATTRIBUTE)?this.isolate(o,t).format(r,n):super.formatAt(o,t,r,n)}optimize(o){super.optimize(o);let t=this.formats();if(Object.keys(t).length===0)return this.unwrap();let r=this.next;r instanceof ps&&r.prev===this&&c3(t,r.formats())&&(r.moveChildren(this),r.remove())}replaceWith(o,t){let r=super.replaceWith(o,t);return this.attributes.copy(r),r}update(o,t){super.update(o,t),o.some(r=>r.target===this.domNode&&r.type==="attributes")&&this.attributes.build()}wrap(o,t){let r=super.wrap(o,t);return r instanceof ps&&this.attributes.move(r),r}};ds.allowedChildren=[ds,Ae],ds.blotName="inline",ds.scope=X.INLINE_BLOT,ds.tagName="SPAN";var d3=ds,Gd=d3,hs=class Iu extends Fr{static create(o){return super.create(o)}static formats(o,t){let r=t.query(Iu.blotName);if(!(r!=null&&o.tagName===r.tagName)){if(typeof this.tagName=="string")return!0;if(Array.isArray(this.tagName))return o.tagName.toLowerCase()}}constructor(o,t){super(o,t),this.attributes=new wl(this.domNode)}format(o,t){let r=this.scroll.query(o,X.BLOCK);r!=null&&(r instanceof Sr?this.attributes.attribute(r,t):o===this.statics.blotName&&!t?this.replaceWith(Iu.blotName):t&&(o!==this.statics.blotName||this.formats()[o]!==t)&&this.replaceWith(o,t))}formats(){let o=this.attributes.values(),t=this.statics.formats(this.domNode,this.scroll);return t!=null&&(o[this.statics.blotName]=t),o}formatAt(o,t,r,n){this.scroll.query(r,X.BLOCK)!=null?this.format(r,n):super.formatAt(o,t,r,n)}insertAt(o,t,r){if(r==null||this.scroll.query(t,X.INLINE)!=null)super.insertAt(o,t,r);else{let n=this.split(o);if(n!=null){let a=this.scroll.create(t,r);n.parent.insertBefore(a,n)}else throw new Error("Attempt to insertAt after block boundaries")}}replaceWith(o,t){let r=super.replaceWith(o,t);return this.attributes.copy(r),r}update(o,t){super.update(o,t),o.some(r=>r.target===this.domNode&&r.type==="attributes")&&this.attributes.build()}};hs.blotName="block",hs.scope=X.BLOCK_BLOT,hs.tagName="P",hs.allowedChildren=[Gd,hs,Ae];var p3=hs,ua=p3,Nu=class extends Fr{checkMerge(){return this.next!==null&&this.next.statics.blotName===this.statics.blotName}deleteAt(o,t){super.deleteAt(o,t),this.enforceAllowedChildren()}formatAt(o,t,r,n){super.formatAt(o,t,r,n),this.enforceAllowedChildren()}insertAt(o,t,r){super.insertAt(o,t,r),this.enforceAllowedChildren()}optimize(o){super.optimize(o),this.children.length>0&&this.next!=null&&this.checkMerge()&&(this.next.moveChildren(this),this.next.remove())}};Nu.blotName="container",Nu.scope=X.BLOCK_BLOT;var h3=Nu,ms=h3,Du=class extends Ae{static formats(o,t){}format(o,t){super.formatAt(0,this.length(),o,t)}formatAt(o,t,r,n){o===0&&t===this.length()?this.format(r,n):super.formatAt(o,t,r,n)}formats(){return this.statics.formats(this.domNode,this.scroll)}},le=Du,u3={attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0},m3=100,us=class extends Fr{constructor(o,t){super(null,t),this.registry=o,this.scroll=this,this.build(),this.observer=new MutationObserver(r=>{this.update(r)}),this.observer.observe(this.domNode,u3),this.attach()}create(o,t){return this.registry.create(this,o,t)}find(o,t=!1){let r=this.registry.find(o,t);return r?r.scroll===this?r:t?this.find(r.scroll.domNode.parentNode,!0):null:null}query(o,t=X.ANY){return this.registry.query(o,t)}register(...o){return this.registry.register(...o)}build(){this.scroll!=null&&super.build()}detach(){super.detach(),this.observer.disconnect()}deleteAt(o,t){this.update(),o===0&&t===this.length()?this.children.forEach(r=>{r.remove()}):super.deleteAt(o,t)}formatAt(o,t,r,n){this.update(),super.formatAt(o,t,r,n)}insertAt(o,t,r){this.update(),super.insertAt(o,t,r)}optimize(o=[],t={}){super.optimize(t);let r=t.mutationsMap||new WeakMap,n=Array.from(this.observer.takeRecords());for(;n.length>0;)o.push(n.pop());let a=(d,h=!0)=>{d==null||d===this||d.domNode.parentNode!=null&&(r.has(d.domNode)||r.set(d.domNode,[]),h&&a(d.parent))},s=d=>{r.has(d.domNode)&&(d instanceof Fr&&d.children.forEach(s),r.delete(d.domNode),d.optimize(t))},l=o;for(let d=0;l.length>0;d+=1){if(d>=m3)throw new Error("[Parchment] Maximum optimize iterations reached");for(l.forEach(h=>{let m=this.find(h.target,!0);m!=null&&(m.domNode===h.target&&(h.type==="childList"?(a(this.find(h.previousSibling,!1)),Array.from(h.addedNodes).forEach(f=>{let b=this.find(f,!1);a(b,!1),b instanceof Fr&&b.children.forEach(g=>{a(g,!1)})})):h.type==="attributes"&&a(m.prev)),a(m))}),this.children.forEach(s),l=Array.from(this.observer.takeRecords()),n=l.slice();n.length>0;)o.push(n.pop())}}update(o,t={}){o=o||this.observer.takeRecords();let r=new WeakMap;o.map(n=>{let a=this.find(n.target,!0);return a==null?null:r.has(a.domNode)?(r.get(a.domNode).push(n),null):(r.set(a.domNode,[n]),a)}).forEach(n=>{n!=null&&n!==this&&r.has(n.domNode)&&n.update(r.get(n.domNode)||[],t)}),t.mutationsMap=r,r.has(this.domNode)&&super.update(r.get(this.domNode),t),this.optimize(o,t)}};us.blotName="scroll",us.defaultChild=ua,us.allowedChildren=[ua,ms],us.scope=X.BLOCK_BLOT,us.tagName="DIV";var f3=us,_l=f3,Ru=class Cz extends Ae{static create(o){return document.createTextNode(o)}static value(o){return o.data}constructor(o,t){super(o,t),this.text=this.statics.value(this.domNode)}deleteAt(o,t){this.domNode.data=this.text=this.text.slice(0,o)+this.text.slice(o+t)}index(o,t){return this.domNode===o?t:-1}insertAt(o,t,r){r==null?(this.text=this.text.slice(0,o)+t+this.text.slice(o),this.domNode.data=this.text):super.insertAt(o,t,r)}length(){return this.text.length}optimize(o){super.optimize(o),this.text=this.statics.value(this.domNode),this.text.length===0?this.remove():this.next instanceof Cz&&this.next.prev===this&&(this.insertAt(this.length(),this.next.value()),this.next.remove())}position(o,t=!1){return[this.domNode,o]}split(o,t=!1){if(!t){if(o===0)return this;if(o===this.length())return this.next}let r=this.scroll.create(this.domNode.splitText(o));return this.parent.insertBefore(r,this.next||void 0),this.text=this.statics.value(this.domNode),r}update(o,t){o.some(r=>r.type==="characterData"&&r.target===this.domNode)&&(this.text=this.statics.value(this.domNode))}value(){return this.text}};Ru.blotName="text",Ru.scope=X.INLINE_BLOT;var g3=Ru,fs=g3;var wi=ar(Or(),1);var ce=ar(Or(),1);var Pu=ar(Or(),1);var Sl=class extends le{static value(){}optimize(){(this.prev||this.next)&&this.remove()}length(){return 0}value(){return""}};Sl.blotName="break";Sl.tagName="BR";var hr=Sl;var we=class extends fs{},b3={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function ma(i){return i.replace(/[&<>"']/g,o=>b3[o])}var bn=class bn extends Gd{static compare(o,t){let r=bn.order.indexOf(o),n=bn.order.indexOf(t);return r>=0||n>=0?r-n:o===t?0:o<t?-1:1}formatAt(o,t,r,n){if(bn.compare(this.statics.blotName,r)<0&&this.scroll.query(r,X.BLOT)){let a=this.isolate(o,t);n&&a.wrap(r,n)}else super.formatAt(o,t,r,n)}optimize(o){if(super.optimize(o),this.parent instanceof bn&&bn.compare(this.statics.blotName,this.parent.statics.blotName)>0){let t=this.parent.isolate(this.offset(),this.length());this.moveChildren(t),t.wrap(this)}}};V(bn,"allowedChildren",[bn,hr,le,we]),V(bn,"order",["cursor","inline","link","underline","strike","italic","bold","script","code"]);var Ou=bn,ur=Ou;var Ez=1,Rt=class extends ua{constructor(){super(...arguments);V(this,"cache",{})}delta(){return this.cache.delta==null&&(this.cache.delta=Hu(this)),this.cache.delta}deleteAt(t,r){super.deleteAt(t,r),this.cache={}}formatAt(t,r,n,a){r<=0||(this.scroll.query(n,X.BLOCK)?t+r===this.length()&&this.format(n,a):super.formatAt(t,Math.min(r,this.length()-t-1),n,a),this.cache={})}insertAt(t,r,n){if(n!=null){super.insertAt(t,r,n),this.cache={};return}if(r.length===0)return;let a=r.split(`
2481
- `),s=a.shift();s.length>0&&(t<this.length()-1||this.children.tail==null?super.insertAt(Math.min(t,this.length()-1),s):this.children.tail.insertAt(this.children.tail.length(),s),this.cache={});let l=this;a.reduce((d,h)=>(l=l.split(d,!0),l.insertAt(0,h),h.length),t+s.length)}insertBefore(t,r){let{head:n}=this.children;super.insertBefore(t,r),n instanceof hr&&n.remove(),this.cache={}}length(){return this.cache.length==null&&(this.cache.length=super.length()+Ez),this.cache.length}moveChildren(t,r){super.moveChildren(t,r),this.cache={}}optimize(t){super.optimize(t),this.cache={}}path(t){return super.path(t,!0)}removeChild(t){super.removeChild(t),this.cache={}}split(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(r&&(t===0||t>=this.length()-Ez)){let a=this.clone();return t===0?(this.parent.insertBefore(a,this),this):(this.parent.insertBefore(a,this.next),a)}let n=super.split(t,r);return this.cache={},n}};Rt.blotName="block";Rt.tagName="P";Rt.defaultChild=hr;Rt.allowedChildren=[hr,ur,le,we];var Oe=class extends le{attach(){super.attach(),this.attributes=new wl(this.domNode)}delta(){return new Pu.default().insert(this.value(),{...this.formats(),...this.attributes.values()})}format(o,t){let r=this.scroll.query(o,X.BLOCK_ATTRIBUTE);r!=null&&this.attributes.attribute(r,t)}formatAt(o,t,r,n){this.format(r,n)}insertAt(o,t,r){if(r!=null){super.insertAt(o,t,r);return}let n=t.split(`
2483
+ `}};Mn.styles=E(Lv),c([p({type:Boolean,reflect:!0})],Mn.prototype,"open",2),c([p({type:String})],Mn.prototype,"query",2),c([p({type:Array})],Mn.prototype,"results",2),c([H()],Mn.prototype,"_activeIndex",2);Mn.define("zn-context-menu");var Aw=ar(Or(),1);var RT=typeof global=="object"&&global&&global.Object===Object&&global,zd=RT;var OT=typeof self=="object"&&self&&self.Object===Object&&self,PT=zd||OT||Function("return this")(),Ee=PT;var HT=Ee.Symbol,xo=HT;var m0=Object.prototype,FT=m0.hasOwnProperty,BT=m0.toString,gl=xo?xo.toStringTag:void 0;function VT(i){var o=FT.call(i,gl),t=i[gl];try{i[gl]=void 0;var r=!0}catch{}var n=BT.call(i);return r&&(o?i[gl]=t:delete i[gl]),n}var f0=VT;var UT=Object.prototype,jT=UT.toString;function GT(i){return jT.call(i)}var g0=GT;var WT="[object Null]",KT="[object Undefined]",b0=xo?xo.toStringTag:void 0;function YT(i){return i==null?i===void 0?KT:WT:b0&&b0 in Object(i)?f0(i):g0(i)}var jo=YT;function XT(i){return i!=null&&typeof i=="object"}var rr=XT;var QT=Array.isArray,yo=QT;function JT(i){var o=typeof i;return i!=null&&(o=="object"||o=="function")}var pr=JT;function ZT(i){return i}var wd=ZT;var t5="[object AsyncFunction]",e5="[object Function]",r5="[object GeneratorFunction]",o5="[object Proxy]";function n5(i){if(!pr(i))return!1;var o=jo(i);return o==e5||o==r5||o==t5||o==o5}var Ya=n5;var i5=Ee["__core-js_shared__"],_d=i5;var v0=(function(){var i=/[^.]+$/.exec(_d&&_d.keys&&_d.keys.IE_PROTO||"");return i?"Symbol(src)_1."+i:""})();function a5(i){return!!v0&&v0 in i}var x0=a5;var s5=Function.prototype,l5=s5.toString;function c5(i){if(i!=null){try{return l5.call(i)}catch{}try{return i+""}catch{}}return""}var Fn=c5;var d5=/[\\^$.*+?()[\]{}|]/g,p5=/^\[object .+?Constructor\]$/,h5=Function.prototype,u5=Object.prototype,m5=h5.toString,f5=u5.hasOwnProperty,g5=RegExp("^"+m5.call(f5).replace(d5,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function b5(i){if(!pr(i)||x0(i))return!1;var o=Ya(i)?g5:p5;return o.test(Fn(i))}var y0=b5;function v5(i,o){return i?.[o]}var z0=v5;function x5(i,o){var t=z0(i,o);return y0(t)?t:void 0}var Pr=x5;var y5=Pr(Ee,"WeakMap"),kd=y5;var w0=Object.create,z5=(function(){function i(){}return function(o){if(!pr(o))return{};if(w0)return w0(o);i.prototype=o;var t=new i;return i.prototype=void 0,t}})(),_0=z5;function w5(i,o,t){switch(t.length){case 0:return i.call(o);case 1:return i.call(o,t[0]);case 2:return i.call(o,t[0],t[1]);case 3:return i.call(o,t[0],t[1],t[2])}return i.apply(o,t)}var k0=w5;function _5(i,o){var t=-1,r=i.length;for(o||(o=Array(r));++t<r;)o[t]=i[t];return o}var Sd=_5;var k5=800,S5=16,C5=Date.now;function E5(i){var o=0,t=0;return function(){var r=C5(),n=S5-(r-t);if(t=r,n>0){if(++o>=k5)return arguments[0]}else o=0;return i.apply(void 0,arguments)}}var S0=E5;function T5(i){return function(){return i}}var C0=T5;var A5=(function(){try{var i=Pr(Object,"defineProperty");return i({},"",{}),i}catch{}})(),Xa=A5;var $5=Xa?function(i,o){return Xa(i,"toString",{configurable:!0,enumerable:!1,value:C0(o),writable:!0})}:wd,E0=$5;var L5=S0(E0),T0=L5;function q5(i,o){for(var t=-1,r=i==null?0:i.length;++t<r&&o(i[t],t,i)!==!1;);return i}var A0=q5;var M5=9007199254740991,I5=/^(?:0|[1-9]\d*)$/;function N5(i,o){var t=typeof i;return o=o??M5,!!o&&(t=="number"||t!="symbol"&&I5.test(i))&&i>-1&&i%1==0&&i<o}var Cd=N5;function D5(i,o,t){o=="__proto__"&&Xa?Xa(i,o,{configurable:!0,enumerable:!0,value:t,writable:!0}):i[o]=t}var Qa=D5;function R5(i,o){return i===o||i!==i&&o!==o}var un=R5;var O5=Object.prototype,P5=O5.hasOwnProperty;function H5(i,o,t){var r=i[o];(!(P5.call(i,o)&&un(r,t))||t===void 0&&!(o in i))&&Qa(i,o,t)}var Ed=H5;function F5(i,o,t,r){var n=!t;t||(t={});for(var a=-1,s=o.length;++a<s;){var l=o[a],d=r?r(t[l],i[l],l,t,i):void 0;d===void 0&&(d=i[l]),n?Qa(t,l,d):Ed(t,l,d)}return t}var mn=F5;var $0=Math.max;function B5(i,o,t){return o=$0(o===void 0?i.length-1:o,0),function(){for(var r=arguments,n=-1,a=$0(r.length-o,0),s=Array(a);++n<a;)s[n]=r[o+n];n=-1;for(var l=Array(o+1);++n<o;)l[n]=r[n];return l[o]=t(s),k0(i,this,l)}}var L0=B5;function V5(i,o){return T0(L0(i,o,wd),i+"")}var q0=V5;var U5=9007199254740991;function j5(i){return typeof i=="number"&&i>-1&&i%1==0&&i<=U5}var Td=j5;function G5(i){return i!=null&&Td(i.length)&&!Ya(i)}var hi=G5;function W5(i,o,t){if(!pr(t))return!1;var r=typeof o;return(r=="number"?hi(t)&&Cd(o,t.length):r=="string"&&o in t)?un(t[o],i):!1}var M0=W5;function K5(i){return q0(function(o,t){var r=-1,n=t.length,a=n>1?t[n-1]:void 0,s=n>2?t[2]:void 0;for(a=i.length>3&&typeof a=="function"?(n--,a):void 0,s&&M0(t[0],t[1],s)&&(a=n<3?void 0:a,n=1),o=Object(o);++r<n;){var l=t[r];l&&i(o,l,r,a)}return o})}var I0=K5;var Y5=Object.prototype;function X5(i){var o=i&&i.constructor,t=typeof o=="function"&&o.prototype||Y5;return i===t}var Ja=X5;function Q5(i,o){for(var t=-1,r=Array(i);++t<i;)r[t]=o(t);return r}var N0=Q5;var J5="[object Arguments]";function Z5(i){return rr(i)&&jo(i)==J5}var ku=Z5;var D0=Object.prototype,tA=D0.hasOwnProperty,eA=D0.propertyIsEnumerable,rA=ku((function(){return arguments})())?ku:function(i){return rr(i)&&tA.call(i,"callee")&&!eA.call(i,"callee")},bl=rA;function oA(){return!1}var R0=oA;var H0=typeof exports=="object"&&exports&&!exports.nodeType&&exports,O0=H0&&typeof module=="object"&&module&&!module.nodeType&&module,nA=O0&&O0.exports===H0,P0=nA?Ee.Buffer:void 0,iA=P0?P0.isBuffer:void 0,aA=iA||R0,Bn=aA;var sA="[object Arguments]",lA="[object Array]",cA="[object Boolean]",dA="[object Date]",pA="[object Error]",hA="[object Function]",uA="[object Map]",mA="[object Number]",fA="[object Object]",gA="[object RegExp]",bA="[object Set]",vA="[object String]",xA="[object WeakMap]",yA="[object ArrayBuffer]",zA="[object DataView]",wA="[object Float32Array]",_A="[object Float64Array]",kA="[object Int8Array]",SA="[object Int16Array]",CA="[object Int32Array]",EA="[object Uint8Array]",TA="[object Uint8ClampedArray]",AA="[object Uint16Array]",$A="[object Uint32Array]",Yt={};Yt[wA]=Yt[_A]=Yt[kA]=Yt[SA]=Yt[CA]=Yt[EA]=Yt[TA]=Yt[AA]=Yt[$A]=!0;Yt[sA]=Yt[lA]=Yt[yA]=Yt[cA]=Yt[zA]=Yt[dA]=Yt[pA]=Yt[hA]=Yt[uA]=Yt[mA]=Yt[fA]=Yt[gA]=Yt[bA]=Yt[vA]=Yt[xA]=!1;function LA(i){return rr(i)&&Td(i.length)&&!!Yt[jo(i)]}var F0=LA;function qA(i){return function(o){return i(o)}}var Za=qA;var B0=typeof exports=="object"&&exports&&!exports.nodeType&&exports,vl=B0&&typeof module=="object"&&module&&!module.nodeType&&module,MA=vl&&vl.exports===B0,Su=MA&&zd.process,IA=(function(){try{var i=vl&&vl.require&&vl.require("util").types;return i||Su&&Su.binding&&Su.binding("util")}catch{}})(),Vn=IA;var V0=Vn&&Vn.isTypedArray,NA=V0?Za(V0):F0,ts=NA;var DA=Object.prototype,RA=DA.hasOwnProperty;function OA(i,o){var t=yo(i),r=!t&&bl(i),n=!t&&!r&&Bn(i),a=!t&&!r&&!n&&ts(i),s=t||r||n||a,l=s?N0(i.length,String):[],d=l.length;for(var h in i)(o||RA.call(i,h))&&!(s&&(h=="length"||n&&(h=="offset"||h=="parent")||a&&(h=="buffer"||h=="byteLength"||h=="byteOffset")||Cd(h,d)))&&l.push(h);return l}var Ad=OA;function PA(i,o){return function(t){return i(o(t))}}var $d=PA;var HA=$d(Object.keys,Object),U0=HA;var FA=Object.prototype,BA=FA.hasOwnProperty;function VA(i){if(!Ja(i))return U0(i);var o=[];for(var t in Object(i))BA.call(i,t)&&t!="constructor"&&o.push(t);return o}var j0=VA;function UA(i){return hi(i)?Ad(i):j0(i)}var es=UA;function jA(i){var o=[];if(i!=null)for(var t in Object(i))o.push(t);return o}var G0=jA;var GA=Object.prototype,WA=GA.hasOwnProperty;function KA(i){if(!pr(i))return G0(i);var o=Ja(i),t=[];for(var r in i)r=="constructor"&&(o||!WA.call(i,r))||t.push(r);return t}var W0=KA;function YA(i){return hi(i)?Ad(i,!0):W0(i)}var fn=YA;var XA=Pr(Object,"create"),Un=XA;function QA(){this.__data__=Un?Un(null):{},this.size=0}var K0=QA;function JA(i){var o=this.has(i)&&delete this.__data__[i];return this.size-=o?1:0,o}var Y0=JA;var ZA="__lodash_hash_undefined__",t$=Object.prototype,e$=t$.hasOwnProperty;function r$(i){var o=this.__data__;if(Un){var t=o[i];return t===ZA?void 0:t}return e$.call(o,i)?o[i]:void 0}var X0=r$;var o$=Object.prototype,n$=o$.hasOwnProperty;function i$(i){var o=this.__data__;return Un?o[i]!==void 0:n$.call(o,i)}var Q0=i$;var a$="__lodash_hash_undefined__";function s$(i,o){var t=this.__data__;return this.size+=this.has(i)?0:1,t[i]=Un&&o===void 0?a$:o,this}var J0=s$;function rs(i){var o=-1,t=i==null?0:i.length;for(this.clear();++o<t;){var r=i[o];this.set(r[0],r[1])}}rs.prototype.clear=K0;rs.prototype.delete=Y0;rs.prototype.get=X0;rs.prototype.has=Q0;rs.prototype.set=J0;var Cu=rs;function l$(){this.__data__=[],this.size=0}var Z0=l$;function c$(i,o){for(var t=i.length;t--;)if(un(i[t][0],o))return t;return-1}var ui=c$;var d$=Array.prototype,p$=d$.splice;function h$(i){var o=this.__data__,t=ui(o,i);if(t<0)return!1;var r=o.length-1;return t==r?o.pop():p$.call(o,t,1),--this.size,!0}var ty=h$;function u$(i){var o=this.__data__,t=ui(o,i);return t<0?void 0:o[t][1]}var ey=u$;function m$(i){return ui(this.__data__,i)>-1}var ry=m$;function f$(i,o){var t=this.__data__,r=ui(t,i);return r<0?(++this.size,t.push([i,o])):t[r][1]=o,this}var oy=f$;function os(i){var o=-1,t=i==null?0:i.length;for(this.clear();++o<t;){var r=i[o];this.set(r[0],r[1])}}os.prototype.clear=Z0;os.prototype.delete=ty;os.prototype.get=ey;os.prototype.has=ry;os.prototype.set=oy;var mi=os;var g$=Pr(Ee,"Map"),fi=g$;function b$(){this.size=0,this.__data__={hash:new Cu,map:new(fi||mi),string:new Cu}}var ny=b$;function v$(i){var o=typeof i;return o=="string"||o=="number"||o=="symbol"||o=="boolean"?i!=="__proto__":i===null}var iy=v$;function x$(i,o){var t=i.__data__;return iy(o)?t[typeof o=="string"?"string":"hash"]:t.map}var gi=x$;function y$(i){var o=gi(this,i).delete(i);return this.size-=o?1:0,o}var ay=y$;function z$(i){return gi(this,i).get(i)}var sy=z$;function w$(i){return gi(this,i).has(i)}var ly=w$;function _$(i,o){var t=gi(this,i),r=t.size;return t.set(i,o),this.size+=t.size==r?0:1,this}var cy=_$;function ns(i){var o=-1,t=i==null?0:i.length;for(this.clear();++o<t;){var r=i[o];this.set(r[0],r[1])}}ns.prototype.clear=ny;ns.prototype.delete=ay;ns.prototype.get=sy;ns.prototype.has=ly;ns.prototype.set=cy;var Ld=ns;function k$(i,o){for(var t=-1,r=o.length,n=i.length;++t<r;)i[n+t]=o[t];return i}var qd=k$;var S$=$d(Object.getPrototypeOf,Object),is=S$;var C$="[object Object]",E$=Function.prototype,T$=Object.prototype,dy=E$.toString,A$=T$.hasOwnProperty,$$=dy.call(Object);function L$(i){if(!rr(i)||jo(i)!=C$)return!1;var o=is(i);if(o===null)return!0;var t=A$.call(o,"constructor")&&o.constructor;return typeof t=="function"&&t instanceof t&&dy.call(t)==$$}var py=L$;function q$(){this.__data__=new mi,this.size=0}var hy=q$;function M$(i){var o=this.__data__,t=o.delete(i);return this.size=o.size,t}var uy=M$;function I$(i){return this.__data__.get(i)}var my=I$;function N$(i){return this.__data__.has(i)}var fy=N$;var D$=200;function R$(i,o){var t=this.__data__;if(t instanceof mi){var r=t.__data__;if(!fi||r.length<D$-1)return r.push([i,o]),this.size=++t.size,this;t=this.__data__=new Ld(r)}return t.set(i,o),this.size=t.size,this}var gy=R$;function as(i){var o=this.__data__=new mi(i);this.size=o.size}as.prototype.clear=hy;as.prototype.delete=uy;as.prototype.get=my;as.prototype.has=fy;as.prototype.set=gy;var bi=as;function O$(i,o){return i&&mn(o,es(o),i)}var by=O$;function P$(i,o){return i&&mn(o,fn(o),i)}var vy=P$;var wy=typeof exports=="object"&&exports&&!exports.nodeType&&exports,xy=wy&&typeof module=="object"&&module&&!module.nodeType&&module,H$=xy&&xy.exports===wy,yy=H$?Ee.Buffer:void 0,zy=yy?yy.allocUnsafe:void 0;function F$(i,o){if(o)return i.slice();var t=i.length,r=zy?zy(t):new i.constructor(t);return i.copy(r),r}var Md=F$;function B$(i,o){for(var t=-1,r=i==null?0:i.length,n=0,a=[];++t<r;){var s=i[t];o(s,t,i)&&(a[n++]=s)}return a}var _y=B$;function V$(){return[]}var Id=V$;var U$=Object.prototype,j$=U$.propertyIsEnumerable,ky=Object.getOwnPropertySymbols,G$=ky?function(i){return i==null?[]:(i=Object(i),_y(ky(i),function(o){return j$.call(i,o)}))}:Id,ss=G$;function W$(i,o){return mn(i,ss(i),o)}var Sy=W$;var K$=Object.getOwnPropertySymbols,Y$=K$?function(i){for(var o=[];i;)qd(o,ss(i)),i=is(i);return o}:Id,Nd=Y$;function X$(i,o){return mn(i,Nd(i),o)}var Cy=X$;function Q$(i,o,t){var r=o(i);return yo(i)?r:qd(r,t(i))}var Dd=Q$;function J$(i){return Dd(i,es,ss)}var xl=J$;function Z$(i){return Dd(i,fn,Nd)}var Ey=Z$;var tL=Pr(Ee,"DataView"),Rd=tL;var eL=Pr(Ee,"Promise"),Od=eL;var rL=Pr(Ee,"Set"),Pd=rL;var Ty="[object Map]",oL="[object Object]",Ay="[object Promise]",$y="[object Set]",Ly="[object WeakMap]",qy="[object DataView]",nL=Fn(Rd),iL=Fn(fi),aL=Fn(Od),sL=Fn(Pd),lL=Fn(kd),pa=jo;(Rd&&pa(new Rd(new ArrayBuffer(1)))!=qy||fi&&pa(new fi)!=Ty||Od&&pa(Od.resolve())!=Ay||Pd&&pa(new Pd)!=$y||kd&&pa(new kd)!=Ly)&&(pa=function(i){var o=jo(i),t=o==oL?i.constructor:void 0,r=t?Fn(t):"";if(r)switch(r){case nL:return qy;case iL:return Ty;case aL:return Ay;case sL:return $y;case lL:return Ly}return o});var jn=pa;var cL=Object.prototype,dL=cL.hasOwnProperty;function pL(i){var o=i.length,t=new i.constructor(o);return o&&typeof i[0]=="string"&&dL.call(i,"index")&&(t.index=i.index,t.input=i.input),t}var My=pL;var hL=Ee.Uint8Array,ls=hL;function uL(i){var o=new i.constructor(i.byteLength);return new ls(o).set(new ls(i)),o}var cs=uL;function mL(i,o){var t=o?cs(i.buffer):i.buffer;return new i.constructor(t,i.byteOffset,i.byteLength)}var Iy=mL;var fL=/\w*$/;function gL(i){var o=new i.constructor(i.source,fL.exec(i));return o.lastIndex=i.lastIndex,o}var Ny=gL;var Dy=xo?xo.prototype:void 0,Ry=Dy?Dy.valueOf:void 0;function bL(i){return Ry?Object(Ry.call(i)):{}}var Oy=bL;function vL(i,o){var t=o?cs(i.buffer):i.buffer;return new i.constructor(t,i.byteOffset,i.length)}var Hd=vL;var xL="[object Boolean]",yL="[object Date]",zL="[object Map]",wL="[object Number]",_L="[object RegExp]",kL="[object Set]",SL="[object String]",CL="[object Symbol]",EL="[object ArrayBuffer]",TL="[object DataView]",AL="[object Float32Array]",$L="[object Float64Array]",LL="[object Int8Array]",qL="[object Int16Array]",ML="[object Int32Array]",IL="[object Uint8Array]",NL="[object Uint8ClampedArray]",DL="[object Uint16Array]",RL="[object Uint32Array]";function OL(i,o,t){var r=i.constructor;switch(o){case EL:return cs(i);case xL:case yL:return new r(+i);case TL:return Iy(i,t);case AL:case $L:case LL:case qL:case ML:case IL:case NL:case DL:case RL:return Hd(i,t);case zL:return new r;case wL:case SL:return new r(i);case _L:return Ny(i);case kL:return new r;case CL:return Oy(i)}}var Py=OL;function PL(i){return typeof i.constructor=="function"&&!Ja(i)?_0(is(i)):{}}var Fd=PL;var HL="[object Map]";function FL(i){return rr(i)&&jn(i)==HL}var Hy=FL;var Fy=Vn&&Vn.isMap,BL=Fy?Za(Fy):Hy,By=BL;var VL="[object Set]";function UL(i){return rr(i)&&jn(i)==VL}var Vy=UL;var Uy=Vn&&Vn.isSet,jL=Uy?Za(Uy):Vy,jy=jL;var GL=1,WL=2,KL=4,Gy="[object Arguments]",YL="[object Array]",XL="[object Boolean]",QL="[object Date]",JL="[object Error]",Wy="[object Function]",ZL="[object GeneratorFunction]",tq="[object Map]",eq="[object Number]",Ky="[object Object]",rq="[object RegExp]",oq="[object Set]",nq="[object String]",iq="[object Symbol]",aq="[object WeakMap]",sq="[object ArrayBuffer]",lq="[object DataView]",cq="[object Float32Array]",dq="[object Float64Array]",pq="[object Int8Array]",hq="[object Int16Array]",uq="[object Int32Array]",mq="[object Uint8Array]",fq="[object Uint8ClampedArray]",gq="[object Uint16Array]",bq="[object Uint32Array]",Bt={};Bt[Gy]=Bt[YL]=Bt[sq]=Bt[lq]=Bt[XL]=Bt[QL]=Bt[cq]=Bt[dq]=Bt[pq]=Bt[hq]=Bt[uq]=Bt[tq]=Bt[eq]=Bt[Ky]=Bt[rq]=Bt[oq]=Bt[nq]=Bt[iq]=Bt[mq]=Bt[fq]=Bt[gq]=Bt[bq]=!0;Bt[JL]=Bt[Wy]=Bt[aq]=!1;function Bd(i,o,t,r,n,a){var s,l=o&GL,d=o&WL,h=o&KL;if(t&&(s=n?t(i,r,n,a):t(i)),s!==void 0)return s;if(!pr(i))return i;var m=yo(i);if(m){if(s=My(i),!l)return Sd(i,s)}else{var f=jn(i),b=f==Wy||f==ZL;if(Bn(i))return Md(i,l);if(f==Ky||f==Gy||b&&!n){if(s=d||b?{}:Fd(i),!l)return d?Cy(i,vy(s,i)):Sy(i,by(s,i))}else{if(!Bt[f])return n?i:{};s=Py(i,f,l)}}a||(a=new bi);var g=a.get(i);if(g)return g;a.set(i,s),jy(i)?i.forEach(function(k){s.add(Bd(k,o,t,k,i,a))}):By(i)&&i.forEach(function(k,_){s.set(_,Bd(k,o,t,_,i,a))});var v=h?d?Ey:xl:d?fn:es,x=m?void 0:v(i);return A0(x||i,function(k,_){x&&(_=k,k=i[_]),Ed(s,_,Bd(k,o,t,_,i,a))}),s}var Yy=Bd;var vq=1,xq=4;function yq(i){return Yy(i,vq|xq)}var gn=yq;var zq="__lodash_hash_undefined__";function wq(i){return this.__data__.set(i,zq),this}var Xy=wq;function _q(i){return this.__data__.has(i)}var Qy=_q;function Vd(i){var o=-1,t=i==null?0:i.length;for(this.__data__=new Ld;++o<t;)this.add(i[o])}Vd.prototype.add=Vd.prototype.push=Xy;Vd.prototype.has=Qy;var Jy=Vd;function kq(i,o){for(var t=-1,r=i==null?0:i.length;++t<r;)if(o(i[t],t,i))return!0;return!1}var Zy=kq;function Sq(i,o){return i.has(o)}var tz=Sq;var Cq=1,Eq=2;function Tq(i,o,t,r,n,a){var s=t&Cq,l=i.length,d=o.length;if(l!=d&&!(s&&d>l))return!1;var h=a.get(i),m=a.get(o);if(h&&m)return h==o&&m==i;var f=-1,b=!0,g=t&Eq?new Jy:void 0;for(a.set(i,o),a.set(o,i);++f<l;){var v=i[f],x=o[f];if(r)var k=s?r(x,v,f,o,i,a):r(v,x,f,i,o,a);if(k!==void 0){if(k)continue;b=!1;break}if(g){if(!Zy(o,function(_,O){if(!tz(g,O)&&(v===_||n(v,_,t,r,a)))return g.push(O)})){b=!1;break}}else if(!(v===x||n(v,x,t,r,a))){b=!1;break}}return a.delete(i),a.delete(o),b}var Ud=Tq;function Aq(i){var o=-1,t=Array(i.size);return i.forEach(function(r,n){t[++o]=[n,r]}),t}var ez=Aq;function $q(i){var o=-1,t=Array(i.size);return i.forEach(function(r){t[++o]=r}),t}var rz=$q;var Lq=1,qq=2,Mq="[object Boolean]",Iq="[object Date]",Nq="[object Error]",Dq="[object Map]",Rq="[object Number]",Oq="[object RegExp]",Pq="[object Set]",Hq="[object String]",Fq="[object Symbol]",Bq="[object ArrayBuffer]",Vq="[object DataView]",oz=xo?xo.prototype:void 0,Eu=oz?oz.valueOf:void 0;function Uq(i,o,t,r,n,a,s){switch(t){case Vq:if(i.byteLength!=o.byteLength||i.byteOffset!=o.byteOffset)return!1;i=i.buffer,o=o.buffer;case Bq:return!(i.byteLength!=o.byteLength||!a(new ls(i),new ls(o)));case Mq:case Iq:case Rq:return un(+i,+o);case Nq:return i.name==o.name&&i.message==o.message;case Oq:case Hq:return i==o+"";case Dq:var l=ez;case Pq:var d=r&Lq;if(l||(l=rz),i.size!=o.size&&!d)return!1;var h=s.get(i);if(h)return h==o;r|=qq,s.set(i,o);var m=Ud(l(i),l(o),r,n,a,s);return s.delete(i),m;case Fq:if(Eu)return Eu.call(i)==Eu.call(o)}return!1}var nz=Uq;var jq=1,Gq=Object.prototype,Wq=Gq.hasOwnProperty;function Kq(i,o,t,r,n,a){var s=t&jq,l=xl(i),d=l.length,h=xl(o),m=h.length;if(d!=m&&!s)return!1;for(var f=d;f--;){var b=l[f];if(!(s?b in o:Wq.call(o,b)))return!1}var g=a.get(i),v=a.get(o);if(g&&v)return g==o&&v==i;var x=!0;a.set(i,o),a.set(o,i);for(var k=s;++f<d;){b=l[f];var _=i[b],O=o[b];if(r)var j=s?r(O,_,b,o,i,a):r(_,O,b,i,o,a);if(!(j===void 0?_===O||n(_,O,t,r,a):j)){x=!1;break}k||(k=b=="constructor")}if(x&&!k){var I=i.constructor,w=o.constructor;I!=w&&"constructor"in i&&"constructor"in o&&!(typeof I=="function"&&I instanceof I&&typeof w=="function"&&w instanceof w)&&(x=!1)}return a.delete(i),a.delete(o),x}var iz=Kq;var Yq=1,az="[object Arguments]",sz="[object Array]",jd="[object Object]",Xq=Object.prototype,lz=Xq.hasOwnProperty;function Qq(i,o,t,r,n,a){var s=yo(i),l=yo(o),d=s?sz:jn(i),h=l?sz:jn(o);d=d==az?jd:d,h=h==az?jd:h;var m=d==jd,f=h==jd,b=d==h;if(b&&Bn(i)){if(!Bn(o))return!1;s=!0,m=!1}if(b&&!m)return a||(a=new bi),s||ts(i)?Ud(i,o,t,r,n,a):nz(i,o,d,t,r,n,a);if(!(t&Yq)){var g=m&&lz.call(i,"__wrapped__"),v=f&&lz.call(o,"__wrapped__");if(g||v){var x=g?i.value():i,k=v?o.value():o;return a||(a=new bi),n(x,k,t,r,a)}}return b?(a||(a=new bi),iz(i,o,t,r,n,a)):!1}var cz=Qq;function dz(i,o,t,r,n){return i===o?!0:i==null||o==null||!rr(i)&&!rr(o)?i!==i&&o!==o:cz(i,o,t,r,dz,n)}var pz=dz;function Jq(i){return function(o,t,r){for(var n=-1,a=Object(o),s=r(o),l=s.length;l--;){var d=s[i?l:++n];if(t(a[d],d,a)===!1)break}return o}}var hz=Jq;var Zq=hz(),uz=Zq;function t3(i,o,t){(t!==void 0&&!un(i[o],t)||t===void 0&&!(o in i))&&Qa(i,o,t)}var yl=t3;function e3(i){return rr(i)&&hi(i)}var mz=e3;function r3(i,o){if(!(o==="constructor"&&typeof i[o]=="function")&&o!="__proto__")return i[o]}var zl=r3;function o3(i){return mn(i,fn(i))}var fz=o3;function n3(i,o,t,r,n,a,s){var l=zl(i,t),d=zl(o,t),h=s.get(d);if(h){yl(i,t,h);return}var m=a?a(l,d,t+"",i,o,s):void 0,f=m===void 0;if(f){var b=yo(d),g=!b&&Bn(d),v=!b&&!g&&ts(d);m=d,b||g||v?yo(l)?m=l:mz(l)?m=Sd(l):g?(f=!1,m=Md(d,!0)):v?(f=!1,m=Hd(d,!0)):m=[]:py(d)||bl(d)?(m=l,bl(l)?m=fz(l):(!pr(l)||Ya(l))&&(m=Fd(d))):f=!1}f&&(s.set(d,m),n(m,d,r,a,s),s.delete(d)),yl(i,t,m)}var gz=n3;function bz(i,o,t,r,n){i!==o&&uz(o,function(a,s){if(n||(n=new bi),pr(a))gz(i,o,s,t,bz,r,n);else{var l=r?r(zl(i,s),a,s+"",i,o,n):void 0;l===void 0&&(l=a),yl(i,s,l)}},fn)}var vz=bz;function i3(i,o){return pz(i,o)}var ha=i3;var a3=I0(function(i,o,t){vz(i,o,t)}),Hr=a3;var kl={};H1(kl,{Attributor:()=>Sr,AttributorStore:()=>wl,BlockBlot:()=>ua,ClassAttributor:()=>Te,ContainerBlot:()=>ms,EmbedBlot:()=>ce,InlineBlot:()=>Gd,LeafBlot:()=>Ae,ParentBlot:()=>Fr,Registry:()=>yi,Scope:()=>X,ScrollBlot:()=>_l,StyleAttributor:()=>Br,TextBlot:()=>fs});var X=(i=>(i[i.TYPE=3]="TYPE",i[i.LEVEL=12]="LEVEL",i[i.ATTRIBUTE=13]="ATTRIBUTE",i[i.BLOT=14]="BLOT",i[i.INLINE=7]="INLINE",i[i.BLOCK=11]="BLOCK",i[i.BLOCK_BLOT=10]="BLOCK_BLOT",i[i.INLINE_BLOT=6]="INLINE_BLOT",i[i.BLOCK_ATTRIBUTE=9]="BLOCK_ATTRIBUTE",i[i.INLINE_ATTRIBUTE=5]="INLINE_ATTRIBUTE",i[i.ANY=15]="ANY",i))(X||{}),Sr=class{constructor(o,t,r={}){this.attrName=o,this.keyName=t;let n=X.TYPE&X.ATTRIBUTE;this.scope=r.scope!=null?r.scope&X.LEVEL|n:X.ATTRIBUTE,r.whitelist!=null&&(this.whitelist=r.whitelist)}static keys(o){return Array.from(o.attributes).map(t=>t.name)}add(o,t){return this.canAdd(o,t)?(o.setAttribute(this.keyName,t),!0):!1}canAdd(o,t){return this.whitelist==null?!0:typeof t=="string"?this.whitelist.indexOf(t.replace(/["']/g,""))>-1:this.whitelist.indexOf(t)>-1}remove(o){o.removeAttribute(this.keyName)}value(o){let t=o.getAttribute(this.keyName);return this.canAdd(o,t)&&t?t:""}},xi=class extends Error{constructor(o){o="[Parchment] "+o,super(o),this.message=o,this.name=this.constructor.name}},zz=class Au{constructor(){this.attributes={},this.classes={},this.tags={},this.types={}}static find(o,t=!1){if(o==null)return null;if(this.blots.has(o))return this.blots.get(o)||null;if(t){let r=null;try{r=o.parentNode}catch{return null}return this.find(r,t)}return null}create(o,t,r){let n=this.query(t);if(n==null)throw new xi(`Unable to create ${t} blot`);let a=n,s=t instanceof Node||t.nodeType===Node.TEXT_NODE?t:a.create(r),l=new a(o,s,r);return Au.blots.set(l.domNode,l),l}find(o,t=!1){return Au.find(o,t)}query(o,t=X.ANY){let r;return typeof o=="string"?r=this.types[o]||this.attributes[o]:o instanceof Text||o.nodeType===Node.TEXT_NODE?r=this.types.text:typeof o=="number"?o&X.LEVEL&X.BLOCK?r=this.types.block:o&X.LEVEL&X.INLINE&&(r=this.types.inline):o instanceof Element&&((o.getAttribute("class")||"").split(/\s+/).some(n=>(r=this.classes[n],!!r)),r=r||this.tags[o.tagName]),r==null?null:"scope"in r&&t&X.LEVEL&r.scope&&t&X.TYPE&r.scope?r:null}register(...o){return o.map(t=>{let r="blotName"in t,n="attrName"in t;if(!r&&!n)throw new xi("Invalid definition");if(r&&t.blotName==="abstract")throw new xi("Cannot register abstract class");let a=r?t.blotName:n?t.attrName:void 0;return this.types[a]=t,n?typeof t.keyName=="string"&&(this.attributes[t.keyName]=t):r&&(t.className&&(this.classes[t.className]=t),t.tagName&&(Array.isArray(t.tagName)?t.tagName=t.tagName.map(s=>s.toUpperCase()):t.tagName=t.tagName.toUpperCase(),(Array.isArray(t.tagName)?t.tagName:[t.tagName]).forEach(s=>{(this.tags[s]==null||t.className==null)&&(this.tags[s]=t)}))),t})}};zz.blots=new WeakMap;var yi=zz;function xz(i,o){return(i.getAttribute("class")||"").split(/\s+/).filter(t=>t.indexOf(`${o}-`)===0)}var $u=class extends Sr{static keys(o){return(o.getAttribute("class")||"").split(/\s+/).map(t=>t.split("-").slice(0,-1).join("-"))}add(o,t){return this.canAdd(o,t)?(this.remove(o),o.classList.add(`${this.keyName}-${t}`),!0):!1}remove(o){xz(o,this.keyName).forEach(t=>{o.classList.remove(t)}),o.classList.length===0&&o.removeAttribute("class")}value(o){let t=(xz(o,this.keyName)[0]||"").slice(this.keyName.length+1);return this.canAdd(o,t)?t:""}},Te=$u;function Tu(i){let o=i.split("-"),t=o.slice(1).map(r=>r[0].toUpperCase()+r.slice(1)).join("");return o[0]+t}var Lu=class extends Sr{static keys(o){return(o.getAttribute("style")||"").split(";").map(t=>t.split(":")[0].trim())}add(o,t){return this.canAdd(o,t)?(o.style[Tu(this.keyName)]=t,!0):!1}remove(o){o.style[Tu(this.keyName)]="",o.getAttribute("style")||o.removeAttribute("style")}value(o){let t=o.style[Tu(this.keyName)];return this.canAdd(o,t)?t:""}},Br=Lu,qu=class{constructor(o){this.attributes={},this.domNode=o,this.build()}attribute(o,t){t?o.add(this.domNode,t)&&(o.value(this.domNode)!=null?this.attributes[o.attrName]=o:delete this.attributes[o.attrName]):(o.remove(this.domNode),delete this.attributes[o.attrName])}build(){this.attributes={};let o=yi.find(this.domNode);if(o==null)return;let t=Sr.keys(this.domNode),r=Te.keys(this.domNode),n=Br.keys(this.domNode);t.concat(r).concat(n).forEach(a=>{let s=o.scroll.query(a,X.ATTRIBUTE);s instanceof Sr&&(this.attributes[s.attrName]=s)})}copy(o){Object.keys(this.attributes).forEach(t=>{let r=this.attributes[t].value(this.domNode);o.format(t,r)})}move(o){this.copy(o),Object.keys(this.attributes).forEach(t=>{this.attributes[t].remove(this.domNode)}),this.attributes={}}values(){return Object.keys(this.attributes).reduce((o,t)=>(o[t]=this.attributes[t].value(this.domNode),o),{})}},wl=qu,wz=class{constructor(o,t){this.scroll=o,this.domNode=t,yi.blots.set(t,this),this.prev=null,this.next=null}static create(o){if(this.tagName==null)throw new xi("Blot definition missing tagName");let t,r;return Array.isArray(this.tagName)?(typeof o=="string"?(r=o.toUpperCase(),parseInt(r,10).toString()===r&&(r=parseInt(r,10))):typeof o=="number"&&(r=o),typeof r=="number"?t=document.createElement(this.tagName[r-1]):r&&this.tagName.indexOf(r)>-1?t=document.createElement(r):t=document.createElement(this.tagName[0])):t=document.createElement(this.tagName),this.className&&t.classList.add(this.className),t}get statics(){return this.constructor}attach(){}clone(){let o=this.domNode.cloneNode(!1);return this.scroll.create(o)}detach(){this.parent!=null&&this.parent.removeChild(this),yi.blots.delete(this.domNode)}deleteAt(o,t){this.isolate(o,t).remove()}formatAt(o,t,r,n){let a=this.isolate(o,t);if(this.scroll.query(r,X.BLOT)!=null&&n)a.wrap(r,n);else if(this.scroll.query(r,X.ATTRIBUTE)!=null){let s=this.scroll.create(this.statics.scope);a.wrap(s),s.format(r,n)}}insertAt(o,t,r){let n=r==null?this.scroll.create("text",t):this.scroll.create(t,r),a=this.split(o);this.parent.insertBefore(n,a||void 0)}isolate(o,t){let r=this.split(o);if(r==null)throw new Error("Attempt to isolate at end");return r.split(t),r}length(){return 1}offset(o=this.parent){return this.parent==null||this===o?0:this.parent.children.offset(this)+this.parent.offset(o)}optimize(o){this.statics.requiredContainer&&!(this.parent instanceof this.statics.requiredContainer)&&this.wrap(this.statics.requiredContainer.blotName)}remove(){this.domNode.parentNode!=null&&this.domNode.parentNode.removeChild(this.domNode),this.detach()}replaceWith(o,t){let r=typeof o=="string"?this.scroll.create(o,t):o;return this.parent!=null&&(this.parent.insertBefore(r,this.next||void 0),this.remove()),r}split(o,t){return o===0?this:this.next}update(o,t){}wrap(o,t){let r=typeof o=="string"?this.scroll.create(o,t):o;if(this.parent!=null&&this.parent.insertBefore(r,this.next||void 0),typeof r.appendChild!="function")throw new xi(`Cannot wrap ${o}`);return r.appendChild(this),r}};wz.blotName="abstract";var _z=wz,kz=class extends _z{static value(o){return!0}index(o,t){return this.domNode===o||this.domNode.compareDocumentPosition(o)&Node.DOCUMENT_POSITION_CONTAINED_BY?Math.min(t,1):-1}position(o,t){let r=Array.from(this.parent.domNode.childNodes).indexOf(this.domNode);return o>0&&(r+=1),[this.parent.domNode,r]}value(){return{[this.statics.blotName]:this.statics.value(this.domNode)||!0}}};kz.scope=X.INLINE_BLOT;var s3=kz,Ae=s3,Mu=class{constructor(){this.head=null,this.tail=null,this.length=0}append(...o){if(this.insertBefore(o[0],null),o.length>1){let t=o.slice(1);this.append(...t)}}at(o){let t=this.iterator(),r=t();for(;r&&o>0;)o-=1,r=t();return r}contains(o){let t=this.iterator(),r=t();for(;r;){if(r===o)return!0;r=t()}return!1}indexOf(o){let t=this.iterator(),r=t(),n=0;for(;r;){if(r===o)return n;n+=1,r=t()}return-1}insertBefore(o,t){o!=null&&(this.remove(o),o.next=t,t!=null?(o.prev=t.prev,t.prev!=null&&(t.prev.next=o),t.prev=o,t===this.head&&(this.head=o)):this.tail!=null?(this.tail.next=o,o.prev=this.tail,this.tail=o):(o.prev=null,this.head=this.tail=o),this.length+=1)}offset(o){let t=0,r=this.head;for(;r!=null;){if(r===o)return t;t+=r.length(),r=r.next}return-1}remove(o){this.contains(o)&&(o.prev!=null&&(o.prev.next=o.next),o.next!=null&&(o.next.prev=o.prev),o===this.head&&(this.head=o.next),o===this.tail&&(this.tail=o.prev),this.length-=1)}iterator(o=this.head){return()=>{let t=o;return o!=null&&(o=o.next),t}}find(o,t=!1){let r=this.iterator(),n=r();for(;n;){let a=n.length();if(o<a||t&&o===a&&(n.next==null||n.next.length()!==0))return[n,o];o-=a,n=r()}return[null,0]}forEach(o){let t=this.iterator(),r=t();for(;r;)o(r),r=t()}forEachAt(o,t,r){if(t<=0)return;let[n,a]=this.find(o),s=o-a,l=this.iterator(n),d=l();for(;d&&s<o+t;){let h=d.length();o>s?r(d,o-s,Math.min(t,s+h-o)):r(d,0,Math.min(h,o+t-s)),s+=h,d=l()}}map(o){return this.reduce((t,r)=>(t.push(o(r)),t),[])}reduce(o,t){let r=this.iterator(),n=r();for(;n;)t=o(t,n),n=r();return t}};function yz(i,o){let t=o.find(i);if(t)return t;try{return o.create(i)}catch{let r=o.create(X.INLINE);return Array.from(i.childNodes).forEach(n=>{r.domNode.appendChild(n)}),i.parentNode&&i.parentNode.replaceChild(r.domNode,i),r.attach(),r}}var Sz=class vi extends _z{constructor(o,t){super(o,t),this.uiNode=null,this.build()}appendChild(o){this.insertBefore(o)}attach(){super.attach(),this.children.forEach(o=>{o.attach()})}attachUI(o){this.uiNode!=null&&this.uiNode.remove(),this.uiNode=o,vi.uiClass&&this.uiNode.classList.add(vi.uiClass),this.uiNode.setAttribute("contenteditable","false"),this.domNode.insertBefore(this.uiNode,this.domNode.firstChild)}build(){this.children=new Mu,Array.from(this.domNode.childNodes).filter(o=>o!==this.uiNode).reverse().forEach(o=>{try{let t=yz(o,this.scroll);this.insertBefore(t,this.children.head||void 0)}catch(t){if(t instanceof xi)return;throw t}})}deleteAt(o,t){if(o===0&&t===this.length())return this.remove();this.children.forEachAt(o,t,(r,n,a)=>{r.deleteAt(n,a)})}descendant(o,t=0){let[r,n]=this.children.find(t);return o.blotName==null&&o(r)||o.blotName!=null&&r instanceof o?[r,n]:r instanceof vi?r.descendant(o,n):[null,-1]}descendants(o,t=0,r=Number.MAX_VALUE){let n=[],a=r;return this.children.forEachAt(t,r,(s,l,d)=>{(o.blotName==null&&o(s)||o.blotName!=null&&s instanceof o)&&n.push(s),s instanceof vi&&(n=n.concat(s.descendants(o,l,a))),a-=d}),n}detach(){this.children.forEach(o=>{o.detach()}),super.detach()}enforceAllowedChildren(){let o=!1;this.children.forEach(t=>{o||this.statics.allowedChildren.some(r=>t instanceof r)||(t.statics.scope===X.BLOCK_BLOT?(t.next!=null&&this.splitAfter(t),t.prev!=null&&this.splitAfter(t.prev),t.parent.unwrap(),o=!0):t instanceof vi?t.unwrap():t.remove())})}formatAt(o,t,r,n){this.children.forEachAt(o,t,(a,s,l)=>{a.formatAt(s,l,r,n)})}insertAt(o,t,r){let[n,a]=this.children.find(o);if(n)n.insertAt(a,t,r);else{let s=r==null?this.scroll.create("text",t):this.scroll.create(t,r);this.appendChild(s)}}insertBefore(o,t){o.parent!=null&&o.parent.children.remove(o);let r=null;this.children.insertBefore(o,t||null),o.parent=this,t!=null&&(r=t.domNode),(this.domNode.parentNode!==o.domNode||this.domNode.nextSibling!==r)&&this.domNode.insertBefore(o.domNode,r),o.attach()}length(){return this.children.reduce((o,t)=>o+t.length(),0)}moveChildren(o,t){this.children.forEach(r=>{o.insertBefore(r,t)})}optimize(o){if(super.optimize(o),this.enforceAllowedChildren(),this.uiNode!=null&&this.uiNode!==this.domNode.firstChild&&this.domNode.insertBefore(this.uiNode,this.domNode.firstChild),this.children.length===0)if(this.statics.defaultChild!=null){let t=this.scroll.create(this.statics.defaultChild.blotName);this.appendChild(t)}else this.remove()}path(o,t=!1){let[r,n]=this.children.find(o,t),a=[[this,o]];return r instanceof vi?a.concat(r.path(n,t)):(r!=null&&a.push([r,n]),a)}removeChild(o){this.children.remove(o)}replaceWith(o,t){let r=typeof o=="string"?this.scroll.create(o,t):o;return r instanceof vi&&this.moveChildren(r),super.replaceWith(r)}split(o,t=!1){if(!t){if(o===0)return this;if(o===this.length())return this.next}let r=this.clone();return this.parent&&this.parent.insertBefore(r,this.next||void 0),this.children.forEachAt(o,this.length(),(n,a,s)=>{let l=n.split(a,t);l!=null&&r.appendChild(l)}),r}splitAfter(o){let t=this.clone();for(;o.next!=null;)t.appendChild(o.next);return this.parent&&this.parent.insertBefore(t,this.next||void 0),t}unwrap(){this.parent&&this.moveChildren(this.parent,this.next||void 0),this.remove()}update(o,t){let r=[],n=[];o.forEach(a=>{a.target===this.domNode&&a.type==="childList"&&(r.push(...a.addedNodes),n.push(...a.removedNodes))}),n.forEach(a=>{if(a.parentNode!=null&&a.tagName!=="IFRAME"&&document.body.compareDocumentPosition(a)&Node.DOCUMENT_POSITION_CONTAINED_BY)return;let s=this.scroll.find(a);s!=null&&(s.domNode.parentNode==null||s.domNode.parentNode===this.domNode)&&s.detach()}),r.filter(a=>a.parentNode===this.domNode&&a!==this.uiNode).sort((a,s)=>a===s?0:a.compareDocumentPosition(s)&Node.DOCUMENT_POSITION_FOLLOWING?1:-1).forEach(a=>{let s=null;a.nextSibling!=null&&(s=this.scroll.find(a.nextSibling));let l=yz(a,this.scroll);(l.next!==s||l.next==null)&&(l.parent!=null&&l.parent.removeChild(this),this.insertBefore(l,s||void 0))}),this.enforceAllowedChildren()}};Sz.uiClass="";var l3=Sz,Fr=l3;function c3(i,o){if(Object.keys(i).length!==Object.keys(o).length)return!1;for(let t in i)if(i[t]!==o[t])return!1;return!0}var ds=class ps extends Fr{static create(o){return super.create(o)}static formats(o,t){let r=t.query(ps.blotName);if(!(r!=null&&o.tagName===r.tagName)){if(typeof this.tagName=="string")return!0;if(Array.isArray(this.tagName))return o.tagName.toLowerCase()}}constructor(o,t){super(o,t),this.attributes=new wl(this.domNode)}format(o,t){if(o===this.statics.blotName&&!t)this.children.forEach(r=>{r instanceof ps||(r=r.wrap(ps.blotName,!0)),this.attributes.copy(r)}),this.unwrap();else{let r=this.scroll.query(o,X.INLINE);if(r==null)return;r instanceof Sr?this.attributes.attribute(r,t):t&&(o!==this.statics.blotName||this.formats()[o]!==t)&&this.replaceWith(o,t)}}formats(){let o=this.attributes.values(),t=this.statics.formats(this.domNode,this.scroll);return t!=null&&(o[this.statics.blotName]=t),o}formatAt(o,t,r,n){this.formats()[r]!=null||this.scroll.query(r,X.ATTRIBUTE)?this.isolate(o,t).format(r,n):super.formatAt(o,t,r,n)}optimize(o){super.optimize(o);let t=this.formats();if(Object.keys(t).length===0)return this.unwrap();let r=this.next;r instanceof ps&&r.prev===this&&c3(t,r.formats())&&(r.moveChildren(this),r.remove())}replaceWith(o,t){let r=super.replaceWith(o,t);return this.attributes.copy(r),r}update(o,t){super.update(o,t),o.some(r=>r.target===this.domNode&&r.type==="attributes")&&this.attributes.build()}wrap(o,t){let r=super.wrap(o,t);return r instanceof ps&&this.attributes.move(r),r}};ds.allowedChildren=[ds,Ae],ds.blotName="inline",ds.scope=X.INLINE_BLOT,ds.tagName="SPAN";var d3=ds,Gd=d3,hs=class Iu extends Fr{static create(o){return super.create(o)}static formats(o,t){let r=t.query(Iu.blotName);if(!(r!=null&&o.tagName===r.tagName)){if(typeof this.tagName=="string")return!0;if(Array.isArray(this.tagName))return o.tagName.toLowerCase()}}constructor(o,t){super(o,t),this.attributes=new wl(this.domNode)}format(o,t){let r=this.scroll.query(o,X.BLOCK);r!=null&&(r instanceof Sr?this.attributes.attribute(r,t):o===this.statics.blotName&&!t?this.replaceWith(Iu.blotName):t&&(o!==this.statics.blotName||this.formats()[o]!==t)&&this.replaceWith(o,t))}formats(){let o=this.attributes.values(),t=this.statics.formats(this.domNode,this.scroll);return t!=null&&(o[this.statics.blotName]=t),o}formatAt(o,t,r,n){this.scroll.query(r,X.BLOCK)!=null?this.format(r,n):super.formatAt(o,t,r,n)}insertAt(o,t,r){if(r==null||this.scroll.query(t,X.INLINE)!=null)super.insertAt(o,t,r);else{let n=this.split(o);if(n!=null){let a=this.scroll.create(t,r);n.parent.insertBefore(a,n)}else throw new Error("Attempt to insertAt after block boundaries")}}replaceWith(o,t){let r=super.replaceWith(o,t);return this.attributes.copy(r),r}update(o,t){super.update(o,t),o.some(r=>r.target===this.domNode&&r.type==="attributes")&&this.attributes.build()}};hs.blotName="block",hs.scope=X.BLOCK_BLOT,hs.tagName="P",hs.allowedChildren=[Gd,hs,Ae];var p3=hs,ua=p3,Nu=class extends Fr{checkMerge(){return this.next!==null&&this.next.statics.blotName===this.statics.blotName}deleteAt(o,t){super.deleteAt(o,t),this.enforceAllowedChildren()}formatAt(o,t,r,n){super.formatAt(o,t,r,n),this.enforceAllowedChildren()}insertAt(o,t,r){super.insertAt(o,t,r),this.enforceAllowedChildren()}optimize(o){super.optimize(o),this.children.length>0&&this.next!=null&&this.checkMerge()&&(this.next.moveChildren(this),this.next.remove())}};Nu.blotName="container",Nu.scope=X.BLOCK_BLOT;var h3=Nu,ms=h3,Du=class extends Ae{static formats(o,t){}format(o,t){super.formatAt(0,this.length(),o,t)}formatAt(o,t,r,n){o===0&&t===this.length()?this.format(r,n):super.formatAt(o,t,r,n)}formats(){return this.statics.formats(this.domNode,this.scroll)}},ce=Du,u3={attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0},m3=100,us=class extends Fr{constructor(o,t){super(null,t),this.registry=o,this.scroll=this,this.build(),this.observer=new MutationObserver(r=>{this.update(r)}),this.observer.observe(this.domNode,u3),this.attach()}create(o,t){return this.registry.create(this,o,t)}find(o,t=!1){let r=this.registry.find(o,t);return r?r.scroll===this?r:t?this.find(r.scroll.domNode.parentNode,!0):null:null}query(o,t=X.ANY){return this.registry.query(o,t)}register(...o){return this.registry.register(...o)}build(){this.scroll!=null&&super.build()}detach(){super.detach(),this.observer.disconnect()}deleteAt(o,t){this.update(),o===0&&t===this.length()?this.children.forEach(r=>{r.remove()}):super.deleteAt(o,t)}formatAt(o,t,r,n){this.update(),super.formatAt(o,t,r,n)}insertAt(o,t,r){this.update(),super.insertAt(o,t,r)}optimize(o=[],t={}){super.optimize(t);let r=t.mutationsMap||new WeakMap,n=Array.from(this.observer.takeRecords());for(;n.length>0;)o.push(n.pop());let a=(d,h=!0)=>{d==null||d===this||d.domNode.parentNode!=null&&(r.has(d.domNode)||r.set(d.domNode,[]),h&&a(d.parent))},s=d=>{r.has(d.domNode)&&(d instanceof Fr&&d.children.forEach(s),r.delete(d.domNode),d.optimize(t))},l=o;for(let d=0;l.length>0;d+=1){if(d>=m3)throw new Error("[Parchment] Maximum optimize iterations reached");for(l.forEach(h=>{let m=this.find(h.target,!0);m!=null&&(m.domNode===h.target&&(h.type==="childList"?(a(this.find(h.previousSibling,!1)),Array.from(h.addedNodes).forEach(f=>{let b=this.find(f,!1);a(b,!1),b instanceof Fr&&b.children.forEach(g=>{a(g,!1)})})):h.type==="attributes"&&a(m.prev)),a(m))}),this.children.forEach(s),l=Array.from(this.observer.takeRecords()),n=l.slice();n.length>0;)o.push(n.pop())}}update(o,t={}){o=o||this.observer.takeRecords();let r=new WeakMap;o.map(n=>{let a=this.find(n.target,!0);return a==null?null:r.has(a.domNode)?(r.get(a.domNode).push(n),null):(r.set(a.domNode,[n]),a)}).forEach(n=>{n!=null&&n!==this&&r.has(n.domNode)&&n.update(r.get(n.domNode)||[],t)}),t.mutationsMap=r,r.has(this.domNode)&&super.update(r.get(this.domNode),t),this.optimize(o,t)}};us.blotName="scroll",us.defaultChild=ua,us.allowedChildren=[ua,ms],us.scope=X.BLOCK_BLOT,us.tagName="DIV";var f3=us,_l=f3,Ru=class Cz extends Ae{static create(o){return document.createTextNode(o)}static value(o){return o.data}constructor(o,t){super(o,t),this.text=this.statics.value(this.domNode)}deleteAt(o,t){this.domNode.data=this.text=this.text.slice(0,o)+this.text.slice(o+t)}index(o,t){return this.domNode===o?t:-1}insertAt(o,t,r){r==null?(this.text=this.text.slice(0,o)+t+this.text.slice(o),this.domNode.data=this.text):super.insertAt(o,t,r)}length(){return this.text.length}optimize(o){super.optimize(o),this.text=this.statics.value(this.domNode),this.text.length===0?this.remove():this.next instanceof Cz&&this.next.prev===this&&(this.insertAt(this.length(),this.next.value()),this.next.remove())}position(o,t=!1){return[this.domNode,o]}split(o,t=!1){if(!t){if(o===0)return this;if(o===this.length())return this.next}let r=this.scroll.create(this.domNode.splitText(o));return this.parent.insertBefore(r,this.next||void 0),this.text=this.statics.value(this.domNode),r}update(o,t){o.some(r=>r.type==="characterData"&&r.target===this.domNode)&&(this.text=this.statics.value(this.domNode))}value(){return this.text}};Ru.blotName="text",Ru.scope=X.INLINE_BLOT;var g3=Ru,fs=g3;var wi=ar(Or(),1);var de=ar(Or(),1);var Pu=ar(Or(),1);var Sl=class extends ce{static value(){}optimize(){(this.prev||this.next)&&this.remove()}length(){return 0}value(){return""}};Sl.blotName="break";Sl.tagName="BR";var hr=Sl;var we=class extends fs{},b3={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function ma(i){return i.replace(/[&<>"']/g,o=>b3[o])}var bn=class bn extends Gd{static compare(o,t){let r=bn.order.indexOf(o),n=bn.order.indexOf(t);return r>=0||n>=0?r-n:o===t?0:o<t?-1:1}formatAt(o,t,r,n){if(bn.compare(this.statics.blotName,r)<0&&this.scroll.query(r,X.BLOT)){let a=this.isolate(o,t);n&&a.wrap(r,n)}else super.formatAt(o,t,r,n)}optimize(o){if(super.optimize(o),this.parent instanceof bn&&bn.compare(this.statics.blotName,this.parent.statics.blotName)>0){let t=this.parent.isolate(this.offset(),this.length());this.moveChildren(t),t.wrap(this)}}};V(bn,"allowedChildren",[bn,hr,ce,we]),V(bn,"order",["cursor","inline","link","underline","strike","italic","bold","script","code"]);var Ou=bn,ur=Ou;var Ez=1,Rt=class extends ua{constructor(){super(...arguments);V(this,"cache",{})}delta(){return this.cache.delta==null&&(this.cache.delta=Hu(this)),this.cache.delta}deleteAt(t,r){super.deleteAt(t,r),this.cache={}}formatAt(t,r,n,a){r<=0||(this.scroll.query(n,X.BLOCK)?t+r===this.length()&&this.format(n,a):super.formatAt(t,Math.min(r,this.length()-t-1),n,a),this.cache={})}insertAt(t,r,n){if(n!=null){super.insertAt(t,r,n),this.cache={};return}if(r.length===0)return;let a=r.split(`
2484
+ `),s=a.shift();s.length>0&&(t<this.length()-1||this.children.tail==null?super.insertAt(Math.min(t,this.length()-1),s):this.children.tail.insertAt(this.children.tail.length(),s),this.cache={});let l=this;a.reduce((d,h)=>(l=l.split(d,!0),l.insertAt(0,h),h.length),t+s.length)}insertBefore(t,r){let{head:n}=this.children;super.insertBefore(t,r),n instanceof hr&&n.remove(),this.cache={}}length(){return this.cache.length==null&&(this.cache.length=super.length()+Ez),this.cache.length}moveChildren(t,r){super.moveChildren(t,r),this.cache={}}optimize(t){super.optimize(t),this.cache={}}path(t){return super.path(t,!0)}removeChild(t){super.removeChild(t),this.cache={}}split(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(r&&(t===0||t>=this.length()-Ez)){let a=this.clone();return t===0?(this.parent.insertBefore(a,this),this):(this.parent.insertBefore(a,this.next),a)}let n=super.split(t,r);return this.cache={},n}};Rt.blotName="block";Rt.tagName="P";Rt.defaultChild=hr;Rt.allowedChildren=[hr,ur,ce,we];var Oe=class extends ce{attach(){super.attach(),this.attributes=new wl(this.domNode)}delta(){return new Pu.default().insert(this.value(),{...this.formats(),...this.attributes.values()})}format(o,t){let r=this.scroll.query(o,X.BLOCK_ATTRIBUTE);r!=null&&this.attributes.attribute(r,t)}formatAt(o,t,r,n){this.format(r,n)}insertAt(o,t,r){if(r!=null){super.insertAt(o,t,r);return}let n=t.split(`
2482
2485
  `),a=n.pop(),s=n.map(d=>{let h=this.scroll.create(Rt.blotName);return h.insertAt(0,d),h}),l=this.split(o);s.forEach(d=>{this.parent.insertBefore(d,l)}),a&&this.parent.insertBefore(this.scroll.create("text",a),l)}};Oe.scope=X.BLOCK_BLOT;function Hu(i){let o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return i.descendants(Ae).reduce((t,r)=>r.length()===0?t:t.insert(r.value(),Vr(r,{},o)),new Pu.default).insert(`
2483
- `,Vr(i))}function Vr(i){let o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;return i==null||("formats"in i&&typeof i.formats=="function"&&(o={...o,...i.formats()},t&&delete o["code-token"]),i.parent==null||i.parent.statics.blotName==="scroll"||i.parent.statics.scope!==i.statics.scope)?o:Vr(i.parent,o,t)}var zo=class zo extends le{static value(){}constructor(o,t,r){super(o,t),this.selection=r,this.textNode=document.createTextNode(zo.CONTENTS),this.domNode.appendChild(this.textNode),this.savedLength=0}detach(){this.parent!=null&&this.parent.removeChild(this)}format(o,t){if(this.savedLength!==0){super.format(o,t);return}let r=this,n=0;for(;r!=null&&r.statics.scope!==X.BLOCK_BLOT;)n+=r.offset(r.parent),r=r.parent;r!=null&&(this.savedLength=zo.CONTENTS.length,r.optimize(),r.formatAt(n,zo.CONTENTS.length,o,t),this.savedLength=0)}index(o,t){return o===this.textNode?0:super.index(o,t)}length(){return this.savedLength}position(){return[this.textNode,this.textNode.data.length]}remove(){super.remove(),this.parent=null}restore(){if(this.selection.composing||this.parent==null)return null;let o=this.selection.getNativeRange();for(;this.domNode.lastChild!=null&&this.domNode.lastChild!==this.textNode;)this.domNode.parentNode.insertBefore(this.domNode.lastChild,this.domNode);let t=this.prev instanceof we?this.prev:null,r=t?t.length():0,n=this.next instanceof we?this.next:null,a=n?n.text:"",{textNode:s}=this,l=s.data.split(zo.CONTENTS).join("");s.data=zo.CONTENTS;let d;if(t)d=t,(l||n)&&(t.insertAt(t.length(),l+a),n&&n.remove());else if(n)d=n,n.insertAt(0,l);else{let h=document.createTextNode(l);d=this.scroll.create(h),this.parent.insertBefore(d,this)}if(this.remove(),o){let h=(b,g)=>t&&b===t.domNode?g:b===s?r+g-1:n&&b===n.domNode?r+l.length+g:null,m=h(o.start.node,o.start.offset),f=h(o.end.node,o.end.offset);if(m!==null&&f!==null)return{startNode:d.domNode,startOffset:m,endNode:d.domNode,endOffset:f}}return null}update(o,t){if(o.some(r=>r.type==="characterData"&&r.target===this.textNode)){let r=this.restore();r&&(t.range=r)}}optimize(o){super.optimize(o);let{parent:t}=this;for(;t;){if(t.domNode.tagName==="A"){this.savedLength=zo.CONTENTS.length,t.isolate(this.offset(t),this.length()).unwrap(),this.savedLength=0;break}t=t.parent}}value(){return""}};V(zo,"blotName","cursor"),V(zo,"className","ql-cursor"),V(zo,"tagName","span"),V(zo,"CONTENTS","\uFEFF");var Fu=zo,zi=Fu;var Vu=ar(Az(),1);var El=new WeakMap;var Uu=["error","warn","log","info"],ju="warn";function $z(i){if(ju&&Uu.indexOf(i)<=Uu.indexOf(ju)){for(var o=arguments.length,t=new Array(o>1?o-1:0),r=1;r<o;r++)t[r-1]=arguments[r];console[i](...t)}}function Gu(i){return Uu.reduce((o,t)=>(o[t]=$z.bind(console,t,i),o),{})}Gu.level=i=>{ju=i};$z.level=Gu.level;var oo=Gu;var Wu=oo("quill:events"),y3=["selectionchange","mousedown","mouseup","click"];y3.forEach(i=>{document.addEventListener(i,function(){for(var o=arguments.length,t=new Array(o),r=0;r<o;r++)t[r]=arguments[r];Array.from(document.querySelectorAll(".ql-container")).forEach(n=>{let a=El.get(n);a&&a.emitter&&a.emitter.handleDOM(...t)})})});var Tl=class extends Vu.default{constructor(){super(),this.domListeners={},this.on("error",Wu.error)}emit(){for(var o=arguments.length,t=new Array(o),r=0;r<o;r++)t[r]=arguments[r];return Wu.log.call(Wu,...t),super.emit(...t)}handleDOM(o){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];(this.domListeners[o.type]||[]).forEach(a=>{let{node:s,handler:l}=a;(o.target===s||s.contains(o.target))&&l(o,...r)})}listenDOM(o,t,r){this.domListeners[o]||(this.domListeners[o]=[]),this.domListeners[o].push({node:t,handler:r})}};V(Tl,"events",{EDITOR_CHANGE:"editor-change",SCROLL_BEFORE_UPDATE:"scroll-before-update",SCROLL_BLOT_MOUNT:"scroll-blot-mount",SCROLL_BLOT_UNMOUNT:"scroll-blot-unmount",SCROLL_OPTIMIZE:"scroll-optimize",SCROLL_UPDATE:"scroll-update",SCROLL_EMBED_UPDATE:"scroll-embed-update",SELECTION_CHANGE:"selection-change",TEXT_CHANGE:"text-change",COMPOSITION_BEFORE_START:"composition-before-start",COMPOSITION_START:"composition-start",COMPOSITION_BEFORE_END:"composition-before-end",COMPOSITION_END:"composition-end"}),V(Tl,"sources",{API:"api",SILENT:"silent",USER:"user"});var Q=Tl;var Ku=oo("quill:selection"),Er=class{constructor(o){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;this.index=o,this.length=t}},Xu=class{constructor(o,t){this.emitter=t,this.scroll=o,this.composing=!1,this.mouseDown=!1,this.root=this.scroll.domNode,this.cursor=this.scroll.create("cursor",this),this.savedRange=new Er(0,0),this.lastRange=this.savedRange,this.lastNative=null,this.handleComposition(),this.handleDragging(),this.emitter.listenDOM("selectionchange",document,()=>{!this.mouseDown&&!this.composing&&setTimeout(this.update.bind(this,Q.sources.USER),1)}),this.emitter.on(Q.events.SCROLL_BEFORE_UPDATE,()=>{if(!this.hasFocus())return;let r=this.getNativeRange();r!=null&&r.start.node!==this.cursor.textNode&&this.emitter.once(Q.events.SCROLL_UPDATE,(n,a)=>{try{this.root.contains(r.start.node)&&this.root.contains(r.end.node)&&this.setNativeRange(r.start.node,r.start.offset,r.end.node,r.end.offset);let s=a.some(l=>l.type==="characterData"||l.type==="childList"||l.type==="attributes"&&l.target===this.root);this.update(s?Q.sources.SILENT:n)}catch{}})}),this.emitter.on(Q.events.SCROLL_OPTIMIZE,(r,n)=>{if(n.range){let{startNode:a,startOffset:s,endNode:l,endOffset:d}=n.range;this.setNativeRange(a,s,l,d),this.update(Q.sources.SILENT)}}),this.update(Q.sources.SILENT)}handleComposition(){this.emitter.on(Q.events.COMPOSITION_BEFORE_START,()=>{this.composing=!0}),this.emitter.on(Q.events.COMPOSITION_END,()=>{if(this.composing=!1,this.cursor.parent){let o=this.cursor.restore();if(!o)return;setTimeout(()=>{this.setNativeRange(o.startNode,o.startOffset,o.endNode,o.endOffset)},1)}})}handleDragging(){this.emitter.listenDOM("mousedown",document.body,()=>{this.mouseDown=!0}),this.emitter.listenDOM("mouseup",document.body,()=>{this.mouseDown=!1,this.update(Q.sources.USER)})}focus(){this.hasFocus()||(this.root.focus({preventScroll:!0}),this.setRange(this.savedRange))}format(o,t){this.scroll.update();let r=this.getNativeRange();if(!(r==null||!r.native.collapsed||this.scroll.query(o,X.BLOCK))){if(r.start.node!==this.cursor.textNode){let n=this.scroll.find(r.start.node,!1);if(n==null)return;if(n instanceof Ae){let a=n.split(r.start.offset);n.parent.insertBefore(this.cursor,a)}else n.insertBefore(this.cursor,r.start.node);this.cursor.attach()}this.cursor.format(o,t),this.scroll.optimize(),this.setNativeRange(this.cursor.textNode,this.cursor.textNode.data.length),this.update()}}getBounds(o){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=this.scroll.length();o=Math.min(o,r-1),t=Math.min(o+t,r-1)-o;let n,[a,s]=this.scroll.leaf(o);if(a==null)return null;if(t>0&&s===a.length()){let[m]=this.scroll.leaf(o+1);if(m){let[f]=this.scroll.line(o),[b]=this.scroll.line(o+1);f===b&&(a=m,s=0)}}[n,s]=a.position(s,!0);let l=document.createRange();if(t>0)return l.setStart(n,s),[a,s]=this.scroll.leaf(o+t),a==null?null:([n,s]=a.position(s,!0),l.setEnd(n,s),l.getBoundingClientRect());let d="left",h;if(n instanceof Text){if(!n.data.length)return null;s<n.data.length?(l.setStart(n,s),l.setEnd(n,s+1)):(l.setStart(n,s-1),l.setEnd(n,s),d="right"),h=l.getBoundingClientRect()}else{if(!(a.domNode instanceof Element))return null;h=a.domNode.getBoundingClientRect(),s>0&&(d="right")}return{bottom:h.top+h.height,height:h.height,left:h[d],right:h[d],top:h.top,width:0}}getNativeRange(){let o=document.getSelection();if(o==null||o.rangeCount<=0)return null;let t=o.getRangeAt(0);if(t==null)return null;let r=this.normalizeNative(t);return Ku.info("getNativeRange",r),r}getRange(){let o=this.scroll.domNode;if("isConnected"in o&&!o.isConnected)return[null,null];let t=this.getNativeRange();return t==null?[null,null]:[this.normalizedToRange(t),t]}hasFocus(){return document.activeElement===this.root||document.activeElement!=null&&Yu(this.root,document.activeElement)}normalizedToRange(o){let t=[[o.start.node,o.start.offset]];o.native.collapsed||t.push([o.end.node,o.end.offset]);let r=t.map(s=>{let[l,d]=s,h=this.scroll.find(l,!0),m=h.offset(this.scroll);return d===0?m:h instanceof Ae?m+h.index(l,d):m+h.length()}),n=Math.min(Math.max(...r),this.scroll.length()-1),a=Math.min(n,...r);return new Er(a,n-a)}normalizeNative(o){if(!Yu(this.root,o.startContainer)||!o.collapsed&&!Yu(this.root,o.endContainer))return null;let t={start:{node:o.startContainer,offset:o.startOffset},end:{node:o.endContainer,offset:o.endOffset},native:o};return[t.start,t.end].forEach(r=>{let{node:n,offset:a}=r;for(;!(n instanceof Text)&&n.childNodes.length>0;)if(n.childNodes.length>a)n=n.childNodes[a],a=0;else if(n.childNodes.length===a)n=n.lastChild,n instanceof Text?a=n.data.length:n.childNodes.length>0?a=n.childNodes.length:a=n.childNodes.length+1;else break;r.node=n,r.offset=a}),t}rangeToNative(o){let t=this.scroll.length(),r=(n,a)=>{n=Math.min(t-1,n);let[s,l]=this.scroll.leaf(n);return s?s.position(l,a):[null,-1]};return[...r(o.index,!1),...r(o.index+o.length,!0)]}setNativeRange(o,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:o,n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:t,a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1;if(Ku.info("setNativeRange",o,t,r,n),o!=null&&(this.root.parentNode==null||o.parentNode==null||r.parentNode==null))return;let s=document.getSelection();if(s!=null)if(o!=null){this.hasFocus()||this.root.focus({preventScroll:!0});let{native:l}=this.getNativeRange()||{};if(l==null||a||o!==l.startContainer||t!==l.startOffset||r!==l.endContainer||n!==l.endOffset){o instanceof Element&&o.tagName==="BR"&&(t=Array.from(o.parentNode.childNodes).indexOf(o),o=o.parentNode),r instanceof Element&&r.tagName==="BR"&&(n=Array.from(r.parentNode.childNodes).indexOf(r),r=r.parentNode);let d=document.createRange();d.setStart(o,t),d.setEnd(r,n),s.removeAllRanges(),s.addRange(d)}}else s.removeAllRanges(),this.root.blur()}setRange(o){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Q.sources.API;if(typeof t=="string"&&(r=t,t=!1),Ku.info("setRange",o),o!=null){let n=this.rangeToNative(o);this.setNativeRange(...n,t)}else this.setNativeRange(null);this.update(r)}update(){let o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Q.sources.USER,t=this.lastRange,[r,n]=this.getRange();if(this.lastRange=r,this.lastNative=n,this.lastRange!=null&&(this.savedRange=this.lastRange),!ha(t,this.lastRange)){if(!this.composing&&n!=null&&n.native.collapsed&&n.start.node!==this.cursor.textNode){let s=this.cursor.restore();s&&this.setNativeRange(s.startNode,s.startOffset,s.endNode,s.endOffset)}let a=[Q.events.SELECTION_CHANGE,gn(this.lastRange),gn(t),o];this.emitter.emit(Q.events.EDITOR_CHANGE,...a),o!==Q.sources.SILENT&&this.emitter.emit(...a)}}};function Yu(i,o){try{o.parentNode}catch{return!1}return i.contains(o)}var Lz=Xu;var z3=/^[ -~]*$/,Ju=class{constructor(o){this.scroll=o,this.delta=this.getDelta()}applyDelta(o){this.scroll.update();let t=this.scroll.length();this.scroll.batchStart();let r=qz(o),n=new ce.default;return _3(r.ops.slice()).reduce((s,l)=>{let d=ce.Op.length(l),h=l.attributes||{},m=!1,f=!1;if(l.insert!=null){if(n.retain(d),typeof l.insert=="string"){let v=l.insert;f=!v.endsWith(`
2484
- `)&&(t<=s||!!this.scroll.descendant(Oe,s)[0]),this.scroll.insertAt(s,v);let[x,k]=this.scroll.line(s),_=Hr({},Vr(x));if(x instanceof Rt){let[O]=x.descendant(Ae,k);O&&(_=Hr(_,Vr(O)))}h=ce.AttributeMap.diff(_,h)||{}}else if(typeof l.insert=="object"){let v=Object.keys(l.insert)[0];if(v==null)return s;let x=this.scroll.query(v,X.INLINE)!=null;if(x)(t<=s||this.scroll.descendant(Oe,s)[0])&&(f=!0);else if(s>0){let[k,_]=this.scroll.descendant(Ae,s-1);k instanceof we?k.value()[_]!==`
2485
- `&&(m=!0):k instanceof le&&k.statics.scope===X.INLINE_BLOT&&(m=!0)}if(this.scroll.insertAt(s,v,l.insert[v]),x){let[k]=this.scroll.descendant(Ae,s);if(k){let _=Hr({},Vr(k));h=ce.AttributeMap.diff(_,h)||{}}}}t+=d}else if(n.push(l),l.retain!==null&&typeof l.retain=="object"){let v=Object.keys(l.retain)[0];if(v==null)return s;this.scroll.updateEmbedAt(s,v,l.retain[v])}Object.keys(h).forEach(v=>{this.scroll.formatAt(s,d,v,h[v])});let b=m?1:0,g=f?1:0;return t+=b+g,n.retain(b),n.delete(g),s+d+b+g},0),n.reduce((s,l)=>typeof l.delete=="number"?(this.scroll.deleteAt(s,l.delete),s):s+ce.Op.length(l),0),this.scroll.batchEnd(),this.scroll.optimize(),this.update(r)}deleteText(o,t){return this.scroll.deleteAt(o,t),this.update(new ce.default().retain(o).delete(t))}formatLine(o,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.scroll.update(),Object.keys(r).forEach(a=>{this.scroll.lines(o,Math.max(t,1)).forEach(s=>{s.format(a,r[a])})}),this.scroll.optimize();let n=new ce.default().retain(o).retain(t,gn(r));return this.update(n)}formatText(o,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};Object.keys(r).forEach(a=>{this.scroll.formatAt(o,t,a,r[a])});let n=new ce.default().retain(o).retain(t,gn(r));return this.update(n)}getContents(o,t){return this.delta.slice(o,o+t)}getDelta(){return this.scroll.lines().reduce((o,t)=>o.concat(t.delta()),new ce.default)}getFormat(o){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=[],n=[];t===0?this.scroll.path(o).forEach(l=>{let[d]=l;d instanceof Rt?r.push(d):d instanceof Ae&&n.push(d)}):(r=this.scroll.lines(o,t),n=this.scroll.descendants(Ae,o,t));let[a,s]=[r,n].map(l=>{let d=l.shift();if(d==null)return{};let h=Vr(d);for(;Object.keys(h).length>0;){let m=l.shift();if(m==null)return h;h=w3(Vr(m),h)}return h});return{...a,...s}}getHTML(o,t){let[r,n]=this.scroll.line(o);if(r){let a=r.length();return r.length()>=n+t&&!(n===0&&t===a)?Al(r,n,t,!0):Al(this.scroll,o,t,!0)}return""}getText(o,t){return this.getContents(o,t).filter(r=>typeof r.insert=="string").map(r=>r.insert).join("")}insertContents(o,t){let r=qz(t),n=new ce.default().retain(o).concat(r);return this.scroll.insertContents(o,r),this.update(n)}insertEmbed(o,t,r){return this.scroll.insertAt(o,t,r),this.update(new ce.default().retain(o).insert({[t]:r}))}insertText(o,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return t=t.replace(/\r\n/g,`
2486
+ `,Vr(i))}function Vr(i){let o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;return i==null||("formats"in i&&typeof i.formats=="function"&&(o={...o,...i.formats()},t&&delete o["code-token"]),i.parent==null||i.parent.statics.blotName==="scroll"||i.parent.statics.scope!==i.statics.scope)?o:Vr(i.parent,o,t)}var zo=class zo extends ce{static value(){}constructor(o,t,r){super(o,t),this.selection=r,this.textNode=document.createTextNode(zo.CONTENTS),this.domNode.appendChild(this.textNode),this.savedLength=0}detach(){this.parent!=null&&this.parent.removeChild(this)}format(o,t){if(this.savedLength!==0){super.format(o,t);return}let r=this,n=0;for(;r!=null&&r.statics.scope!==X.BLOCK_BLOT;)n+=r.offset(r.parent),r=r.parent;r!=null&&(this.savedLength=zo.CONTENTS.length,r.optimize(),r.formatAt(n,zo.CONTENTS.length,o,t),this.savedLength=0)}index(o,t){return o===this.textNode?0:super.index(o,t)}length(){return this.savedLength}position(){return[this.textNode,this.textNode.data.length]}remove(){super.remove(),this.parent=null}restore(){if(this.selection.composing||this.parent==null)return null;let o=this.selection.getNativeRange();for(;this.domNode.lastChild!=null&&this.domNode.lastChild!==this.textNode;)this.domNode.parentNode.insertBefore(this.domNode.lastChild,this.domNode);let t=this.prev instanceof we?this.prev:null,r=t?t.length():0,n=this.next instanceof we?this.next:null,a=n?n.text:"",{textNode:s}=this,l=s.data.split(zo.CONTENTS).join("");s.data=zo.CONTENTS;let d;if(t)d=t,(l||n)&&(t.insertAt(t.length(),l+a),n&&n.remove());else if(n)d=n,n.insertAt(0,l);else{let h=document.createTextNode(l);d=this.scroll.create(h),this.parent.insertBefore(d,this)}if(this.remove(),o){let h=(b,g)=>t&&b===t.domNode?g:b===s?r+g-1:n&&b===n.domNode?r+l.length+g:null,m=h(o.start.node,o.start.offset),f=h(o.end.node,o.end.offset);if(m!==null&&f!==null)return{startNode:d.domNode,startOffset:m,endNode:d.domNode,endOffset:f}}return null}update(o,t){if(o.some(r=>r.type==="characterData"&&r.target===this.textNode)){let r=this.restore();r&&(t.range=r)}}optimize(o){super.optimize(o);let{parent:t}=this;for(;t;){if(t.domNode.tagName==="A"){this.savedLength=zo.CONTENTS.length,t.isolate(this.offset(t),this.length()).unwrap(),this.savedLength=0;break}t=t.parent}}value(){return""}};V(zo,"blotName","cursor"),V(zo,"className","ql-cursor"),V(zo,"tagName","span"),V(zo,"CONTENTS","\uFEFF");var Fu=zo,zi=Fu;var Vu=ar(Az(),1);var El=new WeakMap;var Uu=["error","warn","log","info"],ju="warn";function $z(i){if(ju&&Uu.indexOf(i)<=Uu.indexOf(ju)){for(var o=arguments.length,t=new Array(o>1?o-1:0),r=1;r<o;r++)t[r-1]=arguments[r];console[i](...t)}}function Gu(i){return Uu.reduce((o,t)=>(o[t]=$z.bind(console,t,i),o),{})}Gu.level=i=>{ju=i};$z.level=Gu.level;var oo=Gu;var Wu=oo("quill:events"),y3=["selectionchange","mousedown","mouseup","click"];y3.forEach(i=>{document.addEventListener(i,function(){for(var o=arguments.length,t=new Array(o),r=0;r<o;r++)t[r]=arguments[r];Array.from(document.querySelectorAll(".ql-container")).forEach(n=>{let a=El.get(n);a&&a.emitter&&a.emitter.handleDOM(...t)})})});var Tl=class extends Vu.default{constructor(){super(),this.domListeners={},this.on("error",Wu.error)}emit(){for(var o=arguments.length,t=new Array(o),r=0;r<o;r++)t[r]=arguments[r];return Wu.log.call(Wu,...t),super.emit(...t)}handleDOM(o){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];(this.domListeners[o.type]||[]).forEach(a=>{let{node:s,handler:l}=a;(o.target===s||s.contains(o.target))&&l(o,...r)})}listenDOM(o,t,r){this.domListeners[o]||(this.domListeners[o]=[]),this.domListeners[o].push({node:t,handler:r})}};V(Tl,"events",{EDITOR_CHANGE:"editor-change",SCROLL_BEFORE_UPDATE:"scroll-before-update",SCROLL_BLOT_MOUNT:"scroll-blot-mount",SCROLL_BLOT_UNMOUNT:"scroll-blot-unmount",SCROLL_OPTIMIZE:"scroll-optimize",SCROLL_UPDATE:"scroll-update",SCROLL_EMBED_UPDATE:"scroll-embed-update",SELECTION_CHANGE:"selection-change",TEXT_CHANGE:"text-change",COMPOSITION_BEFORE_START:"composition-before-start",COMPOSITION_START:"composition-start",COMPOSITION_BEFORE_END:"composition-before-end",COMPOSITION_END:"composition-end"}),V(Tl,"sources",{API:"api",SILENT:"silent",USER:"user"});var Q=Tl;var Ku=oo("quill:selection"),Er=class{constructor(o){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;this.index=o,this.length=t}},Xu=class{constructor(o,t){this.emitter=t,this.scroll=o,this.composing=!1,this.mouseDown=!1,this.root=this.scroll.domNode,this.cursor=this.scroll.create("cursor",this),this.savedRange=new Er(0,0),this.lastRange=this.savedRange,this.lastNative=null,this.handleComposition(),this.handleDragging(),this.emitter.listenDOM("selectionchange",document,()=>{!this.mouseDown&&!this.composing&&setTimeout(this.update.bind(this,Q.sources.USER),1)}),this.emitter.on(Q.events.SCROLL_BEFORE_UPDATE,()=>{if(!this.hasFocus())return;let r=this.getNativeRange();r!=null&&r.start.node!==this.cursor.textNode&&this.emitter.once(Q.events.SCROLL_UPDATE,(n,a)=>{try{this.root.contains(r.start.node)&&this.root.contains(r.end.node)&&this.setNativeRange(r.start.node,r.start.offset,r.end.node,r.end.offset);let s=a.some(l=>l.type==="characterData"||l.type==="childList"||l.type==="attributes"&&l.target===this.root);this.update(s?Q.sources.SILENT:n)}catch{}})}),this.emitter.on(Q.events.SCROLL_OPTIMIZE,(r,n)=>{if(n.range){let{startNode:a,startOffset:s,endNode:l,endOffset:d}=n.range;this.setNativeRange(a,s,l,d),this.update(Q.sources.SILENT)}}),this.update(Q.sources.SILENT)}handleComposition(){this.emitter.on(Q.events.COMPOSITION_BEFORE_START,()=>{this.composing=!0}),this.emitter.on(Q.events.COMPOSITION_END,()=>{if(this.composing=!1,this.cursor.parent){let o=this.cursor.restore();if(!o)return;setTimeout(()=>{this.setNativeRange(o.startNode,o.startOffset,o.endNode,o.endOffset)},1)}})}handleDragging(){this.emitter.listenDOM("mousedown",document.body,()=>{this.mouseDown=!0}),this.emitter.listenDOM("mouseup",document.body,()=>{this.mouseDown=!1,this.update(Q.sources.USER)})}focus(){this.hasFocus()||(this.root.focus({preventScroll:!0}),this.setRange(this.savedRange))}format(o,t){this.scroll.update();let r=this.getNativeRange();if(!(r==null||!r.native.collapsed||this.scroll.query(o,X.BLOCK))){if(r.start.node!==this.cursor.textNode){let n=this.scroll.find(r.start.node,!1);if(n==null)return;if(n instanceof Ae){let a=n.split(r.start.offset);n.parent.insertBefore(this.cursor,a)}else n.insertBefore(this.cursor,r.start.node);this.cursor.attach()}this.cursor.format(o,t),this.scroll.optimize(),this.setNativeRange(this.cursor.textNode,this.cursor.textNode.data.length),this.update()}}getBounds(o){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=this.scroll.length();o=Math.min(o,r-1),t=Math.min(o+t,r-1)-o;let n,[a,s]=this.scroll.leaf(o);if(a==null)return null;if(t>0&&s===a.length()){let[m]=this.scroll.leaf(o+1);if(m){let[f]=this.scroll.line(o),[b]=this.scroll.line(o+1);f===b&&(a=m,s=0)}}[n,s]=a.position(s,!0);let l=document.createRange();if(t>0)return l.setStart(n,s),[a,s]=this.scroll.leaf(o+t),a==null?null:([n,s]=a.position(s,!0),l.setEnd(n,s),l.getBoundingClientRect());let d="left",h;if(n instanceof Text){if(!n.data.length)return null;s<n.data.length?(l.setStart(n,s),l.setEnd(n,s+1)):(l.setStart(n,s-1),l.setEnd(n,s),d="right"),h=l.getBoundingClientRect()}else{if(!(a.domNode instanceof Element))return null;h=a.domNode.getBoundingClientRect(),s>0&&(d="right")}return{bottom:h.top+h.height,height:h.height,left:h[d],right:h[d],top:h.top,width:0}}getNativeRange(){let o=document.getSelection();if(o==null||o.rangeCount<=0)return null;let t=o.getRangeAt(0);if(t==null)return null;let r=this.normalizeNative(t);return Ku.info("getNativeRange",r),r}getRange(){let o=this.scroll.domNode;if("isConnected"in o&&!o.isConnected)return[null,null];let t=this.getNativeRange();return t==null?[null,null]:[this.normalizedToRange(t),t]}hasFocus(){return document.activeElement===this.root||document.activeElement!=null&&Yu(this.root,document.activeElement)}normalizedToRange(o){let t=[[o.start.node,o.start.offset]];o.native.collapsed||t.push([o.end.node,o.end.offset]);let r=t.map(s=>{let[l,d]=s,h=this.scroll.find(l,!0),m=h.offset(this.scroll);return d===0?m:h instanceof Ae?m+h.index(l,d):m+h.length()}),n=Math.min(Math.max(...r),this.scroll.length()-1),a=Math.min(n,...r);return new Er(a,n-a)}normalizeNative(o){if(!Yu(this.root,o.startContainer)||!o.collapsed&&!Yu(this.root,o.endContainer))return null;let t={start:{node:o.startContainer,offset:o.startOffset},end:{node:o.endContainer,offset:o.endOffset},native:o};return[t.start,t.end].forEach(r=>{let{node:n,offset:a}=r;for(;!(n instanceof Text)&&n.childNodes.length>0;)if(n.childNodes.length>a)n=n.childNodes[a],a=0;else if(n.childNodes.length===a)n=n.lastChild,n instanceof Text?a=n.data.length:n.childNodes.length>0?a=n.childNodes.length:a=n.childNodes.length+1;else break;r.node=n,r.offset=a}),t}rangeToNative(o){let t=this.scroll.length(),r=(n,a)=>{n=Math.min(t-1,n);let[s,l]=this.scroll.leaf(n);return s?s.position(l,a):[null,-1]};return[...r(o.index,!1),...r(o.index+o.length,!0)]}setNativeRange(o,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:o,n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:t,a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1;if(Ku.info("setNativeRange",o,t,r,n),o!=null&&(this.root.parentNode==null||o.parentNode==null||r.parentNode==null))return;let s=document.getSelection();if(s!=null)if(o!=null){this.hasFocus()||this.root.focus({preventScroll:!0});let{native:l}=this.getNativeRange()||{};if(l==null||a||o!==l.startContainer||t!==l.startOffset||r!==l.endContainer||n!==l.endOffset){o instanceof Element&&o.tagName==="BR"&&(t=Array.from(o.parentNode.childNodes).indexOf(o),o=o.parentNode),r instanceof Element&&r.tagName==="BR"&&(n=Array.from(r.parentNode.childNodes).indexOf(r),r=r.parentNode);let d=document.createRange();d.setStart(o,t),d.setEnd(r,n),s.removeAllRanges(),s.addRange(d)}}else s.removeAllRanges(),this.root.blur()}setRange(o){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Q.sources.API;if(typeof t=="string"&&(r=t,t=!1),Ku.info("setRange",o),o!=null){let n=this.rangeToNative(o);this.setNativeRange(...n,t)}else this.setNativeRange(null);this.update(r)}update(){let o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Q.sources.USER,t=this.lastRange,[r,n]=this.getRange();if(this.lastRange=r,this.lastNative=n,this.lastRange!=null&&(this.savedRange=this.lastRange),!ha(t,this.lastRange)){if(!this.composing&&n!=null&&n.native.collapsed&&n.start.node!==this.cursor.textNode){let s=this.cursor.restore();s&&this.setNativeRange(s.startNode,s.startOffset,s.endNode,s.endOffset)}let a=[Q.events.SELECTION_CHANGE,gn(this.lastRange),gn(t),o];this.emitter.emit(Q.events.EDITOR_CHANGE,...a),o!==Q.sources.SILENT&&this.emitter.emit(...a)}}};function Yu(i,o){try{o.parentNode}catch{return!1}return i.contains(o)}var Lz=Xu;var z3=/^[ -~]*$/,Ju=class{constructor(o){this.scroll=o,this.delta=this.getDelta()}applyDelta(o){this.scroll.update();let t=this.scroll.length();this.scroll.batchStart();let r=qz(o),n=new de.default;return _3(r.ops.slice()).reduce((s,l)=>{let d=de.Op.length(l),h=l.attributes||{},m=!1,f=!1;if(l.insert!=null){if(n.retain(d),typeof l.insert=="string"){let v=l.insert;f=!v.endsWith(`
2487
+ `)&&(t<=s||!!this.scroll.descendant(Oe,s)[0]),this.scroll.insertAt(s,v);let[x,k]=this.scroll.line(s),_=Hr({},Vr(x));if(x instanceof Rt){let[O]=x.descendant(Ae,k);O&&(_=Hr(_,Vr(O)))}h=de.AttributeMap.diff(_,h)||{}}else if(typeof l.insert=="object"){let v=Object.keys(l.insert)[0];if(v==null)return s;let x=this.scroll.query(v,X.INLINE)!=null;if(x)(t<=s||this.scroll.descendant(Oe,s)[0])&&(f=!0);else if(s>0){let[k,_]=this.scroll.descendant(Ae,s-1);k instanceof we?k.value()[_]!==`
2488
+ `&&(m=!0):k instanceof ce&&k.statics.scope===X.INLINE_BLOT&&(m=!0)}if(this.scroll.insertAt(s,v,l.insert[v]),x){let[k]=this.scroll.descendant(Ae,s);if(k){let _=Hr({},Vr(k));h=de.AttributeMap.diff(_,h)||{}}}}t+=d}else if(n.push(l),l.retain!==null&&typeof l.retain=="object"){let v=Object.keys(l.retain)[0];if(v==null)return s;this.scroll.updateEmbedAt(s,v,l.retain[v])}Object.keys(h).forEach(v=>{this.scroll.formatAt(s,d,v,h[v])});let b=m?1:0,g=f?1:0;return t+=b+g,n.retain(b),n.delete(g),s+d+b+g},0),n.reduce((s,l)=>typeof l.delete=="number"?(this.scroll.deleteAt(s,l.delete),s):s+de.Op.length(l),0),this.scroll.batchEnd(),this.scroll.optimize(),this.update(r)}deleteText(o,t){return this.scroll.deleteAt(o,t),this.update(new de.default().retain(o).delete(t))}formatLine(o,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.scroll.update(),Object.keys(r).forEach(a=>{this.scroll.lines(o,Math.max(t,1)).forEach(s=>{s.format(a,r[a])})}),this.scroll.optimize();let n=new de.default().retain(o).retain(t,gn(r));return this.update(n)}formatText(o,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};Object.keys(r).forEach(a=>{this.scroll.formatAt(o,t,a,r[a])});let n=new de.default().retain(o).retain(t,gn(r));return this.update(n)}getContents(o,t){return this.delta.slice(o,o+t)}getDelta(){return this.scroll.lines().reduce((o,t)=>o.concat(t.delta()),new de.default)}getFormat(o){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=[],n=[];t===0?this.scroll.path(o).forEach(l=>{let[d]=l;d instanceof Rt?r.push(d):d instanceof Ae&&n.push(d)}):(r=this.scroll.lines(o,t),n=this.scroll.descendants(Ae,o,t));let[a,s]=[r,n].map(l=>{let d=l.shift();if(d==null)return{};let h=Vr(d);for(;Object.keys(h).length>0;){let m=l.shift();if(m==null)return h;h=w3(Vr(m),h)}return h});return{...a,...s}}getHTML(o,t){let[r,n]=this.scroll.line(o);if(r){let a=r.length();return r.length()>=n+t&&!(n===0&&t===a)?Al(r,n,t,!0):Al(this.scroll,o,t,!0)}return""}getText(o,t){return this.getContents(o,t).filter(r=>typeof r.insert=="string").map(r=>r.insert).join("")}insertContents(o,t){let r=qz(t),n=new de.default().retain(o).concat(r);return this.scroll.insertContents(o,r),this.update(n)}insertEmbed(o,t,r){return this.scroll.insertAt(o,t,r),this.update(new de.default().retain(o).insert({[t]:r}))}insertText(o,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return t=t.replace(/\r\n/g,`
2486
2489
  `).replace(/\r/g,`
2487
- `),this.scroll.insertAt(o,t),Object.keys(r).forEach(n=>{this.scroll.formatAt(o,t.length,n,r[n])}),this.update(new ce.default().retain(o).insert(t,gn(r)))}isBlank(){if(this.scroll.children.length===0)return!0;if(this.scroll.children.length>1)return!1;let o=this.scroll.children.head;if(o?.statics.blotName!==Rt.blotName)return!1;let t=o;return t.children.length>1?!1:t.children.head instanceof hr}removeFormat(o,t){let r=this.getText(o,t),[n,a]=this.scroll.line(o+t),s=0,l=new ce.default;n!=null&&(s=n.length()-a,l=n.delta().slice(a,a+s-1).insert(`
2488
- `));let h=this.getContents(o,t+s).diff(new ce.default().insert(r).concat(l)),m=new ce.default().retain(o).concat(h);return this.applyDelta(m)}update(o){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0,n=this.delta;if(t.length===1&&t[0].type==="characterData"&&t[0].target.data.match(z3)&&this.scroll.find(t[0].target)){let a=this.scroll.find(t[0].target),s=Vr(a),l=a.offset(this.scroll),d=t[0].oldValue.replace(zi.CONTENTS,""),h=new ce.default().insert(d),m=new ce.default().insert(a.value()),f=r&&{oldRange:Mz(r.oldRange,-l),newRange:Mz(r.newRange,-l)};o=new ce.default().retain(l).concat(h.diff(m,f)).reduce((g,v)=>v.insert?g.insert(v.insert,s):g.push(v),new ce.default),this.delta=n.compose(o)}else this.delta=this.getDelta(),(!o||!ha(n.compose(o),this.delta))&&(o=n.diff(this.delta,r));return o}};function gs(i,o,t){if(i.length===0){let[g]=Qu(t.pop());return o<=0?`</li></${g}>`:`</li></${g}>${gs([],o-1,t)}`}let[{child:r,offset:n,length:a,indent:s,type:l},...d]=i,[h,m]=Qu(l);if(s>o)return t.push(l),s===o+1?`<${h}><li${m}>${Al(r,n,a)}${gs(d,s,t)}`:`<${h}><li>${gs(i,o+1,t)}`;let f=t[t.length-1];if(s===o&&l===f)return`</li><li${m}>${Al(r,n,a)}${gs(d,s,t)}`;let[b]=Qu(t.pop());return`</li></${b}>${gs(i,o-1,t)}`}function Al(i,o,t){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if("html"in i&&typeof i.html=="function")return i.html(o,t);if(i instanceof we)return ma(i.value().slice(o,o+t)).replaceAll(" ","&nbsp;");if(i instanceof Fr){if(i.statics.blotName==="list-container"){let h=[];return i.children.forEachAt(o,t,(m,f,b)=>{let g="formats"in m&&typeof m.formats=="function"?m.formats():{};h.push({child:m,offset:f,length:b,indent:g.indent||0,type:g.list})}),gs(h,-1,[])}let n=[];if(i.children.forEachAt(o,t,(h,m,f)=>{n.push(Al(h,m,f))}),r||i.statics.blotName==="list")return n.join("");let{outerHTML:a,innerHTML:s}=i.domNode,[l,d]=a.split(`>${s}<`);return l==="<table"?`<table style="border: 1px solid #000;">${n.join("")}<${d}`:`${l}>${n.join("")}<${d}`}return i.domNode instanceof Element?i.domNode.outerHTML:""}function w3(i,o){return Object.keys(o).reduce((t,r)=>{if(i[r]==null)return t;let n=o[r];return n===i[r]?t[r]=n:Array.isArray(n)?n.indexOf(i[r])<0?t[r]=n.concat([i[r]]):t[r]=n:t[r]=[n,i[r]],t},{})}function Qu(i){let o=i==="ordered"?"ol":"ul";switch(i){case"checked":return[o,' data-list="checked"'];case"unchecked":return[o,' data-list="unchecked"'];default:return[o,""]}}function qz(i){return i.reduce((o,t)=>{if(typeof t.insert=="string"){let r=t.insert.replace(/\r\n/g,`
2490
+ `),this.scroll.insertAt(o,t),Object.keys(r).forEach(n=>{this.scroll.formatAt(o,t.length,n,r[n])}),this.update(new de.default().retain(o).insert(t,gn(r)))}isBlank(){if(this.scroll.children.length===0)return!0;if(this.scroll.children.length>1)return!1;let o=this.scroll.children.head;if(o?.statics.blotName!==Rt.blotName)return!1;let t=o;return t.children.length>1?!1:t.children.head instanceof hr}removeFormat(o,t){let r=this.getText(o,t),[n,a]=this.scroll.line(o+t),s=0,l=new de.default;n!=null&&(s=n.length()-a,l=n.delta().slice(a,a+s-1).insert(`
2491
+ `));let h=this.getContents(o,t+s).diff(new de.default().insert(r).concat(l)),m=new de.default().retain(o).concat(h);return this.applyDelta(m)}update(o){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0,n=this.delta;if(t.length===1&&t[0].type==="characterData"&&t[0].target.data.match(z3)&&this.scroll.find(t[0].target)){let a=this.scroll.find(t[0].target),s=Vr(a),l=a.offset(this.scroll),d=t[0].oldValue.replace(zi.CONTENTS,""),h=new de.default().insert(d),m=new de.default().insert(a.value()),f=r&&{oldRange:Mz(r.oldRange,-l),newRange:Mz(r.newRange,-l)};o=new de.default().retain(l).concat(h.diff(m,f)).reduce((g,v)=>v.insert?g.insert(v.insert,s):g.push(v),new de.default),this.delta=n.compose(o)}else this.delta=this.getDelta(),(!o||!ha(n.compose(o),this.delta))&&(o=n.diff(this.delta,r));return o}};function gs(i,o,t){if(i.length===0){let[g]=Qu(t.pop());return o<=0?`</li></${g}>`:`</li></${g}>${gs([],o-1,t)}`}let[{child:r,offset:n,length:a,indent:s,type:l},...d]=i,[h,m]=Qu(l);if(s>o)return t.push(l),s===o+1?`<${h}><li${m}>${Al(r,n,a)}${gs(d,s,t)}`:`<${h}><li>${gs(i,o+1,t)}`;let f=t[t.length-1];if(s===o&&l===f)return`</li><li${m}>${Al(r,n,a)}${gs(d,s,t)}`;let[b]=Qu(t.pop());return`</li></${b}>${gs(i,o-1,t)}`}function Al(i,o,t){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if("html"in i&&typeof i.html=="function")return i.html(o,t);if(i instanceof we)return ma(i.value().slice(o,o+t)).replaceAll(" ","&nbsp;");if(i instanceof Fr){if(i.statics.blotName==="list-container"){let h=[];return i.children.forEachAt(o,t,(m,f,b)=>{let g="formats"in m&&typeof m.formats=="function"?m.formats():{};h.push({child:m,offset:f,length:b,indent:g.indent||0,type:g.list})}),gs(h,-1,[])}let n=[];if(i.children.forEachAt(o,t,(h,m,f)=>{n.push(Al(h,m,f))}),r||i.statics.blotName==="list")return n.join("");let{outerHTML:a,innerHTML:s}=i.domNode,[l,d]=a.split(`>${s}<`);return l==="<table"?`<table style="border: 1px solid #000;">${n.join("")}<${d}`:`${l}>${n.join("")}<${d}`}return i.domNode instanceof Element?i.domNode.outerHTML:""}function w3(i,o){return Object.keys(o).reduce((t,r)=>{if(i[r]==null)return t;let n=o[r];return n===i[r]?t[r]=n:Array.isArray(n)?n.indexOf(i[r])<0?t[r]=n.concat([i[r]]):t[r]=n:t[r]=[n,i[r]],t},{})}function Qu(i){let o=i==="ordered"?"ol":"ul";switch(i){case"checked":return[o,' data-list="checked"'];case"unchecked":return[o,' data-list="unchecked"'];default:return[o,""]}}function qz(i){return i.reduce((o,t)=>{if(typeof t.insert=="string"){let r=t.insert.replace(/\r\n/g,`
2489
2492
  `).replace(/\r/g,`
2490
- `);return o.insert(r,t.attributes)}return o.push(t)},new ce.default)}function Mz(i,o){let{index:t,length:r}=i;return new Er(t+o,r)}function _3(i){let o=[];return i.forEach(t=>{typeof t.insert=="string"?t.insert.split(`
2493
+ `);return o.insert(r,t.attributes)}return o.push(t)},new de.default)}function Mz(i,o){let{index:t,length:r}=i;return new Er(t+o,r)}function _3(i){let o=[];return i.forEach(t=>{typeof t.insert=="string"?t.insert.split(`
2491
2494
  `).forEach((n,a)=>{a&&o.push({insert:`
2492
- `,attributes:t.attributes}),n&&o.push({insert:n,attributes:t.attributes})}):o.push(t)}),o}var Iz=Ju;var Kd=class{constructor(o){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.quill=o,this.options=t}};V(Kd,"DEFAULTS",{});var ee=Kd;var Yd="\uFEFF",Zu=class extends le{constructor(o,t){super(o,t),this.contentNode=document.createElement("span"),this.contentNode.setAttribute("contenteditable","false"),Array.from(this.domNode.childNodes).forEach(r=>{this.contentNode.appendChild(r)}),this.leftGuard=document.createTextNode(Yd),this.rightGuard=document.createTextNode(Yd),this.domNode.appendChild(this.leftGuard),this.domNode.appendChild(this.contentNode),this.domNode.appendChild(this.rightGuard)}index(o,t){return o===this.leftGuard?0:o===this.rightGuard?1:super.index(o,t)}restore(o){let t=null,r,n=o.data.split(Yd).join("");if(o===this.leftGuard)if(this.prev instanceof we){let a=this.prev.length();this.prev.insertAt(a,n),t={startNode:this.prev.domNode,startOffset:a+n.length}}else r=document.createTextNode(n),this.parent.insertBefore(this.scroll.create(r),this),t={startNode:r,startOffset:n.length};else o===this.rightGuard&&(this.next instanceof we?(this.next.insertAt(0,n),t={startNode:this.next.domNode,startOffset:n.length}):(r=document.createTextNode(n),this.parent.insertBefore(this.scroll.create(r),this.next),t={startNode:r,startOffset:n.length}));return o.data=Yd,t}update(o,t){o.forEach(r=>{if(r.type==="characterData"&&(r.target===this.leftGuard||r.target===this.rightGuard)){let n=this.restore(r.target);n&&(t.range=n)}})}},bs=Zu;var tm=class{constructor(o,t){V(this,"isComposing",!1);this.scroll=o,this.emitter=t,this.setupListeners()}setupListeners(){this.scroll.domNode.addEventListener("compositionstart",o=>{this.isComposing||this.handleCompositionStart(o)}),this.scroll.domNode.addEventListener("compositionend",o=>{this.isComposing&&queueMicrotask(()=>{this.handleCompositionEnd(o)})})}handleCompositionStart(o){let t=o.target instanceof Node?this.scroll.find(o.target,!0):null;t&&!(t instanceof bs)&&(this.emitter.emit(Q.events.COMPOSITION_BEFORE_START,o),this.scroll.batchStart(),this.emitter.emit(Q.events.COMPOSITION_START,o),this.isComposing=!0)}handleCompositionEnd(o){this.emitter.emit(Q.events.COMPOSITION_BEFORE_END,o),this.scroll.batchEnd(),this.emitter.emit(Q.events.COMPOSITION_END,o),this.isComposing=!1}},Nz=tm;var $l=class $l{constructor(o,t){V(this,"modules",{});this.quill=o,this.options=t}init(){Object.keys(this.options.modules).forEach(o=>{this.modules[o]==null&&this.addModule(o)})}addModule(o){let t=this.quill.constructor.import(`modules/${o}`);return this.modules[o]=new t(this.quill,this.options.modules[o]||{}),this.modules[o]}};V($l,"DEFAULTS",{modules:{}}),V($l,"themes",{default:$l});var em=$l,vs=em;var k3=i=>i.parentElement||i.getRootNode().host||null,S3=i=>{let o=i.getBoundingClientRect(),t="offsetWidth"in i&&Math.abs(o.width)/i.offsetWidth||1,r="offsetHeight"in i&&Math.abs(o.height)/i.offsetHeight||1;return{top:o.top,right:o.left+i.clientWidth*t,bottom:o.top+i.clientHeight*r,left:o.left}},Xd=i=>{let o=parseInt(i,10);return Number.isNaN(o)?0:o},Dz=(i,o,t,r,n,a)=>i<t&&o>r?0:i<t?-(t-i+n):o>r?o-i>r-t?i+n-t:o-r+a:0,C3=(i,o)=>{let t=i.ownerDocument,r=o,n=i;for(;n;){let a=n===t.body,s=a?{top:0,right:window.visualViewport?.width??t.documentElement.clientWidth,bottom:window.visualViewport?.height??t.documentElement.clientHeight,left:0}:S3(n),l=getComputedStyle(n),d=Dz(r.left,r.right,s.left,s.right,Xd(l.scrollPaddingLeft),Xd(l.scrollPaddingRight)),h=Dz(r.top,r.bottom,s.top,s.bottom,Xd(l.scrollPaddingTop),Xd(l.scrollPaddingBottom));if(d||h)if(a)t.defaultView?.scrollBy(d,h);else{let{scrollLeft:m,scrollTop:f}=n;h&&(n.scrollTop+=h),d&&(n.scrollLeft+=d);let b=n.scrollLeft-m,g=n.scrollTop-f;r={left:r.left-b,top:r.top-g,right:r.right-b,bottom:r.bottom-g}}n=a||l.position==="fixed"?null:k3(n)}},Rz=C3;var E3=100,T3=["block","break","cursor","inline","scroll","text"],A3=(i,o,t)=>{let r=new yi;return T3.forEach(n=>{let a=o.query(n);a&&r.register(a)}),i.forEach(n=>{let a=o.query(n);a||t.error(`Cannot register "${n}" specified in "formats" config. Are you sure it was registered?`);let s=0;for(;a;)if(r.register(a),a="blotName"in a?a.requiredContainer??null:null,s+=1,s>E3){t.error(`Cycle detected in registering blot requiredContainer: "${n}"`);break}}),r},Oz=A3;var xs=oo("quill"),Qd=new yi;Fr.uiClass="ql-ui";var Wo=class Wo{static debug(o){o===!0&&(o="log"),oo.level(o)}static find(o){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return El.get(o)||Qd.find(o,t)}static import(o){return this.imports[o]==null&&xs.error(`Cannot import ${o}. Are you sure it was registered?`),this.imports[o]}static register(){if(typeof(arguments.length<=0?void 0:arguments[0])!="string"){let o=arguments.length<=0?void 0:arguments[0],t=!!(!(arguments.length<=1)&&arguments[1]),r="attrName"in o?o.attrName:o.blotName;typeof r=="string"?this.register(`formats/${r}`,o,t):Object.keys(o).forEach(n=>{this.register(n,o[n],t)})}else{let o=arguments.length<=0?void 0:arguments[0],t=arguments.length<=1?void 0:arguments[1],r=!!(!(arguments.length<=2)&&arguments[2]);this.imports[o]!=null&&!r&&xs.warn(`Overwriting ${o} with`,t),this.imports[o]=t,(o.startsWith("blots/")||o.startsWith("formats/"))&&t&&typeof t!="boolean"&&t.blotName!=="abstract"&&Qd.register(t),typeof t.register=="function"&&t.register(Qd)}}constructor(o){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.options=$3(o,t),this.container=this.options.container,this.container==null){xs.error("Invalid Quill container",o);return}this.options.debug&&Wo.debug(this.options.debug);let r=this.container.innerHTML.trim();this.container.classList.add("ql-container"),this.container.innerHTML="",El.set(this.container,this),this.root=this.addContainer("ql-editor"),this.root.classList.add("ql-blank"),this.emitter=new Q;let n=_l.blotName,a=this.options.registry.query(n);if(!a||!("blotName"in a))throw new Error(`Cannot initialize Quill without "${n}" blot`);if(this.scroll=new a(this.options.registry,this.root,{emitter:this.emitter}),this.editor=new Iz(this.scroll),this.selection=new Lz(this.scroll,this.emitter),this.composition=new Nz(this.scroll,this.emitter),this.theme=new this.options.theme(this,this.options),this.keyboard=this.theme.addModule("keyboard"),this.clipboard=this.theme.addModule("clipboard"),this.history=this.theme.addModule("history"),this.uploader=this.theme.addModule("uploader"),this.theme.addModule("input"),this.theme.addModule("uiNode"),this.theme.init(),this.emitter.on(Q.events.EDITOR_CHANGE,s=>{s===Q.events.TEXT_CHANGE&&this.root.classList.toggle("ql-blank",this.editor.isBlank())}),this.emitter.on(Q.events.SCROLL_UPDATE,(s,l)=>{let d=this.selection.lastRange,[h]=this.selection.getRange(),m=d&&h?{oldRange:d,newRange:h}:void 0;Go.call(this,()=>this.editor.update(null,l,m),s)}),this.emitter.on(Q.events.SCROLL_EMBED_UPDATE,(s,l)=>{let d=this.selection.lastRange,[h]=this.selection.getRange(),m=d&&h?{oldRange:d,newRange:h}:void 0;Go.call(this,()=>{let f=new wi.default().retain(s.offset(this)).retain({[s.statics.blotName]:l});return this.editor.update(f,[],m)},Wo.sources.USER)}),r){let s=this.clipboard.convert({html:`${r}<p><br></p>`,text:`
2495
+ `,attributes:t.attributes}),n&&o.push({insert:n,attributes:t.attributes})}):o.push(t)}),o}var Iz=Ju;var Kd=class{constructor(o){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.quill=o,this.options=t}};V(Kd,"DEFAULTS",{});var ee=Kd;var Yd="\uFEFF",Zu=class extends ce{constructor(o,t){super(o,t),this.contentNode=document.createElement("span"),this.contentNode.setAttribute("contenteditable","false"),Array.from(this.domNode.childNodes).forEach(r=>{this.contentNode.appendChild(r)}),this.leftGuard=document.createTextNode(Yd),this.rightGuard=document.createTextNode(Yd),this.domNode.appendChild(this.leftGuard),this.domNode.appendChild(this.contentNode),this.domNode.appendChild(this.rightGuard)}index(o,t){return o===this.leftGuard?0:o===this.rightGuard?1:super.index(o,t)}restore(o){let t=null,r,n=o.data.split(Yd).join("");if(o===this.leftGuard)if(this.prev instanceof we){let a=this.prev.length();this.prev.insertAt(a,n),t={startNode:this.prev.domNode,startOffset:a+n.length}}else r=document.createTextNode(n),this.parent.insertBefore(this.scroll.create(r),this),t={startNode:r,startOffset:n.length};else o===this.rightGuard&&(this.next instanceof we?(this.next.insertAt(0,n),t={startNode:this.next.domNode,startOffset:n.length}):(r=document.createTextNode(n),this.parent.insertBefore(this.scroll.create(r),this.next),t={startNode:r,startOffset:n.length}));return o.data=Yd,t}update(o,t){o.forEach(r=>{if(r.type==="characterData"&&(r.target===this.leftGuard||r.target===this.rightGuard)){let n=this.restore(r.target);n&&(t.range=n)}})}},bs=Zu;var tm=class{constructor(o,t){V(this,"isComposing",!1);this.scroll=o,this.emitter=t,this.setupListeners()}setupListeners(){this.scroll.domNode.addEventListener("compositionstart",o=>{this.isComposing||this.handleCompositionStart(o)}),this.scroll.domNode.addEventListener("compositionend",o=>{this.isComposing&&queueMicrotask(()=>{this.handleCompositionEnd(o)})})}handleCompositionStart(o){let t=o.target instanceof Node?this.scroll.find(o.target,!0):null;t&&!(t instanceof bs)&&(this.emitter.emit(Q.events.COMPOSITION_BEFORE_START,o),this.scroll.batchStart(),this.emitter.emit(Q.events.COMPOSITION_START,o),this.isComposing=!0)}handleCompositionEnd(o){this.emitter.emit(Q.events.COMPOSITION_BEFORE_END,o),this.scroll.batchEnd(),this.emitter.emit(Q.events.COMPOSITION_END,o),this.isComposing=!1}},Nz=tm;var $l=class $l{constructor(o,t){V(this,"modules",{});this.quill=o,this.options=t}init(){Object.keys(this.options.modules).forEach(o=>{this.modules[o]==null&&this.addModule(o)})}addModule(o){let t=this.quill.constructor.import(`modules/${o}`);return this.modules[o]=new t(this.quill,this.options.modules[o]||{}),this.modules[o]}};V($l,"DEFAULTS",{modules:{}}),V($l,"themes",{default:$l});var em=$l,vs=em;var k3=i=>i.parentElement||i.getRootNode().host||null,S3=i=>{let o=i.getBoundingClientRect(),t="offsetWidth"in i&&Math.abs(o.width)/i.offsetWidth||1,r="offsetHeight"in i&&Math.abs(o.height)/i.offsetHeight||1;return{top:o.top,right:o.left+i.clientWidth*t,bottom:o.top+i.clientHeight*r,left:o.left}},Xd=i=>{let o=parseInt(i,10);return Number.isNaN(o)?0:o},Dz=(i,o,t,r,n,a)=>i<t&&o>r?0:i<t?-(t-i+n):o>r?o-i>r-t?i+n-t:o-r+a:0,C3=(i,o)=>{let t=i.ownerDocument,r=o,n=i;for(;n;){let a=n===t.body,s=a?{top:0,right:window.visualViewport?.width??t.documentElement.clientWidth,bottom:window.visualViewport?.height??t.documentElement.clientHeight,left:0}:S3(n),l=getComputedStyle(n),d=Dz(r.left,r.right,s.left,s.right,Xd(l.scrollPaddingLeft),Xd(l.scrollPaddingRight)),h=Dz(r.top,r.bottom,s.top,s.bottom,Xd(l.scrollPaddingTop),Xd(l.scrollPaddingBottom));if(d||h)if(a)t.defaultView?.scrollBy(d,h);else{let{scrollLeft:m,scrollTop:f}=n;h&&(n.scrollTop+=h),d&&(n.scrollLeft+=d);let b=n.scrollLeft-m,g=n.scrollTop-f;r={left:r.left-b,top:r.top-g,right:r.right-b,bottom:r.bottom-g}}n=a||l.position==="fixed"?null:k3(n)}},Rz=C3;var E3=100,T3=["block","break","cursor","inline","scroll","text"],A3=(i,o,t)=>{let r=new yi;return T3.forEach(n=>{let a=o.query(n);a&&r.register(a)}),i.forEach(n=>{let a=o.query(n);a||t.error(`Cannot register "${n}" specified in "formats" config. Are you sure it was registered?`);let s=0;for(;a;)if(r.register(a),a="blotName"in a?a.requiredContainer??null:null,s+=1,s>E3){t.error(`Cycle detected in registering blot requiredContainer: "${n}"`);break}}),r},Oz=A3;var xs=oo("quill"),Qd=new yi;Fr.uiClass="ql-ui";var Wo=class Wo{static debug(o){o===!0&&(o="log"),oo.level(o)}static find(o){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return El.get(o)||Qd.find(o,t)}static import(o){return this.imports[o]==null&&xs.error(`Cannot import ${o}. Are you sure it was registered?`),this.imports[o]}static register(){if(typeof(arguments.length<=0?void 0:arguments[0])!="string"){let o=arguments.length<=0?void 0:arguments[0],t=!!(!(arguments.length<=1)&&arguments[1]),r="attrName"in o?o.attrName:o.blotName;typeof r=="string"?this.register(`formats/${r}`,o,t):Object.keys(o).forEach(n=>{this.register(n,o[n],t)})}else{let o=arguments.length<=0?void 0:arguments[0],t=arguments.length<=1?void 0:arguments[1],r=!!(!(arguments.length<=2)&&arguments[2]);this.imports[o]!=null&&!r&&xs.warn(`Overwriting ${o} with`,t),this.imports[o]=t,(o.startsWith("blots/")||o.startsWith("formats/"))&&t&&typeof t!="boolean"&&t.blotName!=="abstract"&&Qd.register(t),typeof t.register=="function"&&t.register(Qd)}}constructor(o){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.options=$3(o,t),this.container=this.options.container,this.container==null){xs.error("Invalid Quill container",o);return}this.options.debug&&Wo.debug(this.options.debug);let r=this.container.innerHTML.trim();this.container.classList.add("ql-container"),this.container.innerHTML="",El.set(this.container,this),this.root=this.addContainer("ql-editor"),this.root.classList.add("ql-blank"),this.emitter=new Q;let n=_l.blotName,a=this.options.registry.query(n);if(!a||!("blotName"in a))throw new Error(`Cannot initialize Quill without "${n}" blot`);if(this.scroll=new a(this.options.registry,this.root,{emitter:this.emitter}),this.editor=new Iz(this.scroll),this.selection=new Lz(this.scroll,this.emitter),this.composition=new Nz(this.scroll,this.emitter),this.theme=new this.options.theme(this,this.options),this.keyboard=this.theme.addModule("keyboard"),this.clipboard=this.theme.addModule("clipboard"),this.history=this.theme.addModule("history"),this.uploader=this.theme.addModule("uploader"),this.theme.addModule("input"),this.theme.addModule("uiNode"),this.theme.init(),this.emitter.on(Q.events.EDITOR_CHANGE,s=>{s===Q.events.TEXT_CHANGE&&this.root.classList.toggle("ql-blank",this.editor.isBlank())}),this.emitter.on(Q.events.SCROLL_UPDATE,(s,l)=>{let d=this.selection.lastRange,[h]=this.selection.getRange(),m=d&&h?{oldRange:d,newRange:h}:void 0;Go.call(this,()=>this.editor.update(null,l,m),s)}),this.emitter.on(Q.events.SCROLL_EMBED_UPDATE,(s,l)=>{let d=this.selection.lastRange,[h]=this.selection.getRange(),m=d&&h?{oldRange:d,newRange:h}:void 0;Go.call(this,()=>{let f=new wi.default().retain(s.offset(this)).retain({[s.statics.blotName]:l});return this.editor.update(f,[],m)},Wo.sources.USER)}),r){let s=this.clipboard.convert({html:`${r}<p><br></p>`,text:`
2493
2496
  `});this.setContents(s)}this.history.clear(),this.options.placeholder&&this.root.setAttribute("data-placeholder",this.options.placeholder),this.options.readOnly&&this.disable(),this.allowReadOnlyEdits=!1}addContainer(o){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(typeof o=="string"){let r=o;o=document.createElement("div"),o.classList.add(r)}return this.container.insertBefore(o,t),o}blur(){this.selection.setRange(null)}deleteText(o,t,r){return[o,t,,r]=Gn(o,t,r),Go.call(this,()=>this.editor.deleteText(o,t),r,o,-1*t)}disable(){this.enable(!1)}editReadOnly(o){this.allowReadOnlyEdits=!0;let t=o();return this.allowReadOnlyEdits=!1,t}enable(){let o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.scroll.enable(o),this.container.classList.toggle("ql-disabled",!o)}focus(){let o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.selection.focus(),o.preventScroll||this.scrollSelectionIntoView()}format(o,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Q.sources.API;return Go.call(this,()=>{let n=this.getSelection(!0),a=new wi.default;if(n==null)return a;if(this.scroll.query(o,X.BLOCK))a=this.editor.formatLine(n.index,n.length,{[o]:t});else{if(n.length===0)return this.selection.format(o,t),a;a=this.editor.formatText(n.index,n.length,{[o]:t})}return this.setSelection(n,Q.sources.SILENT),a},r)}formatLine(o,t,r,n,a){let s;return[o,t,s,a]=Gn(o,t,r,n,a),Go.call(this,()=>this.editor.formatLine(o,t,s),a,o,0)}formatText(o,t,r,n,a){let s;return[o,t,s,a]=Gn(o,t,r,n,a),Go.call(this,()=>this.editor.formatText(o,t,s),a,o,0)}getBounds(o){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=null;if(typeof o=="number"?r=this.selection.getBounds(o,t):r=this.selection.getBounds(o.index,o.length),!r)return null;let n=this.container.getBoundingClientRect();return{bottom:r.bottom-n.top,height:r.height,left:r.left-n.left,right:r.right-n.left,top:r.top-n.top,width:r.width}}getContents(){let o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.getLength()-o;return[o,t]=Gn(o,t),this.editor.getContents(o,t)}getFormat(){let o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.getSelection(!0),t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return typeof o=="number"?this.editor.getFormat(o,t):this.editor.getFormat(o.index,o.length)}getIndex(o){return o.offset(this.scroll)}getLength(){return this.scroll.length()}getLeaf(o){return this.scroll.leaf(o)}getLine(o){return this.scroll.line(o)}getLines(){let o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Number.MAX_VALUE;return typeof o!="number"?this.scroll.lines(o.index,o.length):this.scroll.lines(o,t)}getModule(o){return this.theme.modules[o]}getSelection(){return arguments.length>0&&arguments[0]!==void 0&&arguments[0]&&this.focus(),this.update(),this.selection.getRange()[0]}getSemanticHTML(){let o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,t=arguments.length>1?arguments[1]:void 0;return typeof o=="number"&&(t=t??this.getLength()-o),[o,t]=Gn(o,t),this.editor.getHTML(o,t)}getText(){let o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,t=arguments.length>1?arguments[1]:void 0;return typeof o=="number"&&(t=t??this.getLength()-o),[o,t]=Gn(o,t),this.editor.getText(o,t)}hasFocus(){return this.selection.hasFocus()}insertEmbed(o,t,r){let n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:Wo.sources.API;return Go.call(this,()=>this.editor.insertEmbed(o,t,r),n,o)}insertText(o,t,r,n,a){let s;return[o,,s,a]=Gn(o,0,r,n,a),Go.call(this,()=>this.editor.insertText(o,t,s),a,o,t.length)}isEnabled(){return this.scroll.isEnabled()}off(){return this.emitter.off(...arguments)}on(){return this.emitter.on(...arguments)}once(){return this.emitter.once(...arguments)}removeFormat(o,t,r){return[o,t,,r]=Gn(o,t,r),Go.call(this,()=>this.editor.removeFormat(o,t),r,o)}scrollRectIntoView(o){Rz(this.root,o)}scrollIntoView(){console.warn("Quill#scrollIntoView() has been deprecated and will be removed in the near future. Please use Quill#scrollSelectionIntoView() instead."),this.scrollSelectionIntoView()}scrollSelectionIntoView(){let o=this.selection.lastRange,t=o&&this.selection.getBounds(o.index,o.length);t&&this.scrollRectIntoView(t)}setContents(o){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Q.sources.API;return Go.call(this,()=>{o=new wi.default(o);let r=this.getLength(),n=this.editor.deleteText(0,r),a=this.editor.insertContents(0,o),s=this.editor.deleteText(this.getLength()-1,1);return n.compose(a).compose(s)},t)}setSelection(o,t,r){o==null?this.selection.setRange(null,t||Wo.sources.API):([o,t,,r]=Gn(o,t,r),this.selection.setRange(new Er(Math.max(0,o),t),r),r!==Q.sources.SILENT&&this.scrollSelectionIntoView())}setText(o){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Q.sources.API,r=new wi.default().insert(o);return this.setContents(r,t)}update(){let o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Q.sources.USER,t=this.scroll.update(o);return this.selection.update(o),t}updateContents(o){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Q.sources.API;return Go.call(this,()=>(o=new wi.default(o),this.editor.applyDelta(o)),t,!0)}};V(Wo,"DEFAULTS",{bounds:null,modules:{clipboard:!0,keyboard:!0,history:!0,uploader:!0},placeholder:"",readOnly:!1,registry:Qd,theme:"default"}),V(Wo,"events",Q.events),V(Wo,"sources",Q.sources),V(Wo,"version","2.0.3"),V(Wo,"imports",{delta:wi.default,parchment:kl,"core/module":ee,"core/theme":vs});var U=Wo;function Pz(i){return typeof i=="string"?document.querySelector(i):i}function rm(i){return Object.entries(i??{}).reduce((o,t)=>{let[r,n]=t;return{...o,[r]:n===!0?{}:n}},{})}function Hz(i){return Object.fromEntries(Object.entries(i).filter(o=>o[1]!==void 0))}function $3(i,o){let t=Pz(i);if(!t)throw new Error("Invalid Quill container");let n=!o.theme||o.theme===U.DEFAULTS.theme?vs:U.import(`themes/${o.theme}`);if(!n)throw new Error(`Invalid theme ${o.theme}. Did you register it?`);let{modules:a,...s}=U.DEFAULTS,{modules:l,...d}=n.DEFAULTS,h=rm(o.modules);h!=null&&h.toolbar&&h.toolbar.constructor!==Object&&(h={...h,toolbar:{container:h.toolbar}});let m=Hr({},rm(a),rm(l),h),f={...s,...Hz(d),...Hz(o)},b=o.registry;return b?o.formats&&xs.warn('Ignoring "formats" option because "registry" is specified'):b=o.formats?Oz(o.formats,f.registry,xs):f.registry,{...f,registry:b,container:t,theme:n,modules:Object.entries(m).reduce((g,v)=>{let[x,k]=v;if(!k)return g;let _=U.import(`modules/${x}`);return _==null?(xs.error(`Cannot load ${x} module. Are you sure you registered it?`),g):{...g,[x]:Hr({},_.DEFAULTS||{},k)}},{}),bounds:Pz(f.bounds)}}function Go(i,o,t,r){if(!this.isEnabled()&&o===Q.sources.USER&&!this.allowReadOnlyEdits)return new wi.default;let n=t==null?null:this.getSelection(),a=this.editor.delta,s=i();if(n!=null&&(t===!0&&(t=n.index),r==null?n=Fz(n,s,o):r!==0&&(n=Fz(n,t,r,o)),this.setSelection(n,Q.sources.SILENT)),s.length()>0){let l=[Q.events.TEXT_CHANGE,s,a,o];this.emitter.emit(Q.events.EDITOR_CHANGE,...l),o!==Q.sources.SILENT&&this.emitter.emit(...l)}return s}function Gn(i,o,t,r,n){let a={};return typeof i.index=="number"&&typeof i.length=="number"?typeof o!="number"?(n=r,r=t,t=o,o=i.length,i=i.index):(o=i.length,i=i.index):typeof o!="number"&&(n=r,r=t,t=o,o=0),typeof t=="object"?(a=t,n=r):typeof t=="string"&&(r!=null?a[t]=r:n=t),n=n||Q.sources.API,[i,o,a,n]}function Fz(i,o,t,r){let n=typeof t=="number"?t:0;if(i==null)return null;let a,s;return o&&typeof o.transformPosition=="function"?[a,s]=[i.index,i.index+i.length].map(l=>o.transformPosition(l,r!==Q.sources.USER)):[a,s]=[i.index,i.index+i.length].map(l=>l<o||l===o&&r===Q.sources.USER?l:n>=0?l+n:Math.max(o,l+n)),new Er(a,s-a)}var om=class extends ms{},wo=om;var _o=ar(Or(),1);function Bz(i){return i instanceof Rt||i instanceof Oe}function Vz(i){return typeof i.updateContent=="function"}var _i=class extends _l{constructor(o,t,r){let{emitter:n}=r;super(o,t),this.emitter=n,this.batch=!1,this.optimize(),this.enable(),this.domNode.addEventListener("dragstart",a=>this.handleDragStart(a))}batchStart(){Array.isArray(this.batch)||(this.batch=[])}batchEnd(){if(!this.batch)return;let o=this.batch;this.batch=!1,this.update(o)}emitMount(o){this.emitter.emit(Q.events.SCROLL_BLOT_MOUNT,o)}emitUnmount(o){this.emitter.emit(Q.events.SCROLL_BLOT_UNMOUNT,o)}emitEmbedUpdate(o,t){this.emitter.emit(Q.events.SCROLL_EMBED_UPDATE,o,t)}deleteAt(o,t){let[r,n]=this.line(o),[a]=this.line(o+t);if(super.deleteAt(o,t),a!=null&&r!==a&&n>0){if(r instanceof Oe||a instanceof Oe){this.optimize();return}let s=a.children.head instanceof hr?null:a.children.head;r.moveChildren(a,s),r.remove()}this.optimize()}enable(){let o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.domNode.setAttribute("contenteditable",o?"true":"false")}formatAt(o,t,r,n){super.formatAt(o,t,r,n),this.optimize()}insertAt(o,t,r){if(o>=this.length())if(r==null||this.scroll.query(t,X.BLOCK)==null){let n=this.scroll.create(this.statics.defaultChild.blotName);this.appendChild(n),r==null&&t.endsWith(`
2494
2497
  `)?n.insertAt(0,t.slice(0,-1),r):n.insertAt(0,t,r)}else{let n=this.scroll.create(t,r);this.appendChild(n)}else super.insertAt(o,t,r);this.optimize()}insertBefore(o,t){if(o.statics.scope===X.INLINE_BLOT){let r=this.scroll.create(this.statics.defaultChild.blotName);r.appendChild(o),super.insertBefore(r,t)}else super.insertBefore(o,t)}insertContents(o,t){let r=this.deltaToRenderBlocks(t.concat(new _o.default().insert(`
2495
2498
  `))),n=r.pop();if(n==null)return;this.batchStart();let a=r.shift();if(a){let d=a.type==="block"&&(a.delta.length()===0||!this.descendant(Oe,o)[0]&&o<this.length()),h=a.type==="block"?a.delta:new _o.default().insert({[a.key]:a.value});nm(this,o,h);let m=a.type==="block"?1:0,f=o+h.length()+m;d&&this.insertAt(f-1,`
@@ -2502,9 +2505,9 @@ ${ma(this.code(o,t))}
2502
2505
  `,r).retain(o.length()-t-1).retain(1,{list:"unchecked"});this.quill.updateContents(n,U.sources.USER),this.quill.setSelection(i.index+1,U.sources.SILENT),this.quill.scrollSelectionIntoView()}},"header enter":{key:"Enter",collapsed:!0,format:["header"],suffix:/^$/,handler(i,o){let[t,r]=this.quill.getLine(i.index),n=new fr.default().retain(i.index).insert(`
2503
2506
  `,o.format).retain(t.length()-r-1).retain(1,{header:null});this.quill.updateContents(n,U.sources.USER),this.quill.setSelection(i.index+1,U.sources.SILENT),this.quill.scrollSelectionIntoView()}},"table backspace":{key:"Backspace",format:["table"],collapsed:!0,offset:0,handler(){}},"table delete":{key:"Delete",format:["table"],collapsed:!0,suffix:/^$/,handler(){}},"table enter":{key:"Enter",shiftKey:null,format:["table"],handler(i){let o=this.quill.getModule("table");if(o){let[t,r,n,a]=o.getTable(i),s=N3(t,r,n,a);if(s==null)return;let l=t.offset();if(s<0){let d=new fr.default().retain(l).insert(`
2504
2507
  `);this.quill.updateContents(d,U.sources.USER),this.quill.setSelection(i.index+1,i.length,U.sources.SILENT)}else if(s>0){l+=t.length();let d=new fr.default().retain(l).insert(`
2505
- `);this.quill.updateContents(d,U.sources.USER),this.quill.setSelection(l,U.sources.USER)}}}},"table tab":{key:"Tab",shiftKey:null,format:["table"],handler(i,o){let{event:t,line:r}=o,n=r.offset(this.quill.scroll);t.shiftKey?this.quill.setSelection(n-1,U.sources.USER):this.quill.setSelection(n+r.length(),U.sources.USER)}},"list autofill":{key:" ",shiftKey:null,collapsed:!0,format:{"code-block":!1,blockquote:!1,table:!1},prefix:/^\s*?(\d+\.|-|\*|\[ ?\]|\[x\])$/,handler(i,o){if(this.quill.scroll.query("list")==null)return!0;let{length:t}=o.prefix,[r,n]=this.quill.getLine(i.index);if(n>t)return!0;let a;switch(o.prefix.trim()){case"[]":case"[ ]":a="unchecked";break;case"[x]":a="checked";break;case"-":case"*":a="bullet";break;default:a="ordered"}this.quill.insertText(i.index," ",U.sources.USER),this.quill.history.cutoff();let s=new fr.default().retain(i.index-n).delete(t+1).retain(r.length()-2-n).retain(1,{list:a});return this.quill.updateContents(s,U.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(i.index-t,U.sources.SILENT),!1}},"code exit":{key:"Enter",collapsed:!0,format:["code-block"],prefix:/^$/,suffix:/^\s*$/,handler(i){let[o,t]=this.quill.getLine(i.index),r=2,n=o;for(;n!=null&&n.length()<=1&&n.formats()["code-block"];)if(n=n.prev,r-=1,r<=0){let a=new fr.default().retain(i.index+o.length()-t-2).retain(1,{"code-block":null}).delete(1);return this.quill.updateContents(a,U.sources.USER),this.quill.setSelection(i.index-1,U.sources.SILENT),!1}return!0}},"embed left":op("ArrowLeft",!1),"embed left shift":op("ArrowLeft",!0),"embed right":op("ArrowRight",!1),"embed right shift":op("ArrowRight",!0),"table down":Xz(!1),"table up":Xz(!0)}};Il.DEFAULTS=M3;function Yz(i){return{key:"Tab",shiftKey:!i,format:{"code-block":!0},handler(o,t){let{event:r}=t,n=this.quill.scroll.query("code-block"),{TAB:a}=n;if(o.length===0&&!r.shiftKey){this.quill.insertText(o.index,a,U.sources.USER),this.quill.setSelection(o.index+a.length,U.sources.SILENT);return}let s=o.length===0?this.quill.getLines(o.index,1):this.quill.getLines(o),{index:l,length:d}=o;s.forEach((h,m)=>{i?(h.insertAt(0,a),m===0?l+=a.length:d+=a.length):h.domNode.textContent.startsWith(a)&&(h.deleteAt(0,a.length),m===0?l-=a.length:d-=a.length)}),this.quill.update(U.sources.USER),this.quill.setSelection(l,d,U.sources.SILENT)}}}function op(i,o){return{key:i,shiftKey:o,altKey:null,[i==="ArrowLeft"?"prefix":"suffix"]:/^$/,handler(r){let{index:n}=r;i==="ArrowRight"&&(n+=r.length+1);let[a]=this.quill.getLeaf(n);return a instanceof le?(i==="ArrowLeft"?o?this.quill.setSelection(r.index-1,r.length+1,U.sources.USER):this.quill.setSelection(r.index-1,U.sources.USER):o?this.quill.setSelection(r.index,r.length+1,U.sources.USER):this.quill.setSelection(r.index+r.length+1,U.sources.USER),!1):!0}}}function hm(i){return{key:i[0],shortKey:!0,handler(o,t){this.quill.format(i,!t.format[i],U.sources.USER)}}}function Xz(i){return{key:i?"ArrowUp":"ArrowDown",collapsed:!0,format:["table"],handler(o,t){let r=i?"prev":"next",n=t.line,a=n.parent[r];if(a!=null){if(a.statics.blotName==="table-row"){let s=a.children.head,l=n;for(;l.prev!=null;)l=l.prev,s=s.next;let d=s.offset(this.quill.scroll)+Math.min(t.offset,s.length()-1);this.quill.setSelection(d,0,U.sources.USER)}}else{let s=n.table()[r];s!=null&&(i?this.quill.setSelection(s.offset(this.quill.scroll)+s.length()-1,0,U.sources.USER):this.quill.setSelection(s.offset(this.quill.scroll),0,U.sources.USER))}return!1}}}function I3(i){if(typeof i=="string"||typeof i=="number")i={key:i};else if(typeof i=="object")i=gn(i);else return null;return i.shortKey&&(i[q3]=i.shortKey,delete i.shortKey),i}function Nl(i){let{quill:o,range:t}=i,r=o.getLines(t),n={};if(r.length>1){let a=r[0].formats(),s=r[r.length-1].formats();n=fr.AttributeMap.diff(s,a)||{}}o.deleteText(t,U.sources.USER),Object.keys(n).length>0&&o.formatLine(t.index,1,n,U.sources.USER),o.setSelection(t.index,U.sources.SILENT)}function N3(i,o,t,r){return o.prev==null&&o.next==null?t.prev==null&&t.next==null?r===0?-1:1:t.prev==null?-1:1:o.prev==null?-1:o.next==null?1:null}var D3=/font-weight:\s*normal/,R3=["P","OL","UL"],Qz=i=>i&&R3.includes(i.tagName),O3=i=>{Array.from(i.querySelectorAll("br")).filter(o=>Qz(o.previousElementSibling)&&Qz(o.nextElementSibling)).forEach(o=>{o.parentNode?.removeChild(o)})},P3=i=>{Array.from(i.querySelectorAll('b[style*="font-weight"]')).filter(o=>o.getAttribute("style")?.match(D3)).forEach(o=>{let t=i.createDocumentFragment();t.append(...o.childNodes),o.parentNode?.replaceChild(t,o)})};function um(i){i.querySelector('[id^="docs-internal-guid-"]')&&(P3(i),O3(i))}var H3=/\bmso-list:[^;]*ignore/i,F3=/\bmso-list:[^;]*\bl(\d+)/i,B3=/\bmso-list:[^;]*\blevel(\d+)/i,V3=(i,o)=>{let t=i.getAttribute("style"),r=t?.match(F3);if(!r)return null;let n=Number(r[1]),a=t?.match(B3),s=a?Number(a[1]):1,l=new RegExp(`@list l${n}:level${s}\\s*\\{[^\\}]*mso-level-number-format:\\s*([\\w-]+)`,"i"),d=o.match(l),h=d&&d[1]==="bullet"?"bullet":"ordered";return{id:n,indent:s,type:h,element:i}},U3=i=>{let o=Array.from(i.querySelectorAll("[style*=mso-list]")),t=[],r=[];o.forEach(s=>{(s.getAttribute("style")||"").match(H3)?t.push(s):r.push(s)}),t.forEach(s=>s.parentNode?.removeChild(s));let n=i.documentElement.innerHTML,a=r.map(s=>V3(s,n)).filter(s=>s);for(;a.length;){let s=[],l=a.shift();for(;l;)s.push(l),l=a.length&&a[0]?.element===l.element.nextElementSibling&&a[0].id===l.id?a.shift():null;let d=document.createElement("ul");s.forEach(f=>{let b=document.createElement("li");b.setAttribute("data-list",f.type),f.indent>1&&b.setAttribute("class",`ql-indent-${f.indent-1}`),b.innerHTML=f.element.innerHTML,d.appendChild(b)});let h=s[0]?.element,{parentNode:m}=h??{};h&&m?.replaceChild(d,h),s.slice(1).forEach(f=>{let{element:b}=f;m?.removeChild(b)})}};function mm(i){i.documentElement.getAttribute("xmlns:w")==="urn:schemas-microsoft-com:office:word"&&U3(i)}var j3=[mm,um],G3=i=>{i.documentElement&&j3.forEach(o=>{o(i)})},Jz=G3;var W3=oo("quill:clipboard"),K3=[[Node.TEXT_NODE,aM],[Node.TEXT_NODE,tw],["br",Z3],[Node.ELEMENT_NODE,tw],[Node.ELEMENT_NODE,J3],[Node.ELEMENT_NODE,Q3],[Node.ELEMENT_NODE,nM],["li",rM],["ol, ul",oM],["pre",tM],["tr",iM],["b",fm("bold")],["i",fm("italic")],["strike",fm("strike")],["style",eM]],Y3=[jz,Zd].reduce((i,o)=>(i[o.keyName]=o,i),{}),Zz=[Jd,Ml,ql,tp,ep,rp].reduce((i,o)=>(i[o.keyName]=o,i),{}),Dl=class extends ee{constructor(o,t){super(o,t),this.quill.root.addEventListener("copy",r=>this.onCaptureCopy(r,!1)),this.quill.root.addEventListener("cut",r=>this.onCaptureCopy(r,!0)),this.quill.root.addEventListener("paste",this.onCapturePaste.bind(this)),this.matchers=[],K3.concat(this.options.matchers??[]).forEach(r=>{let[n,a]=r;this.addMatcher(n,a)})}addMatcher(o,t){this.matchers.push([o,t])}convert(o){let{html:t,text:r}=o,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(n[_e.blotName])return new Ur.default().insert(r||"",{[_e.blotName]:n[_e.blotName]});if(!t)return new Ur.default().insert(r||"",n);let a=this.convertHTML(t);return Rl(a,`
2508
+ `);this.quill.updateContents(d,U.sources.USER),this.quill.setSelection(l,U.sources.USER)}}}},"table tab":{key:"Tab",shiftKey:null,format:["table"],handler(i,o){let{event:t,line:r}=o,n=r.offset(this.quill.scroll);t.shiftKey?this.quill.setSelection(n-1,U.sources.USER):this.quill.setSelection(n+r.length(),U.sources.USER)}},"list autofill":{key:" ",shiftKey:null,collapsed:!0,format:{"code-block":!1,blockquote:!1,table:!1},prefix:/^\s*?(\d+\.|-|\*|\[ ?\]|\[x\])$/,handler(i,o){if(this.quill.scroll.query("list")==null)return!0;let{length:t}=o.prefix,[r,n]=this.quill.getLine(i.index);if(n>t)return!0;let a;switch(o.prefix.trim()){case"[]":case"[ ]":a="unchecked";break;case"[x]":a="checked";break;case"-":case"*":a="bullet";break;default:a="ordered"}this.quill.insertText(i.index," ",U.sources.USER),this.quill.history.cutoff();let s=new fr.default().retain(i.index-n).delete(t+1).retain(r.length()-2-n).retain(1,{list:a});return this.quill.updateContents(s,U.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(i.index-t,U.sources.SILENT),!1}},"code exit":{key:"Enter",collapsed:!0,format:["code-block"],prefix:/^$/,suffix:/^\s*$/,handler(i){let[o,t]=this.quill.getLine(i.index),r=2,n=o;for(;n!=null&&n.length()<=1&&n.formats()["code-block"];)if(n=n.prev,r-=1,r<=0){let a=new fr.default().retain(i.index+o.length()-t-2).retain(1,{"code-block":null}).delete(1);return this.quill.updateContents(a,U.sources.USER),this.quill.setSelection(i.index-1,U.sources.SILENT),!1}return!0}},"embed left":op("ArrowLeft",!1),"embed left shift":op("ArrowLeft",!0),"embed right":op("ArrowRight",!1),"embed right shift":op("ArrowRight",!0),"table down":Xz(!1),"table up":Xz(!0)}};Il.DEFAULTS=M3;function Yz(i){return{key:"Tab",shiftKey:!i,format:{"code-block":!0},handler(o,t){let{event:r}=t,n=this.quill.scroll.query("code-block"),{TAB:a}=n;if(o.length===0&&!r.shiftKey){this.quill.insertText(o.index,a,U.sources.USER),this.quill.setSelection(o.index+a.length,U.sources.SILENT);return}let s=o.length===0?this.quill.getLines(o.index,1):this.quill.getLines(o),{index:l,length:d}=o;s.forEach((h,m)=>{i?(h.insertAt(0,a),m===0?l+=a.length:d+=a.length):h.domNode.textContent.startsWith(a)&&(h.deleteAt(0,a.length),m===0?l-=a.length:d-=a.length)}),this.quill.update(U.sources.USER),this.quill.setSelection(l,d,U.sources.SILENT)}}}function op(i,o){return{key:i,shiftKey:o,altKey:null,[i==="ArrowLeft"?"prefix":"suffix"]:/^$/,handler(r){let{index:n}=r;i==="ArrowRight"&&(n+=r.length+1);let[a]=this.quill.getLeaf(n);return a instanceof ce?(i==="ArrowLeft"?o?this.quill.setSelection(r.index-1,r.length+1,U.sources.USER):this.quill.setSelection(r.index-1,U.sources.USER):o?this.quill.setSelection(r.index,r.length+1,U.sources.USER):this.quill.setSelection(r.index+r.length+1,U.sources.USER),!1):!0}}}function hm(i){return{key:i[0],shortKey:!0,handler(o,t){this.quill.format(i,!t.format[i],U.sources.USER)}}}function Xz(i){return{key:i?"ArrowUp":"ArrowDown",collapsed:!0,format:["table"],handler(o,t){let r=i?"prev":"next",n=t.line,a=n.parent[r];if(a!=null){if(a.statics.blotName==="table-row"){let s=a.children.head,l=n;for(;l.prev!=null;)l=l.prev,s=s.next;let d=s.offset(this.quill.scroll)+Math.min(t.offset,s.length()-1);this.quill.setSelection(d,0,U.sources.USER)}}else{let s=n.table()[r];s!=null&&(i?this.quill.setSelection(s.offset(this.quill.scroll)+s.length()-1,0,U.sources.USER):this.quill.setSelection(s.offset(this.quill.scroll),0,U.sources.USER))}return!1}}}function I3(i){if(typeof i=="string"||typeof i=="number")i={key:i};else if(typeof i=="object")i=gn(i);else return null;return i.shortKey&&(i[q3]=i.shortKey,delete i.shortKey),i}function Nl(i){let{quill:o,range:t}=i,r=o.getLines(t),n={};if(r.length>1){let a=r[0].formats(),s=r[r.length-1].formats();n=fr.AttributeMap.diff(s,a)||{}}o.deleteText(t,U.sources.USER),Object.keys(n).length>0&&o.formatLine(t.index,1,n,U.sources.USER),o.setSelection(t.index,U.sources.SILENT)}function N3(i,o,t,r){return o.prev==null&&o.next==null?t.prev==null&&t.next==null?r===0?-1:1:t.prev==null?-1:1:o.prev==null?-1:o.next==null?1:null}var D3=/font-weight:\s*normal/,R3=["P","OL","UL"],Qz=i=>i&&R3.includes(i.tagName),O3=i=>{Array.from(i.querySelectorAll("br")).filter(o=>Qz(o.previousElementSibling)&&Qz(o.nextElementSibling)).forEach(o=>{o.parentNode?.removeChild(o)})},P3=i=>{Array.from(i.querySelectorAll('b[style*="font-weight"]')).filter(o=>o.getAttribute("style")?.match(D3)).forEach(o=>{let t=i.createDocumentFragment();t.append(...o.childNodes),o.parentNode?.replaceChild(t,o)})};function um(i){i.querySelector('[id^="docs-internal-guid-"]')&&(P3(i),O3(i))}var H3=/\bmso-list:[^;]*ignore/i,F3=/\bmso-list:[^;]*\bl(\d+)/i,B3=/\bmso-list:[^;]*\blevel(\d+)/i,V3=(i,o)=>{let t=i.getAttribute("style"),r=t?.match(F3);if(!r)return null;let n=Number(r[1]),a=t?.match(B3),s=a?Number(a[1]):1,l=new RegExp(`@list l${n}:level${s}\\s*\\{[^\\}]*mso-level-number-format:\\s*([\\w-]+)`,"i"),d=o.match(l),h=d&&d[1]==="bullet"?"bullet":"ordered";return{id:n,indent:s,type:h,element:i}},U3=i=>{let o=Array.from(i.querySelectorAll("[style*=mso-list]")),t=[],r=[];o.forEach(s=>{(s.getAttribute("style")||"").match(H3)?t.push(s):r.push(s)}),t.forEach(s=>s.parentNode?.removeChild(s));let n=i.documentElement.innerHTML,a=r.map(s=>V3(s,n)).filter(s=>s);for(;a.length;){let s=[],l=a.shift();for(;l;)s.push(l),l=a.length&&a[0]?.element===l.element.nextElementSibling&&a[0].id===l.id?a.shift():null;let d=document.createElement("ul");s.forEach(f=>{let b=document.createElement("li");b.setAttribute("data-list",f.type),f.indent>1&&b.setAttribute("class",`ql-indent-${f.indent-1}`),b.innerHTML=f.element.innerHTML,d.appendChild(b)});let h=s[0]?.element,{parentNode:m}=h??{};h&&m?.replaceChild(d,h),s.slice(1).forEach(f=>{let{element:b}=f;m?.removeChild(b)})}};function mm(i){i.documentElement.getAttribute("xmlns:w")==="urn:schemas-microsoft-com:office:word"&&U3(i)}var j3=[mm,um],G3=i=>{i.documentElement&&j3.forEach(o=>{o(i)})},Jz=G3;var W3=oo("quill:clipboard"),K3=[[Node.TEXT_NODE,aM],[Node.TEXT_NODE,tw],["br",Z3],[Node.ELEMENT_NODE,tw],[Node.ELEMENT_NODE,J3],[Node.ELEMENT_NODE,Q3],[Node.ELEMENT_NODE,nM],["li",rM],["ol, ul",oM],["pre",tM],["tr",iM],["b",fm("bold")],["i",fm("italic")],["strike",fm("strike")],["style",eM]],Y3=[jz,Zd].reduce((i,o)=>(i[o.keyName]=o,i),{}),Zz=[Jd,Ml,ql,tp,ep,rp].reduce((i,o)=>(i[o.keyName]=o,i),{}),Dl=class extends ee{constructor(o,t){super(o,t),this.quill.root.addEventListener("copy",r=>this.onCaptureCopy(r,!1)),this.quill.root.addEventListener("cut",r=>this.onCaptureCopy(r,!0)),this.quill.root.addEventListener("paste",this.onCapturePaste.bind(this)),this.matchers=[],K3.concat(this.options.matchers??[]).forEach(r=>{let[n,a]=r;this.addMatcher(n,a)})}addMatcher(o,t){this.matchers.push([o,t])}convert(o){let{html:t,text:r}=o,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(n[_e.blotName])return new Ur.default().insert(r||"",{[_e.blotName]:n[_e.blotName]});if(!t)return new Ur.default().insert(r||"",n);let a=this.convertHTML(t);return Rl(a,`
2506
2509
  `)&&(a.ops[a.ops.length-1].attributes==null||n.table)?a.compose(new Ur.default().retain(a.length()-1).delete(1)):a}normalizeHTML(o){Jz(o)}convertHTML(o){let t=new DOMParser().parseFromString(o,"text/html");this.normalizeHTML(t);let r=t.body,n=new WeakMap,[a,s]=this.prepareMatching(r,n);return ip(this.quill.scroll,r,a,s,n)}dangerouslyPasteHTML(o,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:U.sources.API;if(typeof o=="string"){let n=this.convert({html:o,text:""});this.quill.setContents(n,t),this.quill.setSelection(0,U.sources.SILENT)}else{let n=this.convert({html:t,text:""});this.quill.updateContents(new Ur.default().retain(o).concat(n),r),this.quill.setSelection(o+n.length(),U.sources.SILENT)}}onCaptureCopy(o){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(o.defaultPrevented)return;o.preventDefault();let[r]=this.quill.selection.getRange();if(r==null)return;let{html:n,text:a}=this.onCopy(r,t);o.clipboardData?.setData("text/plain",a),o.clipboardData?.setData("text/html",n),t&&Nl({range:r,quill:this.quill})}normalizeURIList(o){return o.split(/\r?\n/).filter(t=>t[0]!=="#").join(`
2507
- `)}onCapturePaste(o){if(o.defaultPrevented||!this.quill.isEnabled())return;o.preventDefault();let t=this.quill.getSelection(!0);if(t==null)return;let r=o.clipboardData?.getData("text/html"),n=o.clipboardData?.getData("text/plain");if(!r&&!n){let s=o.clipboardData?.getData("text/uri-list");s&&(n=this.normalizeURIList(s))}let a=Array.from(o.clipboardData?.files||[]);if(!r&&a.length>0){this.quill.uploader.upload(t,a);return}if(r&&a.length>0){let s=new DOMParser().parseFromString(r,"text/html");if(s.body.childElementCount===1&&s.body.firstElementChild?.tagName==="IMG"){this.quill.uploader.upload(t,a);return}}this.onPaste(t,{html:r,text:n})}onCopy(o){let t=this.quill.getText(o);return{html:this.quill.getSemanticHTML(o),text:t}}onPaste(o,t){let{text:r,html:n}=t,a=this.quill.getFormat(o.index),s=this.convert({text:r,html:n},a);W3.log("onPaste",s,{text:r,html:n});let l=new Ur.default().retain(o.index).delete(o.length).concat(s);this.quill.updateContents(l,U.sources.USER),this.quill.setSelection(l.length()-o.length,U.sources.SILENT),this.quill.scrollSelectionIntoView()}prepareMatching(o,t){let r=[],n=[];return this.matchers.forEach(a=>{let[s,l]=a;switch(s){case Node.TEXT_NODE:n.push(l);break;case Node.ELEMENT_NODE:r.push(l);break;default:Array.from(o.querySelectorAll(s)).forEach(d=>{t.has(d)?t.get(d)?.push(l):t.set(d,[l])});break}}),[r,n]}};V(Dl,"DEFAULTS",{matchers:[]});function fa(i,o,t,r){return r.query(o)?i.reduce((n,a)=>{if(!a.insert)return n;if(a.attributes&&a.attributes[o])return n.push(a);let s=t?{[o]:t}:{};return n.insert(a.insert,{...s,...a.attributes})},new Ur.default):i}function Rl(i,o){let t="";for(let r=i.ops.length-1;r>=0&&t.length<o.length;--r){let n=i.ops[r];if(typeof n.insert!="string")break;t=n.insert+t}return t.slice(-1*o.length)===o}function ki(i,o){if(!(i instanceof Element))return!1;let t=o.query(i);return t&&t.prototype instanceof le?!1:["address","article","blockquote","canvas","dd","div","dl","dt","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","iframe","li","main","nav","ol","output","p","pre","section","table","td","tr","ul","video"].includes(i.tagName.toLowerCase())}function X3(i,o){return i.previousElementSibling&&i.nextElementSibling&&!ki(i.previousElementSibling,o)&&!ki(i.nextElementSibling,o)}var np=new WeakMap;function ew(i){return i==null?!1:(np.has(i)||(i.tagName==="PRE"?np.set(i,!0):np.set(i,ew(i.parentNode))),np.get(i))}function ip(i,o,t,r,n){return o.nodeType===o.TEXT_NODE?r.reduce((a,s)=>s(o,a,i),new Ur.default):o.nodeType===o.ELEMENT_NODE?Array.from(o.childNodes||[]).reduce((a,s)=>{let l=ip(i,s,t,r,n);return s.nodeType===o.ELEMENT_NODE&&(l=t.reduce((d,h)=>h(s,d,i),l),l=(n.get(s)||[]).reduce((d,h)=>h(s,d,i),l)),a.concat(l)},new Ur.default):new Ur.default}function fm(i){return(o,t,r)=>fa(t,i,!0,r)}function Q3(i,o,t){let r=Sr.keys(i),n=Te.keys(i),a=Br.keys(i),s={};return r.concat(n).concat(a).forEach(l=>{let d=t.query(l,X.ATTRIBUTE);d!=null&&(s[d.attrName]=d.value(i),s[d.attrName])||(d=Y3[l],d!=null&&(d.attrName===l||d.keyName===l)&&(s[d.attrName]=d.value(i)||void 0),d=Zz[l],d!=null&&(d.attrName===l||d.keyName===l)&&(d=Zz[l],s[d.attrName]=d.value(i)||void 0))}),Object.entries(s).reduce((l,d)=>{let[h,m]=d;return fa(l,h,m,t)},o)}function J3(i,o,t){let r=t.query(i);if(r==null)return o;if(r.prototype instanceof le){let n={},a=r.value(i);if(a!=null)return n[r.blotName]=a,new Ur.default().insert(n,r.formats(i,t))}else if(r.prototype instanceof ua&&!Rl(o,`
2510
+ `)}onCapturePaste(o){if(o.defaultPrevented||!this.quill.isEnabled())return;o.preventDefault();let t=this.quill.getSelection(!0);if(t==null)return;let r=o.clipboardData?.getData("text/html"),n=o.clipboardData?.getData("text/plain");if(!r&&!n){let s=o.clipboardData?.getData("text/uri-list");s&&(n=this.normalizeURIList(s))}let a=Array.from(o.clipboardData?.files||[]);if(!r&&a.length>0){this.quill.uploader.upload(t,a);return}if(r&&a.length>0){let s=new DOMParser().parseFromString(r,"text/html");if(s.body.childElementCount===1&&s.body.firstElementChild?.tagName==="IMG"){this.quill.uploader.upload(t,a);return}}this.onPaste(t,{html:r,text:n})}onCopy(o){let t=this.quill.getText(o);return{html:this.quill.getSemanticHTML(o),text:t}}onPaste(o,t){let{text:r,html:n}=t,a=this.quill.getFormat(o.index),s=this.convert({text:r,html:n},a);W3.log("onPaste",s,{text:r,html:n});let l=new Ur.default().retain(o.index).delete(o.length).concat(s);this.quill.updateContents(l,U.sources.USER),this.quill.setSelection(l.length()-o.length,U.sources.SILENT),this.quill.scrollSelectionIntoView()}prepareMatching(o,t){let r=[],n=[];return this.matchers.forEach(a=>{let[s,l]=a;switch(s){case Node.TEXT_NODE:n.push(l);break;case Node.ELEMENT_NODE:r.push(l);break;default:Array.from(o.querySelectorAll(s)).forEach(d=>{t.has(d)?t.get(d)?.push(l):t.set(d,[l])});break}}),[r,n]}};V(Dl,"DEFAULTS",{matchers:[]});function fa(i,o,t,r){return r.query(o)?i.reduce((n,a)=>{if(!a.insert)return n;if(a.attributes&&a.attributes[o])return n.push(a);let s=t?{[o]:t}:{};return n.insert(a.insert,{...s,...a.attributes})},new Ur.default):i}function Rl(i,o){let t="";for(let r=i.ops.length-1;r>=0&&t.length<o.length;--r){let n=i.ops[r];if(typeof n.insert!="string")break;t=n.insert+t}return t.slice(-1*o.length)===o}function ki(i,o){if(!(i instanceof Element))return!1;let t=o.query(i);return t&&t.prototype instanceof ce?!1:["address","article","blockquote","canvas","dd","div","dl","dt","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","iframe","li","main","nav","ol","output","p","pre","section","table","td","tr","ul","video"].includes(i.tagName.toLowerCase())}function X3(i,o){return i.previousElementSibling&&i.nextElementSibling&&!ki(i.previousElementSibling,o)&&!ki(i.nextElementSibling,o)}var np=new WeakMap;function ew(i){return i==null?!1:(np.has(i)||(i.tagName==="PRE"?np.set(i,!0):np.set(i,ew(i.parentNode))),np.get(i))}function ip(i,o,t,r,n){return o.nodeType===o.TEXT_NODE?r.reduce((a,s)=>s(o,a,i),new Ur.default):o.nodeType===o.ELEMENT_NODE?Array.from(o.childNodes||[]).reduce((a,s)=>{let l=ip(i,s,t,r,n);return s.nodeType===o.ELEMENT_NODE&&(l=t.reduce((d,h)=>h(s,d,i),l),l=(n.get(s)||[]).reduce((d,h)=>h(s,d,i),l)),a.concat(l)},new Ur.default):new Ur.default}function fm(i){return(o,t,r)=>fa(t,i,!0,r)}function Q3(i,o,t){let r=Sr.keys(i),n=Te.keys(i),a=Br.keys(i),s={};return r.concat(n).concat(a).forEach(l=>{let d=t.query(l,X.ATTRIBUTE);d!=null&&(s[d.attrName]=d.value(i),s[d.attrName])||(d=Y3[l],d!=null&&(d.attrName===l||d.keyName===l)&&(s[d.attrName]=d.value(i)||void 0),d=Zz[l],d!=null&&(d.attrName===l||d.keyName===l)&&(d=Zz[l],s[d.attrName]=d.value(i)||void 0))}),Object.entries(s).reduce((l,d)=>{let[h,m]=d;return fa(l,h,m,t)},o)}function J3(i,o,t){let r=t.query(i);if(r==null)return o;if(r.prototype instanceof ce){let n={},a=r.value(i);if(a!=null)return n[r.blotName]=a,new Ur.default().insert(n,r.formats(i,t))}else if(r.prototype instanceof ua&&!Rl(o,`
2508
2511
  `)&&o.insert(`
2509
2512
  `),"blotName"in r&&"formats"in r&&typeof r.formats=="function")return fa(o,r.blotName,r.formats(i,t),t);return o}function Z3(i,o){return Rl(o,`
2510
2513
  `)||o.insert(`
@@ -2515,7 +2518,7 @@ ${ma(this.code(o,t))}
2515
2518
  `);let n=t.query(r);if(n&&n.prototype instanceof Oe)return o.insert(`
2516
2519
  `);r=r.firstChild}}}return o}function nM(i,o,t){let r={},n=i.style||{};return n.fontStyle==="italic"&&(r.italic=!0),n.textDecoration==="underline"&&(r.underline=!0),n.textDecoration==="line-through"&&(r.strike=!0),(n.fontWeight?.startsWith("bold")||parseInt(n.fontWeight,10)>=700)&&(r.bold=!0),o=Object.entries(r).reduce((a,s)=>{let[l,d]=s;return fa(a,l,d,t)},o),parseFloat(n.textIndent||0)>0?new Ur.default().insert(" ").concat(o):o}function iM(i,o,t){let r=i.parentElement?.tagName==="TABLE"?i.parentElement:i.parentElement?.parentElement;if(r!=null){let a=Array.from(r.querySelectorAll("tr")).indexOf(i)+1;return fa(o,"table",a,t)}return o}function aM(i,o,t){let r=i.data;if(i.parentElement?.tagName==="O:P")return o.insert(r.trim());if(!ew(i)){if(r.trim().length===0&&r.includes(`
2517
2520
  `)&&!X3(i,t))return o;r=r.replace(/[^\S\u00a0]/g," "),r=r.replace(/ {2,}/g," "),(i.previousSibling==null&&i.parentElement!=null&&ki(i.parentElement,t)||i.previousSibling instanceof Element&&ki(i.previousSibling,t))&&(r=r.replace(/^ /,"")),(i.nextSibling==null&&i.parentElement!=null&&ki(i.parentElement,t)||i.nextSibling instanceof Element&&ki(i.nextSibling,t))&&(r=r.replace(/ $/,"")),r=r.replaceAll("\xA0"," ")}return o.insert(r)}var Ol=class extends ee{constructor(t,r){super(t,r);V(this,"lastRecorded",0);V(this,"ignoreChange",!1);V(this,"stack",{undo:[],redo:[]});V(this,"currentRange",null);this.quill.on(U.events.EDITOR_CHANGE,(n,a,s,l)=>{n===U.events.SELECTION_CHANGE?a&&l!==U.sources.SILENT&&(this.currentRange=a):n===U.events.TEXT_CHANGE&&(this.ignoreChange||(!this.options.userOnly||l===U.sources.USER?this.record(a,s):this.transform(a)),this.currentRange=gm(this.currentRange,a))}),this.quill.keyboard.addBinding({key:"z",shortKey:!0},this.undo.bind(this)),this.quill.keyboard.addBinding({key:["z","Z"],shortKey:!0,shiftKey:!0},this.redo.bind(this)),/Win/i.test(navigator.platform)&&this.quill.keyboard.addBinding({key:"y",shortKey:!0},this.redo.bind(this)),this.quill.root.addEventListener("beforeinput",n=>{n.inputType==="historyUndo"?(this.undo(),n.preventDefault()):n.inputType==="historyRedo"&&(this.redo(),n.preventDefault())})}change(t,r){if(this.stack[t].length===0)return;let n=this.stack[t].pop();if(!n)return;let a=this.quill.getContents(),s=n.delta.invert(a);this.stack[r].push({delta:s,range:gm(n.range,s)}),this.lastRecorded=0,this.ignoreChange=!0,this.quill.updateContents(n.delta,U.sources.USER),this.ignoreChange=!1,this.restoreSelection(n)}clear(){this.stack={undo:[],redo:[]}}cutoff(){this.lastRecorded=0}record(t,r){if(t.ops.length===0)return;this.stack.redo=[];let n=t.invert(r),a=this.currentRange,s=Date.now();if(this.lastRecorded+this.options.delay>s&&this.stack.undo.length>0){let l=this.stack.undo.pop();l&&(n=n.compose(l.delta),a=l.range)}else this.lastRecorded=s;n.length()!==0&&(this.stack.undo.push({delta:n,range:a}),this.stack.undo.length>this.options.maxStack&&this.stack.undo.shift())}redo(){this.change("redo","undo")}transform(t){rw(this.stack.undo,t),rw(this.stack.redo,t)}undo(){this.change("undo","redo")}restoreSelection(t){if(t.range)this.quill.setSelection(t.range,U.sources.USER);else{let r=lM(this.quill.scroll,t.delta);this.quill.setSelection(r,U.sources.USER)}}};V(Ol,"DEFAULTS",{delay:1e3,maxStack:100,userOnly:!1});function rw(i,o){let t=o;for(let r=i.length-1;r>=0;r-=1){let n=i[r];i[r]={delta:t.transform(n.delta,!0),range:n.range&&gm(n.range,t)},t=n.delta.transform(t),i[r].delta.length()===0&&i.splice(r,1)}}function sM(i,o){let t=o.ops[o.ops.length-1];return t==null?!1:t.insert!=null?typeof t.insert=="string"&&t.insert.endsWith(`
2518
- `):t.attributes!=null?Object.keys(t.attributes).some(r=>i.query(r,X.BLOCK)!=null):!1}function lM(i,o){let t=o.reduce((n,a)=>n+(a.delete||0),0),r=o.length()-t;return sM(i,o)&&(r-=1),r}function gm(i,o){if(!i)return i;let t=o.transformPosition(i.index),r=o.transformPosition(i.index+i.length);return{index:t,length:r-t}}var ow=ar(Or(),1);var ap=class extends ee{constructor(o,t){super(o,t),o.root.addEventListener("drop",r=>{r.preventDefault();let n=null;if(document.caretRangeFromPoint)n=document.caretRangeFromPoint(r.clientX,r.clientY);else if(document.caretPositionFromPoint){let s=document.caretPositionFromPoint(r.clientX,r.clientY);n=document.createRange(),n.setStart(s.offsetNode,s.offset),n.setEnd(s.offsetNode,s.offset)}let a=n&&o.selection.normalizeNative(n);if(a){let s=o.selection.normalizedToRange(a);r.dataTransfer?.files&&this.upload(s,r.dataTransfer.files)}})}upload(o,t){let r=[];Array.from(t).forEach(n=>{n&&this.options.mimetypes?.includes(n.type)&&r.push(n)}),r.length>0&&this.options.handler.call(this,o,r)}};ap.DEFAULTS={mimetypes:["image/png","image/jpeg"],handler(i,o){if(!this.quill.scroll.query("image"))return;let t=o.map(r=>new Promise(n=>{let a=new FileReader;a.onload=()=>{n(a.result)},a.readAsDataURL(r)}));Promise.all(t).then(r=>{let n=r.reduce((a,s)=>a.insert({image:s}),new ow.default().retain(i.index).delete(i.length));this.quill.updateContents(n,Q.sources.USER),this.quill.setSelection(i.index+r.length,Q.sources.SILENT)})}};var nw=ap;var Si=ar(Or(),1);var iw=ar(Or(),1);var cM=["insertText","insertReplacementText"],bm=class extends ee{constructor(o,t){super(o,t),o.root.addEventListener("beforeinput",r=>{this.handleBeforeInput(r)}),/Android/i.test(navigator.userAgent)||o.on(U.events.COMPOSITION_BEFORE_START,()=>{this.handleCompositionStart()})}deleteRange(o){Nl({range:o,quill:this.quill})}replaceText(o){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";if(o.length===0)return!1;if(t){let r=this.quill.getFormat(o.index,1);this.deleteRange(o),this.quill.updateContents(new iw.default().retain(o.index).insert(t,r),U.sources.USER)}else this.deleteRange(o);return this.quill.setSelection(o.index+t.length,0,U.sources.SILENT),!0}handleBeforeInput(o){if(this.quill.composition.isComposing||o.defaultPrevented||!cM.includes(o.inputType))return;let t=o.getTargetRanges?o.getTargetRanges()[0]:null;if(!t||t.collapsed===!0)return;let r=dM(o);if(r==null)return;let n=this.quill.selection.normalizeNative(t),a=n?this.quill.selection.normalizedToRange(n):null;a&&this.replaceText(a,r)&&o.preventDefault()}handleCompositionStart(){let o=this.quill.getSelection();o&&this.replaceText(o)}};function dM(i){return typeof i.data=="string"?i.data:i.dataTransfer?.types.includes("text/plain")?i.dataTransfer.getData("text/plain"):null}var aw=bm;var pM=/Mac/i.test(navigator.platform),hM=100,uM=i=>!!(i.key==="ArrowLeft"||i.key==="ArrowRight"||i.key==="ArrowUp"||i.key==="ArrowDown"||i.key==="Home"||pM&&i.key==="a"&&i.ctrlKey===!0),vm=class extends ee{constructor(t,r){super(t,r);V(this,"isListening",!1);V(this,"selectionChangeDeadline",0);this.handleArrowKeys(),this.handleNavigationShortcuts()}handleArrowKeys(){this.quill.keyboard.addBinding({key:["ArrowLeft","ArrowRight"],offset:0,shiftKey:null,handler(t,r){let{line:n,event:a}=r;if(!(n instanceof Fr)||!n.uiNode)return!0;let s=getComputedStyle(n.domNode).direction==="rtl";return s&&a.key!=="ArrowRight"||!s&&a.key!=="ArrowLeft"?!0:(this.quill.setSelection(t.index-1,t.length+(a.shiftKey?1:0),U.sources.USER),!1)}})}handleNavigationShortcuts(){this.quill.root.addEventListener("keydown",t=>{!t.defaultPrevented&&uM(t)&&this.ensureListeningToSelectionChange()})}ensureListeningToSelectionChange(){if(this.selectionChangeDeadline=Date.now()+hM,this.isListening)return;this.isListening=!0;let t=()=>{this.isListening=!1,Date.now()<=this.selectionChangeDeadline&&this.handleSelectionChange()};document.addEventListener("selectionchange",t,{once:!0})}handleSelectionChange(){let t=document.getSelection();if(!t)return;let r=t.getRangeAt(0);if(r.collapsed!==!0||r.startOffset!==0)return;let n=this.quill.scroll.find(r.startContainer);if(!(n instanceof Fr)||!n.uiNode)return;let a=document.createRange();a.setStartAfter(n.uiNode),a.setEndAfter(n.uiNode),t.removeAllRanges(),t.addRange(a)}},sw=vm;U.register({"blots/block":Rt,"blots/block/embed":Oe,"blots/break":hr,"blots/container":wo,"blots/cursor":zi,"blots/embed":bs,"blots/inline":ur,"blots/scroll":Uz,"blots/text":we,"modules/clipboard":Dl,"modules/history":Ol,"modules/keyboard":Il,"modules/uploader":nw,"modules/input":aw,"modules/uiNode":sw});var sp=U;var xm=class extends Te{add(o,t){let r=0;if(t==="+1"||t==="-1"){let n=this.value(o)||0;r=t==="+1"?n+1:n-1}else typeof t=="number"&&(r=t);return r===0?(this.remove(o),!0):super.add(o,r.toString())}canAdd(o,t){return super.canAdd(o,t)||super.canAdd(o,parseInt(t,10))}value(o){return parseInt(super.value(o),10)||void 0}},mM=new xm("indent","ql-indent",{scope:X.BLOCK,whitelist:[1,2,3,4,5,6,7,8]}),lw=mM;var Pl=class extends Rt{};V(Pl,"blotName","blockquote"),V(Pl,"tagName","blockquote");var cw=Pl;var Hl=class extends Rt{static formats(o){return this.tagName.indexOf(o.tagName)+1}};V(Hl,"blotName","header"),V(Hl,"tagName",["H1","H2","H3","H4","H5","H6"]);var dw=Hl;var ga=class extends wo{};ga.blotName="list-container";ga.tagName="OL";var Ci=class extends Rt{static create(o){let t=super.create();return t.setAttribute("data-list",o),t}static formats(o){return o.getAttribute("data-list")||void 0}static register(){U.register(ga)}constructor(o,t){super(o,t);let r=t.ownerDocument.createElement("span"),n=a=>{if(!o.isEnabled())return;let s=this.statics.formats(t,o);s==="checked"?(this.format("list","unchecked"),a.preventDefault()):s==="unchecked"&&(this.format("list","checked"),a.preventDefault())};r.addEventListener("mousedown",n),r.addEventListener("touchstart",n),this.attachUI(r)}format(o,t){o===this.statics.blotName&&t?this.domNode.setAttribute("data-list",t):super.format(o,t)}};Ci.blotName="list";Ci.tagName="LI";ga.allowedChildren=[Ci];Ci.requiredContainer=ga;var Fl=class extends ur{static create(){return super.create()}static formats(){return!0}optimize(o){super.optimize(o),this.domNode.tagName!==this.statics.tagName[0]&&this.replaceWith(this.statics.blotName)}};V(Fl,"blotName","bold"),V(Fl,"tagName",["STRONG","B"]);var zs=Fl;var Bl=class extends zs{};V(Bl,"blotName","italic"),V(Bl,"tagName",["EM","I"]);var pw=Bl;var no=class extends ur{static create(o){let t=super.create(o);return t.setAttribute("href",this.sanitize(o)),t.setAttribute("rel","noopener noreferrer"),t.setAttribute("target","_blank"),t}static formats(o){return o.getAttribute("href")}static sanitize(o){return ym(o,this.PROTOCOL_WHITELIST)?o:this.SANITIZED_URL}format(o,t){o!==this.statics.blotName||!t?super.format(o,t):this.domNode.setAttribute("href",this.constructor.sanitize(t))}};V(no,"blotName","link"),V(no,"tagName","A"),V(no,"SANITIZED_URL","about:blank"),V(no,"PROTOCOL_WHITELIST",["http","https","mailto","tel","sms"]);function ym(i,o){let t=document.createElement("a");t.href=i;let r=t.href.slice(0,t.href.indexOf(":"));return o.indexOf(r)>-1}var Vl=class extends ur{static create(o){return o==="super"?document.createElement("sup"):o==="sub"?document.createElement("sub"):super.create(o)}static formats(o){if(o.tagName==="SUB")return"sub";if(o.tagName==="SUP")return"super"}};V(Vl,"blotName","script"),V(Vl,"tagName",["SUB","SUP"]);var hw=Vl;var Ul=class extends zs{};V(Ul,"blotName","strike"),V(Ul,"tagName",["S","STRIKE"]);var uw=Ul;var jl=class extends ur{};V(jl,"blotName","underline"),V(jl,"tagName","U");var mw=jl;var ws=class extends bs{static create(o){if(window.katex==null)throw new Error("Formula module requires KaTeX.");let t=super.create(o);return typeof o=="string"&&(window.katex.render(o,t,{throwOnError:!1,errorColor:"#f00"}),t.setAttribute("data-value",o)),t}static value(o){return o.getAttribute("data-value")}html(){let{formula:o}=this.value();return`<span>${o}</span>`}};V(ws,"blotName","formula"),V(ws,"className","ql-formula"),V(ws,"tagName","SPAN");var fw=ws;var gw=["alt","height","width"],Gl=class extends le{static create(o){let t=super.create(o);return typeof o=="string"&&t.setAttribute("src",this.sanitize(o)),t}static formats(o){return gw.reduce((t,r)=>(o.hasAttribute(r)&&(t[r]=o.getAttribute(r)),t),{})}static match(o){return/\.(jpe?g|gif|png)$/.test(o)||/^data:image\/.+;base64/.test(o)}static sanitize(o){return ym(o,["http","https","data"])?o:"//:0"}static value(o){return o.getAttribute("src")}format(o,t){gw.indexOf(o)>-1?t?this.domNode.setAttribute(o,t):this.domNode.removeAttribute(o):super.format(o,t)}};V(Gl,"blotName","image"),V(Gl,"tagName","IMG");var bw=Gl;var vw=["height","width"],_s=class extends Oe{static create(o){let t=super.create(o);return t.setAttribute("frameborder","0"),t.setAttribute("allowfullscreen","true"),t.setAttribute("src",this.sanitize(o)),t}static formats(o){return vw.reduce((t,r)=>(o.hasAttribute(r)&&(t[r]=o.getAttribute(r)),t),{})}static sanitize(o){return no.sanitize(o)}static value(o){return o.getAttribute("src")}format(o,t){vw.indexOf(o)>-1?t?this.domNode.setAttribute(o,t):this.domNode.removeAttribute(o):super.format(o,t)}html(){let{video:o}=this.value();return`<a href="${o}">${o}</a>`}};V(_s,"blotName","video"),V(_s,"className","ql-video"),V(_s,"tagName","IFRAME");var xw=_s;var lp=ar(Or(),1);var Wl=new Te("code-token","hljs",{scope:X.INLINE}),Wn=class i extends ur{static formats(o,t){for(;o!=null&&o!==t.domNode;){if(o.classList&&o.classList.contains(_e.className))return super.formats(o,t);o=o.parentNode}}constructor(o,t,r){super(o,t,r),Wl.add(this.domNode,r)}format(o,t){o!==i.blotName?super.format(o,t):t?Wl.add(this.domNode,t):(Wl.remove(this.domNode),this.domNode.classList.remove(this.statics.className))}optimize(){super.optimize(...arguments),Wl.value(this.domNode)||this.unwrap()}};Wn.blotName="code-token";Wn.className="ql-token";var jr=class extends _e{static create(o){let t=super.create(o);return typeof o=="string"&&t.setAttribute("data-language",o),t}static formats(o){return o.getAttribute("data-language")||"plain"}static register(){}format(o,t){o===this.statics.blotName&&t?this.domNode.setAttribute("data-language",t):super.format(o,t)}replaceWith(o,t){return this.formatAt(0,this.length(),Wn.blotName,!1),super.replaceWith(o,t)}},ba=class extends vn{attach(){super.attach(),this.forceNext=!1,this.scroll.emitMount(this)}format(o,t){o===jr.blotName&&(this.forceNext=!0,this.children.forEach(r=>{r.format(o,t)}))}formatAt(o,t,r,n){r===jr.blotName&&(this.forceNext=!0),super.formatAt(o,t,r,n)}highlight(o){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(this.children.head==null)return;let n=`${Array.from(this.domNode.childNodes).filter(s=>s!==this.uiNode).map(s=>s.textContent).join(`
2521
+ `):t.attributes!=null?Object.keys(t.attributes).some(r=>i.query(r,X.BLOCK)!=null):!1}function lM(i,o){let t=o.reduce((n,a)=>n+(a.delete||0),0),r=o.length()-t;return sM(i,o)&&(r-=1),r}function gm(i,o){if(!i)return i;let t=o.transformPosition(i.index),r=o.transformPosition(i.index+i.length);return{index:t,length:r-t}}var ow=ar(Or(),1);var ap=class extends ee{constructor(o,t){super(o,t),o.root.addEventListener("drop",r=>{r.preventDefault();let n=null;if(document.caretRangeFromPoint)n=document.caretRangeFromPoint(r.clientX,r.clientY);else if(document.caretPositionFromPoint){let s=document.caretPositionFromPoint(r.clientX,r.clientY);n=document.createRange(),n.setStart(s.offsetNode,s.offset),n.setEnd(s.offsetNode,s.offset)}let a=n&&o.selection.normalizeNative(n);if(a){let s=o.selection.normalizedToRange(a);r.dataTransfer?.files&&this.upload(s,r.dataTransfer.files)}})}upload(o,t){let r=[];Array.from(t).forEach(n=>{n&&this.options.mimetypes?.includes(n.type)&&r.push(n)}),r.length>0&&this.options.handler.call(this,o,r)}};ap.DEFAULTS={mimetypes:["image/png","image/jpeg"],handler(i,o){if(!this.quill.scroll.query("image"))return;let t=o.map(r=>new Promise(n=>{let a=new FileReader;a.onload=()=>{n(a.result)},a.readAsDataURL(r)}));Promise.all(t).then(r=>{let n=r.reduce((a,s)=>a.insert({image:s}),new ow.default().retain(i.index).delete(i.length));this.quill.updateContents(n,Q.sources.USER),this.quill.setSelection(i.index+r.length,Q.sources.SILENT)})}};var nw=ap;var Si=ar(Or(),1);var iw=ar(Or(),1);var cM=["insertText","insertReplacementText"],bm=class extends ee{constructor(o,t){super(o,t),o.root.addEventListener("beforeinput",r=>{this.handleBeforeInput(r)}),/Android/i.test(navigator.userAgent)||o.on(U.events.COMPOSITION_BEFORE_START,()=>{this.handleCompositionStart()})}deleteRange(o){Nl({range:o,quill:this.quill})}replaceText(o){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";if(o.length===0)return!1;if(t){let r=this.quill.getFormat(o.index,1);this.deleteRange(o),this.quill.updateContents(new iw.default().retain(o.index).insert(t,r),U.sources.USER)}else this.deleteRange(o);return this.quill.setSelection(o.index+t.length,0,U.sources.SILENT),!0}handleBeforeInput(o){if(this.quill.composition.isComposing||o.defaultPrevented||!cM.includes(o.inputType))return;let t=o.getTargetRanges?o.getTargetRanges()[0]:null;if(!t||t.collapsed===!0)return;let r=dM(o);if(r==null)return;let n=this.quill.selection.normalizeNative(t),a=n?this.quill.selection.normalizedToRange(n):null;a&&this.replaceText(a,r)&&o.preventDefault()}handleCompositionStart(){let o=this.quill.getSelection();o&&this.replaceText(o)}};function dM(i){return typeof i.data=="string"?i.data:i.dataTransfer?.types.includes("text/plain")?i.dataTransfer.getData("text/plain"):null}var aw=bm;var pM=/Mac/i.test(navigator.platform),hM=100,uM=i=>!!(i.key==="ArrowLeft"||i.key==="ArrowRight"||i.key==="ArrowUp"||i.key==="ArrowDown"||i.key==="Home"||pM&&i.key==="a"&&i.ctrlKey===!0),vm=class extends ee{constructor(t,r){super(t,r);V(this,"isListening",!1);V(this,"selectionChangeDeadline",0);this.handleArrowKeys(),this.handleNavigationShortcuts()}handleArrowKeys(){this.quill.keyboard.addBinding({key:["ArrowLeft","ArrowRight"],offset:0,shiftKey:null,handler(t,r){let{line:n,event:a}=r;if(!(n instanceof Fr)||!n.uiNode)return!0;let s=getComputedStyle(n.domNode).direction==="rtl";return s&&a.key!=="ArrowRight"||!s&&a.key!=="ArrowLeft"?!0:(this.quill.setSelection(t.index-1,t.length+(a.shiftKey?1:0),U.sources.USER),!1)}})}handleNavigationShortcuts(){this.quill.root.addEventListener("keydown",t=>{!t.defaultPrevented&&uM(t)&&this.ensureListeningToSelectionChange()})}ensureListeningToSelectionChange(){if(this.selectionChangeDeadline=Date.now()+hM,this.isListening)return;this.isListening=!0;let t=()=>{this.isListening=!1,Date.now()<=this.selectionChangeDeadline&&this.handleSelectionChange()};document.addEventListener("selectionchange",t,{once:!0})}handleSelectionChange(){let t=document.getSelection();if(!t)return;let r=t.getRangeAt(0);if(r.collapsed!==!0||r.startOffset!==0)return;let n=this.quill.scroll.find(r.startContainer);if(!(n instanceof Fr)||!n.uiNode)return;let a=document.createRange();a.setStartAfter(n.uiNode),a.setEndAfter(n.uiNode),t.removeAllRanges(),t.addRange(a)}},sw=vm;U.register({"blots/block":Rt,"blots/block/embed":Oe,"blots/break":hr,"blots/container":wo,"blots/cursor":zi,"blots/embed":bs,"blots/inline":ur,"blots/scroll":Uz,"blots/text":we,"modules/clipboard":Dl,"modules/history":Ol,"modules/keyboard":Il,"modules/uploader":nw,"modules/input":aw,"modules/uiNode":sw});var sp=U;var xm=class extends Te{add(o,t){let r=0;if(t==="+1"||t==="-1"){let n=this.value(o)||0;r=t==="+1"?n+1:n-1}else typeof t=="number"&&(r=t);return r===0?(this.remove(o),!0):super.add(o,r.toString())}canAdd(o,t){return super.canAdd(o,t)||super.canAdd(o,parseInt(t,10))}value(o){return parseInt(super.value(o),10)||void 0}},mM=new xm("indent","ql-indent",{scope:X.BLOCK,whitelist:[1,2,3,4,5,6,7,8]}),lw=mM;var Pl=class extends Rt{};V(Pl,"blotName","blockquote"),V(Pl,"tagName","blockquote");var cw=Pl;var Hl=class extends Rt{static formats(o){return this.tagName.indexOf(o.tagName)+1}};V(Hl,"blotName","header"),V(Hl,"tagName",["H1","H2","H3","H4","H5","H6"]);var dw=Hl;var ga=class extends wo{};ga.blotName="list-container";ga.tagName="OL";var Ci=class extends Rt{static create(o){let t=super.create();return t.setAttribute("data-list",o),t}static formats(o){return o.getAttribute("data-list")||void 0}static register(){U.register(ga)}constructor(o,t){super(o,t);let r=t.ownerDocument.createElement("span"),n=a=>{if(!o.isEnabled())return;let s=this.statics.formats(t,o);s==="checked"?(this.format("list","unchecked"),a.preventDefault()):s==="unchecked"&&(this.format("list","checked"),a.preventDefault())};r.addEventListener("mousedown",n),r.addEventListener("touchstart",n),this.attachUI(r)}format(o,t){o===this.statics.blotName&&t?this.domNode.setAttribute("data-list",t):super.format(o,t)}};Ci.blotName="list";Ci.tagName="LI";ga.allowedChildren=[Ci];Ci.requiredContainer=ga;var Fl=class extends ur{static create(){return super.create()}static formats(){return!0}optimize(o){super.optimize(o),this.domNode.tagName!==this.statics.tagName[0]&&this.replaceWith(this.statics.blotName)}};V(Fl,"blotName","bold"),V(Fl,"tagName",["STRONG","B"]);var zs=Fl;var Bl=class extends zs{};V(Bl,"blotName","italic"),V(Bl,"tagName",["EM","I"]);var pw=Bl;var no=class extends ur{static create(o){let t=super.create(o);return t.setAttribute("href",this.sanitize(o)),t.setAttribute("rel","noopener noreferrer"),t.setAttribute("target","_blank"),t}static formats(o){return o.getAttribute("href")}static sanitize(o){return ym(o,this.PROTOCOL_WHITELIST)?o:this.SANITIZED_URL}format(o,t){o!==this.statics.blotName||!t?super.format(o,t):this.domNode.setAttribute("href",this.constructor.sanitize(t))}};V(no,"blotName","link"),V(no,"tagName","A"),V(no,"SANITIZED_URL","about:blank"),V(no,"PROTOCOL_WHITELIST",["http","https","mailto","tel","sms"]);function ym(i,o){let t=document.createElement("a");t.href=i;let r=t.href.slice(0,t.href.indexOf(":"));return o.indexOf(r)>-1}var Vl=class extends ur{static create(o){return o==="super"?document.createElement("sup"):o==="sub"?document.createElement("sub"):super.create(o)}static formats(o){if(o.tagName==="SUB")return"sub";if(o.tagName==="SUP")return"super"}};V(Vl,"blotName","script"),V(Vl,"tagName",["SUB","SUP"]);var hw=Vl;var Ul=class extends zs{};V(Ul,"blotName","strike"),V(Ul,"tagName",["S","STRIKE"]);var uw=Ul;var jl=class extends ur{};V(jl,"blotName","underline"),V(jl,"tagName","U");var mw=jl;var ws=class extends bs{static create(o){if(window.katex==null)throw new Error("Formula module requires KaTeX.");let t=super.create(o);return typeof o=="string"&&(window.katex.render(o,t,{throwOnError:!1,errorColor:"#f00"}),t.setAttribute("data-value",o)),t}static value(o){return o.getAttribute("data-value")}html(){let{formula:o}=this.value();return`<span>${o}</span>`}};V(ws,"blotName","formula"),V(ws,"className","ql-formula"),V(ws,"tagName","SPAN");var fw=ws;var gw=["alt","height","width"],Gl=class extends ce{static create(o){let t=super.create(o);return typeof o=="string"&&t.setAttribute("src",this.sanitize(o)),t}static formats(o){return gw.reduce((t,r)=>(o.hasAttribute(r)&&(t[r]=o.getAttribute(r)),t),{})}static match(o){return/\.(jpe?g|gif|png)$/.test(o)||/^data:image\/.+;base64/.test(o)}static sanitize(o){return ym(o,["http","https","data"])?o:"//:0"}static value(o){return o.getAttribute("src")}format(o,t){gw.indexOf(o)>-1?t?this.domNode.setAttribute(o,t):this.domNode.removeAttribute(o):super.format(o,t)}};V(Gl,"blotName","image"),V(Gl,"tagName","IMG");var bw=Gl;var vw=["height","width"],_s=class extends Oe{static create(o){let t=super.create(o);return t.setAttribute("frameborder","0"),t.setAttribute("allowfullscreen","true"),t.setAttribute("src",this.sanitize(o)),t}static formats(o){return vw.reduce((t,r)=>(o.hasAttribute(r)&&(t[r]=o.getAttribute(r)),t),{})}static sanitize(o){return no.sanitize(o)}static value(o){return o.getAttribute("src")}format(o,t){vw.indexOf(o)>-1?t?this.domNode.setAttribute(o,t):this.domNode.removeAttribute(o):super.format(o,t)}html(){let{video:o}=this.value();return`<a href="${o}">${o}</a>`}};V(_s,"blotName","video"),V(_s,"className","ql-video"),V(_s,"tagName","IFRAME");var xw=_s;var lp=ar(Or(),1);var Wl=new Te("code-token","hljs",{scope:X.INLINE}),Wn=class i extends ur{static formats(o,t){for(;o!=null&&o!==t.domNode;){if(o.classList&&o.classList.contains(_e.className))return super.formats(o,t);o=o.parentNode}}constructor(o,t,r){super(o,t,r),Wl.add(this.domNode,r)}format(o,t){o!==i.blotName?super.format(o,t):t?Wl.add(this.domNode,t):(Wl.remove(this.domNode),this.domNode.classList.remove(this.statics.className))}optimize(){super.optimize(...arguments),Wl.value(this.domNode)||this.unwrap()}};Wn.blotName="code-token";Wn.className="ql-token";var jr=class extends _e{static create(o){let t=super.create(o);return typeof o=="string"&&t.setAttribute("data-language",o),t}static formats(o){return o.getAttribute("data-language")||"plain"}static register(){}format(o,t){o===this.statics.blotName&&t?this.domNode.setAttribute("data-language",t):super.format(o,t)}replaceWith(o,t){return this.formatAt(0,this.length(),Wn.blotName,!1),super.replaceWith(o,t)}},ba=class extends vn{attach(){super.attach(),this.forceNext=!1,this.scroll.emitMount(this)}format(o,t){o===jr.blotName&&(this.forceNext=!0,this.children.forEach(r=>{r.format(o,t)}))}formatAt(o,t,r,n){r===jr.blotName&&(this.forceNext=!0),super.formatAt(o,t,r,n)}highlight(o){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(this.children.head==null)return;let n=`${Array.from(this.domNode.childNodes).filter(s=>s!==this.uiNode).map(s=>s.textContent).join(`
2519
2522
  `)}
2520
2523
  `,a=jr.formats(this.children.head.domNode);if(t||this.forceNext||this.cachedText!==n){if(n.trim().length>0||this.cachedText==null){let s=this.children.reduce((d,h)=>d.concat(Hu(h,!1)),new lp.default),l=o(n,a);s.diff(l).reduce((d,h)=>{let{retain:m,attributes:f}=h;return m?(f&&Object.keys(f).forEach(b=>{[jr.blotName,Wn.blotName].includes(b)&&this.formatAt(d,m,b,f[b])}),d+m):d},0)}this.cachedText=n,this.forceNext=!1}}html(o,t){let[r]=this.children.find(o);return`<pre data-language="${r?jr.formats(r.domNode):"plain"}">
2521
2524
  ${ma(this.code(o,t))}
@@ -2524,7 +2527,7 @@ ${ma(this.code(o,t))}
2524
2527
  `,{[_e.blotName]:t}),n.insert(a)),new lp.default);let r=this.quill.root.ownerDocument.createElement("div");return r.classList.add(_e.className),r.innerHTML=fM(this.options.hljs,t,o),ip(this.quill.scroll,r,[(n,a)=>{let s=Wl.value(n);return s?a.compose(new lp.default().retain(a.length(),{[Wn.blotName]:s})):a}],[(n,a)=>n.data.split(`
2525
2528
  `).reduce((s,l,d)=>(d!==0&&s.insert(`
2526
2529
  `,{[_e.blotName]:t}),s.insert(l)),a)],new WeakMap)}};Kl.DEFAULTS={hljs:window.hljs,interval:1e3,languages:[{key:"plain",label:"Plain"},{key:"bash",label:"Bash"},{key:"cpp",label:"C++"},{key:"cs",label:"C#"},{key:"css",label:"CSS"},{key:"diff",label:"Diff"},{key:"xml",label:"HTML/XML"},{key:"java",label:"Java"},{key:"javascript",label:"JavaScript"},{key:"markdown",label:"Markdown"},{key:"php",label:"PHP"},{key:"python",label:"Python"},{key:"ruby",label:"Ruby"},{key:"sql",label:"SQL"}]};var yw=ar(Or(),1);var Yl=class Yl extends Rt{static create(o){let t=super.create();return o?t.setAttribute("data-row",o):t.setAttribute("data-row",cp()),t}static formats(o){if(o.hasAttribute("data-row"))return o.getAttribute("data-row")}cellOffset(){return this.parent?this.parent.children.indexOf(this):-1}format(o,t){o===Yl.blotName&&t?this.domNode.setAttribute("data-row",t):super.format(o,t)}row(){return this.parent}rowOffset(){return this.row()?this.row().rowOffset():-1}table(){return this.row()&&this.row().table()}};V(Yl,"blotName","table"),V(Yl,"tagName","TD");var ko=Yl,So=class extends wo{checkMerge(){if(super.checkMerge()&&this.next.children.head!=null){let o=this.children.head.formats(),t=this.children.tail.formats(),r=this.next.children.head.formats(),n=this.next.children.tail.formats();return o.table===t.table&&o.table===r.table&&o.table===n.table}return!1}optimize(o){super.optimize(o),this.children.forEach(t=>{if(t.next==null)return;let r=t.formats(),n=t.next.formats();if(r.table!==n.table){let a=this.splitAfter(t);a&&a.optimize(),this.prev&&this.prev.optimize()}})}rowOffset(){return this.parent?this.parent.children.indexOf(this):-1}table(){return this.parent&&this.parent.parent}};V(So,"blotName","table-row"),V(So,"tagName","TR");var io=class extends wo{};V(io,"blotName","table-body"),V(io,"tagName","TBODY");var Kn=class extends wo{balanceCells(){let o=this.descendants(So),t=o.reduce((r,n)=>Math.max(n.children.length,r),0);o.forEach(r=>{new Array(t-r.children.length).fill(0).forEach(()=>{let n;r.children.head!=null&&(n=ko.formats(r.children.head.domNode));let a=this.scroll.create(ko.blotName,n);r.appendChild(a),a.optimize()})})}cells(o){return this.rows().map(t=>t.children.at(o))}deleteColumn(o){let[t]=this.descendant(io);t==null||t.children.head==null||t.children.forEach(r=>{let n=r.children.at(o);n?.remove()})}insertColumn(o){let[t]=this.descendant(io);t==null||t.children.head==null||t.children.forEach(r=>{let n=r.children.at(o),a=ko.formats(r.children.head.domNode),s=this.scroll.create(ko.blotName,a);r.insertBefore(s,n)})}insertRow(o){let[t]=this.descendant(io);if(t==null||t.children.head==null)return;let r=cp(),n=this.scroll.create(So.blotName);t.children.head.children.forEach(()=>{let s=this.scroll.create(ko.blotName,r);n.appendChild(s)});let a=t.children.at(o);t.insertBefore(n,a)}rows(){let o=this.children.head;return o==null?[]:o.children.map(t=>t)}};V(Kn,"blotName","table-container"),V(Kn,"tagName","TABLE");Kn.allowedChildren=[io];io.requiredContainer=Kn;io.allowedChildren=[So];So.requiredContainer=io;So.allowedChildren=[ko];ko.requiredContainer=So;function cp(){return`row-${Math.random().toString(36).slice(2,6)}`}var zm=class extends ee{static register(){U.register(ko),U.register(So),U.register(io),U.register(Kn)}constructor(){super(...arguments),this.listenBalanceCells()}balanceTables(){this.quill.scroll.descendants(Kn).forEach(o=>{o.balanceCells()})}deleteColumn(){let[o,,t]=this.getTable();t!=null&&(o.deleteColumn(t.cellOffset()),this.quill.update(U.sources.USER))}deleteRow(){let[,o]=this.getTable();o!=null&&(o.remove(),this.quill.update(U.sources.USER))}deleteTable(){let[o]=this.getTable();if(o==null)return;let t=o.offset();o.remove(),this.quill.update(U.sources.USER),this.quill.setSelection(t,U.sources.SILENT)}getTable(){let o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.quill.getSelection();if(o==null)return[null,null,null,-1];let[t,r]=this.quill.getLine(o.index);if(t==null||t.statics.blotName!==ko.blotName)return[null,null,null,-1];let n=t.parent;return[n.parent.parent,n,t,r]}insertColumn(o){let t=this.quill.getSelection();if(!t)return;let[r,n,a]=this.getTable(t);if(a==null)return;let s=a.cellOffset();r.insertColumn(s+o),this.quill.update(U.sources.USER);let l=n.rowOffset();o===0&&(l+=1),this.quill.setSelection(t.index+l,t.length,U.sources.SILENT)}insertColumnLeft(){this.insertColumn(0)}insertColumnRight(){this.insertColumn(1)}insertRow(o){let t=this.quill.getSelection();if(!t)return;let[r,n,a]=this.getTable(t);if(a==null)return;let s=n.rowOffset();r.insertRow(s+o),this.quill.update(U.sources.USER),o>0?this.quill.setSelection(t,U.sources.SILENT):this.quill.setSelection(t.index+n.children.length,t.length,U.sources.SILENT)}insertRowAbove(){this.insertRow(0)}insertRowBelow(){this.insertRow(1)}insertTable(o,t){let r=this.quill.getSelection();if(r==null)return;let n=new Array(o).fill(0).reduce(a=>{let s=new Array(t).fill(`
2527
- `).join("");return a.insert(s,{table:cp()})},new yw.default().retain(r.index));this.quill.updateContents(n,U.sources.USER),this.quill.setSelection(r.index,U.sources.SILENT),this.balanceTables()}listenBalanceCells(){this.quill.on(U.events.SCROLL_OPTIMIZE,o=>{o.some(t=>["TD","TR","TBODY","TABLE"].includes(t.target.tagName)?(this.quill.once(U.events.TEXT_CHANGE,(r,n,a)=>{a===U.sources.USER&&this.balanceTables()}),!0):!1)})}},zw=zm;var kw=ar(Or(),1);var ww=oo("quill:toolbar"),Ei=class extends ee{constructor(o,t){if(super(o,t),Array.isArray(this.options.container)){let r=document.createElement("div");r.setAttribute("role","toolbar"),gM(r,this.options.container),o.container?.parentNode?.insertBefore(r,o.container),this.container=r}else typeof this.options.container=="string"?this.container=document.querySelector(this.options.container):this.container=this.options.container;if(!(this.container instanceof HTMLElement)){ww.error("Container required for toolbar",this.options);return}this.container.classList.add("ql-toolbar"),this.controls=[],this.handlers={},this.options.handlers&&Object.keys(this.options.handlers).forEach(r=>{let n=this.options.handlers?.[r];n&&this.addHandler(r,n)}),Array.from(this.container.querySelectorAll("button, select")).forEach(r=>{this.attach(r)}),this.quill.on(U.events.EDITOR_CHANGE,()=>{let[r]=this.quill.selection.getRange();this.update(r)})}addHandler(o,t){this.handlers[o]=t}attach(o){let t=Array.from(o.classList).find(n=>n.indexOf("ql-")===0);if(!t)return;if(t=t.slice(3),o.tagName==="BUTTON"&&o.setAttribute("type","button"),this.handlers[t]==null&&this.quill.scroll.query(t)==null){ww.warn("ignoring attaching to nonexistent format",t,o);return}let r=o.tagName==="SELECT"?"change":"click";o.addEventListener(r,n=>{let a;if(o.tagName==="SELECT"){if(o.selectedIndex<0)return;let l=o.options[o.selectedIndex];l.hasAttribute("selected")?a=!1:a=l.value||!1}else o.classList.contains("ql-active")?a=!1:a=o.value||!o.hasAttribute("value"),n.preventDefault();this.quill.focus();let[s]=this.quill.selection.getRange();if(this.handlers[t]!=null)this.handlers[t].call(this,a);else if(this.quill.scroll.query(t).prototype instanceof le){if(a=prompt(`Enter ${t}`),!a)return;this.quill.updateContents(new kw.default().retain(s.index).delete(s.length).insert({[t]:a}),U.sources.USER)}else this.quill.format(t,a,U.sources.USER);this.update(s)}),this.controls.push([t,o])}update(o){let t=o==null?{}:this.quill.getFormat(o);this.controls.forEach(r=>{let[n,a]=r;if(a.tagName==="SELECT"){let s=null;if(o==null)s=null;else if(t[n]==null)s=a.querySelector("option[selected]");else if(!Array.isArray(t[n])){let l=t[n];typeof l=="string"&&(l=l.replace(/"/g,'\\"')),s=a.querySelector(`option[value="${l}"]`)}s==null?(a.value="",a.selectedIndex=-1):s.selected=!0}else if(o==null)a.classList.remove("ql-active"),a.setAttribute("aria-pressed","false");else if(a.hasAttribute("value")){let s=t[n],l=s===a.getAttribute("value")||s!=null&&s.toString()===a.getAttribute("value")||s==null&&!a.getAttribute("value");a.classList.toggle("ql-active",l),a.setAttribute("aria-pressed",l.toString())}else{let s=t[n]!=null;a.classList.toggle("ql-active",s),a.setAttribute("aria-pressed",s.toString())}})}};Ei.DEFAULTS={};function _w(i,o,t){let r=document.createElement("button");r.setAttribute("type","button"),r.classList.add(`ql-${o}`),r.setAttribute("aria-pressed","false"),t!=null?(r.value=t,r.setAttribute("aria-label",`${o}: ${t}`)):r.setAttribute("aria-label",o),i.appendChild(r)}function gM(i,o){Array.isArray(o[0])||(o=[o]),o.forEach(t=>{let r=document.createElement("span");r.classList.add("ql-formats"),t.forEach(n=>{if(typeof n=="string")_w(r,n);else{let a=Object.keys(n)[0],s=n[a];Array.isArray(s)?bM(r,a,s):_w(r,a,s)}}),i.appendChild(r)})}function bM(i,o,t){let r=document.createElement("select");r.classList.add(`ql-${o}`),t.forEach(n=>{let a=document.createElement("option");n!==!1?a.setAttribute("value",String(n)):a.setAttribute("selected","selected"),r.appendChild(a)}),i.appendChild(r)}Ei.DEFAULTS={container:null,handlers:{clean(){let i=this.quill.getSelection();if(i!=null)if(i.length===0){let o=this.quill.getFormat();Object.keys(o).forEach(t=>{this.quill.scroll.query(t,X.INLINE)!=null&&this.quill.format(t,!1,U.sources.USER)})}else this.quill.removeFormat(i.index,i.length,U.sources.USER)},direction(i){let{align:o}=this.quill.getFormat();i==="rtl"&&o==null?this.quill.format("align","right",U.sources.USER):!i&&o==="right"&&this.quill.format("align",!1,U.sources.USER),this.quill.format("direction",i,U.sources.USER)},indent(i){let o=this.quill.getSelection(),t=this.quill.getFormat(o),r=parseInt(t.indent||0,10);if(i==="+1"||i==="-1"){let n=i==="+1"?1:-1;t.direction==="rtl"&&(n*=-1),this.quill.format("indent",r+n,U.sources.USER)}},link(i){i===!0&&(i=prompt("Enter link URL:")),this.quill.format("link",i,U.sources.USER)},list(i){let o=this.quill.getSelection(),t=this.quill.getFormat(o);i==="check"?t.list==="checked"||t.list==="unchecked"?this.quill.format("list",!1,U.sources.USER):this.quill.format("list","unchecked",U.sources.USER):this.quill.format("list",i,U.sources.USER)}}};var vM='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="3" x2="15" y1="9" y2="9"/><line class="ql-stroke" x1="3" x2="13" y1="14" y2="14"/><line class="ql-stroke" x1="3" x2="9" y1="4" y2="4"/></svg>',xM='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="15" x2="3" y1="9" y2="9"/><line class="ql-stroke" x1="14" x2="4" y1="14" y2="14"/><line class="ql-stroke" x1="12" x2="6" y1="4" y2="4"/></svg>',yM='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="15" x2="3" y1="9" y2="9"/><line class="ql-stroke" x1="15" x2="5" y1="14" y2="14"/><line class="ql-stroke" x1="15" x2="9" y1="4" y2="4"/></svg>',zM='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="15" x2="3" y1="9" y2="9"/><line class="ql-stroke" x1="15" x2="3" y1="14" y2="14"/><line class="ql-stroke" x1="15" x2="3" y1="4" y2="4"/></svg>',wM='<svg viewbox="0 0 18 18"><g class="ql-fill ql-color-label"><polygon points="6 6.868 6 6 5 6 5 7 5.942 7 6 6.868"/><rect height="1" width="1" x="4" y="4"/><polygon points="6.817 5 6 5 6 6 6.38 6 6.817 5"/><rect height="1" width="1" x="2" y="6"/><rect height="1" width="1" x="3" y="5"/><rect height="1" width="1" x="4" y="7"/><polygon points="4 11.439 4 11 3 11 3 12 3.755 12 4 11.439"/><rect height="1" width="1" x="2" y="12"/><rect height="1" width="1" x="2" y="9"/><rect height="1" width="1" x="2" y="15"/><polygon points="4.63 10 4 10 4 11 4.192 11 4.63 10"/><rect height="1" width="1" x="3" y="8"/><path d="M10.832,4.2L11,4.582V4H10.708A1.948,1.948,0,0,1,10.832,4.2Z"/><path d="M7,4.582L7.168,4.2A1.929,1.929,0,0,1,7.292,4H7V4.582Z"/><path d="M8,13H7.683l-0.351.8a1.933,1.933,0,0,1-.124.2H8V13Z"/><rect height="1" width="1" x="12" y="2"/><rect height="1" width="1" x="11" y="3"/><path d="M9,3H8V3.282A1.985,1.985,0,0,1,9,3Z"/><rect height="1" width="1" x="2" y="3"/><rect height="1" width="1" x="6" y="2"/><rect height="1" width="1" x="3" y="2"/><rect height="1" width="1" x="5" y="3"/><rect height="1" width="1" x="9" y="2"/><rect height="1" width="1" x="15" y="14"/><polygon points="13.447 10.174 13.469 10.225 13.472 10.232 13.808 11 14 11 14 10 13.37 10 13.447 10.174"/><rect height="1" width="1" x="13" y="7"/><rect height="1" width="1" x="15" y="5"/><rect height="1" width="1" x="14" y="6"/><rect height="1" width="1" x="15" y="8"/><rect height="1" width="1" x="14" y="9"/><path d="M3.775,14H3v1H4V14.314A1.97,1.97,0,0,1,3.775,14Z"/><rect height="1" width="1" x="14" y="3"/><polygon points="12 6.868 12 6 11.62 6 12 6.868"/><rect height="1" width="1" x="15" y="2"/><rect height="1" width="1" x="12" y="5"/><rect height="1" width="1" x="13" y="4"/><polygon points="12.933 9 13 9 13 8 12.495 8 12.933 9"/><rect height="1" width="1" x="9" y="14"/><rect height="1" width="1" x="8" y="15"/><path d="M6,14.926V15H7V14.316A1.993,1.993,0,0,1,6,14.926Z"/><rect height="1" width="1" x="5" y="15"/><path d="M10.668,13.8L10.317,13H10v1h0.792A1.947,1.947,0,0,1,10.668,13.8Z"/><rect height="1" width="1" x="11" y="15"/><path d="M14.332,12.2a1.99,1.99,0,0,1,.166.8H15V12H14.245Z"/><rect height="1" width="1" x="14" y="15"/><rect height="1" width="1" x="15" y="11"/></g><polyline class="ql-stroke" points="5.5 13 9 5 12.5 13"/><line class="ql-stroke" x1="11.63" x2="6.38" y1="11" y2="11"/></svg>',_M='<svg viewbox="0 0 18 18"><rect class="ql-fill ql-stroke" height="3" width="3" x="4" y="5"/><rect class="ql-fill ql-stroke" height="3" width="3" x="11" y="5"/><path class="ql-even ql-fill ql-stroke" d="M7,8c0,4.031-3,5-3,5"/><path class="ql-even ql-fill ql-stroke" d="M14,8c0,4.031-3,5-3,5"/></svg>',kM='<svg viewbox="0 0 18 18"><path class="ql-stroke" d="M5,4H9.5A2.5,2.5,0,0,1,12,6.5v0A2.5,2.5,0,0,1,9.5,9H5A0,0,0,0,1,5,9V4A0,0,0,0,1,5,4Z"/><path class="ql-stroke" d="M5,9h5.5A2.5,2.5,0,0,1,13,11.5v0A2.5,2.5,0,0,1,10.5,14H5a0,0,0,0,1,0,0V9A0,0,0,0,1,5,9Z"/></svg>',SM='<svg class="" viewbox="0 0 18 18"><line class="ql-stroke" x1="5" x2="13" y1="3" y2="3"/><line class="ql-stroke" x1="6" x2="9.35" y1="12" y2="3"/><line class="ql-stroke" x1="11" x2="15" y1="11" y2="15"/><line class="ql-stroke" x1="15" x2="11" y1="11" y2="15"/><rect class="ql-fill" height="1" rx="0.5" ry="0.5" width="7" x="2" y="14"/></svg>',Sw='<svg viewbox="0 0 18 18"><polyline class="ql-even ql-stroke" points="5 7 3 9 5 11"/><polyline class="ql-even ql-stroke" points="13 7 15 9 13 11"/><line class="ql-stroke" x1="10" x2="8" y1="5" y2="13"/></svg>',CM='<svg viewbox="0 0 18 18"><line class="ql-color-label ql-stroke ql-transparent" x1="3" x2="15" y1="15" y2="15"/><polyline class="ql-stroke" points="5.5 11 9 3 12.5 11"/><line class="ql-stroke" x1="11.63" x2="6.38" y1="9" y2="9"/></svg>',EM='<svg viewbox="0 0 18 18"><polygon class="ql-stroke ql-fill" points="3 11 5 9 3 7 3 11"/><line class="ql-stroke ql-fill" x1="15" x2="11" y1="4" y2="4"/><path class="ql-fill" d="M11,3a3,3,0,0,0,0,6h1V3H11Z"/><rect class="ql-fill" height="11" width="1" x="11" y="4"/><rect class="ql-fill" height="11" width="1" x="13" y="4"/></svg>',TM='<svg viewbox="0 0 18 18"><polygon class="ql-stroke ql-fill" points="15 12 13 10 15 8 15 12"/><line class="ql-stroke ql-fill" x1="9" x2="5" y1="4" y2="4"/><path class="ql-fill" d="M5,3A3,3,0,0,0,5,9H6V3H5Z"/><rect class="ql-fill" height="11" width="1" x="5" y="4"/><rect class="ql-fill" height="11" width="1" x="7" y="4"/></svg>',AM='<svg viewbox="0 0 18 18"><path class="ql-fill" d="M11.759,2.482a2.561,2.561,0,0,0-3.53.607A7.656,7.656,0,0,0,6.8,6.2C6.109,9.188,5.275,14.677,4.15,14.927a1.545,1.545,0,0,0-1.3-.933A0.922,0.922,0,0,0,2,15.036S1.954,16,4.119,16s3.091-2.691,3.7-5.553c0.177-.826.36-1.726,0.554-2.6L8.775,6.2c0.381-1.421.807-2.521,1.306-2.676a1.014,1.014,0,0,0,1.02.56A0.966,0.966,0,0,0,11.759,2.482Z"/><rect class="ql-fill" height="1.6" rx="0.8" ry="0.8" width="5" x="5.15" y="6.2"/><path class="ql-fill" d="M13.663,12.027a1.662,1.662,0,0,1,.266-0.276q0.193,0.069.456,0.138a2.1,2.1,0,0,0,.535.069,1.075,1.075,0,0,0,.767-0.3,1.044,1.044,0,0,0,.314-0.8,0.84,0.84,0,0,0-.238-0.619,0.8,0.8,0,0,0-.594-0.239,1.154,1.154,0,0,0-.781.3,4.607,4.607,0,0,0-.781,1q-0.091.15-.218,0.346l-0.246.38c-0.068-.288-0.137-0.582-0.212-0.885-0.459-1.847-2.494-.984-2.941-0.8-0.482.2-.353,0.647-0.094,0.529a0.869,0.869,0,0,1,1.281.585c0.217,0.751.377,1.436,0.527,2.038a5.688,5.688,0,0,1-.362.467,2.69,2.69,0,0,1-.264.271q-0.221-.08-0.471-0.147a2.029,2.029,0,0,0-.522-0.066,1.079,1.079,0,0,0-.768.3A1.058,1.058,0,0,0,9,15.131a0.82,0.82,0,0,0,.832.852,1.134,1.134,0,0,0,.787-0.3,5.11,5.11,0,0,0,.776-0.993q0.141-.219.215-0.34c0.046-.076.122-0.194,0.223-0.346a2.786,2.786,0,0,0,.918,1.726,2.582,2.582,0,0,0,2.376-.185c0.317-.181.212-0.565,0-0.494A0.807,0.807,0,0,1,14.176,15a5.159,5.159,0,0,1-.913-2.446l0,0Q13.487,12.24,13.663,12.027Z"/></svg>',$M='<svg viewBox="0 0 18 18"><path class="ql-fill" d="M10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Zm6.06787,9.209H14.98975V7.59863a.54085.54085,0,0,0-.605-.60547h-.62744a1.01119,1.01119,0,0,0-.748.29688L11.645,8.56641a.5435.5435,0,0,0-.022.8584l.28613.30762a.53861.53861,0,0,0,.84717.0332l.09912-.08789a1.2137,1.2137,0,0,0,.2417-.35254h.02246s-.01123.30859-.01123.60547V13.209H12.041a.54085.54085,0,0,0-.605.60547v.43945a.54085.54085,0,0,0,.605.60547h4.02686a.54085.54085,0,0,0,.605-.60547v-.43945A.54085.54085,0,0,0,16.06787,13.209Z"/></svg>',LM='<svg viewBox="0 0 18 18"><path class="ql-fill" d="M16.73975,13.81445v.43945a.54085.54085,0,0,1-.605.60547H11.855a.58392.58392,0,0,1-.64893-.60547V14.0127c0-2.90527,3.39941-3.42187,3.39941-4.55469a.77675.77675,0,0,0-.84717-.78125,1.17684,1.17684,0,0,0-.83594.38477c-.2749.26367-.561.374-.85791.13184l-.4292-.34082c-.30811-.24219-.38525-.51758-.1543-.81445a2.97155,2.97155,0,0,1,2.45361-1.17676,2.45393,2.45393,0,0,1,2.68408,2.40918c0,2.45312-3.1792,2.92676-3.27832,3.93848h2.79443A.54085.54085,0,0,1,16.73975,13.81445ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z"/></svg>',qM='<svg viewBox="0 0 18 18"><path class="ql-fill" d="M16.65186,12.30664a2.6742,2.6742,0,0,1-2.915,2.68457,3.96592,3.96592,0,0,1-2.25537-.6709.56007.56007,0,0,1-.13232-.83594L11.64648,13c.209-.34082.48389-.36328.82471-.1543a2.32654,2.32654,0,0,0,1.12256.33008c.71484,0,1.12207-.35156,1.12207-.78125,0-.61523-.61621-.86816-1.46338-.86816H13.2085a.65159.65159,0,0,1-.68213-.41895l-.05518-.10937a.67114.67114,0,0,1,.14307-.78125l.71533-.86914a8.55289,8.55289,0,0,1,.68213-.7373V8.58887a3.93913,3.93913,0,0,1-.748.05469H11.9873a.54085.54085,0,0,1-.605-.60547V7.59863a.54085.54085,0,0,1,.605-.60547h3.75146a.53773.53773,0,0,1,.60547.59375v.17676a1.03723,1.03723,0,0,1-.27539.748L14.74854,10.0293A2.31132,2.31132,0,0,1,16.65186,12.30664ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z"/></svg>',MM='<svg viewBox="0 0 18 18"><path class="ql-fill" d="M10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Zm7.05371,7.96582v.38477c0,.39648-.165.60547-.46191.60547h-.47314v1.29785a.54085.54085,0,0,1-.605.60547h-.69336a.54085.54085,0,0,1-.605-.60547V12.95605H11.333a.5412.5412,0,0,1-.60547-.60547v-.15332a1.199,1.199,0,0,1,.22021-.748l2.56348-4.05957a.7819.7819,0,0,1,.72607-.39648h1.27637a.54085.54085,0,0,1,.605.60547v3.7627h.33008A.54055.54055,0,0,1,17.05371,11.96582ZM14.28125,8.7207h-.022a4.18969,4.18969,0,0,1-.38525.81348l-1.188,1.80469v.02246h1.5293V9.60059A7.04058,7.04058,0,0,1,14.28125,8.7207Z"/></svg>',IM='<svg viewBox="0 0 18 18"><path class="ql-fill" d="M16.74023,12.18555a2.75131,2.75131,0,0,1-2.91553,2.80566,3.908,3.908,0,0,1-2.25537-.68164.54809.54809,0,0,1-.13184-.8252L11.73438,13c.209-.34082.48389-.36328.8252-.1543a2.23757,2.23757,0,0,0,1.1001.33008,1.01827,1.01827,0,0,0,1.1001-.96777c0-.61621-.53906-.97949-1.25439-.97949a2.15554,2.15554,0,0,0-.64893.09961,1.15209,1.15209,0,0,1-.814.01074l-.12109-.04395a.64116.64116,0,0,1-.45117-.71484l.231-3.00391a.56666.56666,0,0,1,.62744-.583H15.541a.54085.54085,0,0,1,.605.60547v.43945a.54085.54085,0,0,1-.605.60547H13.41748l-.04395.72559a1.29306,1.29306,0,0,1-.04395.30859h.022a2.39776,2.39776,0,0,1,.57227-.07715A2.53266,2.53266,0,0,1,16.74023,12.18555ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z"/></svg>',NM='<svg viewBox="0 0 18 18"><path class="ql-fill" d="M14.51758,9.64453a1.85627,1.85627,0,0,0-1.24316.38477H13.252a1.73532,1.73532,0,0,1,1.72754-1.4082,2.66491,2.66491,0,0,1,.5498.06641c.35254.05469.57227.01074.70508-.40723l.16406-.5166a.53393.53393,0,0,0-.373-.75977,4.83723,4.83723,0,0,0-1.17773-.14258c-2.43164,0-3.7627,2.17773-3.7627,4.43359,0,2.47559,1.60645,3.69629,3.19043,3.69629A2.70585,2.70585,0,0,0,16.96,12.19727,2.43861,2.43861,0,0,0,14.51758,9.64453Zm-.23047,3.58691c-.67187,0-1.22168-.81445-1.22168-1.45215,0-.47363.30762-.583.72559-.583.96875,0,1.27734.59375,1.27734,1.12207A.82182.82182,0,0,1,14.28711,13.23145ZM10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Z"/></svg>',DM='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="7" x2="13" y1="4" y2="4"/><line class="ql-stroke" x1="5" x2="11" y1="14" y2="14"/><line class="ql-stroke" x1="8" x2="10" y1="14" y2="4"/></svg>',RM='<svg viewbox="0 0 18 18"><rect class="ql-stroke" height="10" width="12" x="3" y="4"/><circle class="ql-fill" cx="6" cy="7" r="1"/><polyline class="ql-even ql-fill" points="5 12 5 11 7 9 8 10 11 7 13 9 13 12 5 12"/></svg>',OM='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="3" x2="15" y1="14" y2="14"/><line class="ql-stroke" x1="3" x2="15" y1="4" y2="4"/><line class="ql-stroke" x1="9" x2="15" y1="9" y2="9"/><polyline class="ql-fill ql-stroke" points="3 7 3 11 5 9 3 7"/></svg>',PM='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="3" x2="15" y1="14" y2="14"/><line class="ql-stroke" x1="3" x2="15" y1="4" y2="4"/><line class="ql-stroke" x1="9" x2="15" y1="9" y2="9"/><polyline class="ql-stroke" points="5 7 5 11 3 9 5 7"/></svg>',HM='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="7" x2="11" y1="7" y2="11"/><path class="ql-even ql-stroke" d="M8.9,4.577a3.476,3.476,0,0,1,.36,4.679A3.476,3.476,0,0,1,4.577,8.9C3.185,7.5,2.035,6.4,4.217,4.217S7.5,3.185,8.9,4.577Z"/><path class="ql-even ql-stroke" d="M13.423,9.1a3.476,3.476,0,0,0-4.679-.36,3.476,3.476,0,0,0,.36,4.679c1.392,1.392,2.5,2.542,4.679.36S14.815,10.5,13.423,9.1Z"/></svg>',FM='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="6" x2="15" y1="4" y2="4"/><line class="ql-stroke" x1="6" x2="15" y1="9" y2="9"/><line class="ql-stroke" x1="6" x2="15" y1="14" y2="14"/><line class="ql-stroke" x1="3" x2="3" y1="4" y2="4"/><line class="ql-stroke" x1="3" x2="3" y1="9" y2="9"/><line class="ql-stroke" x1="3" x2="3" y1="14" y2="14"/></svg>',BM='<svg class="" viewbox="0 0 18 18"><line class="ql-stroke" x1="9" x2="15" y1="4" y2="4"/><polyline class="ql-stroke" points="3 4 4 5 6 3"/><line class="ql-stroke" x1="9" x2="15" y1="14" y2="14"/><polyline class="ql-stroke" points="3 14 4 15 6 13"/><line class="ql-stroke" x1="9" x2="15" y1="9" y2="9"/><polyline class="ql-stroke" points="3 9 4 10 6 8"/></svg>',VM='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="7" x2="15" y1="4" y2="4"/><line class="ql-stroke" x1="7" x2="15" y1="9" y2="9"/><line class="ql-stroke" x1="7" x2="15" y1="14" y2="14"/><line class="ql-stroke ql-thin" x1="2.5" x2="4.5" y1="5.5" y2="5.5"/><path class="ql-fill" d="M3.5,6A0.5,0.5,0,0,1,3,5.5V3.085l-0.276.138A0.5,0.5,0,0,1,2.053,3c-0.124-.247-0.023-0.324.224-0.447l1-.5A0.5,0.5,0,0,1,4,2.5v3A0.5,0.5,0,0,1,3.5,6Z"/><path class="ql-stroke ql-thin" d="M4.5,10.5h-2c0-.234,1.85-1.076,1.85-2.234A0.959,0.959,0,0,0,2.5,8.156"/><path class="ql-stroke ql-thin" d="M2.5,14.846a0.959,0.959,0,0,0,1.85-.109A0.7,0.7,0,0,0,3.75,14a0.688,0.688,0,0,0,.6-0.736,0.959,0.959,0,0,0-1.85-.109"/></svg>',UM='<svg viewbox="0 0 18 18"><path class="ql-fill" d="M15.5,15H13.861a3.858,3.858,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.921,1.921,0,0,0,12.021,11.7a0.50013,0.50013,0,1,0,.957.291h0a0.914,0.914,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.076-1.16971,1.86982-1.93971,2.43082A1.45639,1.45639,0,0,0,12,15.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,15Z"/><path class="ql-fill" d="M9.65,5.241a1,1,0,0,0-1.409.108L6,7.964,3.759,5.349A1,1,0,0,0,2.192,6.59178Q2.21541,6.6213,2.241,6.649L4.684,9.5,2.241,12.35A1,1,0,0,0,3.71,13.70722q0.02557-.02768.049-0.05722L6,11.036,8.241,13.65a1,1,0,1,0,1.567-1.24277Q9.78459,12.3777,9.759,12.35L7.316,9.5,9.759,6.651A1,1,0,0,0,9.65,5.241Z"/></svg>',jM='<svg viewbox="0 0 18 18"><path class="ql-fill" d="M15.5,7H13.861a4.015,4.015,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.922,1.922,0,0,0,12.021,3.7a0.5,0.5,0,1,0,.957.291,0.917,0.917,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.077-1.164,1.925-1.934,2.486A1.423,1.423,0,0,0,12,7.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,7Z"/><path class="ql-fill" d="M9.651,5.241a1,1,0,0,0-1.41.108L6,7.964,3.759,5.349a1,1,0,1,0-1.519,1.3L4.683,9.5,2.241,12.35a1,1,0,1,0,1.519,1.3L6,11.036,8.241,13.65a1,1,0,0,0,1.519-1.3L7.317,9.5,9.759,6.651A1,1,0,0,0,9.651,5.241Z"/></svg>',GM='<svg viewbox="0 0 18 18"><line class="ql-stroke ql-thin" x1="15.5" x2="2.5" y1="8.5" y2="9.5"/><path class="ql-fill" d="M9.007,8C6.542,7.791,6,7.519,6,6.5,6,5.792,7.283,5,9,5c1.571,0,2.765.679,2.969,1.309a1,1,0,0,0,1.9-.617C13.356,4.106,11.354,3,9,3,6.2,3,4,4.538,4,6.5a3.2,3.2,0,0,0,.5,1.843Z"/><path class="ql-fill" d="M8.984,10C11.457,10.208,12,10.479,12,11.5c0,0.708-1.283,1.5-3,1.5-1.571,0-2.765-.679-2.969-1.309a1,1,0,1,0-1.9.617C4.644,13.894,6.646,15,9,15c2.8,0,5-1.538,5-3.5a3.2,3.2,0,0,0-.5-1.843Z"/></svg>',WM='<svg viewbox="0 0 18 18"><rect class="ql-stroke" height="12" width="12" x="3" y="3"/><rect class="ql-fill" height="2" width="3" x="5" y="5"/><rect class="ql-fill" height="2" width="4" x="9" y="5"/><g class="ql-fill ql-transparent"><rect height="2" width="3" x="5" y="8"/><rect height="2" width="4" x="9" y="8"/><rect height="2" width="3" x="5" y="11"/><rect height="2" width="4" x="9" y="11"/></g></svg>',KM='<svg viewbox="0 0 18 18"><path class="ql-stroke" d="M5,3V9a4.012,4.012,0,0,0,4,4H9a4.012,4.012,0,0,0,4-4V3"/><rect class="ql-fill" height="1" rx="0.5" ry="0.5" width="12" x="3" y="15"/></svg>',YM='<svg viewbox="0 0 18 18"><rect class="ql-stroke" height="12" width="12" x="3" y="3"/><rect class="ql-fill" height="12" width="1" x="5" y="3"/><rect class="ql-fill" height="12" width="1" x="12" y="3"/><rect class="ql-fill" height="2" width="8" x="5" y="8"/><rect class="ql-fill" height="1" width="3" x="3" y="5"/><rect class="ql-fill" height="1" width="3" x="3" y="7"/><rect class="ql-fill" height="1" width="3" x="3" y="10"/><rect class="ql-fill" height="1" width="3" x="3" y="12"/><rect class="ql-fill" height="1" width="3" x="12" y="5"/><rect class="ql-fill" height="1" width="3" x="12" y="7"/><rect class="ql-fill" height="1" width="3" x="12" y="10"/><rect class="ql-fill" height="1" width="3" x="12" y="12"/></svg>',Ti={align:{"":vM,center:xM,right:yM,justify:zM},background:wM,blockquote:_M,bold:kM,clean:SM,code:Sw,"code-block":Sw,color:CM,direction:{"":EM,rtl:TM},formula:AM,header:{1:$M,2:LM,3:qM,4:MM,5:IM,6:NM},italic:DM,image:RM,indent:{"+1":OM,"-1":PM},link:HM,list:{bullet:FM,check:BM,ordered:VM},script:{sub:UM,super:jM},strike:GM,table:WM,underline:KM,video:YM};var XM='<svg viewbox="0 0 18 18"><polygon class="ql-stroke" points="7 11 9 13 11 11 7 11"/><polygon class="ql-stroke" points="7 7 9 5 11 7 7 7"/></svg>',Cw=0;function Ew(i,o){i.setAttribute(o,`${i.getAttribute(o)!=="true"}`)}var wm=class{constructor(o){this.select=o,this.container=document.createElement("span"),this.buildPicker(),this.select.style.display="none",this.select.parentNode.insertBefore(this.container,this.select),this.label.addEventListener("mousedown",()=>{this.togglePicker()}),this.label.addEventListener("keydown",t=>{switch(t.key){case"Enter":this.togglePicker();break;case"Escape":this.escape(),t.preventDefault();break;default:}}),this.select.addEventListener("change",this.update.bind(this))}togglePicker(){this.container.classList.toggle("ql-expanded"),Ew(this.label,"aria-expanded"),Ew(this.options,"aria-hidden")}buildItem(o){let t=document.createElement("span");t.tabIndex="0",t.setAttribute("role","button"),t.classList.add("ql-picker-item");let r=o.getAttribute("value");return r&&t.setAttribute("data-value",r),o.textContent&&t.setAttribute("data-label",o.textContent),t.addEventListener("click",()=>{this.selectItem(t,!0)}),t.addEventListener("keydown",n=>{switch(n.key){case"Enter":this.selectItem(t,!0),n.preventDefault();break;case"Escape":this.escape(),n.preventDefault();break;default:}}),t}buildLabel(){let o=document.createElement("span");return o.classList.add("ql-picker-label"),o.innerHTML=XM,o.tabIndex="0",o.setAttribute("role","button"),o.setAttribute("aria-expanded","false"),this.container.appendChild(o),o}buildOptions(){let o=document.createElement("span");o.classList.add("ql-picker-options"),o.setAttribute("aria-hidden","true"),o.tabIndex="-1",o.id=`ql-picker-options-${Cw}`,Cw+=1,this.label.setAttribute("aria-controls",o.id),this.options=o,Array.from(this.select.options).forEach(t=>{let r=this.buildItem(t);o.appendChild(r),t.selected===!0&&this.selectItem(r)}),this.container.appendChild(o)}buildPicker(){Array.from(this.select.attributes).forEach(o=>{this.container.setAttribute(o.name,o.value)}),this.container.classList.add("ql-picker"),this.label=this.buildLabel(),this.buildOptions()}escape(){this.close(),setTimeout(()=>this.label.focus(),1)}close(){this.container.classList.remove("ql-expanded"),this.label.setAttribute("aria-expanded","false"),this.options.setAttribute("aria-hidden","true")}selectItem(o){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r=this.container.querySelector(".ql-selected");o!==r&&(r?.classList.remove("ql-selected"),o!=null&&(o.classList.add("ql-selected"),this.select.selectedIndex=Array.from(o.parentNode.children).indexOf(o),o.hasAttribute("data-value")?this.label.setAttribute("data-value",o.getAttribute("data-value")):this.label.removeAttribute("data-value"),o.hasAttribute("data-label")?this.label.setAttribute("data-label",o.getAttribute("data-label")):this.label.removeAttribute("data-label"),t&&(this.select.dispatchEvent(new Event("change")),this.close())))}update(){let o;if(this.select.selectedIndex>-1){let r=this.container.querySelector(".ql-picker-options").children[this.select.selectedIndex];o=this.select.options[this.select.selectedIndex],this.selectItem(r)}else this.selectItem(null);let t=o!=null&&o!==this.select.querySelector("option[selected]");this.label.classList.toggle("ql-active",t)}},Ai=wm;var _m=class extends Ai{constructor(o,t){super(o),this.label.innerHTML=t,this.container.classList.add("ql-color-picker"),Array.from(this.container.querySelectorAll(".ql-picker-item")).slice(0,7).forEach(r=>{r.classList.add("ql-primary")})}buildItem(o){let t=super.buildItem(o);return t.style.backgroundColor=o.getAttribute("value")||"",t}selectItem(o,t){super.selectItem(o,t);let r=this.label.querySelector(".ql-color-label"),n=o&&o.getAttribute("data-value")||"";r&&(r.tagName==="line"?r.style.stroke=n:r.style.fill=n)}},dp=_m;var km=class extends Ai{constructor(o,t){super(o),this.container.classList.add("ql-icon-picker"),Array.from(this.container.querySelectorAll(".ql-picker-item")).forEach(r=>{r.innerHTML=t[r.getAttribute("data-value")||""]}),this.defaultItem=this.container.querySelector(".ql-selected"),this.selectItem(this.defaultItem)}selectItem(o,t){super.selectItem(o,t);let r=o||this.defaultItem;if(r!=null){if(this.label.innerHTML===r.innerHTML)return;this.label.innerHTML=r.innerHTML}}},pp=km;var QM=i=>{let{overflowY:o}=getComputedStyle(i,null);return o!=="visible"&&o!=="clip"},Sm=class{constructor(o,t){this.quill=o,this.boundsContainer=t||document.body,this.root=o.addContainer("ql-tooltip"),this.root.innerHTML=this.constructor.TEMPLATE,QM(this.quill.root)&&this.quill.root.addEventListener("scroll",()=>{this.root.style.marginTop=`${-1*this.quill.root.scrollTop}px`}),this.hide()}hide(){this.root.classList.add("ql-hidden")}position(o){let t=o.left+o.width/2-this.root.offsetWidth/2,r=o.bottom+this.quill.root.scrollTop;this.root.style.left=`${t}px`,this.root.style.top=`${r}px`,this.root.classList.remove("ql-flip");let n=this.boundsContainer.getBoundingClientRect(),a=this.root.getBoundingClientRect(),s=0;if(a.right>n.right&&(s=n.right-a.right,this.root.style.left=`${t+s}px`),a.left<n.left&&(s=n.left-a.left,this.root.style.left=`${t+s}px`),a.bottom>n.bottom){let l=a.bottom-a.top,d=o.bottom-o.top+l;this.root.style.top=`${r-d}px`,this.root.classList.add("ql-flip")}return s}show(){this.root.classList.remove("ql-editing"),this.root.classList.remove("ql-hidden")}},hp=Sm;var JM=[!1,"center","right","justify"],ZM=["#000000","#e60000","#ff9900","#ffff00","#008a00","#0066cc","#9933ff","#ffffff","#facccc","#ffebcc","#ffffcc","#cce8cc","#cce0f5","#ebd6ff","#bbbbbb","#f06666","#ffc266","#ffff66","#66b966","#66a3e0","#c285ff","#888888","#a10000","#b26b00","#b2b200","#006100","#0047b2","#6b24b2","#444444","#5c0000","#663d00","#666600","#003700","#002966","#3d1466"],t6=[!1,"serif","monospace"],e6=["1","2","3",!1],r6=["small",!1,"large","huge"],Yn=class extends vs{constructor(o,t){super(o,t);let r=n=>{if(!document.body.contains(o.root)){document.body.removeEventListener("click",r);return}this.tooltip!=null&&!this.tooltip.root.contains(n.target)&&document.activeElement!==this.tooltip.textbox&&!this.quill.hasFocus()&&this.tooltip.hide(),this.pickers!=null&&this.pickers.forEach(a=>{a.container.contains(n.target)||a.close()})};o.emitter.listenDOM("click",document.body,r)}addModule(o){let t=super.addModule(o);return o==="toolbar"&&this.extendToolbar(t),t}buildButtons(o,t){Array.from(o).forEach(r=>{(r.getAttribute("class")||"").split(/\s+/).forEach(a=>{if(a.startsWith("ql-")&&(a=a.slice(3),t[a]!=null))if(a==="direction")r.innerHTML=t[a][""]+t[a].rtl;else if(typeof t[a]=="string")r.innerHTML=t[a];else{let s=r.value||"";s!=null&&t[a][s]&&(r.innerHTML=t[a][s])}})})}buildPickers(o,t){this.pickers=Array.from(o).map(n=>{if(n.classList.contains("ql-align")&&(n.querySelector("option")==null&&Xl(n,JM),typeof t.align=="object"))return new pp(n,t.align);if(n.classList.contains("ql-background")||n.classList.contains("ql-color")){let a=n.classList.contains("ql-background")?"background":"color";return n.querySelector("option")==null&&Xl(n,ZM,a==="background"?"#ffffff":"#000000"),new dp(n,t[a])}return n.querySelector("option")==null&&(n.classList.contains("ql-font")?Xl(n,t6):n.classList.contains("ql-header")?Xl(n,e6):n.classList.contains("ql-size")&&Xl(n,r6)),new Ai(n)});let r=()=>{this.pickers.forEach(n=>{n.update()})};this.quill.on(Q.events.EDITOR_CHANGE,r)}};Yn.DEFAULTS=Hr({},vs.DEFAULTS,{modules:{toolbar:{handlers:{formula(){this.quill.theme.tooltip.edit("formula")},image(){let i=this.container.querySelector("input.ql-image[type=file]");i==null&&(i=document.createElement("input"),i.setAttribute("type","file"),i.setAttribute("accept",this.quill.uploader.options.mimetypes.join(", ")),i.classList.add("ql-image"),i.addEventListener("change",()=>{let o=this.quill.getSelection(!0);this.quill.uploader.upload(o,i.files),i.value=""}),this.container.appendChild(i)),i.click()},video(){this.quill.theme.tooltip.edit("video")}}}}});var ks=class extends hp{constructor(o,t){super(o,t),this.textbox=this.root.querySelector('input[type="text"]'),this.listen()}listen(){this.textbox.addEventListener("keydown",o=>{o.key==="Enter"?(this.save(),o.preventDefault()):o.key==="Escape"&&(this.cancel(),o.preventDefault())})}cancel(){this.hide(),this.restoreFocus()}edit(){let o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"link",t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(this.root.classList.remove("ql-hidden"),this.root.classList.add("ql-editing"),this.textbox==null)return;t!=null?this.textbox.value=t:o!==this.root.getAttribute("data-mode")&&(this.textbox.value="");let r=this.quill.getBounds(this.quill.selection.savedRange);r!=null&&this.position(r),this.textbox.select(),this.textbox.setAttribute("placeholder",this.textbox.getAttribute(`data-${o}`)||""),this.root.setAttribute("data-mode",o)}restoreFocus(){this.quill.focus({preventScroll:!0})}save(){let{value:o}=this.textbox;switch(this.root.getAttribute("data-mode")){case"link":{let{scrollTop:t}=this.quill.root;this.linkRange?(this.quill.formatText(this.linkRange,"link",o,Q.sources.USER),delete this.linkRange):(this.restoreFocus(),this.quill.format("link",o,Q.sources.USER)),this.quill.root.scrollTop=t;break}case"video":o=o6(o);case"formula":{if(!o)break;let t=this.quill.getSelection(!0);if(t!=null){let r=t.index+t.length;this.quill.insertEmbed(r,this.root.getAttribute("data-mode"),o,Q.sources.USER),this.root.getAttribute("data-mode")==="formula"&&this.quill.insertText(r+1," ",Q.sources.USER),this.quill.setSelection(r+2,Q.sources.USER)}break}default:}this.textbox.value="",this.hide()}};function o6(i){let o=i.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtube\.com\/watch.*v=([a-zA-Z0-9_-]+)/)||i.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtu\.be\/([a-zA-Z0-9_-]+)/);return o?`${o[1]||"https"}://www.youtube.com/embed/${o[2]}?showinfo=0`:(o=i.match(/^(?:(https?):\/\/)?(?:www\.)?vimeo\.com\/(\d+)/))?`${o[1]||"https"}://player.vimeo.com/video/${o[2]}/`:i}function Xl(i,o){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;o.forEach(r=>{let n=document.createElement("option");r===t?n.setAttribute("selected","selected"):n.setAttribute("value",String(r)),i.appendChild(n)})}var n6=[["bold","italic","link"],[{header:1},{header:2},"blockquote"]],up=class extends ks{constructor(o,t){super(o,t),this.quill.on(Q.events.EDITOR_CHANGE,(r,n,a,s)=>{if(r===Q.events.SELECTION_CHANGE)if(n!=null&&n.length>0&&s===Q.sources.USER){this.show(),this.root.style.left="0px",this.root.style.width="",this.root.style.width=`${this.root.offsetWidth}px`;let l=this.quill.getLines(n.index,n.length);if(l.length===1){let d=this.quill.getBounds(n);d!=null&&this.position(d)}else{let d=l[l.length-1],h=this.quill.getIndex(d),m=Math.min(d.length()-1,n.index+n.length-h),f=this.quill.getBounds(new Er(h,m));f!=null&&this.position(f)}}else document.activeElement!==this.textbox&&this.quill.hasFocus()&&this.hide()})}listen(){super.listen(),this.root.querySelector(".ql-close").addEventListener("click",()=>{this.root.classList.remove("ql-editing")}),this.quill.on(Q.events.SCROLL_OPTIMIZE,()=>{setTimeout(()=>{if(this.root.classList.contains("ql-hidden"))return;let o=this.quill.getSelection();if(o!=null){let t=this.quill.getBounds(o);t!=null&&this.position(t)}},1)})}cancel(){this.show()}position(o){let t=super.position(o),r=this.root.querySelector(".ql-tooltip-arrow");return r.style.marginLeft="",t!==0&&(r.style.marginLeft=`${-1*t-r.offsetWidth/2}px`),t}};V(up,"TEMPLATE",['<span class="ql-tooltip-arrow"></span>','<div class="ql-tooltip-editor">','<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">','<a class="ql-close"></a>',"</div>"].join(""));var Ql=class extends Yn{constructor(o,t){t.modules.toolbar!=null&&t.modules.toolbar.container==null&&(t.modules.toolbar.container=n6),super(o,t),this.quill.container.classList.add("ql-bubble")}extendToolbar(o){this.tooltip=new up(this.quill,this.options.bounds),o.container!=null&&(this.tooltip.root.appendChild(o.container),this.buildButtons(o.container.querySelectorAll("button"),Ti),this.buildPickers(o.container.querySelectorAll("select"),Ti))}};Ql.DEFAULTS=Hr({},Yn.DEFAULTS,{modules:{toolbar:{handlers:{link(i){i?this.quill.theme.tooltip.edit():this.quill.format("link",!1,U.sources.USER)}}}}});var i6=[[{header:["1","2","3",!1]}],["bold","italic","underline","link"],[{list:"ordered"},{list:"bullet"}],["clean"]],mp=class extends ks{constructor(){super(...arguments);V(this,"preview",this.root.querySelector("a.ql-preview"))}listen(){super.listen(),this.root.querySelector("a.ql-action").addEventListener("click",t=>{this.root.classList.contains("ql-editing")?this.save():this.edit("link",this.preview.textContent),t.preventDefault()}),this.root.querySelector("a.ql-remove").addEventListener("click",t=>{if(this.linkRange!=null){let r=this.linkRange;this.restoreFocus(),this.quill.formatText(r,"link",!1,Q.sources.USER),delete this.linkRange}t.preventDefault(),this.hide()}),this.quill.on(Q.events.SELECTION_CHANGE,(t,r,n)=>{if(t!=null){if(t.length===0&&n===Q.sources.USER){let[a,s]=this.quill.scroll.descendant(no,t.index);if(a!=null){this.linkRange=new Er(t.index-s,a.length());let l=no.formats(a.domNode);this.preview.textContent=l,this.preview.setAttribute("href",l),this.show();let d=this.quill.getBounds(this.linkRange);d!=null&&this.position(d);return}}else delete this.linkRange;this.hide()}})}show(){super.show(),this.root.removeAttribute("data-mode")}};V(mp,"TEMPLATE",['<a class="ql-preview" rel="noopener noreferrer" target="_blank" href="about:blank"></a>','<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">','<a class="ql-action"></a>','<a class="ql-remove"></a>'].join(""));var fp=class extends Yn{constructor(o,t){t.modules.toolbar!=null&&t.modules.toolbar.container==null&&(t.modules.toolbar.container=i6),super(o,t),this.quill.container.classList.add("ql-snow")}extendToolbar(o){o.container!=null&&(o.container.classList.add("ql-snow"),this.buildButtons(o.container.querySelectorAll("button"),Ti),this.buildPickers(o.container.querySelectorAll("select"),Ti),this.tooltip=new mp(this.quill,this.options.bounds),o.container.querySelector(".ql-link")&&this.quill.keyboard.addBinding({key:"k",shortKey:!0},(t,r)=>{o.handlers.link.call(o,!r.format.link)}))}};fp.DEFAULTS=Hr({},Yn.DEFAULTS,{modules:{toolbar:{handlers:{link(i){if(i){let o=this.quill.getSelection();if(o==null||o.length===0)return;let t=this.quill.getText(o);/^\S+@\S+\.\S+$/.test(t)&&t.indexOf("mailto:")!==0&&(t=`mailto:${t}`);let{tooltip:r}=this.quill.theme;r.edit("link",t)}else this.quill.format("link",!1,U.sources.USER)}}}}});var Tw=fp;sp.register({"attributors/attribute/direction":Zd,"attributors/class/align":am,"attributors/class/background":Wz,"attributors/class/color":Gz,"attributors/class/direction":lm,"attributors/class/font":dm,"attributors/class/size":pm,"attributors/style/align":Jd,"attributors/style/background":Ml,"attributors/style/color":ql,"attributors/style/direction":tp,"attributors/style/font":ep,"attributors/style/size":rp},!0);sp.register({"formats/align":am,"formats/direction":lm,"formats/indent":lw,"formats/background":Ml,"formats/color":ql,"formats/font":dm,"formats/size":pm,"formats/blockquote":cw,"formats/code-block":_e,"formats/header":dw,"formats/list":Ci,"formats/bold":zs,"formats/code":ys,"formats/italic":pw,"formats/link":no,"formats/script":hw,"formats/strike":uw,"formats/underline":mw,"formats/formula":fw,"formats/image":bw,"formats/video":xw,"modules/syntax":Kl,"modules/table":zw,"modules/toolbar":Ei,"themes/bubble":Ql,"themes/snow":Tw,"ui/icons":Ti,"ui/picker":Ai,"ui/icon-picker":pp,"ui/color-picker":dp,"ui/tooltip":hp},!0);var at=sp;var ao=class extends C{render(){return u`
2530
+ `).join("");return a.insert(s,{table:cp()})},new yw.default().retain(r.index));this.quill.updateContents(n,U.sources.USER),this.quill.setSelection(r.index,U.sources.SILENT),this.balanceTables()}listenBalanceCells(){this.quill.on(U.events.SCROLL_OPTIMIZE,o=>{o.some(t=>["TD","TR","TBODY","TABLE"].includes(t.target.tagName)?(this.quill.once(U.events.TEXT_CHANGE,(r,n,a)=>{a===U.sources.USER&&this.balanceTables()}),!0):!1)})}},zw=zm;var kw=ar(Or(),1);var ww=oo("quill:toolbar"),Ei=class extends ee{constructor(o,t){if(super(o,t),Array.isArray(this.options.container)){let r=document.createElement("div");r.setAttribute("role","toolbar"),gM(r,this.options.container),o.container?.parentNode?.insertBefore(r,o.container),this.container=r}else typeof this.options.container=="string"?this.container=document.querySelector(this.options.container):this.container=this.options.container;if(!(this.container instanceof HTMLElement)){ww.error("Container required for toolbar",this.options);return}this.container.classList.add("ql-toolbar"),this.controls=[],this.handlers={},this.options.handlers&&Object.keys(this.options.handlers).forEach(r=>{let n=this.options.handlers?.[r];n&&this.addHandler(r,n)}),Array.from(this.container.querySelectorAll("button, select")).forEach(r=>{this.attach(r)}),this.quill.on(U.events.EDITOR_CHANGE,()=>{let[r]=this.quill.selection.getRange();this.update(r)})}addHandler(o,t){this.handlers[o]=t}attach(o){let t=Array.from(o.classList).find(n=>n.indexOf("ql-")===0);if(!t)return;if(t=t.slice(3),o.tagName==="BUTTON"&&o.setAttribute("type","button"),this.handlers[t]==null&&this.quill.scroll.query(t)==null){ww.warn("ignoring attaching to nonexistent format",t,o);return}let r=o.tagName==="SELECT"?"change":"click";o.addEventListener(r,n=>{let a;if(o.tagName==="SELECT"){if(o.selectedIndex<0)return;let l=o.options[o.selectedIndex];l.hasAttribute("selected")?a=!1:a=l.value||!1}else o.classList.contains("ql-active")?a=!1:a=o.value||!o.hasAttribute("value"),n.preventDefault();this.quill.focus();let[s]=this.quill.selection.getRange();if(this.handlers[t]!=null)this.handlers[t].call(this,a);else if(this.quill.scroll.query(t).prototype instanceof ce){if(a=prompt(`Enter ${t}`),!a)return;this.quill.updateContents(new kw.default().retain(s.index).delete(s.length).insert({[t]:a}),U.sources.USER)}else this.quill.format(t,a,U.sources.USER);this.update(s)}),this.controls.push([t,o])}update(o){let t=o==null?{}:this.quill.getFormat(o);this.controls.forEach(r=>{let[n,a]=r;if(a.tagName==="SELECT"){let s=null;if(o==null)s=null;else if(t[n]==null)s=a.querySelector("option[selected]");else if(!Array.isArray(t[n])){let l=t[n];typeof l=="string"&&(l=l.replace(/"/g,'\\"')),s=a.querySelector(`option[value="${l}"]`)}s==null?(a.value="",a.selectedIndex=-1):s.selected=!0}else if(o==null)a.classList.remove("ql-active"),a.setAttribute("aria-pressed","false");else if(a.hasAttribute("value")){let s=t[n],l=s===a.getAttribute("value")||s!=null&&s.toString()===a.getAttribute("value")||s==null&&!a.getAttribute("value");a.classList.toggle("ql-active",l),a.setAttribute("aria-pressed",l.toString())}else{let s=t[n]!=null;a.classList.toggle("ql-active",s),a.setAttribute("aria-pressed",s.toString())}})}};Ei.DEFAULTS={};function _w(i,o,t){let r=document.createElement("button");r.setAttribute("type","button"),r.classList.add(`ql-${o}`),r.setAttribute("aria-pressed","false"),t!=null?(r.value=t,r.setAttribute("aria-label",`${o}: ${t}`)):r.setAttribute("aria-label",o),i.appendChild(r)}function gM(i,o){Array.isArray(o[0])||(o=[o]),o.forEach(t=>{let r=document.createElement("span");r.classList.add("ql-formats"),t.forEach(n=>{if(typeof n=="string")_w(r,n);else{let a=Object.keys(n)[0],s=n[a];Array.isArray(s)?bM(r,a,s):_w(r,a,s)}}),i.appendChild(r)})}function bM(i,o,t){let r=document.createElement("select");r.classList.add(`ql-${o}`),t.forEach(n=>{let a=document.createElement("option");n!==!1?a.setAttribute("value",String(n)):a.setAttribute("selected","selected"),r.appendChild(a)}),i.appendChild(r)}Ei.DEFAULTS={container:null,handlers:{clean(){let i=this.quill.getSelection();if(i!=null)if(i.length===0){let o=this.quill.getFormat();Object.keys(o).forEach(t=>{this.quill.scroll.query(t,X.INLINE)!=null&&this.quill.format(t,!1,U.sources.USER)})}else this.quill.removeFormat(i.index,i.length,U.sources.USER)},direction(i){let{align:o}=this.quill.getFormat();i==="rtl"&&o==null?this.quill.format("align","right",U.sources.USER):!i&&o==="right"&&this.quill.format("align",!1,U.sources.USER),this.quill.format("direction",i,U.sources.USER)},indent(i){let o=this.quill.getSelection(),t=this.quill.getFormat(o),r=parseInt(t.indent||0,10);if(i==="+1"||i==="-1"){let n=i==="+1"?1:-1;t.direction==="rtl"&&(n*=-1),this.quill.format("indent",r+n,U.sources.USER)}},link(i){i===!0&&(i=prompt("Enter link URL:")),this.quill.format("link",i,U.sources.USER)},list(i){let o=this.quill.getSelection(),t=this.quill.getFormat(o);i==="check"?t.list==="checked"||t.list==="unchecked"?this.quill.format("list",!1,U.sources.USER):this.quill.format("list","unchecked",U.sources.USER):this.quill.format("list",i,U.sources.USER)}}};var vM='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="3" x2="15" y1="9" y2="9"/><line class="ql-stroke" x1="3" x2="13" y1="14" y2="14"/><line class="ql-stroke" x1="3" x2="9" y1="4" y2="4"/></svg>',xM='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="15" x2="3" y1="9" y2="9"/><line class="ql-stroke" x1="14" x2="4" y1="14" y2="14"/><line class="ql-stroke" x1="12" x2="6" y1="4" y2="4"/></svg>',yM='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="15" x2="3" y1="9" y2="9"/><line class="ql-stroke" x1="15" x2="5" y1="14" y2="14"/><line class="ql-stroke" x1="15" x2="9" y1="4" y2="4"/></svg>',zM='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="15" x2="3" y1="9" y2="9"/><line class="ql-stroke" x1="15" x2="3" y1="14" y2="14"/><line class="ql-stroke" x1="15" x2="3" y1="4" y2="4"/></svg>',wM='<svg viewbox="0 0 18 18"><g class="ql-fill ql-color-label"><polygon points="6 6.868 6 6 5 6 5 7 5.942 7 6 6.868"/><rect height="1" width="1" x="4" y="4"/><polygon points="6.817 5 6 5 6 6 6.38 6 6.817 5"/><rect height="1" width="1" x="2" y="6"/><rect height="1" width="1" x="3" y="5"/><rect height="1" width="1" x="4" y="7"/><polygon points="4 11.439 4 11 3 11 3 12 3.755 12 4 11.439"/><rect height="1" width="1" x="2" y="12"/><rect height="1" width="1" x="2" y="9"/><rect height="1" width="1" x="2" y="15"/><polygon points="4.63 10 4 10 4 11 4.192 11 4.63 10"/><rect height="1" width="1" x="3" y="8"/><path d="M10.832,4.2L11,4.582V4H10.708A1.948,1.948,0,0,1,10.832,4.2Z"/><path d="M7,4.582L7.168,4.2A1.929,1.929,0,0,1,7.292,4H7V4.582Z"/><path d="M8,13H7.683l-0.351.8a1.933,1.933,0,0,1-.124.2H8V13Z"/><rect height="1" width="1" x="12" y="2"/><rect height="1" width="1" x="11" y="3"/><path d="M9,3H8V3.282A1.985,1.985,0,0,1,9,3Z"/><rect height="1" width="1" x="2" y="3"/><rect height="1" width="1" x="6" y="2"/><rect height="1" width="1" x="3" y="2"/><rect height="1" width="1" x="5" y="3"/><rect height="1" width="1" x="9" y="2"/><rect height="1" width="1" x="15" y="14"/><polygon points="13.447 10.174 13.469 10.225 13.472 10.232 13.808 11 14 11 14 10 13.37 10 13.447 10.174"/><rect height="1" width="1" x="13" y="7"/><rect height="1" width="1" x="15" y="5"/><rect height="1" width="1" x="14" y="6"/><rect height="1" width="1" x="15" y="8"/><rect height="1" width="1" x="14" y="9"/><path d="M3.775,14H3v1H4V14.314A1.97,1.97,0,0,1,3.775,14Z"/><rect height="1" width="1" x="14" y="3"/><polygon points="12 6.868 12 6 11.62 6 12 6.868"/><rect height="1" width="1" x="15" y="2"/><rect height="1" width="1" x="12" y="5"/><rect height="1" width="1" x="13" y="4"/><polygon points="12.933 9 13 9 13 8 12.495 8 12.933 9"/><rect height="1" width="1" x="9" y="14"/><rect height="1" width="1" x="8" y="15"/><path d="M6,14.926V15H7V14.316A1.993,1.993,0,0,1,6,14.926Z"/><rect height="1" width="1" x="5" y="15"/><path d="M10.668,13.8L10.317,13H10v1h0.792A1.947,1.947,0,0,1,10.668,13.8Z"/><rect height="1" width="1" x="11" y="15"/><path d="M14.332,12.2a1.99,1.99,0,0,1,.166.8H15V12H14.245Z"/><rect height="1" width="1" x="14" y="15"/><rect height="1" width="1" x="15" y="11"/></g><polyline class="ql-stroke" points="5.5 13 9 5 12.5 13"/><line class="ql-stroke" x1="11.63" x2="6.38" y1="11" y2="11"/></svg>',_M='<svg viewbox="0 0 18 18"><rect class="ql-fill ql-stroke" height="3" width="3" x="4" y="5"/><rect class="ql-fill ql-stroke" height="3" width="3" x="11" y="5"/><path class="ql-even ql-fill ql-stroke" d="M7,8c0,4.031-3,5-3,5"/><path class="ql-even ql-fill ql-stroke" d="M14,8c0,4.031-3,5-3,5"/></svg>',kM='<svg viewbox="0 0 18 18"><path class="ql-stroke" d="M5,4H9.5A2.5,2.5,0,0,1,12,6.5v0A2.5,2.5,0,0,1,9.5,9H5A0,0,0,0,1,5,9V4A0,0,0,0,1,5,4Z"/><path class="ql-stroke" d="M5,9h5.5A2.5,2.5,0,0,1,13,11.5v0A2.5,2.5,0,0,1,10.5,14H5a0,0,0,0,1,0,0V9A0,0,0,0,1,5,9Z"/></svg>',SM='<svg class="" viewbox="0 0 18 18"><line class="ql-stroke" x1="5" x2="13" y1="3" y2="3"/><line class="ql-stroke" x1="6" x2="9.35" y1="12" y2="3"/><line class="ql-stroke" x1="11" x2="15" y1="11" y2="15"/><line class="ql-stroke" x1="15" x2="11" y1="11" y2="15"/><rect class="ql-fill" height="1" rx="0.5" ry="0.5" width="7" x="2" y="14"/></svg>',Sw='<svg viewbox="0 0 18 18"><polyline class="ql-even ql-stroke" points="5 7 3 9 5 11"/><polyline class="ql-even ql-stroke" points="13 7 15 9 13 11"/><line class="ql-stroke" x1="10" x2="8" y1="5" y2="13"/></svg>',CM='<svg viewbox="0 0 18 18"><line class="ql-color-label ql-stroke ql-transparent" x1="3" x2="15" y1="15" y2="15"/><polyline class="ql-stroke" points="5.5 11 9 3 12.5 11"/><line class="ql-stroke" x1="11.63" x2="6.38" y1="9" y2="9"/></svg>',EM='<svg viewbox="0 0 18 18"><polygon class="ql-stroke ql-fill" points="3 11 5 9 3 7 3 11"/><line class="ql-stroke ql-fill" x1="15" x2="11" y1="4" y2="4"/><path class="ql-fill" d="M11,3a3,3,0,0,0,0,6h1V3H11Z"/><rect class="ql-fill" height="11" width="1" x="11" y="4"/><rect class="ql-fill" height="11" width="1" x="13" y="4"/></svg>',TM='<svg viewbox="0 0 18 18"><polygon class="ql-stroke ql-fill" points="15 12 13 10 15 8 15 12"/><line class="ql-stroke ql-fill" x1="9" x2="5" y1="4" y2="4"/><path class="ql-fill" d="M5,3A3,3,0,0,0,5,9H6V3H5Z"/><rect class="ql-fill" height="11" width="1" x="5" y="4"/><rect class="ql-fill" height="11" width="1" x="7" y="4"/></svg>',AM='<svg viewbox="0 0 18 18"><path class="ql-fill" d="M11.759,2.482a2.561,2.561,0,0,0-3.53.607A7.656,7.656,0,0,0,6.8,6.2C6.109,9.188,5.275,14.677,4.15,14.927a1.545,1.545,0,0,0-1.3-.933A0.922,0.922,0,0,0,2,15.036S1.954,16,4.119,16s3.091-2.691,3.7-5.553c0.177-.826.36-1.726,0.554-2.6L8.775,6.2c0.381-1.421.807-2.521,1.306-2.676a1.014,1.014,0,0,0,1.02.56A0.966,0.966,0,0,0,11.759,2.482Z"/><rect class="ql-fill" height="1.6" rx="0.8" ry="0.8" width="5" x="5.15" y="6.2"/><path class="ql-fill" d="M13.663,12.027a1.662,1.662,0,0,1,.266-0.276q0.193,0.069.456,0.138a2.1,2.1,0,0,0,.535.069,1.075,1.075,0,0,0,.767-0.3,1.044,1.044,0,0,0,.314-0.8,0.84,0.84,0,0,0-.238-0.619,0.8,0.8,0,0,0-.594-0.239,1.154,1.154,0,0,0-.781.3,4.607,4.607,0,0,0-.781,1q-0.091.15-.218,0.346l-0.246.38c-0.068-.288-0.137-0.582-0.212-0.885-0.459-1.847-2.494-.984-2.941-0.8-0.482.2-.353,0.647-0.094,0.529a0.869,0.869,0,0,1,1.281.585c0.217,0.751.377,1.436,0.527,2.038a5.688,5.688,0,0,1-.362.467,2.69,2.69,0,0,1-.264.271q-0.221-.08-0.471-0.147a2.029,2.029,0,0,0-.522-0.066,1.079,1.079,0,0,0-.768.3A1.058,1.058,0,0,0,9,15.131a0.82,0.82,0,0,0,.832.852,1.134,1.134,0,0,0,.787-0.3,5.11,5.11,0,0,0,.776-0.993q0.141-.219.215-0.34c0.046-.076.122-0.194,0.223-0.346a2.786,2.786,0,0,0,.918,1.726,2.582,2.582,0,0,0,2.376-.185c0.317-.181.212-0.565,0-0.494A0.807,0.807,0,0,1,14.176,15a5.159,5.159,0,0,1-.913-2.446l0,0Q13.487,12.24,13.663,12.027Z"/></svg>',$M='<svg viewBox="0 0 18 18"><path class="ql-fill" d="M10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Zm6.06787,9.209H14.98975V7.59863a.54085.54085,0,0,0-.605-.60547h-.62744a1.01119,1.01119,0,0,0-.748.29688L11.645,8.56641a.5435.5435,0,0,0-.022.8584l.28613.30762a.53861.53861,0,0,0,.84717.0332l.09912-.08789a1.2137,1.2137,0,0,0,.2417-.35254h.02246s-.01123.30859-.01123.60547V13.209H12.041a.54085.54085,0,0,0-.605.60547v.43945a.54085.54085,0,0,0,.605.60547h4.02686a.54085.54085,0,0,0,.605-.60547v-.43945A.54085.54085,0,0,0,16.06787,13.209Z"/></svg>',LM='<svg viewBox="0 0 18 18"><path class="ql-fill" d="M16.73975,13.81445v.43945a.54085.54085,0,0,1-.605.60547H11.855a.58392.58392,0,0,1-.64893-.60547V14.0127c0-2.90527,3.39941-3.42187,3.39941-4.55469a.77675.77675,0,0,0-.84717-.78125,1.17684,1.17684,0,0,0-.83594.38477c-.2749.26367-.561.374-.85791.13184l-.4292-.34082c-.30811-.24219-.38525-.51758-.1543-.81445a2.97155,2.97155,0,0,1,2.45361-1.17676,2.45393,2.45393,0,0,1,2.68408,2.40918c0,2.45312-3.1792,2.92676-3.27832,3.93848h2.79443A.54085.54085,0,0,1,16.73975,13.81445ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z"/></svg>',qM='<svg viewBox="0 0 18 18"><path class="ql-fill" d="M16.65186,12.30664a2.6742,2.6742,0,0,1-2.915,2.68457,3.96592,3.96592,0,0,1-2.25537-.6709.56007.56007,0,0,1-.13232-.83594L11.64648,13c.209-.34082.48389-.36328.82471-.1543a2.32654,2.32654,0,0,0,1.12256.33008c.71484,0,1.12207-.35156,1.12207-.78125,0-.61523-.61621-.86816-1.46338-.86816H13.2085a.65159.65159,0,0,1-.68213-.41895l-.05518-.10937a.67114.67114,0,0,1,.14307-.78125l.71533-.86914a8.55289,8.55289,0,0,1,.68213-.7373V8.58887a3.93913,3.93913,0,0,1-.748.05469H11.9873a.54085.54085,0,0,1-.605-.60547V7.59863a.54085.54085,0,0,1,.605-.60547h3.75146a.53773.53773,0,0,1,.60547.59375v.17676a1.03723,1.03723,0,0,1-.27539.748L14.74854,10.0293A2.31132,2.31132,0,0,1,16.65186,12.30664ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z"/></svg>',MM='<svg viewBox="0 0 18 18"><path class="ql-fill" d="M10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Zm7.05371,7.96582v.38477c0,.39648-.165.60547-.46191.60547h-.47314v1.29785a.54085.54085,0,0,1-.605.60547h-.69336a.54085.54085,0,0,1-.605-.60547V12.95605H11.333a.5412.5412,0,0,1-.60547-.60547v-.15332a1.199,1.199,0,0,1,.22021-.748l2.56348-4.05957a.7819.7819,0,0,1,.72607-.39648h1.27637a.54085.54085,0,0,1,.605.60547v3.7627h.33008A.54055.54055,0,0,1,17.05371,11.96582ZM14.28125,8.7207h-.022a4.18969,4.18969,0,0,1-.38525.81348l-1.188,1.80469v.02246h1.5293V9.60059A7.04058,7.04058,0,0,1,14.28125,8.7207Z"/></svg>',IM='<svg viewBox="0 0 18 18"><path class="ql-fill" d="M16.74023,12.18555a2.75131,2.75131,0,0,1-2.91553,2.80566,3.908,3.908,0,0,1-2.25537-.68164.54809.54809,0,0,1-.13184-.8252L11.73438,13c.209-.34082.48389-.36328.8252-.1543a2.23757,2.23757,0,0,0,1.1001.33008,1.01827,1.01827,0,0,0,1.1001-.96777c0-.61621-.53906-.97949-1.25439-.97949a2.15554,2.15554,0,0,0-.64893.09961,1.15209,1.15209,0,0,1-.814.01074l-.12109-.04395a.64116.64116,0,0,1-.45117-.71484l.231-3.00391a.56666.56666,0,0,1,.62744-.583H15.541a.54085.54085,0,0,1,.605.60547v.43945a.54085.54085,0,0,1-.605.60547H13.41748l-.04395.72559a1.29306,1.29306,0,0,1-.04395.30859h.022a2.39776,2.39776,0,0,1,.57227-.07715A2.53266,2.53266,0,0,1,16.74023,12.18555ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z"/></svg>',NM='<svg viewBox="0 0 18 18"><path class="ql-fill" d="M14.51758,9.64453a1.85627,1.85627,0,0,0-1.24316.38477H13.252a1.73532,1.73532,0,0,1,1.72754-1.4082,2.66491,2.66491,0,0,1,.5498.06641c.35254.05469.57227.01074.70508-.40723l.16406-.5166a.53393.53393,0,0,0-.373-.75977,4.83723,4.83723,0,0,0-1.17773-.14258c-2.43164,0-3.7627,2.17773-3.7627,4.43359,0,2.47559,1.60645,3.69629,3.19043,3.69629A2.70585,2.70585,0,0,0,16.96,12.19727,2.43861,2.43861,0,0,0,14.51758,9.64453Zm-.23047,3.58691c-.67187,0-1.22168-.81445-1.22168-1.45215,0-.47363.30762-.583.72559-.583.96875,0,1.27734.59375,1.27734,1.12207A.82182.82182,0,0,1,14.28711,13.23145ZM10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Z"/></svg>',DM='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="7" x2="13" y1="4" y2="4"/><line class="ql-stroke" x1="5" x2="11" y1="14" y2="14"/><line class="ql-stroke" x1="8" x2="10" y1="14" y2="4"/></svg>',RM='<svg viewbox="0 0 18 18"><rect class="ql-stroke" height="10" width="12" x="3" y="4"/><circle class="ql-fill" cx="6" cy="7" r="1"/><polyline class="ql-even ql-fill" points="5 12 5 11 7 9 8 10 11 7 13 9 13 12 5 12"/></svg>',OM='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="3" x2="15" y1="14" y2="14"/><line class="ql-stroke" x1="3" x2="15" y1="4" y2="4"/><line class="ql-stroke" x1="9" x2="15" y1="9" y2="9"/><polyline class="ql-fill ql-stroke" points="3 7 3 11 5 9 3 7"/></svg>',PM='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="3" x2="15" y1="14" y2="14"/><line class="ql-stroke" x1="3" x2="15" y1="4" y2="4"/><line class="ql-stroke" x1="9" x2="15" y1="9" y2="9"/><polyline class="ql-stroke" points="5 7 5 11 3 9 5 7"/></svg>',HM='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="7" x2="11" y1="7" y2="11"/><path class="ql-even ql-stroke" d="M8.9,4.577a3.476,3.476,0,0,1,.36,4.679A3.476,3.476,0,0,1,4.577,8.9C3.185,7.5,2.035,6.4,4.217,4.217S7.5,3.185,8.9,4.577Z"/><path class="ql-even ql-stroke" d="M13.423,9.1a3.476,3.476,0,0,0-4.679-.36,3.476,3.476,0,0,0,.36,4.679c1.392,1.392,2.5,2.542,4.679.36S14.815,10.5,13.423,9.1Z"/></svg>',FM='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="6" x2="15" y1="4" y2="4"/><line class="ql-stroke" x1="6" x2="15" y1="9" y2="9"/><line class="ql-stroke" x1="6" x2="15" y1="14" y2="14"/><line class="ql-stroke" x1="3" x2="3" y1="4" y2="4"/><line class="ql-stroke" x1="3" x2="3" y1="9" y2="9"/><line class="ql-stroke" x1="3" x2="3" y1="14" y2="14"/></svg>',BM='<svg class="" viewbox="0 0 18 18"><line class="ql-stroke" x1="9" x2="15" y1="4" y2="4"/><polyline class="ql-stroke" points="3 4 4 5 6 3"/><line class="ql-stroke" x1="9" x2="15" y1="14" y2="14"/><polyline class="ql-stroke" points="3 14 4 15 6 13"/><line class="ql-stroke" x1="9" x2="15" y1="9" y2="9"/><polyline class="ql-stroke" points="3 9 4 10 6 8"/></svg>',VM='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="7" x2="15" y1="4" y2="4"/><line class="ql-stroke" x1="7" x2="15" y1="9" y2="9"/><line class="ql-stroke" x1="7" x2="15" y1="14" y2="14"/><line class="ql-stroke ql-thin" x1="2.5" x2="4.5" y1="5.5" y2="5.5"/><path class="ql-fill" d="M3.5,6A0.5,0.5,0,0,1,3,5.5V3.085l-0.276.138A0.5,0.5,0,0,1,2.053,3c-0.124-.247-0.023-0.324.224-0.447l1-.5A0.5,0.5,0,0,1,4,2.5v3A0.5,0.5,0,0,1,3.5,6Z"/><path class="ql-stroke ql-thin" d="M4.5,10.5h-2c0-.234,1.85-1.076,1.85-2.234A0.959,0.959,0,0,0,2.5,8.156"/><path class="ql-stroke ql-thin" d="M2.5,14.846a0.959,0.959,0,0,0,1.85-.109A0.7,0.7,0,0,0,3.75,14a0.688,0.688,0,0,0,.6-0.736,0.959,0.959,0,0,0-1.85-.109"/></svg>',UM='<svg viewbox="0 0 18 18"><path class="ql-fill" d="M15.5,15H13.861a3.858,3.858,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.921,1.921,0,0,0,12.021,11.7a0.50013,0.50013,0,1,0,.957.291h0a0.914,0.914,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.076-1.16971,1.86982-1.93971,2.43082A1.45639,1.45639,0,0,0,12,15.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,15Z"/><path class="ql-fill" d="M9.65,5.241a1,1,0,0,0-1.409.108L6,7.964,3.759,5.349A1,1,0,0,0,2.192,6.59178Q2.21541,6.6213,2.241,6.649L4.684,9.5,2.241,12.35A1,1,0,0,0,3.71,13.70722q0.02557-.02768.049-0.05722L6,11.036,8.241,13.65a1,1,0,1,0,1.567-1.24277Q9.78459,12.3777,9.759,12.35L7.316,9.5,9.759,6.651A1,1,0,0,0,9.65,5.241Z"/></svg>',jM='<svg viewbox="0 0 18 18"><path class="ql-fill" d="M15.5,7H13.861a4.015,4.015,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.922,1.922,0,0,0,12.021,3.7a0.5,0.5,0,1,0,.957.291,0.917,0.917,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.077-1.164,1.925-1.934,2.486A1.423,1.423,0,0,0,12,7.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,7Z"/><path class="ql-fill" d="M9.651,5.241a1,1,0,0,0-1.41.108L6,7.964,3.759,5.349a1,1,0,1,0-1.519,1.3L4.683,9.5,2.241,12.35a1,1,0,1,0,1.519,1.3L6,11.036,8.241,13.65a1,1,0,0,0,1.519-1.3L7.317,9.5,9.759,6.651A1,1,0,0,0,9.651,5.241Z"/></svg>',GM='<svg viewbox="0 0 18 18"><line class="ql-stroke ql-thin" x1="15.5" x2="2.5" y1="8.5" y2="9.5"/><path class="ql-fill" d="M9.007,8C6.542,7.791,6,7.519,6,6.5,6,5.792,7.283,5,9,5c1.571,0,2.765.679,2.969,1.309a1,1,0,0,0,1.9-.617C13.356,4.106,11.354,3,9,3,6.2,3,4,4.538,4,6.5a3.2,3.2,0,0,0,.5,1.843Z"/><path class="ql-fill" d="M8.984,10C11.457,10.208,12,10.479,12,11.5c0,0.708-1.283,1.5-3,1.5-1.571,0-2.765-.679-2.969-1.309a1,1,0,1,0-1.9.617C4.644,13.894,6.646,15,9,15c2.8,0,5-1.538,5-3.5a3.2,3.2,0,0,0-.5-1.843Z"/></svg>',WM='<svg viewbox="0 0 18 18"><rect class="ql-stroke" height="12" width="12" x="3" y="3"/><rect class="ql-fill" height="2" width="3" x="5" y="5"/><rect class="ql-fill" height="2" width="4" x="9" y="5"/><g class="ql-fill ql-transparent"><rect height="2" width="3" x="5" y="8"/><rect height="2" width="4" x="9" y="8"/><rect height="2" width="3" x="5" y="11"/><rect height="2" width="4" x="9" y="11"/></g></svg>',KM='<svg viewbox="0 0 18 18"><path class="ql-stroke" d="M5,3V9a4.012,4.012,0,0,0,4,4H9a4.012,4.012,0,0,0,4-4V3"/><rect class="ql-fill" height="1" rx="0.5" ry="0.5" width="12" x="3" y="15"/></svg>',YM='<svg viewbox="0 0 18 18"><rect class="ql-stroke" height="12" width="12" x="3" y="3"/><rect class="ql-fill" height="12" width="1" x="5" y="3"/><rect class="ql-fill" height="12" width="1" x="12" y="3"/><rect class="ql-fill" height="2" width="8" x="5" y="8"/><rect class="ql-fill" height="1" width="3" x="3" y="5"/><rect class="ql-fill" height="1" width="3" x="3" y="7"/><rect class="ql-fill" height="1" width="3" x="3" y="10"/><rect class="ql-fill" height="1" width="3" x="3" y="12"/><rect class="ql-fill" height="1" width="3" x="12" y="5"/><rect class="ql-fill" height="1" width="3" x="12" y="7"/><rect class="ql-fill" height="1" width="3" x="12" y="10"/><rect class="ql-fill" height="1" width="3" x="12" y="12"/></svg>',Ti={align:{"":vM,center:xM,right:yM,justify:zM},background:wM,blockquote:_M,bold:kM,clean:SM,code:Sw,"code-block":Sw,color:CM,direction:{"":EM,rtl:TM},formula:AM,header:{1:$M,2:LM,3:qM,4:MM,5:IM,6:NM},italic:DM,image:RM,indent:{"+1":OM,"-1":PM},link:HM,list:{bullet:FM,check:BM,ordered:VM},script:{sub:UM,super:jM},strike:GM,table:WM,underline:KM,video:YM};var XM='<svg viewbox="0 0 18 18"><polygon class="ql-stroke" points="7 11 9 13 11 11 7 11"/><polygon class="ql-stroke" points="7 7 9 5 11 7 7 7"/></svg>',Cw=0;function Ew(i,o){i.setAttribute(o,`${i.getAttribute(o)!=="true"}`)}var wm=class{constructor(o){this.select=o,this.container=document.createElement("span"),this.buildPicker(),this.select.style.display="none",this.select.parentNode.insertBefore(this.container,this.select),this.label.addEventListener("mousedown",()=>{this.togglePicker()}),this.label.addEventListener("keydown",t=>{switch(t.key){case"Enter":this.togglePicker();break;case"Escape":this.escape(),t.preventDefault();break;default:}}),this.select.addEventListener("change",this.update.bind(this))}togglePicker(){this.container.classList.toggle("ql-expanded"),Ew(this.label,"aria-expanded"),Ew(this.options,"aria-hidden")}buildItem(o){let t=document.createElement("span");t.tabIndex="0",t.setAttribute("role","button"),t.classList.add("ql-picker-item");let r=o.getAttribute("value");return r&&t.setAttribute("data-value",r),o.textContent&&t.setAttribute("data-label",o.textContent),t.addEventListener("click",()=>{this.selectItem(t,!0)}),t.addEventListener("keydown",n=>{switch(n.key){case"Enter":this.selectItem(t,!0),n.preventDefault();break;case"Escape":this.escape(),n.preventDefault();break;default:}}),t}buildLabel(){let o=document.createElement("span");return o.classList.add("ql-picker-label"),o.innerHTML=XM,o.tabIndex="0",o.setAttribute("role","button"),o.setAttribute("aria-expanded","false"),this.container.appendChild(o),o}buildOptions(){let o=document.createElement("span");o.classList.add("ql-picker-options"),o.setAttribute("aria-hidden","true"),o.tabIndex="-1",o.id=`ql-picker-options-${Cw}`,Cw+=1,this.label.setAttribute("aria-controls",o.id),this.options=o,Array.from(this.select.options).forEach(t=>{let r=this.buildItem(t);o.appendChild(r),t.selected===!0&&this.selectItem(r)}),this.container.appendChild(o)}buildPicker(){Array.from(this.select.attributes).forEach(o=>{this.container.setAttribute(o.name,o.value)}),this.container.classList.add("ql-picker"),this.label=this.buildLabel(),this.buildOptions()}escape(){this.close(),setTimeout(()=>this.label.focus(),1)}close(){this.container.classList.remove("ql-expanded"),this.label.setAttribute("aria-expanded","false"),this.options.setAttribute("aria-hidden","true")}selectItem(o){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r=this.container.querySelector(".ql-selected");o!==r&&(r?.classList.remove("ql-selected"),o!=null&&(o.classList.add("ql-selected"),this.select.selectedIndex=Array.from(o.parentNode.children).indexOf(o),o.hasAttribute("data-value")?this.label.setAttribute("data-value",o.getAttribute("data-value")):this.label.removeAttribute("data-value"),o.hasAttribute("data-label")?this.label.setAttribute("data-label",o.getAttribute("data-label")):this.label.removeAttribute("data-label"),t&&(this.select.dispatchEvent(new Event("change")),this.close())))}update(){let o;if(this.select.selectedIndex>-1){let r=this.container.querySelector(".ql-picker-options").children[this.select.selectedIndex];o=this.select.options[this.select.selectedIndex],this.selectItem(r)}else this.selectItem(null);let t=o!=null&&o!==this.select.querySelector("option[selected]");this.label.classList.toggle("ql-active",t)}},Ai=wm;var _m=class extends Ai{constructor(o,t){super(o),this.label.innerHTML=t,this.container.classList.add("ql-color-picker"),Array.from(this.container.querySelectorAll(".ql-picker-item")).slice(0,7).forEach(r=>{r.classList.add("ql-primary")})}buildItem(o){let t=super.buildItem(o);return t.style.backgroundColor=o.getAttribute("value")||"",t}selectItem(o,t){super.selectItem(o,t);let r=this.label.querySelector(".ql-color-label"),n=o&&o.getAttribute("data-value")||"";r&&(r.tagName==="line"?r.style.stroke=n:r.style.fill=n)}},dp=_m;var km=class extends Ai{constructor(o,t){super(o),this.container.classList.add("ql-icon-picker"),Array.from(this.container.querySelectorAll(".ql-picker-item")).forEach(r=>{r.innerHTML=t[r.getAttribute("data-value")||""]}),this.defaultItem=this.container.querySelector(".ql-selected"),this.selectItem(this.defaultItem)}selectItem(o,t){super.selectItem(o,t);let r=o||this.defaultItem;if(r!=null){if(this.label.innerHTML===r.innerHTML)return;this.label.innerHTML=r.innerHTML}}},pp=km;var QM=i=>{let{overflowY:o}=getComputedStyle(i,null);return o!=="visible"&&o!=="clip"},Sm=class{constructor(o,t){this.quill=o,this.boundsContainer=t||document.body,this.root=o.addContainer("ql-tooltip"),this.root.innerHTML=this.constructor.TEMPLATE,QM(this.quill.root)&&this.quill.root.addEventListener("scroll",()=>{this.root.style.marginTop=`${-1*this.quill.root.scrollTop}px`}),this.hide()}hide(){this.root.classList.add("ql-hidden")}position(o){let t=o.left+o.width/2-this.root.offsetWidth/2,r=o.bottom+this.quill.root.scrollTop;this.root.style.left=`${t}px`,this.root.style.top=`${r}px`,this.root.classList.remove("ql-flip");let n=this.boundsContainer.getBoundingClientRect(),a=this.root.getBoundingClientRect(),s=0;if(a.right>n.right&&(s=n.right-a.right,this.root.style.left=`${t+s}px`),a.left<n.left&&(s=n.left-a.left,this.root.style.left=`${t+s}px`),a.bottom>n.bottom){let l=a.bottom-a.top,d=o.bottom-o.top+l;this.root.style.top=`${r-d}px`,this.root.classList.add("ql-flip")}return s}show(){this.root.classList.remove("ql-editing"),this.root.classList.remove("ql-hidden")}},hp=Sm;var JM=[!1,"center","right","justify"],ZM=["#000000","#e60000","#ff9900","#ffff00","#008a00","#0066cc","#9933ff","#ffffff","#facccc","#ffebcc","#ffffcc","#cce8cc","#cce0f5","#ebd6ff","#bbbbbb","#f06666","#ffc266","#ffff66","#66b966","#66a3e0","#c285ff","#888888","#a10000","#b26b00","#b2b200","#006100","#0047b2","#6b24b2","#444444","#5c0000","#663d00","#666600","#003700","#002966","#3d1466"],t6=[!1,"serif","monospace"],e6=["1","2","3",!1],r6=["small",!1,"large","huge"],Yn=class extends vs{constructor(o,t){super(o,t);let r=n=>{if(!document.body.contains(o.root)){document.body.removeEventListener("click",r);return}this.tooltip!=null&&!this.tooltip.root.contains(n.target)&&document.activeElement!==this.tooltip.textbox&&!this.quill.hasFocus()&&this.tooltip.hide(),this.pickers!=null&&this.pickers.forEach(a=>{a.container.contains(n.target)||a.close()})};o.emitter.listenDOM("click",document.body,r)}addModule(o){let t=super.addModule(o);return o==="toolbar"&&this.extendToolbar(t),t}buildButtons(o,t){Array.from(o).forEach(r=>{(r.getAttribute("class")||"").split(/\s+/).forEach(a=>{if(a.startsWith("ql-")&&(a=a.slice(3),t[a]!=null))if(a==="direction")r.innerHTML=t[a][""]+t[a].rtl;else if(typeof t[a]=="string")r.innerHTML=t[a];else{let s=r.value||"";s!=null&&t[a][s]&&(r.innerHTML=t[a][s])}})})}buildPickers(o,t){this.pickers=Array.from(o).map(n=>{if(n.classList.contains("ql-align")&&(n.querySelector("option")==null&&Xl(n,JM),typeof t.align=="object"))return new pp(n,t.align);if(n.classList.contains("ql-background")||n.classList.contains("ql-color")){let a=n.classList.contains("ql-background")?"background":"color";return n.querySelector("option")==null&&Xl(n,ZM,a==="background"?"#ffffff":"#000000"),new dp(n,t[a])}return n.querySelector("option")==null&&(n.classList.contains("ql-font")?Xl(n,t6):n.classList.contains("ql-header")?Xl(n,e6):n.classList.contains("ql-size")&&Xl(n,r6)),new Ai(n)});let r=()=>{this.pickers.forEach(n=>{n.update()})};this.quill.on(Q.events.EDITOR_CHANGE,r)}};Yn.DEFAULTS=Hr({},vs.DEFAULTS,{modules:{toolbar:{handlers:{formula(){this.quill.theme.tooltip.edit("formula")},image(){let i=this.container.querySelector("input.ql-image[type=file]");i==null&&(i=document.createElement("input"),i.setAttribute("type","file"),i.setAttribute("accept",this.quill.uploader.options.mimetypes.join(", ")),i.classList.add("ql-image"),i.addEventListener("change",()=>{let o=this.quill.getSelection(!0);this.quill.uploader.upload(o,i.files),i.value=""}),this.container.appendChild(i)),i.click()},video(){this.quill.theme.tooltip.edit("video")}}}}});var ks=class extends hp{constructor(o,t){super(o,t),this.textbox=this.root.querySelector('input[type="text"]'),this.listen()}listen(){this.textbox.addEventListener("keydown",o=>{o.key==="Enter"?(this.save(),o.preventDefault()):o.key==="Escape"&&(this.cancel(),o.preventDefault())})}cancel(){this.hide(),this.restoreFocus()}edit(){let o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"link",t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(this.root.classList.remove("ql-hidden"),this.root.classList.add("ql-editing"),this.textbox==null)return;t!=null?this.textbox.value=t:o!==this.root.getAttribute("data-mode")&&(this.textbox.value="");let r=this.quill.getBounds(this.quill.selection.savedRange);r!=null&&this.position(r),this.textbox.select(),this.textbox.setAttribute("placeholder",this.textbox.getAttribute(`data-${o}`)||""),this.root.setAttribute("data-mode",o)}restoreFocus(){this.quill.focus({preventScroll:!0})}save(){let{value:o}=this.textbox;switch(this.root.getAttribute("data-mode")){case"link":{let{scrollTop:t}=this.quill.root;this.linkRange?(this.quill.formatText(this.linkRange,"link",o,Q.sources.USER),delete this.linkRange):(this.restoreFocus(),this.quill.format("link",o,Q.sources.USER)),this.quill.root.scrollTop=t;break}case"video":o=o6(o);case"formula":{if(!o)break;let t=this.quill.getSelection(!0);if(t!=null){let r=t.index+t.length;this.quill.insertEmbed(r,this.root.getAttribute("data-mode"),o,Q.sources.USER),this.root.getAttribute("data-mode")==="formula"&&this.quill.insertText(r+1," ",Q.sources.USER),this.quill.setSelection(r+2,Q.sources.USER)}break}default:}this.textbox.value="",this.hide()}};function o6(i){let o=i.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtube\.com\/watch.*v=([a-zA-Z0-9_-]+)/)||i.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtu\.be\/([a-zA-Z0-9_-]+)/);return o?`${o[1]||"https"}://www.youtube.com/embed/${o[2]}?showinfo=0`:(o=i.match(/^(?:(https?):\/\/)?(?:www\.)?vimeo\.com\/(\d+)/))?`${o[1]||"https"}://player.vimeo.com/video/${o[2]}/`:i}function Xl(i,o){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;o.forEach(r=>{let n=document.createElement("option");r===t?n.setAttribute("selected","selected"):n.setAttribute("value",String(r)),i.appendChild(n)})}var n6=[["bold","italic","link"],[{header:1},{header:2},"blockquote"]],up=class extends ks{constructor(o,t){super(o,t),this.quill.on(Q.events.EDITOR_CHANGE,(r,n,a,s)=>{if(r===Q.events.SELECTION_CHANGE)if(n!=null&&n.length>0&&s===Q.sources.USER){this.show(),this.root.style.left="0px",this.root.style.width="",this.root.style.width=`${this.root.offsetWidth}px`;let l=this.quill.getLines(n.index,n.length);if(l.length===1){let d=this.quill.getBounds(n);d!=null&&this.position(d)}else{let d=l[l.length-1],h=this.quill.getIndex(d),m=Math.min(d.length()-1,n.index+n.length-h),f=this.quill.getBounds(new Er(h,m));f!=null&&this.position(f)}}else document.activeElement!==this.textbox&&this.quill.hasFocus()&&this.hide()})}listen(){super.listen(),this.root.querySelector(".ql-close").addEventListener("click",()=>{this.root.classList.remove("ql-editing")}),this.quill.on(Q.events.SCROLL_OPTIMIZE,()=>{setTimeout(()=>{if(this.root.classList.contains("ql-hidden"))return;let o=this.quill.getSelection();if(o!=null){let t=this.quill.getBounds(o);t!=null&&this.position(t)}},1)})}cancel(){this.show()}position(o){let t=super.position(o),r=this.root.querySelector(".ql-tooltip-arrow");return r.style.marginLeft="",t!==0&&(r.style.marginLeft=`${-1*t-r.offsetWidth/2}px`),t}};V(up,"TEMPLATE",['<span class="ql-tooltip-arrow"></span>','<div class="ql-tooltip-editor">','<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">','<a class="ql-close"></a>',"</div>"].join(""));var Ql=class extends Yn{constructor(o,t){t.modules.toolbar!=null&&t.modules.toolbar.container==null&&(t.modules.toolbar.container=n6),super(o,t),this.quill.container.classList.add("ql-bubble")}extendToolbar(o){this.tooltip=new up(this.quill,this.options.bounds),o.container!=null&&(this.tooltip.root.appendChild(o.container),this.buildButtons(o.container.querySelectorAll("button"),Ti),this.buildPickers(o.container.querySelectorAll("select"),Ti))}};Ql.DEFAULTS=Hr({},Yn.DEFAULTS,{modules:{toolbar:{handlers:{link(i){i?this.quill.theme.tooltip.edit():this.quill.format("link",!1,U.sources.USER)}}}}});var i6=[[{header:["1","2","3",!1]}],["bold","italic","underline","link"],[{list:"ordered"},{list:"bullet"}],["clean"]],mp=class extends ks{constructor(){super(...arguments);V(this,"preview",this.root.querySelector("a.ql-preview"))}listen(){super.listen(),this.root.querySelector("a.ql-action").addEventListener("click",t=>{this.root.classList.contains("ql-editing")?this.save():this.edit("link",this.preview.textContent),t.preventDefault()}),this.root.querySelector("a.ql-remove").addEventListener("click",t=>{if(this.linkRange!=null){let r=this.linkRange;this.restoreFocus(),this.quill.formatText(r,"link",!1,Q.sources.USER),delete this.linkRange}t.preventDefault(),this.hide()}),this.quill.on(Q.events.SELECTION_CHANGE,(t,r,n)=>{if(t!=null){if(t.length===0&&n===Q.sources.USER){let[a,s]=this.quill.scroll.descendant(no,t.index);if(a!=null){this.linkRange=new Er(t.index-s,a.length());let l=no.formats(a.domNode);this.preview.textContent=l,this.preview.setAttribute("href",l),this.show();let d=this.quill.getBounds(this.linkRange);d!=null&&this.position(d);return}}else delete this.linkRange;this.hide()}})}show(){super.show(),this.root.removeAttribute("data-mode")}};V(mp,"TEMPLATE",['<a class="ql-preview" rel="noopener noreferrer" target="_blank" href="about:blank"></a>','<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">','<a class="ql-action"></a>','<a class="ql-remove"></a>'].join(""));var fp=class extends Yn{constructor(o,t){t.modules.toolbar!=null&&t.modules.toolbar.container==null&&(t.modules.toolbar.container=i6),super(o,t),this.quill.container.classList.add("ql-snow")}extendToolbar(o){o.container!=null&&(o.container.classList.add("ql-snow"),this.buildButtons(o.container.querySelectorAll("button"),Ti),this.buildPickers(o.container.querySelectorAll("select"),Ti),this.tooltip=new mp(this.quill,this.options.bounds),o.container.querySelector(".ql-link")&&this.quill.keyboard.addBinding({key:"k",shortKey:!0},(t,r)=>{o.handlers.link.call(o,!r.format.link)}))}};fp.DEFAULTS=Hr({},Yn.DEFAULTS,{modules:{toolbar:{handlers:{link(i){if(i){let o=this.quill.getSelection();if(o==null||o.length===0)return;let t=this.quill.getText(o);/^\S+@\S+\.\S+$/.test(t)&&t.indexOf("mailto:")!==0&&(t=`mailto:${t}`);let{tooltip:r}=this.quill.theme;r.edit("link",t)}else this.quill.format("link",!1,U.sources.USER)}}}}});var Tw=fp;sp.register({"attributors/attribute/direction":Zd,"attributors/class/align":am,"attributors/class/background":Wz,"attributors/class/color":Gz,"attributors/class/direction":lm,"attributors/class/font":dm,"attributors/class/size":pm,"attributors/style/align":Jd,"attributors/style/background":Ml,"attributors/style/color":ql,"attributors/style/direction":tp,"attributors/style/font":ep,"attributors/style/size":rp},!0);sp.register({"formats/align":am,"formats/direction":lm,"formats/indent":lw,"formats/background":Ml,"formats/color":ql,"formats/font":dm,"formats/size":pm,"formats/blockquote":cw,"formats/code-block":_e,"formats/header":dw,"formats/list":Ci,"formats/bold":zs,"formats/code":ys,"formats/italic":pw,"formats/link":no,"formats/script":hw,"formats/strike":uw,"formats/underline":mw,"formats/formula":fw,"formats/image":bw,"formats/video":xw,"modules/syntax":Kl,"modules/table":zw,"modules/toolbar":Ei,"themes/bubble":Ql,"themes/snow":Tw,"ui/icons":Ti,"ui/picker":Ai,"ui/icon-picker":pp,"ui/color-picker":dp,"ui/tooltip":hp},!0);var at=sp;var ao=class extends C{render(){return u`
2528
2531
  <div style="display: none;"></div>`}};c([p()],ao.prototype,"uri",2),c([p()],ao.prototype,"label",2),c([p()],ao.prototype,"content",2),c([p()],ao.prototype,"key",2),c([p()],ao.prototype,"icon",2),c([p({type:Number})],ao.prototype,"order",2);ao.define("zn-editor-quick-action");var Cm=ao;ao.define("zn-editor-quick-action");var Gr=class extends C{constructor(){super(...arguments);this.handler="dialog";this.contextMenu=!1}render(){return u`
2529
2532
  <zn-button class="tool-action"
2530
2533
  color="transparent"
@@ -2535,8 +2538,8 @@ ${ma(this.code(o,t))}
2535
2538
  data-toolbar-key="${this.key}"
2536
2539
  aria-label="${this.label}"></zn-button>
2537
2540
  <div class="${this.handler}"></div>`}};c([p()],Gr.prototype,"uri",2),c([p()],Gr.prototype,"label",2),c([p()],Gr.prototype,"key",2),c([p()],Gr.prototype,"icon",2),c([p()],Gr.prototype,"handler",2),c([p({type:Boolean,attribute:"context-menu",reflect:!0})],Gr.prototype,"contextMenu",2),c([p({type:Number})],Gr.prototype,"order",2);Gr.define("zn-editor-tool");var Jl=Gr;Gr.define("zn-editor-tool");var Em=class{constructor(o,t){this._startIndex=-1;this._keydownHandler=o=>this.onKeydown(o);this._docClickHandler=o=>this.onDocumentClick(o);this._featureConfig={};this._quill=o,this._toolbarModule=o.getModule("toolbar"),this._featureConfig=t.config||{},this.initComponent(),this.attachEvents()}initComponent(){this._component=this.createComponent(),this._quill.container.ownerDocument.body.appendChild(this._component)}attachEvents(){this._quill.on(at.events.TEXT_CHANGE,()=>this.updateFromEditor()),this._quill.on(at.events.EDITOR_CHANGE,()=>this.updateFromEditor()),this._quill.root.addEventListener("keydown",this._keydownHandler),this._component.addEventListener("zn-format-select",o=>this.onToolbarSelect(o)),this._quill.on("editor-change",()=>this.positionComponent()),this._quill.focus()}createComponent(){let o=u`
2538
- <zn-context-menu></zn-context-menu>`;return se(o)}onDocumentClick(o){let t=o.composedPath?o.composedPath()[0]:o.target;t&&!this._component.contains(t)&&!this._quill.root.contains(t)&&this.hide()}updateFromEditor(){let o=this.getToolbarQuery();if(!o){this.hide();return}let{start:t,formatQuery:r}=o;this._startIndex=t;try{let n=r.toLowerCase();this._component.results=this._getOptions().filter(a=>!n||a.label.toLowerCase().includes(n)||a?.format?.toLowerCase().includes(n))}catch{this._component.results=[]}this._component.query=r,this.show(),this.positionComponent()}positionComponent(){if(!this._component||!this._component.open)return;let o=this._quill.getSelection();if(!o)return;let t=this._quill.getBounds(o.index);if(!t)return;let r=this._quill.container.getBoundingClientRect(),n=Math.max(0,r.left+t.left),a=r.top+t.bottom+4;this._component.setPosition(n,a)}getToolbarQuery(){try{let o=this._quill.getSelection();if(!o)return null;let t=o.index,r=50,n=this._quill.getText(Math.max(0,t-r),Math.min(r,t)),a=t-Math.max(0,t-r),s=n.slice(0,a),l=s.lastIndexOf("/");if(l===-1)return null;let d=l>0?s[l-1]:" ";if(d&&/[^\s\n]/.test(d))return null;let h=s.substring(l+1);return/[\s\n]/.test(h)?null:{start:t-h.length-1,formatQuery:h}}catch{return null}}onKeydown(o){if(this._component?.open){if(o.key==="Escape"){o.preventDefault(),o.stopPropagation(),this.hide();return}if(o.key==="ArrowDown"){o.preventDefault(),o.stopPropagation();let t=(this._component.getActiveIndex?.()??-1)+1;this._component.setActiveIndex?.(t);return}if(o.key==="ArrowUp"){o.preventDefault(),o.stopPropagation();let t=(this._component.getActiveIndex?.()??0)-1;this._component.setActiveIndex?.(t);return}if(o.key==="Enter"){let t=this._component.getActiveIndex?.(),r=this._component.results||[],n=typeof t=="number"&&t>=0&&t<r.length?r[t]:void 0;if(n?.format==="toolbar"&&n?.key){o.preventDefault(),o.stopPropagation(),this._clickToolbarItem(n.key);return}n?.format&&(o.preventDefault(),o.stopPropagation(),this._applySelectedFormat(n.format,n.value))}}}onToolbarSelect(o){let t=o.detail?.key;if(t){this._clickToolbarItem(t);return}let r=o.detail?.format||"",n=o.detail?.value;r&&this._applySelectedFormat(r,n)}_clickToolbarItem(o){this.deleteLastIndex(),this._toolbarModule.trigger?.(o),this.hide()}_applySelectedFormat(o,t){if(this.deleteLastIndex(),o==="insert"&&typeof t=="string"){let r=this._quill.getSelection();if(r){let n=r.index-1;this._quill.deleteText(n,1,at.sources.USER),this._quill.getText(n-1,1)!==" "&&n>0&&(this._quill.insertText(n," ",at.sources.USER),n+=1);let s=this._quill.clipboard.convert({html:t});this._quill.updateContents(new Aw.default().retain(n).concat(s),at.sources.USER),setTimeout(()=>this._quill.setSelection(n+s.length()+1,0,at.sources.SILENT),0)}this._quill.focus(),this.hide();return}this._toolbarModule.callFormat(o,t),this._quill.focus(),this.hide()}deleteLastIndex(){let o=this._quill.getSelection();if(o&&this._startIndex>=0){let t=this._startIndex,r=o.index-t;r>=0&&(this._quill.deleteText(t,r,at.sources.USER),this._quill.setSelection(t,0,at.sources.SILENT))}}_getOptions(){let o=[],t=0,r=this._quill.container.getRootNode();if(r?.host){let n=r.querySelector('slot[name="context-items"]');(n?n.assignedElements({flatten:!0}):[]).forEach(d=>{if(!(d instanceof Cm))return;let{label:h,content:m,uri:f,icon:b,key:g}=d,v;typeof d.order=="number"?v=d.order:v=t++,h&&b&&(g?o.push({icon:b,label:h,format:"toolbar",key:g,order:v}):f?o.push({icon:b,label:h,format:"dialog",value:f,order:v}):m&&o.push({icon:b,label:h,format:"insert",value:m,order:v}))});let s=r.querySelector('slot[name="tools"]');(s?s.assignedElements({flatten:!0}):[]).forEach(d=>{if(!(d instanceof Jl)||!d.contextMenu)return;let{label:h,icon:m,key:f}=d;if(!h||!m||!f)return;let b=typeof d.order=="number"?d.order:t++;o.push({icon:m,label:h,format:"toolbar",key:f,order:b})})}return o.push({icon:"bold@lu",label:"Bold",format:"bold",order:t++},{icon:"italic@lu",label:"Italic",format:"italic",order:t++},{icon:"underline@lu",label:"Underline",format:"underline",order:t++},{icon:"strikethrough@lu",label:"Strikethrough",format:"strike",order:t++},{icon:"text-quote@lu",label:"Blockquote",format:"blockquote",order:t++}),this._featureConfig.codeEnabled!==!1&&o.push({icon:"code@lu",label:"Inline Code",format:"code",order:t++}),this._featureConfig.codeBlocksEnabled!==!1&&o.push({icon:"square-code@lu",label:"Code Block",format:"code-block",order:t++}),o.push({icon:"heading-1@lu",label:"Heading 1",format:"header",value:"1",order:t++},{icon:"heading-2@lu",label:"Heading 2",format:"header",value:"2",order:t++},{icon:"case-sensitive@lu",label:"Normal Text",format:"header",value:"",order:t++},{icon:"list@lu",label:"Bulleted List",format:"list",value:"bullet",order:t++},{icon:"list-ordered@lu",label:"Numbered List",format:"list",value:"ordered",order:t++},{icon:"list-todo@lu",label:"Checklist",format:"list",value:"checked",order:t++}),this._featureConfig.linksEnabled!==!1&&o.push({icon:"link@lu",label:"Link",format:"link",value:!0,order:t++}),this._featureConfig.dividersEnabled!==!1&&o.push({icon:"minus@lu",label:"Divider",format:"divider",order:t++}),this._featureConfig.attachmentsEnabled!==!1&&o.push({icon:"paperclip@lu",label:"Attachment",format:"attachment",order:t++}),this._featureConfig.imagesEnabled!==!1&&o.push({icon:"image@lu",label:"Image",format:"image",order:t++}),this._featureConfig.videosEnabled!==!1&&o.push({icon:"video@lu",label:"Video",format:"video",order:t++}),this._featureConfig.datesEnabled!==!1&&o.push({icon:"calendar@lu",label:"Date",format:"date",order:t++}),o.push({icon:"remove-formatting@lu",label:"Clear Formatting",format:"clean",order:t++}),o.sort((n,a)=>(n.order??0)-(a.order??0)),o}show(){this._component.open||(this._component.show(),this._quill.container.ownerDocument.addEventListener("click",this._docClickHandler))}hide(){this._component.hide(),this._startIndex=-1,this._quill.container.ownerDocument.removeEventListener("click",this._docClickHandler)}isOpen(){return this._component?.open}},$w=Em;var Lw=ar(Am(),1);var $m=class{constructor(o){this._quill=o,this._initPicker()}_initPicker(){this.getToolbarDateContainer().then(o=>{o&&(o.innerHTML="",new Lw.default(o,{inline:!0,locale:{days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],daysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],daysMin:["Su","Mo","Tu","We","Th","Fr","Sa"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],today:"Today",clear:"Clear",dateFormat:"MM/dd/yyyy",timeFormat:"hh:ii aa",firstDay:0},onSelect:({formattedDate:t})=>this._onDateSelect(t)}))})}async getToolbarDateContainer(){try{let o=this._quill.container?.getRootNode?.();if(!o)return null;let t=o.getElementById?.("toolbar");return await t?.updateComplete,t?.shadowRoot?.querySelector?.(".date-picker")??null}catch{return null}}_onDateSelect(o){try{if(!o||!this._quill)return;let t=this._quill.getSelection(!0);if(t){let r=Array.isArray(o)?o.join(", "):o;this._quill.insertText(t.index,r,at.sources.USER),this._quill.setSelection(t.index+r.length,0,at.sources.USER)}else{let r=Math.max(0,this._quill.getLength()-1),n=Array.isArray(o)?o.join(", "):o;this._quill.insertText(r,n,at.sources.USER),this._quill.setSelection(r+n.length,0,at.sources.USER)}}catch{}}},qw=$m;var Lm=class{constructor(o,t){this._quill=o,this._editorId=t.editorId,this._document=this._quill.container.ownerDocument,this._initDialog()}_initDialog(){this._component=this.createComponent(),this._mountPoint().appendChild(this._component),this._component.editorId=this._editorId}get component(){return this._component}_mountPoint(){let o=this._quill.container.getRootNode();return(o instanceof ShadowRoot?o.host:null)?.parentElement??this._document.body}createComponent(){let o=u`
2539
- <zn-editor-dialog></zn-editor-dialog>`;return se(o)}isOpen(){return this._component.dialogEl.open}close(){this._component.dialogEl.close()}},Mw=Lm;var a6={onDrop:()=>{},draggableContentTypePattern:"^image\\/",draggables:[]},tc=class{constructor(o,t){this._container=null;this._draggables=[];this.nullReturner=()=>null;this.handleDrop=o=>{let t=this._options.onDrop,r=o.target&&o.target["ql-data"]?o.target:this._container,n=o.dataTransfer?.files,a=l6(n,this._draggables);a.length!==0&&(o.stopPropagation(),o.preventDefault(),Promise.all(a.map(s=>Promise.resolve((t||this.nullReturner)(s.file,{tag:s.tag,attr:s.attr})).then(l=>({on_drop_ret_val:l,fileInfo:s})))).then(s=>Promise.all(s.map(({on_drop_ret_val:l,fileInfo:d})=>{if(l===!1)return;let{tag:h,attr:m}=d,f;return l===null||(f=l),Promise.resolve(f).then(b=>({data:b,tag:h,attr:m}))}))).then(s=>s.forEach(l=>{if(l){let{data:d,tag:h,attr:m}=l,f=document.createElement(h);f.setAttribute(m,d),r.appendChild(f)}})))};this._quill=o,this._options=Object.assign({},a6,t),this._container=this._quill.addContainer("ql-editor"),this._draggables=this._options.draggables.map(s6),this._quill.root.addEventListener("drop",this.handleDrop)}},s6=i=>{if(i.content_type_pattern&&i.tag&&i.attr){let o=Object.assign({},i);return o.content_type_regex=new RegExp(i.content_type_pattern),delete o.content_type_pattern,o}e.draggable=i},l6=(i,o)=>{let t=[];if(i)for(let r=0;r<i.length;r++){let n=i.item(r),a=o.find(s=>s.content_type_regex.test(n.type));a&&t.push({file:n,tag:a.tag,attr:a.attr})}return t};var Iw;function gp(){return Iw??(Iw=(async()=>{let[i,o]=await Promise.all([import("./chunks/zn.XO7QERPZ.js"),import("./chunks/zn.GRJSS6IO.js")]),t=o.default;try{i.init({data:t})}catch{}return{Picker:i.Picker,SearchIndex:i.SearchIndex,data:t}})()),Iw}var qm=class{constructor(o){this._mo=null;this._quill=o,this.initPicker();let t=this.getHostEditor();t&&(this._mo=new MutationObserver(()=>this.initPicker()),this._mo.observe(t,{attributes:!0,attributeFilter:["t"]}))}getHostEditor(){let o=this._quill.container?.getRootNode?.();return o&&o.host}async getToolbarEmojiContainer(){try{let o=this._quill.container?.getRootNode?.();if(!o)return null;let t=o.getElementById?.("toolbar");return await t?.updateComplete,t?.shadowRoot?.querySelector?.(".emoji-picker")??null}catch{return null}}getTheme(){let o=this.getHostEditor();return(o?.t??o?.getAttribute?.("t"))==="dark"?"dark":"light"}initPicker(){Promise.all([this.getToolbarEmojiContainer(),gp()]).then(([o,{Picker:t,data:r}])=>{o&&(o.innerHTML="",new t({parent:o,data:r,previewPosition:"none",skinTonePosition:"none",theme:this.getTheme(),set:"native",icons:"solid",onEmojiSelect:n=>this.onEmojiSelect(n)}))})}onEmojiSelect(o){let t=o?.native??o?.skins?.[0]?.native??"";if(!t||!this._quill)return;let r=this._quill.getSelection(!0);if(r)this._quill.insertText(r.index,t,at.sources.USER),this._quill.setSelection(r.index+t.length,0,at.sources.USER);else{let n=Math.max(0,this._quill.getLength()-1);this._quill.insertText(n,t,at.sources.USER),this._quill.setSelection(n+t.length,0,at.sources.USER)}this.getToolbarEmojiContainer().then(n=>{if(!n)return;n.getRootNode().host?.closest?.("zn-dialog")?.hide?.()})}},Nw=qm;var Dw=A`:host{position:absolute;z-index:var(--zn-z-index-editor-action);display:none;background:var(--zn-panel-background-color);border:1px solid var(--zn-border-color);border-radius:8px;box-shadow:var(--zn-shadow-medium);padding:6px;max-height:220px;overflow-y:auto;min-width:180px}:host([open]){display:block}.header{padding:4px 6px;font-size:var(--zn-font-size-x-small);opacity:0.6}.item{display:flex;align-items:center;gap:8px;padding:6px 8px;width:100%;border:none;background:transparent;cursor:pointer;font:inherit}.item[aria-selected=true]{background:var(--zn-input-background-color-hover)}.emoji{font-size:var(--zn-font-size-medium)}.label{opacity:0.7}.empty{padding:8px;opacity:0.7}`;var Xn=class extends C{constructor(){super(...arguments);this.open=!1;this.query="";this.results=[];this._activeIndex=-1;this.onMouseEnterItem=t=>{let r=t.currentTarget;if(!r)return;let n=parseInt(r.dataset.index||"-1",10);Number.isNaN(n)||this.setActiveIndex(n)};this.onClickItem=t=>{let r=t.currentTarget;if(!r)return;let n=parseInt(r.dataset.index||"-1",10);if(Number.isNaN(n))return;let a=this.results?.[n];a&&this.dispatchEvent(new CustomEvent("zn-emoji-select",{bubbles:!0,composed:!0,detail:{emojiChar:a.emojiChar,label:a.label}}))}}show(){this.open=!0}hide(){this.open=!1,this._activeIndex=-1}setPosition(t,r){this.style.left=`${Math.max(0,t)}px`,this.style.top=`${r}px`}setActiveIndex(t){let r=this.results?.length??0;if(!r){this._activeIndex=-1;return}t<0&&(t=r-1),t>=r&&(t=0),this._activeIndex=t,this.requestUpdate(),requestAnimationFrame(()=>{Array.from(this.renderRoot.querySelectorAll("[data-emoji-item]"))[this._activeIndex]?.scrollIntoView?.({block:"nearest"})})}getActiveIndex(){return this._activeIndex}willUpdate(t){t.has("results")&&(this._activeIndex=this.results?.length?0:-1)}render(){return u`
2541
+ <zn-context-menu></zn-context-menu>`;return le(o)}onDocumentClick(o){let t=o.composedPath?o.composedPath()[0]:o.target;t&&!this._component.contains(t)&&!this._quill.root.contains(t)&&this.hide()}updateFromEditor(){let o=this.getToolbarQuery();if(!o){this.hide();return}let{start:t,formatQuery:r}=o;this._startIndex=t;try{let n=r.toLowerCase();this._component.results=this._getOptions().filter(a=>!n||a.label.toLowerCase().includes(n)||a?.format?.toLowerCase().includes(n))}catch{this._component.results=[]}this._component.query=r,this.show(),this.positionComponent()}positionComponent(){if(!this._component||!this._component.open)return;let o=this._quill.getSelection();if(!o)return;let t=this._quill.getBounds(o.index);if(!t)return;let r=this._quill.container.getBoundingClientRect(),n=Math.max(0,r.left+t.left),a=r.top+t.bottom+4;this._component.setPosition(n,a)}getToolbarQuery(){try{let o=this._quill.getSelection();if(!o)return null;let t=o.index,r=50,n=this._quill.getText(Math.max(0,t-r),Math.min(r,t)),a=t-Math.max(0,t-r),s=n.slice(0,a),l=s.lastIndexOf("/");if(l===-1)return null;let d=l>0?s[l-1]:" ";if(d&&/[^\s\n]/.test(d))return null;let h=s.substring(l+1);return/[\s\n]/.test(h)?null:{start:t-h.length-1,formatQuery:h}}catch{return null}}onKeydown(o){if(this._component?.open){if(o.key==="Escape"){o.preventDefault(),o.stopPropagation(),this.hide();return}if(o.key==="ArrowDown"){o.preventDefault(),o.stopPropagation();let t=(this._component.getActiveIndex?.()??-1)+1;this._component.setActiveIndex?.(t);return}if(o.key==="ArrowUp"){o.preventDefault(),o.stopPropagation();let t=(this._component.getActiveIndex?.()??0)-1;this._component.setActiveIndex?.(t);return}if(o.key==="Enter"){let t=this._component.getActiveIndex?.(),r=this._component.results||[],n=typeof t=="number"&&t>=0&&t<r.length?r[t]:void 0;if(n?.format==="toolbar"&&n?.key){o.preventDefault(),o.stopPropagation(),this._clickToolbarItem(n.key);return}n?.format&&(o.preventDefault(),o.stopPropagation(),this._applySelectedFormat(n.format,n.value))}}}onToolbarSelect(o){let t=o.detail?.key;if(t){this._clickToolbarItem(t);return}let r=o.detail?.format||"",n=o.detail?.value;r&&this._applySelectedFormat(r,n)}_clickToolbarItem(o){this.deleteLastIndex(),this._toolbarModule.trigger?.(o),this.hide()}_applySelectedFormat(o,t){if(this.deleteLastIndex(),o==="insert"&&typeof t=="string"){let r=this._quill.getSelection();if(r){let n=r.index-1;this._quill.deleteText(n,1,at.sources.USER),this._quill.getText(n-1,1)!==" "&&n>0&&(this._quill.insertText(n," ",at.sources.USER),n+=1);let s=this._quill.clipboard.convert({html:t});this._quill.updateContents(new Aw.default().retain(n).concat(s),at.sources.USER),setTimeout(()=>this._quill.setSelection(n+s.length()+1,0,at.sources.SILENT),0)}this._quill.focus(),this.hide();return}this._toolbarModule.callFormat(o,t),this._quill.focus(),this.hide()}deleteLastIndex(){let o=this._quill.getSelection();if(o&&this._startIndex>=0){let t=this._startIndex,r=o.index-t;r>=0&&(this._quill.deleteText(t,r,at.sources.USER),this._quill.setSelection(t,0,at.sources.SILENT))}}_getOptions(){let o=[],t=0,r=this._quill.container.getRootNode();if(r?.host){let n=r.querySelector('slot[name="context-items"]');(n?n.assignedElements({flatten:!0}):[]).forEach(d=>{if(!(d instanceof Cm))return;let{label:h,content:m,uri:f,icon:b,key:g}=d,v;typeof d.order=="number"?v=d.order:v=t++,h&&b&&(g?o.push({icon:b,label:h,format:"toolbar",key:g,order:v}):f?o.push({icon:b,label:h,format:"dialog",value:f,order:v}):m&&o.push({icon:b,label:h,format:"insert",value:m,order:v}))});let s=r.querySelector('slot[name="tools"]');(s?s.assignedElements({flatten:!0}):[]).forEach(d=>{if(!(d instanceof Jl)||!d.contextMenu)return;let{label:h,icon:m,key:f}=d;if(!h||!m||!f)return;let b=typeof d.order=="number"?d.order:t++;o.push({icon:m,label:h,format:"toolbar",key:f,order:b})})}return o.push({icon:"bold@lu",label:"Bold",format:"bold",order:t++},{icon:"italic@lu",label:"Italic",format:"italic",order:t++},{icon:"underline@lu",label:"Underline",format:"underline",order:t++},{icon:"strikethrough@lu",label:"Strikethrough",format:"strike",order:t++},{icon:"text-quote@lu",label:"Blockquote",format:"blockquote",order:t++}),this._featureConfig.codeEnabled!==!1&&o.push({icon:"code@lu",label:"Inline Code",format:"code",order:t++}),this._featureConfig.codeBlocksEnabled!==!1&&o.push({icon:"square-code@lu",label:"Code Block",format:"code-block",order:t++}),o.push({icon:"heading-1@lu",label:"Heading 1",format:"header",value:"1",order:t++},{icon:"heading-2@lu",label:"Heading 2",format:"header",value:"2",order:t++},{icon:"case-sensitive@lu",label:"Normal Text",format:"header",value:"",order:t++},{icon:"list@lu",label:"Bulleted List",format:"list",value:"bullet",order:t++},{icon:"list-ordered@lu",label:"Numbered List",format:"list",value:"ordered",order:t++},{icon:"list-todo@lu",label:"Checklist",format:"list",value:"checked",order:t++}),this._featureConfig.linksEnabled!==!1&&o.push({icon:"link@lu",label:"Link",format:"link",value:!0,order:t++}),this._featureConfig.dividersEnabled!==!1&&o.push({icon:"minus@lu",label:"Divider",format:"divider",order:t++}),this._featureConfig.attachmentsEnabled!==!1&&o.push({icon:"paperclip@lu",label:"Attachment",format:"attachment",order:t++}),this._featureConfig.imagesEnabled!==!1&&o.push({icon:"image@lu",label:"Image",format:"image",order:t++}),this._featureConfig.videosEnabled!==!1&&o.push({icon:"video@lu",label:"Video",format:"video",order:t++}),this._featureConfig.datesEnabled!==!1&&o.push({icon:"calendar@lu",label:"Date",format:"date",order:t++}),o.push({icon:"remove-formatting@lu",label:"Clear Formatting",format:"clean",order:t++}),o.sort((n,a)=>(n.order??0)-(a.order??0)),o}show(){this._component.open||(this._component.show(),this._quill.container.ownerDocument.addEventListener("click",this._docClickHandler))}hide(){this._component.hide(),this._startIndex=-1,this._quill.container.ownerDocument.removeEventListener("click",this._docClickHandler)}isOpen(){return this._component?.open}},$w=Em;var Lw=ar(Am(),1);var $m=class{constructor(o){this._quill=o,this._initPicker()}_initPicker(){this.getToolbarDateContainer().then(o=>{o&&(o.innerHTML="",new Lw.default(o,{inline:!0,locale:{days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],daysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],daysMin:["Su","Mo","Tu","We","Th","Fr","Sa"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],today:"Today",clear:"Clear",dateFormat:"MM/dd/yyyy",timeFormat:"hh:ii aa",firstDay:0},onSelect:({formattedDate:t})=>this._onDateSelect(t)}))})}async getToolbarDateContainer(){try{let o=this._quill.container?.getRootNode?.();if(!o)return null;let t=o.getElementById?.("toolbar");return await t?.updateComplete,t?.shadowRoot?.querySelector?.(".date-picker")??null}catch{return null}}_onDateSelect(o){try{if(!o||!this._quill)return;let t=this._quill.getSelection(!0);if(t){let r=Array.isArray(o)?o.join(", "):o;this._quill.insertText(t.index,r,at.sources.USER),this._quill.setSelection(t.index+r.length,0,at.sources.USER)}else{let r=Math.max(0,this._quill.getLength()-1),n=Array.isArray(o)?o.join(", "):o;this._quill.insertText(r,n,at.sources.USER),this._quill.setSelection(r+n.length,0,at.sources.USER)}}catch{}}},qw=$m;var Lm=class{constructor(o,t){this._quill=o,this._editorId=t.editorId,this._document=this._quill.container.ownerDocument,this._initDialog()}_initDialog(){this._component=this.createComponent(),this._mountPoint().appendChild(this._component),this._component.editorId=this._editorId}get component(){return this._component}_mountPoint(){let o=this._quill.container.getRootNode();return(o instanceof ShadowRoot?o.host:null)?.parentElement??this._document.body}createComponent(){let o=u`
2542
+ <zn-editor-dialog></zn-editor-dialog>`;return le(o)}isOpen(){return this._component.dialogEl.open}close(){this._component.dialogEl.close()}},Mw=Lm;var a6={onDrop:()=>{},draggableContentTypePattern:"^image\\/",draggables:[]},tc=class{constructor(o,t){this._container=null;this._draggables=[];this.nullReturner=()=>null;this.handleDrop=o=>{let t=this._options.onDrop,r=o.target&&o.target["ql-data"]?o.target:this._container,n=o.dataTransfer?.files,a=l6(n,this._draggables);a.length!==0&&(o.stopPropagation(),o.preventDefault(),Promise.all(a.map(s=>Promise.resolve((t||this.nullReturner)(s.file,{tag:s.tag,attr:s.attr})).then(l=>({on_drop_ret_val:l,fileInfo:s})))).then(s=>Promise.all(s.map(({on_drop_ret_val:l,fileInfo:d})=>{if(l===!1)return;let{tag:h,attr:m}=d,f;return l===null||(f=l),Promise.resolve(f).then(b=>({data:b,tag:h,attr:m}))}))).then(s=>s.forEach(l=>{if(l){let{data:d,tag:h,attr:m}=l,f=document.createElement(h);f.setAttribute(m,d),r.appendChild(f)}})))};this._quill=o,this._options=Object.assign({},a6,t),this._container=this._quill.addContainer("ql-editor"),this._draggables=this._options.draggables.map(s6),this._quill.root.addEventListener("drop",this.handleDrop)}},s6=i=>{if(i.content_type_pattern&&i.tag&&i.attr){let o=Object.assign({},i);return o.content_type_regex=new RegExp(i.content_type_pattern),delete o.content_type_pattern,o}e.draggable=i},l6=(i,o)=>{let t=[];if(i)for(let r=0;r<i.length;r++){let n=i.item(r),a=o.find(s=>s.content_type_regex.test(n.type));a&&t.push({file:n,tag:a.tag,attr:a.attr})}return t};var Iw;function gp(){return Iw??(Iw=(async()=>{let[i,o]=await Promise.all([import("./chunks/zn.XO7QERPZ.js"),import("./chunks/zn.GRJSS6IO.js")]),t=o.default;try{i.init({data:t})}catch{}return{Picker:i.Picker,SearchIndex:i.SearchIndex,data:t}})()),Iw}var qm=class{constructor(o){this._mo=null;this._quill=o,this.initPicker();let t=this.getHostEditor();t&&(this._mo=new MutationObserver(()=>this.initPicker()),this._mo.observe(t,{attributes:!0,attributeFilter:["t"]}))}getHostEditor(){let o=this._quill.container?.getRootNode?.();return o&&o.host}async getToolbarEmojiContainer(){try{let o=this._quill.container?.getRootNode?.();if(!o)return null;let t=o.getElementById?.("toolbar");return await t?.updateComplete,t?.shadowRoot?.querySelector?.(".emoji-picker")??null}catch{return null}}getTheme(){let o=this.getHostEditor();return(o?.t??o?.getAttribute?.("t"))==="dark"?"dark":"light"}initPicker(){Promise.all([this.getToolbarEmojiContainer(),gp()]).then(([o,{Picker:t,data:r}])=>{o&&(o.innerHTML="",new t({parent:o,data:r,previewPosition:"none",skinTonePosition:"none",theme:this.getTheme(),set:"native",icons:"solid",onEmojiSelect:n=>this.onEmojiSelect(n)}))})}onEmojiSelect(o){let t=o?.native??o?.skins?.[0]?.native??"";if(!t||!this._quill)return;let r=this._quill.getSelection(!0);if(r)this._quill.insertText(r.index,t,at.sources.USER),this._quill.setSelection(r.index+t.length,0,at.sources.USER);else{let n=Math.max(0,this._quill.getLength()-1);this._quill.insertText(n,t,at.sources.USER),this._quill.setSelection(n+t.length,0,at.sources.USER)}this.getToolbarEmojiContainer().then(n=>{if(!n)return;n.getRootNode().host?.closest?.("zn-dialog")?.hide?.()})}},Nw=qm;var Dw=A`:host{position:absolute;z-index:var(--zn-z-index-editor-action);display:none;background:var(--zn-panel-background-color);border:1px solid var(--zn-border-color);border-radius:8px;box-shadow:var(--zn-shadow-medium);padding:6px;max-height:220px;overflow-y:auto;min-width:180px}:host([open]){display:block}.header{padding:4px 6px;font-size:var(--zn-font-size-x-small);opacity:0.6}.item{display:flex;align-items:center;gap:8px;padding:6px 8px;width:100%;border:none;background:transparent;cursor:pointer;font:inherit}.item[aria-selected=true]{background:var(--zn-input-background-color-hover)}.emoji{font-size:var(--zn-font-size-medium)}.label{opacity:0.7}.empty{padding:8px;opacity:0.7}`;var Xn=class extends C{constructor(){super(...arguments);this.open=!1;this.query="";this.results=[];this._activeIndex=-1;this.onMouseEnterItem=t=>{let r=t.currentTarget;if(!r)return;let n=parseInt(r.dataset.index||"-1",10);Number.isNaN(n)||this.setActiveIndex(n)};this.onClickItem=t=>{let r=t.currentTarget;if(!r)return;let n=parseInt(r.dataset.index||"-1",10);if(Number.isNaN(n))return;let a=this.results?.[n];a&&this.dispatchEvent(new CustomEvent("zn-emoji-select",{bubbles:!0,composed:!0,detail:{emojiChar:a.emojiChar,label:a.label}}))}}show(){this.open=!0}hide(){this.open=!1,this._activeIndex=-1}setPosition(t,r){this.style.left=`${Math.max(0,t)}px`,this.style.top=`${r}px`}setActiveIndex(t){let r=this.results?.length??0;if(!r){this._activeIndex=-1;return}t<0&&(t=r-1),t>=r&&(t=0),this._activeIndex=t,this.requestUpdate(),requestAnimationFrame(()=>{Array.from(this.renderRoot.querySelectorAll("[data-emoji-item]"))[this._activeIndex]?.scrollIntoView?.({block:"nearest"})})}getActiveIndex(){return this._activeIndex}willUpdate(t){t.has("results")&&(this._activeIndex=this.results?.length?0:-1)}render(){return u`
2540
2543
  <div class="header">${this.query?`Emoji: ${this.query}`:"Emoji"}</div>
2541
2544
  ${Array.isArray(this.results)&&this.results.length>0?this.results.slice(0,20).map((t,r)=>u`
2542
2545
  <button
@@ -2555,7 +2558,7 @@ ${ma(this.code(o,t))}
2555
2558
  `):u`
2556
2559
  <div class="empty">${this.query?"No results":"Type something"}</div>`}
2557
2560
  `}};Xn.styles=E(Dw),c([p({type:Boolean,reflect:!0})],Xn.prototype,"open",2),c([p({type:String})],Xn.prototype,"query",2),c([p({type:Array})],Xn.prototype,"results",2),c([H()],Xn.prototype,"_activeIndex",2);Xn.define("zn-headless-emoji");var Mm=class{constructor(o){this._startIndex=-1;this._keydownHandler=o=>this.onKeydown(o);this._docClickHandler=o=>this.onDocumentClick(o);this._quill=o,this.initComponent(),this.attachEvents()}initComponent(){this._component=this.createComponent(),this._quill.container.ownerDocument.body.appendChild(this._component)}attachEvents(){this._quill.on(at.events.TEXT_CHANGE,()=>this.updateFromEditor()),this._quill.on(at.events.EDITOR_CHANGE,()=>this.updateFromEditor()),this._quill.root.addEventListener("keydown",this._keydownHandler),this._component.addEventListener("zn-emoji-select",o=>this.onEmojiSelect(o)),this._quill.on("editor-change",()=>this.positionComponent()),this._quill.focus()}createComponent(){let o=u`
2558
- <zn-headless-emoji></zn-headless-emoji>`;return se(o)}onDocumentClick(o){let t=o.composedPath?o.composedPath()[0]:o.target;t&&!this._component.contains(t)&&!this._quill.root.contains(t)&&this.hide()}async updateFromEditor(){let o=this.getEmojiQuery();if(!o){this.hide();return}let{start:t,emojiQuery:r}=o;this._startIndex=t;try{let{SearchIndex:n}=await gp(),a=await n.search(r),s=(Array.isArray(a)?a:[]).slice(0,20).map(l=>({emojiChar:l?.skins?.[0]?.native||l?.native||"",label:l?.id||l?.shortcodes||""||""})).filter(l=>!!l.emojiChar);this._component.results=s,this._component.query=r,s.length>0?(this.show(),this.positionComponent()):(this.show(),this.positionComponent())}catch{this._component.results=[],this._component.query=r,this.show(),this.positionComponent()}}positionComponent(){if(!this._component||!this._component.open)return;let o=this._quill.getSelection();if(!o)return;let t=this._quill.getBounds(o.index);if(!t)return;let r=this._quill.container.getBoundingClientRect(),n=r.left+Math.max(0,t.left),a=r.top+t.bottom+4;this._component.setPosition(n,a)}getEmojiQuery(){try{let o=this._quill.getSelection();if(!o)return null;let t=o.index,r=50,n=this._quill.getText(Math.max(0,t-r),Math.min(r,t)),a=t-Math.max(0,t-r),s=n.slice(0,a),l=s.lastIndexOf(":");if(l===-1)return null;let d=l>0?s[l-1]:" ";if(d&&/[^\s\n]/.test(d))return null;let h=s.substring(l+1);return/[\s\n]/.test(h)||/^\/\//.test(s.substring(Math.max(0,l-5),l+1))?null:{start:t-h.length-1,emojiQuery:h}}catch{return null}}onKeydown(o){if(this._component?.open){if(o.key==="Escape"){o.preventDefault(),o.stopPropagation(),this.hide();return}if(o.key==="ArrowDown"){o.preventDefault(),o.stopPropagation();let t=(this._component.getActiveIndex?.()??-1)+1;this._component.setActiveIndex?.(t);return}if(o.key==="ArrowUp"){o.preventDefault(),o.stopPropagation();let t=(this._component.getActiveIndex?.()??0)-1;this._component.setActiveIndex?.(t);return}if(o.key==="Enter"){let t=this._component.getActiveIndex?.(),r=this._component.results||[],n=typeof t=="number"&&t>=0&&t<r.length?r[t]:void 0;n&&(o.preventDefault(),o.stopPropagation(),this.replaceAtQuery(n.emojiChar))}}}onEmojiSelect(o){let t=o.detail?.emojiChar||"";t&&this.replaceAtQuery(t)}replaceAtQuery(o){try{let t=this._quill.getSelection();if(!t||this._startIndex<0)return;let r=this._startIndex,n=t.index-r;if(n<0)return;this._quill.deleteText(r,n,at.sources.USER);let a=`${o} `;this._quill.insertText(r,a,at.sources.USER);let s=r+a.length;setTimeout(()=>this._quill.setSelection(s,0,at.sources.SILENT),0),this._quill.focus(),this.hide()}catch{}}show(){this._component.open||(this._component.show(),this._quill.container.ownerDocument.addEventListener("click",this._docClickHandler))}hide(){this._component.hide(),this._startIndex=-1,this._quill.container.ownerDocument.removeEventListener("click",this._docClickHandler)}isOpen(){return this._component?.open}},Rw=Mm;var bp=class extends ee{constructor(t,r){super(t,r);this._focusedImage=null;this._overlay=null;this.handleClick=t=>{if(t.target&&t.target instanceof Element&&t.target.tagName&&t.target.tagName.toUpperCase()==="IMG"){if(this._focusedImage===t.target)return;this._focusedImage&&this.hide(),this.show(t.target),t.preventDefault()}else this._focusedImage&&this.hide()};this.handleScroll=()=>{this._focusedImage&&this.hide()};this.show=t=>{this._focusedImage=t,this.showOverlay()};this.hide=()=>{this.hideOverlay(),this._focusedImage=null};this.showOverlay=()=>{this._overlay&&this.hideOverlay(),this.quill.setSelection(null),this.setUserSelect("none"),document.addEventListener("keyup",this.checkImage,!0),this.quill.root.addEventListener("input",this.checkImage,!0),this._overlay=document.createElement("div"),Object.assign(this._overlay.style,this.options.overlayStyles),this.quill?.root?.parentNode?.appendChild(this._overlay),this.repositionElements()};this.hideOverlay=()=>{this._overlay&&(this._overlay?.parentNode?.removeChild(this._overlay),this._overlay=null,document.removeEventListener("keyup",this.checkImage),this.quill.root.removeEventListener("input",this.checkImage),this.setUserSelect(""))};this.repositionElements=()=>{if(!this._overlay||!this._focusedImage)return;let t=this.quill.root.parentNode,r=this._focusedImage.getBoundingClientRect(),n=t.getBoundingClientRect();Object.assign(this._overlay.style,{left:`${r.left-n.left-1+t.scrollLeft}px`,top:`${r.top-n.top-1+t.scrollTop}px`,width:`${r.width}px`,height:`${r.height}px`})};this.setUserSelect=t=>{["userSelect","mozUserSelect","webkitUserSelect","msUserSelect"].forEach(r=>{this.quill.root.style[r]=t,document.documentElement.style[r]=t})};this.checkImage=t=>{this._focusedImage&&(t.keyCode==46||t.keyCode==8)&&(window.Quill||at).find(this._focusedImage).deleteAt(0)};this.quill.root.addEventListener("click",this.handleClick,!1),this.quill.root.addEventListener("scroll",this.handleScroll,!1),this.quill.root.parentNode.style.position=this.quill.root.parentNode.style.position||"relative"}};bp.DEFAULTS={};var Ow=bp;var Pw=A`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}:host *,:host *::before,:host *::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{position:absolute;z-index:var(--zn-z-index-editor-action);display:none;border-radius:var(--zn-border-radius-circle);font-size:var(--zn-font-size-small);--zn-blur:2px}:host([open]){display:block}.ai-panel{display:flex;flex-grow:1;max-width:100%;position:relative;min-width:240px;width:240px;transition:width 0.8s ease,height 0.8s ease}.ai-panel::part(base){margin-bottom:0}.ai-panel__actions{display:flex;flex-direction:column;justify-content:center}.ai-panel .prompt{padding:8px;--zn-input-border-color:var(--zn-input-border-color);--zn-input-border-color-hover:var(--zn-input-border-color-hover);--zn-input-text-color:var(--zn-input-text-color);--zn-input-placeholder-color:var(--zn-input-placeholder-color);--zn-input-border-radius:var(--zn-border-radius);--zn-input-padding:8px 12px;--zn-input-font-size:14px}.ai-panel .prompt::after{content:"";display:block;width:60%;margin:4px auto;border-bottom:1px solid rgba(var(--zn-border-color),0.4)}.ai-panel .prompt::part(textarea){border-radius:var(--zn-border-radius)}.ai-panel .item{display:flex;align-items:center;gap:4px;padding:8px;width:100%;border:none;background:transparent;cursor:pointer;font:inherit}.ai-panel .item[aria-selected=true],.ai-panel .item:hover{background:var(--zn-input-background-color-hover)}.ai-panel .label{opacity:0.7}.ai-panel .empty{padding:8px;opacity:0.7}`;var Ko=class extends C{constructor(){super(...arguments);this.open=!1}show(){this.open=!0}hide(){this.open=!1}handleTriggerKeyDown(t){if(t.key==="Enter"){t.preventDefault();let r=this.promptInput.value.trim()||"";this.refine&&r&&(this.refine(r),this.promptInput.value="",this.promptInput.blur())}}render(){return u`
2561
+ <zn-headless-emoji></zn-headless-emoji>`;return le(o)}onDocumentClick(o){let t=o.composedPath?o.composedPath()[0]:o.target;t&&!this._component.contains(t)&&!this._quill.root.contains(t)&&this.hide()}async updateFromEditor(){let o=this.getEmojiQuery();if(!o){this.hide();return}let{start:t,emojiQuery:r}=o;this._startIndex=t;try{let{SearchIndex:n}=await gp(),a=await n.search(r),s=(Array.isArray(a)?a:[]).slice(0,20).map(l=>({emojiChar:l?.skins?.[0]?.native||l?.native||"",label:l?.id||l?.shortcodes||""||""})).filter(l=>!!l.emojiChar);this._component.results=s,this._component.query=r,s.length>0?(this.show(),this.positionComponent()):(this.show(),this.positionComponent())}catch{this._component.results=[],this._component.query=r,this.show(),this.positionComponent()}}positionComponent(){if(!this._component||!this._component.open)return;let o=this._quill.getSelection();if(!o)return;let t=this._quill.getBounds(o.index);if(!t)return;let r=this._quill.container.getBoundingClientRect(),n=r.left+Math.max(0,t.left),a=r.top+t.bottom+4;this._component.setPosition(n,a)}getEmojiQuery(){try{let o=this._quill.getSelection();if(!o)return null;let t=o.index,r=50,n=this._quill.getText(Math.max(0,t-r),Math.min(r,t)),a=t-Math.max(0,t-r),s=n.slice(0,a),l=s.lastIndexOf(":");if(l===-1)return null;let d=l>0?s[l-1]:" ";if(d&&/[^\s\n]/.test(d))return null;let h=s.substring(l+1);return/[\s\n]/.test(h)||/^\/\//.test(s.substring(Math.max(0,l-5),l+1))?null:{start:t-h.length-1,emojiQuery:h}}catch{return null}}onKeydown(o){if(this._component?.open){if(o.key==="Escape"){o.preventDefault(),o.stopPropagation(),this.hide();return}if(o.key==="ArrowDown"){o.preventDefault(),o.stopPropagation();let t=(this._component.getActiveIndex?.()??-1)+1;this._component.setActiveIndex?.(t);return}if(o.key==="ArrowUp"){o.preventDefault(),o.stopPropagation();let t=(this._component.getActiveIndex?.()??0)-1;this._component.setActiveIndex?.(t);return}if(o.key==="Enter"){let t=this._component.getActiveIndex?.(),r=this._component.results||[],n=typeof t=="number"&&t>=0&&t<r.length?r[t]:void 0;n&&(o.preventDefault(),o.stopPropagation(),this.replaceAtQuery(n.emojiChar))}}}onEmojiSelect(o){let t=o.detail?.emojiChar||"";t&&this.replaceAtQuery(t)}replaceAtQuery(o){try{let t=this._quill.getSelection();if(!t||this._startIndex<0)return;let r=this._startIndex,n=t.index-r;if(n<0)return;this._quill.deleteText(r,n,at.sources.USER);let a=`${o} `;this._quill.insertText(r,a,at.sources.USER);let s=r+a.length;setTimeout(()=>this._quill.setSelection(s,0,at.sources.SILENT),0),this._quill.focus(),this.hide()}catch{}}show(){this._component.open||(this._component.show(),this._quill.container.ownerDocument.addEventListener("click",this._docClickHandler))}hide(){this._component.hide(),this._startIndex=-1,this._quill.container.ownerDocument.removeEventListener("click",this._docClickHandler)}isOpen(){return this._component?.open}},Rw=Mm;var bp=class extends ee{constructor(t,r){super(t,r);this._focusedImage=null;this._overlay=null;this.handleClick=t=>{if(t.target&&t.target instanceof Element&&t.target.tagName&&t.target.tagName.toUpperCase()==="IMG"){if(this._focusedImage===t.target)return;this._focusedImage&&this.hide(),this.show(t.target),t.preventDefault()}else this._focusedImage&&this.hide()};this.handleScroll=()=>{this._focusedImage&&this.hide()};this.show=t=>{this._focusedImage=t,this.showOverlay()};this.hide=()=>{this.hideOverlay(),this._focusedImage=null};this.showOverlay=()=>{this._overlay&&this.hideOverlay(),this.quill.setSelection(null),this.setUserSelect("none"),document.addEventListener("keyup",this.checkImage,!0),this.quill.root.addEventListener("input",this.checkImage,!0),this._overlay=document.createElement("div"),Object.assign(this._overlay.style,this.options.overlayStyles),this.quill?.root?.parentNode?.appendChild(this._overlay),this.repositionElements()};this.hideOverlay=()=>{this._overlay&&(this._overlay?.parentNode?.removeChild(this._overlay),this._overlay=null,document.removeEventListener("keyup",this.checkImage),this.quill.root.removeEventListener("input",this.checkImage),this.setUserSelect(""))};this.repositionElements=()=>{if(!this._overlay||!this._focusedImage)return;let t=this.quill.root.parentNode,r=this._focusedImage.getBoundingClientRect(),n=t.getBoundingClientRect();Object.assign(this._overlay.style,{left:`${r.left-n.left-1+t.scrollLeft}px`,top:`${r.top-n.top-1+t.scrollTop}px`,width:`${r.width}px`,height:`${r.height}px`})};this.setUserSelect=t=>{["userSelect","mozUserSelect","webkitUserSelect","msUserSelect"].forEach(r=>{this.quill.root.style[r]=t,document.documentElement.style[r]=t})};this.checkImage=t=>{this._focusedImage&&(t.keyCode==46||t.keyCode==8)&&(window.Quill||at).find(this._focusedImage).deleteAt(0)};this.quill.root.addEventListener("click",this.handleClick,!1),this.quill.root.addEventListener("scroll",this.handleScroll,!1),this.quill.root.parentNode.style.position=this.quill.root.parentNode.style.position||"relative"}};bp.DEFAULTS={};var Ow=bp;var Pw=A`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}:host *,:host *::before,:host *::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{position:absolute;z-index:var(--zn-z-index-editor-action);display:none;border-radius:var(--zn-border-radius-circle);font-size:var(--zn-font-size-small);--zn-blur:2px}:host([open]){display:block}.ai-panel{display:flex;flex-grow:1;max-width:100%;position:relative;min-width:240px;width:240px;transition:width 0.8s ease,height 0.8s ease}.ai-panel::part(base){margin-bottom:0}.ai-panel__actions{display:flex;flex-direction:column;justify-content:center}.ai-panel .prompt{padding:8px;--zn-input-border-color:var(--zn-input-border-color);--zn-input-border-color-hover:var(--zn-input-border-color-hover);--zn-input-text-color:var(--zn-input-text-color);--zn-input-placeholder-color:var(--zn-input-placeholder-color);--zn-input-border-radius:var(--zn-border-radius);--zn-input-padding:8px 12px;--zn-input-font-size:14px}.ai-panel .prompt::after{content:"";display:block;width:60%;margin:4px auto;border-bottom:1px solid rgba(var(--zn-border-color),0.4)}.ai-panel .prompt::part(textarea){border-radius:var(--zn-border-radius)}.ai-panel .item{display:flex;align-items:center;gap:4px;padding:8px;width:100%;border:none;background:transparent;cursor:pointer;font:inherit}.ai-panel .item[aria-selected=true],.ai-panel .item:hover{background:var(--zn-input-background-color-hover)}.ai-panel .label{opacity:0.7}.ai-panel .empty{padding:8px;opacity:0.7}`;var Ko=class extends C{constructor(){super(...arguments);this.open=!1}show(){this.open=!0}hide(){this.open=!1}handleTriggerKeyDown(t){if(t.key==="Enter"){t.preventDefault();let r=this.promptInput.value.trim()||"";this.refine&&r&&(this.refine(r),this.promptInput.value="",this.promptInput.blur())}}render(){return u`
2559
2562
  <zn-panel class="ai-panel" flush cosmic>
2560
2563
  <div class="ai-panel__actions">
2561
2564
  <zn-textarea name="prompt"
@@ -2683,8 +2686,8 @@ ${ma(this.code(o,t))}
2683
2686
  <slot name="help-text">${this.helpText}</slot>
2684
2687
  </div>
2685
2688
  </div>`}};ft.styles=E(Fw),c([F(".form-control-input")],ft.prototype,"formControl",2),c([F(".textarea__control")],ft.prototype,"input",2),c([H()],ft.prototype,"hasFocus",2),c([p()],ft.prototype,"title",2),c([p()],ft.prototype,"name",2),c([p()],ft.prototype,"value",2),c([p({reflect:!0})],ft.prototype,"size",2),c([p()],ft.prototype,"label",2),c([p({attribute:"label-tooltip"})],ft.prototype,"labelTooltip",2),c([p({attribute:"context-note"})],ft.prototype,"contextNote",2),c([p({attribute:"help-text"})],ft.prototype,"helpText",2),c([p()],ft.prototype,"placeholder",2),c([p({attribute:"rows",type:Number})],ft.prototype,"rows",2),c([p()],ft.prototype,"resize",2),c([p({type:Boolean,reflect:!0})],ft.prototype,"disabled",2),c([p({type:Boolean,reflect:!0})],ft.prototype,"readonly",2),c([p({reflect:!0})],ft.prototype,"form",2),c([p({type:Boolean,reflect:!0})],ft.prototype,"flush",2),c([p({type:Boolean,reflect:!0})],ft.prototype,"required",2),c([p({type:Number})],ft.prototype,"minlength",2),c([p({type:Number})],ft.prototype,"maxlength",2),c([p()],ft.prototype,"autocapitalize",2),c([p()],ft.prototype,"autocorrect",2),c([p()],ft.prototype,"autocomplete",2),c([p({type:Boolean})],ft.prototype,"autofocus",2),c([p()],ft.prototype,"enterkeyhint",2),c([p({type:Boolean,converter:{fromAttribute:t=>!(!t||t==="false"),toAttribute:t=>t?"true":"false"}})],ft.prototype,"spellcheck",2),c([p()],ft.prototype,"inputmode",2),c([fe()],ft.prototype,"defaultValue",2),c([p({type:Boolean})],ft.prototype,"transparent",2),c([K("disabled",{waitUntilFirstUpdate:!0})],ft.prototype,"handleDisabledChange",1),c([K("rows",{waitUntilFirstUpdate:!0})],ft.prototype,"handleRowsChange",1),c([K("value",{waitUntilFirstUpdate:!0})],ft.prototype,"handleValueChange",1);var ec=ft;ft.define("zn-textarea");var Im=class{constructor(o,t){this._path="";this._selectedText="";this._prompt="";this._aiResponseContent="";this._onEscapeKey=o=>{o.key==="Escape"&&(this._hide(),this._component.remove(),this._initComponent())};this._quill=o,this._path=t.path,this._initComponent(),this._attachEvents()}_initComponent(){this._component=this._createTooltipComponent(),this._component.addEventListener("click",o=>this._replaceTooltip(o)),this._quill.container.ownerDocument.body.appendChild(this._component)}_attachEvents(){this._quill.on(at.events.SELECTION_CHANGE,o=>this._updateFromEditor(o))}_latestContent(o){if(o==null&&(o=this._component.shadowRoot?.querySelector(".ai-panel")),o){let t=o.querySelector('[name="editor-response-text"]');if(t instanceof HTMLInputElement||t instanceof ec)return t.value}return this._aiResponseContent}async processAIRequest(){let o=this._selectedText?this._selectedText:this._quill.getText(),t=this._component.shadowRoot?.querySelector(".ai-panel"),r=await fetch(this._path,{method:"POST",headers:{"Content-Type":"application/json","x-kx-fetch-style":"zn-editor","x-kx-editor-id":this._quill?.container?.getAttribute("x-editor-id")||""},body:JSON.stringify({text:o,prompt:this._prompt})});if(r.ok){let n=await r.text();t&&(t.style.width="500px",t.innerHTML=n,this._aiResponseContent=this._latestContent(t))}else{let n=await r.json();if(typeof n=="string"){let a=this._quill.getSelection();a&&(this._quill.deleteText(a.index,a.length),this._quill.insertText(a.index,n),this._quill.setSelection(a.index+n.length,0))}}}_createTooltipComponent(){let o=u`
2686
- <zn-ai-tooltip></zn-ai-tooltip>`;return se(o)}_createPanelComponent(){let o=u`
2687
- <zn-ai-panel></zn-ai-panel>`;return se(o)}_replaceTooltip(o){o.preventDefault(),o.stopPropagation(),this._component.remove();let t=this._createPanelComponent();t&&(this._component=t,this._component.requestUpdate(),this._attachPanelEvents(t),this._quill.container.ownerDocument.body.appendChild(this._component),this._show(),this._positionComponent())}_onDocumentClick(o){let t=o.composedPath?o.composedPath():[o.target],r=t.includes(this._component)||t.includes(this._component.shadowRoot),n=this._quill.root.contains(t[0]),a=t.some(s=>s instanceof HTMLElement?s.tagName==="ZN-AI-PANEL":!1);if(this._latestContent(null)&&!a){o.preventDefault(),o.stopPropagation();return}!r&&!n&&!a&&this.resetComponent()}_updateFromEditor(o){this._component instanceof Ko||(o?.length>25?(this._selectedText=this._quill.getText(o.index,o.length),this._show(),this._positionComponent()):this.resetComponent())}_positionComponent(){if(!this._component||!this._component.open)return;let o=this._quill.getSelection();if(!o)return;if(this._component instanceof $i){let r=this._quill.container.getBoundingClientRect(),n=o.index+o.length,a=this._quill.getBounds(n);if(!a)return;let s=r.left+a.left-10,l=r.top+a.bottom+4;this._component.style.left=`${Math.max(0,s)}px`,this._component.style.top=`${l}px`;return}requestAnimationFrame(()=>{let r=this._quill.container.getBoundingClientRect(),n;if(o.length===this._quill.getLength()-1)n=this._quill.getBounds(o.index,o.length);else{let l=o.index+o.length;n=this._quill.getBounds(l)}if(!n)return;let a=r.left+n.right,s=r.top+n.top-8;if(a>window.innerWidth){this._setPanelPosition(window.innerWidth-10,s);return}this._setPanelPosition(a,s)})}_setPanelPosition(o,t){this._component.style.right=`${Math.max(0,window.innerWidth-o)}px`,this._component.style.bottom=`${Math.max(0,window.innerHeight-t)}px`}resetComponent(){this._hide(),this._component.remove(),this._initComponent()}_show(){this._component.open||(this._component.show(),this._quill.container.ownerDocument.addEventListener("click",o=>this._onDocumentClick(o)),this._quill.container.ownerDocument.addEventListener("keydown",this._onEscapeKey))}_hide(){this._component.hide(),this._quill.container.ownerDocument.removeEventListener("click",o=>this._onDocumentClick(o)),this._quill.container.ownerDocument.removeEventListener("keydown",this._onEscapeKey)}_attachPanelEvents(o){o.refine=this._enterCustomPrompt.bind(this),o.refineBuiltIn=this._clickPreDefinedEvent.bind(this)}_clickPreDefinedEvent(o){if(o instanceof PointerEvent){let t=o.target;if(this._prompt=t.getAttribute("data-ai-option")||"",this._prompt===""){for(let r of o.composedPath())if(r instanceof HTMLElement&&(this._prompt=r.getAttribute("data-ai-option")||"",this._prompt))break}this.processAIRequest().then(r=>r)}}_enterCustomPrompt(o){this._prompt=o,this.processAIRequest().then(t=>t)}},Bw=Im;var rc=class{constructor(o,t){this._quill=o,this._options=t,this._quill.on("editor-change",this._updateStartTime.bind(this)),this._updateOpenTime()}_updateOpenTime(){this._options.openTimeInput&&!this._openTime&&(this._openTime=Math.floor(new Date().getTime()/1e3),this._options.openTimeInput.value=this._openTime.toString())}_updateStartTime(){this._options.startTimeInput&&!this._startTime&&(this._startTime=Math.floor(new Date().getTime()/1e3),this._options.startTimeInput.value=this._startTime.toString())}};var Nm=["Red","Blue","Orange","Yellow","Indigo","Violet","Green","Pink","Gray"],vp={getName:"color",getData:Object.entries(Nm).map(([,i])=>({key:i.toLowerCase(),value:i,prefix:u`<div class="color-icon color-icon--${i.toLowerCase()}"></div>`}))};var Vw=A`@charset "UTF-8";:root,[t=light],.theme-light{color-scheme:light;--zn-color-gray-100:hsl(240,13%,95%);--zn-color-gray-300:hsl(260,21%,89%);--zn-color-gray-400:hsl(251,17%,76%);--zn-color-gray-500:hsl(254,17%,66%);--zn-color-gray-800:hsl(259,13%,42%);--zn-color-gray-900:hsl(262,12%,35%);--zn-color-red-500:hsl(0 84.2% 60.2%);--zn-color-red-600:hsl(0 72.2% 50.6%);--zn-color-orange-500:hsl(24.6 95% 53.1%);--zn-color-amber-400:hsl(43.3 96.4% 56.3%);--zn-color-yellow-400:hsl(51,100%,53%);--zn-color-green-500:hsl(142.1 70.6% 45.3%);--zn-color-blue-500:hsl(217.2 91.2% 59.8%);--zn-color-indigo-400:hsl(234.5 89.5% 73.9%);--zn-color-indigo-500:hsl(238.7 83.5% 66.7%);--zn-color-violet-500:hsl(258.3 89.5% 66.3%);--zn-color-violet-600:hsl(262.1 83.3% 57.8%);--zn-color-purple-50:hsl(249,100%,97%);--zn-color-purple-100:hsl(245,100%,95%);--zn-color-purple-200:hsl(244,100%,92%);--zn-color-purple-600:hsl(256,91%,59%);--zn-color-pink-400:hsl(328.6 85.5% 70.2%);--zn-color-pink-500:hsl(330.4 81.2% 60.4%);--zn-color-primary-50:var(--zn-color-purple-50);--zn-color-primary-100:var(--zn-color-purple-100);--zn-color-primary-200:var(--zn-color-purple-200);--zn-color-primary-300:hsl(246,100%,85%);--zn-color-primary-400:hsl(249,100%,76%);--zn-color-primary-500:hsl(252,98%,66%);--zn-color-primary-600:var(--zn-color-purple-600);--zn-color-primary-700:hsl(257,76%,50%);--zn-color-primary-800:hsl(257,76%,42%);--zn-color-primary-900:hsl(257,73%,35%);--zn-color-success-50:hsl(138.5 76.5% 96.7%);--zn-color-success-200:rgb(var(--zn-green));--zn-color-success-300:hsl(141.7 76.6% 73.1%);--zn-color-success-400:hsl(141.9 69.2% 58%);--zn-color-success-500:var(--zn-color-green-500);--zn-color-success-600:hsl(142.1 76.2% 36.3%);--zn-color-success-700:hsl(142.4 71.8% 29.2%);--zn-color-warning-50:hsl(48 100% 96.1%);--zn-color-warning-400:var(--zn-color-amber-400);--zn-color-warning-500:hsl(37.7 92.1% 50.2%);--zn-color-warning-600:hsl(32.1 94.6% 43.7%);--zn-color-danger-50:hsl(0 85.7% 97.3%);--zn-color-danger-100:rgb(var(--zn-red));--zn-color-danger-200:rgb(var(--zn-red));--zn-color-danger-300:hsl(0 93.5% 81.8%);--zn-color-danger-500:var(--zn-color-red-500);--zn-color-danger-600:var(--zn-color-red-600);--zn-color-danger-700:rgb(var(--zn-red));--zn-color-danger-800:hsl(0 70% 35.3%);--zn-color-neutral-50:hsl(255,33%,98%);--zn-color-neutral-100:var(--zn-color-gray-100);--zn-color-neutral-200:hsl(255,12%,94%);--zn-color-neutral-300:var(--zn-color-gray-300);--zn-color-neutral-400:var(--zn-color-gray-400);--zn-color-neutral-500:var(--zn-color-gray-500);--zn-color-neutral-600:hsl(258,15%,58%);--zn-color-neutral-700:hsl(259,13%,54%);--zn-color-neutral-800:var(--zn-color-gray-800);--zn-color-neutral-900:var(--zn-color-gray-900);--zn-color-neutral-0:hsl(0,0%,100%);--zn-color-neutral-1000:hsl(0,0%,0%);--zn-border-radius:6px;--zn-border-radius-small:2px;--zn-border-radius-circle:50%;--zn-border-radius-pill:9999px;--zn-shadow-x-small:0 1px 4px rgba(0,0,0,0.10);--zn-shadow-small:0 3px 9px rgba(0,0,0,0.15);--zn-shadow-medium:0 6px 18px rgba(0,0,0,0.15);--zn-shadow-large:0 6px 20px rgba(0,0,0,0.15);--zn-shadow-x-large:0 6px 20px rgba(0,0,0,0.25);--zn-container:var(--zn-container-hd);--zn-container-default:100%;--zn-container-sm:360px;--zn-container-smp:480px;--zn-container-ph:600px;--zn-container-md:768px;--zn-container-lg:1100px;--zn-container-hd:1400px;--zn-container-3k:1960px;--zn-container-4k:2560px;--zn-transition-x-slow:1000ms;--zn-transition-slow:500ms;--zn-transition-medium:250ms;--zn-transition-fast:150ms;--zn-transition-x-fast:50ms;--zn-gap:var(--zn-base-gap,var(--zn-spacing-medium,4px));--zn-font-mono:'Roboto Mono',SFMono-Regular,Consolas,'Liberation Mono',Menlo,monospace;--zn-font-sans:'Inter',-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif,'Apple Color Emoji','Segoe UI Emoji','Segoe UI Symbol';--zn-font-serif:'Roboto Slab',Georgia,'Times New Roman',serif;--zn-font-size-2x-small:0.625rem;--zn-font-size-x-small:0.75rem;--zn-font-size-small:0.929rem;--zn-font-size-medium:1rem;--zn-font-size-large:1.15rem;--zn-font-size-x-large:1.25rem;--zn-font-size-2x-large:2.25rem;--zn-font-size-3x-large:3rem;--zn-font-size-4x-large:4.5rem;--zn-font-weight-light:300;--zn-font-weight-normal:400;--zn-font-weight-medium:500;--zn-font-weight-semibold:600;--zn-font-weight-bold:700;--zn-letter-spacing-normal:normal;--zn-letter-spacing-loose:0.5px;--zn-line-height-denser:1;--zn-line-height-dense:1.5;--zn-line-height-normal:2;--zn-line-height-loose:2.5;--zn-line-height-looser:3;--zn-focus-ring-color:var(--zn-color-primary-600);--zn-focus-ring-style:solid;--zn-focus-ring-width-x-small:1px;--zn-focus-ring-width:3px;--zn-focus-ring:var(--zn-focus-ring-style) var(--zn-focus-ring-width) var(--zn-focus-ring-color);--zn-focus-ring-offset:1px;--zn-input-height-x-small:24px;--zn-input-height-small:30px;--zn-input-height-medium:36px;--zn-input-height-large:40px;--zn-input-background-color:var(--zn-color-neutral-50);--zn-input-background-color-hover:var(--zn-color-neutral-100);--zn-input-background-color-focus:var(--zn-color-neutral-100);--zn-input-background-color-disabled:var(--zn-color-neutral-400);--zn-input-border-color:var(--zn-color-neutral-300);--zn-input-border-color-hover:var(--zn-color-neutral-400);--zn-input-border-color-focus:var(--zn-color-primary-500);--zn-input-border-color-disabled:var(--zn-color-neutral-300);--zn-input-border-width:1px;--zn-input-required-content:'*';--zn-input-required-content-offset:-2px;--zn-input-required-content-color:var(--zn-input-label-color);--zn-input-border-radius-x-small:var(--zn-border-radius);--zn-input-border-radius-small:var(--zn-border-radius);--zn-input-border-radius-medium:var(--zn-border-radius);--zn-input-border-radius-large:var(--zn-border-radius);--zn-input-font-family:var(--zn-font-sans);--zn-input-font-weight:var(--zn-text-input-content-font-weight);--zn-input-font-size-x-small:var(--zn-font-size-x-small);--zn-input-font-size-small:var(--zn-font-size-small);--zn-input-font-size-medium:var(--zn-text-input-content-font-size);--zn-input-font-size-large:var(--zn-font-size-large);--zn-input-line-height:var(--zn-text-input-content-line-height);--zn-input-letter-spacing:var(--zn-letter-spacing-normal);--zn-input-color:var(--zn-text-input-content-color);--zn-input-color-hover:var(--zn-color-neutral-800);--zn-input-color-focus:var(--zn-color-neutral-700);--zn-input-color-disabled:var(--zn-color-neutral-800);--zn-input-icon-color:var(--zn-color-neutral-500);--zn-input-icon-color-hover:var(--zn-color-neutral-600);--zn-input-icon-color-focus:var(--zn-color-neutral-600);--zn-input-placeholder-color:var(--zn-text-input-placeholder-color);--zn-input-placeholder-color-disabled:var(--zn-color-neutral-600);--zn-input-spacing-small:var(--zn-spacing-small);--zn-input-spacing-medium:var(--zn-spacing-medium);--zn-input-spacing-large:var(--zn-spacing-large);--zn-input-focus-ring-color:hsl(256 91% 59%/40%);--zn-input-focus-ring-offset:0;--zn-input-label-font-size-small:var(--zn-font-size-small);--zn-input-label-font-size-medium:var(--zn-text-input-label-font-size);--zn-input-label-font-size-large:var(--zn-font-size-large);--zn-input-label-font-weight:var(--zn-text-input-label-font-weight);--zn-input-label-line-height:var(--zn-text-input-label-line-height);--zn-input-label-color:var(--zn-text-input-label-color);--zn-input-help-text-font-size-small:var(--zn-font-size-x-small);--zn-input-help-text-font-size-medium:var(--zn-font-size-small);--zn-input-help-text-font-size-large:var(--zn-font-size-medium);--zn-input-help-text-color:var(--zn-color-neutral-500);--zn-toggle-size-small:0.875rem;--zn-toggle-size-medium:1.125rem;--zn-toggle-size-large:1.375rem;--zn-overlay-background-color:hsl(none 0% 0%/0.7);--zn-panel-background-color:var(--zn-color-neutral-0);--zn-panel-border-color:var(--zn-color-neutral-200);--zn-panel-border-width:1px;--zn-tooltip-border-radius:var(--zn-border-radius);--zn-tooltip-background-color:var(--zn-color-neutral-900);--zn-tooltip-color:var(--zn-color-neutral-0);--zn-tooltip-font-family:var(--zn-font-sans);--zn-tooltip-font-weight:var(--zn-font-weight-normal);--zn-tooltip-font-size:var(--zn-font-size-small);--zn-tooltip-line-height:var(--zn-line-height-dense);--zn-tooltip-padding:var(--zn-spacing-x-small) var(--zn-spacing-small);--zn-tooltip-arrow-size:6px;--zn-z-index-page-nav:500;--zn-z-index-drawer:700;--zn-z-index-dialog:800;--zn-z-index-dropdown:900;--zn-z-index-toast:950;--zn-z-index-tooltip:1000;--zn-z-index-editor-action:1000000;--zn-table-header-background-color:252,251,254}[t=dark],.theme-dark{color-scheme:dark;--zn-color-gray-50:hsl(258,15%,23%);--zn-color-gray-100:hsl(262,12%,35%);--zn-color-gray-200:hsl(259,13%,42%);--zn-color-gray-300:hsl(259,13%,54%);--zn-color-gray-400:hsl(258,15%,58%);--zn-color-gray-500:hsl(254,17%,66%);--zn-color-gray-600:hsl(251,17%,76%);--zn-color-gray-700:hsl(260,21%,89%);--zn-color-gray-800:hsl(255,12%,94%);--zn-color-gray-900:hsl(240,13%,95%);--zn-color-gray-950:hsl(255,33%,98%);--zn-color-red-50:hsl(0 56% 23.9%);--zn-color-red-100:hsl(0.6 60% 33.9%);--zn-color-red-200:hsl(0.9 67.2% 37.1%);--zn-color-red-300:hsl(1.1 71.3% 43.7%);--zn-color-red-400:hsl(1 76% 52.5%);--zn-color-red-500:hsl(0.7 89.6% 57.2%);--zn-color-red-600:hsl(0 98.6% 67.9%);--zn-color-red-700:hsl(0 100% 72.3%);--zn-color-red-800:hsl(0 100% 85.6%);--zn-color-red-900:hsl(0 100% 90.3%);--zn-color-red-950:hsl(0 100% 95.9%);--zn-color-orange-50:hsl(15 64.2% 23.3%);--zn-color-orange-100:hsl(15.1 70.9% 31.1%);--zn-color-orange-200:hsl(15.3 75.7% 35.5%);--zn-color-orange-300:hsl(17.1 83.5% 42.7%);--zn-color-orange-400:hsl(20.1 88% 50.8%);--zn-color-orange-500:hsl(24.3 100% 50.5%);--zn-color-orange-600:hsl(27.2 100% 57.7%);--zn-color-orange-700:hsl(31.3 100% 68.7%);--zn-color-orange-800:hsl(33.8 100% 79.3%);--zn-color-orange-900:hsl(38.9 100% 87.7%);--zn-color-orange-950:hsl(46.2 100% 95%);--zn-color-amber-50:hsl(21.9 66.3% 21.1%);--zn-color-amber-100:hsl(21.5 73.6% 29.7%);--zn-color-amber-200:hsl(22.3 77.6% 33.3%);--zn-color-amber-300:hsl(25.4 84.2% 39.6%);--zn-color-amber-400:hsl(31.4 87.4% 46.7%);--zn-color-amber-500:hsl(37 96.6% 48.3%);--zn-color-amber-600:hsl(43.3 100% 53.4%);--zn-color-amber-700:hsl(46.5 100% 61.1%);--zn-color-amber-800:hsl(49.3 100% 73%);--zn-color-amber-900:hsl(51.8 100% 85%);--zn-color-amber-950:hsl(60 100% 94.6%);--zn-color-yellow-50:hsl(34,86%,14%);--zn-color-yellow-100:hsl(36,74%,26%);--zn-color-yellow-200:hsl(40,82%,29%);--zn-color-yellow-300:hsl(43,94%,33%);--zn-color-yellow-400:hsl(48,98%,40%);--zn-color-yellow-500:hsl(53,95%,47%);--zn-color-yellow-600:hsl(51,100%,53%);--zn-color-yellow-700:hsl(54,100%,63%);--zn-color-yellow-800:hsl(61,100%,77%);--zn-color-yellow-900:hsl(63,100%,88%);--zn-color-yellow-950:hsl(63,92%,95%);--zn-color-lime-50:hsl(86.5 54.4% 18%);--zn-color-lime-100:hsl(87.6 56.8% 23.3%);--zn-color-lime-200:hsl(85.8 63.2% 24.5%);--zn-color-lime-300:hsl(86.1 72% 29.4%);--zn-color-lime-400:hsl(85.5 76.8% 37.3%);--zn-color-lime-500:hsl(84.3 74.2% 42.1%);--zn-color-lime-600:hsl(82.8 81.5% 52.6%);--zn-color-lime-700:hsl(82 89.9% 64%);--zn-color-lime-800:hsl(80.9 97.9% 76.6%);--zn-color-lime-900:hsl(77.9 100% 85.8%);--zn-color-lime-950:hsl(69.5 100% 93.8%);--zn-color-green-50:hsl(144.3 53.6% 16%);--zn-color-green-100:hsl(143.2 55.4% 23.5%);--zn-color-green-200:hsl(141.5 58.2% 26.3%);--zn-color-green-300:hsl(140.8 64.2% 31.8%);--zn-color-green-400:hsl(140.3 68% 39.2%);--zn-color-green-500:hsl(141.1 64.9% 43%);--zn-color-green-600:hsl(141.6 72.4% 55.2%);--zn-color-green-700:hsl(141.7 82.7% 70.1%);--zn-color-green-800:hsl(141 90.9% 82.1%);--zn-color-green-900:hsl(142 100% 89.1%);--zn-color-green-950:hsl(144 100% 95.5%);--zn-color-emerald-50:hsl(164.3 75% 13.5%);--zn-color-emerald-100:hsl(163.5 72.6% 20.1%);--zn-color-emerald-200:hsl(162.1 73.7% 22.4%);--zn-color-emerald-300:hsl(161.3 77.3% 27.6%);--zn-color-emerald-400:hsl(159.6 77.1% 34.3%);--zn-color-emerald-500:hsl(159.1 73.5% 37.9%);--zn-color-emerald-600:hsl(157.8 66.8% 48.9%);--zn-color-emerald-700:hsl(156.2 76.1% 63.8%);--zn-color-emerald-800:hsl(152.4 84.4% 77.4%);--zn-color-emerald-900:hsl(149.3 100% 87%);--zn-color-emerald-950:hsl(158.6 100% 94.8%);--zn-color-teal-50:hsl(176.5 51.5% 15.4%);--zn-color-teal-100:hsl(175.9 54.7% 22.3%);--zn-color-teal-200:hsl(175.9 60.7% 23.9%);--zn-color-teal-300:hsl(174.5 67.3% 28.8%);--zn-color-teal-400:hsl(174.4 71.9% 34.9%);--zn-color-teal-500:hsl(173.1 71% 38.3%);--zn-color-teal-600:hsl(172.3 68.2% 48.1%);--zn-color-teal-700:hsl(170.5 81.3% 61.5%);--zn-color-teal-800:hsl(168.4 92.1% 75.2%);--zn-color-teal-900:hsl(168.3 100% 86%);--zn-color-teal-950:hsl(180 100% 95.5%);--zn-color-cyan-50:hsl(197.1 53.8% 20.3%);--zn-color-cyan-100:hsl(196.8 57.3% 27.2%);--zn-color-cyan-200:hsl(195.3 62.7% 29.4%);--zn-color-cyan-300:hsl(193.5 71.3% 34.1%);--zn-color-cyan-400:hsl(192.5 76.8% 40.6%);--zn-color-cyan-500:hsl(189.4 78.6% 42.6%);--zn-color-cyan-600:hsl(188.2 89.1% 51.7%);--zn-color-cyan-700:hsl(187 98.6% 66.2%);--zn-color-cyan-800:hsl(184.9 100% 78.3%);--zn-color-cyan-900:hsl(180 100% 86.6%);--zn-color-cyan-950:hsl(180 100% 94.8%);--zn-color-sky-50:hsl(203 63.8% 20.9%);--zn-color-sky-100:hsl(203.4 70.4% 28%);--zn-color-sky-200:hsl(202.7 75.8% 30.8%);--zn-color-sky-300:hsl(203.1 80.4% 36.1%);--zn-color-sky-400:hsl(202.1 80.5% 44.3%);--zn-color-sky-500:hsl(199.7 85.9% 47.7%);--zn-color-sky-600:hsl(198.7 97.9% 57.2%);--zn-color-sky-700:hsl(198.7 100% 70.5%);--zn-color-sky-800:hsl(198.8 100% 82.5%);--zn-color-sky-900:hsl(198.5 100% 89.9%);--zn-color-sky-950:hsl(186 100% 95.5%);--zn-color-blue-50:hsl(227.1 49.5% 22.7%);--zn-color-blue-100:hsl(225.8 58.9% 36.8%);--zn-color-blue-200:hsl(227.7 64.4% 42.9%);--zn-color-blue-300:hsl(226.1 72.7% 51.2%);--zn-color-blue-400:hsl(222.6 86.5% 56.3%);--zn-color-blue-500:hsl(217.8 95.8% 57.4%);--zn-color-blue-600:hsl(213.3 100% 65%);--zn-color-blue-700:hsl(210.9 100% 74.8%);--zn-color-blue-800:hsl(211.5 100% 83.4%);--zn-color-blue-900:hsl(211 100% 88.9%);--zn-color-blue-950:hsl(201.8 100% 95.3%);--zn-color-indigo-50:hsl(243.5 40.8% 27%);--zn-color-indigo-100:hsl(242.9 45.7% 37.6%);--zn-color-indigo-200:hsl(244.7 52.7% 43.1%);--zn-color-indigo-300:hsl(245.3 60.5% 52.4%);--zn-color-indigo-400:hsl(244.1 79.2% 60.4%);--zn-color-indigo-500:hsl(239.6 88.7% 63.8%);--zn-color-indigo-600:hsl(234.5 96.7% 70.9%);--zn-color-indigo-700:hsl(229.4 100% 78.3%);--zn-color-indigo-800:hsl(227.1 100% 85%);--zn-color-indigo-900:hsl(223.8 100% 89.9%);--zn-color-indigo-950:hsl(220 100% 95.1%);--zn-color-violet-50:hsl(265.1 57.3% 25.4%);--zn-color-violet-100:hsl(263.5 63.8% 39.4%);--zn-color-violet-200:hsl(263.4 66.2% 44.1%);--zn-color-violet-300:hsl(263.7 72.8% 52.4%);--zn-color-violet-400:hsl(262.5 87.3% 59.8%);--zn-color-violet-500:hsl(258.3 95.1% 63.2%);--zn-color-violet-600:hsl(255.1 100% 67.2%);--zn-color-violet-700:hsl(253 100% 81.5%);--zn-color-violet-800:hsl(251.7 100% 87.9%);--zn-color-violet-900:hsl(254.1 100% 91.7%);--zn-color-violet-950:hsl(257.1 100% 96.1%);--zn-color-purple-50:hsl(255,79%,23%);--zn-color-purple-100:hsl(257,73%,35%);--zn-color-purple-200:hsl(257,76%,42%);--zn-color-purple-300:hsl(257,76%,50%);--zn-color-purple-400:hsl(256,91%,59%);--zn-color-purple-500:hsl(252,98%,66%);--zn-color-purple-600:hsl(249,100%,76%);--zn-color-purple-700:hsl(246,100%,85%);--zn-color-purple-800:hsl(244,100%,92%);--zn-color-purple-900:hsl(245,100%,95%);--zn-color-purple-950:hsl(249,100%,97%);--zn-color-fuchsia-50:hsl(297.1 51.2% 18.6%);--zn-color-fuchsia-100:hsl(296.7 59.5% 31.5%);--zn-color-fuchsia-200:hsl(295.4 65.4% 35.1%);--zn-color-fuchsia-300:hsl(294.6 67.4% 42.2%);--zn-color-fuchsia-400:hsl(293.3 68.7% 51.2%);--zn-color-fuchsia-500:hsl(292.1 88.4% 57.7%);--zn-color-fuchsia-600:hsl(292 98.5% 59.5%);--zn-color-fuchsia-700:hsl(292.4 100% 79.5%);--zn-color-fuchsia-800:hsl(292.9 100% 86.8%);--zn-color-fuchsia-900:hsl(300 100% 91.5%);--zn-color-fuchsia-950:hsl(300 100% 96.3%);--zn-color-pink-50:hsl(336.2 59.6% 20%);--zn-color-pink-100:hsl(336.8 63.9% 34%);--zn-color-pink-200:hsl(336.8 68.7% 37.6%);--zn-color-pink-300:hsl(336.1 71.8% 44.5%);--zn-color-pink-400:hsl(333.9 74.9% 53.1%);--zn-color-pink-500:hsl(330.7 86.3% 57.7%);--zn-color-pink-600:hsl(328.6 91.5% 67.2%);--zn-color-pink-700:hsl(327.4 97.6% 78.7%);--zn-color-pink-800:hsl(325.1 100% 86.6%);--zn-color-pink-900:hsl(322.1 100% 91.3%);--zn-color-pink-950:hsl(315 100% 95.9%);--zn-color-rose-50:hsl(342.3 62.9% 21.5%);--zn-color-rose-100:hsl(342.8 68.9% 34.2%);--zn-color-rose-200:hsl(344.8 72.6% 37.3%);--zn-color-rose-300:hsl(346.9 75.8% 43.7%);--zn-color-rose-400:hsl(348.2 80.1% 52.7%);--zn-color-rose-500:hsl(350.4 94.8% 57.5%);--zn-color-rose-600:hsl(351.2 100% 58.1%);--zn-color-rose-700:hsl(352.3 100% 78.1%);--zn-color-rose-800:hsl(352 100% 86.2%);--zn-color-rose-900:hsl(354.5 100% 90.7%);--zn-color-rose-950:hsl(353.3 100% 95.7%);--zn-color-neutral-0:hsl(0,0%,0%);--zn-color-neutral-1000:hsl(0,0%,100%);--zn-shadow-x-small:0 1px 4px rgba(0,0,0,0.18);--zn-shadow-small:0 3px 9px rgba(0,0,0,0.24);--zn-shadow-medium:0 6px 18px rgba(0,0,0,0.24);--zn-shadow-large:0 6px 20px rgba(0,0,0,0.24);--zn-shadow-x-large:0 6px 20px rgba(0,0,0,0.34);--zn-input-background-color:rgb(var(--zn-color-body));--zn-input-background-color-hover:rgb(var(--zn-color-body));--zn-input-background-color-focus:hsl(252,15%,13%);--zn-input-background-color-disabled:hsl(280,6%,9%);--zn-input-border-color:rgb(var(--zn-color-border));--zn-input-border-color-hover:rgb(var(--zn-color-border-active));--zn-input-border-color-focus:var(--zn-color-primary-500);--zn-input-border-color-disabled:hsl(280,6%,9%);--zn-focus-ring-color:var(--zn-color-primary-700);--zn-overlay-background-color:hsl(0 0% 0%/43%);--zn-panel-background-color:rgb(var(--zn-panel));--zn-tooltip-background-color:var(--zn-color-neutral-800);--zn-table-header-background-color:27,27,30}:root{--zn-spacing-unit:8px;--zn-spacing-3x-small:2px;--zn-spacing-2x-small:4px;--zn-spacing-x-small:8px;--zn-spacing-small:16px;--zn-spacing-medium:24px;--zn-spacing-large:32px;--zn-spacing-x-large:40px;--zn-spacing-2x-large:48px;--zn-spacing-3x-large:56px;--zn-spacing-4x-large:72px;--zn-spacing-narrow-bar:45px;--zn-spacing-bar:60px;--zn-spacing-tile:80px;--zn-spacing-sidenav:320px;--zn-spacing-small-panel:200px;--zn-spacing-medium-panel:320px;--zn-spacing-panel:360px;--zn-spacing-lside:460px}:root{--zn-text-color:rgb(var(--zn-color-text));--zn-text-color-muted:rgb(var(--zn-color-muted-text));--zn-text-paragraph-font-size:14px;--zn-text-paragraph-line-height:21px;--zn-text-paragraph-spacing:21px;--zn-text-paragraph-font-weight:var(--zn-font-weight-normal);--zn-text-paragraph-color:var(--zn-text-color);--zn-text-paragraph-transform:none;--zn-text-table-content-font-size:14px;--zn-text-table-content-line-height:16px;--zn-text-table-content-spacing:15px;--zn-text-table-content-font-weight:var(--zn-font-weight-normal);--zn-text-table-content-color:var(--zn-text-color);--zn-text-table-content-transform:none;--zn-text-chat-font-size:16px;--zn-text-chat-line-height:24px;--zn-text-chat-spacing:15px;--zn-text-chat-font-weight:var(--zn-font-weight-normal);--zn-text-chat-color:var(--zn-text-color);--zn-text-chat-transform:none;--zn-text-h1-font-size:16px;--zn-text-h1-line-height:16px;--zn-text-h1-spacing:18px;--zn-text-h1-font-weight:var(--zn-font-weight-semibold);--zn-text-h1-color:var(--zn-text-color);--zn-text-h1-transform:none;--zn-text-h2-font-size:14px;--zn-text-h2-line-height:16px;--zn-text-h2-spacing:15px;--zn-text-h2-font-weight:var(--zn-font-weight-semibold);--zn-text-h2-color:var(--zn-text-color);--zn-text-h2-transform:none;--zn-text-h3-font-size:11px;--zn-text-h3-line-height:16px;--zn-text-h3-spacing:15px;--zn-text-h3-font-weight:var(--zn-font-weight-semibold);--zn-text-h3-color:var(--zn-text-color);--zn-text-h3-transform:none;--zn-text-heading-section-font-size:14px;--zn-text-heading-section-line-height:16px;--zn-text-heading-section-spacing:15px;--zn-text-heading-section-font-weight:var(--zn-font-weight-semibold);--zn-text-heading-section-color:var(--zn-text-color);--zn-text-heading-section-transform:none;--zn-text-subheading-font-size:14px;--zn-text-subheading-line-height:16px;--zn-text-subheading-spacing:15px;--zn-text-subheading-font-weight:var(--zn-font-weight-normal);--zn-text-subheading-color:var(--zn-text-color-muted);--zn-text-subheading-transform:none;--zn-text-subheading-small-font-size:13px;--zn-text-subheading-small-line-height:16px;--zn-text-subheading-small-spacing:15px;--zn-text-subheading-small-font-weight:var(--zn-font-weight-normal);--zn-text-subheading-small-color:var(--zn-text-color-muted);--zn-text-subheading-small-transform:none;--zn-text-input-placeholder-font-size:14px;--zn-text-input-placeholder-line-height:24px;--zn-text-input-placeholder-spacing:18px;--zn-text-input-placeholder-font-weight:var(--zn-font-weight-normal);--zn-text-input-placeholder-color:var(--zn-text-color-muted);--zn-text-input-placeholder-transform:none;--zn-text-input-content-font-size:14px;--zn-text-input-content-line-height:24px;--zn-text-input-content-spacing:18px;--zn-text-input-content-font-weight:var(--zn-font-weight-normal);--zn-text-input-content-color:var(--zn-text-color);--zn-text-input-content-transform:none;--zn-text-input-label-font-size:14px;--zn-text-input-label-line-height:16px;--zn-text-input-label-spacing:15px;--zn-text-input-label-font-weight:var(--zn-font-weight-semibold);--zn-text-input-label-color:var(--zn-text-color);--zn-text-input-label-transform:none;--zn-text-chart-minor-font-size:14px;--zn-text-chart-minor-line-height:16px;--zn-text-chart-minor-spacing:15px;--zn-text-chart-minor-font-weight:var(--zn-font-weight-semibold);--zn-text-chart-minor-color:var(--zn-text-color-muted);--zn-text-chart-minor-transform:none;--zn-text-chart-major-font-size:21px;--zn-text-chart-major-line-height:24px;--zn-text-chart-major-spacing:18px;--zn-text-chart-major-font-weight:var(--zn-font-weight-normal);--zn-text-chart-major-color:var(--zn-text-color);--zn-text-chart-major-transform:none;--zn-text-button-label-font-size:13px;--zn-text-button-label-line-height:16px;--zn-text-button-label-spacing:18px;--zn-text-button-label-font-weight:var(--zn-font-weight-semibold);--zn-text-button-label-color:var(--zn-text-color);--zn-text-button-label-transform:uppercase;--zn-text-chip-font-size:10px;--zn-text-chip-line-height:16px;--zn-text-chip-spacing:15px;--zn-text-chip-font-weight:var(--zn-font-weight-semibold);--zn-text-chip-color:var(--zn-text-color);--zn-text-chip-transform:uppercase;--zn-text-navbar-link-font-size:16px;--zn-text-navbar-link-line-height:16px;--zn-text-navbar-link-spacing:18px;--zn-text-navbar-link-font-weight:var(--zn-font-weight-semibold);--zn-text-navbar-link-color:var(--zn-text-color-muted);--zn-text-navbar-link-transform:none;--zn-text-tab-link-font-size:14px;--zn-text-tab-link-line-height:16px;--zn-text-tab-link-spacing:15px;--zn-text-tab-link-font-weight:var(--zn-font-weight-semibold);--zn-text-tab-link-color:var(--zn-text-color-muted);--zn-text-tab-link-transform:none;--zn-text-tab-link-active-font-size:14px;--zn-text-tab-link-active-line-height:16px;--zn-text-tab-link-active-spacing:15px;--zn-text-tab-link-active-font-weight:var(--zn-font-weight-semibold);--zn-text-tab-link-active-color:var(--zn-text-color);--zn-text-tab-link-active-transform:none;--zn-text-menu-link-font-size:14px;--zn-text-menu-link-line-height:16px;--zn-text-menu-link-spacing:15px;--zn-text-menu-link-font-weight:var(--zn-font-weight-normal);--zn-text-menu-link-color:var(--zn-text-color-muted);--zn-text-menu-link-transform:none;--zn-text-notification-font-size:9px;--zn-text-notification-line-height:11px;--zn-text-notification-spacing:0;--zn-text-notification-font-weight:var(--zn-font-weight-semibold);--zn-text-notification-color:#fff;--zn-text-notification-transform:none}@supports (scrollbar-gutter:stable){.zn-scroll-lock{scrollbar-gutter:stable !important;overflow:hidden !important}}@supports not (scrollbar-gutter:stable){.zn-scroll-lock{padding-right:var(--zn-scroll-lock-size) !important;overflow:hidden !important}}.zn-toast-stack{position:fixed;bottom:0;inset-inline-end:0;z-index:var(--zn-z-index-toast);width:28rem;max-width:100%;max-height:100%;overflow:auto}.zn-toast-stack zn-alert{margin:var(--zn-spacing-medium)}.zn-toast-stack zn-alert::part(base){box-shadow:var(--zn-shadow-large)}@media screen and (min-width:768px){.zn-toast-stack zn-alert{margin:var(--zn-spacing-large)}}.zn-gutter{margin:0 var(--zn-gutter)}.zn-gap{gap:var(--zn-gap,0);padding:var(--zn-base-gap,0);display:flex;flex-wrap:wrap}.zn-gap-in{gap:var(--zn-gap,0);display:flex;flex-wrap:wrap}.zn-gap-in-sm{--zn-gap:var(--zn-spacing-small,0);gap:var(--zn-gap,0)}.zn-gap-md{gap:24px}.zn-gap-inner{gap:var(--zn-gap,0)}.zn-gap-ism{gap:var(--zn-gap,0);--zn-gap:16px}.zn-gap-ixs{gap:var(--zn-gap,0);--zn-gap:8px}.zn-max-hide{max-height:100%;overflow:hidden}.zn-hide-empty:empty{display:none}.zn-nopoint{pointer-events:none}.form-spacing{display:grid;grid-template-columns:1fr;gap:var(--zn-spacing-medium) var(--zn-spacing-small)}@media (min-width:768px){.form-spacing{grid-template-columns:repeat(6,1fr)}}.form-spacing~.form-spacing{margin-top:var(--zn-base-gap)}zn-form-group~zn-form-group{margin-top:var(--zn-base-gap);padding-top:var(--zn-base-gap);border-top:1px solid rgb(var(--zn-border-color))}.form-spacing>*{grid-column:span 6/span 6}@media (min-width:768px){.form-spacing>*[span="1"]{grid-column:span 1/span 1}}@media (min-width:768px){.form-spacing>*[span="2"]{grid-column:span 2/span 2}}@media (min-width:768px){.form-spacing>*[span="3"]{grid-column:span 3/span 3}}@media (min-width:768px){.form-spacing>*[span="4"]{grid-column:span 4/span 4}}@media (min-width:768px){.form-spacing>*[span="5"]{grid-column:span 5/span 5}}@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:root{--zn-base-px:8px;--zn-base-gap:calc(var(--zn-base-px) * 2);--zn-gutter:2px;--zn-default-margin:0 auto 0 0;--zn-icon-size:20px;--zn-button-gutter:2px;--zn-font-family-sans:'Inter',sans-serif;--zn-font-family-serif:'Roboto Slab',serif;--zn-font-family-mono:'Roboto Mono',monospace}:root,[t=light],.theme-light{--zn-backdrop-color:rgba(0,0,0,0.5);--zn-color-text:33,33,33;--zn-color-muted-text:125,119,146;--zn-color-base:255,255,255;--zn-color-body:248,247,252;--zn-color-navigation:var(--zn-color-base);--zn-color-navigation-hightlight:248,249,252;--zn-color-border:219,217,236;--zn-color-border-active:209,207,226;--zn-color-tab:236,235,249;--zn-color-panel:255,255,255;--zn-color-primary:105,54,245;--zn-color-info:53,104,195;--zn-color-success:98,177,121;--zn-color-warning:241,168,80;--zn-color-error:236,68,91;--zn-color-disabled:181,181,181}[t=dark],.theme-dark{--zn-backdrop-color:rgba(0,0,0,0.85);--zn-color-text:215,215,215;--zn-color-muted-text:145,145,145;--zn-color-base:0,0,0;--zn-color-body:23,23,23;--zn-color-navigation:var(--zn-color-base);--zn-color-navigation-hightlight:10,10,10;--zn-color-border:38,38,38;--zn-color-border-active:80,80,80;--zn-color-tab:5,5,5;--zn-color-panel:30,30,30;--zn-color-primary:105,54,245;--zn-color-info:53,104,195;--zn-color-success:98,177,121;--zn-color-warning:241,168,80;--zn-color-error:236,68,91;--zn-color-disabled:181,181,181}@media (min-width:1200px){:root{--zn-base-gap:calc(var(--zn-base-px) * 3)}}@media (min-width:2500px){:root{--zn-default-margin:0 auto}}:root{--zn-primary:var(--zn-color-primary);--zn-red:237,84,109;--zn-blue:100,117,242;--zn-green:43,192,145;--zn-orange:255,136,0;--zn-yellow:255,193,7;--zn-indigo:63,81,181;--zn-violet:156,39,176;--zn-pink:255,108,156;--zn-grey:158,158,158;--zn-accent:71,214,214;--zn-size-bar:60px;--zn-size-tile:80px;--zn-size-sidenav:320px;--zn-size-spanel:170px;--zn-size-mpanel:320px;--zn-size-panel:360px;--zn-size-lside:460px;--zn-bg-opacity:1;--zn-text-opacity:1;--base:255,255,255;--inverse-base:0,0,0}.zn-mono{font-family:var(--zn-font-family-mono),monospace}.zn-muted{color:var(--zn-color-muted-text)}.zn-size-xs{font-size:var(--zn-font-size-x-small)}.zn-size-s{font-size:var(--zn-font-size-small)}.zn-size-l{font-size:var(--zn-font-size-large)}.zn-size-xl{font-size:var(--zn-font-size-x-large)}:root,[t=light],.theme-light,[t=dark],.theme-dark{--zn-body:var(--zn-color-body);--zn-text:var(--zn-color-text);--zn-text-heading:var(--zn-color-text);--zn-text-page-title:var(--zn-color-text);--zn-text-panel-title:var(--zn-color-text);--zn-panel:var(--zn-color-panel);--zn-border-color:var(--zn-color-border);--zn-input-bg:var(--zn-color-body)}[t=light],.theme-light{--zn-panel-opacity:1;--zn-shadow:236,235,249;--zn-panel-secondary:246 246 246;--zn-panel-highlight:248,249,252;--zn-panel-highlight-opacity:1;--zn-input-bg-accent:237,235,245;--zn-bright-bg:255,255,255;--zn-light-text:123,112,151;--zn-dark-text:56,39,104;--zn-purple-text:104,54,245}[t=light] .zn-primary,.theme-light .zn-primary{color:rgb(var(--zn-color-primary))}[t=dark],.theme-dark{--zn-shadow:10,10,10;--zn-panel-secondary:27,27,30;--zn-panel-opacity:1;--zn-panel-highlight:25,27,32;--zn-panel-highlight-opacity:0.1;--zn-input-bg-accent:72,84,102;--zn-bright-bg:225,225,225;--zn-light-text:173,163,192;--zn-dark-text:201,201,201;--zn-purple-text:129,140,249;--zn-accent:15,165,234;--zn-primary:137,103,239;--base:0,0,0;--inverse-base:255,255,255}[t=dark] .zn-primary,.theme-dark .zn-primary{color:#8967ef !important}.ml-px{margin-left:2px}.mr-px{margin-right:2px}.mt-px{margin-top:2px}.mb-px{margin-bottom:2px}.mx-px{margin-left:2px;margin-right:2px}.my-px{margin-top:2px;margin-bottom:2px}.m-px{margin:2px}.ml-xxs{margin-left:4px}.mr-xxs{margin-right:4px}.mt-xxs{margin-top:4px}.mb-xxs{margin-bottom:4px}.mx-xxs{margin-left:4px;margin-right:4px}.my-xxs{margin-top:4px;margin-bottom:4px}.m-xxs{margin:4px}.ml-xs{margin-left:8px}.mr-xs{margin-right:8px}.mt-xs{margin-top:8px}.mb-xs{margin-bottom:8px}.mx-xs{margin-left:8px;margin-right:8px}.my-xs{margin-top:8px;margin-bottom:8px}.m-xs{margin:8px}.ml-sm{margin-left:16px}.mr-sm{margin-right:16px}.mt-sm{margin-top:16px}.mb-sm{margin-bottom:16px}.mx-sm{margin-left:16px;margin-right:16px}.my-sm{margin-top:16px;margin-bottom:16px}.m-sm{margin:16px}.ml-md{margin-left:24px}.mr-md{margin-right:24px}.mt-md{margin-top:24px}.mb-md{margin-bottom:24px}.mx-md{margin-left:24px;margin-right:24px}.my-md{margin-top:24px;margin-bottom:24px}.m-md{margin:24px}.ml-lg{margin-left:32px}.mr-lg{margin-right:32px}.mt-lg{margin-top:32px}.mb-lg{margin-bottom:32px}.mx-lg{margin-left:32px;margin-right:32px}.my-lg{margin-top:32px;margin-bottom:32px}.m-lg{margin:32px}.ml-xl{margin-left:40px}.mr-xl{margin-right:40px}.mt-xl{margin-top:40px}.mb-xl{margin-bottom:40px}.mx-xl{margin-left:40px;margin-right:40px}.my-xl{margin-top:40px;margin-bottom:40px}.m-xl{margin:40px}.zn-red{color:rgb(var(--zn-red))}.zn-blue{color:rgb(var(--zn-blue))}.zn-green{color:rgb(var(--zn-green))}.zn-orange{color:rgb(var(--zn-orange))}.zn-yellow{color:rgb(var(--zn-yellow))}.zn-indigo{color:rgb(var(--zn-indigo))}.zn-violet{color:rgb(var(--zn-violet))}.zn-pink{color:rgb(var(--zn-pink))}.zn-grey{color:rgb(var(--zn-grey))}.zn-primary{color:rgb(var(--zn-primary))}.zn-accent{color:rgb(var(--zn-accent))}.zn-info{color:rgb(var(--zn-color-info))}.zn-warning{color:rgb(var(--zn-color-warning))}.zn-error{color:rgb(var(--zn-color-error))}.zn-success{color:rgb(var(--zn-color-success))}ul.gap li{margin:5px 0}ul.circle,ul.decimal,ul.disc,ul.square{padding:5px 0 5px 15px}ul.circle{list-style-type:circle}ul.decimal{list-style-type:decimal}ul.disc{list-style-type:disc}ul.square{list-style-type:square}:host,html,body{color:rgba(var(--zn-text),var(--zn-text-opacity));font-family:var(--zn-font-family-sans);font-feature-settings:normal;font-variation-settings:normal;font-size:var(--zn-text-paragraph-font-size);-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:rgba(0,0,0,0);-moz-tab-size:4;-o-tab-size:4;tab-size:4;margin:0}html,body{background-color:rgba(var(--zn-body),var(--zn-bg-opacity));container-type:size;min-height:100%;height:100%}.inline-container{container-type:inline-size}.app-container{container-type:inline-size;display:flex;flex:1;flex-direction:column;position:relative;max-height:100%;height:100%;width:100%;max-width:100%}.inline-app-container,.app-container.inline-app-container,[inline-container] .app-container{display:block;height:auto;flex:unset}hr{height:0;border:none;border-top:1px solid rgb(var(--zn-border-color))}code,kbd,samp,pre,.mono{font-family:var(--zn-font-family-mono);font-size:1em}small{font-size:80%}.hidden{display:none !important}.visibility-hidden{visibility:hidden}p{font-size:var(--zn-text-paragraph-font-size);line-height:var(--zn-text-paragraph-line-height);font-weight:var(--zn-text-paragraph-font-weight)}h1,h2,h3,h4,h5,h6{color:rgb(var(--zn-text-heading))}h1{font-size:var(--zn-text-h1-font-size);line-height:var(--zn-text-h1-line-height);font-weight:var(--zn-text-h1-font-weight)}h2{font-size:var(--zn-text-h2-font-size);line-height:var(--zn-text-h2-line-height);font-weight:var(--zn-text-h2-font-weight)}h3,h4,h5,h6{font-size:var(--zn-text-h3-font-size);line-height:var(--zn-text-h3-line-height);font-weight:var(--zn-text-h3-font-weight)}kbd{font-family:monospace;background-color:#eee;color:#333;border:1px solid rgb(var(--zn-border-color));border-radius:3px;box-shadow:0 1px 1px rgba(0,0,0,0.2),0 1px 0 0 rgba(255,255,255,0.5) inset;display:inline-block;font-size:13px;line-height:20px;padding:1px 6px;white-space:nowrap;min-width:15px;color:rgba(0,0,0,0.5)}[t=dark] kbd{background-color:rgb(25,25,25);box-shadow:0 1px 1px rgba(0,0,0,0.2),0 1px 0 0 rgba(110,110,110,0.5) inset;color:#eee}[tab]{cursor:pointer}.zn-link:hover{--zn-text:rgb(var(--zn-primary));--icon-color:rgb(var(--zn-primary));--zn-text-heading:rgb(var(--zn-primary));--property-color:rgb(var(--zn-primary));opacity:1}.grow{flex-grow:1}.no-grow{flex-grow:0}.shrink{flex-shrink:1}.no-shrink{flex-shrink:0}.block{display:block}.flex{display:flex}.flex-wrap{display:flex;flex-wrap:wrap}.flex-col{display:flex;flex-direction:column}.flex-mid{display:flex;align-items:center}.flex-jc{justify-content:center}.flex-between{display:flex;justify-content:space-between}.flex-end{display:flex;justify-content:flex-end}.flex-bottom{display:flex;align-items:flex-end}.equal{flex-basis:50%}.m-auto{margin:auto}.mt-auto{margin-top:auto}.zn-pad{padding:var(--zn-base-gap,0)}.zn-pad-y,.zn-py{padding-top:16px;padding-bottom:16px}.zn-pad-x,.zn-px{padding-left:16px;padding-right:16px}.zn-pr{padding-right:16px}.zn-pl{padding-left:16px}.zn-pt{padding-top:16px}.zn-pb{padding-bottom:16px}.zn-margin{margin:16px}.zn-mx{margin-left:16px;margin-right:16px}.zn-my{margin-top:16px;margin-bottom:16px}.zn-mt{margin-top:16px}.zn-mb{margin-bottom:16px}.zn-ml{margin-left:16px}.zn-mr{margin-right:16px}.zn-mxa{margin-left:auto;margin-right:auto}.zn-mya{margin-top:auto;margin-bottom:auto}.zn-mta{margin-top:auto}.zn-mba{margin-bottom:auto}.zn-mla{margin-left:auto}.zn-mra{margin-right:auto}.rotate-45{transform:rotate(45deg)}.rotate-90{transform:rotate(90deg)}.rotate-180{transform:rotate(180deg)}@keyframes act-vanish{from{transform:scale(1);opacity:1;max-height:100%}to{transform:scale(0.8);opacity:0;max-height:0}}.act-vanish{animation:ease-in act-vanish 600ms forwards;transform-origin:top center;background-color:rgba(var(--zn-color-error),0.3);display:block;overflow:hidden}.h-full{height:100%}.w-full{width:100%}.zn-panel-bg{--zn-page-surface-background:var(--zn-panel);background-color:rgba(var(--zn-panel),var(--zn-panel-opacity))}.zn-panel{background-color:rgba(var(--zn-panel),var(--zn-panel-opacity));border:1px solid rgb(var(--zn-border-color));border-radius:var(--zn-border-radius);--zn-page-surface-background:var(--zn-panel)}.zn-container{display:flex;flex-direction:column;flex-grow:1;max-height:100%;overflow:hidden}.tar{text-align:right}.tal{text-align:left}.tac{text-align:center}.zn-empty-hide:empty{display:none}.ml-auto{margin-left:auto}.zn-b-dash{border-style:dashed}.zn-b-dotted{border-style:dotted}.zn-border{border-style:solid;border-width:1px !important}.zn-bt{border-top-style:solid;border-top-width:1px !important}.zn-bb{border-bottom-style:solid;border-bottom-width:1px !important}.zn-bl{border-left-style:solid;border-left-width:1px !important}.zn-br{border-right-style:solid;border-right-width:1px !important}.unifi-action{display:flex;gap:10px;padding:10px 0;align-items:center}.zn-panel-bar{border-bottom:1px solid rgb(var(--zn-border-color));background-color:rgba(var(--zn-panel),0.9);padding:var(--zn-base-px);gap:var(--zn-base-px);display:flex;flex-wrap:wrap;align-items:center;z-index:1}.zn-panel-bar--pill{border-radius:var(--zn-border-radius);border:1px solid rgb(var(--zn-border-color))}.zn-panel-bar--large{padding:var(--zn-base-px) calc(var(--zn-base-gap) + var(--zn-gutter));gap:var(--zn-base-px);height:50px}.scroll-container{overflow:auto;flex-grow:1;position:relative;display:flex;flex-direction:column;max-height:100%}.zn-divide{display:flex;flex-direction:column}.zn-divide>*:not(:first-child){border-top:1px solid rgb(var(--zn-border-color))}.zn-divide>div:empty+div:not(:first-child){border-top:0}.zn-divide-y{display:flex;flex-direction:row}.zn-divide-y>*:not(:first-child):not(:empty){border-left:1px solid rgb(var(--zn-border-color))}.zn-c-pad{--zn-pad-spacing:var(--zn-spacing-large)}.zn-c-pad-x>*{padding-left:var(--zn-pad-spacing);padding-right:var(--zn-pad-spacing)}.zn-c-pad-y>*:not(:first-child){padding-top:var(--zn-pad-spacing)}.zn-c-pad-y>*:not(:last-child){padding-bottom:var(--zn-pad-spacing)}.zn-nav.zn-transparent{background:transparent}.zn-nav{background:rgba(var(--zn-panel),var(--zn-panel-opacity));border-right:1px solid rgb(var(--zn-border-color));max-width:320px;height:100%;padding-top:5px}.zn-nav ul{list-style:none;padding-bottom:10px;margin:0;display:flex;flex-direction:column;position:relative}.zn-nav ul:after{content:"";height:1px;left:18px;right:18px;bottom:0;position:absolute;background:rgb(var(--zn-border-color))}.zn-nav ul li a{text-decoration:none;color:rgb(var(--zn-text));display:block;font-weight:500;cursor:pointer}.zn-nav ul li a:hover,.zn-nav ul li a.zn-tb-active{background:rgb(var(--zn-body))}.zn-nav ul li a.zn-tb-active{color:rgb(var(--zn-purple-text))}.zn-nav ul:last-child:after{display:none}.zn-nav strong,.zn-nav li a{padding:10px 20px}.zn-nav strong{display:block;margin-top:10px;font-size:13px;letter-spacing:0.93px;color:rgb(var(--zn-text-heading));font-weight:600;padding-bottom:5px;text-transform:uppercase}@keyframes shimmer-text-sweep{0%{background-position:100% center}100%{background-position:0% center}}@media (prefers-reduced-motion:no-preference){.shimmer-text{--shimmer-base:rgb(var(--zn-text));--shimmer-highlight:rgb(var(--zn-text-heading));--shimmer-core:0.5ch;--shimmer-spread:1.5ch;--shimmer-duration:1.5s;display:inline-block;width:-moz-fit-content;width:fit-content;max-width:100%;background-image:linear-gradient(90deg,transparent calc(50% - var(--shimmer-spread)),var(--shimmer-highlight) calc(50% - var(--shimmer-core)),var(--shimmer-highlight) calc(50% + var(--shimmer-core)),transparent calc(50% + var(--shimmer-spread))),linear-gradient(var(--shimmer-base),var(--shimmer-base));background-size:250% 100%,auto;background-clip:text;-webkit-background-clip:text;-webkit-text-fill-color:transparent !important;color:transparent !important;animation:var(--shimmer-duration) linear infinite shimmer-text-sweep}.shimmer-text.zn-error{--shimmer-base:rgb(var(--zn-color-error));--shimmer-highlight:color-mix(in srgb,rgb(var(--zn-color-error)) 55%,white)}.shimmer-text.zn-success{--shimmer-base:rgb(var(--zn-color-success));--shimmer-highlight:color-mix(in srgb,rgb(var(--zn-color-success)) 55%,white)}.shimmer-text.zn-info{--shimmer-base:rgb(var(--zn-color-info));--shimmer-highlight:color-mix(in srgb,rgb(var(--zn-color-info)) 55%,white)}.shimmer-text.zn-warning{--shimmer-base:rgb(var(--zn-color-warning));--shimmer-highlight:color-mix(in srgb,rgb(var(--zn-color-warning)) 55%,white)}.shimmer-text.zn-primary{--shimmer-base:rgb(var(--zn-primary));--shimmer-highlight:color-mix(in srgb,rgb(var(--zn-primary)) 55%,white)}.shimmer-text.zn-accent{--shimmer-base:rgb(var(--zn-accent));--shimmer-highlight:color-mix(in srgb,rgb(var(--zn-accent)) 55%,white)}}@media (prefers-reduced-motion:reduce){.shimmer-text{color:rgb(var(--zn-text))}.shimmer-text.zn-error{color:rgb(var(--zn-color-error)) !important}.shimmer-text.zn-success{color:rgb(var(--zn-color-success)) !important}.shimmer-text.zn-info{color:rgb(var(--zn-color-info)) !important}.shimmer-text.zn-warning{color:rgb(var(--zn-color-warning)) !important}.shimmer-text.zn-primary{color:rgb(var(--zn-primary)) !important}.shimmer-text.zn-accent{color:rgb(var(--zn-accent)) !important}}*,*::before,*::after{box-sizing:border-box}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}a{color:inherit;text-decoration:inherit}strong{font-weight:bolder}b{font-weight:600}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:inline-block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}button,.zn-button{border-radius:var(--zn-border-radius);display:inline-flex;align-items:center;justify-content:center;padding:var(--zn-base-px);margin:auto;width:-moz-fit-content;width:fit-content;background-color:rgb(var(--zn-primary));color:rgba(255,255,255,0.9);font-size:var(--zn-text-button-label-font-size);font-weight:var(--zn-text-button-label-font-weight);line-height:var(--zn-text-button-label-line-height);text-transform:var(--zn-text-button-label-transform);cursor:pointer;vertical-align:middle;border-color:transparent;white-space:nowrap;max-height:36px;height:36px;min-height:36px}button:hover:not([disabled]),.zn-button:hover:not([disabled]){background-color:rgba(var(--zn-primary),0.8)}input[type=date],input[type=datetime-local],input[type=email],input[type=month],input[type=number],input[type=password],input[type=search],input[type=tel],input[type=text],input[type=time],input[type=url],input[type=week],input[type=file],input[list],textarea,select{display:block;width:100%;border-radius:5px;border-style:solid;border-width:1px !important;border-color:rgb(var(--zn-border-color));background-color:rgb(var(--zn-input-bg));outline:none}input[type=date]:focus,input[type=datetime-local]:focus,input[type=email]:focus,input[type=month]:focus,input[type=number]:focus,input[type=password]:focus,input[type=search]:focus,input[type=tel]:focus,input[type=text]:focus,input[type=time]:focus,input[type=url]:focus,input[type=week]:focus,input[type=file]:focus,input[list]:focus,textarea:focus,select:focus{border-color:rgb(var(--zn-primary));box-shadow:0 0 0 3px rgba(var(--zn-primary),0.3)}input[type=date]::-moz-placeholder, input[type=datetime-local]::-moz-placeholder, input[type=email]::-moz-placeholder, input[type=month]::-moz-placeholder, input[type=number]::-moz-placeholder, input[type=password]::-moz-placeholder, input[type=search]::-moz-placeholder, input[type=tel]::-moz-placeholder, input[type=text]::-moz-placeholder, input[type=time]::-moz-placeholder, input[type=url]::-moz-placeholder, input[type=week]::-moz-placeholder, input[type=file]::-moz-placeholder, input[list]::-moz-placeholder, textarea::-moz-placeholder, select::-moz-placeholder{font-weight:400;color:rgba(var(--zn-text),0.6)}input[type=date]::placeholder,input[type=datetime-local]::placeholder,input[type=email]::placeholder,input[type=month]::placeholder,input[type=number]::placeholder,input[type=password]::placeholder,input[type=search]::placeholder,input[type=tel]::placeholder,input[type=text]::placeholder,input[type=time]::placeholder,input[type=url]::placeholder,input[type=week]::placeholder,input[type=file]::placeholder,input[list]::placeholder,textarea::placeholder,select::placeholder{font-weight:400;color:rgba(var(--zn-text),0.6)}@media (min-width:360px){input[type=date],input[type=datetime-local],input[type=email],input[type=month],input[type=number],input[type=password],input[type=search],input[type=tel],input[type=text],input[type=time],input[type=url],input[type=week],input[type=file],input[list],textarea,select{padding:8px}}label{font-weight:600;font-size:rgb(var(--zn-font-size-medium));line-height:var(--zn-spacing-medium);color:rgb(var(--zn-text-heading));display:block;margin-bottom:4px;margin-top:16px}input[type=checkbox],input[type=radio]{border-radius:5px}input[type=radio]{border-radius:50%}input[type=range]{-webkit-appearance:none;-moz-appearance:none;appearance:none;border-radius:10px;background-color:rgb(var(--zn-border-color));height:8px;accent-color:rgb(var(--zn-primary));width:100%;max-width:768px}fieldset{border-color:rgba(var(--zn-primary),20%);border-width:2px;padding:0 16px 16px}select option{padding:4px}select>option:checked{background-color:rgba(var(--zn-primary),20%);border-radius:5px}fieldset>legend{padding:4px}input[type=button],input[type=submit],button[type=submit]:not(.button),button[type=button]:not(.button){border-radius:var(--zn-border-radius);display:inline-flex;align-items:center;justify-content:center;padding:var(--zn-base-px);margin:auto;width:-moz-fit-content;width:fit-content;background-color:rgb(var(--zn-primary));color:rgba(255,255,255,0.9);font-size:var(--zn-text-button-label-font-size);font-weight:var(--zn-text-button-label-font-weight);line-height:var(--zn-text-button-label-line-height);text-transform:var(--zn-text-button-label-transform);cursor:pointer;vertical-align:middle;border-color:transparent;white-space:nowrap;max-height:36px;height:36px;min-height:36px}input[type=button]:hover:not([disabled]),input[type=submit]:hover:not([disabled]),button[type=submit]:not(.button):hover:not([disabled]),button[type=button]:not(.button):hover:not([disabled]){background-color:rgba(var(--zn-primary),0.8)}input[type=button],input[type=submit],button[type=submit]:not(.button),button[type=button]:not(.button){width:auto}div+button{margin-top:16px}input[type=file]::-webkit-file-upload-button{border-radius:var(--zn-border-radius);display:inline-flex;align-items:center;justify-content:center;padding:var(--zn-base-px);margin:auto;width:fit-content;background-color:rgb(var(--zn-primary));color:rgba(255,255,255,0.9);font-size:var(--zn-text-button-label-font-size);font-weight:var(--zn-text-button-label-font-weight);line-height:var(--zn-text-button-label-line-height);text-transform:var(--zn-text-button-label-transform);cursor:pointer;vertical-align:middle;border-color:transparent;white-space:nowrap;max-height:36px;height:36px;min-height:36px}input[type=file]::-webkit-file-upload-button:hover:not([disabled]){background-color:rgba(var(--zn-primary),0.8)}input[type=file]::-webkit-file-upload-button{margin-right:8px}input::-webkit-calendar-picker-indicator{cursor:pointer;padding:8px}input[list]::-webkit-calendar-picker-indicator{padding:8px 4px}.input--with-icon{position:relative}.input--with-icon zn-icon{padding:14px;position:absolute;top:50%;pointer-events:none;transform:translateY(-50%);left:8px;background-color:rgb(var(--zn-primary));color:rgb(var(--zn-text));border-radius:50%}.input--with-icon input{padding-left:40px}input:-webkit-autofill,input:-webkit-autofill:hover,input:-webkit-autofill:focus,input:-webkit-autofill:active{-webkit-background-clip:text;-webkit-text-fill-color:rgb(var(--zn-text));-webkit-transition:background-color 5000s ease-in-out 0s;transition:background-color 5000s ease-in-out 0s;box-shadow:inset 0 0 20px 20px rgba(35,35,35,0.1607843137)}select{height:43px}.no-border{border:none !important}table:not(.remarkd-table){border-collapse:separate !important;border-spacing:0;width:100%;max-width:100%;table-layout:auto;text-align:left;font-family:var(--zn-font-sans);font-size:var(--zn-text-table-content-font-size);font-weight:var(--zn-text-table-content-font-weight);line-height:var(--zn-text-table-content-line-height);color:var(--zn-text-table-content-color);text-transform:var(--zn-text-table-content-transform)}table:not(.remarkd-table) thead{font-weight:var(--zn-font-weight-medium)}table:not(.remarkd-table) thead tr th{background-color:rgb(var(--zn-table-header-background-color))}table:not(.remarkd-table) tbody a{cursor:pointer;color:rgb(var(--zn-primary))}table:not(.remarkd-table) tbody tr td{border-top:1px solid rgb(var(--zn-border-color)) !important}table:not(.remarkd-table) tbody tr:first-of-type td{border-top:0 !important}table:not(.remarkd-table) th,table:not(.remarkd-table) td{padding:var(--zn-spacing-small) var(--zn-spacing-medium);min-width:90px;white-space:nowrap}table:not(.remarkd-table) td>span{white-space:normal}table:not(.remarkd-table) th{font-family:var(--zn-font-sans);font-size:var(--zn-text-button-label-font-size);font-weight:var(--zn-text-button-label-font-weight);line-height:var(--zn-text-button-label-line-height);color:var(--zn-text-button-label-color);text-transform:var(--zn-text-button-label-transform);text-transform:capitalize;border-bottom:1px solid rgb(var(--zn-border-color))}.zn-table-fixed{table-layout:fixed}.opacity-100{opacity:1}.opacity-90{opacity:0.9}.opacity-80{opacity:0.8}.opacity-60{opacity:0.6}.opacity-50{opacity:0.5}.opacity-40{opacity:0.4}.opacity-10{opacity:0.1}.air-datepicker-cell.-year-.-other-decade-,.air-datepicker-cell.-day-.-other-month-{color:var(--adp-color-other-month)}.air-datepicker-cell.-year-.-other-decade-:hover,.air-datepicker-cell.-day-.-other-month-:hover{color:var(--adp-color-other-month-hover)}.-disabled-.-focus-.air-datepicker-cell.-year-.-other-decade-,.-disabled-.-focus-.air-datepicker-cell.-day-.-other-month-{color:var(--adp-color-other-month)}.-selected-.air-datepicker-cell.-year-.-other-decade-,.-selected-.air-datepicker-cell.-day-.-other-month-{color:#fff;background:var(--adp-background-color-selected-other-month)}.-selected-.-focus-.air-datepicker-cell.-year-.-other-decade-,.-selected-.-focus-.air-datepicker-cell.-day-.-other-month-{background:var(--adp-background-color-selected-other-month-focused)}.-in-range-.air-datepicker-cell.-year-.-other-decade-,.-in-range-.air-datepicker-cell.-day-.-other-month-{background-color:var(--adp-background-color-in-range);color:var(--adp-color)}.-in-range-.-focus-.air-datepicker-cell.-year-.-other-decade-,.-in-range-.-focus-.air-datepicker-cell.-day-.-other-month-{background-color:var(--adp-background-color-in-range-focused)}.air-datepicker-cell.-year-.-other-decade-:empty,.air-datepicker-cell.-day-.-other-month-:empty{background:none;border:none}.air-datepicker-cell{border-radius:var(--adp-cell-border-radius);box-sizing:border-box;cursor:pointer;display:flex;position:relative;align-items:center;justify-content:center;z-index:1}.air-datepicker-cell.-focus-{background:var(--adp-cell-background-color-hover)}.air-datepicker-cell.-current-{color:var(--adp-color-current-date)}.air-datepicker-cell.-current-.-focus-{color:var(--adp-color)}.air-datepicker-cell.-current-.-in-range-{color:var(--adp-color-current-date)}.air-datepicker-cell.-disabled-{cursor:default;color:var(--adp-color-disabled)}.air-datepicker-cell.-disabled-.-focus-{color:var(--adp-color-disabled)}.air-datepicker-cell.-disabled-.-in-range-{color:var(--adp-color-disabled-in-range)}.air-datepicker-cell.-disabled-.-current-.-focus-{color:var(--adp-color-disabled)}.air-datepicker-cell.-in-range-{background:var(--adp-cell-background-color-in-range);border-radius:0}.air-datepicker-cell.-in-range-:hover,.air-datepicker-cell.-in-range-.-focus-{background:var(--adp-cell-background-color-in-range-hover)}.air-datepicker-cell.-range-from-{border:1px solid var(--adp-cell-border-color-in-range);background-color:var(--adp-cell-background-color-in-range);border-radius:var(--adp-cell-border-radius) 0 0 var(--adp-cell-border-radius)}.air-datepicker-cell.-range-to-{border:1px solid var(--adp-cell-border-color-in-range);background-color:var(--adp-cell-background-color-in-range);border-radius:0 var(--adp-cell-border-radius) var(--adp-cell-border-radius) 0}.air-datepicker-cell.-range-to-.-range-from-{border-radius:var(--adp-cell-border-radius)}.air-datepicker-cell.-selected-{color:#fff;border:none;background:var(--adp-cell-background-color-selected)}.air-datepicker-cell.-selected-.-current-{color:#fff;background:var(--adp-cell-background-color-selected)}.air-datepicker-cell.-selected-.-focus-{background:var(--adp-cell-background-color-selected-hover)}.air-datepicker-body{transition:all var(--adp-transition-duration) var(--adp-transition-ease)}.air-datepicker-body.-hidden-{display:none}.air-datepicker-body--day-names{display:grid;grid-template-columns:repeat(7,var(--adp-day-cell-width));margin:8px 0 3px}.air-datepicker-body--day-name{color:var(--adp-day-name-color);display:flex;align-items:center;justify-content:center;flex:1;text-align:center;text-transform:uppercase;font-size:0.8em}.air-datepicker-body--day-name.-clickable-{cursor:pointer}.air-datepicker-body--day-name.-clickable-:hover{color:var(--adp-day-name-color-hover)}.air-datepicker-body--cells{display:grid}.air-datepicker-body--cells.-days-{grid-template-columns:repeat(7,var(--adp-day-cell-width));grid-auto-rows:var(--adp-day-cell-height)}.air-datepicker-body--cells.-months-{grid-template-columns:repeat(3,1fr);grid-auto-rows:var(--adp-month-cell-height)}.air-datepicker-body--cells.-years-{grid-template-columns:repeat(4,1fr);grid-auto-rows:var(--adp-year-cell-height)}.air-datepicker-nav{display:flex;justify-content:space-between;border-bottom:1px solid var(--adp-border-color-inner);min-height:var(--adp-nav-height);padding:var(--adp-padding);box-sizing:content-box}.-only-timepicker- .air-datepicker-nav{display:none}.air-datepicker-nav--title,.air-datepicker-nav--action{display:flex;cursor:pointer;align-items:center;justify-content:center}.air-datepicker-nav--action{width:var(--adp-nav-action-size);border-radius:var(--adp-border-radius);-webkit-user-select:none;-moz-user-select:none;user-select:none}.air-datepicker-nav--action:hover{background:var(--adp-background-color-hover)}.air-datepicker-nav--action:active{background:var(--adp-background-color-active)}.air-datepicker-nav--action.-disabled-{visibility:hidden}.air-datepicker-nav--action svg{width:32px;height:32px}.air-datepicker-nav--action path{fill:none;stroke:var(--adp-nav-arrow-color);stroke-width:2px}.air-datepicker-nav--title{border-radius:var(--adp-border-radius);padding:0 8px}.air-datepicker-nav--title i{font-style:normal;color:var(--adp-nav-color-secondary);margin-left:0.3em}.air-datepicker-nav--title:hover{background:var(--adp-background-color-hover)}.air-datepicker-nav--title:active{background:var(--adp-background-color-active)}.air-datepicker-nav--title.-disabled-{cursor:default;background:none}.air-datepicker-buttons{display:grid;grid-auto-columns:1fr;grid-auto-flow:column}.air-datepicker-button{display:inline-flex;color:var(--adp-btn-color);border-radius:var(--adp-btn-border-radius);cursor:pointer;height:var(--adp-btn-height);border:none;background:rgba(255,255,255,0)}.air-datepicker-button:hover{color:var(--adp-btn-color-hover);background:var(--adp-btn-background-color-hover)}.air-datepicker-button:focus{color:var(--adp-btn-color-hover);background:var(--adp-btn-background-color-hover);outline:none}.air-datepicker-button:active{background:var(--adp-btn-background-color-active)}.air-datepicker-button span{outline:none;display:flex;align-items:center;justify-content:center;width:100%;height:100%}.air-datepicker-time{display:grid;grid-template-columns:max-content 1fr;grid-column-gap:12px;align-items:center;position:relative;padding:0 var(--adp-time-padding-inner)}.-only-timepicker- .air-datepicker-time{border-top:none}.air-datepicker-time--current{display:flex;align-items:center;flex:1;font-size:14px;text-align:center}.air-datepicker-time--current-colon{margin:0 2px 3px;line-height:1}.air-datepicker-time--current-hours,.air-datepicker-time--current-minutes{line-height:1;font-size:19px;font-family:"Century Gothic",CenturyGothic,AppleGothic,sans-serif;position:relative;z-index:1}.air-datepicker-time--current-hours:after,.air-datepicker-time--current-minutes:after{content:"";background:var(--adp-background-color-hover);border-radius:var(--adp-border-radius);position:absolute;left:-2px;top:-3px;right:-2px;bottom:-2px;z-index:-1;opacity:0}.air-datepicker-time--current-hours.-focus-:after,.air-datepicker-time--current-minutes.-focus-:after{opacity:1}.air-datepicker-time--current-ampm{text-transform:uppercase;align-self:flex-end;color:var(--adp-time-day-period-color);margin-left:6px;font-size:11px;margin-bottom:1px}.air-datepicker-time--row{display:flex;align-items:center;font-size:11px;height:17px;background:linear-gradient(to right,var(--adp-time-track-color),var(--adp-time-track-color)) left 50%/100% var(--adp-time-track-height) no-repeat}.air-datepicker-time--row:first-child{margin-bottom:4px}.air-datepicker-time--row input[type=range]{background:none;cursor:pointer;flex:1;height:100%;width:100%;padding:0;margin:0;-webkit-appearance:none}.air-datepicker-time--row input[type=range]::-webkit-slider-thumb{-webkit-appearance:none}.air-datepicker-time--row input[type=range]::-ms-tooltip{display:none}.air-datepicker-time--row input[type=range]:hover::-webkit-slider-thumb{border-color:var(--adp-time-track-color-hover)}.air-datepicker-time--row input[type=range]:hover::-moz-range-thumb{border-color:var(--adp-time-track-color-hover)}.air-datepicker-time--row input[type=range]:hover::-ms-thumb{border-color:var(--adp-time-track-color-hover)}.air-datepicker-time--row input[type=range]:focus{outline:none}.air-datepicker-time--row input[type=range]:focus::-webkit-slider-thumb{background:var(--adp-cell-background-color-selected);border-color:var(--adp-cell-background-color-selected)}.air-datepicker-time--row input[type=range]:focus::-moz-range-thumb{background:var(--adp-cell-background-color-selected);border-color:var(--adp-cell-background-color-selected)}.air-datepicker-time--row input[type=range]:focus::-ms-thumb{background:var(--adp-cell-background-color-selected);border-color:var(--adp-cell-background-color-selected)}.air-datepicker-time--row input[type=range]::-webkit-slider-thumb{box-sizing:border-box;height:12px;width:12px;border-radius:3px;border:1px solid var(--adp-time-track-color);background:#fff;cursor:pointer;-webkit-transition:background var(--adp-transition-duration);transition:background var(--adp-transition-duration)}.air-datepicker-time--row input[type=range]::-moz-range-thumb{box-sizing:border-box;height:12px;width:12px;border-radius:3px;border:1px solid var(--adp-time-track-color);background:#fff;cursor:pointer;-moz-transition:background var(--adp-transition-duration);transition:background var(--adp-transition-duration)}.air-datepicker-time--row input[type=range]::-ms-thumb{box-sizing:border-box;height:12px;width:12px;border-radius:3px;border:1px solid var(--adp-time-track-color);background:#fff;cursor:pointer;-ms-transition:background var(--adp-transition-duration);transition:background var(--adp-transition-duration)}.air-datepicker-time--row input[type=range]::-webkit-slider-thumb{margin-top:calc(var(--adp-time-thumb-size) / 2 * -1)}.air-datepicker-time--row input[type=range]::-webkit-slider-runnable-track{border:none;height:var(--adp-time-track-height);cursor:pointer;color:rgba(0,0,0,0);background:rgba(0,0,0,0)}.air-datepicker-time--row input[type=range]::-moz-range-track{border:none;height:var(--adp-time-track-height);cursor:pointer;color:rgba(0,0,0,0);background:rgba(0,0,0,0)}.air-datepicker-time--row input[type=range]::-ms-track{border:none;height:var(--adp-time-track-height);cursor:pointer;color:rgba(0,0,0,0);background:rgba(0,0,0,0)}.air-datepicker-time--row input[type=range]::-ms-fill-lower{background:rgba(0,0,0,0)}.air-datepicker-time--row input[type=range]::-ms-fill-upper{background:rgba(0,0,0,0)}.air-datepicker{--adp-font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";--adp-font-size:14px;--adp-width:246px;--adp-z-index:100;--adp-padding:4px;--adp-grid-areas:"nav" "body" "timepicker" "buttons";--adp-transition-duration:.3s;--adp-transition-ease:ease-out;--adp-transition-offset:8px;--adp-background-color:#fff;--adp-background-color-hover:#f0f0f0;--adp-background-color-active:#eaeaea;--adp-background-color-in-range:rgba(92,196,239,.1);--adp-background-color-in-range-focused:rgba(92,196,239,.2);--adp-background-color-selected-other-month-focused:#8ad5f4;--adp-background-color-selected-other-month:#a2ddf6;--adp-color:#4a4a4a;--adp-color-secondary:#9c9c9c;--adp-accent-color:#4eb5e6;--adp-color-current-date:var(--adp-accent-color);--adp-color-other-month:#dedede;--adp-color-disabled:#aeaeae;--adp-color-disabled-in-range:#939393;--adp-color-other-month-hover:#c5c5c5;--adp-border-color:#dbdbdb;--adp-border-color-inner:#efefef;--adp-border-radius:4px;--adp-border-color-inline:#d7d7d7;--adp-nav-height:32px;--adp-nav-arrow-color:var(--adp-color-secondary);--adp-nav-action-size:32px;--adp-nav-color-secondary:var(--adp-color-secondary);--adp-day-name-color:#ff9a19;--adp-day-name-color-hover:#8ad5f4;--adp-day-cell-width:1fr;--adp-day-cell-height:32px;--adp-month-cell-height:42px;--adp-year-cell-height:56px;--adp-pointer-size:10px;--adp-poiner-border-radius:2px;--adp-pointer-offset:14px;--adp-cell-border-radius:4px;--adp-cell-background-color-hover:var(--adp-background-color-hover);--adp-cell-background-color-selected:#5cc4ef;--adp-cell-background-color-selected-hover:#45bced;--adp-cell-background-color-in-range:rgba(92,196,239,0.1);--adp-cell-background-color-in-range-hover:rgba(92,196,239,0.2);--adp-cell-border-color-in-range:var(--adp-cell-background-color-selected);--adp-btn-height:32px;--adp-btn-color:var(--adp-accent-color);--adp-btn-color-hover:var(--adp-color);--adp-btn-border-radius:var(--adp-border-radius);--adp-btn-background-color-hover:var(--adp-background-color-hover);--adp-btn-background-color-active:var(--adp-background-color-active);--adp-time-track-height:1px;--adp-time-track-color:#dedede;--adp-time-track-color-hover:#b1b1b1;--adp-time-thumb-size:12px;--adp-time-padding-inner:10px;--adp-time-day-period-color:var(--adp-color-secondary);--adp-mobile-font-size:16px;--adp-mobile-nav-height:40px;--adp-mobile-width:320px;--adp-mobile-day-cell-height:38px;--adp-mobile-month-cell-height:48px;--adp-mobile-year-cell-height:64px}.air-datepicker-overlay{--adp-overlay-background-color:rgba(0,0,0,.3);--adp-overlay-transition-duration:.3s;--adp-overlay-transition-ease:ease-out;--adp-overlay-z-index:99}.air-datepicker{background:var(--adp-background-color);border:1px solid var(--adp-border-color);box-shadow:0 4px 12px rgba(0,0,0,0.15);border-radius:var(--adp-border-radius);box-sizing:content-box;display:grid;grid-template-columns:1fr;grid-template-rows:repeat(4,max-content);grid-template-areas:var(--adp-grid-areas);font-family:var(--adp-font-family),sans-serif;font-size:var(--adp-font-size);color:var(--adp-color);width:var(--adp-width);position:absolute;transition:opacity var(--adp-transition-duration) var(--adp-transition-ease),transform var(--adp-transition-duration) var(--adp-transition-ease);z-index:var(--adp-z-index)}.air-datepicker:not(.-custom-position-){opacity:0}.air-datepicker.-from-top-{transform:translateY(calc(var(--adp-transition-offset) * -1))}.air-datepicker.-from-right-{transform:translateX(var(--adp-transition-offset))}.air-datepicker.-from-bottom-{transform:translateY(var(--adp-transition-offset))}.air-datepicker.-from-left-{transform:translateX(calc(var(--adp-transition-offset) * -1))}.air-datepicker.-active-:not(.-custom-position-){transform:translate(0,0);opacity:1}.air-datepicker.-active-.-custom-position-{transition:none}.air-datepicker.-inline-{border-color:var(--adp-border-color-inline);box-shadow:none;position:static;left:auto;right:auto;opacity:1;transform:none}.air-datepicker.-inline- .air-datepicker--pointer{display:none}.air-datepicker.-is-mobile-{--adp-font-size:var(--adp-mobile-font-size);--adp-day-cell-height:var(--adp-mobile-day-cell-height);--adp-month-cell-height:var(--adp-mobile-month-cell-height);--adp-year-cell-height:var(--adp-mobile-year-cell-height);--adp-nav-height:var(--adp-mobile-nav-height);--adp-nav-action-size:var(--adp-mobile-nav-height);position:fixed;width:var(--adp-mobile-width);border:none}.air-datepicker.-is-mobile- *{-webkit-tap-highlight-color:rgba(0,0,0,0)}.air-datepicker.-is-mobile- .air-datepicker--pointer{display:none}.air-datepicker.-is-mobile-:not(.-custom-position-){transform:translate(-50%,calc(-50% + var(--adp-transition-offset)))}.air-datepicker.-is-mobile-.-active-:not(.-custom-position-){transform:translate(-50%,-50%)}.air-datepicker.-custom-position-{transition:none}.air-datepicker-global-container{position:absolute;left:0;top:0}.air-datepicker--pointer{--pointer-half-size:calc(var(--adp-pointer-size) / 2);position:absolute;width:var(--adp-pointer-size);height:var(--adp-pointer-size);z-index:-1}.air-datepicker--pointer:after{content:"";position:absolute;background:#fff;border-top:1px solid var(--adp-border-color-inline);border-right:1px solid var(--adp-border-color-inline);border-top-right-radius:var(--adp-poiner-border-radius);width:var(--adp-pointer-size);height:var(--adp-pointer-size);box-sizing:border-box}.-top-left- .air-datepicker--pointer,.-top-center- .air-datepicker--pointer,.-top-right- .air-datepicker--pointer,[data-popper-placement^=top] .air-datepicker--pointer{top:calc(100% - var(--pointer-half-size) + 1px)}.-top-left- .air-datepicker--pointer:after,.-top-center- .air-datepicker--pointer:after,.-top-right- .air-datepicker--pointer:after,[data-popper-placement^=top] .air-datepicker--pointer:after{transform:rotate(135deg)}.-right-top- .air-datepicker--pointer,.-right-center- .air-datepicker--pointer,.-right-bottom- .air-datepicker--pointer,[data-popper-placement^=right] .air-datepicker--pointer{right:calc(100% - var(--pointer-half-size) + 1px)}.-right-top- .air-datepicker--pointer:after,.-right-center- .air-datepicker--pointer:after,.-right-bottom- .air-datepicker--pointer:after,[data-popper-placement^=right] .air-datepicker--pointer:after{transform:rotate(225deg)}.-bottom-left- .air-datepicker--pointer,.-bottom-center- .air-datepicker--pointer,.-bottom-right- .air-datepicker--pointer,[data-popper-placement^=bottom] .air-datepicker--pointer{bottom:calc(100% - var(--pointer-half-size) + 1px)}.-bottom-left- .air-datepicker--pointer:after,.-bottom-center- .air-datepicker--pointer:after,.-bottom-right- .air-datepicker--pointer:after,[data-popper-placement^=bottom] .air-datepicker--pointer:after{transform:rotate(315deg)}.-left-top- .air-datepicker--pointer,.-left-center- .air-datepicker--pointer,.-left-bottom- .air-datepicker--pointer,[data-popper-placement^=left] .air-datepicker--pointer{left:calc(100% - var(--pointer-half-size) + 1px)}.-left-top- .air-datepicker--pointer:after,.-left-center- .air-datepicker--pointer:after,.-left-bottom- .air-datepicker--pointer:after,[data-popper-placement^=left] .air-datepicker--pointer:after{transform:rotate(45deg)}.-top-left- .air-datepicker--pointer,.-bottom-left- .air-datepicker--pointer{left:var(--adp-pointer-offset)}.-top-right- .air-datepicker--pointer,.-bottom-right- .air-datepicker--pointer{right:var(--adp-pointer-offset)}.-top-center- .air-datepicker--pointer,.-bottom-center- .air-datepicker--pointer{left:calc(50% - var(--adp-pointer-size) / 2)}.-left-top- .air-datepicker--pointer,.-right-top- .air-datepicker--pointer{top:var(--adp-pointer-offset)}.-left-bottom- .air-datepicker--pointer,.-right-bottom- .air-datepicker--pointer{bottom:var(--adp-pointer-offset)}.-left-center- .air-datepicker--pointer,.-right-center- .air-datepicker--pointer{top:calc(50% - var(--adp-pointer-size) / 2)}.air-datepicker--navigation{grid-area:nav}.air-datepicker--content{box-sizing:content-box;padding:var(--adp-padding);grid-area:body}.-only-timepicker- .air-datepicker--content{display:none}.air-datepicker--time{grid-area:timepicker}.air-datepicker--buttons{grid-area:buttons}.air-datepicker--buttons,.air-datepicker--time{padding:var(--adp-padding);border-top:1px solid var(--adp-border-color-inner)}.air-datepicker-overlay{position:fixed;background:var(--adp-overlay-background-color);left:0;top:0;width:0;height:0;opacity:0;transition:opacity var(--adp-overlay-transition-duration) var(--adp-overlay-transition-ease),left 0s,height 0s,width 0s;transition-delay:0s,var(--adp-overlay-transition-duration),var(--adp-overlay-transition-duration),var(--adp-overlay-transition-duration);z-index:var(--adp-overlay-z-index)}.air-datepicker-overlay.-active-{opacity:1;width:100%;height:100%;transition:opacity var(--adp-overlay-transition-duration) var(--adp-overlay-transition-ease),height 0s,width 0s}.air-datepicker{--adp-color:rgba(var(--zn-text),var(--zn-text-opacity));--adp-nav-color-secondary:rgb(var(--zn-purple-text));--adp-day-name-color:var(--zn-color-primary-600);--adp-day-name-color-hover:var(--zn-color-primary-700);--adp-cell-background-color-selected:var(--zn-color-primary-600);--adp-cell-background-color-selected-hover:var(--zn-color-primary-700);--adp-color-current-date:var(--zn-color-primary-600);--adp-background-color:var(--zn-input-background-color);--adp-background-color-hover:var(--zn-input-background-color-hover);--adp-background-color-active:var(--zn-input-background-color-hover);--adp-background-color-selected-other-month:var(--zn-color-primary-300);--adp-background-color-in-range:var(--zn-color-primary-100);--adp-border-color:rgb(var(--zn-border-color));--adp-border-color-inline:rgb(var(--zn-border-color));--adp-border-color-inner:rgb(var(--zn-border-color));--adp-cell-background-color-in-range:var(--zn-color-primary-100);--adp-cell-background-color-in-range-hover:var(--zn-color-primary-200)}.air-datepicker--pointer:after{background-color:var(--zn-input-background-color)}.air-datepicker-global-container{z-index:1000000}.air-datepicker-button{border:none;padding:var(--zn-spacing-2x-small) var(--zn-spacing-x-small);border-radius:var(--adp-border-radius);font-family:var(--adp-font-family),sans-serif;font-size:var(--zn-font-size-medium);font-weight:var(--zn-font-weight-normal);cursor:pointer;color:rgba(var(--zn-text),var(--zn-text-opacity))}.air-datepicker-button:hover{background-color:var(--zn-input-background-color-hover) !important}.zn-cloak:has(:not(:defined)){animation:2s step-end zn-cloak}@keyframes zn-cloak{from{opacity:0}to{opacity:1}}.toolbar{display:flex;flex-wrap:wrap;align-items:center}.toolbar__group{display:flex;align-items:center;position:relative}.toolbar__group--overflow{display:none}.toolbar__group--empty{display:none}.toolbar__group{}.toolbar__group:not(.toolbar__group--empty):not(.toolbar__group--hidden)+.toolbar__group::before{content:"";display:inline-block;width:1px;height:18px;background-color:var(--zn-color-gray-300);opacity:0.8;margin-inline:var(--zn-spacing-2x-small);border-radius:10px}.toolbar__group{}.toolbar__group--has-prev-visible::before{content:"";display:inline-block;width:1px;height:18px;background-color:var(--zn-color-gray-300);opacity:0.8;margin-inline:var(--zn-spacing-2x-small);border-radius:10px}.toolbar__dropdown-trigger::part(icon){margin-left:4px}.color-icon{width:18px;height:18px;display:block;border-radius:100%;flex-shrink:0}.color-icon--red{background-color:var(--zn-color-red-500)}.color-icon--blue{background-color:var(--zn-color-blue-500)}.color-icon--orange{background-color:var(--zn-color-orange-500)}.color-icon--yellow{background-color:var(--zn-color-yellow-400)}.color-icon--indigo{background-color:var(--zn-color-indigo-500)}.color-icon--violet{background-color:var(--zn-color-violet-500)}.color-icon--green{background-color:var(--zn-color-green-500)}.color-icon--pink{background-color:var(--zn-color-pink-500)}.color-icon--gray{background-color:var(--zn-color-gray-500)}`;var xn=class extends C{constructor(){super(...arguments);this._featureConfig={};this._resizeId=null;this._resizeObserver=new Zt(this,{callback:()=>this.handleResize()});this._movedContent=new Map;this.handleResize=()=>{this.containerWidth=this.getToolbarWidth(),this._resizeId!==null&&cancelAnimationFrame(this._resizeId),this._resizeId=requestAnimationFrame(()=>{this.calculateOverflow(),this._resizeId=null})}}connectedCallback(){super.connectedCallback(),this.containerWidth=this.offsetWidth,this.parentElement&&this._resizeObserver.observe(this.parentElement)}disconnectedCallback(){super.disconnectedCallback(),this._resizeId!==null&&(cancelAnimationFrame(this._resizeId),this._resizeId=null),this.restoreMovedContent()}firstUpdated(t){super.firstUpdated(t),this.containerWidth=this.getToolbarWidth(),this.updateEmptyGroups(),this.renderRoot?.querySelector("slot")?.addEventListener("slotchange",()=>this.calculateOverflow()),this.updateComplete.then(()=>this.calculateOverflow())}configureToolbar(t){this._featureConfig=t}getToolbarWidth(){let t=this,r=t.getBoundingClientRect?.().width||t.offsetWidth||0;return(!r||r<=0)&&this._toolbarEl&&(r=this._toolbarEl.getBoundingClientRect().width),r}getOverflowGroupWidth(){let t=50,r=this._overflowGroup;if(!r)return t;let n=r.style.display,a=r.style.visibility;return r.style.display="flex",r.style.visibility="hidden",t=r.offsetWidth||t,r.style.visibility=a,r.style.display=n||"none",t}restoreMovedContent(){this._movedContent.forEach(({placeholder:t,originalParent:r},n)=>{t.parentNode?(r.insertBefore(n,t),t.parentNode.removeChild(t)):r.appendChild(n)}),this._movedContent.clear()}moveContentTo(t,r){if(this._movedContent.has(t)){t.parentElement!==r&&r.appendChild(t);return}let n=t.parentElement;if(!n)return;let a=document.createComment("toolbar-overflow-placeholder");n.insertBefore(a,t),r.appendChild(t),this._movedContent.set(t,{placeholder:a,originalParent:n})}isGroupEmpty(t){let r=t.querySelector("slot");return r?r.assignedElements({flatten:!0}).length===0:t.childElementCount===0}updateEmptyGroups(){Array.from(this._groups||[]).forEach(r=>{let n=this.isGroupEmpty(r);r.classList.toggle("toolbar__group--empty",n)})}_updateDividerClasses(){let t=Array.from(this._groups||[]),r=!1;t.forEach(n=>{let a=n.classList.contains("toolbar__group--empty"),s=n.style.display==="none",l=!a&&!s;n.classList.toggle("toolbar__group--has-prev-visible",l&&r),l&&(r=!0)})}calculateOverflow(){let t=Array.from(this._groups||[]);if(!t.length)return;this.restoreMovedContent(),this.updateEmptyGroups();let r=t.filter(h=>!h.classList.contains("toolbar__group--overflow")&&!h.classList.contains("toolbar__group--empty"));r.forEach(h=>{h.style.display="flex",h.classList.remove("toolbar__group--hidden","toolbar__group--has-prev-visible")}),this._overflowGroup&&(this._overflowGroup.style.display="none",this._overflowGroup.classList.remove("toolbar__group--hidden","toolbar__group--has-prev-visible"));let n=this.getToolbarWidth();if(!n||n<=0){r.forEach(h=>h.style.display="flex"),this._overflowGroup&&(this._overflowGroup.style.display="none"),this.restoreMovedContent(),this._overflowMenu&&(this._overflowMenu.innerHTML=""),this._updateDividerClasses(),this._dispatchOverflowEvent();return}let a=0,s=0;for(let h of r){let m=h.offsetWidth;if(a+m<=n)a+=m,s++;else break}if(s>=r.length){r.forEach(h=>h.style.display="flex"),this._overflowGroup&&(this._overflowGroup.style.display="none"),this.restoreMovedContent(),this._overflowMenu&&(this._overflowMenu.innerHTML=""),this._updateDividerClasses(),this._dispatchOverflowEvent();return}let l=this.getOverflowGroupWidth();a=0,s=0;for(let h of r){let m=h.offsetWidth;if(a+m+l<=n)a+=m,s++;else break}r.forEach((h,m)=>{h.style.display=m<s?"flex":"none"}),r.forEach((h,m)=>{let f=m>=s;h.classList.toggle("toolbar__group--hidden",f)}),this._overflowGroup&&(this._overflowGroup.style.display="flex"),this._updateDividerClasses();let d=r.slice(s);this.populateOverflowMenu(d),this._dispatchOverflowEvent()}_dispatchOverflowEvent(){this.dispatchEvent(new CustomEvent("zn-toolbar-overflow-updated",{bubbles:!0,composed:!0}))}populateOverflowMenu(t){let r=this._overflowMenu;if(!r)return;this.restoreMovedContent(),r.innerHTML="";let n=(h,m,f,b,g={})=>{let v=document.createElement("zn-menu-item");if(v.innerText=m,Object.keys(g).forEach(x=>v.setAttribute(x,g[x])),f){let x=document.createElement("zn-icon");x.setAttribute("src",f),x.setAttribute("size","18"),x.setAttribute("slot","prefix"),v.appendChild(x)}return b&&v.addEventListener("click",x=>{x.preventDefault(),x.stopPropagation(),b()}),h.appendChild(v),v},a=h=>{let m=document.createElement("zn-menu-item");for(let f of h.attributes)f.name!=="id"&&m.setAttribute(f.name,f.value);return m.innerHTML=h.innerHTML,m},s=h=>{let f=h.querySelector('zn-button[slot="trigger"]')?.querySelector("zn-icon"),b=f?.getAttribute("src");if(!b)return b??void 0;let g=f?.getAttribute("library");return g?`${b}@${g}`:b},l={bold:"Bold",italic:"Italic",underline:"Underline",undo:"Undo",redo:"Redo"},d={"toolbar__header-dropdown":"Text","toolbar__format-dropdown":"Format","toolbar__color-dropdown":"Color","toolbar__list-dropdown":"Lists","toolbar__file-dropdown":"Insert","toolbar__emoji-dropdown":"Emoji","toolbar__date-dropdown":"Date"};t.forEach(h=>{if(Array.from(h.querySelectorAll("zn-dropdown")).forEach(g=>{let v="";for(let j in d)if(g.classList.contains(j)){v=d[j];break}v||(v=g.getAttribute("aria-label")||g.getAttribute("title")||"More");let x=s(g)||"",k=n(r,v,x);g.classList.contains("toolbar__date-dropdown")&&k.setAttribute("data-overflow-source","date");let _=document.createElement("zn-menu");_.setAttribute("slot","submenu"),_.setAttribute("variant","shell");let O=g.querySelectorAll("zn-menu-item");if(O.length)O.forEach(j=>{let I=a(j);_.appendChild(I)});else{let j=Array.from(g.children).filter(w=>{let T=w.getAttribute("slot")==="trigger"||w instanceof Tt,L=w instanceof Po||w instanceof Ln;return!T&&!L}),I=document.createElement("div");I.className="toolbar__submenu-content",j.forEach(w=>this.moveContentTo(w,I)),_.appendChild(I)}k.appendChild(_)}),h.querySelectorAll("zn-button.toolbar__format-button, zn-button.toolbar__action-button").forEach(g=>{let v=g.getAttribute("icon")??"",x=g.getAttribute("data-format")??"",k=g.getAttribute("data-text")??l[x]??(x?x.charAt(0).toUpperCase()+x.slice(1):g.getAttribute("aria-label")??g.textContent?.trim()??"Action"),_={"data-format":x},O=g.getAttribute("data-format-type")??"";O&&(_["data-format-type"]=O),v&&(_["data-icon"]=v),k&&(_["data-text"]=k),n(r,k,v,void 0,_)}),Array.from(h.querySelectorAll("zn-menu-item")).filter(g=>!g.closest("zn-dropdown")).forEach(g=>{let v=a(g);r.appendChild(v)}),h.querySelector("slot")){let g=h.querySelector("slot"),v=g?g.assignedElements({flatten:!0}):[];if(!v.length)return;v.forEach(x=>{if(x instanceof Jl){let k=x.icon,_=x.label,O=x.handler||"dialog",j=x.uri||"",I=x.key||"",w={"data-format":O};j&&(w["data-format-type"]=j),I&&(w["data-toolbar-key"]=I),k&&(w["data-icon"]=k),_&&(w["data-text"]=_),n(r,_,k,void 0,w)}})}})}render(){let t=this._featureConfig.dividersEnabled||this._featureConfig.linksEnabled||this._featureConfig.attachmentsEnabled||this._featureConfig.imagesEnabled||this._featureConfig.videosEnabled,r=t||this._featureConfig.datesEnabled||this._featureConfig.emojisEnabled;return u`
2689
+ <zn-ai-tooltip></zn-ai-tooltip>`;return le(o)}_createPanelComponent(){let o=u`
2690
+ <zn-ai-panel></zn-ai-panel>`;return le(o)}_replaceTooltip(o){o.preventDefault(),o.stopPropagation(),this._component.remove();let t=this._createPanelComponent();t&&(this._component=t,this._component.requestUpdate(),this._attachPanelEvents(t),this._quill.container.ownerDocument.body.appendChild(this._component),this._show(),this._positionComponent())}_onDocumentClick(o){let t=o.composedPath?o.composedPath():[o.target],r=t.includes(this._component)||t.includes(this._component.shadowRoot),n=this._quill.root.contains(t[0]),a=t.some(s=>s instanceof HTMLElement?s.tagName==="ZN-AI-PANEL":!1);if(this._latestContent(null)&&!a){o.preventDefault(),o.stopPropagation();return}!r&&!n&&!a&&this.resetComponent()}_updateFromEditor(o){this._component instanceof Ko||(o?.length>25?(this._selectedText=this._quill.getText(o.index,o.length),this._show(),this._positionComponent()):this.resetComponent())}_positionComponent(){if(!this._component||!this._component.open)return;let o=this._quill.getSelection();if(!o)return;if(this._component instanceof $i){let r=this._quill.container.getBoundingClientRect(),n=o.index+o.length,a=this._quill.getBounds(n);if(!a)return;let s=r.left+a.left-10,l=r.top+a.bottom+4;this._component.style.left=`${Math.max(0,s)}px`,this._component.style.top=`${l}px`;return}requestAnimationFrame(()=>{let r=this._quill.container.getBoundingClientRect(),n;if(o.length===this._quill.getLength()-1)n=this._quill.getBounds(o.index,o.length);else{let l=o.index+o.length;n=this._quill.getBounds(l)}if(!n)return;let a=r.left+n.right,s=r.top+n.top-8;if(a>window.innerWidth){this._setPanelPosition(window.innerWidth-10,s);return}this._setPanelPosition(a,s)})}_setPanelPosition(o,t){this._component.style.right=`${Math.max(0,window.innerWidth-o)}px`,this._component.style.bottom=`${Math.max(0,window.innerHeight-t)}px`}resetComponent(){this._hide(),this._component.remove(),this._initComponent()}_show(){this._component.open||(this._component.show(),this._quill.container.ownerDocument.addEventListener("click",o=>this._onDocumentClick(o)),this._quill.container.ownerDocument.addEventListener("keydown",this._onEscapeKey))}_hide(){this._component.hide(),this._quill.container.ownerDocument.removeEventListener("click",o=>this._onDocumentClick(o)),this._quill.container.ownerDocument.removeEventListener("keydown",this._onEscapeKey)}_attachPanelEvents(o){o.refine=this._enterCustomPrompt.bind(this),o.refineBuiltIn=this._clickPreDefinedEvent.bind(this)}_clickPreDefinedEvent(o){if(o instanceof PointerEvent){let t=o.target;if(this._prompt=t.getAttribute("data-ai-option")||"",this._prompt===""){for(let r of o.composedPath())if(r instanceof HTMLElement&&(this._prompt=r.getAttribute("data-ai-option")||"",this._prompt))break}this.processAIRequest().then(r=>r)}}_enterCustomPrompt(o){this._prompt=o,this.processAIRequest().then(t=>t)}},Bw=Im;var rc=class{constructor(o,t){this._quill=o,this._options=t,this._quill.on("editor-change",this._updateStartTime.bind(this)),this._updateOpenTime()}_updateOpenTime(){this._options.openTimeInput&&!this._openTime&&(this._openTime=Math.floor(new Date().getTime()/1e3),this._options.openTimeInput.value=this._openTime.toString())}_updateStartTime(){this._options.startTimeInput&&!this._startTime&&(this._startTime=Math.floor(new Date().getTime()/1e3),this._options.startTimeInput.value=this._startTime.toString())}};var Nm=["Red","Blue","Orange","Yellow","Indigo","Violet","Green","Pink","Gray"],vp={getName:"color",getData:Object.entries(Nm).map(([,i])=>({key:i.toLowerCase(),value:i,prefix:u`<div class="color-icon color-icon--${i.toLowerCase()}"></div>`}))};var Vw=A`@charset "UTF-8";:root,[t=light],.theme-light{color-scheme:light;--zn-color-gray-100:hsl(240,13%,95%);--zn-color-gray-300:hsl(260,21%,89%);--zn-color-gray-400:hsl(251,17%,76%);--zn-color-gray-500:hsl(254,17%,66%);--zn-color-gray-800:hsl(259,13%,42%);--zn-color-gray-900:hsl(262,12%,35%);--zn-color-red-500:hsl(0 84.2% 60.2%);--zn-color-red-600:hsl(0 72.2% 50.6%);--zn-color-orange-500:hsl(24.6 95% 53.1%);--zn-color-amber-400:hsl(43.3 96.4% 56.3%);--zn-color-yellow-400:hsl(51,100%,53%);--zn-color-green-500:hsl(142.1 70.6% 45.3%);--zn-color-blue-500:hsl(217.2 91.2% 59.8%);--zn-color-indigo-400:hsl(234.5 89.5% 73.9%);--zn-color-indigo-500:hsl(238.7 83.5% 66.7%);--zn-color-violet-500:hsl(258.3 89.5% 66.3%);--zn-color-violet-600:hsl(262.1 83.3% 57.8%);--zn-color-purple-50:hsl(249,100%,97%);--zn-color-purple-100:hsl(245,100%,95%);--zn-color-purple-200:hsl(244,100%,92%);--zn-color-purple-600:hsl(256,91%,59%);--zn-color-pink-400:hsl(328.6 85.5% 70.2%);--zn-color-pink-500:hsl(330.4 81.2% 60.4%);--zn-color-primary-50:var(--zn-color-purple-50);--zn-color-primary-100:var(--zn-color-purple-100);--zn-color-primary-200:var(--zn-color-purple-200);--zn-color-primary-300:hsl(246,100%,85%);--zn-color-primary-400:hsl(249,100%,76%);--zn-color-primary-500:hsl(252,98%,66%);--zn-color-primary-600:var(--zn-color-purple-600);--zn-color-primary-700:hsl(257,76%,50%);--zn-color-primary-800:hsl(257,76%,42%);--zn-color-primary-900:hsl(257,73%,35%);--zn-color-success-50:hsl(138.5 76.5% 96.7%);--zn-color-success-200:rgb(var(--zn-green));--zn-color-success-300:hsl(141.7 76.6% 73.1%);--zn-color-success-400:hsl(141.9 69.2% 58%);--zn-color-success-500:var(--zn-color-green-500);--zn-color-success-600:hsl(142.1 76.2% 36.3%);--zn-color-success-700:hsl(142.4 71.8% 29.2%);--zn-color-warning-50:hsl(48 100% 96.1%);--zn-color-warning-400:var(--zn-color-amber-400);--zn-color-warning-500:hsl(37.7 92.1% 50.2%);--zn-color-warning-600:hsl(32.1 94.6% 43.7%);--zn-color-danger-50:hsl(0 85.7% 97.3%);--zn-color-danger-100:rgb(var(--zn-red));--zn-color-danger-200:rgb(var(--zn-red));--zn-color-danger-300:hsl(0 93.5% 81.8%);--zn-color-danger-500:var(--zn-color-red-500);--zn-color-danger-600:var(--zn-color-red-600);--zn-color-danger-700:rgb(var(--zn-red));--zn-color-danger-800:hsl(0 70% 35.3%);--zn-color-neutral-50:hsl(255,33%,98%);--zn-color-neutral-100:var(--zn-color-gray-100);--zn-color-neutral-200:hsl(255,12%,94%);--zn-color-neutral-300:var(--zn-color-gray-300);--zn-color-neutral-400:var(--zn-color-gray-400);--zn-color-neutral-500:var(--zn-color-gray-500);--zn-color-neutral-600:hsl(258,15%,58%);--zn-color-neutral-700:hsl(259,13%,54%);--zn-color-neutral-800:var(--zn-color-gray-800);--zn-color-neutral-900:var(--zn-color-gray-900);--zn-color-neutral-0:hsl(0,0%,100%);--zn-color-neutral-1000:hsl(0,0%,0%);--zn-border-radius:6px;--zn-border-radius-small:2px;--zn-border-radius-circle:50%;--zn-border-radius-pill:9999px;--zn-shadow-x-small:0 1px 4px rgba(0,0,0,0.10);--zn-shadow-small:0 3px 9px rgba(0,0,0,0.15);--zn-shadow-medium:0 6px 18px rgba(0,0,0,0.15);--zn-shadow-large:0 6px 20px rgba(0,0,0,0.15);--zn-shadow-x-large:0 6px 20px rgba(0,0,0,0.25);--zn-container:var(--zn-container-hd);--zn-container-default:100%;--zn-container-sm:360px;--zn-container-smp:480px;--zn-container-ph:600px;--zn-container-md:768px;--zn-container-lg:1100px;--zn-container-hd:1400px;--zn-container-3k:1960px;--zn-container-4k:2560px;--zn-transition-x-slow:1000ms;--zn-transition-slow:500ms;--zn-transition-medium:250ms;--zn-transition-fast:150ms;--zn-transition-x-fast:50ms;--zn-gap:var(--zn-base-gap,var(--zn-spacing-medium,4px));--zn-font-mono:'Roboto Mono',SFMono-Regular,Consolas,'Liberation Mono',Menlo,monospace;--zn-font-sans:'Inter',-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif,'Apple Color Emoji','Segoe UI Emoji','Segoe UI Symbol';--zn-font-serif:'Roboto Slab',Georgia,'Times New Roman',serif;--zn-font-size-2x-small:0.625rem;--zn-font-size-x-small:0.75rem;--zn-font-size-small:0.929rem;--zn-font-size-medium:1rem;--zn-font-size-large:1.15rem;--zn-font-size-x-large:1.25rem;--zn-font-size-2x-large:2.25rem;--zn-font-size-3x-large:3rem;--zn-font-size-4x-large:4.5rem;--zn-font-weight-light:300;--zn-font-weight-normal:400;--zn-font-weight-medium:500;--zn-font-weight-semibold:600;--zn-font-weight-bold:700;--zn-letter-spacing-normal:normal;--zn-letter-spacing-loose:0.5px;--zn-line-height-denser:1;--zn-line-height-dense:1.5;--zn-line-height-normal:2;--zn-line-height-loose:2.5;--zn-line-height-looser:3;--zn-focus-ring-color:var(--zn-color-primary-600);--zn-focus-ring-style:solid;--zn-focus-ring-width-x-small:1px;--zn-focus-ring-width:3px;--zn-focus-ring:var(--zn-focus-ring-style) var(--zn-focus-ring-width) var(--zn-focus-ring-color);--zn-focus-ring-offset:1px;--zn-input-height-x-small:24px;--zn-input-height-small:30px;--zn-input-height-medium:36px;--zn-input-height-large:40px;--zn-input-background-color:var(--zn-color-neutral-50);--zn-input-background-color-hover:var(--zn-color-neutral-100);--zn-input-background-color-focus:var(--zn-color-neutral-100);--zn-input-background-color-disabled:var(--zn-color-neutral-400);--zn-input-border-color:var(--zn-color-neutral-300);--zn-input-border-color-hover:var(--zn-color-neutral-400);--zn-input-border-color-focus:var(--zn-color-primary-500);--zn-input-border-color-disabled:var(--zn-color-neutral-300);--zn-input-border-width:1px;--zn-input-required-content:'*';--zn-input-required-content-offset:-2px;--zn-input-required-content-color:var(--zn-input-label-color);--zn-input-border-radius-x-small:var(--zn-border-radius);--zn-input-border-radius-small:var(--zn-border-radius);--zn-input-border-radius-medium:var(--zn-border-radius);--zn-input-border-radius-large:var(--zn-border-radius);--zn-input-font-family:var(--zn-font-sans);--zn-input-font-weight:var(--zn-text-input-content-font-weight);--zn-input-font-size-x-small:var(--zn-font-size-x-small);--zn-input-font-size-small:var(--zn-font-size-small);--zn-input-font-size-medium:var(--zn-text-input-content-font-size);--zn-input-font-size-large:var(--zn-font-size-large);--zn-input-line-height:var(--zn-text-input-content-line-height);--zn-input-letter-spacing:var(--zn-letter-spacing-normal);--zn-input-color:var(--zn-text-input-content-color);--zn-input-color-hover:var(--zn-color-neutral-800);--zn-input-color-focus:var(--zn-color-neutral-700);--zn-input-color-disabled:var(--zn-color-neutral-800);--zn-input-icon-color:var(--zn-color-neutral-500);--zn-input-icon-color-hover:var(--zn-color-neutral-600);--zn-input-icon-color-focus:var(--zn-color-neutral-600);--zn-input-placeholder-color:var(--zn-text-input-placeholder-color);--zn-input-placeholder-color-disabled:var(--zn-color-neutral-600);--zn-input-spacing-small:var(--zn-spacing-small);--zn-input-spacing-medium:var(--zn-spacing-medium);--zn-input-spacing-large:var(--zn-spacing-large);--zn-input-focus-ring-color:hsl(256 91% 59%/40%);--zn-input-focus-ring-offset:0;--zn-input-label-font-size-small:var(--zn-font-size-small);--zn-input-label-font-size-medium:var(--zn-text-input-label-font-size);--zn-input-label-font-size-large:var(--zn-font-size-large);--zn-input-label-font-weight:var(--zn-text-input-label-font-weight);--zn-input-label-line-height:var(--zn-text-input-label-line-height);--zn-input-label-color:var(--zn-text-input-label-color);--zn-input-help-text-font-size-small:var(--zn-font-size-x-small);--zn-input-help-text-font-size-medium:var(--zn-font-size-small);--zn-input-help-text-font-size-large:var(--zn-font-size-medium);--zn-input-help-text-color:var(--zn-color-neutral-500);--zn-toggle-size-small:0.875rem;--zn-toggle-size-medium:1.125rem;--zn-toggle-size-large:1.375rem;--zn-overlay-background-color:hsl(none 0% 0%/0.7);--zn-panel-background-color:var(--zn-color-neutral-0);--zn-panel-border-color:var(--zn-color-neutral-200);--zn-panel-border-width:1px;--zn-tooltip-border-radius:var(--zn-border-radius);--zn-tooltip-background-color:var(--zn-color-neutral-900);--zn-tooltip-color:var(--zn-color-neutral-0);--zn-tooltip-font-family:var(--zn-font-sans);--zn-tooltip-font-weight:var(--zn-font-weight-normal);--zn-tooltip-font-size:var(--zn-font-size-small);--zn-tooltip-line-height:var(--zn-line-height-dense);--zn-tooltip-padding:var(--zn-spacing-x-small) var(--zn-spacing-small);--zn-tooltip-arrow-size:6px;--zn-z-index-page-nav:500;--zn-z-index-drawer:700;--zn-z-index-dialog:800;--zn-z-index-dropdown:900;--zn-z-index-toast:950;--zn-z-index-tooltip:1000;--zn-z-index-editor-action:1000000;--zn-table-header-background-color:252,251,254}[t=dark],.theme-dark{color-scheme:dark;--zn-color-gray-50:hsl(258,15%,23%);--zn-color-gray-100:hsl(262,12%,35%);--zn-color-gray-200:hsl(259,13%,42%);--zn-color-gray-300:hsl(259,13%,54%);--zn-color-gray-400:hsl(258,15%,58%);--zn-color-gray-500:hsl(254,17%,66%);--zn-color-gray-600:hsl(251,17%,76%);--zn-color-gray-700:hsl(260,21%,89%);--zn-color-gray-800:hsl(255,12%,94%);--zn-color-gray-900:hsl(240,13%,95%);--zn-color-gray-950:hsl(255,33%,98%);--zn-color-red-50:hsl(0 56% 23.9%);--zn-color-red-100:hsl(0.6 60% 33.9%);--zn-color-red-200:hsl(0.9 67.2% 37.1%);--zn-color-red-300:hsl(1.1 71.3% 43.7%);--zn-color-red-400:hsl(1 76% 52.5%);--zn-color-red-500:hsl(0.7 89.6% 57.2%);--zn-color-red-600:hsl(0 98.6% 67.9%);--zn-color-red-700:hsl(0 100% 72.3%);--zn-color-red-800:hsl(0 100% 85.6%);--zn-color-red-900:hsl(0 100% 90.3%);--zn-color-red-950:hsl(0 100% 95.9%);--zn-color-orange-50:hsl(15 64.2% 23.3%);--zn-color-orange-100:hsl(15.1 70.9% 31.1%);--zn-color-orange-200:hsl(15.3 75.7% 35.5%);--zn-color-orange-300:hsl(17.1 83.5% 42.7%);--zn-color-orange-400:hsl(20.1 88% 50.8%);--zn-color-orange-500:hsl(24.3 100% 50.5%);--zn-color-orange-600:hsl(27.2 100% 57.7%);--zn-color-orange-700:hsl(31.3 100% 68.7%);--zn-color-orange-800:hsl(33.8 100% 79.3%);--zn-color-orange-900:hsl(38.9 100% 87.7%);--zn-color-orange-950:hsl(46.2 100% 95%);--zn-color-amber-50:hsl(21.9 66.3% 21.1%);--zn-color-amber-100:hsl(21.5 73.6% 29.7%);--zn-color-amber-200:hsl(22.3 77.6% 33.3%);--zn-color-amber-300:hsl(25.4 84.2% 39.6%);--zn-color-amber-400:hsl(31.4 87.4% 46.7%);--zn-color-amber-500:hsl(37 96.6% 48.3%);--zn-color-amber-600:hsl(43.3 100% 53.4%);--zn-color-amber-700:hsl(46.5 100% 61.1%);--zn-color-amber-800:hsl(49.3 100% 73%);--zn-color-amber-900:hsl(51.8 100% 85%);--zn-color-amber-950:hsl(60 100% 94.6%);--zn-color-yellow-50:hsl(34,86%,14%);--zn-color-yellow-100:hsl(36,74%,26%);--zn-color-yellow-200:hsl(40,82%,29%);--zn-color-yellow-300:hsl(43,94%,33%);--zn-color-yellow-400:hsl(48,98%,40%);--zn-color-yellow-500:hsl(53,95%,47%);--zn-color-yellow-600:hsl(51,100%,53%);--zn-color-yellow-700:hsl(54,100%,63%);--zn-color-yellow-800:hsl(61,100%,77%);--zn-color-yellow-900:hsl(63,100%,88%);--zn-color-yellow-950:hsl(63,92%,95%);--zn-color-lime-50:hsl(86.5 54.4% 18%);--zn-color-lime-100:hsl(87.6 56.8% 23.3%);--zn-color-lime-200:hsl(85.8 63.2% 24.5%);--zn-color-lime-300:hsl(86.1 72% 29.4%);--zn-color-lime-400:hsl(85.5 76.8% 37.3%);--zn-color-lime-500:hsl(84.3 74.2% 42.1%);--zn-color-lime-600:hsl(82.8 81.5% 52.6%);--zn-color-lime-700:hsl(82 89.9% 64%);--zn-color-lime-800:hsl(80.9 97.9% 76.6%);--zn-color-lime-900:hsl(77.9 100% 85.8%);--zn-color-lime-950:hsl(69.5 100% 93.8%);--zn-color-green-50:hsl(144.3 53.6% 16%);--zn-color-green-100:hsl(143.2 55.4% 23.5%);--zn-color-green-200:hsl(141.5 58.2% 26.3%);--zn-color-green-300:hsl(140.8 64.2% 31.8%);--zn-color-green-400:hsl(140.3 68% 39.2%);--zn-color-green-500:hsl(141.1 64.9% 43%);--zn-color-green-600:hsl(141.6 72.4% 55.2%);--zn-color-green-700:hsl(141.7 82.7% 70.1%);--zn-color-green-800:hsl(141 90.9% 82.1%);--zn-color-green-900:hsl(142 100% 89.1%);--zn-color-green-950:hsl(144 100% 95.5%);--zn-color-emerald-50:hsl(164.3 75% 13.5%);--zn-color-emerald-100:hsl(163.5 72.6% 20.1%);--zn-color-emerald-200:hsl(162.1 73.7% 22.4%);--zn-color-emerald-300:hsl(161.3 77.3% 27.6%);--zn-color-emerald-400:hsl(159.6 77.1% 34.3%);--zn-color-emerald-500:hsl(159.1 73.5% 37.9%);--zn-color-emerald-600:hsl(157.8 66.8% 48.9%);--zn-color-emerald-700:hsl(156.2 76.1% 63.8%);--zn-color-emerald-800:hsl(152.4 84.4% 77.4%);--zn-color-emerald-900:hsl(149.3 100% 87%);--zn-color-emerald-950:hsl(158.6 100% 94.8%);--zn-color-teal-50:hsl(176.5 51.5% 15.4%);--zn-color-teal-100:hsl(175.9 54.7% 22.3%);--zn-color-teal-200:hsl(175.9 60.7% 23.9%);--zn-color-teal-300:hsl(174.5 67.3% 28.8%);--zn-color-teal-400:hsl(174.4 71.9% 34.9%);--zn-color-teal-500:hsl(173.1 71% 38.3%);--zn-color-teal-600:hsl(172.3 68.2% 48.1%);--zn-color-teal-700:hsl(170.5 81.3% 61.5%);--zn-color-teal-800:hsl(168.4 92.1% 75.2%);--zn-color-teal-900:hsl(168.3 100% 86%);--zn-color-teal-950:hsl(180 100% 95.5%);--zn-color-cyan-50:hsl(197.1 53.8% 20.3%);--zn-color-cyan-100:hsl(196.8 57.3% 27.2%);--zn-color-cyan-200:hsl(195.3 62.7% 29.4%);--zn-color-cyan-300:hsl(193.5 71.3% 34.1%);--zn-color-cyan-400:hsl(192.5 76.8% 40.6%);--zn-color-cyan-500:hsl(189.4 78.6% 42.6%);--zn-color-cyan-600:hsl(188.2 89.1% 51.7%);--zn-color-cyan-700:hsl(187 98.6% 66.2%);--zn-color-cyan-800:hsl(184.9 100% 78.3%);--zn-color-cyan-900:hsl(180 100% 86.6%);--zn-color-cyan-950:hsl(180 100% 94.8%);--zn-color-sky-50:hsl(203 63.8% 20.9%);--zn-color-sky-100:hsl(203.4 70.4% 28%);--zn-color-sky-200:hsl(202.7 75.8% 30.8%);--zn-color-sky-300:hsl(203.1 80.4% 36.1%);--zn-color-sky-400:hsl(202.1 80.5% 44.3%);--zn-color-sky-500:hsl(199.7 85.9% 47.7%);--zn-color-sky-600:hsl(198.7 97.9% 57.2%);--zn-color-sky-700:hsl(198.7 100% 70.5%);--zn-color-sky-800:hsl(198.8 100% 82.5%);--zn-color-sky-900:hsl(198.5 100% 89.9%);--zn-color-sky-950:hsl(186 100% 95.5%);--zn-color-blue-50:hsl(227.1 49.5% 22.7%);--zn-color-blue-100:hsl(225.8 58.9% 36.8%);--zn-color-blue-200:hsl(227.7 64.4% 42.9%);--zn-color-blue-300:hsl(226.1 72.7% 51.2%);--zn-color-blue-400:hsl(222.6 86.5% 56.3%);--zn-color-blue-500:hsl(217.8 95.8% 57.4%);--zn-color-blue-600:hsl(213.3 100% 65%);--zn-color-blue-700:hsl(210.9 100% 74.8%);--zn-color-blue-800:hsl(211.5 100% 83.4%);--zn-color-blue-900:hsl(211 100% 88.9%);--zn-color-blue-950:hsl(201.8 100% 95.3%);--zn-color-indigo-50:hsl(243.5 40.8% 27%);--zn-color-indigo-100:hsl(242.9 45.7% 37.6%);--zn-color-indigo-200:hsl(244.7 52.7% 43.1%);--zn-color-indigo-300:hsl(245.3 60.5% 52.4%);--zn-color-indigo-400:hsl(244.1 79.2% 60.4%);--zn-color-indigo-500:hsl(239.6 88.7% 63.8%);--zn-color-indigo-600:hsl(234.5 96.7% 70.9%);--zn-color-indigo-700:hsl(229.4 100% 78.3%);--zn-color-indigo-800:hsl(227.1 100% 85%);--zn-color-indigo-900:hsl(223.8 100% 89.9%);--zn-color-indigo-950:hsl(220 100% 95.1%);--zn-color-violet-50:hsl(265.1 57.3% 25.4%);--zn-color-violet-100:hsl(263.5 63.8% 39.4%);--zn-color-violet-200:hsl(263.4 66.2% 44.1%);--zn-color-violet-300:hsl(263.7 72.8% 52.4%);--zn-color-violet-400:hsl(262.5 87.3% 59.8%);--zn-color-violet-500:hsl(258.3 95.1% 63.2%);--zn-color-violet-600:hsl(255.1 100% 67.2%);--zn-color-violet-700:hsl(253 100% 81.5%);--zn-color-violet-800:hsl(251.7 100% 87.9%);--zn-color-violet-900:hsl(254.1 100% 91.7%);--zn-color-violet-950:hsl(257.1 100% 96.1%);--zn-color-purple-50:hsl(255,79%,23%);--zn-color-purple-100:hsl(257,73%,35%);--zn-color-purple-200:hsl(257,76%,42%);--zn-color-purple-300:hsl(257,76%,50%);--zn-color-purple-400:hsl(256,91%,59%);--zn-color-purple-500:hsl(252,98%,66%);--zn-color-purple-600:hsl(249,100%,76%);--zn-color-purple-700:hsl(246,100%,85%);--zn-color-purple-800:hsl(244,100%,92%);--zn-color-purple-900:hsl(245,100%,95%);--zn-color-purple-950:hsl(249,100%,97%);--zn-color-fuchsia-50:hsl(297.1 51.2% 18.6%);--zn-color-fuchsia-100:hsl(296.7 59.5% 31.5%);--zn-color-fuchsia-200:hsl(295.4 65.4% 35.1%);--zn-color-fuchsia-300:hsl(294.6 67.4% 42.2%);--zn-color-fuchsia-400:hsl(293.3 68.7% 51.2%);--zn-color-fuchsia-500:hsl(292.1 88.4% 57.7%);--zn-color-fuchsia-600:hsl(292 98.5% 59.5%);--zn-color-fuchsia-700:hsl(292.4 100% 79.5%);--zn-color-fuchsia-800:hsl(292.9 100% 86.8%);--zn-color-fuchsia-900:hsl(300 100% 91.5%);--zn-color-fuchsia-950:hsl(300 100% 96.3%);--zn-color-pink-50:hsl(336.2 59.6% 20%);--zn-color-pink-100:hsl(336.8 63.9% 34%);--zn-color-pink-200:hsl(336.8 68.7% 37.6%);--zn-color-pink-300:hsl(336.1 71.8% 44.5%);--zn-color-pink-400:hsl(333.9 74.9% 53.1%);--zn-color-pink-500:hsl(330.7 86.3% 57.7%);--zn-color-pink-600:hsl(328.6 91.5% 67.2%);--zn-color-pink-700:hsl(327.4 97.6% 78.7%);--zn-color-pink-800:hsl(325.1 100% 86.6%);--zn-color-pink-900:hsl(322.1 100% 91.3%);--zn-color-pink-950:hsl(315 100% 95.9%);--zn-color-rose-50:hsl(342.3 62.9% 21.5%);--zn-color-rose-100:hsl(342.8 68.9% 34.2%);--zn-color-rose-200:hsl(344.8 72.6% 37.3%);--zn-color-rose-300:hsl(346.9 75.8% 43.7%);--zn-color-rose-400:hsl(348.2 80.1% 52.7%);--zn-color-rose-500:hsl(350.4 94.8% 57.5%);--zn-color-rose-600:hsl(351.2 100% 58.1%);--zn-color-rose-700:hsl(352.3 100% 78.1%);--zn-color-rose-800:hsl(352 100% 86.2%);--zn-color-rose-900:hsl(354.5 100% 90.7%);--zn-color-rose-950:hsl(353.3 100% 95.7%);--zn-color-neutral-0:hsl(0,0%,0%);--zn-color-neutral-1000:hsl(0,0%,100%);--zn-shadow-x-small:0 1px 4px rgba(0,0,0,0.18);--zn-shadow-small:0 3px 9px rgba(0,0,0,0.24);--zn-shadow-medium:0 6px 18px rgba(0,0,0,0.24);--zn-shadow-large:0 6px 20px rgba(0,0,0,0.24);--zn-shadow-x-large:0 6px 20px rgba(0,0,0,0.34);--zn-input-background-color:rgb(var(--zn-color-body));--zn-input-background-color-hover:rgb(var(--zn-color-body));--zn-input-background-color-focus:hsl(252,15%,13%);--zn-input-background-color-disabled:hsl(280,6%,9%);--zn-input-border-color:rgb(var(--zn-color-border));--zn-input-border-color-hover:rgb(var(--zn-color-border-active));--zn-input-border-color-focus:var(--zn-color-primary-500);--zn-input-border-color-disabled:hsl(280,6%,9%);--zn-focus-ring-color:var(--zn-color-primary-700);--zn-overlay-background-color:hsl(0 0% 0%/43%);--zn-panel-background-color:rgb(var(--zn-panel));--zn-tooltip-background-color:var(--zn-color-neutral-800);--zn-table-header-background-color:27,27,30}:root{--zn-spacing-unit:8px;--zn-spacing-3x-small:2px;--zn-spacing-2x-small:4px;--zn-spacing-x-small:8px;--zn-spacing-small:16px;--zn-spacing-medium:24px;--zn-spacing-large:32px;--zn-spacing-x-large:40px;--zn-spacing-2x-large:48px;--zn-spacing-3x-large:56px;--zn-spacing-4x-large:72px;--zn-spacing-narrow-bar:45px;--zn-spacing-bar:60px;--zn-spacing-tile:80px;--zn-spacing-sidenav:320px;--zn-spacing-small-panel:200px;--zn-spacing-medium-panel:320px;--zn-spacing-panel:360px;--zn-spacing-lside:460px}:root{--zn-text-color:rgb(var(--zn-color-text));--zn-text-color-muted:rgb(var(--zn-color-muted-text));--zn-text-paragraph-font-size:14px;--zn-text-paragraph-line-height:21px;--zn-text-paragraph-spacing:21px;--zn-text-paragraph-font-weight:var(--zn-font-weight-normal);--zn-text-paragraph-color:var(--zn-text-color);--zn-text-paragraph-transform:none;--zn-text-table-content-font-size:14px;--zn-text-table-content-line-height:16px;--zn-text-table-content-spacing:15px;--zn-text-table-content-font-weight:var(--zn-font-weight-normal);--zn-text-table-content-color:var(--zn-text-color);--zn-text-table-content-transform:none;--zn-text-chat-font-size:16px;--zn-text-chat-line-height:24px;--zn-text-chat-spacing:15px;--zn-text-chat-font-weight:var(--zn-font-weight-normal);--zn-text-chat-color:var(--zn-text-color);--zn-text-chat-transform:none;--zn-text-h1-font-size:16px;--zn-text-h1-line-height:16px;--zn-text-h1-spacing:18px;--zn-text-h1-font-weight:var(--zn-font-weight-semibold);--zn-text-h1-color:var(--zn-text-color);--zn-text-h1-transform:none;--zn-text-h2-font-size:14px;--zn-text-h2-line-height:16px;--zn-text-h2-spacing:15px;--zn-text-h2-font-weight:var(--zn-font-weight-semibold);--zn-text-h2-color:var(--zn-text-color);--zn-text-h2-transform:none;--zn-text-h3-font-size:11px;--zn-text-h3-line-height:16px;--zn-text-h3-spacing:15px;--zn-text-h3-font-weight:var(--zn-font-weight-semibold);--zn-text-h3-color:var(--zn-text-color);--zn-text-h3-transform:none;--zn-text-heading-section-font-size:14px;--zn-text-heading-section-line-height:16px;--zn-text-heading-section-spacing:15px;--zn-text-heading-section-font-weight:var(--zn-font-weight-semibold);--zn-text-heading-section-color:var(--zn-text-color);--zn-text-heading-section-transform:none;--zn-text-subheading-font-size:14px;--zn-text-subheading-line-height:16px;--zn-text-subheading-spacing:15px;--zn-text-subheading-font-weight:var(--zn-font-weight-normal);--zn-text-subheading-color:var(--zn-text-color-muted);--zn-text-subheading-transform:none;--zn-text-subheading-small-font-size:13px;--zn-text-subheading-small-line-height:16px;--zn-text-subheading-small-spacing:15px;--zn-text-subheading-small-font-weight:var(--zn-font-weight-normal);--zn-text-subheading-small-color:var(--zn-text-color-muted);--zn-text-subheading-small-transform:none;--zn-text-input-placeholder-font-size:14px;--zn-text-input-placeholder-line-height:24px;--zn-text-input-placeholder-spacing:18px;--zn-text-input-placeholder-font-weight:var(--zn-font-weight-normal);--zn-text-input-placeholder-color:var(--zn-text-color-muted);--zn-text-input-placeholder-transform:none;--zn-text-input-content-font-size:14px;--zn-text-input-content-line-height:24px;--zn-text-input-content-spacing:18px;--zn-text-input-content-font-weight:var(--zn-font-weight-normal);--zn-text-input-content-color:var(--zn-text-color);--zn-text-input-content-transform:none;--zn-text-input-label-font-size:14px;--zn-text-input-label-line-height:16px;--zn-text-input-label-spacing:15px;--zn-text-input-label-font-weight:var(--zn-font-weight-semibold);--zn-text-input-label-color:var(--zn-text-color);--zn-text-input-label-transform:none;--zn-text-chart-minor-font-size:14px;--zn-text-chart-minor-line-height:16px;--zn-text-chart-minor-spacing:15px;--zn-text-chart-minor-font-weight:var(--zn-font-weight-semibold);--zn-text-chart-minor-color:var(--zn-text-color-muted);--zn-text-chart-minor-transform:none;--zn-text-chart-major-font-size:21px;--zn-text-chart-major-line-height:24px;--zn-text-chart-major-spacing:18px;--zn-text-chart-major-font-weight:var(--zn-font-weight-normal);--zn-text-chart-major-color:var(--zn-text-color);--zn-text-chart-major-transform:none;--zn-text-button-label-font-size:13px;--zn-text-button-label-line-height:16px;--zn-text-button-label-spacing:18px;--zn-text-button-label-font-weight:var(--zn-font-weight-semibold);--zn-text-button-label-color:var(--zn-text-color);--zn-text-button-label-transform:uppercase;--zn-text-chip-font-size:10px;--zn-text-chip-line-height:16px;--zn-text-chip-spacing:15px;--zn-text-chip-font-weight:var(--zn-font-weight-semibold);--zn-text-chip-color:var(--zn-text-color);--zn-text-chip-transform:uppercase;--zn-text-navbar-link-font-size:16px;--zn-text-navbar-link-line-height:16px;--zn-text-navbar-link-spacing:18px;--zn-text-navbar-link-font-weight:var(--zn-font-weight-semibold);--zn-text-navbar-link-color:var(--zn-text-color-muted);--zn-text-navbar-link-transform:none;--zn-text-tab-link-font-size:14px;--zn-text-tab-link-line-height:16px;--zn-text-tab-link-spacing:15px;--zn-text-tab-link-font-weight:var(--zn-font-weight-semibold);--zn-text-tab-link-color:var(--zn-text-color-muted);--zn-text-tab-link-transform:none;--zn-text-tab-link-active-font-size:14px;--zn-text-tab-link-active-line-height:16px;--zn-text-tab-link-active-spacing:15px;--zn-text-tab-link-active-font-weight:var(--zn-font-weight-semibold);--zn-text-tab-link-active-color:var(--zn-text-color);--zn-text-tab-link-active-transform:none;--zn-text-menu-link-font-size:14px;--zn-text-menu-link-line-height:16px;--zn-text-menu-link-spacing:15px;--zn-text-menu-link-font-weight:var(--zn-font-weight-normal);--zn-text-menu-link-color:var(--zn-text-color-muted);--zn-text-menu-link-transform:none;--zn-text-notification-font-size:9px;--zn-text-notification-line-height:11px;--zn-text-notification-spacing:0;--zn-text-notification-font-weight:var(--zn-font-weight-semibold);--zn-text-notification-color:#fff;--zn-text-notification-transform:none}@supports (scrollbar-gutter:stable){.zn-scroll-lock{scrollbar-gutter:stable !important;overflow:hidden !important}}@supports not (scrollbar-gutter:stable){.zn-scroll-lock{padding-right:var(--zn-scroll-lock-size) !important;overflow:hidden !important}}.zn-toast-stack{position:fixed;bottom:0;inset-inline-end:0;z-index:var(--zn-z-index-toast);width:28rem;max-width:100%;max-height:100%;overflow:auto}.zn-toast-stack zn-alert{margin:var(--zn-spacing-medium)}.zn-toast-stack zn-alert::part(base){box-shadow:var(--zn-shadow-large)}@media screen and (min-width:768px){.zn-toast-stack zn-alert{margin:var(--zn-spacing-large)}}.zn-gutter{margin:0 var(--zn-gutter)}.zn-gap{gap:var(--zn-gap,0);padding:var(--zn-base-gap,0);display:flex;flex-wrap:wrap}.zn-gap-in{gap:var(--zn-gap,0);display:flex;flex-wrap:wrap}.zn-gap-in-sm{--zn-gap:var(--zn-spacing-small,0);gap:var(--zn-gap,0)}.zn-gap-md{gap:24px}.zn-gap-inner{gap:var(--zn-gap,0)}.zn-gap-ism{gap:var(--zn-gap,0);--zn-gap:16px}.zn-gap-ixs{gap:var(--zn-gap,0);--zn-gap:8px}.zn-max-hide{max-height:100%;overflow:hidden}.zn-hide-empty:empty{display:none}.zn-nopoint{pointer-events:none}.form-spacing{display:grid;grid-template-columns:1fr;gap:var(--zn-spacing-medium) var(--zn-spacing-small)}@media (min-width:768px){.form-spacing{grid-template-columns:repeat(6,1fr)}}.form-spacing~.form-spacing{margin-top:var(--zn-base-gap)}zn-form-group~zn-form-group{margin-top:var(--zn-base-gap);padding-top:var(--zn-base-gap);border-top:1px solid rgb(var(--zn-border-color))}.form-spacing>*{grid-column:span 6/span 6}@media (min-width:768px){.form-spacing>*[span="1"]{grid-column:span 1/span 1}}@media (min-width:768px){.form-spacing>*[span="2"]{grid-column:span 2/span 2}}@media (min-width:768px){.form-spacing>*[span="3"]{grid-column:span 3/span 3}}@media (min-width:768px){.form-spacing>*[span="4"]{grid-column:span 4/span 4}}@media (min-width:768px){.form-spacing>*[span="5"]{grid-column:span 5/span 5}}@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:root{--zn-base-px:8px;--zn-base-gap:calc(var(--zn-base-px) * 2);--zn-gutter:2px;--zn-default-margin:0 auto 0 0;--zn-icon-size:20px;--zn-button-gutter:2px;--zn-font-family-sans:'Inter',sans-serif;--zn-font-family-serif:'Roboto Slab',serif;--zn-font-family-mono:'Roboto Mono',monospace}:root,[t=light],.theme-light{--zn-backdrop-color:rgba(0,0,0,0.5);--zn-color-text:33,33,33;--zn-color-muted-text:125,119,146;--zn-color-base:255,255,255;--zn-color-body:248,247,252;--zn-color-navigation:var(--zn-color-base);--zn-color-navigation-hightlight:248,249,252;--zn-color-border:219,217,236;--zn-color-border-active:209,207,226;--zn-color-tab:236,235,249;--zn-color-panel:255,255,255;--zn-color-primary:105,54,245;--zn-color-info:53,104,195;--zn-color-success:98,177,121;--zn-color-warning:241,168,80;--zn-color-error:236,68,91;--zn-color-disabled:181,181,181}[t=dark],.theme-dark{--zn-backdrop-color:rgba(0,0,0,0.85);--zn-color-text:215,215,215;--zn-color-muted-text:145,145,145;--zn-color-base:0,0,0;--zn-color-body:23,23,23;--zn-color-navigation:var(--zn-color-base);--zn-color-navigation-hightlight:10,10,10;--zn-color-border:38,38,38;--zn-color-border-active:80,80,80;--zn-color-tab:5,5,5;--zn-color-panel:30,30,30;--zn-color-primary:105,54,245;--zn-color-info:53,104,195;--zn-color-success:98,177,121;--zn-color-warning:241,168,80;--zn-color-error:236,68,91;--zn-color-disabled:181,181,181}@media (min-width:1200px){:root{--zn-base-gap:calc(var(--zn-base-px) * 3)}}@media (min-width:2500px){:root{--zn-default-margin:0 auto}}:root{--zn-primary:var(--zn-color-primary);--zn-red:237,84,109;--zn-blue:100,117,242;--zn-green:43,192,145;--zn-orange:255,136,0;--zn-yellow:255,193,7;--zn-indigo:63,81,181;--zn-violet:156,39,176;--zn-pink:255,108,156;--zn-grey:158,158,158;--zn-accent:71,214,214;--zn-size-bar:60px;--zn-size-tile:80px;--zn-size-sidenav:320px;--zn-size-spanel:170px;--zn-size-mpanel:320px;--zn-size-panel:360px;--zn-size-lside:460px;--zn-bg-opacity:1;--zn-text-opacity:1;--base:255,255,255;--inverse-base:0,0,0}.zn-mono{font-family:var(--zn-font-family-mono),monospace}.zn-muted{color:var(--zn-color-muted-text)}.zn-size-xs{font-size:var(--zn-font-size-x-small)}.zn-size-s{font-size:var(--zn-font-size-small)}.zn-size-l{font-size:var(--zn-font-size-large)}.zn-size-xl{font-size:var(--zn-font-size-x-large)}:root,[t=light],.theme-light,[t=dark],.theme-dark{--zn-body:var(--zn-color-body);--zn-text:var(--zn-color-text);--zn-text-heading:var(--zn-color-text);--zn-text-page-title:var(--zn-color-text);--zn-text-panel-title:var(--zn-color-text);--zn-panel:var(--zn-color-panel);--zn-border-color:var(--zn-color-border);--zn-input-bg:var(--zn-color-body)}[t=light],.theme-light{--zn-panel-opacity:1;--zn-shadow:236,235,249;--zn-panel-secondary:246 246 246;--zn-panel-highlight:248,249,252;--zn-panel-highlight-opacity:1;--zn-input-bg-accent:237,235,245;--zn-bright-bg:255,255,255;--zn-light-text:123,112,151;--zn-dark-text:56,39,104;--zn-purple-text:104,54,245}[t=light] .zn-primary,.theme-light .zn-primary{color:rgb(var(--zn-color-primary))}[t=dark],.theme-dark{--zn-shadow:10,10,10;--zn-panel-secondary:27,27,30;--zn-panel-opacity:1;--zn-panel-highlight:25,27,32;--zn-panel-highlight-opacity:0.1;--zn-input-bg-accent:72,84,102;--zn-bright-bg:225,225,225;--zn-light-text:173,163,192;--zn-dark-text:201,201,201;--zn-purple-text:129,140,249;--zn-accent:15,165,234;--zn-primary:137,103,239;--base:0,0,0;--inverse-base:255,255,255}[t=dark] .zn-primary,.theme-dark .zn-primary{color:#8967ef !important}.ml-px{margin-left:2px}.mr-px{margin-right:2px}.mt-px{margin-top:2px}.mb-px{margin-bottom:2px}.mx-px{margin-left:2px;margin-right:2px}.my-px{margin-top:2px;margin-bottom:2px}.m-px{margin:2px}.ml-xxs{margin-left:4px}.mr-xxs{margin-right:4px}.mt-xxs{margin-top:4px}.mb-xxs{margin-bottom:4px}.mx-xxs{margin-left:4px;margin-right:4px}.my-xxs{margin-top:4px;margin-bottom:4px}.m-xxs{margin:4px}.ml-xs{margin-left:8px}.mr-xs{margin-right:8px}.mt-xs{margin-top:8px}.mb-xs{margin-bottom:8px}.mx-xs{margin-left:8px;margin-right:8px}.my-xs{margin-top:8px;margin-bottom:8px}.m-xs{margin:8px}.ml-sm{margin-left:16px}.mr-sm{margin-right:16px}.mt-sm{margin-top:16px}.mb-sm{margin-bottom:16px}.mx-sm{margin-left:16px;margin-right:16px}.my-sm{margin-top:16px;margin-bottom:16px}.m-sm{margin:16px}.ml-md{margin-left:24px}.mr-md{margin-right:24px}.mt-md{margin-top:24px}.mb-md{margin-bottom:24px}.mx-md{margin-left:24px;margin-right:24px}.my-md{margin-top:24px;margin-bottom:24px}.m-md{margin:24px}.ml-lg{margin-left:32px}.mr-lg{margin-right:32px}.mt-lg{margin-top:32px}.mb-lg{margin-bottom:32px}.mx-lg{margin-left:32px;margin-right:32px}.my-lg{margin-top:32px;margin-bottom:32px}.m-lg{margin:32px}.ml-xl{margin-left:40px}.mr-xl{margin-right:40px}.mt-xl{margin-top:40px}.mb-xl{margin-bottom:40px}.mx-xl{margin-left:40px;margin-right:40px}.my-xl{margin-top:40px;margin-bottom:40px}.m-xl{margin:40px}.zn-red{color:rgb(var(--zn-red))}.zn-blue{color:rgb(var(--zn-blue))}.zn-green{color:rgb(var(--zn-green))}.zn-orange{color:rgb(var(--zn-orange))}.zn-yellow{color:rgb(var(--zn-yellow))}.zn-indigo{color:rgb(var(--zn-indigo))}.zn-violet{color:rgb(var(--zn-violet))}.zn-pink{color:rgb(var(--zn-pink))}.zn-grey{color:rgb(var(--zn-grey))}.zn-primary{color:rgb(var(--zn-primary))}.zn-accent{color:rgb(var(--zn-accent))}.zn-info{color:rgb(var(--zn-color-info))}.zn-warning{color:rgb(var(--zn-color-warning))}.zn-error{color:rgb(var(--zn-color-error))}.zn-success{color:rgb(var(--zn-color-success))}ul.gap li{margin:5px 0}ul.circle,ul.decimal,ul.disc,ul.square{padding:5px 0 5px 15px}ul.circle{list-style-type:circle}ul.decimal{list-style-type:decimal}ul.disc{list-style-type:disc}ul.square{list-style-type:square}:host,html,body{color:rgba(var(--zn-text),var(--zn-text-opacity));font-family:var(--zn-font-family-sans);font-feature-settings:normal;font-variation-settings:normal;font-size:var(--zn-text-paragraph-font-size);-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:rgba(0,0,0,0);-moz-tab-size:4;-o-tab-size:4;tab-size:4;margin:0}html,body{background-color:rgba(var(--zn-body),var(--zn-bg-opacity));container-type:size;min-height:100%;height:100%}.inline-container{container-type:inline-size}.app-container{container-type:inline-size;display:flex;flex:1;flex-direction:column;position:relative;max-height:100%;height:100%;width:100%;max-width:100%}.inline-app-container,.app-container.inline-app-container,[inline-container] .app-container{display:block;height:auto;flex:unset}hr{height:0;border:none;border-top:1px solid rgb(var(--zn-border-color))}code,kbd,samp,pre,.mono{font-family:var(--zn-font-family-mono);font-size:1em}small{font-size:80%}.hidden{display:none !important}.visibility-hidden{visibility:hidden}p{font-size:var(--zn-text-paragraph-font-size);line-height:var(--zn-text-paragraph-line-height);font-weight:var(--zn-text-paragraph-font-weight)}h1,h2,h3,h4,h5,h6{color:rgb(var(--zn-text-heading))}h1{font-size:var(--zn-text-h1-font-size);line-height:var(--zn-text-h1-line-height);font-weight:var(--zn-text-h1-font-weight)}h2{font-size:var(--zn-text-h2-font-size);line-height:var(--zn-text-h2-line-height);font-weight:var(--zn-text-h2-font-weight)}h3,h4,h5,h6{font-size:var(--zn-text-h3-font-size);line-height:var(--zn-text-h3-line-height);font-weight:var(--zn-text-h3-font-weight)}kbd{font-family:monospace;background-color:#eee;color:#333;border:1px solid rgb(var(--zn-border-color));border-radius:3px;box-shadow:0 1px 1px rgba(0,0,0,0.2),0 1px 0 0 rgba(255,255,255,0.5) inset;display:inline-block;font-size:13px;line-height:20px;padding:1px 6px;white-space:nowrap;min-width:15px;color:rgba(0,0,0,0.5)}[t=dark] kbd{background-color:rgb(25,25,25);box-shadow:0 1px 1px rgba(0,0,0,0.2),0 1px 0 0 rgba(110,110,110,0.5) inset;color:#eee}[tab]{cursor:pointer}.zn-link:hover{--zn-text:rgb(var(--zn-primary));--icon-color:rgb(var(--zn-primary));--zn-text-heading:rgb(var(--zn-primary));--property-color:rgb(var(--zn-primary));opacity:1}.grow{flex-grow:1}.no-grow{flex-grow:0}.shrink{flex-shrink:1}.no-shrink{flex-shrink:0}.block{display:block}.flex{display:flex}.flex-wrap{display:flex;flex-wrap:wrap}.flex-col{display:flex;flex-direction:column}.flex-mid{display:flex;align-items:center}.flex-jc{justify-content:center}.flex-between{display:flex;justify-content:space-between}.flex-end{display:flex;justify-content:flex-end}.flex-bottom{display:flex;align-items:flex-end}.equal{flex-basis:50%}.m-auto{margin:auto}.mt-auto{margin-top:auto}.zn-pad{padding:var(--zn-base-gap,0)}.zn-pad-y,.zn-py{padding-top:16px;padding-bottom:16px}.zn-pad-x,.zn-px{padding-left:16px;padding-right:16px}.zn-pr{padding-right:16px}.zn-pl{padding-left:16px}.zn-pt{padding-top:16px}.zn-pb{padding-bottom:16px}.zn-margin{margin:16px}.zn-mx{margin-left:16px;margin-right:16px}.zn-my{margin-top:16px;margin-bottom:16px}.zn-mt{margin-top:16px}.zn-mb{margin-bottom:16px}.zn-ml{margin-left:16px}.zn-mr{margin-right:16px}.zn-mxa{margin-left:auto;margin-right:auto}.zn-mya{margin-top:auto;margin-bottom:auto}.zn-mta{margin-top:auto}.zn-mba{margin-bottom:auto}.zn-mla{margin-left:auto}.zn-mra{margin-right:auto}.rotate-45{transform:rotate(45deg)}.rotate-90{transform:rotate(90deg)}.rotate-180{transform:rotate(180deg)}@keyframes act-vanish{from{transform:scale(1);opacity:1;max-height:100%}to{transform:scale(0.8);opacity:0;max-height:0}}.act-vanish{animation:ease-in act-vanish 600ms forwards;transform-origin:top center;background-color:rgba(var(--zn-color-error),0.3);display:block;overflow:hidden}.h-full{height:100%}.w-full{width:100%}.zn-panel-bg{--zn-page-surface-background:var(--zn-panel);background-color:rgba(var(--zn-panel),var(--zn-panel-opacity))}.zn-panel{background-color:rgba(var(--zn-panel),var(--zn-panel-opacity));border:1px solid rgb(var(--zn-border-color));border-radius:var(--zn-border-radius);--zn-page-surface-background:var(--zn-panel)}.zn-container{display:flex;flex-direction:column;flex-grow:1;max-height:100%;overflow:hidden}.tar{text-align:right}.tal{text-align:left}.tac{text-align:center}.zn-empty-hide:empty{display:none}.ml-auto{margin-left:auto}.zn-b-dash{border-style:dashed}.zn-b-dotted{border-style:dotted}.zn-border{border-style:solid;border-width:1px !important}.zn-bt{border-top-style:solid;border-top-width:1px !important}.zn-bb{border-bottom-style:solid;border-bottom-width:1px !important}.zn-bl{border-left-style:solid;border-left-width:1px !important}.zn-br{border-right-style:solid;border-right-width:1px !important}.unifi-action{display:flex;gap:10px;padding:10px 0;align-items:center}.zn-panel-bar{border-bottom:1px solid rgb(var(--zn-border-color));background-color:rgba(var(--zn-panel),0.9);padding:var(--zn-base-px);gap:var(--zn-base-px);display:flex;flex-wrap:wrap;align-items:center;z-index:1}.zn-panel-bar--pill{border-radius:var(--zn-border-radius);border:1px solid rgb(var(--zn-border-color))}.zn-panel-bar--large{padding:var(--zn-base-px) calc(var(--zn-base-gap) + var(--zn-gutter));gap:var(--zn-base-px);height:50px}.scroll-container{overflow:auto;flex-grow:1;position:relative;display:flex;flex-direction:column;max-height:100%}.zn-divide{display:flex;flex-direction:column}.zn-divide>*:not(:first-child){border-top:1px solid rgb(var(--zn-border-color))}.zn-divide>div:empty+div:not(:first-child){border-top:0}.zn-divide-y{display:flex;flex-direction:row}.zn-divide-y>*:not(:first-child):not(:empty){border-left:1px solid rgb(var(--zn-border-color))}.zn-c-pad{--zn-pad-spacing:var(--zn-spacing-large)}.zn-c-pad-x>*{padding-left:var(--zn-pad-spacing);padding-right:var(--zn-pad-spacing)}.zn-c-pad-y>*:not(:first-child){padding-top:var(--zn-pad-spacing)}.zn-c-pad-y>*:not(:last-child){padding-bottom:var(--zn-pad-spacing)}.zn-nav.zn-transparent{background:transparent}.zn-nav{background:rgba(var(--zn-panel),var(--zn-panel-opacity));border-right:1px solid rgb(var(--zn-border-color));max-width:320px;height:100%;padding-top:5px}.zn-nav ul{list-style:none;padding-bottom:10px;margin:0;display:flex;flex-direction:column;position:relative}.zn-nav ul:after{content:"";height:1px;left:18px;right:18px;bottom:0;position:absolute;background:rgb(var(--zn-border-color))}.zn-nav ul li a{text-decoration:none;color:rgb(var(--zn-text));display:block;font-weight:500;cursor:pointer}.zn-nav ul li a:hover,.zn-nav ul li a.zn-tb-active{background:rgb(var(--zn-body))}.zn-nav ul li a.zn-tb-active{color:rgb(var(--zn-purple-text))}.zn-nav ul:last-child:after{display:none}.zn-nav strong,.zn-nav li a{padding:10px 20px}.zn-nav strong{display:block;margin-top:10px;font-size:13px;letter-spacing:0.93px;color:rgb(var(--zn-text-heading));font-weight:600;padding-bottom:5px;text-transform:uppercase}@keyframes shimmer-text-sweep{0%{background-position:100% center}100%{background-position:0% center}}@media (prefers-reduced-motion:no-preference){.shimmer-text{--shimmer-base:rgb(var(--zn-text));--shimmer-highlight:rgb(var(--zn-text-heading));--shimmer-core:0.5ch;--shimmer-spread:1.5ch;--shimmer-duration:1.5s;display:inline-block;width:-moz-fit-content;width:fit-content;max-width:100%;background-image:linear-gradient(90deg,transparent calc(50% - var(--shimmer-spread)),var(--shimmer-highlight) calc(50% - var(--shimmer-core)),var(--shimmer-highlight) calc(50% + var(--shimmer-core)),transparent calc(50% + var(--shimmer-spread))),linear-gradient(var(--shimmer-base),var(--shimmer-base));background-size:250% 100%,auto;background-clip:text;-webkit-background-clip:text;-webkit-text-fill-color:transparent !important;color:transparent !important;animation:var(--shimmer-duration) linear infinite shimmer-text-sweep}.shimmer-text.zn-error{--shimmer-base:rgb(var(--zn-color-error));--shimmer-highlight:color-mix(in srgb,rgb(var(--zn-color-error)) 55%,white)}.shimmer-text.zn-success{--shimmer-base:rgb(var(--zn-color-success));--shimmer-highlight:color-mix(in srgb,rgb(var(--zn-color-success)) 55%,white)}.shimmer-text.zn-info{--shimmer-base:rgb(var(--zn-color-info));--shimmer-highlight:color-mix(in srgb,rgb(var(--zn-color-info)) 55%,white)}.shimmer-text.zn-warning{--shimmer-base:rgb(var(--zn-color-warning));--shimmer-highlight:color-mix(in srgb,rgb(var(--zn-color-warning)) 55%,white)}.shimmer-text.zn-primary{--shimmer-base:rgb(var(--zn-primary));--shimmer-highlight:color-mix(in srgb,rgb(var(--zn-primary)) 55%,white)}.shimmer-text.zn-accent{--shimmer-base:rgb(var(--zn-accent));--shimmer-highlight:color-mix(in srgb,rgb(var(--zn-accent)) 55%,white)}}@media (prefers-reduced-motion:reduce){.shimmer-text{color:rgb(var(--zn-text))}.shimmer-text.zn-error{color:rgb(var(--zn-color-error)) !important}.shimmer-text.zn-success{color:rgb(var(--zn-color-success)) !important}.shimmer-text.zn-info{color:rgb(var(--zn-color-info)) !important}.shimmer-text.zn-warning{color:rgb(var(--zn-color-warning)) !important}.shimmer-text.zn-primary{color:rgb(var(--zn-primary)) !important}.shimmer-text.zn-accent{color:rgb(var(--zn-accent)) !important}}*,*::before,*::after{box-sizing:border-box}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}a{color:inherit;text-decoration:inherit}strong{font-weight:bolder}b{font-weight:600}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:inline-block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}button,.zn-button{border-radius:var(--zn-border-radius);display:inline-flex;align-items:center;justify-content:center;padding:var(--zn-base-px);margin:auto;width:-moz-fit-content;width:fit-content;background-color:rgb(var(--zn-primary));color:rgba(255,255,255,0.9);font-size:var(--zn-text-button-label-font-size);font-weight:var(--zn-text-button-label-font-weight);line-height:var(--zn-text-button-label-line-height);text-transform:var(--zn-text-button-label-transform);cursor:pointer;vertical-align:middle;border-color:transparent;white-space:nowrap;max-height:36px;height:36px;min-height:36px}button:hover:not([disabled]),.zn-button:hover:not([disabled]){background-color:rgba(var(--zn-primary),0.8)}input[type=date],input[type=datetime-local],input[type=email],input[type=month],input[type=number],input[type=password],input[type=search],input[type=tel],input[type=text],input[type=time],input[type=url],input[type=week],input[type=file],input[list],textarea,select{display:block;width:100%;border-radius:5px;border-style:solid;border-width:1px !important;border-color:rgb(var(--zn-border-color));background-color:rgb(var(--zn-input-bg));outline:none}input[type=date]:focus,input[type=datetime-local]:focus,input[type=email]:focus,input[type=month]:focus,input[type=number]:focus,input[type=password]:focus,input[type=search]:focus,input[type=tel]:focus,input[type=text]:focus,input[type=time]:focus,input[type=url]:focus,input[type=week]:focus,input[type=file]:focus,input[list]:focus,textarea:focus,select:focus{border-color:rgb(var(--zn-primary));box-shadow:0 0 0 3px rgba(var(--zn-primary),0.3)}input[type=date]::-moz-placeholder, input[type=datetime-local]::-moz-placeholder, input[type=email]::-moz-placeholder, input[type=month]::-moz-placeholder, input[type=number]::-moz-placeholder, input[type=password]::-moz-placeholder, input[type=search]::-moz-placeholder, input[type=tel]::-moz-placeholder, input[type=text]::-moz-placeholder, input[type=time]::-moz-placeholder, input[type=url]::-moz-placeholder, input[type=week]::-moz-placeholder, input[type=file]::-moz-placeholder, input[list]::-moz-placeholder, textarea::-moz-placeholder, select::-moz-placeholder{font-weight:400;color:rgba(var(--zn-text),0.6)}input[type=date]::placeholder,input[type=datetime-local]::placeholder,input[type=email]::placeholder,input[type=month]::placeholder,input[type=number]::placeholder,input[type=password]::placeholder,input[type=search]::placeholder,input[type=tel]::placeholder,input[type=text]::placeholder,input[type=time]::placeholder,input[type=url]::placeholder,input[type=week]::placeholder,input[type=file]::placeholder,input[list]::placeholder,textarea::placeholder,select::placeholder{font-weight:400;color:rgba(var(--zn-text),0.6)}@media (min-width:360px){input[type=date],input[type=datetime-local],input[type=email],input[type=month],input[type=number],input[type=password],input[type=search],input[type=tel],input[type=text],input[type=time],input[type=url],input[type=week],input[type=file],input[list],textarea,select{padding:8px}}label{font-weight:600;font-size:rgb(var(--zn-font-size-medium));line-height:var(--zn-spacing-medium);color:rgb(var(--zn-text-heading));display:block;margin-bottom:4px;margin-top:16px}input[type=checkbox],input[type=radio]{border-radius:5px}input[type=radio]{border-radius:50%}input[type=range]{-webkit-appearance:none;-moz-appearance:none;appearance:none;border-radius:10px;background-color:rgb(var(--zn-border-color));height:8px;accent-color:rgb(var(--zn-primary));width:100%;max-width:768px}fieldset{border-color:rgba(var(--zn-primary),20%);border-width:2px;padding:0 16px 16px}select option{padding:4px}select>option:checked{background-color:rgba(var(--zn-primary),20%);border-radius:5px}fieldset>legend{padding:4px}input[type=button],input[type=submit],button[type=submit]:not(.button),button[type=button]:not(.button){border-radius:var(--zn-border-radius);display:inline-flex;align-items:center;justify-content:center;padding:var(--zn-base-px);margin:auto;width:-moz-fit-content;width:fit-content;background-color:rgb(var(--zn-primary));color:rgba(255,255,255,0.9);font-size:var(--zn-text-button-label-font-size);font-weight:var(--zn-text-button-label-font-weight);line-height:var(--zn-text-button-label-line-height);text-transform:var(--zn-text-button-label-transform);cursor:pointer;vertical-align:middle;border-color:transparent;white-space:nowrap;max-height:36px;height:36px;min-height:36px}input[type=button]:hover:not([disabled]),input[type=submit]:hover:not([disabled]),button[type=submit]:not(.button):hover:not([disabled]),button[type=button]:not(.button):hover:not([disabled]){background-color:rgba(var(--zn-primary),0.8)}input[type=button],input[type=submit],button[type=submit]:not(.button),button[type=button]:not(.button){width:auto}div+button{margin-top:16px}input[type=file]::-webkit-file-upload-button{border-radius:var(--zn-border-radius);display:inline-flex;align-items:center;justify-content:center;padding:var(--zn-base-px);margin:auto;width:fit-content;background-color:rgb(var(--zn-primary));color:rgba(255,255,255,0.9);font-size:var(--zn-text-button-label-font-size);font-weight:var(--zn-text-button-label-font-weight);line-height:var(--zn-text-button-label-line-height);text-transform:var(--zn-text-button-label-transform);cursor:pointer;vertical-align:middle;border-color:transparent;white-space:nowrap;max-height:36px;height:36px;min-height:36px}input[type=file]::-webkit-file-upload-button:hover:not([disabled]){background-color:rgba(var(--zn-primary),0.8)}input[type=file]::-webkit-file-upload-button{margin-right:8px}input::-webkit-calendar-picker-indicator{cursor:pointer;padding:8px}input[list]::-webkit-calendar-picker-indicator{padding:8px 4px}.input--with-icon{position:relative}.input--with-icon zn-icon{padding:14px;position:absolute;top:50%;pointer-events:none;transform:translateY(-50%);left:8px;background-color:rgb(var(--zn-primary));color:rgb(var(--zn-text));border-radius:50%}.input--with-icon input{padding-left:40px}input:-webkit-autofill,input:-webkit-autofill:hover,input:-webkit-autofill:focus,input:-webkit-autofill:active{-webkit-background-clip:text;-webkit-text-fill-color:rgb(var(--zn-text));-webkit-transition:background-color 5000s ease-in-out 0s;transition:background-color 5000s ease-in-out 0s;box-shadow:inset 0 0 20px 20px rgba(35,35,35,0.1607843137)}select{height:43px}.no-border{border:none !important}table:not(.remarkd-table){border-collapse:separate !important;border-spacing:0;width:100%;max-width:100%;table-layout:auto;text-align:left;font-family:var(--zn-font-sans);font-size:var(--zn-text-table-content-font-size);font-weight:var(--zn-text-table-content-font-weight);line-height:var(--zn-text-table-content-line-height);color:var(--zn-text-table-content-color);text-transform:var(--zn-text-table-content-transform)}table:not(.remarkd-table) thead{font-weight:var(--zn-font-weight-medium)}table:not(.remarkd-table) thead tr th{background-color:rgb(var(--zn-table-header-background-color))}table:not(.remarkd-table) tbody a{cursor:pointer;color:rgb(var(--zn-primary))}table:not(.remarkd-table) tbody tr td{border-top:1px solid rgb(var(--zn-border-color)) !important}table:not(.remarkd-table) tbody tr:first-of-type td{border-top:0 !important}table:not(.remarkd-table) th,table:not(.remarkd-table) td{padding:var(--zn-spacing-small) var(--zn-spacing-medium);min-width:90px;white-space:nowrap}table:not(.remarkd-table) td>span{white-space:normal}table:not(.remarkd-table) th{font-family:var(--zn-font-sans);font-size:var(--zn-text-button-label-font-size);font-weight:var(--zn-text-button-label-font-weight);line-height:var(--zn-text-button-label-line-height);color:var(--zn-text-button-label-color);text-transform:var(--zn-text-button-label-transform);text-transform:capitalize;border-bottom:1px solid rgb(var(--zn-border-color))}.zn-table-fixed{table-layout:fixed}.opacity-100{opacity:1}.opacity-90{opacity:0.9}.opacity-80{opacity:0.8}.opacity-60{opacity:0.6}.opacity-50{opacity:0.5}.opacity-40{opacity:0.4}.opacity-10{opacity:0.1}.air-datepicker-cell.-year-.-other-decade-,.air-datepicker-cell.-day-.-other-month-{color:var(--adp-color-other-month)}.air-datepicker-cell.-year-.-other-decade-:hover,.air-datepicker-cell.-day-.-other-month-:hover{color:var(--adp-color-other-month-hover)}.-disabled-.-focus-.air-datepicker-cell.-year-.-other-decade-,.-disabled-.-focus-.air-datepicker-cell.-day-.-other-month-{color:var(--adp-color-other-month)}.-selected-.air-datepicker-cell.-year-.-other-decade-,.-selected-.air-datepicker-cell.-day-.-other-month-{color:#fff;background:var(--adp-background-color-selected-other-month)}.-selected-.-focus-.air-datepicker-cell.-year-.-other-decade-,.-selected-.-focus-.air-datepicker-cell.-day-.-other-month-{background:var(--adp-background-color-selected-other-month-focused)}.-in-range-.air-datepicker-cell.-year-.-other-decade-,.-in-range-.air-datepicker-cell.-day-.-other-month-{background-color:var(--adp-background-color-in-range);color:var(--adp-color)}.-in-range-.-focus-.air-datepicker-cell.-year-.-other-decade-,.-in-range-.-focus-.air-datepicker-cell.-day-.-other-month-{background-color:var(--adp-background-color-in-range-focused)}.air-datepicker-cell.-year-.-other-decade-:empty,.air-datepicker-cell.-day-.-other-month-:empty{background:none;border:none}.air-datepicker-cell{border-radius:var(--adp-cell-border-radius);box-sizing:border-box;cursor:pointer;display:flex;position:relative;align-items:center;justify-content:center;z-index:1}.air-datepicker-cell.-focus-{background:var(--adp-cell-background-color-hover)}.air-datepicker-cell.-current-{color:var(--adp-color-current-date)}.air-datepicker-cell.-current-.-focus-{color:var(--adp-color)}.air-datepicker-cell.-current-.-in-range-{color:var(--adp-color-current-date)}.air-datepicker-cell.-disabled-{cursor:default;color:var(--adp-color-disabled)}.air-datepicker-cell.-disabled-.-focus-{color:var(--adp-color-disabled)}.air-datepicker-cell.-disabled-.-in-range-{color:var(--adp-color-disabled-in-range)}.air-datepicker-cell.-disabled-.-current-.-focus-{color:var(--adp-color-disabled)}.air-datepicker-cell.-in-range-{background:var(--adp-cell-background-color-in-range);border-radius:0}.air-datepicker-cell.-in-range-:hover,.air-datepicker-cell.-in-range-.-focus-{background:var(--adp-cell-background-color-in-range-hover)}.air-datepicker-cell.-range-from-{border:1px solid var(--adp-cell-border-color-in-range);background-color:var(--adp-cell-background-color-in-range);border-radius:var(--adp-cell-border-radius) 0 0 var(--adp-cell-border-radius)}.air-datepicker-cell.-range-to-{border:1px solid var(--adp-cell-border-color-in-range);background-color:var(--adp-cell-background-color-in-range);border-radius:0 var(--adp-cell-border-radius) var(--adp-cell-border-radius) 0}.air-datepicker-cell.-range-to-.-range-from-{border-radius:var(--adp-cell-border-radius)}.air-datepicker-cell.-selected-{color:#fff;border:none;background:var(--adp-cell-background-color-selected)}.air-datepicker-cell.-selected-.-current-{color:#fff;background:var(--adp-cell-background-color-selected)}.air-datepicker-cell.-selected-.-focus-{background:var(--adp-cell-background-color-selected-hover)}.air-datepicker-body{transition:all var(--adp-transition-duration) var(--adp-transition-ease)}.air-datepicker-body.-hidden-{display:none}.air-datepicker-body--day-names{display:grid;grid-template-columns:repeat(7,var(--adp-day-cell-width));margin:8px 0 3px}.air-datepicker-body--day-name{color:var(--adp-day-name-color);display:flex;align-items:center;justify-content:center;flex:1;text-align:center;text-transform:uppercase;font-size:0.8em}.air-datepicker-body--day-name.-clickable-{cursor:pointer}.air-datepicker-body--day-name.-clickable-:hover{color:var(--adp-day-name-color-hover)}.air-datepicker-body--cells{display:grid}.air-datepicker-body--cells.-days-{grid-template-columns:repeat(7,var(--adp-day-cell-width));grid-auto-rows:var(--adp-day-cell-height)}.air-datepicker-body--cells.-months-{grid-template-columns:repeat(3,1fr);grid-auto-rows:var(--adp-month-cell-height)}.air-datepicker-body--cells.-years-{grid-template-columns:repeat(4,1fr);grid-auto-rows:var(--adp-year-cell-height)}.air-datepicker-nav{display:flex;justify-content:space-between;border-bottom:1px solid var(--adp-border-color-inner);min-height:var(--adp-nav-height);padding:var(--adp-padding);box-sizing:content-box}.-only-timepicker- .air-datepicker-nav{display:none}.air-datepicker-nav--title,.air-datepicker-nav--action{display:flex;cursor:pointer;align-items:center;justify-content:center}.air-datepicker-nav--action{width:var(--adp-nav-action-size);border-radius:var(--adp-border-radius);-webkit-user-select:none;-moz-user-select:none;user-select:none}.air-datepicker-nav--action:hover{background:var(--adp-background-color-hover)}.air-datepicker-nav--action:active{background:var(--adp-background-color-active)}.air-datepicker-nav--action.-disabled-{visibility:hidden}.air-datepicker-nav--action svg{width:32px;height:32px}.air-datepicker-nav--action path{fill:none;stroke:var(--adp-nav-arrow-color);stroke-width:2px}.air-datepicker-nav--title{border-radius:var(--adp-border-radius);padding:0 8px}.air-datepicker-nav--title i{font-style:normal;color:var(--adp-nav-color-secondary);margin-left:0.3em}.air-datepicker-nav--title:hover{background:var(--adp-background-color-hover)}.air-datepicker-nav--title:active{background:var(--adp-background-color-active)}.air-datepicker-nav--title.-disabled-{cursor:default;background:none}.air-datepicker-buttons{display:grid;grid-auto-columns:1fr;grid-auto-flow:column}.air-datepicker-button{display:inline-flex;color:var(--adp-btn-color);border-radius:var(--adp-btn-border-radius);cursor:pointer;height:var(--adp-btn-height);border:none;background:rgba(255,255,255,0)}.air-datepicker-button:hover{color:var(--adp-btn-color-hover);background:var(--adp-btn-background-color-hover)}.air-datepicker-button:focus{color:var(--adp-btn-color-hover);background:var(--adp-btn-background-color-hover);outline:none}.air-datepicker-button:active{background:var(--adp-btn-background-color-active)}.air-datepicker-button span{outline:none;display:flex;align-items:center;justify-content:center;width:100%;height:100%}.air-datepicker-time{display:grid;grid-template-columns:max-content 1fr;grid-column-gap:12px;align-items:center;position:relative;padding:0 var(--adp-time-padding-inner)}.-only-timepicker- .air-datepicker-time{border-top:none}.air-datepicker-time--current{display:flex;align-items:center;flex:1;font-size:14px;text-align:center}.air-datepicker-time--current-colon{margin:0 2px 3px;line-height:1}.air-datepicker-time--current-hours,.air-datepicker-time--current-minutes{line-height:1;font-size:19px;font-family:"Century Gothic",CenturyGothic,AppleGothic,sans-serif;position:relative;z-index:1}.air-datepicker-time--current-hours:after,.air-datepicker-time--current-minutes:after{content:"";background:var(--adp-background-color-hover);border-radius:var(--adp-border-radius);position:absolute;left:-2px;top:-3px;right:-2px;bottom:-2px;z-index:-1;opacity:0}.air-datepicker-time--current-hours.-focus-:after,.air-datepicker-time--current-minutes.-focus-:after{opacity:1}.air-datepicker-time--current-ampm{text-transform:uppercase;align-self:flex-end;color:var(--adp-time-day-period-color);margin-left:6px;font-size:11px;margin-bottom:1px}.air-datepicker-time--row{display:flex;align-items:center;font-size:11px;height:17px;background:linear-gradient(to right,var(--adp-time-track-color),var(--adp-time-track-color)) left 50%/100% var(--adp-time-track-height) no-repeat}.air-datepicker-time--row:first-child{margin-bottom:4px}.air-datepicker-time--row input[type=range]{background:none;cursor:pointer;flex:1;height:100%;width:100%;padding:0;margin:0;-webkit-appearance:none}.air-datepicker-time--row input[type=range]::-webkit-slider-thumb{-webkit-appearance:none}.air-datepicker-time--row input[type=range]::-ms-tooltip{display:none}.air-datepicker-time--row input[type=range]:hover::-webkit-slider-thumb{border-color:var(--adp-time-track-color-hover)}.air-datepicker-time--row input[type=range]:hover::-moz-range-thumb{border-color:var(--adp-time-track-color-hover)}.air-datepicker-time--row input[type=range]:hover::-ms-thumb{border-color:var(--adp-time-track-color-hover)}.air-datepicker-time--row input[type=range]:focus{outline:none}.air-datepicker-time--row input[type=range]:focus::-webkit-slider-thumb{background:var(--adp-cell-background-color-selected);border-color:var(--adp-cell-background-color-selected)}.air-datepicker-time--row input[type=range]:focus::-moz-range-thumb{background:var(--adp-cell-background-color-selected);border-color:var(--adp-cell-background-color-selected)}.air-datepicker-time--row input[type=range]:focus::-ms-thumb{background:var(--adp-cell-background-color-selected);border-color:var(--adp-cell-background-color-selected)}.air-datepicker-time--row input[type=range]::-webkit-slider-thumb{box-sizing:border-box;height:12px;width:12px;border-radius:3px;border:1px solid var(--adp-time-track-color);background:#fff;cursor:pointer;-webkit-transition:background var(--adp-transition-duration);transition:background var(--adp-transition-duration)}.air-datepicker-time--row input[type=range]::-moz-range-thumb{box-sizing:border-box;height:12px;width:12px;border-radius:3px;border:1px solid var(--adp-time-track-color);background:#fff;cursor:pointer;-moz-transition:background var(--adp-transition-duration);transition:background var(--adp-transition-duration)}.air-datepicker-time--row input[type=range]::-ms-thumb{box-sizing:border-box;height:12px;width:12px;border-radius:3px;border:1px solid var(--adp-time-track-color);background:#fff;cursor:pointer;-ms-transition:background var(--adp-transition-duration);transition:background var(--adp-transition-duration)}.air-datepicker-time--row input[type=range]::-webkit-slider-thumb{margin-top:calc(var(--adp-time-thumb-size) / 2 * -1)}.air-datepicker-time--row input[type=range]::-webkit-slider-runnable-track{border:none;height:var(--adp-time-track-height);cursor:pointer;color:rgba(0,0,0,0);background:rgba(0,0,0,0)}.air-datepicker-time--row input[type=range]::-moz-range-track{border:none;height:var(--adp-time-track-height);cursor:pointer;color:rgba(0,0,0,0);background:rgba(0,0,0,0)}.air-datepicker-time--row input[type=range]::-ms-track{border:none;height:var(--adp-time-track-height);cursor:pointer;color:rgba(0,0,0,0);background:rgba(0,0,0,0)}.air-datepicker-time--row input[type=range]::-ms-fill-lower{background:rgba(0,0,0,0)}.air-datepicker-time--row input[type=range]::-ms-fill-upper{background:rgba(0,0,0,0)}.air-datepicker{--adp-font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";--adp-font-size:14px;--adp-width:246px;--adp-z-index:100;--adp-padding:4px;--adp-grid-areas:"nav" "body" "timepicker" "buttons";--adp-transition-duration:.3s;--adp-transition-ease:ease-out;--adp-transition-offset:8px;--adp-background-color:#fff;--adp-background-color-hover:#f0f0f0;--adp-background-color-active:#eaeaea;--adp-background-color-in-range:rgba(92,196,239,.1);--adp-background-color-in-range-focused:rgba(92,196,239,.2);--adp-background-color-selected-other-month-focused:#8ad5f4;--adp-background-color-selected-other-month:#a2ddf6;--adp-color:#4a4a4a;--adp-color-secondary:#9c9c9c;--adp-accent-color:#4eb5e6;--adp-color-current-date:var(--adp-accent-color);--adp-color-other-month:#dedede;--adp-color-disabled:#aeaeae;--adp-color-disabled-in-range:#939393;--adp-color-other-month-hover:#c5c5c5;--adp-border-color:#dbdbdb;--adp-border-color-inner:#efefef;--adp-border-radius:4px;--adp-border-color-inline:#d7d7d7;--adp-nav-height:32px;--adp-nav-arrow-color:var(--adp-color-secondary);--adp-nav-action-size:32px;--adp-nav-color-secondary:var(--adp-color-secondary);--adp-day-name-color:#ff9a19;--adp-day-name-color-hover:#8ad5f4;--adp-day-cell-width:1fr;--adp-day-cell-height:32px;--adp-month-cell-height:42px;--adp-year-cell-height:56px;--adp-pointer-size:10px;--adp-poiner-border-radius:2px;--adp-pointer-offset:14px;--adp-cell-border-radius:4px;--adp-cell-background-color-hover:var(--adp-background-color-hover);--adp-cell-background-color-selected:#5cc4ef;--adp-cell-background-color-selected-hover:#45bced;--adp-cell-background-color-in-range:rgba(92,196,239,0.1);--adp-cell-background-color-in-range-hover:rgba(92,196,239,0.2);--adp-cell-border-color-in-range:var(--adp-cell-background-color-selected);--adp-btn-height:32px;--adp-btn-color:var(--adp-accent-color);--adp-btn-color-hover:var(--adp-color);--adp-btn-border-radius:var(--adp-border-radius);--adp-btn-background-color-hover:var(--adp-background-color-hover);--adp-btn-background-color-active:var(--adp-background-color-active);--adp-time-track-height:1px;--adp-time-track-color:#dedede;--adp-time-track-color-hover:#b1b1b1;--adp-time-thumb-size:12px;--adp-time-padding-inner:10px;--adp-time-day-period-color:var(--adp-color-secondary);--adp-mobile-font-size:16px;--adp-mobile-nav-height:40px;--adp-mobile-width:320px;--adp-mobile-day-cell-height:38px;--adp-mobile-month-cell-height:48px;--adp-mobile-year-cell-height:64px}.air-datepicker-overlay{--adp-overlay-background-color:rgba(0,0,0,.3);--adp-overlay-transition-duration:.3s;--adp-overlay-transition-ease:ease-out;--adp-overlay-z-index:99}.air-datepicker{background:var(--adp-background-color);border:1px solid var(--adp-border-color);box-shadow:0 4px 12px rgba(0,0,0,0.15);border-radius:var(--adp-border-radius);box-sizing:content-box;display:grid;grid-template-columns:1fr;grid-template-rows:repeat(4,max-content);grid-template-areas:var(--adp-grid-areas);font-family:var(--adp-font-family),sans-serif;font-size:var(--adp-font-size);color:var(--adp-color);width:var(--adp-width);position:absolute;transition:opacity var(--adp-transition-duration) var(--adp-transition-ease),transform var(--adp-transition-duration) var(--adp-transition-ease);z-index:var(--adp-z-index)}.air-datepicker:not(.-custom-position-){opacity:0}.air-datepicker.-from-top-{transform:translateY(calc(var(--adp-transition-offset) * -1))}.air-datepicker.-from-right-{transform:translateX(var(--adp-transition-offset))}.air-datepicker.-from-bottom-{transform:translateY(var(--adp-transition-offset))}.air-datepicker.-from-left-{transform:translateX(calc(var(--adp-transition-offset) * -1))}.air-datepicker.-active-:not(.-custom-position-){transform:translate(0,0);opacity:1}.air-datepicker.-active-.-custom-position-{transition:none}.air-datepicker.-inline-{border-color:var(--adp-border-color-inline);box-shadow:none;position:static;left:auto;right:auto;opacity:1;transform:none}.air-datepicker.-inline- .air-datepicker--pointer{display:none}.air-datepicker.-is-mobile-{--adp-font-size:var(--adp-mobile-font-size);--adp-day-cell-height:var(--adp-mobile-day-cell-height);--adp-month-cell-height:var(--adp-mobile-month-cell-height);--adp-year-cell-height:var(--adp-mobile-year-cell-height);--adp-nav-height:var(--adp-mobile-nav-height);--adp-nav-action-size:var(--adp-mobile-nav-height);position:fixed;width:var(--adp-mobile-width);border:none}.air-datepicker.-is-mobile- *{-webkit-tap-highlight-color:rgba(0,0,0,0)}.air-datepicker.-is-mobile- .air-datepicker--pointer{display:none}.air-datepicker.-is-mobile-:not(.-custom-position-){transform:translate(-50%,calc(-50% + var(--adp-transition-offset)))}.air-datepicker.-is-mobile-.-active-:not(.-custom-position-){transform:translate(-50%,-50%)}.air-datepicker.-custom-position-{transition:none}.air-datepicker-global-container{position:absolute;left:0;top:0}.air-datepicker--pointer{--pointer-half-size:calc(var(--adp-pointer-size) / 2);position:absolute;width:var(--adp-pointer-size);height:var(--adp-pointer-size);z-index:-1}.air-datepicker--pointer:after{content:"";position:absolute;background:#fff;border-top:1px solid var(--adp-border-color-inline);border-right:1px solid var(--adp-border-color-inline);border-top-right-radius:var(--adp-poiner-border-radius);width:var(--adp-pointer-size);height:var(--adp-pointer-size);box-sizing:border-box}.-top-left- .air-datepicker--pointer,.-top-center- .air-datepicker--pointer,.-top-right- .air-datepicker--pointer,[data-popper-placement^=top] .air-datepicker--pointer{top:calc(100% - var(--pointer-half-size) + 1px)}.-top-left- .air-datepicker--pointer:after,.-top-center- .air-datepicker--pointer:after,.-top-right- .air-datepicker--pointer:after,[data-popper-placement^=top] .air-datepicker--pointer:after{transform:rotate(135deg)}.-right-top- .air-datepicker--pointer,.-right-center- .air-datepicker--pointer,.-right-bottom- .air-datepicker--pointer,[data-popper-placement^=right] .air-datepicker--pointer{right:calc(100% - var(--pointer-half-size) + 1px)}.-right-top- .air-datepicker--pointer:after,.-right-center- .air-datepicker--pointer:after,.-right-bottom- .air-datepicker--pointer:after,[data-popper-placement^=right] .air-datepicker--pointer:after{transform:rotate(225deg)}.-bottom-left- .air-datepicker--pointer,.-bottom-center- .air-datepicker--pointer,.-bottom-right- .air-datepicker--pointer,[data-popper-placement^=bottom] .air-datepicker--pointer{bottom:calc(100% - var(--pointer-half-size) + 1px)}.-bottom-left- .air-datepicker--pointer:after,.-bottom-center- .air-datepicker--pointer:after,.-bottom-right- .air-datepicker--pointer:after,[data-popper-placement^=bottom] .air-datepicker--pointer:after{transform:rotate(315deg)}.-left-top- .air-datepicker--pointer,.-left-center- .air-datepicker--pointer,.-left-bottom- .air-datepicker--pointer,[data-popper-placement^=left] .air-datepicker--pointer{left:calc(100% - var(--pointer-half-size) + 1px)}.-left-top- .air-datepicker--pointer:after,.-left-center- .air-datepicker--pointer:after,.-left-bottom- .air-datepicker--pointer:after,[data-popper-placement^=left] .air-datepicker--pointer:after{transform:rotate(45deg)}.-top-left- .air-datepicker--pointer,.-bottom-left- .air-datepicker--pointer{left:var(--adp-pointer-offset)}.-top-right- .air-datepicker--pointer,.-bottom-right- .air-datepicker--pointer{right:var(--adp-pointer-offset)}.-top-center- .air-datepicker--pointer,.-bottom-center- .air-datepicker--pointer{left:calc(50% - var(--adp-pointer-size) / 2)}.-left-top- .air-datepicker--pointer,.-right-top- .air-datepicker--pointer{top:var(--adp-pointer-offset)}.-left-bottom- .air-datepicker--pointer,.-right-bottom- .air-datepicker--pointer{bottom:var(--adp-pointer-offset)}.-left-center- .air-datepicker--pointer,.-right-center- .air-datepicker--pointer{top:calc(50% - var(--adp-pointer-size) / 2)}.air-datepicker--navigation{grid-area:nav}.air-datepicker--content{box-sizing:content-box;padding:var(--adp-padding);grid-area:body}.-only-timepicker- .air-datepicker--content{display:none}.air-datepicker--time{grid-area:timepicker}.air-datepicker--buttons{grid-area:buttons}.air-datepicker--buttons,.air-datepicker--time{padding:var(--adp-padding);border-top:1px solid var(--adp-border-color-inner)}.air-datepicker-overlay{position:fixed;background:var(--adp-overlay-background-color);left:0;top:0;width:0;height:0;opacity:0;transition:opacity var(--adp-overlay-transition-duration) var(--adp-overlay-transition-ease),left 0s,height 0s,width 0s;transition-delay:0s,var(--adp-overlay-transition-duration),var(--adp-overlay-transition-duration),var(--adp-overlay-transition-duration);z-index:var(--adp-overlay-z-index)}.air-datepicker-overlay.-active-{opacity:1;width:100%;height:100%;transition:opacity var(--adp-overlay-transition-duration) var(--adp-overlay-transition-ease),height 0s,width 0s}.air-datepicker{--adp-color:rgba(var(--zn-text),var(--zn-text-opacity));--adp-nav-color-secondary:rgb(var(--zn-purple-text));--adp-day-name-color:var(--zn-color-primary-600);--adp-day-name-color-hover:var(--zn-color-primary-700);--adp-cell-background-color-selected:var(--zn-color-primary-600);--adp-cell-background-color-selected-hover:var(--zn-color-primary-700);--adp-color-current-date:var(--zn-color-primary-600);--adp-background-color:var(--zn-input-background-color);--adp-background-color-hover:var(--zn-input-background-color-hover);--adp-background-color-active:var(--zn-input-background-color-hover);--adp-background-color-selected-other-month:var(--zn-color-primary-300);--adp-background-color-in-range:var(--zn-color-primary-100);--adp-border-color:rgb(var(--zn-border-color));--adp-border-color-inline:rgb(var(--zn-border-color));--adp-border-color-inner:rgb(var(--zn-border-color));--adp-cell-background-color-in-range:var(--zn-color-primary-100);--adp-cell-background-color-in-range-hover:var(--zn-color-primary-200)}.air-datepicker--pointer:after{background-color:var(--zn-input-background-color)}.air-datepicker-global-container{z-index:1000000}.air-datepicker-button{border:none;padding:var(--zn-spacing-2x-small) var(--zn-spacing-x-small);border-radius:var(--adp-border-radius);font-family:var(--adp-font-family),sans-serif;font-size:var(--zn-font-size-medium);font-weight:var(--zn-font-weight-normal);cursor:pointer;color:rgba(var(--zn-text),var(--zn-text-opacity))}.air-datepicker-button:hover{background-color:var(--zn-input-background-color-hover) !important}.zn-cloak:has(:not(:defined)){animation:2s step-end zn-cloak}@keyframes zn-cloak{from{opacity:0}to{opacity:1}}.toolbar{display:flex;flex-wrap:wrap;align-items:center}.toolbar__group{display:flex;align-items:center;position:relative}.toolbar__group--overflow{display:none}.toolbar__group--empty{display:none}.toolbar__group{}.toolbar__group:not(.toolbar__group--empty):not(.toolbar__group--hidden)+.toolbar__group::before{content:"";display:inline-block;width:1px;height:18px;background-color:var(--zn-color-gray-300);opacity:0.8;margin-inline:var(--zn-spacing-2x-small);border-radius:10px}.toolbar__group{}.toolbar__group--has-prev-visible::before{content:"";display:inline-block;width:1px;height:18px;background-color:var(--zn-color-gray-300);opacity:0.8;margin-inline:var(--zn-spacing-2x-small);border-radius:10px}.toolbar__dropdown-trigger::part(icon){margin-left:4px}.color-icon{width:18px;height:18px;display:block;border-radius:100%;flex-shrink:0}.color-icon--red{background-color:var(--zn-color-red-500)}.color-icon--blue{background-color:var(--zn-color-blue-500)}.color-icon--orange{background-color:var(--zn-color-orange-500)}.color-icon--yellow{background-color:var(--zn-color-yellow-400)}.color-icon--indigo{background-color:var(--zn-color-indigo-500)}.color-icon--violet{background-color:var(--zn-color-violet-500)}.color-icon--green{background-color:var(--zn-color-green-500)}.color-icon--pink{background-color:var(--zn-color-pink-500)}.color-icon--gray{background-color:var(--zn-color-gray-500)}`;var xn=class extends C{constructor(){super(...arguments);this._featureConfig={};this._resizeId=null;this._resizeObserver=new Zt(this,{callback:()=>this.handleResize()});this._movedContent=new Map;this.handleResize=()=>{this.containerWidth=this.getToolbarWidth(),this._resizeId!==null&&cancelAnimationFrame(this._resizeId),this._resizeId=requestAnimationFrame(()=>{this.calculateOverflow(),this._resizeId=null})}}connectedCallback(){super.connectedCallback(),this.containerWidth=this.offsetWidth,this.parentElement&&this._resizeObserver.observe(this.parentElement)}disconnectedCallback(){super.disconnectedCallback(),this._resizeId!==null&&(cancelAnimationFrame(this._resizeId),this._resizeId=null),this.restoreMovedContent()}firstUpdated(t){super.firstUpdated(t),this.containerWidth=this.getToolbarWidth(),this.updateEmptyGroups(),this.renderRoot?.querySelector("slot")?.addEventListener("slotchange",()=>this.calculateOverflow()),this.updateComplete.then(()=>this.calculateOverflow())}configureToolbar(t){this._featureConfig=t}getToolbarWidth(){let t=this,r=t.getBoundingClientRect?.().width||t.offsetWidth||0;return(!r||r<=0)&&this._toolbarEl&&(r=this._toolbarEl.getBoundingClientRect().width),r}getOverflowGroupWidth(){let t=50,r=this._overflowGroup;if(!r)return t;let n=r.style.display,a=r.style.visibility;return r.style.display="flex",r.style.visibility="hidden",t=r.offsetWidth||t,r.style.visibility=a,r.style.display=n||"none",t}restoreMovedContent(){this._movedContent.forEach(({placeholder:t,originalParent:r},n)=>{t.parentNode?(r.insertBefore(n,t),t.parentNode.removeChild(t)):r.appendChild(n)}),this._movedContent.clear()}moveContentTo(t,r){if(this._movedContent.has(t)){t.parentElement!==r&&r.appendChild(t);return}let n=t.parentElement;if(!n)return;let a=document.createComment("toolbar-overflow-placeholder");n.insertBefore(a,t),r.appendChild(t),this._movedContent.set(t,{placeholder:a,originalParent:n})}isGroupEmpty(t){let r=t.querySelector("slot");return r?r.assignedElements({flatten:!0}).length===0:t.childElementCount===0}updateEmptyGroups(){Array.from(this._groups||[]).forEach(r=>{let n=this.isGroupEmpty(r);r.classList.toggle("toolbar__group--empty",n)})}_updateDividerClasses(){let t=Array.from(this._groups||[]),r=!1;t.forEach(n=>{let a=n.classList.contains("toolbar__group--empty"),s=n.style.display==="none",l=!a&&!s;n.classList.toggle("toolbar__group--has-prev-visible",l&&r),l&&(r=!0)})}calculateOverflow(){let t=Array.from(this._groups||[]);if(!t.length)return;this.restoreMovedContent(),this.updateEmptyGroups();let r=t.filter(h=>!h.classList.contains("toolbar__group--overflow")&&!h.classList.contains("toolbar__group--empty"));r.forEach(h=>{h.style.display="flex",h.classList.remove("toolbar__group--hidden","toolbar__group--has-prev-visible")}),this._overflowGroup&&(this._overflowGroup.style.display="none",this._overflowGroup.classList.remove("toolbar__group--hidden","toolbar__group--has-prev-visible"));let n=this.getToolbarWidth();if(!n||n<=0){r.forEach(h=>h.style.display="flex"),this._overflowGroup&&(this._overflowGroup.style.display="none"),this.restoreMovedContent(),this._overflowMenu&&(this._overflowMenu.innerHTML=""),this._updateDividerClasses(),this._dispatchOverflowEvent();return}let a=0,s=0;for(let h of r){let m=h.offsetWidth;if(a+m<=n)a+=m,s++;else break}if(s>=r.length){r.forEach(h=>h.style.display="flex"),this._overflowGroup&&(this._overflowGroup.style.display="none"),this.restoreMovedContent(),this._overflowMenu&&(this._overflowMenu.innerHTML=""),this._updateDividerClasses(),this._dispatchOverflowEvent();return}let l=this.getOverflowGroupWidth();a=0,s=0;for(let h of r){let m=h.offsetWidth;if(a+m+l<=n)a+=m,s++;else break}r.forEach((h,m)=>{h.style.display=m<s?"flex":"none"}),r.forEach((h,m)=>{let f=m>=s;h.classList.toggle("toolbar__group--hidden",f)}),this._overflowGroup&&(this._overflowGroup.style.display="flex"),this._updateDividerClasses();let d=r.slice(s);this.populateOverflowMenu(d),this._dispatchOverflowEvent()}_dispatchOverflowEvent(){this.dispatchEvent(new CustomEvent("zn-toolbar-overflow-updated",{bubbles:!0,composed:!0}))}populateOverflowMenu(t){let r=this._overflowMenu;if(!r)return;this.restoreMovedContent(),r.innerHTML="";let n=(h,m,f,b,g={})=>{let v=document.createElement("zn-menu-item");if(v.innerText=m,Object.keys(g).forEach(x=>v.setAttribute(x,g[x])),f){let x=document.createElement("zn-icon");x.setAttribute("src",f),x.setAttribute("size","18"),x.setAttribute("slot","prefix"),v.appendChild(x)}return b&&v.addEventListener("click",x=>{x.preventDefault(),x.stopPropagation(),b()}),h.appendChild(v),v},a=h=>{let m=document.createElement("zn-menu-item");for(let f of h.attributes)f.name!=="id"&&m.setAttribute(f.name,f.value);return m.innerHTML=h.innerHTML,m},s=h=>{let f=h.querySelector('zn-button[slot="trigger"]')?.querySelector("zn-icon"),b=f?.getAttribute("src");if(!b)return b??void 0;let g=f?.getAttribute("library");return g?`${b}@${g}`:b},l={bold:"Bold",italic:"Italic",underline:"Underline",undo:"Undo",redo:"Redo"},d={"toolbar__header-dropdown":"Text","toolbar__format-dropdown":"Format","toolbar__color-dropdown":"Color","toolbar__list-dropdown":"Lists","toolbar__file-dropdown":"Insert","toolbar__emoji-dropdown":"Emoji","toolbar__date-dropdown":"Date"};t.forEach(h=>{if(Array.from(h.querySelectorAll("zn-dropdown")).forEach(g=>{let v="";for(let j in d)if(g.classList.contains(j)){v=d[j];break}v||(v=g.getAttribute("aria-label")||g.getAttribute("title")||"More");let x=s(g)||"",k=n(r,v,x);g.classList.contains("toolbar__date-dropdown")&&k.setAttribute("data-overflow-source","date");let _=document.createElement("zn-menu");_.setAttribute("slot","submenu"),_.setAttribute("variant","shell");let O=g.querySelectorAll("zn-menu-item");if(O.length)O.forEach(j=>{let I=a(j);_.appendChild(I)});else{let j=Array.from(g.children).filter(w=>{let T=w.getAttribute("slot")==="trigger"||w instanceof Tt,L=w instanceof Po||w instanceof Ln;return!T&&!L}),I=document.createElement("div");I.className="toolbar__submenu-content",j.forEach(w=>this.moveContentTo(w,I)),_.appendChild(I)}k.appendChild(_)}),h.querySelectorAll("zn-button.toolbar__format-button, zn-button.toolbar__action-button").forEach(g=>{let v=g.getAttribute("icon")??"",x=g.getAttribute("data-format")??"",k=g.getAttribute("data-text")??l[x]??(x?x.charAt(0).toUpperCase()+x.slice(1):g.getAttribute("aria-label")??g.textContent?.trim()??"Action"),_={"data-format":x},O=g.getAttribute("data-format-type")??"";O&&(_["data-format-type"]=O),v&&(_["data-icon"]=v),k&&(_["data-text"]=k),n(r,k,v,void 0,_)}),Array.from(h.querySelectorAll("zn-menu-item")).filter(g=>!g.closest("zn-dropdown")).forEach(g=>{let v=a(g);r.appendChild(v)}),h.querySelector("slot")){let g=h.querySelector("slot"),v=g?g.assignedElements({flatten:!0}):[];if(!v.length)return;v.forEach(x=>{if(x instanceof Jl){let k=x.icon,_=x.label,O=x.handler||"dialog",j=x.uri||"",I=x.key||"",w={"data-format":O};j&&(w["data-format-type"]=j),I&&(w["data-toolbar-key"]=I),k&&(w["data-icon"]=k),_&&(w["data-text"]=_),n(r,_,k,void 0,w)}})}})}render(){let t=this._featureConfig.dividersEnabled||this._featureConfig.linksEnabled||this._featureConfig.attachmentsEnabled||this._featureConfig.imagesEnabled||this._featureConfig.videosEnabled,r=t||this._featureConfig.datesEnabled||this._featureConfig.emojisEnabled;return u`
2688
2691
  <div class="toolbar">
2689
2692
  <div class="toolbar__group">${this._textOptions()}</div>
2690
2693
  <div class="toolbar__group">${this._formatOptions()}</div>
@@ -3355,7 +3358,7 @@ ${ma(this.code(o,t))}
3355
3358
  </span>`)}
3356
3359
  </span>
3357
3360
  </div>
3358
- `}};Pe.styles=E(e_),c([F(".rating")],Pe.prototype,"rating",2),c([H()],Pe.prototype,"hoverValue",2),c([H()],Pe.prototype,"isHovering",2),c([p()],Pe.prototype,"label",2),c([p()],Pe.prototype,"name",2),c([p({type:Number})],Pe.prototype,"value",2),c([p({type:Number})],Pe.prototype,"max",2),c([p({type:Number})],Pe.prototype,"precision",2),c([p({type:Boolean})],Pe.prototype,"readonly",2),c([p({type:Boolean})],Pe.prototype,"disabled",2),c([p({})],Pe.prototype,"size",2),c([p()],Pe.prototype,"getSymbol",2);var v6=Pe;Pe.define("zn-rating");var r_=A`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}:host *,:host *::before,:host *::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}.form-control-input{margin:var(--zn-spacing-2x-small) 3px 3px 0}.form-control-input--flush{margin:0}.form-control .form-control__label{display:none}.form-control .form-control__help-text{display:none}.form-control--has-label .form-control__label{display:inline-block;color:var(--zn-input-label-color);font-weight:var(--zn-input-label-font-weight);line-height:var(--zn-input-label-line-height);margin-bottom:var(--zn-spacing-x-small)}.form-control--has-label.form-control--medium .form-control__label{font-size:var(--zn-input-label-font-size-medium)}.form-control--has-label.form-control--large .form-control__label{font-size:var(--zn-input-label-font-size-large)}:host([required]) .form-control--has-label .form-control__label::after{content:var(--zn-input-required-content);margin-inline-start:var(--zn-input-required-content-offset);color:var(--zn-input-required-content-color)}.form-control--has-label.form-control--radio-group .form-control__label,.form-control--has-label.form-control--checkbox-group .form-control__label{margin-bottom:0}.form-control--has-label.form-control--has-label-tooltip .form-control__label{display:inline-flex;align-items:center;gap:var(--zn-spacing-2x-small)}.form-control--has-label.form-control--small .form-control__label{font-size:var(--zn-input-label-font-size-small)}.form-control--label-tooltip{color:var(--zn-color-neutral-700);font-size:var(--zn-font-size-small)}.form-control--label-tooltip zn-icon{--icon-color:var(--zn-color-neutral-700);--icon-size:var(--zn-font-size-small)}.form-control--has-label.form-control--has-context-note{display:flex;justify-content:space-between;flex-wrap:wrap}.form-control__label-context-note{color:var(--zn-input-help-text-color);font-size:var(--zn-font-size-small);margin-bottom:var(--zn-spacing-2x-small)}.form-control--has-label.form-control--has-context-note .form-control-input{width:100%}.form-control--has-help-text .form-control__help-text,.radio--has-description .radio__description,.checkbox--has-description .checkbox__description{display:block;color:var(--zn-input-help-text-color);margin-top:var(--zn-spacing-x-small)}.radio--has-description .radio__description,.checkbox--has-description .checkbox__description{margin-top:0.375rem}.radio--has-selected-content .radio__selected-content,.checkbox--has-selected-content .checkbox__selected-content{display:block;margin-top:var(--zn-spacing-small)}.form-control--has-help-text.form-control--small .form-control__help-text{font-size:var(--zn-input-help-text-font-size-small)}.form-control--has-help-text.form-control--medium .form-control__help-text,.radio--has-description .radio__description,.checkbox--has-description .checkbox__description{font-size:var(--zn-input-help-text-font-size-medium)}.form-control--has-help-text.form-control--large .form-control__help-text{font-size:var(--zn-input-help-text-font-size-large)}.form-control--has-help-text.form-control--radio-group .form-control__help-text,.form-control--has-help-text.form-control--checkbox-group .form-control__help-text{margin-top:var(--zn-spacing-medium)}.form-control--has-help-text .switch .form-control__help-text{margin-top:var(--zn-spacing-3x-small)}.form-control--checkbox-contained-wrapper{height:100%}:host{display:block;line-height:var(--zn-line-height-dense)}:host([horizontal]) .form-control-input{display:flex;-moz-column-gap:var(--zn-spacing-2x-large);column-gap:var(--zn-spacing-2x-large)}:host([contained]) .form-control-input{margin-top:var(--zn-spacing-medium)}:host([horizontal][contained]) .form-control-input{margin-top:var(--zn-spacing-medium);display:grid;grid-template-columns:repeat(auto-fit,minmax(152px,1fr));gap:var(--zn-spacing-x-small)}::slotted(zn-radio){margin-top:var(--zn-spacing-medium)}::slotted(zn-radio[horizontal]),::slotted(zn-radio[contained]){margin-top:var(--zn-spacing-small)}::slotted(zn-radio[horizontal][contained]){margin-top:0;height:100%}.form-control{position:relative;border:none;padding:0;margin:0}.form-control__label{padding:0}.visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}`;var de=class extends C{constructor(){super(...arguments);this.formControlController=new ot(this);this.hasSlotController=new J(this,"help-text","label");this.customValidityMessage="";this.errorMessage="";this.defaultValue="";this.label="";this.labelTooltip="";this.helpText="";this.name="";this.value="";this.size="medium";this.horizontal=!1;this.contained=!1;this.form="";this.required=!1}get validity(){let t=this.required&&!this.value;return this.customValidityMessage!==""?_c:t?kc:Se}get validationMessage(){let t=this.required&&!this.value;return this.customValidityMessage!==""?this.customValidityMessage:t?this.validationInput.validationMessage:""}connectedCallback(){super.connectedCallback(),this.defaultValue=this.value}firstUpdated(t){super.firstUpdated(t),this.formControlController.updateValidity()}getAllRadios(){return[...this.querySelectorAll("zn-radio")]}handleRadioClick(t){let r=t.target.closest("zn-radio"),n=this.getAllRadios();!r||r.disabled||(this.value=r.value,n.forEach(a=>a.checked=a===r))}handleKeyDown(t){if(!["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"," "].includes(t.key))return;let r=this.getAllRadios().filter(l=>!l.disabled),n=r.find(l=>l.checked)??r[0],a=t.key===" "?0:["ArrowUp","ArrowLeft"].includes(t.key)?-1:1,s=r.indexOf(n)+a;s<0&&(s=r.length-1),s>r.length-1&&(s=0),this.getAllRadios().forEach(l=>{l.checked=!1}),this.value=r[s].value,r[s].checked=!0,r[s].shadowRoot.querySelector("button").focus(),t.preventDefault()}handleLabelClick(){this.focus()}handleInvalid(t){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(t)}async syncRadioElements(){let t=this.getAllRadios();await Promise.all(t.map(async r=>{await r.updateComplete,r.checked=r.value===this.value,r.size=this.size,r.horizontal=this.horizontal,r.contained=this.contained})),t.length>0&&!t.some(r=>r.checked)&&t[0].setAttribute("tabindex","0")}syncRadios(){if(customElements.get("zn-radio")){this.syncRadioElements();return}customElements.get("zn-radio")?this.syncRadioElements():customElements.whenDefined("zn-radio").then(()=>this.syncRadios())}updateCheckedRadio(){this.getAllRadios().forEach(r=>r.checked=r.value===this.value),this.formControlController.setValidity(this.validity?.valid)}handleSizeChange(){this.syncRadios()}handleValueChange(){this.hasUpdated&&this.updateCheckedRadio()}checkValidity(){let t=this.required&&!this.value,r=this.customValidityMessage!=="";return t||r?(this.formControlController.emitInvalidEvent(),!1):!0}getForm(){return this.formControlController.getForm()}reportValidity(){let t=this.validity?.valid;return this.errorMessage=this.customValidityMessage||t?"":this.validationInput.validationMessage,this.formControlController.setValidity(t),this.validationInput.hidden=!0,clearTimeout(this.validationTimeout),t||(this.validationInput.hidden=!1,this.validationInput.reportValidity(),this.validationTimeout=setTimeout(()=>this.validationInput.hidden=!0,1e4)),t}setCustomValidity(t=""){this.customValidityMessage=t,this.errorMessage=t,this.validationInput.setCustomValidity(t),this.formControlController.updateValidity()}focus(t){let r=this.getAllRadios(),n=r.find(l=>l.checked),a=r.find(l=>!l.disabled),s=n||a;s&&s.focus(t)}render(){let t=this.hasSlotController.test("label"),r=this.hasSlotController.test("label-tooltip"),n=this.hasSlotController.test("help-text"),a=this.label?!0:!!t,s=this.labelTooltip?!0:r,l=this.helpText?!0:!!n,d=u`
3361
+ `}};Pe.styles=E(e_),c([F(".rating")],Pe.prototype,"rating",2),c([H()],Pe.prototype,"hoverValue",2),c([H()],Pe.prototype,"isHovering",2),c([p()],Pe.prototype,"label",2),c([p()],Pe.prototype,"name",2),c([p({type:Number})],Pe.prototype,"value",2),c([p({type:Number})],Pe.prototype,"max",2),c([p({type:Number})],Pe.prototype,"precision",2),c([p({type:Boolean})],Pe.prototype,"readonly",2),c([p({type:Boolean})],Pe.prototype,"disabled",2),c([p({})],Pe.prototype,"size",2),c([p()],Pe.prototype,"getSymbol",2);var v6=Pe;Pe.define("zn-rating");var r_=A`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}:host *,:host *::before,:host *::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}.form-control-input{margin:var(--zn-spacing-2x-small) 3px 3px 0}.form-control-input--flush{margin:0}.form-control .form-control__label{display:none}.form-control .form-control__help-text{display:none}.form-control--has-label .form-control__label{display:inline-block;color:var(--zn-input-label-color);font-weight:var(--zn-input-label-font-weight);line-height:var(--zn-input-label-line-height);margin-bottom:var(--zn-spacing-x-small)}.form-control--has-label.form-control--medium .form-control__label{font-size:var(--zn-input-label-font-size-medium)}.form-control--has-label.form-control--large .form-control__label{font-size:var(--zn-input-label-font-size-large)}:host([required]) .form-control--has-label .form-control__label::after{content:var(--zn-input-required-content);margin-inline-start:var(--zn-input-required-content-offset);color:var(--zn-input-required-content-color)}.form-control--has-label.form-control--radio-group .form-control__label,.form-control--has-label.form-control--checkbox-group .form-control__label{margin-bottom:0}.form-control--has-label.form-control--has-label-tooltip .form-control__label{display:inline-flex;align-items:center;gap:var(--zn-spacing-2x-small)}.form-control--has-label.form-control--small .form-control__label{font-size:var(--zn-input-label-font-size-small)}.form-control--label-tooltip{color:var(--zn-color-neutral-700);font-size:var(--zn-font-size-small)}.form-control--label-tooltip zn-icon{--icon-color:var(--zn-color-neutral-700);--icon-size:var(--zn-font-size-small)}.form-control--has-label.form-control--has-context-note{display:flex;justify-content:space-between;flex-wrap:wrap}.form-control__label-context-note{color:var(--zn-input-help-text-color);font-size:var(--zn-font-size-small);margin-bottom:var(--zn-spacing-2x-small)}.form-control--has-label.form-control--has-context-note .form-control-input{width:100%}.form-control--has-help-text .form-control__help-text,.radio--has-description .radio__description,.checkbox--has-description .checkbox__description{display:block;color:var(--zn-input-help-text-color);margin-top:var(--zn-spacing-x-small)}.radio--has-description .radio__description,.checkbox--has-description .checkbox__description{margin-top:0.375rem}.radio--has-selected-content .radio__selected-content,.checkbox--has-selected-content .checkbox__selected-content{display:block;margin-top:var(--zn-spacing-small)}.form-control--has-help-text.form-control--small .form-control__help-text{font-size:var(--zn-input-help-text-font-size-small)}.form-control--has-help-text.form-control--medium .form-control__help-text,.radio--has-description .radio__description,.checkbox--has-description .checkbox__description{font-size:var(--zn-input-help-text-font-size-medium)}.form-control--has-help-text.form-control--large .form-control__help-text{font-size:var(--zn-input-help-text-font-size-large)}.form-control--has-help-text.form-control--radio-group .form-control__help-text,.form-control--has-help-text.form-control--checkbox-group .form-control__help-text{margin-top:var(--zn-spacing-medium)}.form-control--has-help-text .switch .form-control__help-text{margin-top:var(--zn-spacing-3x-small)}.form-control--checkbox-contained-wrapper{height:100%}:host{display:block;line-height:var(--zn-line-height-dense)}:host([horizontal]) .form-control-input{display:flex;-moz-column-gap:var(--zn-spacing-2x-large);column-gap:var(--zn-spacing-2x-large)}:host([contained]) .form-control-input{margin-top:var(--zn-spacing-medium)}:host([horizontal][contained]) .form-control-input{margin-top:var(--zn-spacing-medium);display:grid;grid-template-columns:repeat(auto-fit,minmax(152px,1fr));gap:var(--zn-spacing-x-small)}::slotted(zn-radio){margin-top:var(--zn-spacing-medium)}::slotted(zn-radio[horizontal]),::slotted(zn-radio[contained]){margin-top:var(--zn-spacing-small)}::slotted(zn-radio[horizontal][contained]){margin-top:0;height:100%}.form-control{position:relative;border:none;padding:0;margin:0}.form-control__label{padding:0}.visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}`;var pe=class extends C{constructor(){super(...arguments);this.formControlController=new ot(this);this.hasSlotController=new J(this,"help-text","label");this.customValidityMessage="";this.errorMessage="";this.defaultValue="";this.label="";this.labelTooltip="";this.helpText="";this.name="";this.value="";this.size="medium";this.horizontal=!1;this.contained=!1;this.form="";this.required=!1}get validity(){let t=this.required&&!this.value;return this.customValidityMessage!==""?_c:t?kc:Se}get validationMessage(){let t=this.required&&!this.value;return this.customValidityMessage!==""?this.customValidityMessage:t?this.validationInput.validationMessage:""}connectedCallback(){super.connectedCallback(),this.defaultValue=this.value}firstUpdated(t){super.firstUpdated(t),this.formControlController.updateValidity()}getAllRadios(){return[...this.querySelectorAll("zn-radio")]}handleRadioClick(t){let r=t.target.closest("zn-radio"),n=this.getAllRadios();!r||r.disabled||(this.value=r.value,n.forEach(a=>a.checked=a===r))}handleKeyDown(t){if(!["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"," "].includes(t.key))return;let r=this.getAllRadios().filter(l=>!l.disabled),n=r.find(l=>l.checked)??r[0],a=t.key===" "?0:["ArrowUp","ArrowLeft"].includes(t.key)?-1:1,s=r.indexOf(n)+a;s<0&&(s=r.length-1),s>r.length-1&&(s=0),this.getAllRadios().forEach(l=>{l.checked=!1}),this.value=r[s].value,r[s].checked=!0,r[s].shadowRoot.querySelector("button").focus(),t.preventDefault()}handleLabelClick(){this.focus()}handleInvalid(t){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(t)}async syncRadioElements(){let t=this.getAllRadios();await Promise.all(t.map(async r=>{await r.updateComplete,r.checked=r.value===this.value,r.size=this.size,r.horizontal=this.horizontal,r.contained=this.contained})),t.length>0&&!t.some(r=>r.checked)&&t[0].setAttribute("tabindex","0")}syncRadios(){if(customElements.get("zn-radio")){this.syncRadioElements();return}customElements.get("zn-radio")?this.syncRadioElements():customElements.whenDefined("zn-radio").then(()=>this.syncRadios())}updateCheckedRadio(){this.getAllRadios().forEach(r=>r.checked=r.value===this.value),this.formControlController.setValidity(this.validity?.valid)}handleSizeChange(){this.syncRadios()}handleValueChange(){this.hasUpdated&&this.updateCheckedRadio()}checkValidity(){let t=this.required&&!this.value,r=this.customValidityMessage!=="";return t||r?(this.formControlController.emitInvalidEvent(),!1):!0}getForm(){return this.formControlController.getForm()}reportValidity(){let t=this.validity?.valid;return this.errorMessage=this.customValidityMessage||t?"":this.validationInput.validationMessage,this.formControlController.setValidity(t),this.validationInput.hidden=!0,clearTimeout(this.validationTimeout),t||(this.validationInput.hidden=!1,this.validationInput.reportValidity(),this.validationTimeout=setTimeout(()=>this.validationInput.hidden=!0,1e4)),t}setCustomValidity(t=""){this.customValidityMessage=t,this.errorMessage=t,this.validationInput.setCustomValidity(t),this.formControlController.updateValidity()}focus(t){let r=this.getAllRadios(),n=r.find(l=>l.checked),a=r.find(l=>!l.disabled),s=n||a;s&&s.focus(t)}render(){let t=this.hasSlotController.test("label"),r=this.hasSlotController.test("label-tooltip"),n=this.hasSlotController.test("help-text"),a=this.label?!0:!!t,s=this.labelTooltip?!0:r,l=this.helpText?!0:!!n,d=u`
3359
3362
  <slot @slotchange=${this.syncRadios} @click=${this.handleRadioClick} @keydown=${this.handleKeyDown}></slot>
3360
3363
  `;return u`
3361
3364
  <fieldset
@@ -3405,7 +3408,7 @@ ${ma(this.code(o,t))}
3405
3408
  <slot name="help-text">${this.helpText}</slot>
3406
3409
  </div>
3407
3410
  </fieldset>
3408
- `}};de.styles=E(r_),c([F("slot:not([name])")],de.prototype,"defaultSlot",2),c([F(".radio-group__validation-input")],de.prototype,"validationInput",2),c([H()],de.prototype,"errorMessage",2),c([H()],de.prototype,"defaultValue",2),c([p()],de.prototype,"label",2),c([p({attribute:"label-tooltip"})],de.prototype,"labelTooltip",2),c([p({attribute:"help-text"})],de.prototype,"helpText",2),c([p()],de.prototype,"name",2),c([p({reflect:!0})],de.prototype,"value",2),c([p({reflect:!0})],de.prototype,"size",2),c([p({type:Boolean,reflect:!0})],de.prototype,"horizontal",2),c([p({type:Boolean,reflect:!0})],de.prototype,"contained",2),c([p({reflect:!0})],de.prototype,"form",2),c([p({type:Boolean,reflect:!0})],de.prototype,"required",2),c([K("size",{waitUntilFirstUpdate:!0})],de.prototype,"handleSizeChange",1),c([K("value")],de.prototype,"handleValueChange",1);var x6=de;de.define("zn-radio-group");var o_=(i,o,t)=>{let r=new Map;for(let n=o;n<=t;n++)r.set(i[n],n);return r},Li=ie(class extends je{constructor(i){if(super(i),i.type!==Je.CHILD)throw Error("repeat() can only be used in text expressions")}dt(i,o,t){let r;t===void 0?t=o:o!==void 0&&(r=o);let n=[],a=[],s=0;for(let l of i)n[s]=r?r(l,s):s,a[s]=t(l,s),s++;return{values:a,keys:n}}render(i,o,t){return this.dt(i,o,t).values}update(i,[o,t,r]){let n=ug(i),{values:a,keys:s}=this.dt(o,t,r);if(!Array.isArray(n))return this.ut=s,a;let l=this.ut??(this.ut=[]),d=[],h,m,f=0,b=n.length-1,g=0,v=a.length-1;for(;f<=b&&g<=v;)if(n[f]===null)f++;else if(n[b]===null)b--;else if(l[f]===s[g])d[g]=ri(n[f],a[g]),f++,g++;else if(l[b]===s[v])d[v]=ri(n[b],a[v]),b--,v--;else if(l[f]===s[v])d[v]=ri(n[f],a[v]),$a(i,d[v+1],n[f]),f++,v--;else if(l[b]===s[g])d[g]=ri(n[b],a[g]),$a(i,n[f],n[b]),b--,g++;else if(h===void 0&&(h=o_(s,g,v),m=o_(l,f,b)),h.has(l[f]))if(h.has(l[b])){let x=m.get(s[g]),k=x!==void 0?n[x]:null;if(k===null){let _=$a(i,n[f]);ri(_,a[g]),d[g]=_}else d[g]=ri(k,a[g]),$a(i,n[f],k),n[x]=null;g++}else Mc(n[b]),b--;else Mc(n[f]),f++;for(;g<=v;){let x=$a(i,d[v+1]);ri(x,a[g]),d[g++]=x}for(;f<=b;){let x=n[f++];x!==null&&Mc(x)}return this.ut=s,La(i,d),ne}});var n_=A`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}:host *,:host *::before,:host *::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}.form-control-input{margin:var(--zn-spacing-2x-small) 3px 3px 0}.form-control-input--flush{margin:0}.form-control .form-control__label{display:none}.form-control .form-control__help-text{display:none}.form-control--has-label .form-control__label{display:inline-block;color:var(--zn-input-label-color);font-weight:var(--zn-input-label-font-weight);line-height:var(--zn-input-label-line-height);margin-bottom:var(--zn-spacing-x-small)}.form-control--has-label.form-control--medium .form-control__label{font-size:var(--zn-input-label-font-size-medium)}.form-control--has-label.form-control--large .form-control__label{font-size:var(--zn-input-label-font-size-large)}:host([required]) .form-control--has-label .form-control__label::after{content:var(--zn-input-required-content);margin-inline-start:var(--zn-input-required-content-offset);color:var(--zn-input-required-content-color)}.form-control--has-label.form-control--radio-group .form-control__label,.form-control--has-label.form-control--checkbox-group .form-control__label{margin-bottom:0}.form-control--has-label.form-control--has-label-tooltip .form-control__label{display:inline-flex;align-items:center;gap:var(--zn-spacing-2x-small)}.form-control--has-label.form-control--small .form-control__label{font-size:var(--zn-input-label-font-size-small)}.form-control--label-tooltip{color:var(--zn-color-neutral-700);font-size:var(--zn-font-size-small)}.form-control--label-tooltip zn-icon{--icon-color:var(--zn-color-neutral-700);--icon-size:var(--zn-font-size-small)}.form-control--has-label.form-control--has-context-note{display:flex;justify-content:space-between;flex-wrap:wrap}.form-control__label-context-note{color:var(--zn-input-help-text-color);font-size:var(--zn-font-size-small);margin-bottom:var(--zn-spacing-2x-small)}.form-control--has-label.form-control--has-context-note .form-control-input{width:100%}.form-control--has-help-text .form-control__help-text,.radio--has-description .radio__description,.checkbox--has-description .checkbox__description{display:block;color:var(--zn-input-help-text-color);margin-top:var(--zn-spacing-x-small)}.radio--has-description .radio__description,.checkbox--has-description .checkbox__description{margin-top:0.375rem}.radio--has-selected-content .radio__selected-content,.checkbox--has-selected-content .checkbox__selected-content{display:block;margin-top:var(--zn-spacing-small)}.form-control--has-help-text.form-control--small .form-control__help-text{font-size:var(--zn-input-help-text-font-size-small)}.form-control--has-help-text.form-control--medium .form-control__help-text,.radio--has-description .radio__description,.checkbox--has-description .checkbox__description{font-size:var(--zn-input-help-text-font-size-medium)}.form-control--has-help-text.form-control--large .form-control__help-text{font-size:var(--zn-input-help-text-font-size-large)}.form-control--has-help-text.form-control--radio-group .form-control__help-text,.form-control--has-help-text.form-control--checkbox-group .form-control__help-text{margin-top:var(--zn-spacing-medium)}.form-control--has-help-text .switch .form-control__help-text{margin-top:var(--zn-spacing-3x-small)}.form-control--checkbox-contained-wrapper{height:100%}:host{display:block}.input__control{border:0;clip-path:inset(50%);height:1px;margin:0;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}.form-control--droparea .input__control{left:50%}.form-control-input{position:relative}.button__wrapper{align-items:center;display:flex;gap:var(--zn-input-spacing-medium)}.form-control--small .button__wrapper{gap:var(--zn-input-spacing-small)}:host([size=large]) .button__wrapper{gap:var(--zn-input-spacing-large)}.input__value{display:inline-flex;justify-content:center;align-items:center;gap:var(--zn-spacing-small);color:var(--zn-input-color);font-size:var(--zn-input-label-font-size-medium)}.input__value.input__value--hidden{display:none}.input__delete{cursor:pointer;color:var(--zn-input-color);font-size:var(--zn-input-label-font-size-medium)}.input__delete:hover{color:var(--zn-color-primary-600)}.input__value--placeholder{color:var(--zn-input-help-text-color)}.form-control--small .input__value{font-size:var(--zn-input-label-font-size-small)}.form-control--large .input__value{font-size:var(--zn-input-label-font-size-large)}.form-control--user-dragging:not([disabled]) .button::part(base){background:none;border-color:var(--zn-color-primary-900);color:var(--zn-color-primary-900)}.droparea{--highlight-color:var(--zn-color-primary-600);position:relative;border:1px solid var(--zn-input-border-color);border-radius:var(--zn-border-radius);font:var(--zn-font-size-medium);min-height:180px;transition:var(--zn-transition-medium) background,var(--zn-transition-medium) border-color}.droparea:focus-visible{border-color:var(--zn-color-primary-600);outline:var(--zn-focus-ring);outline-offset:var(--zn-focus-ring-offset)}:host([disabled]) .droparea{--highlight-color:var(--zn-color-neutral-600)}:host([disabled]) .input__value{display:none}.droparea__background{align-items:center;display:flex;justify-content:center;gap:var(--zn-spacing-x-small);padding:var(--zn-spacing-large) var(--zn-spacing-medium);width:100%;height:100%;min-height:inherit;box-sizing:border-box}.droparea__clear{position:absolute;top:var(--zn-spacing-small);right:var(--zn-spacing-small);z-index:1}.droparea__upload{text-transform:uppercase;letter-spacing:0.02em}.droparea--has-preview .droparea__background{--zn-droparea-checker-size:12px;--zn-droparea-checker-a:var(--zn-color-neutral-50);--zn-droparea-checker-b:var(--zn-color-neutral-100);background-color:var(--zn-droparea-checker-a);background-image:linear-gradient(45deg,var(--zn-droparea-checker-b) 25%,transparent 25%),linear-gradient(-45deg,var(--zn-droparea-checker-b) 25%,transparent 25%),linear-gradient(45deg,transparent 75%,var(--zn-droparea-checker-b) 75%),linear-gradient(-45deg,transparent 75%,var(--zn-droparea-checker-b) 75%);background-size:var(--zn-droparea-checker-size) var(--zn-droparea-checker-size);background-position:0 0,0 calc(var(--zn-droparea-checker-size) / 2),calc(var(--zn-droparea-checker-size) / 2) calc(var(--zn-droparea-checker-size) / -2),calc(var(--zn-droparea-checker-size) / -2) 0;border-radius:calc(var(--zn-border-radius) - 1px)}.droparea__preview{display:block;position:relative;z-index:1;width:100%;height:150px;max-width:100%;-o-object-fit:contain;object-fit:contain;overflow:hidden;overflow-wrap:anywhere;word-break:break-word;text-align:center;font-size:var(--zn-input-help-text-font-size-medium);color:var(--zn-input-color)}.droparea__filename{color:var(--zn-input-color);font-size:var(--zn-input-label-font-size-medium);font-weight:var(--zn-font-weight-medium);word-break:break-all;text-align:center;padding:0 var(--zn-spacing-3x-large)}.file-wrapper{display:flex;flex-direction:row;flex-wrap:wrap}.form-control--small .droparea{font:var(--zn-font-size-small);min-height:140px}.form-control--small .droparea__preview{height:110px}.form-control--large .droparea{font:var(--zn-font-size-large);min-height:220px}.form-control--large .droparea__preview{height:190px}:host([disabled]) .droparea,:host([disabled]) .input__value{cursor:not-allowed;opacity:0.5}:host(:not([disabled])) .form-control--user-dragging .droparea{background:var(--zn-color-primary-50);border-color:var(--zn-color-primary-600);cursor:pointer}:host(:not([disabled])) .droparea:not(:focus-visible):hover{--highlight-color:var(--zn-color-primary-800);border-color:var(--zn-color-primary-700);cursor:pointer}:host(:not([disabled])) .droparea:hover .droparea__upload::part(base),:host(:not([disabled])) .droparea__upload:hover::part(base),:host(:not([disabled])) .form-control--user-dragging .droparea__upload::part(base){background:var(--zn-color-primary-50);border-color:var(--zn-color-primary-700);color:var(--zn-color-primary-800)}.droparea__upload::part(icon){pointer-events:none}:host([data-user-invalid]:not([disabled])) .droparea{border-color:var(--zn-color-error)}.clear-confirm__text{margin:0;color:var(--zn-input-color)}.form-control__link{display:inline-block;margin-top:var(--zn-spacing-x-small);font-size:var(--zn-input-help-text-font-size-medium);color:var(--zn-color-primary-700);word-break:break-all;text-decoration:none;max-width:100%}.form-control__link:hover{color:var(--zn-color-primary-800);text-decoration:underline}`;var vt=class extends C{constructor(){super(...arguments);this.formControlController=new ot(this,{assumeInteractionOn:["zn-change"],value:t=>t.files});this.hasSlotController=new J(this,"help-text","label");this.localize=new Ye(this);this.userIsDragging=!1;this.fileObjectUrl=null;this.name="";this.defaultValue="";this.size="medium";this.label="";this.clearable=!1;this.helpText="";this.disabled=!1;this.droparea=!1;this.accept="";this.multiple=!1;this.webkitdirectory=!1;this.form="";this.required=!1;this.hideValue=!1;this.src="";this.triggerSubmit=!1;this.showLink=!1;this.handleInvalid=t=>{this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(t)};this.handleDragOver=t=>{t.preventDefault(),t.stopPropagation(),this.userIsDragging=!0};this.handleDragLeave=t=>{t.preventDefault(),t.stopPropagation(),this.userIsDragging=!1};this.handleDrop=async t=>{if(t.preventDefault(),t.stopPropagation(),!t.dataTransfer)return;let r=await this.handleTransferItems(t.dataTransfer.items);if(this.userIsDragging=!1,!r)return;if(!this.multiple&&!this.webkitdirectory&&r.length>1){this.emit("zn-error");return}if(this.hasSlotController.test("trigger"))this.handleFiles(r);else{let a=this.inputChosen,s=this.dropareaIcon;if(this.droparea&&s){let l=dn(s,"file.iconDrop",{dir:this.localize.dir()});ln(s,l.keyframes,l.options)}if(a){let l=dn(a,"file.text.disappear",{dir:this.localize.dir()});await ln(a,l.keyframes,l.options)}if(this.handleFiles(r),a){let l=dn(a,"file.text.appear",{dir:this.localize.dir()});await ln(a,l.keyframes,l.options)}}this.input.dispatchEvent(new Event("change"))};this.removeFile=t=>{t.preventDefault(),t.stopPropagation();let r=Array.from(this.files||[]),n=t.target.parentElement?.getAttribute("data-file-name"),a=r.findIndex(l=>l.name===n);a!==-1&&r.splice(a,1);let s=new DataTransfer;r.forEach(l=>s.items.add(l)),this.files=s.files,this.input.dispatchEvent(new Event("change"))};this.handleClearClick=t=>{t.preventDefault(),t.stopPropagation(),this.clearConfirmDialog?.show()};this.confirmClear=()=>{let t=(this.files?.length??0)>0;this.input.value="",this.files=null,t||(this.src=""),this.clearConfirmDialog?.hide(),this.input.dispatchEvent(new Event("change")),this.emit("zn-clear")}}set files(t){this.input&&(this.input.files=t,this.updatePreview())}get files(){return this.input?.files}set value(t){this.input&&(this.input.value=t)}get value(){return this.input?.value}get validity(){return this.input?.validity}get validationMessage(){return this.input.validationMessage}checkValidity(){return this.input.checkValidity()}getForm(){return this.formControlController.getForm()}reportValidity(){return this.input.reportValidity()}setCustomValidity(t){this.input.setCustomValidity(t),this.formControlController.updateValidity()}handleDisabledChange(){this.formControlController.setValidity(this.disabled)}async handleValueChange(){await this.updateComplete,this.formControlController.updateValidity()}focus(t){if(this.droparea){this.dropareaWrapper?.focus(t);return}this.button?.focus(t)}blur(){if(this.droparea){this.dropareaWrapper?.blur();return}this.button?.blur()}handleFiles(t){if(!t){this.value="";return}this.files=t}async handleTransferItems(t){if(!t)return this.value="",new Promise((d,h)=>{h(new Error("No proper items found"))});let n=Array.from(t).map(d=>d.webkitGetAsEntry()).map(d=>this.getFilesFromEntry(d)),s=(await Promise.all(n)).flat(),l=new DataTransfer;return Array.from(s).forEach(d=>l.items.add(d)),l.files}async getFilesFromEntry(t){return t?t.isFile?new Promise((r,n)=>{t.file(a=>r([a]),n)}):t.isDirectory?new Promise((r,n)=>{t.createReader().readEntries(s=>{Promise.all(s.map(l=>this.getFilesFromEntry(l))).then(l=>{r(l.flat())}).catch(n)})}):[]:[]}handleClick(t){t.preventDefault(),this.input.click()}handleChange(t){t.preventDefault(),t.stopPropagation(),this.updatePreview(),this.emit("zn-input"),this.emit("zn-change"),this.triggerSubmit&&this.formControlController.submit()}handleFocus(){this.emit("zn-focus")}handleBlur(){this.emit("zn-blur")}updatePreview(){this.fileObjectUrl&&(URL.revokeObjectURL(this.fileObjectUrl),this.fileObjectUrl=null);let t=this.files?.[0];t&&t.type.startsWith("image/")&&(this.fileObjectUrl=URL.createObjectURL(t))}get previewSrc(){return this.fileObjectUrl??this.src??""}disconnectedCallback(){super.disconnectedCallback(),this.fileObjectUrl&&(URL.revokeObjectURL(this.fileObjectUrl),this.fileObjectUrl=null)}renderFileValueWithDelete(){let t=Array.from(this.files||[]),r=this.clearable,n=this.localize.term("numFilesSelected",0,this.webkitdirectory);return u`
3411
+ `}};pe.styles=E(r_),c([F("slot:not([name])")],pe.prototype,"defaultSlot",2),c([F(".radio-group__validation-input")],pe.prototype,"validationInput",2),c([H()],pe.prototype,"errorMessage",2),c([H()],pe.prototype,"defaultValue",2),c([p()],pe.prototype,"label",2),c([p({attribute:"label-tooltip"})],pe.prototype,"labelTooltip",2),c([p({attribute:"help-text"})],pe.prototype,"helpText",2),c([p()],pe.prototype,"name",2),c([p({reflect:!0})],pe.prototype,"value",2),c([p({reflect:!0})],pe.prototype,"size",2),c([p({type:Boolean,reflect:!0})],pe.prototype,"horizontal",2),c([p({type:Boolean,reflect:!0})],pe.prototype,"contained",2),c([p({reflect:!0})],pe.prototype,"form",2),c([p({type:Boolean,reflect:!0})],pe.prototype,"required",2),c([K("size",{waitUntilFirstUpdate:!0})],pe.prototype,"handleSizeChange",1),c([K("value")],pe.prototype,"handleValueChange",1);var x6=pe;pe.define("zn-radio-group");var o_=(i,o,t)=>{let r=new Map;for(let n=o;n<=t;n++)r.set(i[n],n);return r},Li=ie(class extends je{constructor(i){if(super(i),i.type!==Je.CHILD)throw Error("repeat() can only be used in text expressions")}dt(i,o,t){let r;t===void 0?t=o:o!==void 0&&(r=o);let n=[],a=[],s=0;for(let l of i)n[s]=r?r(l,s):s,a[s]=t(l,s),s++;return{values:a,keys:n}}render(i,o,t){return this.dt(i,o,t).values}update(i,[o,t,r]){let n=ug(i),{values:a,keys:s}=this.dt(o,t,r);if(!Array.isArray(n))return this.ut=s,a;let l=this.ut??(this.ut=[]),d=[],h,m,f=0,b=n.length-1,g=0,v=a.length-1;for(;f<=b&&g<=v;)if(n[f]===null)f++;else if(n[b]===null)b--;else if(l[f]===s[g])d[g]=ri(n[f],a[g]),f++,g++;else if(l[b]===s[v])d[v]=ri(n[b],a[v]),b--,v--;else if(l[f]===s[v])d[v]=ri(n[f],a[v]),$a(i,d[v+1],n[f]),f++,v--;else if(l[b]===s[g])d[g]=ri(n[b],a[g]),$a(i,n[f],n[b]),b--,g++;else if(h===void 0&&(h=o_(s,g,v),m=o_(l,f,b)),h.has(l[f]))if(h.has(l[b])){let x=m.get(s[g]),k=x!==void 0?n[x]:null;if(k===null){let _=$a(i,n[f]);ri(_,a[g]),d[g]=_}else d[g]=ri(k,a[g]),$a(i,n[f],k),n[x]=null;g++}else Mc(n[b]),b--;else Mc(n[f]),f++;for(;g<=v;){let x=$a(i,d[v+1]);ri(x,a[g]),d[g++]=x}for(;f<=b;){let x=n[f++];x!==null&&Mc(x)}return this.ut=s,La(i,d),ne}});var n_=A`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}:host *,:host *::before,:host *::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}.form-control-input{margin:var(--zn-spacing-2x-small) 3px 3px 0}.form-control-input--flush{margin:0}.form-control .form-control__label{display:none}.form-control .form-control__help-text{display:none}.form-control--has-label .form-control__label{display:inline-block;color:var(--zn-input-label-color);font-weight:var(--zn-input-label-font-weight);line-height:var(--zn-input-label-line-height);margin-bottom:var(--zn-spacing-x-small)}.form-control--has-label.form-control--medium .form-control__label{font-size:var(--zn-input-label-font-size-medium)}.form-control--has-label.form-control--large .form-control__label{font-size:var(--zn-input-label-font-size-large)}:host([required]) .form-control--has-label .form-control__label::after{content:var(--zn-input-required-content);margin-inline-start:var(--zn-input-required-content-offset);color:var(--zn-input-required-content-color)}.form-control--has-label.form-control--radio-group .form-control__label,.form-control--has-label.form-control--checkbox-group .form-control__label{margin-bottom:0}.form-control--has-label.form-control--has-label-tooltip .form-control__label{display:inline-flex;align-items:center;gap:var(--zn-spacing-2x-small)}.form-control--has-label.form-control--small .form-control__label{font-size:var(--zn-input-label-font-size-small)}.form-control--label-tooltip{color:var(--zn-color-neutral-700);font-size:var(--zn-font-size-small)}.form-control--label-tooltip zn-icon{--icon-color:var(--zn-color-neutral-700);--icon-size:var(--zn-font-size-small)}.form-control--has-label.form-control--has-context-note{display:flex;justify-content:space-between;flex-wrap:wrap}.form-control__label-context-note{color:var(--zn-input-help-text-color);font-size:var(--zn-font-size-small);margin-bottom:var(--zn-spacing-2x-small)}.form-control--has-label.form-control--has-context-note .form-control-input{width:100%}.form-control--has-help-text .form-control__help-text,.radio--has-description .radio__description,.checkbox--has-description .checkbox__description{display:block;color:var(--zn-input-help-text-color);margin-top:var(--zn-spacing-x-small)}.radio--has-description .radio__description,.checkbox--has-description .checkbox__description{margin-top:0.375rem}.radio--has-selected-content .radio__selected-content,.checkbox--has-selected-content .checkbox__selected-content{display:block;margin-top:var(--zn-spacing-small)}.form-control--has-help-text.form-control--small .form-control__help-text{font-size:var(--zn-input-help-text-font-size-small)}.form-control--has-help-text.form-control--medium .form-control__help-text,.radio--has-description .radio__description,.checkbox--has-description .checkbox__description{font-size:var(--zn-input-help-text-font-size-medium)}.form-control--has-help-text.form-control--large .form-control__help-text{font-size:var(--zn-input-help-text-font-size-large)}.form-control--has-help-text.form-control--radio-group .form-control__help-text,.form-control--has-help-text.form-control--checkbox-group .form-control__help-text{margin-top:var(--zn-spacing-medium)}.form-control--has-help-text .switch .form-control__help-text{margin-top:var(--zn-spacing-3x-small)}.form-control--checkbox-contained-wrapper{height:100%}:host{display:block}.input__control{border:0;clip-path:inset(50%);height:1px;margin:0;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}.form-control--droparea .input__control{left:50%}.form-control-input{position:relative}.button__wrapper{align-items:center;display:flex;gap:var(--zn-input-spacing-medium)}.form-control--small .button__wrapper{gap:var(--zn-input-spacing-small)}:host([size=large]) .button__wrapper{gap:var(--zn-input-spacing-large)}.input__value{display:inline-flex;justify-content:center;align-items:center;gap:var(--zn-spacing-small);color:var(--zn-input-color);font-size:var(--zn-input-label-font-size-medium)}.input__value.input__value--hidden{display:none}.input__delete{cursor:pointer;color:var(--zn-input-color);font-size:var(--zn-input-label-font-size-medium)}.input__delete:hover{color:var(--zn-color-primary-600)}.input__value--placeholder{color:var(--zn-input-help-text-color)}.form-control--small .input__value{font-size:var(--zn-input-label-font-size-small)}.form-control--large .input__value{font-size:var(--zn-input-label-font-size-large)}.form-control--user-dragging:not([disabled]) .button::part(base){background:none;border-color:var(--zn-color-primary-900);color:var(--zn-color-primary-900)}.droparea{--highlight-color:var(--zn-color-primary-600);position:relative;border:1px solid var(--zn-input-border-color);border-radius:var(--zn-border-radius);font:var(--zn-font-size-medium);min-height:180px;transition:var(--zn-transition-medium) background,var(--zn-transition-medium) border-color}.droparea:focus-visible{border-color:var(--zn-color-primary-600);outline:var(--zn-focus-ring);outline-offset:var(--zn-focus-ring-offset)}:host([disabled]) .droparea{--highlight-color:var(--zn-color-neutral-600)}:host([disabled]) .input__value{display:none}.droparea__background{align-items:center;display:flex;justify-content:center;gap:var(--zn-spacing-x-small);padding:var(--zn-spacing-large) var(--zn-spacing-medium);width:100%;height:100%;min-height:inherit;box-sizing:border-box}.droparea__clear{position:absolute;top:var(--zn-spacing-small);right:var(--zn-spacing-small);z-index:1}.droparea__upload{text-transform:uppercase;letter-spacing:0.02em}.droparea--has-preview .droparea__background{--zn-droparea-checker-size:12px;--zn-droparea-checker-a:var(--zn-color-neutral-50);--zn-droparea-checker-b:var(--zn-color-neutral-100);background-color:var(--zn-droparea-checker-a);background-image:linear-gradient(45deg,var(--zn-droparea-checker-b) 25%,transparent 25%),linear-gradient(-45deg,var(--zn-droparea-checker-b) 25%,transparent 25%),linear-gradient(45deg,transparent 75%,var(--zn-droparea-checker-b) 75%),linear-gradient(-45deg,transparent 75%,var(--zn-droparea-checker-b) 75%);background-size:var(--zn-droparea-checker-size) var(--zn-droparea-checker-size);background-position:0 0,0 calc(var(--zn-droparea-checker-size) / 2),calc(var(--zn-droparea-checker-size) / 2) calc(var(--zn-droparea-checker-size) / -2),calc(var(--zn-droparea-checker-size) / -2) 0;border-radius:calc(var(--zn-border-radius) - 1px)}.droparea__preview{display:block;position:relative;z-index:1;width:100%;height:150px;max-width:100%;-o-object-fit:contain;object-fit:contain;overflow:hidden;overflow-wrap:anywhere;word-break:break-word;text-align:center;font-size:var(--zn-input-help-text-font-size-medium);color:var(--zn-input-color)}.droparea__filename{color:var(--zn-input-color);font-size:var(--zn-input-label-font-size-medium);font-weight:var(--zn-font-weight-medium);word-break:break-all;text-align:center;padding:0 var(--zn-spacing-3x-large)}.file-wrapper{display:flex;flex-direction:row;flex-wrap:wrap}.form-control--small .droparea{font:var(--zn-font-size-small);min-height:140px}.form-control--small .droparea__preview{height:110px}.form-control--large .droparea{font:var(--zn-font-size-large);min-height:220px}.form-control--large .droparea__preview{height:190px}:host([disabled]) .droparea,:host([disabled]) .input__value{cursor:not-allowed;opacity:0.5}:host(:not([disabled])) .form-control--user-dragging .droparea{background:var(--zn-color-primary-50);border-color:var(--zn-color-primary-600);cursor:pointer}:host(:not([disabled])) .droparea:not(:focus-visible):hover{--highlight-color:var(--zn-color-primary-800);border-color:var(--zn-color-primary-700);cursor:pointer}:host(:not([disabled])) .droparea:hover .droparea__upload::part(base),:host(:not([disabled])) .droparea__upload:hover::part(base),:host(:not([disabled])) .form-control--user-dragging .droparea__upload::part(base){background:var(--zn-color-primary-50);border-color:var(--zn-color-primary-700);color:var(--zn-color-primary-800)}.droparea__upload::part(icon){pointer-events:none}:host([data-user-invalid]:not([disabled])) .droparea{border-color:var(--zn-color-error)}.clear-confirm__text{margin:0;color:var(--zn-input-color)}.form-control__link{display:inline-block;margin-top:var(--zn-spacing-x-small);font-size:var(--zn-input-help-text-font-size-medium);color:var(--zn-color-primary-700);word-break:break-all;text-decoration:none;max-width:100%}.form-control__link:hover{color:var(--zn-color-primary-800);text-decoration:underline}`;var vt=class extends C{constructor(){super(...arguments);this.formControlController=new ot(this,{assumeInteractionOn:["zn-change"],value:t=>t.files});this.hasSlotController=new J(this,"help-text","label");this.localize=new Ye(this);this.userIsDragging=!1;this.fileObjectUrl=null;this.name="";this.defaultValue="";this.size="medium";this.label="";this.clearable=!1;this.helpText="";this.disabled=!1;this.droparea=!1;this.accept="";this.multiple=!1;this.webkitdirectory=!1;this.form="";this.required=!1;this.hideValue=!1;this.src="";this.triggerSubmit=!1;this.showLink=!1;this.handleInvalid=t=>{this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(t)};this.handleDragOver=t=>{t.preventDefault(),t.stopPropagation(),this.userIsDragging=!0};this.handleDragLeave=t=>{t.preventDefault(),t.stopPropagation(),this.userIsDragging=!1};this.handleDrop=async t=>{if(t.preventDefault(),t.stopPropagation(),!t.dataTransfer)return;let r=await this.handleTransferItems(t.dataTransfer.items);if(this.userIsDragging=!1,!r)return;if(!this.multiple&&!this.webkitdirectory&&r.length>1){this.emit("zn-error");return}if(this.hasSlotController.test("trigger"))this.handleFiles(r);else{let a=this.inputChosen,s=this.dropareaIcon;if(this.droparea&&s){let l=dn(s,"file.iconDrop",{dir:this.localize.dir()});ln(s,l.keyframes,l.options)}if(a){let l=dn(a,"file.text.disappear",{dir:this.localize.dir()});await ln(a,l.keyframes,l.options)}if(this.handleFiles(r),a){let l=dn(a,"file.text.appear",{dir:this.localize.dir()});await ln(a,l.keyframes,l.options)}}this.input.dispatchEvent(new Event("change"))};this.removeFile=t=>{t.preventDefault(),t.stopPropagation();let r=Array.from(this.files||[]),n=t.target.parentElement?.getAttribute("data-file-name"),a=r.findIndex(l=>l.name===n);a!==-1&&r.splice(a,1);let s=new DataTransfer;r.forEach(l=>s.items.add(l)),this.files=s.files,this.input.dispatchEvent(new Event("change"))};this.handleClearClick=t=>{t.preventDefault(),t.stopPropagation(),this.clearConfirmDialog?.show()};this.confirmClear=()=>{let t=(this.files?.length??0)>0;this.input.value="",this.files=null,t||(this.src=""),this.clearConfirmDialog?.hide(),this.input.dispatchEvent(new Event("change")),this.emit("zn-clear")}}set files(t){this.input&&(this.input.files=t,this.updatePreview())}get files(){return this.input?.files}set value(t){this.input&&(this.input.value=t)}get value(){return this.input?.value}get validity(){return this.input?.validity}get validationMessage(){return this.input.validationMessage}checkValidity(){return this.input.checkValidity()}getForm(){return this.formControlController.getForm()}reportValidity(){return this.input.reportValidity()}setCustomValidity(t){this.input.setCustomValidity(t),this.formControlController.updateValidity()}handleDisabledChange(){this.formControlController.setValidity(this.disabled)}async handleValueChange(){await this.updateComplete,this.formControlController.updateValidity()}focus(t){if(this.droparea){this.dropareaWrapper?.focus(t);return}this.button?.focus(t)}blur(){if(this.droparea){this.dropareaWrapper?.blur();return}this.button?.blur()}handleFiles(t){if(!t){this.value="";return}this.files=t}async handleTransferItems(t){if(!t)return this.value="",new Promise((d,h)=>{h(new Error("No proper items found"))});let n=Array.from(t).map(d=>d.webkitGetAsEntry()).map(d=>this.getFilesFromEntry(d)),s=(await Promise.all(n)).flat(),l=new DataTransfer;return Array.from(s).forEach(d=>l.items.add(d)),l.files}async getFilesFromEntry(t){return t?t.isFile?new Promise((r,n)=>{t.file(a=>r([a]),n)}):t.isDirectory?new Promise((r,n)=>{t.createReader().readEntries(s=>{Promise.all(s.map(l=>this.getFilesFromEntry(l))).then(l=>{r(l.flat())}).catch(n)})}):[]:[]}handleClick(t){t.preventDefault(),this.input.click()}handleChange(t){t.preventDefault(),t.stopPropagation(),this.updatePreview(),this.emit("zn-input"),this.emit("zn-change"),this.triggerSubmit&&this.formControlController.submit()}handleFocus(){this.emit("zn-focus")}handleBlur(){this.emit("zn-blur")}updatePreview(){this.fileObjectUrl&&(URL.revokeObjectURL(this.fileObjectUrl),this.fileObjectUrl=null);let t=this.files?.[0];t&&t.type.startsWith("image/")&&(this.fileObjectUrl=URL.createObjectURL(t))}get previewSrc(){return this.fileObjectUrl??this.src??""}disconnectedCallback(){super.disconnectedCallback(),this.fileObjectUrl&&(URL.revokeObjectURL(this.fileObjectUrl),this.fileObjectUrl=null)}renderFileValueWithDelete(){let t=Array.from(this.files||[]),r=this.clearable,n=this.localize.term("numFilesSelected",0,this.webkitdirectory);return u`
3409
3412
  ${t?u`
3410
3413
  <div class="file_wrapper">
3411
3414
  ${Li(t,a=>u`
@@ -3805,8 +3808,8 @@ ${ma(this.code(o,t))}
3805
3808
  <zn-button icon="keyboard_arrow_down"></zn-button>
3806
3809
  </zn-button-group>
3807
3810
  </div>
3808
- `}checkValidity(){return this._isButton()&&this.button?this.button.checkValidity():!0}getForm(){return this.formControlController.getForm()}reportValidity(){return this._isButton()&&this.button?this.button.reportValidity():!0}setCustomValidity(t){this._isButton()&&(this.button.setCustomValidity(t),this.formControlController.updateValidity())}get validity(){return this._isButton()&&this.button?this.button.validity:Se}get validationMessage(){return this._isButton()&&this.button?this.button.validationMessage:""}_isButton(){return this.type==="submit"||this.type==="button"||this.type==="reset"}};$r.styles=E(C_),c([p()],$r.prototype,"caption",2),c([p()],$r.prototype,"href",2),c([p()],$r.prototype,"name",2),c([p()],$r.prototype,"value",2),c([fe()],$r.prototype,"defaultValue",2),c([p()],$r.prototype,"type",2),c([F("zn-dropdown")],$r.prototype,"dropdown",2),c([F("zn-button#trigger-btn")],$r.prototype,"button",2);var F6=$r;$r.define("zn-split-button");var E_=A`@charset "UTF-8";@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}:host *,:host *::before,:host *::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{display:block;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;background-color:rgba(var(--zn-panel),var(--zn-panel-opacity));border-bottom:1px solid rgb(var(--zn-border-color));padding-inline:calc(var(--zn-gutter,0) + var(--zn-base-gap,0))}:host *,:host *::before,:host *::after{box-sizing:border-box}.content-block-header{display:flex;align-items:center;gap:var(--zn-spacing-small);width:100%;max-width:100%;padding-block:var(--zn-spacing-small);position:relative}.content-block--collapsible .content-block-header{cursor:pointer}.content-block-header__icon{display:flex;align-items:center;flex-shrink:0}.content-block-header__main{display:flex;flex-direction:row;align-items:center;gap:var(--zn-spacing-small);min-width:0;flex-grow:1;overflow:hidden}.content-block-header__caption{font-weight:var(--zn-text-h1-font-weight);font-size:var(--zn-text-h1-font-size);color:rgba(var(--zn-text-panel-title),100%);line-height:var(--zn-icon-size,20px);margin:0;display:flex;align-items:center;gap:var(--zn-spacing-small);flex-shrink:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.content-block-header__subject{flex:1 1 auto;min-width:0;font-size:var(--zn-font-size-medium);overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.content-block-header__subject--empty{opacity:0.5}.content-block-header__description{flex:1 1 auto;min-width:0;font-size:var(--zn-font-size-medium);color:rgb(var(--zn-text-muted));overflow:hidden;white-space:nowrap;text-overflow:ellipsis;display:none}.content-block-header__attachments{display:inline-flex;align-items:center;gap:var(--zn-spacing-2x-small);font-size:var(--zn-font-size-small);color:rgb(var(--zn-text-muted));flex-shrink:0;margin-left:auto}.content-block-header__actions{display:flex;align-items:center;gap:var(--zn-spacing-small);margin-left:auto;flex-shrink:0}.content-block__attachments{display:none;flex-direction:row;flex-wrap:wrap;align-items:center;gap:var(--zn-spacing-small);padding-block-end:var(--zn-spacing-small)}.content-block__attachments--visible{display:flex}.content-block__attachments ::slotted(zn-chat-message-attachment){min-width:0}.content-block--short zn-sp,.content-block--short .content-block__attachments{display:none}.content-block--short .content-block-header__description{display:block}@container (max-width:599px){.content-block--short .content-block-header__description{display:none}}.text-section{font-family:var(--zn-font-sans);font-size:var(--zn-text-paragraph-font-size);font-weight:var(--zn-text-paragraph-font-weight);line-height:var(--zn-text-paragraph-line-height);color:var(--zn-text-paragraph-color);text-transform:var(--zn-text-paragraph-transform)}.text-section a{font-size:var(--zn-font-size-small);opacity:0.8}.hidden{display:none}ol{counter-reset:list-0 0}@supports (counter-set:none){ol li,ul li{counter-set:list-1 0 list-2 0 list-3 0 list-4 0 list-5 0 list-6 0 list-7 0 list-8 0 list-9 0}}ol,ul{padding:0;margin:0}li[data-list=checked]>.ql-ui,li[data-list=unchecked]>.ql-ui{color:#777}li{list-style-type:none;position:relative}ul>li::before{content:"•"}ol>li{counter-increment:list-0}ol>li::before{content:counter(list-0) ". "}li[data-list=checked]::before{content:"☑"}li[data-list=unchecked]::before{content:"☐"}li[data-list=checked]::before,li[data-list=unchecked]::before{color:#777}ol li::before,ul li::before{display:inline-block;margin-left:-1.5em;margin-right:0.3em;text-align:right;white-space:nowrap;width:1.2em}li:has(>.ql-ui)::before{content:none;display:none}`;var He=class extends C{constructor(){super(...arguments);this.time="";this.sender="";this.avatar="";this.subject="";this.subjectPlaceholder="";this.outbound=!1;this.noCollapse=!1;this.short=!1;this.defaultDisplay="text";this.hasSlotController=new J(this,"text","html");this.attachmentCount=0;this._textRows=[];this._footerObserver=new Ot(this,{target:null,config:{subtree:!0,childList:!0,attributes:!0,attributeFilter:["href","download","caption"]},callback:()=>this._debouncedReplace()});this._replaceDebounce=0}connectedCallback(){super.connectedCallback(),this.iframe.then(t=>{if(t.contentDocument){let r=this.htmlNodes[0];if(r){let n=r?.innerHTML??"";n=n.replace(/&nbsp;/g," "),n=n.replace(/&lt;/g,"<"),n=n.replace(/&gt;/g,">"),n=n.replace(/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,"");let a="<style>body,html{background-color: #ffffff}img{max-width:100%; max-height: 500px;}</style>";t.srcdoc=a+n}}t.addEventListener("load",()=>{setTimeout(()=>this._resizeIframe(t),50)})})}disconnectedCallback(){this._replaceDebounce&&(clearTimeout(this._replaceDebounce),this._replaceDebounce=0),super.disconnectedCallback()}_collapseContent(t){this.noCollapse||t.composedPath().some(n=>n instanceof HTMLElement&&n.classList.contains("content-block-header__actions"))||(this.short=!this.short,this.requestUpdate(),this.updateComplete.then(()=>{this.short||this.iframe.then(n=>{n&&!n.classList.contains("hidden")&&this._resizeIframe(n)})}))}_toggleText(){let t=this.shadowRoot?.querySelector(".text-content");this.iframe.then(r=>{t&&(r.classList.add("hidden"),t.classList.remove("hidden"))})}_toggleHtml(){let t=this.shadowRoot?.querySelector(".text-content");this.iframe.then(r=>{t&&(r.classList.remove("hidden"),t.classList.add("hidden"),setTimeout(()=>this._resizeIframe(r),0))})}_resizeIframe(t){let r=n=>{let a=n.contentDocument;if(!a)return;n.style.height="auto";let s=a.body,l=a.documentElement,d=[s?.scrollHeight??0,l?.scrollHeight??0,s?.offsetHeight??0,l?.offsetHeight??0],h=Math.max(...d);h>0&&(n.style.height=`${h}px`)};t?r(t):this.iframe.then(n=>{n?.contentDocument&&requestAnimationFrame(()=>r(n))})}handleAttachmentsSlotChange(){this.syncAttachmentCount()}syncAttachmentCount(){let t=this.shadowRoot?.querySelector('slot[name="attachments"]');this.attachmentCount=t?.assignedElements().length??0}firstUpdated(t){super.firstUpdated(t),this.syncAttachmentCount(),Promise.resolve().then(()=>this.syncAttachmentCount());let r=this.shadowRoot?.querySelectorAll(".text-section");r&&r.length>0&&r.forEach(n=>{n.innerHTML=n.innerHTML.replace(/&nbsp;/g," "),n.innerHTML=n.innerHTML.replace(/<!--[\s\S]*?-->/g,""),n.innerHTML=n.innerHTML.replace(/<\/p><br>/g,"</p>")})}render(){let t=this.getTextSections(),r=this.querySelector(':scope > [slot="footer"]')!==null,n=this.hasSlotController.test("text"),a=this.hasSlotController.test("html"),s=n&&a,l=a&&(!n||this.defaultDisplay==="html");return u`
3809
- <div class="${N({"content-block--outbound":this.outbound,"content-block--short":this.short,"content-block--collapsible":!this.noCollapse})}">
3811
+ `}checkValidity(){return this._isButton()&&this.button?this.button.checkValidity():!0}getForm(){return this.formControlController.getForm()}reportValidity(){return this._isButton()&&this.button?this.button.reportValidity():!0}setCustomValidity(t){this._isButton()&&(this.button.setCustomValidity(t),this.formControlController.updateValidity())}get validity(){return this._isButton()&&this.button?this.button.validity:Se}get validationMessage(){return this._isButton()&&this.button?this.button.validationMessage:""}_isButton(){return this.type==="submit"||this.type==="button"||this.type==="reset"}};$r.styles=E(C_),c([p()],$r.prototype,"caption",2),c([p()],$r.prototype,"href",2),c([p()],$r.prototype,"name",2),c([p()],$r.prototype,"value",2),c([fe()],$r.prototype,"defaultValue",2),c([p()],$r.prototype,"type",2),c([F("zn-dropdown")],$r.prototype,"dropdown",2),c([F("zn-button#trigger-btn")],$r.prototype,"button",2);var F6=$r;$r.define("zn-split-button");var E_=A`@charset "UTF-8";@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}:host *,:host *::before,:host *::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}.content-block{background-color:var(--zn-note-background,rgba(var(--zn-panel),var(--zn-panel-opacity)));border-bottom:1px solid rgb(var(--zn-border-color));padding-inline:calc(var(--zn-gutter,0) + var(--zn-base-gap,0))}.content-block-header{display:flex;align-items:center;gap:var(--zn-spacing-small);width:100%;max-width:100%;padding-block:var(--zn-spacing-small);position:relative}.content-block--collapsible .content-block-header{cursor:pointer}.content-block-header__icon{display:flex;align-items:center;flex-shrink:0}.content-block-header__main{display:flex;flex-direction:row;align-items:center;gap:var(--zn-spacing-small);min-width:0;flex-grow:1;overflow:hidden}.content-block-header__caption{font-weight:var(--zn-text-h1-font-weight);font-size:var(--zn-text-h1-font-size);color:rgba(var(--zn-text-panel-title),100%);line-height:var(--zn-icon-size,20px);margin:0;display:flex;align-items:center;gap:var(--zn-spacing-small);flex-shrink:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.content-block-header__subject{flex:1 1 auto;min-width:0;font-size:var(--zn-font-size-medium);overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.content-block-header__subject--empty{opacity:0.5}.content-block-header__description{flex:1 1 auto;min-width:0;font-size:var(--zn-font-size-medium);color:rgb(var(--zn-text-muted));overflow:hidden;white-space:nowrap;text-overflow:ellipsis;display:none}.content-block-header__attachments{display:inline-flex;align-items:center;gap:var(--zn-spacing-2x-small);font-size:var(--zn-font-size-small);color:rgb(var(--zn-text-muted));flex-shrink:0;margin-left:auto}.content-block-header__actions{display:flex;align-items:center;gap:var(--zn-spacing-small);margin-left:auto;flex-shrink:0}.content-block__attachments{display:none;flex-direction:row;flex-wrap:wrap;align-items:center;gap:var(--zn-spacing-small);padding-block-end:var(--zn-spacing-small)}.content-block__attachments--visible{display:flex}.content-block__attachments ::slotted(zn-chat-message-attachment){min-width:0}.content-block--short zn-sp,.content-block--short .content-block__attachments{display:none}.content-block--short .content-block-header__description{display:block}@container (max-width:599px){.content-block--short .content-block-header__description{display:none}}.text-section{font-family:var(--zn-font-sans);font-size:var(--zn-text-paragraph-font-size);font-weight:var(--zn-text-paragraph-font-weight);line-height:var(--zn-text-paragraph-line-height);color:var(--zn-text-paragraph-color);text-transform:var(--zn-text-paragraph-transform)}.text-section a{font-size:var(--zn-font-size-small);opacity:0.8}.hidden{display:none}ol{counter-reset:list-0 0}@supports (counter-set:none){ol li,ul li{counter-set:list-1 0 list-2 0 list-3 0 list-4 0 list-5 0 list-6 0 list-7 0 list-8 0 list-9 0}}ol,ul{padding:0;margin:0}li[data-list=checked]>.ql-ui,li[data-list=unchecked]>.ql-ui{color:#777}li{list-style-type:none;position:relative}ul>li::before{content:"•"}ol>li{counter-increment:list-0}ol>li::before{content:counter(list-0) ". "}li[data-list=checked]::before{content:"☑"}li[data-list=unchecked]::before{content:"☐"}li[data-list=checked]::before,li[data-list=unchecked]::before{color:#777}ol li::before,ul li::before{display:inline-block;margin-left:-1.5em;margin-right:0.3em;text-align:right;white-space:nowrap;width:1.2em}li:has(>.ql-ui)::before{content:none;display:none}`;var He=class extends C{constructor(){super(...arguments);this.time="";this.sender="";this.avatar="";this.subject="";this.subjectPlaceholder="";this.outbound=!1;this.noCollapse=!1;this.short=!1;this.defaultDisplay="text";this.hasSlotController=new J(this,"text","html");this.attachmentCount=0;this._textRows=[];this._footerObserver=new Ot(this,{target:null,config:{subtree:!0,childList:!0,attributes:!0,attributeFilter:["href","download","caption"]},callback:()=>this._debouncedReplace()});this._replaceDebounce=0}connectedCallback(){super.connectedCallback(),this.iframe.then(t=>{if(t.contentDocument){let r=this.htmlNodes[0];if(r){let n=r?.innerHTML??"";n=n.replace(/&nbsp;/g," "),n=n.replace(/&lt;/g,"<"),n=n.replace(/&gt;/g,">"),n=n.replace(/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,"");let a="<style>body,html{background-color: #ffffff}img{max-width:100%; max-height: 500px;}</style>";t.srcdoc=a+n}}t.addEventListener("load",()=>{setTimeout(()=>this._resizeIframe(t),50)})})}disconnectedCallback(){this._replaceDebounce&&(clearTimeout(this._replaceDebounce),this._replaceDebounce=0),super.disconnectedCallback()}_collapseContent(t){this.noCollapse||t.composedPath().some(n=>n instanceof HTMLElement&&n.classList.contains("content-block-header__actions"))||(this.short=!this.short,this.requestUpdate(),this.updateComplete.then(()=>{this.short||this.iframe.then(n=>{n&&!n.classList.contains("hidden")&&this._resizeIframe(n)})}))}_toggleText(){let t=this.shadowRoot?.querySelector(".text-content");this.iframe.then(r=>{t&&(r.classList.add("hidden"),t.classList.remove("hidden"))})}_toggleHtml(){let t=this.shadowRoot?.querySelector(".text-content");this.iframe.then(r=>{t&&(r.classList.remove("hidden"),t.classList.add("hidden"),setTimeout(()=>this._resizeIframe(r),0))})}_resizeIframe(t){let r=n=>{let a=n.contentDocument;if(!a)return;n.style.height="auto";let s=a.body,l=a.documentElement,d=[s?.scrollHeight??0,l?.scrollHeight??0,s?.offsetHeight??0,l?.offsetHeight??0],h=Math.max(...d);h>0&&(n.style.height=`${h}px`)};t?r(t):this.iframe.then(n=>{n?.contentDocument&&requestAnimationFrame(()=>r(n))})}handleAttachmentsSlotChange(){this.syncAttachmentCount()}syncAttachmentCount(){let t=this.shadowRoot?.querySelector('slot[name="attachments"]');this.attachmentCount=t?.assignedElements().length??0}firstUpdated(t){super.firstUpdated(t),this.syncAttachmentCount(),Promise.resolve().then(()=>this.syncAttachmentCount());let r=this.shadowRoot?.querySelectorAll(".text-section");r&&r.length>0&&r.forEach(n=>{n.innerHTML=n.innerHTML.replace(/&nbsp;/g," "),n.innerHTML=n.innerHTML.replace(/<!--[\s\S]*?-->/g,""),n.innerHTML=n.innerHTML.replace(/<\/p><br>/g,"</p>")})}render(){let t=this.getTextSections(),r=this.querySelector(':scope > [slot="footer"]')!==null,n=this.hasSlotController.test("text"),a=this.hasSlotController.test("html"),s=n&&a,l=a&&(!n||this.defaultDisplay==="html");return u`
3812
+ <div class="${N({"content-block":!0,"content-block--outbound":this.outbound,"content-block--short":this.short,"content-block--collapsible":!this.noCollapse})}">
3810
3813
 
3811
3814
  <div class="content-block-header" @click="${this._collapseContent}">
3812
3815
  <div class="content-block-header__icon">
@@ -4575,9 +4578,9 @@ Please report this to https://github.com/markedjs/marked.`,i){let r="<p>An error
4575
4578
  </div>
4576
4579
  </div>`:""}
4577
4580
  </div>
4578
- `}};Xr.styles=E(g1),Xr.dependencies={"zn-icon":ct,"zn-button":Tt,"zn-dropdown":vr,"zn-menu":Po,"zn-menu-item":Ln},c([p({attribute:!1})],Xr.prototype,"node",2),c([p({attribute:!1})],Xr.prototype,"type",2),c([p({type:Boolean,reflect:!0})],Xr.prototype,"selected",2),c([p({type:Boolean,reflect:!0})],Xr.prototype,"error",2),c([p({type:Boolean,reflect:!0})],Xr.prototype,"dragging",2),c([p({type:Boolean,reflect:!0,attribute:"link-target"})],Xr.prototype,"linkTarget",2);var b1=Xr;Xr.define("zn-flow-node");var v1=A`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}:host *,:host *::before,:host *::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{display:block;position:relative;width:100%;height:100%;overflow:hidden}.viewport{position:absolute;inset:0;overflow:hidden;background-color:rgb(var(--zn-color-body));background-image:radial-gradient(rgb(var(--zn-color-border)) 1px,transparent 1px);background-size:20px 20px;cursor:grab;touch-action:none}.viewport.grabbing,.viewport.grabbing *{cursor:grabbing !important}.viewport.connecting,.viewport.connecting *{cursor:crosshair !important}.viewport.resizing,.viewport.resizing *{cursor:nwse-resize !important}.viewport.linking{cursor:crosshair}.viewport.step-dragging .add-point{color:rgb(var(--zn-panel));background:rgb(var(--zn-color-primary));border-style:solid;box-shadow:0 0 0 4px color-mix(in srgb,rgb(var(--zn-color-primary)) 22%,transparent)}.connections{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;overflow:visible}.connections .wire{fill:none;stroke:rgb(var(--zn-color-primary));stroke-width:2}.connections .wire--stub{stroke:rgb(var(--zn-color-border-active));stroke-dasharray:4 4}.connections .wire--preview{stroke-dasharray:6 4}.connections .wire--loop{stroke:rgb(var(--zn-color-warning))}.connections marker path{fill:rgb(var(--zn-color-primary))}.connections marker#flow-arrow-loop path{fill:rgb(var(--zn-color-warning))}.add-point{position:absolute;top:0;left:0;display:flex;align-items:center;justify-content:center;width:24px;height:24px;margin:-12px;padding:0;border-radius:50%;color:rgb(var(--zn-color-primary));background:rgb(var(--zn-panel));border:1px dashed rgb(var(--zn-color-border-active));cursor:pointer;transition:background 0.12s ease,color 0.12s ease}.add-point:hover{color:rgb(var(--zn-panel));background:rgb(var(--zn-color-primary));border-style:solid}.add-point--target{color:rgb(var(--zn-panel));background:rgb(var(--zn-color-primary));border-style:solid;box-shadow:0 0 0 4px color-mix(in srgb,rgb(var(--zn-color-primary)) 25%,transparent)}.add-point--wire{width:20px;height:20px;margin:-10px}.layer{position:absolute;top:0;left:0;transform-origin:0 0;width:0;height:0}.node-pos{position:absolute;top:0;left:0}.branch-pill{display:flex;align-items:center;justify-content:center;width:-moz-max-content;width:max-content;max-width:240px;box-sizing:border-box;text-align:center;overflow-wrap:anywhere;overflow:hidden;padding:0 18px;border-radius:10px;font:inherit;font-size:0.8125rem;font-weight:600;line-height:20px;color:rgb(var(--zn-text));background:color-mix(in srgb,rgb(var(--zn-color-primary)) 8%,rgb(var(--zn-panel)));border:1px solid color-mix(in srgb,rgb(var(--zn-color-primary)) 45%,transparent);cursor:pointer;transition:border-color 0.12s ease,box-shadow 0.12s ease}.branch-pill:hover{border-color:rgb(var(--zn-color-primary));box-shadow:0 1px 3px rgba(var(--zn-shadow),0.4)}.branch-pill--selected{border-color:rgb(var(--zn-color-primary));background:color-mix(in srgb,rgb(var(--zn-color-primary)) 16%,rgb(var(--zn-panel)))}.branch-pill--loop{background:color-mix(in srgb,rgb(var(--zn-color-warning)) 10%,rgb(var(--zn-panel)));border-color:color-mix(in srgb,rgb(var(--zn-color-warning)) 55%,transparent)}.branch-pill--loop:hover{border-color:rgb(var(--zn-color-warning))}.branch-pill--loop.branch-pill--selected{border-color:rgb(var(--zn-color-warning));background:color-mix(in srgb,rgb(var(--zn-color-warning)) 18%,rgb(var(--zn-panel)))}.branch-pill-wrap{position:absolute;top:0;left:0;transform:translateX(-50%);display:flex;align-items:stretch}.branch-pill-wrap::after{content:"";position:absolute;left:100%;top:0;width:40px;height:100%}.branch-pill-wrap:hover .branch-pill-delete{opacity:1;transform:translate(0,-50%);pointer-events:auto;transition-delay:0.15s}.branch-pill-port{position:absolute;z-index:1;left:50%;bottom:0;transform:translate(-50%,50%);width:11px;height:11px;box-sizing:border-box;border-radius:50%;background:rgb(var(--zn-panel));border:2px solid rgb(var(--zn-color-primary));cursor:pointer;transition:transform 0.12s ease,box-shadow 0.12s ease}.branch-pill-port:hover{transform:translate(-50%,50%) scale(1.35);box-shadow:0 0 0 4px color-mix(in srgb,rgb(var(--zn-color-primary)) 20%,transparent)}.branch-pill-delete{position:absolute;z-index:1;left:calc(100% + 8px);top:50%;transform:translate(-10px,-50%);display:flex;align-items:center;justify-content:center;width:24px;height:24px;padding:0;border:none;border-radius:50%;background:rgb(var(--zn-color-error));color:white;cursor:pointer;opacity:0;pointer-events:none;transition:opacity 0.15s ease,transform 0.15s ease}.branch-pill-delete:hover{filter:brightness(1.1)}.drop-ghost{position:absolute;top:0;left:0;display:flex;align-items:center;gap:10px;padding:0 12px;border:2px dashed rgb(var(--zn-color-primary));border-radius:10px;background:color-mix(in srgb,rgb(var(--zn-color-primary)) 10%,rgb(var(--zn-panel)));opacity:0.9;pointer-events:none}.drop-ghost__icon{--node-accent:rgb(var(--zn-color-primary));display:flex;align-items:center;justify-content:center;flex:0 0 auto;width:36px;height:36px;border-radius:8px;color:var(--node-accent);background:color-mix(in srgb,var(--node-accent) 16%,rgb(var(--zn-panel)))}.drop-ghost__label{font-size:0.8125rem;font-weight:600;color:rgb(var(--zn-text));white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.toolbar{position:absolute;top:16px;display:flex;align-items:center;gap:2px;padding:3px;background:rgb(var(--zn-panel));border:1px solid rgb(var(--zn-border-color));border-radius:8px;box-shadow:0 1px 3px rgba(var(--zn-shadow),0.4);z-index:2}.toolbar--history{left:16px}.toolbar--zoom{right:16px}.bin{position:absolute;right:16px;bottom:16px;z-index:2;display:flex;align-items:center;justify-content:center;width:48px;height:48px;border-radius:12px;color:rgb(var(--zn-color-muted-text));background:rgb(var(--zn-panel));border:1px dashed rgb(var(--zn-color-border-active));box-shadow:0 1px 3px rgba(var(--zn-shadow),0.4);transition:background 0.12s ease,color 0.12s ease,transform 0.12s ease}.bin--over{color:rgb(var(--zn-panel));background:rgb(var(--zn-color-error));border-style:solid;border-color:rgb(var(--zn-color-error));transform:scale(1.12)}.note{position:absolute;display:flex;flex-direction:column;background:#fef9c3;border:1px solid #fde68a;border-radius:4px;box-shadow:0 2px 6px rgba(0,0,0,0.12)}.note__resize{position:absolute;right:0;bottom:0;width:16px;height:16px;cursor:nwse-resize;background:linear-gradient(135deg,transparent 0 50%,#d9c64a 50% 60%,transparent 60% 70%,#d9c64a 70% 80%,transparent 80%)}.note__bar{display:flex;justify-content:flex-end;height:20px;cursor:grab}.note__close{width:20px;height:20px;padding:0;font-size:14px;line-height:1;color:#92400e;background:transparent;cursor:pointer}.note__text{flex:1;margin:0;padding:0 10px 10px;resize:none;border:none;outline:none;background:transparent;font:inherit;font-size:0.8125rem;color:#713f12}`;var lf=.25,x1=2,y1=.15,cf=40,Z4=20,df=20,z1=10,tI=8,qp=40,eI=20,cc=Es,pe=class pe extends C{constructor(){super(...arguments);this.nodes=[];this.connections=[];this.notes=[];this.selectedNodeId=null;this.errorNodes=new Set;this.movingNodeId=null;this.dragType=null;this.selectedBranch=null;this.zoom=1;this.panX=0;this.panY=0;this.drag=null;this._overBin=!1;this._dropGhost=null;this._linking=null;this._linkPos=null;this._linkTarget=null;this._linkClient=null;this._linkScrollRaf=null;this._dragMoved=!1;this._viewInitialised=!1;this._onWheel=t=>{if(t.composedPath().some(d=>d instanceof HTMLTextAreaElement))return;t.preventDefault(),this._viewInitialised=!0;let r=t.deltaMode===1?16:t.deltaMode===2?100:1,n=t.deltaX*r,a=t.deltaY*r;if(t.ctrlKey||t.metaKey){let d=Math.min(x1,Math.max(lf,this.zoom*Math.exp(-a*.0015)));if(d===this.zoom)return;let h=this.getBoundingClientRect(),m=t.clientX-h.left,f=t.clientY-h.top,b=(m-this.panX)/this.zoom,g=(f-this.panY)/this.zoom;this.zoom=+d.toFixed(3),this.panX=Math.round(m-b*this.zoom),this.panY=Math.round(f-g*this.zoom);return}let s=t.shiftKey&&!n?a:n,l=t.shiftKey&&!n?0:a;this.panX-=Math.round(s),this.panY-=Math.round(l)};this._onBackgroundPointerDown=t=>{if(t.button===1){t.preventDefault(),this._viewInitialised=!0,this.drag={kind:"pan",ox:t.clientX,oy:t.clientY,px:this.panX,py:this.panY},this._setupWindow("grabbing");return}if(t.button===0){if(this._viewInitialised=!0,this._linking){let r=this._linking,n=this._linkTarget;if(this._cancelLink(),n){this._emit("flow-link-assign",{nodeId:r.nodeId,port:r.port,targetId:n});return}}this._emit("flow-node-select",{nodeId:null}),this.drag={kind:"pan",ox:t.clientX,oy:t.clientY,px:this.panX,py:this.panY},this._setupWindow("grabbing")}};this._onNodeGrab=t=>{if(this._linking){let a=this._linking;this._cancelLink(),a.nodeId!==t.detail.nodeId&&this._emit("flow-link-assign",{nodeId:a.nodeId,port:a.port,targetId:t.detail.nodeId});return}let r=this.nodes.find(a=>a.id===t.detail.nodeId);if(!r)return;let n=this.screenToCanvas(t.detail.clientX,t.detail.clientY);this.drag={kind:"node",id:r.id,offX:n.x-r.x,offY:n.y-r.y,startX:r.x,startY:r.y},this._dragMoved=!1,this._setupWindow("grabbing")};this._onNodeSelect=t=>{this._linking&&t.detail.nodeId&&t.stopPropagation()};this._onPortClick=t=>{let{nodeId:r}=t.detail;if(this._linking&&this._linking.nodeId!==r){let s=this._linking;this._cancelLink(),this._emit("flow-link-assign",{nodeId:s.nodeId,port:s.port,targetId:r});return}let n=this.nodes.find(s=>s.id===r);if(!n)return;let a=Be(n,this._typeFor(n)).find(s=>!this.connections.some(l=>l.source.node===r&&l.source.port===s.id));this._startLink(r,a?.id??Tp)};this._onLinkPointerMove=t=>{this._linkClient={x:t.clientX,y:t.clientY},this._updateLinkFromClient(t.clientX,t.clientY)};this._linkEdgeScroll=()=>{if(this._linkScrollRaf=null,!!this._linking){if(this._linkClient){let t=this.getBoundingClientRect(),r=48,n=14,a=m=>Math.min(n,Math.ceil((r-m)/r*n)),{x:s,y:l}=this._linkClient,d=0,h=0;s<t.left+r?d=a(s-t.left):s>t.right-r&&(d=-a(t.right-s)),l<t.top+r?h=a(l-t.top):l>t.bottom-r&&(h=-a(t.bottom-l)),(d||h)&&(this.panX+=d,this.panY+=h,this._updateLinkFromClient(s,l))}this._linkScrollRaf=requestAnimationFrame(this._linkEdgeScroll)}};this._onLinkKeyDown=t=>{t.key==="Escape"&&this._cancelLink()};this._cancelLink=()=>{this._linking&&(this._linking=null,this._linkPos=null,this._linkTarget=null,this._linkClient=null,this._linkScrollRaf!==null&&(cancelAnimationFrame(this._linkScrollRaf),this._linkScrollRaf=null),window.removeEventListener("pointermove",this._onLinkPointerMove),window.removeEventListener("keydown",this._onLinkKeyDown),window.removeEventListener("blur",this._cancelLink))};this._onPointerMove=t=>{if(!this.drag)return;if(this.drag.kind==="pan"){this.panX=this.drag.px+(t.clientX-this.drag.ox),this.panY=this.drag.py+(t.clientY-this.drag.oy);return}let r=this.screenToCanvas(t.clientX,t.clientY);if(this.drag.kind==="node"){this._overBin=this._binHit(t.clientX,t.clientY);let n=this.nodes.find(a=>a.id===this.drag.id);if(n){let a={x:Lr(r.x-this.drag.offX),y:Lr(r.y-this.drag.offY)},s=new Set(this.connections.filter(h=>h.target.node===n.id&&h.source.node!==n.id).map(h=>h.source.node)),l=h=>{let m={...n,...h},f=this.nodes.map(g=>g.id===n.id?m:g),b=g=>this.registry?.get(g);return f.some(g=>g!==m&&l1(m,g,b,f,this.connections))?!1:![...s].some(g=>{let v=f.find(x=>x.id===g);return!!v&&$p(v,b,f,this.connections)})},d=l(a)?a:l({x:a.x,y:n.y})?{x:a.x,y:n.y}:l({x:n.x,y:a.y})?{x:n.x,y:a.y}:null;d&&(d.x!==n.x||d.y!==n.y)&&(this._dragMoved||this._beginMove(),n.x=d.x,n.y=d.y,this.requestUpdate())}}else if(this.drag.kind==="note"){let n=this.notes.find(a=>a.id===this.drag.id);n&&(this._dragMoved||this._beginMove(),n.x=Lr(r.x-this.drag.offX),n.y=Lr(r.y-this.drag.offY),this.requestUpdate())}else if(this.drag.kind==="note-resize"){let n=this.notes.find(a=>a.id===this.drag.id);n&&(this._dragMoved||this._beginMove(),n.width=Math.max(d1,Lr(r.x-n.x)),n.height=Math.max(p1,Lr(r.y-n.y)),this.requestUpdate())}};this._onPointerUp=()=>{let t=this.drag,r=this._overBin;if(this.drag=null,this._overBin=!1,this._teardownWindow(),!!t){if(t.kind==="node"&&this._dragMoved&&r){let n=this.nodes.find(a=>a.id===t.id);n&&(n.x=t.startX,n.y=t.startY),this._emit("flow-node-action",{nodeId:t.id,action:"delete"});return}(t.kind==="node"||t.kind==="note"||t.kind==="note-resize")&&this._dragMoved&&this._emit("flow-change-commit")}};this._onViewportDragOver=t=>{if(!t.dataTransfer?.types.includes(cc))return;this._viewInitialised=!0,t.preventDefault();let r=t.composedPath().some(a=>a instanceof Element&&a.classList.contains("add-point"));t.dataTransfer.dropEffect=r?"copy":"move";let n=this.screenToCanvas(t.clientX,t.clientY);this._dropGhost={x:Lr(n.x-oe/2),y:Lr(n.y-Qe/2)}};this._onViewportDragLeave=t=>{let r=this.getBoundingClientRect();(t.clientX<r.left||t.clientX>r.right||t.clientY<r.top||t.clientY>r.bottom)&&(this._dropGhost=null)};this._clearDropGhost=()=>{this._dropGhost=null};this._onAddPointDragOver=t=>{t.dataTransfer?.types.includes(cc)&&(t.preventDefault(),t.dataTransfer.dropEffect="copy")};this._onBinDragOver=t=>{t.dataTransfer?.types.includes(cc)&&(t.preventDefault(),t.stopPropagation(),t.dataTransfer.dropEffect="move",this._overBin=!0,this._dropGhost=null)};this._onBinDragLeave=()=>{this._overBin=!1};this._onBinDrop=t=>{t.preventDefault(),t.stopPropagation(),this._overBin=!1,this._dropGhost=null}}connectedCallback(){super.connectedCallback(),this.addEventListener("flow-node-grab",this._onNodeGrab),this.addEventListener("flow-node-select",this._onNodeSelect),this.addEventListener("flow-port-click",this._onPortClick),this.addEventListener("wheel",this._onWheel,{passive:!1})}disconnectedCallback(){this.removeEventListener("flow-node-grab",this._onNodeGrab),this.removeEventListener("flow-node-select",this._onNodeSelect),this.removeEventListener("flow-port-click",this._onPortClick),this.removeEventListener("wheel",this._onWheel),this._cancelLink(),this._teardownWindow(),super.disconnectedCallback()}updated(t){if(super.updated(t),this.style.setProperty("--flow-zoom",String(this.zoom)),t.has("dragType")&&!this.dragType&&(this._dropGhost=null),!this._viewInitialised&&this.nodes.length){let r=this.getBoundingClientRect();r.width&&r.height&&(this._viewInitialised=!0,this._resetView())}}_emit(t,r){this.dispatchEvent(new CustomEvent(t,{bubbles:!0,composed:!0,detail:r}))}screenToCanvas(t,r){let n=this.getBoundingClientRect();return{x:(t-n.left-this.panX)/this.zoom,y:(r-n.top-this.panY)/this.zoom}}_typeFor(t){return this.registry?.get(t.type)}_setupWindow(t=""){window.addEventListener("pointermove",this._onPointerMove),window.addEventListener("pointerup",this._onPointerUp),t&&(document.body.style.cursor=t)}_teardownWindow(){window.removeEventListener("pointermove",this._onPointerMove),window.removeEventListener("pointerup",this._onPointerUp),document.body.style.cursor=""}_onBranchPortClick(t,r){if(this._linking){let n=this._linking;this._cancelLink(),n.nodeId!==t&&this._emit("flow-link-assign",{nodeId:n.nodeId,port:n.port,targetId:t});return}this._startLink(t,r)}_startLink(t,r){this._linking={nodeId:t,port:r},this._linkPos=null,this._linkClient=null,window.addEventListener("pointermove",this._onLinkPointerMove),window.addEventListener("keydown",this._onLinkKeyDown),window.addEventListener("blur",this._cancelLink),this._linkScrollRaf=requestAnimationFrame(this._linkEdgeScroll)}_updateLinkFromClient(t,r){let n=this.screenToCanvas(t,r);this._linkPos=n;let a=this._linking;if(!a)return;let s=12,l=this.nodes.find(d=>d.id!==a.nodeId&&n.x>=d.x-s&&n.x<=d.x+oe+s&&n.y>=d.y-s&&n.y<=d.y+Qe+s&&Ni(d,this._typeFor(d)).length>0);this._linkTarget=l?.id??null}_binHit(t,r){let n=this.shadowRoot?.querySelector(".bin")?.getBoundingClientRect();return!!n&&t>=n.left&&t<=n.right&&r>=n.top&&r<=n.bottom}_beginMove(){this._dragMoved=!0,this._emit("flow-interaction-start")}_outputLayout(t){let r=Be(t,this._typeFor(t)),n=t.x+oe/2,a=t.y+Qe,s=a+Zm,l=sc(t,h=>this.registry?.get(h)),d=r.map((h,m)=>{let f=this.connections.find(_=>_.source.node===t.id&&_.source.port===h.id),b=f?this.nodes.find(_=>_.id===f.target.node):void 0,g=l[m],v=h.label?ef(h.label).h:0,x=h.label?tf(t,v,b,r.length===1):null,k=x===null?s:x+v;return{port:h,conn:f,child:b,x:g,pillTop:x,pillH:v,exitY:k}});return{cx:n,by:a,busY:s,branches:d}}_inputAnchor(t,r){let n=Ni(t,this._typeFor(t)),a=Math.max(n.findIndex(s=>s.id===r),0);return{x:h1(t,"in",a,n.length).x,y:t.y}}_elbowMidOffsets(){let t=new Map;for(let n of this.nodes){let{branches:a}=this._outputLayout(n);for(let s of a){if(!s.conn||!s.child)continue;let{x:l,y:d}=this._inputAnchor(s.child,s.conn.target.port);if(l===s.x||d-df<s.exitY)continue;let h=Lr((s.exitY+d)/2),m=`${s.conn.target.node}:${s.conn.target.port}`,f=t.get(h)??new Map;t.set(h,f),f.set(m,[...f.get(m)??[],s.conn.id])}}let r=new Map;for(let n of t.values()){if(n.size<2)continue;let a=[...n.keys()].sort();a.forEach((s,l)=>{let d=(l-Math.floor((a.length-1)/2))*eI;n.get(s).forEach(h=>r.set(h,d))})}return r}_segmentBlocked(t,r,n){let l=Math.min(t.x,r.x),d=Math.max(t.x,r.x),h=Math.min(t.y,r.y),m=Math.max(t.y,r.y);return this.nodes.some(f=>!n.has(f.id)&&l<f.x+oe+8&&d>f.x-8&&h<f.y+Qe+8&&m>f.y-48)}_routeClear(t,r){for(let n=0;n<t.length-1;n++)if(this._segmentBlocked(t[n],t[n+1],r))return!1;return!0}_routePoints(t,r,n,a=0,s,l=!1){let{x:d,y:h}=this._inputAnchor(r,n),m=new Set(s?[r.id,s]:[r.id]);if(h-df>=t.y){let k=Math.round((t.y+h)/2)+a,_=h-t.y,O=Math.min(h-12,Math.ceil((t.y+_/4)/Fe)*Fe),j=Math.max(O,Math.floor((h-_/4)/Fe)*Fe),I=W=>Math.max(O,Math.min(j,W)),w=null;if(d===t.x){let W=[t,{x:d,y:h}];if(this._routeClear(W,m))return W;w=W}else for(let W=0;W<=20;W++)for(let tt of W===0?[k]:[k+W*Fe,k-W*Fe]){let ut=I(tt);if(ut!==tt&&W>0)continue;let pt=[t,{x:t.x,y:ut},{x:d,y:ut},{x:d,y:h}];if(w??(w=pt),this._routeClear(pt,m))return pt}let T=Math.floor(_/2/10)*10,L=Math.max(10,Math.round(_/4/10)*10);for(let W=0;W<=12;W++)for(let tt of W===0?[L]:[L+W*10,L-W*10]){if(tt<10||tt>T)continue;let ut=t.y+tt,pt=h-tt;if(!(pt<ut))for(let gt=1;gt<=14;gt++)for(let Ut of[1,-1]){let jt=t.x+Ut*gt*Fe,Ve=[t,{x:t.x,y:ut},{x:jt,y:ut},{x:jt,y:pt},{x:d,y:pt},{x:d,y:h}];if(this._routeClear(Ve,m))return Ve}}return w}let f=t.y+Z4,b=h-df,g,v;if(l){let k=this.nodes.filter(w=>w.y+Qe>b-Fe&&w.y<f+Fe),_=Math.max(...k.map(w=>w.x+oe))+qp,O=Math.min(...k.map(w=>w.x))-qp,j=Math.abs(_-t.x)+Math.abs(_-d),I=Math.abs(t.x-O)+Math.abs(d-O);g=j<=I,v=g?_:O}else g=t.x>=r.x+oe/2,v=g?r.x+oe+qp:r.x-qp;let x=null;for(let k=0;k<=20;k++){let _=v+(g?1:-1)*k*Fe,O=[t,{x:t.x,y:f},{x:_,y:f},{x:_,y:b},{x:d,y:b},{x:d,y:h}];if(x??(x=O),this._routeClear(O,m))return O}return x}static _pathFrom(t){return t.map((r,n)=>`${n===0?"M":"L"} ${r.x} ${r.y}`).join(" ")}_addPoints(){if(!this.movingNodeId&&!this.dragType)return[];let t=[];for(let r of this.nodes){let{branches:n}=this._outputLayout(r);n.forEach(a=>{a.conn||t.push({nodeId:r.id,port:a.port.id,px:a.x,py:a.exitY+cf})})}return t}_wirePoints(){if(this.movingNodeId)return[];let t=this._elbowMidOffsets(),r=Di(this.nodes,this.connections),n=[];for(let d of this.nodes){let{branches:h}=this._outputLayout(d);h.forEach(m=>{if(!m.conn||!m.child)return;let f=t.get(m.conn.id)??0,b=this._routePoints({x:m.x,y:m.exitY},m.child,m.conn.target.port,f,d.id,r.has(m.conn)),g=0,v=-1;for(let T=0;T<b.length-1;T++){let L=Math.abs(b[T+1].x-b[T].x)+Math.abs(b[T+1].y-b[T].y);L>v&&(v=L,g=T)}let x=b[g],k=b[g+1],_=Math.abs(k.x-x.x)+Math.abs(k.y-x.y),O=Math.sign(k.x-x.x),j=Math.sign(k.y-x.y),I=T=>({px:x.x+O*T,py:x.y+j*T}),w=Math.max(0,(g===b.length-2?_-tI:_)/2);n.push({connectionId:m.conn.id,at:I,d:w,len:_})})}let a=z1,s=(d,h)=>this.nodes.some(m=>d>m.x-a&&d<m.x+oe+a&&h>m.y-a&&h<m.y+Qe+a),l=[];for(let d of n){let h=f=>s(f.px,f.py)||l.some(b=>Math.hypot(b.px-f.px,b.py-f.py)<z1*2+6),m=d.at(d.d);if(h(m))t:for(let f=Fe/2;f<=d.len;f+=Fe/2)for(let b of[d.d-f,d.d+f]){if(b<0||b>d.len)continue;let g=d.at(b);if(!h(g)){m=g;break t}}l.push({connectionId:d.connectionId,...m})}return l}_screenFromCanvas(t,r){let n=this.getBoundingClientRect();return{clientX:n.left+this.panX+t*this.zoom,clientY:n.top+this.panY+r*this.zoom}}_onAddClick(t,r,n){if(t.stopPropagation(),this.movingNodeId){this._emit("flow-output-move-target",{nodeId:r,port:n});return}this._startLink(r,n)}_onWireAddClick(t,r,n,a){t.stopPropagation(),this._emit("flow-wire-pick",{connectionId:r,...this._screenFromCanvas(n,a)})}_onAddDrop(t,r,n){let a=t.dataTransfer?.getData(cc);a&&(t.preventDefault(),t.stopPropagation(),this._emit("flow-output-assign",{nodeId:r,port:n,type:a}))}_onWireDrop(t,r){let n=t.dataTransfer?.getData(cc);n&&(t.preventDefault(),t.stopPropagation(),this._emit("flow-wire-assign",{connectionId:r,type:n}))}_zoomBy(t){this._viewInitialised=!0,this.zoom=Math.min(x1,Math.max(lf,+(this.zoom+t).toFixed(2)))}_contentBounds(){if(!this.nodes.length&&!this.notes.length)return null;let t=1/0,r=1/0,n=-1/0,a=-1/0;for(let s of this.nodes){t=Math.min(t,s.x),n=Math.max(n,s.x+oe),r=Math.min(r,s.y),a=Math.max(a,s.y+Qe);for(let l of this._outputLayout(s).branches)t=Math.min(t,l.x-70),n=Math.max(n,l.x+70),a=Math.max(a,l.exitY+cf+14)}for(let s of this.notes)t=Math.min(t,s.x),n=Math.max(n,s.x+(s.width??of)),r=Math.min(r,s.y),a=Math.max(a,s.y+(s.height??nf));return{x:t,y:r,width:n-t,height:a-r}}_resetView(){let t=this.getBoundingClientRect(),r=this._contentBounds();if(!r||!t.width||!t.height){this.zoom=1,this.panX=0,this.panY=0;return}let n=60,a=Math.min(1,(t.width-n*2)/r.width,(t.height-n*2)/r.height);this.zoom=Math.max(lf,+a.toFixed(2)),this.panX=Math.round((t.width-r.width*this.zoom)/2-r.x*this.zoom),this.panY=Math.round((t.height-r.height*this.zoom)/2-r.y*this.zoom)}_viewportCursorClass(){return this.drag?this.drag.kind==="note-resize"?"resizing":"grabbing":""}_renderConnections(){let t=`translate(${this.panX} ${this.panY}) scale(${this.zoom})`,r=this._elbowMidOffsets(),n=Di(this.nodes,this.connections),a=[],s=!!(this.movingNodeId||this.dragType);for(let l of this.nodes){let{cx:d,by:h,busY:m,branches:f}=this._outputLayout(l),b=f.filter(k=>k.conn&&k.child||k.pillTop!==null||s);if(!b.length)continue;a.push(qo`<path class="wire" d="M ${d} ${h} L ${d} ${m}"></path>`);let g=[d,...b.map(k=>k.x)],v=Math.min(...g),x=Math.max(...g);x-v>.5&&a.push(qo`<path class="wire" d="M ${v} ${m} L ${x} ${m}"></path>`),b.forEach(k=>{if(k.pillTop!==null&&a.push(qo`<path class="wire" d="M ${k.x} ${Math.min(m,k.pillTop-10)} L ${k.x} ${k.pillTop}" marker-end="url(#flow-arrow)"></path>`),k.conn&&k.child){let _=r.get(k.conn.id)??0,O=n.has(k.conn),j=this._routePoints({x:k.x,y:k.exitY},k.child,k.conn.target.port,_,l.id,O);a.push(qo`<path
4581
+ `}};Xr.styles=E(g1),Xr.dependencies={"zn-icon":ct,"zn-button":Tt,"zn-dropdown":vr,"zn-menu":Po,"zn-menu-item":Ln},c([p({attribute:!1})],Xr.prototype,"node",2),c([p({attribute:!1})],Xr.prototype,"type",2),c([p({type:Boolean,reflect:!0})],Xr.prototype,"selected",2),c([p({type:Boolean,reflect:!0})],Xr.prototype,"error",2),c([p({type:Boolean,reflect:!0})],Xr.prototype,"dragging",2),c([p({type:Boolean,reflect:!0,attribute:"link-target"})],Xr.prototype,"linkTarget",2);var b1=Xr;Xr.define("zn-flow-node");var v1=A`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}:host *,:host *::before,:host *::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{display:block;position:relative;width:100%;height:100%;overflow:hidden}.viewport{position:absolute;inset:0;overflow:hidden;background-color:rgb(var(--zn-color-body));background-image:radial-gradient(rgb(var(--zn-color-border)) 1px,transparent 1px);background-size:20px 20px;cursor:grab;touch-action:none}.viewport.grabbing,.viewport.grabbing *{cursor:grabbing !important}.viewport.connecting,.viewport.connecting *{cursor:crosshair !important}.viewport.resizing,.viewport.resizing *{cursor:nwse-resize !important}.viewport.linking{cursor:crosshair}.viewport.step-dragging .add-point{color:rgb(var(--zn-panel));background:rgb(var(--zn-color-primary));border-style:solid;box-shadow:0 0 0 4px color-mix(in srgb,rgb(var(--zn-color-primary)) 22%,transparent)}.connections{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;overflow:visible}.connections .wire{fill:none;stroke:rgb(var(--zn-color-primary));stroke-width:2}.connections .wire--stub{stroke:rgb(var(--zn-color-border-active));stroke-dasharray:4 4}.connections .wire--preview{stroke-dasharray:6 4}.connections .wire--loop{stroke:rgb(var(--zn-color-warning))}.connections marker path{fill:rgb(var(--zn-color-primary))}.connections marker#flow-arrow-loop path{fill:rgb(var(--zn-color-warning))}.add-point{position:absolute;top:0;left:0;display:flex;align-items:center;justify-content:center;width:24px;height:24px;margin:-12px;padding:0;border-radius:50%;color:rgb(var(--zn-color-primary));background:rgb(var(--zn-panel));border:1px dashed rgb(var(--zn-color-border-active));cursor:pointer;transition:background 0.12s ease,color 0.12s ease}.add-point:hover{color:rgb(var(--zn-panel));background:rgb(var(--zn-color-primary));border-style:solid}.add-point--target{color:rgb(var(--zn-panel));background:rgb(var(--zn-color-primary));border-style:solid;box-shadow:0 0 0 4px color-mix(in srgb,rgb(var(--zn-color-primary)) 25%,transparent)}.add-point--wire{width:20px;height:20px;margin:-10px}.layer{position:absolute;top:0;left:0;transform-origin:0 0;width:0;height:0}.node-pos{position:absolute;top:0;left:0}.branch-pill{display:flex;align-items:center;justify-content:center;width:-moz-max-content;width:max-content;max-width:240px;box-sizing:border-box;text-align:center;overflow-wrap:anywhere;overflow:hidden;padding:0 18px;border-radius:10px;font:inherit;font-size:0.8125rem;font-weight:600;line-height:20px;color:rgb(var(--zn-text));background:color-mix(in srgb,rgb(var(--zn-color-primary)) 8%,rgb(var(--zn-panel)));border:1px solid color-mix(in srgb,rgb(var(--zn-color-primary)) 45%,transparent);cursor:pointer;transition:border-color 0.12s ease,box-shadow 0.12s ease}.branch-pill:hover{border-color:rgb(var(--zn-color-primary));box-shadow:0 1px 3px rgba(var(--zn-shadow),0.4)}.branch-pill--selected{border-color:rgb(var(--zn-color-primary));background:color-mix(in srgb,rgb(var(--zn-color-primary)) 16%,rgb(var(--zn-panel)))}.branch-pill--loop{background:color-mix(in srgb,rgb(var(--zn-color-warning)) 10%,rgb(var(--zn-panel)));border-color:color-mix(in srgb,rgb(var(--zn-color-warning)) 55%,transparent)}.branch-pill--loop:hover{border-color:rgb(var(--zn-color-warning))}.branch-pill--loop.branch-pill--selected{border-color:rgb(var(--zn-color-warning));background:color-mix(in srgb,rgb(var(--zn-color-warning)) 18%,rgb(var(--zn-panel)))}.branch-pill-wrap{position:absolute;top:0;left:0;transform:translateX(-50%);display:flex;align-items:stretch}.branch-pill-wrap::after{content:"";position:absolute;left:100%;top:0;width:40px;height:100%}.branch-pill-wrap:hover .branch-pill-delete{opacity:1;transform:translate(0,-50%);pointer-events:auto;transition-delay:0.15s}.branch-pill-port{position:absolute;z-index:1;left:50%;bottom:0;transform:translate(-50%,50%);width:11px;height:11px;box-sizing:border-box;border-radius:50%;background:rgb(var(--zn-panel));border:2px solid rgb(var(--zn-color-primary));cursor:pointer;transition:transform 0.12s ease,box-shadow 0.12s ease}.branch-pill-port:hover{transform:translate(-50%,50%) scale(1.35);box-shadow:0 0 0 4px color-mix(in srgb,rgb(var(--zn-color-primary)) 20%,transparent)}.branch-pill-delete{position:absolute;z-index:1;left:calc(100% + 8px);top:50%;transform:translate(-10px,-50%);display:flex;align-items:center;justify-content:center;width:24px;height:24px;padding:0;border:none;border-radius:50%;background:rgb(var(--zn-color-error));color:white;cursor:pointer;opacity:0;pointer-events:none;transition:opacity 0.15s ease,transform 0.15s ease}.branch-pill-delete:hover{filter:brightness(1.1)}.drop-ghost{position:absolute;top:0;left:0;display:flex;align-items:center;gap:10px;padding:0 12px;border:2px dashed rgb(var(--zn-color-primary));border-radius:10px;background:color-mix(in srgb,rgb(var(--zn-color-primary)) 10%,rgb(var(--zn-panel)));opacity:0.9;pointer-events:none}.drop-ghost__icon{--node-accent:rgb(var(--zn-color-primary));display:flex;align-items:center;justify-content:center;flex:0 0 auto;width:36px;height:36px;border-radius:8px;color:var(--node-accent);background:color-mix(in srgb,var(--node-accent) 16%,rgb(var(--zn-panel)))}.drop-ghost__label{font-size:0.8125rem;font-weight:600;color:rgb(var(--zn-text));white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.toolbar{position:absolute;top:16px;display:flex;align-items:center;gap:2px;padding:3px;background:rgb(var(--zn-panel));border:1px solid rgb(var(--zn-border-color));border-radius:8px;box-shadow:0 1px 3px rgba(var(--zn-shadow),0.4);z-index:2}.toolbar--history{left:16px}.toolbar--zoom{right:16px}.bin{position:absolute;right:16px;bottom:16px;z-index:2;display:flex;align-items:center;justify-content:center;width:48px;height:48px;border-radius:12px;color:rgb(var(--zn-color-muted-text));background:rgb(var(--zn-panel));border:1px dashed rgb(var(--zn-color-border-active));box-shadow:0 1px 3px rgba(var(--zn-shadow),0.4);transition:background 0.12s ease,color 0.12s ease,transform 0.12s ease}.bin--over{color:rgb(var(--zn-panel));background:rgb(var(--zn-color-error));border-style:solid;border-color:rgb(var(--zn-color-error));transform:scale(1.12)}.note{position:absolute;display:flex;flex-direction:column;background:#fef9c3;border:1px solid #fde68a;border-radius:4px;box-shadow:0 2px 6px rgba(0,0,0,0.12)}.note__resize{position:absolute;right:0;bottom:0;width:16px;height:16px;cursor:nwse-resize;background:linear-gradient(135deg,transparent 0 50%,#d9c64a 50% 60%,transparent 60% 70%,#d9c64a 70% 80%,transparent 80%)}.note__bar{display:flex;justify-content:flex-end;height:20px;cursor:grab}.note__close{width:20px;height:20px;padding:0;font-size:14px;line-height:1;color:#92400e;background:transparent;cursor:pointer}.note__text{flex:1;margin:0;padding:0 10px 10px;resize:none;border:none;outline:none;background:transparent;font:inherit;font-size:0.8125rem;color:#713f12}`;var lf=.25,x1=2,y1=.15,cf=40,Z4=20,df=20,z1=10,tI=8,qp=40,eI=20,cc=Es,he=class he extends C{constructor(){super(...arguments);this.nodes=[];this.connections=[];this.notes=[];this.selectedNodeId=null;this.errorNodes=new Set;this.movingNodeId=null;this.dragType=null;this.selectedBranch=null;this.zoom=1;this.panX=0;this.panY=0;this.drag=null;this._overBin=!1;this._dropGhost=null;this._linking=null;this._linkPos=null;this._linkTarget=null;this._linkClient=null;this._linkScrollRaf=null;this._dragMoved=!1;this._viewInitialised=!1;this._onWheel=t=>{if(t.composedPath().some(d=>d instanceof HTMLTextAreaElement))return;t.preventDefault(),this._viewInitialised=!0;let r=t.deltaMode===1?16:t.deltaMode===2?100:1,n=t.deltaX*r,a=t.deltaY*r;if(t.ctrlKey||t.metaKey){let d=Math.min(x1,Math.max(lf,this.zoom*Math.exp(-a*.0015)));if(d===this.zoom)return;let h=this.getBoundingClientRect(),m=t.clientX-h.left,f=t.clientY-h.top,b=(m-this.panX)/this.zoom,g=(f-this.panY)/this.zoom;this.zoom=+d.toFixed(3),this.panX=Math.round(m-b*this.zoom),this.panY=Math.round(f-g*this.zoom);return}let s=t.shiftKey&&!n?a:n,l=t.shiftKey&&!n?0:a;this.panX-=Math.round(s),this.panY-=Math.round(l)};this._onBackgroundPointerDown=t=>{if(t.button===1){t.preventDefault(),this._viewInitialised=!0,this.drag={kind:"pan",ox:t.clientX,oy:t.clientY,px:this.panX,py:this.panY},this._setupWindow("grabbing");return}if(t.button===0){if(this._viewInitialised=!0,this._linking){let r=this._linking,n=this._linkTarget;if(this._cancelLink(),n){this._emit("flow-link-assign",{nodeId:r.nodeId,port:r.port,targetId:n});return}}this._emit("flow-node-select",{nodeId:null}),this.drag={kind:"pan",ox:t.clientX,oy:t.clientY,px:this.panX,py:this.panY},this._setupWindow("grabbing")}};this._onNodeGrab=t=>{if(this._linking){let a=this._linking;this._cancelLink(),a.nodeId!==t.detail.nodeId&&this._emit("flow-link-assign",{nodeId:a.nodeId,port:a.port,targetId:t.detail.nodeId});return}let r=this.nodes.find(a=>a.id===t.detail.nodeId);if(!r)return;let n=this.screenToCanvas(t.detail.clientX,t.detail.clientY);this.drag={kind:"node",id:r.id,offX:n.x-r.x,offY:n.y-r.y,startX:r.x,startY:r.y},this._dragMoved=!1,this._setupWindow("grabbing")};this._onNodeSelect=t=>{this._linking&&t.detail.nodeId&&t.stopPropagation()};this._onPortClick=t=>{let{nodeId:r}=t.detail;if(this._linking&&this._linking.nodeId!==r){let s=this._linking;this._cancelLink(),this._emit("flow-link-assign",{nodeId:s.nodeId,port:s.port,targetId:r});return}let n=this.nodes.find(s=>s.id===r);if(!n)return;let a=Be(n,this._typeFor(n)).find(s=>!this.connections.some(l=>l.source.node===r&&l.source.port===s.id));this._startLink(r,a?.id??Tp)};this._onLinkPointerMove=t=>{this._linkClient={x:t.clientX,y:t.clientY},this._updateLinkFromClient(t.clientX,t.clientY)};this._linkEdgeScroll=()=>{if(this._linkScrollRaf=null,!!this._linking){if(this._linkClient){let t=this.getBoundingClientRect(),r=48,n=14,a=m=>Math.min(n,Math.ceil((r-m)/r*n)),{x:s,y:l}=this._linkClient,d=0,h=0;s<t.left+r?d=a(s-t.left):s>t.right-r&&(d=-a(t.right-s)),l<t.top+r?h=a(l-t.top):l>t.bottom-r&&(h=-a(t.bottom-l)),(d||h)&&(this.panX+=d,this.panY+=h,this._updateLinkFromClient(s,l))}this._linkScrollRaf=requestAnimationFrame(this._linkEdgeScroll)}};this._onLinkKeyDown=t=>{t.key==="Escape"&&this._cancelLink()};this._cancelLink=()=>{this._linking&&(this._linking=null,this._linkPos=null,this._linkTarget=null,this._linkClient=null,this._linkScrollRaf!==null&&(cancelAnimationFrame(this._linkScrollRaf),this._linkScrollRaf=null),window.removeEventListener("pointermove",this._onLinkPointerMove),window.removeEventListener("keydown",this._onLinkKeyDown),window.removeEventListener("blur",this._cancelLink))};this._onPointerMove=t=>{if(!this.drag)return;if(this.drag.kind==="pan"){this.panX=this.drag.px+(t.clientX-this.drag.ox),this.panY=this.drag.py+(t.clientY-this.drag.oy);return}let r=this.screenToCanvas(t.clientX,t.clientY);if(this.drag.kind==="node"){this._overBin=this._binHit(t.clientX,t.clientY);let n=this.nodes.find(a=>a.id===this.drag.id);if(n){let a={x:Lr(r.x-this.drag.offX),y:Lr(r.y-this.drag.offY)},s=new Set(this.connections.filter(h=>h.target.node===n.id&&h.source.node!==n.id).map(h=>h.source.node)),l=h=>{let m={...n,...h},f=this.nodes.map(g=>g.id===n.id?m:g),b=g=>this.registry?.get(g);return f.some(g=>g!==m&&l1(m,g,b,f,this.connections))?!1:![...s].some(g=>{let v=f.find(x=>x.id===g);return!!v&&$p(v,b,f,this.connections)})},d=l(a)?a:l({x:a.x,y:n.y})?{x:a.x,y:n.y}:l({x:n.x,y:a.y})?{x:n.x,y:a.y}:null;d&&(d.x!==n.x||d.y!==n.y)&&(this._dragMoved||this._beginMove(),n.x=d.x,n.y=d.y,this.requestUpdate())}}else if(this.drag.kind==="note"){let n=this.notes.find(a=>a.id===this.drag.id);n&&(this._dragMoved||this._beginMove(),n.x=Lr(r.x-this.drag.offX),n.y=Lr(r.y-this.drag.offY),this.requestUpdate())}else if(this.drag.kind==="note-resize"){let n=this.notes.find(a=>a.id===this.drag.id);n&&(this._dragMoved||this._beginMove(),n.width=Math.max(d1,Lr(r.x-n.x)),n.height=Math.max(p1,Lr(r.y-n.y)),this.requestUpdate())}};this._onPointerUp=()=>{let t=this.drag,r=this._overBin;if(this.drag=null,this._overBin=!1,this._teardownWindow(),!!t){if(t.kind==="node"&&this._dragMoved&&r){let n=this.nodes.find(a=>a.id===t.id);n&&(n.x=t.startX,n.y=t.startY),this._emit("flow-node-action",{nodeId:t.id,action:"delete"});return}(t.kind==="node"||t.kind==="note"||t.kind==="note-resize")&&this._dragMoved&&this._emit("flow-change-commit")}};this._onViewportDragOver=t=>{if(!t.dataTransfer?.types.includes(cc))return;this._viewInitialised=!0,t.preventDefault();let r=t.composedPath().some(a=>a instanceof Element&&a.classList.contains("add-point"));t.dataTransfer.dropEffect=r?"copy":"move";let n=this.screenToCanvas(t.clientX,t.clientY);this._dropGhost={x:Lr(n.x-oe/2),y:Lr(n.y-Qe/2)}};this._onViewportDragLeave=t=>{let r=this.getBoundingClientRect();(t.clientX<r.left||t.clientX>r.right||t.clientY<r.top||t.clientY>r.bottom)&&(this._dropGhost=null)};this._clearDropGhost=()=>{this._dropGhost=null};this._onAddPointDragOver=t=>{t.dataTransfer?.types.includes(cc)&&(t.preventDefault(),t.dataTransfer.dropEffect="copy")};this._onBinDragOver=t=>{t.dataTransfer?.types.includes(cc)&&(t.preventDefault(),t.stopPropagation(),t.dataTransfer.dropEffect="move",this._overBin=!0,this._dropGhost=null)};this._onBinDragLeave=()=>{this._overBin=!1};this._onBinDrop=t=>{t.preventDefault(),t.stopPropagation(),this._overBin=!1,this._dropGhost=null}}connectedCallback(){super.connectedCallback(),this.addEventListener("flow-node-grab",this._onNodeGrab),this.addEventListener("flow-node-select",this._onNodeSelect),this.addEventListener("flow-port-click",this._onPortClick),this.addEventListener("wheel",this._onWheel,{passive:!1})}disconnectedCallback(){this.removeEventListener("flow-node-grab",this._onNodeGrab),this.removeEventListener("flow-node-select",this._onNodeSelect),this.removeEventListener("flow-port-click",this._onPortClick),this.removeEventListener("wheel",this._onWheel),this._cancelLink(),this._teardownWindow(),super.disconnectedCallback()}updated(t){if(super.updated(t),this.style.setProperty("--flow-zoom",String(this.zoom)),t.has("dragType")&&!this.dragType&&(this._dropGhost=null),!this._viewInitialised&&this.nodes.length){let r=this.getBoundingClientRect();r.width&&r.height&&(this._viewInitialised=!0,this._resetView())}}_emit(t,r){this.dispatchEvent(new CustomEvent(t,{bubbles:!0,composed:!0,detail:r}))}screenToCanvas(t,r){let n=this.getBoundingClientRect();return{x:(t-n.left-this.panX)/this.zoom,y:(r-n.top-this.panY)/this.zoom}}_typeFor(t){return this.registry?.get(t.type)}_setupWindow(t=""){window.addEventListener("pointermove",this._onPointerMove),window.addEventListener("pointerup",this._onPointerUp),t&&(document.body.style.cursor=t)}_teardownWindow(){window.removeEventListener("pointermove",this._onPointerMove),window.removeEventListener("pointerup",this._onPointerUp),document.body.style.cursor=""}_onBranchPortClick(t,r){if(this._linking){let n=this._linking;this._cancelLink(),n.nodeId!==t&&this._emit("flow-link-assign",{nodeId:n.nodeId,port:n.port,targetId:t});return}this._startLink(t,r)}_startLink(t,r){this._linking={nodeId:t,port:r},this._linkPos=null,this._linkClient=null,window.addEventListener("pointermove",this._onLinkPointerMove),window.addEventListener("keydown",this._onLinkKeyDown),window.addEventListener("blur",this._cancelLink),this._linkScrollRaf=requestAnimationFrame(this._linkEdgeScroll)}_updateLinkFromClient(t,r){let n=this.screenToCanvas(t,r);this._linkPos=n;let a=this._linking;if(!a)return;let s=12,l=this.nodes.find(d=>d.id!==a.nodeId&&n.x>=d.x-s&&n.x<=d.x+oe+s&&n.y>=d.y-s&&n.y<=d.y+Qe+s&&Ni(d,this._typeFor(d)).length>0);this._linkTarget=l?.id??null}_binHit(t,r){let n=this.shadowRoot?.querySelector(".bin")?.getBoundingClientRect();return!!n&&t>=n.left&&t<=n.right&&r>=n.top&&r<=n.bottom}_beginMove(){this._dragMoved=!0,this._emit("flow-interaction-start")}_outputLayout(t){let r=Be(t,this._typeFor(t)),n=t.x+oe/2,a=t.y+Qe,s=a+Zm,l=sc(t,h=>this.registry?.get(h)),d=r.map((h,m)=>{let f=this.connections.find(_=>_.source.node===t.id&&_.source.port===h.id),b=f?this.nodes.find(_=>_.id===f.target.node):void 0,g=l[m],v=h.label?ef(h.label).h:0,x=h.label?tf(t,v,b,r.length===1):null,k=x===null?s:x+v;return{port:h,conn:f,child:b,x:g,pillTop:x,pillH:v,exitY:k}});return{cx:n,by:a,busY:s,branches:d}}_inputAnchor(t,r){let n=Ni(t,this._typeFor(t)),a=Math.max(n.findIndex(s=>s.id===r),0);return{x:h1(t,"in",a,n.length).x,y:t.y}}_elbowMidOffsets(){let t=new Map;for(let n of this.nodes){let{branches:a}=this._outputLayout(n);for(let s of a){if(!s.conn||!s.child)continue;let{x:l,y:d}=this._inputAnchor(s.child,s.conn.target.port);if(l===s.x||d-df<s.exitY)continue;let h=Lr((s.exitY+d)/2),m=`${s.conn.target.node}:${s.conn.target.port}`,f=t.get(h)??new Map;t.set(h,f),f.set(m,[...f.get(m)??[],s.conn.id])}}let r=new Map;for(let n of t.values()){if(n.size<2)continue;let a=[...n.keys()].sort();a.forEach((s,l)=>{let d=(l-Math.floor((a.length-1)/2))*eI;n.get(s).forEach(h=>r.set(h,d))})}return r}_segmentBlocked(t,r,n){let l=Math.min(t.x,r.x),d=Math.max(t.x,r.x),h=Math.min(t.y,r.y),m=Math.max(t.y,r.y);return this.nodes.some(f=>!n.has(f.id)&&l<f.x+oe+8&&d>f.x-8&&h<f.y+Qe+8&&m>f.y-48)}_routeClear(t,r){for(let n=0;n<t.length-1;n++)if(this._segmentBlocked(t[n],t[n+1],r))return!1;return!0}_routePoints(t,r,n,a=0,s,l=!1){let{x:d,y:h}=this._inputAnchor(r,n),m=new Set(s?[r.id,s]:[r.id]);if(h-df>=t.y){let k=Math.round((t.y+h)/2)+a,_=h-t.y,O=Math.min(h-12,Math.ceil((t.y+_/4)/Fe)*Fe),j=Math.max(O,Math.floor((h-_/4)/Fe)*Fe),I=W=>Math.max(O,Math.min(j,W)),w=null;if(d===t.x){let W=[t,{x:d,y:h}];if(this._routeClear(W,m))return W;w=W}else for(let W=0;W<=20;W++)for(let tt of W===0?[k]:[k+W*Fe,k-W*Fe]){let ut=I(tt);if(ut!==tt&&W>0)continue;let pt=[t,{x:t.x,y:ut},{x:d,y:ut},{x:d,y:h}];if(w??(w=pt),this._routeClear(pt,m))return pt}let T=Math.floor(_/2/10)*10,L=Math.max(10,Math.round(_/4/10)*10);for(let W=0;W<=12;W++)for(let tt of W===0?[L]:[L+W*10,L-W*10]){if(tt<10||tt>T)continue;let ut=t.y+tt,pt=h-tt;if(!(pt<ut))for(let gt=1;gt<=14;gt++)for(let Ut of[1,-1]){let jt=t.x+Ut*gt*Fe,Ve=[t,{x:t.x,y:ut},{x:jt,y:ut},{x:jt,y:pt},{x:d,y:pt},{x:d,y:h}];if(this._routeClear(Ve,m))return Ve}}return w}let f=t.y+Z4,b=h-df,g,v;if(l){let k=this.nodes.filter(w=>w.y+Qe>b-Fe&&w.y<f+Fe),_=Math.max(...k.map(w=>w.x+oe))+qp,O=Math.min(...k.map(w=>w.x))-qp,j=Math.abs(_-t.x)+Math.abs(_-d),I=Math.abs(t.x-O)+Math.abs(d-O);g=j<=I,v=g?_:O}else g=t.x>=r.x+oe/2,v=g?r.x+oe+qp:r.x-qp;let x=null;for(let k=0;k<=20;k++){let _=v+(g?1:-1)*k*Fe,O=[t,{x:t.x,y:f},{x:_,y:f},{x:_,y:b},{x:d,y:b},{x:d,y:h}];if(x??(x=O),this._routeClear(O,m))return O}return x}static _pathFrom(t){return t.map((r,n)=>`${n===0?"M":"L"} ${r.x} ${r.y}`).join(" ")}_addPoints(){if(!this.movingNodeId&&!this.dragType)return[];let t=[];for(let r of this.nodes){let{branches:n}=this._outputLayout(r);n.forEach(a=>{a.conn||t.push({nodeId:r.id,port:a.port.id,px:a.x,py:a.exitY+cf})})}return t}_wirePoints(){if(this.movingNodeId)return[];let t=this._elbowMidOffsets(),r=Di(this.nodes,this.connections),n=[];for(let d of this.nodes){let{branches:h}=this._outputLayout(d);h.forEach(m=>{if(!m.conn||!m.child)return;let f=t.get(m.conn.id)??0,b=this._routePoints({x:m.x,y:m.exitY},m.child,m.conn.target.port,f,d.id,r.has(m.conn)),g=0,v=-1;for(let T=0;T<b.length-1;T++){let L=Math.abs(b[T+1].x-b[T].x)+Math.abs(b[T+1].y-b[T].y);L>v&&(v=L,g=T)}let x=b[g],k=b[g+1],_=Math.abs(k.x-x.x)+Math.abs(k.y-x.y),O=Math.sign(k.x-x.x),j=Math.sign(k.y-x.y),I=T=>({px:x.x+O*T,py:x.y+j*T}),w=Math.max(0,(g===b.length-2?_-tI:_)/2);n.push({connectionId:m.conn.id,at:I,d:w,len:_})})}let a=z1,s=(d,h)=>this.nodes.some(m=>d>m.x-a&&d<m.x+oe+a&&h>m.y-a&&h<m.y+Qe+a),l=[];for(let d of n){let h=f=>s(f.px,f.py)||l.some(b=>Math.hypot(b.px-f.px,b.py-f.py)<z1*2+6),m=d.at(d.d);if(h(m))t:for(let f=Fe/2;f<=d.len;f+=Fe/2)for(let b of[d.d-f,d.d+f]){if(b<0||b>d.len)continue;let g=d.at(b);if(!h(g)){m=g;break t}}l.push({connectionId:d.connectionId,...m})}return l}_screenFromCanvas(t,r){let n=this.getBoundingClientRect();return{clientX:n.left+this.panX+t*this.zoom,clientY:n.top+this.panY+r*this.zoom}}_onAddClick(t,r,n){if(t.stopPropagation(),this.movingNodeId){this._emit("flow-output-move-target",{nodeId:r,port:n});return}this._startLink(r,n)}_onWireAddClick(t,r,n,a){t.stopPropagation(),this._emit("flow-wire-pick",{connectionId:r,...this._screenFromCanvas(n,a)})}_onAddDrop(t,r,n){let a=t.dataTransfer?.getData(cc);a&&(t.preventDefault(),t.stopPropagation(),this._emit("flow-output-assign",{nodeId:r,port:n,type:a}))}_onWireDrop(t,r){let n=t.dataTransfer?.getData(cc);n&&(t.preventDefault(),t.stopPropagation(),this._emit("flow-wire-assign",{connectionId:r,type:n}))}_zoomBy(t){this._viewInitialised=!0,this.zoom=Math.min(x1,Math.max(lf,+(this.zoom+t).toFixed(2)))}_contentBounds(){if(!this.nodes.length&&!this.notes.length)return null;let t=1/0,r=1/0,n=-1/0,a=-1/0;for(let s of this.nodes){t=Math.min(t,s.x),n=Math.max(n,s.x+oe),r=Math.min(r,s.y),a=Math.max(a,s.y+Qe);for(let l of this._outputLayout(s).branches)t=Math.min(t,l.x-70),n=Math.max(n,l.x+70),a=Math.max(a,l.exitY+cf+14)}for(let s of this.notes)t=Math.min(t,s.x),n=Math.max(n,s.x+(s.width??of)),r=Math.min(r,s.y),a=Math.max(a,s.y+(s.height??nf));return{x:t,y:r,width:n-t,height:a-r}}_resetView(){let t=this.getBoundingClientRect(),r=this._contentBounds();if(!r||!t.width||!t.height){this.zoom=1,this.panX=0,this.panY=0;return}let n=60,a=Math.min(1,(t.width-n*2)/r.width,(t.height-n*2)/r.height);this.zoom=Math.max(lf,+a.toFixed(2)),this.panX=Math.round((t.width-r.width*this.zoom)/2-r.x*this.zoom),this.panY=Math.round((t.height-r.height*this.zoom)/2-r.y*this.zoom)}_viewportCursorClass(){return this.drag?this.drag.kind==="note-resize"?"resizing":"grabbing":""}_renderConnections(){let t=`translate(${this.panX} ${this.panY}) scale(${this.zoom})`,r=this._elbowMidOffsets(),n=Di(this.nodes,this.connections),a=[],s=!!(this.movingNodeId||this.dragType);for(let l of this.nodes){let{cx:d,by:h,busY:m,branches:f}=this._outputLayout(l),b=f.filter(k=>k.conn&&k.child||k.pillTop!==null||s);if(!b.length)continue;a.push(qo`<path class="wire" d="M ${d} ${h} L ${d} ${m}"></path>`);let g=[d,...b.map(k=>k.x)],v=Math.min(...g),x=Math.max(...g);x-v>.5&&a.push(qo`<path class="wire" d="M ${v} ${m} L ${x} ${m}"></path>`),b.forEach(k=>{if(k.pillTop!==null&&a.push(qo`<path class="wire" d="M ${k.x} ${Math.min(m,k.pillTop-10)} L ${k.x} ${k.pillTop}" marker-end="url(#flow-arrow)"></path>`),k.conn&&k.child){let _=r.get(k.conn.id)??0,O=n.has(k.conn),j=this._routePoints({x:k.x,y:k.exitY},k.child,k.conn.target.port,_,l.id,O);a.push(qo`<path
4579
4582
  class="wire ${O?"wire--loop":""}"
4580
- d="${pe._pathFrom(j)}"
4583
+ d="${he._pathFrom(j)}"
4581
4584
  marker-end="url(#${O?"flow-arrow-loop":"flow-arrow"})"
4582
4585
  ></path>`)}else s&&a.push(qo`<path class="wire wire--stub" d="M ${k.x} ${k.exitY} L ${k.x} ${k.exitY+cf-11}"></path>`)})}if(this._linking&&this._linkPos){let l=this.nodes.find(d=>d.id===this._linking.nodeId);if(l){let d=this._outputLayout(l).branches.find(b=>b.port.id===this._linking.port),h=d&&d.pillTop!==null?{x:d.x,y:d.exitY}:{x:l.x+oe/2,y:l.y+Qe},m=this._linkTarget?this.nodes.find(b=>b.id===this._linkTarget):void 0,f=m?this._inputAnchor(m,lc(m,this._typeFor(m))??""):this._linkPos;a.push(qo`<path class="wire wire--preview" d="M ${h.x} ${h.y} L ${f.x} ${f.y}" marker-end="url(#flow-arrow)"></path>`)}}return u`
4583
4586
  <svg class="connections" part="connections">
@@ -4738,7 +4741,7 @@ Please report this to https://github.com/markedjs/marked.`,i){let r="<p>An error
4738
4741
  <zn-icon src="trash-2@lu" size="22"></zn-icon>
4739
4742
  </div>`:""}
4740
4743
  </div>
4741
- `}};pe.styles=E(v1),pe.dependencies={"zn-button":Tt,"zn-icon":ct,"zn-flow-node":b1},c([p({attribute:!1})],pe.prototype,"nodes",2),c([p({attribute:!1})],pe.prototype,"connections",2),c([p({attribute:!1})],pe.prototype,"notes",2),c([p({attribute:!1})],pe.prototype,"registry",2),c([p({attribute:"selected-node"})],pe.prototype,"selectedNodeId",2),c([p({attribute:!1})],pe.prototype,"errorNodes",2),c([p({attribute:"moving-node"})],pe.prototype,"movingNodeId",2),c([p({attribute:"drag-type"})],pe.prototype,"dragType",2),c([p({attribute:"selected-branch"})],pe.prototype,"selectedBranch",2),c([H()],pe.prototype,"zoom",2),c([H()],pe.prototype,"panX",2),c([H()],pe.prototype,"panY",2),c([H()],pe.prototype,"drag",2),c([H()],pe.prototype,"_overBin",2),c([H()],pe.prototype,"_dropGhost",2),c([H()],pe.prototype,"_linking",2),c([H()],pe.prototype,"_linkPos",2),c([H()],pe.prototype,"_linkTarget",2);var As=pe;var w1=As;As.define("zn-flow-canvas");var _1=A`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}:host *,:host *::before,:host *::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{display:block}:host([hidden]){display:none}zn-collapsible::part(header){align-items:center !important;padding-block:calc(var(--zn-base-px) * 2) !important}zn-collapsible::part(caption){font-size:14px;font-weight:600;line-height:16px;color:rgb(var(--zn-text))}`;var _n=class extends C{constructor(){super(...arguments);this.collapsed=!1}render(){return u`
4744
+ `}};he.styles=E(v1),he.dependencies={"zn-button":Tt,"zn-icon":ct,"zn-flow-node":b1},c([p({attribute:!1})],he.prototype,"nodes",2),c([p({attribute:!1})],he.prototype,"connections",2),c([p({attribute:!1})],he.prototype,"notes",2),c([p({attribute:!1})],he.prototype,"registry",2),c([p({attribute:"selected-node"})],he.prototype,"selectedNodeId",2),c([p({attribute:!1})],he.prototype,"errorNodes",2),c([p({attribute:"moving-node"})],he.prototype,"movingNodeId",2),c([p({attribute:"drag-type"})],he.prototype,"dragType",2),c([p({attribute:"selected-branch"})],he.prototype,"selectedBranch",2),c([H()],he.prototype,"zoom",2),c([H()],he.prototype,"panX",2),c([H()],he.prototype,"panY",2),c([H()],he.prototype,"drag",2),c([H()],he.prototype,"_overBin",2),c([H()],he.prototype,"_dropGhost",2),c([H()],he.prototype,"_linking",2),c([H()],he.prototype,"_linkPos",2),c([H()],he.prototype,"_linkTarget",2);var As=he;var w1=As;As.define("zn-flow-canvas");var _1=A`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}:host *,:host *::before,:host *::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{display:block}:host([hidden]){display:none}zn-collapsible::part(header){align-items:center !important;padding-block:calc(var(--zn-base-px) * 2) !important}zn-collapsible::part(caption){font-size:14px;font-weight:600;line-height:16px;color:rgb(var(--zn-text))}`;var _n=class extends C{constructor(){super(...arguments);this.collapsed=!1}render(){return u`
4742
4745
  <zn-collapsible caption="${this.caption??""}" default="${this.collapsed?"closed":"open"}">
4743
4746
  <slot></slot>
4744
4747
  </zn-collapsible>
@@ -5202,4 +5205,4 @@ Please report this to https://github.com/markedjs/marked.`,i){let r="<p>An error
5202
5205
  ${this._renderInspector()}
5203
5206
  <slot name="config" class="declarations" @slotchange="${this._registerSlottedTemplates}"></slot>
5204
5207
  </div>
5205
- `}};$t.styles=E(D1),$t.dependencies={"zn-collapsible":tl,"zn-icon":ct,"zn-input":qe,"zn-page-palette-item":uf,"zn-page-section-card":mf},c([p()],$t.prototype,"config",2),c([p({reflect:!0})],$t.prototype,"heading",2),c([p({reflect:!0})],$t.prototype,"subheading",2),c([p({attribute:!1})],$t.prototype,"sectionTypes",2),c([p({type:Boolean,reflect:!0,attribute:"palette-collapsed"})],$t.prototype,"paletteCollapsed",2),c([p({type:Boolean,reflect:!0,attribute:"inspector-collapsed"})],$t.prototype,"inspectorCollapsed",2),c([p({attribute:"auto-save",converter:{fromAttribute:t=>{if(t===null)return null;let r=parseFloat(t);return Number.isFinite(r)&&r>0?r:pI},toAttribute:t=>t===null?null:String(t)}})],$t.prototype,"autoSave",2),c([H()],$t.prototype,"_state",2),c([H()],$t.prototype,"_selectedId",2),c([H()],$t.prototype,"_search",2),c([H()],$t.prototype,"_pickerIndex",2),c([H()],$t.prototype,"_dragOverIndex",2),c([H()],$t.prototype,"_slotDragOver",2),c([H()],$t.prototype,"_slotPicker",2),c([H()],$t.prototype,"_form",2),c([K("config")],$t.prototype,"handleConfigChange",1),c([K("sectionTypes")],$t.prototype,"handleSectionTypesChange",1),c([H()],$t.prototype,"_lastSavedAt",2),c([H()],$t.prototype,"_justSaved",2),c([H()],$t.prototype,"_statusNow",2),c([H()],$t.prototype,"_restorePrompt",2);var uI=$t;$t.define("zn-page-builder");export{Kk as AbsoluteContainer,O6 as ActionBar,zS as Alert,Q6 as AnimatedButton,W6 as AudioSelect,xC as BulkActions,Tt as Button,ta as ButtonGroup,N6 as ButtonMenu,HS as ChannelTile,US as Chart,CS as ChatMessage,ES as ChatMessageAttachment,p6 as Checkbox,z6 as CheckboxGroup,el as Chip,tl as Collapsible,I6 as ColorSelect,IS as Cols,ol as Confirm,B6 as ContentBlock,vh as CopyButton,M6 as DataSelect,MS as DataTable,zh as DataTableFilter,Sh as DataTableSearch,R6 as DataTableSort,u6 as Datepicker,NS as DefinedLabel,ea as Dialog,vr as Dropdown,c6 as Editor,Co as EditorDialog,Cm as EditorQuickAction,Jl as EditorTool,Ch as EmptyState,Dh as ExpandingAction,y6 as File,j6 as FilterContainer,V6 as FilterWrapper,sf as FlowBranchConditions,iI as FlowBuilder,sI as FlowStep,pf as FlowStepGroup,aI as FlowSteps,m6 as FormGroup,Nh as Header,Eh as HoverContainer,ct as Icon,ZS as IconPicker,Xc as InlineEdit,qe as Input,f6 as InputGroup,w6 as Item,Y6 as Key,X6 as KeyContainer,g6 as LinkedSelect,B4 as MarkdownEditor,Po as Menu,Ln as MenuItem,il as Navbar,DS as Note,Ph as OptGroup,wr as Option,vC as OrderTable,YS as Page,uI as PageBuilder,P6 as PageNav,uf as PagePaletteItem,mf as PageSectionCard,tC as Pagination,iC as Pane,oC as Panel,Zs as Popup,Z6 as PriorityList,bC as ProgressBar,gC as ProgressTile,fC as QueryBuilder,b6 as Radio,x6 as RadioGroup,v6 as Rating,G6 as Reveal,uC as ScrollContainer,De as Select,U6 as SettingsContainer,lC as Sidebar,WS as SimpleChart,Th as Skeleton,D6 as Slideout,dC as Sp,F6 as SplitButton,sC as SplitPane,hC as Stat,H6 as StatusIndicator,pC as Stepper,Ah as Style,Rh as Tab,nC as Table,qn as Tabs,ec as Textarea,RS as Tile,OS as TileGroup,PS as TileProperty,rC as Timer,d6 as Toggle,No as Tooltip,J6 as TranslationGroup,K6 as Translations,eC as VerticalStepper,TS as Well,C as ZincElement,ck as clearFormStoreValues,$S as deepQuery,LS as deepQueryAll,Mt as deepQuerySelectorAll,se as litToHTML,Qc as on};
5208
+ `}};$t.styles=E(D1),$t.dependencies={"zn-collapsible":tl,"zn-icon":ct,"zn-input":qe,"zn-page-palette-item":uf,"zn-page-section-card":mf},c([p()],$t.prototype,"config",2),c([p({reflect:!0})],$t.prototype,"heading",2),c([p({reflect:!0})],$t.prototype,"subheading",2),c([p({attribute:!1})],$t.prototype,"sectionTypes",2),c([p({type:Boolean,reflect:!0,attribute:"palette-collapsed"})],$t.prototype,"paletteCollapsed",2),c([p({type:Boolean,reflect:!0,attribute:"inspector-collapsed"})],$t.prototype,"inspectorCollapsed",2),c([p({attribute:"auto-save",converter:{fromAttribute:t=>{if(t===null)return null;let r=parseFloat(t);return Number.isFinite(r)&&r>0?r:pI},toAttribute:t=>t===null?null:String(t)}})],$t.prototype,"autoSave",2),c([H()],$t.prototype,"_state",2),c([H()],$t.prototype,"_selectedId",2),c([H()],$t.prototype,"_search",2),c([H()],$t.prototype,"_pickerIndex",2),c([H()],$t.prototype,"_dragOverIndex",2),c([H()],$t.prototype,"_slotDragOver",2),c([H()],$t.prototype,"_slotPicker",2),c([H()],$t.prototype,"_form",2),c([K("config")],$t.prototype,"handleConfigChange",1),c([K("sectionTypes")],$t.prototype,"handleSectionTypesChange",1),c([H()],$t.prototype,"_lastSavedAt",2),c([H()],$t.prototype,"_justSaved",2),c([H()],$t.prototype,"_statusNow",2),c([H()],$t.prototype,"_restorePrompt",2);var uI=$t;$t.define("zn-page-builder");export{Kk as AbsoluteContainer,O6 as ActionBar,zS as Alert,Q6 as AnimatedButton,W6 as AudioSelect,xC as BulkActions,Tt as Button,ta as ButtonGroup,N6 as ButtonMenu,HS as ChannelTile,US as Chart,CS as ChatMessage,ES as ChatMessageAttachment,p6 as Checkbox,z6 as CheckboxGroup,el as Chip,tl as Collapsible,I6 as ColorSelect,IS as Cols,ol as Confirm,B6 as ContentBlock,vh as CopyButton,M6 as DataSelect,MS as DataTable,zh as DataTableFilter,Sh as DataTableSearch,R6 as DataTableSort,u6 as Datepicker,NS as DefinedLabel,ea as Dialog,vr as Dropdown,c6 as Editor,Co as EditorDialog,Cm as EditorQuickAction,Jl as EditorTool,Ch as EmptyState,Dh as ExpandingAction,y6 as File,j6 as FilterContainer,V6 as FilterWrapper,sf as FlowBranchConditions,iI as FlowBuilder,sI as FlowStep,pf as FlowStepGroup,aI as FlowSteps,m6 as FormGroup,Nh as Header,Eh as HoverContainer,ct as Icon,ZS as IconPicker,Xc as InlineEdit,qe as Input,f6 as InputGroup,w6 as Item,Y6 as Key,X6 as KeyContainer,g6 as LinkedSelect,B4 as MarkdownEditor,Po as Menu,Ln as MenuItem,il as Navbar,DS as Note,Ph as OptGroup,wr as Option,vC as OrderTable,YS as Page,uI as PageBuilder,P6 as PageNav,uf as PagePaletteItem,mf as PageSectionCard,tC as Pagination,iC as Pane,oC as Panel,Zs as Popup,Z6 as PriorityList,bC as ProgressBar,gC as ProgressTile,fC as QueryBuilder,b6 as Radio,x6 as RadioGroup,v6 as Rating,G6 as Reveal,uC as ScrollContainer,De as Select,U6 as SettingsContainer,lC as Sidebar,WS as SimpleChart,Th as Skeleton,D6 as Slideout,dC as Sp,F6 as SplitButton,sC as SplitPane,hC as Stat,H6 as StatusIndicator,pC as Stepper,Ah as Style,Rh as Tab,nC as Table,qn as Tabs,ec as Textarea,RS as Tile,OS as TileGroup,PS as TileProperty,rC as Timer,d6 as Toggle,No as Tooltip,J6 as TranslationGroup,K6 as Translations,eC as VerticalStepper,TS as Well,C as ZincElement,ck as clearFormStoreValues,$S as deepQuery,LS as deepQueryAll,Mt as deepQuerySelectorAll,le as litToHTML,Qc as on};