--- frontend token storage / auth ---
DesignScreenshot-Vue: No such file or directory (os error 2)
DesignScreenshot/output/git.buildapp.eu.org_run/git.buildapp.eu.org_2_login_page.html:228:`)}function j(qe){if(Ke(qe)){const bt={};for(let Rt=0;Rt<qe.length;Rt++){const Yt=qe[Rt],Ui=W(Yt)?De(Yt):j(Yt);if(Ui)for(const Bi in Ui)bt[Bi]=Ui[Bi]}return bt}else if(W(qe)||tt(qe))return qe}const H=/;(?![^(]*\))/g,ge=/:([^]+)/,me=/\/\*[^]*?\*\//g;function De(qe){const bt={};return qe.replace(me,"").split(H).forEach(Rt=>{if(Rt){const Yt=Rt.split(ge);Yt.length>1&&(bt[Yt[0].trim()]=Yt[1].trim())}}),bt}function ht(qe){if(!qe)return"";if(W(qe))return qe;let bt="";for(const Rt in qe){const Yt=qe[Rt];if(W(Yt)||typeof Yt=="number"){const Ui=Rt.startsWith("--")?Rt:Y(Rt);bt+=`${Ui}:${Yt};`}}return bt}function rt(qe){let bt="";if(W(qe))bt=qe;else if(Ke(qe))for(let Rt=0;Rt<qe.length;Rt++){const Yt=rt(qe[Rt]);Yt&&(bt+=Yt+" ")}else if(tt(qe))for(const Rt in qe)qe[Rt]&&(bt+=Rt+" ");return bt.trim()}function zt(qe){if(!qe)return null;let{class:bt,style:Rt}=qe;return bt&&!W(bt)&&(qe.class=rt(bt)),Rt&&(qe.style=j(Rt)),qe}const fi="html,body,base,head,link,meta,style,title,address,article,aside,footer,header,hgroup,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot",vi="svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,feDistantLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,text,textPath,title,tspan,unknown,use,view",nn="annotation,annotation-xml,maction,maligngroup,malignmark,math,menclose,merror,mfenced,mfrac,mfraction,mglyph,mi,mlabeledtr,mlongdiv,mmultiscripts,mn,mo,mover,mpadded,mphantom,mprescripts,mroot,mrow,ms,mscarries,mscarry,msgroup,msline,mspace,msqrt,msrow,mstack,mstyle,msub,msubsup,msup,mtable,mtd,mtext,mtr,munder,munderover,none,semantics",on="area,base,br,col,embed,hr,img,input,link,meta,param,source,track,wbr",an=null,bn=null,ln=null,Yi=null,Fn="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",vr=_(Fn),Ln=_(Fn+",async,autofocus,autoplay,controls,default,defer,disabled,hidden,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected");function Gs(qe){return!!qe||qe===""}const js=/[>/="'\u0009\u000a\u000c\u0020]/,os={};function Es(qe){if(os.hasOwnProperty(qe))return os[qe];const bt=js.test(qe);return bt&&console.error(`unsafe attribute name: ${qe}`),os[qe]=!bt}const qs={acceptCharset:"accept-charset",className:"class",htmlFor:"for",httpEquiv:"http-equiv"},As=null,Ys=null,On=null;function Tn(qe){if(qe==null)return!1;const bt=typeof qe;return bt==="string"||bt==="number"||bt==="boolean"}const jn=/["'&<>]/;function hn(qe){const bt=""+qe,Rt=jn.exec(bt);if(!Rt)return bt;let Yt="",Ui,Bi,An=0;for(Bi=Rt.index;Bi<bt.length;Bi++){switch(bt.charCodeAt(Bi)){case 34:Ui="&quot;";break;case 38:Ui="&amp;";break;case 39:Ui="&#39;";break;case 60:Ui="&lt;";break;case 62:Ui="&gt;";break;default:continue}An!==Bi&&(Yt+=bt.slice(An,Bi)),An=Bi+1,Yt+=Ui}return An!==Bi?Yt+bt.slice(An,Bi):Yt}const Ji=/^-?>|<!--|-->|--!>|<!-$/g;function sn(qe){return qe.replace(Ji,"")}const mn=/[ !"#$%&'()*+,./:;<=>?@[\\\]^`{|}~]/g;function mi(qe,bt){return qe.replace(mn,Rt=>bt?Rt==='"'?'\\\\\\"':`\\\\${Rt}`:`\\${Rt}`)}function Js(qe,bt){if(qe.length!==bt.length)return!1;let Rt=!0;for(let Yt=0;Rt&&Yt<qe.length;Yt++)Rt=Ri(qe[Yt],bt[Yt]);return Rt}function Ri(qe,bt){if(qe===bt)return!0;let Rt=q(qe),Yt=q(bt);if(Rt||Yt)return Rt&&Yt?qe.getTime()===bt.getTime():!1;if(Rt=Re(qe),Yt=Re(bt),Rt||Yt)return qe===bt;if(Rt=Ke(qe),Yt=Ke(bt),Rt||Yt)return Rt&&Yt?Js(qe,bt):!1;if(Rt=tt(qe),Yt=tt(bt),Rt||Yt){if(!Rt||!Yt)return!1;const Ui=Object.keys(qe).length,Bi=Object.keys(bt).length;if(Ui!==Bi)return!1;for(const An in qe){const cn=qe.hasOwnProperty(An),pn=bt.hasOwnProperty(An);if(cn&&!pn||!cn&&pn||!Ri(qe[An],bt[An]))return!1}}return String(qe)===String(bt)}function Rr(qe,bt){return qe.findIndex(Rt=>Ri(Rt,bt))}const En=qe=>!!(qe&&qe.__v_isRef===!0),Mr=qe=>W(qe)?qe:qe==null?"":Ke(qe)||tt(qe)&&(qe.toString===et||!c(qe.toString))?En(qe)?Mr(qe.value):JSON.stringify(qe,Ps,2):String(qe),Ps=(qe,bt)=>En(bt)?Ps(qe,bt.value):At(bt)?{[`Map(${bt.size})`]:[...bt.entries()].reduce((Rt,[Yt,Ui],Bi)=>(Rt[br(Yt,Bi)+" =>"]=Ui,Rt),{})}:gt(bt)?{[`Set(${bt.size})`]:[...bt.values()].map(Rt=>br(Rt))}:Re(bt)?br(bt):tt(bt)&&!Ke(bt)&&!si(bt)?String(bt):bt,br=(qe,bt="")=>{var Rt;return Re(qe)?`Symbol(${(Rt=qe.description)!=null?Rt:bt})`:qe}},"./node_modules/balanced-match/index.js":function(r){"use strict";r.exports=v;function v(g,O,R){g instanceof RegExp&&(g=b(g,R)),O instanceof RegExp&&(O=b(O,R));var J=_(g,O,R);return J&&{start:J[0],end:J[1],pre:R.slice(0,J[0]),body:R.slice(J[0]+g.length,J[1]),post:R.slice(J[1]+O.length)}}function b(g,O){var R=O.match(g);return R?R[0]:null}v.range=_;function _(g,O,R){var J,Z,C,we,Be,Ue=R.indexOf(g),Q=R.indexOf(O,Ue+1),Ke=Ue;if(Ue>=0&&Q>0){if(g===O)return[Ue,Q];for(J=[],C=R.length;Ke>=0&&!Be;)Ke==Ue?(J.push(Ke),Ue=R.indexOf(g,Ke+1)):J.length==1?Be=[J.pop(),Q]:(Z=J.pop(),Z<C&&(C=Z,we=Q),Q=R.indexOf(O,Ke+1)),Ke=Ue<Q&&Ue>=0?Ue:Q;J.length&&(Be=[C,we])}return Be}},"./node_modules/brace-expansion/index.js":function(r,v,b){var _=b("./node_modules/balanced-match/index.js");r.exports=Q;var g="\0SLASH"+Math.random()+"\0",O="\0OPEN"+Math.random()+"\0",R="\0CLOSE"+Math.random()+"\0",J="\0COMMA"+Math.random()+"\0",Z="\0PERIOD"+Math.random()+"\0";function C(c){return parseInt(c,10)==c?parseInt(c,10):c.charCodeAt(0)}function we(c){return c.split("\\\\").join(g).split("\\{").join(O).split("\\}").join(R).split("\\,").join(J).split("\\.").join(Z)}function Be(c){return c.split(g).join("\\").split(O).join("{").split(R).join("}").split(J).join(",").split(Z).join(".")}function Ue(c){if(!c)return[""];var W=[],Re=_("{","}",c);if(!Re)return c.split(",");var tt=Re.pre,st=Re.body,et=Re.post,je=tt.split(",");je[je.length-1]+="{"+st+"}";var S=Ue(et);return et.length&&(je[je.length-1]+=S.shift(),je.push.apply(je,S)),W.push.apply(W,je),W}function Q(c){return c?(c.substr(0,2)==="{}"&&(c="\\{\\}"+c.substr(2)),ne(we(c),!0).map(Be)):[]}function Ke(c){return"{"+c+"}"}function At(c){return/^-?0\d/.test(c)}function gt(c,W){return c<=W}function q(c,W){return c>=W}function ne(c,W){var Re=[],tt=_("{","}",c);if(!tt)return[c];var st=tt.pre,et=tt.post.length?ne(tt.post,!1):[""];if(/\$$/.test(tt.pre))for(var je=0;je<et.length;je++){var S=st+"{"+tt.body+"}"+et[je];Re.push(S)}else{var si=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(tt.body),ct=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(tt.body),xt=si||ct,ce=tt.body.indexOf(",")>=0;if(!xt&&!ce)return tt.post.match(/,.*\}/)?(c=tt.pre+"{"+tt.body+R+tt.post,ne(c)):[c];var G;if(xt)G=tt.body.split(/\.\./);else if(G=Ue(tt.body),G.length===1&&(G=ne(G[0],!1).map(Ke),G.length===1))return et.map(function(te){return tt.pre+G[0]+te});var P;if(xt){var k=C(G[0]),N=C(G[1]),Y=Math.max(G[0].length,G[1].length),ve=G.length==3?Math.abs(C(G[2])):1,Oe=gt,Ne=N<k;Ne&&(ve*=-1,Oe=q);var Ve=G.some(At);P=[];for(var Ye=k;Oe(Ye,N);Ye+=ve){var Lt;if(ct)Lt=String.fromCharCode(Ye),Lt==="\\"&&(Lt="");else if(Lt=String(Ye),Ve){var K=Y-Lt.length;if(K>0){var Ee=new Array(K+1).join("0");Ye<0?Lt="-"+Ee+Lt.slice(1):Lt=Ee+Lt}}P.push(Lt)}}else{P=[];for(var nt=0;nt<G.length;nt++)P.push.apply(P,ne(G[nt],!1))}for(var nt=0;nt<P.length;nt++)for(var je=0;je<et.length;je++){var S=st+P[nt]+et[je];(!W||xt||S)&&Re.push(S)}}return Re}},"./node_modules/dayjs/dayjs.min.js":function(r){(function(v,b){r.exports=b()})(this,function(){"use strict";var v=1e3,b=6e4,_=36e5,g="millisecond",O="second",R="minute",J="hour",Z="day",C="week",we="month",Be="quarter",Ue="year",Q="date",Ke="Invalid Date",At=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,gt=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,q={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(xt){var ce=["th","st","nd","rd"],G=xt%100;return"["+xt+(ce[(G-20)%10]||ce[G]||ce[0])+"]"}},ne=function(xt,ce,G){var P=String(xt);return!P||P.length>=ce?xt:""+Array(ce+1-P.length).join(G)+xt},c={s:ne,z:function(xt){var ce=-xt.utcOffset(),G=Math.abs(ce),P=Math.floor(G/60),k=G%60;return(ce<=0?"+":"-")+ne(P,2,"0")+":"+ne(k,2,"0")},m:function xt(ce,G){if(ce.date()<G.date())return-xt(G,ce);var P=12*(G.year()-ce.year())+(G.month()-ce.month()),k=ce.clone().add(P,we),N=G-k<0,Y=ce.clone().add(P+(N?-1:1),we);return+(-(P+(G-k)/(N?k-Y:Y-k))||0)},a:function(xt){return xt<0?Math.ceil(xt)||0:Math.floor(xt)},p:function(xt){return{M:we,y:Ue,w:C,d:Z,D:Q,h:J,m:R,s:O,ms:g,Q:Be}[xt]||String(xt||"").toLowerCase().replace(/s$/,"")},u:function(xt){return xt===void 0}},W="en",Re={};Re[W]=q;var tt="$isDayjsObject",st=function(xt){return xt instanceof si||!(!xt||!xt[tt])},et=function xt(ce,G,P){var k;if(!ce)return W;if(typeof ce=="string"){var N=ce.toLowerCase();Re[N]&&(k=N),G&&(Re[N]=G,k=N);var Y=ce.split("-");if(!k&&Y.length>1)return xt(Y[0])}else{var ve=ce.name;Re[ve]=ce,k=ve}return!P&&k&&(W=k),k||!P&&W},je=function(xt,ce){if(st(xt))return xt.clone();var G=typeof ce=="object"?ce:{};return G.date=xt,G.args=arguments,new si(G)},S=c;S.l=et,S.i=st,S.w=function(xt,ce){return je(xt,{locale:ce.$L,utc:ce.$u,x:ce.$x,$offset:ce.$offset})};var si=function(){function xt(G){this.$L=et(G.locale,null,!0),this.parse(G),this.$x=this.$x||G.x||{},this[tt]=!0}var ce=xt.prototype;return ce.parse=function(G){this.$d=function(P){var k=P.date,N=P.utc;if(k===null)return new Date(NaN);if(S.u(k))return new Date;if(k instanceof Date)return new Date(k);if(typeof k=="string"&&!/Z$/i.test(k)){var Y=k.match(At);if(Y){var ve=Y[2]-1||0,Oe=(Y[7]||"0").substring(0,3);return N?new Date(Date.UTC(Y[1],ve,Y[3]||1,Y[4]||0,Y[5]||0,Y[6]||0,Oe)):new Date(Y[1],ve,Y[3]||1,Y[4]||0,Y[5]||0,Y[6]||0,Oe)}}return new Date(k)}(G),this.init()},ce.init=function(){var G=this.$d;this.$y=G.getFullYear(),this.$M=G.getMonth(),this.$D=G.getDate(),this.$W=G.getDay(),this.$H=G.getHours(),this.$m=G.getMinutes(),this.$s=G.getSeconds(),this.$ms=G.getMilliseconds()},ce.$utils=function(){return S},ce.isValid=function(){return this.$d.toString()!==Ke},ce.isSame=function(G,P){var k=je(G);return this.startOf(P)<=k&&k<=this.endOf(P)},ce.isAfter=function(G,P){return je(G)<this.startOf(P)},ce.isBefore=function(G,P){return this.endOf(P)<je(G)},ce.$g=function(G,P,k){return S.u(G)?this[P]:this.set(k,G)},ce.unix=function(){return Math.floor(this.valueOf()/1e3)},ce.valueOf=function(){return this.$d.getTime()},ce.startOf=function(G,P){var k=this,N=!!S.u(P)||P,Y=S.p(G),ve=function(nt,te){var ee=S.w(k.$u?Date.UTC(k.$y,te,nt):new Date(k.$y,te,nt),k);return N?ee:ee.endOf(Z)},Oe=function(nt,te){return S.w(k.toDate()[nt].apply(k.toDate("s"),(N?[0,0,0,0]:[23,59,59,999]).slice(te)),k)},Ne=this.$W,Ve=this.$M,Ye=this.$D,Lt="set"+(this.$u?"UTC":"");switch(Y){case Ue:return N?ve(1,0):ve(31,11);case we:return N?ve(1,Ve):ve(0,Ve+1);case C:var K=this.$locale().weekStart||0,Ee=(Ne<K?Ne+7:Ne)-K;return ve(N?Ye-Ee:Ye+(6-Ee),Ve);case Z:case Q:return Oe(Lt+"Hours",0);case J:return Oe(Lt+"Minutes",1);case R:return Oe(Lt+"Seconds",2);case O:return Oe(Lt+"Milliseconds",3);default:return this.clone()}},ce.endOf=function(G){return this.startOf(G,!1)},ce.$set=function(G,P){var k,N=S.p(G),Y="set"+(this.$u?"UTC":""),ve=(k={},k[Z]=Y+"Date",k[Q]=Y+"Date",k[we]=Y+"Month",k[Ue]=Y+"FullYear",k[J]=Y+"Hours",k[R]=Y+"Minutes",k[O]=Y+"Seconds",k[g]=Y+"Milliseconds",k)[N],Oe=N===Z?this.$D+(P-this.$W):P;if(N===we||N===Ue){var Ne=this.clone().set(Q,1);Ne.$d[ve](Oe),Ne.init(),this.$d=Ne.set(Q,Math.min(this.$D,Ne.daysInMonth())).$d}else ve&&this.$d[ve](Oe);return this.init(),this},ce.set=function(G,P){return this.clone().$set(G,P)},ce.get=function(G){return this[S.p(G)]()},ce.add=function(G,P){var k,N=this;G=Number(G);var Y=S.p(P),ve=function(Ve){var Ye=je(N);return S.w(Ye.date(Ye.date()+Math.round(Ve*G)),N)};if(Y===we)return this.set(we,this.$M+G);if(Y===Ue)return this.set(Ue,this.$y+G);if(Y===Z)return ve(1);if(Y===C)return ve(7);var Oe=(k={},k[R]=b,k[J]=_,k[O]=v,k)[Y]||1,Ne=this.$d.getTime()+G*Oe;return S.w(Ne,this)},ce.subtract=function(G,P){return this.add(-1*G,P)},ce.format=function(G){var P=this,k=this.$locale();if(!this.isValid())return k.invalidDate||Ke;var N=G||"YYYY-MM-DDTHH:mm:ssZ",Y=S.z(this),ve=this.$H,Oe=this.$m,Ne=this.$M,Ve=k.weekdays,Ye=k.months,Lt=k.meridiem,K=function(te,ee,oe,Ge){return te&&(te[ee]||te(P,N))||oe[ee].slice(0,Ge)},Ee=function(te){return S.s(ve%12||12,te,"0")},nt=Lt||function(te,ee,oe){var Ge=te<12?"AM":"PM";return oe?Ge.toLowerCase():Ge};return N.replace(gt,function(te,ee){return ee||function(oe){switch(oe){case"YY":return String(P.$y).slice(-2);case"YYYY":return S.s(P.$y,4,"0");case"M":return Ne+1;case"MM":return S.s(Ne+1,2,"0");case"MMM":return K(k.monthsShort,Ne,Ye,3);case"MMMM":return K(Ye,Ne);case"D":return P.$D;case"DD":return S.s(P.$D,2,"0");case"d":return String(P.$W);case"dd":return K(k.weekdaysMin,P.$W,Ve,2);case"ddd":return K(k.weekdaysShort,P.$W,Ve,3);case"dddd":return Ve[P.$W];case"H":return String(ve);case"HH":return S.s(ve,2,"0");case"h":return Ee(1);case"hh":return Ee(2);case"a":return nt(ve,Oe,!0);case"A":return nt(ve,Oe,!1);case"m":return String(Oe);case"mm":return S.s(Oe,2,"0");case"s":return String(P.$s);case"ss":return S.s(P.$s,2,"0");case"SSS":return S.s(P.$ms,3,"0");case"Z":return Y}return null}(te)||Y.replace(":","")})},ce.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},ce.diff=function(G,P,k){var N,Y=this,ve=S.p(P),Oe=je(G),Ne=(Oe.utcOffset()-this.utcOffset())*b,Ve=this-Oe,Ye=function(){return S.m(Y,Oe)};switch(ve){case Ue:N=Ye()/12;break;case we:N=Ye();break;case Be:N=Ye()/3;break;case C:N=(Ve-Ne)/6048e5;break;case Z:N=(Ve-Ne)/864e5;break;case J:N=Ve/_;break;case R:N=Ve/b;break;case O:N=Ve/v;break;default:N=Ve}return k?N:S.a(N)},ce.daysInMonth=function(){return this.endOf(we).$D},ce.$locale=function(){return Re[this.$L]},ce.locale=function(G,P){if(!G)return this.$L;var k=this.clone(),N=et(G,P,!0);return N&&(k.$L=N),k},ce.clone=function(){return S.w(this.$d,this)},ce.toDate=function(){return new Date(this.valueOf())},ce.toJSON=function(){return this.isValid()?this.toISOString():null},ce.toISOString=function(){return this.$d.toISOString()},ce.toString=function(){return this.$d.toUTCString()},xt}(),ct=si.prototype;return je.prototype=ct,[["$ms",g],["$s",O],["$m",R],["$H",J],["$W",Z],["$M",we],["$y",Ue],["$D",Q]].forEach(function(xt){ct[xt[1]]=function(ce){return this.$g(ce,xt[0],xt[1])}}),je.extend=function(xt,ce){return xt.$i||(xt(ce,si,je),xt.$i=!0),je},je.locale=et,je.isDayjs=st,je.unix=function(xt){return je(1e3*xt)},je.en=Re[W],je.Ls=Re,je.p={},je})},"./node_modules/dayjs/plugin/utc.js":function(r){(function(v,b){r.exports=b()})(this,function(){"use strict";var v="minute",b=/[+-]\d\d(?::?\d\d)?/g,_=/([+-]|\d\d)/g;return function(g,O,R){var J=O.prototype;R.utc=function(Ke){var At={date:Ke,utc:!0,args:arguments};return new O(At)},J.utc=function(Ke){var At=R(this.toDate(),{locale:this.$L,utc:!0});return Ke?At.add(this.utcOffset(),v):At},J.local=function(){return R(this.toDate(),{locale:this.$L,utc:!1})};var Z=J.parse;J.parse=function(Ke){Ke.utc&&(this.$u=!0),this.$utils().u(Ke.$offset)||(this.$offset=Ke.$offset),Z.call(this,Ke)};var C=J.init;J.init=function(){if(this.$u){var Ke=this.$d;this.$y=Ke.getUTCFullYear(),this.$M=Ke.getUTCMonth(),this.$D=Ke.getUTCDate(),this.$W=Ke.getUTCDay(),this.$H=Ke.getUTCHours(),this.$m=Ke.getUTCMinutes(),this.$s=Ke.getUTCSeconds(),this.$ms=Ke.getUTCMilliseconds()}else C.call(this)};var we=J.utcOffset;J.utcOffset=function(Ke,At){var gt=this.$utils().u;if(gt(Ke))return this.$u?0:gt(this.$offset)?we.call(this):this.$offset;if(typeof Ke=="string"&&(Ke=function(W){W===void 0&&(W="");var Re=W.match(b);if(!Re)return null;var tt=(""+Re[0]).match(_)||["-",0,0],st=tt[0],et=60*+tt[1]+ +tt[2];return et===0?0:st==="+"?et:-et}(Ke),Ke===null))return this;var q=Math.abs(Ke)<=16?60*Ke:Ke,ne=this;if(At)return ne.$offset=q,ne.$u=Ke===0,ne;if(Ke!==0){var c=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(ne=this.local().add(q+c,v)).$offset=q,ne.$x.$localOffset=c}else ne=this.utc();return ne};var Be=J.format;J.format=function(Ke){var At=Ke||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return Be.call(this,At)},J.valueOf=function(){var Ke=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*Ke},J.isUTC=function(){return!!this.$u},J.toISOString=function(){return this.toDate().toISOString()},J.toString=function(){return this.toDate().toUTCString()};var Ue=J.toDate;J.toDate=function(Ke){return Ke==="s"&&this.$offset?R(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():Ue.call(this)};var Q=J.diff;J.diff=function(Ke,At,gt){if(Ke&&this.$u===Ke.$u)return Q.call(this,Ke,At,gt);var q=this.local(),ne=R(Ke).local();return Q.call(q,ne,At,gt)}}})},"./node_modules/htmx.org/dist/htmx.esm.js":function(__unused_webpack_module,__webpack_exports__){"use strict";var htmx=function(){"use strict";const htmx={onLoad:null,process:null,on:null,off:null,trigger:null,ajax:null,find:null,findAll:null,closest:null,values:function(r,v){return getInputValues(r,v||"post").values},remove:null,addClass:null,removeClass:null,toggleClass:null,takeClass:null,swap:null,defineExtension:null,removeExtension:null,logAll:null,logNone:null,logger:null,config:{historyEnabled:!0,historyCacheSize:10,refreshOnHistoryMiss:!1,defaultSwapStyle:"innerHTML",defaultSwapDelay:0,defaultSettleDelay:20,includeIndicatorStyles:!0,indicatorClass:"htmx-indicator",requestClass:"htmx-request",addedClass:"htmx-added",settlingClass:"htmx-settling",swappingClass:"htmx-swapping",allowEval:!0,allowScriptTags:!0,inlineScriptNonce:"",inlineStyleNonce:"",attributesToSettle:["class","style","width","height"],withCredentials:!1,timeout:0,wsReconnectDelay:"full-jitter",wsBinaryType:"blob",disableSelector:"[hx-disable], [data-hx-disable]",scrollBehavior:"instant",defaultFocusScroll:!1,getCacheBusterParam:!1,globalViewTransitions:!1,methodsThatUseUrlParams:["get","delete"],selfRequestsOnly:!0,ignoreTitle:!1,scrollIntoViewOnBoost:!0,triggerSpecsCache:null,disableInheritance:!1,responseHandling:[{code:"204",swap:!1},{code:"[23]..",swap:!0},{code:"[45]..",swap:!1,error:!0}],allowNestedOobSwaps:!0},parseInterval:null,_:null,version:"2.0.4"};htmx.onLoad=onLoadHelper,htmx.process=processNode,htmx.on=addEventListenerImpl,htmx.off=removeEventListenerImpl,htmx.trigger=triggerEvent,htmx.ajax=ajaxHelper,htmx.find=find,htmx.findAll=findAll,htmx.closest=closest,htmx.remove=removeElement,htmx.addClass=addClassToElement,htmx.removeClass=removeClassFromElement,htmx.toggleClass=toggleClassOnElement,htmx.takeClass=takeClassForElement,htmx.swap=swap,htmx.defineExtension=defineExtension,htmx.removeExtension=removeExtension,htmx.logAll=logAll,htmx.logNone=logNone,htmx.parseInterval=parseInterval,htmx._=internalEval;const internalAPI={addTriggerHandler,bodyContains,canAccessLocalStorage,findThisElement,filterValues,swap,hasAttribute,getAttributeValue,getClosestAttributeValue,getClosestMatch,getExpressionVars,getHeaders,getInputValues,getInternalData,getSwapSpecification,getTriggerSpecs,getTarget,makeFragment,mergeObjects,makeSettleInfo,oobSwap,querySelectorExt,settleImmediately,shouldCancel,triggerEvent,triggerErrorEvent,withExtensions},VERBS=["get","post","put","delete","patch"],VERB_SELECTOR=VERBS.map(function(r){return"[hx-"+r+"], [data-hx-"+r+"]"}).join(", ");function parseInterval(r){if(r==null)return;let v=NaN;return r.slice(-2)=="ms"?v=parseFloat(r.slice(0,-2)):r.slice(-1)=="s"?v=parseFloat(r.slice(0,-1))*1e3:r.slice(-1)=="m"?v=parseFloat(r.slice(0,-1))*1e3*60:v=parseFloat(r),isNaN(v)?void 0:v}function getRawAttribute(r,v){return r instanceof Element&&r.getAttribute(v)}function hasAttribute(r,v){return!!r.hasAttribute&&(r.hasAttribute(v)||r.hasAttribute("data-"+v))}function getAttributeValue(r,v){return getRawAttribute(r,v)||getRawAttribute(r,"data-"+v)}function parentElt(r){const v=r.parentElement;return!v&&r.parentNode instanceof ShadowRoot?r.parentNode:v}function getDocument(){return document}function getRootNode(r,v){return r.getRootNode?r.getRootNode({composed:v}):getDocument()}function getClosestMatch(r,v){for(;r&&!v(r);)r=parentElt(r);return r||null}function getAttributeValueWithDisinheritance(r,v,b){const _=getAttributeValue(v,b),g=getAttributeValue(v,"hx-disinherit");var O=getAttributeValue(v,"hx-inherit");if(r!==v){if(htmx.config.disableInheritance)return O&&(O==="*"||O.split(" ").indexOf(b)>=0)?_:null;if(g&&(g==="*"||g.split(" ").indexOf(b)>=0))return"unset"}return _}function getClosestAttributeValue(r,v){let b=null;if(getClosestMatch(r,function(_){return!!(b=getAttributeValueWithDisinheritance(r,asElement(_),v))}),b!=="unset")return b}function matches(r,v){const b=r instanceof Element&&(r.matches||r.matchesSelector||r.msMatchesSelector||r.mozMatchesSelector||r.webkitMatchesSelector||r.oMatchesSelector);return!!b&&b.call(r,v)}function getStartTag(r){const b=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i.exec(r);return b?b[1].toLowerCase():""}function parseHTML(r){return new DOMParser().parseFromString(r,"text/html")}function takeChildrenFor(r,v){for(;v.childNodes.length>0;)r.append(v.childNodes[0])}function duplicateScript(r){const v=getDocument().createElement("script");return forEach(r.attributes,function(b){v.setAttribute(b.name,b.value)}),v.textContent=r.textContent,v.async=!1,htmx.config.inlineScriptNonce&&(v.nonce=htmx.config.inlineScriptNonce),v}function isJavaScriptScriptNode(r){return r.matches("script")&&(r.type==="text/javascript"||r.type==="module"||r.type==="")}function normalizeScriptTags(r){Array.from(r.querySelectorAll("script")).forEach(v=>{if(isJavaScriptScriptNode(v)){const b=duplicateScript(v),_=v.parentNode;try{_.insertBefore(b,v)}catch(g){logError(g)}finally{v.remove()}}})}function makeFragment(r){const v=r.replace(/<head(\s[^>]*)?>[\s\S]*?<\/head>/i,""),b=getStartTag(v);let _;if(b==="html"){_=new DocumentFragment;const O=parseHTML(r);takeChildrenFor(_,O.body),_.title=O.title}else if(b==="body"){_=new DocumentFragment;const O=parseHTML(v);takeChildrenFor(_,O.body),_.title=O.title}else{const O=parseHTML('<body><template class="internal-htmx-wrapper">'+v+"</template></body>");_=O.querySelector("template").content,_.title=O.title;var g=_.querySelector("title");g&&g.parentNode===_&&(g.remove(),_.title=g.innerText)}return _&&(htmx.config.allowScriptTags?normalizeScriptTags(_):_.querySelectorAll("script").forEach(O=>O.remove())),_}function maybeCall(r){r&&r()}function isType(r,v){return Object.prototype.toString.call(r)==="[object "+v+"]"}function isFunction(r){return typeof r=="function"}function isRawObject(r){return isType(r,"Object")}function getInternalData(r){const v="htmx-internal-data";let b=r[v];return b||(b=r[v]={}),b}function toArray(r){const v=[];if(r)for(let b=0;b<r.length;b++)v.push(r[b]);return v}function forEach(r,v){if(r)for(let b=0;b<r.length;b++)v(r[b])}function isScrolledIntoView(r){const v=r.getBoundingClientRect(),b=v.top,_=v.bottom;return b<window.innerHeight&&_>=0}function bodyContains(r){return r.getRootNode({composed:!0})===document}function splitOnWhitespace(r){return r.trim().split(/\s+/)}function mergeObjects(r,v){for(const b in v)v.hasOwnProperty(b)&&(r[b]=v[b]);return r}function parseJSON(r){try{return JSON.parse(r)}catch(v){return logError(v),null}}function canAccessLocalStorage(){const r="htmx:localStorageTest";try{return localStorage.setItem(r,r),localStorage.removeItem(r),!0}catch{return!1}}function normalizePath(r){try{const v=new URL(r);return v&&(r=v.pathname+v.search),/^\/$/.test(r)||(r=r.replace(/\/+$/,"")),r}catch{return r}}function internalEval(str){return maybeEval(getDocument().body,function(){return eval(str)})}function onLoadHelper(r){return htmx.on("htmx:load",function(b){r(b.detail.elt)})}function logAll(){htmx.logger=function(r,v,b){console&&console.log(v,r,b)}}function logNone(){htmx.logger=null}function find(r,v){return typeof r!="string"?r.querySelector(v):find(getDocument(),r)}function findAll(r,v){return typeof r!="string"?r.querySelectorAll(v):findAll(getDocument(),r)}function getWindow(){return window}function removeElement(r,v){r=resolveTarget(r),v?getWindow().setTimeout(function(){removeElement(r),r=null},v):parentElt(r).removeChild(r)}function asElement(r){return r instanceof Element?r:null}function asHtmlElement(r){return r instanceof HTMLElement?r:null}function asString(r){return typeof r=="string"?r:null}function asParentNode(r){return r instanceof Element||r instanceof Document||r instanceof DocumentFragment?r:null}function addClassToElement(r,v,b){r=asElement(resolveTarget(r)),r&&(b?getWindow().setTimeout(function(){addClassToElement(r,v),r=null},b):r.classList&&r.classList.add(v))}function removeClassFromElement(r,v,b){let _=asElement(resolveTarget(r));_&&(b?getWindow().setTimeout(function(){removeClassFromElement(_,v),_=null},b):_.classList&&(_.classList.remove(v),_.classList.length===0&&_.removeAttribute("class")))}function toggleClassOnElement(r,v){r=resolveTarget(r),r.classList.toggle(v)}function takeClassForElement(r,v){r=resolveTarget(r),forEach(r.parentElement.children,function(b){removeClassFromElement(b,v)}),addClassToElement(asElement(r),v)}function closest(r,v){if(r=asElement(resolveTarget(r)),r&&r.closest)return r.closest(v);do if(r==null||matches(r,v))return r;while(r=r&&asElement(parentElt(r)));return null}function startsWith(r,v){return r.substring(0,v.length)===v}function endsWith(r,v){return r.substring(r.length-v.length)===v}function normalizeSelector(r){const v=r.trim();return startsWith(v,"<")&&endsWith(v,"/>")?v.substring(1,v.length-2):v}function querySelectorAllExt(r,v,b){if(v.indexOf("global ")===0)return querySelectorAllExt(r,v.slice(7),!0);r=resolveTarget(r);const _=[];{let R=0,J=0;for(let Z=0;Z<v.length;Z++){const C=v[Z];if(C===","&&R===0){_.push(v.substring(J,Z)),J=Z+1;continue}C==="<"?R++:C==="/"&&Z<v.length-1&&v[Z+1]===">"&&R--}J<v.length&&_.push(v.substring(J))}const g=[],O=[];for(;_.length>0;){const R=normalizeSelector(_.shift());let J;R.indexOf("closest ")===0?J=closest(asElement(r),normalizeSelector(R.substr(8))):R.indexOf("find ")===0?J=find(asParentNode(r),normalizeSelector(R.substr(5))):R==="next"||R==="nextElementSibling"?J=asElement(r).nextElementSibling:R.indexOf("next ")===0?J=scanForwardQuery(r,normalizeSelector(R.substr(5)),!!b):R==="previous"||R==="previousElementSibling"?J=asElement(r).previousElementSibling:R.indexOf("previous ")===0?J=scanBackwardsQuery(r,normalizeSelector(R.substr(9)),!!b):R==="document"?J=document:R==="window"?J=window:R==="body"?J=document.body:R==="root"?J=getRootNode(r,!!b):R==="host"?J=r.getRootNode().host:O.push(R),J&&g.push(J)}if(O.length>0){const R=O.join(","),J=asParentNode(getRootNode(r,!!b));g.push(...toArray(J.querySelectorAll(R)))}return g}var scanForwardQuery=function(r,v,b){const _=asParentNode(getRootNode(r,b)).querySelectorAll(v);for(let g=0;g<_.length;g++){const O=_[g];if(O.compareDocumentPosition(r)===Node.DOCUMENT_POSITION_PRECEDING)return O}},scanBackwardsQuery=function(r,v,b){const _=asParentNode(getRootNode(r,b)).querySelectorAll(v);for(let g=_.length-1;g>=0;g--){const O=_[g];if(O.compareDocumentPosition(r)===Node.DOCUMENT_POSITION_FOLLOWING)return O}};function querySelectorExt(r,v){return typeof r!="string"?querySelectorAllExt(r,v)[0]:querySelectorAllExt(getDocument().body,r)[0]}function resolveTarget(r,v){return typeof r=="string"?find(asParentNode(v)||document,r):r}function processEventArgs(r,v,b,_){return isFunction(v)?{target:getDocument().body,event:asString(r),listener:v,options:b}:{target:resolveTarget(r),event:asString(v),listener:b,options:_}}function addEventListenerImpl(r,v,b,_){return ready(function(){const O=processEventArgs(r,v,b,_);O.target.addEventListener(O.event,O.listener,O.options)}),isFunction(v)?v:b}function removeEventListenerImpl(r,v,b){return ready(function(){const _=processEventArgs(r,v,b);_.target.removeEventListener(_.event,_.listener)}),isFunction(v)?v:b}const DUMMY_ELT=getDocument().createElement("output");function findAttributeTargets(r,v){const b=getClosestAttributeValue(r,v);if(b){if(b==="this")return[findThisElement(r,v)];{const _=querySelectorAllExt(r,b);return _.length===0?(logError('The selector "'+b+'" on '+v+" returned no matches!"),[DUMMY_ELT]):_}}}function findThisElement(r,v){return asElement(getClosestMatch(r,function(b){return getAttributeValue(asElement(b),v)!=null}))}function getTarget(r){const v=getClosestAttributeValue(r,"hx-target");return v?v==="this"?findThisElement(r,"hx-target"):querySelectorExt(r,v):getInternalData(r).boosted?getDocument().body:r}function shouldSettleAttribute(r){const v=htmx.config.attributesToSettle;for(let b=0;b<v.length;b++)if(r===v[b])return!0;return!1}function cloneAttributes(r,v){forEach(r.attributes,function(b){!v.hasAttribute(b.name)&&shouldSettleAttribute(b.name)&&r.removeAttribute(b.name)}),forEach(v.attributes,function(b){shouldSettleAttribute(b.name)&&r.setAttribute(b.name,b.value)})}function isInlineSwap(r,v){const b=getExtensions(v);for(let _=0;_<b.length;_++){const g=b[_];try{if(g.isInlineSwap(r))return!0}catch(O){logError(O)}}return r==="outerHTML"}function oobSwap(r,v,b,_){_=_||getDocument();let g="#"+getRawAttribute(v,"id"),O="outerHTML";r==="true"||(r.indexOf(":")>0?(O=r.substring(0,r.indexOf(":")),g=r.substring(r.indexOf(":")+1)):O=r),v.removeAttribute("hx-swap-oob"),v.removeAttribute("data-hx-swap-oob");const R=querySelectorAllExt(_,g,!1);return R?(forEach(R,function(J){let Z;const C=v.cloneNode(!0);Z=getDocument().createDocumentFragment(),Z.appendChild(C),isInlineSwap(O,J)||(Z=asParentNode(C));const we={shouldSwap:!0,target:J,fragment:Z};triggerEvent(J,"htmx:oobBeforeSwap",we)&&(J=we.target,we.shouldSwap&&(handlePreservedElements(Z),swapWithStyle(O,J,J,Z,b),restorePreservedElements()),forEach(b.elts,function(Be){triggerEvent(Be,"htmx:oobAfterSwap",we)}))}),v.parentNode.removeChild(v)):(v.parentNode.removeChild(v),triggerErrorEvent(getDocument().body,"htmx:oobErrorNoTarget",{content:v})),r}function restorePreservedElements(){const r=find("#--htmx-preserve-pantry--");if(r){for(const v of[...r.children]){const b=find("#"+v.id);b.parentNode.moveBefore(v,b),b.remove()}r.remove()}}function handlePreservedElements(r){forEach(findAll(r,"[hx-preserve], [data-hx-preserve]"),function(v){const b=getAttributeValue(v,"id"),_=getDocument().getElementById(b);if(_!=null)if(v.moveBefore){let g=find("#--htmx-preserve-pantry--");g==null&&(getDocument().body.insertAdjacentHTML("afterend","<div id='--htmx-preserve-pantry--'></div>"),g=find("#--htmx-preserve-pantry--")),g.moveBefore(_,null)}else v.parentNode.replaceChild(_,v)})}function handleAttributes(r,v,b){forEach(v.querySelectorAll("[id]"),function(_){const g=getRawAttribute(_,"id");if(g&&g.length>0){const O=g.replace("'","\\'"),R=_.tagName.replace(":","\\:"),J=asParentNode(r),Z=J&&J.querySelector(R+"[id='"+O+"']");if(Z&&Z!==J){const C=_.cloneNode();cloneAttributes(_,Z),b.tasks.push(function(){cloneAttributes(_,C)})}}})}function makeAjaxLoadTask(r){return function(){removeClassFromElement(r,htmx.config.addedClass),processNode(asElement(r)),processFocus(asParentNode(r)),triggerEvent(r,"htmx:load")}}function processFocus(r){const v="[autofocus]",b=asHtmlElement(matches(r,v)?r:r.querySelector(v));b?.focus()}function insertNodesBefore(r,v,b,_){for(handleAttributes(r,b,_);b.childNodes.length>0;){const g=b.firstChild;addClassToElement(asElement(g),htmx.config.addedClass),r.insertBefore(g,v),g.nodeType!==Node.TEXT_NODE&&g.nodeType!==Node.COMMENT_NODE&&_.tasks.push(makeAjaxLoadTask(g))}}function stringHash(r,v){let b=0;for(;b<r.length;)v=(v<<5)-v+r.charCodeAt(b++)|0;return v}function attributeHash(r){let v=0;if(r.attributes)for(let b=0;b<r.attributes.length;b++){const _=r.attributes[b];_.value&&(v=stringHash(_.name,v),v=stringHash(_.value,v))}return v}function deInitOnHandlers(r){const v=getInternalData(r);if(v.onHandlers){for(let b=0;b<v.onHandlers.length;b++){const _=v.onHandlers[b];removeEventListenerImpl(r,_.event,_.listener)}delete v.onHandlers}}function deInitNode(r){const v=getInternalData(r);v.timeout&&clearTimeout(v.timeout),v.listenerInfos&&forEach(v.listenerInfos,function(b){b.on&&removeEventListenerImpl(b.on,b.trigger,b.listener)}),deInitOnHandlers(r),forEach(Object.keys(v),function(b){b!=="firstInitCompleted"&&delete v[b]})}function cleanUpElement(r){triggerEvent(r,"htmx:beforeCleanupElement"),deInitNode(r),r.children&&forEach(r.children,function(v){cleanUpElement(v)})}function swapOuterHTML(r,v,b){if(r instanceof Element&&r.tagName==="BODY")return swapInnerHTML(r,v,b);let _;const g=r.previousSibling,O=parentElt(r);if(O){for(insertNodesBefore(O,r,v,b),g==null?_=O.firstChild:_=g.nextSibling,b.elts=b.elts.filter(function(R){return R!==r});_&&_!==r;)_ instanceof Element&&b.elts.push(_),_=_.nextSibling;cleanUpElement(r),r instanceof Element?r.remove():r.parentNode.removeChild(r)}}function swapAfterBegin(r,v,b){return insertNodesBefore(r,r.firstChild,v,b)}function swapBeforeBegin(r,v,b){return insertNodesBefore(parentElt(r),r,v,b)}function swapBeforeEnd(r,v,b){return insertNodesBefore(r,null,v,b)}function swapAfterEnd(r,v,b){return insertNodesBefore(parentElt(r),r.nextSibling,v,b)}function swapDelete(r){cleanUpElement(r);const v=parentElt(r);if(v)return v.removeChild(r)}function swapInnerHTML(r,v,b){const _=r.firstChild;if(insertNodesBefore(r,_,v,b),_){for(;_.nextSibling;)cleanUpElement(_.nextSibling),r.removeChild(_.nextSibling);cleanUpElement(_),r.removeChild(_)}}function swapWithStyle(r,v,b,_,g){switch(r){case"none":return;case"outerHTML":swapOuterHTML(b,_,g);return;case"afterbegin":swapAfterBegin(b,_,g);return;case"beforebegin":swapBeforeBegin(b,_,g);return;case"beforeend":swapBeforeEnd(b,_,g);return;case"afterend":swapAfterEnd(b,_,g);return;case"delete":swapDelete(b);return;default:var O=getExtensions(v);for(let R=0;R<O.length;R++){const J=O[R];try{const Z=J.handleSwap(r,b,_,g);if(Z){if(Array.isArray(Z))for(let C=0;C<Z.length;C++){const we=Z[C];we.nodeType!==Node.TEXT_NODE&&we.nodeType!==Node.COMMENT_NODE&&g.tasks.push(makeAjaxLoadTask(we))}return}}catch(Z){logError(Z)}}r==="innerHTML"?swapInnerHTML(b,_,g):swapWithStyle(htmx.config.defaultSwapStyle,v,b,_,g)}}function findAndSwapOobElements(r,v,b){var _=findAll(r,"[hx-swap-oob], [data-hx-swap-oob]");return forEach(_,function(g){if(htmx.config.allowNestedOobSwaps||g.parentElement===null){const O=getAttributeValue(g,"hx-swap-oob");O!=null&&oobSwap(O,g,v,b)}else g.removeAttribute("hx-swap-oob"),g.removeAttribute("data-hx-swap-oob")}),_.length>0}function swap(r,v,b,_){_||(_={}),r=resolveTarget(r);const g=_.contextElement?getRootNode(_.contextElement,!1):getDocument(),O=document.activeElement;let R={};try{R={elt:O,start:O?O.selectionStart:null,end:O?O.selectionEnd:null}}catch{}const J=makeSettleInfo(r);if(b.swapStyle==="textContent")r.textContent=v;else{let C=makeFragment(v);if(J.title=C.title,_.selectOOB){const we=_.selectOOB.split(",");for(let Be=0;Be<we.length;Be++){const Ue=we[Be].split(":",2);let Q=Ue[0].trim();Q.indexOf("#")===0&&(Q=Q.substring(1));const Ke=Ue[1]||"true",At=C.querySelector("#"+Q);At&&oobSwap(Ke,At,J,g)}}if(findAndSwapOobElements(C,J,g),forEach(findAll(C,"template"),function(we){we.content&&findAndSwapOobElements(we.content,J,g)&&we.remove()}),_.select){const we=getDocument().createDocumentFragment();forEach(C.querySelectorAll(_.select),function(Be){we.appendChild(Be)}),C=we}handlePreservedElements(C),swapWithStyle(b.swapStyle,_.contextElement,r,C,J),restorePreservedElements()}if(R.elt&&!bodyContains(R.elt)&&getRawAttribute(R.elt,"id")){const C=document.getElementById(getRawAttribute(R.elt,"id")),we={preventScroll:b.focusScroll!==void 0?!b.focusScroll:!htmx.config.defaultFocusScroll};if(C){if(R.start&&C.setSelectionRange)try{C.setSelectionRange(R.start,R.end)}catch{}C.focus(we)}}r.classList.remove(htmx.config.swappingClass),forEach(J.elts,function(C){C.classList&&C.classList.add(htmx.config.settlingClass),triggerEvent(C,"htmx:afterSwap",_.eventInfo)}),_.afterSwapCallback&&_.afterSwapCallback(),b.ignoreTitle||handleTitle(J.title);const Z=function(){if(forEach(J.tasks,function(C){C.call()}),forEach(J.elts,function(C){C.classList&&C.classList.remove(htmx.config.settlingClass),triggerEvent(C,"htmx:afterSettle",_.eventInfo)}),_.anchor){const C=asElement(resolveTarget("#"+_.anchor));C&&C.scrollIntoView({block:"start",behavior:"auto"})}updateScrollState(J.elts,b),_.afterSettleCallback&&_.afterSettleCallback()};b.settleDelay>0?getWindow().setTimeout(Z,b.settleDelay):Z()}function handleTriggerHeader(r,v,b){const _=r.getResponseHeader(v);if(_.indexOf("{")===0){const g=parseJSON(_);for(const O in g)if(g.hasOwnProperty(O)){let R=g[O];isRawObject(R)?b=R.target!==void 0?R.target:b:R={value:R},triggerEvent(b,O,R)}}else{const g=_.split(",");for(let O=0;O<g.length;O++)triggerEvent(b,g[O].trim(),[])}}const WHITESPACE=/\s/,WHITESPACE_OR_COMMA=/[\s,]/,SYMBOL_START=/[_$a-zA-Z]/,SYMBOL_CONT=/[_$a-zA-Z0-9]/,STRINGISH_START=['"',"'","/"],NOT_WHITESPACE=/[^\s]/,COMBINED_SELECTOR_START=/[{(]/,COMBINED_SELECTOR_END=/[})]/;function tokenizeString(r){const v=[];let b=0;for(;b<r.length;){if(SYMBOL_START.exec(r.charAt(b))){for(var _=b;SYMBOL_CONT.exec(r.charAt(b+1));)b++;v.push(r.substring(_,b+1))}else if(STRINGISH_START.indexOf(r.charAt(b))!==-1){const g=r.charAt(b);var _=b;for(b++;b<r.length&&r.charAt(b)!==g;)r.charAt(b)==="\\"&&b++,b++;v.push(r.substring(_,b+1))}else{const g=r.charAt(b);v.push(g)}b++}return v}function isPossibleRelativeReference(r,v,b){return SYMBOL_START.exec(r.charAt(0))&&r!=="true"&&r!=="false"&&r!=="this"&&r!==b&&v!=="."}function maybeGenerateConditional(r,v,b){if(v[0]==="["){v.shift();let _=1,g=" return (function("+b+"){ return (",O=null;for(;v.length>0;){const R=v[0];if(R==="]"){if(_--,_===0){O===null&&(g=g+"true"),v.shift(),g+=")})";try{const J=maybeEval(r,function(){return Function(g)()},function(){return!0});return J.source=g,J}catch(J){return triggerErrorEvent(getDocument().body,"htmx:syntax:error",{error:J,source:g}),null}}}else R==="["&&_++;isPossibleRelativeReference(R,O,b)?g+="(("+b+"."+R+") ? ("+b+"."+R+") : (window."+R+"))":g=g+R,O=v.shift()}}}function consumeUntil(r,v){let b="";for(;r.length>0&&!v.test(r[0]);)b+=r.shift();return b}function consumeCSSSelector(r){let v;return r.length>0&&COMBINED_SELECTOR_START.test(r[0])?(r.shift(),v=consumeUntil(r,COMBINED_SELECTOR_END).trim(),r.shift()):v=consumeUntil(r,WHITESPACE_OR_COMMA),v}const INPUT_SELECTOR="input, textarea, select";function parseAndCacheTrigger(r,v,b){const _=[],g=tokenizeString(v);do{consumeUntil(g,NOT_WHITESPACE);const J=g.length,Z=consumeUntil(g,/[,\[\s]/);if(Z!=="")if(Z==="every"){const C={trigger:"every"};consumeUntil(g,NOT_WHITESPACE),C.pollInterval=parseInterval(consumeUntil(g,/[,\[\s]/)),consumeUntil(g,NOT_WHITESPACE);var O=maybeGenerateConditional(r,g,"event");O&&(C.eventFilter=O),_.push(C)}else{const C={trigger:Z};var O=maybeGenerateConditional(r,g,"event");for(O&&(C.eventFilter=O),consumeUntil(g,NOT_WHITESPACE);g.length>0&&g[0]!==",";){const Be=g.shift();if(Be==="changed")C.changed=!0;else if(Be==="once")C.once=!0;else if(Be==="consume")C.consume=!0;else if(Be==="delay"&&g[0]===":")g.shift(),C.delay=parseInterval(consumeUntil(g,WHITESPACE_OR_COMMA));else if(Be==="from"&&g[0]===":"){if(g.shift(),COMBINED_SELECTOR_START.test(g[0]))var R=consumeCSSSelector(g);else{var R=consumeUntil(g,WHITESPACE_OR_COMMA);if(R==="closest"||R==="find"||R==="next"||R==="previous"){g.shift();const Q=consumeCSSSelector(g);Q.length>0&&(R+=" "+Q)}}C.from=R}else Be==="target"&&g[0]===":"?(g.shift(),C.target=consumeCSSSelector(g)):Be==="throttle"&&g[0]===":"?(g.shift(),C.throttle=parseInterval(consumeUntil(g,WHITESPACE_OR_COMMA))):Be==="queue"&&g[0]===":"?(g.shift(),C.queue=consumeUntil(g,WHITESPACE_OR_COMMA)):Be==="root"&&g[0]===":"?(g.shift(),C[Be]=consumeCSSSelector(g)):Be==="threshold"&&g[0]===":"?(g.shift(),C[Be]=consumeUntil(g,WHITESPACE_OR_COMMA)):triggerErrorEvent(r,"htmx:syntax:error",{token:g.shift()});consumeUntil(g,NOT_WHITESPACE)}_.push(C)}g.length===J&&triggerErrorEvent(r,"htmx:syntax:error",{token:g.shift()}),consumeUntil(g,NOT_WHITESPACE)}while(g[0]===","&&g.shift());return b&&(b[v]=_),_}function getTriggerSpecs(r){const v=getAttributeValue(r,"hx-trigger");let b=[];if(v){const _=htmx.config.triggerSpecsCache;b=_&&_[v]||parseAndCacheTrigger(r,v,_)}return b.length>0?b:matches(r,"form")?[{trigger:"submit"}]:matches(r,'input[type="button"], input[type="submit"]')?[{trigger:"click"}]:matches(r,INPUT_SELECTOR)?[{trigger:"change"}]:[{trigger:"click"}]}function cancelPolling(r){getInternalData(r).cancelled=!0}function processPolling(r,v,b){const _=getInternalData(r);_.timeout=getWindow().setTimeout(function(){bodyContains(r)&&_.cancelled!==!0&&(maybeFilterEvent(b,r,makeEvent("hx:poll:trigger",{triggerSpec:b,target:r}))||v(r),processPolling(r,v,b))},b.pollInterval)}function isLocalLink(r){return location.hostname===r.hostname&&getRawAttribute(r,"href")&&getRawAttribute(r,"href").indexOf("#")!==0}function eltIsDisabled(r){return closest(r,htmx.config.disableSelector)}function boostElement(r,v,b){if(r instanceof HTMLAnchorElement&&isLocalLink(r)&&(r.target===""||r.target==="_self")||r.tagName==="FORM"&&String(getRawAttribute(r,"method")).toLowerCase()!=="dialog"){v.boosted=!0;let _,g;if(r.tagName==="A")_="get",g=getRawAttribute(r,"href");else{const O=getRawAttribute(r,"method");_=O?O.toLowerCase():"get",g=getRawAttribute(r,"action"),(g==null||g==="")&&(g=getDocument().location.href),_==="get"&&g.includes("?")&&(g=g.replace(/\?[^#]+/,""))}b.forEach(function(O){addEventListener(r,function(R,J){const Z=asElement(R);if(eltIsDisabled(Z)){cleanUpElement(Z);return}issueAjaxRequest(_,g,Z,J)},v,O,!0)})}}function shouldCancel(r,v){const b=asElement(v);return b?!!((r.type==="submit"||r.type==="click")&&(b.tagName==="FORM"||matches(b,'input[type="submit"], button')&&(matches(b,"[form]")||closest(b,"form")!==null)||b instanceof HTMLAnchorElement&&b.href&&(b.getAttribute("href")==="#"||b.getAttribute("href").indexOf("#")!==0))):!1}function ignoreBoostedAnchorCtrlClick(r,v){return getInternalData(r).boosted&&r instanceof HTMLAnchorElement&&v.type==="click"&&(v.ctrlKey||v.metaKey)}function maybeFilterEvent(r,v,b){const _=r.eventFilter;if(_)try{return _.call(v,b)!==!0}catch(g){const O=_.source;return triggerErrorEvent(getDocument().body,"htmx:eventFilter:error",{error:g,source:O}),!0}return!1}function addEventListener(r,v,b,_,g){const O=getInternalData(r);let R;_.from?R=querySelectorAllExt(r,_.from):R=[r],_.changed&&("lastValue"in O||(O.lastValue=new WeakMap),R.forEach(function(J){O.lastValue.has(_)||O.lastValue.set(_,new WeakMap),O.lastValue.get(_).set(J,J.value)})),forEach(R,function(J){const Z=function(C){if(!bodyContains(r)){J.removeEventListener(_.trigger,Z);return}if(ignoreBoostedAnchorCtrlClick(r,C)||((g||shouldCancel(C,r))&&C.preventDefault(),maybeFilterEvent(_,r,C)))return;const we=getInternalData(C);if(we.triggerSpec=_,we.handledFor==null&&(we.handledFor=[]),we.handledFor.indexOf(r)<0){if(we.handledFor.push(r),_.consume&&C.stopPropagation(),_.target&&C.target&&!matches(asElement(C.target),_.target))return;if(_.once){if(O.triggeredOnce)return;O.triggeredOnce=!0}if(_.changed){const Be=event.target,Ue=Be.value,Q=O.lastValue.get(_);if(Q.has(Be)&&Q.get(Be)===Ue)return;Q.set(Be,Ue)}if(O.delayed&&clearTimeout(O.delayed),O.throttle)return;_.throttle>0?O.throttle||(triggerEvent(r,"htmx:trigger"),v(r,C),O.throttle=getWindow().setTimeout(function(){O.throttle=null},_.throttle)):_.delay>0?O.delayed=getWindow().setTimeout(function(){triggerEvent(r,"htmx:trigger"),v(r,C)},_.delay):(triggerEvent(r,"htmx:trigger"),v(r,C))}};b.listenerInfos==null&&(b.listenerInfos=[]),b.listenerInfos.push({trigger:_.trigger,listener:Z,on:J}),J.addEventListener(_.trigger,Z)})}let windowIsScrolling=!1,scrollHandler=null;function initScrollHandler(){scrollHandler||(scrollHandler=function(){windowIsScrolling=!0},window.addEventListener("scroll",scrollHandler),window.addEventListener("resize",scrollHandler),setInterval(function(){windowIsScrolling&&(windowIsScrolling=!1,forEach(getDocument().querySelectorAll("[hx-trigger*='revealed'],[data-hx-trigger*='revealed']"),function(r){maybeReveal(r)}))},200))}function maybeReveal(r){!hasAttribute(r,"data-hx-revealed")&&isScrolledIntoView(r)&&(r.setAttribute("data-hx-revealed","true"),getInternalData(r).initHash?triggerEvent(r,"revealed"):r.addEventListener("htmx:afterProcessNode",function(){triggerEvent(r,"revealed")},{once:!0}))}function loadImmediately(r,v,b,_){const g=function(){b.loaded||(b.loaded=!0,triggerEvent(r,"htmx:trigger"),v(r))};_>0?getWindow().setTimeout(g,_):g()}function processVerbs(r,v,b){let _=!1;return forEach(VERBS,function(g){if(hasAttribute(r,"hx-"+g)){const O=getAttributeValue(r,"hx-"+g);_=!0,v.path=O,v.verb=g,b.forEach(function(R){addTriggerHandler(r,R,v,function(J,Z){const C=asElement(J);if(closest(C,htmx.config.disableSelector)){cleanUpElement(C);return}issueAjaxRequest(g,O,C,Z)})})}}),_}function addTriggerHandler(r,v,b,_){if(v.trigger==="revealed")initScrollHandler(),addEventListener(r,_,b,v),maybeReveal(asElement(r));else if(v.trigger==="intersect"){const g={};v.root&&(g.root=querySelectorExt(r,v.root)),v.threshold&&(g.threshold=parseFloat(v.threshold)),new IntersectionObserver(function(R){for(let J=0;J<R.length;J++)if(R[J].isIntersecting){triggerEvent(r,"intersect");break}},g).observe(asElement(r)),addEventListener(asElement(r),_,b,v)}else!b.firstInitCompleted&&v.trigger==="load"?maybeFilterEvent(v,r,makeEvent("load",{elt:r}))||loadImmediately(asElement(r),_,b,v.delay):v.pollInterval>0?(b.polling=!0,processPolling(asElement(r),_,v)):addEventListener(r,_,b,v)}function shouldProcessHxOn(r){const v=asElement(r);if(!v)return!1;const b=v.attributes;for(let _=0;_<b.length;_++){const g=b[_].name;if(startsWith(g,"hx-on:")||startsWith(g,"data-hx-on:")||startsWith(g,"hx-on-")||startsWith(g,"data-hx-on-"))return!0}return!1}const HX_ON_QUERY=new XPathEvaluator().createExpression('.//*[@*[ starts-with(name(), "hx-on:") or starts-with(name(), "data-hx-on:") or starts-with(name(), "hx-on-") or starts-with(name(), "data-hx-on-") ]]');function processHXOnRoot(r,v){shouldProcessHxOn(r)&&v.push(asElement(r));const b=HX_ON_QUERY.evaluate(r);let _=null;for(;_=b.iterateNext();)v.push(asElement(_))}function findHxOnWildcardElements(r){const v=[];if(r instanceof DocumentFragment)for(const b of r.childNodes)processHXOnRoot(b,v);else processHXOnRoot(r,v);return v}function findElementsToProcess(r){if(r.querySelectorAll){const b=", [hx-boost] a, [data-hx-boost] a, a[hx-boost], a[data-hx-boost]",_=[];for(const O in extensions){const R=extensions[O];if(R.getSelectors){var v=R.getSelectors();v&&_.push(v)}}return r.querySelectorAll(VERB_SELECTOR+b+", form, [type='submit'], [hx-ext], [data-hx-ext], [hx-trigger], [data-hx-trigger]"+_.flat().map(O=>", "+O).join(""))}else return[]}function maybeSetLastButtonClicked(r){const v=closest(asElement(r.target),"button, input[type='submit']"),b=getRelatedFormData(r);b&&(b.lastButtonClicked=v)}function maybeUnsetLastButtonClicked(r){const v=getRelatedFormData(r);v&&(v.lastButtonClicked=null)}function getRelatedFormData(r){const v=closest(asElement(r.target),"button, input[type='submit']");if(!v)return;const b=resolveTarget("#"+getRawAttribute(v,"form"),v.getRootNode())||closest(v,"form");if(b)return getInternalData(b)}function initButtonTracking(r){r.addEventListener("click",maybeSetLastButtonClicked),r.addEventListener("focusin",maybeSetLastButtonClicked),r.addEventListener("focusout",maybeUnsetLastButtonClicked)}function addHxOnEventHandler(r,v,b){const _=getInternalData(r);Array.isArray(_.onHandlers)||(_.onHandlers=[]);let g;const O=function(R){maybeEval(r,function(){eltIsDisabled(r)||(g||(g=new Function("event",b)),g.call(r,R))})};r.addEventListener(v,O),_.onHandlers.push({event:v,listener:O})}function processHxOnWildcard(r){deInitOnHandlers(r);for(let v=0;v<r.attributes.length;v++){const b=r.attributes[v].name,_=r.attributes[v].value;if(startsWith(b,"hx-on")||startsWith(b,"data-hx-on")){const g=b.indexOf("-on")+3,O=b.slice(g,g+1);if(O==="-"||O===":"){let R=b.slice(g+1);startsWith(R,":")?R="htmx"+R:startsWith(R,"-")?R="htmx:"+R.slice(1):startsWith(R,"htmx-")&&(R="htmx:"+R.slice(5)),addHxOnEventHandler(r,R,_)}}}}function initNode(r){if(closest(r,htmx.config.disableSelector)){cleanUpElement(r);return}const v=getInternalData(r),b=attributeHash(r);if(v.initHash!==b){deInitNode(r),v.initHash=b,triggerEvent(r,"htmx:beforeProcessNode");const _=getTriggerSpecs(r);processVerbs(r,v,_)||(getClosestAttributeValue(r,"hx-boost")==="true"?boostElement(r,v,_):hasAttribute(r,"hx-trigger")&&_.forEach(function(O){addTriggerHandler(r,O,v,function(){})})),(r.tagName==="FORM"||getRawAttribute(r,"type")==="submit"&&hasAttribute(r,"form"))&&initButtonTracking(r),v.firstInitCompleted=!0,triggerEvent(r,"htmx:afterProcessNode")}}function processNode(r){if(r=resolveTarget(r),closest(r,htmx.config.disableSelector)){cleanUpElement(r);return}initNode(r),forEach(findElementsToProcess(r),function(v){initNode(v)}),forEach(findHxOnWildcardElements(r),processHxOnWildcard)}function kebabEventName(r){return r.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}function makeEvent(r,v){let b;return window.CustomEvent&&typeof window.CustomEvent=="function"?b=new CustomEvent(r,{bubbles:!0,cancelable:!0,composed:!0,detail:v}):(b=getDocument().createEvent("CustomEvent"),b.initCustomEvent(r,!0,!0,v)),b}function triggerErrorEvent(r,v,b){triggerEvent(r,v,mergeObjects({error:v},b))}function ignoreEventForLogging(r){return r==="htmx:afterProcessNode"}function withExtensions(r,v){forEach(getExtensions(r),function(b){try{v(b)}catch(_){logError(_)}})}function logError(r){console.error?console.error(r):console.log&&console.log("ERROR: ",r)}function triggerEvent(r,v,b){r=resolveTarget(r),b==null&&(b={}),b.elt=r;const _=makeEvent(v,b);htmx.logger&&!ignoreEventForLogging(v)&&htmx.logger(r,v,b),b.error&&(logError(b.error),triggerEvent(r,"htmx:error",{errorInfo:b}));let g=r.dispatchEvent(_);const O=kebabEventName(v);if(g&&O!==v){const R=makeEvent(O,_.detail);g=g&&r.dispatchEvent(R)}return withExtensions(asElement(r),function(R){g=g&&R.onEvent(v,_)!==!1&&!_.defaultPrevented}),g}let currentPathForHistory=location.pathname+location.search;function getHistoryElement(){return getDocument().querySelector("[hx-history-elt],[data-hx-history-elt]")||getDocument().body}function saveToHistoryCache(r,v){if(!canAccessLocalStorage())return;const b=cleanInnerHtmlForHistory(v),_=getDocument().title,g=window.scrollY;if(htmx.config.historyCacheSize<=0){localStorage.removeItem("htmx-history-cache");return}r=normalizePath(r);const O=parseJSON(localStorage.getItem("htmx-history-cache"))||[];for(let J=0;J<O.length;J++)if(O[J].url===r){O.splice(J,1);break}const R={url:r,content:b,title:_,scroll:g};for(triggerEvent(getDocument().body,"htmx:historyItemCreated",{item:R,cache:O}),O.push(R);O.length>htmx.config.historyCacheSize;)O.shift();for(;O.length>0;)try{localStorage.setItem("htmx-history-cache",JSON.stringify(O));break}catch(J){triggerErrorEvent(getDocument().body,"htmx:historyCacheError",{cause:J,cache:O}),O.shift()}}function getCachedHistory(r){if(!canAccessLocalStorage())return null;r=normalizePath(r);const v=parseJSON(localStorage.getItem("htmx-history-cache"))||[];for(let b=0;b<v.length;b++)if(v[b].url===r)return v[b];return null}function cleanInnerHtmlForHistory(r){const v=htmx.config.requestClass,b=r.cloneNode(!0);return forEach(findAll(b,"."+v),function(_){removeClassFromElement(_,v)}),forEach(findAll(b,"[data-disabled-by-htmx]"),function(_){_.removeAttribute("disabled")}),b.innerHTML}function saveCurrentPageToHistory(){const r=getHistoryElement(),v=currentPathForHistory||location.pathname+location.search;let b;try{b=getDocument().querySelector('[hx-history="false" i],[data-hx-history="false" i]')}catch{b=getDocument().querySelector('[hx-history="false"],[data-hx-history="false"]')}b||(triggerEvent(getDocument().body,"htmx:beforeHistorySave",{path:v,historyElt:r}),saveToHistoryCache(v,r)),htmx.config.historyEnabled&&history.replaceState({htmx:!0},getDocument().title,window.location.href)}function pushUrlIntoHistory(r){htmx.config.getCacheBusterParam&&(r=r.replace(/org\.htmx\.cache-buster=[^&]*&?/,""),(endsWith(r,"&")||endsWith(r,"?"))&&(r=r.slice(0,-1))),htmx.config.historyEnabled&&history.pushState({htmx:!0},"",r),currentPathForHistory=r}function replaceUrlInHistory(r){htmx.config.historyEnabled&&history.replaceState({htmx:!0},"",r),currentPathForHistory=r}function settleImmediately(r){forEach(r,function(v){v.call(void 0)})}function loadHistoryFromServer(r){const v=new XMLHttpRequest,b={path:r,xhr:v};triggerEvent(getDocument().body,"htmx:historyCacheMiss",b),v.open("GET",r,!0),v.setRequestHeader("HX-Request","true"),v.setRequestHeader("HX-History-Restore-Request","true"),v.setRequestHeader("HX-Current-URL",getDocument().location.href),v.onload=function(){if(this.status>=200&&this.status<400){triggerEvent(getDocument().body,"htmx:historyCacheMissLoad",b);const _=makeFragment(this.response),g=_.querySelector("[hx-history-elt],[data-hx-history-elt]")||_,O=getHistoryElement(),R=makeSettleInfo(O);handleTitle(_.title),handlePreservedElements(_),swapInnerHTML(O,g,R),restorePreservedElements(),settleImmediately(R.tasks),currentPathForHistory=r,triggerEvent(getDocument().body,"htmx:historyRestore",{path:r,cacheMiss:!0,serverResponse:this.response})}else triggerErrorEvent(getDocument().body,"htmx:historyCacheMissLoadError",b)},v.send()}function restoreHistory(r){saveCurrentPageToHistory(),r=r||location.pathname+location.search;const v=getCachedHistory(r);if(v){const b=makeFragment(v.content),_=getHistoryElement(),g=makeSettleInfo(_);handleTitle(v.title),handlePreservedElements(b),swapInnerHTML(_,b,g),restorePreservedElements(),settleImmediately(g.tasks),getWindow().setTimeout(function(){window.scrollTo(0,v.scroll)},0),currentPathForHistory=r,triggerEvent(getDocument().body,"htmx:historyRestore",{path:r,item:v})}else htmx.config.refreshOnHistoryMiss?window.location.reload(!0):loadHistoryFromServer(r)}function addRequestIndicatorClasses(r){let v=findAttributeTargets(r,"hx-indicator");return v==null&&(v=[r]),forEach(v,function(b){const _=getInternalData(b);_.requestCount=(_.requestCount||0)+1,b.classList.add.call(b.classList,htmx.config.requestClass)}),v}function disableElements(r){let v=findAttributeTargets(r,"hx-disabled-elt");return v==null&&(v=[]),forEach(v,function(b){const _=getInternalData(b);_.requestCount=(_.requestCount||0)+1,b.setAttribute("disabled",""),b.setAttribute("data-disabled-by-htmx","")}),v}function removeRequestIndicators(r,v){forEach(r.concat(v),function(b){const _=getInternalData(b);_.requestCount=(_.requestCount||1)-1}),forEach(r,function(b){getInternalData(b).requestCount===0&&b.classList.remove.call(b.classList,htmx.config.requestClass)}),forEach(v,function(b){getInternalData(b).requestCount===0&&(b.removeAttribute("disabled"),b.removeAttribute("data-disabled-by-htmx"))})}function haveSeenNode(r,v){for(let b=0;b<r.length;b++)if(r[b].isSameNode(v))return!0;return!1}function shouldInclude(r){const v=r;return v.name===""||v.name==null||v.disabled||closest(v,"fieldset[disabled]")||v.type==="button"||v.type==="submit"||v.tagName==="image"||v.tagName==="reset"||v.tagName==="file"?!1:v.type==="checkbox"||v.type==="radio"?v.checked:!0}function addValueToFormData(r,v,b){r!=null&&v!=null&&(Array.isArray(v)?v.forEach(function(_){b.append(r,_)}):b.append(r,v))}function removeValueFromFormData(r,v,b){if(r!=null&&v!=null){let _=b.getAll(r);Array.isArray(v)?_=_.filter(g=>v.indexOf(g)<0):_=_.filter(g=>g!==v),b.delete(r),forEach(_,g=>b.append(r,g))}}function processInputValue(r,v,b,_,g){if(!(_==null||haveSeenNode(r,_))){if(r.push(_),shouldInclude(_)){const O=getRawAttribute(_,"name");let R=_.value;_ instanceof HTMLSelectElement&&_.multiple&&(R=toArray(_.querySelectorAll("option:checked")).map(function(J){return J.value})),_ instanceof HTMLInputElement&&_.files&&(R=toArray(_.files)),addValueToFormData(O,R,v),g&&validateElement(_,b)}_ instanceof HTMLFormElement&&(forEach(_.elements,function(O){r.indexOf(O)>=0?removeValueFromFormData(O.name,O.value,v):r.push(O),g&&validateElement(O,b)}),new FormData(_).forEach(function(O,R){O instanceof File&&O.name===""||addValueToFormData(R,O,v)}))}}function validateElement(r,v){const b=r;b.willValidate&&(triggerEvent(b,"htmx:validation:validate"),b.checkValidity()||(v.push({elt:b,message:b.validationMessage,validity:b.validity}),triggerEvent(b,"htmx:validation:failed",{message:b.validationMessage,validity:b.validity})))}function overrideFormData(r,v){for(const b of v.keys())r.delete(b);return v.forEach(function(b,_){r.append(_,b)}),r}function getInputValues(r,v){const b=[],_=new FormData,g=new FormData,O=[],R=getInternalData(r);R.lastButtonClicked&&!bodyContains(R.lastButtonClicked)&&(R.lastButtonClicked=null);let J=r instanceof HTMLFormElement&&r.noValidate!==!0||getAttributeValue(r,"hx-validate")==="true";if(R.lastButtonClicked&&(J=J&&R.lastButtonClicked.formNoValidate!==!0),v!=="get"&&processInputValue(b,g,O,closest(r,"form"),J),processInputValue(b,_,O,r,J),R.lastButtonClicked||r.tagName==="BUTTON"||r.tagName==="INPUT"&&getRawAttribute(r,"type")==="submit"){const C=R.lastButtonClicked||r,we=getRawAttribute(C,"name");addValueToFormData(we,C.value,g)}const Z=findAttributeTargets(r,"hx-include");return forEach(Z,function(C){processInputValue(b,_,O,asElement(C),J),matches(C,"form")||forEach(asParentNode(C).querySelectorAll(INPUT_SELECTOR),function(we){processInputValue(b,_,O,we,J)})}),overrideFormData(_,g),{errors:O,formData:_,values:formDataProxy(_)}}function appendParam(r,v,b){r!==""&&(r+="&"),String(b)==="[object Object]"&&(b=JSON.stringify(b));const _=encodeURIComponent(b);return r+=encodeURIComponent(v)+"="+_,r}function urlEncode(r){r=formDataFromObject(r);let v="";return r.forEach(function(b,_){v=appendParam(v,_,b)}),v}function getHeaders(r,v,b){const _={"HX-Request":"true","HX-Trigger":getRawAttribute(r,"id"),"HX-Trigger-Name":getRawAttribute(r,"name"),"HX-Target":getAttributeValue(v,"id"),"HX-Current-URL":getDocument().location.href};return getValuesForElement(r,"hx-headers",!1,_),b!==void 0&&(_["HX-Prompt"]=b),getInternalData(r).boosted&&(_["HX-Boosted"]="true"),_}function filterValues(r,v){const b=getClosestAttributeValue(v,"hx-params");if(b){if(b==="none")return new FormData;if(b==="*")return r;if(b.indexOf("not ")===0)return forEach(b.slice(4).split(","),function(_){_=_.trim(),r.delete(_)}),r;{const _=new FormData;return forEach(b.split(","),function(g){g=g.trim(),r.has(g)&&r.getAll(g).forEach(function(O){_.append(g,O)})}),_}}else return r}function isAnchorLink(r){return!!getRawAttribute(r,"href")&&getRawAttribute(r,"href").indexOf("#")>=0}function getSwapSpecification(r,v){const b=v||getClosestAttributeValue(r,"hx-swap"),_={swapStyle:getInternalData(r).boosted?"innerHTML":htmx.config.defaultSwapStyle,swapDelay:htmx.config.defaultSwapDelay,settleDelay:htmx.config.defaultSettleDelay};if(htmx.config.scrollIntoViewOnBoost&&getInternalData(r).boosted&&!isAnchorLink(r)&&(_.show="top"),b){const R=splitOnWhitespace(b);if(R.length>0)for(let J=0;J<R.length;J++){const Z=R[J];if(Z.indexOf("swap:")===0)_.swapDelay=parseInterval(Z.slice(5));else if(Z.indexOf("settle:")===0)_.settleDelay=parseInterval(Z.slice(7));else if(Z.indexOf("transition:")===0)_.transition=Z.slice(11)==="true";else if(Z.indexOf("ignoreTitle:")===0)_.ignoreTitle=Z.slice(12)==="true";else if(Z.indexOf("scroll:")===0){var g=Z.slice(7).split(":");const we=g.pop();var O=g.length>0?g.join(":"):null;_.scroll=we,_.scrollTarget=O}else if(Z.indexOf("show:")===0){var g=Z.slice(5).split(":");const Be=g.pop();var O=g.length>0?g.join(":"):null;_.show=Be,_.showTarget=O}else if(Z.indexOf("focus-scroll:")===0){const C=Z.slice(13);_.focusScroll=C=="true"}else J==0?_.swapStyle=Z:logError("Unknown modifier in hx-swap: "+Z)}}return _}function usesFormData(r){return getClosestAttributeValue(r,"hx-encoding")==="multipart/form-data"||matches(r,"form")&&getRawAttribute(r,"enctype")==="multipart/form-data"}function encodeParamsForBody(r,v,b){let _=null;return withExtensions(v,function(g){_==null&&(_=g.encodeParameters(r,b,v))}),_??(usesFormData(v)?overrideFormData(new FormData,formDataFromObject(b)):urlEncode(b))}function makeSettleInfo(r){return{tasks:[],elts:[r]}}function updateScrollState(r,v){const b=r[0],_=r[r.length-1];if(v.scroll){var g=null;v.scrollTarget&&(g=asElement(querySelectorExt(b,v.scrollTarget))),v.scroll==="top"&&(b||g)&&(g=g||b,g.scrollTop=0),v.scroll==="bottom"&&(_||g)&&(g=g||_,g.scrollTop=g.scrollHeight)}if(v.show){var g=null;if(v.showTarget){let R=v.showTarget;v.showTarget==="window"&&(R="body"),g=asElement(querySelectorExt(b,R))}v.show==="top"&&(b||g)&&(g=g||b,g.scrollIntoView({block:"start",behavior:htmx.config.scrollBehavior})),v.show==="bottom"&&(_||g)&&(g=g||_,g.scrollIntoView({block:"end",behavior:htmx.config.scrollBehavior}))}}function getValuesForElement(r,v,b,_){if(_==null&&(_={}),r==null)return _;const g=getAttributeValue(r,v);if(g){let O=g.trim(),R=b;if(O==="unset")return null;O.indexOf("javascript:")===0?(O=O.slice(11),R=!0):O.indexOf("js:")===0&&(O=O.slice(3),R=!0),O.indexOf("{")!==0&&(O="{"+O+"}");let J;R?J=maybeEval(r,function(){return Function("return ("+O+")")()},{}):J=parseJSON(O);for(const Z in J)J.hasOwnProperty(Z)&&_[Z]==null&&(_[Z]=J[Z])}return getValuesForElement(asElement(parentElt(r)),v,b,_)}function maybeEval(r,v,b){return htmx.config.allowEval?v():(triggerErrorEvent(r,"htmx:evalDisallowedError"),b)}function getHXVarsForElement(r,v){return getValuesForElement(r,"hx-vars",!0,v)}function getHXValsForElement(r,v){return getValuesForElement(r,"hx-vals",!1,v)}function getExpressionVars(r){return mergeObjects(getHXVarsForElement(r),getHXValsForElement(r))}function safelySetHeaderValue(r,v,b){if(b!==null)try{r.setRequestHeader(v,b)}catch{r.setRequestHeader(v,encodeURIComponent(b)),r.setRequestHeader(v+"-URI-AutoEncoded","true")}}function getPathFromResponse(r){if(r.responseURL&&typeof URL<"u")try{const v=new URL(r.responseURL);return v.pathname+v.search}catch{triggerErrorEvent(getDocument().body,"htmx:badResponseUrl",{url:r.responseURL})}}function hasHeader(r,v){return v.test(r.getAllResponseHeaders())}function ajaxHelper(r,v,b){if(r=r.toLowerCase(),b){if(b instanceof Element||typeof b=="string")return issueAjaxRequest(r,v,null,null,{targetOverride:resolveTarget(b)||DUMMY_ELT,returnPromise:!0});{let _=resolveTarget(b.target);return(b.target&&!_||b.source&&!_&&!resolveTarget(b.source))&&(_=DUMMY_ELT),issueAjaxRequest(r,v,resolveTarget(b.source),b.event,{handler:b.handler,headers:b.headers,values:b.values,targetOverride:_,swapOverride:b.swap,select:b.select,returnPromise:!0})}}else return issueAjaxRequest(r,v,null,null,{returnPromise:!0})}function hierarchyForElt(r){const v=[];for(;r;)v.push(r),r=r.parentElement;return v}function verifyPath(r,v,b){let _,g;return typeof URL=="function"?(g=new URL(v,document.location.href),_=document.location.origin===g.origin):(g=v,_=startsWith(v,document.location.origin)),htmx.config.selfRequestsOnly&&!_?!1:triggerEvent(r,"htmx:validateUrl",mergeObjects({url:g,sameHost:_},b))}function formDataFromObject(r){if(r instanceof FormData)return r;const v=new FormData;for(const b in r)r.hasOwnProperty(b)&&(r[b]&&typeof r[b].forEach=="function"?r[b].forEach(function(_){v.append(b,_)}):typeof r[b]=="object"&&!(r[b]instanceof Blob)?v.append(b,JSON.stringify(r[b])):v.append(b,r[b]));return v}function formDataArrayProxy(r,v,b){return new Proxy(b,{get:function(_,g){return typeof g=="number"?_[g]:g==="length"?_.length:g==="push"?function(O){_.push(O),r.append(v,O)}:typeof _[g]=="function"?function(){_[g].apply(_,arguments),r.delete(v),_.forEach(function(O){r.append(v,O)})}:_[g]&&_[g].length===1?_[g][0]:_[g]},set:function(_,g,O){return _[g]=O,r.delete(v),_.forEach(function(R){r.append(v,R)}),!0}})}function formDataProxy(r){return new Proxy(r,{get:function(v,b){if(typeof b=="symbol"){const g=Reflect.get(v,b);return typeof g=="function"?function(){return g.apply(r,arguments)}:g}if(b==="toJSON")return()=>Object.fromEntries(r);if(b in v)return typeof v[b]=="function"?function(){return r[b].apply(r,arguments)}:v[b];const _=r.getAll(b);if(_.length!==0)return _.length===1?_[0]:formDataArrayProxy(v,b,_)},set:function(v,b,_){return typeof b!="string"?!1:(v.delete(b),_&&typeof _.forEach=="function"?_.forEach(function(g){v.append(b,g)}):typeof _=="object"&&!(_ instanceof Blob)?v.append(b,JSON.stringify(_)):v.append(b,_),!0)},deleteProperty:function(v,b){return typeof b=="string"&&v.delete(b),!0},ownKeys:function(v){return Reflect.ownKeys(Object.fromEntries(v))},getOwnPropertyDescriptor:function(v,b){return Reflect.getOwnPropertyDescriptor(Object.fromEntries(v),b)}})}function issueAjaxRequest(r,v,b,_,g,O){let R=null,J=null;if(g=g??{},g.returnPromise&&typeof Promise<"u")var Z=new Promise(function(K,Ee){R=K,J=Ee});b==null&&(b=getDocument().body);const C=g.handler||handleAjaxResponse,we=g.select||null;if(!bodyContains(b))return maybeCall(R),Z;const Be=g.targetOverride||asElement(getTarget(b));if(Be==null||Be==DUMMY_ELT)return triggerErrorEvent(b,"htmx:targetError",{target:getAttributeValue(b,"hx-target")}),maybeCall(J),Z;let Ue=getInternalData(b);const Q=Ue.lastButtonClicked;if(Q){const K=getRawAttribute(Q,"formaction");K!=null&&(v=K);const Ee=getRawAttribute(Q,"formmethod");Ee!=null&&Ee.toLowerCase()!=="dialog"&&(r=Ee)}const Ke=getClosestAttributeValue(b,"hx-confirm");if(O===void 0&&triggerEvent(b,"htmx:confirm",{target:Be,elt:b,path:v,verb:r,triggeringEvent:_,etc:g,issueRequest:function(nt){return issueAjaxRequest(r,v,b,_,g,!!nt)},question:Ke})===!1)return maybeCall(R),Z;let At=b,gt=getClosestAttributeValue(b,"hx-sync"),q=null,ne=!1;if(gt){const K=gt.split(":"),Ee=K[0].trim();if(Ee==="this"?At=findThisElement(b,"hx-sync"):At=asElement(querySelectorExt(b,Ee)),gt=(K[1]||"drop").trim(),Ue=getInternalData(At),gt==="drop"&&Ue.xhr&&Ue.abortable!==!0)return maybeCall(R),Z;if(gt==="abort"){if(Ue.xhr)return maybeCall(R),Z;ne=!0}else gt==="replace"?triggerEvent(At,"htmx:abort"):gt.indexOf("queue")===0&&(q=(gt.split(" ")[1]||"last").trim())}if(Ue.xhr)if(Ue.abortable)triggerEvent(At,"htmx:abort");else{if(q==null){if(_){const K=getInternalData(_);K&&K.triggerSpec&&K.triggerSpec.queue&&(q=K.triggerSpec.queue)}q==null&&(q="last")}return Ue.queuedRequests==null&&(Ue.queuedRequests=[]),q==="first"&&Ue.queuedRequests.length===0?Ue.queuedRequests.push(function(){issueAjaxRequest(r,v,b,_,g)}):q==="all"?Ue.queuedRequests.push(function(){issueAjaxRequest(r,v,b,_,g)}):q==="last"&&(Ue.queuedRequests=[],Ue.queuedRequests.push(function(){issueAjaxRequest(r,v,b,_,g)})),maybeCall(R),Z}const c=new XMLHttpRequest;Ue.xhr=c,Ue.abortable=ne;const W=function(){Ue.xhr=null,Ue.abortable=!1,Ue.queuedRequests!=null&&Ue.queuedRequests.length>0&&Ue.queuedRequests.shift()()},Re=getClosestAttributeValue(b,"hx-prompt");if(Re){var tt=prompt(Re);if(tt===null||!triggerEvent(b,"htmx:prompt",{prompt:tt,target:Be}))return maybeCall(R),W(),Z}if(Ke&&!O&&!confirm(Ke))return maybeCall(R),W(),Z;let st=getHeaders(b,Be,tt);r!=="get"&&!usesFormData(b)&&(st["Content-Type"]="application/x-www-form-urlencoded"),g.headers&&(st=mergeObjects(st,g.headers));const et=getInputValues(b,r);let je=et.errors;const S=et.formData;g.values&&overrideFormData(S,formDataFromObject(g.values));const si=formDataFromObject(getExpressionVars(b)),ct=overrideFormData(S,si);let xt=filterValues(ct,b);htmx.config.getCacheBusterParam&&r==="get"&&xt.set("org.htmx.cache-buster",getRawAttribute(Be,"id")||"true"),(v==null||v==="")&&(v=getDocument().location.href);const ce=getValuesForElement(b,"hx-request"),G=getInternalData(b).boosted;let P=htmx.config.methodsThatUseUrlParams.indexOf(r)>=0;const k={boosted:G,useUrlParams:P,formData:xt,parameters:formDataProxy(xt),unfilteredFormData:ct,unfilteredParameters:formDataProxy(ct),headers:st,target:Be,verb:r,errors:je,withCredentials:g.credentials||ce.credentials||htmx.config.withCredentials,timeout:g.timeout||ce.timeout||htmx.config.timeout,path:v,triggeringEvent:_};if(!triggerEvent(b,"htmx:configRequest",k))return maybeCall(R),W(),Z;if(v=k.path,r=k.verb,st=k.headers,xt=formDataFromObject(k.parameters),je=k.errors,P=k.useUrlParams,je&&je.length>0)return triggerEvent(b,"htmx:validation:halted",k),maybeCall(R),W(),Z;const N=v.split("#"),Y=N[0],ve=N[1];let Oe=v;if(P&&(Oe=Y,!xt.keys().next().done&&(Oe.indexOf("?")<0?Oe+="?":Oe+="&",Oe+=urlEncode(xt),ve&&(Oe+="#"+ve))),!verifyPath(b,Oe,k))return triggerErrorEvent(b,"htmx:invalidPath",k),maybeCall(J),Z;if(c.open(r.toUpperCase(),Oe,!0),c.overrideMimeType("text/html"),c.withCredentials=k.withCredentials,c.timeout=k.timeout,!ce.noHeaders){for(const K in st)if(st.hasOwnProperty(K)){const Ee=st[K];safelySetHeaderValue(c,K,Ee)}}const Ne={xhr:c,target:Be,requestConfig:k,etc:g,boosted:G,select:we,pathInfo:{requestPath:v,finalRequestPath:Oe,responsePath:null,anchor:ve}};if(c.onload=function(){try{const K=hierarchyForElt(b);if(Ne.pathInfo.responsePath=getPathFromResponse(c),C(b,Ne),Ne.keepIndicators!==!0&&removeRequestIndicators(Ve,Ye),triggerEvent(b,"htmx:afterRequest",Ne),triggerEvent(b,"htmx:afterOnLoad",Ne),!bodyContains(b)){let Ee=null;for(;K.length>0&&Ee==null;){const nt=K.shift();bodyContains(nt)&&(Ee=nt)}Ee&&(triggerEvent(Ee,"htmx:afterRequest",Ne),triggerEvent(Ee,"htmx:afterOnLoad",Ne))}maybeCall(R),W()}catch(K){throw triggerErrorEvent(b,"htmx:onLoadError",mergeObjects({error:K},Ne)),K}},c.onerror=function(){removeRequestIndicators(Ve,Ye),triggerErrorEvent(b,"htmx:afterRequest",Ne),triggerErrorEvent(b,"htmx:sendError",Ne),maybeCall(J),W()},c.onabort=function(){removeRequestIndicators(Ve,Ye),triggerErrorEvent(b,"htmx:afterRequest",Ne),triggerErrorEvent(b,"htmx:sendAbort",Ne),maybeCall(J),W()},c.ontimeout=function(){removeRequestIndicators(Ve,Ye),triggerErrorEvent(b,"htmx:afterRequest",Ne),triggerErrorEvent(b,"htmx:timeout",Ne),maybeCall(J),W()},!triggerEvent(b,"htmx:beforeRequest",Ne))return maybeCall(R),W(),Z;var Ve=addRequestIndicatorClasses(b),Ye=disableElements(b);forEach(["loadstart","loadend","progress","abort"],function(K){forEach([c,c.upload],function(Ee){Ee.addEventListener(K,function(nt){triggerEvent(b,"htmx:xhr:"+K,{lengthComputable:nt.lengthComputable,loaded:nt.loaded,total:nt.total})})})}),triggerEvent(b,"htmx:beforeSend",Ne);const Lt=P?null:encodeParamsForBody(c,b,xt);return c.send(Lt),Z}function determineHistoryUpdates(r,v){const b=v.xhr;let _=null,g=null;if(hasHeader(b,/HX-Push:/i)?(_=b.getResponseHeader("HX-Push"),g="push"):hasHeader(b,/HX-Push-Url:/i)?(_=b.getResponseHeader("HX-Push-Url"),g="push"):hasHeader(b,/HX-Replace-Url:/i)&&(_=b.getResponseHeader("HX-Replace-Url"),g="replace"),_)return _==="false"?{}:{type:g,path:_};const O=v.pathInfo.finalRequestPath,R=v.pathInfo.responsePath,J=getClosestAttributeValue(r,"hx-push-url"),Z=getClosestAttributeValue(r,"hx-replace-url"),C=getInternalData(r).boosted;let we=null,Be=null;return J?(we="push",Be=J):Z?(we="replace",Be=Z):C&&(we="push",Be=R||O),Be?Be==="false"?{}:(Be==="true"&&(Be=R||O),v.pathInfo.anchor&&Be.indexOf("#")===-1&&(Be=Be+"#"+v.pathInfo.anchor),{type:we,path:Be}):{}}function codeMatches(r,v){var b=new RegExp(r.code);return b.test(v.toString(10))}function resolveResponseHandling(r){for(var v=0;v<htmx.config.responseHandling.length;v++){var b=htmx.config.responseHandling[v];if(codeMatches(b,r.status))return b}return{swap:!1}}function handleTitle(r){if(r){const v=find("title");v?v.innerHTML=r:window.document.title=r}}function handleAjaxResponse(r,v){const b=v.xhr;let _=v.target;const g=v.etc,O=v.select;if(!triggerEvent(r,"htmx:beforeOnLoad",v))return;if(hasHeader(b,/HX-Trigger:/i)&&handleTriggerHeader(b,"HX-Trigger",r),hasHeader(b,/HX-Location:/i)){saveCurrentPageToHistory();let ne=b.getResponseHeader("HX-Location");var R;ne.indexOf("{")===0&&(R=parseJSON(ne),ne=R.path,delete R.path),ajaxHelper("get",ne,R).then(function(){pushUrlIntoHistory(ne)});return}const J=hasHeader(b,/HX-Refresh:/i)&&b.getResponseHeader("HX-Refresh")==="true";if(hasHeader(b,/HX-Redirect:/i)){v.keepIndicators=!0,location.href=b.getResponseHeader("HX-Redirect"),J&&location.reload();return}if(J){v.keepIndicators=!0,location.reload();return}hasHeader(b,/HX-Retarget:/i)&&(b.getResponseHeader("HX-Retarget")==="this"?v.target=r:v.target=asElement(querySelectorExt(r,b.getResponseHeader("HX-Retarget"))));const Z=determineHistoryUpdates(r,v),C=resolveResponseHandling(b),we=C.swap;let Be=!!C.error,Ue=htmx.config.ignoreTitle||C.ignoreTitle,Q=C.select;C.target&&(v.target=asElement(querySelectorExt(r,C.target)));var Ke=g.swapOverride;Ke==null&&C.swapOverride&&(Ke=C.swapOverride),hasHeader(b,/HX-Retarget:/i)&&(b.getResponseHeader("HX-Retarget")==="this"?v.target=r:v.target=asElement(querySelectorExt(r,b.getResponseHeader("HX-Retarget")))),hasHeader(b,/HX-Reswap:/i)&&(Ke=b.getResponseHeader("HX-Reswap"));var At=b.response,gt=mergeObjects({shouldSwap:we,serverResponse:At,isError:Be,ignoreTitle:Ue,selectOverride:Q,swapOverride:Ke},v);if(!(C.event&&!triggerEvent(_,C.event,gt))&&triggerEvent(_,"htmx:beforeSwap",gt)){if(_=gt.target,At=gt.serverResponse,Be=gt.isError,Ue=gt.ignoreTitle,Q=gt.selectOverride,Ke=gt.swapOverride,v.target=_,v.failed=Be,v.successful=!Be,gt.shouldSwap){b.status===286&&cancelPolling(r),withExtensions(r,function(et){At=et.transformResponse(At,b,r)}),Z.type&&saveCurrentPageToHistory();var q=getSwapSpecification(r,Ke);q.hasOwnProperty("ignoreTitle")||(q.ignoreTitle=Ue),_.classList.add(htmx.config.swappingClass);let ne=null,c=null;O&&(Q=O),hasHeader(b,/HX-Reselect:/i)&&(Q=b.getResponseHeader("HX-Reselect"));const W=getClosestAttributeValue(r,"hx-select-oob"),Re=getClosestAttributeValue(r,"hx-select");let tt=function(){try{Z.type&&(triggerEvent(getDocument().body,"htmx:beforeHistoryUpdate",mergeObjects({history:Z},v)),Z.type==="push"?(pushUrlIntoHistory(Z.path),triggerEvent(getDocument().body,"htmx:pushedIntoHistory",{path:Z.path})):(replaceUrlInHistory(Z.path),triggerEvent(getDocument().body,"htmx:replacedInHistory",{path:Z.path}))),swap(_,At,q,{select:Q||Re,selectOOB:W,eventInfo:v,anchor:v.pathInfo.anchor,contextElement:r,afterSwapCallback:function(){if(hasHeader(b,/HX-Trigger-After-Swap:/i)){let et=r;bodyContains(r)||(et=getDocument().body),handleTriggerHeader(b,"HX-Trigger-After-Swap",et)}},afterSettleCallback:function(){if(hasHeader(b,/HX-Trigger-After-Settle:/i)){let et=r;bodyContains(r)||(et=getDocument().body),handleTriggerHeader(b,"HX-Trigger-After-Settle",et)}maybeCall(ne)}})}catch(et){throw triggerErrorEvent(r,"htmx:swapError",v),maybeCall(c),et}},st=htmx.config.globalViewTransitions;if(q.hasOwnProperty("transition")&&(st=q.transition),st&&triggerEvent(r,"htmx:beforeTransition",v)&&typeof Promise<"u"&&document.startViewTransition){const et=new Promise(function(S,si){ne=S,c=si}),je=tt;tt=function(){document.startViewTransition(function(){return je(),et})}}q.swapDelay>0?getWindow().setTimeout(tt,q.swapDelay):tt()}Be&&triggerErrorEvent(r,"htmx:responseError",mergeObjects({error:"Response Status Error Code "+b.status+" from "+v.pathInfo.requestPath},v))}}const extensions={};function extensionBase(){return{init:function(r){return null},getSelectors:function(){return null},onEvent:function(r,v){return!0},transformResponse:function(r,v,b){return r},isInlineSwap:function(r){return!1},handleSwap:function(r,v,b,_){return!1},encodeParameters:function(r,v,b){return null}}}function defineExtension(r,v){v.init&&v.init(internalAPI),extensions[r]=mergeObjects(extensionBase(),v)}function removeExtension(r){delete extensions[r]}function getExtensions(r,v,b){if(v==null&&(v=[]),r==null)return v;b==null&&(b=[]);const _=getAttributeValue(r,"hx-ext");return _&&forEach(_.split(","),function(g){if(g=g.replace(/ /g,""),g.slice(0,7)=="ignore:"){b.push(g.slice(7));return}if(b.indexOf(g)<0){const O=extensions[g];O&&v.indexOf(O)<0&&v.push(O)}}),getExtensions(asElement(parentElt(r)),v,b)}var isReady=!1;getDocument().addEventListener("DOMContentLoaded",function(){isReady=!0});function ready(r){isReady||getDocument().readyState==="complete"?r():getDocument().addEventListener("DOMContentLoaded",r)}function insertIndicatorStyles(){if(htmx.config.includeIndicatorStyles!==!1){const r=htmx.config.inlineStyleNonce?` nonce="${htmx.config.inlineStyleNonce}"`:"";getDocument().head.insertAdjacentHTML("beforeend","<style"+r+">      ."+htmx.config.indicatorClass+"{opacity:0}      ."+htmx.config.requestClass+" ."+htmx.config.indicatorClass+"{opacity:1; transition: opacity 200ms ease-in;}      ."+htmx.config.requestClass+"."+htmx.config.indicatorClass+"{opacity:1; transition: opacity 200ms ease-in;}      </style>")}}function getMetaConfig(){const r=getDocument().querySelector('meta[name="htmx-config"]');return r?parseJSON(r.content):null}function mergeMetaConfig(){const r=getMetaConfig();r&&(htmx.config=mergeObjects(htmx.config,r))}return ready(function(){mergeMetaConfig(),insertIndicatorStyles();let r=getDocument().body;processNode(r);const v=getDocument().querySelectorAll("[hx-trigger='restored'],[data-hx-trigger='restored']");r.addEventListener("htmx:abort",function(_){const g=_.target,O=getInternalData(g);O&&O.xhr&&O.xhr.abort()});const b=window.onpopstate?window.onpopstate.bind(window):null;window.onpopstate=function(_){_.state&&_.state.htmx?(restoreHistory(),forEach(v,function(g){triggerEvent(g,"htmx:restored",{document:getDocument(),triggerEvent})})):b&&b(_)},getWindow().setTimeout(function(){triggerEvent(r,"htmx:load",{}),r=null},0)}),htmx}();__webpack_exports__.A=htmx},"./node_modules/jquery/dist/jquery.js":function(r,v){var b,_;(function(g,O){"use strict";typeof r.exports=="object"?r.exports=g.document?O(g,!0):function(R){if(!R.document)throw new Error("jQuery requires a window with a document");return O(R)}:O(g)})(typeof window<"u"?window:this,function(g,O){"use strict";var R=[],J=Object.getPrototypeOf,Z=R.slice,C=R.flat?function(o){return R.flat.call(o)}:function(o){return R.concat.apply([],o)},we=R.push,Be=R.indexOf,Ue={},Q=Ue.toString,Ke=Ue.hasOwnProperty,At=Ke.toString,gt=At.call(Object),q={},ne=function(d){return typeof d=="function"&&typeof d.nodeType!="number"&&typeof d.item!="function"},c=function(d){return d!=null&&d===d.window},W=g.document,Re={type:!0,src:!0,nonce:!0,noModule:!0};function tt(o,d,w){w=w||W;var E,M,D=w.createElement("script");if(D.text=o,d)for(E in Re)M=d[E]||d.getAttribute&&d.getAttribute(E),M&&D.setAttribute(E,M);w.head.appendChild(D).parentNode.removeChild(D)}function st(o){return o==null?o+"":typeof o=="object"||typeof o=="function"?Ue[Q.call(o)]||"object":typeof o}var et="3.7.1",je=/HTML$/i,S=function(o,d){return new S.fn.init(o,d)};S.fn=S.prototype={jquery:et,constructor:S,length:0,toArray:function(){return Z.call(this)},get:function(o){return o==null?Z.call(this):o<0?this[o+this.length]:this[o]},pushStack:function(o){var d=S.merge(this.constructor(),o);return d.prevObject=this,d},each:function(o){return S.each(this,o)},map:function(o){return this.pushStack(S.map(this,function(d,w){return o.call(d,w,d)}))},slice:function(){return this.pushStack(Z.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(S.grep(this,function(o,d){return(d+1)%2}))},odd:function(){return this.pushStack(S.grep(this,function(o,d){return d%2}))},eq:function(o){var d=this.length,w=+o+(o<0?d:0);return this.pushStack(w>=0&&w<d?[this[w]]:[])},end:function(){return this.prevObject||this.constructor()},push:we,sort:R.sort,splice:R.splice},S.extend=S.fn.extend=function(){var o,d,w,E,M,D,V=arguments[0]||{},fe=1,le=arguments.length,Me=!1;for(typeof V=="boolean"&&(Me=V,V=arguments[fe]||{},fe++),typeof V!="object"&&!ne(V)&&(V={}),fe===le&&(V=this,fe--);fe<le;fe++)if((o=arguments[fe])!=null)for(d in o)E=o[d],!(d==="__proto__"||V===E)&&(Me&&E&&(S.isPlainObject(E)||(M=Array.isArray(E)))?(w=V[d],M&&!Array.isArray(w)?D=[]:!M&&!S.isPlainObject(w)?D={}:D=w,M=!1,V[d]=S.extend(Me,D,E)):E!==void 0&&(V[d]=E));return V},S.extend({expando:"jQuery"+(et+Math.random()).replace(/\D/g,""),isReady:!0,error:function(o){throw new Error(o)},noop:function(){},isPlainObject:function(o){var d,w;return!o||Q.call(o)!=="[object Object]"?!1:(d=J(o),d?(w=Ke.call(d,"constructor")&&d.constructor,typeof w=="function"&&At.call(w)===gt):!0)},isEmptyObject:function(o){var d;for(d in o)return!1;return!0},globalEval:function(o,d,w){tt(o,{nonce:d&&d.nonce},w)},each:function(o,d){var w,E=0;if(si(o))for(w=o.length;E<w&&d.call(o[E],E,o[E])!==!1;E++);else for(E in o)if(d.call(o[E],E,o[E])===!1)break;return o},text:function(o){var d,w="",E=0,M=o.nodeType;if(!M)for(;d=o[E++];)w+=S.text(d);return M===1||M===11?o.textContent:M===9?o.documentElement.textContent:M===3||M===4?o.nodeValue:w},makeArray:function(o,d){var w=d||[];return o!=null&&(si(Object(o))?S.merge(w,typeof o=="string"?[o]:o):we.call(w,o)),w},inArray:function(o,d,w){return d==null?-1:Be.call(d,o,w)},isXMLDoc:function(o){var d=o&&o.namespaceURI,w=o&&(o.ownerDocument||o).documentElement;return!je.test(d||w&&w.nodeName||"HTML")},merge:function(o,d){for(var w=+d.length,E=0,M=o.length;E<w;E++)o[M++]=d[E];return o.length=M,o},grep:function(o,d,w){for(var E,M=[],D=0,V=o.length,fe=!w;D<V;D++)E=!d(o[D],D),E!==fe&&M.push(o[D]);return M},map:function(o,d,w){var E,M,D=0,V=[];if(si(o))for(E=o.length;D<E;D++)M=d(o[D],D,w),M!=null&&V.push(M);else for(D in o)M=d(o[D],D,w),M!=null&&V.push(M);return C(V)},guid:1,support:q}),typeof Symbol=="function"&&(S.fn[Symbol.iterator]=R[Symbol.iterator]),S.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(o,d){Ue["[object "+d+"]"]=d.toLowerCase()});function si(o){var d=!!o&&"length"in o&&o.length,w=st(o);return ne(o)||c(o)?!1:w==="array"||d===0||typeof d=="number"&&d>0&&d-1 in o}function ct(o,d){return o.nodeName&&o.nodeName.toLowerCase()===d.toLowerCase()}var xt=R.pop,ce=R.sort,G=R.splice,P="[\\x20\\t\\r\\n\\f]",k=new RegExp("^"+P+"+|((?:^|[^\\\\])(?:\\\\.)*)"+P+"+$","g");S.contains=function(o,d){var w=d&&d.parentNode;return o===w||!!(w&&w.nodeType===1&&(o.contains?o.contains(w):o.compareDocumentPosition&&o.compareDocumentPosition(w)&16))};var N=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g;function Y(o,d){return d?o==="\0"?"\uFFFD":o.slice(0,-1)+"\\"+o.charCodeAt(o.length-1).toString(16)+" ":"\\"+o}S.escapeSelector=function(o){return(o+"").replace(N,Y)};var ve=W,Oe=we;(function(){var o,d,w,E,M,D=Oe,V,fe,le,Me,Ze,Ae=S.expando,ke=0,Tt=0,_i=bo(),$i=bo(),Ei=bo(),In=bo(),Xi=function(re,xe){return re===xe&&(M=!0),0},Sr="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",rr="(?:\\\\[\\da-fA-F]{1,6}"+P+"?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",Pi="\\["+P+"*("+rr+")(?:"+P+"*([*^$|!~]?=)"+P+`*(?:'((?:\\\\.|[^\\\\'])*)'|"((?:\\\\.|[^\\\\"])*)"|(`+rr+"))|)"+P+"*\\]",Nn=":("+rr+`)(?:\\((('((?:\\\\.|[^\\\\'])*)'|"((?:\\\\.|[^\\\\"])*)")|((?:\\\\.|[^\\\\()[\\]]|`+Pi+")*)|.*)\\)|)",ki=new RegExp(P+"+","g"),Fi=new RegExp("^"+P+"*,"+P+"*"),Or=new RegExp("^"+P+"*([>+~]|"+P+")"+P+"*"),or=new RegExp(P+"|>"),ls=new RegExp(Nn),Fs=new RegExp("^"+rr+"$"),cs={ID:new RegExp("^#("+rr+")"),CLASS:new RegExp("^\\.("+rr+")"),TAG:new RegExp("^("+rr+"|[*])"),ATTR:new RegExp("^"+Pi),PSEUDO:new RegExp("^"+Nn),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+P+"*(even|odd|(([+-]|)(\\d*)n|)"+P+"*(?:([+-]|)"+P+"*(\\d+)|))"+P+"*\\)|)","i"),bool:new RegExp("^(?:"+Sr+")$","i"),needsContext:new RegExp("^"+P+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+P+"*((?:-\\d)?\\d*)"+P+"*\\)|)(?=[^-]|$)","i")},Rs=/^(?:input|select|textarea|button)$/i,ws=/^h\d$/i,Zn=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,Wo=/[+~]/,Is=new RegExp("\\\\[\\da-fA-F]{1,6}"+P+"?|\\\\([^\\r\\n\\f])","g"),Vi=function(re,xe){var We="0x"+re.slice(1)-65536;return xe||(We<0?String.fromCharCode(We+65536):String.fromCharCode(We>>10|55296,We&1023|56320))},Ms=function(){lr()},vo=zn(function(re){return re.disabled===!0&&ct(re,"fieldset")},{dir:"parentNode",next:"legend"});function ar(){try{return V.activeElement}catch{}}try{D.apply(R=Z.call(ve.childNodes),ve.childNodes),R[ve.childNodes.length].nodeType}catch{D={apply:function(xe,We){Oe.apply(xe,Z.call(We))},call:function(xe){Oe.apply(xe,Z.call(arguments,1))}}}function Wi(re,xe,We,Xe){var at,qt,$t,Zt,Vt,Ti,pi,yi=xe&&xe.ownerDocument,Mi=xe?xe.nodeType:9;if(We=We||[],typeof re!="string"||!re||Mi!==1&&Mi!==9&&Mi!==11)return We;if(!Xe&&(lr(xe),xe=xe||V,le)){if(Mi!==11&&(Vt=Zn.exec(re)))if(at=Vt[1]){if(Mi===9)if($t=xe.getElementById(at)){if($t.id===at)return D.call(We,$t),We}else return We;else if(yi&&($t=yi.getElementById(at))&&Wi.contains(xe,$t)&&$t.id===at)return D.call(We,$t),We}else{if(Vt[2])return D.apply(We,xe.getElementsByTagName(re)),We;if((at=Vt[3])&&xe.getElementsByClassName)return D.apply(We,xe.getElementsByClassName(at)),We}if(!In[re+" "]&&(!Me||!Me.test(re))){if(pi=re,yi=xe,Mi===1&&(or.test(re)||Or.test(re))){for(yi=Wo.test(re)&&to(xe.parentNode)||xe,(yi!=xe||!q.scope)&&((Zt=xe.getAttribute("id"))?Zt=S.escapeSelector(Zt):xe.setAttribute("id",Zt=Ae)),Ti=Bn(re),qt=Ti.length;qt--;)Ti[qt]=(Zt?"#"+Zt:":scope")+" "+es(Ti[qt]);pi=Ti.join(",")}try{return D.apply(We,yi.querySelectorAll(pi)),We}catch{In(re,!0)}finally{Zt===Ae&&xe.removeAttribute("id")}}}return Wr(re.replace(k,"$1"),xe,We,Xe)}function bo(){var re=[];function xe(We,Xe){return re.push(We+" ")>d.cacheLength&&delete xe[re.shift()],xe[We+" "]=Xe}return xe}function Ns(re){return re[Ae]=!0,re}function us(re){var xe=V.createElement("fieldset");try{return!!re(xe)}catch{return!1}finally{xe.parentNode&&xe.parentNode.removeChild(xe),xe=null}}function _o(re){return function(xe){return ct(xe,"input")&&xe.type===re}}function Zr(re){return function(xe){return(ct(xe,"input")||ct(xe,"button"))&&xe.type===re}}function eo(re){return function(xe){return"form"in xe?xe.parentNode&&xe.disabled===!1?"label"in xe?"label"in xe.parentNode?xe.parentNode.disabled===re:xe.disabled===re:xe.isDisabled===re||xe.isDisabled!==!re&&vo(xe)===re:xe.disabled===re:"label"in xe?xe.disabled===re:!1}}function xr(re){return Ns(function(xe){return xe=+xe,Ns(function(We,Xe){for(var at,qt=re([],We.length,xe),$t=qt.length;$t--;)We[at=qt[$t]]&&(We[at]=!(Xe[at]=We[at]))})})}function to(re){return re&&typeof re.getElementsByTagName<"u"&&re}function lr(re){var xe,We=re?re.ownerDocument||re:ve;return We==V||We.nodeType!==9||!We.documentElement||(V=We,fe=V.documentElement,le=!S.isXMLDoc(V),Ze=fe.matches||fe.webkitMatchesSelector||fe.msMatchesSelector,fe.msMatchesSelector&&ve!=V&&(xe=V.defaultView)&&xe.top!==xe&&xe.addEventListener("unload",Ms),q.getById=us(function(Xe){return fe.appendChild(Xe).id=S.expando,!V.getElementsByName||!V.getElementsByName(S.expando).length}),q.disconnectedMatch=us(function(Xe){return Ze.call(Xe,"*")}),q.scope=us(function(){return V.querySelectorAll(":scope")}),q.cssHas=us(function(){try{return V.querySelector(":has(*,:jqfake)"),!1}catch{return!0}}),q.getById?(d.filter.ID=function(Xe){var at=Xe.replace(Is,Vi);return function(qt){return qt.getAttribute("id")===at}},d.find.ID=function(Xe,at){if(typeof at.getElementById<"u"&&le){var qt=at.getElementById(Xe);return qt?[qt]:[]}}):(d.filter.ID=function(Xe){var at=Xe.replace(Is,Vi);return function(qt){var $t=typeof qt.getAttributeNode<"u"&&qt.getAttributeNode("id");return $t&&$t.value===at}},d.find.ID=function(Xe,at){if(typeof at.getElementById<"u"&&le){var qt,$t,Zt,Vt=at.getElementById(Xe);if(Vt){if(qt=Vt.getAttributeNode("id"),qt&&qt.value===Xe)return[Vt];for(Zt=at.getElementsByName(Xe),$t=0;Vt=Zt[$t++];)if(qt=Vt.getAttributeNode("id"),qt&&qt.value===Xe)return[Vt]}return[]}}),d.find.TAG=function(Xe,at){return typeof at.getElementsByTagName<"u"?at.getElementsByTagName(Xe):at.querySelectorAll(Xe)},d.find.CLASS=function(Xe,at){if(typeof at.getElementsByClassName<"u"&&le)return at.getElementsByClassName(Xe)},Me=[],us(function(Xe){var at;fe.appendChild(Xe).innerHTML="<a id='"+Ae+"' href='' disabled='disabled'></a><select id='"+Ae+"-\r\\' disabled='disabled'><option selected=''></option></select>",Xe.querySelectorAll("[selected]").length||Me.push("\\["+P+"*(?:value|"+Sr+")"),Xe.querySelectorAll("[id~="+Ae+"-]").length||Me.push("~="),Xe.querySelectorAll("a#"+Ae+"+*").length||Me.push(".#.+[+~]"),Xe.querySelectorAll(":checked").length||Me.push(":checked"),at=V.createElement("input"),at.setAttribute("type","hidden"),Xe.appendChild(at).setAttribute("name","D"),fe.appendChild(Xe).disabled=!0,Xe.querySelectorAll(":disabled").length!==2&&Me.push(":enabled",":disabled"),at=V.createElement("input"),at.setAttribute("name",""),Xe.appendChild(at),Xe.querySelectorAll("[name='']").length||Me.push("\\["+P+"*name"+P+"*="+P+`*(?:''|"")`)}),q.cssHas||Me.push(":has"),Me=Me.length&&new RegExp(Me.join("|")),Xi=function(Xe,at){if(Xe===at)return M=!0,0;var qt=!Xe.compareDocumentPosition-!at.compareDocumentPosition;return qt||(qt=(Xe.ownerDocument||Xe)==(at.ownerDocument||at)?Xe.compareDocumentPosition(at):1,qt&1||!q.sortDetached&&at.compareDocumentPosition(Xe)===qt?Xe===V||Xe.ownerDocument==ve&&Wi.contains(ve,Xe)?-1:at===V||at.ownerDocument==ve&&Wi.contains(ve,at)?1:E?Be.call(E,Xe)-Be.call(E,at):0:qt&4?-1:1)}),V}Wi.matches=function(re,xe){return Wi(re,null,null,xe)},Wi.matchesSelector=function(re,xe){if(lr(re),le&&!In[xe+" "]&&(!Me||!Me.test(xe)))try{var We=Ze.call(re,xe);if(We||q.disconnectedMatch||re.document&&re.document.nodeType!==11)return We}catch{In(xe,!0)}return Wi(xe,V,null,[re]).length>0},Wi.contains=function(re,xe){return(re.ownerDocument||re)!=V&&lr(re),S.contains(re,xe)},Wi.attr=function(re,xe){(re.ownerDocument||re)!=V&&lr(re);var We=d.attrHandle[xe.toLowerCase()],Xe=We&&Ke.call(d.attrHandle,xe.toLowerCase())?We(re,xe,!le):void 0;return Xe!==void 0?Xe:re.getAttribute(xe)},Wi.error=function(re){throw new Error("Syntax error, unrecognized expression: "+re)},S.uniqueSort=function(re){var xe,We=[],Xe=0,at=0;if(M=!q.sortStable,E=!q.sortStable&&Z.call(re,0),ce.call(re,Xi),M){for(;xe=re[at++];)xe===re[at]&&(Xe=We.push(at));for(;Xe--;)G.call(re,We[Xe],1)}return E=null,re},S.fn.uniqueSort=function(){return this.pushStack(S.uniqueSort(Z.apply(this)))},d=S.expr={cacheLength:50,createPseudo:Ns,match:cs,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(re){return re[1]=re[1].replace(Is,Vi),re[3]=(re[3]||re[4]||re[5]||"").replace(Is,Vi),re[2]==="~="&&(re[3]=" "+re[3]+" "),re.slice(0,4)},CHILD:function(re){return re[1]=re[1].toLowerCase(),re[1].slice(0,3)==="nth"?(re[3]||Wi.error(re[0]),re[4]=+(re[4]?re[5]+(re[6]||1):2*(re[3]==="even"||re[3]==="odd")),re[5]=+(re[7]+re[8]||re[3]==="odd")):re[3]&&Wi.error(re[0]),re},PSEUDO:function(re){var xe,We=!re[6]&&re[2];return cs.CHILD.test(re[0])?null:(re[3]?re[2]=re[4]||re[5]||"":We&&ls.test(We)&&(xe=Bn(We,!0))&&(xe=We.indexOf(")",We.length-xe)-We.length)&&(re[0]=re[0].slice(0,xe),re[2]=We.slice(0,xe)),re.slice(0,3))}},filter:{TAG:function(re){var xe=re.replace(Is,Vi).toLowerCase();return re==="*"?function(){return!0}:function(We){return ct(We,xe)}},CLASS:function(re){var xe=_i[re+" "];return xe||(xe=new RegExp("(^|"+P+")"+re+"("+P+"|$)"))&&_i(re,function(We){return xe.test(typeof We.className=="string"&&We.className||typeof We.getAttribute<"u"&&We.getAttribute("class")||"")})},ATTR:function(re,xe,We){return function(Xe){var at=Wi.attr(Xe,re);return at==null?xe==="!=":xe?(at+="",xe==="="?at===We:xe==="!="?at!==We:xe==="^="?We&&at.indexOf(We)===0:xe==="*="?We&&at.indexOf(We)>-1:xe==="$="?We&&at.slice(-We.length)===We:xe==="~="?(" "+at.replace(ki," ")+" ").indexOf(We)>-1:xe==="|="?at===We||at.slice(0,We.length+1)===We+"-":!1):!0}},CHILD:function(re,xe,We,Xe,at){var qt=re.slice(0,3)!=="nth",$t=re.slice(-4)!=="last",Zt=xe==="of-type";return Xe===1&&at===0?function(Vt){return!!Vt.parentNode}:function(Vt,Ti,pi){var yi,Mi,ii,Gi,Ss,ts=qt!==$t?"nextSibling":"previousSibling",ds=Vt.parentNode,Hs=Zt&&Vt.nodeName.toLowerCase(),_n=!pi&&!Zt,fs=!1;if(ds){if(qt){for(;ts;){for(ii=Vt;ii=ii[ts];)if(Zt?ct(ii,Hs):ii.nodeType===1)return!1;Ss=ts=re==="only"&&!Ss&&"nextSibling"}return!0}if(Ss=[$t?ds.firstChild:ds.lastChild],$t&&_n){for(Mi=ds[Ae]||(ds[Ae]={}),yi=Mi[re]||[],Gi=yi[0]===ke&&yi[1],fs=Gi&&yi[2],ii=Gi&&ds.childNodes[Gi];ii=++Gi&&ii&&ii[ts]||(fs=Gi=0)||Ss.pop();)if(ii.nodeType===1&&++fs&&ii===Vt){Mi[re]=[ke,Gi,fs];break}}else if(_n&&(Mi=Vt[Ae]||(Vt[Ae]={}),yi=Mi[re]||[],Gi=yi[0]===ke&&yi[1],fs=Gi),fs===!1)for(;(ii=++Gi&&ii&&ii[ts]||(fs=Gi=0)||Ss.pop())&&!((Zt?ct(ii,Hs):ii.nodeType===1)&&++fs&&(_n&&(Mi=ii[Ae]||(ii[Ae]={}),Mi[re]=[ke,fs]),ii===Vt)););return fs-=at,fs===Xe||fs%Xe===0&&fs/Xe>=0}}},PSEUDO:function(re,xe){var We,Xe=d.pseudos[re]||d.setFilters[re.toLowerCase()]||Wi.error("unsupported pseudo: "+re);return Xe[Ae]?Xe(xe):Xe.length>1?(We=[re,re,"",xe],d.setFilters.hasOwnProperty(re.toLowerCase())?Ns(function(at,qt){for(var $t,Zt=Xe(at,xe),Vt=Zt.length;Vt--;)$t=Be.call(at,Zt[Vt]),at[$t]=!(qt[$t]=Zt[Vt])}):function(at){return Xe(at,0,We)}):Xe}},pseudos:{not:Ns(function(re){var xe=[],We=[],Xe=yo(re.replace(k,"$1"));return Xe[Ae]?Ns(function(at,qt,$t,Zt){for(var Vt,Ti=Xe(at,null,Zt,[]),pi=at.length;pi--;)(Vt=Ti[pi])&&(at[pi]=!(qt[pi]=Vt))}):function(at,qt,$t){return xe[0]=at,Xe(xe,null,$t,We),xe[0]=null,!We.pop()}}),has:Ns(function(re){return function(xe){return Wi(re,xe).length>0}}),contains:Ns(function(re){return re=re.replace(Is,Vi),function(xe){return(xe.textContent||S.text(xe)).indexOf(re)>-1}}),lang:Ns(function(re){return Fs.test(re||"")||Wi.error("unsupported lang: "+re),re=re.replace(Is,Vi).toLowerCase(),function(xe){var We;do if(We=le?xe.lang:xe.getAttribute("xml:lang")||xe.getAttribute("lang"))return We=We.toLowerCase(),We===re||We.indexOf(re+"-")===0;while((xe=xe.parentNode)&&xe.nodeType===1);return!1}}),target:function(re){var xe=g.location&&g.location.hash;return xe&&xe.slice(1)===re.id},root:function(re){return re===fe},focus:function(re){return re===ar()&&V.hasFocus()&&!!(re.type||re.href||~re.tabIndex)},enabled:eo(!1),disabled:eo(!0),checked:function(re){return ct(re,"input")&&!!re.checked||ct(re,"option")&&!!re.selected},selected:function(re){return re.parentNode&&re.parentNode.selectedIndex,re.selected===!0},empty:function(re){for(re=re.firstChild;re;re=re.nextSibling)if(re.nodeType<6)return!1;return!0},parent:function(re){return!d.pseudos.empty(re)},header:function(re){return ws.test(re.nodeName)},input:function(re){return Rs.test(re.nodeName)},button:function(re){return ct(re,"input")&&re.type==="button"||ct(re,"button")},text:function(re){var xe;return ct(re,"input")&&re.type==="text"&&((xe=re.getAttribute("type"))==null||xe.toLowerCase()==="text")},first:xr(function(){return[0]}),last:xr(function(re,xe){return[xe-1]}),eq:xr(function(re,xe,We){return[We<0?We+xe:We]}),even:xr(function(re,xe){for(var We=0;We<xe;We+=2)re.push(We);return re}),odd:xr(function(re,xe){for(var We=1;We<xe;We+=2)re.push(We);return re}),lt:xr(function(re,xe,We){var Xe;for(We<0?Xe=We+xe:We>xe?Xe=xe:Xe=We;--Xe>=0;)re.push(Xe);return re}),gt:xr(function(re,xe,We){for(var Xe=We<0?We+xe:We;++Xe<xe;)re.push(Xe);return re})}},d.pseudos.nth=d.pseudos.eq;for(o in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})d.pseudos[o]=_o(o);for(o in{submit:!0,reset:!0})d.pseudos[o]=Zr(o);function Vr(){}Vr.prototype=d.filters=d.pseudos,d.setFilters=new Vr;function Bn(re,xe){var We,Xe,at,qt,$t,Zt,Vt,Ti=$i[re+" "];if(Ti)return xe?0:Ti.slice(0);for($t=re,Zt=[],Vt=d.preFilter;$t;){(!We||(Xe=Fi.exec($t)))&&(Xe&&($t=$t.slice(Xe[0].length)||$t),Zt.push(at=[])),We=!1,(Xe=Or.exec($t))&&(We=Xe.shift(),at.push({value:We,type:Xe[0].replace(k," ")}),$t=$t.slice(We.length));for(qt in d.filter)(Xe=cs[qt].exec($t))&&(!Vt[qt]||(Xe=Vt[qt](Xe)))&&(We=Xe.shift(),at.push({value:We,type:qt,matches:Xe}),$t=$t.slice(We.length));if(!We)break}return xe?$t.length:$t?Wi.error(re):$i(re,Zt).slice(0)}function es(re){for(var xe=0,We=re.length,Xe="";xe<We;xe++)Xe+=re[xe].value;return Xe}function zn(re,xe,We){var Xe=xe.dir,at=xe.next,qt=at||Xe,$t=We&&qt==="parentNode",Zt=Tt++;return xe.first?function(Vt,Ti,pi){for(;Vt=Vt[Xe];)if(Vt.nodeType===1||$t)return re(Vt,Ti,pi);return!1}:function(Vt,Ti,pi){var yi,Mi,ii=[ke,Zt];if(pi){for(;Vt=Vt[Xe];)if((Vt.nodeType===1||$t)&&re(Vt,Ti,pi))return!0}else for(;Vt=Vt[Xe];)if(Vt.nodeType===1||$t)if(Mi=Vt[Ae]||(Vt[Ae]={}),at&&ct(Vt,at))Vt=Vt[Xe]||Vt;else{if((yi=Mi[qt])&&yi[0]===ke&&yi[1]===Zt)return ii[2]=yi[2];if(Mi[qt]=ii,ii[2]=re(Vt,Ti,pi))return!0}return!1}}function Hn(re){return re.length>1?function(xe,We,Xe){for(var at=re.length;at--;)if(!re[at](xe,We,Xe))return!1;return!0}:re[0]}function zo(re,xe,We){for(var Xe=0,at=xe.length;Xe<at;Xe++)Wi(re,xe[Xe],We);return We}function cr(re,xe,We,Xe,at){for(var qt,$t=[],Zt=0,Vt=re.length,Ti=xe!=null;Zt<Vt;Zt++)(qt=re[Zt])&&(!We||We(qt,Xe,at))&&($t.push(qt),Ti&&xe.push(Zt));return $t}function ur(re,xe,We,Xe,at,qt){return Xe&&!Xe[Ae]&&(Xe=ur(Xe)),at&&!at[Ae]&&(at=ur(at,qt)),Ns(function($t,Zt,Vt,Ti){var pi,yi,Mi,ii,Gi=[],Ss=[],ts=Zt.length,ds=$t||zo(xe||"*",Vt.nodeType?[Vt]:Vt,[]),Hs=re&&($t||!xe)?cr(ds,Gi,re,Vt,Ti):ds;if(We?(ii=at||($t?re:ts||Xe)?[]:Zt,We(Hs,ii,Vt,Ti)):ii=Hs,Xe)for(pi=cr(ii,Ss),Xe(pi,[],Vt,Ti),yi=pi.length;yi--;)(Mi=pi[yi])&&(ii[Ss[yi]]=!(Hs[Ss[yi]]=Mi));if($t){if(at||re){if(at){for(pi=[],yi=ii.length;yi--;)(Mi=ii[yi])&&pi.push(Hs[yi]=Mi);at(null,ii=[],pi,Ti)}for(yi=ii.length;yi--;)(Mi=ii[yi])&&(pi=at?Be.call($t,Mi):Gi[yi])>-1&&($t[pi]=!(Zt[pi]=Mi))}}else ii=cr(ii===Zt?ii.splice(ts,ii.length):ii),at?at(null,Zt,ii,Ti):D.apply(Zt,ii)})}function qr(re){for(var xe,We,Xe,at=re.length,qt=d.relative[re[0].type],$t=qt||d.relative[" "],Zt=qt?1:0,Vt=zn(function(yi){return yi===xe},$t,!0),Ti=zn(function(yi){return Be.call(xe,yi)>-1},$t,!0),pi=[function(yi,Mi,ii){var Gi=!qt&&(ii||Mi!=w)||((xe=Mi).nodeType?Vt(yi,Mi,ii):Ti(yi,Mi,ii));return xe=null,Gi}];Zt<at;Zt++)if(We=d.relative[re[Zt].type])pi=[zn(Hn(pi),We)];else{if(We=d.filter[re[Zt].type].apply(null,re[Zt].matches),We[Ae]){for(Xe=++Zt;Xe<at&&!d.relative[re[Xe].type];Xe++);return ur(Zt>1&&Hn(pi),Zt>1&&es(re.slice(0,Zt-1).concat({value:re[Zt-2].type===" "?"*":""})).replace(k,"$1"),We,Zt<Xe&&qr(re.slice(Zt,Xe)),Xe<at&&qr(re=re.slice(Xe)),Xe<at&&es(re))}pi.push(We)}return Hn(pi)}function Vl(re,xe){var We=xe.length>0,Xe=re.length>0,at=function(qt,$t,Zt,Vt,Ti){var pi,yi,Mi,ii=0,Gi="0",Ss=qt&&[],ts=[],ds=w,Hs=qt||Xe&&d.find.TAG("*",Ti),_n=ke+=ds==null?1:Math.random()||.1,fs=Hs.length;for(Ti&&(w=$t==V||$t||Ti);Gi!==fs&&(pi=Hs[Gi])!=null;Gi++){if(Xe&&pi){for(yi=0,!$t&&pi.ownerDocument!=V&&(lr(pi),Zt=!le);Mi=re[yi++];)if(Mi(pi,$t||V,Zt)){D.call(Vt,pi);break}Ti&&(ke=_n)}We&&((pi=!Mi&&pi)&&ii--,qt&&Ss.push(pi))}if(ii+=Gi,We&&Gi!==ii){for(yi=0;Mi=xe[yi++];)Mi(Ss,ts,$t,Zt);if(qt){if(ii>0)for(;Gi--;)Ss[Gi]||ts[Gi]||(ts[Gi]=xt.call(Vt));ts=cr(ts)}D.apply(Vt,ts),Ti&&!qt&&ts.length>0&&ii+xe.length>1&&S.uniqueSort(Vt)}return Ti&&(ke=_n,w=ds),Ss};return We?Ns(at):at}function yo(re,xe){var We,Xe=[],at=[],qt=Ei[re+" "];if(!qt){for(xe||(xe=Bn(re)),We=xe.length;We--;)qt=qr(xe[We]),qt[Ae]?Xe.push(qt):at.push(qt);qt=Ei(re,Vl(at,Xe)),qt.selector=re}return qt}function Wr(re,xe,We,Xe){var at,qt,$t,Zt,Vt,Ti=typeof re=="function"&&re,pi=!Xe&&Bn(re=Ti.selector||re);if(We=We||[],pi.length===1){if(qt=pi[0]=pi[0].slice(0),qt.length>2&&($t=qt[0]).type==="ID"&&xe.nodeType===9&&le&&d.relative[qt[1].type]){if(xe=(d.find.ID($t.matches[0].replace(Is,Vi),xe)||[])[0],xe)Ti&&(xe=xe.parentNode);else return We;re=re.slice(qt.shift().value.length)}for(at=cs.needsContext.test(re)?0:qt.length;at--&&($t=qt[at],!d.relative[Zt=$t.type]);)if((Vt=d.find[Zt])&&(Xe=Vt($t.matches[0].replace(Is,Vi),Wo.test(qt[0].type)&&to(xe.parentNode)||xe))){if(qt.splice(at,1),re=Xe.length&&es(qt),!re)return D.apply(We,Xe),We;break}}return(Ti||yo(re,pi))(Xe,xe,!le,We,!xe||Wo.test(re)&&to(xe.parentNode)||xe),We}q.sortStable=Ae.split("").sort(Xi).join("")===Ae,lr(),q.sortDetached=us(function(re){return re.compareDocumentPosition(V.createElement("fieldset"))&1}),S.find=Wi,S.expr[":"]=S.expr.pseudos,S.unique=S.uniqueSort,Wi.compile=yo,Wi.select=Wr,Wi.setDocument=lr,Wi.tokenize=Bn,Wi.escape=S.escapeSelector,Wi.getText=S.text,Wi.isXML=S.isXMLDoc,Wi.selectors=S.expr,Wi.support=S.support,Wi.uniqueSort=S.uniqueSort})();var Ne=function(o,d,w){for(var E=[],M=w!==void 0;(o=o[d])&&o.nodeType!==9;)if(o.nodeType===1){if(M&&S(o).is(w))break;E.push(o)}return E},Ve=function(o,d){for(var w=[];o;o=o.nextSibling)o.nodeType===1&&o!==d&&w.push(o);return w},Ye=S.expr.match.needsContext,Lt=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function K(o,d,w){return ne(d)?S.grep(o,function(E,M){return!!d.call(E,M,E)!==w}):d.nodeType?S.grep(o,function(E){return E===d!==w}):typeof d!="string"?S.grep(o,function(E){return Be.call(d,E)>-1!==w}):S.filter(d,o,w)}S.filter=function(o,d,w){var E=d[0];return w&&(o=":not("+o+")"),d.length===1&&E.nodeType===1?S.find.matchesSelector(E,o)?[E]:[]:S.find.matches(o,S.grep(d,function(M){return M.nodeType===1}))},S.fn.extend({find:function(o){var d,w,E=this.length,M=this;if(typeof o!="string")return this.pushStack(S(o).filter(function(){for(d=0;d<E;d++)if(S.contains(M[d],this))return!0}));for(w=this.pushStack([]),d=0;d<E;d++)S.find(o,M[d],w);return E>1?S.uniqueSort(w):w},filter:function(o){return this.pushStack(K(this,o||[],!1))},not:function(o){return this.pushStack(K(this,o||[],!0))},is:function(o){return!!K(this,typeof o=="string"&&Ye.test(o)?S(o):o||[],!1).length}});var Ee,nt=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/,te=S.fn.init=function(o,d,w){var E,M;if(!o)return this;if(w=w||Ee,typeof o=="string")if(o[0]==="<"&&o[o.length-1]===">"&&o.length>=3?E=[null,o,null]:E=nt.exec(o),E&&(E[1]||!d))if(E[1]){if(d=d instanceof S?d[0]:d,S.merge(this,S.parseHTML(E[1],d&&d.nodeType?d.ownerDocument||d:W,!0)),Lt.test(E[1])&&S.isPlainObject(d))for(E in d)ne(this[E])?this[E](d[E]):this.attr(E,d[E]);return this}else return M=W.getElementById(E[2]),M&&(this[0]=M,this.length=1),this;else return!d||d.jquery?(d||w).find(o):this.constructor(d).find(o);else{if(o.nodeType)return this[0]=o,this.length=1,this;if(ne(o))return w.ready!==void 0?w.ready(o):o(S)}return S.makeArray(o,this)};te.prototype=S.fn,Ee=S(W);var ee=/^(?:parents|prev(?:Until|All))/,oe={children:!0,contents:!0,next:!0,prev:!0};S.fn.extend({has:function(o){var d=S(o,this),w=d.length;return this.filter(function(){for(var E=0;E<w;E++)if(S.contains(this,d[E]))return!0})},closest:function(o,d){var w,E=0,M=this.length,D=[],V=typeof o!="string"&&S(o);if(!Ye.test(o)){for(;E<M;E++)for(w=this[E];w&&w!==d;w=w.parentNode)if(w.nodeType<11&&(V?V.index(w)>-1:w.nodeType===1&&S.find.matchesSelector(w,o))){D.push(w);break}}return this.pushStack(D.length>1?S.uniqueSort(D):D)},index:function(o){return o?typeof o=="string"?Be.call(S(o),this[0]):Be.call(this,o.jquery?o[0]:o):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(o,d){return this.pushStack(S.uniqueSort(S.merge(this.get(),S(o,d))))},addBack:function(o){return this.add(o==null?this.prevObject:this.prevObject.filter(o))}});function Ge(o,d){for(;(o=o[d])&&o.nodeType!==1;);return o}S.each({parent:function(o){var d=o.parentNode;return d&&d.nodeType!==11?d:null},parents:function(o){return Ne(o,"parentNode")},parentsUntil:function(o,d,w){return Ne(o,"parentNode",w)},next:function(o){return Ge(o,"nextSibling")},prev:function(o){return Ge(o,"previousSibling")},nextAll:function(o){return Ne(o,"nextSibling")},prevAll:function(o){return Ne(o,"previousSibling")},nextUntil:function(o,d,w){return Ne(o,"nextSibling",w)},prevUntil:function(o,d,w){return Ne(o,"previousSibling",w)},siblings:function(o){return Ve((o.parentNode||{}).firstChild,o)},children:function(o){return Ve(o.firstChild)},contents:function(o){return o.contentDocument!=null&&J(o.contentDocument)?o.contentDocument:(ct(o,"template")&&(o=o.content||o),S.merge([],o.childNodes))}},function(o,d){S.fn[o]=function(w,E){var M=S.map(this,d,w);return o.slice(-5)!=="Until"&&(E=w),E&&typeof E=="string"&&(M=S.filter(E,M)),this.length>1&&(oe[o]||S.uniqueSort(M),ee.test(o)&&M.reverse()),this.pushStack(M)}});var yt=/[^\x20\t\r\n\f]+/g;function jt(o){var d={};return S.each(o.match(yt)||[],function(w,E){d[E]=!0}),d}S.Callbacks=function(o){o=typeof o=="string"?jt(o):S.extend({},o);var d,w,E,M,D=[],V=[],fe=-1,le=function(){for(M=M||o.once,E=d=!0;V.length;fe=-1)for(w=V.shift();++fe<D.length;)D[fe].apply(w[0],w[1])===!1&&o.stopOnFalse&&(fe=D.length,w=!1);o.memory||(w=!1),d=!1,M&&(w?D=[]:D="")},Me={add:function(){return D&&(w&&!d&&(fe=D.length-1,V.push(w)),function Ze(Ae){S.each(Ae,function(ke,Tt){ne(Tt)?(!o.unique||!Me.has(Tt))&&D.push(Tt):Tt&&Tt.length&&st(Tt)!=="string"&&Ze(Tt)})}(arguments),w&&!d&&le()),this},remove:function(){return S.each(arguments,function(Ze,Ae){for(var ke;(ke=S.inArray(Ae,D,ke))>-1;)D.splice(ke,1),ke<=fe&&fe--}),this},has:function(Ze){return Ze?S.inArray(Ze,D)>-1:D.length>0},empty:function(){return D&&(D=[]),this},disable:function(){return M=V=[],D=w="",this},disabled:function(){return!D},lock:function(){return M=V=[],!w&&!d&&(D=w=""),this},locked:function(){return!!M},fireWith:function(Ze,Ae){return M||(Ae=Ae||[],Ae=[Ze,Ae.slice?Ae.slice():Ae],V.push(Ae),d||le()),this},fire:function(){return Me.fireWith(this,arguments),this},fired:function(){return!!E}};return Me};function Bt(o){return o}function Qt(o){throw o}function ji(o,d,w,E){var M;try{o&&ne(M=o.promise)?M.call(o).done(d).fail(w):o&&ne(M=o.then)?M.call(o,d,w):d.apply(void 0,[o].slice(E))}catch(D){w.apply(void 0,[D])}}S.extend({Deferred:function(o){var d=[["notify","progress",S.Callbacks("memory"),S.Callbacks("memory"),2],["resolve","done",S.Callbacks("once memory"),S.Callbacks("once memory"),0,"resolved"],["reject","fail",S.Callbacks("once memory"),S.Callbacks("once memory"),1,"rejected"]],w="pending",E={state:function(){return w},always:function(){return M.done(arguments).fail(arguments),this},catch:function(D){return E.then(null,D)},pipe:function(){var D=arguments;return S.Deferred(function(V){S.each(d,function(fe,le){var Me=ne(D[le[4]])&&D[le[4]];M[le[1]](function(){var Ze=Me&&Me.apply(this,arguments);Ze&&ne(Ze.promise)?Ze.promise().progress(V.notify).done(V.resolve).fail(V.reject):V[le[0]+"With"](this,Me?[Ze]:arguments)})}),D=null}).promise()},then:function(D,V,fe){var le=0;function Me(Ze,Ae,ke,Tt){return function(){var _i=this,$i=arguments,Ei=function(){var Xi,Sr;if(!(Ze<le)){if(Xi=ke.apply(_i,$i),Xi===Ae.promise())throw new TypeError("Thenable self-resolution");Sr=Xi&&(typeof Xi=="object"||typeof Xi=="function")&&Xi.then,ne(Sr)?Tt?Sr.call(Xi,Me(le,Ae,Bt,Tt),Me(le,Ae,Qt,Tt)):(le++,Sr.call(Xi,Me(le,Ae,Bt,Tt),Me(le,Ae,Qt,Tt),Me(le,Ae,Bt,Ae.notifyWith))):(ke!==Bt&&(_i=void 0,$i=[Xi]),(Tt||Ae.resolveWith)(_i,$i))}},In=Tt?Ei:function(){try{Ei()}catch(Xi){S.Deferred.exceptionHook&&S.Deferred.exceptionHook(Xi,In.error),Ze+1>=le&&(ke!==Qt&&(_i=void 0,$i=[Xi]),Ae.rejectWith(_i,$i))}};Ze?In():(S.Deferred.getErrorHook?In.error=S.Deferred.getErrorHook():S.Deferred.getStackHook&&(In.error=S.Deferred.getStackHook()),g.setTimeout(In))}}return S.Deferred(function(Ze){d[0][3].add(Me(0,Ze,ne(fe)?fe:Bt,Ze.notifyWith)),d[1][3].add(Me(0,Ze,ne(D)?D:Bt)),d[2][3].add(Me(0,Ze,ne(V)?V:Qt))}).promise()},promise:function(D){return D!=null?S.extend(D,E):E}},M={};return S.each(d,function(D,V){var fe=V[2],le=V[5];E[V[1]]=fe.add,le&&fe.add(function(){w=le},d[3-D][2].disable,d[3-D][3].disable,d[0][2].lock,d[0][3].lock),fe.add(V[3].fire),M[V[0]]=function(){return M[V[0]+"With"](this===M?void 0:this,arguments),this},M[V[0]+"With"]=fe.fireWith}),E.promise(M),o&&o.call(M,M),M},when:function(o){var d=arguments.length,w=d,E=Array(w),M=Z.call(arguments),D=S.Deferred(),V=function(fe){return function(le){E[fe]=this,M[fe]=arguments.length>1?Z.call(arguments):le,--d||D.resolveWith(E,M)}};if(d<=1&&(ji(o,D.done(V(w)).resolve,D.reject,!d),D.state()==="pending"||ne(M[w]&&M[w].then)))return D.then();for(;w--;)ji(M[w],V(w),D.reject);return D.promise()}});var ti=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;S.Deferred.exceptionHook=function(o,d){g.console&&g.console.warn&&o&&ti.test(o.name)&&g.console.warn("jQuery.Deferred exception: "+o.message,o.stack,d)},S.readyException=function(o){g.setTimeout(function(){throw o})};var fn=S.Deferred();S.fn.ready=function(o){return fn.then(o).catch(function(d){S.readyException(d)}),this},S.extend({isReady:!1,readyWait:1,ready:function(o){(o===!0?--S.readyWait:S.isReady)||(S.isReady=!0,!(o!==!0&&--S.readyWait>0)&&fn.resolveWith(W,[S]))}}),S.ready.then=fn.then;function Qi(){W.removeEventListener("DOMContentLoaded",Qi),g.removeEventListener("load",Qi),S.ready()}W.readyState==="complete"||W.readyState!=="loading"&&!W.documentElement.doScroll?g.setTimeout(S.ready):(W.addEventListener("DOMContentLoaded",Qi),g.addEventListener("load",Qi));var p=function(o,d,w,E,M,D,V){var fe=0,le=o.length,Me=w==null;if(st(w)==="object"){M=!0;for(fe in w)p(o,d,fe,w[fe],!0,D,V)}else if(E!==void 0&&(M=!0,ne(E)||(V=!0),Me&&(V?(d.call(o,E),d=null):(Me=d,d=function(Ze,Ae,ke){return Me.call(S(Ze),ke)})),d))for(;fe<le;fe++)d(o[fe],w,V?E:E.call(o[fe],fe,d(o[fe],w)));return M?o:Me?d.call(o):le?d(o[0],w):D},j=/^-ms-/,H=/-([a-z])/g;function ge(o,d){return d.toUpperCase()}function me(o){return o.replace(j,"ms-").replace(H,ge)}var De=function(o){return o.nodeType===1||o.nodeType===9||!+o.nodeType};function ht(){this.expando=S.expando+ht.uid++}ht.uid=1,ht.prototype={cache:function(o){var d=o[this.expando];return d||(d={},De(o)&&(o.nodeType?o[this.expando]=d:Object.defineProperty(o,this.expando,{value:d,configurable:!0}))),d},set:function(o,d,w){var E,M=this.cache(o);if(typeof d=="string")M[me(d)]=w;else for(E in d)M[me(E)]=d[E];return M},get:function(o,d){return d===void 0?this.cache(o):o[this.expando]&&o[this.expando][me(d)]},access:function(o,d,w){return d===void 0||d&&typeof d=="string"&&w===void 0?this.get(o,d):(this.set(o,d,w),w!==void 0?w:d)},remove:function(o,d){var w,E=o[this.expando];if(E!==void 0){if(d!==void 0)for(Array.isArray(d)?d=d.map(me):(d=me(d),d=d in E?[d]:d.match(yt)||[]),w=d.length;w--;)delete E[d[w]];(d===void 0||S.isEmptyObject(E))&&(o.nodeType?o[this.expando]=void 0:delete o[this.expando])}},hasData:function(o){var d=o[this.expando];return d!==void 0&&!S.isEmptyObject(d)}};var rt=new ht,zt=new ht,fi=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,vi=/[A-Z]/g;function nn(o){return o==="true"?!0:o==="false"?!1:o==="null"?null:o===+o+""?+o:fi.test(o)?JSON.parse(o):o}function on(o,d,w){var E;if(w===void 0&&o.nodeType===1)if(E="data-"+d.replace(vi,"-$&").toLowerCase(),w=o.getAttribute(E),typeof w=="string"){try{w=nn(w)}catch{}zt.set(o,d,w)}else w=void 0;return w}S.extend({hasData:function(o){return zt.hasData(o)||rt.hasData(o)},data:function(o,d,w){return zt.access(o,d,w)},removeData:function(o,d){zt.remove(o,d)},_data:function(o,d,w){return rt.access(o,d,w)},_removeData:function(o,d){rt.remove(o,d)}}),S.fn.extend({data:function(o,d){var w,E,M,D=this[0],V=D&&D.attributes;if(o===void 0){if(this.length&&(M=zt.get(D),D.nodeType===1&&!rt.get(D,"hasDataAttrs"))){for(w=V.length;w--;)V[w]&&(E=V[w].name,E.indexOf("data-")===0&&(E=me(E.slice(5)),on(D,E,M[E])));rt.set(D,"hasDataAttrs",!0)}return M}return typeof o=="object"?this.each(function(){zt.set(this,o)}):p(this,function(fe){var le;if(D&&fe===void 0)return le=zt.get(D,o),le!==void 0||(le=on(D,o),le!==void 0)?le:void 0;this.each(function(){zt.set(this,o,fe)})},null,d,arguments.length>1,null,!0)},removeData:function(o){return this.each(function(){zt.remove(this,o)})}}),S.extend({queue:function(o,d,w){var E;if(o)return d=(d||"fx")+"queue",E=rt.get(o,d),w&&(!E||Array.isArray(w)?E=rt.access(o,d,S.makeArray(w)):E.push(w)),E||[]},dequeue:function(o,d){d=d||"fx";var w=S.queue(o,d),E=w.length,M=w.shift(),D=S._queueHooks(o,d),V=function(){S.dequeue(o,d)};M==="inprogress"&&(M=w.shift(),E--),M&&(d==="fx"&&w.unshift("inprogress"),delete D.stop,M.call(o,V,D)),!E&&D&&D.empty.fire()},_queueHooks:function(o,d){var w=d+"queueHooks";return rt.get(o,w)||rt.access(o,w,{empty:S.Callbacks("once memory").add(function(){rt.remove(o,[d+"queue",w])})})}}),S.fn.extend({queue:function(o,d){var w=2;return typeof o!="string"&&(d=o,o="fx",w--),arguments.length<w?S.queue(this[0],o):d===void 0?this:this.each(function(){var E=S.queue(this,o,d);S._queueHooks(this,o),o==="fx"&&E[0]!=="inprogress"&&S.dequeue(this,o)})},dequeue:function(o){return this.each(function(){S.dequeue(this,o)})},clearQueue:function(o){return this.queue(o||"fx",[])},promise:function(o,d){var w,E=1,M=S.Deferred(),D=this,V=this.length,fe=function(){--E||M.resolveWith(D,[D])};for(typeof o!="string"&&(d=o,o=void 0),o=o||"fx";V--;)w=rt.get(D[V],o+"queueHooks"),w&&w.empty&&(E++,w.empty.add(fe));return fe(),M.promise(d)}});var an=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,bn=new RegExp("^(?:([+-])=|)("+an+")([a-z%]*)$","i"),ln=["Top","Right","Bottom","Left"],Yi=W.documentElement,Fn=function(o){return S.contains(o.ownerDocument,o)},vr={composed:!0};Yi.getRootNode&&(Fn=function(o){return S.contains(o.ownerDocument,o)||o.getRootNode(vr)===o.ownerDocument});var Ln=function(o,d){return o=d||o,o.style.display==="none"||o.style.display===""&&Fn(o)&&S.css(o,"display")==="none"};function Gs(o,d,w,E){var M,D,V=20,fe=E?function(){return E.cur()}:function(){return S.css(o,d,"")},le=fe(),Me=w&&w[3]||(S.cssNumber[d]?"":"px"),Ze=o.nodeType&&(S.cssNumber[d]||Me!=="px"&&+le)&&bn.exec(S.css(o,d));if(Ze&&Ze[3]!==Me){for(le=le/2,Me=Me||Ze[3],Ze=+le||1;V--;)S.style(o,d,Ze+Me),(1-D)*(1-(D=fe()/le||.5))<=0&&(V=0),Ze=Ze/D;Ze=Ze*2,S.style(o,d,Ze+Me),w=w||[]}return w&&(Ze=+Ze||+le||0,M=w[1]?Ze+(w[1]+1)*w[2]:+w[2],E&&(E.unit=Me,E.start=Ze,E.end=M)),M}var js={};function os(o){var d,w=o.ownerDocument,E=o.nodeName,M=js[E];return M||(d=w.body.appendChild(w.createElement(E)),M=S.css(d,"display"),d.parentNode.removeChild(d),M==="none"&&(M="block"),js[E]=M,M)}function Es(o,d){for(var w,E,M=[],D=0,V=o.length;D<V;D++)E=o[D],E.style&&(w=E.style.display,d?(w==="none"&&(M[D]=rt.get(E,"display")||null,M[D]||(E.style.display="")),E.style.display===""&&Ln(E)&&(M[D]=os(E))):w!=="none"&&(M[D]="none",rt.set(E,"display",w)));for(D=0;D<V;D++)M[D]!=null&&(o[D].style.display=M[D]);return o}S.fn.extend({show:function(){return Es(this,!0)},hide:function(){return Es(this)},toggle:function(o){return typeof o=="boolean"?o?this.show():this.hide():this.each(function(){Ln(this)?S(this).show():S(this).hide()})}});var qs=/^(?:checkbox|radio)$/i,As=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i,Ys=/^$|^module$|\/(?:java|ecma)script/i;(function(){var o=W.createDocumentFragment(),d=o.appendChild(W.createElement("div")),w=W.createElement("input");w.setAttribute("type","radio"),w.setAttribute("checked","checked"),w.setAttribute("name","t"),d.appendChild(w),q.checkClone=d.cloneNode(!0).cloneNode(!0).lastChild.checked,d.innerHTML="<textarea>x</textarea>",q.noCloneChecked=!!d.cloneNode(!0).lastChild.defaultValue,d.innerHTML="<option></option>",q.option=!!d.lastChild})();var On={thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};On.tbody=On.tfoot=On.colgroup=On.caption=On.thead,On.th=On.td,q.option||(On.optgroup=On.option=[1,"<select multiple='multiple'>","</select>"]);function Tn(o,d){var w;return typeof o.getElementsByTagName<"u"?w=o.getElementsByTagName(d||"*"):typeof o.querySelectorAll<"u"?w=o.querySelectorAll(d||"*"):w=[],d===void 0||d&&ct(o,d)?S.merge([o],w):w}function jn(o,d){for(var w=0,E=o.length;w<E;w++)rt.set(o[w],"globalEval",!d||rt.get(d[w],"globalEval"))}var hn=/<|&#?\w+;/;function Ji(o,d,w,E,M){for(var D,V,fe,le,Me,Ze,Ae=d.createDocumentFragment(),ke=[],Tt=0,_i=o.length;Tt<_i;Tt++)if(D=o[Tt],D||D===0)if(st(D)==="object")S.merge(ke,D.nodeType?[D]:D);else if(!hn.test(D))ke.push(d.createTextNode(D));else{for(V=V||Ae.appendChild(d.createElement("div")),fe=(As.exec(D)||["",""])[1].toLowerCase(),le=On[fe]||On._default,V.innerHTML=le[1]+S.htmlPrefilter(D)+le[2],Ze=le[0];Ze--;)V=V.lastChild;S.merge(ke,V.childNodes),V=Ae.firstChild,V.textContent=""}for(Ae.textContent="",Tt=0;D=ke[Tt++];){if(E&&S.inArray(D,E)>-1){M&&M.push(D);continue}if(Me=Fn(D),V=Tn(Ae.appendChild(D),"script"),Me&&jn(V),w)for(Ze=0;D=V[Ze++];)Ys.test(D.type||"")&&w.push(D)}return Ae}var sn=/^([^.]*)(?:\.(.+)|)/;function mn(){return!0}function mi(){return!1}function Js(o,d,w,E,M,D){var V,fe;if(typeof d=="object"){typeof w!="string"&&(E=E||w,w=void 0);for(fe in d)Js(o,fe,w,E,d[fe],D);return o}if(E==null&&M==null?(M=w,E=w=void 0):M==null&&(typeof w=="string"?(M=E,E=void 0):(M=E,E=w,w=void 0)),M===!1)M=mi;else if(!M)return o;return D===1&&(V=M,M=function(le){return S().off(le),V.apply(this,arguments)},M.guid=V.guid||(V.guid=S.guid++)),o.each(function(){S.event.add(this,d,M,E,w)})}S.event={global:{},add:function(o,d,w,E,M){var D,V,fe,le,Me,Ze,Ae,ke,Tt,_i,$i,Ei=rt.get(o);if(De(o))for(w.handler&&(D=w,w=D.handler,M=D.selector),M&&S.find.matchesSelector(Yi,M),w.guid||(w.guid=S.guid++),(le=Ei.events)||(le=Ei.events=Object.create(null)),(V=Ei.handle)||(V=Ei.handle=function(In){return typeof S<"u"&&S.event.triggered!==In.type?S.event.dispatch.apply(o,arguments):void 0}),d=(d||"").match(yt)||[""],Me=d.length;Me--;)fe=sn.exec(d[Me])||[],Tt=$i=fe[1],_i=(fe[2]||"").split(".").sort(),Tt&&(Ae=S.event.special[Tt]||{},Tt=(M?Ae.delegateType:Ae.bindType)||Tt,Ae=S.event.special[Tt]||{},Ze=S.extend({type:Tt,origType:$i,data:E,handler:w,guid:w.guid,selector:M,needsContext:M&&S.expr.match.needsContext.test(M),namespace:_i.join(".")},D),(ke=le[Tt])||(ke=le[Tt]=[],ke.delegateCount=0,(!Ae.setup||Ae.setup.call(o,E,_i,V)===!1)&&o.addEventListener&&o.addEventListener(Tt,V)),Ae.add&&(Ae.add.call(o,Ze),Ze.handler.guid||(Ze.handler.guid=w.guid)),M?ke.splice(ke.delegateCount++,0,Ze):ke.push(Ze),S.event.global[Tt]=!0)},remove:function(o,d,w,E,M){var D,V,fe,le,Me,Ze,Ae,ke,Tt,_i,$i,Ei=rt.hasData(o)&&rt.get(o);if(!(!Ei||!(le=Ei.events))){for(d=(d||"").match(yt)||[""],Me=d.length;Me--;){if(fe=sn.exec(d[Me])||[],Tt=$i=fe[1],_i=(fe[2]||"").split(".").sort(),!Tt){for(Tt in le)S.event.remove(o,Tt+d[Me],w,E,!0);continue}for(Ae=S.event.special[Tt]||{},Tt=(E?Ae.delegateType:Ae.bindType)||Tt,ke=le[Tt]||[],fe=fe[2]&&new RegExp("(^|\\.)"+_i.join("\\.(?:.*\\.|)")+"(\\.|$)"),V=D=ke.length;D--;)Ze=ke[D],(M||$i===Ze.origType)&&(!w||w.guid===Ze.guid)&&(!fe||fe.test(Ze.namespace))&&(!E||E===Ze.selector||E==="**"&&Ze.selector)&&(ke.splice(D,1),Ze.selector&&ke.delegateCount--,Ae.remove&&Ae.remove.call(o,Ze));V&&!ke.length&&((!Ae.teardown||Ae.teardown.call(o,_i,Ei.handle)===!1)&&S.removeEvent(o,Tt,Ei.handle),delete le[Tt])}S.isEmptyObject(le)&&rt.remove(o,"handle events")}},dispatch:function(o){var d,w,E,M,D,V,fe=new Array(arguments.length),le=S.event.fix(o),Me=(rt.get(this,"events")||Object.create(null))[le.type]||[],Ze=S.event.special[le.type]||{};for(fe[0]=le,d=1;d<arguments.length;d++)fe[d]=arguments[d];if(le.delegateTarget=this,!(Ze.preDispatch&&Ze.preDispatch.call(this,le)===!1)){for(V=S.event.handlers.call(this,le,Me),d=0;(M=V[d++])&&!le.isPropagationStopped();)for(le.currentTarget=M.elem,w=0;(D=M.handlers[w++])&&!le.isImmediatePropagationStopped();)(!le.rnamespace||D.namespace===!1||le.rnamespace.test(D.namespace))&&(le.handleObj=D,le.data=D.data,E=((S.event.special[D.origType]||{}).handle||D.handler).apply(M.elem,fe),E!==void 0&&(le.result=E)===!1&&(le.preventDefault(),le.stopPropagation()));return Ze.postDispatch&&Ze.postDispatch.call(this,le),le.result}},handlers:function(o,d){var w,E,M,D,V,fe=[],le=d.delegateCount,Me=o.target;if(le&&Me.nodeType&&!(o.type==="click"&&o.button>=1)){for(;Me!==this;Me=Me.parentNode||this)if(Me.nodeType===1&&!(o.type==="click"&&Me.disabled===!0)){for(D=[],V={},w=0;w<le;w++)E=d[w],M=E.selector+" ",V[M]===void 0&&(V[M]=E.needsContext?S(M,this).index(Me)>-1:S.find(M,this,null,[Me]).length),V[M]&&D.push(E);D.length&&fe.push({elem:Me,handlers:D})}}return Me=this,le<d.length&&fe.push({elem:Me,handlers:d.slice(le)}),fe},addProp:function(o,d){Object.defineProperty(S.Event.prototype,o,{enumerable:!0,configurable:!0,get:ne(d)?function(){if(this.originalEvent)return d(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[o]},set:function(w){Object.defineProperty(this,o,{enumerable:!0,configurable:!0,writable:!0,value:w})}})},fix:function(o){return o[S.expando]?o:new S.Event(o)},special:{load:{noBubble:!0},click:{setup:function(o){var d=this||o;return qs.test(d.type)&&d.click&&ct(d,"input")&&Ri(d,"click",!0),!1},trigger:function(o){var d=this||o;return qs.test(d.type)&&d.click&&ct(d,"input")&&Ri(d,"click"),!0},_default:function(o){var d=o.target;return qs.test(d.type)&&d.click&&ct(d,"input")&&rt.get(d,"click")||ct(d,"a")}},beforeunload:{postDispatch:function(o){o.result!==void 0&&o.originalEvent&&(o.originalEvent.returnValue=o.result)}}}};function Ri(o,d,w){if(!w){rt.get(o,d)===void 0&&S.event.add(o,d,mn);return}rt.set(o,d,!1),S.event.add(o,d,{namespace:!1,handler:function(E){var M,D=rt.get(this,d);if(E.isTrigger&1&&this[d]){if(D)(S.event.special[d]||{}).delegateType&&E.stopPropagation();else if(D=Z.call(arguments),rt.set(this,d,D),this[d](),M=rt.get(this,d),rt.set(this,d,!1),D!==M)return E.stopImmediatePropagation(),E.preventDefault(),M}else D&&(rt.set(this,d,S.event.trigger(D[0],D.slice(1),this)),E.stopPropagation(),E.isImmediatePropagationStopped=mn)}})}S.removeEvent=function(o,d,w){o.removeEventListener&&o.removeEventListener(d,w)},S.Event=function(o,d){if(!(this instanceof S.Event))return new S.Event(o,d);o&&o.type?(this.originalEvent=o,this.type=o.type,this.isDefaultPrevented=o.defaultPrevented||o.defaultPrevented===void 0&&o.returnValue===!1?mn:mi,this.target=o.target&&o.target.nodeType===3?o.target.parentNode:o.target,this.currentTarget=o.currentTarget,this.relatedTarget=o.relatedTarget):this.type=o,d&&S.extend(this,d),this.timeStamp=o&&o.timeStamp||Date.now(),this[S.expando]=!0},S.Event.prototype={constructor:S.Event,isDefaultPrevented:mi,isPropagationStopped:mi,isImmediatePropagationStopped:mi,isSimulated:!1,preventDefault:function(){var o=this.originalEvent;this.isDefaultPrevented=mn,o&&!this.isSimulated&&o.preventDefault()},stopPropagation:function(){var o=this.originalEvent;this.isPropagationStopped=mn,o&&!this.isSimulated&&o.stopPropagation()},stopImmediatePropagation:function(){var o=this.originalEvent;this.isImmediatePropagationStopped=mn,o&&!this.isSimulated&&o.stopImmediatePropagation(),this.stopPropagation()}},S.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,char:!0,code:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:!0},S.event.addProp),S.each({focus:"focusin",blur:"focusout"},function(o,d){function w(E){if(W.documentMode){var M=rt.get(this,"handle"),D=S.event.fix(E);D.type=E.type==="focusin"?"focus":"blur",D.isSimulated=!0,M(E),D.target===D.currentTarget&&M(D)}else S.event.simulate(d,E.target,S.event.fix(E))}S.event.special[o]={setup:function(){var E;if(Ri(this,o,!0),W.documentMode)E=rt.get(this,d),E||this.addEventListener(d,w),rt.set(this,d,(E||0)+1);else return!1},trigger:function(){return Ri(this,o),!0},teardown:function(){var E;if(W.documentMode)E=rt.get(this,d)-1,E?rt.set(this,d,E):(this.removeEventListener(d,w),rt.remove(this,d));else return!1},_default:function(E){return rt.get(E.target,o)},delegateType:d},S.event.special[d]={setup:function(){var E=this.ownerDocument||this.document||this,M=W.documentMode?this:E,D=rt.get(M,d);D||(W.documentMode?this.addEventListener(d,w):E.addEventListener(o,w,!0)),rt.set(M,d,(D||0)+1)},teardown:function(){var E=this.ownerDocument||this.document||this,M=W.documentMode?this:E,D=rt.get(M,d)-1;D?rt.set(M,d,D):(W.documentMode?this.removeEventListener(d,w):E.removeEventListener(o,w,!0),rt.remove(M,d))}}}),S.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(o,d){S.event.special[o]={delegateType:d,bindType:d,handle:function(w){var E,M=this,D=w.relatedTarget,V=w.handleObj;return(!D||D!==M&&!S.contains(M,D))&&(w.type=V.origType,E=V.handler.apply(this,arguments),w.type=d),E}}}),S.fn.extend({on:function(o,d,w,E){return Js(this,o,d,w,E)},one:function(o,d,w,E){return Js(this,o,d,w,E,1)},off:function(o,d,w){var E,M;if(o&&o.preventDefault&&o.handleObj)return E=o.handleObj,S(o.delegateTarget).off(E.namespace?E.origType+"."+E.namespace:E.origType,E.selector,E.handler),this;if(typeof o=="object"){for(M in o)this.off(M,d,o[M]);return this}return(d===!1||typeof d=="function")&&(w=d,d=void 0),w===!1&&(w=mi),this.each(function(){S.event.remove(this,o,w,d)})}});var Rr=/<script|<style|<link/i,En=/checked\s*(?:[^=]|=\s*.checked.)/i,Mr=/^\s*<!\[CDATA\[|\]\]>\s*$/g;function Ps(o,d){return ct(o,"table")&&ct(d.nodeType!==11?d:d.firstChild,"tr")&&S(o).children("tbody")[0]||o}function br(o){return o.type=(o.getAttribute("type")!==null)+"/"+o.type,o}function qe(o){return(o.type||"").slice(0,5)==="true/"?o.type=o.type.slice(5):o.removeAttribute("type"),o}function bt(o,d){var w,E,M,D,V,fe,le;if(d.nodeType===1){if(rt.hasData(o)&&(D=rt.get(o),le=D.events,le)){rt.remove(d,"handle events");for(M in le)for(w=0,E=le[M].length;w<E;w++)S.event.add(d,M,le[M][w])}zt.hasData(o)&&(V=zt.access(o),fe=S.extend({},V),zt.set(d,fe))}}function Rt(o,d){var w=d.nodeName.toLowerCase();w==="input"&&qs.test(o.type)?d.checked=o.checked:(w==="input"||w==="textarea")&&(d.defaultValue=o.defaultValue)}function Yt(o,d,w,E){d=C(d);var M,D,V,fe,le,Me,Ze=0,Ae=o.length,ke=Ae-1,Tt=d[0],_i=ne(Tt);if(_i||Ae>1&&typeof Tt=="string"&&!q.checkClone&&En.test(Tt))return o.each(function($i){var Ei=o.eq($i);_i&&(d[0]=Tt.call(this,$i,Ei.html())),Yt(Ei,d,w,E)});if(Ae&&(M=Ji(d,o[0].ownerDocument,!1,o,E),D=M.firstChild,M.childNodes.length===1&&(M=D),D||E)){for(V=S.map(Tn(M,"script"),br),fe=V.length;Ze<Ae;Ze++)le=M,Ze!==ke&&(le=S.clone(le,!0,!0),fe&&S.merge(V,Tn(le,"script"))),w.call(o[Ze],le,Ze);if(fe)for(Me=V[V.length-1].ownerDocument,S.map(V,qe),Ze=0;Ze<fe;Ze++)le=V[Ze],Ys.test(le.type||"")&&!rt.access(le,"globalEval")&&S.contains(Me,le)&&(le.src&&(le.type||"").toLowerCase()!=="module"?S._evalUrl&&!le.noModule&&S._evalUrl(le.src,{nonce:le.nonce||le.getAttribute("nonce")},Me):tt(le.textContent.replace(Mr,""),le,Me))}return o}function Ui(o,d,w){for(var E,M=d?S.filter(d,o):o,D=0;(E=M[D])!=null;D++)!w&&E.nodeType===1&&S.cleanData(Tn(E)),E.parentNode&&(w&&Fn(E)&&jn(Tn(E,"script")),E.parentNode.removeChild(E));return o}S.extend({htmlPrefilter:function(o){return o},clone:function(o,d,w){var E,M,D,V,fe=o.cloneNode(!0),le=Fn(o);if(!q.noCloneChecked&&(o.nodeType===1||o.nodeType===11)&&!S.isXMLDoc(o))for(V=Tn(fe),D=Tn(o),E=0,M=D.length;E<M;E++)Rt(D[E],V[E]);if(d)if(w)for(D=D||Tn(o),V=V||Tn(fe),E=0,M=D.length;E<M;E++)bt(D[E],V[E]);else bt(o,fe);return V=Tn(fe,"script"),V.length>0&&jn(V,!le&&Tn(o,"script")),fe},cleanData:function(o){for(var d,w,E,M=S.event.special,D=0;(w=o[D])!==void 0;D++)if(De(w)){if(d=w[rt.expando]){if(d.events)for(E in d.events)M[E]?S.event.remove(w,E):S.removeEvent(w,E,d.handle);w[rt.expando]=void 0}w[zt.expando]&&(w[zt.expando]=void 0)}}}),S.fn.extend({detach:function(o){return Ui(this,o,!0)},remove:function(o){return Ui(this,o)},text:function(o){return p(this,function(d){return d===void 0?S.text(this):this.empty().each(function(){(this.nodeType===1||this.nodeType===11||this.nodeType===9)&&(this.textContent=d)})},null,o,arguments.length)},append:function(){return Yt(this,arguments,function(o){if(this.nodeType===1||this.nodeType===11||this.nodeType===9){var d=Ps(this,o);d.appendChild(o)}})},prepend:function(){return Yt(this,arguments,function(o){if(this.nodeType===1||this.nodeType===11||this.nodeType===9){var d=Ps(this,o);d.insertBefore(o,d.firstChild)}})},before:function(){return Yt(this,arguments,function(o){this.parentNode&&this.parentNode.insertBefore(o,this)})},after:function(){return Yt(this,arguments,function(o){this.parentNode&&this.parentNode.insertBefore(o,this.nextSibling)})},empty:function(){for(var o,d=0;(o=this[d])!=null;d++)o.nodeType===1&&(S.cleanData(Tn(o,!1)),o.textContent="");return this},clone:function(o,d){return o=o??!1,d=d??o,this.map(function(){return S.clone(this,o,d)})},html:function(o){return p(this,function(d){var w=this[0]||{},E=0,M=this.length;if(d===void 0&&w.nodeType===1)return w.innerHTML;if(typeof d=="string"&&!Rr.test(d)&&!On[(As.exec(d)||["",""])[1].toLowerCase()]){d=S.htmlPrefilter(d);try{for(;E<M;E++)w=this[E]||{},w.nodeType===1&&(S.cleanData(Tn(w,!1)),w.innerHTML=d);w=0}catch{}}w&&this.empty().append(d)},null,o,arguments.length)},replaceWith:function(){var o=[];return Yt(this,arguments,function(d){var w=this.parentNode;S.inArray(this,o)<0&&(S.cleanData(Tn(this)),w&&w.replaceChild(d,this))},o)}}),S.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(o,d){S.fn[o]=function(w){for(var E,M=[],D=S(w),V=D.length-1,fe=0;fe<=V;fe++)E=fe===V?this:this.clone(!0),S(D[fe])[d](E),we.apply(M,E.get());return this.pushStack(M)}});var Bi=new RegExp("^("+an+")(?!px)[a-z%]+$","i"),An=/^--/,cn=function(o){var d=o.ownerDocument.defaultView;return(!d||!d.opener)&&(d=g),d.getComputedStyle(o)},pn=function(o,d,w){var E,M,D={};for(M in d)D[M]=o.style[M],o.style[M]=d[M];E=w.call(o);for(M in d)o.style[M]=D[M];return E},Br=new RegExp(ln.join("|"),"i");(function(){function o(){if(Me){le.style.cssText="position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0",Me.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%",Yi.appendChild(le).appendChild(Me);var Ze=g.getComputedStyle(Me);w=Ze.top!=="1%",fe=d(Ze.marginLeft)===12,Me.style.right="60%",D=d(Ze.right)===36,E=d(Ze.width)===36,Me.style.position="absolute",M=d(Me.offsetWidth/3)===12,Yi.removeChild(le),Me=null}}function d(Ze){return Math.round(parseFloat(Ze))}var w,E,M,D,V,fe,le=W.createElement("div"),Me=W.createElement("div");Me.style&&(Me.style.backgroundClip="content-box",Me.cloneNode(!0).style.backgroundClip="",q.clearCloneStyle=Me.style.backgroundClip==="content-box",S.extend(q,{boxSizingReliable:function(){return o(),E},pixelBoxStyles:function(){return o(),D},pixelPosition:function(){return o(),w},reliableMarginLeft:function(){return o(),fe},scrollboxSize:function(){return o(),M},reliableTrDimensions:function(){var Ze,Ae,ke,Tt;return V==null&&(Ze=W.createElement("table"),Ae=W.createElement("tr"),ke=W.createElement("div"),Ze.style.cssText="position:absolute;left:-11111px;border-collapse:separate",Ae.style.cssText="box-sizing:content-box;border:1px solid",Ae.style.height="1px",ke.style.height="9px",ke.style.display="block",Yi.appendChild(Ze).appendChild(Ae).appendChild(ke),Tt=g.getComputedStyle(Ae),V=parseInt(Tt.height,10)+parseInt(Tt.borderTopWidth,10)+parseInt(Tt.borderBottomWidth,10)===Ae.offsetHeight,Yi.removeChild(Ze)),V}}))})();function Cn(o,d,w){var E,M,D,V,fe=An.test(d),le=o.style;return w=w||cn(o),w&&(V=w.getPropertyValue(d)||w[d],fe&&V&&(V=V.replace(k,"$1")||void 0),V===""&&!Fn(o)&&(V=S.style(o,d)),!q.pixelBoxStyles()&&Bi.test(V)&&Br.test(d)&&(E=le.width,M=le.minWidth,D=le.maxWidth,le.minWidth=le.maxWidth=le.width=V,V=w.width,le.width=E,le.minWidth=M,le.maxWidth=D)),V!==void 0?V+"":V}function Rn(o,d){return{get:function(){if(o()){delete this.get;return}return(this.get=d).apply(this,arguments)}}}var ys=["Webkit","Moz","ms"],Cs=W.createElement("div").style,Qr={};function wa(o){for(var d=o[0].toUpperCase()+o.slice(1),w=ys.length;w--;)if(o=ys[w]+d,o in Cs)return o}function _r(o){var d=S.cssProps[o]||Qr[o];return d||(o in Cs?o:Qr[o]=wa(o)||o)}var ks=/^(none|table(?!-c[ea]).+)/,Io={position:"absolute",visibility:"hidden",display:"block"},$r={letterSpacing:"0",fontWeight:"400"};function Zs(o,d,w){var E=bn.exec(d);return E?Math.max(0,E[2]-(w||0))+(E[3]||"px"):d}function Yn(o,d,w,E,M,D){var V=d==="width"?1:0,fe=0,le=0,Me=0;if(w===(E?"border":"content"))return 0;for(;V<4;V+=2)w==="margin"&&(Me+=S.css(o,w+ln[V],!0,M)),E?(w==="content"&&(le-=S.css(o,"padding"+ln[V],!0,M)),w!=="margin"&&(le-=S.css(o,"border"+ln[V]+"Width",!0,M))):(le+=S.css(o,"padding"+ln[V],!0,M),w!=="padding"?le+=S.css(o,"border"+ln[V]+"Width",!0,M):fe+=S.css(o,"border"+ln[V]+"Width",!0,M));return!E&&D>=0&&(le+=Math.max(0,Math.ceil(o["offset"+d[0].toUpperCase()+d.slice(1)]-D-le-fe-.5))||0),le+Me}function mo(o,d,w){var E=cn(o),M=!q.boxSizingReliable()||w,D=M&&S.css(o,"boxSizing",!1,E)==="border-box",V=D,fe=Cn(o,d,E),le="offset"+d[0].toUpperCase()+d.slice(1);if(Bi.test(fe)){if(!w)return fe;fe="auto"}return(!q.boxSizingReliable()&&D||!q.reliableTrDimensions()&&ct(o,"tr")||fe==="auto"||!parseFloat(fe)&&S.css(o,"display",!1,E)==="inline")&&o.getClientRects().length&&(D=S.css(o,"boxSizing",!1,E)==="border-box",V=le in o,V&&(fe=o[le])),fe=parseFloat(fe)||0,fe+Yn(o,d,w||(D?"border":"content"),V,E,fe)+"px"}S.extend({cssHooks:{opacity:{get:function(o,d){if(d){var w=Cn(o,"opacity");return w===""?"1":w}}}},cssNumber:{animationIterationCount:!0,aspectRatio:!0,borderImageSlice:!0,columnCount:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,scale:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeMiterlimit:!0,strokeOpacity:!0},cssProps:{},style:function(o,d,w,E){if(!(!o||o.nodeType===3||o.nodeType===8||!o.style)){var M,D,V,fe=me(d),le=An.test(d),Me=o.style;if(le||(d=_r(fe)),V=S.cssHooks[d]||S.cssHooks[fe],w!==void 0){if(D=typeof w,D==="string"&&(M=bn.exec(w))&&M[1]&&(w=Gs(o,d,M),D="number"),w==null||w!==w)return;D==="number"&&!le&&(w+=M&&M[3]||(S.cssNumber[fe]?"":"px")),!q.clearCloneStyle&&w===""&&d.indexOf("background")===0&&(Me[d]="inherit"),(!V||!("set"in V)||(w=V.set(o,w,E))!==void 0)&&(le?Me.setProperty(d,w):Me[d]=w)}else return V&&"get"in V&&(M=V.get(o,!1,E))!==void 0?M:Me[d]}},css:function(o,d,w,E){var M,D,V,fe=me(d),le=An.test(d);return le||(d=_r(fe)),V=S.cssHooks[d]||S.cssHooks[fe],V&&"get"in V&&(M=V.get(o,!0,w)),M===void 0&&(M=Cn(o,d,E)),M==="normal"&&d in $r&&(M=$r[d]),w===""||w?(D=parseFloat(M),w===!0||isFinite(D)?D||0:M):M}}),S.each(["height","width"],function(o,d){S.cssHooks[d]={get:function(w,E,M){if(E)return ks.test(S.css(w,"display"))&&(!w.getClientRects().length||!w.getBoundingClientRect().width)?pn(w,Io,function(){return mo(w,d,M)}):mo(w,d,M)},set:function(w,E,M){var D,V=cn(w),fe=!q.scrollboxSize()&&V.position==="absolute",le=fe||M,Me=le&&S.css(w,"boxSizing",!1,V)==="border-box",Ze=M?Yn(w,d,M,Me,V):0;return Me&&fe&&(Ze-=Math.ceil(w["offset"+d[0].toUpperCase()+d.slice(1)]-parseFloat(V[d])-Yn(w,d,"border",!1,V)-.5)),Ze&&(D=bn.exec(E))&&(D[3]||"px")!=="px"&&(w.style[d]=E,E=S.css(w,d)),Zs(w,E,Ze)}}}),S.cssHooks.marginLeft=Rn(q.reliableMarginLeft,function(o,d){if(d)return(parseFloat(Cn(o,"marginLeft"))||o.getBoundingClientRect().left-pn(o,{marginLeft:0},function(){return o.getBoundingClientRect().left}))+"px"}),S.each({margin:"",padding:"",border:"Width"},function(o,d){S.cssHooks[o+d]={expand:function(w){for(var E=0,M={},D=typeof w=="string"?w.split(" "):[w];E<4;E++)M[o+ln[E]+d]=D[E]||D[E-2]||D[0];return M}},o!=="margin"&&(S.cssHooks[o+d].set=Zs)}),S.fn.extend({css:function(o,d){return p(this,function(w,E,M){var D,V,fe={},le=0;if(Array.isArray(E)){for(D=cn(w),V=E.length;le<V;le++)fe[E[le]]=S.css(w,E[le],!1,D);return fe}return M!==void 0?S.style(w,E,M):S.css(w,E)},o,d,arguments.length>1)}});function Vn(o,d,w,E,M){return new Vn.prototype.init(o,d,w,E,M)}S.Tween=Vn,Vn.prototype={constructor:Vn,init:function(o,d,w,E,M,D){this.elem=o,this.prop=w,this.easing=M||S.easing._default,this.options=d,this.start=this.now=this.cur(),this.end=E,this.unit=D||(S.cssNumber[w]?"":"px")},cur:function(){var o=Vn.propHooks[this.prop];return o&&o.get?o.get(this):Vn.propHooks._default.get(this)},run:function(o){var d,w=Vn.propHooks[this.prop];return this.options.duration?this.pos=d=S.easing[this.easing](o,this.options.duration*o,0,1,this.options.duration):this.pos=d=o,this.now=(this.end-this.start)*d+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),w&&w.set?w.set(this):Vn.propHooks._default.set(this),this}},Vn.prototype.init.prototype=Vn.prototype,Vn.propHooks={_default:{get:function(o){var d;return o.elem.nodeType!==1||o.elem[o.prop]!=null&&o.elem.style[o.prop]==null?o.elem[o.prop]:(d=S.css(o.elem,o.prop,""),!d||d==="auto"?0:d)},set:function(o){S.fx.step[o.prop]?S.fx.step[o.prop](o):o.elem.nodeType===1&&(S.cssHooks[o.prop]||o.elem.style[_r(o.prop)]!=null)?S.style(o.elem,o.prop,o.now+o.unit):o.elem[o.prop]=o.now}}},Vn.propHooks.scrollTop=Vn.propHooks.scrollLeft={set:function(o){o.elem.nodeType&&o.elem.parentNode&&(o.elem[o.prop]=o.now)}},S.easing={linear:function(o){return o},swing:function(o){return .5-Math.cos(o*Math.PI)/2},_default:"swing"},S.fx=Vn.prototype.init,S.fx.step={};var er,Di,B=/^(?:toggle|show|hide)$/,se=/queueHooks$/;function ue(){Di&&(W.hidden===!1&&g.requestAnimationFrame?g.requestAnimationFrame(ue):g.setTimeout(ue,S.fx.interval),S.fx.tick())}function Je(){return g.setTimeout(function(){er=void 0}),er=Date.now()}function Qe(o,d){var w,E=0,M={height:o};for(d=d?1:0;E<4;E+=2-d)w=ln[E],M["margin"+w]=M["padding"+w]=o;return d&&(M.opacity=M.width=o),M}function Ft(o,d,w){for(var E,M=(ri.tweeners[d]||[]).concat(ri.tweeners["*"]),D=0,V=M.length;D<V;D++)if(E=M[D].call(w,d,o))return E}function Gt(o,d,w){var E,M,D,V,fe,le,Me,Ze,Ae="width"in d||"height"in d,ke=this,Tt={},_i=o.style,$i=o.nodeType&&Ln(o),Ei=rt.get(o,"fxshow");w.queue||(V=S._queueHooks(o,"fx"),V.unqueued==null&&(V.unqueued=0,fe=V.empty.fire,V.empty.fire=function(){V.unqueued||fe()}),V.unqueued++,ke.always(function(){ke.always(function(){V.unqueued--,S.queue(o,"fx").length||V.empty.fire()})}));for(E in d)if(M=d[E],B.test(M)){if(delete d[E],D=D||M==="toggle",M===($i?"hide":"show"))if(M==="show"&&Ei&&Ei[E]!==void 0)$i=!0;else continue;Tt[E]=Ei&&Ei[E]||S.style(o,E)}if(le=!S.isEmptyObject(d),!(!le&&S.isEmptyObject(Tt))){Ae&&o.nodeType===1&&(w.overflow=[_i.overflow,_i.overflowX,_i.overflowY],Me=Ei&&Ei.display,Me==null&&(Me=rt.get(o,"display")),Ze=S.css(o,"display"),Ze==="none"&&(Me?Ze=Me:(Es([o],!0),Me=o.style.display||Me,Ze=S.css(o,"display"),Es([o]))),(Ze==="inline"||Ze==="inline-block"&&Me!=null)&&S.css(o,"float")==="none"&&(le||(ke.done(function(){_i.display=Me}),Me==null&&(Ze=_i.display,Me=Ze==="none"?"":Ze)),_i.display="inline-block")),w.overflow&&(_i.overflow="hidden",ke.always(function(){_i.overflow=w.overflow[0],_i.overflowX=w.overflow[1],_i.overflowY=w.overflow[2]})),le=!1;for(E in Tt)le||(Ei?"hidden"in Ei&&($i=Ei.hidden):Ei=rt.access(o,"fxshow",{display:Me}),D&&(Ei.hidden=!$i),$i&&Es([o],!0),ke.done(function(){$i||Es([o]),rt.remove(o,"fxshow");for(E in Tt)S.style(o,E,Tt[E])})),le=Ft($i?Ei[E]:0,E,ke),E in Ei||(Ei[E]=le.start,$i&&(le.end=le.start,le.start=0))}}function Jt(o,d){var w,E,M,D,V;for(w in o)if(E=me(w),M=d[E],D=o[w],Array.isArray(D)&&(M=D[1],D=o[w]=D[0]),w!==E&&(o[E]=D,delete o[w]),V=S.cssHooks[E],V&&"expand"in V){D=V.expand(D),delete o[E];for(w in D)w in o||(o[w]=D[w],d[w]=M)}else d[E]=M}function ri(o,d,w){var E,M,D=0,V=ri.prefilters.length,fe=S.Deferred().always(function(){delete le.elem}),le=function(){if(M)return!1;for(var Ae=er||Je(),ke=Math.max(0,Me.startTime+Me.duration-Ae),Tt=ke/Me.duration||0,_i=1-Tt,$i=0,Ei=Me.tweens.length;$i<Ei;$i++)Me.tweens[$i].run(_i);return fe.notifyWith(o,[Me,_i,ke]),_i<1&&Ei?ke:(Ei||fe.notifyWith(o,[Me,1,0]),fe.resolveWith(o,[Me]),!1)},Me=fe.promise({elem:o,props:S.extend({},d),opts:S.extend(!0,{specialEasing:{},easing:S.easing._default},w),originalProperties:d,originalOptions:w,startTime:er||Je(),duration:w.duration,tweens:[],createTween:function(Ae,ke){var Tt=S.Tween(o,Me.opts,Ae,ke,Me.opts.specialEasing[Ae]||Me.opts.easing);return Me.tweens.push(Tt),Tt},stop:function(Ae){var ke=0,Tt=Ae?Me.tweens.length:0;if(M)return this;for(M=!0;ke<Tt;ke++)Me.tweens[ke].run(1);return Ae?(fe.notifyWith(o,[Me,1,0]),fe.resolveWith(o,[Me,Ae])):fe.rejectWith(o,[Me,Ae]),this}}),Ze=Me.props;for(Jt(Ze,Me.opts.specialEasing);D<V;D++)if(E=ri.prefilters[D].call(Me,o,Ze,Me.opts),E)return ne(E.stop)&&(S._queueHooks(Me.elem,Me.opts.queue).stop=E.stop.bind(E)),E;return S.map(Ze,Ft,Me),ne(Me.opts.start)&&Me.opts.start.call(o,Me),Me.progress(Me.opts.progress).done(Me.opts.done,Me.opts.complete).fail(Me.opts.fail).always(Me.opts.always),S.fx.timer(S.extend(le,{elem:o,anim:Me,queue:Me.opts.queue})),Me}S.Animation=S.extend(ri,{tweeners:{"*":[function(o,d){var w=this.createTween(o,d);return Gs(w.elem,o,bn.exec(d),w),w}]},tweener:function(o,d){ne(o)?(d=o,o=["*"]):o=o.match(yt);for(var w,E=0,M=o.length;E<M;E++)w=o[E],ri.tweeners[w]=ri.tweeners[w]||[],ri.tweeners[w].unshift(d)},prefilters:[Gt],prefilter:function(o,d){d?ri.prefilters.unshift(o):ri.prefilters.push(o)}}),S.speed=function(o,d,w){var E=o&&typeof o=="object"?S.extend({},o):{complete:w||!w&&d||ne(o)&&o,duration:o,easing:w&&d||d&&!ne(d)&&d};return S.fx.off?E.duration=0:typeof E.duration!="number"&&(E.duration in S.fx.speeds?E.duration=S.fx.speeds[E.duration]:E.duration=S.fx.speeds._default),(E.queue==null||E.queue===!0)&&(E.queue="fx"),E.old=E.complete,E.complete=function(){ne(E.old)&&E.old.call(this),E.queue&&S.dequeue(this,E.queue)},E},S.fn.extend({fadeTo:function(o,d,w,E){return this.filter(Ln).css("opacity",0).show().end().animate({opacity:d},o,w,E)},animate:function(o,d,w,E){var M=S.isEmptyObject(o),D=S.speed(d,w,E),V=function(){var fe=ri(this,S.extend({},o),D);(M||rt.get(this,"finish"))&&fe.stop(!0)};return V.finish=V,M||D.queue===!1?this.each(V):this.queue(D.queue,V)},stop:function(o,d,w){var E=function(M){var D=M.stop;delete M.stop,D(w)};return typeof o!="string"&&(w=d,d=o,o=void 0),d&&this.queue(o||"fx",[]),this.each(function(){var M=!0,D=o!=null&&o+"queueHooks",V=S.timers,fe=rt.get(this);if(D)fe[D]&&fe[D].stop&&E(fe[D]);else for(D in fe)fe[D]&&fe[D].stop&&se.test(D)&&E(fe[D]);for(D=V.length;D--;)V[D].elem===this&&(o==null||V[D].queue===o)&&(V[D].anim.stop(w),M=!1,V.splice(D,1));(M||!w)&&S.dequeue(this,o)})},finish:function(o){return o!==!1&&(o=o||"fx"),this.each(function(){var d,w=rt.get(this),E=w[o+"queue"],M=w[o+"queueHooks"],D=S.timers,V=E?E.length:0;for(w.finish=!0,S.queue(this,o,[]),M&&M.stop&&M.stop.call(this,!0),d=D.length;d--;)D[d].elem===this&&D[d].queue===o&&(D[d].anim.stop(!0),D.splice(d,1));for(d=0;d<V;d++)E[d]&&E[d].finish&&E[d].finish.call(this);delete w.finish})}}),S.each(["toggle","show","hide"],function(o,d){var w=S.fn[d];S.fn[d]=function(E,M,D){return E==null||typeof E=="boolean"?w.apply(this,arguments):this.animate(Qe(d,!0),E,M,D)}}),S.each({slideDown:Qe("show"),slideUp:Qe("hide"),slideToggle:Qe("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(o,d){S.fn[o]=function(w,E,M){return this.animate(d,w,E,M)}}),S.timers=[],S.fx.tick=function(){var o,d=0,w=S.timers;for(er=Date.now();d<w.length;d++)o=w[d],!o()&&w[d]===o&&w.splice(d--,1);w.length||S.fx.stop(),er=void 0},S.fx.timer=function(o){S.timers.push(o),S.fx.start()},S.fx.interval=13,S.fx.start=function(){Di||(Di=!0,ue())},S.fx.stop=function(){Di=null},S.fx.speeds={slow:600,fast:200,_default:400},S.fn.delay=function(o,d){return o=S.fx&&S.fx.speeds[o]||o,d=d||"fx",this.queue(d,function(w,E){var M=g.setTimeout(w,o);E.stop=function(){g.clearTimeout(M)}})},function(){var o=W.createElement("input"),d=W.createElement("select"),w=d.appendChild(W.createElement("option"));o.type="checkbox",q.checkOn=o.value!=="",q.optSelected=w.selected,o=W.createElement("input"),o.value="t",o.type="radio",q.radioValue=o.value==="t"}();var Ai,Ki=S.expr.attrHandle;S.fn.extend({attr:function(o,d){return p(this,S.attr,o,d,arguments.length>1)},removeAttr:function(o){return this.each(function(){S.removeAttr(this,o)})}}),S.extend({attr:function(o,d,w){var E,M,D=o.nodeType;if(!(D===3||D===8||D===2)){if(typeof o.getAttribute>"u")return S.prop(o,d,w);if((D!==1||!S.isXMLDoc(o))&&(M=S.attrHooks[d.toLowerCase()]||(S.expr.match.bool.test(d)?Ai:void 0)),w!==void 0){if(w===null){S.removeAttr(o,d);return}return M&&"set"in M&&(E=M.set(o,w,d))!==void 0?E:(o.setAttribute(d,w+""),w)}return M&&"get"in M&&(E=M.get(o,d))!==null?E:(E=S.find.attr(o,d),E??void 0)}},attrHooks:{type:{set:function(o,d){if(!q.radioValue&&d==="radio"&&ct(o,"input")){var w=o.value;return o.setAttribute("type",d),w&&(o.value=w),d}}}},removeAttr:function(o,d){var w,E=0,M=d&&d.match(yt);if(M&&o.nodeType===1)for(;w=M[E++];)o.removeAttribute(w)}}),Ai={set:function(o,d,w){return d===!1?S.removeAttr(o,w):o.setAttribute(w,w),w}},S.each(S.expr.match.bool.source.match(/\w+/g),function(o,d){var w=Ki[d]||S.find.attr;Ki[d]=function(E,M,D){var V,fe,le=M.toLowerCase();return D||(fe=Ki[le],Ki[le]=V,V=w(E,M,D)!=null?le:null,Ki[le]=fe),V}});var Ci=/^(?:input|select|textarea|button)$/i,gn=/^(?:a|area)$/i;S.fn.extend({prop:function(o,d){return p(this,S.prop,o,d,arguments.length>1)},removeProp:function(o){return this.each(function(){delete this[S.propFix[o]||o]})}}),S.extend({prop:function(o,d,w){var E,M,D=o.nodeType;if(!(D===3||D===8||D===2))return(D!==1||!S.isXMLDoc(o))&&(d=S.propFix[d]||d,M=S.propHooks[d]),w!==void 0?M&&"set"in M&&(E=M.set(o,w,d))!==void 0?E:o[d]=w:M&&"get"in M&&(E=M.get(o,d))!==null?E:o[d]},propHooks:{tabIndex:{get:function(o){var d=S.find.attr(o,"tabindex");return d?parseInt(d,10):Ci.test(o.nodeName)||gn.test(o.nodeName)&&o.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),q.optSelected||(S.propHooks.selected={get:function(o){var d=o.parentNode;return d&&d.parentNode&&d.parentNode.selectedIndex,null},set:function(o){var d=o.parentNode;d&&(d.selectedIndex,d.parentNode&&d.parentNode.selectedIndex)}}),S.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){S.propFix[this.toLowerCase()]=this});function Wn(o){var d=o.match(yt)||[];return d.join(" ")}function Ts(o){return o.getAttribute&&o.getAttribute("class")||""}function yr(o){return Array.isArray(o)?o:typeof o=="string"?o.match(yt)||[]:[]}S.fn.extend({addClass:function(o){var d,w,E,M,D,V;return ne(o)?this.each(function(fe){S(this).addClass(o.call(this,fe,Ts(this)))}):(d=yr(o),d.length?this.each(function(){if(E=Ts(this),w=this.nodeType===1&&" "+Wn(E)+" ",w){for(D=0;D<d.length;D++)M=d[D],w.indexOf(" "+M+" ")<0&&(w+=M+" ");V=Wn(w),E!==V&&this.setAttribute("class",V)}}):this)},removeClass:function(o){var d,w,E,M,D,V;return ne(o)?this.each(function(fe){S(this).removeClass(o.call(this,fe,Ts(this)))}):arguments.length?(d=yr(o),d.length?this.each(function(){if(E=Ts(this),w=this.nodeType===1&&" "+Wn(E)+" ",w){for(D=0;D<d.length;D++)for(M=d[D];w.indexOf(" "+M+" ")>-1;)w=w.replace(" "+M+" "," ");V=Wn(w),E!==V&&this.setAttribute("class",V)}}):this):this.attr("class","")},toggleClass:function(o,d){var w,E,M,D,V=typeof o,fe=V==="string"||Array.isArray(o);return ne(o)?this.each(function(le){S(this).toggleClass(o.call(this,le,Ts(this),d),d)}):typeof d=="boolean"&&fe?d?this.addClass(o):this.removeClass(o):(w=yr(o),this.each(function(){if(fe)for(D=S(this),M=0;M<w.length;M++)E=w[M],D.hasClass(E)?D.removeClass(E):D.addClass(E);else(o===void 0||V==="boolean")&&(E=Ts(this),E&&rt.set(this,"__className__",E),this.setAttribute&&this.setAttribute("class",E||o===!1?"":rt.get(this,"__className__")||""))}))},hasClass:function(o){var d,w,E=0;for(d=" "+o+" ";w=this[E++];)if(w.nodeType===1&&(" "+Wn(Ts(w))+" ").indexOf(d)>-1)return!0;return!1}});var tr=/\r/g;S.fn.extend({val:function(o){var d,w,E,M=this[0];return arguments.length?(E=ne(o),this.each(function(D){var V;this.nodeType===1&&(E?V=o.call(this,D,S(this).val()):V=o,V==null?V="":typeof V=="number"?V+="":Array.isArray(V)&&(V=S.map(V,function(fe){return fe==null?"":fe+""})),d=S.valHooks[this.type]||S.valHooks[this.nodeName.toLowerCase()],(!d||!("set"in d)||d.set(this,V,"value")===void 0)&&(this.value=V))})):M?(d=S.valHooks[M.type]||S.valHooks[M.nodeName.toLowerCase()],d&&"get"in d&&(w=d.get(M,"value"))!==void 0?w:(w=M.value,typeof w=="string"?w.replace(tr,""):w??"")):void 0}}),S.extend({valHooks:{option:{get:function(o){var d=S.find.attr(o,"value");return d??Wn(S.text(o))}},select:{get:function(o){var d,w,E,M=o.options,D=o.selectedIndex,V=o.type==="select-one",fe=V?null:[],le=V?D+1:M.length;for(D<0?E=le:E=V?D:0;E<le;E++)if(w=M[E],(w.selected||E===D)&&!w.disabled&&(!w.parentNode.disabled||!ct(w.parentNode,"optgroup"))){if(d=S(w).val(),V)return d;fe.push(d)}return fe},set:function(o,d){for(var w,E,M=o.options,D=S.makeArray(d),V=M.length;V--;)E=M[V],(E.selected=S.inArray(S.valHooks.option.get(E),D)>-1)&&(w=!0);return w||(o.selectedIndex=-1),D}}}}),S.each(["radio","checkbox"],function(){S.valHooks[this]={set:function(o,d){if(Array.isArray(d))return o.checked=S.inArray(S(o).val(),d)>-1}},q.checkOn||(S.valHooks[this].get=function(o){return o.getAttribute("value")===null?"on":o.value})});var ir=g.location,nr={guid:Date.now()},Ls=/\?/;S.parseXML=function(o){var d,w;if(!o||typeof o!="string")return null;try{d=new g.DOMParser().parseFromString(o,"text/xml")}catch{}return w=d&&d.getElementsByTagName("parsererror")[0],(!d||w)&&S.error("Invalid XML: "+(w?S.map(w.childNodes,function(E){return E.textContent}).join(`
DesignScreenshot/output/git.buildapp.eu.org_run/git.buildapp.eu.org_2_login_page.html:233:(`+Be+": "+Ue+")",Z.name="ChunkLoadError",Z.type=Be,Z.request=Ue,O[1](Z)}};__webpack_require__.l(J,C,"chunk-"+_,_)}};var v=function(_,g){var O=g[0],R=g[1],J=g[2],Z,C,we=0;if(O.some(function(Ue){return r[Ue]!==0})){for(Z in R)__webpack_require__.o(R,Z)&&(__webpack_require__.m[Z]=R[Z]);if(J)var Be=J(__webpack_require__)}for(_&&_(g);we<O.length;we++)C=O[we],__webpack_require__.o(r,C)&&r[C]&&r[C][0](),r[C]=0},b=self.webpackChunk=self.webpackChunk||[];b.forEach(v.bind(null,0)),b.push=v.bind(null,b.push.bind(b))}();var __webpack_exports__={};(function(){"use strict";var r=__webpack_require__("./node_modules/jquery/dist/jquery.js"),v=__webpack_require__.n(r),b=__webpack_require__("./node_modules/htmx.org/dist/htmx.esm.js");window.$=window.jQuery=v(),window.htmx=b.A})(),function(){"use strict";(function(r,v,b,_){"use strict";r.isWindow=r.isWindow||function(g){return g!=null&&g===g.window},v=typeof v<"u"&&v.Math==Math?v:typeof self<"u"&&self.Math==Math?self:Function("return this")(),r.api=r.fn.api=function(g){var O=r.isFunction(this)?r(v):r(this),R=O.selector||"",J=new Date().getTime(),Z=[],C=arguments[0],we=typeof C=="string",Be=[].slice.call(arguments,1),Ue;return O.each(function(){var Q=r.isPlainObject(g)?r.extend(!0,{},r.fn.api.settings,g):r.extend({},r.fn.api.settings),Ke=Q.namespace,At=Q.metadata,gt=Q.selector,q=Q.error,ne=Q.className,c="."+Ke,W="module-"+Ke,Re=r(this),tt=Re.closest(gt.form),st=Q.stateContext?r(Q.stateContext):Re,et,je,S,si,ct,xt=this,ce=st[0],G=Re.data(W),P;P={initialize:function(){we||P.bind.events(),P.instantiate()},instantiate:function(){P.verbose("Storing instance of module",P),G=P,Re.data(W,G)},destroy:function(){P.verbose("Destroying previous module for",xt),Re.removeData(W).off(c)},bind:{events:function(){var k=P.get.event();k?(P.verbose("Attaching API events to element",k),Re.on(k+c,P.event.trigger)):Q.on=="now"&&(P.debug("Querying API endpoint immediately"),P.query())}},decode:{json:function(k){if(k!==_&&typeof k=="string")try{k=JSON.parse(k)}catch{}return k}},read:{cachedResponse:function(k){var N;if(v.Storage===_){P.error(q.noStorage);return}return N=sessionStorage.getItem(k),P.debug("Using cached response",k,N),N=P.decode.json(N),N}},write:{cachedResponse:function(k,N){if(N&&N===""){P.debug("Response empty, not caching",N);return}if(v.Storage===_){P.error(q.noStorage);return}r.isPlainObject(N)&&(N=JSON.stringify(N)),sessionStorage.setItem(k,N),P.verbose("Storing cached response for url",k,N)}},query:function(){if(P.is.disabled()){P.debug("Element is disabled API request aborted");return}if(P.is.loading())if(Q.interruptRequests)P.debug("Interrupting previous request"),P.abort();else{P.debug("Cancelling request, previous request is still pending");return}if(Q.defaultData&&r.extend(!0,Q.urlData,P.get.defaultData()),Q.serializeForm&&(Q.data=P.add.formData(Q.data)),je=P.get.settings(),je===!1){P.cancelled=!0,P.error(q.beforeSend);return}else P.cancelled=!1;if(S=P.get.templatedURL(),!S&&!P.is.mocked()){P.error(q.missingURL);return}if(S=P.add.urlData(S),!(!S&&!P.is.mocked())){if(je.url=Q.base+S,et=r.extend(!0,{},Q,{type:Q.method||Q.type,data:si,url:Q.base+S,beforeSend:Q.beforeXHR,success:function(){},failure:function(){},complete:function(){}}),P.debug("Querying URL",et.url),P.verbose("Using AJAX settings",et),Q.cache==="local"&&P.read.cachedResponse(S)){P.debug("Response returned from local cache"),P.request=P.create.request(),P.request.resolveWith(ce,[P.read.cachedResponse(S)]);return}Q.throttle?!Q.throttleFirstRequest&&!P.timer?(P.debug("Sending request",si,et.method),P.send.request(),P.timer=setTimeout(function(){},Q.throttle)):(P.debug("Throttling request",Q.throttle),clearTimeout(P.timer),P.timer=setTimeout(function(){P.timer&&delete P.timer,P.debug("Sending throttled request",si,et.method),P.send.request()},Q.throttle)):(P.debug("Sending request",si,et.method),P.send.request())}},should:{removeError:function(){return Q.hideError===!0||Q.hideError==="auto"&&!P.is.form()}},is:{disabled:function(){return Re.filter(gt.disabled).length>0},expectingJSON:function(){return Q.dataType==="json"||Q.dataType==="jsonp"},form:function(){return Re.is("form")||st.is("form")},mocked:function(){return Q.mockResponse||Q.mockResponseAsync||Q.response||Q.responseAsync},input:function(){return Re.is("input")},loading:function(){return P.request?P.request.state()=="pending":!1},abortedRequest:function(k){return k&&k.readyState!==_&&k.readyState===0?(P.verbose("XHR request determined to be aborted"),!0):(P.verbose("XHR request was not aborted"),!1)},validResponse:function(k){return!P.is.expectingJSON()||!r.isFunction(Q.successTest)?(P.verbose("Response is not JSON, skipping validation",Q.successTest,k),!0):(P.debug("Checking JSON returned success",Q.successTest,k),Q.successTest(k)?(P.debug("Response passed success test",k),!0):(P.debug("Response failed success test",k),!1))}},was:{cancelled:function(){return P.cancelled||!1},succesful:function(){return P.verbose('This behavior will be deleted due to typo. Use "was successful" instead.'),P.was.successful()},successful:function(){return P.request&&P.request.state()=="resolved"},failure:function(){return P.request&&P.request.state()=="rejected"},complete:function(){return P.request&&(P.request.state()=="resolved"||P.request.state()=="rejected")}},add:{urlData:function(k,N){var Y,ve;return k&&(Y=k.match(Q.regExp.required),ve=k.match(Q.regExp.optional),N=N||Q.urlData,Y&&(P.debug("Looking for required URL variables",Y),r.each(Y,function(Oe,Ne){var Ve=Ne.indexOf("$")!==-1?Ne.substr(2,Ne.length-3):Ne.substr(1,Ne.length-2),Ye=r.isPlainObject(N)&&N[Ve]!==_?N[Ve]:Re.data(Ve)!==_?Re.data(Ve):st.data(Ve)!==_?st.data(Ve):N[Ve];if(Ye===_)return P.error(q.requiredParameter,Ve,k),k=!1,!1;P.verbose("Found required variable",Ve,Ye),Ye=Q.encodeParameters?P.get.urlEncodedValue(Ye):Ye,k=k.replace(Ne,Ye)})),ve&&(P.debug("Looking for optional URL variables",Y),r.each(ve,function(Oe,Ne){var Ve=Ne.indexOf("$")!==-1?Ne.substr(3,Ne.length-4):Ne.substr(2,Ne.length-3),Ye=r.isPlainObject(N)&&N[Ve]!==_?N[Ve]:Re.data(Ve)!==_?Re.data(Ve):st.data(Ve)!==_?st.data(Ve):N[Ve];Ye!==_?(P.verbose("Optional variable Found",Ve,Ye),k=k.replace(Ne,Ye)):(P.verbose("Optional variable not found",Ve),k.indexOf("/"+Ne)!==-1?k=k.replace("/"+Ne,""):k=k.replace(Ne,""))}))),k},formData:function(k){var N=r.fn.serializeObject!==_,Y=N?tt.serializeObject():tt.serialize(),ve;return k=k||Q.data,ve=r.isPlainObject(k),ve?N?(P.debug("Extending existing data with form data",k,Y),k=r.extend(!0,{},k,Y)):(P.error(q.missingSerialize),P.debug("Cant extend data. Replacing data with form data",k,Y),k=Y):(P.debug("Adding form data",Y),k=Y),k}},send:{request:function(){P.set.loading(),P.request=P.create.request(),P.is.mocked()?P.mockedXHR=P.create.mockedXHR():P.xhr=P.create.xhr(),Q.onRequest.call(ce,P.request,P.xhr)}},event:{trigger:function(k){P.query(),(k.type=="submit"||k.type=="click")&&k.preventDefault()},xhr:{always:function(){},done:function(k,N,Y){var ve=this,Oe=new Date().getTime()-ct,Ne=Q.loadingDuration-Oe,Ve=r.isFunction(Q.onResponse)?P.is.expectingJSON()&&!Q.rawResponse?Q.onResponse.call(ve,r.extend(!0,{},k)):Q.onResponse.call(ve,k):!1;Ne=Ne>0?Ne:0,Ve&&(P.debug("Modified API response in onResponse callback",Q.onResponse,Ve,k),k=Ve),Ne>0&&P.debug("Response completed early delaying state change by",Ne),setTimeout(function(){P.is.validResponse(k)?P.request.resolveWith(ve,[k,Y]):P.request.rejectWith(ve,[Y,"invalid"])},Ne)},fail:function(k,N,Y){var ve=this,Oe=new Date().getTime()-ct,Ne=Q.loadingDuration-Oe;Ne=Ne>0?Ne:0,Ne>0&&P.debug("Response completed early delaying state change by",Ne),setTimeout(function(){P.is.abortedRequest(k)?P.request.rejectWith(ve,[k,"aborted",Y]):P.request.rejectWith(ve,[k,"error",N,Y])},Ne)}},request:{done:function(k,N){P.debug("Successful API Response",k),Q.cache==="local"&&S&&(P.write.cachedResponse(S,k),P.debug("Saving server response locally",P.cache)),Q.onSuccess.call(ce,k,Re,N)},complete:function(k,N){var Y,ve;P.was.successful()?(ve=k,Y=N):(Y=k,ve=P.get.responseFromXHR(Y)),P.remove.loading(),Q.onComplete.call(ce,ve,Re,Y)},fail:function(k,N,Y){var ve=P.get.responseFromXHR(k),Oe=P.get.errorFromRequest(ve,N,Y);if(N=="aborted")return P.debug("XHR Aborted (Most likely caused by page navigation or CORS Policy)",N,Y),Q.onAbort.call(ce,N,Re,k),!0;N=="invalid"?P.debug("JSON did not pass success test. A server-side error has most likely occurred",ve):N=="error"&&k!==_&&(P.debug("XHR produced a server error",N,Y),(k.status<200||k.status>=300)&&Y!==_&&Y!==""&&P.error(q.statusMessage+Y,et.url),Q.onError.call(ce,Oe,Re,k)),Q.errorDuration&&N!=="aborted"&&(P.debug("Adding error state"),P.set.error(),P.should.removeError()&&setTimeout(P.remove.error,Q.errorDuration)),P.debug("API Request failed",Oe,k),Q.onFailure.call(ce,ve,Re,k)}}},create:{request:function(){return r.Deferred().always(P.event.request.complete).done(P.event.request.done).fail(P.event.request.fail)},mockedXHR:function(){var k=!1,N=!1,Y=!1,ve=Q.mockResponse||Q.response,Oe=Q.mockResponseAsync||Q.responseAsync,Ne,Ve,Ye;return Ye=r.Deferred().always(P.event.xhr.complete).done(P.event.xhr.done).fail(P.event.xhr.fail),ve?(r.isFunction(ve)?(P.debug("Using specified synchronous callback",ve),Ve=ve.call(ce,je)):(P.debug("Using settings specified response",ve),Ve=ve),Ye.resolveWith(ce,[Ve,k,{responseText:Ve}])):r.isFunction(Oe)&&(Ne=function(Lt){P.debug("Async callback returned response",Lt),Lt?Ye.resolveWith(ce,[Lt,k,{responseText:Lt}]):Ye.rejectWith(ce,[{responseText:Lt},N,Y])},P.debug("Using specified async response callback",Oe),Oe.call(ce,je,Ne)),Ye},xhr:function(){var k;return k=r.ajax(et).always(P.event.xhr.always).done(P.event.xhr.done).fail(P.event.xhr.fail),P.verbose("Created server request",k,et),k}},set:{error:function(){P.verbose("Adding error state to element",st),st.addClass(ne.error)},loading:function(){P.verbose("Adding loading state to element",st),st.addClass(ne.loading),ct=new Date().getTime()}},remove:{error:function(){P.verbose("Removing error state from element",st),st.removeClass(ne.error)},loading:function(){P.verbose("Removing loading state from element",st),st.removeClass(ne.loading)}},get:{responseFromXHR:function(k){return r.isPlainObject(k)?P.is.expectingJSON()?P.decode.json(k.responseText):k.responseText:!1},errorFromRequest:function(k,N,Y){return r.isPlainObject(k)&&k.error!==_?k.error:Q.error[N]!==_?Q.error[N]:Y},request:function(){return P.request||!1},xhr:function(){return P.xhr||!1},settings:function(){var k;return k=Q.beforeSend.call(Re,Q),k&&(k.success!==_&&(P.debug("Legacy success callback detected",k),P.error(q.legacyParameters,k.success),k.onSuccess=k.success),k.failure!==_&&(P.debug("Legacy failure callback detected",k),P.error(q.legacyParameters,k.failure),k.onFailure=k.failure),k.complete!==_&&(P.debug("Legacy complete callback detected",k),P.error(q.legacyParameters,k.complete),k.onComplete=k.complete)),k===_&&P.error(q.noReturnedValue),k===!1?k:k!==_?r.extend(!0,{},k):r.extend(!0,{},Q)},urlEncodedValue:function(k){return v.encodeURIComponent(k)},defaultData:function(){var k={};return r.isWindow(xt)||(P.is.input()?k.value=Re.val():P.is.form()||(k.text=Re.text())),k},event:function(){return r.isWindow(xt)||Q.on=="now"?(P.debug("API called without element, no events attached"),!1):Q.on=="auto"?Re.is("input")?xt.oninput!==_?"input":xt.onpropertychange!==_?"propertychange":"keyup":Re.is("form")?"submit":"click":Q.on},templatedURL:function(k){if(k=k||Re.data(At.action)||Q.action||!1,S=Re.data(At.url)||Q.url||!1,S)return P.debug("Using specified url",S),S;if(k){if(P.debug("Looking up url for action",k,Q.api),Q.api[k]===_&&!P.is.mocked()){P.error(q.missingAction,Q.action,Q.api);return}S=Q.api[k]}else P.is.form()&&(S=Re.attr("action")||st.attr("action")||!1,P.debug("No url or action specified, defaulting to form action",S));return S}},abort:function(){var k=P.get.xhr();k&&k.state()!=="resolved"&&(P.debug("Cancelling API request"),k.abort())},reset:function(){P.remove.error(),P.remove.loading()},setting:function(k,N){if(P.debug("Changing setting",k,N),r.isPlainObject(k))r.extend(!0,Q,k);else if(N!==_)r.isPlainObject(Q[k])?r.extend(!0,Q[k],N):Q[k]=N;else return Q[k]},internal:function(k,N){if(r.isPlainObject(k))r.extend(!0,P,k);else if(N!==_)P[k]=N;else return P[k]},debug:function(){!Q.silent&&Q.debug&&(Q.performance?P.performance.log(arguments):(P.debug=Function.prototype.bind.call(console.info,console,Q.name+":"),P.debug.apply(console,arguments)))},verbose:function(){!Q.silent&&Q.verbose&&Q.debug&&(Q.performance?P.performance.log(arguments):(P.verbose=Function.prototype.bind.call(console.info,console,Q.name+":"),P.verbose.apply(console,arguments)))},error:function(){Q.silent||(P.error=Function.prototype.bind.call(console.error,console,Q.name+":"),P.error.apply(console,arguments))},performance:{log:function(k){var N,Y,ve;Q.performance&&(N=new Date().getTime(),ve=J||N,Y=N-ve,J=N,Z.push({Name:k[0],Arguments:[].slice.call(k,1)||"","Execution Time":Y})),clearTimeout(P.performance.timer),P.performance.timer=setTimeout(P.performance.display,500)},display:function(){var k=Q.name+":",N=0;J=!1,clearTimeout(P.performance.timer),r.each(Z,function(Y,ve){N+=ve["Execution Time"]}),k+=" "+N+"ms",R&&(k+=" '"+R+"'"),(console.group!==_||console.table!==_)&&Z.length>0&&(console.groupCollapsed(k),console.table?console.table(Z):r.each(Z,function(Y,ve){console.log(ve.Name+": "+ve["Execution Time"]+"ms")}),console.groupEnd()),Z=[]}},invoke:function(k,N,Y){var ve=G,Oe,Ne,Ve;return N=N||Be,Y=xt||Y,typeof k=="string"&&ve!==_&&(k=k.split(/[\. ]/),Oe=k.length-1,r.each(k,function(Ye,Lt){var K=Ye!=Oe?Lt+k[Ye+1].charAt(0).toUpperCase()+k[Ye+1].slice(1):k;if(r.isPlainObject(ve[K])&&Ye!=Oe)ve=ve[K];else{if(ve[K]!==_)return Ne=ve[K],!1;if(r.isPlainObject(ve[Lt])&&Ye!=Oe)ve=ve[Lt];else return ve[Lt]!==_?(Ne=ve[Lt],!1):(P.error(q.method,k),!1)}})),r.isFunction(Ne)?Ve=Ne.apply(Y,N):Ne!==_&&(Ve=Ne),Array.isArray(Ue)?Ue.push(Ve):Ue!==_?Ue=[Ue,Ve]:Ve!==_&&(Ue=Ve),Ne}},we?(G===_&&P.initialize(),P.invoke(C)):(G!==_&&G.invoke("destroy"),P.initialize())}),Ue!==_?Ue:this},r.api.settings={name:"API",namespace:"api",debug:!1,verbose:!1,performance:!0,api:{},cache:!0,interruptRequests:!0,on:"auto",stateContext:!1,loadingDuration:0,hideError:"auto",errorDuration:2e3,encodeParameters:!0,action:!1,url:!1,base:"",urlData:{},defaultData:!0,serializeForm:!1,throttle:0,throttleFirstRequest:!0,method:"get",data:{},dataType:"json",mockResponse:!1,mockResponseAsync:!1,response:!1,responseAsync:!1,rawResponse:!1,beforeSend:function(g){return g},beforeXHR:function(g){},onRequest:function(g,O){},onResponse:!1,onSuccess:function(g,O){},onComplete:function(g,O){},onFailure:function(g,O){},onError:function(g,O){},onAbort:function(g,O){},successTest:!1,error:{beforeSend:"The before send function has aborted the request",error:"There was an error with your request",exitConditions:"API Request Aborted. Exit conditions met",JSONParse:"JSON could not be parsed during error handling",legacyParameters:"You are using legacy API success callback names",method:"The method you called is not defined",missingAction:"API action used but no url was defined",missingSerialize:"jquery-serialize-object is required to add form data to an existing data object",missingURL:"No URL specified for api event",noReturnedValue:"The beforeSend callback must return a settings object, beforeSend ignored.",noStorage:"Caching responses locally requires session storage",parseError:"There was an error parsing your request",requiredParameter:"Missing a required URL parameter: ",statusMessage:"Server gave an error: ",timeout:"Your request timed out"},regExp:{required:/\{\$*[A-z0-9]+\}/g,optional:/\{\/\$*[A-z0-9]+\}/g},className:{loading:"loading",error:"error"},selector:{disabled:".disabled",form:"form"},metadata:{action:"action",url:"url"}}})(jQuery,window,document);(function(r,v,b,_){"use strict";r.isFunction=r.isFunction||function(g){return typeof g=="function"&&typeof g.nodeType!="number"},v=typeof v<"u"&&v.Math==Math?v:typeof self<"u"&&self.Math==Math?self:Function("return this")(),r.fn.dropdown=function(g){var O=r(this),R=r(b),J=O.selector||"",Z="ontouchstart"in b.documentElement,C="click",we=new Date().getTime(),Be=[],Ue=arguments[0],Q=typeof Ue=="string",Ke=[].slice.call(arguments,1),At;return O.each(function(gt){var q=r.isPlainObject(g)?r.extend(!0,{},r.fn.dropdown.settings,g):r.extend({},r.fn.dropdown.settings),ne=q.className,c=q.message,W=q.fields,Re=q.keys,tt=q.metadata,st=q.namespace,et=q.regExp,je=q.selector,S=q.error,si=q.templates,ct="."+st,xt="module-"+st,ce=r(this),G=r(q.context),P=ce.find(je.text),k=ce.find(je.search),N=ce.find(je.sizer),Y=ce.find(je.input),ve=ce.find(je.icon),Oe=ce.find(je.clearIcon),Ne=ce.prev().find(je.text).length>0?ce.prev().find(je.text):ce.prev(),Ve=ce.children(je.menu),Ye=Ve.find(je.item),Lt=q.hideDividers?Ye.parent().children(je.divider):r(),K=!1,Ee=!1,nt=!1,te=!1,ee=this,oe=ce.data(xt),Ge,yt,jt,Bt,Qt,ji,ti,fn,Qi,p;p={initialize:function(){p.debug("Initializing dropdown",q),p.is.alreadySetup()?p.setup.reference():(q.ignoreDiacritics&&!String.prototype.normalize&&(q.ignoreDiacritics=!1,p.error(S.noNormalize,ee)),p.setup.layout(),q.values&&(p.set.initialLoad(),p.change.values(q.values),p.remove.initialLoad()),p.refreshData(),p.save.defaults(),p.restore.selected(),p.create.id(),p.bind.events(),p.observeChanges(),p.instantiate())},instantiate:function(){p.verbose("Storing instance of dropdown",p),oe=p,ce.data(xt,p)},destroy:function(){p.verbose("Destroying previous dropdown",ce),p.remove.tabbable(),p.remove.active(),Ve.transition("stop all"),Ve.removeClass(ne.visible).addClass(ne.hidden),ce.off(ct).removeData(xt),Ve.off(ct),R.off(Qt),p.disconnect.menuObserver(),p.disconnect.selectObserver(),p.disconnect.classObserver()},observeChanges:function(){"MutationObserver"in v&&(ti=new MutationObserver(p.event.select.mutation),fn=new MutationObserver(p.event.menu.mutation),Qi=new MutationObserver(p.event.class.mutation),p.debug("Setting up mutation observer",ti,fn,Qi),p.observe.select(),p.observe.menu(),p.observe.class())},disconnect:{menuObserver:function(){fn&&fn.disconnect()},selectObserver:function(){ti&&ti.disconnect()},classObserver:function(){Qi&&Qi.disconnect()}},observe:{select:function(){p.has.input()&&ti&&ti.observe(ce[0],{childList:!0,subtree:!0})},menu:function(){p.has.menu()&&fn&&fn.observe(Ve[0],{childList:!0,subtree:!0})},class:function(){p.has.search()&&Qi&&Qi.observe(ce[0],{attributes:!0})}},create:{id:function(){ji=(Math.random().toString(16)+"000000000").substr(2,8),Qt="."+ji,p.verbose("Creating unique id for element",ji)},userChoice:function(j){var H,ge,me,De;return j=j||p.get.userValues(),j?(j=Array.isArray(j)?j:[j],r.each(j,function(ht,rt){p.get.item(rt)===!1&&(De=q.templates.addition(p.add.variables(c.addResult,rt)),ge=r("<div />").html(De).attr("data-"+tt.value,rt).attr("data-"+tt.text,rt).addClass(ne.addition).addClass(ne.item),q.hideAdditions&&ge.addClass(ne.hidden),H=H===_?ge:H.add(ge),p.verbose("Creating user choices for value",rt,ge))}),H):!1},userLabels:function(j){var H=p.get.userValues();H&&(p.debug("Adding user labels",H),r.each(H,function(ge,me){p.verbose("Adding custom user value"),p.add.label(me,me)}))},menu:function(){Ve=r("<div />").addClass(ne.menu).appendTo(ce)},sizer:function(){N=r("<span />").addClass(ne.sizer).insertAfter(k)}},search:function(j){j=j!==_?j:p.get.query(),p.verbose("Searching for query",j),p.has.minCharacters(j)?p.filter(j):p.hide(null,!0)},select:{firstUnfiltered:function(){p.verbose("Selecting first non-filtered element"),p.remove.selectedItem(),Ye.not(je.unselectable).not(je.addition+je.hidden).eq(0).addClass(ne.selected)},nextAvailable:function(j){j=j.eq(0);var H=j.nextAll(je.item).not(je.unselectable).eq(0),ge=j.prevAll(je.item).not(je.unselectable).eq(0),me=H.length>0;me?(p.verbose("Moving selection to",H),H.addClass(ne.selected)):(p.verbose("Moving selection to",ge),ge.addClass(ne.selected))}},setup:{api:function(){var j={debug:q.debug,urlData:{value:p.get.value(),query:p.get.query()},on:!1};p.verbose("First request, initializing API"),ce.api(j)},layout:function(){ce.is("select")&&(p.setup.select(),p.setup.returnedObject()),p.has.menu()||p.create.menu(),p.is.selection()&&p.is.clearable()&&!p.has.clearItem()&&(p.verbose("Adding clear icon"),Oe=r("<i />").addClass("remove icon").insertBefore(P)),p.is.search()&&!p.has.search()&&(p.verbose("Adding search input"),k=r("<input />").addClass(ne.search).prop("autocomplete","off").insertBefore(P)),p.is.multiple()&&p.is.searchSelection()&&!p.has.sizer()&&p.create.sizer(),q.allowTab&&p.set.tabbable()},select:function(){var j=p.get.selectValues();p.debug("Dropdown initialized on a select",j),ce.is("select")&&(Y=ce),Y.parent(je.dropdown).length>0?(p.debug("UI dropdown already exists. Creating dropdown menu only"),ce=Y.closest(je.dropdown),p.has.menu()||p.create.menu(),Ve=ce.children(je.menu),p.setup.menu(j)):(p.debug("Creating entire dropdown from select"),ce=r("<div />").attr("class",Y.attr("class")).addClass(ne.selection).addClass(ne.dropdown).html(si.dropdown(j,W,q.preserveHTML,q.className)).insertBefore(Y),Y.hasClass(ne.multiple)&&Y.prop("multiple")===!1&&(p.error(S.missingMultiple),Y.prop("multiple",!0)),Y.is("[multiple]")&&p.set.multiple(),Y.prop("disabled")&&(p.debug("Disabling dropdown"),ce.addClass(ne.disabled)),Y.removeAttr("required").removeAttr("class").detach().prependTo(ce)),p.refresh()},menu:function(j){Ve.html(si.menu(j,W,q.preserveHTML,q.className)),Ye=Ve.find(je.item),Lt=q.hideDividers?Ye.parent().children(je.divider):r()},reference:function(){p.debug("Dropdown behavior was called on select, replacing with closest dropdown"),ce=ce.parent(je.dropdown),oe=ce.data(xt),ee=ce.get(0),p.refresh(),p.setup.returnedObject()},returnedObject:function(){var j=O.slice(0,gt),H=O.slice(gt+1);O=j.add(ce).add(H)}},refresh:function(){p.refreshSelectors(),p.refreshData()},refreshItems:function(){Ye=Ve.find(je.item),Lt=q.hideDividers?Ye.parent().children(je.divider):r()},refreshSelectors:function(){p.verbose("Refreshing selector cache"),P=ce.find(je.text),k=ce.find(je.search),Y=ce.find(je.input),ve=ce.find(je.icon),Ne=ce.prev().find(je.text).length>0?ce.prev().find(je.text):ce.prev(),Ve=ce.children(je.menu),Ye=Ve.find(je.item),Lt=q.hideDividers?Ye.parent().children(je.divider):r()},refreshData:function(){p.verbose("Refreshing cached metadata"),Ye.removeData(tt.text).removeData(tt.value)},clearData:function(){p.verbose("Clearing metadata"),Ye.removeData(tt.text).removeData(tt.value),ce.removeData(tt.defaultText).removeData(tt.defaultValue).removeData(tt.placeholderText)},toggle:function(){p.verbose("Toggling menu visibility"),p.is.active()?p.hide():p.show()},show:function(j,H){if(j=r.isFunction(j)?j:function(){},!p.can.show()&&p.is.remote()&&(p.debug("No API results retrieved, searching before show"),p.queryRemote(p.get.query(),p.show)),p.can.show()&&!p.is.active()){if(p.debug("Showing dropdown"),p.has.message()&&!(p.has.maxSelections()||p.has.allResultsFiltered())&&p.remove.message(),p.is.allFiltered())return!0;q.onShow.call(ee)!==!1&&(q.onAfterFiltered.call(ee),p.animate.show(function(){p.can.click()&&p.bind.intent(),p.has.search()&&!H&&p.focusSearch(),p.set.visible(),j.call(ee)}))}},hide:function(j,H){j=r.isFunction(j)?j:function(){},p.is.active()&&!p.is.animatingOutward()?(p.debug("Hiding dropdown"),q.onHide.call(ee)!==!1&&p.animate.hide(function(){p.remove.visible(),p.is.focusedOnSearch()&&H!==!0&&k.blur(),j.call(ee)})):p.can.click()&&p.unbind.intent(),te=!1},hideOthers:function(){p.verbose("Finding other dropdowns to hide"),O.not(ce).has(je.menu+"."+ne.visible).dropdown("hide")},hideMenu:function(){p.verbose("Hiding menu  instantaneously"),p.remove.active(),p.remove.visible(),Ve.transition("hide")},hideSubMenus:function(){var j=Ve.children(je.item).find(je.menu);p.verbose("Hiding sub menus",j),j.transition("hide")},bind:{events:function(){p.bind.keyboardEvents(),p.bind.inputEvents(),p.bind.mouseEvents()},keyboardEvents:function(){p.verbose("Binding keyboard events"),ce.on("keydown"+ct,p.event.keydown),p.has.search()&&ce.on(p.get.inputEvent()+ct,je.search,p.event.input),p.is.multiple()&&R.on("keydown"+Qt,p.event.document.keydown)},inputEvents:function(){p.verbose("Binding input change events"),ce.on("change"+ct,je.input,p.event.change)},mouseEvents:function(){p.verbose("Binding mouse events"),p.is.multiple()&&ce.on(C+ct,je.label,p.event.label.click).on(C+ct,je.remove,p.event.remove.click),p.is.searchSelection()?(ce.on("mousedown"+ct,p.event.mousedown).on("mouseup"+ct,p.event.mouseup).on("mousedown"+ct,je.menu,p.event.menu.mousedown).on("mouseup"+ct,je.menu,p.event.menu.mouseup).on(C+ct,je.icon,p.event.icon.click).on(C+ct,je.clearIcon,p.event.clearIcon.click).on("focus"+ct,je.search,p.event.search.focus).on(C+ct,je.search,p.event.search.focus).on("blur"+ct,je.search,p.event.search.blur).on(C+ct,je.text,p.event.text.focus),p.is.multiple()&&ce.on(C+ct,p.event.click)):(q.on=="click"?ce.on(C+ct,je.icon,p.event.icon.click).on(C+ct,p.event.test.toggle):q.on=="hover"?ce.on("mouseenter"+ct,p.delay.show).on("mouseleave"+ct,p.delay.hide):ce.on(q.on+ct,p.toggle),ce.on("mousedown"+ct,p.event.mousedown).on("mouseup"+ct,p.event.mouseup).on("focus"+ct,p.event.focus).on(C+ct,je.clearIcon,p.event.clearIcon.click),p.has.menuSearch()?ce.on("blur"+ct,je.search,p.event.search.blur):ce.on("blur"+ct,p.event.blur)),Ve.on((Z?"touchstart":"mouseenter")+ct,je.item,p.event.item.mouseenter).on("mouseleave"+ct,je.item,p.event.item.mouseleave).on("click"+ct,je.item,p.event.item.click)},intent:function(){p.verbose("Binding hide intent event to document"),Z&&R.on("touchstart"+Qt,p.event.test.touch).on("touchmove"+Qt,p.event.test.touch),R.on(C+Qt,p.event.test.hide)}},unbind:{intent:function(){p.verbose("Removing hide intent event from document"),Z&&R.off("touchstart"+Qt).off("touchmove"+Qt),R.off(C+Qt)}},filter:function(j){var H=j!==_?j:p.get.query(),ge=function(){p.is.multiple()&&p.filterActive(),(j||!j&&p.get.activeItem().length==0)&&p.select.firstUnfiltered(),p.has.allResultsFiltered()?q.onNoResults.call(ee,H)?q.allowAdditions?q.hideAdditions&&(p.verbose("User addition with no menu, setting empty style"),p.set.empty(),p.hideMenu()):(p.verbose("All items filtered, showing message",H),p.add.message(c.noResults)):(p.verbose("All items filtered, hiding dropdown",H),p.hideMenu()):(p.remove.empty(),p.remove.message()),q.allowAdditions&&p.add.userSuggestion(p.escape.htmlEntities(j)),p.is.searchSelection()&&p.can.show()&&p.is.focusedOnSearch()&&p.show(),q.onAfterFiltered.call(ee)};q.useLabels&&p.has.maxSelections()||(q.apiSettings?p.can.useAPI()?p.queryRemote(H,function(){q.filterRemoteData&&p.filterItems(H);var me=Y.val();Array.isArray(me)||(me=me&&me!==""?me.split(q.delimiter):[]),r.each(me,function(De,ht){Ye.filter('[data-value="'+CSS.escape(ht)+'"]').addClass(ne.filtered)}),ge()}):p.error(S.noAPI):(p.filterItems(H),ge()))},queryRemote:function(j,H){var ge={errorDuration:!1,cache:"local",throttle:q.throttle,urlData:{query:j},onError:function(){p.add.message(c.serverError),H()},onFailure:function(){p.add.message(c.serverError),H()},onSuccess:function(me){var De=me[W.remoteValues];Array.isArray(De)||(De=[]),p.remove.message();var ht={};ht[W.values]=De,p.setup.menu(ht),De.length===0&&!q.allowAdditions&&p.add.message(c.noResults),H()}};ce.api("get request")||p.setup.api(),ge=r.extend(!0,{},ge,q.apiSettings),ce.api("setting",ge).api("query")},filterItems:function(j){var H=p.remove.diacritics(j!==_?j:p.get.query()),ge=null,me=p.escape.string(H),De=(q.ignoreSearchCase?"i":"")+"gm",ht=new RegExp("^"+me,De);p.has.query()&&(ge=[],p.verbose("Searching for matching values",H),Ye.each(function(){var rt=r(this),zt,fi;if(rt.hasClass(ne.unfilterable))return ge.push(this),!0;if(q.match==="both"||q.match==="text"){if(zt=p.remove.diacritics(String(p.get.choiceText(rt,!1))),zt.search(ht)!==-1)return ge.push(this),!0;if(q.fullTextSearch==="exact"&&p.exactSearch(H,zt))return ge.push(this),!0;if(q.fullTextSearch===!0&&p.fuzzySearch(H,zt))return ge.push(this),!0}if(q.match==="both"||q.match==="value"){if(fi=p.remove.diacritics(String(p.get.choiceValue(rt,zt))),fi.search(ht)!==-1)return ge.push(this),!0;if(q.fullTextSearch==="exact"&&p.exactSearch(H,fi))return ge.push(this),!0;if(q.fullTextSearch===!0&&p.fuzzySearch(H,fi))return ge.push(this),!0}})),p.debug("Showing only matched items",H),p.remove.filteredItem(),ge&&Ye.not(ge).addClass(ne.filtered),p.has.query()?q.hideDividers===!0?Lt.addClass(ne.hidden):q.hideDividers==="empty"&&Lt.removeClass(ne.hidden).filter(function(){var rt=r(this).nextUntil(je.item);return(rt.length?rt:r(this)).nextUntil(je.divider).filter(je.item+":not(."+ne.filtered+")").length===0}).addClass(ne.hidden):Lt.removeClass(ne.hidden)},fuzzySearch:function(j,H){var ge=H.length,me=j.length;if(j=q.ignoreSearchCase?j.toLowerCase():j,H=q.ignoreSearchCase?H.toLowerCase():H,me>ge)return!1;if(me===ge)return j===H;e:for(var De=0,ht=0;De<me;De++){for(var rt=j.charCodeAt(De);ht<ge;)if(H.charCodeAt(ht++)===rt)continue e;return!1}return!0},exactSearch:function(j,H){return j=q.ignoreSearchCase?j.toLowerCase():j,H=q.ignoreSearchCase?H.toLowerCase():H,H.indexOf(j)>-1},filterActive:function(){q.useLabels&&Ye.filter("."+ne.active).addClass(ne.filtered)},focusSearch:function(j){p.has.search()&&!p.is.focusedOnSearch()&&(j?(ce.off("focus"+ct,je.search),k.focus(),ce.on("focus"+ct,je.search,p.event.search.focus)):k.focus())},blurSearch:function(){p.has.search()&&k.blur()},forceSelection:function(){var j=Ye.not(ne.filtered).filter("."+ne.selected).eq(0),H=Ye.not(ne.filtered).filter("."+ne.active).eq(0),ge=j.length>0?j:H,me=ge.length>0;q.allowAdditions||me&&!p.is.multiple()?(p.debug("Forcing partial selection to selected item",ge),p.event.item.click.call(ge,{},!0)):p.remove.searchTerm()},change:{values:function(j){q.allowAdditions||p.clear(),p.debug("Creating dropdown with specified values",j);var H={};H[W.values]=j,p.setup.menu(H),r.each(j,function(ge,me){if(me.selected==!0&&(p.debug("Setting initial selection to",me[W.value]),p.set.selected(me[W.value]),!p.is.multiple()))return!1}),p.has.selectInput()&&(p.disconnect.selectObserver(),Y.html(""),Y.append("<option disabled selected value></option>"),r.each(j,function(ge,me){var De=q.templates.escape(me[W.value]),ht=q.templates.escape(me[W.name]||"",q.preserveHTML);Y.append('<option value="'+De+'">'+ht+"</option>")}),p.observe.select())}},event:{change:function(){nt||(p.debug("Input changed, updating selection"),p.set.selected())},focus:function(){q.showOnFocus&&!K&&p.is.hidden()&&!jt&&p.show()},blur:function(j){jt=b.activeElement===this,!K&&!jt&&(p.remove.activeLabel(),p.hide())},mousedown:function(){p.is.searchSelection()?Bt=!0:K=!0},mouseup:function(){p.is.searchSelection()?Bt=!1:K=!1},click:function(j){var H=r(j.target);H.is(ce)&&(p.is.focusedOnSearch()?p.show():p.focusSearch())},search:{focus:function(j){K=!0,p.is.multiple()&&p.remove.activeLabel(),(q.showOnFocus||j.type!=="focus"&&j.type!=="focusin")&&p.search()},blur:function(j){jt=b.activeElement===this,p.is.searchSelection()&&!Bt&&!Ee&&!jt&&(q.forceSelection?p.forceSelection():q.allowAdditions||p.remove.searchTerm(),p.hide()),Bt=!1}},clearIcon:{click:function(j){p.clear(),p.is.searchSelection()&&p.remove.searchTerm(),p.hide(),j.stopPropagation()}},icon:{click:function(j){te=!0;const H=!!Ve.find(".search > input").length;p.has.search()&&!H?p.is.active()?p.blurSearch():q.showOnFocus?p.focusSearch():p.toggle():p.toggle()}},text:{focus:function(j){K=!0,p.focusSearch()}},input:function(j){(p.is.multiple()||p.is.searchSelection())&&p.set.filtered(),clearTimeout(p.timer),p.timer=setTimeout(p.search,q.delay.search)},label:{click:function(j){var H=r(this),ge=ce.find(je.label),me=ge.filter("."+ne.active),De=H.nextAll("."+ne.active),ht=H.prevAll("."+ne.active),rt=De.length>0?H.nextUntil(De).add(me).add(H):H.prevUntil(ht).add(me).add(H);j.shiftKey?(me.removeClass(ne.active),rt.addClass(ne.active)):j.ctrlKey?H.toggleClass(ne.active):(me.removeClass(ne.active),H.addClass(ne.active)),q.onLabelSelect.apply(this,ge.filter("."+ne.active))}},remove:{click:function(){var j=r(this).parent();j.hasClass(ne.active)?p.remove.activeLabels():p.remove.activeLabels(j)}},test:{toggle:function(j){var H=p.is.multiple()?p.show:p.toggle;p.is.bubbledLabelClick(j)||p.is.bubbledIconClick(j)||p.determine.eventOnElement(j,H)&&j.preventDefault()},touch:function(j){p.determine.eventOnElement(j,function(){j.type=="touchstart"?p.timer=setTimeout(function(){p.hide()},q.delay.touch):j.type=="touchmove"&&clearTimeout(p.timer)}),j.stopPropagation()},hide:function(j){p.determine.eventInModule(j,p.hide)&&ee.id&&r(j.target).attr("for")===ee.id&&j.preventDefault()}},class:{mutation:function(j){j.forEach(function(H){H.attributeName==="class"&&p.check.disabled()})}},select:{mutation:function(j){p.debug("<select> modified, recreating menu"),p.is.selectMutation(j)&&(p.disconnect.selectObserver(),p.refresh(),p.setup.select(),p.set.selected(),p.observe.select())}},menu:{mutation:function(j){var H=j[0],ge=H.addedNodes?r(H.addedNodes[0]):r(!1),me=H.removedNodes?r(H.removedNodes[0]):r(!1),De=ge.add(me),ht=De.is(je.addition)||De.closest(je.addition).length>0,rt=De.is(je.message)||De.closest(je.message).length>0;ht||rt?(p.debug("Updating item selector cache"),p.refreshItems()):(p.debug("Menu modified, updating selector cache"),p.refresh())},mousedown:function(){Ee=!0},mouseup:function(){Ee=!1}},item:{mouseenter:function(j){var H=r(j.target),ge=r(this),me=ge.children(je.menu),De=ge.siblings(je.item).children(je.menu),ht=me.length>0,rt=me.find(H).length>0;!rt&&ht&&(clearTimeout(p.itemTimer),p.itemTimer=setTimeout(function(){p.verbose("Showing sub-menu",me),r.each(De,function(){p.animate.hide(!1,r(this))}),p.animate.show(!1,me)},q.delay.show),j.preventDefault())},mouseleave:function(j){var H=r(this).children(je.menu);H.length>0&&(clearTimeout(p.itemTimer),p.itemTimer=setTimeout(function(){p.verbose("Hiding sub-menu",H),p.animate.hide(!1,H)},q.delay.hide))},click:function(j,H){var ge=r(this),me=r(j?j.target:""),De=ge.find(je.menu),ht=p.get.choiceText(ge),rt=p.get.choiceValue(ge,ht),zt=De.length>0,fi=De.find(me).length>0;b.activeElement.tagName.toLowerCase()!=="input"&&r(b.activeElement).blur(),!fi&&(!zt||q.allowCategorySelection)&&(p.is.searchSelection()&&(q.allowAdditions&&p.remove.userAddition(),p.remove.searchTerm(),!p.is.focusedOnSearch()&&H!=!0&&p.focusSearch(!0)),q.useLabels||(p.remove.filteredItem(),p.set.scrollPosition(ge)),p.determine.selectAction.call(this,ht,rt))}},document:{keydown:function(j){var H=j.which,ge=p.is.inObject(H,Re);if(ge){var me=ce.find(je.label),De=me.filter("."+ne.active),ht=De.data(tt.value),rt=me.index(De),zt=me.length,fi=De.length>0,vi=De.length>1,nn=rt===0,on=rt+1==zt,an=p.is.searchSelection(),bn=p.is.focusedOnSearch(),ln=p.is.focused(),Yi=bn&&p.get.caretPosition(!1)===0,Fn=Yi&&p.get.caretPosition(!0)!==0,vr;if(an&&!fi&&!bn)return;H==Re.leftArrow?(ln||Yi)&&!fi?(p.verbose("Selecting previous label"),me.last().addClass(ne.active)):fi&&(j.shiftKey?p.verbose("Adding previous label to selection"):(p.verbose("Selecting previous label"),me.removeClass(ne.active)),nn&&!vi?De.addClass(ne.active):De.prev(je.siblingLabel).addClass(ne.active).end(),j.preventDefault()):H==Re.rightArrow?(ln&&!fi&&me.first().addClass(ne.active),fi&&(j.shiftKey?p.verbose("Adding next label to selection"):(p.verbose("Selecting next label"),me.removeClass(ne.active)),on?an?bn?me.removeClass(ne.active):p.focusSearch():vi?De.next(je.siblingLabel).addClass(ne.active):De.addClass(ne.active):De.next(je.siblingLabel).addClass(ne.active),j.preventDefault())):H==Re.deleteKey||H==Re.backspace?fi?(p.verbose("Removing active labels"),on&&an&&!bn&&p.focusSearch(),De.last().next(je.siblingLabel).addClass(ne.active),p.remove.activeLabels(De),j.preventDefault()):Yi&&!Fn&&!fi&&H==Re.backspace&&(p.verbose("Removing last label on input backspace"),De=me.last().addClass(ne.active),p.remove.activeLabels(De)):De.removeClass(ne.active)}}},keydown:function(j){var H=j.which,ge=p.is.inObject(H,Re);if(ge){var me=Ye.not(je.unselectable).filter("."+ne.selected).eq(0),De=Ve.children("."+ne.active).eq(0),ht=me.length>0?me:De,rt=ht.length>0?ht.siblings(":not(."+ne.filtered+")").addBack():Ve.children(":not(."+ne.filtered+")"),zt=ht.children(je.menu),fi=ht.closest(je.menu),vi=fi.hasClass(ne.visible)||fi.hasClass(ne.animating)||fi.parent(je.menu).length>0,nn=zt.length>0,on=ht.length>0,an=ht.not(je.unselectable).length>0,bn=H==Re.delimiter&&q.allowAdditions&&p.is.multiple(),ln=q.allowAdditions&&q.hideAdditions&&(H==Re.enter||bn)&&an,Yi,Fn,vr;if(ln&&(p.verbose("Selecting item from keyboard shortcut",ht),p.event.item.click.call(ht,j),p.is.searchSelection()&&p.remove.searchTerm(),p.is.multiple()&&j.preventDefault()),p.is.visible()){if((H==Re.enter||bn)&&(H==Re.enter&&on&&nn&&!q.allowCategorySelection?(p.verbose("Pressed enter on unselectable category, opening sub menu"),H=Re.rightArrow):an&&(p.verbose("Selecting item from keyboard shortcut",ht),p.event.item.click.call(ht,j),p.is.searchSelection()&&(p.remove.searchTerm(),p.is.multiple()&&k.focus())),j.preventDefault()),on&&(H==Re.leftArrow&&(Fn=fi[0]!==Ve[0],Fn&&(p.verbose("Left key pressed, closing sub-menu"),p.animate.hide(!1,fi),ht.removeClass(ne.selected),fi.closest(je.item).addClass(ne.selected),j.preventDefault())),H==Re.rightArrow&&nn&&(p.verbose("Right key pressed, opening sub-menu"),p.animate.show(!1,zt),ht.removeClass(ne.selected),zt.find(je.item).eq(0).addClass(ne.selected),j.preventDefault())),H==Re.upArrow){if(Yi=on&&vi?ht.prevAll(je.item+":not("+je.unselectable+")").eq(0):Ye.eq(0),rt.index(Yi)<0){p.verbose("Up key pressed but reached top of current menu"),j.preventDefault();return}else p.verbose("Up key pressed, changing active item"),ht.removeClass(ne.selected),Yi.addClass(ne.selected),p.set.scrollPosition(Yi),q.selectOnKeydown&&p.is.single()&&p.set.selectedItem(Yi);j.preventDefault()}if(H==Re.downArrow){if(Yi=on&&vi?Yi=ht.nextAll(je.item+":not("+je.unselectable+")").eq(0):Ye.eq(0),Yi.length===0){p.verbose("Down key pressed but reached bottom of current menu"),j.preventDefault();return}else p.verbose("Down key pressed, changing active item"),Ye.removeClass(ne.selected),Yi.addClass(ne.selected),p.set.scrollPosition(Yi),q.selectOnKeydown&&p.is.single()&&p.set.selectedItem(Yi);j.preventDefault()}H==Re.pageUp&&(p.scrollPage("up"),j.preventDefault()),H==Re.pageDown&&(p.scrollPage("down"),j.preventDefault()),H==Re.escape&&(p.verbose("Escape key pressed, closing dropdown"),p.hide())}else bn&&j.preventDefault(),H==Re.downArrow&&!p.is.visible()&&(p.verbose("Down key pressed, showing dropdown"),p.show(),j.preventDefault())}else p.has.search()||p.set.selectedLetter(String.fromCharCode(H))}},trigger:{change:function(){var j=Y[0];if(j){var H=b.createEvent("HTMLEvents");p.verbose("Triggering native change event"),H.initEvent("change",!0,!1),j.dispatchEvent(H)}}},determine:{selectAction:function(j,H){Ge=!0,p.verbose("Determining action",q.action),r.isFunction(p.action[q.action])?(p.verbose("Triggering preset action",q.action,j,H),p.action[q.action].call(ee,j,H,this)):r.isFunction(q.action)?(p.verbose("Triggering user action",q.action,j,H),q.action.call(ee,j,H,this)):p.error(S.action,q.action),Ge=!1},eventInModule:function(j,H){var ge=r(j.target),me=ge.closest(b.documentElement).length>0,De=ge.closest(ce).length>0;return H=r.isFunction(H)?H:function(){},me&&!De?(p.verbose("Triggering event",H),H(),!0):(p.verbose("Event occurred in dropdown, canceling callback"),!1)},eventOnElement:function(j,H){var ge=r(j.target),me=ge.closest(je.siblingLabel),De=b.body.contains(j.target),ht=ce.find(me).length===0||!(p.is.multiple()&&q.useLabels),rt=ge.closest(Ve).length===0;return H=r.isFunction(H)?H:function(){},De&&ht&&rt?(p.verbose("Triggering event",H),H(),!0):(p.verbose("Event occurred in dropdown menu, canceling callback"),!1)}},action:{nothing:function(){},activate:function(j,H,ge){H=H!==_?H:j,p.can.activate(r(ge))&&(p.set.selected(H,r(ge)),p.is.multiple()||p.hideAndClear())},select:function(j,H,ge){H=H!==_?H:j,p.can.activate(r(ge))&&(p.set.value(H,j,r(ge)),p.is.multiple()||p.hideAndClear())},combo:function(j,H,ge){H=H!==_?H:j,p.set.selected(H,r(ge)),p.hideAndClear()},hide:function(j,H,ge){p.set.value(H,j,r(ge)),p.hideAndClear()}},get:{id:function(){return ji},defaultText:function(){return ce.data(tt.defaultText)},defaultValue:function(){return ce.data(tt.defaultValue)},placeholderText:function(){return q.placeholder!="auto"&&typeof q.placeholder=="string"?q.placeholder:ce.data(tt.placeholderText)||""},text:function(){return q.preserveHTML?P.html():P.text()},query:function(){return String(k.val()).trim()},searchWidth:function(j){return j=j!==_?j:k.val(),N.text(j),Math.ceil(N.width()+1)},selectionCount:function(){var j=p.get.values(),H;return H=p.is.multiple()?Array.isArray(j)?j.length:0:p.get.value()!==""?1:0,H},transition:function(j){return q.transition=="auto"?p.is.upward(j)?"slide up":"slide down":q.transition},userValues:function(){var j=p.get.values();return j?(j=Array.isArray(j)?j:[j],r.grep(j,function(H){return p.get.item(H)===!1})):!1},uniqueArray:function(j){return r.grep(j,function(H,ge){return r.inArray(H,j)===ge})},caretPosition:function(j){var H=k.get(0),ge,me;if(j&&"selectionEnd"in H)return H.selectionEnd;if(!j&&"selectionStart"in H)return H.selectionStart;if(b.selection)return H.focus(),ge=b.selection.createRange(),me=ge.text.length,j?me:(ge.moveStart("character",-H.value.length),ge.text.length-me)},value:function(){var j=Y.length>0?Y.val():ce.data(tt.value),H=Array.isArray(j)&&j.length===1&&j[0]==="";return j===_||H?"":j},values:function(){var j=p.get.value();return j===""?"":!p.has.selectInput()&&p.is.multiple()?typeof j=="string"?p.escape.htmlEntities(j).split(q.delimiter):"":j},remoteValues:function(){var j=p.get.values(),H=!1;return j&&(typeof j=="string"&&(j=[j]),r.each(j,function(ge,me){var De=p.read.remoteData(me);p.verbose("Restoring value from session data",De,me),De&&(H||(H={}),H[me]=De)})),H},choiceText:function(j,H){if(H=H!==_?H:q.preserveHTML,j)return j.find(je.menu).length>0&&(p.verbose("Retrieving text of element with sub-menu"),j=j.clone(),j.find(je.menu).remove(),j.find(je.menuIcon).remove()),j.data(tt.text)!==_?j.data(tt.text):H?j.html().trim():j.text().trim()},choiceValue:function(j,H){return H=H||p.get.choiceText(j),j?j.data(tt.value)!==_?String(j.data(tt.value)):typeof H=="string"?String(q.ignoreSearchCase?H.toLowerCase():H).trim():String(H):!1},inputEvent:function(){var j=k[0];return j?j.oninput!==_?"input":j.onpropertychange!==_?"propertychange":"keyup":!1},selectValues:function(){var j={},H=[],ge=[];return ce.find("option").each(function(){var me=r(this),De=me.html(),ht=me.attr("disabled"),rt=me.attr("value")!==_?me.attr("value"):De,zt=me.data(tt.text)!==_?me.data(tt.text):De,fi=me.parent("optgroup");q.placeholder==="auto"&&rt===""?j.placeholder=De:((fi.length!==H.length||fi[0]!==H[0])&&(ge.push({type:"header",divider:q.headerDivider,name:fi.attr("label")||""}),H=fi),ge.push({name:De,value:rt,text:zt,disabled:ht}))}),q.placeholder&&q.placeholder!=="auto"&&(p.debug("Setting placeholder value to",q.placeholder),j.placeholder=q.placeholder),q.sortSelect?(q.sortSelect===!0?ge.sort(function(me,De){return me.name.localeCompare(De.name)}):q.sortSelect==="natural"?ge.sort(function(me,De){return me.name.toLowerCase().localeCompare(De.name.toLowerCase())}):r.isFunction(q.sortSelect)&&ge.sort(q.sortSelect),j[W.values]=ge,p.debug("Retrieved and sorted values from select",j)):(j[W.values]=ge,p.debug("Retrieved values from select",j)),j},activeItem:function(){return Ye.filter("."+ne.active)},selectedItem:function(){var j=Ye.not(je.unselectable).filter("."+ne.selected);return j.length>0?j:Ye.eq(0)},itemWithAdditions:function(j){var H=p.get.item(j),ge=p.create.userChoice(j),me=ge&&ge.length>0;return me&&(H=H.length>0?H.add(ge):ge),H},item:function(j,H){var ge=!1,me,De;return j=j!==_?j:p.get.values()!==_?p.get.values():p.get.text(),De=p.is.multiple()&&Array.isArray(j),me=De?j.length>0:j!==_&&j!==null,H=j===""||j===!1||j===!0?!0:H||!1,me&&Ye.each(function(){var ht=r(this),rt=p.get.choiceText(ht),zt=p.get.choiceValue(ht,rt);if(!(zt===null||zt===_)){if(De)r.inArray(p.escape.htmlEntities(String(zt)),j.map(function(fi){return String(fi)}))!==-1&&(ge=ge?ge.add(ht):ht);else if(H){if(p.verbose("Ambiguous dropdown value using strict type check",ht,j),zt===j)return ge=ht,!0}else if(q.ignoreCase&&(zt=zt.toLowerCase(),j=j.toLowerCase()),p.escape.htmlEntities(String(zt))===p.escape.htmlEntities(String(j)))return p.verbose("Found select item by value",zt,j),ge=ht,!0}}),ge}},check:{maxSelections:function(j){return q.maxSelections?(j=j!==_?j:p.get.selectionCount(),j>=q.maxSelections?(p.debug("Maximum selection count reached"),q.useLabels&&(Ye.addClass(ne.filtered),p.add.message(c.maxSelections)),!0):(p.verbose("No longer at maximum selection count"),p.remove.message(),p.remove.filteredItem(),p.is.searchSelection()&&p.filterItems(),!1)):!0},disabled:function(){k.attr("tabindex",p.is.disabled()?-1:0)}},restore:{defaults:function(j){p.clear(j),p.restore.defaultText(),p.restore.defaultValue()},defaultText:function(){var j=p.get.defaultText(),H=p.get.placeholderText;j===H?(p.debug("Restoring default placeholder text",j),p.set.placeholderText(j)):(p.debug("Restoring default text",j),p.set.text(j))},placeholderText:function(){p.set.placeholderText()},defaultValue:function(){var j=p.get.defaultValue();j!==_&&(p.debug("Restoring default value",j),j!==""?(p.set.value(j),p.set.selected()):(p.remove.activeItem(),p.remove.selectedItem()))},labels:function(){q.allowAdditions&&(q.useLabels||(p.error(S.labels),q.useLabels=!0),p.debug("Restoring selected values"),p.create.userLabels()),p.check.maxSelections()},selected:function(){p.restore.values(),p.is.multiple()?(p.debug("Restoring previously selected values and labels"),p.restore.labels()):p.debug("Restoring previously selected values")},values:function(){p.set.initialLoad(),q.apiSettings&&q.saveRemoteData&&p.get.remoteValues()?p.restore.remoteValues():p.set.selected();var j=p.get.value();j&&j!==""&&!(Array.isArray(j)&&j.length===0)?Y.removeClass(ne.noselection):Y.addClass(ne.noselection),p.remove.initialLoad()},remoteValues:function(){var j=p.get.remoteValues();p.debug("Recreating selected from session data",j),j&&(p.is.single()?r.each(j,function(H,ge){p.set.text(ge)}):r.each(j,function(H,ge){p.add.label(H,ge)}))}},read:{remoteData:function(j){var H;if(v.Storage===_){p.error(S.noStorage);return}return H=sessionStorage.getItem(j),H!==_?H:!1}},save:{defaults:function(){p.save.defaultText(),p.save.placeholderText(),p.save.defaultValue()},defaultValue:function(){var j=p.get.value();p.verbose("Saving default value as",j),ce.data(tt.defaultValue,j)},defaultText:function(){var j=p.get.text();p.verbose("Saving default text as",j),ce.data(tt.defaultText,j)},placeholderText:function(){var j;q.placeholder!==!1&&P.hasClass(ne.placeholder)&&(j=p.get.text(),p.verbose("Saving placeholder text as",j),ce.data(tt.placeholderText,j))},remoteData:function(j,H){if(v.Storage===_){p.error(S.noStorage);return}p.verbose("Saving remote data to session storage",H,j),sessionStorage.setItem(H,j)}},clear:function(j){p.is.multiple()&&q.useLabels?p.remove.labels():(p.remove.activeItem(),p.remove.selectedItem(),p.remove.filteredItem()),p.set.placeholderText(),p.clearValue(j)},clearValue:function(j){p.set.value("",null,null,j)},scrollPage:function(j,H){var ge=H||p.get.selectedItem(),me=ge.closest(je.menu),De=me.outerHeight(),ht=me.scrollTop(),rt=Ye.eq(0).outerHeight(),zt=Math.floor(De/rt),fi=me.prop("scrollHeight"),vi=j=="up"?ht-rt*zt:ht+rt*zt,nn=Ye.not(je.unselectable),on,an,bn;bn=j=="up"?nn.index(ge)-zt:nn.index(ge)+zt,on=j=="up"?bn>=0:bn<nn.length,an=on?nn.eq(bn):j=="up"?nn.first():nn.last(),an.length>0&&(p.debug("Scrolling page",j,an),ge.removeClass(ne.selected),an.addClass(ne.selected),q.selectOnKeydown&&p.is.single()&&p.set.selectedItem(an),me.scrollTop(vi))},set:{filtered:function(){var j=p.is.multiple(),H=p.is.searchSelection(),ge=j&&H,me=H?p.get.query():"",De=typeof me=="string"&&me.length>0,ht=p.get.searchWidth(),rt=me!=="";j&&De&&(p.verbose("Adjusting input width",ht,q.glyphWidth),k.css("width",ht)),De||ge&&rt?(p.verbose("Hiding placeholder text"),P.addClass(ne.filtered)):(!j||ge&&!rt)&&(p.verbose("Showing placeholder text"),P.removeClass(ne.filtered))},empty:function(){ce.addClass(ne.empty)},loading:function(){ce.addClass(ne.loading)},placeholderText:function(j){j=j||p.get.placeholderText(),p.debug("Setting placeholder text",j),p.set.text(j),P.addClass(ne.placeholder)},tabbable:function(){p.is.searchSelection()?(p.debug("Added tabindex to searchable dropdown"),k.val(""),p.check.disabled(),Ve.attr("tabindex",-1)):(p.debug("Added tabindex to dropdown"),ce.attr("tabindex")===_&&(ce.attr("tabindex",0),Ve.attr("tabindex",-1)))},initialLoad:function(){p.verbose("Setting initial load"),yt=!0},activeItem:function(j){q.allowAdditions&&j.filter(je.addition).length>0?j.addClass(ne.filtered):j.addClass(ne.active)},partialSearch:function(j){var H=p.get.query().length;k.val(j.substr(0,H))},scrollPosition:function(j,H){var ge=5,me,De,ht,rt,zt,fi,vi,nn,on,an;j=j||p.get.selectedItem(),me=j.closest(je.menu),De=j&&j.length>0,H=H!==_?H:!1,p.get.activeItem().length===0&&(H=!1),j&&me.length>0&&De&&(zt=j.position().top,me.addClass(ne.loading),vi=me.scrollTop(),fi=me.offset().top,zt=j.offset().top,ht=vi-fi+zt,H||(nn=me.height(),an=vi+nn<ht+ge,on=ht-ge<vi),p.debug("Scrolling to active item",ht),(H||on||an)&&me.scrollTop(ht),me.removeClass(ne.loading))},text:function(j){q.action==="combo"?(p.debug("Changing combo button text",j,Ne),q.preserveHTML?Ne.html(j):Ne.text(j)):q.action==="activate"&&(j!==p.get.placeholderText()&&P.removeClass(ne.placeholder),p.debug("Changing text",j,P),P.removeClass(ne.filtered),q.preserveHTML?P.html(j):P.text(j))},selectedItem:function(j){var H=p.get.choiceValue(j),ge=p.get.choiceText(j,!1),me=p.get.choiceText(j,!0);p.debug("Setting user selection to item",j),p.remove.activeItem(),p.set.partialSearch(ge),p.set.activeItem(j),p.set.selected(H,j),p.set.text(me)},selectedLetter:function(j){var H=Ye.filter("."+ne.selected),ge=H.length>0&&p.has.firstLetter(H,j),me=!1,De;ge&&(De=H.nextAll(Ye).eq(0),p.has.firstLetter(De,j)&&(me=De)),me||Ye.each(function(){if(p.has.firstLetter(r(this),j))return me=r(this),!1}),me&&(p.verbose("Scrolling to next value with letter",j),p.set.scrollPosition(me),H.removeClass(ne.selected),me.addClass(ne.selected),q.selectOnKeydown&&p.is.single()&&p.set.selectedItem(me))},direction:function(j){q.direction=="auto"?(j?p.is.upward(j)&&p.remove.upward(j):p.remove.upward(),p.can.openDownward(j)?p.remove.upward(j):p.set.upward(j),!p.is.leftward(j)&&!p.can.openRightward(j)&&p.set.leftward(j)):q.direction=="upward"&&p.set.upward(j)},upward:function(j){var H=j||ce;H.addClass(ne.upward)},leftward:function(j){var H=j||Ve;H.addClass(ne.leftward)},value:function(j,H,ge,me){j!==_&&j!==""&&!(Array.isArray(j)&&j.length===0)?Y.removeClass(ne.noselection):Y.addClass(ne.noselection);var De=p.escape.value(j),ht=Y.length>0,rt=p.get.values(),zt=j!==_?String(j):j,fi;if(ht){if(!q.allowReselection&&zt==rt&&(p.verbose("Skipping value update already same value",j,rt),!p.is.initialLoad()))return;p.is.single()&&p.has.selectInput()&&p.can.extendSelect()&&(p.debug("Adding user option",j),p.add.optionValue(j)),p.debug("Updating input value",De,rt),nt=!0,Y.val(De),q.fireOnInit===!1&&p.is.initialLoad()?p.debug("Input native change event ignored on initial load"):me!==!0&&p.trigger.change(),nt=!1}else p.verbose("Storing value in metadata",De,Y),De!==rt&&ce.data(tt.value,zt);q.fireOnInit===!1&&p.is.initialLoad()?p.verbose("No callback on initial load",q.onChange):me!==!0&&q.onChange.call(ee,j,H,ge)},active:function(){ce.addClass(ne.active)},multiple:function(){ce.addClass(ne.multiple)},visible:function(){ce.addClass(ne.visible)},exactly:function(j,H){p.debug("Setting selected to exact values"),p.clear(),p.set.selected(j,H)},selected:function(j,H){var ge=p.is.multiple();H=q.allowAdditions?H||p.get.itemWithAdditions(j):H||p.get.item(j),H&&(p.debug("Setting selected menu item to",H),p.is.multiple()&&p.remove.searchWidth(),p.is.single()?(p.remove.activeItem(),p.remove.selectedItem()):q.useLabels&&p.remove.selectedItem(),H.each(function(){var me=r(this),De=p.get.choiceText(me),ht=p.get.choiceValue(me,De),rt=me.hasClass(ne.filtered),zt=me.hasClass(ne.active),fi=me.hasClass(ne.addition),vi=ge&&H.length==1;ge?!zt||fi?(q.apiSettings&&q.saveRemoteData&&p.save.remoteData(De,ht),q.useLabels?(p.add.label(ht,De,vi),p.add.value(ht,De,me),p.set.activeItem(me),p.filterActive(),p.select.nextAvailable(H)):(p.add.value(ht,De,me),p.set.text(p.add.variables(c.count)),p.set.activeItem(me))):!rt&&(q.useLabels||Ge)&&(p.debug("Selected active value, removing label"),p.remove.selected(ht)):(q.apiSettings&&q.saveRemoteData&&p.save.remoteData(De,ht),p.set.text(De),p.set.value(ht,De,me),me.addClass(ne.active).addClass(ne.selected))}),p.remove.searchTerm())}},add:{label:function(j,H,ge){var me=p.is.searchSelection()?k:P,De=p.escape.value(j),ht;if(q.ignoreCase&&(De=De.toLowerCase()),ht=r("<a />").addClass(ne.label).attr("data-"+tt.value,De).html(si.label(De,H,q.preserveHTML,q.className)),ht=q.onLabelCreate.call(ht,De,H),p.has.label(j)){p.debug("User selection already exists, skipping",De);return}q.label.variation&&ht.addClass(q.label.variation),ge===!0?(p.debug("Animating in label",ht),ht.addClass(ne.hidden).insertBefore(me).transition({animation:q.label.transition,debug:q.debug,verbose:q.verbose,duration:q.label.duration})):(p.debug("Adding selection label",ht),ht.insertBefore(me))},message:function(j){var H=Ve.children(je.message),ge=q.templates.message(p.add.variables(j));H.length>0?H.html(ge):H=r("<div/>").html(ge).addClass(ne.message).appendTo(Ve)},optionValue:function(j){var H=p.escape.value(j),ge=Y.find('option[value="'+p.escape.string(H)+'"]'),me=ge.length>0;me||(p.disconnect.selectObserver(),p.is.single()&&(p.verbose("Removing previous user addition"),Y.find("option."+ne.addition).remove()),r("<option/>").prop("value",H).addClass(ne.addition).html(j).appendTo(Y),p.verbose("Adding user addition as an <option>",j),p.observe.select())},userSuggestion:function(j){var H=Ve.children(je.addition),ge=p.get.item(j),me=ge&&ge.not(je.addition).length,De=H.length>0,ht;if(!(q.useLabels&&p.has.maxSelections())){if(j===""||me){H.remove();return}De?(H.data(tt.value,j).data(tt.text,j).attr("data-"+tt.value,j).attr("data-"+tt.text,j).removeClass(ne.filtered),q.hideAdditions||(ht=q.templates.addition(p.add.variables(c.addResult,j)),H.html(ht)),p.verbose("Replacing user suggestion with new value",H)):(H=p.create.userChoice(j),H.prependTo(Ve),p.verbose("Adding item choice to menu corresponding with user choice addition",H)),(!q.hideAdditions||p.is.allFiltered())&&H.addClass(ne.selected).siblings().removeClass(ne.selected),p.refreshItems()}},variables:function(j,H){var ge=j.search("{count}")!==-1,me=j.search("{maxCount}")!==-1,De=j.search("{term}")!==-1,ht,rt;return p.verbose("Adding templated variables to message",j),ge&&(ht=p.get.selectionCount(),j=j.replace("{count}",ht)),me&&(ht=p.get.selectionCount(),j=j.replace("{maxCount}",q.maxSelections)),De&&(rt=H||p.get.query(),j=j.replace("{term}",rt)),j},value:function(j,H,ge){var me=p.get.values(),De;if(p.has.value(j)){p.debug("Value already selected");return}if(j===""){p.debug("Cannot select blank values from multiselect");return}Array.isArray(me)?(De=me.concat([j]),De=p.get.uniqueArray(De)):De=[j],p.has.selectInput()?p.can.extendSelect()&&(p.debug("Adding value to select",j,De,Y),p.add.optionValue(j)):(De=De.join(q.delimiter),p.debug("Setting hidden input to delimited value",De,Y)),q.fireOnInit===!1&&p.is.initialLoad()?p.verbose("Skipping onadd callback on initial load",q.onAdd):q.onAdd.call(ee,j,H,ge),p.set.value(De,H,ge),p.check.maxSelections()}},remove:{active:function(){ce.removeClass(ne.active)},activeLabel:function(){ce.find(je.label).removeClass(ne.active)},empty:function(){ce.removeClass(ne.empty)},loading:function(){ce.removeClass(ne.loading)},initialLoad:function(){yt=!1},upward:function(j){var H=j||ce;H.removeClass(ne.upward)},leftward:function(j){var H=j||Ve;H.removeClass(ne.leftward)},visible:function(){ce.removeClass(ne.visible)},activeItem:function(){Ye.removeClass(ne.active)},filteredItem:function(){q.useLabels&&p.has.maxSelections()||(q.useLabels&&p.is.multiple()?Ye.not("."+ne.active).removeClass(ne.filtered):Ye.removeClass(ne.filtered),q.hideDividers&&Lt.removeClass(ne.hidden),p.remove.empty())},optionValue:function(j){var H=p.escape.value(j),ge=Y.find('option[value="'+p.escape.string(H)+'"]'),me=ge.length>0;!me||!ge.hasClass(ne.addition)||(ti&&(ti.disconnect(),p.verbose("Temporarily disconnecting mutation observer")),ge.remove(),p.verbose("Removing user addition as an <option>",H),ti&&ti.observe(Y[0],{childList:!0,subtree:!0}))},message:function(){Ve.children(je.message).remove()},searchWidth:function(){k.css("width","")},searchTerm:function(){p.verbose("Cleared search term"),k.val(""),p.set.filtered()},userAddition:function(){Ye.filter(je.addition).remove()},selected:function(j,H){if(H=q.allowAdditions?H||p.get.itemWithAdditions(j):H||p.get.item(j),!H)return!1;H.each(function(){var ge=r(this),me=p.get.choiceText(ge),De=p.get.choiceValue(ge,me);p.is.multiple()?q.useLabels?(p.remove.value(De,me,ge),p.remove.label(De)):(p.remove.value(De,me,ge),p.get.selectionCount()===0?p.set.placeholderText():p.set.text(p.add.variables(c.count))):p.remove.value(De,me,ge),ge.removeClass(ne.filtered).removeClass(ne.active),q.useLabels&&ge.removeClass(ne.selected)})},selectedItem:function(){Ye.removeClass(ne.selected)},value:function(j,H,ge){var me=p.get.values(),De;j=p.escape.htmlEntities(j),p.has.selectInput()?(p.verbose("Input is <select> removing selected option",j),De=p.remove.arrayValue(j,me),p.remove.optionValue(j)):(p.verbose("Removing from delimited values",j),De=p.remove.arrayValue(j,me),De=De.join(q.delimiter)),q.fireOnInit===!1&&p.is.initialLoad()?p.verbose("No callback on initial load",q.onRemove):q.onRemove.call(ee,j,H,ge),p.set.value(De,H,ge),p.check.maxSelections()},arrayValue:function(j,H){return Array.isArray(H)||(H=[H]),H=r.grep(H,function(ge){return j!=ge}),p.verbose("Removed value from delimited string",j,H),H},label:function(j,H){var ge=ce.find(je.label),me=ge.filter("[data-"+tt.value+'="'+p.escape.string(q.ignoreCase?j.toLowerCase():j)+'"]');p.verbose("Removing label",me),me.remove()},activeLabels:function(j){j=j||ce.find(je.label).filter("."+ne.active),p.verbose("Removing active label selections",j),p.remove.labels(j)},labels:function(j){j=j||ce.find(je.label),p.verbose("Removing labels",j),j.each(function(){var H=r(this),ge=H.data(tt.value),me=ge!==_?String(ge):ge,De=p.is.userValue(me);if(q.onLabelRemove.call(H,ge)===!1){p.debug("Label remove callback cancelled removal");return}p.remove.message(),De?(p.remove.value(me),p.remove.label(me)):p.remove.selected(me)})},tabbable:function(){p.is.searchSelection()?(p.debug("Searchable dropdown initialized"),k.removeAttr("tabindex"),Ve.removeAttr("tabindex")):(p.debug("Simple selection dropdown initialized"),ce.removeAttr("tabindex"),Ve.removeAttr("tabindex"))},diacritics:function(j){return q.ignoreDiacritics?j.normalize("NFD").replace(/[\u0300-\u036f]/g,""):j}},has:{menuSearch:function(){return p.has.search()&&k.closest(Ve).length>0},clearItem:function(){return Oe.length>0},search:function(){return k.length>0},sizer:function(){return N.length>0},selectInput:function(){return Y.is("select")},minCharacters:function(j){return q.minCharacters&&!te?(j=String(j!==_?j:p.get.query()),j.length>=q.minCharacters):(te=!1,!0)},firstLetter:function(j,H){var ge,me;return!j||j.length===0||typeof H!="string"?!1:(ge=p.get.choiceText(j,!1),H=H.toLowerCase(),me=String(ge).charAt(0).toLowerCase(),H==me)},input:function(){return Y.length>0},items:function(){return Ye.length>0},menu:function(){return Ve.length>0},message:function(){return Ve.children(je.message).length!==0},label:function(j){var H=p.escape.value(j),ge=ce.find(je.label);return q.ignoreCase&&(H=H.toLowerCase()),ge.filter("[data-"+tt.value+'="'+p.escape.string(H)+'"]').length>0},maxSelections:function(){return q.maxSelections&&p.get.selectionCount()>=q.maxSelections},allResultsFiltered:function(){var j=Ye.not(je.addition);return j.filter(je.unselectable).length===j.length},userSuggestion:function(){return Ve.children(je.addition).length>0},query:function(){return p.get.query()!==""},value:function(j){return q.ignoreCase?p.has.valueIgnoringCase(j):p.has.valueMatchingCase(j)},valueMatchingCase:function(j){var H=p.get.values(),ge=Array.isArray(H)?H&&r.inArray(j,H)!==-1:H==j;return!!ge},valueIgnoringCase:function(j){var H=p.get.values(),ge=!1;return Array.isArray(H)||(H=[H]),r.each(H,function(me,De){if(String(j).toLowerCase()==String(De).toLowerCase())return ge=!0,!1}),ge}},is:{active:function(){return ce.hasClass(ne.active)},animatingInward:function(){return Ve.transition("is inward")},animatingOutward:function(){return Ve.transition("is outward")},bubbledLabelClick:function(j){return r(j.target).is("select, input")&&ce.closest("label").length>0},bubbledIconClick:function(j){return r(j.target).closest(ve).length>0},alreadySetup:function(){return ce.is("select")&&ce.parent(je.dropdown).data(xt)!==_&&ce.prev().length===0},animating:function(j){return j?j.transition&&j.transition("is animating"):Ve.transition&&Ve.transition("is animating")},leftward:function(j){var H=j||Ve;return H.hasClass(ne.leftward)},clearable:function(){return ce.hasClass(ne.clearable)||q.clearable},disabled:function(){return ce.hasClass(ne.disabled)},focused:function(){return b.activeElement===ce[0]},focusedOnSearch:function(){return b.activeElement===k[0]},allFiltered:function(){return(p.is.multiple()||p.has.search())&&!(q.hideAdditions==!1&&p.has.userSuggestion())&&!p.has.message()&&p.has.allResultsFiltered()},hidden:function(j){return!p.is.visible(j)},initialLoad:function(){return yt},inObject:function(j,H){var ge=!1;return r.each(H,function(me,De){if(De==j)return ge=!0,!0}),ge},multiple:function(){return ce.hasClass(ne.multiple)},remote:function(){return q.apiSettings&&p.can.useAPI()},single:function(){return!p.is.multiple()},selectMutation:function(j){var H=!1;return r.each(j,function(ge,me){if(r(me.target).is("select")||r(me.addedNodes).is("select"))return H=!0,!1}),H},search:function(){return ce.hasClass(ne.search)},searchSelection:function(){return p.has.search()&&k.parent(je.dropdown).length===1},selection:function(){return ce.hasClass(ne.selection)},userValue:function(j){return r.inArray(j,p.get.userValues())!==-1},upward:function(j){var H=j||ce;return H.hasClass(ne.upward)},visible:function(j){return j?j.hasClass(ne.visible):Ve.hasClass(ne.visible)},verticallyScrollableContext:function(){var j=G.get(0)!==v?G.css("overflow-y"):!1;return j=="auto"||j=="scroll"},horizontallyScrollableContext:function(){var j=G.get(0)!==v?G.css("overflow-X"):!1;return j=="auto"||j=="scroll"}},can:{activate:function(j){return!!(q.useLabels||!p.has.maxSelections()||p.has.maxSelections()&&j.hasClass(ne.active))},openDownward:function(j){var H=j||Ve,ge=!0,me={},De;return H.addClass(ne.loading),De={context:{offset:G.get(0)===v?{top:0,left:0}:G.offset(),scrollTop:G.scrollTop(),height:G.outerHeight()},menu:{offset:H.offset(),height:H.outerHeight()}},p.is.verticallyScrollableContext()&&(De.menu.offset.top+=De.context.scrollTop),me={above:De.context.scrollTop<=De.menu.offset.top-De.context.offset.top-De.menu.height,below:De.context.scrollTop+De.context.height>=De.menu.offset.top-De.context.offset.top+De.menu.height},me.below?(p.verbose("Dropdown can fit in context downward",me),ge=!0):!me.below&&!me.above?(p.verbose("Dropdown cannot fit in either direction, favoring downward",me),ge=!0):(p.verbose("Dropdown cannot fit below, opening upward",me),ge=!1),H.removeClass(ne.loading),ge},openRightward:function(j){var H=j||Ve,ge=!0,me=!1,De;return H.addClass(ne.loading),De={context:{offset:G.get(0)===v?{top:0,left:0}:G.offset(),scrollLeft:G.scrollLeft(),width:G.outerWidth()},menu:{offset:H.offset(),width:H.outerWidth()}},p.is.horizontallyScrollableContext()&&(De.menu.offset.left+=De.context.scrollLeft),me=De.menu.offset.left-De.context.offset.left+De.menu.width>=De.context.scrollLeft+De.context.width,me&&(p.verbose("Dropdown cannot fit in context rightward",me),ge=!1),H.removeClass(ne.loading),ge},click:function(){return Z||q.on=="click"},extendSelect:function(){return q.allowAdditions||q.apiSettings},show:function(){return!p.is.disabled()&&(p.has.items()||p.has.message())},useAPI:function(){return r.fn.api!==_}},animate:{show:function(j,H){var ge=H||Ve,me=H?function(){}:function(){p.hideSubMenus(),p.hideOthers(),p.set.active()},De;if(j=r.isFunction(j)?j:function(){},p.verbose("Doing menu show animation",ge),p.set.direction(H),De=p.get.transition(H),p.is.selection()&&p.set.scrollPosition(p.get.selectedItem(),!0),p.is.hidden(ge)||p.is.animating(ge)){var ht=ce.hasClass("column")?"flex":!1;De=="none"?(me(),ge.transition({displayType:ht}).transition("show"),j.call(ee)):r.fn.transition!==_&&ce.transition("is supported")?ge.transition({animation:De+" in",debug:q.debug,verbose:q.verbose,duration:q.duration,queue:!0,onStart:me,displayType:ht,onComplete:function(){j.call(ee)}}):p.error(S.noTransition,De)}},hide:function(j,H){var ge=H||Ve,me=H?function(){}:function(){p.can.click()&&p.unbind.intent(),p.remove.active()},De=p.get.transition(H);j=r.isFunction(j)?j:function(){},(p.is.visible(ge)||p.is.animating(ge))&&(p.verbose("Doing menu hide animation",ge),De=="none"?(me(),ge.transition("hide"),j.call(ee)):r.fn.transition!==_&&ce.transition("is supported")?ge.transition({animation:De+" out",duration:q.duration,debug:q.debug,verbose:q.verbose,queue:!1,onStart:me,onComplete:function(){j.call(ee)}}):p.error(S.transition))}},hideAndClear:function(){p.remove.searchTerm(),!p.has.maxSelections()&&(p.has.search()?p.hide(function(){p.remove.filteredItem()}):p.hide())},delay:{show:function(){p.verbose("Delaying show event to ensure user intent"),clearTimeout(p.timer),p.timer=setTimeout(p.show,q.delay.show)},hide:function(){p.verbose("Delaying hide event to ensure user intent"),clearTimeout(p.timer),p.timer=setTimeout(p.hide,q.delay.hide)}},escape:{value:function(j){var H=Array.isArray(j),ge=typeof j=="string",me=!ge&&!H,De=ge&&j.search(et.quote)!==-1,ht=[];return me||!De?j:(p.debug("Encoding quote values for use in select",j),H?(r.each(j,function(rt,zt){ht.push(zt.replace(et.quote,"&quot;"))}),ht):j.replace(et.quote,"&quot;"))},string:function(j){return j=String(j),j.replace(et.escape,"\\$&")},htmlEntities:function(j){var H=/[<>"'`]/g,ge=/[&<>"'`]/,me={"<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},De=function(ht){return me[ht]};return ge.test(j)?(j=j.replace(/&(?![a-z0-9#]{1,6};)/,"&amp;"),j.replace(H,De)):j}},setting:function(j,H){if(p.debug("Changing setting",j,H),r.isPlainObject(j))r.extend(!0,q,j);else if(H!==_)r.isPlainObject(q[j])?r.extend(!0,q[j],H):q[j]=H;else return q[j]},internal:function(j,H){if(r.isPlainObject(j))r.extend(!0,p,j);else if(H!==_)p[j]=H;else return p[j]},debug:function(){!q.silent&&q.debug&&(q.performance?p.performance.log(arguments):(p.debug=Function.prototype.bind.call(console.info,console,q.name+":"),p.debug.apply(console,arguments)))},verbose:function(){!q.silent&&q.verbose&&q.debug&&(q.performance?p.performance.log(arguments):(p.verbose=Function.prototype.bind.call(console.info,console,q.name+":"),p.verbose.apply(console,arguments)))},error:function(){q.silent||(p.error=Function.prototype.bind.call(console.error,console,q.name+":"),p.error.apply(console,arguments))},performance:{log:function(j){var H,ge,me;q.performance&&(H=new Date().getTime(),me=we||H,ge=H-me,we=H,Be.push({Name:j[0],Arguments:[].slice.call(j,1)||"",Element:ee,"Execution Time":ge})),clearTimeout(p.performance.timer),p.performance.timer=setTimeout(p.performance.display,500)},display:function(){var j=q.name+":",H=0;we=!1,clearTimeout(p.performance.timer),r.each(Be,function(ge,me){H+=me["Execution Time"]}),j+=" "+H+"ms",J&&(j+=" '"+J+"'"),(console.group!==_||console.table!==_)&&Be.length>0&&(console.groupCollapsed(j),console.table?console.table(Be):r.each(Be,function(ge,me){console.log(me.Name+": "+me["Execution Time"]+"ms")}),console.groupEnd()),Be=[]}},invoke:function(j,H,ge){var me=oe,De,ht,rt;return H=H||Ke,ge=ee||ge,typeof j=="string"&&me!==_&&(j=j.split(/[\. ]/),De=j.length-1,r.each(j,function(zt,fi){var vi=zt!=De?fi+j[zt+1].charAt(0).toUpperCase()+j[zt+1].slice(1):j;if(r.isPlainObject(me[vi])&&zt!=De)me=me[vi];else{if(me[vi]!==_)return ht=me[vi],!1;if(r.isPlainObject(me[fi])&&zt!=De)me=me[fi];else return me[fi]!==_?(ht=me[fi],!1):(p.error(S.method,j),!1)}})),r.isFunction(ht)?rt=ht.apply(ge,H):ht!==_&&(rt=ht),Array.isArray(At)?At.push(rt):At!==_?At=[At,rt]:rt!==_&&(At=rt),ht}},Q?(oe===_&&p.initialize(),p.invoke(Ue)):(oe!==_&&oe.invoke("destroy"),p.initialize())}),At!==_?At:O},r.fn.dropdown.settings={silent:!1,debug:!1,verbose:!1,performance:!0,on:"click",action:"activate",values:!1,clearable:!1,apiSettings:!1,selectOnKeydown:!0,minCharacters:0,filterRemoteData:!1,saveRemoteData:!0,throttle:200,context:v,direction:"auto",keepOnScreen:!0,match:"both",fullTextSearch:!1,ignoreDiacritics:!1,hideDividers:!1,placeholder:"auto",preserveHTML:!0,sortSelect:!1,forceSelection:!0,allowAdditions:!1,ignoreCase:!1,ignoreSearchCase:!0,hideAdditions:!0,maxSelections:!1,useLabels:!0,delimiter:",",showOnFocus:!0,allowReselection:!1,allowTab:!0,allowCategorySelection:!1,fireOnInit:!1,transition:"auto",duration:200,glyphWidth:1.037,headerDivider:!0,label:{transition:"scale",duration:200,variation:!1},delay:{hide:300,show:200,search:20,touch:50},onChange:function(g,O,R){},onAdd:function(g,O,R){},onRemove:function(g,O,R){},onLabelSelect:function(g){},onLabelCreate:function(g,O){return r(this)},onLabelRemove:function(g){return!0},onNoResults:function(g){return!0},onShow:function(){},onHide:function(){},onAfterFiltered:function(){},name:"Dropdown",namespace:"dropdown",message:{addResult:"Add <b>{term}</b>",count:"{count} selected",maxSelections:"Max {maxCount} selections",noResults:"No results found.",serverError:"There was an error contacting the server"},error:{action:"You called a dropdown action that was not defined",alreadySetup:"Once a select has been initialized behaviors must be called on the created ui dropdown",labels:"Allowing user additions currently requires the use of labels.",missingMultiple:"<select> requires multiple property to be set to correctly preserve multiple values",method:"The method you called is not defined.",noAPI:"The API module is required to load resources remotely",noStorage:"Saving remote data requires session storage",noTransition:"This module requires ui transitions <https://github.com/Semantic-Org/UI-Transition>",noNormalize:'"ignoreDiacritics" setting will be ignored. Browser does not support String().normalize(). You may consider including <https://cdn.jsdelivr.net/npm/unorm@1.4.1/lib/unorm.min.js> as a polyfill.'},regExp:{escape:/[-[\]{}()*+?.,\\^$|#\s:=@]/g,quote:/"/g},metadata:{defaultText:"defaultText",defaultValue:"defaultValue",placeholderText:"placeholder",text:"text",value:"value"},fields:{remoteValues:"results",values:"values",disabled:"disabled",name:"name",value:"value",text:"text",type:"type",image:"image",imageClass:"imageClass",icon:"icon",iconClass:"iconClass",class:"class",divider:"divider"},keys:{backspace:8,delimiter:188,deleteKey:46,enter:13,escape:27,pageUp:33,pageDown:34,leftArrow:37,upArrow:38,rightArrow:39,downArrow:40},selector:{addition:".addition",divider:".divider, .header",dropdown:".ui.dropdown",hidden:".hidden",icon:"> .dropdown.icon",input:'> input[type="hidden"], > select',item:".item",label:"> .label",remove:"> .label > .delete.icon",siblingLabel:".label",menu:".menu",message:".message",menuIcon:".dropdown.icon",search:"input.search, .menu > .search > input, .menu input.search",sizer:"> span.sizer",text:"> .text:not(.icon)",unselectable:".disabled, .filtered, .tw-hidden",clearIcon:"> .remove.icon"},className:{active:"active",addition:"addition",animating:"animating",disabled:"disabled",empty:"empty",dropdown:"ui dropdown",filtered:"filtered",hidden:"hidden transition",icon:"icon",image:"image",item:"item",label:"ui label",loading:"loading",menu:"menu",message:"message",multiple:"multiple",placeholder:"default",sizer:"sizer",search:"search",selected:"selected",selection:"selection",upward:"upward",leftward:"left",visible:"visible",clearable:"clearable",noselection:"noselection",delete:"delete",header:"header",divider:"divider",groupIcon:"",unfilterable:"unfilterable"}},r.fn.dropdown.settings.templates={deQuote:function(g){return String(g).replace(/"/g,"")},escape:function(g,O){if(O)return g;var R=/[<>"'`]/g,J=/[&<>"'`]/,Z={"<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},C=function(we){return Z[we]};return J.test(g)?(g=g.replace(/&(?![a-z0-9#]{1,6};)/,"&amp;"),g.replace(R,C)):g},dropdown:function(g,O,R,J){var Z=g.placeholder||!1,C="",we=r.fn.dropdown.settings.templates.escape;return C+='<i class="dropdown icon"></i>',Z?C+='<div class="default text">'+we(Z,R)+"</div>":C+='<div class="text"></div>',C+='<div class="'+J.menu+'">',C+=r.fn.dropdown.settings.templates.menu(g,O,R,J),C+="</div>",C},menu:function(g,O,R,J){var Z=g[O.values]||[],C="",we=r.fn.dropdown.settings.templates.escape,Be=r.fn.dropdown.settings.templates.deQuote;return r.each(Z,function(Ue,Q){var Ke=Q[O.type]?Q[O.type]:"item";if(Ke==="item"){var At=Q[O.text]?' data-text="'+we(Q[O.text])+'"':"",gt=Q[O.disabled]?J.disabled+" ":"";C+='<div class="'+gt+(Q[O.class]?Be(Q[O.class]):J.item)+'" data-value="'+we(Q[O.value])+'"'+At+">",Q[O.image]&&(C+='<img class="'+(Q[O.imageClass]?Be(Q[O.imageClass]):J.image)+'" src="'+Be(Q[O.image])+'">'),Q[O.icon]&&(C+='<i class="'+Be(Q[O.icon])+" "+(Q[O.iconClass]?Be(Q[O.iconClass]):J.icon)+'"></i>'),C+=we(Q[O.name]||"",R),C+="</div>"}else if(Ke==="header"){var q=we(Q[O.name]||"",R),ne=Q[O.icon]?Be(Q[O.icon]):J.groupIcon;(q!==""||ne!=="")&&(C+='<div class="'+(Q[O.class]?Be(Q[O.class]):J.header)+'">',ne!==""&&(C+='<i class="'+ne+" "+(Q[O.iconClass]?Be(Q[O.iconClass]):J.icon)+'"></i>'),C+=q,C+="</div>"),Q[O.divider]&&(C+='<div class="'+J.divider+'"></div>')}}),C},label:function(g,O,R,J){var Z=r.fn.dropdown.settings.templates.escape;return Z(O,R)+'<i class="'+J.delete+' icon"></i>'},message:function(g){return g},addition:function(g){return g}}})(jQuery,window,document);(function(r,v,b,_){"use strict";r.isFunction=r.isFunction||function(g){return typeof g=="function"&&typeof g.nodeType!="number"},v=typeof v<"u"&&v.Math==Math?v:typeof self<"u"&&self.Math==Math?self:Function("return this")(),r.fn.modal=function(g){var O=r(this),R=r(v),J=r(b),Z=r("body"),C=O.selector||"",we=new Date().getTime(),Be=[],Ue=arguments[0],Q=typeof Ue=="string",Ke=[].slice.call(arguments,1),At=v.requestAnimationFrame||v.mozRequestAnimationFrame||v.webkitRequestAnimationFrame||v.msRequestAnimationFrame||function(q){setTimeout(q,0)},gt;return O.each(function(){var q=r.isPlainObject(g)?r.extend(!0,{},r.fn.modal.settings,g):r.extend({},r.fn.modal.settings),ne=q.selector,c=q.className,W=q.namespace,Re=q.error,tt="."+W,st="module-"+W,et=r(this),je=r(q.context),S=et.find(ne.close),si,ct,xt,ce,G,P=this,k=et.data(st),N=!1,Y,ve,Oe="",Ne="",Ve,Ye,Lt,K;K={initialize:function(){K.cache={},K.verbose("Initializing dimmer",je),K.create.id(),K.create.dimmer(),q.allowMultiple&&K.create.innerDimmer(),q.centered||et.addClass("top aligned"),K.refreshModals(),K.bind.events(),q.observeChanges&&K.observeChanges(),K.instantiate()},instantiate:function(){K.verbose("Storing instance of modal"),k=K,et.data(st,k)},create:{dimmer:function(){var Ee={debug:q.debug,dimmerName:"modals"},nt=r.extend(!0,Ee,q.dimmerSettings);if(r.fn.dimmer===_){K.error(Re.dimmer);return}K.debug("Creating dimmer"),ce=je.dimmer(nt),q.detachable?(K.verbose("Modal is detachable, moving content into dimmer"),ce.dimmer("add content",et)):K.set.undetached(),G=ce.dimmer("get dimmer")},id:function(){Ye=(Math.random().toString(16)+"000000000").substr(2,8),Ve="."+Ye,K.verbose("Creating unique id for element",Ye)},innerDimmer:function(){et.find(ne.dimmer).length==0&&et.prepend('<div class="ui inverted dimmer"></div>')}},destroy:function(){Lt&&Lt.disconnect(),K.verbose("Destroying previous modal"),et.removeData(st).off(tt),R.off(Ve),G.off(Ve),S.off(tt),je.dimmer("destroy")},observeChanges:function(){"MutationObserver"in v&&(Lt=new MutationObserver(function(Ee){K.debug("DOM tree modified, refreshing"),K.refresh()}),Lt.observe(P,{childList:!0,subtree:!0}),K.debug("Setting up mutation observer",Lt))},refresh:function(){K.remove.scrolling(),K.cacheSizes(),K.can.useFlex()||K.set.modalOffset(),K.set.screenHeight(),K.set.type()},refreshModals:function(){ct=et.siblings(ne.modal),si=ct.add(et)},attachEvents:function(Ee,nt){var te=r(Ee);nt=r.isFunction(K[nt])?K[nt]:K.toggle,te.length>0?(K.debug("Attaching modal events to element",Ee,nt),te.off(tt).on("click"+tt,nt)):K.error(Re.notFound,Ee)},bind:{events:function(){K.verbose("Attaching events"),et.on("click"+tt,ne.close,K.event.close).on("click"+tt,ne.approve,K.event.approve).on("click"+tt,ne.deny,K.event.deny),R.on("resize"+Ve,K.event.resize)},scrollLock:function(){ce.get(0).addEventListener("touchmove",K.event.preventScroll,{passive:!1})}},unbind:{scrollLock:function(){ce.get(0).removeEventListener("touchmove",K.event.preventScroll,{passive:!1})}},get:{id:function(){return(Math.random().toString(16)+"000000000").substr(2,8)}},event:{approve:function(){if(N||q.onApprove.call(P,r(this))===!1){K.verbose("Approve callback returned false cancelling hide");return}N=!0,K.hide(function(){N=!1})},preventScroll:function(Ee){Ee.target.className.indexOf("dimmer")!==-1&&Ee.preventDefault()},deny:function(){if(N||q.onDeny.call(P,r(this))===!1){K.verbose("Deny callback returned false cancelling hide");return}N=!0,K.hide(function(){N=!1})},close:function(){K.hide()},mousedown:function(Ee){var nt=r(Ee.target),te=K.is.rtl();Y=nt.closest(ne.modal).length>0,Y&&K.verbose("Mouse down event registered inside the modal"),ve=K.is.scrolling()&&(!te&&r(v).outerWidth()-q.scrollbarWidth<=Ee.clientX||te&&q.scrollbarWidth>=Ee.clientX),ve&&K.verbose("Mouse down event registered inside the scrollbar")},mouseup:function(Ee){if(!q.closable){K.verbose("Dimmer clicked but closable setting is disabled");return}if(Y){K.debug("Dimmer clicked but mouse down was initially registered inside the modal");return}if(ve){K.debug("Dimmer clicked but mouse down was initially registered inside the scrollbar");return}var nt=r(Ee.target),te=nt.closest(ne.modal).length>0,ee=r.contains(b.documentElement,Ee.target);if(!te&&ee&&K.is.active()&&et.hasClass(c.front)){if(K.debug("Dimmer clicked, hiding all modals"),q.allowMultiple){if(!K.hideAll())return}else if(!K.hide())return;K.remove.clickaway()}},debounce:function(Ee,nt){clearTimeout(K.timer),K.timer=setTimeout(Ee,nt)},keyboard:function(Ee){var nt=Ee.which,te=27;nt==te&&(q.closable?(K.debug("Escape key pressed hiding modal"),et.hasClass(c.front)&&K.hide()):K.debug("Escape key pressed, but closable is set to false"),Ee.preventDefault())},resize:function(){ce.dimmer("is active")&&(K.is.animating()||K.is.active())&&At(K.refresh)}},toggle:function(){K.is.active()||K.is.animating()?K.hide():K.show()},show:function(Ee){Ee=r.isFunction(Ee)?Ee:function(){},K.refreshModals(),K.set.dimmerSettings(),K.set.dimmerStyles(),K.showModal(Ee)},hide:function(Ee){return Ee=r.isFunction(Ee)?Ee:function(){},K.refreshModals(),K.hideModal(Ee)},showModal:function(Ee){Ee=r.isFunction(Ee)?Ee:function(){},K.is.animating()||!K.is.active()?(K.showDimmer(),K.cacheSizes(),K.set.bodyMargin(),K.can.useFlex()?K.remove.legacy():(K.set.legacy(),K.set.modalOffset(),K.debug("Using non-flex legacy modal positioning.")),K.set.screenHeight(),K.set.type(),K.set.clickaway(),!q.allowMultiple&&K.others.active()?K.hideOthers(K.showModal):(N=!1,q.allowMultiple&&(K.others.active()&&ct.filter("."+c.active).find(ne.dimmer).addClass("active"),q.detachable&&et.detach().appendTo(G)),q.onShow.call(P),q.transition&&r.fn.transition!==_&&et.transition("is supported")?(K.debug("Showing modal with css animations"),et.transition({debug:q.debug,animation:q.transition+" in",queue:q.queue,duration:q.duration,useFailSafe:!0,onComplete:function(){q.onVisible.apply(P),q.keyboardShortcuts&&K.add.keyboardShortcuts(),K.save.focus(),K.set.active(),q.autofocus&&K.set.autofocus(),Ee()}})):K.error(Re.noTransition))):K.debug("Modal is already visible")},hideModal:function(Ee,nt,te){var ee=ct.filter("."+c.active).last();if(Ee=r.isFunction(Ee)?Ee:function(){},K.debug("Hiding modal"),q.onHide.call(P,r(this))===!1)return K.verbose("Hide callback returned false cancelling hide"),N=!1,!1;(K.is.animating()||K.is.active())&&(q.transition&&r.fn.transition!==_&&et.transition("is supported")?(K.remove.active(),et.transition({debug:q.debug,animation:q.transition+" out",queue:q.queue,duration:q.duration,useFailSafe:!0,onStart:function(){!K.others.active()&&!K.others.animating()&&!nt&&K.hideDimmer(),q.keyboardShortcuts&&!K.others.active()&&K.remove.keyboardShortcuts()},onComplete:function(){K.unbind.scrollLock(),q.allowMultiple&&(ee.addClass(c.front),et.removeClass(c.front),te?si.find(ne.dimmer).removeClass("active"):ee.find(ne.dimmer).removeClass("active")),q.onHidden.call(P),K.remove.dimmerStyles(),K.restore.focus(),Ee()}})):K.error(Re.noTransition))},showDimmer:function(){ce.dimmer("is animating")||!ce.dimmer("is active")?(K.save.bodyMargin(),K.debug("Showing dimmer"),ce.dimmer("show")):K.debug("Dimmer already visible")},hideDimmer:function(){if(ce.dimmer("is animating")||ce.dimmer("is active"))K.unbind.scrollLock(),ce.dimmer("hide",function(){K.restore.bodyMargin(),K.remove.clickaway(),K.remove.screenHeight()});else{K.debug("Dimmer is not visible cannot hide");return}},hideAll:function(Ee){var nt=si.filter("."+c.active+", ."+c.animating);if(Ee=r.isFunction(Ee)?Ee:function(){},nt.length>0){K.debug("Hiding all visible modals");var te=!0;return r(nt.get().reverse()).each(function(ee,oe){te&&(te=r(oe).modal("hide modal",Ee,!1,!0))}),te&&K.hideDimmer(),te}},hideOthers:function(Ee){var nt=ct.filter("."+c.active+", ."+c.animating);Ee=r.isFunction(Ee)?Ee:function(){},nt.length>0&&(K.debug("Hiding other modals",ct),nt.modal("hide modal",Ee,!0))},others:{active:function(){return ct.filter("."+c.active).length>0},animating:function(){return ct.filter("."+c.animating).length>0}},add:{keyboardShortcuts:function(){K.verbose("Adding keyboard shortcuts"),J.on("keyup"+tt,K.event.keyboard)}},save:{focus:function(){var Ee=r(b.activeElement),nt=Ee.closest(et).length>0;nt||(xt=r(b.activeElement).blur())},bodyMargin:function(){Oe=Z.css("margin-"+(K.can.leftBodyScrollbar()?"left":"right"));var Ee=parseInt(Oe.replace(/[^\d.]/g,"")),nt=v.innerWidth-b.documentElement.clientWidth;Ne=Ee+nt}},restore:{focus:function(){xt&&xt.length>0&&q.restoreFocus&&xt.focus()},bodyMargin:function(){var Ee=K.can.leftBodyScrollbar()?"left":"right";Z.css("margin-"+Ee,Oe),Z.find(ne.bodyFixed.replace("right",Ee)).css("padding-"+Ee,Oe)}},remove:{active:function(){et.removeClass(c.active)},legacy:function(){et.removeClass(c.legacy)},clickaway:function(){q.detachable||et.off("mousedown"+Ve),G.off("mousedown"+Ve),G.off("mouseup"+Ve)},dimmerStyles:function(){G.removeClass(c.inverted),ce.removeClass(c.blurring)},bodyStyle:function(){Z.attr("style")===""&&(K.verbose("Removing style attribute"),Z.removeAttr("style"))},screenHeight:function(){K.debug("Removing page height"),Z.css("height","")},keyboardShortcuts:function(){K.verbose("Removing keyboard shortcuts"),J.off("keyup"+tt)},scrolling:function(){ce.removeClass(c.scrolling),et.removeClass(c.scrolling)}},cacheSizes:function(){et.addClass(c.loading);var Ee=et.prop("scrollHeight"),nt=et.outerWidth(),te=et.outerHeight();(K.cache.pageHeight===_||te!==0)&&(r.extend(K.cache,{pageHeight:r(b).outerHeight(),width:nt,height:te+q.offset,scrollHeight:Ee+q.offset,contextHeight:q.context=="body"?r(v).height():ce.height()}),K.cache.topOffset=-(K.cache.height/2)),et.removeClass(c.loading),K.debug("Caching modal and container sizes",K.cache)},can:{leftBodyScrollbar:function(){return K.cache.leftBodyScrollbar===_&&(K.cache.leftBodyScrollbar=K.is.rtl()&&(K.is.iframe&&!K.is.firefox()||K.is.safari()||K.is.edge()||K.is.ie())),K.cache.leftBodyScrollbar},useFlex:function(){return q.useFlex==="auto"?q.detachable&&!K.is.ie():(q.useFlex&&K.is.ie()?K.debug("useFlex true is not supported in IE"):q.useFlex&&!q.detachable&&K.debug("useFlex true in combination with detachable false is not supported"),q.useFlex)},fit:function(){var Ee=K.cache.contextHeight,nt=K.cache.contextHeight/2,te=K.cache.topOffset,ee=K.cache.scrollHeight,oe=K.cache.height,Ge=q.padding,yt=nt+te;return ee>oe?yt+ee+Ge<Ee:oe+Ge*2<Ee}},is:{active:function(){return et.hasClass(c.active)},ie:function(){if(K.cache.isIE===_){var Ee=!v.ActiveXObject&&"ActiveXObject"in v,nt="ActiveXObject"in v;K.cache.isIE=Ee||nt}return K.cache.isIE},animating:function(){return et.transition("is supported")?et.transition("is animating"):et.is(":visible")},scrolling:function(){return ce.hasClass(c.scrolling)},modernBrowser:function(){return!(v.ActiveXObject||"ActiveXObject"in v)},rtl:function(){return K.cache.isRTL===_&&(K.cache.isRTL=Z.attr("dir")==="rtl"||Z.css("direction")==="rtl"),K.cache.isRTL},safari:function(){return K.cache.isSafari===_&&(K.cache.isSafari=/constructor/i.test(v.HTMLElement)||!!v.ApplePaySession),K.cache.isSafari},edge:function(){return K.cache.isEdge===_&&(K.cache.isEdge=!!v.setImmediate&&!K.is.ie()),K.cache.isEdge},firefox:function(){return K.cache.isFirefox===_&&(K.cache.isFirefox=!!v.InstallTrigger),K.cache.isFirefox},iframe:function(){return self!==top}},set:{autofocus:function(){var Ee=et.find("[tabindex], :input").filter(":visible").filter(function(){return r(this).closest(".disabled").length===0}),nt=Ee.filter("[autofocus]"),te=nt.length>0?nt.first():Ee.first();te.length>0&&te.focus()},bodyMargin:function(){var Ee=K.can.leftBodyScrollbar()?"left":"right";(q.detachable||K.can.fit())&&Z.css("margin-"+Ee,Ne+"px"),Z.find(ne.bodyFixed.replace("right",Ee)).css("padding-"+Ee,Ne+"px")},clickaway:function(){q.detachable||et.on("mousedown"+Ve,K.event.mousedown),G.on("mousedown"+Ve,K.event.mousedown),G.on("mouseup"+Ve,K.event.mouseup)},dimmerSettings:function(){if(r.fn.dimmer===_){K.error(Re.dimmer);return}var Ee={debug:q.debug,dimmerName:"modals",closable:"auto",useFlex:K.can.useFlex(),duration:{show:q.duration,hide:q.duration}},nt=r.extend(!0,Ee,q.dimmerSettings);q.inverted&&(nt.variation=nt.variation!==_?nt.variation+" inverted":"inverted"),je.dimmer("setting",nt)},dimmerStyles:function(){q.inverted?G.addClass(c.inverted):G.removeClass(c.inverted),q.blurring?ce.addClass(c.blurring):ce.removeClass(c.blurring)},modalOffset:function(){if(q.detachable)et.css({marginTop:!et.hasClass("aligned")&&K.can.fit()?-(K.cache.height/2):q.padding/2,marginLeft:-(K.cache.width/2)});else{var Ee=K.can.fit();et.css({top:!et.hasClass("aligned")&&Ee?r(b).scrollTop()+(K.cache.contextHeight-K.cache.height)/2:!Ee||et.hasClass("top")?r(b).scrollTop()+q.padding:r(b).scrollTop()+(K.cache.contextHeight-K.cache.height-q.padding),marginLeft:-(K.cache.width/2)})}K.verbose("Setting modal offset for legacy mode")},screenHeight:function(){K.can.fit()?Z.css("height",""):et.hasClass("bottom")||(K.debug("Modal is taller than page content, resizing page height"),Z.css("height",K.cache.height+q.padding*2))},active:function(){et.addClass(c.active+" "+c.front),ct.filter("."+c.active).removeClass(c.front)},scrolling:function(){ce.addClass(c.scrolling),et.addClass(c.scrolling),K.unbind.scrollLock()},legacy:function(){et.addClass(c.legacy)},type:function(){K.can.fit()?(K.verbose("Modal fits on screen"),!K.others.active()&&!K.others.animating()&&(K.remove.scrolling(),K.bind.scrollLock())):et.hasClass("bottom")?K.verbose("Bottom aligned modal not fitting on screen is unsupported for scrolling"):(K.verbose("Modal cannot fit on screen setting to scrolling"),K.set.scrolling())},undetached:function(){ce.addClass(c.undetached)}},setting:function(Ee,nt){if(K.debug("Changing setting",Ee,nt),r.isPlainObject(Ee))r.extend(!0,q,Ee);else if(nt!==_)r.isPlainObject(q[Ee])?r.extend(!0,q[Ee],nt):q[Ee]=nt;else return q[Ee]},internal:function(Ee,nt){if(r.isPlainObject(Ee))r.extend(!0,K,Ee);else if(nt!==_)K[Ee]=nt;else return K[Ee]},debug:function(){!q.silent&&q.debug&&(q.performance?K.performance.log(arguments):(K.debug=Function.prototype.bind.call(console.info,console,q.name+":"),K.debug.apply(console,arguments)))},verbose:function(){!q.silent&&q.verbose&&q.debug&&(q.performance?K.performance.log(arguments):(K.verbose=Function.prototype.bind.call(console.info,console,q.name+":"),K.verbose.apply(console,arguments)))},error:function(){q.silent||(K.error=Function.prototype.bind.call(console.error,console,q.name+":"),K.error.apply(console,arguments))},performance:{log:function(Ee){var nt,te,ee;q.performance&&(nt=new Date().getTime(),ee=we||nt,te=nt-ee,we=nt,Be.push({Name:Ee[0],Arguments:[].slice.call(Ee,1)||"",Element:P,"Execution Time":te})),clearTimeout(K.performance.timer),K.performance.timer=setTimeout(K.performance.display,500)},display:function(){var Ee=q.name+":",nt=0;we=!1,clearTimeout(K.performance.timer),r.each(Be,function(te,ee){nt+=ee["Execution Time"]}),Ee+=" "+nt+"ms",C&&(Ee+=" '"+C+"'"),(console.group!==_||console.table!==_)&&Be.length>0&&(console.groupCollapsed(Ee),console.table?console.table(Be):r.each(Be,function(te,ee){console.log(ee.Name+": "+ee["Execution Time"]+"ms")}),console.groupEnd()),Be=[]}},invoke:function(Ee,nt,te){var ee=k,oe,Ge,yt;return nt=nt||Ke,te=P||te,typeof Ee=="string"&&ee!==_&&(Ee=Ee.split(/[\. ]/),oe=Ee.length-1,r.each(Ee,function(jt,Bt){var Qt=jt!=oe?Bt+Ee[jt+1].charAt(0).toUpperCase()+Ee[jt+1].slice(1):Ee;if(r.isPlainObject(ee[Qt])&&jt!=oe)ee=ee[Qt];else{if(ee[Qt]!==_)return Ge=ee[Qt],!1;if(r.isPlainObject(ee[Bt])&&jt!=oe)ee=ee[Bt];else return ee[Bt]!==_&&(Ge=ee[Bt]),!1}})),r.isFunction(Ge)?yt=Ge.apply(te,nt):Ge!==_&&(yt=Ge),Array.isArray(gt)?gt.push(yt):gt!==_?gt=[gt,yt]:yt!==_&&(gt=yt),Ge}},Q?(k===_&&K.initialize(),K.invoke(Ue)):(k!==_&&k.invoke("destroy"),K.initialize())}),gt!==_?gt:this},r.fn.modal.settings={name:"Modal",namespace:"modal",useFlex:"auto",offset:0,silent:!1,debug:!1,verbose:!1,performance:!0,observeChanges:!1,allowMultiple:!1,detachable:!0,closable:!0,autofocus:!0,restoreFocus:!0,inverted:!1,blurring:!1,centered:!0,dimmerSettings:{closable:!1,useCSS:!0},keyboardShortcuts:!0,context:"body",queue:!1,duration:500,transition:"scale",padding:50,scrollbarWidth:10,onShow:function(){},onVisible:function(){},onHide:function(){return!0},onHidden:function(){},onApprove:function(){return!0},onDeny:function(){return!0},selector:{close:"> .close",approve:".actions .positive, .actions .approve, .actions .ok",deny:".actions .negative, .actions .deny, .actions .cancel",modal:".ui.modal",dimmer:"> .ui.dimmer",bodyFixed:"> .ui.fixed.menu, > .ui.right.toast-container, > .ui.right.sidebar"},error:{dimmer:"UI Dimmer, a required component is not included in this page",method:"The method you called is not defined.",notFound:"The element you specified could not be found"},className:{active:"active",animating:"animating",blurring:"blurring",inverted:"inverted",legacy:"legacy",loading:"loading",scrolling:"scrolling",undetached:"undetached",front:"front"}}})(jQuery,window,document);(function(r,v,b,_){"use strict";r.isFunction=r.isFunction||function(g){return typeof g=="function"&&typeof g.nodeType!="number"},v=typeof v<"u"&&v.Math==Math?v:typeof self<"u"&&self.Math==Math?self:Function("return this")(),r.fn.search=function(g){var O=r(this),R=O.selector||"",J=new Date().getTime(),Z=[],C=arguments[0],we=typeof C=="string",Be=[].slice.call(arguments,1),Ue;return r(this).each(function(){var Q=r.isPlainObject(g)?r.extend(!0,{},r.fn.search.settings,g):r.extend({},r.fn.search.settings),Ke=Q.className,At=Q.metadata,gt=Q.regExp,q=Q.fields,ne=Q.selector,c=Q.error,W=Q.namespace,Re="."+W,tt=W+"-module",st=r(this),et=st.find(ne.prompt),je=st.find(ne.searchButton),S=st.find(ne.results),si=st.find(ne.result),ct=st.find(ne.category),xt=this,ce=st.data(tt),G=!1,P=!1,k;k={initialize:function(){k.verbose("Initializing module"),k.get.settings(),k.determine.searchFields(),k.bind.events(),k.set.type(),k.create.results(),k.instantiate()},instantiate:function(){k.verbose("Storing instance of module",k),ce=k,st.data(tt,k)},destroy:function(){k.verbose("Destroying instance"),st.off(Re).removeData(tt)},refresh:function(){k.debug("Refreshing selector cache"),et=st.find(ne.prompt),je=st.find(ne.searchButton),ct=st.find(ne.category),S=st.find(ne.results),si=st.find(ne.result)},refreshResults:function(){S=st.find(ne.results),si=st.find(ne.result)},bind:{events:function(){k.verbose("Binding events to search"),Q.automatic&&(st.on(k.get.inputEvent()+Re,ne.prompt,k.event.input),et.attr("autocomplete","off")),st.on("focus"+Re,ne.prompt,k.event.focus).on("blur"+Re,ne.prompt,k.event.blur).on("keydown"+Re,ne.prompt,k.handleKeyboard).on("click"+Re,ne.searchButton,k.query).on("mousedown"+Re,ne.results,k.event.result.mousedown).on("mouseup"+Re,ne.results,k.event.result.mouseup).on("click"+Re,ne.result,k.event.result.click)}},determine:{searchFields:function(){g&&g.searchFields!==_&&(Q.searchFields=g.searchFields)}},event:{input:function(){Q.searchDelay?(clearTimeout(k.timer),k.timer=setTimeout(function(){k.is.focused()&&k.query()},Q.searchDelay)):k.query()},focus:function(){k.set.focus(),Q.searchOnFocus&&k.has.minimumCharacters()&&k.query(function(){k.can.show()&&k.showResults()})},blur:function(N){var Y=b.activeElement===this,ve=function(){k.cancel.query(),k.remove.focus(),k.timer=setTimeout(k.hideResults,Q.hideDelay)};Y||(P=!1,k.resultsClicked?(k.debug("Determining if user action caused search to close"),st.one("click.close"+Re,ne.results,function(Oe){if(k.is.inMessage(Oe)||G){et.focus();return}G=!1,!k.is.animating()&&!k.is.hidden()&&ve()})):(k.debug("Input blurred without user action, closing results"),ve()))},result:{mousedown:function(){k.resultsClicked=!0},mouseup:function(){k.resultsClicked=!1},click:function(N){k.debug("Search result selected");var Y=r(this),ve=Y.find(ne.title).eq(0),Oe=Y.is("a[href]")?Y:Y.find("a[href]").eq(0),Ne=Oe.attr("href")||!1,Ve=Oe.attr("target")||!1,Ye=ve.length>0?ve.text():!1,Lt=k.get.results(),K=Y.data(At.result)||k.get.result(Ye,Lt);if(Ye&&k.set.value(Ye),r.isFunction(Q.onSelect)&&Q.onSelect.call(xt,K,Lt)===!1){k.debug("Custom onSelect callback cancelled default select action"),G=!0;return}k.hideResults(),Ne&&(N.preventDefault(),k.verbose("Opening search link found in result",Oe),Ve=="_blank"||N.ctrlKey?v.open(Ne):v.location.href=Ne)}}},ensureVisible:function(Y){var ve,Oe,Ne,Ve;ve=Y.position().top,Oe=ve+Y.outerHeight(!0),Ne=S.scrollTop(),Ve=S.height(),parseInt(S.css("paddingTop"),0)+parseInt(S.css("paddingBottom"),0),ve<0?S.scrollTop(Ne+ve):Ve<Oe&&S.scrollTop(Ne+(Oe-Ve))},handleKeyboard:function(N){var Y=st.find(ne.result),ve=st.find(ne.category),Oe=Y.filter("."+Ke.active),Ne=Y.index(Oe),Ve=Y.length,Ye=Oe.length>0,Lt=N.which,K={backspace:8,enter:13,escape:27,upArrow:38,downArrow:40},Ee;if(Lt==K.escape&&(k.verbose("Escape key pressed, blurring search field"),k.hideResults(),P=!0),k.is.visible())if(Lt==K.enter){if(k.verbose("Enter key pressed, selecting active result"),Y.filter("."+Ke.active).length>0)return k.event.result.click.call(Y.filter("."+Ke.active),N),N.preventDefault(),!1}else Lt==K.upArrow&&Ye?(k.verbose("Up key pressed, changing active result"),Ee=Ne-1<0?Ne:Ne-1,ve.removeClass(Ke.active),Y.removeClass(Ke.active).eq(Ee).addClass(Ke.active).closest(ve).addClass(Ke.active),k.ensureVisible(Y.eq(Ee)),N.preventDefault()):Lt==K.downArrow&&(k.verbose("Down key pressed, changing active result"),Ee=Ne+1>=Ve?Ne:Ne+1,ve.removeClass(Ke.active),Y.removeClass(Ke.active).eq(Ee).addClass(Ke.active).closest(ve).addClass(Ke.active),k.ensureVisible(Y.eq(Ee)),N.preventDefault());else Lt==K.enter&&(k.verbose("Enter key pressed, executing query"),k.query(),k.set.buttonPressed(),et.one("keyup",k.remove.buttonFocus))},setup:{api:function(N,Y){var ve={debug:Q.debug,on:!1,cache:Q.cache,action:"search",urlData:{query:N},onSuccess:function(Oe){k.parse.response.call(xt,Oe,N),Y()},onFailure:function(){k.displayMessage(c.serverError),Y()},onAbort:function(Oe){},onError:k.error};r.extend(!0,ve,Q.apiSettings),k.verbose("Setting up API request",ve),st.api(ve)}},can:{useAPI:function(){return r.fn.api!==_},show:function(){return k.is.focused()&&!k.is.visible()&&!k.is.empty()},transition:function(){return Q.transition&&r.fn.transition!==_&&st.transition("is supported")}},is:{animating:function(){return S.hasClass(Ke.animating)},hidden:function(){return S.hasClass(Ke.hidden)},inMessage:function(N){if(N.target){var Y=r(N.target),ve=r.contains(b.documentElement,N.target);return ve&&Y.closest(ne.message).length>0}},empty:function(){return S.html()===""},visible:function(){return S.filter(":visible").length>0},focused:function(){return et.filter(":focus").length>0}},get:{settings:function(){r.isPlainObject(g)&&g.searchFullText&&(Q.fullTextSearch=g.searchFullText,k.error(Q.error.oldSearchSyntax,xt)),Q.ignoreDiacritics&&!String.prototype.normalize&&(Q.ignoreDiacritics=!1,k.error(c.noNormalize,xt))},inputEvent:function(){var N=et[0],Y=N!==_&&N.oninput!==_?"input":N!==_&&N.onpropertychange!==_?"propertychange":"keyup";return Y},value:function(){return et.val()},results:function(){var N=st.data(At.results);return N},result:function(N,Y){var ve=!1;return N=N!==_?N:k.get.value(),Y=Y!==_?Y:k.get.results(),Q.type==="category"?(k.debug("Finding result that matches",N),r.each(Y,function(Oe,Ne){if(Array.isArray(Ne.results)&&(ve=k.search.object(N,Ne.results)[0],ve))return!1})):(k.debug("Finding result in results object",N),ve=k.search.object(N,Y)[0]),ve||!1}},select:{firstResult:function(){k.verbose("Selecting first result"),si.first().addClass(Ke.active)}},set:{focus:function(){st.addClass(Ke.focus)},loading:function(){st.addClass(Ke.loading)},value:function(N){k.verbose("Setting search input value",N),et.val(N)},type:function(N){N=N||Q.type,Q.type=="category"&&st.addClass(Q.type)},buttonPressed:function(){je.addClass(Ke.pressed)}},remove:{loading:function(){st.removeClass(Ke.loading)},focus:function(){st.removeClass(Ke.focus)},buttonPressed:function(){je.removeClass(Ke.pressed)},diacritics:function(N){return Q.ignoreDiacritics?N.normalize("NFD").replace(/[\u0300-\u036f]/g,""):N}},query:function(N){N=r.isFunction(N)?N:function(){};var Y=k.get.value(),ve=k.read.cache(Y);N=N||function(){},k.has.minimumCharacters()?(ve?(k.debug("Reading result from cache",Y),k.save.results(ve.results),k.addResults(ve.html),k.inject.id(ve.results),N()):(k.debug("Querying for",Y),r.isPlainObject(Q.source)||Array.isArray(Q.source)?(k.search.local(Y),N()):k.can.useAPI()?k.search.remote(Y,N):(k.error(c.source),N())),Q.onSearchQuery.call(xt,Y)):k.hideResults()},search:{local:function(N){var Y=k.search.object(N,Q.source),ve;k.set.loading(),k.save.results(Y),k.debug("Returned full local search results",Y),Q.maxResults>0&&(k.debug("Using specified max results",Y),Y=Y.slice(0,Q.maxResults)),Q.type=="category"&&(Y=k.create.categoryResults(Y)),ve=k.generateResults({results:Y}),k.remove.loading(),k.addResults(ve),k.inject.id(Y),k.write.cache(N,{html:ve,results:Y})},remote:function(N,Y){Y=r.isFunction(Y)?Y:function(){},st.api("is loading")&&st.api("abort"),k.setup.api(N,Y),st.api("query")},object:function(N,Y,ve){N=k.remove.diacritics(String(N));var Oe=[],Ne=[],Ve=[],Ye=N.replace(gt.escape,"\\$&"),Lt=new RegExp(gt.beginsWith+Ye,"i"),K=function(Ee,nt){var te=r.inArray(nt,Oe)==-1,ee=r.inArray(nt,Ve)==-1,oe=r.inArray(nt,Ne)==-1;te&&ee&&oe&&Ee.push(nt)};return Y=Y||Q.source,ve=ve!==_?ve:Q.searchFields,Array.isArray(ve)||(ve=[ve]),Y===_||Y===!1?(k.error(c.source),[]):(r.each(ve,function(Ee,nt){r.each(Y,function(te,ee){var oe=typeof ee[nt]=="string"||typeof ee[nt]=="number";if(oe){var Ge;typeof ee[nt]=="string"?Ge=k.remove.diacritics(ee[nt]):Ge=ee[nt].toString(),Ge.search(Lt)!==-1?K(Oe,ee):Q.fullTextSearch==="exact"&&k.exactSearch(N,Ge)?K(Ne,ee):Q.fullTextSearch==!0&&k.fuzzySearch(N,Ge)&&K(Ve,ee)}})}),r.merge(Ne,Ve),r.merge(Oe,Ne),Oe)}},exactSearch:function(N,Y){return N=N.toLowerCase(),Y=Y.toLowerCase(),Y.indexOf(N)>-1},fuzzySearch:function(N,Y){var ve=Y.length,Oe=N.length;if(typeof N!="string"||(N=N.toLowerCase(),Y=Y.toLowerCase(),Oe>ve))return!1;if(Oe===ve)return N===Y;e:for(var Ne=0,Ve=0;Ne<Oe;Ne++){for(var Ye=N.charCodeAt(Ne);Ve<ve;)if(Y.charCodeAt(Ve++)===Ye)continue e;return!1}return!0},parse:{response:function(N,Y){if(Array.isArray(N)){var ve={};ve[q.results]=N,N=ve}var Oe=k.generateResults(N);k.verbose("Parsing server response",N),N!==_&&Y!==_&&N[q.results]!==_&&(k.addResults(Oe),k.inject.id(N[q.results]),k.write.cache(Y,{html:Oe,results:N[q.results]}),k.save.results(N[q.results]))}},cancel:{query:function(){k.can.useAPI()&&st.api("abort")}},has:{minimumCharacters:function(){var N=k.get.value(),Y=N.length;return Y>=Q.minCharacters},results:function(){if(S.length===0)return!1;var N=S.html();return N!=""}},clear:{cache:function(N){var Y=st.data(At.cache);N?N&&Y&&Y[N]&&(k.debug("Removing value from cache",N),delete Y[N],st.data(At.cache,Y)):(k.debug("Clearing cache",N),st.removeData(At.cache))}},read:{cache:function(N){var Y=st.data(At.cache);return Q.cache?(k.verbose("Checking cache for generated html for query",N),typeof Y=="object"&&Y[N]!==_?Y[N]:!1):!1}},create:{categoryResults:function(N){var Y={};return r.each(N,function(ve,Oe){Oe.category&&(Y[Oe.category]===_?(k.verbose("Creating new category of results",Oe.category),Y[Oe.category]={name:Oe.category,results:[Oe]}):Y[Oe.category].results.push(Oe))}),Y},id:function(N,Y){var ve=N+1,Oe,Ne;return Y!==_?(Oe=String.fromCharCode(97+Y),Ne=Oe+ve,k.verbose("Creating category result id",Ne)):(Ne=ve,k.verbose("Creating result id",Ne)),Ne},results:function(){S.length===0&&(S=r("<div />").addClass(Ke.results).appendTo(st))}},inject:{result:function(N,Y,ve){k.verbose("Injecting result into results");var Oe=ve!==_?S.children().eq(ve).children(ne.results).first().children(ne.result).eq(Y):S.children(ne.result).eq(Y);k.verbose("Injecting results metadata",Oe),Oe.data(At.result,N)},id:function(N){k.debug("Injecting unique ids into results");var Y=0,ve=0;return Q.type==="category"?r.each(N,function(Oe,Ne){Ne.results.length>0&&(ve=0,r.each(Ne.results,function(Ve,Ye){Ye.id===_&&(Ye.id=k.create.id(ve,Y)),k.inject.result(Ye,ve,Y),ve++}),Y++)}):r.each(N,function(Oe,Ne){Ne.id===_&&(Ne.id=k.create.id(ve)),k.inject.result(Ne,ve),ve++}),N}},save:{results:function(N){k.verbose("Saving current search results to metadata",N),st.data(At.results,N)}},write:{cache:function(N,Y){var ve=st.data(At.cache)!==_?st.data(At.cache):{};Q.cache&&(k.verbose("Writing generated html to cache",N,Y),ve[N]=Y,st.data(At.cache,ve))}},addResults:function(N){if(r.isFunction(Q.onResultsAdd)&&Q.onResultsAdd.call(S,N)===!1)return k.debug("onResultsAdd callback cancelled default action"),!1;N?(S.html(N),k.refreshResults(),Q.selectFirstResult&&k.select.firstResult(),k.showResults()):k.hideResults(function(){S.empty()})},showResults:function(N){N=r.isFunction(N)?N:function(){},!P&&!k.is.visible()&&k.has.results()&&(k.can.transition()?(k.debug("Showing results with css animations"),S.transition({animation:Q.transition+" in",debug:Q.debug,verbose:Q.verbose,duration:Q.duration,onShow:function(){var Y=st.find(ne.result).eq(0);Y.length>0&&k.ensureVisible(Y)},onComplete:function(){N()},queue:!0})):(k.debug("Showing results with javascript"),S.stop().fadeIn(Q.duration,Q.easing)),Q.onResultsOpen.call(S))},hideResults:function(N){N=r.isFunction(N)?N:function(){},k.is.visible()&&(k.can.transition()?(k.debug("Hiding results with css animations"),S.transition({animation:Q.transition+" out",debug:Q.debug,verbose:Q.verbose,duration:Q.duration,onComplete:function(){N()},queue:!0})):(k.debug("Hiding results with javascript"),S.stop().fadeOut(Q.duration,Q.easing)),Q.onResultsClose.call(S))},generateResults:function(N){k.debug("Generating html from response",N);var Y=Q.templates[Q.type],ve=r.isPlainObject(N[q.results])&&!r.isEmptyObject(N[q.results]),Oe=Array.isArray(N[q.results])&&N[q.results].length>0,Ne="";return ve||Oe?(Q.maxResults>0&&(ve?Q.type=="standard"&&k.error(c.maxResults):N[q.results]=N[q.results].slice(0,Q.maxResults)),r.isFunction(Y)?Ne=Y(N,q,Q.preserveHTML):k.error(c.noTemplate,!1)):Q.showNoResults&&(Ne=k.displayMessage(c.noResults,"empty",c.noResultsHeader)),Q.onResults.call(xt,N),Ne},displayMessage:function(N,Y,ve){return Y=Y||"standard",k.debug("Displaying message",N,Y,ve),k.addResults(Q.templates.message(N,Y,ve)),Q.templates.message(N,Y,ve)},setting:function(N,Y){if(r.isPlainObject(N))r.extend(!0,Q,N);else if(Y!==_)Q[N]=Y;else return Q[N]},internal:function(N,Y){if(r.isPlainObject(N))r.extend(!0,k,N);else if(Y!==_)k[N]=Y;else return k[N]},debug:function(){!Q.silent&&Q.debug&&(Q.performance?k.performance.log(arguments):(k.debug=Function.prototype.bind.call(console.info,console,Q.name+":"),k.debug.apply(console,arguments)))},verbose:function(){!Q.silent&&Q.verbose&&Q.debug&&(Q.performance?k.performance.log(arguments):(k.verbose=Function.prototype.bind.call(console.info,console,Q.name+":"),k.verbose.apply(console,arguments)))},error:function(){Q.silent||(k.error=Function.prototype.bind.call(console.error,console,Q.name+":"),k.error.apply(console,arguments))},performance:{log:function(N){var Y,ve,Oe;Q.performance&&(Y=new Date().getTime(),Oe=J||Y,ve=Y-Oe,J=Y,Z.push({Name:N[0],Arguments:[].slice.call(N,1)||"",Element:xt,"Execution Time":ve})),clearTimeout(k.performance.timer),k.performance.timer=setTimeout(k.performance.display,500)},display:function(){var N=Q.name+":",Y=0;J=!1,clearTimeout(k.performance.timer),r.each(Z,function(ve,Oe){Y+=Oe["Execution Time"]}),N+=" "+Y+"ms",R&&(N+=" '"+R+"'"),O.length>1&&(N+=" ("+O.length+")"),(console.group!==_||console.table!==_)&&Z.length>0&&(console.groupCollapsed(N),console.table?console.table(Z):r.each(Z,function(ve,Oe){console.log(Oe.Name+": "+Oe["Execution Time"]+"ms")}),console.groupEnd()),Z=[]}},invoke:function(N,Y,ve){var Oe=ce,Ne,Ve,Ye;return Y=Y||Be,ve=xt||ve,typeof N=="string"&&Oe!==_&&(N=N.split(/[\. ]/),Ne=N.length-1,r.each(N,function(Lt,K){var Ee=Lt!=Ne?K+N[Lt+1].charAt(0).toUpperCase()+N[Lt+1].slice(1):N;if(r.isPlainObject(Oe[Ee])&&Lt!=Ne)Oe=Oe[Ee];else{if(Oe[Ee]!==_)return Ve=Oe[Ee],!1;if(r.isPlainObject(Oe[K])&&Lt!=Ne)Oe=Oe[K];else return Oe[K]!==_&&(Ve=Oe[K]),!1}})),r.isFunction(Ve)?Ye=Ve.apply(ve,Y):Ve!==_&&(Ye=Ve),Array.isArray(Ue)?Ue.push(Ye):Ue!==_?Ue=[Ue,Ye]:Ye!==_&&(Ue=Ye),Ve}},we?(ce===_&&k.initialize(),k.invoke(C)):(ce!==_&&ce.invoke("destroy"),k.initialize())}),Ue!==_?Ue:this},r.fn.search.settings={name:"Search",namespace:"search",silent:!1,debug:!1,verbose:!1,performance:!0,type:"standard",minCharacters:1,selectFirstResult:!1,apiSettings:!1,source:!1,searchOnFocus:!0,searchFields:["id","title","description"],displayField:"",fullTextSearch:"exact",ignoreDiacritics:!1,automatic:!0,hideDelay:0,searchDelay:200,maxResults:7,cache:!0,showNoResults:!0,preserveHTML:!0,transition:"scale",duration:200,easing:"easeOutExpo",onSelect:!1,onResultsAdd:!1,onSearchQuery:function(g){},onResults:function(g){},onResultsOpen:function(){},onResultsClose:function(){},className:{animating:"animating",active:"active",empty:"empty",focus:"focus",hidden:"hidden",loading:"loading",results:"results",pressed:"down"},error:{source:"Cannot search. No source used, and Semantic API module was not included",noResultsHeader:"No Results",noResults:"Your search returned no results",logging:"Error in debug logging, exiting.",noEndpoint:"No search endpoint was specified",noTemplate:"A valid template name was not specified.",oldSearchSyntax:"searchFullText setting has been renamed fullTextSearch for consistency, please adjust your settings.",serverError:"There was an issue querying the server.",maxResults:"Results must be an array to use maxResults setting",method:"The method you called is not defined.",noNormalize:'"ignoreDiacritics" setting will be ignored. Browser does not support String().normalize(). You may consider including <https://cdn.jsdelivr.net/npm/unorm@1.4.1/lib/unorm.min.js> as a polyfill.'},metadata:{cache:"cache",results:"results",result:"result"},regExp:{escape:/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,beginsWith:"(?:s|^)"},fields:{categories:"results",categoryName:"name",categoryResults:"results",description:"description",image:"image",price:"price",results:"results",title:"title",url:"url",action:"action",actionText:"text",actionURL:"url"},selector:{prompt:".prompt",searchButton:".search.button",results:".results",message:".results > .message",category:".category",result:".result",title:".title, .name"},templates:{escape:function(g,O){if(O)return g;var R=/[<>"'`]/g,J=/[&<>"'`]/,Z={"<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},C=function(we){return Z[we]};return J.test(g)?(g=g.replace(/&(?![a-z0-9#]{1,6};)/,"&amp;"),g.replace(R,C)):g},message:function(g,O,R){var J="";return g!==_&&O!==_&&(J+='<div class="message '+O+'">',R&&(J+='<div class="header">'+R+"</div>"),J+=' <div class="description">'+g+"</div>",J+="</div>"),J},category:function(g,O,R){var J="",Z=r.fn.search.settings.templates.escape;return g[O.categoryResults]!==_?(r.each(g[O.categoryResults],function(C,we){we[O.results]!==_&&we.results.length>0&&(J+='<div class="category">',we[O.categoryName]!==_&&(J+='<div class="name">'+Z(we[O.categoryName],R)+"</div>"),J+='<div class="results">',r.each(we.results,function(Be,Ue){Ue[O.url]?J+='<a class="result" href="'+Ue[O.url].replace(/"/g,"")+'">':J+='<a class="result">',Ue[O.image]!==_&&(J+='<div class="image"> <img src="'+Ue[O.image].replace(/"/g,"")+'"></div>'),J+='<div class="content">',Ue[O.price]!==_&&(J+='<div class="price">'+Z(Ue[O.price],R)+"</div>"),Ue[O.title]!==_&&(J+='<div class="title">'+Z(Ue[O.title],R)+"</div>"),Ue[O.description]!==_&&(J+='<div class="description">'+Z(Ue[O.description],R)+"</div>"),J+="</div>",J+="</a>"}),J+="</div>",J+="</div>")}),g[O.action]&&(O.actionURL===!1?J+='<div class="action">'+Z(g[O.action][O.actionText],R)+"</div>":J+='<a href="'+g[O.action][O.actionURL].replace(/"/g,"")+'" class="action">'+Z(g[O.action][O.actionText],R)+"</a>"),J):!1},standard:function(g,O,R){var J="",Z=r.fn.search.settings.templates.escape;return g[O.results]!==_?(r.each(g[O.results],function(C,we){we[O.url]?J+='<a class="result" href="'+we[O.url].replace(/"/g,"")+'">':J+='<a class="result">',we[O.image]!==_&&(J+='<div class="image"> <img src="'+we[O.image].replace(/"/g,"")+'"></div>'),J+='<div class="content">',we[O.price]!==_&&(J+='<div class="price">'+Z(we[O.price],R)+"</div>"),we[O.title]!==_&&(J+='<div class="title">'+Z(we[O.title],R)+"</div>"),we[O.description]!==_&&(J+='<div class="description">'+Z(we[O.description],R)+"</div>"),J+="</div>",J+="</a>"}),g[O.action]&&(O.actionURL===!1?J+='<div class="action">'+Z(g[O.action][O.actionText],R)+"</div>":J+='<a href="'+g[O.action][O.actionURL].replace(/"/g,"")+'" class="action">'+Z(g[O.action][O.actionText],R)+"</a>"),J):!1}}}})(jQuery,window,document)}(),function(){"use strict";var Ml,Dl,Ol,ao,kn,dd,el,Va,Wa,fd,za,zc,Kc,Xc,ql,pa,Xr,Ka,Xa,zs,hd,nm,md,$l,is,bs,lo,Dn,Gn,Do,ga,Oo,Gr,va,Pl,ba,sm,qo,Gc,pd,rm;__webpack_require__.p=`${window.config?.assetUrlPrefix??"/assets"}/`;function r(e){const t=["/assets/js/monaco."];for(const i of t)if(e.stack?.includes(i))return!0;return!1}function v(e,t="error"){const i=document.querySelector(".page-content")??document.body,n=e.replace(/\W/g,"").trim();let s=i.querySelector(`.js-global-error[data-global-error-msg-compact="${n}"]`);if(!s){const u=document.createElement("div");u.innerHTML=`<div class="ui container js-global-error tw-my-[--page-spacing]"><div class="ui ${t} message tw-text-center tw-whitespace-pre-line"></div></div>`,s=u.childNodes[0]}const l=Number(s.getAttribute("data-global-error-msg-count"))+1;s.setAttribute("data-global-error-msg-compact",n),s.setAttribute("data-global-error-msg-count",l.toString()),s.querySelector(".ui.message").textContent=e+(l>1?` (${l})`:""),i.prepend(s)}function b({error:e,reason:t,message:i,type:n,filename:s,lineno:l,colno:u}){const m=e??t,y=String(new URL(__webpack_require__.p,window.location.origin)),{runModeIsProd:A}=window.config??{};if(!m&&(i&&console.error(new Error(i)),A)||m instanceof Error&&(!m.stack?.includes(y)&&A||r(m)))return;let L=m?.message??i;l&&(L+=` (${s} @ ${l}:${u})`);const z=L.endsWith(".")?"":".";v(`JavaScript ${n==="unhandledrejection"?"promise rejection":n}: ${L}${z} Open browser console to see more details.`)}function _(){if(window._globalHandlerErrors?._inited){v("The global error handler has been initialized, do not initialize it again");return}window.config||v("Gitea JavaScript code couldn't run correctly, please check your custom templates");for(const e of window._globalHandlerErrors||[])b(e);window._globalHandlerErrors={_inited:!0,push:e=>b(e)}}_();const g=e=>e.replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/'/g,"&#39;").replace(/</g,"&lt;").replace(/>/g,"&gt;"),O=e=>e.replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/&#0?39;/g,"'").replace(/&quot;/g,'"').replace(/&amp;/g,"&");function R(e,...t){if(typeof e=="string")return g(e);let i=e[0];for(const[n,s]of t.entries())i=i+g(String(s))+e[n+1];return i}function J(e,...t){if(typeof e=="string")return O(e);let i=e[0];for(const[n,s]of t.entries())i=i+O(String(s))+e[n+1];return i}var Z=__webpack_require__("./web_src/js/svg.ts"),C=__webpack_require__("./web_src/js/utils/dom.ts"),we=__webpack_require__("./node_modules/toastify-js/src/toastify.js"),Be=__webpack_require__.n(we);const Ue={info:{icon:"octicon-check",background:"var(--color-green)",duration:2500},warning:{icon:"gitea-exclamation",background:"var(--color-orange)",duration:-1},error:{icon:"gitea-exclamation",background:"var(--color-red)",duration:-1}};function Q(e,t,{gravity:i,position:n,duration:s,useHtmlBody:l,preventDuplicates:u=!0,...m}={}){const y=l?String(e):R(e),A=`${t}-${y}`;if(u){const pe=document.querySelector(`.toastify[data-toast-unique-key="${CSS.escape(A)}"]`);if(pe){const de=pe.querySelector(".toast-duplicate-number");(0,C.fi)(de),de.textContent=String(Number(de.textContent)+1),(0,C.b7)(de,"pulse-1p5-200");return}}const{icon:L,background:z,duration:X}=Ue[t??"info"],_e=Be()({text:`
DesignScreenshot/output/git.buildapp.eu.org_run/git.buildapp.eu.org_2_login_page.html:248:`,"Plugins: https://atomiks.github.io/tippyjs/v6/plugins/"].join(" "))})}var vu=function(){return"innerHTML"};function dc(e,t){e[vu()]=t}function fc(e){var t=Eo();return e===!0?t.className=fl:(t.className=nc,Oa(e)?t.appendChild(e):dc(t,e)),t}function yl(e,t){Oa(t.content)?(dc(e,""),e.appendChild(t.content)):typeof t.content!="function"&&(t.allowHTML?dc(e,t.content):e.textContent=t.content)}function sa(e){var t=e.firstElementChild,i=jo(t.children);return{box:t,content:i.find(function(n){return n.classList.contains(zr)}),arrow:i.find(function(n){return n.classList.contains(fl)||n.classList.contains(nc)}),backdrop:i.find(function(n){return n.classList.contains(dl)})}}function bu(e){var t=Eo(),i=Eo();i.className=ic,i.setAttribute("data-state","hidden"),i.setAttribute("tabindex","-1");var n=Eo();n.className=zr,n.setAttribute("data-state","hidden"),yl(n,e.props),t.appendChild(i),i.appendChild(n),s(e.props,e.props);function s(l,u){var m=sa(t),y=m.box,A=m.content,L=m.arrow;u.theme?y.setAttribute("data-theme",u.theme):y.removeAttribute("data-theme"),typeof u.animation=="string"?y.setAttribute("data-animation",u.animation):y.removeAttribute("data-animation"),u.inertia?y.setAttribute("data-inertia",""):y.removeAttribute("data-inertia"),y.style.maxWidth=typeof u.maxWidth=="number"?u.maxWidth+"px":u.maxWidth,u.role?y.setAttribute("role",u.role):y.removeAttribute("role"),(l.content!==u.content||l.allowHTML!==u.allowHTML)&&yl(A,e.props),u.arrow?L?l.arrow!==u.arrow&&(y.removeChild(L),y.appendChild(fc(u.arrow))):y.appendChild(fc(u.arrow)):L&&y.removeChild(L)}return{popper:t,onUpdate:s}}bu.$$tippy=!0;var Ed=1,wl=[],Sl=[];function Ad(e,t){var i=_l(e,Object.assign({},Kn,Co(Da(t)))),n,s,l,u=!1,m=!1,y=!1,A=!1,L,z,X,_e=[],pe=hl(Pc,i.interactiveDebounce),de,Pe=Ed++,Le=null,Te=uu(i.plugins),He={isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},U={id:Pe,reference:e,popper:Eo(),popperInstance:Le,props:i,state:He,plugins:Te,clearDelayTimeouts:Bc,setProps:$c,setContent:Uc,show:T5,hide:L5,hideWithInteractivity:R5,enable:Bl,disable:Hc,unmount:M5,destroy:D5};if(!i.render)return U;var Se=i.render(U),ze=Se.popper,mt=Se.onUpdate;ze.setAttribute("data-tippy-root",""),ze.id="tippy-"+U.id,U.popper=ze,e._tippy=U,ze._tippy=U;var kt=Te.map(function(ut){return ut.fn(U)}),Kt=e.hasAttribute("aria-expanded");return Ya(),ss(),_s(),ns("onCreate",[U]),i.showOnCreate&&Hl(),ze.addEventListener("mouseenter",function(){U.props.interactive&&U.state.isVisible&&U.clearDelayTimeouts()}),ze.addEventListener("mouseleave",function(){U.props.interactive&&U.props.trigger.indexOf("mouseenter")>=0&&Hi().addEventListener("mousemove",pe)}),U;function gi(){var ut=U.props.touch;return Array.isArray(ut)?ut:[ut,0]}function li(){return gi()[0]==="hold"}function It(){var ut;return!!((ut=U.props.render)!=null&&ut.$$tippy)}function Si(){return de||e}function Hi(){var ut=Si().parentNode;return ut?oc(ut):document}function Qn(){return sa(ze)}function Un(ut){return U.state.isMounted&&!U.state.isVisible||Bs.isTouch||L&&L.type==="focus"?0:ta(U.props.delay,ut?0:1,Kn.delay)}function _s(ut){ut===void 0&&(ut=!1),ze.style.pointerEvents=U.props.interactive&&!ut?"":"none",ze.style.zIndex=""+U.props.zIndex}function ns(ut,ni,xi){if(xi===void 0&&(xi=!0),kt.forEach(function(Zi){Zi[ut]&&Zi[ut].apply(Zi,ni)}),xi){var vn;(vn=U.props)[ut].apply(vn,ni)}}function di(){var ut=U.props.aria;if(ut.content){var ni="aria-"+ut.content,xi=ze.id,vn=en(U.props.triggerTarget||e);vn.forEach(function(Zi){var Xs=Zi.getAttribute(ni);if(U.state.isVisible)Zi.setAttribute(ni,Xs?Xs+" "+xi:xi);else{var Lr=Xs&&Xs.replace(xi,"").trim();Lr?Zi.setAttribute(ni,Lr):Zi.removeAttribute(ni)}})}}function ss(){if(!(Kt||!U.props.aria.expanded)){var ut=en(U.props.triggerTarget||e);ut.forEach(function(ni){U.props.interactive?ni.setAttribute("aria-expanded",U.state.isVisible&&ni===Si()?"true":"false"):ni.removeAttribute("aria-expanded")})}}function Tr(){Hi().removeEventListener("mousemove",pe),wl=wl.filter(function(ut){return ut!==pe})}function Qs(ut){if(!(Bs.isTouch&&(y||ut.type==="mousedown"))){var ni=ut.composedPath&&ut.composedPath()[0]||ut.target;if(!(U.props.interactive&&Ir(ze,ni))){if(en(U.props.triggerTarget||e).some(function(xi){return Ir(xi,ni)})){if(Bs.isTouch||U.state.isVisible&&U.props.trigger.indexOf("click")>=0)return}else ns("onClickOutside",[U,ut]);U.props.hideOnClick===!0&&(U.clearDelayTimeouts(),U.hide(),m=!0,setTimeout(function(){m=!1}),U.state.isMounted||uo())}}}function Nr(){y=!0}function co(){y=!1}function Hr(){var ut=Hi();ut.addEventListener("mousedown",Qs,!0),ut.addEventListener("touchend",Qs,dr),ut.addEventListener("touchstart",co,dr),ut.addEventListener("touchmove",Nr,dr)}function uo(){var ut=Hi();ut.removeEventListener("mousedown",Qs,!0),ut.removeEventListener("touchend",Qs,dr),ut.removeEventListener("touchstart",co,dr),ut.removeEventListener("touchmove",Nr,dr)}function Ga(ut,ni){Qa(ut,function(){!U.state.isVisible&&ze.parentNode&&ze.parentNode.contains(ze)&&ni()})}function fo(ut,ni){Qa(ut,ni)}function Qa(ut,ni){var xi=Qn().box;function vn(Zi){Zi.target===xi&&(Pn(xi,"remove",vn),ni())}if(ut===0)return ni();Pn(xi,"remove",z),Pn(xi,"add",vn),z=vn}function Po(ut,ni,xi){xi===void 0&&(xi=!1);var vn=en(U.props.triggerTarget||e);vn.forEach(function(Zi){Zi.addEventListener(ut,ni,xi),_e.push({node:Zi,eventType:ut,handler:ni,options:xi})})}function Ya(){li()&&(Po("touchstart",Fl,{passive:!0}),Po("touchend",Fc,{passive:!0})),ml(U.props.trigger).forEach(function(ut){if(ut!=="manual")switch(Po(ut,Fl),ut){case"mouseenter":Po("mouseleave",Fc);break;case"focus":Po(Ao?"focusout":"blur",Il);break;case"focusin":Po("focusout",Il);break}})}function qc(){_e.forEach(function(ut){var ni=ut.node,xi=ut.eventType,vn=ut.handler,Zi=ut.options;ni.removeEventListener(xi,vn,Zi)}),_e=[]}function Fl(ut){var ni,xi=!1;if(!(!U.state.isEnabled||Nl(ut)||m)){var vn=((ni=L)==null?void 0:ni.type)==="focus";L=ut,de=ut.currentTarget,ss(),!U.state.isVisible&&jr(ut)&&wl.forEach(function(Zi){return Zi(ut)}),ut.type==="click"&&(U.props.trigger.indexOf("mouseenter")<0||u)&&U.props.hideOnClick!==!1&&U.state.isVisible?xi=!0:Hl(ut),ut.type==="click"&&(u=!xi),xi&&!vn&&_a(ut)}}function Pc(ut){var ni=ut.target,xi=Si().contains(ni)||ze.contains(ni);if(!(ut.type==="mousemove"&&xi)){var vn=Fo().concat(ze).map(function(Zi){var Xs,Lr=Zi._tippy,Ja=(Xs=Lr.popperInstance)==null?void 0:Xs.state;return Ja?{popperRect:Zi.getBoundingClientRect(),popperState:Ja,props:i}:null}).filter(Boolean);ac(vn,ut)&&(Tr(),_a(ut))}}function Fc(ut){var ni=Nl(ut)||U.props.trigger.indexOf("click")>=0&&u;if(!ni){if(U.props.interactive){U.hideWithInteractivity(ut);return}_a(ut)}}function Il(ut){U.props.trigger.indexOf("focusin")<0&&ut.target!==Si()||U.props.interactive&&ut.relatedTarget&&ze.contains(ut.relatedTarget)||_a(ut)}function Nl(ut){return Bs.isTouch?li()!==ut.type.indexOf("touch")>=0:!1}function Ic(){Nc();var ut=U.props,ni=ut.popperOptions,xi=ut.placement,vn=ut.offset,Zi=ut.getReferenceClientRect,Xs=ut.moveTransition,Lr=It()?sa(ze).arrow:null,Ja=Zi?{getBoundingClientRect:Zi,contextElement:Zi.contextElement||Si()}:e,tm={name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(Vc){var Za=Vc.state;if(It()){var O5=Qn(),cd=O5.box;["placement","reference-hidden","escaped"].forEach(function(Wc){Wc==="placement"?cd.setAttribute("data-placement",Za.placement):Za.attributes.popper["data-popper-"+Wc]?cd.setAttribute("data-"+Wc,""):cd.removeAttribute("data-"+Wc)}),Za.attributes.popper={}}}},ya=[{name:"offset",options:{offset:vn}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!Xs}},tm];It()&&Lr&&ya.push({name:"arrow",options:{element:Lr,padding:3}}),ya.push.apply(ya,ni?.modifiers||[]),U.popperInstance=ms(Ja,ze,Object.assign({},ni,{placement:xi,onFirstUpdate:X,modifiers:ya}))}function Nc(){U.popperInstance&&(U.popperInstance.destroy(),U.popperInstance=null)}function ho(){var ut=U.props.appendTo,ni,xi=Si();U.props.interactive&&ut===Fr||ut==="parent"?ni=xi.parentNode:ni=cu(ut,[xi]),ni.contains(ze)||ni.appendChild(ze),U.state.isMounted=!0,Ic()}function Fo(){return jo(ze.querySelectorAll("[data-tippy-root]"))}function Hl(ut){U.clearDelayTimeouts(),ut&&ns("onTrigger",[U,ut]),Hr();var ni=Un(!0),xi=gi(),vn=xi[0],Zi=xi[1];Bs.isTouch&&vn==="hold"&&Zi&&(ni=Zi),ni?n=setTimeout(function(){U.show()},ni):U.show()}function _a(ut){if(U.clearDelayTimeouts(),ns("onUntrigger",[U,ut]),!U.state.isVisible){uo();return}if(!(U.props.trigger.indexOf("mouseenter")>=0&&U.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(ut.type)>=0&&u)){var ni=Un(!1);ni?s=setTimeout(function(){U.state.isVisible&&U.hide()},ni):l=requestAnimationFrame(function(){U.hide()})}}function Bl(){U.state.isEnabled=!0}function Hc(){U.hide(),U.state.isEnabled=!1}function Bc(){clearTimeout(n),clearTimeout(s),cancelAnimationFrame(l)}function $c(ut){if(!U.state.isDestroyed){ns("onBeforeUpdate",[U,ut]),qc();var ni=U.props,xi=_l(e,Object.assign({},ni,Da(ut),{ignoreAttributes:!0}));U.props=xi,Ya(),ni.interactiveDebounce!==xi.interactiveDebounce&&(Tr(),pe=hl(Pc,xi.interactiveDebounce)),ni.triggerTarget&&!xi.triggerTarget?en(ni.triggerTarget).forEach(function(vn){vn.removeAttribute("aria-expanded")}):xi.triggerTarget&&e.removeAttribute("aria-expanded"),ss(),_s(),mt&&mt(ni,xi),U.popperInstance&&(Ic(),Fo().forEach(function(vn){requestAnimationFrame(vn._tippy.popperInstance.forceUpdate)})),ns("onAfterUpdate",[U,ut])}}function Uc(ut){U.setProps({content:ut})}function T5(){var ut=U.state.isVisible,ni=U.state.isDestroyed,xi=!U.state.isEnabled,vn=Bs.isTouch&&!U.props.touch,Zi=ta(U.props.duration,0,Kn.duration);if(!(ut||ni||xi||vn)&&!Si().hasAttribute("disabled")&&(ns("onShow",[U],!1),U.props.onShow(U)!==!1)){if(U.state.isVisible=!0,It()&&(ze.style.visibility="visible"),_s(),Hr(),U.state.isMounted||(ze.style.transition="none"),It()){var Xs=Qn(),Lr=Xs.box,Ja=Xs.content;ps([Lr,Ja],0)}X=function(){var ya;if(!(!U.state.isVisible||A)){if(A=!0,ze.offsetHeight,ze.style.transition=U.props.moveTransition,It()&&U.props.animation){var ld=Qn(),Vc=ld.box,Za=ld.content;ps([Vc,Za],Zi),ia([Vc,Za],"visible")}di(),ss(),pl(Sl,U),(ya=U.popperInstance)==null||ya.forceUpdate(),ns("onMount",[U]),U.props.animation&&It()&&fo(Zi,function(){U.state.isShown=!0,ns("onShown",[U])})}},ho()}}function L5(){var ut=!U.state.isVisible,ni=U.state.isDestroyed,xi=!U.state.isEnabled,vn=ta(U.props.duration,1,Kn.duration);if(!(ut||ni||xi)&&(ns("onHide",[U],!1),U.props.onHide(U)!==!1)){if(U.state.isVisible=!1,U.state.isShown=!1,A=!1,u=!1,It()&&(ze.style.visibility="hidden"),Tr(),uo(),_s(!0),It()){var Zi=Qn(),Xs=Zi.box,Lr=Zi.content;U.props.animation&&(ps([Xs,Lr],vn),ia([Xs,Lr],"hidden"))}di(),ss(),U.props.animation?It()&&Ga(vn,U.unmount):U.unmount()}}function R5(ut){Hi().addEventListener("mousemove",pe),pl(wl,pe),pe(ut)}function M5(){U.state.isVisible&&U.hide(),U.state.isMounted&&(Nc(),Fo().forEach(function(ut){ut._tippy.unmount()}),ze.parentNode&&ze.parentNode.removeChild(ze),Sl=Sl.filter(function(ut){return ut!==U}),U.state.isMounted=!1,ns("onHidden",[U]))}function D5(){U.state.isDestroyed||(U.clearDelayTimeouts(),U.unmount(),qc(),delete e._tippy,U.state.isDestroyed=!0,ns("onDestroy",[U]))}}function oo(e,t){t===void 0&&(t={});var i=Kn.plugins.concat(t.plugins||[]);Sd();var n=Object.assign({},t,{plugins:i}),s=rc(e);if(0)var l,u;var m=s.reduce(function(y,A){var L=A&&Ad(A,n);return L&&y.push(L),y},[]);return Oa(e)?m[0]:m}oo.defaultProps=Kn,oo.setDefaultProps=pu,oo.currentInput=Bs;var am=function(t){var i=t===void 0?{}:t,n=i.exclude,s=i.duration;Sl.forEach(function(l){var u=!1;if(n&&(u=qa(n)?l.reference===n:l.popper===n.popper),!u){var m=l.props.duration;l.setProps({duration:s}),l.hide(),l.state.isDestroyed||l.setProps({duration:m})}})},Cd=Object.assign({},Xl,{effect:function(t){var i=t.state,n={popper:{position:i.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(i.elements.popper.style,n.popper),i.styles=n,i.elements.arrow&&Object.assign(i.elements.arrow.style,n.arrow)}}),kd=function(t,i){var n;i===void 0&&(i={});var s=t,l=[],u=[],m,y=i.overrides,A=[],L=!1;function z(){u=s.map(function(U){return en(U.props.triggerTarget||U.reference)}).reduce(function(U,Se){return U.concat(Se)},[])}function X(){l=s.map(function(U){return U.reference})}function _e(U){s.forEach(function(Se){U?Se.enable():Se.disable()})}function pe(U){return s.map(function(Se){var ze=Se.setProps;return Se.setProps=function(mt){ze(mt),Se.reference===m&&U.setProps(mt)},function(){Se.setProps=ze}})}function de(U,Se){var ze=u.indexOf(Se);if(Se!==m){m=Se;var mt=(y||[]).concat("content").reduce(function(kt,Kt){return kt[Kt]=s[ze].props[Kt],kt},{});U.setProps(Object.assign({},mt,{getReferenceClientRect:typeof mt.getReferenceClientRect=="function"?mt.getReferenceClientRect:function(){var kt;return(kt=l[ze])==null?void 0:kt.getBoundingClientRect()}}))}}_e(!1),X(),z();var Pe={fn:function(){return{onDestroy:function(){_e(!0)},onHidden:function(){m=null},onClickOutside:function(ze){ze.props.showOnCreate&&!L&&(L=!0,m=null)},onShow:function(ze){ze.props.showOnCreate&&!L&&(L=!0,de(ze,l[0]))},onTrigger:function(ze,mt){de(ze,mt.currentTarget)}}}},Le=oo(Eo(),Object.assign({},xo(i,["overrides"]),{plugins:[Pe].concat(i.plugins||[]),triggerTarget:u,popperOptions:Object.assign({},i.popperOptions,{modifiers:[].concat(((n=i.popperOptions)==null?void 0:n.modifiers)||[],[Cd])})})),Te=Le.show;Le.show=function(U){if(Te(),!m&&U==null)return de(Le,l[0]);if(!(m&&U==null)){if(typeof U=="number")return l[U]&&de(Le,l[U]);if(s.indexOf(U)>=0){var Se=U.reference;return de(Le,Se)}if(l.indexOf(U)>=0)return de(Le,U)}},Le.showNext=function(){var U=l[0];if(!m)return Le.show(0);var Se=l.indexOf(m);Le.show(l[Se+1]||U)},Le.showPrevious=function(){var U=l[l.length-1];if(!m)return Le.show(U);var Se=l.indexOf(m),ze=l[Se-1]||U;Le.show(ze)};var He=Le.setProps;return Le.setProps=function(U){y=U.overrides||y,He(U)},Le.setInstances=function(U){_e(!0),A.forEach(function(Se){return Se()}),s=U,_e(!1),X(),z(),A=pe(Le),Le.setProps({triggerTarget:u})},A=pe(Le),Le},a={mouseover:"mouseenter",focusin:"focus",click:"click"};function f(e,t){var i=[],n=[],s=!1,l=t.target,u=xo(t,["target"]),m=Object.assign({},u,{trigger:"manual",touch:!1}),y=Object.assign({touch:Kn.touch},u,{showOnCreate:!0}),A=oo(e,m),L=en(A);function z(Pe){if(!(!Pe.target||s)){var Le=Pe.target.closest(l);if(Le){var Te=Le.getAttribute("data-tippy-trigger")||t.trigger||Kn.trigger;if(!Le._tippy&&!(Pe.type==="touchstart"&&typeof y.touch=="boolean")&&!(Pe.type!=="touchstart"&&Te.indexOf(a[Pe.type])<0)){var He=oo(Le,y);He&&(n=n.concat(He))}}}}function X(Pe,Le,Te,He){He===void 0&&(He=!1),Pe.addEventListener(Le,Te,He),i.push({node:Pe,eventType:Le,handler:Te,options:He})}function _e(Pe){var Le=Pe.reference;X(Le,"touchstart",z,dr),X(Le,"mouseover",z),X(Le,"focusin",z),X(Le,"click",z)}function pe(){i.forEach(function(Pe){var Le=Pe.node,Te=Pe.eventType,He=Pe.handler,U=Pe.options;Le.removeEventListener(Te,He,U)}),i=[]}function de(Pe){var Le=Pe.destroy,Te=Pe.enable,He=Pe.disable;Pe.destroy=function(U){U===void 0&&(U=!0),U&&n.forEach(function(Se){Se.destroy()}),n=[],pe(),Le()},Pe.enable=function(){Te(),n.forEach(function(U){return U.enable()}),s=!1},Pe.disable=function(){He(),n.forEach(function(U){return U.disable()}),s=!0},_e(Pe)}return L.forEach(de),A}var x={name:"animateFill",defaultValue:!1,fn:function(t){var i;if(!((i=t.props.render)!=null&&i.$$tippy))return{};var n=sa(t.popper),s=n.box,l=n.content,u=t.props.animateFill?T():null;return{onCreate:function(){u&&(s.insertBefore(u,s.firstElementChild),s.setAttribute("data-animatefill",""),s.style.overflow="hidden",t.setProps({arrow:!1,animation:"shift-away"}))},onMount:function(){if(u){var y=s.style.transitionDuration,A=Number(y.replace("ms",""));l.style.transitionDelay=Math.round(A/10)+"ms",u.style.transitionDuration=y,ia([u],"visible")}},onShow:function(){u&&(u.style.transitionDuration="0ms")},onHide:function(){u&&ia([u],"hidden")}}}};function T(){var e=Eo();return e.className=dl,ia([e],"hidden"),e}var I={clientX:0,clientY:0},F=[];function ie(e){var t=e.clientX,i=e.clientY;I={clientX:t,clientY:i}}function ae(e){e.addEventListener("mousemove",ie)}function ye(e){e.removeEventListener("mousemove",ie)}var $e={name:"followCursor",defaultValue:!1,fn:function(t){var i=t.reference,n=oc(t.props.triggerTarget||i),s=!1,l=!1,u=!0,m=t.props;function y(){return t.props.followCursor==="initial"&&t.state.isVisible}function A(){n.addEventListener("mousemove",X)}function L(){n.removeEventListener("mousemove",X)}function z(){s=!0,t.setProps({getReferenceClientRect:null}),s=!1}function X(de){var Pe=de.target?i.contains(de.target):!0,Le=t.props.followCursor,Te=de.clientX,He=de.clientY,U=i.getBoundingClientRect(),Se=Te-U.left,ze=He-U.top;(Pe||!t.props.interactive)&&t.setProps({getReferenceClientRect:function(){var kt=i.getBoundingClientRect(),Kt=Te,gi=He;Le==="initial"&&(Kt=kt.left+Se,gi=kt.top+ze);var li=Le==="horizontal"?kt.top:gi,It=Le==="vertical"?kt.right:Kt,Si=Le==="horizontal"?kt.bottom:gi,Hi=Le==="vertical"?kt.left:Kt;return{width:It-Hi,height:Si-li,top:li,right:It,bottom:Si,left:Hi}}})}function _e(){t.props.followCursor&&(F.push({instance:t,doc:n}),ae(n))}function pe(){F=F.filter(function(de){return de.instance!==t}),F.filter(function(de){return de.doc===n}).length===0&&ye(n)}return{onCreate:_e,onDestroy:pe,onBeforeUpdate:function(){m=t.props},onAfterUpdate:function(Pe,Le){var Te=Le.followCursor;s||Te!==void 0&&m.followCursor!==Te&&(pe(),Te?(_e(),t.state.isMounted&&!l&&!y()&&A()):(L(),z()))},onMount:function(){t.props.followCursor&&!l&&(u&&(X(I),u=!1),y()||A())},onTrigger:function(Pe,Le){jr(Le)&&(I={clientX:Le.clientX,clientY:Le.clientY}),l=Le.type==="focus"},onHidden:function(){t.props.followCursor&&(z(),L(),u=!0)}}}};function Fe(e,t){var i;return{popperOptions:Object.assign({},e.popperOptions,{modifiers:[].concat((((i=e.popperOptions)==null?void 0:i.modifiers)||[]).filter(function(n){var s=n.name;return s!==t.name}),[t])})}}var be={name:"inlinePositioning",defaultValue:!1,fn:function(t){var i=t.reference;function n(){return!!t.props.inlinePositioning}var s,l=-1,u=!1,m=[],y={name:"tippyInlinePositioning",enabled:!0,phase:"afterWrite",fn:function(_e){var pe=_e.state;n()&&(m.indexOf(pe.placement)!==-1&&(m=[]),s!==pe.placement&&m.indexOf(pe.placement)===-1&&(m.push(pe.placement),t.setProps({getReferenceClientRect:function(){return A(pe.placement)}})),s=pe.placement)}};function A(X){return it(hr(X),i.getBoundingClientRect(),jo(i.getClientRects()),l)}function L(X){u=!0,t.setProps(X),u=!1}function z(){u||L(Fe(t.props,y))}return{onCreate:z,onAfterUpdate:z,onTrigger:function(_e,pe){if(jr(pe)){var de=jo(t.reference.getClientRects()),Pe=de.find(function(Te){return Te.left-2<=pe.clientX&&Te.right+2>=pe.clientX&&Te.top-2<=pe.clientY&&Te.bottom+2>=pe.clientY}),Le=de.indexOf(Pe);l=Le>-1?Le:l}},onHidden:function(){l=-1}}}};function it(e,t,i,n){if(i.length<2||e===null)return t;if(i.length===2&&n>=0&&i[0].left>i[1].right)return i[n]||t;switch(e){case"top":case"bottom":{var s=i[0],l=i[i.length-1],u=e==="top",m=s.top,y=l.bottom,A=u?s.left:l.left,L=u?s.right:l.right,z=L-A,X=y-m;return{top:m,bottom:y,left:A,right:L,width:z,height:X}}case"left":case"right":{var _e=Math.min.apply(Math,i.map(function(ze){return ze.left})),pe=Math.max.apply(Math,i.map(function(ze){return ze.right})),de=i.filter(function(ze){return e==="left"?ze.left===_e:ze.right===pe}),Pe=de[0].top,Le=de[de.length-1].bottom,Te=_e,He=pe,U=He-Te,Se=Le-Pe;return{top:Pe,bottom:Le,left:Te,right:He,width:U,height:Se}}default:return t}}var dt={name:"sticky",defaultValue:!1,fn:function(t){var i=t.reference,n=t.popper;function s(){return t.popperInstance?t.popperInstance.state.elements.reference:i}function l(A){return t.props.sticky===!0||t.props.sticky===A}var u=null,m=null;function y(){var A=l("reference")?s().getBoundingClientRect():null,L=l("popper")?n.getBoundingClientRect():null;(A&&Ct(u,A)||L&&Ct(m,L))&&t.popperInstance&&t.popperInstance.update(),u=A,m=L,t.state.isMounted&&requestAnimationFrame(y)}return{onMount:function(){t.props.sticky&&y()}}}};function Ct(e,t){return e&&t?e.top!==t.top||e.right!==t.right||e.bottom!==t.bottom||e.left!==t.left:!0}oo.setDefaultProps({render:bu});var Et=oo,Li=__webpack_require__("./web_src/js/utils/time.ts");const hi=new Set,Ut='<svg width="16" height="7"><path d="m0 7 8-7 8 7Z" class="tippy-svg-arrow-outer"/><path d="m0 8 8-7 8 7Z" class="tippy-svg-arrow-inner"/></svg>';function Ie(e,t={}){const{onHide:i,onShow:n,onDestroy:s,role:l,theme:u,arrow:m,...y}=t,A=Et(e,{appendTo:document.body,animation:!1,allowHTML:!1,hideOnClick:!1,interactiveBorder:20,ignoreAttributes:!0,maxWidth:500,onHide:L=>(hi.delete(L),i?.(L)),onDestroy:L=>(hi.delete(L),s?.(L)),onShow:L=>{for(const z of hi)z.props.role==="tooltip"&&z.hide();return hi.add(L),e.setAttribute("aria-controls",L.popper.id),n?.(L)},arrow:m??(u==="bare"?!1:Ut),role:l||"menu",theme:u||l||"default",offset:[0,m?10:6],plugins:[$e],...y});return A.props.role==="menu"&&e.setAttribute("aria-haspopup","true"),A}function ft(e,t=null){if(vt(e),t=t??e.getAttribute("data-tooltip-content"),!t)return null;const n=!e.hasAttribute("data-clipboard-target"),s={content:t,delay:100,role:"tooltip",theme:"tooltip",hideOnClick:n,placement:e.getAttribute("data-tooltip-placement")||"top-start",followCursor:e.getAttribute("data-tooltip-follow-cursor")||!1,...e.getAttribute("data-tooltip-interactive")==="true"?{interactive:!0,aria:{content:"describedby",expanded:!1}}:{}};return e._tippy?e._tippy.setProps(s):Ie(e,s),e._tippy}function vt(e){let t=e.getAttribute("title");if(t){if(e.tagName.toLowerCase()==="relative-time"){const i=e.getAttribute("datetime");i&&(t=(0,Li.Rt)(new Date(i)))}e.setAttribute("data-tooltip-content",t),e.setAttribute("aria-label",t),e.setAttribute("title","")}}function Pt(e){e.target.removeEventListener("mouseover",Pt,!0),ft(this)}function ei(e){if(e.addEventListener("mouseover",Pt,{capture:!0}),!e.hasAttribute("aria-label")){const t=e.getAttribute("data-tooltip-content");t&&e.setAttribute("aria-label",t)}}function ci(e){for(const t of e.querySelectorAll("[data-tooltip-content]"))ei(t)}function Ot(){const e=i=>i.observe(document,{subtree:!0,childList:!0,attributeFilter:["data-tooltip-content","title"]}),t=new MutationObserver((i,n)=>{const s=n.takeRecords();n.disconnect();for(const l of[...i,...s])if(l.type==="childList")for(const u of l.addedNodes)(0,C.NF)(u)&&(ci(u),u.hasAttribute("data-tooltip-content")&&ei(u));else l.type==="attributes"&&ft(l.target);e(n)});e(t),ci(document.documentElement)}function Dt(e,t){let i;const n=e.closest("[data-tippy-root]")?.id;n?(e=document.body,i=document.querySelector(`[aria-controls="${CSS.escape(n)}"]`)?.getBoundingClientRect(),i=i??new DOMRect(0,0,0,0)):(e=e.closest(".ui.dropdown")??e,i=e.getBoundingClientRect());const s=e._tippy??ft(e,t);s.setContent(t),s.setProps({getReferenceClientRect:()=>i}),s.state.isShown||s.show(),s.setProps({onHidden:l=>{ft(e)||l.destroy()}})}var St=__webpack_require__("./web_src/js/utils.ts");async function Ii(e,{reject:t=!1}={}){var i;try{if(Array.isArray(e)){if(!((i=navigator?.clipboard)!=null&&i.write))for(const n of e)typeof n=="string"&&Ni(n);return await navigator.clipboard.write([new ClipboardItem(Object.fromEntries(e.map(n=>[n?.type??"text/plain",n])))]),!0}else{if(e instanceof Blob)return await navigator.clipboard.write([new ClipboardItem({[e.type]:e})]),!0;try{return await navigator.clipboard.writeText(String(e)),!0}catch{return Ni(e)}}}catch(n){if(t)throw n;return!1}}function Ni(e){if(!document.execCommand)return!1;const t=document.createElement("textarea");t.value=String(e),t.style.clipPath="inset(50%)",t.ariaHidden="true",document.body.append(t);try{return t.select(),document.execCommand("copy")}finally{t.remove()}}const{copy_success:un,copy_error:Sn}=window.config.i18n;function ui(){document.addEventListener("click",async e=>{const t=e.target.closest("[data-clipboard-text], [data-clipboard-target]");if(!t)return;e.preventDefault();let i=t.getAttribute("data-clipboard-text");if(i||(i=document.querySelector(t.getAttribute("data-clipboard-target"))?.value),i&&t.getAttribute("data-clipboard-text-type")==="url"&&(i=(0,St.oK)(i)),i){const n=await Ii(i);Dt(t,n?un:Sn)}})}function qi(e){return e.pull_request?e.state==="open"?e.pull_request.draft?"octicon-git-pull-request-draft":"octicon-git-pull-request":e.pull_request.merged?"octicon-git-merge":"octicon-git-pull-request-closed":e.state==="open"?"octicon-issue-opened":"octicon-issue-closed"}function oi(e){return e.pull_request?e.state==="open"?e.pull_request.draft?"grey":"green":e.pull_request.merged?"purple":"red":e.state==="open"?"green":"red"}const Xn={key:0,class:"tw-h-12 tw-w-12 is-loading"},ra={key:1,class:"tw-flex tw-flex-col tw-gap-2"},oa={class:"tw-text-12"},ko={class:"flex-text-block"},Kr={class:"issue-title tw-font-semibold tw-break-anywhere"},hc={class:"index"},_u={key:0},yu=["innerHTML"],aa={key:2,class:"tw-flex tw-flex-col tw-gap-2"},Ia={class:"tw-text-12"};var xl=(0,c.pM)({__name:"ContextPopup",setup(e){const{appSubUrl:t,i18n:i}=window.config,n=(0,Re.KR)(!1),s=(0,Re.KR)(null),l=(0,Re.KR)(""),u=i.error_occurred,m=(0,Re.KR)(null),y=(0,c.EW)(()=>new Date(s.value.created_at).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"})),A=(0,c.EW)(()=>{const X=s.value.body.replace(/\n+/g," ");return X.length>85?`${X.substring(0,85)}\u2026`:X}),L=(0,Re.KR)(null);(0,c.sV)(()=>{L.value.addEventListener("ce-load-context-popup",X=>{!n.value&&s.value===null&&z(X.detail)})});async function z(X){n.value=!0,m.value=null;try{const _e=await(0,Ae.fG)(`${t}/${X.ownerName}/${X.repoName}/issues/${X.indexString}/info`),pe=await _e.json();if(!_e.ok){m.value=pe.message??i.network_error;return}s.value=pe.convertedIssue,l.value=pe.renderedLabels}catch{m.value=i.network_error}finally{n.value=!1}}return(X,_e)=>((0,c.uX)(),(0,c.CE)("div",{ref_key:"root",ref:L},[n.value?((0,c.uX)(),(0,c.CE)("div",Xn)):(0,c.Q3)("v-if",!0),!n.value&&s.value!==null?((0,c.uX)(),(0,c.CE)("div",ra,[(0,c.Lk)("div",oa,(0,W.v_)(s.value.repository.full_name)+" on "+(0,W.v_)(y.value),1),(0,c.Lk)("div",ko,[(0,c.bF)((0,Re.R1)(Z.Ah),{name:(0,Re.R1)(qi)(s.value),class:(0,W.C4)(["text",(0,Re.R1)(oi)(s.value)])},null,8,["name","class"]),(0,c.Lk)("span",Kr,[(0,c.eW)((0,W.v_)(s.value.title)+" ",1),(0,c.Lk)("span",hc,"#"+(0,W.v_)(s.value.number),1)])]),A.value?((0,c.uX)(),(0,c.CE)("div",_u,(0,W.v_)(A.value),1)):(0,c.Q3)("v-if",!0),(0,c.Q3)(" eslint-disable-next-line vue/no-v-html "),s.value.labels.length?((0,c.uX)(),(0,c.CE)("div",{key:1,innerHTML:l.value},null,8,yu)):(0,c.Q3)("v-if",!0)])):(0,c.Q3)("v-if",!0),!n.value&&s.value===null?((0,c.uX)(),(0,c.CE)("div",aa,[(0,c.Lk)("div",Ia,(0,W.v_)((0,Re.R1)(u)),1),(0,c.Lk)("div",null,(0,W.v_)(m.value),1)])):(0,c.Q3)("v-if",!0)],512))}}),To=xl;function jl(){const e=document.querySelectorAll(".ref-issue");la(e)}function la(e){for(const t of e){if(t.classList.contains("ref-external-issue"))continue;const i=(0,St.S3)(t.getAttribute("href"));if(!i.ownerName)continue;const n=document.createElement("div");n.classList.add("tw-p-3"),t.parentNode.insertBefore(n,t.nextSibling);const s=Ai(To);try{s.mount(n)}catch(l){console.error(l),n.textContent="ContextPopup failed to load"}Ie(t,{theme:"default",content:n,placement:"top-start",interactive:!0,role:"dialog",interactiveBorder:5,onShow:()=>{n.firstChild.dispatchEvent(new CustomEvent("ce-load-context-popup",{detail:i}))}})}}function he(){const e=document.querySelector("#git-graph-container");if(!e)return;document.querySelector("#flow-color-monochrome")?.addEventListener("click",()=>{document.querySelector("#flow-color-monochrome").classList.add("active"),document.querySelector("#flow-color-colored")?.classList.remove("active"),e.classList.remove("colored"),e.classList.add("monochrome");const m=new URLSearchParams(window.location.search);m.set("mode","monochrome");const y=m.toString();y?window.history.replaceState({},"",`?${y}`):window.history.replaceState({},"",window.location.pathname);for(const A of document.querySelectorAll(".pagination a")){const L=A.getAttribute("href");if(!L)continue;const z=new URL(L,window.location.href),X=z.searchParams;X.set("mode","monochrome"),z.search=`?${X.toString()}`,A.setAttribute("href",z.href)}}),document.querySelector("#flow-color-colored")?.addEventListener("click",()=>{document.querySelector("#flow-color-colored").classList.add("active"),document.querySelector("#flow-color-monochrome")?.classList.remove("active"),e.classList.add("colored"),e.classList.remove("monochrome");for(const A of document.querySelectorAll(".pagination a")){const L=A.getAttribute("href");if(!L)continue;const z=new URL(L,window.location.href),X=z.searchParams;X.delete("mode"),z.search=`?${X.toString()}`,A.setAttribute("href",z.href)}const m=new URLSearchParams(window.location.search);m.delete("mode");const y=m.toString();y?window.history.replaceState({},"",`?${y}`):window.history.replaceState({},"",window.location.pathname)});const t=new URL(window.location.href),i=t.searchParams,n=()=>{const m=i.toString(),y=new URL(t);y.searchParams.set("div-only","true"),window.history.replaceState({},"",m?`?${m}`:window.location.pathname),document.querySelector("#pagination").innerHTML="",(0,C.y9)("#rel-container"),(0,C.y9)("#rev-container"),(0,C.fi)("#loading-indicator"),(async()=>{const L=await(await(0,Ae.fG)(String(y))).text(),z=document.createElement("div");z.innerHTML=L,document.querySelector("#pagination").innerHTML=z.querySelector("#pagination").innerHTML,document.querySelector("#rel-container").innerHTML=z.querySelector("#rel-container").innerHTML,document.querySelector("#rev-container").innerHTML=z.querySelector("#rev-container").innerHTML,(0,C.y9)("#loading-indicator"),(0,C.fi)("#rel-container"),(0,C.fi)("#rev-container")})()},s=i.getAll("branch");i.has("hide-pr-refs")&&i.get("hide-pr-refs")==="true"&&s.splice(0,0,"...flow-hide-pr-refs");const l=document.querySelector("#flow-select-refs-dropdown"),u=(0,ke.mD)(l);u.dropdown({clearable:!0}),u.dropdown("set selected",s),u.dropdown({onRemove(m){if(m==="...flow-hide-pr-refs")i.delete("hide-pr-refs");else{const y=i.getAll("branch");i.delete("branch");for(const A of y)A!==m&&i.append("branch",A)}n()},onAdd(m){m==="...flow-hide-pr-refs"?i.set("hide-pr-refs","true"):i.append("branch",m),n()}}),e.addEventListener("mouseenter",m=>{if(m.target.matches("#rev-list li")){const y=m.target.getAttribute("data-flow");if(y==="0")return;document.querySelector(`#flow-${y}`)?.classList.add("highlight"),m.target.classList.add("hover");for(const A of document.querySelectorAll(`#rev-list li[data-flow='${y}']`))A.classList.add("highlight")}else if(m.target.matches("#rel-container .flow-group")){m.target.classList.add("highlight");const y=m.target.getAttribute("data-flow");for(const A of document.querySelectorAll(`#rev-list li[data-flow='${y}']`))A.classList.add("highlight")}else if(m.target.matches("#rel-container .flow-commit")){const y=m.target.getAttribute("data-rev");document.querySelector(`#rev-list li#commit-${y}`)?.classList.add("hover")}}),e.addEventListener("mouseleave",m=>{if(m.target.matches("#rev-list li")){const y=m.target.getAttribute("data-flow");if(y==="0")return;document.querySelector(`#flow-${y}`)?.classList.remove("highlight"),m.target.classList.remove("hover");for(const A of document.querySelectorAll(`#rev-list li[data-flow='${y}']`))A.classList.remove("highlight")}else if(m.target.matches("#rel-container .flow-group")){m.target.classList.remove("highlight");const y=m.target.getAttribute("data-flow");for(const A of document.querySelectorAll(`#rev-list li[data-flow='${y}']`))A.classList.remove("highlight")}else if(m.target.matches("#rel-container .flow-commit")){const y=m.target.getAttribute("data-rev");document.querySelector(`#rev-list li#commit-${y}`)?.classList.remove("hover")}})}var Ce=Object.defineProperty,ot=(e,t,i)=>t in e?Ce(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i,wt=(e,t,i)=>(ot(e,typeof t!="symbol"?t+"":t,i),i);const _t=class{constructor(e,t,i){wt(this,"startDate"),wt(this,"endDate"),wt(this,"max"),wt(this,"_values"),wt(this,"_firstFullWeekOfMonths"),wt(this,"_activities"),wt(this,"_calendar"),this.endDate=this.parseDate(e),this.max=i||Math.ceil(Math.max(...t.map(n=>n.count))/5*4),this.startDate=this.shiftDate(e,-_t.DAYS_IN_ONE_YEAR),this._values=t}set values(e){this.max=Math.ceil(Math.max(...e.map(t=>t.count))/5*4),this._values=e,this._firstFullWeekOfMonths=void 0,this._calendar=void 0,this._activities=void 0}get values(){return this._values}get activities(){if(!this._activities){this._activities=new Map;for(let e=0,t=this.values.length;e<t;e++)this._activities.set(this.keyDayParser(this.values[e].date),{count:this.values[e].count,colorIndex:this.getColorIndex(this.values[e].count)})}return this._activities}get weekCount(){return this.getDaysCount()/_t.DAYS_IN_WEEK}get calendar(){if(!this._calendar){let e=this.shiftDate(this.startDate,-this.getCountEmptyDaysAtStart());e=new Date(e.getFullYear(),e.getMonth(),e.getDate()),this._calendar=new Array(this.weekCount);for(let t=0,i=this._calendar.length;t<i;t++){this._calendar[t]=new Array(_t.DAYS_IN_WEEK);for(let n=0;n<_t.DAYS_IN_WEEK;n++){const s=this.activities.get(this.keyDayParser(e));this._calendar[t][n]={date:new Date(e.valueOf()),count:s?s.count:void 0,colorIndex:s?s.colorIndex:0},e.setDate(e.getDate()+1)}}}return this._calendar}get firstFullWeekOfMonths(){if(!this._firstFullWeekOfMonths){const e=this.calendar;this._firstFullWeekOfMonths=[];for(let t=1,i=e.length;t<i;t++){const n=e[t-1][0].date,s=e[t][0].date;(n.getFullYear()<s.getFullYear()||n.getMonth()<s.getMonth())&&this._firstFullWeekOfMonths.push({value:s.getMonth(),index:t})}}return this._firstFullWeekOfMonths}getColorIndex(e){return e==null?0:e<=0?1:e>=this.max?5:Math.ceil(e*100/this.max*.03)+1}getCountEmptyDaysAtStart(){return this.startDate.getDay()}getCountEmptyDaysAtEnd(){return _t.DAYS_IN_WEEK-1-this.endDate.getDay()}getDaysCount(){return _t.DAYS_IN_ONE_YEAR+1+this.getCountEmptyDaysAtStart()+this.getCountEmptyDaysAtEnd()}shiftDate(e,t){const i=new Date(e);return i.setDate(i.getDate()+t),i}parseDate(e){return e instanceof Date?e:new Date(e)}keyDayParser(e){const t=this.parseDate(e);return String(t.getFullYear())+String(t.getMonth()).padStart(2,"0")+String(t.getDate()).padStart(2,"0")}};let lt=_t;wt(lt,"DEFAULT_RANGE_COLOR_LIGHT",["#ebedf0","#dae2ef","#c0ddf9","#73b3f3","#3886e1","#17459e"]),wt(lt,"DEFAULT_RANGE_COLOR_DARK",["#1f1f22","#1e334a","#1d466c","#1d5689","#1d69ac","#1B95D1"]),wt(lt,"DEFAULT_LOCALE",{months:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],days:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],on:"on",less:"Less",more:"More"}),wt(lt,"DEFAULT_TOOLTIP_UNIT","contributions"),wt(lt,"DAYS_IN_ONE_YEAR",365),wt(lt,"DAYS_IN_WEEK",7),wt(lt,"SQUARE_SIZE",10);const Wt=(0,c.pM)({name:"CalendarHeatmap",props:{endDate:{required:!0},max:{type:Number},rangeColor:{type:Array},values:{type:Array,required:!0},locale:{type:Object},tooltip:{type:Boolean,default:!0},tooltipUnit:{type:String,default:lt.DEFAULT_TOOLTIP_UNIT},tooltipFormatter:{type:Function},tippyProps:{type:Object,default:null},vertical:{type:Boolean,default:!1},noDataText:{type:[Boolean,String],default:null},round:{type:Number,default:0},darkMode:Boolean},emits:["dayClick"],setup(e){const t=lt.SQUARE_SIZE/5,i=lt.SQUARE_SIZE+t,n=Math.ceil(lt.SQUARE_SIZE*2.5),s=i*3,l=lt.SQUARE_SIZE+lt.SQUARE_SIZE/2,u=lt.SQUARE_SIZE+lt.SQUARE_SIZE/2,m=`translate(${n}, ${l})`,y=(0,Re.KR)(null),A=(0,Re.KR)(new Date),L=(0,Re.KR)(new lt(e.endDate,e.values,e.max)),z=(0,Re.KR)(0),X=(0,Re.KR)(0),_e=(0,Re.KR)("0 0 0 0"),pe=(0,Re.KR)("0 0 0 0"),de=(0,Re.KR)(""),Pe=(0,Re.KR)(""),Le=(0,Re.KR)(""),Te=(0,Re.KR)({}),He=(0,Re.KR)(e.rangeColor||(e.darkMode?lt.DEFAULT_RANGE_COLOR_DARK:lt.DEFAULT_RANGE_COLOR_LIGHT)),{values:U,tooltipUnit:Se,tooltipFormatter:ze,noDataText:mt,max:kt,vertical:Kt,locale:gi}=(0,Re.QW)(e),li=new Map;let It;function Si(){li.clear(),It?It.setInstances(Array.from(li.values())):It=kd(Array.from(li.values()),{overrides:[],moveTransition:"transform 0.1s ease-out",allowHTML:!0,...e.tippyProps})}function Hi(di){if(e.tooltip){if(di.count!==void 0)return e.tooltipFormatter?e.tooltipFormatter(di,e.tooltipUnit):`<b>${di.count} ${e.tooltipUnit}</b> ${Te.value.on} ${Te.value.months[di.date.getMonth()]} ${di.date.getDate()}, ${di.date.getFullYear()}`;if(e.noDataText)return`${e.noDataText}`;if(e.noDataText!==!1)return`<b>No ${e.tooltipUnit}</b> ${Te.value.on} ${Te.value.months[di.date.getMonth()]} ${di.date.getDate()}, ${di.date.getFullYear()}`}}function Qn(di){return e.vertical?`translate(0, ${i*L.value.weekCount-(di+1)*i})`:`translate(${di*i}, 0)`}function Un(di){return e.vertical?`translate(${di*i}, 0)`:`translate(0, ${di*i})`}function _s(di){return e.vertical?{x:3,y:i*L.value.weekCount-i*di.index-i/4}:{x:i*di.index,y:i-t}}(0,c.wB)([(0,Re.lW)(e,"rangeColor"),(0,Re.lW)(e,"darkMode")],([di,ss])=>{He.value=di||(ss?lt.DEFAULT_RANGE_COLOR_DARK:lt.DEFAULT_RANGE_COLOR_LIGHT)}),(0,c.wB)(Kt,di=>{di?(z.value=n+i*lt.DAYS_IN_WEEK+s,X.value=l+i*L.value.weekCount+t,de.value=`translate(${n}, 0)`,Pe.value=`translate(0, ${l})`):(z.value=n+i*L.value.weekCount+t,X.value=l+i*lt.DAYS_IN_WEEK,de.value=`translate(0, ${l})`,Pe.value=`translate(${n}, 0)`)},{immediate:!0}),(0,c.wB)([z,X],([di,ss])=>_e.value=` 0 0 ${di} ${ss}`,{immediate:!0}),(0,c.wB)([z,X,He],([di,ss,Tr])=>{Le.value=Kt.value?`translate(${n+i*lt.DAYS_IN_WEEK}, ${l})`:`translate(${di-i*Tr.length-30}, ${ss-u})`},{immediate:!0}),(0,c.wB)(gi,di=>Te.value=di?{...lt.DEFAULT_LOCALE,...di}:lt.DEFAULT_LOCALE,{immediate:!0}),(0,c.wB)(He,di=>pe.value=`0 0 ${lt.SQUARE_SIZE*(di.length+1)} ${lt.SQUARE_SIZE}`,{immediate:!0}),(0,c.wB)([U,Se,ze,mt,kt,He],()=>{L.value=new lt(e.endDate,e.values,e.max),li.forEach(di=>di.destroy()),(0,c.dY)(Si)}),(0,c.sV)(Si),(0,c.xo)(()=>{It?.destroy(),li.forEach(di=>di.destroy())});function ns(di){if(It&&di.target&&di.target.classList.contains("vch__day__square")&&di.target.dataset.weekIndex!==void 0&&di.target.dataset.dayIndex!==void 0){const ss=Number(di.target.dataset.weekIndex),Tr=Number(di.target.dataset.dayIndex);if(!isNaN(ss)&&!isNaN(Tr)){const Qs=Hi(L.value.calendar[ss][Tr]);if(Qs){const Nr=li.get(di.target);Nr?Nr.setContent(Qs):Nr||(li.set(di.target,Et(di.target,{content:Qs})),It.setInstances(Array.from(li.values())))}}}}return{SQUARE_BORDER_SIZE:t,SQUARE_SIZE:i,LEFT_SECTION_WIDTH:n,RIGHT_SECTION_WIDTH:s,TOP_SECTION_HEIGHT:l,BOTTOM_SECTION_HEIGHT:u,svg:y,heatmap:L,now:A,width:z,height:X,viewbox:_e,daysLabelWrapperTransform:de,monthsLabelWrapperTransform:Pe,yearWrapperTransform:m,legendWrapperTransform:Le,lo:Te,legendViewbox:pe,curRangeColor:He,getWeekPosition:Qn,getDayPosition:Un,getMonthLabelPosition:_s,initTippyLazy:ns}}}),Ht=(e,t)=>{const i=e.__vccOpts||e;for(const[n,s]of t)i[n]=s;return i},Nt=["viewBox"],Mt=["transform"],bi=["x","y"],Xt=["transform"],ai=["x","y"],wi=["x","y"],zi=["x","y"],yn=["transform"],rn=["x"],$s=["rx","ry","width","height","x","y"],gs=["x","y"],mr=["transform"],Us=["transform"],ca=["rx","ry","transform","width","height","data-week-index","data-day-index","onClick"],mc={class:"vch__legend"},Vs={class:"vch__legend-left"},Er={class:"vch__legend-right"},pc={class:"vch__legend"},lm=["viewBox","height"],cm={class:"vch__legend__wrapper"},um=["rx","ry","width","height","x"];function dm(e,t,i,n,s,l){return(0,c.uX)(),(0,c.CE)("div",{class:(0,W.C4)({vch__container:!0,"dark-mode":e.darkMode})},[((0,c.uX)(),(0,c.CE)("svg",{class:"vch__wrapper",ref:"svg",viewBox:e.viewbox},[(0,c.Lk)("g",{class:"vch__months__labels__wrapper",transform:e.monthsLabelWrapperTransform},[((0,c.uX)(!0),(0,c.CE)(c.FK,null,(0,c.pI)(e.heatmap.firstFullWeekOfMonths,(u,m)=>((0,c.uX)(),(0,c.CE)("text",{class:"vch__month__label",key:m,x:e.getMonthLabelPosition(u).x,y:e.getMonthLabelPosition(u).y},(0,W.v_)(e.lo.months[u.value]),9,bi))),128))],8,Mt),(0,c.Lk)("g",{class:"vch__days__labels__wrapper",transform:e.daysLabelWrapperTransform},[(0,c.Lk)("text",{class:"vch__day__label",x:e.vertical?e.SQUARE_SIZE:0,y:e.vertical?e.SQUARE_SIZE-e.SQUARE_BORDER_SIZE:20},(0,W.v_)(e.lo.days[1]),9,ai),(0,c.Lk)("text",{class:"vch__day__label",x:e.vertical?e.SQUARE_SIZE*3:0,y:e.vertical?e.SQUARE_SIZE-e.SQUARE_BORDER_SIZE:44},(0,W.v_)(e.lo.days[3]),9,wi),(0,c.Lk)("text",{class:"vch__day__label",x:e.vertical?e.SQUARE_SIZE*5:0,y:e.vertical?e.SQUARE_SIZE-e.SQUARE_BORDER_SIZE:69},(0,W.v_)(e.lo.days[5]),9,zi)],8,Xt),e.vertical?((0,c.uX)(),(0,c.CE)("g",{key:0,class:"vch__legend__wrapper",transform:e.legendWrapperTransform},[(0,c.Lk)("text",{x:e.SQUARE_SIZE*1.25,y:"8"},(0,W.v_)(e.lo.less),9,rn),((0,c.uX)(!0),(0,c.CE)(c.FK,null,(0,c.pI)(e.curRangeColor,(u,m)=>((0,c.uX)(),(0,c.CE)("rect",{key:m,rx:e.round,ry:e.round,style:(0,W.Tr)({fill:u}),width:e.SQUARE_SIZE-e.SQUARE_BORDER_SIZE,height:e.SQUARE_SIZE-e.SQUARE_BORDER_SIZE,x:e.SQUARE_SIZE*1.75,y:e.SQUARE_SIZE*(m+1)},null,12,$s))),128)),(0,c.Lk)("text",{x:e.SQUARE_SIZE*1.25,y:e.SQUARE_SIZE*(e.curRangeColor.length+2)-e.SQUARE_BORDER_SIZE},(0,W.v_)(e.lo.more),9,gs)],8,yn)):(0,c.Q3)("",!0),(0,c.Lk)("g",{class:"vch__year__wrapper",transform:e.yearWrapperTransform,onMouseover:t[0]||(t[0]=(...u)=>e.initTippyLazy&&e.initTippyLazy(...u))},[((0,c.uX)(!0),(0,c.CE)(c.FK,null,(0,c.pI)(e.heatmap.calendar,(u,m)=>((0,c.uX)(),(0,c.CE)("g",{class:"vch__month__wrapper",key:m,transform:e.getWeekPosition(m)},[((0,c.uX)(!0),(0,c.CE)(c.FK,null,(0,c.pI)(u,(y,A)=>((0,c.uX)(),(0,c.CE)(c.FK,{key:A},[y.date<e.now?((0,c.uX)(),(0,c.CE)("rect",{key:0,class:"vch__day__square",rx:e.round,ry:e.round,transform:e.getDayPosition(A),width:e.SQUARE_SIZE-e.SQUARE_BORDER_SIZE,height:e.SQUARE_SIZE-e.SQUARE_BORDER_SIZE,style:(0,W.Tr)({fill:e.curRangeColor[y.colorIndex]}),"data-week-index":m,"data-day-index":A,onClick:L=>e.$emit("dayClick",y)},null,12,ca)):(0,c.Q3)("",!0)],64))),128))],8,Us))),128))],40,mr)],8,Nt)),(0,c.Lk)("div",mc,[(0,c.RG)(e.$slots,"legend",{},()=>[(0,c.Lk)("div",Vs,[(0,c.RG)(e.$slots,"vch__legend-left")]),(0,c.Lk)("div",Er,[(0,c.RG)(e.$slots,"legend-right",{},()=>[(0,c.Lk)("div",pc,[(0,c.Lk)("div",null,(0,W.v_)(e.lo.less),1),e.vertical?(0,c.Q3)("",!0):((0,c.uX)(),(0,c.CE)("svg",{key:0,class:"vch__external-legend-wrapper",viewBox:e.legendViewbox,height:e.SQUARE_SIZE-e.SQUARE_BORDER_SIZE},[(0,c.Lk)("g",cm,[((0,c.uX)(!0),(0,c.CE)(c.FK,null,(0,c.pI)(e.curRangeColor,(u,m)=>((0,c.uX)(),(0,c.CE)("rect",{key:m,rx:e.round,ry:e.round,style:(0,W.Tr)({fill:u}),width:e.SQUARE_SIZE-e.SQUARE_BORDER_SIZE,height:e.SQUARE_SIZE-e.SQUARE_BORDER_SIZE,x:e.SQUARE_SIZE*m},null,12,um))),128))])],8,lm)),(0,c.Lk)("div",null,(0,W.v_)(e.lo.more),1)])])])])])],2)}const Su=Ht(Wt,[["render",dm]]);function fm(e){e.component(Su.name,Su)}const F5={install:fm},hm={class:"total-contributions"};var mm=(0,c.pM)({__name:"ActivityHeatmap",props:{values:{},locale:{}},setup(e){const t=["var(--color-secondary-alpha-60)","var(--color-secondary-alpha-60)","var(--color-primary-light-4)","var(--color-primary-light-2)","var(--color-primary)","var(--color-primary-dark-2)","var(--color-primary-dark-4)"],i=(0,Re.KR)(new Date);(0,c.sV)(()=>{const s=document.querySelector(".vch__external-legend-wrapper");s.setAttribute("viewBox","12 0 80 10"),s.style.marginRight="-12px"});function n(s){const l=new URLSearchParams(document.location.search),u=l.get("date"),m=new Date(s.date.getTime()-s.date.getTimezoneOffset()*6e4).toISOString().substring(0,10);u&&u===m?l.delete("date"):l.set("date",m),l.delete("page");const y=l.toString();window.location.search=y.length?`?${y}`:""}return(s,l)=>((0,c.uX)(),(0,c.CE)(c.FK,null,[(0,c.Lk)("div",hm,(0,W.v_)(s.locale.textTotalContributions),1),(0,c.bF)((0,Re.R1)(Su),{locale:s.locale.heatMapLocale,"no-data-text":s.locale.noDataText,"tooltip-unit":s.locale.tooltipUnit,"end-date":i.value,values:s.values,"range-color":t,onDayClick:l[0]||(l[0]=u=>n(u)),"tippy-props":{theme:"tooltip"}},null,8,["locale","no-data-text","tooltip-unit","end-date","values"])],64))}}),pm=mm;function gm(){const e=document.querySelector("#user-heatmap");if(e)try{const t={};for(const{contributions:l,timestamp:u}of JSON.parse(e.getAttribute("data-heatmap-data"))){const m=new Date(u*1e3).toDateString();t[m]=(t[m]||0)+l}const i=Object.keys(t).map(l=>({date:new Date(l),count:t[l]})),n={heatMapLocale:{months:new Array(12).fill(void 0).map((l,u)=>(0,St.z5)(u)),days:new Array(7).fill(void 0).map((l,u)=>(0,St.FS)(u)),on:" - ",more:e.getAttribute("data-locale-more"),less:e.getAttribute("data-locale-less")},tooltipUnit:"contributions",textTotalContributions:e.getAttribute("data-locale-total-contributions"),noDataText:e.getAttribute("data-locale-no-contributions")};Ai(pm,{values:i,locale:n}).mount(e),e.classList.remove("is-loading")}catch(t){console.error("Heatmap failed to load",t),e.textContent="Heatmap failed to load"}}var vm=Object.defineProperty,bm=(e,t,i)=>t in e?vm(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i,Td=(e,t,i)=>bm(e,typeof t!="symbol"?t+"":t,i);function _m(e,t){const l=(0,St.a8)(e,"image/svg+xml").documentElement,u=l?.width?.baseVal,m=l?.height?.baseVal;if(u===void 0||m===void 0)return null;if(u.unitType===SVGLength.SVG_LENGTHTYPE_PERCENTAGE||m.unitType===SVGLength.SVG_LENGTHTYPE_PERCENTAGE){const y=new Image;if(y.src=t,y.width>1&&y.width<99999&&y.height>1&&y.height<99999)return{width:y.width,height:y.height};if(l.hasAttribute("viewBox")){const A=l.viewBox.baseVal;return{width:300,height:300*A.width/A.height}}return{width:300,height:300}}return null}function xu(e,t){const i={width:e?.width||0,height:e?.height||0},n={width:t?.width||0,height:t?.height||0},s={width:Math.max(n.width,i.width),height:Math.max(n.height,i.height)};return{imageAfter:e,imageBefore:t,sizeAfter:i,sizeBefore:n,maxSize:s,ratio:[Math.floor(s.width-i.width)/2,Math.floor(s.height-i.height)/2,Math.floor(s.width-n.width)/2,Math.floor(s.height-n.height)/2]}}class ym{constructor(){Td(this,"containerEl"),Td(this,"diffContainerWidth")}async init(t){this.containerEl=t,t.setAttribute("data-image-diff-loaded","true"),(0,ke.mD)(t).find(".ui.menu.tabular .item").tab(),this.diffContainerWidth=Math.max(t.closest(".diff-file-box").clientWidth-300,100);const i=[{path:t.getAttribute("data-path-after"),mime:t.getAttribute("data-mime-after"),images:t.querySelectorAll("img.image-after"),boundsInfo:t.querySelector(".bounds-info-after")},{path:t.getAttribute("data-path-before"),mime:t.getAttribute("data-mime-before"),images:t.querySelectorAll("img.image-before"),boundsInfo:t.querySelector(".bounds-info-before")}];await Promise.all(i.map(async l=>{const[u]=await Promise.all(Array.from(l.images,m=>(0,C.QW)(m,l.path)));if(!u&&l.boundsInfo&&(l.boundsInfo.textContent="(image error)"),l.mime==="image/svg+xml"){const y=await(await(0,Ae.fG)(l.path)).text(),A=_m(y,l.path);if(A){for(const L of l.images)L.setAttribute("width",String(A.width)),L.setAttribute("height",String(A.height));(0,C.y9)(l.boundsInfo)}}}));const n=i[0].images,s=i[1].images;this.initSideBySide(xu(n[0],s[0])),n.length>0&&s.length>0&&(this.initSwipe(xu(n[1],s[1])),this.initOverlay(xu(n[2],s[2]))),(0,C.xP)(t,".image-diff-tabs",l=>l.classList.remove("is-loading"))}initSideBySide(t){let i=1;t.maxSize.width>(this.diffContainerWidth-24)/2&&(i=(this.diffContainerWidth-24)/2/t.maxSize.width);const n=t.imageAfter&&t.imageBefore&&t.imageAfter.naturalWidth!==t.imageBefore.naturalWidth,s=t.imageAfter&&t.imageBefore&&t.imageAfter.naturalHeight!==t.imageBefore.naturalHeight;if(t.imageAfter){const l=this.containerEl.querySelector(".bounds-info-after .bounds-info-width");l&&(l.textContent=`${t.imageAfter.naturalWidth}px`,l.classList.toggle("green",n));const u=this.containerEl.querySelector(".bounds-info-after .bounds-info-height");u&&(u.textContent=`${t.imageAfter.naturalHeight}px`,u.classList.toggle("green",s))}if(t.imageBefore){const l=this.containerEl.querySelector(".bounds-info-before .bounds-info-width");l&&(l.textContent=`${t.imageBefore.naturalWidth}px`,l.classList.toggle("red",n));const u=this.containerEl.querySelector(".bounds-info-before .bounds-info-height");u&&(u.textContent=`${t.imageBefore.naturalHeight}px`,u.classList.toggle("red",s))}if(t.imageAfter){const l=t.imageAfter.parentNode;t.imageAfter.style.width=`${t.sizeAfter.width*i}px`,t.imageAfter.style.height=`${t.sizeAfter.height*i}px`,l.style.margin="10px auto",l.style.width=`${t.sizeAfter.width*i+2}px`,l.style.height=`${t.sizeAfter.height*i+2}px`}if(t.imageBefore){const l=t.imageBefore.parentNode;t.imageBefore.style.width=`${t.sizeBefore.width*i}px`,t.imageBefore.style.height=`${t.sizeBefore.height*i}px`,l.style.margin="10px auto",l.style.width=`${t.sizeBefore.width*i+2}px`,l.style.height=`${t.sizeBefore.height*i+2}px`}}initSwipe(t){let i=1;if(t.maxSize.width>this.diffContainerWidth-12&&(i=(this.diffContainerWidth-12)/t.maxSize.width),t.imageAfter){const s=t.imageAfter.parentNode,l=s.parentNode;t.imageAfter.style.width=`${t.sizeAfter.width*i}px`,t.imageAfter.style.height=`${t.sizeAfter.height*i}px`,s.style.margin=`0px ${t.ratio[0]*i}px`,s.style.width=`${t.sizeAfter.width*i+2}px`,s.style.height=`${t.sizeAfter.height*i+2}px`,l.style.padding=`${t.ratio[1]*i}px 0 0 0`,l.style.width=`${t.maxSize.width*i+2}px`}if(t.imageBefore){const s=t.imageBefore.parentNode,l=s.parentNode;t.imageBefore.style.width=`${t.sizeBefore.width*i}px`,t.imageBefore.style.height=`${t.sizeBefore.height*i}px`,s.style.margin=`${t.ratio[3]*i}px ${t.ratio[2]*i}px`,s.style.width=`${t.sizeBefore.width*i+2}px`,s.style.height=`${t.sizeBefore.height*i+2}px`,l.style.width=`${t.maxSize.width*i+2}px`,l.style.height=`${t.maxSize.height*i+2}px`}const n=this.containerEl.querySelector(".diff-swipe");n&&(n.style.width=`${t.maxSize.width*i+2}px`,n.style.height=`${t.maxSize.height*i+30}px`),this.containerEl.querySelector(".swipe-bar").addEventListener("mousedown",s=>{s.preventDefault(),this.initSwipeEventListeners(s.currentTarget)})}initSwipeEventListeners(t){const i=t.parentNode,n=i.clientWidth,s=u=>{u.preventDefault();const m=i.getBoundingClientRect(),y=Math.max(0,Math.min(u.clientX-m.left,n));t.style.left=`${y}px`,this.containerEl.querySelector(".swipe-container").style.width=`${i.clientWidth-y}px`},l=()=>{document.removeEventListener("mousemove",s),document.removeEventListener("mouseup",l)};document.addEventListener("mousemove",s),document.addEventListener("mouseup",l)}initOverlay(t){let i=1;if(t.maxSize.width>this.diffContainerWidth-12&&(i=(this.diffContainerWidth-12)/t.maxSize.width),t.imageAfter){const l=t.imageAfter.parentNode;t.imageAfter.style.width=`${t.sizeAfter.width*i}px`,t.imageAfter.style.height=`${t.sizeAfter.height*i}px`,l.style.margin=`${t.ratio[1]*i}px ${t.ratio[0]*i}px`,l.style.width=`${t.sizeAfter.width*i+2}px`,l.style.height=`${t.sizeAfter.height*i+2}px`}if(t.imageBefore){const l=t.imageBefore.parentNode,u=l.parentNode;t.imageBefore.style.width=`${t.sizeBefore.width*i}px`,t.imageBefore.style.height=`${t.sizeBefore.height*i}px`,l.style.margin=`${t.ratio[3]*i}px ${t.ratio[2]*i}px`,l.style.width=`${t.sizeBefore.width*i+2}px`,l.style.height=`${t.sizeBefore.height*i+2}px`,u.style.width=`${t.maxSize.width*i+2}px`,u.style.height=`${t.maxSize.height*i+2}px`}const n=this.containerEl.querySelector('input[type="range"]');function s(){t.imageAfter&&(t.imageAfter.parentNode.style.opacity=`${Number(n.value)/100}`)}n?.addEventListener("input",s),s()}}function Ld(){for(const e of(0,C.jB)(document,".image-diff:not([data-image-diff-loaded])"))new ym().init(e)}const wm=(e,t)=>{const i=e.__vccOpts||e;for(const[n,s]of t)i[n]=s;return i},Sm={props:{title:{type:String,default:""},points:{type:Array,default:()=>[]},height:{type:Number,default:100},width:{type:Number,default:300},showYAxis:{type:Boolean,default:!1},showXAxis:{type:Boolean,default:!1},labelHeight:{type:Number,default:12},showTrendLine:{type:Boolean,default:!1},trendLineColor:{type:String,default:"green"},trendLineWidth:{type:Number,default:2},easeIn:{type:Boolean,default:!0},showValues:{type:Boolean,default:!1},maxYAxis:{type:Number,default:0},animationDuration:{type:Number,default:.5},barColor:{type:String,default:"deepskyblue"},textColor:{type:String,default:"black"},textAltColor:{type:String,default:"black"},textFont:{type:String,default:"10px sans-serif"},useCustomLabels:{type:Boolean,default:!1},customLabels:{type:Array,default:()=>[]}},data(){return{dynamicPoints:[],staticPoints:[],extraTopHeightForYAxisLabel:4,extraBottomHeightForYAxisLabel:4,digitsUsedInYAxis:0}},computed:{usingObjectsForDataPoints(){return this.points.every(e=>typeof e=="object")},dataPoints(){return this.usingObjectsForDataPoints?this.points.map(e=>e.value):this.points},dataLabels(){return this.points.map((e,t)=>this.useCustomLabels?this.customLabels[t]:this.usingObjectsForDataPoints?e.label:t+1)},dataColors(){return this.points.map(e=>({barColor:e&&e.barColor?e.barColor:this.barColor,textColor:e&&e.textColor?e.textColor:this.textColor,textAltColor:e&&e.textAltColor?e.textAltColor:this.textAltColor}))},yAxisWidth(){return this.digitsUsedInYAxis*5.8+5},xAxisHeight(){return this.showYAxis?this.labelHeight:this.labelHeight+this.extraBottomHeightForYAxisLabel+this.extraTopHeightForYAxisLabel},fullSvgWidth(){return this.width},fullSvgHeight(){return this.height},innerChartWidth(){return this.showYAxis?this.width-this.yAxisWidth:this.width},innerChartHeight(){let e=this.height;return this.showYAxis&&(e-=this.extraTopHeightForYAxisLabel+this.extraBottomHeightForYAxisLabel),this.showXAxis&&(e-=this.xAxisHeight),e},partitionWidth(){return this.innerChartWidth/this.dataPoints.length},maxDomain(){return this.maxYAxis?this.maxYAxis:Math.ceil(Math.max(...this.dataPoints))},chartData(){return this.dynamicPoints.map((e,t)=>({staticValue:this.staticPoints[t],index:t,label:this.dataLabels[t],width:this.partitionWidth-2,midPoint:this.partitionWidth/2,yLabel:this.innerChartHeight+4,x:t*this.partitionWidth,xMidpoint:t*this.partitionWidth+this.partitionWidth/2,yOffset:this.innerChartHeight-this.y(e),height:this.y(e),barColor:this.dataColors[t].barColor,textColor:this.dataColors[t].textColor,textAltColor:this.dataColors[t].textAltColor}))},trendLine(){const e=this.applySlope(this.dynamicPoints);return{x1:this.partitionWidth/2,y1:this.roundTo(this.innerChartHeight-this.y(e[0]),2),x2:this.innerChartWidth-this.partitionWidth/2,y2:this.roundTo(this.innerChartHeight-this.y(e[e.length-1]),2)}}},watch:{dataPoints:{handler(e){this.tween(e)},deep:!0}},created(){this.easeIn?this.tween(this.dataPoints):(this.dynamicPoints=this.dataPoints,this.staticPoints=this.dataPoints)},methods:{y(e){return e/this.maxDomain*this.innerChartHeight},roundTo(e,t=0){let i=!1,n=e;n<0&&(i=!0,n*=-1);const s=10**t;return n=parseFloat((n*s).toFixed(11)),n=(Math.round(n)/s).toFixed(2),i&&(n=(n*-1).toFixed(2)),n},easeInFunc(e){return 1-Math.cos(e*(Math.PI/2))},tween(e){this.staticPoints=e,this.dynamicPoints=Array(e.length).fill(0);const t=this.dynamicPoints,i=200,n=10;let s=new Date().getTime(),l=setInterval(()=>{if(this.dynamicPoints!==t){clearInterval(l);return}let u=(new Date().getTime()-s)/i;if(u=u<0?1:Math.min(u,1),u>=1){clearInterval(l),this.dynamicPoints=e;return}for(let m=0;m<t.length;m+=1)this.dynamicPoints[m]=this.easeInFunc(u)*e[m]},n)},getTicks(){for(let e=6;e>0;e-=1)if(this.maxDomain%e===0){const t=e<3,i=t?3:e;return this.digitsUsedInYAxis=this.maxDomain.toFixed(t?1:0).replace(".","").length,[...new Array(i+1)].map((n,s)=>{const l=this.maxDomain/i*(i-s),u=this.innerChartHeight/i*s;return{key:s,text:t?l.toFixed(1):l,yText:u<10?10:u+4,x1:this.yAxisWidth-4,y1:u,x2:this.yAxisWidth-1,y2:u}})}return[]},applySlope(e){let t=0,i=0;for(let y=0;y<e.length;y+=1)t+=y,i+=e[y];t/=e.length,i/=e.length;let n=0,s=0;for(let y=0;y<e.length;y+=1)n+=(y-t)*(e[y]-i),s+=(y-t)**2;const l=n/s,u=i-l*t,m=[];for(let y=0;y<e.length;y+=1)m.push(l*y+u);return m}}},xm=["width","height"],jm={key:0,id:"title"},Em=["transform"],Am=["transform","width","height"],Cm=["transform"],km=["width","height","y"],Tm=["x","y","dy"],Lm={key:1},Rm=["x","y"],Mm=["x1","x2","y1","y2"],Dm=["x1","y1","x2","y2","stroke-width","stroke"],Om={key:0},qm=["x1","x2","y1","y2"],Pm={key:1},Fm=["x1","x2","y1"],Im=["x1","y1","x2","y2"],Nm=["y"];function Hm(e,t,i,n,s,l){return(0,c.uX)(),(0,c.CE)("svg",{width:l.fullSvgWidth,height:l.fullSvgHeight,"aria-labelledby":"title",role:"img"},[i.title?((0,c.uX)(),(0,c.CE)("title",jm,(0,W.v_)(i.title),1)):(0,c.Q3)("",!0),(0,c.Lk)("g",{transform:`translate(0,${i.showYAxis?s.extraTopHeightForYAxisLabel:0})`},[(0,c.Lk)("g",{transform:`translate(${i.showYAxis?l.yAxisWidth:0},0)`,width:l.innerChartWidth,height:l.innerChartHeight},[((0,c.uX)(!0),(0,c.CE)(c.FK,null,(0,c.pI)(l.chartData,u=>((0,c.uX)(),(0,c.CE)("g",{key:u.index,transform:`translate(${u.x},0)`},[(0,c.Lk)("title",null,[(0,c.RG)(e.$slots,"title",{bar:u},()=>[(0,c.Lk)("tspan",null,(0,W.v_)(u.staticValue),1)])]),(0,c.Lk)("rect",{width:u.width,height:u.height,x:2,y:u.yOffset,style:(0,W.Tr)({fill:u.barColor})},null,12,km),i.showValues?((0,c.uX)(),(0,c.CE)("text",{key:0,x:u.midPoint,y:u.yOffset,dy:`${u.height<22?"-5px":"15px"}`,"text-anchor":"middle",style:(0,W.Tr)({fill:u.height<22?u.textColor:u.textAltColor,font:i.textFont})},(0,W.v_)(u.staticValue),13,Tm)):(0,c.Q3)("",!0),i.showXAxis?((0,c.uX)(),(0,c.CE)("g",Lm,[(0,c.RG)(e.$slots,"label",{bar:u,textStyle:{fill:i.textColor,font:i.textFont}},()=>[(0,c.Lk)("text",{x:u.midPoint,y:`${u.yLabel+10}px`,"text-anchor":"middle",style:(0,W.Tr)({fill:i.textColor,font:i.textFont})},(0,W.v_)(u.label),13,Rm)]),(0,c.Lk)("line",{x1:u.midPoint,x2:u.midPoint,y1:l.innerChartHeight+3,y2:l.innerChartHeight,stroke:"#555555","stroke-width":"1"},null,8,Mm)])):(0,c.Q3)("",!0)],8,Cm))),128)),i.showTrendLine?((0,c.uX)(),(0,c.CE)("line",{key:0,x1:l.trendLine.x1,y1:l.trendLine.y1,x2:l.trendLine.x2,y2:l.trendLine.y2,"stroke-width":i.trendLineWidth,stroke:i.trendLineColor},null,8,Dm)):(0,c.Q3)("",!0)],8,Am),i.showXAxis?((0,c.uX)(),(0,c.CE)("g",Om,[(0,c.Lk)("line",{x1:i.showYAxis?l.yAxisWidth-1:2,x2:l.innerChartWidth+l.yAxisWidth,y1:l.innerChartHeight,y2:l.innerChartHeight,stroke:"#555555","stroke-width":"1"},null,8,qm)])):(0,c.Q3)("",!0),i.showYAxis?((0,c.uX)(),(0,c.CE)("g",Pm,[(0,c.Lk)("line",{x1:l.yAxisWidth-1,x2:l.yAxisWidth-1,y1:l.innerChartHeight,y2:"0",stroke:"#555555","stroke-width":"1"},null,8,Fm),((0,c.uX)(!0),(0,c.CE)(c.FK,null,(0,c.pI)(l.getTicks(),u=>((0,c.uX)(),(0,c.CE)("g",{key:u.key},[(0,c.Lk)("line",{x1:u.x1,y1:u.y1,x2:u.x2,y2:u.y2,stroke:"#555555","stroke-width":"1"},null,8,Im),(0,c.Lk)("text",{x:"0",y:u.yText,"alignment-baseline":"central",style:(0,W.Tr)({fill:i.textColor,font:i.textFont})},(0,W.v_)(u.text),13,Nm)]))),128))])):(0,c.Q3)("",!0)],8,Em)],8,xm)}const Rd=wm(Sm,[["render",Hm]]);function ju(e){ju.installed||(ju.installed=!0,e.component("VueBarGraph",Rd))}const Bm={install:ju};let gc=null;typeof window<"u"?gc=window.Vue:typeof __webpack_require__.g<"u"&&(gc=__webpack_require__.g.Vue),gc&&gc.use(Bm);const $m=["href"],Um=["x","y","href"],Vm=["x","y","href"],Wm={key:0};var zm=(0,c.pM)({__name:"RepoActivityTopAuthors",setup(e){const t=(0,Re.KR)({barColor:"green",textColor:"black",textAltColor:"white"}),i=window.config.pageData.repoActivityTopAuthors||[],n=(0,c.EW)(()=>i.map(y=>({value:y.commits,label:y.name}))),s=(0,c.EW)(()=>i.map((y,A)=>({position:A+1,...y}))),l=(0,c.EW)(()=>i.length*40),u=(0,Re.KR)(null),m=(0,Re.KR)(null);return(0,c.sV)(()=>{const y=window.getComputedStyle(u.value),A=window.getComputedStyle(m.value);t.value={barColor:y.backgroundColor,textColor:y.color,textAltColor:A.color}}),(y,A)=>((0,c.uX)(),(0,c.CE)("div",null,[(0,c.Lk)("div",{class:"activity-bar-graph",ref_key:"styleElement",ref:u,style:{width:"0",height:"0"}},null,512),(0,c.Lk)("div",{class:"activity-bar-graph-alt",ref_key:"altStyleElement",ref:m,style:{width:"0",height:"0"}},null,512),(0,c.bF)((0,Re.R1)(Rd),{points:n.value,"show-x-axis":!0,"show-y-axis":!1,"show-values":!0,width:l.value,"bar-color":t.value.barColor,"text-color":t.value.textColor,"text-alt-color":t.value.textAltColor,height:100,"label-height":20},{label:(0,c.k6)(L=>[((0,c.uX)(!0),(0,c.CE)(c.FK,null,(0,c.pI)(s.value,(z,X)=>((0,c.uX)(),(0,c.CE)("g",{key:z.position},[L.bar.index===X&&z.home_link?((0,c.uX)(),(0,c.CE)("a",{key:0,href:z.home_link},[(0,c.Lk)("image",{x:`${L.bar.midPoint-10}px`,y:`${L.bar.yLabel}px`,height:"20",width:"20",href:z.avatar_link},null,8,Um)],8,$m)):L.bar.index===X?((0,c.uX)(),(0,c.CE)("image",{key:1,x:`${L.bar.midPoint-10}px`,y:`${L.bar.yLabel}px`,height:"20",width:"20",href:z.avatar_link},null,8,Vm)):(0,c.Q3)("v-if",!0)]))),128))]),title:(0,c.k6)(L=>[((0,c.uX)(!0),(0,c.CE)(c.FK,null,(0,c.pI)(s.value,(z,X)=>((0,c.uX)(),(0,c.CE)("tspan",{key:z.position},[L.bar.index===X?((0,c.uX)(),(0,c.CE)("tspan",Wm,(0,W.v_)(z.name),1)):(0,c.Q3)("v-if",!0)]))),128))]),_:1},8,["points","width","bar-color","text-color","text-alt-color"])]))}}),Km=zm,pr=__webpack_require__("./web_src/js/utils/url.ts");async function Xm(e){e.preventDefault();const t=e.target.closest("a.archive-link[href]"),i=t.closest(".ui.dropdown")??t;i.classList.add("is-loading","loading-icon-2px");try{for(let n=0;;n++){const s=await(0,Ae.LO)(t.href);if(!s.ok)throw new Error(`Invalid server response: ${s.status}`);if((await s.json()).complete)break;await(0,St.yy)(Math.min((n+1)*750,2e3))}window.location.href=t.href}catch(n){console.error(n),gt(`Failed to download the archive: ${n}`,{duration:2500})}finally{i.classList.remove("is-loading","loading-icon-2px")}}function Gm(){(0,C.jB)(document,"a.archive-link[href]",e=>e.addEventListener("click",Xm))}function Qm(){const e=document.querySelector("#repo-activity-top-authors-chart");e&&Ai(Km).mount(e)}function Ym(e,t){const i=e.indexOf("{url}");if(i===-1)return e;const n=e.indexOf("?"),s=n>=0&&n<i;return e.replace("{url}",s?encodeURIComponent(t):t)}function Md(e){const t=e.querySelector(".repo-clone-url"),i=e.querySelector(".repo-clone-https"),n=e.querySelector(".repo-clone-ssh"),s=e.querySelector(".repo-clone-tea"),l=function(){let u=localStorage.getItem("repo-clone-protocol");["https","ssh","tea"].includes(u)||(u="https"),u==="tea"&&!s&&(u="https"),u==="https"&&!i?u="ssh":u==="ssh"&&!n&&(u="https");const m=u==="https",y=u==="ssh",A=u==="tea";i&&(i.textContent=window.origin.split(":")[0].toUpperCase(),i.classList.toggle("active",m)),n&&n.classList.toggle("active",y),s&&s.classList.toggle("active",A);let L;if(m?L=i:y?L=n:A&&(L=s),!L)return;const z=(0,pr.BZ)(L.getAttribute("data-link"));for(const X of document.querySelectorAll(".js-clone-url"))X.nodeName==="INPUT"?X.value=z:X.textContent=z;for(const X of e.querySelectorAll(".js-clone-url-editor"))X.href=Ym(X.getAttribute("data-href-template"),z)};l(),i?.addEventListener("click",()=>{localStorage.setItem("repo-clone-protocol","https"),l()}),n?.addEventListener("click",()=>{localStorage.setItem("repo-clone-protocol","ssh"),l()}),s?.addEventListener("click",()=>{localStorage.setItem("repo-clone-protocol","tea"),l()}),t.addEventListener("focus",()=>{t.select()})}function Jm(e){const t=e.nextElementSibling;Md(t),Ie(e,{content:t,trigger:"click",placement:"bottom-end",interactive:!0,hideOnClick:!0,arrow:!1})}function Zm(){(0,C.jB)(document,".js-btn-clone-panel",Jm),(0,C.jB)(document,".clone-buttons-combo",Md)}async function ep(e,t,i,n){try{if(!(await(0,Ae.LO)(e,{data:new URLSearchParams({action:t,issue_ids:i,id:n})})).ok)throw new Error("Failed to update issues meta")}catch(s){console.error(s)}}function Dd(e){e=e.trim().replace(/[^-.\w]/g,"-");for(let t="";t!==e;){t=e,e=e.replace(/\.+$/g,""),e=e.replace(/\.{2,}/g,".");for(const i of[".git",".wiki",".rss",".atom"])e.endsWith(i)&&(e=e.substring(0,e.length-i.length))}return[".","..","-"].includes(e)&&(e=""),e}const Eu=document.querySelector("#service_type"),Od=document.querySelector("#auth_username"),qd=document.querySelector("#auth_password"),Pd=document.querySelector("#auth_token"),Fd=document.querySelector("#mirror"),Au=document.querySelector("#lfs"),tp=document.querySelector("#lfs_settings"),Id=document.querySelector("#lfs_endpoint"),Cu=document.querySelectorAll("#migrate_items input[type=checkbox]");function ip(){np(),Nd(),Od?.addEventListener("input",()=>{El(!1)}),qd?.addEventListener("input",()=>{El(!1)}),Pd?.addEventListener("input",()=>{El(!0)}),Fd?.addEventListener("change",()=>{El(!0)}),document.querySelector("#lfs_settings_show")?.addEventListener("click",i=>{i.preventDefault(),i.stopPropagation(),(0,C.fi)(Id)}),Au?.addEventListener("change",Nd);const e=document.querySelector("#clone_addr"),t=document.querySelector("#repo_name");if(e&&t){let i=!1;t.addEventListener("input",()=>{i=!0}),e.addEventListener("input",()=>{if(i)return;let n=e.value.split(/[?#]/)[0];const s=/^(.*\/)?((.+?)\/?)$/.exec(n);if(!s||s.length<4){t.value="";return}n=s[3].split(/[?#]/)[0],t.value=Dd(n)})}}function np(){if(!Eu)return;const e=Number(Eu.value);El(e!==1)}function El(e){let t=!1;if(e?t=Pd?.value!=="":t=Od?.value!==""||qd?.value!=="",t&&Number(Eu?.value)>1){if(Fd?.checked){for(const i of Cu)i.disabled=i.name!=="wiki";return}for(const i of Cu)i.disabled=!1}else for(const i of Cu)i.disabled=!0}function Nd(){if(!Au)return;const e=Au.checked;(0,C.oi)(tp,e),(0,C.y9)(Id)}var sp=__webpack_require__("./web_src/js/utils/color.ts");async function vc(e,t={}){const{Sortable:i}=await __webpack_require__.e("sortablejs").then(__webpack_require__.bind(__webpack_require__,"./node_modules/sortablejs/modular/sortable.esm.js"));return new i(e,{animation:150,ghostClass:"card-ghost",onChoose:n=>{(t.handle?n.item.querySelector(t.handle):n.item).classList.add("tw-cursor-grabbing"),t.onChoose?.(n)},onUnchoose:n=>{(t.handle?n.item.querySelector(t.handle):n.item).classList.remove("tw-cursor-grabbing"),t.onUnchoose?.(n)},...t})}function Hd(e){const t=e.parentElement,i=t.querySelectorAll(".issue-card").length;t.querySelector(".project-column-issue-count").textContent=String(i)}async function Bd({item:e,from:t,to:i,oldIndex:n}){const s=i.querySelectorAll(".issue-card");Hd(t),Hd(i);const l={issues:Array.from(s,(u,m)=>({issueID:parseInt(u.getAttribute("data-issue")),sorting:m}))};try{await(0,Ae.LO)(`${i.getAttribute("data-url")}/move`,{data:l})}catch(u){console.error(u),t.insertBefore(e,t.children[n])}}async function rp(){const e=document.querySelector("#project-board");let t=e.querySelectorAll(".project-column");vc(e,{group:"project-column",draggable:".project-column",handle:".project-column-header",delayOnTouchOnly:!0,delay:500,onSort:async()=>{t=e.querySelectorAll(".project-column");const i={columns:Array.from(t,(n,s)=>({columnID:parseInt(n.getAttribute("data-id")),sorting:s}))};try{await(0,Ae.LO)(e.getAttribute("data-url"),{data:i})}catch(n){console.error(n)}}});for(const i of t){const n=i.querySelector(".cards");vc(n,{group:"shared",onAdd:Bd,onUpdate:Bd,delayOnTouchOnly:!0,delay:500})}}function op(e){const t=document.querySelector(".ui.modal#project-column-modal-edit"),i=t.querySelector("form"),n=i.querySelector('input[name="id"]'),s=i.querySelector('input[name="title"]'),l=i.querySelector('input[name="color"]'),u="data-modal-project-column-id",m="data-modal-project-column-title-input",y="data-modal-project-column-color-input";(0,C.jB)(document,".show-project-column-modal-edit",A=>{A.addEventListener("click",()=>{n.value=A.getAttribute(u),s.value=A.getAttribute(m),l.value=A.getAttribute(y),l.dispatchEvent(new Event("input",{bubbles:!0}))})}),i.addEventListener("submit",async A=>{A.preventDefault();const L=n.value,z=i.getAttribute("data-action-base-link"),X=new FormData(i),_e=L?`${z}/${L}`:`${z}/columns/new`,pe=L?"PUT":"POST";try{if(i.classList.add("is-loading"),await(0,Ae.Em)(_e,{method:pe,data:X}),!L){window.location.reload();return}(0,ke.mD)(t).modal("hide");const de=e.querySelector(`.show-project-column-modal-edit[${u}="${L}"]`);de.setAttribute(m,s.value),de.setAttribute(y,l.value);const Pe=e.querySelector(`.project-column[data-id="${L}"]`),Le=Pe.querySelector(".project-column-title-text");if(Le.textContent=s.value,l.value){const Te=(0,sp.a)(l.value);Pe.style.setProperty("background",l.value,"important"),Pe.style.setProperty("color",Te,"important"),(0,C.xP)(Pe,".divider",He=>He.style.color=Te)}else Pe.style.removeProperty("background"),Pe.style.removeProperty("color"),(0,C.xP)(Pe,".divider",Te=>Te.style.removeProperty("color"))}finally{i.classList.remove("is-loading")}})}function ap(){const e=document.querySelector(".screen-full"),t=document.querySelector(".screen-normal");if(!e||!t)return;const i=n=>{(0,St._M)(".projects-view",n),(0,C.oi)(e,!n),(0,C.oi)(t,n)};e.addEventListener("click",()=>i(!0)),t.addEventListener("click",()=>i(!1))}function lp(){ap();const e=document.querySelector('#project-board[data-project-borad-writable="true"]');e&&(rp(),op(e))}function cp(){for(const e of document.querySelectorAll("th[data-sortt-asc]")||[]){const t=e.getAttribute("data-sortt-asc"),i=e.getAttribute("data-sortt-desc"),n=e.getAttribute("data-sortt-default");e.addEventListener("click",()=>{up(t,i,n)})}}function up(e,t,i){if(!e)return!1;t||(t="");const n=new URL(window.location.href);let s=n.searchParams.get("sort");!s&&i&&(s=e),n.searchParams.set("sort",s!==e?e:t),window.location.replace(n.href)}function dp(){const e=window.config.pageData.adminUserListSearchForm;if(!e)return;const t=document.querySelector("#user-list-search-form");if(!t)return;for(const n of t.querySelectorAll(`button[name=sort][value="${e.SortType}"]`))n.classList.add("active");if(e.StatusFilterMap){for(const[n,s]of Object.entries(e.StatusFilterMap))if(s)for(const l of t.querySelectorAll(`input[name="status_filter[${n}]"][value="${s}"]`))l.checked=!0}for(const n of t.querySelectorAll("input[type=radio]"))n.addEventListener("click",()=>{t.submit()});const i=t.querySelectorAll(".j-reset-status-filter");for(const n of i)n.addEventListener("click",s=>{s.preventDefault();for(const l of t.querySelectorAll("input[type=radio]"))l.name.startsWith("status_filter[")&&(l.checked=!1);t.submit()})}const{appSubUrl:fp}=window.config;function hp(){const e=document.querySelector(".page-content.admin.config");if(e)for(const t of e.querySelectorAll('input[type="checkbox"][data-config-dyn-key]'))t.addEventListener("change",async()=>{try{const n=await(await(0,Ae.LO)(`${fp}/-/admin/config`,{data:new URLSearchParams({key:t.getAttribute("data-config-dyn-key"),value:String(t.checked)})})).json();if(n.errorMessage)throw new Error(n.errorMessage)}catch(i){Dt(t,i.toString()),t.checked=!t.checked}})}const $d=e=>`user-content-${e}`,Ud=e=>e.replace(/^user-content-/,""),mp=e=>e.startsWith("user-content-");function Vd(e){let t;try{t=decodeURIComponent(e??"")}catch{}if(!t)return;const i=$d(t);let n=document.getElementById(i);n=n??document.querySelector(`a[name="${CSS.escape(i)}"]`),n=!n&&mp(t)?document.getElementById(t):n,n?.scrollIntoView()}function pp(){const e=document.querySelectorAll(".markup");if(e.length){for(const t of e){for(const i of t.querySelectorAll("h1, h2, h3, h4, h5, h6")){const n=document.createElement("a");n.classList.add("anchor"),n.setAttribute("href",`#${encodeURIComponent(Ud(i.id))}`),n.innerHTML=(0,Z.JW)("octicon-link"),i.prepend(n)}for(const i of t.querySelectorAll('a[href^="#"]')){const n=i.getAttribute("href");n.startsWith("#user-content-")&&i.setAttribute("href",`#${Ud(n.substring(1))}`)}for(const i of t.querySelectorAll("a[name]")){const n=i.getAttribute("name");n&&i.setAttribute("name",$d(n))}for(const i of t.querySelectorAll('a[href^="#"]'))i.addEventListener("click",n=>{Vd(n.currentTarget.getAttribute("href")?.substring(1))})}document.querySelector(":target")||Vd(window.location.hash?.substring(1))}}const{appSubUrl:gp}=window.config;async function Wd(){await(0,St.yy)(5e3),window.location.href=`${gp}/`}const{appSubUrl:ku,notificationSettings:ua,assetVersionEncoded:vp}=window.config;let zd=0;function Kd(){const e=document.querySelector("#notification_table");if(e){window.addEventListener("pageshow",t=>{if(t.persisted){const i=document.querySelector("#notification_table"),n=document.querySelector(".notifications-unread-count");let s=parseInt(n.textContent);for(const l of i.querySelectorAll('.notifications-item[data-remove="true"]'))l.remove(),s-=1;n.textContent=String(s)}});for(const t of e.querySelectorAll('.notifications-item[data-status="1"] .notifications-link'))t.addEventListener("click",i=>{i.target.closest(".notifications-item").setAttribute("data-remove","true")})}}async function bp(e){try{const t=JSON.parse(e.data);for(const i of document.querySelectorAll(".notification_count"))i.classList.toggle("tw-hidden",t.Count===0),i.textContent=`${t.Count}`;await Gd()}catch(t){console.error(t,e)}}function _p(){if(!document.querySelector(".notification_count"))return;let e=!1;const t=(i,n)=>{i<=0||!Number.isFinite(i)||(e=!0,n=n??Xd(),setTimeout(async()=>{await yp(t,i,n)},i))};if(ua.EventSourceUpdateTime>0&&window.EventSource&&window.SharedWorker){const i=new SharedWorker(`${__webpack_require__.p}js/eventsource.sharedworker.js?v=${vp}`,"notification-worker");i.addEventListener("error",n=>{console.error("worker error",n)}),i.port.addEventListener("messageerror",()=>{console.error("unable to deserialize message")}),i.port.postMessage({type:"start",url:`${window.location.origin}${ku}/user/events`}),i.port.addEventListener("message",n=>{if(!n.data||!n.data.type){console.error("unknown worker message event",n);return}if(n.data.type==="notification-count")bp(n);else if(n.data.type==="no-event-source")e||t(ua.MinTimeout);else if(n.data.type==="error")console.error("worker port event error",n.data);else if(n.data.type==="logout"){if(n.data.data!=="here")return;i.port.postMessage({type:"close"}),i.port.close(),Wd()}else n.data.type==="close"&&(i.port.postMessage({type:"close"}),i.port.close())}),i.port.addEventListener("error",n=>{console.error("worker port error",n)}),i.port.start(),window.addEventListener("beforeunload",()=>{i.port.postMessage({type:"close"}),i.port.close()});return}t(ua.MinTimeout)}function Xd(){return Number(document.querySelector(".notification_count").textContent??"0")}async function yp(e,t,i){const n=Xd();if(i!==n){e(ua.MinTimeout,n);return}const s=await wp();let l=!1;i!==s?(l=!0,t=ua.MinTimeout):t<ua.MaxTimeout&&(t+=ua.TimeoutStep),e(t,s),l&&await Gd()}async function Gd(){const e=document.querySelector("#notification_div");if(e)try{const t=new URLSearchParams(window.location.search);t.set("div-only",String(!0)),t.set("sequence-number",String(++zd));const i=await(0,Ae.fG)(`${ku}/notifications?${t.toString()}`);if(!i.ok)throw new Error("Failed to fetch notification table");const n=await i.text(),s=(0,C.SL)(n);parseInt(s.getAttribute("data-sequence-number"))===zd&&(e.outerHTML=n,Kd())}catch(t){console.error(t)}}async function wp(){try{const e=await(0,Ae.fG)(`${ku}/notifications/new`);if(!e.ok)throw new Error("Failed to fetch notification count");const t=await e.json();(0,C.oi)(".notification_count",t.new!==0);for(const i of document.querySelectorAll(".notification_count"))i.textContent=`${t.new}`;return t.new}catch(e){return console.error(e),0}}let Qd,Yd,Jd,Zd;function Sp(e,t,i,n){const s=(0,C.SL)(`
DesignScreenshot/output/git.buildapp.eu.org_run/git.buildapp.eu.org_2_login_page.html:314:`);return s.lastIndexOf("#")>l},n=h0(async(s,l)=>{if(!i())return{matched:!1};const u=await p0(s,l);return i()?u:{matched:!1}},300);e.addEventListener("text-expander-change",s=>{const{key:l,text:u,provide:m}=s.detail;if(l===":"){const y=c0(u);if(!y.length)return m({matched:!1});const A=document.createElement("ul");A.classList.add("suggestions");for(const L of y){const z=Bu(L),X=document.createElement("li");X.setAttribute("role","option"),X.setAttribute("data-value",z),X.textContent=`${z} ${L}`,A.append(X)}m({matched:!0,fragment:A})}else if(l==="@"){const y=u0(u);if(!y.length)return m({matched:!1});const A=document.createElement("ul");A.classList.add("suggestions");for(const{value:L,name:z,fullname:X,avatar:_e}of y){const pe=document.createElement("li");pe.setAttribute("role","option"),pe.setAttribute("data-value",`${l}${L}`);const de=document.createElement("img");de.src=_e,pe.append(de);const Pe=document.createElement("span");if(Pe.classList.add("name"),Pe.textContent=z,pe.append(Pe),X&&X.toLowerCase()!==z){const Le=document.createElement("span");Le.classList.add("fullname"),Le.textContent=X,pe.append(Le)}A.append(pe)}m({matched:!0,fragment:A})}else l==="#"&&m(n(l,u))}),e.addEventListener("text-expander-value",({detail:s})=>{if(s?.item){const l=["@","#"].includes(s.key)?" ":"";s.value=`${s.item.getAttribute("data-value")}${l}`}})}var v0=Object.defineProperty,b0=(e,t,i)=>t in e?v0(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i,vs=(e,t,i)=>b0(e,typeof t!="symbol"?t+"":t,i);let $a=0;function hh(e){return e.value?!0:((0,C.EH)(e)?(e.required=!0,e.closest("form")?.reportValidity()):gt("Require non-empty content"),!1)}class ha{constructor(t,i={}){if(vs(this,"container"),vs(this,"options"),vs(this,"tabEditor"),vs(this,"tabPreviewer"),vs(this,"supportEasyMDE"),vs(this,"easyMDE"),vs(this,"easyMDEToolbarActions"),vs(this,"easyMDEToolbarDefault"),vs(this,"textarea"),vs(this,"textareaMarkdownToolbar"),vs(this,"textareaAutosize"),vs(this,"dropzone"),vs(this,"attachedDropzoneInst"),vs(this,"previewMode"),vs(this,"previewUrl"),vs(this,"previewContext"),t._giteaComboMarkdownEditor)throw new Error("ComboMarkdownEditor already initialized");t._giteaComboMarkdownEditor=this,this.options=i,this.container=t}async init(){this.prepareEasyMDEToolbarActions(),this.setupContainer(),this.setupTab(),await this.setupDropzone(),this.setupTextarea(),await this.switchToUserPreference()}applyEditorHeights(t,i){i&&(i.minHeight&&(t.style.minHeight=i.minHeight),i.height&&(t.style.height=i.height),i.maxHeight&&(t.style.maxHeight=i.maxHeight))}setupContainer(){this.supportEasyMDE=this.container.getAttribute("data-support-easy-mde")==="true",this.previewMode=this.container.getAttribute("data-content-mode"),this.previewUrl=this.container.getAttribute("data-preview-url"),this.previewContext=this.container.getAttribute("data-preview-context"),g0(this.container.querySelector("text-expander"))}setupTextarea(){this.textarea=this.container.querySelector(".markdown-text-editor"),this.textarea._giteaComboMarkdownEditor=this,this.textarea.id=`_combo_markdown_editor_${String($a++)}`,this.textarea.addEventListener("input",()=>Lo(this.container)),this.applyEditorHeights(this.textarea,this.options.editorHeights),this.textarea.getAttribute("data-disable-autosize")!=="true"&&(this.textareaAutosize=(0,C.DS)(this.textarea,{viewportMarginBottom:130})),this.textareaMarkdownToolbar=this.container.querySelector("markdown-toolbar"),this.textareaMarkdownToolbar.setAttribute("for",this.textarea.id);for(const s of this.textareaMarkdownToolbar.querySelectorAll(".markdown-toolbar-button"))s.setAttribute("role","button"),s.nodeName==="BUTTON"&&!s.getAttribute("type")&&s.setAttribute("type","button");const t=this.container.querySelector(".markdown-switch-monospace"),i=localStorage?.getItem("markdown-editor-monospace")==="true",n=t.getAttribute(i?"data-disable-text":"data-enable-text");t.setAttribute("data-tooltip-content",n),t.setAttribute("aria-checked",String(i)),t.addEventListener("click",s=>{s.preventDefault();const l=localStorage?.getItem("markdown-editor-monospace")!=="true";localStorage.setItem("markdown-editor-monospace",String(l)),this.textarea.classList.toggle("tw-font-mono",l);const u=t.getAttribute(l?"data-disable-text":"data-enable-text");t.setAttribute("data-tooltip-content",u),t.setAttribute("aria-checked",String(l))}),this.supportEasyMDE&&this.container.querySelector(".markdown-switch-easymde").addEventListener("click",async l=>{l.preventDefault(),this.userPreferredEditor="easymde",await this.switchToEasyMDE()}),this.initMarkdownButtonTableAdd(),Ig(this.textarea),Gg(this.textarea,this.dropzone)}async setupDropzone(){this.container.getAttribute("data-dropzone-parent-container")&&(this.dropzone=this.container.closest(this.container.getAttribute("data-dropzone-parent-container"))?.querySelector(".dropzone"),this.dropzone&&(this.attachedDropzoneInst=await Qf(this.dropzone),this.attachedDropzoneInst.on("processing",()=>Vu(this.container)),this.attachedDropzoneInst.on("queuecomplete",()=>Vu(this.container))))}dropzoneGetFiles(){return this.dropzone?Array.from(this.dropzone.querySelectorAll(".files [name=files]"),t=>t.value):null}dropzoneReloadFiles(){this.dropzone&&this.attachedDropzoneInst.emit(Ac)}dropzoneSubmitReload(){this.dropzone&&(this.attachedDropzoneInst.emit("submit"),this.attachedDropzoneInst.emit(Ac))}isUploading(){return this.dropzone?this.attachedDropzoneInst.getQueuedFiles().length||this.attachedDropzoneInst.getUploadingFiles().length:!1}setupTab(){const t=this.container.querySelectorAll(".tabular.menu > .item");if(!t.length)return;this.tabEditor=Array.from(t).find(s=>s.getAttribute("data-tab-for")==="markdown-writer"),this.tabPreviewer=Array.from(t).find(s=>s.getAttribute("data-tab-for")==="markdown-previewer"),this.tabEditor.setAttribute("data-tab",`markdown-writer-${$a}`),this.tabPreviewer.setAttribute("data-tab",`markdown-previewer-${$a}`);const i=this.container.querySelector('.ui.tab[data-tab-panel="markdown-writer"]'),n=this.container.querySelector('.ui.tab[data-tab-panel="markdown-previewer"]');i.setAttribute("data-tab",`markdown-writer-${$a}`),n.setAttribute("data-tab",`markdown-previewer-${$a}`),$a++,this.tabEditor.addEventListener("click",()=>{requestAnimationFrame(()=>{this.focus()})}),(0,ke.mD)(t).tab(),this.tabPreviewer.addEventListener("click",async()=>{const s=new FormData;s.append("mode",this.previewMode),s.append("context",this.previewContext),s.append("text",this.value());const u=await(await(0,Ae.LO)(this.previewUrl,{data:s})).text();uh(n,u)})}generateMarkdownTable(t,i){const n=[];n.push(`| ${"Header ".repeat(i).trim().split(" ").join(" | ")} |`,`| ${"--- ".repeat(i).trim().split(" ").join(" | ")} |`);for(let s=0;s<t;s++)n.push(`| ${"Cell ".repeat(i).trim().split(" ").join(" | ")} |`);return n.join(`
DesignScreenshot/output/git.buildapp.eu.org_run/git.buildapp.eu.org_2_login_page.html:318:`),n.hide()})}switchTabToEditor(){this.tabEditor.click()}prepareEasyMDEToolbarActions(){this.easyMDEToolbarDefault=["bold","italic","strikethrough","|","heading-1","heading-2","heading-3","heading-bigger","heading-smaller","|","code","quote","|","gitea-checkbox-empty","gitea-checkbox-checked","|","unordered-list","ordered-list","|","link","image","table","horizontal-rule","|","gitea-switch-to-textarea"]}parseEasyMDEToolbar(t,i){this.easyMDEToolbarActions=this.easyMDEToolbarActions||l0(t,this);const n=[];for(const s of i){const l=this.easyMDEToolbarActions[s];if(!l)throw new Error(`Unknown EasyMDE toolbar action ${s}`);n.push(l)}return n}async switchToUserPreference(){this.userPreferredEditor==="easymde"&&this.supportEasyMDE?await this.switchToEasyMDE():this.switchToTextarea()}switchToTextarea(){this.easyMDE&&((0,C.fi)(this.textareaMarkdownToolbar),this.easyMDE&&(this.easyMDE.toTextArea(),this.easyMDE=null))}async switchToEasyMDE(){if(this.easyMDE)return;const{default:t}=await __webpack_require__.e("easymde").then(__webpack_require__.t.bind(__webpack_require__,"./node_modules/easymde/src/js/easymde.js",23)),i={autoDownloadFontAwesome:!1,element:this.textarea,forceSync:!0,renderingConfig:{singleLineBreaks:!1},indentWithTabs:!1,tabSize:4,spellChecker:!1,inputStyle:"contenteditable",nativeSpellcheck:!0,...this.options.easyMDEOptions};i.toolbar=this.parseEasyMDEToolbar(t,i.toolbar??this.easyMDEToolbarDefault),this.easyMDE=new t(i),this.easyMDE.codemirror.on("change",()=>Lo(this.container)),this.easyMDE.codemirror.setOption("extraKeys",{"Cmd-Enter":n=>kc(n.getTextArea()),"Ctrl-Enter":n=>kc(n.getTextArea()),Enter:n=>{const s=document.querySelector(".tribute-container");(!s||s.style.display==="none")&&n.execCommand("newlineAndIndent")},Up:n=>{const s=document.querySelector(".tribute-container");if(!s||s.style.display==="none")return n.execCommand("goLineUp")},Down:n=>{const s=document.querySelector(".tribute-container");if(!s||s.style.display==="none")return n.execCommand("goLineDown")}}),this.applyEditorHeights(this.container.querySelector(".CodeMirror-scroll"),this.options.editorHeights),await Tg(this.easyMDE.codemirror.getInputField()),this.dropzone&&Xg(this.easyMDE,this.dropzone),(0,C.y9)(this.textareaMarkdownToolbar)}value(t=void 0){if(t===void 0)return this.easyMDE?this.easyMDE.value():this.textarea.value;this.easyMDE?this.easyMDE.value(t):this.textarea.value=t,this.textareaAutosize?.resizeToFit()}focus(){this.easyMDE?this.easyMDE.codemirror.focus():this.textarea.focus()}moveCursorToEnd(){this.textarea.focus(),this.textarea.setSelectionRange(this.textarea.value.length,this.textarea.value.length),this.easyMDE&&(this.easyMDE.codemirror.focus(),this.easyMDE.codemirror.setCursor(this.easyMDE.codemirror.lineCount(),0))}get userPreferredEditor(){return window.localStorage.getItem(`markdown-editor-${this.previewMode??"default"}`)}set userPreferredEditor(t){window.localStorage.setItem(`markdown-editor-${this.previewMode??"default"}`,t)}}vs(ha,"EventEditorContentChanged",Vf),vs(ha,"EventUploadStateChanged",Jf);function Xu(e){return e?(e.length&&(e=e[0]),e._giteaComboMarkdownEditor):null}async function ma(e,t={}){if(!e)throw new Error("initComboMarkdownEditor: container is null");const i=new ha(e,t);return await i.init(),i}var _0=Object.defineProperty,y0=(e,t,i)=>t in e?_0(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i,Ro=(e,t,i)=>y0(e,typeof t!="symbol"?t+"":t,i);function w0(){const e=[document.querySelector(".edit-content-zone:not(.tw-hidden) textarea"),document.querySelector("#comment-form textarea")];for(const t of e)if(t&&t.value.trim().length>10){if(t.parentElement.scrollIntoView(),!window.confirm("Page will be reloaded, but there are draft comments. Continuing to reload will discard the comments. Continue?"))return;break}window.location.reload()}class S0{constructor(t){if(Ro(this,"updateUrl"),Ro(this,"updateAlgo"),Ro(this,"selectionMode"),Ro(this,"elDropdown"),Ro(this,"elList"),Ro(this,"elComboValue"),Ro(this,"initialValues"),Ro(this,"container"),this.container=t,this.updateUrl=t.getAttribute("data-update-url"),this.updateAlgo=t.getAttribute("data-update-algo"),this.selectionMode=t.getAttribute("data-selection-mode"),!["single","multiple"].includes(this.selectionMode))throw new Error(`Invalid data-update-on: ${this.selectionMode}`);if(!["diff","all"].includes(this.updateAlgo))throw new Error(`Invalid data-update-algo: ${this.updateAlgo}`);this.elDropdown=t.querySelector(":scope > .ui.dropdown"),this.elList=t.querySelector(":scope > .ui.list"),this.elComboValue=t.querySelector(":scope > .combo-value")}collectCheckedValues(){return Array.from(this.elDropdown.querySelectorAll(".menu > .item.checked"),t=>t.getAttribute("data-value"))}updateUiList(t){const i=this.elList.querySelector(".item.empty-list");(0,C.xP)(this.elList,".item:not(.empty-list)",s=>s.remove());for(const s of t){const l=this.elDropdown.querySelector(`.menu > .item[data-value="${CSS.escape(s)}"]`);if(!l)continue;const u=l.cloneNode(!0);(0,C.jB)(u,".item-check-mark, .item-secondary-info",m=>m.remove()),this.elList.append(u)}const n=!!this.elList.querySelector(".item:not(.empty-list)");(0,C.oi)(i,!n)}async updateToBackend(t){if(this.updateAlgo==="diff"){for(const i of this.initialValues)t.includes(i)||await(0,Ae.LO)(this.updateUrl,{data:new URLSearchParams({action:"detach",id:i})});for(const i of t)this.initialValues.includes(i)||await(0,Ae.LO)(this.updateUrl,{data:new URLSearchParams({action:"attach",id:i})})}else await(0,Ae.LO)(this.updateUrl,{data:new URLSearchParams({id:t.join(",")})});w0()}async doUpdate(){const t=this.collectCheckedValues();this.initialValues.join(",")!==t.join(",")&&(this.updateUiList(t),this.updateUrl&&await this.updateToBackend(t),this.initialValues=t)}async onChange(){this.selectionMode==="single"&&(await this.doUpdate(),(0,ke.mD)(this.elDropdown).dropdown("hide"))}async onItemClick(t,i){if(i.preventDefault(),t.hasAttribute("data-can-change")&&t.getAttribute("data-can-change")!=="true")return;if(t.matches(".clear-selection")){(0,C.jB)(this.elDropdown,".menu > .item",s=>s.classList.remove("checked")),this.elComboValue.value="",this.onChange();return}const n=t.getAttribute("data-scope");n?this.elDropdown.querySelector(`.menu > .item.checked[data-scope="${CSS.escape(n)}"]`)===t?t.classList.toggle("checked"):((0,C.jB)(this.elDropdown,`.menu > .item[data-scope="${CSS.escape(n)}"]`,l=>l.classList.remove("checked")),t.classList.toggle("checked",!0)):this.selectionMode==="multiple"?t.classList.toggle("checked"):((0,C.jB)(this.elDropdown,".menu > .item.checked",s=>s.classList.remove("checked")),t.classList.toggle("checked",!0)),this.elComboValue.value=this.collectCheckedValues().join(","),this.onChange()}async onHide(){this.selectionMode==="multiple"&&this.doUpdate()}init(){if(this.elComboValue.value&&this.elComboValue.value!=="0"&&!(0,C.jB)(this.elDropdown,".menu > .item.checked").length){const t=this.elComboValue.value.split(",");for(const i of t)this.elDropdown.querySelector(`.menu > .item[data-value="${CSS.escape(i)}"]`)?.classList.add("checked");this.updateUiList(t)}this.initialValues=this.collectCheckedValues(),(0,C.ny)(this.elDropdown,"click",".item",(t,i)=>this.onItemClick(t,i)),(0,ke.mD)(this.elDropdown).dropdown("setting",{action:"nothing",fullTextSearch:"exact",hideDividers:"empty",onHide:()=>this.onHide()})}}function x0(){const e=document.querySelector(".ui.dropdown.select-branch.branch-selector-dropdown");if(!e)return;const t=e.getAttribute("data-url-update-issueref"),i=e.querySelector(".reference-list-menu");(0,C.jB)(i,".item:not(.no-select)",n=>n.addEventListener("click",async function(s){s.preventDefault();const l=this.getAttribute("data-id"),u=this.getAttribute("data-name");if(t)try{await(0,Ae.LO)(t,{data:new URLSearchParams({ref:l})}),window.location.reload()}catch(m){console.error(m)}else{const m=this.getAttribute("data-id-selector");document.querySelector(m).value=l,e.querySelector(".text-branch-name").textContent=u}}))}function j0(){const e=document.querySelector(".issue-due-form");if(!e)return;const t=e.querySelector("input[name=deadline]");document.querySelector(".issue-due-edit")?.addEventListener("click",()=>{(0,C.oi)(e)}),document.querySelector(".issue-due-remove")?.addEventListener("click",()=>{t.value="",e.dispatchEvent(new Event("submit",{cancelable:!0,bubbles:!0}))})}function E0(){x0(),j0(),(0,C.jB)(document,".issue-sidebar-combo",e=>new S0(e).init())}const{appSubUrl:Gu}=window.config;function A0(){const e=document.querySelector("#new-dependency-drop-list");if(!e)return;const t=(0,St.yG)(),i=e.getAttribute("data-issue-cross-repo-search");let n=`${t.repoLink}/issues/search?q={query}&type=${t.issueDependencySearchType}`;i==="true"&&(n=`${Gu}/issues/search?q={query}&priority_repo_id=${t.repoId}&type=${t.issueDependencySearchType}`),(0,ke.mD)(e).dropdown({fullTextSearch:!0,apiSettings:{cache:!1,rawResponse:!0,url:n,onResponse(s){const l={success:!0,results:[]},u=e.getAttribute("data-issue-id");for(const m of s)String(m.id)!==u&&l.results.push({value:m.id,name:`<div class="gt-ellipsis">#${m.number} ${R(m.title)}</div>
DesignScreenshot/output/git.buildapp.eu.org_run/git.buildapp.eu.org_2_login_page.html:329:_Originally posted by @${u} in ${m}_`,(0,ke.mD)(A).modal("show")})}function q0(){(0,C.jB)(document,".title_wip_desc > a",e=>e.addEventListener("click",t=>{t.preventDefault();const i=JSON.parse(e.closest(".title_wip_desc").getAttribute("data-wip-prefixes")),n=document.querySelector("#issue_title"),s=n.value;for(const l of i)if(s.startsWith(l.toUpperCase()))return;n.value=`${i[0]} ${s}`}))}function P0(){(0,C.jB)(document,".toggle-wip",e=>e.addEventListener("click",async t=>{t.preventDefault();const i=e,n=i.getAttribute("data-title"),s=i.getAttribute("data-wip-prefix"),l=i.getAttribute("data-update-url");try{const u=new URLSearchParams;if(u.append("title",n?.startsWith(s)?n.slice(s.length).trim():`${s.trim()} ${n}`),!(await(0,Ae.LO)(l,{data:u})).ok)throw new Error("Failed to toggle WIP status");window.location.reload()}catch(u){console.error(u)}}))}function F0(){const e=document.querySelector("#issue-title-display"),t=document.querySelector("#issue-title-editor");if(!t)return;const i=t.querySelector("input"),n=i.getAttribute("data-old-title");e.querySelector("#issue-title-edit-show").addEventListener("click",()=>{(0,C.y9)(e),(0,C.y9)("#pull-desc-display"),(0,C.fi)(t),(0,C.fi)("#pull-desc-editor"),i.value.trim()||(i.value=n),i.focus()}),t.querySelector(".ui.cancel.button").addEventListener("click",()=>{(0,C.y9)(t),(0,C.y9)("#pull-desc-editor"),(0,C.fi)(e),(0,C.fi)("#pull-desc-display")});const l=document.querySelector("#pull-desc-editor")?.getAttribute("data-target-update-url"),u=t.querySelector(".ui.primary.button");t.addEventListener("submit",async m=>{m.preventDefault();const y=i.value.trim();try{if(y&&y!==n){const A=await(0,Ae.LO)(u.getAttribute("data-update-url"),{data:new URLSearchParams({title:y})});if(!A.ok)throw new Error(`Failed to update issue title: ${A.statusText}`)}if(l){const A=document.querySelector("#pull-target-branch").getAttribute("data-branch"),L=document.querySelector("#branch_target").textContent;if(A!==L){const z=await(0,Ae.LO)(l,{data:new URLSearchParams({target_branch:A})});if(!z.ok)throw new Error(`Failed to update PR target branch: ${z.statusText}`)}}Ku(t),window.location.reload()}catch(A){console.error(A),gt(A.message)}})}function I0(){document.querySelector("#branch-select")?.addEventListener("click",e=>{const t=e.target.closest(".item[data-branch]");if(!t)return;const i=document.querySelector("#pull-target-branch"),n=i.getAttribute("data-basename"),s=t.getAttribute("data-branch"),l=i.getAttribute("data-branch");i.textContent=i.textContent.replace(`${n}:${l}`,`${n}:${s}`),i.setAttribute("data-branch",s)})}async function N0(e){const t=await ma(e.querySelector(".combo-markdown-editor")),i=document.querySelector("#status-button"),n=document.querySelector("#comment-button"),s=()=>{const l=t.value().trim(),u=t.isUploading();i&&(i.textContent=i.getAttribute(l?"data-status-and-comment":"data-status"),i.disabled=u),n&&(n.disabled=!l||u)};t.container.addEventListener(ha.EventUploadStateChanged,s),t.container.addEventListener(ha.EventEditorContentChanged,s),s()}function H0(e){const t=e.querySelectorAll(".combo-editor-dropzone"),i=async n=>{const s=n.querySelector(".form-field-real"),l=n.querySelector(".form-field-dropzone"),u=n.querySelector(".combo-markdown-editor"),m=await ma(u);m.container.addEventListener(ha.EventEditorContentChanged,()=>s.value=m.value()),s.addEventListener("focus",async()=>{(0,C.fi)(e.querySelectorAll(".combo-editor-dropzone .form-field-real")),(0,C.y9)(e.querySelectorAll(".combo-editor-dropzone .combo-markdown-editor")),(0,C.jB)(e,".combo-editor-dropzone .form-field-dropzone",y=>{const L=y.querySelector(".dropzone").dropzone.files.length!==0;(0,C.oi)(y,L)}),(0,C.y9)(s),(0,C.fi)(u),(0,C.fi)(l),await m.switchToUserPreference(),m.focus()})};for(const n of t)i(n)}function B0(){const e=document.querySelector(".comment.form");e&&(e.querySelector(".field.combo-editor-dropzone")?H0(e):e.querySelector(".combo-markdown-editor")&&N0(e),E0())}function $0(){_c("click","onRepoEllipsisButtonClick",async(e,t)=>{t.preventDefault();const i=e.getAttribute("aria-expanded")==="true";(0,C.oi)(e.parentElement.querySelector(".commit-body")),e.setAttribute("aria-expanded",String(!i))})}function U0(){Ha("initCommitStatuses",e=>{const t=e.nextElementSibling;if(!t.matches(".tippy-target"))throw new Error("Expected next element to be a tippy target");Ie(e,{content:t,placement:"bottom-start",interactive:!0,role:"dialog",theme:"box-with-header"})})}const{appSubUrl:ph}=window.config;function V0(){const e=document.querySelector("#manage_topic");if(!e)return;const t=document.querySelector("#topic_edit"),i=document.querySelector("#repo-topics"),n=t.querySelector(".ui.dropdown");let s;e.addEventListener("click",()=>{(0,C.y9)([i,e]),(0,C.fi)(t),n.querySelector("input.search").focus()}),document.querySelector("#cancel_topic_edit").addEventListener("click",()=>{s?.hideToast(),(0,C.y9)(t),(0,C.fi)([i,e]),e.focus()}),document.querySelector("#save_topic").addEventListener("click",async l=>{s?.hideToast();const u=t.querySelector("input[name=topics]").value,m=new FormData;m.append("topics",u);const y=await(0,Ae.LO)(l.target.getAttribute("data-link"),{data:m});if(y.ok){if((await y.json()).status==="ok"){if((0,C.xP)(i,".repo-topic",L=>L.remove()),u.length){const L=u.split(",");L.sort();for(const z of L){const X=document.createElement("a");X.classList.add("repo-topic","ui","large","label","gt-ellipsis"),X.href=`${ph}/explore/repos?q=${encodeURIComponent(z)}&topic=1`,X.textContent=z,i.append(X)}}(0,C.y9)(t),(0,C.fi)([i,e])}}else if(y.status===422){const A=await y.json();if(s=gt(A.message,{duration:5e3}),A.invalidTopics&&A.invalidTopics.length>0){const{invalidTopics:L}=A,z=(0,C.xP)(n,"a.ui.label");for(const[X,_e]of u.split(",").entries())L.includes(_e)&&(z[X].classList.remove("green"),z[X].classList.add("red"))}}}),(0,ke.mD)(n).dropdown({allowAdditions:!0,forceSelection:!1,fullTextSearch:"exact",fields:{name:"description",value:"data-value"},saveRemoteData:!1,label:{transition:"horizontal flip",duration:200,variation:!1},apiSettings:{url:`${ph}/explore/topics/search?q={query}`,throttle:500,cache:!1,onResponse(l){const u={success:!1,results:[]},m=(0,St.Kq)(this.urlData.query.trim());let y=!1;const A=[];for(const L of(0,C.xP)(n,"a.ui.label.visible"))A.push(L.getAttribute("data-value"));if(l.topics){let L=!1;for(const{topic_name:z}of l.topics)A.includes(z)||(z.toLowerCase()===m.toLowerCase()&&(y=!0),u.results.push({description:z,"data-value":z}),L=!0);u.success=L}return m.length>0&&!y?(u.success=!0,u.results.unshift({description:m,"data-value":m})):m.length>0&&y&&u.results.sort((L,z)=>L.description.toLowerCase()===m.toLowerCase()?-1:z.description.toLowerCase()===m.toLowerCase()?1:L.description>z.description?-1:L.description<z.description?1:0),u}},onLabelCreate(l){return l=l.toLowerCase().trim(),this.attr("data-value",l).contents().first().replaceWith(l),(0,ke.mD)(this)},onAdd(l,u,m){l=l.toLowerCase().trim(),m[0].setAttribute("data-value",l),m[0].setAttribute("data-text",l)}})}const{appSubUrl:W0}=window.config;function Qu(){Number(document.querySelector("#security_protocol")?.value)>0?(0,C.fi)(".has-tls"):(0,C.y9)(".has-tls")}function z0(){document.querySelector(".page-content.admin")&&(hf(),K0(),X0(),G0())}function K0(){document.querySelector(".page-content.admin.edit.user, .page-content.admin.new.user")&&document.querySelector("#login_type")?.addEventListener("change",function(){this.value?.startsWith("0")?(document.querySelector("#user_name")?.removeAttribute("disabled"),document.querySelector("#login_name")?.removeAttribute("required"),(0,C.y9)(".non-local"),(0,C.fi)(".local"),document.querySelector("#user_name")?.focus(),this.getAttribute("data-password")==="required"&&document.querySelector("#password")?.setAttribute("required","required")):(document.querySelector(".admin.edit.user")&&document.querySelector("#user_name")?.setAttribute("disabled","disabled"),document.querySelector("#login_name")?.setAttribute("required","required"),(0,C.fi)(".non-local"),(0,C.y9)(".local"),document.querySelector("#login_name")?.focus(),document.querySelector("#password")?.removeAttribute("required"))})}function X0(){const e=document.querySelector(".page-content.admin.authentication");if(!e)return;const t=e.classList.contains("new"),i=e.classList.contains("edit");if(!t&&!i)return;function n(){const L=document.querySelectorAll(".search-page-size");if(document.querySelector("#use_paged_search").checked){(0,C.fi)(".search-page-size");for(const z of L)z.querySelector("input")?.setAttribute("required","required")}else{(0,C.y9)(".search-page-size");for(const z of L)z.querySelector("input")?.removeAttribute("required")}}function s(L){(0,C.y9)(".open_id_connect_auto_discovery_url, .oauth2_use_custom_url");for(const X of document.querySelectorAll(".open_id_connect_auto_discovery_url input[required]"))X.removeAttribute("required");const z=document.querySelector("#oauth2_provider").value;switch(z){case"openidConnect":document.querySelector(".open_id_connect_auto_discovery_url input").setAttribute("required","required"),(0,C.fi)(".open_id_connect_auto_discovery_url");break;default:{const X=document.querySelector(`#${z}_customURLSettings`);if(!X)break;const _e=X.getAttribute("data-available")==="true",pe=X.getAttribute("data-required")==="true";_e&&(0,C.fi)(".oauth2_use_custom_url"),pe&&(document.querySelector("#oauth2_use_custom_url").checked=!0);break}}l(L)}function l(L){const z=document.querySelector("#oauth2_provider").value;(0,C.y9)(".oauth2_use_custom_url_field");for(const _e of document.querySelectorAll(".oauth2_use_custom_url_field input[required]"))_e.removeAttribute("required");if(document.querySelector(`#${z}_customURLSettings`)&&document.querySelector("#oauth2_use_custom_url").checked)for(const _e of["token_url","auth_url","profile_url","email_url","tenant"]){L&&(document.querySelector(`#oauth2_${_e}`).value=document.querySelector(`#${z}_${_e}`).value);const pe=document.querySelector(`#${z}_${_e}`);if(pe&&pe.getAttribute("data-available")==="true"){for(const de of document.querySelectorAll(`.oauth2_${_e} input`))de.setAttribute("required","required");(0,C.fi)(`.oauth2_${_e}`)}}}function u(){const L=document.querySelector(".js-ldap-group-toggle")?.checked;(0,C.oi)(document.querySelector("#ldap-group-options"),L)}const m=document.querySelector("#auth_type");if(t){const L=function(){(0,C.y9)(".ldap, .dldap, .smtp, .pam, .oauth2, .has-tls, .search-page-size, .sspi");for(const X of document.querySelectorAll(".ldap input[required], .binddnrequired input[required], .dldap input[required], .smtp input[required], .pam input[required], .oauth2 input[required], .has-tls input[required], .sspi input[required]"))X.removeAttribute("required");document.querySelector(".binddnrequired")?.classList.remove("required");const z=m.value;switch(z){case"2":(0,C.fi)(".ldap");for(const X of document.querySelectorAll(".binddnrequired input, .ldap div.required:not(.dldap) input"))X.setAttribute("required","required");document.querySelector(".binddnrequired")?.classList.add("required");break;case"3":(0,C.fi)(".smtp"),(0,C.fi)(".has-tls");for(const X of document.querySelectorAll(".smtp div.required input, .has-tls"))X.setAttribute("required","required");break;case"4":(0,C.fi)(".pam");for(const X of document.querySelectorAll(".pam input"))X.setAttribute("required","required");break;case"5":(0,C.fi)(".dldap");for(const X of document.querySelectorAll(".dldap div.required:not(.ldap) input"))X.setAttribute("required","required");break;case"6":(0,C.fi)(".oauth2");for(const X of document.querySelectorAll(".oauth2 div.required:not(.oauth2_use_custom_url,.oauth2_use_custom_url_field,.open_id_connect_auto_discovery_url) input"))X.setAttribute("required","required");s(!0);break;case"7":(0,C.fi)(".sspi");for(const X of document.querySelectorAll(".sspi div.required input"))X.setAttribute("required","required");break}(z==="2"||z==="5")&&(Qu(),u()),z==="2"&&n()};m.addEventListener("change",L),L(),document.querySelector("#security_protocol")?.addEventListener("change",Qu),document.querySelector("#use_paged_search")?.addEventListener("change",n),document.querySelector("#oauth2_provider")?.addEventListener("change",()=>s(!0)),document.querySelector("#oauth2_use_custom_url")?.addEventListener("change",()=>l(!0)),document.querySelector(".js-ldap-group-toggle").addEventListener("change",u)}if(i){const L=m.value;L==="2"||L==="5"?(document.querySelector("#security_protocol")?.addEventListener("change",Qu),document.querySelector(".js-ldap-group-toggle").addEventListener("change",u),u(),L==="2"&&document.querySelector("#use_paged_search")?.addEventListener("change",n)):L==="6"&&(document.querySelector("#oauth2_provider")?.addEventListener("change",()=>s(!0)),document.querySelector("#oauth2_use_custom_url")?.addEventListener("change",()=>l(!1)),s(!1))}const y=document.querySelector("#auth_name"),A=function(){document.querySelector("#oauth2-callback-url").textContent=`${window.location.origin}${W0}/user/oauth2/${encodeURIComponent(y.value)}/callback`};y.addEventListener("input",A),A()}function G0(){const e=document.querySelector(".page-content.admin.notice");if(!e)return;const t=document.querySelector("#detail-modal");(0,C.jB)(e,".view-detail",n=>n.addEventListener("click",s=>{s.preventDefault();const l=n.closest("tr").querySelector(".notice-description"),u=t.querySelector(".content pre");u.textContent=l.textContent,(0,ke.mD)(t).modal("show")}));const i=document.querySelectorAll(".select.table .ui.checkbox input");(0,C.jB)(e,".select.action",n=>n.addEventListener("click",()=>{switch(n.getAttribute("data-action")){case"select-all":for(const s of i)s.checked=!0;break;case"deselect-all":for(const s of i)s.checked=!1;break;case"inverse":for(const s of i)s.checked=!s.checked;break}})),document.querySelector("#delete-selection")?.addEventListener("click",async function(n){n.preventDefault(),this.classList.add("is-loading","disabled");const s=new FormData;for(const l of i)l.checked&&s.append("ids[]",l.closest(".ui.checkbox").getAttribute("data-id"));await(0,Ae.LO)(this.getAttribute("data-link"),{data:s}),window.location.href=this.getAttribute("data-redirect")})}function Q0(e){window.history.pushState?window.history.pushState(null,null,e):window.location.hash=e}function Yu(e){for(const pe of document.querySelectorAll(".code-view tr.active"))pe.classList.remove("active");const t=document.querySelectorAll(".code-view td.lines-num span[data-line-number]"),i=document.querySelector("a.ref-in-new-issue"),n=document.querySelector("a.copy-line-permalink"),s=document.querySelector("a.view_git_blame"),l=function(pe){if(!i)return;const de=i.getAttribute("data-url-issue-new"),Pe=i.getAttribute("data-url-param-body-link"),Le=`${(0,St.oK)(Pe)}#${pe}`;i.setAttribute("href",`${de}?body=${encodeURIComponent(Le)}`)},u=function(pe){if(!s)return;let de=s.getAttribute("href");de=`${de.replace(/#L\d+$|#L\d+-L\d+$/,"")}`,pe.length!==0&&(de=`${de}#${pe}`),s.setAttribute("href",de)},m=function(pe){if(!n)return;let de=n.getAttribute("data-url");de=`${de.replace(/#L\d+$|#L\d+-L\d+$/,"")}#${pe}`,n.setAttribute("data-clipboard-text",de),n.setAttribute("data-clipboard-text-type","url")},y=e?e.split("-"):[],A=y[0]??"";if(!A)return null;const L=y[1]||A;let z=parseInt(A.substring(1)),X=parseInt(L.substring(1));if(z>X){const pe=z;z=X,X=pe,e=`${L}-${A}`}const _e=t[z-1]??null;for(let pe=z-1;pe<=X-1&&pe<t.length;pe++)t[pe].closest("tr").classList.add("active");return Q0(`#${e}`),l(e),u(e),m(e),_e}function gh(){const e=document.querySelector(".code-line-menu");if(!e)return;for(const s of document.querySelectorAll(".code-line-button"))s.remove();const t=document.querySelector(".code-view tr.active");if(!t)return;const i=t.querySelector("td.lines-num"),n=document.createElement("button");n.classList.add("code-line-button","ui","basic","button"),n.innerHTML=(0,Z.JW)("octicon-kebab-horizontal"),i.prepend(n),n.closest(".code-view").append(e.cloneNode(!0)),Ie(n,{theme:"menu",trigger:"click",hideOnClick:!0,content:e,placement:"right-start",interactive:!0,onShow:s=>{s.popper.addEventListener("click",()=>{s.hide()},{once:!0})}})}function Y0(){if(!document.querySelector(".repo-view-container .file-view"))return;let e;(0,C.ny)(document,"click",".code-view .lines-num span",(i,n)=>{if(!e||!n.shiftKey)e=i.getAttribute("id"),Yu(e);else{const s=i.getAttribute("id");Yu(`${e}-${s}`)}window.getSelection().removeAllRanges(),gh()});const t=()=>{if(!window.location.hash||!document.querySelector(".code-view .lines-num"))return;const i=window.location.hash.substring(1),n=Yu(i);n&&(window.history.scrollRestoration!=="manual"&&(window.history.scrollRestoration="manual"),n.scrollIntoView({block:"start"}),gh())};t(),window.addEventListener("hashchange",t)}function J0(){document.querySelector("#ssh-key-content")?.addEventListener("input",function(){const e=this.value.split(" "),t=document.querySelector("#ssh-key-title");!t.value&&e.length===3&&e[2]!==""&&(t.value=e[2])})}function Z0(){if(!document.querySelector(".user.settings.profile"))return;const e=document.querySelector("#username");e&&e.addEventListener("input",function(){const t=document.querySelector("#name-change-prompt"),i=document.querySelector("#name-change-redirect-prompt");this.value.toLowerCase()!==this.getAttribute("data-name").toLowerCase()?((0,C.fi)(t),(0,C.fi)(i)):((0,C.y9)(t),(0,C.y9)(i))})}function ev(){const e=document.querySelector("#repo_migrating");if(!e)return;document.querySelector("#repo_migrating_retry")?.addEventListener("click",tv);const t=e.getAttribute("data-migrating-repo-link"),i=async()=>{const s=await(0,Ae.fG)(`${t}/-/migrate/status`);if(s.status!==200)return!0;const l=await s.json();return l.message&&(document.querySelector("#repo_migrating_progress_message").textContent=l.message),l.status===4?(window.location.reload(),!1):l.status===3?((0,C.y9)("#repo_migrating_progress"),(0,C.y9)("#repo_migrating"),(0,C.fi)("#repo_migrating_retry"),(0,C.fi)("#repo_migrating_failed"),(0,C.fi)("#repo_migrating_failed_image"),document.querySelector("#repo_migrating_failed_error").textContent=l.message,!1):!0},n=async()=>{let s=!0;try{s=await i()}finally{s&&setTimeout(n,2e3)}};n()}async function tv(e){await(0,Ae.LO)(e.target.getAttribute("data-migrating-task-retry-url")),window.location.reload()}const{pageData:Ju}=window.config;let Zu;function ed(){return Zu||(Zu=nv(Ju.DiffFileTree,Ju.FolderIcon,Ju.FolderOpenIcon)),Zu}function iv(e,t,i){const n=e.fullNameMap[t];if(n){n.IsViewed=i;for(let s=n.ParentEntry;s;s=s.ParentEntry)s.IsViewed=bh(s)}}function vh(e,t){if(e[t.FullName]=t,!!t.Children){t.IsViewed=bh(t);for(const i of t.Children)i.ParentEntry=t,vh(e,i)}}function nv(e,t,i){const n=(0,Re.Kh)({diffFileTree:e,folderIcon:t,folderOpenIcon:i,fileTreeIsVisible:!1,selectedItem:"",fullNameMap:{}});return vh(n.fullNameMap,e.TreeRoot),n}function bh(e){if(e.Children){let t=0;for(const i of e.Children)i.IsViewed&&t++;return t===e.Children.length}return e.IsViewed}const sv=["title"],rv=["innerHTML"],ov={class:"gt-ellipsis"},av={class:"sub-items"},lv=["title","href"],cv=["innerHTML"],uv={class:"gt-ellipsis tw-flex-1"};var dv=(0,c.pM)({__name:"DiffFileTreeItem",props:{item:{}},setup(e){const t=e,i=ed(),n=(0,Re.KR)(t.item.IsViewed);function s(l){const u={"":{name:"octicon-blocked",classes:["text","red"]},added:{name:"octicon-diff-added",classes:["text","green"]},modified:{name:"octicon-diff-modified",classes:["text","yellow"]},deleted:{name:"octicon-diff-removed",classes:["text","red"]},renamed:{name:"octicon-diff-renamed",classes:["text","teal"]},copied:{name:"octicon-diff-renamed",classes:["text","green"]},typechange:{name:"octicon-diff-modified",classes:["text","green"]}};return u[l]??u[""]}return(l,u)=>{const m=(0,c.g2)("DiffFileTreeItem",!0);return l.item.EntryMode==="tree"?((0,c.uX)(),(0,c.CE)(c.FK,{key:0},[(0,c.Lk)("div",{class:(0,W.C4)(["item-directory",{viewed:l.item.IsViewed}]),title:l.item.DisplayName,onClick:u[0]||(u[0]=Di(y=>n.value=!n.value,["stop"]))},[(0,c.Q3)(" directory "),(0,c.bF)((0,Re.R1)(Z.Ah),{name:n.value?"octicon-chevron-right":"octicon-chevron-down"},null,8,["name"]),(0,c.Q3)(" eslint-disable-next-line vue/no-v-html "),(0,c.Lk)("span",{class:"tw-contents",innerHTML:n.value?(0,Re.R1)(i).folderIcon:(0,Re.R1)(i).folderOpenIcon},null,8,rv),(0,c.Lk)("span",ov,(0,W.v_)(l.item.DisplayName),1)],10,sv),(0,c.bo)((0,c.Lk)("div",av,[((0,c.uX)(!0),(0,c.CE)(c.FK,null,(0,c.pI)(l.item.Children,y=>((0,c.uX)(),(0,c.Wv)(m,{key:y.DisplayName,item:y},null,8,["item"]))),128))],512),[[ti,!n.value]])],64)):((0,c.uX)(),(0,c.CE)("a",{key:1,class:(0,W.C4)(["item-file",{selected:(0,Re.R1)(i).selectedItem==="#diff-"+l.item.NameHash,viewed:l.item.IsViewed}]),title:l.item.DisplayName,href:"#diff-"+l.item.NameHash},[(0,c.Q3)(" file "),(0,c.Q3)(" eslint-disable-next-line vue/no-v-html "),(0,c.Lk)("span",{class:"tw-contents",innerHTML:l.item.FileIcon},null,8,cv),(0,c.Lk)("span",uv,(0,W.v_)(l.item.DisplayName),1),(0,c.bF)((0,Re.R1)(Z.Ah),{name:s(l.item.DiffStatus).name,class:(0,W.C4)(s(l.item.DiffStatus).classes)},null,8,["name","class"])],10,lv))}}}),fv=(0,Xi.A)(dv,[["__scopeId","data-v-a138c97c"]]);const hv={key:0,class:"diff-file-tree-items"},_h="diff_file_tree_visible";var mv=(0,c.pM)({__name:"DiffFileTree",setup(e){const t=ed();(0,c.sV)(()=>{t.fileTreeIsVisible=localStorage.getItem(_h)!=="false",document.querySelector(".diff-toggle-file-tree-button").addEventListener("click",s),i(),window.addEventListener("hashchange",i)}),(0,c.hi)(()=>{document.querySelector(".diff-toggle-file-tree-button").removeEventListener("click",s),window.removeEventListener("hashchange",i)});function i(){t.selectedItem=window.location.hash,n()}function n(){if(t.selectedItem){const m=document.querySelector(t.selectedItem);m?.getAttribute("data-folded")==="true"&&Ba(m,m.querySelector(".fold-file"),!1)}}function s(){l(!t.fileTreeIsVisible)}function l(m){t.fileTreeIsVisible=m,localStorage.setItem(_h,t.fileTreeIsVisible.toString()),u(t.fileTreeIsVisible)}function u(m){const y=document.querySelector(".diff-toggle-file-tree-button"),[A,L]=y.querySelectorAll(".icon"),z=document.querySelector("#diff-file-tree"),X=y.getAttribute(m?"data-hide-text":"data-show-text");y.setAttribute("data-tooltip-content",X),(0,C.oi)(z,m),(0,C.oi)(A,!m),(0,C.oi)(L,m)}return(m,y)=>(0,Re.R1)(t).fileTreeIsVisible?((0,c.uX)(),(0,c.CE)("div",hv,[(0,c.Q3)(" only render the tree if we're visible. in many cases this is something that doesn't change very often "),((0,c.uX)(!0),(0,c.CE)(c.FK,null,(0,c.pI)((0,Re.R1)(t).diffFileTree.TreeRoot.Children,A=>((0,c.uX)(),(0,c.Wv)(fv,{key:A.FullName,item:A},null,8,["item"]))),128))])):(0,c.Q3)("v-if",!0)}}),pv=(0,Xi.A)(mv,[["__scopeId","data-v-12a35ef6"]]);function gv(){const e=document.querySelector("#diff-file-tree");if(!e)return;Ai(pv).mount(e)}const vv={class:"ui scrolling dropdown custom diff-commit-selector"},bv=["data-tooltip-content","aria-label","aria-controls","aria-activedescendant"],_v=["id","aria-expanded"],yv={key:0,class:"loading-indicator is-loading"},wv=["id"],Sv={class:"gt-ellipsis"},xv={class:"gt-ellipsis text light-2 tw-mb-0"},jv={class:"gt-ellipsis"},Ev={class:"gt-ellipsis text light-2"},Av={key:3,class:"info text light-2"},Cv=["data-commit-idx","onKeydown","onMouseover","onClick"],kv={class:"tw-flex-1 tw-flex tw-flex-col tw-gap-1"},Tv={class:"gt-ellipsis commit-list-summary"},Lv={class:"gt-ellipsis text light-2"},Rv={class:"text right"},Mv=["datetime"],Dv={class:"tw-font-mono"};function Ov(e,t,i,n,s,l){const u=(0,c.g2)("svg-icon");return(0,c.uX)(),(0,c.CE)("div",vv,[(0,c.Lk)("button",{ref:"expandBtn",class:"ui tiny basic button",onClick:t[0]||(t[0]=Di(m=>e.toggleMenu(),["stop"])),"data-tooltip-content":e.locale.filter_changes_by_commit,"aria-haspopup":"true","aria-label":e.locale.filter_changes_by_commit,"aria-controls":e.uniqueIdMenu,"aria-activedescendant":e.uniqueIdShowAll},[(0,c.bF)(u,{name:"octicon-git-commit"})],8,bv),(0,c.Q3)(' this dropdown is not managed by Fomantic UI, so it needs some classes like "transition" explicitly '),(0,c.bo)((0,c.Lk)("div",{class:(0,W.C4)(["left menu transition",{visible:e.menuVisible}]),id:e.uniqueIdMenu,"aria-expanded":e.menuVisible?"true":"false"},[e.isLoading?((0,c.uX)(),(0,c.CE)("div",yv)):(0,c.Q3)("v-if",!0),e.isLoading?(0,c.Q3)("v-if",!0):((0,c.uX)(),(0,c.CE)("div",{key:1,class:"item",id:e.uniqueIdShowAll,ref:"showAllChanges",role:"menuitem",onKeydown:t[1]||(t[1]=se(m=>e.showAllChanges(),["enter"])),onClick:t[2]||(t[2]=m=>e.showAllChanges())},[(0,c.Lk)("div",Sv,(0,W.v_)(e.locale.show_all_commits),1),(0,c.Lk)("div",xv,(0,W.v_)(e.locale.stats_num_commits),1)],40,wv)),(0,c.Q3)(" only show the show changes since last review if there is a review AND we are commits ahead of the last review "),e.lastReviewCommitSha!=null?((0,c.uX)(),(0,c.CE)("div",{key:2,class:(0,W.C4)(["item",{disabled:!e.commitsSinceLastReview}]),role:"menuitem",onKeydown:t[3]||(t[3]=se(m=>e.changesSinceLastReviewClick(),["enter"])),onClick:t[4]||(t[4]=m=>e.changesSinceLastReviewClick())},[(0,c.Lk)("div",jv,(0,W.v_)(e.locale.show_changes_since_your_last_review),1),(0,c.Lk)("div",Ev,(0,W.v_)(e.commitsSinceLastReview)+" commits ",1)],34)):(0,c.Q3)("v-if",!0),e.isLoading?(0,c.Q3)("v-if",!0):((0,c.uX)(),(0,c.CE)("span",Av,(0,W.v_)(e.locale.select_commit_hold_shift_for_range),1)),((0,c.uX)(!0),(0,c.CE)(c.FK,null,(0,c.pI)(e.commits,(m,y)=>((0,c.uX)(),(0,c.CE)("div",{key:m.id,class:(0,W.C4)(["item",{selected:m.selected,hovered:m.hovered}]),role:"menuitem","data-commit-idx":y,onKeydown:[se(Di(A=>e.commitClicked(m.id),["exact"]),["enter"]),se(Di(A=>e.commitClickedShift(m),["shift","exact"]),["enter"])],onMouseover:Di(A=>e.highlight(m),["shift"]),onClick:[Di(A=>e.commitClicked(m.id),["exact"]),Di(A=>e.commitClicked(m.id,!0),["ctrl","exact"]),Di(A=>e.commitClicked(m.id,!0),["meta","exact"]),Di(A=>e.commitClickedShift(m),["shift","exact","stop","prevent"])]},[(0,c.Lk)("div",kv,[(0,c.Lk)("div",Tv,(0,W.v_)(m.summary),1),(0,c.Lk)("div",Lv,[(0,c.eW)((0,W.v_)(m.committer_or_author_name)+" ",1),(0,c.Lk)("span",Rv,[(0,c.Q3)(" TODO: make this respect the PreferredTimestampTense setting "),(0,c.Lk)("relative-time",{prefix:"",datetime:m.time,"data-tooltip-content":"","data-tooltip-interactive":"true"},(0,W.v_)(m.time),9,Mv)])])]),(0,c.Lk)("div",Dv,(0,W.v_)(m.short_sha),1)],42,Cv))),128))],10,_v),[[ti,e.menuVisible]])])}var qv=(0,c.pM)({components:{SvgIcon:Z.Ah},data:()=>{const e=document.querySelector("#diff-commit-select");return{menuVisible:!1,isLoading:!1,queryParams:e.getAttribute("data-queryparams"),issueLink:e.getAttribute("data-issuelink"),locale:{filter_changes_by_commit:e.getAttribute("data-filter_changes_by_commit")},mergeBase:e.getAttribute("data-merge-base"),commits:[],hoverActivated:!1,lastReviewCommitSha:"",uniqueIdMenu:(0,ke.Ae)(),uniqueIdShowAll:(0,ke.Ae)()}},computed:{commitsSinceLastReview(){return this.lastReviewCommitSha?this.commits.length-this.commits.findIndex(e=>e.id===this.lastReviewCommitSha)-1:0}},mounted(){document.body.addEventListener("click",this.onBodyClick),this.$el.addEventListener("keydown",this.onKeyDown),this.$el.addEventListener("keyup",this.onKeyUp)},unmounted(){document.body.removeEventListener("click",this.onBodyClick),this.$el.removeEventListener("keydown",this.onKeyDown),this.$el.removeEventListener("keyup",this.onKeyUp)},methods:{onBodyClick(e){this.$el.contains(e.target)||this.menuVisible&&this.toggleMenu()},onKeyDown(e){if(!this.menuVisible)return;const t=document.activeElement;if(this.$el.contains(t)){switch(e.key){case"ArrowDown":e.preventDefault(),this.focusElem(t.nextElementSibling,t);break;case"ArrowUp":e.preventDefault(),this.focusElem(t.previousElementSibling,t);break;case"Escape":e.preventDefault(),t.tabIndex=-1,this.toggleMenu();break}if(e.key==="ArrowDown"||e.key==="ArrowUp"){const i=document.activeElement,n=i?.matches(".item")?i.getAttribute("data-commit-idx"):null;n&&this.highlight(this.commits[Number(n)])}}},onKeyUp(e){if(!this.menuVisible)return;const t=document.activeElement;if(this.$el.contains(t)&&e.key==="Shift"&&this.hoverActivated){this.hoverActivated=!1;for(const i of this.commits)i.hovered=!1,i.selected=!1}},highlight(e){if(!this.hoverActivated)return;const t=this.commits.findIndex(n=>n.selected),i=this.commits.findIndex(n=>n.id===e.id);for(const[n,s]of this.commits.entries())s.hovered=Math.min(t,i)<=n&&n<=Math.max(t,i)},focusElem(e,t){e&&(e.tabIndex=0,t&&(t.tabIndex=-1),e.focus())},async toggleMenu(){if(this.menuVisible=!this.menuVisible,!this.commits.length&&this.menuVisible&&!this.isLoading){this.isLoading=!0;try{await this.fetchCommits()}finally{this.isLoading=!1}}this.$nextTick(()=>{this.menuVisible?this.focusElem(this.$refs.showAllChanges,this.$refs.expandBtn):this.focusElem(this.$refs.expandBtn,this.$refs.showAllChanges)})},async fetchCommits(){const t=await(await(0,Ae.fG)(`${this.issueLink}/commits/list`)).json();this.commits.push(...t.commits.map(i=>(i.hovered=!1,i))),this.commits.reverse(),this.lastReviewCommitSha=t.last_review_commit_sha||null,this.lastReviewCommitSha&&!this.commits.some(i=>i.id===this.lastReviewCommitSha)&&(this.lastReviewCommitSha=null),Object.assign(this.locale,t.locale)},showAllChanges(){window.location.assign(`${this.issueLink}/files${this.queryParams}`)},changesSinceLastReviewClick(){window.location.assign(`${this.issueLink}/files/${this.lastReviewCommitSha}..${this.commits.at(-1).id}${this.queryParams}`)},commitClicked(e,t=!1){const i=`${this.issueLink}/commits/${e}${this.queryParams}`;t?window.open(i):window.location.assign(i)},commitClickedShift(e){if(this.hoverActivated=!this.hoverActivated,e.selected=!0,!this.hoverActivated){const t=this.commits.findIndex(l=>l.selected),i=this.commits.findLastIndex(l=>l.selected);let n;t===0?n=this.mergeBase:n=this.commits[t-1].id;const s=this.commits[i].id;t===i?window.location.assign(`${this.issueLink}/commits/${s}${this.queryParams}`):n===this.mergeBase&&s===this.commits.at(-1).id?window.location.assign(`${this.issueLink}/files${this.queryParams}`):window.location.assign(`${this.issueLink}/files/${n}..${s}${this.queryParams}`)}}}}),Pv=(0,Xi.A)(qv,[["render",Ov],["__scopeId","data-v-c589fa0e"]]);function Fv(){const e=document.querySelector("#diff-commit-select");if(!e)return;Ai(Pv).mount(e)}const{pageData:Iv}=window.config,Ua=Iv.prReview||{},yh="viewed-file-checked-form",wh=".viewed-file-form",Nv="#expand-files-btn",Hv="#collapse-files-btn";function Sh(){document.querySelector("#viewed-files-summary")?.setAttribute("value",Ua.numberOfViewedFiles);const t=document.querySelector("#viewed-files-summary-label");t&&(t.innerHTML=t.getAttribute("data-text-changed-template").replace("%[1]d",Ua.numberOfViewedFiles).replace("%[2]d",Ua.numberOfFiles))}function Bv(){Ua.numberOfViewedFiles=document.querySelectorAll(`${wh} > input[type=checkbox][checked]`).length,Sh()}function xh(){for(const e of document.querySelectorAll(`${wh}:not([data-has-viewed-checkbox-listener="true"])`)){e.setAttribute("data-has-viewed-checkbox-listener",String(!0));const t=e.querySelector("input[type=checkbox]");t.addEventListener("input",function(){this.checked?(e.classList.add(yh),t.setAttribute("checked",""),Ua.numberOfViewedFiles++):(e.classList.remove(yh),t.removeAttribute("checked"),Ua.numberOfViewedFiles--),Sh(),e.parentNode.querySelector(".changed-since-last-review")?.remove();const n=t.getAttribute("name");iv(ed(),n,this.checked);const s={};s[n]=this.checked;const l={files:s},u=e.getAttribute("data-headcommit");u&&(l.headCommitSHA=u),(0,Ae.LO)(e.getAttribute("data-link"),{data:l});const m=e.closest(".diff-file-header");Ba(m.closest(".file-content"),m.querySelector(".fold-file"),this.checked)})}}function $v(){document.querySelector(Nv)?.addEventListener("click",()=>{for(const e of document.querySelectorAll('.file-content[data-folded="true"]'))Ba(e,e.querySelector(".fold-file"),!1)}),document.querySelector(Hv)?.addEventListener("click",()=>{for(const e of document.querySelectorAll('.file-content:not([data-folded="true"])'))e.getAttribute("id")!=="diff-incomplete"&&Ba(e,e.querySelector(".fold-file"),!0)})}const{i18n:Uv}=window.config;function Vv(e){(0,C.jB)(e,".file-view-toggle",t=>t.addEventListener("click",()=>{(0,C.D6)(t,".file-view-toggle",n=>n.classList.remove("active")),t.classList.add("active");const i=document.querySelector(t.getAttribute("data-toggle-selector"));if(!i)throw new Error("Target element not found");(0,C.y9)((0,C.D6)(i)),(0,C.fi)(i)}))}function Wv(){(0,C.ny)(document,"submit",".conversation-holder form",async(e,t)=>{t.preventDefault();const i=e.querySelector("textarea");if(hh(i)&&!e.classList.contains("is-loading"))try{e.classList.add("is-loading");const n=new FormData(e),s=(0,C.IU)(t);(s?.nodeName==="BUTTON"||s?.nodeName==="INPUT"&&s.type==="submit")&&s.name&&n.append(s.name,s.value);const u=e.closest("tr")?.getAttribute("data-line-type"),m=await(0,Ae.LO)(e.getAttribute("action"),{data:n}),y=(0,C.SL)(await m.text()),A=y.getAttribute("data-path"),L=y.getAttribute("data-side"),z=y.getAttribute("data-idx");if(e.closest(".conversation-holder").replaceWith(y),e=null,u){let X;u==="same"?X=`[data-path="${A}"] .add-code-comment[data-idx="${z}"]`:X=`[data-path="${A}"] .add-code-comment[data-side="${L}"][data-idx="${z}"]`;for(const _e of document.querySelectorAll(X))_e.classList.add("tw-invisible")}if(!s||s?.matches('button[name="pending_review"]')){const X=document.querySelector("#review-box"),_e=X?.querySelector(".review-comments-counter");if(!_e)return;const pe=parseInt(_e.getAttribute("data-pending-comment-number"))+1||1;_e.setAttribute("data-pending-comment-number",String(pe)),_e.textContent=String(pe),(0,C.b7)(X,"pulse-1p5-200")}}catch(n){console.error("Error:",n),gt(Uv.network_error)}finally{e?.classList.remove("is-loading")}}),(0,C.ny)(document,"click",".resolve-conversation",async(e,t)=>{t.preventDefault();const i=e.getAttribute("data-comment-id"),n=e.getAttribute("data-origin"),s=e.getAttribute("data-action"),l=e.getAttribute("data-update-url");try{const m=await(await(0,Ae.LO)(l,{data:new URLSearchParams({origin:n,action:s,comment_id:i})})).text(),y=e.closest(".conversation-holder");if(y){const A=(0,C.SL)(m);y.replaceWith(A)}else window.location.reload()}catch(u){console.error("Error:",u)}})}function zv(){(0,C.ny)(document,"click",".previous-conversation, .next-conversation",(e,t)=>{t.preventDefault();const i=e.matches(".previous-conversation"),n=e.closest(".comment-code-cloud"),s=document.querySelectorAll(".comment-code-cloud:not(.tw-hidden)"),l=Array.from(s).indexOf(n),u=l>0?l-1:s.length-1,m=l<s.length-1?l+1:0,L=s[i?u:m].querySelector(".comment").id;window.location.href=`#${L}`})}function jh(){for(const e of document.querySelectorAll(".diff-header-popup-btn:not([data-header-popup-initialized])")){e.setAttribute("data-header-popup-initialized","");const t=e.nextElementSibling;if(!t?.matches(".tippy-target"))throw new Error("Popup element not found");Ie(e,{content:t,theme:"menu",placement:"bottom",trigger:"click",interactive:!0,hideOnClick:!0})}}function Eh(){tf(),xh(),Bv(),Ld(),jh()}async function Ah(e){if(e.classList.contains("disabled"))return!1;e.classList.add("disabled");const t=e.getAttribute("data-href");try{const n=await(await(0,Ae.fG)(t)).text(),l=(0,St.a8)(n,"text/html").querySelector("#diff-file-boxes");return document.querySelector("#diff-incomplete").replaceWith(...Array.from(l.children)),Eh(),!0}catch(i){console.error("Error:",i),gt("An error occurred while loading more files.")}finally{e.classList.remove("disabled")}return!1}function Kv(){(0,C.ny)(document,"click","a#diff-show-more-files",(e,t)=>{t.preventDefault(),Ah(e)}),(0,C.ny)(document,"click","a.diff-load-button",async(e,t)=>{if(t.preventDefault(),e.classList.contains("disabled"))return;e.classList.add("disabled");const i=e.getAttribute("data-href");try{const s=await(await(0,Ae.fG)(i)).text(),u=(0,St.a8)(s,"text/html").querySelector("#diff-file-boxes .diff-file-body .file-body"),m=Array.from(u.children);e.parentElement.replaceWith(...m);for(const y of m)window.htmx.process(y);Eh()}catch(n){console.error("Error:",n)}finally{e.classList.remove("disabled")}})}async function Ch(){const e=window.location.hash;if(!(!e.startsWith("#diff-")&&!e.startsWith("#issuecomment-")))for(;;){const t=document.getElementById(e.substring(1));if(t){t.scrollIntoView();return}const i=document.querySelector("#diff-show-more-files");if(!i||!await Ah(i))return}}function Xv(){window.addEventListener("hashchange",Ch),Ch()}function Gv(){Wv(),document.querySelector("#diff-file-boxes")&&(zv(),gv(),Fv(),Kv(),jh(),xh(),$v(),Xv(),yc("#diff-file-boxes .diff-file-box",Vv),(0,C.ny)(document,"click",".fold-file",e=>{ng(e.closest(".file-content"),e)}))}const{appSubUrl:Qv}=window.config;function Yv(){const e=document.querySelector(".page-content.organization.new.team");e&&(0,C.jB)(e,"input[name=permission]",t=>t.addEventListener("change",()=>{const i=e.querySelector("input[name=permission]:checked")?.value;(0,C.oi)(e.querySelectorAll(".team-units"),i!=="admin")}))}function Jv(){const e=(0,ke.mD)("#search-repo-box");e.search({minCharacters:2,apiSettings:{url:`${Qv}/repo/search?q={query}&uid=${e.data("uid")}`,onResponse(t){const i=[];for(const n of t.data)i.push({title:n.repository.full_name.split("/")[1],description:n.repository.full_name});return{results:i}}},searchFields:["full_name"],showNoResults:!1})}function Zv(){document.querySelector(".page-content.organization")&&(Yv(),Jv())}const{appSubUrl:Mo}=window.config;async function eb(){const e=document.querySelector(".user.signin.webauthn-prompt"),t=document.querySelector(".signin-passkey");if(!(!e&&!t)){if(!window.isSecureContext){(0,C.y9)(t);return}Th()&&(t&&t.addEventListener("click",tb),e&&ib())}}async function tb(){const e=await(0,Ae.fG)(`${Mo}/user/webauthn/passkey/assertion`);if(!e.ok){Ds("unknown");return}const t=await e.json();t.publicKey.challenge=(0,St.vd)(t.publicKey.challenge);for(const i of t.publicKey.allowCredentials??[])i.id=(0,St.vd)(i.id);try{const i=await navigator.credentials.get({publicKey:t.publicKey}),n=i.response,s=new Uint8Array(n.authenticatorData),l=new Uint8Array(n.clientDataJSON),u=new Uint8Array(i.rawId),m=new Uint8Array(n.signature),y=new Uint8Array(n.userHandle),A=await(0,Ae.LO)(`${Mo}/user/webauthn/passkey/login`,{data:{id:i.id,rawId:(0,St.vh)(u),type:i.type,clientExtensionResults:i.getClientExtensionResults(),response:{authenticatorData:(0,St.vh)(s),clientDataJSON:(0,St.vh)(l),signature:(0,St.vh)(m),userHandle:(0,St.vh)(y)}}});if(A.status===500){Ds("unknown");return}else if(!A.ok){Ds("unable-to-process");return}const L=await A.json();window.location.href=L?.redirect??`${Mo}/`}catch(i){Ds("general",i.message)}}async function ib(){const e=await(0,Ae.fG)(`${Mo}/user/webauthn/assertion`);if(!e.ok){Ds("unknown");return}const t=await e.json();t.publicKey.challenge=(0,St.vd)(t.publicKey.challenge);for(const i of t.publicKey.allowCredentials??[])i.id=(0,St.vd)(i.id);try{const i=await navigator.credentials.get({publicKey:t.publicKey});await kh(i)}catch(i){if(!t.publicKey.extensions?.appid){Ds("general",i.message);return}delete t.publicKey.extensions.appid;try{const n=await navigator.credentials.get({publicKey:t.publicKey});await kh(n)}catch(n){Ds("general",n.message)}}}async function kh(e){const t=new Uint8Array(e.response.authenticatorData),i=new Uint8Array(e.response.clientDataJSON),n=new Uint8Array(e.rawId),s=new Uint8Array(e.response.signature),l=new Uint8Array(e.response.userHandle),u=await(0,Ae.LO)(`${Mo}/user/webauthn/assertion`,{data:{id:e.id,rawId:(0,St.vh)(n),type:e.type,clientExtensionResults:e.getClientExtensionResults(),response:{authenticatorData:(0,St.vh)(t),clientDataJSON:(0,St.vh)(i),signature:(0,St.vh)(s),userHandle:(0,St.vh)(l)}}});if(u.status===500){Ds("unknown");return}else if(!u.ok){Ds("unable-to-process");return}const m=await u.json();window.location.href=m?.redirect??`${Mo}/`}async function nb(e){const t=new Uint8Array(e.response.attestationObject),i=new Uint8Array(e.response.clientDataJSON),n=new Uint8Array(e.rawId),s=await(0,Ae.LO)(`${Mo}/user/settings/security/webauthn/register`,{data:{id:e.id,rawId:(0,St.vh)(n),type:e.type,response:{attestationObject:(0,St.vh)(t),clientDataJSON:(0,St.vh)(i)}}});if(s.status===409){Ds("duplicated");return}else if(s.status!==201){Ds("unknown");return}window.location.reload()}function Ds(e,t=""){const i=document.querySelector("#webauthn-error-msg");if(e==="general")i.textContent=t||"unknown error";else{const n=document.querySelector(`#webauthn-error [data-webauthn-error-msg=${e}]`);n?i.textContent=`${n.textContent}${t?` ${t}`:""}`:i.textContent=`unknown error type: ${e}${t?` ${t}`:""}`}(0,C.fi)("#webauthn-error")}function Th(){return window.isSecureContext?typeof window.PublicKeyCredential!="function"?(Ds("browser"),!1):!0:(Ds("insecure"),!1)}function sb(){const e=document.querySelector("#register-webauthn");if(e){if(!Th()){e.disabled=!0;return}e.addEventListener("click",async t=>{t.preventDefault(),await rb()})}}async function rb(){const e=document.querySelector("#nickname"),t=new FormData;t.append("name",e.value);const i=await(0,Ae.LO)(`${Mo}/user/settings/security/webauthn/request_register`,{data:t});if(i.status===409){Ds("duplicated");return}else if(!i.ok){Ds("unknown");return}const n=await i.json();if(e.closest("div.field").classList.remove("error"),n.publicKey.challenge=(0,St.vd)(n.publicKey.challenge),n.publicKey.user.id=(0,St.vd)(n.publicKey.user.id),n.publicKey.excludeCredentials)for(const s of n.publicKey.excludeCredentials)s.id=(0,St.vd)(s.id);try{const s=await navigator.credentials.create({publicKey:n.publicKey});await nb(s)}catch(s){Ds("unknown",s)}}function ob(){document.addEventListener("click",e=>{if(e.target.matches(".remove-rel-attach")){const t=e.target.getAttribute("data-uuid"),i=e.target.getAttribute("data-id");document.querySelector(`input[name='attachment-del-${t}']`).value="true",(0,C.y9)(`#attachment-${i}`)}})}function ab(){document.querySelector(".repository.new.release")&&lb()}function lb(){const e=document.querySelector("#tag-name-editor");if(!e)return;const t=JSON.parse(e.getAttribute("data-existing-tags"));if(!Array.isArray(t))return;const i=e.getAttribute("data-tag-helper"),n=e.getAttribute("data-tag-helper-new"),s=e.getAttribute("data-tag-helper-existing"),l=document.querySelector("#tag-name"),u=function(m){const y=m.value,A=document.querySelector("#tag-helper");t.includes(y)?((0,C.y9)("#tag-target-selector"),A.textContent=s):((0,C.fi)("#tag-target-selector"),A.textContent=y?n:i)};u(l),l.addEventListener("input",m=>{u(m.target)})}const{appSubUrl:cb}=window.config,ub=/^\S+@\S+$/;function db(){const e=document.querySelector("#search-user-box");if(!e)return;const t=e.getAttribute("data-allow-email")==="true",i=e.getAttribute("data-allow-email-description")??void 0;(0,ke.mD)(e).search({minCharacters:2,apiSettings:{url:`${cb}/user/search_candidates?q={query}`,onResponse(n){const s=[],l=e.querySelector("input").value,u=l.toUpperCase();for(const m of n.data){const y={title:m.login,image:m.avatar_url,description:R(m.full_name)};u===m.login.toUpperCase()?s.unshift(y):s.push(y)}if(t&&!s.length&&ub.test(l)){const m={title:l,description:i};s.push(m)}return{results:s}}},searchFields:["login","full_name"],showNoResults:!1})}function fb(){const e=document.querySelector(".page-content.install");e&&(e.classList.contains("post-install")?mb():hb())}function hb(){const e="gitea",t="gitea",i={mysql:"127.0.0.1:3306",postgres:"127.0.0.1:5432",mssql:"127.0.0.1:1433"},n=document.querySelector("#db_host"),s=document.querySelector("#db_user"),l=document.querySelector("#db_name");document.querySelector("#db_type").addEventListener("change",function(){const y=this.value;if((0,C.y9)("div[data-db-setting-for]"),(0,C.fi)(`div[data-db-setting-for=${y}]`),y!=="sqlite3"){(0,C.fi)("div[data-db-setting-for=common-host]");const A=n.value;(!A||Object.values(i).includes(A))&&(n.value=i[y]??""),!s.value&&!l.value&&(s.value=e,l.value=t)}}),document.querySelector("#db_type").dispatchEvent(new Event("change"));const u=document.querySelector("#app_url");u.value.includes("://localhost")&&(u.value=window.location.href);const m=document.querySelector("#domain");m.value.trim()==="localhost"&&(m.value=window.location.hostname),document.querySelector("#offline-mode input").addEventListener("change",function(){this.checked&&(document.querySelector("#disable-gravatar input").checked=!0,document.querySelector("#federated-avatar-lookup input").checked=!1)}),document.querySelector("#disable-gravatar input").addEventListener("change",function(){this.checked?document.querySelector("#federated-avatar-lookup input").checked=!1:document.querySelector("#offline-mode input").checked=!1}),document.querySelector("#federated-avatar-lookup input").addEventListener("change",function(){this.checked&&(document.querySelector("#disable-gravatar input").checked=!1,document.querySelector("#offline-mode input").checked=!1)}),document.querySelector("#enable-openid-signin input").addEventListener("change",function(){this.checked?document.querySelector("#disable-registration input").checked||(document.querySelector("#enable-openid-signup input").checked=!0):document.querySelector("#enable-openid-signup input").checked=!1}),document.querySelector("#disable-registration input").addEventListener("change",function(){this.checked?(document.querySelector("#enable-captcha input").checked=!1,document.querySelector("#enable-openid-signup input").checked=!1):document.querySelector("#enable-openid-signup input").checked=!0}),document.querySelector("#enable-captcha input").addEventListener("change",function(){this.checked&&(document.querySelector("#disable-registration input").checked=!1)})}function mb(){const e=document.querySelector("#goto-user-login");if(!e)return;const t=e.getAttribute("href");let i=setInterval(async()=>{try{const n=await(0,Ae.fG)(t);i&&n.status===200&&(clearInterval(i),i=null,window.location.href=t)}catch{}},1e3)}function pb(){if(!document.querySelectorAll(".new.webhook").length)return;for(const t of document.querySelectorAll(".events.checkbox input"))t.addEventListener("change",function(){this.checked&&(0,C.fi)(".events.fields")});for(const t of document.querySelectorAll(".non-events.checkbox input"))t.addEventListener("change",function(){this.checked&&(0,C.y9)(".events.fields")});const e=document.querySelector("#http_method");if(e){const t=function(){const i=e.value==="POST";(0,C.oi)(document.querySelector("#content_type").closest(".field"),i)};t(),e.addEventListener("change",t)}document.querySelector("#test-delivery")?.addEventListener("click",async function(){this.classList.add("is-loading","disabled"),await(0,Ae.LO)(this.getAttribute("data-link")),setTimeout(()=>{window.location.href=this.getAttribute("data-redirect")},5e3)})}function gb(){vb(),bb()}function vb(){for(const e of document.querySelectorAll(".show-create-branch-modal"))e.addEventListener("click",()=>{const t=e.getAttribute("data-modal-form")||"#create-branch-form",i=document.querySelector(t);if(!i)return;i.action=`${i.getAttribute("data-base-action")}${e.getAttribute("data-branch-from-urlcomponent")}`;const n=e.getAttribute("data-modal-from-span")||"#modal-create-branch-from-span";document.querySelector(n).textContent=e.getAttribute("data-branch-from"),(0,ke.mD)(e.getAttribute("data-modal")).modal("show")})}function bb(){for(const e of document.querySelectorAll(".show-rename-branch-modal"))e.addEventListener("click",()=>{const t=e.getAttribute("data-modal"),i=document.querySelector(t),n=e.getAttribute("data-old-branch-name");i.querySelector("input[name=from]").value=n;const s=i.querySelector(".default-branch-warning");(0,C.oi)(s,e.getAttribute("data-is-default-branch")==="true");const l=i.querySelector("[data-rename-branch-to]");l.textContent=l.getAttribute("data-rename-branch-to").replace("%s",n)})}function _b(e){return/.*[^/]\/[^/].*/.test(e)}function Lh(e){const t=document.querySelector(e);if(!t)return;const i=t.querySelector("#issue-label-edit-modal");if(!i)return;const n=i.querySelector('input[name="id"]'),s=i.querySelector(".label-name-input"),l=i.querySelector(".label-exclusive-input-field"),u=i.querySelector(".label-exclusive-input"),m=i.querySelector(".label-exclusive-warning"),y=i.querySelector(".label-exclusive-order-input-field"),A=i.querySelector(".label-exclusive-order-input"),L=i.querySelector(".label-is-archived-input-field"),z=i.querySelector(".label-is-archived-input"),X=i.querySelector(".label-desc-input"),_e=i.querySelector(".js-color-picker-input input"),pe=()=>{const Te=_b(s.value);l.classList.toggle("disabled",!Te);const He=Te&&u.checked&&i.hasAttribute("data-need-warn-exclusive");(0,C.oi)(m,He),Te||(u.checked=!1),(0,C.oi)(y,u.checked),parseInt(A.value)<=0?A.style.color="var(--color-placeholder-text) !important":A.style.color=null},de=Te=>{const He=i.querySelector("form");n.value=Te.getAttribute("data-label-id")||"",s.value=Te.getAttribute("data-label-name")||"",A.value=Te.getAttribute("data-label-exclusive-order")||"0",z.checked=Te.getAttribute("data-label-is-archived")==="true",u.checked=Te.getAttribute("data-label-exclusive")==="true",X.value=Te.getAttribute("data-label-description")||"",_e.value=Te.getAttribute("data-label-color")||"",_e.dispatchEvent(new Event("input",{bubbles:!0}));const U=!!n.value,Se=parseInt(Te.getAttribute("data-label-num-issues")||"0");i.toggleAttribute("data-need-warn-exclusive",!u.checked&&Se>0),i.querySelector(".header").textContent=U?i.getAttribute("data-text-edit-label"):i.getAttribute("data-text-new-label");const ze=i.getAttribute("data-current-page-link");He.action=U?`${ze}/edit`:`${ze}/new`,(0,C.oi)(L,U),pe(),(0,ke.mD)(i).modal({onApprove(){if(!He.checkValidity())return He.reportValidity(),!1;He.submit()}}).modal("show")};i.addEventListener("input",()=>pe());const Pe=t.querySelector(".ui.button.new-label");Pe?.addEventListener("click",()=>de(Pe));const Le=t.querySelectorAll(".edit-label-button");for(const Te of Le)Te.addEventListener("click",He=>{He.preventDefault(),de(Te)})}function yb(){document.querySelectorAll(".organization").length&&(document.querySelector(".organization.settings.options #org_name")?.addEventListener("input",function(){const e=this.value.toLowerCase()!==this.getAttribute("data-org-name").toLowerCase();(0,C.oi)("#org-name-change-prompt",e)}),Lh(".page-content.organization.settings.labels"))}var wb=__webpack_require__("./node_modules/jquery/dist/jquery.js"),Mn=__webpack_require__.n(wb);function Sb(){for(const e of document.querySelectorAll(".ui.checkbox")){if(e.hasAttribute("data-checkbox-patched"))continue;const t=e.querySelector("label"),i=e.querySelector("input");!t||!i||((0,ke.iZ)(t,i),e.setAttribute("data-checkbox-patched","true"))}}function xb(){for(const e of document.querySelectorAll(".ui.form .field")){if(e.hasAttribute("data-field-patched"))continue;const t=e.querySelector(":scope > label"),i=e.querySelector(":scope > input");!t||!i||((0,ke.iZ)(t,i),e.setAttribute("data-field-patched","true"))}}const Ar="_giteaAriaPatchDropdown",td=Mn().fn.dropdown;function jb(){if(Mn().fn.dropdown===id)throw new Error("initAriaDropdownPatch could only be called once");Mn().fn.dropdown.settings.onAfterFiltered=Eb,Mn().fn.dropdown=id,Mn().fn.fomanticExt.onResponseKeepSelectedItem=Rb,id.settings=td.settings}function id(...e){const t=td.apply(this,e);for(let i of this){i=i.closest(".ui.dropdown"),i[Ar]||kb(i);const n=Mn()(i),s=n.data("module-dropdown");s.giteaDelegated||(s.giteaDelegated=!0,Ab(n))}return t}function Rh(e,t){t.id||(t.id=(0,ke.Ae)()),t.setAttribute("role",e[Ar].listItemRole),t.setAttribute("tabindex","-1");for(const i of t.querySelectorAll("a, input, button"))i.setAttribute("tabindex","-1")}function Mh(e){e.id||(e.id=(0,ke.Ae)()),e.tabIndex=-1;const t=e.querySelector(".delete.icon");t&&(t.setAttribute("aria-hidden","false"),t.setAttribute("aria-label",window.config.i18n.remove_label_str.replace("%s",e.getAttribute("data-value"))),t.setAttribute("role","button"))}function Eb(){const e=Mn()(this).closest(".ui.dropdown"),t=e.dropdown("setting","hideDividers")==="empty",i=e[0].querySelector(".scrolling.menu")||e[0].querySelector(".menu");t&&i&&Lb(i)}function Ab(e){const t=td.bind(e),i={...t("setting","templates"),t:performance.now()},n=i.menu;i.menu=function(m,y,A,L){const z=n(m,y,A,L),X=document.createElement("div");X.innerHTML=z;const _e=Mn()(X);return _e.find("> .item").each((de,Pe)=>Rh(e[0],Pe)),e[0][Ar].deferredRefreshAriaActiveItem(),_e.html()},t("setting","templates",i);const s=t("setting","onLabelCreate");t("setting","onLabelCreate",function(m,y){const A=s.call(this,m,y);return Mh(A[0]),A});const l=t("internal","set"),u=l.direction;l.direction=function(m){u.call(this,m);const y=t("setting","className");m=m||e.find("> .menu");const A=m[0];A.classList.add(y.loading),A.getBoundingClientRect().right>document.documentElement.clientWidth&&A.classList.add(y.leftward),A.classList.remove(y.loading)}}function Cb(e,t,i){i.id||(i.id=(0,ke.Ae)()),Mn()(i).find("> .item").each((s,l)=>Rh(e,l)),i.setAttribute("role",e[Ar].listPopupRole);for(const s of e.querySelectorAll(".ui.label"))Mh(s);t.setAttribute("role",t.getAttribute("role")??e[Ar].focusableRole),t.setAttribute("aria-haspopup",e[Ar].listPopupRole),t.setAttribute("aria-controls",i.id),t.setAttribute("aria-expanded","false");const n=e.getAttribute("data-tooltip-content");n&&!e.getAttribute("aria-label")&&e.setAttribute("aria-label",n)}function kb(e){e[Ar]={};const t=e.querySelector("input.search"),i=t||e;if(!i)return;t&&!t.getAttribute("autocomplete")&&t.setAttribute("autocomplete","off");let n=Mn()(e).find("> .menu")[0];n||(n=document.createElement("div"),n.classList.add("menu"),e.append(n));const s=e.querySelectorAll("input").length>0;e[Ar].focusableRole=s?"combobox":"menu",e[Ar].listPopupRole=s?"listbox":"",e[Ar].listItemRole=s?"option":"menuitem",Tb(e,i,n),Cb(e,i,n)}function Tb(e,t,i){const n=()=>i.classList.contains("visible")&&!i.classList.contains("out")||i.classList.contains("in"),s=()=>{const y=n();t.setAttribute("aria-expanded",y?"true":"false");const A=Mn()(i).find("> .item.active, > .item.selected")[0];A&&(y?t.setAttribute("aria-activedescendant",A.id):e[Ar].listPopupRole==="menu"&&(t.removeAttribute("aria-activedescendant"),A.classList.remove("active","selected")))};e.addEventListener("keydown",y=>{if(y.key==="Enter"){const A=i.querySelector(":scope > .item.selected, .menu > .item.selected");A?.matches("a, .js-aria-clickable")&&!A.matches(".tw-hidden, .filtered")&&(y.preventDefault(),A.click())}});const l=(y=0)=>{setTimeout(s,y)};e[Ar].deferredRefreshAriaActiveItem=l,e.addEventListener("keyup",y=>{y.key.startsWith("Arrow")&&l()});let u=0,m=0;e.addEventListener("mousedown",()=>{m+=n()?1:0,u++},!0),e.addEventListener("focus",()=>{m+=n()?1:0,u++,l()},!0),e.addEventListener("blur",()=>{m=u=0,l(100)},!0),e.addEventListener("mouseup",()=>{setTimeout(()=>{m=u=0,l(100)},0)},!0),e.addEventListener("click",y=>{n()&&m!==2&&u===2&&y.stopPropagation(),u=m=0},!0)}function Lb(e){const t=[],i=[];let n="",s="";const l=z=>z.classList.contains("divider"),u=z=>l(z)&&z.hasAttribute("data-scope"),m=z=>z.classList.add("hidden","transition"),y=z=>z.classList.remove("hidden","transition"),A=z=>z.classList.contains("hidden")||z.classList.contains("filtered")||z.classList.contains("tw-hidden"),L=z=>{i.length===1&&u(i[0])?m(i[0]):i.length&&(u(i[0])&&s===n&&(m(i[0]),i.shift()),t.push(...i),s=n),n=z,i.length=0};(0,C.jB)(e,".divider",y);for(const z of e.children){const X=z.getAttribute("data-scope")||"";X!==n&&L(X),A(z)||i.push(z)}for(L("");t.length&&l(t[0]);)m(t[0]),t.shift();for(;t.length&&l(t[t.length-1]);)m(t[t.length-1]),t.pop();for(let z=0;z<t.length-1;z++)t[z].matches(".divider")&&t[z+1].matches(".divider")&&m(t[z])}function Rb(e,t){const i=e instanceof HTMLElement?e:e[0];setTimeout(()=>{(0,C.jB)(i,`.menu .item[data-value="${CSS.escape(t)}"].filtered`,n=>n.classList.remove("filtered")),Mn()(i).dropdown("set selected",t??"")},10)}const Dh=Mn().fn.modal;function Mb(){if(Mn().fn.modal===nd)throw new Error("initAriaModalPatch could only be called once");Mn().fn.modal=nd,nd.settings=Dh.settings}function nd(...e){const t=Dh.apply(this,e);if(e[0]==="show"||e[0]?.autoShow)for(const i of this)for(const n of i.querySelectorAll("form button.cancel:not([type])"))n.setAttribute("type","button");return t}function Db(){const e=new Set(["clear queue","stop","stop all","destroy","force repaint","repaint","reset","looping","remove looping","disable","enable","set duration","save conditions","restore conditions"]);Mn().fn.transition=function(t,i,n){if(t==="is supported")return!0;if(t==="is animating"||t==="is inward"||t==="is outward")return!1;let s;if(typeof t=="string"){if(e.has(t))return this;s={animation:t,...i&&{duration:i},...n&&{onComplete:n}}}else if(typeof t=="object")s=t;else throw new Error(`invalid argument: ${t}`);const l=s.animation?.startsWith("show")||s.animation?.endsWith(" in"),u=s.animation?.startsWith("hide")||s.animation?.endsWith(" out");return this.each((m,y)=>{let A=l;!l&&!u&&(A=this.hasClass("hidden")),s.onStart?.call(y),A?(y.classList.remove("hidden"),y.classList.add("visible","transition"),s.displayType&&y.style.setProperty("display",s.displayType,"important"),s.onShow?.call(y)):(y.classList.add("hidden"),y.classList.remove("visible"),y.style.removeProperty("display"),s.onHidden?.call(y)),s.onComplete?.call(y)}),this}}function Ob(){Mn().fn.dimmer=function(e,t){if(e==="add content"){const i=t,n=document.querySelector("body > .ui.dimmer");n?((0,C.xP)(n,"*",s=>s.classList.add("hidden")),this._dimmer=n):(this._dimmer=document.createElement("div"),this._dimmer.classList.add("ui","dimmer"),document.body.append(this._dimmer)),this._dimmer.append(i[0])}else{if(e==="get dimmer")return Mn()(this._dimmer);if(e==="show")this._dimmer.classList.add("active"),document.body.classList.add("tw-overflow-hidden");else if(e==="hide"){const i=t;this._dimmer.classList.remove("active"),document.body.classList.remove("tw-overflow-hidden"),i()}}return this}}function qb(){Mn().fn.tab=function(){for(const e of this){const t=e.getAttribute("data-tab");t&&e.addEventListener("click",()=>{const i=document.querySelector(`.ui.tab[data-tab="${t}"]`);(0,C.D6)(i,".ui.tab",n=>n.classList.remove("active")),(0,C.D6)(e,"[data-tab]",n=>n.classList.remove("active")),e.classList.add("active"),i.classList.add("active")})}return this}}const Oh=window.matchMedia("only screen and (max-width: 767.98px)");function Pb(){Mn().fn.fomanticExt={},Mn().fn.dropdown.settings.fullTextSearch="exact",Mn().fn.dropdown.settings.className.label+=" tw-cursor-default",Mn().fn.dropdown.settings.templates.label=function(e,t,i,n){const s=Mn().fn.dropdown.settings.templates.escape;return s(t,i)+(0,Z.JW)("octicon-x",16,`${n.delete} icon`)},Db(),Ob(),qb(),Sb(),xb(),jb(),Mb()}async function Fb(){const e=document.querySelector(".repository.wiki .combo-markdown-editor textarea");if(!e)return;const t=document.querySelector(".repository.wiki.new .ui.form"),i=t.querySelector(".combo-markdown-editor");let n,s=!1,l="";const u=async function(){if(s)return;const m=i.querySelector(".EasyMDEContainer .editor-preview-active"),A=i.querySelector(".EasyMDEContainer .editor-preview-active-side")||m,L=e.value;if(n&&A&&l!==L){s=!0;const z=new FormData;z.append("mode",n.previewMode),z.append("context",n.previewContext),z.append("text",L);try{const _e=await(await(0,Ae.LO)(n.previewUrl,{data:z})).text();l=L,A.innerHTML=`<div class="render-content markup ui segment">${_e}</div>`}catch(X){console.error("Error rendering preview:",X)}finally{s=!1,setTimeout(u,1e3)}}else setTimeout(u,1e3)};u(),n=await ma(i,{editorHeights:{minHeight:"300px",height:"calc(100vh - 600px)"},easyMDEOptions:{previewRender:(m,y)=>y.innerHTML,toolbar:["bold","italic","strikethrough","|","heading-1","heading-2","heading-3","heading-bigger","heading-smaller","|","gitea-code-inline","code","quote","|","gitea-checkbox-empty","gitea-checkbox-checked","|","unordered-list","ordered-list","|","link","image","table","horizontal-rule","|","preview","fullscreen","side-by-side","|","gitea-switch-to-textarea"]}}),t.addEventListener("submit",m=>{hh(e)||(m.preventDefault(),m.stopPropagation())})}function qh(e){e&&document.querySelector(".wiki-content-toc details")?.removeAttribute("open")}function Ib(){document.querySelector(".page-content.repository.wiki")&&(Oh.addEventListener("change",e=>qh(e.matches)),qh(Oh.matches),Fb())}function Nb(){(0,C.ny)(document,"click",".escape-button, .unescape-button, .toggle-escape-button",(e,t)=>{t.preventDefault();const i=e.getAttribute("data-unicode-content-selector"),n=i?document.querySelector(i):e.closest(".file-content, .non-diff-file-content"),s=n.querySelector(".file-code, .file-view")??n;if(e.matches(".escape-button"))s.classList.add("unicode-escaped"),(0,C.y9)(e),(0,C.fi)((0,C.D6)(e,".unescape-button"));else if(e.matches(".unescape-button"))s.classList.remove("unicode-escaped"),(0,C.y9)(e),(0,C.fi)((0,C.D6)(e,".escape-button"));else if(e.matches(".toggle-escape-button")){const l=s.classList.contains("unicode-escaped");s.classList.toggle("unicode-escaped",!l),(0,C.oi)(n.querySelectorAll(".unescape-button"),!l),(0,C.oi)(n.querySelectorAll(".escape-button"),l)}})}const{pageData:Ph}=window.config;async function Hb(e,t){const[{Cite:i,plugins:n}]=await Promise.all([__webpack_require__.e("citation-js-core-citation-js-formats-citation-js-bibtex-citation-js-csl").then(__webpack_require__.bind(__webpack_require__,"./node_modules/@citation-js/core/lib-mjs/index.js")),Promise.all([__webpack_require__.e("citation-js-core-citation-js-formats-citation-js-bibtex-citation-js-csl"),__webpack_require__.e("citation-js-formats")]).then(__webpack_require__.t.bind(__webpack_require__,"./node_modules/@citation-js/plugin-software-formats/lib/index.js",23)),Promise.all([__webpack_require__.e("citation-js-core-citation-js-formats-citation-js-bibtex-citation-js-csl"),__webpack_require__.e("citation-js-bibtex")]).then(__webpack_require__.bind(__webpack_require__,"./node_modules/@citation-js/plugin-bibtex/lib-mjs/index.js")),Promise.all([__webpack_require__.e("citation-js-core-citation-js-formats-citation-js-bibtex-citation-js-csl"),__webpack_require__.e("citation-js-csl")]).then(__webpack_require__.bind(__webpack_require__,"./node_modules/@citation-js/plugin-csl/lib-mjs/index.js"))]),{citationFileContent:s}=Ph,l=n.config.get("@bibtex");l.constants.fieldTypes.doi=["field","literal"],l.constants.fieldTypes.version=["field","literal"];const u=new i(s),m=(0,St.kk)()||"en-US",y=u.format("bibliography",{template:"apa",lang:m}),A=u.format("bibtex",{lang:m});t.setAttribute("data-text",A),e.setAttribute("data-text",y)}async function Bb(){const e="apa";if(!Ph.citationFileContent)return;const t=document.querySelector("#citation-copy-apa"),i=document.querySelector("#citation-copy-bibtex"),n=document.querySelector("#citation-copy-content");if(!t&&!i||!n)return;const s=()=>{const l=(localStorage.getItem("citation-copy-format")||e)==="bibtex",u=(l?i:t).getAttribute("data-text");n.value=u,i.classList.toggle("primary",l),t.classList.toggle("primary",!l)};document.querySelector("#cite-repo-button")?.addEventListener("click",async()=>{try{await Hb(t,i)}catch(l){console.error(`initCitationFileCopyContent error: ${l}`,l);return}s(),t.addEventListener("click",()=>{localStorage.setItem("citation-copy-format","apa"),s()}),i.addEventListener("click",()=>{localStorage.setItem("citation-copy-format","bibtex"),s()}),n.addEventListener("click",()=>{n.select()}),(0,ke.mD)("#cite-repo-modal").modal("show")})}function $b(){_c("click","onCommentReactionButtonClick",async(e,t)=>{if(t.preventDefault(),e.classList.contains("disabled"))return;const i=e.closest("[data-action-url]").getAttribute("data-action-url"),n=e.getAttribute("data-reaction-content"),s=e.closest(".comment-container"),l=s.querySelector(".bottom-reactions"),m=l?.querySelector(`a[data-reaction-content="${CSS.escape(n)}"]`)?.getAttribute("data-has-reacted")==="true",A=await(await(0,Ae.LO)(`${i}/${m?"unreact":"react"}`,{data:new URLSearchParams({content:n})})).json();l?.remove(),A.html&&s.insertAdjacentHTML("beforeend",A.html)})}var Ub=__webpack_require__("./node_modules/brace-expansion/index.js");const Vb=1024*64,Tc=e=>{if(typeof e!="string")throw new TypeError("invalid pattern");if(e.length>Vb)throw new TypeError("pattern is too long")},Wb={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",!0],"[:alpha:]":["\\p{L}\\p{Nl}",!0],"[:ascii:]":["\\x00-\\x7f",!1],"[:blank:]":["\\p{Zs}\\t",!0],"[:cntrl:]":["\\p{Cc}",!0],"[:digit:]":["\\p{Nd}",!0],"[:graph:]":["\\p{Z}\\p{C}",!0,!0],"[:lower:]":["\\p{Ll}",!0],"[:print:]":["\\p{C}",!0],"[:punct:]":["\\p{P}",!0],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",!0],"[:upper:]":["\\p{Lu}",!0],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",!0],"[:xdigit:]":["A-Fa-f0-9",!1]},Tl=e=>e.replace(/[[\]\\-]/g,"\\$&"),zb=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),Fh=e=>e.join(""),Kb=(e,t)=>{const i=t;if(e.charAt(i)!=="[")throw new Error("not in a brace expression");const n=[],s=[];let l=i+1,u=!1,m=!1,y=!1,A=!1,L=i,z="";e:for(;l<e.length;){const de=e.charAt(l);if((de==="!"||de==="^")&&l===i+1){A=!0,l++;continue}if(de==="]"&&u&&!y){L=l+1;break}if(u=!0,de==="\\"&&!y){y=!0,l++;continue}if(de==="["&&!y){for(const[Pe,[Le,Te,He]]of Object.entries(Wb))if(e.startsWith(Pe,l)){if(z)return["$.",!1,e.length-i,!0];l+=Pe.length,He?s.push(Le):n.push(Le),m=m||Te;continue e}}if(y=!1,z){de>z?n.push(Tl(z)+"-"+Tl(de)):de===z&&n.push(Tl(de)),z="",l++;continue}if(e.startsWith("-]",l+1)){n.push(Tl(de+"-")),l+=2;continue}if(e.startsWith("-",l+1)){z=de,l+=2;continue}n.push(Tl(de)),l++}if(L<l)return["",!1,0,!1];if(!n.length&&!s.length)return["$.",!1,e.length-i,!0];if(s.length===0&&n.length===1&&/^\\?.$/.test(n[0])&&!A){const de=n[0].length===2?n[0].slice(-1):n[0];return[zb(de),!1,L-i,!1]}const X="["+(A?"^":"")+Fh(n)+"]",_e="["+(A?"":"^")+Fh(s)+"]";return[n.length&&s.length?"("+X+"|"+_e+")":n.length?X:_e,m,L-i,!0]},Ll=(e,{windowsPathsNoEscape:t=!1}={})=>t?e.replace(/\[([^\/\\])\]/g,"$1"):e.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1"),Xb=new Set(["!","?","+","*","@"]),Ih=e=>Xb.has(e),Gb="(?!(?:^|/)\\.\\.?(?:$|/))",Lc="(?!\\.)",Qb=new Set(["[","."]),Yb=new Set(["..","."]),Jb=new Set("().*{}+?[]^$\\!"),Zb=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),sd="[^/]",Nh=sd+"*?",Hh=sd+"+?",Ks=class Ks{constructor(t,i,n={}){wn(this,ba);rs(this,"type");wn(this,is);wn(this,bs);wn(this,lo,!1);wn(this,Dn,[]);wn(this,Gn);wn(this,Do);wn(this,ga);wn(this,Oo,!1);wn(this,Gr);wn(this,va);wn(this,Pl,!1);this.type=t,t&&tn(this,bs,!0),tn(this,Gn,i),tn(this,is,pt(this,Gn)?pt(pt(this,Gn),is):this),tn(this,Gr,pt(this,is)===this?n:pt(pt(this,is),Gr)),tn(this,ga,pt(this,is)===this?[]:pt(pt(this,is),ga)),t==="!"&&!pt(pt(this,is),Oo)&&pt(this,ga).push(this),tn(this,Do,pt(this,Gn)?pt(pt(this,Gn),Dn).length:0)}get hasMagic(){if(pt(this,bs)!==void 0)return pt(this,bs);for(const t of pt(this,Dn))if(typeof t!="string"&&(t.type||t.hasMagic))return tn(this,bs,!0);return pt(this,bs)}toString(){return pt(this,va)!==void 0?pt(this,va):this.type?tn(this,va,this.type+"("+pt(this,Dn).map(t=>String(t)).join("|")+")"):tn(this,va,pt(this,Dn).map(t=>String(t)).join(""))}push(...t){for(const i of t)if(i!==""){if(typeof i!="string"&&!(i instanceof Ks&&pt(i,Gn)===this))throw new Error("invalid part: "+i);pt(this,Dn).push(i)}}toJSON(){const t=this.type===null?pt(this,Dn).slice().map(i=>typeof i=="string"?i:i.toJSON()):[this.type,...pt(this,Dn).map(i=>i.toJSON())];return this.isStart()&&!this.type&&t.unshift([]),this.isEnd()&&(this===pt(this,is)||pt(pt(this,is),Oo)&&pt(this,Gn)?.type==="!")&&t.push({}),t}isStart(){if(pt(this,is)===this)return!0;if(!pt(this,Gn)?.isStart())return!1;if(pt(this,Do)===0)return!0;const t=pt(this,Gn);for(let i=0;i<pt(this,Do);i++){const n=pt(t,Dn)[i];if(!(n instanceof Ks&&n.type==="!"))return!1}return!0}isEnd(){if(pt(this,is)===this||pt(this,Gn)?.type==="!")return!0;if(!pt(this,Gn)?.isEnd())return!1;if(!this.type)return pt(this,Gn)?.isEnd();const t=pt(this,Gn)?pt(pt(this,Gn),Dn).length:0;return pt(this,Do)===t-1}copyIn(t){typeof t=="string"?this.push(t):this.push(t.clone(this))}clone(t){const i=new Ks(this.type,t);for(const n of pt(this,Dn))i.copyIn(n);return i}static fromGlob(t,i={}){var s;const n=new Ks(null,void 0,i);return dn(s=Ks,qo,Gc).call(s,t,n,0,i),n}toMMPattern(){if(this!==pt(this,is))return pt(this,is).toMMPattern();const t=this.toString(),[i,n,s,l]=this.toRegExpSource();if(!(s||pt(this,bs)||pt(this,Gr).nocase&&!pt(this,Gr).nocaseMagicOnly&&t.toUpperCase()!==t.toLowerCase()))return n;const m=(pt(this,Gr).nocase?"i":"")+(l?"u":"");return Object.assign(new RegExp(`^${i}$`,m),{_src:i,_glob:t})}get options(){return pt(this,Gr)}toRegExpSource(t){const i=t??!!pt(this,Gr).dot;if(pt(this,is)===this&&dn(this,ba,sm).call(this),!this.type){const y=this.isStart()&&this.isEnd(),A=pt(this,Dn).map(_e=>{var Te;const[pe,de,Pe,Le]=typeof _e=="string"?dn(Te=Ks,qo,rm).call(Te,_e,pt(this,bs),y):_e.toRegExpSource(t);return tn(this,bs,pt(this,bs)||Pe),tn(this,lo,pt(this,lo)||Le),pe}).join("");let L="";if(this.isStart()&&typeof pt(this,Dn)[0]=="string"&&!(pt(this,Dn).length===1&&Yb.has(pt(this,Dn)[0]))){const pe=Qb,de=i&&pe.has(A.charAt(0))||A.startsWith("\\.")&&pe.has(A.charAt(2))||A.startsWith("\\.\\.")&&pe.has(A.charAt(4)),Pe=!i&&!t&&pe.has(A.charAt(0));L=de?Gb:Pe?Lc:""}let z="";return this.isEnd()&&pt(pt(this,is),Oo)&&pt(this,Gn)?.type==="!"&&(z="(?:$|\\/)"),[L+A+z,Ll(A),tn(this,bs,!!pt(this,bs)),pt(this,lo)]}const n=this.type==="*"||this.type==="+",s=this.type==="!"?"(?:(?!(?:":"(?:";let l=dn(this,ba,pd).call(this,i);if(this.isStart()&&this.isEnd()&&!l&&this.type!=="!"){const y=this.toString();return tn(this,Dn,[y]),this.type=null,tn(this,bs,void 0),[y,Ll(this.toString()),!1,!1]}let u=!n||t||i||!Lc?"":dn(this,ba,pd).call(this,!0);u===l&&(u=""),u&&(l=`(?:${l})(?:${u})*?`);let m="";if(this.type==="!"&&pt(this,Pl))m=(this.isStart()&&!i?Lc:"")+Hh;else{const y=this.type==="!"?"))"+(this.isStart()&&!i&&!t?Lc:"")+Nh+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&u?")":this.type==="*"&&u?")?":`)${this.type}`;m=s+l+y}return[m,Ll(l),tn(this,bs,!!pt(this,bs)),pt(this,lo)]}};is=new WeakMap,bs=new WeakMap,lo=new WeakMap,Dn=new WeakMap,Gn=new WeakMap,Do=new WeakMap,ga=new WeakMap,Oo=new WeakMap,Gr=new WeakMap,va=new WeakMap,Pl=new WeakMap,ba=new WeakSet,sm=function(){if(this!==pt(this,is))throw new Error("should only call on root");if(pt(this,Oo))return this;this.toString(),tn(this,Oo,!0);let t;for(;t=pt(this,ga).pop();){if(t.type!=="!")continue;let i=t,n=pt(i,Gn);for(;n;){for(let s=pt(i,Do)+1;!n.type&&s<pt(n,Dn).length;s++)for(const l of pt(t,Dn)){if(typeof l=="string")throw new Error("string part in extglob AST??");l.copyIn(pt(n,Dn)[s])}i=n,n=pt(i,Gn)}}return this},qo=new WeakSet,Gc=function(t,i,n,s){var _e,pe;let l=!1,u=!1,m=-1,y=!1;if(i.type===null){let de=n,Pe="";for(;de<t.length;){const Le=t.charAt(de++);if(l||Le==="\\"){l=!l,Pe+=Le;continue}if(u){de===m+1?(Le==="^"||Le==="!")&&(y=!0):Le==="]"&&!(de===m+2&&y)&&(u=!1),Pe+=Le;continue}else if(Le==="["){u=!0,m=de,y=!1,Pe+=Le;continue}if(!s.noext&&Ih(Le)&&t.charAt(de)==="("){i.push(Pe),Pe="";const Te=new Ks(Le,i);de=dn(_e=Ks,qo,Gc).call(_e,t,Te,de,s),i.push(Te);continue}Pe+=Le}return i.push(Pe),de}let A=n+1,L=new Ks(null,i);const z=[];let X="";for(;A<t.length;){const de=t.charAt(A++);if(l||de==="\\"){l=!l,X+=de;continue}if(u){A===m+1?(de==="^"||de==="!")&&(y=!0):de==="]"&&!(A===m+2&&y)&&(u=!1),X+=de;continue}else if(de==="["){u=!0,m=A,y=!1,X+=de;continue}if(Ih(de)&&t.charAt(A)==="("){L.push(X),X="";const Pe=new Ks(de,L);L.push(Pe),A=dn(pe=Ks,qo,Gc).call(pe,t,Pe,A,s);continue}if(de==="|"){L.push(X),X="",z.push(L),L=new Ks(null,i);continue}if(de===")")return X===""&&pt(i,Dn).length===0&&tn(i,Pl,!0),L.push(X),X="",i.push(...z,L),A;X+=de}return i.type=null,tn(i,bs,void 0),tn(i,Dn,[t.substring(n-1)]),A},pd=function(t){return pt(this,Dn).map(i=>{if(typeof i=="string")throw new Error("string type in extglob ast??");const[n,s,l,u]=i.toRegExpSource(t);return tn(this,lo,pt(this,lo)||u),n}).filter(i=>!(this.isStart()&&this.isEnd())||!!i).join("|")},rm=function(t,i,n=!1){let s=!1,l="",u=!1;for(let m=0;m<t.length;m++){const y=t.charAt(m);if(s){s=!1,l+=(Jb.has(y)?"\\":"")+y;continue}if(y==="\\"){m===t.length-1?l+="\\\\":s=!0;continue}if(y==="["){const[A,L,z,X]=Kb(t,m);if(z){l+=A,u=u||L,m+=z-1,i=i||X;continue}}if(y==="*"){n&&t==="*"?l+=Hh:l+=Nh,i=!0;continue}if(y==="?"){l+=sd,i=!0;continue}l+=Zb(y)}return[l,Ll(t),!!i,u]},wn(Ks,qo);let Rc=Ks;const e_=(e,{windowsPathsNoEscape:t=!1}={})=>t?e.replace(/[?*()[\]]/g,"[$&]"):e.replace(/[?*()[\]\\]/g,"\\$&"),Os=(e,t,i={})=>(Tc(t),!i.nocomment&&t.charAt(0)==="#"?!1:new Mc(t,i).match(e)),t_=/^\*+([^+@!?\*\[\(]*)$/,i_=e=>t=>!t.startsWith(".")&&t.endsWith(e),n_=e=>t=>t.endsWith(e),s_=e=>(e=e.toLowerCase(),t=>!t.startsWith(".")&&t.toLowerCase().endsWith(e)),r_=e=>(e=e.toLowerCase(),t=>t.toLowerCase().endsWith(e)),o_=/^\*+\.\*+$/,a_=e=>!e.startsWith(".")&&e.includes("."),l_=e=>e!=="."&&e!==".."&&e.includes("."),c_=/^\.\*+$/,u_=e=>e!=="."&&e!==".."&&e.startsWith("."),d_=/^\*+$/,f_=e=>e.length!==0&&!e.startsWith("."),h_=e=>e.length!==0&&e!=="."&&e!=="..",m_=/^\?+([^+@!?\*\[\(]*)?$/,p_=([e,t=""])=>{const i=Bh([e]);return t?(t=t.toLowerCase(),n=>i(n)&&n.toLowerCase().endsWith(t)):i},g_=([e,t=""])=>{const i=$h([e]);return t?(t=t.toLowerCase(),n=>i(n)&&n.toLowerCase().endsWith(t)):i},v_=([e,t=""])=>{const i=$h([e]);return t?n=>i(n)&&n.endsWith(t):i},b_=([e,t=""])=>{const i=Bh([e]);return t?n=>i(n)&&n.endsWith(t):i},Bh=([e])=>{const t=e.length;return i=>i.length===t&&!i.startsWith(".")},$h=([e])=>{const t=e.length;return i=>i.length===t&&i!=="."&&i!==".."},Uh=typeof process=="object"&&process?typeof process.env=="object"&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix",Vh={win32:{sep:"\\"},posix:{sep:"/"}},__=Uh==="win32"?Vh.win32.sep:Vh.posix.sep;Os.sep=__;const Cr=Symbol("globstar **");Os.GLOBSTAR=Cr;const y_="[^/]"+"*?",w_="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",S_="(?:(?!(?:\\/|^)\\.).)*?",x_=(e,t={})=>i=>Os(i,e,t);Os.filter=x_;const kr=(e,t={})=>Object.assign({},e,t),j_=e=>{if(!e||typeof e!="object"||!Object.keys(e).length)return Os;const t=Os;return Object.assign((n,s,l={})=>t(n,s,kr(e,l)),{Minimatch:class extends t.Minimatch{constructor(s,l={}){super(s,kr(e,l))}static defaults(s){return t.defaults(kr(e,s)).Minimatch}},AST:class extends t.AST{constructor(s,l,u={}){super(s,l,kr(e,u))}static fromGlob(s,l={}){return t.AST.fromGlob(s,kr(e,l))}},unescape:(n,s={})=>t.unescape(n,kr(e,s)),escape:(n,s={})=>t.escape(n,kr(e,s)),filter:(n,s={})=>t.filter(n,kr(e,s)),defaults:n=>t.defaults(kr(e,n)),makeRe:(n,s={})=>t.makeRe(n,kr(e,s)),braceExpand:(n,s={})=>t.braceExpand(n,kr(e,s)),match:(n,s,l={})=>t.match(n,s,kr(e,l)),sep:t.sep,GLOBSTAR:Cr})};Os.defaults=j_;const Wh=(e,t={})=>(Tc(e),t.nobrace||!/\{(?:(?!\{).)*\}/.test(e)?[e]:Ub(e));Os.braceExpand=Wh;const E_=(e,t={})=>new Mc(e,t).makeRe();Os.makeRe=E_;const A_=(e,t,i={})=>{const n=new Mc(t,i);return e=e.filter(s=>n.match(s)),n.options.nonull&&!e.length&&e.push(t),e};Os.match=A_;const zh=/[?*]|[+@!]\(.*?\)|\[|\]/,C_=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&");class Mc{constructor(t,i={}){rs(this,"options");rs(this,"set");rs(this,"pattern");rs(this,"windowsPathsNoEscape");rs(this,"nonegate");rs(this,"negate");rs(this,"comment");rs(this,"empty");rs(this,"preserveMultipleSlashes");rs(this,"partial");rs(this,"globSet");rs(this,"globParts");rs(this,"nocase");rs(this,"isWindows");rs(this,"platform");rs(this,"windowsNoMagicRoot");rs(this,"regexp");Tc(t),i=i||{},this.options=i,this.pattern=t,this.platform=i.platform||Uh,this.isWindows=this.platform==="win32",this.windowsPathsNoEscape=!!i.windowsPathsNoEscape||i.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!i.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!i.nonegate,this.comment=!1,this.empty=!1,this.partial=!!i.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=i.windowsNoMagicRoot!==void 0?i.windowsNoMagicRoot:!!(this.isWindows&&this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(const t of this.set)for(const i of t)if(typeof i!="string")return!0;return!1}debug(...t){}make(){const t=this.pattern,i=this.options;if(!i.nocomment&&t.charAt(0)==="#"){this.comment=!0;return}if(!t){this.empty=!0;return}this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],i.debug&&(this.debug=(...l)=>console.error(...l)),this.debug(this.pattern,this.globSet);const n=this.globSet.map(l=>this.slashSplit(l));this.globParts=this.preprocess(n),this.debug(this.pattern,this.globParts);let s=this.globParts.map((l,u,m)=>{if(this.isWindows&&this.windowsNoMagicRoot){const y=l[0]===""&&l[1]===""&&(l[2]==="?"||!zh.test(l[2]))&&!zh.test(l[3]),A=/^[a-z]:/i.test(l[0]);if(y)return[...l.slice(0,4),...l.slice(4).map(L=>this.parse(L))];if(A)return[l[0],...l.slice(1).map(L=>this.parse(L))]}return l.map(y=>this.parse(y))});if(this.debug(this.pattern,s),this.set=s.filter(l=>l.indexOf(!1)===-1),this.isWindows)for(let l=0;l<this.set.length;l++){const u=this.set[l];u[0]===""&&u[1]===""&&this.globParts[l][2]==="?"&&typeof u[3]=="string"&&/^[a-z]:$/i.test(u[3])&&(u[2]="?")}this.debug(this.pattern,this.set)}preprocess(t){if(this.options.noglobstar)for(let n=0;n<t.length;n++)for(let s=0;s<t[n].length;s++)t[n][s]==="**"&&(t[n][s]="*");const{optimizationLevel:i=1}=this.options;return i>=2?(t=this.firstPhasePreProcess(t),t=this.secondPhasePreProcess(t)):i>=1?t=this.levelOneOptimize(t):t=this.adjascentGlobstarOptimize(t),t}adjascentGlobstarOptimize(t){return t.map(i=>{let n=-1;for(;(n=i.indexOf("**",n+1))!==-1;){let s=n;for(;i[s+1]==="**";)s++;s!==n&&i.splice(n,s-n)}return i})}levelOneOptimize(t){return t.map(i=>(i=i.reduce((n,s)=>{const l=n[n.length-1];return s==="**"&&l==="**"?n:s===".."&&l&&l!==".."&&l!=="."&&l!=="**"?(n.pop(),n):(n.push(s),n)},[]),i.length===0?[""]:i))}levelTwoFileOptimize(t){Array.isArray(t)||(t=this.slashSplit(t));let i=!1;do{if(i=!1,!this.preserveMultipleSlashes){for(let s=1;s<t.length-1;s++){const l=t[s];s===1&&l===""&&t[0]===""||(l==="."||l==="")&&(i=!0,t.splice(s,1),s--)}t[0]==="."&&t.length===2&&(t[1]==="."||t[1]==="")&&(i=!0,t.pop())}let n=0;for(;(n=t.indexOf("..",n+1))!==-1;){const s=t[n-1];s&&s!=="."&&s!==".."&&s!=="**"&&(i=!0,t.splice(n-1,2),n-=2)}}while(i);return t.length===0?[""]:t}firstPhasePreProcess(t){let i=!1;do{i=!1;for(let n of t){let s=-1;for(;(s=n.indexOf("**",s+1))!==-1;){let u=s;for(;n[u+1]==="**";)u++;u>s&&n.splice(s+1,u-s);let m=n[s+1];const y=n[s+2],A=n[s+3];if(m!==".."||!y||y==="."||y===".."||!A||A==="."||A==="..")continue;i=!0,n.splice(s,1);const L=n.slice(0);L[s]="**",t.push(L),s--}if(!this.preserveMultipleSlashes){for(let u=1;u<n.length-1;u++){const m=n[u];u===1&&m===""&&n[0]===""||(m==="."||m==="")&&(i=!0,n.splice(u,1),u--)}n[0]==="."&&n.length===2&&(n[1]==="."||n[1]==="")&&(i=!0,n.pop())}let l=0;for(;(l=n.indexOf("..",l+1))!==-1;){const u=n[l-1];if(u&&u!=="."&&u!==".."&&u!=="**"){i=!0;const y=l===1&&n[l+1]==="**"?["."]:[];n.splice(l-1,2,...y),n.length===0&&n.push(""),l-=2}}}}while(i);return t}secondPhasePreProcess(t){for(let i=0;i<t.length-1;i++)for(let n=i+1;n<t.length;n++){const s=this.partsMatch(t[i],t[n],!this.preserveMultipleSlashes);if(s){t[i]=[],t[n]=s;break}}return t.filter(i=>i.length)}partsMatch(t,i,n=!1){let s=0,l=0,u=[],m="";for(;s<t.length&&l<i.length;)if(t[s]===i[l])u.push(m==="b"?i[l]:t[s]),s++,l++;else if(n&&t[s]==="**"&&i[l]===t[s+1])u.push(t[s]),s++;else if(n&&i[l]==="**"&&t[s]===i[l+1])u.push(i[l]),l++;else if(t[s]==="*"&&i[l]&&(this.options.dot||!i[l].startsWith("."))&&i[l]!=="**"){if(m==="b")return!1;m="a",u.push(t[s]),s++,l++}else if(i[l]==="*"&&t[s]&&(this.options.dot||!t[s].startsWith("."))&&t[s]!=="**"){if(m==="a")return!1;m="b",u.push(i[l]),s++,l++}else return!1;return t.length===i.length&&u}parseNegate(){if(this.nonegate)return;const t=this.pattern;let i=!1,n=0;for(let s=0;s<t.length&&t.charAt(s)==="!";s++)i=!i,n++;n&&(this.pattern=t.slice(n)),this.negate=i}matchOne(t,i,n=!1){const s=this.options;if(this.isWindows){const de=typeof t[0]=="string"&&/^[a-z]:$/i.test(t[0]),Pe=!de&&t[0]===""&&t[1]===""&&t[2]==="?"&&/^[a-z]:$/i.test(t[3]),Le=typeof i[0]=="string"&&/^[a-z]:$/i.test(i[0]),Te=!Le&&i[0]===""&&i[1]===""&&i[2]==="?"&&typeof i[3]=="string"&&/^[a-z]:$/i.test(i[3]),He=Pe?3:de?0:void 0,U=Te?3:Le?0:void 0;if(typeof He=="number"&&typeof U=="number"){const[Se,ze]=[t[He],i[U]];Se.toLowerCase()===ze.toLowerCase()&&(i[U]=Se,U>He?i=i.slice(U):He>U&&(t=t.slice(He)))}}const{optimizationLevel:l=1}=this.options;l>=2&&(t=this.levelTwoFileOptimize(t)),this.debug("matchOne",this,{file:t,pattern:i}),this.debug("matchOne",t.length,i.length);for(var u=0,m=0,y=t.length,A=i.length;u<y&&m<A;u++,m++){this.debug("matchOne loop");var L=i[m],z=t[u];if(this.debug(i,L,z),L===!1)return!1;if(L===Cr){this.debug("GLOBSTAR",[i,L,z]);var X=u,_e=m+1;if(_e===A){for(this.debug("** at the end");u<y;u++)if(t[u]==="."||t[u]===".."||!s.dot&&t[u].charAt(0)===".")return!1;return!0}for(;X<y;){var pe=t[X];if(this.debug(`
DesignScreenshot/output/git.buildapp.eu.org_run/git.buildapp.eu.org_2_login_page.html:455:`)}const r1=["::group::","##[group]"],o1=["::endgroup::","##[endgroup]"];function a1(e){for(const t of r1)if(e.message.startsWith(t))return{name:"group",prefix:t};for(const t of o1)if(e.message.startsWith(t))return{name:"endgroup",prefix:t};return null}function l1(e){const t=e.getBoundingClientRect();return t.top>=0&&t.bottom<=window.innerHeight}function c1(){try{const e=localStorage.getItem("actions-view-options");if(e)return JSON.parse(e)}catch{}return{autoScroll:!0,expandRunning:!1}}var u1=(0,c.pM)({name:"RepoActionView",components:{SvgIcon:Z.Ah,ActionRunStatus:e1},props:{runIndex:{type:String,default:""},jobIndex:{type:String,default:""},actionsURL:{type:String,default:""},locale:{type:Object,default:null}},data(){const{autoScroll:e,expandRunning:t}=c1();return{loadingAbortController:null,intervalID:null,currentJobStepsStates:[],artifacts:[],menuVisible:!1,isFullScreen:!1,timeVisible:{"log-time-stamp":!1,"log-time-seconds":!1},optionAlwaysAutoScroll:e??!1,optionAlwaysExpandRunning:t??!1,run:{link:"",title:"",titleHTML:"",status:"",canCancel:!1,canApprove:!1,canRerun:!1,canDeleteArtifact:!1,done:!1,workflowID:"",workflowLink:"",isSchedule:!1,jobs:[],commit:{localeCommit:"",localePushedBy:"",shortSHA:"",link:"",pusher:{displayName:"",link:""},branch:{name:"",link:"",isDeleted:!1}}},currentJob:{title:"",detail:"",steps:[]}}},watch:{optionAlwaysAutoScroll(){this.saveLocaleStorageOptions()},optionAlwaysExpandRunning(){this.saveLocaleStorageOptions()}},async mounted(){await this.loadJob(),this.intervalID=setInterval(()=>this.loadJob(),1e3),document.body.addEventListener("click",this.closeDropdown),this.hashChangeListener(),window.addEventListener("hashchange",this.hashChangeListener)},beforeUnmount(){document.body.removeEventListener("click",this.closeDropdown),window.removeEventListener("hashchange",this.hashChangeListener)},unmounted(){this.intervalID&&(clearInterval(this.intervalID),this.intervalID=null)},methods:{saveLocaleStorageOptions(){const e={autoScroll:this.optionAlwaysAutoScroll,expandRunning:this.optionAlwaysExpandRunning};localStorage.setItem("actions-view-options",JSON.stringify(e))},getJobStepLogsContainer(e){return this.$refs.logs[e]},getActiveLogsContainer(e){const t=this.getJobStepLogsContainer(e);return t._stepLogsActiveContainer??t},beginLogGroup(e,t,i,n){const s=this.$refs.logs[e],l=(0,C.tw)("summary",{class:"job-log-group-summary"},this.createLogLine(e,t,{index:i.index,timestamp:i.timestamp,message:i.message.substring(n.prefix.length)})),u=(0,C.tw)("div",{class:"job-log-list"}),m=(0,C.tw)("details",{class:"job-log-group"},l,u);s.append(m),s._stepLogsActiveContainer=u},endLogGroup(e,t,i,n){const s=this.$refs.logs[e];s._stepLogsActiveContainer=null,s.append(this.createLogLine(e,t,{index:i.index,timestamp:i.timestamp,message:i.message.substring(n.prefix.length)}))},toggleStepLogs(e){this.currentJobStepsStates[e].expanded=!this.currentJobStepsStates[e].expanded,this.currentJobStepsStates[e].expanded&&this.loadJobForce()},cancelRun(){(0,Ae.LO)(`${this.run.link}/cancel`)},approveRun(){(0,Ae.LO)(`${this.run.link}/approve`)},createLogLine(e,t,i){const n=(0,C.tw)("a",{class:"line-num muted",href:`#jobstep-${e}-${i.index}`},String(i.index)),s=(0,C.tw)("span",{class:"log-time-stamp"},(0,Li.Rt)(new Date(i.timestamp*1e3))),l=(0,C.tw)("span",{class:"log-msg"});l.innerHTML=s1(i.message);const u=Math.floor(i.timestamp-t),m=(0,C.tw)("span",{class:"log-time-seconds"},`${u}s`);return(0,C.oi)(s,this.timeVisible["log-time-stamp"]),(0,C.oi)(m,this.timeVisible["log-time-seconds"]),(0,C.tw)("div",{id:`jobstep-${e}-${i.index}`,class:"job-log-line"},n,s,l,m)},shouldAutoScroll(e){if(!this.optionAlwaysAutoScroll)return!1;const t=this.getJobStepLogsContainer(e);return t.lastChild?l1(t.lastChild):this.currentJobStepsStates[e].expanded},appendLogs(e,t,i){for(const n of i){const s=this.getActiveLogsContainer(e),l=a1(n);if(l?.name==="group"){this.beginLogGroup(e,t,n,l);continue}else if(l?.name==="endgroup"){this.endLogGroup(e,t,n,l);continue}s.append(this.createLogLine(e,t,n))}},async deleteArtifact(e){window.confirm(this.locale.confirmDeleteArtifact.replace("%s",e))&&(await(0,Ae.SJ)(`${this.run.link}/artifacts/${e}`),await this.loadJobForce())},async fetchJobData(e){const t=this.currentJobStepsStates.map((n,s)=>({step:s,cursor:n.cursor,expanded:n.expanded}));return await(await(0,Ae.LO)(`${this.actionsURL}/runs/${this.runIndex}/jobs/${this.jobIndex}`,{signal:e.signal,data:{logCursors:t}})).json()},async loadJobForce(){this.loadingAbortController?.abort(),this.loadingAbortController=null,await this.loadJob()},async loadJob(){if(this.loadingAbortController)return;const e=new AbortController;this.loadingAbortController=e;try{const t=!this.run.status,i=await this.fetchJobData(e);if(this.loadingAbortController!==e)return;this.artifacts=i.artifacts||[],this.run=i.state.run,this.currentJob=i.state.currentJob;for(let l=0;l<this.currentJob.steps.length;l++){const u=t&&this.optionAlwaysExpandRunning&&this.currentJob.steps[l].status==="running";this.currentJobStepsStates[l]||(this.currentJobStepsStates[l]={cursor:null,expanded:u})}const n=new Map;for(const l of i.logs.stepsLog??[])n.has(l.step)||n.set(l.step,this.shouldAutoScroll(l.step));for(const l of i.logs.stepsLog??[])this.currentJobStepsStates[l.step].cursor=l.cursor,this.appendLogs(l.step,l.started,l.lines);let s;for(let l=0;l<this.currentJob.steps.length;l++)n.get(l)&&(s=this.getJobStepLogsContainer(l));s?.lastElementChild.scrollIntoView({behavior:"smooth",block:"nearest"}),this.run.done&&this.intervalID&&(clearInterval(this.intervalID),this.intervalID=null)}catch(t){if(t instanceof TypeError||e.signal.aborted)return;throw t}finally{this.loadingAbortController===e&&(this.loadingAbortController=null)}},isDone(e){return["success","skipped","failure","cancelled"].includes(e)},isExpandable(e){return["success","running","failure","cancelled"].includes(e)},closeDropdown(){this.menuVisible&&(this.menuVisible=!1)},toggleTimeDisplay(e){this.timeVisible[`log-time-${e}`]=!this.timeVisible[`log-time-${e}`];for(const t of this.$refs.steps.querySelectorAll(`.log-time-${e}`))(0,C.oi)(t,this.timeVisible[`log-time-${e}`])},toggleFullScreen(){this.isFullScreen=!this.isFullScreen,(0,St._M)(".action-view-right",this.isFullScreen,".action-view-body")},async hashChangeListener(){const e=window.location.hash;if(!e)return;const[t,i,n]=e.split("-"),s=Number(i);if(!this.currentJobStepsStates[s])return;!this.currentJobStepsStates[s].expanded&&this.currentJobStepsStates[s].cursor===null&&(this.currentJobStepsStates[s].expanded=!0,await this.loadJob());const l=this.$refs.steps.querySelector(e);l&&l.querySelector(".line-num").click()}}}),d1=(0,Xi.A)(u1,[["render",Yw],["__scopeId","data-v-2d8f7d75"]]);function f1(){const e=document.querySelector("#repo-action-view");if(!e)return;const t=document.querySelector("body > div.full.height");t&&(t.style.paddingBottom="0"),Ai(d1,{runIndex:e.getAttribute("data-run-index"),jobIndex:e.getAttribute("data-job-index"),actionsURL:e.getAttribute("data-actions-url"),locale:{approve:e.getAttribute("data-locale-approve"),cancel:e.getAttribute("data-locale-cancel"),rerun:e.getAttribute("data-locale-rerun"),rerun_all:e.getAttribute("data-locale-rerun-all"),scheduled:e.getAttribute("data-locale-runs-scheduled"),commit:e.getAttribute("data-locale-runs-commit"),pushedBy:e.getAttribute("data-locale-runs-pushed-by"),artifactsTitle:e.getAttribute("data-locale-artifacts-title"),areYouSure:e.getAttribute("data-locale-are-you-sure"),artifactExpired:e.getAttribute("data-locale-artifact-expired"),confirmDeleteArtifact:e.getAttribute("data-locale-confirm-delete-artifact"),showTimeStamps:e.getAttribute("data-locale-show-timestamps"),showLogSeconds:e.getAttribute("data-locale-show-log-seconds"),showFullScreen:e.getAttribute("data-locale-show-full-screen"),downloadLogs:e.getAttribute("data-locale-download-logs"),status:{unknown:e.getAttribute("data-locale-status-unknown"),waiting:e.getAttribute("data-locale-status-waiting"),running:e.getAttribute("data-locale-status-running"),success:e.getAttribute("data-locale-status-success"),failure:e.getAttribute("data-locale-status-failure"),cancelled:e.getAttribute("data-locale-status-cancelled"),skipped:e.getAttribute("data-locale-status-skipped"),blocked:e.getAttribute("data-locale-status-blocked")},logsAlwaysAutoScroll:e.getAttribute("data-locale-logs-always-auto-scroll"),logsAlwaysExpandRunning:e.getAttribute("data-locale-logs-always-expand-running")}}).mount(e)}function h1(){const e=document.querySelector(".issue-checkbox-all");if(!e)return;const t=document.querySelectorAll(".issue-checkbox"),i=()=>{const n=Array.from(t).filter(A=>A.checked),s=!!n.length;s&&n.length===t.length?(e.checked=!0,e.indeterminate=!1):s?(e.checked=!1,e.indeterminate=!0):(e.checked=!1,e.indeterminate=!1),(0,C.oi)("#issue-filters",!s),(0,C.oi)("#issue-actions",s);const u=document.querySelectorAll("#issue-filters, #issue-actions");Array.from(u).find(A=>!(0,C.WP)(A)).querySelector(".issue-list-toolbar-left").prepend(e)};for(const n of t)n.addEventListener("change",i);e.addEventListener("change",()=>{for(const n of t)n.checked=e.checked;i()}),(0,C.jB)(document,".issue-action",n=>n.addEventListener("click",async s=>{s.preventDefault();const l=n.getAttribute("data-url");let u=n.getAttribute("data-action"),m=n.getAttribute("data-element-id");const y=[];for(const L of document.querySelectorAll(".issue-checkbox:checked"))y.push(L.getAttribute("data-issue-id"));const A=y.join(",");if(A){if(m==="0"&&l.endsWith("/assignee")&&(m="",u="clear"),u==="toggle"&&s.altKey&&(u="toggle-alt"),u==="delete"){const L=n.getAttribute("data-action-delete-confirm");if(!await Wu({content:L,confirmButtonColor:"red"}))return}try{await ep(l,u,A,m),window.location.reload()}catch(L){gt(L.responseJSON?.error??L.message)}}}))}function Yh(e){let t=e.getAttribute("data-search-url");const i=e.getAttribute("data-action-jump-url");let n=e.getAttribute("data-selected-username")||"";const s=(0,ke.mD)(e),l=e.querySelector(".menu"),u=e.querySelector(".ui.search input"),m=e.querySelector(".menu > .item-from-input");s.dropdown("setting",{fullTextSearch:!0,selectOnKeydown:!1,action:(_e,pe)=>{window.location.href=i.replace("{username}",encodeURIComponent(pe))}});const y=_e=>{(0,C.jB)(l,".item.active, .item.selected",pe=>pe.classList.remove("active","selected")),l.querySelector(`.item[data-value="${CSS.escape(_e)}"]`)?.classList.add("selected")},A=[],L=()=>{const _e=u.value.trim();m.setAttribute("data-value",_e),m.textContent=_e;const pe=!A.length&&_e!=="";(0,C.oi)(m,pe),y(pe?_e:n)};u.value=n,t?(t.includes("?")||(t+="?"),s.dropdown("setting","apiSettings",{cache:!1,url:`${t}&q={query}`,onResponse(_e){A.length=0;for(const pe of _e.results){let de=`<img class="ui avatar tw-align-middle" src="${R(pe.avatar_link)}" aria-hidden="true" alt width="20" height="20"><span class="gt-ellipsis">${R(pe.username)}</span>`;pe.full_name&&(de+=`<span class="search-fullname tw-ml-2">${R(pe.full_name)}</span>`),n.toLowerCase()===pe.username.toLowerCase()&&(n=pe.username),A.push({value:pe.username,name:de})}return _e.results=A,_e}}),s.dropdown("setting","onShow",()=>s.dropdown("filter"," "))):u.addEventListener("input",L);const z={...s.dropdown("internal","setup")},X=s.dropdown("setting","templates");s.dropdown("internal","setup",z),z.menu=function(_e){for(const de of l.querySelectorAll(":scope > .dynamic-item"))de.remove();const pe=X.menu(_e,s.dropdown("setting","fields"),!0,s.dropdown("setting","className"));if(pe){const de=(0,St.a8)(pe,"text/html").querySelectorAll("body > div");for(const Le of de)Le.classList.add("dynamic-item");const Pe=document.createElement("div");Pe.classList.add("divider","dynamic-item"),l.append(Pe,...de)}s.dropdown("refresh"),setTimeout(()=>L(),0)}}function m1(){for(const e of document.querySelectorAll(".issue-card-unpin"))e.addEventListener("click",async t=>{const i=t.currentTarget,n=Number(i.getAttribute("data-issue-id"));(await(0,Ae.SJ)(i.getAttribute("data-unpin-url"))).ok&&(i._tippy.destroy(),i.closest(`div.issue-card[data-issue-id="${n}"]`).remove())})}async function p1(e){const t=e.item.getAttribute("data-move-url"),i=Number(e.item.getAttribute("data-issue-id"));await(0,Ae.LO)(t,{data:{id:i,position:e.newIndex+1}})}async function g1(){const e=document.querySelector("#issue-pins");e!==null&&e.hasAttribute("data-is-repo-admin")&&(m1(),!(e.children.length<2)&&vc(e,{group:"shared",onEnd:t=>{(async()=>await p1(t))()}}))}function v1(){document.querySelector(".page-content.repository.issue-list, .page-content.repository.milestone-issue-list")?(h1(),(0,C.jB)(document,".ui.dropdown.user-remote-search",e=>Yh(e)),g1()):document.querySelector(".page-content.dashboard.issues")&&(0,C.jB)(document,".ui.dropdown.user-remote-search",e=>Yh(e))}const{appSubUrl:b1}=window.config,_1=/^(\d+)$/,y1=/^#(\d+)$/,w1=/^([-.\w]+)\/([-.\w]+)#(\d+)$/;function S1(e,t){t=t.trim();let i="";if(e)_1.test(t)?i=`${e}/issues/${t}`:y1.test(t)&&(i=`${e}/issues/${t.substring(1)}`);else{const[n,s,l,u]=w1.exec(t)||[];s&&(i=`${b1}/${s}/${l}/issues/${u}`)}return i}function x1(){const e=document.querySelector("#issue-list-quick-goto");if(!e)return;const t=e.closest("form"),i=t.querySelector("input[name=q]"),n=e.getAttribute("data-repo-link");t.addEventListener("submit",l=>{let u=!(0,C.WP)(e);const m=(0,C.IU)(l);m!==t&&m!==i&&m!==e&&(u=!1),u&&(l.preventDefault(),window.location.href=e.getAttribute("data-issue-goto-link"))});const s=async()=>{const l=i.value;let u=S1(n,l);u&&(await(0,Ae.fG)(`${u}/info`)).status!==200&&(u=""),i.value===l&&((0,C.oi)(e,!!u),e.setAttribute("data-issue-goto-link",u))};i.addEventListener("input",(0,C.nm)(s)),s()}async function j1(){const e=document.querySelector("#repo-contributors-chart");if(!e)return;const{default:t}=await Promise.all([__webpack_require__.e("contributors-graph-code-frequency-graph-recent-commits-graph"),__webpack_require__.e("contributors-graph")]).then(__webpack_require__.bind(__webpack_require__,"./web_src/js/components/RepoContributors.vue"));try{Ai(t,{repoLink:e.getAttribute("data-repo-link"),repoDefaultBranchName:e.getAttribute("data-repo-default-branch-name"),locale:{filterLabel:e.getAttribute("data-locale-filter-label"),contributionType:{commits:e.getAttribute("data-locale-contribution-type-commits"),additions:e.getAttribute("data-locale-contribution-type-additions"),deletions:e.getAttribute("data-locale-contribution-type-deletions")},loadingTitle:e.getAttribute("data-locale-loading-title"),loadingTitleFailed:e.getAttribute("data-locale-loading-title-failed"),loadingInfo:e.getAttribute("data-locale-loading-info")}}).mount(e)}catch(i){console.error("RepoContributors failed to load",i),e.textContent=e.getAttribute("data-locale-component-failed-to-load")}}async function E1(){const e=document.querySelector("#repo-code-frequency-chart");if(!e)return;const{default:t}=await Promise.all([__webpack_require__.e("contributors-graph-code-frequency-graph-recent-commits-graph"),__webpack_require__.e("code-frequency-graph")]).then(__webpack_require__.bind(__webpack_require__,"./web_src/js/components/RepoCodeFrequency.vue"));try{Ai(t,{locale:{loadingTitle:e.getAttribute("data-locale-loading-title"),loadingTitleFailed:e.getAttribute("data-locale-loading-title-failed"),loadingInfo:e.getAttribute("data-locale-loading-info")}}).mount(e)}catch(i){console.error("RepoCodeFrequency failed to load",i),e.textContent=e.getAttribute("data-locale-component-failed-to-load")}}async function A1(){const e=document.querySelector("#repo-recent-commits-chart");if(!e)return;const{default:t}=await Promise.all([__webpack_require__.e("contributors-graph-code-frequency-graph-recent-commits-graph"),__webpack_require__.e("recent-commits-graph")]).then(__webpack_require__.bind(__webpack_require__,"./web_src/js/components/RepoRecentCommits.vue"));try{Ai(t,{locale:{loadingTitle:e.getAttribute("data-locale-loading-title"),loadingTitleFailed:e.getAttribute("data-locale-loading-title-failed"),loadingInfo:e.getAttribute("data-locale-loading-info")}}).mount(e)}catch(i){console.error("RepoRecentCommits failed to load",i),e.textContent=e.getAttribute("data-locale-component-failed-to-load")}}async function C1(e,t){t.classList.add("disabled");try{const n=await(await(0,Ae.fG)(t.getAttribute("data-fetch-url"))).json();(0,C.y9)(t),k1(e,n.tags),T1(e,n.branches,n.default_branch),(0,C.fi)(e.querySelectorAll(".branch-and-tag-detail"))}finally{t.classList.remove("disabled")}}function k1(e,t){const i=e.querySelector(".tag-area");(0,C.oi)(i.parentElement,t.length>0);for(const n of t)Jh(i,n.web_link,n.name)}function T1(e,t,i){const n=e.getAttribute("data-text-default-branch-tooltip"),s=e.querySelector(".branch-area");(0,C.oi)(s.parentElement,t.length>0);for(const l of t){const u=i===l.name?n:null;Jh(s,l.web_link,l.name,u)}}function Jh(e,t,i,n){const s=document.createElement("a");s.classList.add("muted","tw-px-1"),s.href=t,s.textContent=i,n&&(s.classList.add("tw-border","tw-border-secondary","tw-rounded"),s.setAttribute("data-tooltip-content",n)),e.append(s)}function L1(){for(const e of document.querySelectorAll(".branch-and-tag-area")){const t=e.querySelector(".load-branches-and-tags");t.addEventListener("click",()=>C1(e,t))}}function R1(){const e=document.querySelector("#repo-search-form");e&&e.addEventListener("change",t=>{t.preventDefault();const i=new URLSearchParams;for(const[n,s]of new FormData(e).entries())i.set(n,s.toString());t.target.name==="clear-filter"&&(i.delete("archived"),i.delete("fork"),i.delete("mirror"),i.delete("template"),i.delete("private")),i.delete("clear-filter"),window.location.search=i.toString()})}async function M1(){const e=document.querySelectorAll(".js-color-picker-input");if(e.length){await Promise.all([__webpack_require__.e("colorpicker").then(__webpack_require__.bind(__webpack_require__,"./node_modules/vanilla-colorful/hex-color-picker.js")),__webpack_require__.e("colorpicker").then(__webpack_require__.bind(__webpack_require__,"./web_src/css/features/colorpicker.css"))]);for(const t of e)D1(t)}}function Dc(e,t){e.style.color=/#[0-9a-f]{6}/i.test(t)?t:"transparent"}function Zh(e,t){e.setAttribute("color",t)}function D1(e){const t=e.querySelector("input"),i=document.createElement("div");i.classList.add("preview-square"),Dc(i,t.value),e.append(i);const n=document.createElement("hex-color-picker");n.addEventListener("color-changed",s=>{t.value=s.detail.value,t.focus(),Dc(i,s.detail.value)}),t.addEventListener("input",s=>{Dc(i,s.target.value),Zh(n,s.target.value)}),Ie(t,{trigger:"focus click",theme:"bare",hideOnClick:!0,content:n,placement:"bottom-start",interactive:!0,onShow(){Zh(n,t.value)}});for(const s of e.querySelectorAll(".precolors .color"))s.addEventListener("click",l=>{const u=l.target.getAttribute("data-color-hex");t.value=u,t.dispatchEvent(new Event("input",{bubbles:!0})),Dc(i,u)})}const{appSubUrl:O1}=window.config;async function q1(){const e=document.querySelector("#self-check-by-frontend");if(!e)return;const t=document.querySelector(".page-content.admin .admin-setting-content"),n=await(await(0,Ae.LO)(`${O1}/-/admin/self_check`,{data:new URLSearchParams({location_origin:window.location.origin,now:String(Date.now())})})).json();(0,C.oi)(e,!!n.problems?.length);for(const l of n.problems??[]){const u=document.createElement("div");u.classList.add("ui","warning","message"),u.textContent=l,e.append(u)}const s=!!t.querySelectorAll(".self-check-problem:not(.tw-hidden)").length;(0,C.oi)(t.querySelector(".self-check-no-problem"),!s)}function P1(){for(const e of document.querySelectorAll(".disable-setting"))e.addEventListener("change",t=>{document.querySelector(t.target.getAttribute("data-target")).classList.toggle("disabled",t.target.checked)})}const{appSubUrl:F1,i18n:I1}=window.config;function N1(e){const t=document.createElement("form"),i=document.createElement("input");t.method="post",t.action=`${F1}/-/fetch-redirect`,i.type="hidden",i.name="redirect",i.value=e,t.append(i),document.body.append(t),t.submit()}async function em(e,t,i){try{const n=await(0,Ae.Em)(t,i);if(n.status===200){let{redirect:s}=await n.json();s=s||e.getAttribute("data-redirect"),Ku(e),s?N1(s):window.location.reload();return}else if(n.status>=400&&n.status<500){const s=await n.json();s.errorMessage?gt(s.errorMessage,{useHtmlBody:s.renderFormat==="html"}):gt(`server error: ${n.status}`)}else gt(`server error: ${n.status}`)}catch(n){n.name!=="AbortError"&&(console.error("error when doRequest",n),gt(`${I1.network_error} ${n}`))}e.classList.remove("is-loading","loading-icon-2px")}async function H1(e,t){if(t.preventDefault(),e.classList.contains("is-loading"))return;e.classList.add("is-loading"),e.clientHeight<50&&e.classList.add("loading-icon-2px");const i=e.getAttribute("method")||"get",n=e.getAttribute("action"),s=new FormData(e),l=(0,C.IU)(t),[u,m]=[l?.getAttribute("name"),l?.getAttribute("value")];u&&s.append(u,m||"");let y=n;const A={method:i.toUpperCase(),body:null};if(i.toLowerCase()==="get"){const L=new URLSearchParams;for(const[X,_e]of s)L.append(X,_e.toString());const z=y.indexOf("?");z!==-1&&(y=y.slice(0,z)),y+=`?${L.toString()}`}else A.body=s;await em(e,y,A)}async function B1(e,t){t.preventDefault();const i=e.getAttribute("data-url"),n=async()=>{"disabled"in e&&(e.disabled=!0),await em(e,i,{method:e.getAttribute("data-link-action-method")||"POST"}),"disabled"in e&&(e.disabled=!1)},s=e.getAttribute("data-modal-confirm")||e.getAttribute("data-modal-confirm-content")||"";if(!s){await n();return}const l=e.classList.contains("red")||e.classList.contains("negative");await Wu({header:e.getAttribute("data-modal-confirm-header")||"",content:s,confirmButtonColor:l?"red":"primary"})&&await n()}function $1(){(0,C.ny)(document,"submit",".form-fetch-action",H1),(0,C.ny)(document,"click",".link-action",B1)}function U1(){(0,C.ny)(document,"keypress","div.ui.button, span.ui.button",(e,t)=>{(t.code==="Space"||t.code==="Enter")&&(t.preventDefault(),e.click())})}function V1(){for(const e of document.querySelectorAll(".delete-button"))e.addEventListener("click",t=>{t.preventDefault();const i=e.dataset,n=e.getAttribute("data-modal-id"),s=document.querySelector(`.delete.modal${n?`#${n}`:""}`),l=s.querySelector(".name");l&&(l.textContent=e.getAttribute("data-name"));for(const[u,m]of Object.entries(i))if(u.startsWith("data")){const y=s.querySelector(`.${u}`);y&&(y.textContent=m)}(0,ke.mD)(s).modal({closable:!1,onApprove:async()=>{if(e.getAttribute("data-type")==="form"){const y=e.getAttribute("data-form"),A=document.querySelector(y);if(!A)throw new Error(`no form named ${y} found`);A.submit()}const u=new FormData;for(const[y,A]of Object.entries(i))y.startsWith("data")&&u.append(y.slice(4),A),y==="id"&&u.append("id",A);const m=await(0,Ae.LO)(e.getAttribute("data-url"),{data:u});if(m.ok){const y=await m.json();window.location.href=y.redirect}}}).modal("show")})}function W1(e,t){t.preventDefault();const i=e.getAttribute("data-panel");e.classList.contains("toggle")?(0,C.oi)(i):(0,C.fi)(i)}function z1(e,t){t.preventDefault();let i=e.getAttribute("data-panel");if(i){(0,C.y9)(i);return}if(i=e.getAttribute("data-panel-closest"),i){(0,C.y9)(e.parentNode.closest(i));return}throw new Error("no panel to hide")}function K1(e,t,i){const n=(0,W.PT)(t),s=e[n];if(typeof s=="boolean")e[n]=i==="true";else if(typeof s=="number")e[n]=parseFloat(i);else if(typeof s=="string")e[n]=i;else if(s?.nodeName)e.setAttribute(t,i);else throw new Error(`cannot assign element property "${n}" by value "${i}"`)}function X1(e,t){t.preventDefault();const i=e.getAttribute("data-modal"),n=document.querySelector(i);if(!n)throw new Error("no modal for this action");const s="data-modal-";for(const l of e.attributes){if(!l.name.startsWith(s))continue;const u=l.name.substring(s.length),[m,y]=u.split("."),A=n.querySelector(`#${m}`)||n.querySelector(`[name=${m}]`)||n.querySelector(`.${m}`)||n.querySelector(`${m}`);if(!A){if(!window.config.runModeIsProd)throw new Error(`attr target "${u}" not found for modal`);continue}y?K1(A,y,l.value):A.matches("input, textarea")?A.value=l.value:A.textContent=l.value}(0,ke.mD)(n).modal("setting",{onApprove:()=>{if(n.querySelector(".form-fetch-action"))return!1}}).modal("show")}function G1(){(0,C.ny)(document,"click","form button.ui.cancel.button",(e,t)=>t.preventDefault()),(0,C.ny)(document,"click",".show-panel, .hide-panel, .show-modal",(e,t)=>{e.classList.contains("show-panel")?W1(e,t):e.classList.contains("hide-panel")?z1(e,t):e.classList.contains("show-modal")&&X1(e,t)})}function Q1(){s0(window.jQuery),document.querySelector(".page-content.user.signin")||zu("form:not(.ignore-dirty)")}function Y1(){document.addEventListener("keydown",e=>{if(e.key!=="Enter")return;(e.ctrlKey||e.metaKey)&&!e.altKey&&e.target.matches("textarea")?kc(e.target)&&e.preventDefault():e.target.matches("input")&&!e.target.closest("form")&&kc(e.target)&&e.preventDefault()})}function J1(){(0,C.jB)(document,".combo-markdown-editor:not(.custom-init)",e=>ma(e))}var Z1=Object.defineProperty,e5=(e,t,i)=>t in e?Z1(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i,t5=(e,t,i)=>e5(e,typeof t!="symbol"?t+"":t,i);class i5{constructor(){t5(this,"results",[])}recordCall(t,i){const n=performance.now();i(),this.results.push({name:t,dur:performance.now()-n})}printResults(){this.results=this.results.sort((t,i)=>i.dur-t.dur);for(let t=0;t<20&&t<this.results.length;t++)console.info(`performance trace: ${this.results[t].name} ${this.results[t].dur.toFixed(3)}`)}}function n5(e){const t=window.location.search.includes("_ui_performance_trace=1")?new i5:null;if(t)for(const i of e)t.recordCall(i.name,i);else for(const i of e)i();return t}const s5=["title"],r5={class:"item-content"},o5=["innerHTML"],a5={class:"gt-ellipsis tw-flex-1"},l5=["title"],c5={class:"item-content"},u5=["innerHTML"],d5={class:"gt-ellipsis tw-flex-1"},f5=["title"],h5={class:"item-content"},m5=["innerHTML"],p5={class:"gt-ellipsis tw-flex-1"},g5=["title"],v5={class:"item-toggle"},b5={class:"item-content"},_5=["innerHTML"],y5={class:"gt-ellipsis"},w5={key:4,class:"sub-items"};var S5=(0,c.pM)({__name:"ViewFileTreeItem",props:{item:{},navigateViewContent:{type:Function},loadChildren:{type:Function},selectedItem:{}},setup(e){const t=e,i=(0,Re.KR)(!1),n=(0,Re.KR)(t.item.children),s=(0,Re.KR)(!t.item.children),l=async()=>{if(s.value=!s.value,!s.value&&t.loadChildren){i.value=!0;try{n.value=await t.loadChildren(t.item.fullPath)}finally{i.value=!1}}},u=()=>{l(),t.navigateViewContent(t.item.fullPath)},m=()=>{t.navigateViewContent(t.item.fullPath)},y=()=>{location.href=t.item.submoduleUrl};return(A,L)=>{const z=(0,c.g2)("ViewFileTreeItem",!0);return(0,c.uX)(),(0,c.CE)(c.FK,null,[A.item.entryMode==="commit"?((0,c.uX)(),(0,c.CE)("div",{key:0,class:"tree-item type-submodule",title:A.item.entryName,onClick:Di(y,["stop"])},[(0,c.Q3)(" submodule "),(0,c.Lk)("div",r5,[(0,c.Q3)(" eslint-disable-next-line vue/no-v-html "),(0,c.Lk)("span",{class:"tw-contents",innerHTML:A.item.entryIcon},null,8,o5),(0,c.Lk)("span",a5,(0,W.v_)(A.item.entryName),1)])],8,s5)):A.item.entryMode==="symlink"?((0,c.uX)(),(0,c.CE)("div",{key:1,class:(0,W.C4)(["tree-item type-symlink",{selected:A.selectedItem===A.item.fullPath}]),title:A.item.entryName,onClick:Di(m,["stop"])},[(0,c.Q3)(" symlink "),(0,c.Lk)("div",c5,[(0,c.Q3)(" eslint-disable-next-line vue/no-v-html "),(0,c.Lk)("span",{class:"tw-contents",innerHTML:A.item.entryIcon},null,8,u5),(0,c.Lk)("span",d5,(0,W.v_)(A.item.entryName),1)])],10,l5)):A.item.entryMode!=="tree"?((0,c.uX)(),(0,c.CE)("div",{key:2,class:(0,W.C4)(["tree-item type-file",{selected:A.selectedItem===A.item.fullPath}]),title:A.item.entryName,onClick:Di(m,["stop"])},[(0,c.Q3)(" file "),(0,c.Lk)("div",h5,[(0,c.Q3)(" eslint-disable-next-line vue/no-v-html "),(0,c.Lk)("span",{class:"tw-contents",innerHTML:A.item.entryIcon},null,8,m5),(0,c.Lk)("span",p5,(0,W.v_)(A.item.entryName),1)])],10,f5)):((0,c.uX)(),(0,c.CE)("div",{key:3,class:(0,W.C4)(["tree-item type-directory",{selected:A.selectedItem===A.item.fullPath}]),title:A.item.entryName,onClick:Di(u,["stop"])},[(0,c.Q3)(" directory "),(0,c.Lk)("div",v5,[i.value?((0,c.uX)(),(0,c.Wv)((0,Re.R1)(Z.Ah),{key:0,name:"octicon-sync",class:"circular-spin"})):((0,c.uX)(),(0,c.Wv)((0,Re.R1)(Z.Ah),{key:1,name:s.value?"octicon-chevron-right":"octicon-chevron-down",onClick:Di(l,["stop"])},null,8,["name"]))]),(0,c.Lk)("div",b5,[(0,c.Q3)(" eslint-disable-next-line vue/no-v-html "),(0,c.Lk)("span",{class:"tw-contents",innerHTML:!s.value&&A.item.entryIconOpen?A.item.entryIconOpen:A.item.entryIcon},null,8,_5),(0,c.Lk)("span",y5,(0,W.v_)(A.item.entryName),1)])],10,g5)),n.value?.length?(0,c.bo)(((0,c.uX)(),(0,c.CE)("div",w5,[((0,c.uX)(!0),(0,c.CE)(c.FK,null,(0,c.pI)(n.value,X=>((0,c.uX)(),(0,c.Wv)(z,{key:X.entryName,item:X,"selected-item":A.selectedItem,"navigate-view-content":A.navigateViewContent,"load-children":A.loadChildren},null,8,["item","selected-item","navigate-view-content","load-children"]))),128))],512)),[[ti,!s.value]]):(0,c.Q3)("v-if",!0)],64)}}}),x5=(0,Xi.A)(S5,[["__scopeId","data-v-cbbebcae"]]),j5=(0,c.pM)({__name:"ViewFileTree",props:{repoLink:{type:String,required:!0},treePath:{type:String,required:!0},currentRefNameSubURL:{type:String,required:!0}},setup(e){const t=(0,Re.KR)(null),i=e,n=(0,Re.KR)([]),s=(0,Re.KR)("");async function l(y,A=""){const z=await(await(0,Ae.fG)(`${i.repoLink}/tree-view/${i.currentRefNameSubURL}/${(0,pr.ZP)(y)}?sub_path=${encodeURIComponent(A)}`)).json(),X=[];for(const[_e,pe]of Object.entries(z.renderedIconPool??{}))document.querySelector(`.global-svg-icon-pool #${_e}`)||X.push(pe);if(X.length){const _e=(0,C.SL)('<div class="global-svg-icon-pool tw-hidden"></div>');_e.innerHTML=X.join(""),document.body.append(_e)}return z.fileTreeNodes??null}async function u(y){y=y.includes("?")?y.replace("?","?only_content=true"):`${y}?only_content=true`;const A=await(0,Ae.fG)(y);document.querySelector(".repo-view-content").innerHTML=await A.text()}async function m(y){const A=`${i.repoLink}/src/${i.currentRefNameSubURL}/${(0,pr.ZP)(y)}`;window.history.pushState({treePath:y,url:A},null,A),s.value=y,await u(A)}return(0,c.sV)(async()=>{s.value=i.treePath,n.value=await l("",i.treePath),t.value.closest(".is-loading")?.classList?.remove("is-loading"),window.addEventListener("popstate",y=>{s.value=y.state?.treePath||"",y.state?.url&&u(y.state.url)})}),(y,A)=>((0,c.uX)(),(0,c.CE)("div",{class:"view-file-tree-items",ref_key:"elRoot",ref:t},[(0,c.Q3)(" only render the tree if we're visible. in many cases this is something that doesn't change very often "),((0,c.uX)(!0),(0,c.CE)(c.FK,null,(0,c.pI)(n.value,L=>((0,c.uX)(),(0,c.Wv)(x5,{key:L.name,item:L,"selected-item":s.value,"navigate-view-content":m,"load-children":l},null,8,["item","selected-item"]))),128))],512))}}),E5=(0,Xi.A)(j5,[["__scopeId","data-v-20c25596"]]);const{appSubUrl:A5}=window.config;async function C5(e){const t=document.querySelector(".repo-view-file-tree-toggle-show"),i=document.querySelector(".repo-view-file-tree-container"),n=e.getAttribute("data-toggle-action")==="show";(0,C.oi)(i,n),(0,C.oi)(t,!n),i.hasAttribute("data-user-is-signed-in")&&await(0,Ae.LO)(`${A5}/user/settings/update_preferences`,{data:{codeViewShowFileTree:n}})}async function k5(){const e=document.querySelector(".repo-view-file-tree-container"),t=document.querySelector(".repo-view-content");if(!e||!t)return;_c("click","onRepoViewFileTreeToggle",C5);const i=e.querySelector("#view-file-tree");Ai(E5,{repoLink:i.getAttribute("data-repo-link"),treePath:i.getAttribute("data-tree-path"),currentRefNameSubURL:i.getAttribute("data-current-ref-name-sub-url")}).mount(i)}Pb(),(0,C.Gz)(),(0,C.Pm)(()=>{const e=performance.now(),t=n5([Yp,Gp,Qp,$1,Ot,U1,G1,ui,Y1,Q1,J1,V1,Zp,yb,x1,db,pb,fb,Kp,Xp,jl,gm,Ld,pp,Up,J0,Ep,cp,Mp,ew,z0,dp,hp,q1,Pi,_p,Kd,Zv,Qm,Gm,gb,Y0,Jy,$0,L1,a0,he,tf,v1,k0,A0,ip,ev,lp,R0,D0,ob,ab,V0,k5,Ib,Zy,f1,R1,j1,E1,A1,U0,tw,tg,ig,eb,sb,Z0,Gv,Vp,M1,P1]);$p(t),t&&t.printResults();const i=performance.now()-e;i>500&&console.error(`slow init functions took ${i.toFixed(3)}ms`)})}(),function(){"use strict"}(),function(){"use strict"}(),function(){"use strict"}()})();
DesignScreenshot/output/git.buildapp.eu.org_run/git.buildapp.eu.org_4_after_login.html:231:`)}function j(qe){if(Ke(qe)){const bt={};for(let Rt=0;Rt<qe.length;Rt++){const Yt=qe[Rt],Ui=W(Yt)?De(Yt):j(Yt);if(Ui)for(const Bi in Ui)bt[Bi]=Ui[Bi]}return bt}else if(W(qe)||tt(qe))return qe}const H=/;(?![^(]*\))/g,ge=/:([^]+)/,me=/\/\*[^]*?\*\//g;function De(qe){const bt={};return qe.replace(me,"").split(H).forEach(Rt=>{if(Rt){const Yt=Rt.split(ge);Yt.length>1&&(bt[Yt[0].trim()]=Yt[1].trim())}}),bt}function ht(qe){if(!qe)return"";if(W(qe))return qe;let bt="";for(const Rt in qe){const Yt=qe[Rt];if(W(Yt)||typeof Yt=="number"){const Ui=Rt.startsWith("--")?Rt:Y(Rt);bt+=`${Ui}:${Yt};`}}return bt}function rt(qe){let bt="";if(W(qe))bt=qe;else if(Ke(qe))for(let Rt=0;Rt<qe.length;Rt++){const Yt=rt(qe[Rt]);Yt&&(bt+=Yt+" ")}else if(tt(qe))for(const Rt in qe)qe[Rt]&&(bt+=Rt+" ");return bt.trim()}function zt(qe){if(!qe)return null;let{class:bt,style:Rt}=qe;return bt&&!W(bt)&&(qe.class=rt(bt)),Rt&&(qe.style=j(Rt)),qe}const fi="html,body,base,head,link,meta,style,title,address,article,aside,footer,header,hgroup,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot",vi="svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,feDistantLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,text,textPath,title,tspan,unknown,use,view",nn="annotation,annotation-xml,maction,maligngroup,malignmark,math,menclose,merror,mfenced,mfrac,mfraction,mglyph,mi,mlabeledtr,mlongdiv,mmultiscripts,mn,mo,mover,mpadded,mphantom,mprescripts,mroot,mrow,ms,mscarries,mscarry,msgroup,msline,mspace,msqrt,msrow,mstack,mstyle,msub,msubsup,msup,mtable,mtd,mtext,mtr,munder,munderover,none,semantics",on="area,base,br,col,embed,hr,img,input,link,meta,param,source,track,wbr",an=null,bn=null,ln=null,Yi=null,Fn="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",vr=_(Fn),Ln=_(Fn+",async,autofocus,autoplay,controls,default,defer,disabled,hidden,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected");function Gs(qe){return!!qe||qe===""}const js=/[>/="'\u0009\u000a\u000c\u0020]/,os={};function Es(qe){if(os.hasOwnProperty(qe))return os[qe];const bt=js.test(qe);return bt&&console.error(`unsafe attribute name: ${qe}`),os[qe]=!bt}const qs={acceptCharset:"accept-charset",className:"class",htmlFor:"for",httpEquiv:"http-equiv"},As=null,Ys=null,On=null;function Tn(qe){if(qe==null)return!1;const bt=typeof qe;return bt==="string"||bt==="number"||bt==="boolean"}const jn=/["'&<>]/;function hn(qe){const bt=""+qe,Rt=jn.exec(bt);if(!Rt)return bt;let Yt="",Ui,Bi,An=0;for(Bi=Rt.index;Bi<bt.length;Bi++){switch(bt.charCodeAt(Bi)){case 34:Ui="&quot;";break;case 38:Ui="&amp;";break;case 39:Ui="&#39;";break;case 60:Ui="&lt;";break;case 62:Ui="&gt;";break;default:continue}An!==Bi&&(Yt+=bt.slice(An,Bi)),An=Bi+1,Yt+=Ui}return An!==Bi?Yt+bt.slice(An,Bi):Yt}const Ji=/^-?>|<!--|-->|--!>|<!-$/g;function sn(qe){return qe.replace(Ji,"")}const mn=/[ !"#$%&'()*+,./:;<=>?@[\\\]^`{|}~]/g;function mi(qe,bt){return qe.replace(mn,Rt=>bt?Rt==='"'?'\\\\\\"':`\\\\${Rt}`:`\\${Rt}`)}function Js(qe,bt){if(qe.length!==bt.length)return!1;let Rt=!0;for(let Yt=0;Rt&&Yt<qe.length;Yt++)Rt=Ri(qe[Yt],bt[Yt]);return Rt}function Ri(qe,bt){if(qe===bt)return!0;let Rt=q(qe),Yt=q(bt);if(Rt||Yt)return Rt&&Yt?qe.getTime()===bt.getTime():!1;if(Rt=Re(qe),Yt=Re(bt),Rt||Yt)return qe===bt;if(Rt=Ke(qe),Yt=Ke(bt),Rt||Yt)return Rt&&Yt?Js(qe,bt):!1;if(Rt=tt(qe),Yt=tt(bt),Rt||Yt){if(!Rt||!Yt)return!1;const Ui=Object.keys(qe).length,Bi=Object.keys(bt).length;if(Ui!==Bi)return!1;for(const An in qe){const cn=qe.hasOwnProperty(An),pn=bt.hasOwnProperty(An);if(cn&&!pn||!cn&&pn||!Ri(qe[An],bt[An]))return!1}}return String(qe)===String(bt)}function Rr(qe,bt){return qe.findIndex(Rt=>Ri(Rt,bt))}const En=qe=>!!(qe&&qe.__v_isRef===!0),Mr=qe=>W(qe)?qe:qe==null?"":Ke(qe)||tt(qe)&&(qe.toString===et||!c(qe.toString))?En(qe)?Mr(qe.value):JSON.stringify(qe,Ps,2):String(qe),Ps=(qe,bt)=>En(bt)?Ps(qe,bt.value):At(bt)?{[`Map(${bt.size})`]:[...bt.entries()].reduce((Rt,[Yt,Ui],Bi)=>(Rt[br(Yt,Bi)+" =>"]=Ui,Rt),{})}:gt(bt)?{[`Set(${bt.size})`]:[...bt.values()].map(Rt=>br(Rt))}:Re(bt)?br(bt):tt(bt)&&!Ke(bt)&&!si(bt)?String(bt):bt,br=(qe,bt="")=>{var Rt;return Re(qe)?`Symbol(${(Rt=qe.description)!=null?Rt:bt})`:qe}},"./node_modules/balanced-match/index.js":function(r){"use strict";r.exports=v;function v(g,O,R){g instanceof RegExp&&(g=b(g,R)),O instanceof RegExp&&(O=b(O,R));var J=_(g,O,R);return J&&{start:J[0],end:J[1],pre:R.slice(0,J[0]),body:R.slice(J[0]+g.length,J[1]),post:R.slice(J[1]+O.length)}}function b(g,O){var R=O.match(g);return R?R[0]:null}v.range=_;function _(g,O,R){var J,Z,C,we,Be,Ue=R.indexOf(g),Q=R.indexOf(O,Ue+1),Ke=Ue;if(Ue>=0&&Q>0){if(g===O)return[Ue,Q];for(J=[],C=R.length;Ke>=0&&!Be;)Ke==Ue?(J.push(Ke),Ue=R.indexOf(g,Ke+1)):J.length==1?Be=[J.pop(),Q]:(Z=J.pop(),Z<C&&(C=Z,we=Q),Q=R.indexOf(O,Ke+1)),Ke=Ue<Q&&Ue>=0?Ue:Q;J.length&&(Be=[C,we])}return Be}},"./node_modules/brace-expansion/index.js":function(r,v,b){var _=b("./node_modules/balanced-match/index.js");r.exports=Q;var g="\0SLASH"+Math.random()+"\0",O="\0OPEN"+Math.random()+"\0",R="\0CLOSE"+Math.random()+"\0",J="\0COMMA"+Math.random()+"\0",Z="\0PERIOD"+Math.random()+"\0";function C(c){return parseInt(c,10)==c?parseInt(c,10):c.charCodeAt(0)}function we(c){return c.split("\\\\").join(g).split("\\{").join(O).split("\\}").join(R).split("\\,").join(J).split("\\.").join(Z)}function Be(c){return c.split(g).join("\\").split(O).join("{").split(R).join("}").split(J).join(",").split(Z).join(".")}function Ue(c){if(!c)return[""];var W=[],Re=_("{","}",c);if(!Re)return c.split(",");var tt=Re.pre,st=Re.body,et=Re.post,je=tt.split(",");je[je.length-1]+="{"+st+"}";var S=Ue(et);return et.length&&(je[je.length-1]+=S.shift(),je.push.apply(je,S)),W.push.apply(W,je),W}function Q(c){return c?(c.substr(0,2)==="{}"&&(c="\\{\\}"+c.substr(2)),ne(we(c),!0).map(Be)):[]}function Ke(c){return"{"+c+"}"}function At(c){return/^-?0\d/.test(c)}function gt(c,W){return c<=W}function q(c,W){return c>=W}function ne(c,W){var Re=[],tt=_("{","}",c);if(!tt)return[c];var st=tt.pre,et=tt.post.length?ne(tt.post,!1):[""];if(/\$$/.test(tt.pre))for(var je=0;je<et.length;je++){var S=st+"{"+tt.body+"}"+et[je];Re.push(S)}else{var si=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(tt.body),ct=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(tt.body),xt=si||ct,ce=tt.body.indexOf(",")>=0;if(!xt&&!ce)return tt.post.match(/,.*\}/)?(c=tt.pre+"{"+tt.body+R+tt.post,ne(c)):[c];var G;if(xt)G=tt.body.split(/\.\./);else if(G=Ue(tt.body),G.length===1&&(G=ne(G[0],!1).map(Ke),G.length===1))return et.map(function(te){return tt.pre+G[0]+te});var P;if(xt){var k=C(G[0]),N=C(G[1]),Y=Math.max(G[0].length,G[1].length),ve=G.length==3?Math.abs(C(G[2])):1,Oe=gt,Ne=N<k;Ne&&(ve*=-1,Oe=q);var Ve=G.some(At);P=[];for(var Ye=k;Oe(Ye,N);Ye+=ve){var Lt;if(ct)Lt=String.fromCharCode(Ye),Lt==="\\"&&(Lt="");else if(Lt=String(Ye),Ve){var K=Y-Lt.length;if(K>0){var Ee=new Array(K+1).join("0");Ye<0?Lt="-"+Ee+Lt.slice(1):Lt=Ee+Lt}}P.push(Lt)}}else{P=[];for(var nt=0;nt<G.length;nt++)P.push.apply(P,ne(G[nt],!1))}for(var nt=0;nt<P.length;nt++)for(var je=0;je<et.length;je++){var S=st+P[nt]+et[je];(!W||xt||S)&&Re.push(S)}}return Re}},"./node_modules/dayjs/dayjs.min.js":function(r){(function(v,b){r.exports=b()})(this,function(){"use strict";var v=1e3,b=6e4,_=36e5,g="millisecond",O="second",R="minute",J="hour",Z="day",C="week",we="month",Be="quarter",Ue="year",Q="date",Ke="Invalid Date",At=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,gt=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,q={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(xt){var ce=["th","st","nd","rd"],G=xt%100;return"["+xt+(ce[(G-20)%10]||ce[G]||ce[0])+"]"}},ne=function(xt,ce,G){var P=String(xt);return!P||P.length>=ce?xt:""+Array(ce+1-P.length).join(G)+xt},c={s:ne,z:function(xt){var ce=-xt.utcOffset(),G=Math.abs(ce),P=Math.floor(G/60),k=G%60;return(ce<=0?"+":"-")+ne(P,2,"0")+":"+ne(k,2,"0")},m:function xt(ce,G){if(ce.date()<G.date())return-xt(G,ce);var P=12*(G.year()-ce.year())+(G.month()-ce.month()),k=ce.clone().add(P,we),N=G-k<0,Y=ce.clone().add(P+(N?-1:1),we);return+(-(P+(G-k)/(N?k-Y:Y-k))||0)},a:function(xt){return xt<0?Math.ceil(xt)||0:Math.floor(xt)},p:function(xt){return{M:we,y:Ue,w:C,d:Z,D:Q,h:J,m:R,s:O,ms:g,Q:Be}[xt]||String(xt||"").toLowerCase().replace(/s$/,"")},u:function(xt){return xt===void 0}},W="en",Re={};Re[W]=q;var tt="$isDayjsObject",st=function(xt){return xt instanceof si||!(!xt||!xt[tt])},et=function xt(ce,G,P){var k;if(!ce)return W;if(typeof ce=="string"){var N=ce.toLowerCase();Re[N]&&(k=N),G&&(Re[N]=G,k=N);var Y=ce.split("-");if(!k&&Y.length>1)return xt(Y[0])}else{var ve=ce.name;Re[ve]=ce,k=ve}return!P&&k&&(W=k),k||!P&&W},je=function(xt,ce){if(st(xt))return xt.clone();var G=typeof ce=="object"?ce:{};return G.date=xt,G.args=arguments,new si(G)},S=c;S.l=et,S.i=st,S.w=function(xt,ce){return je(xt,{locale:ce.$L,utc:ce.$u,x:ce.$x,$offset:ce.$offset})};var si=function(){function xt(G){this.$L=et(G.locale,null,!0),this.parse(G),this.$x=this.$x||G.x||{},this[tt]=!0}var ce=xt.prototype;return ce.parse=function(G){this.$d=function(P){var k=P.date,N=P.utc;if(k===null)return new Date(NaN);if(S.u(k))return new Date;if(k instanceof Date)return new Date(k);if(typeof k=="string"&&!/Z$/i.test(k)){var Y=k.match(At);if(Y){var ve=Y[2]-1||0,Oe=(Y[7]||"0").substring(0,3);return N?new Date(Date.UTC(Y[1],ve,Y[3]||1,Y[4]||0,Y[5]||0,Y[6]||0,Oe)):new Date(Y[1],ve,Y[3]||1,Y[4]||0,Y[5]||0,Y[6]||0,Oe)}}return new Date(k)}(G),this.init()},ce.init=function(){var G=this.$d;this.$y=G.getFullYear(),this.$M=G.getMonth(),this.$D=G.getDate(),this.$W=G.getDay(),this.$H=G.getHours(),this.$m=G.getMinutes(),this.$s=G.getSeconds(),this.$ms=G.getMilliseconds()},ce.$utils=function(){return S},ce.isValid=function(){return this.$d.toString()!==Ke},ce.isSame=function(G,P){var k=je(G);return this.startOf(P)<=k&&k<=this.endOf(P)},ce.isAfter=function(G,P){return je(G)<this.startOf(P)},ce.isBefore=function(G,P){return this.endOf(P)<je(G)},ce.$g=function(G,P,k){return S.u(G)?this[P]:this.set(k,G)},ce.unix=function(){return Math.floor(this.valueOf()/1e3)},ce.valueOf=function(){return this.$d.getTime()},ce.startOf=function(G,P){var k=this,N=!!S.u(P)||P,Y=S.p(G),ve=function(nt,te){var ee=S.w(k.$u?Date.UTC(k.$y,te,nt):new Date(k.$y,te,nt),k);return N?ee:ee.endOf(Z)},Oe=function(nt,te){return S.w(k.toDate()[nt].apply(k.toDate("s"),(N?[0,0,0,0]:[23,59,59,999]).slice(te)),k)},Ne=this.$W,Ve=this.$M,Ye=this.$D,Lt="set"+(this.$u?"UTC":"");switch(Y){case Ue:return N?ve(1,0):ve(31,11);case we:return N?ve(1,Ve):ve(0,Ve+1);case C:var K=this.$locale().weekStart||0,Ee=(Ne<K?Ne+7:Ne)-K;return ve(N?Ye-Ee:Ye+(6-Ee),Ve);case Z:case Q:return Oe(Lt+"Hours",0);case J:return Oe(Lt+"Minutes",1);case R:return Oe(Lt+"Seconds",2);case O:return Oe(Lt+"Milliseconds",3);default:return this.clone()}},ce.endOf=function(G){return this.startOf(G,!1)},ce.$set=function(G,P){var k,N=S.p(G),Y="set"+(this.$u?"UTC":""),ve=(k={},k[Z]=Y+"Date",k[Q]=Y+"Date",k[we]=Y+"Month",k[Ue]=Y+"FullYear",k[J]=Y+"Hours",k[R]=Y+"Minutes",k[O]=Y+"Seconds",k[g]=Y+"Milliseconds",k)[N],Oe=N===Z?this.$D+(P-this.$W):P;if(N===we||N===Ue){var Ne=this.clone().set(Q,1);Ne.$d[ve](Oe),Ne.init(),this.$d=Ne.set(Q,Math.min(this.$D,Ne.daysInMonth())).$d}else ve&&this.$d[ve](Oe);return this.init(),this},ce.set=function(G,P){return this.clone().$set(G,P)},ce.get=function(G){return this[S.p(G)]()},ce.add=function(G,P){var k,N=this;G=Number(G);var Y=S.p(P),ve=function(Ve){var Ye=je(N);return S.w(Ye.date(Ye.date()+Math.round(Ve*G)),N)};if(Y===we)return this.set(we,this.$M+G);if(Y===Ue)return this.set(Ue,this.$y+G);if(Y===Z)return ve(1);if(Y===C)return ve(7);var Oe=(k={},k[R]=b,k[J]=_,k[O]=v,k)[Y]||1,Ne=this.$d.getTime()+G*Oe;return S.w(Ne,this)},ce.subtract=function(G,P){return this.add(-1*G,P)},ce.format=function(G){var P=this,k=this.$locale();if(!this.isValid())return k.invalidDate||Ke;var N=G||"YYYY-MM-DDTHH:mm:ssZ",Y=S.z(this),ve=this.$H,Oe=this.$m,Ne=this.$M,Ve=k.weekdays,Ye=k.months,Lt=k.meridiem,K=function(te,ee,oe,Ge){return te&&(te[ee]||te(P,N))||oe[ee].slice(0,Ge)},Ee=function(te){return S.s(ve%12||12,te,"0")},nt=Lt||function(te,ee,oe){var Ge=te<12?"AM":"PM";return oe?Ge.toLowerCase():Ge};return N.replace(gt,function(te,ee){return ee||function(oe){switch(oe){case"YY":return String(P.$y).slice(-2);case"YYYY":return S.s(P.$y,4,"0");case"M":return Ne+1;case"MM":return S.s(Ne+1,2,"0");case"MMM":return K(k.monthsShort,Ne,Ye,3);case"MMMM":return K(Ye,Ne);case"D":return P.$D;case"DD":return S.s(P.$D,2,"0");case"d":return String(P.$W);case"dd":return K(k.weekdaysMin,P.$W,Ve,2);case"ddd":return K(k.weekdaysShort,P.$W,Ve,3);case"dddd":return Ve[P.$W];case"H":return String(ve);case"HH":return S.s(ve,2,"0");case"h":return Ee(1);case"hh":return Ee(2);case"a":return nt(ve,Oe,!0);case"A":return nt(ve,Oe,!1);case"m":return String(Oe);case"mm":return S.s(Oe,2,"0");case"s":return String(P.$s);case"ss":return S.s(P.$s,2,"0");case"SSS":return S.s(P.$ms,3,"0");case"Z":return Y}return null}(te)||Y.replace(":","")})},ce.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},ce.diff=function(G,P,k){var N,Y=this,ve=S.p(P),Oe=je(G),Ne=(Oe.utcOffset()-this.utcOffset())*b,Ve=this-Oe,Ye=function(){return S.m(Y,Oe)};switch(ve){case Ue:N=Ye()/12;break;case we:N=Ye();break;case Be:N=Ye()/3;break;case C:N=(Ve-Ne)/6048e5;break;case Z:N=(Ve-Ne)/864e5;break;case J:N=Ve/_;break;case R:N=Ve/b;break;case O:N=Ve/v;break;default:N=Ve}return k?N:S.a(N)},ce.daysInMonth=function(){return this.endOf(we).$D},ce.$locale=function(){return Re[this.$L]},ce.locale=function(G,P){if(!G)return this.$L;var k=this.clone(),N=et(G,P,!0);return N&&(k.$L=N),k},ce.clone=function(){return S.w(this.$d,this)},ce.toDate=function(){return new Date(this.valueOf())},ce.toJSON=function(){return this.isValid()?this.toISOString():null},ce.toISOString=function(){return this.$d.toISOString()},ce.toString=function(){return this.$d.toUTCString()},xt}(),ct=si.prototype;return je.prototype=ct,[["$ms",g],["$s",O],["$m",R],["$H",J],["$W",Z],["$M",we],["$y",Ue],["$D",Q]].forEach(function(xt){ct[xt[1]]=function(ce){return this.$g(ce,xt[0],xt[1])}}),je.extend=function(xt,ce){return xt.$i||(xt(ce,si,je),xt.$i=!0),je},je.locale=et,je.isDayjs=st,je.unix=function(xt){return je(1e3*xt)},je.en=Re[W],je.Ls=Re,je.p={},je})},"./node_modules/dayjs/plugin/utc.js":function(r){(function(v,b){r.exports=b()})(this,function(){"use strict";var v="minute",b=/[+-]\d\d(?::?\d\d)?/g,_=/([+-]|\d\d)/g;return function(g,O,R){var J=O.prototype;R.utc=function(Ke){var At={date:Ke,utc:!0,args:arguments};return new O(At)},J.utc=function(Ke){var At=R(this.toDate(),{locale:this.$L,utc:!0});return Ke?At.add(this.utcOffset(),v):At},J.local=function(){return R(this.toDate(),{locale:this.$L,utc:!1})};var Z=J.parse;J.parse=function(Ke){Ke.utc&&(this.$u=!0),this.$utils().u(Ke.$offset)||(this.$offset=Ke.$offset),Z.call(this,Ke)};var C=J.init;J.init=function(){if(this.$u){var Ke=this.$d;this.$y=Ke.getUTCFullYear(),this.$M=Ke.getUTCMonth(),this.$D=Ke.getUTCDate(),this.$W=Ke.getUTCDay(),this.$H=Ke.getUTCHours(),this.$m=Ke.getUTCMinutes(),this.$s=Ke.getUTCSeconds(),this.$ms=Ke.getUTCMilliseconds()}else C.call(this)};var we=J.utcOffset;J.utcOffset=function(Ke,At){var gt=this.$utils().u;if(gt(Ke))return this.$u?0:gt(this.$offset)?we.call(this):this.$offset;if(typeof Ke=="string"&&(Ke=function(W){W===void 0&&(W="");var Re=W.match(b);if(!Re)return null;var tt=(""+Re[0]).match(_)||["-",0,0],st=tt[0],et=60*+tt[1]+ +tt[2];return et===0?0:st==="+"?et:-et}(Ke),Ke===null))return this;var q=Math.abs(Ke)<=16?60*Ke:Ke,ne=this;if(At)return ne.$offset=q,ne.$u=Ke===0,ne;if(Ke!==0){var c=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(ne=this.local().add(q+c,v)).$offset=q,ne.$x.$localOffset=c}else ne=this.utc();return ne};var Be=J.format;J.format=function(Ke){var At=Ke||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return Be.call(this,At)},J.valueOf=function(){var Ke=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*Ke},J.isUTC=function(){return!!this.$u},J.toISOString=function(){return this.toDate().toISOString()},J.toString=function(){return this.toDate().toUTCString()};var Ue=J.toDate;J.toDate=function(Ke){return Ke==="s"&&this.$offset?R(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():Ue.call(this)};var Q=J.diff;J.diff=function(Ke,At,gt){if(Ke&&this.$u===Ke.$u)return Q.call(this,Ke,At,gt);var q=this.local(),ne=R(Ke).local();return Q.call(q,ne,At,gt)}}})},"./node_modules/htmx.org/dist/htmx.esm.js":function(__unused_webpack_module,__webpack_exports__){"use strict";var htmx=function(){"use strict";const htmx={onLoad:null,process:null,on:null,off:null,trigger:null,ajax:null,find:null,findAll:null,closest:null,values:function(r,v){return getInputValues(r,v||"post").values},remove:null,addClass:null,removeClass:null,toggleClass:null,takeClass:null,swap:null,defineExtension:null,removeExtension:null,logAll:null,logNone:null,logger:null,config:{historyEnabled:!0,historyCacheSize:10,refreshOnHistoryMiss:!1,defaultSwapStyle:"innerHTML",defaultSwapDelay:0,defaultSettleDelay:20,includeIndicatorStyles:!0,indicatorClass:"htmx-indicator",requestClass:"htmx-request",addedClass:"htmx-added",settlingClass:"htmx-settling",swappingClass:"htmx-swapping",allowEval:!0,allowScriptTags:!0,inlineScriptNonce:"",inlineStyleNonce:"",attributesToSettle:["class","style","width","height"],withCredentials:!1,timeout:0,wsReconnectDelay:"full-jitter",wsBinaryType:"blob",disableSelector:"[hx-disable], [data-hx-disable]",scrollBehavior:"instant",defaultFocusScroll:!1,getCacheBusterParam:!1,globalViewTransitions:!1,methodsThatUseUrlParams:["get","delete"],selfRequestsOnly:!0,ignoreTitle:!1,scrollIntoViewOnBoost:!0,triggerSpecsCache:null,disableInheritance:!1,responseHandling:[{code:"204",swap:!1},{code:"[23]..",swap:!0},{code:"[45]..",swap:!1,error:!0}],allowNestedOobSwaps:!0},parseInterval:null,_:null,version:"2.0.4"};htmx.onLoad=onLoadHelper,htmx.process=processNode,htmx.on=addEventListenerImpl,htmx.off=removeEventListenerImpl,htmx.trigger=triggerEvent,htmx.ajax=ajaxHelper,htmx.find=find,htmx.findAll=findAll,htmx.closest=closest,htmx.remove=removeElement,htmx.addClass=addClassToElement,htmx.removeClass=removeClassFromElement,htmx.toggleClass=toggleClassOnElement,htmx.takeClass=takeClassForElement,htmx.swap=swap,htmx.defineExtension=defineExtension,htmx.removeExtension=removeExtension,htmx.logAll=logAll,htmx.logNone=logNone,htmx.parseInterval=parseInterval,htmx._=internalEval;const internalAPI={addTriggerHandler,bodyContains,canAccessLocalStorage,findThisElement,filterValues,swap,hasAttribute,getAttributeValue,getClosestAttributeValue,getClosestMatch,getExpressionVars,getHeaders,getInputValues,getInternalData,getSwapSpecification,getTriggerSpecs,getTarget,makeFragment,mergeObjects,makeSettleInfo,oobSwap,querySelectorExt,settleImmediately,shouldCancel,triggerEvent,triggerErrorEvent,withExtensions},VERBS=["get","post","put","delete","patch"],VERB_SELECTOR=VERBS.map(function(r){return"[hx-"+r+"], [data-hx-"+r+"]"}).join(", ");function parseInterval(r){if(r==null)return;let v=NaN;return r.slice(-2)=="ms"?v=parseFloat(r.slice(0,-2)):r.slice(-1)=="s"?v=parseFloat(r.slice(0,-1))*1e3:r.slice(-1)=="m"?v=parseFloat(r.slice(0,-1))*1e3*60:v=parseFloat(r),isNaN(v)?void 0:v}function getRawAttribute(r,v){return r instanceof Element&&r.getAttribute(v)}function hasAttribute(r,v){return!!r.hasAttribute&&(r.hasAttribute(v)||r.hasAttribute("data-"+v))}function getAttributeValue(r,v){return getRawAttribute(r,v)||getRawAttribute(r,"data-"+v)}function parentElt(r){const v=r.parentElement;return!v&&r.parentNode instanceof ShadowRoot?r.parentNode:v}function getDocument(){return document}function getRootNode(r,v){return r.getRootNode?r.getRootNode({composed:v}):getDocument()}function getClosestMatch(r,v){for(;r&&!v(r);)r=parentElt(r);return r||null}function getAttributeValueWithDisinheritance(r,v,b){const _=getAttributeValue(v,b),g=getAttributeValue(v,"hx-disinherit");var O=getAttributeValue(v,"hx-inherit");if(r!==v){if(htmx.config.disableInheritance)return O&&(O==="*"||O.split(" ").indexOf(b)>=0)?_:null;if(g&&(g==="*"||g.split(" ").indexOf(b)>=0))return"unset"}return _}function getClosestAttributeValue(r,v){let b=null;if(getClosestMatch(r,function(_){return!!(b=getAttributeValueWithDisinheritance(r,asElement(_),v))}),b!=="unset")return b}function matches(r,v){const b=r instanceof Element&&(r.matches||r.matchesSelector||r.msMatchesSelector||r.mozMatchesSelector||r.webkitMatchesSelector||r.oMatchesSelector);return!!b&&b.call(r,v)}function getStartTag(r){const b=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i.exec(r);return b?b[1].toLowerCase():""}function parseHTML(r){return new DOMParser().parseFromString(r,"text/html")}function takeChildrenFor(r,v){for(;v.childNodes.length>0;)r.append(v.childNodes[0])}function duplicateScript(r){const v=getDocument().createElement("script");return forEach(r.attributes,function(b){v.setAttribute(b.name,b.value)}),v.textContent=r.textContent,v.async=!1,htmx.config.inlineScriptNonce&&(v.nonce=htmx.config.inlineScriptNonce),v}function isJavaScriptScriptNode(r){return r.matches("script")&&(r.type==="text/javascript"||r.type==="module"||r.type==="")}function normalizeScriptTags(r){Array.from(r.querySelectorAll("script")).forEach(v=>{if(isJavaScriptScriptNode(v)){const b=duplicateScript(v),_=v.parentNode;try{_.insertBefore(b,v)}catch(g){logError(g)}finally{v.remove()}}})}function makeFragment(r){const v=r.replace(/<head(\s[^>]*)?>[\s\S]*?<\/head>/i,""),b=getStartTag(v);let _;if(b==="html"){_=new DocumentFragment;const O=parseHTML(r);takeChildrenFor(_,O.body),_.title=O.title}else if(b==="body"){_=new DocumentFragment;const O=parseHTML(v);takeChildrenFor(_,O.body),_.title=O.title}else{const O=parseHTML('<body><template class="internal-htmx-wrapper">'+v+"</template></body>");_=O.querySelector("template").content,_.title=O.title;var g=_.querySelector("title");g&&g.parentNode===_&&(g.remove(),_.title=g.innerText)}return _&&(htmx.config.allowScriptTags?normalizeScriptTags(_):_.querySelectorAll("script").forEach(O=>O.remove())),_}function maybeCall(r){r&&r()}function isType(r,v){return Object.prototype.toString.call(r)==="[object "+v+"]"}function isFunction(r){return typeof r=="function"}function isRawObject(r){return isType(r,"Object")}function getInternalData(r){const v="htmx-internal-data";let b=r[v];return b||(b=r[v]={}),b}function toArray(r){const v=[];if(r)for(let b=0;b<r.length;b++)v.push(r[b]);return v}function forEach(r,v){if(r)for(let b=0;b<r.length;b++)v(r[b])}function isScrolledIntoView(r){const v=r.getBoundingClientRect(),b=v.top,_=v.bottom;return b<window.innerHeight&&_>=0}function bodyContains(r){return r.getRootNode({composed:!0})===document}function splitOnWhitespace(r){return r.trim().split(/\s+/)}function mergeObjects(r,v){for(const b in v)v.hasOwnProperty(b)&&(r[b]=v[b]);return r}function parseJSON(r){try{return JSON.parse(r)}catch(v){return logError(v),null}}function canAccessLocalStorage(){const r="htmx:localStorageTest";try{return localStorage.setItem(r,r),localStorage.removeItem(r),!0}catch{return!1}}function normalizePath(r){try{const v=new URL(r);return v&&(r=v.pathname+v.search),/^\/$/.test(r)||(r=r.replace(/\/+$/,"")),r}catch{return r}}function internalEval(str){return maybeEval(getDocument().body,function(){return eval(str)})}function onLoadHelper(r){return htmx.on("htmx:load",function(b){r(b.detail.elt)})}function logAll(){htmx.logger=function(r,v,b){console&&console.log(v,r,b)}}function logNone(){htmx.logger=null}function find(r,v){return typeof r!="string"?r.querySelector(v):find(getDocument(),r)}function findAll(r,v){return typeof r!="string"?r.querySelectorAll(v):findAll(getDocument(),r)}function getWindow(){return window}function removeElement(r,v){r=resolveTarget(r),v?getWindow().setTimeout(function(){removeElement(r),r=null},v):parentElt(r).removeChild(r)}function asElement(r){return r instanceof Element?r:null}function asHtmlElement(r){return r instanceof HTMLElement?r:null}function asString(r){return typeof r=="string"?r:null}function asParentNode(r){return r instanceof Element||r instanceof Document||r instanceof DocumentFragment?r:null}function addClassToElement(r,v,b){r=asElement(resolveTarget(r)),r&&(b?getWindow().setTimeout(function(){addClassToElement(r,v),r=null},b):r.classList&&r.classList.add(v))}function removeClassFromElement(r,v,b){let _=asElement(resolveTarget(r));_&&(b?getWindow().setTimeout(function(){removeClassFromElement(_,v),_=null},b):_.classList&&(_.classList.remove(v),_.classList.length===0&&_.removeAttribute("class")))}function toggleClassOnElement(r,v){r=resolveTarget(r),r.classList.toggle(v)}function takeClassForElement(r,v){r=resolveTarget(r),forEach(r.parentElement.children,function(b){removeClassFromElement(b,v)}),addClassToElement(asElement(r),v)}function closest(r,v){if(r=asElement(resolveTarget(r)),r&&r.closest)return r.closest(v);do if(r==null||matches(r,v))return r;while(r=r&&asElement(parentElt(r)));return null}function startsWith(r,v){return r.substring(0,v.length)===v}function endsWith(r,v){return r.substring(r.length-v.length)===v}function normalizeSelector(r){const v=r.trim();return startsWith(v,"<")&&endsWith(v,"/>")?v.substring(1,v.length-2):v}function querySelectorAllExt(r,v,b){if(v.indexOf("global ")===0)return querySelectorAllExt(r,v.slice(7),!0);r=resolveTarget(r);const _=[];{let R=0,J=0;for(let Z=0;Z<v.length;Z++){const C=v[Z];if(C===","&&R===0){_.push(v.substring(J,Z)),J=Z+1;continue}C==="<"?R++:C==="/"&&Z<v.length-1&&v[Z+1]===">"&&R--}J<v.length&&_.push(v.substring(J))}const g=[],O=[];for(;_.length>0;){const R=normalizeSelector(_.shift());let J;R.indexOf("closest ")===0?J=closest(asElement(r),normalizeSelector(R.substr(8))):R.indexOf("find ")===0?J=find(asParentNode(r),normalizeSelector(R.substr(5))):R==="next"||R==="nextElementSibling"?J=asElement(r).nextElementSibling:R.indexOf("next ")===0?J=scanForwardQuery(r,normalizeSelector(R.substr(5)),!!b):R==="previous"||R==="previousElementSibling"?J=asElement(r).previousElementSibling:R.indexOf("previous ")===0?J=scanBackwardsQuery(r,normalizeSelector(R.substr(9)),!!b):R==="document"?J=document:R==="window"?J=window:R==="body"?J=document.body:R==="root"?J=getRootNode(r,!!b):R==="host"?J=r.getRootNode().host:O.push(R),J&&g.push(J)}if(O.length>0){const R=O.join(","),J=asParentNode(getRootNode(r,!!b));g.push(...toArray(J.querySelectorAll(R)))}return g}var scanForwardQuery=function(r,v,b){const _=asParentNode(getRootNode(r,b)).querySelectorAll(v);for(let g=0;g<_.length;g++){const O=_[g];if(O.compareDocumentPosition(r)===Node.DOCUMENT_POSITION_PRECEDING)return O}},scanBackwardsQuery=function(r,v,b){const _=asParentNode(getRootNode(r,b)).querySelectorAll(v);for(let g=_.length-1;g>=0;g--){const O=_[g];if(O.compareDocumentPosition(r)===Node.DOCUMENT_POSITION_FOLLOWING)return O}};function querySelectorExt(r,v){return typeof r!="string"?querySelectorAllExt(r,v)[0]:querySelectorAllExt(getDocument().body,r)[0]}function resolveTarget(r,v){return typeof r=="string"?find(asParentNode(v)||document,r):r}function processEventArgs(r,v,b,_){return isFunction(v)?{target:getDocument().body,event:asString(r),listener:v,options:b}:{target:resolveTarget(r),event:asString(v),listener:b,options:_}}function addEventListenerImpl(r,v,b,_){return ready(function(){const O=processEventArgs(r,v,b,_);O.target.addEventListener(O.event,O.listener,O.options)}),isFunction(v)?v:b}function removeEventListenerImpl(r,v,b){return ready(function(){const _=processEventArgs(r,v,b);_.target.removeEventListener(_.event,_.listener)}),isFunction(v)?v:b}const DUMMY_ELT=getDocument().createElement("output");function findAttributeTargets(r,v){const b=getClosestAttributeValue(r,v);if(b){if(b==="this")return[findThisElement(r,v)];{const _=querySelectorAllExt(r,b);return _.length===0?(logError('The selector "'+b+'" on '+v+" returned no matches!"),[DUMMY_ELT]):_}}}function findThisElement(r,v){return asElement(getClosestMatch(r,function(b){return getAttributeValue(asElement(b),v)!=null}))}function getTarget(r){const v=getClosestAttributeValue(r,"hx-target");return v?v==="this"?findThisElement(r,"hx-target"):querySelectorExt(r,v):getInternalData(r).boosted?getDocument().body:r}function shouldSettleAttribute(r){const v=htmx.config.attributesToSettle;for(let b=0;b<v.length;b++)if(r===v[b])return!0;return!1}function cloneAttributes(r,v){forEach(r.attributes,function(b){!v.hasAttribute(b.name)&&shouldSettleAttribute(b.name)&&r.removeAttribute(b.name)}),forEach(v.attributes,function(b){shouldSettleAttribute(b.name)&&r.setAttribute(b.name,b.value)})}function isInlineSwap(r,v){const b=getExtensions(v);for(let _=0;_<b.length;_++){const g=b[_];try{if(g.isInlineSwap(r))return!0}catch(O){logError(O)}}return r==="outerHTML"}function oobSwap(r,v,b,_){_=_||getDocument();let g="#"+getRawAttribute(v,"id"),O="outerHTML";r==="true"||(r.indexOf(":")>0?(O=r.substring(0,r.indexOf(":")),g=r.substring(r.indexOf(":")+1)):O=r),v.removeAttribute("hx-swap-oob"),v.removeAttribute("data-hx-swap-oob");const R=querySelectorAllExt(_,g,!1);return R?(forEach(R,function(J){let Z;const C=v.cloneNode(!0);Z=getDocument().createDocumentFragment(),Z.appendChild(C),isInlineSwap(O,J)||(Z=asParentNode(C));const we={shouldSwap:!0,target:J,fragment:Z};triggerEvent(J,"htmx:oobBeforeSwap",we)&&(J=we.target,we.shouldSwap&&(handlePreservedElements(Z),swapWithStyle(O,J,J,Z,b),restorePreservedElements()),forEach(b.elts,function(Be){triggerEvent(Be,"htmx:oobAfterSwap",we)}))}),v.parentNode.removeChild(v)):(v.parentNode.removeChild(v),triggerErrorEvent(getDocument().body,"htmx:oobErrorNoTarget",{content:v})),r}function restorePreservedElements(){const r=find("#--htmx-preserve-pantry--");if(r){for(const v of[...r.children]){const b=find("#"+v.id);b.parentNode.moveBefore(v,b),b.remove()}r.remove()}}function handlePreservedElements(r){forEach(findAll(r,"[hx-preserve], [data-hx-preserve]"),function(v){const b=getAttributeValue(v,"id"),_=getDocument().getElementById(b);if(_!=null)if(v.moveBefore){let g=find("#--htmx-preserve-pantry--");g==null&&(getDocument().body.insertAdjacentHTML("afterend","<div id='--htmx-preserve-pantry--'></div>"),g=find("#--htmx-preserve-pantry--")),g.moveBefore(_,null)}else v.parentNode.replaceChild(_,v)})}function handleAttributes(r,v,b){forEach(v.querySelectorAll("[id]"),function(_){const g=getRawAttribute(_,"id");if(g&&g.length>0){const O=g.replace("'","\\'"),R=_.tagName.replace(":","\\:"),J=asParentNode(r),Z=J&&J.querySelector(R+"[id='"+O+"']");if(Z&&Z!==J){const C=_.cloneNode();cloneAttributes(_,Z),b.tasks.push(function(){cloneAttributes(_,C)})}}})}function makeAjaxLoadTask(r){return function(){removeClassFromElement(r,htmx.config.addedClass),processNode(asElement(r)),processFocus(asParentNode(r)),triggerEvent(r,"htmx:load")}}function processFocus(r){const v="[autofocus]",b=asHtmlElement(matches(r,v)?r:r.querySelector(v));b?.focus()}function insertNodesBefore(r,v,b,_){for(handleAttributes(r,b,_);b.childNodes.length>0;){const g=b.firstChild;addClassToElement(asElement(g),htmx.config.addedClass),r.insertBefore(g,v),g.nodeType!==Node.TEXT_NODE&&g.nodeType!==Node.COMMENT_NODE&&_.tasks.push(makeAjaxLoadTask(g))}}function stringHash(r,v){let b=0;for(;b<r.length;)v=(v<<5)-v+r.charCodeAt(b++)|0;return v}function attributeHash(r){let v=0;if(r.attributes)for(let b=0;b<r.attributes.length;b++){const _=r.attributes[b];_.value&&(v=stringHash(_.name,v),v=stringHash(_.value,v))}return v}function deInitOnHandlers(r){const v=getInternalData(r);if(v.onHandlers){for(let b=0;b<v.onHandlers.length;b++){const _=v.onHandlers[b];removeEventListenerImpl(r,_.event,_.listener)}delete v.onHandlers}}function deInitNode(r){const v=getInternalData(r);v.timeout&&clearTimeout(v.timeout),v.listenerInfos&&forEach(v.listenerInfos,function(b){b.on&&removeEventListenerImpl(b.on,b.trigger,b.listener)}),deInitOnHandlers(r),forEach(Object.keys(v),function(b){b!=="firstInitCompleted"&&delete v[b]})}function cleanUpElement(r){triggerEvent(r,"htmx:beforeCleanupElement"),deInitNode(r),r.children&&forEach(r.children,function(v){cleanUpElement(v)})}function swapOuterHTML(r,v,b){if(r instanceof Element&&r.tagName==="BODY")return swapInnerHTML(r,v,b);let _;const g=r.previousSibling,O=parentElt(r);if(O){for(insertNodesBefore(O,r,v,b),g==null?_=O.firstChild:_=g.nextSibling,b.elts=b.elts.filter(function(R){return R!==r});_&&_!==r;)_ instanceof Element&&b.elts.push(_),_=_.nextSibling;cleanUpElement(r),r instanceof Element?r.remove():r.parentNode.removeChild(r)}}function swapAfterBegin(r,v,b){return insertNodesBefore(r,r.firstChild,v,b)}function swapBeforeBegin(r,v,b){return insertNodesBefore(parentElt(r),r,v,b)}function swapBeforeEnd(r,v,b){return insertNodesBefore(r,null,v,b)}function swapAfterEnd(r,v,b){return insertNodesBefore(parentElt(r),r.nextSibling,v,b)}function swapDelete(r){cleanUpElement(r);const v=parentElt(r);if(v)return v.removeChild(r)}function swapInnerHTML(r,v,b){const _=r.firstChild;if(insertNodesBefore(r,_,v,b),_){for(;_.nextSibling;)cleanUpElement(_.nextSibling),r.removeChild(_.nextSibling);cleanUpElement(_),r.removeChild(_)}}function swapWithStyle(r,v,b,_,g){switch(r){case"none":return;case"outerHTML":swapOuterHTML(b,_,g);return;case"afterbegin":swapAfterBegin(b,_,g);return;case"beforebegin":swapBeforeBegin(b,_,g);return;case"beforeend":swapBeforeEnd(b,_,g);return;case"afterend":swapAfterEnd(b,_,g);return;case"delete":swapDelete(b);return;default:var O=getExtensions(v);for(let R=0;R<O.length;R++){const J=O[R];try{const Z=J.handleSwap(r,b,_,g);if(Z){if(Array.isArray(Z))for(let C=0;C<Z.length;C++){const we=Z[C];we.nodeType!==Node.TEXT_NODE&&we.nodeType!==Node.COMMENT_NODE&&g.tasks.push(makeAjaxLoadTask(we))}return}}catch(Z){logError(Z)}}r==="innerHTML"?swapInnerHTML(b,_,g):swapWithStyle(htmx.config.defaultSwapStyle,v,b,_,g)}}function findAndSwapOobElements(r,v,b){var _=findAll(r,"[hx-swap-oob], [data-hx-swap-oob]");return forEach(_,function(g){if(htmx.config.allowNestedOobSwaps||g.parentElement===null){const O=getAttributeValue(g,"hx-swap-oob");O!=null&&oobSwap(O,g,v,b)}else g.removeAttribute("hx-swap-oob"),g.removeAttribute("data-hx-swap-oob")}),_.length>0}function swap(r,v,b,_){_||(_={}),r=resolveTarget(r);const g=_.contextElement?getRootNode(_.contextElement,!1):getDocument(),O=document.activeElement;let R={};try{R={elt:O,start:O?O.selectionStart:null,end:O?O.selectionEnd:null}}catch{}const J=makeSettleInfo(r);if(b.swapStyle==="textContent")r.textContent=v;else{let C=makeFragment(v);if(J.title=C.title,_.selectOOB){const we=_.selectOOB.split(",");for(let Be=0;Be<we.length;Be++){const Ue=we[Be].split(":",2);let Q=Ue[0].trim();Q.indexOf("#")===0&&(Q=Q.substring(1));const Ke=Ue[1]||"true",At=C.querySelector("#"+Q);At&&oobSwap(Ke,At,J,g)}}if(findAndSwapOobElements(C,J,g),forEach(findAll(C,"template"),function(we){we.content&&findAndSwapOobElements(we.content,J,g)&&we.remove()}),_.select){const we=getDocument().createDocumentFragment();forEach(C.querySelectorAll(_.select),function(Be){we.appendChild(Be)}),C=we}handlePreservedElements(C),swapWithStyle(b.swapStyle,_.contextElement,r,C,J),restorePreservedElements()}if(R.elt&&!bodyContains(R.elt)&&getRawAttribute(R.elt,"id")){const C=document.getElementById(getRawAttribute(R.elt,"id")),we={preventScroll:b.focusScroll!==void 0?!b.focusScroll:!htmx.config.defaultFocusScroll};if(C){if(R.start&&C.setSelectionRange)try{C.setSelectionRange(R.start,R.end)}catch{}C.focus(we)}}r.classList.remove(htmx.config.swappingClass),forEach(J.elts,function(C){C.classList&&C.classList.add(htmx.config.settlingClass),triggerEvent(C,"htmx:afterSwap",_.eventInfo)}),_.afterSwapCallback&&_.afterSwapCallback(),b.ignoreTitle||handleTitle(J.title);const Z=function(){if(forEach(J.tasks,function(C){C.call()}),forEach(J.elts,function(C){C.classList&&C.classList.remove(htmx.config.settlingClass),triggerEvent(C,"htmx:afterSettle",_.eventInfo)}),_.anchor){const C=asElement(resolveTarget("#"+_.anchor));C&&C.scrollIntoView({block:"start",behavior:"auto"})}updateScrollState(J.elts,b),_.afterSettleCallback&&_.afterSettleCallback()};b.settleDelay>0?getWindow().setTimeout(Z,b.settleDelay):Z()}function handleTriggerHeader(r,v,b){const _=r.getResponseHeader(v);if(_.indexOf("{")===0){const g=parseJSON(_);for(const O in g)if(g.hasOwnProperty(O)){let R=g[O];isRawObject(R)?b=R.target!==void 0?R.target:b:R={value:R},triggerEvent(b,O,R)}}else{const g=_.split(",");for(let O=0;O<g.length;O++)triggerEvent(b,g[O].trim(),[])}}const WHITESPACE=/\s/,WHITESPACE_OR_COMMA=/[\s,]/,SYMBOL_START=/[_$a-zA-Z]/,SYMBOL_CONT=/[_$a-zA-Z0-9]/,STRINGISH_START=['"',"'","/"],NOT_WHITESPACE=/[^\s]/,COMBINED_SELECTOR_START=/[{(]/,COMBINED_SELECTOR_END=/[})]/;function tokenizeString(r){const v=[];let b=0;for(;b<r.length;){if(SYMBOL_START.exec(r.charAt(b))){for(var _=b;SYMBOL_CONT.exec(r.charAt(b+1));)b++;v.push(r.substring(_,b+1))}else if(STRINGISH_START.indexOf(r.charAt(b))!==-1){const g=r.charAt(b);var _=b;for(b++;b<r.length&&r.charAt(b)!==g;)r.charAt(b)==="\\"&&b++,b++;v.push(r.substring(_,b+1))}else{const g=r.charAt(b);v.push(g)}b++}return v}function isPossibleRelativeReference(r,v,b){return SYMBOL_START.exec(r.charAt(0))&&r!=="true"&&r!=="false"&&r!=="this"&&r!==b&&v!=="."}function maybeGenerateConditional(r,v,b){if(v[0]==="["){v.shift();let _=1,g=" return (function("+b+"){ return (",O=null;for(;v.length>0;){const R=v[0];if(R==="]"){if(_--,_===0){O===null&&(g=g+"true"),v.shift(),g+=")})";try{const J=maybeEval(r,function(){return Function(g)()},function(){return!0});return J.source=g,J}catch(J){return triggerErrorEvent(getDocument().body,"htmx:syntax:error",{error:J,source:g}),null}}}else R==="["&&_++;isPossibleRelativeReference(R,O,b)?g+="(("+b+"."+R+") ? ("+b+"."+R+") : (window."+R+"))":g=g+R,O=v.shift()}}}function consumeUntil(r,v){let b="";for(;r.length>0&&!v.test(r[0]);)b+=r.shift();return b}function consumeCSSSelector(r){let v;return r.length>0&&COMBINED_SELECTOR_START.test(r[0])?(r.shift(),v=consumeUntil(r,COMBINED_SELECTOR_END).trim(),r.shift()):v=consumeUntil(r,WHITESPACE_OR_COMMA),v}const INPUT_SELECTOR="input, textarea, select";function parseAndCacheTrigger(r,v,b){const _=[],g=tokenizeString(v);do{consumeUntil(g,NOT_WHITESPACE);const J=g.length,Z=consumeUntil(g,/[,\[\s]/);if(Z!=="")if(Z==="every"){const C={trigger:"every"};consumeUntil(g,NOT_WHITESPACE),C.pollInterval=parseInterval(consumeUntil(g,/[,\[\s]/)),consumeUntil(g,NOT_WHITESPACE);var O=maybeGenerateConditional(r,g,"event");O&&(C.eventFilter=O),_.push(C)}else{const C={trigger:Z};var O=maybeGenerateConditional(r,g,"event");for(O&&(C.eventFilter=O),consumeUntil(g,NOT_WHITESPACE);g.length>0&&g[0]!==",";){const Be=g.shift();if(Be==="changed")C.changed=!0;else if(Be==="once")C.once=!0;else if(Be==="consume")C.consume=!0;else if(Be==="delay"&&g[0]===":")g.shift(),C.delay=parseInterval(consumeUntil(g,WHITESPACE_OR_COMMA));else if(Be==="from"&&g[0]===":"){if(g.shift(),COMBINED_SELECTOR_START.test(g[0]))var R=consumeCSSSelector(g);else{var R=consumeUntil(g,WHITESPACE_OR_COMMA);if(R==="closest"||R==="find"||R==="next"||R==="previous"){g.shift();const Q=consumeCSSSelector(g);Q.length>0&&(R+=" "+Q)}}C.from=R}else Be==="target"&&g[0]===":"?(g.shift(),C.target=consumeCSSSelector(g)):Be==="throttle"&&g[0]===":"?(g.shift(),C.throttle=parseInterval(consumeUntil(g,WHITESPACE_OR_COMMA))):Be==="queue"&&g[0]===":"?(g.shift(),C.queue=consumeUntil(g,WHITESPACE_OR_COMMA)):Be==="root"&&g[0]===":"?(g.shift(),C[Be]=consumeCSSSelector(g)):Be==="threshold"&&g[0]===":"?(g.shift(),C[Be]=consumeUntil(g,WHITESPACE_OR_COMMA)):triggerErrorEvent(r,"htmx:syntax:error",{token:g.shift()});consumeUntil(g,NOT_WHITESPACE)}_.push(C)}g.length===J&&triggerErrorEvent(r,"htmx:syntax:error",{token:g.shift()}),consumeUntil(g,NOT_WHITESPACE)}while(g[0]===","&&g.shift());return b&&(b[v]=_),_}function getTriggerSpecs(r){const v=getAttributeValue(r,"hx-trigger");let b=[];if(v){const _=htmx.config.triggerSpecsCache;b=_&&_[v]||parseAndCacheTrigger(r,v,_)}return b.length>0?b:matches(r,"form")?[{trigger:"submit"}]:matches(r,'input[type="button"], input[type="submit"]')?[{trigger:"click"}]:matches(r,INPUT_SELECTOR)?[{trigger:"change"}]:[{trigger:"click"}]}function cancelPolling(r){getInternalData(r).cancelled=!0}function processPolling(r,v,b){const _=getInternalData(r);_.timeout=getWindow().setTimeout(function(){bodyContains(r)&&_.cancelled!==!0&&(maybeFilterEvent(b,r,makeEvent("hx:poll:trigger",{triggerSpec:b,target:r}))||v(r),processPolling(r,v,b))},b.pollInterval)}function isLocalLink(r){return location.hostname===r.hostname&&getRawAttribute(r,"href")&&getRawAttribute(r,"href").indexOf("#")!==0}function eltIsDisabled(r){return closest(r,htmx.config.disableSelector)}function boostElement(r,v,b){if(r instanceof HTMLAnchorElement&&isLocalLink(r)&&(r.target===""||r.target==="_self")||r.tagName==="FORM"&&String(getRawAttribute(r,"method")).toLowerCase()!=="dialog"){v.boosted=!0;let _,g;if(r.tagName==="A")_="get",g=getRawAttribute(r,"href");else{const O=getRawAttribute(r,"method");_=O?O.toLowerCase():"get",g=getRawAttribute(r,"action"),(g==null||g==="")&&(g=getDocument().location.href),_==="get"&&g.includes("?")&&(g=g.replace(/\?[^#]+/,""))}b.forEach(function(O){addEventListener(r,function(R,J){const Z=asElement(R);if(eltIsDisabled(Z)){cleanUpElement(Z);return}issueAjaxRequest(_,g,Z,J)},v,O,!0)})}}function shouldCancel(r,v){const b=asElement(v);return b?!!((r.type==="submit"||r.type==="click")&&(b.tagName==="FORM"||matches(b,'input[type="submit"], button')&&(matches(b,"[form]")||closest(b,"form")!==null)||b instanceof HTMLAnchorElement&&b.href&&(b.getAttribute("href")==="#"||b.getAttribute("href").indexOf("#")!==0))):!1}function ignoreBoostedAnchorCtrlClick(r,v){return getInternalData(r).boosted&&r instanceof HTMLAnchorElement&&v.type==="click"&&(v.ctrlKey||v.metaKey)}function maybeFilterEvent(r,v,b){const _=r.eventFilter;if(_)try{return _.call(v,b)!==!0}catch(g){const O=_.source;return triggerErrorEvent(getDocument().body,"htmx:eventFilter:error",{error:g,source:O}),!0}return!1}function addEventListener(r,v,b,_,g){const O=getInternalData(r);let R;_.from?R=querySelectorAllExt(r,_.from):R=[r],_.changed&&("lastValue"in O||(O.lastValue=new WeakMap),R.forEach(function(J){O.lastValue.has(_)||O.lastValue.set(_,new WeakMap),O.lastValue.get(_).set(J,J.value)})),forEach(R,function(J){const Z=function(C){if(!bodyContains(r)){J.removeEventListener(_.trigger,Z);return}if(ignoreBoostedAnchorCtrlClick(r,C)||((g||shouldCancel(C,r))&&C.preventDefault(),maybeFilterEvent(_,r,C)))return;const we=getInternalData(C);if(we.triggerSpec=_,we.handledFor==null&&(we.handledFor=[]),we.handledFor.indexOf(r)<0){if(we.handledFor.push(r),_.consume&&C.stopPropagation(),_.target&&C.target&&!matches(asElement(C.target),_.target))return;if(_.once){if(O.triggeredOnce)return;O.triggeredOnce=!0}if(_.changed){const Be=event.target,Ue=Be.value,Q=O.lastValue.get(_);if(Q.has(Be)&&Q.get(Be)===Ue)return;Q.set(Be,Ue)}if(O.delayed&&clearTimeout(O.delayed),O.throttle)return;_.throttle>0?O.throttle||(triggerEvent(r,"htmx:trigger"),v(r,C),O.throttle=getWindow().setTimeout(function(){O.throttle=null},_.throttle)):_.delay>0?O.delayed=getWindow().setTimeout(function(){triggerEvent(r,"htmx:trigger"),v(r,C)},_.delay):(triggerEvent(r,"htmx:trigger"),v(r,C))}};b.listenerInfos==null&&(b.listenerInfos=[]),b.listenerInfos.push({trigger:_.trigger,listener:Z,on:J}),J.addEventListener(_.trigger,Z)})}let windowIsScrolling=!1,scrollHandler=null;function initScrollHandler(){scrollHandler||(scrollHandler=function(){windowIsScrolling=!0},window.addEventListener("scroll",scrollHandler),window.addEventListener("resize",scrollHandler),setInterval(function(){windowIsScrolling&&(windowIsScrolling=!1,forEach(getDocument().querySelectorAll("[hx-trigger*='revealed'],[data-hx-trigger*='revealed']"),function(r){maybeReveal(r)}))},200))}function maybeReveal(r){!hasAttribute(r,"data-hx-revealed")&&isScrolledIntoView(r)&&(r.setAttribute("data-hx-revealed","true"),getInternalData(r).initHash?triggerEvent(r,"revealed"):r.addEventListener("htmx:afterProcessNode",function(){triggerEvent(r,"revealed")},{once:!0}))}function loadImmediately(r,v,b,_){const g=function(){b.loaded||(b.loaded=!0,triggerEvent(r,"htmx:trigger"),v(r))};_>0?getWindow().setTimeout(g,_):g()}function processVerbs(r,v,b){let _=!1;return forEach(VERBS,function(g){if(hasAttribute(r,"hx-"+g)){const O=getAttributeValue(r,"hx-"+g);_=!0,v.path=O,v.verb=g,b.forEach(function(R){addTriggerHandler(r,R,v,function(J,Z){const C=asElement(J);if(closest(C,htmx.config.disableSelector)){cleanUpElement(C);return}issueAjaxRequest(g,O,C,Z)})})}}),_}function addTriggerHandler(r,v,b,_){if(v.trigger==="revealed")initScrollHandler(),addEventListener(r,_,b,v),maybeReveal(asElement(r));else if(v.trigger==="intersect"){const g={};v.root&&(g.root=querySelectorExt(r,v.root)),v.threshold&&(g.threshold=parseFloat(v.threshold)),new IntersectionObserver(function(R){for(let J=0;J<R.length;J++)if(R[J].isIntersecting){triggerEvent(r,"intersect");break}},g).observe(asElement(r)),addEventListener(asElement(r),_,b,v)}else!b.firstInitCompleted&&v.trigger==="load"?maybeFilterEvent(v,r,makeEvent("load",{elt:r}))||loadImmediately(asElement(r),_,b,v.delay):v.pollInterval>0?(b.polling=!0,processPolling(asElement(r),_,v)):addEventListener(r,_,b,v)}function shouldProcessHxOn(r){const v=asElement(r);if(!v)return!1;const b=v.attributes;for(let _=0;_<b.length;_++){const g=b[_].name;if(startsWith(g,"hx-on:")||startsWith(g,"data-hx-on:")||startsWith(g,"hx-on-")||startsWith(g,"data-hx-on-"))return!0}return!1}const HX_ON_QUERY=new XPathEvaluator().createExpression('.//*[@*[ starts-with(name(), "hx-on:") or starts-with(name(), "data-hx-on:") or starts-with(name(), "hx-on-") or starts-with(name(), "data-hx-on-") ]]');function processHXOnRoot(r,v){shouldProcessHxOn(r)&&v.push(asElement(r));const b=HX_ON_QUERY.evaluate(r);let _=null;for(;_=b.iterateNext();)v.push(asElement(_))}function findHxOnWildcardElements(r){const v=[];if(r instanceof DocumentFragment)for(const b of r.childNodes)processHXOnRoot(b,v);else processHXOnRoot(r,v);return v}function findElementsToProcess(r){if(r.querySelectorAll){const b=", [hx-boost] a, [data-hx-boost] a, a[hx-boost], a[data-hx-boost]",_=[];for(const O in extensions){const R=extensions[O];if(R.getSelectors){var v=R.getSelectors();v&&_.push(v)}}return r.querySelectorAll(VERB_SELECTOR+b+", form, [type='submit'], [hx-ext], [data-hx-ext], [hx-trigger], [data-hx-trigger]"+_.flat().map(O=>", "+O).join(""))}else return[]}function maybeSetLastButtonClicked(r){const v=closest(asElement(r.target),"button, input[type='submit']"),b=getRelatedFormData(r);b&&(b.lastButtonClicked=v)}function maybeUnsetLastButtonClicked(r){const v=getRelatedFormData(r);v&&(v.lastButtonClicked=null)}function getRelatedFormData(r){const v=closest(asElement(r.target),"button, input[type='submit']");if(!v)return;const b=resolveTarget("#"+getRawAttribute(v,"form"),v.getRootNode())||closest(v,"form");if(b)return getInternalData(b)}function initButtonTracking(r){r.addEventListener("click",maybeSetLastButtonClicked),r.addEventListener("focusin",maybeSetLastButtonClicked),r.addEventListener("focusout",maybeUnsetLastButtonClicked)}function addHxOnEventHandler(r,v,b){const _=getInternalData(r);Array.isArray(_.onHandlers)||(_.onHandlers=[]);let g;const O=function(R){maybeEval(r,function(){eltIsDisabled(r)||(g||(g=new Function("event",b)),g.call(r,R))})};r.addEventListener(v,O),_.onHandlers.push({event:v,listener:O})}function processHxOnWildcard(r){deInitOnHandlers(r);for(let v=0;v<r.attributes.length;v++){const b=r.attributes[v].name,_=r.attributes[v].value;if(startsWith(b,"hx-on")||startsWith(b,"data-hx-on")){const g=b.indexOf("-on")+3,O=b.slice(g,g+1);if(O==="-"||O===":"){let R=b.slice(g+1);startsWith(R,":")?R="htmx"+R:startsWith(R,"-")?R="htmx:"+R.slice(1):startsWith(R,"htmx-")&&(R="htmx:"+R.slice(5)),addHxOnEventHandler(r,R,_)}}}}function initNode(r){if(closest(r,htmx.config.disableSelector)){cleanUpElement(r);return}const v=getInternalData(r),b=attributeHash(r);if(v.initHash!==b){deInitNode(r),v.initHash=b,triggerEvent(r,"htmx:beforeProcessNode");const _=getTriggerSpecs(r);processVerbs(r,v,_)||(getClosestAttributeValue(r,"hx-boost")==="true"?boostElement(r,v,_):hasAttribute(r,"hx-trigger")&&_.forEach(function(O){addTriggerHandler(r,O,v,function(){})})),(r.tagName==="FORM"||getRawAttribute(r,"type")==="submit"&&hasAttribute(r,"form"))&&initButtonTracking(r),v.firstInitCompleted=!0,triggerEvent(r,"htmx:afterProcessNode")}}function processNode(r){if(r=resolveTarget(r),closest(r,htmx.config.disableSelector)){cleanUpElement(r);return}initNode(r),forEach(findElementsToProcess(r),function(v){initNode(v)}),forEach(findHxOnWildcardElements(r),processHxOnWildcard)}function kebabEventName(r){return r.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}function makeEvent(r,v){let b;return window.CustomEvent&&typeof window.CustomEvent=="function"?b=new CustomEvent(r,{bubbles:!0,cancelable:!0,composed:!0,detail:v}):(b=getDocument().createEvent("CustomEvent"),b.initCustomEvent(r,!0,!0,v)),b}function triggerErrorEvent(r,v,b){triggerEvent(r,v,mergeObjects({error:v},b))}function ignoreEventForLogging(r){return r==="htmx:afterProcessNode"}function withExtensions(r,v){forEach(getExtensions(r),function(b){try{v(b)}catch(_){logError(_)}})}function logError(r){console.error?console.error(r):console.log&&console.log("ERROR: ",r)}function triggerEvent(r,v,b){r=resolveTarget(r),b==null&&(b={}),b.elt=r;const _=makeEvent(v,b);htmx.logger&&!ignoreEventForLogging(v)&&htmx.logger(r,v,b),b.error&&(logError(b.error),triggerEvent(r,"htmx:error",{errorInfo:b}));let g=r.dispatchEvent(_);const O=kebabEventName(v);if(g&&O!==v){const R=makeEvent(O,_.detail);g=g&&r.dispatchEvent(R)}return withExtensions(asElement(r),function(R){g=g&&R.onEvent(v,_)!==!1&&!_.defaultPrevented}),g}let currentPathForHistory=location.pathname+location.search;function getHistoryElement(){return getDocument().querySelector("[hx-history-elt],[data-hx-history-elt]")||getDocument().body}function saveToHistoryCache(r,v){if(!canAccessLocalStorage())return;const b=cleanInnerHtmlForHistory(v),_=getDocument().title,g=window.scrollY;if(htmx.config.historyCacheSize<=0){localStorage.removeItem("htmx-history-cache");return}r=normalizePath(r);const O=parseJSON(localStorage.getItem("htmx-history-cache"))||[];for(let J=0;J<O.length;J++)if(O[J].url===r){O.splice(J,1);break}const R={url:r,content:b,title:_,scroll:g};for(triggerEvent(getDocument().body,"htmx:historyItemCreated",{item:R,cache:O}),O.push(R);O.length>htmx.config.historyCacheSize;)O.shift();for(;O.length>0;)try{localStorage.setItem("htmx-history-cache",JSON.stringify(O));break}catch(J){triggerErrorEvent(getDocument().body,"htmx:historyCacheError",{cause:J,cache:O}),O.shift()}}function getCachedHistory(r){if(!canAccessLocalStorage())return null;r=normalizePath(r);const v=parseJSON(localStorage.getItem("htmx-history-cache"))||[];for(let b=0;b<v.length;b++)if(v[b].url===r)return v[b];return null}function cleanInnerHtmlForHistory(r){const v=htmx.config.requestClass,b=r.cloneNode(!0);return forEach(findAll(b,"."+v),function(_){removeClassFromElement(_,v)}),forEach(findAll(b,"[data-disabled-by-htmx]"),function(_){_.removeAttribute("disabled")}),b.innerHTML}function saveCurrentPageToHistory(){const r=getHistoryElement(),v=currentPathForHistory||location.pathname+location.search;let b;try{b=getDocument().querySelector('[hx-history="false" i],[data-hx-history="false" i]')}catch{b=getDocument().querySelector('[hx-history="false"],[data-hx-history="false"]')}b||(triggerEvent(getDocument().body,"htmx:beforeHistorySave",{path:v,historyElt:r}),saveToHistoryCache(v,r)),htmx.config.historyEnabled&&history.replaceState({htmx:!0},getDocument().title,window.location.href)}function pushUrlIntoHistory(r){htmx.config.getCacheBusterParam&&(r=r.replace(/org\.htmx\.cache-buster=[^&]*&?/,""),(endsWith(r,"&")||endsWith(r,"?"))&&(r=r.slice(0,-1))),htmx.config.historyEnabled&&history.pushState({htmx:!0},"",r),currentPathForHistory=r}function replaceUrlInHistory(r){htmx.config.historyEnabled&&history.replaceState({htmx:!0},"",r),currentPathForHistory=r}function settleImmediately(r){forEach(r,function(v){v.call(void 0)})}function loadHistoryFromServer(r){const v=new XMLHttpRequest,b={path:r,xhr:v};triggerEvent(getDocument().body,"htmx:historyCacheMiss",b),v.open("GET",r,!0),v.setRequestHeader("HX-Request","true"),v.setRequestHeader("HX-History-Restore-Request","true"),v.setRequestHeader("HX-Current-URL",getDocument().location.href),v.onload=function(){if(this.status>=200&&this.status<400){triggerEvent(getDocument().body,"htmx:historyCacheMissLoad",b);const _=makeFragment(this.response),g=_.querySelector("[hx-history-elt],[data-hx-history-elt]")||_,O=getHistoryElement(),R=makeSettleInfo(O);handleTitle(_.title),handlePreservedElements(_),swapInnerHTML(O,g,R),restorePreservedElements(),settleImmediately(R.tasks),currentPathForHistory=r,triggerEvent(getDocument().body,"htmx:historyRestore",{path:r,cacheMiss:!0,serverResponse:this.response})}else triggerErrorEvent(getDocument().body,"htmx:historyCacheMissLoadError",b)},v.send()}function restoreHistory(r){saveCurrentPageToHistory(),r=r||location.pathname+location.search;const v=getCachedHistory(r);if(v){const b=makeFragment(v.content),_=getHistoryElement(),g=makeSettleInfo(_);handleTitle(v.title),handlePreservedElements(b),swapInnerHTML(_,b,g),restorePreservedElements(),settleImmediately(g.tasks),getWindow().setTimeout(function(){window.scrollTo(0,v.scroll)},0),currentPathForHistory=r,triggerEvent(getDocument().body,"htmx:historyRestore",{path:r,item:v})}else htmx.config.refreshOnHistoryMiss?window.location.reload(!0):loadHistoryFromServer(r)}function addRequestIndicatorClasses(r){let v=findAttributeTargets(r,"hx-indicator");return v==null&&(v=[r]),forEach(v,function(b){const _=getInternalData(b);_.requestCount=(_.requestCount||0)+1,b.classList.add.call(b.classList,htmx.config.requestClass)}),v}function disableElements(r){let v=findAttributeTargets(r,"hx-disabled-elt");return v==null&&(v=[]),forEach(v,function(b){const _=getInternalData(b);_.requestCount=(_.requestCount||0)+1,b.setAttribute("disabled",""),b.setAttribute("data-disabled-by-htmx","")}),v}function removeRequestIndicators(r,v){forEach(r.concat(v),function(b){const _=getInternalData(b);_.requestCount=(_.requestCount||1)-1}),forEach(r,function(b){getInternalData(b).requestCount===0&&b.classList.remove.call(b.classList,htmx.config.requestClass)}),forEach(v,function(b){getInternalData(b).requestCount===0&&(b.removeAttribute("disabled"),b.removeAttribute("data-disabled-by-htmx"))})}function haveSeenNode(r,v){for(let b=0;b<r.length;b++)if(r[b].isSameNode(v))return!0;return!1}function shouldInclude(r){const v=r;return v.name===""||v.name==null||v.disabled||closest(v,"fieldset[disabled]")||v.type==="button"||v.type==="submit"||v.tagName==="image"||v.tagName==="reset"||v.tagName==="file"?!1:v.type==="checkbox"||v.type==="radio"?v.checked:!0}function addValueToFormData(r,v,b){r!=null&&v!=null&&(Array.isArray(v)?v.forEach(function(_){b.append(r,_)}):b.append(r,v))}function removeValueFromFormData(r,v,b){if(r!=null&&v!=null){let _=b.getAll(r);Array.isArray(v)?_=_.filter(g=>v.indexOf(g)<0):_=_.filter(g=>g!==v),b.delete(r),forEach(_,g=>b.append(r,g))}}function processInputValue(r,v,b,_,g){if(!(_==null||haveSeenNode(r,_))){if(r.push(_),shouldInclude(_)){const O=getRawAttribute(_,"name");let R=_.value;_ instanceof HTMLSelectElement&&_.multiple&&(R=toArray(_.querySelectorAll("option:checked")).map(function(J){return J.value})),_ instanceof HTMLInputElement&&_.files&&(R=toArray(_.files)),addValueToFormData(O,R,v),g&&validateElement(_,b)}_ instanceof HTMLFormElement&&(forEach(_.elements,function(O){r.indexOf(O)>=0?removeValueFromFormData(O.name,O.value,v):r.push(O),g&&validateElement(O,b)}),new FormData(_).forEach(function(O,R){O instanceof File&&O.name===""||addValueToFormData(R,O,v)}))}}function validateElement(r,v){const b=r;b.willValidate&&(triggerEvent(b,"htmx:validation:validate"),b.checkValidity()||(v.push({elt:b,message:b.validationMessage,validity:b.validity}),triggerEvent(b,"htmx:validation:failed",{message:b.validationMessage,validity:b.validity})))}function overrideFormData(r,v){for(const b of v.keys())r.delete(b);return v.forEach(function(b,_){r.append(_,b)}),r}function getInputValues(r,v){const b=[],_=new FormData,g=new FormData,O=[],R=getInternalData(r);R.lastButtonClicked&&!bodyContains(R.lastButtonClicked)&&(R.lastButtonClicked=null);let J=r instanceof HTMLFormElement&&r.noValidate!==!0||getAttributeValue(r,"hx-validate")==="true";if(R.lastButtonClicked&&(J=J&&R.lastButtonClicked.formNoValidate!==!0),v!=="get"&&processInputValue(b,g,O,closest(r,"form"),J),processInputValue(b,_,O,r,J),R.lastButtonClicked||r.tagName==="BUTTON"||r.tagName==="INPUT"&&getRawAttribute(r,"type")==="submit"){const C=R.lastButtonClicked||r,we=getRawAttribute(C,"name");addValueToFormData(we,C.value,g)}const Z=findAttributeTargets(r,"hx-include");return forEach(Z,function(C){processInputValue(b,_,O,asElement(C),J),matches(C,"form")||forEach(asParentNode(C).querySelectorAll(INPUT_SELECTOR),function(we){processInputValue(b,_,O,we,J)})}),overrideFormData(_,g),{errors:O,formData:_,values:formDataProxy(_)}}function appendParam(r,v,b){r!==""&&(r+="&"),String(b)==="[object Object]"&&(b=JSON.stringify(b));const _=encodeURIComponent(b);return r+=encodeURIComponent(v)+"="+_,r}function urlEncode(r){r=formDataFromObject(r);let v="";return r.forEach(function(b,_){v=appendParam(v,_,b)}),v}function getHeaders(r,v,b){const _={"HX-Request":"true","HX-Trigger":getRawAttribute(r,"id"),"HX-Trigger-Name":getRawAttribute(r,"name"),"HX-Target":getAttributeValue(v,"id"),"HX-Current-URL":getDocument().location.href};return getValuesForElement(r,"hx-headers",!1,_),b!==void 0&&(_["HX-Prompt"]=b),getInternalData(r).boosted&&(_["HX-Boosted"]="true"),_}function filterValues(r,v){const b=getClosestAttributeValue(v,"hx-params");if(b){if(b==="none")return new FormData;if(b==="*")return r;if(b.indexOf("not ")===0)return forEach(b.slice(4).split(","),function(_){_=_.trim(),r.delete(_)}),r;{const _=new FormData;return forEach(b.split(","),function(g){g=g.trim(),r.has(g)&&r.getAll(g).forEach(function(O){_.append(g,O)})}),_}}else return r}function isAnchorLink(r){return!!getRawAttribute(r,"href")&&getRawAttribute(r,"href").indexOf("#")>=0}function getSwapSpecification(r,v){const b=v||getClosestAttributeValue(r,"hx-swap"),_={swapStyle:getInternalData(r).boosted?"innerHTML":htmx.config.defaultSwapStyle,swapDelay:htmx.config.defaultSwapDelay,settleDelay:htmx.config.defaultSettleDelay};if(htmx.config.scrollIntoViewOnBoost&&getInternalData(r).boosted&&!isAnchorLink(r)&&(_.show="top"),b){const R=splitOnWhitespace(b);if(R.length>0)for(let J=0;J<R.length;J++){const Z=R[J];if(Z.indexOf("swap:")===0)_.swapDelay=parseInterval(Z.slice(5));else if(Z.indexOf("settle:")===0)_.settleDelay=parseInterval(Z.slice(7));else if(Z.indexOf("transition:")===0)_.transition=Z.slice(11)==="true";else if(Z.indexOf("ignoreTitle:")===0)_.ignoreTitle=Z.slice(12)==="true";else if(Z.indexOf("scroll:")===0){var g=Z.slice(7).split(":");const we=g.pop();var O=g.length>0?g.join(":"):null;_.scroll=we,_.scrollTarget=O}else if(Z.indexOf("show:")===0){var g=Z.slice(5).split(":");const Be=g.pop();var O=g.length>0?g.join(":"):null;_.show=Be,_.showTarget=O}else if(Z.indexOf("focus-scroll:")===0){const C=Z.slice(13);_.focusScroll=C=="true"}else J==0?_.swapStyle=Z:logError("Unknown modifier in hx-swap: "+Z)}}return _}function usesFormData(r){return getClosestAttributeValue(r,"hx-encoding")==="multipart/form-data"||matches(r,"form")&&getRawAttribute(r,"enctype")==="multipart/form-data"}function encodeParamsForBody(r,v,b){let _=null;return withExtensions(v,function(g){_==null&&(_=g.encodeParameters(r,b,v))}),_??(usesFormData(v)?overrideFormData(new FormData,formDataFromObject(b)):urlEncode(b))}function makeSettleInfo(r){return{tasks:[],elts:[r]}}function updateScrollState(r,v){const b=r[0],_=r[r.length-1];if(v.scroll){var g=null;v.scrollTarget&&(g=asElement(querySelectorExt(b,v.scrollTarget))),v.scroll==="top"&&(b||g)&&(g=g||b,g.scrollTop=0),v.scroll==="bottom"&&(_||g)&&(g=g||_,g.scrollTop=g.scrollHeight)}if(v.show){var g=null;if(v.showTarget){let R=v.showTarget;v.showTarget==="window"&&(R="body"),g=asElement(querySelectorExt(b,R))}v.show==="top"&&(b||g)&&(g=g||b,g.scrollIntoView({block:"start",behavior:htmx.config.scrollBehavior})),v.show==="bottom"&&(_||g)&&(g=g||_,g.scrollIntoView({block:"end",behavior:htmx.config.scrollBehavior}))}}function getValuesForElement(r,v,b,_){if(_==null&&(_={}),r==null)return _;const g=getAttributeValue(r,v);if(g){let O=g.trim(),R=b;if(O==="unset")return null;O.indexOf("javascript:")===0?(O=O.slice(11),R=!0):O.indexOf("js:")===0&&(O=O.slice(3),R=!0),O.indexOf("{")!==0&&(O="{"+O+"}");let J;R?J=maybeEval(r,function(){return Function("return ("+O+")")()},{}):J=parseJSON(O);for(const Z in J)J.hasOwnProperty(Z)&&_[Z]==null&&(_[Z]=J[Z])}return getValuesForElement(asElement(parentElt(r)),v,b,_)}function maybeEval(r,v,b){return htmx.config.allowEval?v():(triggerErrorEvent(r,"htmx:evalDisallowedError"),b)}function getHXVarsForElement(r,v){return getValuesForElement(r,"hx-vars",!0,v)}function getHXValsForElement(r,v){return getValuesForElement(r,"hx-vals",!1,v)}function getExpressionVars(r){return mergeObjects(getHXVarsForElement(r),getHXValsForElement(r))}function safelySetHeaderValue(r,v,b){if(b!==null)try{r.setRequestHeader(v,b)}catch{r.setRequestHeader(v,encodeURIComponent(b)),r.setRequestHeader(v+"-URI-AutoEncoded","true")}}function getPathFromResponse(r){if(r.responseURL&&typeof URL<"u")try{const v=new URL(r.responseURL);return v.pathname+v.search}catch{triggerErrorEvent(getDocument().body,"htmx:badResponseUrl",{url:r.responseURL})}}function hasHeader(r,v){return v.test(r.getAllResponseHeaders())}function ajaxHelper(r,v,b){if(r=r.toLowerCase(),b){if(b instanceof Element||typeof b=="string")return issueAjaxRequest(r,v,null,null,{targetOverride:resolveTarget(b)||DUMMY_ELT,returnPromise:!0});{let _=resolveTarget(b.target);return(b.target&&!_||b.source&&!_&&!resolveTarget(b.source))&&(_=DUMMY_ELT),issueAjaxRequest(r,v,resolveTarget(b.source),b.event,{handler:b.handler,headers:b.headers,values:b.values,targetOverride:_,swapOverride:b.swap,select:b.select,returnPromise:!0})}}else return issueAjaxRequest(r,v,null,null,{returnPromise:!0})}function hierarchyForElt(r){const v=[];for(;r;)v.push(r),r=r.parentElement;return v}function verifyPath(r,v,b){let _,g;return typeof URL=="function"?(g=new URL(v,document.location.href),_=document.location.origin===g.origin):(g=v,_=startsWith(v,document.location.origin)),htmx.config.selfRequestsOnly&&!_?!1:triggerEvent(r,"htmx:validateUrl",mergeObjects({url:g,sameHost:_},b))}function formDataFromObject(r){if(r instanceof FormData)return r;const v=new FormData;for(const b in r)r.hasOwnProperty(b)&&(r[b]&&typeof r[b].forEach=="function"?r[b].forEach(function(_){v.append(b,_)}):typeof r[b]=="object"&&!(r[b]instanceof Blob)?v.append(b,JSON.stringify(r[b])):v.append(b,r[b]));return v}function formDataArrayProxy(r,v,b){return new Proxy(b,{get:function(_,g){return typeof g=="number"?_[g]:g==="length"?_.length:g==="push"?function(O){_.push(O),r.append(v,O)}:typeof _[g]=="function"?function(){_[g].apply(_,arguments),r.delete(v),_.forEach(function(O){r.append(v,O)})}:_[g]&&_[g].length===1?_[g][0]:_[g]},set:function(_,g,O){return _[g]=O,r.delete(v),_.forEach(function(R){r.append(v,R)}),!0}})}function formDataProxy(r){return new Proxy(r,{get:function(v,b){if(typeof b=="symbol"){const g=Reflect.get(v,b);return typeof g=="function"?function(){return g.apply(r,arguments)}:g}if(b==="toJSON")return()=>Object.fromEntries(r);if(b in v)return typeof v[b]=="function"?function(){return r[b].apply(r,arguments)}:v[b];const _=r.getAll(b);if(_.length!==0)return _.length===1?_[0]:formDataArrayProxy(v,b,_)},set:function(v,b,_){return typeof b!="string"?!1:(v.delete(b),_&&typeof _.forEach=="function"?_.forEach(function(g){v.append(b,g)}):typeof _=="object"&&!(_ instanceof Blob)?v.append(b,JSON.stringify(_)):v.append(b,_),!0)},deleteProperty:function(v,b){return typeof b=="string"&&v.delete(b),!0},ownKeys:function(v){return Reflect.ownKeys(Object.fromEntries(v))},getOwnPropertyDescriptor:function(v,b){return Reflect.getOwnPropertyDescriptor(Object.fromEntries(v),b)}})}function issueAjaxRequest(r,v,b,_,g,O){let R=null,J=null;if(g=g??{},g.returnPromise&&typeof Promise<"u")var Z=new Promise(function(K,Ee){R=K,J=Ee});b==null&&(b=getDocument().body);const C=g.handler||handleAjaxResponse,we=g.select||null;if(!bodyContains(b))return maybeCall(R),Z;const Be=g.targetOverride||asElement(getTarget(b));if(Be==null||Be==DUMMY_ELT)return triggerErrorEvent(b,"htmx:targetError",{target:getAttributeValue(b,"hx-target")}),maybeCall(J),Z;let Ue=getInternalData(b);const Q=Ue.lastButtonClicked;if(Q){const K=getRawAttribute(Q,"formaction");K!=null&&(v=K);const Ee=getRawAttribute(Q,"formmethod");Ee!=null&&Ee.toLowerCase()!=="dialog"&&(r=Ee)}const Ke=getClosestAttributeValue(b,"hx-confirm");if(O===void 0&&triggerEvent(b,"htmx:confirm",{target:Be,elt:b,path:v,verb:r,triggeringEvent:_,etc:g,issueRequest:function(nt){return issueAjaxRequest(r,v,b,_,g,!!nt)},question:Ke})===!1)return maybeCall(R),Z;let At=b,gt=getClosestAttributeValue(b,"hx-sync"),q=null,ne=!1;if(gt){const K=gt.split(":"),Ee=K[0].trim();if(Ee==="this"?At=findThisElement(b,"hx-sync"):At=asElement(querySelectorExt(b,Ee)),gt=(K[1]||"drop").trim(),Ue=getInternalData(At),gt==="drop"&&Ue.xhr&&Ue.abortable!==!0)return maybeCall(R),Z;if(gt==="abort"){if(Ue.xhr)return maybeCall(R),Z;ne=!0}else gt==="replace"?triggerEvent(At,"htmx:abort"):gt.indexOf("queue")===0&&(q=(gt.split(" ")[1]||"last").trim())}if(Ue.xhr)if(Ue.abortable)triggerEvent(At,"htmx:abort");else{if(q==null){if(_){const K=getInternalData(_);K&&K.triggerSpec&&K.triggerSpec.queue&&(q=K.triggerSpec.queue)}q==null&&(q="last")}return Ue.queuedRequests==null&&(Ue.queuedRequests=[]),q==="first"&&Ue.queuedRequests.length===0?Ue.queuedRequests.push(function(){issueAjaxRequest(r,v,b,_,g)}):q==="all"?Ue.queuedRequests.push(function(){issueAjaxRequest(r,v,b,_,g)}):q==="last"&&(Ue.queuedRequests=[],Ue.queuedRequests.push(function(){issueAjaxRequest(r,v,b,_,g)})),maybeCall(R),Z}const c=new XMLHttpRequest;Ue.xhr=c,Ue.abortable=ne;const W=function(){Ue.xhr=null,Ue.abortable=!1,Ue.queuedRequests!=null&&Ue.queuedRequests.length>0&&Ue.queuedRequests.shift()()},Re=getClosestAttributeValue(b,"hx-prompt");if(Re){var tt=prompt(Re);if(tt===null||!triggerEvent(b,"htmx:prompt",{prompt:tt,target:Be}))return maybeCall(R),W(),Z}if(Ke&&!O&&!confirm(Ke))return maybeCall(R),W(),Z;let st=getHeaders(b,Be,tt);r!=="get"&&!usesFormData(b)&&(st["Content-Type"]="application/x-www-form-urlencoded"),g.headers&&(st=mergeObjects(st,g.headers));const et=getInputValues(b,r);let je=et.errors;const S=et.formData;g.values&&overrideFormData(S,formDataFromObject(g.values));const si=formDataFromObject(getExpressionVars(b)),ct=overrideFormData(S,si);let xt=filterValues(ct,b);htmx.config.getCacheBusterParam&&r==="get"&&xt.set("org.htmx.cache-buster",getRawAttribute(Be,"id")||"true"),(v==null||v==="")&&(v=getDocument().location.href);const ce=getValuesForElement(b,"hx-request"),G=getInternalData(b).boosted;let P=htmx.config.methodsThatUseUrlParams.indexOf(r)>=0;const k={boosted:G,useUrlParams:P,formData:xt,parameters:formDataProxy(xt),unfilteredFormData:ct,unfilteredParameters:formDataProxy(ct),headers:st,target:Be,verb:r,errors:je,withCredentials:g.credentials||ce.credentials||htmx.config.withCredentials,timeout:g.timeout||ce.timeout||htmx.config.timeout,path:v,triggeringEvent:_};if(!triggerEvent(b,"htmx:configRequest",k))return maybeCall(R),W(),Z;if(v=k.path,r=k.verb,st=k.headers,xt=formDataFromObject(k.parameters),je=k.errors,P=k.useUrlParams,je&&je.length>0)return triggerEvent(b,"htmx:validation:halted",k),maybeCall(R),W(),Z;const N=v.split("#"),Y=N[0],ve=N[1];let Oe=v;if(P&&(Oe=Y,!xt.keys().next().done&&(Oe.indexOf("?")<0?Oe+="?":Oe+="&",Oe+=urlEncode(xt),ve&&(Oe+="#"+ve))),!verifyPath(b,Oe,k))return triggerErrorEvent(b,"htmx:invalidPath",k),maybeCall(J),Z;if(c.open(r.toUpperCase(),Oe,!0),c.overrideMimeType("text/html"),c.withCredentials=k.withCredentials,c.timeout=k.timeout,!ce.noHeaders){for(const K in st)if(st.hasOwnProperty(K)){const Ee=st[K];safelySetHeaderValue(c,K,Ee)}}const Ne={xhr:c,target:Be,requestConfig:k,etc:g,boosted:G,select:we,pathInfo:{requestPath:v,finalRequestPath:Oe,responsePath:null,anchor:ve}};if(c.onload=function(){try{const K=hierarchyForElt(b);if(Ne.pathInfo.responsePath=getPathFromResponse(c),C(b,Ne),Ne.keepIndicators!==!0&&removeRequestIndicators(Ve,Ye),triggerEvent(b,"htmx:afterRequest",Ne),triggerEvent(b,"htmx:afterOnLoad",Ne),!bodyContains(b)){let Ee=null;for(;K.length>0&&Ee==null;){const nt=K.shift();bodyContains(nt)&&(Ee=nt)}Ee&&(triggerEvent(Ee,"htmx:afterRequest",Ne),triggerEvent(Ee,"htmx:afterOnLoad",Ne))}maybeCall(R),W()}catch(K){throw triggerErrorEvent(b,"htmx:onLoadError",mergeObjects({error:K},Ne)),K}},c.onerror=function(){removeRequestIndicators(Ve,Ye),triggerErrorEvent(b,"htmx:afterRequest",Ne),triggerErrorEvent(b,"htmx:sendError",Ne),maybeCall(J),W()},c.onabort=function(){removeRequestIndicators(Ve,Ye),triggerErrorEvent(b,"htmx:afterRequest",Ne),triggerErrorEvent(b,"htmx:sendAbort",Ne),maybeCall(J),W()},c.ontimeout=function(){removeRequestIndicators(Ve,Ye),triggerErrorEvent(b,"htmx:afterRequest",Ne),triggerErrorEvent(b,"htmx:timeout",Ne),maybeCall(J),W()},!triggerEvent(b,"htmx:beforeRequest",Ne))return maybeCall(R),W(),Z;var Ve=addRequestIndicatorClasses(b),Ye=disableElements(b);forEach(["loadstart","loadend","progress","abort"],function(K){forEach([c,c.upload],function(Ee){Ee.addEventListener(K,function(nt){triggerEvent(b,"htmx:xhr:"+K,{lengthComputable:nt.lengthComputable,loaded:nt.loaded,total:nt.total})})})}),triggerEvent(b,"htmx:beforeSend",Ne);const Lt=P?null:encodeParamsForBody(c,b,xt);return c.send(Lt),Z}function determineHistoryUpdates(r,v){const b=v.xhr;let _=null,g=null;if(hasHeader(b,/HX-Push:/i)?(_=b.getResponseHeader("HX-Push"),g="push"):hasHeader(b,/HX-Push-Url:/i)?(_=b.getResponseHeader("HX-Push-Url"),g="push"):hasHeader(b,/HX-Replace-Url:/i)&&(_=b.getResponseHeader("HX-Replace-Url"),g="replace"),_)return _==="false"?{}:{type:g,path:_};const O=v.pathInfo.finalRequestPath,R=v.pathInfo.responsePath,J=getClosestAttributeValue(r,"hx-push-url"),Z=getClosestAttributeValue(r,"hx-replace-url"),C=getInternalData(r).boosted;let we=null,Be=null;return J?(we="push",Be=J):Z?(we="replace",Be=Z):C&&(we="push",Be=R||O),Be?Be==="false"?{}:(Be==="true"&&(Be=R||O),v.pathInfo.anchor&&Be.indexOf("#")===-1&&(Be=Be+"#"+v.pathInfo.anchor),{type:we,path:Be}):{}}function codeMatches(r,v){var b=new RegExp(r.code);return b.test(v.toString(10))}function resolveResponseHandling(r){for(var v=0;v<htmx.config.responseHandling.length;v++){var b=htmx.config.responseHandling[v];if(codeMatches(b,r.status))return b}return{swap:!1}}function handleTitle(r){if(r){const v=find("title");v?v.innerHTML=r:window.document.title=r}}function handleAjaxResponse(r,v){const b=v.xhr;let _=v.target;const g=v.etc,O=v.select;if(!triggerEvent(r,"htmx:beforeOnLoad",v))return;if(hasHeader(b,/HX-Trigger:/i)&&handleTriggerHeader(b,"HX-Trigger",r),hasHeader(b,/HX-Location:/i)){saveCurrentPageToHistory();let ne=b.getResponseHeader("HX-Location");var R;ne.indexOf("{")===0&&(R=parseJSON(ne),ne=R.path,delete R.path),ajaxHelper("get",ne,R).then(function(){pushUrlIntoHistory(ne)});return}const J=hasHeader(b,/HX-Refresh:/i)&&b.getResponseHeader("HX-Refresh")==="true";if(hasHeader(b,/HX-Redirect:/i)){v.keepIndicators=!0,location.href=b.getResponseHeader("HX-Redirect"),J&&location.reload();return}if(J){v.keepIndicators=!0,location.reload();return}hasHeader(b,/HX-Retarget:/i)&&(b.getResponseHeader("HX-Retarget")==="this"?v.target=r:v.target=asElement(querySelectorExt(r,b.getResponseHeader("HX-Retarget"))));const Z=determineHistoryUpdates(r,v),C=resolveResponseHandling(b),we=C.swap;let Be=!!C.error,Ue=htmx.config.ignoreTitle||C.ignoreTitle,Q=C.select;C.target&&(v.target=asElement(querySelectorExt(r,C.target)));var Ke=g.swapOverride;Ke==null&&C.swapOverride&&(Ke=C.swapOverride),hasHeader(b,/HX-Retarget:/i)&&(b.getResponseHeader("HX-Retarget")==="this"?v.target=r:v.target=asElement(querySelectorExt(r,b.getResponseHeader("HX-Retarget")))),hasHeader(b,/HX-Reswap:/i)&&(Ke=b.getResponseHeader("HX-Reswap"));var At=b.response,gt=mergeObjects({shouldSwap:we,serverResponse:At,isError:Be,ignoreTitle:Ue,selectOverride:Q,swapOverride:Ke},v);if(!(C.event&&!triggerEvent(_,C.event,gt))&&triggerEvent(_,"htmx:beforeSwap",gt)){if(_=gt.target,At=gt.serverResponse,Be=gt.isError,Ue=gt.ignoreTitle,Q=gt.selectOverride,Ke=gt.swapOverride,v.target=_,v.failed=Be,v.successful=!Be,gt.shouldSwap){b.status===286&&cancelPolling(r),withExtensions(r,function(et){At=et.transformResponse(At,b,r)}),Z.type&&saveCurrentPageToHistory();var q=getSwapSpecification(r,Ke);q.hasOwnProperty("ignoreTitle")||(q.ignoreTitle=Ue),_.classList.add(htmx.config.swappingClass);let ne=null,c=null;O&&(Q=O),hasHeader(b,/HX-Reselect:/i)&&(Q=b.getResponseHeader("HX-Reselect"));const W=getClosestAttributeValue(r,"hx-select-oob"),Re=getClosestAttributeValue(r,"hx-select");let tt=function(){try{Z.type&&(triggerEvent(getDocument().body,"htmx:beforeHistoryUpdate",mergeObjects({history:Z},v)),Z.type==="push"?(pushUrlIntoHistory(Z.path),triggerEvent(getDocument().body,"htmx:pushedIntoHistory",{path:Z.path})):(replaceUrlInHistory(Z.path),triggerEvent(getDocument().body,"htmx:replacedInHistory",{path:Z.path}))),swap(_,At,q,{select:Q||Re,selectOOB:W,eventInfo:v,anchor:v.pathInfo.anchor,contextElement:r,afterSwapCallback:function(){if(hasHeader(b,/HX-Trigger-After-Swap:/i)){let et=r;bodyContains(r)||(et=getDocument().body),handleTriggerHeader(b,"HX-Trigger-After-Swap",et)}},afterSettleCallback:function(){if(hasHeader(b,/HX-Trigger-After-Settle:/i)){let et=r;bodyContains(r)||(et=getDocument().body),handleTriggerHeader(b,"HX-Trigger-After-Settle",et)}maybeCall(ne)}})}catch(et){throw triggerErrorEvent(r,"htmx:swapError",v),maybeCall(c),et}},st=htmx.config.globalViewTransitions;if(q.hasOwnProperty("transition")&&(st=q.transition),st&&triggerEvent(r,"htmx:beforeTransition",v)&&typeof Promise<"u"&&document.startViewTransition){const et=new Promise(function(S,si){ne=S,c=si}),je=tt;tt=function(){document.startViewTransition(function(){return je(),et})}}q.swapDelay>0?getWindow().setTimeout(tt,q.swapDelay):tt()}Be&&triggerErrorEvent(r,"htmx:responseError",mergeObjects({error:"Response Status Error Code "+b.status+" from "+v.pathInfo.requestPath},v))}}const extensions={};function extensionBase(){return{init:function(r){return null},getSelectors:function(){return null},onEvent:function(r,v){return!0},transformResponse:function(r,v,b){return r},isInlineSwap:function(r){return!1},handleSwap:function(r,v,b,_){return!1},encodeParameters:function(r,v,b){return null}}}function defineExtension(r,v){v.init&&v.init(internalAPI),extensions[r]=mergeObjects(extensionBase(),v)}function removeExtension(r){delete extensions[r]}function getExtensions(r,v,b){if(v==null&&(v=[]),r==null)return v;b==null&&(b=[]);const _=getAttributeValue(r,"hx-ext");return _&&forEach(_.split(","),function(g){if(g=g.replace(/ /g,""),g.slice(0,7)=="ignore:"){b.push(g.slice(7));return}if(b.indexOf(g)<0){const O=extensions[g];O&&v.indexOf(O)<0&&v.push(O)}}),getExtensions(asElement(parentElt(r)),v,b)}var isReady=!1;getDocument().addEventListener("DOMContentLoaded",function(){isReady=!0});function ready(r){isReady||getDocument().readyState==="complete"?r():getDocument().addEventListener("DOMContentLoaded",r)}function insertIndicatorStyles(){if(htmx.config.includeIndicatorStyles!==!1){const r=htmx.config.inlineStyleNonce?` nonce="${htmx.config.inlineStyleNonce}"`:"";getDocument().head.insertAdjacentHTML("beforeend","<style"+r+">      ."+htmx.config.indicatorClass+"{opacity:0}      ."+htmx.config.requestClass+" ."+htmx.config.indicatorClass+"{opacity:1; transition: opacity 200ms ease-in;}      ."+htmx.config.requestClass+"."+htmx.config.indicatorClass+"{opacity:1; transition: opacity 200ms ease-in;}      </style>")}}function getMetaConfig(){const r=getDocument().querySelector('meta[name="htmx-config"]');return r?parseJSON(r.content):null}function mergeMetaConfig(){const r=getMetaConfig();r&&(htmx.config=mergeObjects(htmx.config,r))}return ready(function(){mergeMetaConfig(),insertIndicatorStyles();let r=getDocument().body;processNode(r);const v=getDocument().querySelectorAll("[hx-trigger='restored'],[data-hx-trigger='restored']");r.addEventListener("htmx:abort",function(_){const g=_.target,O=getInternalData(g);O&&O.xhr&&O.xhr.abort()});const b=window.onpopstate?window.onpopstate.bind(window):null;window.onpopstate=function(_){_.state&&_.state.htmx?(restoreHistory(),forEach(v,function(g){triggerEvent(g,"htmx:restored",{document:getDocument(),triggerEvent})})):b&&b(_)},getWindow().setTimeout(function(){triggerEvent(r,"htmx:load",{}),r=null},0)}),htmx}();__webpack_exports__.A=htmx},"./node_modules/jquery/dist/jquery.js":function(r,v){var b,_;(function(g,O){"use strict";typeof r.exports=="object"?r.exports=g.document?O(g,!0):function(R){if(!R.document)throw new Error("jQuery requires a window with a document");return O(R)}:O(g)})(typeof window<"u"?window:this,function(g,O){"use strict";var R=[],J=Object.getPrototypeOf,Z=R.slice,C=R.flat?function(o){return R.flat.call(o)}:function(o){return R.concat.apply([],o)},we=R.push,Be=R.indexOf,Ue={},Q=Ue.toString,Ke=Ue.hasOwnProperty,At=Ke.toString,gt=At.call(Object),q={},ne=function(d){return typeof d=="function"&&typeof d.nodeType!="number"&&typeof d.item!="function"},c=function(d){return d!=null&&d===d.window},W=g.document,Re={type:!0,src:!0,nonce:!0,noModule:!0};function tt(o,d,w){w=w||W;var E,M,D=w.createElement("script");if(D.text=o,d)for(E in Re)M=d[E]||d.getAttribute&&d.getAttribute(E),M&&D.setAttribute(E,M);w.head.appendChild(D).parentNode.removeChild(D)}function st(o){return o==null?o+"":typeof o=="object"||typeof o=="function"?Ue[Q.call(o)]||"object":typeof o}var et="3.7.1",je=/HTML$/i,S=function(o,d){return new S.fn.init(o,d)};S.fn=S.prototype={jquery:et,constructor:S,length:0,toArray:function(){return Z.call(this)},get:function(o){return o==null?Z.call(this):o<0?this[o+this.length]:this[o]},pushStack:function(o){var d=S.merge(this.constructor(),o);return d.prevObject=this,d},each:function(o){return S.each(this,o)},map:function(o){return this.pushStack(S.map(this,function(d,w){return o.call(d,w,d)}))},slice:function(){return this.pushStack(Z.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(S.grep(this,function(o,d){return(d+1)%2}))},odd:function(){return this.pushStack(S.grep(this,function(o,d){return d%2}))},eq:function(o){var d=this.length,w=+o+(o<0?d:0);return this.pushStack(w>=0&&w<d?[this[w]]:[])},end:function(){return this.prevObject||this.constructor()},push:we,sort:R.sort,splice:R.splice},S.extend=S.fn.extend=function(){var o,d,w,E,M,D,V=arguments[0]||{},fe=1,le=arguments.length,Me=!1;for(typeof V=="boolean"&&(Me=V,V=arguments[fe]||{},fe++),typeof V!="object"&&!ne(V)&&(V={}),fe===le&&(V=this,fe--);fe<le;fe++)if((o=arguments[fe])!=null)for(d in o)E=o[d],!(d==="__proto__"||V===E)&&(Me&&E&&(S.isPlainObject(E)||(M=Array.isArray(E)))?(w=V[d],M&&!Array.isArray(w)?D=[]:!M&&!S.isPlainObject(w)?D={}:D=w,M=!1,V[d]=S.extend(Me,D,E)):E!==void 0&&(V[d]=E));return V},S.extend({expando:"jQuery"+(et+Math.random()).replace(/\D/g,""),isReady:!0,error:function(o){throw new Error(o)},noop:function(){},isPlainObject:function(o){var d,w;return!o||Q.call(o)!=="[object Object]"?!1:(d=J(o),d?(w=Ke.call(d,"constructor")&&d.constructor,typeof w=="function"&&At.call(w)===gt):!0)},isEmptyObject:function(o){var d;for(d in o)return!1;return!0},globalEval:function(o,d,w){tt(o,{nonce:d&&d.nonce},w)},each:function(o,d){var w,E=0;if(si(o))for(w=o.length;E<w&&d.call(o[E],E,o[E])!==!1;E++);else for(E in o)if(d.call(o[E],E,o[E])===!1)break;return o},text:function(o){var d,w="",E=0,M=o.nodeType;if(!M)for(;d=o[E++];)w+=S.text(d);return M===1||M===11?o.textContent:M===9?o.documentElement.textContent:M===3||M===4?o.nodeValue:w},makeArray:function(o,d){var w=d||[];return o!=null&&(si(Object(o))?S.merge(w,typeof o=="string"?[o]:o):we.call(w,o)),w},inArray:function(o,d,w){return d==null?-1:Be.call(d,o,w)},isXMLDoc:function(o){var d=o&&o.namespaceURI,w=o&&(o.ownerDocument||o).documentElement;return!je.test(d||w&&w.nodeName||"HTML")},merge:function(o,d){for(var w=+d.length,E=0,M=o.length;E<w;E++)o[M++]=d[E];return o.length=M,o},grep:function(o,d,w){for(var E,M=[],D=0,V=o.length,fe=!w;D<V;D++)E=!d(o[D],D),E!==fe&&M.push(o[D]);return M},map:function(o,d,w){var E,M,D=0,V=[];if(si(o))for(E=o.length;D<E;D++)M=d(o[D],D,w),M!=null&&V.push(M);else for(D in o)M=d(o[D],D,w),M!=null&&V.push(M);return C(V)},guid:1,support:q}),typeof Symbol=="function"&&(S.fn[Symbol.iterator]=R[Symbol.iterator]),S.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(o,d){Ue["[object "+d+"]"]=d.toLowerCase()});function si(o){var d=!!o&&"length"in o&&o.length,w=st(o);return ne(o)||c(o)?!1:w==="array"||d===0||typeof d=="number"&&d>0&&d-1 in o}function ct(o,d){return o.nodeName&&o.nodeName.toLowerCase()===d.toLowerCase()}var xt=R.pop,ce=R.sort,G=R.splice,P="[\\x20\\t\\r\\n\\f]",k=new RegExp("^"+P+"+|((?:^|[^\\\\])(?:\\\\.)*)"+P+"+$","g");S.contains=function(o,d){var w=d&&d.parentNode;return o===w||!!(w&&w.nodeType===1&&(o.contains?o.contains(w):o.compareDocumentPosition&&o.compareDocumentPosition(w)&16))};var N=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g;function Y(o,d){return d?o==="\0"?"\uFFFD":o.slice(0,-1)+"\\"+o.charCodeAt(o.length-1).toString(16)+" ":"\\"+o}S.escapeSelector=function(o){return(o+"").replace(N,Y)};var ve=W,Oe=we;(function(){var o,d,w,E,M,D=Oe,V,fe,le,Me,Ze,Ae=S.expando,ke=0,Tt=0,_i=bo(),$i=bo(),Ei=bo(),In=bo(),Xi=function(re,xe){return re===xe&&(M=!0),0},Sr="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",rr="(?:\\\\[\\da-fA-F]{1,6}"+P+"?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",Pi="\\["+P+"*("+rr+")(?:"+P+"*([*^$|!~]?=)"+P+`*(?:'((?:\\\\.|[^\\\\'])*)'|"((?:\\\\.|[^\\\\"])*)"|(`+rr+"))|)"+P+"*\\]",Nn=":("+rr+`)(?:\\((('((?:\\\\.|[^\\\\'])*)'|"((?:\\\\.|[^\\\\"])*)")|((?:\\\\.|[^\\\\()[\\]]|`+Pi+")*)|.*)\\)|)",ki=new RegExp(P+"+","g"),Fi=new RegExp("^"+P+"*,"+P+"*"),Or=new RegExp("^"+P+"*([>+~]|"+P+")"+P+"*"),or=new RegExp(P+"|>"),ls=new RegExp(Nn),Fs=new RegExp("^"+rr+"$"),cs={ID:new RegExp("^#("+rr+")"),CLASS:new RegExp("^\\.("+rr+")"),TAG:new RegExp("^("+rr+"|[*])"),ATTR:new RegExp("^"+Pi),PSEUDO:new RegExp("^"+Nn),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+P+"*(even|odd|(([+-]|)(\\d*)n|)"+P+"*(?:([+-]|)"+P+"*(\\d+)|))"+P+"*\\)|)","i"),bool:new RegExp("^(?:"+Sr+")$","i"),needsContext:new RegExp("^"+P+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+P+"*((?:-\\d)?\\d*)"+P+"*\\)|)(?=[^-]|$)","i")},Rs=/^(?:input|select|textarea|button)$/i,ws=/^h\d$/i,Zn=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,Wo=/[+~]/,Is=new RegExp("\\\\[\\da-fA-F]{1,6}"+P+"?|\\\\([^\\r\\n\\f])","g"),Vi=function(re,xe){var We="0x"+re.slice(1)-65536;return xe||(We<0?String.fromCharCode(We+65536):String.fromCharCode(We>>10|55296,We&1023|56320))},Ms=function(){lr()},vo=zn(function(re){return re.disabled===!0&&ct(re,"fieldset")},{dir:"parentNode",next:"legend"});function ar(){try{return V.activeElement}catch{}}try{D.apply(R=Z.call(ve.childNodes),ve.childNodes),R[ve.childNodes.length].nodeType}catch{D={apply:function(xe,We){Oe.apply(xe,Z.call(We))},call:function(xe){Oe.apply(xe,Z.call(arguments,1))}}}function Wi(re,xe,We,Xe){var at,qt,$t,Zt,Vt,Ti,pi,yi=xe&&xe.ownerDocument,Mi=xe?xe.nodeType:9;if(We=We||[],typeof re!="string"||!re||Mi!==1&&Mi!==9&&Mi!==11)return We;if(!Xe&&(lr(xe),xe=xe||V,le)){if(Mi!==11&&(Vt=Zn.exec(re)))if(at=Vt[1]){if(Mi===9)if($t=xe.getElementById(at)){if($t.id===at)return D.call(We,$t),We}else return We;else if(yi&&($t=yi.getElementById(at))&&Wi.contains(xe,$t)&&$t.id===at)return D.call(We,$t),We}else{if(Vt[2])return D.apply(We,xe.getElementsByTagName(re)),We;if((at=Vt[3])&&xe.getElementsByClassName)return D.apply(We,xe.getElementsByClassName(at)),We}if(!In[re+" "]&&(!Me||!Me.test(re))){if(pi=re,yi=xe,Mi===1&&(or.test(re)||Or.test(re))){for(yi=Wo.test(re)&&to(xe.parentNode)||xe,(yi!=xe||!q.scope)&&((Zt=xe.getAttribute("id"))?Zt=S.escapeSelector(Zt):xe.setAttribute("id",Zt=Ae)),Ti=Bn(re),qt=Ti.length;qt--;)Ti[qt]=(Zt?"#"+Zt:":scope")+" "+es(Ti[qt]);pi=Ti.join(",")}try{return D.apply(We,yi.querySelectorAll(pi)),We}catch{In(re,!0)}finally{Zt===Ae&&xe.removeAttribute("id")}}}return Wr(re.replace(k,"$1"),xe,We,Xe)}function bo(){var re=[];function xe(We,Xe){return re.push(We+" ")>d.cacheLength&&delete xe[re.shift()],xe[We+" "]=Xe}return xe}function Ns(re){return re[Ae]=!0,re}function us(re){var xe=V.createElement("fieldset");try{return!!re(xe)}catch{return!1}finally{xe.parentNode&&xe.parentNode.removeChild(xe),xe=null}}function _o(re){return function(xe){return ct(xe,"input")&&xe.type===re}}function Zr(re){return function(xe){return(ct(xe,"input")||ct(xe,"button"))&&xe.type===re}}function eo(re){return function(xe){return"form"in xe?xe.parentNode&&xe.disabled===!1?"label"in xe?"label"in xe.parentNode?xe.parentNode.disabled===re:xe.disabled===re:xe.isDisabled===re||xe.isDisabled!==!re&&vo(xe)===re:xe.disabled===re:"label"in xe?xe.disabled===re:!1}}function xr(re){return Ns(function(xe){return xe=+xe,Ns(function(We,Xe){for(var at,qt=re([],We.length,xe),$t=qt.length;$t--;)We[at=qt[$t]]&&(We[at]=!(Xe[at]=We[at]))})})}function to(re){return re&&typeof re.getElementsByTagName<"u"&&re}function lr(re){var xe,We=re?re.ownerDocument||re:ve;return We==V||We.nodeType!==9||!We.documentElement||(V=We,fe=V.documentElement,le=!S.isXMLDoc(V),Ze=fe.matches||fe.webkitMatchesSelector||fe.msMatchesSelector,fe.msMatchesSelector&&ve!=V&&(xe=V.defaultView)&&xe.top!==xe&&xe.addEventListener("unload",Ms),q.getById=us(function(Xe){return fe.appendChild(Xe).id=S.expando,!V.getElementsByName||!V.getElementsByName(S.expando).length}),q.disconnectedMatch=us(function(Xe){return Ze.call(Xe,"*")}),q.scope=us(function(){return V.querySelectorAll(":scope")}),q.cssHas=us(function(){try{return V.querySelector(":has(*,:jqfake)"),!1}catch{return!0}}),q.getById?(d.filter.ID=function(Xe){var at=Xe.replace(Is,Vi);return function(qt){return qt.getAttribute("id")===at}},d.find.ID=function(Xe,at){if(typeof at.getElementById<"u"&&le){var qt=at.getElementById(Xe);return qt?[qt]:[]}}):(d.filter.ID=function(Xe){var at=Xe.replace(Is,Vi);return function(qt){var $t=typeof qt.getAttributeNode<"u"&&qt.getAttributeNode("id");return $t&&$t.value===at}},d.find.ID=function(Xe,at){if(typeof at.getElementById<"u"&&le){var qt,$t,Zt,Vt=at.getElementById(Xe);if(Vt){if(qt=Vt.getAttributeNode("id"),qt&&qt.value===Xe)return[Vt];for(Zt=at.getElementsByName(Xe),$t=0;Vt=Zt[$t++];)if(qt=Vt.getAttributeNode("id"),qt&&qt.value===Xe)return[Vt]}return[]}}),d.find.TAG=function(Xe,at){return typeof at.getElementsByTagName<"u"?at.getElementsByTagName(Xe):at.querySelectorAll(Xe)},d.find.CLASS=function(Xe,at){if(typeof at.getElementsByClassName<"u"&&le)return at.getElementsByClassName(Xe)},Me=[],us(function(Xe){var at;fe.appendChild(Xe).innerHTML="<a id='"+Ae+"' href='' disabled='disabled'></a><select id='"+Ae+"-\r\\' disabled='disabled'><option selected=''></option></select>",Xe.querySelectorAll("[selected]").length||Me.push("\\["+P+"*(?:value|"+Sr+")"),Xe.querySelectorAll("[id~="+Ae+"-]").length||Me.push("~="),Xe.querySelectorAll("a#"+Ae+"+*").length||Me.push(".#.+[+~]"),Xe.querySelectorAll(":checked").length||Me.push(":checked"),at=V.createElement("input"),at.setAttribute("type","hidden"),Xe.appendChild(at).setAttribute("name","D"),fe.appendChild(Xe).disabled=!0,Xe.querySelectorAll(":disabled").length!==2&&Me.push(":enabled",":disabled"),at=V.createElement("input"),at.setAttribute("name",""),Xe.appendChild(at),Xe.querySelectorAll("[name='']").length||Me.push("\\["+P+"*name"+P+"*="+P+`*(?:''|"")`)}),q.cssHas||Me.push(":has"),Me=Me.length&&new RegExp(Me.join("|")),Xi=function(Xe,at){if(Xe===at)return M=!0,0;var qt=!Xe.compareDocumentPosition-!at.compareDocumentPosition;return qt||(qt=(Xe.ownerDocument||Xe)==(at.ownerDocument||at)?Xe.compareDocumentPosition(at):1,qt&1||!q.sortDetached&&at.compareDocumentPosition(Xe)===qt?Xe===V||Xe.ownerDocument==ve&&Wi.contains(ve,Xe)?-1:at===V||at.ownerDocument==ve&&Wi.contains(ve,at)?1:E?Be.call(E,Xe)-Be.call(E,at):0:qt&4?-1:1)}),V}Wi.matches=function(re,xe){return Wi(re,null,null,xe)},Wi.matchesSelector=function(re,xe){if(lr(re),le&&!In[xe+" "]&&(!Me||!Me.test(xe)))try{var We=Ze.call(re,xe);if(We||q.disconnectedMatch||re.document&&re.document.nodeType!==11)return We}catch{In(xe,!0)}return Wi(xe,V,null,[re]).length>0},Wi.contains=function(re,xe){return(re.ownerDocument||re)!=V&&lr(re),S.contains(re,xe)},Wi.attr=function(re,xe){(re.ownerDocument||re)!=V&&lr(re);var We=d.attrHandle[xe.toLowerCase()],Xe=We&&Ke.call(d.attrHandle,xe.toLowerCase())?We(re,xe,!le):void 0;return Xe!==void 0?Xe:re.getAttribute(xe)},Wi.error=function(re){throw new Error("Syntax error, unrecognized expression: "+re)},S.uniqueSort=function(re){var xe,We=[],Xe=0,at=0;if(M=!q.sortStable,E=!q.sortStable&&Z.call(re,0),ce.call(re,Xi),M){for(;xe=re[at++];)xe===re[at]&&(Xe=We.push(at));for(;Xe--;)G.call(re,We[Xe],1)}return E=null,re},S.fn.uniqueSort=function(){return this.pushStack(S.uniqueSort(Z.apply(this)))},d=S.expr={cacheLength:50,createPseudo:Ns,match:cs,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(re){return re[1]=re[1].replace(Is,Vi),re[3]=(re[3]||re[4]||re[5]||"").replace(Is,Vi),re[2]==="~="&&(re[3]=" "+re[3]+" "),re.slice(0,4)},CHILD:function(re){return re[1]=re[1].toLowerCase(),re[1].slice(0,3)==="nth"?(re[3]||Wi.error(re[0]),re[4]=+(re[4]?re[5]+(re[6]||1):2*(re[3]==="even"||re[3]==="odd")),re[5]=+(re[7]+re[8]||re[3]==="odd")):re[3]&&Wi.error(re[0]),re},PSEUDO:function(re){var xe,We=!re[6]&&re[2];return cs.CHILD.test(re[0])?null:(re[3]?re[2]=re[4]||re[5]||"":We&&ls.test(We)&&(xe=Bn(We,!0))&&(xe=We.indexOf(")",We.length-xe)-We.length)&&(re[0]=re[0].slice(0,xe),re[2]=We.slice(0,xe)),re.slice(0,3))}},filter:{TAG:function(re){var xe=re.replace(Is,Vi).toLowerCase();return re==="*"?function(){return!0}:function(We){return ct(We,xe)}},CLASS:function(re){var xe=_i[re+" "];return xe||(xe=new RegExp("(^|"+P+")"+re+"("+P+"|$)"))&&_i(re,function(We){return xe.test(typeof We.className=="string"&&We.className||typeof We.getAttribute<"u"&&We.getAttribute("class")||"")})},ATTR:function(re,xe,We){return function(Xe){var at=Wi.attr(Xe,re);return at==null?xe==="!=":xe?(at+="",xe==="="?at===We:xe==="!="?at!==We:xe==="^="?We&&at.indexOf(We)===0:xe==="*="?We&&at.indexOf(We)>-1:xe==="$="?We&&at.slice(-We.length)===We:xe==="~="?(" "+at.replace(ki," ")+" ").indexOf(We)>-1:xe==="|="?at===We||at.slice(0,We.length+1)===We+"-":!1):!0}},CHILD:function(re,xe,We,Xe,at){var qt=re.slice(0,3)!=="nth",$t=re.slice(-4)!=="last",Zt=xe==="of-type";return Xe===1&&at===0?function(Vt){return!!Vt.parentNode}:function(Vt,Ti,pi){var yi,Mi,ii,Gi,Ss,ts=qt!==$t?"nextSibling":"previousSibling",ds=Vt.parentNode,Hs=Zt&&Vt.nodeName.toLowerCase(),_n=!pi&&!Zt,fs=!1;if(ds){if(qt){for(;ts;){for(ii=Vt;ii=ii[ts];)if(Zt?ct(ii,Hs):ii.nodeType===1)return!1;Ss=ts=re==="only"&&!Ss&&"nextSibling"}return!0}if(Ss=[$t?ds.firstChild:ds.lastChild],$t&&_n){for(Mi=ds[Ae]||(ds[Ae]={}),yi=Mi[re]||[],Gi=yi[0]===ke&&yi[1],fs=Gi&&yi[2],ii=Gi&&ds.childNodes[Gi];ii=++Gi&&ii&&ii[ts]||(fs=Gi=0)||Ss.pop();)if(ii.nodeType===1&&++fs&&ii===Vt){Mi[re]=[ke,Gi,fs];break}}else if(_n&&(Mi=Vt[Ae]||(Vt[Ae]={}),yi=Mi[re]||[],Gi=yi[0]===ke&&yi[1],fs=Gi),fs===!1)for(;(ii=++Gi&&ii&&ii[ts]||(fs=Gi=0)||Ss.pop())&&!((Zt?ct(ii,Hs):ii.nodeType===1)&&++fs&&(_n&&(Mi=ii[Ae]||(ii[Ae]={}),Mi[re]=[ke,fs]),ii===Vt)););return fs-=at,fs===Xe||fs%Xe===0&&fs/Xe>=0}}},PSEUDO:function(re,xe){var We,Xe=d.pseudos[re]||d.setFilters[re.toLowerCase()]||Wi.error("unsupported pseudo: "+re);return Xe[Ae]?Xe(xe):Xe.length>1?(We=[re,re,"",xe],d.setFilters.hasOwnProperty(re.toLowerCase())?Ns(function(at,qt){for(var $t,Zt=Xe(at,xe),Vt=Zt.length;Vt--;)$t=Be.call(at,Zt[Vt]),at[$t]=!(qt[$t]=Zt[Vt])}):function(at){return Xe(at,0,We)}):Xe}},pseudos:{not:Ns(function(re){var xe=[],We=[],Xe=yo(re.replace(k,"$1"));return Xe[Ae]?Ns(function(at,qt,$t,Zt){for(var Vt,Ti=Xe(at,null,Zt,[]),pi=at.length;pi--;)(Vt=Ti[pi])&&(at[pi]=!(qt[pi]=Vt))}):function(at,qt,$t){return xe[0]=at,Xe(xe,null,$t,We),xe[0]=null,!We.pop()}}),has:Ns(function(re){return function(xe){return Wi(re,xe).length>0}}),contains:Ns(function(re){return re=re.replace(Is,Vi),function(xe){return(xe.textContent||S.text(xe)).indexOf(re)>-1}}),lang:Ns(function(re){return Fs.test(re||"")||Wi.error("unsupported lang: "+re),re=re.replace(Is,Vi).toLowerCase(),function(xe){var We;do if(We=le?xe.lang:xe.getAttribute("xml:lang")||xe.getAttribute("lang"))return We=We.toLowerCase(),We===re||We.indexOf(re+"-")===0;while((xe=xe.parentNode)&&xe.nodeType===1);return!1}}),target:function(re){var xe=g.location&&g.location.hash;return xe&&xe.slice(1)===re.id},root:function(re){return re===fe},focus:function(re){return re===ar()&&V.hasFocus()&&!!(re.type||re.href||~re.tabIndex)},enabled:eo(!1),disabled:eo(!0),checked:function(re){return ct(re,"input")&&!!re.checked||ct(re,"option")&&!!re.selected},selected:function(re){return re.parentNode&&re.parentNode.selectedIndex,re.selected===!0},empty:function(re){for(re=re.firstChild;re;re=re.nextSibling)if(re.nodeType<6)return!1;return!0},parent:function(re){return!d.pseudos.empty(re)},header:function(re){return ws.test(re.nodeName)},input:function(re){return Rs.test(re.nodeName)},button:function(re){return ct(re,"input")&&re.type==="button"||ct(re,"button")},text:function(re){var xe;return ct(re,"input")&&re.type==="text"&&((xe=re.getAttribute("type"))==null||xe.toLowerCase()==="text")},first:xr(function(){return[0]}),last:xr(function(re,xe){return[xe-1]}),eq:xr(function(re,xe,We){return[We<0?We+xe:We]}),even:xr(function(re,xe){for(var We=0;We<xe;We+=2)re.push(We);return re}),odd:xr(function(re,xe){for(var We=1;We<xe;We+=2)re.push(We);return re}),lt:xr(function(re,xe,We){var Xe;for(We<0?Xe=We+xe:We>xe?Xe=xe:Xe=We;--Xe>=0;)re.push(Xe);return re}),gt:xr(function(re,xe,We){for(var Xe=We<0?We+xe:We;++Xe<xe;)re.push(Xe);return re})}},d.pseudos.nth=d.pseudos.eq;for(o in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})d.pseudos[o]=_o(o);for(o in{submit:!0,reset:!0})d.pseudos[o]=Zr(o);function Vr(){}Vr.prototype=d.filters=d.pseudos,d.setFilters=new Vr;function Bn(re,xe){var We,Xe,at,qt,$t,Zt,Vt,Ti=$i[re+" "];if(Ti)return xe?0:Ti.slice(0);for($t=re,Zt=[],Vt=d.preFilter;$t;){(!We||(Xe=Fi.exec($t)))&&(Xe&&($t=$t.slice(Xe[0].length)||$t),Zt.push(at=[])),We=!1,(Xe=Or.exec($t))&&(We=Xe.shift(),at.push({value:We,type:Xe[0].replace(k," ")}),$t=$t.slice(We.length));for(qt in d.filter)(Xe=cs[qt].exec($t))&&(!Vt[qt]||(Xe=Vt[qt](Xe)))&&(We=Xe.shift(),at.push({value:We,type:qt,matches:Xe}),$t=$t.slice(We.length));if(!We)break}return xe?$t.length:$t?Wi.error(re):$i(re,Zt).slice(0)}function es(re){for(var xe=0,We=re.length,Xe="";xe<We;xe++)Xe+=re[xe].value;return Xe}function zn(re,xe,We){var Xe=xe.dir,at=xe.next,qt=at||Xe,$t=We&&qt==="parentNode",Zt=Tt++;return xe.first?function(Vt,Ti,pi){for(;Vt=Vt[Xe];)if(Vt.nodeType===1||$t)return re(Vt,Ti,pi);return!1}:function(Vt,Ti,pi){var yi,Mi,ii=[ke,Zt];if(pi){for(;Vt=Vt[Xe];)if((Vt.nodeType===1||$t)&&re(Vt,Ti,pi))return!0}else for(;Vt=Vt[Xe];)if(Vt.nodeType===1||$t)if(Mi=Vt[Ae]||(Vt[Ae]={}),at&&ct(Vt,at))Vt=Vt[Xe]||Vt;else{if((yi=Mi[qt])&&yi[0]===ke&&yi[1]===Zt)return ii[2]=yi[2];if(Mi[qt]=ii,ii[2]=re(Vt,Ti,pi))return!0}return!1}}function Hn(re){return re.length>1?function(xe,We,Xe){for(var at=re.length;at--;)if(!re[at](xe,We,Xe))return!1;return!0}:re[0]}function zo(re,xe,We){for(var Xe=0,at=xe.length;Xe<at;Xe++)Wi(re,xe[Xe],We);return We}function cr(re,xe,We,Xe,at){for(var qt,$t=[],Zt=0,Vt=re.length,Ti=xe!=null;Zt<Vt;Zt++)(qt=re[Zt])&&(!We||We(qt,Xe,at))&&($t.push(qt),Ti&&xe.push(Zt));return $t}function ur(re,xe,We,Xe,at,qt){return Xe&&!Xe[Ae]&&(Xe=ur(Xe)),at&&!at[Ae]&&(at=ur(at,qt)),Ns(function($t,Zt,Vt,Ti){var pi,yi,Mi,ii,Gi=[],Ss=[],ts=Zt.length,ds=$t||zo(xe||"*",Vt.nodeType?[Vt]:Vt,[]),Hs=re&&($t||!xe)?cr(ds,Gi,re,Vt,Ti):ds;if(We?(ii=at||($t?re:ts||Xe)?[]:Zt,We(Hs,ii,Vt,Ti)):ii=Hs,Xe)for(pi=cr(ii,Ss),Xe(pi,[],Vt,Ti),yi=pi.length;yi--;)(Mi=pi[yi])&&(ii[Ss[yi]]=!(Hs[Ss[yi]]=Mi));if($t){if(at||re){if(at){for(pi=[],yi=ii.length;yi--;)(Mi=ii[yi])&&pi.push(Hs[yi]=Mi);at(null,ii=[],pi,Ti)}for(yi=ii.length;yi--;)(Mi=ii[yi])&&(pi=at?Be.call($t,Mi):Gi[yi])>-1&&($t[pi]=!(Zt[pi]=Mi))}}else ii=cr(ii===Zt?ii.splice(ts,ii.length):ii),at?at(null,Zt,ii,Ti):D.apply(Zt,ii)})}function qr(re){for(var xe,We,Xe,at=re.length,qt=d.relative[re[0].type],$t=qt||d.relative[" "],Zt=qt?1:0,Vt=zn(function(yi){return yi===xe},$t,!0),Ti=zn(function(yi){return Be.call(xe,yi)>-1},$t,!0),pi=[function(yi,Mi,ii){var Gi=!qt&&(ii||Mi!=w)||((xe=Mi).nodeType?Vt(yi,Mi,ii):Ti(yi,Mi,ii));return xe=null,Gi}];Zt<at;Zt++)if(We=d.relative[re[Zt].type])pi=[zn(Hn(pi),We)];else{if(We=d.filter[re[Zt].type].apply(null,re[Zt].matches),We[Ae]){for(Xe=++Zt;Xe<at&&!d.relative[re[Xe].type];Xe++);return ur(Zt>1&&Hn(pi),Zt>1&&es(re.slice(0,Zt-1).concat({value:re[Zt-2].type===" "?"*":""})).replace(k,"$1"),We,Zt<Xe&&qr(re.slice(Zt,Xe)),Xe<at&&qr(re=re.slice(Xe)),Xe<at&&es(re))}pi.push(We)}return Hn(pi)}function Vl(re,xe){var We=xe.length>0,Xe=re.length>0,at=function(qt,$t,Zt,Vt,Ti){var pi,yi,Mi,ii=0,Gi="0",Ss=qt&&[],ts=[],ds=w,Hs=qt||Xe&&d.find.TAG("*",Ti),_n=ke+=ds==null?1:Math.random()||.1,fs=Hs.length;for(Ti&&(w=$t==V||$t||Ti);Gi!==fs&&(pi=Hs[Gi])!=null;Gi++){if(Xe&&pi){for(yi=0,!$t&&pi.ownerDocument!=V&&(lr(pi),Zt=!le);Mi=re[yi++];)if(Mi(pi,$t||V,Zt)){D.call(Vt,pi);break}Ti&&(ke=_n)}We&&((pi=!Mi&&pi)&&ii--,qt&&Ss.push(pi))}if(ii+=Gi,We&&Gi!==ii){for(yi=0;Mi=xe[yi++];)Mi(Ss,ts,$t,Zt);if(qt){if(ii>0)for(;Gi--;)Ss[Gi]||ts[Gi]||(ts[Gi]=xt.call(Vt));ts=cr(ts)}D.apply(Vt,ts),Ti&&!qt&&ts.length>0&&ii+xe.length>1&&S.uniqueSort(Vt)}return Ti&&(ke=_n,w=ds),Ss};return We?Ns(at):at}function yo(re,xe){var We,Xe=[],at=[],qt=Ei[re+" "];if(!qt){for(xe||(xe=Bn(re)),We=xe.length;We--;)qt=qr(xe[We]),qt[Ae]?Xe.push(qt):at.push(qt);qt=Ei(re,Vl(at,Xe)),qt.selector=re}return qt}function Wr(re,xe,We,Xe){var at,qt,$t,Zt,Vt,Ti=typeof re=="function"&&re,pi=!Xe&&Bn(re=Ti.selector||re);if(We=We||[],pi.length===1){if(qt=pi[0]=pi[0].slice(0),qt.length>2&&($t=qt[0]).type==="ID"&&xe.nodeType===9&&le&&d.relative[qt[1].type]){if(xe=(d.find.ID($t.matches[0].replace(Is,Vi),xe)||[])[0],xe)Ti&&(xe=xe.parentNode);else return We;re=re.slice(qt.shift().value.length)}for(at=cs.needsContext.test(re)?0:qt.length;at--&&($t=qt[at],!d.relative[Zt=$t.type]);)if((Vt=d.find[Zt])&&(Xe=Vt($t.matches[0].replace(Is,Vi),Wo.test(qt[0].type)&&to(xe.parentNode)||xe))){if(qt.splice(at,1),re=Xe.length&&es(qt),!re)return D.apply(We,Xe),We;break}}return(Ti||yo(re,pi))(Xe,xe,!le,We,!xe||Wo.test(re)&&to(xe.parentNode)||xe),We}q.sortStable=Ae.split("").sort(Xi).join("")===Ae,lr(),q.sortDetached=us(function(re){return re.compareDocumentPosition(V.createElement("fieldset"))&1}),S.find=Wi,S.expr[":"]=S.expr.pseudos,S.unique=S.uniqueSort,Wi.compile=yo,Wi.select=Wr,Wi.setDocument=lr,Wi.tokenize=Bn,Wi.escape=S.escapeSelector,Wi.getText=S.text,Wi.isXML=S.isXMLDoc,Wi.selectors=S.expr,Wi.support=S.support,Wi.uniqueSort=S.uniqueSort})();var Ne=function(o,d,w){for(var E=[],M=w!==void 0;(o=o[d])&&o.nodeType!==9;)if(o.nodeType===1){if(M&&S(o).is(w))break;E.push(o)}return E},Ve=function(o,d){for(var w=[];o;o=o.nextSibling)o.nodeType===1&&o!==d&&w.push(o);return w},Ye=S.expr.match.needsContext,Lt=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function K(o,d,w){return ne(d)?S.grep(o,function(E,M){return!!d.call(E,M,E)!==w}):d.nodeType?S.grep(o,function(E){return E===d!==w}):typeof d!="string"?S.grep(o,function(E){return Be.call(d,E)>-1!==w}):S.filter(d,o,w)}S.filter=function(o,d,w){var E=d[0];return w&&(o=":not("+o+")"),d.length===1&&E.nodeType===1?S.find.matchesSelector(E,o)?[E]:[]:S.find.matches(o,S.grep(d,function(M){return M.nodeType===1}))},S.fn.extend({find:function(o){var d,w,E=this.length,M=this;if(typeof o!="string")return this.pushStack(S(o).filter(function(){for(d=0;d<E;d++)if(S.contains(M[d],this))return!0}));for(w=this.pushStack([]),d=0;d<E;d++)S.find(o,M[d],w);return E>1?S.uniqueSort(w):w},filter:function(o){return this.pushStack(K(this,o||[],!1))},not:function(o){return this.pushStack(K(this,o||[],!0))},is:function(o){return!!K(this,typeof o=="string"&&Ye.test(o)?S(o):o||[],!1).length}});var Ee,nt=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/,te=S.fn.init=function(o,d,w){var E,M;if(!o)return this;if(w=w||Ee,typeof o=="string")if(o[0]==="<"&&o[o.length-1]===">"&&o.length>=3?E=[null,o,null]:E=nt.exec(o),E&&(E[1]||!d))if(E[1]){if(d=d instanceof S?d[0]:d,S.merge(this,S.parseHTML(E[1],d&&d.nodeType?d.ownerDocument||d:W,!0)),Lt.test(E[1])&&S.isPlainObject(d))for(E in d)ne(this[E])?this[E](d[E]):this.attr(E,d[E]);return this}else return M=W.getElementById(E[2]),M&&(this[0]=M,this.length=1),this;else return!d||d.jquery?(d||w).find(o):this.constructor(d).find(o);else{if(o.nodeType)return this[0]=o,this.length=1,this;if(ne(o))return w.ready!==void 0?w.ready(o):o(S)}return S.makeArray(o,this)};te.prototype=S.fn,Ee=S(W);var ee=/^(?:parents|prev(?:Until|All))/,oe={children:!0,contents:!0,next:!0,prev:!0};S.fn.extend({has:function(o){var d=S(o,this),w=d.length;return this.filter(function(){for(var E=0;E<w;E++)if(S.contains(this,d[E]))return!0})},closest:function(o,d){var w,E=0,M=this.length,D=[],V=typeof o!="string"&&S(o);if(!Ye.test(o)){for(;E<M;E++)for(w=this[E];w&&w!==d;w=w.parentNode)if(w.nodeType<11&&(V?V.index(w)>-1:w.nodeType===1&&S.find.matchesSelector(w,o))){D.push(w);break}}return this.pushStack(D.length>1?S.uniqueSort(D):D)},index:function(o){return o?typeof o=="string"?Be.call(S(o),this[0]):Be.call(this,o.jquery?o[0]:o):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(o,d){return this.pushStack(S.uniqueSort(S.merge(this.get(),S(o,d))))},addBack:function(o){return this.add(o==null?this.prevObject:this.prevObject.filter(o))}});function Ge(o,d){for(;(o=o[d])&&o.nodeType!==1;);return o}S.each({parent:function(o){var d=o.parentNode;return d&&d.nodeType!==11?d:null},parents:function(o){return Ne(o,"parentNode")},parentsUntil:function(o,d,w){return Ne(o,"parentNode",w)},next:function(o){return Ge(o,"nextSibling")},prev:function(o){return Ge(o,"previousSibling")},nextAll:function(o){return Ne(o,"nextSibling")},prevAll:function(o){return Ne(o,"previousSibling")},nextUntil:function(o,d,w){return Ne(o,"nextSibling",w)},prevUntil:function(o,d,w){return Ne(o,"previousSibling",w)},siblings:function(o){return Ve((o.parentNode||{}).firstChild,o)},children:function(o){return Ve(o.firstChild)},contents:function(o){return o.contentDocument!=null&&J(o.contentDocument)?o.contentDocument:(ct(o,"template")&&(o=o.content||o),S.merge([],o.childNodes))}},function(o,d){S.fn[o]=function(w,E){var M=S.map(this,d,w);return o.slice(-5)!=="Until"&&(E=w),E&&typeof E=="string"&&(M=S.filter(E,M)),this.length>1&&(oe[o]||S.uniqueSort(M),ee.test(o)&&M.reverse()),this.pushStack(M)}});var yt=/[^\x20\t\r\n\f]+/g;function jt(o){var d={};return S.each(o.match(yt)||[],function(w,E){d[E]=!0}),d}S.Callbacks=function(o){o=typeof o=="string"?jt(o):S.extend({},o);var d,w,E,M,D=[],V=[],fe=-1,le=function(){for(M=M||o.once,E=d=!0;V.length;fe=-1)for(w=V.shift();++fe<D.length;)D[fe].apply(w[0],w[1])===!1&&o.stopOnFalse&&(fe=D.length,w=!1);o.memory||(w=!1),d=!1,M&&(w?D=[]:D="")},Me={add:function(){return D&&(w&&!d&&(fe=D.length-1,V.push(w)),function Ze(Ae){S.each(Ae,function(ke,Tt){ne(Tt)?(!o.unique||!Me.has(Tt))&&D.push(Tt):Tt&&Tt.length&&st(Tt)!=="string"&&Ze(Tt)})}(arguments),w&&!d&&le()),this},remove:function(){return S.each(arguments,function(Ze,Ae){for(var ke;(ke=S.inArray(Ae,D,ke))>-1;)D.splice(ke,1),ke<=fe&&fe--}),this},has:function(Ze){return Ze?S.inArray(Ze,D)>-1:D.length>0},empty:function(){return D&&(D=[]),this},disable:function(){return M=V=[],D=w="",this},disabled:function(){return!D},lock:function(){return M=V=[],!w&&!d&&(D=w=""),this},locked:function(){return!!M},fireWith:function(Ze,Ae){return M||(Ae=Ae||[],Ae=[Ze,Ae.slice?Ae.slice():Ae],V.push(Ae),d||le()),this},fire:function(){return Me.fireWith(this,arguments),this},fired:function(){return!!E}};return Me};function Bt(o){return o}function Qt(o){throw o}function ji(o,d,w,E){var M;try{o&&ne(M=o.promise)?M.call(o).done(d).fail(w):o&&ne(M=o.then)?M.call(o,d,w):d.apply(void 0,[o].slice(E))}catch(D){w.apply(void 0,[D])}}S.extend({Deferred:function(o){var d=[["notify","progress",S.Callbacks("memory"),S.Callbacks("memory"),2],["resolve","done",S.Callbacks("once memory"),S.Callbacks("once memory"),0,"resolved"],["reject","fail",S.Callbacks("once memory"),S.Callbacks("once memory"),1,"rejected"]],w="pending",E={state:function(){return w},always:function(){return M.done(arguments).fail(arguments),this},catch:function(D){return E.then(null,D)},pipe:function(){var D=arguments;return S.Deferred(function(V){S.each(d,function(fe,le){var Me=ne(D[le[4]])&&D[le[4]];M[le[1]](function(){var Ze=Me&&Me.apply(this,arguments);Ze&&ne(Ze.promise)?Ze.promise().progress(V.notify).done(V.resolve).fail(V.reject):V[le[0]+"With"](this,Me?[Ze]:arguments)})}),D=null}).promise()},then:function(D,V,fe){var le=0;function Me(Ze,Ae,ke,Tt){return function(){var _i=this,$i=arguments,Ei=function(){var Xi,Sr;if(!(Ze<le)){if(Xi=ke.apply(_i,$i),Xi===Ae.promise())throw new TypeError("Thenable self-resolution");Sr=Xi&&(typeof Xi=="object"||typeof Xi=="function")&&Xi.then,ne(Sr)?Tt?Sr.call(Xi,Me(le,Ae,Bt,Tt),Me(le,Ae,Qt,Tt)):(le++,Sr.call(Xi,Me(le,Ae,Bt,Tt),Me(le,Ae,Qt,Tt),Me(le,Ae,Bt,Ae.notifyWith))):(ke!==Bt&&(_i=void 0,$i=[Xi]),(Tt||Ae.resolveWith)(_i,$i))}},In=Tt?Ei:function(){try{Ei()}catch(Xi){S.Deferred.exceptionHook&&S.Deferred.exceptionHook(Xi,In.error),Ze+1>=le&&(ke!==Qt&&(_i=void 0,$i=[Xi]),Ae.rejectWith(_i,$i))}};Ze?In():(S.Deferred.getErrorHook?In.error=S.Deferred.getErrorHook():S.Deferred.getStackHook&&(In.error=S.Deferred.getStackHook()),g.setTimeout(In))}}return S.Deferred(function(Ze){d[0][3].add(Me(0,Ze,ne(fe)?fe:Bt,Ze.notifyWith)),d[1][3].add(Me(0,Ze,ne(D)?D:Bt)),d[2][3].add(Me(0,Ze,ne(V)?V:Qt))}).promise()},promise:function(D){return D!=null?S.extend(D,E):E}},M={};return S.each(d,function(D,V){var fe=V[2],le=V[5];E[V[1]]=fe.add,le&&fe.add(function(){w=le},d[3-D][2].disable,d[3-D][3].disable,d[0][2].lock,d[0][3].lock),fe.add(V[3].fire),M[V[0]]=function(){return M[V[0]+"With"](this===M?void 0:this,arguments),this},M[V[0]+"With"]=fe.fireWith}),E.promise(M),o&&o.call(M,M),M},when:function(o){var d=arguments.length,w=d,E=Array(w),M=Z.call(arguments),D=S.Deferred(),V=function(fe){return function(le){E[fe]=this,M[fe]=arguments.length>1?Z.call(arguments):le,--d||D.resolveWith(E,M)}};if(d<=1&&(ji(o,D.done(V(w)).resolve,D.reject,!d),D.state()==="pending"||ne(M[w]&&M[w].then)))return D.then();for(;w--;)ji(M[w],V(w),D.reject);return D.promise()}});var ti=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;S.Deferred.exceptionHook=function(o,d){g.console&&g.console.warn&&o&&ti.test(o.name)&&g.console.warn("jQuery.Deferred exception: "+o.message,o.stack,d)},S.readyException=function(o){g.setTimeout(function(){throw o})};var fn=S.Deferred();S.fn.ready=function(o){return fn.then(o).catch(function(d){S.readyException(d)}),this},S.extend({isReady:!1,readyWait:1,ready:function(o){(o===!0?--S.readyWait:S.isReady)||(S.isReady=!0,!(o!==!0&&--S.readyWait>0)&&fn.resolveWith(W,[S]))}}),S.ready.then=fn.then;function Qi(){W.removeEventListener("DOMContentLoaded",Qi),g.removeEventListener("load",Qi),S.ready()}W.readyState==="complete"||W.readyState!=="loading"&&!W.documentElement.doScroll?g.setTimeout(S.ready):(W.addEventListener("DOMContentLoaded",Qi),g.addEventListener("load",Qi));var p=function(o,d,w,E,M,D,V){var fe=0,le=o.length,Me=w==null;if(st(w)==="object"){M=!0;for(fe in w)p(o,d,fe,w[fe],!0,D,V)}else if(E!==void 0&&(M=!0,ne(E)||(V=!0),Me&&(V?(d.call(o,E),d=null):(Me=d,d=function(Ze,Ae,ke){return Me.call(S(Ze),ke)})),d))for(;fe<le;fe++)d(o[fe],w,V?E:E.call(o[fe],fe,d(o[fe],w)));return M?o:Me?d.call(o):le?d(o[0],w):D},j=/^-ms-/,H=/-([a-z])/g;function ge(o,d){return d.toUpperCase()}function me(o){return o.replace(j,"ms-").replace(H,ge)}var De=function(o){return o.nodeType===1||o.nodeType===9||!+o.nodeType};function ht(){this.expando=S.expando+ht.uid++}ht.uid=1,ht.prototype={cache:function(o){var d=o[this.expando];return d||(d={},De(o)&&(o.nodeType?o[this.expando]=d:Object.defineProperty(o,this.expando,{value:d,configurable:!0}))),d},set:function(o,d,w){var E,M=this.cache(o);if(typeof d=="string")M[me(d)]=w;else for(E in d)M[me(E)]=d[E];return M},get:function(o,d){return d===void 0?this.cache(o):o[this.expando]&&o[this.expando][me(d)]},access:function(o,d,w){return d===void 0||d&&typeof d=="string"&&w===void 0?this.get(o,d):(this.set(o,d,w),w!==void 0?w:d)},remove:function(o,d){var w,E=o[this.expando];if(E!==void 0){if(d!==void 0)for(Array.isArray(d)?d=d.map(me):(d=me(d),d=d in E?[d]:d.match(yt)||[]),w=d.length;w--;)delete E[d[w]];(d===void 0||S.isEmptyObject(E))&&(o.nodeType?o[this.expando]=void 0:delete o[this.expando])}},hasData:function(o){var d=o[this.expando];return d!==void 0&&!S.isEmptyObject(d)}};var rt=new ht,zt=new ht,fi=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,vi=/[A-Z]/g;function nn(o){return o==="true"?!0:o==="false"?!1:o==="null"?null:o===+o+""?+o:fi.test(o)?JSON.parse(o):o}function on(o,d,w){var E;if(w===void 0&&o.nodeType===1)if(E="data-"+d.replace(vi,"-$&").toLowerCase(),w=o.getAttribute(E),typeof w=="string"){try{w=nn(w)}catch{}zt.set(o,d,w)}else w=void 0;return w}S.extend({hasData:function(o){return zt.hasData(o)||rt.hasData(o)},data:function(o,d,w){return zt.access(o,d,w)},removeData:function(o,d){zt.remove(o,d)},_data:function(o,d,w){return rt.access(o,d,w)},_removeData:function(o,d){rt.remove(o,d)}}),S.fn.extend({data:function(o,d){var w,E,M,D=this[0],V=D&&D.attributes;if(o===void 0){if(this.length&&(M=zt.get(D),D.nodeType===1&&!rt.get(D,"hasDataAttrs"))){for(w=V.length;w--;)V[w]&&(E=V[w].name,E.indexOf("data-")===0&&(E=me(E.slice(5)),on(D,E,M[E])));rt.set(D,"hasDataAttrs",!0)}return M}return typeof o=="object"?this.each(function(){zt.set(this,o)}):p(this,function(fe){var le;if(D&&fe===void 0)return le=zt.get(D,o),le!==void 0||(le=on(D,o),le!==void 0)?le:void 0;this.each(function(){zt.set(this,o,fe)})},null,d,arguments.length>1,null,!0)},removeData:function(o){return this.each(function(){zt.remove(this,o)})}}),S.extend({queue:function(o,d,w){var E;if(o)return d=(d||"fx")+"queue",E=rt.get(o,d),w&&(!E||Array.isArray(w)?E=rt.access(o,d,S.makeArray(w)):E.push(w)),E||[]},dequeue:function(o,d){d=d||"fx";var w=S.queue(o,d),E=w.length,M=w.shift(),D=S._queueHooks(o,d),V=function(){S.dequeue(o,d)};M==="inprogress"&&(M=w.shift(),E--),M&&(d==="fx"&&w.unshift("inprogress"),delete D.stop,M.call(o,V,D)),!E&&D&&D.empty.fire()},_queueHooks:function(o,d){var w=d+"queueHooks";return rt.get(o,w)||rt.access(o,w,{empty:S.Callbacks("once memory").add(function(){rt.remove(o,[d+"queue",w])})})}}),S.fn.extend({queue:function(o,d){var w=2;return typeof o!="string"&&(d=o,o="fx",w--),arguments.length<w?S.queue(this[0],o):d===void 0?this:this.each(function(){var E=S.queue(this,o,d);S._queueHooks(this,o),o==="fx"&&E[0]!=="inprogress"&&S.dequeue(this,o)})},dequeue:function(o){return this.each(function(){S.dequeue(this,o)})},clearQueue:function(o){return this.queue(o||"fx",[])},promise:function(o,d){var w,E=1,M=S.Deferred(),D=this,V=this.length,fe=function(){--E||M.resolveWith(D,[D])};for(typeof o!="string"&&(d=o,o=void 0),o=o||"fx";V--;)w=rt.get(D[V],o+"queueHooks"),w&&w.empty&&(E++,w.empty.add(fe));return fe(),M.promise(d)}});var an=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,bn=new RegExp("^(?:([+-])=|)("+an+")([a-z%]*)$","i"),ln=["Top","Right","Bottom","Left"],Yi=W.documentElement,Fn=function(o){return S.contains(o.ownerDocument,o)},vr={composed:!0};Yi.getRootNode&&(Fn=function(o){return S.contains(o.ownerDocument,o)||o.getRootNode(vr)===o.ownerDocument});var Ln=function(o,d){return o=d||o,o.style.display==="none"||o.style.display===""&&Fn(o)&&S.css(o,"display")==="none"};function Gs(o,d,w,E){var M,D,V=20,fe=E?function(){return E.cur()}:function(){return S.css(o,d,"")},le=fe(),Me=w&&w[3]||(S.cssNumber[d]?"":"px"),Ze=o.nodeType&&(S.cssNumber[d]||Me!=="px"&&+le)&&bn.exec(S.css(o,d));if(Ze&&Ze[3]!==Me){for(le=le/2,Me=Me||Ze[3],Ze=+le||1;V--;)S.style(o,d,Ze+Me),(1-D)*(1-(D=fe()/le||.5))<=0&&(V=0),Ze=Ze/D;Ze=Ze*2,S.style(o,d,Ze+Me),w=w||[]}return w&&(Ze=+Ze||+le||0,M=w[1]?Ze+(w[1]+1)*w[2]:+w[2],E&&(E.unit=Me,E.start=Ze,E.end=M)),M}var js={};function os(o){var d,w=o.ownerDocument,E=o.nodeName,M=js[E];return M||(d=w.body.appendChild(w.createElement(E)),M=S.css(d,"display"),d.parentNode.removeChild(d),M==="none"&&(M="block"),js[E]=M,M)}function Es(o,d){for(var w,E,M=[],D=0,V=o.length;D<V;D++)E=o[D],E.style&&(w=E.style.display,d?(w==="none"&&(M[D]=rt.get(E,"display")||null,M[D]||(E.style.display="")),E.style.display===""&&Ln(E)&&(M[D]=os(E))):w!=="none"&&(M[D]="none",rt.set(E,"display",w)));for(D=0;D<V;D++)M[D]!=null&&(o[D].style.display=M[D]);return o}S.fn.extend({show:function(){return Es(this,!0)},hide:function(){return Es(this)},toggle:function(o){return typeof o=="boolean"?o?this.show():this.hide():this.each(function(){Ln(this)?S(this).show():S(this).hide()})}});var qs=/^(?:checkbox|radio)$/i,As=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i,Ys=/^$|^module$|\/(?:java|ecma)script/i;(function(){var o=W.createDocumentFragment(),d=o.appendChild(W.createElement("div")),w=W.createElement("input");w.setAttribute("type","radio"),w.setAttribute("checked","checked"),w.setAttribute("name","t"),d.appendChild(w),q.checkClone=d.cloneNode(!0).cloneNode(!0).lastChild.checked,d.innerHTML="<textarea>x</textarea>",q.noCloneChecked=!!d.cloneNode(!0).lastChild.defaultValue,d.innerHTML="<option></option>",q.option=!!d.lastChild})();var On={thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};On.tbody=On.tfoot=On.colgroup=On.caption=On.thead,On.th=On.td,q.option||(On.optgroup=On.option=[1,"<select multiple='multiple'>","</select>"]);function Tn(o,d){var w;return typeof o.getElementsByTagName<"u"?w=o.getElementsByTagName(d||"*"):typeof o.querySelectorAll<"u"?w=o.querySelectorAll(d||"*"):w=[],d===void 0||d&&ct(o,d)?S.merge([o],w):w}function jn(o,d){for(var w=0,E=o.length;w<E;w++)rt.set(o[w],"globalEval",!d||rt.get(d[w],"globalEval"))}var hn=/<|&#?\w+;/;function Ji(o,d,w,E,M){for(var D,V,fe,le,Me,Ze,Ae=d.createDocumentFragment(),ke=[],Tt=0,_i=o.length;Tt<_i;Tt++)if(D=o[Tt],D||D===0)if(st(D)==="object")S.merge(ke,D.nodeType?[D]:D);else if(!hn.test(D))ke.push(d.createTextNode(D));else{for(V=V||Ae.appendChild(d.createElement("div")),fe=(As.exec(D)||["",""])[1].toLowerCase(),le=On[fe]||On._default,V.innerHTML=le[1]+S.htmlPrefilter(D)+le[2],Ze=le[0];Ze--;)V=V.lastChild;S.merge(ke,V.childNodes),V=Ae.firstChild,V.textContent=""}for(Ae.textContent="",Tt=0;D=ke[Tt++];){if(E&&S.inArray(D,E)>-1){M&&M.push(D);continue}if(Me=Fn(D),V=Tn(Ae.appendChild(D),"script"),Me&&jn(V),w)for(Ze=0;D=V[Ze++];)Ys.test(D.type||"")&&w.push(D)}return Ae}var sn=/^([^.]*)(?:\.(.+)|)/;function mn(){return!0}function mi(){return!1}function Js(o,d,w,E,M,D){var V,fe;if(typeof d=="object"){typeof w!="string"&&(E=E||w,w=void 0);for(fe in d)Js(o,fe,w,E,d[fe],D);return o}if(E==null&&M==null?(M=w,E=w=void 0):M==null&&(typeof w=="string"?(M=E,E=void 0):(M=E,E=w,w=void 0)),M===!1)M=mi;else if(!M)return o;return D===1&&(V=M,M=function(le){return S().off(le),V.apply(this,arguments)},M.guid=V.guid||(V.guid=S.guid++)),o.each(function(){S.event.add(this,d,M,E,w)})}S.event={global:{},add:function(o,d,w,E,M){var D,V,fe,le,Me,Ze,Ae,ke,Tt,_i,$i,Ei=rt.get(o);if(De(o))for(w.handler&&(D=w,w=D.handler,M=D.selector),M&&S.find.matchesSelector(Yi,M),w.guid||(w.guid=S.guid++),(le=Ei.events)||(le=Ei.events=Object.create(null)),(V=Ei.handle)||(V=Ei.handle=function(In){return typeof S<"u"&&S.event.triggered!==In.type?S.event.dispatch.apply(o,arguments):void 0}),d=(d||"").match(yt)||[""],Me=d.length;Me--;)fe=sn.exec(d[Me])||[],Tt=$i=fe[1],_i=(fe[2]||"").split(".").sort(),Tt&&(Ae=S.event.special[Tt]||{},Tt=(M?Ae.delegateType:Ae.bindType)||Tt,Ae=S.event.special[Tt]||{},Ze=S.extend({type:Tt,origType:$i,data:E,handler:w,guid:w.guid,selector:M,needsContext:M&&S.expr.match.needsContext.test(M),namespace:_i.join(".")},D),(ke=le[Tt])||(ke=le[Tt]=[],ke.delegateCount=0,(!Ae.setup||Ae.setup.call(o,E,_i,V)===!1)&&o.addEventListener&&o.addEventListener(Tt,V)),Ae.add&&(Ae.add.call(o,Ze),Ze.handler.guid||(Ze.handler.guid=w.guid)),M?ke.splice(ke.delegateCount++,0,Ze):ke.push(Ze),S.event.global[Tt]=!0)},remove:function(o,d,w,E,M){var D,V,fe,le,Me,Ze,Ae,ke,Tt,_i,$i,Ei=rt.hasData(o)&&rt.get(o);if(!(!Ei||!(le=Ei.events))){for(d=(d||"").match(yt)||[""],Me=d.length;Me--;){if(fe=sn.exec(d[Me])||[],Tt=$i=fe[1],_i=(fe[2]||"").split(".").sort(),!Tt){for(Tt in le)S.event.remove(o,Tt+d[Me],w,E,!0);continue}for(Ae=S.event.special[Tt]||{},Tt=(E?Ae.delegateType:Ae.bindType)||Tt,ke=le[Tt]||[],fe=fe[2]&&new RegExp("(^|\\.)"+_i.join("\\.(?:.*\\.|)")+"(\\.|$)"),V=D=ke.length;D--;)Ze=ke[D],(M||$i===Ze.origType)&&(!w||w.guid===Ze.guid)&&(!fe||fe.test(Ze.namespace))&&(!E||E===Ze.selector||E==="**"&&Ze.selector)&&(ke.splice(D,1),Ze.selector&&ke.delegateCount--,Ae.remove&&Ae.remove.call(o,Ze));V&&!ke.length&&((!Ae.teardown||Ae.teardown.call(o,_i,Ei.handle)===!1)&&S.removeEvent(o,Tt,Ei.handle),delete le[Tt])}S.isEmptyObject(le)&&rt.remove(o,"handle events")}},dispatch:function(o){var d,w,E,M,D,V,fe=new Array(arguments.length),le=S.event.fix(o),Me=(rt.get(this,"events")||Object.create(null))[le.type]||[],Ze=S.event.special[le.type]||{};for(fe[0]=le,d=1;d<arguments.length;d++)fe[d]=arguments[d];if(le.delegateTarget=this,!(Ze.preDispatch&&Ze.preDispatch.call(this,le)===!1)){for(V=S.event.handlers.call(this,le,Me),d=0;(M=V[d++])&&!le.isPropagationStopped();)for(le.currentTarget=M.elem,w=0;(D=M.handlers[w++])&&!le.isImmediatePropagationStopped();)(!le.rnamespace||D.namespace===!1||le.rnamespace.test(D.namespace))&&(le.handleObj=D,le.data=D.data,E=((S.event.special[D.origType]||{}).handle||D.handler).apply(M.elem,fe),E!==void 0&&(le.result=E)===!1&&(le.preventDefault(),le.stopPropagation()));return Ze.postDispatch&&Ze.postDispatch.call(this,le),le.result}},handlers:function(o,d){var w,E,M,D,V,fe=[],le=d.delegateCount,Me=o.target;if(le&&Me.nodeType&&!(o.type==="click"&&o.button>=1)){for(;Me!==this;Me=Me.parentNode||this)if(Me.nodeType===1&&!(o.type==="click"&&Me.disabled===!0)){for(D=[],V={},w=0;w<le;w++)E=d[w],M=E.selector+" ",V[M]===void 0&&(V[M]=E.needsContext?S(M,this).index(Me)>-1:S.find(M,this,null,[Me]).length),V[M]&&D.push(E);D.length&&fe.push({elem:Me,handlers:D})}}return Me=this,le<d.length&&fe.push({elem:Me,handlers:d.slice(le)}),fe},addProp:function(o,d){Object.defineProperty(S.Event.prototype,o,{enumerable:!0,configurable:!0,get:ne(d)?function(){if(this.originalEvent)return d(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[o]},set:function(w){Object.defineProperty(this,o,{enumerable:!0,configurable:!0,writable:!0,value:w})}})},fix:function(o){return o[S.expando]?o:new S.Event(o)},special:{load:{noBubble:!0},click:{setup:function(o){var d=this||o;return qs.test(d.type)&&d.click&&ct(d,"input")&&Ri(d,"click",!0),!1},trigger:function(o){var d=this||o;return qs.test(d.type)&&d.click&&ct(d,"input")&&Ri(d,"click"),!0},_default:function(o){var d=o.target;return qs.test(d.type)&&d.click&&ct(d,"input")&&rt.get(d,"click")||ct(d,"a")}},beforeunload:{postDispatch:function(o){o.result!==void 0&&o.originalEvent&&(o.originalEvent.returnValue=o.result)}}}};function Ri(o,d,w){if(!w){rt.get(o,d)===void 0&&S.event.add(o,d,mn);return}rt.set(o,d,!1),S.event.add(o,d,{namespace:!1,handler:function(E){var M,D=rt.get(this,d);if(E.isTrigger&1&&this[d]){if(D)(S.event.special[d]||{}).delegateType&&E.stopPropagation();else if(D=Z.call(arguments),rt.set(this,d,D),this[d](),M=rt.get(this,d),rt.set(this,d,!1),D!==M)return E.stopImmediatePropagation(),E.preventDefault(),M}else D&&(rt.set(this,d,S.event.trigger(D[0],D.slice(1),this)),E.stopPropagation(),E.isImmediatePropagationStopped=mn)}})}S.removeEvent=function(o,d,w){o.removeEventListener&&o.removeEventListener(d,w)},S.Event=function(o,d){if(!(this instanceof S.Event))return new S.Event(o,d);o&&o.type?(this.originalEvent=o,this.type=o.type,this.isDefaultPrevented=o.defaultPrevented||o.defaultPrevented===void 0&&o.returnValue===!1?mn:mi,this.target=o.target&&o.target.nodeType===3?o.target.parentNode:o.target,this.currentTarget=o.currentTarget,this.relatedTarget=o.relatedTarget):this.type=o,d&&S.extend(this,d),this.timeStamp=o&&o.timeStamp||Date.now(),this[S.expando]=!0},S.Event.prototype={constructor:S.Event,isDefaultPrevented:mi,isPropagationStopped:mi,isImmediatePropagationStopped:mi,isSimulated:!1,preventDefault:function(){var o=this.originalEvent;this.isDefaultPrevented=mn,o&&!this.isSimulated&&o.preventDefault()},stopPropagation:function(){var o=this.originalEvent;this.isPropagationStopped=mn,o&&!this.isSimulated&&o.stopPropagation()},stopImmediatePropagation:function(){var o=this.originalEvent;this.isImmediatePropagationStopped=mn,o&&!this.isSimulated&&o.stopImmediatePropagation(),this.stopPropagation()}},S.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,char:!0,code:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:!0},S.event.addProp),S.each({focus:"focusin",blur:"focusout"},function(o,d){function w(E){if(W.documentMode){var M=rt.get(this,"handle"),D=S.event.fix(E);D.type=E.type==="focusin"?"focus":"blur",D.isSimulated=!0,M(E),D.target===D.currentTarget&&M(D)}else S.event.simulate(d,E.target,S.event.fix(E))}S.event.special[o]={setup:function(){var E;if(Ri(this,o,!0),W.documentMode)E=rt.get(this,d),E||this.addEventListener(d,w),rt.set(this,d,(E||0)+1);else return!1},trigger:function(){return Ri(this,o),!0},teardown:function(){var E;if(W.documentMode)E=rt.get(this,d)-1,E?rt.set(this,d,E):(this.removeEventListener(d,w),rt.remove(this,d));else return!1},_default:function(E){return rt.get(E.target,o)},delegateType:d},S.event.special[d]={setup:function(){var E=this.ownerDocument||this.document||this,M=W.documentMode?this:E,D=rt.get(M,d);D||(W.documentMode?this.addEventListener(d,w):E.addEventListener(o,w,!0)),rt.set(M,d,(D||0)+1)},teardown:function(){var E=this.ownerDocument||this.document||this,M=W.documentMode?this:E,D=rt.get(M,d)-1;D?rt.set(M,d,D):(W.documentMode?this.removeEventListener(d,w):E.removeEventListener(o,w,!0),rt.remove(M,d))}}}),S.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(o,d){S.event.special[o]={delegateType:d,bindType:d,handle:function(w){var E,M=this,D=w.relatedTarget,V=w.handleObj;return(!D||D!==M&&!S.contains(M,D))&&(w.type=V.origType,E=V.handler.apply(this,arguments),w.type=d),E}}}),S.fn.extend({on:function(o,d,w,E){return Js(this,o,d,w,E)},one:function(o,d,w,E){return Js(this,o,d,w,E,1)},off:function(o,d,w){var E,M;if(o&&o.preventDefault&&o.handleObj)return E=o.handleObj,S(o.delegateTarget).off(E.namespace?E.origType+"."+E.namespace:E.origType,E.selector,E.handler),this;if(typeof o=="object"){for(M in o)this.off(M,d,o[M]);return this}return(d===!1||typeof d=="function")&&(w=d,d=void 0),w===!1&&(w=mi),this.each(function(){S.event.remove(this,o,w,d)})}});var Rr=/<script|<style|<link/i,En=/checked\s*(?:[^=]|=\s*.checked.)/i,Mr=/^\s*<!\[CDATA\[|\]\]>\s*$/g;function Ps(o,d){return ct(o,"table")&&ct(d.nodeType!==11?d:d.firstChild,"tr")&&S(o).children("tbody")[0]||o}function br(o){return o.type=(o.getAttribute("type")!==null)+"/"+o.type,o}function qe(o){return(o.type||"").slice(0,5)==="true/"?o.type=o.type.slice(5):o.removeAttribute("type"),o}function bt(o,d){var w,E,M,D,V,fe,le;if(d.nodeType===1){if(rt.hasData(o)&&(D=rt.get(o),le=D.events,le)){rt.remove(d,"handle events");for(M in le)for(w=0,E=le[M].length;w<E;w++)S.event.add(d,M,le[M][w])}zt.hasData(o)&&(V=zt.access(o),fe=S.extend({},V),zt.set(d,fe))}}function Rt(o,d){var w=d.nodeName.toLowerCase();w==="input"&&qs.test(o.type)?d.checked=o.checked:(w==="input"||w==="textarea")&&(d.defaultValue=o.defaultValue)}function Yt(o,d,w,E){d=C(d);var M,D,V,fe,le,Me,Ze=0,Ae=o.length,ke=Ae-1,Tt=d[0],_i=ne(Tt);if(_i||Ae>1&&typeof Tt=="string"&&!q.checkClone&&En.test(Tt))return o.each(function($i){var Ei=o.eq($i);_i&&(d[0]=Tt.call(this,$i,Ei.html())),Yt(Ei,d,w,E)});if(Ae&&(M=Ji(d,o[0].ownerDocument,!1,o,E),D=M.firstChild,M.childNodes.length===1&&(M=D),D||E)){for(V=S.map(Tn(M,"script"),br),fe=V.length;Ze<Ae;Ze++)le=M,Ze!==ke&&(le=S.clone(le,!0,!0),fe&&S.merge(V,Tn(le,"script"))),w.call(o[Ze],le,Ze);if(fe)for(Me=V[V.length-1].ownerDocument,S.map(V,qe),Ze=0;Ze<fe;Ze++)le=V[Ze],Ys.test(le.type||"")&&!rt.access(le,"globalEval")&&S.contains(Me,le)&&(le.src&&(le.type||"").toLowerCase()!=="module"?S._evalUrl&&!le.noModule&&S._evalUrl(le.src,{nonce:le.nonce||le.getAttribute("nonce")},Me):tt(le.textContent.replace(Mr,""),le,Me))}return o}function Ui(o,d,w){for(var E,M=d?S.filter(d,o):o,D=0;(E=M[D])!=null;D++)!w&&E.nodeType===1&&S.cleanData(Tn(E)),E.parentNode&&(w&&Fn(E)&&jn(Tn(E,"script")),E.parentNode.removeChild(E));return o}S.extend({htmlPrefilter:function(o){return o},clone:function(o,d,w){var E,M,D,V,fe=o.cloneNode(!0),le=Fn(o);if(!q.noCloneChecked&&(o.nodeType===1||o.nodeType===11)&&!S.isXMLDoc(o))for(V=Tn(fe),D=Tn(o),E=0,M=D.length;E<M;E++)Rt(D[E],V[E]);if(d)if(w)for(D=D||Tn(o),V=V||Tn(fe),E=0,M=D.length;E<M;E++)bt(D[E],V[E]);else bt(o,fe);return V=Tn(fe,"script"),V.length>0&&jn(V,!le&&Tn(o,"script")),fe},cleanData:function(o){for(var d,w,E,M=S.event.special,D=0;(w=o[D])!==void 0;D++)if(De(w)){if(d=w[rt.expando]){if(d.events)for(E in d.events)M[E]?S.event.remove(w,E):S.removeEvent(w,E,d.handle);w[rt.expando]=void 0}w[zt.expando]&&(w[zt.expando]=void 0)}}}),S.fn.extend({detach:function(o){return Ui(this,o,!0)},remove:function(o){return Ui(this,o)},text:function(o){return p(this,function(d){return d===void 0?S.text(this):this.empty().each(function(){(this.nodeType===1||this.nodeType===11||this.nodeType===9)&&(this.textContent=d)})},null,o,arguments.length)},append:function(){return Yt(this,arguments,function(o){if(this.nodeType===1||this.nodeType===11||this.nodeType===9){var d=Ps(this,o);d.appendChild(o)}})},prepend:function(){return Yt(this,arguments,function(o){if(this.nodeType===1||this.nodeType===11||this.nodeType===9){var d=Ps(this,o);d.insertBefore(o,d.firstChild)}})},before:function(){return Yt(this,arguments,function(o){this.parentNode&&this.parentNode.insertBefore(o,this)})},after:function(){return Yt(this,arguments,function(o){this.parentNode&&this.parentNode.insertBefore(o,this.nextSibling)})},empty:function(){for(var o,d=0;(o=this[d])!=null;d++)o.nodeType===1&&(S.cleanData(Tn(o,!1)),o.textContent="");return this},clone:function(o,d){return o=o??!1,d=d??o,this.map(function(){return S.clone(this,o,d)})},html:function(o){return p(this,function(d){var w=this[0]||{},E=0,M=this.length;if(d===void 0&&w.nodeType===1)return w.innerHTML;if(typeof d=="string"&&!Rr.test(d)&&!On[(As.exec(d)||["",""])[1].toLowerCase()]){d=S.htmlPrefilter(d);try{for(;E<M;E++)w=this[E]||{},w.nodeType===1&&(S.cleanData(Tn(w,!1)),w.innerHTML=d);w=0}catch{}}w&&this.empty().append(d)},null,o,arguments.length)},replaceWith:function(){var o=[];return Yt(this,arguments,function(d){var w=this.parentNode;S.inArray(this,o)<0&&(S.cleanData(Tn(this)),w&&w.replaceChild(d,this))},o)}}),S.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(o,d){S.fn[o]=function(w){for(var E,M=[],D=S(w),V=D.length-1,fe=0;fe<=V;fe++)E=fe===V?this:this.clone(!0),S(D[fe])[d](E),we.apply(M,E.get());return this.pushStack(M)}});var Bi=new RegExp("^("+an+")(?!px)[a-z%]+$","i"),An=/^--/,cn=function(o){var d=o.ownerDocument.defaultView;return(!d||!d.opener)&&(d=g),d.getComputedStyle(o)},pn=function(o,d,w){var E,M,D={};for(M in d)D[M]=o.style[M],o.style[M]=d[M];E=w.call(o);for(M in d)o.style[M]=D[M];return E},Br=new RegExp(ln.join("|"),"i");(function(){function o(){if(Me){le.style.cssText="position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0",Me.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%",Yi.appendChild(le).appendChild(Me);var Ze=g.getComputedStyle(Me);w=Ze.top!=="1%",fe=d(Ze.marginLeft)===12,Me.style.right="60%",D=d(Ze.right)===36,E=d(Ze.width)===36,Me.style.position="absolute",M=d(Me.offsetWidth/3)===12,Yi.removeChild(le),Me=null}}function d(Ze){return Math.round(parseFloat(Ze))}var w,E,M,D,V,fe,le=W.createElement("div"),Me=W.createElement("div");Me.style&&(Me.style.backgroundClip="content-box",Me.cloneNode(!0).style.backgroundClip="",q.clearCloneStyle=Me.style.backgroundClip==="content-box",S.extend(q,{boxSizingReliable:function(){return o(),E},pixelBoxStyles:function(){return o(),D},pixelPosition:function(){return o(),w},reliableMarginLeft:function(){return o(),fe},scrollboxSize:function(){return o(),M},reliableTrDimensions:function(){var Ze,Ae,ke,Tt;return V==null&&(Ze=W.createElement("table"),Ae=W.createElement("tr"),ke=W.createElement("div"),Ze.style.cssText="position:absolute;left:-11111px;border-collapse:separate",Ae.style.cssText="box-sizing:content-box;border:1px solid",Ae.style.height="1px",ke.style.height="9px",ke.style.display="block",Yi.appendChild(Ze).appendChild(Ae).appendChild(ke),Tt=g.getComputedStyle(Ae),V=parseInt(Tt.height,10)+parseInt(Tt.borderTopWidth,10)+parseInt(Tt.borderBottomWidth,10)===Ae.offsetHeight,Yi.removeChild(Ze)),V}}))})();function Cn(o,d,w){var E,M,D,V,fe=An.test(d),le=o.style;return w=w||cn(o),w&&(V=w.getPropertyValue(d)||w[d],fe&&V&&(V=V.replace(k,"$1")||void 0),V===""&&!Fn(o)&&(V=S.style(o,d)),!q.pixelBoxStyles()&&Bi.test(V)&&Br.test(d)&&(E=le.width,M=le.minWidth,D=le.maxWidth,le.minWidth=le.maxWidth=le.width=V,V=w.width,le.width=E,le.minWidth=M,le.maxWidth=D)),V!==void 0?V+"":V}function Rn(o,d){return{get:function(){if(o()){delete this.get;return}return(this.get=d).apply(this,arguments)}}}var ys=["Webkit","Moz","ms"],Cs=W.createElement("div").style,Qr={};function wa(o){for(var d=o[0].toUpperCase()+o.slice(1),w=ys.length;w--;)if(o=ys[w]+d,o in Cs)return o}function _r(o){var d=S.cssProps[o]||Qr[o];return d||(o in Cs?o:Qr[o]=wa(o)||o)}var ks=/^(none|table(?!-c[ea]).+)/,Io={position:"absolute",visibility:"hidden",display:"block"},$r={letterSpacing:"0",fontWeight:"400"};function Zs(o,d,w){var E=bn.exec(d);return E?Math.max(0,E[2]-(w||0))+(E[3]||"px"):d}function Yn(o,d,w,E,M,D){var V=d==="width"?1:0,fe=0,le=0,Me=0;if(w===(E?"border":"content"))return 0;for(;V<4;V+=2)w==="margin"&&(Me+=S.css(o,w+ln[V],!0,M)),E?(w==="content"&&(le-=S.css(o,"padding"+ln[V],!0,M)),w!=="margin"&&(le-=S.css(o,"border"+ln[V]+"Width",!0,M))):(le+=S.css(o,"padding"+ln[V],!0,M),w!=="padding"?le+=S.css(o,"border"+ln[V]+"Width",!0,M):fe+=S.css(o,"border"+ln[V]+"Width",!0,M));return!E&&D>=0&&(le+=Math.max(0,Math.ceil(o["offset"+d[0].toUpperCase()+d.slice(1)]-D-le-fe-.5))||0),le+Me}function mo(o,d,w){var E=cn(o),M=!q.boxSizingReliable()||w,D=M&&S.css(o,"boxSizing",!1,E)==="border-box",V=D,fe=Cn(o,d,E),le="offset"+d[0].toUpperCase()+d.slice(1);if(Bi.test(fe)){if(!w)return fe;fe="auto"}return(!q.boxSizingReliable()&&D||!q.reliableTrDimensions()&&ct(o,"tr")||fe==="auto"||!parseFloat(fe)&&S.css(o,"display",!1,E)==="inline")&&o.getClientRects().length&&(D=S.css(o,"boxSizing",!1,E)==="border-box",V=le in o,V&&(fe=o[le])),fe=parseFloat(fe)||0,fe+Yn(o,d,w||(D?"border":"content"),V,E,fe)+"px"}S.extend({cssHooks:{opacity:{get:function(o,d){if(d){var w=Cn(o,"opacity");return w===""?"1":w}}}},cssNumber:{animationIterationCount:!0,aspectRatio:!0,borderImageSlice:!0,columnCount:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,scale:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeMiterlimit:!0,strokeOpacity:!0},cssProps:{},style:function(o,d,w,E){if(!(!o||o.nodeType===3||o.nodeType===8||!o.style)){var M,D,V,fe=me(d),le=An.test(d),Me=o.style;if(le||(d=_r(fe)),V=S.cssHooks[d]||S.cssHooks[fe],w!==void 0){if(D=typeof w,D==="string"&&(M=bn.exec(w))&&M[1]&&(w=Gs(o,d,M),D="number"),w==null||w!==w)return;D==="number"&&!le&&(w+=M&&M[3]||(S.cssNumber[fe]?"":"px")),!q.clearCloneStyle&&w===""&&d.indexOf("background")===0&&(Me[d]="inherit"),(!V||!("set"in V)||(w=V.set(o,w,E))!==void 0)&&(le?Me.setProperty(d,w):Me[d]=w)}else return V&&"get"in V&&(M=V.get(o,!1,E))!==void 0?M:Me[d]}},css:function(o,d,w,E){var M,D,V,fe=me(d),le=An.test(d);return le||(d=_r(fe)),V=S.cssHooks[d]||S.cssHooks[fe],V&&"get"in V&&(M=V.get(o,!0,w)),M===void 0&&(M=Cn(o,d,E)),M==="normal"&&d in $r&&(M=$r[d]),w===""||w?(D=parseFloat(M),w===!0||isFinite(D)?D||0:M):M}}),S.each(["height","width"],function(o,d){S.cssHooks[d]={get:function(w,E,M){if(E)return ks.test(S.css(w,"display"))&&(!w.getClientRects().length||!w.getBoundingClientRect().width)?pn(w,Io,function(){return mo(w,d,M)}):mo(w,d,M)},set:function(w,E,M){var D,V=cn(w),fe=!q.scrollboxSize()&&V.position==="absolute",le=fe||M,Me=le&&S.css(w,"boxSizing",!1,V)==="border-box",Ze=M?Yn(w,d,M,Me,V):0;return Me&&fe&&(Ze-=Math.ceil(w["offset"+d[0].toUpperCase()+d.slice(1)]-parseFloat(V[d])-Yn(w,d,"border",!1,V)-.5)),Ze&&(D=bn.exec(E))&&(D[3]||"px")!=="px"&&(w.style[d]=E,E=S.css(w,d)),Zs(w,E,Ze)}}}),S.cssHooks.marginLeft=Rn(q.reliableMarginLeft,function(o,d){if(d)return(parseFloat(Cn(o,"marginLeft"))||o.getBoundingClientRect().left-pn(o,{marginLeft:0},function(){return o.getBoundingClientRect().left}))+"px"}),S.each({margin:"",padding:"",border:"Width"},function(o,d){S.cssHooks[o+d]={expand:function(w){for(var E=0,M={},D=typeof w=="string"?w.split(" "):[w];E<4;E++)M[o+ln[E]+d]=D[E]||D[E-2]||D[0];return M}},o!=="margin"&&(S.cssHooks[o+d].set=Zs)}),S.fn.extend({css:function(o,d){return p(this,function(w,E,M){var D,V,fe={},le=0;if(Array.isArray(E)){for(D=cn(w),V=E.length;le<V;le++)fe[E[le]]=S.css(w,E[le],!1,D);return fe}return M!==void 0?S.style(w,E,M):S.css(w,E)},o,d,arguments.length>1)}});function Vn(o,d,w,E,M){return new Vn.prototype.init(o,d,w,E,M)}S.Tween=Vn,Vn.prototype={constructor:Vn,init:function(o,d,w,E,M,D){this.elem=o,this.prop=w,this.easing=M||S.easing._default,this.options=d,this.start=this.now=this.cur(),this.end=E,this.unit=D||(S.cssNumber[w]?"":"px")},cur:function(){var o=Vn.propHooks[this.prop];return o&&o.get?o.get(this):Vn.propHooks._default.get(this)},run:function(o){var d,w=Vn.propHooks[this.prop];return this.options.duration?this.pos=d=S.easing[this.easing](o,this.options.duration*o,0,1,this.options.duration):this.pos=d=o,this.now=(this.end-this.start)*d+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),w&&w.set?w.set(this):Vn.propHooks._default.set(this),this}},Vn.prototype.init.prototype=Vn.prototype,Vn.propHooks={_default:{get:function(o){var d;return o.elem.nodeType!==1||o.elem[o.prop]!=null&&o.elem.style[o.prop]==null?o.elem[o.prop]:(d=S.css(o.elem,o.prop,""),!d||d==="auto"?0:d)},set:function(o){S.fx.step[o.prop]?S.fx.step[o.prop](o):o.elem.nodeType===1&&(S.cssHooks[o.prop]||o.elem.style[_r(o.prop)]!=null)?S.style(o.elem,o.prop,o.now+o.unit):o.elem[o.prop]=o.now}}},Vn.propHooks.scrollTop=Vn.propHooks.scrollLeft={set:function(o){o.elem.nodeType&&o.elem.parentNode&&(o.elem[o.prop]=o.now)}},S.easing={linear:function(o){return o},swing:function(o){return .5-Math.cos(o*Math.PI)/2},_default:"swing"},S.fx=Vn.prototype.init,S.fx.step={};var er,Di,B=/^(?:toggle|show|hide)$/,se=/queueHooks$/;function ue(){Di&&(W.hidden===!1&&g.requestAnimationFrame?g.requestAnimationFrame(ue):g.setTimeout(ue,S.fx.interval),S.fx.tick())}function Je(){return g.setTimeout(function(){er=void 0}),er=Date.now()}function Qe(o,d){var w,E=0,M={height:o};for(d=d?1:0;E<4;E+=2-d)w=ln[E],M["margin"+w]=M["padding"+w]=o;return d&&(M.opacity=M.width=o),M}function Ft(o,d,w){for(var E,M=(ri.tweeners[d]||[]).concat(ri.tweeners["*"]),D=0,V=M.length;D<V;D++)if(E=M[D].call(w,d,o))return E}function Gt(o,d,w){var E,M,D,V,fe,le,Me,Ze,Ae="width"in d||"height"in d,ke=this,Tt={},_i=o.style,$i=o.nodeType&&Ln(o),Ei=rt.get(o,"fxshow");w.queue||(V=S._queueHooks(o,"fx"),V.unqueued==null&&(V.unqueued=0,fe=V.empty.fire,V.empty.fire=function(){V.unqueued||fe()}),V.unqueued++,ke.always(function(){ke.always(function(){V.unqueued--,S.queue(o,"fx").length||V.empty.fire()})}));for(E in d)if(M=d[E],B.test(M)){if(delete d[E],D=D||M==="toggle",M===($i?"hide":"show"))if(M==="show"&&Ei&&Ei[E]!==void 0)$i=!0;else continue;Tt[E]=Ei&&Ei[E]||S.style(o,E)}if(le=!S.isEmptyObject(d),!(!le&&S.isEmptyObject(Tt))){Ae&&o.nodeType===1&&(w.overflow=[_i.overflow,_i.overflowX,_i.overflowY],Me=Ei&&Ei.display,Me==null&&(Me=rt.get(o,"display")),Ze=S.css(o,"display"),Ze==="none"&&(Me?Ze=Me:(Es([o],!0),Me=o.style.display||Me,Ze=S.css(o,"display"),Es([o]))),(Ze==="inline"||Ze==="inline-block"&&Me!=null)&&S.css(o,"float")==="none"&&(le||(ke.done(function(){_i.display=Me}),Me==null&&(Ze=_i.display,Me=Ze==="none"?"":Ze)),_i.display="inline-block")),w.overflow&&(_i.overflow="hidden",ke.always(function(){_i.overflow=w.overflow[0],_i.overflowX=w.overflow[1],_i.overflowY=w.overflow[2]})),le=!1;for(E in Tt)le||(Ei?"hidden"in Ei&&($i=Ei.hidden):Ei=rt.access(o,"fxshow",{display:Me}),D&&(Ei.hidden=!$i),$i&&Es([o],!0),ke.done(function(){$i||Es([o]),rt.remove(o,"fxshow");for(E in Tt)S.style(o,E,Tt[E])})),le=Ft($i?Ei[E]:0,E,ke),E in Ei||(Ei[E]=le.start,$i&&(le.end=le.start,le.start=0))}}function Jt(o,d){var w,E,M,D,V;for(w in o)if(E=me(w),M=d[E],D=o[w],Array.isArray(D)&&(M=D[1],D=o[w]=D[0]),w!==E&&(o[E]=D,delete o[w]),V=S.cssHooks[E],V&&"expand"in V){D=V.expand(D),delete o[E];for(w in D)w in o||(o[w]=D[w],d[w]=M)}else d[E]=M}function ri(o,d,w){var E,M,D=0,V=ri.prefilters.length,fe=S.Deferred().always(function(){delete le.elem}),le=function(){if(M)return!1;for(var Ae=er||Je(),ke=Math.max(0,Me.startTime+Me.duration-Ae),Tt=ke/Me.duration||0,_i=1-Tt,$i=0,Ei=Me.tweens.length;$i<Ei;$i++)Me.tweens[$i].run(_i);return fe.notifyWith(o,[Me,_i,ke]),_i<1&&Ei?ke:(Ei||fe.notifyWith(o,[Me,1,0]),fe.resolveWith(o,[Me]),!1)},Me=fe.promise({elem:o,props:S.extend({},d),opts:S.extend(!0,{specialEasing:{},easing:S.easing._default},w),originalProperties:d,originalOptions:w,startTime:er||Je(),duration:w.duration,tweens:[],createTween:function(Ae,ke){var Tt=S.Tween(o,Me.opts,Ae,ke,Me.opts.specialEasing[Ae]||Me.opts.easing);return Me.tweens.push(Tt),Tt},stop:function(Ae){var ke=0,Tt=Ae?Me.tweens.length:0;if(M)return this;for(M=!0;ke<Tt;ke++)Me.tweens[ke].run(1);return Ae?(fe.notifyWith(o,[Me,1,0]),fe.resolveWith(o,[Me,Ae])):fe.rejectWith(o,[Me,Ae]),this}}),Ze=Me.props;for(Jt(Ze,Me.opts.specialEasing);D<V;D++)if(E=ri.prefilters[D].call(Me,o,Ze,Me.opts),E)return ne(E.stop)&&(S._queueHooks(Me.elem,Me.opts.queue).stop=E.stop.bind(E)),E;return S.map(Ze,Ft,Me),ne(Me.opts.start)&&Me.opts.start.call(o,Me),Me.progress(Me.opts.progress).done(Me.opts.done,Me.opts.complete).fail(Me.opts.fail).always(Me.opts.always),S.fx.timer(S.extend(le,{elem:o,anim:Me,queue:Me.opts.queue})),Me}S.Animation=S.extend(ri,{tweeners:{"*":[function(o,d){var w=this.createTween(o,d);return Gs(w.elem,o,bn.exec(d),w),w}]},tweener:function(o,d){ne(o)?(d=o,o=["*"]):o=o.match(yt);for(var w,E=0,M=o.length;E<M;E++)w=o[E],ri.tweeners[w]=ri.tweeners[w]||[],ri.tweeners[w].unshift(d)},prefilters:[Gt],prefilter:function(o,d){d?ri.prefilters.unshift(o):ri.prefilters.push(o)}}),S.speed=function(o,d,w){var E=o&&typeof o=="object"?S.extend({},o):{complete:w||!w&&d||ne(o)&&o,duration:o,easing:w&&d||d&&!ne(d)&&d};return S.fx.off?E.duration=0:typeof E.duration!="number"&&(E.duration in S.fx.speeds?E.duration=S.fx.speeds[E.duration]:E.duration=S.fx.speeds._default),(E.queue==null||E.queue===!0)&&(E.queue="fx"),E.old=E.complete,E.complete=function(){ne(E.old)&&E.old.call(this),E.queue&&S.dequeue(this,E.queue)},E},S.fn.extend({fadeTo:function(o,d,w,E){return this.filter(Ln).css("opacity",0).show().end().animate({opacity:d},o,w,E)},animate:function(o,d,w,E){var M=S.isEmptyObject(o),D=S.speed(d,w,E),V=function(){var fe=ri(this,S.extend({},o),D);(M||rt.get(this,"finish"))&&fe.stop(!0)};return V.finish=V,M||D.queue===!1?this.each(V):this.queue(D.queue,V)},stop:function(o,d,w){var E=function(M){var D=M.stop;delete M.stop,D(w)};return typeof o!="string"&&(w=d,d=o,o=void 0),d&&this.queue(o||"fx",[]),this.each(function(){var M=!0,D=o!=null&&o+"queueHooks",V=S.timers,fe=rt.get(this);if(D)fe[D]&&fe[D].stop&&E(fe[D]);else for(D in fe)fe[D]&&fe[D].stop&&se.test(D)&&E(fe[D]);for(D=V.length;D--;)V[D].elem===this&&(o==null||V[D].queue===o)&&(V[D].anim.stop(w),M=!1,V.splice(D,1));(M||!w)&&S.dequeue(this,o)})},finish:function(o){return o!==!1&&(o=o||"fx"),this.each(function(){var d,w=rt.get(this),E=w[o+"queue"],M=w[o+"queueHooks"],D=S.timers,V=E?E.length:0;for(w.finish=!0,S.queue(this,o,[]),M&&M.stop&&M.stop.call(this,!0),d=D.length;d--;)D[d].elem===this&&D[d].queue===o&&(D[d].anim.stop(!0),D.splice(d,1));for(d=0;d<V;d++)E[d]&&E[d].finish&&E[d].finish.call(this);delete w.finish})}}),S.each(["toggle","show","hide"],function(o,d){var w=S.fn[d];S.fn[d]=function(E,M,D){return E==null||typeof E=="boolean"?w.apply(this,arguments):this.animate(Qe(d,!0),E,M,D)}}),S.each({slideDown:Qe("show"),slideUp:Qe("hide"),slideToggle:Qe("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(o,d){S.fn[o]=function(w,E,M){return this.animate(d,w,E,M)}}),S.timers=[],S.fx.tick=function(){var o,d=0,w=S.timers;for(er=Date.now();d<w.length;d++)o=w[d],!o()&&w[d]===o&&w.splice(d--,1);w.length||S.fx.stop(),er=void 0},S.fx.timer=function(o){S.timers.push(o),S.fx.start()},S.fx.interval=13,S.fx.start=function(){Di||(Di=!0,ue())},S.fx.stop=function(){Di=null},S.fx.speeds={slow:600,fast:200,_default:400},S.fn.delay=function(o,d){return o=S.fx&&S.fx.speeds[o]||o,d=d||"fx",this.queue(d,function(w,E){var M=g.setTimeout(w,o);E.stop=function(){g.clearTimeout(M)}})},function(){var o=W.createElement("input"),d=W.createElement("select"),w=d.appendChild(W.createElement("option"));o.type="checkbox",q.checkOn=o.value!=="",q.optSelected=w.selected,o=W.createElement("input"),o.value="t",o.type="radio",q.radioValue=o.value==="t"}();var Ai,Ki=S.expr.attrHandle;S.fn.extend({attr:function(o,d){return p(this,S.attr,o,d,arguments.length>1)},removeAttr:function(o){return this.each(function(){S.removeAttr(this,o)})}}),S.extend({attr:function(o,d,w){var E,M,D=o.nodeType;if(!(D===3||D===8||D===2)){if(typeof o.getAttribute>"u")return S.prop(o,d,w);if((D!==1||!S.isXMLDoc(o))&&(M=S.attrHooks[d.toLowerCase()]||(S.expr.match.bool.test(d)?Ai:void 0)),w!==void 0){if(w===null){S.removeAttr(o,d);return}return M&&"set"in M&&(E=M.set(o,w,d))!==void 0?E:(o.setAttribute(d,w+""),w)}return M&&"get"in M&&(E=M.get(o,d))!==null?E:(E=S.find.attr(o,d),E??void 0)}},attrHooks:{type:{set:function(o,d){if(!q.radioValue&&d==="radio"&&ct(o,"input")){var w=o.value;return o.setAttribute("type",d),w&&(o.value=w),d}}}},removeAttr:function(o,d){var w,E=0,M=d&&d.match(yt);if(M&&o.nodeType===1)for(;w=M[E++];)o.removeAttribute(w)}}),Ai={set:function(o,d,w){return d===!1?S.removeAttr(o,w):o.setAttribute(w,w),w}},S.each(S.expr.match.bool.source.match(/\w+/g),function(o,d){var w=Ki[d]||S.find.attr;Ki[d]=function(E,M,D){var V,fe,le=M.toLowerCase();return D||(fe=Ki[le],Ki[le]=V,V=w(E,M,D)!=null?le:null,Ki[le]=fe),V}});var Ci=/^(?:input|select|textarea|button)$/i,gn=/^(?:a|area)$/i;S.fn.extend({prop:function(o,d){return p(this,S.prop,o,d,arguments.length>1)},removeProp:function(o){return this.each(function(){delete this[S.propFix[o]||o]})}}),S.extend({prop:function(o,d,w){var E,M,D=o.nodeType;if(!(D===3||D===8||D===2))return(D!==1||!S.isXMLDoc(o))&&(d=S.propFix[d]||d,M=S.propHooks[d]),w!==void 0?M&&"set"in M&&(E=M.set(o,w,d))!==void 0?E:o[d]=w:M&&"get"in M&&(E=M.get(o,d))!==null?E:o[d]},propHooks:{tabIndex:{get:function(o){var d=S.find.attr(o,"tabindex");return d?parseInt(d,10):Ci.test(o.nodeName)||gn.test(o.nodeName)&&o.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),q.optSelected||(S.propHooks.selected={get:function(o){var d=o.parentNode;return d&&d.parentNode&&d.parentNode.selectedIndex,null},set:function(o){var d=o.parentNode;d&&(d.selectedIndex,d.parentNode&&d.parentNode.selectedIndex)}}),S.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){S.propFix[this.toLowerCase()]=this});function Wn(o){var d=o.match(yt)||[];return d.join(" ")}function Ts(o){return o.getAttribute&&o.getAttribute("class")||""}function yr(o){return Array.isArray(o)?o:typeof o=="string"?o.match(yt)||[]:[]}S.fn.extend({addClass:function(o){var d,w,E,M,D,V;return ne(o)?this.each(function(fe){S(this).addClass(o.call(this,fe,Ts(this)))}):(d=yr(o),d.length?this.each(function(){if(E=Ts(this),w=this.nodeType===1&&" "+Wn(E)+" ",w){for(D=0;D<d.length;D++)M=d[D],w.indexOf(" "+M+" ")<0&&(w+=M+" ");V=Wn(w),E!==V&&this.setAttribute("class",V)}}):this)},removeClass:function(o){var d,w,E,M,D,V;return ne(o)?this.each(function(fe){S(this).removeClass(o.call(this,fe,Ts(this)))}):arguments.length?(d=yr(o),d.length?this.each(function(){if(E=Ts(this),w=this.nodeType===1&&" "+Wn(E)+" ",w){for(D=0;D<d.length;D++)for(M=d[D];w.indexOf(" "+M+" ")>-1;)w=w.replace(" "+M+" "," ");V=Wn(w),E!==V&&this.setAttribute("class",V)}}):this):this.attr("class","")},toggleClass:function(o,d){var w,E,M,D,V=typeof o,fe=V==="string"||Array.isArray(o);return ne(o)?this.each(function(le){S(this).toggleClass(o.call(this,le,Ts(this),d),d)}):typeof d=="boolean"&&fe?d?this.addClass(o):this.removeClass(o):(w=yr(o),this.each(function(){if(fe)for(D=S(this),M=0;M<w.length;M++)E=w[M],D.hasClass(E)?D.removeClass(E):D.addClass(E);else(o===void 0||V==="boolean")&&(E=Ts(this),E&&rt.set(this,"__className__",E),this.setAttribute&&this.setAttribute("class",E||o===!1?"":rt.get(this,"__className__")||""))}))},hasClass:function(o){var d,w,E=0;for(d=" "+o+" ";w=this[E++];)if(w.nodeType===1&&(" "+Wn(Ts(w))+" ").indexOf(d)>-1)return!0;return!1}});var tr=/\r/g;S.fn.extend({val:function(o){var d,w,E,M=this[0];return arguments.length?(E=ne(o),this.each(function(D){var V;this.nodeType===1&&(E?V=o.call(this,D,S(this).val()):V=o,V==null?V="":typeof V=="number"?V+="":Array.isArray(V)&&(V=S.map(V,function(fe){return fe==null?"":fe+""})),d=S.valHooks[this.type]||S.valHooks[this.nodeName.toLowerCase()],(!d||!("set"in d)||d.set(this,V,"value")===void 0)&&(this.value=V))})):M?(d=S.valHooks[M.type]||S.valHooks[M.nodeName.toLowerCase()],d&&"get"in d&&(w=d.get(M,"value"))!==void 0?w:(w=M.value,typeof w=="string"?w.replace(tr,""):w??"")):void 0}}),S.extend({valHooks:{option:{get:function(o){var d=S.find.attr(o,"value");return d??Wn(S.text(o))}},select:{get:function(o){var d,w,E,M=o.options,D=o.selectedIndex,V=o.type==="select-one",fe=V?null:[],le=V?D+1:M.length;for(D<0?E=le:E=V?D:0;E<le;E++)if(w=M[E],(w.selected||E===D)&&!w.disabled&&(!w.parentNode.disabled||!ct(w.parentNode,"optgroup"))){if(d=S(w).val(),V)return d;fe.push(d)}return fe},set:function(o,d){for(var w,E,M=o.options,D=S.makeArray(d),V=M.length;V--;)E=M[V],(E.selected=S.inArray(S.valHooks.option.get(E),D)>-1)&&(w=!0);return w||(o.selectedIndex=-1),D}}}}),S.each(["radio","checkbox"],function(){S.valHooks[this]={set:function(o,d){if(Array.isArray(d))return o.checked=S.inArray(S(o).val(),d)>-1}},q.checkOn||(S.valHooks[this].get=function(o){return o.getAttribute("value")===null?"on":o.value})});var ir=g.location,nr={guid:Date.now()},Ls=/\?/;S.parseXML=function(o){var d,w;if(!o||typeof o!="string")return null;try{d=new g.DOMParser().parseFromString(o,"text/xml")}catch{}return w=d&&d.getElementsByTagName("parsererror")[0],(!d||w)&&S.error("Invalid XML: "+(w?S.map(w.childNodes,function(E){return E.textContent}).join(`
DesignScreenshot/output/git.buildapp.eu.org_run/git.buildapp.eu.org_4_after_login.html:236:(`+Be+": "+Ue+")",Z.name="ChunkLoadError",Z.type=Be,Z.request=Ue,O[1](Z)}};__webpack_require__.l(J,C,"chunk-"+_,_)}};var v=function(_,g){var O=g[0],R=g[1],J=g[2],Z,C,we=0;if(O.some(function(Ue){return r[Ue]!==0})){for(Z in R)__webpack_require__.o(R,Z)&&(__webpack_require__.m[Z]=R[Z]);if(J)var Be=J(__webpack_require__)}for(_&&_(g);we<O.length;we++)C=O[we],__webpack_require__.o(r,C)&&r[C]&&r[C][0](),r[C]=0},b=self.webpackChunk=self.webpackChunk||[];b.forEach(v.bind(null,0)),b.push=v.bind(null,b.push.bind(b))}();var __webpack_exports__={};(function(){"use strict";var r=__webpack_require__("./node_modules/jquery/dist/jquery.js"),v=__webpack_require__.n(r),b=__webpack_require__("./node_modules/htmx.org/dist/htmx.esm.js");window.$=window.jQuery=v(),window.htmx=b.A})(),function(){"use strict";(function(r,v,b,_){"use strict";r.isWindow=r.isWindow||function(g){return g!=null&&g===g.window},v=typeof v<"u"&&v.Math==Math?v:typeof self<"u"&&self.Math==Math?self:Function("return this")(),r.api=r.fn.api=function(g){var O=r.isFunction(this)?r(v):r(this),R=O.selector||"",J=new Date().getTime(),Z=[],C=arguments[0],we=typeof C=="string",Be=[].slice.call(arguments,1),Ue;return O.each(function(){var Q=r.isPlainObject(g)?r.extend(!0,{},r.fn.api.settings,g):r.extend({},r.fn.api.settings),Ke=Q.namespace,At=Q.metadata,gt=Q.selector,q=Q.error,ne=Q.className,c="."+Ke,W="module-"+Ke,Re=r(this),tt=Re.closest(gt.form),st=Q.stateContext?r(Q.stateContext):Re,et,je,S,si,ct,xt=this,ce=st[0],G=Re.data(W),P;P={initialize:function(){we||P.bind.events(),P.instantiate()},instantiate:function(){P.verbose("Storing instance of module",P),G=P,Re.data(W,G)},destroy:function(){P.verbose("Destroying previous module for",xt),Re.removeData(W).off(c)},bind:{events:function(){var k=P.get.event();k?(P.verbose("Attaching API events to element",k),Re.on(k+c,P.event.trigger)):Q.on=="now"&&(P.debug("Querying API endpoint immediately"),P.query())}},decode:{json:function(k){if(k!==_&&typeof k=="string")try{k=JSON.parse(k)}catch{}return k}},read:{cachedResponse:function(k){var N;if(v.Storage===_){P.error(q.noStorage);return}return N=sessionStorage.getItem(k),P.debug("Using cached response",k,N),N=P.decode.json(N),N}},write:{cachedResponse:function(k,N){if(N&&N===""){P.debug("Response empty, not caching",N);return}if(v.Storage===_){P.error(q.noStorage);return}r.isPlainObject(N)&&(N=JSON.stringify(N)),sessionStorage.setItem(k,N),P.verbose("Storing cached response for url",k,N)}},query:function(){if(P.is.disabled()){P.debug("Element is disabled API request aborted");return}if(P.is.loading())if(Q.interruptRequests)P.debug("Interrupting previous request"),P.abort();else{P.debug("Cancelling request, previous request is still pending");return}if(Q.defaultData&&r.extend(!0,Q.urlData,P.get.defaultData()),Q.serializeForm&&(Q.data=P.add.formData(Q.data)),je=P.get.settings(),je===!1){P.cancelled=!0,P.error(q.beforeSend);return}else P.cancelled=!1;if(S=P.get.templatedURL(),!S&&!P.is.mocked()){P.error(q.missingURL);return}if(S=P.add.urlData(S),!(!S&&!P.is.mocked())){if(je.url=Q.base+S,et=r.extend(!0,{},Q,{type:Q.method||Q.type,data:si,url:Q.base+S,beforeSend:Q.beforeXHR,success:function(){},failure:function(){},complete:function(){}}),P.debug("Querying URL",et.url),P.verbose("Using AJAX settings",et),Q.cache==="local"&&P.read.cachedResponse(S)){P.debug("Response returned from local cache"),P.request=P.create.request(),P.request.resolveWith(ce,[P.read.cachedResponse(S)]);return}Q.throttle?!Q.throttleFirstRequest&&!P.timer?(P.debug("Sending request",si,et.method),P.send.request(),P.timer=setTimeout(function(){},Q.throttle)):(P.debug("Throttling request",Q.throttle),clearTimeout(P.timer),P.timer=setTimeout(function(){P.timer&&delete P.timer,P.debug("Sending throttled request",si,et.method),P.send.request()},Q.throttle)):(P.debug("Sending request",si,et.method),P.send.request())}},should:{removeError:function(){return Q.hideError===!0||Q.hideError==="auto"&&!P.is.form()}},is:{disabled:function(){return Re.filter(gt.disabled).length>0},expectingJSON:function(){return Q.dataType==="json"||Q.dataType==="jsonp"},form:function(){return Re.is("form")||st.is("form")},mocked:function(){return Q.mockResponse||Q.mockResponseAsync||Q.response||Q.responseAsync},input:function(){return Re.is("input")},loading:function(){return P.request?P.request.state()=="pending":!1},abortedRequest:function(k){return k&&k.readyState!==_&&k.readyState===0?(P.verbose("XHR request determined to be aborted"),!0):(P.verbose("XHR request was not aborted"),!1)},validResponse:function(k){return!P.is.expectingJSON()||!r.isFunction(Q.successTest)?(P.verbose("Response is not JSON, skipping validation",Q.successTest,k),!0):(P.debug("Checking JSON returned success",Q.successTest,k),Q.successTest(k)?(P.debug("Response passed success test",k),!0):(P.debug("Response failed success test",k),!1))}},was:{cancelled:function(){return P.cancelled||!1},succesful:function(){return P.verbose('This behavior will be deleted due to typo. Use "was successful" instead.'),P.was.successful()},successful:function(){return P.request&&P.request.state()=="resolved"},failure:function(){return P.request&&P.request.state()=="rejected"},complete:function(){return P.request&&(P.request.state()=="resolved"||P.request.state()=="rejected")}},add:{urlData:function(k,N){var Y,ve;return k&&(Y=k.match(Q.regExp.required),ve=k.match(Q.regExp.optional),N=N||Q.urlData,Y&&(P.debug("Looking for required URL variables",Y),r.each(Y,function(Oe,Ne){var Ve=Ne.indexOf("$")!==-1?Ne.substr(2,Ne.length-3):Ne.substr(1,Ne.length-2),Ye=r.isPlainObject(N)&&N[Ve]!==_?N[Ve]:Re.data(Ve)!==_?Re.data(Ve):st.data(Ve)!==_?st.data(Ve):N[Ve];if(Ye===_)return P.error(q.requiredParameter,Ve,k),k=!1,!1;P.verbose("Found required variable",Ve,Ye),Ye=Q.encodeParameters?P.get.urlEncodedValue(Ye):Ye,k=k.replace(Ne,Ye)})),ve&&(P.debug("Looking for optional URL variables",Y),r.each(ve,function(Oe,Ne){var Ve=Ne.indexOf("$")!==-1?Ne.substr(3,Ne.length-4):Ne.substr(2,Ne.length-3),Ye=r.isPlainObject(N)&&N[Ve]!==_?N[Ve]:Re.data(Ve)!==_?Re.data(Ve):st.data(Ve)!==_?st.data(Ve):N[Ve];Ye!==_?(P.verbose("Optional variable Found",Ve,Ye),k=k.replace(Ne,Ye)):(P.verbose("Optional variable not found",Ve),k.indexOf("/"+Ne)!==-1?k=k.replace("/"+Ne,""):k=k.replace(Ne,""))}))),k},formData:function(k){var N=r.fn.serializeObject!==_,Y=N?tt.serializeObject():tt.serialize(),ve;return k=k||Q.data,ve=r.isPlainObject(k),ve?N?(P.debug("Extending existing data with form data",k,Y),k=r.extend(!0,{},k,Y)):(P.error(q.missingSerialize),P.debug("Cant extend data. Replacing data with form data",k,Y),k=Y):(P.debug("Adding form data",Y),k=Y),k}},send:{request:function(){P.set.loading(),P.request=P.create.request(),P.is.mocked()?P.mockedXHR=P.create.mockedXHR():P.xhr=P.create.xhr(),Q.onRequest.call(ce,P.request,P.xhr)}},event:{trigger:function(k){P.query(),(k.type=="submit"||k.type=="click")&&k.preventDefault()},xhr:{always:function(){},done:function(k,N,Y){var ve=this,Oe=new Date().getTime()-ct,Ne=Q.loadingDuration-Oe,Ve=r.isFunction(Q.onResponse)?P.is.expectingJSON()&&!Q.rawResponse?Q.onResponse.call(ve,r.extend(!0,{},k)):Q.onResponse.call(ve,k):!1;Ne=Ne>0?Ne:0,Ve&&(P.debug("Modified API response in onResponse callback",Q.onResponse,Ve,k),k=Ve),Ne>0&&P.debug("Response completed early delaying state change by",Ne),setTimeout(function(){P.is.validResponse(k)?P.request.resolveWith(ve,[k,Y]):P.request.rejectWith(ve,[Y,"invalid"])},Ne)},fail:function(k,N,Y){var ve=this,Oe=new Date().getTime()-ct,Ne=Q.loadingDuration-Oe;Ne=Ne>0?Ne:0,Ne>0&&P.debug("Response completed early delaying state change by",Ne),setTimeout(function(){P.is.abortedRequest(k)?P.request.rejectWith(ve,[k,"aborted",Y]):P.request.rejectWith(ve,[k,"error",N,Y])},Ne)}},request:{done:function(k,N){P.debug("Successful API Response",k),Q.cache==="local"&&S&&(P.write.cachedResponse(S,k),P.debug("Saving server response locally",P.cache)),Q.onSuccess.call(ce,k,Re,N)},complete:function(k,N){var Y,ve;P.was.successful()?(ve=k,Y=N):(Y=k,ve=P.get.responseFromXHR(Y)),P.remove.loading(),Q.onComplete.call(ce,ve,Re,Y)},fail:function(k,N,Y){var ve=P.get.responseFromXHR(k),Oe=P.get.errorFromRequest(ve,N,Y);if(N=="aborted")return P.debug("XHR Aborted (Most likely caused by page navigation or CORS Policy)",N,Y),Q.onAbort.call(ce,N,Re,k),!0;N=="invalid"?P.debug("JSON did not pass success test. A server-side error has most likely occurred",ve):N=="error"&&k!==_&&(P.debug("XHR produced a server error",N,Y),(k.status<200||k.status>=300)&&Y!==_&&Y!==""&&P.error(q.statusMessage+Y,et.url),Q.onError.call(ce,Oe,Re,k)),Q.errorDuration&&N!=="aborted"&&(P.debug("Adding error state"),P.set.error(),P.should.removeError()&&setTimeout(P.remove.error,Q.errorDuration)),P.debug("API Request failed",Oe,k),Q.onFailure.call(ce,ve,Re,k)}}},create:{request:function(){return r.Deferred().always(P.event.request.complete).done(P.event.request.done).fail(P.event.request.fail)},mockedXHR:function(){var k=!1,N=!1,Y=!1,ve=Q.mockResponse||Q.response,Oe=Q.mockResponseAsync||Q.responseAsync,Ne,Ve,Ye;return Ye=r.Deferred().always(P.event.xhr.complete).done(P.event.xhr.done).fail(P.event.xhr.fail),ve?(r.isFunction(ve)?(P.debug("Using specified synchronous callback",ve),Ve=ve.call(ce,je)):(P.debug("Using settings specified response",ve),Ve=ve),Ye.resolveWith(ce,[Ve,k,{responseText:Ve}])):r.isFunction(Oe)&&(Ne=function(Lt){P.debug("Async callback returned response",Lt),Lt?Ye.resolveWith(ce,[Lt,k,{responseText:Lt}]):Ye.rejectWith(ce,[{responseText:Lt},N,Y])},P.debug("Using specified async response callback",Oe),Oe.call(ce,je,Ne)),Ye},xhr:function(){var k;return k=r.ajax(et).always(P.event.xhr.always).done(P.event.xhr.done).fail(P.event.xhr.fail),P.verbose("Created server request",k,et),k}},set:{error:function(){P.verbose("Adding error state to element",st),st.addClass(ne.error)},loading:function(){P.verbose("Adding loading state to element",st),st.addClass(ne.loading),ct=new Date().getTime()}},remove:{error:function(){P.verbose("Removing error state from element",st),st.removeClass(ne.error)},loading:function(){P.verbose("Removing loading state from element",st),st.removeClass(ne.loading)}},get:{responseFromXHR:function(k){return r.isPlainObject(k)?P.is.expectingJSON()?P.decode.json(k.responseText):k.responseText:!1},errorFromRequest:function(k,N,Y){return r.isPlainObject(k)&&k.error!==_?k.error:Q.error[N]!==_?Q.error[N]:Y},request:function(){return P.request||!1},xhr:function(){return P.xhr||!1},settings:function(){var k;return k=Q.beforeSend.call(Re,Q),k&&(k.success!==_&&(P.debug("Legacy success callback detected",k),P.error(q.legacyParameters,k.success),k.onSuccess=k.success),k.failure!==_&&(P.debug("Legacy failure callback detected",k),P.error(q.legacyParameters,k.failure),k.onFailure=k.failure),k.complete!==_&&(P.debug("Legacy complete callback detected",k),P.error(q.legacyParameters,k.complete),k.onComplete=k.complete)),k===_&&P.error(q.noReturnedValue),k===!1?k:k!==_?r.extend(!0,{},k):r.extend(!0,{},Q)},urlEncodedValue:function(k){return v.encodeURIComponent(k)},defaultData:function(){var k={};return r.isWindow(xt)||(P.is.input()?k.value=Re.val():P.is.form()||(k.text=Re.text())),k},event:function(){return r.isWindow(xt)||Q.on=="now"?(P.debug("API called without element, no events attached"),!1):Q.on=="auto"?Re.is("input")?xt.oninput!==_?"input":xt.onpropertychange!==_?"propertychange":"keyup":Re.is("form")?"submit":"click":Q.on},templatedURL:function(k){if(k=k||Re.data(At.action)||Q.action||!1,S=Re.data(At.url)||Q.url||!1,S)return P.debug("Using specified url",S),S;if(k){if(P.debug("Looking up url for action",k,Q.api),Q.api[k]===_&&!P.is.mocked()){P.error(q.missingAction,Q.action,Q.api);return}S=Q.api[k]}else P.is.form()&&(S=Re.attr("action")||st.attr("action")||!1,P.debug("No url or action specified, defaulting to form action",S));return S}},abort:function(){var k=P.get.xhr();k&&k.state()!=="resolved"&&(P.debug("Cancelling API request"),k.abort())},reset:function(){P.remove.error(),P.remove.loading()},setting:function(k,N){if(P.debug("Changing setting",k,N),r.isPlainObject(k))r.extend(!0,Q,k);else if(N!==_)r.isPlainObject(Q[k])?r.extend(!0,Q[k],N):Q[k]=N;else return Q[k]},internal:function(k,N){if(r.isPlainObject(k))r.extend(!0,P,k);else if(N!==_)P[k]=N;else return P[k]},debug:function(){!Q.silent&&Q.debug&&(Q.performance?P.performance.log(arguments):(P.debug=Function.prototype.bind.call(console.info,console,Q.name+":"),P.debug.apply(console,arguments)))},verbose:function(){!Q.silent&&Q.verbose&&Q.debug&&(Q.performance?P.performance.log(arguments):(P.verbose=Function.prototype.bind.call(console.info,console,Q.name+":"),P.verbose.apply(console,arguments)))},error:function(){Q.silent||(P.error=Function.prototype.bind.call(console.error,console,Q.name+":"),P.error.apply(console,arguments))},performance:{log:function(k){var N,Y,ve;Q.performance&&(N=new Date().getTime(),ve=J||N,Y=N-ve,J=N,Z.push({Name:k[0],Arguments:[].slice.call(k,1)||"","Execution Time":Y})),clearTimeout(P.performance.timer),P.performance.timer=setTimeout(P.performance.display,500)},display:function(){var k=Q.name+":",N=0;J=!1,clearTimeout(P.performance.timer),r.each(Z,function(Y,ve){N+=ve["Execution Time"]}),k+=" "+N+"ms",R&&(k+=" '"+R+"'"),(console.group!==_||console.table!==_)&&Z.length>0&&(console.groupCollapsed(k),console.table?console.table(Z):r.each(Z,function(Y,ve){console.log(ve.Name+": "+ve["Execution Time"]+"ms")}),console.groupEnd()),Z=[]}},invoke:function(k,N,Y){var ve=G,Oe,Ne,Ve;return N=N||Be,Y=xt||Y,typeof k=="string"&&ve!==_&&(k=k.split(/[\. ]/),Oe=k.length-1,r.each(k,function(Ye,Lt){var K=Ye!=Oe?Lt+k[Ye+1].charAt(0).toUpperCase()+k[Ye+1].slice(1):k;if(r.isPlainObject(ve[K])&&Ye!=Oe)ve=ve[K];else{if(ve[K]!==_)return Ne=ve[K],!1;if(r.isPlainObject(ve[Lt])&&Ye!=Oe)ve=ve[Lt];else return ve[Lt]!==_?(Ne=ve[Lt],!1):(P.error(q.method,k),!1)}})),r.isFunction(Ne)?Ve=Ne.apply(Y,N):Ne!==_&&(Ve=Ne),Array.isArray(Ue)?Ue.push(Ve):Ue!==_?Ue=[Ue,Ve]:Ve!==_&&(Ue=Ve),Ne}},we?(G===_&&P.initialize(),P.invoke(C)):(G!==_&&G.invoke("destroy"),P.initialize())}),Ue!==_?Ue:this},r.api.settings={name:"API",namespace:"api",debug:!1,verbose:!1,performance:!0,api:{},cache:!0,interruptRequests:!0,on:"auto",stateContext:!1,loadingDuration:0,hideError:"auto",errorDuration:2e3,encodeParameters:!0,action:!1,url:!1,base:"",urlData:{},defaultData:!0,serializeForm:!1,throttle:0,throttleFirstRequest:!0,method:"get",data:{},dataType:"json",mockResponse:!1,mockResponseAsync:!1,response:!1,responseAsync:!1,rawResponse:!1,beforeSend:function(g){return g},beforeXHR:function(g){},onRequest:function(g,O){},onResponse:!1,onSuccess:function(g,O){},onComplete:function(g,O){},onFailure:function(g,O){},onError:function(g,O){},onAbort:function(g,O){},successTest:!1,error:{beforeSend:"The before send function has aborted the request",error:"There was an error with your request",exitConditions:"API Request Aborted. Exit conditions met",JSONParse:"JSON could not be parsed during error handling",legacyParameters:"You are using legacy API success callback names",method:"The method you called is not defined",missingAction:"API action used but no url was defined",missingSerialize:"jquery-serialize-object is required to add form data to an existing data object",missingURL:"No URL specified for api event",noReturnedValue:"The beforeSend callback must return a settings object, beforeSend ignored.",noStorage:"Caching responses locally requires session storage",parseError:"There was an error parsing your request",requiredParameter:"Missing a required URL parameter: ",statusMessage:"Server gave an error: ",timeout:"Your request timed out"},regExp:{required:/\{\$*[A-z0-9]+\}/g,optional:/\{\/\$*[A-z0-9]+\}/g},className:{loading:"loading",error:"error"},selector:{disabled:".disabled",form:"form"},metadata:{action:"action",url:"url"}}})(jQuery,window,document);(function(r,v,b,_){"use strict";r.isFunction=r.isFunction||function(g){return typeof g=="function"&&typeof g.nodeType!="number"},v=typeof v<"u"&&v.Math==Math?v:typeof self<"u"&&self.Math==Math?self:Function("return this")(),r.fn.dropdown=function(g){var O=r(this),R=r(b),J=O.selector||"",Z="ontouchstart"in b.documentElement,C="click",we=new Date().getTime(),Be=[],Ue=arguments[0],Q=typeof Ue=="string",Ke=[].slice.call(arguments,1),At;return O.each(function(gt){var q=r.isPlainObject(g)?r.extend(!0,{},r.fn.dropdown.settings,g):r.extend({},r.fn.dropdown.settings),ne=q.className,c=q.message,W=q.fields,Re=q.keys,tt=q.metadata,st=q.namespace,et=q.regExp,je=q.selector,S=q.error,si=q.templates,ct="."+st,xt="module-"+st,ce=r(this),G=r(q.context),P=ce.find(je.text),k=ce.find(je.search),N=ce.find(je.sizer),Y=ce.find(je.input),ve=ce.find(je.icon),Oe=ce.find(je.clearIcon),Ne=ce.prev().find(je.text).length>0?ce.prev().find(je.text):ce.prev(),Ve=ce.children(je.menu),Ye=Ve.find(je.item),Lt=q.hideDividers?Ye.parent().children(je.divider):r(),K=!1,Ee=!1,nt=!1,te=!1,ee=this,oe=ce.data(xt),Ge,yt,jt,Bt,Qt,ji,ti,fn,Qi,p;p={initialize:function(){p.debug("Initializing dropdown",q),p.is.alreadySetup()?p.setup.reference():(q.ignoreDiacritics&&!String.prototype.normalize&&(q.ignoreDiacritics=!1,p.error(S.noNormalize,ee)),p.setup.layout(),q.values&&(p.set.initialLoad(),p.change.values(q.values),p.remove.initialLoad()),p.refreshData(),p.save.defaults(),p.restore.selected(),p.create.id(),p.bind.events(),p.observeChanges(),p.instantiate())},instantiate:function(){p.verbose("Storing instance of dropdown",p),oe=p,ce.data(xt,p)},destroy:function(){p.verbose("Destroying previous dropdown",ce),p.remove.tabbable(),p.remove.active(),Ve.transition("stop all"),Ve.removeClass(ne.visible).addClass(ne.hidden),ce.off(ct).removeData(xt),Ve.off(ct),R.off(Qt),p.disconnect.menuObserver(),p.disconnect.selectObserver(),p.disconnect.classObserver()},observeChanges:function(){"MutationObserver"in v&&(ti=new MutationObserver(p.event.select.mutation),fn=new MutationObserver(p.event.menu.mutation),Qi=new MutationObserver(p.event.class.mutation),p.debug("Setting up mutation observer",ti,fn,Qi),p.observe.select(),p.observe.menu(),p.observe.class())},disconnect:{menuObserver:function(){fn&&fn.disconnect()},selectObserver:function(){ti&&ti.disconnect()},classObserver:function(){Qi&&Qi.disconnect()}},observe:{select:function(){p.has.input()&&ti&&ti.observe(ce[0],{childList:!0,subtree:!0})},menu:function(){p.has.menu()&&fn&&fn.observe(Ve[0],{childList:!0,subtree:!0})},class:function(){p.has.search()&&Qi&&Qi.observe(ce[0],{attributes:!0})}},create:{id:function(){ji=(Math.random().toString(16)+"000000000").substr(2,8),Qt="."+ji,p.verbose("Creating unique id for element",ji)},userChoice:function(j){var H,ge,me,De;return j=j||p.get.userValues(),j?(j=Array.isArray(j)?j:[j],r.each(j,function(ht,rt){p.get.item(rt)===!1&&(De=q.templates.addition(p.add.variables(c.addResult,rt)),ge=r("<div />").html(De).attr("data-"+tt.value,rt).attr("data-"+tt.text,rt).addClass(ne.addition).addClass(ne.item),q.hideAdditions&&ge.addClass(ne.hidden),H=H===_?ge:H.add(ge),p.verbose("Creating user choices for value",rt,ge))}),H):!1},userLabels:function(j){var H=p.get.userValues();H&&(p.debug("Adding user labels",H),r.each(H,function(ge,me){p.verbose("Adding custom user value"),p.add.label(me,me)}))},menu:function(){Ve=r("<div />").addClass(ne.menu).appendTo(ce)},sizer:function(){N=r("<span />").addClass(ne.sizer).insertAfter(k)}},search:function(j){j=j!==_?j:p.get.query(),p.verbose("Searching for query",j),p.has.minCharacters(j)?p.filter(j):p.hide(null,!0)},select:{firstUnfiltered:function(){p.verbose("Selecting first non-filtered element"),p.remove.selectedItem(),Ye.not(je.unselectable).not(je.addition+je.hidden).eq(0).addClass(ne.selected)},nextAvailable:function(j){j=j.eq(0);var H=j.nextAll(je.item).not(je.unselectable).eq(0),ge=j.prevAll(je.item).not(je.unselectable).eq(0),me=H.length>0;me?(p.verbose("Moving selection to",H),H.addClass(ne.selected)):(p.verbose("Moving selection to",ge),ge.addClass(ne.selected))}},setup:{api:function(){var j={debug:q.debug,urlData:{value:p.get.value(),query:p.get.query()},on:!1};p.verbose("First request, initializing API"),ce.api(j)},layout:function(){ce.is("select")&&(p.setup.select(),p.setup.returnedObject()),p.has.menu()||p.create.menu(),p.is.selection()&&p.is.clearable()&&!p.has.clearItem()&&(p.verbose("Adding clear icon"),Oe=r("<i />").addClass("remove icon").insertBefore(P)),p.is.search()&&!p.has.search()&&(p.verbose("Adding search input"),k=r("<input />").addClass(ne.search).prop("autocomplete","off").insertBefore(P)),p.is.multiple()&&p.is.searchSelection()&&!p.has.sizer()&&p.create.sizer(),q.allowTab&&p.set.tabbable()},select:function(){var j=p.get.selectValues();p.debug("Dropdown initialized on a select",j),ce.is("select")&&(Y=ce),Y.parent(je.dropdown).length>0?(p.debug("UI dropdown already exists. Creating dropdown menu only"),ce=Y.closest(je.dropdown),p.has.menu()||p.create.menu(),Ve=ce.children(je.menu),p.setup.menu(j)):(p.debug("Creating entire dropdown from select"),ce=r("<div />").attr("class",Y.attr("class")).addClass(ne.selection).addClass(ne.dropdown).html(si.dropdown(j,W,q.preserveHTML,q.className)).insertBefore(Y),Y.hasClass(ne.multiple)&&Y.prop("multiple")===!1&&(p.error(S.missingMultiple),Y.prop("multiple",!0)),Y.is("[multiple]")&&p.set.multiple(),Y.prop("disabled")&&(p.debug("Disabling dropdown"),ce.addClass(ne.disabled)),Y.removeAttr("required").removeAttr("class").detach().prependTo(ce)),p.refresh()},menu:function(j){Ve.html(si.menu(j,W,q.preserveHTML,q.className)),Ye=Ve.find(je.item),Lt=q.hideDividers?Ye.parent().children(je.divider):r()},reference:function(){p.debug("Dropdown behavior was called on select, replacing with closest dropdown"),ce=ce.parent(je.dropdown),oe=ce.data(xt),ee=ce.get(0),p.refresh(),p.setup.returnedObject()},returnedObject:function(){var j=O.slice(0,gt),H=O.slice(gt+1);O=j.add(ce).add(H)}},refresh:function(){p.refreshSelectors(),p.refreshData()},refreshItems:function(){Ye=Ve.find(je.item),Lt=q.hideDividers?Ye.parent().children(je.divider):r()},refreshSelectors:function(){p.verbose("Refreshing selector cache"),P=ce.find(je.text),k=ce.find(je.search),Y=ce.find(je.input),ve=ce.find(je.icon),Ne=ce.prev().find(je.text).length>0?ce.prev().find(je.text):ce.prev(),Ve=ce.children(je.menu),Ye=Ve.find(je.item),Lt=q.hideDividers?Ye.parent().children(je.divider):r()},refreshData:function(){p.verbose("Refreshing cached metadata"),Ye.removeData(tt.text).removeData(tt.value)},clearData:function(){p.verbose("Clearing metadata"),Ye.removeData(tt.text).removeData(tt.value),ce.removeData(tt.defaultText).removeData(tt.defaultValue).removeData(tt.placeholderText)},toggle:function(){p.verbose("Toggling menu visibility"),p.is.active()?p.hide():p.show()},show:function(j,H){if(j=r.isFunction(j)?j:function(){},!p.can.show()&&p.is.remote()&&(p.debug("No API results retrieved, searching before show"),p.queryRemote(p.get.query(),p.show)),p.can.show()&&!p.is.active()){if(p.debug("Showing dropdown"),p.has.message()&&!(p.has.maxSelections()||p.has.allResultsFiltered())&&p.remove.message(),p.is.allFiltered())return!0;q.onShow.call(ee)!==!1&&(q.onAfterFiltered.call(ee),p.animate.show(function(){p.can.click()&&p.bind.intent(),p.has.search()&&!H&&p.focusSearch(),p.set.visible(),j.call(ee)}))}},hide:function(j,H){j=r.isFunction(j)?j:function(){},p.is.active()&&!p.is.animatingOutward()?(p.debug("Hiding dropdown"),q.onHide.call(ee)!==!1&&p.animate.hide(function(){p.remove.visible(),p.is.focusedOnSearch()&&H!==!0&&k.blur(),j.call(ee)})):p.can.click()&&p.unbind.intent(),te=!1},hideOthers:function(){p.verbose("Finding other dropdowns to hide"),O.not(ce).has(je.menu+"."+ne.visible).dropdown("hide")},hideMenu:function(){p.verbose("Hiding menu  instantaneously"),p.remove.active(),p.remove.visible(),Ve.transition("hide")},hideSubMenus:function(){var j=Ve.children(je.item).find(je.menu);p.verbose("Hiding sub menus",j),j.transition("hide")},bind:{events:function(){p.bind.keyboardEvents(),p.bind.inputEvents(),p.bind.mouseEvents()},keyboardEvents:function(){p.verbose("Binding keyboard events"),ce.on("keydown"+ct,p.event.keydown),p.has.search()&&ce.on(p.get.inputEvent()+ct,je.search,p.event.input),p.is.multiple()&&R.on("keydown"+Qt,p.event.document.keydown)},inputEvents:function(){p.verbose("Binding input change events"),ce.on("change"+ct,je.input,p.event.change)},mouseEvents:function(){p.verbose("Binding mouse events"),p.is.multiple()&&ce.on(C+ct,je.label,p.event.label.click).on(C+ct,je.remove,p.event.remove.click),p.is.searchSelection()?(ce.on("mousedown"+ct,p.event.mousedown).on("mouseup"+ct,p.event.mouseup).on("mousedown"+ct,je.menu,p.event.menu.mousedown).on("mouseup"+ct,je.menu,p.event.menu.mouseup).on(C+ct,je.icon,p.event.icon.click).on(C+ct,je.clearIcon,p.event.clearIcon.click).on("focus"+ct,je.search,p.event.search.focus).on(C+ct,je.search,p.event.search.focus).on("blur"+ct,je.search,p.event.search.blur).on(C+ct,je.text,p.event.text.focus),p.is.multiple()&&ce.on(C+ct,p.event.click)):(q.on=="click"?ce.on(C+ct,je.icon,p.event.icon.click).on(C+ct,p.event.test.toggle):q.on=="hover"?ce.on("mouseenter"+ct,p.delay.show).on("mouseleave"+ct,p.delay.hide):ce.on(q.on+ct,p.toggle),ce.on("mousedown"+ct,p.event.mousedown).on("mouseup"+ct,p.event.mouseup).on("focus"+ct,p.event.focus).on(C+ct,je.clearIcon,p.event.clearIcon.click),p.has.menuSearch()?ce.on("blur"+ct,je.search,p.event.search.blur):ce.on("blur"+ct,p.event.blur)),Ve.on((Z?"touchstart":"mouseenter")+ct,je.item,p.event.item.mouseenter).on("mouseleave"+ct,je.item,p.event.item.mouseleave).on("click"+ct,je.item,p.event.item.click)},intent:function(){p.verbose("Binding hide intent event to document"),Z&&R.on("touchstart"+Qt,p.event.test.touch).on("touchmove"+Qt,p.event.test.touch),R.on(C+Qt,p.event.test.hide)}},unbind:{intent:function(){p.verbose("Removing hide intent event from document"),Z&&R.off("touchstart"+Qt).off("touchmove"+Qt),R.off(C+Qt)}},filter:function(j){var H=j!==_?j:p.get.query(),ge=function(){p.is.multiple()&&p.filterActive(),(j||!j&&p.get.activeItem().length==0)&&p.select.firstUnfiltered(),p.has.allResultsFiltered()?q.onNoResults.call(ee,H)?q.allowAdditions?q.hideAdditions&&(p.verbose("User addition with no menu, setting empty style"),p.set.empty(),p.hideMenu()):(p.verbose("All items filtered, showing message",H),p.add.message(c.noResults)):(p.verbose("All items filtered, hiding dropdown",H),p.hideMenu()):(p.remove.empty(),p.remove.message()),q.allowAdditions&&p.add.userSuggestion(p.escape.htmlEntities(j)),p.is.searchSelection()&&p.can.show()&&p.is.focusedOnSearch()&&p.show(),q.onAfterFiltered.call(ee)};q.useLabels&&p.has.maxSelections()||(q.apiSettings?p.can.useAPI()?p.queryRemote(H,function(){q.filterRemoteData&&p.filterItems(H);var me=Y.val();Array.isArray(me)||(me=me&&me!==""?me.split(q.delimiter):[]),r.each(me,function(De,ht){Ye.filter('[data-value="'+CSS.escape(ht)+'"]').addClass(ne.filtered)}),ge()}):p.error(S.noAPI):(p.filterItems(H),ge()))},queryRemote:function(j,H){var ge={errorDuration:!1,cache:"local",throttle:q.throttle,urlData:{query:j},onError:function(){p.add.message(c.serverError),H()},onFailure:function(){p.add.message(c.serverError),H()},onSuccess:function(me){var De=me[W.remoteValues];Array.isArray(De)||(De=[]),p.remove.message();var ht={};ht[W.values]=De,p.setup.menu(ht),De.length===0&&!q.allowAdditions&&p.add.message(c.noResults),H()}};ce.api("get request")||p.setup.api(),ge=r.extend(!0,{},ge,q.apiSettings),ce.api("setting",ge).api("query")},filterItems:function(j){var H=p.remove.diacritics(j!==_?j:p.get.query()),ge=null,me=p.escape.string(H),De=(q.ignoreSearchCase?"i":"")+"gm",ht=new RegExp("^"+me,De);p.has.query()&&(ge=[],p.verbose("Searching for matching values",H),Ye.each(function(){var rt=r(this),zt,fi;if(rt.hasClass(ne.unfilterable))return ge.push(this),!0;if(q.match==="both"||q.match==="text"){if(zt=p.remove.diacritics(String(p.get.choiceText(rt,!1))),zt.search(ht)!==-1)return ge.push(this),!0;if(q.fullTextSearch==="exact"&&p.exactSearch(H,zt))return ge.push(this),!0;if(q.fullTextSearch===!0&&p.fuzzySearch(H,zt))return ge.push(this),!0}if(q.match==="both"||q.match==="value"){if(fi=p.remove.diacritics(String(p.get.choiceValue(rt,zt))),fi.search(ht)!==-1)return ge.push(this),!0;if(q.fullTextSearch==="exact"&&p.exactSearch(H,fi))return ge.push(this),!0;if(q.fullTextSearch===!0&&p.fuzzySearch(H,fi))return ge.push(this),!0}})),p.debug("Showing only matched items",H),p.remove.filteredItem(),ge&&Ye.not(ge).addClass(ne.filtered),p.has.query()?q.hideDividers===!0?Lt.addClass(ne.hidden):q.hideDividers==="empty"&&Lt.removeClass(ne.hidden).filter(function(){var rt=r(this).nextUntil(je.item);return(rt.length?rt:r(this)).nextUntil(je.divider).filter(je.item+":not(."+ne.filtered+")").length===0}).addClass(ne.hidden):Lt.removeClass(ne.hidden)},fuzzySearch:function(j,H){var ge=H.length,me=j.length;if(j=q.ignoreSearchCase?j.toLowerCase():j,H=q.ignoreSearchCase?H.toLowerCase():H,me>ge)return!1;if(me===ge)return j===H;e:for(var De=0,ht=0;De<me;De++){for(var rt=j.charCodeAt(De);ht<ge;)if(H.charCodeAt(ht++)===rt)continue e;return!1}return!0},exactSearch:function(j,H){return j=q.ignoreSearchCase?j.toLowerCase():j,H=q.ignoreSearchCase?H.toLowerCase():H,H.indexOf(j)>-1},filterActive:function(){q.useLabels&&Ye.filter("."+ne.active).addClass(ne.filtered)},focusSearch:function(j){p.has.search()&&!p.is.focusedOnSearch()&&(j?(ce.off("focus"+ct,je.search),k.focus(),ce.on("focus"+ct,je.search,p.event.search.focus)):k.focus())},blurSearch:function(){p.has.search()&&k.blur()},forceSelection:function(){var j=Ye.not(ne.filtered).filter("."+ne.selected).eq(0),H=Ye.not(ne.filtered).filter("."+ne.active).eq(0),ge=j.length>0?j:H,me=ge.length>0;q.allowAdditions||me&&!p.is.multiple()?(p.debug("Forcing partial selection to selected item",ge),p.event.item.click.call(ge,{},!0)):p.remove.searchTerm()},change:{values:function(j){q.allowAdditions||p.clear(),p.debug("Creating dropdown with specified values",j);var H={};H[W.values]=j,p.setup.menu(H),r.each(j,function(ge,me){if(me.selected==!0&&(p.debug("Setting initial selection to",me[W.value]),p.set.selected(me[W.value]),!p.is.multiple()))return!1}),p.has.selectInput()&&(p.disconnect.selectObserver(),Y.html(""),Y.append("<option disabled selected value></option>"),r.each(j,function(ge,me){var De=q.templates.escape(me[W.value]),ht=q.templates.escape(me[W.name]||"",q.preserveHTML);Y.append('<option value="'+De+'">'+ht+"</option>")}),p.observe.select())}},event:{change:function(){nt||(p.debug("Input changed, updating selection"),p.set.selected())},focus:function(){q.showOnFocus&&!K&&p.is.hidden()&&!jt&&p.show()},blur:function(j){jt=b.activeElement===this,!K&&!jt&&(p.remove.activeLabel(),p.hide())},mousedown:function(){p.is.searchSelection()?Bt=!0:K=!0},mouseup:function(){p.is.searchSelection()?Bt=!1:K=!1},click:function(j){var H=r(j.target);H.is(ce)&&(p.is.focusedOnSearch()?p.show():p.focusSearch())},search:{focus:function(j){K=!0,p.is.multiple()&&p.remove.activeLabel(),(q.showOnFocus||j.type!=="focus"&&j.type!=="focusin")&&p.search()},blur:function(j){jt=b.activeElement===this,p.is.searchSelection()&&!Bt&&!Ee&&!jt&&(q.forceSelection?p.forceSelection():q.allowAdditions||p.remove.searchTerm(),p.hide()),Bt=!1}},clearIcon:{click:function(j){p.clear(),p.is.searchSelection()&&p.remove.searchTerm(),p.hide(),j.stopPropagation()}},icon:{click:function(j){te=!0;const H=!!Ve.find(".search > input").length;p.has.search()&&!H?p.is.active()?p.blurSearch():q.showOnFocus?p.focusSearch():p.toggle():p.toggle()}},text:{focus:function(j){K=!0,p.focusSearch()}},input:function(j){(p.is.multiple()||p.is.searchSelection())&&p.set.filtered(),clearTimeout(p.timer),p.timer=setTimeout(p.search,q.delay.search)},label:{click:function(j){var H=r(this),ge=ce.find(je.label),me=ge.filter("."+ne.active),De=H.nextAll("."+ne.active),ht=H.prevAll("."+ne.active),rt=De.length>0?H.nextUntil(De).add(me).add(H):H.prevUntil(ht).add(me).add(H);j.shiftKey?(me.removeClass(ne.active),rt.addClass(ne.active)):j.ctrlKey?H.toggleClass(ne.active):(me.removeClass(ne.active),H.addClass(ne.active)),q.onLabelSelect.apply(this,ge.filter("."+ne.active))}},remove:{click:function(){var j=r(this).parent();j.hasClass(ne.active)?p.remove.activeLabels():p.remove.activeLabels(j)}},test:{toggle:function(j){var H=p.is.multiple()?p.show:p.toggle;p.is.bubbledLabelClick(j)||p.is.bubbledIconClick(j)||p.determine.eventOnElement(j,H)&&j.preventDefault()},touch:function(j){p.determine.eventOnElement(j,function(){j.type=="touchstart"?p.timer=setTimeout(function(){p.hide()},q.delay.touch):j.type=="touchmove"&&clearTimeout(p.timer)}),j.stopPropagation()},hide:function(j){p.determine.eventInModule(j,p.hide)&&ee.id&&r(j.target).attr("for")===ee.id&&j.preventDefault()}},class:{mutation:function(j){j.forEach(function(H){H.attributeName==="class"&&p.check.disabled()})}},select:{mutation:function(j){p.debug("<select> modified, recreating menu"),p.is.selectMutation(j)&&(p.disconnect.selectObserver(),p.refresh(),p.setup.select(),p.set.selected(),p.observe.select())}},menu:{mutation:function(j){var H=j[0],ge=H.addedNodes?r(H.addedNodes[0]):r(!1),me=H.removedNodes?r(H.removedNodes[0]):r(!1),De=ge.add(me),ht=De.is(je.addition)||De.closest(je.addition).length>0,rt=De.is(je.message)||De.closest(je.message).length>0;ht||rt?(p.debug("Updating item selector cache"),p.refreshItems()):(p.debug("Menu modified, updating selector cache"),p.refresh())},mousedown:function(){Ee=!0},mouseup:function(){Ee=!1}},item:{mouseenter:function(j){var H=r(j.target),ge=r(this),me=ge.children(je.menu),De=ge.siblings(je.item).children(je.menu),ht=me.length>0,rt=me.find(H).length>0;!rt&&ht&&(clearTimeout(p.itemTimer),p.itemTimer=setTimeout(function(){p.verbose("Showing sub-menu",me),r.each(De,function(){p.animate.hide(!1,r(this))}),p.animate.show(!1,me)},q.delay.show),j.preventDefault())},mouseleave:function(j){var H=r(this).children(je.menu);H.length>0&&(clearTimeout(p.itemTimer),p.itemTimer=setTimeout(function(){p.verbose("Hiding sub-menu",H),p.animate.hide(!1,H)},q.delay.hide))},click:function(j,H){var ge=r(this),me=r(j?j.target:""),De=ge.find(je.menu),ht=p.get.choiceText(ge),rt=p.get.choiceValue(ge,ht),zt=De.length>0,fi=De.find(me).length>0;b.activeElement.tagName.toLowerCase()!=="input"&&r(b.activeElement).blur(),!fi&&(!zt||q.allowCategorySelection)&&(p.is.searchSelection()&&(q.allowAdditions&&p.remove.userAddition(),p.remove.searchTerm(),!p.is.focusedOnSearch()&&H!=!0&&p.focusSearch(!0)),q.useLabels||(p.remove.filteredItem(),p.set.scrollPosition(ge)),p.determine.selectAction.call(this,ht,rt))}},document:{keydown:function(j){var H=j.which,ge=p.is.inObject(H,Re);if(ge){var me=ce.find(je.label),De=me.filter("."+ne.active),ht=De.data(tt.value),rt=me.index(De),zt=me.length,fi=De.length>0,vi=De.length>1,nn=rt===0,on=rt+1==zt,an=p.is.searchSelection(),bn=p.is.focusedOnSearch(),ln=p.is.focused(),Yi=bn&&p.get.caretPosition(!1)===0,Fn=Yi&&p.get.caretPosition(!0)!==0,vr;if(an&&!fi&&!bn)return;H==Re.leftArrow?(ln||Yi)&&!fi?(p.verbose("Selecting previous label"),me.last().addClass(ne.active)):fi&&(j.shiftKey?p.verbose("Adding previous label to selection"):(p.verbose("Selecting previous label"),me.removeClass(ne.active)),nn&&!vi?De.addClass(ne.active):De.prev(je.siblingLabel).addClass(ne.active).end(),j.preventDefault()):H==Re.rightArrow?(ln&&!fi&&me.first().addClass(ne.active),fi&&(j.shiftKey?p.verbose("Adding next label to selection"):(p.verbose("Selecting next label"),me.removeClass(ne.active)),on?an?bn?me.removeClass(ne.active):p.focusSearch():vi?De.next(je.siblingLabel).addClass(ne.active):De.addClass(ne.active):De.next(je.siblingLabel).addClass(ne.active),j.preventDefault())):H==Re.deleteKey||H==Re.backspace?fi?(p.verbose("Removing active labels"),on&&an&&!bn&&p.focusSearch(),De.last().next(je.siblingLabel).addClass(ne.active),p.remove.activeLabels(De),j.preventDefault()):Yi&&!Fn&&!fi&&H==Re.backspace&&(p.verbose("Removing last label on input backspace"),De=me.last().addClass(ne.active),p.remove.activeLabels(De)):De.removeClass(ne.active)}}},keydown:function(j){var H=j.which,ge=p.is.inObject(H,Re);if(ge){var me=Ye.not(je.unselectable).filter("."+ne.selected).eq(0),De=Ve.children("."+ne.active).eq(0),ht=me.length>0?me:De,rt=ht.length>0?ht.siblings(":not(."+ne.filtered+")").addBack():Ve.children(":not(."+ne.filtered+")"),zt=ht.children(je.menu),fi=ht.closest(je.menu),vi=fi.hasClass(ne.visible)||fi.hasClass(ne.animating)||fi.parent(je.menu).length>0,nn=zt.length>0,on=ht.length>0,an=ht.not(je.unselectable).length>0,bn=H==Re.delimiter&&q.allowAdditions&&p.is.multiple(),ln=q.allowAdditions&&q.hideAdditions&&(H==Re.enter||bn)&&an,Yi,Fn,vr;if(ln&&(p.verbose("Selecting item from keyboard shortcut",ht),p.event.item.click.call(ht,j),p.is.searchSelection()&&p.remove.searchTerm(),p.is.multiple()&&j.preventDefault()),p.is.visible()){if((H==Re.enter||bn)&&(H==Re.enter&&on&&nn&&!q.allowCategorySelection?(p.verbose("Pressed enter on unselectable category, opening sub menu"),H=Re.rightArrow):an&&(p.verbose("Selecting item from keyboard shortcut",ht),p.event.item.click.call(ht,j),p.is.searchSelection()&&(p.remove.searchTerm(),p.is.multiple()&&k.focus())),j.preventDefault()),on&&(H==Re.leftArrow&&(Fn=fi[0]!==Ve[0],Fn&&(p.verbose("Left key pressed, closing sub-menu"),p.animate.hide(!1,fi),ht.removeClass(ne.selected),fi.closest(je.item).addClass(ne.selected),j.preventDefault())),H==Re.rightArrow&&nn&&(p.verbose("Right key pressed, opening sub-menu"),p.animate.show(!1,zt),ht.removeClass(ne.selected),zt.find(je.item).eq(0).addClass(ne.selected),j.preventDefault())),H==Re.upArrow){if(Yi=on&&vi?ht.prevAll(je.item+":not("+je.unselectable+")").eq(0):Ye.eq(0),rt.index(Yi)<0){p.verbose("Up key pressed but reached top of current menu"),j.preventDefault();return}else p.verbose("Up key pressed, changing active item"),ht.removeClass(ne.selected),Yi.addClass(ne.selected),p.set.scrollPosition(Yi),q.selectOnKeydown&&p.is.single()&&p.set.selectedItem(Yi);j.preventDefault()}if(H==Re.downArrow){if(Yi=on&&vi?Yi=ht.nextAll(je.item+":not("+je.unselectable+")").eq(0):Ye.eq(0),Yi.length===0){p.verbose("Down key pressed but reached bottom of current menu"),j.preventDefault();return}else p.verbose("Down key pressed, changing active item"),Ye.removeClass(ne.selected),Yi.addClass(ne.selected),p.set.scrollPosition(Yi),q.selectOnKeydown&&p.is.single()&&p.set.selectedItem(Yi);j.preventDefault()}H==Re.pageUp&&(p.scrollPage("up"),j.preventDefault()),H==Re.pageDown&&(p.scrollPage("down"),j.preventDefault()),H==Re.escape&&(p.verbose("Escape key pressed, closing dropdown"),p.hide())}else bn&&j.preventDefault(),H==Re.downArrow&&!p.is.visible()&&(p.verbose("Down key pressed, showing dropdown"),p.show(),j.preventDefault())}else p.has.search()||p.set.selectedLetter(String.fromCharCode(H))}},trigger:{change:function(){var j=Y[0];if(j){var H=b.createEvent("HTMLEvents");p.verbose("Triggering native change event"),H.initEvent("change",!0,!1),j.dispatchEvent(H)}}},determine:{selectAction:function(j,H){Ge=!0,p.verbose("Determining action",q.action),r.isFunction(p.action[q.action])?(p.verbose("Triggering preset action",q.action,j,H),p.action[q.action].call(ee,j,H,this)):r.isFunction(q.action)?(p.verbose("Triggering user action",q.action,j,H),q.action.call(ee,j,H,this)):p.error(S.action,q.action),Ge=!1},eventInModule:function(j,H){var ge=r(j.target),me=ge.closest(b.documentElement).length>0,De=ge.closest(ce).length>0;return H=r.isFunction(H)?H:function(){},me&&!De?(p.verbose("Triggering event",H),H(),!0):(p.verbose("Event occurred in dropdown, canceling callback"),!1)},eventOnElement:function(j,H){var ge=r(j.target),me=ge.closest(je.siblingLabel),De=b.body.contains(j.target),ht=ce.find(me).length===0||!(p.is.multiple()&&q.useLabels),rt=ge.closest(Ve).length===0;return H=r.isFunction(H)?H:function(){},De&&ht&&rt?(p.verbose("Triggering event",H),H(),!0):(p.verbose("Event occurred in dropdown menu, canceling callback"),!1)}},action:{nothing:function(){},activate:function(j,H,ge){H=H!==_?H:j,p.can.activate(r(ge))&&(p.set.selected(H,r(ge)),p.is.multiple()||p.hideAndClear())},select:function(j,H,ge){H=H!==_?H:j,p.can.activate(r(ge))&&(p.set.value(H,j,r(ge)),p.is.multiple()||p.hideAndClear())},combo:function(j,H,ge){H=H!==_?H:j,p.set.selected(H,r(ge)),p.hideAndClear()},hide:function(j,H,ge){p.set.value(H,j,r(ge)),p.hideAndClear()}},get:{id:function(){return ji},defaultText:function(){return ce.data(tt.defaultText)},defaultValue:function(){return ce.data(tt.defaultValue)},placeholderText:function(){return q.placeholder!="auto"&&typeof q.placeholder=="string"?q.placeholder:ce.data(tt.placeholderText)||""},text:function(){return q.preserveHTML?P.html():P.text()},query:function(){return String(k.val()).trim()},searchWidth:function(j){return j=j!==_?j:k.val(),N.text(j),Math.ceil(N.width()+1)},selectionCount:function(){var j=p.get.values(),H;return H=p.is.multiple()?Array.isArray(j)?j.length:0:p.get.value()!==""?1:0,H},transition:function(j){return q.transition=="auto"?p.is.upward(j)?"slide up":"slide down":q.transition},userValues:function(){var j=p.get.values();return j?(j=Array.isArray(j)?j:[j],r.grep(j,function(H){return p.get.item(H)===!1})):!1},uniqueArray:function(j){return r.grep(j,function(H,ge){return r.inArray(H,j)===ge})},caretPosition:function(j){var H=k.get(0),ge,me;if(j&&"selectionEnd"in H)return H.selectionEnd;if(!j&&"selectionStart"in H)return H.selectionStart;if(b.selection)return H.focus(),ge=b.selection.createRange(),me=ge.text.length,j?me:(ge.moveStart("character",-H.value.length),ge.text.length-me)},value:function(){var j=Y.length>0?Y.val():ce.data(tt.value),H=Array.isArray(j)&&j.length===1&&j[0]==="";return j===_||H?"":j},values:function(){var j=p.get.value();return j===""?"":!p.has.selectInput()&&p.is.multiple()?typeof j=="string"?p.escape.htmlEntities(j).split(q.delimiter):"":j},remoteValues:function(){var j=p.get.values(),H=!1;return j&&(typeof j=="string"&&(j=[j]),r.each(j,function(ge,me){var De=p.read.remoteData(me);p.verbose("Restoring value from session data",De,me),De&&(H||(H={}),H[me]=De)})),H},choiceText:function(j,H){if(H=H!==_?H:q.preserveHTML,j)return j.find(je.menu).length>0&&(p.verbose("Retrieving text of element with sub-menu"),j=j.clone(),j.find(je.menu).remove(),j.find(je.menuIcon).remove()),j.data(tt.text)!==_?j.data(tt.text):H?j.html().trim():j.text().trim()},choiceValue:function(j,H){return H=H||p.get.choiceText(j),j?j.data(tt.value)!==_?String(j.data(tt.value)):typeof H=="string"?String(q.ignoreSearchCase?H.toLowerCase():H).trim():String(H):!1},inputEvent:function(){var j=k[0];return j?j.oninput!==_?"input":j.onpropertychange!==_?"propertychange":"keyup":!1},selectValues:function(){var j={},H=[],ge=[];return ce.find("option").each(function(){var me=r(this),De=me.html(),ht=me.attr("disabled"),rt=me.attr("value")!==_?me.attr("value"):De,zt=me.data(tt.text)!==_?me.data(tt.text):De,fi=me.parent("optgroup");q.placeholder==="auto"&&rt===""?j.placeholder=De:((fi.length!==H.length||fi[0]!==H[0])&&(ge.push({type:"header",divider:q.headerDivider,name:fi.attr("label")||""}),H=fi),ge.push({name:De,value:rt,text:zt,disabled:ht}))}),q.placeholder&&q.placeholder!=="auto"&&(p.debug("Setting placeholder value to",q.placeholder),j.placeholder=q.placeholder),q.sortSelect?(q.sortSelect===!0?ge.sort(function(me,De){return me.name.localeCompare(De.name)}):q.sortSelect==="natural"?ge.sort(function(me,De){return me.name.toLowerCase().localeCompare(De.name.toLowerCase())}):r.isFunction(q.sortSelect)&&ge.sort(q.sortSelect),j[W.values]=ge,p.debug("Retrieved and sorted values from select",j)):(j[W.values]=ge,p.debug("Retrieved values from select",j)),j},activeItem:function(){return Ye.filter("."+ne.active)},selectedItem:function(){var j=Ye.not(je.unselectable).filter("."+ne.selected);return j.length>0?j:Ye.eq(0)},itemWithAdditions:function(j){var H=p.get.item(j),ge=p.create.userChoice(j),me=ge&&ge.length>0;return me&&(H=H.length>0?H.add(ge):ge),H},item:function(j,H){var ge=!1,me,De;return j=j!==_?j:p.get.values()!==_?p.get.values():p.get.text(),De=p.is.multiple()&&Array.isArray(j),me=De?j.length>0:j!==_&&j!==null,H=j===""||j===!1||j===!0?!0:H||!1,me&&Ye.each(function(){var ht=r(this),rt=p.get.choiceText(ht),zt=p.get.choiceValue(ht,rt);if(!(zt===null||zt===_)){if(De)r.inArray(p.escape.htmlEntities(String(zt)),j.map(function(fi){return String(fi)}))!==-1&&(ge=ge?ge.add(ht):ht);else if(H){if(p.verbose("Ambiguous dropdown value using strict type check",ht,j),zt===j)return ge=ht,!0}else if(q.ignoreCase&&(zt=zt.toLowerCase(),j=j.toLowerCase()),p.escape.htmlEntities(String(zt))===p.escape.htmlEntities(String(j)))return p.verbose("Found select item by value",zt,j),ge=ht,!0}}),ge}},check:{maxSelections:function(j){return q.maxSelections?(j=j!==_?j:p.get.selectionCount(),j>=q.maxSelections?(p.debug("Maximum selection count reached"),q.useLabels&&(Ye.addClass(ne.filtered),p.add.message(c.maxSelections)),!0):(p.verbose("No longer at maximum selection count"),p.remove.message(),p.remove.filteredItem(),p.is.searchSelection()&&p.filterItems(),!1)):!0},disabled:function(){k.attr("tabindex",p.is.disabled()?-1:0)}},restore:{defaults:function(j){p.clear(j),p.restore.defaultText(),p.restore.defaultValue()},defaultText:function(){var j=p.get.defaultText(),H=p.get.placeholderText;j===H?(p.debug("Restoring default placeholder text",j),p.set.placeholderText(j)):(p.debug("Restoring default text",j),p.set.text(j))},placeholderText:function(){p.set.placeholderText()},defaultValue:function(){var j=p.get.defaultValue();j!==_&&(p.debug("Restoring default value",j),j!==""?(p.set.value(j),p.set.selected()):(p.remove.activeItem(),p.remove.selectedItem()))},labels:function(){q.allowAdditions&&(q.useLabels||(p.error(S.labels),q.useLabels=!0),p.debug("Restoring selected values"),p.create.userLabels()),p.check.maxSelections()},selected:function(){p.restore.values(),p.is.multiple()?(p.debug("Restoring previously selected values and labels"),p.restore.labels()):p.debug("Restoring previously selected values")},values:function(){p.set.initialLoad(),q.apiSettings&&q.saveRemoteData&&p.get.remoteValues()?p.restore.remoteValues():p.set.selected();var j=p.get.value();j&&j!==""&&!(Array.isArray(j)&&j.length===0)?Y.removeClass(ne.noselection):Y.addClass(ne.noselection),p.remove.initialLoad()},remoteValues:function(){var j=p.get.remoteValues();p.debug("Recreating selected from session data",j),j&&(p.is.single()?r.each(j,function(H,ge){p.set.text(ge)}):r.each(j,function(H,ge){p.add.label(H,ge)}))}},read:{remoteData:function(j){var H;if(v.Storage===_){p.error(S.noStorage);return}return H=sessionStorage.getItem(j),H!==_?H:!1}},save:{defaults:function(){p.save.defaultText(),p.save.placeholderText(),p.save.defaultValue()},defaultValue:function(){var j=p.get.value();p.verbose("Saving default value as",j),ce.data(tt.defaultValue,j)},defaultText:function(){var j=p.get.text();p.verbose("Saving default text as",j),ce.data(tt.defaultText,j)},placeholderText:function(){var j;q.placeholder!==!1&&P.hasClass(ne.placeholder)&&(j=p.get.text(),p.verbose("Saving placeholder text as",j),ce.data(tt.placeholderText,j))},remoteData:function(j,H){if(v.Storage===_){p.error(S.noStorage);return}p.verbose("Saving remote data to session storage",H,j),sessionStorage.setItem(H,j)}},clear:function(j){p.is.multiple()&&q.useLabels?p.remove.labels():(p.remove.activeItem(),p.remove.selectedItem(),p.remove.filteredItem()),p.set.placeholderText(),p.clearValue(j)},clearValue:function(j){p.set.value("",null,null,j)},scrollPage:function(j,H){var ge=H||p.get.selectedItem(),me=ge.closest(je.menu),De=me.outerHeight(),ht=me.scrollTop(),rt=Ye.eq(0).outerHeight(),zt=Math.floor(De/rt),fi=me.prop("scrollHeight"),vi=j=="up"?ht-rt*zt:ht+rt*zt,nn=Ye.not(je.unselectable),on,an,bn;bn=j=="up"?nn.index(ge)-zt:nn.index(ge)+zt,on=j=="up"?bn>=0:bn<nn.length,an=on?nn.eq(bn):j=="up"?nn.first():nn.last(),an.length>0&&(p.debug("Scrolling page",j,an),ge.removeClass(ne.selected),an.addClass(ne.selected),q.selectOnKeydown&&p.is.single()&&p.set.selectedItem(an),me.scrollTop(vi))},set:{filtered:function(){var j=p.is.multiple(),H=p.is.searchSelection(),ge=j&&H,me=H?p.get.query():"",De=typeof me=="string"&&me.length>0,ht=p.get.searchWidth(),rt=me!=="";j&&De&&(p.verbose("Adjusting input width",ht,q.glyphWidth),k.css("width",ht)),De||ge&&rt?(p.verbose("Hiding placeholder text"),P.addClass(ne.filtered)):(!j||ge&&!rt)&&(p.verbose("Showing placeholder text"),P.removeClass(ne.filtered))},empty:function(){ce.addClass(ne.empty)},loading:function(){ce.addClass(ne.loading)},placeholderText:function(j){j=j||p.get.placeholderText(),p.debug("Setting placeholder text",j),p.set.text(j),P.addClass(ne.placeholder)},tabbable:function(){p.is.searchSelection()?(p.debug("Added tabindex to searchable dropdown"),k.val(""),p.check.disabled(),Ve.attr("tabindex",-1)):(p.debug("Added tabindex to dropdown"),ce.attr("tabindex")===_&&(ce.attr("tabindex",0),Ve.attr("tabindex",-1)))},initialLoad:function(){p.verbose("Setting initial load"),yt=!0},activeItem:function(j){q.allowAdditions&&j.filter(je.addition).length>0?j.addClass(ne.filtered):j.addClass(ne.active)},partialSearch:function(j){var H=p.get.query().length;k.val(j.substr(0,H))},scrollPosition:function(j,H){var ge=5,me,De,ht,rt,zt,fi,vi,nn,on,an;j=j||p.get.selectedItem(),me=j.closest(je.menu),De=j&&j.length>0,H=H!==_?H:!1,p.get.activeItem().length===0&&(H=!1),j&&me.length>0&&De&&(zt=j.position().top,me.addClass(ne.loading),vi=me.scrollTop(),fi=me.offset().top,zt=j.offset().top,ht=vi-fi+zt,H||(nn=me.height(),an=vi+nn<ht+ge,on=ht-ge<vi),p.debug("Scrolling to active item",ht),(H||on||an)&&me.scrollTop(ht),me.removeClass(ne.loading))},text:function(j){q.action==="combo"?(p.debug("Changing combo button text",j,Ne),q.preserveHTML?Ne.html(j):Ne.text(j)):q.action==="activate"&&(j!==p.get.placeholderText()&&P.removeClass(ne.placeholder),p.debug("Changing text",j,P),P.removeClass(ne.filtered),q.preserveHTML?P.html(j):P.text(j))},selectedItem:function(j){var H=p.get.choiceValue(j),ge=p.get.choiceText(j,!1),me=p.get.choiceText(j,!0);p.debug("Setting user selection to item",j),p.remove.activeItem(),p.set.partialSearch(ge),p.set.activeItem(j),p.set.selected(H,j),p.set.text(me)},selectedLetter:function(j){var H=Ye.filter("."+ne.selected),ge=H.length>0&&p.has.firstLetter(H,j),me=!1,De;ge&&(De=H.nextAll(Ye).eq(0),p.has.firstLetter(De,j)&&(me=De)),me||Ye.each(function(){if(p.has.firstLetter(r(this),j))return me=r(this),!1}),me&&(p.verbose("Scrolling to next value with letter",j),p.set.scrollPosition(me),H.removeClass(ne.selected),me.addClass(ne.selected),q.selectOnKeydown&&p.is.single()&&p.set.selectedItem(me))},direction:function(j){q.direction=="auto"?(j?p.is.upward(j)&&p.remove.upward(j):p.remove.upward(),p.can.openDownward(j)?p.remove.upward(j):p.set.upward(j),!p.is.leftward(j)&&!p.can.openRightward(j)&&p.set.leftward(j)):q.direction=="upward"&&p.set.upward(j)},upward:function(j){var H=j||ce;H.addClass(ne.upward)},leftward:function(j){var H=j||Ve;H.addClass(ne.leftward)},value:function(j,H,ge,me){j!==_&&j!==""&&!(Array.isArray(j)&&j.length===0)?Y.removeClass(ne.noselection):Y.addClass(ne.noselection);var De=p.escape.value(j),ht=Y.length>0,rt=p.get.values(),zt=j!==_?String(j):j,fi;if(ht){if(!q.allowReselection&&zt==rt&&(p.verbose("Skipping value update already same value",j,rt),!p.is.initialLoad()))return;p.is.single()&&p.has.selectInput()&&p.can.extendSelect()&&(p.debug("Adding user option",j),p.add.optionValue(j)),p.debug("Updating input value",De,rt),nt=!0,Y.val(De),q.fireOnInit===!1&&p.is.initialLoad()?p.debug("Input native change event ignored on initial load"):me!==!0&&p.trigger.change(),nt=!1}else p.verbose("Storing value in metadata",De,Y),De!==rt&&ce.data(tt.value,zt);q.fireOnInit===!1&&p.is.initialLoad()?p.verbose("No callback on initial load",q.onChange):me!==!0&&q.onChange.call(ee,j,H,ge)},active:function(){ce.addClass(ne.active)},multiple:function(){ce.addClass(ne.multiple)},visible:function(){ce.addClass(ne.visible)},exactly:function(j,H){p.debug("Setting selected to exact values"),p.clear(),p.set.selected(j,H)},selected:function(j,H){var ge=p.is.multiple();H=q.allowAdditions?H||p.get.itemWithAdditions(j):H||p.get.item(j),H&&(p.debug("Setting selected menu item to",H),p.is.multiple()&&p.remove.searchWidth(),p.is.single()?(p.remove.activeItem(),p.remove.selectedItem()):q.useLabels&&p.remove.selectedItem(),H.each(function(){var me=r(this),De=p.get.choiceText(me),ht=p.get.choiceValue(me,De),rt=me.hasClass(ne.filtered),zt=me.hasClass(ne.active),fi=me.hasClass(ne.addition),vi=ge&&H.length==1;ge?!zt||fi?(q.apiSettings&&q.saveRemoteData&&p.save.remoteData(De,ht),q.useLabels?(p.add.label(ht,De,vi),p.add.value(ht,De,me),p.set.activeItem(me),p.filterActive(),p.select.nextAvailable(H)):(p.add.value(ht,De,me),p.set.text(p.add.variables(c.count)),p.set.activeItem(me))):!rt&&(q.useLabels||Ge)&&(p.debug("Selected active value, removing label"),p.remove.selected(ht)):(q.apiSettings&&q.saveRemoteData&&p.save.remoteData(De,ht),p.set.text(De),p.set.value(ht,De,me),me.addClass(ne.active).addClass(ne.selected))}),p.remove.searchTerm())}},add:{label:function(j,H,ge){var me=p.is.searchSelection()?k:P,De=p.escape.value(j),ht;if(q.ignoreCase&&(De=De.toLowerCase()),ht=r("<a />").addClass(ne.label).attr("data-"+tt.value,De).html(si.label(De,H,q.preserveHTML,q.className)),ht=q.onLabelCreate.call(ht,De,H),p.has.label(j)){p.debug("User selection already exists, skipping",De);return}q.label.variation&&ht.addClass(q.label.variation),ge===!0?(p.debug("Animating in label",ht),ht.addClass(ne.hidden).insertBefore(me).transition({animation:q.label.transition,debug:q.debug,verbose:q.verbose,duration:q.label.duration})):(p.debug("Adding selection label",ht),ht.insertBefore(me))},message:function(j){var H=Ve.children(je.message),ge=q.templates.message(p.add.variables(j));H.length>0?H.html(ge):H=r("<div/>").html(ge).addClass(ne.message).appendTo(Ve)},optionValue:function(j){var H=p.escape.value(j),ge=Y.find('option[value="'+p.escape.string(H)+'"]'),me=ge.length>0;me||(p.disconnect.selectObserver(),p.is.single()&&(p.verbose("Removing previous user addition"),Y.find("option."+ne.addition).remove()),r("<option/>").prop("value",H).addClass(ne.addition).html(j).appendTo(Y),p.verbose("Adding user addition as an <option>",j),p.observe.select())},userSuggestion:function(j){var H=Ve.children(je.addition),ge=p.get.item(j),me=ge&&ge.not(je.addition).length,De=H.length>0,ht;if(!(q.useLabels&&p.has.maxSelections())){if(j===""||me){H.remove();return}De?(H.data(tt.value,j).data(tt.text,j).attr("data-"+tt.value,j).attr("data-"+tt.text,j).removeClass(ne.filtered),q.hideAdditions||(ht=q.templates.addition(p.add.variables(c.addResult,j)),H.html(ht)),p.verbose("Replacing user suggestion with new value",H)):(H=p.create.userChoice(j),H.prependTo(Ve),p.verbose("Adding item choice to menu corresponding with user choice addition",H)),(!q.hideAdditions||p.is.allFiltered())&&H.addClass(ne.selected).siblings().removeClass(ne.selected),p.refreshItems()}},variables:function(j,H){var ge=j.search("{count}")!==-1,me=j.search("{maxCount}")!==-1,De=j.search("{term}")!==-1,ht,rt;return p.verbose("Adding templated variables to message",j),ge&&(ht=p.get.selectionCount(),j=j.replace("{count}",ht)),me&&(ht=p.get.selectionCount(),j=j.replace("{maxCount}",q.maxSelections)),De&&(rt=H||p.get.query(),j=j.replace("{term}",rt)),j},value:function(j,H,ge){var me=p.get.values(),De;if(p.has.value(j)){p.debug("Value already selected");return}if(j===""){p.debug("Cannot select blank values from multiselect");return}Array.isArray(me)?(De=me.concat([j]),De=p.get.uniqueArray(De)):De=[j],p.has.selectInput()?p.can.extendSelect()&&(p.debug("Adding value to select",j,De,Y),p.add.optionValue(j)):(De=De.join(q.delimiter),p.debug("Setting hidden input to delimited value",De,Y)),q.fireOnInit===!1&&p.is.initialLoad()?p.verbose("Skipping onadd callback on initial load",q.onAdd):q.onAdd.call(ee,j,H,ge),p.set.value(De,H,ge),p.check.maxSelections()}},remove:{active:function(){ce.removeClass(ne.active)},activeLabel:function(){ce.find(je.label).removeClass(ne.active)},empty:function(){ce.removeClass(ne.empty)},loading:function(){ce.removeClass(ne.loading)},initialLoad:function(){yt=!1},upward:function(j){var H=j||ce;H.removeClass(ne.upward)},leftward:function(j){var H=j||Ve;H.removeClass(ne.leftward)},visible:function(){ce.removeClass(ne.visible)},activeItem:function(){Ye.removeClass(ne.active)},filteredItem:function(){q.useLabels&&p.has.maxSelections()||(q.useLabels&&p.is.multiple()?Ye.not("."+ne.active).removeClass(ne.filtered):Ye.removeClass(ne.filtered),q.hideDividers&&Lt.removeClass(ne.hidden),p.remove.empty())},optionValue:function(j){var H=p.escape.value(j),ge=Y.find('option[value="'+p.escape.string(H)+'"]'),me=ge.length>0;!me||!ge.hasClass(ne.addition)||(ti&&(ti.disconnect(),p.verbose("Temporarily disconnecting mutation observer")),ge.remove(),p.verbose("Removing user addition as an <option>",H),ti&&ti.observe(Y[0],{childList:!0,subtree:!0}))},message:function(){Ve.children(je.message).remove()},searchWidth:function(){k.css("width","")},searchTerm:function(){p.verbose("Cleared search term"),k.val(""),p.set.filtered()},userAddition:function(){Ye.filter(je.addition).remove()},selected:function(j,H){if(H=q.allowAdditions?H||p.get.itemWithAdditions(j):H||p.get.item(j),!H)return!1;H.each(function(){var ge=r(this),me=p.get.choiceText(ge),De=p.get.choiceValue(ge,me);p.is.multiple()?q.useLabels?(p.remove.value(De,me,ge),p.remove.label(De)):(p.remove.value(De,me,ge),p.get.selectionCount()===0?p.set.placeholderText():p.set.text(p.add.variables(c.count))):p.remove.value(De,me,ge),ge.removeClass(ne.filtered).removeClass(ne.active),q.useLabels&&ge.removeClass(ne.selected)})},selectedItem:function(){Ye.removeClass(ne.selected)},value:function(j,H,ge){var me=p.get.values(),De;j=p.escape.htmlEntities(j),p.has.selectInput()?(p.verbose("Input is <select> removing selected option",j),De=p.remove.arrayValue(j,me),p.remove.optionValue(j)):(p.verbose("Removing from delimited values",j),De=p.remove.arrayValue(j,me),De=De.join(q.delimiter)),q.fireOnInit===!1&&p.is.initialLoad()?p.verbose("No callback on initial load",q.onRemove):q.onRemove.call(ee,j,H,ge),p.set.value(De,H,ge),p.check.maxSelections()},arrayValue:function(j,H){return Array.isArray(H)||(H=[H]),H=r.grep(H,function(ge){return j!=ge}),p.verbose("Removed value from delimited string",j,H),H},label:function(j,H){var ge=ce.find(je.label),me=ge.filter("[data-"+tt.value+'="'+p.escape.string(q.ignoreCase?j.toLowerCase():j)+'"]');p.verbose("Removing label",me),me.remove()},activeLabels:function(j){j=j||ce.find(je.label).filter("."+ne.active),p.verbose("Removing active label selections",j),p.remove.labels(j)},labels:function(j){j=j||ce.find(je.label),p.verbose("Removing labels",j),j.each(function(){var H=r(this),ge=H.data(tt.value),me=ge!==_?String(ge):ge,De=p.is.userValue(me);if(q.onLabelRemove.call(H,ge)===!1){p.debug("Label remove callback cancelled removal");return}p.remove.message(),De?(p.remove.value(me),p.remove.label(me)):p.remove.selected(me)})},tabbable:function(){p.is.searchSelection()?(p.debug("Searchable dropdown initialized"),k.removeAttr("tabindex"),Ve.removeAttr("tabindex")):(p.debug("Simple selection dropdown initialized"),ce.removeAttr("tabindex"),Ve.removeAttr("tabindex"))},diacritics:function(j){return q.ignoreDiacritics?j.normalize("NFD").replace(/[\u0300-\u036f]/g,""):j}},has:{menuSearch:function(){return p.has.search()&&k.closest(Ve).length>0},clearItem:function(){return Oe.length>0},search:function(){return k.length>0},sizer:function(){return N.length>0},selectInput:function(){return Y.is("select")},minCharacters:function(j){return q.minCharacters&&!te?(j=String(j!==_?j:p.get.query()),j.length>=q.minCharacters):(te=!1,!0)},firstLetter:function(j,H){var ge,me;return!j||j.length===0||typeof H!="string"?!1:(ge=p.get.choiceText(j,!1),H=H.toLowerCase(),me=String(ge).charAt(0).toLowerCase(),H==me)},input:function(){return Y.length>0},items:function(){return Ye.length>0},menu:function(){return Ve.length>0},message:function(){return Ve.children(je.message).length!==0},label:function(j){var H=p.escape.value(j),ge=ce.find(je.label);return q.ignoreCase&&(H=H.toLowerCase()),ge.filter("[data-"+tt.value+'="'+p.escape.string(H)+'"]').length>0},maxSelections:function(){return q.maxSelections&&p.get.selectionCount()>=q.maxSelections},allResultsFiltered:function(){var j=Ye.not(je.addition);return j.filter(je.unselectable).length===j.length},userSuggestion:function(){return Ve.children(je.addition).length>0},query:function(){return p.get.query()!==""},value:function(j){return q.ignoreCase?p.has.valueIgnoringCase(j):p.has.valueMatchingCase(j)},valueMatchingCase:function(j){var H=p.get.values(),ge=Array.isArray(H)?H&&r.inArray(j,H)!==-1:H==j;return!!ge},valueIgnoringCase:function(j){var H=p.get.values(),ge=!1;return Array.isArray(H)||(H=[H]),r.each(H,function(me,De){if(String(j).toLowerCase()==String(De).toLowerCase())return ge=!0,!1}),ge}},is:{active:function(){return ce.hasClass(ne.active)},animatingInward:function(){return Ve.transition("is inward")},animatingOutward:function(){return Ve.transition("is outward")},bubbledLabelClick:function(j){return r(j.target).is("select, input")&&ce.closest("label").length>0},bubbledIconClick:function(j){return r(j.target).closest(ve).length>0},alreadySetup:function(){return ce.is("select")&&ce.parent(je.dropdown).data(xt)!==_&&ce.prev().length===0},animating:function(j){return j?j.transition&&j.transition("is animating"):Ve.transition&&Ve.transition("is animating")},leftward:function(j){var H=j||Ve;return H.hasClass(ne.leftward)},clearable:function(){return ce.hasClass(ne.clearable)||q.clearable},disabled:function(){return ce.hasClass(ne.disabled)},focused:function(){return b.activeElement===ce[0]},focusedOnSearch:function(){return b.activeElement===k[0]},allFiltered:function(){return(p.is.multiple()||p.has.search())&&!(q.hideAdditions==!1&&p.has.userSuggestion())&&!p.has.message()&&p.has.allResultsFiltered()},hidden:function(j){return!p.is.visible(j)},initialLoad:function(){return yt},inObject:function(j,H){var ge=!1;return r.each(H,function(me,De){if(De==j)return ge=!0,!0}),ge},multiple:function(){return ce.hasClass(ne.multiple)},remote:function(){return q.apiSettings&&p.can.useAPI()},single:function(){return!p.is.multiple()},selectMutation:function(j){var H=!1;return r.each(j,function(ge,me){if(r(me.target).is("select")||r(me.addedNodes).is("select"))return H=!0,!1}),H},search:function(){return ce.hasClass(ne.search)},searchSelection:function(){return p.has.search()&&k.parent(je.dropdown).length===1},selection:function(){return ce.hasClass(ne.selection)},userValue:function(j){return r.inArray(j,p.get.userValues())!==-1},upward:function(j){var H=j||ce;return H.hasClass(ne.upward)},visible:function(j){return j?j.hasClass(ne.visible):Ve.hasClass(ne.visible)},verticallyScrollableContext:function(){var j=G.get(0)!==v?G.css("overflow-y"):!1;return j=="auto"||j=="scroll"},horizontallyScrollableContext:function(){var j=G.get(0)!==v?G.css("overflow-X"):!1;return j=="auto"||j=="scroll"}},can:{activate:function(j){return!!(q.useLabels||!p.has.maxSelections()||p.has.maxSelections()&&j.hasClass(ne.active))},openDownward:function(j){var H=j||Ve,ge=!0,me={},De;return H.addClass(ne.loading),De={context:{offset:G.get(0)===v?{top:0,left:0}:G.offset(),scrollTop:G.scrollTop(),height:G.outerHeight()},menu:{offset:H.offset(),height:H.outerHeight()}},p.is.verticallyScrollableContext()&&(De.menu.offset.top+=De.context.scrollTop),me={above:De.context.scrollTop<=De.menu.offset.top-De.context.offset.top-De.menu.height,below:De.context.scrollTop+De.context.height>=De.menu.offset.top-De.context.offset.top+De.menu.height},me.below?(p.verbose("Dropdown can fit in context downward",me),ge=!0):!me.below&&!me.above?(p.verbose("Dropdown cannot fit in either direction, favoring downward",me),ge=!0):(p.verbose("Dropdown cannot fit below, opening upward",me),ge=!1),H.removeClass(ne.loading),ge},openRightward:function(j){var H=j||Ve,ge=!0,me=!1,De;return H.addClass(ne.loading),De={context:{offset:G.get(0)===v?{top:0,left:0}:G.offset(),scrollLeft:G.scrollLeft(),width:G.outerWidth()},menu:{offset:H.offset(),width:H.outerWidth()}},p.is.horizontallyScrollableContext()&&(De.menu.offset.left+=De.context.scrollLeft),me=De.menu.offset.left-De.context.offset.left+De.menu.width>=De.context.scrollLeft+De.context.width,me&&(p.verbose("Dropdown cannot fit in context rightward",me),ge=!1),H.removeClass(ne.loading),ge},click:function(){return Z||q.on=="click"},extendSelect:function(){return q.allowAdditions||q.apiSettings},show:function(){return!p.is.disabled()&&(p.has.items()||p.has.message())},useAPI:function(){return r.fn.api!==_}},animate:{show:function(j,H){var ge=H||Ve,me=H?function(){}:function(){p.hideSubMenus(),p.hideOthers(),p.set.active()},De;if(j=r.isFunction(j)?j:function(){},p.verbose("Doing menu show animation",ge),p.set.direction(H),De=p.get.transition(H),p.is.selection()&&p.set.scrollPosition(p.get.selectedItem(),!0),p.is.hidden(ge)||p.is.animating(ge)){var ht=ce.hasClass("column")?"flex":!1;De=="none"?(me(),ge.transition({displayType:ht}).transition("show"),j.call(ee)):r.fn.transition!==_&&ce.transition("is supported")?ge.transition({animation:De+" in",debug:q.debug,verbose:q.verbose,duration:q.duration,queue:!0,onStart:me,displayType:ht,onComplete:function(){j.call(ee)}}):p.error(S.noTransition,De)}},hide:function(j,H){var ge=H||Ve,me=H?function(){}:function(){p.can.click()&&p.unbind.intent(),p.remove.active()},De=p.get.transition(H);j=r.isFunction(j)?j:function(){},(p.is.visible(ge)||p.is.animating(ge))&&(p.verbose("Doing menu hide animation",ge),De=="none"?(me(),ge.transition("hide"),j.call(ee)):r.fn.transition!==_&&ce.transition("is supported")?ge.transition({animation:De+" out",duration:q.duration,debug:q.debug,verbose:q.verbose,queue:!1,onStart:me,onComplete:function(){j.call(ee)}}):p.error(S.transition))}},hideAndClear:function(){p.remove.searchTerm(),!p.has.maxSelections()&&(p.has.search()?p.hide(function(){p.remove.filteredItem()}):p.hide())},delay:{show:function(){p.verbose("Delaying show event to ensure user intent"),clearTimeout(p.timer),p.timer=setTimeout(p.show,q.delay.show)},hide:function(){p.verbose("Delaying hide event to ensure user intent"),clearTimeout(p.timer),p.timer=setTimeout(p.hide,q.delay.hide)}},escape:{value:function(j){var H=Array.isArray(j),ge=typeof j=="string",me=!ge&&!H,De=ge&&j.search(et.quote)!==-1,ht=[];return me||!De?j:(p.debug("Encoding quote values for use in select",j),H?(r.each(j,function(rt,zt){ht.push(zt.replace(et.quote,"&quot;"))}),ht):j.replace(et.quote,"&quot;"))},string:function(j){return j=String(j),j.replace(et.escape,"\\$&")},htmlEntities:function(j){var H=/[<>"'`]/g,ge=/[&<>"'`]/,me={"<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},De=function(ht){return me[ht]};return ge.test(j)?(j=j.replace(/&(?![a-z0-9#]{1,6};)/,"&amp;"),j.replace(H,De)):j}},setting:function(j,H){if(p.debug("Changing setting",j,H),r.isPlainObject(j))r.extend(!0,q,j);else if(H!==_)r.isPlainObject(q[j])?r.extend(!0,q[j],H):q[j]=H;else return q[j]},internal:function(j,H){if(r.isPlainObject(j))r.extend(!0,p,j);else if(H!==_)p[j]=H;else return p[j]},debug:function(){!q.silent&&q.debug&&(q.performance?p.performance.log(arguments):(p.debug=Function.prototype.bind.call(console.info,console,q.name+":"),p.debug.apply(console,arguments)))},verbose:function(){!q.silent&&q.verbose&&q.debug&&(q.performance?p.performance.log(arguments):(p.verbose=Function.prototype.bind.call(console.info,console,q.name+":"),p.verbose.apply(console,arguments)))},error:function(){q.silent||(p.error=Function.prototype.bind.call(console.error,console,q.name+":"),p.error.apply(console,arguments))},performance:{log:function(j){var H,ge,me;q.performance&&(H=new Date().getTime(),me=we||H,ge=H-me,we=H,Be.push({Name:j[0],Arguments:[].slice.call(j,1)||"",Element:ee,"Execution Time":ge})),clearTimeout(p.performance.timer),p.performance.timer=setTimeout(p.performance.display,500)},display:function(){var j=q.name+":",H=0;we=!1,clearTimeout(p.performance.timer),r.each(Be,function(ge,me){H+=me["Execution Time"]}),j+=" "+H+"ms",J&&(j+=" '"+J+"'"),(console.group!==_||console.table!==_)&&Be.length>0&&(console.groupCollapsed(j),console.table?console.table(Be):r.each(Be,function(ge,me){console.log(me.Name+": "+me["Execution Time"]+"ms")}),console.groupEnd()),Be=[]}},invoke:function(j,H,ge){var me=oe,De,ht,rt;return H=H||Ke,ge=ee||ge,typeof j=="string"&&me!==_&&(j=j.split(/[\. ]/),De=j.length-1,r.each(j,function(zt,fi){var vi=zt!=De?fi+j[zt+1].charAt(0).toUpperCase()+j[zt+1].slice(1):j;if(r.isPlainObject(me[vi])&&zt!=De)me=me[vi];else{if(me[vi]!==_)return ht=me[vi],!1;if(r.isPlainObject(me[fi])&&zt!=De)me=me[fi];else return me[fi]!==_?(ht=me[fi],!1):(p.error(S.method,j),!1)}})),r.isFunction(ht)?rt=ht.apply(ge,H):ht!==_&&(rt=ht),Array.isArray(At)?At.push(rt):At!==_?At=[At,rt]:rt!==_&&(At=rt),ht}},Q?(oe===_&&p.initialize(),p.invoke(Ue)):(oe!==_&&oe.invoke("destroy"),p.initialize())}),At!==_?At:O},r.fn.dropdown.settings={silent:!1,debug:!1,verbose:!1,performance:!0,on:"click",action:"activate",values:!1,clearable:!1,apiSettings:!1,selectOnKeydown:!0,minCharacters:0,filterRemoteData:!1,saveRemoteData:!0,throttle:200,context:v,direction:"auto",keepOnScreen:!0,match:"both",fullTextSearch:!1,ignoreDiacritics:!1,hideDividers:!1,placeholder:"auto",preserveHTML:!0,sortSelect:!1,forceSelection:!0,allowAdditions:!1,ignoreCase:!1,ignoreSearchCase:!0,hideAdditions:!0,maxSelections:!1,useLabels:!0,delimiter:",",showOnFocus:!0,allowReselection:!1,allowTab:!0,allowCategorySelection:!1,fireOnInit:!1,transition:"auto",duration:200,glyphWidth:1.037,headerDivider:!0,label:{transition:"scale",duration:200,variation:!1},delay:{hide:300,show:200,search:20,touch:50},onChange:function(g,O,R){},onAdd:function(g,O,R){},onRemove:function(g,O,R){},onLabelSelect:function(g){},onLabelCreate:function(g,O){return r(this)},onLabelRemove:function(g){return!0},onNoResults:function(g){return!0},onShow:function(){},onHide:function(){},onAfterFiltered:function(){},name:"Dropdown",namespace:"dropdown",message:{addResult:"Add <b>{term}</b>",count:"{count} selected",maxSelections:"Max {maxCount} selections",noResults:"No results found.",serverError:"There was an error contacting the server"},error:{action:"You called a dropdown action that was not defined",alreadySetup:"Once a select has been initialized behaviors must be called on the created ui dropdown",labels:"Allowing user additions currently requires the use of labels.",missingMultiple:"<select> requires multiple property to be set to correctly preserve multiple values",method:"The method you called is not defined.",noAPI:"The API module is required to load resources remotely",noStorage:"Saving remote data requires session storage",noTransition:"This module requires ui transitions <https://github.com/Semantic-Org/UI-Transition>",noNormalize:'"ignoreDiacritics" setting will be ignored. Browser does not support String().normalize(). You may consider including <https://cdn.jsdelivr.net/npm/unorm@1.4.1/lib/unorm.min.js> as a polyfill.'},regExp:{escape:/[-[\]{}()*+?.,\\^$|#\s:=@]/g,quote:/"/g},metadata:{defaultText:"defaultText",defaultValue:"defaultValue",placeholderText:"placeholder",text:"text",value:"value"},fields:{remoteValues:"results",values:"values",disabled:"disabled",name:"name",value:"value",text:"text",type:"type",image:"image",imageClass:"imageClass",icon:"icon",iconClass:"iconClass",class:"class",divider:"divider"},keys:{backspace:8,delimiter:188,deleteKey:46,enter:13,escape:27,pageUp:33,pageDown:34,leftArrow:37,upArrow:38,rightArrow:39,downArrow:40},selector:{addition:".addition",divider:".divider, .header",dropdown:".ui.dropdown",hidden:".hidden",icon:"> .dropdown.icon",input:'> input[type="hidden"], > select',item:".item",label:"> .label",remove:"> .label > .delete.icon",siblingLabel:".label",menu:".menu",message:".message",menuIcon:".dropdown.icon",search:"input.search, .menu > .search > input, .menu input.search",sizer:"> span.sizer",text:"> .text:not(.icon)",unselectable:".disabled, .filtered, .tw-hidden",clearIcon:"> .remove.icon"},className:{active:"active",addition:"addition",animating:"animating",disabled:"disabled",empty:"empty",dropdown:"ui dropdown",filtered:"filtered",hidden:"hidden transition",icon:"icon",image:"image",item:"item",label:"ui label",loading:"loading",menu:"menu",message:"message",multiple:"multiple",placeholder:"default",sizer:"sizer",search:"search",selected:"selected",selection:"selection",upward:"upward",leftward:"left",visible:"visible",clearable:"clearable",noselection:"noselection",delete:"delete",header:"header",divider:"divider",groupIcon:"",unfilterable:"unfilterable"}},r.fn.dropdown.settings.templates={deQuote:function(g){return String(g).replace(/"/g,"")},escape:function(g,O){if(O)return g;var R=/[<>"'`]/g,J=/[&<>"'`]/,Z={"<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},C=function(we){return Z[we]};return J.test(g)?(g=g.replace(/&(?![a-z0-9#]{1,6};)/,"&amp;"),g.replace(R,C)):g},dropdown:function(g,O,R,J){var Z=g.placeholder||!1,C="",we=r.fn.dropdown.settings.templates.escape;return C+='<i class="dropdown icon"></i>',Z?C+='<div class="default text">'+we(Z,R)+"</div>":C+='<div class="text"></div>',C+='<div class="'+J.menu+'">',C+=r.fn.dropdown.settings.templates.menu(g,O,R,J),C+="</div>",C},menu:function(g,O,R,J){var Z=g[O.values]||[],C="",we=r.fn.dropdown.settings.templates.escape,Be=r.fn.dropdown.settings.templates.deQuote;return r.each(Z,function(Ue,Q){var Ke=Q[O.type]?Q[O.type]:"item";if(Ke==="item"){var At=Q[O.text]?' data-text="'+we(Q[O.text])+'"':"",gt=Q[O.disabled]?J.disabled+" ":"";C+='<div class="'+gt+(Q[O.class]?Be(Q[O.class]):J.item)+'" data-value="'+we(Q[O.value])+'"'+At+">",Q[O.image]&&(C+='<img class="'+(Q[O.imageClass]?Be(Q[O.imageClass]):J.image)+'" src="'+Be(Q[O.image])+'">'),Q[O.icon]&&(C+='<i class="'+Be(Q[O.icon])+" "+(Q[O.iconClass]?Be(Q[O.iconClass]):J.icon)+'"></i>'),C+=we(Q[O.name]||"",R),C+="</div>"}else if(Ke==="header"){var q=we(Q[O.name]||"",R),ne=Q[O.icon]?Be(Q[O.icon]):J.groupIcon;(q!==""||ne!=="")&&(C+='<div class="'+(Q[O.class]?Be(Q[O.class]):J.header)+'">',ne!==""&&(C+='<i class="'+ne+" "+(Q[O.iconClass]?Be(Q[O.iconClass]):J.icon)+'"></i>'),C+=q,C+="</div>"),Q[O.divider]&&(C+='<div class="'+J.divider+'"></div>')}}),C},label:function(g,O,R,J){var Z=r.fn.dropdown.settings.templates.escape;return Z(O,R)+'<i class="'+J.delete+' icon"></i>'},message:function(g){return g},addition:function(g){return g}}})(jQuery,window,document);(function(r,v,b,_){"use strict";r.isFunction=r.isFunction||function(g){return typeof g=="function"&&typeof g.nodeType!="number"},v=typeof v<"u"&&v.Math==Math?v:typeof self<"u"&&self.Math==Math?self:Function("return this")(),r.fn.modal=function(g){var O=r(this),R=r(v),J=r(b),Z=r("body"),C=O.selector||"",we=new Date().getTime(),Be=[],Ue=arguments[0],Q=typeof Ue=="string",Ke=[].slice.call(arguments,1),At=v.requestAnimationFrame||v.mozRequestAnimationFrame||v.webkitRequestAnimationFrame||v.msRequestAnimationFrame||function(q){setTimeout(q,0)},gt;return O.each(function(){var q=r.isPlainObject(g)?r.extend(!0,{},r.fn.modal.settings,g):r.extend({},r.fn.modal.settings),ne=q.selector,c=q.className,W=q.namespace,Re=q.error,tt="."+W,st="module-"+W,et=r(this),je=r(q.context),S=et.find(ne.close),si,ct,xt,ce,G,P=this,k=et.data(st),N=!1,Y,ve,Oe="",Ne="",Ve,Ye,Lt,K;K={initialize:function(){K.cache={},K.verbose("Initializing dimmer",je),K.create.id(),K.create.dimmer(),q.allowMultiple&&K.create.innerDimmer(),q.centered||et.addClass("top aligned"),K.refreshModals(),K.bind.events(),q.observeChanges&&K.observeChanges(),K.instantiate()},instantiate:function(){K.verbose("Storing instance of modal"),k=K,et.data(st,k)},create:{dimmer:function(){var Ee={debug:q.debug,dimmerName:"modals"},nt=r.extend(!0,Ee,q.dimmerSettings);if(r.fn.dimmer===_){K.error(Re.dimmer);return}K.debug("Creating dimmer"),ce=je.dimmer(nt),q.detachable?(K.verbose("Modal is detachable, moving content into dimmer"),ce.dimmer("add content",et)):K.set.undetached(),G=ce.dimmer("get dimmer")},id:function(){Ye=(Math.random().toString(16)+"000000000").substr(2,8),Ve="."+Ye,K.verbose("Creating unique id for element",Ye)},innerDimmer:function(){et.find(ne.dimmer).length==0&&et.prepend('<div class="ui inverted dimmer"></div>')}},destroy:function(){Lt&&Lt.disconnect(),K.verbose("Destroying previous modal"),et.removeData(st).off(tt),R.off(Ve),G.off(Ve),S.off(tt),je.dimmer("destroy")},observeChanges:function(){"MutationObserver"in v&&(Lt=new MutationObserver(function(Ee){K.debug("DOM tree modified, refreshing"),K.refresh()}),Lt.observe(P,{childList:!0,subtree:!0}),K.debug("Setting up mutation observer",Lt))},refresh:function(){K.remove.scrolling(),K.cacheSizes(),K.can.useFlex()||K.set.modalOffset(),K.set.screenHeight(),K.set.type()},refreshModals:function(){ct=et.siblings(ne.modal),si=ct.add(et)},attachEvents:function(Ee,nt){var te=r(Ee);nt=r.isFunction(K[nt])?K[nt]:K.toggle,te.length>0?(K.debug("Attaching modal events to element",Ee,nt),te.off(tt).on("click"+tt,nt)):K.error(Re.notFound,Ee)},bind:{events:function(){K.verbose("Attaching events"),et.on("click"+tt,ne.close,K.event.close).on("click"+tt,ne.approve,K.event.approve).on("click"+tt,ne.deny,K.event.deny),R.on("resize"+Ve,K.event.resize)},scrollLock:function(){ce.get(0).addEventListener("touchmove",K.event.preventScroll,{passive:!1})}},unbind:{scrollLock:function(){ce.get(0).removeEventListener("touchmove",K.event.preventScroll,{passive:!1})}},get:{id:function(){return(Math.random().toString(16)+"000000000").substr(2,8)}},event:{approve:function(){if(N||q.onApprove.call(P,r(this))===!1){K.verbose("Approve callback returned false cancelling hide");return}N=!0,K.hide(function(){N=!1})},preventScroll:function(Ee){Ee.target.className.indexOf("dimmer")!==-1&&Ee.preventDefault()},deny:function(){if(N||q.onDeny.call(P,r(this))===!1){K.verbose("Deny callback returned false cancelling hide");return}N=!0,K.hide(function(){N=!1})},close:function(){K.hide()},mousedown:function(Ee){var nt=r(Ee.target),te=K.is.rtl();Y=nt.closest(ne.modal).length>0,Y&&K.verbose("Mouse down event registered inside the modal"),ve=K.is.scrolling()&&(!te&&r(v).outerWidth()-q.scrollbarWidth<=Ee.clientX||te&&q.scrollbarWidth>=Ee.clientX),ve&&K.verbose("Mouse down event registered inside the scrollbar")},mouseup:function(Ee){if(!q.closable){K.verbose("Dimmer clicked but closable setting is disabled");return}if(Y){K.debug("Dimmer clicked but mouse down was initially registered inside the modal");return}if(ve){K.debug("Dimmer clicked but mouse down was initially registered inside the scrollbar");return}var nt=r(Ee.target),te=nt.closest(ne.modal).length>0,ee=r.contains(b.documentElement,Ee.target);if(!te&&ee&&K.is.active()&&et.hasClass(c.front)){if(K.debug("Dimmer clicked, hiding all modals"),q.allowMultiple){if(!K.hideAll())return}else if(!K.hide())return;K.remove.clickaway()}},debounce:function(Ee,nt){clearTimeout(K.timer),K.timer=setTimeout(Ee,nt)},keyboard:function(Ee){var nt=Ee.which,te=27;nt==te&&(q.closable?(K.debug("Escape key pressed hiding modal"),et.hasClass(c.front)&&K.hide()):K.debug("Escape key pressed, but closable is set to false"),Ee.preventDefault())},resize:function(){ce.dimmer("is active")&&(K.is.animating()||K.is.active())&&At(K.refresh)}},toggle:function(){K.is.active()||K.is.animating()?K.hide():K.show()},show:function(Ee){Ee=r.isFunction(Ee)?Ee:function(){},K.refreshModals(),K.set.dimmerSettings(),K.set.dimmerStyles(),K.showModal(Ee)},hide:function(Ee){return Ee=r.isFunction(Ee)?Ee:function(){},K.refreshModals(),K.hideModal(Ee)},showModal:function(Ee){Ee=r.isFunction(Ee)?Ee:function(){},K.is.animating()||!K.is.active()?(K.showDimmer(),K.cacheSizes(),K.set.bodyMargin(),K.can.useFlex()?K.remove.legacy():(K.set.legacy(),K.set.modalOffset(),K.debug("Using non-flex legacy modal positioning.")),K.set.screenHeight(),K.set.type(),K.set.clickaway(),!q.allowMultiple&&K.others.active()?K.hideOthers(K.showModal):(N=!1,q.allowMultiple&&(K.others.active()&&ct.filter("."+c.active).find(ne.dimmer).addClass("active"),q.detachable&&et.detach().appendTo(G)),q.onShow.call(P),q.transition&&r.fn.transition!==_&&et.transition("is supported")?(K.debug("Showing modal with css animations"),et.transition({debug:q.debug,animation:q.transition+" in",queue:q.queue,duration:q.duration,useFailSafe:!0,onComplete:function(){q.onVisible.apply(P),q.keyboardShortcuts&&K.add.keyboardShortcuts(),K.save.focus(),K.set.active(),q.autofocus&&K.set.autofocus(),Ee()}})):K.error(Re.noTransition))):K.debug("Modal is already visible")},hideModal:function(Ee,nt,te){var ee=ct.filter("."+c.active).last();if(Ee=r.isFunction(Ee)?Ee:function(){},K.debug("Hiding modal"),q.onHide.call(P,r(this))===!1)return K.verbose("Hide callback returned false cancelling hide"),N=!1,!1;(K.is.animating()||K.is.active())&&(q.transition&&r.fn.transition!==_&&et.transition("is supported")?(K.remove.active(),et.transition({debug:q.debug,animation:q.transition+" out",queue:q.queue,duration:q.duration,useFailSafe:!0,onStart:function(){!K.others.active()&&!K.others.animating()&&!nt&&K.hideDimmer(),q.keyboardShortcuts&&!K.others.active()&&K.remove.keyboardShortcuts()},onComplete:function(){K.unbind.scrollLock(),q.allowMultiple&&(ee.addClass(c.front),et.removeClass(c.front),te?si.find(ne.dimmer).removeClass("active"):ee.find(ne.dimmer).removeClass("active")),q.onHidden.call(P),K.remove.dimmerStyles(),K.restore.focus(),Ee()}})):K.error(Re.noTransition))},showDimmer:function(){ce.dimmer("is animating")||!ce.dimmer("is active")?(K.save.bodyMargin(),K.debug("Showing dimmer"),ce.dimmer("show")):K.debug("Dimmer already visible")},hideDimmer:function(){if(ce.dimmer("is animating")||ce.dimmer("is active"))K.unbind.scrollLock(),ce.dimmer("hide",function(){K.restore.bodyMargin(),K.remove.clickaway(),K.remove.screenHeight()});else{K.debug("Dimmer is not visible cannot hide");return}},hideAll:function(Ee){var nt=si.filter("."+c.active+", ."+c.animating);if(Ee=r.isFunction(Ee)?Ee:function(){},nt.length>0){K.debug("Hiding all visible modals");var te=!0;return r(nt.get().reverse()).each(function(ee,oe){te&&(te=r(oe).modal("hide modal",Ee,!1,!0))}),te&&K.hideDimmer(),te}},hideOthers:function(Ee){var nt=ct.filter("."+c.active+", ."+c.animating);Ee=r.isFunction(Ee)?Ee:function(){},nt.length>0&&(K.debug("Hiding other modals",ct),nt.modal("hide modal",Ee,!0))},others:{active:function(){return ct.filter("."+c.active).length>0},animating:function(){return ct.filter("."+c.animating).length>0}},add:{keyboardShortcuts:function(){K.verbose("Adding keyboard shortcuts"),J.on("keyup"+tt,K.event.keyboard)}},save:{focus:function(){var Ee=r(b.activeElement),nt=Ee.closest(et).length>0;nt||(xt=r(b.activeElement).blur())},bodyMargin:function(){Oe=Z.css("margin-"+(K.can.leftBodyScrollbar()?"left":"right"));var Ee=parseInt(Oe.replace(/[^\d.]/g,"")),nt=v.innerWidth-b.documentElement.clientWidth;Ne=Ee+nt}},restore:{focus:function(){xt&&xt.length>0&&q.restoreFocus&&xt.focus()},bodyMargin:function(){var Ee=K.can.leftBodyScrollbar()?"left":"right";Z.css("margin-"+Ee,Oe),Z.find(ne.bodyFixed.replace("right",Ee)).css("padding-"+Ee,Oe)}},remove:{active:function(){et.removeClass(c.active)},legacy:function(){et.removeClass(c.legacy)},clickaway:function(){q.detachable||et.off("mousedown"+Ve),G.off("mousedown"+Ve),G.off("mouseup"+Ve)},dimmerStyles:function(){G.removeClass(c.inverted),ce.removeClass(c.blurring)},bodyStyle:function(){Z.attr("style")===""&&(K.verbose("Removing style attribute"),Z.removeAttr("style"))},screenHeight:function(){K.debug("Removing page height"),Z.css("height","")},keyboardShortcuts:function(){K.verbose("Removing keyboard shortcuts"),J.off("keyup"+tt)},scrolling:function(){ce.removeClass(c.scrolling),et.removeClass(c.scrolling)}},cacheSizes:function(){et.addClass(c.loading);var Ee=et.prop("scrollHeight"),nt=et.outerWidth(),te=et.outerHeight();(K.cache.pageHeight===_||te!==0)&&(r.extend(K.cache,{pageHeight:r(b).outerHeight(),width:nt,height:te+q.offset,scrollHeight:Ee+q.offset,contextHeight:q.context=="body"?r(v).height():ce.height()}),K.cache.topOffset=-(K.cache.height/2)),et.removeClass(c.loading),K.debug("Caching modal and container sizes",K.cache)},can:{leftBodyScrollbar:function(){return K.cache.leftBodyScrollbar===_&&(K.cache.leftBodyScrollbar=K.is.rtl()&&(K.is.iframe&&!K.is.firefox()||K.is.safari()||K.is.edge()||K.is.ie())),K.cache.leftBodyScrollbar},useFlex:function(){return q.useFlex==="auto"?q.detachable&&!K.is.ie():(q.useFlex&&K.is.ie()?K.debug("useFlex true is not supported in IE"):q.useFlex&&!q.detachable&&K.debug("useFlex true in combination with detachable false is not supported"),q.useFlex)},fit:function(){var Ee=K.cache.contextHeight,nt=K.cache.contextHeight/2,te=K.cache.topOffset,ee=K.cache.scrollHeight,oe=K.cache.height,Ge=q.padding,yt=nt+te;return ee>oe?yt+ee+Ge<Ee:oe+Ge*2<Ee}},is:{active:function(){return et.hasClass(c.active)},ie:function(){if(K.cache.isIE===_){var Ee=!v.ActiveXObject&&"ActiveXObject"in v,nt="ActiveXObject"in v;K.cache.isIE=Ee||nt}return K.cache.isIE},animating:function(){return et.transition("is supported")?et.transition("is animating"):et.is(":visible")},scrolling:function(){return ce.hasClass(c.scrolling)},modernBrowser:function(){return!(v.ActiveXObject||"ActiveXObject"in v)},rtl:function(){return K.cache.isRTL===_&&(K.cache.isRTL=Z.attr("dir")==="rtl"||Z.css("direction")==="rtl"),K.cache.isRTL},safari:function(){return K.cache.isSafari===_&&(K.cache.isSafari=/constructor/i.test(v.HTMLElement)||!!v.ApplePaySession),K.cache.isSafari},edge:function(){return K.cache.isEdge===_&&(K.cache.isEdge=!!v.setImmediate&&!K.is.ie()),K.cache.isEdge},firefox:function(){return K.cache.isFirefox===_&&(K.cache.isFirefox=!!v.InstallTrigger),K.cache.isFirefox},iframe:function(){return self!==top}},set:{autofocus:function(){var Ee=et.find("[tabindex], :input").filter(":visible").filter(function(){return r(this).closest(".disabled").length===0}),nt=Ee.filter("[autofocus]"),te=nt.length>0?nt.first():Ee.first();te.length>0&&te.focus()},bodyMargin:function(){var Ee=K.can.leftBodyScrollbar()?"left":"right";(q.detachable||K.can.fit())&&Z.css("margin-"+Ee,Ne+"px"),Z.find(ne.bodyFixed.replace("right",Ee)).css("padding-"+Ee,Ne+"px")},clickaway:function(){q.detachable||et.on("mousedown"+Ve,K.event.mousedown),G.on("mousedown"+Ve,K.event.mousedown),G.on("mouseup"+Ve,K.event.mouseup)},dimmerSettings:function(){if(r.fn.dimmer===_){K.error(Re.dimmer);return}var Ee={debug:q.debug,dimmerName:"modals",closable:"auto",useFlex:K.can.useFlex(),duration:{show:q.duration,hide:q.duration}},nt=r.extend(!0,Ee,q.dimmerSettings);q.inverted&&(nt.variation=nt.variation!==_?nt.variation+" inverted":"inverted"),je.dimmer("setting",nt)},dimmerStyles:function(){q.inverted?G.addClass(c.inverted):G.removeClass(c.inverted),q.blurring?ce.addClass(c.blurring):ce.removeClass(c.blurring)},modalOffset:function(){if(q.detachable)et.css({marginTop:!et.hasClass("aligned")&&K.can.fit()?-(K.cache.height/2):q.padding/2,marginLeft:-(K.cache.width/2)});else{var Ee=K.can.fit();et.css({top:!et.hasClass("aligned")&&Ee?r(b).scrollTop()+(K.cache.contextHeight-K.cache.height)/2:!Ee||et.hasClass("top")?r(b).scrollTop()+q.padding:r(b).scrollTop()+(K.cache.contextHeight-K.cache.height-q.padding),marginLeft:-(K.cache.width/2)})}K.verbose("Setting modal offset for legacy mode")},screenHeight:function(){K.can.fit()?Z.css("height",""):et.hasClass("bottom")||(K.debug("Modal is taller than page content, resizing page height"),Z.css("height",K.cache.height+q.padding*2))},active:function(){et.addClass(c.active+" "+c.front),ct.filter("."+c.active).removeClass(c.front)},scrolling:function(){ce.addClass(c.scrolling),et.addClass(c.scrolling),K.unbind.scrollLock()},legacy:function(){et.addClass(c.legacy)},type:function(){K.can.fit()?(K.verbose("Modal fits on screen"),!K.others.active()&&!K.others.animating()&&(K.remove.scrolling(),K.bind.scrollLock())):et.hasClass("bottom")?K.verbose("Bottom aligned modal not fitting on screen is unsupported for scrolling"):(K.verbose("Modal cannot fit on screen setting to scrolling"),K.set.scrolling())},undetached:function(){ce.addClass(c.undetached)}},setting:function(Ee,nt){if(K.debug("Changing setting",Ee,nt),r.isPlainObject(Ee))r.extend(!0,q,Ee);else if(nt!==_)r.isPlainObject(q[Ee])?r.extend(!0,q[Ee],nt):q[Ee]=nt;else return q[Ee]},internal:function(Ee,nt){if(r.isPlainObject(Ee))r.extend(!0,K,Ee);else if(nt!==_)K[Ee]=nt;else return K[Ee]},debug:function(){!q.silent&&q.debug&&(q.performance?K.performance.log(arguments):(K.debug=Function.prototype.bind.call(console.info,console,q.name+":"),K.debug.apply(console,arguments)))},verbose:function(){!q.silent&&q.verbose&&q.debug&&(q.performance?K.performance.log(arguments):(K.verbose=Function.prototype.bind.call(console.info,console,q.name+":"),K.verbose.apply(console,arguments)))},error:function(){q.silent||(K.error=Function.prototype.bind.call(console.error,console,q.name+":"),K.error.apply(console,arguments))},performance:{log:function(Ee){var nt,te,ee;q.performance&&(nt=new Date().getTime(),ee=we||nt,te=nt-ee,we=nt,Be.push({Name:Ee[0],Arguments:[].slice.call(Ee,1)||"",Element:P,"Execution Time":te})),clearTimeout(K.performance.timer),K.performance.timer=setTimeout(K.performance.display,500)},display:function(){var Ee=q.name+":",nt=0;we=!1,clearTimeout(K.performance.timer),r.each(Be,function(te,ee){nt+=ee["Execution Time"]}),Ee+=" "+nt+"ms",C&&(Ee+=" '"+C+"'"),(console.group!==_||console.table!==_)&&Be.length>0&&(console.groupCollapsed(Ee),console.table?console.table(Be):r.each(Be,function(te,ee){console.log(ee.Name+": "+ee["Execution Time"]+"ms")}),console.groupEnd()),Be=[]}},invoke:function(Ee,nt,te){var ee=k,oe,Ge,yt;return nt=nt||Ke,te=P||te,typeof Ee=="string"&&ee!==_&&(Ee=Ee.split(/[\. ]/),oe=Ee.length-1,r.each(Ee,function(jt,Bt){var Qt=jt!=oe?Bt+Ee[jt+1].charAt(0).toUpperCase()+Ee[jt+1].slice(1):Ee;if(r.isPlainObject(ee[Qt])&&jt!=oe)ee=ee[Qt];else{if(ee[Qt]!==_)return Ge=ee[Qt],!1;if(r.isPlainObject(ee[Bt])&&jt!=oe)ee=ee[Bt];else return ee[Bt]!==_&&(Ge=ee[Bt]),!1}})),r.isFunction(Ge)?yt=Ge.apply(te,nt):Ge!==_&&(yt=Ge),Array.isArray(gt)?gt.push(yt):gt!==_?gt=[gt,yt]:yt!==_&&(gt=yt),Ge}},Q?(k===_&&K.initialize(),K.invoke(Ue)):(k!==_&&k.invoke("destroy"),K.initialize())}),gt!==_?gt:this},r.fn.modal.settings={name:"Modal",namespace:"modal",useFlex:"auto",offset:0,silent:!1,debug:!1,verbose:!1,performance:!0,observeChanges:!1,allowMultiple:!1,detachable:!0,closable:!0,autofocus:!0,restoreFocus:!0,inverted:!1,blurring:!1,centered:!0,dimmerSettings:{closable:!1,useCSS:!0},keyboardShortcuts:!0,context:"body",queue:!1,duration:500,transition:"scale",padding:50,scrollbarWidth:10,onShow:function(){},onVisible:function(){},onHide:function(){return!0},onHidden:function(){},onApprove:function(){return!0},onDeny:function(){return!0},selector:{close:"> .close",approve:".actions .positive, .actions .approve, .actions .ok",deny:".actions .negative, .actions .deny, .actions .cancel",modal:".ui.modal",dimmer:"> .ui.dimmer",bodyFixed:"> .ui.fixed.menu, > .ui.right.toast-container, > .ui.right.sidebar"},error:{dimmer:"UI Dimmer, a required component is not included in this page",method:"The method you called is not defined.",notFound:"The element you specified could not be found"},className:{active:"active",animating:"animating",blurring:"blurring",inverted:"inverted",legacy:"legacy",loading:"loading",scrolling:"scrolling",undetached:"undetached",front:"front"}}})(jQuery,window,document);(function(r,v,b,_){"use strict";r.isFunction=r.isFunction||function(g){return typeof g=="function"&&typeof g.nodeType!="number"},v=typeof v<"u"&&v.Math==Math?v:typeof self<"u"&&self.Math==Math?self:Function("return this")(),r.fn.search=function(g){var O=r(this),R=O.selector||"",J=new Date().getTime(),Z=[],C=arguments[0],we=typeof C=="string",Be=[].slice.call(arguments,1),Ue;return r(this).each(function(){var Q=r.isPlainObject(g)?r.extend(!0,{},r.fn.search.settings,g):r.extend({},r.fn.search.settings),Ke=Q.className,At=Q.metadata,gt=Q.regExp,q=Q.fields,ne=Q.selector,c=Q.error,W=Q.namespace,Re="."+W,tt=W+"-module",st=r(this),et=st.find(ne.prompt),je=st.find(ne.searchButton),S=st.find(ne.results),si=st.find(ne.result),ct=st.find(ne.category),xt=this,ce=st.data(tt),G=!1,P=!1,k;k={initialize:function(){k.verbose("Initializing module"),k.get.settings(),k.determine.searchFields(),k.bind.events(),k.set.type(),k.create.results(),k.instantiate()},instantiate:function(){k.verbose("Storing instance of module",k),ce=k,st.data(tt,k)},destroy:function(){k.verbose("Destroying instance"),st.off(Re).removeData(tt)},refresh:function(){k.debug("Refreshing selector cache"),et=st.find(ne.prompt),je=st.find(ne.searchButton),ct=st.find(ne.category),S=st.find(ne.results),si=st.find(ne.result)},refreshResults:function(){S=st.find(ne.results),si=st.find(ne.result)},bind:{events:function(){k.verbose("Binding events to search"),Q.automatic&&(st.on(k.get.inputEvent()+Re,ne.prompt,k.event.input),et.attr("autocomplete","off")),st.on("focus"+Re,ne.prompt,k.event.focus).on("blur"+Re,ne.prompt,k.event.blur).on("keydown"+Re,ne.prompt,k.handleKeyboard).on("click"+Re,ne.searchButton,k.query).on("mousedown"+Re,ne.results,k.event.result.mousedown).on("mouseup"+Re,ne.results,k.event.result.mouseup).on("click"+Re,ne.result,k.event.result.click)}},determine:{searchFields:function(){g&&g.searchFields!==_&&(Q.searchFields=g.searchFields)}},event:{input:function(){Q.searchDelay?(clearTimeout(k.timer),k.timer=setTimeout(function(){k.is.focused()&&k.query()},Q.searchDelay)):k.query()},focus:function(){k.set.focus(),Q.searchOnFocus&&k.has.minimumCharacters()&&k.query(function(){k.can.show()&&k.showResults()})},blur:function(N){var Y=b.activeElement===this,ve=function(){k.cancel.query(),k.remove.focus(),k.timer=setTimeout(k.hideResults,Q.hideDelay)};Y||(P=!1,k.resultsClicked?(k.debug("Determining if user action caused search to close"),st.one("click.close"+Re,ne.results,function(Oe){if(k.is.inMessage(Oe)||G){et.focus();return}G=!1,!k.is.animating()&&!k.is.hidden()&&ve()})):(k.debug("Input blurred without user action, closing results"),ve()))},result:{mousedown:function(){k.resultsClicked=!0},mouseup:function(){k.resultsClicked=!1},click:function(N){k.debug("Search result selected");var Y=r(this),ve=Y.find(ne.title).eq(0),Oe=Y.is("a[href]")?Y:Y.find("a[href]").eq(0),Ne=Oe.attr("href")||!1,Ve=Oe.attr("target")||!1,Ye=ve.length>0?ve.text():!1,Lt=k.get.results(),K=Y.data(At.result)||k.get.result(Ye,Lt);if(Ye&&k.set.value(Ye),r.isFunction(Q.onSelect)&&Q.onSelect.call(xt,K,Lt)===!1){k.debug("Custom onSelect callback cancelled default select action"),G=!0;return}k.hideResults(),Ne&&(N.preventDefault(),k.verbose("Opening search link found in result",Oe),Ve=="_blank"||N.ctrlKey?v.open(Ne):v.location.href=Ne)}}},ensureVisible:function(Y){var ve,Oe,Ne,Ve;ve=Y.position().top,Oe=ve+Y.outerHeight(!0),Ne=S.scrollTop(),Ve=S.height(),parseInt(S.css("paddingTop"),0)+parseInt(S.css("paddingBottom"),0),ve<0?S.scrollTop(Ne+ve):Ve<Oe&&S.scrollTop(Ne+(Oe-Ve))},handleKeyboard:function(N){var Y=st.find(ne.result),ve=st.find(ne.category),Oe=Y.filter("."+Ke.active),Ne=Y.index(Oe),Ve=Y.length,Ye=Oe.length>0,Lt=N.which,K={backspace:8,enter:13,escape:27,upArrow:38,downArrow:40},Ee;if(Lt==K.escape&&(k.verbose("Escape key pressed, blurring search field"),k.hideResults(),P=!0),k.is.visible())if(Lt==K.enter){if(k.verbose("Enter key pressed, selecting active result"),Y.filter("."+Ke.active).length>0)return k.event.result.click.call(Y.filter("."+Ke.active),N),N.preventDefault(),!1}else Lt==K.upArrow&&Ye?(k.verbose("Up key pressed, changing active result"),Ee=Ne-1<0?Ne:Ne-1,ve.removeClass(Ke.active),Y.removeClass(Ke.active).eq(Ee).addClass(Ke.active).closest(ve).addClass(Ke.active),k.ensureVisible(Y.eq(Ee)),N.preventDefault()):Lt==K.downArrow&&(k.verbose("Down key pressed, changing active result"),Ee=Ne+1>=Ve?Ne:Ne+1,ve.removeClass(Ke.active),Y.removeClass(Ke.active).eq(Ee).addClass(Ke.active).closest(ve).addClass(Ke.active),k.ensureVisible(Y.eq(Ee)),N.preventDefault());else Lt==K.enter&&(k.verbose("Enter key pressed, executing query"),k.query(),k.set.buttonPressed(),et.one("keyup",k.remove.buttonFocus))},setup:{api:function(N,Y){var ve={debug:Q.debug,on:!1,cache:Q.cache,action:"search",urlData:{query:N},onSuccess:function(Oe){k.parse.response.call(xt,Oe,N),Y()},onFailure:function(){k.displayMessage(c.serverError),Y()},onAbort:function(Oe){},onError:k.error};r.extend(!0,ve,Q.apiSettings),k.verbose("Setting up API request",ve),st.api(ve)}},can:{useAPI:function(){return r.fn.api!==_},show:function(){return k.is.focused()&&!k.is.visible()&&!k.is.empty()},transition:function(){return Q.transition&&r.fn.transition!==_&&st.transition("is supported")}},is:{animating:function(){return S.hasClass(Ke.animating)},hidden:function(){return S.hasClass(Ke.hidden)},inMessage:function(N){if(N.target){var Y=r(N.target),ve=r.contains(b.documentElement,N.target);return ve&&Y.closest(ne.message).length>0}},empty:function(){return S.html()===""},visible:function(){return S.filter(":visible").length>0},focused:function(){return et.filter(":focus").length>0}},get:{settings:function(){r.isPlainObject(g)&&g.searchFullText&&(Q.fullTextSearch=g.searchFullText,k.error(Q.error.oldSearchSyntax,xt)),Q.ignoreDiacritics&&!String.prototype.normalize&&(Q.ignoreDiacritics=!1,k.error(c.noNormalize,xt))},inputEvent:function(){var N=et[0],Y=N!==_&&N.oninput!==_?"input":N!==_&&N.onpropertychange!==_?"propertychange":"keyup";return Y},value:function(){return et.val()},results:function(){var N=st.data(At.results);return N},result:function(N,Y){var ve=!1;return N=N!==_?N:k.get.value(),Y=Y!==_?Y:k.get.results(),Q.type==="category"?(k.debug("Finding result that matches",N),r.each(Y,function(Oe,Ne){if(Array.isArray(Ne.results)&&(ve=k.search.object(N,Ne.results)[0],ve))return!1})):(k.debug("Finding result in results object",N),ve=k.search.object(N,Y)[0]),ve||!1}},select:{firstResult:function(){k.verbose("Selecting first result"),si.first().addClass(Ke.active)}},set:{focus:function(){st.addClass(Ke.focus)},loading:function(){st.addClass(Ke.loading)},value:function(N){k.verbose("Setting search input value",N),et.val(N)},type:function(N){N=N||Q.type,Q.type=="category"&&st.addClass(Q.type)},buttonPressed:function(){je.addClass(Ke.pressed)}},remove:{loading:function(){st.removeClass(Ke.loading)},focus:function(){st.removeClass(Ke.focus)},buttonPressed:function(){je.removeClass(Ke.pressed)},diacritics:function(N){return Q.ignoreDiacritics?N.normalize("NFD").replace(/[\u0300-\u036f]/g,""):N}},query:function(N){N=r.isFunction(N)?N:function(){};var Y=k.get.value(),ve=k.read.cache(Y);N=N||function(){},k.has.minimumCharacters()?(ve?(k.debug("Reading result from cache",Y),k.save.results(ve.results),k.addResults(ve.html),k.inject.id(ve.results),N()):(k.debug("Querying for",Y),r.isPlainObject(Q.source)||Array.isArray(Q.source)?(k.search.local(Y),N()):k.can.useAPI()?k.search.remote(Y,N):(k.error(c.source),N())),Q.onSearchQuery.call(xt,Y)):k.hideResults()},search:{local:function(N){var Y=k.search.object(N,Q.source),ve;k.set.loading(),k.save.results(Y),k.debug("Returned full local search results",Y),Q.maxResults>0&&(k.debug("Using specified max results",Y),Y=Y.slice(0,Q.maxResults)),Q.type=="category"&&(Y=k.create.categoryResults(Y)),ve=k.generateResults({results:Y}),k.remove.loading(),k.addResults(ve),k.inject.id(Y),k.write.cache(N,{html:ve,results:Y})},remote:function(N,Y){Y=r.isFunction(Y)?Y:function(){},st.api("is loading")&&st.api("abort"),k.setup.api(N,Y),st.api("query")},object:function(N,Y,ve){N=k.remove.diacritics(String(N));var Oe=[],Ne=[],Ve=[],Ye=N.replace(gt.escape,"\\$&"),Lt=new RegExp(gt.beginsWith+Ye,"i"),K=function(Ee,nt){var te=r.inArray(nt,Oe)==-1,ee=r.inArray(nt,Ve)==-1,oe=r.inArray(nt,Ne)==-1;te&&ee&&oe&&Ee.push(nt)};return Y=Y||Q.source,ve=ve!==_?ve:Q.searchFields,Array.isArray(ve)||(ve=[ve]),Y===_||Y===!1?(k.error(c.source),[]):(r.each(ve,function(Ee,nt){r.each(Y,function(te,ee){var oe=typeof ee[nt]=="string"||typeof ee[nt]=="number";if(oe){var Ge;typeof ee[nt]=="string"?Ge=k.remove.diacritics(ee[nt]):Ge=ee[nt].toString(),Ge.search(Lt)!==-1?K(Oe,ee):Q.fullTextSearch==="exact"&&k.exactSearch(N,Ge)?K(Ne,ee):Q.fullTextSearch==!0&&k.fuzzySearch(N,Ge)&&K(Ve,ee)}})}),r.merge(Ne,Ve),r.merge(Oe,Ne),Oe)}},exactSearch:function(N,Y){return N=N.toLowerCase(),Y=Y.toLowerCase(),Y.indexOf(N)>-1},fuzzySearch:function(N,Y){var ve=Y.length,Oe=N.length;if(typeof N!="string"||(N=N.toLowerCase(),Y=Y.toLowerCase(),Oe>ve))return!1;if(Oe===ve)return N===Y;e:for(var Ne=0,Ve=0;Ne<Oe;Ne++){for(var Ye=N.charCodeAt(Ne);Ve<ve;)if(Y.charCodeAt(Ve++)===Ye)continue e;return!1}return!0},parse:{response:function(N,Y){if(Array.isArray(N)){var ve={};ve[q.results]=N,N=ve}var Oe=k.generateResults(N);k.verbose("Parsing server response",N),N!==_&&Y!==_&&N[q.results]!==_&&(k.addResults(Oe),k.inject.id(N[q.results]),k.write.cache(Y,{html:Oe,results:N[q.results]}),k.save.results(N[q.results]))}},cancel:{query:function(){k.can.useAPI()&&st.api("abort")}},has:{minimumCharacters:function(){var N=k.get.value(),Y=N.length;return Y>=Q.minCharacters},results:function(){if(S.length===0)return!1;var N=S.html();return N!=""}},clear:{cache:function(N){var Y=st.data(At.cache);N?N&&Y&&Y[N]&&(k.debug("Removing value from cache",N),delete Y[N],st.data(At.cache,Y)):(k.debug("Clearing cache",N),st.removeData(At.cache))}},read:{cache:function(N){var Y=st.data(At.cache);return Q.cache?(k.verbose("Checking cache for generated html for query",N),typeof Y=="object"&&Y[N]!==_?Y[N]:!1):!1}},create:{categoryResults:function(N){var Y={};return r.each(N,function(ve,Oe){Oe.category&&(Y[Oe.category]===_?(k.verbose("Creating new category of results",Oe.category),Y[Oe.category]={name:Oe.category,results:[Oe]}):Y[Oe.category].results.push(Oe))}),Y},id:function(N,Y){var ve=N+1,Oe,Ne;return Y!==_?(Oe=String.fromCharCode(97+Y),Ne=Oe+ve,k.verbose("Creating category result id",Ne)):(Ne=ve,k.verbose("Creating result id",Ne)),Ne},results:function(){S.length===0&&(S=r("<div />").addClass(Ke.results).appendTo(st))}},inject:{result:function(N,Y,ve){k.verbose("Injecting result into results");var Oe=ve!==_?S.children().eq(ve).children(ne.results).first().children(ne.result).eq(Y):S.children(ne.result).eq(Y);k.verbose("Injecting results metadata",Oe),Oe.data(At.result,N)},id:function(N){k.debug("Injecting unique ids into results");var Y=0,ve=0;return Q.type==="category"?r.each(N,function(Oe,Ne){Ne.results.length>0&&(ve=0,r.each(Ne.results,function(Ve,Ye){Ye.id===_&&(Ye.id=k.create.id(ve,Y)),k.inject.result(Ye,ve,Y),ve++}),Y++)}):r.each(N,function(Oe,Ne){Ne.id===_&&(Ne.id=k.create.id(ve)),k.inject.result(Ne,ve),ve++}),N}},save:{results:function(N){k.verbose("Saving current search results to metadata",N),st.data(At.results,N)}},write:{cache:function(N,Y){var ve=st.data(At.cache)!==_?st.data(At.cache):{};Q.cache&&(k.verbose("Writing generated html to cache",N,Y),ve[N]=Y,st.data(At.cache,ve))}},addResults:function(N){if(r.isFunction(Q.onResultsAdd)&&Q.onResultsAdd.call(S,N)===!1)return k.debug("onResultsAdd callback cancelled default action"),!1;N?(S.html(N),k.refreshResults(),Q.selectFirstResult&&k.select.firstResult(),k.showResults()):k.hideResults(function(){S.empty()})},showResults:function(N){N=r.isFunction(N)?N:function(){},!P&&!k.is.visible()&&k.has.results()&&(k.can.transition()?(k.debug("Showing results with css animations"),S.transition({animation:Q.transition+" in",debug:Q.debug,verbose:Q.verbose,duration:Q.duration,onShow:function(){var Y=st.find(ne.result).eq(0);Y.length>0&&k.ensureVisible(Y)},onComplete:function(){N()},queue:!0})):(k.debug("Showing results with javascript"),S.stop().fadeIn(Q.duration,Q.easing)),Q.onResultsOpen.call(S))},hideResults:function(N){N=r.isFunction(N)?N:function(){},k.is.visible()&&(k.can.transition()?(k.debug("Hiding results with css animations"),S.transition({animation:Q.transition+" out",debug:Q.debug,verbose:Q.verbose,duration:Q.duration,onComplete:function(){N()},queue:!0})):(k.debug("Hiding results with javascript"),S.stop().fadeOut(Q.duration,Q.easing)),Q.onResultsClose.call(S))},generateResults:function(N){k.debug("Generating html from response",N);var Y=Q.templates[Q.type],ve=r.isPlainObject(N[q.results])&&!r.isEmptyObject(N[q.results]),Oe=Array.isArray(N[q.results])&&N[q.results].length>0,Ne="";return ve||Oe?(Q.maxResults>0&&(ve?Q.type=="standard"&&k.error(c.maxResults):N[q.results]=N[q.results].slice(0,Q.maxResults)),r.isFunction(Y)?Ne=Y(N,q,Q.preserveHTML):k.error(c.noTemplate,!1)):Q.showNoResults&&(Ne=k.displayMessage(c.noResults,"empty",c.noResultsHeader)),Q.onResults.call(xt,N),Ne},displayMessage:function(N,Y,ve){return Y=Y||"standard",k.debug("Displaying message",N,Y,ve),k.addResults(Q.templates.message(N,Y,ve)),Q.templates.message(N,Y,ve)},setting:function(N,Y){if(r.isPlainObject(N))r.extend(!0,Q,N);else if(Y!==_)Q[N]=Y;else return Q[N]},internal:function(N,Y){if(r.isPlainObject(N))r.extend(!0,k,N);else if(Y!==_)k[N]=Y;else return k[N]},debug:function(){!Q.silent&&Q.debug&&(Q.performance?k.performance.log(arguments):(k.debug=Function.prototype.bind.call(console.info,console,Q.name+":"),k.debug.apply(console,arguments)))},verbose:function(){!Q.silent&&Q.verbose&&Q.debug&&(Q.performance?k.performance.log(arguments):(k.verbose=Function.prototype.bind.call(console.info,console,Q.name+":"),k.verbose.apply(console,arguments)))},error:function(){Q.silent||(k.error=Function.prototype.bind.call(console.error,console,Q.name+":"),k.error.apply(console,arguments))},performance:{log:function(N){var Y,ve,Oe;Q.performance&&(Y=new Date().getTime(),Oe=J||Y,ve=Y-Oe,J=Y,Z.push({Name:N[0],Arguments:[].slice.call(N,1)||"",Element:xt,"Execution Time":ve})),clearTimeout(k.performance.timer),k.performance.timer=setTimeout(k.performance.display,500)},display:function(){var N=Q.name+":",Y=0;J=!1,clearTimeout(k.performance.timer),r.each(Z,function(ve,Oe){Y+=Oe["Execution Time"]}),N+=" "+Y+"ms",R&&(N+=" '"+R+"'"),O.length>1&&(N+=" ("+O.length+")"),(console.group!==_||console.table!==_)&&Z.length>0&&(console.groupCollapsed(N),console.table?console.table(Z):r.each(Z,function(ve,Oe){console.log(Oe.Name+": "+Oe["Execution Time"]+"ms")}),console.groupEnd()),Z=[]}},invoke:function(N,Y,ve){var Oe=ce,Ne,Ve,Ye;return Y=Y||Be,ve=xt||ve,typeof N=="string"&&Oe!==_&&(N=N.split(/[\. ]/),Ne=N.length-1,r.each(N,function(Lt,K){var Ee=Lt!=Ne?K+N[Lt+1].charAt(0).toUpperCase()+N[Lt+1].slice(1):N;if(r.isPlainObject(Oe[Ee])&&Lt!=Ne)Oe=Oe[Ee];else{if(Oe[Ee]!==_)return Ve=Oe[Ee],!1;if(r.isPlainObject(Oe[K])&&Lt!=Ne)Oe=Oe[K];else return Oe[K]!==_&&(Ve=Oe[K]),!1}})),r.isFunction(Ve)?Ye=Ve.apply(ve,Y):Ve!==_&&(Ye=Ve),Array.isArray(Ue)?Ue.push(Ye):Ue!==_?Ue=[Ue,Ye]:Ye!==_&&(Ue=Ye),Ve}},we?(ce===_&&k.initialize(),k.invoke(C)):(ce!==_&&ce.invoke("destroy"),k.initialize())}),Ue!==_?Ue:this},r.fn.search.settings={name:"Search",namespace:"search",silent:!1,debug:!1,verbose:!1,performance:!0,type:"standard",minCharacters:1,selectFirstResult:!1,apiSettings:!1,source:!1,searchOnFocus:!0,searchFields:["id","title","description"],displayField:"",fullTextSearch:"exact",ignoreDiacritics:!1,automatic:!0,hideDelay:0,searchDelay:200,maxResults:7,cache:!0,showNoResults:!0,preserveHTML:!0,transition:"scale",duration:200,easing:"easeOutExpo",onSelect:!1,onResultsAdd:!1,onSearchQuery:function(g){},onResults:function(g){},onResultsOpen:function(){},onResultsClose:function(){},className:{animating:"animating",active:"active",empty:"empty",focus:"focus",hidden:"hidden",loading:"loading",results:"results",pressed:"down"},error:{source:"Cannot search. No source used, and Semantic API module was not included",noResultsHeader:"No Results",noResults:"Your search returned no results",logging:"Error in debug logging, exiting.",noEndpoint:"No search endpoint was specified",noTemplate:"A valid template name was not specified.",oldSearchSyntax:"searchFullText setting has been renamed fullTextSearch for consistency, please adjust your settings.",serverError:"There was an issue querying the server.",maxResults:"Results must be an array to use maxResults setting",method:"The method you called is not defined.",noNormalize:'"ignoreDiacritics" setting will be ignored. Browser does not support String().normalize(). You may consider including <https://cdn.jsdelivr.net/npm/unorm@1.4.1/lib/unorm.min.js> as a polyfill.'},metadata:{cache:"cache",results:"results",result:"result"},regExp:{escape:/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,beginsWith:"(?:s|^)"},fields:{categories:"results",categoryName:"name",categoryResults:"results",description:"description",image:"image",price:"price",results:"results",title:"title",url:"url",action:"action",actionText:"text",actionURL:"url"},selector:{prompt:".prompt",searchButton:".search.button",results:".results",message:".results > .message",category:".category",result:".result",title:".title, .name"},templates:{escape:function(g,O){if(O)return g;var R=/[<>"'`]/g,J=/[&<>"'`]/,Z={"<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},C=function(we){return Z[we]};return J.test(g)?(g=g.replace(/&(?![a-z0-9#]{1,6};)/,"&amp;"),g.replace(R,C)):g},message:function(g,O,R){var J="";return g!==_&&O!==_&&(J+='<div class="message '+O+'">',R&&(J+='<div class="header">'+R+"</div>"),J+=' <div class="description">'+g+"</div>",J+="</div>"),J},category:function(g,O,R){var J="",Z=r.fn.search.settings.templates.escape;return g[O.categoryResults]!==_?(r.each(g[O.categoryResults],function(C,we){we[O.results]!==_&&we.results.length>0&&(J+='<div class="category">',we[O.categoryName]!==_&&(J+='<div class="name">'+Z(we[O.categoryName],R)+"</div>"),J+='<div class="results">',r.each(we.results,function(Be,Ue){Ue[O.url]?J+='<a class="result" href="'+Ue[O.url].replace(/"/g,"")+'">':J+='<a class="result">',Ue[O.image]!==_&&(J+='<div class="image"> <img src="'+Ue[O.image].replace(/"/g,"")+'"></div>'),J+='<div class="content">',Ue[O.price]!==_&&(J+='<div class="price">'+Z(Ue[O.price],R)+"</div>"),Ue[O.title]!==_&&(J+='<div class="title">'+Z(Ue[O.title],R)+"</div>"),Ue[O.description]!==_&&(J+='<div class="description">'+Z(Ue[O.description],R)+"</div>"),J+="</div>",J+="</a>"}),J+="</div>",J+="</div>")}),g[O.action]&&(O.actionURL===!1?J+='<div class="action">'+Z(g[O.action][O.actionText],R)+"</div>":J+='<a href="'+g[O.action][O.actionURL].replace(/"/g,"")+'" class="action">'+Z(g[O.action][O.actionText],R)+"</a>"),J):!1},standard:function(g,O,R){var J="",Z=r.fn.search.settings.templates.escape;return g[O.results]!==_?(r.each(g[O.results],function(C,we){we[O.url]?J+='<a class="result" href="'+we[O.url].replace(/"/g,"")+'">':J+='<a class="result">',we[O.image]!==_&&(J+='<div class="image"> <img src="'+we[O.image].replace(/"/g,"")+'"></div>'),J+='<div class="content">',we[O.price]!==_&&(J+='<div class="price">'+Z(we[O.price],R)+"</div>"),we[O.title]!==_&&(J+='<div class="title">'+Z(we[O.title],R)+"</div>"),we[O.description]!==_&&(J+='<div class="description">'+Z(we[O.description],R)+"</div>"),J+="</div>",J+="</a>"}),g[O.action]&&(O.actionURL===!1?J+='<div class="action">'+Z(g[O.action][O.actionText],R)+"</div>":J+='<a href="'+g[O.action][O.actionURL].replace(/"/g,"")+'" class="action">'+Z(g[O.action][O.actionText],R)+"</a>"),J):!1}}}})(jQuery,window,document)}(),function(){"use strict";var Ml,Dl,Ol,ao,kn,dd,el,Va,Wa,fd,za,zc,Kc,Xc,ql,pa,Xr,Ka,Xa,zs,hd,nm,md,$l,is,bs,lo,Dn,Gn,Do,ga,Oo,Gr,va,Pl,ba,sm,qo,Gc,pd,rm;__webpack_require__.p=`${window.config?.assetUrlPrefix??"/assets"}/`;function r(e){const t=["/assets/js/monaco."];for(const i of t)if(e.stack?.includes(i))return!0;return!1}function v(e,t="error"){const i=document.querySelector(".page-content")??document.body,n=e.replace(/\W/g,"").trim();let s=i.querySelector(`.js-global-error[data-global-error-msg-compact="${n}"]`);if(!s){const u=document.createElement("div");u.innerHTML=`<div class="ui container js-global-error tw-my-[--page-spacing]"><div class="ui ${t} message tw-text-center tw-whitespace-pre-line"></div></div>`,s=u.childNodes[0]}const l=Number(s.getAttribute("data-global-error-msg-count"))+1;s.setAttribute("data-global-error-msg-compact",n),s.setAttribute("data-global-error-msg-count",l.toString()),s.querySelector(".ui.message").textContent=e+(l>1?` (${l})`:""),i.prepend(s)}function b({error:e,reason:t,message:i,type:n,filename:s,lineno:l,colno:u}){const m=e??t,y=String(new URL(__webpack_require__.p,window.location.origin)),{runModeIsProd:A}=window.config??{};if(!m&&(i&&console.error(new Error(i)),A)||m instanceof Error&&(!m.stack?.includes(y)&&A||r(m)))return;let L=m?.message??i;l&&(L+=` (${s} @ ${l}:${u})`);const z=L.endsWith(".")?"":".";v(`JavaScript ${n==="unhandledrejection"?"promise rejection":n}: ${L}${z} Open browser console to see more details.`)}function _(){if(window._globalHandlerErrors?._inited){v("The global error handler has been initialized, do not initialize it again");return}window.config||v("Gitea JavaScript code couldn't run correctly, please check your custom templates");for(const e of window._globalHandlerErrors||[])b(e);window._globalHandlerErrors={_inited:!0,push:e=>b(e)}}_();const g=e=>e.replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/'/g,"&#39;").replace(/</g,"&lt;").replace(/>/g,"&gt;"),O=e=>e.replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/&#0?39;/g,"'").replace(/&quot;/g,'"').replace(/&amp;/g,"&");function R(e,...t){if(typeof e=="string")return g(e);let i=e[0];for(const[n,s]of t.entries())i=i+g(String(s))+e[n+1];return i}function J(e,...t){if(typeof e=="string")return O(e);let i=e[0];for(const[n,s]of t.entries())i=i+O(String(s))+e[n+1];return i}var Z=__webpack_require__("./web_src/js/svg.ts"),C=__webpack_require__("./web_src/js/utils/dom.ts"),we=__webpack_require__("./node_modules/toastify-js/src/toastify.js"),Be=__webpack_require__.n(we);const Ue={info:{icon:"octicon-check",background:"var(--color-green)",duration:2500},warning:{icon:"gitea-exclamation",background:"var(--color-orange)",duration:-1},error:{icon:"gitea-exclamation",background:"var(--color-red)",duration:-1}};function Q(e,t,{gravity:i,position:n,duration:s,useHtmlBody:l,preventDuplicates:u=!0,...m}={}){const y=l?String(e):R(e),A=`${t}-${y}`;if(u){const pe=document.querySelector(`.toastify[data-toast-unique-key="${CSS.escape(A)}"]`);if(pe){const de=pe.querySelector(".toast-duplicate-number");(0,C.fi)(de),de.textContent=String(Number(de.textContent)+1),(0,C.b7)(de,"pulse-1p5-200");return}}const{icon:L,background:z,duration:X}=Ue[t??"info"],_e=Be()({text:`
DesignScreenshot/output/git.buildapp.eu.org_run/git.buildapp.eu.org_4_after_login.html:251:`,"Plugins: https://atomiks.github.io/tippyjs/v6/plugins/"].join(" "))})}var vu=function(){return"innerHTML"};function dc(e,t){e[vu()]=t}function fc(e){var t=Eo();return e===!0?t.className=fl:(t.className=nc,Oa(e)?t.appendChild(e):dc(t,e)),t}function yl(e,t){Oa(t.content)?(dc(e,""),e.appendChild(t.content)):typeof t.content!="function"&&(t.allowHTML?dc(e,t.content):e.textContent=t.content)}function sa(e){var t=e.firstElementChild,i=jo(t.children);return{box:t,content:i.find(function(n){return n.classList.contains(zr)}),arrow:i.find(function(n){return n.classList.contains(fl)||n.classList.contains(nc)}),backdrop:i.find(function(n){return n.classList.contains(dl)})}}function bu(e){var t=Eo(),i=Eo();i.className=ic,i.setAttribute("data-state","hidden"),i.setAttribute("tabindex","-1");var n=Eo();n.className=zr,n.setAttribute("data-state","hidden"),yl(n,e.props),t.appendChild(i),i.appendChild(n),s(e.props,e.props);function s(l,u){var m=sa(t),y=m.box,A=m.content,L=m.arrow;u.theme?y.setAttribute("data-theme",u.theme):y.removeAttribute("data-theme"),typeof u.animation=="string"?y.setAttribute("data-animation",u.animation):y.removeAttribute("data-animation"),u.inertia?y.setAttribute("data-inertia",""):y.removeAttribute("data-inertia"),y.style.maxWidth=typeof u.maxWidth=="number"?u.maxWidth+"px":u.maxWidth,u.role?y.setAttribute("role",u.role):y.removeAttribute("role"),(l.content!==u.content||l.allowHTML!==u.allowHTML)&&yl(A,e.props),u.arrow?L?l.arrow!==u.arrow&&(y.removeChild(L),y.appendChild(fc(u.arrow))):y.appendChild(fc(u.arrow)):L&&y.removeChild(L)}return{popper:t,onUpdate:s}}bu.$$tippy=!0;var Ed=1,wl=[],Sl=[];function Ad(e,t){var i=_l(e,Object.assign({},Kn,Co(Da(t)))),n,s,l,u=!1,m=!1,y=!1,A=!1,L,z,X,_e=[],pe=hl(Pc,i.interactiveDebounce),de,Pe=Ed++,Le=null,Te=uu(i.plugins),He={isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},U={id:Pe,reference:e,popper:Eo(),popperInstance:Le,props:i,state:He,plugins:Te,clearDelayTimeouts:Bc,setProps:$c,setContent:Uc,show:T5,hide:L5,hideWithInteractivity:R5,enable:Bl,disable:Hc,unmount:M5,destroy:D5};if(!i.render)return U;var Se=i.render(U),ze=Se.popper,mt=Se.onUpdate;ze.setAttribute("data-tippy-root",""),ze.id="tippy-"+U.id,U.popper=ze,e._tippy=U,ze._tippy=U;var kt=Te.map(function(ut){return ut.fn(U)}),Kt=e.hasAttribute("aria-expanded");return Ya(),ss(),_s(),ns("onCreate",[U]),i.showOnCreate&&Hl(),ze.addEventListener("mouseenter",function(){U.props.interactive&&U.state.isVisible&&U.clearDelayTimeouts()}),ze.addEventListener("mouseleave",function(){U.props.interactive&&U.props.trigger.indexOf("mouseenter")>=0&&Hi().addEventListener("mousemove",pe)}),U;function gi(){var ut=U.props.touch;return Array.isArray(ut)?ut:[ut,0]}function li(){return gi()[0]==="hold"}function It(){var ut;return!!((ut=U.props.render)!=null&&ut.$$tippy)}function Si(){return de||e}function Hi(){var ut=Si().parentNode;return ut?oc(ut):document}function Qn(){return sa(ze)}function Un(ut){return U.state.isMounted&&!U.state.isVisible||Bs.isTouch||L&&L.type==="focus"?0:ta(U.props.delay,ut?0:1,Kn.delay)}function _s(ut){ut===void 0&&(ut=!1),ze.style.pointerEvents=U.props.interactive&&!ut?"":"none",ze.style.zIndex=""+U.props.zIndex}function ns(ut,ni,xi){if(xi===void 0&&(xi=!0),kt.forEach(function(Zi){Zi[ut]&&Zi[ut].apply(Zi,ni)}),xi){var vn;(vn=U.props)[ut].apply(vn,ni)}}function di(){var ut=U.props.aria;if(ut.content){var ni="aria-"+ut.content,xi=ze.id,vn=en(U.props.triggerTarget||e);vn.forEach(function(Zi){var Xs=Zi.getAttribute(ni);if(U.state.isVisible)Zi.setAttribute(ni,Xs?Xs+" "+xi:xi);else{var Lr=Xs&&Xs.replace(xi,"").trim();Lr?Zi.setAttribute(ni,Lr):Zi.removeAttribute(ni)}})}}function ss(){if(!(Kt||!U.props.aria.expanded)){var ut=en(U.props.triggerTarget||e);ut.forEach(function(ni){U.props.interactive?ni.setAttribute("aria-expanded",U.state.isVisible&&ni===Si()?"true":"false"):ni.removeAttribute("aria-expanded")})}}function Tr(){Hi().removeEventListener("mousemove",pe),wl=wl.filter(function(ut){return ut!==pe})}function Qs(ut){if(!(Bs.isTouch&&(y||ut.type==="mousedown"))){var ni=ut.composedPath&&ut.composedPath()[0]||ut.target;if(!(U.props.interactive&&Ir(ze,ni))){if(en(U.props.triggerTarget||e).some(function(xi){return Ir(xi,ni)})){if(Bs.isTouch||U.state.isVisible&&U.props.trigger.indexOf("click")>=0)return}else ns("onClickOutside",[U,ut]);U.props.hideOnClick===!0&&(U.clearDelayTimeouts(),U.hide(),m=!0,setTimeout(function(){m=!1}),U.state.isMounted||uo())}}}function Nr(){y=!0}function co(){y=!1}function Hr(){var ut=Hi();ut.addEventListener("mousedown",Qs,!0),ut.addEventListener("touchend",Qs,dr),ut.addEventListener("touchstart",co,dr),ut.addEventListener("touchmove",Nr,dr)}function uo(){var ut=Hi();ut.removeEventListener("mousedown",Qs,!0),ut.removeEventListener("touchend",Qs,dr),ut.removeEventListener("touchstart",co,dr),ut.removeEventListener("touchmove",Nr,dr)}function Ga(ut,ni){Qa(ut,function(){!U.state.isVisible&&ze.parentNode&&ze.parentNode.contains(ze)&&ni()})}function fo(ut,ni){Qa(ut,ni)}function Qa(ut,ni){var xi=Qn().box;function vn(Zi){Zi.target===xi&&(Pn(xi,"remove",vn),ni())}if(ut===0)return ni();Pn(xi,"remove",z),Pn(xi,"add",vn),z=vn}function Po(ut,ni,xi){xi===void 0&&(xi=!1);var vn=en(U.props.triggerTarget||e);vn.forEach(function(Zi){Zi.addEventListener(ut,ni,xi),_e.push({node:Zi,eventType:ut,handler:ni,options:xi})})}function Ya(){li()&&(Po("touchstart",Fl,{passive:!0}),Po("touchend",Fc,{passive:!0})),ml(U.props.trigger).forEach(function(ut){if(ut!=="manual")switch(Po(ut,Fl),ut){case"mouseenter":Po("mouseleave",Fc);break;case"focus":Po(Ao?"focusout":"blur",Il);break;case"focusin":Po("focusout",Il);break}})}function qc(){_e.forEach(function(ut){var ni=ut.node,xi=ut.eventType,vn=ut.handler,Zi=ut.options;ni.removeEventListener(xi,vn,Zi)}),_e=[]}function Fl(ut){var ni,xi=!1;if(!(!U.state.isEnabled||Nl(ut)||m)){var vn=((ni=L)==null?void 0:ni.type)==="focus";L=ut,de=ut.currentTarget,ss(),!U.state.isVisible&&jr(ut)&&wl.forEach(function(Zi){return Zi(ut)}),ut.type==="click"&&(U.props.trigger.indexOf("mouseenter")<0||u)&&U.props.hideOnClick!==!1&&U.state.isVisible?xi=!0:Hl(ut),ut.type==="click"&&(u=!xi),xi&&!vn&&_a(ut)}}function Pc(ut){var ni=ut.target,xi=Si().contains(ni)||ze.contains(ni);if(!(ut.type==="mousemove"&&xi)){var vn=Fo().concat(ze).map(function(Zi){var Xs,Lr=Zi._tippy,Ja=(Xs=Lr.popperInstance)==null?void 0:Xs.state;return Ja?{popperRect:Zi.getBoundingClientRect(),popperState:Ja,props:i}:null}).filter(Boolean);ac(vn,ut)&&(Tr(),_a(ut))}}function Fc(ut){var ni=Nl(ut)||U.props.trigger.indexOf("click")>=0&&u;if(!ni){if(U.props.interactive){U.hideWithInteractivity(ut);return}_a(ut)}}function Il(ut){U.props.trigger.indexOf("focusin")<0&&ut.target!==Si()||U.props.interactive&&ut.relatedTarget&&ze.contains(ut.relatedTarget)||_a(ut)}function Nl(ut){return Bs.isTouch?li()!==ut.type.indexOf("touch")>=0:!1}function Ic(){Nc();var ut=U.props,ni=ut.popperOptions,xi=ut.placement,vn=ut.offset,Zi=ut.getReferenceClientRect,Xs=ut.moveTransition,Lr=It()?sa(ze).arrow:null,Ja=Zi?{getBoundingClientRect:Zi,contextElement:Zi.contextElement||Si()}:e,tm={name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(Vc){var Za=Vc.state;if(It()){var O5=Qn(),cd=O5.box;["placement","reference-hidden","escaped"].forEach(function(Wc){Wc==="placement"?cd.setAttribute("data-placement",Za.placement):Za.attributes.popper["data-popper-"+Wc]?cd.setAttribute("data-"+Wc,""):cd.removeAttribute("data-"+Wc)}),Za.attributes.popper={}}}},ya=[{name:"offset",options:{offset:vn}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!Xs}},tm];It()&&Lr&&ya.push({name:"arrow",options:{element:Lr,padding:3}}),ya.push.apply(ya,ni?.modifiers||[]),U.popperInstance=ms(Ja,ze,Object.assign({},ni,{placement:xi,onFirstUpdate:X,modifiers:ya}))}function Nc(){U.popperInstance&&(U.popperInstance.destroy(),U.popperInstance=null)}function ho(){var ut=U.props.appendTo,ni,xi=Si();U.props.interactive&&ut===Fr||ut==="parent"?ni=xi.parentNode:ni=cu(ut,[xi]),ni.contains(ze)||ni.appendChild(ze),U.state.isMounted=!0,Ic()}function Fo(){return jo(ze.querySelectorAll("[data-tippy-root]"))}function Hl(ut){U.clearDelayTimeouts(),ut&&ns("onTrigger",[U,ut]),Hr();var ni=Un(!0),xi=gi(),vn=xi[0],Zi=xi[1];Bs.isTouch&&vn==="hold"&&Zi&&(ni=Zi),ni?n=setTimeout(function(){U.show()},ni):U.show()}function _a(ut){if(U.clearDelayTimeouts(),ns("onUntrigger",[U,ut]),!U.state.isVisible){uo();return}if(!(U.props.trigger.indexOf("mouseenter")>=0&&U.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(ut.type)>=0&&u)){var ni=Un(!1);ni?s=setTimeout(function(){U.state.isVisible&&U.hide()},ni):l=requestAnimationFrame(function(){U.hide()})}}function Bl(){U.state.isEnabled=!0}function Hc(){U.hide(),U.state.isEnabled=!1}function Bc(){clearTimeout(n),clearTimeout(s),cancelAnimationFrame(l)}function $c(ut){if(!U.state.isDestroyed){ns("onBeforeUpdate",[U,ut]),qc();var ni=U.props,xi=_l(e,Object.assign({},ni,Da(ut),{ignoreAttributes:!0}));U.props=xi,Ya(),ni.interactiveDebounce!==xi.interactiveDebounce&&(Tr(),pe=hl(Pc,xi.interactiveDebounce)),ni.triggerTarget&&!xi.triggerTarget?en(ni.triggerTarget).forEach(function(vn){vn.removeAttribute("aria-expanded")}):xi.triggerTarget&&e.removeAttribute("aria-expanded"),ss(),_s(),mt&&mt(ni,xi),U.popperInstance&&(Ic(),Fo().forEach(function(vn){requestAnimationFrame(vn._tippy.popperInstance.forceUpdate)})),ns("onAfterUpdate",[U,ut])}}function Uc(ut){U.setProps({content:ut})}function T5(){var ut=U.state.isVisible,ni=U.state.isDestroyed,xi=!U.state.isEnabled,vn=Bs.isTouch&&!U.props.touch,Zi=ta(U.props.duration,0,Kn.duration);if(!(ut||ni||xi||vn)&&!Si().hasAttribute("disabled")&&(ns("onShow",[U],!1),U.props.onShow(U)!==!1)){if(U.state.isVisible=!0,It()&&(ze.style.visibility="visible"),_s(),Hr(),U.state.isMounted||(ze.style.transition="none"),It()){var Xs=Qn(),Lr=Xs.box,Ja=Xs.content;ps([Lr,Ja],0)}X=function(){var ya;if(!(!U.state.isVisible||A)){if(A=!0,ze.offsetHeight,ze.style.transition=U.props.moveTransition,It()&&U.props.animation){var ld=Qn(),Vc=ld.box,Za=ld.content;ps([Vc,Za],Zi),ia([Vc,Za],"visible")}di(),ss(),pl(Sl,U),(ya=U.popperInstance)==null||ya.forceUpdate(),ns("onMount",[U]),U.props.animation&&It()&&fo(Zi,function(){U.state.isShown=!0,ns("onShown",[U])})}},ho()}}function L5(){var ut=!U.state.isVisible,ni=U.state.isDestroyed,xi=!U.state.isEnabled,vn=ta(U.props.duration,1,Kn.duration);if(!(ut||ni||xi)&&(ns("onHide",[U],!1),U.props.onHide(U)!==!1)){if(U.state.isVisible=!1,U.state.isShown=!1,A=!1,u=!1,It()&&(ze.style.visibility="hidden"),Tr(),uo(),_s(!0),It()){var Zi=Qn(),Xs=Zi.box,Lr=Zi.content;U.props.animation&&(ps([Xs,Lr],vn),ia([Xs,Lr],"hidden"))}di(),ss(),U.props.animation?It()&&Ga(vn,U.unmount):U.unmount()}}function R5(ut){Hi().addEventListener("mousemove",pe),pl(wl,pe),pe(ut)}function M5(){U.state.isVisible&&U.hide(),U.state.isMounted&&(Nc(),Fo().forEach(function(ut){ut._tippy.unmount()}),ze.parentNode&&ze.parentNode.removeChild(ze),Sl=Sl.filter(function(ut){return ut!==U}),U.state.isMounted=!1,ns("onHidden",[U]))}function D5(){U.state.isDestroyed||(U.clearDelayTimeouts(),U.unmount(),qc(),delete e._tippy,U.state.isDestroyed=!0,ns("onDestroy",[U]))}}function oo(e,t){t===void 0&&(t={});var i=Kn.plugins.concat(t.plugins||[]);Sd();var n=Object.assign({},t,{plugins:i}),s=rc(e);if(0)var l,u;var m=s.reduce(function(y,A){var L=A&&Ad(A,n);return L&&y.push(L),y},[]);return Oa(e)?m[0]:m}oo.defaultProps=Kn,oo.setDefaultProps=pu,oo.currentInput=Bs;var am=function(t){var i=t===void 0?{}:t,n=i.exclude,s=i.duration;Sl.forEach(function(l){var u=!1;if(n&&(u=qa(n)?l.reference===n:l.popper===n.popper),!u){var m=l.props.duration;l.setProps({duration:s}),l.hide(),l.state.isDestroyed||l.setProps({duration:m})}})},Cd=Object.assign({},Xl,{effect:function(t){var i=t.state,n={popper:{position:i.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(i.elements.popper.style,n.popper),i.styles=n,i.elements.arrow&&Object.assign(i.elements.arrow.style,n.arrow)}}),kd=function(t,i){var n;i===void 0&&(i={});var s=t,l=[],u=[],m,y=i.overrides,A=[],L=!1;function z(){u=s.map(function(U){return en(U.props.triggerTarget||U.reference)}).reduce(function(U,Se){return U.concat(Se)},[])}function X(){l=s.map(function(U){return U.reference})}function _e(U){s.forEach(function(Se){U?Se.enable():Se.disable()})}function pe(U){return s.map(function(Se){var ze=Se.setProps;return Se.setProps=function(mt){ze(mt),Se.reference===m&&U.setProps(mt)},function(){Se.setProps=ze}})}function de(U,Se){var ze=u.indexOf(Se);if(Se!==m){m=Se;var mt=(y||[]).concat("content").reduce(function(kt,Kt){return kt[Kt]=s[ze].props[Kt],kt},{});U.setProps(Object.assign({},mt,{getReferenceClientRect:typeof mt.getReferenceClientRect=="function"?mt.getReferenceClientRect:function(){var kt;return(kt=l[ze])==null?void 0:kt.getBoundingClientRect()}}))}}_e(!1),X(),z();var Pe={fn:function(){return{onDestroy:function(){_e(!0)},onHidden:function(){m=null},onClickOutside:function(ze){ze.props.showOnCreate&&!L&&(L=!0,m=null)},onShow:function(ze){ze.props.showOnCreate&&!L&&(L=!0,de(ze,l[0]))},onTrigger:function(ze,mt){de(ze,mt.currentTarget)}}}},Le=oo(Eo(),Object.assign({},xo(i,["overrides"]),{plugins:[Pe].concat(i.plugins||[]),triggerTarget:u,popperOptions:Object.assign({},i.popperOptions,{modifiers:[].concat(((n=i.popperOptions)==null?void 0:n.modifiers)||[],[Cd])})})),Te=Le.show;Le.show=function(U){if(Te(),!m&&U==null)return de(Le,l[0]);if(!(m&&U==null)){if(typeof U=="number")return l[U]&&de(Le,l[U]);if(s.indexOf(U)>=0){var Se=U.reference;return de(Le,Se)}if(l.indexOf(U)>=0)return de(Le,U)}},Le.showNext=function(){var U=l[0];if(!m)return Le.show(0);var Se=l.indexOf(m);Le.show(l[Se+1]||U)},Le.showPrevious=function(){var U=l[l.length-1];if(!m)return Le.show(U);var Se=l.indexOf(m),ze=l[Se-1]||U;Le.show(ze)};var He=Le.setProps;return Le.setProps=function(U){y=U.overrides||y,He(U)},Le.setInstances=function(U){_e(!0),A.forEach(function(Se){return Se()}),s=U,_e(!1),X(),z(),A=pe(Le),Le.setProps({triggerTarget:u})},A=pe(Le),Le},a={mouseover:"mouseenter",focusin:"focus",click:"click"};function f(e,t){var i=[],n=[],s=!1,l=t.target,u=xo(t,["target"]),m=Object.assign({},u,{trigger:"manual",touch:!1}),y=Object.assign({touch:Kn.touch},u,{showOnCreate:!0}),A=oo(e,m),L=en(A);function z(Pe){if(!(!Pe.target||s)){var Le=Pe.target.closest(l);if(Le){var Te=Le.getAttribute("data-tippy-trigger")||t.trigger||Kn.trigger;if(!Le._tippy&&!(Pe.type==="touchstart"&&typeof y.touch=="boolean")&&!(Pe.type!=="touchstart"&&Te.indexOf(a[Pe.type])<0)){var He=oo(Le,y);He&&(n=n.concat(He))}}}}function X(Pe,Le,Te,He){He===void 0&&(He=!1),Pe.addEventListener(Le,Te,He),i.push({node:Pe,eventType:Le,handler:Te,options:He})}function _e(Pe){var Le=Pe.reference;X(Le,"touchstart",z,dr),X(Le,"mouseover",z),X(Le,"focusin",z),X(Le,"click",z)}function pe(){i.forEach(function(Pe){var Le=Pe.node,Te=Pe.eventType,He=Pe.handler,U=Pe.options;Le.removeEventListener(Te,He,U)}),i=[]}function de(Pe){var Le=Pe.destroy,Te=Pe.enable,He=Pe.disable;Pe.destroy=function(U){U===void 0&&(U=!0),U&&n.forEach(function(Se){Se.destroy()}),n=[],pe(),Le()},Pe.enable=function(){Te(),n.forEach(function(U){return U.enable()}),s=!1},Pe.disable=function(){He(),n.forEach(function(U){return U.disable()}),s=!0},_e(Pe)}return L.forEach(de),A}var x={name:"animateFill",defaultValue:!1,fn:function(t){var i;if(!((i=t.props.render)!=null&&i.$$tippy))return{};var n=sa(t.popper),s=n.box,l=n.content,u=t.props.animateFill?T():null;return{onCreate:function(){u&&(s.insertBefore(u,s.firstElementChild),s.setAttribute("data-animatefill",""),s.style.overflow="hidden",t.setProps({arrow:!1,animation:"shift-away"}))},onMount:function(){if(u){var y=s.style.transitionDuration,A=Number(y.replace("ms",""));l.style.transitionDelay=Math.round(A/10)+"ms",u.style.transitionDuration=y,ia([u],"visible")}},onShow:function(){u&&(u.style.transitionDuration="0ms")},onHide:function(){u&&ia([u],"hidden")}}}};function T(){var e=Eo();return e.className=dl,ia([e],"hidden"),e}var I={clientX:0,clientY:0},F=[];function ie(e){var t=e.clientX,i=e.clientY;I={clientX:t,clientY:i}}function ae(e){e.addEventListener("mousemove",ie)}function ye(e){e.removeEventListener("mousemove",ie)}var $e={name:"followCursor",defaultValue:!1,fn:function(t){var i=t.reference,n=oc(t.props.triggerTarget||i),s=!1,l=!1,u=!0,m=t.props;function y(){return t.props.followCursor==="initial"&&t.state.isVisible}function A(){n.addEventListener("mousemove",X)}function L(){n.removeEventListener("mousemove",X)}function z(){s=!0,t.setProps({getReferenceClientRect:null}),s=!1}function X(de){var Pe=de.target?i.contains(de.target):!0,Le=t.props.followCursor,Te=de.clientX,He=de.clientY,U=i.getBoundingClientRect(),Se=Te-U.left,ze=He-U.top;(Pe||!t.props.interactive)&&t.setProps({getReferenceClientRect:function(){var kt=i.getBoundingClientRect(),Kt=Te,gi=He;Le==="initial"&&(Kt=kt.left+Se,gi=kt.top+ze);var li=Le==="horizontal"?kt.top:gi,It=Le==="vertical"?kt.right:Kt,Si=Le==="horizontal"?kt.bottom:gi,Hi=Le==="vertical"?kt.left:Kt;return{width:It-Hi,height:Si-li,top:li,right:It,bottom:Si,left:Hi}}})}function _e(){t.props.followCursor&&(F.push({instance:t,doc:n}),ae(n))}function pe(){F=F.filter(function(de){return de.instance!==t}),F.filter(function(de){return de.doc===n}).length===0&&ye(n)}return{onCreate:_e,onDestroy:pe,onBeforeUpdate:function(){m=t.props},onAfterUpdate:function(Pe,Le){var Te=Le.followCursor;s||Te!==void 0&&m.followCursor!==Te&&(pe(),Te?(_e(),t.state.isMounted&&!l&&!y()&&A()):(L(),z()))},onMount:function(){t.props.followCursor&&!l&&(u&&(X(I),u=!1),y()||A())},onTrigger:function(Pe,Le){jr(Le)&&(I={clientX:Le.clientX,clientY:Le.clientY}),l=Le.type==="focus"},onHidden:function(){t.props.followCursor&&(z(),L(),u=!0)}}}};function Fe(e,t){var i;return{popperOptions:Object.assign({},e.popperOptions,{modifiers:[].concat((((i=e.popperOptions)==null?void 0:i.modifiers)||[]).filter(function(n){var s=n.name;return s!==t.name}),[t])})}}var be={name:"inlinePositioning",defaultValue:!1,fn:function(t){var i=t.reference;function n(){return!!t.props.inlinePositioning}var s,l=-1,u=!1,m=[],y={name:"tippyInlinePositioning",enabled:!0,phase:"afterWrite",fn:function(_e){var pe=_e.state;n()&&(m.indexOf(pe.placement)!==-1&&(m=[]),s!==pe.placement&&m.indexOf(pe.placement)===-1&&(m.push(pe.placement),t.setProps({getReferenceClientRect:function(){return A(pe.placement)}})),s=pe.placement)}};function A(X){return it(hr(X),i.getBoundingClientRect(),jo(i.getClientRects()),l)}function L(X){u=!0,t.setProps(X),u=!1}function z(){u||L(Fe(t.props,y))}return{onCreate:z,onAfterUpdate:z,onTrigger:function(_e,pe){if(jr(pe)){var de=jo(t.reference.getClientRects()),Pe=de.find(function(Te){return Te.left-2<=pe.clientX&&Te.right+2>=pe.clientX&&Te.top-2<=pe.clientY&&Te.bottom+2>=pe.clientY}),Le=de.indexOf(Pe);l=Le>-1?Le:l}},onHidden:function(){l=-1}}}};function it(e,t,i,n){if(i.length<2||e===null)return t;if(i.length===2&&n>=0&&i[0].left>i[1].right)return i[n]||t;switch(e){case"top":case"bottom":{var s=i[0],l=i[i.length-1],u=e==="top",m=s.top,y=l.bottom,A=u?s.left:l.left,L=u?s.right:l.right,z=L-A,X=y-m;return{top:m,bottom:y,left:A,right:L,width:z,height:X}}case"left":case"right":{var _e=Math.min.apply(Math,i.map(function(ze){return ze.left})),pe=Math.max.apply(Math,i.map(function(ze){return ze.right})),de=i.filter(function(ze){return e==="left"?ze.left===_e:ze.right===pe}),Pe=de[0].top,Le=de[de.length-1].bottom,Te=_e,He=pe,U=He-Te,Se=Le-Pe;return{top:Pe,bottom:Le,left:Te,right:He,width:U,height:Se}}default:return t}}var dt={name:"sticky",defaultValue:!1,fn:function(t){var i=t.reference,n=t.popper;function s(){return t.popperInstance?t.popperInstance.state.elements.reference:i}function l(A){return t.props.sticky===!0||t.props.sticky===A}var u=null,m=null;function y(){var A=l("reference")?s().getBoundingClientRect():null,L=l("popper")?n.getBoundingClientRect():null;(A&&Ct(u,A)||L&&Ct(m,L))&&t.popperInstance&&t.popperInstance.update(),u=A,m=L,t.state.isMounted&&requestAnimationFrame(y)}return{onMount:function(){t.props.sticky&&y()}}}};function Ct(e,t){return e&&t?e.top!==t.top||e.right!==t.right||e.bottom!==t.bottom||e.left!==t.left:!0}oo.setDefaultProps({render:bu});var Et=oo,Li=__webpack_require__("./web_src/js/utils/time.ts");const hi=new Set,Ut='<svg width="16" height="7"><path d="m0 7 8-7 8 7Z" class="tippy-svg-arrow-outer"/><path d="m0 8 8-7 8 7Z" class="tippy-svg-arrow-inner"/></svg>';function Ie(e,t={}){const{onHide:i,onShow:n,onDestroy:s,role:l,theme:u,arrow:m,...y}=t,A=Et(e,{appendTo:document.body,animation:!1,allowHTML:!1,hideOnClick:!1,interactiveBorder:20,ignoreAttributes:!0,maxWidth:500,onHide:L=>(hi.delete(L),i?.(L)),onDestroy:L=>(hi.delete(L),s?.(L)),onShow:L=>{for(const z of hi)z.props.role==="tooltip"&&z.hide();return hi.add(L),e.setAttribute("aria-controls",L.popper.id),n?.(L)},arrow:m??(u==="bare"?!1:Ut),role:l||"menu",theme:u||l||"default",offset:[0,m?10:6],plugins:[$e],...y});return A.props.role==="menu"&&e.setAttribute("aria-haspopup","true"),A}function ft(e,t=null){if(vt(e),t=t??e.getAttribute("data-tooltip-content"),!t)return null;const n=!e.hasAttribute("data-clipboard-target"),s={content:t,delay:100,role:"tooltip",theme:"tooltip",hideOnClick:n,placement:e.getAttribute("data-tooltip-placement")||"top-start",followCursor:e.getAttribute("data-tooltip-follow-cursor")||!1,...e.getAttribute("data-tooltip-interactive")==="true"?{interactive:!0,aria:{content:"describedby",expanded:!1}}:{}};return e._tippy?e._tippy.setProps(s):Ie(e,s),e._tippy}function vt(e){let t=e.getAttribute("title");if(t){if(e.tagName.toLowerCase()==="relative-time"){const i=e.getAttribute("datetime");i&&(t=(0,Li.Rt)(new Date(i)))}e.setAttribute("data-tooltip-content",t),e.setAttribute("aria-label",t),e.setAttribute("title","")}}function Pt(e){e.target.removeEventListener("mouseover",Pt,!0),ft(this)}function ei(e){if(e.addEventListener("mouseover",Pt,{capture:!0}),!e.hasAttribute("aria-label")){const t=e.getAttribute("data-tooltip-content");t&&e.setAttribute("aria-label",t)}}function ci(e){for(const t of e.querySelectorAll("[data-tooltip-content]"))ei(t)}function Ot(){const e=i=>i.observe(document,{subtree:!0,childList:!0,attributeFilter:["data-tooltip-content","title"]}),t=new MutationObserver((i,n)=>{const s=n.takeRecords();n.disconnect();for(const l of[...i,...s])if(l.type==="childList")for(const u of l.addedNodes)(0,C.NF)(u)&&(ci(u),u.hasAttribute("data-tooltip-content")&&ei(u));else l.type==="attributes"&&ft(l.target);e(n)});e(t),ci(document.documentElement)}function Dt(e,t){let i;const n=e.closest("[data-tippy-root]")?.id;n?(e=document.body,i=document.querySelector(`[aria-controls="${CSS.escape(n)}"]`)?.getBoundingClientRect(),i=i??new DOMRect(0,0,0,0)):(e=e.closest(".ui.dropdown")??e,i=e.getBoundingClientRect());const s=e._tippy??ft(e,t);s.setContent(t),s.setProps({getReferenceClientRect:()=>i}),s.state.isShown||s.show(),s.setProps({onHidden:l=>{ft(e)||l.destroy()}})}var St=__webpack_require__("./web_src/js/utils.ts");async function Ii(e,{reject:t=!1}={}){var i;try{if(Array.isArray(e)){if(!((i=navigator?.clipboard)!=null&&i.write))for(const n of e)typeof n=="string"&&Ni(n);return await navigator.clipboard.write([new ClipboardItem(Object.fromEntries(e.map(n=>[n?.type??"text/plain",n])))]),!0}else{if(e instanceof Blob)return await navigator.clipboard.write([new ClipboardItem({[e.type]:e})]),!0;try{return await navigator.clipboard.writeText(String(e)),!0}catch{return Ni(e)}}}catch(n){if(t)throw n;return!1}}function Ni(e){if(!document.execCommand)return!1;const t=document.createElement("textarea");t.value=String(e),t.style.clipPath="inset(50%)",t.ariaHidden="true",document.body.append(t);try{return t.select(),document.execCommand("copy")}finally{t.remove()}}const{copy_success:un,copy_error:Sn}=window.config.i18n;function ui(){document.addEventListener("click",async e=>{const t=e.target.closest("[data-clipboard-text], [data-clipboard-target]");if(!t)return;e.preventDefault();let i=t.getAttribute("data-clipboard-text");if(i||(i=document.querySelector(t.getAttribute("data-clipboard-target"))?.value),i&&t.getAttribute("data-clipboard-text-type")==="url"&&(i=(0,St.oK)(i)),i){const n=await Ii(i);Dt(t,n?un:Sn)}})}function qi(e){return e.pull_request?e.state==="open"?e.pull_request.draft?"octicon-git-pull-request-draft":"octicon-git-pull-request":e.pull_request.merged?"octicon-git-merge":"octicon-git-pull-request-closed":e.state==="open"?"octicon-issue-opened":"octicon-issue-closed"}function oi(e){return e.pull_request?e.state==="open"?e.pull_request.draft?"grey":"green":e.pull_request.merged?"purple":"red":e.state==="open"?"green":"red"}const Xn={key:0,class:"tw-h-12 tw-w-12 is-loading"},ra={key:1,class:"tw-flex tw-flex-col tw-gap-2"},oa={class:"tw-text-12"},ko={class:"flex-text-block"},Kr={class:"issue-title tw-font-semibold tw-break-anywhere"},hc={class:"index"},_u={key:0},yu=["innerHTML"],aa={key:2,class:"tw-flex tw-flex-col tw-gap-2"},Ia={class:"tw-text-12"};var xl=(0,c.pM)({__name:"ContextPopup",setup(e){const{appSubUrl:t,i18n:i}=window.config,n=(0,Re.KR)(!1),s=(0,Re.KR)(null),l=(0,Re.KR)(""),u=i.error_occurred,m=(0,Re.KR)(null),y=(0,c.EW)(()=>new Date(s.value.created_at).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"})),A=(0,c.EW)(()=>{const X=s.value.body.replace(/\n+/g," ");return X.length>85?`${X.substring(0,85)}\u2026`:X}),L=(0,Re.KR)(null);(0,c.sV)(()=>{L.value.addEventListener("ce-load-context-popup",X=>{!n.value&&s.value===null&&z(X.detail)})});async function z(X){n.value=!0,m.value=null;try{const _e=await(0,Ae.fG)(`${t}/${X.ownerName}/${X.repoName}/issues/${X.indexString}/info`),pe=await _e.json();if(!_e.ok){m.value=pe.message??i.network_error;return}s.value=pe.convertedIssue,l.value=pe.renderedLabels}catch{m.value=i.network_error}finally{n.value=!1}}return(X,_e)=>((0,c.uX)(),(0,c.CE)("div",{ref_key:"root",ref:L},[n.value?((0,c.uX)(),(0,c.CE)("div",Xn)):(0,c.Q3)("v-if",!0),!n.value&&s.value!==null?((0,c.uX)(),(0,c.CE)("div",ra,[(0,c.Lk)("div",oa,(0,W.v_)(s.value.repository.full_name)+" on "+(0,W.v_)(y.value),1),(0,c.Lk)("div",ko,[(0,c.bF)((0,Re.R1)(Z.Ah),{name:(0,Re.R1)(qi)(s.value),class:(0,W.C4)(["text",(0,Re.R1)(oi)(s.value)])},null,8,["name","class"]),(0,c.Lk)("span",Kr,[(0,c.eW)((0,W.v_)(s.value.title)+" ",1),(0,c.Lk)("span",hc,"#"+(0,W.v_)(s.value.number),1)])]),A.value?((0,c.uX)(),(0,c.CE)("div",_u,(0,W.v_)(A.value),1)):(0,c.Q3)("v-if",!0),(0,c.Q3)(" eslint-disable-next-line vue/no-v-html "),s.value.labels.length?((0,c.uX)(),(0,c.CE)("div",{key:1,innerHTML:l.value},null,8,yu)):(0,c.Q3)("v-if",!0)])):(0,c.Q3)("v-if",!0),!n.value&&s.value===null?((0,c.uX)(),(0,c.CE)("div",aa,[(0,c.Lk)("div",Ia,(0,W.v_)((0,Re.R1)(u)),1),(0,c.Lk)("div",null,(0,W.v_)(m.value),1)])):(0,c.Q3)("v-if",!0)],512))}}),To=xl;function jl(){const e=document.querySelectorAll(".ref-issue");la(e)}function la(e){for(const t of e){if(t.classList.contains("ref-external-issue"))continue;const i=(0,St.S3)(t.getAttribute("href"));if(!i.ownerName)continue;const n=document.createElement("div");n.classList.add("tw-p-3"),t.parentNode.insertBefore(n,t.nextSibling);const s=Ai(To);try{s.mount(n)}catch(l){console.error(l),n.textContent="ContextPopup failed to load"}Ie(t,{theme:"default",content:n,placement:"top-start",interactive:!0,role:"dialog",interactiveBorder:5,onShow:()=>{n.firstChild.dispatchEvent(new CustomEvent("ce-load-context-popup",{detail:i}))}})}}function he(){const e=document.querySelector("#git-graph-container");if(!e)return;document.querySelector("#flow-color-monochrome")?.addEventListener("click",()=>{document.querySelector("#flow-color-monochrome").classList.add("active"),document.querySelector("#flow-color-colored")?.classList.remove("active"),e.classList.remove("colored"),e.classList.add("monochrome");const m=new URLSearchParams(window.location.search);m.set("mode","monochrome");const y=m.toString();y?window.history.replaceState({},"",`?${y}`):window.history.replaceState({},"",window.location.pathname);for(const A of document.querySelectorAll(".pagination a")){const L=A.getAttribute("href");if(!L)continue;const z=new URL(L,window.location.href),X=z.searchParams;X.set("mode","monochrome"),z.search=`?${X.toString()}`,A.setAttribute("href",z.href)}}),document.querySelector("#flow-color-colored")?.addEventListener("click",()=>{document.querySelector("#flow-color-colored").classList.add("active"),document.querySelector("#flow-color-monochrome")?.classList.remove("active"),e.classList.add("colored"),e.classList.remove("monochrome");for(const A of document.querySelectorAll(".pagination a")){const L=A.getAttribute("href");if(!L)continue;const z=new URL(L,window.location.href),X=z.searchParams;X.delete("mode"),z.search=`?${X.toString()}`,A.setAttribute("href",z.href)}const m=new URLSearchParams(window.location.search);m.delete("mode");const y=m.toString();y?window.history.replaceState({},"",`?${y}`):window.history.replaceState({},"",window.location.pathname)});const t=new URL(window.location.href),i=t.searchParams,n=()=>{const m=i.toString(),y=new URL(t);y.searchParams.set("div-only","true"),window.history.replaceState({},"",m?`?${m}`:window.location.pathname),document.querySelector("#pagination").innerHTML="",(0,C.y9)("#rel-container"),(0,C.y9)("#rev-container"),(0,C.fi)("#loading-indicator"),(async()=>{const L=await(await(0,Ae.fG)(String(y))).text(),z=document.createElement("div");z.innerHTML=L,document.querySelector("#pagination").innerHTML=z.querySelector("#pagination").innerHTML,document.querySelector("#rel-container").innerHTML=z.querySelector("#rel-container").innerHTML,document.querySelector("#rev-container").innerHTML=z.querySelector("#rev-container").innerHTML,(0,C.y9)("#loading-indicator"),(0,C.fi)("#rel-container"),(0,C.fi)("#rev-container")})()},s=i.getAll("branch");i.has("hide-pr-refs")&&i.get("hide-pr-refs")==="true"&&s.splice(0,0,"...flow-hide-pr-refs");const l=document.querySelector("#flow-select-refs-dropdown"),u=(0,ke.mD)(l);u.dropdown({clearable:!0}),u.dropdown("set selected",s),u.dropdown({onRemove(m){if(m==="...flow-hide-pr-refs")i.delete("hide-pr-refs");else{const y=i.getAll("branch");i.delete("branch");for(const A of y)A!==m&&i.append("branch",A)}n()},onAdd(m){m==="...flow-hide-pr-refs"?i.set("hide-pr-refs","true"):i.append("branch",m),n()}}),e.addEventListener("mouseenter",m=>{if(m.target.matches("#rev-list li")){const y=m.target.getAttribute("data-flow");if(y==="0")return;document.querySelector(`#flow-${y}`)?.classList.add("highlight"),m.target.classList.add("hover");for(const A of document.querySelectorAll(`#rev-list li[data-flow='${y}']`))A.classList.add("highlight")}else if(m.target.matches("#rel-container .flow-group")){m.target.classList.add("highlight");const y=m.target.getAttribute("data-flow");for(const A of document.querySelectorAll(`#rev-list li[data-flow='${y}']`))A.classList.add("highlight")}else if(m.target.matches("#rel-container .flow-commit")){const y=m.target.getAttribute("data-rev");document.querySelector(`#rev-list li#commit-${y}`)?.classList.add("hover")}}),e.addEventListener("mouseleave",m=>{if(m.target.matches("#rev-list li")){const y=m.target.getAttribute("data-flow");if(y==="0")return;document.querySelector(`#flow-${y}`)?.classList.remove("highlight"),m.target.classList.remove("hover");for(const A of document.querySelectorAll(`#rev-list li[data-flow='${y}']`))A.classList.remove("highlight")}else if(m.target.matches("#rel-container .flow-group")){m.target.classList.remove("highlight");const y=m.target.getAttribute("data-flow");for(const A of document.querySelectorAll(`#rev-list li[data-flow='${y}']`))A.classList.remove("highlight")}else if(m.target.matches("#rel-container .flow-commit")){const y=m.target.getAttribute("data-rev");document.querySelector(`#rev-list li#commit-${y}`)?.classList.remove("hover")}})}var Ce=Object.defineProperty,ot=(e,t,i)=>t in e?Ce(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i,wt=(e,t,i)=>(ot(e,typeof t!="symbol"?t+"":t,i),i);const _t=class{constructor(e,t,i){wt(this,"startDate"),wt(this,"endDate"),wt(this,"max"),wt(this,"_values"),wt(this,"_firstFullWeekOfMonths"),wt(this,"_activities"),wt(this,"_calendar"),this.endDate=this.parseDate(e),this.max=i||Math.ceil(Math.max(...t.map(n=>n.count))/5*4),this.startDate=this.shiftDate(e,-_t.DAYS_IN_ONE_YEAR),this._values=t}set values(e){this.max=Math.ceil(Math.max(...e.map(t=>t.count))/5*4),this._values=e,this._firstFullWeekOfMonths=void 0,this._calendar=void 0,this._activities=void 0}get values(){return this._values}get activities(){if(!this._activities){this._activities=new Map;for(let e=0,t=this.values.length;e<t;e++)this._activities.set(this.keyDayParser(this.values[e].date),{count:this.values[e].count,colorIndex:this.getColorIndex(this.values[e].count)})}return this._activities}get weekCount(){return this.getDaysCount()/_t.DAYS_IN_WEEK}get calendar(){if(!this._calendar){let e=this.shiftDate(this.startDate,-this.getCountEmptyDaysAtStart());e=new Date(e.getFullYear(),e.getMonth(),e.getDate()),this._calendar=new Array(this.weekCount);for(let t=0,i=this._calendar.length;t<i;t++){this._calendar[t]=new Array(_t.DAYS_IN_WEEK);for(let n=0;n<_t.DAYS_IN_WEEK;n++){const s=this.activities.get(this.keyDayParser(e));this._calendar[t][n]={date:new Date(e.valueOf()),count:s?s.count:void 0,colorIndex:s?s.colorIndex:0},e.setDate(e.getDate()+1)}}}return this._calendar}get firstFullWeekOfMonths(){if(!this._firstFullWeekOfMonths){const e=this.calendar;this._firstFullWeekOfMonths=[];for(let t=1,i=e.length;t<i;t++){const n=e[t-1][0].date,s=e[t][0].date;(n.getFullYear()<s.getFullYear()||n.getMonth()<s.getMonth())&&this._firstFullWeekOfMonths.push({value:s.getMonth(),index:t})}}return this._firstFullWeekOfMonths}getColorIndex(e){return e==null?0:e<=0?1:e>=this.max?5:Math.ceil(e*100/this.max*.03)+1}getCountEmptyDaysAtStart(){return this.startDate.getDay()}getCountEmptyDaysAtEnd(){return _t.DAYS_IN_WEEK-1-this.endDate.getDay()}getDaysCount(){return _t.DAYS_IN_ONE_YEAR+1+this.getCountEmptyDaysAtStart()+this.getCountEmptyDaysAtEnd()}shiftDate(e,t){const i=new Date(e);return i.setDate(i.getDate()+t),i}parseDate(e){return e instanceof Date?e:new Date(e)}keyDayParser(e){const t=this.parseDate(e);return String(t.getFullYear())+String(t.getMonth()).padStart(2,"0")+String(t.getDate()).padStart(2,"0")}};let lt=_t;wt(lt,"DEFAULT_RANGE_COLOR_LIGHT",["#ebedf0","#dae2ef","#c0ddf9","#73b3f3","#3886e1","#17459e"]),wt(lt,"DEFAULT_RANGE_COLOR_DARK",["#1f1f22","#1e334a","#1d466c","#1d5689","#1d69ac","#1B95D1"]),wt(lt,"DEFAULT_LOCALE",{months:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],days:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],on:"on",less:"Less",more:"More"}),wt(lt,"DEFAULT_TOOLTIP_UNIT","contributions"),wt(lt,"DAYS_IN_ONE_YEAR",365),wt(lt,"DAYS_IN_WEEK",7),wt(lt,"SQUARE_SIZE",10);const Wt=(0,c.pM)({name:"CalendarHeatmap",props:{endDate:{required:!0},max:{type:Number},rangeColor:{type:Array},values:{type:Array,required:!0},locale:{type:Object},tooltip:{type:Boolean,default:!0},tooltipUnit:{type:String,default:lt.DEFAULT_TOOLTIP_UNIT},tooltipFormatter:{type:Function},tippyProps:{type:Object,default:null},vertical:{type:Boolean,default:!1},noDataText:{type:[Boolean,String],default:null},round:{type:Number,default:0},darkMode:Boolean},emits:["dayClick"],setup(e){const t=lt.SQUARE_SIZE/5,i=lt.SQUARE_SIZE+t,n=Math.ceil(lt.SQUARE_SIZE*2.5),s=i*3,l=lt.SQUARE_SIZE+lt.SQUARE_SIZE/2,u=lt.SQUARE_SIZE+lt.SQUARE_SIZE/2,m=`translate(${n}, ${l})`,y=(0,Re.KR)(null),A=(0,Re.KR)(new Date),L=(0,Re.KR)(new lt(e.endDate,e.values,e.max)),z=(0,Re.KR)(0),X=(0,Re.KR)(0),_e=(0,Re.KR)("0 0 0 0"),pe=(0,Re.KR)("0 0 0 0"),de=(0,Re.KR)(""),Pe=(0,Re.KR)(""),Le=(0,Re.KR)(""),Te=(0,Re.KR)({}),He=(0,Re.KR)(e.rangeColor||(e.darkMode?lt.DEFAULT_RANGE_COLOR_DARK:lt.DEFAULT_RANGE_COLOR_LIGHT)),{values:U,tooltipUnit:Se,tooltipFormatter:ze,noDataText:mt,max:kt,vertical:Kt,locale:gi}=(0,Re.QW)(e),li=new Map;let It;function Si(){li.clear(),It?It.setInstances(Array.from(li.values())):It=kd(Array.from(li.values()),{overrides:[],moveTransition:"transform 0.1s ease-out",allowHTML:!0,...e.tippyProps})}function Hi(di){if(e.tooltip){if(di.count!==void 0)return e.tooltipFormatter?e.tooltipFormatter(di,e.tooltipUnit):`<b>${di.count} ${e.tooltipUnit}</b> ${Te.value.on} ${Te.value.months[di.date.getMonth()]} ${di.date.getDate()}, ${di.date.getFullYear()}`;if(e.noDataText)return`${e.noDataText}`;if(e.noDataText!==!1)return`<b>No ${e.tooltipUnit}</b> ${Te.value.on} ${Te.value.months[di.date.getMonth()]} ${di.date.getDate()}, ${di.date.getFullYear()}`}}function Qn(di){return e.vertical?`translate(0, ${i*L.value.weekCount-(di+1)*i})`:`translate(${di*i}, 0)`}function Un(di){return e.vertical?`translate(${di*i}, 0)`:`translate(0, ${di*i})`}function _s(di){return e.vertical?{x:3,y:i*L.value.weekCount-i*di.index-i/4}:{x:i*di.index,y:i-t}}(0,c.wB)([(0,Re.lW)(e,"rangeColor"),(0,Re.lW)(e,"darkMode")],([di,ss])=>{He.value=di||(ss?lt.DEFAULT_RANGE_COLOR_DARK:lt.DEFAULT_RANGE_COLOR_LIGHT)}),(0,c.wB)(Kt,di=>{di?(z.value=n+i*lt.DAYS_IN_WEEK+s,X.value=l+i*L.value.weekCount+t,de.value=`translate(${n}, 0)`,Pe.value=`translate(0, ${l})`):(z.value=n+i*L.value.weekCount+t,X.value=l+i*lt.DAYS_IN_WEEK,de.value=`translate(0, ${l})`,Pe.value=`translate(${n}, 0)`)},{immediate:!0}),(0,c.wB)([z,X],([di,ss])=>_e.value=` 0 0 ${di} ${ss}`,{immediate:!0}),(0,c.wB)([z,X,He],([di,ss,Tr])=>{Le.value=Kt.value?`translate(${n+i*lt.DAYS_IN_WEEK}, ${l})`:`translate(${di-i*Tr.length-30}, ${ss-u})`},{immediate:!0}),(0,c.wB)(gi,di=>Te.value=di?{...lt.DEFAULT_LOCALE,...di}:lt.DEFAULT_LOCALE,{immediate:!0}),(0,c.wB)(He,di=>pe.value=`0 0 ${lt.SQUARE_SIZE*(di.length+1)} ${lt.SQUARE_SIZE}`,{immediate:!0}),(0,c.wB)([U,Se,ze,mt,kt,He],()=>{L.value=new lt(e.endDate,e.values,e.max),li.forEach(di=>di.destroy()),(0,c.dY)(Si)}),(0,c.sV)(Si),(0,c.xo)(()=>{It?.destroy(),li.forEach(di=>di.destroy())});function ns(di){if(It&&di.target&&di.target.classList.contains("vch__day__square")&&di.target.dataset.weekIndex!==void 0&&di.target.dataset.dayIndex!==void 0){const ss=Number(di.target.dataset.weekIndex),Tr=Number(di.target.dataset.dayIndex);if(!isNaN(ss)&&!isNaN(Tr)){const Qs=Hi(L.value.calendar[ss][Tr]);if(Qs){const Nr=li.get(di.target);Nr?Nr.setContent(Qs):Nr||(li.set(di.target,Et(di.target,{content:Qs})),It.setInstances(Array.from(li.values())))}}}}return{SQUARE_BORDER_SIZE:t,SQUARE_SIZE:i,LEFT_SECTION_WIDTH:n,RIGHT_SECTION_WIDTH:s,TOP_SECTION_HEIGHT:l,BOTTOM_SECTION_HEIGHT:u,svg:y,heatmap:L,now:A,width:z,height:X,viewbox:_e,daysLabelWrapperTransform:de,monthsLabelWrapperTransform:Pe,yearWrapperTransform:m,legendWrapperTransform:Le,lo:Te,legendViewbox:pe,curRangeColor:He,getWeekPosition:Qn,getDayPosition:Un,getMonthLabelPosition:_s,initTippyLazy:ns}}}),Ht=(e,t)=>{const i=e.__vccOpts||e;for(const[n,s]of t)i[n]=s;return i},Nt=["viewBox"],Mt=["transform"],bi=["x","y"],Xt=["transform"],ai=["x","y"],wi=["x","y"],zi=["x","y"],yn=["transform"],rn=["x"],$s=["rx","ry","width","height","x","y"],gs=["x","y"],mr=["transform"],Us=["transform"],ca=["rx","ry","transform","width","height","data-week-index","data-day-index","onClick"],mc={class:"vch__legend"},Vs={class:"vch__legend-left"},Er={class:"vch__legend-right"},pc={class:"vch__legend"},lm=["viewBox","height"],cm={class:"vch__legend__wrapper"},um=["rx","ry","width","height","x"];function dm(e,t,i,n,s,l){return(0,c.uX)(),(0,c.CE)("div",{class:(0,W.C4)({vch__container:!0,"dark-mode":e.darkMode})},[((0,c.uX)(),(0,c.CE)("svg",{class:"vch__wrapper",ref:"svg",viewBox:e.viewbox},[(0,c.Lk)("g",{class:"vch__months__labels__wrapper",transform:e.monthsLabelWrapperTransform},[((0,c.uX)(!0),(0,c.CE)(c.FK,null,(0,c.pI)(e.heatmap.firstFullWeekOfMonths,(u,m)=>((0,c.uX)(),(0,c.CE)("text",{class:"vch__month__label",key:m,x:e.getMonthLabelPosition(u).x,y:e.getMonthLabelPosition(u).y},(0,W.v_)(e.lo.months[u.value]),9,bi))),128))],8,Mt),(0,c.Lk)("g",{class:"vch__days__labels__wrapper",transform:e.daysLabelWrapperTransform},[(0,c.Lk)("text",{class:"vch__day__label",x:e.vertical?e.SQUARE_SIZE:0,y:e.vertical?e.SQUARE_SIZE-e.SQUARE_BORDER_SIZE:20},(0,W.v_)(e.lo.days[1]),9,ai),(0,c.Lk)("text",{class:"vch__day__label",x:e.vertical?e.SQUARE_SIZE*3:0,y:e.vertical?e.SQUARE_SIZE-e.SQUARE_BORDER_SIZE:44},(0,W.v_)(e.lo.days[3]),9,wi),(0,c.Lk)("text",{class:"vch__day__label",x:e.vertical?e.SQUARE_SIZE*5:0,y:e.vertical?e.SQUARE_SIZE-e.SQUARE_BORDER_SIZE:69},(0,W.v_)(e.lo.days[5]),9,zi)],8,Xt),e.vertical?((0,c.uX)(),(0,c.CE)("g",{key:0,class:"vch__legend__wrapper",transform:e.legendWrapperTransform},[(0,c.Lk)("text",{x:e.SQUARE_SIZE*1.25,y:"8"},(0,W.v_)(e.lo.less),9,rn),((0,c.uX)(!0),(0,c.CE)(c.FK,null,(0,c.pI)(e.curRangeColor,(u,m)=>((0,c.uX)(),(0,c.CE)("rect",{key:m,rx:e.round,ry:e.round,style:(0,W.Tr)({fill:u}),width:e.SQUARE_SIZE-e.SQUARE_BORDER_SIZE,height:e.SQUARE_SIZE-e.SQUARE_BORDER_SIZE,x:e.SQUARE_SIZE*1.75,y:e.SQUARE_SIZE*(m+1)},null,12,$s))),128)),(0,c.Lk)("text",{x:e.SQUARE_SIZE*1.25,y:e.SQUARE_SIZE*(e.curRangeColor.length+2)-e.SQUARE_BORDER_SIZE},(0,W.v_)(e.lo.more),9,gs)],8,yn)):(0,c.Q3)("",!0),(0,c.Lk)("g",{class:"vch__year__wrapper",transform:e.yearWrapperTransform,onMouseover:t[0]||(t[0]=(...u)=>e.initTippyLazy&&e.initTippyLazy(...u))},[((0,c.uX)(!0),(0,c.CE)(c.FK,null,(0,c.pI)(e.heatmap.calendar,(u,m)=>((0,c.uX)(),(0,c.CE)("g",{class:"vch__month__wrapper",key:m,transform:e.getWeekPosition(m)},[((0,c.uX)(!0),(0,c.CE)(c.FK,null,(0,c.pI)(u,(y,A)=>((0,c.uX)(),(0,c.CE)(c.FK,{key:A},[y.date<e.now?((0,c.uX)(),(0,c.CE)("rect",{key:0,class:"vch__day__square",rx:e.round,ry:e.round,transform:e.getDayPosition(A),width:e.SQUARE_SIZE-e.SQUARE_BORDER_SIZE,height:e.SQUARE_SIZE-e.SQUARE_BORDER_SIZE,style:(0,W.Tr)({fill:e.curRangeColor[y.colorIndex]}),"data-week-index":m,"data-day-index":A,onClick:L=>e.$emit("dayClick",y)},null,12,ca)):(0,c.Q3)("",!0)],64))),128))],8,Us))),128))],40,mr)],8,Nt)),(0,c.Lk)("div",mc,[(0,c.RG)(e.$slots,"legend",{},()=>[(0,c.Lk)("div",Vs,[(0,c.RG)(e.$slots,"vch__legend-left")]),(0,c.Lk)("div",Er,[(0,c.RG)(e.$slots,"legend-right",{},()=>[(0,c.Lk)("div",pc,[(0,c.Lk)("div",null,(0,W.v_)(e.lo.less),1),e.vertical?(0,c.Q3)("",!0):((0,c.uX)(),(0,c.CE)("svg",{key:0,class:"vch__external-legend-wrapper",viewBox:e.legendViewbox,height:e.SQUARE_SIZE-e.SQUARE_BORDER_SIZE},[(0,c.Lk)("g",cm,[((0,c.uX)(!0),(0,c.CE)(c.FK,null,(0,c.pI)(e.curRangeColor,(u,m)=>((0,c.uX)(),(0,c.CE)("rect",{key:m,rx:e.round,ry:e.round,style:(0,W.Tr)({fill:u}),width:e.SQUARE_SIZE-e.SQUARE_BORDER_SIZE,height:e.SQUARE_SIZE-e.SQUARE_BORDER_SIZE,x:e.SQUARE_SIZE*m},null,12,um))),128))])],8,lm)),(0,c.Lk)("div",null,(0,W.v_)(e.lo.more),1)])])])])])],2)}const Su=Ht(Wt,[["render",dm]]);function fm(e){e.component(Su.name,Su)}const F5={install:fm},hm={class:"total-contributions"};var mm=(0,c.pM)({__name:"ActivityHeatmap",props:{values:{},locale:{}},setup(e){const t=["var(--color-secondary-alpha-60)","var(--color-secondary-alpha-60)","var(--color-primary-light-4)","var(--color-primary-light-2)","var(--color-primary)","var(--color-primary-dark-2)","var(--color-primary-dark-4)"],i=(0,Re.KR)(new Date);(0,c.sV)(()=>{const s=document.querySelector(".vch__external-legend-wrapper");s.setAttribute("viewBox","12 0 80 10"),s.style.marginRight="-12px"});function n(s){const l=new URLSearchParams(document.location.search),u=l.get("date"),m=new Date(s.date.getTime()-s.date.getTimezoneOffset()*6e4).toISOString().substring(0,10);u&&u===m?l.delete("date"):l.set("date",m),l.delete("page");const y=l.toString();window.location.search=y.length?`?${y}`:""}return(s,l)=>((0,c.uX)(),(0,c.CE)(c.FK,null,[(0,c.Lk)("div",hm,(0,W.v_)(s.locale.textTotalContributions),1),(0,c.bF)((0,Re.R1)(Su),{locale:s.locale.heatMapLocale,"no-data-text":s.locale.noDataText,"tooltip-unit":s.locale.tooltipUnit,"end-date":i.value,values:s.values,"range-color":t,onDayClick:l[0]||(l[0]=u=>n(u)),"tippy-props":{theme:"tooltip"}},null,8,["locale","no-data-text","tooltip-unit","end-date","values"])],64))}}),pm=mm;function gm(){const e=document.querySelector("#user-heatmap");if(e)try{const t={};for(const{contributions:l,timestamp:u}of JSON.parse(e.getAttribute("data-heatmap-data"))){const m=new Date(u*1e3).toDateString();t[m]=(t[m]||0)+l}const i=Object.keys(t).map(l=>({date:new Date(l),count:t[l]})),n={heatMapLocale:{months:new Array(12).fill(void 0).map((l,u)=>(0,St.z5)(u)),days:new Array(7).fill(void 0).map((l,u)=>(0,St.FS)(u)),on:" - ",more:e.getAttribute("data-locale-more"),less:e.getAttribute("data-locale-less")},tooltipUnit:"contributions",textTotalContributions:e.getAttribute("data-locale-total-contributions"),noDataText:e.getAttribute("data-locale-no-contributions")};Ai(pm,{values:i,locale:n}).mount(e),e.classList.remove("is-loading")}catch(t){console.error("Heatmap failed to load",t),e.textContent="Heatmap failed to load"}}var vm=Object.defineProperty,bm=(e,t,i)=>t in e?vm(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i,Td=(e,t,i)=>bm(e,typeof t!="symbol"?t+"":t,i);function _m(e,t){const l=(0,St.a8)(e,"image/svg+xml").documentElement,u=l?.width?.baseVal,m=l?.height?.baseVal;if(u===void 0||m===void 0)return null;if(u.unitType===SVGLength.SVG_LENGTHTYPE_PERCENTAGE||m.unitType===SVGLength.SVG_LENGTHTYPE_PERCENTAGE){const y=new Image;if(y.src=t,y.width>1&&y.width<99999&&y.height>1&&y.height<99999)return{width:y.width,height:y.height};if(l.hasAttribute("viewBox")){const A=l.viewBox.baseVal;return{width:300,height:300*A.width/A.height}}return{width:300,height:300}}return null}function xu(e,t){const i={width:e?.width||0,height:e?.height||0},n={width:t?.width||0,height:t?.height||0},s={width:Math.max(n.width,i.width),height:Math.max(n.height,i.height)};return{imageAfter:e,imageBefore:t,sizeAfter:i,sizeBefore:n,maxSize:s,ratio:[Math.floor(s.width-i.width)/2,Math.floor(s.height-i.height)/2,Math.floor(s.width-n.width)/2,Math.floor(s.height-n.height)/2]}}class ym{constructor(){Td(this,"containerEl"),Td(this,"diffContainerWidth")}async init(t){this.containerEl=t,t.setAttribute("data-image-diff-loaded","true"),(0,ke.mD)(t).find(".ui.menu.tabular .item").tab(),this.diffContainerWidth=Math.max(t.closest(".diff-file-box").clientWidth-300,100);const i=[{path:t.getAttribute("data-path-after"),mime:t.getAttribute("data-mime-after"),images:t.querySelectorAll("img.image-after"),boundsInfo:t.querySelector(".bounds-info-after")},{path:t.getAttribute("data-path-before"),mime:t.getAttribute("data-mime-before"),images:t.querySelectorAll("img.image-before"),boundsInfo:t.querySelector(".bounds-info-before")}];await Promise.all(i.map(async l=>{const[u]=await Promise.all(Array.from(l.images,m=>(0,C.QW)(m,l.path)));if(!u&&l.boundsInfo&&(l.boundsInfo.textContent="(image error)"),l.mime==="image/svg+xml"){const y=await(await(0,Ae.fG)(l.path)).text(),A=_m(y,l.path);if(A){for(const L of l.images)L.setAttribute("width",String(A.width)),L.setAttribute("height",String(A.height));(0,C.y9)(l.boundsInfo)}}}));const n=i[0].images,s=i[1].images;this.initSideBySide(xu(n[0],s[0])),n.length>0&&s.length>0&&(this.initSwipe(xu(n[1],s[1])),this.initOverlay(xu(n[2],s[2]))),(0,C.xP)(t,".image-diff-tabs",l=>l.classList.remove("is-loading"))}initSideBySide(t){let i=1;t.maxSize.width>(this.diffContainerWidth-24)/2&&(i=(this.diffContainerWidth-24)/2/t.maxSize.width);const n=t.imageAfter&&t.imageBefore&&t.imageAfter.naturalWidth!==t.imageBefore.naturalWidth,s=t.imageAfter&&t.imageBefore&&t.imageAfter.naturalHeight!==t.imageBefore.naturalHeight;if(t.imageAfter){const l=this.containerEl.querySelector(".bounds-info-after .bounds-info-width");l&&(l.textContent=`${t.imageAfter.naturalWidth}px`,l.classList.toggle("green",n));const u=this.containerEl.querySelector(".bounds-info-after .bounds-info-height");u&&(u.textContent=`${t.imageAfter.naturalHeight}px`,u.classList.toggle("green",s))}if(t.imageBefore){const l=this.containerEl.querySelector(".bounds-info-before .bounds-info-width");l&&(l.textContent=`${t.imageBefore.naturalWidth}px`,l.classList.toggle("red",n));const u=this.containerEl.querySelector(".bounds-info-before .bounds-info-height");u&&(u.textContent=`${t.imageBefore.naturalHeight}px`,u.classList.toggle("red",s))}if(t.imageAfter){const l=t.imageAfter.parentNode;t.imageAfter.style.width=`${t.sizeAfter.width*i}px`,t.imageAfter.style.height=`${t.sizeAfter.height*i}px`,l.style.margin="10px auto",l.style.width=`${t.sizeAfter.width*i+2}px`,l.style.height=`${t.sizeAfter.height*i+2}px`}if(t.imageBefore){const l=t.imageBefore.parentNode;t.imageBefore.style.width=`${t.sizeBefore.width*i}px`,t.imageBefore.style.height=`${t.sizeBefore.height*i}px`,l.style.margin="10px auto",l.style.width=`${t.sizeBefore.width*i+2}px`,l.style.height=`${t.sizeBefore.height*i+2}px`}}initSwipe(t){let i=1;if(t.maxSize.width>this.diffContainerWidth-12&&(i=(this.diffContainerWidth-12)/t.maxSize.width),t.imageAfter){const s=t.imageAfter.parentNode,l=s.parentNode;t.imageAfter.style.width=`${t.sizeAfter.width*i}px`,t.imageAfter.style.height=`${t.sizeAfter.height*i}px`,s.style.margin=`0px ${t.ratio[0]*i}px`,s.style.width=`${t.sizeAfter.width*i+2}px`,s.style.height=`${t.sizeAfter.height*i+2}px`,l.style.padding=`${t.ratio[1]*i}px 0 0 0`,l.style.width=`${t.maxSize.width*i+2}px`}if(t.imageBefore){const s=t.imageBefore.parentNode,l=s.parentNode;t.imageBefore.style.width=`${t.sizeBefore.width*i}px`,t.imageBefore.style.height=`${t.sizeBefore.height*i}px`,s.style.margin=`${t.ratio[3]*i}px ${t.ratio[2]*i}px`,s.style.width=`${t.sizeBefore.width*i+2}px`,s.style.height=`${t.sizeBefore.height*i+2}px`,l.style.width=`${t.maxSize.width*i+2}px`,l.style.height=`${t.maxSize.height*i+2}px`}const n=this.containerEl.querySelector(".diff-swipe");n&&(n.style.width=`${t.maxSize.width*i+2}px`,n.style.height=`${t.maxSize.height*i+30}px`),this.containerEl.querySelector(".swipe-bar").addEventListener("mousedown",s=>{s.preventDefault(),this.initSwipeEventListeners(s.currentTarget)})}initSwipeEventListeners(t){const i=t.parentNode,n=i.clientWidth,s=u=>{u.preventDefault();const m=i.getBoundingClientRect(),y=Math.max(0,Math.min(u.clientX-m.left,n));t.style.left=`${y}px`,this.containerEl.querySelector(".swipe-container").style.width=`${i.clientWidth-y}px`},l=()=>{document.removeEventListener("mousemove",s),document.removeEventListener("mouseup",l)};document.addEventListener("mousemove",s),document.addEventListener("mouseup",l)}initOverlay(t){let i=1;if(t.maxSize.width>this.diffContainerWidth-12&&(i=(this.diffContainerWidth-12)/t.maxSize.width),t.imageAfter){const l=t.imageAfter.parentNode;t.imageAfter.style.width=`${t.sizeAfter.width*i}px`,t.imageAfter.style.height=`${t.sizeAfter.height*i}px`,l.style.margin=`${t.ratio[1]*i}px ${t.ratio[0]*i}px`,l.style.width=`${t.sizeAfter.width*i+2}px`,l.style.height=`${t.sizeAfter.height*i+2}px`}if(t.imageBefore){const l=t.imageBefore.parentNode,u=l.parentNode;t.imageBefore.style.width=`${t.sizeBefore.width*i}px`,t.imageBefore.style.height=`${t.sizeBefore.height*i}px`,l.style.margin=`${t.ratio[3]*i}px ${t.ratio[2]*i}px`,l.style.width=`${t.sizeBefore.width*i+2}px`,l.style.height=`${t.sizeBefore.height*i+2}px`,u.style.width=`${t.maxSize.width*i+2}px`,u.style.height=`${t.maxSize.height*i+2}px`}const n=this.containerEl.querySelector('input[type="range"]');function s(){t.imageAfter&&(t.imageAfter.parentNode.style.opacity=`${Number(n.value)/100}`)}n?.addEventListener("input",s),s()}}function Ld(){for(const e of(0,C.jB)(document,".image-diff:not([data-image-diff-loaded])"))new ym().init(e)}const wm=(e,t)=>{const i=e.__vccOpts||e;for(const[n,s]of t)i[n]=s;return i},Sm={props:{title:{type:String,default:""},points:{type:Array,default:()=>[]},height:{type:Number,default:100},width:{type:Number,default:300},showYAxis:{type:Boolean,default:!1},showXAxis:{type:Boolean,default:!1},labelHeight:{type:Number,default:12},showTrendLine:{type:Boolean,default:!1},trendLineColor:{type:String,default:"green"},trendLineWidth:{type:Number,default:2},easeIn:{type:Boolean,default:!0},showValues:{type:Boolean,default:!1},maxYAxis:{type:Number,default:0},animationDuration:{type:Number,default:.5},barColor:{type:String,default:"deepskyblue"},textColor:{type:String,default:"black"},textAltColor:{type:String,default:"black"},textFont:{type:String,default:"10px sans-serif"},useCustomLabels:{type:Boolean,default:!1},customLabels:{type:Array,default:()=>[]}},data(){return{dynamicPoints:[],staticPoints:[],extraTopHeightForYAxisLabel:4,extraBottomHeightForYAxisLabel:4,digitsUsedInYAxis:0}},computed:{usingObjectsForDataPoints(){return this.points.every(e=>typeof e=="object")},dataPoints(){return this.usingObjectsForDataPoints?this.points.map(e=>e.value):this.points},dataLabels(){return this.points.map((e,t)=>this.useCustomLabels?this.customLabels[t]:this.usingObjectsForDataPoints?e.label:t+1)},dataColors(){return this.points.map(e=>({barColor:e&&e.barColor?e.barColor:this.barColor,textColor:e&&e.textColor?e.textColor:this.textColor,textAltColor:e&&e.textAltColor?e.textAltColor:this.textAltColor}))},yAxisWidth(){return this.digitsUsedInYAxis*5.8+5},xAxisHeight(){return this.showYAxis?this.labelHeight:this.labelHeight+this.extraBottomHeightForYAxisLabel+this.extraTopHeightForYAxisLabel},fullSvgWidth(){return this.width},fullSvgHeight(){return this.height},innerChartWidth(){return this.showYAxis?this.width-this.yAxisWidth:this.width},innerChartHeight(){let e=this.height;return this.showYAxis&&(e-=this.extraTopHeightForYAxisLabel+this.extraBottomHeightForYAxisLabel),this.showXAxis&&(e-=this.xAxisHeight),e},partitionWidth(){return this.innerChartWidth/this.dataPoints.length},maxDomain(){return this.maxYAxis?this.maxYAxis:Math.ceil(Math.max(...this.dataPoints))},chartData(){return this.dynamicPoints.map((e,t)=>({staticValue:this.staticPoints[t],index:t,label:this.dataLabels[t],width:this.partitionWidth-2,midPoint:this.partitionWidth/2,yLabel:this.innerChartHeight+4,x:t*this.partitionWidth,xMidpoint:t*this.partitionWidth+this.partitionWidth/2,yOffset:this.innerChartHeight-this.y(e),height:this.y(e),barColor:this.dataColors[t].barColor,textColor:this.dataColors[t].textColor,textAltColor:this.dataColors[t].textAltColor}))},trendLine(){const e=this.applySlope(this.dynamicPoints);return{x1:this.partitionWidth/2,y1:this.roundTo(this.innerChartHeight-this.y(e[0]),2),x2:this.innerChartWidth-this.partitionWidth/2,y2:this.roundTo(this.innerChartHeight-this.y(e[e.length-1]),2)}}},watch:{dataPoints:{handler(e){this.tween(e)},deep:!0}},created(){this.easeIn?this.tween(this.dataPoints):(this.dynamicPoints=this.dataPoints,this.staticPoints=this.dataPoints)},methods:{y(e){return e/this.maxDomain*this.innerChartHeight},roundTo(e,t=0){let i=!1,n=e;n<0&&(i=!0,n*=-1);const s=10**t;return n=parseFloat((n*s).toFixed(11)),n=(Math.round(n)/s).toFixed(2),i&&(n=(n*-1).toFixed(2)),n},easeInFunc(e){return 1-Math.cos(e*(Math.PI/2))},tween(e){this.staticPoints=e,this.dynamicPoints=Array(e.length).fill(0);const t=this.dynamicPoints,i=200,n=10;let s=new Date().getTime(),l=setInterval(()=>{if(this.dynamicPoints!==t){clearInterval(l);return}let u=(new Date().getTime()-s)/i;if(u=u<0?1:Math.min(u,1),u>=1){clearInterval(l),this.dynamicPoints=e;return}for(let m=0;m<t.length;m+=1)this.dynamicPoints[m]=this.easeInFunc(u)*e[m]},n)},getTicks(){for(let e=6;e>0;e-=1)if(this.maxDomain%e===0){const t=e<3,i=t?3:e;return this.digitsUsedInYAxis=this.maxDomain.toFixed(t?1:0).replace(".","").length,[...new Array(i+1)].map((n,s)=>{const l=this.maxDomain/i*(i-s),u=this.innerChartHeight/i*s;return{key:s,text:t?l.toFixed(1):l,yText:u<10?10:u+4,x1:this.yAxisWidth-4,y1:u,x2:this.yAxisWidth-1,y2:u}})}return[]},applySlope(e){let t=0,i=0;for(let y=0;y<e.length;y+=1)t+=y,i+=e[y];t/=e.length,i/=e.length;let n=0,s=0;for(let y=0;y<e.length;y+=1)n+=(y-t)*(e[y]-i),s+=(y-t)**2;const l=n/s,u=i-l*t,m=[];for(let y=0;y<e.length;y+=1)m.push(l*y+u);return m}}},xm=["width","height"],jm={key:0,id:"title"},Em=["transform"],Am=["transform","width","height"],Cm=["transform"],km=["width","height","y"],Tm=["x","y","dy"],Lm={key:1},Rm=["x","y"],Mm=["x1","x2","y1","y2"],Dm=["x1","y1","x2","y2","stroke-width","stroke"],Om={key:0},qm=["x1","x2","y1","y2"],Pm={key:1},Fm=["x1","x2","y1"],Im=["x1","y1","x2","y2"],Nm=["y"];function Hm(e,t,i,n,s,l){return(0,c.uX)(),(0,c.CE)("svg",{width:l.fullSvgWidth,height:l.fullSvgHeight,"aria-labelledby":"title",role:"img"},[i.title?((0,c.uX)(),(0,c.CE)("title",jm,(0,W.v_)(i.title),1)):(0,c.Q3)("",!0),(0,c.Lk)("g",{transform:`translate(0,${i.showYAxis?s.extraTopHeightForYAxisLabel:0})`},[(0,c.Lk)("g",{transform:`translate(${i.showYAxis?l.yAxisWidth:0},0)`,width:l.innerChartWidth,height:l.innerChartHeight},[((0,c.uX)(!0),(0,c.CE)(c.FK,null,(0,c.pI)(l.chartData,u=>((0,c.uX)(),(0,c.CE)("g",{key:u.index,transform:`translate(${u.x},0)`},[(0,c.Lk)("title",null,[(0,c.RG)(e.$slots,"title",{bar:u},()=>[(0,c.Lk)("tspan",null,(0,W.v_)(u.staticValue),1)])]),(0,c.Lk)("rect",{width:u.width,height:u.height,x:2,y:u.yOffset,style:(0,W.Tr)({fill:u.barColor})},null,12,km),i.showValues?((0,c.uX)(),(0,c.CE)("text",{key:0,x:u.midPoint,y:u.yOffset,dy:`${u.height<22?"-5px":"15px"}`,"text-anchor":"middle",style:(0,W.Tr)({fill:u.height<22?u.textColor:u.textAltColor,font:i.textFont})},(0,W.v_)(u.staticValue),13,Tm)):(0,c.Q3)("",!0),i.showXAxis?((0,c.uX)(),(0,c.CE)("g",Lm,[(0,c.RG)(e.$slots,"label",{bar:u,textStyle:{fill:i.textColor,font:i.textFont}},()=>[(0,c.Lk)("text",{x:u.midPoint,y:`${u.yLabel+10}px`,"text-anchor":"middle",style:(0,W.Tr)({fill:i.textColor,font:i.textFont})},(0,W.v_)(u.label),13,Rm)]),(0,c.Lk)("line",{x1:u.midPoint,x2:u.midPoint,y1:l.innerChartHeight+3,y2:l.innerChartHeight,stroke:"#555555","stroke-width":"1"},null,8,Mm)])):(0,c.Q3)("",!0)],8,Cm))),128)),i.showTrendLine?((0,c.uX)(),(0,c.CE)("line",{key:0,x1:l.trendLine.x1,y1:l.trendLine.y1,x2:l.trendLine.x2,y2:l.trendLine.y2,"stroke-width":i.trendLineWidth,stroke:i.trendLineColor},null,8,Dm)):(0,c.Q3)("",!0)],8,Am),i.showXAxis?((0,c.uX)(),(0,c.CE)("g",Om,[(0,c.Lk)("line",{x1:i.showYAxis?l.yAxisWidth-1:2,x2:l.innerChartWidth+l.yAxisWidth,y1:l.innerChartHeight,y2:l.innerChartHeight,stroke:"#555555","stroke-width":"1"},null,8,qm)])):(0,c.Q3)("",!0),i.showYAxis?((0,c.uX)(),(0,c.CE)("g",Pm,[(0,c.Lk)("line",{x1:l.yAxisWidth-1,x2:l.yAxisWidth-1,y1:l.innerChartHeight,y2:"0",stroke:"#555555","stroke-width":"1"},null,8,Fm),((0,c.uX)(!0),(0,c.CE)(c.FK,null,(0,c.pI)(l.getTicks(),u=>((0,c.uX)(),(0,c.CE)("g",{key:u.key},[(0,c.Lk)("line",{x1:u.x1,y1:u.y1,x2:u.x2,y2:u.y2,stroke:"#555555","stroke-width":"1"},null,8,Im),(0,c.Lk)("text",{x:"0",y:u.yText,"alignment-baseline":"central",style:(0,W.Tr)({fill:i.textColor,font:i.textFont})},(0,W.v_)(u.text),13,Nm)]))),128))])):(0,c.Q3)("",!0)],8,Em)],8,xm)}const Rd=wm(Sm,[["render",Hm]]);function ju(e){ju.installed||(ju.installed=!0,e.component("VueBarGraph",Rd))}const Bm={install:ju};let gc=null;typeof window<"u"?gc=window.Vue:typeof __webpack_require__.g<"u"&&(gc=__webpack_require__.g.Vue),gc&&gc.use(Bm);const $m=["href"],Um=["x","y","href"],Vm=["x","y","href"],Wm={key:0};var zm=(0,c.pM)({__name:"RepoActivityTopAuthors",setup(e){const t=(0,Re.KR)({barColor:"green",textColor:"black",textAltColor:"white"}),i=window.config.pageData.repoActivityTopAuthors||[],n=(0,c.EW)(()=>i.map(y=>({value:y.commits,label:y.name}))),s=(0,c.EW)(()=>i.map((y,A)=>({position:A+1,...y}))),l=(0,c.EW)(()=>i.length*40),u=(0,Re.KR)(null),m=(0,Re.KR)(null);return(0,c.sV)(()=>{const y=window.getComputedStyle(u.value),A=window.getComputedStyle(m.value);t.value={barColor:y.backgroundColor,textColor:y.color,textAltColor:A.color}}),(y,A)=>((0,c.uX)(),(0,c.CE)("div",null,[(0,c.Lk)("div",{class:"activity-bar-graph",ref_key:"styleElement",ref:u,style:{width:"0",height:"0"}},null,512),(0,c.Lk)("div",{class:"activity-bar-graph-alt",ref_key:"altStyleElement",ref:m,style:{width:"0",height:"0"}},null,512),(0,c.bF)((0,Re.R1)(Rd),{points:n.value,"show-x-axis":!0,"show-y-axis":!1,"show-values":!0,width:l.value,"bar-color":t.value.barColor,"text-color":t.value.textColor,"text-alt-color":t.value.textAltColor,height:100,"label-height":20},{label:(0,c.k6)(L=>[((0,c.uX)(!0),(0,c.CE)(c.FK,null,(0,c.pI)(s.value,(z,X)=>((0,c.uX)(),(0,c.CE)("g",{key:z.position},[L.bar.index===X&&z.home_link?((0,c.uX)(),(0,c.CE)("a",{key:0,href:z.home_link},[(0,c.Lk)("image",{x:`${L.bar.midPoint-10}px`,y:`${L.bar.yLabel}px`,height:"20",width:"20",href:z.avatar_link},null,8,Um)],8,$m)):L.bar.index===X?((0,c.uX)(),(0,c.CE)("image",{key:1,x:`${L.bar.midPoint-10}px`,y:`${L.bar.yLabel}px`,height:"20",width:"20",href:z.avatar_link},null,8,Vm)):(0,c.Q3)("v-if",!0)]))),128))]),title:(0,c.k6)(L=>[((0,c.uX)(!0),(0,c.CE)(c.FK,null,(0,c.pI)(s.value,(z,X)=>((0,c.uX)(),(0,c.CE)("tspan",{key:z.position},[L.bar.index===X?((0,c.uX)(),(0,c.CE)("tspan",Wm,(0,W.v_)(z.name),1)):(0,c.Q3)("v-if",!0)]))),128))]),_:1},8,["points","width","bar-color","text-color","text-alt-color"])]))}}),Km=zm,pr=__webpack_require__("./web_src/js/utils/url.ts");async function Xm(e){e.preventDefault();const t=e.target.closest("a.archive-link[href]"),i=t.closest(".ui.dropdown")??t;i.classList.add("is-loading","loading-icon-2px");try{for(let n=0;;n++){const s=await(0,Ae.LO)(t.href);if(!s.ok)throw new Error(`Invalid server response: ${s.status}`);if((await s.json()).complete)break;await(0,St.yy)(Math.min((n+1)*750,2e3))}window.location.href=t.href}catch(n){console.error(n),gt(`Failed to download the archive: ${n}`,{duration:2500})}finally{i.classList.remove("is-loading","loading-icon-2px")}}function Gm(){(0,C.jB)(document,"a.archive-link[href]",e=>e.addEventListener("click",Xm))}function Qm(){const e=document.querySelector("#repo-activity-top-authors-chart");e&&Ai(Km).mount(e)}function Ym(e,t){const i=e.indexOf("{url}");if(i===-1)return e;const n=e.indexOf("?"),s=n>=0&&n<i;return e.replace("{url}",s?encodeURIComponent(t):t)}function Md(e){const t=e.querySelector(".repo-clone-url"),i=e.querySelector(".repo-clone-https"),n=e.querySelector(".repo-clone-ssh"),s=e.querySelector(".repo-clone-tea"),l=function(){let u=localStorage.getItem("repo-clone-protocol");["https","ssh","tea"].includes(u)||(u="https"),u==="tea"&&!s&&(u="https"),u==="https"&&!i?u="ssh":u==="ssh"&&!n&&(u="https");const m=u==="https",y=u==="ssh",A=u==="tea";i&&(i.textContent=window.origin.split(":")[0].toUpperCase(),i.classList.toggle("active",m)),n&&n.classList.toggle("active",y),s&&s.classList.toggle("active",A);let L;if(m?L=i:y?L=n:A&&(L=s),!L)return;const z=(0,pr.BZ)(L.getAttribute("data-link"));for(const X of document.querySelectorAll(".js-clone-url"))X.nodeName==="INPUT"?X.value=z:X.textContent=z;for(const X of e.querySelectorAll(".js-clone-url-editor"))X.href=Ym(X.getAttribute("data-href-template"),z)};l(),i?.addEventListener("click",()=>{localStorage.setItem("repo-clone-protocol","https"),l()}),n?.addEventListener("click",()=>{localStorage.setItem("repo-clone-protocol","ssh"),l()}),s?.addEventListener("click",()=>{localStorage.setItem("repo-clone-protocol","tea"),l()}),t.addEventListener("focus",()=>{t.select()})}function Jm(e){const t=e.nextElementSibling;Md(t),Ie(e,{content:t,trigger:"click",placement:"bottom-end",interactive:!0,hideOnClick:!0,arrow:!1})}function Zm(){(0,C.jB)(document,".js-btn-clone-panel",Jm),(0,C.jB)(document,".clone-buttons-combo",Md)}async function ep(e,t,i,n){try{if(!(await(0,Ae.LO)(e,{data:new URLSearchParams({action:t,issue_ids:i,id:n})})).ok)throw new Error("Failed to update issues meta")}catch(s){console.error(s)}}function Dd(e){e=e.trim().replace(/[^-.\w]/g,"-");for(let t="";t!==e;){t=e,e=e.replace(/\.+$/g,""),e=e.replace(/\.{2,}/g,".");for(const i of[".git",".wiki",".rss",".atom"])e.endsWith(i)&&(e=e.substring(0,e.length-i.length))}return[".","..","-"].includes(e)&&(e=""),e}const Eu=document.querySelector("#service_type"),Od=document.querySelector("#auth_username"),qd=document.querySelector("#auth_password"),Pd=document.querySelector("#auth_token"),Fd=document.querySelector("#mirror"),Au=document.querySelector("#lfs"),tp=document.querySelector("#lfs_settings"),Id=document.querySelector("#lfs_endpoint"),Cu=document.querySelectorAll("#migrate_items input[type=checkbox]");function ip(){np(),Nd(),Od?.addEventListener("input",()=>{El(!1)}),qd?.addEventListener("input",()=>{El(!1)}),Pd?.addEventListener("input",()=>{El(!0)}),Fd?.addEventListener("change",()=>{El(!0)}),document.querySelector("#lfs_settings_show")?.addEventListener("click",i=>{i.preventDefault(),i.stopPropagation(),(0,C.fi)(Id)}),Au?.addEventListener("change",Nd);const e=document.querySelector("#clone_addr"),t=document.querySelector("#repo_name");if(e&&t){let i=!1;t.addEventListener("input",()=>{i=!0}),e.addEventListener("input",()=>{if(i)return;let n=e.value.split(/[?#]/)[0];const s=/^(.*\/)?((.+?)\/?)$/.exec(n);if(!s||s.length<4){t.value="";return}n=s[3].split(/[?#]/)[0],t.value=Dd(n)})}}function np(){if(!Eu)return;const e=Number(Eu.value);El(e!==1)}function El(e){let t=!1;if(e?t=Pd?.value!=="":t=Od?.value!==""||qd?.value!=="",t&&Number(Eu?.value)>1){if(Fd?.checked){for(const i of Cu)i.disabled=i.name!=="wiki";return}for(const i of Cu)i.disabled=!1}else for(const i of Cu)i.disabled=!0}function Nd(){if(!Au)return;const e=Au.checked;(0,C.oi)(tp,e),(0,C.y9)(Id)}var sp=__webpack_require__("./web_src/js/utils/color.ts");async function vc(e,t={}){const{Sortable:i}=await __webpack_require__.e("sortablejs").then(__webpack_require__.bind(__webpack_require__,"./node_modules/sortablejs/modular/sortable.esm.js"));return new i(e,{animation:150,ghostClass:"card-ghost",onChoose:n=>{(t.handle?n.item.querySelector(t.handle):n.item).classList.add("tw-cursor-grabbing"),t.onChoose?.(n)},onUnchoose:n=>{(t.handle?n.item.querySelector(t.handle):n.item).classList.remove("tw-cursor-grabbing"),t.onUnchoose?.(n)},...t})}function Hd(e){const t=e.parentElement,i=t.querySelectorAll(".issue-card").length;t.querySelector(".project-column-issue-count").textContent=String(i)}async function Bd({item:e,from:t,to:i,oldIndex:n}){const s=i.querySelectorAll(".issue-card");Hd(t),Hd(i);const l={issues:Array.from(s,(u,m)=>({issueID:parseInt(u.getAttribute("data-issue")),sorting:m}))};try{await(0,Ae.LO)(`${i.getAttribute("data-url")}/move`,{data:l})}catch(u){console.error(u),t.insertBefore(e,t.children[n])}}async function rp(){const e=document.querySelector("#project-board");let t=e.querySelectorAll(".project-column");vc(e,{group:"project-column",draggable:".project-column",handle:".project-column-header",delayOnTouchOnly:!0,delay:500,onSort:async()=>{t=e.querySelectorAll(".project-column");const i={columns:Array.from(t,(n,s)=>({columnID:parseInt(n.getAttribute("data-id")),sorting:s}))};try{await(0,Ae.LO)(e.getAttribute("data-url"),{data:i})}catch(n){console.error(n)}}});for(const i of t){const n=i.querySelector(".cards");vc(n,{group:"shared",onAdd:Bd,onUpdate:Bd,delayOnTouchOnly:!0,delay:500})}}function op(e){const t=document.querySelector(".ui.modal#project-column-modal-edit"),i=t.querySelector("form"),n=i.querySelector('input[name="id"]'),s=i.querySelector('input[name="title"]'),l=i.querySelector('input[name="color"]'),u="data-modal-project-column-id",m="data-modal-project-column-title-input",y="data-modal-project-column-color-input";(0,C.jB)(document,".show-project-column-modal-edit",A=>{A.addEventListener("click",()=>{n.value=A.getAttribute(u),s.value=A.getAttribute(m),l.value=A.getAttribute(y),l.dispatchEvent(new Event("input",{bubbles:!0}))})}),i.addEventListener("submit",async A=>{A.preventDefault();const L=n.value,z=i.getAttribute("data-action-base-link"),X=new FormData(i),_e=L?`${z}/${L}`:`${z}/columns/new`,pe=L?"PUT":"POST";try{if(i.classList.add("is-loading"),await(0,Ae.Em)(_e,{method:pe,data:X}),!L){window.location.reload();return}(0,ke.mD)(t).modal("hide");const de=e.querySelector(`.show-project-column-modal-edit[${u}="${L}"]`);de.setAttribute(m,s.value),de.setAttribute(y,l.value);const Pe=e.querySelector(`.project-column[data-id="${L}"]`),Le=Pe.querySelector(".project-column-title-text");if(Le.textContent=s.value,l.value){const Te=(0,sp.a)(l.value);Pe.style.setProperty("background",l.value,"important"),Pe.style.setProperty("color",Te,"important"),(0,C.xP)(Pe,".divider",He=>He.style.color=Te)}else Pe.style.removeProperty("background"),Pe.style.removeProperty("color"),(0,C.xP)(Pe,".divider",Te=>Te.style.removeProperty("color"))}finally{i.classList.remove("is-loading")}})}function ap(){const e=document.querySelector(".screen-full"),t=document.querySelector(".screen-normal");if(!e||!t)return;const i=n=>{(0,St._M)(".projects-view",n),(0,C.oi)(e,!n),(0,C.oi)(t,n)};e.addEventListener("click",()=>i(!0)),t.addEventListener("click",()=>i(!1))}function lp(){ap();const e=document.querySelector('#project-board[data-project-borad-writable="true"]');e&&(rp(),op(e))}function cp(){for(const e of document.querySelectorAll("th[data-sortt-asc]")||[]){const t=e.getAttribute("data-sortt-asc"),i=e.getAttribute("data-sortt-desc"),n=e.getAttribute("data-sortt-default");e.addEventListener("click",()=>{up(t,i,n)})}}function up(e,t,i){if(!e)return!1;t||(t="");const n=new URL(window.location.href);let s=n.searchParams.get("sort");!s&&i&&(s=e),n.searchParams.set("sort",s!==e?e:t),window.location.replace(n.href)}function dp(){const e=window.config.pageData.adminUserListSearchForm;if(!e)return;const t=document.querySelector("#user-list-search-form");if(!t)return;for(const n of t.querySelectorAll(`button[name=sort][value="${e.SortType}"]`))n.classList.add("active");if(e.StatusFilterMap){for(const[n,s]of Object.entries(e.StatusFilterMap))if(s)for(const l of t.querySelectorAll(`input[name="status_filter[${n}]"][value="${s}"]`))l.checked=!0}for(const n of t.querySelectorAll("input[type=radio]"))n.addEventListener("click",()=>{t.submit()});const i=t.querySelectorAll(".j-reset-status-filter");for(const n of i)n.addEventListener("click",s=>{s.preventDefault();for(const l of t.querySelectorAll("input[type=radio]"))l.name.startsWith("status_filter[")&&(l.checked=!1);t.submit()})}const{appSubUrl:fp}=window.config;function hp(){const e=document.querySelector(".page-content.admin.config");if(e)for(const t of e.querySelectorAll('input[type="checkbox"][data-config-dyn-key]'))t.addEventListener("change",async()=>{try{const n=await(await(0,Ae.LO)(`${fp}/-/admin/config`,{data:new URLSearchParams({key:t.getAttribute("data-config-dyn-key"),value:String(t.checked)})})).json();if(n.errorMessage)throw new Error(n.errorMessage)}catch(i){Dt(t,i.toString()),t.checked=!t.checked}})}const $d=e=>`user-content-${e}`,Ud=e=>e.replace(/^user-content-/,""),mp=e=>e.startsWith("user-content-");function Vd(e){let t;try{t=decodeURIComponent(e??"")}catch{}if(!t)return;const i=$d(t);let n=document.getElementById(i);n=n??document.querySelector(`a[name="${CSS.escape(i)}"]`),n=!n&&mp(t)?document.getElementById(t):n,n?.scrollIntoView()}function pp(){const e=document.querySelectorAll(".markup");if(e.length){for(const t of e){for(const i of t.querySelectorAll("h1, h2, h3, h4, h5, h6")){const n=document.createElement("a");n.classList.add("anchor"),n.setAttribute("href",`#${encodeURIComponent(Ud(i.id))}`),n.innerHTML=(0,Z.JW)("octicon-link"),i.prepend(n)}for(const i of t.querySelectorAll('a[href^="#"]')){const n=i.getAttribute("href");n.startsWith("#user-content-")&&i.setAttribute("href",`#${Ud(n.substring(1))}`)}for(const i of t.querySelectorAll("a[name]")){const n=i.getAttribute("name");n&&i.setAttribute("name",$d(n))}for(const i of t.querySelectorAll('a[href^="#"]'))i.addEventListener("click",n=>{Vd(n.currentTarget.getAttribute("href")?.substring(1))})}document.querySelector(":target")||Vd(window.location.hash?.substring(1))}}const{appSubUrl:gp}=window.config;async function Wd(){await(0,St.yy)(5e3),window.location.href=`${gp}/`}const{appSubUrl:ku,notificationSettings:ua,assetVersionEncoded:vp}=window.config;let zd=0;function Kd(){const e=document.querySelector("#notification_table");if(e){window.addEventListener("pageshow",t=>{if(t.persisted){const i=document.querySelector("#notification_table"),n=document.querySelector(".notifications-unread-count");let s=parseInt(n.textContent);for(const l of i.querySelectorAll('.notifications-item[data-remove="true"]'))l.remove(),s-=1;n.textContent=String(s)}});for(const t of e.querySelectorAll('.notifications-item[data-status="1"] .notifications-link'))t.addEventListener("click",i=>{i.target.closest(".notifications-item").setAttribute("data-remove","true")})}}async function bp(e){try{const t=JSON.parse(e.data);for(const i of document.querySelectorAll(".notification_count"))i.classList.toggle("tw-hidden",t.Count===0),i.textContent=`${t.Count}`;await Gd()}catch(t){console.error(t,e)}}function _p(){if(!document.querySelector(".notification_count"))return;let e=!1;const t=(i,n)=>{i<=0||!Number.isFinite(i)||(e=!0,n=n??Xd(),setTimeout(async()=>{await yp(t,i,n)},i))};if(ua.EventSourceUpdateTime>0&&window.EventSource&&window.SharedWorker){const i=new SharedWorker(`${__webpack_require__.p}js/eventsource.sharedworker.js?v=${vp}`,"notification-worker");i.addEventListener("error",n=>{console.error("worker error",n)}),i.port.addEventListener("messageerror",()=>{console.error("unable to deserialize message")}),i.port.postMessage({type:"start",url:`${window.location.origin}${ku}/user/events`}),i.port.addEventListener("message",n=>{if(!n.data||!n.data.type){console.error("unknown worker message event",n);return}if(n.data.type==="notification-count")bp(n);else if(n.data.type==="no-event-source")e||t(ua.MinTimeout);else if(n.data.type==="error")console.error("worker port event error",n.data);else if(n.data.type==="logout"){if(n.data.data!=="here")return;i.port.postMessage({type:"close"}),i.port.close(),Wd()}else n.data.type==="close"&&(i.port.postMessage({type:"close"}),i.port.close())}),i.port.addEventListener("error",n=>{console.error("worker port error",n)}),i.port.start(),window.addEventListener("beforeunload",()=>{i.port.postMessage({type:"close"}),i.port.close()});return}t(ua.MinTimeout)}function Xd(){return Number(document.querySelector(".notification_count").textContent??"0")}async function yp(e,t,i){const n=Xd();if(i!==n){e(ua.MinTimeout,n);return}const s=await wp();let l=!1;i!==s?(l=!0,t=ua.MinTimeout):t<ua.MaxTimeout&&(t+=ua.TimeoutStep),e(t,s),l&&await Gd()}async function Gd(){const e=document.querySelector("#notification_div");if(e)try{const t=new URLSearchParams(window.location.search);t.set("div-only",String(!0)),t.set("sequence-number",String(++zd));const i=await(0,Ae.fG)(`${ku}/notifications?${t.toString()}`);if(!i.ok)throw new Error("Failed to fetch notification table");const n=await i.text(),s=(0,C.SL)(n);parseInt(s.getAttribute("data-sequence-number"))===zd&&(e.outerHTML=n,Kd())}catch(t){console.error(t)}}async function wp(){try{const e=await(0,Ae.fG)(`${ku}/notifications/new`);if(!e.ok)throw new Error("Failed to fetch notification count");const t=await e.json();(0,C.oi)(".notification_count",t.new!==0);for(const i of document.querySelectorAll(".notification_count"))i.textContent=`${t.new}`;return t.new}catch(e){return console.error(e),0}}let Qd,Yd,Jd,Zd;function Sp(e,t,i,n){const s=(0,C.SL)(`
DesignScreenshot/output/git.buildapp.eu.org_run/git.buildapp.eu.org_4_after_login.html:317:`);return s.lastIndexOf("#")>l},n=h0(async(s,l)=>{if(!i())return{matched:!1};const u=await p0(s,l);return i()?u:{matched:!1}},300);e.addEventListener("text-expander-change",s=>{const{key:l,text:u,provide:m}=s.detail;if(l===":"){const y=c0(u);if(!y.length)return m({matched:!1});const A=document.createElement("ul");A.classList.add("suggestions");for(const L of y){const z=Bu(L),X=document.createElement("li");X.setAttribute("role","option"),X.setAttribute("data-value",z),X.textContent=`${z} ${L}`,A.append(X)}m({matched:!0,fragment:A})}else if(l==="@"){const y=u0(u);if(!y.length)return m({matched:!1});const A=document.createElement("ul");A.classList.add("suggestions");for(const{value:L,name:z,fullname:X,avatar:_e}of y){const pe=document.createElement("li");pe.setAttribute("role","option"),pe.setAttribute("data-value",`${l}${L}`);const de=document.createElement("img");de.src=_e,pe.append(de);const Pe=document.createElement("span");if(Pe.classList.add("name"),Pe.textContent=z,pe.append(Pe),X&&X.toLowerCase()!==z){const Le=document.createElement("span");Le.classList.add("fullname"),Le.textContent=X,pe.append(Le)}A.append(pe)}m({matched:!0,fragment:A})}else l==="#"&&m(n(l,u))}),e.addEventListener("text-expander-value",({detail:s})=>{if(s?.item){const l=["@","#"].includes(s.key)?" ":"";s.value=`${s.item.getAttribute("data-value")}${l}`}})}var v0=Object.defineProperty,b0=(e,t,i)=>t in e?v0(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i,vs=(e,t,i)=>b0(e,typeof t!="symbol"?t+"":t,i);let $a=0;function hh(e){return e.value?!0:((0,C.EH)(e)?(e.required=!0,e.closest("form")?.reportValidity()):gt("Require non-empty content"),!1)}class ha{constructor(t,i={}){if(vs(this,"container"),vs(this,"options"),vs(this,"tabEditor"),vs(this,"tabPreviewer"),vs(this,"supportEasyMDE"),vs(this,"easyMDE"),vs(this,"easyMDEToolbarActions"),vs(this,"easyMDEToolbarDefault"),vs(this,"textarea"),vs(this,"textareaMarkdownToolbar"),vs(this,"textareaAutosize"),vs(this,"dropzone"),vs(this,"attachedDropzoneInst"),vs(this,"previewMode"),vs(this,"previewUrl"),vs(this,"previewContext"),t._giteaComboMarkdownEditor)throw new Error("ComboMarkdownEditor already initialized");t._giteaComboMarkdownEditor=this,this.options=i,this.container=t}async init(){this.prepareEasyMDEToolbarActions(),this.setupContainer(),this.setupTab(),await this.setupDropzone(),this.setupTextarea(),await this.switchToUserPreference()}applyEditorHeights(t,i){i&&(i.minHeight&&(t.style.minHeight=i.minHeight),i.height&&(t.style.height=i.height),i.maxHeight&&(t.style.maxHeight=i.maxHeight))}setupContainer(){this.supportEasyMDE=this.container.getAttribute("data-support-easy-mde")==="true",this.previewMode=this.container.getAttribute("data-content-mode"),this.previewUrl=this.container.getAttribute("data-preview-url"),this.previewContext=this.container.getAttribute("data-preview-context"),g0(this.container.querySelector("text-expander"))}setupTextarea(){this.textarea=this.container.querySelector(".markdown-text-editor"),this.textarea._giteaComboMarkdownEditor=this,this.textarea.id=`_combo_markdown_editor_${String($a++)}`,this.textarea.addEventListener("input",()=>Lo(this.container)),this.applyEditorHeights(this.textarea,this.options.editorHeights),this.textarea.getAttribute("data-disable-autosize")!=="true"&&(this.textareaAutosize=(0,C.DS)(this.textarea,{viewportMarginBottom:130})),this.textareaMarkdownToolbar=this.container.querySelector("markdown-toolbar"),this.textareaMarkdownToolbar.setAttribute("for",this.textarea.id);for(const s of this.textareaMarkdownToolbar.querySelectorAll(".markdown-toolbar-button"))s.setAttribute("role","button"),s.nodeName==="BUTTON"&&!s.getAttribute("type")&&s.setAttribute("type","button");const t=this.container.querySelector(".markdown-switch-monospace"),i=localStorage?.getItem("markdown-editor-monospace")==="true",n=t.getAttribute(i?"data-disable-text":"data-enable-text");t.setAttribute("data-tooltip-content",n),t.setAttribute("aria-checked",String(i)),t.addEventListener("click",s=>{s.preventDefault();const l=localStorage?.getItem("markdown-editor-monospace")!=="true";localStorage.setItem("markdown-editor-monospace",String(l)),this.textarea.classList.toggle("tw-font-mono",l);const u=t.getAttribute(l?"data-disable-text":"data-enable-text");t.setAttribute("data-tooltip-content",u),t.setAttribute("aria-checked",String(l))}),this.supportEasyMDE&&this.container.querySelector(".markdown-switch-easymde").addEventListener("click",async l=>{l.preventDefault(),this.userPreferredEditor="easymde",await this.switchToEasyMDE()}),this.initMarkdownButtonTableAdd(),Ig(this.textarea),Gg(this.textarea,this.dropzone)}async setupDropzone(){this.container.getAttribute("data-dropzone-parent-container")&&(this.dropzone=this.container.closest(this.container.getAttribute("data-dropzone-parent-container"))?.querySelector(".dropzone"),this.dropzone&&(this.attachedDropzoneInst=await Qf(this.dropzone),this.attachedDropzoneInst.on("processing",()=>Vu(this.container)),this.attachedDropzoneInst.on("queuecomplete",()=>Vu(this.container))))}dropzoneGetFiles(){return this.dropzone?Array.from(this.dropzone.querySelectorAll(".files [name=files]"),t=>t.value):null}dropzoneReloadFiles(){this.dropzone&&this.attachedDropzoneInst.emit(Ac)}dropzoneSubmitReload(){this.dropzone&&(this.attachedDropzoneInst.emit("submit"),this.attachedDropzoneInst.emit(Ac))}isUploading(){return this.dropzone?this.attachedDropzoneInst.getQueuedFiles().length||this.attachedDropzoneInst.getUploadingFiles().length:!1}setupTab(){const t=this.container.querySelectorAll(".tabular.menu > .item");if(!t.length)return;this.tabEditor=Array.from(t).find(s=>s.getAttribute("data-tab-for")==="markdown-writer"),this.tabPreviewer=Array.from(t).find(s=>s.getAttribute("data-tab-for")==="markdown-previewer"),this.tabEditor.setAttribute("data-tab",`markdown-writer-${$a}`),this.tabPreviewer.setAttribute("data-tab",`markdown-previewer-${$a}`);const i=this.container.querySelector('.ui.tab[data-tab-panel="markdown-writer"]'),n=this.container.querySelector('.ui.tab[data-tab-panel="markdown-previewer"]');i.setAttribute("data-tab",`markdown-writer-${$a}`),n.setAttribute("data-tab",`markdown-previewer-${$a}`),$a++,this.tabEditor.addEventListener("click",()=>{requestAnimationFrame(()=>{this.focus()})}),(0,ke.mD)(t).tab(),this.tabPreviewer.addEventListener("click",async()=>{const s=new FormData;s.append("mode",this.previewMode),s.append("context",this.previewContext),s.append("text",this.value());const u=await(await(0,Ae.LO)(this.previewUrl,{data:s})).text();uh(n,u)})}generateMarkdownTable(t,i){const n=[];n.push(`| ${"Header ".repeat(i).trim().split(" ").join(" | ")} |`,`| ${"--- ".repeat(i).trim().split(" ").join(" | ")} |`);for(let s=0;s<t;s++)n.push(`| ${"Cell ".repeat(i).trim().split(" ").join(" | ")} |`);return n.join(`
DesignScreenshot/output/git.buildapp.eu.org_run/git.buildapp.eu.org_4_after_login.html:321:`),n.hide()})}switchTabToEditor(){this.tabEditor.click()}prepareEasyMDEToolbarActions(){this.easyMDEToolbarDefault=["bold","italic","strikethrough","|","heading-1","heading-2","heading-3","heading-bigger","heading-smaller","|","code","quote","|","gitea-checkbox-empty","gitea-checkbox-checked","|","unordered-list","ordered-list","|","link","image","table","horizontal-rule","|","gitea-switch-to-textarea"]}parseEasyMDEToolbar(t,i){this.easyMDEToolbarActions=this.easyMDEToolbarActions||l0(t,this);const n=[];for(const s of i){const l=this.easyMDEToolbarActions[s];if(!l)throw new Error(`Unknown EasyMDE toolbar action ${s}`);n.push(l)}return n}async switchToUserPreference(){this.userPreferredEditor==="easymde"&&this.supportEasyMDE?await this.switchToEasyMDE():this.switchToTextarea()}switchToTextarea(){this.easyMDE&&((0,C.fi)(this.textareaMarkdownToolbar),this.easyMDE&&(this.easyMDE.toTextArea(),this.easyMDE=null))}async switchToEasyMDE(){if(this.easyMDE)return;const{default:t}=await __webpack_require__.e("easymde").then(__webpack_require__.t.bind(__webpack_require__,"./node_modules/easymde/src/js/easymde.js",23)),i={autoDownloadFontAwesome:!1,element:this.textarea,forceSync:!0,renderingConfig:{singleLineBreaks:!1},indentWithTabs:!1,tabSize:4,spellChecker:!1,inputStyle:"contenteditable",nativeSpellcheck:!0,...this.options.easyMDEOptions};i.toolbar=this.parseEasyMDEToolbar(t,i.toolbar??this.easyMDEToolbarDefault),this.easyMDE=new t(i),this.easyMDE.codemirror.on("change",()=>Lo(this.container)),this.easyMDE.codemirror.setOption("extraKeys",{"Cmd-Enter":n=>kc(n.getTextArea()),"Ctrl-Enter":n=>kc(n.getTextArea()),Enter:n=>{const s=document.querySelector(".tribute-container");(!s||s.style.display==="none")&&n.execCommand("newlineAndIndent")},Up:n=>{const s=document.querySelector(".tribute-container");if(!s||s.style.display==="none")return n.execCommand("goLineUp")},Down:n=>{const s=document.querySelector(".tribute-container");if(!s||s.style.display==="none")return n.execCommand("goLineDown")}}),this.applyEditorHeights(this.container.querySelector(".CodeMirror-scroll"),this.options.editorHeights),await Tg(this.easyMDE.codemirror.getInputField()),this.dropzone&&Xg(this.easyMDE,this.dropzone),(0,C.y9)(this.textareaMarkdownToolbar)}value(t=void 0){if(t===void 0)return this.easyMDE?this.easyMDE.value():this.textarea.value;this.easyMDE?this.easyMDE.value(t):this.textarea.value=t,this.textareaAutosize?.resizeToFit()}focus(){this.easyMDE?this.easyMDE.codemirror.focus():this.textarea.focus()}moveCursorToEnd(){this.textarea.focus(),this.textarea.setSelectionRange(this.textarea.value.length,this.textarea.value.length),this.easyMDE&&(this.easyMDE.codemirror.focus(),this.easyMDE.codemirror.setCursor(this.easyMDE.codemirror.lineCount(),0))}get userPreferredEditor(){return window.localStorage.getItem(`markdown-editor-${this.previewMode??"default"}`)}set userPreferredEditor(t){window.localStorage.setItem(`markdown-editor-${this.previewMode??"default"}`,t)}}vs(ha,"EventEditorContentChanged",Vf),vs(ha,"EventUploadStateChanged",Jf);function Xu(e){return e?(e.length&&(e=e[0]),e._giteaComboMarkdownEditor):null}async function ma(e,t={}){if(!e)throw new Error("initComboMarkdownEditor: container is null");const i=new ha(e,t);return await i.init(),i}var _0=Object.defineProperty,y0=(e,t,i)=>t in e?_0(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i,Ro=(e,t,i)=>y0(e,typeof t!="symbol"?t+"":t,i);function w0(){const e=[document.querySelector(".edit-content-zone:not(.tw-hidden) textarea"),document.querySelector("#comment-form textarea")];for(const t of e)if(t&&t.value.trim().length>10){if(t.parentElement.scrollIntoView(),!window.confirm("Page will be reloaded, but there are draft comments. Continuing to reload will discard the comments. Continue?"))return;break}window.location.reload()}class S0{constructor(t){if(Ro(this,"updateUrl"),Ro(this,"updateAlgo"),Ro(this,"selectionMode"),Ro(this,"elDropdown"),Ro(this,"elList"),Ro(this,"elComboValue"),Ro(this,"initialValues"),Ro(this,"container"),this.container=t,this.updateUrl=t.getAttribute("data-update-url"),this.updateAlgo=t.getAttribute("data-update-algo"),this.selectionMode=t.getAttribute("data-selection-mode"),!["single","multiple"].includes(this.selectionMode))throw new Error(`Invalid data-update-on: ${this.selectionMode}`);if(!["diff","all"].includes(this.updateAlgo))throw new Error(`Invalid data-update-algo: ${this.updateAlgo}`);this.elDropdown=t.querySelector(":scope > .ui.dropdown"),this.elList=t.querySelector(":scope > .ui.list"),this.elComboValue=t.querySelector(":scope > .combo-value")}collectCheckedValues(){return Array.from(this.elDropdown.querySelectorAll(".menu > .item.checked"),t=>t.getAttribute("data-value"))}updateUiList(t){const i=this.elList.querySelector(".item.empty-list");(0,C.xP)(this.elList,".item:not(.empty-list)",s=>s.remove());for(const s of t){const l=this.elDropdown.querySelector(`.menu > .item[data-value="${CSS.escape(s)}"]`);if(!l)continue;const u=l.cloneNode(!0);(0,C.jB)(u,".item-check-mark, .item-secondary-info",m=>m.remove()),this.elList.append(u)}const n=!!this.elList.querySelector(".item:not(.empty-list)");(0,C.oi)(i,!n)}async updateToBackend(t){if(this.updateAlgo==="diff"){for(const i of this.initialValues)t.includes(i)||await(0,Ae.LO)(this.updateUrl,{data:new URLSearchParams({action:"detach",id:i})});for(const i of t)this.initialValues.includes(i)||await(0,Ae.LO)(this.updateUrl,{data:new URLSearchParams({action:"attach",id:i})})}else await(0,Ae.LO)(this.updateUrl,{data:new URLSearchParams({id:t.join(",")})});w0()}async doUpdate(){const t=this.collectCheckedValues();this.initialValues.join(",")!==t.join(",")&&(this.updateUiList(t),this.updateUrl&&await this.updateToBackend(t),this.initialValues=t)}async onChange(){this.selectionMode==="single"&&(await this.doUpdate(),(0,ke.mD)(this.elDropdown).dropdown("hide"))}async onItemClick(t,i){if(i.preventDefault(),t.hasAttribute("data-can-change")&&t.getAttribute("data-can-change")!=="true")return;if(t.matches(".clear-selection")){(0,C.jB)(this.elDropdown,".menu > .item",s=>s.classList.remove("checked")),this.elComboValue.value="",this.onChange();return}const n=t.getAttribute("data-scope");n?this.elDropdown.querySelector(`.menu > .item.checked[data-scope="${CSS.escape(n)}"]`)===t?t.classList.toggle("checked"):((0,C.jB)(this.elDropdown,`.menu > .item[data-scope="${CSS.escape(n)}"]`,l=>l.classList.remove("checked")),t.classList.toggle("checked",!0)):this.selectionMode==="multiple"?t.classList.toggle("checked"):((0,C.jB)(this.elDropdown,".menu > .item.checked",s=>s.classList.remove("checked")),t.classList.toggle("checked",!0)),this.elComboValue.value=this.collectCheckedValues().join(","),this.onChange()}async onHide(){this.selectionMode==="multiple"&&this.doUpdate()}init(){if(this.elComboValue.value&&this.elComboValue.value!=="0"&&!(0,C.jB)(this.elDropdown,".menu > .item.checked").length){const t=this.elComboValue.value.split(",");for(const i of t)this.elDropdown.querySelector(`.menu > .item[data-value="${CSS.escape(i)}"]`)?.classList.add("checked");this.updateUiList(t)}this.initialValues=this.collectCheckedValues(),(0,C.ny)(this.elDropdown,"click",".item",(t,i)=>this.onItemClick(t,i)),(0,ke.mD)(this.elDropdown).dropdown("setting",{action:"nothing",fullTextSearch:"exact",hideDividers:"empty",onHide:()=>this.onHide()})}}function x0(){const e=document.querySelector(".ui.dropdown.select-branch.branch-selector-dropdown");if(!e)return;const t=e.getAttribute("data-url-update-issueref"),i=e.querySelector(".reference-list-menu");(0,C.jB)(i,".item:not(.no-select)",n=>n.addEventListener("click",async function(s){s.preventDefault();const l=this.getAttribute("data-id"),u=this.getAttribute("data-name");if(t)try{await(0,Ae.LO)(t,{data:new URLSearchParams({ref:l})}),window.location.reload()}catch(m){console.error(m)}else{const m=this.getAttribute("data-id-selector");document.querySelector(m).value=l,e.querySelector(".text-branch-name").textContent=u}}))}function j0(){const e=document.querySelector(".issue-due-form");if(!e)return;const t=e.querySelector("input[name=deadline]");document.querySelector(".issue-due-edit")?.addEventListener("click",()=>{(0,C.oi)(e)}),document.querySelector(".issue-due-remove")?.addEventListener("click",()=>{t.value="",e.dispatchEvent(new Event("submit",{cancelable:!0,bubbles:!0}))})}function E0(){x0(),j0(),(0,C.jB)(document,".issue-sidebar-combo",e=>new S0(e).init())}const{appSubUrl:Gu}=window.config;function A0(){const e=document.querySelector("#new-dependency-drop-list");if(!e)return;const t=(0,St.yG)(),i=e.getAttribute("data-issue-cross-repo-search");let n=`${t.repoLink}/issues/search?q={query}&type=${t.issueDependencySearchType}`;i==="true"&&(n=`${Gu}/issues/search?q={query}&priority_repo_id=${t.repoId}&type=${t.issueDependencySearchType}`),(0,ke.mD)(e).dropdown({fullTextSearch:!0,apiSettings:{cache:!1,rawResponse:!0,url:n,onResponse(s){const l={success:!0,results:[]},u=e.getAttribute("data-issue-id");for(const m of s)String(m.id)!==u&&l.results.push({value:m.id,name:`<div class="gt-ellipsis">#${m.number} ${R(m.title)}</div>
DesignScreenshot/output/git.buildapp.eu.org_run/git.buildapp.eu.org_4_after_login.html:332:_Originally posted by @${u} in ${m}_`,(0,ke.mD)(A).modal("show")})}function q0(){(0,C.jB)(document,".title_wip_desc > a",e=>e.addEventListener("click",t=>{t.preventDefault();const i=JSON.parse(e.closest(".title_wip_desc").getAttribute("data-wip-prefixes")),n=document.querySelector("#issue_title"),s=n.value;for(const l of i)if(s.startsWith(l.toUpperCase()))return;n.value=`${i[0]} ${s}`}))}function P0(){(0,C.jB)(document,".toggle-wip",e=>e.addEventListener("click",async t=>{t.preventDefault();const i=e,n=i.getAttribute("data-title"),s=i.getAttribute("data-wip-prefix"),l=i.getAttribute("data-update-url");try{const u=new URLSearchParams;if(u.append("title",n?.startsWith(s)?n.slice(s.length).trim():`${s.trim()} ${n}`),!(await(0,Ae.LO)(l,{data:u})).ok)throw new Error("Failed to toggle WIP status");window.location.reload()}catch(u){console.error(u)}}))}function F0(){const e=document.querySelector("#issue-title-display"),t=document.querySelector("#issue-title-editor");if(!t)return;const i=t.querySelector("input"),n=i.getAttribute("data-old-title");e.querySelector("#issue-title-edit-show").addEventListener("click",()=>{(0,C.y9)(e),(0,C.y9)("#pull-desc-display"),(0,C.fi)(t),(0,C.fi)("#pull-desc-editor"),i.value.trim()||(i.value=n),i.focus()}),t.querySelector(".ui.cancel.button").addEventListener("click",()=>{(0,C.y9)(t),(0,C.y9)("#pull-desc-editor"),(0,C.fi)(e),(0,C.fi)("#pull-desc-display")});const l=document.querySelector("#pull-desc-editor")?.getAttribute("data-target-update-url"),u=t.querySelector(".ui.primary.button");t.addEventListener("submit",async m=>{m.preventDefault();const y=i.value.trim();try{if(y&&y!==n){const A=await(0,Ae.LO)(u.getAttribute("data-update-url"),{data:new URLSearchParams({title:y})});if(!A.ok)throw new Error(`Failed to update issue title: ${A.statusText}`)}if(l){const A=document.querySelector("#pull-target-branch").getAttribute("data-branch"),L=document.querySelector("#branch_target").textContent;if(A!==L){const z=await(0,Ae.LO)(l,{data:new URLSearchParams({target_branch:A})});if(!z.ok)throw new Error(`Failed to update PR target branch: ${z.statusText}`)}}Ku(t),window.location.reload()}catch(A){console.error(A),gt(A.message)}})}function I0(){document.querySelector("#branch-select")?.addEventListener("click",e=>{const t=e.target.closest(".item[data-branch]");if(!t)return;const i=document.querySelector("#pull-target-branch"),n=i.getAttribute("data-basename"),s=t.getAttribute("data-branch"),l=i.getAttribute("data-branch");i.textContent=i.textContent.replace(`${n}:${l}`,`${n}:${s}`),i.setAttribute("data-branch",s)})}async function N0(e){const t=await ma(e.querySelector(".combo-markdown-editor")),i=document.querySelector("#status-button"),n=document.querySelector("#comment-button"),s=()=>{const l=t.value().trim(),u=t.isUploading();i&&(i.textContent=i.getAttribute(l?"data-status-and-comment":"data-status"),i.disabled=u),n&&(n.disabled=!l||u)};t.container.addEventListener(ha.EventUploadStateChanged,s),t.container.addEventListener(ha.EventEditorContentChanged,s),s()}function H0(e){const t=e.querySelectorAll(".combo-editor-dropzone"),i=async n=>{const s=n.querySelector(".form-field-real"),l=n.querySelector(".form-field-dropzone"),u=n.querySelector(".combo-markdown-editor"),m=await ma(u);m.container.addEventListener(ha.EventEditorContentChanged,()=>s.value=m.value()),s.addEventListener("focus",async()=>{(0,C.fi)(e.querySelectorAll(".combo-editor-dropzone .form-field-real")),(0,C.y9)(e.querySelectorAll(".combo-editor-dropzone .combo-markdown-editor")),(0,C.jB)(e,".combo-editor-dropzone .form-field-dropzone",y=>{const L=y.querySelector(".dropzone").dropzone.files.length!==0;(0,C.oi)(y,L)}),(0,C.y9)(s),(0,C.fi)(u),(0,C.fi)(l),await m.switchToUserPreference(),m.focus()})};for(const n of t)i(n)}function B0(){const e=document.querySelector(".comment.form");e&&(e.querySelector(".field.combo-editor-dropzone")?H0(e):e.querySelector(".combo-markdown-editor")&&N0(e),E0())}function $0(){_c("click","onRepoEllipsisButtonClick",async(e,t)=>{t.preventDefault();const i=e.getAttribute("aria-expanded")==="true";(0,C.oi)(e.parentElement.querySelector(".commit-body")),e.setAttribute("aria-expanded",String(!i))})}function U0(){Ha("initCommitStatuses",e=>{const t=e.nextElementSibling;if(!t.matches(".tippy-target"))throw new Error("Expected next element to be a tippy target");Ie(e,{content:t,placement:"bottom-start",interactive:!0,role:"dialog",theme:"box-with-header"})})}const{appSubUrl:ph}=window.config;function V0(){const e=document.querySelector("#manage_topic");if(!e)return;const t=document.querySelector("#topic_edit"),i=document.querySelector("#repo-topics"),n=t.querySelector(".ui.dropdown");let s;e.addEventListener("click",()=>{(0,C.y9)([i,e]),(0,C.fi)(t),n.querySelector("input.search").focus()}),document.querySelector("#cancel_topic_edit").addEventListener("click",()=>{s?.hideToast(),(0,C.y9)(t),(0,C.fi)([i,e]),e.focus()}),document.querySelector("#save_topic").addEventListener("click",async l=>{s?.hideToast();const u=t.querySelector("input[name=topics]").value,m=new FormData;m.append("topics",u);const y=await(0,Ae.LO)(l.target.getAttribute("data-link"),{data:m});if(y.ok){if((await y.json()).status==="ok"){if((0,C.xP)(i,".repo-topic",L=>L.remove()),u.length){const L=u.split(",");L.sort();for(const z of L){const X=document.createElement("a");X.classList.add("repo-topic","ui","large","label","gt-ellipsis"),X.href=`${ph}/explore/repos?q=${encodeURIComponent(z)}&topic=1`,X.textContent=z,i.append(X)}}(0,C.y9)(t),(0,C.fi)([i,e])}}else if(y.status===422){const A=await y.json();if(s=gt(A.message,{duration:5e3}),A.invalidTopics&&A.invalidTopics.length>0){const{invalidTopics:L}=A,z=(0,C.xP)(n,"a.ui.label");for(const[X,_e]of u.split(",").entries())L.includes(_e)&&(z[X].classList.remove("green"),z[X].classList.add("red"))}}}),(0,ke.mD)(n).dropdown({allowAdditions:!0,forceSelection:!1,fullTextSearch:"exact",fields:{name:"description",value:"data-value"},saveRemoteData:!1,label:{transition:"horizontal flip",duration:200,variation:!1},apiSettings:{url:`${ph}/explore/topics/search?q={query}`,throttle:500,cache:!1,onResponse(l){const u={success:!1,results:[]},m=(0,St.Kq)(this.urlData.query.trim());let y=!1;const A=[];for(const L of(0,C.xP)(n,"a.ui.label.visible"))A.push(L.getAttribute("data-value"));if(l.topics){let L=!1;for(const{topic_name:z}of l.topics)A.includes(z)||(z.toLowerCase()===m.toLowerCase()&&(y=!0),u.results.push({description:z,"data-value":z}),L=!0);u.success=L}return m.length>0&&!y?(u.success=!0,u.results.unshift({description:m,"data-value":m})):m.length>0&&y&&u.results.sort((L,z)=>L.description.toLowerCase()===m.toLowerCase()?-1:z.description.toLowerCase()===m.toLowerCase()?1:L.description>z.description?-1:L.description<z.description?1:0),u}},onLabelCreate(l){return l=l.toLowerCase().trim(),this.attr("data-value",l).contents().first().replaceWith(l),(0,ke.mD)(this)},onAdd(l,u,m){l=l.toLowerCase().trim(),m[0].setAttribute("data-value",l),m[0].setAttribute("data-text",l)}})}const{appSubUrl:W0}=window.config;function Qu(){Number(document.querySelector("#security_protocol")?.value)>0?(0,C.fi)(".has-tls"):(0,C.y9)(".has-tls")}function z0(){document.querySelector(".page-content.admin")&&(hf(),K0(),X0(),G0())}function K0(){document.querySelector(".page-content.admin.edit.user, .page-content.admin.new.user")&&document.querySelector("#login_type")?.addEventListener("change",function(){this.value?.startsWith("0")?(document.querySelector("#user_name")?.removeAttribute("disabled"),document.querySelector("#login_name")?.removeAttribute("required"),(0,C.y9)(".non-local"),(0,C.fi)(".local"),document.querySelector("#user_name")?.focus(),this.getAttribute("data-password")==="required"&&document.querySelector("#password")?.setAttribute("required","required")):(document.querySelector(".admin.edit.user")&&document.querySelector("#user_name")?.setAttribute("disabled","disabled"),document.querySelector("#login_name")?.setAttribute("required","required"),(0,C.fi)(".non-local"),(0,C.y9)(".local"),document.querySelector("#login_name")?.focus(),document.querySelector("#password")?.removeAttribute("required"))})}function X0(){const e=document.querySelector(".page-content.admin.authentication");if(!e)return;const t=e.classList.contains("new"),i=e.classList.contains("edit");if(!t&&!i)return;function n(){const L=document.querySelectorAll(".search-page-size");if(document.querySelector("#use_paged_search").checked){(0,C.fi)(".search-page-size");for(const z of L)z.querySelector("input")?.setAttribute("required","required")}else{(0,C.y9)(".search-page-size");for(const z of L)z.querySelector("input")?.removeAttribute("required")}}function s(L){(0,C.y9)(".open_id_connect_auto_discovery_url, .oauth2_use_custom_url");for(const X of document.querySelectorAll(".open_id_connect_auto_discovery_url input[required]"))X.removeAttribute("required");const z=document.querySelector("#oauth2_provider").value;switch(z){case"openidConnect":document.querySelector(".open_id_connect_auto_discovery_url input").setAttribute("required","required"),(0,C.fi)(".open_id_connect_auto_discovery_url");break;default:{const X=document.querySelector(`#${z}_customURLSettings`);if(!X)break;const _e=X.getAttribute("data-available")==="true",pe=X.getAttribute("data-required")==="true";_e&&(0,C.fi)(".oauth2_use_custom_url"),pe&&(document.querySelector("#oauth2_use_custom_url").checked=!0);break}}l(L)}function l(L){const z=document.querySelector("#oauth2_provider").value;(0,C.y9)(".oauth2_use_custom_url_field");for(const _e of document.querySelectorAll(".oauth2_use_custom_url_field input[required]"))_e.removeAttribute("required");if(document.querySelector(`#${z}_customURLSettings`)&&document.querySelector("#oauth2_use_custom_url").checked)for(const _e of["token_url","auth_url","profile_url","email_url","tenant"]){L&&(document.querySelector(`#oauth2_${_e}`).value=document.querySelector(`#${z}_${_e}`).value);const pe=document.querySelector(`#${z}_${_e}`);if(pe&&pe.getAttribute("data-available")==="true"){for(const de of document.querySelectorAll(`.oauth2_${_e} input`))de.setAttribute("required","required");(0,C.fi)(`.oauth2_${_e}`)}}}function u(){const L=document.querySelector(".js-ldap-group-toggle")?.checked;(0,C.oi)(document.querySelector("#ldap-group-options"),L)}const m=document.querySelector("#auth_type");if(t){const L=function(){(0,C.y9)(".ldap, .dldap, .smtp, .pam, .oauth2, .has-tls, .search-page-size, .sspi");for(const X of document.querySelectorAll(".ldap input[required], .binddnrequired input[required], .dldap input[required], .smtp input[required], .pam input[required], .oauth2 input[required], .has-tls input[required], .sspi input[required]"))X.removeAttribute("required");document.querySelector(".binddnrequired")?.classList.remove("required");const z=m.value;switch(z){case"2":(0,C.fi)(".ldap");for(const X of document.querySelectorAll(".binddnrequired input, .ldap div.required:not(.dldap) input"))X.setAttribute("required","required");document.querySelector(".binddnrequired")?.classList.add("required");break;case"3":(0,C.fi)(".smtp"),(0,C.fi)(".has-tls");for(const X of document.querySelectorAll(".smtp div.required input, .has-tls"))X.setAttribute("required","required");break;case"4":(0,C.fi)(".pam");for(const X of document.querySelectorAll(".pam input"))X.setAttribute("required","required");break;case"5":(0,C.fi)(".dldap");for(const X of document.querySelectorAll(".dldap div.required:not(.ldap) input"))X.setAttribute("required","required");break;case"6":(0,C.fi)(".oauth2");for(const X of document.querySelectorAll(".oauth2 div.required:not(.oauth2_use_custom_url,.oauth2_use_custom_url_field,.open_id_connect_auto_discovery_url) input"))X.setAttribute("required","required");s(!0);break;case"7":(0,C.fi)(".sspi");for(const X of document.querySelectorAll(".sspi div.required input"))X.setAttribute("required","required");break}(z==="2"||z==="5")&&(Qu(),u()),z==="2"&&n()};m.addEventListener("change",L),L(),document.querySelector("#security_protocol")?.addEventListener("change",Qu),document.querySelector("#use_paged_search")?.addEventListener("change",n),document.querySelector("#oauth2_provider")?.addEventListener("change",()=>s(!0)),document.querySelector("#oauth2_use_custom_url")?.addEventListener("change",()=>l(!0)),document.querySelector(".js-ldap-group-toggle").addEventListener("change",u)}if(i){const L=m.value;L==="2"||L==="5"?(document.querySelector("#security_protocol")?.addEventListener("change",Qu),document.querySelector(".js-ldap-group-toggle").addEventListener("change",u),u(),L==="2"&&document.querySelector("#use_paged_search")?.addEventListener("change",n)):L==="6"&&(document.querySelector("#oauth2_provider")?.addEventListener("change",()=>s(!0)),document.querySelector("#oauth2_use_custom_url")?.addEventListener("change",()=>l(!1)),s(!1))}const y=document.querySelector("#auth_name"),A=function(){document.querySelector("#oauth2-callback-url").textContent=`${window.location.origin}${W0}/user/oauth2/${encodeURIComponent(y.value)}/callback`};y.addEventListener("input",A),A()}function G0(){const e=document.querySelector(".page-content.admin.notice");if(!e)return;const t=document.querySelector("#detail-modal");(0,C.jB)(e,".view-detail",n=>n.addEventListener("click",s=>{s.preventDefault();const l=n.closest("tr").querySelector(".notice-description"),u=t.querySelector(".content pre");u.textContent=l.textContent,(0,ke.mD)(t).modal("show")}));const i=document.querySelectorAll(".select.table .ui.checkbox input");(0,C.jB)(e,".select.action",n=>n.addEventListener("click",()=>{switch(n.getAttribute("data-action")){case"select-all":for(const s of i)s.checked=!0;break;case"deselect-all":for(const s of i)s.checked=!1;break;case"inverse":for(const s of i)s.checked=!s.checked;break}})),document.querySelector("#delete-selection")?.addEventListener("click",async function(n){n.preventDefault(),this.classList.add("is-loading","disabled");const s=new FormData;for(const l of i)l.checked&&s.append("ids[]",l.closest(".ui.checkbox").getAttribute("data-id"));await(0,Ae.LO)(this.getAttribute("data-link"),{data:s}),window.location.href=this.getAttribute("data-redirect")})}function Q0(e){window.history.pushState?window.history.pushState(null,null,e):window.location.hash=e}function Yu(e){for(const pe of document.querySelectorAll(".code-view tr.active"))pe.classList.remove("active");const t=document.querySelectorAll(".code-view td.lines-num span[data-line-number]"),i=document.querySelector("a.ref-in-new-issue"),n=document.querySelector("a.copy-line-permalink"),s=document.querySelector("a.view_git_blame"),l=function(pe){if(!i)return;const de=i.getAttribute("data-url-issue-new"),Pe=i.getAttribute("data-url-param-body-link"),Le=`${(0,St.oK)(Pe)}#${pe}`;i.setAttribute("href",`${de}?body=${encodeURIComponent(Le)}`)},u=function(pe){if(!s)return;let de=s.getAttribute("href");de=`${de.replace(/#L\d+$|#L\d+-L\d+$/,"")}`,pe.length!==0&&(de=`${de}#${pe}`),s.setAttribute("href",de)},m=function(pe){if(!n)return;let de=n.getAttribute("data-url");de=`${de.replace(/#L\d+$|#L\d+-L\d+$/,"")}#${pe}`,n.setAttribute("data-clipboard-text",de),n.setAttribute("data-clipboard-text-type","url")},y=e?e.split("-"):[],A=y[0]??"";if(!A)return null;const L=y[1]||A;let z=parseInt(A.substring(1)),X=parseInt(L.substring(1));if(z>X){const pe=z;z=X,X=pe,e=`${L}-${A}`}const _e=t[z-1]??null;for(let pe=z-1;pe<=X-1&&pe<t.length;pe++)t[pe].closest("tr").classList.add("active");return Q0(`#${e}`),l(e),u(e),m(e),_e}function gh(){const e=document.querySelector(".code-line-menu");if(!e)return;for(const s of document.querySelectorAll(".code-line-button"))s.remove();const t=document.querySelector(".code-view tr.active");if(!t)return;const i=t.querySelector("td.lines-num"),n=document.createElement("button");n.classList.add("code-line-button","ui","basic","button"),n.innerHTML=(0,Z.JW)("octicon-kebab-horizontal"),i.prepend(n),n.closest(".code-view").append(e.cloneNode(!0)),Ie(n,{theme:"menu",trigger:"click",hideOnClick:!0,content:e,placement:"right-start",interactive:!0,onShow:s=>{s.popper.addEventListener("click",()=>{s.hide()},{once:!0})}})}function Y0(){if(!document.querySelector(".repo-view-container .file-view"))return;let e;(0,C.ny)(document,"click",".code-view .lines-num span",(i,n)=>{if(!e||!n.shiftKey)e=i.getAttribute("id"),Yu(e);else{const s=i.getAttribute("id");Yu(`${e}-${s}`)}window.getSelection().removeAllRanges(),gh()});const t=()=>{if(!window.location.hash||!document.querySelector(".code-view .lines-num"))return;const i=window.location.hash.substring(1),n=Yu(i);n&&(window.history.scrollRestoration!=="manual"&&(window.history.scrollRestoration="manual"),n.scrollIntoView({block:"start"}),gh())};t(),window.addEventListener("hashchange",t)}function J0(){document.querySelector("#ssh-key-content")?.addEventListener("input",function(){const e=this.value.split(" "),t=document.querySelector("#ssh-key-title");!t.value&&e.length===3&&e[2]!==""&&(t.value=e[2])})}function Z0(){if(!document.querySelector(".user.settings.profile"))return;const e=document.querySelector("#username");e&&e.addEventListener("input",function(){const t=document.querySelector("#name-change-prompt"),i=document.querySelector("#name-change-redirect-prompt");this.value.toLowerCase()!==this.getAttribute("data-name").toLowerCase()?((0,C.fi)(t),(0,C.fi)(i)):((0,C.y9)(t),(0,C.y9)(i))})}function ev(){const e=document.querySelector("#repo_migrating");if(!e)return;document.querySelector("#repo_migrating_retry")?.addEventListener("click",tv);const t=e.getAttribute("data-migrating-repo-link"),i=async()=>{const s=await(0,Ae.fG)(`${t}/-/migrate/status`);if(s.status!==200)return!0;const l=await s.json();return l.message&&(document.querySelector("#repo_migrating_progress_message").textContent=l.message),l.status===4?(window.location.reload(),!1):l.status===3?((0,C.y9)("#repo_migrating_progress"),(0,C.y9)("#repo_migrating"),(0,C.fi)("#repo_migrating_retry"),(0,C.fi)("#repo_migrating_failed"),(0,C.fi)("#repo_migrating_failed_image"),document.querySelector("#repo_migrating_failed_error").textContent=l.message,!1):!0},n=async()=>{let s=!0;try{s=await i()}finally{s&&setTimeout(n,2e3)}};n()}async function tv(e){await(0,Ae.LO)(e.target.getAttribute("data-migrating-task-retry-url")),window.location.reload()}const{pageData:Ju}=window.config;let Zu;function ed(){return Zu||(Zu=nv(Ju.DiffFileTree,Ju.FolderIcon,Ju.FolderOpenIcon)),Zu}function iv(e,t,i){const n=e.fullNameMap[t];if(n){n.IsViewed=i;for(let s=n.ParentEntry;s;s=s.ParentEntry)s.IsViewed=bh(s)}}function vh(e,t){if(e[t.FullName]=t,!!t.Children){t.IsViewed=bh(t);for(const i of t.Children)i.ParentEntry=t,vh(e,i)}}function nv(e,t,i){const n=(0,Re.Kh)({diffFileTree:e,folderIcon:t,folderOpenIcon:i,fileTreeIsVisible:!1,selectedItem:"",fullNameMap:{}});return vh(n.fullNameMap,e.TreeRoot),n}function bh(e){if(e.Children){let t=0;for(const i of e.Children)i.IsViewed&&t++;return t===e.Children.length}return e.IsViewed}const sv=["title"],rv=["innerHTML"],ov={class:"gt-ellipsis"},av={class:"sub-items"},lv=["title","href"],cv=["innerHTML"],uv={class:"gt-ellipsis tw-flex-1"};var dv=(0,c.pM)({__name:"DiffFileTreeItem",props:{item:{}},setup(e){const t=e,i=ed(),n=(0,Re.KR)(t.item.IsViewed);function s(l){const u={"":{name:"octicon-blocked",classes:["text","red"]},added:{name:"octicon-diff-added",classes:["text","green"]},modified:{name:"octicon-diff-modified",classes:["text","yellow"]},deleted:{name:"octicon-diff-removed",classes:["text","red"]},renamed:{name:"octicon-diff-renamed",classes:["text","teal"]},copied:{name:"octicon-diff-renamed",classes:["text","green"]},typechange:{name:"octicon-diff-modified",classes:["text","green"]}};return u[l]??u[""]}return(l,u)=>{const m=(0,c.g2)("DiffFileTreeItem",!0);return l.item.EntryMode==="tree"?((0,c.uX)(),(0,c.CE)(c.FK,{key:0},[(0,c.Lk)("div",{class:(0,W.C4)(["item-directory",{viewed:l.item.IsViewed}]),title:l.item.DisplayName,onClick:u[0]||(u[0]=Di(y=>n.value=!n.value,["stop"]))},[(0,c.Q3)(" directory "),(0,c.bF)((0,Re.R1)(Z.Ah),{name:n.value?"octicon-chevron-right":"octicon-chevron-down"},null,8,["name"]),(0,c.Q3)(" eslint-disable-next-line vue/no-v-html "),(0,c.Lk)("span",{class:"tw-contents",innerHTML:n.value?(0,Re.R1)(i).folderIcon:(0,Re.R1)(i).folderOpenIcon},null,8,rv),(0,c.Lk)("span",ov,(0,W.v_)(l.item.DisplayName),1)],10,sv),(0,c.bo)((0,c.Lk)("div",av,[((0,c.uX)(!0),(0,c.CE)(c.FK,null,(0,c.pI)(l.item.Children,y=>((0,c.uX)(),(0,c.Wv)(m,{key:y.DisplayName,item:y},null,8,["item"]))),128))],512),[[ti,!n.value]])],64)):((0,c.uX)(),(0,c.CE)("a",{key:1,class:(0,W.C4)(["item-file",{selected:(0,Re.R1)(i).selectedItem==="#diff-"+l.item.NameHash,viewed:l.item.IsViewed}]),title:l.item.DisplayName,href:"#diff-"+l.item.NameHash},[(0,c.Q3)(" file "),(0,c.Q3)(" eslint-disable-next-line vue/no-v-html "),(0,c.Lk)("span",{class:"tw-contents",innerHTML:l.item.FileIcon},null,8,cv),(0,c.Lk)("span",uv,(0,W.v_)(l.item.DisplayName),1),(0,c.bF)((0,Re.R1)(Z.Ah),{name:s(l.item.DiffStatus).name,class:(0,W.C4)(s(l.item.DiffStatus).classes)},null,8,["name","class"])],10,lv))}}}),fv=(0,Xi.A)(dv,[["__scopeId","data-v-a138c97c"]]);const hv={key:0,class:"diff-file-tree-items"},_h="diff_file_tree_visible";var mv=(0,c.pM)({__name:"DiffFileTree",setup(e){const t=ed();(0,c.sV)(()=>{t.fileTreeIsVisible=localStorage.getItem(_h)!=="false",document.querySelector(".diff-toggle-file-tree-button").addEventListener("click",s),i(),window.addEventListener("hashchange",i)}),(0,c.hi)(()=>{document.querySelector(".diff-toggle-file-tree-button").removeEventListener("click",s),window.removeEventListener("hashchange",i)});function i(){t.selectedItem=window.location.hash,n()}function n(){if(t.selectedItem){const m=document.querySelector(t.selectedItem);m?.getAttribute("data-folded")==="true"&&Ba(m,m.querySelector(".fold-file"),!1)}}function s(){l(!t.fileTreeIsVisible)}function l(m){t.fileTreeIsVisible=m,localStorage.setItem(_h,t.fileTreeIsVisible.toString()),u(t.fileTreeIsVisible)}function u(m){const y=document.querySelector(".diff-toggle-file-tree-button"),[A,L]=y.querySelectorAll(".icon"),z=document.querySelector("#diff-file-tree"),X=y.getAttribute(m?"data-hide-text":"data-show-text");y.setAttribute("data-tooltip-content",X),(0,C.oi)(z,m),(0,C.oi)(A,!m),(0,C.oi)(L,m)}return(m,y)=>(0,Re.R1)(t).fileTreeIsVisible?((0,c.uX)(),(0,c.CE)("div",hv,[(0,c.Q3)(" only render the tree if we're visible. in many cases this is something that doesn't change very often "),((0,c.uX)(!0),(0,c.CE)(c.FK,null,(0,c.pI)((0,Re.R1)(t).diffFileTree.TreeRoot.Children,A=>((0,c.uX)(),(0,c.Wv)(fv,{key:A.FullName,item:A},null,8,["item"]))),128))])):(0,c.Q3)("v-if",!0)}}),pv=(0,Xi.A)(mv,[["__scopeId","data-v-12a35ef6"]]);function gv(){const e=document.querySelector("#diff-file-tree");if(!e)return;Ai(pv).mount(e)}const vv={class:"ui scrolling dropdown custom diff-commit-selector"},bv=["data-tooltip-content","aria-label","aria-controls","aria-activedescendant"],_v=["id","aria-expanded"],yv={key:0,class:"loading-indicator is-loading"},wv=["id"],Sv={class:"gt-ellipsis"},xv={class:"gt-ellipsis text light-2 tw-mb-0"},jv={class:"gt-ellipsis"},Ev={class:"gt-ellipsis text light-2"},Av={key:3,class:"info text light-2"},Cv=["data-commit-idx","onKeydown","onMouseover","onClick"],kv={class:"tw-flex-1 tw-flex tw-flex-col tw-gap-1"},Tv={class:"gt-ellipsis commit-list-summary"},Lv={class:"gt-ellipsis text light-2"},Rv={class:"text right"},Mv=["datetime"],Dv={class:"tw-font-mono"};function Ov(e,t,i,n,s,l){const u=(0,c.g2)("svg-icon");return(0,c.uX)(),(0,c.CE)("div",vv,[(0,c.Lk)("button",{ref:"expandBtn",class:"ui tiny basic button",onClick:t[0]||(t[0]=Di(m=>e.toggleMenu(),["stop"])),"data-tooltip-content":e.locale.filter_changes_by_commit,"aria-haspopup":"true","aria-label":e.locale.filter_changes_by_commit,"aria-controls":e.uniqueIdMenu,"aria-activedescendant":e.uniqueIdShowAll},[(0,c.bF)(u,{name:"octicon-git-commit"})],8,bv),(0,c.Q3)(' this dropdown is not managed by Fomantic UI, so it needs some classes like "transition" explicitly '),(0,c.bo)((0,c.Lk)("div",{class:(0,W.C4)(["left menu transition",{visible:e.menuVisible}]),id:e.uniqueIdMenu,"aria-expanded":e.menuVisible?"true":"false"},[e.isLoading?((0,c.uX)(),(0,c.CE)("div",yv)):(0,c.Q3)("v-if",!0),e.isLoading?(0,c.Q3)("v-if",!0):((0,c.uX)(),(0,c.CE)("div",{key:1,class:"item",id:e.uniqueIdShowAll,ref:"showAllChanges",role:"menuitem",onKeydown:t[1]||(t[1]=se(m=>e.showAllChanges(),["enter"])),onClick:t[2]||(t[2]=m=>e.showAllChanges())},[(0,c.Lk)("div",Sv,(0,W.v_)(e.locale.show_all_commits),1),(0,c.Lk)("div",xv,(0,W.v_)(e.locale.stats_num_commits),1)],40,wv)),(0,c.Q3)(" only show the show changes since last review if there is a review AND we are commits ahead of the last review "),e.lastReviewCommitSha!=null?((0,c.uX)(),(0,c.CE)("div",{key:2,class:(0,W.C4)(["item",{disabled:!e.commitsSinceLastReview}]),role:"menuitem",onKeydown:t[3]||(t[3]=se(m=>e.changesSinceLastReviewClick(),["enter"])),onClick:t[4]||(t[4]=m=>e.changesSinceLastReviewClick())},[(0,c.Lk)("div",jv,(0,W.v_)(e.locale.show_changes_since_your_last_review),1),(0,c.Lk)("div",Ev,(0,W.v_)(e.commitsSinceLastReview)+" commits ",1)],34)):(0,c.Q3)("v-if",!0),e.isLoading?(0,c.Q3)("v-if",!0):((0,c.uX)(),(0,c.CE)("span",Av,(0,W.v_)(e.locale.select_commit_hold_shift_for_range),1)),((0,c.uX)(!0),(0,c.CE)(c.FK,null,(0,c.pI)(e.commits,(m,y)=>((0,c.uX)(),(0,c.CE)("div",{key:m.id,class:(0,W.C4)(["item",{selected:m.selected,hovered:m.hovered}]),role:"menuitem","data-commit-idx":y,onKeydown:[se(Di(A=>e.commitClicked(m.id),["exact"]),["enter"]),se(Di(A=>e.commitClickedShift(m),["shift","exact"]),["enter"])],onMouseover:Di(A=>e.highlight(m),["shift"]),onClick:[Di(A=>e.commitClicked(m.id),["exact"]),Di(A=>e.commitClicked(m.id,!0),["ctrl","exact"]),Di(A=>e.commitClicked(m.id,!0),["meta","exact"]),Di(A=>e.commitClickedShift(m),["shift","exact","stop","prevent"])]},[(0,c.Lk)("div",kv,[(0,c.Lk)("div",Tv,(0,W.v_)(m.summary),1),(0,c.Lk)("div",Lv,[(0,c.eW)((0,W.v_)(m.committer_or_author_name)+" ",1),(0,c.Lk)("span",Rv,[(0,c.Q3)(" TODO: make this respect the PreferredTimestampTense setting "),(0,c.Lk)("relative-time",{prefix:"",datetime:m.time,"data-tooltip-content":"","data-tooltip-interactive":"true"},(0,W.v_)(m.time),9,Mv)])])]),(0,c.Lk)("div",Dv,(0,W.v_)(m.short_sha),1)],42,Cv))),128))],10,_v),[[ti,e.menuVisible]])])}var qv=(0,c.pM)({components:{SvgIcon:Z.Ah},data:()=>{const e=document.querySelector("#diff-commit-select");return{menuVisible:!1,isLoading:!1,queryParams:e.getAttribute("data-queryparams"),issueLink:e.getAttribute("data-issuelink"),locale:{filter_changes_by_commit:e.getAttribute("data-filter_changes_by_commit")},mergeBase:e.getAttribute("data-merge-base"),commits:[],hoverActivated:!1,lastReviewCommitSha:"",uniqueIdMenu:(0,ke.Ae)(),uniqueIdShowAll:(0,ke.Ae)()}},computed:{commitsSinceLastReview(){return this.lastReviewCommitSha?this.commits.length-this.commits.findIndex(e=>e.id===this.lastReviewCommitSha)-1:0}},mounted(){document.body.addEventListener("click",this.onBodyClick),this.$el.addEventListener("keydown",this.onKeyDown),this.$el.addEventListener("keyup",this.onKeyUp)},unmounted(){document.body.removeEventListener("click",this.onBodyClick),this.$el.removeEventListener("keydown",this.onKeyDown),this.$el.removeEventListener("keyup",this.onKeyUp)},methods:{onBodyClick(e){this.$el.contains(e.target)||this.menuVisible&&this.toggleMenu()},onKeyDown(e){if(!this.menuVisible)return;const t=document.activeElement;if(this.$el.contains(t)){switch(e.key){case"ArrowDown":e.preventDefault(),this.focusElem(t.nextElementSibling,t);break;case"ArrowUp":e.preventDefault(),this.focusElem(t.previousElementSibling,t);break;case"Escape":e.preventDefault(),t.tabIndex=-1,this.toggleMenu();break}if(e.key==="ArrowDown"||e.key==="ArrowUp"){const i=document.activeElement,n=i?.matches(".item")?i.getAttribute("data-commit-idx"):null;n&&this.highlight(this.commits[Number(n)])}}},onKeyUp(e){if(!this.menuVisible)return;const t=document.activeElement;if(this.$el.contains(t)&&e.key==="Shift"&&this.hoverActivated){this.hoverActivated=!1;for(const i of this.commits)i.hovered=!1,i.selected=!1}},highlight(e){if(!this.hoverActivated)return;const t=this.commits.findIndex(n=>n.selected),i=this.commits.findIndex(n=>n.id===e.id);for(const[n,s]of this.commits.entries())s.hovered=Math.min(t,i)<=n&&n<=Math.max(t,i)},focusElem(e,t){e&&(e.tabIndex=0,t&&(t.tabIndex=-1),e.focus())},async toggleMenu(){if(this.menuVisible=!this.menuVisible,!this.commits.length&&this.menuVisible&&!this.isLoading){this.isLoading=!0;try{await this.fetchCommits()}finally{this.isLoading=!1}}this.$nextTick(()=>{this.menuVisible?this.focusElem(this.$refs.showAllChanges,this.$refs.expandBtn):this.focusElem(this.$refs.expandBtn,this.$refs.showAllChanges)})},async fetchCommits(){const t=await(await(0,Ae.fG)(`${this.issueLink}/commits/list`)).json();this.commits.push(...t.commits.map(i=>(i.hovered=!1,i))),this.commits.reverse(),this.lastReviewCommitSha=t.last_review_commit_sha||null,this.lastReviewCommitSha&&!this.commits.some(i=>i.id===this.lastReviewCommitSha)&&(this.lastReviewCommitSha=null),Object.assign(this.locale,t.locale)},showAllChanges(){window.location.assign(`${this.issueLink}/files${this.queryParams}`)},changesSinceLastReviewClick(){window.location.assign(`${this.issueLink}/files/${this.lastReviewCommitSha}..${this.commits.at(-1).id}${this.queryParams}`)},commitClicked(e,t=!1){const i=`${this.issueLink}/commits/${e}${this.queryParams}`;t?window.open(i):window.location.assign(i)},commitClickedShift(e){if(this.hoverActivated=!this.hoverActivated,e.selected=!0,!this.hoverActivated){const t=this.commits.findIndex(l=>l.selected),i=this.commits.findLastIndex(l=>l.selected);let n;t===0?n=this.mergeBase:n=this.commits[t-1].id;const s=this.commits[i].id;t===i?window.location.assign(`${this.issueLink}/commits/${s}${this.queryParams}`):n===this.mergeBase&&s===this.commits.at(-1).id?window.location.assign(`${this.issueLink}/files${this.queryParams}`):window.location.assign(`${this.issueLink}/files/${n}..${s}${this.queryParams}`)}}}}),Pv=(0,Xi.A)(qv,[["render",Ov],["__scopeId","data-v-c589fa0e"]]);function Fv(){const e=document.querySelector("#diff-commit-select");if(!e)return;Ai(Pv).mount(e)}const{pageData:Iv}=window.config,Ua=Iv.prReview||{},yh="viewed-file-checked-form",wh=".viewed-file-form",Nv="#expand-files-btn",Hv="#collapse-files-btn";function Sh(){document.querySelector("#viewed-files-summary")?.setAttribute("value",Ua.numberOfViewedFiles);const t=document.querySelector("#viewed-files-summary-label");t&&(t.innerHTML=t.getAttribute("data-text-changed-template").replace("%[1]d",Ua.numberOfViewedFiles).replace("%[2]d",Ua.numberOfFiles))}function Bv(){Ua.numberOfViewedFiles=document.querySelectorAll(`${wh} > input[type=checkbox][checked]`).length,Sh()}function xh(){for(const e of document.querySelectorAll(`${wh}:not([data-has-viewed-checkbox-listener="true"])`)){e.setAttribute("data-has-viewed-checkbox-listener",String(!0));const t=e.querySelector("input[type=checkbox]");t.addEventListener("input",function(){this.checked?(e.classList.add(yh),t.setAttribute("checked",""),Ua.numberOfViewedFiles++):(e.classList.remove(yh),t.removeAttribute("checked"),Ua.numberOfViewedFiles--),Sh(),e.parentNode.querySelector(".changed-since-last-review")?.remove();const n=t.getAttribute("name");iv(ed(),n,this.checked);const s={};s[n]=this.checked;const l={files:s},u=e.getAttribute("data-headcommit");u&&(l.headCommitSHA=u),(0,Ae.LO)(e.getAttribute("data-link"),{data:l});const m=e.closest(".diff-file-header");Ba(m.closest(".file-content"),m.querySelector(".fold-file"),this.checked)})}}function $v(){document.querySelector(Nv)?.addEventListener("click",()=>{for(const e of document.querySelectorAll('.file-content[data-folded="true"]'))Ba(e,e.querySelector(".fold-file"),!1)}),document.querySelector(Hv)?.addEventListener("click",()=>{for(const e of document.querySelectorAll('.file-content:not([data-folded="true"])'))e.getAttribute("id")!=="diff-incomplete"&&Ba(e,e.querySelector(".fold-file"),!0)})}const{i18n:Uv}=window.config;function Vv(e){(0,C.jB)(e,".file-view-toggle",t=>t.addEventListener("click",()=>{(0,C.D6)(t,".file-view-toggle",n=>n.classList.remove("active")),t.classList.add("active");const i=document.querySelector(t.getAttribute("data-toggle-selector"));if(!i)throw new Error("Target element not found");(0,C.y9)((0,C.D6)(i)),(0,C.fi)(i)}))}function Wv(){(0,C.ny)(document,"submit",".conversation-holder form",async(e,t)=>{t.preventDefault();const i=e.querySelector("textarea");if(hh(i)&&!e.classList.contains("is-loading"))try{e.classList.add("is-loading");const n=new FormData(e),s=(0,C.IU)(t);(s?.nodeName==="BUTTON"||s?.nodeName==="INPUT"&&s.type==="submit")&&s.name&&n.append(s.name,s.value);const u=e.closest("tr")?.getAttribute("data-line-type"),m=await(0,Ae.LO)(e.getAttribute("action"),{data:n}),y=(0,C.SL)(await m.text()),A=y.getAttribute("data-path"),L=y.getAttribute("data-side"),z=y.getAttribute("data-idx");if(e.closest(".conversation-holder").replaceWith(y),e=null,u){let X;u==="same"?X=`[data-path="${A}"] .add-code-comment[data-idx="${z}"]`:X=`[data-path="${A}"] .add-code-comment[data-side="${L}"][data-idx="${z}"]`;for(const _e of document.querySelectorAll(X))_e.classList.add("tw-invisible")}if(!s||s?.matches('button[name="pending_review"]')){const X=document.querySelector("#review-box"),_e=X?.querySelector(".review-comments-counter");if(!_e)return;const pe=parseInt(_e.getAttribute("data-pending-comment-number"))+1||1;_e.setAttribute("data-pending-comment-number",String(pe)),_e.textContent=String(pe),(0,C.b7)(X,"pulse-1p5-200")}}catch(n){console.error("Error:",n),gt(Uv.network_error)}finally{e?.classList.remove("is-loading")}}),(0,C.ny)(document,"click",".resolve-conversation",async(e,t)=>{t.preventDefault();const i=e.getAttribute("data-comment-id"),n=e.getAttribute("data-origin"),s=e.getAttribute("data-action"),l=e.getAttribute("data-update-url");try{const m=await(await(0,Ae.LO)(l,{data:new URLSearchParams({origin:n,action:s,comment_id:i})})).text(),y=e.closest(".conversation-holder");if(y){const A=(0,C.SL)(m);y.replaceWith(A)}else window.location.reload()}catch(u){console.error("Error:",u)}})}function zv(){(0,C.ny)(document,"click",".previous-conversation, .next-conversation",(e,t)=>{t.preventDefault();const i=e.matches(".previous-conversation"),n=e.closest(".comment-code-cloud"),s=document.querySelectorAll(".comment-code-cloud:not(.tw-hidden)"),l=Array.from(s).indexOf(n),u=l>0?l-1:s.length-1,m=l<s.length-1?l+1:0,L=s[i?u:m].querySelector(".comment").id;window.location.href=`#${L}`})}function jh(){for(const e of document.querySelectorAll(".diff-header-popup-btn:not([data-header-popup-initialized])")){e.setAttribute("data-header-popup-initialized","");const t=e.nextElementSibling;if(!t?.matches(".tippy-target"))throw new Error("Popup element not found");Ie(e,{content:t,theme:"menu",placement:"bottom",trigger:"click",interactive:!0,hideOnClick:!0})}}function Eh(){tf(),xh(),Bv(),Ld(),jh()}async function Ah(e){if(e.classList.contains("disabled"))return!1;e.classList.add("disabled");const t=e.getAttribute("data-href");try{const n=await(await(0,Ae.fG)(t)).text(),l=(0,St.a8)(n,"text/html").querySelector("#diff-file-boxes");return document.querySelector("#diff-incomplete").replaceWith(...Array.from(l.children)),Eh(),!0}catch(i){console.error("Error:",i),gt("An error occurred while loading more files.")}finally{e.classList.remove("disabled")}return!1}function Kv(){(0,C.ny)(document,"click","a#diff-show-more-files",(e,t)=>{t.preventDefault(),Ah(e)}),(0,C.ny)(document,"click","a.diff-load-button",async(e,t)=>{if(t.preventDefault(),e.classList.contains("disabled"))return;e.classList.add("disabled");const i=e.getAttribute("data-href");try{const s=await(await(0,Ae.fG)(i)).text(),u=(0,St.a8)(s,"text/html").querySelector("#diff-file-boxes .diff-file-body .file-body"),m=Array.from(u.children);e.parentElement.replaceWith(...m);for(const y of m)window.htmx.process(y);Eh()}catch(n){console.error("Error:",n)}finally{e.classList.remove("disabled")}})}async function Ch(){const e=window.location.hash;if(!(!e.startsWith("#diff-")&&!e.startsWith("#issuecomment-")))for(;;){const t=document.getElementById(e.substring(1));if(t){t.scrollIntoView();return}const i=document.querySelector("#diff-show-more-files");if(!i||!await Ah(i))return}}function Xv(){window.addEventListener("hashchange",Ch),Ch()}function Gv(){Wv(),document.querySelector("#diff-file-boxes")&&(zv(),gv(),Fv(),Kv(),jh(),xh(),$v(),Xv(),yc("#diff-file-boxes .diff-file-box",Vv),(0,C.ny)(document,"click",".fold-file",e=>{ng(e.closest(".file-content"),e)}))}const{appSubUrl:Qv}=window.config;function Yv(){const e=document.querySelector(".page-content.organization.new.team");e&&(0,C.jB)(e,"input[name=permission]",t=>t.addEventListener("change",()=>{const i=e.querySelector("input[name=permission]:checked")?.value;(0,C.oi)(e.querySelectorAll(".team-units"),i!=="admin")}))}function Jv(){const e=(0,ke.mD)("#search-repo-box");e.search({minCharacters:2,apiSettings:{url:`${Qv}/repo/search?q={query}&uid=${e.data("uid")}`,onResponse(t){const i=[];for(const n of t.data)i.push({title:n.repository.full_name.split("/")[1],description:n.repository.full_name});return{results:i}}},searchFields:["full_name"],showNoResults:!1})}function Zv(){document.querySelector(".page-content.organization")&&(Yv(),Jv())}const{appSubUrl:Mo}=window.config;async function eb(){const e=document.querySelector(".user.signin.webauthn-prompt"),t=document.querySelector(".signin-passkey");if(!(!e&&!t)){if(!window.isSecureContext){(0,C.y9)(t);return}Th()&&(t&&t.addEventListener("click",tb),e&&ib())}}async function tb(){const e=await(0,Ae.fG)(`${Mo}/user/webauthn/passkey/assertion`);if(!e.ok){Ds("unknown");return}const t=await e.json();t.publicKey.challenge=(0,St.vd)(t.publicKey.challenge);for(const i of t.publicKey.allowCredentials??[])i.id=(0,St.vd)(i.id);try{const i=await navigator.credentials.get({publicKey:t.publicKey}),n=i.response,s=new Uint8Array(n.authenticatorData),l=new Uint8Array(n.clientDataJSON),u=new Uint8Array(i.rawId),m=new Uint8Array(n.signature),y=new Uint8Array(n.userHandle),A=await(0,Ae.LO)(`${Mo}/user/webauthn/passkey/login`,{data:{id:i.id,rawId:(0,St.vh)(u),type:i.type,clientExtensionResults:i.getClientExtensionResults(),response:{authenticatorData:(0,St.vh)(s),clientDataJSON:(0,St.vh)(l),signature:(0,St.vh)(m),userHandle:(0,St.vh)(y)}}});if(A.status===500){Ds("unknown");return}else if(!A.ok){Ds("unable-to-process");return}const L=await A.json();window.location.href=L?.redirect??`${Mo}/`}catch(i){Ds("general",i.message)}}async function ib(){const e=await(0,Ae.fG)(`${Mo}/user/webauthn/assertion`);if(!e.ok){Ds("unknown");return}const t=await e.json();t.publicKey.challenge=(0,St.vd)(t.publicKey.challenge);for(const i of t.publicKey.allowCredentials??[])i.id=(0,St.vd)(i.id);try{const i=await navigator.credentials.get({publicKey:t.publicKey});await kh(i)}catch(i){if(!t.publicKey.extensions?.appid){Ds("general",i.message);return}delete t.publicKey.extensions.appid;try{const n=await navigator.credentials.get({publicKey:t.publicKey});await kh(n)}catch(n){Ds("general",n.message)}}}async function kh(e){const t=new Uint8Array(e.response.authenticatorData),i=new Uint8Array(e.response.clientDataJSON),n=new Uint8Array(e.rawId),s=new Uint8Array(e.response.signature),l=new Uint8Array(e.response.userHandle),u=await(0,Ae.LO)(`${Mo}/user/webauthn/assertion`,{data:{id:e.id,rawId:(0,St.vh)(n),type:e.type,clientExtensionResults:e.getClientExtensionResults(),response:{authenticatorData:(0,St.vh)(t),clientDataJSON:(0,St.vh)(i),signature:(0,St.vh)(s),userHandle:(0,St.vh)(l)}}});if(u.status===500){Ds("unknown");return}else if(!u.ok){Ds("unable-to-process");return}const m=await u.json();window.location.href=m?.redirect??`${Mo}/`}async function nb(e){const t=new Uint8Array(e.response.attestationObject),i=new Uint8Array(e.response.clientDataJSON),n=new Uint8Array(e.rawId),s=await(0,Ae.LO)(`${Mo}/user/settings/security/webauthn/register`,{data:{id:e.id,rawId:(0,St.vh)(n),type:e.type,response:{attestationObject:(0,St.vh)(t),clientDataJSON:(0,St.vh)(i)}}});if(s.status===409){Ds("duplicated");return}else if(s.status!==201){Ds("unknown");return}window.location.reload()}function Ds(e,t=""){const i=document.querySelector("#webauthn-error-msg");if(e==="general")i.textContent=t||"unknown error";else{const n=document.querySelector(`#webauthn-error [data-webauthn-error-msg=${e}]`);n?i.textContent=`${n.textContent}${t?` ${t}`:""}`:i.textContent=`unknown error type: ${e}${t?` ${t}`:""}`}(0,C.fi)("#webauthn-error")}function Th(){return window.isSecureContext?typeof window.PublicKeyCredential!="function"?(Ds("browser"),!1):!0:(Ds("insecure"),!1)}function sb(){const e=document.querySelector("#register-webauthn");if(e){if(!Th()){e.disabled=!0;return}e.addEventListener("click",async t=>{t.preventDefault(),await rb()})}}async function rb(){const e=document.querySelector("#nickname"),t=new FormData;t.append("name",e.value);const i=await(0,Ae.LO)(`${Mo}/user/settings/security/webauthn/request_register`,{data:t});if(i.status===409){Ds("duplicated");return}else if(!i.ok){Ds("unknown");return}const n=await i.json();if(e.closest("div.field").classList.remove("error"),n.publicKey.challenge=(0,St.vd)(n.publicKey.challenge),n.publicKey.user.id=(0,St.vd)(n.publicKey.user.id),n.publicKey.excludeCredentials)for(const s of n.publicKey.excludeCredentials)s.id=(0,St.vd)(s.id);try{const s=await navigator.credentials.create({publicKey:n.publicKey});await nb(s)}catch(s){Ds("unknown",s)}}function ob(){document.addEventListener("click",e=>{if(e.target.matches(".remove-rel-attach")){const t=e.target.getAttribute("data-uuid"),i=e.target.getAttribute("data-id");document.querySelector(`input[name='attachment-del-${t}']`).value="true",(0,C.y9)(`#attachment-${i}`)}})}function ab(){document.querySelector(".repository.new.release")&&lb()}function lb(){const e=document.querySelector("#tag-name-editor");if(!e)return;const t=JSON.parse(e.getAttribute("data-existing-tags"));if(!Array.isArray(t))return;const i=e.getAttribute("data-tag-helper"),n=e.getAttribute("data-tag-helper-new"),s=e.getAttribute("data-tag-helper-existing"),l=document.querySelector("#tag-name"),u=function(m){const y=m.value,A=document.querySelector("#tag-helper");t.includes(y)?((0,C.y9)("#tag-target-selector"),A.textContent=s):((0,C.fi)("#tag-target-selector"),A.textContent=y?n:i)};u(l),l.addEventListener("input",m=>{u(m.target)})}const{appSubUrl:cb}=window.config,ub=/^\S+@\S+$/;function db(){const e=document.querySelector("#search-user-box");if(!e)return;const t=e.getAttribute("data-allow-email")==="true",i=e.getAttribute("data-allow-email-description")??void 0;(0,ke.mD)(e).search({minCharacters:2,apiSettings:{url:`${cb}/user/search_candidates?q={query}`,onResponse(n){const s=[],l=e.querySelector("input").value,u=l.toUpperCase();for(const m of n.data){const y={title:m.login,image:m.avatar_url,description:R(m.full_name)};u===m.login.toUpperCase()?s.unshift(y):s.push(y)}if(t&&!s.length&&ub.test(l)){const m={title:l,description:i};s.push(m)}return{results:s}}},searchFields:["login","full_name"],showNoResults:!1})}function fb(){const e=document.querySelector(".page-content.install");e&&(e.classList.contains("post-install")?mb():hb())}function hb(){const e="gitea",t="gitea",i={mysql:"127.0.0.1:3306",postgres:"127.0.0.1:5432",mssql:"127.0.0.1:1433"},n=document.querySelector("#db_host"),s=document.querySelector("#db_user"),l=document.querySelector("#db_name");document.querySelector("#db_type").addEventListener("change",function(){const y=this.value;if((0,C.y9)("div[data-db-setting-for]"),(0,C.fi)(`div[data-db-setting-for=${y}]`),y!=="sqlite3"){(0,C.fi)("div[data-db-setting-for=common-host]");const A=n.value;(!A||Object.values(i).includes(A))&&(n.value=i[y]??""),!s.value&&!l.value&&(s.value=e,l.value=t)}}),document.querySelector("#db_type").dispatchEvent(new Event("change"));const u=document.querySelector("#app_url");u.value.includes("://localhost")&&(u.value=window.location.href);const m=document.querySelector("#domain");m.value.trim()==="localhost"&&(m.value=window.location.hostname),document.querySelector("#offline-mode input").addEventListener("change",function(){this.checked&&(document.querySelector("#disable-gravatar input").checked=!0,document.querySelector("#federated-avatar-lookup input").checked=!1)}),document.querySelector("#disable-gravatar input").addEventListener("change",function(){this.checked?document.querySelector("#federated-avatar-lookup input").checked=!1:document.querySelector("#offline-mode input").checked=!1}),document.querySelector("#federated-avatar-lookup input").addEventListener("change",function(){this.checked&&(document.querySelector("#disable-gravatar input").checked=!1,document.querySelector("#offline-mode input").checked=!1)}),document.querySelector("#enable-openid-signin input").addEventListener("change",function(){this.checked?document.querySelector("#disable-registration input").checked||(document.querySelector("#enable-openid-signup input").checked=!0):document.querySelector("#enable-openid-signup input").checked=!1}),document.querySelector("#disable-registration input").addEventListener("change",function(){this.checked?(document.querySelector("#enable-captcha input").checked=!1,document.querySelector("#enable-openid-signup input").checked=!1):document.querySelector("#enable-openid-signup input").checked=!0}),document.querySelector("#enable-captcha input").addEventListener("change",function(){this.checked&&(document.querySelector("#disable-registration input").checked=!1)})}function mb(){const e=document.querySelector("#goto-user-login");if(!e)return;const t=e.getAttribute("href");let i=setInterval(async()=>{try{const n=await(0,Ae.fG)(t);i&&n.status===200&&(clearInterval(i),i=null,window.location.href=t)}catch{}},1e3)}function pb(){if(!document.querySelectorAll(".new.webhook").length)return;for(const t of document.querySelectorAll(".events.checkbox input"))t.addEventListener("change",function(){this.checked&&(0,C.fi)(".events.fields")});for(const t of document.querySelectorAll(".non-events.checkbox input"))t.addEventListener("change",function(){this.checked&&(0,C.y9)(".events.fields")});const e=document.querySelector("#http_method");if(e){const t=function(){const i=e.value==="POST";(0,C.oi)(document.querySelector("#content_type").closest(".field"),i)};t(),e.addEventListener("change",t)}document.querySelector("#test-delivery")?.addEventListener("click",async function(){this.classList.add("is-loading","disabled"),await(0,Ae.LO)(this.getAttribute("data-link")),setTimeout(()=>{window.location.href=this.getAttribute("data-redirect")},5e3)})}function gb(){vb(),bb()}function vb(){for(const e of document.querySelectorAll(".show-create-branch-modal"))e.addEventListener("click",()=>{const t=e.getAttribute("data-modal-form")||"#create-branch-form",i=document.querySelector(t);if(!i)return;i.action=`${i.getAttribute("data-base-action")}${e.getAttribute("data-branch-from-urlcomponent")}`;const n=e.getAttribute("data-modal-from-span")||"#modal-create-branch-from-span";document.querySelector(n).textContent=e.getAttribute("data-branch-from"),(0,ke.mD)(e.getAttribute("data-modal")).modal("show")})}function bb(){for(const e of document.querySelectorAll(".show-rename-branch-modal"))e.addEventListener("click",()=>{const t=e.getAttribute("data-modal"),i=document.querySelector(t),n=e.getAttribute("data-old-branch-name");i.querySelector("input[name=from]").value=n;const s=i.querySelector(".default-branch-warning");(0,C.oi)(s,e.getAttribute("data-is-default-branch")==="true");const l=i.querySelector("[data-rename-branch-to]");l.textContent=l.getAttribute("data-rename-branch-to").replace("%s",n)})}function _b(e){return/.*[^/]\/[^/].*/.test(e)}function Lh(e){const t=document.querySelector(e);if(!t)return;const i=t.querySelector("#issue-label-edit-modal");if(!i)return;const n=i.querySelector('input[name="id"]'),s=i.querySelector(".label-name-input"),l=i.querySelector(".label-exclusive-input-field"),u=i.querySelector(".label-exclusive-input"),m=i.querySelector(".label-exclusive-warning"),y=i.querySelector(".label-exclusive-order-input-field"),A=i.querySelector(".label-exclusive-order-input"),L=i.querySelector(".label-is-archived-input-field"),z=i.querySelector(".label-is-archived-input"),X=i.querySelector(".label-desc-input"),_e=i.querySelector(".js-color-picker-input input"),pe=()=>{const Te=_b(s.value);l.classList.toggle("disabled",!Te);const He=Te&&u.checked&&i.hasAttribute("data-need-warn-exclusive");(0,C.oi)(m,He),Te||(u.checked=!1),(0,C.oi)(y,u.checked),parseInt(A.value)<=0?A.style.color="var(--color-placeholder-text) !important":A.style.color=null},de=Te=>{const He=i.querySelector("form");n.value=Te.getAttribute("data-label-id")||"",s.value=Te.getAttribute("data-label-name")||"",A.value=Te.getAttribute("data-label-exclusive-order")||"0",z.checked=Te.getAttribute("data-label-is-archived")==="true",u.checked=Te.getAttribute("data-label-exclusive")==="true",X.value=Te.getAttribute("data-label-description")||"",_e.value=Te.getAttribute("data-label-color")||"",_e.dispatchEvent(new Event("input",{bubbles:!0}));const U=!!n.value,Se=parseInt(Te.getAttribute("data-label-num-issues")||"0");i.toggleAttribute("data-need-warn-exclusive",!u.checked&&Se>0),i.querySelector(".header").textContent=U?i.getAttribute("data-text-edit-label"):i.getAttribute("data-text-new-label");const ze=i.getAttribute("data-current-page-link");He.action=U?`${ze}/edit`:`${ze}/new`,(0,C.oi)(L,U),pe(),(0,ke.mD)(i).modal({onApprove(){if(!He.checkValidity())return He.reportValidity(),!1;He.submit()}}).modal("show")};i.addEventListener("input",()=>pe());const Pe=t.querySelector(".ui.button.new-label");Pe?.addEventListener("click",()=>de(Pe));const Le=t.querySelectorAll(".edit-label-button");for(const Te of Le)Te.addEventListener("click",He=>{He.preventDefault(),de(Te)})}function yb(){document.querySelectorAll(".organization").length&&(document.querySelector(".organization.settings.options #org_name")?.addEventListener("input",function(){const e=this.value.toLowerCase()!==this.getAttribute("data-org-name").toLowerCase();(0,C.oi)("#org-name-change-prompt",e)}),Lh(".page-content.organization.settings.labels"))}var wb=__webpack_require__("./node_modules/jquery/dist/jquery.js"),Mn=__webpack_require__.n(wb);function Sb(){for(const e of document.querySelectorAll(".ui.checkbox")){if(e.hasAttribute("data-checkbox-patched"))continue;const t=e.querySelector("label"),i=e.querySelector("input");!t||!i||((0,ke.iZ)(t,i),e.setAttribute("data-checkbox-patched","true"))}}function xb(){for(const e of document.querySelectorAll(".ui.form .field")){if(e.hasAttribute("data-field-patched"))continue;const t=e.querySelector(":scope > label"),i=e.querySelector(":scope > input");!t||!i||((0,ke.iZ)(t,i),e.setAttribute("data-field-patched","true"))}}const Ar="_giteaAriaPatchDropdown",td=Mn().fn.dropdown;function jb(){if(Mn().fn.dropdown===id)throw new Error("initAriaDropdownPatch could only be called once");Mn().fn.dropdown.settings.onAfterFiltered=Eb,Mn().fn.dropdown=id,Mn().fn.fomanticExt.onResponseKeepSelectedItem=Rb,id.settings=td.settings}function id(...e){const t=td.apply(this,e);for(let i of this){i=i.closest(".ui.dropdown"),i[Ar]||kb(i);const n=Mn()(i),s=n.data("module-dropdown");s.giteaDelegated||(s.giteaDelegated=!0,Ab(n))}return t}function Rh(e,t){t.id||(t.id=(0,ke.Ae)()),t.setAttribute("role",e[Ar].listItemRole),t.setAttribute("tabindex","-1");for(const i of t.querySelectorAll("a, input, button"))i.setAttribute("tabindex","-1")}function Mh(e){e.id||(e.id=(0,ke.Ae)()),e.tabIndex=-1;const t=e.querySelector(".delete.icon");t&&(t.setAttribute("aria-hidden","false"),t.setAttribute("aria-label",window.config.i18n.remove_label_str.replace("%s",e.getAttribute("data-value"))),t.setAttribute("role","button"))}function Eb(){const e=Mn()(this).closest(".ui.dropdown"),t=e.dropdown("setting","hideDividers")==="empty",i=e[0].querySelector(".scrolling.menu")||e[0].querySelector(".menu");t&&i&&Lb(i)}function Ab(e){const t=td.bind(e),i={...t("setting","templates"),t:performance.now()},n=i.menu;i.menu=function(m,y,A,L){const z=n(m,y,A,L),X=document.createElement("div");X.innerHTML=z;const _e=Mn()(X);return _e.find("> .item").each((de,Pe)=>Rh(e[0],Pe)),e[0][Ar].deferredRefreshAriaActiveItem(),_e.html()},t("setting","templates",i);const s=t("setting","onLabelCreate");t("setting","onLabelCreate",function(m,y){const A=s.call(this,m,y);return Mh(A[0]),A});const l=t("internal","set"),u=l.direction;l.direction=function(m){u.call(this,m);const y=t("setting","className");m=m||e.find("> .menu");const A=m[0];A.classList.add(y.loading),A.getBoundingClientRect().right>document.documentElement.clientWidth&&A.classList.add(y.leftward),A.classList.remove(y.loading)}}function Cb(e,t,i){i.id||(i.id=(0,ke.Ae)()),Mn()(i).find("> .item").each((s,l)=>Rh(e,l)),i.setAttribute("role",e[Ar].listPopupRole);for(const s of e.querySelectorAll(".ui.label"))Mh(s);t.setAttribute("role",t.getAttribute("role")??e[Ar].focusableRole),t.setAttribute("aria-haspopup",e[Ar].listPopupRole),t.setAttribute("aria-controls",i.id),t.setAttribute("aria-expanded","false");const n=e.getAttribute("data-tooltip-content");n&&!e.getAttribute("aria-label")&&e.setAttribute("aria-label",n)}function kb(e){e[Ar]={};const t=e.querySelector("input.search"),i=t||e;if(!i)return;t&&!t.getAttribute("autocomplete")&&t.setAttribute("autocomplete","off");let n=Mn()(e).find("> .menu")[0];n||(n=document.createElement("div"),n.classList.add("menu"),e.append(n));const s=e.querySelectorAll("input").length>0;e[Ar].focusableRole=s?"combobox":"menu",e[Ar].listPopupRole=s?"listbox":"",e[Ar].listItemRole=s?"option":"menuitem",Tb(e,i,n),Cb(e,i,n)}function Tb(e,t,i){const n=()=>i.classList.contains("visible")&&!i.classList.contains("out")||i.classList.contains("in"),s=()=>{const y=n();t.setAttribute("aria-expanded",y?"true":"false");const A=Mn()(i).find("> .item.active, > .item.selected")[0];A&&(y?t.setAttribute("aria-activedescendant",A.id):e[Ar].listPopupRole==="menu"&&(t.removeAttribute("aria-activedescendant"),A.classList.remove("active","selected")))};e.addEventListener("keydown",y=>{if(y.key==="Enter"){const A=i.querySelector(":scope > .item.selected, .menu > .item.selected");A?.matches("a, .js-aria-clickable")&&!A.matches(".tw-hidden, .filtered")&&(y.preventDefault(),A.click())}});const l=(y=0)=>{setTimeout(s,y)};e[Ar].deferredRefreshAriaActiveItem=l,e.addEventListener("keyup",y=>{y.key.startsWith("Arrow")&&l()});let u=0,m=0;e.addEventListener("mousedown",()=>{m+=n()?1:0,u++},!0),e.addEventListener("focus",()=>{m+=n()?1:0,u++,l()},!0),e.addEventListener("blur",()=>{m=u=0,l(100)},!0),e.addEventListener("mouseup",()=>{setTimeout(()=>{m=u=0,l(100)},0)},!0),e.addEventListener("click",y=>{n()&&m!==2&&u===2&&y.stopPropagation(),u=m=0},!0)}function Lb(e){const t=[],i=[];let n="",s="";const l=z=>z.classList.contains("divider"),u=z=>l(z)&&z.hasAttribute("data-scope"),m=z=>z.classList.add("hidden","transition"),y=z=>z.classList.remove("hidden","transition"),A=z=>z.classList.contains("hidden")||z.classList.contains("filtered")||z.classList.contains("tw-hidden"),L=z=>{i.length===1&&u(i[0])?m(i[0]):i.length&&(u(i[0])&&s===n&&(m(i[0]),i.shift()),t.push(...i),s=n),n=z,i.length=0};(0,C.jB)(e,".divider",y);for(const z of e.children){const X=z.getAttribute("data-scope")||"";X!==n&&L(X),A(z)||i.push(z)}for(L("");t.length&&l(t[0]);)m(t[0]),t.shift();for(;t.length&&l(t[t.length-1]);)m(t[t.length-1]),t.pop();for(let z=0;z<t.length-1;z++)t[z].matches(".divider")&&t[z+1].matches(".divider")&&m(t[z])}function Rb(e,t){const i=e instanceof HTMLElement?e:e[0];setTimeout(()=>{(0,C.jB)(i,`.menu .item[data-value="${CSS.escape(t)}"].filtered`,n=>n.classList.remove("filtered")),Mn()(i).dropdown("set selected",t??"")},10)}const Dh=Mn().fn.modal;function Mb(){if(Mn().fn.modal===nd)throw new Error("initAriaModalPatch could only be called once");Mn().fn.modal=nd,nd.settings=Dh.settings}function nd(...e){const t=Dh.apply(this,e);if(e[0]==="show"||e[0]?.autoShow)for(const i of this)for(const n of i.querySelectorAll("form button.cancel:not([type])"))n.setAttribute("type","button");return t}function Db(){const e=new Set(["clear queue","stop","stop all","destroy","force repaint","repaint","reset","looping","remove looping","disable","enable","set duration","save conditions","restore conditions"]);Mn().fn.transition=function(t,i,n){if(t==="is supported")return!0;if(t==="is animating"||t==="is inward"||t==="is outward")return!1;let s;if(typeof t=="string"){if(e.has(t))return this;s={animation:t,...i&&{duration:i},...n&&{onComplete:n}}}else if(typeof t=="object")s=t;else throw new Error(`invalid argument: ${t}`);const l=s.animation?.startsWith("show")||s.animation?.endsWith(" in"),u=s.animation?.startsWith("hide")||s.animation?.endsWith(" out");return this.each((m,y)=>{let A=l;!l&&!u&&(A=this.hasClass("hidden")),s.onStart?.call(y),A?(y.classList.remove("hidden"),y.classList.add("visible","transition"),s.displayType&&y.style.setProperty("display",s.displayType,"important"),s.onShow?.call(y)):(y.classList.add("hidden"),y.classList.remove("visible"),y.style.removeProperty("display"),s.onHidden?.call(y)),s.onComplete?.call(y)}),this}}function Ob(){Mn().fn.dimmer=function(e,t){if(e==="add content"){const i=t,n=document.querySelector("body > .ui.dimmer");n?((0,C.xP)(n,"*",s=>s.classList.add("hidden")),this._dimmer=n):(this._dimmer=document.createElement("div"),this._dimmer.classList.add("ui","dimmer"),document.body.append(this._dimmer)),this._dimmer.append(i[0])}else{if(e==="get dimmer")return Mn()(this._dimmer);if(e==="show")this._dimmer.classList.add("active"),document.body.classList.add("tw-overflow-hidden");else if(e==="hide"){const i=t;this._dimmer.classList.remove("active"),document.body.classList.remove("tw-overflow-hidden"),i()}}return this}}function qb(){Mn().fn.tab=function(){for(const e of this){const t=e.getAttribute("data-tab");t&&e.addEventListener("click",()=>{const i=document.querySelector(`.ui.tab[data-tab="${t}"]`);(0,C.D6)(i,".ui.tab",n=>n.classList.remove("active")),(0,C.D6)(e,"[data-tab]",n=>n.classList.remove("active")),e.classList.add("active"),i.classList.add("active")})}return this}}const Oh=window.matchMedia("only screen and (max-width: 767.98px)");function Pb(){Mn().fn.fomanticExt={},Mn().fn.dropdown.settings.fullTextSearch="exact",Mn().fn.dropdown.settings.className.label+=" tw-cursor-default",Mn().fn.dropdown.settings.templates.label=function(e,t,i,n){const s=Mn().fn.dropdown.settings.templates.escape;return s(t,i)+(0,Z.JW)("octicon-x",16,`${n.delete} icon`)},Db(),Ob(),qb(),Sb(),xb(),jb(),Mb()}async function Fb(){const e=document.querySelector(".repository.wiki .combo-markdown-editor textarea");if(!e)return;const t=document.querySelector(".repository.wiki.new .ui.form"),i=t.querySelector(".combo-markdown-editor");let n,s=!1,l="";const u=async function(){if(s)return;const m=i.querySelector(".EasyMDEContainer .editor-preview-active"),A=i.querySelector(".EasyMDEContainer .editor-preview-active-side")||m,L=e.value;if(n&&A&&l!==L){s=!0;const z=new FormData;z.append("mode",n.previewMode),z.append("context",n.previewContext),z.append("text",L);try{const _e=await(await(0,Ae.LO)(n.previewUrl,{data:z})).text();l=L,A.innerHTML=`<div class="render-content markup ui segment">${_e}</div>`}catch(X){console.error("Error rendering preview:",X)}finally{s=!1,setTimeout(u,1e3)}}else setTimeout(u,1e3)};u(),n=await ma(i,{editorHeights:{minHeight:"300px",height:"calc(100vh - 600px)"},easyMDEOptions:{previewRender:(m,y)=>y.innerHTML,toolbar:["bold","italic","strikethrough","|","heading-1","heading-2","heading-3","heading-bigger","heading-smaller","|","gitea-code-inline","code","quote","|","gitea-checkbox-empty","gitea-checkbox-checked","|","unordered-list","ordered-list","|","link","image","table","horizontal-rule","|","preview","fullscreen","side-by-side","|","gitea-switch-to-textarea"]}}),t.addEventListener("submit",m=>{hh(e)||(m.preventDefault(),m.stopPropagation())})}function qh(e){e&&document.querySelector(".wiki-content-toc details")?.removeAttribute("open")}function Ib(){document.querySelector(".page-content.repository.wiki")&&(Oh.addEventListener("change",e=>qh(e.matches)),qh(Oh.matches),Fb())}function Nb(){(0,C.ny)(document,"click",".escape-button, .unescape-button, .toggle-escape-button",(e,t)=>{t.preventDefault();const i=e.getAttribute("data-unicode-content-selector"),n=i?document.querySelector(i):e.closest(".file-content, .non-diff-file-content"),s=n.querySelector(".file-code, .file-view")??n;if(e.matches(".escape-button"))s.classList.add("unicode-escaped"),(0,C.y9)(e),(0,C.fi)((0,C.D6)(e,".unescape-button"));else if(e.matches(".unescape-button"))s.classList.remove("unicode-escaped"),(0,C.y9)(e),(0,C.fi)((0,C.D6)(e,".escape-button"));else if(e.matches(".toggle-escape-button")){const l=s.classList.contains("unicode-escaped");s.classList.toggle("unicode-escaped",!l),(0,C.oi)(n.querySelectorAll(".unescape-button"),!l),(0,C.oi)(n.querySelectorAll(".escape-button"),l)}})}const{pageData:Ph}=window.config;async function Hb(e,t){const[{Cite:i,plugins:n}]=await Promise.all([__webpack_require__.e("citation-js-core-citation-js-formats-citation-js-bibtex-citation-js-csl").then(__webpack_require__.bind(__webpack_require__,"./node_modules/@citation-js/core/lib-mjs/index.js")),Promise.all([__webpack_require__.e("citation-js-core-citation-js-formats-citation-js-bibtex-citation-js-csl"),__webpack_require__.e("citation-js-formats")]).then(__webpack_require__.t.bind(__webpack_require__,"./node_modules/@citation-js/plugin-software-formats/lib/index.js",23)),Promise.all([__webpack_require__.e("citation-js-core-citation-js-formats-citation-js-bibtex-citation-js-csl"),__webpack_require__.e("citation-js-bibtex")]).then(__webpack_require__.bind(__webpack_require__,"./node_modules/@citation-js/plugin-bibtex/lib-mjs/index.js")),Promise.all([__webpack_require__.e("citation-js-core-citation-js-formats-citation-js-bibtex-citation-js-csl"),__webpack_require__.e("citation-js-csl")]).then(__webpack_require__.bind(__webpack_require__,"./node_modules/@citation-js/plugin-csl/lib-mjs/index.js"))]),{citationFileContent:s}=Ph,l=n.config.get("@bibtex");l.constants.fieldTypes.doi=["field","literal"],l.constants.fieldTypes.version=["field","literal"];const u=new i(s),m=(0,St.kk)()||"en-US",y=u.format("bibliography",{template:"apa",lang:m}),A=u.format("bibtex",{lang:m});t.setAttribute("data-text",A),e.setAttribute("data-text",y)}async function Bb(){const e="apa";if(!Ph.citationFileContent)return;const t=document.querySelector("#citation-copy-apa"),i=document.querySelector("#citation-copy-bibtex"),n=document.querySelector("#citation-copy-content");if(!t&&!i||!n)return;const s=()=>{const l=(localStorage.getItem("citation-copy-format")||e)==="bibtex",u=(l?i:t).getAttribute("data-text");n.value=u,i.classList.toggle("primary",l),t.classList.toggle("primary",!l)};document.querySelector("#cite-repo-button")?.addEventListener("click",async()=>{try{await Hb(t,i)}catch(l){console.error(`initCitationFileCopyContent error: ${l}`,l);return}s(),t.addEventListener("click",()=>{localStorage.setItem("citation-copy-format","apa"),s()}),i.addEventListener("click",()=>{localStorage.setItem("citation-copy-format","bibtex"),s()}),n.addEventListener("click",()=>{n.select()}),(0,ke.mD)("#cite-repo-modal").modal("show")})}function $b(){_c("click","onCommentReactionButtonClick",async(e,t)=>{if(t.preventDefault(),e.classList.contains("disabled"))return;const i=e.closest("[data-action-url]").getAttribute("data-action-url"),n=e.getAttribute("data-reaction-content"),s=e.closest(".comment-container"),l=s.querySelector(".bottom-reactions"),m=l?.querySelector(`a[data-reaction-content="${CSS.escape(n)}"]`)?.getAttribute("data-has-reacted")==="true",A=await(await(0,Ae.LO)(`${i}/${m?"unreact":"react"}`,{data:new URLSearchParams({content:n})})).json();l?.remove(),A.html&&s.insertAdjacentHTML("beforeend",A.html)})}var Ub=__webpack_require__("./node_modules/brace-expansion/index.js");const Vb=1024*64,Tc=e=>{if(typeof e!="string")throw new TypeError("invalid pattern");if(e.length>Vb)throw new TypeError("pattern is too long")},Wb={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",!0],"[:alpha:]":["\\p{L}\\p{Nl}",!0],"[:ascii:]":["\\x00-\\x7f",!1],"[:blank:]":["\\p{Zs}\\t",!0],"[:cntrl:]":["\\p{Cc}",!0],"[:digit:]":["\\p{Nd}",!0],"[:graph:]":["\\p{Z}\\p{C}",!0,!0],"[:lower:]":["\\p{Ll}",!0],"[:print:]":["\\p{C}",!0],"[:punct:]":["\\p{P}",!0],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",!0],"[:upper:]":["\\p{Lu}",!0],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",!0],"[:xdigit:]":["A-Fa-f0-9",!1]},Tl=e=>e.replace(/[[\]\\-]/g,"\\$&"),zb=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),Fh=e=>e.join(""),Kb=(e,t)=>{const i=t;if(e.charAt(i)!=="[")throw new Error("not in a brace expression");const n=[],s=[];let l=i+1,u=!1,m=!1,y=!1,A=!1,L=i,z="";e:for(;l<e.length;){const de=e.charAt(l);if((de==="!"||de==="^")&&l===i+1){A=!0,l++;continue}if(de==="]"&&u&&!y){L=l+1;break}if(u=!0,de==="\\"&&!y){y=!0,l++;continue}if(de==="["&&!y){for(const[Pe,[Le,Te,He]]of Object.entries(Wb))if(e.startsWith(Pe,l)){if(z)return["$.",!1,e.length-i,!0];l+=Pe.length,He?s.push(Le):n.push(Le),m=m||Te;continue e}}if(y=!1,z){de>z?n.push(Tl(z)+"-"+Tl(de)):de===z&&n.push(Tl(de)),z="",l++;continue}if(e.startsWith("-]",l+1)){n.push(Tl(de+"-")),l+=2;continue}if(e.startsWith("-",l+1)){z=de,l+=2;continue}n.push(Tl(de)),l++}if(L<l)return["",!1,0,!1];if(!n.length&&!s.length)return["$.",!1,e.length-i,!0];if(s.length===0&&n.length===1&&/^\\?.$/.test(n[0])&&!A){const de=n[0].length===2?n[0].slice(-1):n[0];return[zb(de),!1,L-i,!1]}const X="["+(A?"^":"")+Fh(n)+"]",_e="["+(A?"":"^")+Fh(s)+"]";return[n.length&&s.length?"("+X+"|"+_e+")":n.length?X:_e,m,L-i,!0]},Ll=(e,{windowsPathsNoEscape:t=!1}={})=>t?e.replace(/\[([^\/\\])\]/g,"$1"):e.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1"),Xb=new Set(["!","?","+","*","@"]),Ih=e=>Xb.has(e),Gb="(?!(?:^|/)\\.\\.?(?:$|/))",Lc="(?!\\.)",Qb=new Set(["[","."]),Yb=new Set(["..","."]),Jb=new Set("().*{}+?[]^$\\!"),Zb=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),sd="[^/]",Nh=sd+"*?",Hh=sd+"+?",Ks=class Ks{constructor(t,i,n={}){wn(this,ba);rs(this,"type");wn(this,is);wn(this,bs);wn(this,lo,!1);wn(this,Dn,[]);wn(this,Gn);wn(this,Do);wn(this,ga);wn(this,Oo,!1);wn(this,Gr);wn(this,va);wn(this,Pl,!1);this.type=t,t&&tn(this,bs,!0),tn(this,Gn,i),tn(this,is,pt(this,Gn)?pt(pt(this,Gn),is):this),tn(this,Gr,pt(this,is)===this?n:pt(pt(this,is),Gr)),tn(this,ga,pt(this,is)===this?[]:pt(pt(this,is),ga)),t==="!"&&!pt(pt(this,is),Oo)&&pt(this,ga).push(this),tn(this,Do,pt(this,Gn)?pt(pt(this,Gn),Dn).length:0)}get hasMagic(){if(pt(this,bs)!==void 0)return pt(this,bs);for(const t of pt(this,Dn))if(typeof t!="string"&&(t.type||t.hasMagic))return tn(this,bs,!0);return pt(this,bs)}toString(){return pt(this,va)!==void 0?pt(this,va):this.type?tn(this,va,this.type+"("+pt(this,Dn).map(t=>String(t)).join("|")+")"):tn(this,va,pt(this,Dn).map(t=>String(t)).join(""))}push(...t){for(const i of t)if(i!==""){if(typeof i!="string"&&!(i instanceof Ks&&pt(i,Gn)===this))throw new Error("invalid part: "+i);pt(this,Dn).push(i)}}toJSON(){const t=this.type===null?pt(this,Dn).slice().map(i=>typeof i=="string"?i:i.toJSON()):[this.type,...pt(this,Dn).map(i=>i.toJSON())];return this.isStart()&&!this.type&&t.unshift([]),this.isEnd()&&(this===pt(this,is)||pt(pt(this,is),Oo)&&pt(this,Gn)?.type==="!")&&t.push({}),t}isStart(){if(pt(this,is)===this)return!0;if(!pt(this,Gn)?.isStart())return!1;if(pt(this,Do)===0)return!0;const t=pt(this,Gn);for(let i=0;i<pt(this,Do);i++){const n=pt(t,Dn)[i];if(!(n instanceof Ks&&n.type==="!"))return!1}return!0}isEnd(){if(pt(this,is)===this||pt(this,Gn)?.type==="!")return!0;if(!pt(this,Gn)?.isEnd())return!1;if(!this.type)return pt(this,Gn)?.isEnd();const t=pt(this,Gn)?pt(pt(this,Gn),Dn).length:0;return pt(this,Do)===t-1}copyIn(t){typeof t=="string"?this.push(t):this.push(t.clone(this))}clone(t){const i=new Ks(this.type,t);for(const n of pt(this,Dn))i.copyIn(n);return i}static fromGlob(t,i={}){var s;const n=new Ks(null,void 0,i);return dn(s=Ks,qo,Gc).call(s,t,n,0,i),n}toMMPattern(){if(this!==pt(this,is))return pt(this,is).toMMPattern();const t=this.toString(),[i,n,s,l]=this.toRegExpSource();if(!(s||pt(this,bs)||pt(this,Gr).nocase&&!pt(this,Gr).nocaseMagicOnly&&t.toUpperCase()!==t.toLowerCase()))return n;const m=(pt(this,Gr).nocase?"i":"")+(l?"u":"");return Object.assign(new RegExp(`^${i}$`,m),{_src:i,_glob:t})}get options(){return pt(this,Gr)}toRegExpSource(t){const i=t??!!pt(this,Gr).dot;if(pt(this,is)===this&&dn(this,ba,sm).call(this),!this.type){const y=this.isStart()&&this.isEnd(),A=pt(this,Dn).map(_e=>{var Te;const[pe,de,Pe,Le]=typeof _e=="string"?dn(Te=Ks,qo,rm).call(Te,_e,pt(this,bs),y):_e.toRegExpSource(t);return tn(this,bs,pt(this,bs)||Pe),tn(this,lo,pt(this,lo)||Le),pe}).join("");let L="";if(this.isStart()&&typeof pt(this,Dn)[0]=="string"&&!(pt(this,Dn).length===1&&Yb.has(pt(this,Dn)[0]))){const pe=Qb,de=i&&pe.has(A.charAt(0))||A.startsWith("\\.")&&pe.has(A.charAt(2))||A.startsWith("\\.\\.")&&pe.has(A.charAt(4)),Pe=!i&&!t&&pe.has(A.charAt(0));L=de?Gb:Pe?Lc:""}let z="";return this.isEnd()&&pt(pt(this,is),Oo)&&pt(this,Gn)?.type==="!"&&(z="(?:$|\\/)"),[L+A+z,Ll(A),tn(this,bs,!!pt(this,bs)),pt(this,lo)]}const n=this.type==="*"||this.type==="+",s=this.type==="!"?"(?:(?!(?:":"(?:";let l=dn(this,ba,pd).call(this,i);if(this.isStart()&&this.isEnd()&&!l&&this.type!=="!"){const y=this.toString();return tn(this,Dn,[y]),this.type=null,tn(this,bs,void 0),[y,Ll(this.toString()),!1,!1]}let u=!n||t||i||!Lc?"":dn(this,ba,pd).call(this,!0);u===l&&(u=""),u&&(l=`(?:${l})(?:${u})*?`);let m="";if(this.type==="!"&&pt(this,Pl))m=(this.isStart()&&!i?Lc:"")+Hh;else{const y=this.type==="!"?"))"+(this.isStart()&&!i&&!t?Lc:"")+Nh+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&u?")":this.type==="*"&&u?")?":`)${this.type}`;m=s+l+y}return[m,Ll(l),tn(this,bs,!!pt(this,bs)),pt(this,lo)]}};is=new WeakMap,bs=new WeakMap,lo=new WeakMap,Dn=new WeakMap,Gn=new WeakMap,Do=new WeakMap,ga=new WeakMap,Oo=new WeakMap,Gr=new WeakMap,va=new WeakMap,Pl=new WeakMap,ba=new WeakSet,sm=function(){if(this!==pt(this,is))throw new Error("should only call on root");if(pt(this,Oo))return this;this.toString(),tn(this,Oo,!0);let t;for(;t=pt(this,ga).pop();){if(t.type!=="!")continue;let i=t,n=pt(i,Gn);for(;n;){for(let s=pt(i,Do)+1;!n.type&&s<pt(n,Dn).length;s++)for(const l of pt(t,Dn)){if(typeof l=="string")throw new Error("string part in extglob AST??");l.copyIn(pt(n,Dn)[s])}i=n,n=pt(i,Gn)}}return this},qo=new WeakSet,Gc=function(t,i,n,s){var _e,pe;let l=!1,u=!1,m=-1,y=!1;if(i.type===null){let de=n,Pe="";for(;de<t.length;){const Le=t.charAt(de++);if(l||Le==="\\"){l=!l,Pe+=Le;continue}if(u){de===m+1?(Le==="^"||Le==="!")&&(y=!0):Le==="]"&&!(de===m+2&&y)&&(u=!1),Pe+=Le;continue}else if(Le==="["){u=!0,m=de,y=!1,Pe+=Le;continue}if(!s.noext&&Ih(Le)&&t.charAt(de)==="("){i.push(Pe),Pe="";const Te=new Ks(Le,i);de=dn(_e=Ks,qo,Gc).call(_e,t,Te,de,s),i.push(Te);continue}Pe+=Le}return i.push(Pe),de}let A=n+1,L=new Ks(null,i);const z=[];let X="";for(;A<t.length;){const de=t.charAt(A++);if(l||de==="\\"){l=!l,X+=de;continue}if(u){A===m+1?(de==="^"||de==="!")&&(y=!0):de==="]"&&!(A===m+2&&y)&&(u=!1),X+=de;continue}else if(de==="["){u=!0,m=A,y=!1,X+=de;continue}if(Ih(de)&&t.charAt(A)==="("){L.push(X),X="";const Pe=new Ks(de,L);L.push(Pe),A=dn(pe=Ks,qo,Gc).call(pe,t,Pe,A,s);continue}if(de==="|"){L.push(X),X="",z.push(L),L=new Ks(null,i);continue}if(de===")")return X===""&&pt(i,Dn).length===0&&tn(i,Pl,!0),L.push(X),X="",i.push(...z,L),A;X+=de}return i.type=null,tn(i,bs,void 0),tn(i,Dn,[t.substring(n-1)]),A},pd=function(t){return pt(this,Dn).map(i=>{if(typeof i=="string")throw new Error("string type in extglob ast??");const[n,s,l,u]=i.toRegExpSource(t);return tn(this,lo,pt(this,lo)||u),n}).filter(i=>!(this.isStart()&&this.isEnd())||!!i).join("|")},rm=function(t,i,n=!1){let s=!1,l="",u=!1;for(let m=0;m<t.length;m++){const y=t.charAt(m);if(s){s=!1,l+=(Jb.has(y)?"\\":"")+y;continue}if(y==="\\"){m===t.length-1?l+="\\\\":s=!0;continue}if(y==="["){const[A,L,z,X]=Kb(t,m);if(z){l+=A,u=u||L,m+=z-1,i=i||X;continue}}if(y==="*"){n&&t==="*"?l+=Hh:l+=Nh,i=!0;continue}if(y==="?"){l+=sd,i=!0;continue}l+=Zb(y)}return[l,Ll(t),!!i,u]},wn(Ks,qo);let Rc=Ks;const e_=(e,{windowsPathsNoEscape:t=!1}={})=>t?e.replace(/[?*()[\]]/g,"[$&]"):e.replace(/[?*()[\]\\]/g,"\\$&"),Os=(e,t,i={})=>(Tc(t),!i.nocomment&&t.charAt(0)==="#"?!1:new Mc(t,i).match(e)),t_=/^\*+([^+@!?\*\[\(]*)$/,i_=e=>t=>!t.startsWith(".")&&t.endsWith(e),n_=e=>t=>t.endsWith(e),s_=e=>(e=e.toLowerCase(),t=>!t.startsWith(".")&&t.toLowerCase().endsWith(e)),r_=e=>(e=e.toLowerCase(),t=>t.toLowerCase().endsWith(e)),o_=/^\*+\.\*+$/,a_=e=>!e.startsWith(".")&&e.includes("."),l_=e=>e!=="."&&e!==".."&&e.includes("."),c_=/^\.\*+$/,u_=e=>e!=="."&&e!==".."&&e.startsWith("."),d_=/^\*+$/,f_=e=>e.length!==0&&!e.startsWith("."),h_=e=>e.length!==0&&e!=="."&&e!=="..",m_=/^\?+([^+@!?\*\[\(]*)?$/,p_=([e,t=""])=>{const i=Bh([e]);return t?(t=t.toLowerCase(),n=>i(n)&&n.toLowerCase().endsWith(t)):i},g_=([e,t=""])=>{const i=$h([e]);return t?(t=t.toLowerCase(),n=>i(n)&&n.toLowerCase().endsWith(t)):i},v_=([e,t=""])=>{const i=$h([e]);return t?n=>i(n)&&n.endsWith(t):i},b_=([e,t=""])=>{const i=Bh([e]);return t?n=>i(n)&&n.endsWith(t):i},Bh=([e])=>{const t=e.length;return i=>i.length===t&&!i.startsWith(".")},$h=([e])=>{const t=e.length;return i=>i.length===t&&i!=="."&&i!==".."},Uh=typeof process=="object"&&process?typeof process.env=="object"&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix",Vh={win32:{sep:"\\"},posix:{sep:"/"}},__=Uh==="win32"?Vh.win32.sep:Vh.posix.sep;Os.sep=__;const Cr=Symbol("globstar **");Os.GLOBSTAR=Cr;const y_="[^/]"+"*?",w_="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",S_="(?:(?!(?:\\/|^)\\.).)*?",x_=(e,t={})=>i=>Os(i,e,t);Os.filter=x_;const kr=(e,t={})=>Object.assign({},e,t),j_=e=>{if(!e||typeof e!="object"||!Object.keys(e).length)return Os;const t=Os;return Object.assign((n,s,l={})=>t(n,s,kr(e,l)),{Minimatch:class extends t.Minimatch{constructor(s,l={}){super(s,kr(e,l))}static defaults(s){return t.defaults(kr(e,s)).Minimatch}},AST:class extends t.AST{constructor(s,l,u={}){super(s,l,kr(e,u))}static fromGlob(s,l={}){return t.AST.fromGlob(s,kr(e,l))}},unescape:(n,s={})=>t.unescape(n,kr(e,s)),escape:(n,s={})=>t.escape(n,kr(e,s)),filter:(n,s={})=>t.filter(n,kr(e,s)),defaults:n=>t.defaults(kr(e,n)),makeRe:(n,s={})=>t.makeRe(n,kr(e,s)),braceExpand:(n,s={})=>t.braceExpand(n,kr(e,s)),match:(n,s,l={})=>t.match(n,s,kr(e,l)),sep:t.sep,GLOBSTAR:Cr})};Os.defaults=j_;const Wh=(e,t={})=>(Tc(e),t.nobrace||!/\{(?:(?!\{).)*\}/.test(e)?[e]:Ub(e));Os.braceExpand=Wh;const E_=(e,t={})=>new Mc(e,t).makeRe();Os.makeRe=E_;const A_=(e,t,i={})=>{const n=new Mc(t,i);return e=e.filter(s=>n.match(s)),n.options.nonull&&!e.length&&e.push(t),e};Os.match=A_;const zh=/[?*]|[+@!]\(.*?\)|\[|\]/,C_=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&");class Mc{constructor(t,i={}){rs(this,"options");rs(this,"set");rs(this,"pattern");rs(this,"windowsPathsNoEscape");rs(this,"nonegate");rs(this,"negate");rs(this,"comment");rs(this,"empty");rs(this,"preserveMultipleSlashes");rs(this,"partial");rs(this,"globSet");rs(this,"globParts");rs(this,"nocase");rs(this,"isWindows");rs(this,"platform");rs(this,"windowsNoMagicRoot");rs(this,"regexp");Tc(t),i=i||{},this.options=i,this.pattern=t,this.platform=i.platform||Uh,this.isWindows=this.platform==="win32",this.windowsPathsNoEscape=!!i.windowsPathsNoEscape||i.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!i.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!i.nonegate,this.comment=!1,this.empty=!1,this.partial=!!i.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=i.windowsNoMagicRoot!==void 0?i.windowsNoMagicRoot:!!(this.isWindows&&this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(const t of this.set)for(const i of t)if(typeof i!="string")return!0;return!1}debug(...t){}make(){const t=this.pattern,i=this.options;if(!i.nocomment&&t.charAt(0)==="#"){this.comment=!0;return}if(!t){this.empty=!0;return}this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],i.debug&&(this.debug=(...l)=>console.error(...l)),this.debug(this.pattern,this.globSet);const n=this.globSet.map(l=>this.slashSplit(l));this.globParts=this.preprocess(n),this.debug(this.pattern,this.globParts);let s=this.globParts.map((l,u,m)=>{if(this.isWindows&&this.windowsNoMagicRoot){const y=l[0]===""&&l[1]===""&&(l[2]==="?"||!zh.test(l[2]))&&!zh.test(l[3]),A=/^[a-z]:/i.test(l[0]);if(y)return[...l.slice(0,4),...l.slice(4).map(L=>this.parse(L))];if(A)return[l[0],...l.slice(1).map(L=>this.parse(L))]}return l.map(y=>this.parse(y))});if(this.debug(this.pattern,s),this.set=s.filter(l=>l.indexOf(!1)===-1),this.isWindows)for(let l=0;l<this.set.length;l++){const u=this.set[l];u[0]===""&&u[1]===""&&this.globParts[l][2]==="?"&&typeof u[3]=="string"&&/^[a-z]:$/i.test(u[3])&&(u[2]="?")}this.debug(this.pattern,this.set)}preprocess(t){if(this.options.noglobstar)for(let n=0;n<t.length;n++)for(let s=0;s<t[n].length;s++)t[n][s]==="**"&&(t[n][s]="*");const{optimizationLevel:i=1}=this.options;return i>=2?(t=this.firstPhasePreProcess(t),t=this.secondPhasePreProcess(t)):i>=1?t=this.levelOneOptimize(t):t=this.adjascentGlobstarOptimize(t),t}adjascentGlobstarOptimize(t){return t.map(i=>{let n=-1;for(;(n=i.indexOf("**",n+1))!==-1;){let s=n;for(;i[s+1]==="**";)s++;s!==n&&i.splice(n,s-n)}return i})}levelOneOptimize(t){return t.map(i=>(i=i.reduce((n,s)=>{const l=n[n.length-1];return s==="**"&&l==="**"?n:s===".."&&l&&l!==".."&&l!=="."&&l!=="**"?(n.pop(),n):(n.push(s),n)},[]),i.length===0?[""]:i))}levelTwoFileOptimize(t){Array.isArray(t)||(t=this.slashSplit(t));let i=!1;do{if(i=!1,!this.preserveMultipleSlashes){for(let s=1;s<t.length-1;s++){const l=t[s];s===1&&l===""&&t[0]===""||(l==="."||l==="")&&(i=!0,t.splice(s,1),s--)}t[0]==="."&&t.length===2&&(t[1]==="."||t[1]==="")&&(i=!0,t.pop())}let n=0;for(;(n=t.indexOf("..",n+1))!==-1;){const s=t[n-1];s&&s!=="."&&s!==".."&&s!=="**"&&(i=!0,t.splice(n-1,2),n-=2)}}while(i);return t.length===0?[""]:t}firstPhasePreProcess(t){let i=!1;do{i=!1;for(let n of t){let s=-1;for(;(s=n.indexOf("**",s+1))!==-1;){let u=s;for(;n[u+1]==="**";)u++;u>s&&n.splice(s+1,u-s);let m=n[s+1];const y=n[s+2],A=n[s+3];if(m!==".."||!y||y==="."||y===".."||!A||A==="."||A==="..")continue;i=!0,n.splice(s,1);const L=n.slice(0);L[s]="**",t.push(L),s--}if(!this.preserveMultipleSlashes){for(let u=1;u<n.length-1;u++){const m=n[u];u===1&&m===""&&n[0]===""||(m==="."||m==="")&&(i=!0,n.splice(u,1),u--)}n[0]==="."&&n.length===2&&(n[1]==="."||n[1]==="")&&(i=!0,n.pop())}let l=0;for(;(l=n.indexOf("..",l+1))!==-1;){const u=n[l-1];if(u&&u!=="."&&u!==".."&&u!=="**"){i=!0;const y=l===1&&n[l+1]==="**"?["."]:[];n.splice(l-1,2,...y),n.length===0&&n.push(""),l-=2}}}}while(i);return t}secondPhasePreProcess(t){for(let i=0;i<t.length-1;i++)for(let n=i+1;n<t.length;n++){const s=this.partsMatch(t[i],t[n],!this.preserveMultipleSlashes);if(s){t[i]=[],t[n]=s;break}}return t.filter(i=>i.length)}partsMatch(t,i,n=!1){let s=0,l=0,u=[],m="";for(;s<t.length&&l<i.length;)if(t[s]===i[l])u.push(m==="b"?i[l]:t[s]),s++,l++;else if(n&&t[s]==="**"&&i[l]===t[s+1])u.push(t[s]),s++;else if(n&&i[l]==="**"&&t[s]===i[l+1])u.push(i[l]),l++;else if(t[s]==="*"&&i[l]&&(this.options.dot||!i[l].startsWith("."))&&i[l]!=="**"){if(m==="b")return!1;m="a",u.push(t[s]),s++,l++}else if(i[l]==="*"&&t[s]&&(this.options.dot||!t[s].startsWith("."))&&t[s]!=="**"){if(m==="a")return!1;m="b",u.push(i[l]),s++,l++}else return!1;return t.length===i.length&&u}parseNegate(){if(this.nonegate)return;const t=this.pattern;let i=!1,n=0;for(let s=0;s<t.length&&t.charAt(s)==="!";s++)i=!i,n++;n&&(this.pattern=t.slice(n)),this.negate=i}matchOne(t,i,n=!1){const s=this.options;if(this.isWindows){const de=typeof t[0]=="string"&&/^[a-z]:$/i.test(t[0]),Pe=!de&&t[0]===""&&t[1]===""&&t[2]==="?"&&/^[a-z]:$/i.test(t[3]),Le=typeof i[0]=="string"&&/^[a-z]:$/i.test(i[0]),Te=!Le&&i[0]===""&&i[1]===""&&i[2]==="?"&&typeof i[3]=="string"&&/^[a-z]:$/i.test(i[3]),He=Pe?3:de?0:void 0,U=Te?3:Le?0:void 0;if(typeof He=="number"&&typeof U=="number"){const[Se,ze]=[t[He],i[U]];Se.toLowerCase()===ze.toLowerCase()&&(i[U]=Se,U>He?i=i.slice(U):He>U&&(t=t.slice(He)))}}const{optimizationLevel:l=1}=this.options;l>=2&&(t=this.levelTwoFileOptimize(t)),this.debug("matchOne",this,{file:t,pattern:i}),this.debug("matchOne",t.length,i.length);for(var u=0,m=0,y=t.length,A=i.length;u<y&&m<A;u++,m++){this.debug("matchOne loop");var L=i[m],z=t[u];if(this.debug(i,L,z),L===!1)return!1;if(L===Cr){this.debug("GLOBSTAR",[i,L,z]);var X=u,_e=m+1;if(_e===A){for(this.debug("** at the end");u<y;u++)if(t[u]==="."||t[u]===".."||!s.dot&&t[u].charAt(0)===".")return!1;return!0}for(;X<y;){var pe=t[X];if(this.debug(`
DesignScreenshot/output/git.buildapp.eu.org_run/git.buildapp.eu.org_4_after_login.html:458:`)}const r1=["::group::","##[group]"],o1=["::endgroup::","##[endgroup]"];function a1(e){for(const t of r1)if(e.message.startsWith(t))return{name:"group",prefix:t};for(const t of o1)if(e.message.startsWith(t))return{name:"endgroup",prefix:t};return null}function l1(e){const t=e.getBoundingClientRect();return t.top>=0&&t.bottom<=window.innerHeight}function c1(){try{const e=localStorage.getItem("actions-view-options");if(e)return JSON.parse(e)}catch{}return{autoScroll:!0,expandRunning:!1}}var u1=(0,c.pM)({name:"RepoActionView",components:{SvgIcon:Z.Ah,ActionRunStatus:e1},props:{runIndex:{type:String,default:""},jobIndex:{type:String,default:""},actionsURL:{type:String,default:""},locale:{type:Object,default:null}},data(){const{autoScroll:e,expandRunning:t}=c1();return{loadingAbortController:null,intervalID:null,currentJobStepsStates:[],artifacts:[],menuVisible:!1,isFullScreen:!1,timeVisible:{"log-time-stamp":!1,"log-time-seconds":!1},optionAlwaysAutoScroll:e??!1,optionAlwaysExpandRunning:t??!1,run:{link:"",title:"",titleHTML:"",status:"",canCancel:!1,canApprove:!1,canRerun:!1,canDeleteArtifact:!1,done:!1,workflowID:"",workflowLink:"",isSchedule:!1,jobs:[],commit:{localeCommit:"",localePushedBy:"",shortSHA:"",link:"",pusher:{displayName:"",link:""},branch:{name:"",link:"",isDeleted:!1}}},currentJob:{title:"",detail:"",steps:[]}}},watch:{optionAlwaysAutoScroll(){this.saveLocaleStorageOptions()},optionAlwaysExpandRunning(){this.saveLocaleStorageOptions()}},async mounted(){await this.loadJob(),this.intervalID=setInterval(()=>this.loadJob(),1e3),document.body.addEventListener("click",this.closeDropdown),this.hashChangeListener(),window.addEventListener("hashchange",this.hashChangeListener)},beforeUnmount(){document.body.removeEventListener("click",this.closeDropdown),window.removeEventListener("hashchange",this.hashChangeListener)},unmounted(){this.intervalID&&(clearInterval(this.intervalID),this.intervalID=null)},methods:{saveLocaleStorageOptions(){const e={autoScroll:this.optionAlwaysAutoScroll,expandRunning:this.optionAlwaysExpandRunning};localStorage.setItem("actions-view-options",JSON.stringify(e))},getJobStepLogsContainer(e){return this.$refs.logs[e]},getActiveLogsContainer(e){const t=this.getJobStepLogsContainer(e);return t._stepLogsActiveContainer??t},beginLogGroup(e,t,i,n){const s=this.$refs.logs[e],l=(0,C.tw)("summary",{class:"job-log-group-summary"},this.createLogLine(e,t,{index:i.index,timestamp:i.timestamp,message:i.message.substring(n.prefix.length)})),u=(0,C.tw)("div",{class:"job-log-list"}),m=(0,C.tw)("details",{class:"job-log-group"},l,u);s.append(m),s._stepLogsActiveContainer=u},endLogGroup(e,t,i,n){const s=this.$refs.logs[e];s._stepLogsActiveContainer=null,s.append(this.createLogLine(e,t,{index:i.index,timestamp:i.timestamp,message:i.message.substring(n.prefix.length)}))},toggleStepLogs(e){this.currentJobStepsStates[e].expanded=!this.currentJobStepsStates[e].expanded,this.currentJobStepsStates[e].expanded&&this.loadJobForce()},cancelRun(){(0,Ae.LO)(`${this.run.link}/cancel`)},approveRun(){(0,Ae.LO)(`${this.run.link}/approve`)},createLogLine(e,t,i){const n=(0,C.tw)("a",{class:"line-num muted",href:`#jobstep-${e}-${i.index}`},String(i.index)),s=(0,C.tw)("span",{class:"log-time-stamp"},(0,Li.Rt)(new Date(i.timestamp*1e3))),l=(0,C.tw)("span",{class:"log-msg"});l.innerHTML=s1(i.message);const u=Math.floor(i.timestamp-t),m=(0,C.tw)("span",{class:"log-time-seconds"},`${u}s`);return(0,C.oi)(s,this.timeVisible["log-time-stamp"]),(0,C.oi)(m,this.timeVisible["log-time-seconds"]),(0,C.tw)("div",{id:`jobstep-${e}-${i.index}`,class:"job-log-line"},n,s,l,m)},shouldAutoScroll(e){if(!this.optionAlwaysAutoScroll)return!1;const t=this.getJobStepLogsContainer(e);return t.lastChild?l1(t.lastChild):this.currentJobStepsStates[e].expanded},appendLogs(e,t,i){for(const n of i){const s=this.getActiveLogsContainer(e),l=a1(n);if(l?.name==="group"){this.beginLogGroup(e,t,n,l);continue}else if(l?.name==="endgroup"){this.endLogGroup(e,t,n,l);continue}s.append(this.createLogLine(e,t,n))}},async deleteArtifact(e){window.confirm(this.locale.confirmDeleteArtifact.replace("%s",e))&&(await(0,Ae.SJ)(`${this.run.link}/artifacts/${e}`),await this.loadJobForce())},async fetchJobData(e){const t=this.currentJobStepsStates.map((n,s)=>({step:s,cursor:n.cursor,expanded:n.expanded}));return await(await(0,Ae.LO)(`${this.actionsURL}/runs/${this.runIndex}/jobs/${this.jobIndex}`,{signal:e.signal,data:{logCursors:t}})).json()},async loadJobForce(){this.loadingAbortController?.abort(),this.loadingAbortController=null,await this.loadJob()},async loadJob(){if(this.loadingAbortController)return;const e=new AbortController;this.loadingAbortController=e;try{const t=!this.run.status,i=await this.fetchJobData(e);if(this.loadingAbortController!==e)return;this.artifacts=i.artifacts||[],this.run=i.state.run,this.currentJob=i.state.currentJob;for(let l=0;l<this.currentJob.steps.length;l++){const u=t&&this.optionAlwaysExpandRunning&&this.currentJob.steps[l].status==="running";this.currentJobStepsStates[l]||(this.currentJobStepsStates[l]={cursor:null,expanded:u})}const n=new Map;for(const l of i.logs.stepsLog??[])n.has(l.step)||n.set(l.step,this.shouldAutoScroll(l.step));for(const l of i.logs.stepsLog??[])this.currentJobStepsStates[l.step].cursor=l.cursor,this.appendLogs(l.step,l.started,l.lines);let s;for(let l=0;l<this.currentJob.steps.length;l++)n.get(l)&&(s=this.getJobStepLogsContainer(l));s?.lastElementChild.scrollIntoView({behavior:"smooth",block:"nearest"}),this.run.done&&this.intervalID&&(clearInterval(this.intervalID),this.intervalID=null)}catch(t){if(t instanceof TypeError||e.signal.aborted)return;throw t}finally{this.loadingAbortController===e&&(this.loadingAbortController=null)}},isDone(e){return["success","skipped","failure","cancelled"].includes(e)},isExpandable(e){return["success","running","failure","cancelled"].includes(e)},closeDropdown(){this.menuVisible&&(this.menuVisible=!1)},toggleTimeDisplay(e){this.timeVisible[`log-time-${e}`]=!this.timeVisible[`log-time-${e}`];for(const t of this.$refs.steps.querySelectorAll(`.log-time-${e}`))(0,C.oi)(t,this.timeVisible[`log-time-${e}`])},toggleFullScreen(){this.isFullScreen=!this.isFullScreen,(0,St._M)(".action-view-right",this.isFullScreen,".action-view-body")},async hashChangeListener(){const e=window.location.hash;if(!e)return;const[t,i,n]=e.split("-"),s=Number(i);if(!this.currentJobStepsStates[s])return;!this.currentJobStepsStates[s].expanded&&this.currentJobStepsStates[s].cursor===null&&(this.currentJobStepsStates[s].expanded=!0,await this.loadJob());const l=this.$refs.steps.querySelector(e);l&&l.querySelector(".line-num").click()}}}),d1=(0,Xi.A)(u1,[["render",Yw],["__scopeId","data-v-2d8f7d75"]]);function f1(){const e=document.querySelector("#repo-action-view");if(!e)return;const t=document.querySelector("body > div.full.height");t&&(t.style.paddingBottom="0"),Ai(d1,{runIndex:e.getAttribute("data-run-index"),jobIndex:e.getAttribute("data-job-index"),actionsURL:e.getAttribute("data-actions-url"),locale:{approve:e.getAttribute("data-locale-approve"),cancel:e.getAttribute("data-locale-cancel"),rerun:e.getAttribute("data-locale-rerun"),rerun_all:e.getAttribute("data-locale-rerun-all"),scheduled:e.getAttribute("data-locale-runs-scheduled"),commit:e.getAttribute("data-locale-runs-commit"),pushedBy:e.getAttribute("data-locale-runs-pushed-by"),artifactsTitle:e.getAttribute("data-locale-artifacts-title"),areYouSure:e.getAttribute("data-locale-are-you-sure"),artifactExpired:e.getAttribute("data-locale-artifact-expired"),confirmDeleteArtifact:e.getAttribute("data-locale-confirm-delete-artifact"),showTimeStamps:e.getAttribute("data-locale-show-timestamps"),showLogSeconds:e.getAttribute("data-locale-show-log-seconds"),showFullScreen:e.getAttribute("data-locale-show-full-screen"),downloadLogs:e.getAttribute("data-locale-download-logs"),status:{unknown:e.getAttribute("data-locale-status-unknown"),waiting:e.getAttribute("data-locale-status-waiting"),running:e.getAttribute("data-locale-status-running"),success:e.getAttribute("data-locale-status-success"),failure:e.getAttribute("data-locale-status-failure"),cancelled:e.getAttribute("data-locale-status-cancelled"),skipped:e.getAttribute("data-locale-status-skipped"),blocked:e.getAttribute("data-locale-status-blocked")},logsAlwaysAutoScroll:e.getAttribute("data-locale-logs-always-auto-scroll"),logsAlwaysExpandRunning:e.getAttribute("data-locale-logs-always-expand-running")}}).mount(e)}function h1(){const e=document.querySelector(".issue-checkbox-all");if(!e)return;const t=document.querySelectorAll(".issue-checkbox"),i=()=>{const n=Array.from(t).filter(A=>A.checked),s=!!n.length;s&&n.length===t.length?(e.checked=!0,e.indeterminate=!1):s?(e.checked=!1,e.indeterminate=!0):(e.checked=!1,e.indeterminate=!1),(0,C.oi)("#issue-filters",!s),(0,C.oi)("#issue-actions",s);const u=document.querySelectorAll("#issue-filters, #issue-actions");Array.from(u).find(A=>!(0,C.WP)(A)).querySelector(".issue-list-toolbar-left").prepend(e)};for(const n of t)n.addEventListener("change",i);e.addEventListener("change",()=>{for(const n of t)n.checked=e.checked;i()}),(0,C.jB)(document,".issue-action",n=>n.addEventListener("click",async s=>{s.preventDefault();const l=n.getAttribute("data-url");let u=n.getAttribute("data-action"),m=n.getAttribute("data-element-id");const y=[];for(const L of document.querySelectorAll(".issue-checkbox:checked"))y.push(L.getAttribute("data-issue-id"));const A=y.join(",");if(A){if(m==="0"&&l.endsWith("/assignee")&&(m="",u="clear"),u==="toggle"&&s.altKey&&(u="toggle-alt"),u==="delete"){const L=n.getAttribute("data-action-delete-confirm");if(!await Wu({content:L,confirmButtonColor:"red"}))return}try{await ep(l,u,A,m),window.location.reload()}catch(L){gt(L.responseJSON?.error??L.message)}}}))}function Yh(e){let t=e.getAttribute("data-search-url");const i=e.getAttribute("data-action-jump-url");let n=e.getAttribute("data-selected-username")||"";const s=(0,ke.mD)(e),l=e.querySelector(".menu"),u=e.querySelector(".ui.search input"),m=e.querySelector(".menu > .item-from-input");s.dropdown("setting",{fullTextSearch:!0,selectOnKeydown:!1,action:(_e,pe)=>{window.location.href=i.replace("{username}",encodeURIComponent(pe))}});const y=_e=>{(0,C.jB)(l,".item.active, .item.selected",pe=>pe.classList.remove("active","selected")),l.querySelector(`.item[data-value="${CSS.escape(_e)}"]`)?.classList.add("selected")},A=[],L=()=>{const _e=u.value.trim();m.setAttribute("data-value",_e),m.textContent=_e;const pe=!A.length&&_e!=="";(0,C.oi)(m,pe),y(pe?_e:n)};u.value=n,t?(t.includes("?")||(t+="?"),s.dropdown("setting","apiSettings",{cache:!1,url:`${t}&q={query}`,onResponse(_e){A.length=0;for(const pe of _e.results){let de=`<img class="ui avatar tw-align-middle" src="${R(pe.avatar_link)}" aria-hidden="true" alt width="20" height="20"><span class="gt-ellipsis">${R(pe.username)}</span>`;pe.full_name&&(de+=`<span class="search-fullname tw-ml-2">${R(pe.full_name)}</span>`),n.toLowerCase()===pe.username.toLowerCase()&&(n=pe.username),A.push({value:pe.username,name:de})}return _e.results=A,_e}}),s.dropdown("setting","onShow",()=>s.dropdown("filter"," "))):u.addEventListener("input",L);const z={...s.dropdown("internal","setup")},X=s.dropdown("setting","templates");s.dropdown("internal","setup",z),z.menu=function(_e){for(const de of l.querySelectorAll(":scope > .dynamic-item"))de.remove();const pe=X.menu(_e,s.dropdown("setting","fields"),!0,s.dropdown("setting","className"));if(pe){const de=(0,St.a8)(pe,"text/html").querySelectorAll("body > div");for(const Le of de)Le.classList.add("dynamic-item");const Pe=document.createElement("div");Pe.classList.add("divider","dynamic-item"),l.append(Pe,...de)}s.dropdown("refresh"),setTimeout(()=>L(),0)}}function m1(){for(const e of document.querySelectorAll(".issue-card-unpin"))e.addEventListener("click",async t=>{const i=t.currentTarget,n=Number(i.getAttribute("data-issue-id"));(await(0,Ae.SJ)(i.getAttribute("data-unpin-url"))).ok&&(i._tippy.destroy(),i.closest(`div.issue-card[data-issue-id="${n}"]`).remove())})}async function p1(e){const t=e.item.getAttribute("data-move-url"),i=Number(e.item.getAttribute("data-issue-id"));await(0,Ae.LO)(t,{data:{id:i,position:e.newIndex+1}})}async function g1(){const e=document.querySelector("#issue-pins");e!==null&&e.hasAttribute("data-is-repo-admin")&&(m1(),!(e.children.length<2)&&vc(e,{group:"shared",onEnd:t=>{(async()=>await p1(t))()}}))}function v1(){document.querySelector(".page-content.repository.issue-list, .page-content.repository.milestone-issue-list")?(h1(),(0,C.jB)(document,".ui.dropdown.user-remote-search",e=>Yh(e)),g1()):document.querySelector(".page-content.dashboard.issues")&&(0,C.jB)(document,".ui.dropdown.user-remote-search",e=>Yh(e))}const{appSubUrl:b1}=window.config,_1=/^(\d+)$/,y1=/^#(\d+)$/,w1=/^([-.\w]+)\/([-.\w]+)#(\d+)$/;function S1(e,t){t=t.trim();let i="";if(e)_1.test(t)?i=`${e}/issues/${t}`:y1.test(t)&&(i=`${e}/issues/${t.substring(1)}`);else{const[n,s,l,u]=w1.exec(t)||[];s&&(i=`${b1}/${s}/${l}/issues/${u}`)}return i}function x1(){const e=document.querySelector("#issue-list-quick-goto");if(!e)return;const t=e.closest("form"),i=t.querySelector("input[name=q]"),n=e.getAttribute("data-repo-link");t.addEventListener("submit",l=>{let u=!(0,C.WP)(e);const m=(0,C.IU)(l);m!==t&&m!==i&&m!==e&&(u=!1),u&&(l.preventDefault(),window.location.href=e.getAttribute("data-issue-goto-link"))});const s=async()=>{const l=i.value;let u=S1(n,l);u&&(await(0,Ae.fG)(`${u}/info`)).status!==200&&(u=""),i.value===l&&((0,C.oi)(e,!!u),e.setAttribute("data-issue-goto-link",u))};i.addEventListener("input",(0,C.nm)(s)),s()}async function j1(){const e=document.querySelector("#repo-contributors-chart");if(!e)return;const{default:t}=await Promise.all([__webpack_require__.e("contributors-graph-code-frequency-graph-recent-commits-graph"),__webpack_require__.e("contributors-graph")]).then(__webpack_require__.bind(__webpack_require__,"./web_src/js/components/RepoContributors.vue"));try{Ai(t,{repoLink:e.getAttribute("data-repo-link"),repoDefaultBranchName:e.getAttribute("data-repo-default-branch-name"),locale:{filterLabel:e.getAttribute("data-locale-filter-label"),contributionType:{commits:e.getAttribute("data-locale-contribution-type-commits"),additions:e.getAttribute("data-locale-contribution-type-additions"),deletions:e.getAttribute("data-locale-contribution-type-deletions")},loadingTitle:e.getAttribute("data-locale-loading-title"),loadingTitleFailed:e.getAttribute("data-locale-loading-title-failed"),loadingInfo:e.getAttribute("data-locale-loading-info")}}).mount(e)}catch(i){console.error("RepoContributors failed to load",i),e.textContent=e.getAttribute("data-locale-component-failed-to-load")}}async function E1(){const e=document.querySelector("#repo-code-frequency-chart");if(!e)return;const{default:t}=await Promise.all([__webpack_require__.e("contributors-graph-code-frequency-graph-recent-commits-graph"),__webpack_require__.e("code-frequency-graph")]).then(__webpack_require__.bind(__webpack_require__,"./web_src/js/components/RepoCodeFrequency.vue"));try{Ai(t,{locale:{loadingTitle:e.getAttribute("data-locale-loading-title"),loadingTitleFailed:e.getAttribute("data-locale-loading-title-failed"),loadingInfo:e.getAttribute("data-locale-loading-info")}}).mount(e)}catch(i){console.error("RepoCodeFrequency failed to load",i),e.textContent=e.getAttribute("data-locale-component-failed-to-load")}}async function A1(){const e=document.querySelector("#repo-recent-commits-chart");if(!e)return;const{default:t}=await Promise.all([__webpack_require__.e("contributors-graph-code-frequency-graph-recent-commits-graph"),__webpack_require__.e("recent-commits-graph")]).then(__webpack_require__.bind(__webpack_require__,"./web_src/js/components/RepoRecentCommits.vue"));try{Ai(t,{locale:{loadingTitle:e.getAttribute("data-locale-loading-title"),loadingTitleFailed:e.getAttribute("data-locale-loading-title-failed"),loadingInfo:e.getAttribute("data-locale-loading-info")}}).mount(e)}catch(i){console.error("RepoRecentCommits failed to load",i),e.textContent=e.getAttribute("data-locale-component-failed-to-load")}}async function C1(e,t){t.classList.add("disabled");try{const n=await(await(0,Ae.fG)(t.getAttribute("data-fetch-url"))).json();(0,C.y9)(t),k1(e,n.tags),T1(e,n.branches,n.default_branch),(0,C.fi)(e.querySelectorAll(".branch-and-tag-detail"))}finally{t.classList.remove("disabled")}}function k1(e,t){const i=e.querySelector(".tag-area");(0,C.oi)(i.parentElement,t.length>0);for(const n of t)Jh(i,n.web_link,n.name)}function T1(e,t,i){const n=e.getAttribute("data-text-default-branch-tooltip"),s=e.querySelector(".branch-area");(0,C.oi)(s.parentElement,t.length>0);for(const l of t){const u=i===l.name?n:null;Jh(s,l.web_link,l.name,u)}}function Jh(e,t,i,n){const s=document.createElement("a");s.classList.add("muted","tw-px-1"),s.href=t,s.textContent=i,n&&(s.classList.add("tw-border","tw-border-secondary","tw-rounded"),s.setAttribute("data-tooltip-content",n)),e.append(s)}function L1(){for(const e of document.querySelectorAll(".branch-and-tag-area")){const t=e.querySelector(".load-branches-and-tags");t.addEventListener("click",()=>C1(e,t))}}function R1(){const e=document.querySelector("#repo-search-form");e&&e.addEventListener("change",t=>{t.preventDefault();const i=new URLSearchParams;for(const[n,s]of new FormData(e).entries())i.set(n,s.toString());t.target.name==="clear-filter"&&(i.delete("archived"),i.delete("fork"),i.delete("mirror"),i.delete("template"),i.delete("private")),i.delete("clear-filter"),window.location.search=i.toString()})}async function M1(){const e=document.querySelectorAll(".js-color-picker-input");if(e.length){await Promise.all([__webpack_require__.e("colorpicker").then(__webpack_require__.bind(__webpack_require__,"./node_modules/vanilla-colorful/hex-color-picker.js")),__webpack_require__.e("colorpicker").then(__webpack_require__.bind(__webpack_require__,"./web_src/css/features/colorpicker.css"))]);for(const t of e)D1(t)}}function Dc(e,t){e.style.color=/#[0-9a-f]{6}/i.test(t)?t:"transparent"}function Zh(e,t){e.setAttribute("color",t)}function D1(e){const t=e.querySelector("input"),i=document.createElement("div");i.classList.add("preview-square"),Dc(i,t.value),e.append(i);const n=document.createElement("hex-color-picker");n.addEventListener("color-changed",s=>{t.value=s.detail.value,t.focus(),Dc(i,s.detail.value)}),t.addEventListener("input",s=>{Dc(i,s.target.value),Zh(n,s.target.value)}),Ie(t,{trigger:"focus click",theme:"bare",hideOnClick:!0,content:n,placement:"bottom-start",interactive:!0,onShow(){Zh(n,t.value)}});for(const s of e.querySelectorAll(".precolors .color"))s.addEventListener("click",l=>{const u=l.target.getAttribute("data-color-hex");t.value=u,t.dispatchEvent(new Event("input",{bubbles:!0})),Dc(i,u)})}const{appSubUrl:O1}=window.config;async function q1(){const e=document.querySelector("#self-check-by-frontend");if(!e)return;const t=document.querySelector(".page-content.admin .admin-setting-content"),n=await(await(0,Ae.LO)(`${O1}/-/admin/self_check`,{data:new URLSearchParams({location_origin:window.location.origin,now:String(Date.now())})})).json();(0,C.oi)(e,!!n.problems?.length);for(const l of n.problems??[]){const u=document.createElement("div");u.classList.add("ui","warning","message"),u.textContent=l,e.append(u)}const s=!!t.querySelectorAll(".self-check-problem:not(.tw-hidden)").length;(0,C.oi)(t.querySelector(".self-check-no-problem"),!s)}function P1(){for(const e of document.querySelectorAll(".disable-setting"))e.addEventListener("change",t=>{document.querySelector(t.target.getAttribute("data-target")).classList.toggle("disabled",t.target.checked)})}const{appSubUrl:F1,i18n:I1}=window.config;function N1(e){const t=document.createElement("form"),i=document.createElement("input");t.method="post",t.action=`${F1}/-/fetch-redirect`,i.type="hidden",i.name="redirect",i.value=e,t.append(i),document.body.append(t),t.submit()}async function em(e,t,i){try{const n=await(0,Ae.Em)(t,i);if(n.status===200){let{redirect:s}=await n.json();s=s||e.getAttribute("data-redirect"),Ku(e),s?N1(s):window.location.reload();return}else if(n.status>=400&&n.status<500){const s=await n.json();s.errorMessage?gt(s.errorMessage,{useHtmlBody:s.renderFormat==="html"}):gt(`server error: ${n.status}`)}else gt(`server error: ${n.status}`)}catch(n){n.name!=="AbortError"&&(console.error("error when doRequest",n),gt(`${I1.network_error} ${n}`))}e.classList.remove("is-loading","loading-icon-2px")}async function H1(e,t){if(t.preventDefault(),e.classList.contains("is-loading"))return;e.classList.add("is-loading"),e.clientHeight<50&&e.classList.add("loading-icon-2px");const i=e.getAttribute("method")||"get",n=e.getAttribute("action"),s=new FormData(e),l=(0,C.IU)(t),[u,m]=[l?.getAttribute("name"),l?.getAttribute("value")];u&&s.append(u,m||"");let y=n;const A={method:i.toUpperCase(),body:null};if(i.toLowerCase()==="get"){const L=new URLSearchParams;for(const[X,_e]of s)L.append(X,_e.toString());const z=y.indexOf("?");z!==-1&&(y=y.slice(0,z)),y+=`?${L.toString()}`}else A.body=s;await em(e,y,A)}async function B1(e,t){t.preventDefault();const i=e.getAttribute("data-url"),n=async()=>{"disabled"in e&&(e.disabled=!0),await em(e,i,{method:e.getAttribute("data-link-action-method")||"POST"}),"disabled"in e&&(e.disabled=!1)},s=e.getAttribute("data-modal-confirm")||e.getAttribute("data-modal-confirm-content")||"";if(!s){await n();return}const l=e.classList.contains("red")||e.classList.contains("negative");await Wu({header:e.getAttribute("data-modal-confirm-header")||"",content:s,confirmButtonColor:l?"red":"primary"})&&await n()}function $1(){(0,C.ny)(document,"submit",".form-fetch-action",H1),(0,C.ny)(document,"click",".link-action",B1)}function U1(){(0,C.ny)(document,"keypress","div.ui.button, span.ui.button",(e,t)=>{(t.code==="Space"||t.code==="Enter")&&(t.preventDefault(),e.click())})}function V1(){for(const e of document.querySelectorAll(".delete-button"))e.addEventListener("click",t=>{t.preventDefault();const i=e.dataset,n=e.getAttribute("data-modal-id"),s=document.querySelector(`.delete.modal${n?`#${n}`:""}`),l=s.querySelector(".name");l&&(l.textContent=e.getAttribute("data-name"));for(const[u,m]of Object.entries(i))if(u.startsWith("data")){const y=s.querySelector(`.${u}`);y&&(y.textContent=m)}(0,ke.mD)(s).modal({closable:!1,onApprove:async()=>{if(e.getAttribute("data-type")==="form"){const y=e.getAttribute("data-form"),A=document.querySelector(y);if(!A)throw new Error(`no form named ${y} found`);A.submit()}const u=new FormData;for(const[y,A]of Object.entries(i))y.startsWith("data")&&u.append(y.slice(4),A),y==="id"&&u.append("id",A);const m=await(0,Ae.LO)(e.getAttribute("data-url"),{data:u});if(m.ok){const y=await m.json();window.location.href=y.redirect}}}).modal("show")})}function W1(e,t){t.preventDefault();const i=e.getAttribute("data-panel");e.classList.contains("toggle")?(0,C.oi)(i):(0,C.fi)(i)}function z1(e,t){t.preventDefault();let i=e.getAttribute("data-panel");if(i){(0,C.y9)(i);return}if(i=e.getAttribute("data-panel-closest"),i){(0,C.y9)(e.parentNode.closest(i));return}throw new Error("no panel to hide")}function K1(e,t,i){const n=(0,W.PT)(t),s=e[n];if(typeof s=="boolean")e[n]=i==="true";else if(typeof s=="number")e[n]=parseFloat(i);else if(typeof s=="string")e[n]=i;else if(s?.nodeName)e.setAttribute(t,i);else throw new Error(`cannot assign element property "${n}" by value "${i}"`)}function X1(e,t){t.preventDefault();const i=e.getAttribute("data-modal"),n=document.querySelector(i);if(!n)throw new Error("no modal for this action");const s="data-modal-";for(const l of e.attributes){if(!l.name.startsWith(s))continue;const u=l.name.substring(s.length),[m,y]=u.split("."),A=n.querySelector(`#${m}`)||n.querySelector(`[name=${m}]`)||n.querySelector(`.${m}`)||n.querySelector(`${m}`);if(!A){if(!window.config.runModeIsProd)throw new Error(`attr target "${u}" not found for modal`);continue}y?K1(A,y,l.value):A.matches("input, textarea")?A.value=l.value:A.textContent=l.value}(0,ke.mD)(n).modal("setting",{onApprove:()=>{if(n.querySelector(".form-fetch-action"))return!1}}).modal("show")}function G1(){(0,C.ny)(document,"click","form button.ui.cancel.button",(e,t)=>t.preventDefault()),(0,C.ny)(document,"click",".show-panel, .hide-panel, .show-modal",(e,t)=>{e.classList.contains("show-panel")?W1(e,t):e.classList.contains("hide-panel")?z1(e,t):e.classList.contains("show-modal")&&X1(e,t)})}function Q1(){s0(window.jQuery),document.querySelector(".page-content.user.signin")||zu("form:not(.ignore-dirty)")}function Y1(){document.addEventListener("keydown",e=>{if(e.key!=="Enter")return;(e.ctrlKey||e.metaKey)&&!e.altKey&&e.target.matches("textarea")?kc(e.target)&&e.preventDefault():e.target.matches("input")&&!e.target.closest("form")&&kc(e.target)&&e.preventDefault()})}function J1(){(0,C.jB)(document,".combo-markdown-editor:not(.custom-init)",e=>ma(e))}var Z1=Object.defineProperty,e5=(e,t,i)=>t in e?Z1(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i,t5=(e,t,i)=>e5(e,typeof t!="symbol"?t+"":t,i);class i5{constructor(){t5(this,"results",[])}recordCall(t,i){const n=performance.now();i(),this.results.push({name:t,dur:performance.now()-n})}printResults(){this.results=this.results.sort((t,i)=>i.dur-t.dur);for(let t=0;t<20&&t<this.results.length;t++)console.info(`performance trace: ${this.results[t].name} ${this.results[t].dur.toFixed(3)}`)}}function n5(e){const t=window.location.search.includes("_ui_performance_trace=1")?new i5:null;if(t)for(const i of e)t.recordCall(i.name,i);else for(const i of e)i();return t}const s5=["title"],r5={class:"item-content"},o5=["innerHTML"],a5={class:"gt-ellipsis tw-flex-1"},l5=["title"],c5={class:"item-content"},u5=["innerHTML"],d5={class:"gt-ellipsis tw-flex-1"},f5=["title"],h5={class:"item-content"},m5=["innerHTML"],p5={class:"gt-ellipsis tw-flex-1"},g5=["title"],v5={class:"item-toggle"},b5={class:"item-content"},_5=["innerHTML"],y5={class:"gt-ellipsis"},w5={key:4,class:"sub-items"};var S5=(0,c.pM)({__name:"ViewFileTreeItem",props:{item:{},navigateViewContent:{type:Function},loadChildren:{type:Function},selectedItem:{}},setup(e){const t=e,i=(0,Re.KR)(!1),n=(0,Re.KR)(t.item.children),s=(0,Re.KR)(!t.item.children),l=async()=>{if(s.value=!s.value,!s.value&&t.loadChildren){i.value=!0;try{n.value=await t.loadChildren(t.item.fullPath)}finally{i.value=!1}}},u=()=>{l(),t.navigateViewContent(t.item.fullPath)},m=()=>{t.navigateViewContent(t.item.fullPath)},y=()=>{location.href=t.item.submoduleUrl};return(A,L)=>{const z=(0,c.g2)("ViewFileTreeItem",!0);return(0,c.uX)(),(0,c.CE)(c.FK,null,[A.item.entryMode==="commit"?((0,c.uX)(),(0,c.CE)("div",{key:0,class:"tree-item type-submodule",title:A.item.entryName,onClick:Di(y,["stop"])},[(0,c.Q3)(" submodule "),(0,c.Lk)("div",r5,[(0,c.Q3)(" eslint-disable-next-line vue/no-v-html "),(0,c.Lk)("span",{class:"tw-contents",innerHTML:A.item.entryIcon},null,8,o5),(0,c.Lk)("span",a5,(0,W.v_)(A.item.entryName),1)])],8,s5)):A.item.entryMode==="symlink"?((0,c.uX)(),(0,c.CE)("div",{key:1,class:(0,W.C4)(["tree-item type-symlink",{selected:A.selectedItem===A.item.fullPath}]),title:A.item.entryName,onClick:Di(m,["stop"])},[(0,c.Q3)(" symlink "),(0,c.Lk)("div",c5,[(0,c.Q3)(" eslint-disable-next-line vue/no-v-html "),(0,c.Lk)("span",{class:"tw-contents",innerHTML:A.item.entryIcon},null,8,u5),(0,c.Lk)("span",d5,(0,W.v_)(A.item.entryName),1)])],10,l5)):A.item.entryMode!=="tree"?((0,c.uX)(),(0,c.CE)("div",{key:2,class:(0,W.C4)(["tree-item type-file",{selected:A.selectedItem===A.item.fullPath}]),title:A.item.entryName,onClick:Di(m,["stop"])},[(0,c.Q3)(" file "),(0,c.Lk)("div",h5,[(0,c.Q3)(" eslint-disable-next-line vue/no-v-html "),(0,c.Lk)("span",{class:"tw-contents",innerHTML:A.item.entryIcon},null,8,m5),(0,c.Lk)("span",p5,(0,W.v_)(A.item.entryName),1)])],10,f5)):((0,c.uX)(),(0,c.CE)("div",{key:3,class:(0,W.C4)(["tree-item type-directory",{selected:A.selectedItem===A.item.fullPath}]),title:A.item.entryName,onClick:Di(u,["stop"])},[(0,c.Q3)(" directory "),(0,c.Lk)("div",v5,[i.value?((0,c.uX)(),(0,c.Wv)((0,Re.R1)(Z.Ah),{key:0,name:"octicon-sync",class:"circular-spin"})):((0,c.uX)(),(0,c.Wv)((0,Re.R1)(Z.Ah),{key:1,name:s.value?"octicon-chevron-right":"octicon-chevron-down",onClick:Di(l,["stop"])},null,8,["name"]))]),(0,c.Lk)("div",b5,[(0,c.Q3)(" eslint-disable-next-line vue/no-v-html "),(0,c.Lk)("span",{class:"tw-contents",innerHTML:!s.value&&A.item.entryIconOpen?A.item.entryIconOpen:A.item.entryIcon},null,8,_5),(0,c.Lk)("span",y5,(0,W.v_)(A.item.entryName),1)])],10,g5)),n.value?.length?(0,c.bo)(((0,c.uX)(),(0,c.CE)("div",w5,[((0,c.uX)(!0),(0,c.CE)(c.FK,null,(0,c.pI)(n.value,X=>((0,c.uX)(),(0,c.Wv)(z,{key:X.entryName,item:X,"selected-item":A.selectedItem,"navigate-view-content":A.navigateViewContent,"load-children":A.loadChildren},null,8,["item","selected-item","navigate-view-content","load-children"]))),128))],512)),[[ti,!s.value]]):(0,c.Q3)("v-if",!0)],64)}}}),x5=(0,Xi.A)(S5,[["__scopeId","data-v-cbbebcae"]]),j5=(0,c.pM)({__name:"ViewFileTree",props:{repoLink:{type:String,required:!0},treePath:{type:String,required:!0},currentRefNameSubURL:{type:String,required:!0}},setup(e){const t=(0,Re.KR)(null),i=e,n=(0,Re.KR)([]),s=(0,Re.KR)("");async function l(y,A=""){const z=await(await(0,Ae.fG)(`${i.repoLink}/tree-view/${i.currentRefNameSubURL}/${(0,pr.ZP)(y)}?sub_path=${encodeURIComponent(A)}`)).json(),X=[];for(const[_e,pe]of Object.entries(z.renderedIconPool??{}))document.querySelector(`.global-svg-icon-pool #${_e}`)||X.push(pe);if(X.length){const _e=(0,C.SL)('<div class="global-svg-icon-pool tw-hidden"></div>');_e.innerHTML=X.join(""),document.body.append(_e)}return z.fileTreeNodes??null}async function u(y){y=y.includes("?")?y.replace("?","?only_content=true"):`${y}?only_content=true`;const A=await(0,Ae.fG)(y);document.querySelector(".repo-view-content").innerHTML=await A.text()}async function m(y){const A=`${i.repoLink}/src/${i.currentRefNameSubURL}/${(0,pr.ZP)(y)}`;window.history.pushState({treePath:y,url:A},null,A),s.value=y,await u(A)}return(0,c.sV)(async()=>{s.value=i.treePath,n.value=await l("",i.treePath),t.value.closest(".is-loading")?.classList?.remove("is-loading"),window.addEventListener("popstate",y=>{s.value=y.state?.treePath||"",y.state?.url&&u(y.state.url)})}),(y,A)=>((0,c.uX)(),(0,c.CE)("div",{class:"view-file-tree-items",ref_key:"elRoot",ref:t},[(0,c.Q3)(" only render the tree if we're visible. in many cases this is something that doesn't change very often "),((0,c.uX)(!0),(0,c.CE)(c.FK,null,(0,c.pI)(n.value,L=>((0,c.uX)(),(0,c.Wv)(x5,{key:L.name,item:L,"selected-item":s.value,"navigate-view-content":m,"load-children":l},null,8,["item","selected-item"]))),128))],512))}}),E5=(0,Xi.A)(j5,[["__scopeId","data-v-20c25596"]]);const{appSubUrl:A5}=window.config;async function C5(e){const t=document.querySelector(".repo-view-file-tree-toggle-show"),i=document.querySelector(".repo-view-file-tree-container"),n=e.getAttribute("data-toggle-action")==="show";(0,C.oi)(i,n),(0,C.oi)(t,!n),i.hasAttribute("data-user-is-signed-in")&&await(0,Ae.LO)(`${A5}/user/settings/update_preferences`,{data:{codeViewShowFileTree:n}})}async function k5(){const e=document.querySelector(".repo-view-file-tree-container"),t=document.querySelector(".repo-view-content");if(!e||!t)return;_c("click","onRepoViewFileTreeToggle",C5);const i=e.querySelector("#view-file-tree");Ai(E5,{repoLink:i.getAttribute("data-repo-link"),treePath:i.getAttribute("data-tree-path"),currentRefNameSubURL:i.getAttribute("data-current-ref-name-sub-url")}).mount(i)}Pb(),(0,C.Gz)(),(0,C.Pm)(()=>{const e=performance.now(),t=n5([Yp,Gp,Qp,$1,Ot,U1,G1,ui,Y1,Q1,J1,V1,Zp,yb,x1,db,pb,fb,Kp,Xp,jl,gm,Ld,pp,Up,J0,Ep,cp,Mp,ew,z0,dp,hp,q1,Pi,_p,Kd,Zv,Qm,Gm,gb,Y0,Jy,$0,L1,a0,he,tf,v1,k0,A0,ip,ev,lp,R0,D0,ob,ab,V0,k5,Ib,Zy,f1,R1,j1,E1,A1,U0,tw,tg,ig,eb,sb,Z0,Gv,Vp,M1,P1]);$p(t),t&&t.printResults();const i=performance.now()-e;i>500&&console.error(`slow init functions took ${i.toFixed(3)}ms`)})}(),function(){"use strict"}(),function(){"use strict"}(),function(){"use strict"}()})();
DesignScreenshot/output/git.buildapp.eu.org_run/git.buildapp.eu.org_3_credentials_filled.html:228:`)}function j(qe){if(Ke(qe)){const bt={};for(let Rt=0;Rt<qe.length;Rt++){const Yt=qe[Rt],Ui=W(Yt)?De(Yt):j(Yt);if(Ui)for(const Bi in Ui)bt[Bi]=Ui[Bi]}return bt}else if(W(qe)||tt(qe))return qe}const H=/;(?![^(]*\))/g,ge=/:([^]+)/,me=/\/\*[^]*?\*\//g;function De(qe){const bt={};return qe.replace(me,"").split(H).forEach(Rt=>{if(Rt){const Yt=Rt.split(ge);Yt.length>1&&(bt[Yt[0].trim()]=Yt[1].trim())}}),bt}function ht(qe){if(!qe)return"";if(W(qe))return qe;let bt="";for(const Rt in qe){const Yt=qe[Rt];if(W(Yt)||typeof Yt=="number"){const Ui=Rt.startsWith("--")?Rt:Y(Rt);bt+=`${Ui}:${Yt};`}}return bt}function rt(qe){let bt="";if(W(qe))bt=qe;else if(Ke(qe))for(let Rt=0;Rt<qe.length;Rt++){const Yt=rt(qe[Rt]);Yt&&(bt+=Yt+" ")}else if(tt(qe))for(const Rt in qe)qe[Rt]&&(bt+=Rt+" ");return bt.trim()}function zt(qe){if(!qe)return null;let{class:bt,style:Rt}=qe;return bt&&!W(bt)&&(qe.class=rt(bt)),Rt&&(qe.style=j(Rt)),qe}const fi="html,body,base,head,link,meta,style,title,address,article,aside,footer,header,hgroup,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot",vi="svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,feDistantLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,text,textPath,title,tspan,unknown,use,view",nn="annotation,annotation-xml,maction,maligngroup,malignmark,math,menclose,merror,mfenced,mfrac,mfraction,mglyph,mi,mlabeledtr,mlongdiv,mmultiscripts,mn,mo,mover,mpadded,mphantom,mprescripts,mroot,mrow,ms,mscarries,mscarry,msgroup,msline,mspace,msqrt,msrow,mstack,mstyle,msub,msubsup,msup,mtable,mtd,mtext,mtr,munder,munderover,none,semantics",on="area,base,br,col,embed,hr,img,input,link,meta,param,source,track,wbr",an=null,bn=null,ln=null,Yi=null,Fn="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",vr=_(Fn),Ln=_(Fn+",async,autofocus,autoplay,controls,default,defer,disabled,hidden,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected");function Gs(qe){return!!qe||qe===""}const js=/[>/="'\u0009\u000a\u000c\u0020]/,os={};function Es(qe){if(os.hasOwnProperty(qe))return os[qe];const bt=js.test(qe);return bt&&console.error(`unsafe attribute name: ${qe}`),os[qe]=!bt}const qs={acceptCharset:"accept-charset",className:"class",htmlFor:"for",httpEquiv:"http-equiv"},As=null,Ys=null,On=null;function Tn(qe){if(qe==null)return!1;const bt=typeof qe;return bt==="string"||bt==="number"||bt==="boolean"}const jn=/["'&<>]/;function hn(qe){const bt=""+qe,Rt=jn.exec(bt);if(!Rt)return bt;let Yt="",Ui,Bi,An=0;for(Bi=Rt.index;Bi<bt.length;Bi++){switch(bt.charCodeAt(Bi)){case 34:Ui="&quot;";break;case 38:Ui="&amp;";break;case 39:Ui="&#39;";break;case 60:Ui="&lt;";break;case 62:Ui="&gt;";break;default:continue}An!==Bi&&(Yt+=bt.slice(An,Bi)),An=Bi+1,Yt+=Ui}return An!==Bi?Yt+bt.slice(An,Bi):Yt}const Ji=/^-?>|<!--|-->|--!>|<!-$/g;function sn(qe){return qe.replace(Ji,"")}const mn=/[ !"#$%&'()*+,./:;<=>?@[\\\]^`{|}~]/g;function mi(qe,bt){return qe.replace(mn,Rt=>bt?Rt==='"'?'\\\\\\"':`\\\\${Rt}`:`\\${Rt}`)}function Js(qe,bt){if(qe.length!==bt.length)return!1;let Rt=!0;for(let Yt=0;Rt&&Yt<qe.length;Yt++)Rt=Ri(qe[Yt],bt[Yt]);return Rt}function Ri(qe,bt){if(qe===bt)return!0;let Rt=q(qe),Yt=q(bt);if(Rt||Yt)return Rt&&Yt?qe.getTime()===bt.getTime():!1;if(Rt=Re(qe),Yt=Re(bt),Rt||Yt)return qe===bt;if(Rt=Ke(qe),Yt=Ke(bt),Rt||Yt)return Rt&&Yt?Js(qe,bt):!1;if(Rt=tt(qe),Yt=tt(bt),Rt||Yt){if(!Rt||!Yt)return!1;const Ui=Object.keys(qe).length,Bi=Object.keys(bt).length;if(Ui!==Bi)return!1;for(const An in qe){const cn=qe.hasOwnProperty(An),pn=bt.hasOwnProperty(An);if(cn&&!pn||!cn&&pn||!Ri(qe[An],bt[An]))return!1}}return String(qe)===String(bt)}function Rr(qe,bt){return qe.findIndex(Rt=>Ri(Rt,bt))}const En=qe=>!!(qe&&qe.__v_isRef===!0),Mr=qe=>W(qe)?qe:qe==null?"":Ke(qe)||tt(qe)&&(qe.toString===et||!c(qe.toString))?En(qe)?Mr(qe.value):JSON.stringify(qe,Ps,2):String(qe),Ps=(qe,bt)=>En(bt)?Ps(qe,bt.value):At(bt)?{[`Map(${bt.size})`]:[...bt.entries()].reduce((Rt,[Yt,Ui],Bi)=>(Rt[br(Yt,Bi)+" =>"]=Ui,Rt),{})}:gt(bt)?{[`Set(${bt.size})`]:[...bt.values()].map(Rt=>br(Rt))}:Re(bt)?br(bt):tt(bt)&&!Ke(bt)&&!si(bt)?String(bt):bt,br=(qe,bt="")=>{var Rt;return Re(qe)?`Symbol(${(Rt=qe.description)!=null?Rt:bt})`:qe}},"./node_modules/balanced-match/index.js":function(r){"use strict";r.exports=v;function v(g,O,R){g instanceof RegExp&&(g=b(g,R)),O instanceof RegExp&&(O=b(O,R));var J=_(g,O,R);return J&&{start:J[0],end:J[1],pre:R.slice(0,J[0]),body:R.slice(J[0]+g.length,J[1]),post:R.slice(J[1]+O.length)}}function b(g,O){var R=O.match(g);return R?R[0]:null}v.range=_;function _(g,O,R){var J,Z,C,we,Be,Ue=R.indexOf(g),Q=R.indexOf(O,Ue+1),Ke=Ue;if(Ue>=0&&Q>0){if(g===O)return[Ue,Q];for(J=[],C=R.length;Ke>=0&&!Be;)Ke==Ue?(J.push(Ke),Ue=R.indexOf(g,Ke+1)):J.length==1?Be=[J.pop(),Q]:(Z=J.pop(),Z<C&&(C=Z,we=Q),Q=R.indexOf(O,Ke+1)),Ke=Ue<Q&&Ue>=0?Ue:Q;J.length&&(Be=[C,we])}return Be}},"./node_modules/brace-expansion/index.js":function(r,v,b){var _=b("./node_modules/balanced-match/index.js");r.exports=Q;var g="\0SLASH"+Math.random()+"\0",O="\0OPEN"+Math.random()+"\0",R="\0CLOSE"+Math.random()+"\0",J="\0COMMA"+Math.random()+"\0",Z="\0PERIOD"+Math.random()+"\0";function C(c){return parseInt(c,10)==c?parseInt(c,10):c.charCodeAt(0)}function we(c){return c.split("\\\\").join(g).split("\\{").join(O).split("\\}").join(R).split("\\,").join(J).split("\\.").join(Z)}function Be(c){return c.split(g).join("\\").split(O).join("{").split(R).join("}").split(J).join(",").split(Z).join(".")}function Ue(c){if(!c)return[""];var W=[],Re=_("{","}",c);if(!Re)return c.split(",");var tt=Re.pre,st=Re.body,et=Re.post,je=tt.split(",");je[je.length-1]+="{"+st+"}";var S=Ue(et);return et.length&&(je[je.length-1]+=S.shift(),je.push.apply(je,S)),W.push.apply(W,je),W}function Q(c){return c?(c.substr(0,2)==="{}"&&(c="\\{\\}"+c.substr(2)),ne(we(c),!0).map(Be)):[]}function Ke(c){return"{"+c+"}"}function At(c){return/^-?0\d/.test(c)}function gt(c,W){return c<=W}function q(c,W){return c>=W}function ne(c,W){var Re=[],tt=_("{","}",c);if(!tt)return[c];var st=tt.pre,et=tt.post.length?ne(tt.post,!1):[""];if(/\$$/.test(tt.pre))for(var je=0;je<et.length;je++){var S=st+"{"+tt.body+"}"+et[je];Re.push(S)}else{var si=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(tt.body),ct=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(tt.body),xt=si||ct,ce=tt.body.indexOf(",")>=0;if(!xt&&!ce)return tt.post.match(/,.*\}/)?(c=tt.pre+"{"+tt.body+R+tt.post,ne(c)):[c];var G;if(xt)G=tt.body.split(/\.\./);else if(G=Ue(tt.body),G.length===1&&(G=ne(G[0],!1).map(Ke),G.length===1))return et.map(function(te){return tt.pre+G[0]+te});var P;if(xt){var k=C(G[0]),N=C(G[1]),Y=Math.max(G[0].length,G[1].length),ve=G.length==3?Math.abs(C(G[2])):1,Oe=gt,Ne=N<k;Ne&&(ve*=-1,Oe=q);var Ve=G.some(At);P=[];for(var Ye=k;Oe(Ye,N);Ye+=ve){var Lt;if(ct)Lt=String.fromCharCode(Ye),Lt==="\\"&&(Lt="");else if(Lt=String(Ye),Ve){var K=Y-Lt.length;if(K>0){var Ee=new Array(K+1).join("0");Ye<0?Lt="-"+Ee+Lt.slice(1):Lt=Ee+Lt}}P.push(Lt)}}else{P=[];for(var nt=0;nt<G.length;nt++)P.push.apply(P,ne(G[nt],!1))}for(var nt=0;nt<P.length;nt++)for(var je=0;je<et.length;je++){var S=st+P[nt]+et[je];(!W||xt||S)&&Re.push(S)}}return Re}},"./node_modules/dayjs/dayjs.min.js":function(r){(function(v,b){r.exports=b()})(this,function(){"use strict";var v=1e3,b=6e4,_=36e5,g="millisecond",O="second",R="minute",J="hour",Z="day",C="week",we="month",Be="quarter",Ue="year",Q="date",Ke="Invalid Date",At=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,gt=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,q={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(xt){var ce=["th","st","nd","rd"],G=xt%100;return"["+xt+(ce[(G-20)%10]||ce[G]||ce[0])+"]"}},ne=function(xt,ce,G){var P=String(xt);return!P||P.length>=ce?xt:""+Array(ce+1-P.length).join(G)+xt},c={s:ne,z:function(xt){var ce=-xt.utcOffset(),G=Math.abs(ce),P=Math.floor(G/60),k=G%60;return(ce<=0?"+":"-")+ne(P,2,"0")+":"+ne(k,2,"0")},m:function xt(ce,G){if(ce.date()<G.date())return-xt(G,ce);var P=12*(G.year()-ce.year())+(G.month()-ce.month()),k=ce.clone().add(P,we),N=G-k<0,Y=ce.clone().add(P+(N?-1:1),we);return+(-(P+(G-k)/(N?k-Y:Y-k))||0)},a:function(xt){return xt<0?Math.ceil(xt)||0:Math.floor(xt)},p:function(xt){return{M:we,y:Ue,w:C,d:Z,D:Q,h:J,m:R,s:O,ms:g,Q:Be}[xt]||String(xt||"").toLowerCase().replace(/s$/,"")},u:function(xt){return xt===void 0}},W="en",Re={};Re[W]=q;var tt="$isDayjsObject",st=function(xt){return xt instanceof si||!(!xt||!xt[tt])},et=function xt(ce,G,P){var k;if(!ce)return W;if(typeof ce=="string"){var N=ce.toLowerCase();Re[N]&&(k=N),G&&(Re[N]=G,k=N);var Y=ce.split("-");if(!k&&Y.length>1)return xt(Y[0])}else{var ve=ce.name;Re[ve]=ce,k=ve}return!P&&k&&(W=k),k||!P&&W},je=function(xt,ce){if(st(xt))return xt.clone();var G=typeof ce=="object"?ce:{};return G.date=xt,G.args=arguments,new si(G)},S=c;S.l=et,S.i=st,S.w=function(xt,ce){return je(xt,{locale:ce.$L,utc:ce.$u,x:ce.$x,$offset:ce.$offset})};var si=function(){function xt(G){this.$L=et(G.locale,null,!0),this.parse(G),this.$x=this.$x||G.x||{},this[tt]=!0}var ce=xt.prototype;return ce.parse=function(G){this.$d=function(P){var k=P.date,N=P.utc;if(k===null)return new Date(NaN);if(S.u(k))return new Date;if(k instanceof Date)return new Date(k);if(typeof k=="string"&&!/Z$/i.test(k)){var Y=k.match(At);if(Y){var ve=Y[2]-1||0,Oe=(Y[7]||"0").substring(0,3);return N?new Date(Date.UTC(Y[1],ve,Y[3]||1,Y[4]||0,Y[5]||0,Y[6]||0,Oe)):new Date(Y[1],ve,Y[3]||1,Y[4]||0,Y[5]||0,Y[6]||0,Oe)}}return new Date(k)}(G),this.init()},ce.init=function(){var G=this.$d;this.$y=G.getFullYear(),this.$M=G.getMonth(),this.$D=G.getDate(),this.$W=G.getDay(),this.$H=G.getHours(),this.$m=G.getMinutes(),this.$s=G.getSeconds(),this.$ms=G.getMilliseconds()},ce.$utils=function(){return S},ce.isValid=function(){return this.$d.toString()!==Ke},ce.isSame=function(G,P){var k=je(G);return this.startOf(P)<=k&&k<=this.endOf(P)},ce.isAfter=function(G,P){return je(G)<this.startOf(P)},ce.isBefore=function(G,P){return this.endOf(P)<je(G)},ce.$g=function(G,P,k){return S.u(G)?this[P]:this.set(k,G)},ce.unix=function(){return Math.floor(this.valueOf()/1e3)},ce.valueOf=function(){return this.$d.getTime()},ce.startOf=function(G,P){var k=this,N=!!S.u(P)||P,Y=S.p(G),ve=function(nt,te){var ee=S.w(k.$u?Date.UTC(k.$y,te,nt):new Date(k.$y,te,nt),k);return N?ee:ee.endOf(Z)},Oe=function(nt,te){return S.w(k.toDate()[nt].apply(k.toDate("s"),(N?[0,0,0,0]:[23,59,59,999]).slice(te)),k)},Ne=this.$W,Ve=this.$M,Ye=this.$D,Lt="set"+(this.$u?"UTC":"");switch(Y){case Ue:return N?ve(1,0):ve(31,11);case we:return N?ve(1,Ve):ve(0,Ve+1);case C:var K=this.$locale().weekStart||0,Ee=(Ne<K?Ne+7:Ne)-K;return ve(N?Ye-Ee:Ye+(6-Ee),Ve);case Z:case Q:return Oe(Lt+"Hours",0);case J:return Oe(Lt+"Minutes",1);case R:return Oe(Lt+"Seconds",2);case O:return Oe(Lt+"Milliseconds",3);default:return this.clone()}},ce.endOf=function(G){return this.startOf(G,!1)},ce.$set=function(G,P){var k,N=S.p(G),Y="set"+(this.$u?"UTC":""),ve=(k={},k[Z]=Y+"Date",k[Q]=Y+"Date",k[we]=Y+"Month",k[Ue]=Y+"FullYear",k[J]=Y+"Hours",k[R]=Y+"Minutes",k[O]=Y+"Seconds",k[g]=Y+"Milliseconds",k)[N],Oe=N===Z?this.$D+(P-this.$W):P;if(N===we||N===Ue){var Ne=this.clone().set(Q,1);Ne.$d[ve](Oe),Ne.init(),this.$d=Ne.set(Q,Math.min(this.$D,Ne.daysInMonth())).$d}else ve&&this.$d[ve](Oe);return this.init(),this},ce.set=function(G,P){return this.clone().$set(G,P)},ce.get=function(G){return this[S.p(G)]()},ce.add=function(G,P){var k,N=this;G=Number(G);var Y=S.p(P),ve=function(Ve){var Ye=je(N);return S.w(Ye.date(Ye.date()+Math.round(Ve*G)),N)};if(Y===we)return this.set(we,this.$M+G);if(Y===Ue)return this.set(Ue,this.$y+G);if(Y===Z)return ve(1);if(Y===C)return ve(7);var Oe=(k={},k[R]=b,k[J]=_,k[O]=v,k)[Y]||1,Ne=this.$d.getTime()+G*Oe;return S.w(Ne,this)},ce.subtract=function(G,P){return this.add(-1*G,P)},ce.format=function(G){var P=this,k=this.$locale();if(!this.isValid())return k.invalidDate||Ke;var N=G||"YYYY-MM-DDTHH:mm:ssZ",Y=S.z(this),ve=this.$H,Oe=this.$m,Ne=this.$M,Ve=k.weekdays,Ye=k.months,Lt=k.meridiem,K=function(te,ee,oe,Ge){return te&&(te[ee]||te(P,N))||oe[ee].slice(0,Ge)},Ee=function(te){return S.s(ve%12||12,te,"0")},nt=Lt||function(te,ee,oe){var Ge=te<12?"AM":"PM";return oe?Ge.toLowerCase():Ge};return N.replace(gt,function(te,ee){return ee||function(oe){switch(oe){case"YY":return String(P.$y).slice(-2);case"YYYY":return S.s(P.$y,4,"0");case"M":return Ne+1;case"MM":return S.s(Ne+1,2,"0");case"MMM":return K(k.monthsShort,Ne,Ye,3);case"MMMM":return K(Ye,Ne);case"D":return P.$D;case"DD":return S.s(P.$D,2,"0");case"d":return String(P.$W);case"dd":return K(k.weekdaysMin,P.$W,Ve,2);case"ddd":return K(k.weekdaysShort,P.$W,Ve,3);case"dddd":return Ve[P.$W];case"H":return String(ve);case"HH":return S.s(ve,2,"0");case"h":return Ee(1);case"hh":return Ee(2);case"a":return nt(ve,Oe,!0);case"A":return nt(ve,Oe,!1);case"m":return String(Oe);case"mm":return S.s(Oe,2,"0");case"s":return String(P.$s);case"ss":return S.s(P.$s,2,"0");case"SSS":return S.s(P.$ms,3,"0");case"Z":return Y}return null}(te)||Y.replace(":","")})},ce.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},ce.diff=function(G,P,k){var N,Y=this,ve=S.p(P),Oe=je(G),Ne=(Oe.utcOffset()-this.utcOffset())*b,Ve=this-Oe,Ye=function(){return S.m(Y,Oe)};switch(ve){case Ue:N=Ye()/12;break;case we:N=Ye();break;case Be:N=Ye()/3;break;case C:N=(Ve-Ne)/6048e5;break;case Z:N=(Ve-Ne)/864e5;break;case J:N=Ve/_;break;case R:N=Ve/b;break;case O:N=Ve/v;break;default:N=Ve}return k?N:S.a(N)},ce.daysInMonth=function(){return this.endOf(we).$D},ce.$locale=function(){return Re[this.$L]},ce.locale=function(G,P){if(!G)return this.$L;var k=this.clone(),N=et(G,P,!0);return N&&(k.$L=N),k},ce.clone=function(){return S.w(this.$d,this)},ce.toDate=function(){return new Date(this.valueOf())},ce.toJSON=function(){return this.isValid()?this.toISOString():null},ce.toISOString=function(){return this.$d.toISOString()},ce.toString=function(){return this.$d.toUTCString()},xt}(),ct=si.prototype;return je.prototype=ct,[["$ms",g],["$s",O],["$m",R],["$H",J],["$W",Z],["$M",we],["$y",Ue],["$D",Q]].forEach(function(xt){ct[xt[1]]=function(ce){return this.$g(ce,xt[0],xt[1])}}),je.extend=function(xt,ce){return xt.$i||(xt(ce,si,je),xt.$i=!0),je},je.locale=et,je.isDayjs=st,je.unix=function(xt){return je(1e3*xt)},je.en=Re[W],je.Ls=Re,je.p={},je})},"./node_modules/dayjs/plugin/utc.js":function(r){(function(v,b){r.exports=b()})(this,function(){"use strict";var v="minute",b=/[+-]\d\d(?::?\d\d)?/g,_=/([+-]|\d\d)/g;return function(g,O,R){var J=O.prototype;R.utc=function(Ke){var At={date:Ke,utc:!0,args:arguments};return new O(At)},J.utc=function(Ke){var At=R(this.toDate(),{locale:this.$L,utc:!0});return Ke?At.add(this.utcOffset(),v):At},J.local=function(){return R(this.toDate(),{locale:this.$L,utc:!1})};var Z=J.parse;J.parse=function(Ke){Ke.utc&&(this.$u=!0),this.$utils().u(Ke.$offset)||(this.$offset=Ke.$offset),Z.call(this,Ke)};var C=J.init;J.init=function(){if(this.$u){var Ke=this.$d;this.$y=Ke.getUTCFullYear(),this.$M=Ke.getUTCMonth(),this.$D=Ke.getUTCDate(),this.$W=Ke.getUTCDay(),this.$H=Ke.getUTCHours(),this.$m=Ke.getUTCMinutes(),this.$s=Ke.getUTCSeconds(),this.$ms=Ke.getUTCMilliseconds()}else C.call(this)};var we=J.utcOffset;J.utcOffset=function(Ke,At){var gt=this.$utils().u;if(gt(Ke))return this.$u?0:gt(this.$offset)?we.call(this):this.$offset;if(typeof Ke=="string"&&(Ke=function(W){W===void 0&&(W="");var Re=W.match(b);if(!Re)return null;var tt=(""+Re[0]).match(_)||["-",0,0],st=tt[0],et=60*+tt[1]+ +tt[2];return et===0?0:st==="+"?et:-et}(Ke),Ke===null))return this;var q=Math.abs(Ke)<=16?60*Ke:Ke,ne=this;if(At)return ne.$offset=q,ne.$u=Ke===0,ne;if(Ke!==0){var c=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(ne=this.local().add(q+c,v)).$offset=q,ne.$x.$localOffset=c}else ne=this.utc();return ne};var Be=J.format;J.format=function(Ke){var At=Ke||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return Be.call(this,At)},J.valueOf=function(){var Ke=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*Ke},J.isUTC=function(){return!!this.$u},J.toISOString=function(){return this.toDate().toISOString()},J.toString=function(){return this.toDate().toUTCString()};var Ue=J.toDate;J.toDate=function(Ke){return Ke==="s"&&this.$offset?R(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():Ue.call(this)};var Q=J.diff;J.diff=function(Ke,At,gt){if(Ke&&this.$u===Ke.$u)return Q.call(this,Ke,At,gt);var q=this.local(),ne=R(Ke).local();return Q.call(q,ne,At,gt)}}})},"./node_modules/htmx.org/dist/htmx.esm.js":function(__unused_webpack_module,__webpack_exports__){"use strict";var htmx=function(){"use strict";const htmx={onLoad:null,process:null,on:null,off:null,trigger:null,ajax:null,find:null,findAll:null,closest:null,values:function(r,v){return getInputValues(r,v||"post").values},remove:null,addClass:null,removeClass:null,toggleClass:null,takeClass:null,swap:null,defineExtension:null,removeExtension:null,logAll:null,logNone:null,logger:null,config:{historyEnabled:!0,historyCacheSize:10,refreshOnHistoryMiss:!1,defaultSwapStyle:"innerHTML",defaultSwapDelay:0,defaultSettleDelay:20,includeIndicatorStyles:!0,indicatorClass:"htmx-indicator",requestClass:"htmx-request",addedClass:"htmx-added",settlingClass:"htmx-settling",swappingClass:"htmx-swapping",allowEval:!0,allowScriptTags:!0,inlineScriptNonce:"",inlineStyleNonce:"",attributesToSettle:["class","style","width","height"],withCredentials:!1,timeout:0,wsReconnectDelay:"full-jitter",wsBinaryType:"blob",disableSelector:"[hx-disable], [data-hx-disable]",scrollBehavior:"instant",defaultFocusScroll:!1,getCacheBusterParam:!1,globalViewTransitions:!1,methodsThatUseUrlParams:["get","delete"],selfRequestsOnly:!0,ignoreTitle:!1,scrollIntoViewOnBoost:!0,triggerSpecsCache:null,disableInheritance:!1,responseHandling:[{code:"204",swap:!1},{code:"[23]..",swap:!0},{code:"[45]..",swap:!1,error:!0}],allowNestedOobSwaps:!0},parseInterval:null,_:null,version:"2.0.4"};htmx.onLoad=onLoadHelper,htmx.process=processNode,htmx.on=addEventListenerImpl,htmx.off=removeEventListenerImpl,htmx.trigger=triggerEvent,htmx.ajax=ajaxHelper,htmx.find=find,htmx.findAll=findAll,htmx.closest=closest,htmx.remove=removeElement,htmx.addClass=addClassToElement,htmx.removeClass=removeClassFromElement,htmx.toggleClass=toggleClassOnElement,htmx.takeClass=takeClassForElement,htmx.swap=swap,htmx.defineExtension=defineExtension,htmx.removeExtension=removeExtension,htmx.logAll=logAll,htmx.logNone=logNone,htmx.parseInterval=parseInterval,htmx._=internalEval;const internalAPI={addTriggerHandler,bodyContains,canAccessLocalStorage,findThisElement,filterValues,swap,hasAttribute,getAttributeValue,getClosestAttributeValue,getClosestMatch,getExpressionVars,getHeaders,getInputValues,getInternalData,getSwapSpecification,getTriggerSpecs,getTarget,makeFragment,mergeObjects,makeSettleInfo,oobSwap,querySelectorExt,settleImmediately,shouldCancel,triggerEvent,triggerErrorEvent,withExtensions},VERBS=["get","post","put","delete","patch"],VERB_SELECTOR=VERBS.map(function(r){return"[hx-"+r+"], [data-hx-"+r+"]"}).join(", ");function parseInterval(r){if(r==null)return;let v=NaN;return r.slice(-2)=="ms"?v=parseFloat(r.slice(0,-2)):r.slice(-1)=="s"?v=parseFloat(r.slice(0,-1))*1e3:r.slice(-1)=="m"?v=parseFloat(r.slice(0,-1))*1e3*60:v=parseFloat(r),isNaN(v)?void 0:v}function getRawAttribute(r,v){return r instanceof Element&&r.getAttribute(v)}function hasAttribute(r,v){return!!r.hasAttribute&&(r.hasAttribute(v)||r.hasAttribute("data-"+v))}function getAttributeValue(r,v){return getRawAttribute(r,v)||getRawAttribute(r,"data-"+v)}function parentElt(r){const v=r.parentElement;return!v&&r.parentNode instanceof ShadowRoot?r.parentNode:v}function getDocument(){return document}function getRootNode(r,v){return r.getRootNode?r.getRootNode({composed:v}):getDocument()}function getClosestMatch(r,v){for(;r&&!v(r);)r=parentElt(r);return r||null}function getAttributeValueWithDisinheritance(r,v,b){const _=getAttributeValue(v,b),g=getAttributeValue(v,"hx-disinherit");var O=getAttributeValue(v,"hx-inherit");if(r!==v){if(htmx.config.disableInheritance)return O&&(O==="*"||O.split(" ").indexOf(b)>=0)?_:null;if(g&&(g==="*"||g.split(" ").indexOf(b)>=0))return"unset"}return _}function getClosestAttributeValue(r,v){let b=null;if(getClosestMatch(r,function(_){return!!(b=getAttributeValueWithDisinheritance(r,asElement(_),v))}),b!=="unset")return b}function matches(r,v){const b=r instanceof Element&&(r.matches||r.matchesSelector||r.msMatchesSelector||r.mozMatchesSelector||r.webkitMatchesSelector||r.oMatchesSelector);return!!b&&b.call(r,v)}function getStartTag(r){const b=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i.exec(r);return b?b[1].toLowerCase():""}function parseHTML(r){return new DOMParser().parseFromString(r,"text/html")}function takeChildrenFor(r,v){for(;v.childNodes.length>0;)r.append(v.childNodes[0])}function duplicateScript(r){const v=getDocument().createElement("script");return forEach(r.attributes,function(b){v.setAttribute(b.name,b.value)}),v.textContent=r.textContent,v.async=!1,htmx.config.inlineScriptNonce&&(v.nonce=htmx.config.inlineScriptNonce),v}function isJavaScriptScriptNode(r){return r.matches("script")&&(r.type==="text/javascript"||r.type==="module"||r.type==="")}function normalizeScriptTags(r){Array.from(r.querySelectorAll("script")).forEach(v=>{if(isJavaScriptScriptNode(v)){const b=duplicateScript(v),_=v.parentNode;try{_.insertBefore(b,v)}catch(g){logError(g)}finally{v.remove()}}})}function makeFragment(r){const v=r.replace(/<head(\s[^>]*)?>[\s\S]*?<\/head>/i,""),b=getStartTag(v);let _;if(b==="html"){_=new DocumentFragment;const O=parseHTML(r);takeChildrenFor(_,O.body),_.title=O.title}else if(b==="body"){_=new DocumentFragment;const O=parseHTML(v);takeChildrenFor(_,O.body),_.title=O.title}else{const O=parseHTML('<body><template class="internal-htmx-wrapper">'+v+"</template></body>");_=O.querySelector("template").content,_.title=O.title;var g=_.querySelector("title");g&&g.parentNode===_&&(g.remove(),_.title=g.innerText)}return _&&(htmx.config.allowScriptTags?normalizeScriptTags(_):_.querySelectorAll("script").forEach(O=>O.remove())),_}function maybeCall(r){r&&r()}function isType(r,v){return Object.prototype.toString.call(r)==="[object "+v+"]"}function isFunction(r){return typeof r=="function"}function isRawObject(r){return isType(r,"Object")}function getInternalData(r){const v="htmx-internal-data";let b=r[v];return b||(b=r[v]={}),b}function toArray(r){const v=[];if(r)for(let b=0;b<r.length;b++)v.push(r[b]);return v}function forEach(r,v){if(r)for(let b=0;b<r.length;b++)v(r[b])}function isScrolledIntoView(r){const v=r.getBoundingClientRect(),b=v.top,_=v.bottom;return b<window.innerHeight&&_>=0}function bodyContains(r){return r.getRootNode({composed:!0})===document}function splitOnWhitespace(r){return r.trim().split(/\s+/)}function mergeObjects(r,v){for(const b in v)v.hasOwnProperty(b)&&(r[b]=v[b]);return r}function parseJSON(r){try{return JSON.parse(r)}catch(v){return logError(v),null}}function canAccessLocalStorage(){const r="htmx:localStorageTest";try{return localStorage.setItem(r,r),localStorage.removeItem(r),!0}catch{return!1}}function normalizePath(r){try{const v=new URL(r);return v&&(r=v.pathname+v.search),/^\/$/.test(r)||(r=r.replace(/\/+$/,"")),r}catch{return r}}function internalEval(str){return maybeEval(getDocument().body,function(){return eval(str)})}function onLoadHelper(r){return htmx.on("htmx:load",function(b){r(b.detail.elt)})}function logAll(){htmx.logger=function(r,v,b){console&&console.log(v,r,b)}}function logNone(){htmx.logger=null}function find(r,v){return typeof r!="string"?r.querySelector(v):find(getDocument(),r)}function findAll(r,v){return typeof r!="string"?r.querySelectorAll(v):findAll(getDocument(),r)}function getWindow(){return window}function removeElement(r,v){r=resolveTarget(r),v?getWindow().setTimeout(function(){removeElement(r),r=null},v):parentElt(r).removeChild(r)}function asElement(r){return r instanceof Element?r:null}function asHtmlElement(r){return r instanceof HTMLElement?r:null}function asString(r){return typeof r=="string"?r:null}function asParentNode(r){return r instanceof Element||r instanceof Document||r instanceof DocumentFragment?r:null}function addClassToElement(r,v,b){r=asElement(resolveTarget(r)),r&&(b?getWindow().setTimeout(function(){addClassToElement(r,v),r=null},b):r.classList&&r.classList.add(v))}function removeClassFromElement(r,v,b){let _=asElement(resolveTarget(r));_&&(b?getWindow().setTimeout(function(){removeClassFromElement(_,v),_=null},b):_.classList&&(_.classList.remove(v),_.classList.length===0&&_.removeAttribute("class")))}function toggleClassOnElement(r,v){r=resolveTarget(r),r.classList.toggle(v)}function takeClassForElement(r,v){r=resolveTarget(r),forEach(r.parentElement.children,function(b){removeClassFromElement(b,v)}),addClassToElement(asElement(r),v)}function closest(r,v){if(r=asElement(resolveTarget(r)),r&&r.closest)return r.closest(v);do if(r==null||matches(r,v))return r;while(r=r&&asElement(parentElt(r)));return null}function startsWith(r,v){return r.substring(0,v.length)===v}function endsWith(r,v){return r.substring(r.length-v.length)===v}function normalizeSelector(r){const v=r.trim();return startsWith(v,"<")&&endsWith(v,"/>")?v.substring(1,v.length-2):v}function querySelectorAllExt(r,v,b){if(v.indexOf("global ")===0)return querySelectorAllExt(r,v.slice(7),!0);r=resolveTarget(r);const _=[];{let R=0,J=0;for(let Z=0;Z<v.length;Z++){const C=v[Z];if(C===","&&R===0){_.push(v.substring(J,Z)),J=Z+1;continue}C==="<"?R++:C==="/"&&Z<v.length-1&&v[Z+1]===">"&&R--}J<v.length&&_.push(v.substring(J))}const g=[],O=[];for(;_.length>0;){const R=normalizeSelector(_.shift());let J;R.indexOf("closest ")===0?J=closest(asElement(r),normalizeSelector(R.substr(8))):R.indexOf("find ")===0?J=find(asParentNode(r),normalizeSelector(R.substr(5))):R==="next"||R==="nextElementSibling"?J=asElement(r).nextElementSibling:R.indexOf("next ")===0?J=scanForwardQuery(r,normalizeSelector(R.substr(5)),!!b):R==="previous"||R==="previousElementSibling"?J=asElement(r).previousElementSibling:R.indexOf("previous ")===0?J=scanBackwardsQuery(r,normalizeSelector(R.substr(9)),!!b):R==="document"?J=document:R==="window"?J=window:R==="body"?J=document.body:R==="root"?J=getRootNode(r,!!b):R==="host"?J=r.getRootNode().host:O.push(R),J&&g.push(J)}if(O.length>0){const R=O.join(","),J=asParentNode(getRootNode(r,!!b));g.push(...toArray(J.querySelectorAll(R)))}return g}var scanForwardQuery=function(r,v,b){const _=asParentNode(getRootNode(r,b)).querySelectorAll(v);for(let g=0;g<_.length;g++){const O=_[g];if(O.compareDocumentPosition(r)===Node.DOCUMENT_POSITION_PRECEDING)return O}},scanBackwardsQuery=function(r,v,b){const _=asParentNode(getRootNode(r,b)).querySelectorAll(v);for(let g=_.length-1;g>=0;g--){const O=_[g];if(O.compareDocumentPosition(r)===Node.DOCUMENT_POSITION_FOLLOWING)return O}};function querySelectorExt(r,v){return typeof r!="string"?querySelectorAllExt(r,v)[0]:querySelectorAllExt(getDocument().body,r)[0]}function resolveTarget(r,v){return typeof r=="string"?find(asParentNode(v)||document,r):r}function processEventArgs(r,v,b,_){return isFunction(v)?{target:getDocument().body,event:asString(r),listener:v,options:b}:{target:resolveTarget(r),event:asString(v),listener:b,options:_}}function addEventListenerImpl(r,v,b,_){return ready(function(){const O=processEventArgs(r,v,b,_);O.target.addEventListener(O.event,O.listener,O.options)}),isFunction(v)?v:b}function removeEventListenerImpl(r,v,b){return ready(function(){const _=processEventArgs(r,v,b);_.target.removeEventListener(_.event,_.listener)}),isFunction(v)?v:b}const DUMMY_ELT=getDocument().createElement("output");function findAttributeTargets(r,v){const b=getClosestAttributeValue(r,v);if(b){if(b==="this")return[findThisElement(r,v)];{const _=querySelectorAllExt(r,b);return _.length===0?(logError('The selector "'+b+'" on '+v+" returned no matches!"),[DUMMY_ELT]):_}}}function findThisElement(r,v){return asElement(getClosestMatch(r,function(b){return getAttributeValue(asElement(b),v)!=null}))}function getTarget(r){const v=getClosestAttributeValue(r,"hx-target");return v?v==="this"?findThisElement(r,"hx-target"):querySelectorExt(r,v):getInternalData(r).boosted?getDocument().body:r}function shouldSettleAttribute(r){const v=htmx.config.attributesToSettle;for(let b=0;b<v.length;b++)if(r===v[b])return!0;return!1}function cloneAttributes(r,v){forEach(r.attributes,function(b){!v.hasAttribute(b.name)&&shouldSettleAttribute(b.name)&&r.removeAttribute(b.name)}),forEach(v.attributes,function(b){shouldSettleAttribute(b.name)&&r.setAttribute(b.name,b.value)})}function isInlineSwap(r,v){const b=getExtensions(v);for(let _=0;_<b.length;_++){const g=b[_];try{if(g.isInlineSwap(r))return!0}catch(O){logError(O)}}return r==="outerHTML"}function oobSwap(r,v,b,_){_=_||getDocument();let g="#"+getRawAttribute(v,"id"),O="outerHTML";r==="true"||(r.indexOf(":")>0?(O=r.substring(0,r.indexOf(":")),g=r.substring(r.indexOf(":")+1)):O=r),v.removeAttribute("hx-swap-oob"),v.removeAttribute("data-hx-swap-oob");const R=querySelectorAllExt(_,g,!1);return R?(forEach(R,function(J){let Z;const C=v.cloneNode(!0);Z=getDocument().createDocumentFragment(),Z.appendChild(C),isInlineSwap(O,J)||(Z=asParentNode(C));const we={shouldSwap:!0,target:J,fragment:Z};triggerEvent(J,"htmx:oobBeforeSwap",we)&&(J=we.target,we.shouldSwap&&(handlePreservedElements(Z),swapWithStyle(O,J,J,Z,b),restorePreservedElements()),forEach(b.elts,function(Be){triggerEvent(Be,"htmx:oobAfterSwap",we)}))}),v.parentNode.removeChild(v)):(v.parentNode.removeChild(v),triggerErrorEvent(getDocument().body,"htmx:oobErrorNoTarget",{content:v})),r}function restorePreservedElements(){const r=find("#--htmx-preserve-pantry--");if(r){for(const v of[...r.children]){const b=find("#"+v.id);b.parentNode.moveBefore(v,b),b.remove()}r.remove()}}function handlePreservedElements(r){forEach(findAll(r,"[hx-preserve], [data-hx-preserve]"),function(v){const b=getAttributeValue(v,"id"),_=getDocument().getElementById(b);if(_!=null)if(v.moveBefore){let g=find("#--htmx-preserve-pantry--");g==null&&(getDocument().body.insertAdjacentHTML("afterend","<div id='--htmx-preserve-pantry--'></div>"),g=find("#--htmx-preserve-pantry--")),g.moveBefore(_,null)}else v.parentNode.replaceChild(_,v)})}function handleAttributes(r,v,b){forEach(v.querySelectorAll("[id]"),function(_){const g=getRawAttribute(_,"id");if(g&&g.length>0){const O=g.replace("'","\\'"),R=_.tagName.replace(":","\\:"),J=asParentNode(r),Z=J&&J.querySelector(R+"[id='"+O+"']");if(Z&&Z!==J){const C=_.cloneNode();cloneAttributes(_,Z),b.tasks.push(function(){cloneAttributes(_,C)})}}})}function makeAjaxLoadTask(r){return function(){removeClassFromElement(r,htmx.config.addedClass),processNode(asElement(r)),processFocus(asParentNode(r)),triggerEvent(r,"htmx:load")}}function processFocus(r){const v="[autofocus]",b=asHtmlElement(matches(r,v)?r:r.querySelector(v));b?.focus()}function insertNodesBefore(r,v,b,_){for(handleAttributes(r,b,_);b.childNodes.length>0;){const g=b.firstChild;addClassToElement(asElement(g),htmx.config.addedClass),r.insertBefore(g,v),g.nodeType!==Node.TEXT_NODE&&g.nodeType!==Node.COMMENT_NODE&&_.tasks.push(makeAjaxLoadTask(g))}}function stringHash(r,v){let b=0;for(;b<r.length;)v=(v<<5)-v+r.charCodeAt(b++)|0;return v}function attributeHash(r){let v=0;if(r.attributes)for(let b=0;b<r.attributes.length;b++){const _=r.attributes[b];_.value&&(v=stringHash(_.name,v),v=stringHash(_.value,v))}return v}function deInitOnHandlers(r){const v=getInternalData(r);if(v.onHandlers){for(let b=0;b<v.onHandlers.length;b++){const _=v.onHandlers[b];removeEventListenerImpl(r,_.event,_.listener)}delete v.onHandlers}}function deInitNode(r){const v=getInternalData(r);v.timeout&&clearTimeout(v.timeout),v.listenerInfos&&forEach(v.listenerInfos,function(b){b.on&&removeEventListenerImpl(b.on,b.trigger,b.listener)}),deInitOnHandlers(r),forEach(Object.keys(v),function(b){b!=="firstInitCompleted"&&delete v[b]})}function cleanUpElement(r){triggerEvent(r,"htmx:beforeCleanupElement"),deInitNode(r),r.children&&forEach(r.children,function(v){cleanUpElement(v)})}function swapOuterHTML(r,v,b){if(r instanceof Element&&r.tagName==="BODY")return swapInnerHTML(r,v,b);let _;const g=r.previousSibling,O=parentElt(r);if(O){for(insertNodesBefore(O,r,v,b),g==null?_=O.firstChild:_=g.nextSibling,b.elts=b.elts.filter(function(R){return R!==r});_&&_!==r;)_ instanceof Element&&b.elts.push(_),_=_.nextSibling;cleanUpElement(r),r instanceof Element?r.remove():r.parentNode.removeChild(r)}}function swapAfterBegin(r,v,b){return insertNodesBefore(r,r.firstChild,v,b)}function swapBeforeBegin(r,v,b){return insertNodesBefore(parentElt(r),r,v,b)}function swapBeforeEnd(r,v,b){return insertNodesBefore(r,null,v,b)}function swapAfterEnd(r,v,b){return insertNodesBefore(parentElt(r),r.nextSibling,v,b)}function swapDelete(r){cleanUpElement(r);const v=parentElt(r);if(v)return v.removeChild(r)}function swapInnerHTML(r,v,b){const _=r.firstChild;if(insertNodesBefore(r,_,v,b),_){for(;_.nextSibling;)cleanUpElement(_.nextSibling),r.removeChild(_.nextSibling);cleanUpElement(_),r.removeChild(_)}}function swapWithStyle(r,v,b,_,g){switch(r){case"none":return;case"outerHTML":swapOuterHTML(b,_,g);return;case"afterbegin":swapAfterBegin(b,_,g);return;case"beforebegin":swapBeforeBegin(b,_,g);return;case"beforeend":swapBeforeEnd(b,_,g);return;case"afterend":swapAfterEnd(b,_,g);return;case"delete":swapDelete(b);return;default:var O=getExtensions(v);for(let R=0;R<O.length;R++){const J=O[R];try{const Z=J.handleSwap(r,b,_,g);if(Z){if(Array.isArray(Z))for(let C=0;C<Z.length;C++){const we=Z[C];we.nodeType!==Node.TEXT_NODE&&we.nodeType!==Node.COMMENT_NODE&&g.tasks.push(makeAjaxLoadTask(we))}return}}catch(Z){logError(Z)}}r==="innerHTML"?swapInnerHTML(b,_,g):swapWithStyle(htmx.config.defaultSwapStyle,v,b,_,g)}}function findAndSwapOobElements(r,v,b){var _=findAll(r,"[hx-swap-oob], [data-hx-swap-oob]");return forEach(_,function(g){if(htmx.config.allowNestedOobSwaps||g.parentElement===null){const O=getAttributeValue(g,"hx-swap-oob");O!=null&&oobSwap(O,g,v,b)}else g.removeAttribute("hx-swap-oob"),g.removeAttribute("data-hx-swap-oob")}),_.length>0}function swap(r,v,b,_){_||(_={}),r=resolveTarget(r);const g=_.contextElement?getRootNode(_.contextElement,!1):getDocument(),O=document.activeElement;let R={};try{R={elt:O,start:O?O.selectionStart:null,end:O?O.selectionEnd:null}}catch{}const J=makeSettleInfo(r);if(b.swapStyle==="textContent")r.textContent=v;else{let C=makeFragment(v);if(J.title=C.title,_.selectOOB){const we=_.selectOOB.split(",");for(let Be=0;Be<we.length;Be++){const Ue=we[Be].split(":",2);let Q=Ue[0].trim();Q.indexOf("#")===0&&(Q=Q.substring(1));const Ke=Ue[1]||"true",At=C.querySelector("#"+Q);At&&oobSwap(Ke,At,J,g)}}if(findAndSwapOobElements(C,J,g),forEach(findAll(C,"template"),function(we){we.content&&findAndSwapOobElements(we.content,J,g)&&we.remove()}),_.select){const we=getDocument().createDocumentFragment();forEach(C.querySelectorAll(_.select),function(Be){we.appendChild(Be)}),C=we}handlePreservedElements(C),swapWithStyle(b.swapStyle,_.contextElement,r,C,J),restorePreservedElements()}if(R.elt&&!bodyContains(R.elt)&&getRawAttribute(R.elt,"id")){const C=document.getElementById(getRawAttribute(R.elt,"id")),we={preventScroll:b.focusScroll!==void 0?!b.focusScroll:!htmx.config.defaultFocusScroll};if(C){if(R.start&&C.setSelectionRange)try{C.setSelectionRange(R.start,R.end)}catch{}C.focus(we)}}r.classList.remove(htmx.config.swappingClass),forEach(J.elts,function(C){C.classList&&C.classList.add(htmx.config.settlingClass),triggerEvent(C,"htmx:afterSwap",_.eventInfo)}),_.afterSwapCallback&&_.afterSwapCallback(),b.ignoreTitle||handleTitle(J.title);const Z=function(){if(forEach(J.tasks,function(C){C.call()}),forEach(J.elts,function(C){C.classList&&C.classList.remove(htmx.config.settlingClass),triggerEvent(C,"htmx:afterSettle",_.eventInfo)}),_.anchor){const C=asElement(resolveTarget("#"+_.anchor));C&&C.scrollIntoView({block:"start",behavior:"auto"})}updateScrollState(J.elts,b),_.afterSettleCallback&&_.afterSettleCallback()};b.settleDelay>0?getWindow().setTimeout(Z,b.settleDelay):Z()}function handleTriggerHeader(r,v,b){const _=r.getResponseHeader(v);if(_.indexOf("{")===0){const g=parseJSON(_);for(const O in g)if(g.hasOwnProperty(O)){let R=g[O];isRawObject(R)?b=R.target!==void 0?R.target:b:R={value:R},triggerEvent(b,O,R)}}else{const g=_.split(",");for(let O=0;O<g.length;O++)triggerEvent(b,g[O].trim(),[])}}const WHITESPACE=/\s/,WHITESPACE_OR_COMMA=/[\s,]/,SYMBOL_START=/[_$a-zA-Z]/,SYMBOL_CONT=/[_$a-zA-Z0-9]/,STRINGISH_START=['"',"'","/"],NOT_WHITESPACE=/[^\s]/,COMBINED_SELECTOR_START=/[{(]/,COMBINED_SELECTOR_END=/[})]/;function tokenizeString(r){const v=[];let b=0;for(;b<r.length;){if(SYMBOL_START.exec(r.charAt(b))){for(var _=b;SYMBOL_CONT.exec(r.charAt(b+1));)b++;v.push(r.substring(_,b+1))}else if(STRINGISH_START.indexOf(r.charAt(b))!==-1){const g=r.charAt(b);var _=b;for(b++;b<r.length&&r.charAt(b)!==g;)r.charAt(b)==="\\"&&b++,b++;v.push(r.substring(_,b+1))}else{const g=r.charAt(b);v.push(g)}b++}return v}function isPossibleRelativeReference(r,v,b){return SYMBOL_START.exec(r.charAt(0))&&r!=="true"&&r!=="false"&&r!=="this"&&r!==b&&v!=="."}function maybeGenerateConditional(r,v,b){if(v[0]==="["){v.shift();let _=1,g=" return (function("+b+"){ return (",O=null;for(;v.length>0;){const R=v[0];if(R==="]"){if(_--,_===0){O===null&&(g=g+"true"),v.shift(),g+=")})";try{const J=maybeEval(r,function(){return Function(g)()},function(){return!0});return J.source=g,J}catch(J){return triggerErrorEvent(getDocument().body,"htmx:syntax:error",{error:J,source:g}),null}}}else R==="["&&_++;isPossibleRelativeReference(R,O,b)?g+="(("+b+"."+R+") ? ("+b+"."+R+") : (window."+R+"))":g=g+R,O=v.shift()}}}function consumeUntil(r,v){let b="";for(;r.length>0&&!v.test(r[0]);)b+=r.shift();return b}function consumeCSSSelector(r){let v;return r.length>0&&COMBINED_SELECTOR_START.test(r[0])?(r.shift(),v=consumeUntil(r,COMBINED_SELECTOR_END).trim(),r.shift()):v=consumeUntil(r,WHITESPACE_OR_COMMA),v}const INPUT_SELECTOR="input, textarea, select";function parseAndCacheTrigger(r,v,b){const _=[],g=tokenizeString(v);do{consumeUntil(g,NOT_WHITESPACE);const J=g.length,Z=consumeUntil(g,/[,\[\s]/);if(Z!=="")if(Z==="every"){const C={trigger:"every"};consumeUntil(g,NOT_WHITESPACE),C.pollInterval=parseInterval(consumeUntil(g,/[,\[\s]/)),consumeUntil(g,NOT_WHITESPACE);var O=maybeGenerateConditional(r,g,"event");O&&(C.eventFilter=O),_.push(C)}else{const C={trigger:Z};var O=maybeGenerateConditional(r,g,"event");for(O&&(C.eventFilter=O),consumeUntil(g,NOT_WHITESPACE);g.length>0&&g[0]!==",";){const Be=g.shift();if(Be==="changed")C.changed=!0;else if(Be==="once")C.once=!0;else if(Be==="consume")C.consume=!0;else if(Be==="delay"&&g[0]===":")g.shift(),C.delay=parseInterval(consumeUntil(g,WHITESPACE_OR_COMMA));else if(Be==="from"&&g[0]===":"){if(g.shift(),COMBINED_SELECTOR_START.test(g[0]))var R=consumeCSSSelector(g);else{var R=consumeUntil(g,WHITESPACE_OR_COMMA);if(R==="closest"||R==="find"||R==="next"||R==="previous"){g.shift();const Q=consumeCSSSelector(g);Q.length>0&&(R+=" "+Q)}}C.from=R}else Be==="target"&&g[0]===":"?(g.shift(),C.target=consumeCSSSelector(g)):Be==="throttle"&&g[0]===":"?(g.shift(),C.throttle=parseInterval(consumeUntil(g,WHITESPACE_OR_COMMA))):Be==="queue"&&g[0]===":"?(g.shift(),C.queue=consumeUntil(g,WHITESPACE_OR_COMMA)):Be==="root"&&g[0]===":"?(g.shift(),C[Be]=consumeCSSSelector(g)):Be==="threshold"&&g[0]===":"?(g.shift(),C[Be]=consumeUntil(g,WHITESPACE_OR_COMMA)):triggerErrorEvent(r,"htmx:syntax:error",{token:g.shift()});consumeUntil(g,NOT_WHITESPACE)}_.push(C)}g.length===J&&triggerErrorEvent(r,"htmx:syntax:error",{token:g.shift()}),consumeUntil(g,NOT_WHITESPACE)}while(g[0]===","&&g.shift());return b&&(b[v]=_),_}function getTriggerSpecs(r){const v=getAttributeValue(r,"hx-trigger");let b=[];if(v){const _=htmx.config.triggerSpecsCache;b=_&&_[v]||parseAndCacheTrigger(r,v,_)}return b.length>0?b:matches(r,"form")?[{trigger:"submit"}]:matches(r,'input[type="button"], input[type="submit"]')?[{trigger:"click"}]:matches(r,INPUT_SELECTOR)?[{trigger:"change"}]:[{trigger:"click"}]}function cancelPolling(r){getInternalData(r).cancelled=!0}function processPolling(r,v,b){const _=getInternalData(r);_.timeout=getWindow().setTimeout(function(){bodyContains(r)&&_.cancelled!==!0&&(maybeFilterEvent(b,r,makeEvent("hx:poll:trigger",{triggerSpec:b,target:r}))||v(r),processPolling(r,v,b))},b.pollInterval)}function isLocalLink(r){return location.hostname===r.hostname&&getRawAttribute(r,"href")&&getRawAttribute(r,"href").indexOf("#")!==0}function eltIsDisabled(r){return closest(r,htmx.config.disableSelector)}function boostElement(r,v,b){if(r instanceof HTMLAnchorElement&&isLocalLink(r)&&(r.target===""||r.target==="_self")||r.tagName==="FORM"&&String(getRawAttribute(r,"method")).toLowerCase()!=="dialog"){v.boosted=!0;let _,g;if(r.tagName==="A")_="get",g=getRawAttribute(r,"href");else{const O=getRawAttribute(r,"method");_=O?O.toLowerCase():"get",g=getRawAttribute(r,"action"),(g==null||g==="")&&(g=getDocument().location.href),_==="get"&&g.includes("?")&&(g=g.replace(/\?[^#]+/,""))}b.forEach(function(O){addEventListener(r,function(R,J){const Z=asElement(R);if(eltIsDisabled(Z)){cleanUpElement(Z);return}issueAjaxRequest(_,g,Z,J)},v,O,!0)})}}function shouldCancel(r,v){const b=asElement(v);return b?!!((r.type==="submit"||r.type==="click")&&(b.tagName==="FORM"||matches(b,'input[type="submit"], button')&&(matches(b,"[form]")||closest(b,"form")!==null)||b instanceof HTMLAnchorElement&&b.href&&(b.getAttribute("href")==="#"||b.getAttribute("href").indexOf("#")!==0))):!1}function ignoreBoostedAnchorCtrlClick(r,v){return getInternalData(r).boosted&&r instanceof HTMLAnchorElement&&v.type==="click"&&(v.ctrlKey||v.metaKey)}function maybeFilterEvent(r,v,b){const _=r.eventFilter;if(_)try{return _.call(v,b)!==!0}catch(g){const O=_.source;return triggerErrorEvent(getDocument().body,"htmx:eventFilter:error",{error:g,source:O}),!0}return!1}function addEventListener(r,v,b,_,g){const O=getInternalData(r);let R;_.from?R=querySelectorAllExt(r,_.from):R=[r],_.changed&&("lastValue"in O||(O.lastValue=new WeakMap),R.forEach(function(J){O.lastValue.has(_)||O.lastValue.set(_,new WeakMap),O.lastValue.get(_).set(J,J.value)})),forEach(R,function(J){const Z=function(C){if(!bodyContains(r)){J.removeEventListener(_.trigger,Z);return}if(ignoreBoostedAnchorCtrlClick(r,C)||((g||shouldCancel(C,r))&&C.preventDefault(),maybeFilterEvent(_,r,C)))return;const we=getInternalData(C);if(we.triggerSpec=_,we.handledFor==null&&(we.handledFor=[]),we.handledFor.indexOf(r)<0){if(we.handledFor.push(r),_.consume&&C.stopPropagation(),_.target&&C.target&&!matches(asElement(C.target),_.target))return;if(_.once){if(O.triggeredOnce)return;O.triggeredOnce=!0}if(_.changed){const Be=event.target,Ue=Be.value,Q=O.lastValue.get(_);if(Q.has(Be)&&Q.get(Be)===Ue)return;Q.set(Be,Ue)}if(O.delayed&&clearTimeout(O.delayed),O.throttle)return;_.throttle>0?O.throttle||(triggerEvent(r,"htmx:trigger"),v(r,C),O.throttle=getWindow().setTimeout(function(){O.throttle=null},_.throttle)):_.delay>0?O.delayed=getWindow().setTimeout(function(){triggerEvent(r,"htmx:trigger"),v(r,C)},_.delay):(triggerEvent(r,"htmx:trigger"),v(r,C))}};b.listenerInfos==null&&(b.listenerInfos=[]),b.listenerInfos.push({trigger:_.trigger,listener:Z,on:J}),J.addEventListener(_.trigger,Z)})}let windowIsScrolling=!1,scrollHandler=null;function initScrollHandler(){scrollHandler||(scrollHandler=function(){windowIsScrolling=!0},window.addEventListener("scroll",scrollHandler),window.addEventListener("resize",scrollHandler),setInterval(function(){windowIsScrolling&&(windowIsScrolling=!1,forEach(getDocument().querySelectorAll("[hx-trigger*='revealed'],[data-hx-trigger*='revealed']"),function(r){maybeReveal(r)}))},200))}function maybeReveal(r){!hasAttribute(r,"data-hx-revealed")&&isScrolledIntoView(r)&&(r.setAttribute("data-hx-revealed","true"),getInternalData(r).initHash?triggerEvent(r,"revealed"):r.addEventListener("htmx:afterProcessNode",function(){triggerEvent(r,"revealed")},{once:!0}))}function loadImmediately(r,v,b,_){const g=function(){b.loaded||(b.loaded=!0,triggerEvent(r,"htmx:trigger"),v(r))};_>0?getWindow().setTimeout(g,_):g()}function processVerbs(r,v,b){let _=!1;return forEach(VERBS,function(g){if(hasAttribute(r,"hx-"+g)){const O=getAttributeValue(r,"hx-"+g);_=!0,v.path=O,v.verb=g,b.forEach(function(R){addTriggerHandler(r,R,v,function(J,Z){const C=asElement(J);if(closest(C,htmx.config.disableSelector)){cleanUpElement(C);return}issueAjaxRequest(g,O,C,Z)})})}}),_}function addTriggerHandler(r,v,b,_){if(v.trigger==="revealed")initScrollHandler(),addEventListener(r,_,b,v),maybeReveal(asElement(r));else if(v.trigger==="intersect"){const g={};v.root&&(g.root=querySelectorExt(r,v.root)),v.threshold&&(g.threshold=parseFloat(v.threshold)),new IntersectionObserver(function(R){for(let J=0;J<R.length;J++)if(R[J].isIntersecting){triggerEvent(r,"intersect");break}},g).observe(asElement(r)),addEventListener(asElement(r),_,b,v)}else!b.firstInitCompleted&&v.trigger==="load"?maybeFilterEvent(v,r,makeEvent("load",{elt:r}))||loadImmediately(asElement(r),_,b,v.delay):v.pollInterval>0?(b.polling=!0,processPolling(asElement(r),_,v)):addEventListener(r,_,b,v)}function shouldProcessHxOn(r){const v=asElement(r);if(!v)return!1;const b=v.attributes;for(let _=0;_<b.length;_++){const g=b[_].name;if(startsWith(g,"hx-on:")||startsWith(g,"data-hx-on:")||startsWith(g,"hx-on-")||startsWith(g,"data-hx-on-"))return!0}return!1}const HX_ON_QUERY=new XPathEvaluator().createExpression('.//*[@*[ starts-with(name(), "hx-on:") or starts-with(name(), "data-hx-on:") or starts-with(name(), "hx-on-") or starts-with(name(), "data-hx-on-") ]]');function processHXOnRoot(r,v){shouldProcessHxOn(r)&&v.push(asElement(r));const b=HX_ON_QUERY.evaluate(r);let _=null;for(;_=b.iterateNext();)v.push(asElement(_))}function findHxOnWildcardElements(r){const v=[];if(r instanceof DocumentFragment)for(const b of r.childNodes)processHXOnRoot(b,v);else processHXOnRoot(r,v);return v}function findElementsToProcess(r){if(r.querySelectorAll){const b=", [hx-boost] a, [data-hx-boost] a, a[hx-boost], a[data-hx-boost]",_=[];for(const O in extensions){const R=extensions[O];if(R.getSelectors){var v=R.getSelectors();v&&_.push(v)}}return r.querySelectorAll(VERB_SELECTOR+b+", form, [type='submit'], [hx-ext], [data-hx-ext], [hx-trigger], [data-hx-trigger]"+_.flat().map(O=>", "+O).join(""))}else return[]}function maybeSetLastButtonClicked(r){const v=closest(asElement(r.target),"button, input[type='submit']"),b=getRelatedFormData(r);b&&(b.lastButtonClicked=v)}function maybeUnsetLastButtonClicked(r){const v=getRelatedFormData(r);v&&(v.lastButtonClicked=null)}function getRelatedFormData(r){const v=closest(asElement(r.target),"button, input[type='submit']");if(!v)return;const b=resolveTarget("#"+getRawAttribute(v,"form"),v.getRootNode())||closest(v,"form");if(b)return getInternalData(b)}function initButtonTracking(r){r.addEventListener("click",maybeSetLastButtonClicked),r.addEventListener("focusin",maybeSetLastButtonClicked),r.addEventListener("focusout",maybeUnsetLastButtonClicked)}function addHxOnEventHandler(r,v,b){const _=getInternalData(r);Array.isArray(_.onHandlers)||(_.onHandlers=[]);let g;const O=function(R){maybeEval(r,function(){eltIsDisabled(r)||(g||(g=new Function("event",b)),g.call(r,R))})};r.addEventListener(v,O),_.onHandlers.push({event:v,listener:O})}function processHxOnWildcard(r){deInitOnHandlers(r);for(let v=0;v<r.attributes.length;v++){const b=r.attributes[v].name,_=r.attributes[v].value;if(startsWith(b,"hx-on")||startsWith(b,"data-hx-on")){const g=b.indexOf("-on")+3,O=b.slice(g,g+1);if(O==="-"||O===":"){let R=b.slice(g+1);startsWith(R,":")?R="htmx"+R:startsWith(R,"-")?R="htmx:"+R.slice(1):startsWith(R,"htmx-")&&(R="htmx:"+R.slice(5)),addHxOnEventHandler(r,R,_)}}}}function initNode(r){if(closest(r,htmx.config.disableSelector)){cleanUpElement(r);return}const v=getInternalData(r),b=attributeHash(r);if(v.initHash!==b){deInitNode(r),v.initHash=b,triggerEvent(r,"htmx:beforeProcessNode");const _=getTriggerSpecs(r);processVerbs(r,v,_)||(getClosestAttributeValue(r,"hx-boost")==="true"?boostElement(r,v,_):hasAttribute(r,"hx-trigger")&&_.forEach(function(O){addTriggerHandler(r,O,v,function(){})})),(r.tagName==="FORM"||getRawAttribute(r,"type")==="submit"&&hasAttribute(r,"form"))&&initButtonTracking(r),v.firstInitCompleted=!0,triggerEvent(r,"htmx:afterProcessNode")}}function processNode(r){if(r=resolveTarget(r),closest(r,htmx.config.disableSelector)){cleanUpElement(r);return}initNode(r),forEach(findElementsToProcess(r),function(v){initNode(v)}),forEach(findHxOnWildcardElements(r),processHxOnWildcard)}function kebabEventName(r){return r.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}function makeEvent(r,v){let b;return window.CustomEvent&&typeof window.CustomEvent=="function"?b=new CustomEvent(r,{bubbles:!0,cancelable:!0,composed:!0,detail:v}):(b=getDocument().createEvent("CustomEvent"),b.initCustomEvent(r,!0,!0,v)),b}function triggerErrorEvent(r,v,b){triggerEvent(r,v,mergeObjects({error:v},b))}function ignoreEventForLogging(r){return r==="htmx:afterProcessNode"}function withExtensions(r,v){forEach(getExtensions(r),function(b){try{v(b)}catch(_){logError(_)}})}function logError(r){console.error?console.error(r):console.log&&console.log("ERROR: ",r)}function triggerEvent(r,v,b){r=resolveTarget(r),b==null&&(b={}),b.elt=r;const _=makeEvent(v,b);htmx.logger&&!ignoreEventForLogging(v)&&htmx.logger(r,v,b),b.error&&(logError(b.error),triggerEvent(r,"htmx:error",{errorInfo:b}));let g=r.dispatchEvent(_);const O=kebabEventName(v);if(g&&O!==v){const R=makeEvent(O,_.detail);g=g&&r.dispatchEvent(R)}return withExtensions(asElement(r),function(R){g=g&&R.onEvent(v,_)!==!1&&!_.defaultPrevented}),g}let currentPathForHistory=location.pathname+location.search;function getHistoryElement(){return getDocument().querySelector("[hx-history-elt],[data-hx-history-elt]")||getDocument().body}function saveToHistoryCache(r,v){if(!canAccessLocalStorage())return;const b=cleanInnerHtmlForHistory(v),_=getDocument().title,g=window.scrollY;if(htmx.config.historyCacheSize<=0){localStorage.removeItem("htmx-history-cache");return}r=normalizePath(r);const O=parseJSON(localStorage.getItem("htmx-history-cache"))||[];for(let J=0;J<O.length;J++)if(O[J].url===r){O.splice(J,1);break}const R={url:r,content:b,title:_,scroll:g};for(triggerEvent(getDocument().body,"htmx:historyItemCreated",{item:R,cache:O}),O.push(R);O.length>htmx.config.historyCacheSize;)O.shift();for(;O.length>0;)try{localStorage.setItem("htmx-history-cache",JSON.stringify(O));break}catch(J){triggerErrorEvent(getDocument().body,"htmx:historyCacheError",{cause:J,cache:O}),O.shift()}}function getCachedHistory(r){if(!canAccessLocalStorage())return null;r=normalizePath(r);const v=parseJSON(localStorage.getItem("htmx-history-cache"))||[];for(let b=0;b<v.length;b++)if(v[b].url===r)return v[b];return null}function cleanInnerHtmlForHistory(r){const v=htmx.config.requestClass,b=r.cloneNode(!0);return forEach(findAll(b,"."+v),function(_){removeClassFromElement(_,v)}),forEach(findAll(b,"[data-disabled-by-htmx]"),function(_){_.removeAttribute("disabled")}),b.innerHTML}function saveCurrentPageToHistory(){const r=getHistoryElement(),v=currentPathForHistory||location.pathname+location.search;let b;try{b=getDocument().querySelector('[hx-history="false" i],[data-hx-history="false" i]')}catch{b=getDocument().querySelector('[hx-history="false"],[data-hx-history="false"]')}b||(triggerEvent(getDocument().body,"htmx:beforeHistorySave",{path:v,historyElt:r}),saveToHistoryCache(v,r)),htmx.config.historyEnabled&&history.replaceState({htmx:!0},getDocument().title,window.location.href)}function pushUrlIntoHistory(r){htmx.config.getCacheBusterParam&&(r=r.replace(/org\.htmx\.cache-buster=[^&]*&?/,""),(endsWith(r,"&")||endsWith(r,"?"))&&(r=r.slice(0,-1))),htmx.config.historyEnabled&&history.pushState({htmx:!0},"",r),currentPathForHistory=r}function replaceUrlInHistory(r){htmx.config.historyEnabled&&history.replaceState({htmx:!0},"",r),currentPathForHistory=r}function settleImmediately(r){forEach(r,function(v){v.call(void 0)})}function loadHistoryFromServer(r){const v=new XMLHttpRequest,b={path:r,xhr:v};triggerEvent(getDocument().body,"htmx:historyCacheMiss",b),v.open("GET",r,!0),v.setRequestHeader("HX-Request","true"),v.setRequestHeader("HX-History-Restore-Request","true"),v.setRequestHeader("HX-Current-URL",getDocument().location.href),v.onload=function(){if(this.status>=200&&this.status<400){triggerEvent(getDocument().body,"htmx:historyCacheMissLoad",b);const _=makeFragment(this.response),g=_.querySelector("[hx-history-elt],[data-hx-history-elt]")||_,O=getHistoryElement(),R=makeSettleInfo(O);handleTitle(_.title),handlePreservedElements(_),swapInnerHTML(O,g,R),restorePreservedElements(),settleImmediately(R.tasks),currentPathForHistory=r,triggerEvent(getDocument().body,"htmx:historyRestore",{path:r,cacheMiss:!0,serverResponse:this.response})}else triggerErrorEvent(getDocument().body,"htmx:historyCacheMissLoadError",b)},v.send()}function restoreHistory(r){saveCurrentPageToHistory(),r=r||location.pathname+location.search;const v=getCachedHistory(r);if(v){const b=makeFragment(v.content),_=getHistoryElement(),g=makeSettleInfo(_);handleTitle(v.title),handlePreservedElements(b),swapInnerHTML(_,b,g),restorePreservedElements(),settleImmediately(g.tasks),getWindow().setTimeout(function(){window.scrollTo(0,v.scroll)},0),currentPathForHistory=r,triggerEvent(getDocument().body,"htmx:historyRestore",{path:r,item:v})}else htmx.config.refreshOnHistoryMiss?window.location.reload(!0):loadHistoryFromServer(r)}function addRequestIndicatorClasses(r){let v=findAttributeTargets(r,"hx-indicator");return v==null&&(v=[r]),forEach(v,function(b){const _=getInternalData(b);_.requestCount=(_.requestCount||0)+1,b.classList.add.call(b.classList,htmx.config.requestClass)}),v}function disableElements(r){let v=findAttributeTargets(r,"hx-disabled-elt");return v==null&&(v=[]),forEach(v,function(b){const _=getInternalData(b);_.requestCount=(_.requestCount||0)+1,b.setAttribute("disabled",""),b.setAttribute("data-disabled-by-htmx","")}),v}function removeRequestIndicators(r,v){forEach(r.concat(v),function(b){const _=getInternalData(b);_.requestCount=(_.requestCount||1)-1}),forEach(r,function(b){getInternalData(b).requestCount===0&&b.classList.remove.call(b.classList,htmx.config.requestClass)}),forEach(v,function(b){getInternalData(b).requestCount===0&&(b.removeAttribute("disabled"),b.removeAttribute("data-disabled-by-htmx"))})}function haveSeenNode(r,v){for(let b=0;b<r.length;b++)if(r[b].isSameNode(v))return!0;return!1}function shouldInclude(r){const v=r;return v.name===""||v.name==null||v.disabled||closest(v,"fieldset[disabled]")||v.type==="button"||v.type==="submit"||v.tagName==="image"||v.tagName==="reset"||v.tagName==="file"?!1:v.type==="checkbox"||v.type==="radio"?v.checked:!0}function addValueToFormData(r,v,b){r!=null&&v!=null&&(Array.isArray(v)?v.forEach(function(_){b.append(r,_)}):b.append(r,v))}function removeValueFromFormData(r,v,b){if(r!=null&&v!=null){let _=b.getAll(r);Array.isArray(v)?_=_.filter(g=>v.indexOf(g)<0):_=_.filter(g=>g!==v),b.delete(r),forEach(_,g=>b.append(r,g))}}function processInputValue(r,v,b,_,g){if(!(_==null||haveSeenNode(r,_))){if(r.push(_),shouldInclude(_)){const O=getRawAttribute(_,"name");let R=_.value;_ instanceof HTMLSelectElement&&_.multiple&&(R=toArray(_.querySelectorAll("option:checked")).map(function(J){return J.value})),_ instanceof HTMLInputElement&&_.files&&(R=toArray(_.files)),addValueToFormData(O,R,v),g&&validateElement(_,b)}_ instanceof HTMLFormElement&&(forEach(_.elements,function(O){r.indexOf(O)>=0?removeValueFromFormData(O.name,O.value,v):r.push(O),g&&validateElement(O,b)}),new FormData(_).forEach(function(O,R){O instanceof File&&O.name===""||addValueToFormData(R,O,v)}))}}function validateElement(r,v){const b=r;b.willValidate&&(triggerEvent(b,"htmx:validation:validate"),b.checkValidity()||(v.push({elt:b,message:b.validationMessage,validity:b.validity}),triggerEvent(b,"htmx:validation:failed",{message:b.validationMessage,validity:b.validity})))}function overrideFormData(r,v){for(const b of v.keys())r.delete(b);return v.forEach(function(b,_){r.append(_,b)}),r}function getInputValues(r,v){const b=[],_=new FormData,g=new FormData,O=[],R=getInternalData(r);R.lastButtonClicked&&!bodyContains(R.lastButtonClicked)&&(R.lastButtonClicked=null);let J=r instanceof HTMLFormElement&&r.noValidate!==!0||getAttributeValue(r,"hx-validate")==="true";if(R.lastButtonClicked&&(J=J&&R.lastButtonClicked.formNoValidate!==!0),v!=="get"&&processInputValue(b,g,O,closest(r,"form"),J),processInputValue(b,_,O,r,J),R.lastButtonClicked||r.tagName==="BUTTON"||r.tagName==="INPUT"&&getRawAttribute(r,"type")==="submit"){const C=R.lastButtonClicked||r,we=getRawAttribute(C,"name");addValueToFormData(we,C.value,g)}const Z=findAttributeTargets(r,"hx-include");return forEach(Z,function(C){processInputValue(b,_,O,asElement(C),J),matches(C,"form")||forEach(asParentNode(C).querySelectorAll(INPUT_SELECTOR),function(we){processInputValue(b,_,O,we,J)})}),overrideFormData(_,g),{errors:O,formData:_,values:formDataProxy(_)}}function appendParam(r,v,b){r!==""&&(r+="&"),String(b)==="[object Object]"&&(b=JSON.stringify(b));const _=encodeURIComponent(b);return r+=encodeURIComponent(v)+"="+_,r}function urlEncode(r){r=formDataFromObject(r);let v="";return r.forEach(function(b,_){v=appendParam(v,_,b)}),v}function getHeaders(r,v,b){const _={"HX-Request":"true","HX-Trigger":getRawAttribute(r,"id"),"HX-Trigger-Name":getRawAttribute(r,"name"),"HX-Target":getAttributeValue(v,"id"),"HX-Current-URL":getDocument().location.href};return getValuesForElement(r,"hx-headers",!1,_),b!==void 0&&(_["HX-Prompt"]=b),getInternalData(r).boosted&&(_["HX-Boosted"]="true"),_}function filterValues(r,v){const b=getClosestAttributeValue(v,"hx-params");if(b){if(b==="none")return new FormData;if(b==="*")return r;if(b.indexOf("not ")===0)return forEach(b.slice(4).split(","),function(_){_=_.trim(),r.delete(_)}),r;{const _=new FormData;return forEach(b.split(","),function(g){g=g.trim(),r.has(g)&&r.getAll(g).forEach(function(O){_.append(g,O)})}),_}}else return r}function isAnchorLink(r){return!!getRawAttribute(r,"href")&&getRawAttribute(r,"href").indexOf("#")>=0}function getSwapSpecification(r,v){const b=v||getClosestAttributeValue(r,"hx-swap"),_={swapStyle:getInternalData(r).boosted?"innerHTML":htmx.config.defaultSwapStyle,swapDelay:htmx.config.defaultSwapDelay,settleDelay:htmx.config.defaultSettleDelay};if(htmx.config.scrollIntoViewOnBoost&&getInternalData(r).boosted&&!isAnchorLink(r)&&(_.show="top"),b){const R=splitOnWhitespace(b);if(R.length>0)for(let J=0;J<R.length;J++){const Z=R[J];if(Z.indexOf("swap:")===0)_.swapDelay=parseInterval(Z.slice(5));else if(Z.indexOf("settle:")===0)_.settleDelay=parseInterval(Z.slice(7));else if(Z.indexOf("transition:")===0)_.transition=Z.slice(11)==="true";else if(Z.indexOf("ignoreTitle:")===0)_.ignoreTitle=Z.slice(12)==="true";else if(Z.indexOf("scroll:")===0){var g=Z.slice(7).split(":");const we=g.pop();var O=g.length>0?g.join(":"):null;_.scroll=we,_.scrollTarget=O}else if(Z.indexOf("show:")===0){var g=Z.slice(5).split(":");const Be=g.pop();var O=g.length>0?g.join(":"):null;_.show=Be,_.showTarget=O}else if(Z.indexOf("focus-scroll:")===0){const C=Z.slice(13);_.focusScroll=C=="true"}else J==0?_.swapStyle=Z:logError("Unknown modifier in hx-swap: "+Z)}}return _}function usesFormData(r){return getClosestAttributeValue(r,"hx-encoding")==="multipart/form-data"||matches(r,"form")&&getRawAttribute(r,"enctype")==="multipart/form-data"}function encodeParamsForBody(r,v,b){let _=null;return withExtensions(v,function(g){_==null&&(_=g.encodeParameters(r,b,v))}),_??(usesFormData(v)?overrideFormData(new FormData,formDataFromObject(b)):urlEncode(b))}function makeSettleInfo(r){return{tasks:[],elts:[r]}}function updateScrollState(r,v){const b=r[0],_=r[r.length-1];if(v.scroll){var g=null;v.scrollTarget&&(g=asElement(querySelectorExt(b,v.scrollTarget))),v.scroll==="top"&&(b||g)&&(g=g||b,g.scrollTop=0),v.scroll==="bottom"&&(_||g)&&(g=g||_,g.scrollTop=g.scrollHeight)}if(v.show){var g=null;if(v.showTarget){let R=v.showTarget;v.showTarget==="window"&&(R="body"),g=asElement(querySelectorExt(b,R))}v.show==="top"&&(b||g)&&(g=g||b,g.scrollIntoView({block:"start",behavior:htmx.config.scrollBehavior})),v.show==="bottom"&&(_||g)&&(g=g||_,g.scrollIntoView({block:"end",behavior:htmx.config.scrollBehavior}))}}function getValuesForElement(r,v,b,_){if(_==null&&(_={}),r==null)return _;const g=getAttributeValue(r,v);if(g){let O=g.trim(),R=b;if(O==="unset")return null;O.indexOf("javascript:")===0?(O=O.slice(11),R=!0):O.indexOf("js:")===0&&(O=O.slice(3),R=!0),O.indexOf("{")!==0&&(O="{"+O+"}");let J;R?J=maybeEval(r,function(){return Function("return ("+O+")")()},{}):J=parseJSON(O);for(const Z in J)J.hasOwnProperty(Z)&&_[Z]==null&&(_[Z]=J[Z])}return getValuesForElement(asElement(parentElt(r)),v,b,_)}function maybeEval(r,v,b){return htmx.config.allowEval?v():(triggerErrorEvent(r,"htmx:evalDisallowedError"),b)}function getHXVarsForElement(r,v){return getValuesForElement(r,"hx-vars",!0,v)}function getHXValsForElement(r,v){return getValuesForElement(r,"hx-vals",!1,v)}function getExpressionVars(r){return mergeObjects(getHXVarsForElement(r),getHXValsForElement(r))}function safelySetHeaderValue(r,v,b){if(b!==null)try{r.setRequestHeader(v,b)}catch{r.setRequestHeader(v,encodeURIComponent(b)),r.setRequestHeader(v+"-URI-AutoEncoded","true")}}function getPathFromResponse(r){if(r.responseURL&&typeof URL<"u")try{const v=new URL(r.responseURL);return v.pathname+v.search}catch{triggerErrorEvent(getDocument().body,"htmx:badResponseUrl",{url:r.responseURL})}}function hasHeader(r,v){return v.test(r.getAllResponseHeaders())}function ajaxHelper(r,v,b){if(r=r.toLowerCase(),b){if(b instanceof Element||typeof b=="string")return issueAjaxRequest(r,v,null,null,{targetOverride:resolveTarget(b)||DUMMY_ELT,returnPromise:!0});{let _=resolveTarget(b.target);return(b.target&&!_||b.source&&!_&&!resolveTarget(b.source))&&(_=DUMMY_ELT),issueAjaxRequest(r,v,resolveTarget(b.source),b.event,{handler:b.handler,headers:b.headers,values:b.values,targetOverride:_,swapOverride:b.swap,select:b.select,returnPromise:!0})}}else return issueAjaxRequest(r,v,null,null,{returnPromise:!0})}function hierarchyForElt(r){const v=[];for(;r;)v.push(r),r=r.parentElement;return v}function verifyPath(r,v,b){let _,g;return typeof URL=="function"?(g=new URL(v,document.location.href),_=document.location.origin===g.origin):(g=v,_=startsWith(v,document.location.origin)),htmx.config.selfRequestsOnly&&!_?!1:triggerEvent(r,"htmx:validateUrl",mergeObjects({url:g,sameHost:_},b))}function formDataFromObject(r){if(r instanceof FormData)return r;const v=new FormData;for(const b in r)r.hasOwnProperty(b)&&(r[b]&&typeof r[b].forEach=="function"?r[b].forEach(function(_){v.append(b,_)}):typeof r[b]=="object"&&!(r[b]instanceof Blob)?v.append(b,JSON.stringify(r[b])):v.append(b,r[b]));return v}function formDataArrayProxy(r,v,b){return new Proxy(b,{get:function(_,g){return typeof g=="number"?_[g]:g==="length"?_.length:g==="push"?function(O){_.push(O),r.append(v,O)}:typeof _[g]=="function"?function(){_[g].apply(_,arguments),r.delete(v),_.forEach(function(O){r.append(v,O)})}:_[g]&&_[g].length===1?_[g][0]:_[g]},set:function(_,g,O){return _[g]=O,r.delete(v),_.forEach(function(R){r.append(v,R)}),!0}})}function formDataProxy(r){return new Proxy(r,{get:function(v,b){if(typeof b=="symbol"){const g=Reflect.get(v,b);return typeof g=="function"?function(){return g.apply(r,arguments)}:g}if(b==="toJSON")return()=>Object.fromEntries(r);if(b in v)return typeof v[b]=="function"?function(){return r[b].apply(r,arguments)}:v[b];const _=r.getAll(b);if(_.length!==0)return _.length===1?_[0]:formDataArrayProxy(v,b,_)},set:function(v,b,_){return typeof b!="string"?!1:(v.delete(b),_&&typeof _.forEach=="function"?_.forEach(function(g){v.append(b,g)}):typeof _=="object"&&!(_ instanceof Blob)?v.append(b,JSON.stringify(_)):v.append(b,_),!0)},deleteProperty:function(v,b){return typeof b=="string"&&v.delete(b),!0},ownKeys:function(v){return Reflect.ownKeys(Object.fromEntries(v))},getOwnPropertyDescriptor:function(v,b){return Reflect.getOwnPropertyDescriptor(Object.fromEntries(v),b)}})}function issueAjaxRequest(r,v,b,_,g,O){let R=null,J=null;if(g=g??{},g.returnPromise&&typeof Promise<"u")var Z=new Promise(function(K,Ee){R=K,J=Ee});b==null&&(b=getDocument().body);const C=g.handler||handleAjaxResponse,we=g.select||null;if(!bodyContains(b))return maybeCall(R),Z;const Be=g.targetOverride||asElement(getTarget(b));if(Be==null||Be==DUMMY_ELT)return triggerErrorEvent(b,"htmx:targetError",{target:getAttributeValue(b,"hx-target")}),maybeCall(J),Z;let Ue=getInternalData(b);const Q=Ue.lastButtonClicked;if(Q){const K=getRawAttribute(Q,"formaction");K!=null&&(v=K);const Ee=getRawAttribute(Q,"formmethod");Ee!=null&&Ee.toLowerCase()!=="dialog"&&(r=Ee)}const Ke=getClosestAttributeValue(b,"hx-confirm");if(O===void 0&&triggerEvent(b,"htmx:confirm",{target:Be,elt:b,path:v,verb:r,triggeringEvent:_,etc:g,issueRequest:function(nt){return issueAjaxRequest(r,v,b,_,g,!!nt)},question:Ke})===!1)return maybeCall(R),Z;let At=b,gt=getClosestAttributeValue(b,"hx-sync"),q=null,ne=!1;if(gt){const K=gt.split(":"),Ee=K[0].trim();if(Ee==="this"?At=findThisElement(b,"hx-sync"):At=asElement(querySelectorExt(b,Ee)),gt=(K[1]||"drop").trim(),Ue=getInternalData(At),gt==="drop"&&Ue.xhr&&Ue.abortable!==!0)return maybeCall(R),Z;if(gt==="abort"){if(Ue.xhr)return maybeCall(R),Z;ne=!0}else gt==="replace"?triggerEvent(At,"htmx:abort"):gt.indexOf("queue")===0&&(q=(gt.split(" ")[1]||"last").trim())}if(Ue.xhr)if(Ue.abortable)triggerEvent(At,"htmx:abort");else{if(q==null){if(_){const K=getInternalData(_);K&&K.triggerSpec&&K.triggerSpec.queue&&(q=K.triggerSpec.queue)}q==null&&(q="last")}return Ue.queuedRequests==null&&(Ue.queuedRequests=[]),q==="first"&&Ue.queuedRequests.length===0?Ue.queuedRequests.push(function(){issueAjaxRequest(r,v,b,_,g)}):q==="all"?Ue.queuedRequests.push(function(){issueAjaxRequest(r,v,b,_,g)}):q==="last"&&(Ue.queuedRequests=[],Ue.queuedRequests.push(function(){issueAjaxRequest(r,v,b,_,g)})),maybeCall(R),Z}const c=new XMLHttpRequest;Ue.xhr=c,Ue.abortable=ne;const W=function(){Ue.xhr=null,Ue.abortable=!1,Ue.queuedRequests!=null&&Ue.queuedRequests.length>0&&Ue.queuedRequests.shift()()},Re=getClosestAttributeValue(b,"hx-prompt");if(Re){var tt=prompt(Re);if(tt===null||!triggerEvent(b,"htmx:prompt",{prompt:tt,target:Be}))return maybeCall(R),W(),Z}if(Ke&&!O&&!confirm(Ke))return maybeCall(R),W(),Z;let st=getHeaders(b,Be,tt);r!=="get"&&!usesFormData(b)&&(st["Content-Type"]="application/x-www-form-urlencoded"),g.headers&&(st=mergeObjects(st,g.headers));const et=getInputValues(b,r);let je=et.errors;const S=et.formData;g.values&&overrideFormData(S,formDataFromObject(g.values));const si=formDataFromObject(getExpressionVars(b)),ct=overrideFormData(S,si);let xt=filterValues(ct,b);htmx.config.getCacheBusterParam&&r==="get"&&xt.set("org.htmx.cache-buster",getRawAttribute(Be,"id")||"true"),(v==null||v==="")&&(v=getDocument().location.href);const ce=getValuesForElement(b,"hx-request"),G=getInternalData(b).boosted;let P=htmx.config.methodsThatUseUrlParams.indexOf(r)>=0;const k={boosted:G,useUrlParams:P,formData:xt,parameters:formDataProxy(xt),unfilteredFormData:ct,unfilteredParameters:formDataProxy(ct),headers:st,target:Be,verb:r,errors:je,withCredentials:g.credentials||ce.credentials||htmx.config.withCredentials,timeout:g.timeout||ce.timeout||htmx.config.timeout,path:v,triggeringEvent:_};if(!triggerEvent(b,"htmx:configRequest",k))return maybeCall(R),W(),Z;if(v=k.path,r=k.verb,st=k.headers,xt=formDataFromObject(k.parameters),je=k.errors,P=k.useUrlParams,je&&je.length>0)return triggerEvent(b,"htmx:validation:halted",k),maybeCall(R),W(),Z;const N=v.split("#"),Y=N[0],ve=N[1];let Oe=v;if(P&&(Oe=Y,!xt.keys().next().done&&(Oe.indexOf("?")<0?Oe+="?":Oe+="&",Oe+=urlEncode(xt),ve&&(Oe+="#"+ve))),!verifyPath(b,Oe,k))return triggerErrorEvent(b,"htmx:invalidPath",k),maybeCall(J),Z;if(c.open(r.toUpperCase(),Oe,!0),c.overrideMimeType("text/html"),c.withCredentials=k.withCredentials,c.timeout=k.timeout,!ce.noHeaders){for(const K in st)if(st.hasOwnProperty(K)){const Ee=st[K];safelySetHeaderValue(c,K,Ee)}}const Ne={xhr:c,target:Be,requestConfig:k,etc:g,boosted:G,select:we,pathInfo:{requestPath:v,finalRequestPath:Oe,responsePath:null,anchor:ve}};if(c.onload=function(){try{const K=hierarchyForElt(b);if(Ne.pathInfo.responsePath=getPathFromResponse(c),C(b,Ne),Ne.keepIndicators!==!0&&removeRequestIndicators(Ve,Ye),triggerEvent(b,"htmx:afterRequest",Ne),triggerEvent(b,"htmx:afterOnLoad",Ne),!bodyContains(b)){let Ee=null;for(;K.length>0&&Ee==null;){const nt=K.shift();bodyContains(nt)&&(Ee=nt)}Ee&&(triggerEvent(Ee,"htmx:afterRequest",Ne),triggerEvent(Ee,"htmx:afterOnLoad",Ne))}maybeCall(R),W()}catch(K){throw triggerErrorEvent(b,"htmx:onLoadError",mergeObjects({error:K},Ne)),K}},c.onerror=function(){removeRequestIndicators(Ve,Ye),triggerErrorEvent(b,"htmx:afterRequest",Ne),triggerErrorEvent(b,"htmx:sendError",Ne),maybeCall(J),W()},c.onabort=function(){removeRequestIndicators(Ve,Ye),triggerErrorEvent(b,"htmx:afterRequest",Ne),triggerErrorEvent(b,"htmx:sendAbort",Ne),maybeCall(J),W()},c.ontimeout=function(){removeRequestIndicators(Ve,Ye),triggerErrorEvent(b,"htmx:afterRequest",Ne),triggerErrorEvent(b,"htmx:timeout",Ne),maybeCall(J),W()},!triggerEvent(b,"htmx:beforeRequest",Ne))return maybeCall(R),W(),Z;var Ve=addRequestIndicatorClasses(b),Ye=disableElements(b);forEach(["loadstart","loadend","progress","abort"],function(K){forEach([c,c.upload],function(Ee){Ee.addEventListener(K,function(nt){triggerEvent(b,"htmx:xhr:"+K,{lengthComputable:nt.lengthComputable,loaded:nt.loaded,total:nt.total})})})}),triggerEvent(b,"htmx:beforeSend",Ne);const Lt=P?null:encodeParamsForBody(c,b,xt);return c.send(Lt),Z}function determineHistoryUpdates(r,v){const b=v.xhr;let _=null,g=null;if(hasHeader(b,/HX-Push:/i)?(_=b.getResponseHeader("HX-Push"),g="push"):hasHeader(b,/HX-Push-Url:/i)?(_=b.getResponseHeader("HX-Push-Url"),g="push"):hasHeader(b,/HX-Replace-Url:/i)&&(_=b.getResponseHeader("HX-Replace-Url"),g="replace"),_)return _==="false"?{}:{type:g,path:_};const O=v.pathInfo.finalRequestPath,R=v.pathInfo.responsePath,J=getClosestAttributeValue(r,"hx-push-url"),Z=getClosestAttributeValue(r,"hx-replace-url"),C=getInternalData(r).boosted;let we=null,Be=null;return J?(we="push",Be=J):Z?(we="replace",Be=Z):C&&(we="push",Be=R||O),Be?Be==="false"?{}:(Be==="true"&&(Be=R||O),v.pathInfo.anchor&&Be.indexOf("#")===-1&&(Be=Be+"#"+v.pathInfo.anchor),{type:we,path:Be}):{}}function codeMatches(r,v){var b=new RegExp(r.code);return b.test(v.toString(10))}function resolveResponseHandling(r){for(var v=0;v<htmx.config.responseHandling.length;v++){var b=htmx.config.responseHandling[v];if(codeMatches(b,r.status))return b}return{swap:!1}}function handleTitle(r){if(r){const v=find("title");v?v.innerHTML=r:window.document.title=r}}function handleAjaxResponse(r,v){const b=v.xhr;let _=v.target;const g=v.etc,O=v.select;if(!triggerEvent(r,"htmx:beforeOnLoad",v))return;if(hasHeader(b,/HX-Trigger:/i)&&handleTriggerHeader(b,"HX-Trigger",r),hasHeader(b,/HX-Location:/i)){saveCurrentPageToHistory();let ne=b.getResponseHeader("HX-Location");var R;ne.indexOf("{")===0&&(R=parseJSON(ne),ne=R.path,delete R.path),ajaxHelper("get",ne,R).then(function(){pushUrlIntoHistory(ne)});return}const J=hasHeader(b,/HX-Refresh:/i)&&b.getResponseHeader("HX-Refresh")==="true";if(hasHeader(b,/HX-Redirect:/i)){v.keepIndicators=!0,location.href=b.getResponseHeader("HX-Redirect"),J&&location.reload();return}if(J){v.keepIndicators=!0,location.reload();return}hasHeader(b,/HX-Retarget:/i)&&(b.getResponseHeader("HX-Retarget")==="this"?v.target=r:v.target=asElement(querySelectorExt(r,b.getResponseHeader("HX-Retarget"))));const Z=determineHistoryUpdates(r,v),C=resolveResponseHandling(b),we=C.swap;let Be=!!C.error,Ue=htmx.config.ignoreTitle||C.ignoreTitle,Q=C.select;C.target&&(v.target=asElement(querySelectorExt(r,C.target)));var Ke=g.swapOverride;Ke==null&&C.swapOverride&&(Ke=C.swapOverride),hasHeader(b,/HX-Retarget:/i)&&(b.getResponseHeader("HX-Retarget")==="this"?v.target=r:v.target=asElement(querySelectorExt(r,b.getResponseHeader("HX-Retarget")))),hasHeader(b,/HX-Reswap:/i)&&(Ke=b.getResponseHeader("HX-Reswap"));var At=b.response,gt=mergeObjects({shouldSwap:we,serverResponse:At,isError:Be,ignoreTitle:Ue,selectOverride:Q,swapOverride:Ke},v);if(!(C.event&&!triggerEvent(_,C.event,gt))&&triggerEvent(_,"htmx:beforeSwap",gt)){if(_=gt.target,At=gt.serverResponse,Be=gt.isError,Ue=gt.ignoreTitle,Q=gt.selectOverride,Ke=gt.swapOverride,v.target=_,v.failed=Be,v.successful=!Be,gt.shouldSwap){b.status===286&&cancelPolling(r),withExtensions(r,function(et){At=et.transformResponse(At,b,r)}),Z.type&&saveCurrentPageToHistory();var q=getSwapSpecification(r,Ke);q.hasOwnProperty("ignoreTitle")||(q.ignoreTitle=Ue),_.classList.add(htmx.config.swappingClass);let ne=null,c=null;O&&(Q=O),hasHeader(b,/HX-Reselect:/i)&&(Q=b.getResponseHeader("HX-Reselect"));const W=getClosestAttributeValue(r,"hx-select-oob"),Re=getClosestAttributeValue(r,"hx-select");let tt=function(){try{Z.type&&(triggerEvent(getDocument().body,"htmx:beforeHistoryUpdate",mergeObjects({history:Z},v)),Z.type==="push"?(pushUrlIntoHistory(Z.path),triggerEvent(getDocument().body,"htmx:pushedIntoHistory",{path:Z.path})):(replaceUrlInHistory(Z.path),triggerEvent(getDocument().body,"htmx:replacedInHistory",{path:Z.path}))),swap(_,At,q,{select:Q||Re,selectOOB:W,eventInfo:v,anchor:v.pathInfo.anchor,contextElement:r,afterSwapCallback:function(){if(hasHeader(b,/HX-Trigger-After-Swap:/i)){let et=r;bodyContains(r)||(et=getDocument().body),handleTriggerHeader(b,"HX-Trigger-After-Swap",et)}},afterSettleCallback:function(){if(hasHeader(b,/HX-Trigger-After-Settle:/i)){let et=r;bodyContains(r)||(et=getDocument().body),handleTriggerHeader(b,"HX-Trigger-After-Settle",et)}maybeCall(ne)}})}catch(et){throw triggerErrorEvent(r,"htmx:swapError",v),maybeCall(c),et}},st=htmx.config.globalViewTransitions;if(q.hasOwnProperty("transition")&&(st=q.transition),st&&triggerEvent(r,"htmx:beforeTransition",v)&&typeof Promise<"u"&&document.startViewTransition){const et=new Promise(function(S,si){ne=S,c=si}),je=tt;tt=function(){document.startViewTransition(function(){return je(),et})}}q.swapDelay>0?getWindow().setTimeout(tt,q.swapDelay):tt()}Be&&triggerErrorEvent(r,"htmx:responseError",mergeObjects({error:"Response Status Error Code "+b.status+" from "+v.pathInfo.requestPath},v))}}const extensions={};function extensionBase(){return{init:function(r){return null},getSelectors:function(){return null},onEvent:function(r,v){return!0},transformResponse:function(r,v,b){return r},isInlineSwap:function(r){return!1},handleSwap:function(r,v,b,_){return!1},encodeParameters:function(r,v,b){return null}}}function defineExtension(r,v){v.init&&v.init(internalAPI),extensions[r]=mergeObjects(extensionBase(),v)}function removeExtension(r){delete extensions[r]}function getExtensions(r,v,b){if(v==null&&(v=[]),r==null)return v;b==null&&(b=[]);const _=getAttributeValue(r,"hx-ext");return _&&forEach(_.split(","),function(g){if(g=g.replace(/ /g,""),g.slice(0,7)=="ignore:"){b.push(g.slice(7));return}if(b.indexOf(g)<0){const O=extensions[g];O&&v.indexOf(O)<0&&v.push(O)}}),getExtensions(asElement(parentElt(r)),v,b)}var isReady=!1;getDocument().addEventListener("DOMContentLoaded",function(){isReady=!0});function ready(r){isReady||getDocument().readyState==="complete"?r():getDocument().addEventListener("DOMContentLoaded",r)}function insertIndicatorStyles(){if(htmx.config.includeIndicatorStyles!==!1){const r=htmx.config.inlineStyleNonce?` nonce="${htmx.config.inlineStyleNonce}"`:"";getDocument().head.insertAdjacentHTML("beforeend","<style"+r+">      ."+htmx.config.indicatorClass+"{opacity:0}      ."+htmx.config.requestClass+" ."+htmx.config.indicatorClass+"{opacity:1; transition: opacity 200ms ease-in;}      ."+htmx.config.requestClass+"."+htmx.config.indicatorClass+"{opacity:1; transition: opacity 200ms ease-in;}      </style>")}}function getMetaConfig(){const r=getDocument().querySelector('meta[name="htmx-config"]');return r?parseJSON(r.content):null}function mergeMetaConfig(){const r=getMetaConfig();r&&(htmx.config=mergeObjects(htmx.config,r))}return ready(function(){mergeMetaConfig(),insertIndicatorStyles();let r=getDocument().body;processNode(r);const v=getDocument().querySelectorAll("[hx-trigger='restored'],[data-hx-trigger='restored']");r.addEventListener("htmx:abort",function(_){const g=_.target,O=getInternalData(g);O&&O.xhr&&O.xhr.abort()});const b=window.onpopstate?window.onpopstate.bind(window):null;window.onpopstate=function(_){_.state&&_.state.htmx?(restoreHistory(),forEach(v,function(g){triggerEvent(g,"htmx:restored",{document:getDocument(),triggerEvent})})):b&&b(_)},getWindow().setTimeout(function(){triggerEvent(r,"htmx:load",{}),r=null},0)}),htmx}();__webpack_exports__.A=htmx},"./node_modules/jquery/dist/jquery.js":function(r,v){var b,_;(function(g,O){"use strict";typeof r.exports=="object"?r.exports=g.document?O(g,!0):function(R){if(!R.document)throw new Error("jQuery requires a window with a document");return O(R)}:O(g)})(typeof window<"u"?window:this,function(g,O){"use strict";var R=[],J=Object.getPrototypeOf,Z=R.slice,C=R.flat?function(o){return R.flat.call(o)}:function(o){return R.concat.apply([],o)},we=R.push,Be=R.indexOf,Ue={},Q=Ue.toString,Ke=Ue.hasOwnProperty,At=Ke.toString,gt=At.call(Object),q={},ne=function(d){return typeof d=="function"&&typeof d.nodeType!="number"&&typeof d.item!="function"},c=function(d){return d!=null&&d===d.window},W=g.document,Re={type:!0,src:!0,nonce:!0,noModule:!0};function tt(o,d,w){w=w||W;var E,M,D=w.createElement("script");if(D.text=o,d)for(E in Re)M=d[E]||d.getAttribute&&d.getAttribute(E),M&&D.setAttribute(E,M);w.head.appendChild(D).parentNode.removeChild(D)}function st(o){return o==null?o+"":typeof o=="object"||typeof o=="function"?Ue[Q.call(o)]||"object":typeof o}var et="3.7.1",je=/HTML$/i,S=function(o,d){return new S.fn.init(o,d)};S.fn=S.prototype={jquery:et,constructor:S,length:0,toArray:function(){return Z.call(this)},get:function(o){return o==null?Z.call(this):o<0?this[o+this.length]:this[o]},pushStack:function(o){var d=S.merge(this.constructor(),o);return d.prevObject=this,d},each:function(o){return S.each(this,o)},map:function(o){return this.pushStack(S.map(this,function(d,w){return o.call(d,w,d)}))},slice:function(){return this.pushStack(Z.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(S.grep(this,function(o,d){return(d+1)%2}))},odd:function(){return this.pushStack(S.grep(this,function(o,d){return d%2}))},eq:function(o){var d=this.length,w=+o+(o<0?d:0);return this.pushStack(w>=0&&w<d?[this[w]]:[])},end:function(){return this.prevObject||this.constructor()},push:we,sort:R.sort,splice:R.splice},S.extend=S.fn.extend=function(){var o,d,w,E,M,D,V=arguments[0]||{},fe=1,le=arguments.length,Me=!1;for(typeof V=="boolean"&&(Me=V,V=arguments[fe]||{},fe++),typeof V!="object"&&!ne(V)&&(V={}),fe===le&&(V=this,fe--);fe<le;fe++)if((o=arguments[fe])!=null)for(d in o)E=o[d],!(d==="__proto__"||V===E)&&(Me&&E&&(S.isPlainObject(E)||(M=Array.isArray(E)))?(w=V[d],M&&!Array.isArray(w)?D=[]:!M&&!S.isPlainObject(w)?D={}:D=w,M=!1,V[d]=S.extend(Me,D,E)):E!==void 0&&(V[d]=E));return V},S.extend({expando:"jQuery"+(et+Math.random()).replace(/\D/g,""),isReady:!0,error:function(o){throw new Error(o)},noop:function(){},isPlainObject:function(o){var d,w;return!o||Q.call(o)!=="[object Object]"?!1:(d=J(o),d?(w=Ke.call(d,"constructor")&&d.constructor,typeof w=="function"&&At.call(w)===gt):!0)},isEmptyObject:function(o){var d;for(d in o)return!1;return!0},globalEval:function(o,d,w){tt(o,{nonce:d&&d.nonce},w)},each:function(o,d){var w,E=0;if(si(o))for(w=o.length;E<w&&d.call(o[E],E,o[E])!==!1;E++);else for(E in o)if(d.call(o[E],E,o[E])===!1)break;return o},text:function(o){var d,w="",E=0,M=o.nodeType;if(!M)for(;d=o[E++];)w+=S.text(d);return M===1||M===11?o.textContent:M===9?o.documentElement.textContent:M===3||M===4?o.nodeValue:w},makeArray:function(o,d){var w=d||[];return o!=null&&(si(Object(o))?S.merge(w,typeof o=="string"?[o]:o):we.call(w,o)),w},inArray:function(o,d,w){return d==null?-1:Be.call(d,o,w)},isXMLDoc:function(o){var d=o&&o.namespaceURI,w=o&&(o.ownerDocument||o).documentElement;return!je.test(d||w&&w.nodeName||"HTML")},merge:function(o,d){for(var w=+d.length,E=0,M=o.length;E<w;E++)o[M++]=d[E];return o.length=M,o},grep:function(o,d,w){for(var E,M=[],D=0,V=o.length,fe=!w;D<V;D++)E=!d(o[D],D),E!==fe&&M.push(o[D]);return M},map:function(o,d,w){var E,M,D=0,V=[];if(si(o))for(E=o.length;D<E;D++)M=d(o[D],D,w),M!=null&&V.push(M);else for(D in o)M=d(o[D],D,w),M!=null&&V.push(M);return C(V)},guid:1,support:q}),typeof Symbol=="function"&&(S.fn[Symbol.iterator]=R[Symbol.iterator]),S.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(o,d){Ue["[object "+d+"]"]=d.toLowerCase()});function si(o){var d=!!o&&"length"in o&&o.length,w=st(o);return ne(o)||c(o)?!1:w==="array"||d===0||typeof d=="number"&&d>0&&d-1 in o}function ct(o,d){return o.nodeName&&o.nodeName.toLowerCase()===d.toLowerCase()}var xt=R.pop,ce=R.sort,G=R.splice,P="[\\x20\\t\\r\\n\\f]",k=new RegExp("^"+P+"+|((?:^|[^\\\\])(?:\\\\.)*)"+P+"+$","g");S.contains=function(o,d){var w=d&&d.parentNode;return o===w||!!(w&&w.nodeType===1&&(o.contains?o.contains(w):o.compareDocumentPosition&&o.compareDocumentPosition(w)&16))};var N=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g;function Y(o,d){return d?o==="\0"?"\uFFFD":o.slice(0,-1)+"\\"+o.charCodeAt(o.length-1).toString(16)+" ":"\\"+o}S.escapeSelector=function(o){return(o+"").replace(N,Y)};var ve=W,Oe=we;(function(){var o,d,w,E,M,D=Oe,V,fe,le,Me,Ze,Ae=S.expando,ke=0,Tt=0,_i=bo(),$i=bo(),Ei=bo(),In=bo(),Xi=function(re,xe){return re===xe&&(M=!0),0},Sr="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",rr="(?:\\\\[\\da-fA-F]{1,6}"+P+"?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",Pi="\\["+P+"*("+rr+")(?:"+P+"*([*^$|!~]?=)"+P+`*(?:'((?:\\\\.|[^\\\\'])*)'|"((?:\\\\.|[^\\\\"])*)"|(`+rr+"))|)"+P+"*\\]",Nn=":("+rr+`)(?:\\((('((?:\\\\.|[^\\\\'])*)'|"((?:\\\\.|[^\\\\"])*)")|((?:\\\\.|[^\\\\()[\\]]|`+Pi+")*)|.*)\\)|)",ki=new RegExp(P+"+","g"),Fi=new RegExp("^"+P+"*,"+P+"*"),Or=new RegExp("^"+P+"*([>+~]|"+P+")"+P+"*"),or=new RegExp(P+"|>"),ls=new RegExp(Nn),Fs=new RegExp("^"+rr+"$"),cs={ID:new RegExp("^#("+rr+")"),CLASS:new RegExp("^\\.("+rr+")"),TAG:new RegExp("^("+rr+"|[*])"),ATTR:new RegExp("^"+Pi),PSEUDO:new RegExp("^"+Nn),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+P+"*(even|odd|(([+-]|)(\\d*)n|)"+P+"*(?:([+-]|)"+P+"*(\\d+)|))"+P+"*\\)|)","i"),bool:new RegExp("^(?:"+Sr+")$","i"),needsContext:new RegExp("^"+P+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+P+"*((?:-\\d)?\\d*)"+P+"*\\)|)(?=[^-]|$)","i")},Rs=/^(?:input|select|textarea|button)$/i,ws=/^h\d$/i,Zn=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,Wo=/[+~]/,Is=new RegExp("\\\\[\\da-fA-F]{1,6}"+P+"?|\\\\([^\\r\\n\\f])","g"),Vi=function(re,xe){var We="0x"+re.slice(1)-65536;return xe||(We<0?String.fromCharCode(We+65536):String.fromCharCode(We>>10|55296,We&1023|56320))},Ms=function(){lr()},vo=zn(function(re){return re.disabled===!0&&ct(re,"fieldset")},{dir:"parentNode",next:"legend"});function ar(){try{return V.activeElement}catch{}}try{D.apply(R=Z.call(ve.childNodes),ve.childNodes),R[ve.childNodes.length].nodeType}catch{D={apply:function(xe,We){Oe.apply(xe,Z.call(We))},call:function(xe){Oe.apply(xe,Z.call(arguments,1))}}}function Wi(re,xe,We,Xe){var at,qt,$t,Zt,Vt,Ti,pi,yi=xe&&xe.ownerDocument,Mi=xe?xe.nodeType:9;if(We=We||[],typeof re!="string"||!re||Mi!==1&&Mi!==9&&Mi!==11)return We;if(!Xe&&(lr(xe),xe=xe||V,le)){if(Mi!==11&&(Vt=Zn.exec(re)))if(at=Vt[1]){if(Mi===9)if($t=xe.getElementById(at)){if($t.id===at)return D.call(We,$t),We}else return We;else if(yi&&($t=yi.getElementById(at))&&Wi.contains(xe,$t)&&$t.id===at)return D.call(We,$t),We}else{if(Vt[2])return D.apply(We,xe.getElementsByTagName(re)),We;if((at=Vt[3])&&xe.getElementsByClassName)return D.apply(We,xe.getElementsByClassName(at)),We}if(!In[re+" "]&&(!Me||!Me.test(re))){if(pi=re,yi=xe,Mi===1&&(or.test(re)||Or.test(re))){for(yi=Wo.test(re)&&to(xe.parentNode)||xe,(yi!=xe||!q.scope)&&((Zt=xe.getAttribute("id"))?Zt=S.escapeSelector(Zt):xe.setAttribute("id",Zt=Ae)),Ti=Bn(re),qt=Ti.length;qt--;)Ti[qt]=(Zt?"#"+Zt:":scope")+" "+es(Ti[qt]);pi=Ti.join(",")}try{return D.apply(We,yi.querySelectorAll(pi)),We}catch{In(re,!0)}finally{Zt===Ae&&xe.removeAttribute("id")}}}return Wr(re.replace(k,"$1"),xe,We,Xe)}function bo(){var re=[];function xe(We,Xe){return re.push(We+" ")>d.cacheLength&&delete xe[re.shift()],xe[We+" "]=Xe}return xe}function Ns(re){return re[Ae]=!0,re}function us(re){var xe=V.createElement("fieldset");try{return!!re(xe)}catch{return!1}finally{xe.parentNode&&xe.parentNode.removeChild(xe),xe=null}}function _o(re){return function(xe){return ct(xe,"input")&&xe.type===re}}function Zr(re){return function(xe){return(ct(xe,"input")||ct(xe,"button"))&&xe.type===re}}function eo(re){return function(xe){return"form"in xe?xe.parentNode&&xe.disabled===!1?"label"in xe?"label"in xe.parentNode?xe.parentNode.disabled===re:xe.disabled===re:xe.isDisabled===re||xe.isDisabled!==!re&&vo(xe)===re:xe.disabled===re:"label"in xe?xe.disabled===re:!1}}function xr(re){return Ns(function(xe){return xe=+xe,Ns(function(We,Xe){for(var at,qt=re([],We.length,xe),$t=qt.length;$t--;)We[at=qt[$t]]&&(We[at]=!(Xe[at]=We[at]))})})}function to(re){return re&&typeof re.getElementsByTagName<"u"&&re}function lr(re){var xe,We=re?re.ownerDocument||re:ve;return We==V||We.nodeType!==9||!We.documentElement||(V=We,fe=V.documentElement,le=!S.isXMLDoc(V),Ze=fe.matches||fe.webkitMatchesSelector||fe.msMatchesSelector,fe.msMatchesSelector&&ve!=V&&(xe=V.defaultView)&&xe.top!==xe&&xe.addEventListener("unload",Ms),q.getById=us(function(Xe){return fe.appendChild(Xe).id=S.expando,!V.getElementsByName||!V.getElementsByName(S.expando).length}),q.disconnectedMatch=us(function(Xe){return Ze.call(Xe,"*")}),q.scope=us(function(){return V.querySelectorAll(":scope")}),q.cssHas=us(function(){try{return V.querySelector(":has(*,:jqfake)"),!1}catch{return!0}}),q.getById?(d.filter.ID=function(Xe){var at=Xe.replace(Is,Vi);return function(qt){return qt.getAttribute("id")===at}},d.find.ID=function(Xe,at){if(typeof at.getElementById<"u"&&le){var qt=at.getElementById(Xe);return qt?[qt]:[]}}):(d.filter.ID=function(Xe){var at=Xe.replace(Is,Vi);return function(qt){var $t=typeof qt.getAttributeNode<"u"&&qt.getAttributeNode("id");return $t&&$t.value===at}},d.find.ID=function(Xe,at){if(typeof at.getElementById<"u"&&le){var qt,$t,Zt,Vt=at.getElementById(Xe);if(Vt){if(qt=Vt.getAttributeNode("id"),qt&&qt.value===Xe)return[Vt];for(Zt=at.getElementsByName(Xe),$t=0;Vt=Zt[$t++];)if(qt=Vt.getAttributeNode("id"),qt&&qt.value===Xe)return[Vt]}return[]}}),d.find.TAG=function(Xe,at){return typeof at.getElementsByTagName<"u"?at.getElementsByTagName(Xe):at.querySelectorAll(Xe)},d.find.CLASS=function(Xe,at){if(typeof at.getElementsByClassName<"u"&&le)return at.getElementsByClassName(Xe)},Me=[],us(function(Xe){var at;fe.appendChild(Xe).innerHTML="<a id='"+Ae+"' href='' disabled='disabled'></a><select id='"+Ae+"-\r\\' disabled='disabled'><option selected=''></option></select>",Xe.querySelectorAll("[selected]").length||Me.push("\\["+P+"*(?:value|"+Sr+")"),Xe.querySelectorAll("[id~="+Ae+"-]").length||Me.push("~="),Xe.querySelectorAll("a#"+Ae+"+*").length||Me.push(".#.+[+~]"),Xe.querySelectorAll(":checked").length||Me.push(":checked"),at=V.createElement("input"),at.setAttribute("type","hidden"),Xe.appendChild(at).setAttribute("name","D"),fe.appendChild(Xe).disabled=!0,Xe.querySelectorAll(":disabled").length!==2&&Me.push(":enabled",":disabled"),at=V.createElement("input"),at.setAttribute("name",""),Xe.appendChild(at),Xe.querySelectorAll("[name='']").length||Me.push("\\["+P+"*name"+P+"*="+P+`*(?:''|"")`)}),q.cssHas||Me.push(":has"),Me=Me.length&&new RegExp(Me.join("|")),Xi=function(Xe,at){if(Xe===at)return M=!0,0;var qt=!Xe.compareDocumentPosition-!at.compareDocumentPosition;return qt||(qt=(Xe.ownerDocument||Xe)==(at.ownerDocument||at)?Xe.compareDocumentPosition(at):1,qt&1||!q.sortDetached&&at.compareDocumentPosition(Xe)===qt?Xe===V||Xe.ownerDocument==ve&&Wi.contains(ve,Xe)?-1:at===V||at.ownerDocument==ve&&Wi.contains(ve,at)?1:E?Be.call(E,Xe)-Be.call(E,at):0:qt&4?-1:1)}),V}Wi.matches=function(re,xe){return Wi(re,null,null,xe)},Wi.matchesSelector=function(re,xe){if(lr(re),le&&!In[xe+" "]&&(!Me||!Me.test(xe)))try{var We=Ze.call(re,xe);if(We||q.disconnectedMatch||re.document&&re.document.nodeType!==11)return We}catch{In(xe,!0)}return Wi(xe,V,null,[re]).length>0},Wi.contains=function(re,xe){return(re.ownerDocument||re)!=V&&lr(re),S.contains(re,xe)},Wi.attr=function(re,xe){(re.ownerDocument||re)!=V&&lr(re);var We=d.attrHandle[xe.toLowerCase()],Xe=We&&Ke.call(d.attrHandle,xe.toLowerCase())?We(re,xe,!le):void 0;return Xe!==void 0?Xe:re.getAttribute(xe)},Wi.error=function(re){throw new Error("Syntax error, unrecognized expression: "+re)},S.uniqueSort=function(re){var xe,We=[],Xe=0,at=0;if(M=!q.sortStable,E=!q.sortStable&&Z.call(re,0),ce.call(re,Xi),M){for(;xe=re[at++];)xe===re[at]&&(Xe=We.push(at));for(;Xe--;)G.call(re,We[Xe],1)}return E=null,re},S.fn.uniqueSort=function(){return this.pushStack(S.uniqueSort(Z.apply(this)))},d=S.expr={cacheLength:50,createPseudo:Ns,match:cs,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(re){return re[1]=re[1].replace(Is,Vi),re[3]=(re[3]||re[4]||re[5]||"").replace(Is,Vi),re[2]==="~="&&(re[3]=" "+re[3]+" "),re.slice(0,4)},CHILD:function(re){return re[1]=re[1].toLowerCase(),re[1].slice(0,3)==="nth"?(re[3]||Wi.error(re[0]),re[4]=+(re[4]?re[5]+(re[6]||1):2*(re[3]==="even"||re[3]==="odd")),re[5]=+(re[7]+re[8]||re[3]==="odd")):re[3]&&Wi.error(re[0]),re},PSEUDO:function(re){var xe,We=!re[6]&&re[2];return cs.CHILD.test(re[0])?null:(re[3]?re[2]=re[4]||re[5]||"":We&&ls.test(We)&&(xe=Bn(We,!0))&&(xe=We.indexOf(")",We.length-xe)-We.length)&&(re[0]=re[0].slice(0,xe),re[2]=We.slice(0,xe)),re.slice(0,3))}},filter:{TAG:function(re){var xe=re.replace(Is,Vi).toLowerCase();return re==="*"?function(){return!0}:function(We){return ct(We,xe)}},CLASS:function(re){var xe=_i[re+" "];return xe||(xe=new RegExp("(^|"+P+")"+re+"("+P+"|$)"))&&_i(re,function(We){return xe.test(typeof We.className=="string"&&We.className||typeof We.getAttribute<"u"&&We.getAttribute("class")||"")})},ATTR:function(re,xe,We){return function(Xe){var at=Wi.attr(Xe,re);return at==null?xe==="!=":xe?(at+="",xe==="="?at===We:xe==="!="?at!==We:xe==="^="?We&&at.indexOf(We)===0:xe==="*="?We&&at.indexOf(We)>-1:xe==="$="?We&&at.slice(-We.length)===We:xe==="~="?(" "+at.replace(ki," ")+" ").indexOf(We)>-1:xe==="|="?at===We||at.slice(0,We.length+1)===We+"-":!1):!0}},CHILD:function(re,xe,We,Xe,at){var qt=re.slice(0,3)!=="nth",$t=re.slice(-4)!=="last",Zt=xe==="of-type";return Xe===1&&at===0?function(Vt){return!!Vt.parentNode}:function(Vt,Ti,pi){var yi,Mi,ii,Gi,Ss,ts=qt!==$t?"nextSibling":"previousSibling",ds=Vt.parentNode,Hs=Zt&&Vt.nodeName.toLowerCase(),_n=!pi&&!Zt,fs=!1;if(ds){if(qt){for(;ts;){for(ii=Vt;ii=ii[ts];)if(Zt?ct(ii,Hs):ii.nodeType===1)return!1;Ss=ts=re==="only"&&!Ss&&"nextSibling"}return!0}if(Ss=[$t?ds.firstChild:ds.lastChild],$t&&_n){for(Mi=ds[Ae]||(ds[Ae]={}),yi=Mi[re]||[],Gi=yi[0]===ke&&yi[1],fs=Gi&&yi[2],ii=Gi&&ds.childNodes[Gi];ii=++Gi&&ii&&ii[ts]||(fs=Gi=0)||Ss.pop();)if(ii.nodeType===1&&++fs&&ii===Vt){Mi[re]=[ke,Gi,fs];break}}else if(_n&&(Mi=Vt[Ae]||(Vt[Ae]={}),yi=Mi[re]||[],Gi=yi[0]===ke&&yi[1],fs=Gi),fs===!1)for(;(ii=++Gi&&ii&&ii[ts]||(fs=Gi=0)||Ss.pop())&&!((Zt?ct(ii,Hs):ii.nodeType===1)&&++fs&&(_n&&(Mi=ii[Ae]||(ii[Ae]={}),Mi[re]=[ke,fs]),ii===Vt)););return fs-=at,fs===Xe||fs%Xe===0&&fs/Xe>=0}}},PSEUDO:function(re,xe){var We,Xe=d.pseudos[re]||d.setFilters[re.toLowerCase()]||Wi.error("unsupported pseudo: "+re);return Xe[Ae]?Xe(xe):Xe.length>1?(We=[re,re,"",xe],d.setFilters.hasOwnProperty(re.toLowerCase())?Ns(function(at,qt){for(var $t,Zt=Xe(at,xe),Vt=Zt.length;Vt--;)$t=Be.call(at,Zt[Vt]),at[$t]=!(qt[$t]=Zt[Vt])}):function(at){return Xe(at,0,We)}):Xe}},pseudos:{not:Ns(function(re){var xe=[],We=[],Xe=yo(re.replace(k,"$1"));return Xe[Ae]?Ns(function(at,qt,$t,Zt){for(var Vt,Ti=Xe(at,null,Zt,[]),pi=at.length;pi--;)(Vt=Ti[pi])&&(at[pi]=!(qt[pi]=Vt))}):function(at,qt,$t){return xe[0]=at,Xe(xe,null,$t,We),xe[0]=null,!We.pop()}}),has:Ns(function(re){return function(xe){return Wi(re,xe).length>0}}),contains:Ns(function(re){return re=re.replace(Is,Vi),function(xe){return(xe.textContent||S.text(xe)).indexOf(re)>-1}}),lang:Ns(function(re){return Fs.test(re||"")||Wi.error("unsupported lang: "+re),re=re.replace(Is,Vi).toLowerCase(),function(xe){var We;do if(We=le?xe.lang:xe.getAttribute("xml:lang")||xe.getAttribute("lang"))return We=We.toLowerCase(),We===re||We.indexOf(re+"-")===0;while((xe=xe.parentNode)&&xe.nodeType===1);return!1}}),target:function(re){var xe=g.location&&g.location.hash;return xe&&xe.slice(1)===re.id},root:function(re){return re===fe},focus:function(re){return re===ar()&&V.hasFocus()&&!!(re.type||re.href||~re.tabIndex)},enabled:eo(!1),disabled:eo(!0),checked:function(re){return ct(re,"input")&&!!re.checked||ct(re,"option")&&!!re.selected},selected:function(re){return re.parentNode&&re.parentNode.selectedIndex,re.selected===!0},empty:function(re){for(re=re.firstChild;re;re=re.nextSibling)if(re.nodeType<6)return!1;return!0},parent:function(re){return!d.pseudos.empty(re)},header:function(re){return ws.test(re.nodeName)},input:function(re){return Rs.test(re.nodeName)},button:function(re){return ct(re,"input")&&re.type==="button"||ct(re,"button")},text:function(re){var xe;return ct(re,"input")&&re.type==="text"&&((xe=re.getAttribute("type"))==null||xe.toLowerCase()==="text")},first:xr(function(){return[0]}),last:xr(function(re,xe){return[xe-1]}),eq:xr(function(re,xe,We){return[We<0?We+xe:We]}),even:xr(function(re,xe){for(var We=0;We<xe;We+=2)re.push(We);return re}),odd:xr(function(re,xe){for(var We=1;We<xe;We+=2)re.push(We);return re}),lt:xr(function(re,xe,We){var Xe;for(We<0?Xe=We+xe:We>xe?Xe=xe:Xe=We;--Xe>=0;)re.push(Xe);return re}),gt:xr(function(re,xe,We){for(var Xe=We<0?We+xe:We;++Xe<xe;)re.push(Xe);return re})}},d.pseudos.nth=d.pseudos.eq;for(o in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})d.pseudos[o]=_o(o);for(o in{submit:!0,reset:!0})d.pseudos[o]=Zr(o);function Vr(){}Vr.prototype=d.filters=d.pseudos,d.setFilters=new Vr;function Bn(re,xe){var We,Xe,at,qt,$t,Zt,Vt,Ti=$i[re+" "];if(Ti)return xe?0:Ti.slice(0);for($t=re,Zt=[],Vt=d.preFilter;$t;){(!We||(Xe=Fi.exec($t)))&&(Xe&&($t=$t.slice(Xe[0].length)||$t),Zt.push(at=[])),We=!1,(Xe=Or.exec($t))&&(We=Xe.shift(),at.push({value:We,type:Xe[0].replace(k," ")}),$t=$t.slice(We.length));for(qt in d.filter)(Xe=cs[qt].exec($t))&&(!Vt[qt]||(Xe=Vt[qt](Xe)))&&(We=Xe.shift(),at.push({value:We,type:qt,matches:Xe}),$t=$t.slice(We.length));if(!We)break}return xe?$t.length:$t?Wi.error(re):$i(re,Zt).slice(0)}function es(re){for(var xe=0,We=re.length,Xe="";xe<We;xe++)Xe+=re[xe].value;return Xe}function zn(re,xe,We){var Xe=xe.dir,at=xe.next,qt=at||Xe,$t=We&&qt==="parentNode",Zt=Tt++;return xe.first?function(Vt,Ti,pi){for(;Vt=Vt[Xe];)if(Vt.nodeType===1||$t)return re(Vt,Ti,pi);return!1}:function(Vt,Ti,pi){var yi,Mi,ii=[ke,Zt];if(pi){for(;Vt=Vt[Xe];)if((Vt.nodeType===1||$t)&&re(Vt,Ti,pi))return!0}else for(;Vt=Vt[Xe];)if(Vt.nodeType===1||$t)if(Mi=Vt[Ae]||(Vt[Ae]={}),at&&ct(Vt,at))Vt=Vt[Xe]||Vt;else{if((yi=Mi[qt])&&yi[0]===ke&&yi[1]===Zt)return ii[2]=yi[2];if(Mi[qt]=ii,ii[2]=re(Vt,Ti,pi))return!0}return!1}}function Hn(re){return re.length>1?function(xe,We,Xe){for(var at=re.length;at--;)if(!re[at](xe,We,Xe))return!1;return!0}:re[0]}function zo(re,xe,We){for(var Xe=0,at=xe.length;Xe<at;Xe++)Wi(re,xe[Xe],We);return We}function cr(re,xe,We,Xe,at){for(var qt,$t=[],Zt=0,Vt=re.length,Ti=xe!=null;Zt<Vt;Zt++)(qt=re[Zt])&&(!We||We(qt,Xe,at))&&($t.push(qt),Ti&&xe.push(Zt));return $t}function ur(re,xe,We,Xe,at,qt){return Xe&&!Xe[Ae]&&(Xe=ur(Xe)),at&&!at[Ae]&&(at=ur(at,qt)),Ns(function($t,Zt,Vt,Ti){var pi,yi,Mi,ii,Gi=[],Ss=[],ts=Zt.length,ds=$t||zo(xe||"*",Vt.nodeType?[Vt]:Vt,[]),Hs=re&&($t||!xe)?cr(ds,Gi,re,Vt,Ti):ds;if(We?(ii=at||($t?re:ts||Xe)?[]:Zt,We(Hs,ii,Vt,Ti)):ii=Hs,Xe)for(pi=cr(ii,Ss),Xe(pi,[],Vt,Ti),yi=pi.length;yi--;)(Mi=pi[yi])&&(ii[Ss[yi]]=!(Hs[Ss[yi]]=Mi));if($t){if(at||re){if(at){for(pi=[],yi=ii.length;yi--;)(Mi=ii[yi])&&pi.push(Hs[yi]=Mi);at(null,ii=[],pi,Ti)}for(yi=ii.length;yi--;)(Mi=ii[yi])&&(pi=at?Be.call($t,Mi):Gi[yi])>-1&&($t[pi]=!(Zt[pi]=Mi))}}else ii=cr(ii===Zt?ii.splice(ts,ii.length):ii),at?at(null,Zt,ii,Ti):D.apply(Zt,ii)})}function qr(re){for(var xe,We,Xe,at=re.length,qt=d.relative[re[0].type],$t=qt||d.relative[" "],Zt=qt?1:0,Vt=zn(function(yi){return yi===xe},$t,!0),Ti=zn(function(yi){return Be.call(xe,yi)>-1},$t,!0),pi=[function(yi,Mi,ii){var Gi=!qt&&(ii||Mi!=w)||((xe=Mi).nodeType?Vt(yi,Mi,ii):Ti(yi,Mi,ii));return xe=null,Gi}];Zt<at;Zt++)if(We=d.relative[re[Zt].type])pi=[zn(Hn(pi),We)];else{if(We=d.filter[re[Zt].type].apply(null,re[Zt].matches),We[Ae]){for(Xe=++Zt;Xe<at&&!d.relative[re[Xe].type];Xe++);return ur(Zt>1&&Hn(pi),Zt>1&&es(re.slice(0,Zt-1).concat({value:re[Zt-2].type===" "?"*":""})).replace(k,"$1"),We,Zt<Xe&&qr(re.slice(Zt,Xe)),Xe<at&&qr(re=re.slice(Xe)),Xe<at&&es(re))}pi.push(We)}return Hn(pi)}function Vl(re,xe){var We=xe.length>0,Xe=re.length>0,at=function(qt,$t,Zt,Vt,Ti){var pi,yi,Mi,ii=0,Gi="0",Ss=qt&&[],ts=[],ds=w,Hs=qt||Xe&&d.find.TAG("*",Ti),_n=ke+=ds==null?1:Math.random()||.1,fs=Hs.length;for(Ti&&(w=$t==V||$t||Ti);Gi!==fs&&(pi=Hs[Gi])!=null;Gi++){if(Xe&&pi){for(yi=0,!$t&&pi.ownerDocument!=V&&(lr(pi),Zt=!le);Mi=re[yi++];)if(Mi(pi,$t||V,Zt)){D.call(Vt,pi);break}Ti&&(ke=_n)}We&&((pi=!Mi&&pi)&&ii--,qt&&Ss.push(pi))}if(ii+=Gi,We&&Gi!==ii){for(yi=0;Mi=xe[yi++];)Mi(Ss,ts,$t,Zt);if(qt){if(ii>0)for(;Gi--;)Ss[Gi]||ts[Gi]||(ts[Gi]=xt.call(Vt));ts=cr(ts)}D.apply(Vt,ts),Ti&&!qt&&ts.length>0&&ii+xe.length>1&&S.uniqueSort(Vt)}return Ti&&(ke=_n,w=ds),Ss};return We?Ns(at):at}function yo(re,xe){var We,Xe=[],at=[],qt=Ei[re+" "];if(!qt){for(xe||(xe=Bn(re)),We=xe.length;We--;)qt=qr(xe[We]),qt[Ae]?Xe.push(qt):at.push(qt);qt=Ei(re,Vl(at,Xe)),qt.selector=re}return qt}function Wr(re,xe,We,Xe){var at,qt,$t,Zt,Vt,Ti=typeof re=="function"&&re,pi=!Xe&&Bn(re=Ti.selector||re);if(We=We||[],pi.length===1){if(qt=pi[0]=pi[0].slice(0),qt.length>2&&($t=qt[0]).type==="ID"&&xe.nodeType===9&&le&&d.relative[qt[1].type]){if(xe=(d.find.ID($t.matches[0].replace(Is,Vi),xe)||[])[0],xe)Ti&&(xe=xe.parentNode);else return We;re=re.slice(qt.shift().value.length)}for(at=cs.needsContext.test(re)?0:qt.length;at--&&($t=qt[at],!d.relative[Zt=$t.type]);)if((Vt=d.find[Zt])&&(Xe=Vt($t.matches[0].replace(Is,Vi),Wo.test(qt[0].type)&&to(xe.parentNode)||xe))){if(qt.splice(at,1),re=Xe.length&&es(qt),!re)return D.apply(We,Xe),We;break}}return(Ti||yo(re,pi))(Xe,xe,!le,We,!xe||Wo.test(re)&&to(xe.parentNode)||xe),We}q.sortStable=Ae.split("").sort(Xi).join("")===Ae,lr(),q.sortDetached=us(function(re){return re.compareDocumentPosition(V.createElement("fieldset"))&1}),S.find=Wi,S.expr[":"]=S.expr.pseudos,S.unique=S.uniqueSort,Wi.compile=yo,Wi.select=Wr,Wi.setDocument=lr,Wi.tokenize=Bn,Wi.escape=S.escapeSelector,Wi.getText=S.text,Wi.isXML=S.isXMLDoc,Wi.selectors=S.expr,Wi.support=S.support,Wi.uniqueSort=S.uniqueSort})();var Ne=function(o,d,w){for(var E=[],M=w!==void 0;(o=o[d])&&o.nodeType!==9;)if(o.nodeType===1){if(M&&S(o).is(w))break;E.push(o)}return E},Ve=function(o,d){for(var w=[];o;o=o.nextSibling)o.nodeType===1&&o!==d&&w.push(o);return w},Ye=S.expr.match.needsContext,Lt=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function K(o,d,w){return ne(d)?S.grep(o,function(E,M){return!!d.call(E,M,E)!==w}):d.nodeType?S.grep(o,function(E){return E===d!==w}):typeof d!="string"?S.grep(o,function(E){return Be.call(d,E)>-1!==w}):S.filter(d,o,w)}S.filter=function(o,d,w){var E=d[0];return w&&(o=":not("+o+")"),d.length===1&&E.nodeType===1?S.find.matchesSelector(E,o)?[E]:[]:S.find.matches(o,S.grep(d,function(M){return M.nodeType===1}))},S.fn.extend({find:function(o){var d,w,E=this.length,M=this;if(typeof o!="string")return this.pushStack(S(o).filter(function(){for(d=0;d<E;d++)if(S.contains(M[d],this))return!0}));for(w=this.pushStack([]),d=0;d<E;d++)S.find(o,M[d],w);return E>1?S.uniqueSort(w):w},filter:function(o){return this.pushStack(K(this,o||[],!1))},not:function(o){return this.pushStack(K(this,o||[],!0))},is:function(o){return!!K(this,typeof o=="string"&&Ye.test(o)?S(o):o||[],!1).length}});var Ee,nt=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/,te=S.fn.init=function(o,d,w){var E,M;if(!o)return this;if(w=w||Ee,typeof o=="string")if(o[0]==="<"&&o[o.length-1]===">"&&o.length>=3?E=[null,o,null]:E=nt.exec(o),E&&(E[1]||!d))if(E[1]){if(d=d instanceof S?d[0]:d,S.merge(this,S.parseHTML(E[1],d&&d.nodeType?d.ownerDocument||d:W,!0)),Lt.test(E[1])&&S.isPlainObject(d))for(E in d)ne(this[E])?this[E](d[E]):this.attr(E,d[E]);return this}else return M=W.getElementById(E[2]),M&&(this[0]=M,this.length=1),this;else return!d||d.jquery?(d||w).find(o):this.constructor(d).find(o);else{if(o.nodeType)return this[0]=o,this.length=1,this;if(ne(o))return w.ready!==void 0?w.ready(o):o(S)}return S.makeArray(o,this)};te.prototype=S.fn,Ee=S(W);var ee=/^(?:parents|prev(?:Until|All))/,oe={children:!0,contents:!0,next:!0,prev:!0};S.fn.extend({has:function(o){var d=S(o,this),w=d.length;return this.filter(function(){for(var E=0;E<w;E++)if(S.contains(this,d[E]))return!0})},closest:function(o,d){var w,E=0,M=this.length,D=[],V=typeof o!="string"&&S(o);if(!Ye.test(o)){for(;E<M;E++)for(w=this[E];w&&w!==d;w=w.parentNode)if(w.nodeType<11&&(V?V.index(w)>-1:w.nodeType===1&&S.find.matchesSelector(w,o))){D.push(w);break}}return this.pushStack(D.length>1?S.uniqueSort(D):D)},index:function(o){return o?typeof o=="string"?Be.call(S(o),this[0]):Be.call(this,o.jquery?o[0]:o):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(o,d){return this.pushStack(S.uniqueSort(S.merge(this.get(),S(o,d))))},addBack:function(o){return this.add(o==null?this.prevObject:this.prevObject.filter(o))}});function Ge(o,d){for(;(o=o[d])&&o.nodeType!==1;);return o}S.each({parent:function(o){var d=o.parentNode;return d&&d.nodeType!==11?d:null},parents:function(o){return Ne(o,"parentNode")},parentsUntil:function(o,d,w){return Ne(o,"parentNode",w)},next:function(o){return Ge(o,"nextSibling")},prev:function(o){return Ge(o,"previousSibling")},nextAll:function(o){return Ne(o,"nextSibling")},prevAll:function(o){return Ne(o,"previousSibling")},nextUntil:function(o,d,w){return Ne(o,"nextSibling",w)},prevUntil:function(o,d,w){return Ne(o,"previousSibling",w)},siblings:function(o){return Ve((o.parentNode||{}).firstChild,o)},children:function(o){return Ve(o.firstChild)},contents:function(o){return o.contentDocument!=null&&J(o.contentDocument)?o.contentDocument:(ct(o,"template")&&(o=o.content||o),S.merge([],o.childNodes))}},function(o,d){S.fn[o]=function(w,E){var M=S.map(this,d,w);return o.slice(-5)!=="Until"&&(E=w),E&&typeof E=="string"&&(M=S.filter(E,M)),this.length>1&&(oe[o]||S.uniqueSort(M),ee.test(o)&&M.reverse()),this.pushStack(M)}});var yt=/[^\x20\t\r\n\f]+/g;function jt(o){var d={};return S.each(o.match(yt)||[],function(w,E){d[E]=!0}),d}S.Callbacks=function(o){o=typeof o=="string"?jt(o):S.extend({},o);var d,w,E,M,D=[],V=[],fe=-1,le=function(){for(M=M||o.once,E=d=!0;V.length;fe=-1)for(w=V.shift();++fe<D.length;)D[fe].apply(w[0],w[1])===!1&&o.stopOnFalse&&(fe=D.length,w=!1);o.memory||(w=!1),d=!1,M&&(w?D=[]:D="")},Me={add:function(){return D&&(w&&!d&&(fe=D.length-1,V.push(w)),function Ze(Ae){S.each(Ae,function(ke,Tt){ne(Tt)?(!o.unique||!Me.has(Tt))&&D.push(Tt):Tt&&Tt.length&&st(Tt)!=="string"&&Ze(Tt)})}(arguments),w&&!d&&le()),this},remove:function(){return S.each(arguments,function(Ze,Ae){for(var ke;(ke=S.inArray(Ae,D,ke))>-1;)D.splice(ke,1),ke<=fe&&fe--}),this},has:function(Ze){return Ze?S.inArray(Ze,D)>-1:D.length>0},empty:function(){return D&&(D=[]),this},disable:function(){return M=V=[],D=w="",this},disabled:function(){return!D},lock:function(){return M=V=[],!w&&!d&&(D=w=""),this},locked:function(){return!!M},fireWith:function(Ze,Ae){return M||(Ae=Ae||[],Ae=[Ze,Ae.slice?Ae.slice():Ae],V.push(Ae),d||le()),this},fire:function(){return Me.fireWith(this,arguments),this},fired:function(){return!!E}};return Me};function Bt(o){return o}function Qt(o){throw o}function ji(o,d,w,E){var M;try{o&&ne(M=o.promise)?M.call(o).done(d).fail(w):o&&ne(M=o.then)?M.call(o,d,w):d.apply(void 0,[o].slice(E))}catch(D){w.apply(void 0,[D])}}S.extend({Deferred:function(o){var d=[["notify","progress",S.Callbacks("memory"),S.Callbacks("memory"),2],["resolve","done",S.Callbacks("once memory"),S.Callbacks("once memory"),0,"resolved"],["reject","fail",S.Callbacks("once memory"),S.Callbacks("once memory"),1,"rejected"]],w="pending",E={state:function(){return w},always:function(){return M.done(arguments).fail(arguments),this},catch:function(D){return E.then(null,D)},pipe:function(){var D=arguments;return S.Deferred(function(V){S.each(d,function(fe,le){var Me=ne(D[le[4]])&&D[le[4]];M[le[1]](function(){var Ze=Me&&Me.apply(this,arguments);Ze&&ne(Ze.promise)?Ze.promise().progress(V.notify).done(V.resolve).fail(V.reject):V[le[0]+"With"](this,Me?[Ze]:arguments)})}),D=null}).promise()},then:function(D,V,fe){var le=0;function Me(Ze,Ae,ke,Tt){return function(){var _i=this,$i=arguments,Ei=function(){var Xi,Sr;if(!(Ze<le)){if(Xi=ke.apply(_i,$i),Xi===Ae.promise())throw new TypeError("Thenable self-resolution");Sr=Xi&&(typeof Xi=="object"||typeof Xi=="function")&&Xi.then,ne(Sr)?Tt?Sr.call(Xi,Me(le,Ae,Bt,Tt),Me(le,Ae,Qt,Tt)):(le++,Sr.call(Xi,Me(le,Ae,Bt,Tt),Me(le,Ae,Qt,Tt),Me(le,Ae,Bt,Ae.notifyWith))):(ke!==Bt&&(_i=void 0,$i=[Xi]),(Tt||Ae.resolveWith)(_i,$i))}},In=Tt?Ei:function(){try{Ei()}catch(Xi){S.Deferred.exceptionHook&&S.Deferred.exceptionHook(Xi,In.error),Ze+1>=le&&(ke!==Qt&&(_i=void 0,$i=[Xi]),Ae.rejectWith(_i,$i))}};Ze?In():(S.Deferred.getErrorHook?In.error=S.Deferred.getErrorHook():S.Deferred.getStackHook&&(In.error=S.Deferred.getStackHook()),g.setTimeout(In))}}return S.Deferred(function(Ze){d[0][3].add(Me(0,Ze,ne(fe)?fe:Bt,Ze.notifyWith)),d[1][3].add(Me(0,Ze,ne(D)?D:Bt)),d[2][3].add(Me(0,Ze,ne(V)?V:Qt))}).promise()},promise:function(D){return D!=null?S.extend(D,E):E}},M={};return S.each(d,function(D,V){var fe=V[2],le=V[5];E[V[1]]=fe.add,le&&fe.add(function(){w=le},d[3-D][2].disable,d[3-D][3].disable,d[0][2].lock,d[0][3].lock),fe.add(V[3].fire),M[V[0]]=function(){return M[V[0]+"With"](this===M?void 0:this,arguments),this},M[V[0]+"With"]=fe.fireWith}),E.promise(M),o&&o.call(M,M),M},when:function(o){var d=arguments.length,w=d,E=Array(w),M=Z.call(arguments),D=S.Deferred(),V=function(fe){return function(le){E[fe]=this,M[fe]=arguments.length>1?Z.call(arguments):le,--d||D.resolveWith(E,M)}};if(d<=1&&(ji(o,D.done(V(w)).resolve,D.reject,!d),D.state()==="pending"||ne(M[w]&&M[w].then)))return D.then();for(;w--;)ji(M[w],V(w),D.reject);return D.promise()}});var ti=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;S.Deferred.exceptionHook=function(o,d){g.console&&g.console.warn&&o&&ti.test(o.name)&&g.console.warn("jQuery.Deferred exception: "+o.message,o.stack,d)},S.readyException=function(o){g.setTimeout(function(){throw o})};var fn=S.Deferred();S.fn.ready=function(o){return fn.then(o).catch(function(d){S.readyException(d)}),this},S.extend({isReady:!1,readyWait:1,ready:function(o){(o===!0?--S.readyWait:S.isReady)||(S.isReady=!0,!(o!==!0&&--S.readyWait>0)&&fn.resolveWith(W,[S]))}}),S.ready.then=fn.then;function Qi(){W.removeEventListener("DOMContentLoaded",Qi),g.removeEventListener("load",Qi),S.ready()}W.readyState==="complete"||W.readyState!=="loading"&&!W.documentElement.doScroll?g.setTimeout(S.ready):(W.addEventListener("DOMContentLoaded",Qi),g.addEventListener("load",Qi));var p=function(o,d,w,E,M,D,V){var fe=0,le=o.length,Me=w==null;if(st(w)==="object"){M=!0;for(fe in w)p(o,d,fe,w[fe],!0,D,V)}else if(E!==void 0&&(M=!0,ne(E)||(V=!0),Me&&(V?(d.call(o,E),d=null):(Me=d,d=function(Ze,Ae,ke){return Me.call(S(Ze),ke)})),d))for(;fe<le;fe++)d(o[fe],w,V?E:E.call(o[fe],fe,d(o[fe],w)));return M?o:Me?d.call(o):le?d(o[0],w):D},j=/^-ms-/,H=/-([a-z])/g;function ge(o,d){return d.toUpperCase()}function me(o){return o.replace(j,"ms-").replace(H,ge)}var De=function(o){return o.nodeType===1||o.nodeType===9||!+o.nodeType};function ht(){this.expando=S.expando+ht.uid++}ht.uid=1,ht.prototype={cache:function(o){var d=o[this.expando];return d||(d={},De(o)&&(o.nodeType?o[this.expando]=d:Object.defineProperty(o,this.expando,{value:d,configurable:!0}))),d},set:function(o,d,w){var E,M=this.cache(o);if(typeof d=="string")M[me(d)]=w;else for(E in d)M[me(E)]=d[E];return M},get:function(o,d){return d===void 0?this.cache(o):o[this.expando]&&o[this.expando][me(d)]},access:function(o,d,w){return d===void 0||d&&typeof d=="string"&&w===void 0?this.get(o,d):(this.set(o,d,w),w!==void 0?w:d)},remove:function(o,d){var w,E=o[this.expando];if(E!==void 0){if(d!==void 0)for(Array.isArray(d)?d=d.map(me):(d=me(d),d=d in E?[d]:d.match(yt)||[]),w=d.length;w--;)delete E[d[w]];(d===void 0||S.isEmptyObject(E))&&(o.nodeType?o[this.expando]=void 0:delete o[this.expando])}},hasData:function(o){var d=o[this.expando];return d!==void 0&&!S.isEmptyObject(d)}};var rt=new ht,zt=new ht,fi=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,vi=/[A-Z]/g;function nn(o){return o==="true"?!0:o==="false"?!1:o==="null"?null:o===+o+""?+o:fi.test(o)?JSON.parse(o):o}function on(o,d,w){var E;if(w===void 0&&o.nodeType===1)if(E="data-"+d.replace(vi,"-$&").toLowerCase(),w=o.getAttribute(E),typeof w=="string"){try{w=nn(w)}catch{}zt.set(o,d,w)}else w=void 0;return w}S.extend({hasData:function(o){return zt.hasData(o)||rt.hasData(o)},data:function(o,d,w){return zt.access(o,d,w)},removeData:function(o,d){zt.remove(o,d)},_data:function(o,d,w){return rt.access(o,d,w)},_removeData:function(o,d){rt.remove(o,d)}}),S.fn.extend({data:function(o,d){var w,E,M,D=this[0],V=D&&D.attributes;if(o===void 0){if(this.length&&(M=zt.get(D),D.nodeType===1&&!rt.get(D,"hasDataAttrs"))){for(w=V.length;w--;)V[w]&&(E=V[w].name,E.indexOf("data-")===0&&(E=me(E.slice(5)),on(D,E,M[E])));rt.set(D,"hasDataAttrs",!0)}return M}return typeof o=="object"?this.each(function(){zt.set(this,o)}):p(this,function(fe){var le;if(D&&fe===void 0)return le=zt.get(D,o),le!==void 0||(le=on(D,o),le!==void 0)?le:void 0;this.each(function(){zt.set(this,o,fe)})},null,d,arguments.length>1,null,!0)},removeData:function(o){return this.each(function(){zt.remove(this,o)})}}),S.extend({queue:function(o,d,w){var E;if(o)return d=(d||"fx")+"queue",E=rt.get(o,d),w&&(!E||Array.isArray(w)?E=rt.access(o,d,S.makeArray(w)):E.push(w)),E||[]},dequeue:function(o,d){d=d||"fx";var w=S.queue(o,d),E=w.length,M=w.shift(),D=S._queueHooks(o,d),V=function(){S.dequeue(o,d)};M==="inprogress"&&(M=w.shift(),E--),M&&(d==="fx"&&w.unshift("inprogress"),delete D.stop,M.call(o,V,D)),!E&&D&&D.empty.fire()},_queueHooks:function(o,d){var w=d+"queueHooks";return rt.get(o,w)||rt.access(o,w,{empty:S.Callbacks("once memory").add(function(){rt.remove(o,[d+"queue",w])})})}}),S.fn.extend({queue:function(o,d){var w=2;return typeof o!="string"&&(d=o,o="fx",w--),arguments.length<w?S.queue(this[0],o):d===void 0?this:this.each(function(){var E=S.queue(this,o,d);S._queueHooks(this,o),o==="fx"&&E[0]!=="inprogress"&&S.dequeue(this,o)})},dequeue:function(o){return this.each(function(){S.dequeue(this,o)})},clearQueue:function(o){return this.queue(o||"fx",[])},promise:function(o,d){var w,E=1,M=S.Deferred(),D=this,V=this.length,fe=function(){--E||M.resolveWith(D,[D])};for(typeof o!="string"&&(d=o,o=void 0),o=o||"fx";V--;)w=rt.get(D[V],o+"queueHooks"),w&&w.empty&&(E++,w.empty.add(fe));return fe(),M.promise(d)}});var an=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,bn=new RegExp("^(?:([+-])=|)("+an+")([a-z%]*)$","i"),ln=["Top","Right","Bottom","Left"],Yi=W.documentElement,Fn=function(o){return S.contains(o.ownerDocument,o)},vr={composed:!0};Yi.getRootNode&&(Fn=function(o){return S.contains(o.ownerDocument,o)||o.getRootNode(vr)===o.ownerDocument});var Ln=function(o,d){return o=d||o,o.style.display==="none"||o.style.display===""&&Fn(o)&&S.css(o,"display")==="none"};function Gs(o,d,w,E){var M,D,V=20,fe=E?function(){return E.cur()}:function(){return S.css(o,d,"")},le=fe(),Me=w&&w[3]||(S.cssNumber[d]?"":"px"),Ze=o.nodeType&&(S.cssNumber[d]||Me!=="px"&&+le)&&bn.exec(S.css(o,d));if(Ze&&Ze[3]!==Me){for(le=le/2,Me=Me||Ze[3],Ze=+le||1;V--;)S.style(o,d,Ze+Me),(1-D)*(1-(D=fe()/le||.5))<=0&&(V=0),Ze=Ze/D;Ze=Ze*2,S.style(o,d,Ze+Me),w=w||[]}return w&&(Ze=+Ze||+le||0,M=w[1]?Ze+(w[1]+1)*w[2]:+w[2],E&&(E.unit=Me,E.start=Ze,E.end=M)),M}var js={};function os(o){var d,w=o.ownerDocument,E=o.nodeName,M=js[E];return M||(d=w.body.appendChild(w.createElement(E)),M=S.css(d,"display"),d.parentNode.removeChild(d),M==="none"&&(M="block"),js[E]=M,M)}function Es(o,d){for(var w,E,M=[],D=0,V=o.length;D<V;D++)E=o[D],E.style&&(w=E.style.display,d?(w==="none"&&(M[D]=rt.get(E,"display")||null,M[D]||(E.style.display="")),E.style.display===""&&Ln(E)&&(M[D]=os(E))):w!=="none"&&(M[D]="none",rt.set(E,"display",w)));for(D=0;D<V;D++)M[D]!=null&&(o[D].style.display=M[D]);return o}S.fn.extend({show:function(){return Es(this,!0)},hide:function(){return Es(this)},toggle:function(o){return typeof o=="boolean"?o?this.show():this.hide():this.each(function(){Ln(this)?S(this).show():S(this).hide()})}});var qs=/^(?:checkbox|radio)$/i,As=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i,Ys=/^$|^module$|\/(?:java|ecma)script/i;(function(){var o=W.createDocumentFragment(),d=o.appendChild(W.createElement("div")),w=W.createElement("input");w.setAttribute("type","radio"),w.setAttribute("checked","checked"),w.setAttribute("name","t"),d.appendChild(w),q.checkClone=d.cloneNode(!0).cloneNode(!0).lastChild.checked,d.innerHTML="<textarea>x</textarea>",q.noCloneChecked=!!d.cloneNode(!0).lastChild.defaultValue,d.innerHTML="<option></option>",q.option=!!d.lastChild})();var On={thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};On.tbody=On.tfoot=On.colgroup=On.caption=On.thead,On.th=On.td,q.option||(On.optgroup=On.option=[1,"<select multiple='multiple'>","</select>"]);function Tn(o,d){var w;return typeof o.getElementsByTagName<"u"?w=o.getElementsByTagName(d||"*"):typeof o.querySelectorAll<"u"?w=o.querySelectorAll(d||"*"):w=[],d===void 0||d&&ct(o,d)?S.merge([o],w):w}function jn(o,d){for(var w=0,E=o.length;w<E;w++)rt.set(o[w],"globalEval",!d||rt.get(d[w],"globalEval"))}var hn=/<|&#?\w+;/;function Ji(o,d,w,E,M){for(var D,V,fe,le,Me,Ze,Ae=d.createDocumentFragment(),ke=[],Tt=0,_i=o.length;Tt<_i;Tt++)if(D=o[Tt],D||D===0)if(st(D)==="object")S.merge(ke,D.nodeType?[D]:D);else if(!hn.test(D))ke.push(d.createTextNode(D));else{for(V=V||Ae.appendChild(d.createElement("div")),fe=(As.exec(D)||["",""])[1].toLowerCase(),le=On[fe]||On._default,V.innerHTML=le[1]+S.htmlPrefilter(D)+le[2],Ze=le[0];Ze--;)V=V.lastChild;S.merge(ke,V.childNodes),V=Ae.firstChild,V.textContent=""}for(Ae.textContent="",Tt=0;D=ke[Tt++];){if(E&&S.inArray(D,E)>-1){M&&M.push(D);continue}if(Me=Fn(D),V=Tn(Ae.appendChild(D),"script"),Me&&jn(V),w)for(Ze=0;D=V[Ze++];)Ys.test(D.type||"")&&w.push(D)}return Ae}var sn=/^([^.]*)(?:\.(.+)|)/;function mn(){return!0}function mi(){return!1}function Js(o,d,w,E,M,D){var V,fe;if(typeof d=="object"){typeof w!="string"&&(E=E||w,w=void 0);for(fe in d)Js(o,fe,w,E,d[fe],D);return o}if(E==null&&M==null?(M=w,E=w=void 0):M==null&&(typeof w=="string"?(M=E,E=void 0):(M=E,E=w,w=void 0)),M===!1)M=mi;else if(!M)return o;return D===1&&(V=M,M=function(le){return S().off(le),V.apply(this,arguments)},M.guid=V.guid||(V.guid=S.guid++)),o.each(function(){S.event.add(this,d,M,E,w)})}S.event={global:{},add:function(o,d,w,E,M){var D,V,fe,le,Me,Ze,Ae,ke,Tt,_i,$i,Ei=rt.get(o);if(De(o))for(w.handler&&(D=w,w=D.handler,M=D.selector),M&&S.find.matchesSelector(Yi,M),w.guid||(w.guid=S.guid++),(le=Ei.events)||(le=Ei.events=Object.create(null)),(V=Ei.handle)||(V=Ei.handle=function(In){return typeof S<"u"&&S.event.triggered!==In.type?S.event.dispatch.apply(o,arguments):void 0}),d=(d||"").match(yt)||[""],Me=d.length;Me--;)fe=sn.exec(d[Me])||[],Tt=$i=fe[1],_i=(fe[2]||"").split(".").sort(),Tt&&(Ae=S.event.special[Tt]||{},Tt=(M?Ae.delegateType:Ae.bindType)||Tt,Ae=S.event.special[Tt]||{},Ze=S.extend({type:Tt,origType:$i,data:E,handler:w,guid:w.guid,selector:M,needsContext:M&&S.expr.match.needsContext.test(M),namespace:_i.join(".")},D),(ke=le[Tt])||(ke=le[Tt]=[],ke.delegateCount=0,(!Ae.setup||Ae.setup.call(o,E,_i,V)===!1)&&o.addEventListener&&o.addEventListener(Tt,V)),Ae.add&&(Ae.add.call(o,Ze),Ze.handler.guid||(Ze.handler.guid=w.guid)),M?ke.splice(ke.delegateCount++,0,Ze):ke.push(Ze),S.event.global[Tt]=!0)},remove:function(o,d,w,E,M){var D,V,fe,le,Me,Ze,Ae,ke,Tt,_i,$i,Ei=rt.hasData(o)&&rt.get(o);if(!(!Ei||!(le=Ei.events))){for(d=(d||"").match(yt)||[""],Me=d.length;Me--;){if(fe=sn.exec(d[Me])||[],Tt=$i=fe[1],_i=(fe[2]||"").split(".").sort(),!Tt){for(Tt in le)S.event.remove(o,Tt+d[Me],w,E,!0);continue}for(Ae=S.event.special[Tt]||{},Tt=(E?Ae.delegateType:Ae.bindType)||Tt,ke=le[Tt]||[],fe=fe[2]&&new RegExp("(^|\\.)"+_i.join("\\.(?:.*\\.|)")+"(\\.|$)"),V=D=ke.length;D--;)Ze=ke[D],(M||$i===Ze.origType)&&(!w||w.guid===Ze.guid)&&(!fe||fe.test(Ze.namespace))&&(!E||E===Ze.selector||E==="**"&&Ze.selector)&&(ke.splice(D,1),Ze.selector&&ke.delegateCount--,Ae.remove&&Ae.remove.call(o,Ze));V&&!ke.length&&((!Ae.teardown||Ae.teardown.call(o,_i,Ei.handle)===!1)&&S.removeEvent(o,Tt,Ei.handle),delete le[Tt])}S.isEmptyObject(le)&&rt.remove(o,"handle events")}},dispatch:function(o){var d,w,E,M,D,V,fe=new Array(arguments.length),le=S.event.fix(o),Me=(rt.get(this,"events")||Object.create(null))[le.type]||[],Ze=S.event.special[le.type]||{};for(fe[0]=le,d=1;d<arguments.length;d++)fe[d]=arguments[d];if(le.delegateTarget=this,!(Ze.preDispatch&&Ze.preDispatch.call(this,le)===!1)){for(V=S.event.handlers.call(this,le,Me),d=0;(M=V[d++])&&!le.isPropagationStopped();)for(le.currentTarget=M.elem,w=0;(D=M.handlers[w++])&&!le.isImmediatePropagationStopped();)(!le.rnamespace||D.namespace===!1||le.rnamespace.test(D.namespace))&&(le.handleObj=D,le.data=D.data,E=((S.event.special[D.origType]||{}).handle||D.handler).apply(M.elem,fe),E!==void 0&&(le.result=E)===!1&&(le.preventDefault(),le.stopPropagation()));return Ze.postDispatch&&Ze.postDispatch.call(this,le),le.result}},handlers:function(o,d){var w,E,M,D,V,fe=[],le=d.delegateCount,Me=o.target;if(le&&Me.nodeType&&!(o.type==="click"&&o.button>=1)){for(;Me!==this;Me=Me.parentNode||this)if(Me.nodeType===1&&!(o.type==="click"&&Me.disabled===!0)){for(D=[],V={},w=0;w<le;w++)E=d[w],M=E.selector+" ",V[M]===void 0&&(V[M]=E.needsContext?S(M,this).index(Me)>-1:S.find(M,this,null,[Me]).length),V[M]&&D.push(E);D.length&&fe.push({elem:Me,handlers:D})}}return Me=this,le<d.length&&fe.push({elem:Me,handlers:d.slice(le)}),fe},addProp:function(o,d){Object.defineProperty(S.Event.prototype,o,{enumerable:!0,configurable:!0,get:ne(d)?function(){if(this.originalEvent)return d(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[o]},set:function(w){Object.defineProperty(this,o,{enumerable:!0,configurable:!0,writable:!0,value:w})}})},fix:function(o){return o[S.expando]?o:new S.Event(o)},special:{load:{noBubble:!0},click:{setup:function(o){var d=this||o;return qs.test(d.type)&&d.click&&ct(d,"input")&&Ri(d,"click",!0),!1},trigger:function(o){var d=this||o;return qs.test(d.type)&&d.click&&ct(d,"input")&&Ri(d,"click"),!0},_default:function(o){var d=o.target;return qs.test(d.type)&&d.click&&ct(d,"input")&&rt.get(d,"click")||ct(d,"a")}},beforeunload:{postDispatch:function(o){o.result!==void 0&&o.originalEvent&&(o.originalEvent.returnValue=o.result)}}}};function Ri(o,d,w){if(!w){rt.get(o,d)===void 0&&S.event.add(o,d,mn);return}rt.set(o,d,!1),S.event.add(o,d,{namespace:!1,handler:function(E){var M,D=rt.get(this,d);if(E.isTrigger&1&&this[d]){if(D)(S.event.special[d]||{}).delegateType&&E.stopPropagation();else if(D=Z.call(arguments),rt.set(this,d,D),this[d](),M=rt.get(this,d),rt.set(this,d,!1),D!==M)return E.stopImmediatePropagation(),E.preventDefault(),M}else D&&(rt.set(this,d,S.event.trigger(D[0],D.slice(1),this)),E.stopPropagation(),E.isImmediatePropagationStopped=mn)}})}S.removeEvent=function(o,d,w){o.removeEventListener&&o.removeEventListener(d,w)},S.Event=function(o,d){if(!(this instanceof S.Event))return new S.Event(o,d);o&&o.type?(this.originalEvent=o,this.type=o.type,this.isDefaultPrevented=o.defaultPrevented||o.defaultPrevented===void 0&&o.returnValue===!1?mn:mi,this.target=o.target&&o.target.nodeType===3?o.target.parentNode:o.target,this.currentTarget=o.currentTarget,this.relatedTarget=o.relatedTarget):this.type=o,d&&S.extend(this,d),this.timeStamp=o&&o.timeStamp||Date.now(),this[S.expando]=!0},S.Event.prototype={constructor:S.Event,isDefaultPrevented:mi,isPropagationStopped:mi,isImmediatePropagationStopped:mi,isSimulated:!1,preventDefault:function(){var o=this.originalEvent;this.isDefaultPrevented=mn,o&&!this.isSimulated&&o.preventDefault()},stopPropagation:function(){var o=this.originalEvent;this.isPropagationStopped=mn,o&&!this.isSimulated&&o.stopPropagation()},stopImmediatePropagation:function(){var o=this.originalEvent;this.isImmediatePropagationStopped=mn,o&&!this.isSimulated&&o.stopImmediatePropagation(),this.stopPropagation()}},S.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,char:!0,code:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:!0},S.event.addProp),S.each({focus:"focusin",blur:"focusout"},function(o,d){function w(E){if(W.documentMode){var M=rt.get(this,"handle"),D=S.event.fix(E);D.type=E.type==="focusin"?"focus":"blur",D.isSimulated=!0,M(E),D.target===D.currentTarget&&M(D)}else S.event.simulate(d,E.target,S.event.fix(E))}S.event.special[o]={setup:function(){var E;if(Ri(this,o,!0),W.documentMode)E=rt.get(this,d),E||this.addEventListener(d,w),rt.set(this,d,(E||0)+1);else return!1},trigger:function(){return Ri(this,o),!0},teardown:function(){var E;if(W.documentMode)E=rt.get(this,d)-1,E?rt.set(this,d,E):(this.removeEventListener(d,w),rt.remove(this,d));else return!1},_default:function(E){return rt.get(E.target,o)},delegateType:d},S.event.special[d]={setup:function(){var E=this.ownerDocument||this.document||this,M=W.documentMode?this:E,D=rt.get(M,d);D||(W.documentMode?this.addEventListener(d,w):E.addEventListener(o,w,!0)),rt.set(M,d,(D||0)+1)},teardown:function(){var E=this.ownerDocument||this.document||this,M=W.documentMode?this:E,D=rt.get(M,d)-1;D?rt.set(M,d,D):(W.documentMode?this.removeEventListener(d,w):E.removeEventListener(o,w,!0),rt.remove(M,d))}}}),S.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(o,d){S.event.special[o]={delegateType:d,bindType:d,handle:function(w){var E,M=this,D=w.relatedTarget,V=w.handleObj;return(!D||D!==M&&!S.contains(M,D))&&(w.type=V.origType,E=V.handler.apply(this,arguments),w.type=d),E}}}),S.fn.extend({on:function(o,d,w,E){return Js(this,o,d,w,E)},one:function(o,d,w,E){return Js(this,o,d,w,E,1)},off:function(o,d,w){var E,M;if(o&&o.preventDefault&&o.handleObj)return E=o.handleObj,S(o.delegateTarget).off(E.namespace?E.origType+"."+E.namespace:E.origType,E.selector,E.handler),this;if(typeof o=="object"){for(M in o)this.off(M,d,o[M]);return this}return(d===!1||typeof d=="function")&&(w=d,d=void 0),w===!1&&(w=mi),this.each(function(){S.event.remove(this,o,w,d)})}});var Rr=/<script|<style|<link/i,En=/checked\s*(?:[^=]|=\s*.checked.)/i,Mr=/^\s*<!\[CDATA\[|\]\]>\s*$/g;function Ps(o,d){return ct(o,"table")&&ct(d.nodeType!==11?d:d.firstChild,"tr")&&S(o).children("tbody")[0]||o}function br(o){return o.type=(o.getAttribute("type")!==null)+"/"+o.type,o}function qe(o){return(o.type||"").slice(0,5)==="true/"?o.type=o.type.slice(5):o.removeAttribute("type"),o}function bt(o,d){var w,E,M,D,V,fe,le;if(d.nodeType===1){if(rt.hasData(o)&&(D=rt.get(o),le=D.events,le)){rt.remove(d,"handle events");for(M in le)for(w=0,E=le[M].length;w<E;w++)S.event.add(d,M,le[M][w])}zt.hasData(o)&&(V=zt.access(o),fe=S.extend({},V),zt.set(d,fe))}}function Rt(o,d){var w=d.nodeName.toLowerCase();w==="input"&&qs.test(o.type)?d.checked=o.checked:(w==="input"||w==="textarea")&&(d.defaultValue=o.defaultValue)}function Yt(o,d,w,E){d=C(d);var M,D,V,fe,le,Me,Ze=0,Ae=o.length,ke=Ae-1,Tt=d[0],_i=ne(Tt);if(_i||Ae>1&&typeof Tt=="string"&&!q.checkClone&&En.test(Tt))return o.each(function($i){var Ei=o.eq($i);_i&&(d[0]=Tt.call(this,$i,Ei.html())),Yt(Ei,d,w,E)});if(Ae&&(M=Ji(d,o[0].ownerDocument,!1,o,E),D=M.firstChild,M.childNodes.length===1&&(M=D),D||E)){for(V=S.map(Tn(M,"script"),br),fe=V.length;Ze<Ae;Ze++)le=M,Ze!==ke&&(le=S.clone(le,!0,!0),fe&&S.merge(V,Tn(le,"script"))),w.call(o[Ze],le,Ze);if(fe)for(Me=V[V.length-1].ownerDocument,S.map(V,qe),Ze=0;Ze<fe;Ze++)le=V[Ze],Ys.test(le.type||"")&&!rt.access(le,"globalEval")&&S.contains(Me,le)&&(le.src&&(le.type||"").toLowerCase()!=="module"?S._evalUrl&&!le.noModule&&S._evalUrl(le.src,{nonce:le.nonce||le.getAttribute("nonce")},Me):tt(le.textContent.replace(Mr,""),le,Me))}return o}function Ui(o,d,w){for(var E,M=d?S.filter(d,o):o,D=0;(E=M[D])!=null;D++)!w&&E.nodeType===1&&S.cleanData(Tn(E)),E.parentNode&&(w&&Fn(E)&&jn(Tn(E,"script")),E.parentNode.removeChild(E));return o}S.extend({htmlPrefilter:function(o){return o},clone:function(o,d,w){var E,M,D,V,fe=o.cloneNode(!0),le=Fn(o);if(!q.noCloneChecked&&(o.nodeType===1||o.nodeType===11)&&!S.isXMLDoc(o))for(V=Tn(fe),D=Tn(o),E=0,M=D.length;E<M;E++)Rt(D[E],V[E]);if(d)if(w)for(D=D||Tn(o),V=V||Tn(fe),E=0,M=D.length;E<M;E++)bt(D[E],V[E]);else bt(o,fe);return V=Tn(fe,"script"),V.length>0&&jn(V,!le&&Tn(o,"script")),fe},cleanData:function(o){for(var d,w,E,M=S.event.special,D=0;(w=o[D])!==void 0;D++)if(De(w)){if(d=w[rt.expando]){if(d.events)for(E in d.events)M[E]?S.event.remove(w,E):S.removeEvent(w,E,d.handle);w[rt.expando]=void 0}w[zt.expando]&&(w[zt.expando]=void 0)}}}),S.fn.extend({detach:function(o){return Ui(this,o,!0)},remove:function(o){return Ui(this,o)},text:function(o){return p(this,function(d){return d===void 0?S.text(this):this.empty().each(function(){(this.nodeType===1||this.nodeType===11||this.nodeType===9)&&(this.textContent=d)})},null,o,arguments.length)},append:function(){return Yt(this,arguments,function(o){if(this.nodeType===1||this.nodeType===11||this.nodeType===9){var d=Ps(this,o);d.appendChild(o)}})},prepend:function(){return Yt(this,arguments,function(o){if(this.nodeType===1||this.nodeType===11||this.nodeType===9){var d=Ps(this,o);d.insertBefore(o,d.firstChild)}})},before:function(){return Yt(this,arguments,function(o){this.parentNode&&this.parentNode.insertBefore(o,this)})},after:function(){return Yt(this,arguments,function(o){this.parentNode&&this.parentNode.insertBefore(o,this.nextSibling)})},empty:function(){for(var o,d=0;(o=this[d])!=null;d++)o.nodeType===1&&(S.cleanData(Tn(o,!1)),o.textContent="");return this},clone:function(o,d){return o=o??!1,d=d??o,this.map(function(){return S.clone(this,o,d)})},html:function(o){return p(this,function(d){var w=this[0]||{},E=0,M=this.length;if(d===void 0&&w.nodeType===1)return w.innerHTML;if(typeof d=="string"&&!Rr.test(d)&&!On[(As.exec(d)||["",""])[1].toLowerCase()]){d=S.htmlPrefilter(d);try{for(;E<M;E++)w=this[E]||{},w.nodeType===1&&(S.cleanData(Tn(w,!1)),w.innerHTML=d);w=0}catch{}}w&&this.empty().append(d)},null,o,arguments.length)},replaceWith:function(){var o=[];return Yt(this,arguments,function(d){var w=this.parentNode;S.inArray(this,o)<0&&(S.cleanData(Tn(this)),w&&w.replaceChild(d,this))},o)}}),S.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(o,d){S.fn[o]=function(w){for(var E,M=[],D=S(w),V=D.length-1,fe=0;fe<=V;fe++)E=fe===V?this:this.clone(!0),S(D[fe])[d](E),we.apply(M,E.get());return this.pushStack(M)}});var Bi=new RegExp("^("+an+")(?!px)[a-z%]+$","i"),An=/^--/,cn=function(o){var d=o.ownerDocument.defaultView;return(!d||!d.opener)&&(d=g),d.getComputedStyle(o)},pn=function(o,d,w){var E,M,D={};for(M in d)D[M]=o.style[M],o.style[M]=d[M];E=w.call(o);for(M in d)o.style[M]=D[M];return E},Br=new RegExp(ln.join("|"),"i");(function(){function o(){if(Me){le.style.cssText="position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0",Me.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%",Yi.appendChild(le).appendChild(Me);var Ze=g.getComputedStyle(Me);w=Ze.top!=="1%",fe=d(Ze.marginLeft)===12,Me.style.right="60%",D=d(Ze.right)===36,E=d(Ze.width)===36,Me.style.position="absolute",M=d(Me.offsetWidth/3)===12,Yi.removeChild(le),Me=null}}function d(Ze){return Math.round(parseFloat(Ze))}var w,E,M,D,V,fe,le=W.createElement("div"),Me=W.createElement("div");Me.style&&(Me.style.backgroundClip="content-box",Me.cloneNode(!0).style.backgroundClip="",q.clearCloneStyle=Me.style.backgroundClip==="content-box",S.extend(q,{boxSizingReliable:function(){return o(),E},pixelBoxStyles:function(){return o(),D},pixelPosition:function(){return o(),w},reliableMarginLeft:function(){return o(),fe},scrollboxSize:function(){return o(),M},reliableTrDimensions:function(){var Ze,Ae,ke,Tt;return V==null&&(Ze=W.createElement("table"),Ae=W.createElement("tr"),ke=W.createElement("div"),Ze.style.cssText="position:absolute;left:-11111px;border-collapse:separate",Ae.style.cssText="box-sizing:content-box;border:1px solid",Ae.style.height="1px",ke.style.height="9px",ke.style.display="block",Yi.appendChild(Ze).appendChild(Ae).appendChild(ke),Tt=g.getComputedStyle(Ae),V=parseInt(Tt.height,10)+parseInt(Tt.borderTopWidth,10)+parseInt(Tt.borderBottomWidth,10)===Ae.offsetHeight,Yi.removeChild(Ze)),V}}))})();function Cn(o,d,w){var E,M,D,V,fe=An.test(d),le=o.style;return w=w||cn(o),w&&(V=w.getPropertyValue(d)||w[d],fe&&V&&(V=V.replace(k,"$1")||void 0),V===""&&!Fn(o)&&(V=S.style(o,d)),!q.pixelBoxStyles()&&Bi.test(V)&&Br.test(d)&&(E=le.width,M=le.minWidth,D=le.maxWidth,le.minWidth=le.maxWidth=le.width=V,V=w.width,le.width=E,le.minWidth=M,le.maxWidth=D)),V!==void 0?V+"":V}function Rn(o,d){return{get:function(){if(o()){delete this.get;return}return(this.get=d).apply(this,arguments)}}}var ys=["Webkit","Moz","ms"],Cs=W.createElement("div").style,Qr={};function wa(o){for(var d=o[0].toUpperCase()+o.slice(1),w=ys.length;w--;)if(o=ys[w]+d,o in Cs)return o}function _r(o){var d=S.cssProps[o]||Qr[o];return d||(o in Cs?o:Qr[o]=wa(o)||o)}var ks=/^(none|table(?!-c[ea]).+)/,Io={position:"absolute",visibility:"hidden",display:"block"},$r={letterSpacing:"0",fontWeight:"400"};function Zs(o,d,w){var E=bn.exec(d);return E?Math.max(0,E[2]-(w||0))+(E[3]||"px"):d}function Yn(o,d,w,E,M,D){var V=d==="width"?1:0,fe=0,le=0,Me=0;if(w===(E?"border":"content"))return 0;for(;V<4;V+=2)w==="margin"&&(Me+=S.css(o,w+ln[V],!0,M)),E?(w==="content"&&(le-=S.css(o,"padding"+ln[V],!0,M)),w!=="margin"&&(le-=S.css(o,"border"+ln[V]+"Width",!0,M))):(le+=S.css(o,"padding"+ln[V],!0,M),w!=="padding"?le+=S.css(o,"border"+ln[V]+"Width",!0,M):fe+=S.css(o,"border"+ln[V]+"Width",!0,M));return!E&&D>=0&&(le+=Math.max(0,Math.ceil(o["offset"+d[0].toUpperCase()+d.slice(1)]-D-le-fe-.5))||0),le+Me}function mo(o,d,w){var E=cn(o),M=!q.boxSizingReliable()||w,D=M&&S.css(o,"boxSizing",!1,E)==="border-box",V=D,fe=Cn(o,d,E),le="offset"+d[0].toUpperCase()+d.slice(1);if(Bi.test(fe)){if(!w)return fe;fe="auto"}return(!q.boxSizingReliable()&&D||!q.reliableTrDimensions()&&ct(o,"tr")||fe==="auto"||!parseFloat(fe)&&S.css(o,"display",!1,E)==="inline")&&o.getClientRects().length&&(D=S.css(o,"boxSizing",!1,E)==="border-box",V=le in o,V&&(fe=o[le])),fe=parseFloat(fe)||0,fe+Yn(o,d,w||(D?"border":"content"),V,E,fe)+"px"}S.extend({cssHooks:{opacity:{get:function(o,d){if(d){var w=Cn(o,"opacity");return w===""?"1":w}}}},cssNumber:{animationIterationCount:!0,aspectRatio:!0,borderImageSlice:!0,columnCount:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,scale:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeMiterlimit:!0,strokeOpacity:!0},cssProps:{},style:function(o,d,w,E){if(!(!o||o.nodeType===3||o.nodeType===8||!o.style)){var M,D,V,fe=me(d),le=An.test(d),Me=o.style;if(le||(d=_r(fe)),V=S.cssHooks[d]||S.cssHooks[fe],w!==void 0){if(D=typeof w,D==="string"&&(M=bn.exec(w))&&M[1]&&(w=Gs(o,d,M),D="number"),w==null||w!==w)return;D==="number"&&!le&&(w+=M&&M[3]||(S.cssNumber[fe]?"":"px")),!q.clearCloneStyle&&w===""&&d.indexOf("background")===0&&(Me[d]="inherit"),(!V||!("set"in V)||(w=V.set(o,w,E))!==void 0)&&(le?Me.setProperty(d,w):Me[d]=w)}else return V&&"get"in V&&(M=V.get(o,!1,E))!==void 0?M:Me[d]}},css:function(o,d,w,E){var M,D,V,fe=me(d),le=An.test(d);return le||(d=_r(fe)),V=S.cssHooks[d]||S.cssHooks[fe],V&&"get"in V&&(M=V.get(o,!0,w)),M===void 0&&(M=Cn(o,d,E)),M==="normal"&&d in $r&&(M=$r[d]),w===""||w?(D=parseFloat(M),w===!0||isFinite(D)?D||0:M):M}}),S.each(["height","width"],function(o,d){S.cssHooks[d]={get:function(w,E,M){if(E)return ks.test(S.css(w,"display"))&&(!w.getClientRects().length||!w.getBoundingClientRect().width)?pn(w,Io,function(){return mo(w,d,M)}):mo(w,d,M)},set:function(w,E,M){var D,V=cn(w),fe=!q.scrollboxSize()&&V.position==="absolute",le=fe||M,Me=le&&S.css(w,"boxSizing",!1,V)==="border-box",Ze=M?Yn(w,d,M,Me,V):0;return Me&&fe&&(Ze-=Math.ceil(w["offset"+d[0].toUpperCase()+d.slice(1)]-parseFloat(V[d])-Yn(w,d,"border",!1,V)-.5)),Ze&&(D=bn.exec(E))&&(D[3]||"px")!=="px"&&(w.style[d]=E,E=S.css(w,d)),Zs(w,E,Ze)}}}),S.cssHooks.marginLeft=Rn(q.reliableMarginLeft,function(o,d){if(d)return(parseFloat(Cn(o,"marginLeft"))||o.getBoundingClientRect().left-pn(o,{marginLeft:0},function(){return o.getBoundingClientRect().left}))+"px"}),S.each({margin:"",padding:"",border:"Width"},function(o,d){S.cssHooks[o+d]={expand:function(w){for(var E=0,M={},D=typeof w=="string"?w.split(" "):[w];E<4;E++)M[o+ln[E]+d]=D[E]||D[E-2]||D[0];return M}},o!=="margin"&&(S.cssHooks[o+d].set=Zs)}),S.fn.extend({css:function(o,d){return p(this,function(w,E,M){var D,V,fe={},le=0;if(Array.isArray(E)){for(D=cn(w),V=E.length;le<V;le++)fe[E[le]]=S.css(w,E[le],!1,D);return fe}return M!==void 0?S.style(w,E,M):S.css(w,E)},o,d,arguments.length>1)}});function Vn(o,d,w,E,M){return new Vn.prototype.init(o,d,w,E,M)}S.Tween=Vn,Vn.prototype={constructor:Vn,init:function(o,d,w,E,M,D){this.elem=o,this.prop=w,this.easing=M||S.easing._default,this.options=d,this.start=this.now=this.cur(),this.end=E,this.unit=D||(S.cssNumber[w]?"":"px")},cur:function(){var o=Vn.propHooks[this.prop];return o&&o.get?o.get(this):Vn.propHooks._default.get(this)},run:function(o){var d,w=Vn.propHooks[this.prop];return this.options.duration?this.pos=d=S.easing[this.easing](o,this.options.duration*o,0,1,this.options.duration):this.pos=d=o,this.now=(this.end-this.start)*d+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),w&&w.set?w.set(this):Vn.propHooks._default.set(this),this}},Vn.prototype.init.prototype=Vn.prototype,Vn.propHooks={_default:{get:function(o){var d;return o.elem.nodeType!==1||o.elem[o.prop]!=null&&o.elem.style[o.prop]==null?o.elem[o.prop]:(d=S.css(o.elem,o.prop,""),!d||d==="auto"?0:d)},set:function(o){S.fx.step[o.prop]?S.fx.step[o.prop](o):o.elem.nodeType===1&&(S.cssHooks[o.prop]||o.elem.style[_r(o.prop)]!=null)?S.style(o.elem,o.prop,o.now+o.unit):o.elem[o.prop]=o.now}}},Vn.propHooks.scrollTop=Vn.propHooks.scrollLeft={set:function(o){o.elem.nodeType&&o.elem.parentNode&&(o.elem[o.prop]=o.now)}},S.easing={linear:function(o){return o},swing:function(o){return .5-Math.cos(o*Math.PI)/2},_default:"swing"},S.fx=Vn.prototype.init,S.fx.step={};var er,Di,B=/^(?:toggle|show|hide)$/,se=/queueHooks$/;function ue(){Di&&(W.hidden===!1&&g.requestAnimationFrame?g.requestAnimationFrame(ue):g.setTimeout(ue,S.fx.interval),S.fx.tick())}function Je(){return g.setTimeout(function(){er=void 0}),er=Date.now()}function Qe(o,d){var w,E=0,M={height:o};for(d=d?1:0;E<4;E+=2-d)w=ln[E],M["margin"+w]=M["padding"+w]=o;return d&&(M.opacity=M.width=o),M}function Ft(o,d,w){for(var E,M=(ri.tweeners[d]||[]).concat(ri.tweeners["*"]),D=0,V=M.length;D<V;D++)if(E=M[D].call(w,d,o))return E}function Gt(o,d,w){var E,M,D,V,fe,le,Me,Ze,Ae="width"in d||"height"in d,ke=this,Tt={},_i=o.style,$i=o.nodeType&&Ln(o),Ei=rt.get(o,"fxshow");w.queue||(V=S._queueHooks(o,"fx"),V.unqueued==null&&(V.unqueued=0,fe=V.empty.fire,V.empty.fire=function(){V.unqueued||fe()}),V.unqueued++,ke.always(function(){ke.always(function(){V.unqueued--,S.queue(o,"fx").length||V.empty.fire()})}));for(E in d)if(M=d[E],B.test(M)){if(delete d[E],D=D||M==="toggle",M===($i?"hide":"show"))if(M==="show"&&Ei&&Ei[E]!==void 0)$i=!0;else continue;Tt[E]=Ei&&Ei[E]||S.style(o,E)}if(le=!S.isEmptyObject(d),!(!le&&S.isEmptyObject(Tt))){Ae&&o.nodeType===1&&(w.overflow=[_i.overflow,_i.overflowX,_i.overflowY],Me=Ei&&Ei.display,Me==null&&(Me=rt.get(o,"display")),Ze=S.css(o,"display"),Ze==="none"&&(Me?Ze=Me:(Es([o],!0),Me=o.style.display||Me,Ze=S.css(o,"display"),Es([o]))),(Ze==="inline"||Ze==="inline-block"&&Me!=null)&&S.css(o,"float")==="none"&&(le||(ke.done(function(){_i.display=Me}),Me==null&&(Ze=_i.display,Me=Ze==="none"?"":Ze)),_i.display="inline-block")),w.overflow&&(_i.overflow="hidden",ke.always(function(){_i.overflow=w.overflow[0],_i.overflowX=w.overflow[1],_i.overflowY=w.overflow[2]})),le=!1;for(E in Tt)le||(Ei?"hidden"in Ei&&($i=Ei.hidden):Ei=rt.access(o,"fxshow",{display:Me}),D&&(Ei.hidden=!$i),$i&&Es([o],!0),ke.done(function(){$i||Es([o]),rt.remove(o,"fxshow");for(E in Tt)S.style(o,E,Tt[E])})),le=Ft($i?Ei[E]:0,E,ke),E in Ei||(Ei[E]=le.start,$i&&(le.end=le.start,le.start=0))}}function Jt(o,d){var w,E,M,D,V;for(w in o)if(E=me(w),M=d[E],D=o[w],Array.isArray(D)&&(M=D[1],D=o[w]=D[0]),w!==E&&(o[E]=D,delete o[w]),V=S.cssHooks[E],V&&"expand"in V){D=V.expand(D),delete o[E];for(w in D)w in o||(o[w]=D[w],d[w]=M)}else d[E]=M}function ri(o,d,w){var E,M,D=0,V=ri.prefilters.length,fe=S.Deferred().always(function(){delete le.elem}),le=function(){if(M)return!1;for(var Ae=er||Je(),ke=Math.max(0,Me.startTime+Me.duration-Ae),Tt=ke/Me.duration||0,_i=1-Tt,$i=0,Ei=Me.tweens.length;$i<Ei;$i++)Me.tweens[$i].run(_i);return fe.notifyWith(o,[Me,_i,ke]),_i<1&&Ei?ke:(Ei||fe.notifyWith(o,[Me,1,0]),fe.resolveWith(o,[Me]),!1)},Me=fe.promise({elem:o,props:S.extend({},d),opts:S.extend(!0,{specialEasing:{},easing:S.easing._default},w),originalProperties:d,originalOptions:w,startTime:er||Je(),duration:w.duration,tweens:[],createTween:function(Ae,ke){var Tt=S.Tween(o,Me.opts,Ae,ke,Me.opts.specialEasing[Ae]||Me.opts.easing);return Me.tweens.push(Tt),Tt},stop:function(Ae){var ke=0,Tt=Ae?Me.tweens.length:0;if(M)return this;for(M=!0;ke<Tt;ke++)Me.tweens[ke].run(1);return Ae?(fe.notifyWith(o,[Me,1,0]),fe.resolveWith(o,[Me,Ae])):fe.rejectWith(o,[Me,Ae]),this}}),Ze=Me.props;for(Jt(Ze,Me.opts.specialEasing);D<V;D++)if(E=ri.prefilters[D].call(Me,o,Ze,Me.opts),E)return ne(E.stop)&&(S._queueHooks(Me.elem,Me.opts.queue).stop=E.stop.bind(E)),E;return S.map(Ze,Ft,Me),ne(Me.opts.start)&&Me.opts.start.call(o,Me),Me.progress(Me.opts.progress).done(Me.opts.done,Me.opts.complete).fail(Me.opts.fail).always(Me.opts.always),S.fx.timer(S.extend(le,{elem:o,anim:Me,queue:Me.opts.queue})),Me}S.Animation=S.extend(ri,{tweeners:{"*":[function(o,d){var w=this.createTween(o,d);return Gs(w.elem,o,bn.exec(d),w),w}]},tweener:function(o,d){ne(o)?(d=o,o=["*"]):o=o.match(yt);for(var w,E=0,M=o.length;E<M;E++)w=o[E],ri.tweeners[w]=ri.tweeners[w]||[],ri.tweeners[w].unshift(d)},prefilters:[Gt],prefilter:function(o,d){d?ri.prefilters.unshift(o):ri.prefilters.push(o)}}),S.speed=function(o,d,w){var E=o&&typeof o=="object"?S.extend({},o):{complete:w||!w&&d||ne(o)&&o,duration:o,easing:w&&d||d&&!ne(d)&&d};return S.fx.off?E.duration=0:typeof E.duration!="number"&&(E.duration in S.fx.speeds?E.duration=S.fx.speeds[E.duration]:E.duration=S.fx.speeds._default),(E.queue==null||E.queue===!0)&&(E.queue="fx"),E.old=E.complete,E.complete=function(){ne(E.old)&&E.old.call(this),E.queue&&S.dequeue(this,E.queue)},E},S.fn.extend({fadeTo:function(o,d,w,E){return this.filter(Ln).css("opacity",0).show().end().animate({opacity:d},o,w,E)},animate:function(o,d,w,E){var M=S.isEmptyObject(o),D=S.speed(d,w,E),V=function(){var fe=ri(this,S.extend({},o),D);(M||rt.get(this,"finish"))&&fe.stop(!0)};return V.finish=V,M||D.queue===!1?this.each(V):this.queue(D.queue,V)},stop:function(o,d,w){var E=function(M){var D=M.stop;delete M.stop,D(w)};return typeof o!="string"&&(w=d,d=o,o=void 0),d&&this.queue(o||"fx",[]),this.each(function(){var M=!0,D=o!=null&&o+"queueHooks",V=S.timers,fe=rt.get(this);if(D)fe[D]&&fe[D].stop&&E(fe[D]);else for(D in fe)fe[D]&&fe[D].stop&&se.test(D)&&E(fe[D]);for(D=V.length;D--;)V[D].elem===this&&(o==null||V[D].queue===o)&&(V[D].anim.stop(w),M=!1,V.splice(D,1));(M||!w)&&S.dequeue(this,o)})},finish:function(o){return o!==!1&&(o=o||"fx"),this.each(function(){var d,w=rt.get(this),E=w[o+"queue"],M=w[o+"queueHooks"],D=S.timers,V=E?E.length:0;for(w.finish=!0,S.queue(this,o,[]),M&&M.stop&&M.stop.call(this,!0),d=D.length;d--;)D[d].elem===this&&D[d].queue===o&&(D[d].anim.stop(!0),D.splice(d,1));for(d=0;d<V;d++)E[d]&&E[d].finish&&E[d].finish.call(this);delete w.finish})}}),S.each(["toggle","show","hide"],function(o,d){var w=S.fn[d];S.fn[d]=function(E,M,D){return E==null||typeof E=="boolean"?w.apply(this,arguments):this.animate(Qe(d,!0),E,M,D)}}),S.each({slideDown:Qe("show"),slideUp:Qe("hide"),slideToggle:Qe("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(o,d){S.fn[o]=function(w,E,M){return this.animate(d,w,E,M)}}),S.timers=[],S.fx.tick=function(){var o,d=0,w=S.timers;for(er=Date.now();d<w.length;d++)o=w[d],!o()&&w[d]===o&&w.splice(d--,1);w.length||S.fx.stop(),er=void 0},S.fx.timer=function(o){S.timers.push(o),S.fx.start()},S.fx.interval=13,S.fx.start=function(){Di||(Di=!0,ue())},S.fx.stop=function(){Di=null},S.fx.speeds={slow:600,fast:200,_default:400},S.fn.delay=function(o,d){return o=S.fx&&S.fx.speeds[o]||o,d=d||"fx",this.queue(d,function(w,E){var M=g.setTimeout(w,o);E.stop=function(){g.clearTimeout(M)}})},function(){var o=W.createElement("input"),d=W.createElement("select"),w=d.appendChild(W.createElement("option"));o.type="checkbox",q.checkOn=o.value!=="",q.optSelected=w.selected,o=W.createElement("input"),o.value="t",o.type="radio",q.radioValue=o.value==="t"}();var Ai,Ki=S.expr.attrHandle;S.fn.extend({attr:function(o,d){return p(this,S.attr,o,d,arguments.length>1)},removeAttr:function(o){return this.each(function(){S.removeAttr(this,o)})}}),S.extend({attr:function(o,d,w){var E,M,D=o.nodeType;if(!(D===3||D===8||D===2)){if(typeof o.getAttribute>"u")return S.prop(o,d,w);if((D!==1||!S.isXMLDoc(o))&&(M=S.attrHooks[d.toLowerCase()]||(S.expr.match.bool.test(d)?Ai:void 0)),w!==void 0){if(w===null){S.removeAttr(o,d);return}return M&&"set"in M&&(E=M.set(o,w,d))!==void 0?E:(o.setAttribute(d,w+""),w)}return M&&"get"in M&&(E=M.get(o,d))!==null?E:(E=S.find.attr(o,d),E??void 0)}},attrHooks:{type:{set:function(o,d){if(!q.radioValue&&d==="radio"&&ct(o,"input")){var w=o.value;return o.setAttribute("type",d),w&&(o.value=w),d}}}},removeAttr:function(o,d){var w,E=0,M=d&&d.match(yt);if(M&&o.nodeType===1)for(;w=M[E++];)o.removeAttribute(w)}}),Ai={set:function(o,d,w){return d===!1?S.removeAttr(o,w):o.setAttribute(w,w),w}},S.each(S.expr.match.bool.source.match(/\w+/g),function(o,d){var w=Ki[d]||S.find.attr;Ki[d]=function(E,M,D){var V,fe,le=M.toLowerCase();return D||(fe=Ki[le],Ki[le]=V,V=w(E,M,D)!=null?le:null,Ki[le]=fe),V}});var Ci=/^(?:input|select|textarea|button)$/i,gn=/^(?:a|area)$/i;S.fn.extend({prop:function(o,d){return p(this,S.prop,o,d,arguments.length>1)},removeProp:function(o){return this.each(function(){delete this[S.propFix[o]||o]})}}),S.extend({prop:function(o,d,w){var E,M,D=o.nodeType;if(!(D===3||D===8||D===2))return(D!==1||!S.isXMLDoc(o))&&(d=S.propFix[d]||d,M=S.propHooks[d]),w!==void 0?M&&"set"in M&&(E=M.set(o,w,d))!==void 0?E:o[d]=w:M&&"get"in M&&(E=M.get(o,d))!==null?E:o[d]},propHooks:{tabIndex:{get:function(o){var d=S.find.attr(o,"tabindex");return d?parseInt(d,10):Ci.test(o.nodeName)||gn.test(o.nodeName)&&o.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),q.optSelected||(S.propHooks.selected={get:function(o){var d=o.parentNode;return d&&d.parentNode&&d.parentNode.selectedIndex,null},set:function(o){var d=o.parentNode;d&&(d.selectedIndex,d.parentNode&&d.parentNode.selectedIndex)}}),S.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){S.propFix[this.toLowerCase()]=this});function Wn(o){var d=o.match(yt)||[];return d.join(" ")}function Ts(o){return o.getAttribute&&o.getAttribute("class")||""}function yr(o){return Array.isArray(o)?o:typeof o=="string"?o.match(yt)||[]:[]}S.fn.extend({addClass:function(o){var d,w,E,M,D,V;return ne(o)?this.each(function(fe){S(this).addClass(o.call(this,fe,Ts(this)))}):(d=yr(o),d.length?this.each(function(){if(E=Ts(this),w=this.nodeType===1&&" "+Wn(E)+" ",w){for(D=0;D<d.length;D++)M=d[D],w.indexOf(" "+M+" ")<0&&(w+=M+" ");V=Wn(w),E!==V&&this.setAttribute("class",V)}}):this)},removeClass:function(o){var d,w,E,M,D,V;return ne(o)?this.each(function(fe){S(this).removeClass(o.call(this,fe,Ts(this)))}):arguments.length?(d=yr(o),d.length?this.each(function(){if(E=Ts(this),w=this.nodeType===1&&" "+Wn(E)+" ",w){for(D=0;D<d.length;D++)for(M=d[D];w.indexOf(" "+M+" ")>-1;)w=w.replace(" "+M+" "," ");V=Wn(w),E!==V&&this.setAttribute("class",V)}}):this):this.attr("class","")},toggleClass:function(o,d){var w,E,M,D,V=typeof o,fe=V==="string"||Array.isArray(o);return ne(o)?this.each(function(le){S(this).toggleClass(o.call(this,le,Ts(this),d),d)}):typeof d=="boolean"&&fe?d?this.addClass(o):this.removeClass(o):(w=yr(o),this.each(function(){if(fe)for(D=S(this),M=0;M<w.length;M++)E=w[M],D.hasClass(E)?D.removeClass(E):D.addClass(E);else(o===void 0||V==="boolean")&&(E=Ts(this),E&&rt.set(this,"__className__",E),this.setAttribute&&this.setAttribute("class",E||o===!1?"":rt.get(this,"__className__")||""))}))},hasClass:function(o){var d,w,E=0;for(d=" "+o+" ";w=this[E++];)if(w.nodeType===1&&(" "+Wn(Ts(w))+" ").indexOf(d)>-1)return!0;return!1}});var tr=/\r/g;S.fn.extend({val:function(o){var d,w,E,M=this[0];return arguments.length?(E=ne(o),this.each(function(D){var V;this.nodeType===1&&(E?V=o.call(this,D,S(this).val()):V=o,V==null?V="":typeof V=="number"?V+="":Array.isArray(V)&&(V=S.map(V,function(fe){return fe==null?"":fe+""})),d=S.valHooks[this.type]||S.valHooks[this.nodeName.toLowerCase()],(!d||!("set"in d)||d.set(this,V,"value")===void 0)&&(this.value=V))})):M?(d=S.valHooks[M.type]||S.valHooks[M.nodeName.toLowerCase()],d&&"get"in d&&(w=d.get(M,"value"))!==void 0?w:(w=M.value,typeof w=="string"?w.replace(tr,""):w??"")):void 0}}),S.extend({valHooks:{option:{get:function(o){var d=S.find.attr(o,"value");return d??Wn(S.text(o))}},select:{get:function(o){var d,w,E,M=o.options,D=o.selectedIndex,V=o.type==="select-one",fe=V?null:[],le=V?D+1:M.length;for(D<0?E=le:E=V?D:0;E<le;E++)if(w=M[E],(w.selected||E===D)&&!w.disabled&&(!w.parentNode.disabled||!ct(w.parentNode,"optgroup"))){if(d=S(w).val(),V)return d;fe.push(d)}return fe},set:function(o,d){for(var w,E,M=o.options,D=S.makeArray(d),V=M.length;V--;)E=M[V],(E.selected=S.inArray(S.valHooks.option.get(E),D)>-1)&&(w=!0);return w||(o.selectedIndex=-1),D}}}}),S.each(["radio","checkbox"],function(){S.valHooks[this]={set:function(o,d){if(Array.isArray(d))return o.checked=S.inArray(S(o).val(),d)>-1}},q.checkOn||(S.valHooks[this].get=function(o){return o.getAttribute("value")===null?"on":o.value})});var ir=g.location,nr={guid:Date.now()},Ls=/\?/;S.parseXML=function(o){var d,w;if(!o||typeof o!="string")return null;try{d=new g.DOMParser().parseFromString(o,"text/xml")}catch{}return w=d&&d.getElementsByTagName("parsererror")[0],(!d||w)&&S.error("Invalid XML: "+(w?S.map(w.childNodes,function(E){return E.textContent}).join(`
DesignScreenshot/output/git.buildapp.eu.org_run/git.buildapp.eu.org_3_credentials_filled.html:233:(`+Be+": "+Ue+")",Z.name="ChunkLoadError",Z.type=Be,Z.request=Ue,O[1](Z)}};__webpack_require__.l(J,C,"chunk-"+_,_)}};var v=function(_,g){var O=g[0],R=g[1],J=g[2],Z,C,we=0;if(O.some(function(Ue){return r[Ue]!==0})){for(Z in R)__webpack_require__.o(R,Z)&&(__webpack_require__.m[Z]=R[Z]);if(J)var Be=J(__webpack_require__)}for(_&&_(g);we<O.length;we++)C=O[we],__webpack_require__.o(r,C)&&r[C]&&r[C][0](),r[C]=0},b=self.webpackChunk=self.webpackChunk||[];b.forEach(v.bind(null,0)),b.push=v.bind(null,b.push.bind(b))}();var __webpack_exports__={};(function(){"use strict";var r=__webpack_require__("./node_modules/jquery/dist/jquery.js"),v=__webpack_require__.n(r),b=__webpack_require__("./node_modules/htmx.org/dist/htmx.esm.js");window.$=window.jQuery=v(),window.htmx=b.A})(),function(){"use strict";(function(r,v,b,_){"use strict";r.isWindow=r.isWindow||function(g){return g!=null&&g===g.window},v=typeof v<"u"&&v.Math==Math?v:typeof self<"u"&&self.Math==Math?self:Function("return this")(),r.api=r.fn.api=function(g){var O=r.isFunction(this)?r(v):r(this),R=O.selector||"",J=new Date().getTime(),Z=[],C=arguments[0],we=typeof C=="string",Be=[].slice.call(arguments,1),Ue;return O.each(function(){var Q=r.isPlainObject(g)?r.extend(!0,{},r.fn.api.settings,g):r.extend({},r.fn.api.settings),Ke=Q.namespace,At=Q.metadata,gt=Q.selector,q=Q.error,ne=Q.className,c="."+Ke,W="module-"+Ke,Re=r(this),tt=Re.closest(gt.form),st=Q.stateContext?r(Q.stateContext):Re,et,je,S,si,ct,xt=this,ce=st[0],G=Re.data(W),P;P={initialize:function(){we||P.bind.events(),P.instantiate()},instantiate:function(){P.verbose("Storing instance of module",P),G=P,Re.data(W,G)},destroy:function(){P.verbose("Destroying previous module for",xt),Re.removeData(W).off(c)},bind:{events:function(){var k=P.get.event();k?(P.verbose("Attaching API events to element",k),Re.on(k+c,P.event.trigger)):Q.on=="now"&&(P.debug("Querying API endpoint immediately"),P.query())}},decode:{json:function(k){if(k!==_&&typeof k=="string")try{k=JSON.parse(k)}catch{}return k}},read:{cachedResponse:function(k){var N;if(v.Storage===_){P.error(q.noStorage);return}return N=sessionStorage.getItem(k),P.debug("Using cached response",k,N),N=P.decode.json(N),N}},write:{cachedResponse:function(k,N){if(N&&N===""){P.debug("Response empty, not caching",N);return}if(v.Storage===_){P.error(q.noStorage);return}r.isPlainObject(N)&&(N=JSON.stringify(N)),sessionStorage.setItem(k,N),P.verbose("Storing cached response for url",k,N)}},query:function(){if(P.is.disabled()){P.debug("Element is disabled API request aborted");return}if(P.is.loading())if(Q.interruptRequests)P.debug("Interrupting previous request"),P.abort();else{P.debug("Cancelling request, previous request is still pending");return}if(Q.defaultData&&r.extend(!0,Q.urlData,P.get.defaultData()),Q.serializeForm&&(Q.data=P.add.formData(Q.data)),je=P.get.settings(),je===!1){P.cancelled=!0,P.error(q.beforeSend);return}else P.cancelled=!1;if(S=P.get.templatedURL(),!S&&!P.is.mocked()){P.error(q.missingURL);return}if(S=P.add.urlData(S),!(!S&&!P.is.mocked())){if(je.url=Q.base+S,et=r.extend(!0,{},Q,{type:Q.method||Q.type,data:si,url:Q.base+S,beforeSend:Q.beforeXHR,success:function(){},failure:function(){},complete:function(){}}),P.debug("Querying URL",et.url),P.verbose("Using AJAX settings",et),Q.cache==="local"&&P.read.cachedResponse(S)){P.debug("Response returned from local cache"),P.request=P.create.request(),P.request.resolveWith(ce,[P.read.cachedResponse(S)]);return}Q.throttle?!Q.throttleFirstRequest&&!P.timer?(P.debug("Sending request",si,et.method),P.send.request(),P.timer=setTimeout(function(){},Q.throttle)):(P.debug("Throttling request",Q.throttle),clearTimeout(P.timer),P.timer=setTimeout(function(){P.timer&&delete P.timer,P.debug("Sending throttled request",si,et.method),P.send.request()},Q.throttle)):(P.debug("Sending request",si,et.method),P.send.request())}},should:{removeError:function(){return Q.hideError===!0||Q.hideError==="auto"&&!P.is.form()}},is:{disabled:function(){return Re.filter(gt.disabled).length>0},expectingJSON:function(){return Q.dataType==="json"||Q.dataType==="jsonp"},form:function(){return Re.is("form")||st.is("form")},mocked:function(){return Q.mockResponse||Q.mockResponseAsync||Q.response||Q.responseAsync},input:function(){return Re.is("input")},loading:function(){return P.request?P.request.state()=="pending":!1},abortedRequest:function(k){return k&&k.readyState!==_&&k.readyState===0?(P.verbose("XHR request determined to be aborted"),!0):(P.verbose("XHR request was not aborted"),!1)},validResponse:function(k){return!P.is.expectingJSON()||!r.isFunction(Q.successTest)?(P.verbose("Response is not JSON, skipping validation",Q.successTest,k),!0):(P.debug("Checking JSON returned success",Q.successTest,k),Q.successTest(k)?(P.debug("Response passed success test",k),!0):(P.debug("Response failed success test",k),!1))}},was:{cancelled:function(){return P.cancelled||!1},succesful:function(){return P.verbose('This behavior will be deleted due to typo. Use "was successful" instead.'),P.was.successful()},successful:function(){return P.request&&P.request.state()=="resolved"},failure:function(){return P.request&&P.request.state()=="rejected"},complete:function(){return P.request&&(P.request.state()=="resolved"||P.request.state()=="rejected")}},add:{urlData:function(k,N){var Y,ve;return k&&(Y=k.match(Q.regExp.required),ve=k.match(Q.regExp.optional),N=N||Q.urlData,Y&&(P.debug("Looking for required URL variables",Y),r.each(Y,function(Oe,Ne){var Ve=Ne.indexOf("$")!==-1?Ne.substr(2,Ne.length-3):Ne.substr(1,Ne.length-2),Ye=r.isPlainObject(N)&&N[Ve]!==_?N[Ve]:Re.data(Ve)!==_?Re.data(Ve):st.data(Ve)!==_?st.data(Ve):N[Ve];if(Ye===_)return P.error(q.requiredParameter,Ve,k),k=!1,!1;P.verbose("Found required variable",Ve,Ye),Ye=Q.encodeParameters?P.get.urlEncodedValue(Ye):Ye,k=k.replace(Ne,Ye)})),ve&&(P.debug("Looking for optional URL variables",Y),r.each(ve,function(Oe,Ne){var Ve=Ne.indexOf("$")!==-1?Ne.substr(3,Ne.length-4):Ne.substr(2,Ne.length-3),Ye=r.isPlainObject(N)&&N[Ve]!==_?N[Ve]:Re.data(Ve)!==_?Re.data(Ve):st.data(Ve)!==_?st.data(Ve):N[Ve];Ye!==_?(P.verbose("Optional variable Found",Ve,Ye),k=k.replace(Ne,Ye)):(P.verbose("Optional variable not found",Ve),k.indexOf("/"+Ne)!==-1?k=k.replace("/"+Ne,""):k=k.replace(Ne,""))}))),k},formData:function(k){var N=r.fn.serializeObject!==_,Y=N?tt.serializeObject():tt.serialize(),ve;return k=k||Q.data,ve=r.isPlainObject(k),ve?N?(P.debug("Extending existing data with form data",k,Y),k=r.extend(!0,{},k,Y)):(P.error(q.missingSerialize),P.debug("Cant extend data. Replacing data with form data",k,Y),k=Y):(P.debug("Adding form data",Y),k=Y),k}},send:{request:function(){P.set.loading(),P.request=P.create.request(),P.is.mocked()?P.mockedXHR=P.create.mockedXHR():P.xhr=P.create.xhr(),Q.onRequest.call(ce,P.request,P.xhr)}},event:{trigger:function(k){P.query(),(k.type=="submit"||k.type=="click")&&k.preventDefault()},xhr:{always:function(){},done:function(k,N,Y){var ve=this,Oe=new Date().getTime()-ct,Ne=Q.loadingDuration-Oe,Ve=r.isFunction(Q.onResponse)?P.is.expectingJSON()&&!Q.rawResponse?Q.onResponse.call(ve,r.extend(!0,{},k)):Q.onResponse.call(ve,k):!1;Ne=Ne>0?Ne:0,Ve&&(P.debug("Modified API response in onResponse callback",Q.onResponse,Ve,k),k=Ve),Ne>0&&P.debug("Response completed early delaying state change by",Ne),setTimeout(function(){P.is.validResponse(k)?P.request.resolveWith(ve,[k,Y]):P.request.rejectWith(ve,[Y,"invalid"])},Ne)},fail:function(k,N,Y){var ve=this,Oe=new Date().getTime()-ct,Ne=Q.loadingDuration-Oe;Ne=Ne>0?Ne:0,Ne>0&&P.debug("Response completed early delaying state change by",Ne),setTimeout(function(){P.is.abortedRequest(k)?P.request.rejectWith(ve,[k,"aborted",Y]):P.request.rejectWith(ve,[k,"error",N,Y])},Ne)}},request:{done:function(k,N){P.debug("Successful API Response",k),Q.cache==="local"&&S&&(P.write.cachedResponse(S,k),P.debug("Saving server response locally",P.cache)),Q.onSuccess.call(ce,k,Re,N)},complete:function(k,N){var Y,ve;P.was.successful()?(ve=k,Y=N):(Y=k,ve=P.get.responseFromXHR(Y)),P.remove.loading(),Q.onComplete.call(ce,ve,Re,Y)},fail:function(k,N,Y){var ve=P.get.responseFromXHR(k),Oe=P.get.errorFromRequest(ve,N,Y);if(N=="aborted")return P.debug("XHR Aborted (Most likely caused by page navigation or CORS Policy)",N,Y),Q.onAbort.call(ce,N,Re,k),!0;N=="invalid"?P.debug("JSON did not pass success test. A server-side error has most likely occurred",ve):N=="error"&&k!==_&&(P.debug("XHR produced a server error",N,Y),(k.status<200||k.status>=300)&&Y!==_&&Y!==""&&P.error(q.statusMessage+Y,et.url),Q.onError.call(ce,Oe,Re,k)),Q.errorDuration&&N!=="aborted"&&(P.debug("Adding error state"),P.set.error(),P.should.removeError()&&setTimeout(P.remove.error,Q.errorDuration)),P.debug("API Request failed",Oe,k),Q.onFailure.call(ce,ve,Re,k)}}},create:{request:function(){return r.Deferred().always(P.event.request.complete).done(P.event.request.done).fail(P.event.request.fail)},mockedXHR:function(){var k=!1,N=!1,Y=!1,ve=Q.mockResponse||Q.response,Oe=Q.mockResponseAsync||Q.responseAsync,Ne,Ve,Ye;return Ye=r.Deferred().always(P.event.xhr.complete).done(P.event.xhr.done).fail(P.event.xhr.fail),ve?(r.isFunction(ve)?(P.debug("Using specified synchronous callback",ve),Ve=ve.call(ce,je)):(P.debug("Using settings specified response",ve),Ve=ve),Ye.resolveWith(ce,[Ve,k,{responseText:Ve}])):r.isFunction(Oe)&&(Ne=function(Lt){P.debug("Async callback returned response",Lt),Lt?Ye.resolveWith(ce,[Lt,k,{responseText:Lt}]):Ye.rejectWith(ce,[{responseText:Lt},N,Y])},P.debug("Using specified async response callback",Oe),Oe.call(ce,je,Ne)),Ye},xhr:function(){var k;return k=r.ajax(et).always(P.event.xhr.always).done(P.event.xhr.done).fail(P.event.xhr.fail),P.verbose("Created server request",k,et),k}},set:{error:function(){P.verbose("Adding error state to element",st),st.addClass(ne.error)},loading:function(){P.verbose("Adding loading state to element",st),st.addClass(ne.loading),ct=new Date().getTime()}},remove:{error:function(){P.verbose("Removing error state from element",st),st.removeClass(ne.error)},loading:function(){P.verbose("Removing loading state from element",st),st.removeClass(ne.loading)}},get:{responseFromXHR:function(k){return r.isPlainObject(k)?P.is.expectingJSON()?P.decode.json(k.responseText):k.responseText:!1},errorFromRequest:function(k,N,Y){return r.isPlainObject(k)&&k.error!==_?k.error:Q.error[N]!==_?Q.error[N]:Y},request:function(){return P.request||!1},xhr:function(){return P.xhr||!1},settings:function(){var k;return k=Q.beforeSend.call(Re,Q),k&&(k.success!==_&&(P.debug("Legacy success callback detected",k),P.error(q.legacyParameters,k.success),k.onSuccess=k.success),k.failure!==_&&(P.debug("Legacy failure callback detected",k),P.error(q.legacyParameters,k.failure),k.onFailure=k.failure),k.complete!==_&&(P.debug("Legacy complete callback detected",k),P.error(q.legacyParameters,k.complete),k.onComplete=k.complete)),k===_&&P.error(q.noReturnedValue),k===!1?k:k!==_?r.extend(!0,{},k):r.extend(!0,{},Q)},urlEncodedValue:function(k){return v.encodeURIComponent(k)},defaultData:function(){var k={};return r.isWindow(xt)||(P.is.input()?k.value=Re.val():P.is.form()||(k.text=Re.text())),k},event:function(){return r.isWindow(xt)||Q.on=="now"?(P.debug("API called without element, no events attached"),!1):Q.on=="auto"?Re.is("input")?xt.oninput!==_?"input":xt.onpropertychange!==_?"propertychange":"keyup":Re.is("form")?"submit":"click":Q.on},templatedURL:function(k){if(k=k||Re.data(At.action)||Q.action||!1,S=Re.data(At.url)||Q.url||!1,S)return P.debug("Using specified url",S),S;if(k){if(P.debug("Looking up url for action",k,Q.api),Q.api[k]===_&&!P.is.mocked()){P.error(q.missingAction,Q.action,Q.api);return}S=Q.api[k]}else P.is.form()&&(S=Re.attr("action")||st.attr("action")||!1,P.debug("No url or action specified, defaulting to form action",S));return S}},abort:function(){var k=P.get.xhr();k&&k.state()!=="resolved"&&(P.debug("Cancelling API request"),k.abort())},reset:function(){P.remove.error(),P.remove.loading()},setting:function(k,N){if(P.debug("Changing setting",k,N),r.isPlainObject(k))r.extend(!0,Q,k);else if(N!==_)r.isPlainObject(Q[k])?r.extend(!0,Q[k],N):Q[k]=N;else return Q[k]},internal:function(k,N){if(r.isPlainObject(k))r.extend(!0,P,k);else if(N!==_)P[k]=N;else return P[k]},debug:function(){!Q.silent&&Q.debug&&(Q.performance?P.performance.log(arguments):(P.debug=Function.prototype.bind.call(console.info,console,Q.name+":"),P.debug.apply(console,arguments)))},verbose:function(){!Q.silent&&Q.verbose&&Q.debug&&(Q.performance?P.performance.log(arguments):(P.verbose=Function.prototype.bind.call(console.info,console,Q.name+":"),P.verbose.apply(console,arguments)))},error:function(){Q.silent||(P.error=Function.prototype.bind.call(console.error,console,Q.name+":"),P.error.apply(console,arguments))},performance:{log:function(k){var N,Y,ve;Q.performance&&(N=new Date().getTime(),ve=J||N,Y=N-ve,J=N,Z.push({Name:k[0],Arguments:[].slice.call(k,1)||"","Execution Time":Y})),clearTimeout(P.performance.timer),P.performance.timer=setTimeout(P.performance.display,500)},display:function(){var k=Q.name+":",N=0;J=!1,clearTimeout(P.performance.timer),r.each(Z,function(Y,ve){N+=ve["Execution Time"]}),k+=" "+N+"ms",R&&(k+=" '"+R+"'"),(console.group!==_||console.table!==_)&&Z.length>0&&(console.groupCollapsed(k),console.table?console.table(Z):r.each(Z,function(Y,ve){console.log(ve.Name+": "+ve["Execution Time"]+"ms")}),console.groupEnd()),Z=[]}},invoke:function(k,N,Y){var ve=G,Oe,Ne,Ve;return N=N||Be,Y=xt||Y,typeof k=="string"&&ve!==_&&(k=k.split(/[\. ]/),Oe=k.length-1,r.each(k,function(Ye,Lt){var K=Ye!=Oe?Lt+k[Ye+1].charAt(0).toUpperCase()+k[Ye+1].slice(1):k;if(r.isPlainObject(ve[K])&&Ye!=Oe)ve=ve[K];else{if(ve[K]!==_)return Ne=ve[K],!1;if(r.isPlainObject(ve[Lt])&&Ye!=Oe)ve=ve[Lt];else return ve[Lt]!==_?(Ne=ve[Lt],!1):(P.error(q.method,k),!1)}})),r.isFunction(Ne)?Ve=Ne.apply(Y,N):Ne!==_&&(Ve=Ne),Array.isArray(Ue)?Ue.push(Ve):Ue!==_?Ue=[Ue,Ve]:Ve!==_&&(Ue=Ve),Ne}},we?(G===_&&P.initialize(),P.invoke(C)):(G!==_&&G.invoke("destroy"),P.initialize())}),Ue!==_?Ue:this},r.api.settings={name:"API",namespace:"api",debug:!1,verbose:!1,performance:!0,api:{},cache:!0,interruptRequests:!0,on:"auto",stateContext:!1,loadingDuration:0,hideError:"auto",errorDuration:2e3,encodeParameters:!0,action:!1,url:!1,base:"",urlData:{},defaultData:!0,serializeForm:!1,throttle:0,throttleFirstRequest:!0,method:"get",data:{},dataType:"json",mockResponse:!1,mockResponseAsync:!1,response:!1,responseAsync:!1,rawResponse:!1,beforeSend:function(g){return g},beforeXHR:function(g){},onRequest:function(g,O){},onResponse:!1,onSuccess:function(g,O){},onComplete:function(g,O){},onFailure:function(g,O){},onError:function(g,O){},onAbort:function(g,O){},successTest:!1,error:{beforeSend:"The before send function has aborted the request",error:"There was an error with your request",exitConditions:"API Request Aborted. Exit conditions met",JSONParse:"JSON could not be parsed during error handling",legacyParameters:"You are using legacy API success callback names",method:"The method you called is not defined",missingAction:"API action used but no url was defined",missingSerialize:"jquery-serialize-object is required to add form data to an existing data object",missingURL:"No URL specified for api event",noReturnedValue:"The beforeSend callback must return a settings object, beforeSend ignored.",noStorage:"Caching responses locally requires session storage",parseError:"There was an error parsing your request",requiredParameter:"Missing a required URL parameter: ",statusMessage:"Server gave an error: ",timeout:"Your request timed out"},regExp:{required:/\{\$*[A-z0-9]+\}/g,optional:/\{\/\$*[A-z0-9]+\}/g},className:{loading:"loading",error:"error"},selector:{disabled:".disabled",form:"form"},metadata:{action:"action",url:"url"}}})(jQuery,window,document);(function(r,v,b,_){"use strict";r.isFunction=r.isFunction||function(g){return typeof g=="function"&&typeof g.nodeType!="number"},v=typeof v<"u"&&v.Math==Math?v:typeof self<"u"&&self.Math==Math?self:Function("return this")(),r.fn.dropdown=function(g){var O=r(this),R=r(b),J=O.selector||"",Z="ontouchstart"in b.documentElement,C="click",we=new Date().getTime(),Be=[],Ue=arguments[0],Q=typeof Ue=="string",Ke=[].slice.call(arguments,1),At;return O.each(function(gt){var q=r.isPlainObject(g)?r.extend(!0,{},r.fn.dropdown.settings,g):r.extend({},r.fn.dropdown.settings),ne=q.className,c=q.message,W=q.fields,Re=q.keys,tt=q.metadata,st=q.namespace,et=q.regExp,je=q.selector,S=q.error,si=q.templates,ct="."+st,xt="module-"+st,ce=r(this),G=r(q.context),P=ce.find(je.text),k=ce.find(je.search),N=ce.find(je.sizer),Y=ce.find(je.input),ve=ce.find(je.icon),Oe=ce.find(je.clearIcon),Ne=ce.prev().find(je.text).length>0?ce.prev().find(je.text):ce.prev(),Ve=ce.children(je.menu),Ye=Ve.find(je.item),Lt=q.hideDividers?Ye.parent().children(je.divider):r(),K=!1,Ee=!1,nt=!1,te=!1,ee=this,oe=ce.data(xt),Ge,yt,jt,Bt,Qt,ji,ti,fn,Qi,p;p={initialize:function(){p.debug("Initializing dropdown",q),p.is.alreadySetup()?p.setup.reference():(q.ignoreDiacritics&&!String.prototype.normalize&&(q.ignoreDiacritics=!1,p.error(S.noNormalize,ee)),p.setup.layout(),q.values&&(p.set.initialLoad(),p.change.values(q.values),p.remove.initialLoad()),p.refreshData(),p.save.defaults(),p.restore.selected(),p.create.id(),p.bind.events(),p.observeChanges(),p.instantiate())},instantiate:function(){p.verbose("Storing instance of dropdown",p),oe=p,ce.data(xt,p)},destroy:function(){p.verbose("Destroying previous dropdown",ce),p.remove.tabbable(),p.remove.active(),Ve.transition("stop all"),Ve.removeClass(ne.visible).addClass(ne.hidden),ce.off(ct).removeData(xt),Ve.off(ct),R.off(Qt),p.disconnect.menuObserver(),p.disconnect.selectObserver(),p.disconnect.classObserver()},observeChanges:function(){"MutationObserver"in v&&(ti=new MutationObserver(p.event.select.mutation),fn=new MutationObserver(p.event.menu.mutation),Qi=new MutationObserver(p.event.class.mutation),p.debug("Setting up mutation observer",ti,fn,Qi),p.observe.select(),p.observe.menu(),p.observe.class())},disconnect:{menuObserver:function(){fn&&fn.disconnect()},selectObserver:function(){ti&&ti.disconnect()},classObserver:function(){Qi&&Qi.disconnect()}},observe:{select:function(){p.has.input()&&ti&&ti.observe(ce[0],{childList:!0,subtree:!0})},menu:function(){p.has.menu()&&fn&&fn.observe(Ve[0],{childList:!0,subtree:!0})},class:function(){p.has.search()&&Qi&&Qi.observe(ce[0],{attributes:!0})}},create:{id:function(){ji=(Math.random().toString(16)+"000000000").substr(2,8),Qt="."+ji,p.verbose("Creating unique id for element",ji)},userChoice:function(j){var H,ge,me,De;return j=j||p.get.userValues(),j?(j=Array.isArray(j)?j:[j],r.each(j,function(ht,rt){p.get.item(rt)===!1&&(De=q.templates.addition(p.add.variables(c.addResult,rt)),ge=r("<div />").html(De).attr("data-"+tt.value,rt).attr("data-"+tt.text,rt).addClass(ne.addition).addClass(ne.item),q.hideAdditions&&ge.addClass(ne.hidden),H=H===_?ge:H.add(ge),p.verbose("Creating user choices for value",rt,ge))}),H):!1},userLabels:function(j){var H=p.get.userValues();H&&(p.debug("Adding user labels",H),r.each(H,function(ge,me){p.verbose("Adding custom user value"),p.add.label(me,me)}))},menu:function(){Ve=r("<div />").addClass(ne.menu).appendTo(ce)},sizer:function(){N=r("<span />").addClass(ne.sizer).insertAfter(k)}},search:function(j){j=j!==_?j:p.get.query(),p.verbose("Searching for query",j),p.has.minCharacters(j)?p.filter(j):p.hide(null,!0)},select:{firstUnfiltered:function(){p.verbose("Selecting first non-filtered element"),p.remove.selectedItem(),Ye.not(je.unselectable).not(je.addition+je.hidden).eq(0).addClass(ne.selected)},nextAvailable:function(j){j=j.eq(0);var H=j.nextAll(je.item).not(je.unselectable).eq(0),ge=j.prevAll(je.item).not(je.unselectable).eq(0),me=H.length>0;me?(p.verbose("Moving selection to",H),H.addClass(ne.selected)):(p.verbose("Moving selection to",ge),ge.addClass(ne.selected))}},setup:{api:function(){var j={debug:q.debug,urlData:{value:p.get.value(),query:p.get.query()},on:!1};p.verbose("First request, initializing API"),ce.api(j)},layout:function(){ce.is("select")&&(p.setup.select(),p.setup.returnedObject()),p.has.menu()||p.create.menu(),p.is.selection()&&p.is.clearable()&&!p.has.clearItem()&&(p.verbose("Adding clear icon"),Oe=r("<i />").addClass("remove icon").insertBefore(P)),p.is.search()&&!p.has.search()&&(p.verbose("Adding search input"),k=r("<input />").addClass(ne.search).prop("autocomplete","off").insertBefore(P)),p.is.multiple()&&p.is.searchSelection()&&!p.has.sizer()&&p.create.sizer(),q.allowTab&&p.set.tabbable()},select:function(){var j=p.get.selectValues();p.debug("Dropdown initialized on a select",j),ce.is("select")&&(Y=ce),Y.parent(je.dropdown).length>0?(p.debug("UI dropdown already exists. Creating dropdown menu only"),ce=Y.closest(je.dropdown),p.has.menu()||p.create.menu(),Ve=ce.children(je.menu),p.setup.menu(j)):(p.debug("Creating entire dropdown from select"),ce=r("<div />").attr("class",Y.attr("class")).addClass(ne.selection).addClass(ne.dropdown).html(si.dropdown(j,W,q.preserveHTML,q.className)).insertBefore(Y),Y.hasClass(ne.multiple)&&Y.prop("multiple")===!1&&(p.error(S.missingMultiple),Y.prop("multiple",!0)),Y.is("[multiple]")&&p.set.multiple(),Y.prop("disabled")&&(p.debug("Disabling dropdown"),ce.addClass(ne.disabled)),Y.removeAttr("required").removeAttr("class").detach().prependTo(ce)),p.refresh()},menu:function(j){Ve.html(si.menu(j,W,q.preserveHTML,q.className)),Ye=Ve.find(je.item),Lt=q.hideDividers?Ye.parent().children(je.divider):r()},reference:function(){p.debug("Dropdown behavior was called on select, replacing with closest dropdown"),ce=ce.parent(je.dropdown),oe=ce.data(xt),ee=ce.get(0),p.refresh(),p.setup.returnedObject()},returnedObject:function(){var j=O.slice(0,gt),H=O.slice(gt+1);O=j.add(ce).add(H)}},refresh:function(){p.refreshSelectors(),p.refreshData()},refreshItems:function(){Ye=Ve.find(je.item),Lt=q.hideDividers?Ye.parent().children(je.divider):r()},refreshSelectors:function(){p.verbose("Refreshing selector cache"),P=ce.find(je.text),k=ce.find(je.search),Y=ce.find(je.input),ve=ce.find(je.icon),Ne=ce.prev().find(je.text).length>0?ce.prev().find(je.text):ce.prev(),Ve=ce.children(je.menu),Ye=Ve.find(je.item),Lt=q.hideDividers?Ye.parent().children(je.divider):r()},refreshData:function(){p.verbose("Refreshing cached metadata"),Ye.removeData(tt.text).removeData(tt.value)},clearData:function(){p.verbose("Clearing metadata"),Ye.removeData(tt.text).removeData(tt.value),ce.removeData(tt.defaultText).removeData(tt.defaultValue).removeData(tt.placeholderText)},toggle:function(){p.verbose("Toggling menu visibility"),p.is.active()?p.hide():p.show()},show:function(j,H){if(j=r.isFunction(j)?j:function(){},!p.can.show()&&p.is.remote()&&(p.debug("No API results retrieved, searching before show"),p.queryRemote(p.get.query(),p.show)),p.can.show()&&!p.is.active()){if(p.debug("Showing dropdown"),p.has.message()&&!(p.has.maxSelections()||p.has.allResultsFiltered())&&p.remove.message(),p.is.allFiltered())return!0;q.onShow.call(ee)!==!1&&(q.onAfterFiltered.call(ee),p.animate.show(function(){p.can.click()&&p.bind.intent(),p.has.search()&&!H&&p.focusSearch(),p.set.visible(),j.call(ee)}))}},hide:function(j,H){j=r.isFunction(j)?j:function(){},p.is.active()&&!p.is.animatingOutward()?(p.debug("Hiding dropdown"),q.onHide.call(ee)!==!1&&p.animate.hide(function(){p.remove.visible(),p.is.focusedOnSearch()&&H!==!0&&k.blur(),j.call(ee)})):p.can.click()&&p.unbind.intent(),te=!1},hideOthers:function(){p.verbose("Finding other dropdowns to hide"),O.not(ce).has(je.menu+"."+ne.visible).dropdown("hide")},hideMenu:function(){p.verbose("Hiding menu  instantaneously"),p.remove.active(),p.remove.visible(),Ve.transition("hide")},hideSubMenus:function(){var j=Ve.children(je.item).find(je.menu);p.verbose("Hiding sub menus",j),j.transition("hide")},bind:{events:function(){p.bind.keyboardEvents(),p.bind.inputEvents(),p.bind.mouseEvents()},keyboardEvents:function(){p.verbose("Binding keyboard events"),ce.on("keydown"+ct,p.event.keydown),p.has.search()&&ce.on(p.get.inputEvent()+ct,je.search,p.event.input),p.is.multiple()&&R.on("keydown"+Qt,p.event.document.keydown)},inputEvents:function(){p.verbose("Binding input change events"),ce.on("change"+ct,je.input,p.event.change)},mouseEvents:function(){p.verbose("Binding mouse events"),p.is.multiple()&&ce.on(C+ct,je.label,p.event.label.click).on(C+ct,je.remove,p.event.remove.click),p.is.searchSelection()?(ce.on("mousedown"+ct,p.event.mousedown).on("mouseup"+ct,p.event.mouseup).on("mousedown"+ct,je.menu,p.event.menu.mousedown).on("mouseup"+ct,je.menu,p.event.menu.mouseup).on(C+ct,je.icon,p.event.icon.click).on(C+ct,je.clearIcon,p.event.clearIcon.click).on("focus"+ct,je.search,p.event.search.focus).on(C+ct,je.search,p.event.search.focus).on("blur"+ct,je.search,p.event.search.blur).on(C+ct,je.text,p.event.text.focus),p.is.multiple()&&ce.on(C+ct,p.event.click)):(q.on=="click"?ce.on(C+ct,je.icon,p.event.icon.click).on(C+ct,p.event.test.toggle):q.on=="hover"?ce.on("mouseenter"+ct,p.delay.show).on("mouseleave"+ct,p.delay.hide):ce.on(q.on+ct,p.toggle),ce.on("mousedown"+ct,p.event.mousedown).on("mouseup"+ct,p.event.mouseup).on("focus"+ct,p.event.focus).on(C+ct,je.clearIcon,p.event.clearIcon.click),p.has.menuSearch()?ce.on("blur"+ct,je.search,p.event.search.blur):ce.on("blur"+ct,p.event.blur)),Ve.on((Z?"touchstart":"mouseenter")+ct,je.item,p.event.item.mouseenter).on("mouseleave"+ct,je.item,p.event.item.mouseleave).on("click"+ct,je.item,p.event.item.click)},intent:function(){p.verbose("Binding hide intent event to document"),Z&&R.on("touchstart"+Qt,p.event.test.touch).on("touchmove"+Qt,p.event.test.touch),R.on(C+Qt,p.event.test.hide)}},unbind:{intent:function(){p.verbose("Removing hide intent event from document"),Z&&R.off("touchstart"+Qt).off("touchmove"+Qt),R.off(C+Qt)}},filter:function(j){var H=j!==_?j:p.get.query(),ge=function(){p.is.multiple()&&p.filterActive(),(j||!j&&p.get.activeItem().length==0)&&p.select.firstUnfiltered(),p.has.allResultsFiltered()?q.onNoResults.call(ee,H)?q.allowAdditions?q.hideAdditions&&(p.verbose("User addition with no menu, setting empty style"),p.set.empty(),p.hideMenu()):(p.verbose("All items filtered, showing message",H),p.add.message(c.noResults)):(p.verbose("All items filtered, hiding dropdown",H),p.hideMenu()):(p.remove.empty(),p.remove.message()),q.allowAdditions&&p.add.userSuggestion(p.escape.htmlEntities(j)),p.is.searchSelection()&&p.can.show()&&p.is.focusedOnSearch()&&p.show(),q.onAfterFiltered.call(ee)};q.useLabels&&p.has.maxSelections()||(q.apiSettings?p.can.useAPI()?p.queryRemote(H,function(){q.filterRemoteData&&p.filterItems(H);var me=Y.val();Array.isArray(me)||(me=me&&me!==""?me.split(q.delimiter):[]),r.each(me,function(De,ht){Ye.filter('[data-value="'+CSS.escape(ht)+'"]').addClass(ne.filtered)}),ge()}):p.error(S.noAPI):(p.filterItems(H),ge()))},queryRemote:function(j,H){var ge={errorDuration:!1,cache:"local",throttle:q.throttle,urlData:{query:j},onError:function(){p.add.message(c.serverError),H()},onFailure:function(){p.add.message(c.serverError),H()},onSuccess:function(me){var De=me[W.remoteValues];Array.isArray(De)||(De=[]),p.remove.message();var ht={};ht[W.values]=De,p.setup.menu(ht),De.length===0&&!q.allowAdditions&&p.add.message(c.noResults),H()}};ce.api("get request")||p.setup.api(),ge=r.extend(!0,{},ge,q.apiSettings),ce.api("setting",ge).api("query")},filterItems:function(j){var H=p.remove.diacritics(j!==_?j:p.get.query()),ge=null,me=p.escape.string(H),De=(q.ignoreSearchCase?"i":"")+"gm",ht=new RegExp("^"+me,De);p.has.query()&&(ge=[],p.verbose("Searching for matching values",H),Ye.each(function(){var rt=r(this),zt,fi;if(rt.hasClass(ne.unfilterable))return ge.push(this),!0;if(q.match==="both"||q.match==="text"){if(zt=p.remove.diacritics(String(p.get.choiceText(rt,!1))),zt.search(ht)!==-1)return ge.push(this),!0;if(q.fullTextSearch==="exact"&&p.exactSearch(H,zt))return ge.push(this),!0;if(q.fullTextSearch===!0&&p.fuzzySearch(H,zt))return ge.push(this),!0}if(q.match==="both"||q.match==="value"){if(fi=p.remove.diacritics(String(p.get.choiceValue(rt,zt))),fi.search(ht)!==-1)return ge.push(this),!0;if(q.fullTextSearch==="exact"&&p.exactSearch(H,fi))return ge.push(this),!0;if(q.fullTextSearch===!0&&p.fuzzySearch(H,fi))return ge.push(this),!0}})),p.debug("Showing only matched items",H),p.remove.filteredItem(),ge&&Ye.not(ge).addClass(ne.filtered),p.has.query()?q.hideDividers===!0?Lt.addClass(ne.hidden):q.hideDividers==="empty"&&Lt.removeClass(ne.hidden).filter(function(){var rt=r(this).nextUntil(je.item);return(rt.length?rt:r(this)).nextUntil(je.divider).filter(je.item+":not(."+ne.filtered+")").length===0}).addClass(ne.hidden):Lt.removeClass(ne.hidden)},fuzzySearch:function(j,H){var ge=H.length,me=j.length;if(j=q.ignoreSearchCase?j.toLowerCase():j,H=q.ignoreSearchCase?H.toLowerCase():H,me>ge)return!1;if(me===ge)return j===H;e:for(var De=0,ht=0;De<me;De++){for(var rt=j.charCodeAt(De);ht<ge;)if(H.charCodeAt(ht++)===rt)continue e;return!1}return!0},exactSearch:function(j,H){return j=q.ignoreSearchCase?j.toLowerCase():j,H=q.ignoreSearchCase?H.toLowerCase():H,H.indexOf(j)>-1},filterActive:function(){q.useLabels&&Ye.filter("."+ne.active).addClass(ne.filtered)},focusSearch:function(j){p.has.search()&&!p.is.focusedOnSearch()&&(j?(ce.off("focus"+ct,je.search),k.focus(),ce.on("focus"+ct,je.search,p.event.search.focus)):k.focus())},blurSearch:function(){p.has.search()&&k.blur()},forceSelection:function(){var j=Ye.not(ne.filtered).filter("."+ne.selected).eq(0),H=Ye.not(ne.filtered).filter("."+ne.active).eq(0),ge=j.length>0?j:H,me=ge.length>0;q.allowAdditions||me&&!p.is.multiple()?(p.debug("Forcing partial selection to selected item",ge),p.event.item.click.call(ge,{},!0)):p.remove.searchTerm()},change:{values:function(j){q.allowAdditions||p.clear(),p.debug("Creating dropdown with specified values",j);var H={};H[W.values]=j,p.setup.menu(H),r.each(j,function(ge,me){if(me.selected==!0&&(p.debug("Setting initial selection to",me[W.value]),p.set.selected(me[W.value]),!p.is.multiple()))return!1}),p.has.selectInput()&&(p.disconnect.selectObserver(),Y.html(""),Y.append("<option disabled selected value></option>"),r.each(j,function(ge,me){var De=q.templates.escape(me[W.value]),ht=q.templates.escape(me[W.name]||"",q.preserveHTML);Y.append('<option value="'+De+'">'+ht+"</option>")}),p.observe.select())}},event:{change:function(){nt||(p.debug("Input changed, updating selection"),p.set.selected())},focus:function(){q.showOnFocus&&!K&&p.is.hidden()&&!jt&&p.show()},blur:function(j){jt=b.activeElement===this,!K&&!jt&&(p.remove.activeLabel(),p.hide())},mousedown:function(){p.is.searchSelection()?Bt=!0:K=!0},mouseup:function(){p.is.searchSelection()?Bt=!1:K=!1},click:function(j){var H=r(j.target);H.is(ce)&&(p.is.focusedOnSearch()?p.show():p.focusSearch())},search:{focus:function(j){K=!0,p.is.multiple()&&p.remove.activeLabel(),(q.showOnFocus||j.type!=="focus"&&j.type!=="focusin")&&p.search()},blur:function(j){jt=b.activeElement===this,p.is.searchSelection()&&!Bt&&!Ee&&!jt&&(q.forceSelection?p.forceSelection():q.allowAdditions||p.remove.searchTerm(),p.hide()),Bt=!1}},clearIcon:{click:function(j){p.clear(),p.is.searchSelection()&&p.remove.searchTerm(),p.hide(),j.stopPropagation()}},icon:{click:function(j){te=!0;const H=!!Ve.find(".search > input").length;p.has.search()&&!H?p.is.active()?p.blurSearch():q.showOnFocus?p.focusSearch():p.toggle():p.toggle()}},text:{focus:function(j){K=!0,p.focusSearch()}},input:function(j){(p.is.multiple()||p.is.searchSelection())&&p.set.filtered(),clearTimeout(p.timer),p.timer=setTimeout(p.search,q.delay.search)},label:{click:function(j){var H=r(this),ge=ce.find(je.label),me=ge.filter("."+ne.active),De=H.nextAll("."+ne.active),ht=H.prevAll("."+ne.active),rt=De.length>0?H.nextUntil(De).add(me).add(H):H.prevUntil(ht).add(me).add(H);j.shiftKey?(me.removeClass(ne.active),rt.addClass(ne.active)):j.ctrlKey?H.toggleClass(ne.active):(me.removeClass(ne.active),H.addClass(ne.active)),q.onLabelSelect.apply(this,ge.filter("."+ne.active))}},remove:{click:function(){var j=r(this).parent();j.hasClass(ne.active)?p.remove.activeLabels():p.remove.activeLabels(j)}},test:{toggle:function(j){var H=p.is.multiple()?p.show:p.toggle;p.is.bubbledLabelClick(j)||p.is.bubbledIconClick(j)||p.determine.eventOnElement(j,H)&&j.preventDefault()},touch:function(j){p.determine.eventOnElement(j,function(){j.type=="touchstart"?p.timer=setTimeout(function(){p.hide()},q.delay.touch):j.type=="touchmove"&&clearTimeout(p.timer)}),j.stopPropagation()},hide:function(j){p.determine.eventInModule(j,p.hide)&&ee.id&&r(j.target).attr("for")===ee.id&&j.preventDefault()}},class:{mutation:function(j){j.forEach(function(H){H.attributeName==="class"&&p.check.disabled()})}},select:{mutation:function(j){p.debug("<select> modified, recreating menu"),p.is.selectMutation(j)&&(p.disconnect.selectObserver(),p.refresh(),p.setup.select(),p.set.selected(),p.observe.select())}},menu:{mutation:function(j){var H=j[0],ge=H.addedNodes?r(H.addedNodes[0]):r(!1),me=H.removedNodes?r(H.removedNodes[0]):r(!1),De=ge.add(me),ht=De.is(je.addition)||De.closest(je.addition).length>0,rt=De.is(je.message)||De.closest(je.message).length>0;ht||rt?(p.debug("Updating item selector cache"),p.refreshItems()):(p.debug("Menu modified, updating selector cache"),p.refresh())},mousedown:function(){Ee=!0},mouseup:function(){Ee=!1}},item:{mouseenter:function(j){var H=r(j.target),ge=r(this),me=ge.children(je.menu),De=ge.siblings(je.item).children(je.menu),ht=me.length>0,rt=me.find(H).length>0;!rt&&ht&&(clearTimeout(p.itemTimer),p.itemTimer=setTimeout(function(){p.verbose("Showing sub-menu",me),r.each(De,function(){p.animate.hide(!1,r(this))}),p.animate.show(!1,me)},q.delay.show),j.preventDefault())},mouseleave:function(j){var H=r(this).children(je.menu);H.length>0&&(clearTimeout(p.itemTimer),p.itemTimer=setTimeout(function(){p.verbose("Hiding sub-menu",H),p.animate.hide(!1,H)},q.delay.hide))},click:function(j,H){var ge=r(this),me=r(j?j.target:""),De=ge.find(je.menu),ht=p.get.choiceText(ge),rt=p.get.choiceValue(ge,ht),zt=De.length>0,fi=De.find(me).length>0;b.activeElement.tagName.toLowerCase()!=="input"&&r(b.activeElement).blur(),!fi&&(!zt||q.allowCategorySelection)&&(p.is.searchSelection()&&(q.allowAdditions&&p.remove.userAddition(),p.remove.searchTerm(),!p.is.focusedOnSearch()&&H!=!0&&p.focusSearch(!0)),q.useLabels||(p.remove.filteredItem(),p.set.scrollPosition(ge)),p.determine.selectAction.call(this,ht,rt))}},document:{keydown:function(j){var H=j.which,ge=p.is.inObject(H,Re);if(ge){var me=ce.find(je.label),De=me.filter("."+ne.active),ht=De.data(tt.value),rt=me.index(De),zt=me.length,fi=De.length>0,vi=De.length>1,nn=rt===0,on=rt+1==zt,an=p.is.searchSelection(),bn=p.is.focusedOnSearch(),ln=p.is.focused(),Yi=bn&&p.get.caretPosition(!1)===0,Fn=Yi&&p.get.caretPosition(!0)!==0,vr;if(an&&!fi&&!bn)return;H==Re.leftArrow?(ln||Yi)&&!fi?(p.verbose("Selecting previous label"),me.last().addClass(ne.active)):fi&&(j.shiftKey?p.verbose("Adding previous label to selection"):(p.verbose("Selecting previous label"),me.removeClass(ne.active)),nn&&!vi?De.addClass(ne.active):De.prev(je.siblingLabel).addClass(ne.active).end(),j.preventDefault()):H==Re.rightArrow?(ln&&!fi&&me.first().addClass(ne.active),fi&&(j.shiftKey?p.verbose("Adding next label to selection"):(p.verbose("Selecting next label"),me.removeClass(ne.active)),on?an?bn?me.removeClass(ne.active):p.focusSearch():vi?De.next(je.siblingLabel).addClass(ne.active):De.addClass(ne.active):De.next(je.siblingLabel).addClass(ne.active),j.preventDefault())):H==Re.deleteKey||H==Re.backspace?fi?(p.verbose("Removing active labels"),on&&an&&!bn&&p.focusSearch(),De.last().next(je.siblingLabel).addClass(ne.active),p.remove.activeLabels(De),j.preventDefault()):Yi&&!Fn&&!fi&&H==Re.backspace&&(p.verbose("Removing last label on input backspace"),De=me.last().addClass(ne.active),p.remove.activeLabels(De)):De.removeClass(ne.active)}}},keydown:function(j){var H=j.which,ge=p.is.inObject(H,Re);if(ge){var me=Ye.not(je.unselectable).filter("."+ne.selected).eq(0),De=Ve.children("."+ne.active).eq(0),ht=me.length>0?me:De,rt=ht.length>0?ht.siblings(":not(."+ne.filtered+")").addBack():Ve.children(":not(."+ne.filtered+")"),zt=ht.children(je.menu),fi=ht.closest(je.menu),vi=fi.hasClass(ne.visible)||fi.hasClass(ne.animating)||fi.parent(je.menu).length>0,nn=zt.length>0,on=ht.length>0,an=ht.not(je.unselectable).length>0,bn=H==Re.delimiter&&q.allowAdditions&&p.is.multiple(),ln=q.allowAdditions&&q.hideAdditions&&(H==Re.enter||bn)&&an,Yi,Fn,vr;if(ln&&(p.verbose("Selecting item from keyboard shortcut",ht),p.event.item.click.call(ht,j),p.is.searchSelection()&&p.remove.searchTerm(),p.is.multiple()&&j.preventDefault()),p.is.visible()){if((H==Re.enter||bn)&&(H==Re.enter&&on&&nn&&!q.allowCategorySelection?(p.verbose("Pressed enter on unselectable category, opening sub menu"),H=Re.rightArrow):an&&(p.verbose("Selecting item from keyboard shortcut",ht),p.event.item.click.call(ht,j),p.is.searchSelection()&&(p.remove.searchTerm(),p.is.multiple()&&k.focus())),j.preventDefault()),on&&(H==Re.leftArrow&&(Fn=fi[0]!==Ve[0],Fn&&(p.verbose("Left key pressed, closing sub-menu"),p.animate.hide(!1,fi),ht.removeClass(ne.selected),fi.closest(je.item).addClass(ne.selected),j.preventDefault())),H==Re.rightArrow&&nn&&(p.verbose("Right key pressed, opening sub-menu"),p.animate.show(!1,zt),ht.removeClass(ne.selected),zt.find(je.item).eq(0).addClass(ne.selected),j.preventDefault())),H==Re.upArrow){if(Yi=on&&vi?ht.prevAll(je.item+":not("+je.unselectable+")").eq(0):Ye.eq(0),rt.index(Yi)<0){p.verbose("Up key pressed but reached top of current menu"),j.preventDefault();return}else p.verbose("Up key pressed, changing active item"),ht.removeClass(ne.selected),Yi.addClass(ne.selected),p.set.scrollPosition(Yi),q.selectOnKeydown&&p.is.single()&&p.set.selectedItem(Yi);j.preventDefault()}if(H==Re.downArrow){if(Yi=on&&vi?Yi=ht.nextAll(je.item+":not("+je.unselectable+")").eq(0):Ye.eq(0),Yi.length===0){p.verbose("Down key pressed but reached bottom of current menu"),j.preventDefault();return}else p.verbose("Down key pressed, changing active item"),Ye.removeClass(ne.selected),Yi.addClass(ne.selected),p.set.scrollPosition(Yi),q.selectOnKeydown&&p.is.single()&&p.set.selectedItem(Yi);j.preventDefault()}H==Re.pageUp&&(p.scrollPage("up"),j.preventDefault()),H==Re.pageDown&&(p.scrollPage("down"),j.preventDefault()),H==Re.escape&&(p.verbose("Escape key pressed, closing dropdown"),p.hide())}else bn&&j.preventDefault(),H==Re.downArrow&&!p.is.visible()&&(p.verbose("Down key pressed, showing dropdown"),p.show(),j.preventDefault())}else p.has.search()||p.set.selectedLetter(String.fromCharCode(H))}},trigger:{change:function(){var j=Y[0];if(j){var H=b.createEvent("HTMLEvents");p.verbose("Triggering native change event"),H.initEvent("change",!0,!1),j.dispatchEvent(H)}}},determine:{selectAction:function(j,H){Ge=!0,p.verbose("Determining action",q.action),r.isFunction(p.action[q.action])?(p.verbose("Triggering preset action",q.action,j,H),p.action[q.action].call(ee,j,H,this)):r.isFunction(q.action)?(p.verbose("Triggering user action",q.action,j,H),q.action.call(ee,j,H,this)):p.error(S.action,q.action),Ge=!1},eventInModule:function(j,H){var ge=r(j.target),me=ge.closest(b.documentElement).length>0,De=ge.closest(ce).length>0;return H=r.isFunction(H)?H:function(){},me&&!De?(p.verbose("Triggering event",H),H(),!0):(p.verbose("Event occurred in dropdown, canceling callback"),!1)},eventOnElement:function(j,H){var ge=r(j.target),me=ge.closest(je.siblingLabel),De=b.body.contains(j.target),ht=ce.find(me).length===0||!(p.is.multiple()&&q.useLabels),rt=ge.closest(Ve).length===0;return H=r.isFunction(H)?H:function(){},De&&ht&&rt?(p.verbose("Triggering event",H),H(),!0):(p.verbose("Event occurred in dropdown menu, canceling callback"),!1)}},action:{nothing:function(){},activate:function(j,H,ge){H=H!==_?H:j,p.can.activate(r(ge))&&(p.set.selected(H,r(ge)),p.is.multiple()||p.hideAndClear())},select:function(j,H,ge){H=H!==_?H:j,p.can.activate(r(ge))&&(p.set.value(H,j,r(ge)),p.is.multiple()||p.hideAndClear())},combo:function(j,H,ge){H=H!==_?H:j,p.set.selected(H,r(ge)),p.hideAndClear()},hide:function(j,H,ge){p.set.value(H,j,r(ge)),p.hideAndClear()}},get:{id:function(){return ji},defaultText:function(){return ce.data(tt.defaultText)},defaultValue:function(){return ce.data(tt.defaultValue)},placeholderText:function(){return q.placeholder!="auto"&&typeof q.placeholder=="string"?q.placeholder:ce.data(tt.placeholderText)||""},text:function(){return q.preserveHTML?P.html():P.text()},query:function(){return String(k.val()).trim()},searchWidth:function(j){return j=j!==_?j:k.val(),N.text(j),Math.ceil(N.width()+1)},selectionCount:function(){var j=p.get.values(),H;return H=p.is.multiple()?Array.isArray(j)?j.length:0:p.get.value()!==""?1:0,H},transition:function(j){return q.transition=="auto"?p.is.upward(j)?"slide up":"slide down":q.transition},userValues:function(){var j=p.get.values();return j?(j=Array.isArray(j)?j:[j],r.grep(j,function(H){return p.get.item(H)===!1})):!1},uniqueArray:function(j){return r.grep(j,function(H,ge){return r.inArray(H,j)===ge})},caretPosition:function(j){var H=k.get(0),ge,me;if(j&&"selectionEnd"in H)return H.selectionEnd;if(!j&&"selectionStart"in H)return H.selectionStart;if(b.selection)return H.focus(),ge=b.selection.createRange(),me=ge.text.length,j?me:(ge.moveStart("character",-H.value.length),ge.text.length-me)},value:function(){var j=Y.length>0?Y.val():ce.data(tt.value),H=Array.isArray(j)&&j.length===1&&j[0]==="";return j===_||H?"":j},values:function(){var j=p.get.value();return j===""?"":!p.has.selectInput()&&p.is.multiple()?typeof j=="string"?p.escape.htmlEntities(j).split(q.delimiter):"":j},remoteValues:function(){var j=p.get.values(),H=!1;return j&&(typeof j=="string"&&(j=[j]),r.each(j,function(ge,me){var De=p.read.remoteData(me);p.verbose("Restoring value from session data",De,me),De&&(H||(H={}),H[me]=De)})),H},choiceText:function(j,H){if(H=H!==_?H:q.preserveHTML,j)return j.find(je.menu).length>0&&(p.verbose("Retrieving text of element with sub-menu"),j=j.clone(),j.find(je.menu).remove(),j.find(je.menuIcon).remove()),j.data(tt.text)!==_?j.data(tt.text):H?j.html().trim():j.text().trim()},choiceValue:function(j,H){return H=H||p.get.choiceText(j),j?j.data(tt.value)!==_?String(j.data(tt.value)):typeof H=="string"?String(q.ignoreSearchCase?H.toLowerCase():H).trim():String(H):!1},inputEvent:function(){var j=k[0];return j?j.oninput!==_?"input":j.onpropertychange!==_?"propertychange":"keyup":!1},selectValues:function(){var j={},H=[],ge=[];return ce.find("option").each(function(){var me=r(this),De=me.html(),ht=me.attr("disabled"),rt=me.attr("value")!==_?me.attr("value"):De,zt=me.data(tt.text)!==_?me.data(tt.text):De,fi=me.parent("optgroup");q.placeholder==="auto"&&rt===""?j.placeholder=De:((fi.length!==H.length||fi[0]!==H[0])&&(ge.push({type:"header",divider:q.headerDivider,name:fi.attr("label")||""}),H=fi),ge.push({name:De,value:rt,text:zt,disabled:ht}))}),q.placeholder&&q.placeholder!=="auto"&&(p.debug("Setting placeholder value to",q.placeholder),j.placeholder=q.placeholder),q.sortSelect?(q.sortSelect===!0?ge.sort(function(me,De){return me.name.localeCompare(De.name)}):q.sortSelect==="natural"?ge.sort(function(me,De){return me.name.toLowerCase().localeCompare(De.name.toLowerCase())}):r.isFunction(q.sortSelect)&&ge.sort(q.sortSelect),j[W.values]=ge,p.debug("Retrieved and sorted values from select",j)):(j[W.values]=ge,p.debug("Retrieved values from select",j)),j},activeItem:function(){return Ye.filter("."+ne.active)},selectedItem:function(){var j=Ye.not(je.unselectable).filter("."+ne.selected);return j.length>0?j:Ye.eq(0)},itemWithAdditions:function(j){var H=p.get.item(j),ge=p.create.userChoice(j),me=ge&&ge.length>0;return me&&(H=H.length>0?H.add(ge):ge),H},item:function(j,H){var ge=!1,me,De;return j=j!==_?j:p.get.values()!==_?p.get.values():p.get.text(),De=p.is.multiple()&&Array.isArray(j),me=De?j.length>0:j!==_&&j!==null,H=j===""||j===!1||j===!0?!0:H||!1,me&&Ye.each(function(){var ht=r(this),rt=p.get.choiceText(ht),zt=p.get.choiceValue(ht,rt);if(!(zt===null||zt===_)){if(De)r.inArray(p.escape.htmlEntities(String(zt)),j.map(function(fi){return String(fi)}))!==-1&&(ge=ge?ge.add(ht):ht);else if(H){if(p.verbose("Ambiguous dropdown value using strict type check",ht,j),zt===j)return ge=ht,!0}else if(q.ignoreCase&&(zt=zt.toLowerCase(),j=j.toLowerCase()),p.escape.htmlEntities(String(zt))===p.escape.htmlEntities(String(j)))return p.verbose("Found select item by value",zt,j),ge=ht,!0}}),ge}},check:{maxSelections:function(j){return q.maxSelections?(j=j!==_?j:p.get.selectionCount(),j>=q.maxSelections?(p.debug("Maximum selection count reached"),q.useLabels&&(Ye.addClass(ne.filtered),p.add.message(c.maxSelections)),!0):(p.verbose("No longer at maximum selection count"),p.remove.message(),p.remove.filteredItem(),p.is.searchSelection()&&p.filterItems(),!1)):!0},disabled:function(){k.attr("tabindex",p.is.disabled()?-1:0)}},restore:{defaults:function(j){p.clear(j),p.restore.defaultText(),p.restore.defaultValue()},defaultText:function(){var j=p.get.defaultText(),H=p.get.placeholderText;j===H?(p.debug("Restoring default placeholder text",j),p.set.placeholderText(j)):(p.debug("Restoring default text",j),p.set.text(j))},placeholderText:function(){p.set.placeholderText()},defaultValue:function(){var j=p.get.defaultValue();j!==_&&(p.debug("Restoring default value",j),j!==""?(p.set.value(j),p.set.selected()):(p.remove.activeItem(),p.remove.selectedItem()))},labels:function(){q.allowAdditions&&(q.useLabels||(p.error(S.labels),q.useLabels=!0),p.debug("Restoring selected values"),p.create.userLabels()),p.check.maxSelections()},selected:function(){p.restore.values(),p.is.multiple()?(p.debug("Restoring previously selected values and labels"),p.restore.labels()):p.debug("Restoring previously selected values")},values:function(){p.set.initialLoad(),q.apiSettings&&q.saveRemoteData&&p.get.remoteValues()?p.restore.remoteValues():p.set.selected();var j=p.get.value();j&&j!==""&&!(Array.isArray(j)&&j.length===0)?Y.removeClass(ne.noselection):Y.addClass(ne.noselection),p.remove.initialLoad()},remoteValues:function(){var j=p.get.remoteValues();p.debug("Recreating selected from session data",j),j&&(p.is.single()?r.each(j,function(H,ge){p.set.text(ge)}):r.each(j,function(H,ge){p.add.label(H,ge)}))}},read:{remoteData:function(j){var H;if(v.Storage===_){p.error(S.noStorage);return}return H=sessionStorage.getItem(j),H!==_?H:!1}},save:{defaults:function(){p.save.defaultText(),p.save.placeholderText(),p.save.defaultValue()},defaultValue:function(){var j=p.get.value();p.verbose("Saving default value as",j),ce.data(tt.defaultValue,j)},defaultText:function(){var j=p.get.text();p.verbose("Saving default text as",j),ce.data(tt.defaultText,j)},placeholderText:function(){var j;q.placeholder!==!1&&P.hasClass(ne.placeholder)&&(j=p.get.text(),p.verbose("Saving placeholder text as",j),ce.data(tt.placeholderText,j))},remoteData:function(j,H){if(v.Storage===_){p.error(S.noStorage);return}p.verbose("Saving remote data to session storage",H,j),sessionStorage.setItem(H,j)}},clear:function(j){p.is.multiple()&&q.useLabels?p.remove.labels():(p.remove.activeItem(),p.remove.selectedItem(),p.remove.filteredItem()),p.set.placeholderText(),p.clearValue(j)},clearValue:function(j){p.set.value("",null,null,j)},scrollPage:function(j,H){var ge=H||p.get.selectedItem(),me=ge.closest(je.menu),De=me.outerHeight(),ht=me.scrollTop(),rt=Ye.eq(0).outerHeight(),zt=Math.floor(De/rt),fi=me.prop("scrollHeight"),vi=j=="up"?ht-rt*zt:ht+rt*zt,nn=Ye.not(je.unselectable),on,an,bn;bn=j=="up"?nn.index(ge)-zt:nn.index(ge)+zt,on=j=="up"?bn>=0:bn<nn.length,an=on?nn.eq(bn):j=="up"?nn.first():nn.last(),an.length>0&&(p.debug("Scrolling page",j,an),ge.removeClass(ne.selected),an.addClass(ne.selected),q.selectOnKeydown&&p.is.single()&&p.set.selectedItem(an),me.scrollTop(vi))},set:{filtered:function(){var j=p.is.multiple(),H=p.is.searchSelection(),ge=j&&H,me=H?p.get.query():"",De=typeof me=="string"&&me.length>0,ht=p.get.searchWidth(),rt=me!=="";j&&De&&(p.verbose("Adjusting input width",ht,q.glyphWidth),k.css("width",ht)),De||ge&&rt?(p.verbose("Hiding placeholder text"),P.addClass(ne.filtered)):(!j||ge&&!rt)&&(p.verbose("Showing placeholder text"),P.removeClass(ne.filtered))},empty:function(){ce.addClass(ne.empty)},loading:function(){ce.addClass(ne.loading)},placeholderText:function(j){j=j||p.get.placeholderText(),p.debug("Setting placeholder text",j),p.set.text(j),P.addClass(ne.placeholder)},tabbable:function(){p.is.searchSelection()?(p.debug("Added tabindex to searchable dropdown"),k.val(""),p.check.disabled(),Ve.attr("tabindex",-1)):(p.debug("Added tabindex to dropdown"),ce.attr("tabindex")===_&&(ce.attr("tabindex",0),Ve.attr("tabindex",-1)))},initialLoad:function(){p.verbose("Setting initial load"),yt=!0},activeItem:function(j){q.allowAdditions&&j.filter(je.addition).length>0?j.addClass(ne.filtered):j.addClass(ne.active)},partialSearch:function(j){var H=p.get.query().length;k.val(j.substr(0,H))},scrollPosition:function(j,H){var ge=5,me,De,ht,rt,zt,fi,vi,nn,on,an;j=j||p.get.selectedItem(),me=j.closest(je.menu),De=j&&j.length>0,H=H!==_?H:!1,p.get.activeItem().length===0&&(H=!1),j&&me.length>0&&De&&(zt=j.position().top,me.addClass(ne.loading),vi=me.scrollTop(),fi=me.offset().top,zt=j.offset().top,ht=vi-fi+zt,H||(nn=me.height(),an=vi+nn<ht+ge,on=ht-ge<vi),p.debug("Scrolling to active item",ht),(H||on||an)&&me.scrollTop(ht),me.removeClass(ne.loading))},text:function(j){q.action==="combo"?(p.debug("Changing combo button text",j,Ne),q.preserveHTML?Ne.html(j):Ne.text(j)):q.action==="activate"&&(j!==p.get.placeholderText()&&P.removeClass(ne.placeholder),p.debug("Changing text",j,P),P.removeClass(ne.filtered),q.preserveHTML?P.html(j):P.text(j))},selectedItem:function(j){var H=p.get.choiceValue(j),ge=p.get.choiceText(j,!1),me=p.get.choiceText(j,!0);p.debug("Setting user selection to item",j),p.remove.activeItem(),p.set.partialSearch(ge),p.set.activeItem(j),p.set.selected(H,j),p.set.text(me)},selectedLetter:function(j){var H=Ye.filter("."+ne.selected),ge=H.length>0&&p.has.firstLetter(H,j),me=!1,De;ge&&(De=H.nextAll(Ye).eq(0),p.has.firstLetter(De,j)&&(me=De)),me||Ye.each(function(){if(p.has.firstLetter(r(this),j))return me=r(this),!1}),me&&(p.verbose("Scrolling to next value with letter",j),p.set.scrollPosition(me),H.removeClass(ne.selected),me.addClass(ne.selected),q.selectOnKeydown&&p.is.single()&&p.set.selectedItem(me))},direction:function(j){q.direction=="auto"?(j?p.is.upward(j)&&p.remove.upward(j):p.remove.upward(),p.can.openDownward(j)?p.remove.upward(j):p.set.upward(j),!p.is.leftward(j)&&!p.can.openRightward(j)&&p.set.leftward(j)):q.direction=="upward"&&p.set.upward(j)},upward:function(j){var H=j||ce;H.addClass(ne.upward)},leftward:function(j){var H=j||Ve;H.addClass(ne.leftward)},value:function(j,H,ge,me){j!==_&&j!==""&&!(Array.isArray(j)&&j.length===0)?Y.removeClass(ne.noselection):Y.addClass(ne.noselection);var De=p.escape.value(j),ht=Y.length>0,rt=p.get.values(),zt=j!==_?String(j):j,fi;if(ht){if(!q.allowReselection&&zt==rt&&(p.verbose("Skipping value update already same value",j,rt),!p.is.initialLoad()))return;p.is.single()&&p.has.selectInput()&&p.can.extendSelect()&&(p.debug("Adding user option",j),p.add.optionValue(j)),p.debug("Updating input value",De,rt),nt=!0,Y.val(De),q.fireOnInit===!1&&p.is.initialLoad()?p.debug("Input native change event ignored on initial load"):me!==!0&&p.trigger.change(),nt=!1}else p.verbose("Storing value in metadata",De,Y),De!==rt&&ce.data(tt.value,zt);q.fireOnInit===!1&&p.is.initialLoad()?p.verbose("No callback on initial load",q.onChange):me!==!0&&q.onChange.call(ee,j,H,ge)},active:function(){ce.addClass(ne.active)},multiple:function(){ce.addClass(ne.multiple)},visible:function(){ce.addClass(ne.visible)},exactly:function(j,H){p.debug("Setting selected to exact values"),p.clear(),p.set.selected(j,H)},selected:function(j,H){var ge=p.is.multiple();H=q.allowAdditions?H||p.get.itemWithAdditions(j):H||p.get.item(j),H&&(p.debug("Setting selected menu item to",H),p.is.multiple()&&p.remove.searchWidth(),p.is.single()?(p.remove.activeItem(),p.remove.selectedItem()):q.useLabels&&p.remove.selectedItem(),H.each(function(){var me=r(this),De=p.get.choiceText(me),ht=p.get.choiceValue(me,De),rt=me.hasClass(ne.filtered),zt=me.hasClass(ne.active),fi=me.hasClass(ne.addition),vi=ge&&H.length==1;ge?!zt||fi?(q.apiSettings&&q.saveRemoteData&&p.save.remoteData(De,ht),q.useLabels?(p.add.label(ht,De,vi),p.add.value(ht,De,me),p.set.activeItem(me),p.filterActive(),p.select.nextAvailable(H)):(p.add.value(ht,De,me),p.set.text(p.add.variables(c.count)),p.set.activeItem(me))):!rt&&(q.useLabels||Ge)&&(p.debug("Selected active value, removing label"),p.remove.selected(ht)):(q.apiSettings&&q.saveRemoteData&&p.save.remoteData(De,ht),p.set.text(De),p.set.value(ht,De,me),me.addClass(ne.active).addClass(ne.selected))}),p.remove.searchTerm())}},add:{label:function(j,H,ge){var me=p.is.searchSelection()?k:P,De=p.escape.value(j),ht;if(q.ignoreCase&&(De=De.toLowerCase()),ht=r("<a />").addClass(ne.label).attr("data-"+tt.value,De).html(si.label(De,H,q.preserveHTML,q.className)),ht=q.onLabelCreate.call(ht,De,H),p.has.label(j)){p.debug("User selection already exists, skipping",De);return}q.label.variation&&ht.addClass(q.label.variation),ge===!0?(p.debug("Animating in label",ht),ht.addClass(ne.hidden).insertBefore(me).transition({animation:q.label.transition,debug:q.debug,verbose:q.verbose,duration:q.label.duration})):(p.debug("Adding selection label",ht),ht.insertBefore(me))},message:function(j){var H=Ve.children(je.message),ge=q.templates.message(p.add.variables(j));H.length>0?H.html(ge):H=r("<div/>").html(ge).addClass(ne.message).appendTo(Ve)},optionValue:function(j){var H=p.escape.value(j),ge=Y.find('option[value="'+p.escape.string(H)+'"]'),me=ge.length>0;me||(p.disconnect.selectObserver(),p.is.single()&&(p.verbose("Removing previous user addition"),Y.find("option."+ne.addition).remove()),r("<option/>").prop("value",H).addClass(ne.addition).html(j).appendTo(Y),p.verbose("Adding user addition as an <option>",j),p.observe.select())},userSuggestion:function(j){var H=Ve.children(je.addition),ge=p.get.item(j),me=ge&&ge.not(je.addition).length,De=H.length>0,ht;if(!(q.useLabels&&p.has.maxSelections())){if(j===""||me){H.remove();return}De?(H.data(tt.value,j).data(tt.text,j).attr("data-"+tt.value,j).attr("data-"+tt.text,j).removeClass(ne.filtered),q.hideAdditions||(ht=q.templates.addition(p.add.variables(c.addResult,j)),H.html(ht)),p.verbose("Replacing user suggestion with new value",H)):(H=p.create.userChoice(j),H.prependTo(Ve),p.verbose("Adding item choice to menu corresponding with user choice addition",H)),(!q.hideAdditions||p.is.allFiltered())&&H.addClass(ne.selected).siblings().removeClass(ne.selected),p.refreshItems()}},variables:function(j,H){var ge=j.search("{count}")!==-1,me=j.search("{maxCount}")!==-1,De=j.search("{term}")!==-1,ht,rt;return p.verbose("Adding templated variables to message",j),ge&&(ht=p.get.selectionCount(),j=j.replace("{count}",ht)),me&&(ht=p.get.selectionCount(),j=j.replace("{maxCount}",q.maxSelections)),De&&(rt=H||p.get.query(),j=j.replace("{term}",rt)),j},value:function(j,H,ge){var me=p.get.values(),De;if(p.has.value(j)){p.debug("Value already selected");return}if(j===""){p.debug("Cannot select blank values from multiselect");return}Array.isArray(me)?(De=me.concat([j]),De=p.get.uniqueArray(De)):De=[j],p.has.selectInput()?p.can.extendSelect()&&(p.debug("Adding value to select",j,De,Y),p.add.optionValue(j)):(De=De.join(q.delimiter),p.debug("Setting hidden input to delimited value",De,Y)),q.fireOnInit===!1&&p.is.initialLoad()?p.verbose("Skipping onadd callback on initial load",q.onAdd):q.onAdd.call(ee,j,H,ge),p.set.value(De,H,ge),p.check.maxSelections()}},remove:{active:function(){ce.removeClass(ne.active)},activeLabel:function(){ce.find(je.label).removeClass(ne.active)},empty:function(){ce.removeClass(ne.empty)},loading:function(){ce.removeClass(ne.loading)},initialLoad:function(){yt=!1},upward:function(j){var H=j||ce;H.removeClass(ne.upward)},leftward:function(j){var H=j||Ve;H.removeClass(ne.leftward)},visible:function(){ce.removeClass(ne.visible)},activeItem:function(){Ye.removeClass(ne.active)},filteredItem:function(){q.useLabels&&p.has.maxSelections()||(q.useLabels&&p.is.multiple()?Ye.not("."+ne.active).removeClass(ne.filtered):Ye.removeClass(ne.filtered),q.hideDividers&&Lt.removeClass(ne.hidden),p.remove.empty())},optionValue:function(j){var H=p.escape.value(j),ge=Y.find('option[value="'+p.escape.string(H)+'"]'),me=ge.length>0;!me||!ge.hasClass(ne.addition)||(ti&&(ti.disconnect(),p.verbose("Temporarily disconnecting mutation observer")),ge.remove(),p.verbose("Removing user addition as an <option>",H),ti&&ti.observe(Y[0],{childList:!0,subtree:!0}))},message:function(){Ve.children(je.message).remove()},searchWidth:function(){k.css("width","")},searchTerm:function(){p.verbose("Cleared search term"),k.val(""),p.set.filtered()},userAddition:function(){Ye.filter(je.addition).remove()},selected:function(j,H){if(H=q.allowAdditions?H||p.get.itemWithAdditions(j):H||p.get.item(j),!H)return!1;H.each(function(){var ge=r(this),me=p.get.choiceText(ge),De=p.get.choiceValue(ge,me);p.is.multiple()?q.useLabels?(p.remove.value(De,me,ge),p.remove.label(De)):(p.remove.value(De,me,ge),p.get.selectionCount()===0?p.set.placeholderText():p.set.text(p.add.variables(c.count))):p.remove.value(De,me,ge),ge.removeClass(ne.filtered).removeClass(ne.active),q.useLabels&&ge.removeClass(ne.selected)})},selectedItem:function(){Ye.removeClass(ne.selected)},value:function(j,H,ge){var me=p.get.values(),De;j=p.escape.htmlEntities(j),p.has.selectInput()?(p.verbose("Input is <select> removing selected option",j),De=p.remove.arrayValue(j,me),p.remove.optionValue(j)):(p.verbose("Removing from delimited values",j),De=p.remove.arrayValue(j,me),De=De.join(q.delimiter)),q.fireOnInit===!1&&p.is.initialLoad()?p.verbose("No callback on initial load",q.onRemove):q.onRemove.call(ee,j,H,ge),p.set.value(De,H,ge),p.check.maxSelections()},arrayValue:function(j,H){return Array.isArray(H)||(H=[H]),H=r.grep(H,function(ge){return j!=ge}),p.verbose("Removed value from delimited string",j,H),H},label:function(j,H){var ge=ce.find(je.label),me=ge.filter("[data-"+tt.value+'="'+p.escape.string(q.ignoreCase?j.toLowerCase():j)+'"]');p.verbose("Removing label",me),me.remove()},activeLabels:function(j){j=j||ce.find(je.label).filter("."+ne.active),p.verbose("Removing active label selections",j),p.remove.labels(j)},labels:function(j){j=j||ce.find(je.label),p.verbose("Removing labels",j),j.each(function(){var H=r(this),ge=H.data(tt.value),me=ge!==_?String(ge):ge,De=p.is.userValue(me);if(q.onLabelRemove.call(H,ge)===!1){p.debug("Label remove callback cancelled removal");return}p.remove.message(),De?(p.remove.value(me),p.remove.label(me)):p.remove.selected(me)})},tabbable:function(){p.is.searchSelection()?(p.debug("Searchable dropdown initialized"),k.removeAttr("tabindex"),Ve.removeAttr("tabindex")):(p.debug("Simple selection dropdown initialized"),ce.removeAttr("tabindex"),Ve.removeAttr("tabindex"))},diacritics:function(j){return q.ignoreDiacritics?j.normalize("NFD").replace(/[\u0300-\u036f]/g,""):j}},has:{menuSearch:function(){return p.has.search()&&k.closest(Ve).length>0},clearItem:function(){return Oe.length>0},search:function(){return k.length>0},sizer:function(){return N.length>0},selectInput:function(){return Y.is("select")},minCharacters:function(j){return q.minCharacters&&!te?(j=String(j!==_?j:p.get.query()),j.length>=q.minCharacters):(te=!1,!0)},firstLetter:function(j,H){var ge,me;return!j||j.length===0||typeof H!="string"?!1:(ge=p.get.choiceText(j,!1),H=H.toLowerCase(),me=String(ge).charAt(0).toLowerCase(),H==me)},input:function(){return Y.length>0},items:function(){return Ye.length>0},menu:function(){return Ve.length>0},message:function(){return Ve.children(je.message).length!==0},label:function(j){var H=p.escape.value(j),ge=ce.find(je.label);return q.ignoreCase&&(H=H.toLowerCase()),ge.filter("[data-"+tt.value+'="'+p.escape.string(H)+'"]').length>0},maxSelections:function(){return q.maxSelections&&p.get.selectionCount()>=q.maxSelections},allResultsFiltered:function(){var j=Ye.not(je.addition);return j.filter(je.unselectable).length===j.length},userSuggestion:function(){return Ve.children(je.addition).length>0},query:function(){return p.get.query()!==""},value:function(j){return q.ignoreCase?p.has.valueIgnoringCase(j):p.has.valueMatchingCase(j)},valueMatchingCase:function(j){var H=p.get.values(),ge=Array.isArray(H)?H&&r.inArray(j,H)!==-1:H==j;return!!ge},valueIgnoringCase:function(j){var H=p.get.values(),ge=!1;return Array.isArray(H)||(H=[H]),r.each(H,function(me,De){if(String(j).toLowerCase()==String(De).toLowerCase())return ge=!0,!1}),ge}},is:{active:function(){return ce.hasClass(ne.active)},animatingInward:function(){return Ve.transition("is inward")},animatingOutward:function(){return Ve.transition("is outward")},bubbledLabelClick:function(j){return r(j.target).is("select, input")&&ce.closest("label").length>0},bubbledIconClick:function(j){return r(j.target).closest(ve).length>0},alreadySetup:function(){return ce.is("select")&&ce.parent(je.dropdown).data(xt)!==_&&ce.prev().length===0},animating:function(j){return j?j.transition&&j.transition("is animating"):Ve.transition&&Ve.transition("is animating")},leftward:function(j){var H=j||Ve;return H.hasClass(ne.leftward)},clearable:function(){return ce.hasClass(ne.clearable)||q.clearable},disabled:function(){return ce.hasClass(ne.disabled)},focused:function(){return b.activeElement===ce[0]},focusedOnSearch:function(){return b.activeElement===k[0]},allFiltered:function(){return(p.is.multiple()||p.has.search())&&!(q.hideAdditions==!1&&p.has.userSuggestion())&&!p.has.message()&&p.has.allResultsFiltered()},hidden:function(j){return!p.is.visible(j)},initialLoad:function(){return yt},inObject:function(j,H){var ge=!1;return r.each(H,function(me,De){if(De==j)return ge=!0,!0}),ge},multiple:function(){return ce.hasClass(ne.multiple)},remote:function(){return q.apiSettings&&p.can.useAPI()},single:function(){return!p.is.multiple()},selectMutation:function(j){var H=!1;return r.each(j,function(ge,me){if(r(me.target).is("select")||r(me.addedNodes).is("select"))return H=!0,!1}),H},search:function(){return ce.hasClass(ne.search)},searchSelection:function(){return p.has.search()&&k.parent(je.dropdown).length===1},selection:function(){return ce.hasClass(ne.selection)},userValue:function(j){return r.inArray(j,p.get.userValues())!==-1},upward:function(j){var H=j||ce;return H.hasClass(ne.upward)},visible:function(j){return j?j.hasClass(ne.visible):Ve.hasClass(ne.visible)},verticallyScrollableContext:function(){var j=G.get(0)!==v?G.css("overflow-y"):!1;return j=="auto"||j=="scroll"},horizontallyScrollableContext:function(){var j=G.get(0)!==v?G.css("overflow-X"):!1;return j=="auto"||j=="scroll"}},can:{activate:function(j){return!!(q.useLabels||!p.has.maxSelections()||p.has.maxSelections()&&j.hasClass(ne.active))},openDownward:function(j){var H=j||Ve,ge=!0,me={},De;return H.addClass(ne.loading),De={context:{offset:G.get(0)===v?{top:0,left:0}:G.offset(),scrollTop:G.scrollTop(),height:G.outerHeight()},menu:{offset:H.offset(),height:H.outerHeight()}},p.is.verticallyScrollableContext()&&(De.menu.offset.top+=De.context.scrollTop),me={above:De.context.scrollTop<=De.menu.offset.top-De.context.offset.top-De.menu.height,below:De.context.scrollTop+De.context.height>=De.menu.offset.top-De.context.offset.top+De.menu.height},me.below?(p.verbose("Dropdown can fit in context downward",me),ge=!0):!me.below&&!me.above?(p.verbose("Dropdown cannot fit in either direction, favoring downward",me),ge=!0):(p.verbose("Dropdown cannot fit below, opening upward",me),ge=!1),H.removeClass(ne.loading),ge},openRightward:function(j){var H=j||Ve,ge=!0,me=!1,De;return H.addClass(ne.loading),De={context:{offset:G.get(0)===v?{top:0,left:0}:G.offset(),scrollLeft:G.scrollLeft(),width:G.outerWidth()},menu:{offset:H.offset(),width:H.outerWidth()}},p.is.horizontallyScrollableContext()&&(De.menu.offset.left+=De.context.scrollLeft),me=De.menu.offset.left-De.context.offset.left+De.menu.width>=De.context.scrollLeft+De.context.width,me&&(p.verbose("Dropdown cannot fit in context rightward",me),ge=!1),H.removeClass(ne.loading),ge},click:function(){return Z||q.on=="click"},extendSelect:function(){return q.allowAdditions||q.apiSettings},show:function(){return!p.is.disabled()&&(p.has.items()||p.has.message())},useAPI:function(){return r.fn.api!==_}},animate:{show:function(j,H){var ge=H||Ve,me=H?function(){}:function(){p.hideSubMenus(),p.hideOthers(),p.set.active()},De;if(j=r.isFunction(j)?j:function(){},p.verbose("Doing menu show animation",ge),p.set.direction(H),De=p.get.transition(H),p.is.selection()&&p.set.scrollPosition(p.get.selectedItem(),!0),p.is.hidden(ge)||p.is.animating(ge)){var ht=ce.hasClass("column")?"flex":!1;De=="none"?(me(),ge.transition({displayType:ht}).transition("show"),j.call(ee)):r.fn.transition!==_&&ce.transition("is supported")?ge.transition({animation:De+" in",debug:q.debug,verbose:q.verbose,duration:q.duration,queue:!0,onStart:me,displayType:ht,onComplete:function(){j.call(ee)}}):p.error(S.noTransition,De)}},hide:function(j,H){var ge=H||Ve,me=H?function(){}:function(){p.can.click()&&p.unbind.intent(),p.remove.active()},De=p.get.transition(H);j=r.isFunction(j)?j:function(){},(p.is.visible(ge)||p.is.animating(ge))&&(p.verbose("Doing menu hide animation",ge),De=="none"?(me(),ge.transition("hide"),j.call(ee)):r.fn.transition!==_&&ce.transition("is supported")?ge.transition({animation:De+" out",duration:q.duration,debug:q.debug,verbose:q.verbose,queue:!1,onStart:me,onComplete:function(){j.call(ee)}}):p.error(S.transition))}},hideAndClear:function(){p.remove.searchTerm(),!p.has.maxSelections()&&(p.has.search()?p.hide(function(){p.remove.filteredItem()}):p.hide())},delay:{show:function(){p.verbose("Delaying show event to ensure user intent"),clearTimeout(p.timer),p.timer=setTimeout(p.show,q.delay.show)},hide:function(){p.verbose("Delaying hide event to ensure user intent"),clearTimeout(p.timer),p.timer=setTimeout(p.hide,q.delay.hide)}},escape:{value:function(j){var H=Array.isArray(j),ge=typeof j=="string",me=!ge&&!H,De=ge&&j.search(et.quote)!==-1,ht=[];return me||!De?j:(p.debug("Encoding quote values for use in select",j),H?(r.each(j,function(rt,zt){ht.push(zt.replace(et.quote,"&quot;"))}),ht):j.replace(et.quote,"&quot;"))},string:function(j){return j=String(j),j.replace(et.escape,"\\$&")},htmlEntities:function(j){var H=/[<>"'`]/g,ge=/[&<>"'`]/,me={"<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},De=function(ht){return me[ht]};return ge.test(j)?(j=j.replace(/&(?![a-z0-9#]{1,6};)/,"&amp;"),j.replace(H,De)):j}},setting:function(j,H){if(p.debug("Changing setting",j,H),r.isPlainObject(j))r.extend(!0,q,j);else if(H!==_)r.isPlainObject(q[j])?r.extend(!0,q[j],H):q[j]=H;else return q[j]},internal:function(j,H){if(r.isPlainObject(j))r.extend(!0,p,j);else if(H!==_)p[j]=H;else return p[j]},debug:function(){!q.silent&&q.debug&&(q.performance?p.performance.log(arguments):(p.debug=Function.prototype.bind.call(console.info,console,q.name+":"),p.debug.apply(console,arguments)))},verbose:function(){!q.silent&&q.verbose&&q.debug&&(q.performance?p.performance.log(arguments):(p.verbose=Function.prototype.bind.call(console.info,console,q.name+":"),p.verbose.apply(console,arguments)))},error:function(){q.silent||(p.error=Function.prototype.bind.call(console.error,console,q.name+":"),p.error.apply(console,arguments))},performance:{log:function(j){var H,ge,me;q.performance&&(H=new Date().getTime(),me=we||H,ge=H-me,we=H,Be.push({Name:j[0],Arguments:[].slice.call(j,1)||"",Element:ee,"Execution Time":ge})),clearTimeout(p.performance.timer),p.performance.timer=setTimeout(p.performance.display,500)},display:function(){var j=q.name+":",H=0;we=!1,clearTimeout(p.performance.timer),r.each(Be,function(ge,me){H+=me["Execution Time"]}),j+=" "+H+"ms",J&&(j+=" '"+J+"'"),(console.group!==_||console.table!==_)&&Be.length>0&&(console.groupCollapsed(j),console.table?console.table(Be):r.each(Be,function(ge,me){console.log(me.Name+": "+me["Execution Time"]+"ms")}),console.groupEnd()),Be=[]}},invoke:function(j,H,ge){var me=oe,De,ht,rt;return H=H||Ke,ge=ee||ge,typeof j=="string"&&me!==_&&(j=j.split(/[\. ]/),De=j.length-1,r.each(j,function(zt,fi){var vi=zt!=De?fi+j[zt+1].charAt(0).toUpperCase()+j[zt+1].slice(1):j;if(r.isPlainObject(me[vi])&&zt!=De)me=me[vi];else{if(me[vi]!==_)return ht=me[vi],!1;if(r.isPlainObject(me[fi])&&zt!=De)me=me[fi];else return me[fi]!==_?(ht=me[fi],!1):(p.error(S.method,j),!1)}})),r.isFunction(ht)?rt=ht.apply(ge,H):ht!==_&&(rt=ht),Array.isArray(At)?At.push(rt):At!==_?At=[At,rt]:rt!==_&&(At=rt),ht}},Q?(oe===_&&p.initialize(),p.invoke(Ue)):(oe!==_&&oe.invoke("destroy"),p.initialize())}),At!==_?At:O},r.fn.dropdown.settings={silent:!1,debug:!1,verbose:!1,performance:!0,on:"click",action:"activate",values:!1,clearable:!1,apiSettings:!1,selectOnKeydown:!0,minCharacters:0,filterRemoteData:!1,saveRemoteData:!0,throttle:200,context:v,direction:"auto",keepOnScreen:!0,match:"both",fullTextSearch:!1,ignoreDiacritics:!1,hideDividers:!1,placeholder:"auto",preserveHTML:!0,sortSelect:!1,forceSelection:!0,allowAdditions:!1,ignoreCase:!1,ignoreSearchCase:!0,hideAdditions:!0,maxSelections:!1,useLabels:!0,delimiter:",",showOnFocus:!0,allowReselection:!1,allowTab:!0,allowCategorySelection:!1,fireOnInit:!1,transition:"auto",duration:200,glyphWidth:1.037,headerDivider:!0,label:{transition:"scale",duration:200,variation:!1},delay:{hide:300,show:200,search:20,touch:50},onChange:function(g,O,R){},onAdd:function(g,O,R){},onRemove:function(g,O,R){},onLabelSelect:function(g){},onLabelCreate:function(g,O){return r(this)},onLabelRemove:function(g){return!0},onNoResults:function(g){return!0},onShow:function(){},onHide:function(){},onAfterFiltered:function(){},name:"Dropdown",namespace:"dropdown",message:{addResult:"Add <b>{term}</b>",count:"{count} selected",maxSelections:"Max {maxCount} selections",noResults:"No results found.",serverError:"There was an error contacting the server"},error:{action:"You called a dropdown action that was not defined",alreadySetup:"Once a select has been initialized behaviors must be called on the created ui dropdown",labels:"Allowing user additions currently requires the use of labels.",missingMultiple:"<select> requires multiple property to be set to correctly preserve multiple values",method:"The method you called is not defined.",noAPI:"The API module is required to load resources remotely",noStorage:"Saving remote data requires session storage",noTransition:"This module requires ui transitions <https://github.com/Semantic-Org/UI-Transition>",noNormalize:'"ignoreDiacritics" setting will be ignored. Browser does not support String().normalize(). You may consider including <https://cdn.jsdelivr.net/npm/unorm@1.4.1/lib/unorm.min.js> as a polyfill.'},regExp:{escape:/[-[\]{}()*+?.,\\^$|#\s:=@]/g,quote:/"/g},metadata:{defaultText:"defaultText",defaultValue:"defaultValue",placeholderText:"placeholder",text:"text",value:"value"},fields:{remoteValues:"results",values:"values",disabled:"disabled",name:"name",value:"value",text:"text",type:"type",image:"image",imageClass:"imageClass",icon:"icon",iconClass:"iconClass",class:"class",divider:"divider"},keys:{backspace:8,delimiter:188,deleteKey:46,enter:13,escape:27,pageUp:33,pageDown:34,leftArrow:37,upArrow:38,rightArrow:39,downArrow:40},selector:{addition:".addition",divider:".divider, .header",dropdown:".ui.dropdown",hidden:".hidden",icon:"> .dropdown.icon",input:'> input[type="hidden"], > select',item:".item",label:"> .label",remove:"> .label > .delete.icon",siblingLabel:".label",menu:".menu",message:".message",menuIcon:".dropdown.icon",search:"input.search, .menu > .search > input, .menu input.search",sizer:"> span.sizer",text:"> .text:not(.icon)",unselectable:".disabled, .filtered, .tw-hidden",clearIcon:"> .remove.icon"},className:{active:"active",addition:"addition",animating:"animating",disabled:"disabled",empty:"empty",dropdown:"ui dropdown",filtered:"filtered",hidden:"hidden transition",icon:"icon",image:"image",item:"item",label:"ui label",loading:"loading",menu:"menu",message:"message",multiple:"multiple",placeholder:"default",sizer:"sizer",search:"search",selected:"selected",selection:"selection",upward:"upward",leftward:"left",visible:"visible",clearable:"clearable",noselection:"noselection",delete:"delete",header:"header",divider:"divider",groupIcon:"",unfilterable:"unfilterable"}},r.fn.dropdown.settings.templates={deQuote:function(g){return String(g).replace(/"/g,"")},escape:function(g,O){if(O)return g;var R=/[<>"'`]/g,J=/[&<>"'`]/,Z={"<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},C=function(we){return Z[we]};return J.test(g)?(g=g.replace(/&(?![a-z0-9#]{1,6};)/,"&amp;"),g.replace(R,C)):g},dropdown:function(g,O,R,J){var Z=g.placeholder||!1,C="",we=r.fn.dropdown.settings.templates.escape;return C+='<i class="dropdown icon"></i>',Z?C+='<div class="default text">'+we(Z,R)+"</div>":C+='<div class="text"></div>',C+='<div class="'+J.menu+'">',C+=r.fn.dropdown.settings.templates.menu(g,O,R,J),C+="</div>",C},menu:function(g,O,R,J){var Z=g[O.values]||[],C="",we=r.fn.dropdown.settings.templates.escape,Be=r.fn.dropdown.settings.templates.deQuote;return r.each(Z,function(Ue,Q){var Ke=Q[O.type]?Q[O.type]:"item";if(Ke==="item"){var At=Q[O.text]?' data-text="'+we(Q[O.text])+'"':"",gt=Q[O.disabled]?J.disabled+" ":"";C+='<div class="'+gt+(Q[O.class]?Be(Q[O.class]):J.item)+'" data-value="'+we(Q[O.value])+'"'+At+">",Q[O.image]&&(C+='<img class="'+(Q[O.imageClass]?Be(Q[O.imageClass]):J.image)+'" src="'+Be(Q[O.image])+'">'),Q[O.icon]&&(C+='<i class="'+Be(Q[O.icon])+" "+(Q[O.iconClass]?Be(Q[O.iconClass]):J.icon)+'"></i>'),C+=we(Q[O.name]||"",R),C+="</div>"}else if(Ke==="header"){var q=we(Q[O.name]||"",R),ne=Q[O.icon]?Be(Q[O.icon]):J.groupIcon;(q!==""||ne!=="")&&(C+='<div class="'+(Q[O.class]?Be(Q[O.class]):J.header)+'">',ne!==""&&(C+='<i class="'+ne+" "+(Q[O.iconClass]?Be(Q[O.iconClass]):J.icon)+'"></i>'),C+=q,C+="</div>"),Q[O.divider]&&(C+='<div class="'+J.divider+'"></div>')}}),C},label:function(g,O,R,J){var Z=r.fn.dropdown.settings.templates.escape;return Z(O,R)+'<i class="'+J.delete+' icon"></i>'},message:function(g){return g},addition:function(g){return g}}})(jQuery,window,document);(function(r,v,b,_){"use strict";r.isFunction=r.isFunction||function(g){return typeof g=="function"&&typeof g.nodeType!="number"},v=typeof v<"u"&&v.Math==Math?v:typeof self<"u"&&self.Math==Math?self:Function("return this")(),r.fn.modal=function(g){var O=r(this),R=r(v),J=r(b),Z=r("body"),C=O.selector||"",we=new Date().getTime(),Be=[],Ue=arguments[0],Q=typeof Ue=="string",Ke=[].slice.call(arguments,1),At=v.requestAnimationFrame||v.mozRequestAnimationFrame||v.webkitRequestAnimationFrame||v.msRequestAnimationFrame||function(q){setTimeout(q,0)},gt;return O.each(function(){var q=r.isPlainObject(g)?r.extend(!0,{},r.fn.modal.settings,g):r.extend({},r.fn.modal.settings),ne=q.selector,c=q.className,W=q.namespace,Re=q.error,tt="."+W,st="module-"+W,et=r(this),je=r(q.context),S=et.find(ne.close),si,ct,xt,ce,G,P=this,k=et.data(st),N=!1,Y,ve,Oe="",Ne="",Ve,Ye,Lt,K;K={initialize:function(){K.cache={},K.verbose("Initializing dimmer",je),K.create.id(),K.create.dimmer(),q.allowMultiple&&K.create.innerDimmer(),q.centered||et.addClass("top aligned"),K.refreshModals(),K.bind.events(),q.observeChanges&&K.observeChanges(),K.instantiate()},instantiate:function(){K.verbose("Storing instance of modal"),k=K,et.data(st,k)},create:{dimmer:function(){var Ee={debug:q.debug,dimmerName:"modals"},nt=r.extend(!0,Ee,q.dimmerSettings);if(r.fn.dimmer===_){K.error(Re.dimmer);return}K.debug("Creating dimmer"),ce=je.dimmer(nt),q.detachable?(K.verbose("Modal is detachable, moving content into dimmer"),ce.dimmer("add content",et)):K.set.undetached(),G=ce.dimmer("get dimmer")},id:function(){Ye=(Math.random().toString(16)+"000000000").substr(2,8),Ve="."+Ye,K.verbose("Creating unique id for element",Ye)},innerDimmer:function(){et.find(ne.dimmer).length==0&&et.prepend('<div class="ui inverted dimmer"></div>')}},destroy:function(){Lt&&Lt.disconnect(),K.verbose("Destroying previous modal"),et.removeData(st).off(tt),R.off(Ve),G.off(Ve),S.off(tt),je.dimmer("destroy")},observeChanges:function(){"MutationObserver"in v&&(Lt=new MutationObserver(function(Ee){K.debug("DOM tree modified, refreshing"),K.refresh()}),Lt.observe(P,{childList:!0,subtree:!0}),K.debug("Setting up mutation observer",Lt))},refresh:function(){K.remove.scrolling(),K.cacheSizes(),K.can.useFlex()||K.set.modalOffset(),K.set.screenHeight(),K.set.type()},refreshModals:function(){ct=et.siblings(ne.modal),si=ct.add(et)},attachEvents:function(Ee,nt){var te=r(Ee);nt=r.isFunction(K[nt])?K[nt]:K.toggle,te.length>0?(K.debug("Attaching modal events to element",Ee,nt),te.off(tt).on("click"+tt,nt)):K.error(Re.notFound,Ee)},bind:{events:function(){K.verbose("Attaching events"),et.on("click"+tt,ne.close,K.event.close).on("click"+tt,ne.approve,K.event.approve).on("click"+tt,ne.deny,K.event.deny),R.on("resize"+Ve,K.event.resize)},scrollLock:function(){ce.get(0).addEventListener("touchmove",K.event.preventScroll,{passive:!1})}},unbind:{scrollLock:function(){ce.get(0).removeEventListener("touchmove",K.event.preventScroll,{passive:!1})}},get:{id:function(){return(Math.random().toString(16)+"000000000").substr(2,8)}},event:{approve:function(){if(N||q.onApprove.call(P,r(this))===!1){K.verbose("Approve callback returned false cancelling hide");return}N=!0,K.hide(function(){N=!1})},preventScroll:function(Ee){Ee.target.className.indexOf("dimmer")!==-1&&Ee.preventDefault()},deny:function(){if(N||q.onDeny.call(P,r(this))===!1){K.verbose("Deny callback returned false cancelling hide");return}N=!0,K.hide(function(){N=!1})},close:function(){K.hide()},mousedown:function(Ee){var nt=r(Ee.target),te=K.is.rtl();Y=nt.closest(ne.modal).length>0,Y&&K.verbose("Mouse down event registered inside the modal"),ve=K.is.scrolling()&&(!te&&r(v).outerWidth()-q.scrollbarWidth<=Ee.clientX||te&&q.scrollbarWidth>=Ee.clientX),ve&&K.verbose("Mouse down event registered inside the scrollbar")},mouseup:function(Ee){if(!q.closable){K.verbose("Dimmer clicked but closable setting is disabled");return}if(Y){K.debug("Dimmer clicked but mouse down was initially registered inside the modal");return}if(ve){K.debug("Dimmer clicked but mouse down was initially registered inside the scrollbar");return}var nt=r(Ee.target),te=nt.closest(ne.modal).length>0,ee=r.contains(b.documentElement,Ee.target);if(!te&&ee&&K.is.active()&&et.hasClass(c.front)){if(K.debug("Dimmer clicked, hiding all modals"),q.allowMultiple){if(!K.hideAll())return}else if(!K.hide())return;K.remove.clickaway()}},debounce:function(Ee,nt){clearTimeout(K.timer),K.timer=setTimeout(Ee,nt)},keyboard:function(Ee){var nt=Ee.which,te=27;nt==te&&(q.closable?(K.debug("Escape key pressed hiding modal"),et.hasClass(c.front)&&K.hide()):K.debug("Escape key pressed, but closable is set to false"),Ee.preventDefault())},resize:function(){ce.dimmer("is active")&&(K.is.animating()||K.is.active())&&At(K.refresh)}},toggle:function(){K.is.active()||K.is.animating()?K.hide():K.show()},show:function(Ee){Ee=r.isFunction(Ee)?Ee:function(){},K.refreshModals(),K.set.dimmerSettings(),K.set.dimmerStyles(),K.showModal(Ee)},hide:function(Ee){return Ee=r.isFunction(Ee)?Ee:function(){},K.refreshModals(),K.hideModal(Ee)},showModal:function(Ee){Ee=r.isFunction(Ee)?Ee:function(){},K.is.animating()||!K.is.active()?(K.showDimmer(),K.cacheSizes(),K.set.bodyMargin(),K.can.useFlex()?K.remove.legacy():(K.set.legacy(),K.set.modalOffset(),K.debug("Using non-flex legacy modal positioning.")),K.set.screenHeight(),K.set.type(),K.set.clickaway(),!q.allowMultiple&&K.others.active()?K.hideOthers(K.showModal):(N=!1,q.allowMultiple&&(K.others.active()&&ct.filter("."+c.active).find(ne.dimmer).addClass("active"),q.detachable&&et.detach().appendTo(G)),q.onShow.call(P),q.transition&&r.fn.transition!==_&&et.transition("is supported")?(K.debug("Showing modal with css animations"),et.transition({debug:q.debug,animation:q.transition+" in",queue:q.queue,duration:q.duration,useFailSafe:!0,onComplete:function(){q.onVisible.apply(P),q.keyboardShortcuts&&K.add.keyboardShortcuts(),K.save.focus(),K.set.active(),q.autofocus&&K.set.autofocus(),Ee()}})):K.error(Re.noTransition))):K.debug("Modal is already visible")},hideModal:function(Ee,nt,te){var ee=ct.filter("."+c.active).last();if(Ee=r.isFunction(Ee)?Ee:function(){},K.debug("Hiding modal"),q.onHide.call(P,r(this))===!1)return K.verbose("Hide callback returned false cancelling hide"),N=!1,!1;(K.is.animating()||K.is.active())&&(q.transition&&r.fn.transition!==_&&et.transition("is supported")?(K.remove.active(),et.transition({debug:q.debug,animation:q.transition+" out",queue:q.queue,duration:q.duration,useFailSafe:!0,onStart:function(){!K.others.active()&&!K.others.animating()&&!nt&&K.hideDimmer(),q.keyboardShortcuts&&!K.others.active()&&K.remove.keyboardShortcuts()},onComplete:function(){K.unbind.scrollLock(),q.allowMultiple&&(ee.addClass(c.front),et.removeClass(c.front),te?si.find(ne.dimmer).removeClass("active"):ee.find(ne.dimmer).removeClass("active")),q.onHidden.call(P),K.remove.dimmerStyles(),K.restore.focus(),Ee()}})):K.error(Re.noTransition))},showDimmer:function(){ce.dimmer("is animating")||!ce.dimmer("is active")?(K.save.bodyMargin(),K.debug("Showing dimmer"),ce.dimmer("show")):K.debug("Dimmer already visible")},hideDimmer:function(){if(ce.dimmer("is animating")||ce.dimmer("is active"))K.unbind.scrollLock(),ce.dimmer("hide",function(){K.restore.bodyMargin(),K.remove.clickaway(),K.remove.screenHeight()});else{K.debug("Dimmer is not visible cannot hide");return}},hideAll:function(Ee){var nt=si.filter("."+c.active+", ."+c.animating);if(Ee=r.isFunction(Ee)?Ee:function(){},nt.length>0){K.debug("Hiding all visible modals");var te=!0;return r(nt.get().reverse()).each(function(ee,oe){te&&(te=r(oe).modal("hide modal",Ee,!1,!0))}),te&&K.hideDimmer(),te}},hideOthers:function(Ee){var nt=ct.filter("."+c.active+", ."+c.animating);Ee=r.isFunction(Ee)?Ee:function(){},nt.length>0&&(K.debug("Hiding other modals",ct),nt.modal("hide modal",Ee,!0))},others:{active:function(){return ct.filter("."+c.active).length>0},animating:function(){return ct.filter("."+c.animating).length>0}},add:{keyboardShortcuts:function(){K.verbose("Adding keyboard shortcuts"),J.on("keyup"+tt,K.event.keyboard)}},save:{focus:function(){var Ee=r(b.activeElement),nt=Ee.closest(et).length>0;nt||(xt=r(b.activeElement).blur())},bodyMargin:function(){Oe=Z.css("margin-"+(K.can.leftBodyScrollbar()?"left":"right"));var Ee=parseInt(Oe.replace(/[^\d.]/g,"")),nt=v.innerWidth-b.documentElement.clientWidth;Ne=Ee+nt}},restore:{focus:function(){xt&&xt.length>0&&q.restoreFocus&&xt.focus()},bodyMargin:function(){var Ee=K.can.leftBodyScrollbar()?"left":"right";Z.css("margin-"+Ee,Oe),Z.find(ne.bodyFixed.replace("right",Ee)).css("padding-"+Ee,Oe)}},remove:{active:function(){et.removeClass(c.active)},legacy:function(){et.removeClass(c.legacy)},clickaway:function(){q.detachable||et.off("mousedown"+Ve),G.off("mousedown"+Ve),G.off("mouseup"+Ve)},dimmerStyles:function(){G.removeClass(c.inverted),ce.removeClass(c.blurring)},bodyStyle:function(){Z.attr("style")===""&&(K.verbose("Removing style attribute"),Z.removeAttr("style"))},screenHeight:function(){K.debug("Removing page height"),Z.css("height","")},keyboardShortcuts:function(){K.verbose("Removing keyboard shortcuts"),J.off("keyup"+tt)},scrolling:function(){ce.removeClass(c.scrolling),et.removeClass(c.scrolling)}},cacheSizes:function(){et.addClass(c.loading);var Ee=et.prop("scrollHeight"),nt=et.outerWidth(),te=et.outerHeight();(K.cache.pageHeight===_||te!==0)&&(r.extend(K.cache,{pageHeight:r(b).outerHeight(),width:nt,height:te+q.offset,scrollHeight:Ee+q.offset,contextHeight:q.context=="body"?r(v).height():ce.height()}),K.cache.topOffset=-(K.cache.height/2)),et.removeClass(c.loading),K.debug("Caching modal and container sizes",K.cache)},can:{leftBodyScrollbar:function(){return K.cache.leftBodyScrollbar===_&&(K.cache.leftBodyScrollbar=K.is.rtl()&&(K.is.iframe&&!K.is.firefox()||K.is.safari()||K.is.edge()||K.is.ie())),K.cache.leftBodyScrollbar},useFlex:function(){return q.useFlex==="auto"?q.detachable&&!K.is.ie():(q.useFlex&&K.is.ie()?K.debug("useFlex true is not supported in IE"):q.useFlex&&!q.detachable&&K.debug("useFlex true in combination with detachable false is not supported"),q.useFlex)},fit:function(){var Ee=K.cache.contextHeight,nt=K.cache.contextHeight/2,te=K.cache.topOffset,ee=K.cache.scrollHeight,oe=K.cache.height,Ge=q.padding,yt=nt+te;return ee>oe?yt+ee+Ge<Ee:oe+Ge*2<Ee}},is:{active:function(){return et.hasClass(c.active)},ie:function(){if(K.cache.isIE===_){var Ee=!v.ActiveXObject&&"ActiveXObject"in v,nt="ActiveXObject"in v;K.cache.isIE=Ee||nt}return K.cache.isIE},animating:function(){return et.transition("is supported")?et.transition("is animating"):et.is(":visible")},scrolling:function(){return ce.hasClass(c.scrolling)},modernBrowser:function(){return!(v.ActiveXObject||"ActiveXObject"in v)},rtl:function(){return K.cache.isRTL===_&&(K.cache.isRTL=Z.attr("dir")==="rtl"||Z.css("direction")==="rtl"),K.cache.isRTL},safari:function(){return K.cache.isSafari===_&&(K.cache.isSafari=/constructor/i.test(v.HTMLElement)||!!v.ApplePaySession),K.cache.isSafari},edge:function(){return K.cache.isEdge===_&&(K.cache.isEdge=!!v.setImmediate&&!K.is.ie()),K.cache.isEdge},firefox:function(){return K.cache.isFirefox===_&&(K.cache.isFirefox=!!v.InstallTrigger),K.cache.isFirefox},iframe:function(){return self!==top}},set:{autofocus:function(){var Ee=et.find("[tabindex], :input").filter(":visible").filter(function(){return r(this).closest(".disabled").length===0}),nt=Ee.filter("[autofocus]"),te=nt.length>0?nt.first():Ee.first();te.length>0&&te.focus()},bodyMargin:function(){var Ee=K.can.leftBodyScrollbar()?"left":"right";(q.detachable||K.can.fit())&&Z.css("margin-"+Ee,Ne+"px"),Z.find(ne.bodyFixed.replace("right",Ee)).css("padding-"+Ee,Ne+"px")},clickaway:function(){q.detachable||et.on("mousedown"+Ve,K.event.mousedown),G.on("mousedown"+Ve,K.event.mousedown),G.on("mouseup"+Ve,K.event.mouseup)},dimmerSettings:function(){if(r.fn.dimmer===_){K.error(Re.dimmer);return}var Ee={debug:q.debug,dimmerName:"modals",closable:"auto",useFlex:K.can.useFlex(),duration:{show:q.duration,hide:q.duration}},nt=r.extend(!0,Ee,q.dimmerSettings);q.inverted&&(nt.variation=nt.variation!==_?nt.variation+" inverted":"inverted"),je.dimmer("setting",nt)},dimmerStyles:function(){q.inverted?G.addClass(c.inverted):G.removeClass(c.inverted),q.blurring?ce.addClass(c.blurring):ce.removeClass(c.blurring)},modalOffset:function(){if(q.detachable)et.css({marginTop:!et.hasClass("aligned")&&K.can.fit()?-(K.cache.height/2):q.padding/2,marginLeft:-(K.cache.width/2)});else{var Ee=K.can.fit();et.css({top:!et.hasClass("aligned")&&Ee?r(b).scrollTop()+(K.cache.contextHeight-K.cache.height)/2:!Ee||et.hasClass("top")?r(b).scrollTop()+q.padding:r(b).scrollTop()+(K.cache.contextHeight-K.cache.height-q.padding),marginLeft:-(K.cache.width/2)})}K.verbose("Setting modal offset for legacy mode")},screenHeight:function(){K.can.fit()?Z.css("height",""):et.hasClass("bottom")||(K.debug("Modal is taller than page content, resizing page height"),Z.css("height",K.cache.height+q.padding*2))},active:function(){et.addClass(c.active+" "+c.front),ct.filter("."+c.active).removeClass(c.front)},scrolling:function(){ce.addClass(c.scrolling),et.addClass(c.scrolling),K.unbind.scrollLock()},legacy:function(){et.addClass(c.legacy)},type:function(){K.can.fit()?(K.verbose("Modal fits on screen"),!K.others.active()&&!K.others.animating()&&(K.remove.scrolling(),K.bind.scrollLock())):et.hasClass("bottom")?K.verbose("Bottom aligned modal not fitting on screen is unsupported for scrolling"):(K.verbose("Modal cannot fit on screen setting to scrolling"),K.set.scrolling())},undetached:function(){ce.addClass(c.undetached)}},setting:function(Ee,nt){if(K.debug("Changing setting",Ee,nt),r.isPlainObject(Ee))r.extend(!0,q,Ee);else if(nt!==_)r.isPlainObject(q[Ee])?r.extend(!0,q[Ee],nt):q[Ee]=nt;else return q[Ee]},internal:function(Ee,nt){if(r.isPlainObject(Ee))r.extend(!0,K,Ee);else if(nt!==_)K[Ee]=nt;else return K[Ee]},debug:function(){!q.silent&&q.debug&&(q.performance?K.performance.log(arguments):(K.debug=Function.prototype.bind.call(console.info,console,q.name+":"),K.debug.apply(console,arguments)))},verbose:function(){!q.silent&&q.verbose&&q.debug&&(q.performance?K.performance.log(arguments):(K.verbose=Function.prototype.bind.call(console.info,console,q.name+":"),K.verbose.apply(console,arguments)))},error:function(){q.silent||(K.error=Function.prototype.bind.call(console.error,console,q.name+":"),K.error.apply(console,arguments))},performance:{log:function(Ee){var nt,te,ee;q.performance&&(nt=new Date().getTime(),ee=we||nt,te=nt-ee,we=nt,Be.push({Name:Ee[0],Arguments:[].slice.call(Ee,1)||"",Element:P,"Execution Time":te})),clearTimeout(K.performance.timer),K.performance.timer=setTimeout(K.performance.display,500)},display:function(){var Ee=q.name+":",nt=0;we=!1,clearTimeout(K.performance.timer),r.each(Be,function(te,ee){nt+=ee["Execution Time"]}),Ee+=" "+nt+"ms",C&&(Ee+=" '"+C+"'"),(console.group!==_||console.table!==_)&&Be.length>0&&(console.groupCollapsed(Ee),console.table?console.table(Be):r.each(Be,function(te,ee){console.log(ee.Name+": "+ee["Execution Time"]+"ms")}),console.groupEnd()),Be=[]}},invoke:function(Ee,nt,te){var ee=k,oe,Ge,yt;return nt=nt||Ke,te=P||te,typeof Ee=="string"&&ee!==_&&(Ee=Ee.split(/[\. ]/),oe=Ee.length-1,r.each(Ee,function(jt,Bt){var Qt=jt!=oe?Bt+Ee[jt+1].charAt(0).toUpperCase()+Ee[jt+1].slice(1):Ee;if(r.isPlainObject(ee[Qt])&&jt!=oe)ee=ee[Qt];else{if(ee[Qt]!==_)return Ge=ee[Qt],!1;if(r.isPlainObject(ee[Bt])&&jt!=oe)ee=ee[Bt];else return ee[Bt]!==_&&(Ge=ee[Bt]),!1}})),r.isFunction(Ge)?yt=Ge.apply(te,nt):Ge!==_&&(yt=Ge),Array.isArray(gt)?gt.push(yt):gt!==_?gt=[gt,yt]:yt!==_&&(gt=yt),Ge}},Q?(k===_&&K.initialize(),K.invoke(Ue)):(k!==_&&k.invoke("destroy"),K.initialize())}),gt!==_?gt:this},r.fn.modal.settings={name:"Modal",namespace:"modal",useFlex:"auto",offset:0,silent:!1,debug:!1,verbose:!1,performance:!0,observeChanges:!1,allowMultiple:!1,detachable:!0,closable:!0,autofocus:!0,restoreFocus:!0,inverted:!1,blurring:!1,centered:!0,dimmerSettings:{closable:!1,useCSS:!0},keyboardShortcuts:!0,context:"body",queue:!1,duration:500,transition:"scale",padding:50,scrollbarWidth:10,onShow:function(){},onVisible:function(){},onHide:function(){return!0},onHidden:function(){},onApprove:function(){return!0},onDeny:function(){return!0},selector:{close:"> .close",approve:".actions .positive, .actions .approve, .actions .ok",deny:".actions .negative, .actions .deny, .actions .cancel",modal:".ui.modal",dimmer:"> .ui.dimmer",bodyFixed:"> .ui.fixed.menu, > .ui.right.toast-container, > .ui.right.sidebar"},error:{dimmer:"UI Dimmer, a required component is not included in this page",method:"The method you called is not defined.",notFound:"The element you specified could not be found"},className:{active:"active",animating:"animating",blurring:"blurring",inverted:"inverted",legacy:"legacy",loading:"loading",scrolling:"scrolling",undetached:"undetached",front:"front"}}})(jQuery,window,document);(function(r,v,b,_){"use strict";r.isFunction=r.isFunction||function(g){return typeof g=="function"&&typeof g.nodeType!="number"},v=typeof v<"u"&&v.Math==Math?v:typeof self<"u"&&self.Math==Math?self:Function("return this")(),r.fn.search=function(g){var O=r(this),R=O.selector||"",J=new Date().getTime(),Z=[],C=arguments[0],we=typeof C=="string",Be=[].slice.call(arguments,1),Ue;return r(this).each(function(){var Q=r.isPlainObject(g)?r.extend(!0,{},r.fn.search.settings,g):r.extend({},r.fn.search.settings),Ke=Q.className,At=Q.metadata,gt=Q.regExp,q=Q.fields,ne=Q.selector,c=Q.error,W=Q.namespace,Re="."+W,tt=W+"-module",st=r(this),et=st.find(ne.prompt),je=st.find(ne.searchButton),S=st.find(ne.results),si=st.find(ne.result),ct=st.find(ne.category),xt=this,ce=st.data(tt),G=!1,P=!1,k;k={initialize:function(){k.verbose("Initializing module"),k.get.settings(),k.determine.searchFields(),k.bind.events(),k.set.type(),k.create.results(),k.instantiate()},instantiate:function(){k.verbose("Storing instance of module",k),ce=k,st.data(tt,k)},destroy:function(){k.verbose("Destroying instance"),st.off(Re).removeData(tt)},refresh:function(){k.debug("Refreshing selector cache"),et=st.find(ne.prompt),je=st.find(ne.searchButton),ct=st.find(ne.category),S=st.find(ne.results),si=st.find(ne.result)},refreshResults:function(){S=st.find(ne.results),si=st.find(ne.result)},bind:{events:function(){k.verbose("Binding events to search"),Q.automatic&&(st.on(k.get.inputEvent()+Re,ne.prompt,k.event.input),et.attr("autocomplete","off")),st.on("focus"+Re,ne.prompt,k.event.focus).on("blur"+Re,ne.prompt,k.event.blur).on("keydown"+Re,ne.prompt,k.handleKeyboard).on("click"+Re,ne.searchButton,k.query).on("mousedown"+Re,ne.results,k.event.result.mousedown).on("mouseup"+Re,ne.results,k.event.result.mouseup).on("click"+Re,ne.result,k.event.result.click)}},determine:{searchFields:function(){g&&g.searchFields!==_&&(Q.searchFields=g.searchFields)}},event:{input:function(){Q.searchDelay?(clearTimeout(k.timer),k.timer=setTimeout(function(){k.is.focused()&&k.query()},Q.searchDelay)):k.query()},focus:function(){k.set.focus(),Q.searchOnFocus&&k.has.minimumCharacters()&&k.query(function(){k.can.show()&&k.showResults()})},blur:function(N){var Y=b.activeElement===this,ve=function(){k.cancel.query(),k.remove.focus(),k.timer=setTimeout(k.hideResults,Q.hideDelay)};Y||(P=!1,k.resultsClicked?(k.debug("Determining if user action caused search to close"),st.one("click.close"+Re,ne.results,function(Oe){if(k.is.inMessage(Oe)||G){et.focus();return}G=!1,!k.is.animating()&&!k.is.hidden()&&ve()})):(k.debug("Input blurred without user action, closing results"),ve()))},result:{mousedown:function(){k.resultsClicked=!0},mouseup:function(){k.resultsClicked=!1},click:function(N){k.debug("Search result selected");var Y=r(this),ve=Y.find(ne.title).eq(0),Oe=Y.is("a[href]")?Y:Y.find("a[href]").eq(0),Ne=Oe.attr("href")||!1,Ve=Oe.attr("target")||!1,Ye=ve.length>0?ve.text():!1,Lt=k.get.results(),K=Y.data(At.result)||k.get.result(Ye,Lt);if(Ye&&k.set.value(Ye),r.isFunction(Q.onSelect)&&Q.onSelect.call(xt,K,Lt)===!1){k.debug("Custom onSelect callback cancelled default select action"),G=!0;return}k.hideResults(),Ne&&(N.preventDefault(),k.verbose("Opening search link found in result",Oe),Ve=="_blank"||N.ctrlKey?v.open(Ne):v.location.href=Ne)}}},ensureVisible:function(Y){var ve,Oe,Ne,Ve;ve=Y.position().top,Oe=ve+Y.outerHeight(!0),Ne=S.scrollTop(),Ve=S.height(),parseInt(S.css("paddingTop"),0)+parseInt(S.css("paddingBottom"),0),ve<0?S.scrollTop(Ne+ve):Ve<Oe&&S.scrollTop(Ne+(Oe-Ve))},handleKeyboard:function(N){var Y=st.find(ne.result),ve=st.find(ne.category),Oe=Y.filter("."+Ke.active),Ne=Y.index(Oe),Ve=Y.length,Ye=Oe.length>0,Lt=N.which,K={backspace:8,enter:13,escape:27,upArrow:38,downArrow:40},Ee;if(Lt==K.escape&&(k.verbose("Escape key pressed, blurring search field"),k.hideResults(),P=!0),k.is.visible())if(Lt==K.enter){if(k.verbose("Enter key pressed, selecting active result"),Y.filter("."+Ke.active).length>0)return k.event.result.click.call(Y.filter("."+Ke.active),N),N.preventDefault(),!1}else Lt==K.upArrow&&Ye?(k.verbose("Up key pressed, changing active result"),Ee=Ne-1<0?Ne:Ne-1,ve.removeClass(Ke.active),Y.removeClass(Ke.active).eq(Ee).addClass(Ke.active).closest(ve).addClass(Ke.active),k.ensureVisible(Y.eq(Ee)),N.preventDefault()):Lt==K.downArrow&&(k.verbose("Down key pressed, changing active result"),Ee=Ne+1>=Ve?Ne:Ne+1,ve.removeClass(Ke.active),Y.removeClass(Ke.active).eq(Ee).addClass(Ke.active).closest(ve).addClass(Ke.active),k.ensureVisible(Y.eq(Ee)),N.preventDefault());else Lt==K.enter&&(k.verbose("Enter key pressed, executing query"),k.query(),k.set.buttonPressed(),et.one("keyup",k.remove.buttonFocus))},setup:{api:function(N,Y){var ve={debug:Q.debug,on:!1,cache:Q.cache,action:"search",urlData:{query:N},onSuccess:function(Oe){k.parse.response.call(xt,Oe,N),Y()},onFailure:function(){k.displayMessage(c.serverError),Y()},onAbort:function(Oe){},onError:k.error};r.extend(!0,ve,Q.apiSettings),k.verbose("Setting up API request",ve),st.api(ve)}},can:{useAPI:function(){return r.fn.api!==_},show:function(){return k.is.focused()&&!k.is.visible()&&!k.is.empty()},transition:function(){return Q.transition&&r.fn.transition!==_&&st.transition("is supported")}},is:{animating:function(){return S.hasClass(Ke.animating)},hidden:function(){return S.hasClass(Ke.hidden)},inMessage:function(N){if(N.target){var Y=r(N.target),ve=r.contains(b.documentElement,N.target);return ve&&Y.closest(ne.message).length>0}},empty:function(){return S.html()===""},visible:function(){return S.filter(":visible").length>0},focused:function(){return et.filter(":focus").length>0}},get:{settings:function(){r.isPlainObject(g)&&g.searchFullText&&(Q.fullTextSearch=g.searchFullText,k.error(Q.error.oldSearchSyntax,xt)),Q.ignoreDiacritics&&!String.prototype.normalize&&(Q.ignoreDiacritics=!1,k.error(c.noNormalize,xt))},inputEvent:function(){var N=et[0],Y=N!==_&&N.oninput!==_?"input":N!==_&&N.onpropertychange!==_?"propertychange":"keyup";return Y},value:function(){return et.val()},results:function(){var N=st.data(At.results);return N},result:function(N,Y){var ve=!1;return N=N!==_?N:k.get.value(),Y=Y!==_?Y:k.get.results(),Q.type==="category"?(k.debug("Finding result that matches",N),r.each(Y,function(Oe,Ne){if(Array.isArray(Ne.results)&&(ve=k.search.object(N,Ne.results)[0],ve))return!1})):(k.debug("Finding result in results object",N),ve=k.search.object(N,Y)[0]),ve||!1}},select:{firstResult:function(){k.verbose("Selecting first result"),si.first().addClass(Ke.active)}},set:{focus:function(){st.addClass(Ke.focus)},loading:function(){st.addClass(Ke.loading)},value:function(N){k.verbose("Setting search input value",N),et.val(N)},type:function(N){N=N||Q.type,Q.type=="category"&&st.addClass(Q.type)},buttonPressed:function(){je.addClass(Ke.pressed)}},remove:{loading:function(){st.removeClass(Ke.loading)},focus:function(){st.removeClass(Ke.focus)},buttonPressed:function(){je.removeClass(Ke.pressed)},diacritics:function(N){return Q.ignoreDiacritics?N.normalize("NFD").replace(/[\u0300-\u036f]/g,""):N}},query:function(N){N=r.isFunction(N)?N:function(){};var Y=k.get.value(),ve=k.read.cache(Y);N=N||function(){},k.has.minimumCharacters()?(ve?(k.debug("Reading result from cache",Y),k.save.results(ve.results),k.addResults(ve.html),k.inject.id(ve.results),N()):(k.debug("Querying for",Y),r.isPlainObject(Q.source)||Array.isArray(Q.source)?(k.search.local(Y),N()):k.can.useAPI()?k.search.remote(Y,N):(k.error(c.source),N())),Q.onSearchQuery.call(xt,Y)):k.hideResults()},search:{local:function(N){var Y=k.search.object(N,Q.source),ve;k.set.loading(),k.save.results(Y),k.debug("Returned full local search results",Y),Q.maxResults>0&&(k.debug("Using specified max results",Y),Y=Y.slice(0,Q.maxResults)),Q.type=="category"&&(Y=k.create.categoryResults(Y)),ve=k.generateResults({results:Y}),k.remove.loading(),k.addResults(ve),k.inject.id(Y),k.write.cache(N,{html:ve,results:Y})},remote:function(N,Y){Y=r.isFunction(Y)?Y:function(){},st.api("is loading")&&st.api("abort"),k.setup.api(N,Y),st.api("query")},object:function(N,Y,ve){N=k.remove.diacritics(String(N));var Oe=[],Ne=[],Ve=[],Ye=N.replace(gt.escape,"\\$&"),Lt=new RegExp(gt.beginsWith+Ye,"i"),K=function(Ee,nt){var te=r.inArray(nt,Oe)==-1,ee=r.inArray(nt,Ve)==-1,oe=r.inArray(nt,Ne)==-1;te&&ee&&oe&&Ee.push(nt)};return Y=Y||Q.source,ve=ve!==_?ve:Q.searchFields,Array.isArray(ve)||(ve=[ve]),Y===_||Y===!1?(k.error(c.source),[]):(r.each(ve,function(Ee,nt){r.each(Y,function(te,ee){var oe=typeof ee[nt]=="string"||typeof ee[nt]=="number";if(oe){var Ge;typeof ee[nt]=="string"?Ge=k.remove.diacritics(ee[nt]):Ge=ee[nt].toString(),Ge.search(Lt)!==-1?K(Oe,ee):Q.fullTextSearch==="exact"&&k.exactSearch(N,Ge)?K(Ne,ee):Q.fullTextSearch==!0&&k.fuzzySearch(N,Ge)&&K(Ve,ee)}})}),r.merge(Ne,Ve),r.merge(Oe,Ne),Oe)}},exactSearch:function(N,Y){return N=N.toLowerCase(),Y=Y.toLowerCase(),Y.indexOf(N)>-1},fuzzySearch:function(N,Y){var ve=Y.length,Oe=N.length;if(typeof N!="string"||(N=N.toLowerCase(),Y=Y.toLowerCase(),Oe>ve))return!1;if(Oe===ve)return N===Y;e:for(var Ne=0,Ve=0;Ne<Oe;Ne++){for(var Ye=N.charCodeAt(Ne);Ve<ve;)if(Y.charCodeAt(Ve++)===Ye)continue e;return!1}return!0},parse:{response:function(N,Y){if(Array.isArray(N)){var ve={};ve[q.results]=N,N=ve}var Oe=k.generateResults(N);k.verbose("Parsing server response",N),N!==_&&Y!==_&&N[q.results]!==_&&(k.addResults(Oe),k.inject.id(N[q.results]),k.write.cache(Y,{html:Oe,results:N[q.results]}),k.save.results(N[q.results]))}},cancel:{query:function(){k.can.useAPI()&&st.api("abort")}},has:{minimumCharacters:function(){var N=k.get.value(),Y=N.length;return Y>=Q.minCharacters},results:function(){if(S.length===0)return!1;var N=S.html();return N!=""}},clear:{cache:function(N){var Y=st.data(At.cache);N?N&&Y&&Y[N]&&(k.debug("Removing value from cache",N),delete Y[N],st.data(At.cache,Y)):(k.debug("Clearing cache",N),st.removeData(At.cache))}},read:{cache:function(N){var Y=st.data(At.cache);return Q.cache?(k.verbose("Checking cache for generated html for query",N),typeof Y=="object"&&Y[N]!==_?Y[N]:!1):!1}},create:{categoryResults:function(N){var Y={};return r.each(N,function(ve,Oe){Oe.category&&(Y[Oe.category]===_?(k.verbose("Creating new category of results",Oe.category),Y[Oe.category]={name:Oe.category,results:[Oe]}):Y[Oe.category].results.push(Oe))}),Y},id:function(N,Y){var ve=N+1,Oe,Ne;return Y!==_?(Oe=String.fromCharCode(97+Y),Ne=Oe+ve,k.verbose("Creating category result id",Ne)):(Ne=ve,k.verbose("Creating result id",Ne)),Ne},results:function(){S.length===0&&(S=r("<div />").addClass(Ke.results).appendTo(st))}},inject:{result:function(N,Y,ve){k.verbose("Injecting result into results");var Oe=ve!==_?S.children().eq(ve).children(ne.results).first().children(ne.result).eq(Y):S.children(ne.result).eq(Y);k.verbose("Injecting results metadata",Oe),Oe.data(At.result,N)},id:function(N){k.debug("Injecting unique ids into results");var Y=0,ve=0;return Q.type==="category"?r.each(N,function(Oe,Ne){Ne.results.length>0&&(ve=0,r.each(Ne.results,function(Ve,Ye){Ye.id===_&&(Ye.id=k.create.id(ve,Y)),k.inject.result(Ye,ve,Y),ve++}),Y++)}):r.each(N,function(Oe,Ne){Ne.id===_&&(Ne.id=k.create.id(ve)),k.inject.result(Ne,ve),ve++}),N}},save:{results:function(N){k.verbose("Saving current search results to metadata",N),st.data(At.results,N)}},write:{cache:function(N,Y){var ve=st.data(At.cache)!==_?st.data(At.cache):{};Q.cache&&(k.verbose("Writing generated html to cache",N,Y),ve[N]=Y,st.data(At.cache,ve))}},addResults:function(N){if(r.isFunction(Q.onResultsAdd)&&Q.onResultsAdd.call(S,N)===!1)return k.debug("onResultsAdd callback cancelled default action"),!1;N?(S.html(N),k.refreshResults(),Q.selectFirstResult&&k.select.firstResult(),k.showResults()):k.hideResults(function(){S.empty()})},showResults:function(N){N=r.isFunction(N)?N:function(){},!P&&!k.is.visible()&&k.has.results()&&(k.can.transition()?(k.debug("Showing results with css animations"),S.transition({animation:Q.transition+" in",debug:Q.debug,verbose:Q.verbose,duration:Q.duration,onShow:function(){var Y=st.find(ne.result).eq(0);Y.length>0&&k.ensureVisible(Y)},onComplete:function(){N()},queue:!0})):(k.debug("Showing results with javascript"),S.stop().fadeIn(Q.duration,Q.easing)),Q.onResultsOpen.call(S))},hideResults:function(N){N=r.isFunction(N)?N:function(){},k.is.visible()&&(k.can.transition()?(k.debug("Hiding results with css animations"),S.transition({animation:Q.transition+" out",debug:Q.debug,verbose:Q.verbose,duration:Q.duration,onComplete:function(){N()},queue:!0})):(k.debug("Hiding results with javascript"),S.stop().fadeOut(Q.duration,Q.easing)),Q.onResultsClose.call(S))},generateResults:function(N){k.debug("Generating html from response",N);var Y=Q.templates[Q.type],ve=r.isPlainObject(N[q.results])&&!r.isEmptyObject(N[q.results]),Oe=Array.isArray(N[q.results])&&N[q.results].length>0,Ne="";return ve||Oe?(Q.maxResults>0&&(ve?Q.type=="standard"&&k.error(c.maxResults):N[q.results]=N[q.results].slice(0,Q.maxResults)),r.isFunction(Y)?Ne=Y(N,q,Q.preserveHTML):k.error(c.noTemplate,!1)):Q.showNoResults&&(Ne=k.displayMessage(c.noResults,"empty",c.noResultsHeader)),Q.onResults.call(xt,N),Ne},displayMessage:function(N,Y,ve){return Y=Y||"standard",k.debug("Displaying message",N,Y,ve),k.addResults(Q.templates.message(N,Y,ve)),Q.templates.message(N,Y,ve)},setting:function(N,Y){if(r.isPlainObject(N))r.extend(!0,Q,N);else if(Y!==_)Q[N]=Y;else return Q[N]},internal:function(N,Y){if(r.isPlainObject(N))r.extend(!0,k,N);else if(Y!==_)k[N]=Y;else return k[N]},debug:function(){!Q.silent&&Q.debug&&(Q.performance?k.performance.log(arguments):(k.debug=Function.prototype.bind.call(console.info,console,Q.name+":"),k.debug.apply(console,arguments)))},verbose:function(){!Q.silent&&Q.verbose&&Q.debug&&(Q.performance?k.performance.log(arguments):(k.verbose=Function.prototype.bind.call(console.info,console,Q.name+":"),k.verbose.apply(console,arguments)))},error:function(){Q.silent||(k.error=Function.prototype.bind.call(console.error,console,Q.name+":"),k.error.apply(console,arguments))},performance:{log:function(N){var Y,ve,Oe;Q.performance&&(Y=new Date().getTime(),Oe=J||Y,ve=Y-Oe,J=Y,Z.push({Name:N[0],Arguments:[].slice.call(N,1)||"",Element:xt,"Execution Time":ve})),clearTimeout(k.performance.timer),k.performance.timer=setTimeout(k.performance.display,500)},display:function(){var N=Q.name+":",Y=0;J=!1,clearTimeout(k.performance.timer),r.each(Z,function(ve,Oe){Y+=Oe["Execution Time"]}),N+=" "+Y+"ms",R&&(N+=" '"+R+"'"),O.length>1&&(N+=" ("+O.length+")"),(console.group!==_||console.table!==_)&&Z.length>0&&(console.groupCollapsed(N),console.table?console.table(Z):r.each(Z,function(ve,Oe){console.log(Oe.Name+": "+Oe["Execution Time"]+"ms")}),console.groupEnd()),Z=[]}},invoke:function(N,Y,ve){var Oe=ce,Ne,Ve,Ye;return Y=Y||Be,ve=xt||ve,typeof N=="string"&&Oe!==_&&(N=N.split(/[\. ]/),Ne=N.length-1,r.each(N,function(Lt,K){var Ee=Lt!=Ne?K+N[Lt+1].charAt(0).toUpperCase()+N[Lt+1].slice(1):N;if(r.isPlainObject(Oe[Ee])&&Lt!=Ne)Oe=Oe[Ee];else{if(Oe[Ee]!==_)return Ve=Oe[Ee],!1;if(r.isPlainObject(Oe[K])&&Lt!=Ne)Oe=Oe[K];else return Oe[K]!==_&&(Ve=Oe[K]),!1}})),r.isFunction(Ve)?Ye=Ve.apply(ve,Y):Ve!==_&&(Ye=Ve),Array.isArray(Ue)?Ue.push(Ye):Ue!==_?Ue=[Ue,Ye]:Ye!==_&&(Ue=Ye),Ve}},we?(ce===_&&k.initialize(),k.invoke(C)):(ce!==_&&ce.invoke("destroy"),k.initialize())}),Ue!==_?Ue:this},r.fn.search.settings={name:"Search",namespace:"search",silent:!1,debug:!1,verbose:!1,performance:!0,type:"standard",minCharacters:1,selectFirstResult:!1,apiSettings:!1,source:!1,searchOnFocus:!0,searchFields:["id","title","description"],displayField:"",fullTextSearch:"exact",ignoreDiacritics:!1,automatic:!0,hideDelay:0,searchDelay:200,maxResults:7,cache:!0,showNoResults:!0,preserveHTML:!0,transition:"scale",duration:200,easing:"easeOutExpo",onSelect:!1,onResultsAdd:!1,onSearchQuery:function(g){},onResults:function(g){},onResultsOpen:function(){},onResultsClose:function(){},className:{animating:"animating",active:"active",empty:"empty",focus:"focus",hidden:"hidden",loading:"loading",results:"results",pressed:"down"},error:{source:"Cannot search. No source used, and Semantic API module was not included",noResultsHeader:"No Results",noResults:"Your search returned no results",logging:"Error in debug logging, exiting.",noEndpoint:"No search endpoint was specified",noTemplate:"A valid template name was not specified.",oldSearchSyntax:"searchFullText setting has been renamed fullTextSearch for consistency, please adjust your settings.",serverError:"There was an issue querying the server.",maxResults:"Results must be an array to use maxResults setting",method:"The method you called is not defined.",noNormalize:'"ignoreDiacritics" setting will be ignored. Browser does not support String().normalize(). You may consider including <https://cdn.jsdelivr.net/npm/unorm@1.4.1/lib/unorm.min.js> as a polyfill.'},metadata:{cache:"cache",results:"results",result:"result"},regExp:{escape:/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,beginsWith:"(?:s|^)"},fields:{categories:"results",categoryName:"name",categoryResults:"results",description:"description",image:"image",price:"price",results:"results",title:"title",url:"url",action:"action",actionText:"text",actionURL:"url"},selector:{prompt:".prompt",searchButton:".search.button",results:".results",message:".results > .message",category:".category",result:".result",title:".title, .name"},templates:{escape:function(g,O){if(O)return g;var R=/[<>"'`]/g,J=/[&<>"'`]/,Z={"<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},C=function(we){return Z[we]};return J.test(g)?(g=g.replace(/&(?![a-z0-9#]{1,6};)/,"&amp;"),g.replace(R,C)):g},message:function(g,O,R){var J="";return g!==_&&O!==_&&(J+='<div class="message '+O+'">',R&&(J+='<div class="header">'+R+"</div>"),J+=' <div class="description">'+g+"</div>",J+="</div>"),J},category:function(g,O,R){var J="",Z=r.fn.search.settings.templates.escape;return g[O.categoryResults]!==_?(r.each(g[O.categoryResults],function(C,we){we[O.results]!==_&&we.results.length>0&&(J+='<div class="category">',we[O.categoryName]!==_&&(J+='<div class="name">'+Z(we[O.categoryName],R)+"</div>"),J+='<div class="results">',r.each(we.results,function(Be,Ue){Ue[O.url]?J+='<a class="result" href="'+Ue[O.url].replace(/"/g,"")+'">':J+='<a class="result">',Ue[O.image]!==_&&(J+='<div class="image"> <img src="'+Ue[O.image].replace(/"/g,"")+'"></div>'),J+='<div class="content">',Ue[O.price]!==_&&(J+='<div class="price">'+Z(Ue[O.price],R)+"</div>"),Ue[O.title]!==_&&(J+='<div class="title">'+Z(Ue[O.title],R)+"</div>"),Ue[O.description]!==_&&(J+='<div class="description">'+Z(Ue[O.description],R)+"</div>"),J+="</div>",J+="</a>"}),J+="</div>",J+="</div>")}),g[O.action]&&(O.actionURL===!1?J+='<div class="action">'+Z(g[O.action][O.actionText],R)+"</div>":J+='<a href="'+g[O.action][O.actionURL].replace(/"/g,"")+'" class="action">'+Z(g[O.action][O.actionText],R)+"</a>"),J):!1},standard:function(g,O,R){var J="",Z=r.fn.search.settings.templates.escape;return g[O.results]!==_?(r.each(g[O.results],function(C,we){we[O.url]?J+='<a class="result" href="'+we[O.url].replace(/"/g,"")+'">':J+='<a class="result">',we[O.image]!==_&&(J+='<div class="image"> <img src="'+we[O.image].replace(/"/g,"")+'"></div>'),J+='<div class="content">',we[O.price]!==_&&(J+='<div class="price">'+Z(we[O.price],R)+"</div>"),we[O.title]!==_&&(J+='<div class="title">'+Z(we[O.title],R)+"</div>"),we[O.description]!==_&&(J+='<div class="description">'+Z(we[O.description],R)+"</div>"),J+="</div>",J+="</a>"}),g[O.action]&&(O.actionURL===!1?J+='<div class="action">'+Z(g[O.action][O.actionText],R)+"</div>":J+='<a href="'+g[O.action][O.actionURL].replace(/"/g,"")+'" class="action">'+Z(g[O.action][O.actionText],R)+"</a>"),J):!1}}}})(jQuery,window,document)}(),function(){"use strict";var Ml,Dl,Ol,ao,kn,dd,el,Va,Wa,fd,za,zc,Kc,Xc,ql,pa,Xr,Ka,Xa,zs,hd,nm,md,$l,is,bs,lo,Dn,Gn,Do,ga,Oo,Gr,va,Pl,ba,sm,qo,Gc,pd,rm;__webpack_require__.p=`${window.config?.assetUrlPrefix??"/assets"}/`;function r(e){const t=["/assets/js/monaco."];for(const i of t)if(e.stack?.includes(i))return!0;return!1}function v(e,t="error"){const i=document.querySelector(".page-content")??document.body,n=e.replace(/\W/g,"").trim();let s=i.querySelector(`.js-global-error[data-global-error-msg-compact="${n}"]`);if(!s){const u=document.createElement("div");u.innerHTML=`<div class="ui container js-global-error tw-my-[--page-spacing]"><div class="ui ${t} message tw-text-center tw-whitespace-pre-line"></div></div>`,s=u.childNodes[0]}const l=Number(s.getAttribute("data-global-error-msg-count"))+1;s.setAttribute("data-global-error-msg-compact",n),s.setAttribute("data-global-error-msg-count",l.toString()),s.querySelector(".ui.message").textContent=e+(l>1?` (${l})`:""),i.prepend(s)}function b({error:e,reason:t,message:i,type:n,filename:s,lineno:l,colno:u}){const m=e??t,y=String(new URL(__webpack_require__.p,window.location.origin)),{runModeIsProd:A}=window.config??{};if(!m&&(i&&console.error(new Error(i)),A)||m instanceof Error&&(!m.stack?.includes(y)&&A||r(m)))return;let L=m?.message??i;l&&(L+=` (${s} @ ${l}:${u})`);const z=L.endsWith(".")?"":".";v(`JavaScript ${n==="unhandledrejection"?"promise rejection":n}: ${L}${z} Open browser console to see more details.`)}function _(){if(window._globalHandlerErrors?._inited){v("The global error handler has been initialized, do not initialize it again");return}window.config||v("Gitea JavaScript code couldn't run correctly, please check your custom templates");for(const e of window._globalHandlerErrors||[])b(e);window._globalHandlerErrors={_inited:!0,push:e=>b(e)}}_();const g=e=>e.replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/'/g,"&#39;").replace(/</g,"&lt;").replace(/>/g,"&gt;"),O=e=>e.replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/&#0?39;/g,"'").replace(/&quot;/g,'"').replace(/&amp;/g,"&");function R(e,...t){if(typeof e=="string")return g(e);let i=e[0];for(const[n,s]of t.entries())i=i+g(String(s))+e[n+1];return i}function J(e,...t){if(typeof e=="string")return O(e);let i=e[0];for(const[n,s]of t.entries())i=i+O(String(s))+e[n+1];return i}var Z=__webpack_require__("./web_src/js/svg.ts"),C=__webpack_require__("./web_src/js/utils/dom.ts"),we=__webpack_require__("./node_modules/toastify-js/src/toastify.js"),Be=__webpack_require__.n(we);const Ue={info:{icon:"octicon-check",background:"var(--color-green)",duration:2500},warning:{icon:"gitea-exclamation",background:"var(--color-orange)",duration:-1},error:{icon:"gitea-exclamation",background:"var(--color-red)",duration:-1}};function Q(e,t,{gravity:i,position:n,duration:s,useHtmlBody:l,preventDuplicates:u=!0,...m}={}){const y=l?String(e):R(e),A=`${t}-${y}`;if(u){const pe=document.querySelector(`.toastify[data-toast-unique-key="${CSS.escape(A)}"]`);if(pe){const de=pe.querySelector(".toast-duplicate-number");(0,C.fi)(de),de.textContent=String(Number(de.textContent)+1),(0,C.b7)(de,"pulse-1p5-200");return}}const{icon:L,background:z,duration:X}=Ue[t??"info"],_e=Be()({text:`
DesignScreenshot/output/git.buildapp.eu.org_run/git.buildapp.eu.org_3_credentials_filled.html:248:`,"Plugins: https://atomiks.github.io/tippyjs/v6/plugins/"].join(" "))})}var vu=function(){return"innerHTML"};function dc(e,t){e[vu()]=t}function fc(e){var t=Eo();return e===!0?t.className=fl:(t.className=nc,Oa(e)?t.appendChild(e):dc(t,e)),t}function yl(e,t){Oa(t.content)?(dc(e,""),e.appendChild(t.content)):typeof t.content!="function"&&(t.allowHTML?dc(e,t.content):e.textContent=t.content)}function sa(e){var t=e.firstElementChild,i=jo(t.children);return{box:t,content:i.find(function(n){return n.classList.contains(zr)}),arrow:i.find(function(n){return n.classList.contains(fl)||n.classList.contains(nc)}),backdrop:i.find(function(n){return n.classList.contains(dl)})}}function bu(e){var t=Eo(),i=Eo();i.className=ic,i.setAttribute("data-state","hidden"),i.setAttribute("tabindex","-1");var n=Eo();n.className=zr,n.setAttribute("data-state","hidden"),yl(n,e.props),t.appendChild(i),i.appendChild(n),s(e.props,e.props);function s(l,u){var m=sa(t),y=m.box,A=m.content,L=m.arrow;u.theme?y.setAttribute("data-theme",u.theme):y.removeAttribute("data-theme"),typeof u.animation=="string"?y.setAttribute("data-animation",u.animation):y.removeAttribute("data-animation"),u.inertia?y.setAttribute("data-inertia",""):y.removeAttribute("data-inertia"),y.style.maxWidth=typeof u.maxWidth=="number"?u.maxWidth+"px":u.maxWidth,u.role?y.setAttribute("role",u.role):y.removeAttribute("role"),(l.content!==u.content||l.allowHTML!==u.allowHTML)&&yl(A,e.props),u.arrow?L?l.arrow!==u.arrow&&(y.removeChild(L),y.appendChild(fc(u.arrow))):y.appendChild(fc(u.arrow)):L&&y.removeChild(L)}return{popper:t,onUpdate:s}}bu.$$tippy=!0;var Ed=1,wl=[],Sl=[];function Ad(e,t){var i=_l(e,Object.assign({},Kn,Co(Da(t)))),n,s,l,u=!1,m=!1,y=!1,A=!1,L,z,X,_e=[],pe=hl(Pc,i.interactiveDebounce),de,Pe=Ed++,Le=null,Te=uu(i.plugins),He={isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},U={id:Pe,reference:e,popper:Eo(),popperInstance:Le,props:i,state:He,plugins:Te,clearDelayTimeouts:Bc,setProps:$c,setContent:Uc,show:T5,hide:L5,hideWithInteractivity:R5,enable:Bl,disable:Hc,unmount:M5,destroy:D5};if(!i.render)return U;var Se=i.render(U),ze=Se.popper,mt=Se.onUpdate;ze.setAttribute("data-tippy-root",""),ze.id="tippy-"+U.id,U.popper=ze,e._tippy=U,ze._tippy=U;var kt=Te.map(function(ut){return ut.fn(U)}),Kt=e.hasAttribute("aria-expanded");return Ya(),ss(),_s(),ns("onCreate",[U]),i.showOnCreate&&Hl(),ze.addEventListener("mouseenter",function(){U.props.interactive&&U.state.isVisible&&U.clearDelayTimeouts()}),ze.addEventListener("mouseleave",function(){U.props.interactive&&U.props.trigger.indexOf("mouseenter")>=0&&Hi().addEventListener("mousemove",pe)}),U;function gi(){var ut=U.props.touch;return Array.isArray(ut)?ut:[ut,0]}function li(){return gi()[0]==="hold"}function It(){var ut;return!!((ut=U.props.render)!=null&&ut.$$tippy)}function Si(){return de||e}function Hi(){var ut=Si().parentNode;return ut?oc(ut):document}function Qn(){return sa(ze)}function Un(ut){return U.state.isMounted&&!U.state.isVisible||Bs.isTouch||L&&L.type==="focus"?0:ta(U.props.delay,ut?0:1,Kn.delay)}function _s(ut){ut===void 0&&(ut=!1),ze.style.pointerEvents=U.props.interactive&&!ut?"":"none",ze.style.zIndex=""+U.props.zIndex}function ns(ut,ni,xi){if(xi===void 0&&(xi=!0),kt.forEach(function(Zi){Zi[ut]&&Zi[ut].apply(Zi,ni)}),xi){var vn;(vn=U.props)[ut].apply(vn,ni)}}function di(){var ut=U.props.aria;if(ut.content){var ni="aria-"+ut.content,xi=ze.id,vn=en(U.props.triggerTarget||e);vn.forEach(function(Zi){var Xs=Zi.getAttribute(ni);if(U.state.isVisible)Zi.setAttribute(ni,Xs?Xs+" "+xi:xi);else{var Lr=Xs&&Xs.replace(xi,"").trim();Lr?Zi.setAttribute(ni,Lr):Zi.removeAttribute(ni)}})}}function ss(){if(!(Kt||!U.props.aria.expanded)){var ut=en(U.props.triggerTarget||e);ut.forEach(function(ni){U.props.interactive?ni.setAttribute("aria-expanded",U.state.isVisible&&ni===Si()?"true":"false"):ni.removeAttribute("aria-expanded")})}}function Tr(){Hi().removeEventListener("mousemove",pe),wl=wl.filter(function(ut){return ut!==pe})}function Qs(ut){if(!(Bs.isTouch&&(y||ut.type==="mousedown"))){var ni=ut.composedPath&&ut.composedPath()[0]||ut.target;if(!(U.props.interactive&&Ir(ze,ni))){if(en(U.props.triggerTarget||e).some(function(xi){return Ir(xi,ni)})){if(Bs.isTouch||U.state.isVisible&&U.props.trigger.indexOf("click")>=0)return}else ns("onClickOutside",[U,ut]);U.props.hideOnClick===!0&&(U.clearDelayTimeouts(),U.hide(),m=!0,setTimeout(function(){m=!1}),U.state.isMounted||uo())}}}function Nr(){y=!0}function co(){y=!1}function Hr(){var ut=Hi();ut.addEventListener("mousedown",Qs,!0),ut.addEventListener("touchend",Qs,dr),ut.addEventListener("touchstart",co,dr),ut.addEventListener("touchmove",Nr,dr)}function uo(){var ut=Hi();ut.removeEventListener("mousedown",Qs,!0),ut.removeEventListener("touchend",Qs,dr),ut.removeEventListener("touchstart",co,dr),ut.removeEventListener("touchmove",Nr,dr)}function Ga(ut,ni){Qa(ut,function(){!U.state.isVisible&&ze.parentNode&&ze.parentNode.contains(ze)&&ni()})}function fo(ut,ni){Qa(ut,ni)}function Qa(ut,ni){var xi=Qn().box;function vn(Zi){Zi.target===xi&&(Pn(xi,"remove",vn),ni())}if(ut===0)return ni();Pn(xi,"remove",z),Pn(xi,"add",vn),z=vn}function Po(ut,ni,xi){xi===void 0&&(xi=!1);var vn=en(U.props.triggerTarget||e);vn.forEach(function(Zi){Zi.addEventListener(ut,ni,xi),_e.push({node:Zi,eventType:ut,handler:ni,options:xi})})}function Ya(){li()&&(Po("touchstart",Fl,{passive:!0}),Po("touchend",Fc,{passive:!0})),ml(U.props.trigger).forEach(function(ut){if(ut!=="manual")switch(Po(ut,Fl),ut){case"mouseenter":Po("mouseleave",Fc);break;case"focus":Po(Ao?"focusout":"blur",Il);break;case"focusin":Po("focusout",Il);break}})}function qc(){_e.forEach(function(ut){var ni=ut.node,xi=ut.eventType,vn=ut.handler,Zi=ut.options;ni.removeEventListener(xi,vn,Zi)}),_e=[]}function Fl(ut){var ni,xi=!1;if(!(!U.state.isEnabled||Nl(ut)||m)){var vn=((ni=L)==null?void 0:ni.type)==="focus";L=ut,de=ut.currentTarget,ss(),!U.state.isVisible&&jr(ut)&&wl.forEach(function(Zi){return Zi(ut)}),ut.type==="click"&&(U.props.trigger.indexOf("mouseenter")<0||u)&&U.props.hideOnClick!==!1&&U.state.isVisible?xi=!0:Hl(ut),ut.type==="click"&&(u=!xi),xi&&!vn&&_a(ut)}}function Pc(ut){var ni=ut.target,xi=Si().contains(ni)||ze.contains(ni);if(!(ut.type==="mousemove"&&xi)){var vn=Fo().concat(ze).map(function(Zi){var Xs,Lr=Zi._tippy,Ja=(Xs=Lr.popperInstance)==null?void 0:Xs.state;return Ja?{popperRect:Zi.getBoundingClientRect(),popperState:Ja,props:i}:null}).filter(Boolean);ac(vn,ut)&&(Tr(),_a(ut))}}function Fc(ut){var ni=Nl(ut)||U.props.trigger.indexOf("click")>=0&&u;if(!ni){if(U.props.interactive){U.hideWithInteractivity(ut);return}_a(ut)}}function Il(ut){U.props.trigger.indexOf("focusin")<0&&ut.target!==Si()||U.props.interactive&&ut.relatedTarget&&ze.contains(ut.relatedTarget)||_a(ut)}function Nl(ut){return Bs.isTouch?li()!==ut.type.indexOf("touch")>=0:!1}function Ic(){Nc();var ut=U.props,ni=ut.popperOptions,xi=ut.placement,vn=ut.offset,Zi=ut.getReferenceClientRect,Xs=ut.moveTransition,Lr=It()?sa(ze).arrow:null,Ja=Zi?{getBoundingClientRect:Zi,contextElement:Zi.contextElement||Si()}:e,tm={name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(Vc){var Za=Vc.state;if(It()){var O5=Qn(),cd=O5.box;["placement","reference-hidden","escaped"].forEach(function(Wc){Wc==="placement"?cd.setAttribute("data-placement",Za.placement):Za.attributes.popper["data-popper-"+Wc]?cd.setAttribute("data-"+Wc,""):cd.removeAttribute("data-"+Wc)}),Za.attributes.popper={}}}},ya=[{name:"offset",options:{offset:vn}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!Xs}},tm];It()&&Lr&&ya.push({name:"arrow",options:{element:Lr,padding:3}}),ya.push.apply(ya,ni?.modifiers||[]),U.popperInstance=ms(Ja,ze,Object.assign({},ni,{placement:xi,onFirstUpdate:X,modifiers:ya}))}function Nc(){U.popperInstance&&(U.popperInstance.destroy(),U.popperInstance=null)}function ho(){var ut=U.props.appendTo,ni,xi=Si();U.props.interactive&&ut===Fr||ut==="parent"?ni=xi.parentNode:ni=cu(ut,[xi]),ni.contains(ze)||ni.appendChild(ze),U.state.isMounted=!0,Ic()}function Fo(){return jo(ze.querySelectorAll("[data-tippy-root]"))}function Hl(ut){U.clearDelayTimeouts(),ut&&ns("onTrigger",[U,ut]),Hr();var ni=Un(!0),xi=gi(),vn=xi[0],Zi=xi[1];Bs.isTouch&&vn==="hold"&&Zi&&(ni=Zi),ni?n=setTimeout(function(){U.show()},ni):U.show()}function _a(ut){if(U.clearDelayTimeouts(),ns("onUntrigger",[U,ut]),!U.state.isVisible){uo();return}if(!(U.props.trigger.indexOf("mouseenter")>=0&&U.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(ut.type)>=0&&u)){var ni=Un(!1);ni?s=setTimeout(function(){U.state.isVisible&&U.hide()},ni):l=requestAnimationFrame(function(){U.hide()})}}function Bl(){U.state.isEnabled=!0}function Hc(){U.hide(),U.state.isEnabled=!1}function Bc(){clearTimeout(n),clearTimeout(s),cancelAnimationFrame(l)}function $c(ut){if(!U.state.isDestroyed){ns("onBeforeUpdate",[U,ut]),qc();var ni=U.props,xi=_l(e,Object.assign({},ni,Da(ut),{ignoreAttributes:!0}));U.props=xi,Ya(),ni.interactiveDebounce!==xi.interactiveDebounce&&(Tr(),pe=hl(Pc,xi.interactiveDebounce)),ni.triggerTarget&&!xi.triggerTarget?en(ni.triggerTarget).forEach(function(vn){vn.removeAttribute("aria-expanded")}):xi.triggerTarget&&e.removeAttribute("aria-expanded"),ss(),_s(),mt&&mt(ni,xi),U.popperInstance&&(Ic(),Fo().forEach(function(vn){requestAnimationFrame(vn._tippy.popperInstance.forceUpdate)})),ns("onAfterUpdate",[U,ut])}}function Uc(ut){U.setProps({content:ut})}function T5(){var ut=U.state.isVisible,ni=U.state.isDestroyed,xi=!U.state.isEnabled,vn=Bs.isTouch&&!U.props.touch,Zi=ta(U.props.duration,0,Kn.duration);if(!(ut||ni||xi||vn)&&!Si().hasAttribute("disabled")&&(ns("onShow",[U],!1),U.props.onShow(U)!==!1)){if(U.state.isVisible=!0,It()&&(ze.style.visibility="visible"),_s(),Hr(),U.state.isMounted||(ze.style.transition="none"),It()){var Xs=Qn(),Lr=Xs.box,Ja=Xs.content;ps([Lr,Ja],0)}X=function(){var ya;if(!(!U.state.isVisible||A)){if(A=!0,ze.offsetHeight,ze.style.transition=U.props.moveTransition,It()&&U.props.animation){var ld=Qn(),Vc=ld.box,Za=ld.content;ps([Vc,Za],Zi),ia([Vc,Za],"visible")}di(),ss(),pl(Sl,U),(ya=U.popperInstance)==null||ya.forceUpdate(),ns("onMount",[U]),U.props.animation&&It()&&fo(Zi,function(){U.state.isShown=!0,ns("onShown",[U])})}},ho()}}function L5(){var ut=!U.state.isVisible,ni=U.state.isDestroyed,xi=!U.state.isEnabled,vn=ta(U.props.duration,1,Kn.duration);if(!(ut||ni||xi)&&(ns("onHide",[U],!1),U.props.onHide(U)!==!1)){if(U.state.isVisible=!1,U.state.isShown=!1,A=!1,u=!1,It()&&(ze.style.visibility="hidden"),Tr(),uo(),_s(!0),It()){var Zi=Qn(),Xs=Zi.box,Lr=Zi.content;U.props.animation&&(ps([Xs,Lr],vn),ia([Xs,Lr],"hidden"))}di(),ss(),U.props.animation?It()&&Ga(vn,U.unmount):U.unmount()}}function R5(ut){Hi().addEventListener("mousemove",pe),pl(wl,pe),pe(ut)}function M5(){U.state.isVisible&&U.hide(),U.state.isMounted&&(Nc(),Fo().forEach(function(ut){ut._tippy.unmount()}),ze.parentNode&&ze.parentNode.removeChild(ze),Sl=Sl.filter(function(ut){return ut!==U}),U.state.isMounted=!1,ns("onHidden",[U]))}function D5(){U.state.isDestroyed||(U.clearDelayTimeouts(),U.unmount(),qc(),delete e._tippy,U.state.isDestroyed=!0,ns("onDestroy",[U]))}}function oo(e,t){t===void 0&&(t={});var i=Kn.plugins.concat(t.plugins||[]);Sd();var n=Object.assign({},t,{plugins:i}),s=rc(e);if(0)var l,u;var m=s.reduce(function(y,A){var L=A&&Ad(A,n);return L&&y.push(L),y},[]);return Oa(e)?m[0]:m}oo.defaultProps=Kn,oo.setDefaultProps=pu,oo.currentInput=Bs;var am=function(t){var i=t===void 0?{}:t,n=i.exclude,s=i.duration;Sl.forEach(function(l){var u=!1;if(n&&(u=qa(n)?l.reference===n:l.popper===n.popper),!u){var m=l.props.duration;l.setProps({duration:s}),l.hide(),l.state.isDestroyed||l.setProps({duration:m})}})},Cd=Object.assign({},Xl,{effect:function(t){var i=t.state,n={popper:{position:i.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(i.elements.popper.style,n.popper),i.styles=n,i.elements.arrow&&Object.assign(i.elements.arrow.style,n.arrow)}}),kd=function(t,i){var n;i===void 0&&(i={});var s=t,l=[],u=[],m,y=i.overrides,A=[],L=!1;function z(){u=s.map(function(U){return en(U.props.triggerTarget||U.reference)}).reduce(function(U,Se){return U.concat(Se)},[])}function X(){l=s.map(function(U){return U.reference})}function _e(U){s.forEach(function(Se){U?Se.enable():Se.disable()})}function pe(U){return s.map(function(Se){var ze=Se.setProps;return Se.setProps=function(mt){ze(mt),Se.reference===m&&U.setProps(mt)},function(){Se.setProps=ze}})}function de(U,Se){var ze=u.indexOf(Se);if(Se!==m){m=Se;var mt=(y||[]).concat("content").reduce(function(kt,Kt){return kt[Kt]=s[ze].props[Kt],kt},{});U.setProps(Object.assign({},mt,{getReferenceClientRect:typeof mt.getReferenceClientRect=="function"?mt.getReferenceClientRect:function(){var kt;return(kt=l[ze])==null?void 0:kt.getBoundingClientRect()}}))}}_e(!1),X(),z();var Pe={fn:function(){return{onDestroy:function(){_e(!0)},onHidden:function(){m=null},onClickOutside:function(ze){ze.props.showOnCreate&&!L&&(L=!0,m=null)},onShow:function(ze){ze.props.showOnCreate&&!L&&(L=!0,de(ze,l[0]))},onTrigger:function(ze,mt){de(ze,mt.currentTarget)}}}},Le=oo(Eo(),Object.assign({},xo(i,["overrides"]),{plugins:[Pe].concat(i.plugins||[]),triggerTarget:u,popperOptions:Object.assign({},i.popperOptions,{modifiers:[].concat(((n=i.popperOptions)==null?void 0:n.modifiers)||[],[Cd])})})),Te=Le.show;Le.show=function(U){if(Te(),!m&&U==null)return de(Le,l[0]);if(!(m&&U==null)){if(typeof U=="number")return l[U]&&de(Le,l[U]);if(s.indexOf(U)>=0){var Se=U.reference;return de(Le,Se)}if(l.indexOf(U)>=0)return de(Le,U)}},Le.showNext=function(){var U=l[0];if(!m)return Le.show(0);var Se=l.indexOf(m);Le.show(l[Se+1]||U)},Le.showPrevious=function(){var U=l[l.length-1];if(!m)return Le.show(U);var Se=l.indexOf(m),ze=l[Se-1]||U;Le.show(ze)};var He=Le.setProps;return Le.setProps=function(U){y=U.overrides||y,He(U)},Le.setInstances=function(U){_e(!0),A.forEach(function(Se){return Se()}),s=U,_e(!1),X(),z(),A=pe(Le),Le.setProps({triggerTarget:u})},A=pe(Le),Le},a={mouseover:"mouseenter",focusin:"focus",click:"click"};function f(e,t){var i=[],n=[],s=!1,l=t.target,u=xo(t,["target"]),m=Object.assign({},u,{trigger:"manual",touch:!1}),y=Object.assign({touch:Kn.touch},u,{showOnCreate:!0}),A=oo(e,m),L=en(A);function z(Pe){if(!(!Pe.target||s)){var Le=Pe.target.closest(l);if(Le){var Te=Le.getAttribute("data-tippy-trigger")||t.trigger||Kn.trigger;if(!Le._tippy&&!(Pe.type==="touchstart"&&typeof y.touch=="boolean")&&!(Pe.type!=="touchstart"&&Te.indexOf(a[Pe.type])<0)){var He=oo(Le,y);He&&(n=n.concat(He))}}}}function X(Pe,Le,Te,He){He===void 0&&(He=!1),Pe.addEventListener(Le,Te,He),i.push({node:Pe,eventType:Le,handler:Te,options:He})}function _e(Pe){var Le=Pe.reference;X(Le,"touchstart",z,dr),X(Le,"mouseover",z),X(Le,"focusin",z),X(Le,"click",z)}function pe(){i.forEach(function(Pe){var Le=Pe.node,Te=Pe.eventType,He=Pe.handler,U=Pe.options;Le.removeEventListener(Te,He,U)}),i=[]}function de(Pe){var Le=Pe.destroy,Te=Pe.enable,He=Pe.disable;Pe.destroy=function(U){U===void 0&&(U=!0),U&&n.forEach(function(Se){Se.destroy()}),n=[],pe(),Le()},Pe.enable=function(){Te(),n.forEach(function(U){return U.enable()}),s=!1},Pe.disable=function(){He(),n.forEach(function(U){return U.disable()}),s=!0},_e(Pe)}return L.forEach(de),A}var x={name:"animateFill",defaultValue:!1,fn:function(t){var i;if(!((i=t.props.render)!=null&&i.$$tippy))return{};var n=sa(t.popper),s=n.box,l=n.content,u=t.props.animateFill?T():null;return{onCreate:function(){u&&(s.insertBefore(u,s.firstElementChild),s.setAttribute("data-animatefill",""),s.style.overflow="hidden",t.setProps({arrow:!1,animation:"shift-away"}))},onMount:function(){if(u){var y=s.style.transitionDuration,A=Number(y.replace("ms",""));l.style.transitionDelay=Math.round(A/10)+"ms",u.style.transitionDuration=y,ia([u],"visible")}},onShow:function(){u&&(u.style.transitionDuration="0ms")},onHide:function(){u&&ia([u],"hidden")}}}};function T(){var e=Eo();return e.className=dl,ia([e],"hidden"),e}var I={clientX:0,clientY:0},F=[];function ie(e){var t=e.clientX,i=e.clientY;I={clientX:t,clientY:i}}function ae(e){e.addEventListener("mousemove",ie)}function ye(e){e.removeEventListener("mousemove",ie)}var $e={name:"followCursor",defaultValue:!1,fn:function(t){var i=t.reference,n=oc(t.props.triggerTarget||i),s=!1,l=!1,u=!0,m=t.props;function y(){return t.props.followCursor==="initial"&&t.state.isVisible}function A(){n.addEventListener("mousemove",X)}function L(){n.removeEventListener("mousemove",X)}function z(){s=!0,t.setProps({getReferenceClientRect:null}),s=!1}function X(de){var Pe=de.target?i.contains(de.target):!0,Le=t.props.followCursor,Te=de.clientX,He=de.clientY,U=i.getBoundingClientRect(),Se=Te-U.left,ze=He-U.top;(Pe||!t.props.interactive)&&t.setProps({getReferenceClientRect:function(){var kt=i.getBoundingClientRect(),Kt=Te,gi=He;Le==="initial"&&(Kt=kt.left+Se,gi=kt.top+ze);var li=Le==="horizontal"?kt.top:gi,It=Le==="vertical"?kt.right:Kt,Si=Le==="horizontal"?kt.bottom:gi,Hi=Le==="vertical"?kt.left:Kt;return{width:It-Hi,height:Si-li,top:li,right:It,bottom:Si,left:Hi}}})}function _e(){t.props.followCursor&&(F.push({instance:t,doc:n}),ae(n))}function pe(){F=F.filter(function(de){return de.instance!==t}),F.filter(function(de){return de.doc===n}).length===0&&ye(n)}return{onCreate:_e,onDestroy:pe,onBeforeUpdate:function(){m=t.props},onAfterUpdate:function(Pe,Le){var Te=Le.followCursor;s||Te!==void 0&&m.followCursor!==Te&&(pe(),Te?(_e(),t.state.isMounted&&!l&&!y()&&A()):(L(),z()))},onMount:function(){t.props.followCursor&&!l&&(u&&(X(I),u=!1),y()||A())},onTrigger:function(Pe,Le){jr(Le)&&(I={clientX:Le.clientX,clientY:Le.clientY}),l=Le.type==="focus"},onHidden:function(){t.props.followCursor&&(z(),L(),u=!0)}}}};function Fe(e,t){var i;return{popperOptions:Object.assign({},e.popperOptions,{modifiers:[].concat((((i=e.popperOptions)==null?void 0:i.modifiers)||[]).filter(function(n){var s=n.name;return s!==t.name}),[t])})}}var be={name:"inlinePositioning",defaultValue:!1,fn:function(t){var i=t.reference;function n(){return!!t.props.inlinePositioning}var s,l=-1,u=!1,m=[],y={name:"tippyInlinePositioning",enabled:!0,phase:"afterWrite",fn:function(_e){var pe=_e.state;n()&&(m.indexOf(pe.placement)!==-1&&(m=[]),s!==pe.placement&&m.indexOf(pe.placement)===-1&&(m.push(pe.placement),t.setProps({getReferenceClientRect:function(){return A(pe.placement)}})),s=pe.placement)}};function A(X){return it(hr(X),i.getBoundingClientRect(),jo(i.getClientRects()),l)}function L(X){u=!0,t.setProps(X),u=!1}function z(){u||L(Fe(t.props,y))}return{onCreate:z,onAfterUpdate:z,onTrigger:function(_e,pe){if(jr(pe)){var de=jo(t.reference.getClientRects()),Pe=de.find(function(Te){return Te.left-2<=pe.clientX&&Te.right+2>=pe.clientX&&Te.top-2<=pe.clientY&&Te.bottom+2>=pe.clientY}),Le=de.indexOf(Pe);l=Le>-1?Le:l}},onHidden:function(){l=-1}}}};function it(e,t,i,n){if(i.length<2||e===null)return t;if(i.length===2&&n>=0&&i[0].left>i[1].right)return i[n]||t;switch(e){case"top":case"bottom":{var s=i[0],l=i[i.length-1],u=e==="top",m=s.top,y=l.bottom,A=u?s.left:l.left,L=u?s.right:l.right,z=L-A,X=y-m;return{top:m,bottom:y,left:A,right:L,width:z,height:X}}case"left":case"right":{var _e=Math.min.apply(Math,i.map(function(ze){return ze.left})),pe=Math.max.apply(Math,i.map(function(ze){return ze.right})),de=i.filter(function(ze){return e==="left"?ze.left===_e:ze.right===pe}),Pe=de[0].top,Le=de[de.length-1].bottom,Te=_e,He=pe,U=He-Te,Se=Le-Pe;return{top:Pe,bottom:Le,left:Te,right:He,width:U,height:Se}}default:return t}}var dt={name:"sticky",defaultValue:!1,fn:function(t){var i=t.reference,n=t.popper;function s(){return t.popperInstance?t.popperInstance.state.elements.reference:i}function l(A){return t.props.sticky===!0||t.props.sticky===A}var u=null,m=null;function y(){var A=l("reference")?s().getBoundingClientRect():null,L=l("popper")?n.getBoundingClientRect():null;(A&&Ct(u,A)||L&&Ct(m,L))&&t.popperInstance&&t.popperInstance.update(),u=A,m=L,t.state.isMounted&&requestAnimationFrame(y)}return{onMount:function(){t.props.sticky&&y()}}}};function Ct(e,t){return e&&t?e.top!==t.top||e.right!==t.right||e.bottom!==t.bottom||e.left!==t.left:!0}oo.setDefaultProps({render:bu});var Et=oo,Li=__webpack_require__("./web_src/js/utils/time.ts");const hi=new Set,Ut='<svg width="16" height="7"><path d="m0 7 8-7 8 7Z" class="tippy-svg-arrow-outer"/><path d="m0 8 8-7 8 7Z" class="tippy-svg-arrow-inner"/></svg>';function Ie(e,t={}){const{onHide:i,onShow:n,onDestroy:s,role:l,theme:u,arrow:m,...y}=t,A=Et(e,{appendTo:document.body,animation:!1,allowHTML:!1,hideOnClick:!1,interactiveBorder:20,ignoreAttributes:!0,maxWidth:500,onHide:L=>(hi.delete(L),i?.(L)),onDestroy:L=>(hi.delete(L),s?.(L)),onShow:L=>{for(const z of hi)z.props.role==="tooltip"&&z.hide();return hi.add(L),e.setAttribute("aria-controls",L.popper.id),n?.(L)},arrow:m??(u==="bare"?!1:Ut),role:l||"menu",theme:u||l||"default",offset:[0,m?10:6],plugins:[$e],...y});return A.props.role==="menu"&&e.setAttribute("aria-haspopup","true"),A}function ft(e,t=null){if(vt(e),t=t??e.getAttribute("data-tooltip-content"),!t)return null;const n=!e.hasAttribute("data-clipboard-target"),s={content:t,delay:100,role:"tooltip",theme:"tooltip",hideOnClick:n,placement:e.getAttribute("data-tooltip-placement")||"top-start",followCursor:e.getAttribute("data-tooltip-follow-cursor")||!1,...e.getAttribute("data-tooltip-interactive")==="true"?{interactive:!0,aria:{content:"describedby",expanded:!1}}:{}};return e._tippy?e._tippy.setProps(s):Ie(e,s),e._tippy}function vt(e){let t=e.getAttribute("title");if(t){if(e.tagName.toLowerCase()==="relative-time"){const i=e.getAttribute("datetime");i&&(t=(0,Li.Rt)(new Date(i)))}e.setAttribute("data-tooltip-content",t),e.setAttribute("aria-label",t),e.setAttribute("title","")}}function Pt(e){e.target.removeEventListener("mouseover",Pt,!0),ft(this)}function ei(e){if(e.addEventListener("mouseover",Pt,{capture:!0}),!e.hasAttribute("aria-label")){const t=e.getAttribute("data-tooltip-content");t&&e.setAttribute("aria-label",t)}}function ci(e){for(const t of e.querySelectorAll("[data-tooltip-content]"))ei(t)}function Ot(){const e=i=>i.observe(document,{subtree:!0,childList:!0,attributeFilter:["data-tooltip-content","title"]}),t=new MutationObserver((i,n)=>{const s=n.takeRecords();n.disconnect();for(const l of[...i,...s])if(l.type==="childList")for(const u of l.addedNodes)(0,C.NF)(u)&&(ci(u),u.hasAttribute("data-tooltip-content")&&ei(u));else l.type==="attributes"&&ft(l.target);e(n)});e(t),ci(document.documentElement)}function Dt(e,t){let i;const n=e.closest("[data-tippy-root]")?.id;n?(e=document.body,i=document.querySelector(`[aria-controls="${CSS.escape(n)}"]`)?.getBoundingClientRect(),i=i??new DOMRect(0,0,0,0)):(e=e.closest(".ui.dropdown")??e,i=e.getBoundingClientRect());const s=e._tippy??ft(e,t);s.setContent(t),s.setProps({getReferenceClientRect:()=>i}),s.state.isShown||s.show(),s.setProps({onHidden:l=>{ft(e)||l.destroy()}})}var St=__webpack_require__("./web_src/js/utils.ts");async function Ii(e,{reject:t=!1}={}){var i;try{if(Array.isArray(e)){if(!((i=navigator?.clipboard)!=null&&i.write))for(const n of e)typeof n=="string"&&Ni(n);return await navigator.clipboard.write([new ClipboardItem(Object.fromEntries(e.map(n=>[n?.type??"text/plain",n])))]),!0}else{if(e instanceof Blob)return await navigator.clipboard.write([new ClipboardItem({[e.type]:e})]),!0;try{return await navigator.clipboard.writeText(String(e)),!0}catch{return Ni(e)}}}catch(n){if(t)throw n;return!1}}function Ni(e){if(!document.execCommand)return!1;const t=document.createElement("textarea");t.value=String(e),t.style.clipPath="inset(50%)",t.ariaHidden="true",document.body.append(t);try{return t.select(),document.execCommand("copy")}finally{t.remove()}}const{copy_success:un,copy_error:Sn}=window.config.i18n;function ui(){document.addEventListener("click",async e=>{const t=e.target.closest("[data-clipboard-text], [data-clipboard-target]");if(!t)return;e.preventDefault();let i=t.getAttribute("data-clipboard-text");if(i||(i=document.querySelector(t.getAttribute("data-clipboard-target"))?.value),i&&t.getAttribute("data-clipboard-text-type")==="url"&&(i=(0,St.oK)(i)),i){const n=await Ii(i);Dt(t,n?un:Sn)}})}function qi(e){return e.pull_request?e.state==="open"?e.pull_request.draft?"octicon-git-pull-request-draft":"octicon-git-pull-request":e.pull_request.merged?"octicon-git-merge":"octicon-git-pull-request-closed":e.state==="open"?"octicon-issue-opened":"octicon-issue-closed"}function oi(e){return e.pull_request?e.state==="open"?e.pull_request.draft?"grey":"green":e.pull_request.merged?"purple":"red":e.state==="open"?"green":"red"}const Xn={key:0,class:"tw-h-12 tw-w-12 is-loading"},ra={key:1,class:"tw-flex tw-flex-col tw-gap-2"},oa={class:"tw-text-12"},ko={class:"flex-text-block"},Kr={class:"issue-title tw-font-semibold tw-break-anywhere"},hc={class:"index"},_u={key:0},yu=["innerHTML"],aa={key:2,class:"tw-flex tw-flex-col tw-gap-2"},Ia={class:"tw-text-12"};var xl=(0,c.pM)({__name:"ContextPopup",setup(e){const{appSubUrl:t,i18n:i}=window.config,n=(0,Re.KR)(!1),s=(0,Re.KR)(null),l=(0,Re.KR)(""),u=i.error_occurred,m=(0,Re.KR)(null),y=(0,c.EW)(()=>new Date(s.value.created_at).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"})),A=(0,c.EW)(()=>{const X=s.value.body.replace(/\n+/g," ");return X.length>85?`${X.substring(0,85)}\u2026`:X}),L=(0,Re.KR)(null);(0,c.sV)(()=>{L.value.addEventListener("ce-load-context-popup",X=>{!n.value&&s.value===null&&z(X.detail)})});async function z(X){n.value=!0,m.value=null;try{const _e=await(0,Ae.fG)(`${t}/${X.ownerName}/${X.repoName}/issues/${X.indexString}/info`),pe=await _e.json();if(!_e.ok){m.value=pe.message??i.network_error;return}s.value=pe.convertedIssue,l.value=pe.renderedLabels}catch{m.value=i.network_error}finally{n.value=!1}}return(X,_e)=>((0,c.uX)(),(0,c.CE)("div",{ref_key:"root",ref:L},[n.value?((0,c.uX)(),(0,c.CE)("div",Xn)):(0,c.Q3)("v-if",!0),!n.value&&s.value!==null?((0,c.uX)(),(0,c.CE)("div",ra,[(0,c.Lk)("div",oa,(0,W.v_)(s.value.repository.full_name)+" on "+(0,W.v_)(y.value),1),(0,c.Lk)("div",ko,[(0,c.bF)((0,Re.R1)(Z.Ah),{name:(0,Re.R1)(qi)(s.value),class:(0,W.C4)(["text",(0,Re.R1)(oi)(s.value)])},null,8,["name","class"]),(0,c.Lk)("span",Kr,[(0,c.eW)((0,W.v_)(s.value.title)+" ",1),(0,c.Lk)("span",hc,"#"+(0,W.v_)(s.value.number),1)])]),A.value?((0,c.uX)(),(0,c.CE)("div",_u,(0,W.v_)(A.value),1)):(0,c.Q3)("v-if",!0),(0,c.Q3)(" eslint-disable-next-line vue/no-v-html "),s.value.labels.length?((0,c.uX)(),(0,c.CE)("div",{key:1,innerHTML:l.value},null,8,yu)):(0,c.Q3)("v-if",!0)])):(0,c.Q3)("v-if",!0),!n.value&&s.value===null?((0,c.uX)(),(0,c.CE)("div",aa,[(0,c.Lk)("div",Ia,(0,W.v_)((0,Re.R1)(u)),1),(0,c.Lk)("div",null,(0,W.v_)(m.value),1)])):(0,c.Q3)("v-if",!0)],512))}}),To=xl;function jl(){const e=document.querySelectorAll(".ref-issue");la(e)}function la(e){for(const t of e){if(t.classList.contains("ref-external-issue"))continue;const i=(0,St.S3)(t.getAttribute("href"));if(!i.ownerName)continue;const n=document.createElement("div");n.classList.add("tw-p-3"),t.parentNode.insertBefore(n,t.nextSibling);const s=Ai(To);try{s.mount(n)}catch(l){console.error(l),n.textContent="ContextPopup failed to load"}Ie(t,{theme:"default",content:n,placement:"top-start",interactive:!0,role:"dialog",interactiveBorder:5,onShow:()=>{n.firstChild.dispatchEvent(new CustomEvent("ce-load-context-popup",{detail:i}))}})}}function he(){const e=document.querySelector("#git-graph-container");if(!e)return;document.querySelector("#flow-color-monochrome")?.addEventListener("click",()=>{document.querySelector("#flow-color-monochrome").classList.add("active"),document.querySelector("#flow-color-colored")?.classList.remove("active"),e.classList.remove("colored"),e.classList.add("monochrome");const m=new URLSearchParams(window.location.search);m.set("mode","monochrome");const y=m.toString();y?window.history.replaceState({},"",`?${y}`):window.history.replaceState({},"",window.location.pathname);for(const A of document.querySelectorAll(".pagination a")){const L=A.getAttribute("href");if(!L)continue;const z=new URL(L,window.location.href),X=z.searchParams;X.set("mode","monochrome"),z.search=`?${X.toString()}`,A.setAttribute("href",z.href)}}),document.querySelector("#flow-color-colored")?.addEventListener("click",()=>{document.querySelector("#flow-color-colored").classList.add("active"),document.querySelector("#flow-color-monochrome")?.classList.remove("active"),e.classList.add("colored"),e.classList.remove("monochrome");for(const A of document.querySelectorAll(".pagination a")){const L=A.getAttribute("href");if(!L)continue;const z=new URL(L,window.location.href),X=z.searchParams;X.delete("mode"),z.search=`?${X.toString()}`,A.setAttribute("href",z.href)}const m=new URLSearchParams(window.location.search);m.delete("mode");const y=m.toString();y?window.history.replaceState({},"",`?${y}`):window.history.replaceState({},"",window.location.pathname)});const t=new URL(window.location.href),i=t.searchParams,n=()=>{const m=i.toString(),y=new URL(t);y.searchParams.set("div-only","true"),window.history.replaceState({},"",m?`?${m}`:window.location.pathname),document.querySelector("#pagination").innerHTML="",(0,C.y9)("#rel-container"),(0,C.y9)("#rev-container"),(0,C.fi)("#loading-indicator"),(async()=>{const L=await(await(0,Ae.fG)(String(y))).text(),z=document.createElement("div");z.innerHTML=L,document.querySelector("#pagination").innerHTML=z.querySelector("#pagination").innerHTML,document.querySelector("#rel-container").innerHTML=z.querySelector("#rel-container").innerHTML,document.querySelector("#rev-container").innerHTML=z.querySelector("#rev-container").innerHTML,(0,C.y9)("#loading-indicator"),(0,C.fi)("#rel-container"),(0,C.fi)("#rev-container")})()},s=i.getAll("branch");i.has("hide-pr-refs")&&i.get("hide-pr-refs")==="true"&&s.splice(0,0,"...flow-hide-pr-refs");const l=document.querySelector("#flow-select-refs-dropdown"),u=(0,ke.mD)(l);u.dropdown({clearable:!0}),u.dropdown("set selected",s),u.dropdown({onRemove(m){if(m==="...flow-hide-pr-refs")i.delete("hide-pr-refs");else{const y=i.getAll("branch");i.delete("branch");for(const A of y)A!==m&&i.append("branch",A)}n()},onAdd(m){m==="...flow-hide-pr-refs"?i.set("hide-pr-refs","true"):i.append("branch",m),n()}}),e.addEventListener("mouseenter",m=>{if(m.target.matches("#rev-list li")){const y=m.target.getAttribute("data-flow");if(y==="0")return;document.querySelector(`#flow-${y}`)?.classList.add("highlight"),m.target.classList.add("hover");for(const A of document.querySelectorAll(`#rev-list li[data-flow='${y}']`))A.classList.add("highlight")}else if(m.target.matches("#rel-container .flow-group")){m.target.classList.add("highlight");const y=m.target.getAttribute("data-flow");for(const A of document.querySelectorAll(`#rev-list li[data-flow='${y}']`))A.classList.add("highlight")}else if(m.target.matches("#rel-container .flow-commit")){const y=m.target.getAttribute("data-rev");document.querySelector(`#rev-list li#commit-${y}`)?.classList.add("hover")}}),e.addEventListener("mouseleave",m=>{if(m.target.matches("#rev-list li")){const y=m.target.getAttribute("data-flow");if(y==="0")return;document.querySelector(`#flow-${y}`)?.classList.remove("highlight"),m.target.classList.remove("hover");for(const A of document.querySelectorAll(`#rev-list li[data-flow='${y}']`))A.classList.remove("highlight")}else if(m.target.matches("#rel-container .flow-group")){m.target.classList.remove("highlight");const y=m.target.getAttribute("data-flow");for(const A of document.querySelectorAll(`#rev-list li[data-flow='${y}']`))A.classList.remove("highlight")}else if(m.target.matches("#rel-container .flow-commit")){const y=m.target.getAttribute("data-rev");document.querySelector(`#rev-list li#commit-${y}`)?.classList.remove("hover")}})}var Ce=Object.defineProperty,ot=(e,t,i)=>t in e?Ce(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i,wt=(e,t,i)=>(ot(e,typeof t!="symbol"?t+"":t,i),i);const _t=class{constructor(e,t,i){wt(this,"startDate"),wt(this,"endDate"),wt(this,"max"),wt(this,"_values"),wt(this,"_firstFullWeekOfMonths"),wt(this,"_activities"),wt(this,"_calendar"),this.endDate=this.parseDate(e),this.max=i||Math.ceil(Math.max(...t.map(n=>n.count))/5*4),this.startDate=this.shiftDate(e,-_t.DAYS_IN_ONE_YEAR),this._values=t}set values(e){this.max=Math.ceil(Math.max(...e.map(t=>t.count))/5*4),this._values=e,this._firstFullWeekOfMonths=void 0,this._calendar=void 0,this._activities=void 0}get values(){return this._values}get activities(){if(!this._activities){this._activities=new Map;for(let e=0,t=this.values.length;e<t;e++)this._activities.set(this.keyDayParser(this.values[e].date),{count:this.values[e].count,colorIndex:this.getColorIndex(this.values[e].count)})}return this._activities}get weekCount(){return this.getDaysCount()/_t.DAYS_IN_WEEK}get calendar(){if(!this._calendar){let e=this.shiftDate(this.startDate,-this.getCountEmptyDaysAtStart());e=new Date(e.getFullYear(),e.getMonth(),e.getDate()),this._calendar=new Array(this.weekCount);for(let t=0,i=this._calendar.length;t<i;t++){this._calendar[t]=new Array(_t.DAYS_IN_WEEK);for(let n=0;n<_t.DAYS_IN_WEEK;n++){const s=this.activities.get(this.keyDayParser(e));this._calendar[t][n]={date:new Date(e.valueOf()),count:s?s.count:void 0,colorIndex:s?s.colorIndex:0},e.setDate(e.getDate()+1)}}}return this._calendar}get firstFullWeekOfMonths(){if(!this._firstFullWeekOfMonths){const e=this.calendar;this._firstFullWeekOfMonths=[];for(let t=1,i=e.length;t<i;t++){const n=e[t-1][0].date,s=e[t][0].date;(n.getFullYear()<s.getFullYear()||n.getMonth()<s.getMonth())&&this._firstFullWeekOfMonths.push({value:s.getMonth(),index:t})}}return this._firstFullWeekOfMonths}getColorIndex(e){return e==null?0:e<=0?1:e>=this.max?5:Math.ceil(e*100/this.max*.03)+1}getCountEmptyDaysAtStart(){return this.startDate.getDay()}getCountEmptyDaysAtEnd(){return _t.DAYS_IN_WEEK-1-this.endDate.getDay()}getDaysCount(){return _t.DAYS_IN_ONE_YEAR+1+this.getCountEmptyDaysAtStart()+this.getCountEmptyDaysAtEnd()}shiftDate(e,t){const i=new Date(e);return i.setDate(i.getDate()+t),i}parseDate(e){return e instanceof Date?e:new Date(e)}keyDayParser(e){const t=this.parseDate(e);return String(t.getFullYear())+String(t.getMonth()).padStart(2,"0")+String(t.getDate()).padStart(2,"0")}};let lt=_t;wt(lt,"DEFAULT_RANGE_COLOR_LIGHT",["#ebedf0","#dae2ef","#c0ddf9","#73b3f3","#3886e1","#17459e"]),wt(lt,"DEFAULT_RANGE_COLOR_DARK",["#1f1f22","#1e334a","#1d466c","#1d5689","#1d69ac","#1B95D1"]),wt(lt,"DEFAULT_LOCALE",{months:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],days:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],on:"on",less:"Less",more:"More"}),wt(lt,"DEFAULT_TOOLTIP_UNIT","contributions"),wt(lt,"DAYS_IN_ONE_YEAR",365),wt(lt,"DAYS_IN_WEEK",7),wt(lt,"SQUARE_SIZE",10);const Wt=(0,c.pM)({name:"CalendarHeatmap",props:{endDate:{required:!0},max:{type:Number},rangeColor:{type:Array},values:{type:Array,required:!0},locale:{type:Object},tooltip:{type:Boolean,default:!0},tooltipUnit:{type:String,default:lt.DEFAULT_TOOLTIP_UNIT},tooltipFormatter:{type:Function},tippyProps:{type:Object,default:null},vertical:{type:Boolean,default:!1},noDataText:{type:[Boolean,String],default:null},round:{type:Number,default:0},darkMode:Boolean},emits:["dayClick"],setup(e){const t=lt.SQUARE_SIZE/5,i=lt.SQUARE_SIZE+t,n=Math.ceil(lt.SQUARE_SIZE*2.5),s=i*3,l=lt.SQUARE_SIZE+lt.SQUARE_SIZE/2,u=lt.SQUARE_SIZE+lt.SQUARE_SIZE/2,m=`translate(${n}, ${l})`,y=(0,Re.KR)(null),A=(0,Re.KR)(new Date),L=(0,Re.KR)(new lt(e.endDate,e.values,e.max)),z=(0,Re.KR)(0),X=(0,Re.KR)(0),_e=(0,Re.KR)("0 0 0 0"),pe=(0,Re.KR)("0 0 0 0"),de=(0,Re.KR)(""),Pe=(0,Re.KR)(""),Le=(0,Re.KR)(""),Te=(0,Re.KR)({}),He=(0,Re.KR)(e.rangeColor||(e.darkMode?lt.DEFAULT_RANGE_COLOR_DARK:lt.DEFAULT_RANGE_COLOR_LIGHT)),{values:U,tooltipUnit:Se,tooltipFormatter:ze,noDataText:mt,max:kt,vertical:Kt,locale:gi}=(0,Re.QW)(e),li=new Map;let It;function Si(){li.clear(),It?It.setInstances(Array.from(li.values())):It=kd(Array.from(li.values()),{overrides:[],moveTransition:"transform 0.1s ease-out",allowHTML:!0,...e.tippyProps})}function Hi(di){if(e.tooltip){if(di.count!==void 0)return e.tooltipFormatter?e.tooltipFormatter(di,e.tooltipUnit):`<b>${di.count} ${e.tooltipUnit}</b> ${Te.value.on} ${Te.value.months[di.date.getMonth()]} ${di.date.getDate()}, ${di.date.getFullYear()}`;if(e.noDataText)return`${e.noDataText}`;if(e.noDataText!==!1)return`<b>No ${e.tooltipUnit}</b> ${Te.value.on} ${Te.value.months[di.date.getMonth()]} ${di.date.getDate()}, ${di.date.getFullYear()}`}}function Qn(di){return e.vertical?`translate(0, ${i*L.value.weekCount-(di+1)*i})`:`translate(${di*i}, 0)`}function Un(di){return e.vertical?`translate(${di*i}, 0)`:`translate(0, ${di*i})`}function _s(di){return e.vertical?{x:3,y:i*L.value.weekCount-i*di.index-i/4}:{x:i*di.index,y:i-t}}(0,c.wB)([(0,Re.lW)(e,"rangeColor"),(0,Re.lW)(e,"darkMode")],([di,ss])=>{He.value=di||(ss?lt.DEFAULT_RANGE_COLOR_DARK:lt.DEFAULT_RANGE_COLOR_LIGHT)}),(0,c.wB)(Kt,di=>{di?(z.value=n+i*lt.DAYS_IN_WEEK+s,X.value=l+i*L.value.weekCount+t,de.value=`translate(${n}, 0)`,Pe.value=`translate(0, ${l})`):(z.value=n+i*L.value.weekCount+t,X.value=l+i*lt.DAYS_IN_WEEK,de.value=`translate(0, ${l})`,Pe.value=`translate(${n}, 0)`)},{immediate:!0}),(0,c.wB)([z,X],([di,ss])=>_e.value=` 0 0 ${di} ${ss}`,{immediate:!0}),(0,c.wB)([z,X,He],([di,ss,Tr])=>{Le.value=Kt.value?`translate(${n+i*lt.DAYS_IN_WEEK}, ${l})`:`translate(${di-i*Tr.length-30}, ${ss-u})`},{immediate:!0}),(0,c.wB)(gi,di=>Te.value=di?{...lt.DEFAULT_LOCALE,...di}:lt.DEFAULT_LOCALE,{immediate:!0}),(0,c.wB)(He,di=>pe.value=`0 0 ${lt.SQUARE_SIZE*(di.length+1)} ${lt.SQUARE_SIZE}`,{immediate:!0}),(0,c.wB)([U,Se,ze,mt,kt,He],()=>{L.value=new lt(e.endDate,e.values,e.max),li.forEach(di=>di.destroy()),(0,c.dY)(Si)}),(0,c.sV)(Si),(0,c.xo)(()=>{It?.destroy(),li.forEach(di=>di.destroy())});function ns(di){if(It&&di.target&&di.target.classList.contains("vch__day__square")&&di.target.dataset.weekIndex!==void 0&&di.target.dataset.dayIndex!==void 0){const ss=Number(di.target.dataset.weekIndex),Tr=Number(di.target.dataset.dayIndex);if(!isNaN(ss)&&!isNaN(Tr)){const Qs=Hi(L.value.calendar[ss][Tr]);if(Qs){const Nr=li.get(di.target);Nr?Nr.setContent(Qs):Nr||(li.set(di.target,Et(di.target,{content:Qs})),It.setInstances(Array.from(li.values())))}}}}return{SQUARE_BORDER_SIZE:t,SQUARE_SIZE:i,LEFT_SECTION_WIDTH:n,RIGHT_SECTION_WIDTH:s,TOP_SECTION_HEIGHT:l,BOTTOM_SECTION_HEIGHT:u,svg:y,heatmap:L,now:A,width:z,height:X,viewbox:_e,daysLabelWrapperTransform:de,monthsLabelWrapperTransform:Pe,yearWrapperTransform:m,legendWrapperTransform:Le,lo:Te,legendViewbox:pe,curRangeColor:He,getWeekPosition:Qn,getDayPosition:Un,getMonthLabelPosition:_s,initTippyLazy:ns}}}),Ht=(e,t)=>{const i=e.__vccOpts||e;for(const[n,s]of t)i[n]=s;return i},Nt=["viewBox"],Mt=["transform"],bi=["x","y"],Xt=["transform"],ai=["x","y"],wi=["x","y"],zi=["x","y"],yn=["transform"],rn=["x"],$s=["rx","ry","width","height","x","y"],gs=["x","y"],mr=["transform"],Us=["transform"],ca=["rx","ry","transform","width","height","data-week-index","data-day-index","onClick"],mc={class:"vch__legend"},Vs={class:"vch__legend-left"},Er={class:"vch__legend-right"},pc={class:"vch__legend"},lm=["viewBox","height"],cm={class:"vch__legend__wrapper"},um=["rx","ry","width","height","x"];function dm(e,t,i,n,s,l){return(0,c.uX)(),(0,c.CE)("div",{class:(0,W.C4)({vch__container:!0,"dark-mode":e.darkMode})},[((0,c.uX)(),(0,c.CE)("svg",{class:"vch__wrapper",ref:"svg",viewBox:e.viewbox},[(0,c.Lk)("g",{class:"vch__months__labels__wrapper",transform:e.monthsLabelWrapperTransform},[((0,c.uX)(!0),(0,c.CE)(c.FK,null,(0,c.pI)(e.heatmap.firstFullWeekOfMonths,(u,m)=>((0,c.uX)(),(0,c.CE)("text",{class:"vch__month__label",key:m,x:e.getMonthLabelPosition(u).x,y:e.getMonthLabelPosition(u).y},(0,W.v_)(e.lo.months[u.value]),9,bi))),128))],8,Mt),(0,c.Lk)("g",{class:"vch__days__labels__wrapper",transform:e.daysLabelWrapperTransform},[(0,c.Lk)("text",{class:"vch__day__label",x:e.vertical?e.SQUARE_SIZE:0,y:e.vertical?e.SQUARE_SIZE-e.SQUARE_BORDER_SIZE:20},(0,W.v_)(e.lo.days[1]),9,ai),(0,c.Lk)("text",{class:"vch__day__label",x:e.vertical?e.SQUARE_SIZE*3:0,y:e.vertical?e.SQUARE_SIZE-e.SQUARE_BORDER_SIZE:44},(0,W.v_)(e.lo.days[3]),9,wi),(0,c.Lk)("text",{class:"vch__day__label",x:e.vertical?e.SQUARE_SIZE*5:0,y:e.vertical?e.SQUARE_SIZE-e.SQUARE_BORDER_SIZE:69},(0,W.v_)(e.lo.days[5]),9,zi)],8,Xt),e.vertical?((0,c.uX)(),(0,c.CE)("g",{key:0,class:"vch__legend__wrapper",transform:e.legendWrapperTransform},[(0,c.Lk)("text",{x:e.SQUARE_SIZE*1.25,y:"8"},(0,W.v_)(e.lo.less),9,rn),((0,c.uX)(!0),(0,c.CE)(c.FK,null,(0,c.pI)(e.curRangeColor,(u,m)=>((0,c.uX)(),(0,c.CE)("rect",{key:m,rx:e.round,ry:e.round,style:(0,W.Tr)({fill:u}),width:e.SQUARE_SIZE-e.SQUARE_BORDER_SIZE,height:e.SQUARE_SIZE-e.SQUARE_BORDER_SIZE,x:e.SQUARE_SIZE*1.75,y:e.SQUARE_SIZE*(m+1)},null,12,$s))),128)),(0,c.Lk)("text",{x:e.SQUARE_SIZE*1.25,y:e.SQUARE_SIZE*(e.curRangeColor.length+2)-e.SQUARE_BORDER_SIZE},(0,W.v_)(e.lo.more),9,gs)],8,yn)):(0,c.Q3)("",!0),(0,c.Lk)("g",{class:"vch__year__wrapper",transform:e.yearWrapperTransform,onMouseover:t[0]||(t[0]=(...u)=>e.initTippyLazy&&e.initTippyLazy(...u))},[((0,c.uX)(!0),(0,c.CE)(c.FK,null,(0,c.pI)(e.heatmap.calendar,(u,m)=>((0,c.uX)(),(0,c.CE)("g",{class:"vch__month__wrapper",key:m,transform:e.getWeekPosition(m)},[((0,c.uX)(!0),(0,c.CE)(c.FK,null,(0,c.pI)(u,(y,A)=>((0,c.uX)(),(0,c.CE)(c.FK,{key:A},[y.date<e.now?((0,c.uX)(),(0,c.CE)("rect",{key:0,class:"vch__day__square",rx:e.round,ry:e.round,transform:e.getDayPosition(A),width:e.SQUARE_SIZE-e.SQUARE_BORDER_SIZE,height:e.SQUARE_SIZE-e.SQUARE_BORDER_SIZE,style:(0,W.Tr)({fill:e.curRangeColor[y.colorIndex]}),"data-week-index":m,"data-day-index":A,onClick:L=>e.$emit("dayClick",y)},null,12,ca)):(0,c.Q3)("",!0)],64))),128))],8,Us))),128))],40,mr)],8,Nt)),(0,c.Lk)("div",mc,[(0,c.RG)(e.$slots,"legend",{},()=>[(0,c.Lk)("div",Vs,[(0,c.RG)(e.$slots,"vch__legend-left")]),(0,c.Lk)("div",Er,[(0,c.RG)(e.$slots,"legend-right",{},()=>[(0,c.Lk)("div",pc,[(0,c.Lk)("div",null,(0,W.v_)(e.lo.less),1),e.vertical?(0,c.Q3)("",!0):((0,c.uX)(),(0,c.CE)("svg",{key:0,class:"vch__external-legend-wrapper",viewBox:e.legendViewbox,height:e.SQUARE_SIZE-e.SQUARE_BORDER_SIZE},[(0,c.Lk)("g",cm,[((0,c.uX)(!0),(0,c.CE)(c.FK,null,(0,c.pI)(e.curRangeColor,(u,m)=>((0,c.uX)(),(0,c.CE)("rect",{key:m,rx:e.round,ry:e.round,style:(0,W.Tr)({fill:u}),width:e.SQUARE_SIZE-e.SQUARE_BORDER_SIZE,height:e.SQUARE_SIZE-e.SQUARE_BORDER_SIZE,x:e.SQUARE_SIZE*m},null,12,um))),128))])],8,lm)),(0,c.Lk)("div",null,(0,W.v_)(e.lo.more),1)])])])])])],2)}const Su=Ht(Wt,[["render",dm]]);function fm(e){e.component(Su.name,Su)}const F5={install:fm},hm={class:"total-contributions"};var mm=(0,c.pM)({__name:"ActivityHeatmap",props:{values:{},locale:{}},setup(e){const t=["var(--color-secondary-alpha-60)","var(--color-secondary-alpha-60)","var(--color-primary-light-4)","var(--color-primary-light-2)","var(--color-primary)","var(--color-primary-dark-2)","var(--color-primary-dark-4)"],i=(0,Re.KR)(new Date);(0,c.sV)(()=>{const s=document.querySelector(".vch__external-legend-wrapper");s.setAttribute("viewBox","12 0 80 10"),s.style.marginRight="-12px"});function n(s){const l=new URLSearchParams(document.location.search),u=l.get("date"),m=new Date(s.date.getTime()-s.date.getTimezoneOffset()*6e4).toISOString().substring(0,10);u&&u===m?l.delete("date"):l.set("date",m),l.delete("page");const y=l.toString();window.location.search=y.length?`?${y}`:""}return(s,l)=>((0,c.uX)(),(0,c.CE)(c.FK,null,[(0,c.Lk)("div",hm,(0,W.v_)(s.locale.textTotalContributions),1),(0,c.bF)((0,Re.R1)(Su),{locale:s.locale.heatMapLocale,"no-data-text":s.locale.noDataText,"tooltip-unit":s.locale.tooltipUnit,"end-date":i.value,values:s.values,"range-color":t,onDayClick:l[0]||(l[0]=u=>n(u)),"tippy-props":{theme:"tooltip"}},null,8,["locale","no-data-text","tooltip-unit","end-date","values"])],64))}}),pm=mm;function gm(){const e=document.querySelector("#user-heatmap");if(e)try{const t={};for(const{contributions:l,timestamp:u}of JSON.parse(e.getAttribute("data-heatmap-data"))){const m=new Date(u*1e3).toDateString();t[m]=(t[m]||0)+l}const i=Object.keys(t).map(l=>({date:new Date(l),count:t[l]})),n={heatMapLocale:{months:new Array(12).fill(void 0).map((l,u)=>(0,St.z5)(u)),days:new Array(7).fill(void 0).map((l,u)=>(0,St.FS)(u)),on:" - ",more:e.getAttribute("data-locale-more"),less:e.getAttribute("data-locale-less")},tooltipUnit:"contributions",textTotalContributions:e.getAttribute("data-locale-total-contributions"),noDataText:e.getAttribute("data-locale-no-contributions")};Ai(pm,{values:i,locale:n}).mount(e),e.classList.remove("is-loading")}catch(t){console.error("Heatmap failed to load",t),e.textContent="Heatmap failed to load"}}var vm=Object.defineProperty,bm=(e,t,i)=>t in e?vm(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i,Td=(e,t,i)=>bm(e,typeof t!="symbol"?t+"":t,i);function _m(e,t){const l=(0,St.a8)(e,"image/svg+xml").documentElement,u=l?.width?.baseVal,m=l?.height?.baseVal;if(u===void 0||m===void 0)return null;if(u.unitType===SVGLength.SVG_LENGTHTYPE_PERCENTAGE||m.unitType===SVGLength.SVG_LENGTHTYPE_PERCENTAGE){const y=new Image;if(y.src=t,y.width>1&&y.width<99999&&y.height>1&&y.height<99999)return{width:y.width,height:y.height};if(l.hasAttribute("viewBox")){const A=l.viewBox.baseVal;return{width:300,height:300*A.width/A.height}}return{width:300,height:300}}return null}function xu(e,t){const i={width:e?.width||0,height:e?.height||0},n={width:t?.width||0,height:t?.height||0},s={width:Math.max(n.width,i.width),height:Math.max(n.height,i.height)};return{imageAfter:e,imageBefore:t,sizeAfter:i,sizeBefore:n,maxSize:s,ratio:[Math.floor(s.width-i.width)/2,Math.floor(s.height-i.height)/2,Math.floor(s.width-n.width)/2,Math.floor(s.height-n.height)/2]}}class ym{constructor(){Td(this,"containerEl"),Td(this,"diffContainerWidth")}async init(t){this.containerEl=t,t.setAttribute("data-image-diff-loaded","true"),(0,ke.mD)(t).find(".ui.menu.tabular .item").tab(),this.diffContainerWidth=Math.max(t.closest(".diff-file-box").clientWidth-300,100);const i=[{path:t.getAttribute("data-path-after"),mime:t.getAttribute("data-mime-after"),images:t.querySelectorAll("img.image-after"),boundsInfo:t.querySelector(".bounds-info-after")},{path:t.getAttribute("data-path-before"),mime:t.getAttribute("data-mime-before"),images:t.querySelectorAll("img.image-before"),boundsInfo:t.querySelector(".bounds-info-before")}];await Promise.all(i.map(async l=>{const[u]=await Promise.all(Array.from(l.images,m=>(0,C.QW)(m,l.path)));if(!u&&l.boundsInfo&&(l.boundsInfo.textContent="(image error)"),l.mime==="image/svg+xml"){const y=await(await(0,Ae.fG)(l.path)).text(),A=_m(y,l.path);if(A){for(const L of l.images)L.setAttribute("width",String(A.width)),L.setAttribute("height",String(A.height));(0,C.y9)(l.boundsInfo)}}}));const n=i[0].images,s=i[1].images;this.initSideBySide(xu(n[0],s[0])),n.length>0&&s.length>0&&(this.initSwipe(xu(n[1],s[1])),this.initOverlay(xu(n[2],s[2]))),(0,C.xP)(t,".image-diff-tabs",l=>l.classList.remove("is-loading"))}initSideBySide(t){let i=1;t.maxSize.width>(this.diffContainerWidth-24)/2&&(i=(this.diffContainerWidth-24)/2/t.maxSize.width);const n=t.imageAfter&&t.imageBefore&&t.imageAfter.naturalWidth!==t.imageBefore.naturalWidth,s=t.imageAfter&&t.imageBefore&&t.imageAfter.naturalHeight!==t.imageBefore.naturalHeight;if(t.imageAfter){const l=this.containerEl.querySelector(".bounds-info-after .bounds-info-width");l&&(l.textContent=`${t.imageAfter.naturalWidth}px`,l.classList.toggle("green",n));const u=this.containerEl.querySelector(".bounds-info-after .bounds-info-height");u&&(u.textContent=`${t.imageAfter.naturalHeight}px`,u.classList.toggle("green",s))}if(t.imageBefore){const l=this.containerEl.querySelector(".bounds-info-before .bounds-info-width");l&&(l.textContent=`${t.imageBefore.naturalWidth}px`,l.classList.toggle("red",n));const u=this.containerEl.querySelector(".bounds-info-before .bounds-info-height");u&&(u.textContent=`${t.imageBefore.naturalHeight}px`,u.classList.toggle("red",s))}if(t.imageAfter){const l=t.imageAfter.parentNode;t.imageAfter.style.width=`${t.sizeAfter.width*i}px`,t.imageAfter.style.height=`${t.sizeAfter.height*i}px`,l.style.margin="10px auto",l.style.width=`${t.sizeAfter.width*i+2}px`,l.style.height=`${t.sizeAfter.height*i+2}px`}if(t.imageBefore){const l=t.imageBefore.parentNode;t.imageBefore.style.width=`${t.sizeBefore.width*i}px`,t.imageBefore.style.height=`${t.sizeBefore.height*i}px`,l.style.margin="10px auto",l.style.width=`${t.sizeBefore.width*i+2}px`,l.style.height=`${t.sizeBefore.height*i+2}px`}}initSwipe(t){let i=1;if(t.maxSize.width>this.diffContainerWidth-12&&(i=(this.diffContainerWidth-12)/t.maxSize.width),t.imageAfter){const s=t.imageAfter.parentNode,l=s.parentNode;t.imageAfter.style.width=`${t.sizeAfter.width*i}px`,t.imageAfter.style.height=`${t.sizeAfter.height*i}px`,s.style.margin=`0px ${t.ratio[0]*i}px`,s.style.width=`${t.sizeAfter.width*i+2}px`,s.style.height=`${t.sizeAfter.height*i+2}px`,l.style.padding=`${t.ratio[1]*i}px 0 0 0`,l.style.width=`${t.maxSize.width*i+2}px`}if(t.imageBefore){const s=t.imageBefore.parentNode,l=s.parentNode;t.imageBefore.style.width=`${t.sizeBefore.width*i}px`,t.imageBefore.style.height=`${t.sizeBefore.height*i}px`,s.style.margin=`${t.ratio[3]*i}px ${t.ratio[2]*i}px`,s.style.width=`${t.sizeBefore.width*i+2}px`,s.style.height=`${t.sizeBefore.height*i+2}px`,l.style.width=`${t.maxSize.width*i+2}px`,l.style.height=`${t.maxSize.height*i+2}px`}const n=this.containerEl.querySelector(".diff-swipe");n&&(n.style.width=`${t.maxSize.width*i+2}px`,n.style.height=`${t.maxSize.height*i+30}px`),this.containerEl.querySelector(".swipe-bar").addEventListener("mousedown",s=>{s.preventDefault(),this.initSwipeEventListeners(s.currentTarget)})}initSwipeEventListeners(t){const i=t.parentNode,n=i.clientWidth,s=u=>{u.preventDefault();const m=i.getBoundingClientRect(),y=Math.max(0,Math.min(u.clientX-m.left,n));t.style.left=`${y}px`,this.containerEl.querySelector(".swipe-container").style.width=`${i.clientWidth-y}px`},l=()=>{document.removeEventListener("mousemove",s),document.removeEventListener("mouseup",l)};document.addEventListener("mousemove",s),document.addEventListener("mouseup",l)}initOverlay(t){let i=1;if(t.maxSize.width>this.diffContainerWidth-12&&(i=(this.diffContainerWidth-12)/t.maxSize.width),t.imageAfter){const l=t.imageAfter.parentNode;t.imageAfter.style.width=`${t.sizeAfter.width*i}px`,t.imageAfter.style.height=`${t.sizeAfter.height*i}px`,l.style.margin=`${t.ratio[1]*i}px ${t.ratio[0]*i}px`,l.style.width=`${t.sizeAfter.width*i+2}px`,l.style.height=`${t.sizeAfter.height*i+2}px`}if(t.imageBefore){const l=t.imageBefore.parentNode,u=l.parentNode;t.imageBefore.style.width=`${t.sizeBefore.width*i}px`,t.imageBefore.style.height=`${t.sizeBefore.height*i}px`,l.style.margin=`${t.ratio[3]*i}px ${t.ratio[2]*i}px`,l.style.width=`${t.sizeBefore.width*i+2}px`,l.style.height=`${t.sizeBefore.height*i+2}px`,u.style.width=`${t.maxSize.width*i+2}px`,u.style.height=`${t.maxSize.height*i+2}px`}const n=this.containerEl.querySelector('input[type="range"]');function s(){t.imageAfter&&(t.imageAfter.parentNode.style.opacity=`${Number(n.value)/100}`)}n?.addEventListener("input",s),s()}}function Ld(){for(const e of(0,C.jB)(document,".image-diff:not([data-image-diff-loaded])"))new ym().init(e)}const wm=(e,t)=>{const i=e.__vccOpts||e;for(const[n,s]of t)i[n]=s;return i},Sm={props:{title:{type:String,default:""},points:{type:Array,default:()=>[]},height:{type:Number,default:100},width:{type:Number,default:300},showYAxis:{type:Boolean,default:!1},showXAxis:{type:Boolean,default:!1},labelHeight:{type:Number,default:12},showTrendLine:{type:Boolean,default:!1},trendLineColor:{type:String,default:"green"},trendLineWidth:{type:Number,default:2},easeIn:{type:Boolean,default:!0},showValues:{type:Boolean,default:!1},maxYAxis:{type:Number,default:0},animationDuration:{type:Number,default:.5},barColor:{type:String,default:"deepskyblue"},textColor:{type:String,default:"black"},textAltColor:{type:String,default:"black"},textFont:{type:String,default:"10px sans-serif"},useCustomLabels:{type:Boolean,default:!1},customLabels:{type:Array,default:()=>[]}},data(){return{dynamicPoints:[],staticPoints:[],extraTopHeightForYAxisLabel:4,extraBottomHeightForYAxisLabel:4,digitsUsedInYAxis:0}},computed:{usingObjectsForDataPoints(){return this.points.every(e=>typeof e=="object")},dataPoints(){return this.usingObjectsForDataPoints?this.points.map(e=>e.value):this.points},dataLabels(){return this.points.map((e,t)=>this.useCustomLabels?this.customLabels[t]:this.usingObjectsForDataPoints?e.label:t+1)},dataColors(){return this.points.map(e=>({barColor:e&&e.barColor?e.barColor:this.barColor,textColor:e&&e.textColor?e.textColor:this.textColor,textAltColor:e&&e.textAltColor?e.textAltColor:this.textAltColor}))},yAxisWidth(){return this.digitsUsedInYAxis*5.8+5},xAxisHeight(){return this.showYAxis?this.labelHeight:this.labelHeight+this.extraBottomHeightForYAxisLabel+this.extraTopHeightForYAxisLabel},fullSvgWidth(){return this.width},fullSvgHeight(){return this.height},innerChartWidth(){return this.showYAxis?this.width-this.yAxisWidth:this.width},innerChartHeight(){let e=this.height;return this.showYAxis&&(e-=this.extraTopHeightForYAxisLabel+this.extraBottomHeightForYAxisLabel),this.showXAxis&&(e-=this.xAxisHeight),e},partitionWidth(){return this.innerChartWidth/this.dataPoints.length},maxDomain(){return this.maxYAxis?this.maxYAxis:Math.ceil(Math.max(...this.dataPoints))},chartData(){return this.dynamicPoints.map((e,t)=>({staticValue:this.staticPoints[t],index:t,label:this.dataLabels[t],width:this.partitionWidth-2,midPoint:this.partitionWidth/2,yLabel:this.innerChartHeight+4,x:t*this.partitionWidth,xMidpoint:t*this.partitionWidth+this.partitionWidth/2,yOffset:this.innerChartHeight-this.y(e),height:this.y(e),barColor:this.dataColors[t].barColor,textColor:this.dataColors[t].textColor,textAltColor:this.dataColors[t].textAltColor}))},trendLine(){const e=this.applySlope(this.dynamicPoints);return{x1:this.partitionWidth/2,y1:this.roundTo(this.innerChartHeight-this.y(e[0]),2),x2:this.innerChartWidth-this.partitionWidth/2,y2:this.roundTo(this.innerChartHeight-this.y(e[e.length-1]),2)}}},watch:{dataPoints:{handler(e){this.tween(e)},deep:!0}},created(){this.easeIn?this.tween(this.dataPoints):(this.dynamicPoints=this.dataPoints,this.staticPoints=this.dataPoints)},methods:{y(e){return e/this.maxDomain*this.innerChartHeight},roundTo(e,t=0){let i=!1,n=e;n<0&&(i=!0,n*=-1);const s=10**t;return n=parseFloat((n*s).toFixed(11)),n=(Math.round(n)/s).toFixed(2),i&&(n=(n*-1).toFixed(2)),n},easeInFunc(e){return 1-Math.cos(e*(Math.PI/2))},tween(e){this.staticPoints=e,this.dynamicPoints=Array(e.length).fill(0);const t=this.dynamicPoints,i=200,n=10;let s=new Date().getTime(),l=setInterval(()=>{if(this.dynamicPoints!==t){clearInterval(l);return}let u=(new Date().getTime()-s)/i;if(u=u<0?1:Math.min(u,1),u>=1){clearInterval(l),this.dynamicPoints=e;return}for(let m=0;m<t.length;m+=1)this.dynamicPoints[m]=this.easeInFunc(u)*e[m]},n)},getTicks(){for(let e=6;e>0;e-=1)if(this.maxDomain%e===0){const t=e<3,i=t?3:e;return this.digitsUsedInYAxis=this.maxDomain.toFixed(t?1:0).replace(".","").length,[...new Array(i+1)].map((n,s)=>{const l=this.maxDomain/i*(i-s),u=this.innerChartHeight/i*s;return{key:s,text:t?l.toFixed(1):l,yText:u<10?10:u+4,x1:this.yAxisWidth-4,y1:u,x2:this.yAxisWidth-1,y2:u}})}return[]},applySlope(e){let t=0,i=0;for(let y=0;y<e.length;y+=1)t+=y,i+=e[y];t/=e.length,i/=e.length;let n=0,s=0;for(let y=0;y<e.length;y+=1)n+=(y-t)*(e[y]-i),s+=(y-t)**2;const l=n/s,u=i-l*t,m=[];for(let y=0;y<e.length;y+=1)m.push(l*y+u);return m}}},xm=["width","height"],jm={key:0,id:"title"},Em=["transform"],Am=["transform","width","height"],Cm=["transform"],km=["width","height","y"],Tm=["x","y","dy"],Lm={key:1},Rm=["x","y"],Mm=["x1","x2","y1","y2"],Dm=["x1","y1","x2","y2","stroke-width","stroke"],Om={key:0},qm=["x1","x2","y1","y2"],Pm={key:1},Fm=["x1","x2","y1"],Im=["x1","y1","x2","y2"],Nm=["y"];function Hm(e,t,i,n,s,l){return(0,c.uX)(),(0,c.CE)("svg",{width:l.fullSvgWidth,height:l.fullSvgHeight,"aria-labelledby":"title",role:"img"},[i.title?((0,c.uX)(),(0,c.CE)("title",jm,(0,W.v_)(i.title),1)):(0,c.Q3)("",!0),(0,c.Lk)("g",{transform:`translate(0,${i.showYAxis?s.extraTopHeightForYAxisLabel:0})`},[(0,c.Lk)("g",{transform:`translate(${i.showYAxis?l.yAxisWidth:0},0)`,width:l.innerChartWidth,height:l.innerChartHeight},[((0,c.uX)(!0),(0,c.CE)(c.FK,null,(0,c.pI)(l.chartData,u=>((0,c.uX)(),(0,c.CE)("g",{key:u.index,transform:`translate(${u.x},0)`},[(0,c.Lk)("title",null,[(0,c.RG)(e.$slots,"title",{bar:u},()=>[(0,c.Lk)("tspan",null,(0,W.v_)(u.staticValue),1)])]),(0,c.Lk)("rect",{width:u.width,height:u.height,x:2,y:u.yOffset,style:(0,W.Tr)({fill:u.barColor})},null,12,km),i.showValues?((0,c.uX)(),(0,c.CE)("text",{key:0,x:u.midPoint,y:u.yOffset,dy:`${u.height<22?"-5px":"15px"}`,"text-anchor":"middle",style:(0,W.Tr)({fill:u.height<22?u.textColor:u.textAltColor,font:i.textFont})},(0,W.v_)(u.staticValue),13,Tm)):(0,c.Q3)("",!0),i.showXAxis?((0,c.uX)(),(0,c.CE)("g",Lm,[(0,c.RG)(e.$slots,"label",{bar:u,textStyle:{fill:i.textColor,font:i.textFont}},()=>[(0,c.Lk)("text",{x:u.midPoint,y:`${u.yLabel+10}px`,"text-anchor":"middle",style:(0,W.Tr)({fill:i.textColor,font:i.textFont})},(0,W.v_)(u.label),13,Rm)]),(0,c.Lk)("line",{x1:u.midPoint,x2:u.midPoint,y1:l.innerChartHeight+3,y2:l.innerChartHeight,stroke:"#555555","stroke-width":"1"},null,8,Mm)])):(0,c.Q3)("",!0)],8,Cm))),128)),i.showTrendLine?((0,c.uX)(),(0,c.CE)("line",{key:0,x1:l.trendLine.x1,y1:l.trendLine.y1,x2:l.trendLine.x2,y2:l.trendLine.y2,"stroke-width":i.trendLineWidth,stroke:i.trendLineColor},null,8,Dm)):(0,c.Q3)("",!0)],8,Am),i.showXAxis?((0,c.uX)(),(0,c.CE)("g",Om,[(0,c.Lk)("line",{x1:i.showYAxis?l.yAxisWidth-1:2,x2:l.innerChartWidth+l.yAxisWidth,y1:l.innerChartHeight,y2:l.innerChartHeight,stroke:"#555555","stroke-width":"1"},null,8,qm)])):(0,c.Q3)("",!0),i.showYAxis?((0,c.uX)(),(0,c.CE)("g",Pm,[(0,c.Lk)("line",{x1:l.yAxisWidth-1,x2:l.yAxisWidth-1,y1:l.innerChartHeight,y2:"0",stroke:"#555555","stroke-width":"1"},null,8,Fm),((0,c.uX)(!0),(0,c.CE)(c.FK,null,(0,c.pI)(l.getTicks(),u=>((0,c.uX)(),(0,c.CE)("g",{key:u.key},[(0,c.Lk)("line",{x1:u.x1,y1:u.y1,x2:u.x2,y2:u.y2,stroke:"#555555","stroke-width":"1"},null,8,Im),(0,c.Lk)("text",{x:"0",y:u.yText,"alignment-baseline":"central",style:(0,W.Tr)({fill:i.textColor,font:i.textFont})},(0,W.v_)(u.text),13,Nm)]))),128))])):(0,c.Q3)("",!0)],8,Em)],8,xm)}const Rd=wm(Sm,[["render",Hm]]);function ju(e){ju.installed||(ju.installed=!0,e.component("VueBarGraph",Rd))}const Bm={install:ju};let gc=null;typeof window<"u"?gc=window.Vue:typeof __webpack_require__.g<"u"&&(gc=__webpack_require__.g.Vue),gc&&gc.use(Bm);const $m=["href"],Um=["x","y","href"],Vm=["x","y","href"],Wm={key:0};var zm=(0,c.pM)({__name:"RepoActivityTopAuthors",setup(e){const t=(0,Re.KR)({barColor:"green",textColor:"black",textAltColor:"white"}),i=window.config.pageData.repoActivityTopAuthors||[],n=(0,c.EW)(()=>i.map(y=>({value:y.commits,label:y.name}))),s=(0,c.EW)(()=>i.map((y,A)=>({position:A+1,...y}))),l=(0,c.EW)(()=>i.length*40),u=(0,Re.KR)(null),m=(0,Re.KR)(null);return(0,c.sV)(()=>{const y=window.getComputedStyle(u.value),A=window.getComputedStyle(m.value);t.value={barColor:y.backgroundColor,textColor:y.color,textAltColor:A.color}}),(y,A)=>((0,c.uX)(),(0,c.CE)("div",null,[(0,c.Lk)("div",{class:"activity-bar-graph",ref_key:"styleElement",ref:u,style:{width:"0",height:"0"}},null,512),(0,c.Lk)("div",{class:"activity-bar-graph-alt",ref_key:"altStyleElement",ref:m,style:{width:"0",height:"0"}},null,512),(0,c.bF)((0,Re.R1)(Rd),{points:n.value,"show-x-axis":!0,"show-y-axis":!1,"show-values":!0,width:l.value,"bar-color":t.value.barColor,"text-color":t.value.textColor,"text-alt-color":t.value.textAltColor,height:100,"label-height":20},{label:(0,c.k6)(L=>[((0,c.uX)(!0),(0,c.CE)(c.FK,null,(0,c.pI)(s.value,(z,X)=>((0,c.uX)(),(0,c.CE)("g",{key:z.position},[L.bar.index===X&&z.home_link?((0,c.uX)(),(0,c.CE)("a",{key:0,href:z.home_link},[(0,c.Lk)("image",{x:`${L.bar.midPoint-10}px`,y:`${L.bar.yLabel}px`,height:"20",width:"20",href:z.avatar_link},null,8,Um)],8,$m)):L.bar.index===X?((0,c.uX)(),(0,c.CE)("image",{key:1,x:`${L.bar.midPoint-10}px`,y:`${L.bar.yLabel}px`,height:"20",width:"20",href:z.avatar_link},null,8,Vm)):(0,c.Q3)("v-if",!0)]))),128))]),title:(0,c.k6)(L=>[((0,c.uX)(!0),(0,c.CE)(c.FK,null,(0,c.pI)(s.value,(z,X)=>((0,c.uX)(),(0,c.CE)("tspan",{key:z.position},[L.bar.index===X?((0,c.uX)(),(0,c.CE)("tspan",Wm,(0,W.v_)(z.name),1)):(0,c.Q3)("v-if",!0)]))),128))]),_:1},8,["points","width","bar-color","text-color","text-alt-color"])]))}}),Km=zm,pr=__webpack_require__("./web_src/js/utils/url.ts");async function Xm(e){e.preventDefault();const t=e.target.closest("a.archive-link[href]"),i=t.closest(".ui.dropdown")??t;i.classList.add("is-loading","loading-icon-2px");try{for(let n=0;;n++){const s=await(0,Ae.LO)(t.href);if(!s.ok)throw new Error(`Invalid server response: ${s.status}`);if((await s.json()).complete)break;await(0,St.yy)(Math.min((n+1)*750,2e3))}window.location.href=t.href}catch(n){console.error(n),gt(`Failed to download the archive: ${n}`,{duration:2500})}finally{i.classList.remove("is-loading","loading-icon-2px")}}function Gm(){(0,C.jB)(document,"a.archive-link[href]",e=>e.addEventListener("click",Xm))}function Qm(){const e=document.querySelector("#repo-activity-top-authors-chart");e&&Ai(Km).mount(e)}function Ym(e,t){const i=e.indexOf("{url}");if(i===-1)return e;const n=e.indexOf("?"),s=n>=0&&n<i;return e.replace("{url}",s?encodeURIComponent(t):t)}function Md(e){const t=e.querySelector(".repo-clone-url"),i=e.querySelector(".repo-clone-https"),n=e.querySelector(".repo-clone-ssh"),s=e.querySelector(".repo-clone-tea"),l=function(){let u=localStorage.getItem("repo-clone-protocol");["https","ssh","tea"].includes(u)||(u="https"),u==="tea"&&!s&&(u="https"),u==="https"&&!i?u="ssh":u==="ssh"&&!n&&(u="https");const m=u==="https",y=u==="ssh",A=u==="tea";i&&(i.textContent=window.origin.split(":")[0].toUpperCase(),i.classList.toggle("active",m)),n&&n.classList.toggle("active",y),s&&s.classList.toggle("active",A);let L;if(m?L=i:y?L=n:A&&(L=s),!L)return;const z=(0,pr.BZ)(L.getAttribute("data-link"));for(const X of document.querySelectorAll(".js-clone-url"))X.nodeName==="INPUT"?X.value=z:X.textContent=z;for(const X of e.querySelectorAll(".js-clone-url-editor"))X.href=Ym(X.getAttribute("data-href-template"),z)};l(),i?.addEventListener("click",()=>{localStorage.setItem("repo-clone-protocol","https"),l()}),n?.addEventListener("click",()=>{localStorage.setItem("repo-clone-protocol","ssh"),l()}),s?.addEventListener("click",()=>{localStorage.setItem("repo-clone-protocol","tea"),l()}),t.addEventListener("focus",()=>{t.select()})}function Jm(e){const t=e.nextElementSibling;Md(t),Ie(e,{content:t,trigger:"click",placement:"bottom-end",interactive:!0,hideOnClick:!0,arrow:!1})}function Zm(){(0,C.jB)(document,".js-btn-clone-panel",Jm),(0,C.jB)(document,".clone-buttons-combo",Md)}async function ep(e,t,i,n){try{if(!(await(0,Ae.LO)(e,{data:new URLSearchParams({action:t,issue_ids:i,id:n})})).ok)throw new Error("Failed to update issues meta")}catch(s){console.error(s)}}function Dd(e){e=e.trim().replace(/[^-.\w]/g,"-");for(let t="";t!==e;){t=e,e=e.replace(/\.+$/g,""),e=e.replace(/\.{2,}/g,".");for(const i of[".git",".wiki",".rss",".atom"])e.endsWith(i)&&(e=e.substring(0,e.length-i.length))}return[".","..","-"].includes(e)&&(e=""),e}const Eu=document.querySelector("#service_type"),Od=document.querySelector("#auth_username"),qd=document.querySelector("#auth_password"),Pd=document.querySelector("#auth_token"),Fd=document.querySelector("#mirror"),Au=document.querySelector("#lfs"),tp=document.querySelector("#lfs_settings"),Id=document.querySelector("#lfs_endpoint"),Cu=document.querySelectorAll("#migrate_items input[type=checkbox]");function ip(){np(),Nd(),Od?.addEventListener("input",()=>{El(!1)}),qd?.addEventListener("input",()=>{El(!1)}),Pd?.addEventListener("input",()=>{El(!0)}),Fd?.addEventListener("change",()=>{El(!0)}),document.querySelector("#lfs_settings_show")?.addEventListener("click",i=>{i.preventDefault(),i.stopPropagation(),(0,C.fi)(Id)}),Au?.addEventListener("change",Nd);const e=document.querySelector("#clone_addr"),t=document.querySelector("#repo_name");if(e&&t){let i=!1;t.addEventListener("input",()=>{i=!0}),e.addEventListener("input",()=>{if(i)return;let n=e.value.split(/[?#]/)[0];const s=/^(.*\/)?((.+?)\/?)$/.exec(n);if(!s||s.length<4){t.value="";return}n=s[3].split(/[?#]/)[0],t.value=Dd(n)})}}function np(){if(!Eu)return;const e=Number(Eu.value);El(e!==1)}function El(e){let t=!1;if(e?t=Pd?.value!=="":t=Od?.value!==""||qd?.value!=="",t&&Number(Eu?.value)>1){if(Fd?.checked){for(const i of Cu)i.disabled=i.name!=="wiki";return}for(const i of Cu)i.disabled=!1}else for(const i of Cu)i.disabled=!0}function Nd(){if(!Au)return;const e=Au.checked;(0,C.oi)(tp,e),(0,C.y9)(Id)}var sp=__webpack_require__("./web_src/js/utils/color.ts");async function vc(e,t={}){const{Sortable:i}=await __webpack_require__.e("sortablejs").then(__webpack_require__.bind(__webpack_require__,"./node_modules/sortablejs/modular/sortable.esm.js"));return new i(e,{animation:150,ghostClass:"card-ghost",onChoose:n=>{(t.handle?n.item.querySelector(t.handle):n.item).classList.add("tw-cursor-grabbing"),t.onChoose?.(n)},onUnchoose:n=>{(t.handle?n.item.querySelector(t.handle):n.item).classList.remove("tw-cursor-grabbing"),t.onUnchoose?.(n)},...t})}function Hd(e){const t=e.parentElement,i=t.querySelectorAll(".issue-card").length;t.querySelector(".project-column-issue-count").textContent=String(i)}async function Bd({item:e,from:t,to:i,oldIndex:n}){const s=i.querySelectorAll(".issue-card");Hd(t),Hd(i);const l={issues:Array.from(s,(u,m)=>({issueID:parseInt(u.getAttribute("data-issue")),sorting:m}))};try{await(0,Ae.LO)(`${i.getAttribute("data-url")}/move`,{data:l})}catch(u){console.error(u),t.insertBefore(e,t.children[n])}}async function rp(){const e=document.querySelector("#project-board");let t=e.querySelectorAll(".project-column");vc(e,{group:"project-column",draggable:".project-column",handle:".project-column-header",delayOnTouchOnly:!0,delay:500,onSort:async()=>{t=e.querySelectorAll(".project-column");const i={columns:Array.from(t,(n,s)=>({columnID:parseInt(n.getAttribute("data-id")),sorting:s}))};try{await(0,Ae.LO)(e.getAttribute("data-url"),{data:i})}catch(n){console.error(n)}}});for(const i of t){const n=i.querySelector(".cards");vc(n,{group:"shared",onAdd:Bd,onUpdate:Bd,delayOnTouchOnly:!0,delay:500})}}function op(e){const t=document.querySelector(".ui.modal#project-column-modal-edit"),i=t.querySelector("form"),n=i.querySelector('input[name="id"]'),s=i.querySelector('input[name="title"]'),l=i.querySelector('input[name="color"]'),u="data-modal-project-column-id",m="data-modal-project-column-title-input",y="data-modal-project-column-color-input";(0,C.jB)(document,".show-project-column-modal-edit",A=>{A.addEventListener("click",()=>{n.value=A.getAttribute(u),s.value=A.getAttribute(m),l.value=A.getAttribute(y),l.dispatchEvent(new Event("input",{bubbles:!0}))})}),i.addEventListener("submit",async A=>{A.preventDefault();const L=n.value,z=i.getAttribute("data-action-base-link"),X=new FormData(i),_e=L?`${z}/${L}`:`${z}/columns/new`,pe=L?"PUT":"POST";try{if(i.classList.add("is-loading"),await(0,Ae.Em)(_e,{method:pe,data:X}),!L){window.location.reload();return}(0,ke.mD)(t).modal("hide");const de=e.querySelector(`.show-project-column-modal-edit[${u}="${L}"]`);de.setAttribute(m,s.value),de.setAttribute(y,l.value);const Pe=e.querySelector(`.project-column[data-id="${L}"]`),Le=Pe.querySelector(".project-column-title-text");if(Le.textContent=s.value,l.value){const Te=(0,sp.a)(l.value);Pe.style.setProperty("background",l.value,"important"),Pe.style.setProperty("color",Te,"important"),(0,C.xP)(Pe,".divider",He=>He.style.color=Te)}else Pe.style.removeProperty("background"),Pe.style.removeProperty("color"),(0,C.xP)(Pe,".divider",Te=>Te.style.removeProperty("color"))}finally{i.classList.remove("is-loading")}})}function ap(){const e=document.querySelector(".screen-full"),t=document.querySelector(".screen-normal");if(!e||!t)return;const i=n=>{(0,St._M)(".projects-view",n),(0,C.oi)(e,!n),(0,C.oi)(t,n)};e.addEventListener("click",()=>i(!0)),t.addEventListener("click",()=>i(!1))}function lp(){ap();const e=document.querySelector('#project-board[data-project-borad-writable="true"]');e&&(rp(),op(e))}function cp(){for(const e of document.querySelectorAll("th[data-sortt-asc]")||[]){const t=e.getAttribute("data-sortt-asc"),i=e.getAttribute("data-sortt-desc"),n=e.getAttribute("data-sortt-default");e.addEventListener("click",()=>{up(t,i,n)})}}function up(e,t,i){if(!e)return!1;t||(t="");const n=new URL(window.location.href);let s=n.searchParams.get("sort");!s&&i&&(s=e),n.searchParams.set("sort",s!==e?e:t),window.location.replace(n.href)}function dp(){const e=window.config.pageData.adminUserListSearchForm;if(!e)return;const t=document.querySelector("#user-list-search-form");if(!t)return;for(const n of t.querySelectorAll(`button[name=sort][value="${e.SortType}"]`))n.classList.add("active");if(e.StatusFilterMap){for(const[n,s]of Object.entries(e.StatusFilterMap))if(s)for(const l of t.querySelectorAll(`input[name="status_filter[${n}]"][value="${s}"]`))l.checked=!0}for(const n of t.querySelectorAll("input[type=radio]"))n.addEventListener("click",()=>{t.submit()});const i=t.querySelectorAll(".j-reset-status-filter");for(const n of i)n.addEventListener("click",s=>{s.preventDefault();for(const l of t.querySelectorAll("input[type=radio]"))l.name.startsWith("status_filter[")&&(l.checked=!1);t.submit()})}const{appSubUrl:fp}=window.config;function hp(){const e=document.querySelector(".page-content.admin.config");if(e)for(const t of e.querySelectorAll('input[type="checkbox"][data-config-dyn-key]'))t.addEventListener("change",async()=>{try{const n=await(await(0,Ae.LO)(`${fp}/-/admin/config`,{data:new URLSearchParams({key:t.getAttribute("data-config-dyn-key"),value:String(t.checked)})})).json();if(n.errorMessage)throw new Error(n.errorMessage)}catch(i){Dt(t,i.toString()),t.checked=!t.checked}})}const $d=e=>`user-content-${e}`,Ud=e=>e.replace(/^user-content-/,""),mp=e=>e.startsWith("user-content-");function Vd(e){let t;try{t=decodeURIComponent(e??"")}catch{}if(!t)return;const i=$d(t);let n=document.getElementById(i);n=n??document.querySelector(`a[name="${CSS.escape(i)}"]`),n=!n&&mp(t)?document.getElementById(t):n,n?.scrollIntoView()}function pp(){const e=document.querySelectorAll(".markup");if(e.length){for(const t of e){for(const i of t.querySelectorAll("h1, h2, h3, h4, h5, h6")){const n=document.createElement("a");n.classList.add("anchor"),n.setAttribute("href",`#${encodeURIComponent(Ud(i.id))}`),n.innerHTML=(0,Z.JW)("octicon-link"),i.prepend(n)}for(const i of t.querySelectorAll('a[href^="#"]')){const n=i.getAttribute("href");n.startsWith("#user-content-")&&i.setAttribute("href",`#${Ud(n.substring(1))}`)}for(const i of t.querySelectorAll("a[name]")){const n=i.getAttribute("name");n&&i.setAttribute("name",$d(n))}for(const i of t.querySelectorAll('a[href^="#"]'))i.addEventListener("click",n=>{Vd(n.currentTarget.getAttribute("href")?.substring(1))})}document.querySelector(":target")||Vd(window.location.hash?.substring(1))}}const{appSubUrl:gp}=window.config;async function Wd(){await(0,St.yy)(5e3),window.location.href=`${gp}/`}const{appSubUrl:ku,notificationSettings:ua,assetVersionEncoded:vp}=window.config;let zd=0;function Kd(){const e=document.querySelector("#notification_table");if(e){window.addEventListener("pageshow",t=>{if(t.persisted){const i=document.querySelector("#notification_table"),n=document.querySelector(".notifications-unread-count");let s=parseInt(n.textContent);for(const l of i.querySelectorAll('.notifications-item[data-remove="true"]'))l.remove(),s-=1;n.textContent=String(s)}});for(const t of e.querySelectorAll('.notifications-item[data-status="1"] .notifications-link'))t.addEventListener("click",i=>{i.target.closest(".notifications-item").setAttribute("data-remove","true")})}}async function bp(e){try{const t=JSON.parse(e.data);for(const i of document.querySelectorAll(".notification_count"))i.classList.toggle("tw-hidden",t.Count===0),i.textContent=`${t.Count}`;await Gd()}catch(t){console.error(t,e)}}function _p(){if(!document.querySelector(".notification_count"))return;let e=!1;const t=(i,n)=>{i<=0||!Number.isFinite(i)||(e=!0,n=n??Xd(),setTimeout(async()=>{await yp(t,i,n)},i))};if(ua.EventSourceUpdateTime>0&&window.EventSource&&window.SharedWorker){const i=new SharedWorker(`${__webpack_require__.p}js/eventsource.sharedworker.js?v=${vp}`,"notification-worker");i.addEventListener("error",n=>{console.error("worker error",n)}),i.port.addEventListener("messageerror",()=>{console.error("unable to deserialize message")}),i.port.postMessage({type:"start",url:`${window.location.origin}${ku}/user/events`}),i.port.addEventListener("message",n=>{if(!n.data||!n.data.type){console.error("unknown worker message event",n);return}if(n.data.type==="notification-count")bp(n);else if(n.data.type==="no-event-source")e||t(ua.MinTimeout);else if(n.data.type==="error")console.error("worker port event error",n.data);else if(n.data.type==="logout"){if(n.data.data!=="here")return;i.port.postMessage({type:"close"}),i.port.close(),Wd()}else n.data.type==="close"&&(i.port.postMessage({type:"close"}),i.port.close())}),i.port.addEventListener("error",n=>{console.error("worker port error",n)}),i.port.start(),window.addEventListener("beforeunload",()=>{i.port.postMessage({type:"close"}),i.port.close()});return}t(ua.MinTimeout)}function Xd(){return Number(document.querySelector(".notification_count").textContent??"0")}async function yp(e,t,i){const n=Xd();if(i!==n){e(ua.MinTimeout,n);return}const s=await wp();let l=!1;i!==s?(l=!0,t=ua.MinTimeout):t<ua.MaxTimeout&&(t+=ua.TimeoutStep),e(t,s),l&&await Gd()}async function Gd(){const e=document.querySelector("#notification_div");if(e)try{const t=new URLSearchParams(window.location.search);t.set("div-only",String(!0)),t.set("sequence-number",String(++zd));const i=await(0,Ae.fG)(`${ku}/notifications?${t.toString()}`);if(!i.ok)throw new Error("Failed to fetch notification table");const n=await i.text(),s=(0,C.SL)(n);parseInt(s.getAttribute("data-sequence-number"))===zd&&(e.outerHTML=n,Kd())}catch(t){console.error(t)}}async function wp(){try{const e=await(0,Ae.fG)(`${ku}/notifications/new`);if(!e.ok)throw new Error("Failed to fetch notification count");const t=await e.json();(0,C.oi)(".notification_count",t.new!==0);for(const i of document.querySelectorAll(".notification_count"))i.textContent=`${t.new}`;return t.new}catch(e){return console.error(e),0}}let Qd,Yd,Jd,Zd;function Sp(e,t,i,n){const s=(0,C.SL)(`
DesignScreenshot/output/git.buildapp.eu.org_run/git.buildapp.eu.org_3_credentials_filled.html:314:`);return s.lastIndexOf("#")>l},n=h0(async(s,l)=>{if(!i())return{matched:!1};const u=await p0(s,l);return i()?u:{matched:!1}},300);e.addEventListener("text-expander-change",s=>{const{key:l,text:u,provide:m}=s.detail;if(l===":"){const y=c0(u);if(!y.length)return m({matched:!1});const A=document.createElement("ul");A.classList.add("suggestions");for(const L of y){const z=Bu(L),X=document.createElement("li");X.setAttribute("role","option"),X.setAttribute("data-value",z),X.textContent=`${z} ${L}`,A.append(X)}m({matched:!0,fragment:A})}else if(l==="@"){const y=u0(u);if(!y.length)return m({matched:!1});const A=document.createElement("ul");A.classList.add("suggestions");for(const{value:L,name:z,fullname:X,avatar:_e}of y){const pe=document.createElement("li");pe.setAttribute("role","option"),pe.setAttribute("data-value",`${l}${L}`);const de=document.createElement("img");de.src=_e,pe.append(de);const Pe=document.createElement("span");if(Pe.classList.add("name"),Pe.textContent=z,pe.append(Pe),X&&X.toLowerCase()!==z){const Le=document.createElement("span");Le.classList.add("fullname"),Le.textContent=X,pe.append(Le)}A.append(pe)}m({matched:!0,fragment:A})}else l==="#"&&m(n(l,u))}),e.addEventListener("text-expander-value",({detail:s})=>{if(s?.item){const l=["@","#"].includes(s.key)?" ":"";s.value=`${s.item.getAttribute("data-value")}${l}`}})}var v0=Object.defineProperty,b0=(e,t,i)=>t in e?v0(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i,vs=(e,t,i)=>b0(e,typeof t!="symbol"?t+"":t,i);let $a=0;function hh(e){return e.value?!0:((0,C.EH)(e)?(e.required=!0,e.closest("form")?.reportValidity()):gt("Require non-empty content"),!1)}class ha{constructor(t,i={}){if(vs(this,"container"),vs(this,"options"),vs(this,"tabEditor"),vs(this,"tabPreviewer"),vs(this,"supportEasyMDE"),vs(this,"easyMDE"),vs(this,"easyMDEToolbarActions"),vs(this,"easyMDEToolbarDefault"),vs(this,"textarea"),vs(this,"textareaMarkdownToolbar"),vs(this,"textareaAutosize"),vs(this,"dropzone"),vs(this,"attachedDropzoneInst"),vs(this,"previewMode"),vs(this,"previewUrl"),vs(this,"previewContext"),t._giteaComboMarkdownEditor)throw new Error("ComboMarkdownEditor already initialized");t._giteaComboMarkdownEditor=this,this.options=i,this.container=t}async init(){this.prepareEasyMDEToolbarActions(),this.setupContainer(),this.setupTab(),await this.setupDropzone(),this.setupTextarea(),await this.switchToUserPreference()}applyEditorHeights(t,i){i&&(i.minHeight&&(t.style.minHeight=i.minHeight),i.height&&(t.style.height=i.height),i.maxHeight&&(t.style.maxHeight=i.maxHeight))}setupContainer(){this.supportEasyMDE=this.container.getAttribute("data-support-easy-mde")==="true",this.previewMode=this.container.getAttribute("data-content-mode"),this.previewUrl=this.container.getAttribute("data-preview-url"),this.previewContext=this.container.getAttribute("data-preview-context"),g0(this.container.querySelector("text-expander"))}setupTextarea(){this.textarea=this.container.querySelector(".markdown-text-editor"),this.textarea._giteaComboMarkdownEditor=this,this.textarea.id=`_combo_markdown_editor_${String($a++)}`,this.textarea.addEventListener("input",()=>Lo(this.container)),this.applyEditorHeights(this.textarea,this.options.editorHeights),this.textarea.getAttribute("data-disable-autosize")!=="true"&&(this.textareaAutosize=(0,C.DS)(this.textarea,{viewportMarginBottom:130})),this.textareaMarkdownToolbar=this.container.querySelector("markdown-toolbar"),this.textareaMarkdownToolbar.setAttribute("for",this.textarea.id);for(const s of this.textareaMarkdownToolbar.querySelectorAll(".markdown-toolbar-button"))s.setAttribute("role","button"),s.nodeName==="BUTTON"&&!s.getAttribute("type")&&s.setAttribute("type","button");const t=this.container.querySelector(".markdown-switch-monospace"),i=localStorage?.getItem("markdown-editor-monospace")==="true",n=t.getAttribute(i?"data-disable-text":"data-enable-text");t.setAttribute("data-tooltip-content",n),t.setAttribute("aria-checked",String(i)),t.addEventListener("click",s=>{s.preventDefault();const l=localStorage?.getItem("markdown-editor-monospace")!=="true";localStorage.setItem("markdown-editor-monospace",String(l)),this.textarea.classList.toggle("tw-font-mono",l);const u=t.getAttribute(l?"data-disable-text":"data-enable-text");t.setAttribute("data-tooltip-content",u),t.setAttribute("aria-checked",String(l))}),this.supportEasyMDE&&this.container.querySelector(".markdown-switch-easymde").addEventListener("click",async l=>{l.preventDefault(),this.userPreferredEditor="easymde",await this.switchToEasyMDE()}),this.initMarkdownButtonTableAdd(),Ig(this.textarea),Gg(this.textarea,this.dropzone)}async setupDropzone(){this.container.getAttribute("data-dropzone-parent-container")&&(this.dropzone=this.container.closest(this.container.getAttribute("data-dropzone-parent-container"))?.querySelector(".dropzone"),this.dropzone&&(this.attachedDropzoneInst=await Qf(this.dropzone),this.attachedDropzoneInst.on("processing",()=>Vu(this.container)),this.attachedDropzoneInst.on("queuecomplete",()=>Vu(this.container))))}dropzoneGetFiles(){return this.dropzone?Array.from(this.dropzone.querySelectorAll(".files [name=files]"),t=>t.value):null}dropzoneReloadFiles(){this.dropzone&&this.attachedDropzoneInst.emit(Ac)}dropzoneSubmitReload(){this.dropzone&&(this.attachedDropzoneInst.emit("submit"),this.attachedDropzoneInst.emit(Ac))}isUploading(){return this.dropzone?this.attachedDropzoneInst.getQueuedFiles().length||this.attachedDropzoneInst.getUploadingFiles().length:!1}setupTab(){const t=this.container.querySelectorAll(".tabular.menu > .item");if(!t.length)return;this.tabEditor=Array.from(t).find(s=>s.getAttribute("data-tab-for")==="markdown-writer"),this.tabPreviewer=Array.from(t).find(s=>s.getAttribute("data-tab-for")==="markdown-previewer"),this.tabEditor.setAttribute("data-tab",`markdown-writer-${$a}`),this.tabPreviewer.setAttribute("data-tab",`markdown-previewer-${$a}`);const i=this.container.querySelector('.ui.tab[data-tab-panel="markdown-writer"]'),n=this.container.querySelector('.ui.tab[data-tab-panel="markdown-previewer"]');i.setAttribute("data-tab",`markdown-writer-${$a}`),n.setAttribute("data-tab",`markdown-previewer-${$a}`),$a++,this.tabEditor.addEventListener("click",()=>{requestAnimationFrame(()=>{this.focus()})}),(0,ke.mD)(t).tab(),this.tabPreviewer.addEventListener("click",async()=>{const s=new FormData;s.append("mode",this.previewMode),s.append("context",this.previewContext),s.append("text",this.value());const u=await(await(0,Ae.LO)(this.previewUrl,{data:s})).text();uh(n,u)})}generateMarkdownTable(t,i){const n=[];n.push(`| ${"Header ".repeat(i).trim().split(" ").join(" | ")} |`,`| ${"--- ".repeat(i).trim().split(" ").join(" | ")} |`);for(let s=0;s<t;s++)n.push(`| ${"Cell ".repeat(i).trim().split(" ").join(" | ")} |`);return n.join(`
DesignScreenshot/output/git.buildapp.eu.org_run/git.buildapp.eu.org_3_credentials_filled.html:318:`),n.hide()})}switchTabToEditor(){this.tabEditor.click()}prepareEasyMDEToolbarActions(){this.easyMDEToolbarDefault=["bold","italic","strikethrough","|","heading-1","heading-2","heading-3","heading-bigger","heading-smaller","|","code","quote","|","gitea-checkbox-empty","gitea-checkbox-checked","|","unordered-list","ordered-list","|","link","image","table","horizontal-rule","|","gitea-switch-to-textarea"]}parseEasyMDEToolbar(t,i){this.easyMDEToolbarActions=this.easyMDEToolbarActions||l0(t,this);const n=[];for(const s of i){const l=this.easyMDEToolbarActions[s];if(!l)throw new Error(`Unknown EasyMDE toolbar action ${s}`);n.push(l)}return n}async switchToUserPreference(){this.userPreferredEditor==="easymde"&&this.supportEasyMDE?await this.switchToEasyMDE():this.switchToTextarea()}switchToTextarea(){this.easyMDE&&((0,C.fi)(this.textareaMarkdownToolbar),this.easyMDE&&(this.easyMDE.toTextArea(),this.easyMDE=null))}async switchToEasyMDE(){if(this.easyMDE)return;const{default:t}=await __webpack_require__.e("easymde").then(__webpack_require__.t.bind(__webpack_require__,"./node_modules/easymde/src/js/easymde.js",23)),i={autoDownloadFontAwesome:!1,element:this.textarea,forceSync:!0,renderingConfig:{singleLineBreaks:!1},indentWithTabs:!1,tabSize:4,spellChecker:!1,inputStyle:"contenteditable",nativeSpellcheck:!0,...this.options.easyMDEOptions};i.toolbar=this.parseEasyMDEToolbar(t,i.toolbar??this.easyMDEToolbarDefault),this.easyMDE=new t(i),this.easyMDE.codemirror.on("change",()=>Lo(this.container)),this.easyMDE.codemirror.setOption("extraKeys",{"Cmd-Enter":n=>kc(n.getTextArea()),"Ctrl-Enter":n=>kc(n.getTextArea()),Enter:n=>{const s=document.querySelector(".tribute-container");(!s||s.style.display==="none")&&n.execCommand("newlineAndIndent")},Up:n=>{const s=document.querySelector(".tribute-container");if(!s||s.style.display==="none")return n.execCommand("goLineUp")},Down:n=>{const s=document.querySelector(".tribute-container");if(!s||s.style.display==="none")return n.execCommand("goLineDown")}}),this.applyEditorHeights(this.container.querySelector(".CodeMirror-scroll"),this.options.editorHeights),await Tg(this.easyMDE.codemirror.getInputField()),this.dropzone&&Xg(this.easyMDE,this.dropzone),(0,C.y9)(this.textareaMarkdownToolbar)}value(t=void 0){if(t===void 0)return this.easyMDE?this.easyMDE.value():this.textarea.value;this.easyMDE?this.easyMDE.value(t):this.textarea.value=t,this.textareaAutosize?.resizeToFit()}focus(){this.easyMDE?this.easyMDE.codemirror.focus():this.textarea.focus()}moveCursorToEnd(){this.textarea.focus(),this.textarea.setSelectionRange(this.textarea.value.length,this.textarea.value.length),this.easyMDE&&(this.easyMDE.codemirror.focus(),this.easyMDE.codemirror.setCursor(this.easyMDE.codemirror.lineCount(),0))}get userPreferredEditor(){return window.localStorage.getItem(`markdown-editor-${this.previewMode??"default"}`)}set userPreferredEditor(t){window.localStorage.setItem(`markdown-editor-${this.previewMode??"default"}`,t)}}vs(ha,"EventEditorContentChanged",Vf),vs(ha,"EventUploadStateChanged",Jf);function Xu(e){return e?(e.length&&(e=e[0]),e._giteaComboMarkdownEditor):null}async function ma(e,t={}){if(!e)throw new Error("initComboMarkdownEditor: container is null");const i=new ha(e,t);return await i.init(),i}var _0=Object.defineProperty,y0=(e,t,i)=>t in e?_0(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i,Ro=(e,t,i)=>y0(e,typeof t!="symbol"?t+"":t,i);function w0(){const e=[document.querySelector(".edit-content-zone:not(.tw-hidden) textarea"),document.querySelector("#comment-form textarea")];for(const t of e)if(t&&t.value.trim().length>10){if(t.parentElement.scrollIntoView(),!window.confirm("Page will be reloaded, but there are draft comments. Continuing to reload will discard the comments. Continue?"))return;break}window.location.reload()}class S0{constructor(t){if(Ro(this,"updateUrl"),Ro(this,"updateAlgo"),Ro(this,"selectionMode"),Ro(this,"elDropdown"),Ro(this,"elList"),Ro(this,"elComboValue"),Ro(this,"initialValues"),Ro(this,"container"),this.container=t,this.updateUrl=t.getAttribute("data-update-url"),this.updateAlgo=t.getAttribute("data-update-algo"),this.selectionMode=t.getAttribute("data-selection-mode"),!["single","multiple"].includes(this.selectionMode))throw new Error(`Invalid data-update-on: ${this.selectionMode}`);if(!["diff","all"].includes(this.updateAlgo))throw new Error(`Invalid data-update-algo: ${this.updateAlgo}`);this.elDropdown=t.querySelector(":scope > .ui.dropdown"),this.elList=t.querySelector(":scope > .ui.list"),this.elComboValue=t.querySelector(":scope > .combo-value")}collectCheckedValues(){return Array.from(this.elDropdown.querySelectorAll(".menu > .item.checked"),t=>t.getAttribute("data-value"))}updateUiList(t){const i=this.elList.querySelector(".item.empty-list");(0,C.xP)(this.elList,".item:not(.empty-list)",s=>s.remove());for(const s of t){const l=this.elDropdown.querySelector(`.menu > .item[data-value="${CSS.escape(s)}"]`);if(!l)continue;const u=l.cloneNode(!0);(0,C.jB)(u,".item-check-mark, .item-secondary-info",m=>m.remove()),this.elList.append(u)}const n=!!this.elList.querySelector(".item:not(.empty-list)");(0,C.oi)(i,!n)}async updateToBackend(t){if(this.updateAlgo==="diff"){for(const i of this.initialValues)t.includes(i)||await(0,Ae.LO)(this.updateUrl,{data:new URLSearchParams({action:"detach",id:i})});for(const i of t)this.initialValues.includes(i)||await(0,Ae.LO)(this.updateUrl,{data:new URLSearchParams({action:"attach",id:i})})}else await(0,Ae.LO)(this.updateUrl,{data:new URLSearchParams({id:t.join(",")})});w0()}async doUpdate(){const t=this.collectCheckedValues();this.initialValues.join(",")!==t.join(",")&&(this.updateUiList(t),this.updateUrl&&await this.updateToBackend(t),this.initialValues=t)}async onChange(){this.selectionMode==="single"&&(await this.doUpdate(),(0,ke.mD)(this.elDropdown).dropdown("hide"))}async onItemClick(t,i){if(i.preventDefault(),t.hasAttribute("data-can-change")&&t.getAttribute("data-can-change")!=="true")return;if(t.matches(".clear-selection")){(0,C.jB)(this.elDropdown,".menu > .item",s=>s.classList.remove("checked")),this.elComboValue.value="",this.onChange();return}const n=t.getAttribute("data-scope");n?this.elDropdown.querySelector(`.menu > .item.checked[data-scope="${CSS.escape(n)}"]`)===t?t.classList.toggle("checked"):((0,C.jB)(this.elDropdown,`.menu > .item[data-scope="${CSS.escape(n)}"]`,l=>l.classList.remove("checked")),t.classList.toggle("checked",!0)):this.selectionMode==="multiple"?t.classList.toggle("checked"):((0,C.jB)(this.elDropdown,".menu > .item.checked",s=>s.classList.remove("checked")),t.classList.toggle("checked",!0)),this.elComboValue.value=this.collectCheckedValues().join(","),this.onChange()}async onHide(){this.selectionMode==="multiple"&&this.doUpdate()}init(){if(this.elComboValue.value&&this.elComboValue.value!=="0"&&!(0,C.jB)(this.elDropdown,".menu > .item.checked").length){const t=this.elComboValue.value.split(",");for(const i of t)this.elDropdown.querySelector(`.menu > .item[data-value="${CSS.escape(i)}"]`)?.classList.add("checked");this.updateUiList(t)}this.initialValues=this.collectCheckedValues(),(0,C.ny)(this.elDropdown,"click",".item",(t,i)=>this.onItemClick(t,i)),(0,ke.mD)(this.elDropdown).dropdown("setting",{action:"nothing",fullTextSearch:"exact",hideDividers:"empty",onHide:()=>this.onHide()})}}function x0(){const e=document.querySelector(".ui.dropdown.select-branch.branch-selector-dropdown");if(!e)return;const t=e.getAttribute("data-url-update-issueref"),i=e.querySelector(".reference-list-menu");(0,C.jB)(i,".item:not(.no-select)",n=>n.addEventListener("click",async function(s){s.preventDefault();const l=this.getAttribute("data-id"),u=this.getAttribute("data-name");if(t)try{await(0,Ae.LO)(t,{data:new URLSearchParams({ref:l})}),window.location.reload()}catch(m){console.error(m)}else{const m=this.getAttribute("data-id-selector");document.querySelector(m).value=l,e.querySelector(".text-branch-name").textContent=u}}))}function j0(){const e=document.querySelector(".issue-due-form");if(!e)return;const t=e.querySelector("input[name=deadline]");document.querySelector(".issue-due-edit")?.addEventListener("click",()=>{(0,C.oi)(e)}),document.querySelector(".issue-due-remove")?.addEventListener("click",()=>{t.value="",e.dispatchEvent(new Event("submit",{cancelable:!0,bubbles:!0}))})}function E0(){x0(),j0(),(0,C.jB)(document,".issue-sidebar-combo",e=>new S0(e).init())}const{appSubUrl:Gu}=window.config;function A0(){const e=document.querySelector("#new-dependency-drop-list");if(!e)return;const t=(0,St.yG)(),i=e.getAttribute("data-issue-cross-repo-search");let n=`${t.repoLink}/issues/search?q={query}&type=${t.issueDependencySearchType}`;i==="true"&&(n=`${Gu}/issues/search?q={query}&priority_repo_id=${t.repoId}&type=${t.issueDependencySearchType}`),(0,ke.mD)(e).dropdown({fullTextSearch:!0,apiSettings:{cache:!1,rawResponse:!0,url:n,onResponse(s){const l={success:!0,results:[]},u=e.getAttribute("data-issue-id");for(const m of s)String(m.id)!==u&&l.results.push({value:m.id,name:`<div class="gt-ellipsis">#${m.number} ${R(m.title)}</div>
DesignScreenshot/output/git.buildapp.eu.org_run/git.buildapp.eu.org_3_credentials_filled.html:329:_Originally posted by @${u} in ${m}_`,(0,ke.mD)(A).modal("show")})}function q0(){(0,C.jB)(document,".title_wip_desc > a",e=>e.addEventListener("click",t=>{t.preventDefault();const i=JSON.parse(e.closest(".title_wip_desc").getAttribute("data-wip-prefixes")),n=document.querySelector("#issue_title"),s=n.value;for(const l of i)if(s.startsWith(l.toUpperCase()))return;n.value=`${i[0]} ${s}`}))}function P0(){(0,C.jB)(document,".toggle-wip",e=>e.addEventListener("click",async t=>{t.preventDefault();const i=e,n=i.getAttribute("data-title"),s=i.getAttribute("data-wip-prefix"),l=i.getAttribute("data-update-url");try{const u=new URLSearchParams;if(u.append("title",n?.startsWith(s)?n.slice(s.length).trim():`${s.trim()} ${n}`),!(await(0,Ae.LO)(l,{data:u})).ok)throw new Error("Failed to toggle WIP status");window.location.reload()}catch(u){console.error(u)}}))}function F0(){const e=document.querySelector("#issue-title-display"),t=document.querySelector("#issue-title-editor");if(!t)return;const i=t.querySelector("input"),n=i.getAttribute("data-old-title");e.querySelector("#issue-title-edit-show").addEventListener("click",()=>{(0,C.y9)(e),(0,C.y9)("#pull-desc-display"),(0,C.fi)(t),(0,C.fi)("#pull-desc-editor"),i.value.trim()||(i.value=n),i.focus()}),t.querySelector(".ui.cancel.button").addEventListener("click",()=>{(0,C.y9)(t),(0,C.y9)("#pull-desc-editor"),(0,C.fi)(e),(0,C.fi)("#pull-desc-display")});const l=document.querySelector("#pull-desc-editor")?.getAttribute("data-target-update-url"),u=t.querySelector(".ui.primary.button");t.addEventListener("submit",async m=>{m.preventDefault();const y=i.value.trim();try{if(y&&y!==n){const A=await(0,Ae.LO)(u.getAttribute("data-update-url"),{data:new URLSearchParams({title:y})});if(!A.ok)throw new Error(`Failed to update issue title: ${A.statusText}`)}if(l){const A=document.querySelector("#pull-target-branch").getAttribute("data-branch"),L=document.querySelector("#branch_target").textContent;if(A!==L){const z=await(0,Ae.LO)(l,{data:new URLSearchParams({target_branch:A})});if(!z.ok)throw new Error(`Failed to update PR target branch: ${z.statusText}`)}}Ku(t),window.location.reload()}catch(A){console.error(A),gt(A.message)}})}function I0(){document.querySelector("#branch-select")?.addEventListener("click",e=>{const t=e.target.closest(".item[data-branch]");if(!t)return;const i=document.querySelector("#pull-target-branch"),n=i.getAttribute("data-basename"),s=t.getAttribute("data-branch"),l=i.getAttribute("data-branch");i.textContent=i.textContent.replace(`${n}:${l}`,`${n}:${s}`),i.setAttribute("data-branch",s)})}async function N0(e){const t=await ma(e.querySelector(".combo-markdown-editor")),i=document.querySelector("#status-button"),n=document.querySelector("#comment-button"),s=()=>{const l=t.value().trim(),u=t.isUploading();i&&(i.textContent=i.getAttribute(l?"data-status-and-comment":"data-status"),i.disabled=u),n&&(n.disabled=!l||u)};t.container.addEventListener(ha.EventUploadStateChanged,s),t.container.addEventListener(ha.EventEditorContentChanged,s),s()}function H0(e){const t=e.querySelectorAll(".combo-editor-dropzone"),i=async n=>{const s=n.querySelector(".form-field-real"),l=n.querySelector(".form-field-dropzone"),u=n.querySelector(".combo-markdown-editor"),m=await ma(u);m.container.addEventListener(ha.EventEditorContentChanged,()=>s.value=m.value()),s.addEventListener("focus",async()=>{(0,C.fi)(e.querySelectorAll(".combo-editor-dropzone .form-field-real")),(0,C.y9)(e.querySelectorAll(".combo-editor-dropzone .combo-markdown-editor")),(0,C.jB)(e,".combo-editor-dropzone .form-field-dropzone",y=>{const L=y.querySelector(".dropzone").dropzone.files.length!==0;(0,C.oi)(y,L)}),(0,C.y9)(s),(0,C.fi)(u),(0,C.fi)(l),await m.switchToUserPreference(),m.focus()})};for(const n of t)i(n)}function B0(){const e=document.querySelector(".comment.form");e&&(e.querySelector(".field.combo-editor-dropzone")?H0(e):e.querySelector(".combo-markdown-editor")&&N0(e),E0())}function $0(){_c("click","onRepoEllipsisButtonClick",async(e,t)=>{t.preventDefault();const i=e.getAttribute("aria-expanded")==="true";(0,C.oi)(e.parentElement.querySelector(".commit-body")),e.setAttribute("aria-expanded",String(!i))})}function U0(){Ha("initCommitStatuses",e=>{const t=e.nextElementSibling;if(!t.matches(".tippy-target"))throw new Error("Expected next element to be a tippy target");Ie(e,{content:t,placement:"bottom-start",interactive:!0,role:"dialog",theme:"box-with-header"})})}const{appSubUrl:ph}=window.config;function V0(){const e=document.querySelector("#manage_topic");if(!e)return;const t=document.querySelector("#topic_edit"),i=document.querySelector("#repo-topics"),n=t.querySelector(".ui.dropdown");let s;e.addEventListener("click",()=>{(0,C.y9)([i,e]),(0,C.fi)(t),n.querySelector("input.search").focus()}),document.querySelector("#cancel_topic_edit").addEventListener("click",()=>{s?.hideToast(),(0,C.y9)(t),(0,C.fi)([i,e]),e.focus()}),document.querySelector("#save_topic").addEventListener("click",async l=>{s?.hideToast();const u=t.querySelector("input[name=topics]").value,m=new FormData;m.append("topics",u);const y=await(0,Ae.LO)(l.target.getAttribute("data-link"),{data:m});if(y.ok){if((await y.json()).status==="ok"){if((0,C.xP)(i,".repo-topic",L=>L.remove()),u.length){const L=u.split(",");L.sort();for(const z of L){const X=document.createElement("a");X.classList.add("repo-topic","ui","large","label","gt-ellipsis"),X.href=`${ph}/explore/repos?q=${encodeURIComponent(z)}&topic=1`,X.textContent=z,i.append(X)}}(0,C.y9)(t),(0,C.fi)([i,e])}}else if(y.status===422){const A=await y.json();if(s=gt(A.message,{duration:5e3}),A.invalidTopics&&A.invalidTopics.length>0){const{invalidTopics:L}=A,z=(0,C.xP)(n,"a.ui.label");for(const[X,_e]of u.split(",").entries())L.includes(_e)&&(z[X].classList.remove("green"),z[X].classList.add("red"))}}}),(0,ke.mD)(n).dropdown({allowAdditions:!0,forceSelection:!1,fullTextSearch:"exact",fields:{name:"description",value:"data-value"},saveRemoteData:!1,label:{transition:"horizontal flip",duration:200,variation:!1},apiSettings:{url:`${ph}/explore/topics/search?q={query}`,throttle:500,cache:!1,onResponse(l){const u={success:!1,results:[]},m=(0,St.Kq)(this.urlData.query.trim());let y=!1;const A=[];for(const L of(0,C.xP)(n,"a.ui.label.visible"))A.push(L.getAttribute("data-value"));if(l.topics){let L=!1;for(const{topic_name:z}of l.topics)A.includes(z)||(z.toLowerCase()===m.toLowerCase()&&(y=!0),u.results.push({description:z,"data-value":z}),L=!0);u.success=L}return m.length>0&&!y?(u.success=!0,u.results.unshift({description:m,"data-value":m})):m.length>0&&y&&u.results.sort((L,z)=>L.description.toLowerCase()===m.toLowerCase()?-1:z.description.toLowerCase()===m.toLowerCase()?1:L.description>z.description?-1:L.description<z.description?1:0),u}},onLabelCreate(l){return l=l.toLowerCase().trim(),this.attr("data-value",l).contents().first().replaceWith(l),(0,ke.mD)(this)},onAdd(l,u,m){l=l.toLowerCase().trim(),m[0].setAttribute("data-value",l),m[0].setAttribute("data-text",l)}})}const{appSubUrl:W0}=window.config;function Qu(){Number(document.querySelector("#security_protocol")?.value)>0?(0,C.fi)(".has-tls"):(0,C.y9)(".has-tls")}function z0(){document.querySelector(".page-content.admin")&&(hf(),K0(),X0(),G0())}function K0(){document.querySelector(".page-content.admin.edit.user, .page-content.admin.new.user")&&document.querySelector("#login_type")?.addEventListener("change",function(){this.value?.startsWith("0")?(document.querySelector("#user_name")?.removeAttribute("disabled"),document.querySelector("#login_name")?.removeAttribute("required"),(0,C.y9)(".non-local"),(0,C.fi)(".local"),document.querySelector("#user_name")?.focus(),this.getAttribute("data-password")==="required"&&document.querySelector("#password")?.setAttribute("required","required")):(document.querySelector(".admin.edit.user")&&document.querySelector("#user_name")?.setAttribute("disabled","disabled"),document.querySelector("#login_name")?.setAttribute("required","required"),(0,C.fi)(".non-local"),(0,C.y9)(".local"),document.querySelector("#login_name")?.focus(),document.querySelector("#password")?.removeAttribute("required"))})}function X0(){const e=document.querySelector(".page-content.admin.authentication");if(!e)return;const t=e.classList.contains("new"),i=e.classList.contains("edit");if(!t&&!i)return;function n(){const L=document.querySelectorAll(".search-page-size");if(document.querySelector("#use_paged_search").checked){(0,C.fi)(".search-page-size");for(const z of L)z.querySelector("input")?.setAttribute("required","required")}else{(0,C.y9)(".search-page-size");for(const z of L)z.querySelector("input")?.removeAttribute("required")}}function s(L){(0,C.y9)(".open_id_connect_auto_discovery_url, .oauth2_use_custom_url");for(const X of document.querySelectorAll(".open_id_connect_auto_discovery_url input[required]"))X.removeAttribute("required");const z=document.querySelector("#oauth2_provider").value;switch(z){case"openidConnect":document.querySelector(".open_id_connect_auto_discovery_url input").setAttribute("required","required"),(0,C.fi)(".open_id_connect_auto_discovery_url");break;default:{const X=document.querySelector(`#${z}_customURLSettings`);if(!X)break;const _e=X.getAttribute("data-available")==="true",pe=X.getAttribute("data-required")==="true";_e&&(0,C.fi)(".oauth2_use_custom_url"),pe&&(document.querySelector("#oauth2_use_custom_url").checked=!0);break}}l(L)}function l(L){const z=document.querySelector("#oauth2_provider").value;(0,C.y9)(".oauth2_use_custom_url_field");for(const _e of document.querySelectorAll(".oauth2_use_custom_url_field input[required]"))_e.removeAttribute("required");if(document.querySelector(`#${z}_customURLSettings`)&&document.querySelector("#oauth2_use_custom_url").checked)for(const _e of["token_url","auth_url","profile_url","email_url","tenant"]){L&&(document.querySelector(`#oauth2_${_e}`).value=document.querySelector(`#${z}_${_e}`).value);const pe=document.querySelector(`#${z}_${_e}`);if(pe&&pe.getAttribute("data-available")==="true"){for(const de of document.querySelectorAll(`.oauth2_${_e} input`))de.setAttribute("required","required");(0,C.fi)(`.oauth2_${_e}`)}}}function u(){const L=document.querySelector(".js-ldap-group-toggle")?.checked;(0,C.oi)(document.querySelector("#ldap-group-options"),L)}const m=document.querySelector("#auth_type");if(t){const L=function(){(0,C.y9)(".ldap, .dldap, .smtp, .pam, .oauth2, .has-tls, .search-page-size, .sspi");for(const X of document.querySelectorAll(".ldap input[required], .binddnrequired input[required], .dldap input[required], .smtp input[required], .pam input[required], .oauth2 input[required], .has-tls input[required], .sspi input[required]"))X.removeAttribute("required");document.querySelector(".binddnrequired")?.classList.remove("required");const z=m.value;switch(z){case"2":(0,C.fi)(".ldap");for(const X of document.querySelectorAll(".binddnrequired input, .ldap div.required:not(.dldap) input"))X.setAttribute("required","required");document.querySelector(".binddnrequired")?.classList.add("required");break;case"3":(0,C.fi)(".smtp"),(0,C.fi)(".has-tls");for(const X of document.querySelectorAll(".smtp div.required input, .has-tls"))X.setAttribute("required","required");break;case"4":(0,C.fi)(".pam");for(const X of document.querySelectorAll(".pam input"))X.setAttribute("required","required");break;case"5":(0,C.fi)(".dldap");for(const X of document.querySelectorAll(".dldap div.required:not(.ldap) input"))X.setAttribute("required","required");break;case"6":(0,C.fi)(".oauth2");for(const X of document.querySelectorAll(".oauth2 div.required:not(.oauth2_use_custom_url,.oauth2_use_custom_url_field,.open_id_connect_auto_discovery_url) input"))X.setAttribute("required","required");s(!0);break;case"7":(0,C.fi)(".sspi");for(const X of document.querySelectorAll(".sspi div.required input"))X.setAttribute("required","required");break}(z==="2"||z==="5")&&(Qu(),u()),z==="2"&&n()};m.addEventListener("change",L),L(),document.querySelector("#security_protocol")?.addEventListener("change",Qu),document.querySelector("#use_paged_search")?.addEventListener("change",n),document.querySelector("#oauth2_provider")?.addEventListener("change",()=>s(!0)),document.querySelector("#oauth2_use_custom_url")?.addEventListener("change",()=>l(!0)),document.querySelector(".js-ldap-group-toggle").addEventListener("change",u)}if(i){const L=m.value;L==="2"||L==="5"?(document.querySelector("#security_protocol")?.addEventListener("change",Qu),document.querySelector(".js-ldap-group-toggle").addEventListener("change",u),u(),L==="2"&&document.querySelector("#use_paged_search")?.addEventListener("change",n)):L==="6"&&(document.querySelector("#oauth2_provider")?.addEventListener("change",()=>s(!0)),document.querySelector("#oauth2_use_custom_url")?.addEventListener("change",()=>l(!1)),s(!1))}const y=document.querySelector("#auth_name"),A=function(){document.querySelector("#oauth2-callback-url").textContent=`${window.location.origin}${W0}/user/oauth2/${encodeURIComponent(y.value)}/callback`};y.addEventListener("input",A),A()}function G0(){const e=document.querySelector(".page-content.admin.notice");if(!e)return;const t=document.querySelector("#detail-modal");(0,C.jB)(e,".view-detail",n=>n.addEventListener("click",s=>{s.preventDefault();const l=n.closest("tr").querySelector(".notice-description"),u=t.querySelector(".content pre");u.textContent=l.textContent,(0,ke.mD)(t).modal("show")}));const i=document.querySelectorAll(".select.table .ui.checkbox input");(0,C.jB)(e,".select.action",n=>n.addEventListener("click",()=>{switch(n.getAttribute("data-action")){case"select-all":for(const s of i)s.checked=!0;break;case"deselect-all":for(const s of i)s.checked=!1;break;case"inverse":for(const s of i)s.checked=!s.checked;break}})),document.querySelector("#delete-selection")?.addEventListener("click",async function(n){n.preventDefault(),this.classList.add("is-loading","disabled");const s=new FormData;for(const l of i)l.checked&&s.append("ids[]",l.closest(".ui.checkbox").getAttribute("data-id"));await(0,Ae.LO)(this.getAttribute("data-link"),{data:s}),window.location.href=this.getAttribute("data-redirect")})}function Q0(e){window.history.pushState?window.history.pushState(null,null,e):window.location.hash=e}function Yu(e){for(const pe of document.querySelectorAll(".code-view tr.active"))pe.classList.remove("active");const t=document.querySelectorAll(".code-view td.lines-num span[data-line-number]"),i=document.querySelector("a.ref-in-new-issue"),n=document.querySelector("a.copy-line-permalink"),s=document.querySelector("a.view_git_blame"),l=function(pe){if(!i)return;const de=i.getAttribute("data-url-issue-new"),Pe=i.getAttribute("data-url-param-body-link"),Le=`${(0,St.oK)(Pe)}#${pe}`;i.setAttribute("href",`${de}?body=${encodeURIComponent(Le)}`)},u=function(pe){if(!s)return;let de=s.getAttribute("href");de=`${de.replace(/#L\d+$|#L\d+-L\d+$/,"")}`,pe.length!==0&&(de=`${de}#${pe}`),s.setAttribute("href",de)},m=function(pe){if(!n)return;let de=n.getAttribute("data-url");de=`${de.replace(/#L\d+$|#L\d+-L\d+$/,"")}#${pe}`,n.setAttribute("data-clipboard-text",de),n.setAttribute("data-clipboard-text-type","url")},y=e?e.split("-"):[],A=y[0]??"";if(!A)return null;const L=y[1]||A;let z=parseInt(A.substring(1)),X=parseInt(L.substring(1));if(z>X){const pe=z;z=X,X=pe,e=`${L}-${A}`}const _e=t[z-1]??null;for(let pe=z-1;pe<=X-1&&pe<t.length;pe++)t[pe].closest("tr").classList.add("active");return Q0(`#${e}`),l(e),u(e),m(e),_e}function gh(){const e=document.querySelector(".code-line-menu");if(!e)return;for(const s of document.querySelectorAll(".code-line-button"))s.remove();const t=document.querySelector(".code-view tr.active");if(!t)return;const i=t.querySelector("td.lines-num"),n=document.createElement("button");n.classList.add("code-line-button","ui","basic","button"),n.innerHTML=(0,Z.JW)("octicon-kebab-horizontal"),i.prepend(n),n.closest(".code-view").append(e.cloneNode(!0)),Ie(n,{theme:"menu",trigger:"click",hideOnClick:!0,content:e,placement:"right-start",interactive:!0,onShow:s=>{s.popper.addEventListener("click",()=>{s.hide()},{once:!0})}})}function Y0(){if(!document.querySelector(".repo-view-container .file-view"))return;let e;(0,C.ny)(document,"click",".code-view .lines-num span",(i,n)=>{if(!e||!n.shiftKey)e=i.getAttribute("id"),Yu(e);else{const s=i.getAttribute("id");Yu(`${e}-${s}`)}window.getSelection().removeAllRanges(),gh()});const t=()=>{if(!window.location.hash||!document.querySelector(".code-view .lines-num"))return;const i=window.location.hash.substring(1),n=Yu(i);n&&(window.history.scrollRestoration!=="manual"&&(window.history.scrollRestoration="manual"),n.scrollIntoView({block:"start"}),gh())};t(),window.addEventListener("hashchange",t)}function J0(){document.querySelector("#ssh-key-content")?.addEventListener("input",function(){const e=this.value.split(" "),t=document.querySelector("#ssh-key-title");!t.value&&e.length===3&&e[2]!==""&&(t.value=e[2])})}function Z0(){if(!document.querySelector(".user.settings.profile"))return;const e=document.querySelector("#username");e&&e.addEventListener("input",function(){const t=document.querySelector("#name-change-prompt"),i=document.querySelector("#name-change-redirect-prompt");this.value.toLowerCase()!==this.getAttribute("data-name").toLowerCase()?((0,C.fi)(t),(0,C.fi)(i)):((0,C.y9)(t),(0,C.y9)(i))})}function ev(){const e=document.querySelector("#repo_migrating");if(!e)return;document.querySelector("#repo_migrating_retry")?.addEventListener("click",tv);const t=e.getAttribute("data-migrating-repo-link"),i=async()=>{const s=await(0,Ae.fG)(`${t}/-/migrate/status`);if(s.status!==200)return!0;const l=await s.json();return l.message&&(document.querySelector("#repo_migrating_progress_message").textContent=l.message),l.status===4?(window.location.reload(),!1):l.status===3?((0,C.y9)("#repo_migrating_progress"),(0,C.y9)("#repo_migrating"),(0,C.fi)("#repo_migrating_retry"),(0,C.fi)("#repo_migrating_failed"),(0,C.fi)("#repo_migrating_failed_image"),document.querySelector("#repo_migrating_failed_error").textContent=l.message,!1):!0},n=async()=>{let s=!0;try{s=await i()}finally{s&&setTimeout(n,2e3)}};n()}async function tv(e){await(0,Ae.LO)(e.target.getAttribute("data-migrating-task-retry-url")),window.location.reload()}const{pageData:Ju}=window.config;let Zu;function ed(){return Zu||(Zu=nv(Ju.DiffFileTree,Ju.FolderIcon,Ju.FolderOpenIcon)),Zu}function iv(e,t,i){const n=e.fullNameMap[t];if(n){n.IsViewed=i;for(let s=n.ParentEntry;s;s=s.ParentEntry)s.IsViewed=bh(s)}}function vh(e,t){if(e[t.FullName]=t,!!t.Children){t.IsViewed=bh(t);for(const i of t.Children)i.ParentEntry=t,vh(e,i)}}function nv(e,t,i){const n=(0,Re.Kh)({diffFileTree:e,folderIcon:t,folderOpenIcon:i,fileTreeIsVisible:!1,selectedItem:"",fullNameMap:{}});return vh(n.fullNameMap,e.TreeRoot),n}function bh(e){if(e.Children){let t=0;for(const i of e.Children)i.IsViewed&&t++;return t===e.Children.length}return e.IsViewed}const sv=["title"],rv=["innerHTML"],ov={class:"gt-ellipsis"},av={class:"sub-items"},lv=["title","href"],cv=["innerHTML"],uv={class:"gt-ellipsis tw-flex-1"};var dv=(0,c.pM)({__name:"DiffFileTreeItem",props:{item:{}},setup(e){const t=e,i=ed(),n=(0,Re.KR)(t.item.IsViewed);function s(l){const u={"":{name:"octicon-blocked",classes:["text","red"]},added:{name:"octicon-diff-added",classes:["text","green"]},modified:{name:"octicon-diff-modified",classes:["text","yellow"]},deleted:{name:"octicon-diff-removed",classes:["text","red"]},renamed:{name:"octicon-diff-renamed",classes:["text","teal"]},copied:{name:"octicon-diff-renamed",classes:["text","green"]},typechange:{name:"octicon-diff-modified",classes:["text","green"]}};return u[l]??u[""]}return(l,u)=>{const m=(0,c.g2)("DiffFileTreeItem",!0);return l.item.EntryMode==="tree"?((0,c.uX)(),(0,c.CE)(c.FK,{key:0},[(0,c.Lk)("div",{class:(0,W.C4)(["item-directory",{viewed:l.item.IsViewed}]),title:l.item.DisplayName,onClick:u[0]||(u[0]=Di(y=>n.value=!n.value,["stop"]))},[(0,c.Q3)(" directory "),(0,c.bF)((0,Re.R1)(Z.Ah),{name:n.value?"octicon-chevron-right":"octicon-chevron-down"},null,8,["name"]),(0,c.Q3)(" eslint-disable-next-line vue/no-v-html "),(0,c.Lk)("span",{class:"tw-contents",innerHTML:n.value?(0,Re.R1)(i).folderIcon:(0,Re.R1)(i).folderOpenIcon},null,8,rv),(0,c.Lk)("span",ov,(0,W.v_)(l.item.DisplayName),1)],10,sv),(0,c.bo)((0,c.Lk)("div",av,[((0,c.uX)(!0),(0,c.CE)(c.FK,null,(0,c.pI)(l.item.Children,y=>((0,c.uX)(),(0,c.Wv)(m,{key:y.DisplayName,item:y},null,8,["item"]))),128))],512),[[ti,!n.value]])],64)):((0,c.uX)(),(0,c.CE)("a",{key:1,class:(0,W.C4)(["item-file",{selected:(0,Re.R1)(i).selectedItem==="#diff-"+l.item.NameHash,viewed:l.item.IsViewed}]),title:l.item.DisplayName,href:"#diff-"+l.item.NameHash},[(0,c.Q3)(" file "),(0,c.Q3)(" eslint-disable-next-line vue/no-v-html "),(0,c.Lk)("span",{class:"tw-contents",innerHTML:l.item.FileIcon},null,8,cv),(0,c.Lk)("span",uv,(0,W.v_)(l.item.DisplayName),1),(0,c.bF)((0,Re.R1)(Z.Ah),{name:s(l.item.DiffStatus).name,class:(0,W.C4)(s(l.item.DiffStatus).classes)},null,8,["name","class"])],10,lv))}}}),fv=(0,Xi.A)(dv,[["__scopeId","data-v-a138c97c"]]);const hv={key:0,class:"diff-file-tree-items"},_h="diff_file_tree_visible";var mv=(0,c.pM)({__name:"DiffFileTree",setup(e){const t=ed();(0,c.sV)(()=>{t.fileTreeIsVisible=localStorage.getItem(_h)!=="false",document.querySelector(".diff-toggle-file-tree-button").addEventListener("click",s),i(),window.addEventListener("hashchange",i)}),(0,c.hi)(()=>{document.querySelector(".diff-toggle-file-tree-button").removeEventListener("click",s),window.removeEventListener("hashchange",i)});function i(){t.selectedItem=window.location.hash,n()}function n(){if(t.selectedItem){const m=document.querySelector(t.selectedItem);m?.getAttribute("data-folded")==="true"&&Ba(m,m.querySelector(".fold-file"),!1)}}function s(){l(!t.fileTreeIsVisible)}function l(m){t.fileTreeIsVisible=m,localStorage.setItem(_h,t.fileTreeIsVisible.toString()),u(t.fileTreeIsVisible)}function u(m){const y=document.querySelector(".diff-toggle-file-tree-button"),[A,L]=y.querySelectorAll(".icon"),z=document.querySelector("#diff-file-tree"),X=y.getAttribute(m?"data-hide-text":"data-show-text");y.setAttribute("data-tooltip-content",X),(0,C.oi)(z,m),(0,C.oi)(A,!m),(0,C.oi)(L,m)}return(m,y)=>(0,Re.R1)(t).fileTreeIsVisible?((0,c.uX)(),(0,c.CE)("div",hv,[(0,c.Q3)(" only render the tree if we're visible. in many cases this is something that doesn't change very often "),((0,c.uX)(!0),(0,c.CE)(c.FK,null,(0,c.pI)((0,Re.R1)(t).diffFileTree.TreeRoot.Children,A=>((0,c.uX)(),(0,c.Wv)(fv,{key:A.FullName,item:A},null,8,["item"]))),128))])):(0,c.Q3)("v-if",!0)}}),pv=(0,Xi.A)(mv,[["__scopeId","data-v-12a35ef6"]]);function gv(){const e=document.querySelector("#diff-file-tree");if(!e)return;Ai(pv).mount(e)}const vv={class:"ui scrolling dropdown custom diff-commit-selector"},bv=["data-tooltip-content","aria-label","aria-controls","aria-activedescendant"],_v=["id","aria-expanded"],yv={key:0,class:"loading-indicator is-loading"},wv=["id"],Sv={class:"gt-ellipsis"},xv={class:"gt-ellipsis text light-2 tw-mb-0"},jv={class:"gt-ellipsis"},Ev={class:"gt-ellipsis text light-2"},Av={key:3,class:"info text light-2"},Cv=["data-commit-idx","onKeydown","onMouseover","onClick"],kv={class:"tw-flex-1 tw-flex tw-flex-col tw-gap-1"},Tv={class:"gt-ellipsis commit-list-summary"},Lv={class:"gt-ellipsis text light-2"},Rv={class:"text right"},Mv=["datetime"],Dv={class:"tw-font-mono"};function Ov(e,t,i,n,s,l){const u=(0,c.g2)("svg-icon");return(0,c.uX)(),(0,c.CE)("div",vv,[(0,c.Lk)("button",{ref:"expandBtn",class:"ui tiny basic button",onClick:t[0]||(t[0]=Di(m=>e.toggleMenu(),["stop"])),"data-tooltip-content":e.locale.filter_changes_by_commit,"aria-haspopup":"true","aria-label":e.locale.filter_changes_by_commit,"aria-controls":e.uniqueIdMenu,"aria-activedescendant":e.uniqueIdShowAll},[(0,c.bF)(u,{name:"octicon-git-commit"})],8,bv),(0,c.Q3)(' this dropdown is not managed by Fomantic UI, so it needs some classes like "transition" explicitly '),(0,c.bo)((0,c.Lk)("div",{class:(0,W.C4)(["left menu transition",{visible:e.menuVisible}]),id:e.uniqueIdMenu,"aria-expanded":e.menuVisible?"true":"false"},[e.isLoading?((0,c.uX)(),(0,c.CE)("div",yv)):(0,c.Q3)("v-if",!0),e.isLoading?(0,c.Q3)("v-if",!0):((0,c.uX)(),(0,c.CE)("div",{key:1,class:"item",id:e.uniqueIdShowAll,ref:"showAllChanges",role:"menuitem",onKeydown:t[1]||(t[1]=se(m=>e.showAllChanges(),["enter"])),onClick:t[2]||(t[2]=m=>e.showAllChanges())},[(0,c.Lk)("div",Sv,(0,W.v_)(e.locale.show_all_commits),1),(0,c.Lk)("div",xv,(0,W.v_)(e.locale.stats_num_commits),1)],40,wv)),(0,c.Q3)(" only show the show changes since last review if there is a review AND we are commits ahead of the last review "),e.lastReviewCommitSha!=null?((0,c.uX)(),(0,c.CE)("div",{key:2,class:(0,W.C4)(["item",{disabled:!e.commitsSinceLastReview}]),role:"menuitem",onKeydown:t[3]||(t[3]=se(m=>e.changesSinceLastReviewClick(),["enter"])),onClick:t[4]||(t[4]=m=>e.changesSinceLastReviewClick())},[(0,c.Lk)("div",jv,(0,W.v_)(e.locale.show_changes_since_your_last_review),1),(0,c.Lk)("div",Ev,(0,W.v_)(e.commitsSinceLastReview)+" commits ",1)],34)):(0,c.Q3)("v-if",!0),e.isLoading?(0,c.Q3)("v-if",!0):((0,c.uX)(),(0,c.CE)("span",Av,(0,W.v_)(e.locale.select_commit_hold_shift_for_range),1)),((0,c.uX)(!0),(0,c.CE)(c.FK,null,(0,c.pI)(e.commits,(m,y)=>((0,c.uX)(),(0,c.CE)("div",{key:m.id,class:(0,W.C4)(["item",{selected:m.selected,hovered:m.hovered}]),role:"menuitem","data-commit-idx":y,onKeydown:[se(Di(A=>e.commitClicked(m.id),["exact"]),["enter"]),se(Di(A=>e.commitClickedShift(m),["shift","exact"]),["enter"])],onMouseover:Di(A=>e.highlight(m),["shift"]),onClick:[Di(A=>e.commitClicked(m.id),["exact"]),Di(A=>e.commitClicked(m.id,!0),["ctrl","exact"]),Di(A=>e.commitClicked(m.id,!0),["meta","exact"]),Di(A=>e.commitClickedShift(m),["shift","exact","stop","prevent"])]},[(0,c.Lk)("div",kv,[(0,c.Lk)("div",Tv,(0,W.v_)(m.summary),1),(0,c.Lk)("div",Lv,[(0,c.eW)((0,W.v_)(m.committer_or_author_name)+" ",1),(0,c.Lk)("span",Rv,[(0,c.Q3)(" TODO: make this respect the PreferredTimestampTense setting "),(0,c.Lk)("relative-time",{prefix:"",datetime:m.time,"data-tooltip-content":"","data-tooltip-interactive":"true"},(0,W.v_)(m.time),9,Mv)])])]),(0,c.Lk)("div",Dv,(0,W.v_)(m.short_sha),1)],42,Cv))),128))],10,_v),[[ti,e.menuVisible]])])}var qv=(0,c.pM)({components:{SvgIcon:Z.Ah},data:()=>{const e=document.querySelector("#diff-commit-select");return{menuVisible:!1,isLoading:!1,queryParams:e.getAttribute("data-queryparams"),issueLink:e.getAttribute("data-issuelink"),locale:{filter_changes_by_commit:e.getAttribute("data-filter_changes_by_commit")},mergeBase:e.getAttribute("data-merge-base"),commits:[],hoverActivated:!1,lastReviewCommitSha:"",uniqueIdMenu:(0,ke.Ae)(),uniqueIdShowAll:(0,ke.Ae)()}},computed:{commitsSinceLastReview(){return this.lastReviewCommitSha?this.commits.length-this.commits.findIndex(e=>e.id===this.lastReviewCommitSha)-1:0}},mounted(){document.body.addEventListener("click",this.onBodyClick),this.$el.addEventListener("keydown",this.onKeyDown),this.$el.addEventListener("keyup",this.onKeyUp)},unmounted(){document.body.removeEventListener("click",this.onBodyClick),this.$el.removeEventListener("keydown",this.onKeyDown),this.$el.removeEventListener("keyup",this.onKeyUp)},methods:{onBodyClick(e){this.$el.contains(e.target)||this.menuVisible&&this.toggleMenu()},onKeyDown(e){if(!this.menuVisible)return;const t=document.activeElement;if(this.$el.contains(t)){switch(e.key){case"ArrowDown":e.preventDefault(),this.focusElem(t.nextElementSibling,t);break;case"ArrowUp":e.preventDefault(),this.focusElem(t.previousElementSibling,t);break;case"Escape":e.preventDefault(),t.tabIndex=-1,this.toggleMenu();break}if(e.key==="ArrowDown"||e.key==="ArrowUp"){const i=document.activeElement,n=i?.matches(".item")?i.getAttribute("data-commit-idx"):null;n&&this.highlight(this.commits[Number(n)])}}},onKeyUp(e){if(!this.menuVisible)return;const t=document.activeElement;if(this.$el.contains(t)&&e.key==="Shift"&&this.hoverActivated){this.hoverActivated=!1;for(const i of this.commits)i.hovered=!1,i.selected=!1}},highlight(e){if(!this.hoverActivated)return;const t=this.commits.findIndex(n=>n.selected),i=this.commits.findIndex(n=>n.id===e.id);for(const[n,s]of this.commits.entries())s.hovered=Math.min(t,i)<=n&&n<=Math.max(t,i)},focusElem(e,t){e&&(e.tabIndex=0,t&&(t.tabIndex=-1),e.focus())},async toggleMenu(){if(this.menuVisible=!this.menuVisible,!this.commits.length&&this.menuVisible&&!this.isLoading){this.isLoading=!0;try{await this.fetchCommits()}finally{this.isLoading=!1}}this.$nextTick(()=>{this.menuVisible?this.focusElem(this.$refs.showAllChanges,this.$refs.expandBtn):this.focusElem(this.$refs.expandBtn,this.$refs.showAllChanges)})},async fetchCommits(){const t=await(await(0,Ae.fG)(`${this.issueLink}/commits/list`)).json();this.commits.push(...t.commits.map(i=>(i.hovered=!1,i))),this.commits.reverse(),this.lastReviewCommitSha=t.last_review_commit_sha||null,this.lastReviewCommitSha&&!this.commits.some(i=>i.id===this.lastReviewCommitSha)&&(this.lastReviewCommitSha=null),Object.assign(this.locale,t.locale)},showAllChanges(){window.location.assign(`${this.issueLink}/files${this.queryParams}`)},changesSinceLastReviewClick(){window.location.assign(`${this.issueLink}/files/${this.lastReviewCommitSha}..${this.commits.at(-1).id}${this.queryParams}`)},commitClicked(e,t=!1){const i=`${this.issueLink}/commits/${e}${this.queryParams}`;t?window.open(i):window.location.assign(i)},commitClickedShift(e){if(this.hoverActivated=!this.hoverActivated,e.selected=!0,!this.hoverActivated){const t=this.commits.findIndex(l=>l.selected),i=this.commits.findLastIndex(l=>l.selected);let n;t===0?n=this.mergeBase:n=this.commits[t-1].id;const s=this.commits[i].id;t===i?window.location.assign(`${this.issueLink}/commits/${s}${this.queryParams}`):n===this.mergeBase&&s===this.commits.at(-1).id?window.location.assign(`${this.issueLink}/files${this.queryParams}`):window.location.assign(`${this.issueLink}/files/${n}..${s}${this.queryParams}`)}}}}),Pv=(0,Xi.A)(qv,[["render",Ov],["__scopeId","data-v-c589fa0e"]]);function Fv(){const e=document.querySelector("#diff-commit-select");if(!e)return;Ai(Pv).mount(e)}const{pageData:Iv}=window.config,Ua=Iv.prReview||{},yh="viewed-file-checked-form",wh=".viewed-file-form",Nv="#expand-files-btn",Hv="#collapse-files-btn";function Sh(){document.querySelector("#viewed-files-summary")?.setAttribute("value",Ua.numberOfViewedFiles);const t=document.querySelector("#viewed-files-summary-label");t&&(t.innerHTML=t.getAttribute("data-text-changed-template").replace("%[1]d",Ua.numberOfViewedFiles).replace("%[2]d",Ua.numberOfFiles))}function Bv(){Ua.numberOfViewedFiles=document.querySelectorAll(`${wh} > input[type=checkbox][checked]`).length,Sh()}function xh(){for(const e of document.querySelectorAll(`${wh}:not([data-has-viewed-checkbox-listener="true"])`)){e.setAttribute("data-has-viewed-checkbox-listener",String(!0));const t=e.querySelector("input[type=checkbox]");t.addEventListener("input",function(){this.checked?(e.classList.add(yh),t.setAttribute("checked",""),Ua.numberOfViewedFiles++):(e.classList.remove(yh),t.removeAttribute("checked"),Ua.numberOfViewedFiles--),Sh(),e.parentNode.querySelector(".changed-since-last-review")?.remove();const n=t.getAttribute("name");iv(ed(),n,this.checked);const s={};s[n]=this.checked;const l={files:s},u=e.getAttribute("data-headcommit");u&&(l.headCommitSHA=u),(0,Ae.LO)(e.getAttribute("data-link"),{data:l});const m=e.closest(".diff-file-header");Ba(m.closest(".file-content"),m.querySelector(".fold-file"),this.checked)})}}function $v(){document.querySelector(Nv)?.addEventListener("click",()=>{for(const e of document.querySelectorAll('.file-content[data-folded="true"]'))Ba(e,e.querySelector(".fold-file"),!1)}),document.querySelector(Hv)?.addEventListener("click",()=>{for(const e of document.querySelectorAll('.file-content:not([data-folded="true"])'))e.getAttribute("id")!=="diff-incomplete"&&Ba(e,e.querySelector(".fold-file"),!0)})}const{i18n:Uv}=window.config;function Vv(e){(0,C.jB)(e,".file-view-toggle",t=>t.addEventListener("click",()=>{(0,C.D6)(t,".file-view-toggle",n=>n.classList.remove("active")),t.classList.add("active");const i=document.querySelector(t.getAttribute("data-toggle-selector"));if(!i)throw new Error("Target element not found");(0,C.y9)((0,C.D6)(i)),(0,C.fi)(i)}))}function Wv(){(0,C.ny)(document,"submit",".conversation-holder form",async(e,t)=>{t.preventDefault();const i=e.querySelector("textarea");if(hh(i)&&!e.classList.contains("is-loading"))try{e.classList.add("is-loading");const n=new FormData(e),s=(0,C.IU)(t);(s?.nodeName==="BUTTON"||s?.nodeName==="INPUT"&&s.type==="submit")&&s.name&&n.append(s.name,s.value);const u=e.closest("tr")?.getAttribute("data-line-type"),m=await(0,Ae.LO)(e.getAttribute("action"),{data:n}),y=(0,C.SL)(await m.text()),A=y.getAttribute("data-path"),L=y.getAttribute("data-side"),z=y.getAttribute("data-idx");if(e.closest(".conversation-holder").replaceWith(y),e=null,u){let X;u==="same"?X=`[data-path="${A}"] .add-code-comment[data-idx="${z}"]`:X=`[data-path="${A}"] .add-code-comment[data-side="${L}"][data-idx="${z}"]`;for(const _e of document.querySelectorAll(X))_e.classList.add("tw-invisible")}if(!s||s?.matches('button[name="pending_review"]')){const X=document.querySelector("#review-box"),_e=X?.querySelector(".review-comments-counter");if(!_e)return;const pe=parseInt(_e.getAttribute("data-pending-comment-number"))+1||1;_e.setAttribute("data-pending-comment-number",String(pe)),_e.textContent=String(pe),(0,C.b7)(X,"pulse-1p5-200")}}catch(n){console.error("Error:",n),gt(Uv.network_error)}finally{e?.classList.remove("is-loading")}}),(0,C.ny)(document,"click",".resolve-conversation",async(e,t)=>{t.preventDefault();const i=e.getAttribute("data-comment-id"),n=e.getAttribute("data-origin"),s=e.getAttribute("data-action"),l=e.getAttribute("data-update-url");try{const m=await(await(0,Ae.LO)(l,{data:new URLSearchParams({origin:n,action:s,comment_id:i})})).text(),y=e.closest(".conversation-holder");if(y){const A=(0,C.SL)(m);y.replaceWith(A)}else window.location.reload()}catch(u){console.error("Error:",u)}})}function zv(){(0,C.ny)(document,"click",".previous-conversation, .next-conversation",(e,t)=>{t.preventDefault();const i=e.matches(".previous-conversation"),n=e.closest(".comment-code-cloud"),s=document.querySelectorAll(".comment-code-cloud:not(.tw-hidden)"),l=Array.from(s).indexOf(n),u=l>0?l-1:s.length-1,m=l<s.length-1?l+1:0,L=s[i?u:m].querySelector(".comment").id;window.location.href=`#${L}`})}function jh(){for(const e of document.querySelectorAll(".diff-header-popup-btn:not([data-header-popup-initialized])")){e.setAttribute("data-header-popup-initialized","");const t=e.nextElementSibling;if(!t?.matches(".tippy-target"))throw new Error("Popup element not found");Ie(e,{content:t,theme:"menu",placement:"bottom",trigger:"click",interactive:!0,hideOnClick:!0})}}function Eh(){tf(),xh(),Bv(),Ld(),jh()}async function Ah(e){if(e.classList.contains("disabled"))return!1;e.classList.add("disabled");const t=e.getAttribute("data-href");try{const n=await(await(0,Ae.fG)(t)).text(),l=(0,St.a8)(n,"text/html").querySelector("#diff-file-boxes");return document.querySelector("#diff-incomplete").replaceWith(...Array.from(l.children)),Eh(),!0}catch(i){console.error("Error:",i),gt("An error occurred while loading more files.")}finally{e.classList.remove("disabled")}return!1}function Kv(){(0,C.ny)(document,"click","a#diff-show-more-files",(e,t)=>{t.preventDefault(),Ah(e)}),(0,C.ny)(document,"click","a.diff-load-button",async(e,t)=>{if(t.preventDefault(),e.classList.contains("disabled"))return;e.classList.add("disabled");const i=e.getAttribute("data-href");try{const s=await(await(0,Ae.fG)(i)).text(),u=(0,St.a8)(s,"text/html").querySelector("#diff-file-boxes .diff-file-body .file-body"),m=Array.from(u.children);e.parentElement.replaceWith(...m);for(const y of m)window.htmx.process(y);Eh()}catch(n){console.error("Error:",n)}finally{e.classList.remove("disabled")}})}async function Ch(){const e=window.location.hash;if(!(!e.startsWith("#diff-")&&!e.startsWith("#issuecomment-")))for(;;){const t=document.getElementById(e.substring(1));if(t){t.scrollIntoView();return}const i=document.querySelector("#diff-show-more-files");if(!i||!await Ah(i))return}}function Xv(){window.addEventListener("hashchange",Ch),Ch()}function Gv(){Wv(),document.querySelector("#diff-file-boxes")&&(zv(),gv(),Fv(),Kv(),jh(),xh(),$v(),Xv(),yc("#diff-file-boxes .diff-file-box",Vv),(0,C.ny)(document,"click",".fold-file",e=>{ng(e.closest(".file-content"),e)}))}const{appSubUrl:Qv}=window.config;function Yv(){const e=document.querySelector(".page-content.organization.new.team");e&&(0,C.jB)(e,"input[name=permission]",t=>t.addEventListener("change",()=>{const i=e.querySelector("input[name=permission]:checked")?.value;(0,C.oi)(e.querySelectorAll(".team-units"),i!=="admin")}))}function Jv(){const e=(0,ke.mD)("#search-repo-box");e.search({minCharacters:2,apiSettings:{url:`${Qv}/repo/search?q={query}&uid=${e.data("uid")}`,onResponse(t){const i=[];for(const n of t.data)i.push({title:n.repository.full_name.split("/")[1],description:n.repository.full_name});return{results:i}}},searchFields:["full_name"],showNoResults:!1})}function Zv(){document.querySelector(".page-content.organization")&&(Yv(),Jv())}const{appSubUrl:Mo}=window.config;async function eb(){const e=document.querySelector(".user.signin.webauthn-prompt"),t=document.querySelector(".signin-passkey");if(!(!e&&!t)){if(!window.isSecureContext){(0,C.y9)(t);return}Th()&&(t&&t.addEventListener("click",tb),e&&ib())}}async function tb(){const e=await(0,Ae.fG)(`${Mo}/user/webauthn/passkey/assertion`);if(!e.ok){Ds("unknown");return}const t=await e.json();t.publicKey.challenge=(0,St.vd)(t.publicKey.challenge);for(const i of t.publicKey.allowCredentials??[])i.id=(0,St.vd)(i.id);try{const i=await navigator.credentials.get({publicKey:t.publicKey}),n=i.response,s=new Uint8Array(n.authenticatorData),l=new Uint8Array(n.clientDataJSON),u=new Uint8Array(i.rawId),m=new Uint8Array(n.signature),y=new Uint8Array(n.userHandle),A=await(0,Ae.LO)(`${Mo}/user/webauthn/passkey/login`,{data:{id:i.id,rawId:(0,St.vh)(u),type:i.type,clientExtensionResults:i.getClientExtensionResults(),response:{authenticatorData:(0,St.vh)(s),clientDataJSON:(0,St.vh)(l),signature:(0,St.vh)(m),userHandle:(0,St.vh)(y)}}});if(A.status===500){Ds("unknown");return}else if(!A.ok){Ds("unable-to-process");return}const L=await A.json();window.location.href=L?.redirect??`${Mo}/`}catch(i){Ds("general",i.message)}}async function ib(){const e=await(0,Ae.fG)(`${Mo}/user/webauthn/assertion`);if(!e.ok){Ds("unknown");return}const t=await e.json();t.publicKey.challenge=(0,St.vd)(t.publicKey.challenge);for(const i of t.publicKey.allowCredentials??[])i.id=(0,St.vd)(i.id);try{const i=await navigator.credentials.get({publicKey:t.publicKey});await kh(i)}catch(i){if(!t.publicKey.extensions?.appid){Ds("general",i.message);return}delete t.publicKey.extensions.appid;try{const n=await navigator.credentials.get({publicKey:t.publicKey});await kh(n)}catch(n){Ds("general",n.message)}}}async function kh(e){const t=new Uint8Array(e.response.authenticatorData),i=new Uint8Array(e.response.clientDataJSON),n=new Uint8Array(e.rawId),s=new Uint8Array(e.response.signature),l=new Uint8Array(e.response.userHandle),u=await(0,Ae.LO)(`${Mo}/user/webauthn/assertion`,{data:{id:e.id,rawId:(0,St.vh)(n),type:e.type,clientExtensionResults:e.getClientExtensionResults(),response:{authenticatorData:(0,St.vh)(t),clientDataJSON:(0,St.vh)(i),signature:(0,St.vh)(s),userHandle:(0,St.vh)(l)}}});if(u.status===500){Ds("unknown");return}else if(!u.ok){Ds("unable-to-process");return}const m=await u.json();window.location.href=m?.redirect??`${Mo}/`}async function nb(e){const t=new Uint8Array(e.response.attestationObject),i=new Uint8Array(e.response.clientDataJSON),n=new Uint8Array(e.rawId),s=await(0,Ae.LO)(`${Mo}/user/settings/security/webauthn/register`,{data:{id:e.id,rawId:(0,St.vh)(n),type:e.type,response:{attestationObject:(0,St.vh)(t),clientDataJSON:(0,St.vh)(i)}}});if(s.status===409){Ds("duplicated");return}else if(s.status!==201){Ds("unknown");return}window.location.reload()}function Ds(e,t=""){const i=document.querySelector("#webauthn-error-msg");if(e==="general")i.textContent=t||"unknown error";else{const n=document.querySelector(`#webauthn-error [data-webauthn-error-msg=${e}]`);n?i.textContent=`${n.textContent}${t?` ${t}`:""}`:i.textContent=`unknown error type: ${e}${t?` ${t}`:""}`}(0,C.fi)("#webauthn-error")}function Th(){return window.isSecureContext?typeof window.PublicKeyCredential!="function"?(Ds("browser"),!1):!0:(Ds("insecure"),!1)}function sb(){const e=document.querySelector("#register-webauthn");if(e){if(!Th()){e.disabled=!0;return}e.addEventListener("click",async t=>{t.preventDefault(),await rb()})}}async function rb(){const e=document.querySelector("#nickname"),t=new FormData;t.append("name",e.value);const i=await(0,Ae.LO)(`${Mo}/user/settings/security/webauthn/request_register`,{data:t});if(i.status===409){Ds("duplicated");return}else if(!i.ok){Ds("unknown");return}const n=await i.json();if(e.closest("div.field").classList.remove("error"),n.publicKey.challenge=(0,St.vd)(n.publicKey.challenge),n.publicKey.user.id=(0,St.vd)(n.publicKey.user.id),n.publicKey.excludeCredentials)for(const s of n.publicKey.excludeCredentials)s.id=(0,St.vd)(s.id);try{const s=await navigator.credentials.create({publicKey:n.publicKey});await nb(s)}catch(s){Ds("unknown",s)}}function ob(){document.addEventListener("click",e=>{if(e.target.matches(".remove-rel-attach")){const t=e.target.getAttribute("data-uuid"),i=e.target.getAttribute("data-id");document.querySelector(`input[name='attachment-del-${t}']`).value="true",(0,C.y9)(`#attachment-${i}`)}})}function ab(){document.querySelector(".repository.new.release")&&lb()}function lb(){const e=document.querySelector("#tag-name-editor");if(!e)return;const t=JSON.parse(e.getAttribute("data-existing-tags"));if(!Array.isArray(t))return;const i=e.getAttribute("data-tag-helper"),n=e.getAttribute("data-tag-helper-new"),s=e.getAttribute("data-tag-helper-existing"),l=document.querySelector("#tag-name"),u=function(m){const y=m.value,A=document.querySelector("#tag-helper");t.includes(y)?((0,C.y9)("#tag-target-selector"),A.textContent=s):((0,C.fi)("#tag-target-selector"),A.textContent=y?n:i)};u(l),l.addEventListener("input",m=>{u(m.target)})}const{appSubUrl:cb}=window.config,ub=/^\S+@\S+$/;function db(){const e=document.querySelector("#search-user-box");if(!e)return;const t=e.getAttribute("data-allow-email")==="true",i=e.getAttribute("data-allow-email-description")??void 0;(0,ke.mD)(e).search({minCharacters:2,apiSettings:{url:`${cb}/user/search_candidates?q={query}`,onResponse(n){const s=[],l=e.querySelector("input").value,u=l.toUpperCase();for(const m of n.data){const y={title:m.login,image:m.avatar_url,description:R(m.full_name)};u===m.login.toUpperCase()?s.unshift(y):s.push(y)}if(t&&!s.length&&ub.test(l)){const m={title:l,description:i};s.push(m)}return{results:s}}},searchFields:["login","full_name"],showNoResults:!1})}function fb(){const e=document.querySelector(".page-content.install");e&&(e.classList.contains("post-install")?mb():hb())}function hb(){const e="gitea",t="gitea",i={mysql:"127.0.0.1:3306",postgres:"127.0.0.1:5432",mssql:"127.0.0.1:1433"},n=document.querySelector("#db_host"),s=document.querySelector("#db_user"),l=document.querySelector("#db_name");document.querySelector("#db_type").addEventListener("change",function(){const y=this.value;if((0,C.y9)("div[data-db-setting-for]"),(0,C.fi)(`div[data-db-setting-for=${y}]`),y!=="sqlite3"){(0,C.fi)("div[data-db-setting-for=common-host]");const A=n.value;(!A||Object.values(i).includes(A))&&(n.value=i[y]??""),!s.value&&!l.value&&(s.value=e,l.value=t)}}),document.querySelector("#db_type").dispatchEvent(new Event("change"));const u=document.querySelector("#app_url");u.value.includes("://localhost")&&(u.value=window.location.href);const m=document.querySelector("#domain");m.value.trim()==="localhost"&&(m.value=window.location.hostname),document.querySelector("#offline-mode input").addEventListener("change",function(){this.checked&&(document.querySelector("#disable-gravatar input").checked=!0,document.querySelector("#federated-avatar-lookup input").checked=!1)}),document.querySelector("#disable-gravatar input").addEventListener("change",function(){this.checked?document.querySelector("#federated-avatar-lookup input").checked=!1:document.querySelector("#offline-mode input").checked=!1}),document.querySelector("#federated-avatar-lookup input").addEventListener("change",function(){this.checked&&(document.querySelector("#disable-gravatar input").checked=!1,document.querySelector("#offline-mode input").checked=!1)}),document.querySelector("#enable-openid-signin input").addEventListener("change",function(){this.checked?document.querySelector("#disable-registration input").checked||(document.querySelector("#enable-openid-signup input").checked=!0):document.querySelector("#enable-openid-signup input").checked=!1}),document.querySelector("#disable-registration input").addEventListener("change",function(){this.checked?(document.querySelector("#enable-captcha input").checked=!1,document.querySelector("#enable-openid-signup input").checked=!1):document.querySelector("#enable-openid-signup input").checked=!0}),document.querySelector("#enable-captcha input").addEventListener("change",function(){this.checked&&(document.querySelector("#disable-registration input").checked=!1)})}function mb(){const e=document.querySelector("#goto-user-login");if(!e)return;const t=e.getAttribute("href");let i=setInterval(async()=>{try{const n=await(0,Ae.fG)(t);i&&n.status===200&&(clearInterval(i),i=null,window.location.href=t)}catch{}},1e3)}function pb(){if(!document.querySelectorAll(".new.webhook").length)return;for(const t of document.querySelectorAll(".events.checkbox input"))t.addEventListener("change",function(){this.checked&&(0,C.fi)(".events.fields")});for(const t of document.querySelectorAll(".non-events.checkbox input"))t.addEventListener("change",function(){this.checked&&(0,C.y9)(".events.fields")});const e=document.querySelector("#http_method");if(e){const t=function(){const i=e.value==="POST";(0,C.oi)(document.querySelector("#content_type").closest(".field"),i)};t(),e.addEventListener("change",t)}document.querySelector("#test-delivery")?.addEventListener("click",async function(){this.classList.add("is-loading","disabled"),await(0,Ae.LO)(this.getAttribute("data-link")),setTimeout(()=>{window.location.href=this.getAttribute("data-redirect")},5e3)})}function gb(){vb(),bb()}function vb(){for(const e of document.querySelectorAll(".show-create-branch-modal"))e.addEventListener("click",()=>{const t=e.getAttribute("data-modal-form")||"#create-branch-form",i=document.querySelector(t);if(!i)return;i.action=`${i.getAttribute("data-base-action")}${e.getAttribute("data-branch-from-urlcomponent")}`;const n=e.getAttribute("data-modal-from-span")||"#modal-create-branch-from-span";document.querySelector(n).textContent=e.getAttribute("data-branch-from"),(0,ke.mD)(e.getAttribute("data-modal")).modal("show")})}function bb(){for(const e of document.querySelectorAll(".show-rename-branch-modal"))e.addEventListener("click",()=>{const t=e.getAttribute("data-modal"),i=document.querySelector(t),n=e.getAttribute("data-old-branch-name");i.querySelector("input[name=from]").value=n;const s=i.querySelector(".default-branch-warning");(0,C.oi)(s,e.getAttribute("data-is-default-branch")==="true");const l=i.querySelector("[data-rename-branch-to]");l.textContent=l.getAttribute("data-rename-branch-to").replace("%s",n)})}function _b(e){return/.*[^/]\/[^/].*/.test(e)}function Lh(e){const t=document.querySelector(e);if(!t)return;const i=t.querySelector("#issue-label-edit-modal");if(!i)return;const n=i.querySelector('input[name="id"]'),s=i.querySelector(".label-name-input"),l=i.querySelector(".label-exclusive-input-field"),u=i.querySelector(".label-exclusive-input"),m=i.querySelector(".label-exclusive-warning"),y=i.querySelector(".label-exclusive-order-input-field"),A=i.querySelector(".label-exclusive-order-input"),L=i.querySelector(".label-is-archived-input-field"),z=i.querySelector(".label-is-archived-input"),X=i.querySelector(".label-desc-input"),_e=i.querySelector(".js-color-picker-input input"),pe=()=>{const Te=_b(s.value);l.classList.toggle("disabled",!Te);const He=Te&&u.checked&&i.hasAttribute("data-need-warn-exclusive");(0,C.oi)(m,He),Te||(u.checked=!1),(0,C.oi)(y,u.checked),parseInt(A.value)<=0?A.style.color="var(--color-placeholder-text) !important":A.style.color=null},de=Te=>{const He=i.querySelector("form");n.value=Te.getAttribute("data-label-id")||"",s.value=Te.getAttribute("data-label-name")||"",A.value=Te.getAttribute("data-label-exclusive-order")||"0",z.checked=Te.getAttribute("data-label-is-archived")==="true",u.checked=Te.getAttribute("data-label-exclusive")==="true",X.value=Te.getAttribute("data-label-description")||"",_e.value=Te.getAttribute("data-label-color")||"",_e.dispatchEvent(new Event("input",{bubbles:!0}));const U=!!n.value,Se=parseInt(Te.getAttribute("data-label-num-issues")||"0");i.toggleAttribute("data-need-warn-exclusive",!u.checked&&Se>0),i.querySelector(".header").textContent=U?i.getAttribute("data-text-edit-label"):i.getAttribute("data-text-new-label");const ze=i.getAttribute("data-current-page-link");He.action=U?`${ze}/edit`:`${ze}/new`,(0,C.oi)(L,U),pe(),(0,ke.mD)(i).modal({onApprove(){if(!He.checkValidity())return He.reportValidity(),!1;He.submit()}}).modal("show")};i.addEventListener("input",()=>pe());const Pe=t.querySelector(".ui.button.new-label");Pe?.addEventListener("click",()=>de(Pe));const Le=t.querySelectorAll(".edit-label-button");for(const Te of Le)Te.addEventListener("click",He=>{He.preventDefault(),de(Te)})}function yb(){document.querySelectorAll(".organization").length&&(document.querySelector(".organization.settings.options #org_name")?.addEventListener("input",function(){const e=this.value.toLowerCase()!==this.getAttribute("data-org-name").toLowerCase();(0,C.oi)("#org-name-change-prompt",e)}),Lh(".page-content.organization.settings.labels"))}var wb=__webpack_require__("./node_modules/jquery/dist/jquery.js"),Mn=__webpack_require__.n(wb);function Sb(){for(const e of document.querySelectorAll(".ui.checkbox")){if(e.hasAttribute("data-checkbox-patched"))continue;const t=e.querySelector("label"),i=e.querySelector("input");!t||!i||((0,ke.iZ)(t,i),e.setAttribute("data-checkbox-patched","true"))}}function xb(){for(const e of document.querySelectorAll(".ui.form .field")){if(e.hasAttribute("data-field-patched"))continue;const t=e.querySelector(":scope > label"),i=e.querySelector(":scope > input");!t||!i||((0,ke.iZ)(t,i),e.setAttribute("data-field-patched","true"))}}const Ar="_giteaAriaPatchDropdown",td=Mn().fn.dropdown;function jb(){if(Mn().fn.dropdown===id)throw new Error("initAriaDropdownPatch could only be called once");Mn().fn.dropdown.settings.onAfterFiltered=Eb,Mn().fn.dropdown=id,Mn().fn.fomanticExt.onResponseKeepSelectedItem=Rb,id.settings=td.settings}function id(...e){const t=td.apply(this,e);for(let i of this){i=i.closest(".ui.dropdown"),i[Ar]||kb(i);const n=Mn()(i),s=n.data("module-dropdown");s.giteaDelegated||(s.giteaDelegated=!0,Ab(n))}return t}function Rh(e,t){t.id||(t.id=(0,ke.Ae)()),t.setAttribute("role",e[Ar].listItemRole),t.setAttribute("tabindex","-1");for(const i of t.querySelectorAll("a, input, button"))i.setAttribute("tabindex","-1")}function Mh(e){e.id||(e.id=(0,ke.Ae)()),e.tabIndex=-1;const t=e.querySelector(".delete.icon");t&&(t.setAttribute("aria-hidden","false"),t.setAttribute("aria-label",window.config.i18n.remove_label_str.replace("%s",e.getAttribute("data-value"))),t.setAttribute("role","button"))}function Eb(){const e=Mn()(this).closest(".ui.dropdown"),t=e.dropdown("setting","hideDividers")==="empty",i=e[0].querySelector(".scrolling.menu")||e[0].querySelector(".menu");t&&i&&Lb(i)}function Ab(e){const t=td.bind(e),i={...t("setting","templates"),t:performance.now()},n=i.menu;i.menu=function(m,y,A,L){const z=n(m,y,A,L),X=document.createElement("div");X.innerHTML=z;const _e=Mn()(X);return _e.find("> .item").each((de,Pe)=>Rh(e[0],Pe)),e[0][Ar].deferredRefreshAriaActiveItem(),_e.html()},t("setting","templates",i);const s=t("setting","onLabelCreate");t("setting","onLabelCreate",function(m,y){const A=s.call(this,m,y);return Mh(A[0]),A});const l=t("internal","set"),u=l.direction;l.direction=function(m){u.call(this,m);const y=t("setting","className");m=m||e.find("> .menu");const A=m[0];A.classList.add(y.loading),A.getBoundingClientRect().right>document.documentElement.clientWidth&&A.classList.add(y.leftward),A.classList.remove(y.loading)}}function Cb(e,t,i){i.id||(i.id=(0,ke.Ae)()),Mn()(i).find("> .item").each((s,l)=>Rh(e,l)),i.setAttribute("role",e[Ar].listPopupRole);for(const s of e.querySelectorAll(".ui.label"))Mh(s);t.setAttribute("role",t.getAttribute("role")??e[Ar].focusableRole),t.setAttribute("aria-haspopup",e[Ar].listPopupRole),t.setAttribute("aria-controls",i.id),t.setAttribute("aria-expanded","false");const n=e.getAttribute("data-tooltip-content");n&&!e.getAttribute("aria-label")&&e.setAttribute("aria-label",n)}function kb(e){e[Ar]={};const t=e.querySelector("input.search"),i=t||e;if(!i)return;t&&!t.getAttribute("autocomplete")&&t.setAttribute("autocomplete","off");let n=Mn()(e).find("> .menu")[0];n||(n=document.createElement("div"),n.classList.add("menu"),e.append(n));const s=e.querySelectorAll("input").length>0;e[Ar].focusableRole=s?"combobox":"menu",e[Ar].listPopupRole=s?"listbox":"",e[Ar].listItemRole=s?"option":"menuitem",Tb(e,i,n),Cb(e,i,n)}function Tb(e,t,i){const n=()=>i.classList.contains("visible")&&!i.classList.contains("out")||i.classList.contains("in"),s=()=>{const y=n();t.setAttribute("aria-expanded",y?"true":"false");const A=Mn()(i).find("> .item.active, > .item.selected")[0];A&&(y?t.setAttribute("aria-activedescendant",A.id):e[Ar].listPopupRole==="menu"&&(t.removeAttribute("aria-activedescendant"),A.classList.remove("active","selected")))};e.addEventListener("keydown",y=>{if(y.key==="Enter"){const A=i.querySelector(":scope > .item.selected, .menu > .item.selected");A?.matches("a, .js-aria-clickable")&&!A.matches(".tw-hidden, .filtered")&&(y.preventDefault(),A.click())}});const l=(y=0)=>{setTimeout(s,y)};e[Ar].deferredRefreshAriaActiveItem=l,e.addEventListener("keyup",y=>{y.key.startsWith("Arrow")&&l()});let u=0,m=0;e.addEventListener("mousedown",()=>{m+=n()?1:0,u++},!0),e.addEventListener("focus",()=>{m+=n()?1:0,u++,l()},!0),e.addEventListener("blur",()=>{m=u=0,l(100)},!0),e.addEventListener("mouseup",()=>{setTimeout(()=>{m=u=0,l(100)},0)},!0),e.addEventListener("click",y=>{n()&&m!==2&&u===2&&y.stopPropagation(),u=m=0},!0)}function Lb(e){const t=[],i=[];let n="",s="";const l=z=>z.classList.contains("divider"),u=z=>l(z)&&z.hasAttribute("data-scope"),m=z=>z.classList.add("hidden","transition"),y=z=>z.classList.remove("hidden","transition"),A=z=>z.classList.contains("hidden")||z.classList.contains("filtered")||z.classList.contains("tw-hidden"),L=z=>{i.length===1&&u(i[0])?m(i[0]):i.length&&(u(i[0])&&s===n&&(m(i[0]),i.shift()),t.push(...i),s=n),n=z,i.length=0};(0,C.jB)(e,".divider",y);for(const z of e.children){const X=z.getAttribute("data-scope")||"";X!==n&&L(X),A(z)||i.push(z)}for(L("");t.length&&l(t[0]);)m(t[0]),t.shift();for(;t.length&&l(t[t.length-1]);)m(t[t.length-1]),t.pop();for(let z=0;z<t.length-1;z++)t[z].matches(".divider")&&t[z+1].matches(".divider")&&m(t[z])}function Rb(e,t){const i=e instanceof HTMLElement?e:e[0];setTimeout(()=>{(0,C.jB)(i,`.menu .item[data-value="${CSS.escape(t)}"].filtered`,n=>n.classList.remove("filtered")),Mn()(i).dropdown("set selected",t??"")},10)}const Dh=Mn().fn.modal;function Mb(){if(Mn().fn.modal===nd)throw new Error("initAriaModalPatch could only be called once");Mn().fn.modal=nd,nd.settings=Dh.settings}function nd(...e){const t=Dh.apply(this,e);if(e[0]==="show"||e[0]?.autoShow)for(const i of this)for(const n of i.querySelectorAll("form button.cancel:not([type])"))n.setAttribute("type","button");return t}function Db(){const e=new Set(["clear queue","stop","stop all","destroy","force repaint","repaint","reset","looping","remove looping","disable","enable","set duration","save conditions","restore conditions"]);Mn().fn.transition=function(t,i,n){if(t==="is supported")return!0;if(t==="is animating"||t==="is inward"||t==="is outward")return!1;let s;if(typeof t=="string"){if(e.has(t))return this;s={animation:t,...i&&{duration:i},...n&&{onComplete:n}}}else if(typeof t=="object")s=t;else throw new Error(`invalid argument: ${t}`);const l=s.animation?.startsWith("show")||s.animation?.endsWith(" in"),u=s.animation?.startsWith("hide")||s.animation?.endsWith(" out");return this.each((m,y)=>{let A=l;!l&&!u&&(A=this.hasClass("hidden")),s.onStart?.call(y),A?(y.classList.remove("hidden"),y.classList.add("visible","transition"),s.displayType&&y.style.setProperty("display",s.displayType,"important"),s.onShow?.call(y)):(y.classList.add("hidden"),y.classList.remove("visible"),y.style.removeProperty("display"),s.onHidden?.call(y)),s.onComplete?.call(y)}),this}}function Ob(){Mn().fn.dimmer=function(e,t){if(e==="add content"){const i=t,n=document.querySelector("body > .ui.dimmer");n?((0,C.xP)(n,"*",s=>s.classList.add("hidden")),this._dimmer=n):(this._dimmer=document.createElement("div"),this._dimmer.classList.add("ui","dimmer"),document.body.append(this._dimmer)),this._dimmer.append(i[0])}else{if(e==="get dimmer")return Mn()(this._dimmer);if(e==="show")this._dimmer.classList.add("active"),document.body.classList.add("tw-overflow-hidden");else if(e==="hide"){const i=t;this._dimmer.classList.remove("active"),document.body.classList.remove("tw-overflow-hidden"),i()}}return this}}function qb(){Mn().fn.tab=function(){for(const e of this){const t=e.getAttribute("data-tab");t&&e.addEventListener("click",()=>{const i=document.querySelector(`.ui.tab[data-tab="${t}"]`);(0,C.D6)(i,".ui.tab",n=>n.classList.remove("active")),(0,C.D6)(e,"[data-tab]",n=>n.classList.remove("active")),e.classList.add("active"),i.classList.add("active")})}return this}}const Oh=window.matchMedia("only screen and (max-width: 767.98px)");function Pb(){Mn().fn.fomanticExt={},Mn().fn.dropdown.settings.fullTextSearch="exact",Mn().fn.dropdown.settings.className.label+=" tw-cursor-default",Mn().fn.dropdown.settings.templates.label=function(e,t,i,n){const s=Mn().fn.dropdown.settings.templates.escape;return s(t,i)+(0,Z.JW)("octicon-x",16,`${n.delete} icon`)},Db(),Ob(),qb(),Sb(),xb(),jb(),Mb()}async function Fb(){const e=document.querySelector(".repository.wiki .combo-markdown-editor textarea");if(!e)return;const t=document.querySelector(".repository.wiki.new .ui.form"),i=t.querySelector(".combo-markdown-editor");let n,s=!1,l="";const u=async function(){if(s)return;const m=i.querySelector(".EasyMDEContainer .editor-preview-active"),A=i.querySelector(".EasyMDEContainer .editor-preview-active-side")||m,L=e.value;if(n&&A&&l!==L){s=!0;const z=new FormData;z.append("mode",n.previewMode),z.append("context",n.previewContext),z.append("text",L);try{const _e=await(await(0,Ae.LO)(n.previewUrl,{data:z})).text();l=L,A.innerHTML=`<div class="render-content markup ui segment">${_e}</div>`}catch(X){console.error("Error rendering preview:",X)}finally{s=!1,setTimeout(u,1e3)}}else setTimeout(u,1e3)};u(),n=await ma(i,{editorHeights:{minHeight:"300px",height:"calc(100vh - 600px)"},easyMDEOptions:{previewRender:(m,y)=>y.innerHTML,toolbar:["bold","italic","strikethrough","|","heading-1","heading-2","heading-3","heading-bigger","heading-smaller","|","gitea-code-inline","code","quote","|","gitea-checkbox-empty","gitea-checkbox-checked","|","unordered-list","ordered-list","|","link","image","table","horizontal-rule","|","preview","fullscreen","side-by-side","|","gitea-switch-to-textarea"]}}),t.addEventListener("submit",m=>{hh(e)||(m.preventDefault(),m.stopPropagation())})}function qh(e){e&&document.querySelector(".wiki-content-toc details")?.removeAttribute("open")}function Ib(){document.querySelector(".page-content.repository.wiki")&&(Oh.addEventListener("change",e=>qh(e.matches)),qh(Oh.matches),Fb())}function Nb(){(0,C.ny)(document,"click",".escape-button, .unescape-button, .toggle-escape-button",(e,t)=>{t.preventDefault();const i=e.getAttribute("data-unicode-content-selector"),n=i?document.querySelector(i):e.closest(".file-content, .non-diff-file-content"),s=n.querySelector(".file-code, .file-view")??n;if(e.matches(".escape-button"))s.classList.add("unicode-escaped"),(0,C.y9)(e),(0,C.fi)((0,C.D6)(e,".unescape-button"));else if(e.matches(".unescape-button"))s.classList.remove("unicode-escaped"),(0,C.y9)(e),(0,C.fi)((0,C.D6)(e,".escape-button"));else if(e.matches(".toggle-escape-button")){const l=s.classList.contains("unicode-escaped");s.classList.toggle("unicode-escaped",!l),(0,C.oi)(n.querySelectorAll(".unescape-button"),!l),(0,C.oi)(n.querySelectorAll(".escape-button"),l)}})}const{pageData:Ph}=window.config;async function Hb(e,t){const[{Cite:i,plugins:n}]=await Promise.all([__webpack_require__.e("citation-js-core-citation-js-formats-citation-js-bibtex-citation-js-csl").then(__webpack_require__.bind(__webpack_require__,"./node_modules/@citation-js/core/lib-mjs/index.js")),Promise.all([__webpack_require__.e("citation-js-core-citation-js-formats-citation-js-bibtex-citation-js-csl"),__webpack_require__.e("citation-js-formats")]).then(__webpack_require__.t.bind(__webpack_require__,"./node_modules/@citation-js/plugin-software-formats/lib/index.js",23)),Promise.all([__webpack_require__.e("citation-js-core-citation-js-formats-citation-js-bibtex-citation-js-csl"),__webpack_require__.e("citation-js-bibtex")]).then(__webpack_require__.bind(__webpack_require__,"./node_modules/@citation-js/plugin-bibtex/lib-mjs/index.js")),Promise.all([__webpack_require__.e("citation-js-core-citation-js-formats-citation-js-bibtex-citation-js-csl"),__webpack_require__.e("citation-js-csl")]).then(__webpack_require__.bind(__webpack_require__,"./node_modules/@citation-js/plugin-csl/lib-mjs/index.js"))]),{citationFileContent:s}=Ph,l=n.config.get("@bibtex");l.constants.fieldTypes.doi=["field","literal"],l.constants.fieldTypes.version=["field","literal"];const u=new i(s),m=(0,St.kk)()||"en-US",y=u.format("bibliography",{template:"apa",lang:m}),A=u.format("bibtex",{lang:m});t.setAttribute("data-text",A),e.setAttribute("data-text",y)}async function Bb(){const e="apa";if(!Ph.citationFileContent)return;const t=document.querySelector("#citation-copy-apa"),i=document.querySelector("#citation-copy-bibtex"),n=document.querySelector("#citation-copy-content");if(!t&&!i||!n)return;const s=()=>{const l=(localStorage.getItem("citation-copy-format")||e)==="bibtex",u=(l?i:t).getAttribute("data-text");n.value=u,i.classList.toggle("primary",l),t.classList.toggle("primary",!l)};document.querySelector("#cite-repo-button")?.addEventListener("click",async()=>{try{await Hb(t,i)}catch(l){console.error(`initCitationFileCopyContent error: ${l}`,l);return}s(),t.addEventListener("click",()=>{localStorage.setItem("citation-copy-format","apa"),s()}),i.addEventListener("click",()=>{localStorage.setItem("citation-copy-format","bibtex"),s()}),n.addEventListener("click",()=>{n.select()}),(0,ke.mD)("#cite-repo-modal").modal("show")})}function $b(){_c("click","onCommentReactionButtonClick",async(e,t)=>{if(t.preventDefault(),e.classList.contains("disabled"))return;const i=e.closest("[data-action-url]").getAttribute("data-action-url"),n=e.getAttribute("data-reaction-content"),s=e.closest(".comment-container"),l=s.querySelector(".bottom-reactions"),m=l?.querySelector(`a[data-reaction-content="${CSS.escape(n)}"]`)?.getAttribute("data-has-reacted")==="true",A=await(await(0,Ae.LO)(`${i}/${m?"unreact":"react"}`,{data:new URLSearchParams({content:n})})).json();l?.remove(),A.html&&s.insertAdjacentHTML("beforeend",A.html)})}var Ub=__webpack_require__("./node_modules/brace-expansion/index.js");const Vb=1024*64,Tc=e=>{if(typeof e!="string")throw new TypeError("invalid pattern");if(e.length>Vb)throw new TypeError("pattern is too long")},Wb={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",!0],"[:alpha:]":["\\p{L}\\p{Nl}",!0],"[:ascii:]":["\\x00-\\x7f",!1],"[:blank:]":["\\p{Zs}\\t",!0],"[:cntrl:]":["\\p{Cc}",!0],"[:digit:]":["\\p{Nd}",!0],"[:graph:]":["\\p{Z}\\p{C}",!0,!0],"[:lower:]":["\\p{Ll}",!0],"[:print:]":["\\p{C}",!0],"[:punct:]":["\\p{P}",!0],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",!0],"[:upper:]":["\\p{Lu}",!0],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",!0],"[:xdigit:]":["A-Fa-f0-9",!1]},Tl=e=>e.replace(/[[\]\\-]/g,"\\$&"),zb=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),Fh=e=>e.join(""),Kb=(e,t)=>{const i=t;if(e.charAt(i)!=="[")throw new Error("not in a brace expression");const n=[],s=[];let l=i+1,u=!1,m=!1,y=!1,A=!1,L=i,z="";e:for(;l<e.length;){const de=e.charAt(l);if((de==="!"||de==="^")&&l===i+1){A=!0,l++;continue}if(de==="]"&&u&&!y){L=l+1;break}if(u=!0,de==="\\"&&!y){y=!0,l++;continue}if(de==="["&&!y){for(const[Pe,[Le,Te,He]]of Object.entries(Wb))if(e.startsWith(Pe,l)){if(z)return["$.",!1,e.length-i,!0];l+=Pe.length,He?s.push(Le):n.push(Le),m=m||Te;continue e}}if(y=!1,z){de>z?n.push(Tl(z)+"-"+Tl(de)):de===z&&n.push(Tl(de)),z="",l++;continue}if(e.startsWith("-]",l+1)){n.push(Tl(de+"-")),l+=2;continue}if(e.startsWith("-",l+1)){z=de,l+=2;continue}n.push(Tl(de)),l++}if(L<l)return["",!1,0,!1];if(!n.length&&!s.length)return["$.",!1,e.length-i,!0];if(s.length===0&&n.length===1&&/^\\?.$/.test(n[0])&&!A){const de=n[0].length===2?n[0].slice(-1):n[0];return[zb(de),!1,L-i,!1]}const X="["+(A?"^":"")+Fh(n)+"]",_e="["+(A?"":"^")+Fh(s)+"]";return[n.length&&s.length?"("+X+"|"+_e+")":n.length?X:_e,m,L-i,!0]},Ll=(e,{windowsPathsNoEscape:t=!1}={})=>t?e.replace(/\[([^\/\\])\]/g,"$1"):e.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1"),Xb=new Set(["!","?","+","*","@"]),Ih=e=>Xb.has(e),Gb="(?!(?:^|/)\\.\\.?(?:$|/))",Lc="(?!\\.)",Qb=new Set(["[","."]),Yb=new Set(["..","."]),Jb=new Set("().*{}+?[]^$\\!"),Zb=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),sd="[^/]",Nh=sd+"*?",Hh=sd+"+?",Ks=class Ks{constructor(t,i,n={}){wn(this,ba);rs(this,"type");wn(this,is);wn(this,bs);wn(this,lo,!1);wn(this,Dn,[]);wn(this,Gn);wn(this,Do);wn(this,ga);wn(this,Oo,!1);wn(this,Gr);wn(this,va);wn(this,Pl,!1);this.type=t,t&&tn(this,bs,!0),tn(this,Gn,i),tn(this,is,pt(this,Gn)?pt(pt(this,Gn),is):this),tn(this,Gr,pt(this,is)===this?n:pt(pt(this,is),Gr)),tn(this,ga,pt(this,is)===this?[]:pt(pt(this,is),ga)),t==="!"&&!pt(pt(this,is),Oo)&&pt(this,ga).push(this),tn(this,Do,pt(this,Gn)?pt(pt(this,Gn),Dn).length:0)}get hasMagic(){if(pt(this,bs)!==void 0)return pt(this,bs);for(const t of pt(this,Dn))if(typeof t!="string"&&(t.type||t.hasMagic))return tn(this,bs,!0);return pt(this,bs)}toString(){return pt(this,va)!==void 0?pt(this,va):this.type?tn(this,va,this.type+"("+pt(this,Dn).map(t=>String(t)).join("|")+")"):tn(this,va,pt(this,Dn).map(t=>String(t)).join(""))}push(...t){for(const i of t)if(i!==""){if(typeof i!="string"&&!(i instanceof Ks&&pt(i,Gn)===this))throw new Error("invalid part: "+i);pt(this,Dn).push(i)}}toJSON(){const t=this.type===null?pt(this,Dn).slice().map(i=>typeof i=="string"?i:i.toJSON()):[this.type,...pt(this,Dn).map(i=>i.toJSON())];return this.isStart()&&!this.type&&t.unshift([]),this.isEnd()&&(this===pt(this,is)||pt(pt(this,is),Oo)&&pt(this,Gn)?.type==="!")&&t.push({}),t}isStart(){if(pt(this,is)===this)return!0;if(!pt(this,Gn)?.isStart())return!1;if(pt(this,Do)===0)return!0;const t=pt(this,Gn);for(let i=0;i<pt(this,Do);i++){const n=pt(t,Dn)[i];if(!(n instanceof Ks&&n.type==="!"))return!1}return!0}isEnd(){if(pt(this,is)===this||pt(this,Gn)?.type==="!")return!0;if(!pt(this,Gn)?.isEnd())return!1;if(!this.type)return pt(this,Gn)?.isEnd();const t=pt(this,Gn)?pt(pt(this,Gn),Dn).length:0;return pt(this,Do)===t-1}copyIn(t){typeof t=="string"?this.push(t):this.push(t.clone(this))}clone(t){const i=new Ks(this.type,t);for(const n of pt(this,Dn))i.copyIn(n);return i}static fromGlob(t,i={}){var s;const n=new Ks(null,void 0,i);return dn(s=Ks,qo,Gc).call(s,t,n,0,i),n}toMMPattern(){if(this!==pt(this,is))return pt(this,is).toMMPattern();const t=this.toString(),[i,n,s,l]=this.toRegExpSource();if(!(s||pt(this,bs)||pt(this,Gr).nocase&&!pt(this,Gr).nocaseMagicOnly&&t.toUpperCase()!==t.toLowerCase()))return n;const m=(pt(this,Gr).nocase?"i":"")+(l?"u":"");return Object.assign(new RegExp(`^${i}$`,m),{_src:i,_glob:t})}get options(){return pt(this,Gr)}toRegExpSource(t){const i=t??!!pt(this,Gr).dot;if(pt(this,is)===this&&dn(this,ba,sm).call(this),!this.type){const y=this.isStart()&&this.isEnd(),A=pt(this,Dn).map(_e=>{var Te;const[pe,de,Pe,Le]=typeof _e=="string"?dn(Te=Ks,qo,rm).call(Te,_e,pt(this,bs),y):_e.toRegExpSource(t);return tn(this,bs,pt(this,bs)||Pe),tn(this,lo,pt(this,lo)||Le),pe}).join("");let L="";if(this.isStart()&&typeof pt(this,Dn)[0]=="string"&&!(pt(this,Dn).length===1&&Yb.has(pt(this,Dn)[0]))){const pe=Qb,de=i&&pe.has(A.charAt(0))||A.startsWith("\\.")&&pe.has(A.charAt(2))||A.startsWith("\\.\\.")&&pe.has(A.charAt(4)),Pe=!i&&!t&&pe.has(A.charAt(0));L=de?Gb:Pe?Lc:""}let z="";return this.isEnd()&&pt(pt(this,is),Oo)&&pt(this,Gn)?.type==="!"&&(z="(?:$|\\/)"),[L+A+z,Ll(A),tn(this,bs,!!pt(this,bs)),pt(this,lo)]}const n=this.type==="*"||this.type==="+",s=this.type==="!"?"(?:(?!(?:":"(?:";let l=dn(this,ba,pd).call(this,i);if(this.isStart()&&this.isEnd()&&!l&&this.type!=="!"){const y=this.toString();return tn(this,Dn,[y]),this.type=null,tn(this,bs,void 0),[y,Ll(this.toString()),!1,!1]}let u=!n||t||i||!Lc?"":dn(this,ba,pd).call(this,!0);u===l&&(u=""),u&&(l=`(?:${l})(?:${u})*?`);let m="";if(this.type==="!"&&pt(this,Pl))m=(this.isStart()&&!i?Lc:"")+Hh;else{const y=this.type==="!"?"))"+(this.isStart()&&!i&&!t?Lc:"")+Nh+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&u?")":this.type==="*"&&u?")?":`)${this.type}`;m=s+l+y}return[m,Ll(l),tn(this,bs,!!pt(this,bs)),pt(this,lo)]}};is=new WeakMap,bs=new WeakMap,lo=new WeakMap,Dn=new WeakMap,Gn=new WeakMap,Do=new WeakMap,ga=new WeakMap,Oo=new WeakMap,Gr=new WeakMap,va=new WeakMap,Pl=new WeakMap,ba=new WeakSet,sm=function(){if(this!==pt(this,is))throw new Error("should only call on root");if(pt(this,Oo))return this;this.toString(),tn(this,Oo,!0);let t;for(;t=pt(this,ga).pop();){if(t.type!=="!")continue;let i=t,n=pt(i,Gn);for(;n;){for(let s=pt(i,Do)+1;!n.type&&s<pt(n,Dn).length;s++)for(const l of pt(t,Dn)){if(typeof l=="string")throw new Error("string part in extglob AST??");l.copyIn(pt(n,Dn)[s])}i=n,n=pt(i,Gn)}}return this},qo=new WeakSet,Gc=function(t,i,n,s){var _e,pe;let l=!1,u=!1,m=-1,y=!1;if(i.type===null){let de=n,Pe="";for(;de<t.length;){const Le=t.charAt(de++);if(l||Le==="\\"){l=!l,Pe+=Le;continue}if(u){de===m+1?(Le==="^"||Le==="!")&&(y=!0):Le==="]"&&!(de===m+2&&y)&&(u=!1),Pe+=Le;continue}else if(Le==="["){u=!0,m=de,y=!1,Pe+=Le;continue}if(!s.noext&&Ih(Le)&&t.charAt(de)==="("){i.push(Pe),Pe="";const Te=new Ks(Le,i);de=dn(_e=Ks,qo,Gc).call(_e,t,Te,de,s),i.push(Te);continue}Pe+=Le}return i.push(Pe),de}let A=n+1,L=new Ks(null,i);const z=[];let X="";for(;A<t.length;){const de=t.charAt(A++);if(l||de==="\\"){l=!l,X+=de;continue}if(u){A===m+1?(de==="^"||de==="!")&&(y=!0):de==="]"&&!(A===m+2&&y)&&(u=!1),X+=de;continue}else if(de==="["){u=!0,m=A,y=!1,X+=de;continue}if(Ih(de)&&t.charAt(A)==="("){L.push(X),X="";const Pe=new Ks(de,L);L.push(Pe),A=dn(pe=Ks,qo,Gc).call(pe,t,Pe,A,s);continue}if(de==="|"){L.push(X),X="",z.push(L),L=new Ks(null,i);continue}if(de===")")return X===""&&pt(i,Dn).length===0&&tn(i,Pl,!0),L.push(X),X="",i.push(...z,L),A;X+=de}return i.type=null,tn(i,bs,void 0),tn(i,Dn,[t.substring(n-1)]),A},pd=function(t){return pt(this,Dn).map(i=>{if(typeof i=="string")throw new Error("string type in extglob ast??");const[n,s,l,u]=i.toRegExpSource(t);return tn(this,lo,pt(this,lo)||u),n}).filter(i=>!(this.isStart()&&this.isEnd())||!!i).join("|")},rm=function(t,i,n=!1){let s=!1,l="",u=!1;for(let m=0;m<t.length;m++){const y=t.charAt(m);if(s){s=!1,l+=(Jb.has(y)?"\\":"")+y;continue}if(y==="\\"){m===t.length-1?l+="\\\\":s=!0;continue}if(y==="["){const[A,L,z,X]=Kb(t,m);if(z){l+=A,u=u||L,m+=z-1,i=i||X;continue}}if(y==="*"){n&&t==="*"?l+=Hh:l+=Nh,i=!0;continue}if(y==="?"){l+=sd,i=!0;continue}l+=Zb(y)}return[l,Ll(t),!!i,u]},wn(Ks,qo);let Rc=Ks;const e_=(e,{windowsPathsNoEscape:t=!1}={})=>t?e.replace(/[?*()[\]]/g,"[$&]"):e.replace(/[?*()[\]\\]/g,"\\$&"),Os=(e,t,i={})=>(Tc(t),!i.nocomment&&t.charAt(0)==="#"?!1:new Mc(t,i).match(e)),t_=/^\*+([^+@!?\*\[\(]*)$/,i_=e=>t=>!t.startsWith(".")&&t.endsWith(e),n_=e=>t=>t.endsWith(e),s_=e=>(e=e.toLowerCase(),t=>!t.startsWith(".")&&t.toLowerCase().endsWith(e)),r_=e=>(e=e.toLowerCase(),t=>t.toLowerCase().endsWith(e)),o_=/^\*+\.\*+$/,a_=e=>!e.startsWith(".")&&e.includes("."),l_=e=>e!=="."&&e!==".."&&e.includes("."),c_=/^\.\*+$/,u_=e=>e!=="."&&e!==".."&&e.startsWith("."),d_=/^\*+$/,f_=e=>e.length!==0&&!e.startsWith("."),h_=e=>e.length!==0&&e!=="."&&e!=="..",m_=/^\?+([^+@!?\*\[\(]*)?$/,p_=([e,t=""])=>{const i=Bh([e]);return t?(t=t.toLowerCase(),n=>i(n)&&n.toLowerCase().endsWith(t)):i},g_=([e,t=""])=>{const i=$h([e]);return t?(t=t.toLowerCase(),n=>i(n)&&n.toLowerCase().endsWith(t)):i},v_=([e,t=""])=>{const i=$h([e]);return t?n=>i(n)&&n.endsWith(t):i},b_=([e,t=""])=>{const i=Bh([e]);return t?n=>i(n)&&n.endsWith(t):i},Bh=([e])=>{const t=e.length;return i=>i.length===t&&!i.startsWith(".")},$h=([e])=>{const t=e.length;return i=>i.length===t&&i!=="."&&i!==".."},Uh=typeof process=="object"&&process?typeof process.env=="object"&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix",Vh={win32:{sep:"\\"},posix:{sep:"/"}},__=Uh==="win32"?Vh.win32.sep:Vh.posix.sep;Os.sep=__;const Cr=Symbol("globstar **");Os.GLOBSTAR=Cr;const y_="[^/]"+"*?",w_="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",S_="(?:(?!(?:\\/|^)\\.).)*?",x_=(e,t={})=>i=>Os(i,e,t);Os.filter=x_;const kr=(e,t={})=>Object.assign({},e,t),j_=e=>{if(!e||typeof e!="object"||!Object.keys(e).length)return Os;const t=Os;return Object.assign((n,s,l={})=>t(n,s,kr(e,l)),{Minimatch:class extends t.Minimatch{constructor(s,l={}){super(s,kr(e,l))}static defaults(s){return t.defaults(kr(e,s)).Minimatch}},AST:class extends t.AST{constructor(s,l,u={}){super(s,l,kr(e,u))}static fromGlob(s,l={}){return t.AST.fromGlob(s,kr(e,l))}},unescape:(n,s={})=>t.unescape(n,kr(e,s)),escape:(n,s={})=>t.escape(n,kr(e,s)),filter:(n,s={})=>t.filter(n,kr(e,s)),defaults:n=>t.defaults(kr(e,n)),makeRe:(n,s={})=>t.makeRe(n,kr(e,s)),braceExpand:(n,s={})=>t.braceExpand(n,kr(e,s)),match:(n,s,l={})=>t.match(n,s,kr(e,l)),sep:t.sep,GLOBSTAR:Cr})};Os.defaults=j_;const Wh=(e,t={})=>(Tc(e),t.nobrace||!/\{(?:(?!\{).)*\}/.test(e)?[e]:Ub(e));Os.braceExpand=Wh;const E_=(e,t={})=>new Mc(e,t).makeRe();Os.makeRe=E_;const A_=(e,t,i={})=>{const n=new Mc(t,i);return e=e.filter(s=>n.match(s)),n.options.nonull&&!e.length&&e.push(t),e};Os.match=A_;const zh=/[?*]|[+@!]\(.*?\)|\[|\]/,C_=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&");class Mc{constructor(t,i={}){rs(this,"options");rs(this,"set");rs(this,"pattern");rs(this,"windowsPathsNoEscape");rs(this,"nonegate");rs(this,"negate");rs(this,"comment");rs(this,"empty");rs(this,"preserveMultipleSlashes");rs(this,"partial");rs(this,"globSet");rs(this,"globParts");rs(this,"nocase");rs(this,"isWindows");rs(this,"platform");rs(this,"windowsNoMagicRoot");rs(this,"regexp");Tc(t),i=i||{},this.options=i,this.pattern=t,this.platform=i.platform||Uh,this.isWindows=this.platform==="win32",this.windowsPathsNoEscape=!!i.windowsPathsNoEscape||i.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!i.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!i.nonegate,this.comment=!1,this.empty=!1,this.partial=!!i.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=i.windowsNoMagicRoot!==void 0?i.windowsNoMagicRoot:!!(this.isWindows&&this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(const t of this.set)for(const i of t)if(typeof i!="string")return!0;return!1}debug(...t){}make(){const t=this.pattern,i=this.options;if(!i.nocomment&&t.charAt(0)==="#"){this.comment=!0;return}if(!t){this.empty=!0;return}this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],i.debug&&(this.debug=(...l)=>console.error(...l)),this.debug(this.pattern,this.globSet);const n=this.globSet.map(l=>this.slashSplit(l));this.globParts=this.preprocess(n),this.debug(this.pattern,this.globParts);let s=this.globParts.map((l,u,m)=>{if(this.isWindows&&this.windowsNoMagicRoot){const y=l[0]===""&&l[1]===""&&(l[2]==="?"||!zh.test(l[2]))&&!zh.test(l[3]),A=/^[a-z]:/i.test(l[0]);if(y)return[...l.slice(0,4),...l.slice(4).map(L=>this.parse(L))];if(A)return[l[0],...l.slice(1).map(L=>this.parse(L))]}return l.map(y=>this.parse(y))});if(this.debug(this.pattern,s),this.set=s.filter(l=>l.indexOf(!1)===-1),this.isWindows)for(let l=0;l<this.set.length;l++){const u=this.set[l];u[0]===""&&u[1]===""&&this.globParts[l][2]==="?"&&typeof u[3]=="string"&&/^[a-z]:$/i.test(u[3])&&(u[2]="?")}this.debug(this.pattern,this.set)}preprocess(t){if(this.options.noglobstar)for(let n=0;n<t.length;n++)for(let s=0;s<t[n].length;s++)t[n][s]==="**"&&(t[n][s]="*");const{optimizationLevel:i=1}=this.options;return i>=2?(t=this.firstPhasePreProcess(t),t=this.secondPhasePreProcess(t)):i>=1?t=this.levelOneOptimize(t):t=this.adjascentGlobstarOptimize(t),t}adjascentGlobstarOptimize(t){return t.map(i=>{let n=-1;for(;(n=i.indexOf("**",n+1))!==-1;){let s=n;for(;i[s+1]==="**";)s++;s!==n&&i.splice(n,s-n)}return i})}levelOneOptimize(t){return t.map(i=>(i=i.reduce((n,s)=>{const l=n[n.length-1];return s==="**"&&l==="**"?n:s===".."&&l&&l!==".."&&l!=="."&&l!=="**"?(n.pop(),n):(n.push(s),n)},[]),i.length===0?[""]:i))}levelTwoFileOptimize(t){Array.isArray(t)||(t=this.slashSplit(t));let i=!1;do{if(i=!1,!this.preserveMultipleSlashes){for(let s=1;s<t.length-1;s++){const l=t[s];s===1&&l===""&&t[0]===""||(l==="."||l==="")&&(i=!0,t.splice(s,1),s--)}t[0]==="."&&t.length===2&&(t[1]==="."||t[1]==="")&&(i=!0,t.pop())}let n=0;for(;(n=t.indexOf("..",n+1))!==-1;){const s=t[n-1];s&&s!=="."&&s!==".."&&s!=="**"&&(i=!0,t.splice(n-1,2),n-=2)}}while(i);return t.length===0?[""]:t}firstPhasePreProcess(t){let i=!1;do{i=!1;for(let n of t){let s=-1;for(;(s=n.indexOf("**",s+1))!==-1;){let u=s;for(;n[u+1]==="**";)u++;u>s&&n.splice(s+1,u-s);let m=n[s+1];const y=n[s+2],A=n[s+3];if(m!==".."||!y||y==="."||y===".."||!A||A==="."||A==="..")continue;i=!0,n.splice(s,1);const L=n.slice(0);L[s]="**",t.push(L),s--}if(!this.preserveMultipleSlashes){for(let u=1;u<n.length-1;u++){const m=n[u];u===1&&m===""&&n[0]===""||(m==="."||m==="")&&(i=!0,n.splice(u,1),u--)}n[0]==="."&&n.length===2&&(n[1]==="."||n[1]==="")&&(i=!0,n.pop())}let l=0;for(;(l=n.indexOf("..",l+1))!==-1;){const u=n[l-1];if(u&&u!=="."&&u!==".."&&u!=="**"){i=!0;const y=l===1&&n[l+1]==="**"?["."]:[];n.splice(l-1,2,...y),n.length===0&&n.push(""),l-=2}}}}while(i);return t}secondPhasePreProcess(t){for(let i=0;i<t.length-1;i++)for(let n=i+1;n<t.length;n++){const s=this.partsMatch(t[i],t[n],!this.preserveMultipleSlashes);if(s){t[i]=[],t[n]=s;break}}return t.filter(i=>i.length)}partsMatch(t,i,n=!1){let s=0,l=0,u=[],m="";for(;s<t.length&&l<i.length;)if(t[s]===i[l])u.push(m==="b"?i[l]:t[s]),s++,l++;else if(n&&t[s]==="**"&&i[l]===t[s+1])u.push(t[s]),s++;else if(n&&i[l]==="**"&&t[s]===i[l+1])u.push(i[l]),l++;else if(t[s]==="*"&&i[l]&&(this.options.dot||!i[l].startsWith("."))&&i[l]!=="**"){if(m==="b")return!1;m="a",u.push(t[s]),s++,l++}else if(i[l]==="*"&&t[s]&&(this.options.dot||!t[s].startsWith("."))&&t[s]!=="**"){if(m==="a")return!1;m="b",u.push(i[l]),s++,l++}else return!1;return t.length===i.length&&u}parseNegate(){if(this.nonegate)return;const t=this.pattern;let i=!1,n=0;for(let s=0;s<t.length&&t.charAt(s)==="!";s++)i=!i,n++;n&&(this.pattern=t.slice(n)),this.negate=i}matchOne(t,i,n=!1){const s=this.options;if(this.isWindows){const de=typeof t[0]=="string"&&/^[a-z]:$/i.test(t[0]),Pe=!de&&t[0]===""&&t[1]===""&&t[2]==="?"&&/^[a-z]:$/i.test(t[3]),Le=typeof i[0]=="string"&&/^[a-z]:$/i.test(i[0]),Te=!Le&&i[0]===""&&i[1]===""&&i[2]==="?"&&typeof i[3]=="string"&&/^[a-z]:$/i.test(i[3]),He=Pe?3:de?0:void 0,U=Te?3:Le?0:void 0;if(typeof He=="number"&&typeof U=="number"){const[Se,ze]=[t[He],i[U]];Se.toLowerCase()===ze.toLowerCase()&&(i[U]=Se,U>He?i=i.slice(U):He>U&&(t=t.slice(He)))}}const{optimizationLevel:l=1}=this.options;l>=2&&(t=this.levelTwoFileOptimize(t)),this.debug("matchOne",this,{file:t,pattern:i}),this.debug("matchOne",t.length,i.length);for(var u=0,m=0,y=t.length,A=i.length;u<y&&m<A;u++,m++){this.debug("matchOne loop");var L=i[m],z=t[u];if(this.debug(i,L,z),L===!1)return!1;if(L===Cr){this.debug("GLOBSTAR",[i,L,z]);var X=u,_e=m+1;if(_e===A){for(this.debug("** at the end");u<y;u++)if(t[u]==="."||t[u]===".."||!s.dot&&t[u].charAt(0)===".")return!1;return!0}for(;X<y;){var pe=t[X];if(this.debug(`
DesignScreenshot/output/git.buildapp.eu.org_run/git.buildapp.eu.org_3_credentials_filled.html:455:`)}const r1=["::group::","##[group]"],o1=["::endgroup::","##[endgroup]"];function a1(e){for(const t of r1)if(e.message.startsWith(t))return{name:"group",prefix:t};for(const t of o1)if(e.message.startsWith(t))return{name:"endgroup",prefix:t};return null}function l1(e){const t=e.getBoundingClientRect();return t.top>=0&&t.bottom<=window.innerHeight}function c1(){try{const e=localStorage.getItem("actions-view-options");if(e)return JSON.parse(e)}catch{}return{autoScroll:!0,expandRunning:!1}}var u1=(0,c.pM)({name:"RepoActionView",components:{SvgIcon:Z.Ah,ActionRunStatus:e1},props:{runIndex:{type:String,default:""},jobIndex:{type:String,default:""},actionsURL:{type:String,default:""},locale:{type:Object,default:null}},data(){const{autoScroll:e,expandRunning:t}=c1();return{loadingAbortController:null,intervalID:null,currentJobStepsStates:[],artifacts:[],menuVisible:!1,isFullScreen:!1,timeVisible:{"log-time-stamp":!1,"log-time-seconds":!1},optionAlwaysAutoScroll:e??!1,optionAlwaysExpandRunning:t??!1,run:{link:"",title:"",titleHTML:"",status:"",canCancel:!1,canApprove:!1,canRerun:!1,canDeleteArtifact:!1,done:!1,workflowID:"",workflowLink:"",isSchedule:!1,jobs:[],commit:{localeCommit:"",localePushedBy:"",shortSHA:"",link:"",pusher:{displayName:"",link:""},branch:{name:"",link:"",isDeleted:!1}}},currentJob:{title:"",detail:"",steps:[]}}},watch:{optionAlwaysAutoScroll(){this.saveLocaleStorageOptions()},optionAlwaysExpandRunning(){this.saveLocaleStorageOptions()}},async mounted(){await this.loadJob(),this.intervalID=setInterval(()=>this.loadJob(),1e3),document.body.addEventListener("click",this.closeDropdown),this.hashChangeListener(),window.addEventListener("hashchange",this.hashChangeListener)},beforeUnmount(){document.body.removeEventListener("click",this.closeDropdown),window.removeEventListener("hashchange",this.hashChangeListener)},unmounted(){this.intervalID&&(clearInterval(this.intervalID),this.intervalID=null)},methods:{saveLocaleStorageOptions(){const e={autoScroll:this.optionAlwaysAutoScroll,expandRunning:this.optionAlwaysExpandRunning};localStorage.setItem("actions-view-options",JSON.stringify(e))},getJobStepLogsContainer(e){return this.$refs.logs[e]},getActiveLogsContainer(e){const t=this.getJobStepLogsContainer(e);return t._stepLogsActiveContainer??t},beginLogGroup(e,t,i,n){const s=this.$refs.logs[e],l=(0,C.tw)("summary",{class:"job-log-group-summary"},this.createLogLine(e,t,{index:i.index,timestamp:i.timestamp,message:i.message.substring(n.prefix.length)})),u=(0,C.tw)("div",{class:"job-log-list"}),m=(0,C.tw)("details",{class:"job-log-group"},l,u);s.append(m),s._stepLogsActiveContainer=u},endLogGroup(e,t,i,n){const s=this.$refs.logs[e];s._stepLogsActiveContainer=null,s.append(this.createLogLine(e,t,{index:i.index,timestamp:i.timestamp,message:i.message.substring(n.prefix.length)}))},toggleStepLogs(e){this.currentJobStepsStates[e].expanded=!this.currentJobStepsStates[e].expanded,this.currentJobStepsStates[e].expanded&&this.loadJobForce()},cancelRun(){(0,Ae.LO)(`${this.run.link}/cancel`)},approveRun(){(0,Ae.LO)(`${this.run.link}/approve`)},createLogLine(e,t,i){const n=(0,C.tw)("a",{class:"line-num muted",href:`#jobstep-${e}-${i.index}`},String(i.index)),s=(0,C.tw)("span",{class:"log-time-stamp"},(0,Li.Rt)(new Date(i.timestamp*1e3))),l=(0,C.tw)("span",{class:"log-msg"});l.innerHTML=s1(i.message);const u=Math.floor(i.timestamp-t),m=(0,C.tw)("span",{class:"log-time-seconds"},`${u}s`);return(0,C.oi)(s,this.timeVisible["log-time-stamp"]),(0,C.oi)(m,this.timeVisible["log-time-seconds"]),(0,C.tw)("div",{id:`jobstep-${e}-${i.index}`,class:"job-log-line"},n,s,l,m)},shouldAutoScroll(e){if(!this.optionAlwaysAutoScroll)return!1;const t=this.getJobStepLogsContainer(e);return t.lastChild?l1(t.lastChild):this.currentJobStepsStates[e].expanded},appendLogs(e,t,i){for(const n of i){const s=this.getActiveLogsContainer(e),l=a1(n);if(l?.name==="group"){this.beginLogGroup(e,t,n,l);continue}else if(l?.name==="endgroup"){this.endLogGroup(e,t,n,l);continue}s.append(this.createLogLine(e,t,n))}},async deleteArtifact(e){window.confirm(this.locale.confirmDeleteArtifact.replace("%s",e))&&(await(0,Ae.SJ)(`${this.run.link}/artifacts/${e}`),await this.loadJobForce())},async fetchJobData(e){const t=this.currentJobStepsStates.map((n,s)=>({step:s,cursor:n.cursor,expanded:n.expanded}));return await(await(0,Ae.LO)(`${this.actionsURL}/runs/${this.runIndex}/jobs/${this.jobIndex}`,{signal:e.signal,data:{logCursors:t}})).json()},async loadJobForce(){this.loadingAbortController?.abort(),this.loadingAbortController=null,await this.loadJob()},async loadJob(){if(this.loadingAbortController)return;const e=new AbortController;this.loadingAbortController=e;try{const t=!this.run.status,i=await this.fetchJobData(e);if(this.loadingAbortController!==e)return;this.artifacts=i.artifacts||[],this.run=i.state.run,this.currentJob=i.state.currentJob;for(let l=0;l<this.currentJob.steps.length;l++){const u=t&&this.optionAlwaysExpandRunning&&this.currentJob.steps[l].status==="running";this.currentJobStepsStates[l]||(this.currentJobStepsStates[l]={cursor:null,expanded:u})}const n=new Map;for(const l of i.logs.stepsLog??[])n.has(l.step)||n.set(l.step,this.shouldAutoScroll(l.step));for(const l of i.logs.stepsLog??[])this.currentJobStepsStates[l.step].cursor=l.cursor,this.appendLogs(l.step,l.started,l.lines);let s;for(let l=0;l<this.currentJob.steps.length;l++)n.get(l)&&(s=this.getJobStepLogsContainer(l));s?.lastElementChild.scrollIntoView({behavior:"smooth",block:"nearest"}),this.run.done&&this.intervalID&&(clearInterval(this.intervalID),this.intervalID=null)}catch(t){if(t instanceof TypeError||e.signal.aborted)return;throw t}finally{this.loadingAbortController===e&&(this.loadingAbortController=null)}},isDone(e){return["success","skipped","failure","cancelled"].includes(e)},isExpandable(e){return["success","running","failure","cancelled"].includes(e)},closeDropdown(){this.menuVisible&&(this.menuVisible=!1)},toggleTimeDisplay(e){this.timeVisible[`log-time-${e}`]=!this.timeVisible[`log-time-${e}`];for(const t of this.$refs.steps.querySelectorAll(`.log-time-${e}`))(0,C.oi)(t,this.timeVisible[`log-time-${e}`])},toggleFullScreen(){this.isFullScreen=!this.isFullScreen,(0,St._M)(".action-view-right",this.isFullScreen,".action-view-body")},async hashChangeListener(){const e=window.location.hash;if(!e)return;const[t,i,n]=e.split("-"),s=Number(i);if(!this.currentJobStepsStates[s])return;!this.currentJobStepsStates[s].expanded&&this.currentJobStepsStates[s].cursor===null&&(this.currentJobStepsStates[s].expanded=!0,await this.loadJob());const l=this.$refs.steps.querySelector(e);l&&l.querySelector(".line-num").click()}}}),d1=(0,Xi.A)(u1,[["render",Yw],["__scopeId","data-v-2d8f7d75"]]);function f1(){const e=document.querySelector("#repo-action-view");if(!e)return;const t=document.querySelector("body > div.full.height");t&&(t.style.paddingBottom="0"),Ai(d1,{runIndex:e.getAttribute("data-run-index"),jobIndex:e.getAttribute("data-job-index"),actionsURL:e.getAttribute("data-actions-url"),locale:{approve:e.getAttribute("data-locale-approve"),cancel:e.getAttribute("data-locale-cancel"),rerun:e.getAttribute("data-locale-rerun"),rerun_all:e.getAttribute("data-locale-rerun-all"),scheduled:e.getAttribute("data-locale-runs-scheduled"),commit:e.getAttribute("data-locale-runs-commit"),pushedBy:e.getAttribute("data-locale-runs-pushed-by"),artifactsTitle:e.getAttribute("data-locale-artifacts-title"),areYouSure:e.getAttribute("data-locale-are-you-sure"),artifactExpired:e.getAttribute("data-locale-artifact-expired"),confirmDeleteArtifact:e.getAttribute("data-locale-confirm-delete-artifact"),showTimeStamps:e.getAttribute("data-locale-show-timestamps"),showLogSeconds:e.getAttribute("data-locale-show-log-seconds"),showFullScreen:e.getAttribute("data-locale-show-full-screen"),downloadLogs:e.getAttribute("data-locale-download-logs"),status:{unknown:e.getAttribute("data-locale-status-unknown"),waiting:e.getAttribute("data-locale-status-waiting"),running:e.getAttribute("data-locale-status-running"),success:e.getAttribute("data-locale-status-success"),failure:e.getAttribute("data-locale-status-failure"),cancelled:e.getAttribute("data-locale-status-cancelled"),skipped:e.getAttribute("data-locale-status-skipped"),blocked:e.getAttribute("data-locale-status-blocked")},logsAlwaysAutoScroll:e.getAttribute("data-locale-logs-always-auto-scroll"),logsAlwaysExpandRunning:e.getAttribute("data-locale-logs-always-expand-running")}}).mount(e)}function h1(){const e=document.querySelector(".issue-checkbox-all");if(!e)return;const t=document.querySelectorAll(".issue-checkbox"),i=()=>{const n=Array.from(t).filter(A=>A.checked),s=!!n.length;s&&n.length===t.length?(e.checked=!0,e.indeterminate=!1):s?(e.checked=!1,e.indeterminate=!0):(e.checked=!1,e.indeterminate=!1),(0,C.oi)("#issue-filters",!s),(0,C.oi)("#issue-actions",s);const u=document.querySelectorAll("#issue-filters, #issue-actions");Array.from(u).find(A=>!(0,C.WP)(A)).querySelector(".issue-list-toolbar-left").prepend(e)};for(const n of t)n.addEventListener("change",i);e.addEventListener("change",()=>{for(const n of t)n.checked=e.checked;i()}),(0,C.jB)(document,".issue-action",n=>n.addEventListener("click",async s=>{s.preventDefault();const l=n.getAttribute("data-url");let u=n.getAttribute("data-action"),m=n.getAttribute("data-element-id");const y=[];for(const L of document.querySelectorAll(".issue-checkbox:checked"))y.push(L.getAttribute("data-issue-id"));const A=y.join(",");if(A){if(m==="0"&&l.endsWith("/assignee")&&(m="",u="clear"),u==="toggle"&&s.altKey&&(u="toggle-alt"),u==="delete"){const L=n.getAttribute("data-action-delete-confirm");if(!await Wu({content:L,confirmButtonColor:"red"}))return}try{await ep(l,u,A,m),window.location.reload()}catch(L){gt(L.responseJSON?.error??L.message)}}}))}function Yh(e){let t=e.getAttribute("data-search-url");const i=e.getAttribute("data-action-jump-url");let n=e.getAttribute("data-selected-username")||"";const s=(0,ke.mD)(e),l=e.querySelector(".menu"),u=e.querySelector(".ui.search input"),m=e.querySelector(".menu > .item-from-input");s.dropdown("setting",{fullTextSearch:!0,selectOnKeydown:!1,action:(_e,pe)=>{window.location.href=i.replace("{username}",encodeURIComponent(pe))}});const y=_e=>{(0,C.jB)(l,".item.active, .item.selected",pe=>pe.classList.remove("active","selected")),l.querySelector(`.item[data-value="${CSS.escape(_e)}"]`)?.classList.add("selected")},A=[],L=()=>{const _e=u.value.trim();m.setAttribute("data-value",_e),m.textContent=_e;const pe=!A.length&&_e!=="";(0,C.oi)(m,pe),y(pe?_e:n)};u.value=n,t?(t.includes("?")||(t+="?"),s.dropdown("setting","apiSettings",{cache:!1,url:`${t}&q={query}`,onResponse(_e){A.length=0;for(const pe of _e.results){let de=`<img class="ui avatar tw-align-middle" src="${R(pe.avatar_link)}" aria-hidden="true" alt width="20" height="20"><span class="gt-ellipsis">${R(pe.username)}</span>`;pe.full_name&&(de+=`<span class="search-fullname tw-ml-2">${R(pe.full_name)}</span>`),n.toLowerCase()===pe.username.toLowerCase()&&(n=pe.username),A.push({value:pe.username,name:de})}return _e.results=A,_e}}),s.dropdown("setting","onShow",()=>s.dropdown("filter"," "))):u.addEventListener("input",L);const z={...s.dropdown("internal","setup")},X=s.dropdown("setting","templates");s.dropdown("internal","setup",z),z.menu=function(_e){for(const de of l.querySelectorAll(":scope > .dynamic-item"))de.remove();const pe=X.menu(_e,s.dropdown("setting","fields"),!0,s.dropdown("setting","className"));if(pe){const de=(0,St.a8)(pe,"text/html").querySelectorAll("body > div");for(const Le of de)Le.classList.add("dynamic-item");const Pe=document.createElement("div");Pe.classList.add("divider","dynamic-item"),l.append(Pe,...de)}s.dropdown("refresh"),setTimeout(()=>L(),0)}}function m1(){for(const e of document.querySelectorAll(".issue-card-unpin"))e.addEventListener("click",async t=>{const i=t.currentTarget,n=Number(i.getAttribute("data-issue-id"));(await(0,Ae.SJ)(i.getAttribute("data-unpin-url"))).ok&&(i._tippy.destroy(),i.closest(`div.issue-card[data-issue-id="${n}"]`).remove())})}async function p1(e){const t=e.item.getAttribute("data-move-url"),i=Number(e.item.getAttribute("data-issue-id"));await(0,Ae.LO)(t,{data:{id:i,position:e.newIndex+1}})}async function g1(){const e=document.querySelector("#issue-pins");e!==null&&e.hasAttribute("data-is-repo-admin")&&(m1(),!(e.children.length<2)&&vc(e,{group:"shared",onEnd:t=>{(async()=>await p1(t))()}}))}function v1(){document.querySelector(".page-content.repository.issue-list, .page-content.repository.milestone-issue-list")?(h1(),(0,C.jB)(document,".ui.dropdown.user-remote-search",e=>Yh(e)),g1()):document.querySelector(".page-content.dashboard.issues")&&(0,C.jB)(document,".ui.dropdown.user-remote-search",e=>Yh(e))}const{appSubUrl:b1}=window.config,_1=/^(\d+)$/,y1=/^#(\d+)$/,w1=/^([-.\w]+)\/([-.\w]+)#(\d+)$/;function S1(e,t){t=t.trim();let i="";if(e)_1.test(t)?i=`${e}/issues/${t}`:y1.test(t)&&(i=`${e}/issues/${t.substring(1)}`);else{const[n,s,l,u]=w1.exec(t)||[];s&&(i=`${b1}/${s}/${l}/issues/${u}`)}return i}function x1(){const e=document.querySelector("#issue-list-quick-goto");if(!e)return;const t=e.closest("form"),i=t.querySelector("input[name=q]"),n=e.getAttribute("data-repo-link");t.addEventListener("submit",l=>{let u=!(0,C.WP)(e);const m=(0,C.IU)(l);m!==t&&m!==i&&m!==e&&(u=!1),u&&(l.preventDefault(),window.location.href=e.getAttribute("data-issue-goto-link"))});const s=async()=>{const l=i.value;let u=S1(n,l);u&&(await(0,Ae.fG)(`${u}/info`)).status!==200&&(u=""),i.value===l&&((0,C.oi)(e,!!u),e.setAttribute("data-issue-goto-link",u))};i.addEventListener("input",(0,C.nm)(s)),s()}async function j1(){const e=document.querySelector("#repo-contributors-chart");if(!e)return;const{default:t}=await Promise.all([__webpack_require__.e("contributors-graph-code-frequency-graph-recent-commits-graph"),__webpack_require__.e("contributors-graph")]).then(__webpack_require__.bind(__webpack_require__,"./web_src/js/components/RepoContributors.vue"));try{Ai(t,{repoLink:e.getAttribute("data-repo-link"),repoDefaultBranchName:e.getAttribute("data-repo-default-branch-name"),locale:{filterLabel:e.getAttribute("data-locale-filter-label"),contributionType:{commits:e.getAttribute("data-locale-contribution-type-commits"),additions:e.getAttribute("data-locale-contribution-type-additions"),deletions:e.getAttribute("data-locale-contribution-type-deletions")},loadingTitle:e.getAttribute("data-locale-loading-title"),loadingTitleFailed:e.getAttribute("data-locale-loading-title-failed"),loadingInfo:e.getAttribute("data-locale-loading-info")}}).mount(e)}catch(i){console.error("RepoContributors failed to load",i),e.textContent=e.getAttribute("data-locale-component-failed-to-load")}}async function E1(){const e=document.querySelector("#repo-code-frequency-chart");if(!e)return;const{default:t}=await Promise.all([__webpack_require__.e("contributors-graph-code-frequency-graph-recent-commits-graph"),__webpack_require__.e("code-frequency-graph")]).then(__webpack_require__.bind(__webpack_require__,"./web_src/js/components/RepoCodeFrequency.vue"));try{Ai(t,{locale:{loadingTitle:e.getAttribute("data-locale-loading-title"),loadingTitleFailed:e.getAttribute("data-locale-loading-title-failed"),loadingInfo:e.getAttribute("data-locale-loading-info")}}).mount(e)}catch(i){console.error("RepoCodeFrequency failed to load",i),e.textContent=e.getAttribute("data-locale-component-failed-to-load")}}async function A1(){const e=document.querySelector("#repo-recent-commits-chart");if(!e)return;const{default:t}=await Promise.all([__webpack_require__.e("contributors-graph-code-frequency-graph-recent-commits-graph"),__webpack_require__.e("recent-commits-graph")]).then(__webpack_require__.bind(__webpack_require__,"./web_src/js/components/RepoRecentCommits.vue"));try{Ai(t,{locale:{loadingTitle:e.getAttribute("data-locale-loading-title"),loadingTitleFailed:e.getAttribute("data-locale-loading-title-failed"),loadingInfo:e.getAttribute("data-locale-loading-info")}}).mount(e)}catch(i){console.error("RepoRecentCommits failed to load",i),e.textContent=e.getAttribute("data-locale-component-failed-to-load")}}async function C1(e,t){t.classList.add("disabled");try{const n=await(await(0,Ae.fG)(t.getAttribute("data-fetch-url"))).json();(0,C.y9)(t),k1(e,n.tags),T1(e,n.branches,n.default_branch),(0,C.fi)(e.querySelectorAll(".branch-and-tag-detail"))}finally{t.classList.remove("disabled")}}function k1(e,t){const i=e.querySelector(".tag-area");(0,C.oi)(i.parentElement,t.length>0);for(const n of t)Jh(i,n.web_link,n.name)}function T1(e,t,i){const n=e.getAttribute("data-text-default-branch-tooltip"),s=e.querySelector(".branch-area");(0,C.oi)(s.parentElement,t.length>0);for(const l of t){const u=i===l.name?n:null;Jh(s,l.web_link,l.name,u)}}function Jh(e,t,i,n){const s=document.createElement("a");s.classList.add("muted","tw-px-1"),s.href=t,s.textContent=i,n&&(s.classList.add("tw-border","tw-border-secondary","tw-rounded"),s.setAttribute("data-tooltip-content",n)),e.append(s)}function L1(){for(const e of document.querySelectorAll(".branch-and-tag-area")){const t=e.querySelector(".load-branches-and-tags");t.addEventListener("click",()=>C1(e,t))}}function R1(){const e=document.querySelector("#repo-search-form");e&&e.addEventListener("change",t=>{t.preventDefault();const i=new URLSearchParams;for(const[n,s]of new FormData(e).entries())i.set(n,s.toString());t.target.name==="clear-filter"&&(i.delete("archived"),i.delete("fork"),i.delete("mirror"),i.delete("template"),i.delete("private")),i.delete("clear-filter"),window.location.search=i.toString()})}async function M1(){const e=document.querySelectorAll(".js-color-picker-input");if(e.length){await Promise.all([__webpack_require__.e("colorpicker").then(__webpack_require__.bind(__webpack_require__,"./node_modules/vanilla-colorful/hex-color-picker.js")),__webpack_require__.e("colorpicker").then(__webpack_require__.bind(__webpack_require__,"./web_src/css/features/colorpicker.css"))]);for(const t of e)D1(t)}}function Dc(e,t){e.style.color=/#[0-9a-f]{6}/i.test(t)?t:"transparent"}function Zh(e,t){e.setAttribute("color",t)}function D1(e){const t=e.querySelector("input"),i=document.createElement("div");i.classList.add("preview-square"),Dc(i,t.value),e.append(i);const n=document.createElement("hex-color-picker");n.addEventListener("color-changed",s=>{t.value=s.detail.value,t.focus(),Dc(i,s.detail.value)}),t.addEventListener("input",s=>{Dc(i,s.target.value),Zh(n,s.target.value)}),Ie(t,{trigger:"focus click",theme:"bare",hideOnClick:!0,content:n,placement:"bottom-start",interactive:!0,onShow(){Zh(n,t.value)}});for(const s of e.querySelectorAll(".precolors .color"))s.addEventListener("click",l=>{const u=l.target.getAttribute("data-color-hex");t.value=u,t.dispatchEvent(new Event("input",{bubbles:!0})),Dc(i,u)})}const{appSubUrl:O1}=window.config;async function q1(){const e=document.querySelector("#self-check-by-frontend");if(!e)return;const t=document.querySelector(".page-content.admin .admin-setting-content"),n=await(await(0,Ae.LO)(`${O1}/-/admin/self_check`,{data:new URLSearchParams({location_origin:window.location.origin,now:String(Date.now())})})).json();(0,C.oi)(e,!!n.problems?.length);for(const l of n.problems??[]){const u=document.createElement("div");u.classList.add("ui","warning","message"),u.textContent=l,e.append(u)}const s=!!t.querySelectorAll(".self-check-problem:not(.tw-hidden)").length;(0,C.oi)(t.querySelector(".self-check-no-problem"),!s)}function P1(){for(const e of document.querySelectorAll(".disable-setting"))e.addEventListener("change",t=>{document.querySelector(t.target.getAttribute("data-target")).classList.toggle("disabled",t.target.checked)})}const{appSubUrl:F1,i18n:I1}=window.config;function N1(e){const t=document.createElement("form"),i=document.createElement("input");t.method="post",t.action=`${F1}/-/fetch-redirect`,i.type="hidden",i.name="redirect",i.value=e,t.append(i),document.body.append(t),t.submit()}async function em(e,t,i){try{const n=await(0,Ae.Em)(t,i);if(n.status===200){let{redirect:s}=await n.json();s=s||e.getAttribute("data-redirect"),Ku(e),s?N1(s):window.location.reload();return}else if(n.status>=400&&n.status<500){const s=await n.json();s.errorMessage?gt(s.errorMessage,{useHtmlBody:s.renderFormat==="html"}):gt(`server error: ${n.status}`)}else gt(`server error: ${n.status}`)}catch(n){n.name!=="AbortError"&&(console.error("error when doRequest",n),gt(`${I1.network_error} ${n}`))}e.classList.remove("is-loading","loading-icon-2px")}async function H1(e,t){if(t.preventDefault(),e.classList.contains("is-loading"))return;e.classList.add("is-loading"),e.clientHeight<50&&e.classList.add("loading-icon-2px");const i=e.getAttribute("method")||"get",n=e.getAttribute("action"),s=new FormData(e),l=(0,C.IU)(t),[u,m]=[l?.getAttribute("name"),l?.getAttribute("value")];u&&s.append(u,m||"");let y=n;const A={method:i.toUpperCase(),body:null};if(i.toLowerCase()==="get"){const L=new URLSearchParams;for(const[X,_e]of s)L.append(X,_e.toString());const z=y.indexOf("?");z!==-1&&(y=y.slice(0,z)),y+=`?${L.toString()}`}else A.body=s;await em(e,y,A)}async function B1(e,t){t.preventDefault();const i=e.getAttribute("data-url"),n=async()=>{"disabled"in e&&(e.disabled=!0),await em(e,i,{method:e.getAttribute("data-link-action-method")||"POST"}),"disabled"in e&&(e.disabled=!1)},s=e.getAttribute("data-modal-confirm")||e.getAttribute("data-modal-confirm-content")||"";if(!s){await n();return}const l=e.classList.contains("red")||e.classList.contains("negative");await Wu({header:e.getAttribute("data-modal-confirm-header")||"",content:s,confirmButtonColor:l?"red":"primary"})&&await n()}function $1(){(0,C.ny)(document,"submit",".form-fetch-action",H1),(0,C.ny)(document,"click",".link-action",B1)}function U1(){(0,C.ny)(document,"keypress","div.ui.button, span.ui.button",(e,t)=>{(t.code==="Space"||t.code==="Enter")&&(t.preventDefault(),e.click())})}function V1(){for(const e of document.querySelectorAll(".delete-button"))e.addEventListener("click",t=>{t.preventDefault();const i=e.dataset,n=e.getAttribute("data-modal-id"),s=document.querySelector(`.delete.modal${n?`#${n}`:""}`),l=s.querySelector(".name");l&&(l.textContent=e.getAttribute("data-name"));for(const[u,m]of Object.entries(i))if(u.startsWith("data")){const y=s.querySelector(`.${u}`);y&&(y.textContent=m)}(0,ke.mD)(s).modal({closable:!1,onApprove:async()=>{if(e.getAttribute("data-type")==="form"){const y=e.getAttribute("data-form"),A=document.querySelector(y);if(!A)throw new Error(`no form named ${y} found`);A.submit()}const u=new FormData;for(const[y,A]of Object.entries(i))y.startsWith("data")&&u.append(y.slice(4),A),y==="id"&&u.append("id",A);const m=await(0,Ae.LO)(e.getAttribute("data-url"),{data:u});if(m.ok){const y=await m.json();window.location.href=y.redirect}}}).modal("show")})}function W1(e,t){t.preventDefault();const i=e.getAttribute("data-panel");e.classList.contains("toggle")?(0,C.oi)(i):(0,C.fi)(i)}function z1(e,t){t.preventDefault();let i=e.getAttribute("data-panel");if(i){(0,C.y9)(i);return}if(i=e.getAttribute("data-panel-closest"),i){(0,C.y9)(e.parentNode.closest(i));return}throw new Error("no panel to hide")}function K1(e,t,i){const n=(0,W.PT)(t),s=e[n];if(typeof s=="boolean")e[n]=i==="true";else if(typeof s=="number")e[n]=parseFloat(i);else if(typeof s=="string")e[n]=i;else if(s?.nodeName)e.setAttribute(t,i);else throw new Error(`cannot assign element property "${n}" by value "${i}"`)}function X1(e,t){t.preventDefault();const i=e.getAttribute("data-modal"),n=document.querySelector(i);if(!n)throw new Error("no modal for this action");const s="data-modal-";for(const l of e.attributes){if(!l.name.startsWith(s))continue;const u=l.name.substring(s.length),[m,y]=u.split("."),A=n.querySelector(`#${m}`)||n.querySelector(`[name=${m}]`)||n.querySelector(`.${m}`)||n.querySelector(`${m}`);if(!A){if(!window.config.runModeIsProd)throw new Error(`attr target "${u}" not found for modal`);continue}y?K1(A,y,l.value):A.matches("input, textarea")?A.value=l.value:A.textContent=l.value}(0,ke.mD)(n).modal("setting",{onApprove:()=>{if(n.querySelector(".form-fetch-action"))return!1}}).modal("show")}function G1(){(0,C.ny)(document,"click","form button.ui.cancel.button",(e,t)=>t.preventDefault()),(0,C.ny)(document,"click",".show-panel, .hide-panel, .show-modal",(e,t)=>{e.classList.contains("show-panel")?W1(e,t):e.classList.contains("hide-panel")?z1(e,t):e.classList.contains("show-modal")&&X1(e,t)})}function Q1(){s0(window.jQuery),document.querySelector(".page-content.user.signin")||zu("form:not(.ignore-dirty)")}function Y1(){document.addEventListener("keydown",e=>{if(e.key!=="Enter")return;(e.ctrlKey||e.metaKey)&&!e.altKey&&e.target.matches("textarea")?kc(e.target)&&e.preventDefault():e.target.matches("input")&&!e.target.closest("form")&&kc(e.target)&&e.preventDefault()})}function J1(){(0,C.jB)(document,".combo-markdown-editor:not(.custom-init)",e=>ma(e))}var Z1=Object.defineProperty,e5=(e,t,i)=>t in e?Z1(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i,t5=(e,t,i)=>e5(e,typeof t!="symbol"?t+"":t,i);class i5{constructor(){t5(this,"results",[])}recordCall(t,i){const n=performance.now();i(),this.results.push({name:t,dur:performance.now()-n})}printResults(){this.results=this.results.sort((t,i)=>i.dur-t.dur);for(let t=0;t<20&&t<this.results.length;t++)console.info(`performance trace: ${this.results[t].name} ${this.results[t].dur.toFixed(3)}`)}}function n5(e){const t=window.location.search.includes("_ui_performance_trace=1")?new i5:null;if(t)for(const i of e)t.recordCall(i.name,i);else for(const i of e)i();return t}const s5=["title"],r5={class:"item-content"},o5=["innerHTML"],a5={class:"gt-ellipsis tw-flex-1"},l5=["title"],c5={class:"item-content"},u5=["innerHTML"],d5={class:"gt-ellipsis tw-flex-1"},f5=["title"],h5={class:"item-content"},m5=["innerHTML"],p5={class:"gt-ellipsis tw-flex-1"},g5=["title"],v5={class:"item-toggle"},b5={class:"item-content"},_5=["innerHTML"],y5={class:"gt-ellipsis"},w5={key:4,class:"sub-items"};var S5=(0,c.pM)({__name:"ViewFileTreeItem",props:{item:{},navigateViewContent:{type:Function},loadChildren:{type:Function},selectedItem:{}},setup(e){const t=e,i=(0,Re.KR)(!1),n=(0,Re.KR)(t.item.children),s=(0,Re.KR)(!t.item.children),l=async()=>{if(s.value=!s.value,!s.value&&t.loadChildren){i.value=!0;try{n.value=await t.loadChildren(t.item.fullPath)}finally{i.value=!1}}},u=()=>{l(),t.navigateViewContent(t.item.fullPath)},m=()=>{t.navigateViewContent(t.item.fullPath)},y=()=>{location.href=t.item.submoduleUrl};return(A,L)=>{const z=(0,c.g2)("ViewFileTreeItem",!0);return(0,c.uX)(),(0,c.CE)(c.FK,null,[A.item.entryMode==="commit"?((0,c.uX)(),(0,c.CE)("div",{key:0,class:"tree-item type-submodule",title:A.item.entryName,onClick:Di(y,["stop"])},[(0,c.Q3)(" submodule "),(0,c.Lk)("div",r5,[(0,c.Q3)(" eslint-disable-next-line vue/no-v-html "),(0,c.Lk)("span",{class:"tw-contents",innerHTML:A.item.entryIcon},null,8,o5),(0,c.Lk)("span",a5,(0,W.v_)(A.item.entryName),1)])],8,s5)):A.item.entryMode==="symlink"?((0,c.uX)(),(0,c.CE)("div",{key:1,class:(0,W.C4)(["tree-item type-symlink",{selected:A.selectedItem===A.item.fullPath}]),title:A.item.entryName,onClick:Di(m,["stop"])},[(0,c.Q3)(" symlink "),(0,c.Lk)("div",c5,[(0,c.Q3)(" eslint-disable-next-line vue/no-v-html "),(0,c.Lk)("span",{class:"tw-contents",innerHTML:A.item.entryIcon},null,8,u5),(0,c.Lk)("span",d5,(0,W.v_)(A.item.entryName),1)])],10,l5)):A.item.entryMode!=="tree"?((0,c.uX)(),(0,c.CE)("div",{key:2,class:(0,W.C4)(["tree-item type-file",{selected:A.selectedItem===A.item.fullPath}]),title:A.item.entryName,onClick:Di(m,["stop"])},[(0,c.Q3)(" file "),(0,c.Lk)("div",h5,[(0,c.Q3)(" eslint-disable-next-line vue/no-v-html "),(0,c.Lk)("span",{class:"tw-contents",innerHTML:A.item.entryIcon},null,8,m5),(0,c.Lk)("span",p5,(0,W.v_)(A.item.entryName),1)])],10,f5)):((0,c.uX)(),(0,c.CE)("div",{key:3,class:(0,W.C4)(["tree-item type-directory",{selected:A.selectedItem===A.item.fullPath}]),title:A.item.entryName,onClick:Di(u,["stop"])},[(0,c.Q3)(" directory "),(0,c.Lk)("div",v5,[i.value?((0,c.uX)(),(0,c.Wv)((0,Re.R1)(Z.Ah),{key:0,name:"octicon-sync",class:"circular-spin"})):((0,c.uX)(),(0,c.Wv)((0,Re.R1)(Z.Ah),{key:1,name:s.value?"octicon-chevron-right":"octicon-chevron-down",onClick:Di(l,["stop"])},null,8,["name"]))]),(0,c.Lk)("div",b5,[(0,c.Q3)(" eslint-disable-next-line vue/no-v-html "),(0,c.Lk)("span",{class:"tw-contents",innerHTML:!s.value&&A.item.entryIconOpen?A.item.entryIconOpen:A.item.entryIcon},null,8,_5),(0,c.Lk)("span",y5,(0,W.v_)(A.item.entryName),1)])],10,g5)),n.value?.length?(0,c.bo)(((0,c.uX)(),(0,c.CE)("div",w5,[((0,c.uX)(!0),(0,c.CE)(c.FK,null,(0,c.pI)(n.value,X=>((0,c.uX)(),(0,c.Wv)(z,{key:X.entryName,item:X,"selected-item":A.selectedItem,"navigate-view-content":A.navigateViewContent,"load-children":A.loadChildren},null,8,["item","selected-item","navigate-view-content","load-children"]))),128))],512)),[[ti,!s.value]]):(0,c.Q3)("v-if",!0)],64)}}}),x5=(0,Xi.A)(S5,[["__scopeId","data-v-cbbebcae"]]),j5=(0,c.pM)({__name:"ViewFileTree",props:{repoLink:{type:String,required:!0},treePath:{type:String,required:!0},currentRefNameSubURL:{type:String,required:!0}},setup(e){const t=(0,Re.KR)(null),i=e,n=(0,Re.KR)([]),s=(0,Re.KR)("");async function l(y,A=""){const z=await(await(0,Ae.fG)(`${i.repoLink}/tree-view/${i.currentRefNameSubURL}/${(0,pr.ZP)(y)}?sub_path=${encodeURIComponent(A)}`)).json(),X=[];for(const[_e,pe]of Object.entries(z.renderedIconPool??{}))document.querySelector(`.global-svg-icon-pool #${_e}`)||X.push(pe);if(X.length){const _e=(0,C.SL)('<div class="global-svg-icon-pool tw-hidden"></div>');_e.innerHTML=X.join(""),document.body.append(_e)}return z.fileTreeNodes??null}async function u(y){y=y.includes("?")?y.replace("?","?only_content=true"):`${y}?only_content=true`;const A=await(0,Ae.fG)(y);document.querySelector(".repo-view-content").innerHTML=await A.text()}async function m(y){const A=`${i.repoLink}/src/${i.currentRefNameSubURL}/${(0,pr.ZP)(y)}`;window.history.pushState({treePath:y,url:A},null,A),s.value=y,await u(A)}return(0,c.sV)(async()=>{s.value=i.treePath,n.value=await l("",i.treePath),t.value.closest(".is-loading")?.classList?.remove("is-loading"),window.addEventListener("popstate",y=>{s.value=y.state?.treePath||"",y.state?.url&&u(y.state.url)})}),(y,A)=>((0,c.uX)(),(0,c.CE)("div",{class:"view-file-tree-items",ref_key:"elRoot",ref:t},[(0,c.Q3)(" only render the tree if we're visible. in many cases this is something that doesn't change very often "),((0,c.uX)(!0),(0,c.CE)(c.FK,null,(0,c.pI)(n.value,L=>((0,c.uX)(),(0,c.Wv)(x5,{key:L.name,item:L,"selected-item":s.value,"navigate-view-content":m,"load-children":l},null,8,["item","selected-item"]))),128))],512))}}),E5=(0,Xi.A)(j5,[["__scopeId","data-v-20c25596"]]);const{appSubUrl:A5}=window.config;async function C5(e){const t=document.querySelector(".repo-view-file-tree-toggle-show"),i=document.querySelector(".repo-view-file-tree-container"),n=e.getAttribute("data-toggle-action")==="show";(0,C.oi)(i,n),(0,C.oi)(t,!n),i.hasAttribute("data-user-is-signed-in")&&await(0,Ae.LO)(`${A5}/user/settings/update_preferences`,{data:{codeViewShowFileTree:n}})}async function k5(){const e=document.querySelector(".repo-view-file-tree-container"),t=document.querySelector(".repo-view-content");if(!e||!t)return;_c("click","onRepoViewFileTreeToggle",C5);const i=e.querySelector("#view-file-tree");Ai(E5,{repoLink:i.getAttribute("data-repo-link"),treePath:i.getAttribute("data-tree-path"),currentRefNameSubURL:i.getAttribute("data-current-ref-name-sub-url")}).mount(i)}Pb(),(0,C.Gz)(),(0,C.Pm)(()=>{const e=performance.now(),t=n5([Yp,Gp,Qp,$1,Ot,U1,G1,ui,Y1,Q1,J1,V1,Zp,yb,x1,db,pb,fb,Kp,Xp,jl,gm,Ld,pp,Up,J0,Ep,cp,Mp,ew,z0,dp,hp,q1,Pi,_p,Kd,Zv,Qm,Gm,gb,Y0,Jy,$0,L1,a0,he,tf,v1,k0,A0,ip,ev,lp,R0,D0,ob,ab,V0,k5,Ib,Zy,f1,R1,j1,E1,A1,U0,tw,tg,ig,eb,sb,Z0,Gv,Vp,M1,P1]);$p(t),t&&t.printResults();const i=performance.now()-e;i>500&&console.error(`slow init functions took ${i.toFixed(3)}ms`)})}(),function(){"use strict"}(),function(){"use strict"}(),function(){"use strict"}()})();
DesignScreenshot/output/git.buildapp.eu.org_run/git.buildapp.eu.org_1_initial_page.html:202:`)}function j(qe){if(Ke(qe)){const bt={};for(let Rt=0;Rt<qe.length;Rt++){const Yt=qe[Rt],Ui=W(Yt)?De(Yt):j(Yt);if(Ui)for(const Bi in Ui)bt[Bi]=Ui[Bi]}return bt}else if(W(qe)||tt(qe))return qe}const H=/;(?![^(]*\))/g,ge=/:([^]+)/,me=/\/\*[^]*?\*\//g;function De(qe){const bt={};return qe.replace(me,"").split(H).forEach(Rt=>{if(Rt){const Yt=Rt.split(ge);Yt.length>1&&(bt[Yt[0].trim()]=Yt[1].trim())}}),bt}function ht(qe){if(!qe)return"";if(W(qe))return qe;let bt="";for(const Rt in qe){const Yt=qe[Rt];if(W(Yt)||typeof Yt=="number"){const Ui=Rt.startsWith("--")?Rt:Y(Rt);bt+=`${Ui}:${Yt};`}}return bt}function rt(qe){let bt="";if(W(qe))bt=qe;else if(Ke(qe))for(let Rt=0;Rt<qe.length;Rt++){const Yt=rt(qe[Rt]);Yt&&(bt+=Yt+" ")}else if(tt(qe))for(const Rt in qe)qe[Rt]&&(bt+=Rt+" ");return bt.trim()}function zt(qe){if(!qe)return null;let{class:bt,style:Rt}=qe;return bt&&!W(bt)&&(qe.class=rt(bt)),Rt&&(qe.style=j(Rt)),qe}const fi="html,body,base,head,link,meta,style,title,address,article,aside,footer,header,hgroup,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot",vi="svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,feDistantLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,text,textPath,title,tspan,unknown,use,view",nn="annotation,annotation-xml,maction,maligngroup,malignmark,math,menclose,merror,mfenced,mfrac,mfraction,mglyph,mi,mlabeledtr,mlongdiv,mmultiscripts,mn,mo,mover,mpadded,mphantom,mprescripts,mroot,mrow,ms,mscarries,mscarry,msgroup,msline,mspace,msqrt,msrow,mstack,mstyle,msub,msubsup,msup,mtable,mtd,mtext,mtr,munder,munderover,none,semantics",on="area,base,br,col,embed,hr,img,input,link,meta,param,source,track,wbr",an=null,bn=null,ln=null,Yi=null,Fn="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",vr=_(Fn),Ln=_(Fn+",async,autofocus,autoplay,controls,default,defer,disabled,hidden,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected");function Gs(qe){return!!qe||qe===""}const js=/[>/="'\u0009\u000a\u000c\u0020]/,os={};function Es(qe){if(os.hasOwnProperty(qe))return os[qe];const bt=js.test(qe);return bt&&console.error(`unsafe attribute name: ${qe}`),os[qe]=!bt}const qs={acceptCharset:"accept-charset",className:"class",htmlFor:"for",httpEquiv:"http-equiv"},As=null,Ys=null,On=null;function Tn(qe){if(qe==null)return!1;const bt=typeof qe;return bt==="string"||bt==="number"||bt==="boolean"}const jn=/["'&<>]/;function hn(qe){const bt=""+qe,Rt=jn.exec(bt);if(!Rt)return bt;let Yt="",Ui,Bi,An=0;for(Bi=Rt.index;Bi<bt.length;Bi++){switch(bt.charCodeAt(Bi)){case 34:Ui="&quot;";break;case 38:Ui="&amp;";break;case 39:Ui="&#39;";break;case 60:Ui="&lt;";break;case 62:Ui="&gt;";break;default:continue}An!==Bi&&(Yt+=bt.slice(An,Bi)),An=Bi+1,Yt+=Ui}return An!==Bi?Yt+bt.slice(An,Bi):Yt}const Ji=/^-?>|<!--|-->|--!>|<!-$/g;function sn(qe){return qe.replace(Ji,"")}const mn=/[ !"#$%&'()*+,./:;<=>?@[\\\]^`{|}~]/g;function mi(qe,bt){return qe.replace(mn,Rt=>bt?Rt==='"'?'\\\\\\"':`\\\\${Rt}`:`\\${Rt}`)}function Js(qe,bt){if(qe.length!==bt.length)return!1;let Rt=!0;for(let Yt=0;Rt&&Yt<qe.length;Yt++)Rt=Ri(qe[Yt],bt[Yt]);return Rt}function Ri(qe,bt){if(qe===bt)return!0;let Rt=q(qe),Yt=q(bt);if(Rt||Yt)return Rt&&Yt?qe.getTime()===bt.getTime():!1;if(Rt=Re(qe),Yt=Re(bt),Rt||Yt)return qe===bt;if(Rt=Ke(qe),Yt=Ke(bt),Rt||Yt)return Rt&&Yt?Js(qe,bt):!1;if(Rt=tt(qe),Yt=tt(bt),Rt||Yt){if(!Rt||!Yt)return!1;const Ui=Object.keys(qe).length,Bi=Object.keys(bt).length;if(Ui!==Bi)return!1;for(const An in qe){const cn=qe.hasOwnProperty(An),pn=bt.hasOwnProperty(An);if(cn&&!pn||!cn&&pn||!Ri(qe[An],bt[An]))return!1}}return String(qe)===String(bt)}function Rr(qe,bt){return qe.findIndex(Rt=>Ri(Rt,bt))}const En=qe=>!!(qe&&qe.__v_isRef===!0),Mr=qe=>W(qe)?qe:qe==null?"":Ke(qe)||tt(qe)&&(qe.toString===et||!c(qe.toString))?En(qe)?Mr(qe.value):JSON.stringify(qe,Ps,2):String(qe),Ps=(qe,bt)=>En(bt)?Ps(qe,bt.value):At(bt)?{[`Map(${bt.size})`]:[...bt.entries()].reduce((Rt,[Yt,Ui],Bi)=>(Rt[br(Yt,Bi)+" =>"]=Ui,Rt),{})}:gt(bt)?{[`Set(${bt.size})`]:[...bt.values()].map(Rt=>br(Rt))}:Re(bt)?br(bt):tt(bt)&&!Ke(bt)&&!si(bt)?String(bt):bt,br=(qe,bt="")=>{var Rt;return Re(qe)?`Symbol(${(Rt=qe.description)!=null?Rt:bt})`:qe}},"./node_modules/balanced-match/index.js":function(r){"use strict";r.exports=v;function v(g,O,R){g instanceof RegExp&&(g=b(g,R)),O instanceof RegExp&&(O=b(O,R));var J=_(g,O,R);return J&&{start:J[0],end:J[1],pre:R.slice(0,J[0]),body:R.slice(J[0]+g.length,J[1]),post:R.slice(J[1]+O.length)}}function b(g,O){var R=O.match(g);return R?R[0]:null}v.range=_;function _(g,O,R){var J,Z,C,we,Be,Ue=R.indexOf(g),Q=R.indexOf(O,Ue+1),Ke=Ue;if(Ue>=0&&Q>0){if(g===O)return[Ue,Q];for(J=[],C=R.length;Ke>=0&&!Be;)Ke==Ue?(J.push(Ke),Ue=R.indexOf(g,Ke+1)):J.length==1?Be=[J.pop(),Q]:(Z=J.pop(),Z<C&&(C=Z,we=Q),Q=R.indexOf(O,Ke+1)),Ke=Ue<Q&&Ue>=0?Ue:Q;J.length&&(Be=[C,we])}return Be}},"./node_modules/brace-expansion/index.js":function(r,v,b){var _=b("./node_modules/balanced-match/index.js");r.exports=Q;var g="\0SLASH"+Math.random()+"\0",O="\0OPEN"+Math.random()+"\0",R="\0CLOSE"+Math.random()+"\0",J="\0COMMA"+Math.random()+"\0",Z="\0PERIOD"+Math.random()+"\0";function C(c){return parseInt(c,10)==c?parseInt(c,10):c.charCodeAt(0)}function we(c){return c.split("\\\\").join(g).split("\\{").join(O).split("\\}").join(R).split("\\,").join(J).split("\\.").join(Z)}function Be(c){return c.split(g).join("\\").split(O).join("{").split(R).join("}").split(J).join(",").split(Z).join(".")}function Ue(c){if(!c)return[""];var W=[],Re=_("{","}",c);if(!Re)return c.split(",");var tt=Re.pre,st=Re.body,et=Re.post,je=tt.split(",");je[je.length-1]+="{"+st+"}";var S=Ue(et);return et.length&&(je[je.length-1]+=S.shift(),je.push.apply(je,S)),W.push.apply(W,je),W}function Q(c){return c?(c.substr(0,2)==="{}"&&(c="\\{\\}"+c.substr(2)),ne(we(c),!0).map(Be)):[]}function Ke(c){return"{"+c+"}"}function At(c){return/^-?0\d/.test(c)}function gt(c,W){return c<=W}function q(c,W){return c>=W}function ne(c,W){var Re=[],tt=_("{","}",c);if(!tt)return[c];var st=tt.pre,et=tt.post.length?ne(tt.post,!1):[""];if(/\$$/.test(tt.pre))for(var je=0;je<et.length;je++){var S=st+"{"+tt.body+"}"+et[je];Re.push(S)}else{var si=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(tt.body),ct=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(tt.body),xt=si||ct,ce=tt.body.indexOf(",")>=0;if(!xt&&!ce)return tt.post.match(/,.*\}/)?(c=tt.pre+"{"+tt.body+R+tt.post,ne(c)):[c];var G;if(xt)G=tt.body.split(/\.\./);else if(G=Ue(tt.body),G.length===1&&(G=ne(G[0],!1).map(Ke),G.length===1))return et.map(function(te){return tt.pre+G[0]+te});var P;if(xt){var k=C(G[0]),N=C(G[1]),Y=Math.max(G[0].length,G[1].length),ve=G.length==3?Math.abs(C(G[2])):1,Oe=gt,Ne=N<k;Ne&&(ve*=-1,Oe=q);var Ve=G.some(At);P=[];for(var Ye=k;Oe(Ye,N);Ye+=ve){var Lt;if(ct)Lt=String.fromCharCode(Ye),Lt==="\\"&&(Lt="");else if(Lt=String(Ye),Ve){var K=Y-Lt.length;if(K>0){var Ee=new Array(K+1).join("0");Ye<0?Lt="-"+Ee+Lt.slice(1):Lt=Ee+Lt}}P.push(Lt)}}else{P=[];for(var nt=0;nt<G.length;nt++)P.push.apply(P,ne(G[nt],!1))}for(var nt=0;nt<P.length;nt++)for(var je=0;je<et.length;je++){var S=st+P[nt]+et[je];(!W||xt||S)&&Re.push(S)}}return Re}},"./node_modules/dayjs/dayjs.min.js":function(r){(function(v,b){r.exports=b()})(this,function(){"use strict";var v=1e3,b=6e4,_=36e5,g="millisecond",O="second",R="minute",J="hour",Z="day",C="week",we="month",Be="quarter",Ue="year",Q="date",Ke="Invalid Date",At=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,gt=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,q={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(xt){var ce=["th","st","nd","rd"],G=xt%100;return"["+xt+(ce[(G-20)%10]||ce[G]||ce[0])+"]"}},ne=function(xt,ce,G){var P=String(xt);return!P||P.length>=ce?xt:""+Array(ce+1-P.length).join(G)+xt},c={s:ne,z:function(xt){var ce=-xt.utcOffset(),G=Math.abs(ce),P=Math.floor(G/60),k=G%60;return(ce<=0?"+":"-")+ne(P,2,"0")+":"+ne(k,2,"0")},m:function xt(ce,G){if(ce.date()<G.date())return-xt(G,ce);var P=12*(G.year()-ce.year())+(G.month()-ce.month()),k=ce.clone().add(P,we),N=G-k<0,Y=ce.clone().add(P+(N?-1:1),we);return+(-(P+(G-k)/(N?k-Y:Y-k))||0)},a:function(xt){return xt<0?Math.ceil(xt)||0:Math.floor(xt)},p:function(xt){return{M:we,y:Ue,w:C,d:Z,D:Q,h:J,m:R,s:O,ms:g,Q:Be}[xt]||String(xt||"").toLowerCase().replace(/s$/,"")},u:function(xt){return xt===void 0}},W="en",Re={};Re[W]=q;var tt="$isDayjsObject",st=function(xt){return xt instanceof si||!(!xt||!xt[tt])},et=function xt(ce,G,P){var k;if(!ce)return W;if(typeof ce=="string"){var N=ce.toLowerCase();Re[N]&&(k=N),G&&(Re[N]=G,k=N);var Y=ce.split("-");if(!k&&Y.length>1)return xt(Y[0])}else{var ve=ce.name;Re[ve]=ce,k=ve}return!P&&k&&(W=k),k||!P&&W},je=function(xt,ce){if(st(xt))return xt.clone();var G=typeof ce=="object"?ce:{};return G.date=xt,G.args=arguments,new si(G)},S=c;S.l=et,S.i=st,S.w=function(xt,ce){return je(xt,{locale:ce.$L,utc:ce.$u,x:ce.$x,$offset:ce.$offset})};var si=function(){function xt(G){this.$L=et(G.locale,null,!0),this.parse(G),this.$x=this.$x||G.x||{},this[tt]=!0}var ce=xt.prototype;return ce.parse=function(G){this.$d=function(P){var k=P.date,N=P.utc;if(k===null)return new Date(NaN);if(S.u(k))return new Date;if(k instanceof Date)return new Date(k);if(typeof k=="string"&&!/Z$/i.test(k)){var Y=k.match(At);if(Y){var ve=Y[2]-1||0,Oe=(Y[7]||"0").substring(0,3);return N?new Date(Date.UTC(Y[1],ve,Y[3]||1,Y[4]||0,Y[5]||0,Y[6]||0,Oe)):new Date(Y[1],ve,Y[3]||1,Y[4]||0,Y[5]||0,Y[6]||0,Oe)}}return new Date(k)}(G),this.init()},ce.init=function(){var G=this.$d;this.$y=G.getFullYear(),this.$M=G.getMonth(),this.$D=G.getDate(),this.$W=G.getDay(),this.$H=G.getHours(),this.$m=G.getMinutes(),this.$s=G.getSeconds(),this.$ms=G.getMilliseconds()},ce.$utils=function(){return S},ce.isValid=function(){return this.$d.toString()!==Ke},ce.isSame=function(G,P){var k=je(G);return this.startOf(P)<=k&&k<=this.endOf(P)},ce.isAfter=function(G,P){return je(G)<this.startOf(P)},ce.isBefore=function(G,P){return this.endOf(P)<je(G)},ce.$g=function(G,P,k){return S.u(G)?this[P]:this.set(k,G)},ce.unix=function(){return Math.floor(this.valueOf()/1e3)},ce.valueOf=function(){return this.$d.getTime()},ce.startOf=function(G,P){var k=this,N=!!S.u(P)||P,Y=S.p(G),ve=function(nt,te){var ee=S.w(k.$u?Date.UTC(k.$y,te,nt):new Date(k.$y,te,nt),k);return N?ee:ee.endOf(Z)},Oe=function(nt,te){return S.w(k.toDate()[nt].apply(k.toDate("s"),(N?[0,0,0,0]:[23,59,59,999]).slice(te)),k)},Ne=this.$W,Ve=this.$M,Ye=this.$D,Lt="set"+(this.$u?"UTC":"");switch(Y){case Ue:return N?ve(1,0):ve(31,11);case we:return N?ve(1,Ve):ve(0,Ve+1);case C:var K=this.$locale().weekStart||0,Ee=(Ne<K?Ne+7:Ne)-K;return ve(N?Ye-Ee:Ye+(6-Ee),Ve);case Z:case Q:return Oe(Lt+"Hours",0);case J:return Oe(Lt+"Minutes",1);case R:return Oe(Lt+"Seconds",2);case O:return Oe(Lt+"Milliseconds",3);default:return this.clone()}},ce.endOf=function(G){return this.startOf(G,!1)},ce.$set=function(G,P){var k,N=S.p(G),Y="set"+(this.$u?"UTC":""),ve=(k={},k[Z]=Y+"Date",k[Q]=Y+"Date",k[we]=Y+"Month",k[Ue]=Y+"FullYear",k[J]=Y+"Hours",k[R]=Y+"Minutes",k[O]=Y+"Seconds",k[g]=Y+"Milliseconds",k)[N],Oe=N===Z?this.$D+(P-this.$W):P;if(N===we||N===Ue){var Ne=this.clone().set(Q,1);Ne.$d[ve](Oe),Ne.init(),this.$d=Ne.set(Q,Math.min(this.$D,Ne.daysInMonth())).$d}else ve&&this.$d[ve](Oe);return this.init(),this},ce.set=function(G,P){return this.clone().$set(G,P)},ce.get=function(G){return this[S.p(G)]()},ce.add=function(G,P){var k,N=this;G=Number(G);var Y=S.p(P),ve=function(Ve){var Ye=je(N);return S.w(Ye.date(Ye.date()+Math.round(Ve*G)),N)};if(Y===we)return this.set(we,this.$M+G);if(Y===Ue)return this.set(Ue,this.$y+G);if(Y===Z)return ve(1);if(Y===C)return ve(7);var Oe=(k={},k[R]=b,k[J]=_,k[O]=v,k)[Y]||1,Ne=this.$d.getTime()+G*Oe;return S.w(Ne,this)},ce.subtract=function(G,P){return this.add(-1*G,P)},ce.format=function(G){var P=this,k=this.$locale();if(!this.isValid())return k.invalidDate||Ke;var N=G||"YYYY-MM-DDTHH:mm:ssZ",Y=S.z(this),ve=this.$H,Oe=this.$m,Ne=this.$M,Ve=k.weekdays,Ye=k.months,Lt=k.meridiem,K=function(te,ee,oe,Ge){return te&&(te[ee]||te(P,N))||oe[ee].slice(0,Ge)},Ee=function(te){return S.s(ve%12||12,te,"0")},nt=Lt||function(te,ee,oe){var Ge=te<12?"AM":"PM";return oe?Ge.toLowerCase():Ge};return N.replace(gt,function(te,ee){return ee||function(oe){switch(oe){case"YY":return String(P.$y).slice(-2);case"YYYY":return S.s(P.$y,4,"0");case"M":return Ne+1;case"MM":return S.s(Ne+1,2,"0");case"MMM":return K(k.monthsShort,Ne,Ye,3);case"MMMM":return K(Ye,Ne);case"D":return P.$D;case"DD":return S.s(P.$D,2,"0");case"d":return String(P.$W);case"dd":return K(k.weekdaysMin,P.$W,Ve,2);case"ddd":return K(k.weekdaysShort,P.$W,Ve,3);case"dddd":return Ve[P.$W];case"H":return String(ve);case"HH":return S.s(ve,2,"0");case"h":return Ee(1);case"hh":return Ee(2);case"a":return nt(ve,Oe,!0);case"A":return nt(ve,Oe,!1);case"m":return String(Oe);case"mm":return S.s(Oe,2,"0");case"s":return String(P.$s);case"ss":return S.s(P.$s,2,"0");case"SSS":return S.s(P.$ms,3,"0");case"Z":return Y}return null}(te)||Y.replace(":","")})},ce.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},ce.diff=function(G,P,k){var N,Y=this,ve=S.p(P),Oe=je(G),Ne=(Oe.utcOffset()-this.utcOffset())*b,Ve=this-Oe,Ye=function(){return S.m(Y,Oe)};switch(ve){case Ue:N=Ye()/12;break;case we:N=Ye();break;case Be:N=Ye()/3;break;case C:N=(Ve-Ne)/6048e5;break;case Z:N=(Ve-Ne)/864e5;break;case J:N=Ve/_;break;case R:N=Ve/b;break;case O:N=Ve/v;break;default:N=Ve}return k?N:S.a(N)},ce.daysInMonth=function(){return this.endOf(we).$D},ce.$locale=function(){return Re[this.$L]},ce.locale=function(G,P){if(!G)return this.$L;var k=this.clone(),N=et(G,P,!0);return N&&(k.$L=N),k},ce.clone=function(){return S.w(this.$d,this)},ce.toDate=function(){return new Date(this.valueOf())},ce.toJSON=function(){return this.isValid()?this.toISOString():null},ce.toISOString=function(){return this.$d.toISOString()},ce.toString=function(){return this.$d.toUTCString()},xt}(),ct=si.prototype;return je.prototype=ct,[["$ms",g],["$s",O],["$m",R],["$H",J],["$W",Z],["$M",we],["$y",Ue],["$D",Q]].forEach(function(xt){ct[xt[1]]=function(ce){return this.$g(ce,xt[0],xt[1])}}),je.extend=function(xt,ce){return xt.$i||(xt(ce,si,je),xt.$i=!0),je},je.locale=et,je.isDayjs=st,je.unix=function(xt){return je(1e3*xt)},je.en=Re[W],je.Ls=Re,je.p={},je})},"./node_modules/dayjs/plugin/utc.js":function(r){(function(v,b){r.exports=b()})(this,function(){"use strict";var v="minute",b=/[+-]\d\d(?::?\d\d)?/g,_=/([+-]|\d\d)/g;return function(g,O,R){var J=O.prototype;R.utc=function(Ke){var At={date:Ke,utc:!0,args:arguments};return new O(At)},J.utc=function(Ke){var At=R(this.toDate(),{locale:this.$L,utc:!0});return Ke?At.add(this.utcOffset(),v):At},J.local=function(){return R(this.toDate(),{locale:this.$L,utc:!1})};var Z=J.parse;J.parse=function(Ke){Ke.utc&&(this.$u=!0),this.$utils().u(Ke.$offset)||(this.$offset=Ke.$offset),Z.call(this,Ke)};var C=J.init;J.init=function(){if(this.$u){var Ke=this.$d;this.$y=Ke.getUTCFullYear(),this.$M=Ke.getUTCMonth(),this.$D=Ke.getUTCDate(),this.$W=Ke.getUTCDay(),this.$H=Ke.getUTCHours(),this.$m=Ke.getUTCMinutes(),this.$s=Ke.getUTCSeconds(),this.$ms=Ke.getUTCMilliseconds()}else C.call(this)};var we=J.utcOffset;J.utcOffset=function(Ke,At){var gt=this.$utils().u;if(gt(Ke))return this.$u?0:gt(this.$offset)?we.call(this):this.$offset;if(typeof Ke=="string"&&(Ke=function(W){W===void 0&&(W="");var Re=W.match(b);if(!Re)return null;var tt=(""+Re[0]).match(_)||["-",0,0],st=tt[0],et=60*+tt[1]+ +tt[2];return et===0?0:st==="+"?et:-et}(Ke),Ke===null))return this;var q=Math.abs(Ke)<=16?60*Ke:Ke,ne=this;if(At)return ne.$offset=q,ne.$u=Ke===0,ne;if(Ke!==0){var c=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(ne=this.local().add(q+c,v)).$offset=q,ne.$x.$localOffset=c}else ne=this.utc();return ne};var Be=J.format;J.format=function(Ke){var At=Ke||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return Be.call(this,At)},J.valueOf=function(){var Ke=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*Ke},J.isUTC=function(){return!!this.$u},J.toISOString=function(){return this.toDate().toISOString()},J.toString=function(){return this.toDate().toUTCString()};var Ue=J.toDate;J.toDate=function(Ke){return Ke==="s"&&this.$offset?R(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():Ue.call(this)};var Q=J.diff;J.diff=function(Ke,At,gt){if(Ke&&this.$u===Ke.$u)return Q.call(this,Ke,At,gt);var q=this.local(),ne=R(Ke).local();return Q.call(q,ne,At,gt)}}})},"./node_modules/htmx.org/dist/htmx.esm.js":function(__unused_webpack_module,__webpack_exports__){"use strict";var htmx=function(){"use strict";const htmx={onLoad:null,process:null,on:null,off:null,trigger:null,ajax:null,find:null,findAll:null,closest:null,values:function(r,v){return getInputValues(r,v||"post").values},remove:null,addClass:null,removeClass:null,toggleClass:null,takeClass:null,swap:null,defineExtension:null,removeExtension:null,logAll:null,logNone:null,logger:null,config:{historyEnabled:!0,historyCacheSize:10,refreshOnHistoryMiss:!1,defaultSwapStyle:"innerHTML",defaultSwapDelay:0,defaultSettleDelay:20,includeIndicatorStyles:!0,indicatorClass:"htmx-indicator",requestClass:"htmx-request",addedClass:"htmx-added",settlingClass:"htmx-settling",swappingClass:"htmx-swapping",allowEval:!0,allowScriptTags:!0,inlineScriptNonce:"",inlineStyleNonce:"",attributesToSettle:["class","style","width","height"],withCredentials:!1,timeout:0,wsReconnectDelay:"full-jitter",wsBinaryType:"blob",disableSelector:"[hx-disable], [data-hx-disable]",scrollBehavior:"instant",defaultFocusScroll:!1,getCacheBusterParam:!1,globalViewTransitions:!1,methodsThatUseUrlParams:["get","delete"],selfRequestsOnly:!0,ignoreTitle:!1,scrollIntoViewOnBoost:!0,triggerSpecsCache:null,disableInheritance:!1,responseHandling:[{code:"204",swap:!1},{code:"[23]..",swap:!0},{code:"[45]..",swap:!1,error:!0}],allowNestedOobSwaps:!0},parseInterval:null,_:null,version:"2.0.4"};htmx.onLoad=onLoadHelper,htmx.process=processNode,htmx.on=addEventListenerImpl,htmx.off=removeEventListenerImpl,htmx.trigger=triggerEvent,htmx.ajax=ajaxHelper,htmx.find=find,htmx.findAll=findAll,htmx.closest=closest,htmx.remove=removeElement,htmx.addClass=addClassToElement,htmx.removeClass=removeClassFromElement,htmx.toggleClass=toggleClassOnElement,htmx.takeClass=takeClassForElement,htmx.swap=swap,htmx.defineExtension=defineExtension,htmx.removeExtension=removeExtension,htmx.logAll=logAll,htmx.logNone=logNone,htmx.parseInterval=parseInterval,htmx._=internalEval;const internalAPI={addTriggerHandler,bodyContains,canAccessLocalStorage,findThisElement,filterValues,swap,hasAttribute,getAttributeValue,getClosestAttributeValue,getClosestMatch,getExpressionVars,getHeaders,getInputValues,getInternalData,getSwapSpecification,getTriggerSpecs,getTarget,makeFragment,mergeObjects,makeSettleInfo,oobSwap,querySelectorExt,settleImmediately,shouldCancel,triggerEvent,triggerErrorEvent,withExtensions},VERBS=["get","post","put","delete","patch"],VERB_SELECTOR=VERBS.map(function(r){return"[hx-"+r+"], [data-hx-"+r+"]"}).join(", ");function parseInterval(r){if(r==null)return;let v=NaN;return r.slice(-2)=="ms"?v=parseFloat(r.slice(0,-2)):r.slice(-1)=="s"?v=parseFloat(r.slice(0,-1))*1e3:r.slice(-1)=="m"?v=parseFloat(r.slice(0,-1))*1e3*60:v=parseFloat(r),isNaN(v)?void 0:v}function getRawAttribute(r,v){return r instanceof Element&&r.getAttribute(v)}function hasAttribute(r,v){return!!r.hasAttribute&&(r.hasAttribute(v)||r.hasAttribute("data-"+v))}function getAttributeValue(r,v){return getRawAttribute(r,v)||getRawAttribute(r,"data-"+v)}function parentElt(r){const v=r.parentElement;return!v&&r.parentNode instanceof ShadowRoot?r.parentNode:v}function getDocument(){return document}function getRootNode(r,v){return r.getRootNode?r.getRootNode({composed:v}):getDocument()}function getClosestMatch(r,v){for(;r&&!v(r);)r=parentElt(r);return r||null}function getAttributeValueWithDisinheritance(r,v,b){const _=getAttributeValue(v,b),g=getAttributeValue(v,"hx-disinherit");var O=getAttributeValue(v,"hx-inherit");if(r!==v){if(htmx.config.disableInheritance)return O&&(O==="*"||O.split(" ").indexOf(b)>=0)?_:null;if(g&&(g==="*"||g.split(" ").indexOf(b)>=0))return"unset"}return _}function getClosestAttributeValue(r,v){let b=null;if(getClosestMatch(r,function(_){return!!(b=getAttributeValueWithDisinheritance(r,asElement(_),v))}),b!=="unset")return b}function matches(r,v){const b=r instanceof Element&&(r.matches||r.matchesSelector||r.msMatchesSelector||r.mozMatchesSelector||r.webkitMatchesSelector||r.oMatchesSelector);return!!b&&b.call(r,v)}function getStartTag(r){const b=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i.exec(r);return b?b[1].toLowerCase():""}function parseHTML(r){return new DOMParser().parseFromString(r,"text/html")}function takeChildrenFor(r,v){for(;v.childNodes.length>0;)r.append(v.childNodes[0])}function duplicateScript(r){const v=getDocument().createElement("script");return forEach(r.attributes,function(b){v.setAttribute(b.name,b.value)}),v.textContent=r.textContent,v.async=!1,htmx.config.inlineScriptNonce&&(v.nonce=htmx.config.inlineScriptNonce),v}function isJavaScriptScriptNode(r){return r.matches("script")&&(r.type==="text/javascript"||r.type==="module"||r.type==="")}function normalizeScriptTags(r){Array.from(r.querySelectorAll("script")).forEach(v=>{if(isJavaScriptScriptNode(v)){const b=duplicateScript(v),_=v.parentNode;try{_.insertBefore(b,v)}catch(g){logError(g)}finally{v.remove()}}})}function makeFragment(r){const v=r.replace(/<head(\s[^>]*)?>[\s\S]*?<\/head>/i,""),b=getStartTag(v);let _;if(b==="html"){_=new DocumentFragment;const O=parseHTML(r);takeChildrenFor(_,O.body),_.title=O.title}else if(b==="body"){_=new DocumentFragment;const O=parseHTML(v);takeChildrenFor(_,O.body),_.title=O.title}else{const O=parseHTML('<body><template class="internal-htmx-wrapper">'+v+"</template></body>");_=O.querySelector("template").content,_.title=O.title;var g=_.querySelector("title");g&&g.parentNode===_&&(g.remove(),_.title=g.innerText)}return _&&(htmx.config.allowScriptTags?normalizeScriptTags(_):_.querySelectorAll("script").forEach(O=>O.remove())),_}function maybeCall(r){r&&r()}function isType(r,v){return Object.prototype.toString.call(r)==="[object "+v+"]"}function isFunction(r){return typeof r=="function"}function isRawObject(r){return isType(r,"Object")}function getInternalData(r){const v="htmx-internal-data";let b=r[v];return b||(b=r[v]={}),b}function toArray(r){const v=[];if(r)for(let b=0;b<r.length;b++)v.push(r[b]);return v}function forEach(r,v){if(r)for(let b=0;b<r.length;b++)v(r[b])}function isScrolledIntoView(r){const v=r.getBoundingClientRect(),b=v.top,_=v.bottom;return b<window.innerHeight&&_>=0}function bodyContains(r){return r.getRootNode({composed:!0})===document}function splitOnWhitespace(r){return r.trim().split(/\s+/)}function mergeObjects(r,v){for(const b in v)v.hasOwnProperty(b)&&(r[b]=v[b]);return r}function parseJSON(r){try{return JSON.parse(r)}catch(v){return logError(v),null}}function canAccessLocalStorage(){const r="htmx:localStorageTest";try{return localStorage.setItem(r,r),localStorage.removeItem(r),!0}catch{return!1}}function normalizePath(r){try{const v=new URL(r);return v&&(r=v.pathname+v.search),/^\/$/.test(r)||(r=r.replace(/\/+$/,"")),r}catch{return r}}function internalEval(str){return maybeEval(getDocument().body,function(){return eval(str)})}function onLoadHelper(r){return htmx.on("htmx:load",function(b){r(b.detail.elt)})}function logAll(){htmx.logger=function(r,v,b){console&&console.log(v,r,b)}}function logNone(){htmx.logger=null}function find(r,v){return typeof r!="string"?r.querySelector(v):find(getDocument(),r)}function findAll(r,v){return typeof r!="string"?r.querySelectorAll(v):findAll(getDocument(),r)}function getWindow(){return window}function removeElement(r,v){r=resolveTarget(r),v?getWindow().setTimeout(function(){removeElement(r),r=null},v):parentElt(r).removeChild(r)}function asElement(r){return r instanceof Element?r:null}function asHtmlElement(r){return r instanceof HTMLElement?r:null}function asString(r){return typeof r=="string"?r:null}function asParentNode(r){return r instanceof Element||r instanceof Document||r instanceof DocumentFragment?r:null}function addClassToElement(r,v,b){r=asElement(resolveTarget(r)),r&&(b?getWindow().setTimeout(function(){addClassToElement(r,v),r=null},b):r.classList&&r.classList.add(v))}function removeClassFromElement(r,v,b){let _=asElement(resolveTarget(r));_&&(b?getWindow().setTimeout(function(){removeClassFromElement(_,v),_=null},b):_.classList&&(_.classList.remove(v),_.classList.length===0&&_.removeAttribute("class")))}function toggleClassOnElement(r,v){r=resolveTarget(r),r.classList.toggle(v)}function takeClassForElement(r,v){r=resolveTarget(r),forEach(r.parentElement.children,function(b){removeClassFromElement(b,v)}),addClassToElement(asElement(r),v)}function closest(r,v){if(r=asElement(resolveTarget(r)),r&&r.closest)return r.closest(v);do if(r==null||matches(r,v))return r;while(r=r&&asElement(parentElt(r)));return null}function startsWith(r,v){return r.substring(0,v.length)===v}function endsWith(r,v){return r.substring(r.length-v.length)===v}function normalizeSelector(r){const v=r.trim();return startsWith(v,"<")&&endsWith(v,"/>")?v.substring(1,v.length-2):v}function querySelectorAllExt(r,v,b){if(v.indexOf("global ")===0)return querySelectorAllExt(r,v.slice(7),!0);r=resolveTarget(r);const _=[];{let R=0,J=0;for(let Z=0;Z<v.length;Z++){const C=v[Z];if(C===","&&R===0){_.push(v.substring(J,Z)),J=Z+1;continue}C==="<"?R++:C==="/"&&Z<v.length-1&&v[Z+1]===">"&&R--}J<v.length&&_.push(v.substring(J))}const g=[],O=[];for(;_.length>0;){const R=normalizeSelector(_.shift());let J;R.indexOf("closest ")===0?J=closest(asElement(r),normalizeSelector(R.substr(8))):R.indexOf("find ")===0?J=find(asParentNode(r),normalizeSelector(R.substr(5))):R==="next"||R==="nextElementSibling"?J=asElement(r).nextElementSibling:R.indexOf("next ")===0?J=scanForwardQuery(r,normalizeSelector(R.substr(5)),!!b):R==="previous"||R==="previousElementSibling"?J=asElement(r).previousElementSibling:R.indexOf("previous ")===0?J=scanBackwardsQuery(r,normalizeSelector(R.substr(9)),!!b):R==="document"?J=document:R==="window"?J=window:R==="body"?J=document.body:R==="root"?J=getRootNode(r,!!b):R==="host"?J=r.getRootNode().host:O.push(R),J&&g.push(J)}if(O.length>0){const R=O.join(","),J=asParentNode(getRootNode(r,!!b));g.push(...toArray(J.querySelectorAll(R)))}return g}var scanForwardQuery=function(r,v,b){const _=asParentNode(getRootNode(r,b)).querySelectorAll(v);for(let g=0;g<_.length;g++){const O=_[g];if(O.compareDocumentPosition(r)===Node.DOCUMENT_POSITION_PRECEDING)return O}},scanBackwardsQuery=function(r,v,b){const _=asParentNode(getRootNode(r,b)).querySelectorAll(v);for(let g=_.length-1;g>=0;g--){const O=_[g];if(O.compareDocumentPosition(r)===Node.DOCUMENT_POSITION_FOLLOWING)return O}};function querySelectorExt(r,v){return typeof r!="string"?querySelectorAllExt(r,v)[0]:querySelectorAllExt(getDocument().body,r)[0]}function resolveTarget(r,v){return typeof r=="string"?find(asParentNode(v)||document,r):r}function processEventArgs(r,v,b,_){return isFunction(v)?{target:getDocument().body,event:asString(r),listener:v,options:b}:{target:resolveTarget(r),event:asString(v),listener:b,options:_}}function addEventListenerImpl(r,v,b,_){return ready(function(){const O=processEventArgs(r,v,b,_);O.target.addEventListener(O.event,O.listener,O.options)}),isFunction(v)?v:b}function removeEventListenerImpl(r,v,b){return ready(function(){const _=processEventArgs(r,v,b);_.target.removeEventListener(_.event,_.listener)}),isFunction(v)?v:b}const DUMMY_ELT=getDocument().createElement("output");function findAttributeTargets(r,v){const b=getClosestAttributeValue(r,v);if(b){if(b==="this")return[findThisElement(r,v)];{const _=querySelectorAllExt(r,b);return _.length===0?(logError('The selector "'+b+'" on '+v+" returned no matches!"),[DUMMY_ELT]):_}}}function findThisElement(r,v){return asElement(getClosestMatch(r,function(b){return getAttributeValue(asElement(b),v)!=null}))}function getTarget(r){const v=getClosestAttributeValue(r,"hx-target");return v?v==="this"?findThisElement(r,"hx-target"):querySelectorExt(r,v):getInternalData(r).boosted?getDocument().body:r}function shouldSettleAttribute(r){const v=htmx.config.attributesToSettle;for(let b=0;b<v.length;b++)if(r===v[b])return!0;return!1}function cloneAttributes(r,v){forEach(r.attributes,function(b){!v.hasAttribute(b.name)&&shouldSettleAttribute(b.name)&&r.removeAttribute(b.name)}),forEach(v.attributes,function(b){shouldSettleAttribute(b.name)&&r.setAttribute(b.name,b.value)})}function isInlineSwap(r,v){const b=getExtensions(v);for(let _=0;_<b.length;_++){const g=b[_];try{if(g.isInlineSwap(r))return!0}catch(O){logError(O)}}return r==="outerHTML"}function oobSwap(r,v,b,_){_=_||getDocument();let g="#"+getRawAttribute(v,"id"),O="outerHTML";r==="true"||(r.indexOf(":")>0?(O=r.substring(0,r.indexOf(":")),g=r.substring(r.indexOf(":")+1)):O=r),v.removeAttribute("hx-swap-oob"),v.removeAttribute("data-hx-swap-oob");const R=querySelectorAllExt(_,g,!1);return R?(forEach(R,function(J){let Z;const C=v.cloneNode(!0);Z=getDocument().createDocumentFragment(),Z.appendChild(C),isInlineSwap(O,J)||(Z=asParentNode(C));const we={shouldSwap:!0,target:J,fragment:Z};triggerEvent(J,"htmx:oobBeforeSwap",we)&&(J=we.target,we.shouldSwap&&(handlePreservedElements(Z),swapWithStyle(O,J,J,Z,b),restorePreservedElements()),forEach(b.elts,function(Be){triggerEvent(Be,"htmx:oobAfterSwap",we)}))}),v.parentNode.removeChild(v)):(v.parentNode.removeChild(v),triggerErrorEvent(getDocument().body,"htmx:oobErrorNoTarget",{content:v})),r}function restorePreservedElements(){const r=find("#--htmx-preserve-pantry--");if(r){for(const v of[...r.children]){const b=find("#"+v.id);b.parentNode.moveBefore(v,b),b.remove()}r.remove()}}function handlePreservedElements(r){forEach(findAll(r,"[hx-preserve], [data-hx-preserve]"),function(v){const b=getAttributeValue(v,"id"),_=getDocument().getElementById(b);if(_!=null)if(v.moveBefore){let g=find("#--htmx-preserve-pantry--");g==null&&(getDocument().body.insertAdjacentHTML("afterend","<div id='--htmx-preserve-pantry--'></div>"),g=find("#--htmx-preserve-pantry--")),g.moveBefore(_,null)}else v.parentNode.replaceChild(_,v)})}function handleAttributes(r,v,b){forEach(v.querySelectorAll("[id]"),function(_){const g=getRawAttribute(_,"id");if(g&&g.length>0){const O=g.replace("'","\\'"),R=_.tagName.replace(":","\\:"),J=asParentNode(r),Z=J&&J.querySelector(R+"[id='"+O+"']");if(Z&&Z!==J){const C=_.cloneNode();cloneAttributes(_,Z),b.tasks.push(function(){cloneAttributes(_,C)})}}})}function makeAjaxLoadTask(r){return function(){removeClassFromElement(r,htmx.config.addedClass),processNode(asElement(r)),processFocus(asParentNode(r)),triggerEvent(r,"htmx:load")}}function processFocus(r){const v="[autofocus]",b=asHtmlElement(matches(r,v)?r:r.querySelector(v));b?.focus()}function insertNodesBefore(r,v,b,_){for(handleAttributes(r,b,_);b.childNodes.length>0;){const g=b.firstChild;addClassToElement(asElement(g),htmx.config.addedClass),r.insertBefore(g,v),g.nodeType!==Node.TEXT_NODE&&g.nodeType!==Node.COMMENT_NODE&&_.tasks.push(makeAjaxLoadTask(g))}}function stringHash(r,v){let b=0;for(;b<r.length;)v=(v<<5)-v+r.charCodeAt(b++)|0;return v}function attributeHash(r){let v=0;if(r.attributes)for(let b=0;b<r.attributes.length;b++){const _=r.attributes[b];_.value&&(v=stringHash(_.name,v),v=stringHash(_.value,v))}return v}function deInitOnHandlers(r){const v=getInternalData(r);if(v.onHandlers){for(let b=0;b<v.onHandlers.length;b++){const _=v.onHandlers[b];removeEventListenerImpl(r,_.event,_.listener)}delete v.onHandlers}}function deInitNode(r){const v=getInternalData(r);v.timeout&&clearTimeout(v.timeout),v.listenerInfos&&forEach(v.listenerInfos,function(b){b.on&&removeEventListenerImpl(b.on,b.trigger,b.listener)}),deInitOnHandlers(r),forEach(Object.keys(v),function(b){b!=="firstInitCompleted"&&delete v[b]})}function cleanUpElement(r){triggerEvent(r,"htmx:beforeCleanupElement"),deInitNode(r),r.children&&forEach(r.children,function(v){cleanUpElement(v)})}function swapOuterHTML(r,v,b){if(r instanceof Element&&r.tagName==="BODY")return swapInnerHTML(r,v,b);let _;const g=r.previousSibling,O=parentElt(r);if(O){for(insertNodesBefore(O,r,v,b),g==null?_=O.firstChild:_=g.nextSibling,b.elts=b.elts.filter(function(R){return R!==r});_&&_!==r;)_ instanceof Element&&b.elts.push(_),_=_.nextSibling;cleanUpElement(r),r instanceof Element?r.remove():r.parentNode.removeChild(r)}}function swapAfterBegin(r,v,b){return insertNodesBefore(r,r.firstChild,v,b)}function swapBeforeBegin(r,v,b){return insertNodesBefore(parentElt(r),r,v,b)}function swapBeforeEnd(r,v,b){return insertNodesBefore(r,null,v,b)}function swapAfterEnd(r,v,b){return insertNodesBefore(parentElt(r),r.nextSibling,v,b)}function swapDelete(r){cleanUpElement(r);const v=parentElt(r);if(v)return v.removeChild(r)}function swapInnerHTML(r,v,b){const _=r.firstChild;if(insertNodesBefore(r,_,v,b),_){for(;_.nextSibling;)cleanUpElement(_.nextSibling),r.removeChild(_.nextSibling);cleanUpElement(_),r.removeChild(_)}}function swapWithStyle(r,v,b,_,g){switch(r){case"none":return;case"outerHTML":swapOuterHTML(b,_,g);return;case"afterbegin":swapAfterBegin(b,_,g);return;case"beforebegin":swapBeforeBegin(b,_,g);return;case"beforeend":swapBeforeEnd(b,_,g);return;case"afterend":swapAfterEnd(b,_,g);return;case"delete":swapDelete(b);return;default:var O=getExtensions(v);for(let R=0;R<O.length;R++){const J=O[R];try{const Z=J.handleSwap(r,b,_,g);if(Z){if(Array.isArray(Z))for(let C=0;C<Z.length;C++){const we=Z[C];we.nodeType!==Node.TEXT_NODE&&we.nodeType!==Node.COMMENT_NODE&&g.tasks.push(makeAjaxLoadTask(we))}return}}catch(Z){logError(Z)}}r==="innerHTML"?swapInnerHTML(b,_,g):swapWithStyle(htmx.config.defaultSwapStyle,v,b,_,g)}}function findAndSwapOobElements(r,v,b){var _=findAll(r,"[hx-swap-oob], [data-hx-swap-oob]");return forEach(_,function(g){if(htmx.config.allowNestedOobSwaps||g.parentElement===null){const O=getAttributeValue(g,"hx-swap-oob");O!=null&&oobSwap(O,g,v,b)}else g.removeAttribute("hx-swap-oob"),g.removeAttribute("data-hx-swap-oob")}),_.length>0}function swap(r,v,b,_){_||(_={}),r=resolveTarget(r);const g=_.contextElement?getRootNode(_.contextElement,!1):getDocument(),O=document.activeElement;let R={};try{R={elt:O,start:O?O.selectionStart:null,end:O?O.selectionEnd:null}}catch{}const J=makeSettleInfo(r);if(b.swapStyle==="textContent")r.textContent=v;else{let C=makeFragment(v);if(J.title=C.title,_.selectOOB){const we=_.selectOOB.split(",");for(let Be=0;Be<we.length;Be++){const Ue=we[Be].split(":",2);let Q=Ue[0].trim();Q.indexOf("#")===0&&(Q=Q.substring(1));const Ke=Ue[1]||"true",At=C.querySelector("#"+Q);At&&oobSwap(Ke,At,J,g)}}if(findAndSwapOobElements(C,J,g),forEach(findAll(C,"template"),function(we){we.content&&findAndSwapOobElements(we.content,J,g)&&we.remove()}),_.select){const we=getDocument().createDocumentFragment();forEach(C.querySelectorAll(_.select),function(Be){we.appendChild(Be)}),C=we}handlePreservedElements(C),swapWithStyle(b.swapStyle,_.contextElement,r,C,J),restorePreservedElements()}if(R.elt&&!bodyContains(R.elt)&&getRawAttribute(R.elt,"id")){const C=document.getElementById(getRawAttribute(R.elt,"id")),we={preventScroll:b.focusScroll!==void 0?!b.focusScroll:!htmx.config.defaultFocusScroll};if(C){if(R.start&&C.setSelectionRange)try{C.setSelectionRange(R.start,R.end)}catch{}C.focus(we)}}r.classList.remove(htmx.config.swappingClass),forEach(J.elts,function(C){C.classList&&C.classList.add(htmx.config.settlingClass),triggerEvent(C,"htmx:afterSwap",_.eventInfo)}),_.afterSwapCallback&&_.afterSwapCallback(),b.ignoreTitle||handleTitle(J.title);const Z=function(){if(forEach(J.tasks,function(C){C.call()}),forEach(J.elts,function(C){C.classList&&C.classList.remove(htmx.config.settlingClass),triggerEvent(C,"htmx:afterSettle",_.eventInfo)}),_.anchor){const C=asElement(resolveTarget("#"+_.anchor));C&&C.scrollIntoView({block:"start",behavior:"auto"})}updateScrollState(J.elts,b),_.afterSettleCallback&&_.afterSettleCallback()};b.settleDelay>0?getWindow().setTimeout(Z,b.settleDelay):Z()}function handleTriggerHeader(r,v,b){const _=r.getResponseHeader(v);if(_.indexOf("{")===0){const g=parseJSON(_);for(const O in g)if(g.hasOwnProperty(O)){let R=g[O];isRawObject(R)?b=R.target!==void 0?R.target:b:R={value:R},triggerEvent(b,O,R)}}else{const g=_.split(",");for(let O=0;O<g.length;O++)triggerEvent(b,g[O].trim(),[])}}const WHITESPACE=/\s/,WHITESPACE_OR_COMMA=/[\s,]/,SYMBOL_START=/[_$a-zA-Z]/,SYMBOL_CONT=/[_$a-zA-Z0-9]/,STRINGISH_START=['"',"'","/"],NOT_WHITESPACE=/[^\s]/,COMBINED_SELECTOR_START=/[{(]/,COMBINED_SELECTOR_END=/[})]/;function tokenizeString(r){const v=[];let b=0;for(;b<r.length;){if(SYMBOL_START.exec(r.charAt(b))){for(var _=b;SYMBOL_CONT.exec(r.charAt(b+1));)b++;v.push(r.substring(_,b+1))}else if(STRINGISH_START.indexOf(r.charAt(b))!==-1){const g=r.charAt(b);var _=b;for(b++;b<r.length&&r.charAt(b)!==g;)r.charAt(b)==="\\"&&b++,b++;v.push(r.substring(_,b+1))}else{const g=r.charAt(b);v.push(g)}b++}return v}function isPossibleRelativeReference(r,v,b){return SYMBOL_START.exec(r.charAt(0))&&r!=="true"&&r!=="false"&&r!=="this"&&r!==b&&v!=="."}function maybeGenerateConditional(r,v,b){if(v[0]==="["){v.shift();let _=1,g=" return (function("+b+"){ return (",O=null;for(;v.length>0;){const R=v[0];if(R==="]"){if(_--,_===0){O===null&&(g=g+"true"),v.shift(),g+=")})";try{const J=maybeEval(r,function(){return Function(g)()},function(){return!0});return J.source=g,J}catch(J){return triggerErrorEvent(getDocument().body,"htmx:syntax:error",{error:J,source:g}),null}}}else R==="["&&_++;isPossibleRelativeReference(R,O,b)?g+="(("+b+"."+R+") ? ("+b+"."+R+") : (window."+R+"))":g=g+R,O=v.shift()}}}function consumeUntil(r,v){let b="";for(;r.length>0&&!v.test(r[0]);)b+=r.shift();return b}function consumeCSSSelector(r){let v;return r.length>0&&COMBINED_SELECTOR_START.test(r[0])?(r.shift(),v=consumeUntil(r,COMBINED_SELECTOR_END).trim(),r.shift()):v=consumeUntil(r,WHITESPACE_OR_COMMA),v}const INPUT_SELECTOR="input, textarea, select";function parseAndCacheTrigger(r,v,b){const _=[],g=tokenizeString(v);do{consumeUntil(g,NOT_WHITESPACE);const J=g.length,Z=consumeUntil(g,/[,\[\s]/);if(Z!=="")if(Z==="every"){const C={trigger:"every"};consumeUntil(g,NOT_WHITESPACE),C.pollInterval=parseInterval(consumeUntil(g,/[,\[\s]/)),consumeUntil(g,NOT_WHITESPACE);var O=maybeGenerateConditional(r,g,"event");O&&(C.eventFilter=O),_.push(C)}else{const C={trigger:Z};var O=maybeGenerateConditional(r,g,"event");for(O&&(C.eventFilter=O),consumeUntil(g,NOT_WHITESPACE);g.length>0&&g[0]!==",";){const Be=g.shift();if(Be==="changed")C.changed=!0;else if(Be==="once")C.once=!0;else if(Be==="consume")C.consume=!0;else if(Be==="delay"&&g[0]===":")g.shift(),C.delay=parseInterval(consumeUntil(g,WHITESPACE_OR_COMMA));else if(Be==="from"&&g[0]===":"){if(g.shift(),COMBINED_SELECTOR_START.test(g[0]))var R=consumeCSSSelector(g);else{var R=consumeUntil(g,WHITESPACE_OR_COMMA);if(R==="closest"||R==="find"||R==="next"||R==="previous"){g.shift();const Q=consumeCSSSelector(g);Q.length>0&&(R+=" "+Q)}}C.from=R}else Be==="target"&&g[0]===":"?(g.shift(),C.target=consumeCSSSelector(g)):Be==="throttle"&&g[0]===":"?(g.shift(),C.throttle=parseInterval(consumeUntil(g,WHITESPACE_OR_COMMA))):Be==="queue"&&g[0]===":"?(g.shift(),C.queue=consumeUntil(g,WHITESPACE_OR_COMMA)):Be==="root"&&g[0]===":"?(g.shift(),C[Be]=consumeCSSSelector(g)):Be==="threshold"&&g[0]===":"?(g.shift(),C[Be]=consumeUntil(g,WHITESPACE_OR_COMMA)):triggerErrorEvent(r,"htmx:syntax:error",{token:g.shift()});consumeUntil(g,NOT_WHITESPACE)}_.push(C)}g.length===J&&triggerErrorEvent(r,"htmx:syntax:error",{token:g.shift()}),consumeUntil(g,NOT_WHITESPACE)}while(g[0]===","&&g.shift());return b&&(b[v]=_),_}function getTriggerSpecs(r){const v=getAttributeValue(r,"hx-trigger");let b=[];if(v){const _=htmx.config.triggerSpecsCache;b=_&&_[v]||parseAndCacheTrigger(r,v,_)}return b.length>0?b:matches(r,"form")?[{trigger:"submit"}]:matches(r,'input[type="button"], input[type="submit"]')?[{trigger:"click"}]:matches(r,INPUT_SELECTOR)?[{trigger:"change"}]:[{trigger:"click"}]}function cancelPolling(r){getInternalData(r).cancelled=!0}function processPolling(r,v,b){const _=getInternalData(r);_.timeout=getWindow().setTimeout(function(){bodyContains(r)&&_.cancelled!==!0&&(maybeFilterEvent(b,r,makeEvent("hx:poll:trigger",{triggerSpec:b,target:r}))||v(r),processPolling(r,v,b))},b.pollInterval)}function isLocalLink(r){return location.hostname===r.hostname&&getRawAttribute(r,"href")&&getRawAttribute(r,"href").indexOf("#")!==0}function eltIsDisabled(r){return closest(r,htmx.config.disableSelector)}function boostElement(r,v,b){if(r instanceof HTMLAnchorElement&&isLocalLink(r)&&(r.target===""||r.target==="_self")||r.tagName==="FORM"&&String(getRawAttribute(r,"method")).toLowerCase()!=="dialog"){v.boosted=!0;let _,g;if(r.tagName==="A")_="get",g=getRawAttribute(r,"href");else{const O=getRawAttribute(r,"method");_=O?O.toLowerCase():"get",g=getRawAttribute(r,"action"),(g==null||g==="")&&(g=getDocument().location.href),_==="get"&&g.includes("?")&&(g=g.replace(/\?[^#]+/,""))}b.forEach(function(O){addEventListener(r,function(R,J){const Z=asElement(R);if(eltIsDisabled(Z)){cleanUpElement(Z);return}issueAjaxRequest(_,g,Z,J)},v,O,!0)})}}function shouldCancel(r,v){const b=asElement(v);return b?!!((r.type==="submit"||r.type==="click")&&(b.tagName==="FORM"||matches(b,'input[type="submit"], button')&&(matches(b,"[form]")||closest(b,"form")!==null)||b instanceof HTMLAnchorElement&&b.href&&(b.getAttribute("href")==="#"||b.getAttribute("href").indexOf("#")!==0))):!1}function ignoreBoostedAnchorCtrlClick(r,v){return getInternalData(r).boosted&&r instanceof HTMLAnchorElement&&v.type==="click"&&(v.ctrlKey||v.metaKey)}function maybeFilterEvent(r,v,b){const _=r.eventFilter;if(_)try{return _.call(v,b)!==!0}catch(g){const O=_.source;return triggerErrorEvent(getDocument().body,"htmx:eventFilter:error",{error:g,source:O}),!0}return!1}function addEventListener(r,v,b,_,g){const O=getInternalData(r);let R;_.from?R=querySelectorAllExt(r,_.from):R=[r],_.changed&&("lastValue"in O||(O.lastValue=new WeakMap),R.forEach(function(J){O.lastValue.has(_)||O.lastValue.set(_,new WeakMap),O.lastValue.get(_).set(J,J.value)})),forEach(R,function(J){const Z=function(C){if(!bodyContains(r)){J.removeEventListener(_.trigger,Z);return}if(ignoreBoostedAnchorCtrlClick(r,C)||((g||shouldCancel(C,r))&&C.preventDefault(),maybeFilterEvent(_,r,C)))return;const we=getInternalData(C);if(we.triggerSpec=_,we.handledFor==null&&(we.handledFor=[]),we.handledFor.indexOf(r)<0){if(we.handledFor.push(r),_.consume&&C.stopPropagation(),_.target&&C.target&&!matches(asElement(C.target),_.target))return;if(_.once){if(O.triggeredOnce)return;O.triggeredOnce=!0}if(_.changed){const Be=event.target,Ue=Be.value,Q=O.lastValue.get(_);if(Q.has(Be)&&Q.get(Be)===Ue)return;Q.set(Be,Ue)}if(O.delayed&&clearTimeout(O.delayed),O.throttle)return;_.throttle>0?O.throttle||(triggerEvent(r,"htmx:trigger"),v(r,C),O.throttle=getWindow().setTimeout(function(){O.throttle=null},_.throttle)):_.delay>0?O.delayed=getWindow().setTimeout(function(){triggerEvent(r,"htmx:trigger"),v(r,C)},_.delay):(triggerEvent(r,"htmx:trigger"),v(r,C))}};b.listenerInfos==null&&(b.listenerInfos=[]),b.listenerInfos.push({trigger:_.trigger,listener:Z,on:J}),J.addEventListener(_.trigger,Z)})}let windowIsScrolling=!1,scrollHandler=null;function initScrollHandler(){scrollHandler||(scrollHandler=function(){windowIsScrolling=!0},window.addEventListener("scroll",scrollHandler),window.addEventListener("resize",scrollHandler),setInterval(function(){windowIsScrolling&&(windowIsScrolling=!1,forEach(getDocument().querySelectorAll("[hx-trigger*='revealed'],[data-hx-trigger*='revealed']"),function(r){maybeReveal(r)}))},200))}function maybeReveal(r){!hasAttribute(r,"data-hx-revealed")&&isScrolledIntoView(r)&&(r.setAttribute("data-hx-revealed","true"),getInternalData(r).initHash?triggerEvent(r,"revealed"):r.addEventListener("htmx:afterProcessNode",function(){triggerEvent(r,"revealed")},{once:!0}))}function loadImmediately(r,v,b,_){const g=function(){b.loaded||(b.loaded=!0,triggerEvent(r,"htmx:trigger"),v(r))};_>0?getWindow().setTimeout(g,_):g()}function processVerbs(r,v,b){let _=!1;return forEach(VERBS,function(g){if(hasAttribute(r,"hx-"+g)){const O=getAttributeValue(r,"hx-"+g);_=!0,v.path=O,v.verb=g,b.forEach(function(R){addTriggerHandler(r,R,v,function(J,Z){const C=asElement(J);if(closest(C,htmx.config.disableSelector)){cleanUpElement(C);return}issueAjaxRequest(g,O,C,Z)})})}}),_}function addTriggerHandler(r,v,b,_){if(v.trigger==="revealed")initScrollHandler(),addEventListener(r,_,b,v),maybeReveal(asElement(r));else if(v.trigger==="intersect"){const g={};v.root&&(g.root=querySelectorExt(r,v.root)),v.threshold&&(g.threshold=parseFloat(v.threshold)),new IntersectionObserver(function(R){for(let J=0;J<R.length;J++)if(R[J].isIntersecting){triggerEvent(r,"intersect");break}},g).observe(asElement(r)),addEventListener(asElement(r),_,b,v)}else!b.firstInitCompleted&&v.trigger==="load"?maybeFilterEvent(v,r,makeEvent("load",{elt:r}))||loadImmediately(asElement(r),_,b,v.delay):v.pollInterval>0?(b.polling=!0,processPolling(asElement(r),_,v)):addEventListener(r,_,b,v)}function shouldProcessHxOn(r){const v=asElement(r);if(!v)return!1;const b=v.attributes;for(let _=0;_<b.length;_++){const g=b[_].name;if(startsWith(g,"hx-on:")||startsWith(g,"data-hx-on:")||startsWith(g,"hx-on-")||startsWith(g,"data-hx-on-"))return!0}return!1}const HX_ON_QUERY=new XPathEvaluator().createExpression('.//*[@*[ starts-with(name(), "hx-on:") or starts-with(name(), "data-hx-on:") or starts-with(name(), "hx-on-") or starts-with(name(), "data-hx-on-") ]]');function processHXOnRoot(r,v){shouldProcessHxOn(r)&&v.push(asElement(r));const b=HX_ON_QUERY.evaluate(r);let _=null;for(;_=b.iterateNext();)v.push(asElement(_))}function findHxOnWildcardElements(r){const v=[];if(r instanceof DocumentFragment)for(const b of r.childNodes)processHXOnRoot(b,v);else processHXOnRoot(r,v);return v}function findElementsToProcess(r){if(r.querySelectorAll){const b=", [hx-boost] a, [data-hx-boost] a, a[hx-boost], a[data-hx-boost]",_=[];for(const O in extensions){const R=extensions[O];if(R.getSelectors){var v=R.getSelectors();v&&_.push(v)}}return r.querySelectorAll(VERB_SELECTOR+b+", form, [type='submit'], [hx-ext], [data-hx-ext], [hx-trigger], [data-hx-trigger]"+_.flat().map(O=>", "+O).join(""))}else return[]}function maybeSetLastButtonClicked(r){const v=closest(asElement(r.target),"button, input[type='submit']"),b=getRelatedFormData(r);b&&(b.lastButtonClicked=v)}function maybeUnsetLastButtonClicked(r){const v=getRelatedFormData(r);v&&(v.lastButtonClicked=null)}function getRelatedFormData(r){const v=closest(asElement(r.target),"button, input[type='submit']");if(!v)return;const b=resolveTarget("#"+getRawAttribute(v,"form"),v.getRootNode())||closest(v,"form");if(b)return getInternalData(b)}function initButtonTracking(r){r.addEventListener("click",maybeSetLastButtonClicked),r.addEventListener("focusin",maybeSetLastButtonClicked),r.addEventListener("focusout",maybeUnsetLastButtonClicked)}function addHxOnEventHandler(r,v,b){const _=getInternalData(r);Array.isArray(_.onHandlers)||(_.onHandlers=[]);let g;const O=function(R){maybeEval(r,function(){eltIsDisabled(r)||(g||(g=new Function("event",b)),g.call(r,R))})};r.addEventListener(v,O),_.onHandlers.push({event:v,listener:O})}function processHxOnWildcard(r){deInitOnHandlers(r);for(let v=0;v<r.attributes.length;v++){const b=r.attributes[v].name,_=r.attributes[v].value;if(startsWith(b,"hx-on")||startsWith(b,"data-hx-on")){const g=b.indexOf("-on")+3,O=b.slice(g,g+1);if(O==="-"||O===":"){let R=b.slice(g+1);startsWith(R,":")?R="htmx"+R:startsWith(R,"-")?R="htmx:"+R.slice(1):startsWith(R,"htmx-")&&(R="htmx:"+R.slice(5)),addHxOnEventHandler(r,R,_)}}}}function initNode(r){if(closest(r,htmx.config.disableSelector)){cleanUpElement(r);return}const v=getInternalData(r),b=attributeHash(r);if(v.initHash!==b){deInitNode(r),v.initHash=b,triggerEvent(r,"htmx:beforeProcessNode");const _=getTriggerSpecs(r);processVerbs(r,v,_)||(getClosestAttributeValue(r,"hx-boost")==="true"?boostElement(r,v,_):hasAttribute(r,"hx-trigger")&&_.forEach(function(O){addTriggerHandler(r,O,v,function(){})})),(r.tagName==="FORM"||getRawAttribute(r,"type")==="submit"&&hasAttribute(r,"form"))&&initButtonTracking(r),v.firstInitCompleted=!0,triggerEvent(r,"htmx:afterProcessNode")}}function processNode(r){if(r=resolveTarget(r),closest(r,htmx.config.disableSelector)){cleanUpElement(r);return}initNode(r),forEach(findElementsToProcess(r),function(v){initNode(v)}),forEach(findHxOnWildcardElements(r),processHxOnWildcard)}function kebabEventName(r){return r.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}function makeEvent(r,v){let b;return window.CustomEvent&&typeof window.CustomEvent=="function"?b=new CustomEvent(r,{bubbles:!0,cancelable:!0,composed:!0,detail:v}):(b=getDocument().createEvent("CustomEvent"),b.initCustomEvent(r,!0,!0,v)),b}function triggerErrorEvent(r,v,b){triggerEvent(r,v,mergeObjects({error:v},b))}function ignoreEventForLogging(r){return r==="htmx:afterProcessNode"}function withExtensions(r,v){forEach(getExtensions(r),function(b){try{v(b)}catch(_){logError(_)}})}function logError(r){console.error?console.error(r):console.log&&console.log("ERROR: ",r)}function triggerEvent(r,v,b){r=resolveTarget(r),b==null&&(b={}),b.elt=r;const _=makeEvent(v,b);htmx.logger&&!ignoreEventForLogging(v)&&htmx.logger(r,v,b),b.error&&(logError(b.error),triggerEvent(r,"htmx:error",{errorInfo:b}));let g=r.dispatchEvent(_);const O=kebabEventName(v);if(g&&O!==v){const R=makeEvent(O,_.detail);g=g&&r.dispatchEvent(R)}return withExtensions(asElement(r),function(R){g=g&&R.onEvent(v,_)!==!1&&!_.defaultPrevented}),g}let currentPathForHistory=location.pathname+location.search;function getHistoryElement(){return getDocument().querySelector("[hx-history-elt],[data-hx-history-elt]")||getDocument().body}function saveToHistoryCache(r,v){if(!canAccessLocalStorage())return;const b=cleanInnerHtmlForHistory(v),_=getDocument().title,g=window.scrollY;if(htmx.config.historyCacheSize<=0){localStorage.removeItem("htmx-history-cache");return}r=normalizePath(r);const O=parseJSON(localStorage.getItem("htmx-history-cache"))||[];for(let J=0;J<O.length;J++)if(O[J].url===r){O.splice(J,1);break}const R={url:r,content:b,title:_,scroll:g};for(triggerEvent(getDocument().body,"htmx:historyItemCreated",{item:R,cache:O}),O.push(R);O.length>htmx.config.historyCacheSize;)O.shift();for(;O.length>0;)try{localStorage.setItem("htmx-history-cache",JSON.stringify(O));break}catch(J){triggerErrorEvent(getDocument().body,"htmx:historyCacheError",{cause:J,cache:O}),O.shift()}}function getCachedHistory(r){if(!canAccessLocalStorage())return null;r=normalizePath(r);const v=parseJSON(localStorage.getItem("htmx-history-cache"))||[];for(let b=0;b<v.length;b++)if(v[b].url===r)return v[b];return null}function cleanInnerHtmlForHistory(r){const v=htmx.config.requestClass,b=r.cloneNode(!0);return forEach(findAll(b,"."+v),function(_){removeClassFromElement(_,v)}),forEach(findAll(b,"[data-disabled-by-htmx]"),function(_){_.removeAttribute("disabled")}),b.innerHTML}function saveCurrentPageToHistory(){const r=getHistoryElement(),v=currentPathForHistory||location.pathname+location.search;let b;try{b=getDocument().querySelector('[hx-history="false" i],[data-hx-history="false" i]')}catch{b=getDocument().querySelector('[hx-history="false"],[data-hx-history="false"]')}b||(triggerEvent(getDocument().body,"htmx:beforeHistorySave",{path:v,historyElt:r}),saveToHistoryCache(v,r)),htmx.config.historyEnabled&&history.replaceState({htmx:!0},getDocument().title,window.location.href)}function pushUrlIntoHistory(r){htmx.config.getCacheBusterParam&&(r=r.replace(/org\.htmx\.cache-buster=[^&]*&?/,""),(endsWith(r,"&")||endsWith(r,"?"))&&(r=r.slice(0,-1))),htmx.config.historyEnabled&&history.pushState({htmx:!0},"",r),currentPathForHistory=r}function replaceUrlInHistory(r){htmx.config.historyEnabled&&history.replaceState({htmx:!0},"",r),currentPathForHistory=r}function settleImmediately(r){forEach(r,function(v){v.call(void 0)})}function loadHistoryFromServer(r){const v=new XMLHttpRequest,b={path:r,xhr:v};triggerEvent(getDocument().body,"htmx:historyCacheMiss",b),v.open("GET",r,!0),v.setRequestHeader("HX-Request","true"),v.setRequestHeader("HX-History-Restore-Request","true"),v.setRequestHeader("HX-Current-URL",getDocument().location.href),v.onload=function(){if(this.status>=200&&this.status<400){triggerEvent(getDocument().body,"htmx:historyCacheMissLoad",b);const _=makeFragment(this.response),g=_.querySelector("[hx-history-elt],[data-hx-history-elt]")||_,O=getHistoryElement(),R=makeSettleInfo(O);handleTitle(_.title),handlePreservedElements(_),swapInnerHTML(O,g,R),restorePreservedElements(),settleImmediately(R.tasks),currentPathForHistory=r,triggerEvent(getDocument().body,"htmx:historyRestore",{path:r,cacheMiss:!0,serverResponse:this.response})}else triggerErrorEvent(getDocument().body,"htmx:historyCacheMissLoadError",b)},v.send()}function restoreHistory(r){saveCurrentPageToHistory(),r=r||location.pathname+location.search;const v=getCachedHistory(r);if(v){const b=makeFragment(v.content),_=getHistoryElement(),g=makeSettleInfo(_);handleTitle(v.title),handlePreservedElements(b),swapInnerHTML(_,b,g),restorePreservedElements(),settleImmediately(g.tasks),getWindow().setTimeout(function(){window.scrollTo(0,v.scroll)},0),currentPathForHistory=r,triggerEvent(getDocument().body,"htmx:historyRestore",{path:r,item:v})}else htmx.config.refreshOnHistoryMiss?window.location.reload(!0):loadHistoryFromServer(r)}function addRequestIndicatorClasses(r){let v=findAttributeTargets(r,"hx-indicator");return v==null&&(v=[r]),forEach(v,function(b){const _=getInternalData(b);_.requestCount=(_.requestCount||0)+1,b.classList.add.call(b.classList,htmx.config.requestClass)}),v}function disableElements(r){let v=findAttributeTargets(r,"hx-disabled-elt");return v==null&&(v=[]),forEach(v,function(b){const _=getInternalData(b);_.requestCount=(_.requestCount||0)+1,b.setAttribute("disabled",""),b.setAttribute("data-disabled-by-htmx","")}),v}function removeRequestIndicators(r,v){forEach(r.concat(v),function(b){const _=getInternalData(b);_.requestCount=(_.requestCount||1)-1}),forEach(r,function(b){getInternalData(b).requestCount===0&&b.classList.remove.call(b.classList,htmx.config.requestClass)}),forEach(v,function(b){getInternalData(b).requestCount===0&&(b.removeAttribute("disabled"),b.removeAttribute("data-disabled-by-htmx"))})}function haveSeenNode(r,v){for(let b=0;b<r.length;b++)if(r[b].isSameNode(v))return!0;return!1}function shouldInclude(r){const v=r;return v.name===""||v.name==null||v.disabled||closest(v,"fieldset[disabled]")||v.type==="button"||v.type==="submit"||v.tagName==="image"||v.tagName==="reset"||v.tagName==="file"?!1:v.type==="checkbox"||v.type==="radio"?v.checked:!0}function addValueToFormData(r,v,b){r!=null&&v!=null&&(Array.isArray(v)?v.forEach(function(_){b.append(r,_)}):b.append(r,v))}function removeValueFromFormData(r,v,b){if(r!=null&&v!=null){let _=b.getAll(r);Array.isArray(v)?_=_.filter(g=>v.indexOf(g)<0):_=_.filter(g=>g!==v),b.delete(r),forEach(_,g=>b.append(r,g))}}function processInputValue(r,v,b,_,g){if(!(_==null||haveSeenNode(r,_))){if(r.push(_),shouldInclude(_)){const O=getRawAttribute(_,"name");let R=_.value;_ instanceof HTMLSelectElement&&_.multiple&&(R=toArray(_.querySelectorAll("option:checked")).map(function(J){return J.value})),_ instanceof HTMLInputElement&&_.files&&(R=toArray(_.files)),addValueToFormData(O,R,v),g&&validateElement(_,b)}_ instanceof HTMLFormElement&&(forEach(_.elements,function(O){r.indexOf(O)>=0?removeValueFromFormData(O.name,O.value,v):r.push(O),g&&validateElement(O,b)}),new FormData(_).forEach(function(O,R){O instanceof File&&O.name===""||addValueToFormData(R,O,v)}))}}function validateElement(r,v){const b=r;b.willValidate&&(triggerEvent(b,"htmx:validation:validate"),b.checkValidity()||(v.push({elt:b,message:b.validationMessage,validity:b.validity}),triggerEvent(b,"htmx:validation:failed",{message:b.validationMessage,validity:b.validity})))}function overrideFormData(r,v){for(const b of v.keys())r.delete(b);return v.forEach(function(b,_){r.append(_,b)}),r}function getInputValues(r,v){const b=[],_=new FormData,g=new FormData,O=[],R=getInternalData(r);R.lastButtonClicked&&!bodyContains(R.lastButtonClicked)&&(R.lastButtonClicked=null);let J=r instanceof HTMLFormElement&&r.noValidate!==!0||getAttributeValue(r,"hx-validate")==="true";if(R.lastButtonClicked&&(J=J&&R.lastButtonClicked.formNoValidate!==!0),v!=="get"&&processInputValue(b,g,O,closest(r,"form"),J),processInputValue(b,_,O,r,J),R.lastButtonClicked||r.tagName==="BUTTON"||r.tagName==="INPUT"&&getRawAttribute(r,"type")==="submit"){const C=R.lastButtonClicked||r,we=getRawAttribute(C,"name");addValueToFormData(we,C.value,g)}const Z=findAttributeTargets(r,"hx-include");return forEach(Z,function(C){processInputValue(b,_,O,asElement(C),J),matches(C,"form")||forEach(asParentNode(C).querySelectorAll(INPUT_SELECTOR),function(we){processInputValue(b,_,O,we,J)})}),overrideFormData(_,g),{errors:O,formData:_,values:formDataProxy(_)}}function appendParam(r,v,b){r!==""&&(r+="&"),String(b)==="[object Object]"&&(b=JSON.stringify(b));const _=encodeURIComponent(b);return r+=encodeURIComponent(v)+"="+_,r}function urlEncode(r){r=formDataFromObject(r);let v="";return r.forEach(function(b,_){v=appendParam(v,_,b)}),v}function getHeaders(r,v,b){const _={"HX-Request":"true","HX-Trigger":getRawAttribute(r,"id"),"HX-Trigger-Name":getRawAttribute(r,"name"),"HX-Target":getAttributeValue(v,"id"),"HX-Current-URL":getDocument().location.href};return getValuesForElement(r,"hx-headers",!1,_),b!==void 0&&(_["HX-Prompt"]=b),getInternalData(r).boosted&&(_["HX-Boosted"]="true"),_}function filterValues(r,v){const b=getClosestAttributeValue(v,"hx-params");if(b){if(b==="none")return new FormData;if(b==="*")return r;if(b.indexOf("not ")===0)return forEach(b.slice(4).split(","),function(_){_=_.trim(),r.delete(_)}),r;{const _=new FormData;return forEach(b.split(","),function(g){g=g.trim(),r.has(g)&&r.getAll(g).forEach(function(O){_.append(g,O)})}),_}}else return r}function isAnchorLink(r){return!!getRawAttribute(r,"href")&&getRawAttribute(r,"href").indexOf("#")>=0}function getSwapSpecification(r,v){const b=v||getClosestAttributeValue(r,"hx-swap"),_={swapStyle:getInternalData(r).boosted?"innerHTML":htmx.config.defaultSwapStyle,swapDelay:htmx.config.defaultSwapDelay,settleDelay:htmx.config.defaultSettleDelay};if(htmx.config.scrollIntoViewOnBoost&&getInternalData(r).boosted&&!isAnchorLink(r)&&(_.show="top"),b){const R=splitOnWhitespace(b);if(R.length>0)for(let J=0;J<R.length;J++){const Z=R[J];if(Z.indexOf("swap:")===0)_.swapDelay=parseInterval(Z.slice(5));else if(Z.indexOf("settle:")===0)_.settleDelay=parseInterval(Z.slice(7));else if(Z.indexOf("transition:")===0)_.transition=Z.slice(11)==="true";else if(Z.indexOf("ignoreTitle:")===0)_.ignoreTitle=Z.slice(12)==="true";else if(Z.indexOf("scroll:")===0){var g=Z.slice(7).split(":");const we=g.pop();var O=g.length>0?g.join(":"):null;_.scroll=we,_.scrollTarget=O}else if(Z.indexOf("show:")===0){var g=Z.slice(5).split(":");const Be=g.pop();var O=g.length>0?g.join(":"):null;_.show=Be,_.showTarget=O}else if(Z.indexOf("focus-scroll:")===0){const C=Z.slice(13);_.focusScroll=C=="true"}else J==0?_.swapStyle=Z:logError("Unknown modifier in hx-swap: "+Z)}}return _}function usesFormData(r){return getClosestAttributeValue(r,"hx-encoding")==="multipart/form-data"||matches(r,"form")&&getRawAttribute(r,"enctype")==="multipart/form-data"}function encodeParamsForBody(r,v,b){let _=null;return withExtensions(v,function(g){_==null&&(_=g.encodeParameters(r,b,v))}),_??(usesFormData(v)?overrideFormData(new FormData,formDataFromObject(b)):urlEncode(b))}function makeSettleInfo(r){return{tasks:[],elts:[r]}}function updateScrollState(r,v){const b=r[0],_=r[r.length-1];if(v.scroll){var g=null;v.scrollTarget&&(g=asElement(querySelectorExt(b,v.scrollTarget))),v.scroll==="top"&&(b||g)&&(g=g||b,g.scrollTop=0),v.scroll==="bottom"&&(_||g)&&(g=g||_,g.scrollTop=g.scrollHeight)}if(v.show){var g=null;if(v.showTarget){let R=v.showTarget;v.showTarget==="window"&&(R="body"),g=asElement(querySelectorExt(b,R))}v.show==="top"&&(b||g)&&(g=g||b,g.scrollIntoView({block:"start",behavior:htmx.config.scrollBehavior})),v.show==="bottom"&&(_||g)&&(g=g||_,g.scrollIntoView({block:"end",behavior:htmx.config.scrollBehavior}))}}function getValuesForElement(r,v,b,_){if(_==null&&(_={}),r==null)return _;const g=getAttributeValue(r,v);if(g){let O=g.trim(),R=b;if(O==="unset")return null;O.indexOf("javascript:")===0?(O=O.slice(11),R=!0):O.indexOf("js:")===0&&(O=O.slice(3),R=!0),O.indexOf("{")!==0&&(O="{"+O+"}");let J;R?J=maybeEval(r,function(){return Function("return ("+O+")")()},{}):J=parseJSON(O);for(const Z in J)J.hasOwnProperty(Z)&&_[Z]==null&&(_[Z]=J[Z])}return getValuesForElement(asElement(parentElt(r)),v,b,_)}function maybeEval(r,v,b){return htmx.config.allowEval?v():(triggerErrorEvent(r,"htmx:evalDisallowedError"),b)}function getHXVarsForElement(r,v){return getValuesForElement(r,"hx-vars",!0,v)}function getHXValsForElement(r,v){return getValuesForElement(r,"hx-vals",!1,v)}function getExpressionVars(r){return mergeObjects(getHXVarsForElement(r),getHXValsForElement(r))}function safelySetHeaderValue(r,v,b){if(b!==null)try{r.setRequestHeader(v,b)}catch{r.setRequestHeader(v,encodeURIComponent(b)),r.setRequestHeader(v+"-URI-AutoEncoded","true")}}function getPathFromResponse(r){if(r.responseURL&&typeof URL<"u")try{const v=new URL(r.responseURL);return v.pathname+v.search}catch{triggerErrorEvent(getDocument().body,"htmx:badResponseUrl",{url:r.responseURL})}}function hasHeader(r,v){return v.test(r.getAllResponseHeaders())}function ajaxHelper(r,v,b){if(r=r.toLowerCase(),b){if(b instanceof Element||typeof b=="string")return issueAjaxRequest(r,v,null,null,{targetOverride:resolveTarget(b)||DUMMY_ELT,returnPromise:!0});{let _=resolveTarget(b.target);return(b.target&&!_||b.source&&!_&&!resolveTarget(b.source))&&(_=DUMMY_ELT),issueAjaxRequest(r,v,resolveTarget(b.source),b.event,{handler:b.handler,headers:b.headers,values:b.values,targetOverride:_,swapOverride:b.swap,select:b.select,returnPromise:!0})}}else return issueAjaxRequest(r,v,null,null,{returnPromise:!0})}function hierarchyForElt(r){const v=[];for(;r;)v.push(r),r=r.parentElement;return v}function verifyPath(r,v,b){let _,g;return typeof URL=="function"?(g=new URL(v,document.location.href),_=document.location.origin===g.origin):(g=v,_=startsWith(v,document.location.origin)),htmx.config.selfRequestsOnly&&!_?!1:triggerEvent(r,"htmx:validateUrl",mergeObjects({url:g,sameHost:_},b))}function formDataFromObject(r){if(r instanceof FormData)return r;const v=new FormData;for(const b in r)r.hasOwnProperty(b)&&(r[b]&&typeof r[b].forEach=="function"?r[b].forEach(function(_){v.append(b,_)}):typeof r[b]=="object"&&!(r[b]instanceof Blob)?v.append(b,JSON.stringify(r[b])):v.append(b,r[b]));return v}function formDataArrayProxy(r,v,b){return new Proxy(b,{get:function(_,g){return typeof g=="number"?_[g]:g==="length"?_.length:g==="push"?function(O){_.push(O),r.append(v,O)}:typeof _[g]=="function"?function(){_[g].apply(_,arguments),r.delete(v),_.forEach(function(O){r.append(v,O)})}:_[g]&&_[g].length===1?_[g][0]:_[g]},set:function(_,g,O){return _[g]=O,r.delete(v),_.forEach(function(R){r.append(v,R)}),!0}})}function formDataProxy(r){return new Proxy(r,{get:function(v,b){if(typeof b=="symbol"){const g=Reflect.get(v,b);return typeof g=="function"?function(){return g.apply(r,arguments)}:g}if(b==="toJSON")return()=>Object.fromEntries(r);if(b in v)return typeof v[b]=="function"?function(){return r[b].apply(r,arguments)}:v[b];const _=r.getAll(b);if(_.length!==0)return _.length===1?_[0]:formDataArrayProxy(v,b,_)},set:function(v,b,_){return typeof b!="string"?!1:(v.delete(b),_&&typeof _.forEach=="function"?_.forEach(function(g){v.append(b,g)}):typeof _=="object"&&!(_ instanceof Blob)?v.append(b,JSON.stringify(_)):v.append(b,_),!0)},deleteProperty:function(v,b){return typeof b=="string"&&v.delete(b),!0},ownKeys:function(v){return Reflect.ownKeys(Object.fromEntries(v))},getOwnPropertyDescriptor:function(v,b){return Reflect.getOwnPropertyDescriptor(Object.fromEntries(v),b)}})}function issueAjaxRequest(r,v,b,_,g,O){let R=null,J=null;if(g=g??{},g.returnPromise&&typeof Promise<"u")var Z=new Promise(function(K,Ee){R=K,J=Ee});b==null&&(b=getDocument().body);const C=g.handler||handleAjaxResponse,we=g.select||null;if(!bodyContains(b))return maybeCall(R),Z;const Be=g.targetOverride||asElement(getTarget(b));if(Be==null||Be==DUMMY_ELT)return triggerErrorEvent(b,"htmx:targetError",{target:getAttributeValue(b,"hx-target")}),maybeCall(J),Z;let Ue=getInternalData(b);const Q=Ue.lastButtonClicked;if(Q){const K=getRawAttribute(Q,"formaction");K!=null&&(v=K);const Ee=getRawAttribute(Q,"formmethod");Ee!=null&&Ee.toLowerCase()!=="dialog"&&(r=Ee)}const Ke=getClosestAttributeValue(b,"hx-confirm");if(O===void 0&&triggerEvent(b,"htmx:confirm",{target:Be,elt:b,path:v,verb:r,triggeringEvent:_,etc:g,issueRequest:function(nt){return issueAjaxRequest(r,v,b,_,g,!!nt)},question:Ke})===!1)return maybeCall(R),Z;let At=b,gt=getClosestAttributeValue(b,"hx-sync"),q=null,ne=!1;if(gt){const K=gt.split(":"),Ee=K[0].trim();if(Ee==="this"?At=findThisElement(b,"hx-sync"):At=asElement(querySelectorExt(b,Ee)),gt=(K[1]||"drop").trim(),Ue=getInternalData(At),gt==="drop"&&Ue.xhr&&Ue.abortable!==!0)return maybeCall(R),Z;if(gt==="abort"){if(Ue.xhr)return maybeCall(R),Z;ne=!0}else gt==="replace"?triggerEvent(At,"htmx:abort"):gt.indexOf("queue")===0&&(q=(gt.split(" ")[1]||"last").trim())}if(Ue.xhr)if(Ue.abortable)triggerEvent(At,"htmx:abort");else{if(q==null){if(_){const K=getInternalData(_);K&&K.triggerSpec&&K.triggerSpec.queue&&(q=K.triggerSpec.queue)}q==null&&(q="last")}return Ue.queuedRequests==null&&(Ue.queuedRequests=[]),q==="first"&&Ue.queuedRequests.length===0?Ue.queuedRequests.push(function(){issueAjaxRequest(r,v,b,_,g)}):q==="all"?Ue.queuedRequests.push(function(){issueAjaxRequest(r,v,b,_,g)}):q==="last"&&(Ue.queuedRequests=[],Ue.queuedRequests.push(function(){issueAjaxRequest(r,v,b,_,g)})),maybeCall(R),Z}const c=new XMLHttpRequest;Ue.xhr=c,Ue.abortable=ne;const W=function(){Ue.xhr=null,Ue.abortable=!1,Ue.queuedRequests!=null&&Ue.queuedRequests.length>0&&Ue.queuedRequests.shift()()},Re=getClosestAttributeValue(b,"hx-prompt");if(Re){var tt=prompt(Re);if(tt===null||!triggerEvent(b,"htmx:prompt",{prompt:tt,target:Be}))return maybeCall(R),W(),Z}if(Ke&&!O&&!confirm(Ke))return maybeCall(R),W(),Z;let st=getHeaders(b,Be,tt);r!=="get"&&!usesFormData(b)&&(st["Content-Type"]="application/x-www-form-urlencoded"),g.headers&&(st=mergeObjects(st,g.headers));const et=getInputValues(b,r);let je=et.errors;const S=et.formData;g.values&&overrideFormData(S,formDataFromObject(g.values));const si=formDataFromObject(getExpressionVars(b)),ct=overrideFormData(S,si);let xt=filterValues(ct,b);htmx.config.getCacheBusterParam&&r==="get"&&xt.set("org.htmx.cache-buster",getRawAttribute(Be,"id")||"true"),(v==null||v==="")&&(v=getDocument().location.href);const ce=getValuesForElement(b,"hx-request"),G=getInternalData(b).boosted;let P=htmx.config.methodsThatUseUrlParams.indexOf(r)>=0;const k={boosted:G,useUrlParams:P,formData:xt,parameters:formDataProxy(xt),unfilteredFormData:ct,unfilteredParameters:formDataProxy(ct),headers:st,target:Be,verb:r,errors:je,withCredentials:g.credentials||ce.credentials||htmx.config.withCredentials,timeout:g.timeout||ce.timeout||htmx.config.timeout,path:v,triggeringEvent:_};if(!triggerEvent(b,"htmx:configRequest",k))return maybeCall(R),W(),Z;if(v=k.path,r=k.verb,st=k.headers,xt=formDataFromObject(k.parameters),je=k.errors,P=k.useUrlParams,je&&je.length>0)return triggerEvent(b,"htmx:validation:halted",k),maybeCall(R),W(),Z;const N=v.split("#"),Y=N[0],ve=N[1];let Oe=v;if(P&&(Oe=Y,!xt.keys().next().done&&(Oe.indexOf("?")<0?Oe+="?":Oe+="&",Oe+=urlEncode(xt),ve&&(Oe+="#"+ve))),!verifyPath(b,Oe,k))return triggerErrorEvent(b,"htmx:invalidPath",k),maybeCall(J),Z;if(c.open(r.toUpperCase(),Oe,!0),c.overrideMimeType("text/html"),c.withCredentials=k.withCredentials,c.timeout=k.timeout,!ce.noHeaders){for(const K in st)if(st.hasOwnProperty(K)){const Ee=st[K];safelySetHeaderValue(c,K,Ee)}}const Ne={xhr:c,target:Be,requestConfig:k,etc:g,boosted:G,select:we,pathInfo:{requestPath:v,finalRequestPath:Oe,responsePath:null,anchor:ve}};if(c.onload=function(){try{const K=hierarchyForElt(b);if(Ne.pathInfo.responsePath=getPathFromResponse(c),C(b,Ne),Ne.keepIndicators!==!0&&removeRequestIndicators(Ve,Ye),triggerEvent(b,"htmx:afterRequest",Ne),triggerEvent(b,"htmx:afterOnLoad",Ne),!bodyContains(b)){let Ee=null;for(;K.length>0&&Ee==null;){const nt=K.shift();bodyContains(nt)&&(Ee=nt)}Ee&&(triggerEvent(Ee,"htmx:afterRequest",Ne),triggerEvent(Ee,"htmx:afterOnLoad",Ne))}maybeCall(R),W()}catch(K){throw triggerErrorEvent(b,"htmx:onLoadError",mergeObjects({error:K},Ne)),K}},c.onerror=function(){removeRequestIndicators(Ve,Ye),triggerErrorEvent(b,"htmx:afterRequest",Ne),triggerErrorEvent(b,"htmx:sendError",Ne),maybeCall(J),W()},c.onabort=function(){removeRequestIndicators(Ve,Ye),triggerErrorEvent(b,"htmx:afterRequest",Ne),triggerErrorEvent(b,"htmx:sendAbort",Ne),maybeCall(J),W()},c.ontimeout=function(){removeRequestIndicators(Ve,Ye),triggerErrorEvent(b,"htmx:afterRequest",Ne),triggerErrorEvent(b,"htmx:timeout",Ne),maybeCall(J),W()},!triggerEvent(b,"htmx:beforeRequest",Ne))return maybeCall(R),W(),Z;var Ve=addRequestIndicatorClasses(b),Ye=disableElements(b);forEach(["loadstart","loadend","progress","abort"],function(K){forEach([c,c.upload],function(Ee){Ee.addEventListener(K,function(nt){triggerEvent(b,"htmx:xhr:"+K,{lengthComputable:nt.lengthComputable,loaded:nt.loaded,total:nt.total})})})}),triggerEvent(b,"htmx:beforeSend",Ne);const Lt=P?null:encodeParamsForBody(c,b,xt);return c.send(Lt),Z}function determineHistoryUpdates(r,v){const b=v.xhr;let _=null,g=null;if(hasHeader(b,/HX-Push:/i)?(_=b.getResponseHeader("HX-Push"),g="push"):hasHeader(b,/HX-Push-Url:/i)?(_=b.getResponseHeader("HX-Push-Url"),g="push"):hasHeader(b,/HX-Replace-Url:/i)&&(_=b.getResponseHeader("HX-Replace-Url"),g="replace"),_)return _==="false"?{}:{type:g,path:_};const O=v.pathInfo.finalRequestPath,R=v.pathInfo.responsePath,J=getClosestAttributeValue(r,"hx-push-url"),Z=getClosestAttributeValue(r,"hx-replace-url"),C=getInternalData(r).boosted;let we=null,Be=null;return J?(we="push",Be=J):Z?(we="replace",Be=Z):C&&(we="push",Be=R||O),Be?Be==="false"?{}:(Be==="true"&&(Be=R||O),v.pathInfo.anchor&&Be.indexOf("#")===-1&&(Be=Be+"#"+v.pathInfo.anchor),{type:we,path:Be}):{}}function codeMatches(r,v){var b=new RegExp(r.code);return b.test(v.toString(10))}function resolveResponseHandling(r){for(var v=0;v<htmx.config.responseHandling.length;v++){var b=htmx.config.responseHandling[v];if(codeMatches(b,r.status))return b}return{swap:!1}}function handleTitle(r){if(r){const v=find("title");v?v.innerHTML=r:window.document.title=r}}function handleAjaxResponse(r,v){const b=v.xhr;let _=v.target;const g=v.etc,O=v.select;if(!triggerEvent(r,"htmx:beforeOnLoad",v))return;if(hasHeader(b,/HX-Trigger:/i)&&handleTriggerHeader(b,"HX-Trigger",r),hasHeader(b,/HX-Location:/i)){saveCurrentPageToHistory();let ne=b.getResponseHeader("HX-Location");var R;ne.indexOf("{")===0&&(R=parseJSON(ne),ne=R.path,delete R.path),ajaxHelper("get",ne,R).then(function(){pushUrlIntoHistory(ne)});return}const J=hasHeader(b,/HX-Refresh:/i)&&b.getResponseHeader("HX-Refresh")==="true";if(hasHeader(b,/HX-Redirect:/i)){v.keepIndicators=!0,location.href=b.getResponseHeader("HX-Redirect"),J&&location.reload();return}if(J){v.keepIndicators=!0,location.reload();return}hasHeader(b,/HX-Retarget:/i)&&(b.getResponseHeader("HX-Retarget")==="this"?v.target=r:v.target=asElement(querySelectorExt(r,b.getResponseHeader("HX-Retarget"))));const Z=determineHistoryUpdates(r,v),C=resolveResponseHandling(b),we=C.swap;let Be=!!C.error,Ue=htmx.config.ignoreTitle||C.ignoreTitle,Q=C.select;C.target&&(v.target=asElement(querySelectorExt(r,C.target)));var Ke=g.swapOverride;Ke==null&&C.swapOverride&&(Ke=C.swapOverride),hasHeader(b,/HX-Retarget:/i)&&(b.getResponseHeader("HX-Retarget")==="this"?v.target=r:v.target=asElement(querySelectorExt(r,b.getResponseHeader("HX-Retarget")))),hasHeader(b,/HX-Reswap:/i)&&(Ke=b.getResponseHeader("HX-Reswap"));var At=b.response,gt=mergeObjects({shouldSwap:we,serverResponse:At,isError:Be,ignoreTitle:Ue,selectOverride:Q,swapOverride:Ke},v);if(!(C.event&&!triggerEvent(_,C.event,gt))&&triggerEvent(_,"htmx:beforeSwap",gt)){if(_=gt.target,At=gt.serverResponse,Be=gt.isError,Ue=gt.ignoreTitle,Q=gt.selectOverride,Ke=gt.swapOverride,v.target=_,v.failed=Be,v.successful=!Be,gt.shouldSwap){b.status===286&&cancelPolling(r),withExtensions(r,function(et){At=et.transformResponse(At,b,r)}),Z.type&&saveCurrentPageToHistory();var q=getSwapSpecification(r,Ke);q.hasOwnProperty("ignoreTitle")||(q.ignoreTitle=Ue),_.classList.add(htmx.config.swappingClass);let ne=null,c=null;O&&(Q=O),hasHeader(b,/HX-Reselect:/i)&&(Q=b.getResponseHeader("HX-Reselect"));const W=getClosestAttributeValue(r,"hx-select-oob"),Re=getClosestAttributeValue(r,"hx-select");let tt=function(){try{Z.type&&(triggerEvent(getDocument().body,"htmx:beforeHistoryUpdate",mergeObjects({history:Z},v)),Z.type==="push"?(pushUrlIntoHistory(Z.path),triggerEvent(getDocument().body,"htmx:pushedIntoHistory",{path:Z.path})):(replaceUrlInHistory(Z.path),triggerEvent(getDocument().body,"htmx:replacedInHistory",{path:Z.path}))),swap(_,At,q,{select:Q||Re,selectOOB:W,eventInfo:v,anchor:v.pathInfo.anchor,contextElement:r,afterSwapCallback:function(){if(hasHeader(b,/HX-Trigger-After-Swap:/i)){let et=r;bodyContains(r)||(et=getDocument().body),handleTriggerHeader(b,"HX-Trigger-After-Swap",et)}},afterSettleCallback:function(){if(hasHeader(b,/HX-Trigger-After-Settle:/i)){let et=r;bodyContains(r)||(et=getDocument().body),handleTriggerHeader(b,"HX-Trigger-After-Settle",et)}maybeCall(ne)}})}catch(et){throw triggerErrorEvent(r,"htmx:swapError",v),maybeCall(c),et}},st=htmx.config.globalViewTransitions;if(q.hasOwnProperty("transition")&&(st=q.transition),st&&triggerEvent(r,"htmx:beforeTransition",v)&&typeof Promise<"u"&&document.startViewTransition){const et=new Promise(function(S,si){ne=S,c=si}),je=tt;tt=function(){document.startViewTransition(function(){return je(),et})}}q.swapDelay>0?getWindow().setTimeout(tt,q.swapDelay):tt()}Be&&triggerErrorEvent(r,"htmx:responseError",mergeObjects({error:"Response Status Error Code "+b.status+" from "+v.pathInfo.requestPath},v))}}const extensions={};function extensionBase(){return{init:function(r){return null},getSelectors:function(){return null},onEvent:function(r,v){return!0},transformResponse:function(r,v,b){return r},isInlineSwap:function(r){return!1},handleSwap:function(r,v,b,_){return!1},encodeParameters:function(r,v,b){return null}}}function defineExtension(r,v){v.init&&v.init(internalAPI),extensions[r]=mergeObjects(extensionBase(),v)}function removeExtension(r){delete extensions[r]}function getExtensions(r,v,b){if(v==null&&(v=[]),r==null)return v;b==null&&(b=[]);const _=getAttributeValue(r,"hx-ext");return _&&forEach(_.split(","),function(g){if(g=g.replace(/ /g,""),g.slice(0,7)=="ignore:"){b.push(g.slice(7));return}if(b.indexOf(g)<0){const O=extensions[g];O&&v.indexOf(O)<0&&v.push(O)}}),getExtensions(asElement(parentElt(r)),v,b)}var isReady=!1;getDocument().addEventListener("DOMContentLoaded",function(){isReady=!0});function ready(r){isReady||getDocument().readyState==="complete"?r():getDocument().addEventListener("DOMContentLoaded",r)}function insertIndicatorStyles(){if(htmx.config.includeIndicatorStyles!==!1){const r=htmx.config.inlineStyleNonce?` nonce="${htmx.config.inlineStyleNonce}"`:"";getDocument().head.insertAdjacentHTML("beforeend","<style"+r+">      ."+htmx.config.indicatorClass+"{opacity:0}      ."+htmx.config.requestClass+" ."+htmx.config.indicatorClass+"{opacity:1; transition: opacity 200ms ease-in;}      ."+htmx.config.requestClass+"."+htmx.config.indicatorClass+"{opacity:1; transition: opacity 200ms ease-in;}      </style>")}}function getMetaConfig(){const r=getDocument().querySelector('meta[name="htmx-config"]');return r?parseJSON(r.content):null}function mergeMetaConfig(){const r=getMetaConfig();r&&(htmx.config=mergeObjects(htmx.config,r))}return ready(function(){mergeMetaConfig(),insertIndicatorStyles();let r=getDocument().body;processNode(r);const v=getDocument().querySelectorAll("[hx-trigger='restored'],[data-hx-trigger='restored']");r.addEventListener("htmx:abort",function(_){const g=_.target,O=getInternalData(g);O&&O.xhr&&O.xhr.abort()});const b=window.onpopstate?window.onpopstate.bind(window):null;window.onpopstate=function(_){_.state&&_.state.htmx?(restoreHistory(),forEach(v,function(g){triggerEvent(g,"htmx:restored",{document:getDocument(),triggerEvent})})):b&&b(_)},getWindow().setTimeout(function(){triggerEvent(r,"htmx:load",{}),r=null},0)}),htmx}();__webpack_exports__.A=htmx},"./node_modules/jquery/dist/jquery.js":function(r,v){var b,_;(function(g,O){"use strict";typeof r.exports=="object"?r.exports=g.document?O(g,!0):function(R){if(!R.document)throw new Error("jQuery requires a window with a document");return O(R)}:O(g)})(typeof window<"u"?window:this,function(g,O){"use strict";var R=[],J=Object.getPrototypeOf,Z=R.slice,C=R.flat?function(o){return R.flat.call(o)}:function(o){return R.concat.apply([],o)},we=R.push,Be=R.indexOf,Ue={},Q=Ue.toString,Ke=Ue.hasOwnProperty,At=Ke.toString,gt=At.call(Object),q={},ne=function(d){return typeof d=="function"&&typeof d.nodeType!="number"&&typeof d.item!="function"},c=function(d){return d!=null&&d===d.window},W=g.document,Re={type:!0,src:!0,nonce:!0,noModule:!0};function tt(o,d,w){w=w||W;var E,M,D=w.createElement("script");if(D.text=o,d)for(E in Re)M=d[E]||d.getAttribute&&d.getAttribute(E),M&&D.setAttribute(E,M);w.head.appendChild(D).parentNode.removeChild(D)}function st(o){return o==null?o+"":typeof o=="object"||typeof o=="function"?Ue[Q.call(o)]||"object":typeof o}var et="3.7.1",je=/HTML$/i,S=function(o,d){return new S.fn.init(o,d)};S.fn=S.prototype={jquery:et,constructor:S,length:0,toArray:function(){return Z.call(this)},get:function(o){return o==null?Z.call(this):o<0?this[o+this.length]:this[o]},pushStack:function(o){var d=S.merge(this.constructor(),o);return d.prevObject=this,d},each:function(o){return S.each(this,o)},map:function(o){return this.pushStack(S.map(this,function(d,w){return o.call(d,w,d)}))},slice:function(){return this.pushStack(Z.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(S.grep(this,function(o,d){return(d+1)%2}))},odd:function(){return this.pushStack(S.grep(this,function(o,d){return d%2}))},eq:function(o){var d=this.length,w=+o+(o<0?d:0);return this.pushStack(w>=0&&w<d?[this[w]]:[])},end:function(){return this.prevObject||this.constructor()},push:we,sort:R.sort,splice:R.splice},S.extend=S.fn.extend=function(){var o,d,w,E,M,D,V=arguments[0]||{},fe=1,le=arguments.length,Me=!1;for(typeof V=="boolean"&&(Me=V,V=arguments[fe]||{},fe++),typeof V!="object"&&!ne(V)&&(V={}),fe===le&&(V=this,fe--);fe<le;fe++)if((o=arguments[fe])!=null)for(d in o)E=o[d],!(d==="__proto__"||V===E)&&(Me&&E&&(S.isPlainObject(E)||(M=Array.isArray(E)))?(w=V[d],M&&!Array.isArray(w)?D=[]:!M&&!S.isPlainObject(w)?D={}:D=w,M=!1,V[d]=S.extend(Me,D,E)):E!==void 0&&(V[d]=E));return V},S.extend({expando:"jQuery"+(et+Math.random()).replace(/\D/g,""),isReady:!0,error:function(o){throw new Error(o)},noop:function(){},isPlainObject:function(o){var d,w;return!o||Q.call(o)!=="[object Object]"?!1:(d=J(o),d?(w=Ke.call(d,"constructor")&&d.constructor,typeof w=="function"&&At.call(w)===gt):!0)},isEmptyObject:function(o){var d;for(d in o)return!1;return!0},globalEval:function(o,d,w){tt(o,{nonce:d&&d.nonce},w)},each:function(o,d){var w,E=0;if(si(o))for(w=o.length;E<w&&d.call(o[E],E,o[E])!==!1;E++);else for(E in o)if(d.call(o[E],E,o[E])===!1)break;return o},text:function(o){var d,w="",E=0,M=o.nodeType;if(!M)for(;d=o[E++];)w+=S.text(d);return M===1||M===11?o.textContent:M===9?o.documentElement.textContent:M===3||M===4?o.nodeValue:w},makeArray:function(o,d){var w=d||[];return o!=null&&(si(Object(o))?S.merge(w,typeof o=="string"?[o]:o):we.call(w,o)),w},inArray:function(o,d,w){return d==null?-1:Be.call(d,o,w)},isXMLDoc:function(o){var d=o&&o.namespaceURI,w=o&&(o.ownerDocument||o).documentElement;return!je.test(d||w&&w.nodeName||"HTML")},merge:function(o,d){for(var w=+d.length,E=0,M=o.length;E<w;E++)o[M++]=d[E];return o.length=M,o},grep:function(o,d,w){for(var E,M=[],D=0,V=o.length,fe=!w;D<V;D++)E=!d(o[D],D),E!==fe&&M.push(o[D]);return M},map:function(o,d,w){var E,M,D=0,V=[];if(si(o))for(E=o.length;D<E;D++)M=d(o[D],D,w),M!=null&&V.push(M);else for(D in o)M=d(o[D],D,w),M!=null&&V.push(M);return C(V)},guid:1,support:q}),typeof Symbol=="function"&&(S.fn[Symbol.iterator]=R[Symbol.iterator]),S.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(o,d){Ue["[object "+d+"]"]=d.toLowerCase()});function si(o){var d=!!o&&"length"in o&&o.length,w=st(o);return ne(o)||c(o)?!1:w==="array"||d===0||typeof d=="number"&&d>0&&d-1 in o}function ct(o,d){return o.nodeName&&o.nodeName.toLowerCase()===d.toLowerCase()}var xt=R.pop,ce=R.sort,G=R.splice,P="[\\x20\\t\\r\\n\\f]",k=new RegExp("^"+P+"+|((?:^|[^\\\\])(?:\\\\.)*)"+P+"+$","g");S.contains=function(o,d){var w=d&&d.parentNode;return o===w||!!(w&&w.nodeType===1&&(o.contains?o.contains(w):o.compareDocumentPosition&&o.compareDocumentPosition(w)&16))};var N=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g;function Y(o,d){return d?o==="\0"?"\uFFFD":o.slice(0,-1)+"\\"+o.charCodeAt(o.length-1).toString(16)+" ":"\\"+o}S.escapeSelector=function(o){return(o+"").replace(N,Y)};var ve=W,Oe=we;(function(){var o,d,w,E,M,D=Oe,V,fe,le,Me,Ze,Ae=S.expando,ke=0,Tt=0,_i=bo(),$i=bo(),Ei=bo(),In=bo(),Xi=function(re,xe){return re===xe&&(M=!0),0},Sr="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",rr="(?:\\\\[\\da-fA-F]{1,6}"+P+"?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",Pi="\\["+P+"*("+rr+")(?:"+P+"*([*^$|!~]?=)"+P+`*(?:'((?:\\\\.|[^\\\\'])*)'|"((?:\\\\.|[^\\\\"])*)"|(`+rr+"))|)"+P+"*\\]",Nn=":("+rr+`)(?:\\((('((?:\\\\.|[^\\\\'])*)'|"((?:\\\\.|[^\\\\"])*)")|((?:\\\\.|[^\\\\()[\\]]|`+Pi+")*)|.*)\\)|)",ki=new RegExp(P+"+","g"),Fi=new RegExp("^"+P+"*,"+P+"*"),Or=new RegExp("^"+P+"*([>+~]|"+P+")"+P+"*"),or=new RegExp(P+"|>"),ls=new RegExp(Nn),Fs=new RegExp("^"+rr+"$"),cs={ID:new RegExp("^#("+rr+")"),CLASS:new RegExp("^\\.("+rr+")"),TAG:new RegExp("^("+rr+"|[*])"),ATTR:new RegExp("^"+Pi),PSEUDO:new RegExp("^"+Nn),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+P+"*(even|odd|(([+-]|)(\\d*)n|)"+P+"*(?:([+-]|)"+P+"*(\\d+)|))"+P+"*\\)|)","i"),bool:new RegExp("^(?:"+Sr+")$","i"),needsContext:new RegExp("^"+P+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+P+"*((?:-\\d)?\\d*)"+P+"*\\)|)(?=[^-]|$)","i")},Rs=/^(?:input|select|textarea|button)$/i,ws=/^h\d$/i,Zn=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,Wo=/[+~]/,Is=new RegExp("\\\\[\\da-fA-F]{1,6}"+P+"?|\\\\([^\\r\\n\\f])","g"),Vi=function(re,xe){var We="0x"+re.slice(1)-65536;return xe||(We<0?String.fromCharCode(We+65536):String.fromCharCode(We>>10|55296,We&1023|56320))},Ms=function(){lr()},vo=zn(function(re){return re.disabled===!0&&ct(re,"fieldset")},{dir:"parentNode",next:"legend"});function ar(){try{return V.activeElement}catch{}}try{D.apply(R=Z.call(ve.childNodes),ve.childNodes),R[ve.childNodes.length].nodeType}catch{D={apply:function(xe,We){Oe.apply(xe,Z.call(We))},call:function(xe){Oe.apply(xe,Z.call(arguments,1))}}}function Wi(re,xe,We,Xe){var at,qt,$t,Zt,Vt,Ti,pi,yi=xe&&xe.ownerDocument,Mi=xe?xe.nodeType:9;if(We=We||[],typeof re!="string"||!re||Mi!==1&&Mi!==9&&Mi!==11)return We;if(!Xe&&(lr(xe),xe=xe||V,le)){if(Mi!==11&&(Vt=Zn.exec(re)))if(at=Vt[1]){if(Mi===9)if($t=xe.getElementById(at)){if($t.id===at)return D.call(We,$t),We}else return We;else if(yi&&($t=yi.getElementById(at))&&Wi.contains(xe,$t)&&$t.id===at)return D.call(We,$t),We}else{if(Vt[2])return D.apply(We,xe.getElementsByTagName(re)),We;if((at=Vt[3])&&xe.getElementsByClassName)return D.apply(We,xe.getElementsByClassName(at)),We}if(!In[re+" "]&&(!Me||!Me.test(re))){if(pi=re,yi=xe,Mi===1&&(or.test(re)||Or.test(re))){for(yi=Wo.test(re)&&to(xe.parentNode)||xe,(yi!=xe||!q.scope)&&((Zt=xe.getAttribute("id"))?Zt=S.escapeSelector(Zt):xe.setAttribute("id",Zt=Ae)),Ti=Bn(re),qt=Ti.length;qt--;)Ti[qt]=(Zt?"#"+Zt:":scope")+" "+es(Ti[qt]);pi=Ti.join(",")}try{return D.apply(We,yi.querySelectorAll(pi)),We}catch{In(re,!0)}finally{Zt===Ae&&xe.removeAttribute("id")}}}return Wr(re.replace(k,"$1"),xe,We,Xe)}function bo(){var re=[];function xe(We,Xe){return re.push(We+" ")>d.cacheLength&&delete xe[re.shift()],xe[We+" "]=Xe}return xe}function Ns(re){return re[Ae]=!0,re}function us(re){var xe=V.createElement("fieldset");try{return!!re(xe)}catch{return!1}finally{xe.parentNode&&xe.parentNode.removeChild(xe),xe=null}}function _o(re){return function(xe){return ct(xe,"input")&&xe.type===re}}function Zr(re){return function(xe){return(ct(xe,"input")||ct(xe,"button"))&&xe.type===re}}function eo(re){return function(xe){return"form"in xe?xe.parentNode&&xe.disabled===!1?"label"in xe?"label"in xe.parentNode?xe.parentNode.disabled===re:xe.disabled===re:xe.isDisabled===re||xe.isDisabled!==!re&&vo(xe)===re:xe.disabled===re:"label"in xe?xe.disabled===re:!1}}function xr(re){return Ns(function(xe){return xe=+xe,Ns(function(We,Xe){for(var at,qt=re([],We.length,xe),$t=qt.length;$t--;)We[at=qt[$t]]&&(We[at]=!(Xe[at]=We[at]))})})}function to(re){return re&&typeof re.getElementsByTagName<"u"&&re}function lr(re){var xe,We=re?re.ownerDocument||re:ve;return We==V||We.nodeType!==9||!We.documentElement||(V=We,fe=V.documentElement,le=!S.isXMLDoc(V),Ze=fe.matches||fe.webkitMatchesSelector||fe.msMatchesSelector,fe.msMatchesSelector&&ve!=V&&(xe=V.defaultView)&&xe.top!==xe&&xe.addEventListener("unload",Ms),q.getById=us(function(Xe){return fe.appendChild(Xe).id=S.expando,!V.getElementsByName||!V.getElementsByName(S.expando).length}),q.disconnectedMatch=us(function(Xe){return Ze.call(Xe,"*")}),q.scope=us(function(){return V.querySelectorAll(":scope")}),q.cssHas=us(function(){try{return V.querySelector(":has(*,:jqfake)"),!1}catch{return!0}}),q.getById?(d.filter.ID=function(Xe){var at=Xe.replace(Is,Vi);return function(qt){return qt.getAttribute("id")===at}},d.find.ID=function(Xe,at){if(typeof at.getElementById<"u"&&le){var qt=at.getElementById(Xe);return qt?[qt]:[]}}):(d.filter.ID=function(Xe){var at=Xe.replace(Is,Vi);return function(qt){var $t=typeof qt.getAttributeNode<"u"&&qt.getAttributeNode("id");return $t&&$t.value===at}},d.find.ID=function(Xe,at){if(typeof at.getElementById<"u"&&le){var qt,$t,Zt,Vt=at.getElementById(Xe);if(Vt){if(qt=Vt.getAttributeNode("id"),qt&&qt.value===Xe)return[Vt];for(Zt=at.getElementsByName(Xe),$t=0;Vt=Zt[$t++];)if(qt=Vt.getAttributeNode("id"),qt&&qt.value===Xe)return[Vt]}return[]}}),d.find.TAG=function(Xe,at){return typeof at.getElementsByTagName<"u"?at.getElementsByTagName(Xe):at.querySelectorAll(Xe)},d.find.CLASS=function(Xe,at){if(typeof at.getElementsByClassName<"u"&&le)return at.getElementsByClassName(Xe)},Me=[],us(function(Xe){var at;fe.appendChild(Xe).innerHTML="<a id='"+Ae+"' href='' disabled='disabled'></a><select id='"+Ae+"-\r\\' disabled='disabled'><option selected=''></option></select>",Xe.querySelectorAll("[selected]").length||Me.push("\\["+P+"*(?:value|"+Sr+")"),Xe.querySelectorAll("[id~="+Ae+"-]").length||Me.push("~="),Xe.querySelectorAll("a#"+Ae+"+*").length||Me.push(".#.+[+~]"),Xe.querySelectorAll(":checked").length||Me.push(":checked"),at=V.createElement("input"),at.setAttribute("type","hidden"),Xe.appendChild(at).setAttribute("name","D"),fe.appendChild(Xe).disabled=!0,Xe.querySelectorAll(":disabled").length!==2&&Me.push(":enabled",":disabled"),at=V.createElement("input"),at.setAttribute("name",""),Xe.appendChild(at),Xe.querySelectorAll("[name='']").length||Me.push("\\["+P+"*name"+P+"*="+P+`*(?:''|"")`)}),q.cssHas||Me.push(":has"),Me=Me.length&&new RegExp(Me.join("|")),Xi=function(Xe,at){if(Xe===at)return M=!0,0;var qt=!Xe.compareDocumentPosition-!at.compareDocumentPosition;return qt||(qt=(Xe.ownerDocument||Xe)==(at.ownerDocument||at)?Xe.compareDocumentPosition(at):1,qt&1||!q.sortDetached&&at.compareDocumentPosition(Xe)===qt?Xe===V||Xe.ownerDocument==ve&&Wi.contains(ve,Xe)?-1:at===V||at.ownerDocument==ve&&Wi.contains(ve,at)?1:E?Be.call(E,Xe)-Be.call(E,at):0:qt&4?-1:1)}),V}Wi.matches=function(re,xe){return Wi(re,null,null,xe)},Wi.matchesSelector=function(re,xe){if(lr(re),le&&!In[xe+" "]&&(!Me||!Me.test(xe)))try{var We=Ze.call(re,xe);if(We||q.disconnectedMatch||re.document&&re.document.nodeType!==11)return We}catch{In(xe,!0)}return Wi(xe,V,null,[re]).length>0},Wi.contains=function(re,xe){return(re.ownerDocument||re)!=V&&lr(re),S.contains(re,xe)},Wi.attr=function(re,xe){(re.ownerDocument||re)!=V&&lr(re);var We=d.attrHandle[xe.toLowerCase()],Xe=We&&Ke.call(d.attrHandle,xe.toLowerCase())?We(re,xe,!le):void 0;return Xe!==void 0?Xe:re.getAttribute(xe)},Wi.error=function(re){throw new Error("Syntax error, unrecognized expression: "+re)},S.uniqueSort=function(re){var xe,We=[],Xe=0,at=0;if(M=!q.sortStable,E=!q.sortStable&&Z.call(re,0),ce.call(re,Xi),M){for(;xe=re[at++];)xe===re[at]&&(Xe=We.push(at));for(;Xe--;)G.call(re,We[Xe],1)}return E=null,re},S.fn.uniqueSort=function(){return this.pushStack(S.uniqueSort(Z.apply(this)))},d=S.expr={cacheLength:50,createPseudo:Ns,match:cs,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(re){return re[1]=re[1].replace(Is,Vi),re[3]=(re[3]||re[4]||re[5]||"").replace(Is,Vi),re[2]==="~="&&(re[3]=" "+re[3]+" "),re.slice(0,4)},CHILD:function(re){return re[1]=re[1].toLowerCase(),re[1].slice(0,3)==="nth"?(re[3]||Wi.error(re[0]),re[4]=+(re[4]?re[5]+(re[6]||1):2*(re[3]==="even"||re[3]==="odd")),re[5]=+(re[7]+re[8]||re[3]==="odd")):re[3]&&Wi.error(re[0]),re},PSEUDO:function(re){var xe,We=!re[6]&&re[2];return cs.CHILD.test(re[0])?null:(re[3]?re[2]=re[4]||re[5]||"":We&&ls.test(We)&&(xe=Bn(We,!0))&&(xe=We.indexOf(")",We.length-xe)-We.length)&&(re[0]=re[0].slice(0,xe),re[2]=We.slice(0,xe)),re.slice(0,3))}},filter:{TAG:function(re){var xe=re.replace(Is,Vi).toLowerCase();return re==="*"?function(){return!0}:function(We){return ct(We,xe)}},CLASS:function(re){var xe=_i[re+" "];return xe||(xe=new RegExp("(^|"+P+")"+re+"("+P+"|$)"))&&_i(re,function(We){return xe.test(typeof We.className=="string"&&We.className||typeof We.getAttribute<"u"&&We.getAttribute("class")||"")})},ATTR:function(re,xe,We){return function(Xe){var at=Wi.attr(Xe,re);return at==null?xe==="!=":xe?(at+="",xe==="="?at===We:xe==="!="?at!==We:xe==="^="?We&&at.indexOf(We)===0:xe==="*="?We&&at.indexOf(We)>-1:xe==="$="?We&&at.slice(-We.length)===We:xe==="~="?(" "+at.replace(ki," ")+" ").indexOf(We)>-1:xe==="|="?at===We||at.slice(0,We.length+1)===We+"-":!1):!0}},CHILD:function(re,xe,We,Xe,at){var qt=re.slice(0,3)!=="nth",$t=re.slice(-4)!=="last",Zt=xe==="of-type";return Xe===1&&at===0?function(Vt){return!!Vt.parentNode}:function(Vt,Ti,pi){var yi,Mi,ii,Gi,Ss,ts=qt!==$t?"nextSibling":"previousSibling",ds=Vt.parentNode,Hs=Zt&&Vt.nodeName.toLowerCase(),_n=!pi&&!Zt,fs=!1;if(ds){if(qt){for(;ts;){for(ii=Vt;ii=ii[ts];)if(Zt?ct(ii,Hs):ii.nodeType===1)return!1;Ss=ts=re==="only"&&!Ss&&"nextSibling"}return!0}if(Ss=[$t?ds.firstChild:ds.lastChild],$t&&_n){for(Mi=ds[Ae]||(ds[Ae]={}),yi=Mi[re]||[],Gi=yi[0]===ke&&yi[1],fs=Gi&&yi[2],ii=Gi&&ds.childNodes[Gi];ii=++Gi&&ii&&ii[ts]||(fs=Gi=0)||Ss.pop();)if(ii.nodeType===1&&++fs&&ii===Vt){Mi[re]=[ke,Gi,fs];break}}else if(_n&&(Mi=Vt[Ae]||(Vt[Ae]={}),yi=Mi[re]||[],Gi=yi[0]===ke&&yi[1],fs=Gi),fs===!1)for(;(ii=++Gi&&ii&&ii[ts]||(fs=Gi=0)||Ss.pop())&&!((Zt?ct(ii,Hs):ii.nodeType===1)&&++fs&&(_n&&(Mi=ii[Ae]||(ii[Ae]={}),Mi[re]=[ke,fs]),ii===Vt)););return fs-=at,fs===Xe||fs%Xe===0&&fs/Xe>=0}}},PSEUDO:function(re,xe){var We,Xe=d.pseudos[re]||d.setFilters[re.toLowerCase()]||Wi.error("unsupported pseudo: "+re);return Xe[Ae]?Xe(xe):Xe.length>1?(We=[re,re,"",xe],d.setFilters.hasOwnProperty(re.toLowerCase())?Ns(function(at,qt){for(var $t,Zt=Xe(at,xe),Vt=Zt.length;Vt--;)$t=Be.call(at,Zt[Vt]),at[$t]=!(qt[$t]=Zt[Vt])}):function(at){return Xe(at,0,We)}):Xe}},pseudos:{not:Ns(function(re){var xe=[],We=[],Xe=yo(re.replace(k,"$1"));return Xe[Ae]?Ns(function(at,qt,$t,Zt){for(var Vt,Ti=Xe(at,null,Zt,[]),pi=at.length;pi--;)(Vt=Ti[pi])&&(at[pi]=!(qt[pi]=Vt))}):function(at,qt,$t){return xe[0]=at,Xe(xe,null,$t,We),xe[0]=null,!We.pop()}}),has:Ns(function(re){return function(xe){return Wi(re,xe).length>0}}),contains:Ns(function(re){return re=re.replace(Is,Vi),function(xe){return(xe.textContent||S.text(xe)).indexOf(re)>-1}}),lang:Ns(function(re){return Fs.test(re||"")||Wi.error("unsupported lang: "+re),re=re.replace(Is,Vi).toLowerCase(),function(xe){var We;do if(We=le?xe.lang:xe.getAttribute("xml:lang")||xe.getAttribute("lang"))return We=We.toLowerCase(),We===re||We.indexOf(re+"-")===0;while((xe=xe.parentNode)&&xe.nodeType===1);return!1}}),target:function(re){var xe=g.location&&g.location.hash;return xe&&xe.slice(1)===re.id},root:function(re){return re===fe},focus:function(re){return re===ar()&&V.hasFocus()&&!!(re.type||re.href||~re.tabIndex)},enabled:eo(!1),disabled:eo(!0),checked:function(re){return ct(re,"input")&&!!re.checked||ct(re,"option")&&!!re.selected},selected:function(re){return re.parentNode&&re.parentNode.selectedIndex,re.selected===!0},empty:function(re){for(re=re.firstChild;re;re=re.nextSibling)if(re.nodeType<6)return!1;return!0},parent:function(re){return!d.pseudos.empty(re)},header:function(re){return ws.test(re.nodeName)},input:function(re){return Rs.test(re.nodeName)},button:function(re){return ct(re,"input")&&re.type==="button"||ct(re,"button")},text:function(re){var xe;return ct(re,"input")&&re.type==="text"&&((xe=re.getAttribute("type"))==null||xe.toLowerCase()==="text")},first:xr(function(){return[0]}),last:xr(function(re,xe){return[xe-1]}),eq:xr(function(re,xe,We){return[We<0?We+xe:We]}),even:xr(function(re,xe){for(var We=0;We<xe;We+=2)re.push(We);return re}),odd:xr(function(re,xe){for(var We=1;We<xe;We+=2)re.push(We);return re}),lt:xr(function(re,xe,We){var Xe;for(We<0?Xe=We+xe:We>xe?Xe=xe:Xe=We;--Xe>=0;)re.push(Xe);return re}),gt:xr(function(re,xe,We){for(var Xe=We<0?We+xe:We;++Xe<xe;)re.push(Xe);return re})}},d.pseudos.nth=d.pseudos.eq;for(o in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})d.pseudos[o]=_o(o);for(o in{submit:!0,reset:!0})d.pseudos[o]=Zr(o);function Vr(){}Vr.prototype=d.filters=d.pseudos,d.setFilters=new Vr;function Bn(re,xe){var We,Xe,at,qt,$t,Zt,Vt,Ti=$i[re+" "];if(Ti)return xe?0:Ti.slice(0);for($t=re,Zt=[],Vt=d.preFilter;$t;){(!We||(Xe=Fi.exec($t)))&&(Xe&&($t=$t.slice(Xe[0].length)||$t),Zt.push(at=[])),We=!1,(Xe=Or.exec($t))&&(We=Xe.shift(),at.push({value:We,type:Xe[0].replace(k," ")}),$t=$t.slice(We.length));for(qt in d.filter)(Xe=cs[qt].exec($t))&&(!Vt[qt]||(Xe=Vt[qt](Xe)))&&(We=Xe.shift(),at.push({value:We,type:qt,matches:Xe}),$t=$t.slice(We.length));if(!We)break}return xe?$t.length:$t?Wi.error(re):$i(re,Zt).slice(0)}function es(re){for(var xe=0,We=re.length,Xe="";xe<We;xe++)Xe+=re[xe].value;return Xe}function zn(re,xe,We){var Xe=xe.dir,at=xe.next,qt=at||Xe,$t=We&&qt==="parentNode",Zt=Tt++;return xe.first?function(Vt,Ti,pi){for(;Vt=Vt[Xe];)if(Vt.nodeType===1||$t)return re(Vt,Ti,pi);return!1}:function(Vt,Ti,pi){var yi,Mi,ii=[ke,Zt];if(pi){for(;Vt=Vt[Xe];)if((Vt.nodeType===1||$t)&&re(Vt,Ti,pi))return!0}else for(;Vt=Vt[Xe];)if(Vt.nodeType===1||$t)if(Mi=Vt[Ae]||(Vt[Ae]={}),at&&ct(Vt,at))Vt=Vt[Xe]||Vt;else{if((yi=Mi[qt])&&yi[0]===ke&&yi[1]===Zt)return ii[2]=yi[2];if(Mi[qt]=ii,ii[2]=re(Vt,Ti,pi))return!0}return!1}}function Hn(re){return re.length>1?function(xe,We,Xe){for(var at=re.length;at--;)if(!re[at](xe,We,Xe))return!1;return!0}:re[0]}function zo(re,xe,We){for(var Xe=0,at=xe.length;Xe<at;Xe++)Wi(re,xe[Xe],We);return We}function cr(re,xe,We,Xe,at){for(var qt,$t=[],Zt=0,Vt=re.length,Ti=xe!=null;Zt<Vt;Zt++)(qt=re[Zt])&&(!We||We(qt,Xe,at))&&($t.push(qt),Ti&&xe.push(Zt));return $t}function ur(re,xe,We,Xe,at,qt){return Xe&&!Xe[Ae]&&(Xe=ur(Xe)),at&&!at[Ae]&&(at=ur(at,qt)),Ns(function($t,Zt,Vt,Ti){var pi,yi,Mi,ii,Gi=[],Ss=[],ts=Zt.length,ds=$t||zo(xe||"*",Vt.nodeType?[Vt]:Vt,[]),Hs=re&&($t||!xe)?cr(ds,Gi,re,Vt,Ti):ds;if(We?(ii=at||($t?re:ts||Xe)?[]:Zt,We(Hs,ii,Vt,Ti)):ii=Hs,Xe)for(pi=cr(ii,Ss),Xe(pi,[],Vt,Ti),yi=pi.length;yi--;)(Mi=pi[yi])&&(ii[Ss[yi]]=!(Hs[Ss[yi]]=Mi));if($t){if(at||re){if(at){for(pi=[],yi=ii.length;yi--;)(Mi=ii[yi])&&pi.push(Hs[yi]=Mi);at(null,ii=[],pi,Ti)}for(yi=ii.length;yi--;)(Mi=ii[yi])&&(pi=at?Be.call($t,Mi):Gi[yi])>-1&&($t[pi]=!(Zt[pi]=Mi))}}else ii=cr(ii===Zt?ii.splice(ts,ii.length):ii),at?at(null,Zt,ii,Ti):D.apply(Zt,ii)})}function qr(re){for(var xe,We,Xe,at=re.length,qt=d.relative[re[0].type],$t=qt||d.relative[" "],Zt=qt?1:0,Vt=zn(function(yi){return yi===xe},$t,!0),Ti=zn(function(yi){return Be.call(xe,yi)>-1},$t,!0),pi=[function(yi,Mi,ii){var Gi=!qt&&(ii||Mi!=w)||((xe=Mi).nodeType?Vt(yi,Mi,ii):Ti(yi,Mi,ii));return xe=null,Gi}];Zt<at;Zt++)if(We=d.relative[re[Zt].type])pi=[zn(Hn(pi),We)];else{if(We=d.filter[re[Zt].type].apply(null,re[Zt].matches),We[Ae]){for(Xe=++Zt;Xe<at&&!d.relative[re[Xe].type];Xe++);return ur(Zt>1&&Hn(pi),Zt>1&&es(re.slice(0,Zt-1).concat({value:re[Zt-2].type===" "?"*":""})).replace(k,"$1"),We,Zt<Xe&&qr(re.slice(Zt,Xe)),Xe<at&&qr(re=re.slice(Xe)),Xe<at&&es(re))}pi.push(We)}return Hn(pi)}function Vl(re,xe){var We=xe.length>0,Xe=re.length>0,at=function(qt,$t,Zt,Vt,Ti){var pi,yi,Mi,ii=0,Gi="0",Ss=qt&&[],ts=[],ds=w,Hs=qt||Xe&&d.find.TAG("*",Ti),_n=ke+=ds==null?1:Math.random()||.1,fs=Hs.length;for(Ti&&(w=$t==V||$t||Ti);Gi!==fs&&(pi=Hs[Gi])!=null;Gi++){if(Xe&&pi){for(yi=0,!$t&&pi.ownerDocument!=V&&(lr(pi),Zt=!le);Mi=re[yi++];)if(Mi(pi,$t||V,Zt)){D.call(Vt,pi);break}Ti&&(ke=_n)}We&&((pi=!Mi&&pi)&&ii--,qt&&Ss.push(pi))}if(ii+=Gi,We&&Gi!==ii){for(yi=0;Mi=xe[yi++];)Mi(Ss,ts,$t,Zt);if(qt){if(ii>0)for(;Gi--;)Ss[Gi]||ts[Gi]||(ts[Gi]=xt.call(Vt));ts=cr(ts)}D.apply(Vt,ts),Ti&&!qt&&ts.length>0&&ii+xe.length>1&&S.uniqueSort(Vt)}return Ti&&(ke=_n,w=ds),Ss};return We?Ns(at):at}function yo(re,xe){var We,Xe=[],at=[],qt=Ei[re+" "];if(!qt){for(xe||(xe=Bn(re)),We=xe.length;We--;)qt=qr(xe[We]),qt[Ae]?Xe.push(qt):at.push(qt);qt=Ei(re,Vl(at,Xe)),qt.selector=re}return qt}function Wr(re,xe,We,Xe){var at,qt,$t,Zt,Vt,Ti=typeof re=="function"&&re,pi=!Xe&&Bn(re=Ti.selector||re);if(We=We||[],pi.length===1){if(qt=pi[0]=pi[0].slice(0),qt.length>2&&($t=qt[0]).type==="ID"&&xe.nodeType===9&&le&&d.relative[qt[1].type]){if(xe=(d.find.ID($t.matches[0].replace(Is,Vi),xe)||[])[0],xe)Ti&&(xe=xe.parentNode);else return We;re=re.slice(qt.shift().value.length)}for(at=cs.needsContext.test(re)?0:qt.length;at--&&($t=qt[at],!d.relative[Zt=$t.type]);)if((Vt=d.find[Zt])&&(Xe=Vt($t.matches[0].replace(Is,Vi),Wo.test(qt[0].type)&&to(xe.parentNode)||xe))){if(qt.splice(at,1),re=Xe.length&&es(qt),!re)return D.apply(We,Xe),We;break}}return(Ti||yo(re,pi))(Xe,xe,!le,We,!xe||Wo.test(re)&&to(xe.parentNode)||xe),We}q.sortStable=Ae.split("").sort(Xi).join("")===Ae,lr(),q.sortDetached=us(function(re){return re.compareDocumentPosition(V.createElement("fieldset"))&1}),S.find=Wi,S.expr[":"]=S.expr.pseudos,S.unique=S.uniqueSort,Wi.compile=yo,Wi.select=Wr,Wi.setDocument=lr,Wi.tokenize=Bn,Wi.escape=S.escapeSelector,Wi.getText=S.text,Wi.isXML=S.isXMLDoc,Wi.selectors=S.expr,Wi.support=S.support,Wi.uniqueSort=S.uniqueSort})();var Ne=function(o,d,w){for(var E=[],M=w!==void 0;(o=o[d])&&o.nodeType!==9;)if(o.nodeType===1){if(M&&S(o).is(w))break;E.push(o)}return E},Ve=function(o,d){for(var w=[];o;o=o.nextSibling)o.nodeType===1&&o!==d&&w.push(o);return w},Ye=S.expr.match.needsContext,Lt=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function K(o,d,w){return ne(d)?S.grep(o,function(E,M){return!!d.call(E,M,E)!==w}):d.nodeType?S.grep(o,function(E){return E===d!==w}):typeof d!="string"?S.grep(o,function(E){return Be.call(d,E)>-1!==w}):S.filter(d,o,w)}S.filter=function(o,d,w){var E=d[0];return w&&(o=":not("+o+")"),d.length===1&&E.nodeType===1?S.find.matchesSelector(E,o)?[E]:[]:S.find.matches(o,S.grep(d,function(M){return M.nodeType===1}))},S.fn.extend({find:function(o){var d,w,E=this.length,M=this;if(typeof o!="string")return this.pushStack(S(o).filter(function(){for(d=0;d<E;d++)if(S.contains(M[d],this))return!0}));for(w=this.pushStack([]),d=0;d<E;d++)S.find(o,M[d],w);return E>1?S.uniqueSort(w):w},filter:function(o){return this.pushStack(K(this,o||[],!1))},not:function(o){return this.pushStack(K(this,o||[],!0))},is:function(o){return!!K(this,typeof o=="string"&&Ye.test(o)?S(o):o||[],!1).length}});var Ee,nt=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/,te=S.fn.init=function(o,d,w){var E,M;if(!o)return this;if(w=w||Ee,typeof o=="string")if(o[0]==="<"&&o[o.length-1]===">"&&o.length>=3?E=[null,o,null]:E=nt.exec(o),E&&(E[1]||!d))if(E[1]){if(d=d instanceof S?d[0]:d,S.merge(this,S.parseHTML(E[1],d&&d.nodeType?d.ownerDocument||d:W,!0)),Lt.test(E[1])&&S.isPlainObject(d))for(E in d)ne(this[E])?this[E](d[E]):this.attr(E,d[E]);return this}else return M=W.getElementById(E[2]),M&&(this[0]=M,this.length=1),this;else return!d||d.jquery?(d||w).find(o):this.constructor(d).find(o);else{if(o.nodeType)return this[0]=o,this.length=1,this;if(ne(o))return w.ready!==void 0?w.ready(o):o(S)}return S.makeArray(o,this)};te.prototype=S.fn,Ee=S(W);var ee=/^(?:parents|prev(?:Until|All))/,oe={children:!0,contents:!0,next:!0,prev:!0};S.fn.extend({has:function(o){var d=S(o,this),w=d.length;return this.filter(function(){for(var E=0;E<w;E++)if(S.contains(this,d[E]))return!0})},closest:function(o,d){var w,E=0,M=this.length,D=[],V=typeof o!="string"&&S(o);if(!Ye.test(o)){for(;E<M;E++)for(w=this[E];w&&w!==d;w=w.parentNode)if(w.nodeType<11&&(V?V.index(w)>-1:w.nodeType===1&&S.find.matchesSelector(w,o))){D.push(w);break}}return this.pushStack(D.length>1?S.uniqueSort(D):D)},index:function(o){return o?typeof o=="string"?Be.call(S(o),this[0]):Be.call(this,o.jquery?o[0]:o):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(o,d){return this.pushStack(S.uniqueSort(S.merge(this.get(),S(o,d))))},addBack:function(o){return this.add(o==null?this.prevObject:this.prevObject.filter(o))}});function Ge(o,d){for(;(o=o[d])&&o.nodeType!==1;);return o}S.each({parent:function(o){var d=o.parentNode;return d&&d.nodeType!==11?d:null},parents:function(o){return Ne(o,"parentNode")},parentsUntil:function(o,d,w){return Ne(o,"parentNode",w)},next:function(o){return Ge(o,"nextSibling")},prev:function(o){return Ge(o,"previousSibling")},nextAll:function(o){return Ne(o,"nextSibling")},prevAll:function(o){return Ne(o,"previousSibling")},nextUntil:function(o,d,w){return Ne(o,"nextSibling",w)},prevUntil:function(o,d,w){return Ne(o,"previousSibling",w)},siblings:function(o){return Ve((o.parentNode||{}).firstChild,o)},children:function(o){return Ve(o.firstChild)},contents:function(o){return o.contentDocument!=null&&J(o.contentDocument)?o.contentDocument:(ct(o,"template")&&(o=o.content||o),S.merge([],o.childNodes))}},function(o,d){S.fn[o]=function(w,E){var M=S.map(this,d,w);return o.slice(-5)!=="Until"&&(E=w),E&&typeof E=="string"&&(M=S.filter(E,M)),this.length>1&&(oe[o]||S.uniqueSort(M),ee.test(o)&&M.reverse()),this.pushStack(M)}});var yt=/[^\x20\t\r\n\f]+/g;function jt(o){var d={};return S.each(o.match(yt)||[],function(w,E){d[E]=!0}),d}S.Callbacks=function(o){o=typeof o=="string"?jt(o):S.extend({},o);var d,w,E,M,D=[],V=[],fe=-1,le=function(){for(M=M||o.once,E=d=!0;V.length;fe=-1)for(w=V.shift();++fe<D.length;)D[fe].apply(w[0],w[1])===!1&&o.stopOnFalse&&(fe=D.length,w=!1);o.memory||(w=!1),d=!1,M&&(w?D=[]:D="")},Me={add:function(){return D&&(w&&!d&&(fe=D.length-1,V.push(w)),function Ze(Ae){S.each(Ae,function(ke,Tt){ne(Tt)?(!o.unique||!Me.has(Tt))&&D.push(Tt):Tt&&Tt.length&&st(Tt)!=="string"&&Ze(Tt)})}(arguments),w&&!d&&le()),this},remove:function(){return S.each(arguments,function(Ze,Ae){for(var ke;(ke=S.inArray(Ae,D,ke))>-1;)D.splice(ke,1),ke<=fe&&fe--}),this},has:function(Ze){return Ze?S.inArray(Ze,D)>-1:D.length>0},empty:function(){return D&&(D=[]),this},disable:function(){return M=V=[],D=w="",this},disabled:function(){return!D},lock:function(){return M=V=[],!w&&!d&&(D=w=""),this},locked:function(){return!!M},fireWith:function(Ze,Ae){return M||(Ae=Ae||[],Ae=[Ze,Ae.slice?Ae.slice():Ae],V.push(Ae),d||le()),this},fire:function(){return Me.fireWith(this,arguments),this},fired:function(){return!!E}};return Me};function Bt(o){return o}function Qt(o){throw o}function ji(o,d,w,E){var M;try{o&&ne(M=o.promise)?M.call(o).done(d).fail(w):o&&ne(M=o.then)?M.call(o,d,w):d.apply(void 0,[o].slice(E))}catch(D){w.apply(void 0,[D])}}S.extend({Deferred:function(o){var d=[["notify","progress",S.Callbacks("memory"),S.Callbacks("memory"),2],["resolve","done",S.Callbacks("once memory"),S.Callbacks("once memory"),0,"resolved"],["reject","fail",S.Callbacks("once memory"),S.Callbacks("once memory"),1,"rejected"]],w="pending",E={state:function(){return w},always:function(){return M.done(arguments).fail(arguments),this},catch:function(D){return E.then(null,D)},pipe:function(){var D=arguments;return S.Deferred(function(V){S.each(d,function(fe,le){var Me=ne(D[le[4]])&&D[le[4]];M[le[1]](function(){var Ze=Me&&Me.apply(this,arguments);Ze&&ne(Ze.promise)?Ze.promise().progress(V.notify).done(V.resolve).fail(V.reject):V[le[0]+"With"](this,Me?[Ze]:arguments)})}),D=null}).promise()},then:function(D,V,fe){var le=0;function Me(Ze,Ae,ke,Tt){return function(){var _i=this,$i=arguments,Ei=function(){var Xi,Sr;if(!(Ze<le)){if(Xi=ke.apply(_i,$i),Xi===Ae.promise())throw new TypeError("Thenable self-resolution");Sr=Xi&&(typeof Xi=="object"||typeof Xi=="function")&&Xi.then,ne(Sr)?Tt?Sr.call(Xi,Me(le,Ae,Bt,Tt),Me(le,Ae,Qt,Tt)):(le++,Sr.call(Xi,Me(le,Ae,Bt,Tt),Me(le,Ae,Qt,Tt),Me(le,Ae,Bt,Ae.notifyWith))):(ke!==Bt&&(_i=void 0,$i=[Xi]),(Tt||Ae.resolveWith)(_i,$i))}},In=Tt?Ei:function(){try{Ei()}catch(Xi){S.Deferred.exceptionHook&&S.Deferred.exceptionHook(Xi,In.error),Ze+1>=le&&(ke!==Qt&&(_i=void 0,$i=[Xi]),Ae.rejectWith(_i,$i))}};Ze?In():(S.Deferred.getErrorHook?In.error=S.Deferred.getErrorHook():S.Deferred.getStackHook&&(In.error=S.Deferred.getStackHook()),g.setTimeout(In))}}return S.Deferred(function(Ze){d[0][3].add(Me(0,Ze,ne(fe)?fe:Bt,Ze.notifyWith)),d[1][3].add(Me(0,Ze,ne(D)?D:Bt)),d[2][3].add(Me(0,Ze,ne(V)?V:Qt))}).promise()},promise:function(D){return D!=null?S.extend(D,E):E}},M={};return S.each(d,function(D,V){var fe=V[2],le=V[5];E[V[1]]=fe.add,le&&fe.add(function(){w=le},d[3-D][2].disable,d[3-D][3].disable,d[0][2].lock,d[0][3].lock),fe.add(V[3].fire),M[V[0]]=function(){return M[V[0]+"With"](this===M?void 0:this,arguments),this},M[V[0]+"With"]=fe.fireWith}),E.promise(M),o&&o.call(M,M),M},when:function(o){var d=arguments.length,w=d,E=Array(w),M=Z.call(arguments),D=S.Deferred(),V=function(fe){return function(le){E[fe]=this,M[fe]=arguments.length>1?Z.call(arguments):le,--d||D.resolveWith(E,M)}};if(d<=1&&(ji(o,D.done(V(w)).resolve,D.reject,!d),D.state()==="pending"||ne(M[w]&&M[w].then)))return D.then();for(;w--;)ji(M[w],V(w),D.reject);return D.promise()}});var ti=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;S.Deferred.exceptionHook=function(o,d){g.console&&g.console.warn&&o&&ti.test(o.name)&&g.console.warn("jQuery.Deferred exception: "+o.message,o.stack,d)},S.readyException=function(o){g.setTimeout(function(){throw o})};var fn=S.Deferred();S.fn.ready=function(o){return fn.then(o).catch(function(d){S.readyException(d)}),this},S.extend({isReady:!1,readyWait:1,ready:function(o){(o===!0?--S.readyWait:S.isReady)||(S.isReady=!0,!(o!==!0&&--S.readyWait>0)&&fn.resolveWith(W,[S]))}}),S.ready.then=fn.then;function Qi(){W.removeEventListener("DOMContentLoaded",Qi),g.removeEventListener("load",Qi),S.ready()}W.readyState==="complete"||W.readyState!=="loading"&&!W.documentElement.doScroll?g.setTimeout(S.ready):(W.addEventListener("DOMContentLoaded",Qi),g.addEventListener("load",Qi));var p=function(o,d,w,E,M,D,V){var fe=0,le=o.length,Me=w==null;if(st(w)==="object"){M=!0;for(fe in w)p(o,d,fe,w[fe],!0,D,V)}else if(E!==void 0&&(M=!0,ne(E)||(V=!0),Me&&(V?(d.call(o,E),d=null):(Me=d,d=function(Ze,Ae,ke){return Me.call(S(Ze),ke)})),d))for(;fe<le;fe++)d(o[fe],w,V?E:E.call(o[fe],fe,d(o[fe],w)));return M?o:Me?d.call(o):le?d(o[0],w):D},j=/^-ms-/,H=/-([a-z])/g;function ge(o,d){return d.toUpperCase()}function me(o){return o.replace(j,"ms-").replace(H,ge)}var De=function(o){return o.nodeType===1||o.nodeType===9||!+o.nodeType};function ht(){this.expando=S.expando+ht.uid++}ht.uid=1,ht.prototype={cache:function(o){var d=o[this.expando];return d||(d={},De(o)&&(o.nodeType?o[this.expando]=d:Object.defineProperty(o,this.expando,{value:d,configurable:!0}))),d},set:function(o,d,w){var E,M=this.cache(o);if(typeof d=="string")M[me(d)]=w;else for(E in d)M[me(E)]=d[E];return M},get:function(o,d){return d===void 0?this.cache(o):o[this.expando]&&o[this.expando][me(d)]},access:function(o,d,w){return d===void 0||d&&typeof d=="string"&&w===void 0?this.get(o,d):(this.set(o,d,w),w!==void 0?w:d)},remove:function(o,d){var w,E=o[this.expando];if(E!==void 0){if(d!==void 0)for(Array.isArray(d)?d=d.map(me):(d=me(d),d=d in E?[d]:d.match(yt)||[]),w=d.length;w--;)delete E[d[w]];(d===void 0||S.isEmptyObject(E))&&(o.nodeType?o[this.expando]=void 0:delete o[this.expando])}},hasData:function(o){var d=o[this.expando];return d!==void 0&&!S.isEmptyObject(d)}};var rt=new ht,zt=new ht,fi=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,vi=/[A-Z]/g;function nn(o){return o==="true"?!0:o==="false"?!1:o==="null"?null:o===+o+""?+o:fi.test(o)?JSON.parse(o):o}function on(o,d,w){var E;if(w===void 0&&o.nodeType===1)if(E="data-"+d.replace(vi,"-$&").toLowerCase(),w=o.getAttribute(E),typeof w=="string"){try{w=nn(w)}catch{}zt.set(o,d,w)}else w=void 0;return w}S.extend({hasData:function(o){return zt.hasData(o)||rt.hasData(o)},data:function(o,d,w){return zt.access(o,d,w)},removeData:function(o,d){zt.remove(o,d)},_data:function(o,d,w){return rt.access(o,d,w)},_removeData:function(o,d){rt.remove(o,d)}}),S.fn.extend({data:function(o,d){var w,E,M,D=this[0],V=D&&D.attributes;if(o===void 0){if(this.length&&(M=zt.get(D),D.nodeType===1&&!rt.get(D,"hasDataAttrs"))){for(w=V.length;w--;)V[w]&&(E=V[w].name,E.indexOf("data-")===0&&(E=me(E.slice(5)),on(D,E,M[E])));rt.set(D,"hasDataAttrs",!0)}return M}return typeof o=="object"?this.each(function(){zt.set(this,o)}):p(this,function(fe){var le;if(D&&fe===void 0)return le=zt.get(D,o),le!==void 0||(le=on(D,o),le!==void 0)?le:void 0;this.each(function(){zt.set(this,o,fe)})},null,d,arguments.length>1,null,!0)},removeData:function(o){return this.each(function(){zt.remove(this,o)})}}),S.extend({queue:function(o,d,w){var E;if(o)return d=(d||"fx")+"queue",E=rt.get(o,d),w&&(!E||Array.isArray(w)?E=rt.access(o,d,S.makeArray(w)):E.push(w)),E||[]},dequeue:function(o,d){d=d||"fx";var w=S.queue(o,d),E=w.length,M=w.shift(),D=S._queueHooks(o,d),V=function(){S.dequeue(o,d)};M==="inprogress"&&(M=w.shift(),E--),M&&(d==="fx"&&w.unshift("inprogress"),delete D.stop,M.call(o,V,D)),!E&&D&&D.empty.fire()},_queueHooks:function(o,d){var w=d+"queueHooks";return rt.get(o,w)||rt.access(o,w,{empty:S.Callbacks("once memory").add(function(){rt.remove(o,[d+"queue",w])})})}}),S.fn.extend({queue:function(o,d){var w=2;return typeof o!="string"&&(d=o,o="fx",w--),arguments.length<w?S.queue(this[0],o):d===void 0?this:this.each(function(){var E=S.queue(this,o,d);S._queueHooks(this,o),o==="fx"&&E[0]!=="inprogress"&&S.dequeue(this,o)})},dequeue:function(o){return this.each(function(){S.dequeue(this,o)})},clearQueue:function(o){return this.queue(o||"fx",[])},promise:function(o,d){var w,E=1,M=S.Deferred(),D=this,V=this.length,fe=function(){--E||M.resolveWith(D,[D])};for(typeof o!="string"&&(d=o,o=void 0),o=o||"fx";V--;)w=rt.get(D[V],o+"queueHooks"),w&&w.empty&&(E++,w.empty.add(fe));return fe(),M.promise(d)}});var an=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,bn=new RegExp("^(?:([+-])=|)("+an+")([a-z%]*)$","i"),ln=["Top","Right","Bottom","Left"],Yi=W.documentElement,Fn=function(o){return S.contains(o.ownerDocument,o)},vr={composed:!0};Yi.getRootNode&&(Fn=function(o){return S.contains(o.ownerDocument,o)||o.getRootNode(vr)===o.ownerDocument});var Ln=function(o,d){return o=d||o,o.style.display==="none"||o.style.display===""&&Fn(o)&&S.css(o,"display")==="none"};function Gs(o,d,w,E){var M,D,V=20,fe=E?function(){return E.cur()}:function(){return S.css(o,d,"")},le=fe(),Me=w&&w[3]||(S.cssNumber[d]?"":"px"),Ze=o.nodeType&&(S.cssNumber[d]||Me!=="px"&&+le)&&bn.exec(S.css(o,d));if(Ze&&Ze[3]!==Me){for(le=le/2,Me=Me||Ze[3],Ze=+le||1;V--;)S.style(o,d,Ze+Me),(1-D)*(1-(D=fe()/le||.5))<=0&&(V=0),Ze=Ze/D;Ze=Ze*2,S.style(o,d,Ze+Me),w=w||[]}return w&&(Ze=+Ze||+le||0,M=w[1]?Ze+(w[1]+1)*w[2]:+w[2],E&&(E.unit=Me,E.start=Ze,E.end=M)),M}var js={};function os(o){var d,w=o.ownerDocument,E=o.nodeName,M=js[E];return M||(d=w.body.appendChild(w.createElement(E)),M=S.css(d,"display"),d.parentNode.removeChild(d),M==="none"&&(M="block"),js[E]=M,M)}function Es(o,d){for(var w,E,M=[],D=0,V=o.length;D<V;D++)E=o[D],E.style&&(w=E.style.display,d?(w==="none"&&(M[D]=rt.get(E,"display")||null,M[D]||(E.style.display="")),E.style.display===""&&Ln(E)&&(M[D]=os(E))):w!=="none"&&(M[D]="none",rt.set(E,"display",w)));for(D=0;D<V;D++)M[D]!=null&&(o[D].style.display=M[D]);return o}S.fn.extend({show:function(){return Es(this,!0)},hide:function(){return Es(this)},toggle:function(o){return typeof o=="boolean"?o?this.show():this.hide():this.each(function(){Ln(this)?S(this).show():S(this).hide()})}});var qs=/^(?:checkbox|radio)$/i,As=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i,Ys=/^$|^module$|\/(?:java|ecma)script/i;(function(){var o=W.createDocumentFragment(),d=o.appendChild(W.createElement("div")),w=W.createElement("input");w.setAttribute("type","radio"),w.setAttribute("checked","checked"),w.setAttribute("name","t"),d.appendChild(w),q.checkClone=d.cloneNode(!0).cloneNode(!0).lastChild.checked,d.innerHTML="<textarea>x</textarea>",q.noCloneChecked=!!d.cloneNode(!0).lastChild.defaultValue,d.innerHTML="<option></option>",q.option=!!d.lastChild})();var On={thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};On.tbody=On.tfoot=On.colgroup=On.caption=On.thead,On.th=On.td,q.option||(On.optgroup=On.option=[1,"<select multiple='multiple'>","</select>"]);function Tn(o,d){var w;return typeof o.getElementsByTagName<"u"?w=o.getElementsByTagName(d||"*"):typeof o.querySelectorAll<"u"?w=o.querySelectorAll(d||"*"):w=[],d===void 0||d&&ct(o,d)?S.merge([o],w):w}function jn(o,d){for(var w=0,E=o.length;w<E;w++)rt.set(o[w],"globalEval",!d||rt.get(d[w],"globalEval"))}var hn=/<|&#?\w+;/;function Ji(o,d,w,E,M){for(var D,V,fe,le,Me,Ze,Ae=d.createDocumentFragment(),ke=[],Tt=0,_i=o.length;Tt<_i;Tt++)if(D=o[Tt],D||D===0)if(st(D)==="object")S.merge(ke,D.nodeType?[D]:D);else if(!hn.test(D))ke.push(d.createTextNode(D));else{for(V=V||Ae.appendChild(d.createElement("div")),fe=(As.exec(D)||["",""])[1].toLowerCase(),le=On[fe]||On._default,V.innerHTML=le[1]+S.htmlPrefilter(D)+le[2],Ze=le[0];Ze--;)V=V.lastChild;S.merge(ke,V.childNodes),V=Ae.firstChild,V.textContent=""}for(Ae.textContent="",Tt=0;D=ke[Tt++];){if(E&&S.inArray(D,E)>-1){M&&M.push(D);continue}if(Me=Fn(D),V=Tn(Ae.appendChild(D),"script"),Me&&jn(V),w)for(Ze=0;D=V[Ze++];)Ys.test(D.type||"")&&w.push(D)}return Ae}var sn=/^([^.]*)(?:\.(.+)|)/;function mn(){return!0}function mi(){return!1}function Js(o,d,w,E,M,D){var V,fe;if(typeof d=="object"){typeof w!="string"&&(E=E||w,w=void 0);for(fe in d)Js(o,fe,w,E,d[fe],D);return o}if(E==null&&M==null?(M=w,E=w=void 0):M==null&&(typeof w=="string"?(M=E,E=void 0):(M=E,E=w,w=void 0)),M===!1)M=mi;else if(!M)return o;return D===1&&(V=M,M=function(le){return S().off(le),V.apply(this,arguments)},M.guid=V.guid||(V.guid=S.guid++)),o.each(function(){S.event.add(this,d,M,E,w)})}S.event={global:{},add:function(o,d,w,E,M){var D,V,fe,le,Me,Ze,Ae,ke,Tt,_i,$i,Ei=rt.get(o);if(De(o))for(w.handler&&(D=w,w=D.handler,M=D.selector),M&&S.find.matchesSelector(Yi,M),w.guid||(w.guid=S.guid++),(le=Ei.events)||(le=Ei.events=Object.create(null)),(V=Ei.handle)||(V=Ei.handle=function(In){return typeof S<"u"&&S.event.triggered!==In.type?S.event.dispatch.apply(o,arguments):void 0}),d=(d||"").match(yt)||[""],Me=d.length;Me--;)fe=sn.exec(d[Me])||[],Tt=$i=fe[1],_i=(fe[2]||"").split(".").sort(),Tt&&(Ae=S.event.special[Tt]||{},Tt=(M?Ae.delegateType:Ae.bindType)||Tt,Ae=S.event.special[Tt]||{},Ze=S.extend({type:Tt,origType:$i,data:E,handler:w,guid:w.guid,selector:M,needsContext:M&&S.expr.match.needsContext.test(M),namespace:_i.join(".")},D),(ke=le[Tt])||(ke=le[Tt]=[],ke.delegateCount=0,(!Ae.setup||Ae.setup.call(o,E,_i,V)===!1)&&o.addEventListener&&o.addEventListener(Tt,V)),Ae.add&&(Ae.add.call(o,Ze),Ze.handler.guid||(Ze.handler.guid=w.guid)),M?ke.splice(ke.delegateCount++,0,Ze):ke.push(Ze),S.event.global[Tt]=!0)},remove:function(o,d,w,E,M){var D,V,fe,le,Me,Ze,Ae,ke,Tt,_i,$i,Ei=rt.hasData(o)&&rt.get(o);if(!(!Ei||!(le=Ei.events))){for(d=(d||"").match(yt)||[""],Me=d.length;Me--;){if(fe=sn.exec(d[Me])||[],Tt=$i=fe[1],_i=(fe[2]||"").split(".").sort(),!Tt){for(Tt in le)S.event.remove(o,Tt+d[Me],w,E,!0);continue}for(Ae=S.event.special[Tt]||{},Tt=(E?Ae.delegateType:Ae.bindType)||Tt,ke=le[Tt]||[],fe=fe[2]&&new RegExp("(^|\\.)"+_i.join("\\.(?:.*\\.|)")+"(\\.|$)"),V=D=ke.length;D--;)Ze=ke[D],(M||$i===Ze.origType)&&(!w||w.guid===Ze.guid)&&(!fe||fe.test(Ze.namespace))&&(!E||E===Ze.selector||E==="**"&&Ze.selector)&&(ke.splice(D,1),Ze.selector&&ke.delegateCount--,Ae.remove&&Ae.remove.call(o,Ze));V&&!ke.length&&((!Ae.teardown||Ae.teardown.call(o,_i,Ei.handle)===!1)&&S.removeEvent(o,Tt,Ei.handle),delete le[Tt])}S.isEmptyObject(le)&&rt.remove(o,"handle events")}},dispatch:function(o){var d,w,E,M,D,V,fe=new Array(arguments.length),le=S.event.fix(o),Me=(rt.get(this,"events")||Object.create(null))[le.type]||[],Ze=S.event.special[le.type]||{};for(fe[0]=le,d=1;d<arguments.length;d++)fe[d]=arguments[d];if(le.delegateTarget=this,!(Ze.preDispatch&&Ze.preDispatch.call(this,le)===!1)){for(V=S.event.handlers.call(this,le,Me),d=0;(M=V[d++])&&!le.isPropagationStopped();)for(le.currentTarget=M.elem,w=0;(D=M.handlers[w++])&&!le.isImmediatePropagationStopped();)(!le.rnamespace||D.namespace===!1||le.rnamespace.test(D.namespace))&&(le.handleObj=D,le.data=D.data,E=((S.event.special[D.origType]||{}).handle||D.handler).apply(M.elem,fe),E!==void 0&&(le.result=E)===!1&&(le.preventDefault(),le.stopPropagation()));return Ze.postDispatch&&Ze.postDispatch.call(this,le),le.result}},handlers:function(o,d){var w,E,M,D,V,fe=[],le=d.delegateCount,Me=o.target;if(le&&Me.nodeType&&!(o.type==="click"&&o.button>=1)){for(;Me!==this;Me=Me.parentNode||this)if(Me.nodeType===1&&!(o.type==="click"&&Me.disabled===!0)){for(D=[],V={},w=0;w<le;w++)E=d[w],M=E.selector+" ",V[M]===void 0&&(V[M]=E.needsContext?S(M,this).index(Me)>-1:S.find(M,this,null,[Me]).length),V[M]&&D.push(E);D.length&&fe.push({elem:Me,handlers:D})}}return Me=this,le<d.length&&fe.push({elem:Me,handlers:d.slice(le)}),fe},addProp:function(o,d){Object.defineProperty(S.Event.prototype,o,{enumerable:!0,configurable:!0,get:ne(d)?function(){if(this.originalEvent)return d(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[o]},set:function(w){Object.defineProperty(this,o,{enumerable:!0,configurable:!0,writable:!0,value:w})}})},fix:function(o){return o[S.expando]?o:new S.Event(o)},special:{load:{noBubble:!0},click:{setup:function(o){var d=this||o;return qs.test(d.type)&&d.click&&ct(d,"input")&&Ri(d,"click",!0),!1},trigger:function(o){var d=this||o;return qs.test(d.type)&&d.click&&ct(d,"input")&&Ri(d,"click"),!0},_default:function(o){var d=o.target;return qs.test(d.type)&&d.click&&ct(d,"input")&&rt.get(d,"click")||ct(d,"a")}},beforeunload:{postDispatch:function(o){o.result!==void 0&&o.originalEvent&&(o.originalEvent.returnValue=o.result)}}}};function Ri(o,d,w){if(!w){rt.get(o,d)===void 0&&S.event.add(o,d,mn);return}rt.set(o,d,!1),S.event.add(o,d,{namespace:!1,handler:function(E){var M,D=rt.get(this,d);if(E.isTrigger&1&&this[d]){if(D)(S.event.special[d]||{}).delegateType&&E.stopPropagation();else if(D=Z.call(arguments),rt.set(this,d,D),this[d](),M=rt.get(this,d),rt.set(this,d,!1),D!==M)return E.stopImmediatePropagation(),E.preventDefault(),M}else D&&(rt.set(this,d,S.event.trigger(D[0],D.slice(1),this)),E.stopPropagation(),E.isImmediatePropagationStopped=mn)}})}S.removeEvent=function(o,d,w){o.removeEventListener&&o.removeEventListener(d,w)},S.Event=function(o,d){if(!(this instanceof S.Event))return new S.Event(o,d);o&&o.type?(this.originalEvent=o,this.type=o.type,this.isDefaultPrevented=o.defaultPrevented||o.defaultPrevented===void 0&&o.returnValue===!1?mn:mi,this.target=o.target&&o.target.nodeType===3?o.target.parentNode:o.target,this.currentTarget=o.currentTarget,this.relatedTarget=o.relatedTarget):this.type=o,d&&S.extend(this,d),this.timeStamp=o&&o.timeStamp||Date.now(),this[S.expando]=!0},S.Event.prototype={constructor:S.Event,isDefaultPrevented:mi,isPropagationStopped:mi,isImmediatePropagationStopped:mi,isSimulated:!1,preventDefault:function(){var o=this.originalEvent;this.isDefaultPrevented=mn,o&&!this.isSimulated&&o.preventDefault()},stopPropagation:function(){var o=this.originalEvent;this.isPropagationStopped=mn,o&&!this.isSimulated&&o.stopPropagation()},stopImmediatePropagation:function(){var o=this.originalEvent;this.isImmediatePropagationStopped=mn,o&&!this.isSimulated&&o.stopImmediatePropagation(),this.stopPropagation()}},S.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,char:!0,code:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:!0},S.event.addProp),S.each({focus:"focusin",blur:"focusout"},function(o,d){function w(E){if(W.documentMode){var M=rt.get(this,"handle"),D=S.event.fix(E);D.type=E.type==="focusin"?"focus":"blur",D.isSimulated=!0,M(E),D.target===D.currentTarget&&M(D)}else S.event.simulate(d,E.target,S.event.fix(E))}S.event.special[o]={setup:function(){var E;if(Ri(this,o,!0),W.documentMode)E=rt.get(this,d),E||this.addEventListener(d,w),rt.set(this,d,(E||0)+1);else return!1},trigger:function(){return Ri(this,o),!0},teardown:function(){var E;if(W.documentMode)E=rt.get(this,d)-1,E?rt.set(this,d,E):(this.removeEventListener(d,w),rt.remove(this,d));else return!1},_default:function(E){return rt.get(E.target,o)},delegateType:d},S.event.special[d]={setup:function(){var E=this.ownerDocument||this.document||this,M=W.documentMode?this:E,D=rt.get(M,d);D||(W.documentMode?this.addEventListener(d,w):E.addEventListener(o,w,!0)),rt.set(M,d,(D||0)+1)},teardown:function(){var E=this.ownerDocument||this.document||this,M=W.documentMode?this:E,D=rt.get(M,d)-1;D?rt.set(M,d,D):(W.documentMode?this.removeEventListener(d,w):E.removeEventListener(o,w,!0),rt.remove(M,d))}}}),S.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(o,d){S.event.special[o]={delegateType:d,bindType:d,handle:function(w){var E,M=this,D=w.relatedTarget,V=w.handleObj;return(!D||D!==M&&!S.contains(M,D))&&(w.type=V.origType,E=V.handler.apply(this,arguments),w.type=d),E}}}),S.fn.extend({on:function(o,d,w,E){return Js(this,o,d,w,E)},one:function(o,d,w,E){return Js(this,o,d,w,E,1)},off:function(o,d,w){var E,M;if(o&&o.preventDefault&&o.handleObj)return E=o.handleObj,S(o.delegateTarget).off(E.namespace?E.origType+"."+E.namespace:E.origType,E.selector,E.handler),this;if(typeof o=="object"){for(M in o)this.off(M,d,o[M]);return this}return(d===!1||typeof d=="function")&&(w=d,d=void 0),w===!1&&(w=mi),this.each(function(){S.event.remove(this,o,w,d)})}});var Rr=/<script|<style|<link/i,En=/checked\s*(?:[^=]|=\s*.checked.)/i,Mr=/^\s*<!\[CDATA\[|\]\]>\s*$/g;function Ps(o,d){return ct(o,"table")&&ct(d.nodeType!==11?d:d.firstChild,"tr")&&S(o).children("tbody")[0]||o}function br(o){return o.type=(o.getAttribute("type")!==null)+"/"+o.type,o}function qe(o){return(o.type||"").slice(0,5)==="true/"?o.type=o.type.slice(5):o.removeAttribute("type"),o}function bt(o,d){var w,E,M,D,V,fe,le;if(d.nodeType===1){if(rt.hasData(o)&&(D=rt.get(o),le=D.events,le)){rt.remove(d,"handle events");for(M in le)for(w=0,E=le[M].length;w<E;w++)S.event.add(d,M,le[M][w])}zt.hasData(o)&&(V=zt.access(o),fe=S.extend({},V),zt.set(d,fe))}}function Rt(o,d){var w=d.nodeName.toLowerCase();w==="input"&&qs.test(o.type)?d.checked=o.checked:(w==="input"||w==="textarea")&&(d.defaultValue=o.defaultValue)}function Yt(o,d,w,E){d=C(d);var M,D,V,fe,le,Me,Ze=0,Ae=o.length,ke=Ae-1,Tt=d[0],_i=ne(Tt);if(_i||Ae>1&&typeof Tt=="string"&&!q.checkClone&&En.test(Tt))return o.each(function($i){var Ei=o.eq($i);_i&&(d[0]=Tt.call(this,$i,Ei.html())),Yt(Ei,d,w,E)});if(Ae&&(M=Ji(d,o[0].ownerDocument,!1,o,E),D=M.firstChild,M.childNodes.length===1&&(M=D),D||E)){for(V=S.map(Tn(M,"script"),br),fe=V.length;Ze<Ae;Ze++)le=M,Ze!==ke&&(le=S.clone(le,!0,!0),fe&&S.merge(V,Tn(le,"script"))),w.call(o[Ze],le,Ze);if(fe)for(Me=V[V.length-1].ownerDocument,S.map(V,qe),Ze=0;Ze<fe;Ze++)le=V[Ze],Ys.test(le.type||"")&&!rt.access(le,"globalEval")&&S.contains(Me,le)&&(le.src&&(le.type||"").toLowerCase()!=="module"?S._evalUrl&&!le.noModule&&S._evalUrl(le.src,{nonce:le.nonce||le.getAttribute("nonce")},Me):tt(le.textContent.replace(Mr,""),le,Me))}return o}function Ui(o,d,w){for(var E,M=d?S.filter(d,o):o,D=0;(E=M[D])!=null;D++)!w&&E.nodeType===1&&S.cleanData(Tn(E)),E.parentNode&&(w&&Fn(E)&&jn(Tn(E,"script")),E.parentNode.removeChild(E));return o}S.extend({htmlPrefilter:function(o){return o},clone:function(o,d,w){var E,M,D,V,fe=o.cloneNode(!0),le=Fn(o);if(!q.noCloneChecked&&(o.nodeType===1||o.nodeType===11)&&!S.isXMLDoc(o))for(V=Tn(fe),D=Tn(o),E=0,M=D.length;E<M;E++)Rt(D[E],V[E]);if(d)if(w)for(D=D||Tn(o),V=V||Tn(fe),E=0,M=D.length;E<M;E++)bt(D[E],V[E]);else bt(o,fe);return V=Tn(fe,"script"),V.length>0&&jn(V,!le&&Tn(o,"script")),fe},cleanData:function(o){for(var d,w,E,M=S.event.special,D=0;(w=o[D])!==void 0;D++)if(De(w)){if(d=w[rt.expando]){if(d.events)for(E in d.events)M[E]?S.event.remove(w,E):S.removeEvent(w,E,d.handle);w[rt.expando]=void 0}w[zt.expando]&&(w[zt.expando]=void 0)}}}),S.fn.extend({detach:function(o){return Ui(this,o,!0)},remove:function(o){return Ui(this,o)},text:function(o){return p(this,function(d){return d===void 0?S.text(this):this.empty().each(function(){(this.nodeType===1||this.nodeType===11||this.nodeType===9)&&(this.textContent=d)})},null,o,arguments.length)},append:function(){return Yt(this,arguments,function(o){if(this.nodeType===1||this.nodeType===11||this.nodeType===9){var d=Ps(this,o);d.appendChild(o)}})},prepend:function(){return Yt(this,arguments,function(o){if(this.nodeType===1||this.nodeType===11||this.nodeType===9){var d=Ps(this,o);d.insertBefore(o,d.firstChild)}})},before:function(){return Yt(this,arguments,function(o){this.parentNode&&this.parentNode.insertBefore(o,this)})},after:function(){return Yt(this,arguments,function(o){this.parentNode&&this.parentNode.insertBefore(o,this.nextSibling)})},empty:function(){for(var o,d=0;(o=this[d])!=null;d++)o.nodeType===1&&(S.cleanData(Tn(o,!1)),o.textContent="");return this},clone:function(o,d){return o=o??!1,d=d??o,this.map(function(){return S.clone(this,o,d)})},html:function(o){return p(this,function(d){var w=this[0]||{},E=0,M=this.length;if(d===void 0&&w.nodeType===1)return w.innerHTML;if(typeof d=="string"&&!Rr.test(d)&&!On[(As.exec(d)||["",""])[1].toLowerCase()]){d=S.htmlPrefilter(d);try{for(;E<M;E++)w=this[E]||{},w.nodeType===1&&(S.cleanData(Tn(w,!1)),w.innerHTML=d);w=0}catch{}}w&&this.empty().append(d)},null,o,arguments.length)},replaceWith:function(){var o=[];return Yt(this,arguments,function(d){var w=this.parentNode;S.inArray(this,o)<0&&(S.cleanData(Tn(this)),w&&w.replaceChild(d,this))},o)}}),S.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(o,d){S.fn[o]=function(w){for(var E,M=[],D=S(w),V=D.length-1,fe=0;fe<=V;fe++)E=fe===V?this:this.clone(!0),S(D[fe])[d](E),we.apply(M,E.get());return this.pushStack(M)}});var Bi=new RegExp("^("+an+")(?!px)[a-z%]+$","i"),An=/^--/,cn=function(o){var d=o.ownerDocument.defaultView;return(!d||!d.opener)&&(d=g),d.getComputedStyle(o)},pn=function(o,d,w){var E,M,D={};for(M in d)D[M]=o.style[M],o.style[M]=d[M];E=w.call(o);for(M in d)o.style[M]=D[M];return E},Br=new RegExp(ln.join("|"),"i");(function(){function o(){if(Me){le.style.cssText="position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0",Me.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%",Yi.appendChild(le).appendChild(Me);var Ze=g.getComputedStyle(Me);w=Ze.top!=="1%",fe=d(Ze.marginLeft)===12,Me.style.right="60%",D=d(Ze.right)===36,E=d(Ze.width)===36,Me.style.position="absolute",M=d(Me.offsetWidth/3)===12,Yi.removeChild(le),Me=null}}function d(Ze){return Math.round(parseFloat(Ze))}var w,E,M,D,V,fe,le=W.createElement("div"),Me=W.createElement("div");Me.style&&(Me.style.backgroundClip="content-box",Me.cloneNode(!0).style.backgroundClip="",q.clearCloneStyle=Me.style.backgroundClip==="content-box",S.extend(q,{boxSizingReliable:function(){return o(),E},pixelBoxStyles:function(){return o(),D},pixelPosition:function(){return o(),w},reliableMarginLeft:function(){return o(),fe},scrollboxSize:function(){return o(),M},reliableTrDimensions:function(){var Ze,Ae,ke,Tt;return V==null&&(Ze=W.createElement("table"),Ae=W.createElement("tr"),ke=W.createElement("div"),Ze.style.cssText="position:absolute;left:-11111px;border-collapse:separate",Ae.style.cssText="box-sizing:content-box;border:1px solid",Ae.style.height="1px",ke.style.height="9px",ke.style.display="block",Yi.appendChild(Ze).appendChild(Ae).appendChild(ke),Tt=g.getComputedStyle(Ae),V=parseInt(Tt.height,10)+parseInt(Tt.borderTopWidth,10)+parseInt(Tt.borderBottomWidth,10)===Ae.offsetHeight,Yi.removeChild(Ze)),V}}))})();function Cn(o,d,w){var E,M,D,V,fe=An.test(d),le=o.style;return w=w||cn(o),w&&(V=w.getPropertyValue(d)||w[d],fe&&V&&(V=V.replace(k,"$1")||void 0),V===""&&!Fn(o)&&(V=S.style(o,d)),!q.pixelBoxStyles()&&Bi.test(V)&&Br.test(d)&&(E=le.width,M=le.minWidth,D=le.maxWidth,le.minWidth=le.maxWidth=le.width=V,V=w.width,le.width=E,le.minWidth=M,le.maxWidth=D)),V!==void 0?V+"":V}function Rn(o,d){return{get:function(){if(o()){delete this.get;return}return(this.get=d).apply(this,arguments)}}}var ys=["Webkit","Moz","ms"],Cs=W.createElement("div").style,Qr={};function wa(o){for(var d=o[0].toUpperCase()+o.slice(1),w=ys.length;w--;)if(o=ys[w]+d,o in Cs)return o}function _r(o){var d=S.cssProps[o]||Qr[o];return d||(o in Cs?o:Qr[o]=wa(o)||o)}var ks=/^(none|table(?!-c[ea]).+)/,Io={position:"absolute",visibility:"hidden",display:"block"},$r={letterSpacing:"0",fontWeight:"400"};function Zs(o,d,w){var E=bn.exec(d);return E?Math.max(0,E[2]-(w||0))+(E[3]||"px"):d}function Yn(o,d,w,E,M,D){var V=d==="width"?1:0,fe=0,le=0,Me=0;if(w===(E?"border":"content"))return 0;for(;V<4;V+=2)w==="margin"&&(Me+=S.css(o,w+ln[V],!0,M)),E?(w==="content"&&(le-=S.css(o,"padding"+ln[V],!0,M)),w!=="margin"&&(le-=S.css(o,"border"+ln[V]+"Width",!0,M))):(le+=S.css(o,"padding"+ln[V],!0,M),w!=="padding"?le+=S.css(o,"border"+ln[V]+"Width",!0,M):fe+=S.css(o,"border"+ln[V]+"Width",!0,M));return!E&&D>=0&&(le+=Math.max(0,Math.ceil(o["offset"+d[0].toUpperCase()+d.slice(1)]-D-le-fe-.5))||0),le+Me}function mo(o,d,w){var E=cn(o),M=!q.boxSizingReliable()||w,D=M&&S.css(o,"boxSizing",!1,E)==="border-box",V=D,fe=Cn(o,d,E),le="offset"+d[0].toUpperCase()+d.slice(1);if(Bi.test(fe)){if(!w)return fe;fe="auto"}return(!q.boxSizingReliable()&&D||!q.reliableTrDimensions()&&ct(o,"tr")||fe==="auto"||!parseFloat(fe)&&S.css(o,"display",!1,E)==="inline")&&o.getClientRects().length&&(D=S.css(o,"boxSizing",!1,E)==="border-box",V=le in o,V&&(fe=o[le])),fe=parseFloat(fe)||0,fe+Yn(o,d,w||(D?"border":"content"),V,E,fe)+"px"}S.extend({cssHooks:{opacity:{get:function(o,d){if(d){var w=Cn(o,"opacity");return w===""?"1":w}}}},cssNumber:{animationIterationCount:!0,aspectRatio:!0,borderImageSlice:!0,columnCount:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,scale:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeMiterlimit:!0,strokeOpacity:!0},cssProps:{},style:function(o,d,w,E){if(!(!o||o.nodeType===3||o.nodeType===8||!o.style)){var M,D,V,fe=me(d),le=An.test(d),Me=o.style;if(le||(d=_r(fe)),V=S.cssHooks[d]||S.cssHooks[fe],w!==void 0){if(D=typeof w,D==="string"&&(M=bn.exec(w))&&M[1]&&(w=Gs(o,d,M),D="number"),w==null||w!==w)return;D==="number"&&!le&&(w+=M&&M[3]||(S.cssNumber[fe]?"":"px")),!q.clearCloneStyle&&w===""&&d.indexOf("background")===0&&(Me[d]="inherit"),(!V||!("set"in V)||(w=V.set(o,w,E))!==void 0)&&(le?Me.setProperty(d,w):Me[d]=w)}else return V&&"get"in V&&(M=V.get(o,!1,E))!==void 0?M:Me[d]}},css:function(o,d,w,E){var M,D,V,fe=me(d),le=An.test(d);return le||(d=_r(fe)),V=S.cssHooks[d]||S.cssHooks[fe],V&&"get"in V&&(M=V.get(o,!0,w)),M===void 0&&(M=Cn(o,d,E)),M==="normal"&&d in $r&&(M=$r[d]),w===""||w?(D=parseFloat(M),w===!0||isFinite(D)?D||0:M):M}}),S.each(["height","width"],function(o,d){S.cssHooks[d]={get:function(w,E,M){if(E)return ks.test(S.css(w,"display"))&&(!w.getClientRects().length||!w.getBoundingClientRect().width)?pn(w,Io,function(){return mo(w,d,M)}):mo(w,d,M)},set:function(w,E,M){var D,V=cn(w),fe=!q.scrollboxSize()&&V.position==="absolute",le=fe||M,Me=le&&S.css(w,"boxSizing",!1,V)==="border-box",Ze=M?Yn(w,d,M,Me,V):0;return Me&&fe&&(Ze-=Math.ceil(w["offset"+d[0].toUpperCase()+d.slice(1)]-parseFloat(V[d])-Yn(w,d,"border",!1,V)-.5)),Ze&&(D=bn.exec(E))&&(D[3]||"px")!=="px"&&(w.style[d]=E,E=S.css(w,d)),Zs(w,E,Ze)}}}),S.cssHooks.marginLeft=Rn(q.reliableMarginLeft,function(o,d){if(d)return(parseFloat(Cn(o,"marginLeft"))||o.getBoundingClientRect().left-pn(o,{marginLeft:0},function(){return o.getBoundingClientRect().left}))+"px"}),S.each({margin:"",padding:"",border:"Width"},function(o,d){S.cssHooks[o+d]={expand:function(w){for(var E=0,M={},D=typeof w=="string"?w.split(" "):[w];E<4;E++)M[o+ln[E]+d]=D[E]||D[E-2]||D[0];return M}},o!=="margin"&&(S.cssHooks[o+d].set=Zs)}),S.fn.extend({css:function(o,d){return p(this,function(w,E,M){var D,V,fe={},le=0;if(Array.isArray(E)){for(D=cn(w),V=E.length;le<V;le++)fe[E[le]]=S.css(w,E[le],!1,D);return fe}return M!==void 0?S.style(w,E,M):S.css(w,E)},o,d,arguments.length>1)}});function Vn(o,d,w,E,M){return new Vn.prototype.init(o,d,w,E,M)}S.Tween=Vn,Vn.prototype={constructor:Vn,init:function(o,d,w,E,M,D){this.elem=o,this.prop=w,this.easing=M||S.easing._default,this.options=d,this.start=this.now=this.cur(),this.end=E,this.unit=D||(S.cssNumber[w]?"":"px")},cur:function(){var o=Vn.propHooks[this.prop];return o&&o.get?o.get(this):Vn.propHooks._default.get(this)},run:function(o){var d,w=Vn.propHooks[this.prop];return this.options.duration?this.pos=d=S.easing[this.easing](o,this.options.duration*o,0,1,this.options.duration):this.pos=d=o,this.now=(this.end-this.start)*d+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),w&&w.set?w.set(this):Vn.propHooks._default.set(this),this}},Vn.prototype.init.prototype=Vn.prototype,Vn.propHooks={_default:{get:function(o){var d;return o.elem.nodeType!==1||o.elem[o.prop]!=null&&o.elem.style[o.prop]==null?o.elem[o.prop]:(d=S.css(o.elem,o.prop,""),!d||d==="auto"?0:d)},set:function(o){S.fx.step[o.prop]?S.fx.step[o.prop](o):o.elem.nodeType===1&&(S.cssHooks[o.prop]||o.elem.style[_r(o.prop)]!=null)?S.style(o.elem,o.prop,o.now+o.unit):o.elem[o.prop]=o.now}}},Vn.propHooks.scrollTop=Vn.propHooks.scrollLeft={set:function(o){o.elem.nodeType&&o.elem.parentNode&&(o.elem[o.prop]=o.now)}},S.easing={linear:function(o){return o},swing:function(o){return .5-Math.cos(o*Math.PI)/2},_default:"swing"},S.fx=Vn.prototype.init,S.fx.step={};var er,Di,B=/^(?:toggle|show|hide)$/,se=/queueHooks$/;function ue(){Di&&(W.hidden===!1&&g.requestAnimationFrame?g.requestAnimationFrame(ue):g.setTimeout(ue,S.fx.interval),S.fx.tick())}function Je(){return g.setTimeout(function(){er=void 0}),er=Date.now()}function Qe(o,d){var w,E=0,M={height:o};for(d=d?1:0;E<4;E+=2-d)w=ln[E],M["margin"+w]=M["padding"+w]=o;return d&&(M.opacity=M.width=o),M}function Ft(o,d,w){for(var E,M=(ri.tweeners[d]||[]).concat(ri.tweeners["*"]),D=0,V=M.length;D<V;D++)if(E=M[D].call(w,d,o))return E}function Gt(o,d,w){var E,M,D,V,fe,le,Me,Ze,Ae="width"in d||"height"in d,ke=this,Tt={},_i=o.style,$i=o.nodeType&&Ln(o),Ei=rt.get(o,"fxshow");w.queue||(V=S._queueHooks(o,"fx"),V.unqueued==null&&(V.unqueued=0,fe=V.empty.fire,V.empty.fire=function(){V.unqueued||fe()}),V.unqueued++,ke.always(function(){ke.always(function(){V.unqueued--,S.queue(o,"fx").length||V.empty.fire()})}));for(E in d)if(M=d[E],B.test(M)){if(delete d[E],D=D||M==="toggle",M===($i?"hide":"show"))if(M==="show"&&Ei&&Ei[E]!==void 0)$i=!0;else continue;Tt[E]=Ei&&Ei[E]||S.style(o,E)}if(le=!S.isEmptyObject(d),!(!le&&S.isEmptyObject(Tt))){Ae&&o.nodeType===1&&(w.overflow=[_i.overflow,_i.overflowX,_i.overflowY],Me=Ei&&Ei.display,Me==null&&(Me=rt.get(o,"display")),Ze=S.css(o,"display"),Ze==="none"&&(Me?Ze=Me:(Es([o],!0),Me=o.style.display||Me,Ze=S.css(o,"display"),Es([o]))),(Ze==="inline"||Ze==="inline-block"&&Me!=null)&&S.css(o,"float")==="none"&&(le||(ke.done(function(){_i.display=Me}),Me==null&&(Ze=_i.display,Me=Ze==="none"?"":Ze)),_i.display="inline-block")),w.overflow&&(_i.overflow="hidden",ke.always(function(){_i.overflow=w.overflow[0],_i.overflowX=w.overflow[1],_i.overflowY=w.overflow[2]})),le=!1;for(E in Tt)le||(Ei?"hidden"in Ei&&($i=Ei.hidden):Ei=rt.access(o,"fxshow",{display:Me}),D&&(Ei.hidden=!$i),$i&&Es([o],!0),ke.done(function(){$i||Es([o]),rt.remove(o,"fxshow");for(E in Tt)S.style(o,E,Tt[E])})),le=Ft($i?Ei[E]:0,E,ke),E in Ei||(Ei[E]=le.start,$i&&(le.end=le.start,le.start=0))}}function Jt(o,d){var w,E,M,D,V;for(w in o)if(E=me(w),M=d[E],D=o[w],Array.isArray(D)&&(M=D[1],D=o[w]=D[0]),w!==E&&(o[E]=D,delete o[w]),V=S.cssHooks[E],V&&"expand"in V){D=V.expand(D),delete o[E];for(w in D)w in o||(o[w]=D[w],d[w]=M)}else d[E]=M}function ri(o,d,w){var E,M,D=0,V=ri.prefilters.length,fe=S.Deferred().always(function(){delete le.elem}),le=function(){if(M)return!1;for(var Ae=er||Je(),ke=Math.max(0,Me.startTime+Me.duration-Ae),Tt=ke/Me.duration||0,_i=1-Tt,$i=0,Ei=Me.tweens.length;$i<Ei;$i++)Me.tweens[$i].run(_i);return fe.notifyWith(o,[Me,_i,ke]),_i<1&&Ei?ke:(Ei||fe.notifyWith(o,[Me,1,0]),fe.resolveWith(o,[Me]),!1)},Me=fe.promise({elem:o,props:S.extend({},d),opts:S.extend(!0,{specialEasing:{},easing:S.easing._default},w),originalProperties:d,originalOptions:w,startTime:er||Je(),duration:w.duration,tweens:[],createTween:function(Ae,ke){var Tt=S.Tween(o,Me.opts,Ae,ke,Me.opts.specialEasing[Ae]||Me.opts.easing);return Me.tweens.push(Tt),Tt},stop:function(Ae){var ke=0,Tt=Ae?Me.tweens.length:0;if(M)return this;for(M=!0;ke<Tt;ke++)Me.tweens[ke].run(1);return Ae?(fe.notifyWith(o,[Me,1,0]),fe.resolveWith(o,[Me,Ae])):fe.rejectWith(o,[Me,Ae]),this}}),Ze=Me.props;for(Jt(Ze,Me.opts.specialEasing);D<V;D++)if(E=ri.prefilters[D].call(Me,o,Ze,Me.opts),E)return ne(E.stop)&&(S._queueHooks(Me.elem,Me.opts.queue).stop=E.stop.bind(E)),E;return S.map(Ze,Ft,Me),ne(Me.opts.start)&&Me.opts.start.call(o,Me),Me.progress(Me.opts.progress).done(Me.opts.done,Me.opts.complete).fail(Me.opts.fail).always(Me.opts.always),S.fx.timer(S.extend(le,{elem:o,anim:Me,queue:Me.opts.queue})),Me}S.Animation=S.extend(ri,{tweeners:{"*":[function(o,d){var w=this.createTween(o,d);return Gs(w.elem,o,bn.exec(d),w),w}]},tweener:function(o,d){ne(o)?(d=o,o=["*"]):o=o.match(yt);for(var w,E=0,M=o.length;E<M;E++)w=o[E],ri.tweeners[w]=ri.tweeners[w]||[],ri.tweeners[w].unshift(d)},prefilters:[Gt],prefilter:function(o,d){d?ri.prefilters.unshift(o):ri.prefilters.push(o)}}),S.speed=function(o,d,w){var E=o&&typeof o=="object"?S.extend({},o):{complete:w||!w&&d||ne(o)&&o,duration:o,easing:w&&d||d&&!ne(d)&&d};return S.fx.off?E.duration=0:typeof E.duration!="number"&&(E.duration in S.fx.speeds?E.duration=S.fx.speeds[E.duration]:E.duration=S.fx.speeds._default),(E.queue==null||E.queue===!0)&&(E.queue="fx"),E.old=E.complete,E.complete=function(){ne(E.old)&&E.old.call(this),E.queue&&S.dequeue(this,E.queue)},E},S.fn.extend({fadeTo:function(o,d,w,E){return this.filter(Ln).css("opacity",0).show().end().animate({opacity:d},o,w,E)},animate:function(o,d,w,E){var M=S.isEmptyObject(o),D=S.speed(d,w,E),V=function(){var fe=ri(this,S.extend({},o),D);(M||rt.get(this,"finish"))&&fe.stop(!0)};return V.finish=V,M||D.queue===!1?this.each(V):this.queue(D.queue,V)},stop:function(o,d,w){var E=function(M){var D=M.stop;delete M.stop,D(w)};return typeof o!="string"&&(w=d,d=o,o=void 0),d&&this.queue(o||"fx",[]),this.each(function(){var M=!0,D=o!=null&&o+"queueHooks",V=S.timers,fe=rt.get(this);if(D)fe[D]&&fe[D].stop&&E(fe[D]);else for(D in fe)fe[D]&&fe[D].stop&&se.test(D)&&E(fe[D]);for(D=V.length;D--;)V[D].elem===this&&(o==null||V[D].queue===o)&&(V[D].anim.stop(w),M=!1,V.splice(D,1));(M||!w)&&S.dequeue(this,o)})},finish:function(o){return o!==!1&&(o=o||"fx"),this.each(function(){var d,w=rt.get(this),E=w[o+"queue"],M=w[o+"queueHooks"],D=S.timers,V=E?E.length:0;for(w.finish=!0,S.queue(this,o,[]),M&&M.stop&&M.stop.call(this,!0),d=D.length;d--;)D[d].elem===this&&D[d].queue===o&&(D[d].anim.stop(!0),D.splice(d,1));for(d=0;d<V;d++)E[d]&&E[d].finish&&E[d].finish.call(this);delete w.finish})}}),S.each(["toggle","show","hide"],function(o,d){var w=S.fn[d];S.fn[d]=function(E,M,D){return E==null||typeof E=="boolean"?w.apply(this,arguments):this.animate(Qe(d,!0),E,M,D)}}),S.each({slideDown:Qe("show"),slideUp:Qe("hide"),slideToggle:Qe("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(o,d){S.fn[o]=function(w,E,M){return this.animate(d,w,E,M)}}),S.timers=[],S.fx.tick=function(){var o,d=0,w=S.timers;for(er=Date.now();d<w.length;d++)o=w[d],!o()&&w[d]===o&&w.splice(d--,1);w.length||S.fx.stop(),er=void 0},S.fx.timer=function(o){S.timers.push(o),S.fx.start()},S.fx.interval=13,S.fx.start=function(){Di||(Di=!0,ue())},S.fx.stop=function(){Di=null},S.fx.speeds={slow:600,fast:200,_default:400},S.fn.delay=function(o,d){return o=S.fx&&S.fx.speeds[o]||o,d=d||"fx",this.queue(d,function(w,E){var M=g.setTimeout(w,o);E.stop=function(){g.clearTimeout(M)}})},function(){var o=W.createElement("input"),d=W.createElement("select"),w=d.appendChild(W.createElement("option"));o.type="checkbox",q.checkOn=o.value!=="",q.optSelected=w.selected,o=W.createElement("input"),o.value="t",o.type="radio",q.radioValue=o.value==="t"}();var Ai,Ki=S.expr.attrHandle;S.fn.extend({attr:function(o,d){return p(this,S.attr,o,d,arguments.length>1)},removeAttr:function(o){return this.each(function(){S.removeAttr(this,o)})}}),S.extend({attr:function(o,d,w){var E,M,D=o.nodeType;if(!(D===3||D===8||D===2)){if(typeof o.getAttribute>"u")return S.prop(o,d,w);if((D!==1||!S.isXMLDoc(o))&&(M=S.attrHooks[d.toLowerCase()]||(S.expr.match.bool.test(d)?Ai:void 0)),w!==void 0){if(w===null){S.removeAttr(o,d);return}return M&&"set"in M&&(E=M.set(o,w,d))!==void 0?E:(o.setAttribute(d,w+""),w)}return M&&"get"in M&&(E=M.get(o,d))!==null?E:(E=S.find.attr(o,d),E??void 0)}},attrHooks:{type:{set:function(o,d){if(!q.radioValue&&d==="radio"&&ct(o,"input")){var w=o.value;return o.setAttribute("type",d),w&&(o.value=w),d}}}},removeAttr:function(o,d){var w,E=0,M=d&&d.match(yt);if(M&&o.nodeType===1)for(;w=M[E++];)o.removeAttribute(w)}}),Ai={set:function(o,d,w){return d===!1?S.removeAttr(o,w):o.setAttribute(w,w),w}},S.each(S.expr.match.bool.source.match(/\w+/g),function(o,d){var w=Ki[d]||S.find.attr;Ki[d]=function(E,M,D){var V,fe,le=M.toLowerCase();return D||(fe=Ki[le],Ki[le]=V,V=w(E,M,D)!=null?le:null,Ki[le]=fe),V}});var Ci=/^(?:input|select|textarea|button)$/i,gn=/^(?:a|area)$/i;S.fn.extend({prop:function(o,d){return p(this,S.prop,o,d,arguments.length>1)},removeProp:function(o){return this.each(function(){delete this[S.propFix[o]||o]})}}),S.extend({prop:function(o,d,w){var E,M,D=o.nodeType;if(!(D===3||D===8||D===2))return(D!==1||!S.isXMLDoc(o))&&(d=S.propFix[d]||d,M=S.propHooks[d]),w!==void 0?M&&"set"in M&&(E=M.set(o,w,d))!==void 0?E:o[d]=w:M&&"get"in M&&(E=M.get(o,d))!==null?E:o[d]},propHooks:{tabIndex:{get:function(o){var d=S.find.attr(o,"tabindex");return d?parseInt(d,10):Ci.test(o.nodeName)||gn.test(o.nodeName)&&o.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),q.optSelected||(S.propHooks.selected={get:function(o){var d=o.parentNode;return d&&d.parentNode&&d.parentNode.selectedIndex,null},set:function(o){var d=o.parentNode;d&&(d.selectedIndex,d.parentNode&&d.parentNode.selectedIndex)}}),S.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){S.propFix[this.toLowerCase()]=this});function Wn(o){var d=o.match(yt)||[];return d.join(" ")}function Ts(o){return o.getAttribute&&o.getAttribute("class")||""}function yr(o){return Array.isArray(o)?o:typeof o=="string"?o.match(yt)||[]:[]}S.fn.extend({addClass:function(o){var d,w,E,M,D,V;return ne(o)?this.each(function(fe){S(this).addClass(o.call(this,fe,Ts(this)))}):(d=yr(o),d.length?this.each(function(){if(E=Ts(this),w=this.nodeType===1&&" "+Wn(E)+" ",w){for(D=0;D<d.length;D++)M=d[D],w.indexOf(" "+M+" ")<0&&(w+=M+" ");V=Wn(w),E!==V&&this.setAttribute("class",V)}}):this)},removeClass:function(o){var d,w,E,M,D,V;return ne(o)?this.each(function(fe){S(this).removeClass(o.call(this,fe,Ts(this)))}):arguments.length?(d=yr(o),d.length?this.each(function(){if(E=Ts(this),w=this.nodeType===1&&" "+Wn(E)+" ",w){for(D=0;D<d.length;D++)for(M=d[D];w.indexOf(" "+M+" ")>-1;)w=w.replace(" "+M+" "," ");V=Wn(w),E!==V&&this.setAttribute("class",V)}}):this):this.attr("class","")},toggleClass:function(o,d){var w,E,M,D,V=typeof o,fe=V==="string"||Array.isArray(o);return ne(o)?this.each(function(le){S(this).toggleClass(o.call(this,le,Ts(this),d),d)}):typeof d=="boolean"&&fe?d?this.addClass(o):this.removeClass(o):(w=yr(o),this.each(function(){if(fe)for(D=S(this),M=0;M<w.length;M++)E=w[M],D.hasClass(E)?D.removeClass(E):D.addClass(E);else(o===void 0||V==="boolean")&&(E=Ts(this),E&&rt.set(this,"__className__",E),this.setAttribute&&this.setAttribute("class",E||o===!1?"":rt.get(this,"__className__")||""))}))},hasClass:function(o){var d,w,E=0;for(d=" "+o+" ";w=this[E++];)if(w.nodeType===1&&(" "+Wn(Ts(w))+" ").indexOf(d)>-1)return!0;return!1}});var tr=/\r/g;S.fn.extend({val:function(o){var d,w,E,M=this[0];return arguments.length?(E=ne(o),this.each(function(D){var V;this.nodeType===1&&(E?V=o.call(this,D,S(this).val()):V=o,V==null?V="":typeof V=="number"?V+="":Array.isArray(V)&&(V=S.map(V,function(fe){return fe==null?"":fe+""})),d=S.valHooks[this.type]||S.valHooks[this.nodeName.toLowerCase()],(!d||!("set"in d)||d.set(this,V,"value")===void 0)&&(this.value=V))})):M?(d=S.valHooks[M.type]||S.valHooks[M.nodeName.toLowerCase()],d&&"get"in d&&(w=d.get(M,"value"))!==void 0?w:(w=M.value,typeof w=="string"?w.replace(tr,""):w??"")):void 0}}),S.extend({valHooks:{option:{get:function(o){var d=S.find.attr(o,"value");return d??Wn(S.text(o))}},select:{get:function(o){var d,w,E,M=o.options,D=o.selectedIndex,V=o.type==="select-one",fe=V?null:[],le=V?D+1:M.length;for(D<0?E=le:E=V?D:0;E<le;E++)if(w=M[E],(w.selected||E===D)&&!w.disabled&&(!w.parentNode.disabled||!ct(w.parentNode,"optgroup"))){if(d=S(w).val(),V)return d;fe.push(d)}return fe},set:function(o,d){for(var w,E,M=o.options,D=S.makeArray(d),V=M.length;V--;)E=M[V],(E.selected=S.inArray(S.valHooks.option.get(E),D)>-1)&&(w=!0);return w||(o.selectedIndex=-1),D}}}}),S.each(["radio","checkbox"],function(){S.valHooks[this]={set:function(o,d){if(Array.isArray(d))return o.checked=S.inArray(S(o).val(),d)>-1}},q.checkOn||(S.valHooks[this].get=function(o){return o.getAttribute("value")===null?"on":o.value})});var ir=g.location,nr={guid:Date.now()},Ls=/\?/;S.parseXML=function(o){var d,w;if(!o||typeof o!="string")return null;try{d=new g.DOMParser().parseFromString(o,"text/xml")}catch{}return w=d&&d.getElementsByTagName("parsererror")[0],(!d||w)&&S.error("Invalid XML: "+(w?S.map(w.childNodes,function(E){return E.textContent}).join(`
DesignScreenshot/output/git.buildapp.eu.org_run/git.buildapp.eu.org_1_initial_page.html:207:(`+Be+": "+Ue+")",Z.name="ChunkLoadError",Z.type=Be,Z.request=Ue,O[1](Z)}};__webpack_require__.l(J,C,"chunk-"+_,_)}};var v=function(_,g){var O=g[0],R=g[1],J=g[2],Z,C,we=0;if(O.some(function(Ue){return r[Ue]!==0})){for(Z in R)__webpack_require__.o(R,Z)&&(__webpack_require__.m[Z]=R[Z]);if(J)var Be=J(__webpack_require__)}for(_&&_(g);we<O.length;we++)C=O[we],__webpack_require__.o(r,C)&&r[C]&&r[C][0](),r[C]=0},b=self.webpackChunk=self.webpackChunk||[];b.forEach(v.bind(null,0)),b.push=v.bind(null,b.push.bind(b))}();var __webpack_exports__={};(function(){"use strict";var r=__webpack_require__("./node_modules/jquery/dist/jquery.js"),v=__webpack_require__.n(r),b=__webpack_require__("./node_modules/htmx.org/dist/htmx.esm.js");window.$=window.jQuery=v(),window.htmx=b.A})(),function(){"use strict";(function(r,v,b,_){"use strict";r.isWindow=r.isWindow||function(g){return g!=null&&g===g.window},v=typeof v<"u"&&v.Math==Math?v:typeof self<"u"&&self.Math==Math?self:Function("return this")(),r.api=r.fn.api=function(g){var O=r.isFunction(this)?r(v):r(this),R=O.selector||"",J=new Date().getTime(),Z=[],C=arguments[0],we=typeof C=="string",Be=[].slice.call(arguments,1),Ue;return O.each(function(){var Q=r.isPlainObject(g)?r.extend(!0,{},r.fn.api.settings,g):r.extend({},r.fn.api.settings),Ke=Q.namespace,At=Q.metadata,gt=Q.selector,q=Q.error,ne=Q.className,c="."+Ke,W="module-"+Ke,Re=r(this),tt=Re.closest(gt.form),st=Q.stateContext?r(Q.stateContext):Re,et,je,S,si,ct,xt=this,ce=st[0],G=Re.data(W),P;P={initialize:function(){we||P.bind.events(),P.instantiate()},instantiate:function(){P.verbose("Storing instance of module",P),G=P,Re.data(W,G)},destroy:function(){P.verbose("Destroying previous module for",xt),Re.removeData(W).off(c)},bind:{events:function(){var k=P.get.event();k?(P.verbose("Attaching API events to element",k),Re.on(k+c,P.event.trigger)):Q.on=="now"&&(P.debug("Querying API endpoint immediately"),P.query())}},decode:{json:function(k){if(k!==_&&typeof k=="string")try{k=JSON.parse(k)}catch{}return k}},read:{cachedResponse:function(k){var N;if(v.Storage===_){P.error(q.noStorage);return}return N=sessionStorage.getItem(k),P.debug("Using cached response",k,N),N=P.decode.json(N),N}},write:{cachedResponse:function(k,N){if(N&&N===""){P.debug("Response empty, not caching",N);return}if(v.Storage===_){P.error(q.noStorage);return}r.isPlainObject(N)&&(N=JSON.stringify(N)),sessionStorage.setItem(k,N),P.verbose("Storing cached response for url",k,N)}},query:function(){if(P.is.disabled()){P.debug("Element is disabled API request aborted");return}if(P.is.loading())if(Q.interruptRequests)P.debug("Interrupting previous request"),P.abort();else{P.debug("Cancelling request, previous request is still pending");return}if(Q.defaultData&&r.extend(!0,Q.urlData,P.get.defaultData()),Q.serializeForm&&(Q.data=P.add.formData(Q.data)),je=P.get.settings(),je===!1){P.cancelled=!0,P.error(q.beforeSend);return}else P.cancelled=!1;if(S=P.get.templatedURL(),!S&&!P.is.mocked()){P.error(q.missingURL);return}if(S=P.add.urlData(S),!(!S&&!P.is.mocked())){if(je.url=Q.base+S,et=r.extend(!0,{},Q,{type:Q.method||Q.type,data:si,url:Q.base+S,beforeSend:Q.beforeXHR,success:function(){},failure:function(){},complete:function(){}}),P.debug("Querying URL",et.url),P.verbose("Using AJAX settings",et),Q.cache==="local"&&P.read.cachedResponse(S)){P.debug("Response returned from local cache"),P.request=P.create.request(),P.request.resolveWith(ce,[P.read.cachedResponse(S)]);return}Q.throttle?!Q.throttleFirstRequest&&!P.timer?(P.debug("Sending request",si,et.method),P.send.request(),P.timer=setTimeout(function(){},Q.throttle)):(P.debug("Throttling request",Q.throttle),clearTimeout(P.timer),P.timer=setTimeout(function(){P.timer&&delete P.timer,P.debug("Sending throttled request",si,et.method),P.send.request()},Q.throttle)):(P.debug("Sending request",si,et.method),P.send.request())}},should:{removeError:function(){return Q.hideError===!0||Q.hideError==="auto"&&!P.is.form()}},is:{disabled:function(){return Re.filter(gt.disabled).length>0},expectingJSON:function(){return Q.dataType==="json"||Q.dataType==="jsonp"},form:function(){return Re.is("form")||st.is("form")},mocked:function(){return Q.mockResponse||Q.mockResponseAsync||Q.response||Q.responseAsync},input:function(){return Re.is("input")},loading:function(){return P.request?P.request.state()=="pending":!1},abortedRequest:function(k){return k&&k.readyState!==_&&k.readyState===0?(P.verbose("XHR request determined to be aborted"),!0):(P.verbose("XHR request was not aborted"),!1)},validResponse:function(k){return!P.is.expectingJSON()||!r.isFunction(Q.successTest)?(P.verbose("Response is not JSON, skipping validation",Q.successTest,k),!0):(P.debug("Checking JSON returned success",Q.successTest,k),Q.successTest(k)?(P.debug("Response passed success test",k),!0):(P.debug("Response failed success test",k),!1))}},was:{cancelled:function(){return P.cancelled||!1},succesful:function(){return P.verbose('This behavior will be deleted due to typo. Use "was successful" instead.'),P.was.successful()},successful:function(){return P.request&&P.request.state()=="resolved"},failure:function(){return P.request&&P.request.state()=="rejected"},complete:function(){return P.request&&(P.request.state()=="resolved"||P.request.state()=="rejected")}},add:{urlData:function(k,N){var Y,ve;return k&&(Y=k.match(Q.regExp.required),ve=k.match(Q.regExp.optional),N=N||Q.urlData,Y&&(P.debug("Looking for required URL variables",Y),r.each(Y,function(Oe,Ne){var Ve=Ne.indexOf("$")!==-1?Ne.substr(2,Ne.length-3):Ne.substr(1,Ne.length-2),Ye=r.isPlainObject(N)&&N[Ve]!==_?N[Ve]:Re.data(Ve)!==_?Re.data(Ve):st.data(Ve)!==_?st.data(Ve):N[Ve];if(Ye===_)return P.error(q.requiredParameter,Ve,k),k=!1,!1;P.verbose("Found required variable",Ve,Ye),Ye=Q.encodeParameters?P.get.urlEncodedValue(Ye):Ye,k=k.replace(Ne,Ye)})),ve&&(P.debug("Looking for optional URL variables",Y),r.each(ve,function(Oe,Ne){var Ve=Ne.indexOf("$")!==-1?Ne.substr(3,Ne.length-4):Ne.substr(2,Ne.length-3),Ye=r.isPlainObject(N)&&N[Ve]!==_?N[Ve]:Re.data(Ve)!==_?Re.data(Ve):st.data(Ve)!==_?st.data(Ve):N[Ve];Ye!==_?(P.verbose("Optional variable Found",Ve,Ye),k=k.replace(Ne,Ye)):(P.verbose("Optional variable not found",Ve),k.indexOf("/"+Ne)!==-1?k=k.replace("/"+Ne,""):k=k.replace(Ne,""))}))),k},formData:function(k){var N=r.fn.serializeObject!==_,Y=N?tt.serializeObject():tt.serialize(),ve;return k=k||Q.data,ve=r.isPlainObject(k),ve?N?(P.debug("Extending existing data with form data",k,Y),k=r.extend(!0,{},k,Y)):(P.error(q.missingSerialize),P.debug("Cant extend data. Replacing data with form data",k,Y),k=Y):(P.debug("Adding form data",Y),k=Y),k}},send:{request:function(){P.set.loading(),P.request=P.create.request(),P.is.mocked()?P.mockedXHR=P.create.mockedXHR():P.xhr=P.create.xhr(),Q.onRequest.call(ce,P.request,P.xhr)}},event:{trigger:function(k){P.query(),(k.type=="submit"||k.type=="click")&&k.preventDefault()},xhr:{always:function(){},done:function(k,N,Y){var ve=this,Oe=new Date().getTime()-ct,Ne=Q.loadingDuration-Oe,Ve=r.isFunction(Q.onResponse)?P.is.expectingJSON()&&!Q.rawResponse?Q.onResponse.call(ve,r.extend(!0,{},k)):Q.onResponse.call(ve,k):!1;Ne=Ne>0?Ne:0,Ve&&(P.debug("Modified API response in onResponse callback",Q.onResponse,Ve,k),k=Ve),Ne>0&&P.debug("Response completed early delaying state change by",Ne),setTimeout(function(){P.is.validResponse(k)?P.request.resolveWith(ve,[k,Y]):P.request.rejectWith(ve,[Y,"invalid"])},Ne)},fail:function(k,N,Y){var ve=this,Oe=new Date().getTime()-ct,Ne=Q.loadingDuration-Oe;Ne=Ne>0?Ne:0,Ne>0&&P.debug("Response completed early delaying state change by",Ne),setTimeout(function(){P.is.abortedRequest(k)?P.request.rejectWith(ve,[k,"aborted",Y]):P.request.rejectWith(ve,[k,"error",N,Y])},Ne)}},request:{done:function(k,N){P.debug("Successful API Response",k),Q.cache==="local"&&S&&(P.write.cachedResponse(S,k),P.debug("Saving server response locally",P.cache)),Q.onSuccess.call(ce,k,Re,N)},complete:function(k,N){var Y,ve;P.was.successful()?(ve=k,Y=N):(Y=k,ve=P.get.responseFromXHR(Y)),P.remove.loading(),Q.onComplete.call(ce,ve,Re,Y)},fail:function(k,N,Y){var ve=P.get.responseFromXHR(k),Oe=P.get.errorFromRequest(ve,N,Y);if(N=="aborted")return P.debug("XHR Aborted (Most likely caused by page navigation or CORS Policy)",N,Y),Q.onAbort.call(ce,N,Re,k),!0;N=="invalid"?P.debug("JSON did not pass success test. A server-side error has most likely occurred",ve):N=="error"&&k!==_&&(P.debug("XHR produced a server error",N,Y),(k.status<200||k.status>=300)&&Y!==_&&Y!==""&&P.error(q.statusMessage+Y,et.url),Q.onError.call(ce,Oe,Re,k)),Q.errorDuration&&N!=="aborted"&&(P.debug("Adding error state"),P.set.error(),P.should.removeError()&&setTimeout(P.remove.error,Q.errorDuration)),P.debug("API Request failed",Oe,k),Q.onFailure.call(ce,ve,Re,k)}}},create:{request:function(){return r.Deferred().always(P.event.request.complete).done(P.event.request.done).fail(P.event.request.fail)},mockedXHR:function(){var k=!1,N=!1,Y=!1,ve=Q.mockResponse||Q.response,Oe=Q.mockResponseAsync||Q.responseAsync,Ne,Ve,Ye;return Ye=r.Deferred().always(P.event.xhr.complete).done(P.event.xhr.done).fail(P.event.xhr.fail),ve?(r.isFunction(ve)?(P.debug("Using specified synchronous callback",ve),Ve=ve.call(ce,je)):(P.debug("Using settings specified response",ve),Ve=ve),Ye.resolveWith(ce,[Ve,k,{responseText:Ve}])):r.isFunction(Oe)&&(Ne=function(Lt){P.debug("Async callback returned response",Lt),Lt?Ye.resolveWith(ce,[Lt,k,{responseText:Lt}]):Ye.rejectWith(ce,[{responseText:Lt},N,Y])},P.debug("Using specified async response callback",Oe),Oe.call(ce,je,Ne)),Ye},xhr:function(){var k;return k=r.ajax(et).always(P.event.xhr.always).done(P.event.xhr.done).fail(P.event.xhr.fail),P.verbose("Created server request",k,et),k}},set:{error:function(){P.verbose("Adding error state to element",st),st.addClass(ne.error)},loading:function(){P.verbose("Adding loading state to element",st),st.addClass(ne.loading),ct=new Date().getTime()}},remove:{error:function(){P.verbose("Removing error state from element",st),st.removeClass(ne.error)},loading:function(){P.verbose("Removing loading state from element",st),st.removeClass(ne.loading)}},get:{responseFromXHR:function(k){return r.isPlainObject(k)?P.is.expectingJSON()?P.decode.json(k.responseText):k.responseText:!1},errorFromRequest:function(k,N,Y){return r.isPlainObject(k)&&k.error!==_?k.error:Q.error[N]!==_?Q.error[N]:Y},request:function(){return P.request||!1},xhr:function(){return P.xhr||!1},settings:function(){var k;return k=Q.beforeSend.call(Re,Q),k&&(k.success!==_&&(P.debug("Legacy success callback detected",k),P.error(q.legacyParameters,k.success),k.onSuccess=k.success),k.failure!==_&&(P.debug("Legacy failure callback detected",k),P.error(q.legacyParameters,k.failure),k.onFailure=k.failure),k.complete!==_&&(P.debug("Legacy complete callback detected",k),P.error(q.legacyParameters,k.complete),k.onComplete=k.complete)),k===_&&P.error(q.noReturnedValue),k===!1?k:k!==_?r.extend(!0,{},k):r.extend(!0,{},Q)},urlEncodedValue:function(k){return v.encodeURIComponent(k)},defaultData:function(){var k={};return r.isWindow(xt)||(P.is.input()?k.value=Re.val():P.is.form()||(k.text=Re.text())),k},event:function(){return r.isWindow(xt)||Q.on=="now"?(P.debug("API called without element, no events attached"),!1):Q.on=="auto"?Re.is("input")?xt.oninput!==_?"input":xt.onpropertychange!==_?"propertychange":"keyup":Re.is("form")?"submit":"click":Q.on},templatedURL:function(k){if(k=k||Re.data(At.action)||Q.action||!1,S=Re.data(At.url)||Q.url||!1,S)return P.debug("Using specified url",S),S;if(k){if(P.debug("Looking up url for action",k,Q.api),Q.api[k]===_&&!P.is.mocked()){P.error(q.missingAction,Q.action,Q.api);return}S=Q.api[k]}else P.is.form()&&(S=Re.attr("action")||st.attr("action")||!1,P.debug("No url or action specified, defaulting to form action",S));return S}},abort:function(){var k=P.get.xhr();k&&k.state()!=="resolved"&&(P.debug("Cancelling API request"),k.abort())},reset:function(){P.remove.error(),P.remove.loading()},setting:function(k,N){if(P.debug("Changing setting",k,N),r.isPlainObject(k))r.extend(!0,Q,k);else if(N!==_)r.isPlainObject(Q[k])?r.extend(!0,Q[k],N):Q[k]=N;else return Q[k]},internal:function(k,N){if(r.isPlainObject(k))r.extend(!0,P,k);else if(N!==_)P[k]=N;else return P[k]},debug:function(){!Q.silent&&Q.debug&&(Q.performance?P.performance.log(arguments):(P.debug=Function.prototype.bind.call(console.info,console,Q.name+":"),P.debug.apply(console,arguments)))},verbose:function(){!Q.silent&&Q.verbose&&Q.debug&&(Q.performance?P.performance.log(arguments):(P.verbose=Function.prototype.bind.call(console.info,console,Q.name+":"),P.verbose.apply(console,arguments)))},error:function(){Q.silent||(P.error=Function.prototype.bind.call(console.error,console,Q.name+":"),P.error.apply(console,arguments))},performance:{log:function(k){var N,Y,ve;Q.performance&&(N=new Date().getTime(),ve=J||N,Y=N-ve,J=N,Z.push({Name:k[0],Arguments:[].slice.call(k,1)||"","Execution Time":Y})),clearTimeout(P.performance.timer),P.performance.timer=setTimeout(P.performance.display,500)},display:function(){var k=Q.name+":",N=0;J=!1,clearTimeout(P.performance.timer),r.each(Z,function(Y,ve){N+=ve["Execution Time"]}),k+=" "+N+"ms",R&&(k+=" '"+R+"'"),(console.group!==_||console.table!==_)&&Z.length>0&&(console.groupCollapsed(k),console.table?console.table(Z):r.each(Z,function(Y,ve){console.log(ve.Name+": "+ve["Execution Time"]+"ms")}),console.groupEnd()),Z=[]}},invoke:function(k,N,Y){var ve=G,Oe,Ne,Ve;return N=N||Be,Y=xt||Y,typeof k=="string"&&ve!==_&&(k=k.split(/[\. ]/),Oe=k.length-1,r.each(k,function(Ye,Lt){var K=Ye!=Oe?Lt+k[Ye+1].charAt(0).toUpperCase()+k[Ye+1].slice(1):k;if(r.isPlainObject(ve[K])&&Ye!=Oe)ve=ve[K];else{if(ve[K]!==_)return Ne=ve[K],!1;if(r.isPlainObject(ve[Lt])&&Ye!=Oe)ve=ve[Lt];else return ve[Lt]!==_?(Ne=ve[Lt],!1):(P.error(q.method,k),!1)}})),r.isFunction(Ne)?Ve=Ne.apply(Y,N):Ne!==_&&(Ve=Ne),Array.isArray(Ue)?Ue.push(Ve):Ue!==_?Ue=[Ue,Ve]:Ve!==_&&(Ue=Ve),Ne}},we?(G===_&&P.initialize(),P.invoke(C)):(G!==_&&G.invoke("destroy"),P.initialize())}),Ue!==_?Ue:this},r.api.settings={name:"API",namespace:"api",debug:!1,verbose:!1,performance:!0,api:{},cache:!0,interruptRequests:!0,on:"auto",stateContext:!1,loadingDuration:0,hideError:"auto",errorDuration:2e3,encodeParameters:!0,action:!1,url:!1,base:"",urlData:{},defaultData:!0,serializeForm:!1,throttle:0,throttleFirstRequest:!0,method:"get",data:{},dataType:"json",mockResponse:!1,mockResponseAsync:!1,response:!1,responseAsync:!1,rawResponse:!1,beforeSend:function(g){return g},beforeXHR:function(g){},onRequest:function(g,O){},onResponse:!1,onSuccess:function(g,O){},onComplete:function(g,O){},onFailure:function(g,O){},onError:function(g,O){},onAbort:function(g,O){},successTest:!1,error:{beforeSend:"The before send function has aborted the request",error:"There was an error with your request",exitConditions:"API Request Aborted. Exit conditions met",JSONParse:"JSON could not be parsed during error handling",legacyParameters:"You are using legacy API success callback names",method:"The method you called is not defined",missingAction:"API action used but no url was defined",missingSerialize:"jquery-serialize-object is required to add form data to an existing data object",missingURL:"No URL specified for api event",noReturnedValue:"The beforeSend callback must return a settings object, beforeSend ignored.",noStorage:"Caching responses locally requires session storage",parseError:"There was an error parsing your request",requiredParameter:"Missing a required URL parameter: ",statusMessage:"Server gave an error: ",timeout:"Your request timed out"},regExp:{required:/\{\$*[A-z0-9]+\}/g,optional:/\{\/\$*[A-z0-9]+\}/g},className:{loading:"loading",error:"error"},selector:{disabled:".disabled",form:"form"},metadata:{action:"action",url:"url"}}})(jQuery,window,document);(function(r,v,b,_){"use strict";r.isFunction=r.isFunction||function(g){return typeof g=="function"&&typeof g.nodeType!="number"},v=typeof v<"u"&&v.Math==Math?v:typeof self<"u"&&self.Math==Math?self:Function("return this")(),r.fn.dropdown=function(g){var O=r(this),R=r(b),J=O.selector||"",Z="ontouchstart"in b.documentElement,C="click",we=new Date().getTime(),Be=[],Ue=arguments[0],Q=typeof Ue=="string",Ke=[].slice.call(arguments,1),At;return O.each(function(gt){var q=r.isPlainObject(g)?r.extend(!0,{},r.fn.dropdown.settings,g):r.extend({},r.fn.dropdown.settings),ne=q.className,c=q.message,W=q.fields,Re=q.keys,tt=q.metadata,st=q.namespace,et=q.regExp,je=q.selector,S=q.error,si=q.templates,ct="."+st,xt="module-"+st,ce=r(this),G=r(q.context),P=ce.find(je.text),k=ce.find(je.search),N=ce.find(je.sizer),Y=ce.find(je.input),ve=ce.find(je.icon),Oe=ce.find(je.clearIcon),Ne=ce.prev().find(je.text).length>0?ce.prev().find(je.text):ce.prev(),Ve=ce.children(je.menu),Ye=Ve.find(je.item),Lt=q.hideDividers?Ye.parent().children(je.divider):r(),K=!1,Ee=!1,nt=!1,te=!1,ee=this,oe=ce.data(xt),Ge,yt,jt,Bt,Qt,ji,ti,fn,Qi,p;p={initialize:function(){p.debug("Initializing dropdown",q),p.is.alreadySetup()?p.setup.reference():(q.ignoreDiacritics&&!String.prototype.normalize&&(q.ignoreDiacritics=!1,p.error(S.noNormalize,ee)),p.setup.layout(),q.values&&(p.set.initialLoad(),p.change.values(q.values),p.remove.initialLoad()),p.refreshData(),p.save.defaults(),p.restore.selected(),p.create.id(),p.bind.events(),p.observeChanges(),p.instantiate())},instantiate:function(){p.verbose("Storing instance of dropdown",p),oe=p,ce.data(xt,p)},destroy:function(){p.verbose("Destroying previous dropdown",ce),p.remove.tabbable(),p.remove.active(),Ve.transition("stop all"),Ve.removeClass(ne.visible).addClass(ne.hidden),ce.off(ct).removeData(xt),Ve.off(ct),R.off(Qt),p.disconnect.menuObserver(),p.disconnect.selectObserver(),p.disconnect.classObserver()},observeChanges:function(){"MutationObserver"in v&&(ti=new MutationObserver(p.event.select.mutation),fn=new MutationObserver(p.event.menu.mutation),Qi=new MutationObserver(p.event.class.mutation),p.debug("Setting up mutation observer",ti,fn,Qi),p.observe.select(),p.observe.menu(),p.observe.class())},disconnect:{menuObserver:function(){fn&&fn.disconnect()},selectObserver:function(){ti&&ti.disconnect()},classObserver:function(){Qi&&Qi.disconnect()}},observe:{select:function(){p.has.input()&&ti&&ti.observe(ce[0],{childList:!0,subtree:!0})},menu:function(){p.has.menu()&&fn&&fn.observe(Ve[0],{childList:!0,subtree:!0})},class:function(){p.has.search()&&Qi&&Qi.observe(ce[0],{attributes:!0})}},create:{id:function(){ji=(Math.random().toString(16)+"000000000").substr(2,8),Qt="."+ji,p.verbose("Creating unique id for element",ji)},userChoice:function(j){var H,ge,me,De;return j=j||p.get.userValues(),j?(j=Array.isArray(j)?j:[j],r.each(j,function(ht,rt){p.get.item(rt)===!1&&(De=q.templates.addition(p.add.variables(c.addResult,rt)),ge=r("<div />").html(De).attr("data-"+tt.value,rt).attr("data-"+tt.text,rt).addClass(ne.addition).addClass(ne.item),q.hideAdditions&&ge.addClass(ne.hidden),H=H===_?ge:H.add(ge),p.verbose("Creating user choices for value",rt,ge))}),H):!1},userLabels:function(j){var H=p.get.userValues();H&&(p.debug("Adding user labels",H),r.each(H,function(ge,me){p.verbose("Adding custom user value"),p.add.label(me,me)}))},menu:function(){Ve=r("<div />").addClass(ne.menu).appendTo(ce)},sizer:function(){N=r("<span />").addClass(ne.sizer).insertAfter(k)}},search:function(j){j=j!==_?j:p.get.query(),p.verbose("Searching for query",j),p.has.minCharacters(j)?p.filter(j):p.hide(null,!0)},select:{firstUnfiltered:function(){p.verbose("Selecting first non-filtered element"),p.remove.selectedItem(),Ye.not(je.unselectable).not(je.addition+je.hidden).eq(0).addClass(ne.selected)},nextAvailable:function(j){j=j.eq(0);var H=j.nextAll(je.item).not(je.unselectable).eq(0),ge=j.prevAll(je.item).not(je.unselectable).eq(0),me=H.length>0;me?(p.verbose("Moving selection to",H),H.addClass(ne.selected)):(p.verbose("Moving selection to",ge),ge.addClass(ne.selected))}},setup:{api:function(){var j={debug:q.debug,urlData:{value:p.get.value(),query:p.get.query()},on:!1};p.verbose("First request, initializing API"),ce.api(j)},layout:function(){ce.is("select")&&(p.setup.select(),p.setup.returnedObject()),p.has.menu()||p.create.menu(),p.is.selection()&&p.is.clearable()&&!p.has.clearItem()&&(p.verbose("Adding clear icon"),Oe=r("<i />").addClass("remove icon").insertBefore(P)),p.is.search()&&!p.has.search()&&(p.verbose("Adding search input"),k=r("<input />").addClass(ne.search).prop("autocomplete","off").insertBefore(P)),p.is.multiple()&&p.is.searchSelection()&&!p.has.sizer()&&p.create.sizer(),q.allowTab&&p.set.tabbable()},select:function(){var j=p.get.selectValues();p.debug("Dropdown initialized on a select",j),ce.is("select")&&(Y=ce),Y.parent(je.dropdown).length>0?(p.debug("UI dropdown already exists. Creating dropdown menu only"),ce=Y.closest(je.dropdown),p.has.menu()||p.create.menu(),Ve=ce.children(je.menu),p.setup.menu(j)):(p.debug("Creating entire dropdown from select"),ce=r("<div />").attr("class",Y.attr("class")).addClass(ne.selection).addClass(ne.dropdown).html(si.dropdown(j,W,q.preserveHTML,q.className)).insertBefore(Y),Y.hasClass(ne.multiple)&&Y.prop("multiple")===!1&&(p.error(S.missingMultiple),Y.prop("multiple",!0)),Y.is("[multiple]")&&p.set.multiple(),Y.prop("disabled")&&(p.debug("Disabling dropdown"),ce.addClass(ne.disabled)),Y.removeAttr("required").removeAttr("class").detach().prependTo(ce)),p.refresh()},menu:function(j){Ve.html(si.menu(j,W,q.preserveHTML,q.className)),Ye=Ve.find(je.item),Lt=q.hideDividers?Ye.parent().children(je.divider):r()},reference:function(){p.debug("Dropdown behavior was called on select, replacing with closest dropdown"),ce=ce.parent(je.dropdown),oe=ce.data(xt),ee=ce.get(0),p.refresh(),p.setup.returnedObject()},returnedObject:function(){var j=O.slice(0,gt),H=O.slice(gt+1);O=j.add(ce).add(H)}},refresh:function(){p.refreshSelectors(),p.refreshData()},refreshItems:function(){Ye=Ve.find(je.item),Lt=q.hideDividers?Ye.parent().children(je.divider):r()},refreshSelectors:function(){p.verbose("Refreshing selector cache"),P=ce.find(je.text),k=ce.find(je.search),Y=ce.find(je.input),ve=ce.find(je.icon),Ne=ce.prev().find(je.text).length>0?ce.prev().find(je.text):ce.prev(),Ve=ce.children(je.menu),Ye=Ve.find(je.item),Lt=q.hideDividers?Ye.parent().children(je.divider):r()},refreshData:function(){p.verbose("Refreshing cached metadata"),Ye.removeData(tt.text).removeData(tt.value)},clearData:function(){p.verbose("Clearing metadata"),Ye.removeData(tt.text).removeData(tt.value),ce.removeData(tt.defaultText).removeData(tt.defaultValue).removeData(tt.placeholderText)},toggle:function(){p.verbose("Toggling menu visibility"),p.is.active()?p.hide():p.show()},show:function(j,H){if(j=r.isFunction(j)?j:function(){},!p.can.show()&&p.is.remote()&&(p.debug("No API results retrieved, searching before show"),p.queryRemote(p.get.query(),p.show)),p.can.show()&&!p.is.active()){if(p.debug("Showing dropdown"),p.has.message()&&!(p.has.maxSelections()||p.has.allResultsFiltered())&&p.remove.message(),p.is.allFiltered())return!0;q.onShow.call(ee)!==!1&&(q.onAfterFiltered.call(ee),p.animate.show(function(){p.can.click()&&p.bind.intent(),p.has.search()&&!H&&p.focusSearch(),p.set.visible(),j.call(ee)}))}},hide:function(j,H){j=r.isFunction(j)?j:function(){},p.is.active()&&!p.is.animatingOutward()?(p.debug("Hiding dropdown"),q.onHide.call(ee)!==!1&&p.animate.hide(function(){p.remove.visible(),p.is.focusedOnSearch()&&H!==!0&&k.blur(),j.call(ee)})):p.can.click()&&p.unbind.intent(),te=!1},hideOthers:function(){p.verbose("Finding other dropdowns to hide"),O.not(ce).has(je.menu+"."+ne.visible).dropdown("hide")},hideMenu:function(){p.verbose("Hiding menu  instantaneously"),p.remove.active(),p.remove.visible(),Ve.transition("hide")},hideSubMenus:function(){var j=Ve.children(je.item).find(je.menu);p.verbose("Hiding sub menus",j),j.transition("hide")},bind:{events:function(){p.bind.keyboardEvents(),p.bind.inputEvents(),p.bind.mouseEvents()},keyboardEvents:function(){p.verbose("Binding keyboard events"),ce.on("keydown"+ct,p.event.keydown),p.has.search()&&ce.on(p.get.inputEvent()+ct,je.search,p.event.input),p.is.multiple()&&R.on("keydown"+Qt,p.event.document.keydown)},inputEvents:function(){p.verbose("Binding input change events"),ce.on("change"+ct,je.input,p.event.change)},mouseEvents:function(){p.verbose("Binding mouse events"),p.is.multiple()&&ce.on(C+ct,je.label,p.event.label.click).on(C+ct,je.remove,p.event.remove.click),p.is.searchSelection()?(ce.on("mousedown"+ct,p.event.mousedown).on("mouseup"+ct,p.event.mouseup).on("mousedown"+ct,je.menu,p.event.menu.mousedown).on("mouseup"+ct,je.menu,p.event.menu.mouseup).on(C+ct,je.icon,p.event.icon.click).on(C+ct,je.clearIcon,p.event.clearIcon.click).on("focus"+ct,je.search,p.event.search.focus).on(C+ct,je.search,p.event.search.focus).on("blur"+ct,je.search,p.event.search.blur).on(C+ct,je.text,p.event.text.focus),p.is.multiple()&&ce.on(C+ct,p.event.click)):(q.on=="click"?ce.on(C+ct,je.icon,p.event.icon.click).on(C+ct,p.event.test.toggle):q.on=="hover"?ce.on("mouseenter"+ct,p.delay.show).on("mouseleave"+ct,p.delay.hide):ce.on(q.on+ct,p.toggle),ce.on("mousedown"+ct,p.event.mousedown).on("mouseup"+ct,p.event.mouseup).on("focus"+ct,p.event.focus).on(C+ct,je.clearIcon,p.event.clearIcon.click),p.has.menuSearch()?ce.on("blur"+ct,je.search,p.event.search.blur):ce.on("blur"+ct,p.event.blur)),Ve.on((Z?"touchstart":"mouseenter")+ct,je.item,p.event.item.mouseenter).on("mouseleave"+ct,je.item,p.event.item.mouseleave).on("click"+ct,je.item,p.event.item.click)},intent:function(){p.verbose("Binding hide intent event to document"),Z&&R.on("touchstart"+Qt,p.event.test.touch).on("touchmove"+Qt,p.event.test.touch),R.on(C+Qt,p.event.test.hide)}},unbind:{intent:function(){p.verbose("Removing hide intent event from document"),Z&&R.off("touchstart"+Qt).off("touchmove"+Qt),R.off(C+Qt)}},filter:function(j){var H=j!==_?j:p.get.query(),ge=function(){p.is.multiple()&&p.filterActive(),(j||!j&&p.get.activeItem().length==0)&&p.select.firstUnfiltered(),p.has.allResultsFiltered()?q.onNoResults.call(ee,H)?q.allowAdditions?q.hideAdditions&&(p.verbose("User addition with no menu, setting empty style"),p.set.empty(),p.hideMenu()):(p.verbose("All items filtered, showing message",H),p.add.message(c.noResults)):(p.verbose("All items filtered, hiding dropdown",H),p.hideMenu()):(p.remove.empty(),p.remove.message()),q.allowAdditions&&p.add.userSuggestion(p.escape.htmlEntities(j)),p.is.searchSelection()&&p.can.show()&&p.is.focusedOnSearch()&&p.show(),q.onAfterFiltered.call(ee)};q.useLabels&&p.has.maxSelections()||(q.apiSettings?p.can.useAPI()?p.queryRemote(H,function(){q.filterRemoteData&&p.filterItems(H);var me=Y.val();Array.isArray(me)||(me=me&&me!==""?me.split(q.delimiter):[]),r.each(me,function(De,ht){Ye.filter('[data-value="'+CSS.escape(ht)+'"]').addClass(ne.filtered)}),ge()}):p.error(S.noAPI):(p.filterItems(H),ge()))},queryRemote:function(j,H){var ge={errorDuration:!1,cache:"local",throttle:q.throttle,urlData:{query:j},onError:function(){p.add.message(c.serverError),H()},onFailure:function(){p.add.message(c.serverError),H()},onSuccess:function(me){var De=me[W.remoteValues];Array.isArray(De)||(De=[]),p.remove.message();var ht={};ht[W.values]=De,p.setup.menu(ht),De.length===0&&!q.allowAdditions&&p.add.message(c.noResults),H()}};ce.api("get request")||p.setup.api(),ge=r.extend(!0,{},ge,q.apiSettings),ce.api("setting",ge).api("query")},filterItems:function(j){var H=p.remove.diacritics(j!==_?j:p.get.query()),ge=null,me=p.escape.string(H),De=(q.ignoreSearchCase?"i":"")+"gm",ht=new RegExp("^"+me,De);p.has.query()&&(ge=[],p.verbose("Searching for matching values",H),Ye.each(function(){var rt=r(this),zt,fi;if(rt.hasClass(ne.unfilterable))return ge.push(this),!0;if(q.match==="both"||q.match==="text"){if(zt=p.remove.diacritics(String(p.get.choiceText(rt,!1))),zt.search(ht)!==-1)return ge.push(this),!0;if(q.fullTextSearch==="exact"&&p.exactSearch(H,zt))return ge.push(this),!0;if(q.fullTextSearch===!0&&p.fuzzySearch(H,zt))return ge.push(this),!0}if(q.match==="both"||q.match==="value"){if(fi=p.remove.diacritics(String(p.get.choiceValue(rt,zt))),fi.search(ht)!==-1)return ge.push(this),!0;if(q.fullTextSearch==="exact"&&p.exactSearch(H,fi))return ge.push(this),!0;if(q.fullTextSearch===!0&&p.fuzzySearch(H,fi))return ge.push(this),!0}})),p.debug("Showing only matched items",H),p.remove.filteredItem(),ge&&Ye.not(ge).addClass(ne.filtered),p.has.query()?q.hideDividers===!0?Lt.addClass(ne.hidden):q.hideDividers==="empty"&&Lt.removeClass(ne.hidden).filter(function(){var rt=r(this).nextUntil(je.item);return(rt.length?rt:r(this)).nextUntil(je.divider).filter(je.item+":not(."+ne.filtered+")").length===0}).addClass(ne.hidden):Lt.removeClass(ne.hidden)},fuzzySearch:function(j,H){var ge=H.length,me=j.length;if(j=q.ignoreSearchCase?j.toLowerCase():j,H=q.ignoreSearchCase?H.toLowerCase():H,me>ge)return!1;if(me===ge)return j===H;e:for(var De=0,ht=0;De<me;De++){for(var rt=j.charCodeAt(De);ht<ge;)if(H.charCodeAt(ht++)===rt)continue e;return!1}return!0},exactSearch:function(j,H){return j=q.ignoreSearchCase?j.toLowerCase():j,H=q.ignoreSearchCase?H.toLowerCase():H,H.indexOf(j)>-1},filterActive:function(){q.useLabels&&Ye.filter("."+ne.active).addClass(ne.filtered)},focusSearch:function(j){p.has.search()&&!p.is.focusedOnSearch()&&(j?(ce.off("focus"+ct,je.search),k.focus(),ce.on("focus"+ct,je.search,p.event.search.focus)):k.focus())},blurSearch:function(){p.has.search()&&k.blur()},forceSelection:function(){var j=Ye.not(ne.filtered).filter("."+ne.selected).eq(0),H=Ye.not(ne.filtered).filter("."+ne.active).eq(0),ge=j.length>0?j:H,me=ge.length>0;q.allowAdditions||me&&!p.is.multiple()?(p.debug("Forcing partial selection to selected item",ge),p.event.item.click.call(ge,{},!0)):p.remove.searchTerm()},change:{values:function(j){q.allowAdditions||p.clear(),p.debug("Creating dropdown with specified values",j);var H={};H[W.values]=j,p.setup.menu(H),r.each(j,function(ge,me){if(me.selected==!0&&(p.debug("Setting initial selection to",me[W.value]),p.set.selected(me[W.value]),!p.is.multiple()))return!1}),p.has.selectInput()&&(p.disconnect.selectObserver(),Y.html(""),Y.append("<option disabled selected value></option>"),r.each(j,function(ge,me){var De=q.templates.escape(me[W.value]),ht=q.templates.escape(me[W.name]||"",q.preserveHTML);Y.append('<option value="'+De+'">'+ht+"</option>")}),p.observe.select())}},event:{change:function(){nt||(p.debug("Input changed, updating selection"),p.set.selected())},focus:function(){q.showOnFocus&&!K&&p.is.hidden()&&!jt&&p.show()},blur:function(j){jt=b.activeElement===this,!K&&!jt&&(p.remove.activeLabel(),p.hide())},mousedown:function(){p.is.searchSelection()?Bt=!0:K=!0},mouseup:function(){p.is.searchSelection()?Bt=!1:K=!1},click:function(j){var H=r(j.target);H.is(ce)&&(p.is.focusedOnSearch()?p.show():p.focusSearch())},search:{focus:function(j){K=!0,p.is.multiple()&&p.remove.activeLabel(),(q.showOnFocus||j.type!=="focus"&&j.type!=="focusin")&&p.search()},blur:function(j){jt=b.activeElement===this,p.is.searchSelection()&&!Bt&&!Ee&&!jt&&(q.forceSelection?p.forceSelection():q.allowAdditions||p.remove.searchTerm(),p.hide()),Bt=!1}},clearIcon:{click:function(j){p.clear(),p.is.searchSelection()&&p.remove.searchTerm(),p.hide(),j.stopPropagation()}},icon:{click:function(j){te=!0;const H=!!Ve.find(".search > input").length;p.has.search()&&!H?p.is.active()?p.blurSearch():q.showOnFocus?p.focusSearch():p.toggle():p.toggle()}},text:{focus:function(j){K=!0,p.focusSearch()}},input:function(j){(p.is.multiple()||p.is.searchSelection())&&p.set.filtered(),clearTimeout(p.timer),p.timer=setTimeout(p.search,q.delay.search)},label:{click:function(j){var H=r(this),ge=ce.find(je.label),me=ge.filter("."+ne.active),De=H.nextAll("."+ne.active),ht=H.prevAll("."+ne.active),rt=De.length>0?H.nextUntil(De).add(me).add(H):H.prevUntil(ht).add(me).add(H);j.shiftKey?(me.removeClass(ne.active),rt.addClass(ne.active)):j.ctrlKey?H.toggleClass(ne.active):(me.removeClass(ne.active),H.addClass(ne.active)),q.onLabelSelect.apply(this,ge.filter("."+ne.active))}},remove:{click:function(){var j=r(this).parent();j.hasClass(ne.active)?p.remove.activeLabels():p.remove.activeLabels(j)}},test:{toggle:function(j){var H=p.is.multiple()?p.show:p.toggle;p.is.bubbledLabelClick(j)||p.is.bubbledIconClick(j)||p.determine.eventOnElement(j,H)&&j.preventDefault()},touch:function(j){p.determine.eventOnElement(j,function(){j.type=="touchstart"?p.timer=setTimeout(function(){p.hide()},q.delay.touch):j.type=="touchmove"&&clearTimeout(p.timer)}),j.stopPropagation()},hide:function(j){p.determine.eventInModule(j,p.hide)&&ee.id&&r(j.target).attr("for")===ee.id&&j.preventDefault()}},class:{mutation:function(j){j.forEach(function(H){H.attributeName==="class"&&p.check.disabled()})}},select:{mutation:function(j){p.debug("<select> modified, recreating menu"),p.is.selectMutation(j)&&(p.disconnect.selectObserver(),p.refresh(),p.setup.select(),p.set.selected(),p.observe.select())}},menu:{mutation:function(j){var H=j[0],ge=H.addedNodes?r(H.addedNodes[0]):r(!1),me=H.removedNodes?r(H.removedNodes[0]):r(!1),De=ge.add(me),ht=De.is(je.addition)||De.closest(je.addition).length>0,rt=De.is(je.message)||De.closest(je.message).length>0;ht||rt?(p.debug("Updating item selector cache"),p.refreshItems()):(p.debug("Menu modified, updating selector cache"),p.refresh())},mousedown:function(){Ee=!0},mouseup:function(){Ee=!1}},item:{mouseenter:function(j){var H=r(j.target),ge=r(this),me=ge.children(je.menu),De=ge.siblings(je.item).children(je.menu),ht=me.length>0,rt=me.find(H).length>0;!rt&&ht&&(clearTimeout(p.itemTimer),p.itemTimer=setTimeout(function(){p.verbose("Showing sub-menu",me),r.each(De,function(){p.animate.hide(!1,r(this))}),p.animate.show(!1,me)},q.delay.show),j.preventDefault())},mouseleave:function(j){var H=r(this).children(je.menu);H.length>0&&(clearTimeout(p.itemTimer),p.itemTimer=setTimeout(function(){p.verbose("Hiding sub-menu",H),p.animate.hide(!1,H)},q.delay.hide))},click:function(j,H){var ge=r(this),me=r(j?j.target:""),De=ge.find(je.menu),ht=p.get.choiceText(ge),rt=p.get.choiceValue(ge,ht),zt=De.length>0,fi=De.find(me).length>0;b.activeElement.tagName.toLowerCase()!=="input"&&r(b.activeElement).blur(),!fi&&(!zt||q.allowCategorySelection)&&(p.is.searchSelection()&&(q.allowAdditions&&p.remove.userAddition(),p.remove.searchTerm(),!p.is.focusedOnSearch()&&H!=!0&&p.focusSearch(!0)),q.useLabels||(p.remove.filteredItem(),p.set.scrollPosition(ge)),p.determine.selectAction.call(this,ht,rt))}},document:{keydown:function(j){var H=j.which,ge=p.is.inObject(H,Re);if(ge){var me=ce.find(je.label),De=me.filter("."+ne.active),ht=De.data(tt.value),rt=me.index(De),zt=me.length,fi=De.length>0,vi=De.length>1,nn=rt===0,on=rt+1==zt,an=p.is.searchSelection(),bn=p.is.focusedOnSearch(),ln=p.is.focused(),Yi=bn&&p.get.caretPosition(!1)===0,Fn=Yi&&p.get.caretPosition(!0)!==0,vr;if(an&&!fi&&!bn)return;H==Re.leftArrow?(ln||Yi)&&!fi?(p.verbose("Selecting previous label"),me.last().addClass(ne.active)):fi&&(j.shiftKey?p.verbose("Adding previous label to selection"):(p.verbose("Selecting previous label"),me.removeClass(ne.active)),nn&&!vi?De.addClass(ne.active):De.prev(je.siblingLabel).addClass(ne.active).end(),j.preventDefault()):H==Re.rightArrow?(ln&&!fi&&me.first().addClass(ne.active),fi&&(j.shiftKey?p.verbose("Adding next label to selection"):(p.verbose("Selecting next label"),me.removeClass(ne.active)),on?an?bn?me.removeClass(ne.active):p.focusSearch():vi?De.next(je.siblingLabel).addClass(ne.active):De.addClass(ne.active):De.next(je.siblingLabel).addClass(ne.active),j.preventDefault())):H==Re.deleteKey||H==Re.backspace?fi?(p.verbose("Removing active labels"),on&&an&&!bn&&p.focusSearch(),De.last().next(je.siblingLabel).addClass(ne.active),p.remove.activeLabels(De),j.preventDefault()):Yi&&!Fn&&!fi&&H==Re.backspace&&(p.verbose("Removing last label on input backspace"),De=me.last().addClass(ne.active),p.remove.activeLabels(De)):De.removeClass(ne.active)}}},keydown:function(j){var H=j.which,ge=p.is.inObject(H,Re);if(ge){var me=Ye.not(je.unselectable).filter("."+ne.selected).eq(0),De=Ve.children("."+ne.active).eq(0),ht=me.length>0?me:De,rt=ht.length>0?ht.siblings(":not(."+ne.filtered+")").addBack():Ve.children(":not(."+ne.filtered+")"),zt=ht.children(je.menu),fi=ht.closest(je.menu),vi=fi.hasClass(ne.visible)||fi.hasClass(ne.animating)||fi.parent(je.menu).length>0,nn=zt.length>0,on=ht.length>0,an=ht.not(je.unselectable).length>0,bn=H==Re.delimiter&&q.allowAdditions&&p.is.multiple(),ln=q.allowAdditions&&q.hideAdditions&&(H==Re.enter||bn)&&an,Yi,Fn,vr;if(ln&&(p.verbose("Selecting item from keyboard shortcut",ht),p.event.item.click.call(ht,j),p.is.searchSelection()&&p.remove.searchTerm(),p.is.multiple()&&j.preventDefault()),p.is.visible()){if((H==Re.enter||bn)&&(H==Re.enter&&on&&nn&&!q.allowCategorySelection?(p.verbose("Pressed enter on unselectable category, opening sub menu"),H=Re.rightArrow):an&&(p.verbose("Selecting item from keyboard shortcut",ht),p.event.item.click.call(ht,j),p.is.searchSelection()&&(p.remove.searchTerm(),p.is.multiple()&&k.focus())),j.preventDefault()),on&&(H==Re.leftArrow&&(Fn=fi[0]!==Ve[0],Fn&&(p.verbose("Left key pressed, closing sub-menu"),p.animate.hide(!1,fi),ht.removeClass(ne.selected),fi.closest(je.item).addClass(ne.selected),j.preventDefault())),H==Re.rightArrow&&nn&&(p.verbose("Right key pressed, opening sub-menu"),p.animate.show(!1,zt),ht.removeClass(ne.selected),zt.find(je.item).eq(0).addClass(ne.selected),j.preventDefault())),H==Re.upArrow){if(Yi=on&&vi?ht.prevAll(je.item+":not("+je.unselectable+")").eq(0):Ye.eq(0),rt.index(Yi)<0){p.verbose("Up key pressed but reached top of current menu"),j.preventDefault();return}else p.verbose("Up key pressed, changing active item"),ht.removeClass(ne.selected),Yi.addClass(ne.selected),p.set.scrollPosition(Yi),q.selectOnKeydown&&p.is.single()&&p.set.selectedItem(Yi);j.preventDefault()}if(H==Re.downArrow){if(Yi=on&&vi?Yi=ht.nextAll(je.item+":not("+je.unselectable+")").eq(0):Ye.eq(0),Yi.length===0){p.verbose("Down key pressed but reached bottom of current menu"),j.preventDefault();return}else p.verbose("Down key pressed, changing active item"),Ye.removeClass(ne.selected),Yi.addClass(ne.selected),p.set.scrollPosition(Yi),q.selectOnKeydown&&p.is.single()&&p.set.selectedItem(Yi);j.preventDefault()}H==Re.pageUp&&(p.scrollPage("up"),j.preventDefault()),H==Re.pageDown&&(p.scrollPage("down"),j.preventDefault()),H==Re.escape&&(p.verbose("Escape key pressed, closing dropdown"),p.hide())}else bn&&j.preventDefault(),H==Re.downArrow&&!p.is.visible()&&(p.verbose("Down key pressed, showing dropdown"),p.show(),j.preventDefault())}else p.has.search()||p.set.selectedLetter(String.fromCharCode(H))}},trigger:{change:function(){var j=Y[0];if(j){var H=b.createEvent("HTMLEvents");p.verbose("Triggering native change event"),H.initEvent("change",!0,!1),j.dispatchEvent(H)}}},determine:{selectAction:function(j,H){Ge=!0,p.verbose("Determining action",q.action),r.isFunction(p.action[q.action])?(p.verbose("Triggering preset action",q.action,j,H),p.action[q.action].call(ee,j,H,this)):r.isFunction(q.action)?(p.verbose("Triggering user action",q.action,j,H),q.action.call(ee,j,H,this)):p.error(S.action,q.action),Ge=!1},eventInModule:function(j,H){var ge=r(j.target),me=ge.closest(b.documentElement).length>0,De=ge.closest(ce).length>0;return H=r.isFunction(H)?H:function(){},me&&!De?(p.verbose("Triggering event",H),H(),!0):(p.verbose("Event occurred in dropdown, canceling callback"),!1)},eventOnElement:function(j,H){var ge=r(j.target),me=ge.closest(je.siblingLabel),De=b.body.contains(j.target),ht=ce.find(me).length===0||!(p.is.multiple()&&q.useLabels),rt=ge.closest(Ve).length===0;return H=r.isFunction(H)?H:function(){},De&&ht&&rt?(p.verbose("Triggering event",H),H(),!0):(p.verbose("Event occurred in dropdown menu, canceling callback"),!1)}},action:{nothing:function(){},activate:function(j,H,ge){H=H!==_?H:j,p.can.activate(r(ge))&&(p.set.selected(H,r(ge)),p.is.multiple()||p.hideAndClear())},select:function(j,H,ge){H=H!==_?H:j,p.can.activate(r(ge))&&(p.set.value(H,j,r(ge)),p.is.multiple()||p.hideAndClear())},combo:function(j,H,ge){H=H!==_?H:j,p.set.selected(H,r(ge)),p.hideAndClear()},hide:function(j,H,ge){p.set.value(H,j,r(ge)),p.hideAndClear()}},get:{id:function(){return ji},defaultText:function(){return ce.data(tt.defaultText)},defaultValue:function(){return ce.data(tt.defaultValue)},placeholderText:function(){return q.placeholder!="auto"&&typeof q.placeholder=="string"?q.placeholder:ce.data(tt.placeholderText)||""},text:function(){return q.preserveHTML?P.html():P.text()},query:function(){return String(k.val()).trim()},searchWidth:function(j){return j=j!==_?j:k.val(),N.text(j),Math.ceil(N.width()+1)},selectionCount:function(){var j=p.get.values(),H;return H=p.is.multiple()?Array.isArray(j)?j.length:0:p.get.value()!==""?1:0,H},transition:function(j){return q.transition=="auto"?p.is.upward(j)?"slide up":"slide down":q.transition},userValues:function(){var j=p.get.values();return j?(j=Array.isArray(j)?j:[j],r.grep(j,function(H){return p.get.item(H)===!1})):!1},uniqueArray:function(j){return r.grep(j,function(H,ge){return r.inArray(H,j)===ge})},caretPosition:function(j){var H=k.get(0),ge,me;if(j&&"selectionEnd"in H)return H.selectionEnd;if(!j&&"selectionStart"in H)return H.selectionStart;if(b.selection)return H.focus(),ge=b.selection.createRange(),me=ge.text.length,j?me:(ge.moveStart("character",-H.value.length),ge.text.length-me)},value:function(){var j=Y.length>0?Y.val():ce.data(tt.value),H=Array.isArray(j)&&j.length===1&&j[0]==="";return j===_||H?"":j},values:function(){var j=p.get.value();return j===""?"":!p.has.selectInput()&&p.is.multiple()?typeof j=="string"?p.escape.htmlEntities(j).split(q.delimiter):"":j},remoteValues:function(){var j=p.get.values(),H=!1;return j&&(typeof j=="string"&&(j=[j]),r.each(j,function(ge,me){var De=p.read.remoteData(me);p.verbose("Restoring value from session data",De,me),De&&(H||(H={}),H[me]=De)})),H},choiceText:function(j,H){if(H=H!==_?H:q.preserveHTML,j)return j.find(je.menu).length>0&&(p.verbose("Retrieving text of element with sub-menu"),j=j.clone(),j.find(je.menu).remove(),j.find(je.menuIcon).remove()),j.data(tt.text)!==_?j.data(tt.text):H?j.html().trim():j.text().trim()},choiceValue:function(j,H){return H=H||p.get.choiceText(j),j?j.data(tt.value)!==_?String(j.data(tt.value)):typeof H=="string"?String(q.ignoreSearchCase?H.toLowerCase():H).trim():String(H):!1},inputEvent:function(){var j=k[0];return j?j.oninput!==_?"input":j.onpropertychange!==_?"propertychange":"keyup":!1},selectValues:function(){var j={},H=[],ge=[];return ce.find("option").each(function(){var me=r(this),De=me.html(),ht=me.attr("disabled"),rt=me.attr("value")!==_?me.attr("value"):De,zt=me.data(tt.text)!==_?me.data(tt.text):De,fi=me.parent("optgroup");q.placeholder==="auto"&&rt===""?j.placeholder=De:((fi.length!==H.length||fi[0]!==H[0])&&(ge.push({type:"header",divider:q.headerDivider,name:fi.attr("label")||""}),H=fi),ge.push({name:De,value:rt,text:zt,disabled:ht}))}),q.placeholder&&q.placeholder!=="auto"&&(p.debug("Setting placeholder value to",q.placeholder),j.placeholder=q.placeholder),q.sortSelect?(q.sortSelect===!0?ge.sort(function(me,De){return me.name.localeCompare(De.name)}):q.sortSelect==="natural"?ge.sort(function(me,De){return me.name.toLowerCase().localeCompare(De.name.toLowerCase())}):r.isFunction(q.sortSelect)&&ge.sort(q.sortSelect),j[W.values]=ge,p.debug("Retrieved and sorted values from select",j)):(j[W.values]=ge,p.debug("Retrieved values from select",j)),j},activeItem:function(){return Ye.filter("."+ne.active)},selectedItem:function(){var j=Ye.not(je.unselectable).filter("."+ne.selected);return j.length>0?j:Ye.eq(0)},itemWithAdditions:function(j){var H=p.get.item(j),ge=p.create.userChoice(j),me=ge&&ge.length>0;return me&&(H=H.length>0?H.add(ge):ge),H},item:function(j,H){var ge=!1,me,De;return j=j!==_?j:p.get.values()!==_?p.get.values():p.get.text(),De=p.is.multiple()&&Array.isArray(j),me=De?j.length>0:j!==_&&j!==null,H=j===""||j===!1||j===!0?!0:H||!1,me&&Ye.each(function(){var ht=r(this),rt=p.get.choiceText(ht),zt=p.get.choiceValue(ht,rt);if(!(zt===null||zt===_)){if(De)r.inArray(p.escape.htmlEntities(String(zt)),j.map(function(fi){return String(fi)}))!==-1&&(ge=ge?ge.add(ht):ht);else if(H){if(p.verbose("Ambiguous dropdown value using strict type check",ht,j),zt===j)return ge=ht,!0}else if(q.ignoreCase&&(zt=zt.toLowerCase(),j=j.toLowerCase()),p.escape.htmlEntities(String(zt))===p.escape.htmlEntities(String(j)))return p.verbose("Found select item by value",zt,j),ge=ht,!0}}),ge}},check:{maxSelections:function(j){return q.maxSelections?(j=j!==_?j:p.get.selectionCount(),j>=q.maxSelections?(p.debug("Maximum selection count reached"),q.useLabels&&(Ye.addClass(ne.filtered),p.add.message(c.maxSelections)),!0):(p.verbose("No longer at maximum selection count"),p.remove.message(),p.remove.filteredItem(),p.is.searchSelection()&&p.filterItems(),!1)):!0},disabled:function(){k.attr("tabindex",p.is.disabled()?-1:0)}},restore:{defaults:function(j){p.clear(j),p.restore.defaultText(),p.restore.defaultValue()},defaultText:function(){var j=p.get.defaultText(),H=p.get.placeholderText;j===H?(p.debug("Restoring default placeholder text",j),p.set.placeholderText(j)):(p.debug("Restoring default text",j),p.set.text(j))},placeholderText:function(){p.set.placeholderText()},defaultValue:function(){var j=p.get.defaultValue();j!==_&&(p.debug("Restoring default value",j),j!==""?(p.set.value(j),p.set.selected()):(p.remove.activeItem(),p.remove.selectedItem()))},labels:function(){q.allowAdditions&&(q.useLabels||(p.error(S.labels),q.useLabels=!0),p.debug("Restoring selected values"),p.create.userLabels()),p.check.maxSelections()},selected:function(){p.restore.values(),p.is.multiple()?(p.debug("Restoring previously selected values and labels"),p.restore.labels()):p.debug("Restoring previously selected values")},values:function(){p.set.initialLoad(),q.apiSettings&&q.saveRemoteData&&p.get.remoteValues()?p.restore.remoteValues():p.set.selected();var j=p.get.value();j&&j!==""&&!(Array.isArray(j)&&j.length===0)?Y.removeClass(ne.noselection):Y.addClass(ne.noselection),p.remove.initialLoad()},remoteValues:function(){var j=p.get.remoteValues();p.debug("Recreating selected from session data",j),j&&(p.is.single()?r.each(j,function(H,ge){p.set.text(ge)}):r.each(j,function(H,ge){p.add.label(H,ge)}))}},read:{remoteData:function(j){var H;if(v.Storage===_){p.error(S.noStorage);return}return H=sessionStorage.getItem(j),H!==_?H:!1}},save:{defaults:function(){p.save.defaultText(),p.save.placeholderText(),p.save.defaultValue()},defaultValue:function(){var j=p.get.value();p.verbose("Saving default value as",j),ce.data(tt.defaultValue,j)},defaultText:function(){var j=p.get.text();p.verbose("Saving default text as",j),ce.data(tt.defaultText,j)},placeholderText:function(){var j;q.placeholder!==!1&&P.hasClass(ne.placeholder)&&(j=p.get.text(),p.verbose("Saving placeholder text as",j),ce.data(tt.placeholderText,j))},remoteData:function(j,H){if(v.Storage===_){p.error(S.noStorage);return}p.verbose("Saving remote data to session storage",H,j),sessionStorage.setItem(H,j)}},clear:function(j){p.is.multiple()&&q.useLabels?p.remove.labels():(p.remove.activeItem(),p.remove.selectedItem(),p.remove.filteredItem()),p.set.placeholderText(),p.clearValue(j)},clearValue:function(j){p.set.value("",null,null,j)},scrollPage:function(j,H){var ge=H||p.get.selectedItem(),me=ge.closest(je.menu),De=me.outerHeight(),ht=me.scrollTop(),rt=Ye.eq(0).outerHeight(),zt=Math.floor(De/rt),fi=me.prop("scrollHeight"),vi=j=="up"?ht-rt*zt:ht+rt*zt,nn=Ye.not(je.unselectable),on,an,bn;bn=j=="up"?nn.index(ge)-zt:nn.index(ge)+zt,on=j=="up"?bn>=0:bn<nn.length,an=on?nn.eq(bn):j=="up"?nn.first():nn.last(),an.length>0&&(p.debug("Scrolling page",j,an),ge.removeClass(ne.selected),an.addClass(ne.selected),q.selectOnKeydown&&p.is.single()&&p.set.selectedItem(an),me.scrollTop(vi))},set:{filtered:function(){var j=p.is.multiple(),H=p.is.searchSelection(),ge=j&&H,me=H?p.get.query():"",De=typeof me=="string"&&me.length>0,ht=p.get.searchWidth(),rt=me!=="";j&&De&&(p.verbose("Adjusting input width",ht,q.glyphWidth),k.css("width",ht)),De||ge&&rt?(p.verbose("Hiding placeholder text"),P.addClass(ne.filtered)):(!j||ge&&!rt)&&(p.verbose("Showing placeholder text"),P.removeClass(ne.filtered))},empty:function(){ce.addClass(ne.empty)},loading:function(){ce.addClass(ne.loading)},placeholderText:function(j){j=j||p.get.placeholderText(),p.debug("Setting placeholder text",j),p.set.text(j),P.addClass(ne.placeholder)},tabbable:function(){p.is.searchSelection()?(p.debug("Added tabindex to searchable dropdown"),k.val(""),p.check.disabled(),Ve.attr("tabindex",-1)):(p.debug("Added tabindex to dropdown"),ce.attr("tabindex")===_&&(ce.attr("tabindex",0),Ve.attr("tabindex",-1)))},initialLoad:function(){p.verbose("Setting initial load"),yt=!0},activeItem:function(j){q.allowAdditions&&j.filter(je.addition).length>0?j.addClass(ne.filtered):j.addClass(ne.active)},partialSearch:function(j){var H=p.get.query().length;k.val(j.substr(0,H))},scrollPosition:function(j,H){var ge=5,me,De,ht,rt,zt,fi,vi,nn,on,an;j=j||p.get.selectedItem(),me=j.closest(je.menu),De=j&&j.length>0,H=H!==_?H:!1,p.get.activeItem().length===0&&(H=!1),j&&me.length>0&&De&&(zt=j.position().top,me.addClass(ne.loading),vi=me.scrollTop(),fi=me.offset().top,zt=j.offset().top,ht=vi-fi+zt,H||(nn=me.height(),an=vi+nn<ht+ge,on=ht-ge<vi),p.debug("Scrolling to active item",ht),(H||on||an)&&me.scrollTop(ht),me.removeClass(ne.loading))},text:function(j){q.action==="combo"?(p.debug("Changing combo button text",j,Ne),q.preserveHTML?Ne.html(j):Ne.text(j)):q.action==="activate"&&(j!==p.get.placeholderText()&&P.removeClass(ne.placeholder),p.debug("Changing text",j,P),P.removeClass(ne.filtered),q.preserveHTML?P.html(j):P.text(j))},selectedItem:function(j){var H=p.get.choiceValue(j),ge=p.get.choiceText(j,!1),me=p.get.choiceText(j,!0);p.debug("Setting user selection to item",j),p.remove.activeItem(),p.set.partialSearch(ge),p.set.activeItem(j),p.set.selected(H,j),p.set.text(me)},selectedLetter:function(j){var H=Ye.filter("."+ne.selected),ge=H.length>0&&p.has.firstLetter(H,j),me=!1,De;ge&&(De=H.nextAll(Ye).eq(0),p.has.firstLetter(De,j)&&(me=De)),me||Ye.each(function(){if(p.has.firstLetter(r(this),j))return me=r(this),!1}),me&&(p.verbose("Scrolling to next value with letter",j),p.set.scrollPosition(me),H.removeClass(ne.selected),me.addClass(ne.selected),q.selectOnKeydown&&p.is.single()&&p.set.selectedItem(me))},direction:function(j){q.direction=="auto"?(j?p.is.upward(j)&&p.remove.upward(j):p.remove.upward(),p.can.openDownward(j)?p.remove.upward(j):p.set.upward(j),!p.is.leftward(j)&&!p.can.openRightward(j)&&p.set.leftward(j)):q.direction=="upward"&&p.set.upward(j)},upward:function(j){var H=j||ce;H.addClass(ne.upward)},leftward:function(j){var H=j||Ve;H.addClass(ne.leftward)},value:function(j,H,ge,me){j!==_&&j!==""&&!(Array.isArray(j)&&j.length===0)?Y.removeClass(ne.noselection):Y.addClass(ne.noselection);var De=p.escape.value(j),ht=Y.length>0,rt=p.get.values(),zt=j!==_?String(j):j,fi;if(ht){if(!q.allowReselection&&zt==rt&&(p.verbose("Skipping value update already same value",j,rt),!p.is.initialLoad()))return;p.is.single()&&p.has.selectInput()&&p.can.extendSelect()&&(p.debug("Adding user option",j),p.add.optionValue(j)),p.debug("Updating input value",De,rt),nt=!0,Y.val(De),q.fireOnInit===!1&&p.is.initialLoad()?p.debug("Input native change event ignored on initial load"):me!==!0&&p.trigger.change(),nt=!1}else p.verbose("Storing value in metadata",De,Y),De!==rt&&ce.data(tt.value,zt);q.fireOnInit===!1&&p.is.initialLoad()?p.verbose("No callback on initial load",q.onChange):me!==!0&&q.onChange.call(ee,j,H,ge)},active:function(){ce.addClass(ne.active)},multiple:function(){ce.addClass(ne.multiple)},visible:function(){ce.addClass(ne.visible)},exactly:function(j,H){p.debug("Setting selected to exact values"),p.clear(),p.set.selected(j,H)},selected:function(j,H){var ge=p.is.multiple();H=q.allowAdditions?H||p.get.itemWithAdditions(j):H||p.get.item(j),H&&(p.debug("Setting selected menu item to",H),p.is.multiple()&&p.remove.searchWidth(),p.is.single()?(p.remove.activeItem(),p.remove.selectedItem()):q.useLabels&&p.remove.selectedItem(),H.each(function(){var me=r(this),De=p.get.choiceText(me),ht=p.get.choiceValue(me,De),rt=me.hasClass(ne.filtered),zt=me.hasClass(ne.active),fi=me.hasClass(ne.addition),vi=ge&&H.length==1;ge?!zt||fi?(q.apiSettings&&q.saveRemoteData&&p.save.remoteData(De,ht),q.useLabels?(p.add.label(ht,De,vi),p.add.value(ht,De,me),p.set.activeItem(me),p.filterActive(),p.select.nextAvailable(H)):(p.add.value(ht,De,me),p.set.text(p.add.variables(c.count)),p.set.activeItem(me))):!rt&&(q.useLabels||Ge)&&(p.debug("Selected active value, removing label"),p.remove.selected(ht)):(q.apiSettings&&q.saveRemoteData&&p.save.remoteData(De,ht),p.set.text(De),p.set.value(ht,De,me),me.addClass(ne.active).addClass(ne.selected))}),p.remove.searchTerm())}},add:{label:function(j,H,ge){var me=p.is.searchSelection()?k:P,De=p.escape.value(j),ht;if(q.ignoreCase&&(De=De.toLowerCase()),ht=r("<a />").addClass(ne.label).attr("data-"+tt.value,De).html(si.label(De,H,q.preserveHTML,q.className)),ht=q.onLabelCreate.call(ht,De,H),p.has.label(j)){p.debug("User selection already exists, skipping",De);return}q.label.variation&&ht.addClass(q.label.variation),ge===!0?(p.debug("Animating in label",ht),ht.addClass(ne.hidden).insertBefore(me).transition({animation:q.label.transition,debug:q.debug,verbose:q.verbose,duration:q.label.duration})):(p.debug("Adding selection label",ht),ht.insertBefore(me))},message:function(j){var H=Ve.children(je.message),ge=q.templates.message(p.add.variables(j));H.length>0?H.html(ge):H=r("<div/>").html(ge).addClass(ne.message).appendTo(Ve)},optionValue:function(j){var H=p.escape.value(j),ge=Y.find('option[value="'+p.escape.string(H)+'"]'),me=ge.length>0;me||(p.disconnect.selectObserver(),p.is.single()&&(p.verbose("Removing previous user addition"),Y.find("option."+ne.addition).remove()),r("<option/>").prop("value",H).addClass(ne.addition).html(j).appendTo(Y),p.verbose("Adding user addition as an <option>",j),p.observe.select())},userSuggestion:function(j){var H=Ve.children(je.addition),ge=p.get.item(j),me=ge&&ge.not(je.addition).length,De=H.length>0,ht;if(!(q.useLabels&&p.has.maxSelections())){if(j===""||me){H.remove();return}De?(H.data(tt.value,j).data(tt.text,j).attr("data-"+tt.value,j).attr("data-"+tt.text,j).removeClass(ne.filtered),q.hideAdditions||(ht=q.templates.addition(p.add.variables(c.addResult,j)),H.html(ht)),p.verbose("Replacing user suggestion with new value",H)):(H=p.create.userChoice(j),H.prependTo(Ve),p.verbose("Adding item choice to menu corresponding with user choice addition",H)),(!q.hideAdditions||p.is.allFiltered())&&H.addClass(ne.selected).siblings().removeClass(ne.selected),p.refreshItems()}},variables:function(j,H){var ge=j.search("{count}")!==-1,me=j.search("{maxCount}")!==-1,De=j.search("{term}")!==-1,ht,rt;return p.verbose("Adding templated variables to message",j),ge&&(ht=p.get.selectionCount(),j=j.replace("{count}",ht)),me&&(ht=p.get.selectionCount(),j=j.replace("{maxCount}",q.maxSelections)),De&&(rt=H||p.get.query(),j=j.replace("{term}",rt)),j},value:function(j,H,ge){var me=p.get.values(),De;if(p.has.value(j)){p.debug("Value already selected");return}if(j===""){p.debug("Cannot select blank values from multiselect");return}Array.isArray(me)?(De=me.concat([j]),De=p.get.uniqueArray(De)):De=[j],p.has.selectInput()?p.can.extendSelect()&&(p.debug("Adding value to select",j,De,Y),p.add.optionValue(j)):(De=De.join(q.delimiter),p.debug("Setting hidden input to delimited value",De,Y)),q.fireOnInit===!1&&p.is.initialLoad()?p.verbose("Skipping onadd callback on initial load",q.onAdd):q.onAdd.call(ee,j,H,ge),p.set.value(De,H,ge),p.check.maxSelections()}},remove:{active:function(){ce.removeClass(ne.active)},activeLabel:function(){ce.find(je.label).removeClass(ne.active)},empty:function(){ce.removeClass(ne.empty)},loading:function(){ce.removeClass(ne.loading)},initialLoad:function(){yt=!1},upward:function(j){var H=j||ce;H.removeClass(ne.upward)},leftward:function(j){var H=j||Ve;H.removeClass(ne.leftward)},visible:function(){ce.removeClass(ne.visible)},activeItem:function(){Ye.removeClass(ne.active)},filteredItem:function(){q.useLabels&&p.has.maxSelections()||(q.useLabels&&p.is.multiple()?Ye.not("."+ne.active).removeClass(ne.filtered):Ye.removeClass(ne.filtered),q.hideDividers&&Lt.removeClass(ne.hidden),p.remove.empty())},optionValue:function(j){var H=p.escape.value(j),ge=Y.find('option[value="'+p.escape.string(H)+'"]'),me=ge.length>0;!me||!ge.hasClass(ne.addition)||(ti&&(ti.disconnect(),p.verbose("Temporarily disconnecting mutation observer")),ge.remove(),p.verbose("Removing user addition as an <option>",H),ti&&ti.observe(Y[0],{childList:!0,subtree:!0}))},message:function(){Ve.children(je.message).remove()},searchWidth:function(){k.css("width","")},searchTerm:function(){p.verbose("Cleared search term"),k.val(""),p.set.filtered()},userAddition:function(){Ye.filter(je.addition).remove()},selected:function(j,H){if(H=q.allowAdditions?H||p.get.itemWithAdditions(j):H||p.get.item(j),!H)return!1;H.each(function(){var ge=r(this),me=p.get.choiceText(ge),De=p.get.choiceValue(ge,me);p.is.multiple()?q.useLabels?(p.remove.value(De,me,ge),p.remove.label(De)):(p.remove.value(De,me,ge),p.get.selectionCount()===0?p.set.placeholderText():p.set.text(p.add.variables(c.count))):p.remove.value(De,me,ge),ge.removeClass(ne.filtered).removeClass(ne.active),q.useLabels&&ge.removeClass(ne.selected)})},selectedItem:function(){Ye.removeClass(ne.selected)},value:function(j,H,ge){var me=p.get.values(),De;j=p.escape.htmlEntities(j),p.has.selectInput()?(p.verbose("Input is <select> removing selected option",j),De=p.remove.arrayValue(j,me),p.remove.optionValue(j)):(p.verbose("Removing from delimited values",j),De=p.remove.arrayValue(j,me),De=De.join(q.delimiter)),q.fireOnInit===!1&&p.is.initialLoad()?p.verbose("No callback on initial load",q.onRemove):q.onRemove.call(ee,j,H,ge),p.set.value(De,H,ge),p.check.maxSelections()},arrayValue:function(j,H){return Array.isArray(H)||(H=[H]),H=r.grep(H,function(ge){return j!=ge}),p.verbose("Removed value from delimited string",j,H),H},label:function(j,H){var ge=ce.find(je.label),me=ge.filter("[data-"+tt.value+'="'+p.escape.string(q.ignoreCase?j.toLowerCase():j)+'"]');p.verbose("Removing label",me),me.remove()},activeLabels:function(j){j=j||ce.find(je.label).filter("."+ne.active),p.verbose("Removing active label selections",j),p.remove.labels(j)},labels:function(j){j=j||ce.find(je.label),p.verbose("Removing labels",j),j.each(function(){var H=r(this),ge=H.data(tt.value),me=ge!==_?String(ge):ge,De=p.is.userValue(me);if(q.onLabelRemove.call(H,ge)===!1){p.debug("Label remove callback cancelled removal");return}p.remove.message(),De?(p.remove.value(me),p.remove.label(me)):p.remove.selected(me)})},tabbable:function(){p.is.searchSelection()?(p.debug("Searchable dropdown initialized"),k.removeAttr("tabindex"),Ve.removeAttr("tabindex")):(p.debug("Simple selection dropdown initialized"),ce.removeAttr("tabindex"),Ve.removeAttr("tabindex"))},diacritics:function(j){return q.ignoreDiacritics?j.normalize("NFD").replace(/[\u0300-\u036f]/g,""):j}},has:{menuSearch:function(){return p.has.search()&&k.closest(Ve).length>0},clearItem:function(){return Oe.length>0},search:function(){return k.length>0},sizer:function(){return N.length>0},selectInput:function(){return Y.is("select")},minCharacters:function(j){return q.minCharacters&&!te?(j=String(j!==_?j:p.get.query()),j.length>=q.minCharacters):(te=!1,!0)},firstLetter:function(j,H){var ge,me;return!j||j.length===0||typeof H!="string"?!1:(ge=p.get.choiceText(j,!1),H=H.toLowerCase(),me=String(ge).charAt(0).toLowerCase(),H==me)},input:function(){return Y.length>0},items:function(){return Ye.length>0},menu:function(){return Ve.length>0},message:function(){return Ve.children(je.message).length!==0},label:function(j){var H=p.escape.value(j),ge=ce.find(je.label);return q.ignoreCase&&(H=H.toLowerCase()),ge.filter("[data-"+tt.value+'="'+p.escape.string(H)+'"]').length>0},maxSelections:function(){return q.maxSelections&&p.get.selectionCount()>=q.maxSelections},allResultsFiltered:function(){var j=Ye.not(je.addition);return j.filter(je.unselectable).length===j.length},userSuggestion:function(){return Ve.children(je.addition).length>0},query:function(){return p.get.query()!==""},value:function(j){return q.ignoreCase?p.has.valueIgnoringCase(j):p.has.valueMatchingCase(j)},valueMatchingCase:function(j){var H=p.get.values(),ge=Array.isArray(H)?H&&r.inArray(j,H)!==-1:H==j;return!!ge},valueIgnoringCase:function(j){var H=p.get.values(),ge=!1;return Array.isArray(H)||(H=[H]),r.each(H,function(me,De){if(String(j).toLowerCase()==String(De).toLowerCase())return ge=!0,!1}),ge}},is:{active:function(){return ce.hasClass(ne.active)},animatingInward:function(){return Ve.transition("is inward")},animatingOutward:function(){return Ve.transition("is outward")},bubbledLabelClick:function(j){return r(j.target).is("select, input")&&ce.closest("label").length>0},bubbledIconClick:function(j){return r(j.target).closest(ve).length>0},alreadySetup:function(){return ce.is("select")&&ce.parent(je.dropdown).data(xt)!==_&&ce.prev().length===0},animating:function(j){return j?j.transition&&j.transition("is animating"):Ve.transition&&Ve.transition("is animating")},leftward:function(j){var H=j||Ve;return H.hasClass(ne.leftward)},clearable:function(){return ce.hasClass(ne.clearable)||q.clearable},disabled:function(){return ce.hasClass(ne.disabled)},focused:function(){return b.activeElement===ce[0]},focusedOnSearch:function(){return b.activeElement===k[0]},allFiltered:function(){return(p.is.multiple()||p.has.search())&&!(q.hideAdditions==!1&&p.has.userSuggestion())&&!p.has.message()&&p.has.allResultsFiltered()},hidden:function(j){return!p.is.visible(j)},initialLoad:function(){return yt},inObject:function(j,H){var ge=!1;return r.each(H,function(me,De){if(De==j)return ge=!0,!0}),ge},multiple:function(){return ce.hasClass(ne.multiple)},remote:function(){return q.apiSettings&&p.can.useAPI()},single:function(){return!p.is.multiple()},selectMutation:function(j){var H=!1;return r.each(j,function(ge,me){if(r(me.target).is("select")||r(me.addedNodes).is("select"))return H=!0,!1}),H},search:function(){return ce.hasClass(ne.search)},searchSelection:function(){return p.has.search()&&k.parent(je.dropdown).length===1},selection:function(){return ce.hasClass(ne.selection)},userValue:function(j){return r.inArray(j,p.get.userValues())!==-1},upward:function(j){var H=j||ce;return H.hasClass(ne.upward)},visible:function(j){return j?j.hasClass(ne.visible):Ve.hasClass(ne.visible)},verticallyScrollableContext:function(){var j=G.get(0)!==v?G.css("overflow-y"):!1;return j=="auto"||j=="scroll"},horizontallyScrollableContext:function(){var j=G.get(0)!==v?G.css("overflow-X"):!1;return j=="auto"||j=="scroll"}},can:{activate:function(j){return!!(q.useLabels||!p.has.maxSelections()||p.has.maxSelections()&&j.hasClass(ne.active))},openDownward:function(j){var H=j||Ve,ge=!0,me={},De;return H.addClass(ne.loading),De={context:{offset:G.get(0)===v?{top:0,left:0}:G.offset(),scrollTop:G.scrollTop(),height:G.outerHeight()},menu:{offset:H.offset(),height:H.outerHeight()}},p.is.verticallyScrollableContext()&&(De.menu.offset.top+=De.context.scrollTop),me={above:De.context.scrollTop<=De.menu.offset.top-De.context.offset.top-De.menu.height,below:De.context.scrollTop+De.context.height>=De.menu.offset.top-De.context.offset.top+De.menu.height},me.below?(p.verbose("Dropdown can fit in context downward",me),ge=!0):!me.below&&!me.above?(p.verbose("Dropdown cannot fit in either direction, favoring downward",me),ge=!0):(p.verbose("Dropdown cannot fit below, opening upward",me),ge=!1),H.removeClass(ne.loading),ge},openRightward:function(j){var H=j||Ve,ge=!0,me=!1,De;return H.addClass(ne.loading),De={context:{offset:G.get(0)===v?{top:0,left:0}:G.offset(),scrollLeft:G.scrollLeft(),width:G.outerWidth()},menu:{offset:H.offset(),width:H.outerWidth()}},p.is.horizontallyScrollableContext()&&(De.menu.offset.left+=De.context.scrollLeft),me=De.menu.offset.left-De.context.offset.left+De.menu.width>=De.context.scrollLeft+De.context.width,me&&(p.verbose("Dropdown cannot fit in context rightward",me),ge=!1),H.removeClass(ne.loading),ge},click:function(){return Z||q.on=="click"},extendSelect:function(){return q.allowAdditions||q.apiSettings},show:function(){return!p.is.disabled()&&(p.has.items()||p.has.message())},useAPI:function(){return r.fn.api!==_}},animate:{show:function(j,H){var ge=H||Ve,me=H?function(){}:function(){p.hideSubMenus(),p.hideOthers(),p.set.active()},De;if(j=r.isFunction(j)?j:function(){},p.verbose("Doing menu show animation",ge),p.set.direction(H),De=p.get.transition(H),p.is.selection()&&p.set.scrollPosition(p.get.selectedItem(),!0),p.is.hidden(ge)||p.is.animating(ge)){var ht=ce.hasClass("column")?"flex":!1;De=="none"?(me(),ge.transition({displayType:ht}).transition("show"),j.call(ee)):r.fn.transition!==_&&ce.transition("is supported")?ge.transition({animation:De+" in",debug:q.debug,verbose:q.verbose,duration:q.duration,queue:!0,onStart:me,displayType:ht,onComplete:function(){j.call(ee)}}):p.error(S.noTransition,De)}},hide:function(j,H){var ge=H||Ve,me=H?function(){}:function(){p.can.click()&&p.unbind.intent(),p.remove.active()},De=p.get.transition(H);j=r.isFunction(j)?j:function(){},(p.is.visible(ge)||p.is.animating(ge))&&(p.verbose("Doing menu hide animation",ge),De=="none"?(me(),ge.transition("hide"),j.call(ee)):r.fn.transition!==_&&ce.transition("is supported")?ge.transition({animation:De+" out",duration:q.duration,debug:q.debug,verbose:q.verbose,queue:!1,onStart:me,onComplete:function(){j.call(ee)}}):p.error(S.transition))}},hideAndClear:function(){p.remove.searchTerm(),!p.has.maxSelections()&&(p.has.search()?p.hide(function(){p.remove.filteredItem()}):p.hide())},delay:{show:function(){p.verbose("Delaying show event to ensure user intent"),clearTimeout(p.timer),p.timer=setTimeout(p.show,q.delay.show)},hide:function(){p.verbose("Delaying hide event to ensure user intent"),clearTimeout(p.timer),p.timer=setTimeout(p.hide,q.delay.hide)}},escape:{value:function(j){var H=Array.isArray(j),ge=typeof j=="string",me=!ge&&!H,De=ge&&j.search(et.quote)!==-1,ht=[];return me||!De?j:(p.debug("Encoding quote values for use in select",j),H?(r.each(j,function(rt,zt){ht.push(zt.replace(et.quote,"&quot;"))}),ht):j.replace(et.quote,"&quot;"))},string:function(j){return j=String(j),j.replace(et.escape,"\\$&")},htmlEntities:function(j){var H=/[<>"'`]/g,ge=/[&<>"'`]/,me={"<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},De=function(ht){return me[ht]};return ge.test(j)?(j=j.replace(/&(?![a-z0-9#]{1,6};)/,"&amp;"),j.replace(H,De)):j}},setting:function(j,H){if(p.debug("Changing setting",j,H),r.isPlainObject(j))r.extend(!0,q,j);else if(H!==_)r.isPlainObject(q[j])?r.extend(!0,q[j],H):q[j]=H;else return q[j]},internal:function(j,H){if(r.isPlainObject(j))r.extend(!0,p,j);else if(H!==_)p[j]=H;else return p[j]},debug:function(){!q.silent&&q.debug&&(q.performance?p.performance.log(arguments):(p.debug=Function.prototype.bind.call(console.info,console,q.name+":"),p.debug.apply(console,arguments)))},verbose:function(){!q.silent&&q.verbose&&q.debug&&(q.performance?p.performance.log(arguments):(p.verbose=Function.prototype.bind.call(console.info,console,q.name+":"),p.verbose.apply(console,arguments)))},error:function(){q.silent||(p.error=Function.prototype.bind.call(console.error,console,q.name+":"),p.error.apply(console,arguments))},performance:{log:function(j){var H,ge,me;q.performance&&(H=new Date().getTime(),me=we||H,ge=H-me,we=H,Be.push({Name:j[0],Arguments:[].slice.call(j,1)||"",Element:ee,"Execution Time":ge})),clearTimeout(p.performance.timer),p.performance.timer=setTimeout(p.performance.display,500)},display:function(){var j=q.name+":",H=0;we=!1,clearTimeout(p.performance.timer),r.each(Be,function(ge,me){H+=me["Execution Time"]}),j+=" "+H+"ms",J&&(j+=" '"+J+"'"),(console.group!==_||console.table!==_)&&Be.length>0&&(console.groupCollapsed(j),console.table?console.table(Be):r.each(Be,function(ge,me){console.log(me.Name+": "+me["Execution Time"]+"ms")}),console.groupEnd()),Be=[]}},invoke:function(j,H,ge){var me=oe,De,ht,rt;return H=H||Ke,ge=ee||ge,typeof j=="string"&&me!==_&&(j=j.split(/[\. ]/),De=j.length-1,r.each(j,function(zt,fi){var vi=zt!=De?fi+j[zt+1].charAt(0).toUpperCase()+j[zt+1].slice(1):j;if(r.isPlainObject(me[vi])&&zt!=De)me=me[vi];else{if(me[vi]!==_)return ht=me[vi],!1;if(r.isPlainObject(me[fi])&&zt!=De)me=me[fi];else return me[fi]!==_?(ht=me[fi],!1):(p.error(S.method,j),!1)}})),r.isFunction(ht)?rt=ht.apply(ge,H):ht!==_&&(rt=ht),Array.isArray(At)?At.push(rt):At!==_?At=[At,rt]:rt!==_&&(At=rt),ht}},Q?(oe===_&&p.initialize(),p.invoke(Ue)):(oe!==_&&oe.invoke("destroy"),p.initialize())}),At!==_?At:O},r.fn.dropdown.settings={silent:!1,debug:!1,verbose:!1,performance:!0,on:"click",action:"activate",values:!1,clearable:!1,apiSettings:!1,selectOnKeydown:!0,minCharacters:0,filterRemoteData:!1,saveRemoteData:!0,throttle:200,context:v,direction:"auto",keepOnScreen:!0,match:"both",fullTextSearch:!1,ignoreDiacritics:!1,hideDividers:!1,placeholder:"auto",preserveHTML:!0,sortSelect:!1,forceSelection:!0,allowAdditions:!1,ignoreCase:!1,ignoreSearchCase:!0,hideAdditions:!0,maxSelections:!1,useLabels:!0,delimiter:",",showOnFocus:!0,allowReselection:!1,allowTab:!0,allowCategorySelection:!1,fireOnInit:!1,transition:"auto",duration:200,glyphWidth:1.037,headerDivider:!0,label:{transition:"scale",duration:200,variation:!1},delay:{hide:300,show:200,search:20,touch:50},onChange:function(g,O,R){},onAdd:function(g,O,R){},onRemove:function(g,O,R){},onLabelSelect:function(g){},onLabelCreate:function(g,O){return r(this)},onLabelRemove:function(g){return!0},onNoResults:function(g){return!0},onShow:function(){},onHide:function(){},onAfterFiltered:function(){},name:"Dropdown",namespace:"dropdown",message:{addResult:"Add <b>{term}</b>",count:"{count} selected",maxSelections:"Max {maxCount} selections",noResults:"No results found.",serverError:"There was an error contacting the server"},error:{action:"You called a dropdown action that was not defined",alreadySetup:"Once a select has been initialized behaviors must be called on the created ui dropdown",labels:"Allowing user additions currently requires the use of labels.",missingMultiple:"<select> requires multiple property to be set to correctly preserve multiple values",method:"The method you called is not defined.",noAPI:"The API module is required to load resources remotely",noStorage:"Saving remote data requires session storage",noTransition:"This module requires ui transitions <https://github.com/Semantic-Org/UI-Transition>",noNormalize:'"ignoreDiacritics" setting will be ignored. Browser does not support String().normalize(). You may consider including <https://cdn.jsdelivr.net/npm/unorm@1.4.1/lib/unorm.min.js> as a polyfill.'},regExp:{escape:/[-[\]{}()*+?.,\\^$|#\s:=@]/g,quote:/"/g},metadata:{defaultText:"defaultText",defaultValue:"defaultValue",placeholderText:"placeholder",text:"text",value:"value"},fields:{remoteValues:"results",values:"values",disabled:"disabled",name:"name",value:"value",text:"text",type:"type",image:"image",imageClass:"imageClass",icon:"icon",iconClass:"iconClass",class:"class",divider:"divider"},keys:{backspace:8,delimiter:188,deleteKey:46,enter:13,escape:27,pageUp:33,pageDown:34,leftArrow:37,upArrow:38,rightArrow:39,downArrow:40},selector:{addition:".addition",divider:".divider, .header",dropdown:".ui.dropdown",hidden:".hidden",icon:"> .dropdown.icon",input:'> input[type="hidden"], > select',item:".item",label:"> .label",remove:"> .label > .delete.icon",siblingLabel:".label",menu:".menu",message:".message",menuIcon:".dropdown.icon",search:"input.search, .menu > .search > input, .menu input.search",sizer:"> span.sizer",text:"> .text:not(.icon)",unselectable:".disabled, .filtered, .tw-hidden",clearIcon:"> .remove.icon"},className:{active:"active",addition:"addition",animating:"animating",disabled:"disabled",empty:"empty",dropdown:"ui dropdown",filtered:"filtered",hidden:"hidden transition",icon:"icon",image:"image",item:"item",label:"ui label",loading:"loading",menu:"menu",message:"message",multiple:"multiple",placeholder:"default",sizer:"sizer",search:"search",selected:"selected",selection:"selection",upward:"upward",leftward:"left",visible:"visible",clearable:"clearable",noselection:"noselection",delete:"delete",header:"header",divider:"divider",groupIcon:"",unfilterable:"unfilterable"}},r.fn.dropdown.settings.templates={deQuote:function(g){return String(g).replace(/"/g,"")},escape:function(g,O){if(O)return g;var R=/[<>"'`]/g,J=/[&<>"'`]/,Z={"<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},C=function(we){return Z[we]};return J.test(g)?(g=g.replace(/&(?![a-z0-9#]{1,6};)/,"&amp;"),g.replace(R,C)):g},dropdown:function(g,O,R,J){var Z=g.placeholder||!1,C="",we=r.fn.dropdown.settings.templates.escape;return C+='<i class="dropdown icon"></i>',Z?C+='<div class="default text">'+we(Z,R)+"</div>":C+='<div class="text"></div>',C+='<div class="'+J.menu+'">',C+=r.fn.dropdown.settings.templates.menu(g,O,R,J),C+="</div>",C},menu:function(g,O,R,J){var Z=g[O.values]||[],C="",we=r.fn.dropdown.settings.templates.escape,Be=r.fn.dropdown.settings.templates.deQuote;return r.each(Z,function(Ue,Q){var Ke=Q[O.type]?Q[O.type]:"item";if(Ke==="item"){var At=Q[O.text]?' data-text="'+we(Q[O.text])+'"':"",gt=Q[O.disabled]?J.disabled+" ":"";C+='<div class="'+gt+(Q[O.class]?Be(Q[O.class]):J.item)+'" data-value="'+we(Q[O.value])+'"'+At+">",Q[O.image]&&(C+='<img class="'+(Q[O.imageClass]?Be(Q[O.imageClass]):J.image)+'" src="'+Be(Q[O.image])+'">'),Q[O.icon]&&(C+='<i class="'+Be(Q[O.icon])+" "+(Q[O.iconClass]?Be(Q[O.iconClass]):J.icon)+'"></i>'),C+=we(Q[O.name]||"",R),C+="</div>"}else if(Ke==="header"){var q=we(Q[O.name]||"",R),ne=Q[O.icon]?Be(Q[O.icon]):J.groupIcon;(q!==""||ne!=="")&&(C+='<div class="'+(Q[O.class]?Be(Q[O.class]):J.header)+'">',ne!==""&&(C+='<i class="'+ne+" "+(Q[O.iconClass]?Be(Q[O.iconClass]):J.icon)+'"></i>'),C+=q,C+="</div>"),Q[O.divider]&&(C+='<div class="'+J.divider+'"></div>')}}),C},label:function(g,O,R,J){var Z=r.fn.dropdown.settings.templates.escape;return Z(O,R)+'<i class="'+J.delete+' icon"></i>'},message:function(g){return g},addition:function(g){return g}}})(jQuery,window,document);(function(r,v,b,_){"use strict";r.isFunction=r.isFunction||function(g){return typeof g=="function"&&typeof g.nodeType!="number"},v=typeof v<"u"&&v.Math==Math?v:typeof self<"u"&&self.Math==Math?self:Function("return this")(),r.fn.modal=function(g){var O=r(this),R=r(v),J=r(b),Z=r("body"),C=O.selector||"",we=new Date().getTime(),Be=[],Ue=arguments[0],Q=typeof Ue=="string",Ke=[].slice.call(arguments,1),At=v.requestAnimationFrame||v.mozRequestAnimationFrame||v.webkitRequestAnimationFrame||v.msRequestAnimationFrame||function(q){setTimeout(q,0)},gt;return O.each(function(){var q=r.isPlainObject(g)?r.extend(!0,{},r.fn.modal.settings,g):r.extend({},r.fn.modal.settings),ne=q.selector,c=q.className,W=q.namespace,Re=q.error,tt="."+W,st="module-"+W,et=r(this),je=r(q.context),S=et.find(ne.close),si,ct,xt,ce,G,P=this,k=et.data(st),N=!1,Y,ve,Oe="",Ne="",Ve,Ye,Lt,K;K={initialize:function(){K.cache={},K.verbose("Initializing dimmer",je),K.create.id(),K.create.dimmer(),q.allowMultiple&&K.create.innerDimmer(),q.centered||et.addClass("top aligned"),K.refreshModals(),K.bind.events(),q.observeChanges&&K.observeChanges(),K.instantiate()},instantiate:function(){K.verbose("Storing instance of modal"),k=K,et.data(st,k)},create:{dimmer:function(){var Ee={debug:q.debug,dimmerName:"modals"},nt=r.extend(!0,Ee,q.dimmerSettings);if(r.fn.dimmer===_){K.error(Re.dimmer);return}K.debug("Creating dimmer"),ce=je.dimmer(nt),q.detachable?(K.verbose("Modal is detachable, moving content into dimmer"),ce.dimmer("add content",et)):K.set.undetached(),G=ce.dimmer("get dimmer")},id:function(){Ye=(Math.random().toString(16)+"000000000").substr(2,8),Ve="."+Ye,K.verbose("Creating unique id for element",Ye)},innerDimmer:function(){et.find(ne.dimmer).length==0&&et.prepend('<div class="ui inverted dimmer"></div>')}},destroy:function(){Lt&&Lt.disconnect(),K.verbose("Destroying previous modal"),et.removeData(st).off(tt),R.off(Ve),G.off(Ve),S.off(tt),je.dimmer("destroy")},observeChanges:function(){"MutationObserver"in v&&(Lt=new MutationObserver(function(Ee){K.debug("DOM tree modified, refreshing"),K.refresh()}),Lt.observe(P,{childList:!0,subtree:!0}),K.debug("Setting up mutation observer",Lt))},refresh:function(){K.remove.scrolling(),K.cacheSizes(),K.can.useFlex()||K.set.modalOffset(),K.set.screenHeight(),K.set.type()},refreshModals:function(){ct=et.siblings(ne.modal),si=ct.add(et)},attachEvents:function(Ee,nt){var te=r(Ee);nt=r.isFunction(K[nt])?K[nt]:K.toggle,te.length>0?(K.debug("Attaching modal events to element",Ee,nt),te.off(tt).on("click"+tt,nt)):K.error(Re.notFound,Ee)},bind:{events:function(){K.verbose("Attaching events"),et.on("click"+tt,ne.close,K.event.close).on("click"+tt,ne.approve,K.event.approve).on("click"+tt,ne.deny,K.event.deny),R.on("resize"+Ve,K.event.resize)},scrollLock:function(){ce.get(0).addEventListener("touchmove",K.event.preventScroll,{passive:!1})}},unbind:{scrollLock:function(){ce.get(0).removeEventListener("touchmove",K.event.preventScroll,{passive:!1})}},get:{id:function(){return(Math.random().toString(16)+"000000000").substr(2,8)}},event:{approve:function(){if(N||q.onApprove.call(P,r(this))===!1){K.verbose("Approve callback returned false cancelling hide");return}N=!0,K.hide(function(){N=!1})},preventScroll:function(Ee){Ee.target.className.indexOf("dimmer")!==-1&&Ee.preventDefault()},deny:function(){if(N||q.onDeny.call(P,r(this))===!1){K.verbose("Deny callback returned false cancelling hide");return}N=!0,K.hide(function(){N=!1})},close:function(){K.hide()},mousedown:function(Ee){var nt=r(Ee.target),te=K.is.rtl();Y=nt.closest(ne.modal).length>0,Y&&K.verbose("Mouse down event registered inside the modal"),ve=K.is.scrolling()&&(!te&&r(v).outerWidth()-q.scrollbarWidth<=Ee.clientX||te&&q.scrollbarWidth>=Ee.clientX),ve&&K.verbose("Mouse down event registered inside the scrollbar")},mouseup:function(Ee){if(!q.closable){K.verbose("Dimmer clicked but closable setting is disabled");return}if(Y){K.debug("Dimmer clicked but mouse down was initially registered inside the modal");return}if(ve){K.debug("Dimmer clicked but mouse down was initially registered inside the scrollbar");return}var nt=r(Ee.target),te=nt.closest(ne.modal).length>0,ee=r.contains(b.documentElement,Ee.target);if(!te&&ee&&K.is.active()&&et.hasClass(c.front)){if(K.debug("Dimmer clicked, hiding all modals"),q.allowMultiple){if(!K.hideAll())return}else if(!K.hide())return;K.remove.clickaway()}},debounce:function(Ee,nt){clearTimeout(K.timer),K.timer=setTimeout(Ee,nt)},keyboard:function(Ee){var nt=Ee.which,te=27;nt==te&&(q.closable?(K.debug("Escape key pressed hiding modal"),et.hasClass(c.front)&&K.hide()):K.debug("Escape key pressed, but closable is set to false"),Ee.preventDefault())},resize:function(){ce.dimmer("is active")&&(K.is.animating()||K.is.active())&&At(K.refresh)}},toggle:function(){K.is.active()||K.is.animating()?K.hide():K.show()},show:function(Ee){Ee=r.isFunction(Ee)?Ee:function(){},K.refreshModals(),K.set.dimmerSettings(),K.set.dimmerStyles(),K.showModal(Ee)},hide:function(Ee){return Ee=r.isFunction(Ee)?Ee:function(){},K.refreshModals(),K.hideModal(Ee)},showModal:function(Ee){Ee=r.isFunction(Ee)?Ee:function(){},K.is.animating()||!K.is.active()?(K.showDimmer(),K.cacheSizes(),K.set.bodyMargin(),K.can.useFlex()?K.remove.legacy():(K.set.legacy(),K.set.modalOffset(),K.debug("Using non-flex legacy modal positioning.")),K.set.screenHeight(),K.set.type(),K.set.clickaway(),!q.allowMultiple&&K.others.active()?K.hideOthers(K.showModal):(N=!1,q.allowMultiple&&(K.others.active()&&ct.filter("."+c.active).find(ne.dimmer).addClass("active"),q.detachable&&et.detach().appendTo(G)),q.onShow.call(P),q.transition&&r.fn.transition!==_&&et.transition("is supported")?(K.debug("Showing modal with css animations"),et.transition({debug:q.debug,animation:q.transition+" in",queue:q.queue,duration:q.duration,useFailSafe:!0,onComplete:function(){q.onVisible.apply(P),q.keyboardShortcuts&&K.add.keyboardShortcuts(),K.save.focus(),K.set.active(),q.autofocus&&K.set.autofocus(),Ee()}})):K.error(Re.noTransition))):K.debug("Modal is already visible")},hideModal:function(Ee,nt,te){var ee=ct.filter("."+c.active).last();if(Ee=r.isFunction(Ee)?Ee:function(){},K.debug("Hiding modal"),q.onHide.call(P,r(this))===!1)return K.verbose("Hide callback returned false cancelling hide"),N=!1,!1;(K.is.animating()||K.is.active())&&(q.transition&&r.fn.transition!==_&&et.transition("is supported")?(K.remove.active(),et.transition({debug:q.debug,animation:q.transition+" out",queue:q.queue,duration:q.duration,useFailSafe:!0,onStart:function(){!K.others.active()&&!K.others.animating()&&!nt&&K.hideDimmer(),q.keyboardShortcuts&&!K.others.active()&&K.remove.keyboardShortcuts()},onComplete:function(){K.unbind.scrollLock(),q.allowMultiple&&(ee.addClass(c.front),et.removeClass(c.front),te?si.find(ne.dimmer).removeClass("active"):ee.find(ne.dimmer).removeClass("active")),q.onHidden.call(P),K.remove.dimmerStyles(),K.restore.focus(),Ee()}})):K.error(Re.noTransition))},showDimmer:function(){ce.dimmer("is animating")||!ce.dimmer("is active")?(K.save.bodyMargin(),K.debug("Showing dimmer"),ce.dimmer("show")):K.debug("Dimmer already visible")},hideDimmer:function(){if(ce.dimmer("is animating")||ce.dimmer("is active"))K.unbind.scrollLock(),ce.dimmer("hide",function(){K.restore.bodyMargin(),K.remove.clickaway(),K.remove.screenHeight()});else{K.debug("Dimmer is not visible cannot hide");return}},hideAll:function(Ee){var nt=si.filter("."+c.active+", ."+c.animating);if(Ee=r.isFunction(Ee)?Ee:function(){},nt.length>0){K.debug("Hiding all visible modals");var te=!0;return r(nt.get().reverse()).each(function(ee,oe){te&&(te=r(oe).modal("hide modal",Ee,!1,!0))}),te&&K.hideDimmer(),te}},hideOthers:function(Ee){var nt=ct.filter("."+c.active+", ."+c.animating);Ee=r.isFunction(Ee)?Ee:function(){},nt.length>0&&(K.debug("Hiding other modals",ct),nt.modal("hide modal",Ee,!0))},others:{active:function(){return ct.filter("."+c.active).length>0},animating:function(){return ct.filter("."+c.animating).length>0}},add:{keyboardShortcuts:function(){K.verbose("Adding keyboard shortcuts"),J.on("keyup"+tt,K.event.keyboard)}},save:{focus:function(){var Ee=r(b.activeElement),nt=Ee.closest(et).length>0;nt||(xt=r(b.activeElement).blur())},bodyMargin:function(){Oe=Z.css("margin-"+(K.can.leftBodyScrollbar()?"left":"right"));var Ee=parseInt(Oe.replace(/[^\d.]/g,"")),nt=v.innerWidth-b.documentElement.clientWidth;Ne=Ee+nt}},restore:{focus:function(){xt&&xt.length>0&&q.restoreFocus&&xt.focus()},bodyMargin:function(){var Ee=K.can.leftBodyScrollbar()?"left":"right";Z.css("margin-"+Ee,Oe),Z.find(ne.bodyFixed.replace("right",Ee)).css("padding-"+Ee,Oe)}},remove:{active:function(){et.removeClass(c.active)},legacy:function(){et.removeClass(c.legacy)},clickaway:function(){q.detachable||et.off("mousedown"+Ve),G.off("mousedown"+Ve),G.off("mouseup"+Ve)},dimmerStyles:function(){G.removeClass(c.inverted),ce.removeClass(c.blurring)},bodyStyle:function(){Z.attr("style")===""&&(K.verbose("Removing style attribute"),Z.removeAttr("style"))},screenHeight:function(){K.debug("Removing page height"),Z.css("height","")},keyboardShortcuts:function(){K.verbose("Removing keyboard shortcuts"),J.off("keyup"+tt)},scrolling:function(){ce.removeClass(c.scrolling),et.removeClass(c.scrolling)}},cacheSizes:function(){et.addClass(c.loading);var Ee=et.prop("scrollHeight"),nt=et.outerWidth(),te=et.outerHeight();(K.cache.pageHeight===_||te!==0)&&(r.extend(K.cache,{pageHeight:r(b).outerHeight(),width:nt,height:te+q.offset,scrollHeight:Ee+q.offset,contextHeight:q.context=="body"?r(v).height():ce.height()}),K.cache.topOffset=-(K.cache.height/2)),et.removeClass(c.loading),K.debug("Caching modal and container sizes",K.cache)},can:{leftBodyScrollbar:function(){return K.cache.leftBodyScrollbar===_&&(K.cache.leftBodyScrollbar=K.is.rtl()&&(K.is.iframe&&!K.is.firefox()||K.is.safari()||K.is.edge()||K.is.ie())),K.cache.leftBodyScrollbar},useFlex:function(){return q.useFlex==="auto"?q.detachable&&!K.is.ie():(q.useFlex&&K.is.ie()?K.debug("useFlex true is not supported in IE"):q.useFlex&&!q.detachable&&K.debug("useFlex true in combination with detachable false is not supported"),q.useFlex)},fit:function(){var Ee=K.cache.contextHeight,nt=K.cache.contextHeight/2,te=K.cache.topOffset,ee=K.cache.scrollHeight,oe=K.cache.height,Ge=q.padding,yt=nt+te;return ee>oe?yt+ee+Ge<Ee:oe+Ge*2<Ee}},is:{active:function(){return et.hasClass(c.active)},ie:function(){if(K.cache.isIE===_){var Ee=!v.ActiveXObject&&"ActiveXObject"in v,nt="ActiveXObject"in v;K.cache.isIE=Ee||nt}return K.cache.isIE},animating:function(){return et.transition("is supported")?et.transition("is animating"):et.is(":visible")},scrolling:function(){return ce.hasClass(c.scrolling)},modernBrowser:function(){return!(v.ActiveXObject||"ActiveXObject"in v)},rtl:function(){return K.cache.isRTL===_&&(K.cache.isRTL=Z.attr("dir")==="rtl"||Z.css("direction")==="rtl"),K.cache.isRTL},safari:function(){return K.cache.isSafari===_&&(K.cache.isSafari=/constructor/i.test(v.HTMLElement)||!!v.ApplePaySession),K.cache.isSafari},edge:function(){return K.cache.isEdge===_&&(K.cache.isEdge=!!v.setImmediate&&!K.is.ie()),K.cache.isEdge},firefox:function(){return K.cache.isFirefox===_&&(K.cache.isFirefox=!!v.InstallTrigger),K.cache.isFirefox},iframe:function(){return self!==top}},set:{autofocus:function(){var Ee=et.find("[tabindex], :input").filter(":visible").filter(function(){return r(this).closest(".disabled").length===0}),nt=Ee.filter("[autofocus]"),te=nt.length>0?nt.first():Ee.first();te.length>0&&te.focus()},bodyMargin:function(){var Ee=K.can.leftBodyScrollbar()?"left":"right";(q.detachable||K.can.fit())&&Z.css("margin-"+Ee,Ne+"px"),Z.find(ne.bodyFixed.replace("right",Ee)).css("padding-"+Ee,Ne+"px")},clickaway:function(){q.detachable||et.on("mousedown"+Ve,K.event.mousedown),G.on("mousedown"+Ve,K.event.mousedown),G.on("mouseup"+Ve,K.event.mouseup)},dimmerSettings:function(){if(r.fn.dimmer===_){K.error(Re.dimmer);return}var Ee={debug:q.debug,dimmerName:"modals",closable:"auto",useFlex:K.can.useFlex(),duration:{show:q.duration,hide:q.duration}},nt=r.extend(!0,Ee,q.dimmerSettings);q.inverted&&(nt.variation=nt.variation!==_?nt.variation+" inverted":"inverted"),je.dimmer("setting",nt)},dimmerStyles:function(){q.inverted?G.addClass(c.inverted):G.removeClass(c.inverted),q.blurring?ce.addClass(c.blurring):ce.removeClass(c.blurring)},modalOffset:function(){if(q.detachable)et.css({marginTop:!et.hasClass("aligned")&&K.can.fit()?-(K.cache.height/2):q.padding/2,marginLeft:-(K.cache.width/2)});else{var Ee=K.can.fit();et.css({top:!et.hasClass("aligned")&&Ee?r(b).scrollTop()+(K.cache.contextHeight-K.cache.height)/2:!Ee||et.hasClass("top")?r(b).scrollTop()+q.padding:r(b).scrollTop()+(K.cache.contextHeight-K.cache.height-q.padding),marginLeft:-(K.cache.width/2)})}K.verbose("Setting modal offset for legacy mode")},screenHeight:function(){K.can.fit()?Z.css("height",""):et.hasClass("bottom")||(K.debug("Modal is taller than page content, resizing page height"),Z.css("height",K.cache.height+q.padding*2))},active:function(){et.addClass(c.active+" "+c.front),ct.filter("."+c.active).removeClass(c.front)},scrolling:function(){ce.addClass(c.scrolling),et.addClass(c.scrolling),K.unbind.scrollLock()},legacy:function(){et.addClass(c.legacy)},type:function(){K.can.fit()?(K.verbose("Modal fits on screen"),!K.others.active()&&!K.others.animating()&&(K.remove.scrolling(),K.bind.scrollLock())):et.hasClass("bottom")?K.verbose("Bottom aligned modal not fitting on screen is unsupported for scrolling"):(K.verbose("Modal cannot fit on screen setting to scrolling"),K.set.scrolling())},undetached:function(){ce.addClass(c.undetached)}},setting:function(Ee,nt){if(K.debug("Changing setting",Ee,nt),r.isPlainObject(Ee))r.extend(!0,q,Ee);else if(nt!==_)r.isPlainObject(q[Ee])?r.extend(!0,q[Ee],nt):q[Ee]=nt;else return q[Ee]},internal:function(Ee,nt){if(r.isPlainObject(Ee))r.extend(!0,K,Ee);else if(nt!==_)K[Ee]=nt;else return K[Ee]},debug:function(){!q.silent&&q.debug&&(q.performance?K.performance.log(arguments):(K.debug=Function.prototype.bind.call(console.info,console,q.name+":"),K.debug.apply(console,arguments)))},verbose:function(){!q.silent&&q.verbose&&q.debug&&(q.performance?K.performance.log(arguments):(K.verbose=Function.prototype.bind.call(console.info,console,q.name+":"),K.verbose.apply(console,arguments)))},error:function(){q.silent||(K.error=Function.prototype.bind.call(console.error,console,q.name+":"),K.error.apply(console,arguments))},performance:{log:function(Ee){var nt,te,ee;q.performance&&(nt=new Date().getTime(),ee=we||nt,te=nt-ee,we=nt,Be.push({Name:Ee[0],Arguments:[].slice.call(Ee,1)||"",Element:P,"Execution Time":te})),clearTimeout(K.performance.timer),K.performance.timer=setTimeout(K.performance.display,500)},display:function(){var Ee=q.name+":",nt=0;we=!1,clearTimeout(K.performance.timer),r.each(Be,function(te,ee){nt+=ee["Execution Time"]}),Ee+=" "+nt+"ms",C&&(Ee+=" '"+C+"'"),(console.group!==_||console.table!==_)&&Be.length>0&&(console.groupCollapsed(Ee),console.table?console.table(Be):r.each(Be,function(te,ee){console.log(ee.Name+": "+ee["Execution Time"]+"ms")}),console.groupEnd()),Be=[]}},invoke:function(Ee,nt,te){var ee=k,oe,Ge,yt;return nt=nt||Ke,te=P||te,typeof Ee=="string"&&ee!==_&&(Ee=Ee.split(/[\. ]/),oe=Ee.length-1,r.each(Ee,function(jt,Bt){var Qt=jt!=oe?Bt+Ee[jt+1].charAt(0).toUpperCase()+Ee[jt+1].slice(1):Ee;if(r.isPlainObject(ee[Qt])&&jt!=oe)ee=ee[Qt];else{if(ee[Qt]!==_)return Ge=ee[Qt],!1;if(r.isPlainObject(ee[Bt])&&jt!=oe)ee=ee[Bt];else return ee[Bt]!==_&&(Ge=ee[Bt]),!1}})),r.isFunction(Ge)?yt=Ge.apply(te,nt):Ge!==_&&(yt=Ge),Array.isArray(gt)?gt.push(yt):gt!==_?gt=[gt,yt]:yt!==_&&(gt=yt),Ge}},Q?(k===_&&K.initialize(),K.invoke(Ue)):(k!==_&&k.invoke("destroy"),K.initialize())}),gt!==_?gt:this},r.fn.modal.settings={name:"Modal",namespace:"modal",useFlex:"auto",offset:0,silent:!1,debug:!1,verbose:!1,performance:!0,observeChanges:!1,allowMultiple:!1,detachable:!0,closable:!0,autofocus:!0,restoreFocus:!0,inverted:!1,blurring:!1,centered:!0,dimmerSettings:{closable:!1,useCSS:!0},keyboardShortcuts:!0,context:"body",queue:!1,duration:500,transition:"scale",padding:50,scrollbarWidth:10,onShow:function(){},onVisible:function(){},onHide:function(){return!0},onHidden:function(){},onApprove:function(){return!0},onDeny:function(){return!0},selector:{close:"> .close",approve:".actions .positive, .actions .approve, .actions .ok",deny:".actions .negative, .actions .deny, .actions .cancel",modal:".ui.modal",dimmer:"> .ui.dimmer",bodyFixed:"> .ui.fixed.menu, > .ui.right.toast-container, > .ui.right.sidebar"},error:{dimmer:"UI Dimmer, a required component is not included in this page",method:"The method you called is not defined.",notFound:"The element you specified could not be found"},className:{active:"active",animating:"animating",blurring:"blurring",inverted:"inverted",legacy:"legacy",loading:"loading",scrolling:"scrolling",undetached:"undetached",front:"front"}}})(jQuery,window,document);(function(r,v,b,_){"use strict";r.isFunction=r.isFunction||function(g){return typeof g=="function"&&typeof g.nodeType!="number"},v=typeof v<"u"&&v.Math==Math?v:typeof self<"u"&&self.Math==Math?self:Function("return this")(),r.fn.search=function(g){var O=r(this),R=O.selector||"",J=new Date().getTime(),Z=[],C=arguments[0],we=typeof C=="string",Be=[].slice.call(arguments,1),Ue;return r(this).each(function(){var Q=r.isPlainObject(g)?r.extend(!0,{},r.fn.search.settings,g):r.extend({},r.fn.search.settings),Ke=Q.className,At=Q.metadata,gt=Q.regExp,q=Q.fields,ne=Q.selector,c=Q.error,W=Q.namespace,Re="."+W,tt=W+"-module",st=r(this),et=st.find(ne.prompt),je=st.find(ne.searchButton),S=st.find(ne.results),si=st.find(ne.result),ct=st.find(ne.category),xt=this,ce=st.data(tt),G=!1,P=!1,k;k={initialize:function(){k.verbose("Initializing module"),k.get.settings(),k.determine.searchFields(),k.bind.events(),k.set.type(),k.create.results(),k.instantiate()},instantiate:function(){k.verbose("Storing instance of module",k),ce=k,st.data(tt,k)},destroy:function(){k.verbose("Destroying instance"),st.off(Re).removeData(tt)},refresh:function(){k.debug("Refreshing selector cache"),et=st.find(ne.prompt),je=st.find(ne.searchButton),ct=st.find(ne.category),S=st.find(ne.results),si=st.find(ne.result)},refreshResults:function(){S=st.find(ne.results),si=st.find(ne.result)},bind:{events:function(){k.verbose("Binding events to search"),Q.automatic&&(st.on(k.get.inputEvent()+Re,ne.prompt,k.event.input),et.attr("autocomplete","off")),st.on("focus"+Re,ne.prompt,k.event.focus).on("blur"+Re,ne.prompt,k.event.blur).on("keydown"+Re,ne.prompt,k.handleKeyboard).on("click"+Re,ne.searchButton,k.query).on("mousedown"+Re,ne.results,k.event.result.mousedown).on("mouseup"+Re,ne.results,k.event.result.mouseup).on("click"+Re,ne.result,k.event.result.click)}},determine:{searchFields:function(){g&&g.searchFields!==_&&(Q.searchFields=g.searchFields)}},event:{input:function(){Q.searchDelay?(clearTimeout(k.timer),k.timer=setTimeout(function(){k.is.focused()&&k.query()},Q.searchDelay)):k.query()},focus:function(){k.set.focus(),Q.searchOnFocus&&k.has.minimumCharacters()&&k.query(function(){k.can.show()&&k.showResults()})},blur:function(N){var Y=b.activeElement===this,ve=function(){k.cancel.query(),k.remove.focus(),k.timer=setTimeout(k.hideResults,Q.hideDelay)};Y||(P=!1,k.resultsClicked?(k.debug("Determining if user action caused search to close"),st.one("click.close"+Re,ne.results,function(Oe){if(k.is.inMessage(Oe)||G){et.focus();return}G=!1,!k.is.animating()&&!k.is.hidden()&&ve()})):(k.debug("Input blurred without user action, closing results"),ve()))},result:{mousedown:function(){k.resultsClicked=!0},mouseup:function(){k.resultsClicked=!1},click:function(N){k.debug("Search result selected");var Y=r(this),ve=Y.find(ne.title).eq(0),Oe=Y.is("a[href]")?Y:Y.find("a[href]").eq(0),Ne=Oe.attr("href")||!1,Ve=Oe.attr("target")||!1,Ye=ve.length>0?ve.text():!1,Lt=k.get.results(),K=Y.data(At.result)||k.get.result(Ye,Lt);if(Ye&&k.set.value(Ye),r.isFunction(Q.onSelect)&&Q.onSelect.call(xt,K,Lt)===!1){k.debug("Custom onSelect callback cancelled default select action"),G=!0;return}k.hideResults(),Ne&&(N.preventDefault(),k.verbose("Opening search link found in result",Oe),Ve=="_blank"||N.ctrlKey?v.open(Ne):v.location.href=Ne)}}},ensureVisible:function(Y){var ve,Oe,Ne,Ve;ve=Y.position().top,Oe=ve+Y.outerHeight(!0),Ne=S.scrollTop(),Ve=S.height(),parseInt(S.css("paddingTop"),0)+parseInt(S.css("paddingBottom"),0),ve<0?S.scrollTop(Ne+ve):Ve<Oe&&S.scrollTop(Ne+(Oe-Ve))},handleKeyboard:function(N){var Y=st.find(ne.result),ve=st.find(ne.category),Oe=Y.filter("."+Ke.active),Ne=Y.index(Oe),Ve=Y.length,Ye=Oe.length>0,Lt=N.which,K={backspace:8,enter:13,escape:27,upArrow:38,downArrow:40},Ee;if(Lt==K.escape&&(k.verbose("Escape key pressed, blurring search field"),k.hideResults(),P=!0),k.is.visible())if(Lt==K.enter){if(k.verbose("Enter key pressed, selecting active result"),Y.filter("."+Ke.active).length>0)return k.event.result.click.call(Y.filter("."+Ke.active),N),N.preventDefault(),!1}else Lt==K.upArrow&&Ye?(k.verbose("Up key pressed, changing active result"),Ee=Ne-1<0?Ne:Ne-1,ve.removeClass(Ke.active),Y.removeClass(Ke.active).eq(Ee).addClass(Ke.active).closest(ve).addClass(Ke.active),k.ensureVisible(Y.eq(Ee)),N.preventDefault()):Lt==K.downArrow&&(k.verbose("Down key pressed, changing active result"),Ee=Ne+1>=Ve?Ne:Ne+1,ve.removeClass(Ke.active),Y.removeClass(Ke.active).eq(Ee).addClass(Ke.active).closest(ve).addClass(Ke.active),k.ensureVisible(Y.eq(Ee)),N.preventDefault());else Lt==K.enter&&(k.verbose("Enter key pressed, executing query"),k.query(),k.set.buttonPressed(),et.one("keyup",k.remove.buttonFocus))},setup:{api:function(N,Y){var ve={debug:Q.debug,on:!1,cache:Q.cache,action:"search",urlData:{query:N},onSuccess:function(Oe){k.parse.response.call(xt,Oe,N),Y()},onFailure:function(){k.displayMessage(c.serverError),Y()},onAbort:function(Oe){},onError:k.error};r.extend(!0,ve,Q.apiSettings),k.verbose("Setting up API request",ve),st.api(ve)}},can:{useAPI:function(){return r.fn.api!==_},show:function(){return k.is.focused()&&!k.is.visible()&&!k.is.empty()},transition:function(){return Q.transition&&r.fn.transition!==_&&st.transition("is supported")}},is:{animating:function(){return S.hasClass(Ke.animating)},hidden:function(){return S.hasClass(Ke.hidden)},inMessage:function(N){if(N.target){var Y=r(N.target),ve=r.contains(b.documentElement,N.target);return ve&&Y.closest(ne.message).length>0}},empty:function(){return S.html()===""},visible:function(){return S.filter(":visible").length>0},focused:function(){return et.filter(":focus").length>0}},get:{settings:function(){r.isPlainObject(g)&&g.searchFullText&&(Q.fullTextSearch=g.searchFullText,k.error(Q.error.oldSearchSyntax,xt)),Q.ignoreDiacritics&&!String.prototype.normalize&&(Q.ignoreDiacritics=!1,k.error(c.noNormalize,xt))},inputEvent:function(){var N=et[0],Y=N!==_&&N.oninput!==_?"input":N!==_&&N.onpropertychange!==_?"propertychange":"keyup";return Y},value:function(){return et.val()},results:function(){var N=st.data(At.results);return N},result:function(N,Y){var ve=!1;return N=N!==_?N:k.get.value(),Y=Y!==_?Y:k.get.results(),Q.type==="category"?(k.debug("Finding result that matches",N),r.each(Y,function(Oe,Ne){if(Array.isArray(Ne.results)&&(ve=k.search.object(N,Ne.results)[0],ve))return!1})):(k.debug("Finding result in results object",N),ve=k.search.object(N,Y)[0]),ve||!1}},select:{firstResult:function(){k.verbose("Selecting first result"),si.first().addClass(Ke.active)}},set:{focus:function(){st.addClass(Ke.focus)},loading:function(){st.addClass(Ke.loading)},value:function(N){k.verbose("Setting search input value",N),et.val(N)},type:function(N){N=N||Q.type,Q.type=="category"&&st.addClass(Q.type)},buttonPressed:function(){je.addClass(Ke.pressed)}},remove:{loading:function(){st.removeClass(Ke.loading)},focus:function(){st.removeClass(Ke.focus)},buttonPressed:function(){je.removeClass(Ke.pressed)},diacritics:function(N){return Q.ignoreDiacritics?N.normalize("NFD").replace(/[\u0300-\u036f]/g,""):N}},query:function(N){N=r.isFunction(N)?N:function(){};var Y=k.get.value(),ve=k.read.cache(Y);N=N||function(){},k.has.minimumCharacters()?(ve?(k.debug("Reading result from cache",Y),k.save.results(ve.results),k.addResults(ve.html),k.inject.id(ve.results),N()):(k.debug("Querying for",Y),r.isPlainObject(Q.source)||Array.isArray(Q.source)?(k.search.local(Y),N()):k.can.useAPI()?k.search.remote(Y,N):(k.error(c.source),N())),Q.onSearchQuery.call(xt,Y)):k.hideResults()},search:{local:function(N){var Y=k.search.object(N,Q.source),ve;k.set.loading(),k.save.results(Y),k.debug("Returned full local search results",Y),Q.maxResults>0&&(k.debug("Using specified max results",Y),Y=Y.slice(0,Q.maxResults)),Q.type=="category"&&(Y=k.create.categoryResults(Y)),ve=k.generateResults({results:Y}),k.remove.loading(),k.addResults(ve),k.inject.id(Y),k.write.cache(N,{html:ve,results:Y})},remote:function(N,Y){Y=r.isFunction(Y)?Y:function(){},st.api("is loading")&&st.api("abort"),k.setup.api(N,Y),st.api("query")},object:function(N,Y,ve){N=k.remove.diacritics(String(N));var Oe=[],Ne=[],Ve=[],Ye=N.replace(gt.escape,"\\$&"),Lt=new RegExp(gt.beginsWith+Ye,"i"),K=function(Ee,nt){var te=r.inArray(nt,Oe)==-1,ee=r.inArray(nt,Ve)==-1,oe=r.inArray(nt,Ne)==-1;te&&ee&&oe&&Ee.push(nt)};return Y=Y||Q.source,ve=ve!==_?ve:Q.searchFields,Array.isArray(ve)||(ve=[ve]),Y===_||Y===!1?(k.error(c.source),[]):(r.each(ve,function(Ee,nt){r.each(Y,function(te,ee){var oe=typeof ee[nt]=="string"||typeof ee[nt]=="number";if(oe){var Ge;typeof ee[nt]=="string"?Ge=k.remove.diacritics(ee[nt]):Ge=ee[nt].toString(),Ge.search(Lt)!==-1?K(Oe,ee):Q.fullTextSearch==="exact"&&k.exactSearch(N,Ge)?K(Ne,ee):Q.fullTextSearch==!0&&k.fuzzySearch(N,Ge)&&K(Ve,ee)}})}),r.merge(Ne,Ve),r.merge(Oe,Ne),Oe)}},exactSearch:function(N,Y){return N=N.toLowerCase(),Y=Y.toLowerCase(),Y.indexOf(N)>-1},fuzzySearch:function(N,Y){var ve=Y.length,Oe=N.length;if(typeof N!="string"||(N=N.toLowerCase(),Y=Y.toLowerCase(),Oe>ve))return!1;if(Oe===ve)return N===Y;e:for(var Ne=0,Ve=0;Ne<Oe;Ne++){for(var Ye=N.charCodeAt(Ne);Ve<ve;)if(Y.charCodeAt(Ve++)===Ye)continue e;return!1}return!0},parse:{response:function(N,Y){if(Array.isArray(N)){var ve={};ve[q.results]=N,N=ve}var Oe=k.generateResults(N);k.verbose("Parsing server response",N),N!==_&&Y!==_&&N[q.results]!==_&&(k.addResults(Oe),k.inject.id(N[q.results]),k.write.cache(Y,{html:Oe,results:N[q.results]}),k.save.results(N[q.results]))}},cancel:{query:function(){k.can.useAPI()&&st.api("abort")}},has:{minimumCharacters:function(){var N=k.get.value(),Y=N.length;return Y>=Q.minCharacters},results:function(){if(S.length===0)return!1;var N=S.html();return N!=""}},clear:{cache:function(N){var Y=st.data(At.cache);N?N&&Y&&Y[N]&&(k.debug("Removing value from cache",N),delete Y[N],st.data(At.cache,Y)):(k.debug("Clearing cache",N),st.removeData(At.cache))}},read:{cache:function(N){var Y=st.data(At.cache);return Q.cache?(k.verbose("Checking cache for generated html for query",N),typeof Y=="object"&&Y[N]!==_?Y[N]:!1):!1}},create:{categoryResults:function(N){var Y={};return r.each(N,function(ve,Oe){Oe.category&&(Y[Oe.category]===_?(k.verbose("Creating new category of results",Oe.category),Y[Oe.category]={name:Oe.category,results:[Oe]}):Y[Oe.category].results.push(Oe))}),Y},id:function(N,Y){var ve=N+1,Oe,Ne;return Y!==_?(Oe=String.fromCharCode(97+Y),Ne=Oe+ve,k.verbose("Creating category result id",Ne)):(Ne=ve,k.verbose("Creating result id",Ne)),Ne},results:function(){S.length===0&&(S=r("<div />").addClass(Ke.results).appendTo(st))}},inject:{result:function(N,Y,ve){k.verbose("Injecting result into results");var Oe=ve!==_?S.children().eq(ve).children(ne.results).first().children(ne.result).eq(Y):S.children(ne.result).eq(Y);k.verbose("Injecting results metadata",Oe),Oe.data(At.result,N)},id:function(N){k.debug("Injecting unique ids into results");var Y=0,ve=0;return Q.type==="category"?r.each(N,function(Oe,Ne){Ne.results.length>0&&(ve=0,r.each(Ne.results,function(Ve,Ye){Ye.id===_&&(Ye.id=k.create.id(ve,Y)),k.inject.result(Ye,ve,Y),ve++}),Y++)}):r.each(N,function(Oe,Ne){Ne.id===_&&(Ne.id=k.create.id(ve)),k.inject.result(Ne,ve),ve++}),N}},save:{results:function(N){k.verbose("Saving current search results to metadata",N),st.data(At.results,N)}},write:{cache:function(N,Y){var ve=st.data(At.cache)!==_?st.data(At.cache):{};Q.cache&&(k.verbose("Writing generated html to cache",N,Y),ve[N]=Y,st.data(At.cache,ve))}},addResults:function(N){if(r.isFunction(Q.onResultsAdd)&&Q.onResultsAdd.call(S,N)===!1)return k.debug("onResultsAdd callback cancelled default action"),!1;N?(S.html(N),k.refreshResults(),Q.selectFirstResult&&k.select.firstResult(),k.showResults()):k.hideResults(function(){S.empty()})},showResults:function(N){N=r.isFunction(N)?N:function(){},!P&&!k.is.visible()&&k.has.results()&&(k.can.transition()?(k.debug("Showing results with css animations"),S.transition({animation:Q.transition+" in",debug:Q.debug,verbose:Q.verbose,duration:Q.duration,onShow:function(){var Y=st.find(ne.result).eq(0);Y.length>0&&k.ensureVisible(Y)},onComplete:function(){N()},queue:!0})):(k.debug("Showing results with javascript"),S.stop().fadeIn(Q.duration,Q.easing)),Q.onResultsOpen.call(S))},hideResults:function(N){N=r.isFunction(N)?N:function(){},k.is.visible()&&(k.can.transition()?(k.debug("Hiding results with css animations"),S.transition({animation:Q.transition+" out",debug:Q.debug,verbose:Q.verbose,duration:Q.duration,onComplete:function(){N()},queue:!0})):(k.debug("Hiding results with javascript"),S.stop().fadeOut(Q.duration,Q.easing)),Q.onResultsClose.call(S))},generateResults:function(N){k.debug("Generating html from response",N);var Y=Q.templates[Q.type],ve=r.isPlainObject(N[q.results])&&!r.isEmptyObject(N[q.results]),Oe=Array.isArray(N[q.results])&&N[q.results].length>0,Ne="";return ve||Oe?(Q.maxResults>0&&(ve?Q.type=="standard"&&k.error(c.maxResults):N[q.results]=N[q.results].slice(0,Q.maxResults)),r.isFunction(Y)?Ne=Y(N,q,Q.preserveHTML):k.error(c.noTemplate,!1)):Q.showNoResults&&(Ne=k.displayMessage(c.noResults,"empty",c.noResultsHeader)),Q.onResults.call(xt,N),Ne},displayMessage:function(N,Y,ve){return Y=Y||"standard",k.debug("Displaying message",N,Y,ve),k.addResults(Q.templates.message(N,Y,ve)),Q.templates.message(N,Y,ve)},setting:function(N,Y){if(r.isPlainObject(N))r.extend(!0,Q,N);else if(Y!==_)Q[N]=Y;else return Q[N]},internal:function(N,Y){if(r.isPlainObject(N))r.extend(!0,k,N);else if(Y!==_)k[N]=Y;else return k[N]},debug:function(){!Q.silent&&Q.debug&&(Q.performance?k.performance.log(arguments):(k.debug=Function.prototype.bind.call(console.info,console,Q.name+":"),k.debug.apply(console,arguments)))},verbose:function(){!Q.silent&&Q.verbose&&Q.debug&&(Q.performance?k.performance.log(arguments):(k.verbose=Function.prototype.bind.call(console.info,console,Q.name+":"),k.verbose.apply(console,arguments)))},error:function(){Q.silent||(k.error=Function.prototype.bind.call(console.error,console,Q.name+":"),k.error.apply(console,arguments))},performance:{log:function(N){var Y,ve,Oe;Q.performance&&(Y=new Date().getTime(),Oe=J||Y,ve=Y-Oe,J=Y,Z.push({Name:N[0],Arguments:[].slice.call(N,1)||"",Element:xt,"Execution Time":ve})),clearTimeout(k.performance.timer),k.performance.timer=setTimeout(k.performance.display,500)},display:function(){var N=Q.name+":",Y=0;J=!1,clearTimeout(k.performance.timer),r.each(Z,function(ve,Oe){Y+=Oe["Execution Time"]}),N+=" "+Y+"ms",R&&(N+=" '"+R+"'"),O.length>1&&(N+=" ("+O.length+")"),(console.group!==_||console.table!==_)&&Z.length>0&&(console.groupCollapsed(N),console.table?console.table(Z):r.each(Z,function(ve,Oe){console.log(Oe.Name+": "+Oe["Execution Time"]+"ms")}),console.groupEnd()),Z=[]}},invoke:function(N,Y,ve){var Oe=ce,Ne,Ve,Ye;return Y=Y||Be,ve=xt||ve,typeof N=="string"&&Oe!==_&&(N=N.split(/[\. ]/),Ne=N.length-1,r.each(N,function(Lt,K){var Ee=Lt!=Ne?K+N[Lt+1].charAt(0).toUpperCase()+N[Lt+1].slice(1):N;if(r.isPlainObject(Oe[Ee])&&Lt!=Ne)Oe=Oe[Ee];else{if(Oe[Ee]!==_)return Ve=Oe[Ee],!1;if(r.isPlainObject(Oe[K])&&Lt!=Ne)Oe=Oe[K];else return Oe[K]!==_&&(Ve=Oe[K]),!1}})),r.isFunction(Ve)?Ye=Ve.apply(ve,Y):Ve!==_&&(Ye=Ve),Array.isArray(Ue)?Ue.push(Ye):Ue!==_?Ue=[Ue,Ye]:Ye!==_&&(Ue=Ye),Ve}},we?(ce===_&&k.initialize(),k.invoke(C)):(ce!==_&&ce.invoke("destroy"),k.initialize())}),Ue!==_?Ue:this},r.fn.search.settings={name:"Search",namespace:"search",silent:!1,debug:!1,verbose:!1,performance:!0,type:"standard",minCharacters:1,selectFirstResult:!1,apiSettings:!1,source:!1,searchOnFocus:!0,searchFields:["id","title","description"],displayField:"",fullTextSearch:"exact",ignoreDiacritics:!1,automatic:!0,hideDelay:0,searchDelay:200,maxResults:7,cache:!0,showNoResults:!0,preserveHTML:!0,transition:"scale",duration:200,easing:"easeOutExpo",onSelect:!1,onResultsAdd:!1,onSearchQuery:function(g){},onResults:function(g){},onResultsOpen:function(){},onResultsClose:function(){},className:{animating:"animating",active:"active",empty:"empty",focus:"focus",hidden:"hidden",loading:"loading",results:"results",pressed:"down"},error:{source:"Cannot search. No source used, and Semantic API module was not included",noResultsHeader:"No Results",noResults:"Your search returned no results",logging:"Error in debug logging, exiting.",noEndpoint:"No search endpoint was specified",noTemplate:"A valid template name was not specified.",oldSearchSyntax:"searchFullText setting has been renamed fullTextSearch for consistency, please adjust your settings.",serverError:"There was an issue querying the server.",maxResults:"Results must be an array to use maxResults setting",method:"The method you called is not defined.",noNormalize:'"ignoreDiacritics" setting will be ignored. Browser does not support String().normalize(). You may consider including <https://cdn.jsdelivr.net/npm/unorm@1.4.1/lib/unorm.min.js> as a polyfill.'},metadata:{cache:"cache",results:"results",result:"result"},regExp:{escape:/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,beginsWith:"(?:s|^)"},fields:{categories:"results",categoryName:"name",categoryResults:"results",description:"description",image:"image",price:"price",results:"results",title:"title",url:"url",action:"action",actionText:"text",actionURL:"url"},selector:{prompt:".prompt",searchButton:".search.button",results:".results",message:".results > .message",category:".category",result:".result",title:".title, .name"},templates:{escape:function(g,O){if(O)return g;var R=/[<>"'`]/g,J=/[&<>"'`]/,Z={"<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},C=function(we){return Z[we]};return J.test(g)?(g=g.replace(/&(?![a-z0-9#]{1,6};)/,"&amp;"),g.replace(R,C)):g},message:function(g,O,R){var J="";return g!==_&&O!==_&&(J+='<div class="message '+O+'">',R&&(J+='<div class="header">'+R+"</div>"),J+=' <div class="description">'+g+"</div>",J+="</div>"),J},category:function(g,O,R){var J="",Z=r.fn.search.settings.templates.escape;return g[O.categoryResults]!==_?(r.each(g[O.categoryResults],function(C,we){we[O.results]!==_&&we.results.length>0&&(J+='<div class="category">',we[O.categoryName]!==_&&(J+='<div class="name">'+Z(we[O.categoryName],R)+"</div>"),J+='<div class="results">',r.each(we.results,function(Be,Ue){Ue[O.url]?J+='<a class="result" href="'+Ue[O.url].replace(/"/g,"")+'">':J+='<a class="result">',Ue[O.image]!==_&&(J+='<div class="image"> <img src="'+Ue[O.image].replace(/"/g,"")+'"></div>'),J+='<div class="content">',Ue[O.price]!==_&&(J+='<div class="price">'+Z(Ue[O.price],R)+"</div>"),Ue[O.title]!==_&&(J+='<div class="title">'+Z(Ue[O.title],R)+"</div>"),Ue[O.description]!==_&&(J+='<div class="description">'+Z(Ue[O.description],R)+"</div>"),J+="</div>",J+="</a>"}),J+="</div>",J+="</div>")}),g[O.action]&&(O.actionURL===!1?J+='<div class="action">'+Z(g[O.action][O.actionText],R)+"</div>":J+='<a href="'+g[O.action][O.actionURL].replace(/"/g,"")+'" class="action">'+Z(g[O.action][O.actionText],R)+"</a>"),J):!1},standard:function(g,O,R){var J="",Z=r.fn.search.settings.templates.escape;return g[O.results]!==_?(r.each(g[O.results],function(C,we){we[O.url]?J+='<a class="result" href="'+we[O.url].replace(/"/g,"")+'">':J+='<a class="result">',we[O.image]!==_&&(J+='<div class="image"> <img src="'+we[O.image].replace(/"/g,"")+'"></div>'),J+='<div class="content">',we[O.price]!==_&&(J+='<div class="price">'+Z(we[O.price],R)+"</div>"),we[O.title]!==_&&(J+='<div class="title">'+Z(we[O.title],R)+"</div>"),we[O.description]!==_&&(J+='<div class="description">'+Z(we[O.description],R)+"</div>"),J+="</div>",J+="</a>"}),g[O.action]&&(O.actionURL===!1?J+='<div class="action">'+Z(g[O.action][O.actionText],R)+"</div>":J+='<a href="'+g[O.action][O.actionURL].replace(/"/g,"")+'" class="action">'+Z(g[O.action][O.actionText],R)+"</a>"),J):!1}}}})(jQuery,window,document)}(),function(){"use strict";var Ml,Dl,Ol,ao,kn,dd,el,Va,Wa,fd,za,zc,Kc,Xc,ql,pa,Xr,Ka,Xa,zs,hd,nm,md,$l,is,bs,lo,Dn,Gn,Do,ga,Oo,Gr,va,Pl,ba,sm,qo,Gc,pd,rm;__webpack_require__.p=`${window.config?.assetUrlPrefix??"/assets"}/`;function r(e){const t=["/assets/js/monaco."];for(const i of t)if(e.stack?.includes(i))return!0;return!1}function v(e,t="error"){const i=document.querySelector(".page-content")??document.body,n=e.replace(/\W/g,"").trim();let s=i.querySelector(`.js-global-error[data-global-error-msg-compact="${n}"]`);if(!s){const u=document.createElement("div");u.innerHTML=`<div class="ui container js-global-error tw-my-[--page-spacing]"><div class="ui ${t} message tw-text-center tw-whitespace-pre-line"></div></div>`,s=u.childNodes[0]}const l=Number(s.getAttribute("data-global-error-msg-count"))+1;s.setAttribute("data-global-error-msg-compact",n),s.setAttribute("data-global-error-msg-count",l.toString()),s.querySelector(".ui.message").textContent=e+(l>1?` (${l})`:""),i.prepend(s)}function b({error:e,reason:t,message:i,type:n,filename:s,lineno:l,colno:u}){const m=e??t,y=String(new URL(__webpack_require__.p,window.location.origin)),{runModeIsProd:A}=window.config??{};if(!m&&(i&&console.error(new Error(i)),A)||m instanceof Error&&(!m.stack?.includes(y)&&A||r(m)))return;let L=m?.message??i;l&&(L+=` (${s} @ ${l}:${u})`);const z=L.endsWith(".")?"":".";v(`JavaScript ${n==="unhandledrejection"?"promise rejection":n}: ${L}${z} Open browser console to see more details.`)}function _(){if(window._globalHandlerErrors?._inited){v("The global error handler has been initialized, do not initialize it again");return}window.config||v("Gitea JavaScript code couldn't run correctly, please check your custom templates");for(const e of window._globalHandlerErrors||[])b(e);window._globalHandlerErrors={_inited:!0,push:e=>b(e)}}_();const g=e=>e.replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/'/g,"&#39;").replace(/</g,"&lt;").replace(/>/g,"&gt;"),O=e=>e.replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/&#0?39;/g,"'").replace(/&quot;/g,'"').replace(/&amp;/g,"&");function R(e,...t){if(typeof e=="string")return g(e);let i=e[0];for(const[n,s]of t.entries())i=i+g(String(s))+e[n+1];return i}function J(e,...t){if(typeof e=="string")return O(e);let i=e[0];for(const[n,s]of t.entries())i=i+O(String(s))+e[n+1];return i}var Z=__webpack_require__("./web_src/js/svg.ts"),C=__webpack_require__("./web_src/js/utils/dom.ts"),we=__webpack_require__("./node_modules/toastify-js/src/toastify.js"),Be=__webpack_require__.n(we);const Ue={info:{icon:"octicon-check",background:"var(--color-green)",duration:2500},warning:{icon:"gitea-exclamation",background:"var(--color-orange)",duration:-1},error:{icon:"gitea-exclamation",background:"var(--color-red)",duration:-1}};function Q(e,t,{gravity:i,position:n,duration:s,useHtmlBody:l,preventDuplicates:u=!0,...m}={}){const y=l?String(e):R(e),A=`${t}-${y}`;if(u){const pe=document.querySelector(`.toastify[data-toast-unique-key="${CSS.escape(A)}"]`);if(pe){const de=pe.querySelector(".toast-duplicate-number");(0,C.fi)(de),de.textContent=String(Number(de.textContent)+1),(0,C.b7)(de,"pulse-1p5-200");return}}const{icon:L,background:z,duration:X}=Ue[t??"info"],_e=Be()({text:`
DesignScreenshot/output/git.buildapp.eu.org_run/git.buildapp.eu.org_1_initial_page.html:222:`,"Plugins: https://atomiks.github.io/tippyjs/v6/plugins/"].join(" "))})}var vu=function(){return"innerHTML"};function dc(e,t){e[vu()]=t}function fc(e){var t=Eo();return e===!0?t.className=fl:(t.className=nc,Oa(e)?t.appendChild(e):dc(t,e)),t}function yl(e,t){Oa(t.content)?(dc(e,""),e.appendChild(t.content)):typeof t.content!="function"&&(t.allowHTML?dc(e,t.content):e.textContent=t.content)}function sa(e){var t=e.firstElementChild,i=jo(t.children);return{box:t,content:i.find(function(n){return n.classList.contains(zr)}),arrow:i.find(function(n){return n.classList.contains(fl)||n.classList.contains(nc)}),backdrop:i.find(function(n){return n.classList.contains(dl)})}}function bu(e){var t=Eo(),i=Eo();i.className=ic,i.setAttribute("data-state","hidden"),i.setAttribute("tabindex","-1");var n=Eo();n.className=zr,n.setAttribute("data-state","hidden"),yl(n,e.props),t.appendChild(i),i.appendChild(n),s(e.props,e.props);function s(l,u){var m=sa(t),y=m.box,A=m.content,L=m.arrow;u.theme?y.setAttribute("data-theme",u.theme):y.removeAttribute("data-theme"),typeof u.animation=="string"?y.setAttribute("data-animation",u.animation):y.removeAttribute("data-animation"),u.inertia?y.setAttribute("data-inertia",""):y.removeAttribute("data-inertia"),y.style.maxWidth=typeof u.maxWidth=="number"?u.maxWidth+"px":u.maxWidth,u.role?y.setAttribute("role",u.role):y.removeAttribute("role"),(l.content!==u.content||l.allowHTML!==u.allowHTML)&&yl(A,e.props),u.arrow?L?l.arrow!==u.arrow&&(y.removeChild(L),y.appendChild(fc(u.arrow))):y.appendChild(fc(u.arrow)):L&&y.removeChild(L)}return{popper:t,onUpdate:s}}bu.$$tippy=!0;var Ed=1,wl=[],Sl=[];function Ad(e,t){var i=_l(e,Object.assign({},Kn,Co(Da(t)))),n,s,l,u=!1,m=!1,y=!1,A=!1,L,z,X,_e=[],pe=hl(Pc,i.interactiveDebounce),de,Pe=Ed++,Le=null,Te=uu(i.plugins),He={isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},U={id:Pe,reference:e,popper:Eo(),popperInstance:Le,props:i,state:He,plugins:Te,clearDelayTimeouts:Bc,setProps:$c,setContent:Uc,show:T5,hide:L5,hideWithInteractivity:R5,enable:Bl,disable:Hc,unmount:M5,destroy:D5};if(!i.render)return U;var Se=i.render(U),ze=Se.popper,mt=Se.onUpdate;ze.setAttribute("data-tippy-root",""),ze.id="tippy-"+U.id,U.popper=ze,e._tippy=U,ze._tippy=U;var kt=Te.map(function(ut){return ut.fn(U)}),Kt=e.hasAttribute("aria-expanded");return Ya(),ss(),_s(),ns("onCreate",[U]),i.showOnCreate&&Hl(),ze.addEventListener("mouseenter",function(){U.props.interactive&&U.state.isVisible&&U.clearDelayTimeouts()}),ze.addEventListener("mouseleave",function(){U.props.interactive&&U.props.trigger.indexOf("mouseenter")>=0&&Hi().addEventListener("mousemove",pe)}),U;function gi(){var ut=U.props.touch;return Array.isArray(ut)?ut:[ut,0]}function li(){return gi()[0]==="hold"}function It(){var ut;return!!((ut=U.props.render)!=null&&ut.$$tippy)}function Si(){return de||e}function Hi(){var ut=Si().parentNode;return ut?oc(ut):document}function Qn(){return sa(ze)}function Un(ut){return U.state.isMounted&&!U.state.isVisible||Bs.isTouch||L&&L.type==="focus"?0:ta(U.props.delay,ut?0:1,Kn.delay)}function _s(ut){ut===void 0&&(ut=!1),ze.style.pointerEvents=U.props.interactive&&!ut?"":"none",ze.style.zIndex=""+U.props.zIndex}function ns(ut,ni,xi){if(xi===void 0&&(xi=!0),kt.forEach(function(Zi){Zi[ut]&&Zi[ut].apply(Zi,ni)}),xi){var vn;(vn=U.props)[ut].apply(vn,ni)}}function di(){var ut=U.props.aria;if(ut.content){var ni="aria-"+ut.content,xi=ze.id,vn=en(U.props.triggerTarget||e);vn.forEach(function(Zi){var Xs=Zi.getAttribute(ni);if(U.state.isVisible)Zi.setAttribute(ni,Xs?Xs+" "+xi:xi);else{var Lr=Xs&&Xs.replace(xi,"").trim();Lr?Zi.setAttribute(ni,Lr):Zi.removeAttribute(ni)}})}}function ss(){if(!(Kt||!U.props.aria.expanded)){var ut=en(U.props.triggerTarget||e);ut.forEach(function(ni){U.props.interactive?ni.setAttribute("aria-expanded",U.state.isVisible&&ni===Si()?"true":"false"):ni.removeAttribute("aria-expanded")})}}function Tr(){Hi().removeEventListener("mousemove",pe),wl=wl.filter(function(ut){return ut!==pe})}function Qs(ut){if(!(Bs.isTouch&&(y||ut.type==="mousedown"))){var ni=ut.composedPath&&ut.composedPath()[0]||ut.target;if(!(U.props.interactive&&Ir(ze,ni))){if(en(U.props.triggerTarget||e).some(function(xi){return Ir(xi,ni)})){if(Bs.isTouch||U.state.isVisible&&U.props.trigger.indexOf("click")>=0)return}else ns("onClickOutside",[U,ut]);U.props.hideOnClick===!0&&(U.clearDelayTimeouts(),U.hide(),m=!0,setTimeout(function(){m=!1}),U.state.isMounted||uo())}}}function Nr(){y=!0}function co(){y=!1}function Hr(){var ut=Hi();ut.addEventListener("mousedown",Qs,!0),ut.addEventListener("touchend",Qs,dr),ut.addEventListener("touchstart",co,dr),ut.addEventListener("touchmove",Nr,dr)}function uo(){var ut=Hi();ut.removeEventListener("mousedown",Qs,!0),ut.removeEventListener("touchend",Qs,dr),ut.removeEventListener("touchstart",co,dr),ut.removeEventListener("touchmove",Nr,dr)}function Ga(ut,ni){Qa(ut,function(){!U.state.isVisible&&ze.parentNode&&ze.parentNode.contains(ze)&&ni()})}function fo(ut,ni){Qa(ut,ni)}function Qa(ut,ni){var xi=Qn().box;function vn(Zi){Zi.target===xi&&(Pn(xi,"remove",vn),ni())}if(ut===0)return ni();Pn(xi,"remove",z),Pn(xi,"add",vn),z=vn}function Po(ut,ni,xi){xi===void 0&&(xi=!1);var vn=en(U.props.triggerTarget||e);vn.forEach(function(Zi){Zi.addEventListener(ut,ni,xi),_e.push({node:Zi,eventType:ut,handler:ni,options:xi})})}function Ya(){li()&&(Po("touchstart",Fl,{passive:!0}),Po("touchend",Fc,{passive:!0})),ml(U.props.trigger).forEach(function(ut){if(ut!=="manual")switch(Po(ut,Fl),ut){case"mouseenter":Po("mouseleave",Fc);break;case"focus":Po(Ao?"focusout":"blur",Il);break;case"focusin":Po("focusout",Il);break}})}function qc(){_e.forEach(function(ut){var ni=ut.node,xi=ut.eventType,vn=ut.handler,Zi=ut.options;ni.removeEventListener(xi,vn,Zi)}),_e=[]}function Fl(ut){var ni,xi=!1;if(!(!U.state.isEnabled||Nl(ut)||m)){var vn=((ni=L)==null?void 0:ni.type)==="focus";L=ut,de=ut.currentTarget,ss(),!U.state.isVisible&&jr(ut)&&wl.forEach(function(Zi){return Zi(ut)}),ut.type==="click"&&(U.props.trigger.indexOf("mouseenter")<0||u)&&U.props.hideOnClick!==!1&&U.state.isVisible?xi=!0:Hl(ut),ut.type==="click"&&(u=!xi),xi&&!vn&&_a(ut)}}function Pc(ut){var ni=ut.target,xi=Si().contains(ni)||ze.contains(ni);if(!(ut.type==="mousemove"&&xi)){var vn=Fo().concat(ze).map(function(Zi){var Xs,Lr=Zi._tippy,Ja=(Xs=Lr.popperInstance)==null?void 0:Xs.state;return Ja?{popperRect:Zi.getBoundingClientRect(),popperState:Ja,props:i}:null}).filter(Boolean);ac(vn,ut)&&(Tr(),_a(ut))}}function Fc(ut){var ni=Nl(ut)||U.props.trigger.indexOf("click")>=0&&u;if(!ni){if(U.props.interactive){U.hideWithInteractivity(ut);return}_a(ut)}}function Il(ut){U.props.trigger.indexOf("focusin")<0&&ut.target!==Si()||U.props.interactive&&ut.relatedTarget&&ze.contains(ut.relatedTarget)||_a(ut)}function Nl(ut){return Bs.isTouch?li()!==ut.type.indexOf("touch")>=0:!1}function Ic(){Nc();var ut=U.props,ni=ut.popperOptions,xi=ut.placement,vn=ut.offset,Zi=ut.getReferenceClientRect,Xs=ut.moveTransition,Lr=It()?sa(ze).arrow:null,Ja=Zi?{getBoundingClientRect:Zi,contextElement:Zi.contextElement||Si()}:e,tm={name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(Vc){var Za=Vc.state;if(It()){var O5=Qn(),cd=O5.box;["placement","reference-hidden","escaped"].forEach(function(Wc){Wc==="placement"?cd.setAttribute("data-placement",Za.placement):Za.attributes.popper["data-popper-"+Wc]?cd.setAttribute("data-"+Wc,""):cd.removeAttribute("data-"+Wc)}),Za.attributes.popper={}}}},ya=[{name:"offset",options:{offset:vn}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!Xs}},tm];It()&&Lr&&ya.push({name:"arrow",options:{element:Lr,padding:3}}),ya.push.apply(ya,ni?.modifiers||[]),U.popperInstance=ms(Ja,ze,Object.assign({},ni,{placement:xi,onFirstUpdate:X,modifiers:ya}))}function Nc(){U.popperInstance&&(U.popperInstance.destroy(),U.popperInstance=null)}function ho(){var ut=U.props.appendTo,ni,xi=Si();U.props.interactive&&ut===Fr||ut==="parent"?ni=xi.parentNode:ni=cu(ut,[xi]),ni.contains(ze)||ni.appendChild(ze),U.state.isMounted=!0,Ic()}function Fo(){return jo(ze.querySelectorAll("[data-tippy-root]"))}function Hl(ut){U.clearDelayTimeouts(),ut&&ns("onTrigger",[U,ut]),Hr();var ni=Un(!0),xi=gi(),vn=xi[0],Zi=xi[1];Bs.isTouch&&vn==="hold"&&Zi&&(ni=Zi),ni?n=setTimeout(function(){U.show()},ni):U.show()}function _a(ut){if(U.clearDelayTimeouts(),ns("onUntrigger",[U,ut]),!U.state.isVisible){uo();return}if(!(U.props.trigger.indexOf("mouseenter")>=0&&U.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(ut.type)>=0&&u)){var ni=Un(!1);ni?s=setTimeout(function(){U.state.isVisible&&U.hide()},ni):l=requestAnimationFrame(function(){U.hide()})}}function Bl(){U.state.isEnabled=!0}function Hc(){U.hide(),U.state.isEnabled=!1}function Bc(){clearTimeout(n),clearTimeout(s),cancelAnimationFrame(l)}function $c(ut){if(!U.state.isDestroyed){ns("onBeforeUpdate",[U,ut]),qc();var ni=U.props,xi=_l(e,Object.assign({},ni,Da(ut),{ignoreAttributes:!0}));U.props=xi,Ya(),ni.interactiveDebounce!==xi.interactiveDebounce&&(Tr(),pe=hl(Pc,xi.interactiveDebounce)),ni.triggerTarget&&!xi.triggerTarget?en(ni.triggerTarget).forEach(function(vn){vn.removeAttribute("aria-expanded")}):xi.triggerTarget&&e.removeAttribute("aria-expanded"),ss(),_s(),mt&&mt(ni,xi),U.popperInstance&&(Ic(),Fo().forEach(function(vn){requestAnimationFrame(vn._tippy.popperInstance.forceUpdate)})),ns("onAfterUpdate",[U,ut])}}function Uc(ut){U.setProps({content:ut})}function T5(){var ut=U.state.isVisible,ni=U.state.isDestroyed,xi=!U.state.isEnabled,vn=Bs.isTouch&&!U.props.touch,Zi=ta(U.props.duration,0,Kn.duration);if(!(ut||ni||xi||vn)&&!Si().hasAttribute("disabled")&&(ns("onShow",[U],!1),U.props.onShow(U)!==!1)){if(U.state.isVisible=!0,It()&&(ze.style.visibility="visible"),_s(),Hr(),U.state.isMounted||(ze.style.transition="none"),It()){var Xs=Qn(),Lr=Xs.box,Ja=Xs.content;ps([Lr,Ja],0)}X=function(){var ya;if(!(!U.state.isVisible||A)){if(A=!0,ze.offsetHeight,ze.style.transition=U.props.moveTransition,It()&&U.props.animation){var ld=Qn(),Vc=ld.box,Za=ld.content;ps([Vc,Za],Zi),ia([Vc,Za],"visible")}di(),ss(),pl(Sl,U),(ya=U.popperInstance)==null||ya.forceUpdate(),ns("onMount",[U]),U.props.animation&&It()&&fo(Zi,function(){U.state.isShown=!0,ns("onShown",[U])})}},ho()}}function L5(){var ut=!U.state.isVisible,ni=U.state.isDestroyed,xi=!U.state.isEnabled,vn=ta(U.props.duration,1,Kn.duration);if(!(ut||ni||xi)&&(ns("onHide",[U],!1),U.props.onHide(U)!==!1)){if(U.state.isVisible=!1,U.state.isShown=!1,A=!1,u=!1,It()&&(ze.style.visibility="hidden"),Tr(),uo(),_s(!0),It()){var Zi=Qn(),Xs=Zi.box,Lr=Zi.content;U.props.animation&&(ps([Xs,Lr],vn),ia([Xs,Lr],"hidden"))}di(),ss(),U.props.animation?It()&&Ga(vn,U.unmount):U.unmount()}}function R5(ut){Hi().addEventListener("mousemove",pe),pl(wl,pe),pe(ut)}function M5(){U.state.isVisible&&U.hide(),U.state.isMounted&&(Nc(),Fo().forEach(function(ut){ut._tippy.unmount()}),ze.parentNode&&ze.parentNode.removeChild(ze),Sl=Sl.filter(function(ut){return ut!==U}),U.state.isMounted=!1,ns("onHidden",[U]))}function D5(){U.state.isDestroyed||(U.clearDelayTimeouts(),U.unmount(),qc(),delete e._tippy,U.state.isDestroyed=!0,ns("onDestroy",[U]))}}function oo(e,t){t===void 0&&(t={});var i=Kn.plugins.concat(t.plugins||[]);Sd();var n=Object.assign({},t,{plugins:i}),s=rc(e);if(0)var l,u;var m=s.reduce(function(y,A){var L=A&&Ad(A,n);return L&&y.push(L),y},[]);return Oa(e)?m[0]:m}oo.defaultProps=Kn,oo.setDefaultProps=pu,oo.currentInput=Bs;var am=function(t){var i=t===void 0?{}:t,n=i.exclude,s=i.duration;Sl.forEach(function(l){var u=!1;if(n&&(u=qa(n)?l.reference===n:l.popper===n.popper),!u){var m=l.props.duration;l.setProps({duration:s}),l.hide(),l.state.isDestroyed||l.setProps({duration:m})}})},Cd=Object.assign({},Xl,{effect:function(t){var i=t.state,n={popper:{position:i.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(i.elements.popper.style,n.popper),i.styles=n,i.elements.arrow&&Object.assign(i.elements.arrow.style,n.arrow)}}),kd=function(t,i){var n;i===void 0&&(i={});var s=t,l=[],u=[],m,y=i.overrides,A=[],L=!1;function z(){u=s.map(function(U){return en(U.props.triggerTarget||U.reference)}).reduce(function(U,Se){return U.concat(Se)},[])}function X(){l=s.map(function(U){return U.reference})}function _e(U){s.forEach(function(Se){U?Se.enable():Se.disable()})}function pe(U){return s.map(function(Se){var ze=Se.setProps;return Se.setProps=function(mt){ze(mt),Se.reference===m&&U.setProps(mt)},function(){Se.setProps=ze}})}function de(U,Se){var ze=u.indexOf(Se);if(Se!==m){m=Se;var mt=(y||[]).concat("content").reduce(function(kt,Kt){return kt[Kt]=s[ze].props[Kt],kt},{});U.setProps(Object.assign({},mt,{getReferenceClientRect:typeof mt.getReferenceClientRect=="function"?mt.getReferenceClientRect:function(){var kt;return(kt=l[ze])==null?void 0:kt.getBoundingClientRect()}}))}}_e(!1),X(),z();var Pe={fn:function(){return{onDestroy:function(){_e(!0)},onHidden:function(){m=null},onClickOutside:function(ze){ze.props.showOnCreate&&!L&&(L=!0,m=null)},onShow:function(ze){ze.props.showOnCreate&&!L&&(L=!0,de(ze,l[0]))},onTrigger:function(ze,mt){de(ze,mt.currentTarget)}}}},Le=oo(Eo(),Object.assign({},xo(i,["overrides"]),{plugins:[Pe].concat(i.plugins||[]),triggerTarget:u,popperOptions:Object.assign({},i.popperOptions,{modifiers:[].concat(((n=i.popperOptions)==null?void 0:n.modifiers)||[],[Cd])})})),Te=Le.show;Le.show=function(U){if(Te(),!m&&U==null)return de(Le,l[0]);if(!(m&&U==null)){if(typeof U=="number")return l[U]&&de(Le,l[U]);if(s.indexOf(U)>=0){var Se=U.reference;return de(Le,Se)}if(l.indexOf(U)>=0)return de(Le,U)}},Le.showNext=function(){var U=l[0];if(!m)return Le.show(0);var Se=l.indexOf(m);Le.show(l[Se+1]||U)},Le.showPrevious=function(){var U=l[l.length-1];if(!m)return Le.show(U);var Se=l.indexOf(m),ze=l[Se-1]||U;Le.show(ze)};var He=Le.setProps;return Le.setProps=function(U){y=U.overrides||y,He(U)},Le.setInstances=function(U){_e(!0),A.forEach(function(Se){return Se()}),s=U,_e(!1),X(),z(),A=pe(Le),Le.setProps({triggerTarget:u})},A=pe(Le),Le},a={mouseover:"mouseenter",focusin:"focus",click:"click"};function f(e,t){var i=[],n=[],s=!1,l=t.target,u=xo(t,["target"]),m=Object.assign({},u,{trigger:"manual",touch:!1}),y=Object.assign({touch:Kn.touch},u,{showOnCreate:!0}),A=oo(e,m),L=en(A);function z(Pe){if(!(!Pe.target||s)){var Le=Pe.target.closest(l);if(Le){var Te=Le.getAttribute("data-tippy-trigger")||t.trigger||Kn.trigger;if(!Le._tippy&&!(Pe.type==="touchstart"&&typeof y.touch=="boolean")&&!(Pe.type!=="touchstart"&&Te.indexOf(a[Pe.type])<0)){var He=oo(Le,y);He&&(n=n.concat(He))}}}}function X(Pe,Le,Te,He){He===void 0&&(He=!1),Pe.addEventListener(Le,Te,He),i.push({node:Pe,eventType:Le,handler:Te,options:He})}function _e(Pe){var Le=Pe.reference;X(Le,"touchstart",z,dr),X(Le,"mouseover",z),X(Le,"focusin",z),X(Le,"click",z)}function pe(){i.forEach(function(Pe){var Le=Pe.node,Te=Pe.eventType,He=Pe.handler,U=Pe.options;Le.removeEventListener(Te,He,U)}),i=[]}function de(Pe){var Le=Pe.destroy,Te=Pe.enable,He=Pe.disable;Pe.destroy=function(U){U===void 0&&(U=!0),U&&n.forEach(function(Se){Se.destroy()}),n=[],pe(),Le()},Pe.enable=function(){Te(),n.forEach(function(U){return U.enable()}),s=!1},Pe.disable=function(){He(),n.forEach(function(U){return U.disable()}),s=!0},_e(Pe)}return L.forEach(de),A}var x={name:"animateFill",defaultValue:!1,fn:function(t){var i;if(!((i=t.props.render)!=null&&i.$$tippy))return{};var n=sa(t.popper),s=n.box,l=n.content,u=t.props.animateFill?T():null;return{onCreate:function(){u&&(s.insertBefore(u,s.firstElementChild),s.setAttribute("data-animatefill",""),s.style.overflow="hidden",t.setProps({arrow:!1,animation:"shift-away"}))},onMount:function(){if(u){var y=s.style.transitionDuration,A=Number(y.replace("ms",""));l.style.transitionDelay=Math.round(A/10)+"ms",u.style.transitionDuration=y,ia([u],"visible")}},onShow:function(){u&&(u.style.transitionDuration="0ms")},onHide:function(){u&&ia([u],"hidden")}}}};function T(){var e=Eo();return e.className=dl,ia([e],"hidden"),e}var I={clientX:0,clientY:0},F=[];function ie(e){var t=e.clientX,i=e.clientY;I={clientX:t,clientY:i}}function ae(e){e.addEventListener("mousemove",ie)}function ye(e){e.removeEventListener("mousemove",ie)}var $e={name:"followCursor",defaultValue:!1,fn:function(t){var i=t.reference,n=oc(t.props.triggerTarget||i),s=!1,l=!1,u=!0,m=t.props;function y(){return t.props.followCursor==="initial"&&t.state.isVisible}function A(){n.addEventListener("mousemove",X)}function L(){n.removeEventListener("mousemove",X)}function z(){s=!0,t.setProps({getReferenceClientRect:null}),s=!1}function X(de){var Pe=de.target?i.contains(de.target):!0,Le=t.props.followCursor,Te=de.clientX,He=de.clientY,U=i.getBoundingClientRect(),Se=Te-U.left,ze=He-U.top;(Pe||!t.props.interactive)&&t.setProps({getReferenceClientRect:function(){var kt=i.getBoundingClientRect(),Kt=Te,gi=He;Le==="initial"&&(Kt=kt.left+Se,gi=kt.top+ze);var li=Le==="horizontal"?kt.top:gi,It=Le==="vertical"?kt.right:Kt,Si=Le==="horizontal"?kt.bottom:gi,Hi=Le==="vertical"?kt.left:Kt;return{width:It-Hi,height:Si-li,top:li,right:It,bottom:Si,left:Hi}}})}function _e(){t.props.followCursor&&(F.push({instance:t,doc:n}),ae(n))}function pe(){F=F.filter(function(de){return de.instance!==t}),F.filter(function(de){return de.doc===n}).length===0&&ye(n)}return{onCreate:_e,onDestroy:pe,onBeforeUpdate:function(){m=t.props},onAfterUpdate:function(Pe,Le){var Te=Le.followCursor;s||Te!==void 0&&m.followCursor!==Te&&(pe(),Te?(_e(),t.state.isMounted&&!l&&!y()&&A()):(L(),z()))},onMount:function(){t.props.followCursor&&!l&&(u&&(X(I),u=!1),y()||A())},onTrigger:function(Pe,Le){jr(Le)&&(I={clientX:Le.clientX,clientY:Le.clientY}),l=Le.type==="focus"},onHidden:function(){t.props.followCursor&&(z(),L(),u=!0)}}}};function Fe(e,t){var i;return{popperOptions:Object.assign({},e.popperOptions,{modifiers:[].concat((((i=e.popperOptions)==null?void 0:i.modifiers)||[]).filter(function(n){var s=n.name;return s!==t.name}),[t])})}}var be={name:"inlinePositioning",defaultValue:!1,fn:function(t){var i=t.reference;function n(){return!!t.props.inlinePositioning}var s,l=-1,u=!1,m=[],y={name:"tippyInlinePositioning",enabled:!0,phase:"afterWrite",fn:function(_e){var pe=_e.state;n()&&(m.indexOf(pe.placement)!==-1&&(m=[]),s!==pe.placement&&m.indexOf(pe.placement)===-1&&(m.push(pe.placement),t.setProps({getReferenceClientRect:function(){return A(pe.placement)}})),s=pe.placement)}};function A(X){return it(hr(X),i.getBoundingClientRect(),jo(i.getClientRects()),l)}function L(X){u=!0,t.setProps(X),u=!1}function z(){u||L(Fe(t.props,y))}return{onCreate:z,onAfterUpdate:z,onTrigger:function(_e,pe){if(jr(pe)){var de=jo(t.reference.getClientRects()),Pe=de.find(function(Te){return Te.left-2<=pe.clientX&&Te.right+2>=pe.clientX&&Te.top-2<=pe.clientY&&Te.bottom+2>=pe.clientY}),Le=de.indexOf(Pe);l=Le>-1?Le:l}},onHidden:function(){l=-1}}}};function it(e,t,i,n){if(i.length<2||e===null)return t;if(i.length===2&&n>=0&&i[0].left>i[1].right)return i[n]||t;switch(e){case"top":case"bottom":{var s=i[0],l=i[i.length-1],u=e==="top",m=s.top,y=l.bottom,A=u?s.left:l.left,L=u?s.right:l.right,z=L-A,X=y-m;return{top:m,bottom:y,left:A,right:L,width:z,height:X}}case"left":case"right":{var _e=Math.min.apply(Math,i.map(function(ze){return ze.left})),pe=Math.max.apply(Math,i.map(function(ze){return ze.right})),de=i.filter(function(ze){return e==="left"?ze.left===_e:ze.right===pe}),Pe=de[0].top,Le=de[de.length-1].bottom,Te=_e,He=pe,U=He-Te,Se=Le-Pe;return{top:Pe,bottom:Le,left:Te,right:He,width:U,height:Se}}default:return t}}var dt={name:"sticky",defaultValue:!1,fn:function(t){var i=t.reference,n=t.popper;function s(){return t.popperInstance?t.popperInstance.state.elements.reference:i}function l(A){return t.props.sticky===!0||t.props.sticky===A}var u=null,m=null;function y(){var A=l("reference")?s().getBoundingClientRect():null,L=l("popper")?n.getBoundingClientRect():null;(A&&Ct(u,A)||L&&Ct(m,L))&&t.popperInstance&&t.popperInstance.update(),u=A,m=L,t.state.isMounted&&requestAnimationFrame(y)}return{onMount:function(){t.props.sticky&&y()}}}};function Ct(e,t){return e&&t?e.top!==t.top||e.right!==t.right||e.bottom!==t.bottom||e.left!==t.left:!0}oo.setDefaultProps({render:bu});var Et=oo,Li=__webpack_require__("./web_src/js/utils/time.ts");const hi=new Set,Ut='<svg width="16" height="7"><path d="m0 7 8-7 8 7Z" class="tippy-svg-arrow-outer"/><path d="m0 8 8-7 8 7Z" class="tippy-svg-arrow-inner"/></svg>';function Ie(e,t={}){const{onHide:i,onShow:n,onDestroy:s,role:l,theme:u,arrow:m,...y}=t,A=Et(e,{appendTo:document.body,animation:!1,allowHTML:!1,hideOnClick:!1,interactiveBorder:20,ignoreAttributes:!0,maxWidth:500,onHide:L=>(hi.delete(L),i?.(L)),onDestroy:L=>(hi.delete(L),s?.(L)),onShow:L=>{for(const z of hi)z.props.role==="tooltip"&&z.hide();return hi.add(L),e.setAttribute("aria-controls",L.popper.id),n?.(L)},arrow:m??(u==="bare"?!1:Ut),role:l||"menu",theme:u||l||"default",offset:[0,m?10:6],plugins:[$e],...y});return A.props.role==="menu"&&e.setAttribute("aria-haspopup","true"),A}function ft(e,t=null){if(vt(e),t=t??e.getAttribute("data-tooltip-content"),!t)return null;const n=!e.hasAttribute("data-clipboard-target"),s={content:t,delay:100,role:"tooltip",theme:"tooltip",hideOnClick:n,placement:e.getAttribute("data-tooltip-placement")||"top-start",followCursor:e.getAttribute("data-tooltip-follow-cursor")||!1,...e.getAttribute("data-tooltip-interactive")==="true"?{interactive:!0,aria:{content:"describedby",expanded:!1}}:{}};return e._tippy?e._tippy.setProps(s):Ie(e,s),e._tippy}function vt(e){let t=e.getAttribute("title");if(t){if(e.tagName.toLowerCase()==="relative-time"){const i=e.getAttribute("datetime");i&&(t=(0,Li.Rt)(new Date(i)))}e.setAttribute("data-tooltip-content",t),e.setAttribute("aria-label",t),e.setAttribute("title","")}}function Pt(e){e.target.removeEventListener("mouseover",Pt,!0),ft(this)}function ei(e){if(e.addEventListener("mouseover",Pt,{capture:!0}),!e.hasAttribute("aria-label")){const t=e.getAttribute("data-tooltip-content");t&&e.setAttribute("aria-label",t)}}function ci(e){for(const t of e.querySelectorAll("[data-tooltip-content]"))ei(t)}function Ot(){const e=i=>i.observe(document,{subtree:!0,childList:!0,attributeFilter:["data-tooltip-content","title"]}),t=new MutationObserver((i,n)=>{const s=n.takeRecords();n.disconnect();for(const l of[...i,...s])if(l.type==="childList")for(const u of l.addedNodes)(0,C.NF)(u)&&(ci(u),u.hasAttribute("data-tooltip-content")&&ei(u));else l.type==="attributes"&&ft(l.target);e(n)});e(t),ci(document.documentElement)}function Dt(e,t){let i;const n=e.closest("[data-tippy-root]")?.id;n?(e=document.body,i=document.querySelector(`[aria-controls="${CSS.escape(n)}"]`)?.getBoundingClientRect(),i=i??new DOMRect(0,0,0,0)):(e=e.closest(".ui.dropdown")??e,i=e.getBoundingClientRect());const s=e._tippy??ft(e,t);s.setContent(t),s.setProps({getReferenceClientRect:()=>i}),s.state.isShown||s.show(),s.setProps({onHidden:l=>{ft(e)||l.destroy()}})}var St=__webpack_require__("./web_src/js/utils.ts");async function Ii(e,{reject:t=!1}={}){var i;try{if(Array.isArray(e)){if(!((i=navigator?.clipboard)!=null&&i.write))for(const n of e)typeof n=="string"&&Ni(n);return await navigator.clipboard.write([new ClipboardItem(Object.fromEntries(e.map(n=>[n?.type??"text/plain",n])))]),!0}else{if(e instanceof Blob)return await navigator.clipboard.write([new ClipboardItem({[e.type]:e})]),!0;try{return await navigator.clipboard.writeText(String(e)),!0}catch{return Ni(e)}}}catch(n){if(t)throw n;return!1}}function Ni(e){if(!document.execCommand)return!1;const t=document.createElement("textarea");t.value=String(e),t.style.clipPath="inset(50%)",t.ariaHidden="true",document.body.append(t);try{return t.select(),document.execCommand("copy")}finally{t.remove()}}const{copy_success:un,copy_error:Sn}=window.config.i18n;function ui(){document.addEventListener("click",async e=>{const t=e.target.closest("[data-clipboard-text], [data-clipboard-target]");if(!t)return;e.preventDefault();let i=t.getAttribute("data-clipboard-text");if(i||(i=document.querySelector(t.getAttribute("data-clipboard-target"))?.value),i&&t.getAttribute("data-clipboard-text-type")==="url"&&(i=(0,St.oK)(i)),i){const n=await Ii(i);Dt(t,n?un:Sn)}})}function qi(e){return e.pull_request?e.state==="open"?e.pull_request.draft?"octicon-git-pull-request-draft":"octicon-git-pull-request":e.pull_request.merged?"octicon-git-merge":"octicon-git-pull-request-closed":e.state==="open"?"octicon-issue-opened":"octicon-issue-closed"}function oi(e){return e.pull_request?e.state==="open"?e.pull_request.draft?"grey":"green":e.pull_request.merged?"purple":"red":e.state==="open"?"green":"red"}const Xn={key:0,class:"tw-h-12 tw-w-12 is-loading"},ra={key:1,class:"tw-flex tw-flex-col tw-gap-2"},oa={class:"tw-text-12"},ko={class:"flex-text-block"},Kr={class:"issue-title tw-font-semibold tw-break-anywhere"},hc={class:"index"},_u={key:0},yu=["innerHTML"],aa={key:2,class:"tw-flex tw-flex-col tw-gap-2"},Ia={class:"tw-text-12"};var xl=(0,c.pM)({__name:"ContextPopup",setup(e){const{appSubUrl:t,i18n:i}=window.config,n=(0,Re.KR)(!1),s=(0,Re.KR)(null),l=(0,Re.KR)(""),u=i.error_occurred,m=(0,Re.KR)(null),y=(0,c.EW)(()=>new Date(s.value.created_at).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"})),A=(0,c.EW)(()=>{const X=s.value.body.replace(/\n+/g," ");return X.length>85?`${X.substring(0,85)}\u2026`:X}),L=(0,Re.KR)(null);(0,c.sV)(()=>{L.value.addEventListener("ce-load-context-popup",X=>{!n.value&&s.value===null&&z(X.detail)})});async function z(X){n.value=!0,m.value=null;try{const _e=await(0,Ae.fG)(`${t}/${X.ownerName}/${X.repoName}/issues/${X.indexString}/info`),pe=await _e.json();if(!_e.ok){m.value=pe.message??i.network_error;return}s.value=pe.convertedIssue,l.value=pe.renderedLabels}catch{m.value=i.network_error}finally{n.value=!1}}return(X,_e)=>((0,c.uX)(),(0,c.CE)("div",{ref_key:"root",ref:L},[n.value?((0,c.uX)(),(0,c.CE)("div",Xn)):(0,c.Q3)("v-if",!0),!n.value&&s.value!==null?((0,c.uX)(),(0,c.CE)("div",ra,[(0,c.Lk)("div",oa,(0,W.v_)(s.value.repository.full_name)+" on "+(0,W.v_)(y.value),1),(0,c.Lk)("div",ko,[(0,c.bF)((0,Re.R1)(Z.Ah),{name:(0,Re.R1)(qi)(s.value),class:(0,W.C4)(["text",(0,Re.R1)(oi)(s.value)])},null,8,["name","class"]),(0,c.Lk)("span",Kr,[(0,c.eW)((0,W.v_)(s.value.title)+" ",1),(0,c.Lk)("span",hc,"#"+(0,W.v_)(s.value.number),1)])]),A.value?((0,c.uX)(),(0,c.CE)("div",_u,(0,W.v_)(A.value),1)):(0,c.Q3)("v-if",!0),(0,c.Q3)(" eslint-disable-next-line vue/no-v-html "),s.value.labels.length?((0,c.uX)(),(0,c.CE)("div",{key:1,innerHTML:l.value},null,8,yu)):(0,c.Q3)("v-if",!0)])):(0,c.Q3)("v-if",!0),!n.value&&s.value===null?((0,c.uX)(),(0,c.CE)("div",aa,[(0,c.Lk)("div",Ia,(0,W.v_)((0,Re.R1)(u)),1),(0,c.Lk)("div",null,(0,W.v_)(m.value),1)])):(0,c.Q3)("v-if",!0)],512))}}),To=xl;function jl(){const e=document.querySelectorAll(".ref-issue");la(e)}function la(e){for(const t of e){if(t.classList.contains("ref-external-issue"))continue;const i=(0,St.S3)(t.getAttribute("href"));if(!i.ownerName)continue;const n=document.createElement("div");n.classList.add("tw-p-3"),t.parentNode.insertBefore(n,t.nextSibling);const s=Ai(To);try{s.mount(n)}catch(l){console.error(l),n.textContent="ContextPopup failed to load"}Ie(t,{theme:"default",content:n,placement:"top-start",interactive:!0,role:"dialog",interactiveBorder:5,onShow:()=>{n.firstChild.dispatchEvent(new CustomEvent("ce-load-context-popup",{detail:i}))}})}}function he(){const e=document.querySelector("#git-graph-container");if(!e)return;document.querySelector("#flow-color-monochrome")?.addEventListener("click",()=>{document.querySelector("#flow-color-monochrome").classList.add("active"),document.querySelector("#flow-color-colored")?.classList.remove("active"),e.classList.remove("colored"),e.classList.add("monochrome");const m=new URLSearchParams(window.location.search);m.set("mode","monochrome");const y=m.toString();y?window.history.replaceState({},"",`?${y}`):window.history.replaceState({},"",window.location.pathname);for(const A of document.querySelectorAll(".pagination a")){const L=A.getAttribute("href");if(!L)continue;const z=new URL(L,window.location.href),X=z.searchParams;X.set("mode","monochrome"),z.search=`?${X.toString()}`,A.setAttribute("href",z.href)}}),document.querySelector("#flow-color-colored")?.addEventListener("click",()=>{document.querySelector("#flow-color-colored").classList.add("active"),document.querySelector("#flow-color-monochrome")?.classList.remove("active"),e.classList.add("colored"),e.classList.remove("monochrome");for(const A of document.querySelectorAll(".pagination a")){const L=A.getAttribute("href");if(!L)continue;const z=new URL(L,window.location.href),X=z.searchParams;X.delete("mode"),z.search=`?${X.toString()}`,A.setAttribute("href",z.href)}const m=new URLSearchParams(window.location.search);m.delete("mode");const y=m.toString();y?window.history.replaceState({},"",`?${y}`):window.history.replaceState({},"",window.location.pathname)});const t=new URL(window.location.href),i=t.searchParams,n=()=>{const m=i.toString(),y=new URL(t);y.searchParams.set("div-only","true"),window.history.replaceState({},"",m?`?${m}`:window.location.pathname),document.querySelector("#pagination").innerHTML="",(0,C.y9)("#rel-container"),(0,C.y9)("#rev-container"),(0,C.fi)("#loading-indicator"),(async()=>{const L=await(await(0,Ae.fG)(String(y))).text(),z=document.createElement("div");z.innerHTML=L,document.querySelector("#pagination").innerHTML=z.querySelector("#pagination").innerHTML,document.querySelector("#rel-container").innerHTML=z.querySelector("#rel-container").innerHTML,document.querySelector("#rev-container").innerHTML=z.querySelector("#rev-container").innerHTML,(0,C.y9)("#loading-indicator"),(0,C.fi)("#rel-container"),(0,C.fi)("#rev-container")})()},s=i.getAll("branch");i.has("hide-pr-refs")&&i.get("hide-pr-refs")==="true"&&s.splice(0,0,"...flow-hide-pr-refs");const l=document.querySelector("#flow-select-refs-dropdown"),u=(0,ke.mD)(l);u.dropdown({clearable:!0}),u.dropdown("set selected",s),u.dropdown({onRemove(m){if(m==="...flow-hide-pr-refs")i.delete("hide-pr-refs");else{const y=i.getAll("branch");i.delete("branch");for(const A of y)A!==m&&i.append("branch",A)}n()},onAdd(m){m==="...flow-hide-pr-refs"?i.set("hide-pr-refs","true"):i.append("branch",m),n()}}),e.addEventListener("mouseenter",m=>{if(m.target.matches("#rev-list li")){const y=m.target.getAttribute("data-flow");if(y==="0")return;document.querySelector(`#flow-${y}`)?.classList.add("highlight"),m.target.classList.add("hover");for(const A of document.querySelectorAll(`#rev-list li[data-flow='${y}']`))A.classList.add("highlight")}else if(m.target.matches("#rel-container .flow-group")){m.target.classList.add("highlight");const y=m.target.getAttribute("data-flow");for(const A of document.querySelectorAll(`#rev-list li[data-flow='${y}']`))A.classList.add("highlight")}else if(m.target.matches("#rel-container .flow-commit")){const y=m.target.getAttribute("data-rev");document.querySelector(`#rev-list li#commit-${y}`)?.classList.add("hover")}}),e.addEventListener("mouseleave",m=>{if(m.target.matches("#rev-list li")){const y=m.target.getAttribute("data-flow");if(y==="0")return;document.querySelector(`#flow-${y}`)?.classList.remove("highlight"),m.target.classList.remove("hover");for(const A of document.querySelectorAll(`#rev-list li[data-flow='${y}']`))A.classList.remove("highlight")}else if(m.target.matches("#rel-container .flow-group")){m.target.classList.remove("highlight");const y=m.target.getAttribute("data-flow");for(const A of document.querySelectorAll(`#rev-list li[data-flow='${y}']`))A.classList.remove("highlight")}else if(m.target.matches("#rel-container .flow-commit")){const y=m.target.getAttribute("data-rev");document.querySelector(`#rev-list li#commit-${y}`)?.classList.remove("hover")}})}var Ce=Object.defineProperty,ot=(e,t,i)=>t in e?Ce(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i,wt=(e,t,i)=>(ot(e,typeof t!="symbol"?t+"":t,i),i);const _t=class{constructor(e,t,i){wt(this,"startDate"),wt(this,"endDate"),wt(this,"max"),wt(this,"_values"),wt(this,"_firstFullWeekOfMonths"),wt(this,"_activities"),wt(this,"_calendar"),this.endDate=this.parseDate(e),this.max=i||Math.ceil(Math.max(...t.map(n=>n.count))/5*4),this.startDate=this.shiftDate(e,-_t.DAYS_IN_ONE_YEAR),this._values=t}set values(e){this.max=Math.ceil(Math.max(...e.map(t=>t.count))/5*4),this._values=e,this._firstFullWeekOfMonths=void 0,this._calendar=void 0,this._activities=void 0}get values(){return this._values}get activities(){if(!this._activities){this._activities=new Map;for(let e=0,t=this.values.length;e<t;e++)this._activities.set(this.keyDayParser(this.values[e].date),{count:this.values[e].count,colorIndex:this.getColorIndex(this.values[e].count)})}return this._activities}get weekCount(){return this.getDaysCount()/_t.DAYS_IN_WEEK}get calendar(){if(!this._calendar){let e=this.shiftDate(this.startDate,-this.getCountEmptyDaysAtStart());e=new Date(e.getFullYear(),e.getMonth(),e.getDate()),this._calendar=new Array(this.weekCount);for(let t=0,i=this._calendar.length;t<i;t++){this._calendar[t]=new Array(_t.DAYS_IN_WEEK);for(let n=0;n<_t.DAYS_IN_WEEK;n++){const s=this.activities.get(this.keyDayParser(e));this._calendar[t][n]={date:new Date(e.valueOf()),count:s?s.count:void 0,colorIndex:s?s.colorIndex:0},e.setDate(e.getDate()+1)}}}return this._calendar}get firstFullWeekOfMonths(){if(!this._firstFullWeekOfMonths){const e=this.calendar;this._firstFullWeekOfMonths=[];for(let t=1,i=e.length;t<i;t++){const n=e[t-1][0].date,s=e[t][0].date;(n.getFullYear()<s.getFullYear()||n.getMonth()<s.getMonth())&&this._firstFullWeekOfMonths.push({value:s.getMonth(),index:t})}}return this._firstFullWeekOfMonths}getColorIndex(e){return e==null?0:e<=0?1:e>=this.max?5:Math.ceil(e*100/this.max*.03)+1}getCountEmptyDaysAtStart(){return this.startDate.getDay()}getCountEmptyDaysAtEnd(){return _t.DAYS_IN_WEEK-1-this.endDate.getDay()}getDaysCount(){return _t.DAYS_IN_ONE_YEAR+1+this.getCountEmptyDaysAtStart()+this.getCountEmptyDaysAtEnd()}shiftDate(e,t){const i=new Date(e);return i.setDate(i.getDate()+t),i}parseDate(e){return e instanceof Date?e:new Date(e)}keyDayParser(e){const t=this.parseDate(e);return String(t.getFullYear())+String(t.getMonth()).padStart(2,"0")+String(t.getDate()).padStart(2,"0")}};let lt=_t;wt(lt,"DEFAULT_RANGE_COLOR_LIGHT",["#ebedf0","#dae2ef","#c0ddf9","#73b3f3","#3886e1","#17459e"]),wt(lt,"DEFAULT_RANGE_COLOR_DARK",["#1f1f22","#1e334a","#1d466c","#1d5689","#1d69ac","#1B95D1"]),wt(lt,"DEFAULT_LOCALE",{months:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],days:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],on:"on",less:"Less",more:"More"}),wt(lt,"DEFAULT_TOOLTIP_UNIT","contributions"),wt(lt,"DAYS_IN_ONE_YEAR",365),wt(lt,"DAYS_IN_WEEK",7),wt(lt,"SQUARE_SIZE",10);const Wt=(0,c.pM)({name:"CalendarHeatmap",props:{endDate:{required:!0},max:{type:Number},rangeColor:{type:Array},values:{type:Array,required:!0},locale:{type:Object},tooltip:{type:Boolean,default:!0},tooltipUnit:{type:String,default:lt.DEFAULT_TOOLTIP_UNIT},tooltipFormatter:{type:Function},tippyProps:{type:Object,default:null},vertical:{type:Boolean,default:!1},noDataText:{type:[Boolean,String],default:null},round:{type:Number,default:0},darkMode:Boolean},emits:["dayClick"],setup(e){const t=lt.SQUARE_SIZE/5,i=lt.SQUARE_SIZE+t,n=Math.ceil(lt.SQUARE_SIZE*2.5),s=i*3,l=lt.SQUARE_SIZE+lt.SQUARE_SIZE/2,u=lt.SQUARE_SIZE+lt.SQUARE_SIZE/2,m=`translate(${n}, ${l})`,y=(0,Re.KR)(null),A=(0,Re.KR)(new Date),L=(0,Re.KR)(new lt(e.endDate,e.values,e.max)),z=(0,Re.KR)(0),X=(0,Re.KR)(0),_e=(0,Re.KR)("0 0 0 0"),pe=(0,Re.KR)("0 0 0 0"),de=(0,Re.KR)(""),Pe=(0,Re.KR)(""),Le=(0,Re.KR)(""),Te=(0,Re.KR)({}),He=(0,Re.KR)(e.rangeColor||(e.darkMode?lt.DEFAULT_RANGE_COLOR_DARK:lt.DEFAULT_RANGE_COLOR_LIGHT)),{values:U,tooltipUnit:Se,tooltipFormatter:ze,noDataText:mt,max:kt,vertical:Kt,locale:gi}=(0,Re.QW)(e),li=new Map;let It;function Si(){li.clear(),It?It.setInstances(Array.from(li.values())):It=kd(Array.from(li.values()),{overrides:[],moveTransition:"transform 0.1s ease-out",allowHTML:!0,...e.tippyProps})}function Hi(di){if(e.tooltip){if(di.count!==void 0)return e.tooltipFormatter?e.tooltipFormatter(di,e.tooltipUnit):`<b>${di.count} ${e.tooltipUnit}</b> ${Te.value.on} ${Te.value.months[di.date.getMonth()]} ${di.date.getDate()}, ${di.date.getFullYear()}`;if(e.noDataText)return`${e.noDataText}`;if(e.noDataText!==!1)return`<b>No ${e.tooltipUnit}</b> ${Te.value.on} ${Te.value.months[di.date.getMonth()]} ${di.date.getDate()}, ${di.date.getFullYear()}`}}function Qn(di){return e.vertical?`translate(0, ${i*L.value.weekCount-(di+1)*i})`:`translate(${di*i}, 0)`}function Un(di){return e.vertical?`translate(${di*i}, 0)`:`translate(0, ${di*i})`}function _s(di){return e.vertical?{x:3,y:i*L.value.weekCount-i*di.index-i/4}:{x:i*di.index,y:i-t}}(0,c.wB)([(0,Re.lW)(e,"rangeColor"),(0,Re.lW)(e,"darkMode")],([di,ss])=>{He.value=di||(ss?lt.DEFAULT_RANGE_COLOR_DARK:lt.DEFAULT_RANGE_COLOR_LIGHT)}),(0,c.wB)(Kt,di=>{di?(z.value=n+i*lt.DAYS_IN_WEEK+s,X.value=l+i*L.value.weekCount+t,de.value=`translate(${n}, 0)`,Pe.value=`translate(0, ${l})`):(z.value=n+i*L.value.weekCount+t,X.value=l+i*lt.DAYS_IN_WEEK,de.value=`translate(0, ${l})`,Pe.value=`translate(${n}, 0)`)},{immediate:!0}),(0,c.wB)([z,X],([di,ss])=>_e.value=` 0 0 ${di} ${ss}`,{immediate:!0}),(0,c.wB)([z,X,He],([di,ss,Tr])=>{Le.value=Kt.value?`translate(${n+i*lt.DAYS_IN_WEEK}, ${l})`:`translate(${di-i*Tr.length-30}, ${ss-u})`},{immediate:!0}),(0,c.wB)(gi,di=>Te.value=di?{...lt.DEFAULT_LOCALE,...di}:lt.DEFAULT_LOCALE,{immediate:!0}),(0,c.wB)(He,di=>pe.value=`0 0 ${lt.SQUARE_SIZE*(di.length+1)} ${lt.SQUARE_SIZE}`,{immediate:!0}),(0,c.wB)([U,Se,ze,mt,kt,He],()=>{L.value=new lt(e.endDate,e.values,e.max),li.forEach(di=>di.destroy()),(0,c.dY)(Si)}),(0,c.sV)(Si),(0,c.xo)(()=>{It?.destroy(),li.forEach(di=>di.destroy())});function ns(di){if(It&&di.target&&di.target.classList.contains("vch__day__square")&&di.target.dataset.weekIndex!==void 0&&di.target.dataset.dayIndex!==void 0){const ss=Number(di.target.dataset.weekIndex),Tr=Number(di.target.dataset.dayIndex);if(!isNaN(ss)&&!isNaN(Tr)){const Qs=Hi(L.value.calendar[ss][Tr]);if(Qs){const Nr=li.get(di.target);Nr?Nr.setContent(Qs):Nr||(li.set(di.target,Et(di.target,{content:Qs})),It.setInstances(Array.from(li.values())))}}}}return{SQUARE_BORDER_SIZE:t,SQUARE_SIZE:i,LEFT_SECTION_WIDTH:n,RIGHT_SECTION_WIDTH:s,TOP_SECTION_HEIGHT:l,BOTTOM_SECTION_HEIGHT:u,svg:y,heatmap:L,now:A,width:z,height:X,viewbox:_e,daysLabelWrapperTransform:de,monthsLabelWrapperTransform:Pe,yearWrapperTransform:m,legendWrapperTransform:Le,lo:Te,legendViewbox:pe,curRangeColor:He,getWeekPosition:Qn,getDayPosition:Un,getMonthLabelPosition:_s,initTippyLazy:ns}}}),Ht=(e,t)=>{const i=e.__vccOpts||e;for(const[n,s]of t)i[n]=s;return i},Nt=["viewBox"],Mt=["transform"],bi=["x","y"],Xt=["transform"],ai=["x","y"],wi=["x","y"],zi=["x","y"],yn=["transform"],rn=["x"],$s=["rx","ry","width","height","x","y"],gs=["x","y"],mr=["transform"],Us=["transform"],ca=["rx","ry","transform","width","height","data-week-index","data-day-index","onClick"],mc={class:"vch__legend"},Vs={class:"vch__legend-left"},Er={class:"vch__legend-right"},pc={class:"vch__legend"},lm=["viewBox","height"],cm={class:"vch__legend__wrapper"},um=["rx","ry","width","height","x"];function dm(e,t,i,n,s,l){return(0,c.uX)(),(0,c.CE)("div",{class:(0,W.C4)({vch__container:!0,"dark-mode":e.darkMode})},[((0,c.uX)(),(0,c.CE)("svg",{class:"vch__wrapper",ref:"svg",viewBox:e.viewbox},[(0,c.Lk)("g",{class:"vch__months__labels__wrapper",transform:e.monthsLabelWrapperTransform},[((0,c.uX)(!0),(0,c.CE)(c.FK,null,(0,c.pI)(e.heatmap.firstFullWeekOfMonths,(u,m)=>((0,c.uX)(),(0,c.CE)("text",{class:"vch__month__label",key:m,x:e.getMonthLabelPosition(u).x,y:e.getMonthLabelPosition(u).y},(0,W.v_)(e.lo.months[u.value]),9,bi))),128))],8,Mt),(0,c.Lk)("g",{class:"vch__days__labels__wrapper",transform:e.daysLabelWrapperTransform},[(0,c.Lk)("text",{class:"vch__day__label",x:e.vertical?e.SQUARE_SIZE:0,y:e.vertical?e.SQUARE_SIZE-e.SQUARE_BORDER_SIZE:20},(0,W.v_)(e.lo.days[1]),9,ai),(0,c.Lk)("text",{class:"vch__day__label",x:e.vertical?e.SQUARE_SIZE*3:0,y:e.vertical?e.SQUARE_SIZE-e.SQUARE_BORDER_SIZE:44},(0,W.v_)(e.lo.days[3]),9,wi),(0,c.Lk)("text",{class:"vch__day__label",x:e.vertical?e.SQUARE_SIZE*5:0,y:e.vertical?e.SQUARE_SIZE-e.SQUARE_BORDER_SIZE:69},(0,W.v_)(e.lo.days[5]),9,zi)],8,Xt),e.vertical?((0,c.uX)(),(0,c.CE)("g",{key:0,class:"vch__legend__wrapper",transform:e.legendWrapperTransform},[(0,c.Lk)("text",{x:e.SQUARE_SIZE*1.25,y:"8"},(0,W.v_)(e.lo.less),9,rn),((0,c.uX)(!0),(0,c.CE)(c.FK,null,(0,c.pI)(e.curRangeColor,(u,m)=>((0,c.uX)(),(0,c.CE)("rect",{key:m,rx:e.round,ry:e.round,style:(0,W.Tr)({fill:u}),width:e.SQUARE_SIZE-e.SQUARE_BORDER_SIZE,height:e.SQUARE_SIZE-e.SQUARE_BORDER_SIZE,x:e.SQUARE_SIZE*1.75,y:e.SQUARE_SIZE*(m+1)},null,12,$s))),128)),(0,c.Lk)("text",{x:e.SQUARE_SIZE*1.25,y:e.SQUARE_SIZE*(e.curRangeColor.length+2)-e.SQUARE_BORDER_SIZE},(0,W.v_)(e.lo.more),9,gs)],8,yn)):(0,c.Q3)("",!0),(0,c.Lk)("g",{class:"vch__year__wrapper",transform:e.yearWrapperTransform,onMouseover:t[0]||(t[0]=(...u)=>e.initTippyLazy&&e.initTippyLazy(...u))},[((0,c.uX)(!0),(0,c.CE)(c.FK,null,(0,c.pI)(e.heatmap.calendar,(u,m)=>((0,c.uX)(),(0,c.CE)("g",{class:"vch__month__wrapper",key:m,transform:e.getWeekPosition(m)},[((0,c.uX)(!0),(0,c.CE)(c.FK,null,(0,c.pI)(u,(y,A)=>((0,c.uX)(),(0,c.CE)(c.FK,{key:A},[y.date<e.now?((0,c.uX)(),(0,c.CE)("rect",{key:0,class:"vch__day__square",rx:e.round,ry:e.round,transform:e.getDayPosition(A),width:e.SQUARE_SIZE-e.SQUARE_BORDER_SIZE,height:e.SQUARE_SIZE-e.SQUARE_BORDER_SIZE,style:(0,W.Tr)({fill:e.curRangeColor[y.colorIndex]}),"data-week-index":m,"data-day-index":A,onClick:L=>e.$emit("dayClick",y)},null,12,ca)):(0,c.Q3)("",!0)],64))),128))],8,Us))),128))],40,mr)],8,Nt)),(0,c.Lk)("div",mc,[(0,c.RG)(e.$slots,"legend",{},()=>[(0,c.Lk)("div",Vs,[(0,c.RG)(e.$slots,"vch__legend-left")]),(0,c.Lk)("div",Er,[(0,c.RG)(e.$slots,"legend-right",{},()=>[(0,c.Lk)("div",pc,[(0,c.Lk)("div",null,(0,W.v_)(e.lo.less),1),e.vertical?(0,c.Q3)("",!0):((0,c.uX)(),(0,c.CE)("svg",{key:0,class:"vch__external-legend-wrapper",viewBox:e.legendViewbox,height:e.SQUARE_SIZE-e.SQUARE_BORDER_SIZE},[(0,c.Lk)("g",cm,[((0,c.uX)(!0),(0,c.CE)(c.FK,null,(0,c.pI)(e.curRangeColor,(u,m)=>((0,c.uX)(),(0,c.CE)("rect",{key:m,rx:e.round,ry:e.round,style:(0,W.Tr)({fill:u}),width:e.SQUARE_SIZE-e.SQUARE_BORDER_SIZE,height:e.SQUARE_SIZE-e.SQUARE_BORDER_SIZE,x:e.SQUARE_SIZE*m},null,12,um))),128))])],8,lm)),(0,c.Lk)("div",null,(0,W.v_)(e.lo.more),1)])])])])])],2)}const Su=Ht(Wt,[["render",dm]]);function fm(e){e.component(Su.name,Su)}const F5={install:fm},hm={class:"total-contributions"};var mm=(0,c.pM)({__name:"ActivityHeatmap",props:{values:{},locale:{}},setup(e){const t=["var(--color-secondary-alpha-60)","var(--color-secondary-alpha-60)","var(--color-primary-light-4)","var(--color-primary-light-2)","var(--color-primary)","var(--color-primary-dark-2)","var(--color-primary-dark-4)"],i=(0,Re.KR)(new Date);(0,c.sV)(()=>{const s=document.querySelector(".vch__external-legend-wrapper");s.setAttribute("viewBox","12 0 80 10"),s.style.marginRight="-12px"});function n(s){const l=new URLSearchParams(document.location.search),u=l.get("date"),m=new Date(s.date.getTime()-s.date.getTimezoneOffset()*6e4).toISOString().substring(0,10);u&&u===m?l.delete("date"):l.set("date",m),l.delete("page");const y=l.toString();window.location.search=y.length?`?${y}`:""}return(s,l)=>((0,c.uX)(),(0,c.CE)(c.FK,null,[(0,c.Lk)("div",hm,(0,W.v_)(s.locale.textTotalContributions),1),(0,c.bF)((0,Re.R1)(Su),{locale:s.locale.heatMapLocale,"no-data-text":s.locale.noDataText,"tooltip-unit":s.locale.tooltipUnit,"end-date":i.value,values:s.values,"range-color":t,onDayClick:l[0]||(l[0]=u=>n(u)),"tippy-props":{theme:"tooltip"}},null,8,["locale","no-data-text","tooltip-unit","end-date","values"])],64))}}),pm=mm;function gm(){const e=document.querySelector("#user-heatmap");if(e)try{const t={};for(const{contributions:l,timestamp:u}of JSON.parse(e.getAttribute("data-heatmap-data"))){const m=new Date(u*1e3).toDateString();t[m]=(t[m]||0)+l}const i=Object.keys(t).map(l=>({date:new Date(l),count:t[l]})),n={heatMapLocale:{months:new Array(12).fill(void 0).map((l,u)=>(0,St.z5)(u)),days:new Array(7).fill(void 0).map((l,u)=>(0,St.FS)(u)),on:" - ",more:e.getAttribute("data-locale-more"),less:e.getAttribute("data-locale-less")},tooltipUnit:"contributions",textTotalContributions:e.getAttribute("data-locale-total-contributions"),noDataText:e.getAttribute("data-locale-no-contributions")};Ai(pm,{values:i,locale:n}).mount(e),e.classList.remove("is-loading")}catch(t){console.error("Heatmap failed to load",t),e.textContent="Heatmap failed to load"}}var vm=Object.defineProperty,bm=(e,t,i)=>t in e?vm(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i,Td=(e,t,i)=>bm(e,typeof t!="symbol"?t+"":t,i);function _m(e,t){const l=(0,St.a8)(e,"image/svg+xml").documentElement,u=l?.width?.baseVal,m=l?.height?.baseVal;if(u===void 0||m===void 0)return null;if(u.unitType===SVGLength.SVG_LENGTHTYPE_PERCENTAGE||m.unitType===SVGLength.SVG_LENGTHTYPE_PERCENTAGE){const y=new Image;if(y.src=t,y.width>1&&y.width<99999&&y.height>1&&y.height<99999)return{width:y.width,height:y.height};if(l.hasAttribute("viewBox")){const A=l.viewBox.baseVal;return{width:300,height:300*A.width/A.height}}return{width:300,height:300}}return null}function xu(e,t){const i={width:e?.width||0,height:e?.height||0},n={width:t?.width||0,height:t?.height||0},s={width:Math.max(n.width,i.width),height:Math.max(n.height,i.height)};return{imageAfter:e,imageBefore:t,sizeAfter:i,sizeBefore:n,maxSize:s,ratio:[Math.floor(s.width-i.width)/2,Math.floor(s.height-i.height)/2,Math.floor(s.width-n.width)/2,Math.floor(s.height-n.height)/2]}}class ym{constructor(){Td(this,"containerEl"),Td(this,"diffContainerWidth")}async init(t){this.containerEl=t,t.setAttribute("data-image-diff-loaded","true"),(0,ke.mD)(t).find(".ui.menu.tabular .item").tab(),this.diffContainerWidth=Math.max(t.closest(".diff-file-box").clientWidth-300,100);const i=[{path:t.getAttribute("data-path-after"),mime:t.getAttribute("data-mime-after"),images:t.querySelectorAll("img.image-after"),boundsInfo:t.querySelector(".bounds-info-after")},{path:t.getAttribute("data-path-before"),mime:t.getAttribute("data-mime-before"),images:t.querySelectorAll("img.image-before"),boundsInfo:t.querySelector(".bounds-info-before")}];await Promise.all(i.map(async l=>{const[u]=await Promise.all(Array.from(l.images,m=>(0,C.QW)(m,l.path)));if(!u&&l.boundsInfo&&(l.boundsInfo.textContent="(image error)"),l.mime==="image/svg+xml"){const y=await(await(0,Ae.fG)(l.path)).text(),A=_m(y,l.path);if(A){for(const L of l.images)L.setAttribute("width",String(A.width)),L.setAttribute("height",String(A.height));(0,C.y9)(l.boundsInfo)}}}));const n=i[0].images,s=i[1].images;this.initSideBySide(xu(n[0],s[0])),n.length>0&&s.length>0&&(this.initSwipe(xu(n[1],s[1])),this.initOverlay(xu(n[2],s[2]))),(0,C.xP)(t,".image-diff-tabs",l=>l.classList.remove("is-loading"))}initSideBySide(t){let i=1;t.maxSize.width>(this.diffContainerWidth-24)/2&&(i=(this.diffContainerWidth-24)/2/t.maxSize.width);const n=t.imageAfter&&t.imageBefore&&t.imageAfter.naturalWidth!==t.imageBefore.naturalWidth,s=t.imageAfter&&t.imageBefore&&t.imageAfter.naturalHeight!==t.imageBefore.naturalHeight;if(t.imageAfter){const l=this.containerEl.querySelector(".bounds-info-after .bounds-info-width");l&&(l.textContent=`${t.imageAfter.naturalWidth}px`,l.classList.toggle("green",n));const u=this.containerEl.querySelector(".bounds-info-after .bounds-info-height");u&&(u.textContent=`${t.imageAfter.naturalHeight}px`,u.classList.toggle("green",s))}if(t.imageBefore){const l=this.containerEl.querySelector(".bounds-info-before .bounds-info-width");l&&(l.textContent=`${t.imageBefore.naturalWidth}px`,l.classList.toggle("red",n));const u=this.containerEl.querySelector(".bounds-info-before .bounds-info-height");u&&(u.textContent=`${t.imageBefore.naturalHeight}px`,u.classList.toggle("red",s))}if(t.imageAfter){const l=t.imageAfter.parentNode;t.imageAfter.style.width=`${t.sizeAfter.width*i}px`,t.imageAfter.style.height=`${t.sizeAfter.height*i}px`,l.style.margin="10px auto",l.style.width=`${t.sizeAfter.width*i+2}px`,l.style.height=`${t.sizeAfter.height*i+2}px`}if(t.imageBefore){const l=t.imageBefore.parentNode;t.imageBefore.style.width=`${t.sizeBefore.width*i}px`,t.imageBefore.style.height=`${t.sizeBefore.height*i}px`,l.style.margin="10px auto",l.style.width=`${t.sizeBefore.width*i+2}px`,l.style.height=`${t.sizeBefore.height*i+2}px`}}initSwipe(t){let i=1;if(t.maxSize.width>this.diffContainerWidth-12&&(i=(this.diffContainerWidth-12)/t.maxSize.width),t.imageAfter){const s=t.imageAfter.parentNode,l=s.parentNode;t.imageAfter.style.width=`${t.sizeAfter.width*i}px`,t.imageAfter.style.height=`${t.sizeAfter.height*i}px`,s.style.margin=`0px ${t.ratio[0]*i}px`,s.style.width=`${t.sizeAfter.width*i+2}px`,s.style.height=`${t.sizeAfter.height*i+2}px`,l.style.padding=`${t.ratio[1]*i}px 0 0 0`,l.style.width=`${t.maxSize.width*i+2}px`}if(t.imageBefore){const s=t.imageBefore.parentNode,l=s.parentNode;t.imageBefore.style.width=`${t.sizeBefore.width*i}px`,t.imageBefore.style.height=`${t.sizeBefore.height*i}px`,s.style.margin=`${t.ratio[3]*i}px ${t.ratio[2]*i}px`,s.style.width=`${t.sizeBefore.width*i+2}px`,s.style.height=`${t.sizeBefore.height*i+2}px`,l.style.width=`${t.maxSize.width*i+2}px`,l.style.height=`${t.maxSize.height*i+2}px`}const n=this.containerEl.querySelector(".diff-swipe");n&&(n.style.width=`${t.maxSize.width*i+2}px`,n.style.height=`${t.maxSize.height*i+30}px`),this.containerEl.querySelector(".swipe-bar").addEventListener("mousedown",s=>{s.preventDefault(),this.initSwipeEventListeners(s.currentTarget)})}initSwipeEventListeners(t){const i=t.parentNode,n=i.clientWidth,s=u=>{u.preventDefault();const m=i.getBoundingClientRect(),y=Math.max(0,Math.min(u.clientX-m.left,n));t.style.left=`${y}px`,this.containerEl.querySelector(".swipe-container").style.width=`${i.clientWidth-y}px`},l=()=>{document.removeEventListener("mousemove",s),document.removeEventListener("mouseup",l)};document.addEventListener("mousemove",s),document.addEventListener("mouseup",l)}initOverlay(t){let i=1;if(t.maxSize.width>this.diffContainerWidth-12&&(i=(this.diffContainerWidth-12)/t.maxSize.width),t.imageAfter){const l=t.imageAfter.parentNode;t.imageAfter.style.width=`${t.sizeAfter.width*i}px`,t.imageAfter.style.height=`${t.sizeAfter.height*i}px`,l.style.margin=`${t.ratio[1]*i}px ${t.ratio[0]*i}px`,l.style.width=`${t.sizeAfter.width*i+2}px`,l.style.height=`${t.sizeAfter.height*i+2}px`}if(t.imageBefore){const l=t.imageBefore.parentNode,u=l.parentNode;t.imageBefore.style.width=`${t.sizeBefore.width*i}px`,t.imageBefore.style.height=`${t.sizeBefore.height*i}px`,l.style.margin=`${t.ratio[3]*i}px ${t.ratio[2]*i}px`,l.style.width=`${t.sizeBefore.width*i+2}px`,l.style.height=`${t.sizeBefore.height*i+2}px`,u.style.width=`${t.maxSize.width*i+2}px`,u.style.height=`${t.maxSize.height*i+2}px`}const n=this.containerEl.querySelector('input[type="range"]');function s(){t.imageAfter&&(t.imageAfter.parentNode.style.opacity=`${Number(n.value)/100}`)}n?.addEventListener("input",s),s()}}function Ld(){for(const e of(0,C.jB)(document,".image-diff:not([data-image-diff-loaded])"))new ym().init(e)}const wm=(e,t)=>{const i=e.__vccOpts||e;for(const[n,s]of t)i[n]=s;return i},Sm={props:{title:{type:String,default:""},points:{type:Array,default:()=>[]},height:{type:Number,default:100},width:{type:Number,default:300},showYAxis:{type:Boolean,default:!1},showXAxis:{type:Boolean,default:!1},labelHeight:{type:Number,default:12},showTrendLine:{type:Boolean,default:!1},trendLineColor:{type:String,default:"green"},trendLineWidth:{type:Number,default:2},easeIn:{type:Boolean,default:!0},showValues:{type:Boolean,default:!1},maxYAxis:{type:Number,default:0},animationDuration:{type:Number,default:.5},barColor:{type:String,default:"deepskyblue"},textColor:{type:String,default:"black"},textAltColor:{type:String,default:"black"},textFont:{type:String,default:"10px sans-serif"},useCustomLabels:{type:Boolean,default:!1},customLabels:{type:Array,default:()=>[]}},data(){return{dynamicPoints:[],staticPoints:[],extraTopHeightForYAxisLabel:4,extraBottomHeightForYAxisLabel:4,digitsUsedInYAxis:0}},computed:{usingObjectsForDataPoints(){return this.points.every(e=>typeof e=="object")},dataPoints(){return this.usingObjectsForDataPoints?this.points.map(e=>e.value):this.points},dataLabels(){return this.points.map((e,t)=>this.useCustomLabels?this.customLabels[t]:this.usingObjectsForDataPoints?e.label:t+1)},dataColors(){return this.points.map(e=>({barColor:e&&e.barColor?e.barColor:this.barColor,textColor:e&&e.textColor?e.textColor:this.textColor,textAltColor:e&&e.textAltColor?e.textAltColor:this.textAltColor}))},yAxisWidth(){return this.digitsUsedInYAxis*5.8+5},xAxisHeight(){return this.showYAxis?this.labelHeight:this.labelHeight+this.extraBottomHeightForYAxisLabel+this.extraTopHeightForYAxisLabel},fullSvgWidth(){return this.width},fullSvgHeight(){return this.height},innerChartWidth(){return this.showYAxis?this.width-this.yAxisWidth:this.width},innerChartHeight(){let e=this.height;return this.showYAxis&&(e-=this.extraTopHeightForYAxisLabel+this.extraBottomHeightForYAxisLabel),this.showXAxis&&(e-=this.xAxisHeight),e},partitionWidth(){return this.innerChartWidth/this.dataPoints.length},maxDomain(){return this.maxYAxis?this.maxYAxis:Math.ceil(Math.max(...this.dataPoints))},chartData(){return this.dynamicPoints.map((e,t)=>({staticValue:this.staticPoints[t],index:t,label:this.dataLabels[t],width:this.partitionWidth-2,midPoint:this.partitionWidth/2,yLabel:this.innerChartHeight+4,x:t*this.partitionWidth,xMidpoint:t*this.partitionWidth+this.partitionWidth/2,yOffset:this.innerChartHeight-this.y(e),height:this.y(e),barColor:this.dataColors[t].barColor,textColor:this.dataColors[t].textColor,textAltColor:this.dataColors[t].textAltColor}))},trendLine(){const e=this.applySlope(this.dynamicPoints);return{x1:this.partitionWidth/2,y1:this.roundTo(this.innerChartHeight-this.y(e[0]),2),x2:this.innerChartWidth-this.partitionWidth/2,y2:this.roundTo(this.innerChartHeight-this.y(e[e.length-1]),2)}}},watch:{dataPoints:{handler(e){this.tween(e)},deep:!0}},created(){this.easeIn?this.tween(this.dataPoints):(this.dynamicPoints=this.dataPoints,this.staticPoints=this.dataPoints)},methods:{y(e){return e/this.maxDomain*this.innerChartHeight},roundTo(e,t=0){let i=!1,n=e;n<0&&(i=!0,n*=-1);const s=10**t;return n=parseFloat((n*s).toFixed(11)),n=(Math.round(n)/s).toFixed(2),i&&(n=(n*-1).toFixed(2)),n},easeInFunc(e){return 1-Math.cos(e*(Math.PI/2))},tween(e){this.staticPoints=e,this.dynamicPoints=Array(e.length).fill(0);const t=this.dynamicPoints,i=200,n=10;let s=new Date().getTime(),l=setInterval(()=>{if(this.dynamicPoints!==t){clearInterval(l);return}let u=(new Date().getTime()-s)/i;if(u=u<0?1:Math.min(u,1),u>=1){clearInterval(l),this.dynamicPoints=e;return}for(let m=0;m<t.length;m+=1)this.dynamicPoints[m]=this.easeInFunc(u)*e[m]},n)},getTicks(){for(let e=6;e>0;e-=1)if(this.maxDomain%e===0){const t=e<3,i=t?3:e;return this.digitsUsedInYAxis=this.maxDomain.toFixed(t?1:0).replace(".","").length,[...new Array(i+1)].map((n,s)=>{const l=this.maxDomain/i*(i-s),u=this.innerChartHeight/i*s;return{key:s,text:t?l.toFixed(1):l,yText:u<10?10:u+4,x1:this.yAxisWidth-4,y1:u,x2:this.yAxisWidth-1,y2:u}})}return[]},applySlope(e){let t=0,i=0;for(let y=0;y<e.length;y+=1)t+=y,i+=e[y];t/=e.length,i/=e.length;let n=0,s=0;for(let y=0;y<e.length;y+=1)n+=(y-t)*(e[y]-i),s+=(y-t)**2;const l=n/s,u=i-l*t,m=[];for(let y=0;y<e.length;y+=1)m.push(l*y+u);return m}}},xm=["width","height"],jm={key:0,id:"title"},Em=["transform"],Am=["transform","width","height"],Cm=["transform"],km=["width","height","y"],Tm=["x","y","dy"],Lm={key:1},Rm=["x","y"],Mm=["x1","x2","y1","y2"],Dm=["x1","y1","x2","y2","stroke-width","stroke"],Om={key:0},qm=["x1","x2","y1","y2"],Pm={key:1},Fm=["x1","x2","y1"],Im=["x1","y1","x2","y2"],Nm=["y"];function Hm(e,t,i,n,s,l){return(0,c.uX)(),(0,c.CE)("svg",{width:l.fullSvgWidth,height:l.fullSvgHeight,"aria-labelledby":"title",role:"img"},[i.title?((0,c.uX)(),(0,c.CE)("title",jm,(0,W.v_)(i.title),1)):(0,c.Q3)("",!0),(0,c.Lk)("g",{transform:`translate(0,${i.showYAxis?s.extraTopHeightForYAxisLabel:0})`},[(0,c.Lk)("g",{transform:`translate(${i.showYAxis?l.yAxisWidth:0},0)`,width:l.innerChartWidth,height:l.innerChartHeight},[((0,c.uX)(!0),(0,c.CE)(c.FK,null,(0,c.pI)(l.chartData,u=>((0,c.uX)(),(0,c.CE)("g",{key:u.index,transform:`translate(${u.x},0)`},[(0,c.Lk)("title",null,[(0,c.RG)(e.$slots,"title",{bar:u},()=>[(0,c.Lk)("tspan",null,(0,W.v_)(u.staticValue),1)])]),(0,c.Lk)("rect",{width:u.width,height:u.height,x:2,y:u.yOffset,style:(0,W.Tr)({fill:u.barColor})},null,12,km),i.showValues?((0,c.uX)(),(0,c.CE)("text",{key:0,x:u.midPoint,y:u.yOffset,dy:`${u.height<22?"-5px":"15px"}`,"text-anchor":"middle",style:(0,W.Tr)({fill:u.height<22?u.textColor:u.textAltColor,font:i.textFont})},(0,W.v_)(u.staticValue),13,Tm)):(0,c.Q3)("",!0),i.showXAxis?((0,c.uX)(),(0,c.CE)("g",Lm,[(0,c.RG)(e.$slots,"label",{bar:u,textStyle:{fill:i.textColor,font:i.textFont}},()=>[(0,c.Lk)("text",{x:u.midPoint,y:`${u.yLabel+10}px`,"text-anchor":"middle",style:(0,W.Tr)({fill:i.textColor,font:i.textFont})},(0,W.v_)(u.label),13,Rm)]),(0,c.Lk)("line",{x1:u.midPoint,x2:u.midPoint,y1:l.innerChartHeight+3,y2:l.innerChartHeight,stroke:"#555555","stroke-width":"1"},null,8,Mm)])):(0,c.Q3)("",!0)],8,Cm))),128)),i.showTrendLine?((0,c.uX)(),(0,c.CE)("line",{key:0,x1:l.trendLine.x1,y1:l.trendLine.y1,x2:l.trendLine.x2,y2:l.trendLine.y2,"stroke-width":i.trendLineWidth,stroke:i.trendLineColor},null,8,Dm)):(0,c.Q3)("",!0)],8,Am),i.showXAxis?((0,c.uX)(),(0,c.CE)("g",Om,[(0,c.Lk)("line",{x1:i.showYAxis?l.yAxisWidth-1:2,x2:l.innerChartWidth+l.yAxisWidth,y1:l.innerChartHeight,y2:l.innerChartHeight,stroke:"#555555","stroke-width":"1"},null,8,qm)])):(0,c.Q3)("",!0),i.showYAxis?((0,c.uX)(),(0,c.CE)("g",Pm,[(0,c.Lk)("line",{x1:l.yAxisWidth-1,x2:l.yAxisWidth-1,y1:l.innerChartHeight,y2:"0",stroke:"#555555","stroke-width":"1"},null,8,Fm),((0,c.uX)(!0),(0,c.CE)(c.FK,null,(0,c.pI)(l.getTicks(),u=>((0,c.uX)(),(0,c.CE)("g",{key:u.key},[(0,c.Lk)("line",{x1:u.x1,y1:u.y1,x2:u.x2,y2:u.y2,stroke:"#555555","stroke-width":"1"},null,8,Im),(0,c.Lk)("text",{x:"0",y:u.yText,"alignment-baseline":"central",style:(0,W.Tr)({fill:i.textColor,font:i.textFont})},(0,W.v_)(u.text),13,Nm)]))),128))])):(0,c.Q3)("",!0)],8,Em)],8,xm)}const Rd=wm(Sm,[["render",Hm]]);function ju(e){ju.installed||(ju.installed=!0,e.component("VueBarGraph",Rd))}const Bm={install:ju};let gc=null;typeof window<"u"?gc=window.Vue:typeof __webpack_require__.g<"u"&&(gc=__webpack_require__.g.Vue),gc&&gc.use(Bm);const $m=["href"],Um=["x","y","href"],Vm=["x","y","href"],Wm={key:0};var zm=(0,c.pM)({__name:"RepoActivityTopAuthors",setup(e){const t=(0,Re.KR)({barColor:"green",textColor:"black",textAltColor:"white"}),i=window.config.pageData.repoActivityTopAuthors||[],n=(0,c.EW)(()=>i.map(y=>({value:y.commits,label:y.name}))),s=(0,c.EW)(()=>i.map((y,A)=>({position:A+1,...y}))),l=(0,c.EW)(()=>i.length*40),u=(0,Re.KR)(null),m=(0,Re.KR)(null);return(0,c.sV)(()=>{const y=window.getComputedStyle(u.value),A=window.getComputedStyle(m.value);t.value={barColor:y.backgroundColor,textColor:y.color,textAltColor:A.color}}),(y,A)=>((0,c.uX)(),(0,c.CE)("div",null,[(0,c.Lk)("div",{class:"activity-bar-graph",ref_key:"styleElement",ref:u,style:{width:"0",height:"0"}},null,512),(0,c.Lk)("div",{class:"activity-bar-graph-alt",ref_key:"altStyleElement",ref:m,style:{width:"0",height:"0"}},null,512),(0,c.bF)((0,Re.R1)(Rd),{points:n.value,"show-x-axis":!0,"show-y-axis":!1,"show-values":!0,width:l.value,"bar-color":t.value.barColor,"text-color":t.value.textColor,"text-alt-color":t.value.textAltColor,height:100,"label-height":20},{label:(0,c.k6)(L=>[((0,c.uX)(!0),(0,c.CE)(c.FK,null,(0,c.pI)(s.value,(z,X)=>((0,c.uX)(),(0,c.CE)("g",{key:z.position},[L.bar.index===X&&z.home_link?((0,c.uX)(),(0,c.CE)("a",{key:0,href:z.home_link},[(0,c.Lk)("image",{x:`${L.bar.midPoint-10}px`,y:`${L.bar.yLabel}px`,height:"20",width:"20",href:z.avatar_link},null,8,Um)],8,$m)):L.bar.index===X?((0,c.uX)(),(0,c.CE)("image",{key:1,x:`${L.bar.midPoint-10}px`,y:`${L.bar.yLabel}px`,height:"20",width:"20",href:z.avatar_link},null,8,Vm)):(0,c.Q3)("v-if",!0)]))),128))]),title:(0,c.k6)(L=>[((0,c.uX)(!0),(0,c.CE)(c.FK,null,(0,c.pI)(s.value,(z,X)=>((0,c.uX)(),(0,c.CE)("tspan",{key:z.position},[L.bar.index===X?((0,c.uX)(),(0,c.CE)("tspan",Wm,(0,W.v_)(z.name),1)):(0,c.Q3)("v-if",!0)]))),128))]),_:1},8,["points","width","bar-color","text-color","text-alt-color"])]))}}),Km=zm,pr=__webpack_require__("./web_src/js/utils/url.ts");async function Xm(e){e.preventDefault();const t=e.target.closest("a.archive-link[href]"),i=t.closest(".ui.dropdown")??t;i.classList.add("is-loading","loading-icon-2px");try{for(let n=0;;n++){const s=await(0,Ae.LO)(t.href);if(!s.ok)throw new Error(`Invalid server response: ${s.status}`);if((await s.json()).complete)break;await(0,St.yy)(Math.min((n+1)*750,2e3))}window.location.href=t.href}catch(n){console.error(n),gt(`Failed to download the archive: ${n}`,{duration:2500})}finally{i.classList.remove("is-loading","loading-icon-2px")}}function Gm(){(0,C.jB)(document,"a.archive-link[href]",e=>e.addEventListener("click",Xm))}function Qm(){const e=document.querySelector("#repo-activity-top-authors-chart");e&&Ai(Km).mount(e)}function Ym(e,t){const i=e.indexOf("{url}");if(i===-1)return e;const n=e.indexOf("?"),s=n>=0&&n<i;return e.replace("{url}",s?encodeURIComponent(t):t)}function Md(e){const t=e.querySelector(".repo-clone-url"),i=e.querySelector(".repo-clone-https"),n=e.querySelector(".repo-clone-ssh"),s=e.querySelector(".repo-clone-tea"),l=function(){let u=localStorage.getItem("repo-clone-protocol");["https","ssh","tea"].includes(u)||(u="https"),u==="tea"&&!s&&(u="https"),u==="https"&&!i?u="ssh":u==="ssh"&&!n&&(u="https");const m=u==="https",y=u==="ssh",A=u==="tea";i&&(i.textContent=window.origin.split(":")[0].toUpperCase(),i.classList.toggle("active",m)),n&&n.classList.toggle("active",y),s&&s.classList.toggle("active",A);let L;if(m?L=i:y?L=n:A&&(L=s),!L)return;const z=(0,pr.BZ)(L.getAttribute("data-link"));for(const X of document.querySelectorAll(".js-clone-url"))X.nodeName==="INPUT"?X.value=z:X.textContent=z;for(const X of e.querySelectorAll(".js-clone-url-editor"))X.href=Ym(X.getAttribute("data-href-template"),z)};l(),i?.addEventListener("click",()=>{localStorage.setItem("repo-clone-protocol","https"),l()}),n?.addEventListener("click",()=>{localStorage.setItem("repo-clone-protocol","ssh"),l()}),s?.addEventListener("click",()=>{localStorage.setItem("repo-clone-protocol","tea"),l()}),t.addEventListener("focus",()=>{t.select()})}function Jm(e){const t=e.nextElementSibling;Md(t),Ie(e,{content:t,trigger:"click",placement:"bottom-end",interactive:!0,hideOnClick:!0,arrow:!1})}function Zm(){(0,C.jB)(document,".js-btn-clone-panel",Jm),(0,C.jB)(document,".clone-buttons-combo",Md)}async function ep(e,t,i,n){try{if(!(await(0,Ae.LO)(e,{data:new URLSearchParams({action:t,issue_ids:i,id:n})})).ok)throw new Error("Failed to update issues meta")}catch(s){console.error(s)}}function Dd(e){e=e.trim().replace(/[^-.\w]/g,"-");for(let t="";t!==e;){t=e,e=e.replace(/\.+$/g,""),e=e.replace(/\.{2,}/g,".");for(const i of[".git",".wiki",".rss",".atom"])e.endsWith(i)&&(e=e.substring(0,e.length-i.length))}return[".","..","-"].includes(e)&&(e=""),e}const Eu=document.querySelector("#service_type"),Od=document.querySelector("#auth_username"),qd=document.querySelector("#auth_password"),Pd=document.querySelector("#auth_token"),Fd=document.querySelector("#mirror"),Au=document.querySelector("#lfs"),tp=document.querySelector("#lfs_settings"),Id=document.querySelector("#lfs_endpoint"),Cu=document.querySelectorAll("#migrate_items input[type=checkbox]");function ip(){np(),Nd(),Od?.addEventListener("input",()=>{El(!1)}),qd?.addEventListener("input",()=>{El(!1)}),Pd?.addEventListener("input",()=>{El(!0)}),Fd?.addEventListener("change",()=>{El(!0)}),document.querySelector("#lfs_settings_show")?.addEventListener("click",i=>{i.preventDefault(),i.stopPropagation(),(0,C.fi)(Id)}),Au?.addEventListener("change",Nd);const e=document.querySelector("#clone_addr"),t=document.querySelector("#repo_name");if(e&&t){let i=!1;t.addEventListener("input",()=>{i=!0}),e.addEventListener("input",()=>{if(i)return;let n=e.value.split(/[?#]/)[0];const s=/^(.*\/)?((.+?)\/?)$/.exec(n);if(!s||s.length<4){t.value="";return}n=s[3].split(/[?#]/)[0],t.value=Dd(n)})}}function np(){if(!Eu)return;const e=Number(Eu.value);El(e!==1)}function El(e){let t=!1;if(e?t=Pd?.value!=="":t=Od?.value!==""||qd?.value!=="",t&&Number(Eu?.value)>1){if(Fd?.checked){for(const i of Cu)i.disabled=i.name!=="wiki";return}for(const i of Cu)i.disabled=!1}else for(const i of Cu)i.disabled=!0}function Nd(){if(!Au)return;const e=Au.checked;(0,C.oi)(tp,e),(0,C.y9)(Id)}var sp=__webpack_require__("./web_src/js/utils/color.ts");async function vc(e,t={}){const{Sortable:i}=await __webpack_require__.e("sortablejs").then(__webpack_require__.bind(__webpack_require__,"./node_modules/sortablejs/modular/sortable.esm.js"));return new i(e,{animation:150,ghostClass:"card-ghost",onChoose:n=>{(t.handle?n.item.querySelector(t.handle):n.item).classList.add("tw-cursor-grabbing"),t.onChoose?.(n)},onUnchoose:n=>{(t.handle?n.item.querySelector(t.handle):n.item).classList.remove("tw-cursor-grabbing"),t.onUnchoose?.(n)},...t})}function Hd(e){const t=e.parentElement,i=t.querySelectorAll(".issue-card").length;t.querySelector(".project-column-issue-count").textContent=String(i)}async function Bd({item:e,from:t,to:i,oldIndex:n}){const s=i.querySelectorAll(".issue-card");Hd(t),Hd(i);const l={issues:Array.from(s,(u,m)=>({issueID:parseInt(u.getAttribute("data-issue")),sorting:m}))};try{await(0,Ae.LO)(`${i.getAttribute("data-url")}/move`,{data:l})}catch(u){console.error(u),t.insertBefore(e,t.children[n])}}async function rp(){const e=document.querySelector("#project-board");let t=e.querySelectorAll(".project-column");vc(e,{group:"project-column",draggable:".project-column",handle:".project-column-header",delayOnTouchOnly:!0,delay:500,onSort:async()=>{t=e.querySelectorAll(".project-column");const i={columns:Array.from(t,(n,s)=>({columnID:parseInt(n.getAttribute("data-id")),sorting:s}))};try{await(0,Ae.LO)(e.getAttribute("data-url"),{data:i})}catch(n){console.error(n)}}});for(const i of t){const n=i.querySelector(".cards");vc(n,{group:"shared",onAdd:Bd,onUpdate:Bd,delayOnTouchOnly:!0,delay:500})}}function op(e){const t=document.querySelector(".ui.modal#project-column-modal-edit"),i=t.querySelector("form"),n=i.querySelector('input[name="id"]'),s=i.querySelector('input[name="title"]'),l=i.querySelector('input[name="color"]'),u="data-modal-project-column-id",m="data-modal-project-column-title-input",y="data-modal-project-column-color-input";(0,C.jB)(document,".show-project-column-modal-edit",A=>{A.addEventListener("click",()=>{n.value=A.getAttribute(u),s.value=A.getAttribute(m),l.value=A.getAttribute(y),l.dispatchEvent(new Event("input",{bubbles:!0}))})}),i.addEventListener("submit",async A=>{A.preventDefault();const L=n.value,z=i.getAttribute("data-action-base-link"),X=new FormData(i),_e=L?`${z}/${L}`:`${z}/columns/new`,pe=L?"PUT":"POST";try{if(i.classList.add("is-loading"),await(0,Ae.Em)(_e,{method:pe,data:X}),!L){window.location.reload();return}(0,ke.mD)(t).modal("hide");const de=e.querySelector(`.show-project-column-modal-edit[${u}="${L}"]`);de.setAttribute(m,s.value),de.setAttribute(y,l.value);const Pe=e.querySelector(`.project-column[data-id="${L}"]`),Le=Pe.querySelector(".project-column-title-text");if(Le.textContent=s.value,l.value){const Te=(0,sp.a)(l.value);Pe.style.setProperty("background",l.value,"important"),Pe.style.setProperty("color",Te,"important"),(0,C.xP)(Pe,".divider",He=>He.style.color=Te)}else Pe.style.removeProperty("background"),Pe.style.removeProperty("color"),(0,C.xP)(Pe,".divider",Te=>Te.style.removeProperty("color"))}finally{i.classList.remove("is-loading")}})}function ap(){const e=document.querySelector(".screen-full"),t=document.querySelector(".screen-normal");if(!e||!t)return;const i=n=>{(0,St._M)(".projects-view",n),(0,C.oi)(e,!n),(0,C.oi)(t,n)};e.addEventListener("click",()=>i(!0)),t.addEventListener("click",()=>i(!1))}function lp(){ap();const e=document.querySelector('#project-board[data-project-borad-writable="true"]');e&&(rp(),op(e))}function cp(){for(const e of document.querySelectorAll("th[data-sortt-asc]")||[]){const t=e.getAttribute("data-sortt-asc"),i=e.getAttribute("data-sortt-desc"),n=e.getAttribute("data-sortt-default");e.addEventListener("click",()=>{up(t,i,n)})}}function up(e,t,i){if(!e)return!1;t||(t="");const n=new URL(window.location.href);let s=n.searchParams.get("sort");!s&&i&&(s=e),n.searchParams.set("sort",s!==e?e:t),window.location.replace(n.href)}function dp(){const e=window.config.pageData.adminUserListSearchForm;if(!e)return;const t=document.querySelector("#user-list-search-form");if(!t)return;for(const n of t.querySelectorAll(`button[name=sort][value="${e.SortType}"]`))n.classList.add("active");if(e.StatusFilterMap){for(const[n,s]of Object.entries(e.StatusFilterMap))if(s)for(const l of t.querySelectorAll(`input[name="status_filter[${n}]"][value="${s}"]`))l.checked=!0}for(const n of t.querySelectorAll("input[type=radio]"))n.addEventListener("click",()=>{t.submit()});const i=t.querySelectorAll(".j-reset-status-filter");for(const n of i)n.addEventListener("click",s=>{s.preventDefault();for(const l of t.querySelectorAll("input[type=radio]"))l.name.startsWith("status_filter[")&&(l.checked=!1);t.submit()})}const{appSubUrl:fp}=window.config;function hp(){const e=document.querySelector(".page-content.admin.config");if(e)for(const t of e.querySelectorAll('input[type="checkbox"][data-config-dyn-key]'))t.addEventListener("change",async()=>{try{const n=await(await(0,Ae.LO)(`${fp}/-/admin/config`,{data:new URLSearchParams({key:t.getAttribute("data-config-dyn-key"),value:String(t.checked)})})).json();if(n.errorMessage)throw new Error(n.errorMessage)}catch(i){Dt(t,i.toString()),t.checked=!t.checked}})}const $d=e=>`user-content-${e}`,Ud=e=>e.replace(/^user-content-/,""),mp=e=>e.startsWith("user-content-");function Vd(e){let t;try{t=decodeURIComponent(e??"")}catch{}if(!t)return;const i=$d(t);let n=document.getElementById(i);n=n??document.querySelector(`a[name="${CSS.escape(i)}"]`),n=!n&&mp(t)?document.getElementById(t):n,n?.scrollIntoView()}function pp(){const e=document.querySelectorAll(".markup");if(e.length){for(const t of e){for(const i of t.querySelectorAll("h1, h2, h3, h4, h5, h6")){const n=document.createElement("a");n.classList.add("anchor"),n.setAttribute("href",`#${encodeURIComponent(Ud(i.id))}`),n.innerHTML=(0,Z.JW)("octicon-link"),i.prepend(n)}for(const i of t.querySelectorAll('a[href^="#"]')){const n=i.getAttribute("href");n.startsWith("#user-content-")&&i.setAttribute("href",`#${Ud(n.substring(1))}`)}for(const i of t.querySelectorAll("a[name]")){const n=i.getAttribute("name");n&&i.setAttribute("name",$d(n))}for(const i of t.querySelectorAll('a[href^="#"]'))i.addEventListener("click",n=>{Vd(n.currentTarget.getAttribute("href")?.substring(1))})}document.querySelector(":target")||Vd(window.location.hash?.substring(1))}}const{appSubUrl:gp}=window.config;async function Wd(){await(0,St.yy)(5e3),window.location.href=`${gp}/`}const{appSubUrl:ku,notificationSettings:ua,assetVersionEncoded:vp}=window.config;let zd=0;function Kd(){const e=document.querySelector("#notification_table");if(e){window.addEventListener("pageshow",t=>{if(t.persisted){const i=document.querySelector("#notification_table"),n=document.querySelector(".notifications-unread-count");let s=parseInt(n.textContent);for(const l of i.querySelectorAll('.notifications-item[data-remove="true"]'))l.remove(),s-=1;n.textContent=String(s)}});for(const t of e.querySelectorAll('.notifications-item[data-status="1"] .notifications-link'))t.addEventListener("click",i=>{i.target.closest(".notifications-item").setAttribute("data-remove","true")})}}async function bp(e){try{const t=JSON.parse(e.data);for(const i of document.querySelectorAll(".notification_count"))i.classList.toggle("tw-hidden",t.Count===0),i.textContent=`${t.Count}`;await Gd()}catch(t){console.error(t,e)}}function _p(){if(!document.querySelector(".notification_count"))return;let e=!1;const t=(i,n)=>{i<=0||!Number.isFinite(i)||(e=!0,n=n??Xd(),setTimeout(async()=>{await yp(t,i,n)},i))};if(ua.EventSourceUpdateTime>0&&window.EventSource&&window.SharedWorker){const i=new SharedWorker(`${__webpack_require__.p}js/eventsource.sharedworker.js?v=${vp}`,"notification-worker");i.addEventListener("error",n=>{console.error("worker error",n)}),i.port.addEventListener("messageerror",()=>{console.error("unable to deserialize message")}),i.port.postMessage({type:"start",url:`${window.location.origin}${ku}/user/events`}),i.port.addEventListener("message",n=>{if(!n.data||!n.data.type){console.error("unknown worker message event",n);return}if(n.data.type==="notification-count")bp(n);else if(n.data.type==="no-event-source")e||t(ua.MinTimeout);else if(n.data.type==="error")console.error("worker port event error",n.data);else if(n.data.type==="logout"){if(n.data.data!=="here")return;i.port.postMessage({type:"close"}),i.port.close(),Wd()}else n.data.type==="close"&&(i.port.postMessage({type:"close"}),i.port.close())}),i.port.addEventListener("error",n=>{console.error("worker port error",n)}),i.port.start(),window.addEventListener("beforeunload",()=>{i.port.postMessage({type:"close"}),i.port.close()});return}t(ua.MinTimeout)}function Xd(){return Number(document.querySelector(".notification_count").textContent??"0")}async function yp(e,t,i){const n=Xd();if(i!==n){e(ua.MinTimeout,n);return}const s=await wp();let l=!1;i!==s?(l=!0,t=ua.MinTimeout):t<ua.MaxTimeout&&(t+=ua.TimeoutStep),e(t,s),l&&await Gd()}async function Gd(){const e=document.querySelector("#notification_div");if(e)try{const t=new URLSearchParams(window.location.search);t.set("div-only",String(!0)),t.set("sequence-number",String(++zd));const i=await(0,Ae.fG)(`${ku}/notifications?${t.toString()}`);if(!i.ok)throw new Error("Failed to fetch notification table");const n=await i.text(),s=(0,C.SL)(n);parseInt(s.getAttribute("data-sequence-number"))===zd&&(e.outerHTML=n,Kd())}catch(t){console.error(t)}}async function wp(){try{const e=await(0,Ae.fG)(`${ku}/notifications/new`);if(!e.ok)throw new Error("Failed to fetch notification count");const t=await e.json();(0,C.oi)(".notification_count",t.new!==0);for(const i of document.querySelectorAll(".notification_count"))i.textContent=`${t.new}`;return t.new}catch(e){return console.error(e),0}}let Qd,Yd,Jd,Zd;function Sp(e,t,i,n){const s=(0,C.SL)(`
DesignScreenshot/output/git.buildapp.eu.org_run/git.buildapp.eu.org_1_initial_page.html:288:`);return s.lastIndexOf("#")>l},n=h0(async(s,l)=>{if(!i())return{matched:!1};const u=await p0(s,l);return i()?u:{matched:!1}},300);e.addEventListener("text-expander-change",s=>{const{key:l,text:u,provide:m}=s.detail;if(l===":"){const y=c0(u);if(!y.length)return m({matched:!1});const A=document.createElement("ul");A.classList.add("suggestions");for(const L of y){const z=Bu(L),X=document.createElement("li");X.setAttribute("role","option"),X.setAttribute("data-value",z),X.textContent=`${z} ${L}`,A.append(X)}m({matched:!0,fragment:A})}else if(l==="@"){const y=u0(u);if(!y.length)return m({matched:!1});const A=document.createElement("ul");A.classList.add("suggestions");for(const{value:L,name:z,fullname:X,avatar:_e}of y){const pe=document.createElement("li");pe.setAttribute("role","option"),pe.setAttribute("data-value",`${l}${L}`);const de=document.createElement("img");de.src=_e,pe.append(de);const Pe=document.createElement("span");if(Pe.classList.add("name"),Pe.textContent=z,pe.append(Pe),X&&X.toLowerCase()!==z){const Le=document.createElement("span");Le.classList.add("fullname"),Le.textContent=X,pe.append(Le)}A.append(pe)}m({matched:!0,fragment:A})}else l==="#"&&m(n(l,u))}),e.addEventListener("text-expander-value",({detail:s})=>{if(s?.item){const l=["@","#"].includes(s.key)?" ":"";s.value=`${s.item.getAttribute("data-value")}${l}`}})}var v0=Object.defineProperty,b0=(e,t,i)=>t in e?v0(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i,vs=(e,t,i)=>b0(e,typeof t!="symbol"?t+"":t,i);let $a=0;function hh(e){return e.value?!0:((0,C.EH)(e)?(e.required=!0,e.closest("form")?.reportValidity()):gt("Require non-empty content"),!1)}class ha{constructor(t,i={}){if(vs(this,"container"),vs(this,"options"),vs(this,"tabEditor"),vs(this,"tabPreviewer"),vs(this,"supportEasyMDE"),vs(this,"easyMDE"),vs(this,"easyMDEToolbarActions"),vs(this,"easyMDEToolbarDefault"),vs(this,"textarea"),vs(this,"textareaMarkdownToolbar"),vs(this,"textareaAutosize"),vs(this,"dropzone"),vs(this,"attachedDropzoneInst"),vs(this,"previewMode"),vs(this,"previewUrl"),vs(this,"previewContext"),t._giteaComboMarkdownEditor)throw new Error("ComboMarkdownEditor already initialized");t._giteaComboMarkdownEditor=this,this.options=i,this.container=t}async init(){this.prepareEasyMDEToolbarActions(),this.setupContainer(),this.setupTab(),await this.setupDropzone(),this.setupTextarea(),await this.switchToUserPreference()}applyEditorHeights(t,i){i&&(i.minHeight&&(t.style.minHeight=i.minHeight),i.height&&(t.style.height=i.height),i.maxHeight&&(t.style.maxHeight=i.maxHeight))}setupContainer(){this.supportEasyMDE=this.container.getAttribute("data-support-easy-mde")==="true",this.previewMode=this.container.getAttribute("data-content-mode"),this.previewUrl=this.container.getAttribute("data-preview-url"),this.previewContext=this.container.getAttribute("data-preview-context"),g0(this.container.querySelector("text-expander"))}setupTextarea(){this.textarea=this.container.querySelector(".markdown-text-editor"),this.textarea._giteaComboMarkdownEditor=this,this.textarea.id=`_combo_markdown_editor_${String($a++)}`,this.textarea.addEventListener("input",()=>Lo(this.container)),this.applyEditorHeights(this.textarea,this.options.editorHeights),this.textarea.getAttribute("data-disable-autosize")!=="true"&&(this.textareaAutosize=(0,C.DS)(this.textarea,{viewportMarginBottom:130})),this.textareaMarkdownToolbar=this.container.querySelector("markdown-toolbar"),this.textareaMarkdownToolbar.setAttribute("for",this.textarea.id);for(const s of this.textareaMarkdownToolbar.querySelectorAll(".markdown-toolbar-button"))s.setAttribute("role","button"),s.nodeName==="BUTTON"&&!s.getAttribute("type")&&s.setAttribute("type","button");const t=this.container.querySelector(".markdown-switch-monospace"),i=localStorage?.getItem("markdown-editor-monospace")==="true",n=t.getAttribute(i?"data-disable-text":"data-enable-text");t.setAttribute("data-tooltip-content",n),t.setAttribute("aria-checked",String(i)),t.addEventListener("click",s=>{s.preventDefault();const l=localStorage?.getItem("markdown-editor-monospace")!=="true";localStorage.setItem("markdown-editor-monospace",String(l)),this.textarea.classList.toggle("tw-font-mono",l);const u=t.getAttribute(l?"data-disable-text":"data-enable-text");t.setAttribute("data-tooltip-content",u),t.setAttribute("aria-checked",String(l))}),this.supportEasyMDE&&this.container.querySelector(".markdown-switch-easymde").addEventListener("click",async l=>{l.preventDefault(),this.userPreferredEditor="easymde",await this.switchToEasyMDE()}),this.initMarkdownButtonTableAdd(),Ig(this.textarea),Gg(this.textarea,this.dropzone)}async setupDropzone(){this.container.getAttribute("data-dropzone-parent-container")&&(this.dropzone=this.container.closest(this.container.getAttribute("data-dropzone-parent-container"))?.querySelector(".dropzone"),this.dropzone&&(this.attachedDropzoneInst=await Qf(this.dropzone),this.attachedDropzoneInst.on("processing",()=>Vu(this.container)),this.attachedDropzoneInst.on("queuecomplete",()=>Vu(this.container))))}dropzoneGetFiles(){return this.dropzone?Array.from(this.dropzone.querySelectorAll(".files [name=files]"),t=>t.value):null}dropzoneReloadFiles(){this.dropzone&&this.attachedDropzoneInst.emit(Ac)}dropzoneSubmitReload(){this.dropzone&&(this.attachedDropzoneInst.emit("submit"),this.attachedDropzoneInst.emit(Ac))}isUploading(){return this.dropzone?this.attachedDropzoneInst.getQueuedFiles().length||this.attachedDropzoneInst.getUploadingFiles().length:!1}setupTab(){const t=this.container.querySelectorAll(".tabular.menu > .item");if(!t.length)return;this.tabEditor=Array.from(t).find(s=>s.getAttribute("data-tab-for")==="markdown-writer"),this.tabPreviewer=Array.from(t).find(s=>s.getAttribute("data-tab-for")==="markdown-previewer"),this.tabEditor.setAttribute("data-tab",`markdown-writer-${$a}`),this.tabPreviewer.setAttribute("data-tab",`markdown-previewer-${$a}`);const i=this.container.querySelector('.ui.tab[data-tab-panel="markdown-writer"]'),n=this.container.querySelector('.ui.tab[data-tab-panel="markdown-previewer"]');i.setAttribute("data-tab",`markdown-writer-${$a}`),n.setAttribute("data-tab",`markdown-previewer-${$a}`),$a++,this.tabEditor.addEventListener("click",()=>{requestAnimationFrame(()=>{this.focus()})}),(0,ke.mD)(t).tab(),this.tabPreviewer.addEventListener("click",async()=>{const s=new FormData;s.append("mode",this.previewMode),s.append("context",this.previewContext),s.append("text",this.value());const u=await(await(0,Ae.LO)(this.previewUrl,{data:s})).text();uh(n,u)})}generateMarkdownTable(t,i){const n=[];n.push(`| ${"Header ".repeat(i).trim().split(" ").join(" | ")} |`,`| ${"--- ".repeat(i).trim().split(" ").join(" | ")} |`);for(let s=0;s<t;s++)n.push(`| ${"Cell ".repeat(i).trim().split(" ").join(" | ")} |`);return n.join(`
DesignScreenshot/output/git.buildapp.eu.org_run/git.buildapp.eu.org_1_initial_page.html:292:`),n.hide()})}switchTabToEditor(){this.tabEditor.click()}prepareEasyMDEToolbarActions(){this.easyMDEToolbarDefault=["bold","italic","strikethrough","|","heading-1","heading-2","heading-3","heading-bigger","heading-smaller","|","code","quote","|","gitea-checkbox-empty","gitea-checkbox-checked","|","unordered-list","ordered-list","|","link","image","table","horizontal-rule","|","gitea-switch-to-textarea"]}parseEasyMDEToolbar(t,i){this.easyMDEToolbarActions=this.easyMDEToolbarActions||l0(t,this);const n=[];for(const s of i){const l=this.easyMDEToolbarActions[s];if(!l)throw new Error(`Unknown EasyMDE toolbar action ${s}`);n.push(l)}return n}async switchToUserPreference(){this.userPreferredEditor==="easymde"&&this.supportEasyMDE?await this.switchToEasyMDE():this.switchToTextarea()}switchToTextarea(){this.easyMDE&&((0,C.fi)(this.textareaMarkdownToolbar),this.easyMDE&&(this.easyMDE.toTextArea(),this.easyMDE=null))}async switchToEasyMDE(){if(this.easyMDE)return;const{default:t}=await __webpack_require__.e("easymde").then(__webpack_require__.t.bind(__webpack_require__,"./node_modules/easymde/src/js/easymde.js",23)),i={autoDownloadFontAwesome:!1,element:this.textarea,forceSync:!0,renderingConfig:{singleLineBreaks:!1},indentWithTabs:!1,tabSize:4,spellChecker:!1,inputStyle:"contenteditable",nativeSpellcheck:!0,...this.options.easyMDEOptions};i.toolbar=this.parseEasyMDEToolbar(t,i.toolbar??this.easyMDEToolbarDefault),this.easyMDE=new t(i),this.easyMDE.codemirror.on("change",()=>Lo(this.container)),this.easyMDE.codemirror.setOption("extraKeys",{"Cmd-Enter":n=>kc(n.getTextArea()),"Ctrl-Enter":n=>kc(n.getTextArea()),Enter:n=>{const s=document.querySelector(".tribute-container");(!s||s.style.display==="none")&&n.execCommand("newlineAndIndent")},Up:n=>{const s=document.querySelector(".tribute-container");if(!s||s.style.display==="none")return n.execCommand("goLineUp")},Down:n=>{const s=document.querySelector(".tribute-container");if(!s||s.style.display==="none")return n.execCommand("goLineDown")}}),this.applyEditorHeights(this.container.querySelector(".CodeMirror-scroll"),this.options.editorHeights),await Tg(this.easyMDE.codemirror.getInputField()),this.dropzone&&Xg(this.easyMDE,this.dropzone),(0,C.y9)(this.textareaMarkdownToolbar)}value(t=void 0){if(t===void 0)return this.easyMDE?this.easyMDE.value():this.textarea.value;this.easyMDE?this.easyMDE.value(t):this.textarea.value=t,this.textareaAutosize?.resizeToFit()}focus(){this.easyMDE?this.easyMDE.codemirror.focus():this.textarea.focus()}moveCursorToEnd(){this.textarea.focus(),this.textarea.setSelectionRange(this.textarea.value.length,this.textarea.value.length),this.easyMDE&&(this.easyMDE.codemirror.focus(),this.easyMDE.codemirror.setCursor(this.easyMDE.codemirror.lineCount(),0))}get userPreferredEditor(){return window.localStorage.getItem(`markdown-editor-${this.previewMode??"default"}`)}set userPreferredEditor(t){window.localStorage.setItem(`markdown-editor-${this.previewMode??"default"}`,t)}}vs(ha,"EventEditorContentChanged",Vf),vs(ha,"EventUploadStateChanged",Jf);function Xu(e){return e?(e.length&&(e=e[0]),e._giteaComboMarkdownEditor):null}async function ma(e,t={}){if(!e)throw new Error("initComboMarkdownEditor: container is null");const i=new ha(e,t);return await i.init(),i}var _0=Object.defineProperty,y0=(e,t,i)=>t in e?_0(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i,Ro=(e,t,i)=>y0(e,typeof t!="symbol"?t+"":t,i);function w0(){const e=[document.querySelector(".edit-content-zone:not(.tw-hidden) textarea"),document.querySelector("#comment-form textarea")];for(const t of e)if(t&&t.value.trim().length>10){if(t.parentElement.scrollIntoView(),!window.confirm("Page will be reloaded, but there are draft comments. Continuing to reload will discard the comments. Continue?"))return;break}window.location.reload()}class S0{constructor(t){if(Ro(this,"updateUrl"),Ro(this,"updateAlgo"),Ro(this,"selectionMode"),Ro(this,"elDropdown"),Ro(this,"elList"),Ro(this,"elComboValue"),Ro(this,"initialValues"),Ro(this,"container"),this.container=t,this.updateUrl=t.getAttribute("data-update-url"),this.updateAlgo=t.getAttribute("data-update-algo"),this.selectionMode=t.getAttribute("data-selection-mode"),!["single","multiple"].includes(this.selectionMode))throw new Error(`Invalid data-update-on: ${this.selectionMode}`);if(!["diff","all"].includes(this.updateAlgo))throw new Error(`Invalid data-update-algo: ${this.updateAlgo}`);this.elDropdown=t.querySelector(":scope > .ui.dropdown"),this.elList=t.querySelector(":scope > .ui.list"),this.elComboValue=t.querySelector(":scope > .combo-value")}collectCheckedValues(){return Array.from(this.elDropdown.querySelectorAll(".menu > .item.checked"),t=>t.getAttribute("data-value"))}updateUiList(t){const i=this.elList.querySelector(".item.empty-list");(0,C.xP)(this.elList,".item:not(.empty-list)",s=>s.remove());for(const s of t){const l=this.elDropdown.querySelector(`.menu > .item[data-value="${CSS.escape(s)}"]`);if(!l)continue;const u=l.cloneNode(!0);(0,C.jB)(u,".item-check-mark, .item-secondary-info",m=>m.remove()),this.elList.append(u)}const n=!!this.elList.querySelector(".item:not(.empty-list)");(0,C.oi)(i,!n)}async updateToBackend(t){if(this.updateAlgo==="diff"){for(const i of this.initialValues)t.includes(i)||await(0,Ae.LO)(this.updateUrl,{data:new URLSearchParams({action:"detach",id:i})});for(const i of t)this.initialValues.includes(i)||await(0,Ae.LO)(this.updateUrl,{data:new URLSearchParams({action:"attach",id:i})})}else await(0,Ae.LO)(this.updateUrl,{data:new URLSearchParams({id:t.join(",")})});w0()}async doUpdate(){const t=this.collectCheckedValues();this.initialValues.join(",")!==t.join(",")&&(this.updateUiList(t),this.updateUrl&&await this.updateToBackend(t),this.initialValues=t)}async onChange(){this.selectionMode==="single"&&(await this.doUpdate(),(0,ke.mD)(this.elDropdown).dropdown("hide"))}async onItemClick(t,i){if(i.preventDefault(),t.hasAttribute("data-can-change")&&t.getAttribute("data-can-change")!=="true")return;if(t.matches(".clear-selection")){(0,C.jB)(this.elDropdown,".menu > .item",s=>s.classList.remove("checked")),this.elComboValue.value="",this.onChange();return}const n=t.getAttribute("data-scope");n?this.elDropdown.querySelector(`.menu > .item.checked[data-scope="${CSS.escape(n)}"]`)===t?t.classList.toggle("checked"):((0,C.jB)(this.elDropdown,`.menu > .item[data-scope="${CSS.escape(n)}"]`,l=>l.classList.remove("checked")),t.classList.toggle("checked",!0)):this.selectionMode==="multiple"?t.classList.toggle("checked"):((0,C.jB)(this.elDropdown,".menu > .item.checked",s=>s.classList.remove("checked")),t.classList.toggle("checked",!0)),this.elComboValue.value=this.collectCheckedValues().join(","),this.onChange()}async onHide(){this.selectionMode==="multiple"&&this.doUpdate()}init(){if(this.elComboValue.value&&this.elComboValue.value!=="0"&&!(0,C.jB)(this.elDropdown,".menu > .item.checked").length){const t=this.elComboValue.value.split(",");for(const i of t)this.elDropdown.querySelector(`.menu > .item[data-value="${CSS.escape(i)}"]`)?.classList.add("checked");this.updateUiList(t)}this.initialValues=this.collectCheckedValues(),(0,C.ny)(this.elDropdown,"click",".item",(t,i)=>this.onItemClick(t,i)),(0,ke.mD)(this.elDropdown).dropdown("setting",{action:"nothing",fullTextSearch:"exact",hideDividers:"empty",onHide:()=>this.onHide()})}}function x0(){const e=document.querySelector(".ui.dropdown.select-branch.branch-selector-dropdown");if(!e)return;const t=e.getAttribute("data-url-update-issueref"),i=e.querySelector(".reference-list-menu");(0,C.jB)(i,".item:not(.no-select)",n=>n.addEventListener("click",async function(s){s.preventDefault();const l=this.getAttribute("data-id"),u=this.getAttribute("data-name");if(t)try{await(0,Ae.LO)(t,{data:new URLSearchParams({ref:l})}),window.location.reload()}catch(m){console.error(m)}else{const m=this.getAttribute("data-id-selector");document.querySelector(m).value=l,e.querySelector(".text-branch-name").textContent=u}}))}function j0(){const e=document.querySelector(".issue-due-form");if(!e)return;const t=e.querySelector("input[name=deadline]");document.querySelector(".issue-due-edit")?.addEventListener("click",()=>{(0,C.oi)(e)}),document.querySelector(".issue-due-remove")?.addEventListener("click",()=>{t.value="",e.dispatchEvent(new Event("submit",{cancelable:!0,bubbles:!0}))})}function E0(){x0(),j0(),(0,C.jB)(document,".issue-sidebar-combo",e=>new S0(e).init())}const{appSubUrl:Gu}=window.config;function A0(){const e=document.querySelector("#new-dependency-drop-list");if(!e)return;const t=(0,St.yG)(),i=e.getAttribute("data-issue-cross-repo-search");let n=`${t.repoLink}/issues/search?q={query}&type=${t.issueDependencySearchType}`;i==="true"&&(n=`${Gu}/issues/search?q={query}&priority_repo_id=${t.repoId}&type=${t.issueDependencySearchType}`),(0,ke.mD)(e).dropdown({fullTextSearch:!0,apiSettings:{cache:!1,rawResponse:!0,url:n,onResponse(s){const l={success:!0,results:[]},u=e.getAttribute("data-issue-id");for(const m of s)String(m.id)!==u&&l.results.push({value:m.id,name:`<div class="gt-ellipsis">#${m.number} ${R(m.title)}</div>
DesignScreenshot/output/git.buildapp.eu.org_run/git.buildapp.eu.org_1_initial_page.html:303:_Originally posted by @${u} in ${m}_`,(0,ke.mD)(A).modal("show")})}function q0(){(0,C.jB)(document,".title_wip_desc > a",e=>e.addEventListener("click",t=>{t.preventDefault();const i=JSON.parse(e.closest(".title_wip_desc").getAttribute("data-wip-prefixes")),n=document.querySelector("#issue_title"),s=n.value;for(const l of i)if(s.startsWith(l.toUpperCase()))return;n.value=`${i[0]} ${s}`}))}function P0(){(0,C.jB)(document,".toggle-wip",e=>e.addEventListener("click",async t=>{t.preventDefault();const i=e,n=i.getAttribute("data-title"),s=i.getAttribute("data-wip-prefix"),l=i.getAttribute("data-update-url");try{const u=new URLSearchParams;if(u.append("title",n?.startsWith(s)?n.slice(s.length).trim():`${s.trim()} ${n}`),!(await(0,Ae.LO)(l,{data:u})).ok)throw new Error("Failed to toggle WIP status");window.location.reload()}catch(u){console.error(u)}}))}function F0(){const e=document.querySelector("#issue-title-display"),t=document.querySelector("#issue-title-editor");if(!t)return;const i=t.querySelector("input"),n=i.getAttribute("data-old-title");e.querySelector("#issue-title-edit-show").addEventListener("click",()=>{(0,C.y9)(e),(0,C.y9)("#pull-desc-display"),(0,C.fi)(t),(0,C.fi)("#pull-desc-editor"),i.value.trim()||(i.value=n),i.focus()}),t.querySelector(".ui.cancel.button").addEventListener("click",()=>{(0,C.y9)(t),(0,C.y9)("#pull-desc-editor"),(0,C.fi)(e),(0,C.fi)("#pull-desc-display")});const l=document.querySelector("#pull-desc-editor")?.getAttribute("data-target-update-url"),u=t.querySelector(".ui.primary.button");t.addEventListener("submit",async m=>{m.preventDefault();const y=i.value.trim();try{if(y&&y!==n){const A=await(0,Ae.LO)(u.getAttribute("data-update-url"),{data:new URLSearchParams({title:y})});if(!A.ok)throw new Error(`Failed to update issue title: ${A.statusText}`)}if(l){const A=document.querySelector("#pull-target-branch").getAttribute("data-branch"),L=document.querySelector("#branch_target").textContent;if(A!==L){const z=await(0,Ae.LO)(l,{data:new URLSearchParams({target_branch:A})});if(!z.ok)throw new Error(`Failed to update PR target branch: ${z.statusText}`)}}Ku(t),window.location.reload()}catch(A){console.error(A),gt(A.message)}})}function I0(){document.querySelector("#branch-select")?.addEventListener("click",e=>{const t=e.target.closest(".item[data-branch]");if(!t)return;const i=document.querySelector("#pull-target-branch"),n=i.getAttribute("data-basename"),s=t.getAttribute("data-branch"),l=i.getAttribute("data-branch");i.textContent=i.textContent.replace(`${n}:${l}`,`${n}:${s}`),i.setAttribute("data-branch",s)})}async function N0(e){const t=await ma(e.querySelector(".combo-markdown-editor")),i=document.querySelector("#status-button"),n=document.querySelector("#comment-button"),s=()=>{const l=t.value().trim(),u=t.isUploading();i&&(i.textContent=i.getAttribute(l?"data-status-and-comment":"data-status"),i.disabled=u),n&&(n.disabled=!l||u)};t.container.addEventListener(ha.EventUploadStateChanged,s),t.container.addEventListener(ha.EventEditorContentChanged,s),s()}function H0(e){const t=e.querySelectorAll(".combo-editor-dropzone"),i=async n=>{const s=n.querySelector(".form-field-real"),l=n.querySelector(".form-field-dropzone"),u=n.querySelector(".combo-markdown-editor"),m=await ma(u);m.container.addEventListener(ha.EventEditorContentChanged,()=>s.value=m.value()),s.addEventListener("focus",async()=>{(0,C.fi)(e.querySelectorAll(".combo-editor-dropzone .form-field-real")),(0,C.y9)(e.querySelectorAll(".combo-editor-dropzone .combo-markdown-editor")),(0,C.jB)(e,".combo-editor-dropzone .form-field-dropzone",y=>{const L=y.querySelector(".dropzone").dropzone.files.length!==0;(0,C.oi)(y,L)}),(0,C.y9)(s),(0,C.fi)(u),(0,C.fi)(l),await m.switchToUserPreference(),m.focus()})};for(const n of t)i(n)}function B0(){const e=document.querySelector(".comment.form");e&&(e.querySelector(".field.combo-editor-dropzone")?H0(e):e.querySelector(".combo-markdown-editor")&&N0(e),E0())}function $0(){_c("click","onRepoEllipsisButtonClick",async(e,t)=>{t.preventDefault();const i=e.getAttribute("aria-expanded")==="true";(0,C.oi)(e.parentElement.querySelector(".commit-body")),e.setAttribute("aria-expanded",String(!i))})}function U0(){Ha("initCommitStatuses",e=>{const t=e.nextElementSibling;if(!t.matches(".tippy-target"))throw new Error("Expected next element to be a tippy target");Ie(e,{content:t,placement:"bottom-start",interactive:!0,role:"dialog",theme:"box-with-header"})})}const{appSubUrl:ph}=window.config;function V0(){const e=document.querySelector("#manage_topic");if(!e)return;const t=document.querySelector("#topic_edit"),i=document.querySelector("#repo-topics"),n=t.querySelector(".ui.dropdown");let s;e.addEventListener("click",()=>{(0,C.y9)([i,e]),(0,C.fi)(t),n.querySelector("input.search").focus()}),document.querySelector("#cancel_topic_edit").addEventListener("click",()=>{s?.hideToast(),(0,C.y9)(t),(0,C.fi)([i,e]),e.focus()}),document.querySelector("#save_topic").addEventListener("click",async l=>{s?.hideToast();const u=t.querySelector("input[name=topics]").value,m=new FormData;m.append("topics",u);const y=await(0,Ae.LO)(l.target.getAttribute("data-link"),{data:m});if(y.ok){if((await y.json()).status==="ok"){if((0,C.xP)(i,".repo-topic",L=>L.remove()),u.length){const L=u.split(",");L.sort();for(const z of L){const X=document.createElement("a");X.classList.add("repo-topic","ui","large","label","gt-ellipsis"),X.href=`${ph}/explore/repos?q=${encodeURIComponent(z)}&topic=1`,X.textContent=z,i.append(X)}}(0,C.y9)(t),(0,C.fi)([i,e])}}else if(y.status===422){const A=await y.json();if(s=gt(A.message,{duration:5e3}),A.invalidTopics&&A.invalidTopics.length>0){const{invalidTopics:L}=A,z=(0,C.xP)(n,"a.ui.label");for(const[X,_e]of u.split(",").entries())L.includes(_e)&&(z[X].classList.remove("green"),z[X].classList.add("red"))}}}),(0,ke.mD)(n).dropdown({allowAdditions:!0,forceSelection:!1,fullTextSearch:"exact",fields:{name:"description",value:"data-value"},saveRemoteData:!1,label:{transition:"horizontal flip",duration:200,variation:!1},apiSettings:{url:`${ph}/explore/topics/search?q={query}`,throttle:500,cache:!1,onResponse(l){const u={success:!1,results:[]},m=(0,St.Kq)(this.urlData.query.trim());let y=!1;const A=[];for(const L of(0,C.xP)(n,"a.ui.label.visible"))A.push(L.getAttribute("data-value"));if(l.topics){let L=!1;for(const{topic_name:z}of l.topics)A.includes(z)||(z.toLowerCase()===m.toLowerCase()&&(y=!0),u.results.push({description:z,"data-value":z}),L=!0);u.success=L}return m.length>0&&!y?(u.success=!0,u.results.unshift({description:m,"data-value":m})):m.length>0&&y&&u.results.sort((L,z)=>L.description.toLowerCase()===m.toLowerCase()?-1:z.description.toLowerCase()===m.toLowerCase()?1:L.description>z.description?-1:L.description<z.description?1:0),u}},onLabelCreate(l){return l=l.toLowerCase().trim(),this.attr("data-value",l).contents().first().replaceWith(l),(0,ke.mD)(this)},onAdd(l,u,m){l=l.toLowerCase().trim(),m[0].setAttribute("data-value",l),m[0].setAttribute("data-text",l)}})}const{appSubUrl:W0}=window.config;function Qu(){Number(document.querySelector("#security_protocol")?.value)>0?(0,C.fi)(".has-tls"):(0,C.y9)(".has-tls")}function z0(){document.querySelector(".page-content.admin")&&(hf(),K0(),X0(),G0())}function K0(){document.querySelector(".page-content.admin.edit.user, .page-content.admin.new.user")&&document.querySelector("#login_type")?.addEventListener("change",function(){this.value?.startsWith("0")?(document.querySelector("#user_name")?.removeAttribute("disabled"),document.querySelector("#login_name")?.removeAttribute("required"),(0,C.y9)(".non-local"),(0,C.fi)(".local"),document.querySelector("#user_name")?.focus(),this.getAttribute("data-password")==="required"&&document.querySelector("#password")?.setAttribute("required","required")):(document.querySelector(".admin.edit.user")&&document.querySelector("#user_name")?.setAttribute("disabled","disabled"),document.querySelector("#login_name")?.setAttribute("required","required"),(0,C.fi)(".non-local"),(0,C.y9)(".local"),document.querySelector("#login_name")?.focus(),document.querySelector("#password")?.removeAttribute("required"))})}function X0(){const e=document.querySelector(".page-content.admin.authentication");if(!e)return;const t=e.classList.contains("new"),i=e.classList.contains("edit");if(!t&&!i)return;function n(){const L=document.querySelectorAll(".search-page-size");if(document.querySelector("#use_paged_search").checked){(0,C.fi)(".search-page-size");for(const z of L)z.querySelector("input")?.setAttribute("required","required")}else{(0,C.y9)(".search-page-size");for(const z of L)z.querySelector("input")?.removeAttribute("required")}}function s(L){(0,C.y9)(".open_id_connect_auto_discovery_url, .oauth2_use_custom_url");for(const X of document.querySelectorAll(".open_id_connect_auto_discovery_url input[required]"))X.removeAttribute("required");const z=document.querySelector("#oauth2_provider").value;switch(z){case"openidConnect":document.querySelector(".open_id_connect_auto_discovery_url input").setAttribute("required","required"),(0,C.fi)(".open_id_connect_auto_discovery_url");break;default:{const X=document.querySelector(`#${z}_customURLSettings`);if(!X)break;const _e=X.getAttribute("data-available")==="true",pe=X.getAttribute("data-required")==="true";_e&&(0,C.fi)(".oauth2_use_custom_url"),pe&&(document.querySelector("#oauth2_use_custom_url").checked=!0);break}}l(L)}function l(L){const z=document.querySelector("#oauth2_provider").value;(0,C.y9)(".oauth2_use_custom_url_field");for(const _e of document.querySelectorAll(".oauth2_use_custom_url_field input[required]"))_e.removeAttribute("required");if(document.querySelector(`#${z}_customURLSettings`)&&document.querySelector("#oauth2_use_custom_url").checked)for(const _e of["token_url","auth_url","profile_url","email_url","tenant"]){L&&(document.querySelector(`#oauth2_${_e}`).value=document.querySelector(`#${z}_${_e}`).value);const pe=document.querySelector(`#${z}_${_e}`);if(pe&&pe.getAttribute("data-available")==="true"){for(const de of document.querySelectorAll(`.oauth2_${_e} input`))de.setAttribute("required","required");(0,C.fi)(`.oauth2_${_e}`)}}}function u(){const L=document.querySelector(".js-ldap-group-toggle")?.checked;(0,C.oi)(document.querySelector("#ldap-group-options"),L)}const m=document.querySelector("#auth_type");if(t){const L=function(){(0,C.y9)(".ldap, .dldap, .smtp, .pam, .oauth2, .has-tls, .search-page-size, .sspi");for(const X of document.querySelectorAll(".ldap input[required], .binddnrequired input[required], .dldap input[required], .smtp input[required], .pam input[required], .oauth2 input[required], .has-tls input[required], .sspi input[required]"))X.removeAttribute("required");document.querySelector(".binddnrequired")?.classList.remove("required");const z=m.value;switch(z){case"2":(0,C.fi)(".ldap");for(const X of document.querySelectorAll(".binddnrequired input, .ldap div.required:not(.dldap) input"))X.setAttribute("required","required");document.querySelector(".binddnrequired")?.classList.add("required");break;case"3":(0,C.fi)(".smtp"),(0,C.fi)(".has-tls");for(const X of document.querySelectorAll(".smtp div.required input, .has-tls"))X.setAttribute("required","required");break;case"4":(0,C.fi)(".pam");for(const X of document.querySelectorAll(".pam input"))X.setAttribute("required","required");break;case"5":(0,C.fi)(".dldap");for(const X of document.querySelectorAll(".dldap div.required:not(.ldap) input"))X.setAttribute("required","required");break;case"6":(0,C.fi)(".oauth2");for(const X of document.querySelectorAll(".oauth2 div.required:not(.oauth2_use_custom_url,.oauth2_use_custom_url_field,.open_id_connect_auto_discovery_url) input"))X.setAttribute("required","required");s(!0);break;case"7":(0,C.fi)(".sspi");for(const X of document.querySelectorAll(".sspi div.required input"))X.setAttribute("required","required");break}(z==="2"||z==="5")&&(Qu(),u()),z==="2"&&n()};m.addEventListener("change",L),L(),document.querySelector("#security_protocol")?.addEventListener("change",Qu),document.querySelector("#use_paged_search")?.addEventListener("change",n),document.querySelector("#oauth2_provider")?.addEventListener("change",()=>s(!0)),document.querySelector("#oauth2_use_custom_url")?.addEventListener("change",()=>l(!0)),document.querySelector(".js-ldap-group-toggle").addEventListener("change",u)}if(i){const L=m.value;L==="2"||L==="5"?(document.querySelector("#security_protocol")?.addEventListener("change",Qu),document.querySelector(".js-ldap-group-toggle").addEventListener("change",u),u(),L==="2"&&document.querySelector("#use_paged_search")?.addEventListener("change",n)):L==="6"&&(document.querySelector("#oauth2_provider")?.addEventListener("change",()=>s(!0)),document.querySelector("#oauth2_use_custom_url")?.addEventListener("change",()=>l(!1)),s(!1))}const y=document.querySelector("#auth_name"),A=function(){document.querySelector("#oauth2-callback-url").textContent=`${window.location.origin}${W0}/user/oauth2/${encodeURIComponent(y.value)}/callback`};y.addEventListener("input",A),A()}function G0(){const e=document.querySelector(".page-content.admin.notice");if(!e)return;const t=document.querySelector("#detail-modal");(0,C.jB)(e,".view-detail",n=>n.addEventListener("click",s=>{s.preventDefault();const l=n.closest("tr").querySelector(".notice-description"),u=t.querySelector(".content pre");u.textContent=l.textContent,(0,ke.mD)(t).modal("show")}));const i=document.querySelectorAll(".select.table .ui.checkbox input");(0,C.jB)(e,".select.action",n=>n.addEventListener("click",()=>{switch(n.getAttribute("data-action")){case"select-all":for(const s of i)s.checked=!0;break;case"deselect-all":for(const s of i)s.checked=!1;break;case"inverse":for(const s of i)s.checked=!s.checked;break}})),document.querySelector("#delete-selection")?.addEventListener("click",async function(n){n.preventDefault(),this.classList.add("is-loading","disabled");const s=new FormData;for(const l of i)l.checked&&s.append("ids[]",l.closest(".ui.checkbox").getAttribute("data-id"));await(0,Ae.LO)(this.getAttribute("data-link"),{data:s}),window.location.href=this.getAttribute("data-redirect")})}function Q0(e){window.history.pushState?window.history.pushState(null,null,e):window.location.hash=e}function Yu(e){for(const pe of document.querySelectorAll(".code-view tr.active"))pe.classList.remove("active");const t=document.querySelectorAll(".code-view td.lines-num span[data-line-number]"),i=document.querySelector("a.ref-in-new-issue"),n=document.querySelector("a.copy-line-permalink"),s=document.querySelector("a.view_git_blame"),l=function(pe){if(!i)return;const de=i.getAttribute("data-url-issue-new"),Pe=i.getAttribute("data-url-param-body-link"),Le=`${(0,St.oK)(Pe)}#${pe}`;i.setAttribute("href",`${de}?body=${encodeURIComponent(Le)}`)},u=function(pe){if(!s)return;let de=s.getAttribute("href");de=`${de.replace(/#L\d+$|#L\d+-L\d+$/,"")}`,pe.length!==0&&(de=`${de}#${pe}`),s.setAttribute("href",de)},m=function(pe){if(!n)return;let de=n.getAttribute("data-url");de=`${de.replace(/#L\d+$|#L\d+-L\d+$/,"")}#${pe}`,n.setAttribute("data-clipboard-text",de),n.setAttribute("data-clipboard-text-type","url")},y=e?e.split("-"):[],A=y[0]??"";if(!A)return null;const L=y[1]||A;let z=parseInt(A.substring(1)),X=parseInt(L.substring(1));if(z>X){const pe=z;z=X,X=pe,e=`${L}-${A}`}const _e=t[z-1]??null;for(let pe=z-1;pe<=X-1&&pe<t.length;pe++)t[pe].closest("tr").classList.add("active");return Q0(`#${e}`),l(e),u(e),m(e),_e}function gh(){const e=document.querySelector(".code-line-menu");if(!e)return;for(const s of document.querySelectorAll(".code-line-button"))s.remove();const t=document.querySelector(".code-view tr.active");if(!t)return;const i=t.querySelector("td.lines-num"),n=document.createElement("button");n.classList.add("code-line-button","ui","basic","button"),n.innerHTML=(0,Z.JW)("octicon-kebab-horizontal"),i.prepend(n),n.closest(".code-view").append(e.cloneNode(!0)),Ie(n,{theme:"menu",trigger:"click",hideOnClick:!0,content:e,placement:"right-start",interactive:!0,onShow:s=>{s.popper.addEventListener("click",()=>{s.hide()},{once:!0})}})}function Y0(){if(!document.querySelector(".repo-view-container .file-view"))return;let e;(0,C.ny)(document,"click",".code-view .lines-num span",(i,n)=>{if(!e||!n.shiftKey)e=i.getAttribute("id"),Yu(e);else{const s=i.getAttribute("id");Yu(`${e}-${s}`)}window.getSelection().removeAllRanges(),gh()});const t=()=>{if(!window.location.hash||!document.querySelector(".code-view .lines-num"))return;const i=window.location.hash.substring(1),n=Yu(i);n&&(window.history.scrollRestoration!=="manual"&&(window.history.scrollRestoration="manual"),n.scrollIntoView({block:"start"}),gh())};t(),window.addEventListener("hashchange",t)}function J0(){document.querySelector("#ssh-key-content")?.addEventListener("input",function(){const e=this.value.split(" "),t=document.querySelector("#ssh-key-title");!t.value&&e.length===3&&e[2]!==""&&(t.value=e[2])})}function Z0(){if(!document.querySelector(".user.settings.profile"))return;const e=document.querySelector("#username");e&&e.addEventListener("input",function(){const t=document.querySelector("#name-change-prompt"),i=document.querySelector("#name-change-redirect-prompt");this.value.toLowerCase()!==this.getAttribute("data-name").toLowerCase()?((0,C.fi)(t),(0,C.fi)(i)):((0,C.y9)(t),(0,C.y9)(i))})}function ev(){const e=document.querySelector("#repo_migrating");if(!e)return;document.querySelector("#repo_migrating_retry")?.addEventListener("click",tv);const t=e.getAttribute("data-migrating-repo-link"),i=async()=>{const s=await(0,Ae.fG)(`${t}/-/migrate/status`);if(s.status!==200)return!0;const l=await s.json();return l.message&&(document.querySelector("#repo_migrating_progress_message").textContent=l.message),l.status===4?(window.location.reload(),!1):l.status===3?((0,C.y9)("#repo_migrating_progress"),(0,C.y9)("#repo_migrating"),(0,C.fi)("#repo_migrating_retry"),(0,C.fi)("#repo_migrating_failed"),(0,C.fi)("#repo_migrating_failed_image"),document.querySelector("#repo_migrating_failed_error").textContent=l.message,!1):!0},n=async()=>{let s=!0;try{s=await i()}finally{s&&setTimeout(n,2e3)}};n()}async function tv(e){await(0,Ae.LO)(e.target.getAttribute("data-migrating-task-retry-url")),window.location.reload()}const{pageData:Ju}=window.config;let Zu;function ed(){return Zu||(Zu=nv(Ju.DiffFileTree,Ju.FolderIcon,Ju.FolderOpenIcon)),Zu}function iv(e,t,i){const n=e.fullNameMap[t];if(n){n.IsViewed=i;for(let s=n.ParentEntry;s;s=s.ParentEntry)s.IsViewed=bh(s)}}function vh(e,t){if(e[t.FullName]=t,!!t.Children){t.IsViewed=bh(t);for(const i of t.Children)i.ParentEntry=t,vh(e,i)}}function nv(e,t,i){const n=(0,Re.Kh)({diffFileTree:e,folderIcon:t,folderOpenIcon:i,fileTreeIsVisible:!1,selectedItem:"",fullNameMap:{}});return vh(n.fullNameMap,e.TreeRoot),n}function bh(e){if(e.Children){let t=0;for(const i of e.Children)i.IsViewed&&t++;return t===e.Children.length}return e.IsViewed}const sv=["title"],rv=["innerHTML"],ov={class:"gt-ellipsis"},av={class:"sub-items"},lv=["title","href"],cv=["innerHTML"],uv={class:"gt-ellipsis tw-flex-1"};var dv=(0,c.pM)({__name:"DiffFileTreeItem",props:{item:{}},setup(e){const t=e,i=ed(),n=(0,Re.KR)(t.item.IsViewed);function s(l){const u={"":{name:"octicon-blocked",classes:["text","red"]},added:{name:"octicon-diff-added",classes:["text","green"]},modified:{name:"octicon-diff-modified",classes:["text","yellow"]},deleted:{name:"octicon-diff-removed",classes:["text","red"]},renamed:{name:"octicon-diff-renamed",classes:["text","teal"]},copied:{name:"octicon-diff-renamed",classes:["text","green"]},typechange:{name:"octicon-diff-modified",classes:["text","green"]}};return u[l]??u[""]}return(l,u)=>{const m=(0,c.g2)("DiffFileTreeItem",!0);return l.item.EntryMode==="tree"?((0,c.uX)(),(0,c.CE)(c.FK,{key:0},[(0,c.Lk)("div",{class:(0,W.C4)(["item-directory",{viewed:l.item.IsViewed}]),title:l.item.DisplayName,onClick:u[0]||(u[0]=Di(y=>n.value=!n.value,["stop"]))},[(0,c.Q3)(" directory "),(0,c.bF)((0,Re.R1)(Z.Ah),{name:n.value?"octicon-chevron-right":"octicon-chevron-down"},null,8,["name"]),(0,c.Q3)(" eslint-disable-next-line vue/no-v-html "),(0,c.Lk)("span",{class:"tw-contents",innerHTML:n.value?(0,Re.R1)(i).folderIcon:(0,Re.R1)(i).folderOpenIcon},null,8,rv),(0,c.Lk)("span",ov,(0,W.v_)(l.item.DisplayName),1)],10,sv),(0,c.bo)((0,c.Lk)("div",av,[((0,c.uX)(!0),(0,c.CE)(c.FK,null,(0,c.pI)(l.item.Children,y=>((0,c.uX)(),(0,c.Wv)(m,{key:y.DisplayName,item:y},null,8,["item"]))),128))],512),[[ti,!n.value]])],64)):((0,c.uX)(),(0,c.CE)("a",{key:1,class:(0,W.C4)(["item-file",{selected:(0,Re.R1)(i).selectedItem==="#diff-"+l.item.NameHash,viewed:l.item.IsViewed}]),title:l.item.DisplayName,href:"#diff-"+l.item.NameHash},[(0,c.Q3)(" file "),(0,c.Q3)(" eslint-disable-next-line vue/no-v-html "),(0,c.Lk)("span",{class:"tw-contents",innerHTML:l.item.FileIcon},null,8,cv),(0,c.Lk)("span",uv,(0,W.v_)(l.item.DisplayName),1),(0,c.bF)((0,Re.R1)(Z.Ah),{name:s(l.item.DiffStatus).name,class:(0,W.C4)(s(l.item.DiffStatus).classes)},null,8,["name","class"])],10,lv))}}}),fv=(0,Xi.A)(dv,[["__scopeId","data-v-a138c97c"]]);const hv={key:0,class:"diff-file-tree-items"},_h="diff_file_tree_visible";var mv=(0,c.pM)({__name:"DiffFileTree",setup(e){const t=ed();(0,c.sV)(()=>{t.fileTreeIsVisible=localStorage.getItem(_h)!=="false",document.querySelector(".diff-toggle-file-tree-button").addEventListener("click",s),i(),window.addEventListener("hashchange",i)}),(0,c.hi)(()=>{document.querySelector(".diff-toggle-file-tree-button").removeEventListener("click",s),window.removeEventListener("hashchange",i)});function i(){t.selectedItem=window.location.hash,n()}function n(){if(t.selectedItem){const m=document.querySelector(t.selectedItem);m?.getAttribute("data-folded")==="true"&&Ba(m,m.querySelector(".fold-file"),!1)}}function s(){l(!t.fileTreeIsVisible)}function l(m){t.fileTreeIsVisible=m,localStorage.setItem(_h,t.fileTreeIsVisible.toString()),u(t.fileTreeIsVisible)}function u(m){const y=document.querySelector(".diff-toggle-file-tree-button"),[A,L]=y.querySelectorAll(".icon"),z=document.querySelector("#diff-file-tree"),X=y.getAttribute(m?"data-hide-text":"data-show-text");y.setAttribute("data-tooltip-content",X),(0,C.oi)(z,m),(0,C.oi)(A,!m),(0,C.oi)(L,m)}return(m,y)=>(0,Re.R1)(t).fileTreeIsVisible?((0,c.uX)(),(0,c.CE)("div",hv,[(0,c.Q3)(" only render the tree if we're visible. in many cases this is something that doesn't change very often "),((0,c.uX)(!0),(0,c.CE)(c.FK,null,(0,c.pI)((0,Re.R1)(t).diffFileTree.TreeRoot.Children,A=>((0,c.uX)(),(0,c.Wv)(fv,{key:A.FullName,item:A},null,8,["item"]))),128))])):(0,c.Q3)("v-if",!0)}}),pv=(0,Xi.A)(mv,[["__scopeId","data-v-12a35ef6"]]);function gv(){const e=document.querySelector("#diff-file-tree");if(!e)return;Ai(pv).mount(e)}const vv={class:"ui scrolling dropdown custom diff-commit-selector"},bv=["data-tooltip-content","aria-label","aria-controls","aria-activedescendant"],_v=["id","aria-expanded"],yv={key:0,class:"loading-indicator is-loading"},wv=["id"],Sv={class:"gt-ellipsis"},xv={class:"gt-ellipsis text light-2 tw-mb-0"},jv={class:"gt-ellipsis"},Ev={class:"gt-ellipsis text light-2"},Av={key:3,class:"info text light-2"},Cv=["data-commit-idx","onKeydown","onMouseover","onClick"],kv={class:"tw-flex-1 tw-flex tw-flex-col tw-gap-1"},Tv={class:"gt-ellipsis commit-list-summary"},Lv={class:"gt-ellipsis text light-2"},Rv={class:"text right"},Mv=["datetime"],Dv={class:"tw-font-mono"};function Ov(e,t,i,n,s,l){const u=(0,c.g2)("svg-icon");return(0,c.uX)(),(0,c.CE)("div",vv,[(0,c.Lk)("button",{ref:"expandBtn",class:"ui tiny basic button",onClick:t[0]||(t[0]=Di(m=>e.toggleMenu(),["stop"])),"data-tooltip-content":e.locale.filter_changes_by_commit,"aria-haspopup":"true","aria-label":e.locale.filter_changes_by_commit,"aria-controls":e.uniqueIdMenu,"aria-activedescendant":e.uniqueIdShowAll},[(0,c.bF)(u,{name:"octicon-git-commit"})],8,bv),(0,c.Q3)(' this dropdown is not managed by Fomantic UI, so it needs some classes like "transition" explicitly '),(0,c.bo)((0,c.Lk)("div",{class:(0,W.C4)(["left menu transition",{visible:e.menuVisible}]),id:e.uniqueIdMenu,"aria-expanded":e.menuVisible?"true":"false"},[e.isLoading?((0,c.uX)(),(0,c.CE)("div",yv)):(0,c.Q3)("v-if",!0),e.isLoading?(0,c.Q3)("v-if",!0):((0,c.uX)(),(0,c.CE)("div",{key:1,class:"item",id:e.uniqueIdShowAll,ref:"showAllChanges",role:"menuitem",onKeydown:t[1]||(t[1]=se(m=>e.showAllChanges(),["enter"])),onClick:t[2]||(t[2]=m=>e.showAllChanges())},[(0,c.Lk)("div",Sv,(0,W.v_)(e.locale.show_all_commits),1),(0,c.Lk)("div",xv,(0,W.v_)(e.locale.stats_num_commits),1)],40,wv)),(0,c.Q3)(" only show the show changes since last review if there is a review AND we are commits ahead of the last review "),e.lastReviewCommitSha!=null?((0,c.uX)(),(0,c.CE)("div",{key:2,class:(0,W.C4)(["item",{disabled:!e.commitsSinceLastReview}]),role:"menuitem",onKeydown:t[3]||(t[3]=se(m=>e.changesSinceLastReviewClick(),["enter"])),onClick:t[4]||(t[4]=m=>e.changesSinceLastReviewClick())},[(0,c.Lk)("div",jv,(0,W.v_)(e.locale.show_changes_since_your_last_review),1),(0,c.Lk)("div",Ev,(0,W.v_)(e.commitsSinceLastReview)+" commits ",1)],34)):(0,c.Q3)("v-if",!0),e.isLoading?(0,c.Q3)("v-if",!0):((0,c.uX)(),(0,c.CE)("span",Av,(0,W.v_)(e.locale.select_commit_hold_shift_for_range),1)),((0,c.uX)(!0),(0,c.CE)(c.FK,null,(0,c.pI)(e.commits,(m,y)=>((0,c.uX)(),(0,c.CE)("div",{key:m.id,class:(0,W.C4)(["item",{selected:m.selected,hovered:m.hovered}]),role:"menuitem","data-commit-idx":y,onKeydown:[se(Di(A=>e.commitClicked(m.id),["exact"]),["enter"]),se(Di(A=>e.commitClickedShift(m),["shift","exact"]),["enter"])],onMouseover:Di(A=>e.highlight(m),["shift"]),onClick:[Di(A=>e.commitClicked(m.id),["exact"]),Di(A=>e.commitClicked(m.id,!0),["ctrl","exact"]),Di(A=>e.commitClicked(m.id,!0),["meta","exact"]),Di(A=>e.commitClickedShift(m),["shift","exact","stop","prevent"])]},[(0,c.Lk)("div",kv,[(0,c.Lk)("div",Tv,(0,W.v_)(m.summary),1),(0,c.Lk)("div",Lv,[(0,c.eW)((0,W.v_)(m.committer_or_author_name)+" ",1),(0,c.Lk)("span",Rv,[(0,c.Q3)(" TODO: make this respect the PreferredTimestampTense setting "),(0,c.Lk)("relative-time",{prefix:"",datetime:m.time,"data-tooltip-content":"","data-tooltip-interactive":"true"},(0,W.v_)(m.time),9,Mv)])])]),(0,c.Lk)("div",Dv,(0,W.v_)(m.short_sha),1)],42,Cv))),128))],10,_v),[[ti,e.menuVisible]])])}var qv=(0,c.pM)({components:{SvgIcon:Z.Ah},data:()=>{const e=document.querySelector("#diff-commit-select");return{menuVisible:!1,isLoading:!1,queryParams:e.getAttribute("data-queryparams"),issueLink:e.getAttribute("data-issuelink"),locale:{filter_changes_by_commit:e.getAttribute("data-filter_changes_by_commit")},mergeBase:e.getAttribute("data-merge-base"),commits:[],hoverActivated:!1,lastReviewCommitSha:"",uniqueIdMenu:(0,ke.Ae)(),uniqueIdShowAll:(0,ke.Ae)()}},computed:{commitsSinceLastReview(){return this.lastReviewCommitSha?this.commits.length-this.commits.findIndex(e=>e.id===this.lastReviewCommitSha)-1:0}},mounted(){document.body.addEventListener("click",this.onBodyClick),this.$el.addEventListener("keydown",this.onKeyDown),this.$el.addEventListener("keyup",this.onKeyUp)},unmounted(){document.body.removeEventListener("click",this.onBodyClick),this.$el.removeEventListener("keydown",this.onKeyDown),this.$el.removeEventListener("keyup",this.onKeyUp)},methods:{onBodyClick(e){this.$el.contains(e.target)||this.menuVisible&&this.toggleMenu()},onKeyDown(e){if(!this.menuVisible)return;const t=document.activeElement;if(this.$el.contains(t)){switch(e.key){case"ArrowDown":e.preventDefault(),this.focusElem(t.nextElementSibling,t);break;case"ArrowUp":e.preventDefault(),this.focusElem(t.previousElementSibling,t);break;case"Escape":e.preventDefault(),t.tabIndex=-1,this.toggleMenu();break}if(e.key==="ArrowDown"||e.key==="ArrowUp"){const i=document.activeElement,n=i?.matches(".item")?i.getAttribute("data-commit-idx"):null;n&&this.highlight(this.commits[Number(n)])}}},onKeyUp(e){if(!this.menuVisible)return;const t=document.activeElement;if(this.$el.contains(t)&&e.key==="Shift"&&this.hoverActivated){this.hoverActivated=!1;for(const i of this.commits)i.hovered=!1,i.selected=!1}},highlight(e){if(!this.hoverActivated)return;const t=this.commits.findIndex(n=>n.selected),i=this.commits.findIndex(n=>n.id===e.id);for(const[n,s]of this.commits.entries())s.hovered=Math.min(t,i)<=n&&n<=Math.max(t,i)},focusElem(e,t){e&&(e.tabIndex=0,t&&(t.tabIndex=-1),e.focus())},async toggleMenu(){if(this.menuVisible=!this.menuVisible,!this.commits.length&&this.menuVisible&&!this.isLoading){this.isLoading=!0;try{await this.fetchCommits()}finally{this.isLoading=!1}}this.$nextTick(()=>{this.menuVisible?this.focusElem(this.$refs.showAllChanges,this.$refs.expandBtn):this.focusElem(this.$refs.expandBtn,this.$refs.showAllChanges)})},async fetchCommits(){const t=await(await(0,Ae.fG)(`${this.issueLink}/commits/list`)).json();this.commits.push(...t.commits.map(i=>(i.hovered=!1,i))),this.commits.reverse(),this.lastReviewCommitSha=t.last_review_commit_sha||null,this.lastReviewCommitSha&&!this.commits.some(i=>i.id===this.lastReviewCommitSha)&&(this.lastReviewCommitSha=null),Object.assign(this.locale,t.locale)},showAllChanges(){window.location.assign(`${this.issueLink}/files${this.queryParams}`)},changesSinceLastReviewClick(){window.location.assign(`${this.issueLink}/files/${this.lastReviewCommitSha}..${this.commits.at(-1).id}${this.queryParams}`)},commitClicked(e,t=!1){const i=`${this.issueLink}/commits/${e}${this.queryParams}`;t?window.open(i):window.location.assign(i)},commitClickedShift(e){if(this.hoverActivated=!this.hoverActivated,e.selected=!0,!this.hoverActivated){const t=this.commits.findIndex(l=>l.selected),i=this.commits.findLastIndex(l=>l.selected);let n;t===0?n=this.mergeBase:n=this.commits[t-1].id;const s=this.commits[i].id;t===i?window.location.assign(`${this.issueLink}/commits/${s}${this.queryParams}`):n===this.mergeBase&&s===this.commits.at(-1).id?window.location.assign(`${this.issueLink}/files${this.queryParams}`):window.location.assign(`${this.issueLink}/files/${n}..${s}${this.queryParams}`)}}}}),Pv=(0,Xi.A)(qv,[["render",Ov],["__scopeId","data-v-c589fa0e"]]);function Fv(){const e=document.querySelector("#diff-commit-select");if(!e)return;Ai(Pv).mount(e)}const{pageData:Iv}=window.config,Ua=Iv.prReview||{},yh="viewed-file-checked-form",wh=".viewed-file-form",Nv="#expand-files-btn",Hv="#collapse-files-btn";function Sh(){document.querySelector("#viewed-files-summary")?.setAttribute("value",Ua.numberOfViewedFiles);const t=document.querySelector("#viewed-files-summary-label");t&&(t.innerHTML=t.getAttribute("data-text-changed-template").replace("%[1]d",Ua.numberOfViewedFiles).replace("%[2]d",Ua.numberOfFiles))}function Bv(){Ua.numberOfViewedFiles=document.querySelectorAll(`${wh} > input[type=checkbox][checked]`).length,Sh()}function xh(){for(const e of document.querySelectorAll(`${wh}:not([data-has-viewed-checkbox-listener="true"])`)){e.setAttribute("data-has-viewed-checkbox-listener",String(!0));const t=e.querySelector("input[type=checkbox]");t.addEventListener("input",function(){this.checked?(e.classList.add(yh),t.setAttribute("checked",""),Ua.numberOfViewedFiles++):(e.classList.remove(yh),t.removeAttribute("checked"),Ua.numberOfViewedFiles--),Sh(),e.parentNode.querySelector(".changed-since-last-review")?.remove();const n=t.getAttribute("name");iv(ed(),n,this.checked);const s={};s[n]=this.checked;const l={files:s},u=e.getAttribute("data-headcommit");u&&(l.headCommitSHA=u),(0,Ae.LO)(e.getAttribute("data-link"),{data:l});const m=e.closest(".diff-file-header");Ba(m.closest(".file-content"),m.querySelector(".fold-file"),this.checked)})}}function $v(){document.querySelector(Nv)?.addEventListener("click",()=>{for(const e of document.querySelectorAll('.file-content[data-folded="true"]'))Ba(e,e.querySelector(".fold-file"),!1)}),document.querySelector(Hv)?.addEventListener("click",()=>{for(const e of document.querySelectorAll('.file-content:not([data-folded="true"])'))e.getAttribute("id")!=="diff-incomplete"&&Ba(e,e.querySelector(".fold-file"),!0)})}const{i18n:Uv}=window.config;function Vv(e){(0,C.jB)(e,".file-view-toggle",t=>t.addEventListener("click",()=>{(0,C.D6)(t,".file-view-toggle",n=>n.classList.remove("active")),t.classList.add("active");const i=document.querySelector(t.getAttribute("data-toggle-selector"));if(!i)throw new Error("Target element not found");(0,C.y9)((0,C.D6)(i)),(0,C.fi)(i)}))}function Wv(){(0,C.ny)(document,"submit",".conversation-holder form",async(e,t)=>{t.preventDefault();const i=e.querySelector("textarea");if(hh(i)&&!e.classList.contains("is-loading"))try{e.classList.add("is-loading");const n=new FormData(e),s=(0,C.IU)(t);(s?.nodeName==="BUTTON"||s?.nodeName==="INPUT"&&s.type==="submit")&&s.name&&n.append(s.name,s.value);const u=e.closest("tr")?.getAttribute("data-line-type"),m=await(0,Ae.LO)(e.getAttribute("action"),{data:n}),y=(0,C.SL)(await m.text()),A=y.getAttribute("data-path"),L=y.getAttribute("data-side"),z=y.getAttribute("data-idx");if(e.closest(".conversation-holder").replaceWith(y),e=null,u){let X;u==="same"?X=`[data-path="${A}"] .add-code-comment[data-idx="${z}"]`:X=`[data-path="${A}"] .add-code-comment[data-side="${L}"][data-idx="${z}"]`;for(const _e of document.querySelectorAll(X))_e.classList.add("tw-invisible")}if(!s||s?.matches('button[name="pending_review"]')){const X=document.querySelector("#review-box"),_e=X?.querySelector(".review-comments-counter");if(!_e)return;const pe=parseInt(_e.getAttribute("data-pending-comment-number"))+1||1;_e.setAttribute("data-pending-comment-number",String(pe)),_e.textContent=String(pe),(0,C.b7)(X,"pulse-1p5-200")}}catch(n){console.error("Error:",n),gt(Uv.network_error)}finally{e?.classList.remove("is-loading")}}),(0,C.ny)(document,"click",".resolve-conversation",async(e,t)=>{t.preventDefault();const i=e.getAttribute("data-comment-id"),n=e.getAttribute("data-origin"),s=e.getAttribute("data-action"),l=e.getAttribute("data-update-url");try{const m=await(await(0,Ae.LO)(l,{data:new URLSearchParams({origin:n,action:s,comment_id:i})})).text(),y=e.closest(".conversation-holder");if(y){const A=(0,C.SL)(m);y.replaceWith(A)}else window.location.reload()}catch(u){console.error("Error:",u)}})}function zv(){(0,C.ny)(document,"click",".previous-conversation, .next-conversation",(e,t)=>{t.preventDefault();const i=e.matches(".previous-conversation"),n=e.closest(".comment-code-cloud"),s=document.querySelectorAll(".comment-code-cloud:not(.tw-hidden)"),l=Array.from(s).indexOf(n),u=l>0?l-1:s.length-1,m=l<s.length-1?l+1:0,L=s[i?u:m].querySelector(".comment").id;window.location.href=`#${L}`})}function jh(){for(const e of document.querySelectorAll(".diff-header-popup-btn:not([data-header-popup-initialized])")){e.setAttribute("data-header-popup-initialized","");const t=e.nextElementSibling;if(!t?.matches(".tippy-target"))throw new Error("Popup element not found");Ie(e,{content:t,theme:"menu",placement:"bottom",trigger:"click",interactive:!0,hideOnClick:!0})}}function Eh(){tf(),xh(),Bv(),Ld(),jh()}async function Ah(e){if(e.classList.contains("disabled"))return!1;e.classList.add("disabled");const t=e.getAttribute("data-href");try{const n=await(await(0,Ae.fG)(t)).text(),l=(0,St.a8)(n,"text/html").querySelector("#diff-file-boxes");return document.querySelector("#diff-incomplete").replaceWith(...Array.from(l.children)),Eh(),!0}catch(i){console.error("Error:",i),gt("An error occurred while loading more files.")}finally{e.classList.remove("disabled")}return!1}function Kv(){(0,C.ny)(document,"click","a#diff-show-more-files",(e,t)=>{t.preventDefault(),Ah(e)}),(0,C.ny)(document,"click","a.diff-load-button",async(e,t)=>{if(t.preventDefault(),e.classList.contains("disabled"))return;e.classList.add("disabled");const i=e.getAttribute("data-href");try{const s=await(await(0,Ae.fG)(i)).text(),u=(0,St.a8)(s,"text/html").querySelector("#diff-file-boxes .diff-file-body .file-body"),m=Array.from(u.children);e.parentElement.replaceWith(...m);for(const y of m)window.htmx.process(y);Eh()}catch(n){console.error("Error:",n)}finally{e.classList.remove("disabled")}})}async function Ch(){const e=window.location.hash;if(!(!e.startsWith("#diff-")&&!e.startsWith("#issuecomment-")))for(;;){const t=document.getElementById(e.substring(1));if(t){t.scrollIntoView();return}const i=document.querySelector("#diff-show-more-files");if(!i||!await Ah(i))return}}function Xv(){window.addEventListener("hashchange",Ch),Ch()}function Gv(){Wv(),document.querySelector("#diff-file-boxes")&&(zv(),gv(),Fv(),Kv(),jh(),xh(),$v(),Xv(),yc("#diff-file-boxes .diff-file-box",Vv),(0,C.ny)(document,"click",".fold-file",e=>{ng(e.closest(".file-content"),e)}))}const{appSubUrl:Qv}=window.config;function Yv(){const e=document.querySelector(".page-content.organization.new.team");e&&(0,C.jB)(e,"input[name=permission]",t=>t.addEventListener("change",()=>{const i=e.querySelector("input[name=permission]:checked")?.value;(0,C.oi)(e.querySelectorAll(".team-units"),i!=="admin")}))}function Jv(){const e=(0,ke.mD)("#search-repo-box");e.search({minCharacters:2,apiSettings:{url:`${Qv}/repo/search?q={query}&uid=${e.data("uid")}`,onResponse(t){const i=[];for(const n of t.data)i.push({title:n.repository.full_name.split("/")[1],description:n.repository.full_name});return{results:i}}},searchFields:["full_name"],showNoResults:!1})}function Zv(){document.querySelector(".page-content.organization")&&(Yv(),Jv())}const{appSubUrl:Mo}=window.config;async function eb(){const e=document.querySelector(".user.signin.webauthn-prompt"),t=document.querySelector(".signin-passkey");if(!(!e&&!t)){if(!window.isSecureContext){(0,C.y9)(t);return}Th()&&(t&&t.addEventListener("click",tb),e&&ib())}}async function tb(){const e=await(0,Ae.fG)(`${Mo}/user/webauthn/passkey/assertion`);if(!e.ok){Ds("unknown");return}const t=await e.json();t.publicKey.challenge=(0,St.vd)(t.publicKey.challenge);for(const i of t.publicKey.allowCredentials??[])i.id=(0,St.vd)(i.id);try{const i=await navigator.credentials.get({publicKey:t.publicKey}),n=i.response,s=new Uint8Array(n.authenticatorData),l=new Uint8Array(n.clientDataJSON),u=new Uint8Array(i.rawId),m=new Uint8Array(n.signature),y=new Uint8Array(n.userHandle),A=await(0,Ae.LO)(`${Mo}/user/webauthn/passkey/login`,{data:{id:i.id,rawId:(0,St.vh)(u),type:i.type,clientExtensionResults:i.getClientExtensionResults(),response:{authenticatorData:(0,St.vh)(s),clientDataJSON:(0,St.vh)(l),signature:(0,St.vh)(m),userHandle:(0,St.vh)(y)}}});if(A.status===500){Ds("unknown");return}else if(!A.ok){Ds("unable-to-process");return}const L=await A.json();window.location.href=L?.redirect??`${Mo}/`}catch(i){Ds("general",i.message)}}async function ib(){const e=await(0,Ae.fG)(`${Mo}/user/webauthn/assertion`);if(!e.ok){Ds("unknown");return}const t=await e.json();t.publicKey.challenge=(0,St.vd)(t.publicKey.challenge);for(const i of t.publicKey.allowCredentials??[])i.id=(0,St.vd)(i.id);try{const i=await navigator.credentials.get({publicKey:t.publicKey});await kh(i)}catch(i){if(!t.publicKey.extensions?.appid){Ds("general",i.message);return}delete t.publicKey.extensions.appid;try{const n=await navigator.credentials.get({publicKey:t.publicKey});await kh(n)}catch(n){Ds("general",n.message)}}}async function kh(e){const t=new Uint8Array(e.response.authenticatorData),i=new Uint8Array(e.response.clientDataJSON),n=new Uint8Array(e.rawId),s=new Uint8Array(e.response.signature),l=new Uint8Array(e.response.userHandle),u=await(0,Ae.LO)(`${Mo}/user/webauthn/assertion`,{data:{id:e.id,rawId:(0,St.vh)(n),type:e.type,clientExtensionResults:e.getClientExtensionResults(),response:{authenticatorData:(0,St.vh)(t),clientDataJSON:(0,St.vh)(i),signature:(0,St.vh)(s),userHandle:(0,St.vh)(l)}}});if(u.status===500){Ds("unknown");return}else if(!u.ok){Ds("unable-to-process");return}const m=await u.json();window.location.href=m?.redirect??`${Mo}/`}async function nb(e){const t=new Uint8Array(e.response.attestationObject),i=new Uint8Array(e.response.clientDataJSON),n=new Uint8Array(e.rawId),s=await(0,Ae.LO)(`${Mo}/user/settings/security/webauthn/register`,{data:{id:e.id,rawId:(0,St.vh)(n),type:e.type,response:{attestationObject:(0,St.vh)(t),clientDataJSON:(0,St.vh)(i)}}});if(s.status===409){Ds("duplicated");return}else if(s.status!==201){Ds("unknown");return}window.location.reload()}function Ds(e,t=""){const i=document.querySelector("#webauthn-error-msg");if(e==="general")i.textContent=t||"unknown error";else{const n=document.querySelector(`#webauthn-error [data-webauthn-error-msg=${e}]`);n?i.textContent=`${n.textContent}${t?` ${t}`:""}`:i.textContent=`unknown error type: ${e}${t?` ${t}`:""}`}(0,C.fi)("#webauthn-error")}function Th(){return window.isSecureContext?typeof window.PublicKeyCredential!="function"?(Ds("browser"),!1):!0:(Ds("insecure"),!1)}function sb(){const e=document.querySelector("#register-webauthn");if(e){if(!Th()){e.disabled=!0;return}e.addEventListener("click",async t=>{t.preventDefault(),await rb()})}}async function rb(){const e=document.querySelector("#nickname"),t=new FormData;t.append("name",e.value);const i=await(0,Ae.LO)(`${Mo}/user/settings/security/webauthn/request_register`,{data:t});if(i.status===409){Ds("duplicated");return}else if(!i.ok){Ds("unknown");return}const n=await i.json();if(e.closest("div.field").classList.remove("error"),n.publicKey.challenge=(0,St.vd)(n.publicKey.challenge),n.publicKey.user.id=(0,St.vd)(n.publicKey.user.id),n.publicKey.excludeCredentials)for(const s of n.publicKey.excludeCredentials)s.id=(0,St.vd)(s.id);try{const s=await navigator.credentials.create({publicKey:n.publicKey});await nb(s)}catch(s){Ds("unknown",s)}}function ob(){document.addEventListener("click",e=>{if(e.target.matches(".remove-rel-attach")){const t=e.target.getAttribute("data-uuid"),i=e.target.getAttribute("data-id");document.querySelector(`input[name='attachment-del-${t}']`).value="true",(0,C.y9)(`#attachment-${i}`)}})}function ab(){document.querySelector(".repository.new.release")&&lb()}function lb(){const e=document.querySelector("#tag-name-editor");if(!e)return;const t=JSON.parse(e.getAttribute("data-existing-tags"));if(!Array.isArray(t))return;const i=e.getAttribute("data-tag-helper"),n=e.getAttribute("data-tag-helper-new"),s=e.getAttribute("data-tag-helper-existing"),l=document.querySelector("#tag-name"),u=function(m){const y=m.value,A=document.querySelector("#tag-helper");t.includes(y)?((0,C.y9)("#tag-target-selector"),A.textContent=s):((0,C.fi)("#tag-target-selector"),A.textContent=y?n:i)};u(l),l.addEventListener("input",m=>{u(m.target)})}const{appSubUrl:cb}=window.config,ub=/^\S+@\S+$/;function db(){const e=document.querySelector("#search-user-box");if(!e)return;const t=e.getAttribute("data-allow-email")==="true",i=e.getAttribute("data-allow-email-description")??void 0;(0,ke.mD)(e).search({minCharacters:2,apiSettings:{url:`${cb}/user/search_candidates?q={query}`,onResponse(n){const s=[],l=e.querySelector("input").value,u=l.toUpperCase();for(const m of n.data){const y={title:m.login,image:m.avatar_url,description:R(m.full_name)};u===m.login.toUpperCase()?s.unshift(y):s.push(y)}if(t&&!s.length&&ub.test(l)){const m={title:l,description:i};s.push(m)}return{results:s}}},searchFields:["login","full_name"],showNoResults:!1})}function fb(){const e=document.querySelector(".page-content.install");e&&(e.classList.contains("post-install")?mb():hb())}function hb(){const e="gitea",t="gitea",i={mysql:"127.0.0.1:3306",postgres:"127.0.0.1:5432",mssql:"127.0.0.1:1433"},n=document.querySelector("#db_host"),s=document.querySelector("#db_user"),l=document.querySelector("#db_name");document.querySelector("#db_type").addEventListener("change",function(){const y=this.value;if((0,C.y9)("div[data-db-setting-for]"),(0,C.fi)(`div[data-db-setting-for=${y}]`),y!=="sqlite3"){(0,C.fi)("div[data-db-setting-for=common-host]");const A=n.value;(!A||Object.values(i).includes(A))&&(n.value=i[y]??""),!s.value&&!l.value&&(s.value=e,l.value=t)}}),document.querySelector("#db_type").dispatchEvent(new Event("change"));const u=document.querySelector("#app_url");u.value.includes("://localhost")&&(u.value=window.location.href);const m=document.querySelector("#domain");m.value.trim()==="localhost"&&(m.value=window.location.hostname),document.querySelector("#offline-mode input").addEventListener("change",function(){this.checked&&(document.querySelector("#disable-gravatar input").checked=!0,document.querySelector("#federated-avatar-lookup input").checked=!1)}),document.querySelector("#disable-gravatar input").addEventListener("change",function(){this.checked?document.querySelector("#federated-avatar-lookup input").checked=!1:document.querySelector("#offline-mode input").checked=!1}),document.querySelector("#federated-avatar-lookup input").addEventListener("change",function(){this.checked&&(document.querySelector("#disable-gravatar input").checked=!1,document.querySelector("#offline-mode input").checked=!1)}),document.querySelector("#enable-openid-signin input").addEventListener("change",function(){this.checked?document.querySelector("#disable-registration input").checked||(document.querySelector("#enable-openid-signup input").checked=!0):document.querySelector("#enable-openid-signup input").checked=!1}),document.querySelector("#disable-registration input").addEventListener("change",function(){this.checked?(document.querySelector("#enable-captcha input").checked=!1,document.querySelector("#enable-openid-signup input").checked=!1):document.querySelector("#enable-openid-signup input").checked=!0}),document.querySelector("#enable-captcha input").addEventListener("change",function(){this.checked&&(document.querySelector("#disable-registration input").checked=!1)})}function mb(){const e=document.querySelector("#goto-user-login");if(!e)return;const t=e.getAttribute("href");let i=setInterval(async()=>{try{const n=await(0,Ae.fG)(t);i&&n.status===200&&(clearInterval(i),i=null,window.location.href=t)}catch{}},1e3)}function pb(){if(!document.querySelectorAll(".new.webhook").length)return;for(const t of document.querySelectorAll(".events.checkbox input"))t.addEventListener("change",function(){this.checked&&(0,C.fi)(".events.fields")});for(const t of document.querySelectorAll(".non-events.checkbox input"))t.addEventListener("change",function(){this.checked&&(0,C.y9)(".events.fields")});const e=document.querySelector("#http_method");if(e){const t=function(){const i=e.value==="POST";(0,C.oi)(document.querySelector("#content_type").closest(".field"),i)};t(),e.addEventListener("change",t)}document.querySelector("#test-delivery")?.addEventListener("click",async function(){this.classList.add("is-loading","disabled"),await(0,Ae.LO)(this.getAttribute("data-link")),setTimeout(()=>{window.location.href=this.getAttribute("data-redirect")},5e3)})}function gb(){vb(),bb()}function vb(){for(const e of document.querySelectorAll(".show-create-branch-modal"))e.addEventListener("click",()=>{const t=e.getAttribute("data-modal-form")||"#create-branch-form",i=document.querySelector(t);if(!i)return;i.action=`${i.getAttribute("data-base-action")}${e.getAttribute("data-branch-from-urlcomponent")}`;const n=e.getAttribute("data-modal-from-span")||"#modal-create-branch-from-span";document.querySelector(n).textContent=e.getAttribute("data-branch-from"),(0,ke.mD)(e.getAttribute("data-modal")).modal("show")})}function bb(){for(const e of document.querySelectorAll(".show-rename-branch-modal"))e.addEventListener("click",()=>{const t=e.getAttribute("data-modal"),i=document.querySelector(t),n=e.getAttribute("data-old-branch-name");i.querySelector("input[name=from]").value=n;const s=i.querySelector(".default-branch-warning");(0,C.oi)(s,e.getAttribute("data-is-default-branch")==="true");const l=i.querySelector("[data-rename-branch-to]");l.textContent=l.getAttribute("data-rename-branch-to").replace("%s",n)})}function _b(e){return/.*[^/]\/[^/].*/.test(e)}function Lh(e){const t=document.querySelector(e);if(!t)return;const i=t.querySelector("#issue-label-edit-modal");if(!i)return;const n=i.querySelector('input[name="id"]'),s=i.querySelector(".label-name-input"),l=i.querySelector(".label-exclusive-input-field"),u=i.querySelector(".label-exclusive-input"),m=i.querySelector(".label-exclusive-warning"),y=i.querySelector(".label-exclusive-order-input-field"),A=i.querySelector(".label-exclusive-order-input"),L=i.querySelector(".label-is-archived-input-field"),z=i.querySelector(".label-is-archived-input"),X=i.querySelector(".label-desc-input"),_e=i.querySelector(".js-color-picker-input input"),pe=()=>{const Te=_b(s.value);l.classList.toggle("disabled",!Te);const He=Te&&u.checked&&i.hasAttribute("data-need-warn-exclusive");(0,C.oi)(m,He),Te||(u.checked=!1),(0,C.oi)(y,u.checked),parseInt(A.value)<=0?A.style.color="var(--color-placeholder-text) !important":A.style.color=null},de=Te=>{const He=i.querySelector("form");n.value=Te.getAttribute("data-label-id")||"",s.value=Te.getAttribute("data-label-name")||"",A.value=Te.getAttribute("data-label-exclusive-order")||"0",z.checked=Te.getAttribute("data-label-is-archived")==="true",u.checked=Te.getAttribute("data-label-exclusive")==="true",X.value=Te.getAttribute("data-label-description")||"",_e.value=Te.getAttribute("data-label-color")||"",_e.dispatchEvent(new Event("input",{bubbles:!0}));const U=!!n.value,Se=parseInt(Te.getAttribute("data-label-num-issues")||"0");i.toggleAttribute("data-need-warn-exclusive",!u.checked&&Se>0),i.querySelector(".header").textContent=U?i.getAttribute("data-text-edit-label"):i.getAttribute("data-text-new-label");const ze=i.getAttribute("data-current-page-link");He.action=U?`${ze}/edit`:`${ze}/new`,(0,C.oi)(L,U),pe(),(0,ke.mD)(i).modal({onApprove(){if(!He.checkValidity())return He.reportValidity(),!1;He.submit()}}).modal("show")};i.addEventListener("input",()=>pe());const Pe=t.querySelector(".ui.button.new-label");Pe?.addEventListener("click",()=>de(Pe));const Le=t.querySelectorAll(".edit-label-button");for(const Te of Le)Te.addEventListener("click",He=>{He.preventDefault(),de(Te)})}function yb(){document.querySelectorAll(".organization").length&&(document.querySelector(".organization.settings.options #org_name")?.addEventListener("input",function(){const e=this.value.toLowerCase()!==this.getAttribute("data-org-name").toLowerCase();(0,C.oi)("#org-name-change-prompt",e)}),Lh(".page-content.organization.settings.labels"))}var wb=__webpack_require__("./node_modules/jquery/dist/jquery.js"),Mn=__webpack_require__.n(wb);function Sb(){for(const e of document.querySelectorAll(".ui.checkbox")){if(e.hasAttribute("data-checkbox-patched"))continue;const t=e.querySelector("label"),i=e.querySelector("input");!t||!i||((0,ke.iZ)(t,i),e.setAttribute("data-checkbox-patched","true"))}}function xb(){for(const e of document.querySelectorAll(".ui.form .field")){if(e.hasAttribute("data-field-patched"))continue;const t=e.querySelector(":scope > label"),i=e.querySelector(":scope > input");!t||!i||((0,ke.iZ)(t,i),e.setAttribute("data-field-patched","true"))}}const Ar="_giteaAriaPatchDropdown",td=Mn().fn.dropdown;function jb(){if(Mn().fn.dropdown===id)throw new Error("initAriaDropdownPatch could only be called once");Mn().fn.dropdown.settings.onAfterFiltered=Eb,Mn().fn.dropdown=id,Mn().fn.fomanticExt.onResponseKeepSelectedItem=Rb,id.settings=td.settings}function id(...e){const t=td.apply(this,e);for(let i of this){i=i.closest(".ui.dropdown"),i[Ar]||kb(i);const n=Mn()(i),s=n.data("module-dropdown");s.giteaDelegated||(s.giteaDelegated=!0,Ab(n))}return t}function Rh(e,t){t.id||(t.id=(0,ke.Ae)()),t.setAttribute("role",e[Ar].listItemRole),t.setAttribute("tabindex","-1");for(const i of t.querySelectorAll("a, input, button"))i.setAttribute("tabindex","-1")}function Mh(e){e.id||(e.id=(0,ke.Ae)()),e.tabIndex=-1;const t=e.querySelector(".delete.icon");t&&(t.setAttribute("aria-hidden","false"),t.setAttribute("aria-label",window.config.i18n.remove_label_str.replace("%s",e.getAttribute("data-value"))),t.setAttribute("role","button"))}function Eb(){const e=Mn()(this).closest(".ui.dropdown"),t=e.dropdown("setting","hideDividers")==="empty",i=e[0].querySelector(".scrolling.menu")||e[0].querySelector(".menu");t&&i&&Lb(i)}function Ab(e){const t=td.bind(e),i={...t("setting","templates"),t:performance.now()},n=i.menu;i.menu=function(m,y,A,L){const z=n(m,y,A,L),X=document.createElement("div");X.innerHTML=z;const _e=Mn()(X);return _e.find("> .item").each((de,Pe)=>Rh(e[0],Pe)),e[0][Ar].deferredRefreshAriaActiveItem(),_e.html()},t("setting","templates",i);const s=t("setting","onLabelCreate");t("setting","onLabelCreate",function(m,y){const A=s.call(this,m,y);return Mh(A[0]),A});const l=t("internal","set"),u=l.direction;l.direction=function(m){u.call(this,m);const y=t("setting","className");m=m||e.find("> .menu");const A=m[0];A.classList.add(y.loading),A.getBoundingClientRect().right>document.documentElement.clientWidth&&A.classList.add(y.leftward),A.classList.remove(y.loading)}}function Cb(e,t,i){i.id||(i.id=(0,ke.Ae)()),Mn()(i).find("> .item").each((s,l)=>Rh(e,l)),i.setAttribute("role",e[Ar].listPopupRole);for(const s of e.querySelectorAll(".ui.label"))Mh(s);t.setAttribute("role",t.getAttribute("role")??e[Ar].focusableRole),t.setAttribute("aria-haspopup",e[Ar].listPopupRole),t.setAttribute("aria-controls",i.id),t.setAttribute("aria-expanded","false");const n=e.getAttribute("data-tooltip-content");n&&!e.getAttribute("aria-label")&&e.setAttribute("aria-label",n)}function kb(e){e[Ar]={};const t=e.querySelector("input.search"),i=t||e;if(!i)return;t&&!t.getAttribute("autocomplete")&&t.setAttribute("autocomplete","off");let n=Mn()(e).find("> .menu")[0];n||(n=document.createElement("div"),n.classList.add("menu"),e.append(n));const s=e.querySelectorAll("input").length>0;e[Ar].focusableRole=s?"combobox":"menu",e[Ar].listPopupRole=s?"listbox":"",e[Ar].listItemRole=s?"option":"menuitem",Tb(e,i,n),Cb(e,i,n)}function Tb(e,t,i){const n=()=>i.classList.contains("visible")&&!i.classList.contains("out")||i.classList.contains("in"),s=()=>{const y=n();t.setAttribute("aria-expanded",y?"true":"false");const A=Mn()(i).find("> .item.active, > .item.selected")[0];A&&(y?t.setAttribute("aria-activedescendant",A.id):e[Ar].listPopupRole==="menu"&&(t.removeAttribute("aria-activedescendant"),A.classList.remove("active","selected")))};e.addEventListener("keydown",y=>{if(y.key==="Enter"){const A=i.querySelector(":scope > .item.selected, .menu > .item.selected");A?.matches("a, .js-aria-clickable")&&!A.matches(".tw-hidden, .filtered")&&(y.preventDefault(),A.click())}});const l=(y=0)=>{setTimeout(s,y)};e[Ar].deferredRefreshAriaActiveItem=l,e.addEventListener("keyup",y=>{y.key.startsWith("Arrow")&&l()});let u=0,m=0;e.addEventListener("mousedown",()=>{m+=n()?1:0,u++},!0),e.addEventListener("focus",()=>{m+=n()?1:0,u++,l()},!0),e.addEventListener("blur",()=>{m=u=0,l(100)},!0),e.addEventListener("mouseup",()=>{setTimeout(()=>{m=u=0,l(100)},0)},!0),e.addEventListener("click",y=>{n()&&m!==2&&u===2&&y.stopPropagation(),u=m=0},!0)}function Lb(e){const t=[],i=[];let n="",s="";const l=z=>z.classList.contains("divider"),u=z=>l(z)&&z.hasAttribute("data-scope"),m=z=>z.classList.add("hidden","transition"),y=z=>z.classList.remove("hidden","transition"),A=z=>z.classList.contains("hidden")||z.classList.contains("filtered")||z.classList.contains("tw-hidden"),L=z=>{i.length===1&&u(i[0])?m(i[0]):i.length&&(u(i[0])&&s===n&&(m(i[0]),i.shift()),t.push(...i),s=n),n=z,i.length=0};(0,C.jB)(e,".divider",y);for(const z of e.children){const X=z.getAttribute("data-scope")||"";X!==n&&L(X),A(z)||i.push(z)}for(L("");t.length&&l(t[0]);)m(t[0]),t.shift();for(;t.length&&l(t[t.length-1]);)m(t[t.length-1]),t.pop();for(let z=0;z<t.length-1;z++)t[z].matches(".divider")&&t[z+1].matches(".divider")&&m(t[z])}function Rb(e,t){const i=e instanceof HTMLElement?e:e[0];setTimeout(()=>{(0,C.jB)(i,`.menu .item[data-value="${CSS.escape(t)}"].filtered`,n=>n.classList.remove("filtered")),Mn()(i).dropdown("set selected",t??"")},10)}const Dh=Mn().fn.modal;function Mb(){if(Mn().fn.modal===nd)throw new Error("initAriaModalPatch could only be called once");Mn().fn.modal=nd,nd.settings=Dh.settings}function nd(...e){const t=Dh.apply(this,e);if(e[0]==="show"||e[0]?.autoShow)for(const i of this)for(const n of i.querySelectorAll("form button.cancel:not([type])"))n.setAttribute("type","button");return t}function Db(){const e=new Set(["clear queue","stop","stop all","destroy","force repaint","repaint","reset","looping","remove looping","disable","enable","set duration","save conditions","restore conditions"]);Mn().fn.transition=function(t,i,n){if(t==="is supported")return!0;if(t==="is animating"||t==="is inward"||t==="is outward")return!1;let s;if(typeof t=="string"){if(e.has(t))return this;s={animation:t,...i&&{duration:i},...n&&{onComplete:n}}}else if(typeof t=="object")s=t;else throw new Error(`invalid argument: ${t}`);const l=s.animation?.startsWith("show")||s.animation?.endsWith(" in"),u=s.animation?.startsWith("hide")||s.animation?.endsWith(" out");return this.each((m,y)=>{let A=l;!l&&!u&&(A=this.hasClass("hidden")),s.onStart?.call(y),A?(y.classList.remove("hidden"),y.classList.add("visible","transition"),s.displayType&&y.style.setProperty("display",s.displayType,"important"),s.onShow?.call(y)):(y.classList.add("hidden"),y.classList.remove("visible"),y.style.removeProperty("display"),s.onHidden?.call(y)),s.onComplete?.call(y)}),this}}function Ob(){Mn().fn.dimmer=function(e,t){if(e==="add content"){const i=t,n=document.querySelector("body > .ui.dimmer");n?((0,C.xP)(n,"*",s=>s.classList.add("hidden")),this._dimmer=n):(this._dimmer=document.createElement("div"),this._dimmer.classList.add("ui","dimmer"),document.body.append(this._dimmer)),this._dimmer.append(i[0])}else{if(e==="get dimmer")return Mn()(this._dimmer);if(e==="show")this._dimmer.classList.add("active"),document.body.classList.add("tw-overflow-hidden");else if(e==="hide"){const i=t;this._dimmer.classList.remove("active"),document.body.classList.remove("tw-overflow-hidden"),i()}}return this}}function qb(){Mn().fn.tab=function(){for(const e of this){const t=e.getAttribute("data-tab");t&&e.addEventListener("click",()=>{const i=document.querySelector(`.ui.tab[data-tab="${t}"]`);(0,C.D6)(i,".ui.tab",n=>n.classList.remove("active")),(0,C.D6)(e,"[data-tab]",n=>n.classList.remove("active")),e.classList.add("active"),i.classList.add("active")})}return this}}const Oh=window.matchMedia("only screen and (max-width: 767.98px)");function Pb(){Mn().fn.fomanticExt={},Mn().fn.dropdown.settings.fullTextSearch="exact",Mn().fn.dropdown.settings.className.label+=" tw-cursor-default",Mn().fn.dropdown.settings.templates.label=function(e,t,i,n){const s=Mn().fn.dropdown.settings.templates.escape;return s(t,i)+(0,Z.JW)("octicon-x",16,`${n.delete} icon`)},Db(),Ob(),qb(),Sb(),xb(),jb(),Mb()}async function Fb(){const e=document.querySelector(".repository.wiki .combo-markdown-editor textarea");if(!e)return;const t=document.querySelector(".repository.wiki.new .ui.form"),i=t.querySelector(".combo-markdown-editor");let n,s=!1,l="";const u=async function(){if(s)return;const m=i.querySelector(".EasyMDEContainer .editor-preview-active"),A=i.querySelector(".EasyMDEContainer .editor-preview-active-side")||m,L=e.value;if(n&&A&&l!==L){s=!0;const z=new FormData;z.append("mode",n.previewMode),z.append("context",n.previewContext),z.append("text",L);try{const _e=await(await(0,Ae.LO)(n.previewUrl,{data:z})).text();l=L,A.innerHTML=`<div class="render-content markup ui segment">${_e}</div>`}catch(X){console.error("Error rendering preview:",X)}finally{s=!1,setTimeout(u,1e3)}}else setTimeout(u,1e3)};u(),n=await ma(i,{editorHeights:{minHeight:"300px",height:"calc(100vh - 600px)"},easyMDEOptions:{previewRender:(m,y)=>y.innerHTML,toolbar:["bold","italic","strikethrough","|","heading-1","heading-2","heading-3","heading-bigger","heading-smaller","|","gitea-code-inline","code","quote","|","gitea-checkbox-empty","gitea-checkbox-checked","|","unordered-list","ordered-list","|","link","image","table","horizontal-rule","|","preview","fullscreen","side-by-side","|","gitea-switch-to-textarea"]}}),t.addEventListener("submit",m=>{hh(e)||(m.preventDefault(),m.stopPropagation())})}function qh(e){e&&document.querySelector(".wiki-content-toc details")?.removeAttribute("open")}function Ib(){document.querySelector(".page-content.repository.wiki")&&(Oh.addEventListener("change",e=>qh(e.matches)),qh(Oh.matches),Fb())}function Nb(){(0,C.ny)(document,"click",".escape-button, .unescape-button, .toggle-escape-button",(e,t)=>{t.preventDefault();const i=e.getAttribute("data-unicode-content-selector"),n=i?document.querySelector(i):e.closest(".file-content, .non-diff-file-content"),s=n.querySelector(".file-code, .file-view")??n;if(e.matches(".escape-button"))s.classList.add("unicode-escaped"),(0,C.y9)(e),(0,C.fi)((0,C.D6)(e,".unescape-button"));else if(e.matches(".unescape-button"))s.classList.remove("unicode-escaped"),(0,C.y9)(e),(0,C.fi)((0,C.D6)(e,".escape-button"));else if(e.matches(".toggle-escape-button")){const l=s.classList.contains("unicode-escaped");s.classList.toggle("unicode-escaped",!l),(0,C.oi)(n.querySelectorAll(".unescape-button"),!l),(0,C.oi)(n.querySelectorAll(".escape-button"),l)}})}const{pageData:Ph}=window.config;async function Hb(e,t){const[{Cite:i,plugins:n}]=await Promise.all([__webpack_require__.e("citation-js-core-citation-js-formats-citation-js-bibtex-citation-js-csl").then(__webpack_require__.bind(__webpack_require__,"./node_modules/@citation-js/core/lib-mjs/index.js")),Promise.all([__webpack_require__.e("citation-js-core-citation-js-formats-citation-js-bibtex-citation-js-csl"),__webpack_require__.e("citation-js-formats")]).then(__webpack_require__.t.bind(__webpack_require__,"./node_modules/@citation-js/plugin-software-formats/lib/index.js",23)),Promise.all([__webpack_require__.e("citation-js-core-citation-js-formats-citation-js-bibtex-citation-js-csl"),__webpack_require__.e("citation-js-bibtex")]).then(__webpack_require__.bind(__webpack_require__,"./node_modules/@citation-js/plugin-bibtex/lib-mjs/index.js")),Promise.all([__webpack_require__.e("citation-js-core-citation-js-formats-citation-js-bibtex-citation-js-csl"),__webpack_require__.e("citation-js-csl")]).then(__webpack_require__.bind(__webpack_require__,"./node_modules/@citation-js/plugin-csl/lib-mjs/index.js"))]),{citationFileContent:s}=Ph,l=n.config.get("@bibtex");l.constants.fieldTypes.doi=["field","literal"],l.constants.fieldTypes.version=["field","literal"];const u=new i(s),m=(0,St.kk)()||"en-US",y=u.format("bibliography",{template:"apa",lang:m}),A=u.format("bibtex",{lang:m});t.setAttribute("data-text",A),e.setAttribute("data-text",y)}async function Bb(){const e="apa";if(!Ph.citationFileContent)return;const t=document.querySelector("#citation-copy-apa"),i=document.querySelector("#citation-copy-bibtex"),n=document.querySelector("#citation-copy-content");if(!t&&!i||!n)return;const s=()=>{const l=(localStorage.getItem("citation-copy-format")||e)==="bibtex",u=(l?i:t).getAttribute("data-text");n.value=u,i.classList.toggle("primary",l),t.classList.toggle("primary",!l)};document.querySelector("#cite-repo-button")?.addEventListener("click",async()=>{try{await Hb(t,i)}catch(l){console.error(`initCitationFileCopyContent error: ${l}`,l);return}s(),t.addEventListener("click",()=>{localStorage.setItem("citation-copy-format","apa"),s()}),i.addEventListener("click",()=>{localStorage.setItem("citation-copy-format","bibtex"),s()}),n.addEventListener("click",()=>{n.select()}),(0,ke.mD)("#cite-repo-modal").modal("show")})}function $b(){_c("click","onCommentReactionButtonClick",async(e,t)=>{if(t.preventDefault(),e.classList.contains("disabled"))return;const i=e.closest("[data-action-url]").getAttribute("data-action-url"),n=e.getAttribute("data-reaction-content"),s=e.closest(".comment-container"),l=s.querySelector(".bottom-reactions"),m=l?.querySelector(`a[data-reaction-content="${CSS.escape(n)}"]`)?.getAttribute("data-has-reacted")==="true",A=await(await(0,Ae.LO)(`${i}/${m?"unreact":"react"}`,{data:new URLSearchParams({content:n})})).json();l?.remove(),A.html&&s.insertAdjacentHTML("beforeend",A.html)})}var Ub=__webpack_require__("./node_modules/brace-expansion/index.js");const Vb=1024*64,Tc=e=>{if(typeof e!="string")throw new TypeError("invalid pattern");if(e.length>Vb)throw new TypeError("pattern is too long")},Wb={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",!0],"[:alpha:]":["\\p{L}\\p{Nl}",!0],"[:ascii:]":["\\x00-\\x7f",!1],"[:blank:]":["\\p{Zs}\\t",!0],"[:cntrl:]":["\\p{Cc}",!0],"[:digit:]":["\\p{Nd}",!0],"[:graph:]":["\\p{Z}\\p{C}",!0,!0],"[:lower:]":["\\p{Ll}",!0],"[:print:]":["\\p{C}",!0],"[:punct:]":["\\p{P}",!0],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",!0],"[:upper:]":["\\p{Lu}",!0],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",!0],"[:xdigit:]":["A-Fa-f0-9",!1]},Tl=e=>e.replace(/[[\]\\-]/g,"\\$&"),zb=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),Fh=e=>e.join(""),Kb=(e,t)=>{const i=t;if(e.charAt(i)!=="[")throw new Error("not in a brace expression");const n=[],s=[];let l=i+1,u=!1,m=!1,y=!1,A=!1,L=i,z="";e:for(;l<e.length;){const de=e.charAt(l);if((de==="!"||de==="^")&&l===i+1){A=!0,l++;continue}if(de==="]"&&u&&!y){L=l+1;break}if(u=!0,de==="\\"&&!y){y=!0,l++;continue}if(de==="["&&!y){for(const[Pe,[Le,Te,He]]of Object.entries(Wb))if(e.startsWith(Pe,l)){if(z)return["$.",!1,e.length-i,!0];l+=Pe.length,He?s.push(Le):n.push(Le),m=m||Te;continue e}}if(y=!1,z){de>z?n.push(Tl(z)+"-"+Tl(de)):de===z&&n.push(Tl(de)),z="",l++;continue}if(e.startsWith("-]",l+1)){n.push(Tl(de+"-")),l+=2;continue}if(e.startsWith("-",l+1)){z=de,l+=2;continue}n.push(Tl(de)),l++}if(L<l)return["",!1,0,!1];if(!n.length&&!s.length)return["$.",!1,e.length-i,!0];if(s.length===0&&n.length===1&&/^\\?.$/.test(n[0])&&!A){const de=n[0].length===2?n[0].slice(-1):n[0];return[zb(de),!1,L-i,!1]}const X="["+(A?"^":"")+Fh(n)+"]",_e="["+(A?"":"^")+Fh(s)+"]";return[n.length&&s.length?"("+X+"|"+_e+")":n.length?X:_e,m,L-i,!0]},Ll=(e,{windowsPathsNoEscape:t=!1}={})=>t?e.replace(/\[([^\/\\])\]/g,"$1"):e.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1"),Xb=new Set(["!","?","+","*","@"]),Ih=e=>Xb.has(e),Gb="(?!(?:^|/)\\.\\.?(?:$|/))",Lc="(?!\\.)",Qb=new Set(["[","."]),Yb=new Set(["..","."]),Jb=new Set("().*{}+?[]^$\\!"),Zb=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),sd="[^/]",Nh=sd+"*?",Hh=sd+"+?",Ks=class Ks{constructor(t,i,n={}){wn(this,ba);rs(this,"type");wn(this,is);wn(this,bs);wn(this,lo,!1);wn(this,Dn,[]);wn(this,Gn);wn(this,Do);wn(this,ga);wn(this,Oo,!1);wn(this,Gr);wn(this,va);wn(this,Pl,!1);this.type=t,t&&tn(this,bs,!0),tn(this,Gn,i),tn(this,is,pt(this,Gn)?pt(pt(this,Gn),is):this),tn(this,Gr,pt(this,is)===this?n:pt(pt(this,is),Gr)),tn(this,ga,pt(this,is)===this?[]:pt(pt(this,is),ga)),t==="!"&&!pt(pt(this,is),Oo)&&pt(this,ga).push(this),tn(this,Do,pt(this,Gn)?pt(pt(this,Gn),Dn).length:0)}get hasMagic(){if(pt(this,bs)!==void 0)return pt(this,bs);for(const t of pt(this,Dn))if(typeof t!="string"&&(t.type||t.hasMagic))return tn(this,bs,!0);return pt(this,bs)}toString(){return pt(this,va)!==void 0?pt(this,va):this.type?tn(this,va,this.type+"("+pt(this,Dn).map(t=>String(t)).join("|")+")"):tn(this,va,pt(this,Dn).map(t=>String(t)).join(""))}push(...t){for(const i of t)if(i!==""){if(typeof i!="string"&&!(i instanceof Ks&&pt(i,Gn)===this))throw new Error("invalid part: "+i);pt(this,Dn).push(i)}}toJSON(){const t=this.type===null?pt(this,Dn).slice().map(i=>typeof i=="string"?i:i.toJSON()):[this.type,...pt(this,Dn).map(i=>i.toJSON())];return this.isStart()&&!this.type&&t.unshift([]),this.isEnd()&&(this===pt(this,is)||pt(pt(this,is),Oo)&&pt(this,Gn)?.type==="!")&&t.push({}),t}isStart(){if(pt(this,is)===this)return!0;if(!pt(this,Gn)?.isStart())return!1;if(pt(this,Do)===0)return!0;const t=pt(this,Gn);for(let i=0;i<pt(this,Do);i++){const n=pt(t,Dn)[i];if(!(n instanceof Ks&&n.type==="!"))return!1}return!0}isEnd(){if(pt(this,is)===this||pt(this,Gn)?.type==="!")return!0;if(!pt(this,Gn)?.isEnd())return!1;if(!this.type)return pt(this,Gn)?.isEnd();const t=pt(this,Gn)?pt(pt(this,Gn),Dn).length:0;return pt(this,Do)===t-1}copyIn(t){typeof t=="string"?this.push(t):this.push(t.clone(this))}clone(t){const i=new Ks(this.type,t);for(const n of pt(this,Dn))i.copyIn(n);return i}static fromGlob(t,i={}){var s;const n=new Ks(null,void 0,i);return dn(s=Ks,qo,Gc).call(s,t,n,0,i),n}toMMPattern(){if(this!==pt(this,is))return pt(this,is).toMMPattern();const t=this.toString(),[i,n,s,l]=this.toRegExpSource();if(!(s||pt(this,bs)||pt(this,Gr).nocase&&!pt(this,Gr).nocaseMagicOnly&&t.toUpperCase()!==t.toLowerCase()))return n;const m=(pt(this,Gr).nocase?"i":"")+(l?"u":"");return Object.assign(new RegExp(`^${i}$`,m),{_src:i,_glob:t})}get options(){return pt(this,Gr)}toRegExpSource(t){const i=t??!!pt(this,Gr).dot;if(pt(this,is)===this&&dn(this,ba,sm).call(this),!this.type){const y=this.isStart()&&this.isEnd(),A=pt(this,Dn).map(_e=>{var Te;const[pe,de,Pe,Le]=typeof _e=="string"?dn(Te=Ks,qo,rm).call(Te,_e,pt(this,bs),y):_e.toRegExpSource(t);return tn(this,bs,pt(this,bs)||Pe),tn(this,lo,pt(this,lo)||Le),pe}).join("");let L="";if(this.isStart()&&typeof pt(this,Dn)[0]=="string"&&!(pt(this,Dn).length===1&&Yb.has(pt(this,Dn)[0]))){const pe=Qb,de=i&&pe.has(A.charAt(0))||A.startsWith("\\.")&&pe.has(A.charAt(2))||A.startsWith("\\.\\.")&&pe.has(A.charAt(4)),Pe=!i&&!t&&pe.has(A.charAt(0));L=de?Gb:Pe?Lc:""}let z="";return this.isEnd()&&pt(pt(this,is),Oo)&&pt(this,Gn)?.type==="!"&&(z="(?:$|\\/)"),[L+A+z,Ll(A),tn(this,bs,!!pt(this,bs)),pt(this,lo)]}const n=this.type==="*"||this.type==="+",s=this.type==="!"?"(?:(?!(?:":"(?:";let l=dn(this,ba,pd).call(this,i);if(this.isStart()&&this.isEnd()&&!l&&this.type!=="!"){const y=this.toString();return tn(this,Dn,[y]),this.type=null,tn(this,bs,void 0),[y,Ll(this.toString()),!1,!1]}let u=!n||t||i||!Lc?"":dn(this,ba,pd).call(this,!0);u===l&&(u=""),u&&(l=`(?:${l})(?:${u})*?`);let m="";if(this.type==="!"&&pt(this,Pl))m=(this.isStart()&&!i?Lc:"")+Hh;else{const y=this.type==="!"?"))"+(this.isStart()&&!i&&!t?Lc:"")+Nh+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&u?")":this.type==="*"&&u?")?":`)${this.type}`;m=s+l+y}return[m,Ll(l),tn(this,bs,!!pt(this,bs)),pt(this,lo)]}};is=new WeakMap,bs=new WeakMap,lo=new WeakMap,Dn=new WeakMap,Gn=new WeakMap,Do=new WeakMap,ga=new WeakMap,Oo=new WeakMap,Gr=new WeakMap,va=new WeakMap,Pl=new WeakMap,ba=new WeakSet,sm=function(){if(this!==pt(this,is))throw new Error("should only call on root");if(pt(this,Oo))return this;this.toString(),tn(this,Oo,!0);let t;for(;t=pt(this,ga).pop();){if(t.type!=="!")continue;let i=t,n=pt(i,Gn);for(;n;){for(let s=pt(i,Do)+1;!n.type&&s<pt(n,Dn).length;s++)for(const l of pt(t,Dn)){if(typeof l=="string")throw new Error("string part in extglob AST??");l.copyIn(pt(n,Dn)[s])}i=n,n=pt(i,Gn)}}return this},qo=new WeakSet,Gc=function(t,i,n,s){var _e,pe;let l=!1,u=!1,m=-1,y=!1;if(i.type===null){let de=n,Pe="";for(;de<t.length;){const Le=t.charAt(de++);if(l||Le==="\\"){l=!l,Pe+=Le;continue}if(u){de===m+1?(Le==="^"||Le==="!")&&(y=!0):Le==="]"&&!(de===m+2&&y)&&(u=!1),Pe+=Le;continue}else if(Le==="["){u=!0,m=de,y=!1,Pe+=Le;continue}if(!s.noext&&Ih(Le)&&t.charAt(de)==="("){i.push(Pe),Pe="";const Te=new Ks(Le,i);de=dn(_e=Ks,qo,Gc).call(_e,t,Te,de,s),i.push(Te);continue}Pe+=Le}return i.push(Pe),de}let A=n+1,L=new Ks(null,i);const z=[];let X="";for(;A<t.length;){const de=t.charAt(A++);if(l||de==="\\"){l=!l,X+=de;continue}if(u){A===m+1?(de==="^"||de==="!")&&(y=!0):de==="]"&&!(A===m+2&&y)&&(u=!1),X+=de;continue}else if(de==="["){u=!0,m=A,y=!1,X+=de;continue}if(Ih(de)&&t.charAt(A)==="("){L.push(X),X="";const Pe=new Ks(de,L);L.push(Pe),A=dn(pe=Ks,qo,Gc).call(pe,t,Pe,A,s);continue}if(de==="|"){L.push(X),X="",z.push(L),L=new Ks(null,i);continue}if(de===")")return X===""&&pt(i,Dn).length===0&&tn(i,Pl,!0),L.push(X),X="",i.push(...z,L),A;X+=de}return i.type=null,tn(i,bs,void 0),tn(i,Dn,[t.substring(n-1)]),A},pd=function(t){return pt(this,Dn).map(i=>{if(typeof i=="string")throw new Error("string type in extglob ast??");const[n,s,l,u]=i.toRegExpSource(t);return tn(this,lo,pt(this,lo)||u),n}).filter(i=>!(this.isStart()&&this.isEnd())||!!i).join("|")},rm=function(t,i,n=!1){let s=!1,l="",u=!1;for(let m=0;m<t.length;m++){const y=t.charAt(m);if(s){s=!1,l+=(Jb.has(y)?"\\":"")+y;continue}if(y==="\\"){m===t.length-1?l+="\\\\":s=!0;continue}if(y==="["){const[A,L,z,X]=Kb(t,m);if(z){l+=A,u=u||L,m+=z-1,i=i||X;continue}}if(y==="*"){n&&t==="*"?l+=Hh:l+=Nh,i=!0;continue}if(y==="?"){l+=sd,i=!0;continue}l+=Zb(y)}return[l,Ll(t),!!i,u]},wn(Ks,qo);let Rc=Ks;const e_=(e,{windowsPathsNoEscape:t=!1}={})=>t?e.replace(/[?*()[\]]/g,"[$&]"):e.replace(/[?*()[\]\\]/g,"\\$&"),Os=(e,t,i={})=>(Tc(t),!i.nocomment&&t.charAt(0)==="#"?!1:new Mc(t,i).match(e)),t_=/^\*+([^+@!?\*\[\(]*)$/,i_=e=>t=>!t.startsWith(".")&&t.endsWith(e),n_=e=>t=>t.endsWith(e),s_=e=>(e=e.toLowerCase(),t=>!t.startsWith(".")&&t.toLowerCase().endsWith(e)),r_=e=>(e=e.toLowerCase(),t=>t.toLowerCase().endsWith(e)),o_=/^\*+\.\*+$/,a_=e=>!e.startsWith(".")&&e.includes("."),l_=e=>e!=="."&&e!==".."&&e.includes("."),c_=/^\.\*+$/,u_=e=>e!=="."&&e!==".."&&e.startsWith("."),d_=/^\*+$/,f_=e=>e.length!==0&&!e.startsWith("."),h_=e=>e.length!==0&&e!=="."&&e!=="..",m_=/^\?+([^+@!?\*\[\(]*)?$/,p_=([e,t=""])=>{const i=Bh([e]);return t?(t=t.toLowerCase(),n=>i(n)&&n.toLowerCase().endsWith(t)):i},g_=([e,t=""])=>{const i=$h([e]);return t?(t=t.toLowerCase(),n=>i(n)&&n.toLowerCase().endsWith(t)):i},v_=([e,t=""])=>{const i=$h([e]);return t?n=>i(n)&&n.endsWith(t):i},b_=([e,t=""])=>{const i=Bh([e]);return t?n=>i(n)&&n.endsWith(t):i},Bh=([e])=>{const t=e.length;return i=>i.length===t&&!i.startsWith(".")},$h=([e])=>{const t=e.length;return i=>i.length===t&&i!=="."&&i!==".."},Uh=typeof process=="object"&&process?typeof process.env=="object"&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix",Vh={win32:{sep:"\\"},posix:{sep:"/"}},__=Uh==="win32"?Vh.win32.sep:Vh.posix.sep;Os.sep=__;const Cr=Symbol("globstar **");Os.GLOBSTAR=Cr;const y_="[^/]"+"*?",w_="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",S_="(?:(?!(?:\\/|^)\\.).)*?",x_=(e,t={})=>i=>Os(i,e,t);Os.filter=x_;const kr=(e,t={})=>Object.assign({},e,t),j_=e=>{if(!e||typeof e!="object"||!Object.keys(e).length)return Os;const t=Os;return Object.assign((n,s,l={})=>t(n,s,kr(e,l)),{Minimatch:class extends t.Minimatch{constructor(s,l={}){super(s,kr(e,l))}static defaults(s){return t.defaults(kr(e,s)).Minimatch}},AST:class extends t.AST{constructor(s,l,u={}){super(s,l,kr(e,u))}static fromGlob(s,l={}){return t.AST.fromGlob(s,kr(e,l))}},unescape:(n,s={})=>t.unescape(n,kr(e,s)),escape:(n,s={})=>t.escape(n,kr(e,s)),filter:(n,s={})=>t.filter(n,kr(e,s)),defaults:n=>t.defaults(kr(e,n)),makeRe:(n,s={})=>t.makeRe(n,kr(e,s)),braceExpand:(n,s={})=>t.braceExpand(n,kr(e,s)),match:(n,s,l={})=>t.match(n,s,kr(e,l)),sep:t.sep,GLOBSTAR:Cr})};Os.defaults=j_;const Wh=(e,t={})=>(Tc(e),t.nobrace||!/\{(?:(?!\{).)*\}/.test(e)?[e]:Ub(e));Os.braceExpand=Wh;const E_=(e,t={})=>new Mc(e,t).makeRe();Os.makeRe=E_;const A_=(e,t,i={})=>{const n=new Mc(t,i);return e=e.filter(s=>n.match(s)),n.options.nonull&&!e.length&&e.push(t),e};Os.match=A_;const zh=/[?*]|[+@!]\(.*?\)|\[|\]/,C_=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&");class Mc{constructor(t,i={}){rs(this,"options");rs(this,"set");rs(this,"pattern");rs(this,"windowsPathsNoEscape");rs(this,"nonegate");rs(this,"negate");rs(this,"comment");rs(this,"empty");rs(this,"preserveMultipleSlashes");rs(this,"partial");rs(this,"globSet");rs(this,"globParts");rs(this,"nocase");rs(this,"isWindows");rs(this,"platform");rs(this,"windowsNoMagicRoot");rs(this,"regexp");Tc(t),i=i||{},this.options=i,this.pattern=t,this.platform=i.platform||Uh,this.isWindows=this.platform==="win32",this.windowsPathsNoEscape=!!i.windowsPathsNoEscape||i.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!i.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!i.nonegate,this.comment=!1,this.empty=!1,this.partial=!!i.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=i.windowsNoMagicRoot!==void 0?i.windowsNoMagicRoot:!!(this.isWindows&&this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(const t of this.set)for(const i of t)if(typeof i!="string")return!0;return!1}debug(...t){}make(){const t=this.pattern,i=this.options;if(!i.nocomment&&t.charAt(0)==="#"){this.comment=!0;return}if(!t){this.empty=!0;return}this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],i.debug&&(this.debug=(...l)=>console.error(...l)),this.debug(this.pattern,this.globSet);const n=this.globSet.map(l=>this.slashSplit(l));this.globParts=this.preprocess(n),this.debug(this.pattern,this.globParts);let s=this.globParts.map((l,u,m)=>{if(this.isWindows&&this.windowsNoMagicRoot){const y=l[0]===""&&l[1]===""&&(l[2]==="?"||!zh.test(l[2]))&&!zh.test(l[3]),A=/^[a-z]:/i.test(l[0]);if(y)return[...l.slice(0,4),...l.slice(4).map(L=>this.parse(L))];if(A)return[l[0],...l.slice(1).map(L=>this.parse(L))]}return l.map(y=>this.parse(y))});if(this.debug(this.pattern,s),this.set=s.filter(l=>l.indexOf(!1)===-1),this.isWindows)for(let l=0;l<this.set.length;l++){const u=this.set[l];u[0]===""&&u[1]===""&&this.globParts[l][2]==="?"&&typeof u[3]=="string"&&/^[a-z]:$/i.test(u[3])&&(u[2]="?")}this.debug(this.pattern,this.set)}preprocess(t){if(this.options.noglobstar)for(let n=0;n<t.length;n++)for(let s=0;s<t[n].length;s++)t[n][s]==="**"&&(t[n][s]="*");const{optimizationLevel:i=1}=this.options;return i>=2?(t=this.firstPhasePreProcess(t),t=this.secondPhasePreProcess(t)):i>=1?t=this.levelOneOptimize(t):t=this.adjascentGlobstarOptimize(t),t}adjascentGlobstarOptimize(t){return t.map(i=>{let n=-1;for(;(n=i.indexOf("**",n+1))!==-1;){let s=n;for(;i[s+1]==="**";)s++;s!==n&&i.splice(n,s-n)}return i})}levelOneOptimize(t){return t.map(i=>(i=i.reduce((n,s)=>{const l=n[n.length-1];return s==="**"&&l==="**"?n:s===".."&&l&&l!==".."&&l!=="."&&l!=="**"?(n.pop(),n):(n.push(s),n)},[]),i.length===0?[""]:i))}levelTwoFileOptimize(t){Array.isArray(t)||(t=this.slashSplit(t));let i=!1;do{if(i=!1,!this.preserveMultipleSlashes){for(let s=1;s<t.length-1;s++){const l=t[s];s===1&&l===""&&t[0]===""||(l==="."||l==="")&&(i=!0,t.splice(s,1),s--)}t[0]==="."&&t.length===2&&(t[1]==="."||t[1]==="")&&(i=!0,t.pop())}let n=0;for(;(n=t.indexOf("..",n+1))!==-1;){const s=t[n-1];s&&s!=="."&&s!==".."&&s!=="**"&&(i=!0,t.splice(n-1,2),n-=2)}}while(i);return t.length===0?[""]:t}firstPhasePreProcess(t){let i=!1;do{i=!1;for(let n of t){let s=-1;for(;(s=n.indexOf("**",s+1))!==-1;){let u=s;for(;n[u+1]==="**";)u++;u>s&&n.splice(s+1,u-s);let m=n[s+1];const y=n[s+2],A=n[s+3];if(m!==".."||!y||y==="."||y===".."||!A||A==="."||A==="..")continue;i=!0,n.splice(s,1);const L=n.slice(0);L[s]="**",t.push(L),s--}if(!this.preserveMultipleSlashes){for(let u=1;u<n.length-1;u++){const m=n[u];u===1&&m===""&&n[0]===""||(m==="."||m==="")&&(i=!0,n.splice(u,1),u--)}n[0]==="."&&n.length===2&&(n[1]==="."||n[1]==="")&&(i=!0,n.pop())}let l=0;for(;(l=n.indexOf("..",l+1))!==-1;){const u=n[l-1];if(u&&u!=="."&&u!==".."&&u!=="**"){i=!0;const y=l===1&&n[l+1]==="**"?["."]:[];n.splice(l-1,2,...y),n.length===0&&n.push(""),l-=2}}}}while(i);return t}secondPhasePreProcess(t){for(let i=0;i<t.length-1;i++)for(let n=i+1;n<t.length;n++){const s=this.partsMatch(t[i],t[n],!this.preserveMultipleSlashes);if(s){t[i]=[],t[n]=s;break}}return t.filter(i=>i.length)}partsMatch(t,i,n=!1){let s=0,l=0,u=[],m="";for(;s<t.length&&l<i.length;)if(t[s]===i[l])u.push(m==="b"?i[l]:t[s]),s++,l++;else if(n&&t[s]==="**"&&i[l]===t[s+1])u.push(t[s]),s++;else if(n&&i[l]==="**"&&t[s]===i[l+1])u.push(i[l]),l++;else if(t[s]==="*"&&i[l]&&(this.options.dot||!i[l].startsWith("."))&&i[l]!=="**"){if(m==="b")return!1;m="a",u.push(t[s]),s++,l++}else if(i[l]==="*"&&t[s]&&(this.options.dot||!t[s].startsWith("."))&&t[s]!=="**"){if(m==="a")return!1;m="b",u.push(i[l]),s++,l++}else return!1;return t.length===i.length&&u}parseNegate(){if(this.nonegate)return;const t=this.pattern;let i=!1,n=0;for(let s=0;s<t.length&&t.charAt(s)==="!";s++)i=!i,n++;n&&(this.pattern=t.slice(n)),this.negate=i}matchOne(t,i,n=!1){const s=this.options;if(this.isWindows){const de=typeof t[0]=="string"&&/^[a-z]:$/i.test(t[0]),Pe=!de&&t[0]===""&&t[1]===""&&t[2]==="?"&&/^[a-z]:$/i.test(t[3]),Le=typeof i[0]=="string"&&/^[a-z]:$/i.test(i[0]),Te=!Le&&i[0]===""&&i[1]===""&&i[2]==="?"&&typeof i[3]=="string"&&/^[a-z]:$/i.test(i[3]),He=Pe?3:de?0:void 0,U=Te?3:Le?0:void 0;if(typeof He=="number"&&typeof U=="number"){const[Se,ze]=[t[He],i[U]];Se.toLowerCase()===ze.toLowerCase()&&(i[U]=Se,U>He?i=i.slice(U):He>U&&(t=t.slice(He)))}}const{optimizationLevel:l=1}=this.options;l>=2&&(t=this.levelTwoFileOptimize(t)),this.debug("matchOne",this,{file:t,pattern:i}),this.debug("matchOne",t.length,i.length);for(var u=0,m=0,y=t.length,A=i.length;u<y&&m<A;u++,m++){this.debug("matchOne loop");var L=i[m],z=t[u];if(this.debug(i,L,z),L===!1)return!1;if(L===Cr){this.debug("GLOBSTAR",[i,L,z]);var X=u,_e=m+1;if(_e===A){for(this.debug("** at the end");u<y;u++)if(t[u]==="."||t[u]===".."||!s.dot&&t[u].charAt(0)===".")return!1;return!0}for(;X<y;){var pe=t[X];if(this.debug(`
DesignScreenshot/output/git.buildapp.eu.org_run/git.buildapp.eu.org_1_initial_page.html:429:`)}const r1=["::group::","##[group]"],o1=["::endgroup::","##[endgroup]"];function a1(e){for(const t of r1)if(e.message.startsWith(t))return{name:"group",prefix:t};for(const t of o1)if(e.message.startsWith(t))return{name:"endgroup",prefix:t};return null}function l1(e){const t=e.getBoundingClientRect();return t.top>=0&&t.bottom<=window.innerHeight}function c1(){try{const e=localStorage.getItem("actions-view-options");if(e)return JSON.parse(e)}catch{}return{autoScroll:!0,expandRunning:!1}}var u1=(0,c.pM)({name:"RepoActionView",components:{SvgIcon:Z.Ah,ActionRunStatus:e1},props:{runIndex:{type:String,default:""},jobIndex:{type:String,default:""},actionsURL:{type:String,default:""},locale:{type:Object,default:null}},data(){const{autoScroll:e,expandRunning:t}=c1();return{loadingAbortController:null,intervalID:null,currentJobStepsStates:[],artifacts:[],menuVisible:!1,isFullScreen:!1,timeVisible:{"log-time-stamp":!1,"log-time-seconds":!1},optionAlwaysAutoScroll:e??!1,optionAlwaysExpandRunning:t??!1,run:{link:"",title:"",titleHTML:"",status:"",canCancel:!1,canApprove:!1,canRerun:!1,canDeleteArtifact:!1,done:!1,workflowID:"",workflowLink:"",isSchedule:!1,jobs:[],commit:{localeCommit:"",localePushedBy:"",shortSHA:"",link:"",pusher:{displayName:"",link:""},branch:{name:"",link:"",isDeleted:!1}}},currentJob:{title:"",detail:"",steps:[]}}},watch:{optionAlwaysAutoScroll(){this.saveLocaleStorageOptions()},optionAlwaysExpandRunning(){this.saveLocaleStorageOptions()}},async mounted(){await this.loadJob(),this.intervalID=setInterval(()=>this.loadJob(),1e3),document.body.addEventListener("click",this.closeDropdown),this.hashChangeListener(),window.addEventListener("hashchange",this.hashChangeListener)},beforeUnmount(){document.body.removeEventListener("click",this.closeDropdown),window.removeEventListener("hashchange",this.hashChangeListener)},unmounted(){this.intervalID&&(clearInterval(this.intervalID),this.intervalID=null)},methods:{saveLocaleStorageOptions(){const e={autoScroll:this.optionAlwaysAutoScroll,expandRunning:this.optionAlwaysExpandRunning};localStorage.setItem("actions-view-options",JSON.stringify(e))},getJobStepLogsContainer(e){return this.$refs.logs[e]},getActiveLogsContainer(e){const t=this.getJobStepLogsContainer(e);return t._stepLogsActiveContainer??t},beginLogGroup(e,t,i,n){const s=this.$refs.logs[e],l=(0,C.tw)("summary",{class:"job-log-group-summary"},this.createLogLine(e,t,{index:i.index,timestamp:i.timestamp,message:i.message.substring(n.prefix.length)})),u=(0,C.tw)("div",{class:"job-log-list"}),m=(0,C.tw)("details",{class:"job-log-group"},l,u);s.append(m),s._stepLogsActiveContainer=u},endLogGroup(e,t,i,n){const s=this.$refs.logs[e];s._stepLogsActiveContainer=null,s.append(this.createLogLine(e,t,{index:i.index,timestamp:i.timestamp,message:i.message.substring(n.prefix.length)}))},toggleStepLogs(e){this.currentJobStepsStates[e].expanded=!this.currentJobStepsStates[e].expanded,this.currentJobStepsStates[e].expanded&&this.loadJobForce()},cancelRun(){(0,Ae.LO)(`${this.run.link}/cancel`)},approveRun(){(0,Ae.LO)(`${this.run.link}/approve`)},createLogLine(e,t,i){const n=(0,C.tw)("a",{class:"line-num muted",href:`#jobstep-${e}-${i.index}`},String(i.index)),s=(0,C.tw)("span",{class:"log-time-stamp"},(0,Li.Rt)(new Date(i.timestamp*1e3))),l=(0,C.tw)("span",{class:"log-msg"});l.innerHTML=s1(i.message);const u=Math.floor(i.timestamp-t),m=(0,C.tw)("span",{class:"log-time-seconds"},`${u}s`);return(0,C.oi)(s,this.timeVisible["log-time-stamp"]),(0,C.oi)(m,this.timeVisible["log-time-seconds"]),(0,C.tw)("div",{id:`jobstep-${e}-${i.index}`,class:"job-log-line"},n,s,l,m)},shouldAutoScroll(e){if(!this.optionAlwaysAutoScroll)return!1;const t=this.getJobStepLogsContainer(e);return t.lastChild?l1(t.lastChild):this.currentJobStepsStates[e].expanded},appendLogs(e,t,i){for(const n of i){const s=this.getActiveLogsContainer(e),l=a1(n);if(l?.name==="group"){this.beginLogGroup(e,t,n,l);continue}else if(l?.name==="endgroup"){this.endLogGroup(e,t,n,l);continue}s.append(this.createLogLine(e,t,n))}},async deleteArtifact(e){window.confirm(this.locale.confirmDeleteArtifact.replace("%s",e))&&(await(0,Ae.SJ)(`${this.run.link}/artifacts/${e}`),await this.loadJobForce())},async fetchJobData(e){const t=this.currentJobStepsStates.map((n,s)=>({step:s,cursor:n.cursor,expanded:n.expanded}));return await(await(0,Ae.LO)(`${this.actionsURL}/runs/${this.runIndex}/jobs/${this.jobIndex}`,{signal:e.signal,data:{logCursors:t}})).json()},async loadJobForce(){this.loadingAbortController?.abort(),this.loadingAbortController=null,await this.loadJob()},async loadJob(){if(this.loadingAbortController)return;const e=new AbortController;this.loadingAbortController=e;try{const t=!this.run.status,i=await this.fetchJobData(e);if(this.loadingAbortController!==e)return;this.artifacts=i.artifacts||[],this.run=i.state.run,this.currentJob=i.state.currentJob;for(let l=0;l<this.currentJob.steps.length;l++){const u=t&&this.optionAlwaysExpandRunning&&this.currentJob.steps[l].status==="running";this.currentJobStepsStates[l]||(this.currentJobStepsStates[l]={cursor:null,expanded:u})}const n=new Map;for(const l of i.logs.stepsLog??[])n.has(l.step)||n.set(l.step,this.shouldAutoScroll(l.step));for(const l of i.logs.stepsLog??[])this.currentJobStepsStates[l.step].cursor=l.cursor,this.appendLogs(l.step,l.started,l.lines);let s;for(let l=0;l<this.currentJob.steps.length;l++)n.get(l)&&(s=this.getJobStepLogsContainer(l));s?.lastElementChild.scrollIntoView({behavior:"smooth",block:"nearest"}),this.run.done&&this.intervalID&&(clearInterval(this.intervalID),this.intervalID=null)}catch(t){if(t instanceof TypeError||e.signal.aborted)return;throw t}finally{this.loadingAbortController===e&&(this.loadingAbortController=null)}},isDone(e){return["success","skipped","failure","cancelled"].includes(e)},isExpandable(e){return["success","running","failure","cancelled"].includes(e)},closeDropdown(){this.menuVisible&&(this.menuVisible=!1)},toggleTimeDisplay(e){this.timeVisible[`log-time-${e}`]=!this.timeVisible[`log-time-${e}`];for(const t of this.$refs.steps.querySelectorAll(`.log-time-${e}`))(0,C.oi)(t,this.timeVisible[`log-time-${e}`])},toggleFullScreen(){this.isFullScreen=!this.isFullScreen,(0,St._M)(".action-view-right",this.isFullScreen,".action-view-body")},async hashChangeListener(){const e=window.location.hash;if(!e)return;const[t,i,n]=e.split("-"),s=Number(i);if(!this.currentJobStepsStates[s])return;!this.currentJobStepsStates[s].expanded&&this.currentJobStepsStates[s].cursor===null&&(this.currentJobStepsStates[s].expanded=!0,await this.loadJob());const l=this.$refs.steps.querySelector(e);l&&l.querySelector(".line-num").click()}}}),d1=(0,Xi.A)(u1,[["render",Yw],["__scopeId","data-v-2d8f7d75"]]);function f1(){const e=document.querySelector("#repo-action-view");if(!e)return;const t=document.querySelector("body > div.full.height");t&&(t.style.paddingBottom="0"),Ai(d1,{runIndex:e.getAttribute("data-run-index"),jobIndex:e.getAttribute("data-job-index"),actionsURL:e.getAttribute("data-actions-url"),locale:{approve:e.getAttribute("data-locale-approve"),cancel:e.getAttribute("data-locale-cancel"),rerun:e.getAttribute("data-locale-rerun"),rerun_all:e.getAttribute("data-locale-rerun-all"),scheduled:e.getAttribute("data-locale-runs-scheduled"),commit:e.getAttribute("data-locale-runs-commit"),pushedBy:e.getAttribute("data-locale-runs-pushed-by"),artifactsTitle:e.getAttribute("data-locale-artifacts-title"),areYouSure:e.getAttribute("data-locale-are-you-sure"),artifactExpired:e.getAttribute("data-locale-artifact-expired"),confirmDeleteArtifact:e.getAttribute("data-locale-confirm-delete-artifact"),showTimeStamps:e.getAttribute("data-locale-show-timestamps"),showLogSeconds:e.getAttribute("data-locale-show-log-seconds"),showFullScreen:e.getAttribute("data-locale-show-full-screen"),downloadLogs:e.getAttribute("data-locale-download-logs"),status:{unknown:e.getAttribute("data-locale-status-unknown"),waiting:e.getAttribute("data-locale-status-waiting"),running:e.getAttribute("data-locale-status-running"),success:e.getAttribute("data-locale-status-success"),failure:e.getAttribute("data-locale-status-failure"),cancelled:e.getAttribute("data-locale-status-cancelled"),skipped:e.getAttribute("data-locale-status-skipped"),blocked:e.getAttribute("data-locale-status-blocked")},logsAlwaysAutoScroll:e.getAttribute("data-locale-logs-always-auto-scroll"),logsAlwaysExpandRunning:e.getAttribute("data-locale-logs-always-expand-running")}}).mount(e)}function h1(){const e=document.querySelector(".issue-checkbox-all");if(!e)return;const t=document.querySelectorAll(".issue-checkbox"),i=()=>{const n=Array.from(t).filter(A=>A.checked),s=!!n.length;s&&n.length===t.length?(e.checked=!0,e.indeterminate=!1):s?(e.checked=!1,e.indeterminate=!0):(e.checked=!1,e.indeterminate=!1),(0,C.oi)("#issue-filters",!s),(0,C.oi)("#issue-actions",s);const u=document.querySelectorAll("#issue-filters, #issue-actions");Array.from(u).find(A=>!(0,C.WP)(A)).querySelector(".issue-list-toolbar-left").prepend(e)};for(const n of t)n.addEventListener("change",i);e.addEventListener("change",()=>{for(const n of t)n.checked=e.checked;i()}),(0,C.jB)(document,".issue-action",n=>n.addEventListener("click",async s=>{s.preventDefault();const l=n.getAttribute("data-url");let u=n.getAttribute("data-action"),m=n.getAttribute("data-element-id");const y=[];for(const L of document.querySelectorAll(".issue-checkbox:checked"))y.push(L.getAttribute("data-issue-id"));const A=y.join(",");if(A){if(m==="0"&&l.endsWith("/assignee")&&(m="",u="clear"),u==="toggle"&&s.altKey&&(u="toggle-alt"),u==="delete"){const L=n.getAttribute("data-action-delete-confirm");if(!await Wu({content:L,confirmButtonColor:"red"}))return}try{await ep(l,u,A,m),window.location.reload()}catch(L){gt(L.responseJSON?.error??L.message)}}}))}function Yh(e){let t=e.getAttribute("data-search-url");const i=e.getAttribute("data-action-jump-url");let n=e.getAttribute("data-selected-username")||"";const s=(0,ke.mD)(e),l=e.querySelector(".menu"),u=e.querySelector(".ui.search input"),m=e.querySelector(".menu > .item-from-input");s.dropdown("setting",{fullTextSearch:!0,selectOnKeydown:!1,action:(_e,pe)=>{window.location.href=i.replace("{username}",encodeURIComponent(pe))}});const y=_e=>{(0,C.jB)(l,".item.active, .item.selected",pe=>pe.classList.remove("active","selected")),l.querySelector(`.item[data-value="${CSS.escape(_e)}"]`)?.classList.add("selected")},A=[],L=()=>{const _e=u.value.trim();m.setAttribute("data-value",_e),m.textContent=_e;const pe=!A.length&&_e!=="";(0,C.oi)(m,pe),y(pe?_e:n)};u.value=n,t?(t.includes("?")||(t+="?"),s.dropdown("setting","apiSettings",{cache:!1,url:`${t}&q={query}`,onResponse(_e){A.length=0;for(const pe of _e.results){let de=`<img class="ui avatar tw-align-middle" src="${R(pe.avatar_link)}" aria-hidden="true" alt width="20" height="20"><span class="gt-ellipsis">${R(pe.username)}</span>`;pe.full_name&&(de+=`<span class="search-fullname tw-ml-2">${R(pe.full_name)}</span>`),n.toLowerCase()===pe.username.toLowerCase()&&(n=pe.username),A.push({value:pe.username,name:de})}return _e.results=A,_e}}),s.dropdown("setting","onShow",()=>s.dropdown("filter"," "))):u.addEventListener("input",L);const z={...s.dropdown("internal","setup")},X=s.dropdown("setting","templates");s.dropdown("internal","setup",z),z.menu=function(_e){for(const de of l.querySelectorAll(":scope > .dynamic-item"))de.remove();const pe=X.menu(_e,s.dropdown("setting","fields"),!0,s.dropdown("setting","className"));if(pe){const de=(0,St.a8)(pe,"text/html").querySelectorAll("body > div");for(const Le of de)Le.classList.add("dynamic-item");const Pe=document.createElement("div");Pe.classList.add("divider","dynamic-item"),l.append(Pe,...de)}s.dropdown("refresh"),setTimeout(()=>L(),0)}}function m1(){for(const e of document.querySelectorAll(".issue-card-unpin"))e.addEventListener("click",async t=>{const i=t.currentTarget,n=Number(i.getAttribute("data-issue-id"));(await(0,Ae.SJ)(i.getAttribute("data-unpin-url"))).ok&&(i._tippy.destroy(),i.closest(`div.issue-card[data-issue-id="${n}"]`).remove())})}async function p1(e){const t=e.item.getAttribute("data-move-url"),i=Number(e.item.getAttribute("data-issue-id"));await(0,Ae.LO)(t,{data:{id:i,position:e.newIndex+1}})}async function g1(){const e=document.querySelector("#issue-pins");e!==null&&e.hasAttribute("data-is-repo-admin")&&(m1(),!(e.children.length<2)&&vc(e,{group:"shared",onEnd:t=>{(async()=>await p1(t))()}}))}function v1(){document.querySelector(".page-content.repository.issue-list, .page-content.repository.milestone-issue-list")?(h1(),(0,C.jB)(document,".ui.dropdown.user-remote-search",e=>Yh(e)),g1()):document.querySelector(".page-content.dashboard.issues")&&(0,C.jB)(document,".ui.dropdown.user-remote-search",e=>Yh(e))}const{appSubUrl:b1}=window.config,_1=/^(\d+)$/,y1=/^#(\d+)$/,w1=/^([-.\w]+)\/([-.\w]+)#(\d+)$/;function S1(e,t){t=t.trim();let i="";if(e)_1.test(t)?i=`${e}/issues/${t}`:y1.test(t)&&(i=`${e}/issues/${t.substring(1)}`);else{const[n,s,l,u]=w1.exec(t)||[];s&&(i=`${b1}/${s}/${l}/issues/${u}`)}return i}function x1(){const e=document.querySelector("#issue-list-quick-goto");if(!e)return;const t=e.closest("form"),i=t.querySelector("input[name=q]"),n=e.getAttribute("data-repo-link");t.addEventListener("submit",l=>{let u=!(0,C.WP)(e);const m=(0,C.IU)(l);m!==t&&m!==i&&m!==e&&(u=!1),u&&(l.preventDefault(),window.location.href=e.getAttribute("data-issue-goto-link"))});const s=async()=>{const l=i.value;let u=S1(n,l);u&&(await(0,Ae.fG)(`${u}/info`)).status!==200&&(u=""),i.value===l&&((0,C.oi)(e,!!u),e.setAttribute("data-issue-goto-link",u))};i.addEventListener("input",(0,C.nm)(s)),s()}async function j1(){const e=document.querySelector("#repo-contributors-chart");if(!e)return;const{default:t}=await Promise.all([__webpack_require__.e("contributors-graph-code-frequency-graph-recent-commits-graph"),__webpack_require__.e("contributors-graph")]).then(__webpack_require__.bind(__webpack_require__,"./web_src/js/components/RepoContributors.vue"));try{Ai(t,{repoLink:e.getAttribute("data-repo-link"),repoDefaultBranchName:e.getAttribute("data-repo-default-branch-name"),locale:{filterLabel:e.getAttribute("data-locale-filter-label"),contributionType:{commits:e.getAttribute("data-locale-contribution-type-commits"),additions:e.getAttribute("data-locale-contribution-type-additions"),deletions:e.getAttribute("data-locale-contribution-type-deletions")},loadingTitle:e.getAttribute("data-locale-loading-title"),loadingTitleFailed:e.getAttribute("data-locale-loading-title-failed"),loadingInfo:e.getAttribute("data-locale-loading-info")}}).mount(e)}catch(i){console.error("RepoContributors failed to load",i),e.textContent=e.getAttribute("data-locale-component-failed-to-load")}}async function E1(){const e=document.querySelector("#repo-code-frequency-chart");if(!e)return;const{default:t}=await Promise.all([__webpack_require__.e("contributors-graph-code-frequency-graph-recent-commits-graph"),__webpack_require__.e("code-frequency-graph")]).then(__webpack_require__.bind(__webpack_require__,"./web_src/js/components/RepoCodeFrequency.vue"));try{Ai(t,{locale:{loadingTitle:e.getAttribute("data-locale-loading-title"),loadingTitleFailed:e.getAttribute("data-locale-loading-title-failed"),loadingInfo:e.getAttribute("data-locale-loading-info")}}).mount(e)}catch(i){console.error("RepoCodeFrequency failed to load",i),e.textContent=e.getAttribute("data-locale-component-failed-to-load")}}async function A1(){const e=document.querySelector("#repo-recent-commits-chart");if(!e)return;const{default:t}=await Promise.all([__webpack_require__.e("contributors-graph-code-frequency-graph-recent-commits-graph"),__webpack_require__.e("recent-commits-graph")]).then(__webpack_require__.bind(__webpack_require__,"./web_src/js/components/RepoRecentCommits.vue"));try{Ai(t,{locale:{loadingTitle:e.getAttribute("data-locale-loading-title"),loadingTitleFailed:e.getAttribute("data-locale-loading-title-failed"),loadingInfo:e.getAttribute("data-locale-loading-info")}}).mount(e)}catch(i){console.error("RepoRecentCommits failed to load",i),e.textContent=e.getAttribute("data-locale-component-failed-to-load")}}async function C1(e,t){t.classList.add("disabled");try{const n=await(await(0,Ae.fG)(t.getAttribute("data-fetch-url"))).json();(0,C.y9)(t),k1(e,n.tags),T1(e,n.branches,n.default_branch),(0,C.fi)(e.querySelectorAll(".branch-and-tag-detail"))}finally{t.classList.remove("disabled")}}function k1(e,t){const i=e.querySelector(".tag-area");(0,C.oi)(i.parentElement,t.length>0);for(const n of t)Jh(i,n.web_link,n.name)}function T1(e,t,i){const n=e.getAttribute("data-text-default-branch-tooltip"),s=e.querySelector(".branch-area");(0,C.oi)(s.parentElement,t.length>0);for(const l of t){const u=i===l.name?n:null;Jh(s,l.web_link,l.name,u)}}function Jh(e,t,i,n){const s=document.createElement("a");s.classList.add("muted","tw-px-1"),s.href=t,s.textContent=i,n&&(s.classList.add("tw-border","tw-border-secondary","tw-rounded"),s.setAttribute("data-tooltip-content",n)),e.append(s)}function L1(){for(const e of document.querySelectorAll(".branch-and-tag-area")){const t=e.querySelector(".load-branches-and-tags");t.addEventListener("click",()=>C1(e,t))}}function R1(){const e=document.querySelector("#repo-search-form");e&&e.addEventListener("change",t=>{t.preventDefault();const i=new URLSearchParams;for(const[n,s]of new FormData(e).entries())i.set(n,s.toString());t.target.name==="clear-filter"&&(i.delete("archived"),i.delete("fork"),i.delete("mirror"),i.delete("template"),i.delete("private")),i.delete("clear-filter"),window.location.search=i.toString()})}async function M1(){const e=document.querySelectorAll(".js-color-picker-input");if(e.length){await Promise.all([__webpack_require__.e("colorpicker").then(__webpack_require__.bind(__webpack_require__,"./node_modules/vanilla-colorful/hex-color-picker.js")),__webpack_require__.e("colorpicker").then(__webpack_require__.bind(__webpack_require__,"./web_src/css/features/colorpicker.css"))]);for(const t of e)D1(t)}}function Dc(e,t){e.style.color=/#[0-9a-f]{6}/i.test(t)?t:"transparent"}function Zh(e,t){e.setAttribute("color",t)}function D1(e){const t=e.querySelector("input"),i=document.createElement("div");i.classList.add("preview-square"),Dc(i,t.value),e.append(i);const n=document.createElement("hex-color-picker");n.addEventListener("color-changed",s=>{t.value=s.detail.value,t.focus(),Dc(i,s.detail.value)}),t.addEventListener("input",s=>{Dc(i,s.target.value),Zh(n,s.target.value)}),Ie(t,{trigger:"focus click",theme:"bare",hideOnClick:!0,content:n,placement:"bottom-start",interactive:!0,onShow(){Zh(n,t.value)}});for(const s of e.querySelectorAll(".precolors .color"))s.addEventListener("click",l=>{const u=l.target.getAttribute("data-color-hex");t.value=u,t.dispatchEvent(new Event("input",{bubbles:!0})),Dc(i,u)})}const{appSubUrl:O1}=window.config;async function q1(){const e=document.querySelector("#self-check-by-frontend");if(!e)return;const t=document.querySelector(".page-content.admin .admin-setting-content"),n=await(await(0,Ae.LO)(`${O1}/-/admin/self_check`,{data:new URLSearchParams({location_origin:window.location.origin,now:String(Date.now())})})).json();(0,C.oi)(e,!!n.problems?.length);for(const l of n.problems??[]){const u=document.createElement("div");u.classList.add("ui","warning","message"),u.textContent=l,e.append(u)}const s=!!t.querySelectorAll(".self-check-problem:not(.tw-hidden)").length;(0,C.oi)(t.querySelector(".self-check-no-problem"),!s)}function P1(){for(const e of document.querySelectorAll(".disable-setting"))e.addEventListener("change",t=>{document.querySelector(t.target.getAttribute("data-target")).classList.toggle("disabled",t.target.checked)})}const{appSubUrl:F1,i18n:I1}=window.config;function N1(e){const t=document.createElement("form"),i=document.createElement("input");t.method="post",t.action=`${F1}/-/fetch-redirect`,i.type="hidden",i.name="redirect",i.value=e,t.append(i),document.body.append(t),t.submit()}async function em(e,t,i){try{const n=await(0,Ae.Em)(t,i);if(n.status===200){let{redirect:s}=await n.json();s=s||e.getAttribute("data-redirect"),Ku(e),s?N1(s):window.location.reload();return}else if(n.status>=400&&n.status<500){const s=await n.json();s.errorMessage?gt(s.errorMessage,{useHtmlBody:s.renderFormat==="html"}):gt(`server error: ${n.status}`)}else gt(`server error: ${n.status}`)}catch(n){n.name!=="AbortError"&&(console.error("error when doRequest",n),gt(`${I1.network_error} ${n}`))}e.classList.remove("is-loading","loading-icon-2px")}async function H1(e,t){if(t.preventDefault(),e.classList.contains("is-loading"))return;e.classList.add("is-loading"),e.clientHeight<50&&e.classList.add("loading-icon-2px");const i=e.getAttribute("method")||"get",n=e.getAttribute("action"),s=new FormData(e),l=(0,C.IU)(t),[u,m]=[l?.getAttribute("name"),l?.getAttribute("value")];u&&s.append(u,m||"");let y=n;const A={method:i.toUpperCase(),body:null};if(i.toLowerCase()==="get"){const L=new URLSearchParams;for(const[X,_e]of s)L.append(X,_e.toString());const z=y.indexOf("?");z!==-1&&(y=y.slice(0,z)),y+=`?${L.toString()}`}else A.body=s;await em(e,y,A)}async function B1(e,t){t.preventDefault();const i=e.getAttribute("data-url"),n=async()=>{"disabled"in e&&(e.disabled=!0),await em(e,i,{method:e.getAttribute("data-link-action-method")||"POST"}),"disabled"in e&&(e.disabled=!1)},s=e.getAttribute("data-modal-confirm")||e.getAttribute("data-modal-confirm-content")||"";if(!s){await n();return}const l=e.classList.contains("red")||e.classList.contains("negative");await Wu({header:e.getAttribute("data-modal-confirm-header")||"",content:s,confirmButtonColor:l?"red":"primary"})&&await n()}function $1(){(0,C.ny)(document,"submit",".form-fetch-action",H1),(0,C.ny)(document,"click",".link-action",B1)}function U1(){(0,C.ny)(document,"keypress","div.ui.button, span.ui.button",(e,t)=>{(t.code==="Space"||t.code==="Enter")&&(t.preventDefault(),e.click())})}function V1(){for(const e of document.querySelectorAll(".delete-button"))e.addEventListener("click",t=>{t.preventDefault();const i=e.dataset,n=e.getAttribute("data-modal-id"),s=document.querySelector(`.delete.modal${n?`#${n}`:""}`),l=s.querySelector(".name");l&&(l.textContent=e.getAttribute("data-name"));for(const[u,m]of Object.entries(i))if(u.startsWith("data")){const y=s.querySelector(`.${u}`);y&&(y.textContent=m)}(0,ke.mD)(s).modal({closable:!1,onApprove:async()=>{if(e.getAttribute("data-type")==="form"){const y=e.getAttribute("data-form"),A=document.querySelector(y);if(!A)throw new Error(`no form named ${y} found`);A.submit()}const u=new FormData;for(const[y,A]of Object.entries(i))y.startsWith("data")&&u.append(y.slice(4),A),y==="id"&&u.append("id",A);const m=await(0,Ae.LO)(e.getAttribute("data-url"),{data:u});if(m.ok){const y=await m.json();window.location.href=y.redirect}}}).modal("show")})}function W1(e,t){t.preventDefault();const i=e.getAttribute("data-panel");e.classList.contains("toggle")?(0,C.oi)(i):(0,C.fi)(i)}function z1(e,t){t.preventDefault();let i=e.getAttribute("data-panel");if(i){(0,C.y9)(i);return}if(i=e.getAttribute("data-panel-closest"),i){(0,C.y9)(e.parentNode.closest(i));return}throw new Error("no panel to hide")}function K1(e,t,i){const n=(0,W.PT)(t),s=e[n];if(typeof s=="boolean")e[n]=i==="true";else if(typeof s=="number")e[n]=parseFloat(i);else if(typeof s=="string")e[n]=i;else if(s?.nodeName)e.setAttribute(t,i);else throw new Error(`cannot assign element property "${n}" by value "${i}"`)}function X1(e,t){t.preventDefault();const i=e.getAttribute("data-modal"),n=document.querySelector(i);if(!n)throw new Error("no modal for this action");const s="data-modal-";for(const l of e.attributes){if(!l.name.startsWith(s))continue;const u=l.name.substring(s.length),[m,y]=u.split("."),A=n.querySelector(`#${m}`)||n.querySelector(`[name=${m}]`)||n.querySelector(`.${m}`)||n.querySelector(`${m}`);if(!A){if(!window.config.runModeIsProd)throw new Error(`attr target "${u}" not found for modal`);continue}y?K1(A,y,l.value):A.matches("input, textarea")?A.value=l.value:A.textContent=l.value}(0,ke.mD)(n).modal("setting",{onApprove:()=>{if(n.querySelector(".form-fetch-action"))return!1}}).modal("show")}function G1(){(0,C.ny)(document,"click","form button.ui.cancel.button",(e,t)=>t.preventDefault()),(0,C.ny)(document,"click",".show-panel, .hide-panel, .show-modal",(e,t)=>{e.classList.contains("show-panel")?W1(e,t):e.classList.contains("hide-panel")?z1(e,t):e.classList.contains("show-modal")&&X1(e,t)})}function Q1(){s0(window.jQuery),document.querySelector(".page-content.user.signin")||zu("form:not(.ignore-dirty)")}function Y1(){document.addEventListener("keydown",e=>{if(e.key!=="Enter")return;(e.ctrlKey||e.metaKey)&&!e.altKey&&e.target.matches("textarea")?kc(e.target)&&e.preventDefault():e.target.matches("input")&&!e.target.closest("form")&&kc(e.target)&&e.preventDefault()})}function J1(){(0,C.jB)(document,".combo-markdown-editor:not(.custom-init)",e=>ma(e))}var Z1=Object.defineProperty,e5=(e,t,i)=>t in e?Z1(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i,t5=(e,t,i)=>e5(e,typeof t!="symbol"?t+"":t,i);class i5{constructor(){t5(this,"results",[])}recordCall(t,i){const n=performance.now();i(),this.results.push({name:t,dur:performance.now()-n})}printResults(){this.results=this.results.sort((t,i)=>i.dur-t.dur);for(let t=0;t<20&&t<this.results.length;t++)console.info(`performance trace: ${this.results[t].name} ${this.results[t].dur.toFixed(3)}`)}}function n5(e){const t=window.location.search.includes("_ui_performance_trace=1")?new i5:null;if(t)for(const i of e)t.recordCall(i.name,i);else for(const i of e)i();return t}const s5=["title"],r5={class:"item-content"},o5=["innerHTML"],a5={class:"gt-ellipsis tw-flex-1"},l5=["title"],c5={class:"item-content"},u5=["innerHTML"],d5={class:"gt-ellipsis tw-flex-1"},f5=["title"],h5={class:"item-content"},m5=["innerHTML"],p5={class:"gt-ellipsis tw-flex-1"},g5=["title"],v5={class:"item-toggle"},b5={class:"item-content"},_5=["innerHTML"],y5={class:"gt-ellipsis"},w5={key:4,class:"sub-items"};var S5=(0,c.pM)({__name:"ViewFileTreeItem",props:{item:{},navigateViewContent:{type:Function},loadChildren:{type:Function},selectedItem:{}},setup(e){const t=e,i=(0,Re.KR)(!1),n=(0,Re.KR)(t.item.children),s=(0,Re.KR)(!t.item.children),l=async()=>{if(s.value=!s.value,!s.value&&t.loadChildren){i.value=!0;try{n.value=await t.loadChildren(t.item.fullPath)}finally{i.value=!1}}},u=()=>{l(),t.navigateViewContent(t.item.fullPath)},m=()=>{t.navigateViewContent(t.item.fullPath)},y=()=>{location.href=t.item.submoduleUrl};return(A,L)=>{const z=(0,c.g2)("ViewFileTreeItem",!0);return(0,c.uX)(),(0,c.CE)(c.FK,null,[A.item.entryMode==="commit"?((0,c.uX)(),(0,c.CE)("div",{key:0,class:"tree-item type-submodule",title:A.item.entryName,onClick:Di(y,["stop"])},[(0,c.Q3)(" submodule "),(0,c.Lk)("div",r5,[(0,c.Q3)(" eslint-disable-next-line vue/no-v-html "),(0,c.Lk)("span",{class:"tw-contents",innerHTML:A.item.entryIcon},null,8,o5),(0,c.Lk)("span",a5,(0,W.v_)(A.item.entryName),1)])],8,s5)):A.item.entryMode==="symlink"?((0,c.uX)(),(0,c.CE)("div",{key:1,class:(0,W.C4)(["tree-item type-symlink",{selected:A.selectedItem===A.item.fullPath}]),title:A.item.entryName,onClick:Di(m,["stop"])},[(0,c.Q3)(" symlink "),(0,c.Lk)("div",c5,[(0,c.Q3)(" eslint-disable-next-line vue/no-v-html "),(0,c.Lk)("span",{class:"tw-contents",innerHTML:A.item.entryIcon},null,8,u5),(0,c.Lk)("span",d5,(0,W.v_)(A.item.entryName),1)])],10,l5)):A.item.entryMode!=="tree"?((0,c.uX)(),(0,c.CE)("div",{key:2,class:(0,W.C4)(["tree-item type-file",{selected:A.selectedItem===A.item.fullPath}]),title:A.item.entryName,onClick:Di(m,["stop"])},[(0,c.Q3)(" file "),(0,c.Lk)("div",h5,[(0,c.Q3)(" eslint-disable-next-line vue/no-v-html "),(0,c.Lk)("span",{class:"tw-contents",innerHTML:A.item.entryIcon},null,8,m5),(0,c.Lk)("span",p5,(0,W.v_)(A.item.entryName),1)])],10,f5)):((0,c.uX)(),(0,c.CE)("div",{key:3,class:(0,W.C4)(["tree-item type-directory",{selected:A.selectedItem===A.item.fullPath}]),title:A.item.entryName,onClick:Di(u,["stop"])},[(0,c.Q3)(" directory "),(0,c.Lk)("div",v5,[i.value?((0,c.uX)(),(0,c.Wv)((0,Re.R1)(Z.Ah),{key:0,name:"octicon-sync",class:"circular-spin"})):((0,c.uX)(),(0,c.Wv)((0,Re.R1)(Z.Ah),{key:1,name:s.value?"octicon-chevron-right":"octicon-chevron-down",onClick:Di(l,["stop"])},null,8,["name"]))]),(0,c.Lk)("div",b5,[(0,c.Q3)(" eslint-disable-next-line vue/no-v-html "),(0,c.Lk)("span",{class:"tw-contents",innerHTML:!s.value&&A.item.entryIconOpen?A.item.entryIconOpen:A.item.entryIcon},null,8,_5),(0,c.Lk)("span",y5,(0,W.v_)(A.item.entryName),1)])],10,g5)),n.value?.length?(0,c.bo)(((0,c.uX)(),(0,c.CE)("div",w5,[((0,c.uX)(!0),(0,c.CE)(c.FK,null,(0,c.pI)(n.value,X=>((0,c.uX)(),(0,c.Wv)(z,{key:X.entryName,item:X,"selected-item":A.selectedItem,"navigate-view-content":A.navigateViewContent,"load-children":A.loadChildren},null,8,["item","selected-item","navigate-view-content","load-children"]))),128))],512)),[[ti,!s.value]]):(0,c.Q3)("v-if",!0)],64)}}}),x5=(0,Xi.A)(S5,[["__scopeId","data-v-cbbebcae"]]),j5=(0,c.pM)({__name:"ViewFileTree",props:{repoLink:{type:String,required:!0},treePath:{type:String,required:!0},currentRefNameSubURL:{type:String,required:!0}},setup(e){const t=(0,Re.KR)(null),i=e,n=(0,Re.KR)([]),s=(0,Re.KR)("");async function l(y,A=""){const z=await(await(0,Ae.fG)(`${i.repoLink}/tree-view/${i.currentRefNameSubURL}/${(0,pr.ZP)(y)}?sub_path=${encodeURIComponent(A)}`)).json(),X=[];for(const[_e,pe]of Object.entries(z.renderedIconPool??{}))document.querySelector(`.global-svg-icon-pool #${_e}`)||X.push(pe);if(X.length){const _e=(0,C.SL)('<div class="global-svg-icon-pool tw-hidden"></div>');_e.innerHTML=X.join(""),document.body.append(_e)}return z.fileTreeNodes??null}async function u(y){y=y.includes("?")?y.replace("?","?only_content=true"):`${y}?only_content=true`;const A=await(0,Ae.fG)(y);document.querySelector(".repo-view-content").innerHTML=await A.text()}async function m(y){const A=`${i.repoLink}/src/${i.currentRefNameSubURL}/${(0,pr.ZP)(y)}`;window.history.pushState({treePath:y,url:A},null,A),s.value=y,await u(A)}return(0,c.sV)(async()=>{s.value=i.treePath,n.value=await l("",i.treePath),t.value.closest(".is-loading")?.classList?.remove("is-loading"),window.addEventListener("popstate",y=>{s.value=y.state?.treePath||"",y.state?.url&&u(y.state.url)})}),(y,A)=>((0,c.uX)(),(0,c.CE)("div",{class:"view-file-tree-items",ref_key:"elRoot",ref:t},[(0,c.Q3)(" only render the tree if we're visible. in many cases this is something that doesn't change very often "),((0,c.uX)(!0),(0,c.CE)(c.FK,null,(0,c.pI)(n.value,L=>((0,c.uX)(),(0,c.Wv)(x5,{key:L.name,item:L,"selected-item":s.value,"navigate-view-content":m,"load-children":l},null,8,["item","selected-item"]))),128))],512))}}),E5=(0,Xi.A)(j5,[["__scopeId","data-v-20c25596"]]);const{appSubUrl:A5}=window.config;async function C5(e){const t=document.querySelector(".repo-view-file-tree-toggle-show"),i=document.querySelector(".repo-view-file-tree-container"),n=e.getAttribute("data-toggle-action")==="show";(0,C.oi)(i,n),(0,C.oi)(t,!n),i.hasAttribute("data-user-is-signed-in")&&await(0,Ae.LO)(`${A5}/user/settings/update_preferences`,{data:{codeViewShowFileTree:n}})}async function k5(){const e=document.querySelector(".repo-view-file-tree-container"),t=document.querySelector(".repo-view-content");if(!e||!t)return;_c("click","onRepoViewFileTreeToggle",C5);const i=e.querySelector("#view-file-tree");Ai(E5,{repoLink:i.getAttribute("data-repo-link"),treePath:i.getAttribute("data-tree-path"),currentRefNameSubURL:i.getAttribute("data-current-ref-name-sub-url")}).mount(i)}Pb(),(0,C.Gz)(),(0,C.Pm)(()=>{const e=performance.now(),t=n5([Yp,Gp,Qp,$1,Ot,U1,G1,ui,Y1,Q1,J1,V1,Zp,yb,x1,db,pb,fb,Kp,Xp,jl,gm,Ld,pp,Up,J0,Ep,cp,Mp,ew,z0,dp,hp,q1,Pi,_p,Kd,Zv,Qm,Gm,gb,Y0,Jy,$0,L1,a0,he,tf,v1,k0,A0,ip,ev,lp,R0,D0,ob,ab,V0,k5,Ib,Zy,f1,R1,j1,E1,A1,U0,tw,tg,ig,eb,sb,Z0,Gv,Vp,M1,P1]);$p(t),t&&t.printResults();const i=performance.now()-e;i>500&&console.error(`slow init functions took ${i.toFixed(3)}ms`)})}(),function(){"use strict"}(),function(){"use strict"}(),function(){"use strict"}()})();
DesignScreenshot/output/gitee_run/gitee.com_4_after_login.html:4:},{debug:10,parseuri:42}],7:[function(e,t){function n(e){e=e||{},this.ms=e.min||100,this.max=e.max||1e4,this.factor=e.factor||2,this.jitter=e.jitter>0&&e.jitter<=1?e.jitter:0,this.attempts=0}t.exports=n,n.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=0==(1&Math.floor(10*t))?e-n:e+n}return 0|Math.min(e,this.max)},n.prototype.reset=function(){this.attempts=0},n.prototype.setMin=function(e){this.ms=e},n.prototype.setMax=function(e){this.max=e},n.prototype.setJitter=function(e){this.jitter=e}},{}],8:[function(e,t){var n=[].slice;t.exports=function(e,t){if("string"==typeof t&&(t=e[t]),"function"!=typeof t)throw new Error("bind() requires a function");var o=n.call(arguments,2);return function(){return t.apply(e,o.concat(n.call(arguments)))}}},{}],9:[function(e,t){function n(e){return e?o(e):void 0}function o(e){for(var t in n.prototype)e[t]=n.prototype[t];return e}t.exports=n,n.prototype.on=n.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks[e]=this._callbacks[e]||[]).push(t),this},n.prototype.once=function(e,t){function n(){o.off(e,n),t.apply(this,arguments)}var o=this;return this._callbacks=this._callbacks||{},n.fn=t,this.on(e,n),this},n.prototype.off=n.prototype.removeListener=n.prototype.removeAllListeners=n.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var n=this._callbacks[e];if(!n)return this;if(1==arguments.length)return delete this._callbacks[e],this;for(var o,i=0;i<n.length;i++)if(o=n[i],o===t||o.fn===t){n.splice(i,1);break}return this},n.prototype.emit=function(e){this._callbacks=this._callbacks||{};var t=[].slice.call(arguments,1),n=this._callbacks[e];if(n){n=n.slice(0);for(var o=0,i=n.length;i>o;++o)n[o].apply(this,t)}return this},n.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks[e]||[]},n.prototype.hasListeners=function(e){return!!this.listeners(e).length}},{}],10:[function(e,t){function n(e){return n.enabled(e)?function(t){t=o(t);var i=new Date,r=i-(n[e]||i);n[e]=i,t=e+" "+t+" +"+n.humanize(r),window.console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}:function(){}}function o(e){return e instanceof Error?e.stack||e.message:e}t.exports=n,n.names=[],n.skips=[],n.enable=function(e){try{localStorage.debug=e}catch(t){}for(var o=(e||"").split(/[\s,]+/),i=o.length,r=0;i>r;r++)e=o[r].replace("*",".*?"),"-"===e[0]?n.skips.push(new RegExp("^"+e.substr(1)+"$")):n.names.push(new RegExp("^"+e+"$"))},n.disable=function(){n.enable("")},n.humanize=function(e){var t=1e3,n=6e4,o=60*n;return e>=o?(e/o).toFixed(1)+"h":e>=n?(e/n).toFixed(1)+"m":e>=t?(e/t|0)+"s":e+"ms"},n.enabled=function(e){for(var t=0,o=n.skips.length;o>t;t++)if(n.skips[t].test(e))return!1;for(var t=0,o=n.names.length;o>t;t++)if(n.names[t].test(e))return!0;return!1};try{window.localStorage&&n.enable(localStorage.debug)}catch(i){}},{}],11:[function(e,t){t.exports=e("./lib/")},{"./lib/":12}],12:[function(e,t){t.exports=e("./socket"),t.exports.parser=e("engine.io-parser")},{"./socket":13,"engine.io-parser":25}],13:[function(e,t){(function(n){function o(e,t){if(!(this instanceof o))return new o(e,t);if(t=t||{},e&&"object"==typeof e&&(t=e,e=null),e&&(e=u(e),t.host=e.host,t.secure="https"==e.protocol||"wss"==e.protocol,t.port=e.port,e.query&&(t.query=e.query)),this.secure=null!=t.secure?t.secure:n.location&&"https:"==location.protocol,t.host){var i=t.host.split(":");t.hostname=i.shift(),i.length?t.port=i.pop():t.port||(t.port=this.secure?"443":"80")}this.agent=t.agent||!1,this.hostname=t.hostname||(n.location?location.hostname:"localhost"),this.port=t.port||(n.location&&location.port?location.port:this.secure?443:80),this.query=t.query||{},"string"==typeof this.query&&(this.query=f.decode(this.query)),this.upgrade=!1!==t.upgrade,this.path=(t.path||"/engine.io").replace(/\/$/,"")+"/",this.forceJSONP=!!t.forceJSONP,this.jsonp=!1!==t.jsonp,this.forceBase64=!!t.forceBase64,this.enablesXDR=!!t.enablesXDR,this.timestampParam=t.timestampParam||"t",this.timestampRequests=t.timestampRequests,this.transports=t.transports||["polling","websocket"],this.readyState="",this.writeBuffer=[],this.callbackBuffer=[],this.policyPort=t.policyPort||843,this.rememberUpgrade=t.rememberUpgrade||!1,this.binaryType=null,this.onlyBinaryUpgrades=t.onlyBinaryUpgrades,this.pfx=t.pfx||null,this.key=t.key||null,this.passphrase=t.passphrase||null,this.cert=t.cert||null,this.ca=t.ca||null,this.ciphers=t.ciphers||null,this.rejectUnauthorized=t.rejectUnauthorized||null,this.open()}function i(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}var r=e("./transports"),a=e("component-emitter"),s=e("debug")("engine.io-client:socket"),c=e("indexof"),l=e("engine.io-parser"),u=e("parseuri"),p=e("parsejson"),f=e("parseqs");t.exports=o,o.priorWebsocketSuccess=!1,a(o.prototype),o.protocol=l.protocol,o.Socket=o,o.Transport=e("./transport"),o.transports=e("./transports"),o.parser=e("engine.io-parser"),o.prototype.createTransport=function(e){s('creating transport "%s"',e);var t=i(this.query);t.EIO=l.protocol,t.transport=e,this.id&&(t.sid=this.id);var n=new r[e]({agent:this.agent,hostname:this.hostname,port:this.port,secure:this.secure,path:this.path,query:t,forceJSONP:this.forceJSONP,jsonp:this.jsonp,forceBase64:this.forceBase64,enablesXDR:this.enablesXDR,timestampRequests:this.timestampRequests,timestampParam:this.timestampParam,policyPort:this.policyPort,socket:this,pfx:this.pfx,key:this.key,passphrase:this.passphrase,cert:this.cert,ca:this.ca,ciphers:this.ciphers,rejectUnauthorized:this.rejectUnauthorized});return n},o.prototype.open=function(){var e;if(this.rememberUpgrade&&o.priorWebsocketSuccess&&-1!=this.transports.indexOf("websocket"))e="websocket";else{if(0==this.transports.length){var t=this;return void setTimeout(function(){t.emit("error","No transports available")},0)}e=this.transports[0]}this.readyState="opening";var e;try{e=this.createTransport(e)}catch(n){return this.transports.shift(),void this.open()}e.open(),this.setTransport(e)},o.prototype.setTransport=function(e){s("setting transport %s",e.name);var t=this;this.transport&&(s("clearing existing transport %s",this.transport.name),this.transport.removeAllListeners()),this.transport=e,e.on("drain",function(){t.onDrain()}).on("packet",function(e){t.onPacket(e)}).on("error",function(e){t.onError(e)}).on("close",function(){t.onClose("transport close")})},o.prototype.probe=function(e){function t(){if(f.onlyBinaryUpgrades){var t=!this.supportsBinary&&f.transport.supportsBinary;p=p||t}p||(s('probe transport "%s" opened',e),u.send([{type:"ping",data:"probe"}]),u.once("packet",function(t){if(!p)if("pong"==t.type&&"probe"==t.data){if(s('probe transport "%s" pong',e),f.upgrading=!0,f.emit("upgrading",u),!u)return;o.priorWebsocketSuccess="websocket"==u.name,s('pausing current transport "%s"',f.transport.name),f.transport.pause(function(){p||"closed"!=f.readyState&&(s("changing transport and sending upgrade packet"),l(),f.setTransport(u),u.send([{type:"upgrade"}]),f.emit("upgrade",u),u=null,f.upgrading=!1,f.flush())})}else{s('probe transport "%s" failed',e);var n=new Error("probe error");n.transport=u.name,f.emit("upgradeError",n)}}))}function n(){p||(p=!0,l(),u.close(),u=null)}function i(t){var o=new Error("probe error: "+t);o.transport=u.name,n(),s('probe transport "%s" failed because of error: %s',e,t),f.emit("upgradeError",o)}function r(){i("transport closed")}function a(){i("socket closed")}function c(e){u&&e.name!=u.name&&(s('"%s" works - aborting "%s"',e.name,u.name),n())}function l(){u.removeListener("open",t),u.removeListener("error",i),u.removeListener("close",r),f.removeListener("close",a),f.removeListener("upgrading",c)}s('probing transport "%s"',e);var u=this.createTransport(e,{probe:1}),p=!1,f=this;o.priorWebsocketSuccess=!1,u.once("open",t),u.once("error",i),u.once("close",r),this.once("close",a),this.once("upgrading",c),u.open()},o.prototype.onOpen=function(){if(s("socket open"),this.readyState="open",o.priorWebsocketSuccess="websocket"==this.transport.name,this.emit("open"),this.flush(),"open"==this.readyState&&this.upgrade&&this.transport.pause){s("starting upgrade probes");for(var e=0,t=this.upgrades.length;t>e;e++)this.probe(this.upgrades[e])}},o.prototype.onPacket=function(e){if("opening"==this.readyState||"open"==this.readyState)switch(s('socket receive: type "%s", data "%s"',e.type,e.data),this.emit("packet",e),this.emit("heartbeat"),e.type){case"open":this.onHandshake(p(e.data));break;case"pong":this.setPing();break;case"error":var t=new Error("server error");t.code=e.data,this.emit("error",t);break;case"message":this.emit("data",e.data),this.emit("message",e.data)}else s('packet received with socket readyState "%s"',this.readyState)},o.prototype.onHandshake=function(e){this.emit("handshake",e),this.id=e.sid,this.transport.query.sid=e.sid,this.upgrades=this.filterUpgrades(e.upgrades),this.pingInterval=e.pingInterval,this.pingTimeout=e.pingTimeout,this.onOpen(),"closed"!=this.readyState&&(this.setPing(),this.removeListener("heartbeat",this.onHeartbeat),this.on("heartbeat",this.onHeartbeat))},o.prototype.onHeartbeat=function(e){clearTimeout(this.pingTimeoutTimer);var t=this;t.pingTimeoutTimer=setTimeout(function(){"closed"!=t.readyState&&t.onClose("ping timeout")},e||t.pingInterval+t.pingTimeout)},o.prototype.setPing=function(){var e=this;clearTimeout(e.pingIntervalTimer),e.pingIntervalTimer=setTimeout(function(){s("writing ping packet - expecting pong within %sms",e.pingTimeout),e.ping(),e.onHeartbeat(e.pingTimeout)},e.pingInterval)},o.prototype.ping=function(){this.sendPacket("ping")},o.prototype.onDrain=function(){for(var e=0;e<this.prevBufferLen;e++)this.callbackBuffer[e]&&this.callbackBuffer[e]();this.writeBuffer.splice(0,this.prevBufferLen),this.callbackBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,0==this.writeBuffer.length?this.emit("drain"):this.flush()},o.prototype.flush=function(){"closed"!=this.readyState&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length&&(s("flushing %d packets in socket",this.writeBuffer.length),this.transport.send(this.writeBuffer),this.prevBufferLen=this.writeBuffer.length,this.emit("flush"))},o.prototype.write=o.prototype.send=function(e,t){return this.sendPacket("message",e,t),this},o.prototype.sendPacket=function(e,t,n){if("closing"!=this.readyState&&"closed"!=this.readyState){var o={type:e,data:t};this.emit("packetCreate",o),this.writeBuffer.push(o),this.callbackBuffer.push(n),this.flush()}},o.prototype.close=function(){function e(){o.onClose("forced close"),s("socket closing - telling transport to close"),o.transport.close()}function t(){o.removeListener("upgrade",t),o.removeListener("upgradeError",t),e()}function n(){o.once("upgrade",t),o.once("upgradeError",t)}if("opening"==this.readyState||"open"==this.readyState){this.readyState="closing";var o=this;this.writeBuffer.length?this.once("drain",function(){this.upgrading?n():e()}):this.upgrading?n():e()}return this},o.prototype.onError=function(e){s("socket error %j",e),o.priorWebsocketSuccess=!1,this.emit("error",e),this.onClose("transport error",e)},o.prototype.onClose=function(e,t){if("opening"==this.readyState||"open"==this.readyState||"closing"==this.readyState){s('socket close with reason: "%s"',e);var n=this;clearTimeout(this.pingIntervalTimer),clearTimeout(this.pingTimeoutTimer),setTimeout(function(){n.writeBuffer=[],n.callbackBuffer=[],n.prevBufferLen=0},0),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),this.readyState="closed",this.id=null,this.emit("close",e,t)}},o.prototype.filterUpgrades=function(e){for(var t=[],n=0,o=e.length;o>n;n++)~c(this.transports,e[n])&&t.push(e[n]);return t}}).call(this,"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./transport":14,"./transports":15,"component-emitter":9,debug:22,"engine.io-parser":25,indexof:40,parsejson:32,parseqs:33,parseuri:34}],14:[function(e,t){function n(e){this.path=e.path,this.hostname=e.hostname,this.port=e.port,this.secure=e.secure,this.query=e.query,this.timestampParam=e.timestampParam,this.timestampRequests=e.timestampRequests,this.readyState="",this.agent=e.agent||!1,this.socket=e.socket,this.enablesXDR=e.enablesXDR,this.pfx=e.pfx,this.key=e.key,this.passphrase=e.passphrase,this.cert=e.cert,this.ca=e.ca,this.ciphers=e.ciphers,this.rejectUnauthorized=e.rejectUnauthorized}var o=e("engine.io-parser"),i=e("component-emitter");t.exports=n,i(n.prototype),n.timestamps=0,n.prototype.onError=function(e,t){var n=new Error(e);return n.type="TransportError",n.description=t,this.emit("error",n),this},n.prototype.open=function(){return("closed"==this.readyState||""==this.readyState)&&(this.readyState="opening",this.doOpen()),this},n.prototype.close=function(){return("opening"==this.readyState||"open"==this.readyState)&&(this.doClose(),this.onClose()),this},n.prototype.send=function(e){if("open"!=this.readyState)throw new Error("Transport not open");this.write(e)},n.prototype.onOpen=function(){this.readyState="open",this.writable=!0,this.emit("open")},n.prototype.onData=function(e){var t=o.decodePacket(e,this.socket.binaryType);this.onPacket(t)},n.prototype.onPacket=function(e){this.emit("packet",e)},n.prototype.onClose=function(){this.readyState="closed",this.emit("close")}},{"component-emitter":9,"engine.io-parser":25}],15:[function(e,t,n){(function(t){function o(e){var n,o=!1,s=!1,c=!1!==e.jsonp;if(t.location){var l="https:"==location.protocol,u=location.port;u||(u=l?443:80),o=e.hostname!=location.hostname||u!=e.port,s=e.secure!=l}if(e.xdomain=o,e.xscheme=s,n=new i(e),"open"in n&&!e.forceJSONP)return new r(e);if(!c)throw new Error("JSONP disabled");return new a(e)}var i=e("xmlhttprequest"),r=e("./polling-xhr"),a=e("./polling-jsonp"),s=e("./websocket");n.polling=o,n.websocket=s}).call(this,"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./polling-jsonp":16,"./polling-xhr":17,"./websocket":19,xmlhttprequest:20}],16:[function(e,t){(function(n){function o(){}function i(e){r.call(this,e),this.query=this.query||{},s||(n.___eio||(n.___eio=[]),s=n.___eio),this.index=s.length;var t=this;s.push(function(e){t.onData(e)}),this.query.j=this.index,n.document&&n.addEventListener&&n.addEventListener("beforeunload",function(){t.script&&(t.script.onerror=o)},!1)}var r=e("./polling"),a=e("component-inherit");t.exports=i;var s,c=/\n/g,l=/\\n/g;a(i,r),i.prototype.supportsBinary=!1,i.prototype.doClose=function(){this.script&&(this.script.parentNode.removeChild(this.script),this.script=null),this.form&&(this.form.parentNode.removeChild(this.form),this.form=null,this.iframe=null),r.prototype.doClose.call(this)},i.prototype.doPoll=function(){var e=this,t=document.createElement("script");this.script&&(this.script.parentNode.removeChild(this.script),this.script=null),t.async=!0,t.src=this.uri(),t.onerror=function(t){e.onError("jsonp poll error",t)};var n=document.getElementsByTagName("script")[0];n.parentNode.insertBefore(t,n),this.script=t;var o="undefined"!=typeof navigator&&/gecko/i.test(navigator.userAgent);o&&setTimeout(function(){var e=document.createElement("iframe");document.body.appendChild(e),document.body.removeChild(e)},100)},i.prototype.doWrite=function(e,t){function n(){o(),t()}function o(){if(i.iframe)try{i.form.removeChild(i.iframe)}catch(e){i.onError("jsonp polling iframe removal error",e)}try{var t='<iframe src="javascript:0" name="'+i.iframeId+'">';r=document.createElement(t)}catch(e){r=document.createElement("iframe"),r.name=i.iframeId,r.src="javascript:0"}r.id=i.iframeId,i.form.appendChild(r),i.iframe=r}var i=this;if(!this.form){var r,a=document.createElement("form"),s=document.createElement("textarea"),u=this.iframeId="eio_iframe_"+this.index;a.className="socketio",a.style.position="absolute",a.style.top="-1000px",a.style.left="-1000px",a.target=u,a.method="POST",a.setAttribute("accept-charset","utf-8"),s.name="d",a.appendChild(s),document.body.appendChild(a),this.form=a,this.area=s}this.form.action=this.uri(),o(),e=e.replace(l,"\\\n"),this.area.value=e.replace(c,"\\n");try{this.form.submit()}catch(p){}this.iframe.attachEvent?this.iframe.onreadystatechange=function(){"complete"==i.iframe.readyState&&n()}:this.iframe.onload=n}}).call(this,"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./polling":18,"component-inherit":21}],17:[function(e,t){(function(n){function o(){}function i(e){if(c.call(this,e),n.location){var t="https:"==location.protocol,o=location.port;o||(o=t?443:80),this.xd=e.hostname!=n.location.hostname||o!=e.port,this.xs=e.secure!=t}}function r(e){this.method=e.method||"GET",this.uri=e.uri,this.xd=!!e.xd,this.xs=!!e.xs,this.async=!1!==e.async,this.data=void 0!=e.data?e.data:null,this.agent=e.agent,this.isBinary=e.isBinary,this.supportsBinary=e.supportsBinary,this.enablesXDR=e.enablesXDR,this.pfx=e.pfx,this.key=e.key,this.passphrase=e.passphrase,this.cert=e.cert,this.ca=e.ca,this.ciphers=e.ciphers,this.rejectUnauthorized=e.rejectUnauthorized,this.create()}function a(){for(var e in r.requests)r.requests.hasOwnProperty(e)&&r.requests[e].abort()}var s=e("xmlhttprequest"),c=e("./polling"),l=e("component-emitter"),u=e("component-inherit"),p=e("debug")("engine.io-client:polling-xhr");t.exports=i,t.exports.Request=r,u(i,c),i.prototype.supportsBinary=!0,i.prototype.request=function(e){return e=e||{},e.uri=this.uri(),e.xd=this.xd,e.xs=this.xs,e.agent=this.agent||!1,e.supportsBinary=this.supportsBinary,e.enablesXDR=this.enablesXDR,e.pfx=this.pfx,e.key=this.key,e.passphrase=this.passphrase,e.cert=this.cert,e.ca=this.ca,e.ciphers=this.ciphers,e.rejectUnauthorized=this.rejectUnauthorized,new r(e)},i.prototype.doWrite=function(e,t){var n="string"!=typeof e&&void 0!==e,o=this.request({method:"POST",data:e,isBinary:n}),i=this;o.on("success",t),o.on("error",function(e){i.onError("xhr post error",e)}),this.sendXhr=o},i.prototype.doPoll=function(){p("xhr poll");var e=this.request(),t=this;e.on("data",function(e){t.onData(e)}),e.on("error",function(e){t.onError("xhr poll error",e)}),this.pollXhr=e},l(r.prototype),r.prototype.create=function(){var e={agent:this.agent,xdomain:this.xd,xscheme:this.xs,enablesXDR:this.enablesXDR};e.pfx=this.pfx,e.key=this.key,e.passphrase=this.passphrase,e.cert=this.cert,e.ca=this.ca,e.ciphers=this.ciphers,e.rejectUnauthorized=this.rejectUnauthorized;var t=this.xhr=new s(e),o=this;try{if(p("xhr open %s: %s",this.method,this.uri),t.open(this.method,this.uri,this.async),this.supportsBinary&&(t.responseType="arraybuffer"),"POST"==this.method)try{this.isBinary?t.setRequestHeader("Content-type","application/octet-stream"):t.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(i){}"withCredentials"in t&&(t.withCredentials=!0),this.hasXDR()?(t.onload=function(){o.onLoad()},t.onerror=function(){o.onError(t.responseText)}):t.onreadystatechange=function(){4==t.readyState&&(200==t.status||1223==t.status?o.onLoad():setTimeout(function(){o.onError(t.status)},0))},p("xhr data %s",this.data),t.send(this.data)}catch(i){return void setTimeout(function(){o.onError(i)},0)}n.document&&(this.index=r.requestsCount++,r.requests[this.index]=this)},r.prototype.onSuccess=function(){this.emit("success"),this.cleanup()},r.prototype.onData=function(e){this.emit("data",e),this.onSuccess()},r.prototype.onError=function(e){this.emit("error",e),this.cleanup(!0)},r.prototype.cleanup=function(e){if("undefined"!=typeof this.xhr&&null!==this.xhr){if(this.hasXDR()?this.xhr.onload=this.xhr.onerror=o:this.xhr.onreadystatechange=o,e)try{this.xhr.abort()}catch(t){}n.document&&delete r.requests[this.index],this.xhr=null}},r.prototype.onLoad=function(){var e;try{var t;try{t=this.xhr.getResponseHeader("Content-Type").split(";")[0]}catch(n){}e="application/octet-stream"===t?this.xhr.response:this.supportsBinary?"ok":this.xhr.responseText}catch(n){this.onError(n)}null!=e&&this.onData(e)},r.prototype.hasXDR=function(){return"undefined"!=typeof n.XDomainRequest&&!this.xs&&this.enablesXDR},r.prototype.abort=function(){this.cleanup()},n.document&&(r.requestsCount=0,r.requests={},n.attachEvent?n.attachEvent("onunload",a):n.addEventListener&&n.addEventListener("beforeunload",a,!1))}).call(this,"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./polling":18,"component-emitter":9,"component-inherit":21,debug:22,xmlhttprequest:20}],18:[function(e,t){function n(e){var t=e&&e.forceBase64;(!c||t)&&(this.supportsBinary=!1),o.call(this,e)}var o=e("../transport"),i=e("parseqs"),r=e("engine.io-parser"),a=e("component-inherit"),s=e("debug")("engine.io-client:polling");t.exports=n;var c=function(){var t=e("xmlhttprequest"),n=new t({xdomain:!1});return null!=n.responseType}();a(n,o),n.prototype.name="polling",n.prototype.doOpen=function(){this.poll()},n.prototype.pause=function(e){function t(){s("paused"),n.readyState="paused",e()}var n=this;if(this.readyState="pausing",this.polling||!this.writable){var o=0;this.polling&&(s("we are currently polling - waiting to pause"),o++,this.once("pollComplete",function(){s("pre-pause polling complete"),--o||t()})),this.writable||(s("we are currently writing - waiting to pause"),o++,this.once("drain",function(){s("pre-pause writing complete"),--o||t()}))}else t()},n.prototype.poll=function(){s("polling"),this.polling=!0,this.doPoll(),this.emit("poll")},n.prototype.onData=function(e){var t=this;s("polling got data %s",e);var n=function(e){return"opening"==t.readyState&&t.onOpen(),"close"==e.type?(t.onClose(),!1):void t.onPacket(e)};r.decodePayload(e,this.socket.binaryType,n),"closed"!=this.readyState&&(this.polling=!1,this.emit("pollComplete"),"open"==this.readyState?this.poll():s('ignoring poll - transport state "%s"',this.readyState))},n.prototype.doClose=function(){function e(){s("writing close packet"),t.write([{type:"close"}])}var t=this;"open"==this.readyState?(s("transport open - closing"),e()):(s("transport not open - deferring close"),this.once("open",e))},n.prototype.write=function(e){var t=this;this.writable=!1;var n=function(){t.writable=!0,t.emit("drain")},t=this;r.encodePayload(e,this.supportsBinary,function(e){t.doWrite(e,n)})},n.prototype.uri=function(){var e=this.query||{},t=this.secure?"https":"http",n="";return!1!==this.timestampRequests&&(e[this.timestampParam]=+new Date+"-"+o.timestamps++),this.supportsBinary||e.sid||(e.b64=1),e=i.encode(e),this.port&&("https"==t&&443!=this.port||"http"==t&&80!=this.port)&&(n=":"+this.port),e.length&&(e="?"+e),t+"://"+this.hostname+n+this.path+e}},{"../transport":14,"component-inherit":21,debug:22,"engine.io-parser":25,parseqs:33,xmlhttprequest:20}],19:[function(e,t){function n(e){var t=e&&e.forceBase64;t&&(this.supportsBinary=!1),o.call(this,e)}var o=e("../transport"),i=e("engine.io-parser"),r=e("parseqs"),a=e("component-inherit"),s=e("debug")("engine.io-client:websocket"),c=e("ws");t.exports=n,a(n,o),n.prototype.name="websocket",n.prototype.supportsBinary=!0,n.prototype.doOpen=function(){if(this.check()){var e=this.uri(),t=void 0,n={agent:this.agent};n.pfx=this.pfx,n.key=this.key,n.passphrase=this.passphrase,n.cert=this.cert,n.ca=this.ca,n.ciphers=this.ciphers,n.rejectUnauthorized=this.rejectUnauthorized,this.ws=new c(e,t,n),void 0===this.ws.binaryType&&(this.supportsBinary=!1),this.ws.binaryType="arraybuffer",this.addEventListeners()}},n.prototype.addEventListeners=function(){var e=this;this.ws.onopen=function(){e.onOpen()},this.ws.onclose=function(){e.onClose()},this.ws.onmessage=function(t){e.onData(t.data)},this.ws.onerror=function(t){e.onError("websocket error",t)}},"undefined"!=typeof navigator&&/iPad|iPhone|iPod/i.test(navigator.userAgent)&&(n.prototype.onData=function(e){var t=this;setTimeout(function(){o.prototype.onData.call(t,e)},0)}),n.prototype.write=function(e){function t(){n.writable=!0,n.emit("drain")}var n=this;this.writable=!1;for(var o=0,r=e.length;r>o;o++)i.encodePacket(e[o],this.supportsBinary,function(e){try{n.ws.send(e)}catch(t){s("websocket closed before onclose event")}});setTimeout(t,0)},n.prototype.onClose=function(){o.prototype.onClose.call(this)},n.prototype.doClose=function(){"undefined"!=typeof this.ws&&this.ws.close()},n.prototype.uri=function(){var e=this.query||{},t=this.secure?"wss":"ws",n="";return this.port&&("wss"==t&&443!=this.port||"ws"==t&&80!=this.port)&&(n=":"+this.port),this.timestampRequests&&(e[this.timestampParam]=+new Date),this.supportsBinary||(e.b64=1),e=r.encode(e),e.length&&(e="?"+e),t+"://"+this.hostname+n+this.path+e},n.prototype.check=function(){return!(!c||"__initialize"in c&&this.name===n.prototype.name)}},{"../transport":14,"component-inherit":21,debug:22,"engine.io-parser":25,parseqs:33,ws:35}],20:[function(e,t){var n=e("has-cors");t.exports=function(e){var t=e.xdomain,o=e.xscheme,i=e.enablesXDR;try{if("undefined"!=typeof XMLHttpRequest&&(!t||n))return new XMLHttpRequest}catch(r){}try{if("undefined"!=typeof XDomainRequest&&!o&&i)return new XDomainRequest}catch(r){}if(!t)try{return new ActiveXObject("Microsoft.XMLHTTP")}catch(r){}}},{"has-cors":38}],21:[function(e,t){t.exports=function(e,t){var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},{}],22:[function(e,t,n){function o(){return"WebkitAppearance"in document.documentElement.style||window.console&&(console.firebug||console.exception&&console.table)||navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31}function i(){var e=arguments,t=this.useColors;if(e[0]=(t?"%c":"")+this.namespace+(t?" %c":" ")+e[0]+(t?"%c ":" ")+"+"+n.humanize(this.diff),!t)return e;var o="color: "+this.color;e=[e[0],o,"color: inherit"].concat(Array.prototype.slice.call(e,1));var i=0,r=0;return e[0].replace(/%[a-z%]/g,function(e){"%%"!==e&&(i++,"%c"===e&&(r=i))}),e.splice(r,0,o),e}function r(){return"object"==typeof console&&"function"==typeof console.log&&Function.prototype.apply.call(console.log,console,arguments)}function a(e){try{null==e?localStorage.removeItem("debug"):localStorage.debug=e}catch(t){}}function s(){var e;try{e=localStorage.debug}catch(t){}return e}n=t.exports=e("./debug"),n.log=r,n.formatArgs=i,n.save=a,n.load=s,n.useColors=o,n.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],n.formatters.j=function(e){return JSON.stringify(e)},n.enable(s())},{"./debug":23}],23:[function(e,t,n){function o(){return n.colors[u++%n.colors.length]}function i(e){function t(){}function i(){var e=i,t=+new Date,r=t-(l||t);e.diff=r,e.prev=l,e.curr=t,l=t,null==e.useColors&&(e.useColors=n.useColors()),null==e.color&&e.useColors&&(e.color=o());var a=Array.prototype.slice.call(arguments);a[0]=n.coerce(a[0]),"string"!=typeof a[0]&&(a=["%o"].concat(a));var s=0;a[0]=a[0].replace(/%([a-z%])/g,function(t,o){if("%%"===t)return t;s++;var i=n.formatters[o];if("function"==typeof i){var r=a[s];t=i.call(e,r),a.splice(s,1),s--}return t}),"function"==typeof n.formatArgs&&(a=n.formatArgs.apply(e,a));var c=i.log||n.log||void 0;c.apply(e,a)}t.enabled=!1,i.enabled=!0;var r=n.enabled(e)?i:t;return r.namespace=e,r}function r(e){n.save(e);for(var t=(e||"").split(/[\s,]+/),o=t.length,i=0;o>i;i++)t[i]&&(e=t[i].replace(/\*/g,".*?"),"-"===e[0]?n.skips.push(new RegExp("^"+e.substr(1)+"$")):n.names.push(new RegExp("^"+e+"$")))}function a(){n.enable("")}function s(e){var t,o;for(t=0,o=n.skips.length;o>t;t++)if(n.skips[t].test(e))return!1;for(t=0,o=n.names.length;o>t;t++)if(n.names[t].test(e))return!0;return!1}function c(e){return e instanceof Error?e.stack||e.message:e}n=t.exports=i,n.coerce=c,n.disable=a,n.enable=r,n.enabled=s,n.humanize=e("ms"),n.names=[],n.skips=[],n.formatters={};var l,u=0},{ms:24}],24:[function(e,t){function n(e){var t=/^((?:\d+)?\.?\d+) *(ms|seconds?|s|minutes?|m|hours?|h|days?|d|years?|y)?$/i.exec(e);if(t){var n=parseFloat(t[1]),o=(t[2]||"ms").toLowerCase();switch(o){case"years":case"year":case"y":return n*u;case"days":case"day":case"d":return n*l;case"hours":case"hour":case"h":return n*c;case"minutes":case"minute":case"m":return n*s;case"seconds":case"second":case"s":return n*a;case"ms":return n}}}function o(e){return e>=l?Math.round(e/l)+"d":e>=c?Math.round(e/c)+"h":e>=s?Math.round(e/s)+"m":e>=a?Math.round(e/a)+"s":e+"ms"}function i(e){return r(e,l,"day")||r(e,c,"hour")||r(e,s,"minute")||r(e,a,"second")||e+" ms"}function r(e,t,n){return t>e?void 0:1.5*t>e?Math.floor(e/t)+" "+n:Math.ceil(e/t)+" "+n+"s"}var a=1e3,s=60*a,c=60*s,l=24*c,u=365.25*l;t.exports=function(e,t){return t=t||{},"string"==typeof e?n(e):t["long"]?i(e):o(e)}},{}],25:[function(e,t,n){(function(t){function o(e,t){var o="b"+n.packets[e.type]+e.data.data;return t(o)}function i(e,t,o){if(!t)return n.encodeBase64Packet(e,o);var i=e.data,r=new Uint8Array(i),a=new Uint8Array(1+i.byteLength);a[0]=y[e.type];for(var s=0;s<r.length;s++)a[s+1]=r[s];return o(a.buffer)}function r(e,t,o){if(!t)return n.encodeBase64Packet(e,o);var i=new FileReader;return i.onload=function(){e.data=i.result,n.encodePacket(e,t,!0,o)},i.readAsArrayBuffer(e.data)}function a(e,t,o){if(!t)return n.encodeBase64Packet(e,o);if(m)return r(e,t,o);var i=new Uint8Array(1);i[0]=y[e.type];var a=new k([i.buffer,e.data]);return o(a)}function s(e,t,n){for(var o=new Array(e.length),i=f(e.length,n),r=function(e,n,i){t(n,function(t,n){o[e]=n,i(t,o)})},a=0;a<e.length;a++)r(a,e[a],i)}var c=e("./keys"),l=e("has-binary"),u=e("arraybuffer.slice"),p=e("base64-arraybuffer"),f=e("after"),h=e("utf8"),d=navigator.userAgent.match(/Android/i),g=/PhantomJS/i.test(navigator.userAgent),m=d||g;n.protocol=3;var y=n.packets={open:0,close:1,ping:2,pong:3,message:4,upgrade:5,noop:6},v=c(y),b={type:"error",data:"parser error"},k=e("blob");n.encodePacket=function(e,n,r,s){"function"==typeof n&&(s=n,n=!1),"function"==typeof r&&(s=r,r=null);var c=void 0===e.data?void 0:e.data.buffer||e.data;if(t.ArrayBuffer&&c instanceof ArrayBuffer)return i(e,n,s);if(k&&c instanceof t.Blob)return a(e,n,s);if(c&&c.base64)return o(e,s);var l=y[e.type];return void 0!==e.data&&(l+=r?h.encode(String(e.data)):String(e.data)),s(""+l)},n.encodeBase64Packet=function(e,o){var i="b"+n.packets[e.type];if(k&&e.data instanceof k){var r=new FileReader;return r.onload=function(){var e=r.result.split(",")[1];o(i+e)},r.readAsDataURL(e.data)}var a;try{a=String.fromCharCode.apply(null,new Uint8Array(e.data))}catch(s){for(var c=new Uint8Array(e.data),l=new Array(c.length),u=0;u<c.length;u++)l[u]=c[u];a=String.fromCharCode.apply(null,l)}return i+=t.btoa(a),o(i)},n.decodePacket=function(e,t,o){if("string"==typeof e||void 0===e){if("b"==e.charAt(0))return n.decodeBase64Packet(e.substr(1),t);if(o)try{e=h.decode(e)}catch(i){return b}var r=e.charAt(0);return Number(r)==r&&v[r]?e.length>1?{type:v[r],data:e.substring(1)}:{type:v[r]}:b}var a=new Uint8Array(e),r=a[0],s=u(e,1);return k&&"blob"===t&&(s=new k([s])),{type:v[r],data:s}},n.decodeBase64Packet=function(e,n){var o=v[e.charAt(0)];if(!t.ArrayBuffer)return{type:o,data:{base64:!0,data:e.substr(1)}};var i=p.decode(e.substr(1));return"blob"===n&&k&&(i=new k([i])),{type:o,data:i}},n.encodePayload=function(e,t,o){function i(e){return e.length+":"+e}function r(e,o){n.encodePacket(e,!!a&&t,!0,function(e){o(null,i(e))})}"function"==typeof t&&(o=t,t=null);var a=l(e);return t&&a?k&&!m?n.encodePayloadAsBlob(e,o):n.encodePayloadAsArrayBuffer(e,o):e.length?void s(e,r,function(e,t){return o(t.join(""))}):o("0:")},n.decodePayload=function(e,t,o){if("string"!=typeof e)return n.decodePayloadAsBinary(e,t,o);"function"==typeof t&&(o=t,t=null);var i;if(""==e)return o(b,0,1);for(var r,a,s="",c=0,l=e.length;l>c;c++){var u=e.charAt(c);if(":"!=u)s+=u;else{if(""==s||s!=(r=Number(s)))return o(b,0,1);if(a=e.substr(c+1,r),s!=a.length)return o(b,0,1);if(a.length){if(i=n.decodePacket(a,t,!0),b.type==i.type&&b.data==i.data)return o(b,0,1);var p=o(i,c+r,l);if(!1===p)return}c+=r,s=""}}return""!=s?o(b,0,1):void 0},n.encodePayloadAsArrayBuffer=function(e,t){function o(e,t){
DesignScreenshot/output/gitee_run/gitee.com_4_after_login.html:6:Z.group_id&&(n+="&group_id="+Z.group_id),Z.agent_id&&(n+="&agent_id="+Z.agent_id),Re.jsonp(n,function(t){t=t||{},e&&e(t.chatting)})}function D(e){Fe.eachPushFn(e),Re.extend(Z,e),h(Z),le||Le.opened||(ce=!1),Le.loadSrc(),ke&&"function"==typeof e.onReady&&e.onReady()}function z(){var t="不能为空",n=function(e){},o=function(e){e=e||{};var o=e.type,i=e.data,r=Z.customer||{};if(!i)return void n("data"+t);switch(o){case"product":return{url:X+"vistor_data_trace",data:{key:Q,code:Z.code,type:o,data:encodeURIComponent(JSON.stringify(i))},valid:function(){var e=[];return Ie.config.behavior_trace?(!i.name&&e.push("商品名称:"+t),!e.length||(n(e.join("、")),!1)):(n("未开通商品浏览轨迹"),!1)}};case"order":return{url:Y+"/business_api/v1/web_customer_orders",data:{nonce:r.nonce,timestamp:r.timestamp,web_token:r.web_token,customer_token:r.customer_token,signature:r.signature,encryption_algorithm:r.encryption_algorithm,web_plugin_id:G,order:encodeURIComponent(JSON.stringify(i))},valid:function(){var e=[];return Ie.config.customer_order?r.signature?(!i.order_no&&e.push("订单编号:"+t),!i.price&&e.push("订单金额:"+t),!e.length||(n(e.join("、")),!1)):(n("请传入客户身份认证请求参数"),!1):(n("未开通订单事件"),!1)},cb:function(e){1e3!==e.code&&n(e.code_message)}};default:n("type参数错误")}},i={init:function(){Z.manualInit&&F()},setProduct:function(e){e=e||Z.product,e&&Re.sendMessage({type:"setProduct",product:e},Le.iframeEl.contentWindow)},showPanel:function(){E()},hidePanel:function(){Le.hide()},isDrag:function(){document.getElementsByClassName("udesk-client-btn")[0].classList.add("drag")},noDrag:function(){document.getElementsByClassName("udesk-client-btn")[0].classList.remove("drag")},clearProduct:function(){Re.sendMessage({type:"clearProduct"},Le.iframeEl.contentWindow)},getVisitorNo:function(){return be},dataTrace:function(e,t){var n=o({type:e,data:t});n&&n.valid(e,t)&&Re.jsonp(n.url+"?"+Re.urlString(n.data),function(e){n.cb&&n.cb(e)})},updateConfig:function(e){try{"object"==typeof Re.get(e,"panel.css")&&(Le.panelEl.style.cssText=De.toCssText(Re.assign(e.panel.css,{display:Le.panelEl.style.display,visibility:Le.panelEl.style.visibility,bottom:Le.panelEl.style.bottom,zIndex:Le.panelEl.style.zIndex}))),"function"==typeof Re.get(e,"panel.onToggle")&&(Fe.off("panel.onToggle",Re.get(Z,"panel.onToggle")),Fe.pushFn("panel.onToggle",Re.get(e,"panel.onToggle")))}catch(t){}},isPanelOpened:function(){try{return Le.opened}catch(e){}}};e[e.UdeskApiObject]=function(e){if(e){var t,n=arguments,o=e,r=!0;if("string"==typeof e&&i.hasOwnProperty(e))return i[n[0]].apply(null,[].slice.call(n,1));"object"!=typeof e&&(o={},o[n[0]]=n[1]),(o.channel||o.language||o.customer)&&(t=!0),(o.agent_id||o.group_id)&&(we?(r=!1,R(function(e){e?(delete o.group_id,delete o.agent_id,t&&D(o)):(l(o),D(o))})):(l(o),t=!0)),r&&t&&D(o)}},Ce=e[e.UdeskApiObject],I(i)}function P(){H=Re.isTestENV(),q=Re.ifIE(),ee=encodeURIComponent(location.href),te=encodeURIComponent(Re.getReferrer()||""),me=encodeURIComponent(t.title)||"",headEl=De.find("head",t)[0]||t.head||t.getElementsByTagName("head")[0]||{},Q=Re.store("userkey"),fe=De.find("body",t)[0]||t.body||{},ye=(t.documentElement||fe).clientWidth||1366,ve=(t.documentElement||fe).clientHeight,re=ye<=768,Q=Re.store("userkey"),Re.store("on_go_chat",""),Re.store("on_force_chat",""),Re.platform({iphone:function(){re=!0}}),ne=O(ee,decodeURIComponent(Re.store("first_access")||te||""));var e={};if(Ce&&Re.each(Ce.d,function(t){var n=t[0];"object"!=typeof t[0]&&(n={},n[t[0]]=t[1]),Fe.eachPushFn(n),Re.extend(e,n)}),e.link){var n=Re.parseUrl(e.link),o=Re.urlParams(e.link);n.protocol&&(Ee=n.protocol),Y=Ee+"//"+n.host,G=o.web_plugin_id}e.manualInit=e.manualInit||e.manueInit||!1,Be=e.auto_invite_interval,Z=e}function L(){var e=document.createElement("link"),t=Y+"/im_client/css/ui/emotion.css";e.type="text/css",e.rel="stylesheet",e.href=t,headEl.appendChild(e);var n=document.createElement("style"),o='url("'+Y+'/im_client/images/im-emoji-big-1.png")',i="#udesk_pop_dialog .udesk_im_client_emoji { background-image: "+o+"}";n.type="text/css",n.rel="stylesheet";try{n.appendChild(document.createTextNode(i))}catch(r){n.styleSheet.cssText=i}headEl.appendChild(n)}function U(){P(),_();var e=function(e){var t=c(e),n=Oe.vistor||{};l(t),oe="code="+(t.code||"")+"&url="+ee+"&referrer="+(t.src_url||te)+"&keyword="+ne,J="https:"===Ee?"6002":"6001",W=(H?Y.replace(Ee+"//",""):"basevistor.udesk.cn")+":"+J,X=(n[Ee.replace(":","")]||Ee+"//"+W)+"/customerApi/",V=(n["https:"===Ee?"wss":"ws"]||Ee+"//"+W)+"/customer"};Z.code&&Z.link&&A(function(t){e(t),z(),L();var n=Z.manualInit;t.im_guest_enable&&!Z.noVisitor?(Q&&!n&&F(),S(function(e){e=e||{},e.key&&(Q=e.key,Re.store("userkey",Q),Ue.init(),be=e.visitor_no,Pe.updateVisitorNo(be)),!n&&F()})):!n&&F(),n&&(ke=!0,Fe.init(),Fe.execFn("onReady"))})}function F(){se||(se=!0,De.ready(function(){he=De.createEl({id:Ae+"container"}),Re.isEmptyObj(fe)&&(fe=De.find("body",t)[0]||t.body||{}),fe.appendChild(he),Pe.init(),Le.init(),Fe.init(),Q&&Ue.init(),B(_e),b(function(){Le.loadSrc(),k(),je.online&&Ue.startAutoStrategy(),Z.manualInit||(ke=!0,Fe.execFn("onReady"))})}))}var H,q,W,J,X,V,Y,G,Z,Q,ee,te,ne,oe,ie,re,ae,se,ce,le,ue,pe,fe,he,de,ge,me,ye,ve,be,ke,we,_e,xe,Se,Ae="udesk_",Ce=e[e.UdeskApiObject],Te=navigator.userAgent.toLowerCase(),Ee="file:"===location.protocol?"http:":location.protocol,Ne=0,Me=999999999,je={},Oe={},Be=0,Ie={config:{window:{}}};if(!e.__udeskApiInit){e.__udeskApiInit=!0;var Re={isTestENV:function(){return"file:"===location.protocol||/(ud|tiyanudesk|(udesk(.+)?)).com$ |localhost/i.test(location.host)},getCurrentStaticUrl:function(){var e=location.hostname,t=/\.(.*)\.udesk.cn/,n=e.match(t),o=n&&n[1];if(!o)if(/udesk.cn/.test(e))o="";else{if(/localhost|local/.test(e))return"static-ud.udesk.cn";if(/tryudesk/.test(e)){var i=e.match(/\.(.*).tryudesk.cn/);return"static-ud."+i+".tryudesk.com"}}return"static-ud."+(o?o+".":"")+"udesk.cn"},jsonp:function(n,o){if(n){var i=Ae+"jsonp"+Ne++;n+=(n.indexOf("?")>-1?"&":"?")+"callback="+i;var r=t.createElement("script");headEl.appendChild(r),e[i]=function(e){o&&o(e)},r.src=n,r.onerror=function(){o&&o()}}},replaceTpl:function(e,t){if(!e)return"";if(!t)return e;var n=e;"function"==typeof e&&(n=e(t));for(var o in t)n=n.replace(new RegExp("{"+o+"}","gm"),t[o]||"");return n},parseJSON:function(t){try{return e.JSON.parse(t)}catch(n){}return t},extend:function(e){return e?(Re.each(arguments,function(t,n){if(n>0&&t)for(var o in t)e[o]=t[o]}),e):e},each:function(e,t){if(e){var n=e.length;if(n!==o)for(var i=0;i<n&&!1!==t(e[i],i);i++);else for(var r in e)if(!1===t(e[r],r))break}},isEmptyObj:function(e){if(!e)return!1;for(var t in e)return!1;return!0},getReferrer:function(){var t;try{t=e.top.document.referrer}catch(n){try{t=e.parent.document.referrer}catch(n){}}if(t||(t=document.referrer),!t&&e.opener)try{t=e.opener.location.href}catch(n){}return t||""},messageListener:function(t){e.addEventListener?e.addEventListener("message",function(e){var n=Re.parseJSON(e.data)||{};t&&t(n)}):e.attachEvent("onmessage",function(e){var n=Re.parseJSON(e.data)||{};t&&t(n)})},sendMessage:function(e,t){try{e=JSON.stringify(e)||"",t.postMessage(e,Y)}catch(n){}},store:function We(t,n){t="UDESK_"+t;var We=e.localStorage;if(We)try{if(n===o)return We[t]||"";We[t]=n||""}catch(i){}},sessionStore:function(t,n){t="UDESK_"+t;var i=e.sessionStorage;if(i)try{if(n===o)return i[t]||"";i[t]=n||""}catch(r){}},storageListener:function(t){try{e.addEventListener?e.addEventListener("storage",function(e){t&&t(e)}):document.attachEvent&&!K.Browser.opera?document.attachEvent("onstorage",function(e){t&&t(e)}):e.attachEvent("onstorage",function(e){t&&t(e)})}catch(n){}},urlParams:function(e){var t,n={};if(!e)return n;if(t=e.match(new RegExp("[?&][^?&]+=[^?&]+","g")))for(var o=0,i=t.length;o<i;o++){var r,a,s;try{r=t[o].substring(1).split("="),a=decodeURIComponent(r[0]),s=decodeURIComponent(r[1]),n[a]=s}catch(c){r&&r[0]&&(n[r[0]]=r[1]||"")}}return n},urlString:function(e,t){var n="";if(e)for(var o in e)n+="&"+o+"="+(t?encodeURIComponent(e[o]||""):e[o]||"");return n?n.substring(1):""},parseUrl:function(e){e=e||"";var t=e.split("//"),n=t[0]||"",o=(t[1]||"").split("/")[0];return{protocol:n,host:o}},ifIE:function(e,t){var n=document.createElement("b");return n.innerHTML="<!--[if "+(t||"")+" IE "+(e||"")+"]><i></i><![endif]-->",1===n.getElementsByTagName("i").length},platform:function(e){if(e){for(var t,n,o,i=new RegExp("(android|iphone|ipod|ios|ipad|webkit|windows phone|micromessenger)","g");null!=(n=i.exec(Te));)t=!0,o=n[1],e[o]&&e[o](),e.ios&&/iphone|ipod|ipad/.test(o)&&e.ios(),e.wp&&/windows phone/.test(o)&&e.wp(),e.weixin&&/micromessenger/.test(o)&&e.weixin();!t&&e.others&&e.others()}},isRealMob:function(){var e=!1;return this.platform({ios:function(){e=!0},android:function(){e=!0},wp:function(){e=!0}}),e},encodeBase64:function(e){var t,n,o,i,r,a,s,c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",l="",u=0;for(e=this._utf8_encode(e);u<e.length;)t=e.charCodeAt(u++),n=e.charCodeAt(u++),o=e.charCodeAt(u++),i=t>>2,r=(3&t)<<4|n>>4,a=(15&n)<<2|o>>6,s=63&o,isNaN(n)?a=s=64:isNaN(o)&&(s=64),l=l+c.charAt(i)+c.charAt(r)+c.charAt(a)+c.charAt(s);return l},_utf8_encode:function(e){e=e.replace(/\r\n/g,"\n");for(var t="",n=0;n<e.length;n++){var o=e.charCodeAt(n);o<128?t+=String.fromCharCode(o):o>127&&o<2048?(t+=String.fromCharCode(o>>6|192),t+=String.fromCharCode(63&o|128)):(t+=String.fromCharCode(o>>12|224),t+=String.fromCharCode(o>>6&63|128),t+=String.fromCharCode(63&o|128))}return t},aryFindKeys:function(e,t){if(!e&&!t)return!1;for(var o=0,i=t.length;o<i;o++){var r=t[o],a=document.querySelectorAll(r);for(m=0,n=a.length;m<n;m++)if(a[m]===e)return!0}return!1},assign:function(e,t){"use strict";if(null===e||e===o)throw new TypeError("Cannot convert undefined or null to object");for(var n=Object(e),i=1;i<arguments.length;i++){var r=arguments[i];if(null!==r&&r!==o)for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(n[a]=r[a])}return n},set:function(e,t,n){var o=t.substring(0,t.indexOf("."));o?(o in e||(e[o]={}),Re.set(e[o],t.substring(t.indexOf(".")+1),n)):e[t]=n},get:function(e,t){var n=t.substring(0,t.indexOf("."));return n&&n in e?Re.get(e[n],t.substring(t.indexOf(".")+1)):n?e[n]:e[t]}},De={_isReady:!1,_readyList:[],ready:function(e){if(this._isReady)return e&&e();if(!t.body)return e&&this._readyList.push(e),setTimeout(function(){De.ready()});var n=this._readyList;this._isReady=!0;for(var o=0,i=n.length;o<i;o++)n[o]();e&&e(),n.length=0},find:function(e,t){return(t||he).querySelectorAll(e)||[]},createEl:function(e,n){"object"==typeof e&&(n=e,e=""),n=n||{};var o=t.createElement(e||"div"),i=n.css;delete n.css;for(var r in n)o[r]=n[r];return i&&De.css(o,i),o},removeEl:function(e,t){var n=this.find(e,t);Re.each(n,function(e){e.parentNode.removeChild(e)})},hasClass:function(e,t){return RegExp("\\b"+(t||"")+"\\b").test(e||"")},css:function(t,n,i){if(t&&n)if("object"==typeof n)for(var r in n)if(r.indexOf("-")>-1){var a,s=r.split("-")[0],c=r.split("-")[1];a=s+c.substring(0,1).toUpperCase()+c.substring(1),t.style[a]=n[r]}else t.style[r]=n[r];else{if(i===o){if(i=(e.getComputedStyle?e.getComputedStyle(t,null):t.currentStyle)[n]||"","auto"===i)return 0;if("px"===i.slice(i.length-2)){var l=parseFloat(i);return isNaN(l)?i:l}return i}t.style[n]=i}},css3:function(e){var t="";return Re.each((e||"").split(";"),function(e){e&&(t+=e+";",Re.each(["-webkit-","-moz-","-ms-","-o-"],function(n){t+=n+e+";"}))}),t},cssJoin:function(e,t){var n={};if(e){t=(t||"").split(",");for(var o=0,i=t.length;o<i;o++)n[t[o]]=De.css(e,t[o])}return n},outerWidth:function(e){var t=0,n=De.cssJoin(e,"width,paddingLeft,paddingRight,borderLeft,borderRight");for(var o in n)t+=parseFloat(n[o])||0;return t},outerHeight:function(e){var t=0,n=De.cssJoin(e,"height,paddingTop,paddingBottom,borderTop,borderBottom");for(var o in n)t+=parseFloat(n[o])||0;return t},getEvent:function(t){return t||e.event},on:function(e,t,n){e&&(e.addEventListener?e.addEventListener(t,n,!1):e.attachEvent("on"+t,n))},un:function(e,t,n){e&&(e.removeEventListener?e.removeEventListener(t,n,!1):e.detachEvent("on"+t,n))},stopPropagation:function(e){e=this.getEvent(e),e.stopPropagation?e.stopPropagation():e.cancelBubble=!0},getOffset:function(e){for(var t=0,n=0;e&&e!=fe;)t+=e.offsetLeft,n+=e.offsetTop,e=e.offsetParent;return{top:n,left:t}},formatSize:function(e){return e&&parseFloat(e)==e?e+"px":e},hide:function(e){e&&this.css(e,"display","none")},show:function(e,t){t=t||"block",e&&this.css(e,"display",t)},text:function(e,t){if(e)return t===o?"string"==typeof e.textContent?e.textContent:e.innerText:void("string"==typeof e.textContent?e.textContent=t:e.innerText=t)},html:function(e,t){e&&t&&(e.innerHTML=t)},toCssText:function(e){var t=document.createElement("div");return De.css(t,e),t.style.cssText}},ze=function(e){if(e=e||{},e.html){e.type=e.type||"pop";var t,n,o,i,r,a,s=Ae+e.type+"_dialog",c=Re.extend({},Z.pop),l="pop"===e.type,u=d(),p="position:fixed;z-index:"+ ++Me+";font-size:14px;word-break:break-all;word-wrap:break-word;line-height:20px;"+De.css3("box-sizing:border-box;box-shadow:1px 1px 8px #eee"),f={pop:['<div class="{btnChatClz}" style="{commonStyle}border:1px solid #eee;padding:16px 30px 16px 16px;color:#888;cursor:pointer;background-color:#fff;text-align:left;border-radius:4px;box-shadow: 0px 1px 4px rgba(0, 0, 0, 0.25);'+De.css3("transition: margin linear .3s")+'">','<div style="display: flex">','    <img src="{avatar}" style="flex: 0 0 32px;height: 32px;margin-right: 10px;'+De.css3("border-radius:16px")+'">',"<div>",'    <b style="font-size:16px;color:#666;margin-bottom: 6px">{title}</b>','    <div style="overflow: hidden;-webkit-line-clamp: 3;text-overflow:ellipsis;display: -webkit-box;-webkit-box-orient: vertical;word-break:normal">{html}</div>',"</div>",'    <a class="{btnCloseClz}" style="position:absolute;right:12px;top:12px;font-size:24px;cursor:pointer;color:rgba(0, 0, 0, 0.45);text-decoration:none;">&times;</a>',"</div>","</div>"].join(""),frame:['<div style="{commonStyle}top:50%;left:50%;background-color:{frame_color};width:450px;text-align:left;border-radius:4px;box-shadow: 0px 1px 4px rgba(0, 0, 0, 0.25);">','    <a class="{btnCloseClz}" style="position:absolute;right:9px;top:8px;font-size:22px;cursor:pointer;color:#fff;text-decoration:none;">&times;</a>','    <div style="padding:9px 14px 9px 9px;color:#fff;font-size: 14px;line-height: 22px;display:flex;align-items: center"><img style="width: 20px" src="'+(Re.isTestENV()?Ee+("//static-ud."+location.href+".tryudesk.com/img/client-invite.png"):Ee+"//static-ud.udesk.cn/img/client-invite.png")+'" />{title}</div>','    <div style="font-size:13px;padding:24px '+(c.is_custom_bg&&c.bg_url?"106px":0)+" 24px 16px;background:#fff"+(c.is_custom_bg?" url({bg_url})":"")+' no-repeat right bottom;background-size:auto 136px;">','        <div style="color:{color};min-height:'+(c.is_custom_bg&&c.bg_url?"60px":0)+';line-height:22px;margin-bottom:20px;">{html}</div>','        <a class="{btnChatClz}" style="display:inline-block;background-color:{btn_color};color:#fff;padding:5px 16px;cursor:pointer;text-decoration:none;box-shadow: 0px 2px 0px rgba(0, 0, 0, 0.03);border-radius:2px;">'+He.g("tips.beganSession")+"</a>","    </div>","</div>"].join(""),mob_frame:['<div style="{commonStyle}top:50%;left:50%;width:280px;text-align:center;background-color:#fff;border:1px solid #ccc;">','    <div style="color:#333;padding:10px;">','        <img src="{avatar}" style="width:24px;height:24px;'+De.css3("border-radius:12px")+'">',"        <b>{title}</b>","    </div>",'    <div style="color:#333;padding:25px;border-top:1px solid #ccc;border-bottom:1px solid #ccc;">',"        {html}","    </div>",'    <div style="height:50px;line-height:50px;">','        <a class="{btnCloseClz}" style="float:left;width:49%;color:#307AE8;text-decoration:none;text-align:center;border-right:1px solid #ccc;">'+He.g("tips.cancel")+"</a>",'        <a class="{btnChatClz}" style="float:right;width:49%;color:#307AE8;text-decoration:none;text-align:center;">'+He.g("tips.beganSession")+"</a>","    </div>","</div>"].join("")},h=Re.extend({commonStyle:p,btnCloseClz:Ae+"btn_close",btnChatClz:Ae+"btn_chat"},c,e);h.avatar=e.avatar||je.avatar||"",t=Re.replaceTpl(f[e.type],h);var g=Z.pos_flag||"",m=g[0],y=Re.extend({width:q?De.outerWidth(de):De.css(de,"width"),height:q?De.outerHeight(de):De.css(de,"height")},De.getOffset(de)),v=function(){var e=Re.extend({top:y.top,left:y.left,width:q?De.outerWidth(o):De.css(o,"width"),height:q?De.outerHeight(o):De.css(o,"height")}),t=Z.pop.offset||{},n=parseFloat(t.top)||0,i=parseFloat(t.left)||0,r=1,a="unset";Z.targetSelector&&De.css(o,{top:e.top+"px",left:re?"0px":e.left+"px"}),Re.ifIE(8)&&(e.width=Math.max(e.width,320),e.height=Math.max(e.height,70)),u.top&&(n-="v"===m?20:y.height,a="translateY(-100%)"),u.bottom&&(n+="v"===m?y.height:20),u.left&&(i-=20,a="translateX(-100%) translateY(-50%)"),u.right&&(a="translateY(-50%)",i+=y.width+10,r=y.left+y.width+10),u.top||u.bottom?(i-=(e.width-y.width)/2,y.left<e.width?i=(parseFloat(t.left)||0)-10:ye-y.left<e.width&&(i=ye-y.left-e.width+(parseFloat(t.left)||0),i-=20)):n+=y.height/2-20,setTimeout(function(){De.css(o,{marginTop:n+"px",marginLeft:(re?r||i:i)+"px",marginRight:"10px",transform:a})},50)},b=function(){var e,t,n,i,r,a=Z.pop.arrow||{},s={},c={};i=De.formatSize(a.left)||"50%",re&&(i=y.left+(y.width+36)/2-20+"px"),r=De.formatSize(a.top)||"50%",u.top||u.bottom?(e=u.top?"bottom":"top",t="border"+(u.top?"Bottom":"Top")+"Width",n="border"+(u.top?"Top":"Bottom")+"Color",s={left:i,marginLeft:"-11px"},c={marginLeft:"-9px"}):(e=u.left?"right":"left",t="border"+(u.left?"Right":"Left")+"Width",n="border"+(u.left?"Left":"Right")+"Color",s={top:r,marginTop:"-11px"},c={marginTop:"-9px"}),s[e]="-12px",s[t]=0,s[n]="rgba(0,0,0,0.08)",c[e]="3px",c[t]=0,c[n]="#fff";var l=De.createEl("b",{css:{position:"absolute",border:"12px solid transparent"}}),p=De.createEl("b",{css:{position:"absolute",border:"9px solid transparent"}});De.css(l,s),De.css(p,c),l.appendChild(p),o.appendChild(l)},k=function(){var e=De.cssJoin(o,"width,height");De.css(o,{marginTop:-(e.height/2)+"px",marginLeft:-(e.width/2)+"px"})};De.removeEl("#"+s),n=De.createEl({id:s,innerHTML:t}),!Z.targetSelector&&(n.style.position="absolute"),o=n.firstChild,i=De.find("."+h.btnCloseClz,o)[0],r=l?o:De.find("."+h.btnChatClz,o)[0],l?(re&&(u.left?a=y.left-10+"px":u.right&&(a=ye-y.width-y.left-30+"px")),De.css(o,Re.extend(re?{width:a?a:"100%"}:{"min-width":"250px","max-width":"300px"},c.css,/[tb]/.test(g)&&re?{left:0}:{}))):De.css(o,c.css);for(var w in y)"auto"===y[w]&&(y[w]=0);return Z.targetSelector?he.appendChild(n):he.getElementsByClassName("udesk-client-btn")[0].appendChild(n),r.onclick=e.onclick,i.onclick=function(t){De.stopPropagation(t),De.hide(n),e.onclose&&e.onclose()},l?(v(),b()):k(),{show:function(){De.show(n)},hide:function(){De.hide(n)}}}},Pe={_unread:0,baseStyles:{wrapperStyle:["display:flex;align-items:center;justify-content: center;overflow:hidden;"],btn:["display:block;position:fixed;"+De.css3("box-sizing:border-box;"),"font-size:13px;color:#fff;text-align:center;cursor:pointer;text-decoration:none;","z-index:"+ ++Me+";","width:fit-content;","border-radius:4px;"],icon:["display:block;float:left;width:20px;height:20px;"],iconSrc:[Ee+"//"+Re.getCurrentStaticUrl()+"/img/client-btn.png"],line:["display:block;float:left;width:1px;height:100%;background-color:rgba(0, 0, 0, .08);","vertical-align:middle;","background-color:#000\\9;filter:alpha(opacity=10)\\9;"],txt:["display:block;float:left;","overflow-y:hidden; font-size: 14px; color: #fff;"],mob_txt:["display:block;float:none;height:40px;margin:0 10px;line-height:40px;","overflow-y:hidden; font-size: 13px; color: #fff;"],circle:["display:none;position:absolute;top:-13px;right:-13px;height:22px;","text-align:center;line-height:20px;font-size:14px;color:#fff;border-radius:10px;","background-color: #FB5127;padding:0 6px;font-weight:bold;border:1px solid #fff;"],img_circle:["display:none;position:absolute;top:-13px;right:-13px;width:26px;height:26px;","text-align:center;line-height:26px;font-size:14px;color:#fff;border-radius:15px;","background-color: #ff3b30;"],visitor_no:["position: fixed;z-index: "+Me+";color: #fff;text-align: center;font-family: 'Arial Normal', 'Arial';font-size: 13px;"],visitor_no_num:[]},abjuctStyle:function(){var e,t=this.baseStyles,n=(Z.css||{},Z.pos_flag||""),o=n[0],i=n[1],r=n[2],a=Z.visitor_no.enable;switch("i"!==o&&(t.btn.push("box-shadow:0 <0></0> 14px 0 rgba(0, 0, 0, .16);padding:10px;"),Z.color&&t.btn.push("background-color:"+Z.color+";")),o){case"h":t.btn.push("height:40px;"),re&&t.btn.push("width:100%;"),re&&t.btn.push("padding:0px;"),re&&t.icon.push("margin:10px;"),re&&(null==(e=Z.css)?void 0:e.width)&&(Z.css.width=Z.css.width.replace("%","vw"));break;case"v":t.btn.push("width:40px;height:auto;padding:10px 0px;"),t.icon.push("margin:0 7px 10px;"),t.line.push("width:100%;height:1px;"),t.circle.push("left:-13px;right:unset"),t.txt.push("width:40px;height:auto;word-break:break-all;word-wrap:break-word;line-height:20px;letter-spacing:24px;overflow-y:auto;overflow-x:hidden;margin-top:10px;padding-left: 2px;margin-left:10px"),t.mob_txt.push("width:40px;height:auto;float:left;word-break:break-all;word-wrap:break-word;line-height:20px;letter-spacing:24px;overflow-y:auto;overflow-x:hidden;margin-top:10px;padding-left: 2px;"),t.wrapperStyle.push("flex-direction:column;");break;case"c":t.btn.push("width:40px;height:40px;border-radius:20px;"),t.line.push("display:none;"),t.txt.push("display:none;"),t.iconSrc.length=0,t.iconSrc.push(Ee+"//"+Re.getCurrentStaticUrl()+"/img/client-btn.png");break;case"i":t.img_circle.push("left:-13px;top:-13px;right:auto;bottom:auto;")}switch(i){case"l":t.btn.push("left:0;");break;case"r":t.btn.push("right:0;")}switch(r){case"t":t.btn.push("top:0;");break;case"b":t.btn.push("bottom:"+(re&&a?"30px":"0")+";")}var s=Z.visitor_no.color,c=Z.visitor_no.pos_flag||"",l=c[0],u=c[1];if(s||(s=re?"#307AE8":"#649ae8"),t.visitor_no.push("background-color:"+s+";"),re)t.visitor_no.push("width:100%;bottom:0;font-weight:bold;padding:5px 0;");else{switch(t.visitor_no.push("width: 70px;height: 70px;line-height: 22px;border-radius: 2px;"),t.visitor_no_num.push("font-size: 20px;margin-top: 14px;display: block;"),l){case"l":t.visitor_no.push("left:0;");break;case"r":t.visitor_no.push("right:0;")}switch(u){case"t":t.visitor_no.push("top:0;");break;case"b":t.visitor_no.push("bottom:0;")}}},tryCenter:function(e){var t=Z.pos_flag||"",n=t[0],o=t[1],i=t[2],r=Z.visitor_no.pos_flag||"",a=r[0],s=r[1],c=function(t){var n,r=De.cssJoin(t,"width,height,margin-right");De.cssJoin(ge,"width,height");"m"===o&&De.css(e,"left",(ye-parseFloat(r.width))/2+"px"),"m"===i&&(n=(ve-parseFloat(r.height))/2,De.css(e,"top",n+"px")),"m"===a&&De.css(ge,"left",(ye-parseFloat(r.width))/2+"px"),"m"===s&&(n=(ve-parseFloat(r.height))/2,!Re.isRealMob()&&De.css(ge,"top",n+"px"))};if(c(e),"i"===n){var l=De.find("img",e)[0];l.onload=function(){c(l)}}},genVisitorNoHtml:function(){var e=this.baseStyles,t="",n=He.g("tips.visitorNo");return be=be||"",Z.im_guest_enable&&Z.visitor_no.enable&&(t=Re.replaceTpl('<div id="{flag}visitor_no" style="{style}">{text}</div>',{flag:Ae,style:e.visitor_no.join(""),text:re?n+"&nbsp<span>"+be:"</span><b style='"+e.visitor_no_num.join("")+"'><span>"+be+"</span></b>"+n})),t},genHtml:function(){var e,t=this.baseStyles,n=Z.css||{},o=Z.pos_flag||"",i=o[0],r=Z.unread_button||{},a="";if(this.abjuctStyle(),"i"!==i)a=Re.replaceTpl('<div style="{wrapperStyle}"><span style="{iconStyle}"><img src="{iconSrc}" style="width:100%;height:100%;"/></span><span style="{lineStyle}"></span><span id="{flag}btn_text" style="{txtStyle}">{text}</span><span id="{flag}btn_circle" style="{circleStyle}"></span></div>',{flag:Ae,text:"",iconStyle:t.icon.join(""),iconSrc:t.iconSrc.join(""),lineStyle:t.line.join(""),txtStyle:t[re?"mob_txt":"txt"].join(""),circleStyle:t.circle.join(""),wrapperStyle:"h"===i?t.wrapperStyle:""});else if(e='<img class="buttonImg" src="'+(Z.offlineImgUrl||Z.onlineImgUrl)+'" style="max-width:'+(n.width?"unset;":"200px;"),n.width&&(e+="width: "+n.width+";"),n.height&&(e+="height: "+n.height+";"),e+='">',r.enable){var n=r.css||{};for(var s in n)n[s]?t.img_circle.push(s+":"+n[s]+"px;"):t.img_circle.push(s+":auto;");a=["<div>",e,'   <span id="'+Ae+'btn_circle" style="'+t.img_circle.join("")+'"></span>',"</div>"].join("")}else a=e;return a='<a class="udesk-client-btn" style="'+t.btn.join("")+'">'+a+"</a>",a+=this.genVisitorNoHtml()},updateVisitorNo:function(e){if(ge){var t=De.find("span",ge)[0];t.innerText=e}},clickHandler:function(t){try{var n=document.getElementsByClassName("udesk-client-btn")[0];if(n&&n.className.indexOf("drag")>-1)return}catch(o){}if("autoInvite"===t?E("autoInvite"):E(),e&&e.uAnalytics){var i=e.uAnalytics.user().id(),r=e.uAnalytics.user().traits(),a={system:"im",consult_url:e.location.href};Re.assign(a,r.userAttr),e.uAnalytics.identify(i,a),e.uAnalytics.track("onlineconsultclick")}},clearUnread:function(e){if(this._unread){try{if(Le.iframeEl&&Le.iframeEl.contentWindow)Re.sendMessage({type:"clearUnread",content:{clearHistory:e}},Le.iframeEl.contentWindow);else{var t=Z.customer;$.post(Y+"/spa1/sdk_offline_messages/customer_clear_message",{platform:"web",session_key:Z.session_key,web_token:t.web_token,nonce:t.nonce,signature:t.signature,timestamp:t.timestamp,encryption_algorithm:t.encryption_algorithm})}$.each(qe,function(e,t){clearTimeout(t)}.bind(this))}catch(n){}this._unread=0,De.hide(this.circleEl),Z.noBubble||this.popObj&&this.popObj.hide()}},unreadHandler:function(e){if(!Le.opened||!Le.uiOpened){var t=this;if(e.count?this._unread=e.count:this._unread+=1,De.text(this.circleEl,this._unread),De.show(this.circleEl),Fe.execFn("onUnread",{count:this._unread}),!Z.noBubble&&e.msg){var n=function(){try{var e=document.getElementsByClassName("udesk-client-btn")[0];if(e&&e.className.indexOf("drag")>-1)return}catch(n){}t.clickHandler(),o&&o.hide(),t.popObj=!1},o=ze({type:"pop",title:je.nick||He.g("tips.agent"),avatar:je.avatar,html:e.msg||He.g("tips.newMsg"),onclick:n,onclose:function(){t.popObj=!1,t.clearUnread(!0)}});this.popObj=o,de.onclick=n}}},bindSelector:function(e,n){De.on(t,"click",function(t){t=t||window.event;for(var o=t.target,i=e.split(","),r=!1;o&&o!==this;){if(Re.aryFindKeys(o,i)){r=!0;break}o=o.parentNode}r&&n&&n()})},init:function(){var e=this,n=Z.selector;n&&e.bindSelector(n,function(){E()});var o=De.find(Z.targetSelector,t)[0];if(Z.targetSelector&&!o&&e.bindSelector(Z.targetSelector,function(){e.clickHandler()}),!o){o=De.createEl({id:Ae+"btn",innerHTML:this.genHtml()}),he.appendChild(o),o=De.find("a",o)[0],ge=De.find("#"+Ae+"visitor_no")[0],Pe.autoGen=!0,this.tryCenter(o),this.textEl=De.find("#"+Ae+"btn_text",o)[0],this.circleEl=De.find("#"+Ae+"btn_circle",o)[0],this.imgEl=De.find(".buttonImg",o)[0];var i={};try{if(Z.css)if("c"===Z.pos_flag[0]||"v"===Z.pos_flag[0])for(var r in Z.css)"width"!==r&&(i[r]=Z.css[r]);else i=Z.css}catch(a){i=Z.css}De.css(o,i),De.css(ge,Z.visitor_no.css)}o&&(this.el=o,de=o,de.onclick=this.clickHandler)}},Le={opened:!1,uiOpened:!1,_baseStyles:{panel:["position:fixed;bottom:-574px;right:60px;z-index:-1;width:364px;height:572px;","overflow:hidden;display:none;background-color:transparent;","box-shadow:0px 4px 8px rgba(0, 0, 0, 0.25);","border-radius: 4px;","-webkit-overflow-scrolling:touch;","border:1px solid #ddd\\9;",De.css3("transition:bottom 0.3s;")],frame:["width:1px;min-width:100%;*width:100%;height:0;","border:none;padding:0;margin:0;float:none;background:none;",De.css3("transition:height 0.1s;")]},_styleElement:null,_getId:function(){return Ae+"panel"},_createPanel:function(e){var n=this,o=this._baseStyles||{},i=De.createEl({innerHTML:'<div id="'+this._getId()+'"><iframe id="'+Ae+'iframe" frameborder="0" scrolling="no" allowtransparency="true" style="'+o.frame.join("")+'"></iframe></div>'});he.appendChild(i.firstChild),this.panelEl=t.getElementById(Ae+"panel"),this.iframeEl=t.getElementById(Ae+"iframe"),De.on(this.iframeEl,"load",function(){n.iframeLoaded=!0,e&&e()}),q&&!Re.ifIE(8,"gt")||(this.iframeEl.setAttribute("allowfullscreen",""),this.iframeEl.setAttribute("mozallowfullscreen",""),this.iframeEl.setAttribute("webkitallowfullscreen","")),De.css(this.panelEl,Z.panel.css)},_doToggle:function(e){var t=this.panelEl;if(De.css(t,{display:e?"block":"none",visibility:e?"visible":"hidden",bottom:e?"-482px":0,zIndex:e?++Me:-1}),setTimeout(function(){t.style.bottom=e?0:"-482px"},5),e)try{this.sendProduct(),Re.sendMessage({type:"openPanel",preloadData:Oe},this.iframeEl.contentWindow)}catch(n){}},_uiCtrl:function(e){var t=this,n=this.iframeEl,o=Pe.el,i="hide"!==e;this.opened=i,this.uiOpened=i,i?t.iframeLoaded?t._doToggle(i):De.on(t.iframeEl,"load",function(){t.iframeLoaded=!0,t._doToggle(i)}):t._doToggle(i),De.show(i?n:o),Pe.autoGen&&De.hide(i?o:n),setTimeout(function(){n.style.height=i?"100%":"0"},100),Fe.execFn("panel.onToggle",{visible:i})},sendProduct:function(){for(var e=0;e<5;e++)setTimeout(Ce.setProduct,1e3*e)},show:function(e){var t;void 0===e&&(e=0);var n=this;if(this.iframeEl===o&&e<3)return void setTimeout(function(e){return function(){n.show(e)}}(e+1),100);var i=null==(t=this.iframeEl)?void 0:t.contentWindow;this._uiCtrl("show"),Pe.clearUnread(),Re.sessionStore("panel_visible_"+Z.session_key,!0);try{this.sendProduct(),Re.sendMessage({type:"forceLoadPage"},i),Re.sendMessage({type:"openPanel"},i)}catch(r){}this.start_hide_time&&new Date-n.start_hide_time>=6e5&&(setTimeout(function(){n.loadSrc()},50),n.start_hide_time=null),xe&&xe()},_doToggleOther:function(e){var t=this.panelEl;if(De.css(t,{display:"none"}),e)try{this.sendProduct(),Re.sendMessage({type:"openPanel",preloadData:Oe},this.iframeEl.contentWindow)}catch(n){}},_uiCtrlOther:function(e){var t=this,n=this.iframeEl,o=Pe.el,i="hide"!==e;this.opened=i,this.uiOpened=!1,i?t.iframeLoaded?t._doToggleOther(this.uiOpened):De.on(t.iframeEl,"load",function(){t.iframeLoaded=!0,t._doToggle(this.uiOpened)}):t._doToggle(this.uiOpened),De.show(o),Pe.autoGen&&De.hide(n),setTimeout(function(){n.style.height="0"},100)},_show:function(){var e=this,t=this.iframeEl.contentWindow;this._uiCtrlOther("show");try{this.sendProduct(),Re.sendMessage({type:"forceLoadPage"},t),Re.sendMessage({type:"openPanel"},t)}catch(n){}this.start_hide_time&&new Date-e.start_hide_time>=6e5&&(setTimeout(function(){e.loadSrc()},50),e.start_hide_time=null),xe&&xe()},hide:function(){"inner"===Z.mode&&(Re.sessionStore("panel_visible_"+Z.session_key,""),this._uiCtrl("hide"),this.start_hide_time=new Date,xe=s())},loadSrc:function(e){var t=this;this.iframeEl&&p(function(n){t.iframeEl.contentWindow.location.replace(f(e,!1,n))})},_createStyle:function(){if(!this._styleElement){var e,t=this._baseStyles||{},n=Ie.config.window.proportion?100-Ie.config.window.proportion:30;e=Ie.config.window.proportion?"left:0;right:0;bottom:0;top:"+n+"%;height:auto;width:auto;":"left:0;right:0;bottom:0;top:"+n+"px;height:auto;width:auto;",this._styleElement=i("#"+this._getId()+"{"+t.panel.join("")+"}\n@media (max-width: 768px) {#"+this._getId()+"{"+e+"}}")}},init:function(){"inner"===Z.mode&&(this._createStyle(),this._createPanel(function(){var e=Re.sessionStore("panel_visible_"+Z.session_key),t=Re.sessionStore("panel_chatting_"+Z.session_key);e&&!re?E():e||re||t&&R(function(e){e&&N("hideIframe")})}))}},Ue={rejected_num:0,agetn_invite:!1,init:function(){var e=this;this._loaded||(this._loaded=!0,ie=__udeskIo(V+"?key="+Q,{reconnection:!0,reconnectionDelay:2e3,reconnectionAttempts:10}),ie.on("connect",function(){ie.emit("enter",{key:Q,code:Z.code})}),ie.on("reconnect",function(){ie.emit("enter",{key:Q,code:Z.code})}),ie.on("invite",function(t){t&&(je.id=t.agent_id,je.group_id=t.group_id),e.stopAutoStrategy(),e.agent_invite=!0,e.show()}),ie.on("robot_invite",function(e){e&&(je.id=e.agent_id,je.group_id=e.group_id);var t=C();t.removeEventListener("acceptedTransferAgent"),t.removeEventListener("rejectedTransferAgent"),
DesignScreenshot/output/gitee_run/gitee.com_4_after_login.html:10:    var savedTheme = localStorage.getItem('theme');
DesignScreenshot/output/gitee_run/gitee.com_4_after_login.html:345:function(e){"function"==typeof define&&define.amd?define(["jquery"],e):e(jQuery)}(function(e){function t(){var t=n(this);return isNaN(t.datetime)?e(this).text(a.settings.strings.never):e(this).text(i(t.datetime)),this}function n(t){if(!(t=e(t)).data("timeago")){t.data("timeago",{datetime:a.datetime(t)});var n=e.trim(t.text());!(n.length>0)||a.isTime(t)&&t.attr("title")||t.attr("title",n)}return t.data("timeago")}function i(e){return a.inWords(o(e))}function o(e){return(new Date).getTime()-e.getTime()}e.timeago=function(t){return t instanceof Date?i(t):i("string"==typeof t?e.timeago.parse(t):"number"==typeof t?new Date(t):e.timeago.datetime(t))};var a=e.timeago;e.extend(e.timeago,{settings:{refreshMillis:6e4,allowFuture:!1,strings:{prefixAgo:null,prefixFromNow:null,suffixAgo:"\u524d",suffixFromNow:"\u521a\u521a",seconds:"\u4e00\u5206\u949f",minute:"\u4e00\u5206\u949f",minutes:"%d\u5206\u949f",hour:"\u4e00\u5c0f\u65f6",hours:"%d\u5c0f\u65f6",day:"\u4e00\u5929",days:"%d\u5929",month:"\u4e00\u4e2a\u6708",months:"%d\u4e2a\u6708",year:"\u4e00\u5e74",years:"%d\u5e74",never:"\u4ece\u4e0d",wordSeparator:" ",numbers:[]}},inWords:function(t){function n(n,o){var a=e.isFunction(n)?n(o,t):n,r=i.numbers&&i.numbers[o]||o;return a.replace(/%d/i,r)}var i=this.settings.strings,o=i.prefixAgo,a=i.suffixAgo;this.settings.allowFuture&&t<0&&(o=i.prefixFromNow,a=i.suffixFromNow);var r=Math.abs(t)/1e3,s=r/60,c=s/60,l=c/24,u=l/365,d=r<45&&n(i.seconds,Math.round(r))||r<90&&n(i.minute,1)||s<45&&n(i.minutes,Math.round(s))||s<90&&n(i.hour,1)||c<24&&n(i.hours,Math.round(c))||c<42&&n(i.day,1)||l<30&&n(i.days,Math.round(l))||l<45&&n(i.month,1)||l<365&&n(i.months,Math.round(l/30))||u<1.5&&n(i.year,1)||n(i.years,Math.round(u)),p=i.wordSeparator||"";return i.wordSeparator===undefined&&(p=" "),e.trim([o,d].join(p)+a)},parse:function(t){var n=e.trim(t);return n=(n=(n=(n=n.replace(/\.\d+/,"")).replace(/-/,"/").replace(/-/,"/")).replace(/T/," ").replace(/Z/," UTC")).replace(/([\+\-]\d\d)\:?(\d\d)/," $1$2"),new Date(n)},datetime:function(t){var n=a.isTime(t)?e(t).attr("datetime"):e(t).attr("title");return a.parse(n)},isTime:function(t){return"time"===e(t).get(0).tagName.toLowerCase()}});var r={init:function(){var n=e.proxy(t,this);n();var i=a.settings;i.refreshMillis>0&&setInterval(n,i.refreshMillis)},update:function(n){e(this).data("timeago",{datetime:a.parse(n)}),t.apply(this)}};e.fn.timeago=function(e,t){var n=e?r[e]:r.init;if(!n)throw new Error("Unknown function name '"+e+"' for timeago");return this.each(function(){n.call(this,t)}),this},document.createElement("abbr"),document.createElement("time")}),function(){const e={email:/^[\w+\-.]+@[a-z\d\-]+(\.[a-z\d\-]+)*\.[a-z]+$/i,projectName:/^(?!_)(?!.*?_$)(?!-)(?!.*-$)(?!\+)[-a-zA-Z0-9_.\u4e00-\u9fa5\uff00-\uffff+ ]+$/,projectPath:/^[a-zA-Z0-9.][a-zA-Z0-9_\-.]{1,190}$/,projectLabel:/^[0-9A-Za-z\u4e00-\u9fa5]{1}[A-Za-z0-9\-\u4e00-\u9fa5]{0,34}$/,phone:/^[1,8][0-9]{10,11}$/,commitId:/^[0-9a-f]{40}$/,emailSuffix:/^@[a-z\d-]+(\.[a-z\d-]+)*\.[a-z]+$/,positiveInt:/^[1-9]\d*$/,idCard:/(^[1-9]\d{5}(18|19|([23]\d))\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$)|(^[1-9]\d{5}\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}$)/};window.giteeRegex=e}(),function e(t,n,i){function o(r,s){if(!n[r]){if(!t[r]){var c="function"==typeof require&&require;if(!s&&c)return c(r,!0);if(a)return a(r,!0);var l=new Error("Cannot find module '"+r+"'");throw l.code="MODULE_NOT_FOUND",l}var u=n[r]={exports:{}};t[r][0].call(u.exports,function(e){var n=t[r][1][e];return o(n||e)},u,u.exports,e,t,n,i)}return n[r].exports}for(var a="function"==typeof require&&require,r=0;r<i.length;r++)o(i[r]);return o}({1:[function(e,t,n){function i(){return{a:["target","href","title"],abbr:["title"],address:[],area:["shape","coords","href","alt"],article:[],aside:[],audio:["autoplay","controls","loop","preload","src"],b:[],bdi:["dir"],bdo:["dir"],big:[],blockquote:["cite"],br:[],caption:[],center:[],cite:[],code:[],col:["align","valign","span","width"],colgroup:["align","valign","span","width"],dd:[],del:["datetime"],details:["open"],div:[],dl:[],dt:[],em:[],font:["color","size","face"],footer:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],header:[],hr:[],i:[],img:["src","alt","title","width","height"],ins:["datetime"],li:[],mark:[],nav:[],ol:[],p:[],pre:[],s:[],section:[],small:[],span:[],sub:[],sup:[],strong:[],table:["width","border","align","valign"],tbody:["align","valign"],td:["width","rowspan","colspan","align","valign"],tfoot:["align","valign"],th:["width","rowspan","colspan","align","valign"],thead:["align","valign"],tr:["rowspan","align","valign"],tt:[],u:[],ul:[],video:["autoplay","controls","loop","preload","src","height","width"]}}function o(){}function a(){}function r(){}function s(){}function c(e){return e.replace(x,"&lt;").replace(O,"&gt;")}function l(e,t,n,i){if(n=m(n),"href"===t||"src"===t){if("#"===(n=z.trim(n)))return"#";if("http://"!==n.substr(0,7)&&"https://"!==n.substr(0,8)&&"mailto:"!==n.substr(0,7)&&"tel:"!==n.substr(0,4)&&"#"!==n[0]&&"/"!==n[0])return""}else if("background"===t){if(N.lastIndex=0,N.test(n))return""}else if("style"===t){if(q.lastIndex=0,q.test(n))return"";if(E.lastIndex=0,E.test(n)&&(N.lastIndex=0,N.test(n)))return"";!1!==i&&(n=(i=i||T).process(n))}return n=g(n)}function u(e){return e.replace(C,"&quot;")}function d(e){return e.replace(k,'"')}function p(e){return e.replace(_,function(e,t){return"x"===t[0]||"X"===t[0]?String.fromCharCode(parseInt(t.substr(1),16)):String.fromCharCode(parseInt(t,10))})}function f(e){return e.replace(L,":").replace(S," ")}function h(e){for(var t="",n=0,i=e.length;n<i;n++)t+=e.charCodeAt(n)<32?" ":e.charAt(n);return z.trim(t)}function m(e){return e=h(e=f(e=p(e=d(e))))}function g(e){return e=c(e=u(e))}function b(){return""}function v(e,t){function n(t){return!!i||-1!==z.indexOf(e,t)}"function"!=typeof t&&(t=function(){});var i=!Array.isArray(e),o=[],a=!1;return{onIgnoreTag:function(e,i,r){if(n(e)){if(r.isClosing){var s="[/removed]",c=r.position+s.length;return o.push([!1!==a?a:r.position,c]),a=!1,s}return a||(a=r.position),"[removed]"}return t(e,i,r)},remove:function(e){var t="",n=0;return z.forEach(o,function(i){t+=e.slice(n,i[0]),n=i[1]}),t+=e.slice(n)}}}function M(e){return e.replace(W,"")}function y(e){var t=e.split("");return(t=t.filter(function(e){var t=e.charCodeAt(0);return 127!==t&&(!(t<=31)||(10===t||13===t))})).join("")}var A=e("cssfilter").FilterCSS,w=e("cssfilter").getDefaultWhiteList,z=e("./util"),T=new A,x=/</g,O=/>/g,C=/"/g,k=/&quot;/g,_=/&#([a-zA-Z0-9]*);?/gim,L=/&colon;?/gim,S=/&newline;?/gim,N=/((j\s*a\s*v\s*a|v\s*b|l\s*i\s*v\s*e)\s*s\s*c\s*r\s*i\s*p\s*t\s*|m\s*o\s*c\s*h\s*a)\:/gi,q=/e\s*x\s*p\s*r\s*e\s*s\s*s\s*i\s*o\s*n\s*\(.*/gi,E=/u\s*r\s*l\s*\(.*/gi,W=/<!--[\s\S]*?-->/g;n.whiteList=i(),n.getDefaultWhiteList=i,n.onTag=o,n.onIgnoreTag=a,n.onTagAttr=r,n.onIgnoreTagAttr=s,n.safeAttrValue=l,n.escapeHtml=c,n.escapeQuote=u,n.unescapeQuote=d,n.escapeHtmlEntities=p,n.escapeDangerHtml5Entities=f,n.clearNonPrintableCharacter=h,n.friendlyAttrValue=m,n.escapeAttrValue=g,n.onIgnoreTagStripAll=b,n.StripTagBody=v,n.stripCommentTag=M,n.stripBlankChar=y,n.cssFilter=T,n.getDefaultCSSWhiteList=w},{"./util":4,cssfilter:8}],2:[function(e,t,n){function i(e,t){return new r(t).process(e)}var o=e("./default"),a=e("./parser"),r=e("./xss");for(var s in(n=t.exports=i).FilterXSS=r,o)n[s]=o[s];for(var s in a)n[s]=a[s];"undefined"!=typeof window&&(window.filterXSS=t.exports)},{"./default":1,"./parser":3,"./xss":5}],3:[function(e,t,n){function i(e){var t=d.spaceIndex(e);if(-1===t)var n=e.slice(1,-1);else n=e.slice(1,t+1);return"/"===(n=d.trim(n).toLowerCase()).slice(0,1)&&(n=n.slice(1)),"/"===n.slice(-1)&&(n=n.slice(0,-1)),n}function o(e){return"</"===e.slice(0,2)}function a(e,t,n){"user strict";var a="",r=0,s=!1,c=!1,l=0,u=e.length,d="",p="";for(l=0;l<u;l++){var f=e.charAt(l);if(!1===s){if("<"===f){s=l;continue}}else if(!1===c){if("<"===f){a+=n(e.slice(r,l)),s=l,r=l;continue}if(">"===f){a+=n(e.slice(r,s)),d=i(p=e.slice(s,l+1)),a+=t(s,a.length,d,p,o(p)),r=l+1,s=!1;continue}if(('"'===f||"'"===f)&&"="===e.charAt(l-1)){c=f;continue}}else if(f===c){c=!1;continue}}return r<e.length&&(a+=n(e.substr(r))),a}function r(e,t){"user strict";function n(e,n){if(!((e=(e=d.trim(e)).replace(p,"").toLowerCase()).length<1)){var i=t(e,n||"");i&&o.push(i)}}for(var i=0,o=[],a=!1,r=e.length,l=0;l<r;l++){var f,h=e.charAt(l);if(!1!==a||"="!==h)if(!1===a||l!==i||'"'!==h&&"'"!==h||"="!==e.charAt(l-1))if(/\s|\n|\t/.test(h)){if(e=e.replace(/\s|\n|\t/g," "),!1===a){if(-1===(f=s(e,l))){n(d.trim(e.slice(i,l))),a=!1,i=l+1;continue}l=f-1;continue}if(-1===(f=c(e,l-1))){n(a,u(d.trim(e.slice(i,l)))),a=!1,i=l+1;continue}}else;else{if(-1===(f=e.indexOf(h,l+1)))break;n(a,d.trim(e.slice(i+1,f))),a=!1,i=(l=f)+1}else a=e.slice(i,l),i=l+1}return i<e.length&&(!1===a?n(e.slice(i)):n(a,u(d.trim(e.slice(i))))),d.trim(o.join(" "))}function s(e,t){for(;t<e.length;t++){var n=e[t];if(" "!==n)return"="===n?t:-1}}function c(e,t){for(;t>0;t--){var n=e[t];if(" "!==n)return"="===n?t:-1}}function l(e){return'"'===e[0]&&'"'===e[e.length-1]||"'"===e[0]&&"'"===e[e.length-1]}function u(e){return l(e)?e.substr(1,e.length-2):e}var d=e("./util"),p=/[^a-zA-Z0-9_:\.\-]/gim;n.parseTag=a,n.parseAttr=r},{"./util":4}],4:[function(e,t){t.exports={indexOf:function(e,t){var n,i;if(Array.prototype.indexOf)return e.indexOf(t);for(n=0,i=e.length;n<i;n++)if(e[n]===t)return n;return-1},forEach:function(e,t,n){var i,o;if(Array.prototype.forEach)return e.forEach(t,n);for(i=0,o=e.length;i<o;i++)t.call(n,e[i],i,e)},trim:function(e){return String.prototype.trim?e.trim():e.replace(/(^\s*)|(\s*$)/g,"")},spaceIndex:function(e){var t=/\s|\n|\t/.exec(e);return t?t.index:-1}}},{}],5:[function(e,t){function n(e){return e===undefined||null===e}function i(e){var t=d.spaceIndex(e);if(-1===t)return{html:"",closing:"/"===e[e.length-2]};var n="/"===(e=d.trim(e.slice(t+1,-1)))[e.length-1];return n&&(e=d.trim(e.slice(0,-1))),{html:e,closing:n}}function o(e){var t={};for(var n in e)t[n]=e[n];return t}function a(e){(e=o(e||{})).stripIgnoreTag&&(e.onIgnoreTag&&console.error('Notes: cannot use these two options "stripIgnoreTag" and "onIgnoreTag" at the same time'),e.onIgnoreTag=s.onIgnoreTagStripAll),e.whiteList=e.whiteList||s.whiteList,e.onTag=e.onTag||s.onTag,e.onTagAttr=e.onTagAttr||s.onTagAttr,e.onIgnoreTag=e.onIgnoreTag||s.onIgnoreTag,e.onIgnoreTagAttr=e.onIgnoreTagAttr||s.onIgnoreTagAttr,e.safeAttrValue=e.safeAttrValue||s.safeAttrValue,e.escapeHtml=e.escapeHtml||s.escapeHtml,this.options=e,!1===e.css?this.cssFilter=!1:(e.css=e.css||{},this.cssFilter=new r(e.css))}var r=e("cssfilter").FilterCSS,s=e("./default"),c=e("./parser"),l=c.parseTag,u=c.parseAttr,d=e("./util");a.prototype.process=function(e){if(!(e=(e=e||"").toString()))return"";var t=this,o=t.options,a=o.whiteList,r=o.onTag,c=o.onIgnoreTag,p=o.onTagAttr,f=o.onIgnoreTagAttr,h=o.safeAttrValue,m=o.escapeHtml,g=t.cssFilter;o.stripBlankChar&&(e=s.stripBlankChar(e)),o.allowCommentTag||(e=s.stripCommentTag(e));var b=!1;if(o.stripIgnoreTagBody){b=s.StripTagBody(o.stripIgnoreTagBody,c);c=b.onIgnoreTag}var v=l(e,function(e,t,o,s,l){var b,v={sourcePosition:e,position:t,isClosing:l,isWhite:a.hasOwnProperty(o)};if(!n(b=r(o,s,v)))return b;if(v.isWhite){if(v.isClosing)return"</"+o+">";var M=i(s),y=a[o],A=u(M.html,function(e,t){var i,a=-1!==d.indexOf(y,e);return n(i=p(o,e,t,a))?a?(t=h(o,e,t,g))?e+'="'+t+'"':e:n(i=f(o,e,t,a))?void 0:i:i});s="<"+o;return A&&(s+=" "+A),M.closing&&(s+=" /"),s+=">"}return n(b=c(o,s,v))?m(s):b},m);return b&&(v=b.remove(v)),v},t.exports=a},{"./default":1,"./parser":3,"./util":4,cssfilter:8}],6:[function(e,t){function n(e){return e===undefined||null===e}function i(e){var t={};for(var n in e)t[n]=e[n];return t}function o(e){(e=i(e||{})).whiteList=e.whiteList||a.whiteList,e.onAttr=e.onAttr||a.onAttr,e.onIgnoreAttr=e.onIgnoreAttr||a.onIgnoreAttr,e.safeAttrValue=e.safeAttrValue||a.safeAttrValue,this.options=e}var a=e("./default"),r=e("./parser");e("./util");o.prototype.process=function(e){if(!(e=(e=e||"").toString()))return"";var t=this.options,i=t.whiteList,o=t.onAttr,a=t.onIgnoreAttr,s=t.safeAttrValue;return r(e,function(e,t,r,c,l){var u=i[r],d=!1;if(!0===u?d=u:"function"==typeof u?d=u(c):u instanceof RegExp&&(d=u.test(c)),!0!==d&&(d=!1),c=s(r,c)){var p,f={position:t,sourcePosition:e,source:l,isWhite:d};return d?n(p=o(r,c,f))?r+":"+c:p:n(p=a(r,c,f))?void 0:p}})},t.exports=o},{"./default":7,"./parser":9,"./util":10}],7:[function(e,t,n){function i(){var e={"align-content":!1,"align-items":!1,"align-self":!1,"alignment-adjust":!1,"alignment-baseline":!1,all:!1,"anchor-point":!1,animation:!1,"animation-delay":!1,"animation-direction":!1,"animation-duration":!1,"animation-fill-mode":!1,"animation-iteration-count":!1,"animation-name":!1,"animation-play-state":!1,"animation-timing-function":!1,azimuth:!1,"backface-visibility":!1,background:!0,"background-attachment":!0,"background-clip":!0,"background-color":!0,"background-image":!0,"background-origin":!0,"background-position":!0,"background-repeat":!0,"background-size":!0,"baseline-shift":!1,binding:!1,bleed:!1,"bookmark-label":!1,"bookmark-level":!1,"bookmark-state":!1,border:!0,"border-bottom":!0,"border-bottom-color":!0,"border-bottom-left-radius":!0,"border-bottom-right-radius":!0,"border-bottom-style":!0,"border-bottom-width":!0,"border-collapse":!0,"border-color":!0,"border-image":!0,"border-image-outset":!0,"border-image-repeat":!0,"border-image-slice":!0,"border-image-source":!0,"border-image-width":!0,"border-left":!0,"border-left-color":!0,"border-left-style":!0,"border-left-width":!0,"border-radius":!0,"border-right":!0,"border-right-color":!0,"border-right-style":!0,"border-right-width":!0,"border-spacing":!0,"border-style":!0,"border-top":!0,"border-top-color":!0,"border-top-left-radius":!0,"border-top-right-radius":!0,"border-top-style":!0,"border-top-width":!0,"border-width":!0,bottom:!1,"box-decoration-break":!0,"box-shadow":!0,"box-sizing":!0,"box-snap":!0,"box-suppress":!0,"break-after":!0,"break-before":!0,"break-inside":!0,"caption-side":!1,chains:!1,clear:!0,clip:!1,"clip-path":!1,"clip-rule":!1,color:!0,"color-interpolation-filters":!0,"column-count":!1,"column-fill":!1,"column-gap":!1,"column-rule":!1,"column-rule-color":!1,"column-rule-style":!1,"column-rule-width":!1,"column-span":!1,"column-width":!1,columns:!1,contain:!1,content:!1,"counter-increment":!1,"counter-reset":!1,"counter-set":!1,crop:!1,cue:!1,"cue-after":!1,"cue-before":!1,cursor:!1,direction:!1,display:!0,"display-inside":!0,"display-list":!0,"display-outside":!0,"dominant-baseline":!1,elevation:!1,"empty-cells":!1,filter:!1,flex:!1,"flex-basis":!1,"flex-direction":!1,"flex-flow":!1,"flex-grow":!1,"flex-shrink":!1,"flex-wrap":!1,float:!1,"float-offset":!1,"flood-color":!1,"flood-opacity":!1,"flow-from":!1,"flow-into":!1,font:!0,"font-family":!0,"font-feature-settings":!0,"font-kerning":!0,"font-language-override":!0,"font-size":!0,"font-size-adjust":!0,"font-stretch":!0,"font-style":!0,"font-synthesis":!0,"font-variant":!0,"font-variant-alternates":!0,"font-variant-caps":!0,"font-variant-east-asian":!0,"font-variant-ligatures":!0,"font-variant-numeric":!0,"font-variant-position":!0,"font-weight":!0,grid:!1,"grid-area":!1,"grid-auto-columns":!1,"grid-auto-flow":!1,"grid-auto-rows":!1,"grid-column":!1,"grid-column-end":!1,"grid-column-start":!1,"grid-row":!1,"grid-row-end":!1,"grid-row-start":!1,"grid-template":!1,"grid-template-areas":!1,"grid-template-columns":!1,"grid-template-rows":!1,"hanging-punctuation":!1,height:!0,hyphens:!1,icon:!1,"image-orientation":!1,"image-resolution":!1,"ime-mode":!1,"initial-letters":!1,"inline-box-align":!1,"justify-content":!1,"justify-items":!1,"justify-self":!1,left:!1,"letter-spacing":!0,"lighting-color":!0,"line-box-contain":!1,"line-break":!1,"line-grid":!1,"line-height":!1,"line-snap":!1,"line-stacking":!1,"line-stacking-ruby":!1,"line-stacking-shift":!1,"line-stacking-strategy":!1,"list-style":!0,"list-style-image":!0,"list-style-position":!0,"list-style-type":!0,margin:!0,"margin-bottom":!0,"margin-left":!0,"margin-right":!0,"margin-top":!0,"marker-offset":!1,"marker-side":!1,marks:!1,mask:!1,"mask-box":!1,"mask-box-outset":!1,"mask-box-repeat":!1,"mask-box-slice":!1,"mask-box-source":!1,"mask-box-width":!1,"mask-clip":!1,"mask-image":!1,"mask-origin":!1,"mask-position":!1,"mask-repeat":!1,"mask-size":!1,"mask-source-type":!1,"mask-type":!1,"max-height":!0,"max-lines":!1,"max-width":!0,"min-height":!0,"min-width":!0,"move-to":!1,"nav-down":!1,"nav-index":!1,"nav-left":!1,"nav-right":!1,"nav-up":!1,"object-fit":!1,"object-position":!1,opacity:!1,order:!1,orphans:!1,outline:!1,"outline-color":!1,"outline-offset":!1,"outline-style":!1,"outline-width":!1,overflow:!1,"overflow-wrap":!1,"overflow-x":!1,"overflow-y":!1,padding:!0,"padding-bottom":!0,"padding-left":!0,"padding-right":!0,"padding-top":!0,page:!1,"page-break-after":!1,"page-break-before":!1,"page-break-inside":!1,"page-policy":!1,pause:!1,"pause-after":!1,"pause-before":!1,perspective:!1,"perspective-origin":!1,pitch:!1,"pitch-range":!1,"play-during":!1,position:!1,"presentation-level":!1,quotes:!1,"region-fragment":!1,resize:!1,rest:!1,"rest-after":!1,"rest-before":!1,richness:!1,right:!1,rotation:!1,"rotation-point":!1,"ruby-align":!1,"ruby-merge":!1,"ruby-position":!1,"shape-image-threshold":!1,"shape-outside":!1,"shape-margin":!1,size:!1,speak:!1,"speak-as":!1,"speak-header":!1,"speak-numeral":!1,"speak-punctuation":!1,"speech-rate":!1,stress:!1,"string-set":!1,"tab-size":!1,"table-layout":!1,"text-align":!0,"text-align-last":!0,"text-combine-upright":!0,"text-decoration":!0,"text-decoration-color":!0,"text-decoration-line":!0,"text-decoration-skip":!0,"text-decoration-style":!0,"text-emphasis":!0,"text-emphasis-color":!0,"text-emphasis-position":!0,"text-emphasis-style":!0,"text-height":!0,"text-indent":!0,"text-justify":!0,"text-orientation":!0,"text-overflow":!0,"text-shadow":!0,"text-space-collapse":!0,"text-transform":!0,"text-underline-position":!0,"text-wrap":!0,top:!1,transform:!1,"transform-origin":!1,"transform-style":!1,transition:!1,"transition-delay":!1,"transition-duration":!1,"transition-property":!1,"transition-timing-function":!1,"unicode-bidi":!1,"vertical-align":!1,visibility:!1,"voice-balance":!1,"voice-duration":!1,"voice-family":!1,"voice-pitch":!1,"voice-range":!1,"voice-rate":!1,"voice-stress":!1,"voice-volume":!1,volume:!1,"white-space":!1,widows:!1,width:!0,"will-change":!1,"word-break":!0,"word-spacing":!0,"word-wrap":!0,"wrap-flow":!1,"wrap-through":!1,"writing-mode":!1,"z-index":!1};return e}function o(){}function a(){}function r(e,t){return s.test(t)?"":t}var s=/javascript\s*\:/gim;n.whiteList=i(),n.getDefaultWhiteList=i,n.onAttr=o,n.onIgnoreAttr=a,n.safeAttrValue=r},{}],8:[function(e,t,n){function i(e,t){return new a(t).process(e)}var o=e("./default"),a=e("./css");for(var r in(n=t.exports=i).FilterCSS=a,o)n[r]=o[r];"undefined"!=typeof window&&(window.filterCSS=t.exports)},{"./css":6,"./default":7}],9:[function(e,t){function n(e,t){function n(){if(!a){var n=i.trim(e.slice(r,s)),o=n.indexOf(":");if(-1!==o){var l=i.trim(n.slice(0,o)),u=i.trim(n.slice(o+1));if(l){var d=t(r,c.length,l,u,n);d&&(c+=d+"; ")}}}r=s+1}";"!==(e=i.trimRight(e))[e.length-1]&&(e+=";");for(var o=e.length,a=!1,r=0,s=0,c="";s<o;s++){var l=e[s];if("/"===l&&"*"===e[s+1]){var u=e.indexOf("*/",s+2);if(-1===u)break;r=(s=u+1)+1,a=!1}else"("===l?a=!0:")"===l?a=!1:";"===l?a||n():"\n"===l&&n()}return i.trim(c)}var i=e("./util");t.exports=n},{"./util":10}],10:[function(e,t){t.exports={indexOf:function(e,t){var n,i;if(Array.prototype.indexOf)return e.indexOf(t);for(n=0,i=e.length;n<i;n++)if(e[n]===t)return n;return-1},forEach:function(e,t,n){var i,o;if(Array.prototype.forEach)return e.forEach(t,n);for(i=0,o=e.length;i<o;i++)t.call(n,e[i],i,e)},trim:function(e){return String.prototype.trim?e.trim():e.replace(/(^\s*)|(\s*$)/g,"")},trimRight:function(e){return String.prototype.trimRight?e.trimRight():e.replace(/(\s*$)/g,"")}}},{}]},{},[2]),window.escapeHTML=function(){var e=$("<div/>");return function(t){return e.text(t).html()}}(),window.htmlSafe=window.escapeHTML,function(){window.Gitee={}}.call(this),function(){var e=window.location.hostname;"git.oschina.net"===e&&(window.location.href=window.location.href.replace(e,"gitee.com"))}(),function(){var e,t,n;n=function(e,t){var n;return n={onIgnoreTagAttr:function(e,t,n){if("class"===t)return t+'="'+n+'"'}},t&&(n.whiteList=t),filterXSS(e,n)},t=function(e,t){var i,o;o="string"==typeof e?n(e,t):e;try{(i=$(o)).length||(i=$("<div/>").html(o))}catch(a){a,i=$("<div/>").html(o)}return i},e=function(){function e(e){e||(e={}),this.alertText=e.alertText||"Alert",this.confirmText=e.confirmText||"Confirm",this.approveText=e.approveText||"Approve",this.cancelText=e.cancelText||"Cancel",this.okText=e.okText||"Ok",this.className=e.className||""}return e.prototype.alert=function(e,t,i){var o;return t?e||(e=this.alertText):(t=e,e=this.alertText),o='<div class="ui mini modal gitee-modal '+this.className+'">\n  <i class="iconfont icon-close close"></i>\n  <div class="header">'+n(e)+'</div>\n  <div class="content">'+n(t)+'</div>\n  <div class="actions">\n    <div class="ui orange approve button"">'+n(this.okText)+"</div>\n  </div>\n</div>",i?$(o).modal({onApprove:i}).modal("show"):$(o).modal("show")},e.prototype.confirm=function(e,i,o,a,r){var s,c,l,u;return e||(e=this.confirmText),c=this.approveText,r&&"approveText"in r&&(c=r.approveText),l=this.cancelText,r&&"cancelText"in r&&(l=r.cancelText),s=t(i,r&&r.whiteList),r=$.isPlainObject(o)?o:$.extend({},{onApprove:o,onDeny:a},r),u='<div class="ui mini modal gitee-modal '+this.className+'">\n  <i class="iconfont icon-close close"></i>\n  <div class="header">'+n(e)+'</div>\n  <div class="content"></div>\n  <div class="actions">\n    <div class="ui blank cancel button">'+n(l)+'</div>\n    <div class="ui orange approve button">'+n(c)+"</div>\n  </div>\n</div>",$(u).children(".content").append(s).parent().modal(r).modal("show")},e.prototype.tiny_confirm=function(e,t,i,o,a){var r,s;e||(e=this.confirmText);try{(r=$(t)).length||(r=$("<div/>").html(t))}catch(c){c,r=$("<div/>").html(t)}return a=$.isPlainObject(i)?i:$.extend({},{onApprove:i,onDeny:o},a),s='<div class="ui tiny modal gitee-modal '+this.className+'">\n  <i class="iconfont icon-close close"></i>\n  <div class="header">'+n(e)+'</div>\n  <div class="content"></div>\n  <div class="actions">\n    <div class="ui blank cancel button">'+n(this.cancelText)+'</div>\n    <div class="ui orange approve button">'+n(this.approveText)+"</div>\n  </div>\n</div>",$(s).find(".content").append(r).parent().modal(a).modal("show")},e.prototype.info=function(e,i,o){var a,r;return null==o&&(o="mini"),a=t(i),r='<div class="ui '+n(o)+" modal gitee-modal "+this.className+'">\n  <i class="iconfont icon-close close"></i>\n  <div class="header">'+n(e)+'</div>\n  <div class="content"></div>\n</div>',$(r).children(".content").append(a).parent().modal("show")},e}(),"undefined"!=typeof module&&(module.exports=e),this.GiteeModalHelper=e}.call(this),function(){var e;e=function(){function e(e){e||(e={}),e.sendClass||console.error("btnClass must exist"),e.phone||console.error("phone number must exist"),e.captcha||console.error("captcha must exist"),this.options=e,this.btnObj=$(e.sendClass),this.captcha=e.captcha,this.phone=e.phone,this.phoneClass=e.phoneClass,this.captchaClass=e.captchaClass,this.removePhoneDisabled=e.removePhoneDisabled,"undefined"==typeof this.removePhoneDisabled&&(this.removePhoneDisabled=!0),this.removeCaptchaDisabled=e.removeCaptchaDisabled,"undefined"==typeof this.removeCaptchaDisabled&&(this.removeCaptchaDisabled=!0)}return e.prototype.send=function(e){var t;return t=this,this.phone&&""!==this.phone?this.captcha&&""!==this.captcha?this.btnObj?(this.btnObj.addClass("disabled"),$.ajax({url:"/phones/send_phone_captcha",data:{phone:this.phone,img_captcha:this.captcha,check_captcha:e.forceCheckCaptcha||!1},type:"POST",success:function(n){if(t.btnObj.countdown({template:"\u91cd\u65b0\u53d1\u9001 (${time}s)",callback:function(){if(t.btnObj.text("\u91cd\u65b0\u53d1\u9001").removeClass("disabled"),t.visibleToggle(),e.onCaptchaTimeOut)return e.onCaptchaTimeOut()}}),n.notice&&t.showMessage(n.notice),t.visibleToggle(),1===n.result)return e.onSuccess(n)}})):(console.error("invalid button object"),!1):(this.showMessage("\u9a8c\u8bc1\u7801\u4e0d\u80fd\u4e3a\u7a7a"),!1):(this.showMessage("\u624b\u673a\u53f7\u7801\u4e0d\u80fd\u4e3a\u7a7a"),!1)},e.prototype.showMessage=function(e){return Flash?Flash.show(e):Toast(e)},e.prototype.visibleToggle=function(){if(this.phoneClass&&($(this.phoneClass).attr("disabled")?this.removePhoneDisabled&&$(this.phoneClass).attr("disabled",!1):$(this.phoneClass).attr("disabled",!0)),this.captchaClass){if(!$(this.captchaClass).attr("disabled"))return $(this.captchaClass).attr("disabled",!0);if(this.removeCaptchaDisabled)return $(this.captchaClass).attr("disabled",!1)}},e}(),this.SMS=e}.call(this),Gitee.initTabsInDropdown=function(e){function t(t){var i=e.find('.tab-menu-item[data-tab="'+t+'"]');e.find(".tab.active").removeClass("active"),e.find(".tab-menu-item.active").removeClass("active"),e.find(".tab-menu-action.active").removeClass("active"),e.find('.tab[data-tab="'+t+'"]').addClass("active"),e.find('.tab-menu-action[data-tab="'+t+'"]').addClass("active"),i.data("placeholder")&&n.attr("placeholder",i.data("placeholder")),i.addClass("active")}var n=e.find(".ui.search.input input");e.find(".tab-menu-item").on("click",function(){t($(this).data("tab"))});const i=e.dropdown("get selected item");Array.isArray(i)?i.forEach(e=>{t(e.parent().data("tab"))}):t(i.parent().data("tab"))},window.Gitee.initStats=function(){function e(){try{window.gon&&window._hmt&&window.gon.baidu_register_hm_push&&(window.gon.baidu_register_hm_push=undefined,console.log("success sign up"),window._hmt.push(["_trackCustomEvent","Pers_Regist_Success"]),$(document).on("click","[data-track]",function(e){var t=$(this);window._hmt.push(["_trackCustomEvent",t.data("track"),{}]),"A"===t.prop("tagName")&&t.attr("href")&&(e.stopPropagation(),e.preventDefault(),setTimeout(function(){window.location.href=t.attr("href")},200))}))}catch(e){console.error(e)}}function t(){var e,t;try{switch(e=window.gon.info.controller_path.concat("#",window.gon.info.action_name),!0){case/^(mobile\/)?home#index/.test(e):t=window.gon.info.current_user?"homepage_logged":"homepage";break;case/^(mobile\/)?enterprises#index/.test(e):t="enterprise_info";break;case/^(mobile\/)?education#index/.test(e):t="education_info";break;case/^(mobile\/)?gp#index/.test(e):t="premium_info";break;case/^(mobile\/)?explores#index/.test(e):t="explore";break;case/^(mobile\/)?explores#show/.test(e):t="explore_sorts";break;case/^(mobile\/)?open_source_vips#(index|category)/.test(e):t="gvp";break;case/^(mobile\/users#login|sessions#new)/.test(e):t="login";break;case/^(mobile\/users#signup|registrations#new)/.test(e):t="signup";break;case/^(mobile\/)?enterprises#new/.test(e):t="enterprise_new";break;case/^(mobile\/)?users#show/.test(e):t="user_profile";break;case/^(mobile\/profile#index|profiles#\w+)/.test(e):t="user_settings";break;case/^(mobile\/)?(projects|issues|pull_requests|attach_files|wikis|repositories|paas|pages|javadocs|phpdocs|quality_analyses|settings|team_members|deploy_keys|services|hooks|readonly_items|lfs_files)#\w+/.test(e):t="repository";break;case/^(mobile\/)?(groups|groups\/members)#\w+/.test(e):t="organization";break;case/^(mobile\/)?self_services#\w+/.test(e):t="self_services";break;case/^(mobile\/)?help#index/.test(e):t="help_center";break;case/enterprises\/dashboard\/\w+#\w+/.test(e):t=window.gon.info.current_user&&window.gon.info.current_user.official?"enterprise_demo":"enterprise_workspace"}t&&window._hmt.push(["_setPageviewProperty",{page_group:t}])}catch(n){console.error(n)}}function n(){var n=document.createElement("script"),o=document.getElementsByTagName("script")[0];n.src="https://hm.baidu.com/hm.js?"+i,o.parentNode.insertBefore(n,o),"ActiveXObject"in window?n.onreadystatechange=function(){"loaded"!==this.readyState&&"complete"!==this.readyState||((window._hmt=window._hmt||[])&&window._hmt.push(["_setAccount",i]),t(),e())}:n.onload=function(){(window._hmt=window._hmt||[])&&window._hmt.push(["_setAccount",i]),t(),e()}}if(/gitee\.com$/.test(window.location.hostname)){var i="24f17767262929947cc3631f99bfd274";n()}},Gitee.initRepoRemoteWay=function(){$.cookie("remote_way")||$.cookie("remote_way",{expires:360,path:"/"})},function(e,t){var n="undefined"==typeof window?undefined:window.define;"function"==typeof n&&n.amd?n([],function(){return t()}):"object"==typeof module&&module.exports?module.exports=t():e.globalUtils=t()}(this,function(){var e="undefined"==typeof window?{}:window.gon||{},t=function(e,t){var n=new Date(e),i=n.getFullYear(),o=n.getMonth()+1,a=n.getDate(),r=n.getHours(),s=n.getMinutes(),c=n.getSeconds();return(t||"yyyy-MM-dd hh:mm").replace("yyyy",i).replace("MM",o).replace("dd",a).replace("hh",r).replace("mm",s).replace("ss",c).replace(/\b\d{1}\b/g,"0$&")},n=function(e,t,n){var i=null,o=!0;return function(){var a=this,r=arguments;i&&clearTimeout(i),n?(i=setTimeout(function(){e.apply(a,r),o=!0},t),o&&(e.apply(a,r),o=!1)):i=setTimeout(function(){e.apply(a,r)},t)}},i=function(e,t){var n=null,i=Date.now();return function(){var o=Date.now(),a=t-(o-i),r=this,s=arguments;clearTimeout(n),a<=0?(e.apply(r,s),i=Date.now()):n=setTimeout(e,a)}},o=function(e,t){var n,i=t||new Date;try{n=new Date(e),i=new Date(i)}catch(o){return 0}return i.getTime()-n.getTime()},a=function(e){var t={};return Object.keys(e).forEach(function(n){var i=e[n];i instanceof Array&&(i=i.toString()),""!==i&&(t[n]=i)}),1===Number(t.page)&&delete t.page,t},r=function(){for(var e=[].slice.call(arguments),t=0,n="";t<e.length;t++){Object.keys(e[t]).forEach(function(i){n+=i+"="+e[t][i]+"&"})}return n.slice(0,-1)},s=function(e,t){var n=null;return e.some(function(e){return!!t(e)&&(n=e,!0)}),n},c=function(e){return e.substr(0,7)},l=function(){var e=localStorage.getItem("__GiteeBetaMode");return"string"!=typeof e?"gitee.com"!==window.location.hostname||1===window.gon.enterprise.id:"true"===e},u=function(e,t){var n=void 0===t?{}:t,i=n.onSuccess||function(){},o=n.onFail||function(){},a=n.always||function(){};$.post("/check",{"do":"captcha",val:e}).done(function(e){"1"===e?i():o(e),a(e)}).fail(function(e){o(e),a(e)})},d=function(e,t,n,i){var o=void 0===n?{}:n,a=o.onSuccess||function(){},r=o.onError||function(){},s=o.onCancel||function(){},c=o.always||function(){};return $.ajax({url:"/check",data:{"do":e,val:t,entrance:i},type:"POST",success:function(e){"1"===e?a():r(e),c()},error:function(e){"abort"===e.statusText?s():r(e.responseText),c()}})},p=function(e,t){var n=void 0===t?{}:t,i=n.onSuccess||function(){},o=n.onError||function(){},a=n.onCancel||function(){},r=n.always||function(){};return $.ajax({url:"/personal/password_strength",data:{value:e},method:"POST",dataType:"json",success:function(e){"available"===e.status?i(e):o(e),r(e)},error:function(e){"abort"===e.statusText?a():o(e.responseText),r(data)}})},f=function(e,t,n){$.post("/send_phone_email_captcha",$.extend({},e,t)).done(function(e){n(!0,e.message,e.code)}).fail(function(e){n(!1,e.responseJSON.message)})},h=function(e,t){$.post("/check_user_login",{user_login:e}).done(function(e){1===e.result&&e.failed_count>2?t(!0):t(!1)})},m=function(e,t){return $.get("/search/translate",e).done(function(e){t(e)}).fail(function(){t()})},g={appId:e.yunpian_key,container:"undefined"==typeof document?null:document.querySelector("body"),version:"v1",expired:20,winWidth:400,mode:"flat",noButton:!0,onSuccess:function(){},onError:function(){},onFail:function(e,t,n){n()},afterStart:function(){$(".yp-riddler-winbox").css("width","auto")}},b=function(e,t){var n=e[0]||e;if(n instanceof HTMLElement){var i=n.value.length||n.innerHTML.length||0;setTimeout(function(){n.focus(),"number"===n.type?console.warn("Uncaught DOMException: Failed to execute 'setSelectionRange' on 'HTMLInputElement': The input element's type ('number') does not support selection."):n.setSelectionRange(i,i)},50),t&&t.preventDefault()}else console.warn("params error, must is HTMLElement")},v={};"zh-TW"==e.locale?v.langPack={YPcaptcha_01:"\u8acb\u9ede\u64ca\u6309\u9215\u958b\u59cb\u9a57\u8b49",YPcaptcha_02:"\u8acb\u6309\u9806\u5e8f\u9ede\u64ca:",YPcaptcha_03:"\u5411\u53f3\u62d6\u52d5\u6ed1\u584a\u586b\u5145\u62fc\u5716",YPcaptcha_04:"\u9a57\u8b49\u5931\u6557\uff0c\u8acb\u91cd\u8a66",YPcaptcha_05:"\u9a57\u8b49\u6210\u529f"}:"en"==e.locale?v.lang="en":v.lang="zh-cn",$.extend(g,v);var M=function(e){window.Toast?Toast({message:e,position:"bottom"}):window.Flash&&window.Flash.error(e)
DesignScreenshot/output/gitee_run/gitee.com_4_after_login.html:346:},y=null,A=function(e,t){T({container:e[0],mode:"flat",beforeStart:function(e){t.beforeStart&&"function"==typeof t.beforeStart?t.beforeStart(e.bind(this)):e()},onError:function(){var e=t.callback;z($.extend(t,{useCaptch:!0,callback:function(t,n){e(t),n()}}))},onFail:function(e,t,n){n()},onSuccess:function(n,i){n.captcha_type="yunpian",t.callback(n,function(){e.closest(".gitee-modal").modal("hide")}),i()}})},w=function(t){var n,i=e.yunpian_key,o=$('<input maxlength="6"/>'),a=$("<div/>",{"class":"2verify-container"}),r=$("<div/>",{style:"display: flex; flex-direction: column;","class":"2verify-container__image"}),s=$("<div/>",{"class":"2verify-container__yunPian"}),c=$('<div class="ui input right labeled captcha-labeled"/>').append(o),l=$('<div class="ui label"/>'),u=$("<img/>",{src:"/rucaptcha?"+(new Date).getTime(),"class":"captcha_img"}),d=$("<div/>",{"class":"ui error",style:"margin-top: 6px; color: #f14333;"}),p=$('<div class="session__2verify-switch mt-3 mb-1">\u4f7f\u7528\u6709\u95ee\u9898\uff1f<a>\u5207\u6362\u81f3\u5176\u4ed6\u9a8c\u8bc1\u65b9\u5f0f</a></div>'),f=$('<button class="ui disabled orange button fluid large mt-2">\u63d0\u4ea4</div>');return l.append(u),c.append(l),r.append(c).append(d).append(f),a.append(r),o.on("input",function(){6===this.value.length?f.removeClass("disabled"):f.addClass("disabled")}),i&&!0!==t.useCaptch&&(n=!0,r.hide(),a.append(s).append(p),A(s,t),p.find("a").on("click",function(){(n=!n)?(s.show(),r.hide()):(o.val(""),d.text(""),u.attr("src","/rucaptcha?"+(new Date).getTime()),s.hide(),r.show())})),a},z=function(e){var t,n=w(e),i=n.find("input"),o=n.find(".ui.error"),a=n.find(".captcha_img"),r=n.find(".ui.button.large");y||(y=new window.GiteeModalHelper({className:"twice-verification-warpper",approveText:"\u786e\u5b9a",cancelText:"\u53d6\u6d88"})),(t=y.confirm("\u4e8c\u6b21\u9a8c\u8bc1",n)).find(".actions").remove(),t.css("width","auto"),r.on("click",function(){var n=i.val();o.text(""),r.addClass("disabled loading"),u(n,{onSuccess:function(){e.callback({captcha_type:"captcha",captcha:n},function(){t.modal("hide")})},onFail:function(e){o.text(e),i.val(""),a.attr("src","/rucaptcha?"+(new Date).getTime())},always:function(){r.removeClass("disabled loading")}})}),i.on("input",function(){6===this.value.length?r.removeClass("disabled"):r.addClass("disabled")})},T=function(e){var t=window.YpRiddler,n=$.extend({},g,e),i=n.showError||M,o=function(e){429!==e.code?(i("\u9a8c\u8bc1\u670d\u52a1\u5f02\u5e38"),n.onError(e)):i("\u8bf7\u6c42\u8fc7\u4e8e\u9891\u7e41\uff0c\u8bf7\u7a0d\u540e\u518d\u8bd5\uff01")},a=function(e,t,o){i(2===e?"\u9a8c\u8bc1\u9519\u8bef":"\u9a8c\u8bc1\u51fa\u9519\uff1a"+t+" code: "+e),n.onFail(e,t,o)};new t($.extend({},n,{onError:o,onFail:a,onSuccess:function(e,t){n.onSuccess(e,t)}}))},x={email:/^[\w+-.]+@[a-z\d-]+(\.[a-z\d-]+)*\.[a-z]+$/,phone:/^[1,8][0-9]{10,11}$/,imageCaptcha:/^[a-zA-Z0-9]{6}$/,captcha:/^[a-zA-Z0-9]{6}$/};return{formatDate:t,formatPhone:function(e){if((11===e.length||14===e.length)&&e.startsWith("+86")){var t=e.replace("+86","");x.phone.test(t)&&(e=t)}return e},find:s,isBetaMode:l,debouce:n,throttle:i,getDiffTime:o,getCommitShortId:c,simplifyQuery:a,serialize:r,checkCaptcha:u,netCheck:d,validatePwdStrength:p,twiceVerification:T,twiceVerificationModal:function(e){var t=e.callback,n=$(e.container),i=function(){z($.extend(e,{callback:function(e,n){t(e),n()}}))};n.on("click",function(){e.beforeStart&&"function"==typeof e.beforeStart?e.beforeStart(function(){i()}):i()})},twiceVerificationWarpper:z,sendVerificationCode:f,commonRegex:x,canVerifyAccount:h,translate:m,translateCommon:function(e,t,i){var o=$(e),a=$(t);o.on("input",n(function(){a.data("manual")||""===o.val()||(o.data("traslateAjax")&&o.data("traslateAjax").abort(),o.data("traslateAjax",m({q:encodeURIComponent(o.val())},function(e){e.result&&!a.data("manual")&&(a.val(e.result),i())})))},500)),a.on("input",function(){""===this.value?$(this).data("manual",!1):$(this).data("manual",!0)})},clearSelections:function(){window.getSelection?window.getSelection().removeAllRanges():document.selection&&document.selection.empty&&document.selection.empty()},getFocus:b,getUrlQuery:function(e){if(!e)return"";var t=new RegExp("(^|&)"+e+"=([^&]*)(&|$)"),n=window.location.search.substr(1).match(t);return null!=n?decodeURIComponent(n[2]):""},shuffle:function(e){for(var t,n,i=e.length;i;)n=Math.floor(Math.random()*i--),t=e[i],e[i]=e[n],e[n]=t;return e},formPageSizeCheck:function(){var e;$("#page_size").on("input",function(){var t=/^([1-9]|[1-9][0-9]?|100)$/,n=$("#page_size").val();e=!0,""!==n?t.test(n)||(e=!1):e=!0}),$(".search-btn").click(function(t){!1===e&&(Flash.show("\u53ea\u80fd\u8f93\u51651-100\u7684\u6570\u503c"),t.preventDefault())})},createInputHistoryList:function(e,t){function i(){u=c.offset(),p.css({display:"none",position:"absolute",left:u.left+(e.offsetX||0)+"px",top:u.top+c.outerHeight()+(e.offsetY||0)+"px"})}function o(){p.fadeOut(200)}function a(){l.length<=0||p.fadeIn(200)}function r(){l=[],localStorage.setItem(e.key,JSON.stringify(l))}function s(){p.html(d())}e.maxCount=e.maxCount||5;var c=$(e.selector);if(0!==c.length&&e.key){var l=JSON.parse(localStorage.getItem(e.key)||"[]")||[],u=c.offset(),d=function(){for(var e='<div class="item item-title d-flex-between">      <div class="title">\u5386\u53f2\u641c\u7d22</div>      <i class="iconfont clear-btn icon-zhengwenpinglun_shanchuicon"></i>      </div>',t=0;t<l.length;t++){var n=$("<div>").html(l[t]).text();e+='<div class="item item-text" title="'+n+'">'+n+"</div>"}return e},p=$('<div class="search-history-list-wrapper '+e.className+'">'+d()+'</div>"');return $(document).on("mousedown",".search-history-list-wrapper",function(e){e.preventDefault()}),$(document).on("click",".search-history-list-wrapper .item-text",function(){var e=$(this).text();c.val(e),o(),t&&t.onClick&&t.onClick(e)}),$(document).on("mouseenter",".search-history-list-wrapper .item-text",function(){var e=$(this).text();c.val(e)}),$(document).on("click",".search-history-list-wrapper .clear-btn",function(){r(),o(),s()}),$(document).on("click",e.selector,function(){a()}),$(window).on("resize",n(function(){i()},400)),$("body").append(p),i(),{add:function(t){if(t){var n=window.filterXSS(t,{stripIgnoreTag:!1,whiteList:{}});n=window.htmlSafe(n);var i=l.indexOf(n);if(i>-1){var o=l[i];l.splice(i,1),l.unshift(o)}else l.unshift(n),l.length>e.maxCount&&l.pop();localStorage.setItem(e.key,JSON.stringify(l)),s()}},clear:function(){r(),s()},show:function(){i(),a()},hide:function(){o()},removeSelf:function(){p.remove()},refresh:function(){s()},resize:function(){i()}}}},goBackReload:function(){document.referrer&&(location.href=document.referrer)},filterEmoji:function(e){return e?e.replace(/[\uD83C|\uD83D|\uD83E][\uDC00-\uDFFF][\u200D|\uFE0F]|[\uD83C|\uD83D|\uD83E][\uDC00-\uDFFF]|[0-9|*|#]\uFE0F\u20E3|[0-9|#]\u20E3|[\u203C-\u3299]\uFE0F\u200D|[\u203C-\u3299]\uFE0F|[\u2122-\u2B55]|\u303D|[\A9|\AE]\u3030|\uA9|\uAE|\u3030/gi,""):""},isPageInputState:function(){return!!document.activeElement&&["INPUT","TEXTAREA"].indexOf(document.activeElement.tagName)>-1},clearURLParams:function(){window.history&&history.replaceState?history.replaceState({},"",location.origin+location.pathname):Flash.error("\u8bf7\u66f4\u65b0\u60a8\u7684\u6d4f\u89c8\u5668\u540e\u7ee7\u7eed\u8bbf\u95ee")},once:function(e){var t=!1;return function(){t||(t=!0,e.apply(this,arguments))}},aiGenProjectName:function(e,t){$.post("/enhance/desc2name",{scene:"project",description:e.description,negative_words:e.negativeWords,language:e.language}).done(function(e){t(e.data)}).fail(function(){t()})},aiGenProjectDesc:function(e,t){$.post("/enhance/name2desc",{scene:"project",name:e.name,negative_words:e.negativeWords,language:e.language}).done(function(e){t(e.data)}).fail(function(){t()})},aiCheckLimit:function(e){$.get("/enhance/check_limited").done(function(t){e(t.data)}).fail(function(){e()})}}}),function(){function e(){if("hidden"in document)return document.hidden;for(var e=["webkit","moz","mos","o"],t=0,n=e.length;t<n;t++)if(e[t]+"Hidden"in document)return document[e[t]+"Hidden"];return!1}var t;"undefined"!=typeof document.hidden?(hidden="hidden",t="visibilitychange"):"undefined"!=typeof document.msHidden?(hidden="msHidden",t="msvisibilitychange"):"undefined"!=typeof document.webkitHidden&&(hidden="webkitHidden",t="webkitvisibilitychange"),document.addEventListener(t,window.globalUtils.throttle(function(){$(window).trigger("document:visibility",{isHidden:e()})},8e3),!1)}(),function(){this.Flash={hasElement:!1,show:function(e,t,n,i){var o,a,r;if(null==t&&(t="info"),null==n&&(n=3e3),r='<div data-notify="container" class="ui {0} message" role="alert"><i data-notify="dismiss" class="close icon"></i><span data-notify="message">{2}</span></div>',o={message:e=i?e:htmlSafe(e)},a={type:t},e)return a.delay=n,a.template=r,a.offset={x:10,y:30},a.element="#messages-container",this.hasElement||this.findOrInitElement(a),$.notify(o,a)},info:function(e,t){return null==t&&(t=3e3),this.show(e,"info",t)},error:function(e,t){return null==t&&(t=3e3),this.show(e,"error",t)},findOrInitElement:function(e){var t;return $(e.element).length||(t=e.element.replace("#",""),$("body").append('<div class="flash-messages" id="'+t+'"></div>')),this.hasElement=!0}}}.call(this),
DesignScreenshot/output/gitee_run/gitee.com_4_after_login.html:360:!f.silent&&f.verbose&&f.debug&&(f.performance?A.performance.log(arguments):(A.verbose=Function.prototype.bind.call(console.info,console,f.name+":"),A.verbose.apply(console,arguments)))},error:function(){f.silent||(A.error=Function.prototype.bind.call(console.error,console,f.name+":"),A.error.apply(console,arguments))},performance:{log:function(e){var t,n;f.performance&&(n=(t=(new Date).getTime())-(s||t),s=t,c.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:z,"Execution Time":n})),clearTimeout(A.performance.timer),A.performance.timer=setTimeout(A.performance.display,500)},display:function(){var t=f.name+":",n=0;s=!1,clearTimeout(A.performance.timer),e.each(c,function(e,t){n+=t["Execution Time"]}),t+=" "+n+"ms",r&&(t+=" '"+r+"'"),a.length>1&&(t+=" ("+a.length+")"),(console.group!==i||console.table!==i)&&c.length>0&&(console.groupCollapsed(t),console.table?console.table(c):e.each(c,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),c=[]}},invoke:function(t,n,a){var r,s,c,l=h;return n=n||d,a=z||a,"string"==typeof t&&l!==i&&(t=t.split(/[\. ]/),r=t.length-1,e.each(t,function(n,o){var a=n!=r?o+t[n+1].charAt(0).toUpperCase()+t[n+1].slice(1):t;if(e.isPlainObject(l[a])&&n!=r)l=l[a];else{if(l[a]!==i)return s=l[a],!1;if(!e.isPlainObject(l[o])||n==r)return l[o]!==i&&(s=l[o],!1);l=l[o]}})),e.isFunction(s)?c=s.apply(a,n):s!==i&&(c=s),e.isArray(o)?o.push(c):o!==i?o=[o,c]:c!==i&&(o=c),s!==i&&s}}).initialize()}),o!==i?o:this},e.fn.transition.exists={},e.fn.transition.settings={name:"Transition",silent:!1,debug:!1,verbose:!1,performance:!0,namespace:"transition",interval:0,reverse:"auto",onStart:function(){},onComplete:function(){},onShow:function(){},onHide:function(){},useFailSafe:!0,failSafeDelay:100,allowRepeats:!1,displayType:!1,animation:"fade",duration:!1,queue:!0,metadata:{displayType:"display"},className:{animating:"animating",disabled:"disabled",hidden:"hidden",inward:"in",loading:"loading",looping:"looping",outward:"out",transition:"transition",visible:"visible"},error:{noAnimation:"Element is no longer attached to DOM. Unable to animate.  Use silent setting to surpress this warning in production.",repeated:"That animation is already occurring, cancelling repeated animation",method:"The method you called is not defined",support:"This browser does not support CSS animations"}}}(jQuery,window,document),function(e,t,n,i){"use strict";t=void 0!==t&&t.Math==Math?t:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),e.fn.dropdown=function(o){var a,r=e(this),s=e(n),c=r.selector||"",l="ontouchstart"in n.documentElement,u=(new Date).getTime(),d=[],p=arguments[0],f="string"==typeof p,h=[].slice.call(arguments,1);return r.each(function(m){var g,b,v,M,y,A,w,z,T=e.isPlainObject(o)?e.extend(!0,{},e.fn.dropdown.settings,o):e.extend({},e.fn.dropdown.settings),x=T.className,O=T.message,C=T.fields,k=T.keys,_=T.metadata,L=T.namespace,S=T.regExp,N=T.selector,q=T.error,E=T.templates,W="."+L,D="module-"+L,B=e(this),R=e(T.context),X=B.find(N.text),$=B.find(N.search),P=B.find(N.sizer),I=B.find(N.input),j=B.find(N.icon),F=B.prev().find(N.text).length>0?B.prev().find(N.text):B.prev(),H=B.children(N.menu),U=H.find(N.item),V=!1,Y=!1,G=!1,K=this,Q=B.data(D);z={initialize:function(){z.debug("Initializing dropdown",T),z.is.alreadySetup()?z.setup.reference():(z.setup.layout(),z.refreshData(),z.save.defaults(),z.restore.selected(),z.create.id(),z.bind.events(),z.observeChanges(),z.instantiate())},instantiate:function(){z.verbose("Storing instance of dropdown",z),Q=z,B.data(D,z)},destroy:function(){z.verbose("Destroying previous dropdown",B),z.remove.tabbable(),B.off(W).removeData(D),H.off(W),s.off(M),z.disconnect.menuObserver(),z.disconnect.selectObserver()},observeChanges:function(){"MutationObserver"in t&&(A=new MutationObserver(z.event.select.mutation),w=new MutationObserver(z.event.menu.mutation),z.debug("Setting up mutation observer",A,w),z.observe.select(),z.observe.menu())},disconnect:{menuObserver:function(){w&&w.disconnect()},selectObserver:function(){A&&A.disconnect()}},observe:{select:function(){z.has.input()&&A.observe(I[0],{childList:!0,subtree:!0})},menu:function(){z.has.menu()&&w.observe(H[0],{childList:!0,subtree:!0})}},create:{id:function(){y=(Math.random().toString(16)+"000000000").substr(2,8),M="."+y,z.verbose("Creating unique id for element",y)},userChoice:function(t){var n,o,a;return!!(t=t||z.get.userValues())&&(t=e.isArray(t)?t:[t],e.each(t,function(t,r){!1===z.get.item(r)&&(a=T.templates.addition(z.add.variables(O.addResult,r)),o=e("<div />").html(a).attr("data-"+_.value,r).attr("data-"+_.text,r).addClass(x.addition).addClass(x.item),T.hideAdditions&&o.addClass(x.hidden),n=n===i?o:n.add(o),z.verbose("Creating user choices for value",r,o))}),n)},userLabels:function(){var t=z.get.userValues();t&&(z.debug("Adding user labels",t),e.each(t,function(e,t){z.verbose("Adding custom user value"),z.add.label(t,t)}))},menu:function(){H=e("<div />").addClass(x.menu).appendTo(B)},sizer:function(){P=e("<span />").addClass(x.sizer).insertAfter($)}},search:function(e){e=e!==i?e:z.get.query(),z.verbose("Searching for query",e),z.has.minCharacters(e)?z.filter(e):z.hide()},select:{firstUnfiltered:function(){z.verbose("Selecting first non-filtered element"),z.remove.selectedItem(),U.not(N.unselectable).not(N.addition+N.hidden).eq(0).addClass(x.selected)},nextAvailable:function(e){var t=(e=e.eq(0)).nextAll(N.item).not(N.unselectable).eq(0),n=e.prevAll(N.item).not(N.unselectable).eq(0);t.length>0?(z.verbose("Moving selection to",t),t.addClass(x.selected)):(z.verbose("Moving selection to",n),n.addClass(x.selected))}},setup:{api:function(){var e={debug:T.debug,urlData:{value:z.get.value(),query:z.get.query()},on:!1};z.verbose("First request, initializing API"),B.api(e)},layout:function(){B.is("select")&&(z.setup.select(),z.setup.returnedObject()),z.has.menu()||z.create.menu(),z.is.search()&&!z.has.search()&&(z.verbose("Adding search input"),$=e("<input />").addClass(x.search).prop("autocomplete","off").insertBefore(X)),z.is.multiple()&&z.is.searchSelection()&&!z.has.sizer()&&z.create.sizer(),T.allowTab&&z.set.tabbable()},select:function(){var t=z.get.selectValues();z.debug("Dropdown initialized on a select",t),B.is("select")&&(I=B),I.parent(N.dropdown).length>0?(z.debug("UI dropdown already exists. Creating dropdown menu only"),B=I.closest(N.dropdown),z.has.menu()||z.create.menu(),H=B.children(N.menu),z.setup.menu(t)):(z.debug("Creating entire dropdown from select"),B=e("<div />").attr("class",I.attr("class")).addClass(x.selection).addClass(x.dropdown).html(E.dropdown(t)).insertBefore(I),I.hasClass(x.multiple)&&!1===I.prop("multiple")&&(z.error(q.missingMultiple),I.prop("multiple",!0)),I.is("[multiple]")&&z.set.multiple(),I.prop("disabled")&&(z.debug("Disabling dropdown"),B.addClass(x.disabled)),I.removeAttr("class").detach().prependTo(B)),z.refresh()},menu:function(e){H.html(E.menu(e,C)),U=H.find(N.item)},reference:function(){z.debug("Dropdown behavior was called on select, replacing with closest dropdown"),B=B.parent(N.dropdown),z.refresh(),z.setup.returnedObject(),f&&(Q=z,z.invoke(p))},returnedObject:function(){var e=r.slice(0,m),t=r.slice(m+1);r=e.add(B).add(t)}},refresh:function(){z.refreshSelectors(),z.refreshData()},refreshItems:function(){U=H.find(N.item)},refreshSelectors:function(){z.verbose("Refreshing selector cache"),X=B.find(N.text),$=B.find(N.search),I=B.find(N.input),j=B.find(N.icon),F=B.prev().find(N.text).length>0?B.prev().find(N.text):B.prev(),H=B.children(N.menu),U=H.find(N.item)},refreshData:function(){z.verbose("Refreshing cached metadata"),U.removeData(_.text).removeData(_.value)},clearData:function(){z.verbose("Clearing metadata"),U.removeData(_.text).removeData(_.value),B.removeData(_.defaultText).removeData(_.defaultValue).removeData(_.placeholderText)},toggle:function(){z.verbose("Toggling menu visibility"),z.is.active()?z.hide():z.show()},show:function(n){if(n=e.isFunction(n)?n:function(){},z.can.show()&&!z.is.active()){if(z.debug("Showing dropdown"),!z.has.message()||z.has.maxSelections()||z.has.allResultsFiltered()||z.remove.message(),z.is.allFiltered())return!0;!1!==T.onShow.call(K)&&z.animate.show(function(){z.can.click()&&z.bind.intent(),t.navigator.userAgent.indexOf("MSIE ")>0||navigator.userAgent.match(/Trident.*rv\:11\./)||z.has.menuSearch()&&z.focusSearch(),z.set.visible(),n.call(K)})}},hide:function(t){t=e.isFunction(t)?t:function(){},z.is.active()&&(z.debug("Hiding dropdown"),!1!==T.onHide.call(K)&&z.animate.hide(function(){z.remove.visible(),t.call(K)}))},hideOthers:function(){z.verbose("Finding other dropdowns to hide"),r.not(B).has(N.menu+"."+x.visible).dropdown("hide")},hideMenu:function(){z.verbose("Hiding menu  instantaneously"),z.remove.active(),z.remove.visible(),H.transition("hide")},hideSubMenus:function(){var e=H.children(N.item).find(N.menu);z.verbose("Hiding sub menus",e),e.transition("hide")},bind:{events:function(){l&&z.bind.touchEvents(),z.bind.keyboardEvents(),z.bind.inputEvents(),z.bind.mouseEvents()},touchEvents:function(){z.debug("Touch device detected binding additional touch events"),z.is.searchSelection()||z.is.single()&&B.on("touchstart"+W,z.event.test.toggle),H.on("touchstart"+W,N.item,z.event.item.mouseenter)},keyboardEvents:function(){z.verbose("Binding keyboard events"),B.on("keydown"+W,z.event.keydown),z.has.search()&&B.on(z.get.inputEvent()+W,N.search,z.event.input),z.is.multiple()&&s.on("keydown"+M,z.event.document.keydown)},inputEvents:function(){z.verbose("Binding input change events"),B.on("change"+W,N.input,z.event.change)},mouseEvents:function(){z.verbose("Binding mouse events"),z.is.multiple()&&B.on("click"+W,N.label,z.event.label.click).on("click"+W,N.remove,z.event.remove.click),z.is.searchSelection()?(B.on("mousedown"+W,z.event.mousedown).on("mouseup"+W,z.event.mouseup).on("mousedown"+W,N.menu,z.event.menu.mousedown).on("mouseup"+W,N.menu,z.event.menu.mouseup).on("click"+W,N.icon,z.event.icon.click).on("focus"+W,N.search,z.event.search.focus).on("click"+W,N.search,z.event.search.focus).on("blur"+W,N.search,z.event.search.blur).on("click"+W,N.text,z.event.text.focus),z.is.multiple()&&B.on("click"+W,z.event.click)):("click"==T.on?B.on("click"+W,N.icon,z.event.icon.click).on("click"+W,z.event.test.toggle):"hover"==T.on?B.on("mouseenter"+W,z.delay.show).on("mouseleave"+W,z.delay.hide):B.on(T.on+W,z.toggle),B.on("mousedown"+W,z.event.mousedown).on("mouseup"+W,z.event.mouseup).on("focus"+W,z.event.focus).on("blur"+W,z.event.blur)),H.on("mouseenter"+W,N.item,z.event.item.mouseenter).on("mouseleave"+W,N.item,z.event.item.mouseleave).on("click"+W,N.item,z.event.item.click)},intent:function(){z.verbose("Binding hide intent event to document"),l&&s.on("touchstart"+M,z.event.test.touch).on("touchmove"+M,z.event.test.touch),s.on("click"+M,z.event.test.hide)}},unbind:{intent:function(){z.verbose("Removing hide intent event from document"),l&&s.off("touchstart"+M).off("touchmove"+M),s.off("click"+M)}},filter:function(e){var t=e!==i?e:z.get.query(),n=function(){z.is.multiple()&&z.filterActive(),z.select.firstUnfiltered(),z.has.allResultsFiltered()?T.onNoResults.call(K,t)?T.allowAdditions?T.hideAdditions&&(z.verbose("User addition with no menu, setting empty style"),z.set.empty(),z.hideMenu()):(z.verbose("All items filtered, showing message",t),z.add.message(O.noResults)):(z.verbose("All items filtered, hiding dropdown",t),z.hideMenu()):(z.remove.empty(),z.remove.message()),T.allowAdditions&&z.add.userSuggestion(e),z.is.searchSelection()&&z.can.show()&&z.is.focusedOnSearch()&&z.show()};T.useLabels&&z.has.maxSelections()||(T.apiSettings?z.can.useAPI()?z.queryRemote(t,function(){n()}):z.error(q.noAPI):(z.filterItems(t),n()))},queryRemote:function(t,n){var i={errorDuration:!1,cache:"local",throttle:T.throttle,urlData:{query:t},onError:function(){z.add.message(O.serverError),n()},onFailure:function(){z.add.message(O.serverError),n()},onSuccess:function(e){z.remove.message(),z.setup.menu({values:e[C.remoteValues]}),n()}};B.api("get request")||z.setup.api(),i=e.extend(!0,{},i,T.apiSettings),B.api("setting",i).api("query")},filterItems:function(t){if(!T.disableLocalSearch){var n=t!==i?t:z.get.query(),o=null,a=z.escape.regExp(n),r=new RegExp("^"+a,"igm");z.has.query()&&(o=[],z.verbose("Searching for matching values",n),U.each(function(){var t,i,a=e(this);if("both"==T.match||"text"==T.match){if(-1!==(t=String(z.get.choiceText(a,!1))).search(r))return o.push(this),!0;if("exact"===T.fullTextSearch&&z.exactSearch(n,t))return o.push(this),!0;if(!0===T.fullTextSearch&&z.fuzzySearch(n,t))return o.push(this),!0}if("both"==T.match||"value"==T.match){if(-1!==(i=String(z.get.choiceValue(a,t))).search(r))return o.push(this),!0;if(T.fullTextSearch&&z.fuzzySearch(n,i))return o.push(this),!0}})),z.debug("Showing only matched items",n),z.remove.filteredItem(),o&&U.not(o).addClass(x.filtered)}},fuzzySearch:function(e,t){var n=t.length,i=e.length;if(e=e.toLowerCase(),t=t.toLowerCase(),i>n)return!1;if(i===n)return e===t;e:for(var o=0,a=0;o<i;o++){for(var r=e.charCodeAt(o);a<n;)if(t.charCodeAt(a++)===r)continue e;return!1}return!0},exactSearch:function(e,t){return e=e.toLowerCase(),(t=t.toLowerCase()).indexOf(e)>-1},filterActive:function(){T.useLabels&&U.filter("."+x.active).addClass(x.filtered)},focusSearch:function(e){z.has.search()&&!z.is.focusedOnSearch()&&(e?(B.off("focus"+W,N.search),$.focus(),B.on("focus"+W,N.search,z.event.search.focus)):$.focus())},forceSelection:function(){var e=U.not(x.filtered).filter("."+x.selected).eq(0),t=U.not(x.filtered).filter("."+x.active).eq(0),n=e.length>0?e:t;if(n.length>0)return z.debug("Forcing partial selection to selected item",n),void z.event.item.click.call(n,{},!0);T.allowAdditions?(z.set.selected(z.get.query()),z.remove.searchTerm()):z.remove.searchTerm()},event:{change:function(){G||(z.debug("Input changed, updating selection"),z.set.selected())},focus:function(){T.showOnFocus&&!V&&z.is.hidden()&&!b&&z.show()},blur:function(){b=n.activeElement===this,V||b||(z.remove.activeLabel(),z.hide())},mousedown:function(){z.is.searchSelection()?v=!0:V=!0},mouseup:function(){z.is.searchSelection()?v=!1:V=!1},click:function(t){e(t.target).is(B)&&(z.is.focusedOnSearch()?z.show():z.focusSearch())},search:{focus:function(){V=!0,z.is.multiple()&&z.remove.activeLabel(),T.showOnFocus&&z.search()},blur:function(){b=n.activeElement===this,v||Y||b||(T.forceSelection&&z.forceSelection(),z.hide()),v=!1}},icon:{click:function(){z.toggle()}},text:{focus:function(){V=!0,z.focusSearch()}},input:function(){(z.is.multiple()||z.is.searchSelection())&&z.set.filtered(),clearTimeout(z.timer),z.timer=setTimeout(z.search,T.delay.search)},label:{click:function(t){var n=e(this),i=B.find(N.label),o=i.filter("."+x.active),a=n.nextAll("."+x.active),r=n.prevAll("."+x.active),s=a.length>0?n.nextUntil(a).add(o).add(n):n.prevUntil(r).add(o).add(n);t.shiftKey?(o.removeClass(x.active),s.addClass(x.active)):t.ctrlKey?n.toggleClass(x.active):(o.removeClass(x.active),n.addClass(x.active)),T.onLabelSelect.apply(this,i.filter("."+x.active))}},remove:{click:function(){var t=e(this).parent();t.hasClass(x.active)?z.remove.activeLabels():z.remove.activeLabels(t)}},test:{toggle:function(e){var t=z.is.multiple()?z.show:z.toggle;z.is.bubbledLabelClick(e)||z.is.bubbledIconClick(e)||z.determine.eventOnElement(e,t)&&e.preventDefault()},touch:function(e){z.determine.eventOnElement(e,function(){"touchstart"==e.type?z.timer=setTimeout(function(){z.hide()},T.delay.touch):"touchmove"==e.type&&clearTimeout(z.timer)}),e.stopPropagation()},hide:function(e){z.determine.eventInModule(e,z.hide)}},select:{mutation:function(){z.debug("<select> modified, recreating menu"),z.setup.select()}},menu:{mutation:function(t){var n=t[0],i=n.addedNodes?e(n.addedNodes[0]):e(!1),o=n.removedNodes?e(n.removedNodes[0]):e(!1),a=i.add(o),r=a.is(N.addition)||a.closest(N.addition).length>0,s=a.is(N.message)||a.closest(N.message).length>0;r||s?(z.debug("Updating item selector cache"),z.refreshItems()):(z.debug("Menu modified, updating selector cache"),z.refresh())},mousedown:function(){Y=!0},mouseup:function(){Y=!1}},item:{mouseenter:function(t){var n=e(t.target),i=e(this),o=i.children(N.menu),a=i.siblings(N.item).children(N.menu),r=o.length>0;!(o.find(n).length>0)&&r&&(clearTimeout(z.itemTimer),z.itemTimer=setTimeout(function(){z.verbose("Showing sub-menu",o),e.each(a,function(){z.animate.hide(!1,e(this))}),z.animate.show(!1,o)},T.delay.show),t.preventDefault())},mouseleave:function(){var t=e(this).children(N.menu);t.length>0&&(clearTimeout(z.itemTimer),z.itemTimer=setTimeout(function(){z.verbose("Hiding sub-menu",t),z.animate.hide(!1,t)},T.delay.hide))},click:function(t,n){var i=e(this),o=e(t?t.target:""),a=i.find(N.menu),r=z.get.choiceText(i),s=z.get.choiceValue(i,r),c=a.length>0;a.find(o).length>0||c&&!T.allowCategorySelection||(z.is.searchSelection()&&(T.allowAdditions&&z.remove.userAddition(),z.remove.searchTerm(),z.is.focusedOnSearch()||1==n||z.focusSearch(!0)),T.useLabels||(z.remove.filteredItem(),z.set.scrollPosition(i)),z.determine.selectAction.call(this,r,s))}},document:{keydown:function(e){var t=e.which;if(z.is.inObject(t,k)){var n=B.find(N.label),i=n.filter("."+x.active),o=(i.data(_.value),n.index(i)),a=n.length,r=i.length>0,s=i.length>1,c=0===o,l=o+1==a,u=z.is.searchSelection(),d=z.is.focusedOnSearch(),p=z.is.focused(),f=d&&0===z.get.caretPosition();if(u&&!r&&!d)return;t==k.leftArrow?!p&&!f||r?r&&(e.shiftKey?z.verbose("Adding previous label to selection"):(z.verbose("Selecting previous label"),n.removeClass(x.active)),c&&!s?i.addClass(x.active):i.prev(N.siblingLabel).addClass(x.active).end(),e.preventDefault()):(z.verbose("Selecting previous label"),n.last().addClass(x.active)):t==k.rightArrow?(p&&!r&&n.first().addClass(x.active),r&&(e.shiftKey?z.verbose("Adding next label to selection"):(z.verbose("Selecting next label"),n.removeClass(x.active)),l?u?d?n.removeClass(x.active):z.focusSearch():s?i.next(N.siblingLabel).addClass(x.active):i.addClass(x.active):i.next(N.siblingLabel).addClass(x.active),e.preventDefault())):t==k.deleteKey||t==k.backspace?r?(z.verbose("Removing active labels"),l&&u&&!d&&z.focusSearch(),i.last().next(N.siblingLabel).addClass(x.active),z.remove.activeLabels(i),e.preventDefault()):f&&!r&&t==k.backspace&&(z.verbose("Removing last label on input backspace"),i=n.last().addClass(x.active),z.remove.activeLabels(i)):i.removeClass(x.active)}}},keydown:function(e){var t=e.which;if(z.is.inObject(t,k)){var n,i=U.not(N.unselectable).filter("."+x.selected).eq(0),o=H.children("."+x.active).eq(0),a=i.length>0?i:o,r=a.length>0?a.siblings(":not(."+x.filtered+")").addBack():H.children(":not(."+x.filtered+")"),s=a.children(N.menu),c=a.closest(N.menu),l=c.hasClass(x.visible)||c.hasClass(x.animating)||c.parent(N.menu).length>0,u=s.length>0,d=a.length>0,p=a.not(N.unselectable).length>0,f=t==k.delimiter&&T.allowAdditions&&z.is.multiple();if(T.allowAdditions&&T.hideAdditions&&(t==k.enter||f)&&p&&(z.verbose("Selecting item from keyboard shortcut",a),z.event.item.click.call(a,e),z.is.searchSelection()&&z.remove.searchTerm()),z.is.visible()){if((t==k.enter||f)&&(t==k.enter&&d&&u&&!T.allowCategorySelection?(z.verbose("Pressed enter on unselectable category, opening sub menu"),t=k.rightArrow):p&&(z.verbose("Selecting item from keyboard shortcut",a),z.event.item.click.call(a,e),z.is.searchSelection()&&z.remove.searchTerm()),e.preventDefault()),d&&(t==k.leftArrow&&c[0]!==H[0]&&(z.verbose("Left key pressed, closing sub-menu"),z.animate.hide(!1,c),a.removeClass(x.selected),c.closest(N.item).addClass(x.selected),e.preventDefault()),t==k.rightArrow&&u&&(z.verbose("Right key pressed, opening sub-menu"),z.animate.show(!1,s),a.removeClass(x.selected),s.find(N.item).eq(0).addClass(x.selected),e.preventDefault())),t==k.upArrow){if(n=d&&l?a.prevAll(N.item+":not("+N.unselectable+")").eq(0):U.eq(0),r.index(n)<0)return z.verbose("Up key pressed but reached top of current menu"),void e.preventDefault();z.verbose("Up key pressed, changing active item"),a.removeClass(x.selected),n.addClass(x.selected),z.set.scrollPosition(n),T.selectOnKeydown&&z.is.single()&&z.set.selectedItem(n),e.preventDefault()}if(t==k.downArrow){if(0===(n=d&&l?n=a.nextAll(N.item+":not("+N.unselectable+")").eq(0):U.eq(0)).length)return z.verbose("Down key pressed but reached bottom of current menu"),void e.preventDefault();z.verbose("Down key pressed, changing active item"),U.removeClass(x.selected),n.addClass(x.selected),z.set.scrollPosition(n),T.selectOnKeydown&&z.is.single()&&z.set.selectedItem(n),e.preventDefault()}t==k.pageUp&&(z.scrollPage("up"),e.preventDefault()),t==k.pageDown&&(z.scrollPage("down"),e.preventDefault()),t==k.escape&&(z.verbose("Escape key pressed, closing dropdown"),z.hide())}else f&&e.preventDefault(),t!=k.downArrow||z.is.visible()||(z.verbose("Down key pressed, showing dropdown"),z.select.firstUnfiltered(),z.show(),e.preventDefault())}else z.has.search()||z.set.selectedLetter(String.fromCharCode(t))}},trigger:{change:function(){var e=n.createEvent("HTMLEvents"),t=I[0];t&&(z.verbose("Triggering native change event"),e.initEvent("change",!0,!1),t.dispatchEvent(e))}},determine:{selectAction:function(t,n){z.verbose("Determining action",T.action),e.isFunction(z.action[T.action])?(z.verbose("Triggering preset action",T.action,t,n),z.action[T.action].call(K,t,n,this)):e.isFunction(T.action)?(z.verbose("Triggering user action",T.action,t,n),T.action.call(K,t,n,this)):z.error(q.action,T.action)},eventInModule:function(t,i){var o=e(t.target),a=o.closest(n.documentElement).length>0,r=o.closest(B).length>0;return i=e.isFunction(i)?i:function(){},a&&!r?(z.verbose("Triggering event",i),i(),!0):(z.verbose("Event occurred in dropdown, canceling callback"),!1)},eventOnElement:function(t,i){var o=e(t.target),a=o.closest(N.siblingLabel),r=n.body.contains(t.target),s=0===B.find(a).length,c=0===o.closest(H).length;return i=e.isFunction(i)?i:function(){},r&&s&&c?(z.verbose("Triggering event",i),i(),!0):(z.verbose("Event occurred in dropdown menu, canceling callback"),!1)}},action:{nothing:function(){},activate:function(t,n,o){if(n=n!==i?n:t,z.can.activate(e(o))){if(z.set.selected(n,e(o)),z.is.multiple()&&!z.is.allFiltered())return;z.hideAndClear()}},select:function(t,n,o){if(n=n!==i?n:t,z.can.activate(e(o))){if(z.set.value(n,e(o)),z.is.multiple()&&!z.is.allFiltered())return;z.hideAndClear()}},combo:function(t,n,o){n=n!==i?n:t,z.set.selected(n,e(o)),z.hideAndClear()},hide:function(e,t){z.set.value(t,e),z.hideAndClear()}},get:{id:function(){return y},defaultText:function(){return B.data(_.defaultText)},defaultValue:function(){return B.data(_.defaultValue)},placeholderText:function(){return B.data(_.placeholderText)||""},text:function(){return X.text()},query:function(){return e.trim($.val())},searchWidth:function(e){return e=e!==i?e:$.val(),P.text(e),Math.ceil(P.width()+1)},selectionCount:function(){var t=z.get.values();return z.is.multiple()?e.isArray(t)?t.length:0:""!==z.get.value()?1:0},transition:function(e){return"auto"==T.transition?z.is.upward(e)?"slide up":"slide down":T.transition},userValues:function(){var t=z.get.values();return!!t&&(t=e.isArray(t)?t:[t],e.grep(t,function(e){return!1===z.get.item(e)}))},uniqueArray:function(t){return e.grep(t,function(n,i){return e.inArray(n,t)===i})},caretPosition:function(){var e,t,i=$.get(0);return"selectionStart"in i?i.selectionStart:n.selection?(i.focus(),t=(e=n.selection.createRange()).text.length,e.moveStart("character",-i.value.length),e.text.length-t):void 0},value:function(){var t=I.length>0?I.val():B.data(_.value),n=e.isArray(t)&&1===t.length&&""===t[0];return t===i||n?"":t},values:function(){var e=z.get.value();return""===e?"":!z.has.selectInput()&&z.is.multiple()?"string"==typeof e?e.split(T.delimiter):"":e},remoteValues:function(){var t=z.get.values(),n=!1;return t&&("string"==typeof t&&(t=[t]),e.each(t,function(e,t){var i=z.read.remoteData(t);z.verbose("Restoring value from session data",i,t),i&&(n||(n={}),n[t]=i)})),n},choiceText:function(t,n){if(n=n!==i?n:T.preserveHTML,t)return t.find(N.menu).length>0&&(z.verbose("Retrieving text of element with sub-menu"),(t=t.clone()).find(N.menu).remove(),t.find(N.menuIcon).remove()),t.data(_.text)!==i?t.data(_.text):n?e.trim(t.html()):e.trim(t.text())},choiceValue:function(t,n){return n=n||z.get.choiceText(t),!!t&&(t.data(_.value)!==i?String(t.data(_.value)):"string"==typeof n?e.trim(n.toLowerCase()):String(n))},inputEvent:function(){var e=$[0];return!!e&&(e.oninput!==i?"input":e.onpropertychange!==i?"propertychange":"keyup")},selectValues:function(){var t={values:[]};return B.find("option").each(function(){var n=e(this),o=n.html(),a=n.attr("disabled"),r=n.attr("value")!==i?n.attr("value"):o;"auto"===T.placeholder&&""===r?t.placeholder=o:t.values.push({name:o,value:r,disabled:a})}),T.placeholder&&"auto"!==T.placeholder&&(z.debug("Setting placeholder value to",T.placeholder),t.placeholder=T.placeholder),T.sortSelect?(t.values.sort(function(e,t){return e.name>t.name?1:-1}),z.debug("Retrieved and sorted values from select",t)):z.debug("Retrieved values from select",t),t},activeItem:function(){return U.filter("."+x.active)},selectedItem:function(){var e=U.not(N.unselectable).filter("."+x.selected);return e.length>0?e:U.eq(0)},itemWithAdditions:function(e){var t=z.get.item(e),n=z.create.userChoice(e);return n&&n.length>0&&(t=t.length>0?t.add(n):n),t},item:function(t,n){var o,a,r=!1;return t=t!==i?t:z.get.values()!==i?z.get.values():z.get.text(),o=a?t.length>0:t!==i&&null!==t,a=z.is.multiple()&&e.isArray(t),n=""===t||0===t||(n||!1),o&&U.each(function(){var o=e(this),s=z.get.choiceText(o),c=z.get.choiceValue(o,s);if(null!==c&&c!==i)if(a)-1===e.inArray(String(c),t)&&-1===e.inArray(s,t)||(r=r?r.add(o):o);else if(n){if(z.verbose("Ambiguous dropdown value using strict type check",o,t),c===t||s===t)return r=o,!0}else if(String(c)==String(t)||s==t)return z.verbose("Found select item by value",c,t),r=o,!0}),r}},check:{maxSelections:function(e){return!T.maxSelections||((e=e!==i?e:z.get.selectionCount())>=T.maxSelections?(z.debug("Maximum selection count reached"),T.useLabels&&(U.addClass(x.filtered),z.add.message(O.maxSelections)),!0):(z.verbose("No longer at maximum selection count"),z.remove.message(),z.remove.filteredItem(),z.is.searchSelection()&&z.filterItems(),!1))}},restore:{defaults:function(){z.clear(),z.restore.defaultText(),z.restore.defaultValue()},defaultText:function(){var e=z.get.defaultText();e===z.get.placeholderText?(z.debug("Restoring default placeholder text",e),z.set.placeholderText(e)):(z.debug("Restoring default text",e),z.set.text(e))},placeholderText:function(){z.set.placeholderText()},defaultValue:function(){var e=z.get.defaultValue();e!==i&&(z.debug("Restoring default value",e),""!==e?(z.set.value(e),z.set.selected()):(z.remove.activeItem(),z.remove.selectedItem()))},labels:function(){T.allowAdditions&&(T.useLabels||(z.error(q.labels),T.useLabels=!0),z.debug("Restoring selected values"),z.create.userLabels()),z.check.maxSelections()},selected:function(){z.restore.values(),z.is.multiple()?(z.debug("Restoring previously selected values and labels"),z.restore.labels()):z.debug("Restoring previously selected values")},values:function(){z.set.initialLoad(),T.apiSettings&&T.saveRemoteData&&z.get.remoteValues()?z.restore.remoteValues():z.set.selected(),z.remove.initialLoad()},remoteValues:function(){var t=z.get.remoteValues();z.debug("Recreating selected from session data",t),t&&(z.is.single()?e.each(t,function(e,t){z.set.text(t)}):e.each(t,function(e,t){z.add.label(e,t)}))}},read:{remoteData:function(e){var n;if(t.Storage!==i)return(n=sessionStorage.getItem(e))!==i&&n;z.error(q.noStorage)}},save:{defaults:function(){z.save.defaultText(),z.save.placeholderText(),z.save.defaultValue()},defaultValue:function(){var e=z.get.value();z.verbose("Saving default value as",e),B.data(_.defaultValue,e)},defaultText:function(){var e=z.get.text();z.verbose("Saving default text as",e),B.data(_.defaultText,e)},placeholderText:function(){var e;!1!==T.placeholder&&X.hasClass(x.placeholder)&&(e=z.get.text(),z.verbose("Saving placeholder text as",e),B.data(_.placeholderText,e))},remoteData:function(e,n){t.Storage!==i?(z.verbose("Saving remote data to session storage",n,e),sessionStorage.setItem(n,e)):z.error(q.noStorage)}},clear:function(){z.is.multiple()&&T.useLabels?z.remove.labels():(z.remove.activeItem(),z.remove.selectedItem()),z.set.placeholderText(),z.clearValue()},clearValue:function(){z.set.value("")},scrollPage:function(e,t){var n,i,o=t||z.get.selectedItem(),a=o.closest(N.menu),r=a.outerHeight(),s=a.scrollTop(),c=U.eq(0).outerHeight(),l=Math.floor(r/c),u=(a.prop("scrollHeight"),"up"==e?s-c*l:s+c*l),d=U.not(N.unselectable);i="up"==e?d.index(o)-l:d.index(o)+l,(n=("up"==e?i>=0:i<d.length)?d.eq(i):"up"==e?d.first():d.last()).length>0&&(z.debug("Scrolling page",e,n),o.removeClass(x.selected),n.addClass(x.selected),T.selectOnKeydown&&z.is.single()&&z.set.selectedItem(n),a.scrollTop(u))},set:{filtered:function(){var e=z.is.multiple(),t=z.is.searchSelection(),n=e&&t,i=t?z.get.query():"",o="string"==typeof i&&i.length>0,a=z.get.searchWidth(),r=""!==i;e&&o&&(z.verbose("Adjusting input width",a,T.glyphWidth),$.css("width",a)),o||n&&r?(z.verbose("Hiding placeholder text"),X.addClass(x.filtered)):(!e||n&&!r)&&(z.verbose("Showing placeholder text"),X.removeClass(x.filtered))},empty:function(){B.addClass(x.empty)},loading:function(){B.addClass(x.loading)},placeholderText:function(e){e=e||z.get.placeholderText(),z.debug("Setting placeholder text",e),z.set.text(e),X.addClass(x.placeholder)},tabbable:function(){z.has.search()?(z.debug("Added tabindex to searchable dropdown"),$.val("").attr("tabindex",0),H.attr("tabindex",-1)):(z.debug("Added tabindex to dropdown"),B.attr("tabindex")===i&&(B.attr("tabindex",0),H.attr("tabindex",-1)))},initialLoad:function(){z.verbose("Setting initial load"),g=!0},activeItem:function(e){T.allowAdditions&&e.filter(N.addition).length>0?e.addClass(x.filtered):e.addClass(x.active)},partialSearch:function(e){var t=z.get.query().length;$.val(e.substr(0,t))},scrollPosition:function(e,t){var n,o,a,r,s,c,l=5;n=(e=e||z.get.selectedItem()).closest(N.menu),o=e&&e.length>0,t=t!==i&&t,e&&n.length>0&&o&&(e.position().top,n.addClass(x.loading),a=(r=n.scrollTop())-n.offset().top+e.offset().top,t||(c=r+n.height()<a+l,s=a-l<r),z.debug("Scrolling to active item",a),(t||s||c)&&n.scrollTop(a),n.removeClass(x.loading))},text:function(e){"select"!==T.action&&("combo"==T.action?(z.debug("Changing combo button text",e,F),T.preserveHTML?F.html(e):F.text(e)):(e!==z.get.placeholderText()&&X.removeClass(x.placeholder),z.debug("Changing text",e,X),X.removeClass(x.filtered),T.preserveHTML?X.html(e):X.text(e)))},selectedItem:function(e){var t=z.get.choiceValue(e),n=z.get.choiceText(e,!1);z.debug("Setting user selection to item",e),z.remove.activeItem(),z.set.partialSearch(n),z.set.activeItem(e),z.set.selected(t,e),z.set.text(n)},selectedLetter:function(t){var n,i=U.filter("."+x.selected),o=i.length>0&&z.has.firstLetter(i,t),a=!1;o&&(n=i.nextAll(U).eq(0),z.has.firstLetter(n,t)&&(a=n)),a||U.each(function(){if(z.has.firstLetter(e(this),t))return a=e(this),!1}),a&&(z.verbose("Scrolling to next value with letter",t),z.set.scrollPosition(a),i.removeClass(x.selected),a.addClass(x.selected),T.selectOnKeydown&&z.is.single()&&z.set.selectedItem(a))},direction:function(e){"auto"==T.direction?z.is.onScreen(e)?z.remove.upward(e):z.set.upward(e):"upward"==T.direction&&z.set.upward(e)},upward:function(e){(e||B).addClass(x.upward)},value:function(e,t,n){var o=z.escape.value(e),a=I.length>0,r=(z.has.value(e),z.get.values()),s=e!==i?String(e):e;if(a){if(!T.allowReselection&&s==r&&(z.verbose("Skipping value update already same value",e,r),!z.is.initialLoad()))return;z.is.single()&&z.has.selectInput()&&z.can.extendSelect()&&(z.debug("Adding user option",e),z.add.optionValue(e)),z.debug("Updating input value",o,r),G=!0,I.val(o),!1===T.fireOnInit&&z.is.initialLoad()?z.debug("Input native change event ignored on initial load"):z.trigger.change(),G=!1}else z.verbose("Storing value in metadata",o,I),o!==r&&B.data(_.value,s);!1===T.fireOnInit&&z.is.initialLoad()?z.verbose("No callback on initial load",T.onChange):T.onChange.call(K,e,t,n)},active:function(){B.addClass(x.active)},multiple:function(){B.addClass(x.multiple)},visible:function(){B.addClass(x.visible)},exactly:function(e,t){z.debug("Setting selected to exact values"),z.clear(),z.set.selected(e,t)},selected:function(t,n){var i=z.is.multiple();(n=T.allowAdditions?n||z.get.itemWithAdditions(t):n||z.get.item(t))&&(z.debug("Setting selected menu item to",n),z.is.multiple()&&z.remove.searchWidth(),z.is.single()?(z.remove.activeItem(),
DesignScreenshot/output/gitee_run/gitee.com_4_after_login.html:370:regExp:{escape:/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,beginsWith:"(?:s|^)"},fields:{categories:"results",categoryName:"name",categoryResults:"results",description:"description",image:"image",price:"price",results:"results",title:"title",url:"url",action:"action",actionText:"text",actionURL:"url"},selector:{prompt:".prompt",searchButton:".search.button",results:".results",message:".results > .message",category:".category",result:".result",title:".title, .name"},templates:{escape:function(e){var t=/[&<>"'`]/g,n={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},i=function(e){return n[e]};return/[&<>"'`]/.test(e)?e.replace(t,i):e},message:function(e,t){var n="";return e!==i&&t!==i&&(n+='<div class="message '+t+'">',n+="empty"==t?'<div class="header">No Results</div class="header"><div class="description">'+e+'</div class="description">':' <div class="description">'+e+"</div>",n+="</div>"),n},category:function(t,n){var o="";e.fn.search.settings.templates.escape;return t[n.categoryResults]!==i&&(e.each(t[n.categoryResults],function(t,a){a[n.results]!==i&&a.results.length>0&&(o+='<div class="category">',a[n.categoryName]!==i&&(o+='<div class="name">'+a[n.categoryName]+"</div>"),o+='<div class="results">',e.each(a.results,function(e,t){t[n.url]?o+='<a class="result" href="'+t[n.url]+'">':o+='<a class="result">',t[n.image]!==i&&(o+='<div class="image"> <img src="'+t[n.image]+'"></div>'),o+='<div class="content">',t[n.price]!==i&&(o+='<div class="price">'+t[n.price]+"</div>"),t[n.title]!==i&&(o+='<div class="title">'+t[n.title]+"</div>"),t[n.description]!==i&&(o+='<div class="description">'+t[n.description]+"</div>"),o+="</div>",o+="</a>"}),o+="</div>",o+="</div>")}),t[n.action]&&(o+='<a href="'+t[n.action][n.actionURL]+'" class="action">'+t[n.action][n.actionText]+"</a>"),o)},standard:function(t,n){var o="";return t[n.results]!==i&&(e.each(t[n.results],function(e,t){t[n.url]?o+='<a class="result" href="'+t[n.url]+'">':o+='<a class="result">',t[n.image]!==i?o+='<div class="image"> <img src="'+t[n.image]+'"></div>':t[n.icon]!==i&&(o+='<div class="icon"> <i class="'+t[n.icon]+'"></i></div>'),o+='<div class="content">',t[n.price]!==i&&(o+='<div class="price">'+t[n.price]+"</div>"),t[n.title]!==i&&(o+='<div class="title">'+t[n.title]+"</div>"),t[n.description]!==i&&(o+='<div class="description">'+t[n.description]+"</div>"),o+="</div>",o+="</a>"}),t[n.action]&&(o+='<a href="'+t[n.action][n.actionURL]+'" class="action">'+t[n.action][n.actionText]+"</a>"),o)}}}}(jQuery,window,document),function(e,t,n,i){"use strict";t=void 0!==t&&t.Math==Math?t:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();e.api=e.fn.api=function(n){var o,a=e.isFunction(this)?e(t):e(this),r=a.selector||"",s=(new Date).getTime(),c=[],l=arguments[0],u="string"==typeof l,d=[].slice.call(arguments,1);return a.each(function(){var a,p,f,h,m,g,b=e.isPlainObject(n)?e.extend(!0,{},e.fn.api.settings,n):e.extend({},e.fn.api.settings),v=b.namespace,M=b.metadata,y=b.selector,A=b.error,w=b.className,z="."+v,T="module-"+v,x=e(this),O=x.closest(y.form),C=b.stateContext?e(b.stateContext):x,k=this,_=C[0],L=x.data(T);g={initialize:function(){u||g.bind.events(),g.instantiate()},instantiate:function(){g.verbose("Storing instance of module",g),L=g,x.data(T,L)},destroy:function(){g.verbose("Destroying previous module for",k),x.removeData(T).off(z)},bind:{events:function(){var e=g.get.event();e?(g.verbose("Attaching API events to element",e),x.on(e+z,g.event.trigger)):"now"==b.on&&(g.debug("Querying API endpoint immediately"),g.query())}},decode:{json:function(e){if(e!==i&&"string"==typeof e)try{e=JSON.parse(e)}catch(t){}return e}},read:{cachedResponse:function(e){var n;if(t.Storage!==i)return n=sessionStorage.getItem(e),g.debug("Using cached response",e,n),n=g.decode.json(n);g.error(A.noStorage)}},write:{cachedResponse:function(n,o){o&&""===o?g.debug("Response empty, not caching",o):t.Storage!==i?(e.isPlainObject(o)&&(o=JSON.stringify(o)),sessionStorage.setItem(n,o),g.verbose("Storing cached response for url",n,o)):g.error(A.noStorage)}},query:function(){if(g.is.disabled())g.debug("Element is disabled API request aborted");else{if(g.is.loading()){if(!b.interruptRequests)return void g.debug("Cancelling request, previous request is still pending");g.debug("Interrupting previous request"),g.abort()}if(b.defaultData&&e.extend(!0,b.urlData,g.get.defaultData()),b.serializeForm&&(b.data=g.add.formData(b.data)),!1===(p=g.get.settings()))return g.cancelled=!0,void g.error(A.beforeSend);if(g.cancelled=!1,(f=g.get.templatedURL())||g.is.mocked()){if((f=g.add.urlData(f))||g.is.mocked()){if(p.url=b.base+f,a=e.extend(!0,{},b,{type:b.method||b.type,data:h,url:b.base+f,beforeSend:b.beforeXHR,success:function(){},failure:function(){},complete:function(){}}),g.debug("Querying URL",a.url),g.verbose("Using AJAX settings",a),"local"===b.cache&&g.read.cachedResponse(f))return g.debug("Response returned from local cache"),g.request=g.create.request(),void g.request.resolveWith(_,[g.read.cachedResponse(f)]);b.throttle?b.throttleFirstRequest||g.timer?(g.debug("Throttling request",b.throttle),clearTimeout(g.timer),g.timer=setTimeout(function(){g.timer&&delete g.timer,g.debug("Sending throttled request",h,a.method),g.send.request()},b.throttle)):(g.debug("Sending request",h,a.method),g.send.request(),g.timer=setTimeout(function(){},b.throttle)):(g.debug("Sending request",h,a.method),g.send.request())}}else g.error(A.missingURL)}},should:{removeError:function(){return!0===b.hideError||"auto"===b.hideError&&!g.is.form()}},is:{disabled:function(){return x.filter(y.disabled).length>0},expectingJSON:function(){return"json"===b.dataType||"jsonp"===b.dataType},form:function(){return x.is("form")||C.is("form")},mocked:function(){return b.mockResponse||b.mockResponseAsync||b.response||b.responseAsync},input:function(){return x.is("input")},loading:function(){return!!g.request&&"pending"==g.request.state()},abortedRequest:function(e){return e&&e.readyState!==i&&0===e.readyState?(g.verbose("XHR request determined to be aborted"),!0):(g.verbose("XHR request was not aborted"),!1)},validResponse:function(t){return g.is.expectingJSON()&&e.isFunction(b.successTest)?(g.debug("Checking JSON returned success",b.successTest,t),b.successTest(t)?(g.debug("Response passed success test",t),!0):(g.debug("Response failed success test",t),!1)):(g.verbose("Response is not JSON, skipping validation",b.successTest,t),!0)}},was:{cancelled:function(){return g.cancelled||!1},succesful:function(){return g.request&&"resolved"==g.request.state()},failure:function(){return g.request&&"rejected"==g.request.state()},complete:function(){return g.request&&("resolved"==g.request.state()||"rejected"==g.request.state())}},add:{urlData:function(t,n){var o,a;return t&&(o=t.match(b.regExp.required),a=t.match(b.regExp.optional),n=n||b.urlData,o&&(g.debug("Looking for required URL variables",o),e.each(o,function(o,a){var r=-1!==a.indexOf("$")?a.substr(2,a.length-3):a.substr(1,a.length-2),s=e.isPlainObject(n)&&n[r]!==i?n[r]:x.data(r)!==i?x.data(r):C.data(r)!==i?C.data(r):n[r];if(s===i)return g.error(A.requiredParameter,r,t),t=!1,!1;g.verbose("Found required variable",r,s),s=b.encodeParameters?g.get.urlEncodedValue(s):s,t=t.replace(a,s)})),a&&(g.debug("Looking for optional URL variables",o),e.each(a,function(o,a){var r=-1!==a.indexOf("$")?a.substr(3,a.length-4):a.substr(2,a.length-3),s=e.isPlainObject(n)&&n[r]!==i?n[r]:x.data(r)!==i?x.data(r):C.data(r)!==i?C.data(r):n[r];s!==i?(g.verbose("Optional variable Found",r,s),t=t.replace(a,s)):(g.verbose("Optional variable not found",r),t=-1!==t.indexOf("/"+a)?t.replace("/"+a,""):t.replace(a,""))}))),t},formData:function(t){var n=e.fn.serializeObject!==i,o=n?O.serializeObject():O.serialize();return t=t||b.data,e.isPlainObject(t)?n?(g.debug("Extending existing data with form data",t,o),t=e.extend(!0,{},t,o)):(g.error(A.missingSerialize),g.debug("Cant extend data. Replacing data with form data",t,o),t=o):(g.debug("Adding form data",o),t=o),t}},send:{request:function(){g.set.loading(),g.request=g.create.request(),g.is.mocked()?g.mockedXHR=g.create.mockedXHR():g.xhr=g.create.xhr(),b.onRequest.call(_,g.request,g.xhr)}},event:{trigger:function(e){g.query(),"submit"!=e.type&&"click"!=e.type||e.preventDefault()},xhr:{always:function(){},done:function(t,n,i){var o=this,a=(new Date).getTime()-m,r=b.loadingDuration-a,s=!!e.isFunction(b.onResponse)&&(g.is.expectingJSON()?b.onResponse.call(o,e.extend(!0,{},t)):b.onResponse.call(o,t));r=r>0?r:0,s&&(g.debug("Modified API response in onResponse callback",b.onResponse,s,t),t=s),r>0&&g.debug("Response completed early delaying state change by",r),setTimeout(function(){g.is.validResponse(t)?g.request.resolveWith(o,[t,i]):g.request.rejectWith(o,[i,"invalid"])},r)},fail:function(e,t,n){var i=this,o=(new Date).getTime()-m,a=b.loadingDuration-o;(a=a>0?a:0)>0&&g.debug("Response completed early delaying state change by",a),setTimeout(function(){g.is.abortedRequest(e)?g.request.rejectWith(i,[e,"aborted",n]):g.request.rejectWith(i,[e,"error",t,n])},a)}},request:{done:function(e,t){g.debug("Successful API Response",e),"local"===b.cache&&f&&(g.write.cachedResponse(f,e),g.debug("Saving server response locally",g.cache)),b.onSuccess.call(_,e,x,t)},complete:function(e,t){var n,i;g.was.succesful()?(i=e,n=t):(n=e,i=g.get.responseFromXHR(n)),g.remove.loading(),b.onComplete.call(_,i,x,n)},fail:function(e,t,n){var o=g.get.responseFromXHR(e),r=g.get.errorFromRequest(o,t,n);if("aborted"==t)return g.debug("XHR Aborted (Most likely caused by page navigation or CORS Policy)",t,n),b.onAbort.call(_,t,x,e),!0;"invalid"==t?g.debug("JSON did not pass success test. A server-side error has most likely occurred",o):"error"==t&&e!==i&&(g.debug("XHR produced a server error",t,n),200!=e.status&&n!==i&&""!==n&&g.error(A.statusMessage+n,a.url),b.onError.call(_,r,x,e)),b.errorDuration&&"aborted"!==t&&(g.debug("Adding error state"),g.set.error(),g.should.removeError()&&setTimeout(g.remove.error,b.errorDuration)),g.debug("API Request failed",r,e),b.onFailure.call(_,o,x,e)}}},create:{request:function(){return e.Deferred().always(g.event.request.complete).done(g.event.request.done).fail(g.event.request.fail)},mockedXHR:function(){var t,n,i,o=!1,a=!1,r=!1,s=b.mockResponse||b.response,c=b.mockResponseAsync||b.responseAsync;return i=e.Deferred().always(g.event.xhr.complete).done(g.event.xhr.done).fail(g.event.xhr.fail),s?(e.isFunction(s)?(g.debug("Using specified synchronous callback",s),n=s.call(_,p)):(g.debug("Using settings specified response",s),n=s),i.resolveWith(_,[n,o,{responseText:n}])):e.isFunction(c)&&(t=function(e){g.debug("Async callback returned response",e),e?i.resolveWith(_,[e,o,{responseText:e}]):i.rejectWith(_,[{responseText:e},a,r])},g.debug("Using specified async response callback",c),c.call(_,p,t)),i},xhr:function(){var t;return t=e.ajax(a).always(g.event.xhr.always).done(g.event.xhr.done).fail(g.event.xhr.fail),g.verbose("Created server request",t,a),t}},set:{error:function(){g.verbose("Adding error state to element",C),C.addClass(w.error)},loading:function(){g.verbose("Adding loading state to element",C),C.addClass(w.loading),m=(new Date).getTime()}},remove:{error:function(){g.verbose("Removing error state from element",C),C.removeClass(w.error)},loading:function(){g.verbose("Removing loading state from element",C),C.removeClass(w.loading)}},get:{responseFromXHR:function(t){return!!e.isPlainObject(t)&&(g.is.expectingJSON()?g.decode.json(t.responseText):t.responseText)},errorFromRequest:function(t,n,o){return e.isPlainObject(t)&&t.error!==i?t.error:b.error[n]!==i?b.error[n]:o},request:function(){return g.request||!1},xhr:function(){return g.xhr||!1},settings:function(){var t;return(t=b.beforeSend.call(_,b))&&(t.success!==i&&(g.debug("Legacy success callback detected",t),g.error(A.legacyParameters,t.success),t.onSuccess=t.success),t.failure!==i&&(g.debug("Legacy failure callback detected",t),g.error(A.legacyParameters,t.failure),t.onFailure=t.failure),t.complete!==i&&(g.debug("Legacy complete callback detected",t),g.error(A.legacyParameters,t.complete),t.onComplete=t.complete)),t===i&&g.error(A.noReturnedValue),!1===t?t:t!==i?e.extend(!0,{},t):e.extend(!0,{},b)},urlEncodedValue:function(e){var n=t.decodeURIComponent(e),i=t.encodeURIComponent(e);return n!==e?(g.debug("URL value is already encoded, avoiding double encoding",e),e):(g.verbose("Encoding value using encodeURIComponent",e,i),i)},defaultData:function(){var t={};return e.isWindow(k)||(g.is.input()?t.value=x.val():g.is.form()||(t.text=x.text())),t},event:function(){return e.isWindow(k)||"now"==b.on?(g.debug("API called without element, no events attached"),!1):"auto"==b.on?x.is("input")?k.oninput!==i?"input":k.onpropertychange!==i?"propertychange":"keyup":x.is("form")?"submit":"click":b.on},templatedURL:function(e){if(e=e||x.data(M.action)||b.action||!1,f=x.data(M.url)||b.url||!1)return g.debug("Using specified url",f),f;if(e){if(g.debug("Looking up url for action",e,b.api),b.api[e]===i&&!g.is.mocked())return void g.error(A.missingAction,b.action,b.api);f=b.api[e]}else g.is.form()&&(f=x.attr("action")||C.attr("action")||!1,g.debug("No url or action specified, defaulting to form action",f));return f}},abort:function(){var e=g.get.xhr();e&&"resolved"!==e.state()&&(g.debug("Cancelling API request"),e.abort())},reset:function(){g.remove.error(),g.remove.loading()},setting:function(t,n){if(g.debug("Changing setting",t,n),e.isPlainObject(t))e.extend(!0,b,t);else{if(n===i)return b[t];e.isPlainObject(b[t])?e.extend(!0,b[t],n):b[t]=n}},internal:function(t,n){if(e.isPlainObject(t))e.extend(!0,g,t);else{if(n===i)return g[t];g[t]=n}},debug:function(){!b.silent&&b.debug&&(b.performance?g.performance.log(arguments):(g.debug=Function.prototype.bind.call(console.info,console,b.name+":"),g.debug.apply(console,arguments)))},verbose:function(){!b.silent&&b.verbose&&b.debug&&(b.performance?g.performance.log(arguments):(g.verbose=Function.prototype.bind.call(console.info,console,b.name+":"),g.verbose.apply(console,arguments)))},error:function(){b.silent||(g.error=Function.prototype.bind.call(console.error,console,b.name+":"),g.error.apply(console,arguments))},performance:{log:function(e){var t,n;b.performance&&(n=(t=(new Date).getTime())-(s||t),s=t,c.push({Name:e[0],Arguments:[].slice.call(e,1)||"","Execution Time":n})),clearTimeout(g.performance.timer),g.performance.timer=setTimeout(g.performance.display,500)},display:function(){var t=b.name+":",n=0;s=!1,clearTimeout(g.performance.timer),e.each(c,function(e,t){n+=t["Execution Time"]}),t+=" "+n+"ms",r&&(t+=" '"+r+"'"),(console.group!==i||console.table!==i)&&c.length>0&&(console.groupCollapsed(t),console.table?console.table(c):e.each(c,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),c=[]}},invoke:function(t,n,a){var r,s,c,l=L;return n=n||d,a=k||a,"string"==typeof t&&l!==i&&(t=t.split(/[\. ]/),r=t.length-1,e.each(t,function(n,o){var a=n!=r?o+t[n+1].charAt(0).toUpperCase()+t[n+1].slice(1):t;if(e.isPlainObject(l[a])&&n!=r)l=l[a];else{if(l[a]!==i)return s=l[a],!1;if(!e.isPlainObject(l[o])||n==r)return l[o]!==i?(s=l[o],!1):(g.error(A.method,t),!1);l=l[o]}})),e.isFunction(s)?c=s.apply(a,n):s!==i&&(c=s),e.isArray(o)?o.push(c):o!==i?o=[o,c]:c!==i&&(o=c),s}},u?(L===i&&g.initialize(),g.invoke(l)):(L!==i&&L.invoke("destroy"),g.initialize())}),o!==i?o:this},e.api.settings={name:"API",namespace:"api",debug:!1,verbose:!1,performance:!0,api:{},cache:!0,interruptRequests:!0,on:"auto",stateContext:!1,loadingDuration:0,hideError:"auto",errorDuration:2e3,encodeParameters:!0,action:!1,url:!1,base:"",urlData:{},defaultData:!0,serializeForm:!1,throttle:0,throttleFirstRequest:!0,method:"get",data:{},dataType:"json",mockResponse:!1,mockResponseAsync:!1,response:!1,responseAsync:!1,beforeSend:function(e){return e},beforeXHR:function(){},onRequest:function(){},onResponse:!1,onSuccess:function(){},onComplete:function(){},onFailure:function(){},onError:function(){},onAbort:function(){},successTest:!1,error:{beforeSend:"The before send function has aborted the request",error:"There was an error with your request",exitConditions:"API Request Aborted. Exit conditions met",JSONParse:"JSON could not be parsed during error handling",legacyParameters:"You are using legacy API success callback names",method:"The method you called is not defined",missingAction:"API action used but no url was defined",missingSerialize:"jquery-serialize-object is required to add form data to an existing data object",missingURL:"No URL specified for api event",noReturnedValue:"The beforeSend callback must return a settings object, beforeSend ignored.",noStorage:"Caching responses locally requires session storage",parseError:"There was an error parsing your request",requiredParameter:"Missing a required URL parameter: ",statusMessage:"Server gave an error: ",timeout:"Your request timed out"},regExp:{required:/\{\$*[A-z0-9]+\}/g,optional:/\{\/\$*[A-z0-9]+\}/g},className:{loading:"loading",error:"error"},selector:{disabled:".disabled",form:"form"},metadata:{action:"action",url:"url"}}}(jQuery,window,document),function(e,t,n,i){"use strict";e.tab=e.fn.tab=function(n){var o,a,r=e.isFunction(this)?e(t):e(this),s=e.isPlainObject(n)?e.extend(!0,{},e.fn.tab.settings,n):e.extend({},e.fn.tab.settings),c=r.selector||"",l=(new Date).getTime(),u=[],d=arguments[0],p="string"==typeof d,f=[].slice.call(arguments,1);return r.each(function(){var n,h,m,g,b,v=s.className,M=s.metadata,y=s.selector,A=s.error,w="."+s.namespace,z="module-"+s.namespace,T=e(this),x={},O=!0,C=0,k=this,_=T.data(z);o={initialize:function(){o.debug("Initializing tab menu item",T),o.determineTabs(),o.debug("Determining tabs",s.context,h),s.auto&&(o.verbose("Setting up automatic tab retrieval from server"),s.apiSettings={url:s.path+"/{$tab}"}),e.isWindow(k)||(o.debug("Attaching tab activation events to element",T),T.on("click"+w,o.event.click)),o.instantiate()},determineTabs:function(){var t;"parent"===s.context?(T.closest(y.ui).size()>0?(t=T.closest(y.ui),o.verbose("Using closest UI element for determining parent",t)):t=T,n=t.parent(),o.verbose("Determined parent element for creating context",n)):s.context?(n=e(s.context),o.verbose("Using selector for tab context",s.context,n)):n=e("body"),s.childrenOnly?(h=n.children(y.tabs),o.debug("Searching tab context children for tabs",n,h)):(h=n.find(y.tabs),o.debug("Searching tab context for tabs",n,h))},initializeHistory:function(){if(s.history){if(o.debug("Initializing page state"),e.address===i)return o.error(A.state),!1;if("state"==s.historyType){if(o.debug("Using HTML5 to manage state"),!1===s.path)return o.error(A.path),!1;e.address.history(!0).state(s.path)}e.address.bind("change",o.event.history.change)}},instantiate:function(){o.verbose("Storing instance of module",o),T.data(z,o)},destroy:function(){o.debug("Destroying tabs",T),T.removeData(z).off(w)},event:{click:function(t){var n=e(this).data(M.tab);n!==i?(s.history?(o.verbose("Updating page state",t),e.address.value(n)):(o.verbose("Changing tab",t),o.changeTab(n)),t.preventDefault()):o.debug("No tab specified")},history:{change:function(t){var n=t.pathNames.join("/")||o.get.initialPath(),a=s.templates.determineTitle(n)||!1;o.performance.display(),o.debug("History change event",n,t),b=t,n!==i&&o.changeTab(n),a&&e.address.title(a)}}},refresh:function(){m&&(o.debug("Refreshing tab",m),o.changeTab(m))},cache:{read:function(e){return e!==i&&x[e]},add:function(e,t){e=e||m,o.debug("Adding cached content for",e),x[e]=t},remove:function(e){e=e||m,o.debug("Removing cached content for",e),delete x[e]}},set:{state:function(t){e.address.value(t)}},changeTab:function(i){var a=t.history&&t.history.pushState&&s.ignoreFirstLoad&&O,r=s.auto||e.isPlainObject(s.apiSettings),c=r&&!a?o.utilities.pathToArray(i):o.get.defaultPathArray(i);i=o.utilities.arrayToPath(c),e.each(c,function(t,l){var u,d,p,f,h=c.slice(0,t+1),v=o.utilities.arrayToPath(h),M=o.is.tab(v),y=t+1==c.length,w=o.get.tabElement(v);if(o.verbose("Looking for tab",l),M){if(o.verbose("Tab was found",l),m=v,g=o.utilities.filterArray(c,h),y?f=!0:(d=c.slice(0,t+2),p=o.utilities.arrayToPath(d),(f=!o.is.tab(p))&&o.verbose("Tab parameters found",d)),f&&r)return a?(o.debug("Ignoring remote content on first tab load",v),O=!1,o.cache.add(i,w.html()),o.activate.all(v),e.proxy(s.onTabInit,w)(v,g,b),e.proxy(s.onTabLoad,w)(v,g,b)):(o.activate.navigation(v),o.content.fetch(v,i)),!1;o.debug("Opened local tab",v),o.activate.all(v),o.cache.read(v)||(o.cache.add(v,!0),o.debug("First time tab loaded calling tab init"),e.proxy(s.onTabInit,w)(v,g,b)),e.proxy(s.onTabLoad,w)(v,g,b)}else{if(-1!=i.search("/"))return o.error(A.missingTab,T,n,v),!1;if(v=(u=e("#"+i+', a[name="'+i+'"]')).closest("[data-tab]").data("tab"),w=o.get.tabElement(v),u&&u.size()>0&&v)return o.debug("No tab found, but deep anchor link present, opening parent tab"),o.activate.all(v),o.cache.read(v)||(o.cache.add(v,!0),o.debug("First time tab loaded calling tab init"),e.proxy(s.onTabInit,w)(v,g,b)),!1}})},content:{fetch:function(t,n){var a,r,c=o.get.tabElement(t),l={dataType:"html",stateContext:c,onSuccess:function(i){o.cache.add(n,i),o.content.update(t,i),t==m?(o.debug("Content loaded",t),o.activate.tab(t)):o.debug("Content loaded in background",t),e.proxy(s.onTabInit,c)(t,g,b),e.proxy(s.onTabLoad,c)(t,g,b)},urlData:{tab:n}},u=c.data(M.promise)||!1,d=u&&"pending"===u.state();n=n||t,r=o.cache.read(n),s.cache&&r?(o.debug("Showing existing content",n),o.content.update(t,r),o.activate.tab(t),e.proxy(s.onTabLoad,c)(t,g,b)):d?(o.debug("Content is already loading",n),c.addClass(v.loading)):e.api!==i?(a=e.extend(!0,{headers:{"X-Remote":!0}},s.apiSettings,l),o.debug("Retrieving remote content",n,a),e.api(a)):o.error(A.api)},update:function(e,t){o.debug("Updating html for",e),o.get.tabElement(e).html(t)}},activate:{all:function(e){o.activate.tab(e),o.activate.navigation(e)},tab:function(e){var t=o.get.tabElement(e);o.verbose("Showing tab content for",t),t.addClass(v.active).siblings(h).removeClass(v.active+" "+v.loading)},navigation:function(e){var t=o.get.navElement(e);o.verbose("Activating tab navigation for",t,e),t.addClass(v.active).siblings(r).removeClass(v.active+" "+v.loading)}},deactivate:{all:function(){o.deactivate.navigation(),o.deactivate.tabs()},navigation:function(){r.removeClass(v.active)},tabs:function(){h.removeClass(v.active+" "+v.loading)}},is:{tab:function(e){return e!==i&&o.get.tabElement(e).size()>0}},get:{initialPath:function(){return r.eq(0).data(M.tab)||h.eq(0).data(M.tab)},path:function(){return e.address.value()},defaultPathArray:function(e){return o.utilities.pathToArray(o.get.defaultPath(e))},defaultPath:function(e){var t=r.filter("[data-"+M.tab+'^="'+e+'/"]').eq(0).data(M.tab)||!1;if(t){if(o.debug("Found default tab",t),C<s.maxDepth)return C++,o.get.defaultPath(t);o.error(A.recursion)}else o.debug("No default tabs found for",e,h);return C=0,e},navElement:function(e){return e=e||m,r.filter("[data-"+M.tab+'="'+e+'"]')},tabElement:function(e){var t,n,i,a;return e=e||m,i=o.utilities.pathToArray(e),a=o.utilities.last(i),t=h.filter("[data-"+M.tab+'="'+a+'"]'),n=h.filter("[data-"+M.tab+'="'+e+'"]'),t.size()>0?t:n},tab:function(){return m}},utilities:{filterArray:function(t,n){return e.grep(t,function(t){return-1==e.inArray(t,n)})},last:function(t){return!!e.isArray(t)&&t[t.length-1]},pathToArray:function(e){return e===i&&(e=m),"string"==typeof e?e.split("/"):[e]},arrayToPath:function(t){return!!e.isArray(t)&&t.join("/")}},setting:function(t,n){if(o.debug("Changing setting",t,n),e.isPlainObject(t))e.extend(!0,s,t);else{if(n===i)return s[t];s[t]=n}},internal:function(t,n){if(e.isPlainObject(t))e.extend(!0,o,t);else{if(n===i)return o[t];o[t]=n}},debug:function(){s.debug&&(s.performance?o.performance.log(arguments):(o.debug=Function.prototype.bind.call(console.info,console,s.name+":"),o.debug.apply(console,arguments)))},verbose:function(){s.verbose&&s.debug&&(s.performance?o.performance.log(arguments):(o.verbose=Function.prototype.bind.call(console.info,console,s.name+":"),o.verbose.apply(console,arguments)))},error:function(){o.error=Function.prototype.bind.call(console.error,console,s.name+":"),o.error.apply(console,arguments)},performance:{log:function(e){var t,n;s.performance&&(n=(t=(new Date).getTime())-(l||t),l=t,u.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:k,"Execution Time":n})),clearTimeout(o.performance.timer),o.performance.timer=setTimeout(o.performance.display,100)},display:function(){var t=s.name+":",n=0;l=!1,clearTimeout(o.performance.timer),e.each(u,function(e,t){n+=t["Execution Time"]}),t+=" "+n+"ms",c&&(t+=" '"+c+"'"),(console.group!==i||console.table!==i)&&u.length>0&&(console.groupCollapsed(t),console.table?console.table(u):e.each(u,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),u=[]}},invoke:function(t,n,r){var s,c,l,u=_;return n=n||f,r=k||r,"string"==typeof t&&u!==i&&(t=t.split(/[\. ]/),s=t.length-1,e.each(t,function(n,a){var r=n!=s?a+t[n+1].charAt(0).toUpperCase()+t[n+1].slice(1):t;if(e.isPlainObject(u[r])&&n!=s)u=u[r];else{if(u[r]!==i)return c=u[r],!1;if(!e.isPlainObject(u[a])||n==s)return u[a]!==i?(c=u[a],!1):(o.error(A.method,t),!1);u=u[a]}})),e.isFunction(c)?l=c.apply(r,n):c!==i&&(l=c),e.isArray(a)?a.push(l):a!==i?a=[a,l]:l!==i&&(a=l),c}},p?(_===i&&o.initialize(),o.invoke(d)):(_!==i&&o.destroy(),o.initialize())}),o&&!p&&o.initializeHistory(),a!==i?a:this},e.tab=function(n){e(t).tab(n)},e.fn.tab.settings={name:"Tab",namespace:"tab",debug:!1,verbose:!0,performance:!0,auto:!1,history:!1,historyType:"hash",path:!1,context:!1,childrenOnly:!1,maxDepth:25,ignoreFirstLoad:!1,alwaysRefresh:!1,cache:!0,apiSettings:!1,onTabInit:function(){},onTabLoad:function(){},templates:{determineTitle:function(){}},error:{api:"You attempted to load content without API module",method:"The method you called is not defined",missingTab:"Activated tab cannot be found for this context.",noContent:"The tab you specified is missing a content url.",path:"History enabled, but no path was specified",recursion:"Max recursive depth reached",state:"History requires Asual's Address library <https://github.com/asual/jquery-address>"},metadata:{tab:"tab",loaded:"loaded",promise:"promise"},className:{loading:"loading",active:"active"},selector:{tabs:".ui.tab",ui:".ui"}}}(jQuery,window,document),function(e,t,n,i){"use strict";void 0!==(t=void 0!==t&&t.Math==Math?t:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")())&&t.Math==Math||("undefined"!=typeof self&&self.Math==Math?self:Function("return this")());e.fn.progress=function(t){var o,a=e(this),r=a.selector||"",s=(new Date).getTime(),c=[],l=arguments[0],u="string"==typeof l,d=[].slice.call(arguments,1);return a.each(function(){var a,p,f=e.isPlainObject(t)?e.extend(!0,{},e.fn.progress.settings,t):e.extend({},e.fn.progress.settings),h=f.className,m=f.metadata,g=f.namespace,b=f.selector,v=f.error,M="."+g,y="module-"+g,A=e(this),w=e(this).find(b.bar),z=e(this).find(b.progress),T=e(this).find(b.label),x=this,O=A.data(y),C=!1;p={initialize:function(){p.debug("Initializing progress bar",f),p.set.duration(),p.set.transitionEvent(),p.read.metadata(),p.read.settings(),p.instantiate()},instantiate:function(){p.verbose("Storing instance of progress",p),O=p,A.data(y,p)},destroy:function(){p.verbose("Destroying previous progress for",A),clearInterval(O.interval),p.remove.state(),A.removeData(y),O=i},reset:function(){p.remove.nextValue(),p.update.progress(0)},complete:function(){(p.percent===i||p.percent<100)&&(p.remove.progressPoll(),p.set.percent(100))},read:{metadata:function(){var e={percent:A.data(m.percent),total:A.data(m.total),value:A.data(m.value)};e.percent&&(p.debug("Current percent value set from metadata",e.percent),p.set.percent(e.percent)),e.total&&(p.debug("Total value set from metadata",e.total),p.set.total(e.total)),e.value&&(p.debug("Current value set from metadata",e.value),p.set.value(e.value),p.set.progress(e.value))},settings:function(){!1!==f.total&&(p.debug("Current total set in settings",f.total),p.set.total(f.total)),!1!==f.value&&(p.debug("Current value set in settings",f.value),p.set.value(f.value),p.set.progress(p.value)),!1!==f.percent&&(p.debug("Current percent set in settings",f.percent),p.set.percent(f.percent))}},increment:function(e){var t,n;p.has.total()?n=(t=p.get.value())+(e=e||1):(n=(t=p.get.percent())+(e=e||p.get.randomValue()),100,p.debug("Incrementing percentage by",t,n)),n=p.get.normalizedValue(n),p.set.progress(n)},decrement:function(e){var t,n;p.get.total()?(n=(t=p.get.value())-(e=e||1),p.debug("Decrementing value by",e,t)):(n=(t=p.get.percent())-(e=e||p.get.randomValue()),p.debug("Decrementing percentage by",e,t)),n=p.get.normalizedValue(n),p.set.progress(n)},has:{progressPoll:function(){return p.progressPoll},total:function(){return!1!==p.get.total()}},get:{text:function(e){var t=p.value||0,n=p.total||0,i=C?p.get.displayPercent():p.percent||0,o=p.total>0?n-t:100-i;return e=(e=e||"").replace("{value}",t).replace("{total}",n).replace("{left}",o).replace("{percent}",i),p.verbose("Adding variables to progress bar text",e),e},normalizedValue:function(e){if(e<0)return p.debug("Value cannot decrement below 0"),0;if(p.has.total()){if(e>p.total)return p.debug("Value cannot increment above total",p.total),p.total}else if(e>100)return p.debug("Value cannot increment above 100 percent"),100;return e},updateInterval:function(){return"auto"==f.updateInterval?f.duration:f.updateInterval},randomValue:function(){return p.debug("Generating random increment percentage"),Math.floor(Math.random()*f.random.max+f.random.min)},numericValue:function(e){return"string"==typeof e?""!==e.replace(/[^\d.]/g,"")&&+e.replace(/[^\d.]/g,""):e},transitionEnd:function(){var e,t=n.createElement("element"),o={transition:"transitionend",OTransition:"oTransitionEnd",MozTransition:"transitionend",WebkitTransition:"webkitTransitionEnd"};for(e in o)if(t.style[e]!==i)return o[e]},displayPercent:function(){var e=w.width(),t=A.width(),n=e>parseInt(w.css("min-width"),10)?e/t*100:p.percent;return f.precision>0?Math.round(n*(10*f.precision))/(10*f.precision):Math.round(n)},percent:function(){return p.percent||0},value:function(){return p.nextValue||p.value||0},total:function(){return p.total||!1}},create:{progressPoll:function(){p.progressPoll=setTimeout(function(){p.update.toNextValue(),p.remove.progressPoll()},p.get.updateInterval())}},is:{complete:function(){return p.is.success()||p.is.warning()||p.is.error()},success:function(){return A.hasClass(h.success)},warning:function(){return A.hasClass(h.warning)},error:function(){return A.hasClass(h.error)},active:function(){return A.hasClass(h.active)},visible:function(){return A.is(":visible")}},remove:{progressPoll:function(){p.verbose("Removing progress poll timer"),p.progressPoll&&(clearTimeout(p.progressPoll),delete p.progressPoll)},nextValue:function(){p.verbose("Removing progress value stored for next update"),delete p.nextValue},state:function(){p.verbose("Removing stored state"),delete p.total,delete p.percent,delete p.value},active:function(){p.verbose("Removing active state"),A.removeClass(h.active)},success:function(){p.verbose("Removing success state"),A.removeClass(h.success)},warning:function(){p.verbose("Removing warning state"),A.removeClass(h.warning)},error:function(){p.verbose("Removing error state"),A.removeClass(h.error)}},set:{barWidth:function(e){e>100?p.error(v.tooHigh,e):e<0?p.error(v.tooLow,e):(w.css("width",e+"%"),A.attr("data-percent",parseInt(e,10)))},duration:function(e){e="number"==typeof(e=e||f.duration)?e+"ms":e,p.verbose("Setting progress bar transition duration",e),w.css({"transition-duration":e})},percent:function(e){e="string"==typeof e?+e.replace("%",""):e,e=f.precision>0?Math.round(e*(10*f.precision))/(10*f.precision):Math.round(e),p.percent=e,p.has.total()||(p.value=f.precision>0?Math.round(e/100*p.total*(10*f.precision))/(10*f.precision):Math.round(e/100*p.total*10)/10,f.limitValues&&(p.value=p.value>100?100:p.value<0?0:p.value)),p.set.barWidth(e),p.set.labelInterval(),p.set.labels(),f.onChange.call(x,e,p.value,p.total)},labelInterval:function(){var t=function(){p.verbose("Bar finished animating, removing continuous label updates"),clearInterval(p.interval),C=!1,p.set.labels()};clearInterval(p.interval),w.one(a+M,t),C=!0,p.interval=setInterval(function(){e.contains(n.documentElement,x)||(clearInterval(p.interval),C=!1),p.set.labels()},f.framerate)},labels:function(){p.verbose("Setting both bar progress and outer label text"),p.set.barLabel(),p.set.state()},label:function(e){(e=e||"")&&(e=p.get.text(e),p.verbose("Setting label to text",e),T.text(e))},state:function(e){
DesignScreenshot/output/gitee_run/gitee.com_4_after_login.html:397:function(e,t){"function"==typeof define&&define.amd?define(["jquery"],function(e){return t(e)}):"object"==typeof exports?module.exports=t(require("jquery")):t(jQuery)}(0,function(e){var t,n,i;n={ESC:27,TAB:9,ENTER:13,CTRL:17,A:65,P:80,N:78,LEFT:37,UP:38,RIGHT:39,DOWN:40,BACKSPACE:8,SPACE:32},t={beforeSave:function(e){return o.arrayToDefaultHash(e)},matcher:function(e,t,n,i){var o,a,r;return e=e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),n&&(e="(?:^|\\s)"+e),o=decodeURI("%C3%80"),a=decodeURI("%C3%BF"),(r=new RegExp(e+"([A-Za-z"+o+"-"+a+"0-9_"+(i?" ":"")+"'.+-]*)$|"+e+"([^\\x00-\\xff]*)$","gi").exec(t))?r[2]||r[1]:null},filter:function(e,t,n){var i,o,a,r;for(i=[],o=0,r=t.length;o<r;o++)a=t[o],~new String(a[n]).toLowerCase().indexOf(e.toLowerCase())&&i.push(a);return i},remoteFilter:null,sorter:function(e,t,n){var i,o,a,r;if(!e)return t;for(i=[],o=0,r=t.length;o<r;o++)(a=t[o]).atwho_order=new String(a[n]).toLowerCase().indexOf(e.toLowerCase()),a.atwho_order>-1&&i.push(a);return i.sort(function(e,t){return e.atwho_order-t.atwho_order})},tplEval:function(e,t){var n,i;i=e;try{return"string"!=typeof e&&(i=e(t)),i.replace(/\$\{([^\}]*)\}/g,function(e,n){return t[n]})}catch(n){return n,""}},highlighter:function(e,t){var n;return t?(n=new RegExp(">\\s*([^<]*?)("+t.replace("+","\\+")+")([^<]*)\\s*<","ig"),e.replace(n,function(e,t,n,i){return"> "+t+"<strong>"+n+"</strong>"+i+" <"})):e},beforeInsert:function(e){return e},beforeReposition:function(e){return e},afterMatchFailed:function(){}},i=function(){function t(t){this.currentFlag=null,this.controllers={},this.aliasMaps={},this.$inputor=e(t),this.setupRootElement(),this.listen()}return t.prototype.createContainer=function(t){var n;return null!=(n=this.$el)&&n.remove(),e(t.body).append(this.$el=e("<div class='atwho-container'></div>"))},t.prototype.setupRootElement=function(t,n){var i,o;if(null==n&&(n=!1),t)this.window=t.contentWindow,this.document=t.contentDocument||this.window.document,this.iframe=t;else{this.document=this.$inputor[0].ownerDocument,this.window=this.document.defaultView||this.document.parentWindow;try{this.iframe=this.window.frameElement}catch(o){if(i=o,this.iframe=null,e.fn.atwho.debug)throw new Error("iframe auto-discovery is failed.\nPlease use `setIframe` to set the target iframe manually.\n"+i)}}return this.createContainer((this.iframeAsRoot=n)?this.document:document)},t.prototype.controller=function(e){var t,n,i,o;if(this.aliasMaps[e])n=this.controllers[this.aliasMaps[e]];else for(i in o=this.controllers)if(t=o[i],i===e){n=t;break}return n||this.controllers[this.currentFlag]},t.prototype.setContextFor=function(e){return this.currentFlag=e,this},t.prototype.reg=function(e,t){var n,i;return i=(n=this.controllers)[e]||(n[e]=this.$inputor.is("[contentEditable]")?new l(this,e):new r(this,e)),t.alias&&(this.aliasMaps[t.alias]=e),i.init(t),this},t.prototype.listen=function(){return this.$inputor.on("compositionstart",(e=this,function(){var t;return null!=(t=e.controller())&&t.view.hide(),e.isComposing=!0,null})).on("compositionend",function(e){return function(){return e.isComposing=!1,setTimeout(function(t){return e.dispatch(t)}),null}}(this)).on("keyup.atwhoInner",function(e){return function(t){return e.onKeyup(t)}}(this)).on("keydown.atwhoInner",function(e){return function(t){return e.onKeydown(t)}}(this)).on("blur.atwhoInner",function(e){return function(t){var n;if(n=e.controller())return n.expectedQueryCBId=null,n.view.hide(t,n.getOpt("displayTimeout"))}}(this)).on("click.atwhoInner",function(e){return function(t){return e.dispatch(t)}}(this)).on("scroll.atwhoInner",function(e){return function(){var t;return t=e.$inputor.scrollTop(),function(n){var i,o;return i=n.target.scrollTop,t!==i&&null!=(o=e.controller())&&o.view.hide(n),t=i,!0}}}(this)());var e},t.prototype.shutdown=function(){var e,t;for(e in t=this.controllers)t[e].destroy(),delete this.controllers[e];return this.$inputor.off(".atwhoInner"),this.$el.remove()},t.prototype.dispatch=function(e){var t,n,i,o;for(t in o=[],i=this.controllers)n=i[t],o.push(n.lookUp(e));return o},t.prototype.onKeyup=function(t){var i;switch(t.keyCode){case n.ESC:t.preventDefault(),null!=(i=this.controller())&&i.view.hide();break;case n.DOWN:case n.UP:case n.CTRL:case n.ENTER:e.noop();break;case n.P:case n.N:t.ctrlKey||this.dispatch(t);break;default:this.dispatch(t)}},t.prototype.onKeydown=function(t){var i,o;if((o=null!=(i=this.controller())?i.view:void 0)&&o.visible())switch(t.keyCode){case n.ESC:t.preventDefault(),o.hide(t);break;case n.UP:t.preventDefault(),o.prev();break;case n.DOWN:t.preventDefault(),o.next();break;case n.P:if(!t.ctrlKey)return;t.preventDefault(),o.prev();break;case n.N:if(!t.ctrlKey)return;t.preventDefault(),o.next();break;case n.TAB:case n.ENTER:case n.SPACE:if(!o.visible())return;if(!this.controller().getOpt("spaceSelectsMatch")&&t.keyCode===n.SPACE)return;if(!this.controller().getOpt("tabSelectsMatch")&&t.keyCode===n.TAB)return;o.highlighted()?(t.preventDefault(),o.choose(t)):o.hide(t);break;default:e.noop()}},t}();var o,a=[].slice;o=function(){function n(t,n){this.app=t,this.at=n,this.$inputor=this.app.$inputor,this.id=this.$inputor[0].id||this.uid(),this.expectedQueryCBId=null,this.setting=null,this.query=null,this.pos=0,this.range=null,0===(this.$el=e("#atwho-ground-"+this.id,this.app.$el)).length&&this.app.$el.append(this.$el=e("<div id='atwho-ground-"+this.id+"'></div>")),this.model=new u(this),this.view=new d(this)}return n.prototype.uid=function(){return(Math.random().toString(16)+"000000000").substr(2,8)+(new Date).getTime()},n.prototype.init=function(t){return this.setting=e.extend({},this.setting||e.fn.atwho["default"],t),this.view.init(),this.model.reload(this.setting.data)},n.prototype.destroy=function(){return this.trigger("beforeDestroy"),this.model.destroy(),this.view.destroy(),this.$el.remove()},n.prototype.callDefault=function(){var n,i,o,r;r=arguments[0],n=2<=arguments.length?a.call(arguments,1):[];try{return t[r].apply(this,n)}catch(o){return i=o,e.error(i+" Or maybe At.js doesn't have function "+r)}},n.prototype.trigger=function(e,t){var n,i;return null==t&&(t=[]),t.push(this),i=(n=this.getOpt("alias"))?e+"-"+n+".atwho":e+".atwho",this.$inputor.trigger(i,t)},n.prototype.callbacks=function(e){return this.getOpt("callbacks")[e]||t[e]},n.prototype.getOpt=function(e){var t;try{return this.setting[e]}catch(t){return t,null}},n.prototype.insertContentFor=function(t){var n,i;return i=this.getOpt("insertTpl"),n=e.extend({},t.data("item-data"),{"atwho-at":this.at}),this.callbacks("tplEval").call(this,i,n,"onInsert")},n.prototype.renderView=function(e){var t;return t=this.getOpt("searchKey"),e=this.callbacks("sorter").call(this,this.query.text,e.slice(0,1001),t),this.view.render(e.slice(0,this.getOpt("limit")))},n.arrayToDefaultHash=function(t){var n,i,o,a;if(!e.isArray(t))return t;for(a=[],n=0,o=t.length;n<o;n++)i=t[n],e.isPlainObject(i)?a.push(i):a.push({name:i});return a},n.prototype.lookUp=function(e){var t,n;if((!e||"click"!==e.type||this.getOpt("lookUpOnClick"))&&(!this.getOpt("suspendOnComposing")||!this.app.isComposing))return(t=this.catchQuery(e))?(this.app.setContextFor(this.at),(n=this.getOpt("delay"))?this._delayLookUp(t,n):this._lookUp(t),t):(this.expectedQueryCBId=null,t)},n.prototype._delayLookUp=function(e,t){var n,i,o;return n=Date.now?Date.now():(new Date).getTime(),this.previousCallTime||(this.previousCallTime=n),0<(i=t-(n-this.previousCallTime))&&i<t?(this.previousCallTime=n,this._stopDelayedCall(),this.delayedCallTimeout=setTimeout((o=this,function(){return o.previousCallTime=0,o.delayedCallTimeout=null,o._lookUp(e)}),t)):(this._stopDelayedCall(),this.previousCallTime!==n&&(this.previousCallTime=0),this._lookUp(e))},n.prototype._stopDelayedCall=function(){if(this.delayedCallTimeout)return clearTimeout(this.delayedCallTimeout),this.delayedCallTimeout=null},n.prototype._generateQueryCBId=function(){return{}},n.prototype._lookUp=function(t){var n;return n=function(e,t){if(e===this.expectedQueryCBId)return t&&t.length>0?this.renderView(this.constructor.arrayToDefaultHash(t)):this.view.hide()},this.expectedQueryCBId=this._generateQueryCBId(),this.model.query(t.text,e.proxy(n,this,this.expectedQueryCBId))},n}();var r,s=function(e,t){function n(){this.constructor=e}for(var i in t)c.call(t,i)&&(e[i]=t[i]);return n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype,e},c={}.hasOwnProperty;r=function(){function t(){return t.__super__.constructor.apply(this,arguments)}return s(t,o),t.prototype.catchQuery=function(){var e,t,n,i,o,a,r;if(t=this.$inputor.val(),e=this.$inputor.caret("pos",{iframe:this.app.iframe}),r=t.slice(0,e),!((i="string"==typeof(o=this.callbacks("matcher").call(this,this.at,r,this.getOpt("startWithSpace"),this.getOpt("acceptSpaceBar"))))&&o.length<this.getOpt("minLen",0)))return i&&o.length<=this.getOpt("maxLen",20)?(n=(a=e-o.length)+o.length,this.pos=a,o={text:o,headPos:a,endPos:n},this.trigger("matched",[this.at,o.text])):(o=null,this.view.hide()),this.query=o},t.prototype.rect=function(){var t,n,i;if(t=this.$inputor.caret("offset",this.pos-1,{iframe:this.app.iframe}))return this.app.iframe&&!this.app.iframeAsRoot&&(n=e(this.app.iframe).offset(),t.left+=n.left,t.top+=n.top),i=this.app.document.selection?0:2,{left:t.left,top:t.top,bottom:t.top+t.height+i}},t.prototype.insert=function(e){var t,n,i,o,a;return a=""+(i=(n=(t=this.$inputor).val()).slice(0,Math.max(this.query.headPos-this.at.length,0)))+(e+=o=""===(o=this.getOpt("suffix"))?o:o||" ")+n.slice(this.query.endPos||0),t.val(a),t.caret("pos",i.length+e.length,{iframe:this.app.iframe}),t.is(":focus")||t.focus(),t.change()},t}();var l,u,d,p;s=function(e,t){function n(){this.constructor=e}for(var i in t)c.call(t,i)&&(e[i]=t[i]);return n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype,e},c={}.hasOwnProperty;l=function(){function t(){return t.__super__.constructor.apply(this,arguments)}return s(t,o),t.prototype._getRange=function(){var e;if((e=this.app.window.getSelection()).rangeCount>0)return e.getRangeAt(0)},t.prototype._setRange=function(t,n,i){if(null==i&&(i=this._getRange()),i&&n)return n=e(n)[0],"after"===t?(i.setEndAfter(n),i.setStartAfter(n)):(i.setEndBefore(n),i.setStartBefore(n)),i.collapse(!1),this._clearRange(i)},t.prototype._clearRange=function(e){var t;if(null==e&&(e=this._getRange()),t=this.app.window.getSelection(),null==this.ctrl_a_pressed)return t.removeAllRanges(),t.addRange(e)},t.prototype._movingEvent=function(e){var t;return"click"===e.type||(t=e.which)===n.RIGHT||t===n.LEFT||t===n.UP||t===n.DOWN},t.prototype._unwrap=function(t){var n;return(n=(t=e(t).unwrap().get(0)).nextSibling)&&n.nodeValue&&(t.nodeValue+=n.nodeValue,e(n).remove()),t},t.prototype.catchQuery=function(t){var i,o,a,r,s,c,l,u,d,p,f,h;if((h=this._getRange())&&h.collapsed){if(t.which===n.ENTER)return(o=e(h.startContainer).closest(".atwho-query")).contents().unwrap(),o.is(":empty")&&o.remove(),(o=e(".atwho-query",this.app.document)).text(o.text()).contents().last().unwrap(),void this._clearRange();if(/firefox/i.test(navigator.userAgent)){if(e(h.startContainer).is(this.$inputor))return void this._clearRange();t.which===n.BACKSPACE&&h.startContainer.nodeType===document.ELEMENT_NODE&&(d=h.startOffset-1)>=0?((a=h.cloneRange()).setStart(h.startContainer,d),e(a.cloneContents()).contents().last().is(".atwho-inserted")&&(s=e(h.startContainer).contents().get(d),this._setRange("after",e(s).contents().last()))):t.which===n.LEFT&&h.startContainer.nodeType===document.TEXT_NODE&&(i=e(h.startContainer.previousSibling)).is(".atwho-inserted")&&0===h.startOffset&&this._setRange("after",i.contents().last())}if(e(h.startContainer).closest(".atwho-inserted").addClass("atwho-query").siblings().removeClass("atwho-query"),(o=e(".atwho-query",this.app.document)).length>0&&o.is(":empty")&&0===o.text().length&&o.remove(),this._movingEvent(t)||o.removeClass("atwho-inserted"),o.length>0)switch(t.which){case n.LEFT:return this._setRange("before",o.get(0),h),void o.removeClass("atwho-query");case n.RIGHT:return this._setRange("after",o.get(0).nextSibling,h),void o.removeClass("atwho-query")}if(o.length>0&&(f=o.attr("data-atwho-at-query"))&&(o.empty().html(f).attr("data-atwho-at-query",null),this._setRange("after",o.get(0),h)),(a=h.cloneRange()).setStart(h.startContainer,0),c="string"==typeof(u=this.callbacks("matcher").call(this,this.at,a.toString(),this.getOpt("startWithSpace"),this.getOpt("acceptSpaceBar"))),0===o.length&&c&&(r=h.startOffset-this.at.length-u.length)>=0&&(h.setStart(h.startContainer,r),o=e("<span/>",this.app.document).attr(this.getOpt("editableAtwhoQueryAttrs")).addClass("atwho-query"),h.surroundContents(o.get(0)),(l=o.contents().last().get(0))&&(/firefox/i.test(navigator.userAgent)?(h.setStart(l,l.length),h.setEnd(l,l.length),this._clearRange(h)):this._setRange("after",l,h))),!(c&&u.length<this.getOpt("minLen",0)))return c&&u.length<=this.getOpt("maxLen",20)?(p={text:u,el:o},this.trigger("matched",[this.at,p.text]),this.query=p):(this.view.hide(),this.query={el:o},o.text().indexOf(this.at)>=0&&(this._movingEvent(t)&&o.hasClass("atwho-inserted")?o.removeClass("atwho-query"):!1!==this.callbacks("afterMatchFailed").call(this,this.at,o)&&this._setRange("after",this._unwrap(o.text(o.text()).contents().first()))),null)}},t.prototype.rect=function(){var t,n;if((n=this.query.el.offset())&&this.query.el[0].getClientRects().length)return this.app.iframe&&!this.app.iframeAsRoot&&(t=e(this.app.iframe).offset(),n.left+=t.left-this.$inputor.scrollLeft(),n.top+=t.top-this.$inputor.scrollTop()),n.bottom=n.top+this.query.el.height(),n},t.prototype.insert=function(e,t){var n,i,o,a,r;return this.$inputor.is(":focus")||this.$inputor.focus(),(i=this.getOpt("functionOverrides")).insert?i.insert.call(this,e,t):(a=""===(a=this.getOpt("suffix"))?a:a||"\xa0",n=t.data("item-data"),this.query.el.removeClass("atwho-query").addClass("atwho-inserted").html(e).attr("data-atwho-at-query",""+n["atwho-at"]+this.query.text).attr("contenteditable","false"),(o=this._getRange())&&(this.query.el.length&&o.setEndAfter(this.query.el[0]),o.collapse(!1),o.insertNode(r=this.app.document.createTextNode(""+a)),this._setRange("after",r,o)),this.$inputor.is(":focus")||this.$inputor.focus(),this.$inputor.change())},t}(),u=function(){function t(e){this.context=e,this.at=this.context.at,this.storage=this.context.$inputor}return t.prototype.destroy=function(){return this.storage.data(this.at,null)},t.prototype.saved=function(){return this.fetch()>0},t.prototype.query=function(e,t){var n,i,o;return i=this.fetch(),o=this.context.getOpt("searchKey"),i=this.context.callbacks("filter").call(this.context,e,i,o)||[],n=this.context.callbacks("remoteFilter"),i.length>0||!n&&0===i.length?t(i):n.call(this.context,e,t)},t.prototype.fetch=function(){return this.storage.data(this.at)||[]},t.prototype.save=function(e){return this.storage.data(this.at,this.context.callbacks("beforeSave").call(this.context,e||[]))},t.prototype.load=function(e){if(!this.saved()&&e)return this._load(e)},t.prototype.reload=function(e){return this._load(e)},t.prototype._load=function(t){return"string"==typeof t?e.ajax(t,{dataType:"json"}).done((n=this,function(e){return n.save(e)})):this.save(t);var n},t}(),d=function(){function t(t){this.context=t,this.$el=e("<div class='atwho-view'><ul class='atwho-view-ul'></ul></div>"),this.$elUl=this.$el.children(),this.timeoutID=null,this.context.$el.append(this.$el),this.bindEvent()}return t.prototype.init=function(){var e,t;return t=this.context.getOpt("alias")||this.context.at.charCodeAt(0),(e=this.context.getOpt("headerTpl"))&&1===this.$el.children().length&&this.$el.prepend(e),this.$el.attr({id:"at-view-"+t})},t.prototype.destroy=function(){return this.$el.remove()},t.prototype.bindEvent=function(){var t,n,i,o;return t=this.$el.find("ul"),n=0,i=0,t.on("mousemove.atwho-view","li",function(o){var a;if((n!==o.clientX||i!==o.clientY)&&(n=o.clientX,i=o.clientY,!(a=e(o.currentTarget)).hasClass("cur")))return t.find(".cur").removeClass("cur"),a.addClass("cur")}).on("click.atwho-view","li",(o=this,function(n){return t.find(".cur").removeClass("cur"),e(n.currentTarget).addClass("cur"),o.choose(n),n.preventDefault()}))},t.prototype.visible=function(){return e.expr.filters.visible(this.$el[0])},t.prototype.highlighted=function(){return this.$el.find(".cur").length>0},t.prototype.choose=function(e){var t,n;if((t=this.$el.find(".cur")).length&&(n=this.context.insertContentFor(t),this.context._stopDelayedCall(),this.context.insert(this.context.callbacks("beforeInsert").call(this.context,n,t,e),t),this.context.trigger("inserted",[t,e]),this.hide(e)),this.context.getOpt("hideWithoutSuffix"))return this.stopShowing=!0},t.prototype.reposition=function(t){var n,i,o,a;return n=this.context.app.iframeAsRoot?this.context.app.window:window,t.bottom+this.$el.height()-e(n).scrollTop()>e(n).height()&&(t.bottom=t.top-this.$el.height()),t.left>(o=e(n).width()-this.$el.width()-5)&&(t.left=o),i={left:t.left,top:t.bottom},null!=(a=this.context.callbacks("beforeReposition"))&&a.call(this.context,i),this.$el.offset(i),this.context.trigger("reposition",[i])},t.prototype.next=function(){var e,t,n;return(e=this.$el.find(".cur").removeClass("cur").next()).length||(e=this.$el.find("li:first")),e.addClass("cur"),n=(t=e[0]).offsetTop+t.offsetHeight+(t.nextSibling?t.nextSibling.offsetHeight:0),this.scrollTop(Math.max(0,n-this.$el.height()))},t.prototype.prev=function(){var e,t,n;return(t=this.$el.find(".cur").removeClass("cur").prev()).length||(t=this.$el.find("li:last")),t.addClass("cur"),e=(n=t[0]).offsetTop+n.offsetHeight+(n.nextSibling?n.nextSibling.offsetHeight:0),this.scrollTop(Math.max(0,e-this.$el.height()))},t.prototype.scrollTop=function(e){var t;return(t=this.context.getOpt("scrollDuration"))?this.$elUl.animate({scrollTop:e},t):this.$elUl.scrollTop(e)},t.prototype.show=function(){var e;if(!this.stopShowing)return this.visible()||(this.$el.show(),this.$el.scrollTop(0),this.context.trigger("shown")),(e=this.context.rect())?this.reposition(e):void 0;this.stopShowing=!1},t.prototype.hide=function(e,t){var n,i;if(this.visible())return isNaN(t)?(this.$el.hide(),this.context.trigger("hidden",[e])):(i=this,n=function(){return i.hide()},clearTimeout(this.timeoutID),this.timeoutID=setTimeout(n,t))},t.prototype.render=function(t){var n,i,o,a,r,s,c;if(e.isArray(t)&&t.length>0){for(this.$el.find("ul").empty(),i=this.$el.find("ul"),c=this.context.getOpt("displayTpl"),o=0,r=t.length;o<r;o++)a=t[o],a=e.extend({},a,{"atwho-at":this.context.at}),s=this.context.callbacks("tplEval").call(this.context,c,a,"onDisplay"),(n=e(this.context.callbacks("highlighter").call(this.context,s,this.context.query.text))).data("item-data",a),i.append(n);return this.show(),this.context.getOpt("highlightFirst")?i.find("li:first").addClass("cur"):void 0}this.hide()},t}(),p={load:function(e,t){var n;if(n=this.controller(e))return n.model.load(t)},isSelecting:function(){var e;return!!(null!=(e=this.controller())?e.view.visible():void 0)},hide:function(){var e;return null!=(e=this.controller())?e.view.hide():void 0},reposition:function(){var e;if(e=this.controller())return e.view.reposition(e.rect())},setIframe:function(e,t){return this.setupRootElement(e,t),null},run:function(){return this.dispatch()},destroy:function(){return this.shutdown(),this.$inputor.data("atwho",null)}},e.fn.atwho=function(t){var n,o;return n=arguments,o=null,this.filter('textarea, input, [contenteditable=""], [contenteditable=true]').each(function(){var a,r;return(r=(a=e(this)).data("atwho"))||a.data("atwho",r=new i(this)),"object"!=typeof t&&t?p[t]&&r?o=p[t].apply(r,Array.prototype.slice.call(n,1)):e.error("Method "+t+" does not exist on jQuery.atwho"):r.reg(t.at,t)}),null!=o?o:this},e.fn.atwho["default"]={at:void 0,alias:void 0,data:null,displayTpl:"<li>${name}</li>",insertTpl:"${atwho-at}${name}",headerTpl:null,callbacks:t,functionOverrides:{},searchKey:"name",suffix:void 0,hideWithoutSuffix:!1,startWithSpace:!0,acceptSpaceBar:!1,highlightFirst:!0,limit:5,maxLen:20,minLen:0,displayTimeout:300,delay:null,spaceSelectsMatch:!1,tabSelectsMatch:!0,editableAtwhoQueryAttrs:{},scrollDuration:150,suspendOnComposing:!0,lookUpOnClick:!0},e.fn.atwho.debug=!1}),function(e){var t=function(){"use strict";return{isMsie:function(){return!!/(msie|trident)/i.test(navigator.userAgent)&&navigator.userAgent.match(/(msie |rv:)(\d+(.\d+)?)/i)[2]},isBlankString:function(e){return!e||/^\s*$/.test(e)},escapeRegExChars:function(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")},isString:function(e){return"string"==typeof e},isNumber:function(e){return"number"==typeof e},isArray:e.isArray,isFunction:e.isFunction,isObject:e.isPlainObject,isUndefined:function(e){return void 0===e},toStr:function(e){return t.isUndefined(e)||null===e?"":e+""},bind:e.proxy,each:function(t,n){function i(e,t){return n(t,e)}e.each(t,i)},map:e.map,filter:e.grep,every:function(t,n){var i=!0;return t?(e.each(t,function(e,o){return!!(i=n.call(null,o,e,t))&&void 0}),!!i):i},some:function(t,n){var i=!1;return t?(e.each(t,function(e,o){return!(i=n.call(null,o,e,t))&&void 0}),!!i):i},mixin:e.extend,getUniqueId:function(){var e=0;return function(){return e++}}(),templatify:function(t){function n(){return String(t)}return e.isFunction(t)?t:n},defer:function(e){setTimeout(e,0)},debounce:function(e,t,n){var i,o;return function(){var a,r,s=this,c=arguments;return a=function(){i=null,n||(o=e.apply(s,c))},r=n&&!i,clearTimeout(i),i=setTimeout(a,t),r&&(o=e.apply(s,c)),o}},throttle:function(e,t){var n,i,o,a,r,s;return r=0,s=function(){r=new Date,o=null,a=e.apply(n,i)},function(){var c=new Date,l=t-(c-r);return n=this,i=arguments,0>=l?(clearTimeout(o),o=null,r=c,a=e.apply(n,i)):o||(o=setTimeout(s,l)),a}},noop:function(){}}}(),n="0.10.5",i=function(){"use strict";function e(e){return(e=t.toStr(e))?e.split(/\s+/):[]}function n(e){return(e=t.toStr(e))?e.split(/\W+/):[]}function i(e){return function(){var n=[].slice.call(arguments,0);return function(i){var o=[];return t.each(n,function(n){o=o.concat(e(t.toStr(i[n])))}),o}}}return{nonword:n,whitespace:e,obj:{nonword:i(n),whitespace:i(e)}}}(),o=function(){"use strict";function n(n){this.maxSize=t.isNumber(n)?n:100,this.reset(),this.maxSize<=0&&(this.set=this.get=e.noop)}function i(){this.head=this.tail=null}function o(e,t){this.key=e,this.val=t,this.prev=this.next=null}return t.mixin(n.prototype,{set:function(e,t){var n,i=this.list.tail;this.size>=this.maxSize&&(this.list.remove(i),delete this.hash[i.key]),(n=this.hash[e])?(n.val=t,this.list.moveToFront(n)):(n=new o(e,t),this.list.add(n),this.hash[e]=n,this.size++)},get:function(e){var t=this.hash[e];return t?(this.list.moveToFront(t),t.val):void 0},reset:function(){this.size=0,this.hash={},this.list=new i}}),t.mixin(i.prototype,{add:function(e){this.head&&(e.next=this.head,this.head.prev=e),this.head=e,this.tail=this.tail||e},remove:function(e){e.prev?e.prev.next=e.next:this.head=e.next,e.next?e.next.prev=e.prev:this.tail=e.prev},moveToFront:function(e){this.remove(e),this.add(e)}}),n}(),a=function(){"use strict";function e(e){this.prefix=["__",e,"__"].join(""),this.ttlKey="__ttl__",this.keyMatcher=new RegExp("^"+t.escapeRegExChars(this.prefix))}function n(){return(new Date).getTime()}function i(e){return JSON.stringify(t.isUndefined(e)?null:e)}function o(e){return JSON.parse(e)}var a,r;try{(a=window.localStorage).setItem("~~~","!"),a.removeItem("~~~")}catch(s){a=null}return r=a&&window.JSON?{_prefix:function(e){return this.prefix+e},_ttlKey:function(e){return this._prefix(e)+this.ttlKey},get:function(e){return this.isExpired(e)&&this.remove(e),o(a.getItem(this._prefix(e)))},set:function(e,o,r){return t.isNumber(r)?a.setItem(this._ttlKey(e),i(n()+r)):a.removeItem(this._ttlKey(e)),a.setItem(this._prefix(e),i(o))},remove:function(e){return a.removeItem(this._ttlKey(e)),a.removeItem(this._prefix(e)),this},clear:function(){var e,t,n=[],i=a.length;for(e=0;i>e;e++)(t=a.key(e)).match(this.keyMatcher)&&n.push(t.replace(this.keyMatcher,""));for(e=n.length;e--;)this.remove(n[e]);return this},isExpired:function(e){var i=o(a.getItem(this._ttlKey(e)));return!!(t.isNumber(i)&&n()>i)}}:{get:t.noop,set:t.noop,remove:t.noop,clear:t.noop,isExpired:t.noop},t.mixin(e.prototype,r),e}(),r=function(){"use strict";function n(t){t=t||{},this.cancelled=!1,this.lastUrl=null,this._send=t.transport?i(t.transport):e.ajax,this._get=t.rateLimiter?t.rateLimiter(this._get):this._get,this._cache=!1===t.cache?new o(0):c}function i(n){return function(i,o){function a(e){t.defer(function(){s.resolve(e)})}function r(e){t.defer(function(){s.reject(e)})}var s=e.Deferred();return n(i,o,a,r),s}}var a=0,r={},s=6,c=new o(10);return n.setMaxPendingRequests=function(e){s=e},n.resetCache=function(){c.reset()},t.mixin(n.prototype,{_get:function(e,t,n){function i(t){n&&n(null,t),u._cache.set(e,t)}function o(){n&&n(!0)}function c(){a--,delete r[e],u.onDeckRequestArgs&&(u._get.apply(u,u.onDeckRequestArgs),u.onDeckRequestArgs=null)}var l,u=this;this.cancelled||e!==this.lastUrl||((l=r[e])?l.done(i).fail(o):s>a?(a++,r[e]=this._send(e,t).done(i).fail(o).always(c)):this.onDeckRequestArgs=[].slice.call(arguments,0))},get:function(e,n,i){var o;return t.isFunction(n)&&(i=n,n={}),this.cancelled=!1,this.lastUrl=e,(o=this._cache.get(e))?t.defer(function(){i&&i(null,o)}):this._get(e,n,i),!!o},cancel:function(){this.cancelled=!0}}),n}(),s=function(){"use strict";function n(t){(t=t||{}).datumTokenizer&&t.queryTokenizer||e.error("datumTokenizer and queryTokenizer are both required"),this.datumTokenizer=t.datumTokenizer,this.queryTokenizer=t.queryTokenizer,this.reset()}function i(e){return e=t.filter(e,function(e){return!!e}),t.map(e,function(e){return e.toLowerCase()})}function o(){return{ids:[],children:{}}}function a(e){for(var t={},n=[],i=0,o=e.length;o>i;i++)t[e[i]]||(t[e[i]]=!0,n.push(e[i]));return n}function r(e,t){function n(e,t){return e-t}var i=0,o=0,a=[];e=e.sort(n),t=t.sort(n);for(var r=e.length,s=t.length;r>i&&s>o;)e[i]<t[o]?i++:e[i]>t[o]?o++:(a.push(e[i]),i++,o++);return a}return t.mixin(n.prototype,{bootstrap:function(e){this.datums=e.datums,this.trie=e.trie},add:function(e){var n=this;e=t.isArray(e)?e:[e],t.each(e,function(e){var a,r;a=n.datums.push(e)-1,r=i(n.datumTokenizer(e)),t.each(r,function(e){var t,i,r;for(t=n.trie,i=e.split("");r=i.shift();)(t=t.children[r]||(t.children[r]=o())).ids.push(a)})})},get:function(e){var n,o,s=this;return n=i(this.queryTokenizer(e)),t.each(n,function(e){var t,n,i,a;if(o&&0===o.length)return!1;for(t=s.trie,n=e.split("");t&&(i=n.shift());)t=t.children[i];return t&&0===n.length?(a=t.ids.slice(0),void(o=o?r(o,a):a)):(o=[],!1)}),o?t.map(a(o),function(e){return s.datums[e]}):[]},reset:function(){this.datums=[],this.trie=o()},serialize:function(){return{datums:this.datums,trie:this.trie}}}),n}(),c=function(){"use strict";function i(e){return e.local||null}function o(i){var o,a;return a={url:null,thumbprint:"",ttl:864e5,filter:null,ajax:{}},(o=i.prefetch||null)&&(o=t.isString(o)?{url:o}:o,(o=t.mixin(a,o)).thumbprint=n+o.thumbprint,o.ajax.type=o.ajax.type||"GET",o.ajax.dataType=o.ajax.dataType||"json",!o.url&&e.error("prefetch requires url to be set")),o}function a(n){function i(e){return function(n){return t.debounce(n,e)}}function o(e){return function(n){return t.throttle(n,e)}}var a,r;return r={url:null,cache:!0,wildcard:"%QUERY",replace:null,rateLimitBy:"debounce",rateLimitWait:300,send:null,filter:null,ajax:{}},(a=n.remote||null)&&(a=t.isString(a)?{url:a}:a,(a=t.mixin(r,a)).rateLimiter=/^throttle$/i.test(a.rateLimitBy)?o(a.rateLimitWait):i(a.rateLimitWait),a.ajax.type=a.ajax.type||"GET",a.ajax.dataType=a.ajax.dataType||"json",delete a.rateLimitBy,delete a.rateLimitWait,!a.url&&e.error("remote requires url to be set")),a}return{local:i,prefetch:o,remote:a}}();!function(n){"use strict";function o(t){t&&(t.local||t.prefetch||t.remote)||e.error("one of local, prefetch, or remote is required"),this.limit=t.limit||5,this.sorter=l(t.sorter),this.dupDetector=t.dupDetector||u,this.local=c.local(t),this.prefetch=c.prefetch(t),this.remote=c.remote(t),this.cacheKey=this.prefetch?this.prefetch.cacheKey||this.prefetch.url:null,this.index=new s({datumTokenizer:t.datumTokenizer,queryTokenizer:t.queryTokenizer}),this.storage=this.cacheKey?new a(this.cacheKey):null}function l(e){function n(t){return t.sort(e)}function i(e){return e}return t.isFunction(e)?n:i}function u(){return!1}var d,p;d=n.Bloodhound,p={data:"data",protocol:"protocol",thumbprint:"thumbprint"},n.Bloodhound=o,o.noConflict=function(){return n.Bloodhound=d,o},o.tokenizers=i,t.mixin(o.prototype,{_loadPrefetch:function(t){function n(e){a.clear(),a.add(t.filter?t.filter(e):e),a._saveToStorage(a.index.serialize(),t.thumbprint,t.ttl)}var i,o,a=this;return(i=this._readFromStorage(t.thumbprint))?(this.index.bootstrap(i),o=e.Deferred().resolve()):o=e.ajax(t.url,t.ajax).done(n),o},_getFromRemote:function(e,t){function n(e,n){t(e?[]:a.remote.filter?a.remote.filter(n):n)}var i,o,a=this;if(this.transport)return e=e||"",o=encodeURIComponent(e),i=this.remote.replace?this.remote.replace(this.remote.url,e):this.remote.url.replace(this.remote.wildcard,o),this.transport.get(i,this.remote.ajax,n)},_cancelLastRemoteRequest:function(){this.transport&&this.transport.cancel()},_saveToStorage:function(e,t,n){this.storage&&(this.storage.set(p.data,e,n),this.storage.set(p.protocol,location.protocol,n),this.storage.set(p.thumbprint,t,n))},_readFromStorage:function(e){var t,n={};return this.storage&&(n.data=this.storage.get(p.data),n.protocol=this.storage.get(p.protocol),n.thumbprint=this.storage.get(p.thumbprint)),t=n.thumbprint!==e||n.protocol!==location.protocol,n.data&&!t?n.data:null},_initialize:function(){function n(){o.add(t.isFunction(a)?a():a)}var i,o=this,a=this.local;return i=this.prefetch?this._loadPrefetch(this.prefetch):e.Deferred().resolve(),a&&i.done(n),this.transport=this.remote?new r(this.remote):null,this.initPromise=i.promise()},initialize:function(e){return!this.initPromise||e?this._initialize():this.initPromise},add:function(e){this.index.add(e)},get:function(e,n){function i(e){var i=a.slice(0);t.each(e,function(e){return!t.some(i,function(t){return o.dupDetector(e,t)})&&i.push(e),i.length<o.limit}),n&&n(o.sorter(i))}var o=this,a=[],r=!1;a=this.index.get(e),(a=this.sorter(a).slice(0,this.limit)).length<this.limit?r=this._getFromRemote(e,i):this._cancelLastRemoteRequest(),r||(a.length>0||!this.transport)&&n&&n(a)},clear:function(){this.index.reset()},clearPrefetchCache:function(){this.storage&&this.storage.clear()},clearRemoteCache:function(){this.transport&&r.resetCache()},ttAdapter:function(){return t.bind(this.get,this)}})}(this);var l={wrapper:'<span class="twitter-typeahead"></span>',dropdown:'<span class="tt-dropdown-menu"></span>',dataset:'<div class="tt-dataset-%CLASS%"></div>',suggestions:'<span class="tt-suggestions"></span>',suggestion:'<div class="tt-suggestion"></div>'},u=function(){"use strict";var e={wrapper:{position:"relative",display:"inline-block"},hint:{position:"absolute",top:"0",left:"0",borderColor:"transparent",boxShadow:"none",opacity:"1"},input:{position:"relative",verticalAlign:"top",backgroundColor:"transparent"},inputWithNoHint:{position:"relative",verticalAlign:"top"},dropdown:{position:"absolute",top:"100%",left:"0",zIndex:"100",display:"none"},suggestions:{display:"block"},suggestion:{whiteSpace:"nowrap",cursor:"pointer"},suggestionChild:{whiteSpace:"normal"},ltr:{left:"0",right:"auto"},rtl:{left:"auto",right:" 0"}};return t.isMsie()&&t.mixin(e.input,{backgroundImage:"url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)"}),t.isMsie()&&t.isMsie()<=7&&t.mixin(e.input,{marginTop:"-1px"}),e}(),d=function(){"use strict";function n(t){t&&t.el||e.error("EventBus initialized without el"),this.$el=e(t.el)}var i="typeahead:";return t.mixin(n.prototype,{trigger:function(e){var t=[].slice.call(arguments,1);this.$el.trigger(i+e,t)}}),n}(),p=function(){"use strict";function e(e,t,n,i){var o;if(!n)return this;for(t=t.split(c),n=i?s(n,i):n,this._callbacks=this._callbacks||{};o=t.shift();)this._callbacks[o]=this._callbacks[o]||{sync:[],async:[]},this._callbacks[o][e].push(n);return this}function t(t,n,i){return e.call(this,"async",t,n,i)}function n(t,n,i){return e.call(this,"sync",t,n,i)}function i(e){var t;if(!this._callbacks)return this;for(e=e.split(c);t=e.shift();)delete this._callbacks[t];return this}function o(e){var t,n,i,o,r;if(!this._callbacks)return this;for(e=e.split(c),i=[].slice.call(arguments,1);(t=e.shift())&&(n=this._callbacks[t]);)o=a(n.sync,this,[t].concat(i)),r=a(n.async,this,[t].concat(i)),o()&&l(r);return this}function a(e,t,n){function i(){for(var i,o=0,a=e.length;!i&&a>o;o+=1)i=!1===e[o].apply(t,n);return!i}return i}
DesignScreenshot/output/gitee_run/gitee.com_4_after_login.html:419:links:["Africa/Abidjan|Africa/Bamako","Africa/Abidjan|Africa/Banjul","Africa/Abidjan|Africa/Conakry","Africa/Abidjan|Africa/Dakar","Africa/Abidjan|Africa/Freetown","Africa/Abidjan|Africa/Lome","Africa/Abidjan|Africa/Nouakchott","Africa/Abidjan|Africa/Ouagadougou","Africa/Abidjan|Africa/Sao_Tome","Africa/Abidjan|Africa/Timbuktu","Africa/Abidjan|Atlantic/St_Helena","Africa/Cairo|Egypt","Africa/Johannesburg|Africa/Maseru","Africa/Johannesburg|Africa/Mbabane","Africa/Khartoum|Africa/Juba","Africa/Lagos|Africa/Bangui","Africa/Lagos|Africa/Brazzaville","Africa/Lagos|Africa/Douala","Africa/Lagos|Africa/Kinshasa","Africa/Lagos|Africa/Libreville","Africa/Lagos|Africa/Luanda","Africa/Lagos|Africa/Malabo","Africa/Lagos|Africa/Niamey","Africa/Lagos|Africa/Porto-Novo","Africa/Maputo|Africa/Blantyre","Africa/Maputo|Africa/Bujumbura","Africa/Maputo|Africa/Gaborone","Africa/Maputo|Africa/Harare","Africa/Maputo|Africa/Kigali","Africa/Maputo|Africa/Lubumbashi","Africa/Maputo|Africa/Lusaka","Africa/Nairobi|Africa/Addis_Ababa","Africa/Nairobi|Africa/Asmara","Africa/Nairobi|Africa/Asmera","Africa/Nairobi|Africa/Dar_es_Salaam","Africa/Nairobi|Africa/Djibouti","Africa/Nairobi|Africa/Kampala","Africa/Nairobi|Africa/Mogadishu","Africa/Nairobi|Indian/Antananarivo","Africa/Nairobi|Indian/Comoro","Africa/Nairobi|Indian/Mayotte","Africa/Tripoli|Libya","America/Adak|America/Atka","America/Adak|US/Aleutian","America/Anchorage|US/Alaska","America/Argentina/Buenos_Aires|America/Buenos_Aires","America/Argentina/Catamarca|America/Argentina/ComodRivadavia","America/Argentina/Catamarca|America/Catamarca","America/Argentina/Cordoba|America/Cordoba","America/Argentina/Cordoba|America/Rosario","America/Argentina/Jujuy|America/Jujuy","America/Argentina/Mendoza|America/Mendoza","America/Atikokan|America/Coral_Harbour","America/Chicago|US/Central","America/Curacao|America/Aruba","America/Curacao|America/Kralendijk","America/Curacao|America/Lower_Princes","America/Denver|America/Shiprock","America/Denver|Navajo","America/Denver|US/Mountain","America/Detroit|US/Michigan","America/Edmonton|Canada/Mountain","America/Fort_Wayne|America/Indiana/Indianapolis","America/Fort_Wayne|America/Indianapolis","America/Fort_Wayne|US/East-Indiana","America/Halifax|Canada/Atlantic","America/Havana|Cuba","America/Indiana/Knox|America/Knox_IN","America/Indiana/Knox|US/Indiana-Starke","America/Jamaica|Jamaica","America/Kentucky/Louisville|America/Louisville","America/Los_Angeles|US/Pacific","America/Los_Angeles|US/Pacific-New","America/Manaus|Brazil/West","America/Mazatlan|Mexico/BajaSur","America/Mexico_City|Mexico/General","America/New_York|US/Eastern","America/Noronha|Brazil/DeNoronha","America/Panama|America/Cayman","America/Phoenix|US/Arizona","America/Port_of_Spain|America/Anguilla","America/Port_of_Spain|America/Antigua","America/Port_of_Spain|America/Dominica","America/Port_of_Spain|America/Grenada","America/Port_of_Spain|America/Guadeloupe","America/Port_of_Spain|America/Marigot","America/Port_of_Spain|America/Montserrat","America/Port_of_Spain|America/St_Barthelemy","America/Port_of_Spain|America/St_Kitts","America/Port_of_Spain|America/St_Lucia","America/Port_of_Spain|America/St_Thomas","America/Port_of_Spain|America/St_Vincent","America/Port_of_Spain|America/Tortola","America/Port_of_Spain|America/Virgin","America/Regina|Canada/East-Saskatchewan","America/Regina|Canada/Saskatchewan","America/Rio_Branco|America/Porto_Acre","America/Rio_Branco|Brazil/Acre","America/Santiago|Chile/Continental","America/Sao_Paulo|Brazil/East","America/St_Johns|Canada/Newfoundland","America/Tijuana|America/Ensenada","America/Tijuana|America/Santa_Isabel","America/Tijuana|Mexico/BajaNorte","America/Toronto|America/Montreal","America/Toronto|Canada/Eastern","America/Vancouver|Canada/Pacific","America/Whitehorse|Canada/Yukon","America/Winnipeg|Canada/Central","Asia/Ashgabat|Asia/Ashkhabad","Asia/Bangkok|Asia/Phnom_Penh","Asia/Bangkok|Asia/Vientiane","Asia/Dhaka|Asia/Dacca","Asia/Dubai|Asia/Muscat","Asia/Ho_Chi_Minh|Asia/Saigon","Asia/Hong_Kong|Hongkong","Asia/Jerusalem|Asia/Tel_Aviv","Asia/Jerusalem|Israel","Asia/Kathmandu|Asia/Katmandu","Asia/Kolkata|Asia/Calcutta","Asia/Macau|Asia/Macao","Asia/Makassar|Asia/Ujung_Pandang","Asia/Nicosia|Europe/Nicosia","Asia/Qatar|Asia/Bahrain","Asia/Riyadh|Asia/Aden","Asia/Riyadh|Asia/Kuwait","Asia/Seoul|ROK","Asia/Shanghai|Asia/Chongqing","Asia/Shanghai|Asia/Chungking","Asia/Shanghai|Asia/Harbin","Asia/Shanghai|PRC","Asia/Singapore|Singapore","Asia/Taipei|ROC","Asia/Tehran|Iran","Asia/Thimphu|Asia/Thimbu","Asia/Tokyo|Japan","Asia/Ulaanbaatar|Asia/Ulan_Bator","Asia/Urumqi|Asia/Kashgar","Atlantic/Faroe|Atlantic/Faeroe","Atlantic/Reykjavik|Iceland","Australia/Adelaide|Australia/South","Australia/Brisbane|Australia/Queensland","Australia/Broken_Hill|Australia/Yancowinna","Australia/Darwin|Australia/North","Australia/Hobart|Australia/Tasmania","Australia/Lord_Howe|Australia/LHI","Australia/Melbourne|Australia/Victoria","Australia/Perth|Australia/West","Australia/Sydney|Australia/ACT","Australia/Sydney|Australia/Canberra","Australia/Sydney|Australia/NSW","Etc/GMT+0|Etc/GMT","Etc/GMT+0|Etc/GMT-0","Etc/GMT+0|Etc/GMT0","Etc/GMT+0|Etc/Greenwich","Etc/GMT+0|GMT","Etc/GMT+0|GMT+0","Etc/GMT+0|GMT-0","Etc/GMT+0|GMT0","Etc/GMT+0|Greenwich","Etc/UCT|UCT","Etc/UTC|Etc/Universal","Etc/UTC|Etc/Zulu","Etc/UTC|UTC","Etc/UTC|Universal","Etc/UTC|Zulu","Europe/Belgrade|Europe/Ljubljana","Europe/Belgrade|Europe/Podgorica","Europe/Belgrade|Europe/Sarajevo","Europe/Belgrade|Europe/Skopje","Europe/Belgrade|Europe/Zagreb","Europe/Chisinau|Europe/Tiraspol","Europe/Dublin|Eire","Europe/Helsinki|Europe/Mariehamn","Europe/Istanbul|Asia/Istanbul","Europe/Istanbul|Turkey","Europe/Lisbon|Portugal","Europe/London|Europe/Belfast","Europe/London|Europe/Guernsey","Europe/London|Europe/Isle_of_Man","Europe/London|Europe/Jersey","Europe/London|GB","Europe/London|GB-Eire","Europe/Moscow|W-SU","Europe/Oslo|Arctic/Longyearbyen","Europe/Oslo|Atlantic/Jan_Mayen","Europe/Prague|Europe/Bratislava","Europe/Rome|Europe/San_Marino","Europe/Rome|Europe/Vatican","Europe/Warsaw|Poland","Europe/Zurich|Europe/Busingen","Europe/Zurich|Europe/Vaduz","Pacific/Auckland|Antarctica/McMurdo","Pacific/Auckland|Antarctica/South_Pole","Pacific/Auckland|NZ","Pacific/Chatham|NZ-CHAT","Pacific/Chuuk|Pacific/Truk","Pacific/Chuuk|Pacific/Yap","Pacific/Easter|Chile/EasterIsland","Pacific/Guam|Pacific/Saipan","Pacific/Honolulu|Pacific/Johnston","Pacific/Honolulu|US/Hawaii","Pacific/Kwajalein|Kwajalein","Pacific/Pago_Pago|Pacific/Midway","Pacific/Pago_Pago|Pacific/Samoa","Pacific/Pago_Pago|US/Samoa","Pacific/Pohnpei|Pacific/Ponape"]}),e}),function(e,t){function n(n,a){n=n||"",a=a||60;var r,s,c,l,u,d,p=["#1abc9c","#2ecc71","#3498db","#9b59b6","#34495e","#16a085","#27ae60","#2980b9","#8e44ad","#2c3e50","#f1c40f","#e67e22","#e74c3c","#eca0f1","#95a5a6","#f39c12","#d35400","#c0392b","#bdc3c7","#7f8c8d"],f=String(n).toUpperCase().split(" ");if(r=1==f.length?f[0]?f[0].charAt(0):"?":f[0].charAt(0)+f[1].charAt(0),e.devicePixelRatio&&(a*=e.devicePixelRatio),d=[r,a].join("/"),!i)try{(i=JSON.stringify(e.localStorage.getItem("LetterAvatar")))&&"string"!=typeof i||(i={})}catch(err){i={}}return"string"==typeof i[d]?i[d]:(s=(("?"==r?72:r.charCodeAt(0))-64)%20,(c=t.createElement("canvas")).width=a,c.height=a,(l=c.getContext("2d")).fillStyle=p[s-1],l.fillRect(0,0,c.width,c.height),l.font=Math.round(c.width/2)+"px Arial",l.textAlign="center",l.fillStyle="#FFF",a<25?l.fillText(r,a/2,a/1.37):"U"===r||"V"===r||"W"===r?l.fillText(r,a/2,a/1.42):l.fillText(r,a/2,a/1.48),u=c.toDataURL(),i[d]=u,c=null,o&&clearTimeout(o),o=setTimeout(function(){e.localStorage.setItem("LetterAvatar",JSON.stringify(i)),o=0},500),u)}var i,o;if(n.transform=function(){Array.prototype.forEach.call(t.querySelectorAll("img[avatar]"),function(e,t){t=e.getAttribute("avatar"),e.src=n(t,e.getAttribute("width")),e.removeAttribute("avatar"),e.setAttribute("alt",t)})},"function"==typeof define&&define.amd)define(function(){return n});else if("undefined"!=typeof exports)"undefined"!=typeof module&&module.exports&&(exports=module.exports=n),exports.LetterAvatar=n;else{window.LetterAvatar=n;var a=window.MutationObserver||window.WebKitMutationObserver;if(a){var r={childList:!0,subtree:!0,characterData:!0};new a(function(){n.transform()}).observe(t,r)}else t.addEventListener&&(t.addEventListener("DOMContentLoaded",function(){n.transform()}),t.addEventListener("DOMSubtreeModified",function(){n.transform()}),t.addEventListener("DOMNodeInserted",function(){n.transform()}))}}(window,document),
DesignScreenshot/output/gitee_run/gitee.com_4_after_login.html:446:function(e){e.widget("ui.tagit",{options:{allowDuplicates:!1,caseSensitive:!0,fieldName:"tags",placeholderText:null,readOnly:!1,removeConfirmation:!1,tagLimit:null,availableTags:[],autocomplete:{},showAutocompleteOnFocus:!1,allowSpaces:!1,singleField:!1,singleFieldDelimiter:",",singleFieldNode:null,animate:!0,tabIndex:null,beforeTagAdded:null,afterTagAdded:null,beforeTagRemoved:null,afterTagRemoved:null,onTagClicked:null,onTagLimitExceeded:null,onTagAdded:null,onTagRemoved:null,tagSource:null},_create:function(){var t=this;this.element.is("input")?(this.tagList=e("<ul></ul>").insertAfter(this.element),this.options.singleField=!0,this.options.singleFieldNode=this.element,this.element.addClass("tagit-hidden-field")):this.tagList=this.element.find("ul, ol").andSelf().last(),this.tagInput=e('<input type="text" />').addClass("ui-widget-content"),this.options.readOnly&&this.tagInput.attr("disabled","disabled"),this.options.tabIndex&&this.tagInput.attr("tabindex",this.options.tabIndex),this.options.placeholderText&&this.tagInput.attr("placeholder",this.options.placeholderText),this.options.autocomplete.source||(this.options.autocomplete.source=function(t,n){var i=t.term.toLowerCase(),o=e.grep(this.options.availableTags,function(e){return e.toLowerCase().indexOf(i)>-1});this.options.allowDuplicates||(o=this._subtractArray(o,this.assignedTags())),n(o)}),this.options.showAutocompleteOnFocus&&(this.tagInput.focus(function(){t._showAutocomplete()}),"undefined"==typeof this.options.autocomplete.minLength&&(this.options.autocomplete.minLength=0)),e.isFunction(this.options.autocomplete.source)&&(this.options.autocomplete.source=e.proxy(this.options.autocomplete.source,this)),e.isFunction(this.options.tagSource)&&(this.options.tagSource=e.proxy(this.options.tagSource,this)),this.tagList.addClass("tagit").addClass("ui-widget ui-widget-content ui-corner-all").append(e('<li class="tagit-new"></li>').append(this.tagInput)).click(function(n){var i=e(n.target);if(i.hasClass("tagit-label")){var o=i.closest(".tagit-choice");o.hasClass("removed")||t._trigger("onTagClicked",n,{tag:o,tagLabel:t.tagLabel(o)})}else t.tagInput.focus()});var n=!1;if(this.options.singleField)if(this.options.singleFieldNode){var i=e(this.options.singleFieldNode),o=i.val().split(this.options.singleFieldDelimiter);i.val(""),e.each(o,function(e,i){t.createTag(i,null,!0),n=!0})}else this.options.singleFieldNode=e('<input type="hidden" style="display:none;" value="" name="'+this.options.fieldName+'" />'),this.tagList.after(this.options.singleFieldNode);if(n||this.tagList.children("li").each(function(){e(this).hasClass("tagit-new")||(t.createTag(e(this).text(),e(this).attr("class"),!0),e(this).remove())}),this.tagInput.keydown(function(n){if(n.which==e.ui.keyCode.BACKSPACE&&""===t.tagInput.val()){var i=t._lastTag();!t.options.removeConfirmation||i.hasClass("remove")?t.removeTag(i):t.options.removeConfirmation&&i.addClass("remove ui-state-highlight")}else t.options.removeConfirmation&&t._lastTag().removeClass("remove ui-state-highlight");(n.which===e.ui.keyCode.COMMA&&!1===n.shiftKey||n.which===e.ui.keyCode.ENTER||n.which==e.ui.keyCode.TAB&&""!==t.tagInput.val()||n.which==e.ui.keyCode.SPACE&&!0!==t.options.allowSpaces&&('"'!=e.trim(t.tagInput.val()).replace(/^s*/,"").charAt(0)||'"'==e.trim(t.tagInput.val()).charAt(0)&&'"'==e.trim(t.tagInput.val()).charAt(e.trim(t.tagInput.val()).length-1)&&e.trim(t.tagInput.val()).length-1!=0))&&(n.which===e.ui.keyCode.ENTER&&""===t.tagInput.val()||n.preventDefault(),t.options.autocomplete.autoFocus&&t.tagInput.data("autocomplete-open")||(t.tagInput.autocomplete("close"),t.createTag(t._cleanedInput())))}).blur(function(n){var i=n.relatedTarget;t.tagInput.data("autocomplete-open")||e(i).hasClass("cancel-tag-edit")||t.createTag(t._cleanedInput())}),this.options.availableTags||this.options.tagSource||this.options.autocomplete.source){var a={select:function(e,n){return t.createTag(n.item.value),!1}};e.extend(a,this.options.autocomplete),a.source=this.options.tagSource||a.source,this.tagInput.autocomplete(a).bind("autocompleteopen.tagit",function(){t.tagInput.data("autocomplete-open",!0)}).bind("autocompleteclose.tagit",function(){t.tagInput.data("autocomplete-open",!1)}),this.tagInput.autocomplete("widget").addClass("tagit-autocomplete")}},destroy:function(){return e.Widget.prototype.destroy.call(this),this.element.unbind(".tagit"),this.tagList.unbind(".tagit"),this.tagInput.removeData("autocomplete-open"),this.tagList.removeClass(["tagit","ui-widget","ui-widget-content","ui-corner-all","tagit-hidden-field"].join(" ")),this.element.is("input")?(this.element.removeClass("tagit-hidden-field"),this.tagList.remove()):(this.element.children("li").each(function(){e(this).hasClass("tagit-new")?e(this).remove():(e(this).removeClass(["tagit-choice","ui-widget-content","ui-state-default","ui-state-highlight","ui-corner-all","remove","tagit-choice-editable","tagit-choice-read-only"].join(" ")),e(this).text(e(this).children(".tagit-label").text()))}),this.singleFieldNode&&this.singleFieldNode.remove()),this},_cleanedInput:function(){return e.trim(this.tagInput.val().replace(/^"(.*)"$/,"$1"))},_lastTag:function(){return this.tagList.find(".tagit-choice:last:not(.removed)")},_tags:function(){return this.tagList.find(".tagit-choice:not(.removed)")},assignedTags:function(){var t=this,n=[];return this.options.singleField?""===(n=e(this.options.singleFieldNode).val().split(this.options.singleFieldDelimiter))[0]&&(n=[]):this._tags().each(function(){n.push(t.tagLabel(this))}),n},_updateSingleTagsField:function(t){e(this.options.singleFieldNode).val(t.join(this.options.singleFieldDelimiter)).trigger("change")},_subtractArray:function(t,n){for(var i=[],o=0;o<t.length;o++)-1==e.inArray(t[o],n)&&i.push(t[o]);return i},tagLabel:function(t){return this.options.singleField?e(t).find(".tagit-label:first").text():e(t).find("input:first").val()},_showAutocomplete:function(){this.tagInput.autocomplete("search","")},_findTagByLabel:function(t){var n=this,i=null;return this._tags().each(function(){if(n._formatStr(t)==n._formatStr(n.tagLabel(this)))return i=e(this),!1}),i},_isNew:function(e){return!this._findTagByLabel(e)},_formatStr:function(t){return this.options.caseSensitive?t:e.trim(t.toLowerCase())},_effectExists:function(t){return Boolean(e.effects&&(e.effects[t]||e.effects.effect&&e.effects.effect[t]))},createTag:function(t,n,i){var o=this;if(t=e.trim(t),this.options.preprocessTag&&(t=this.options.preprocessTag(t)),""===t)return!1;if(!this.options.allowDuplicates&&!this._isNew(t)){var a=this._findTagByLabel(t);return!1!==this._trigger("onTagExists",null,{existingTag:a,duringInitialization:i})&&this._effectExists("highlight")&&a.effect("highlight"),!1}if(this.options.tagLimit&&this._tags().length>=this.options.tagLimit)return this._trigger("onTagLimitExceeded",null,{duringInitialization:i}),!1;var r=e(this.options.onTagClicked?'<a class="tagit-label"></a>':'<span class="tagit-label"></span>').text(t),s=e("<li></li>").addClass("tagit-choice ui-widget-content ui-state-default ui-corner-all").addClass(n).append(r);if(this.options.readOnly)s.addClass("tagit-choice-read-only");else{s.addClass("tagit-choice-editable");var c=e("<span></span>").addClass("ui-icon ui-icon-close"),l=e('<a><span class="text-icon">\xd7</span></a>').addClass("tagit-close").append(c).click(function(){o.removeTag(s)});s.append(l)}if(!this.options.singleField){var u=r.html();s.append('<input type="hidden" value="'+u+'" name="'+this.options.fieldName+'" class="tagit-hidden-field" />')}if(!1!==this._trigger("beforeTagAdded",null,{tag:s,tagLabel:this.tagLabel(s),duringInitialization:i})){if(this.options.singleField){var d=this.assignedTags();d.push(t),this._updateSingleTagsField(d)}this._trigger("onTagAdded",null,s),this.tagInput.val(""),this.tagInput.parent().before(s),this._trigger("afterTagAdded",null,{tag:s,tagLabel:this.tagLabel(s),duringInitialization:i})}},removeTag:function(t,n){if(n=void 0===n?this.options.animate:n,t=e(t),this._trigger("onTagRemoved",null,t),!1!==this._trigger("beforeTagRemoved",null,{tag:t,tagLabel:this.tagLabel(t)})){if(this.options.singleField){var i=this.assignedTags(),o=this.tagLabel(t);i=e.grep(i,function(e){return e!=o}),this._updateSingleTagsField(i)}if(n){t.addClass("removed");var a=this._effectExists("blind")?["blind",{direction:"horizontal"},"fast"]:["fast"],r=this;a.push(function(){t.remove(),r._trigger("afterTagRemoved",null,{tag:t,tagLabel:r.tagLabel(t)})}),t.fadeOut("fast").hide.apply(t,a).dequeue()}else t.remove(),this._trigger("afterTagRemoved",null,{tag:t,tagLabel:this.tagLabel(t)})}},removeTagByLabel:function(e,t){var n=this._findTagByLabel(e);if(!n)throw"No such tag exists with the name '"+e+"'";this.removeTag(n,t)},removeAll:function(){var e=this;this._tags().each(function(t,n){e.removeTag(n,!1)})}})}(jQuery),function(){this.replaceAllName=function(e,t){var n,i;return n=Object.keys(t).map(function(e){return"("+(e=e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))+" )|("+e+"$)"}),i=new RegExp(n.join("|"),"g"),e.replace(i,function(e){return t[e.trim()]+" "})},this.resetKey=function(e,t,n){var i;return i=e[t],e[n]=i,delete e[t]},this.replaceUserName=function(e){var t,n,i,o,a;if(0===(t=e.find("textarea.md-input")).length&&(t=$("#editor_comment")),o=t.data("users"),n=t.val(),!jQuery.isEmptyObject(o)){for(i in a={},Object.keys(o).forEach(function(e){return a[e]=o[e]}),a)resetKey(a,i,"@"+i);Object.keys(a).map(function(e){return a[e]="@"+a[e]}),n=replaceAllName(n,a)}return t.val(n)}}.call(this),window.Gitee.setFullscreen=function(e){var t=$(this),n=t.data("mode"),i=t.find("i"),o=t.find(".tips"),a=window._web_tips||{},r=a.fullscreenTips||"\u5168\u5c4f",s=a.fullscreenExitTips||"\u9000\u51fa\u5168\u5c4f";(n="boolean"==typeof e?e:!n)?(t.addClass("active"),o.text(s),i.addClass("fa-compress").removeClass("fa-expand"),$("body").addClass("fullscreen-mode"),$("body").trigger("fullscreenchange",!0)):(t.removeClass("active"),o.text(r),i.addClass("fa-expand").removeClass("fa-compress"),$("body").removeClass("fullscreen-mode"),$("body").trigger("fullscreenchange",!1)),t.data("mode",n)},$(function(){function e(){var e=!0;if(l?noticeDropdown.setUnreadCount(l.unreadCount):noticeDropdown.loadUnreadCount(),l)return t.removeClass("ui dropdown"),void n.remove();u.resetPanelPosition(),$(window).on("resize",window.globalUtils.debouce(u.resetPanelPosition,400)),$("body").on("fullscreenchange",window.globalUtils.debouce(u.resetPanelPosition,400,!0)),o.on("click",u.loadNotices),s.on("click",u.markNotices),r.on("click",".noti",u.markNotice),t.on("mousedown",function(e){return e.stopPropagation(),!1}),t.dropdown({on:"hover",onHide:function(){t.removeClass("hoverable")},onShow:function(){var n=null,i=null;t.addClass("hoverable"),e&&(u.activeTabByUnreadCount(),e=!1),(n=o.filter(".active")).length&&((i=noticeDropdown.getNoticesByScope(n.data("scope"))).total_count&&u.renderNotices(i.list),n.trigger("click"))}}),$(window).on("document:visibility",function(e,t){var n=window.noticeDropdown;t.isHidden||(n.storage.setItem(n.storageTimestampKey,Date.now()),$.ajax({url:p,type:"GET",xhrFields:{withCredentials:!0},success:function(e){n.storage.setItem(n.storageDatasKey,JSON.stringify(e)),n.setUnreadCount(e)}}))})}var t=$("#notice-dropdown");if(t.length&&void 0!==t.data("enable")){var n=t.find(".notice-dropdown-panel"),i=t.find(".remind-button"),o=n.find(".notice-dropdown-panel-header .tab"),a=t.find(".notice-count"),r=n.find(".notice-list"),s=n.find(".mark-notices"),c=n.find(".load-all"),l=window.notisPageParams,u=null,d=null,p=t.data("count-path"),f=t.data("mark-notice-path");window.noticeDropdown={unreadCount:{},notices:{},loading:!1,scope:null,timestampExpir:3e4,storageTimestampKey:"unreadCountTimestamp",storageDatasKey:"unreadCountDatas",storage:window.localStorage,requestThrottlingTime:15e3,loadUnreadCount:function(){var e=this;if("hidden"!==window.document.visibilityState){var t=+e.storage.getItem(e.storageTimestampKey)||0,n=Date.now();if(t+e.requestThrottlingTime>n){var i=JSON.parse(e.storage.getItem(e.storageDatasKey));if(i&&$.isPlainObject(i))return void e.setUnreadCount(i)}$.ajax({url:p,type:"GET",xhrFields:{withCredentials:!0},success:function(t){e.storage.setItem(e.storageTimestampKey,n),e.storage.setItem(e.storageDatasKey,JSON.stringify(t)),e.setUnreadCount(t)}})}},setUnreadCount:function(e){try{var t={infos:e.infos||0,referer:e.referer||0,messages:e.messages||0};t.total=t.infos+t.referer+t.messages,this.unreadCount=t,this.storage.setItem(this.storageDatasKey,JSON.stringify(t))}catch(n){this.unreadCount=null}u.updateUnreadCountView(this.unreadCount||0)},setUnreadCountByScope:function(e,t){var n={},i=this.unreadCount;n[e]=t,i=$.extend(i,n),this.setUnreadCount(i)},getUnreadCountByScope:function(e){return this.unreadCount&&this.unreadCount[e]||0},loadNotices:function(e,t,n){var i=this;i.scope=e,$.ajax({url:t,type:"GET",xhrFields:{withCredentials:!0},beforeSend:function(){n.onStart(),i.loading=!0},success:function(t){i.notices[e]=t,n.onComplete(!0,t),i.loading=!1},error:function(e){console.info(e.responseText),n.onComplete(!1),i.loading=!1}})},getNoticesByScope:function(e){return this.notices[e]||{}},clearNoticesByScope:function(e){this.notices[e]=null}},u={loadNotices:function(e){if(!noticeDropdown.loading){var t=$(this),n=t.data("data-path"),i=t.data("html-path"),a=t.data("scope"),r=noticeDropdown.getNoticesByScope(a);return noticeDropdown.loadNotices(a,n,{onStart:function(){Object.keys(r).length?r.total_count?u.renderNotices(r.list):u.toggleDropdownState("empty"):u.toggleDropdownState("loading")},onComplete:function(e,t){e&&t.total_count?u.renderNotices(t.list):u.toggleDropdownState("empty"),t&&t.total_count!=r.total_count&&noticeDropdown.setUnreadCountByScope(a,t.total_count)}}),o.removeClass("active"),t.addClass("active"),c.attr("href",i),e.preventDefault(),!1}},markNotices:function(e){var t=noticeDropdown.scope,n=noticeDropdown.notices[t].list.map(function(e){return e.id}),i=r.css("height"),o={scope:t};"messages"==t?o.message_ids=n:o.noti_ids=n,$.ajax({url:"/notifications/mark_dropdown",data:o,type:"PUT",success:function(e){5===n.length?(r.css("min-height",i),u.renderNotices(e.list)):(u.toggleDropdownState("empty"),r.css("min-height","auto")),noticeDropdown.notices[t]=e,noticeDropdown.setUnreadCountByScope(t,e.total_count)}}),e.preventDefault()},markNotice:function(){var e=$(this),t=e.data("type"),n=e.data("id");if(t&&"message"!=t&&n)return $.ajax({url:f,data:{noti_ids:n},type:"PUT"}),!0},updateUnreadCountView:function(e){if(!e||!e.total)return a.removeClass("visible"),this.toggleDropdownState("empty"),void $('link[rel="shortcut icon"]').attr("href","/assets/favicon.ico");$('link[rel="shortcut icon"]').attr("href","/assets/favicon_message.ico?1581387642851"),Object.keys(e).forEach(function(t){var n=e[t],i=a.filter("."+t);n>10&&"total"===t&&i.addClass("pl-1 pr-1"),n<1?i.empty().removeClass("visible"):n<=99?i.text(n).addClass("visible"):i.html('99<span style="position: relative;top: -1px;">+</span>').addClass("visible")})},toggleDropdownState:function(e){"loading"===e?t.removeClass("empty shown").addClass("loading"):"empty"===e?t.removeClass("loading shown").addClass("empty"):t.removeClass("empty loading").addClass("shown")},renderNotices:function(e){var t=d.noticesTemplate(e);r.html(t),this.toggleDropdownState("shown")},activeTabByUnreadCount:function(){var e=noticeDropdown.unreadCount;e&&e.total&&(e.referer?scope="referer":e.infos?scope="infos":scope="messages",o.removeClass("active"),o.filter('[data-scope="'+scope+'"]').addClass("active"))},resetPanelPosition:function(){var e=null,t=i.offset().left+i.width()/2+n.width()/2;windowWidth=$(window).width(),e=t<windowWidth?i.position().left+i.width()/2-n.width()/2:windowWidth-i.offset().left-n.width(),n.css("left",e+"px")}},d={sanitize:function(e){return"string"!=typeof e?"":e.replace(/<(?:.|\n)*?>/gm,"").replace(/</gm,"&lt;").replace(/>/gm,"&gt;")},noticesTemplate:function(e){return void 0===e?"":e.map(function(e){var t=d.noticeNamespaceTemplate(e.namespace)||"";return"message"==e.type&&(e.message=e.actor.name+" : "+e.content),e.url=e.url||"javascript: void(0);",'<a class="noti" href="'+d.sanitize(e.url)+'" target="_blank" data-type="'+e.type+'" data-id="'+e.id+'"><div class="title">'+d.sanitize(e.message)+'</div><div class="meta"><time class="timeago">'+$.timeago(e.updated_at)+"</time>"+t+"</div></a>"}).join("")},noticeNamespaceTemplate:function(e){if(e)return' \xb7 <span class="namespace">'+d.sanitize(e.name)+"</span>"}},e()}}),$(function(){function e(){var e=null,t=O.offset().left+O.width()/2+M.innerWidth()/2;windowWidth=$(window).width(),e=t<windowWidth?O.position().left+O.width()/2-M.innerWidth()/2:windowWidth-O.offset().left-M.innerWidth(),M.css("left",e+"px")}function t(e){var t={};t[e]=f,1!=d&&2!=d||(gon.info.current_user.id?$.ajax({type:"post",url:"/update_feature_state",data:t,success:function(e){200==e.status&&s()},error:function(){}}):$.cookie(e,f,{path:"/",expires:60}))}function n(){t("slide_id")}function i(){t("feature_log_id")}function o(){T.css("display","block"),x.css("display","none")}function a(){M.stop(!0).slideUp("fast"),T.css("display","none"),x.css("display","block"),h&&C.popup({content:g.function_update,className:{popup:"ui popup notice_popup"},position:"bottom left",offset:5}).popup("show")}function r(){if(0!=d){var e=$.cookie("slide_id");$.cookie("feature_log_id")>=f||e>f?d=0:e==f&&(d=1)}}function s(){$.ajax({type:"get",url:"/feature_notifications",success:function(e){if(200==e.status){e=e.data;if(d=null,null==e)return a(),w.attr("href","javascript:void(0)"),!1;w.attr("href",e.url),v.html(e.title),y.html(e.content),A.attr("src",e.image_url),d=e.noti_level,f=e.id,gon.info.current_user.id||r(),2==d&&(o(),M.stop(!1,!0).slideDown(m)),1==d&&(o(),h&&M.stop(!1,!0).slideDown(m)),0==d&&a()}else a()},error:function(){a()}})}function c(){h=!0,C.css("background-color",p),s()}function l(){k&&clearTimeout(k),k=setTimeout(function(){c()},200)}function u(){k&&clearTimeout(k),M.stop(!1,!0).slideUp("fast",function(){2==d&&n()}),b.css("background-color","transparent"),O.css("background-color","transparent"),C.popup("destroy"),h=!1}if(-1!=$("#feature-update-notice").index()){var d=null,p="#41485B",f=null,h=!1,m=150,g={"zh-CN":{function_update:"\u529f\u80fd\u66f4\u65b0"},"zh-TW":{function_update:"\u529f\u80fd\u66f4\u65b0"},en:{function_update:"Function update"}}[gon.locale||"zh-CN"],b=$("#feature-update-notice"),v=b.find(".notice-update-title"),M=b.find(".feature-update-notice-panel"),y=b.find(".notice-update-des"),A=b.find(".notice-img-show"),w=b.find(" a"),z=b.find(".click-knowed"),T=b.find(".bubl-on-icon"),x=b.find(".bubl-off-icon"),O=b.find(".notice-update-icon"),C=b;$("#home-index").index()>-1&&(p="#F0F0F0",C=O),$(window).on("resize",window.globalUtils.debouce(e,400)),$("body").on("fullscreenchange",window.globalUtils.debouce(e,400,!0)),e(),z.on("click",function(e){i(),T.css("display","none"),x.css("display","block"),u(),M.stop(!1,!0).slideUp(),e.stopPropagation()}),$(document).click(function(){2==d&&(M.stop(!1,!0).slideUp(),n())}),M.on("click",function(e){e.stopPropagation()}),s();var k=null;b.mouseenter(l),b.mouseleave(u),M.mouseenter(function(e){e.stopPropagation()})}}),function(e){e.fn.share=function(t){function n(t,n){var i=o(n);"prepend"==n.mode&&i.reverse(),i.length&&e.each(i,function(i,o){var r=a(o,n),s=n.initialized?t.find(".icon-"+o):e('<a class="social-share-icon icon-'+o+'"></a>');if(!s.length)return!0;s.prop("aria-label","\u5206\u4eab\u5230 "+p[o]),s.prop("href",r),"wechat"===o?s.prop("tabindex",-1):s.prop("target","_blank"),n.initialized||("prepend"==n.mode?t.prepend(s):t.append(s))})}function i(e,t){var n=e.find("a.icon-wechat");n.length&&(n.append('<div class="wechat-qrcode"><h4>'+t.wechatQrcodeTitle+'</h4><div class="qrcode"></div><div class="help">'+t.wechatQrcodeHelper+"</div></div>"),n.find(".qrcode").qrcode({width:t.wechatQrcodeSize,height:t.wechatQrcodeSize,text:t.url}),n.offset().top<100&&n.find(".wechat-qrcode").addClass("bottom"))}function o(t){0===t.mobileSites.length&&t.sites.length&&(t.mobileSites=t.sites);var n=(s()?t.mobileSites:t.sites.length?t.sites:[]).slice(0),i=t.disabled;return"string"==typeof n&&(n=n.split(/\s*,\s*/)),"string"==typeof i&&(i=i.split(/\s*,\s*/)),r()&&i.push("wechat"),i.length&&e.each(i,function(t,i){var o=e.inArray(i,n);-1!==o&&n.splice(o,1)}),n}function a(e,t){var n=d[e];for(var i in t.summary=t.description,t)if(t.hasOwnProperty(i)){var o=e+i.replace(/^[a-z]/,function(e){return e.toUpperCase()}),a=encodeURIComponent(t[o]===undefined?t[i]:t[o]);n=n.replace(new RegExp("{{"+i.toUpperCase()+"}}","g"),a)}return n}function r(){return/MicroMessenger/i.test(navigator.userAgent)}function s(){return e(window).width()<=768}var c=e(document.head),l={url:location.href,site_url:location.origin,source:c.find("[name=site], [name=Site]").attr("content")||document.title,title:c.find("[name=title], [name=Title]").attr("content")||document.title,description:c.find("[name=description], [name=Description]").attr("content")||"",image:e("img:first").prop("src")||"",imageSelector:undefined,weiboKey:"",wechatQrcodeTitle:"\u5fae\u4fe1\u626b\u4e00\u626b\uff1a\u5206\u4eab",wechatQrcodeHelper:"<p>\u5fae\u4fe1\u91cc\u70b9\u201c\u53d1\u73b0\u201d\uff0c\u626b\u4e00\u4e0b</p><p>\u4e8c\u7ef4\u7801\u4fbf\u53ef\u5c06\u672c\u6587\u5206\u4eab\u81f3\u670b\u53cb\u5708\u3002</p>",wechatQrcodeSize:100,mobileSites:[],sites:["weibo","qq","wechat","tencent","douban","qzone","linkedin","diandian","facebook","twitter","google"],disabled:[],initialized:!1},u=e.extend({},l,t),d={qzone:"http://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?url={{URL}}&title={{TITLE}}&desc={{DESCRIPTION}}&summary={{SUMMARY}}&site={{SOURCE}}",qq:"http://connect.qq.com/widget/shareqq/index.html?url={{URL}}&title={{TITLE}}&source={{SOURCE}}&desc={{DESCRIPTION}}&pics={{IMAGE}}&summary={{SUMMARY}}",tencent:"http://share.v.t.qq.com/index.php?c=share&a=index&title={{TITLE}}&url={{URL}}&pic={{IMAGE}}",weibo:"http://service.weibo.com/share/share.php?url={{URL}}&title={{TITLE}}&pic={{IMAGE}}&appkey={{WEIBOKEY}}",wechat:"javascript:;",douban:"http://shuo.douban.com/!service/share?href={{URL}}&name={{TITLE}}&text={{DESCRIPTION}}&image={{IMAGE}}&starid=0&aid=0&style=11",diandian:"http://www.diandian.com/share?lo={{URL}}&ti={{TITLE}}&type=link",linkedin:"http://www.linkedin.com/shareArticle?mini=true&ro=true&title={{TITLE}}&url={{URL}}&summary={{SUMMARY}}&source={{SOURCE}}&armin=armin",facebook:"https://www.facebook.com/sharer/sharer.php?u={{URL}}",twitter:"https://twitter.com/intent/tweet?text={{TITLE}}&url={{URL}}&via={{SITE_URL}}",google:"https://plus.google.com/share?url={{URL}}"},p={qzone:"QQ\u7a7a\u95f4",qq:"QQ",tencent:"\u817e\u8baf\u5fae\u535a",weibo:"\u5fae\u535a",wechat:"\u5fae\u4fe1",douban:"\u8c46\u74e3",diandian:"\u70b9\u70b9",linkedin:"LinkedIn",facebook:"Facebook",twitter:"Twitter",google:"Google"};this.each(function(){if(e(this).data("initialized"))return!0;var t=e.extend({},u,e(this).data());t.imageSelector&&(t.image=e(t.imageSelector).map(function(){return e(this).prop("src")}).get().join("||"));var o=e(this).addClass("share-component social-share");n(o,t),i(o,t),e(this).data("initialized",!0)})},e(function(){e(".share-component,.social-share").share()})}(jQuery),moment.tz.setDefault("Asia/Shanghai"),$.cookie("tz",moment.tz.guess(),{path:"/"}),window.updatePage=function(e){return $.ajax({type:"GET",url:location.href,data:e,dataType:"script"})},window.slugify=function(e){return e.replace(/[^-a-zA-Z0-9]+/g,"_").toLowerCase()},window.ajaxGet=function(e){return $.ajax({type:"GET",url:e,dataType:"script"})},window.getUrlParameter=function(e){for(var t=window.location.search.substring(1).split("&"),n=0;n<t.length;n++){var i=t[n].split("=");if(i[0]==e)return i[1]}},window.showAndHide=function(){},window.errorMessage=function(e){var t;return(t=$("<p>")).addClass("error_message"),t.html(e),t},window.split=function(e){return e.split(/,\s*/)},window.extractLast=function(e){return split(e).pop()},window.disableButtonIfEmptyField=function(e,t){var n,i;return i=$(e),n=i.closest("form").find(t),""===i.val()&&n.disable(),i.on("input",function(){return""===$(this).val()?n.disable():n.enable()})},window.sanitize=function(e){return e.replace(/<(?:.|\n)*?>/gm,"")},window.linkify=function(e){var t;return t=/(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/gi,e.replace(t,"<a href='$1'>$1</a>")},window.htmlSafe=function(){var e;return e=$("<div/>"),function(t){return e.text(t).html()}}(),$(function(){$("#my-dynamic").on("click",function(){return document.cookie="source=my;",document.location.reload(!0),!1}),$("#all-dynamic").on("click",function(){return document.cookie="source=;",document.location.reload(!0),!1}),$.timeago&&$(".timeago:not(.no-trans)").timeago(),$(".field.errors").closest(".ui.form").addClass("error"),$(".tree-item-file-name").on("mouseenter",function(){$(this).find("a").innerWidth()>=295&&($(this).css("overflow","visible"),$(this).parent().find(".tree_time_ago").css("display","none"),$(this).parent().find(".tree_author").css("display","none"))}).on("mouseleave",function(){$(this).css("overflow","hidden"),$(this).parent().find(".tree_time_ago").css("display","inline-block"),$(this).parent().find(".tree_author").css("display","inline-block")}),setTimeout(function(){autosize($(".md-input").not("#editor_comment"))},500)}),$(function(){$(".trigger-submit").on("change",function(){$(this).parents("form").submit()}),$("body").on("click",".captcha_img",function(){$(this).attr("src","/rucaptcha?"+(new Date).getTime())});var e=$("#git-message");e.length>0&&(e.click(function(){e.fadeOut()}),e.show(),"undefined"!=typeof flash_time&&null!==flash_time?setTimeout(function(){e.fadeOut()},flash_time):setTimeout(function(){e.fadeOut()},5e3))}),$(document).on("click",'.markdown-body img[class!="emoji"]',function(){var e=[],t=$(this).attr("src");$.each($(this).parents(".markdown-body").find('img[class!="emoji"]'),function(){$(this).closest("a").attr("href")||e.push({src:$(this).attr("src"),element:this})});for(var n=0;n<e.length;n++)if(e[n].src===t&&e[n].element==this){$.fancybox.open(e,{buttons:["close"]},n);break}}),$(document).on("click",".wysiwyg-body .gwe-image__view img",function(){var e=[],t=$(this).attr("src");$.each($(this).parents(".wysiwyg-body").find(".gwe-image__view img"),function(){$(this).closest("a").attr("href")||e.push({src:$(this).attr("src"),element:this})});for(var n=0;n<e.length;n++)if(e[n].src===t&&e[n].element==this){$.fancybox.open(e,{buttons:["close"]},n);break}}),$(function(){var e=$(".git-nav-expand-bar"),t=$("#git-header-nav"),n=t.find(".gitee-nav__sidebar"),i=t.find(".gitee-nav__sidebar-container"),o=t.find(".gitee-nav__sidebar-close-button");e.on("click",function(){n.toggleClass("is-visible")}),n.on("click",function(){n.removeClass("is-visible")}),o.on("click",function(){n.removeClass("is-visible")}),i.on("click",function(e){e.stopPropagation()})}),$(function(){function e(e){var t=e.find(".ui.dropdown").dropdown("get value"),n=e.find(".ui.input input").val();return{"project[name]":n,"project[path]":n,"project[namespace_path]":t,"project[description]":e.data("description"),"project[public]":e.data("public"),"project[import_url]":e.data("import-url"),ignore:e.data("ignore"),license:e.data("license"),come_from:e.data("come-from"),language_name:e.data("language")}}function t(e,t){e.forEach(function(e){e.disabled(),e.$importOperate.html(importI18n.ready)}),$.post(importArgs.importPath,{projects:t}).done(function(t){t&&200===t.status&&e.forEach(function(e){for(var n in t.data)4===t.data[n].state&&e.url===n&&(e.setError(t.data[n].message),e.enabled())})}).fail(function(t){Flash.show(t&&t.responseJSON&&t.responseJSON.message||"\u5bfc\u5165\u5931\u8d25\uff0c\u8bf7\u7a0d\u540e\u518d\u8bd5"),e.forEach(function(e){e.$importOperate.html(u[0]),e.enabled()})})}function n(e){var t=[],n=[];if(e||(e=r.filter(function(e){return 0===e.data.state||4===e.data.state})),e.forEach(function(e){e.$input.parent().removeClass("error"),e.$importOperate.html("...");var i=e.$dropdown.dropdown("get value"),o=e.$input.val();if(!o||!s.test(o))return e.$input.parent().addClass("error"),void e.setError(importI18n.projectPathError);-1===t.indexOf(i)&&t.push(i),-1===n.indexOf(o)&&n.push(o)}),t.length&&n.length){var i={namespace_paths:t,project_paths:n};$.get(importArgs.checkPath,i).done(function(t){t&&200===t.status&&e.forEach(function(e){var n=Object.keys(t.data),i=e.$dropdown.dropdown("get value");if(n.indexOf(i)>-1){var o=t.data[i],a=e.$input.val();o.indexOf(a)>-1?(e.$input.parent().addClass("error"),e.setError(importI18n.sameProjectName)):e.$importOperate.html(u[0])}else e.$importOperate.html(u[0])})})}}var i=$("#project-import-page"),o=i.find("#btn-import-current"),a=i.find("#project-import-list");if(a.length){var r=[],s="",c=!0,l={0:'<div class="not-started"><i class="iconfont icon-stop"></i> '+importI18n.notStart+"</div>",1:'<div class="scheduling"><i class="iconfont icon-task-state-13"></i> '+importI18n.waiting+"</div>",2:'<div class="running"><i class="iconfont icon-sync"></i> '+importI18n.running+"</div>",3:'<div class="done"><i class="iconfont icon-task-mini"></i> '+importI18n.success+"</div>",4:'<div class="fail"><i class="iconfont icon-msg-block"></i> '+importI18n.fail+"</div>"},u={0:'<div class="ui small basic orange button btn-import">'+importI18n["import"]+"</div>",1:'<a href="javascript:;" class="btn-cancel-import">'+importI18n.cancelImport+"</a>",2:"",3:'<a href="$url" target="_blank">'+importI18n.watchProject+"</a>",4:'<i class="project-icon text-red iconfont icon-report" data-content="$message" data-variation="inverted"></i>'};s=new RegExp(importArgs.projectNameRegex),$.prototype.getTask=function(){var e=$(this).closest("tr[data-import-url]").data("import-url");return r.filter(function(t){return t.url===e}).first()},a.find("tbody tr").each(function(){var e=$(this);r.push({url:e.data("import-url"),$importLine:e,$input:e.find(".ui.input input"),$dropdown:e.find(".ui.dropdown"),$importState:e.find(".import-state"),$importOperate:e.find(".import-operate"),needRefresh:!0,data:{state:0},disabled:function(){e.find(".ui.dropdown, .ui.button, .ui.input").addClass("disabled").removeClass("error").prop("disabled",!0)},enabled:function(){e.find(".ui.dropdown, .ui.button, .ui.input").removeClass("disabled").prop("disabled",!1)},setError:function(t){var n=$(u[4].replace(/\$message/g,t));e.find(".import-operate").html(n),n.popup("show")}})}),o.on("click",function(){var n=r.filter(function(e){return 0===e.data.state||4===e.data.state});if(!n.length)return!1;t(n,n.map(function(t){return e(t.$importLine)}))}),a.on("click",".btn-import",function(){var n=$(this).getTask();t([n],[e(n.$importLine)])}),a.on("click",".btn-cancel-import",function(){var e=$(this).getTask();e&&1===e.data.state&&(e.$importOperate.html(importI18n.cancelling),$.ajax({url:importArgs.cancelImportPath,type:"DELETE",dataType:"json",data:{project_id:e.data.id},success:function(t){t&&200===t.status?e.needRefresh=!0:(Flash.error(err.message),e.needRefresh=!0)},error:function(){Flash.error(importI18n.cancelFail),e.needRefresh=!0}}))}),a.find(".ui.dropdown").dropdown({onChange:function(){c||n([$(this).getTask()])}}),a.find(".ui.input input").on("keyup",window.globalUtils.debouce(function(){c||n([$(this).getTask()])},500)),function i(){var e={import_urls:r.map(function(e){return e.url})};$.get(importArgs.realTimeChangesPath,e).done(function(e){e&&200===e.status&&(r.forEach(function(t){var n=e.data[t.url];n?(c&&(t.$dropdown.dropdown("set selected",n.namespace_path),t.$input.val(n.project_path)),t.$importState.html(l[n.state]),(t.data.state!==n.state||t.needRefresh)&&(4===n.state?t.enabled():t.disabled(),t.$importOperate.html(u[n.state].replace(/\$url/g,n.url).replace(/\$message/g,n.message))),t.data=n):t.needRefresh&&(t.enabled(),t.data={state:0},t.$importState.html(l[0]),t.$importOperate.html(u[0])),t.needRefresh=!1}),c=!1,setTimeout(i,5e3))})}()}}),function(e){function n(){B={q1:null,q2a:null,q2b:null,q2c:null,q3:null,q4a:null,q4b:null,q5:null,q6:null,q7:null},R=JSON.parse(JSON.stringify(B)),Q=0,ee=["q1","q2","q3","q4","q5","q6","q7"],Z=["q1","q2a","q3","q4a","q5","q6","q7"],te=null}function o(e,t){Z.forEach(function(e){$(".step-"+e).hide()}),$(".step-"+e).show(),f(ze),s(e),l(t)}function a(){var e=!1;$.each(R,function(t){B[t]=e?null:R[t],Z[Q]===t&&(e=!0)})}function r(){Y.on("click",function(e){var t=$(e.target).closest(".portlet");t.length&&(P.find(".portlet").attr("class","portlet"),te=t.data("value"),G.removeClass("disabled"),t.addClass("selected"))})}function s(e){var t=$(".step-"+Z[Q]).find(".ui.dropdown").dropdown("get value");t=t.indexOf("-1")>0?null:t,e===Z[0]?U.hide():U.show(),
DesignScreenshot/output/gitee_run/gitee.com_4_after_login.html:470:"undefined"==typeof MX&&(MX={}),MX.XML={ToJSON:function(e,t){if(e.hasChildNodes()){var n=this.ParseNode(e,t);return n["X-Parse-Engine"]="MX.Util.XML",n["X-JSMX-Framework"]="Version 1.2",n}return null},ParseNode:function(e,t){var n={$attribute:null,$count:0,$value:""},i=null;if(e.attributes){n.$attribute={};for(var o=0,a=e.attributes.length;o<a;++o)i=e.attributes[o],n.$attribute[i.nodeName]=i.nodeValue}if(e.hasChildNodes()){3==e.firstChild.nodeType&&(n.$value=e.firstChild.nodeValue.replace(/\n\r*/g,"").replace(/^\s+/,"").replace(/\s+$/,""));var r="",s=null,c=0;for(o=0,a=e.childNodes.length;o<a;++o)if(3!=(i=e.childNodes[o]).nodeType){if(r=i.nodeName,s=this.ParseNode(i,t),null==n[r]){if(n.$count++,!t){c=0;for(var l=0,u=e.childNodes.length;l<u&&(e.childNodes[l].tagName==r&&c++,2!=c);++l);if(1==c){n[r]=s;continue}}n[r]=[]}n[r].push(s)}}return n}},function(){function e(e,t,n){$.ajax({type:"post",url:o+"/star_collections",data:{name:e},dataType:"json",success:function(e){200==e.status?t&&t(e):Flash.error(e.message)},error:function(e){Flash.error(e.responseJSON.message)},complete:function(){n&&n()}})}function t(e,t,n){$.ajax({type:"get",url:o+"/star_collections/my_star_collections",data:{project_id:e||""},dataType:"json",success:function(e){200==e.status?(t&&t(e.data.data),r=e.data.data||[]):Flash.error(e.message)},error:function(e){Flash.error(e.responseJSON.message)},complete:function(){n&&n()}})}function n(e,t,n){e&&t&&$.ajax({type:"post",url:o+"/star_collections/"+t+"/project",data:{ids:[e]},dataType:"json",success:function(e){200==e.status?n&&n(e):Flash.error(e.message)},error:function(e){Flash.error(e.responseJSON.message)}})}function i(e,t,n){e&&t&&$.ajax({type:"delete",url:o+"/star_collections/"+t+"/project",data:{ids:[e]},dataType:"json",success:function(e){200==e.status?n&&n(e):Flash.error(e.message)},error:function(e){Flash.error(e.responseJSON.message)}})}var o=window.gon&&window.gon.info.current_user?"/"+window.gon.info.current_user.username:"";if(o){var a="",r=[],s=window.gon.locale||"zh-CN",c={"zh-CN":{title:"\u5df2\u6210\u529f Star\uff0c\u6dfb\u52a0\u5230\u4ee5\u4e0b\u661f\u9009\u96c6\uff1a",tipCreate:"\u70b9\u51fb\u4e0b\u65b9\u65b0\u5efa\u661f\u9009\u96c6",newCreateBtn:"\u65b0\u5efa\u661f\u9009\u96c6",newCreateInput:"\u8bf7\u8f93\u5165\u661f\u9009\u96c6\u540d\u79f0",create:"\u65b0\u5efa",search:"\u5feb\u901f\u641c\u7d22"},"zh-TW":{title:"\u5df2\u6210\u529fStar\uff0c\u6dfb\u52a0\u5230\u4ee5\u4e0b\u661f\u9078\u96c6\uff1a",tipCreate:"\u9ede\u64ca\u4e0b\u65b9\u65b0\u5efa\u661f\u9078\u96c6",newCreateBtn:"\u65b0\u5efa\u661f\u9078\u96c6",newCreateInput:"\u8acb\u8f38\u5165\u661f\u9078\u96c6\u540d\u7a31",create:"\u65b0\u5efa",search:"\u641c\u7d22"},en:{title:"Starred, you can add it to collections",tipCreate:"Create new collection by clicking the button below",newCreateBtn:"New Collection",newCreateInput:"Please type the collection's name",create:"Create",search:"Search"}},l=function(e){return c[s][e]},u=function(){var e=function(){var e='<div class="star-collection-popup d-none">\n                  <div class="star-collection-popup__header d-flex-between">\n                    <div class="star-collection-popup__header__left">'.concat(l("title"),'</div>\n                    <div class="star-collection-popup__header__right"><i class="iconfont icon-close js-close-popup cursor-pointer hover-color"></i></div>\n                  </div>\n                  <div class="star-collection-popup__body">\n                    <div class="blank-message d-none">').concat(l("tipCreate"),'</div>\n                    <div class="star-collection-popup__search ui input small icon">\n                      <input type="text" class="js-star-collection-search"  placeholder="').concat(l("search"),'"/>\n                      <i class="iconfont icon-search"></i>\n                    </div>\n                    <div class="star-collection-popup__scroll">\n                      <div class="star-collection-popup__list js-star-collection-popup__list">\n\n                      </div>\n                    </div>                    \n                  </div>\n                  <div class="star-collection-popup__footer js-star-collection-popup__footer">\n                    <div class="star-collection-popup__footer--normal js-new-star-collection-btn cursor-pointer hover-color">').concat(l("newCreateBtn"),'</div>\n                    <div class="star-collection-popup__footer--new d-flex-between">\n                      <input class="star-collection-popup__footer__new-input js-star-collection-popup__footer__new-input" maxlength="35" type="text" placeholder="').concat(l("newCreateInput"),'"/>\n                      <div class="star-collection-popup__footer__add-btn js-star-collection-popup__footer__add-btn cursor-pointer hover-color disabled">').concat(l("create"),"</div>\n                    </div>\n                  </div>\n                 </div>");return $(e)}();return $("body").append(e),e};$(function(){var o=u(),s=o.find(".star-collection-popup__scroll"),c=o.find(".js-star-collection-popup__list"),l=o.find(".js-new-star-collection-btn"),d=o.find(".js-star-collection-search"),p=o.find(".js-star-collection-popup__footer"),f=p.find(".js-star-collection-popup__footer__new-input"),h=p.find(".js-star-collection-popup__footer__add-btn"),m={offsetX:8,offsetY:0},g={width:o.outerWidth(),height:o.outerHeight()},b=function(){o.hide()},v=function(e){o.show(),e&&t(e,function(e){x(e),A(e.length)})},M=function(e,t){var n=e.offset();o.css({position:"absolute",zIndex:"1003",position:"absolute",left:Math.max(0,n.left-t.offsetX-g.width)+"px",top:Math.max(0,n.top+t.offsetY)+"px"})},y=function(){p.toggleClass("js-star-collection--editing")},A=function(e){var t=o.find(".blank-message"),n=o.find(".star-collection-popup__search"),i=o.find(".star-collection-popup__scroll");e?e<10?(n.hide(),t.hide(),i.show()):(n.show(),i.show(),t.hide(),i.css({height:"120px"}),d.val(""),setTimeout(function(){d.focus()},200)):(t.show(),n.hide(),i.hide())},w=function(e,t){return!e||e.length<=0?[]:t?e.filter(function(e){return e.name.indexOf(t)>-1}):e},z=function(e){return e?"/assets/gitee_stars/success.png":"/assets/gitee_stars/add.png"},T=function(e){return 0===e?'<i class="iconfont icon-lock ml-1"></i>':""},x=function(e){if(0===e.length)return c.html(""),"";var t="";e.forEach(function(e){var n=z(e.is_endorse),i=T(e.status),o=window.filterXSS(e.name,{stripIgnoreTag:!1,whiteList:{}});t+='<div data-id="'.concat(e.id,'" data-is_endorse="').concat(e.is_endorse?1:0,'" class="star-collection-popup__list__item d-flex-between cursor-pointer">\n        <div class="star-collection-popup__list__item__left d-align-center">\n          <div class="star-collection-popup__list__item__name" title="').concat(o,'">').concat(o,"</div>\n          ").concat(i,'\n          <div class="star-collection-popup__list__item__number ml-1">').concat(e.count,'</div>\n        </div>\n        <img class="star-collection-popup__list__item__status" src="').concat(n,'"/>\n      </div>')}),c.html($(t))};o.on("click",function(e){e.stopPropagation()}),$("body").on("click",function(){b()}),$(window).on("resize",window.globalUtils.throttle(function(){b()},800)),o.on("click",".js-close-popup",function(){b()}),l.on("click",function(e){y(),f.is(":visible")&&window.globalUtils.getFocus(f,e)}),f.on("input",function(){window.filterXSS(f.val().trim()).length>0?h.removeClass("disabled"):h.addClass("disabled")}),d.on("input",function(){var e=$(this).val().trim(),t=w(r,e);x(t)}),h.on("click",window.globalUtils.throttle(function(){if(!h.hasClass("loading")&&!h.hasClass("disabled")){var n=f.val().trim();h.addClass("loading"),e(n,function(){f.val(""),h.addClass("disabled"),a&&t(a,function(e){x(e),y(),A(e.length),s.scrollTop(0)})},function(){h.removeClass("loading")})}},800)),$(window).on("click:star",function(e,t){var s=$(t.el||t.e.currentTarget),c=t.projectId;a=c,s.length?(M(s,t.params||m),v(c),o.off("click",".star-collection-popup__list__item").on("click",".star-collection-popup__list__item",function(){var e=$(this),t=e.attr("data-id"),o=1==e.attr("data-is_endorse"),a=e.find(".star-collection-popup__list__item__status"),s=e.find(".star-collection-popup__list__item__number"),l=(r||[]).findIndex(function(e){return e.id==t});o?i(c,t,function(){if(e.attr("data-is_endorse",0),a.attr("src",z(0)),s.text(parseInt(s.text())-1),l>-1){var t=r[l];t.is_endorse=!1,t.count=t.count-1}}):n(c,t,function(){if(e.attr("data-is_endorse",1),a.attr("src",z(1)),s.text(parseInt(s.text())+1),l>-1){var t=r[l];t.is_endorse=!0,t.count=t.count+1}})})):console.error("Target element not found")})})}}(),$(function(){if($(".markdown-body").length<=0)return;const e="user-content-",t=function(){return decodeURIComponent(window.location.hash.slice(1))},n=function(){return document.getElementById(e+t())},i=function(e,t){e&&t&&setTimeout(function(){$("html, body").animate({scrollTop:$(t).offset().top-50},500)},100)};i(t(),n()),window.addEventListener("hashchange",function(){i(t(),n())})}),$(function(){var e=window.gon.locale||"zh-CN",t={"zh-CN":{copy_success:"\u590d\u5236\u6210\u529f",copy_error:"\u590d\u5236\u5931\u8d25, \u8bf7\u624b\u52a8\u590d\u5236",blank:"\u4ee3\u7801\u5757\u4e3a\u7a7a",tip:"\u70b9\u51fb\u590d\u5236"},"zh-TW":{copy_success:"\u8907\u88fd\u6210\u529f",copy_error:"\u8907\u88fd\u5931\u6557\uff0c\u8acb\u624b\u52d5\u8907\u88fd",blank:"\u7a0b\u5f0f\u78bc\u584a\u70ba\u7a7a",tip:"\u9ede\u64ca\u8907\u88fd"},en:{copy_success:"Copy successfully",copy_error:"Copy failed, please copy manually",blank:"Code block is empty",tip:"Click copy"}},n=function(n){return t[e][n]};$(document).on("mouseenter",".markdown-body .markdown-code-block",function(){var e=$(this).find(".markdown-code-block-copy-btn");e.data("add-popup")||(e.data("add-popup",!0),e.popup({position:"left center",inline:!0,setFluidWidth:!1,html:`<div class='markdown-code-block-copy-tip tip-state'>${n("tip")}</div>`,on:"manual"}))}),$(document).on("mouseleave",".markdown-body .markdown-code-block",function(){$(this).find(".markdown-code-block-copy-btn").popup("hide")}),$(document).on("mouseenter",".markdown-body .markdown-code-block .markdown-code-block-copy-btn",function(){$(this).popup("show")}),$(document).on("mouseleave",".markdown-body .markdown-code-block .markdown-code-block-copy-btn",function(){$(this).closest(".markdown-code-block").find(".tip-state").length>0&&$(this).popup("hide")}),new Clipboard(".markdown-body .markdown-code-block-copy-btn:not(.success)",{target:function(e){return $(e).closest(".markdown-code-block").find("pre")[0]}}).on("success",function(e){e.text?(e.clearSelection(),i(e)):Flash.error(n("blank"))}).on("error",function(){Flash.error(n("copy_error"))});var i=window.globalUtils.debouce(function(e){var t=$(e.trigger);t.addClass("success"),t.popup("change content",`<div class='markdown-code-block-copy-tip success-state'>${n("copy_success")}</div>`),t.popup("show"),setTimeout(function(){t.removeClass("success"),t.popup("hide"),setTimeout(function(){t.popup("change content",`<div class='markdown-code-block-copy-tip tip-state'>${n("tip")}</div>`)},100)},1200)},200)}),window.ThemeSelector=function(){function e(){var e=localStorage.getItem("theme");return e=e&&["light","dark","system"].includes(e)?e:"system"}function t(){var e=["theme-options","theme-options-mobile","theme-arrow","theme-arrow-mobile"].map(function(e){return document.getElementById(e)}),t=e[0],n=e[1],i=e[2],o=e[3];t&&(t.style.display="none",i&&(i.className="fa fa-angle-down theme-arrow")),n&&(n.style.display="none",o&&(o.className="fa fa-angle-down theme-arrow-mobile"))}function n(e){var t,n,i=["theme-icon","theme-icon-mobile"].map(function(e){return document.getElementById(e)}),o=i[0],a=i[1],r="fa fa-adjust",s="\u8ddf\u968f\u7cfb\u7edf";e===h?(r="fa fa-sun-o",s="\u4eae\u8272\u6a21\u5f0f"):e===m&&(r="fa fa-moon-o",s="\u6697\u9ed1\u6a21\u5f0f"),o&&(o.className=r,(t=o.closest(".theme-selector"))&&(t.title=s)),a&&(a.className=r,(n=a.closest(".theme-selector-btn-mobile"))&&(n.title=s))}function i(e){var t,n,i,o=["theme-system-option","theme-light-option","theme-dark-option","theme-system-option-mobile","theme-light-option-mobile","theme-dark-option-mobile"].map(function(e){return document.getElementById(e)}),a=o[0],r=o[1],s=o[2],c=o[3],l=o[4],u=o[5],d=[];for(t=0;t<o.length;t++)(n=o[t])&&n.classList.remove("selected","active");for(e===f?d.push(a,c):e===h?d.push(r,l):e===m&&d.push(s,u),t=0;t<d.length;t++)(i=d[t])&&i.classList.add("selected")}function o(e){e===f?(document.documentElement.classList.remove("dark-mode-override"),document.documentElement.classList.remove("dark-mode")):(document.documentElement.classList.add("dark-mode-override"),e===m?document.documentElement.classList.add("dark-mode"):document.documentElement.classList.remove("dark-mode"))}function a(e){localStorage.setItem("theme",e),o(e),n(e),i(e),t()}function r(e){var t=document.getElementById("theme-options"),n=document.getElementById("theme-arrow");e&&e.stopPropagation(),t&&("none"!==t.style.display?(t.style.display="none",n&&(n.className="fa fa-angle-down theme-arrow")):(t.style.display="block",n&&(n.className="fa fa-angle-up theme-arrow")))}function s(){var e=document.getElementById("theme-options-mobile"),t=document.getElementById("theme-arrow-mobile");e&&("none"!==e.style.display?(e.style.display="none",t&&(t.className="fa fa-angle-down theme-arrow-mobile")):(e.style.display="block",t&&(t.className="fa fa-angle-up theme-arrow-mobile")))}function c(){var t=e();o(t),n(t),i(t)}function l(){g&&b&&(g.removeEventListener?g.removeEventListener("change",b):g.removeListener(b)),v&&document.removeEventListener("click",v),g=null,b=null,v=null}function u(){window.matchMedia&&(g=window.matchMedia("(prefers-color-scheme: dark)"),b=function(){e()===f&&o(f)},g.addEventListener?g.addEventListener("change",b):g.addListener(b))}function d(e){e.target.closest(".theme-selector, .theme-selector-mobile, .theme-options, .theme-options-mobile")||t()}function p(){l(),c(),u(),v=d,document.addEventListener("click",v)}var f="system",h="light",m="dark",g=null,b=null,v=null;return window.ThemeSelector&&window.ThemeSelector.initialized?window.ThemeSelector:("loading"===document.readyState?document.addEventListener("DOMContentLoaded",p):p(),{setTheme:a,toggleThemeSelector:r,toggleThemeSelectorMobile:s,getCurrentTheme:e,initialized:!0})}(),window.setTheme=window.ThemeSelector.setTheme,window.toggleThemeSelector=window.ThemeSelector.toggleThemeSelector,window.toggleThemeSelectorMobile=window.ThemeSelector.toggleThemeSelectorMobile;var aiLoadingTimer=0,aiSkylineData={persona_ident:"",personas_list_url:"",request_url:"",result:{expire:0,token:""},status:""};window.addEventListener("beforeunload",function(){window.jqxhr&&window.jqxhr.abort(),handleClearTimeout()}),window.Gitee.aiAssistant={aiSkylineData:aiSkylineData,getAiSkylineToken:getAiSkylineToken,checkAIAssistantExpire:checkAIAssistantExpire};</script>
DesignScreenshot/output/gitee_run/gitee.com_4_after_login.html:474:<script>!function(n){var i={};function r(t){if(i[t])return i[t].exports;var e=i[t]={i:t,l:!1,exports:{}};return n[t].call(e.exports,e,e.exports,r),e.l=!0,e.exports}r.m=n,r.c=i,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=12)}([function(t,e,n){var i,h,r,o,a,s,d,c,l,u,f,p,g;t.exports=(i=i||(h=Math,r=Object.create||function(){function n(){}return function(t){var e;return n.prototype=t,e=new n,n.prototype=null,e}}(),a=(o={}).lib={},s=a.Base={extend:function(t){var e=r(this);return t&&e.mixIn(t),e.hasOwnProperty("init")&&this.init!==e.init||(e.init=function(){e.$super.init.apply(this,arguments)}),(e.init.prototype=e).$super=this,e},create:function(){var t=this.extend();return t.init.apply(t,arguments),t},init:function(){},mixIn:function(t){for(var e in t)t.hasOwnProperty(e)&&(this[e]=t[e]);t.hasOwnProperty("toString")&&(this.toString=t.toString)},clone:function(){return this.init.prototype.extend(this)}},d=a.WordArray=s.extend({init:function(t,e){t=this.words=t||[],this.sigBytes=null!=e?e:4*t.length},toString:function(t){return(t||l).stringify(this)},concat:function(t){var e=this.words,n=t.words,i=this.sigBytes,r=t.sigBytes;if(this.clamp(),i%4)for(var o=0;o<r;o++){var a=n[o>>>2]>>>24-o%4*8&255;e[i+o>>>2]|=a<<24-(i+o)%4*8}else for(var o=0;o<r;o+=4)e[i+o>>>2]=n[o>>>2];return this.sigBytes+=r,this},clamp:function(){var t=this.words,e=this.sigBytes;t[e>>>2]&=4294967295<<32-e%4*8,t.length=h.ceil(e/4)},clone:function(){var t=s.clone.call(this);return t.words=this.words.slice(0),t},random:function(t){for(var e,n=[],i=function(e){var e=e,n=987654321,i=4294967295;return function(){var t=((n=36969*(65535&n)+(n>>16)&i)<<16)+(e=18e3*(65535&e)+(e>>16)&i)&i;return t/=4294967296,(t+=.5)*(.5<h.random()?1:-1)}},r=0;r<t;r+=4){var o=i(4294967296*(e||h.random()));e=987654071*o(),n.push(4294967296*o()|0)}return new d.init(n,t)}}),c=o.enc={},l=c.Hex={stringify:function(t){for(var e=t.words,n=t.sigBytes,i=[],r=0;r<n;r++){var o=e[r>>>2]>>>24-r%4*8&255;i.push((o>>>4).toString(16)),i.push((15&o).toString(16))}return i.join("")},parse:function(t){for(var e=t.length,n=[],i=0;i<e;i+=2)n[i>>>3]|=parseInt(t.substr(i,2),16)<<24-i%8*4;return new d.init(n,e/2)}},u=c.Latin1={stringify:function(t){for(var e=t.words,n=t.sigBytes,i=[],r=0;r<n;r++){var o=e[r>>>2]>>>24-r%4*8&255;i.push(String.fromCharCode(o))}return i.join("")},parse:function(t){for(var e=t.length,n=[],i=0;i<e;i++)n[i>>>2]|=(255&t.charCodeAt(i))<<24-i%4*8;return new d.init(n,e)}},f=c.Utf8={stringify:function(t){try{return decodeURIComponent(escape(u.stringify(t)))}catch(t){throw new Error("Malformed UTF-8 data")}},parse:function(t){return u.parse(unescape(encodeURIComponent(t)))}},p=a.BufferedBlockAlgorithm=s.extend({reset:function(){this._data=new d.init,this._nDataBytes=0},_append:function(t){"string"==typeof t&&(t=f.parse(t)),this._data.concat(t),this._nDataBytes+=t.sigBytes},_process:function(t){var e=this._data,n=e.words,i=e.sigBytes,r=this.blockSize,o=4*r,a=i/o,s=(a=t?h.ceil(a):h.max((0|a)-this._minBufferSize,0))*r,c=h.min(4*s,i);if(s){for(var l=0;l<s;l+=r)this._doProcessBlock(n,l);var u=n.splice(0,s);e.sigBytes-=c}return new d.init(u,c)},clone:function(){var t=s.clone.call(this);return t._data=this._data.clone(),t},_minBufferSize:0}),a.Hasher=p.extend({cfg:s.extend(),init:function(t){this.cfg=this.cfg.extend(t),this.reset()},reset:function(){p.reset.call(this),this._doReset()},update:function(t){return this._append(t),this._process(),this},finalize:function(t){t&&this._append(t);var e=this._doFinalize();return e},blockSize:16,_createHelper:function(n){return function(t,e){return new n.init(e).finalize(t)}},_createHmacHelper:function(n){return function(t,e){return new g.HMAC.init(n,e).finalize(t)}}}),g=o.algo={},o),i)},function(t,e){t.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADYAAAA2CAMAAAC7m5rvAAAAV1BMVEUAAAAEBAQBAQEAAAAAAAAHBwcDAwNHcEwAAAAAAAD09PS/v7/8/PwBAQGcnJz4+Pj9/f3Pz8/////x8fHS0tK7u7vq6updXV3l5eXt7e3e3t75+fn///8na/+JAAAAHHRSTlMCCxUaBxAeAAEErVTgJ0TI7zb1k3QlqCt5g0vUK9r+DQAAArtJREFUSMeVlouOqjAQhumNpcCCgoi4ff/nPHNpC9ICnklMMOFjOte/xU9qVVEs7WiMlMYIbW1RVftXiixmb849pVIACqGLlEuwqgJKjw64siyVRH8pV6RQYa0WNXK/v2XJ3DnGlBbCyA8O3J1gDBGlyqfnlCR3h9jqyjTLs4esMAfuTjDOhRbmPrYuWneNkaupdlu7wpgyy4Av356PpvuDhwcd8jg2piZ81dUNVGwOlDLHKWHqjkH1CG2oswIQdsfkvbA3lKdim+TLTdQEvm4NdRQV+7FtrmxPQsG06IHq+FUDX3hI5UfgsJVD9zbegXjXb4Mm8hRj6GwKcdGsYIeR5amAWQ3R9CEYGE2LJPzyVMD03R8RfcE84/SgFXmKMB9ZvclctCpLRayNzqhKG/scR28egzPegjM+1h4Jk8VnYEwv6xmT/tstDI6YsZqbQubadjf7nF78b3VPofkz/hxgPPtYVesxyEh3jdnpNQmDoMdgOOcLDFvpz7XUcv+FWePcIGlTf39ILlPLG/77lEC+39C3SqmAfVMAbKUXVXeDXZcbMBSGZYtlmiuttRa3mIGDVs5QFkNr8duhALvBSWesomUDZxzDK7kx3XPUjeLtNlXKLYUd55Woj3nknuQVNKwriLnqU78g+0N0drDwNG+RiicTGx+POK5fza5XGg6/UizpKy76fs1Zfpkbmg5v8GjeQLXzKgkf0jHEFStpI7PBI8S1BoZ1PRAqJYkkkw0c37XdGnbEgiz2URZxQMgaUuV+3lKJCI8swjWI8Dx3zaOmC8Mw0ncidSn5ZHVXhvuXb9irCwYENXqINMW3Qf46c1/qvh2Gtq+XTikPbZvn4PKEl0kpmfDV+BCt7FVNc7WiiQhVJxdDWtm+1CypOvTo6TWUFEJHC/JYXVx6vSBFQU3VsTgUJR6aVBvJ/gHQeVzeaHqlAQAAAABJRU5ErkJggg=="},function(t,e){t.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAXcAAAA2CAMAAAALbSmxAAAAQlBMVEVHcEzW2O0FBQUPDxAEBAQEBAQBAQEAAAABAQHZ3PHKzuCussK9wNLU2OyIiZbW2u+bnavQ1OfR1ejS1uq8wNHIzN+f90J/AAAAFnRSTlMAuhMcCQ4XAQW3aT9lrDK0HIaToFJ8MqDAuAAADqZJREFUeNrsmteCnToMRcGUAzaYZv7/V6+qCyW5mWTehpdkOCDsZVnaElTVy/GBY4CjhaOTA//f4skBf/1UP8e/Pj6CnZkbPBL6H/DfiZ2pGzdtx7zU87GfwV/J/5D6BuxA3Z1LPdZ8jHAcdv0B/63cEXs4lPmyb6c9t2MZx3NV8D/cv8Xb102oH5Pvewnw7pxH2/6A/4ZsKqHdzYx9dw1Sj0m1C/O+/nD/59RJJgL2hbDPoUHsqiHJ0dft+AH/LdDb1jP2wwt21e3449CGPaXWH3T/Qq8P7NOGM+rRAHaiPsSDXN7ZtxCvoepzO/H5y+D3+cvbr0au5z5/cDzbfZv6+0SuxenEQaZB7oCdXTtih3Vwa/cE/jej+1tsX749VnovlH9HXXzu8fzLulS/InEtTttudc55P1NK9Ql7ukKaBr6TbXBf4DSY64m/CH9fAp8zG4r+RobzRje/dng6Pi926WS5kOWylC2WVJyGbR7pIOwnR5k2p65NA2kcXMjnw7lN5kvgLwa/VHUPSRJEM7eRXa7MImtbHnzH8GT3berPJBTqagW6cvc37N0a7Lbv+zmhuIyRP+euGUAfl/7+CveE4wtJvPAWkcEFhTYvRIorO/2pzduCWZPkwa6qjstCXkm0rcxETk1Qi44zEHUuTDslVSQrl+E96xTrV4j9pxfyGRG5MJtOcooviZ/S4J8ZiM2OrLGnZrKf8pHKlQX77rLFhfKD3ctCfsq/40LxEGRq6wHUN6e2zXrWJ1ZLCftql0Rd4tAV/KcK1tqQpjN8Vjhh1+5X2O5JM8t21Wp3bgqxgccc+5h2ZdhhO+Z63s/AJbeCH1ocmDdxAjhyOYLzzMHeDy/rcbfbooUuPQEtTvHv4ePg5ykOoSJvh+J0PFxaakycLtng8vWCndS9gI+ZYoXlW7xJ2tPCbVs23z890MBYTOe3Ci/HjrtYR+v6BH4YAoZTGz1n2PL5jTtebGLITQdT6Z7sgoVZXI5GvgPT6ODDgJ5d+15CN3F32O9KW6bMIhSFLD/m4Dhkdwk2GXiZK2LajW6VwWHw8vrXu0LLfyzzDw53z13gpukupyJ32Gx7Ae5M+1M4z5rChs92YYxLkiW7yB0Zod36ardD7ibFiA9yN3HqjixNjYCvYAgr+PJkdLtcRVPEvlgM6dQiM94uUlhxDlB1NuDTxtAz+LYFanXQPPEswQo1dj+HCzkVtVv+zutJ4UV3bwnPZp13YcPhTmkkK5MLETxQWyY6zo1ktOv7SYILtqn4N4wznXm0S9x54uwhyD3tp5MeeOjzMDYc6O29uRSmQ1JHE96ze9IwGor8LlpTNY9MFic0e76wxRu3TPlc2bYPwu1yqrVbSJp1+NXluWpCF8AlW1yPQwRPmYmlYoDfZpjBro6D3KlOpIsnrhpluh7R0m88EJzVza4R7opjEO6yrC1kx01EIg6hoiHspjcvQRhuCYj9vDbIzM5iUx1eY6pV1qZb4WGLrsEzrItCu52iv/MAWGq3QuXlahM9YMYY18uwOw/BdNM8itH2DDz+nkwrd0Z9yk905zoKd/YftitCOto1ZgOHSxqPdptwbymd1P5IjloNAGd0fSZeiqp2oOgPu6op3Xag56eAFWc7UGxxFJCwgx/4vnVdBVaF/0VadMr4MIl8wPpgNXQquKTP4DINge0KGjfEyweygK8i4/VDSjUUoUKvw247+HtZU96pXbMQTyYj3AWmg5E70WuRe8+xEx0rNFe76O+yRzr2oH1McRidf2+mmFHaCoe39ZlUvypgXF7CblKUll7xmAWsTxQROCcaAPrTzoPHsamXikDBU8ZxR2Lz5Ga08zhzjJvQxnwkAsltnOZGubyj0H9Kw7o3mbbC6A7+dCQOICmh4nPsOejd8NuZMpT6uwTSNbkUrDY8dFJvb9/sCvdGU1uXcUcTY2g8ZRS6sxpm9grT3SQ2UezQffem2BAagLCO8nmAT5HGwgiA6eIbJbqYNG4LTPFUWLQMI5LI/ayLU51wh/+FpC4WR6uJz9lzAaJFScWJZpyyfZ8XYLjHgaSryaujCiz9PaivMncx377Yjdx16TAOR+44WfhpV0dsK5xXk9LwrfBAvXU0+YbQOMQyx925U6Tx6E1xuMydwSN3sGf5ddY0baLFesNq9bAsVDkzEHccHv5n2W1WTBtahuWc7KGXd4k7Xu8yhxpSy4IylmfP0OovxXdqyNbJo7IVVGn8ZLdV7g1LvsQdJg3OfUIiDmq2q6xm4RikC+xB5MktDmlECXli5btQq9a7q1UuCHcxUnCnsEmSoNFT1I7rJ10Lp9UGgnEG4/Wk2xWx46sZihiwxdJIYBSBb5TsU4pOjLaAocEHCurInUQK7MNFpfaF+4td4r6c2THLCwwOluCgcCw0TLi3OnEID9ylTMWc6p7CP4V+zqA59xRpFooy2T574L7RRAkkZjHLS0Vzx7CN08PlI8ffjwXCE3JHN8V428dmNZ3asxTPabXuI5+iA8n+AocoRFXfzsPhbmK/5P5il7jfKnrmHhe12TSzVhurnb7krt8UZJLllnWZe76780hT15lYGG7c2dccM/YjVzCWKxni4DGoAlDhztufsPcYJmlXZMu0jdrIoxQPgzj5kTqxnLtEW7jz4D1J26lEtqUIXnJ/sfvOnfW0pQc6mbRB7kvf3OFF7OcLdokz2WQz8I4qrdjAT9y7yH2iPU5ZyIhgsHoKGcOzUeyW3BsoEUNgWk1DwYWvt2Ndl9wtD+4WZyAFziPttIYHQZvSlNTmKXvBeff3u12O71Lx8nEwd5jfJOmEM8pG3C2fS532rCN/jFEIPmhMrrj6K3cW8RQmaJeRpr5y5ykvqh+YO26BJerkfSS4kbvp/LlEMMpdokQnuz/jnsfhoWiABw0zHGi4IkTuBx37aUOTNS9L7p83u13Kq4Wegb8OUpSNJiLEXaEZqUXbsmVP2Knk79KaFNF/p/FcU4NIHXVdLcsz7nXOHU+NJOuQ+9wkQU2DTdzPvBmVuLPVO/dMd3BDEMssrLOuIYXl41bnaqTLmvXveqa0m3Qkl8+Ru7v01tBXKu7cNk2mR6UcReyLby4KMsUhlC3LNbyrw9NuvHGnIZXcjXLvf+3vPVqcsTfu/Xbl3t65U0v67PvUCkMxZ6kmugTikHOXiJa/iSq5v9qNdZP0NKRu6qWyK6J+X6Gm0kicdz3oe7HFFdjzV7bs7jZViVWRcpm7Zh8WAVwmYCkYufcF9xhtH+K7HyUow//3/8GdWjDiNp2GF6rA8GOJOR6amzd1/LyX9Hng/mr3pU/Qo3hc4vMWnmNFcVAEnVrqOE89Yk+BKKA4kjL2Wuhq9tEfaWxJIE4591a5X/RMneuZJkjCaHpSwZG78Lhw10BjdZNBvD1QuQEfyXc8ml4D7lbn1Ir30SX3z5td4p7VsdQXk3aJS6UBZ5SKfqcub/oO0jiqvmdXjmMoOriO+mkm1eYv3Ck1OepPoK/6OuPe59xZx8/P+r2Hv5eeR2/rgrsWZlfuNDHLzWvQTBsvpHGjqH/pCEj1RtzzF5dxcyt32djPdvN+ZNkHxt2pk5J0u2Cc4cYXLAKJafi1QZ1Gr/H6Entq5cK/+OLPGvMgdWIzMHGnYDvj0ja7lqnM3WTcKc681Kv9pCUfX7VL3aQ88Hmx25HJXP6uFswcavCkxoM2pymeIR7knquU9AIlcae9y+X41e69//4R7l4erO1LUlM9xmL99HfeTmvPIyqGrAX50Q/FtAse5NVg9/TKWrnHVaFqY1w2C8XzIlEZk6h25sXf0ZGP+jjDeenPGP53OZ1DWazFKd1mtCAeoxeo4ArcR5uh1KUZoT1sie19iql0p1PuyUA2F+JuYkB9thvfN3Xl+yaalIsv4ECv0AC43j9u72/nkD6N/FTDZ3OdvH+gNummQ3n8UkC4r9kHCfg0bthi78OyPoktSrGGS+GPx34kKXRpRk6TzJVvozEw9y51LO5v409KRsgsmPRyjfqLmyHuke0j9wj082SXO2txCOn96iyvWWPgQHaex9ddPtJYzviWiN0VyJxOXq52bgOIc3jFHrl3XaotVn5xvPseuUsfuGzJwynUkTs60VL032mxw0wWDoeKZDeG++/yngmflz5OiRVGZ8WlYs8e1Uj2qRvnv2U1RK27JysJklP2ScOT3TZ+TxCv2uh7AievG9KL+f/aOdslB0EYitJZralYqwXf/1VX5CvEoLZbZnbGOv1lJUpEJMm5LntEhJKC05/6J3odYtxv5qFuepqRe5uGUPTk0BWR4kY26yBNWSiSQWZyrZJ6nfX7vGbXPQc31FLbYhMWF/pz4PMlzJOpUdlWyzCo/ISJ8SJcWmQWCaQvnN0KCKIV1ZDYsM2fz/sjXFfPhtqu070b1TVGnXCIN99WC/xEYyxeVxEujimdkpKrz1ddMZkVsCvzYwxgcI7AawS+C6hXcmWrUvoaimI6w9ilR7GG/X6MpQYgLYUJ7Ry4TLkP8zJpJT1iFydlL4PiGyFbfKVl8E3+gIFCM1gqMYgoRUSHQMP6PW3C2W0gi+SuPQGRVpar4n5wuwm9LqGmngxGnjZdUccb1AzSPOAsDuJtANJ+8Vx0sxKSpxIWcofS2Bvy2PLaNmOXXkLesNsfTAspXahK72C1JLlQGE3i6ENyAZZMJjFwg6qBsIOXHWL1xE6jnMxjV/qwezEZIUNsi2yPA/dALqCCTx+FpM/uRwqaN2Qs4JY4b8OUjNcOHLjtda4vnN0DPcZN8XJJaeJ4+wBMQYbgonqGRnxFgJH9T8iEqD3GDr+g1SklO/2rjUHhIe8yZFJdovqDzgAflyujd/+JBH3D894OCQ8n/QKyixn6QqNH+GXNuQSay3ATc9w6aumSAbL1Ag/V89W+Avp8ONknJ5z6zMg65sBIqfvjdnFJCKV/KD9ZUqVf6HH6344HGPR4QwKz+5KXwbRw8c8jnEx+H9GnWup2GsdxanWfkUyW9fxZxfKQiAe3cwLf7XOOB7Smqb6fFCuw/QK4hFJoJgmn4wAAAABJRU5ErkJggg=="},function(t,e){t.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAARQAAAA2CAMAAAAxvZbCAAAAS1BMVEVHcEwAAAAAAAARERPZ2vDU2OwHBwcAAAADAwMAAAAAAAAODg8BAQGytcbN0OTDxtnS1enS1urV2e3Iy960t8iTlaRvb3mpq7vO0uWmqkiCAAAAGXRSTlMAFBAOuLsLAgUHEh0YPIJfl6Suc1A8KR+P56WgUwAADiFJREFUaN7lW9m2rCgSTUVTVBAFp///0o6JQc2sW31Xr9UPSVd1naOAsIlhRxDn9freuk7rvn9DU9jwh3ff91p33F6/12DXBImq6wFbXdcMTIblBzFhSKyb5sU3fpnDujEsKC0/iQpi8n7byTdNC63htoRDYPlFVAgTOzMibevPKYQwwe/NdLwLVH4Nk+MUSBa3mapCo6KUDb5xqtCgX7KwureiOOc2GlMN0cq+lfPz8VuiQhtFR2xbwsSv44iQJH/c990xASr/W1Hpur/28v92aPeX32BAAJH+fbQkJstOmKgICDXduzk75j8t4dn+qcu/m6H7w9g/jP5jl7vW9MTW1EKYzIQJiAkiwA3f99q6gq58Rffeym9eV5FfX1YThzynuI7Un7ZyHcJLz+fID/Mc+cih3SBh+lo70h2Uk7GqYf9pNGMGvvr4BxcU0X20clPFirn3RfDSFPo2VZoiH1J8eqOdtNL4TraWqETx1dg1NvjtRl/fx2bttnkSlI3kJM/EkABmwHGPWn1DJXZ8tmJNcTf4oyq4z4U5itLeptDFeAk/+hso8XjjCK1jpJJWoBNq7xTIxGimnEatyNWoISYTyIkBe9InZHEwcv6qIhdN33jCwj0Ju7KpAsXufRwqLhjEMqT1xuWoyfKeeMF5Cv6kPngvwJzsdWzaDK0UhyB48I0Ffi+k3tmMdIxkJJxReZojREQElE0wERnHjR5rOM95npxlP63iNktM3qtbP7UtH9QrRCDgAYJS1/IyLmdqmlnVymLbcuMv9nrylg4XQcGxfRGkdsec2sqO80B+seKKYTh1g4+uiPU6P9pWJ/rqEJIFtmvt6pDKzsZcMTnwsVDc1oeNYIn7LEA5ms/NZQx1ICBqEl8EBU5IlaJtG3q43+fgD2qAzB94uggKH05hrmw+WWcIlYliFHak1PNYaEHD4EoxoNbYIdJXYvAwP0XDdb2HNlR5oSRIbTESW0BpSetJoOgvoLRuyIIVGAhCBUGpyp3BcjzuoXqA0rJw0p6WHZQYQTGGxyYvZPM2+SU88AERSqi8aMPhKyh0MLCIeWOFUqzG1rI+iu3GHldM0DsVqBSSMoXpU1tvklKxpL0RFJTKKHW6VxhhwH6qfbm2mUHpNaJ2wqAZtNwIKtmjqkPt4DkDvaxIntzo5TfGr1MTobJbadB5RgVd7V6jXWRhjbaTLbIYfwafTpOcdGD1OiMq7J4+2H5VmK5kwNKEJCmGzZJyTYs/CyrQgU7R0esBDQdbdjLuLFswPy15HBc2fSZybvFXaGWNgVXCAo1ZUexGB7seEyrQB1CZRDHgC/D6HEfmZbgHhN0lf8Jol6RA9wEx8WE3tFLoujtGBW1xfbf9H53Pxf1oAQW3PSAoY2TO8FXS90ne8pIzskq8KFCpc4+gSHSGn6D34JQ8rBVe4qsNZMSO1HeKGk/c4pxqUg30briKM64CBAXoK8oJW82CSWSzR3Jy7makZfIs+9yIXYFZSoYhyanPoIiosKTwbvCMgmwMemhSVMBkHwWVh7ip4zj23e3QUCf2spFCvn3jQVLo0EbEBOcft7jeOjtiWRXxVQSF377o1GZTVaUTvxDpfkVMpuiEk3M/EZWsQNeEnarjGX8SFfzmEm0N2IUlWx3yFGBvzOndSBozDIX+YA97M41tToMFWiKY+rkyOykEYoLYjKRArYu6JjymVpnEn0YcLjsLSpgk639jp5YwMSbJt4RAFCDRRzIot7zu3awIKroLD6tN/gzX4NBXVmaF31fDqCAehvSJ9vwRFJmBDg46TJXZUF0Qk3Y5uTElNRXT9m0jkO15OlIfAaVGUAIKKwlK/wx7xT02ZzRRBZfAxcEhRP0R12NT2xLrSo92saVspO6tQVCAaFlYIyrGZHzx1rf4G7Cxt/Wp4fPyl0DivJKdBlgdYuLPNMWECSJTTZJcJQSh88SE5Yw6/NKw51V2/MSk65E0Ntlsl2r1BmOE+iNDaUA8xQ9bbhN/IxZ7fuC8JErwbz2AToGtbB8sYo0aDMCROE2kGShEVYigIF01qC0rYOs3lzjESF0yKILghN5HDC2KCjEd2vLNsxZ8uyFCclcvNsDk++sHKDc5SKSWhY0kJeTdJHtR+BbY0Th+BCVGcQALMjKeBtVsYt8+DAENAtGU0WGon8zwaBzy2oBs/gJKZeCLcwwlMAhYjLlaywITdDz+gkkhRYjAehnb2cy0SJuvbRXq2X0BRUjIGzFBEcCNHPA/cjMrbWuINA2xAw9oeRYYDaAwCxxOPOfxZHfN74mwmB3/IXJU77zvYVjJAJkkTnNVv8j3fAQlGVn7CRMUFbTR9iopHDgiG8J9OFqQuW4bbcr0AIWiHxYjdECZlClyFF4ISSVWiZI/itR33EamKROZEphpaTycOHIYHAN42Bk3YYz3E4MCbl2E4SMo0zdJiTEIhgzmAyYCysYGu4j6s2h7oR93Tqu7E4n3eIeM94skX0DhTCi02jfpQU7vYExjVu93JjRTw+FNnRXOj+sMGr6StUF/5IkmY+CcQSHX6tAiYwsDgdKKf36wdeSWMCKz1qskkRztRgzt9f5Z7WBZHWe9a/bQbDIoG9KjRl8D9iBESROhFVAo1CdN8QR/Xkgk2icS1YVZZZSUPZshAAXxAMqCCKzke9gqXSSFQRGaPyhUn2YbzW3fHBgjJuR4cJpnLgkNzsyqpct8NPH8QLE6n7U9UaFy7KP7JdtO2cAkUoBGrpmWSzoH5mNQqpzzws+Q49zYzQ5kStDCVUeQhnDtJLA8H0fKjPRNUkYBhV2y48iqzJ3E/AlmVfz+MT/AoMx0NMNN8wiVo0meHk2EY1Bi6KOyQ2kSKDwR6qSrMfpNtBBXI6AUgkKC6qGT43CW8girBJnorw0ExsBlaapAzmyhQJk2GkExVSkpkbwdtPNswmJO901y4rcPzjjROrRzOUVx0bxThAgmRVLSHkOZDES9K/JpWyBQaMv6dVpyK1sRQHQCylV7Tokb0QJYAoV9goAyMigUWjGhAezj6esIiikkRVh7/8LjFsFJSQlUYr4htE/SltXrlOzQneFIuLQlEgyfOKtiIta7HNxiiDqlL4GQqjkRoG+gsGek9e0L0oaqWuI3Fd7vzoEjwg1TBmhU+KcrKDslFqKkRIfz0msjpKCI95Ti4OQDJjkZvqL05pjpQoN9zJfQhJYypGkqOmNJoXA85mhh0WJojP3bUlv0AxTyAi0LYw3zL8dQeTH7jioBWgRl5pTBTv8XJFTLoGwAGgoR+JILKJ0mDzhv+eDqYaN6g6w7+npTgyzhjRer6wdBERq8jCmsRohRRZk2a1oQar9J7PQKSoegXDB42BTN4ccmuE4BLXmLfhQ+KXbKjWw70Z6Y0C5bab0JFIiMNtEsMbSiPpxjwlhqE9IArp3vTC+Y3K+3QL1aVyQcbspDTDOpB4V3aT2oPX7MqTZK7JWgkAm3GZTsfdIDzJtxpEM+DZAf9kjcUZumdUdHjNu15JR3VqG4CDKIlEq4gkKmldi6FBj4k4pQxC2cF3Kvb7dbKycvhvrJ/ilNlPnqvuH1AF2Z8NUa7TAUk+sCFFYOBiVKob6DIon2WQ6W82ioRDyJWw+KFzfJLoUVU4ZjTGZV0SU3dDF8AUUCQry7OpZHIO/XmA/mZeLdVD3E7B3WrkB09wGTV/dCTM5921YHCC/Z+Z6izxRPbaYqrCaCAjIKhyR2la4uuAfpqvJkZHiI5uzcskciRqAMTGixC9mpoVolXCQnk2IhVGIQSMeZs/EGCllWtgHKXe8vKB0rkhmJxWQlp6osRs5+LZ1s4XrsNUYuflsJFMoRTXKnQUM77eRJdDZaQOHwETaJ/HhLNpKvcSIm3AMFpd2y6EDIB5Z4XfNtApIhaI67cHJ8nWewNH5O/4F2xnsfvumKR7re7v+Y0Ld+CgEsO+0z7JGi3m/835dYH+Gbp+BWTDqOuB6i8Xu+/YqgpCcRFJHDcMJOlrxjsoHQf4wGDeTGLzPpU7JTdp5m7IYe55bbmSoRV28xi/JM/CxDcSmxWwdt3SSNXtwUkzspTt6HI4UyzwTmTKj45UQs7DZyNIhGiJIhlu7mar7VuoBS30DhJcTrKi8Kp/ED3g1ZUN+xx1bFazG5kHMmNPeUzMQqp2Y0PO5D7odBIWIuySy+XKkvJZDJVFP2bw42ZsE/VR2ATVntsdcp9OWbh1rNfqV54WDD+1IrQDe7k1ICUwSFQY/3fYtNnu5opkPV+VBefAzzlq4ZX93sQUDhELaP6T3JM0OsfEucUuq0zlGcjUn4W60scwJ2X1ivkq4Rv1TtyL2PgJGz//aIFduHLuoy2A45LgKI+oQPpAIGUMF2lDUDh9RPxDXqAxp/MT+jDIaiegwpW1DpCrRPtS2Ul0DWEBMYOEeWenv0ZeGKzkUpb6a3HCHl+rcvdde5+iff2F2qbi43bSkNkcpVOqkzyg86ALHOsnWtbpHgEHq8izvNVKLypUxGF+VNz37FXqZ4AO+4eJExsUbrpf7teyl6V1Qy5RKrstqqKLsqR2TB4wep0qm/1yE9ir24S/+sVPpTQVWnP/QrNnMsLollDgzfEgYh8YkO71a/9t9UAX4vCrzD1Onbwj+VvKUCNs0g6mc93NfSu68dS18KqEzqLkvKck0gY1IX8vnP1Zf/rh7xe0XnX6D6lzP8oc7ydcye7Fsqq6pt9MUuYdL9P/6wpeu6/8/f0+AH8ZLKWblCtyGS9CUmLJ93Qz9Qkd8dgZkX0N7EeZb1emn6c3/PAmGOO8uKKh+sudYk/OJfg1ECCQLciWj6LrRU/eRfs1wLr5kOXutKfhWTyBjuNO/H/mzwP/q5W8U07M8OAAAAAElFTkSuQmCC"},function(t,e,n){var i;t.exports=(i=n(0),i.enc.Latin1)},function(i,r,o){var a,s;!function(t,e,n){"use strict";"undefined"!=typeof window&&o(18)?void 0===(s="function"==typeof(a=n)?a.call(r,o,r,i):a)||(i.exports=s):void 0!==i&&i.exports?i.exports=n():e.exports?e.exports=n():e.Fingerprint2=n()}(0,this,function(){"use strict";void 0===Array.isArray&&(Array.isArray=function(t){return"[object Array]"===Object.prototype.toString.call(t)});var h=function(t,e){t=[t[0]>>>16,65535&t[0],t[1]>>>16,65535&t[1]],e=[e[0]>>>16,65535&e[0],e[1]>>>16,65535&e[1]];var n=[0,0,0,0];return n[3]+=t[3]+e[3],n[2]+=n[3]>>>16,n[3]&=65535,n[2]+=t[2]+e[2],n[1]+=n[2]>>>16,n[2]&=65535,n[1]+=t[1]+e[1],n[0]+=n[1]>>>16,n[1]&=65535,n[0]+=t[0]+e[0],n[0]&=65535,[n[0]<<16|n[1],n[2]<<16|n[3]]},d=function(t,e){t=[t[0]>>>16,65535&t[0],t[1]>>>16,65535&t[1]],e=[e[0]>>>16,65535&e[0],e[1]>>>16,65535&e[1]];var n=[0,0,0,0];return n[3]+=t[3]*e[3],n[2]+=n[3]>>>16,n[3]&=65535,n[2]+=t[2]*e[3],n[1]+=n[2]>>>16,n[2]&=65535,n[2]+=t[3]*e[2],n[1]+=n[2]>>>16,n[2]&=65535,n[1]+=t[1]*e[3],n[0]+=n[1]>>>16,n[1]&=65535,n[1]+=t[2]*e[2],n[0]+=n[1]>>>16,n[1]&=65535,n[1]+=t[3]*e[1],n[0]+=n[1]>>>16,n[1]&=65535,n[0]+=t[0]*e[3]+t[1]*e[2]+t[2]*e[1]+t[3]*e[0],n[0]&=65535,[n[0]<<16|n[1],n[2]<<16|n[3]]},f=function(t,e){return 32===(e%=64)?[t[1],t[0]]:e<32?[t[0]<<e|t[1]>>>32-e,t[1]<<e|t[0]>>>32-e]:(e-=32,[t[1]<<e|t[0]>>>32-e,t[0]<<e|t[1]>>>32-e])},p=function(t,e){return 0===(e%=64)?t:e<32?[t[0]<<e|t[1]>>>32-e,t[1]<<e]:[t[1]<<e-32,0]},g=function(t,e){return[t[0]^e[0],t[1]^e[1]]},m=function(t){return t=g(t,[0,t[0]>>>1]),t=d(t,[4283543511,3981806797]),t=g(t,[0,t[0]>>>1]),t=d(t,[3301882366,444984403]),t=g(t,[0,t[0]>>>1])},s=function(t,e){e=e||0;for(var n=(t=t||"").length%16,i=t.length-n,r=[0,e],o=[0,e],a=[0,0],s=[0,0],c=[2277735313,289559509],l=[1291169091,658871167],u=0;u<i;u+=16)a=[255&t.charCodeAt(u+4)|(255&t.charCodeAt(u+5))<<8|(255&t.charCodeAt(u+6))<<16|(255&t.charCodeAt(u+7))<<24,255&t.charCodeAt(u)|(255&t.charCodeAt(u+1))<<8|(255&t.charCodeAt(u+2))<<16|(255&t.charCodeAt(u+3))<<24],s=[255&t.charCodeAt(u+12)|(255&t.charCodeAt(u+13))<<8|(255&t.charCodeAt(u+14))<<16|(255&t.charCodeAt(u+15))<<24,255&t.charCodeAt(u+8)|(255&t.charCodeAt(u+9))<<8|(255&t.charCodeAt(u+10))<<16|(255&t.charCodeAt(u+11))<<24],a=d(a,c),a=f(a,31),a=d(a,l),r=g(r,a),r=f(r,27),r=h(r,o),r=h(d(r,[0,5]),[0,1390208809]),s=d(s,l),s=f(s,33),s=d(s,c),o=g(o,s),o=f(o,31),o=h(o,r),o=h(d(o,[0,5]),[0,944331445]);switch(a=[0,0],s=[0,0],n){case 15:s=g(s,p([0,t.charCodeAt(u+14)],48));case 14:s=g(s,p([0,t.charCodeAt(u+13)],40));case 13:s=g(s,p([0,t.charCodeAt(u+12)],32));case 12:s=g(s,p([0,t.charCodeAt(u+11)],24));case 11:s=g(s,p([0,t.charCodeAt(u+10)],16));case 10:s=g(s,p([0,t.charCodeAt(u+9)],8));case 9:s=g(s,[0,t.charCodeAt(u+8)]),s=d(s,l),s=f(s,33),s=d(s,c),o=g(o,s);case 8:a=g(a,p([0,t.charCodeAt(u+7)],56));case 7:a=g(a,p([0,t.charCodeAt(u+6)],48));case 6:a=g(a,p([0,t.charCodeAt(u+5)],40));case 5:a=g(a,p([0,t.charCodeAt(u+4)],32));case 4:a=g(a,p([0,t.charCodeAt(u+3)],24));case 3:a=g(a,p([0,t.charCodeAt(u+2)],16));case 2:a=g(a,p([0,t.charCodeAt(u+1)],8));case 1:a=g(a,[0,t.charCodeAt(u)]),a=d(a,c),a=f(a,31),a=d(a,l),r=g(r,a)}return r=g(r,[0,t.length]),o=g(o,[0,t.length]),r=h(r,o),o=h(o,r),r=m(r),o=m(o),r=h(r,o),o=h(o,r),("00000000"+(r[0]>>>0).toString(16)).slice(-8)+("00000000"+(r[1]>>>0).toString(16)).slice(-8)+("00000000"+(o[0]>>>0).toString(16)).slice(-8)+("00000000"+(o[1]>>>0).toString(16)).slice(-8)},t={preprocessor:null,audio:{timeout:1e3,excludeIOS11:!0},fonts:{swfContainerId:"fingerprintjs2",swfPath:"flash/compiled/FontList.swf",userDefinedFonts:[],extendedJsFonts:!1},screen:{detectScreenOrientation:!0},plugins:{sortPluginsFor:[/palemoon/i],excludeIE:!1},extraComponents:[],excludes:{enumerateDevices:!0,pixelRatio:!0,doNotTrack:!0,fontsFlash:!0,adBlock:!0},NOT_AVAILABLE:"not available",ERROR:"error",EXCLUDED:"excluded"},l=function(t,e){if(Array.prototype.forEach&&t.forEach===Array.prototype.forEach)t.forEach(e);else if(t.length===+t.length)for(var n=0,i=t.length;n<i;n++)e(t[n],n,t);else for(var r in t)t.hasOwnProperty(r)&&e(t[r],r,t)},c=function(t,i){var r=[];return null==t?r:Array.prototype.map&&t.map===Array.prototype.map?t.map(i):(l(t,function(t,e,n){r.push(i(t,e,n))}),r)},n=function(){return navigator.mediaDevices&&navigator.mediaDevices.enumerateDevices},i=function(t){var e=[window.screen.width,window.screen.height];return t.screen.detectScreenOrientation&&e.sort().reverse(),e},r=function(t){if(window.screen.availWidth&&window.screen.availHeight){var e=[window.screen.availHeight,window.screen.availWidth];return t.screen.detectScreenOrientation&&e.sort().reverse(),e}return t.NOT_AVAILABLE},o=function(t){if(null==navigator.plugins)return t.NOT_AVAILABLE;for(var e=[],n=0,i=navigator.plugins.length;n<i;n++)navigator.plugins[n]&&e.push(navigator.plugins[n]);return u(t)&&(e=e.sort(function(t,e){return t.name>e.name?1:t.name<e.name?-1:0})),c(e,function(t){var e=c(t,function(t){return[t.type,t.suffixes]});return[t.name,t.description,e]})},a=function(e){var t=[];if(Object.getOwnPropertyDescriptor&&Object.getOwnPropertyDescriptor(window,"ActiveXObject")||"ActiveXObject"in window){t=c(["AcroPDF.PDF","Adodb.Stream","AgControl.AgControl","DevalVRXCtrl.DevalVRXCtrl.1","MacromediaFlashPaper.MacromediaFlashPaper","Msxml2.DOMDocument","Msxml2.XMLHTTP","PDF.PdfCtrl","QuickTime.QuickTime","QuickTimeCheckObject.QuickTimeCheck.1","RealPlayer","RealPlayer.RealPlayer(tm) ActiveX Control (32-bit)","RealVideo.RealVideo(tm) ActiveX Control (32-bit)","Scripting.Dictionary","SWCtl.SWCtl","Shell.UIHelper","ShockwaveFlash.ShockwaveFlash","Skype.Detection","TDCCtl.TDCCtl","WMPlayer.OCX","rmocx.RealPlayer G2 Control","rmocx.RealPlayer G2 Control.1"],function(t){try{return new window.ActiveXObject(t),t}catch(t){return e.ERROR}})}else t.push(e.NOT_AVAILABLE);return navigator.plugins&&(t=t.concat(o(e))),t},u=function(t){for(var e=!1,n=0,i=t.plugins.sortPluginsFor.length;n<i;n++){var r=t.plugins.sortPluginsFor[n];if(navigator.userAgent.match(r)){e=!0;break}}return e},y=function(e){try{return!!window.sessionStorage}catch(t){return e.ERROR}},v=function(e){try{return!!window.localStorage}catch(t){return e.ERROR}},b=function(e){if(M())return e.EXCLUDED;try{return!!window.indexedDB}catch(t){return e.ERROR}},w=function(t){return navigator.hardwareConcurrency?navigator.hardwareConcurrency:t.NOT_AVAILABLE},T=function(t){return navigator.cpuClass||t.NOT_AVAILABLE},A=function(t){return navigator.platform?navigator.platform:t.NOT_AVAILABLE},E=function(t){return navigator.doNotTrack?navigator.doNotTrack:navigator.msDoNotTrack?navigator.msDoNotTrack:window.doNotTrack?window.doNotTrack:t.NOT_AVAILABLE},e=function(){var e,t=0;void 0!==navigator.maxTouchPoints?t=navigator.maxTouchPoints:void 0!==navigator.msMaxTouchPoints&&(t=navigator.msMaxTouchPoints);try{document.createEvent("TouchEvent"),e=!0}catch(t){e=!1}return[t,e,"ontouchstart"in window]},x=function(t){var e=[],n=document.createElement("canvas");n.width=2e3,n.height=200,n.style.display="inline";var i=n.getContext("2d");return i.rect(0,0,10,10),i.rect(2,2,6,6),e.push("canvas winding:"+(!1===i.isPointInPath(5,5,"evenodd")?"yes":"no")),i.textBaseline="alphabetic",i.fillStyle="#f60",i.fillRect(125,1,62,20),i.fillStyle="#069",t.dontUseFakeFontInCanvas?i.font="11pt Arial":i.font="11pt no-real-font-123",i.fillText("Cwm fjordbank glyphs vext quiz, 😃",2,15),i.fillStyle="rgba(102, 204, 0, 0.2)",i.font="18pt Arial",i.fillText("Cwm fjordbank glyphs vext quiz, 😃",4,45),i.globalCompositeOperation="multiply",i.fillStyle="rgb(255,0,255)",i.beginPath(),i.arc(50,50,50,0,2*Math.PI,!0),i.closePath(),i.fill(),i.fillStyle="rgb(0,255,255)",i.beginPath(),i.arc(100,50,50,0,2*Math.PI,!0),i.closePath(),i.fill(),i.fillStyle="rgb(255,255,0)",i.beginPath(),i.arc(75,100,50,0,2*Math.PI,!0),i.closePath(),i.fill(),i.fillStyle="rgb(255,0,255)",i.arc(75,75,75,0,2*Math.PI,!0),i.arc(75,75,25,0,2*Math.PI,!0),i.fill("evenodd"),n.toDataURL&&e.push("canvas fp:"+n.toDataURL()),e},S=function(){var a,t=function(t){return a.clearColor(0,0,0,1),a.enable(a.DEPTH_TEST),a.depthFunc(a.LEQUAL),a.clear(a.COLOR_BUFFER_BIT|a.DEPTH_BUFFER_BIT),"["+t[0]+", "+t[1]+"]"};if(!(a=U()))return null;var s=[],e=a.createBuffer();a.bindBuffer(a.ARRAY_BUFFER,e);var n=new Float32Array([-.2,-.9,0,.4,-.26,0,0,.732134444,0]);a.bufferData(a.ARRAY_BUFFER,n,a.STATIC_DRAW),e.itemSize=3,e.numItems=3;var i=a.createProgram(),r=a.createShader(a.VERTEX_SHADER);a.shaderSource(r,"attribute vec2 attrVertex;varying vec2 varyinTexCoordinate;uniform vec2 uniformOffset;void main(){varyinTexCoordinate=attrVertex+uniformOffset;gl_Position=vec4(attrVertex,0,1);}"),a.compileShader(r);var o=a.createShader(a.FRAGMENT_SHADER);a.shaderSource(o,"precision mediump float;varying vec2 varyinTexCoordinate;void main() {gl_FragColor=vec4(varyinTexCoordinate,0,1);}"),a.compileShader(o),a.attachShader(i,r),a.attachShader(i,o),a.linkProgram(i),a.useProgram(i),i.vertexPosAttrib=a.getAttribLocation(i,"attrVertex"),i.offsetUniform=a.getUniformLocation(i,"uniformOffset"),a.enableVertexAttribArray(i.vertexPosArray),a.vertexAttribPointer(i.vertexPosAttrib,e.itemSize,a.FLOAT,!1,0,0),a.uniform2f(i.offsetUniform,1,1),a.drawArrays(a.TRIANGLE_STRIP,0,e.numItems);try{s.push(a.canvas.toDataURL())}catch(t){}s.push("extensions:"+(a.getSupportedExtensions()||[]).join(";")),s.push("webgl aliased line width range:"+t(a.getParameter(a.ALIASED_LINE_WIDTH_RANGE))),s.push("webgl aliased point size range:"+t(a.getParameter(a.ALIASED_POINT_SIZE_RANGE))),s.push("webgl alpha bits:"+a.getParameter(a.ALPHA_BITS)),s.push("webgl antialiasing:"+(a.getContextAttributes().antialias?"yes":"no")),s.push("webgl blue bits:"+a.getParameter(a.BLUE_BITS)),s.push("webgl depth bits:"+a.getParameter(a.DEPTH_BITS)),s.push("webgl green bits:"+a.getParameter(a.GREEN_BITS)),s.push("webgl max anisotropy:"+function(t){var e=t.getExtension("EXT_texture_filter_anisotropic")||t.getExtension("WEBKIT_EXT_texture_filter_anisotropic")||t.getExtension("MOZ_EXT_texture_filter_anisotropic");if(e){var n=t.getParameter(e.MAX_TEXTURE_MAX_ANISOTROPY_EXT);return 0===n&&(n=2),n}return null}(a)),s.push("webgl max combined texture image units:"+a.getParameter(a.MAX_COMBINED_TEXTURE_IMAGE_UNITS)),s.push("webgl max cube map texture size:"+a.getParameter(a.MAX_CUBE_MAP_TEXTURE_SIZE)),s.push("webgl max fragment uniform vectors:"+a.getParameter(a.MAX_FRAGMENT_UNIFORM_VECTORS)),s.push("webgl max render buffer size:"+a.getParameter(a.MAX_RENDERBUFFER_SIZE)),s.push("webgl max texture image units:"+a.getParameter(a.MAX_TEXTURE_IMAGE_UNITS)),s.push("webgl max texture size:"+a.getParameter(a.MAX_TEXTURE_SIZE)),s.push("webgl max varying vectors:"+a.getParameter(a.MAX_VARYING_VECTORS)),s.push("webgl max vertex attribs:"+a.getParameter(a.MAX_VERTEX_ATTRIBS)),s.push("webgl max vertex texture image units:"+a.getParameter(a.MAX_VERTEX_TEXTURE_IMAGE_UNITS)),s.push("webgl max vertex uniform vectors:"+a.getParameter(a.MAX_VERTEX_UNIFORM_VECTORS)),s.push("webgl max viewport dims:"+t(a.getParameter(a.MAX_VIEWPORT_DIMS))),s.push("webgl red bits:"+a.getParameter(a.RED_BITS)),s.push("webgl renderer:"+a.getParameter(a.RENDERER)),s.push("webgl shading language version:"+a.getParameter(a.SHADING_LANGUAGE_VERSION)),s.push("webgl stencil bits:"+a.getParameter(a.STENCIL_BITS)),s.push("webgl vendor:"+a.getParameter(a.VENDOR)),s.push("webgl version:"+a.getParameter(a.VERSION));try{var c=a.getExtension("WEBGL_debug_renderer_info");c&&(s.push("webgl unmasked vendor:"+a.getParameter(c.UNMASKED_VENDOR_WEBGL)),s.push("webgl unmasked renderer:"+a.getParameter(c.UNMASKED_RENDERER_WEBGL)))}catch(t){}return a.getShaderPrecisionFormat&&l(["FLOAT","INT"],function(o){l(["VERTEX","FRAGMENT"],function(r){l(["HIGH","MEDIUM","LOW"],function(i){l(["precision","rangeMin","rangeMax"],function(t){var e=a.getShaderPrecisionFormat(a[r+"_SHADER"],a[i+"_"+o])[t];"precision"!==t&&(t="precision "+t);var n=["webgl ",r.toLowerCase()," shader ",i.toLowerCase()," ",o.toLowerCase()," ",t,":",e].join("");s.push(n)})})})}),F(a),s},O=function(){try{var t=U(),e=t.getExtension("WEBGL_debug_renderer_info"),n=t.getParameter(e.UNMASKED_VENDOR_WEBGL)+"~"+t.getParameter(e.UNMASKED_RENDERER_WEBGL);return F(t),n}catch(t){return null}},C=function(){var t=document.createElement("div");t.innerHTML="&nbsp;";var e=!(t.className="adsbox");try{document.body.appendChild(t),e=0===document.getElementsByClassName("adsbox")[0].offsetHeight,document.body.removeChild(t)}catch(t){e=!1}return e},B=function(){if(void 0!==navigator.languages)try{if(navigator.languages[0].substr(0,2)!==navigator.language.substr(0,2))return!0}catch(t){return!0}return!1},D=function(){return window.screen.width<window.screen.availWidth||window.screen.height<window.screen.availHeight},k=function(){var t,e=navigator.userAgent.toLowerCase(),n=navigator.oscpu,i=navigator.platform.toLowerCase();if(t=0<=e.indexOf("windows phone")?"Windows Phone":0<=e.indexOf("windows")||0<=e.indexOf("win16")||0<=e.indexOf("win32")||0<=e.indexOf("win64")||0<=e.indexOf("win95")||0<=e.indexOf("win98")||0<=e.indexOf("winnt")||0<=e.indexOf("wow64")?"Windows":0<=e.indexOf("android")?"Android":0<=e.indexOf("linux")||0<=e.indexOf("cros")||0<=e.indexOf("x11")?"Linux":0<=e.indexOf("iphone")||0<=e.indexOf("ipad")||0<=e.indexOf("ipod")||0<=e.indexOf("crios")||0<=e.indexOf("fxios")?"iOS":0<=e.indexOf("macintosh")||0<=e.indexOf("mac_powerpc)")?"Mac":"Other",("ontouchstart"in window||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints)&&"Windows"!==t&&"Windows Phone"!==t&&"Android"!==t&&"iOS"!==t&&"Other"!==t&&-1===e.indexOf("cros"))return!0;if(void 0!==n){if(0<=(n=n.toLowerCase()).indexOf("win")&&"Windows"!==t&&"Windows Phone"!==t)return!0;if(0<=n.indexOf("linux")&&"Linux"!==t&&"Android"!==t)return!0;if(0<=n.indexOf("mac")&&"Mac"!==t&&"iOS"!==t)return!0;if((-1===n.indexOf("win")&&-1===n.indexOf("linux")&&-1===n.indexOf("mac"))!=("Other"===t))return!0}return 0<=i.indexOf("win")&&"Windows"!==t&&"Windows Phone"!==t||((0<=i.indexOf("linux")||0<=i.indexOf("android")||0<=i.indexOf("pike"))&&"Linux"!==t&&"Android"!==t||((0<=i.indexOf("mac")||0<=i.indexOf("ipad")||0<=i.indexOf("ipod")||0<=i.indexOf("iphone"))&&"Mac"!==t&&"iOS"!==t||!(0<=i.indexOf("arm")&&"Windows Phone"===t)&&(!(0<=i.indexOf("pike")&&0<=e.indexOf("opera mini"))&&((i.indexOf("win")<0&&i.indexOf("linux")<0&&i.indexOf("mac")<0&&i.indexOf("iphone")<0&&i.indexOf("ipad")<0&&i.indexOf("ipod")<0)!==("Other"===t)||void 0===navigator.plugins&&"Windows"!==t&&"Windows Phone"!==t))))},R=function(){var t,e=navigator.userAgent.toLowerCase(),n=navigator.productSub;if(0<=e.indexOf("edge/")||0<=e.indexOf("iemobile/"))return!1;if(0<=e.indexOf("opera mini"))return!1;if(("Chrome"===(t=0<=e.indexOf("firefox/")?"Firefox":0<=e.indexOf("opera/")||0<=e.indexOf(" opr/")?"Opera":0<=e.indexOf("chrome/")?"Chrome":0<=e.indexOf("safari/")?0<=e.indexOf("android 1.")||0<=e.indexOf("android 2.")||0<=e.indexOf("android 3.")||0<=e.indexOf("android 4.")?"AOSP":"Safari":0<=e.indexOf("trident/")?"Internet Explorer":"Other")||"Safari"===t||"Opera"===t)&&"20030107"!==n)return!0;var i,r=eval.toString().length;if(37===r&&"Safari"!==t&&"Firefox"!==t&&"Other"!==t)return!0;if(39===r&&"Internet Explorer"!==t&&"Other"!==t)return!0;if(33===r&&"Chrome"!==t&&"AOSP"!==t&&"Opera"!==t&&"Other"!==t)return!0;try{throw"a"}catch(t){try{t.toSource(),i=!0}catch(t){i=!1}}return i&&"Firefox"!==t&&"Other"!==t},I=function(){var t=document.createElement("canvas");return!(!t.getContext||!t.getContext("2d"))},N=function(){if(!I())return!1;var t=U(),e=!!window.WebGLRenderingContext&&!!t;return F(t),e},P=function(){return"Microsoft Internet Explorer"===navigator.appName||!("Netscape"!==navigator.appName||!/Trident/.test(navigator.userAgent))},M=function(){return 2<=("msWriteProfilerMark"in window)+("msLaunchUri"in navigator)+("msSaveBlob"in navigator)},L=function(){return void 0!==window.swfobject},V=function(){return window.swfobject.hasFlashPlayerVersion("9.0.0")},j=function(e,t){var n="___fp_swf_loaded";window[n]=function(t){e(t)};var i,r,o=t.fonts.swfContainerId;(r=document.createElement("div")).setAttribute("id",i.fonts.swfContainerId),document.body.appendChild(r);var a={onReady:n};window.swfobject.embedSWF(t.fonts.swfPath,o,"1","1","9.0.0",!1,a,{allowScriptAccess:"always",menu:"false"},{})},U=function(){var t=document.createElement("canvas"),e=null;try{e=t.getContext("webgl")||t.getContext("experimental-webgl")}catch(t){}return e||(e=null),e},F=function(t){var e=t.getExtension("WEBGL_lose_context");null!=e&&e.loseContext()},_=[{key:"userAgent",getData:function(t){t(navigator.userAgent)}},{key:"webdriver",getData:function(t,e){t(null==navigator.webdriver?e.NOT_AVAILABLE:navigator.webdriver)}},{key:"language",getData:function(t,e){t(navigator.language||navigator.userLanguage||navigator.browserLanguage||navigator.systemLanguage||e.NOT_AVAILABLE)}},{key:"colorDepth",getData:function(t,e){t(window.screen.colorDepth||e.NOT_AVAILABLE)}},{key:"deviceMemory",getData:function(t,e){t(navigator.deviceMemory||e.NOT_AVAILABLE)}},{key:"pixelRatio",getData:function(t,e){t(window.devicePixelRatio||e.NOT_AVAILABLE)}},{key:"hardwareConcurrency",getData:function(t,e){t(w(e))}},{key:"screenResolution",getData:function(t,e){t(i(e))}},{key:"availableScreenResolution",getData:function(t,e){t(r(e))}},{key:"timezoneOffset",getData:function(t){t((new Date).getTimezoneOffset())}},{key:"timezone",getData:function(t,e){window.Intl&&window.Intl.DateTimeFormat?t((new window.Intl.DateTimeFormat).resolvedOptions().timeZone||e.NOT_AVAILABLE):t(e.NOT_AVAILABLE)}},{key:"sessionStorage",getData:function(t,e){t(y(e))}},{key:"localStorage",getData:function(t,e){t(v(e))}},{key:"indexedDb",getData:function(t,e){t(b(e))}},{key:"addBehavior",getData:function(t){t(!!window.HTMLElement.prototype.addBehavior)}},{key:"openDatabase",getData:function(t){t(!!window.openDatabase)}},{key:"cpuClass",getData:function(t,e){t(T(e))}},{key:"platform",getData:function(t,e){t(A(e))}},{key:"doNotTrack",getData:function(t,e){t(E(e))}},{key:"plugins",getData:function(t,e){P()?e.plugins.excludeIE?t(e.EXCLUDED):t(a(e)):t(o(e))}},{key:"canvas",getData:function(t,e){I()?t(x(e)):t(e.NOT_AVAILABLE)}},{key:"webgl",getData:function(t,e){N()?t(S()):t(e.NOT_AVAILABLE)}},{key:"webglVendorAndRenderer",getData:function(t){N()?t(O()):t()}},{key:"adBlock",getData:function(t){t(C())}},{key:"hasLiedLanguages",getData:function(t){t(B())}},{key:"hasLiedResolution",getData:function(t){t(D())}},{key:"hasLiedOs",getData:function(t){t(k())}},{key:"hasLiedBrowser",getData:function(t){t(R())}},{key:"touchSupport",getData:function(t){t(e())}},{key:"fonts",getData:function(t,e){var u=["monospace","sans-serif","serif"],h=["Andale Mono","Arial","Arial Black","Arial Hebrew","Arial MT","Arial Narrow","Arial Rounded MT Bold","Arial Unicode MS","Bitstream Vera Sans Mono","Book Antiqua","Bookman Old Style","Calibri","Cambria","Cambria Math","Century","Century Gothic","Century Schoolbook","Comic Sans","Comic Sans MS","Consolas","Courier","Courier New","Geneva","Georgia","Helvetica","Helvetica Neue","Impact","Lucida Bright","Lucida Calligraphy","Lucida Console","Lucida Fax","LUCIDA GRANDE","Lucida Handwriting","Lucida Sans","Lucida Sans Typewriter","Lucida Sans Unicode","Microsoft Sans Serif","Monaco","Monotype Corsiva","MS Gothic","MS Outlook","MS PGothic","MS Reference Sans Serif","MS Sans Serif","MS Serif","MYRIAD","MYRIAD PRO","Palatino","Palatino Linotype","Segoe Print","Segoe Script","Segoe UI","Segoe UI Light","Segoe UI Semibold","Segoe UI Symbol","Tahoma","Times","Times New Roman","Times New Roman PS","Trebuchet MS","Verdana","Wingdings","Wingdings 2","Wingdings 3"];e.fonts.extendedJsFonts&&(h=h.concat(["Abadi MT Condensed Light","Academy Engraved LET","ADOBE CASLON PRO","Adobe Garamond","ADOBE GARAMOND PRO","Agency FB","Aharoni","Albertus Extra Bold","Albertus Medium","Algerian","Amazone BT","American Typewriter","American Typewriter Condensed","AmerType Md BT","Andalus","Angsana New","AngsanaUPC","Antique Olive","Aparajita","Apple Chancery","Apple Color Emoji","Apple SD Gothic Neo","Arabic Typesetting","ARCHER","ARNO PRO","Arrus BT","Aurora Cn BT","AvantGarde Bk BT","AvantGarde Md BT","AVENIR","Ayuthaya","Bandy","Bangla Sangam MN","Bank Gothic","BankGothic Md BT","Baskerville","Baskerville Old Face","Batang","BatangChe","Bauer Bodoni","Bauhaus 93","Bazooka","Bell MT","Bembo","Benguiat Bk BT","Berlin Sans FB","Berlin Sans FB Demi","Bernard MT Condensed","BernhardFashion BT","BernhardMod BT","Big Caslon","BinnerD","Blackadder ITC","BlairMdITC TT","Bodoni 72","Bodoni 72 Oldstyle","Bodoni 72 Smallcaps","Bodoni MT","Bodoni MT Black","Bodoni MT Condensed","Bodoni MT Poster Compressed","Bookshelf Symbol 7","Boulder","Bradley Hand","Bradley Hand ITC","Bremen Bd BT","Britannic Bold","Broadway","Browallia New","BrowalliaUPC","Brush Script MT","Californian FB","Calisto MT","Calligrapher","Candara","CaslonOpnface BT","Castellar","Centaur","Cezanne","CG Omega","CG Times","Chalkboard","Chalkboard SE","Chalkduster","Charlesworth","Charter Bd BT","Charter BT","Chaucer","ChelthmITC Bk BT","Chiller","Clarendon","Clarendon Condensed","CloisterBlack BT","Cochin","Colonna MT","Constantia","Cooper Black","Copperplate","Copperplate Gothic","Copperplate Gothic Bold","Copperplate Gothic Light","CopperplGoth Bd BT","Corbel","Cordia New","CordiaUPC","Cornerstone","Coronet","Cuckoo","Curlz MT","DaunPenh","Dauphin","David","DB LCD Temp","DELICIOUS","Denmark","DFKai-SB","Didot","DilleniaUPC","DIN","DokChampa","Dotum","DotumChe","Ebrima","Edwardian Script ITC","Elephant","English 111 Vivace BT","Engravers MT","EngraversGothic BT","Eras Bold ITC","Eras Demi ITC","Eras Light ITC","Eras Medium ITC","EucrosiaUPC","Euphemia","Euphemia UCAS","EUROSTILE","Exotc350 Bd BT","FangSong","Felix Titling","Fixedsys","FONTIN","Footlight MT Light","Forte","FrankRuehl","Fransiscan","Freefrm721 Blk BT","FreesiaUPC","Freestyle Script","French Script MT","FrnkGothITC Bk BT","Fruitger","FRUTIGER","Futura","Futura Bk BT","Futura Lt BT","Futura Md BT","Futura ZBlk BT","FuturaBlack BT","Gabriola","Galliard BT","Gautami","Geeza Pro","Geometr231 BT","Geometr231 Hv BT","Geometr231 Lt BT","GeoSlab 703 Lt BT","GeoSlab 703 XBd BT","Gigi","Gill Sans","Gill Sans MT","Gill Sans MT Condensed","Gill Sans MT Ext Condensed Bold","Gill Sans Ultra Bold","Gill Sans Ultra Bold Condensed","Gisha","Gloucester MT Extra Condensed","GOTHAM","GOTHAM BOLD","Goudy Old Style","Goudy Stout","GoudyHandtooled BT","GoudyOLSt BT","Gujarati Sangam MN","Gulim","GulimChe","Gungsuh","GungsuhChe","Gurmukhi MN","Haettenschweiler","Harlow Solid Italic","Harrington","Heather","Heiti SC","Heiti TC","HELV","Herald","High Tower Text","Hiragino Kaku Gothic ProN","Hiragino Mincho ProN","Hoefler Text","Humanst 521 Cn BT","Humanst521 BT","Humanst521 Lt BT","Imprint MT Shadow","Incised901 Bd BT","Incised901 BT","Incised901 Lt BT","INCONSOLATA","Informal Roman","Informal011 BT","INTERSTATE","IrisUPC","Iskoola Pota","JasmineUPC","Jazz LET","Jenson","Jester","Jokerman","Juice ITC","Kabel Bk BT","Kabel Ult BT","Kailasa","KaiTi","Kalinga","Kannada Sangam MN","Kartika","Kaufmann Bd BT","Kaufmann BT","Khmer UI","KodchiangUPC","Kokila","Korinna BT","Kristen ITC","Krungthep","Kunstler Script","Lao UI","Latha","Leelawadee","Letter Gothic","Levenim MT","LilyUPC","Lithograph","Lithograph Light","Long Island","Lydian BT","Magneto","Maiandra GD","Malayalam Sangam MN","Malgun Gothic","Mangal","Marigold","Marion","Marker Felt","Market","Marlett","Matisse ITC","Matura MT Script Capitals","Meiryo","Meiryo UI","Microsoft Himalaya","Microsoft JhengHei","Microsoft New Tai Lue","Microsoft PhagsPa","Microsoft Tai Le","Microsoft Uighur","Microsoft YaHei","Microsoft Yi Baiti","MingLiU","MingLiU_HKSCS","MingLiU_HKSCS-ExtB","MingLiU-ExtB","Minion","Minion Pro","Miriam","Miriam Fixed","Mistral","Modern","Modern No. 20","Mona Lisa Solid ITC TT","Mongolian Baiti","MONO","MoolBoran","Mrs Eaves","MS LineDraw","MS Mincho","MS PMincho","MS Reference Specialty","MS UI Gothic","MT Extra","MUSEO","MV Boli","Nadeem","Narkisim","NEVIS","News Gothic","News GothicMT","NewsGoth BT","Niagara Engraved","Niagara Solid","Noteworthy","NSimSun","Nyala","OCR A Extended","Old Century","Old English Text MT","Onyx","Onyx BT","OPTIMA","Oriya Sangam MN","OSAKA","OzHandicraft BT","Palace Script MT","Papyrus","Parchment","Party LET","Pegasus","Perpetua","Perpetua Titling MT","PetitaBold","Pickwick","Plantagenet Cherokee","Playbill","PMingLiU","PMingLiU-ExtB","Poor Richard","Poster","PosterBodoni BT","PRINCETOWN LET","Pristina","PTBarnum BT","Pythagoras","Raavi","Rage Italic","Ravie","Ribbon131 Bd BT","Rockwell","Rockwell Condensed","Rockwell Extra Bold","Rod","Roman","Sakkal Majalla","Santa Fe LET","Savoye LET","Sceptre","Script","Script MT Bold","SCRIPTINA","Serifa","Serifa BT","Serifa Th BT","ShelleyVolante BT","Sherwood","Shonar Bangla","Showcard Gothic","Shruti","Signboard","SILKSCREEN","SimHei","Simplified Arabic","Simplified Arabic Fixed","SimSun","SimSun-ExtB","Sinhala Sangam MN","Sketch Rockwell","Skia","Small Fonts","Snap ITC","Snell Roundhand","Socket","Souvenir Lt BT","Staccato222 BT","Steamer","Stencil","Storybook","Styllo","Subway","Swis721 BlkEx BT","Swiss911 XCm BT","Sylfaen","Synchro LET","System","Tamil Sangam MN","Technical","Teletype","Telugu Sangam MN","Tempus Sans ITC","Terminal","Thonburi","Traditional Arabic","Trajan","TRAJAN PRO","Tristan","Tubular","Tunga","Tw Cen MT","Tw Cen MT Condensed","Tw Cen MT Condensed Extra Bold","TypoUpright BT","Unicorn","Univers","Univers CE 55 Medium","Univers Condensed","Utsaah","Vagabond","Vani","Vijaya","Viner Hand ITC","VisualUI","Vivaldi","Vladimir Script","Vrinda","Westminster","WHITNEY","Wide Latin","ZapfEllipt BT","ZapfHumnst BT","ZapfHumnst Dm BT","Zapfino","Zurich BlkEx BT","Zurich Ex BT","ZWAdobeF"]));h=(h=h.concat(e.fonts.userDefinedFonts)).filter(function(t,e){return h.indexOf(t)===e});var n=document.getElementsByTagName("body")[0],r=document.createElement("div"),d=document.createElement("div"),i={},o={},f=function(){var t=document.createElement("span");return t.style.position="absolute",t.style.left="-9999px",t.style.fontSize="72px",t.style.fontStyle="normal",t.style.fontWeight="normal",t.style.letterSpacing="normal",t.style.lineBreak="auto",t.style.lineHeight="normal",t.style.textTransform="none",t.style.textAlign="left",t.style.textDecoration="none",t.style.textShadow="none",t.style.whiteSpace="normal",t.style.wordBreak="normal",t.style.wordSpacing="normal",t.innerHTML="mmmmmmmmmmlli",t},a=function(t){for(var e=!1,n=0;n<u.length;n++)if(e=t[n].offsetWidth!==i[u[n]]||t[n].offsetHeight!==o[u[n]])return e;return e},s=function(){for(var t=[],e=0,n=u.length;e<n;e++){var i=f();i.style.fontFamily=u[e],r.appendChild(i),t.push(i)}return t}();n.appendChild(r);for(var c=0,l=u.length;c<l;c++)i[u[c]]=s[c].offsetWidth,o[u[c]]=s[c].offsetHeight;var p=function(){for(var t,e,n,i={},r=0,o=h.length;r<o;r++){for(var a=[],s=0,c=u.length;s<c;s++){var l=(t=h[r],e=u[s],n=void 0,(n=f()).style.fontFamily="'"+t+"',"+e,n);d.appendChild(l),a.push(l)}i[h[r]]=a}return i}();n.appendChild(d);for(var g=[],m=0,y=h.length;m<y;m++)a(p[h[m]])&&g.push(h[m]);n.removeChild(d),n.removeChild(r),t(g)},pauseBefore:!0},{key:"fontsFlash",getData:function(e,t){return L()?V()?t.fonts.swfPath?void j(function(t){e(t)},t):e("missing options.fonts.swfPath"):e("flash not installed"):e("swf object not loaded")},pauseBefore:!0},{key:"audio",getData:function(n,t){var e=t.audio;if(e.excludeIOS11&&navigator.userAgent.match(/OS 11.+Version\/11.+Safari/))return n(t.EXCLUDED);var i=window.OfflineAudioContext||window.webkitOfflineAudioContext;if(null==i)return n(t.NOT_AVAILABLE);var r=new i(1,44100,44100),o=r.createOscillator();o.type="triangle",o.frequency.setValueAtTime(1e4,r.currentTime);var a=r.createDynamicsCompressor();l([["threshold",-50],["knee",40],["ratio",12],["reduction",-20],["attack",0],["release",.25]],function(t){void 0!==a[t[0]]&&"function"==typeof a[t[0]].setValueAtTime&&a[t[0]].setValueAtTime(t[1],r.currentTime)}),o.connect(a),a.connect(r.destination),o.start(0),r.startRendering();var s=setTimeout(function(){return console.warn('Audio fingerprint timed out. Please report bug at https://github.com/fingerprintjs/fingerprintjs with your user agent: "'+navigator.userAgent+'".'),r.oncomplete=function(){},r=null,n("audioTimeout")},e.timeout);r.oncomplete=function(t){var e;try{clearTimeout(s),e=t.renderedBuffer.getChannelData(0).slice(4500,5e3).reduce(function(t,e){return t+Math.abs(e)},0).toString(),o.disconnect(),a.disconnect()}catch(t){return void n(t)}n(e)}}},{key:"enumerateDevices",getData:function(e,t){if(!n())return e(t.NOT_AVAILABLE);navigator.mediaDevices.enumerateDevices().then(function(t){e(t.map(function(t){return"id="+t.deviceId+";gid="+t.groupId+";"+t.kind+";"+t.label}))}).catch(function(t){e(t)})}}],H=function(t){throw new Error("'new Fingerprint()' is deprecated, see https://github.com/fingerprintjs/fingerprintjs#upgrade-guide-from-182-to-200")};return H.get=function(n,i){i?n||(n={}):(i=n,n={}),function(t,e){if(null==e)return;var n,i;for(i in e)null==(n=e[i])||Object.prototype.hasOwnProperty.call(t,i)||(t[i]=n)}(n,t),n.components=n.extraComponents.concat(_);var r={data:[],addPreprocessedComponent:function(t,e){"function"==typeof n.preprocessor&&(e=n.preprocessor(t,e)),r.data.push({key:t,value:e})}},o=-1,a=function(t){if((o+=1)>=n.components.length)i(r.data);else{var e=n.components[o];if(n.excludes[e.key])a(!1);else{if(!t&&e.pauseBefore)return o-=1,void setTimeout(function(){a(!0)},1);try{e.getData(function(t){r.addPreprocessedComponent(e.key,t),a(!1)},n)}catch(t){r.addPreprocessedComponent(e.key,String(t)),a(!1)}}}};a(!1)},H.getPromise=function(n){return new Promise(function(t,e){H.get(n,t)})},H.getV18=function(o,a){return null==a&&(a=o,o={}),H.get(o,function(t){for(var e=[],n=0;n<t.length;n++){var i=t[n];if(i.value===(o.NOT_AVAILABLE||"not available"))e.push({key:i.key,value:"unknown"});else if("plugins"===i.key)e.push({key:"plugins",value:c(i.value,function(t){var e=c(t[2],function(t){return t.join?t.join("~"):t}).join(",");return[t[0],t[1],e].join("::")})});else if(-1!==["canvas","webgl"].indexOf(i.key)&&Array.isArray(i.value))e.push({key:i.key,value:i.value.join("~")});else if(-1!==["sessionStorage","localStorage","indexedDb","addBehavior","openDatabase"].indexOf(i.key)){if(!i.value)continue;e.push({key:i.key,value:1})}else i.value?e.push(i.value.join?{key:i.key,value:i.value.join(";")}:i):e.push({key:i.key,value:i.value})}var r=s(c(e,function(t){return t.value}).join("~~~"),31);a(r,e)})},H.x64hash128=s,H.VERSION="2.1.4",H})},function(t,e){t.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8BAMAAADI0sRBAAAAElBMVEVHcEyPj7V3fp52fZ52fZ52fZ5Xt/B6AAAABXRSTlMABraK6T5p8dIAAABjSURBVDjLY2AYBQMOGE2cBfBIM4eGKuKRZgkNDRLAK41PO9BwfNoZVfFrFxrVDgHCrqHYAEy7KVbZ0GCoNHbNoSHESRMwnIDTSA0XAsEyEjUTyEQEsiCBDEwg+xMoPEYBzQEAYlpTdYl6u9gAAAAASUVORK5CYII="},function(t,e){t.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8BAMAAADI0sRBAAAAD1BMVEVHcExSxBpSxBpV1CpSxBqRg39rAAAABHRSTlMAiOYGvfLd/QAAAFFJREFUOMtjYBgFwwsYKgkjOMxCigaoUiIujggBRhcXAQQPJKXi4oQQYHJxUUDwQFIuLi4IARYXFwcEDyQ1Kj0qPSykCWQDApmIQBYcBcMLAACpu0NXK5UQPQAAAABJRU5ErkJggg=="},function(t,e){t.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAR0AAADIBAMAAAAnwChgAAAAIVBMVEVHcEwZ+igZ+igZ+igZ+igZ+igZ+igZ+igZ+igZ+yga+ilF3P5FAAAACnRSTlMAyq2S5ndCXSoTIhVgFQAABDtJREFUeNrtnT1vGkEQhg+OT1e2EkUJlatEosLtVUkTIVcuIyqUpIkriqShIpKLiAqkVKkIISbZX2kLxUFm975mZ3ZepNve+OUBdveem9mLIoTRurh882oWoYxW39yP9Rglz8jsxi+QOLH5N04x8vQe8qwh4tTN/3GOkKe/z7PFwmN+YuExZozz49qNgXqe5FGecyw85jXI1IySp2mw8hzg0V4xDvFof5+nh3kmqnHah3HMDAvPGgzPrWqeayvPlequ2WB9XDYe1dmnY8XR3f3M0fFswPCorqVdMDw/0PEYVTwnVpyVap5LLDwNK85fMDyLCk8WHtV9Yc2K80cVTw8dzy0YnnGFJ8U/6eOpW3G2YHgmFZ79SLCuAWMrzu8KDy6ekZVnoBnH0nPKt7zg8egKFkvP6erUdoUna7TA/BOYnqvwZI5Kzx0VHjQ9B+afvld67rj90wLLIOji6VV67qjxVHouU7Cg6bnKP1V4hP1T58snIP/UvbhfgJ+MYfB8llJDNDwP37lnAfAU8E8dMdVJ03MNMddJ03OJlAum6bm2mAwekfxTTWouJ+q5E6nJnKjn5kKLXZvon6ZCq92U6J8Smd0AWc/1ZTaTZD2XiGy2W2T/NBXZbdP13CHYDQegziVZz1nv5C1Dnhu6f7IuHzczATzG45s31NVzCTsgP3u5tP74uWeepZd/csyknoB6fnrOXmleqOo5x0q84MVTkjcvIH8959jJLRTxUHe6cv6J80Y9S3kYHyAePccHiMk/cVV6cPmnmKkSJuHScwkLoJhNz/EAYiwP4wDEWR7GAYi1eq7v/WK85WF1b9jM5WG+gLir53wBsVfP+QHir57zm+wFysN6HrO9RPVczQOQRPVclw6IqufKXsltyXhOGfJ0qTeDparnbojbTanqOYdIKgKoRfdPpQEV8VMfxcrDSIDk8Lje6pAAdcWWx2FqZ6WZcpaHXZf2U19Fq+dK+ynHpBVxjrL6Zenpn5j9VNdTz3EDki8PK+enApSHldEv9QDVc2W2wv0Q1XPFAYUpDysOKFD3ZlFAoarnitoFNv/Eo1/4/BMPoGB4igEKh6cYoKDdm/n/rBm0ezNfv4zCNrfm6ZfQ3Zt5gIJ3b2YDCt/cmu2npuGbW7P0i0b3ZpafUuneTAek09yaDkipuTXNT2l1b6Y1c6h1b7r1iy1YQjW3Npx+Ss4/kQBJ+qfygIYO/xQMj6PYafNNEY+rlfVMtXvTcdScbvfmPDfOKmieTm6eRQQFKHT3ZgcLj2u10u3ebGXmmQXPkwlIo7k1C9BYIY9jO6jbvdnGwpMOSKu5NQ3QRCmP42pdt3uziYXHDUjz9DAXoCvFPA5AuoerxVh4bMOp/TyhGOlwNRuQ/uOW6lh4HhtOhIct1VEOV7MBYTyLqoZxepj9E8PAs1/FBiB5ove7OC8jmPHh6ebsndir3wFXkAz2i2iqAQAAAABJRU5ErkJggg=="},function(t,e,n){var i,r,o,a,u,s,c,l;t.exports=(i=n(0),n(15),n(16),o=(r=i).lib,a=o.Base,u=o.WordArray,s=r.algo,c=s.MD5,l=s.EvpKDF=a.extend({cfg:a.extend({keySize:4,hasher:c,iterations:1}),init:function(t){this.cfg=this.cfg.extend(t)},compute:function(t,e){for(var n=this.cfg,i=n.hasher.create(),r=u.create(),o=r.words,a=n.keySize,s=n.iterations;o.length<a;){c&&i.update(c);var c=i.update(t).finalize(e);i.reset();for(var l=1;l<s;l++)c=i.finalize(c),i.reset();r.concat(c)}return r.sigBytes=4*a,r}}),r.EvpKDF=function(t,e,n){return l.create(n).compute(t,e)},i.EvpKDF)},function(t,e,n){var r;t.exports=(r=n(0),n(13),n(14),n(9),n(17),function(){var t=r,e=t.lib.BlockCipher,n=t.algo,l=[],u=[],h=[],d=[],f=[],p=[],g=[],m=[],y=[],v=[];!function(){for(var t=[],e=0;e<256;e++)t[e]=e<128?e<<1:e<<1^283;var n=0,i=0;for(e=0;e<256;e++){var r=i^i<<1^i<<2^i<<3^i<<4;r=r>>>8^255&r^99,l[n]=r;var o=t[u[r]=n],a=t[o],s=t[a],c=257*t[r]^16843008*r;h[n]=c<<24|c>>>8,d[n]=c<<16|c>>>16,f[n]=c<<8|c>>>24,p[n]=c,c=16843009*s^65537*a^257*o^16843008*n,g[r]=c<<24|c>>>8,m[r]=c<<16|c>>>16,y[r]=c<<8|c>>>24,v[r]=c,n?(n=o^t[t[t[s^o]]],i^=t[t[i]]):n=i=1}}();var b=[0,1,2,4,8,16,32,64,128,27,54],i=n.AES=e.extend({_doReset:function(){if(!this._nRounds||this._keyPriorReset!==this._key){for(var t=this._keyPriorReset=this._key,e=t.words,n=t.sigBytes/4,i=4*((this._nRounds=n+6)+1),r=this._keySchedule=[],o=0;o<i;o++)if(o<n)r[o]=e[o];else{var a=r[o-1];o%n?6<n&&o%n==4&&(a=l[a>>>24]<<24|l[a>>>16&255]<<16|l[a>>>8&255]<<8|l[255&a]):(a=l[(a=a<<8|a>>>24)>>>24]<<24|l[a>>>16&255]<<16|l[a>>>8&255]<<8|l[255&a],a^=b[o/n|0]<<24),r[o]=r[o-n]^a}for(var s=this._invKeySchedule=[],c=0;c<i;c++)o=i-c,a=c%4?r[o]:r[o-4],s[c]=c<4||o<=4?a:g[l[a>>>24]]^m[l[a>>>16&255]]^y[l[a>>>8&255]]^v[l[255&a]]}},encryptBlock:function(t,e){this._doCryptBlock(t,e,this._keySchedule,h,d,f,p,l)},decryptBlock:function(t,e){var n=t[e+1];t[e+1]=t[e+3],t[e+3]=n,this._doCryptBlock(t,e,this._invKeySchedule,g,m,y,v,u),n=t[e+1],t[e+1]=t[e+3],t[e+3]=n},_doCryptBlock:function(t,e,n,i,r,o,a,s){for(var c=this._nRounds,l=t[e]^n[0],u=t[e+1]^n[1],h=t[e+2]^n[2],d=t[e+3]^n[3],f=4,p=1;p<c;p++){var g=i[l>>>24]^r[u>>>16&255]^o[h>>>8&255]^a[255&d]^n[f++],m=i[u>>>24]^r[h>>>16&255]^o[d>>>8&255]^a[255&l]^n[f++],y=i[h>>>24]^r[d>>>16&255]^o[l>>>8&255]^a[255&u]^n[f++],v=i[d>>>24]^r[l>>>16&255]^o[u>>>8&255]^a[255&h]^n[f++];l=g,u=m,h=y,d=v}g=(s[l>>>24]<<24|s[u>>>16&255]<<16|s[h>>>8&255]<<8|s[255&d])^n[f++],m=(s[u>>>24]<<24|s[h>>>16&255]<<16|s[d>>>8&255]<<8|s[255&l])^n[f++],y=(s[h>>>24]<<24|s[d>>>16&255]<<16|s[l>>>8&255]<<8|s[255&u])^n[f++],v=(s[d>>>24]<<24|s[l>>>16&255]<<16|s[u>>>8&255]<<8|s[255&h])^n[f++],t[e]=g,t[e+1]=m,t[e+2]=y,t[e+3]=v},keySize:8});t.AES=e._createHelper(i)}(),r.AES)},function(t,e,n){!function(t){"use strict";var e="0123456789abcdefghijklmnopqrstuvwxyz";function c(t){return e.charAt(t)}function n(t,e){return t&e}function l(t,e){return t|e}function i(t,e){return t^e}function r(t,e){return t&~e}function o(t){if(0==t)return-1;var e=0;return 0==(65535&t)&&(t>>=16,e+=16),0==(255&t)&&(t>>=8,e+=8),0==(15&t)&&(t>>=4,e+=4),0==(3&t)&&(t>>=2,e+=2),0==(1&t)&&++e,e}function a(t){for(var e=0;0!=t;)t&=t-1,++e;return e}var s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function u(t){var e,n,i="";for(e=0;e+3<=t.length;e+=3)n=parseInt(t.substring(e,e+3),16),i+=s.charAt(n>>6)+s.charAt(63&n);for(e+1==t.length?(n=parseInt(t.substring(e,e+1),16),i+=s.charAt(n<<2)):e+2==t.length&&(n=parseInt(t.substring(e,e+2),16),i+=s.charAt(n>>2)+s.charAt((3&n)<<4));0<(3&i.length);)i+="=";return i}function h(t){var e,n="",i=0,r=0;for(e=0;e<t.length&&"="!=t.charAt(e);++e){var o=s.indexOf(t.charAt(e));o<0||(i=0==i?(n+=c(o>>2),r=3&o,1):1==i?(n+=c(r<<2|o>>4),r=15&o,2):2==i?(n+=c(r),n+=c(o>>2),r=3&o,3):(n+=c(r<<2|o>>4),n+=c(15&o),0))}return 1==i&&(n+=c(r<<2)),n}var d,f,p=function(t,e){return(p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},g={decode:function(t){var e;if(void 0===d){var n="0123456789ABCDEF",i=" \f\n\r\t \u2028\u2029";for(d={},e=0;e<16;++e)d[n.charAt(e)]=e;for(n=n.toLowerCase(),e=10;e<16;++e)d[n.charAt(e)]=e;for(e=0;e<i.length;++e)d[i.charAt(e)]=-1}var r=[],o=0,a=0;for(e=0;e<t.length;++e){var s=t.charAt(e);if("="==s)break;if(-1!=(s=d[s])){if(void 0===s)throw new Error("Illegal character at offset "+e);o|=s,2<=++a?(r[r.length]=o,a=o=0):o<<=4}}if(a)throw new Error("Hex encoding incomplete: 4 bits missing");return r}},m={decode:function(t){var e;if(void 0===f){var n="= \f\n\r\t \u2028\u2029";for(f=Object.create(null),e=0;e<64;++e)f["ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e)]=e;for(e=0;e<n.length;++e)f[n.charAt(e)]=-1}var i=[],r=0,o=0;for(e=0;e<t.length;++e){var a=t.charAt(e);if("="==a)break;if(-1!=(a=f[a])){if(void 0===a)throw new Error("Illegal character at offset "+e);r|=a,4<=++o?(i[i.length]=r>>16,i[i.length]=r>>8&255,i[i.length]=255&r,o=r=0):r<<=6}}switch(o){case 1:throw new Error("Base64 encoding incomplete: at least 2 bits missing");case 2:i[i.length]=r>>10;break;case 3:i[i.length]=r>>16,i[i.length]=r>>8&255}return i},re:/-----BEGIN [^-]+-----([A-Za-z0-9+\/=\s]+)-----END [^-]+-----|begin-base64[^\n]+\n([A-Za-z0-9+\/=\s]+)====/,unarmor:function(t){var e=m.re.exec(t);if(e)if(e[1])t=e[1];else{if(!e[2])throw new Error("RegExp out of sync");t=e[2]}return m.decode(t)}},y=1e13,v=function(){function t(t){this.buf=[+t||0]}return t.prototype.mulAdd=function(t,e){var n,i,r=this.buf,o=r.length;for(n=0;n<o;++n)(i=r[n]*t+e)<y?e=0:i-=(e=0|i/y)*y,r[n]=i;0<e&&(r[n]=e)},t.prototype.sub=function(t){var e,n,i=this.buf,r=i.length;for(e=0;e<r;++e)n=i[e]-t,t=n<0?(n+=y,1):0,i[e]=n;for(;0===i[i.length-1];)i.pop()},t.prototype.toString=function(t){if(10!=(t||10))throw new Error("only base 10 is supported");for(var e=this.buf,n=e[e.length-1].toString(),i=e.length-2;0<=i;--i)n+=(y+e[i]).toString().substring(1);return n},t.prototype.valueOf=function(){for(var t=this.buf,e=0,n=t.length-1;0<=n;--n)e=e*y+t[n];return e},t.prototype.simplify=function(){var t=this.buf;return 1==t.length?t[0]:this},t}(),b="…",w=/^(\d\d)(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])([01]\d|2[0-3])(?:([0-5]\d)(?:([0-5]\d)(?:[.,](\d{1,3}))?)?)?(Z|[-+](?:[0]\d|1[0-2])([0-5]\d)?)?$/,T=/^(\d\d\d\d)(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])([01]\d|2[0-3])(?:([0-5]\d)(?:([0-5]\d)(?:[.,](\d{1,3}))?)?)?(Z|[-+](?:[0]\d|1[0-2])([0-5]\d)?)?$/;function A(t,e){return t.length>e&&(t=t.substring(0,e)+b),t}var E,x=function(){function n(t,e){this.hexDigits="0123456789ABCDEF",this.pos=t instanceof n?(this.enc=t.enc,t.pos):(this.enc=t,e)}return n.prototype.get=function(t){if(void 0===t&&(t=this.pos++),t>=this.enc.length)throw new Error("Requesting byte offset "+t+" on a stream of length "+this.enc.length);return"string"==typeof this.enc?this.enc.charCodeAt(t):this.enc[t]},n.prototype.hexByte=function(t){return this.hexDigits.charAt(t>>4&15)+this.hexDigits.charAt(15&t)},n.prototype.hexDump=function(t,e,n){for(var i="",r=t;r<e;++r)if(i+=this.hexByte(this.get(r)),!0!==n)switch(15&r){case 7:i+="  ";break;case 15:i+="\n";break;default:i+=" "}return i},n.prototype.isASCII=function(t,e){for(var n=t;n<e;++n){var i=this.get(n);if(i<32||176<i)return!1}return!0},n.prototype.parseStringISO=function(t,e){for(var n="",i=t;i<e;++i)n+=String.fromCharCode(this.get(i));return n},n.prototype.parseStringUTF=function(t,e){for(var n="",i=t;i<e;){var r=this.get(i++);n+=r<128?String.fromCharCode(r):191<r&&r<224?String.fromCharCode((31&r)<<6|63&this.get(i++)):String.fromCharCode((15&r)<<12|(63&this.get(i++))<<6|63&this.get(i++))}return n},n.prototype.parseStringBMP=function(t,e){for(var n,i,r="",o=t;o<e;)n=this.get(o++),i=this.get(o++),r+=String.fromCharCode(n<<8|i);return r},n.prototype.parseTime=function(t,e,n){var i=this.parseStringISO(t,e),r=(n?w:T).exec(i);return r?(n&&(r[1]=+r[1],r[1]+=+r[1]<70?2e3:1900),i=r[1]+"-"+r[2]+"-"+r[3]+" "+r[4],r[5]&&(i+=":"+r[5],r[6]&&(i+=":"+r[6],r[7]&&(i+="."+r[7]))),r[8]&&(i+=" UTC","Z"!=r[8]&&(i+=r[8],r[9]&&(i+=":"+r[9]))),i):"Unrecognized time: "+i},n.prototype.parseInteger=function(t,e){for(var n,i=this.get(t),r=127<i,o=r?255:0,a="";i==o&&++t<e;)i=this.get(t);if(0==(n=e-t))return r?-1:0;if(4<n){for(a=i,n<<=3;0==(128&(+a^o));)a=+a<<1,--n;a="("+n+" bit)\n"}r&&(i-=256);for(var s=new v(i),c=t+1;c<e;++c)s.mulAdd(256,this.get(c));return a+s.toString()},n.prototype.parseBitString=function(t,e,n){for(var i=this.get(t),r=(e-t-1<<3)-i,o="("+r+" bit)\n",a="",s=t+1;s<e;++s){for(var c=this.get(s),l=s==e-1?i:0,u=7;l<=u;--u)a+=c>>u&1?"1":"0";if(a.length>n)return o+A(a,n)}return o+a},n.prototype.parseOctetString=function(t,e,n){if(this.isASCII(t,e))return A(this.parseStringISO(t,e),n);var i=e-t,r="("+i+" byte)\n";(n/=2)<i&&(e=t+n);for(var o=t;o<e;++o)r+=this.hexByte(this.get(o));return n<i&&(r+=b),r},n.prototype.parseOID=function(t,e,n){for(var i="",r=new v,o=0,a=t;a<e;++a){var s=this.get(a);if(r.mulAdd(128,127&s),o+=7,!(128&s)){if(""===i)if((r=r.simplify())instanceof v)r.sub(80),i="2."+r.toString();else{var c=r<80?r<40?0:1:2;i=c+"."+(r-40*c)}else i+="."+r.toString();if(i.length>n)return A(i,n);r=new v,o=0}}return 0<o&&(i+=".incomplete"),i},n}(),S=function(){function u(t,e,n,i,r){if(!(i instanceof O))throw new Error("Invalid tag value.");this.stream=t,this.header=e,this.length=n,this.tag=i,this.sub=r}return u.prototype.typeName=function(){switch(this.tag.tagClass){case 0:switch(this.tag.tagNumber){case 0:return"EOC";case 1:return"BOOLEAN";case 2:return"INTEGER";case 3:return"BIT_STRING";case 4:return"OCTET_STRING";case 5:return"NULL";case 6:return"OBJECT_IDENTIFIER";case 7:return"ObjectDescriptor";case 8:return"EXTERNAL";case 9:return"REAL";case 10:return"ENUMERATED";case 11:return"EMBEDDED_PDV";case 12:return"UTF8String";case 16:return"SEQUENCE";case 17:return"SET";case 18:return"NumericString";case 19:return"PrintableString";case 20:return"TeletexString";case 21:return"VideotexString";case 22:return"IA5String";case 23:return"UTCTime";case 24:return"GeneralizedTime";case 25:return"GraphicString";case 26:return"VisibleString";case 27:return"GeneralString";case 28:return"UniversalString";case 30:return"BMPString"}return"Universal_"+this.tag.tagNumber.toString();case 1:return"Application_"+this.tag.tagNumber.toString();case 2:return"["+this.tag.tagNumber.toString()+"]";case 3:return"Private_"+this.tag.tagNumber.toString()}},u.prototype.content=function(t){if(void 0===this.tag)return null;void 0===t&&(t=1/0);var e=this.posContent(),n=Math.abs(this.length);if(!this.tag.isUniversal())return null!==this.sub?"("+this.sub.length+" elem)":this.stream.parseOctetString(e,e+n,t);switch(this.tag.tagNumber){case 1:return 0===this.stream.get(e)?"false":"true";case 2:return this.stream.parseInteger(e,e+n);case 3:return this.sub?"("+this.sub.length+" elem)":this.stream.parseBitString(e,e+n,t);case 4:return this.sub?"("+this.sub.length+" elem)":this.stream.parseOctetString(e,e+n,t);case 6:return this.stream.parseOID(e,e+n,t);case 16:case 17:return null!==this.sub?"("+this.sub.length+" elem)":"(no elem)";case 12:return A(this.stream.parseStringUTF(e,e+n),t);case 18:case 19:case 20:case 21:case 22:case 26:return A(this.stream.parseStringISO(e,e+n),t);case 30:return A(this.stream.parseStringBMP(e,e+n),t);case 23:case 24:return this.stream.parseTime(e,e+n,23==this.tag.tagNumber)}return null},u.prototype.toString=function(){return this.typeName()+"@"+this.stream.pos+"[header:"+this.header+",length:"+this.length+",sub:"+(null===this.sub?"null":this.sub.length)+"]"},u.prototype.toPrettyString=function(t){void 0===t&&(t="");var e=t+this.typeName()+" @"+this.stream.pos;if(0<=this.length&&(e+="+"),e+=this.length,this.tag.tagConstructed?e+=" (constructed)":!this.tag.isUniversal()||3!=this.tag.tagNumber&&4!=this.tag.tagNumber||null===this.sub||(e+=" (encapsulates)"),e+="\n",null!==this.sub){t+="  ";for(var n=0,i=this.sub.length;n<i;++n)e+=this.sub[n].toPrettyString(t)}return e},u.prototype.posStart=function(){return this.stream.pos},u.prototype.posContent=function(){return this.stream.pos+this.header},u.prototype.posEnd=function(){return this.stream.pos+this.header+Math.abs(this.length)},u.prototype.toHexString=function(){return this.stream.hexDump(this.posStart(),this.posEnd(),!0)},u.decodeLength=function(t){var e=t.get(),n=127&e;if(n==e)return n;if(6<n)throw new Error("Length over 48 bits not supported at position "+(t.pos-1));if(0===n)return null;for(var i=e=0;i<n;++i)e=256*e+t.get();return e},u.prototype.getHexStringValue=function(){var t=this.toHexString(),e=2*this.header,n=2*this.length;return t.substr(e,n)},u.decode=function(t){var i;i=t instanceof x?t:new x(t,0);var e=new x(i),n=new O(i),r=u.decodeLength(i),o=i.pos,a=o-e.pos,s=null,c=function(){var t=[];if(null!==r){for(var e=o+r;i.pos<e;)t[t.length]=u.decode(i);if(i.pos!=e)throw new Error("Content size is not correct for container starting at offset "+o)}else try{for(;;){var n=u.decode(i);if(n.tag.isEOC())break;t[t.length]=n}r=o-i.pos}catch(t){throw new Error("Exception while decoding undefined length content: "+t)}return t};if(n.tagConstructed)s=c();else if(n.isUniversal()&&(3==n.tagNumber||4==n.tagNumber))try{if(3==n.tagNumber&&0!=i.get())throw new Error("BIT STRINGs with unused bits cannot encapsulate.");s=c();for(var l=0;l<s.length;++l)if(s[l].tag.isEOC())throw new Error("EOC is not supposed to be actual content.")}catch(t){s=null}if(null===s){if(null===r)throw new Error("We can't skip over an invalid tag with undefined length at offset "+o);i.pos=o+Math.abs(r)}return new u(e,a,r,n,s)},u}(),O=function(){function t(t){var e=t.get();if(this.tagClass=e>>6,this.tagConstructed=0!=(32&e),this.tagNumber=31&e,31==this.tagNumber){for(var n=new v;e=t.get(),n.mulAdd(128,127&e),128&e;);this.tagNumber=n.simplify()}}return t.prototype.isUniversal=function(){return 0===this.tagClass},t.prototype.isEOC=function(){return 0===this.tagClass&&0===this.tagNumber},t}(),C=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997],B=(1<<26)/C[C.length-1],D=function(){function b(t,e,n){null!=t&&("number"==typeof t?this.fromNumber(t,e,n):null==e&&"string"!=typeof t?this.fromString(t,256):this.fromString(t,e))}return b.prototype.toString=function(t){if(this.s<0)return"-"+this.negate().toString(t);var e;if(16==t)e=4;else if(8==t)e=3;else if(2==t)e=1;else if(32==t)e=5;else{if(4!=t)return this.toRadix(t);e=2}var n,i=(1<<e)-1,r=!1,o="",a=this.t,s=this.DB-a*this.DB%e;if(0<a--)for(s<this.DB&&0<(n=this[a]>>s)&&(r=!0,o=c(n));0<=a;)s<e?(n=(this[a]&(1<<s)-1)<<e-s,n|=this[--a]>>(s+=this.DB-e)):(n=this[a]>>(s-=e)&i,s<=0&&(s+=this.DB,--a)),0<n&&(r=!0),r&&(o+=c(n));return r?o:"0"},b.prototype.negate=function(){var t=P();return b.ZERO.subTo(this,t),t},b.prototype.abs=function(){return this.s<0?this.negate():this},b.prototype.compareTo=function(t){var e=this.s-t.s;if(0!=e)return e;var n=this.t;if(0!=(e=n-t.t))return this.s<0?-e:e;for(;0<=--n;)if(0!=(e=this[n]-t[n]))return e;return 0},b.prototype.bitLength=function(){return this.t<=0?0:this.DB*(this.t-1)+_(this[this.t-1]^this.s&this.DM)},b.prototype.mod=function(t){var e=P();return this.abs().divRemTo(t,null,e),this.s<0&&0<e.compareTo(b.ZERO)&&t.subTo(e,e),e},b.prototype.modPowInt=function(t,e){var n;return n=t<256||e.isEven()?new R(e):new I(e),this.exp(t,n)},b.prototype.clone=function(){var t=P();return this.copyTo(t),t},b.prototype.intValue=function(){if(this.s<0){if(1==this.t)return this[0]-this.DV;if(0==this.t)return-1}else{if(1==this.t)return this[0];if(0==this.t)return 0}return(this[1]&(1<<32-this.DB)-1)<<this.DB|this[0]},b.prototype.byteValue=function(){return 0==this.t?this.s:this[0]<<24>>24},b.prototype.shortValue=function(){return 0==this.t?this.s:this[0]<<16>>16},b.prototype.signum=function(){return this.s<0?-1:this.t<=0||1==this.t&&this[0]<=0?0:1},b.prototype.toByteArray=function(){var t=this.t,e=[];e[0]=this.s;var n,i=this.DB-t*this.DB%8,r=0;if(0<t--)for(i<this.DB&&(n=this[t]>>i)!=(this.s&this.DM)>>i&&(e[r++]=n|this.s<<this.DB-i);0<=t;)i<8?(n=(this[t]&(1<<i)-1)<<8-i,n|=this[--t]>>(i+=this.DB-8)):(n=this[t]>>(i-=8)&255,i<=0&&(i+=this.DB,--t)),0!=(128&n)&&(n|=-256),0==r&&(128&this.s)!=(128&n)&&++r,(0<r||n!=this.s)&&(e[r++]=n);return e},b.prototype.equals=function(t){return 0==this.compareTo(t)},b.prototype.min=function(t){return this.compareTo(t)<0?this:t},b.prototype.max=function(t){return 0<this.compareTo(t)?this:t},b.prototype.and=function(t){var e=P();return this.bitwiseTo(t,n,e),e},b.prototype.or=function(t){var e=P();return this.bitwiseTo(t,l,e),e},b.prototype.xor=function(t){var e=P();return this.bitwiseTo(t,i,e),e},b.prototype.andNot=function(t){var e=P();return this.bitwiseTo(t,r,e),e},b.prototype.not=function(){for(var t=P(),e=0;e<this.t;++e)t[e]=this.DM&~this[e];return t.t=this.t,t.s=~this.s,t},b.prototype.shiftLeft=function(t){var e=P();return t<0?this.rShiftTo(-t,e):this.lShiftTo(t,e),e},b.prototype.shiftRight=function(t){var e=P();return t<0?this.lShiftTo(-t,e):this.rShiftTo(t,e),e},b.prototype.getLowestSetBit=function(){for(var t=0;t<this.t;++t)if(0!=this[t])return t*this.DB+o(this[t]);return this.s<0?this.t*this.DB:-1},b.prototype.bitCount=function(){for(var t=0,e=this.s&this.DM,n=0;n<this.t;++n)t+=a(this[n]^e);return t},b.prototype.testBit=function(t){var e=Math.floor(t/this.DB);return e>=this.t?0!=this.s:0!=(this[e]&1<<t%this.DB)},b.prototype.setBit=function(t){return this.changeBit(t,l)},b.prototype.clearBit=function(t){return this.changeBit(t,r)},b.prototype.flipBit=function(t){return this.changeBit(t,i)},b.prototype.add=function(t){var e=P();return this.addTo(t,e),e},b.prototype.subtract=function(t){var e=P();return this.subTo(t,e),e},b.prototype.multiply=function(t){var e=P();return this.multiplyTo(t,e),e},b.prototype.divide=function(t){var e=P();return this.divRemTo(t,e,null),e},b.prototype.remainder=function(t){var e=P();return this.divRemTo(t,null,e),e},b.prototype.divideAndRemainder=function(t){var e=P(),n=P();return this.divRemTo(t,e,n),[e,n]},b.prototype.modPow=function(t,e){var n,i,r=t.bitLength(),o=F(1);if(r<=0)return o;n=r<18?1:r<48?3:r<144?4:r<768?5:6,i=r<8?new R(e):e.isEven()?new N(e):new I(e);var a=[],s=3,c=n-1,l=(1<<n)-1;if(a[1]=i.convert(this),1<n){var u=P();for(i.sqrTo(a[1],u);s<=l;)a[s]=P(),i.mulTo(u,a[s-2],a[s]),s+=2}var h,d,f=t.t-1,p=!0,g=P();for(r=_(t[f])-1;0<=f;){for(c<=r?h=t[f]>>r-c&l:(h=(t[f]&(1<<r+1)-1)<<c-r,0<f&&(h|=t[f-1]>>this.DB+r-c)),s=n;0==(1&h);)h>>=1,--s;if((r-=s)<0&&(r+=this.DB,--f),p)a[h].copyTo(o),p=!1;else{for(;1<s;)i.sqrTo(o,g),i.sqrTo(g,o),s-=2;0<s?i.sqrTo(o,g):(d=o,o=g,g=d),i.mulTo(g,a[h],o)}for(;0<=f&&0==(t[f]&1<<r);)i.sqrTo(o,g),d=o,o=g,g=d,--r<0&&(r=this.DB-1,--f)}return i.revert(o)},b.prototype.modInverse=function(t){var e=t.isEven();if(this.isEven()&&e||0==t.signum())return b.ZERO;for(var n=t.clone(),i=this.clone(),r=F(1),o=F(0),a=F(0),s=F(1);0!=n.signum();){for(;n.isEven();)n.rShiftTo(1,n),e?(r.isEven()&&o.isEven()||(r.addTo(this,r),o.subTo(t,o)),r.rShiftTo(1,r)):o.isEven()||o.subTo(t,o),o.rShiftTo(1,o);for(;i.isEven();)i.rShiftTo(1,i),e?(a.isEven()&&s.isEven()||(a.addTo(this,a),s.subTo(t,s)),a.rShiftTo(1,a)):s.isEven()||s.subTo(t,s),s.rShiftTo(1,s);0<=n.compareTo(i)?(n.subTo(i,n),e&&r.subTo(a,r),o.subTo(s,o)):(i.subTo(n,i),e&&a.subTo(r,a),s.subTo(o,s))}return 0!=i.compareTo(b.ONE)?b.ZERO:0<=s.compareTo(t)?s.subtract(t):s.signum()<0?(s.addTo(t,s),s.signum()<0?s.add(t):s):s},b.prototype.pow=function(t){return this.exp(t,new k)},b.prototype.gcd=function(t){var e=this.s<0?this.negate():this.clone(),n=t.s<0?t.negate():t.clone();if(e.compareTo(n)<0){var i=e;e=n,n=i}var r=e.getLowestSetBit(),o=n.getLowestSetBit();if(o<0)return e;for(r<o&&(o=r),0<o&&(e.rShiftTo(o,e),n.rShiftTo(o,n));0<e.signum();)0<(r=e.getLowestSetBit())&&e.rShiftTo(r,e),0<(r=n.getLowestSetBit())&&n.rShiftTo(r,n),0<=e.compareTo(n)?(e.subTo(n,e),e.rShiftTo(1,e)):(n.subTo(e,n),n.rShiftTo(1,n));return 0<o&&n.lShiftTo(o,n),n},b.prototype.isProbablePrime=function(t){var e,n=this.abs();if(1==n.t&&n[0]<=C[C.length-1]){for(e=0;e<C.length;++e)if(n[0]==C[e])return!0;return!1}if(n.isEven())return!1;for(e=1;e<C.length;){for(var i=C[e],r=e+1;r<C.length&&i<B;)i*=C[r++];for(i=n.modInt(i);e<r;)if(i%C[e++]==0)return!1}return n.millerRabin(t)},b.prototype.copyTo=function(t){for(var e=this.t-1;0<=e;--e)t[e]=this[e];t.t=this.t,t.s=this.s},b.prototype.fromInt=function(t){this.t=1,this.s=t<0?-1:0,0<t?this[0]=t:t<-1?this[0]=t+this.DV:this.t=0},b.prototype.fromString=function(t,e){var n;if(16==e)n=4;else if(8==e)n=3;else if(256==e)n=8;else if(2==e)n=1;else if(32==e)n=5;else{if(4!=e)return void this.fromRadix(t,e);n=2}this.t=0,this.s=0;for(var i=t.length,r=!1,o=0;0<=--i;){var a=8==n?255&+t[i]:U(t,i);a<0?"-"==t.charAt(i)&&(r=!0):(r=!1,0==o?this[this.t++]=a:o+n>this.DB?(this[this.t-1]|=(a&(1<<this.DB-o)-1)<<o,this[this.t++]=a>>this.DB-o):this[this.t-1]|=a<<o,(o+=n)>=this.DB&&(o-=this.DB))}8==n&&0!=(128&+t[0])&&(this.s=-1,0<o&&(this[this.t-1]|=(1<<this.DB-o)-1<<o)),this.clamp(),r&&b.ZERO.subTo(this,this)},b.prototype.clamp=function(){for(var t=this.s&this.DM;0<this.t&&this[this.t-1]==t;)--this.t},b.prototype.dlShiftTo=function(t,e){var n;for(n=this.t-1;0<=n;--n)e[n+t]=this[n];for(n=t-1;0<=n;--n)e[n]=0;e.t=this.t+t,e.s=this.s},b.prototype.drShiftTo=function(t,e){for(var n=t;n<this.t;++n)e[n-t]=this[n];e.t=Math.max(this.t-t,0),e.s=this.s},b.prototype.lShiftTo=function(t,e){for(var n=t%this.DB,i=this.DB-n,r=(1<<i)-1,o=Math.floor(t/this.DB),a=this.s<<n&this.DM,s=this.t-1;0<=s;--s)e[s+o+1]=this[s]>>i|a,a=(this[s]&r)<<n;for(var s=o-1;0<=s;--s)e[s]=0;e[o]=a,e.t=this.t+o+1,e.s=this.s,e.clamp()},b.prototype.rShiftTo=function(t,e){e.s=this.s;var n=Math.floor(t/this.DB);if(n>=this.t)e.t=0;else{var i=t%this.DB,r=this.DB-i,o=(1<<i)-1;e[0]=this[n]>>i;for(var a=n+1;a<this.t;++a)e[a-n-1]|=(this[a]&o)<<r,e[a-n]=this[a]>>i;0<i&&(e[this.t-n-1]|=(this.s&o)<<r),e.t=this.t-n,e.clamp()}},b.prototype.subTo=function(t,e){for(var n=0,i=0,r=Math.min(t.t,this.t);n<r;)i+=this[n]-t[n],e[n++]=i&this.DM,i>>=this.DB;if(t.t<this.t){for(i-=t.s;n<this.t;)i+=this[n],e[n++]=i&this.DM,i>>=this.DB;i+=this.s}else{for(i+=this.s;n<t.t;)i-=t[n],e[n++]=i&this.DM,i>>=this.DB;i-=t.s}e.s=i<0?-1:0,i<-1?e[n++]=this.DV+i:0<i&&(e[n++]=i),e.t=n,e.clamp()},b.prototype.multiplyTo=function(t,e){var n=this.abs(),i=t.abs(),r=n.t;for(e.t=r+i.t;0<=--r;)e[r]=0;for(r=0;r<i.t;++r)e[r+n.t]=n.am(0,i[r],e,r,0,n.t);e.s=0,e.clamp(),this.s!=t.s&&b.ZERO.subTo(e,e)},b.prototype.squareTo=function(t){for(var e=this.abs(),n=t.t=2*e.t;0<=--n;)t[n]=0;for(n=0;n<e.t-1;++n){var i=e.am(n,e[n],t,2*n,0,1);(t[n+e.t]+=e.am(n+1,2*e[n],t,2*n+1,i,e.t-n-1))>=e.DV&&(t[n+e.t]-=e.DV,t[n+e.t+1]=1)}0<t.t&&(t[t.t-1]+=e.am(n,e[n],t,2*n,0,1)),t.s=0,t.clamp()},b.prototype.divRemTo=function(t,e,n){var i=t.abs();if(!(i.t<=0)){var r=this.abs();if(r.t<i.t)return null!=e&&e.fromInt(0),void(null!=n&&this.copyTo(n));null==n&&(n=P());var o=P(),a=this.s,s=t.s,c=this.DB-_(i[i.t-1]);0<c?(i.lShiftTo(c,o),r.lShiftTo(c,n)):(i.copyTo(o),r.copyTo(n));var l=o.t,u=o[l-1];if(0!=u){var h=u*(1<<this.F1)+(1<l?o[l-2]>>this.F2:0),d=this.FV/h,f=(1<<this.F1)/h,p=1<<this.F2,g=n.t,m=g-l,y=null==e?P():e;for(o.dlShiftTo(m,y),0<=n.compareTo(y)&&(n[n.t++]=1,n.subTo(y,n)),b.ONE.dlShiftTo(l,y),y.subTo(o,o);o.t<l;)o[o.t++]=0;for(;0<=--m;){var v=n[--g]==u?this.DM:Math.floor(n[g]*d+(n[g-1]+p)*f);if((n[g]+=o.am(0,v,n,m,0,l))<v)for(o.dlShiftTo(m,y),n.subTo(y,n);n[g]<--v;)n.subTo(y,n)}null!=e&&(n.drShiftTo(l,e),a!=s&&b.ZERO.subTo(e,e)),n.t=l,n.clamp(),0<c&&n.rShiftTo(c,n),a<0&&b.ZERO.subTo(n,n)}}},b.prototype.invDigit=function(){if(this.t<1)return 0;var t=this[0];if(0==(1&t))return 0;var e=3&t;return 0<(e=(e=(e=(e=e*(2-(15&t)*e)&15)*(2-(255&t)*e)&255)*(2-((65535&t)*e&65535))&65535)*(2-t*e%this.DV)%this.DV)?this.DV-e:-e},b.prototype.isEven=function(){return 0==(0<this.t?1&this[0]:this.s)},b.prototype.exp=function(t,e){if(4294967295<t||t<1)return b.ONE;var n=P(),i=P(),r=e.convert(this),o=_(t)-1;for(r.copyTo(n);0<=--o;)if(e.sqrTo(n,i),0<(t&1<<o))e.mulTo(i,r,n);else{var a=n;n=i,i=a}return e.revert(n)},b.prototype.chunkSize=function(t){return Math.floor(Math.LN2*this.DB/Math.log(t))},b.prototype.toRadix=function(t){if(null==t&&(t=10),0==this.signum()||t<2||36<t)return"0";var e=this.chunkSize(t),n=Math.pow(t,e),i=F(n),r=P(),o=P(),a="";for(this.divRemTo(i,r,o);0<r.signum();)a=(n+o.intValue()).toString(t).substr(1)+a,r.divRemTo(i,r,o);return o.intValue().toString(t)+a},b.prototype.fromRadix=function(t,e){this.fromInt(0),null==e&&(e=10);for(var n=this.chunkSize(e),i=Math.pow(e,n),r=!1,o=0,a=0,s=0;s<t.length;++s){var c=U(t,s);c<0?"-"==t.charAt(s)&&0==this.signum()&&(r=!0):(a=e*a+c,++o>=n&&(this.dMultiply(i),this.dAddOffset(a,0),a=o=0))}0<o&&(this.dMultiply(Math.pow(e,o)),this.dAddOffset(a,0)),r&&b.ZERO.subTo(this,this)},b.prototype.fromNumber=function(t,e,n){if("number"==typeof e)if(t<2)this.fromInt(1);else for(this.fromNumber(t,n),this.testBit(t-1)||this.bitwiseTo(b.ONE.shiftLeft(t-1),l,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(e);)this.dAddOffset(2,0),this.bitLength()>t&&this.subTo(b.ONE.shiftLeft(t-1),this);else{var i=[],r=7&t;i.length=1+(t>>3),e.nextBytes(i),0<r?i[0]&=(1<<r)-1:i[0]=0,this.fromString(i,256)}},b.prototype.bitwiseTo=function(t,e,n){var i,r,o=Math.min(t.t,this.t);for(i=0;i<o;++i)n[i]=e(this[i],t[i]);if(t.t<this.t){for(r=t.s&this.DM,i=o;i<this.t;++i)n[i]=e(this[i],r);n.t=this.t}else{for(r=this.s&this.DM,i=o;i<t.t;++i)n[i]=e(r,t[i]);n.t=t.t}n.s=e(this.s,t.s),n.clamp()},b.prototype.changeBit=function(t,e){var n=b.ONE.shiftLeft(t);return this.bitwiseTo(n,e,n),n},b.prototype.addTo=function(t,e){for(var n=0,i=0,r=Math.min(t.t,this.t);n<r;)i+=this[n]+t[n],e[n++]=i&this.DM,i>>=this.DB;if(t.t<this.t){for(i+=t.s;n<this.t;)i+=this[n],e[n++]=i&this.DM,i>>=this.DB;i+=this.s}else{for(i+=this.s;n<t.t;)i+=t[n],e[n++]=i&this.DM,i>>=this.DB;i+=t.s}e.s=i<0?-1:0,0<i?e[n++]=i:i<-1&&(e[n++]=this.DV+i),e.t=n,e.clamp()},b.prototype.dMultiply=function(t){this[this.t]=this.am(0,t-1,this,0,0,this.t),++this.t,this.clamp()},b.prototype.dAddOffset=function(t,e){if(0!=t){for(;this.t<=e;)this[this.t++]=0;for(this[e]+=t;this[e]>=this.DV;)this[e]-=this.DV,++e>=this.t&&(this[this.t++]=0),++this[e]}},b.prototype.multiplyLowerTo=function(t,e,n){var i=Math.min(this.t+t.t,e);for(n.s=0,n.t=i;0<i;)n[--i]=0;for(var r=n.t-this.t;i<r;++i)n[i+this.t]=this.am(0,t[i],n,i,0,this.t);for(var r=Math.min(t.t,e);i<r;++i)this.am(0,t[i],n,i,0,e-i);n.clamp()},b.prototype.multiplyUpperTo=function(t,e,n){--e;var i=n.t=this.t+t.t-e;for(n.s=0;0<=--i;)n[i]=0;for(i=Math.max(e-this.t,0);i<t.t;++i)n[this.t+i-e]=this.am(e-i,t[i],n,0,0,this.t+i-e);n.clamp(),n.drShiftTo(1,n)},b.prototype.modInt=function(t){if(t<=0)return 0;var e=this.DV%t,n=this.s<0?t-1:0;if(0<this.t)if(0==e)n=this[0]%t;else for(var i=this.t-1;0<=i;--i)n=(e*n+this[i])%t;return n},b.prototype.millerRabin=function(t){var e=this.subtract(b.ONE),n=e.getLowestSetBit();if(n<=0)return!1;var i=e.shiftRight(n);C.length<(t=t+1>>1)&&(t=C.length);for(var r=P(),o=0;o<t;++o){r.fromInt(C[Math.floor(Math.random()*C.length)]);var a=r.modPow(i,this);if(0!=a.compareTo(b.ONE)&&0!=a.compareTo(e)){for(var s=1;s++<n&&0!=a.compareTo(e);)if(0==(a=a.modPowInt(2,this)).compareTo(b.ONE))return!1;if(0!=a.compareTo(e))return!1}}return!0},b.prototype.square=function(){var t=P();return this.squareTo(t),t},b.prototype.gcda=function(t,e){var n=this.s<0?this.negate():this.clone(),i=t.s<0?t.negate():t.clone();if(n.compareTo(i)<0){var r=n;n=i,i=r}var o=n.getLowestSetBit(),a=i.getLowestSetBit();if(a<0)e(n);else{o<a&&(a=o),0<a&&(n.rShiftTo(a,n),i.rShiftTo(a,i));var s=function(){0<(o=n.getLowestSetBit())&&n.rShiftTo(o,n),0<(o=i.getLowestSetBit())&&i.rShiftTo(o,i),0<=n.compareTo(i)?(n.subTo(i,n),n.rShiftTo(1,n)):(i.subTo(n,i),i.rShiftTo(1,i)),0<n.signum()?setTimeout(s,0):(0<a&&i.lShiftTo(a,i),setTimeout(function(){e(i)},0))};setTimeout(s,10)}},b.prototype.fromNumberAsync=function(t,e,n,i){if("number"==typeof e)if(t<2)this.fromInt(1);else{this.fromNumber(t,n),this.testBit(t-1)||this.bitwiseTo(b.ONE.shiftLeft(t-1),l,this),this.isEven()&&this.dAddOffset(1,0);var r=this,o=function(){r.dAddOffset(2,0),r.bitLength()>t&&r.subTo(b.ONE.shiftLeft(t-1),r),r.isProbablePrime(e)?setTimeout(function(){i()},0):setTimeout(o,0)};setTimeout(o,0)}else{var a=[],s=7&t;a.length=1+(t>>3),e.nextBytes(a),0<s?a[0]&=(1<<s)-1:a[0]=0,this.fromString(a,256)}},b}(),k=function(){function t(){}return t.prototype.convert=function(t){return t},t.prototype.revert=function(t){return t},t.prototype.mulTo=function(t,e,n){t.multiplyTo(e,n)},t.prototype.sqrTo=function(t,e){t.squareTo(e)},t}(),R=function(){function t(t){this.m=t}return t.prototype.convert=function(t){return t.s<0||0<=t.compareTo(this.m)?t.mod(this.m):t},t.prototype.revert=function(t){return t},t.prototype.reduce=function(t){t.divRemTo(this.m,null,t)},t.prototype.mulTo=function(t,e,n){t.multiplyTo(e,n),this.reduce(n)},t.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)},t}(),I=function(){function t(t){this.m=t,this.mp=t.invDigit(),this.mpl=32767&this.mp,this.mph=this.mp>>15,this.um=(1<<t.DB-15)-1,this.mt2=2*t.t}return t.prototype.convert=function(t){var e=P();return t.abs().dlShiftTo(this.m.t,e),e.divRemTo(this.m,null,e),t.s<0&&0<e.compareTo(D.ZERO)&&this.m.subTo(e,e),e},t.prototype.revert=function(t){var e=P();return t.copyTo(e),this.reduce(e),e},t.prototype.reduce=function(t){for(;t.t<=this.mt2;)t[t.t++]=0;for(var e=0;e<this.m.t;++e){var n=32767&t[e],i=n*this.mpl+((n*this.mph+(t[e]>>15)*this.mpl&this.um)<<15)&t.DM;for(n=e+this.m.t,t[n]+=this.m.am(0,i,t,e,0,this.m.t);t[n]>=t.DV;)t[n]-=t.DV,t[++n]++}t.clamp(),t.drShiftTo(this.m.t,t),0<=t.compareTo(this.m)&&t.subTo(this.m,t)},t.prototype.mulTo=function(t,e,n){t.multiplyTo(e,n),this.reduce(n)},t.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)},t}(),N=function(){function t(t){this.m=t,this.r2=P(),this.q3=P(),D.ONE.dlShiftTo(2*t.t,this.r2),this.mu=this.r2.divide(t)}return t.prototype.convert=function(t){if(t.s<0||t.t>2*this.m.t)return t.mod(this.m);if(t.compareTo(this.m)<0)return t;var e=P();return t.copyTo(e),this.reduce(e),e},t.prototype.revert=function(t){return t},t.prototype.reduce=function(t){for(t.drShiftTo(this.m.t-1,this.r2),t.t>this.m.t+1&&(t.t=this.m.t+1,t.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);t.compareTo(this.r2)<0;)t.dAddOffset(1,this.m.t+1);for(t.subTo(this.r2,t);0<=t.compareTo(this.m);)t.subTo(this.m,t)},t.prototype.mulTo=function(t,e,n){t.multiplyTo(e,n),this.reduce(n)},t.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)},t}();function P(){return new D(null)}function M(t,e){return new D(t,e)}E="Microsoft Internet Explorer"==navigator.appName?(D.prototype.am=function(t,e,n,i,r,o){for(var a=32767&e,s=e>>15;0<=--o;){var c=32767&this[t],l=this[t++]>>15,u=s*c+l*a;c=a*c+((32767&u)<<15)+n[i]+(1073741823&r),r=(c>>>30)+(u>>>15)+s*l+(r>>>30),n[i++]=1073741823&c}return r},30):"Netscape"!=navigator.appName?(D.prototype.am=function(t,e,n,i,r,o){for(;0<=--o;){var a=e*this[t++]+n[i]+r;r=Math.floor(a/67108864),n[i++]=67108863&a}return r},26):(D.prototype.am=function(t,e,n,i,r,o){for(var a=16383&e,s=e>>14;0<=--o;){var c=16383&this[t],l=this[t++]>>14,u=s*c+l*a;c=a*c+((16383&u)<<14)+n[i]+r,r=(c>>28)+(u>>14)+s*l,n[i++]=268435455&c}return r},28),D.prototype.DB=E,D.prototype.DM=(1<<E)-1,D.prototype.DV=1<<E,D.prototype.FV=Math.pow(2,52),D.prototype.F1=52-E,D.prototype.F2=2*E-52;var L,V,j=[];for(L="0".charCodeAt(0),V=0;V<=9;++V)j[L++]=V;for(L="a".charCodeAt(0),V=10;V<36;++V)j[L++]=V;for(L="A".charCodeAt(0),V=10;V<36;++V)j[L++]=V;function U(t,e){var n=j[t.charCodeAt(e)];return null==n?-1:n}function F(t){var e=P();return e.fromInt(t),e}function _(t){var e,n=1;return 0!=(e=t>>>16)&&(t=e,n+=16),0!=(e=t>>8)&&(t=e,n+=8),0!=(e=t>>4)&&(t=e,n+=4),0!=(e=t>>2)&&(t=e,n+=2),0!=(e=t>>1)&&(t=e,n+=1),n}D.ZERO=F(0),D.ONE=F(1);var H,X,z=function(){function t(){this.i=0,this.j=0,this.S=[]}return t.prototype.init=function(t){var e,n,i;for(e=0;e<256;++e)this.S[e]=e;for(e=n=0;e<256;++e)n=n+this.S[e]+t[e%t.length]&255,i=this.S[e],this.S[e]=this.S[n],this.S[n]=i;this.i=0,this.j=0},t.prototype.next=function(){var t;return this.i=this.i+1&255,this.j=this.j+this.S[this.i]&255,t=this.S[this.i],this.S[this.i]=this.S[this.j],this.S[this.j]=t,this.S[t+this.S[this.i]&255]},t}(),W=256,q=null;if(null==q){q=[];var G=void(X=0);if(window.crypto&&window.crypto.getRandomValues){var K=new Uint32Array(256);for(window.crypto.getRandomValues(K),G=0;G<K.length;++G)q[X++]=255&K[G]}var J=function(t){if(this.count=this.count||0,256<=this.count||W<=X)window.removeEventListener?window.removeEventListener("mousemove",J,!1):window.detachEvent&&window.detachEvent("onmousemove",J);else try{var e=t.x+t.y;q[X++]=255&e,this.count+=1}catch(t){}};window.addEventListener?window.addEventListener("mousemove",J,!1):window.attachEvent&&window.attachEvent("onmousemove",J)}function Y(){if(null==H){for(H=new z;X<W;){var t=Math.floor(65536*Math.random());q[X++]=255&t}for(H.init(q),X=0;X<q.length;++X)q[X]=0;X=0}return H.next()}var Q=function(){function t(){}return t.prototype.nextBytes=function(t){for(var e=0;e<t.length;++e)t[e]=Y()},t}(),Z=function(){function t(){this.n=null,this.e=0,this.d=null,this.p=null,this.q=null,this.dmp1=null,this.dmq1=null,this.coeff=null}return t.prototype.doPublic=function(t){return t.modPowInt(this.e,this.n)},t.prototype.doPrivate=function(t){if(null==this.p||null==this.q)return t.modPow(this.d,this.n);for(var e=t.mod(this.p).modPow(this.dmp1,this.p),n=t.mod(this.q).modPow(this.dmq1,this.q);e.compareTo(n)<0;)e=e.add(this.p);return e.subtract(n).multiply(this.coeff).mod(this.p).multiply(this.q).add(n)},t.prototype.setPublic=function(t,e){null!=t&&null!=e&&0<t.length&&0<e.length?(this.n=M(t,16),this.e=parseInt(e,16)):console.error("Invalid RSA public key")},t.prototype.encrypt=function(t){var e=function(t,e){if(e<t.length+11)return console.error("Message too long for RSA"),null;for(var n=[],i=t.length-1;0<=i&&0<e;){var r=t.charCodeAt(i--);n[--e]=r<128?r:127<r&&r<2048?(n[--e]=63&r|128,r>>6|192):(n[--e]=63&r|128,n[--e]=r>>6&63|128,r>>12|224)}n[--e]=0;for(var o=new Q,a=[];2<e;){for(a[0]=0;0==a[0];)o.nextBytes(a);n[--e]=a[0]}return n[--e]=2,n[--e]=0,new D(n)}(t,this.n.bitLength()+7>>3);if(null==e)return null;var n=this.doPublic(e);if(null==n)return null;var i=n.toString(16);return 0==(1&i.length)?i:"0"+i},t.prototype.setPrivate=function(t,e,n){null!=t&&null!=e&&0<t.length&&0<e.length?(this.n=M(t,16),this.e=parseInt(e,16),this.d=M(n,16)):console.error("Invalid RSA private key")},t.prototype.setPrivateEx=function(t,e,n,i,r,o,a,s){null!=t&&null!=e&&0<t.length&&0<e.length?(this.n=M(t,16),this.e=parseInt(e,16),this.d=M(n,16),this.p=M(i,16),this.q=M(r,16),this.dmp1=M(o,16),this.dmq1=M(a,16),this.coeff=M(s,16)):console.error("Invalid RSA private key")},t.prototype.generate=function(t,e){var n=new Q,i=t>>1;this.e=parseInt(e,16);for(var r=new D(e,16);;){for(;this.p=new D(t-i,1,n),0!=this.p.subtract(D.ONE).gcd(r).compareTo(D.ONE)||!this.p.isProbablePrime(10););for(;this.q=new D(i,1,n),0!=this.q.subtract(D.ONE).gcd(r).compareTo(D.ONE)||!this.q.isProbablePrime(10););if(this.p.compareTo(this.q)<=0){var o=this.p;this.p=this.q,this.q=o}var a=this.p.subtract(D.ONE),s=this.q.subtract(D.ONE),c=a.multiply(s);if(0==c.gcd(r).compareTo(D.ONE)){this.n=this.p.multiply(this.q),this.d=r.modInverse(c),this.dmp1=this.d.mod(a),this.dmq1=this.d.mod(s),this.coeff=this.q.modInverse(this.p);break}}},t.prototype.decrypt=function(t){var e=M(t,16),n=this.doPrivate(e);return null==n?null:function(t,e){for(var n=t.toByteArray(),i=0;i<n.length&&0==n[i];)++i;if(n.length-i!=e-1||2!=n[i])return null;for(++i;0!=n[i];)if(++i>=n.length)return null;for(var r="";++i<n.length;){var o=255&n[i];o<128?r+=String.fromCharCode(o):191<o&&o<224?(r+=String.fromCharCode((31&o)<<6|63&n[i+1]),++i):(r+=String.fromCharCode((15&o)<<12|(63&n[i+1])<<6|63&n[i+2]),i+=2)}return r}(n,this.n.bitLength()+7>>3)},t.prototype.generateAsync=function(t,e,r){var o=new Q,a=t>>1;this.e=parseInt(e,16);var s=new D(e,16),c=this,l=function(){var e=function(){if(c.p.compareTo(c.q)<=0){var t=c.p;c.p=c.q,c.q=t}var e=c.p.subtract(D.ONE),n=c.q.subtract(D.ONE),i=e.multiply(n);0==i.gcd(s).compareTo(D.ONE)?(c.n=c.p.multiply(c.q),c.d=s.modInverse(i),c.dmp1=c.d.mod(e),c.dmq1=c.d.mod(n),c.coeff=c.q.modInverse(c.p),setTimeout(function(){r()},0)):setTimeout(l,0)},n=function(){c.q=P(),c.q.fromNumberAsync(a,1,o,function(){c.q.subtract(D.ONE).gcda(s,function(t){0==t.compareTo(D.ONE)&&c.q.isProbablePrime(10)?setTimeout(e,0):setTimeout(n,0)})})},i=function(){c.p=P(),c.p.fromNumberAsync(t-a,1,o,function(){c.p.subtract(D.ONE).gcda(s,function(t){0==t.compareTo(D.ONE)&&c.p.isProbablePrime(10)?setTimeout(n,0):setTimeout(i,0)})})};setTimeout(i,0)};setTimeout(l,0)},t.prototype.sign=function(t,e,n){var i=$[n]||"",r=i+e(t).toString(),o=function(t,e){if(e<t.length+22)return console.error("Message too long for RSA"),null;for(var n=e-t.length-6,i="",r=0;r<n;r+=2)i+="ff";return M("0001"+i+"00"+t,16)}(r,this.n.bitLength()/4);if(null==o)return null;var a=this.doPrivate(o);if(null==a)return null;var s=a.toString(16);return 0==(1&s.length)?s:"0"+s},t.prototype.verify=function(t,e,n){var i=M(e,16),r=this.doPublic(i);if(null==r)return null;var o=r.toString(16).replace(/^1f+00/,""),a=function(t){for(var e in $)if($.hasOwnProperty(e)){var n=$[e],i=n.length;if(t.substr(0,i)==n)return t.substr(i)}return t}(o);return a==n(t).toString()},t}(),$={md2:"3020300c06082a864886f70d020205000410",md5:"3020300c06082a864886f70d020505000410",sha1:"3021300906052b0e03021a05000414",sha224:"302d300d06096086480165030402040500041c",sha256:"3031300d060960864801650304020105000420",sha384:"3041300d060960864801650304020205000430",sha512:"3051300d060960864801650304020305000440",ripemd160:"3021300906052b2403020105000414"},tt={};tt.lang={extend:function(t,e,n){if(!e||!t)throw new Error("YAHOO.lang.extend failed, please check that all dependencies are included.");var i=function(){};if(i.prototype=e.prototype,t.prototype=new i,(t.prototype.constructor=t).superclass=e.prototype,e.prototype.constructor==Object.prototype.constructor&&(e.prototype.constructor=e),n){var r;for(r in n)t.prototype[r]=n[r];var o=function(){},a=["toString","valueOf"];try{/MSIE/.test(navigator.userAgent)&&(o=function(t,e){for(r=0;r<a.length;r+=1){var n=a[r],i=e[n];"function"==typeof i&&i!=Object.prototype[n]&&(t[n]=i)}})}catch(t){}o(t.prototype,n)}}};var et={};void 0!==et.asn1&&et.asn1||(et.asn1={}),et.asn1.ASN1Util=new function(){this.integerToByteHex=function(t){var e=t.toString(16);return e.length%2==1&&(e="0"+e),e},this.bigIntToMinTwosComplementsHex=function(t){var e=t.toString(16);if("-"!=e.substr(0,1))e.length%2==1?e="0"+e:e.match(/^[0-7]/)||(e="00"+e);else{var n=e.substr(1),i=n.length;i%2==1?i+=1:e.match(/^[0-7]/)||(i+=2);for(var r="",o=0;o<i;o++)r+="f";var a=new D(r,16),s=a.xor(t).add(D.ONE);e=s.toString(16).replace(/^-/,"")}return e},this.getPEMStringFromHex=function(t,e){return hextopem(t,e)},this.newObject=function(t){var e=et,n=e.asn1,i=n.DERBoolean,r=n.DERInteger,o=n.DERBitString,a=n.DEROctetString,s=n.DERNull,c=n.DERObjectIdentifier,l=n.DEREnumerated,u=n.DERUTF8String,h=n.DERNumericString,d=n.DERPrintableString,f=n.DERTeletexString,p=n.DERIA5String,g=n.DERUTCTime,m=n.DERGeneralizedTime,y=n.DERSequence,v=n.DERSet,b=n.DERTaggedObject,w=n.ASN1Util.newObject,T=Object.keys(t);if(1!=T.length)throw"key of param shall be only one.";var A=T[0];if(-1==":bool:int:bitstr:octstr:null:oid:enum:utf8str:numstr:prnstr:telstr:ia5str:utctime:gentime:seq:set:tag:".indexOf(":"+A+":"))throw"undefined key: "+A;if("bool"==A)return new i(t[A]);if("int"==A)return new r(t[A]);if("bitstr"==A)return new o(t[A]);if("octstr"==A)return new a(t[A]);if("null"==A)return new s(t[A]);if("oid"==A)return new c(t[A]);if("enum"==A)return new l(t[A]);if("utf8str"==A)return new u(t[A]);if("numstr"==A)return new h(t[A]);if("prnstr"==A)return new d(t[A]);if("telstr"==A)return new f(t[A]);if("ia5str"==A)return new p(t[A]);if("utctime"==A)return new g(t[A]);if("gentime"==A)return new m(t[A]);if("seq"==A){for(var E=t[A],x=[],S=0;S<E.length;S++){var O=w(E[S]);x.push(O)}return new y({array:x})}if("set"==A){for(var E=t[A],x=[],S=0;S<E.length;S++){var O=w(E[S]);x.push(O)}return new v({array:x})}if("tag"==A){var C=t[A];if("[object Array]"===Object.prototype.toString.call(C)&&3==C.length){var B=w(C[2]);return new b({tag:C[0],explicit:C[1],obj:B})}var D={};if(void 0!==C.explicit&&(D.explicit=C.explicit),void 0!==C.tag&&(D.tag=C.tag),void 0===C.obj)throw"obj shall be specified for 'tag'.";return D.obj=w(C.obj),new b(D)}},this.jsonToASN1HEX=function(t){var e=this.newObject(t);return e.getEncodedHex()}},et.asn1.ASN1Util.oidHexToInt=function(t){for(var e="",n=parseInt(t.substr(0,2),16),i=Math.floor(n/40),r=n%40,e=i+"."+r,o="",a=2;a<t.length;a+=2){var s=parseInt(t.substr(a,2),16),c=("00000000"+s.toString(2)).slice(-8);if(o+=c.substr(1,7),"0"==c.substr(0,1)){var l=new D(o,2);e=e+"."+l.toString(10),o=""}}return e},et.asn1.ASN1Util.oidIntToHex=function(t){var c=function(t){var e=t.toString(16);return 1==e.length&&(e="0"+e),e},e=function(t){var e="",n=new D(t,10),i=n.toString(2),r=7-i.length%7;7==r&&(r=0);for(var o="",a=0;a<r;a++)o+="0";i=o+i;for(var a=0;a<i.length-1;a+=7){var s=i.substr(a,7);a!=i.length-7&&(s="1"+s),e+=c(parseInt(s,2))}return e};if(!t.match(/^[0-9.]+$/))throw"malformed oid string: "+t;var n="",i=t.split("."),r=40*parseInt(i[0])+parseInt(i[1]);n+=c(r),i.splice(0,2);for(var o=0;o<i.length;o++)n+=e(i[o]);return n},et.asn1.ASN1Object=function(){this.getLengthHexFromValue=function(){if(void 0===this.hV||null==this.hV)throw"this.hV is null or undefined.";if(this.hV.length%2==1)throw"value hex must be even length: n="+"".length+",v="+this.hV;var t=this.hV.length/2,e=t.toString(16);if(e.length%2==1&&(e="0"+e),t<128)return e;var n=e.length/2;if(15<n)throw"ASN.1 length too long to represent by 8x: n = "+t.toString(16);var i=128+n;return i.toString(16)+e},this.getEncodedHex=function(){return(null==this.hTLV||this.isModified)&&(this.hV=this.getFreshValueHex(),this.hL=this.getLengthHexFromValue(),this.hTLV=this.hT+this.hL+this.hV,this.isModified=!1),this.hTLV},this.getValueHex=function(){return this.getEncodedHex(),this.hV},this.getFreshValueHex=function(){return""}},et.asn1.DERAbstractString=function(t){et.asn1.DERAbstractString.superclass.constructor.call(this),this.getString=function(){return this.s},this.setString=function(t){this.hTLV=null,this.isModified=!0,this.s=t,this.hV=stohex(this.s)},this.setStringHex=function(t){this.hTLV=null,this.isModified=!0,this.s=null,this.hV=t},this.getFreshValueHex=function(){return this.hV},void 0!==t&&("string"==typeof t?this.setString(t):void 0!==t.str?this.setString(t.str):void 0!==t.hex&&this.setStringHex(t.hex))},tt.lang.extend(et.asn1.DERAbstractString,et.asn1.ASN1Object),et.asn1.DERAbstractTime=function(t){et.asn1.DERAbstractTime.superclass.constructor.call(this),this.localDateToUTC=function(t){utc=t.getTime()+6e4*t.getTimezoneOffset();var e=new Date(utc);return e},this.formatDate=function(t,e,n){var i=this.zeroPadding,r=this.localDateToUTC(t),o=String(r.getFullYear());"utc"==e&&(o=o.substr(2,2));var a=i(String(r.getMonth()+1),2),s=i(String(r.getDate()),2),c=i(String(r.getHours()),2),l=i(String(r.getMinutes()),2),u=i(String(r.getSeconds()),2),h=o+a+s+c+l+u;if(!0===n){var d=r.getMilliseconds();if(0!=d){var f=i(String(d),3);f=f.replace(/[0]+$/,""),h=h+"."+f}}return h+"Z"},this.zeroPadding=function(t,e){return t.length>=e?t:new Array(e-t.length+1).join("0")+t},this.getString=function(){return this.s},this.setString=function(t){this.hTLV=null,this.isModified=!0,this.s=t,this.hV=stohex(t)},this.setByDateValue=function(t,e,n,i,r,o){var a=new Date(Date.UTC(t,e-1,n,i,r,o,0));this.setByDate(a)},this.getFreshValueHex=function(){return this.hV}},tt.lang.extend(et.asn1.DERAbstractTime,et.asn1.ASN1Object),et.asn1.DERAbstractStructured=function(t){et.asn1.DERAbstractString.superclass.constructor.call(this),this.setByASN1ObjectArray=function(t){this.hTLV=null,this.isModified=!0,this.asn1Array=t},this.appendASN1Object=function(t){this.hTLV=null,this.isModified=!0,this.asn1Array.push(t)},this.asn1Array=new Array,void 0!==t&&void 0!==t.array&&(this.asn1Array=t.array)},tt.lang.extend(et.asn1.DERAbstractStructured,et.asn1.ASN1Object),et.asn1.DERBoolean=function(){et.asn1.DERBoolean.superclass.constructor.call(this),this.hT="01",this.hTLV="0101ff"},tt.lang.extend(et.asn1.DERBoolean,et.asn1.ASN1Object),et.asn1.DERInteger=function(t){et.asn1.DERInteger.superclass.constructor.call(this),this.hT="02",this.setByBigInteger=function(t){this.hTLV=null,this.isModified=!0,this.hV=et.asn1.ASN1Util.bigIntToMinTwosComplementsHex(t)},this.setByInteger=function(t){var e=new D(String(t),10);this.setByBigInteger(e)},this.setValueHex=function(t){this.hV=t},this.getFreshValueHex=function(){return this.hV},void 0!==t&&(void 0!==t.bigint?this.setByBigInteger(t.bigint):void 0!==t.int?this.setByInteger(t.int):"number"==typeof t?this.setByInteger(t):void 0!==t.hex&&this.setValueHex(t.hex))},tt.lang.extend(et.asn1.DERInteger,et.asn1.ASN1Object),et.asn1.DERBitString=function(t){if(void 0!==t&&void 0!==t.obj){var e=et.asn1.ASN1Util.newObject(t.obj);t.hex="00"+e.getEncodedHex()}et.asn1.DERBitString.superclass.constructor.call(this),this.hT="03",this.setHexValueIncludingUnusedBits=function(t){this.hTLV=null,this.isModified=!0,this.hV=t},this.setUnusedBitsAndHexValue=function(t,e){if(t<0||7<t)throw"unused bits shall be from 0 to 7: u = "+t;var n="0"+t;this.hTLV=null,this.isModified=!0,this.hV=n+e},this.setByBinaryString=function(t){var e=8-(t=t.replace(/0+$/,"")).length%8;8==e&&(e=0);for(var n=0;n<=e;n++)t+="0";for(var i="",n=0;n<t.length-1;n+=8){var r=t.substr(n,8),o=parseInt(r,2).toString(16);1==o.length&&(o="0"+o),i+=o}this.hTLV=null,this.isModified=!0,this.hV="0"+e+i},this.setByBooleanArray=function(t){for(var e="",n=0;n<t.length;n++)1==t[n]?e+="1":e+="0";this.setByBinaryString(e)},this.newFalseArray=function(t){for(var e=new Array(t),n=0;n<t;n++)e[n]=!1;return e},this.getFreshValueHex=function(){return this.hV},void 0!==t&&("string"==typeof t&&t.toLowerCase().match(/^[0-9a-f]+$/)?this.setHexValueIncludingUnusedBits(t):void 0!==t.hex?this.setHexValueIncludingUnusedBits(t.hex):void 0!==t.bin?this.setByBinaryString(t.bin):void 0!==t.array&&this.setByBooleanArray(t.array))},tt.lang.extend(et.asn1.DERBitString,et.asn1.ASN1Object),et.asn1.DEROctetString=function(t){if(void 0!==t&&void 0!==t.obj){var e=et.asn1.ASN1Util.newObject(t.obj);t.hex=e.getEncodedHex()}et.asn1.DEROctetString.superclass.constructor.call(this,t),this.hT="04"},tt.lang.extend(et.asn1.DEROctetString,et.asn1.DERAbstractString),et.asn1.DERNull=function(){et.asn1.DERNull.superclass.constructor.call(this),this.hT="05",this.hTLV="0500"},tt.lang.extend(et.asn1.DERNull,et.asn1.ASN1Object),et.asn1.DERObjectIdentifier=function(t){var c=function(t){var e=t.toString(16);return 1==e.length&&(e="0"+e),e},o=function(t){var e="",n=new D(t,10),i=n.toString(2),r=7-i.length%7;7==r&&(r=0);for(var o="",a=0;a<r;a++)o+="0";i=o+i;for(var a=0;a<i.length-1;a+=7){var s=i.substr(a,7);a!=i.length-7&&(s="1"+s),e+=c(parseInt(s,2))}return e};et.asn1.DERObjectIdentifier.superclass.constructor.call(this),this.hT="06",this.setValueHex=function(t){this.hTLV=null,this.isModified=!0,this.s=null,this.hV=t},this.setValueOidString=function(t){if(!t.match(/^[0-9.]+$/))throw"malformed oid string: "+t;var e="",n=t.split("."),i=40*parseInt(n[0])+parseInt(n[1]);e+=c(i),n.splice(0,2);for(var r=0;r<n.length;r++)e+=o(n[r]);this.hTLV=null,this.isModified=!0,this.s=null,this.hV=e},this.setValueName=function(t){var e=et.asn1.x509.OID.name2oid(t);if(""===e)throw"DERObjectIdentifier oidName undefined: "+t;this.setValueOidString(e)},this.getFreshValueHex=function(){return this.hV},void 0!==t&&("string"==typeof t?t.match(/^[0-2].[0-9.]+$/)?this.setValueOidString(t):this.setValueName(t):void 0!==t.oid?this.setValueOidString(t.oid):void 0!==t.hex?this.setValueHex(t.hex):void 0!==t.name&&this.setValueName(t.name))},tt.lang.extend(et.asn1.DERObjectIdentifier,et.asn1.ASN1Object),et.asn1.DEREnumerated=function(t){et.asn1.DEREnumerated.superclass.constructor.call(this),this.hT="0a",this.setByBigInteger=function(t){this.hTLV=null,this.isModified=!0,this.hV=et.asn1.ASN1Util.bigIntToMinTwosComplementsHex(t)},this.setByInteger=function(t){var e=new D(String(t),10);this.setByBigInteger(e)},this.setValueHex=function(t){this.hV=t},this.getFreshValueHex=function(){return this.hV},void 0!==t&&(void 0!==t.int?this.setByInteger(t.int):"number"==typeof t?this.setByInteger(t):void 0!==t.hex&&this.setValueHex(t.hex))},tt.lang.extend(et.asn1.DEREnumerated,et.asn1.ASN1Object),et.asn1.DERUTF8String=function(t){et.asn1.DERUTF8String.superclass.constructor.call(this,t),this.hT="0c"},tt.lang.extend(et.asn1.DERUTF8String,et.asn1.DERAbstractString),et.asn1.DERNumericString=function(t){et.asn1.DERNumericString.superclass.constructor.call(this,t),this.hT="12"},tt.lang.extend(et.asn1.DERNumericString,et.asn1.DERAbstractString),et.asn1.DERPrintableString=function(t){et.asn1.DERPrintableString.superclass.constructor.call(this,t),this.hT="13"},tt.lang.extend(et.asn1.DERPrintableString,et.asn1.DERAbstractString),et.asn1.DERTeletexString=function(t){et.asn1.DERTeletexString.superclass.constructor.call(this,t),this.hT="14"},tt.lang.extend(et.asn1.DERTeletexString,et.asn1.DERAbstractString),et.asn1.DERIA5String=function(t){et.asn1.DERIA5String.superclass.constructor.call(this,t),this.hT="16"},tt.lang.extend(et.asn1.DERIA5String,et.asn1.DERAbstractString),et.asn1.DERUTCTime=function(t){et.asn1.DERUTCTime.superclass.constructor.call(this,t),this.hT="17",this.setByDate=function(t){this.hTLV=null,this.isModified=!0,this.date=t,this.s=this.formatDate(this.date,"utc"),this.hV=stohex(this.s)},this.getFreshValueHex=function(){return void 0===this.date&&void 0===this.s&&(this.date=new Date,this.s=this.formatDate(this.date,"utc"),this.hV=stohex(this.s)),this.hV},void 0!==t&&(void 0!==t.str?this.setString(t.str):"string"==typeof t&&t.match(/^[0-9]{12}Z$/)?this.setString(t):void 0!==t.hex?this.setStringHex(t.hex):void 0!==t.date&&this.setByDate(t.date))},tt.lang.extend(et.asn1.DERUTCTime,et.asn1.DERAbstractTime),et.asn1.DERGeneralizedTime=function(t){et.asn1.DERGeneralizedTime.superclass.constructor.call(this,t),this.hT="18",this.withMillis=!1,this.setByDate=function(t){this.hTLV=null,this.isModified=!0,this.date=t,this.s=this.formatDate(this.date,"gen",this.withMillis),this.hV=stohex(this.s)},this.getFreshValueHex=function(){return void 0===this.date&&void 0===this.s&&(this.date=new Date,this.s=this.formatDate(this.date,"gen",this.withMillis),this.hV=stohex(this.s)),this.hV},void 0!==t&&(void 0!==t.str?this.setString(t.str):"string"==typeof t&&t.match(/^[0-9]{14}Z$/)?this.setString(t):void 0!==t.hex?this.setStringHex(t.hex):void 0!==t.date&&this.setByDate(t.date),!0===t.millis&&(this.withMillis=!0))},tt.lang.extend(et.asn1.DERGeneralizedTime,et.asn1.DERAbstractTime),et.asn1.DERSequence=function(t){et.asn1.DERSequence.superclass.constructor.call(this,t),this.hT="30",this.getFreshValueHex=function(){for(var t="",e=0;e<this.asn1Array.length;e++){var n=this.asn1Array[e];t+=n.getEncodedHex()}return this.hV=t,this.hV}},tt.lang.extend(et.asn1.DERSequence,et.asn1.DERAbstractStructured),et.asn1.DERSet=function(t){et.asn1.DERSet.superclass.constructor.call(this,t),this.hT="31",this.sortFlag=!0,this.getFreshValueHex=function(){for(var t=new Array,e=0;e<this.asn1Array.length;e++){var n=this.asn1Array[e];t.push(n.getEncodedHex())}return 1==this.sortFlag&&t.sort(),this.hV=t.join(""),this.hV},void 0!==t&&void 0!==t.sortflag&&0==t.sortflag&&(this.sortFlag=!1)},tt.lang.extend(et.asn1.DERSet,et.asn1.DERAbstractStructured),et.asn1.DERTaggedObject=function(t){et.asn1.DERTaggedObject.superclass.constructor.call(this),this.hT="a0",this.hV="",this.isExplicit=!0,this.asn1Object=null,this.setASN1Object=function(t,e,n){this.hT=e,this.isExplicit=t,this.asn1Object=n,this.isExplicit?(this.hV=this.asn1Object.getEncodedHex(),this.hTLV=null,this.isModified=!0):(this.hV=null,this.hTLV=n.getEncodedHex(),this.hTLV=this.hTLV.replace(/^../,e),this.isModified=!1)},this.getFreshValueHex=function(){return this.hV},void 0!==t&&(void 0!==t.tag&&(this.hT=t.tag),void 0!==t.explicit&&(this.isExplicit=t.explicit),void 0!==t.obj&&(this.asn1Object=t.obj,this.setASN1Object(this.isExplicit,this.hT,this.asn1Object)))},tt.lang.extend(et.asn1.DERTaggedObject,et.asn1.ASN1Object);var nt=function(n){function i(t){var e=n.call(this)||this;return t&&("string"==typeof t?e.parseKey(t):(i.hasPrivateKeyProperty(t)||i.hasPublicKeyProperty(t))&&e.parsePropertiesFrom(t)),e}return function(t,e){function n(){this.constructor=t}p(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}(i,n),i.prototype.parseKey=function(t){try{var e=0,n=0,i=/^\s*(?:[0-9A-Fa-f][0-9A-Fa-f]\s*)+$/.test(t)?g.decode(t):m.unarmor(t),r=S.decode(i);if(3===r.sub.length&&(r=r.sub[2].sub[0]),9===r.sub.length){e=r.sub[1].getHexStringValue(),this.n=M(e,16),n=r.sub[2].getHexStringValue(),this.e=parseInt(n,16);var o=r.sub[3].getHexStringValue();this.d=M(o,16);var a=r.sub[4].getHexStringValue();this.p=M(a,16);var s=r.sub[5].getHexStringValue();this.q=M(s,16);var c=r.sub[6].getHexStringValue();this.dmp1=M(c,16);var l=r.sub[7].getHexStringValue();this.dmq1=M(l,16);var u=r.sub[8].getHexStringValue();this.coeff=M(u,16)}else{if(2!==r.sub.length)return!1;var h=r.sub[1],d=h.sub[0];e=d.sub[0].getHexStringValue(),this.n=M(e,16),n=d.sub[1].getHexStringValue(),this.e=parseInt(n,16)}return!0}catch(t){return!1}},i.prototype.getPrivateBaseKey=function(){var t={array:[new et.asn1.DERInteger({int:0}),new et.asn1.DERInteger({bigint:this.n}),new et.asn1.DERInteger({int:this.e}),new et.asn1.DERInteger({bigint:this.d}),new et.asn1.DERInteger({bigint:this.p}),new et.asn1.DERInteger({bigint:this.q}),new et.asn1.DERInteger({bigint:this.dmp1}),new et.asn1.DERInteger({bigint:this.dmq1}),new et.asn1.DERInteger({bigint:this.coeff})]},e=new et.asn1.DERSequence(t);return e.getEncodedHex()},i.prototype.getPrivateBaseKeyB64=function(){return u(this.getPrivateBaseKey())},i.prototype.getPublicBaseKey=function(){var t=new et.asn1.DERSequence({array:[new et.asn1.DERObjectIdentifier({oid:"1.2.840.113549.1.1.1"}),new et.asn1.DERNull]}),e=new et.asn1.DERSequence({array:[new et.asn1.DERInteger({bigint:this.n}),new et.asn1.DERInteger({int:this.e})]}),n=new et.asn1.DERBitString({hex:"00"+e.getEncodedHex()}),i=new et.asn1.DERSequence({array:[t,n]});return i.getEncodedHex()},i.prototype.getPublicBaseKeyB64=function(){return u(this.getPublicBaseKey())},i.wordwrap=function(t,e){if(e=e||64,!t)return t;var n="(.{1,"+e+"})( +|$\n?)|(.{1,"+e+"})";return t.match(RegExp(n,"g")).join("\n")},i.prototype.getPrivateKey=function(){var t="-----BEGIN RSA PRIVATE KEY-----\n";return t+=i.wordwrap(this.getPrivateBaseKeyB64())+"\n",t+="-----END RSA PRIVATE KEY-----"},i.prototype.getPublicKey=function(){var t="-----BEGIN PUBLIC KEY-----\n";return t+=i.wordwrap(this.getPublicBaseKeyB64())+"\n",t+="-----END PUBLIC KEY-----"},i.hasPublicKeyProperty=function(t){return(t=t||{}).hasOwnProperty("n")&&t.hasOwnProperty("e")},i.hasPrivateKeyProperty=function(t){return(t=t||{}).hasOwnProperty("n")&&t.hasOwnProperty("e")&&t.hasOwnProperty("d")&&t.hasOwnProperty("p")&&t.hasOwnProperty("q")&&t.hasOwnProperty("dmp1")&&t.hasOwnProperty("dmq1")&&t.hasOwnProperty("coeff")},i.prototype.parsePropertiesFrom=function(t){this.n=t.n,this.e=t.e,t.hasOwnProperty("d")&&(this.d=t.d,this.p=t.p,this.q=t.q,this.dmp1=t.dmp1,this.dmq1=t.dmq1,this.coeff=t.coeff)},i}(Z),it=function(){function t(t){t=t||{},this.default_key_size=parseInt(t.default_key_size,10)||1024,this.default_public_exponent=t.default_public_exponent||"010001",this.log=t.log||!1,this.key=null}return t.prototype.setKey=function(t){this.log&&this.key&&console.warn("A key was already set, overriding existing."),this.key=new nt(t)},t.prototype.setPrivateKey=function(t){this.setKey(t)},t.prototype.setPublicKey=function(t){this.setKey(t)},t.prototype.decrypt=function(t){try{return this.getKey().decrypt(h(t))}catch(t){return!1}},t.prototype.encrypt=function(t){try{return u(this.getKey().encrypt(t))}catch(t){return!1}},t.prototype.sign=function(t,e,n){try{return u(this.getKey().sign(t,e,n))}catch(t){return!1}},t.prototype.verify=function(t,e,n){try{return this.getKey().verify(t,h(e),n)}catch(t){return!1}},t.prototype.getKey=function(t){if(!this.key){if(this.key=new nt,t&&"[object Function]"==={}.toString.call(t))return void this.key.generateAsync(this.default_key_size,this.default_public_exponent,t);this.key.generate(this.default_key_size,this.default_public_exponent)}return this.key},t.prototype.getPrivateKey=function(){return this.getKey().getPrivateKey()},t.prototype.getPrivateKeyB64=function(){return this.getKey().getPrivateBaseKeyB64()},t.prototype.getPublicKey=function(){return this.getKey().getPublicKey()},t.prototype.getPublicKeyB64=function(){return this.getKey().getPublicBaseKeyB64()},t.version="3.0.0-rc.1",t}();window.JSEncrypt=it,t.JSEncrypt=it,t.default=it,Object.defineProperty(t,"__esModule",{value:!0})}(e)},function(t,e,n){t.exports=n(25)},function(t,e,n){var i,r,c;t.exports=(i=n(0),c=(r=i).lib.WordArray,r.enc.Base64={stringify:function(t){var e=t.words,n=t.sigBytes,i=this._map;t.clamp();for(var r=[],o=0;o<n;o+=3)for(var a=(e[o>>>2]>>>24-o%4*8&255)<<16|(e[o+1>>>2]>>>24-(o+1)%4*8&255)<<8|e[o+2>>>2]>>>24-(o+2)%4*8&255,s=0;s<4&&o+.75*s<n;s++)r.push(i.charAt(a>>>6*(3-s)&63));var c=i.charAt(64);if(c)for(;r.length%4;)r.push(c);return r.join("")},parse:function(t){var e=t.length,n=this._map,i=this._reverseMap;if(!i){i=this._reverseMap=[];for(var r=0;r<n.length;r++)i[n.charCodeAt(r)]=r}var o=n.charAt(64);if(o){var a=t.indexOf(o);-1!==a&&(e=a)}return function(t,e,n){for(var i=[],r=0,o=0;o<e;o++)if(o%4){var a=n[t.charCodeAt(o-1)]<<o%4*2,s=n[t.charCodeAt(o)]>>>6-o%4*2;i[r>>>2]|=(a|s)<<24-r%4*8,r++}return c.create(i,r)}(t,e,i)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="},i.enc.Base64)},function(t,e,n){var a;t.exports=(a=n(0),function(u){var t=a,e=t.lib,n=e.WordArray,i=e.Hasher,r=t.algo,O=[];!function(){for(var t=0;t<64;t++)O[t]=4294967296*u.abs(u.sin(t+1))|0}();var o=r.MD5=i.extend({_doReset:function(){this._hash=new n.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(t,e){for(var n=0;n<16;n++){var i=e+n,r=t[i];t[i]=16711935&(r<<8|r>>>24)|4278255360&(r<<24|r>>>8)}var o=this._hash.words,a=t[e+0],s=t[e+1],c=t[e+2],l=t[e+3],u=t[e+4],h=t[e+5],d=t[e+6],f=t[e+7],p=t[e+8],g=t[e+9],m=t[e+10],y=t[e+11],v=t[e+12],b=t[e+13],w=t[e+14],T=t[e+15],A=o[0],E=o[1],x=o[2],S=o[3];E=k(E=k(E=k(E=k(E=D(E=D(E=D(E=D(E=B(E=B(E=B(E=B(E=C(E=C(E=C(E=C(E,x=C(x,S=C(S,A=C(A,E,x,S,a,7,O[0]),E,x,s,12,O[1]),A,E,c,17,O[2]),S,A,l,22,O[3]),x=C(x,S=C(S,A=C(A,E,x,S,u,7,O[4]),E,x,h,12,O[5]),A,E,d,17,O[6]),S,A,f,22,O[7]),x=C(x,S=C(S,A=C(A,E,x,S,p,7,O[8]),E,x,g,12,O[9]),A,E,m,17,O[10]),S,A,y,22,O[11]),x=C(x,S=C(S,A=C(A,E,x,S,v,7,O[12]),E,x,b,12,O[13]),A,E,w,17,O[14]),S,A,T,22,O[15]),x=B(x,S=B(S,A=B(A,E,x,S,s,5,O[16]),E,x,d,9,O[17]),A,E,y,14,O[18]),S,A,a,20,O[19]),x=B(x,S=B(S,A=B(A,E,x,S,h,5,O[20]),E,x,m,9,O[21]),A,E,T,14,O[22]),S,A,u,20,O[23]),x=B(x,S=B(S,A=B(A,E,x,S,g,5,O[24]),E,x,w,9,O[25]),A,E,l,14,O[26]),S,A,p,20,O[27]),x=B(x,S=B(S,A=B(A,E,x,S,b,5,O[28]),E,x,c,9,O[29]),A,E,f,14,O[30]),S,A,v,20,O[31]),x=D(x,S=D(S,A=D(A,E,x,S,h,4,O[32]),E,x,p,11,O[33]),A,E,y,16,O[34]),S,A,w,23,O[35]),x=D(x,S=D(S,A=D(A,E,x,S,s,4,O[36]),E,x,u,11,O[37]),A,E,f,16,O[38]),S,A,m,23,O[39]),x=D(x,S=D(S,A=D(A,E,x,S,b,4,O[40]),E,x,a,11,O[41]),A,E,l,16,O[42]),S,A,d,23,O[43]),x=D(x,S=D(S,A=D(A,E,x,S,g,4,O[44]),E,x,v,11,O[45]),A,E,T,16,O[46]),S,A,c,23,O[47]),x=k(x,S=k(S,A=k(A,E,x,S,a,6,O[48]),E,x,f,10,O[49]),A,E,w,15,O[50]),S,A,h,21,O[51]),x=k(x,S=k(S,A=k(A,E,x,S,v,6,O[52]),E,x,l,10,O[53]),A,E,m,15,O[54]),S,A,s,21,O[55]),x=k(x,S=k(S,A=k(A,E,x,S,p,6,O[56]),E,x,T,10,O[57]),A,E,d,15,O[58]),S,A,b,21,O[59]),x=k(x,S=k(S,A=k(A,E,x,S,u,6,O[60]),E,x,y,10,O[61]),A,E,c,15,O[62]),S,A,g,21,O[63]),o[0]=o[0]+A|0,o[1]=o[1]+E|0,o[2]=o[2]+x|0,o[3]=o[3]+S|0},_doFinalize:function(){var t=this._data,e=t.words,n=8*this._nDataBytes,i=8*t.sigBytes;e[i>>>5]|=128<<24-i%32;var r=u.floor(n/4294967296),o=n;e[15+(i+64>>>9<<4)]=16711935&(r<<8|r>>>24)|4278255360&(r<<24|r>>>8),e[14+(i+64>>>9<<4)]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),t.sigBytes=4*(e.length+1),this._process();for(var a=this._hash,s=a.words,c=0;c<4;c++){var l=s[c];s[c]=16711935&(l<<8|l>>>24)|4278255360&(l<<24|l>>>8)}return a},clone:function(){var t=i.clone.call(this);return t._hash=this._hash.clone(),t}});function C(t,e,n,i,r,o,a){var s=t+(e&n|~e&i)+r+a;return(s<<o|s>>>32-o)+e}function B(t,e,n,i,r,o,a){var s=t+(e&i|n&~i)+r+a;return(s<<o|s>>>32-o)+e}function D(t,e,n,i,r,o,a){var s=t+(e^n^i)+r+a;return(s<<o|s>>>32-o)+e}function k(t,e,n,i,r,o,a){var s=t+(n^(e|~i))+r+a;return(s<<o|s>>>32-o)+e}t.MD5=i._createHelper(o),t.HmacMD5=i._createHmacHelper(o)}(Math),a.MD5)},function(t,e,n){var i,r,o,a,s,c,h,l;t.exports=(i=n(0),o=(r=i).lib,a=o.WordArray,s=o.Hasher,c=r.algo,h=[],l=c.SHA1=s.extend({_doReset:function(){this._hash=new a.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(t,e){for(var n=this._hash.words,i=n[0],r=n[1],o=n[2],a=n[3],s=n[4],c=0;c<80;c++){if(c<16)h[c]=0|t[e+c];else{var l=h[c-3]^h[c-8]^h[c-14]^h[c-16];h[c]=l<<1|l>>>31}var u=(i<<5|i>>>27)+s+h[c];u+=c<20?1518500249+(r&o|~r&a):c<40?1859775393+(r^o^a):c<60?(r&o|r&a|o&a)-1894007588:(r^o^a)-899497514,s=a,a=o,o=r<<30|r>>>2,r=i,i=u}n[0]=n[0]+i|0,n[1]=n[1]+r|0,n[2]=n[2]+o|0,n[3]=n[3]+a|0,n[4]=n[4]+s|0},_doFinalize:function(){var t=this._data,e=t.words,n=8*this._nDataBytes,i=8*t.sigBytes;return e[i>>>5]|=128<<24-i%32,e[14+(i+64>>>9<<4)]=Math.floor(n/4294967296),e[15+(i+64>>>9<<4)]=n,t.sigBytes=4*e.length,this._process(),this._hash},clone:function(){var t=s.clone.call(this);return t._hash=this._hash.clone(),t}}),r.SHA1=s._createHelper(l),r.HmacSHA1=s._createHmacHelper(l),i.SHA1)},function(t,e,n){var i,r,o,a,s,l,c;t.exports=(i=n(0),o=(r=i).lib,a=o.Base,s=r.enc,l=s.Utf8,c=r.algo,void(c.HMAC=a.extend({init:function(t,e){t=this._hasher=new t.init,"string"==typeof e&&(e=l.parse(e));var n=t.blockSize,i=4*n;e.sigBytes>i&&(e=t.finalize(e)),e.clamp();for(var r=this._oKey=e.clone(),o=this._iKey=e.clone(),a=r.words,s=o.words,c=0;c<n;c++)a[c]^=1549556828,s[c]^=909522486;r.sigBytes=o.sigBytes=i,this.reset()},reset:function(){var t=this._hasher;t.reset(),t.update(this._iKey)},update:function(t){return this._hasher.update(t),this},finalize:function(t){var e=this._hasher,n=e.finalize(t);e.reset();var i=e.finalize(this._oKey.clone().concat(n));return i}})))},function(t,e,n){var i,r,o,a,c,s,l,u,h,d,f,p,g,m,y,v,b,w,T,A,E,x,S;t.exports=(i=n(0),n(9),void(i.lib.Cipher||(o=(r=i).lib,a=o.Base,c=o.WordArray,s=o.BufferedBlockAlgorithm,(l=r.enc).Utf8,u=l.Base64,h=r.algo,d=h.EvpKDF,f=o.Cipher=s.extend({cfg:a.extend(),createEncryptor:function(t,e){return this.create(this._ENC_XFORM_MODE,t,e)},createDecryptor:function(t,e){return this.create(this._DEC_XFORM_MODE,t,e)},init:function(t,e,n){this.cfg=this.cfg.extend(n),this._xformMode=t,this._key=e,this.reset()},reset:function(){s.reset.call(this),this._doReset()},process:function(t){return this._append(t),this._process()},finalize:function(t){t&&this._append(t);var e=this._doFinalize();return e},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function r(t){return"string"==typeof t?S:A}return function(i){return{encrypt:function(t,e,n){return r(e).encrypt(i,t,e,n)},decrypt:function(t,e,n){return r(e).decrypt(i,t,e,n)}}}}()}),o.StreamCipher=f.extend({_doFinalize:function(){var t=this._process(!0);return t},blockSize:1}),p=r.mode={},g=o.BlockCipherMode=a.extend({createEncryptor:function(t,e){return this.Encryptor.create(t,e)},createDecryptor:function(t,e){return this.Decryptor.create(t,e)},init:function(t,e){this._cipher=t,this._iv=e}}),m=p.CBC=function(){var t=g.extend();function o(t,e,n){var i=this._iv;if(i){var r=i;this._iv=void 0}else var r=this._prevBlock;for(var o=0;o<n;o++)t[e+o]^=r[o]}return t.Encryptor=t.extend({processBlock:function(t,e){var n=this._cipher,i=n.blockSize;o.call(this,t,e,i),n.encryptBlock(t,e),this._prevBlock=t.slice(e,e+i)}}),t.Decryptor=t.extend({processBlock:function(t,e){var n=this._cipher,i=n.blockSize,r=t.slice(e,e+i);n.decryptBlock(t,e),o.call(this,t,e,i),this._prevBlock=r}}),t}(),y=r.pad={},v=y.Pkcs7={pad:function(t,e){for(var n=4*e,i=n-t.sigBytes%n,r=i<<24|i<<16|i<<8|i,o=[],a=0;a<i;a+=4)o.push(r);var s=c.create(o,i);t.concat(s)},unpad:function(t){var e=255&t.words[t.sigBytes-1>>>2];t.sigBytes-=e}},o.BlockCipher=f.extend({cfg:f.cfg.extend({mode:m,padding:v}),reset:function(){f.reset.call(this);var t=this.cfg,e=t.iv,n=t.mode;if(this._xformMode==this._ENC_XFORM_MODE)var i=n.createEncryptor;else{var i=n.createDecryptor;this._minBufferSize=1}this._mode&&this._mode.__creator==i?this._mode.init(this,e&&e.words):(this._mode=i.call(n,this,e&&e.words),this._mode.__creator=i)},_doProcessBlock:function(t,e){this._mode.processBlock(t,e)},_doFinalize:function(){var t=this.cfg.padding;if(this._xformMode==this._ENC_XFORM_MODE){t.pad(this._data,this.blockSize);var e=this._process(!0)}else{var e=this._process(!0);t.unpad(e)}return e},blockSize:4}),b=o.CipherParams=a.extend({init:function(t){this.mixIn(t)},toString:function(t){return(t||this.formatter).stringify(this)}}),w=r.format={},T=w.OpenSSL={stringify:function(t){var e=t.ciphertext,n=t.salt;if(n)var i=c.create([1398893684,1701076831]).concat(n).concat(e);else var i=e;return i.toString(u)},parse:function(t){var e=u.parse(t),n=e.words;if(1398893684==n[0]&&1701076831==n[1]){var i=c.create(n.slice(2,4));n.splice(0,4),e.sigBytes-=16}return b.create({ciphertext:e,salt:i})}},A=o.SerializableCipher=a.extend({cfg:a.extend({format:T}),encrypt:function(t,e,n,i){i=this.cfg.extend(i);var r=t.createEncryptor(n,i),o=r.finalize(e),a=r.cfg;return b.create({ciphertext:o,key:n,iv:a.iv,algorithm:t,mode:a.mode,padding:a.padding,blockSize:t.blockSize,formatter:i.format})},decrypt:function(t,e,n,i){i=this.cfg.extend(i),e=this._parse(e,i.format);var r=t.createDecryptor(n,i).finalize(e.ciphertext);return r},_parse:function(t,e){return"string"==typeof t?e.parse(t,this):t}}),E=r.kdf={},x=E.OpenSSL={execute:function(t,e,n,i){i||(i=c.random(8));var r=d.create({keySize:e+n}).compute(t,i),o=c.create(r.words.slice(e),4*n);return r.sigBytes=4*e,b.create({key:r,iv:o,salt:i})}},S=o.PasswordBasedCipher=A.extend({cfg:A.cfg.extend({kdf:x}),encrypt:function(t,e,n,i){var r=(i=this.cfg.extend(i)).kdf.execute(n,t.keySize,t.ivSize);i.iv=r.iv;var o=A.encrypt.call(this,t,e,r.key,i);return o.mixIn(r),o},decrypt:function(t,e,n,i){i=this.cfg.extend(i),e=this._parse(e,i.format);var r=i.kdf.execute(n,t.keySize,t.ivSize,e.salt);i.iv=r.iv;var o=A.decrypt.call(this,t,e,r.key,i);return o}}))))},function(e,t){(function(t){e.exports=t}).call(this,{})},function(t,e){t.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADIBAMAAABfdrOtAAAALVBMVEVHcEz////////////////////////////////////////////////////////NXt0CAAAADnRSTlMAJvQ9uVSF45/PbxcMBUhOnA0AAAWVSURBVHja7ZzLixxFHMd70plhnrAHIXpZlKyyRGmWDUFFGPSQoBiHTUjQjXFZJeADdoiol1UbUXxEZFg9iAcZFjUqexgGDJvoYRl8IXsIAyYRcwikM+7MKHz/Bg/dPc6jq7oev14Q6ncbqqs+XfWr36OaqZ9lScqFmaaVtNguXkmaUaoC3nrCkDsAoJ/sguUdAMDdSTIKFfhyNEHIfMBAdy4xxm8YyE5SjLQLAN0vAACvJcNI+Qo5GijmkSQYxWq4sa4BALyVBCBPYmAi9/vKX0jGCoGVoZ3cmSJmXPIZgdvKB1uM1vI3/VF7reC3v2C4p0XI+NUZM8GSv49xoEXNwMqkg1ltEzGuu/6AH09aJhllMxjuwNj0AgezSrFitweDdZrRmxqz+jv5RDBUf9LvLoZ4TZdc/IbNsEqDxmd0GFffDoeJdCHF54Jm7x1l9RefcrgMyyrUwvgyqziZX8JYy2RYVmpA8d5VQPx+xoHA9ik8PwiWM1+2lRFY5brB0gkoYX46de6/jjgsakgAMPPhsTjb/O7QyY2NFz4Z6oTus/EvtV0Z6fHoSxvnTx5ksX7GhMwK2Vnhq8mePcbK1SaePCy6wj9UJvouRz/pjj322WmJ3PJbZ6z3WvSDow99+rTkmeLMaP87YyHdI6cVrPdFCUj/yDFFV5Q6dc6Jh3ivvnf+Ib3E/9DXHzzmciE3iTJaAzEQAzEQAzEQAzEQAzEQAzEQAzEQAzEQAzEQAzEQAzGQXYQ4ZBAbwNnoJneXILfoIGvRTfX/FyQN4GEm5K/EIRXgbxpIfjcgGQBvMSFE/6jKsiE1oEcHWY5uqpJB9gJYj25aAvo0kByAheimMtClgewBMBfdNA2gTQLZAtCMbroMYIoEUgYgP0lJWWIvPEddktIAOpyNt0wC4Vhclu1xJKXO9h15dmSWFLD9uQ3gH6o84ibnBUiiVpq3JHUiN8xVbo2986Rd1zJne3sUkBs8gysT+RXuODfYYUBKqrwVybGjppRUeLrN0FhjEbyMxKYxlDT/eOCQGEqWnW4Hi0kQ5ffwVdsg2cNlflzaIokoNQAtvj84qw1x+N4pQ7G9bPBzapvigkE27oDrErjIH+OieIMgYYkdY4t92JPJIrx2XDp+S1/vvVi309PXe8x7uoDX1E6212LjjabN1+Ij3zSAe3UYBfCdSriiWuaYERggBcBraZrifSJLqqMUIaVOi7wJRyWOyEpoKkWsewrsQ6WACC5ETSv5qoipdFrHfdkAui2xja6csvwBsW9mpbpGRlwVPXaW1T1LCqI5VRbKZ6Gc8P4vOMoxuAHgTfFHldYr5Yh/OMmprldOIq4WHEUnWQPwhkzGrPCFOA+ZfD0DwJPP7suQ+uZbB/C6ktolPgBdBNCXjY8XBf3WsJ+T/SpVrAO4S9aqJJO8vZD1eVlIR5WKfEiV7qLwWtafkDTImoKbKNbltHIFAD63FDYknhB+pwqAblPJtITrBnwPAC/Le6J5iX62C8Cbk4fYDgBPLHgdB4D9KtFhXvhG/zUoTsQ/2gmVQPBvMytNxLKWAKAb7/L3qU8knEpszYi0ozGRYCqxdu+XGVD+xGA7ANDhx4gLw7fzVWQfYo0l5dd90DiWF+qIM5aGfhmOK6NVBCbFv5eq+RGjyl9x278yuq4H8fcnGIUpiv7d1/2Wpvh1FvpT8o0yuvcv2+60WT6LpPhKJqIqQqCQOgCiPwocZ10WrhLWd0nVowsKBFUxHrdIJKiu02tGuBO6mju3RRSS2I4kE6hlqPrFtktec2VQyWOMgY8sQrHdkRobmw5zXxMo3y+SEBYQIK/ocymssbEwKIWw06KGWA+Gt9rfD3FTFr0sjl6y788lwLBKi8kzRilJMYZXrJMcw7IeICsWw5NNl6rsDU+uVsRLWAzkX6sCQJh4PoRLAAAAAElFTkSuQmCC"},function(t,e,n){var i=n(21);"string"==typeof i&&(i=[[t.i,i,""]]);var r={hmr:!0,transform:void 0,insertInto:void 0};n(23)(i,r);i.locals&&(t.exports=i.locals)},function(t,e,n){(t.exports=n(22)(!1)).push([t.i,'.yp-riddler {\n  color: black;\n}\n.yp-riddler .yp-riddler-winbox {\n  margin: 100px auto 0 auto;\n  border-radius: 2px;\n}\n.yp-riddler .yp-riddler-win {\n  -webkit-touch-callout: none;\n  /* iOS Safari */\n  -webkit-user-select: none;\n  /* Chrome/Safari/Opera */\n  -khtml-user-select: none;\n  /* Konqueror */\n  -moz-user-select: none;\n  /* Firefox */\n  -ms-user-select: none;\n  /* Internet Explorer/Edge */\n  user-select: none;\n  -moz-box-sizing: content-box;\n  -webkit-box-sizing: content-box;\n  box-sizing: content-box;\n  background-color: white;\n  padding: 10px;\n}\n.yp-riddler .yp-riddler-tip-text-container {\n  text-align: left;\n}\n.yp-riddler .yp-riddler-tip-text-container > * {\n  vertical-align: middle;\n}\n.yp-riddler .yp-riddler-tip-text-container span {\n  color: black;\n}\n.yp-riddler .yp-riddler-tip-text-container img {\n  width: 24%;\n  margin-left: 5px;\n}\n.yp-riddler .yp-riddler-click-img-container {\n  position: relative;\n}\n.yp-riddler .yp-riddler-click-img-container .yp-riddler-power-img {\n  height: 18px;\n  position: absolute;\n  bottom: 8px;\n  right: 8px;\n}\n.yp-riddler .yp-riddler-click-position {\n  width: 32px;\n  height: 32px;\n  background-position: center;\n  background-repeat: no-repeat;\n  background-size: 100%;\n  position: absolute;\n  background-color: rgba(83, 159, 254, 0.8);\n  box-sizing: border-box;\n  box-shadow: 0 0 10px black;\n  border-radius: 50%;\n  text-align: center;\n  line-height: 26px;\n  border: 3px solid white;\n  color: #fff;\n}\n.yp-riddler .yp-riddler-slide-img-container {\n  position: relative;\n}\n.yp-riddler .yp-riddler-slide-img-container > .yp-riddler-slider-bg,\n.yp-riddler .yp-riddler-slide-img-container .yp-riddler-slider-front {\n  display: block;\n}\n.yp-riddler .yp-riddler-slide-img-container .yp-riddler-slider-front {\n  position: absolute;\n  top: 0;\n  left: 0;\n  height: 100%;\n  width: auto;\n}\n.yp-riddler .yp-riddler-slide-img-container .yp-riddler-power-img {\n  height: 18px;\n  position: absolute;\n  bottom: 8px;\n  right: 8px;\n}\n.yp-riddler .yp-riddler-slider-area {\n  margin-top: 10px;\n  background: #E6E7EB;\n  line-height: 40px;\n  height: 40px;\n  text-align: center;\n  position: relative;\n  font-weight: 300;\n  font-size: 5px;\n  cursor: default;\n  user-select: none;\n  text-shadow: none;\n  border-radius: 2px;\n}\n.yp-riddler .yp-riddler-slider-area .yp-riddler-slider-tip-default {\n  white-space: nowrap;\n  overflow: hidden;\n  padding-left: 40px;\n  font-size: 12px;\n  color: #88949d;\n}\n.yp-riddler .yp-riddler-slider-area .yp-riddler-slider-btn {\n  height: 40px;\n  width: 40px;\n  position: absolute;\n  top: 0;\n  background-color: #FFFFFF;\n  box-sizing: border-box;\n  cursor: move;\n  border-radius: 2px;\n  box-shadow: 0px 0px 4px 0px rgba(0, 0, 0, 0.2);\n  display: flex;\n  justify-content: center;\n  align-items: center;\n}\n@keyframes gogogo {\n  from {\n    padding-left: -5px;\n  }\n  to {\n    padding-left: 5px;\n  }\n}\n.yp-riddler .yp-riddler-slider-area .yp-riddler-slider-btn .yp-riddler-slider-btn-sign {\n  width: 16px;\n  pointer-events: none;\n}\n.yp-riddler .yp-riddler-slider-area .yp-riddler-slider-btn .yp-riddler-slider-btn-mask {\n  position: absolute;\n  width: 40px;\n  height: 40px;\n  animation: myfirst 2s;\n  -moz-animation: myfirst 2s;\n  /* Firefox */\n  -webkit-animation: myfirst 2s;\n  /* Safari 和 Chrome */\n  -o-animation: myfirst 2s;\n  top: 0;\n  background: #fff;\n  left: 0;\n}\n@keyframes myfirst {\n  0% {\n    left: 0;\n    width: 40px;\n  }\n  100% {\n    left: 40px;\n    width: 0px;\n  }\n}\n@-moz-keyframes myfirst {\n  /* Firefox */\n  0% {\n    left: 0;\n    width: 40px;\n  }\n  100% {\n    left: 40px;\n    width: 0px;\n  }\n}\n@-webkit-keyframes myfirst {\n  /* Safari 和 Chrome */\n  0% {\n    left: 0;\n    width: 40px;\n  }\n  100% {\n    left: 40px;\n    width: 0px;\n  }\n}\n@-o-keyframes myfirst {\n  /* Opera */\n  0% {\n    left: 0;\n    width: 40px;\n  }\n  100% {\n    left: 40px;\n    width: 0px;\n  }\n}\n.yp-riddler .yp-riddler-slider-area .yp-riddler-slider-trajectory {\n  height: inherit;\n  position: absolute;\n  top: 0;\n  left: 0;\n  background-color: #EAEFFF;\n  border-radius: 2px;\n}\n.yp-riddler.yp-flat .yp-riddler-win-masker {\n  margin: 0;\n}\n.yp-riddler.yp-flat .yp-riddler-winbox {\n  border: 1px solid #eeeeee;\n  margin: 0;\n}\n.yp-riddler.yp-float .yp-riddler-winbox {\n  border: none;\n  box-shadow: 0 0 5px grey;\n}\n.yp-riddler.yp-float .yp-riddler-win-masker {\n  z-index: 3;\n  position: absolute;\n  bottom: 0;\n  left: 0;\n  padding-bottom: 50px;\n  display: none;\n}\n.yp-riddler.yp-float .yp-riddler-win {\n  margin: 0;\n}\n.yp-riddler.yp-external .yp-riddler-winbox {\n  border: none;\n  box-shadow: 0 0 5px grey;\n  -webkit-animation-name: fadeIn;\n  /*动画名称*/\n  -webkit-animation-duration: 500ms;\n  /*动画持续时间*/\n  -webkit-animation-iteration-count: 1;\n  /*动画次数*/\n  -webkit-animation-delay: 0s;\n  /*延迟时间*/\n}\n.yp-riddler.yp-external .yp-riddler-win-masker {\n  position: absolute;\n  bottom: 0;\n  left: 0;\n  padding-bottom: 50px;\n  display: none;\n}\n.yp-riddler.yp-external .yp-riddler-win {\n  margin: 0;\n}\n.yp-riddler.yp-dialog .yp-riddler-win-masker {\n  cursor: auto;\n  position: fixed;\n  top: 0;\n  left: 0;\n  right: 0;\n  bottom: auto;\n  height: 100%;\n  background-color: rgba(0, 0, 0, 0.6);\n  z-index: 999;\n}\n.yp-riddler .yp-riddler-refresh {\n  pointer-events: auto;\n  display: block;\n  width: 18px;\n  height: 18px;\n  position: absolute;\n  top: 10px;\n  right: 10px;\n  transition: 200ms;\n  cursor: pointer;\n  transition: all 500ms ease-in-out;\n}\n.yp-riddler .yp-riddler-win-masker {\n  background: rgba(0, 0, 0, 0);\n  display: none;\n}\n.yp-riddler .yp-riddler-result-alert-success {\n  width: 100%;\n  height: 24px;\n  line-height: 24px;\n  text-align: center;\n  position: absolute;\n  bottom: 0px;\n  background-color: #52c41a;\n  color: #fff;\n  font-size: 12px;\n  font-family: PingFangSC-Regular;\n  transition: height 0.4s ease-out, opacity 0.2s ease-in, visibility 0.2s ease-in;\n}\n.yp-riddler .yp-riddler-result-alert-error {\n  width: 100%;\n  line-height: 24px;\n  text-align: center;\n  position: absolute;\n  bottom: 0px;\n  background-color: #fee8ea;\n  color: #f5222d;\n  font-size: 12px;\n  font-family: PingFangSC-Regular;\n  transition: height 0.4s ease-out, opacity 0.2s ease-in, visibility 0.2s ease-in;\n}\n.yp-riddler.yp-riddler-button {\n  position: relative;\n  line-height: 40px;\n  height: 40px;\n  cursor: pointer;\n  font-family: "PingFang SC", "Microsoft yahei", "Helvetica Neue", "Helvetica", "Arial", sans-serif;\n  user-select: none;\n  text-align: center;\n  width: 100%;\n  outline: none;\n  text-decoration: none;\n  border: 1px solid #D9D9D9;\n  background-color: #F7F9FA;\n  border-radius: 2px;\n  font-size: 14px;\n  color: #757575;\n}\n.yp-riddler.yp-riddler-button:hover {\n  font-size: 14px;\n  color: #1792FA;\n}\n.yp-riddler.yp-riddler-button .yp-riddler-button_logo {\n  display: inline-block;\n  width: 25px;\n  height: 25px;\n  box-sizing: border-box;\n  transition: 200ms;\n  margin-right: 10px;\n  line-height: 25px;\n  position: relative;\n  top: 6.5px;\n}\n.yp-riddler.yp-riddler-button .yp-riddler-button_logo .yp-riddler-btn_a {\n  width: 100%;\n  height: 100%;\n  background: #145cff;\n  border-radius: 100px;\n  opacity: 0.5;\n  box-shadow: 0 0 6px grey;\n}\n.yp-riddler.yp-riddler-button .yp-riddler-button_logo .yp-riddler-btn_b {\n  width: 17px;\n  height: 17px;\n  background: #145cff;\n  border-radius: 100px;\n  opacity: 0.5;\n  position: absolute;\n  top: 4px;\n  left: 4px;\n}\n.yp-riddler.yp-riddler-button:hover .yp-riddler-button_logo {\n  padding: 4px;\n}\n.yp-riddler .yp-riddler-button-sucButton_logo {\n  display: inline-block;\n  width: 19px;\n  vertical-align: middle;\n  background: #26C267;\n  border-radius: 50%;\n  box-shadow: #26C267 0px 0px 10px;\n  padding: 5px;\n}\n.yp-riddler .yp-riddler-button-sucButton_text {\n  display: inline-block;\n  margin: 0 0 0 10px;\n  color: #26C267;\n}\n@-webkit-keyframes fadeIn {\n  0% {\n    opacity: 0;\n    /*初始状态 透明度为0*/\n  }\n  50% {\n    opacity: 0;\n    /*中间状态 透明度为0*/\n  }\n  100% {\n    opacity: 1;\n    /*结尾状态 透明度为1*/\n  }\n}\n',""])},function(t,e){t.exports=function(n){var a=[];return a.toString=function(){return this.map(function(t){var e=function(t,e){var n=t[1]||"",i=t[3];if(!i)return n;if(e&&"function"==typeof btoa){var r=(a=i,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(a))))+" */"),o=i.sources.map(function(t){return"/*# sourceURL="+i.sourceRoot+t+" */"});return[n].concat(o).concat([r]).join("\n")}var a;return[n].join("\n")}(t,n);return t[2]?"@media "+t[2]+"{"+e+"}":e}).join("")},a.i=function(t,e){"string"==typeof t&&(t=[[null,t,""]]);for(var n={},i=0;i<this.length;i++){var r=this[i][0];"number"==typeof r&&(n[r]=!0)}for(i=0;i<t.length;i++){var o=t[i];"number"==typeof o[0]&&n[o[0]]||(e&&!o[2]?o[2]=e:e&&(o[2]="("+o[2]+") and ("+e+")"),a.push(o))}},a}},function(t,e,i){var n,r,o,c={},l=(n=function(){return window&&document&&document.all&&!window.atob},function(){return void 0===r&&(r=n.apply(this,arguments)),r}),a=(o={},function(t,e){if("function"==typeof t)return t();if(void 0===o[t]){var n=function(t,e){return e?e.querySelector(t):document.querySelector(t)}.call(this,t,e);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(t){n=null}o[t]=n}return o[t]}),u=null,h=0,s=[],d=i(24);function f(t,e){for(var n=0;n<t.length;n++){var i=t[n],r=c[i.id];if(r){r.refs++;for(var o=0;o<r.parts.length;o++)r.parts[o](i.parts[o]);for(;o<i.parts.length;o++)r.parts.push(b(i.parts[o],e))}else{var a=[];for(o=0;o<i.parts.length;o++)a.push(b(i.parts[o],e));c[i.id]={id:i.id,refs:1,parts:a}}}}function p(t,e){for(var n=[],i={},r=0;r<t.length;r++){var o=t[r],a=e.base?o[0]+e.base:o[0],s={css:o[1],media:o[2],sourceMap:o[3]};i[a]?i[a].parts.push(s):n.push(i[a]={id:a,parts:[s]})}return n}function g(t,e){var n=a(t.insertInto);if(!n)throw new Error("Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid.");var i=s[s.length-1];if("top"===t.insertAt)i?i.nextSibling?n.insertBefore(e,i.nextSibling):n.appendChild(e):n.insertBefore(e,n.firstChild),s.push(e);else if("bottom"===t.insertAt)n.appendChild(e);else{if("object"!=typeof t.insertAt||!t.insertAt.before)throw new Error("[Style Loader]\n\n Invalid value for parameter 'insertAt' ('options.insertAt') found.\n Must be 'top', 'bottom', or Object.\n (https://github.com/webpack-contrib/style-loader#insertat)\n");var r=a(t.insertAt.before,n);n.insertBefore(e,r)}}function m(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t);var e=s.indexOf(t);0<=e&&s.splice(e,1)}function y(t){var e=document.createElement("style");if(void 0===t.attrs.type&&(t.attrs.type="text/css"),void 0===t.attrs.nonce){var n=function(){0;return i.nc}();n&&(t.attrs.nonce=n)}return v(e,t.attrs),g(t,e),e}function v(e,n){Object.keys(n).forEach(function(t){e.setAttribute(t,n[t])})}function b(e,t){var n,i,r,o,a,s;if(t.transform&&e.css){if(!(o="function"==typeof t.transform?t.transform(e.css):t.transform.default(e.css)))return function(){};e.css=o}if(t.singleton){var c=h++;n=u||(u=y(t)),i=A.bind(null,n,c,!1),r=A.bind(null,n,c,!0)}else r=e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(a=t,s=document.createElement("link"),void 0===a.attrs.type&&(a.attrs.type="text/css"),a.attrs.rel="stylesheet",v(s,a.attrs),g(a,s),i=function(t,e,n){var i=n.css,r=n.sourceMap,o=void 0===e.convertToAbsoluteUrls&&r;(e.convertToAbsoluteUrls||o)&&(i=d(i));r&&(i+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(r))))+" */");var a=new Blob([i],{type:"text/css"}),s=t.href;t.href=URL.createObjectURL(a),s&&URL.revokeObjectURL(s)}.bind(null,n=s,t),function(){m(n),n.href&&URL.revokeObjectURL(n.href)}):(n=y(t),i=function(t,e){var n=e.css,i=e.media;i&&t.setAttribute("media",i);if(t.styleSheet)t.styleSheet.cssText=n;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(n))}}.bind(null,n),function(){m(n)});return i(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;i(e=t)}else r()}}t.exports=function(t,a){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(a=a||{}).attrs="object"==typeof a.attrs?a.attrs:{},a.singleton||"boolean"==typeof a.singleton||(a.singleton=l()),a.insertInto||(a.insertInto="head"),a.insertAt||(a.insertAt="bottom");var s=p(t,a);return f(s,a),function(t){for(var e=[],n=0;n<s.length;n++){var i=s[n];(r=c[i.id]).refs--,e.push(r)}t&&f(p(t,a),a);for(n=0;n<e.length;n++){var r;if(0===(r=e[n]).refs){for(var o=0;o<r.parts.length;o++)r.parts[o]();delete c[r.id]}}}};var w,T=(w=[],function(t,e){return w[t]=e,w.filter(Boolean).join("\n")});function A(t,e,n,i){var r=n?"":i.css;if(t.styleSheet)t.styleSheet.cssText=T(e,r);else{var o=document.createTextNode(r),a=t.childNodes;a[e]&&t.removeChild(a[e]),a.length?t.insertBefore(o,a[e]):t.appendChild(o)}}},function(t,e){t.exports=function(t){var e="undefined"!=typeof window&&window.location;if(!e)throw new Error("fixUrls requires window.location");if(!t||"string"!=typeof t)return t;var r=e.protocol+"//"+e.host,o=r+e.pathname.replace(/\/[^\/]*$/,"/");return t.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,function(t,e){var n,i=e.trim().replace(/^"(.*)"$/,function(t,e){return e}).replace(/^'(.*)'$/,function(t,e){return e});return/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(i)?t:(n=0===i.indexOf("//")?i:0===i.indexOf("/")?r+i:o+i.replace(/^\.\//,""),"url("+JSON.stringify(n)+")")})}},function(t,e,n){"use strict";function l(t,e){return window.YP_RIDDLER_RESOURCE_LANG[e][t]}function i(){var t=navigator.userAgent;return{trident:-1<t.indexOf("Trident"),presto:-1<t.indexOf("Presto"),webKit:-1<t.indexOf("AppleWebKit"),gecko:-1<t.indexOf("Gecko")&&-1==t.indexOf("KHTML"),mobile:!!t.match(/AppleWebKit.*Mobile.*/),ios:!!t.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/),mac:t.match("Macintosh"),android:-1<t.indexOf("Android")||-1<t.indexOf("Adr"),iPhone:-1<t.indexOf("iPhone"),iPad:-1<t.indexOf("iPad"),fireFox:-1<t.indexOf("Firefox"),webApp:-1==t.indexOf("Safari"),weixin:-1<t.indexOf("MicroMessenger"),qq:" qq"==t.match(/\sQQ/i)}}n.r(e);var r={YPcaptcha_01:"请点击按钮开始验证",YPcaptcha_02:"请按顺序点击:",YPcaptcha_03:"向右拖动滑块填充拼图",YPcaptcha_04:"验证失败，请重试",YPcaptcha_05:"验证成功!"},o={"zh-cn":r,en:{YPcaptcha_01:"Click here to verify",YPcaptcha_02:"Select in this order:",YPcaptcha_03:"Drag to verify",YPcaptcha_04:"Sorry, please try again.",YPcaptcha_05:"I am not a robot!"}},S="dialog",a="flat",s="external",c=-1,u=0,h=1,d=2,f=3,p={href:"",enText:"Powered by YunPian's CAPTCHA",chText:"由云片行为验证提供技术支持"};function g(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}var m=function(){function d(t,e,n,i,r,o,a,s,c,l,u,h){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,d),this.captchaId=s,this.winWidth=a,this.onSuccess=t,this.onError=e,this.onFail=n,this.CONTAINER=i,this.jsonpRequest=r,this.getCaptcha=o,this.waterMark=c,this.lang=l,this.logoOptions=u||function(r){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{},e=Object.keys(o);"function"==typeof Object.getOwnPropertySymbols&&(e=e.concat(Object.getOwnPropertySymbols(o).filter(function(t){return Object.getOwnPropertyDescriptor(o,t).enumerable}))),e.forEach(function(t){var e,n,i;e=r,i=o[n=t],n in e?Object.defineProperty(e,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[n]=i})}return r}({},p),this.mode=h}var t,e,n;return t=d,(e=[{key:"render",value:function(t){throw new Error("not implement")}},{key:"verify",value:function(){throw new Error("not implement")}},{key:"destroy",value:function(){var t=this.CONTAINER.getElementsByClassName("yp-riddler-winbox")[0];t&&t.parentNode.removeChild(t)}},{key:"makeWin",value:function(){var t=this.CONTAINER.getElementsByClassName("yp-riddler-win-masker")[0],e=document.createElement("div"),n=document.createElement("div");return n.className="yp-riddler-winbox",n.style.width=this.winWidth+"px","flat"===this.mode&&(n.style.width=this.winWidth-2+"px"),e.className="yp-riddler-win",e.style.width=this.winWidth-26+"px","flat"===this.mode&&(e.style.padding="12px"),n.appendChild(e),t.appendChild(n),e.addEventListener(window.EventObj.click,function(t){t.stopPropagation(),t.preventDefault()}),e}}])&&g(t.prototype,e),n&&g(t,n),d}();function y(t){return(y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function v(t){return function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e<t.length;e++)n[e]=t[e];return n}}(t)||function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function b(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function w(t,e){return!e||"object"!==y(e)&&"function"!=typeof e?function(t){if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(t):e}function T(t){return(T=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function A(t,e){return(A=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var E=n(1),x=n(2),O=n(3),C=function(t){function o(){var t,e;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o);for(var n=arguments.length,i=new Array(n),r=0;r<n;r++)i[r]=arguments[r];return(e=w(this,(t=T(o)).call.apply(t,[this].concat(i)))).position=[],e.clickAmount=0,e.captchaImgTag=null,e.charactersImgTag=null,e.deg=0,e.imgWidth=e.winWidth-26,e.verifyResultTag=null,e}var e,n,i;return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&A(t,e)}(o,m),e=o,(n=[{key:"render",value:function(t){var e=t.clickAmount,n=t.captchaImage,i=t.wordsImage;this.CONTAINER.getElementsByClassName("yp-riddler-win").length||this.createWin(),this.position=[],this.cleanClickSign(),this.clickAmount=e,this.captchaImgTag.src=n,this.charactersImgTag.src=i}},{key:"verify",value:function(){var e=this,t=window.getComputedStyle(this.captchaImgTag,null),n=parseInt(t.width),i=parseInt(t.height),r=this.position.map(function(t){return[t[0]/n,t[1]/i]});this.jsonpRequest("/jsonp/captcha/verify",{points:r},function(t){if(t.code)return e.cleanClickSign(),void e.onFail(t.code,t.msg);e.showVerifyResult("success",l("YPcaptcha_05",e.lang),!0),e.onSuccess({token:t.data.token,authenticate:t.data.authenticate})},this.onFail)}},{key:"showVerifyResult",value:function(t,e,n){var i=this;if(this.verifyResultTag.className="yp-riddler-result yp-riddler-result-alert-".concat(t),this.verifyResultTag.innerHTML=e,this.verifyResultTag.style.height="24px",n)var r=setTimeout(function(){i.hiddenVerifyResult(),clearTimeout(r)},2e3)}},{key:"hiddenVerifyResult",value:function(){this.verifyResultTag.style.height="0px",this.verifyResultTag.innerHTML=""}},{key:"cleanClickSign",value:function(){for(var t=this.CONTAINER.getElementsByClassName("yp-riddler-click-position");t.length;){var e=t[0];e.parentNode.removeChild(e)}this.position=[]}},{key:"addClickSign",value:function(t,e){var n=this,i=this.CONTAINER.getElementsByClassName("yp-riddler-click-img-container")[0],r=i.getBoundingClientRect();if(r.x&&r.y?(t-=r.x,e-=r.y):(t-=r.left,e-=r.top),this.position.length<this.clickAmount){this.position.push([t,e]);var o=document.createElement("div");o.className="yp-riddler-click-position",o.style.top=e-16+"px",o.style.left=t-16+"px";var a=document.createElement("div");a.className="yp-riddler-click-position-index",a.innerHTML=this.position.length,a.addEventListener(window.EventObj.click,function(t){(t.stopPropagation(),t.preventDefault(),t.cancelBubble=!0,parseInt(o.childNodes[0].innerHTML)<n.position.length)?(v(n.CONTAINER.getElementsByClassName("yp-riddler-click-position")).forEach(function(t){i.removeChild(t)}),n.position=[]):(i.removeChild(o),n.position.pop())}),o.appendChild(a),i.appendChild(o),this.position.length===this.clickAmount&&this.verify()}}},{key:"createWin",value:function(){var i=this,t=this.makeWin(),e=document.createElement("div");e.className="yp-riddler-click-img-container",e.style.height=this.winWidth/2+"px",e.addEventListener(window.EventObj.click,function(t){var e=null,n=null;e="touchmove"===window.EventObj.move?(n=t.targetTouches[0].clientX,t.targetTouches[0].clientY):(n=t.clientX,t.clientY),i.addClickSign(n,e)});var n=document.createElement("img");if(n.className="yp-riddler-click-img",n.style.width=this.imgWidth+"px",n.style.height=this.winWidth/2+"px",n.style.backgroundColor="#c7c7c7",this.captchaImgTag=n,e.appendChild(n),t.appendChild(e),this.waterMark){var r=document.createElement("img");r.className="yp-riddler-power-img",r.src="en"===this.lang?x:O,e.appendChild(r)}var o=document.createElement("div");o.className="yp-riddler-tip-text-container";var a=document.createElement("span");a.innerHTML=l("YPcaptcha_02",this.lang),o.appendChild(a);var s=document.createElement("img");this.charactersImgTag=s,o.appendChild(s),this.verifyResultTag=document.createElement("div"),this.verifyResultTag.className="yp-riddler-result",e.appendChild(this.verifyResultTag),t.appendChild(o);var c=document.createElement("img");c.src=E,c.className="yp-riddler-refresh",c.addEventListener(window.EventObj.click,function(t){t.stopPropagation(),t.preventDefault(),i.cleanClickSign(),i.deg+=360,c.style.transform="rotate(".concat(i.deg,"deg)"),i.showVerifyResult("","",!1),i.getCaptcha()}),e.appendChild(c)}}])&&b(e.prototype,n),i&&b(e,i),o}();function B(t){return(B="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function D(t){return function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e<t.length;e++)n[e]=t[e];return n}}(t)||function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function k(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function R(t,e){return!e||"object"!==B(e)&&"function"!=typeof e?function(t){if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(t):e}function I(t){return(I=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function N(t,e){return(N=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var P=n(1),M=n(6),L=n(7),V=n(3),j=n(2),U=n(8),F=function(t){function o(){var t,e;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o);for(var n=arguments.length,i=new Array(n),r=0;r<n;r++)i[r]=arguments[r];return(e=R(this,(t=I(o)).call.apply(t,[this].concat(i)))).position=[],e.bgTag=null,e.alertImgTag=null,e.trajectoryTag=null,e.rawX=0,e.rawTimestamp=0,e.offsetX=0,e.alertTextTag=null,e.btnTag=null,e.isDraging=!1,e.MAX_OFFSET=0,e.MAX_POINTS_AMOUNT=50,e.disabled=!1,e.curErrorIndex=0,e.MAX_ERROR=3,e.mouseDown=!1,e.proption=0,e.deg=0,e.imgWidth=e.winWidth-26,e.verifyResultTag=null,e}var e,n,i;return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&N(t,e)}(o,m),e=o,(n=[{key:"render",value:function(t){var e=t.sliderWidth,n=void 0===e?0:e,i=t.width,r=void 0===i?1:i,o=t.bg,a=void 0===o?"":o,s=t.front,c=void 0===s?"":s,l=this.CONTAINER.getElementsByClassName("yp-riddler-win");l&&!l.length&&(this.proption=(n/r).toFixed(2),this.createWin()),this.bgTag.src=a,this.alertImgTag.src=c,this.alertImgTag.ondragstart=function(){return!1},this.disabled=!1,this.resetPosition()}},{key:"resetPosition",value:function(){this.position=[],this.rawX=0,this.offsetX=0,this.trajectoryTag.style.width="0px",this.moveModule(),this.hiddenVerifyResult(),this.showTip(l("YPcaptcha_03",this.lang))}},{key:"verify",value:function(){var e=this,t=window.getComputedStyle(this.bgTag,null),n=parseInt(t.width),i=this.reducePoints(),r=(this.imgWidth-this.alertImgTag.width)*(this.offsetX/(this.imgWidth-42))/n;this.jsonpRequest("/jsonp/captcha/verify",{points:i,distanceX:r},function(t){if(t.code)return e.resetPosition(),e.disabled=!0,e.curErrorIndex++,void(e.curErrorIndex<e.MAX_ERROR?(e.showVerifyResult("error",l("YPcaptcha_04",e.lang)),setTimeout(function(){e.disabled=!1,setTimeout(function(){return e.onFail(t.code,t.msg,!0)},0)},500)):(e.disabled=!1,e.curErrorIndex=0,setTimeout(function(){return e.onFail(t.code,t.msg,!1)},0)));e.curErrorIndex=0,e.showVerifyResult("success",l("YPcaptcha_05",e.lang),!1),e.onSuccess({token:t.data.token,authenticate:t.data.authenticate})},this.onFail)}},{key:"showTip",value:function(t){this.alertTextTag.innerHTML=t,this.alertTextTag.className="yp-riddler-slider-tip-default"}},{key:"showVerifyResult",value:function(t,e){var n=this,i=!(2<arguments.length&&void 0!==arguments[2])||arguments[2];if("success"===t){this.trajectoryTag.style.background="#E5F6DD",document.querySelector(".yp-riddler-slider-btn-sign").src=U;var r=document.createElement("div");r.className="yp-riddler-slider-btn-mask",document.querySelector(".yp-riddler-slider-btn").appendChild(r);var o=setTimeout(function(){var t=document.querySelector(".yp-riddler-slider-btn");t&&t.removeChild(r),clearTimeout(o)},2e3)}if(this.verifyResultTag.className="yp-riddler-result yp-riddler-result-alert-".concat(t),this.verifyResultTag.innerHTML=e,this.verifyResultTag.style.height="24px",i)var a=setTimeout(function(){n.hiddenVerifyResult(),clearTimeout(a)},2e3)}},{key:"createRightDom",value:function(t){var e=document.createElement("img");e.className="yp-riddler-slider-btn-sign",e.src=M,t.appendChild(e)}},{key:"hiddenVerifyResult",value:function(){this.verifyResultTag.style.height="0px",this.verifyResultTag.innerHTML="",document.querySelector(".yp-riddler-slider-btn-sign").src=M}},{key:"moveModule",value:function(){this.trajectoryTag.style.width="".concat(this.offsetX,"px"),this.btnTag.style.left="".concat(this.offsetX,"px"),this.alertImgTag.style.left=(this.imgWidth-this.alertImgTag.width)*(this.offsetX/(this.imgWidth-40))+"px"}},{key:"reducePoints",value:function(){var t=D(this.position);if(t.length<=this.MAX_POINTS_AMOUNT)return t;var e=[t[0]],n=t[t.length-1],i=Math.floor(t.length/this.MAX_POINTS_AMOUNT);if(i<2)return t;for(var r=1;r<t.length-2;r+=i)e.push(t[r]);return e.push(n),e}},{key:"createWin",value:function(){var e=this,t=this.makeWin(),n=document.createElement("div");if(n.className="yp-riddler-slide-img-container",n.style.width=this.imgWidth+"px",t.appendChild(n),this.waterMark){var i=document.createElement("img");i.className="yp-riddler-power-img",i.src="en"===this.lang?j:V,n.appendChild(i)}this.bgTag=document.createElement("img"),this.bgTag.className="yp-riddler-slider-bg",this.bgTag.style.width=this.imgWidth+"px",this.bgTag.style.height=this.imgWidth/2+"px",this.bgTag.style.backgroundColor="#c7c7c7",this.alertImgTag=document.createElement("img"),this.alertImgTag.className="yp-riddler-slider-front",this.verifyResultTag=document.createElement("div"),this.verifyResultTag.className="yp-riddler-result",n.appendChild(this.bgTag),n.appendChild(this.alertImgTag),n.appendChild(this.verifyResultTag);var r=document.createElement("img");r.src=P,r.addEventListener(window.EventObj.click,function(t){t.stopPropagation(),t.preventDefault(),e.deg+=360,r.style.transform="rotate(".concat(e.deg,"deg)"),e.resetPosition(),e.getCaptcha()}),r.className="yp-riddler-refresh",n.appendChild(r);var o=document.createElement("div");o.className="yp-riddler-slider-area",t.appendChild(o),this.trajectoryTag=document.createElement("div"),this.trajectoryTag.className="yp-riddler-slider-trajectory",o.appendChild(this.trajectoryTag),this.alertTextTag=document.createElement("div"),o.appendChild(this.alertTextTag);var a=document.createElement("div");a.className="yp-riddler-slider-btn",this.createRightDom(a),o.appendChild(a),this.btnTag=a,this.registerDragEvent()}},{key:"registerDragEvent",value:function(){var r=this;this.alertImgTag.addEventListener(window.EventObj.down,function(t){if(!r.offsetX&&!r.disabled){var e=0;e="touchmove"===window.EventObj.move?t.targetTouches[0].pageX:t.pageX,r.mouseDown=!0,r.isDraging=!0,r.rawX=e,r.rawTimestamp=Date.now(),r.showTip(""),r.MAX_OFFSET=r.imgWidth-40,r.trajectoryTag.style.width=(r.proption-.125)*r.imgWidth/2+"px"}}),this.btnTag.addEventListener(window.EventObj.down,function(t){if(!r.offsetX&&!r.disabled){document.querySelector(".yp-riddler-slider-btn-sign").src=L;var e=0;e="touchmove"===window.EventObj.move?t.targetTouches[0].pageX:t.pageX,r.mouseDown=!0,r.isDraging=!0,r.rawX=e,r.rawTimestamp=Date.now(),r.showTip(""),r.MAX_OFFSET=r.imgWidth-40,r.trajectoryTag.style.width=(r.proption-.125)*r.imgWidth/2+"px"}}),document.addEventListener(window.EventObj.up,function(){r.mouseDown&&(document.querySelector(".yp-riddler-slider-btn-sign").src=M,r.isDraging=!1,r.mouseDown=!1,r.verify())}),this.CONTAINER.addEventListener(window.EventObj.up,function(){r.mouseDown&&(document.querySelector(".yp-riddler-slider-btn-sign").src=M,r.isDraging=!1,r.mouseDown=!1,r.verify())}),this.CONTAINER.addEventListener(window.EventObj.move,function(t){var e=0,n=0;if(n="touchmove"===window.EventObj.move?(t.preventDefault(),e=t.targetTouches[0].pageX,t.targetTouches[0].pageY):(e=t.pageX,t.pageY),r.isDraging){r.offsetX=e-r.rawX,r.offsetX<0?r.offsetX=0:r.offsetX>r.MAX_OFFSET&&(r.offsetX=r.MAX_OFFSET);var i=[parseInt(e.toFixed(2)),parseInt(n.toFixed(2)),Date.now()-r.rawTimestamp];r.position.push(i),r.moveModule()}}),this.CONTAINER.getElementsByClassName("yp-riddler-win")[0].addEventListener("mouserleave",function(){r.isDraging&&(r.isDraging=!1,r.resetPosition())})}}])&&k(e.prototype,n),i&&k(e,i),o}();function _(t){return(_="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function H(t){return function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e<t.length;e++)n[e]=t[e];return n}}(t)||function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function X(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function z(t,e){return!e||"object"!==_(e)&&"function"!=typeof e?function(t){if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(t):e}function W(t){return(W=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function q(t,e){return(q=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var G=n(1),K=n(6),J=n(7),Y=n(3),Q=n(2),Z=n(8),$=function(t){function o(){var t,e;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o);for(var n=arguments.length,i=new Array(n),r=0;r<n;r++)i[r]=arguments[r];return(e=z(this,(t=W(o)).call.apply(t,[this].concat(i)))).position=[],e.bgTag=null,e.alertImgTag=null,e.trajectoryTag=null,e.rawX=0,e.rawTimestamp=0,e.offsetX=0,e.alertTextTag=null,e.btnTag=null,e.maskerTag=null,e.isDraging=!1,e.MAX_OFFSET=0,e.MAX_POINTS_AMOUNT=50,e.disabled=!1,e.curErrorIndex=0,e.MAX_ERROR=3,e.mouseDown=!1,e.proption=0,e.deg=0,e}var e,n,i;return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&q(t,e)}(o,m),e=o,(n=[{key:"render",value:function(t){var e=t.sliderWidth,n=void 0===e?0:e,i=t.width,r=void 0===i?1:i,o=t.bg,a=void 0===o?"":o,s=t.front,c=void 0===s?"":s,l=this.CONTAINER.getElementsByClassName("yp-riddler-win");l&&!l.length&&(this.proption=(n/r).toFixed(2),this.createWin()),this.bgTag.src=a,this.alertImgTag.src=c,this.disabled=!1,this.resetPosition()}},{key:"resetPosition",value:function(){this.position=[],this.rawX=0,this.offsetX=0,this.trajectoryTag.style.width="0px",this.maskerTag.style.display="none",this.moveModule(),this.showVerifyResult("","",!1),this.showTip(l("YPcaptcha_03",this.lang))}},{key:"verify",value:function(){var e=this,t=window.getComputedStyle(this.bgTag,null),n=parseInt(t.width),i=this.reducePoints(),r=this.offsetX/n;this.jsonpRequest("/jsonp/captcha/verify",{points:i,distanceX:r},function(t){if(t.code)return e.resetPosition(),e.showTip(l("YPcaptcha_04",e.lang),"error"),e.disabled=!0,e.curErrorIndex++,void(e.curErrorIndex<e.MAX_ERROR?setTimeout(function(){e.showTip(l("YPcaptcha_03",e.lang)),e.disabled=!1,setTimeout(function(){return e.onFail(t.code,t.msg,!0)},0)},500):(e.curErrorIndex=0,setTimeout(function(){return e.onFail(t.code,t.msg,!1)},0)));e.curErrorIndex=0,e.showVerifyResult("success",l("YPcaptcha_05",e.lang),!0),e.onSuccess({token:t.data.token,authenticate:t.data.authenticate})},this.onFail)}},{key:"showTip",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]&&arguments[1];this.alertTextTag.innerHTML=t,this.alertTextTag.className="yp-riddler-slider-tip-"+(e?"error":"default")}},{key:"showVerifyResult",value:function(t,e,n){var i=this.CONTAINER.getElementsByClassName("yp-riddler-slide-img-container");if(n){if(i&&i.length){var r=document.createElement("div");r.className="yp-riddler-result yp-riddler-result-alert-".concat(t),r.innerHTML=e,i[0].appendChild(r)}if("success"===t){this.trajectoryTag.style.background="#E5F6DD",document.querySelector(".yp-riddler-slider-btn-sign").src=Z;var o=document.createElement("div");o.className="yp-riddler-slider-btn-mask",document.querySelector(".yp-riddler-slider-btn").appendChild(o);var a=setTimeout(function(){var t=document.querySelector(".yp-riddler-slider-btn");t&&t.removeChild(o),clearTimeout(a)},2e3)}}else{var s=this.CONTAINER.getElementsByClassName("yp-riddler-result")[0];s&&i[0].removeChild(s)}}},{key:"moveModule",value:function(){this.trajectoryTag.style.width="".concat(this.offsetX,"px"),this.alertImgTag.style.left="".concat(this.offsetX,"px"),this.btnTag.style.left="".concat(this.offsetX,"px")}},{key:"reducePoints",value:function(){var t=H(this.position);if(t.length<=this.MAX_POINTS_AMOUNT)return t;var e=[t[0]],n=t[t.length-1],i=Math.floor(t.length/this.MAX_POINTS_AMOUNT);if(i<2)return t;for(var r=1;r<t.length-2;r+=i)e.push(t[r]);return e.push(n),e}},{key:"externalSlide",value:function(){var t=this.CONTAINER.getElementsByClassName("yp-riddler")[0],e=document.createElement("div");e.className="yp-riddler-slider-area",e.style.height=this.winWidth/8+"px",e.style.width=this.winWidth+"px",e.style.lineHeight=this.winWidth/8+"px",t.appendChild(e);var n=document.createElement("div");n.className="yp-riddler-slider-btn",n.style.width=this.winWidth/6+"px";var i=document.createElement("span");i.className="yp-riddler-slider-tip-default",i.innerHTML=l("YPcaptcha_03",this.lang),e.appendChild(i);var r=document.createElement("img");r.className="yp-riddler-slider-btn-sign",r.src=K,n.appendChild(r),e.appendChild(n)}},{key:"createWin",value:function(){var e=this,t=this.makeWin();t.style.width=this.winWidth+"px",t.style.padding="0px";var n=document.createElement("div");if(n.className="yp-riddler-slide-img-container",n.style.width=this.winWidth+"px",t.appendChild(n),this.waterMark){var i=document.createElement("img");i.className="yp-riddler-power-img",i.src="en"===this.lang?Q:Y,n.appendChild(i)}this.bgTag=document.createElement("img"),this.bgTag.className="yp-riddler-slider-bg",this.bgTag.style.width=this.winWidth+"px",this.bgTag.style.height=this.winWidth/2+"px",this.bgTag.style.backgroundColor="#c7c7c7",this.alertImgTag=document.createElement("img"),this.alertImgTag.className="yp-riddler-slider-front",this.externalSlide(),n.appendChild(this.bgTag),n.appendChild(this.alertImgTag);var r=document.createElement("img");r.src=G,r.addEventListener(window.EventObj.click,function(t){t.stopPropagation(),t.preventDefault(),e.deg+=360,r.style.transform="rotate(".concat(e.deg,"deg)"),e.resetPosition(),e.getCaptcha()}),r.className="yp-riddler-refresh",n.appendChild(r);var o=this.CONTAINER.getElementsByClassName("yp-riddler-slider-area")[0];this.alertTextTag=this.CONTAINER.getElementsByClassName("yp-riddler-slider-tip-default")[0],this.alertTextTag.style.paddingLeft="40px",this.alertTextTag.style.fontSize="14px",this.trajectoryTag=document.createElement("div"),this.trajectoryTag.className="yp-riddler-slider-trajectory",o.appendChild(this.trajectoryTag),this.maskerTag=this.CONTAINER.getElementsByClassName("yp-riddler-win-masker")[0],this.maskerTag.style.display="none",this.btnTag=this.CONTAINER.getElementsByClassName("yp-riddler-slider-btn")[0],this.maskerTag.style.paddingBottom=this.btnTag.offsetHeight+10+"px",this.registerDragEvent()}},{key:"registerDragEvent",value:function(){var c=this;this.btnTag.addEventListener(window.EventObj.down,function(t){if(!c.offsetX&&!c.disabled){document.querySelector(".yp-riddler-slider-btn-sign").src=J,c.maskerTag.style.display="block";var e=0;e="touchmove"===window.EventObj.move?t.targetTouches[0].pageX:t.pageX,c.mouseDown=!0,c.isDraging=!0,c.rawX=e,c.rawTimestamp=Date.now(),c.showTip("");var n=window.getComputedStyle(c.btnTag.parentNode,null),i=window.getComputedStyle(c.btnTag,null),r=c.CONTAINER.getElementsByClassName("yp-riddler-slider-front")[0].offsetWidth,o=parseInt(n.width),a=o-r,s=o-parseInt(i.width);s<(c.MAX_OFFSET=a)&&(c.MAX_OFFSET=s),c.trajectoryTag.style.marginLeft="0px",c.trajectoryTag.style.width=(c.proption-.125)*(c.winWidth-20)/2+"px"}}),this.CONTAINER.addEventListener(window.EventObj.up,function(){c.mouseDown&&(document.querySelector(".yp-riddler-slider-btn-sign").src=K,c.isDraging=!1,c.mouseDown=!1,c.maskerTag.style.display="none",c.verify())}),this.CONTAINER.addEventListener(window.EventObj.move,function(t){var e=0,n=0;if(n="touchmove"===window.EventObj.move?(t.preventDefault(),e=t.targetTouches[0].pageX,t.targetTouches[0].pageY):(e=t.pageX,t.pageY),c.isDraging){c.offsetX=e-c.rawX,c.offsetX<0?c.offsetX=0:c.offsetX>c.MAX_OFFSET&&(c.offsetX=c.MAX_OFFSET);var i=[parseInt(e.toFixed(2)),parseInt(n.toFixed(2)),Date.now()-c.rawTimestamp];c.position.push(i),c.moveModule()}}),this.CONTAINER.getElementsByClassName("yp-riddler-win-masker")[0].addEventListener("mouseleave",function(){c.isDraging&&(c.isDraging=!1,c.resetPosition())})}}])&&X(e.prototype,n),i&&X(e,i),o}();function tt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},i=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(n).filter(function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable}))),i.forEach(function(t){et(e,t,n[t])})}return e}function et(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function nt(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=[],i=!0,r=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(i=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);i=!0);}catch(t){r=!0,o=t}finally{try{i||null==s.return||s.return()}finally{if(r)throw o}}return n}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function it(t,e,n){return(it=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}()?Reflect.construct:function(t,e,n){var i=[null];i.push.apply(i,e);var r=new(Function.bind.apply(t,i));return n&&rt(r,n.prototype),r}).apply(null,arguments)}function rt(t,e){return(rt=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function ot(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function at(t,e,n){return e&&ot(t.prototype,e),n&&ot(t,n),t}var st=function(){function e(t){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),this.pool={},this.expired=1e3*t}return at(e,null,[{key:"Instance",value:function(){if(!this._instance){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];this._instance=it(this,e)}return this._instance}}]),at(e,[{key:"makeScriptId",value:function(t){return"jsonp_".concat(t)}},{key:"preAdd",value:function(){for(var t;(t=Math.random().toString(32).replace("0.",""))in this.pool;);return this.pool[t]={ts:1/0},t}},{key:"add",value:function(t,e,n){var i=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;this.pool[t]={ts:Date.now(),cb:n,failCb:i};var r=document.createElement("script");r.src=e,r.id=this.makeScriptId(t),document.head.appendChild(r)}},{key:"removeCallback",value:function(t){if(t in this.pool){var e=this.pool[t];delete this.pool[t];var n=document.getElementById(this.makeScriptId(t));return n.parentNode.removeChild(n),e}}},{key:"checkExpired",value:function(){var t=!0,e=!1,n=void 0;try{for(var i,r=function(t){t||(t={});var e=Object.keys(t),n=e.length,i=new Array(n);for(;n--;)i[n]=[e[n],t[e[n]]];return i}(this.pool)[Symbol.iterator]();!(t=(i=r.next()).done);t=!0){var o=nt(i.value,2),a=o[0],s=o[1].ts;if(Date.now()>s+this.expired){var c=tt({},this.removeCallback(a),{msg:"request timeout",code:408});c.failCb&&c.failCb(c)}}}catch(t){e=!0,n=t}finally{try{t||null==r.return||r.return()}finally{if(e)throw n}}}},{key:"invoke",value:function(t,e){var n=this.pool[t];n?(this.removeCallback(t),n.cb(e)):console.warn("cb[".concat(t,"] is expired"))}}]),e}();var ct=n(10),lt=n.n(ct),ut=n(4),ht=n.n(ut),dt=n(11),ft=n.n(dt),pt=n(5),gt=n.n(pt),mt={};function yt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},i=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(n).filter(function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable}))),i.forEach(function(t){vt(e,t,n[t])})}return e}function vt(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function bt(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}mt.getRandomStr=function(t){for(var e="";e.length<t;)e+=Math.random().toString(36).substr(2);return e=e.slice(0,t)},mt.getBrowserInfo=function(){var t=[],e={userAgent:navigator.userAgent,language:navigator.language,hardware_concurrency:navigator.hardwareConcurrency,resolution:[window.screen.width,window.screen.height],navigator_platform:navigator.platform};for(var n in e)e.hasOwnProperty(n)&&t.push({key:n,value:e[n]});return t},mt.createUUid=function(){var n=(new Date).getTime();return window.performance&&"function"==typeof window.performance.now&&(n+=window.performance.now()),"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){var e=(n+16*Math.random())%16|0;return n=Math.floor(n/16),("x"===t?e:3&e|8).toString(16)})},mt.cookie={get:function(){for(var t=(0<arguments.length&&void 0!==arguments[0]?arguments[0]:"")+"=",e=document.cookie.split(";"),n=0;n<e.length;n++){for(var i=e[n];" "===i.charAt(0);)i=i.substring(1,i.length);if(0===i.indexOf(t))return decodeURIComponent(i.substring(t.length,i.length))}return null},set:function(t,e,n,i,r){var o="",a="",s="";if(i){var c=document.location.hostname.match(/[a-z0-9][a-z0-9\-]+\.[a-z\.]{2,6}$/i),l=c?c[0]:"";o=l?"; domain=."+l:""}if(n){var u=new Date;u.setTime(u.getTime()+24*n*60*60*1e3),a="; expires="+u.toGMTString()}r&&(s="; secure");var h="".concat(t,"=").concat(encodeURIComponent(e)).concat(a,"; path=/").concat(o).concat(s);return document.cookie=h},parse:function(t){return JSON.parse(mt.cookie.get(t)||null)},remove:function(t,e){mt.cookie.set(t,"",-1,e)}};var wt=n(19),Tt="";document.currentScript&&document.currentScript.src&&(Tt=document.currentScript.src);var At=function(){function x(t){var e=t.config,n=void 0===e?{}:e,i=t.container,r=t.additions,o=t.nativeInfo,a=t.langPack,s=t.onError,c=t.onSuccess,l=t.onFail,u=t.onExit,h=t.beforeStart,d=t.afterStart,f=t.expired,p=t.jsonpField,g=t.hosts,m=t.appId,y=t.noButton,v=t.mode,b=t.winWidth,w=t.lang,T=t.mobile,A=t.username,E=t.version;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,x),this.mode=n.mode||v||S,this.winWidth=n.winWidth||b,this.APP_ID=n.appId||m,this.version=E||"v1",this.EXPIRED=n.expired||f||30,this.JSONP_FIELD=p||"ypjsonp",this.RSA_PUBLIC_KEY="-----BEGIN PUBLIC KEY-----MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDnOWe/gs033L/2/xR3oi6SLAMPBY5VledUqqH6dbCNOdrGX4xW+1x6NUfvmwpHRBA2C7xWDDvOIldTl0rMtERTDy9homrVqEcW6/TY+dSVFL3e2Yg2sVaehHv7FhmATkgfC2FcXt8Wvm99QpKRSrGKpcFYJwOj2F8hJh+rTG0IPQIDAQAB-----END PUBLIC KEY-----",this.HOSTS=n.hosts||g||"https://captcha.yunpian.com",this.NO_BUTTON=n.noButton||y,this.CONTAINER=i.dom||i,this.lang=n.lang||w||"zh-cn",this.langPack=n.langPack||a,this.additions=r||{},this.additions.username=this.additions.username||A||T,this.beforeStart=h||function(t){return t()},this.afterStart=d||function(){},this.onSuccess=c||function(){},this.onError=s||function(){},this.onFail=l||function(t,e,n){console.warn("验证失败:",e,"code:",t),n()},this.onExit=u||function(){},this.fingerprint=null,this.browserInfo=null,this.token=null,this.cbManager=st.Instance(this.EXPIRED),this.validator=null,this.masker=null,this.hasModeBuildDone=!1,this.scrollTop=null,this.waterMark=!0,this.logoOptions={},this.drawIndex=0,this.nativeInfo=o||null,this.init()}var t,e,n;return t=x,(e=[{key:"rsaEncrypt",value:function(t){var e=new ft.a;return e.setPublicKey(this.RSA_PUBLIC_KEY),e.encrypt(t)}},{key:"encrypt",value:function(t){t=JSON.stringify(t);var e=mt.getRandomStr(16),n=mt.getRandomStr(16);return{i:lt.a.encrypt(t,ht.a.parse(e),{iv:ht.a.parse(n)}).toString(),k:this.rsaEncrypt(e+n)}}},{key:"jsonpRequest",value:function(t,e,n){var i=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null,r=this.cbManager.preAdd(),o=location.origin;e.fp=this.fingerprint,e.address=o,e.yp_riddler_id=mt.cookie.get("yp_riddler_id")||"";var a=this.encrypt(e);t="".concat(this.HOSTS,"/").concat(this.version).concat(t,"?cb=").concat(r,"&i=").concat(encodeURIComponent(a.i),"&k=").concat(encodeURIComponent(a.k)),this.token&&(t+="&token=".concat(this.token)),this.APP_ID&&(t+="&captchaId=".concat(this.APP_ID)),this.cbManager.add(r,t,n,i)}},{key:"injectButton",value:function(t){if(!this.NO_BUTTON){var e=document.createElement("div");e.className="yp-riddler-button_logo";var n=document.createElement("div");n.className="yp-riddler-btn_a",e.appendChild(n),(n=document.createElement("div")).className="yp-riddler-btn_b",e.appendChild(n);var i=document.createElement("span");i.className="yp-riddler-button_text",i.innerHTML=l("YPcaptcha_01",this.lang),t.appendChild(e),t.appendChild(i)}}},{key:"injectSuccessBtn",value:function(t){if(!this.NO_BUTTON&&t){this.isVerifySuccess=!0;var e=this.CONTAINER.getElementsByClassName("yp-riddler-button")[0];if(e){var n=this.CONTAINER.getElementsByClassName("yp-riddler-button_logo")[0],i=this.CONTAINER.getElementsByClassName("yp-riddler-button_text")[0];e.removeChild(n),e.removeChild(i);var r=document.createElement("img");r.className="yp-riddler-button-sucButton_logo",r.src=wt;var o=document.createElement("p");return o.className="yp-riddler-button-sucButton_text",o.innerText=l("YPcaptcha_05",this.lang),e.setAttribute("style","background: #EEFFF5; border: 1px solid #26C267"),e.appendChild(r),e.appendChild(o),e}}return null}},{key:"externalSlide",value:function(t){var e=document.createElement("div");e.className="yp-riddler-slider-area",e.style.height=this.winWidth/8+"px",e.style.width=this.winWidth+"px",e.style.lineHeight=this.winWidth/8+"px",t.appendChild(e);var n=document.createElement("div");n.className="yp-riddler-slider-btn",n.style.width=this.winWidth/6+"px";var i=document.createElement("span");i.className="yp-riddler-slider-tip-default",i.innerHTML=l("YPcaptcha_03",this.lang),e.appendChild(i);var r=document.createElement("span");r.className="yp-riddler-slider-btn-sign",r.innerHTML=">&nbsp;>",n.appendChild(r),e.appendChild(n)}},{key:"buildDialogMode",value:function(t){var e=this;this.CONTAINER.addEventListener("click",function(t){if(!e.isVerifySuccess){t.stopPropagation();e.beforeStart(function(){e.getCaptcha(),e.hasModeBuildDone=!0}),i().ios&&window.scrollTo(e.scrollTop,0)}}),this.injectButton(t)}},{key:"buildFloatMode",value:function(n){var i=this;this.CONTAINER.addEventListener("mouseenter",function(){var t=n.getElementsByClassName("yp-riddler-win-masker")[0],e=i.NO_BUTTON?i.CONTAINER:n;t.style.paddingBottom=e.clientHeight+10+"px";i.beforeStart(function(){i.validator||i.hasModeBuildDone?i.showUI(null,!1):(i.getCaptcha(),i.hasModeBuildDone=!0)});i.CONTAINER.addEventListener("mouseleave",function t(){i.hideUI(!1),i.CONTAINER.removeEventListener("mouseleave",t)})}),this.injectButton(n)}},{key:"buildFlatMode",value:function(t){var e=this;this.beforeStart(function(){e.getCaptcha(),e.hasModeBuildDone=!0})}},{key:"buildExternalMode",value:function(t){var e=this;this.beforeStart(function(){e.getCaptcha(),e.hasModeBuildDone=!0})}},{key:"retWidth",value:function(){var t=new RegExp(/^\d+%$/);if(this.winWidth){if(t.test(this.winWidth)){var e=document.body.clientWidth,n=this.winWidth.replace("%","")/100;this.winWidth=n*e}this.winWidth=this.winWidth<230?230:this.winWidth}else this.winWidth=500}},{key:"loadLang",value:function(){window.YP_RIDDLER_RESOURCE_LANG=yt({},window.YP_RIDDLER_RESOURCE_LANG);var t=yt({},r);if(this.langPack&&"{}"!==JSON.stringify(this.langPack))return window.YP_RIDDLER_RESOURCE_LANG.other=yt({},t,this.langPack),void(this.lang="other");this.lang?window.YP_RIDDLER_RESOURCE_LANG[this.lang]=o[this.lang]:window.YP_RIDDLER_RESOURCE_LANG[this.lang]=o["zh-cn"]}},{key:"createPublicCpts",value:function(r){var o=this;gt.a.get({NOT_AVAILABLE:"not available",ERROR:"error",EXCLUDED:"excluded"},function(t){var e=t.map(function(t){return t.value});o.fingerprint=gt.a.x64hash128(e.join(""),31),o.browserInfo=mt.getBrowserInfo();var n=o["build".concat(o.mode[0].toUpperCase()+o.mode.slice(1),"Mode")];n&&n.call(o,r);var i=document.createElement("div");i.className="yp-riddler-win-masker "+o.mode,o.mode===S&&i.addEventListener("click",function(t){t.stopPropagation(),"touchstart"!==window.EventObj.click&&t.preventDefault(),o.validator&&(o.hideUI(),o.onExit())}),r.appendChild(i),o.masker=i})}},{key:"showUI",value:function(t){var e=!(1<arguments.length&&void 0!==arguments[1])||arguments[1];this.masker.style.display="block",e&&this.validator.render(t)}},{key:"hideUI",value:function(){var t=this,e=!(0<arguments.length&&void 0!==arguments[0])||arguments[0];setTimeout(function(){t.masker.style.display="none",e&&t.validator.destroy()},500)}},{key:"getCaptcha",value:function(){var r=this;this.jsonpRequest("/jsonp/captcha/get",{browserInfo:this.browserInfo.filter(function(t){if("webql"!==t.key&&"canvas"!==t.key)return t}),nativeInfo:this.nativeInfo,additions:this.additions,options:{sdk:Tt,sdkBuildVersion:"1.5.0(2021080901)",hosts:this.HOSTS}},function(t){var e;if(t.code)r.onError&&r.onError(t);else if(t.data.type!==d){r.mode===s&&1===t.data.type&&(t.data.type=-1);var n=(e={},vt(e,u,C),vt(e,h,F),vt(e,c,$),vt(e,f,C),e)[t.data.type];r.token=t.data.token,r.logoOptions=yt({},t.data.logoOptions),r.waterMark=t.data.logoOptions.status;var i=function(){r.validator=new n(function(t){r.onSuccess(t,function(){return r.hideUI()},function(){var t=0<arguments.length&&void 0!==arguments[0]&&arguments[0];return r.injectSuccessBtn(t)}),r.token=null},function(){r.onError.apply(r,arguments),r.token=null},function(t,e,n){n||(r.getCaptcha(),r.token=null),r.onFail(t,e,function(){})},r.CONTAINER,function(){r.jsonpRequest.apply(r,arguments)},function(){return r.getCaptcha()},r.winWidth,r.APP_ID,r.waterMark,r.lang,r.logoOptions,r.mode)};r.validator?r.validator instanceof n||(r.hideUI(),i()):i(),r.showUI(t.data),0===r.drawIndex&&setTimeout(function(){r.drawIndex++,r.afterStart()},0)}else r.onSuccess(t.data,function(){},function(){var t=0<arguments.length&&void 0!==arguments[0]&&arguments[0];return r.injectSuccessBtn(t)})},this.onError)}},{key:"setCookie",value:function(){var t=mt.createUUid();mt.cookie.set("yp_riddler_id",t,356)}},{key:"init",value:function(){var e=this;this.loadLang(),this.retWidth(),mt.cookie.get("yp_riddler_id")||this.setCookie(),this.scrollTop=document.documentElement.scrollTop,this.CONTAINER.getElementsByClassName("yp-riddler")[0]&&(this.CONTAINER.innerHTML=""),setInterval(function(){e.cbManager.checkExpired()},500);window[this.JSONP_FIELD]=function(t){window[e.JSONP_FIELD].ret=null,e.cbManager.invoke(t.cb,t)};var t=document.createElement("div");t.className="yp-riddler yp-".concat(this.mode," ").concat(this.mode===a||this.NO_BUTTON||this.mode===s?"":"yp-riddler-button"),this.CONTAINER.appendChild(t),"static"===window.getComputedStyle(this.CONTAINER,null).position&&(this.CONTAINER.style.position="relative"),this.createPublicCpts(t)}}])&&bt(t.prototype,e),n&&bt(t,n),x}();n(20);window.YpRiddler=At;var Et={down:"mousedown",up:"mouseup",move:"mousemove",click:"click"},xt=i();"ontouchend"in document&&(Et={down:"touchstart",up:"touchend",move:"touchmove",click:"touchstart"}),xt.mobile&&"ontouchstart"in document.documentElement==!0&&(Et={down:"touchstart",up:"touchend",move:"touchmove",click:"touchstart"}),xt.mac&&"ontouchstart"in document.documentElement==!0&&(Et={down:"touchstart",up:"touchend",move:"touchmove",click:"touchstart"}),xt.iPad&&"ontouchstart"in document.documentElement==!1&&(Et={down:"mousedown",up:"mouseup",move:"mousemove",click:"click"}),xt.weixin&&xt.mobile&&(Et={down:"touchstart",up:"touchend",move:"touchmove",click:"touchstart"}),xt.fireFox&&-1<navigator.userAgent.indexOf("Mobile")&&(Et={down:"touchstart",up:"touchend",move:"touchmove",click:"touchstart"}),window.EventObj=Et}]);</script><style type="text/css">.yp-riddler {
DesignScreenshot/output/gitee_run/gitee.com_3_credentials_filled.html:4:},{debug:10,parseuri:42}],7:[function(e,t){function n(e){e=e||{},this.ms=e.min||100,this.max=e.max||1e4,this.factor=e.factor||2,this.jitter=e.jitter>0&&e.jitter<=1?e.jitter:0,this.attempts=0}t.exports=n,n.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=0==(1&Math.floor(10*t))?e-n:e+n}return 0|Math.min(e,this.max)},n.prototype.reset=function(){this.attempts=0},n.prototype.setMin=function(e){this.ms=e},n.prototype.setMax=function(e){this.max=e},n.prototype.setJitter=function(e){this.jitter=e}},{}],8:[function(e,t){var n=[].slice;t.exports=function(e,t){if("string"==typeof t&&(t=e[t]),"function"!=typeof t)throw new Error("bind() requires a function");var o=n.call(arguments,2);return function(){return t.apply(e,o.concat(n.call(arguments)))}}},{}],9:[function(e,t){function n(e){return e?o(e):void 0}function o(e){for(var t in n.prototype)e[t]=n.prototype[t];return e}t.exports=n,n.prototype.on=n.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks[e]=this._callbacks[e]||[]).push(t),this},n.prototype.once=function(e,t){function n(){o.off(e,n),t.apply(this,arguments)}var o=this;return this._callbacks=this._callbacks||{},n.fn=t,this.on(e,n),this},n.prototype.off=n.prototype.removeListener=n.prototype.removeAllListeners=n.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var n=this._callbacks[e];if(!n)return this;if(1==arguments.length)return delete this._callbacks[e],this;for(var o,i=0;i<n.length;i++)if(o=n[i],o===t||o.fn===t){n.splice(i,1);break}return this},n.prototype.emit=function(e){this._callbacks=this._callbacks||{};var t=[].slice.call(arguments,1),n=this._callbacks[e];if(n){n=n.slice(0);for(var o=0,i=n.length;i>o;++o)n[o].apply(this,t)}return this},n.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks[e]||[]},n.prototype.hasListeners=function(e){return!!this.listeners(e).length}},{}],10:[function(e,t){function n(e){return n.enabled(e)?function(t){t=o(t);var i=new Date,r=i-(n[e]||i);n[e]=i,t=e+" "+t+" +"+n.humanize(r),window.console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}:function(){}}function o(e){return e instanceof Error?e.stack||e.message:e}t.exports=n,n.names=[],n.skips=[],n.enable=function(e){try{localStorage.debug=e}catch(t){}for(var o=(e||"").split(/[\s,]+/),i=o.length,r=0;i>r;r++)e=o[r].replace("*",".*?"),"-"===e[0]?n.skips.push(new RegExp("^"+e.substr(1)+"$")):n.names.push(new RegExp("^"+e+"$"))},n.disable=function(){n.enable("")},n.humanize=function(e){var t=1e3,n=6e4,o=60*n;return e>=o?(e/o).toFixed(1)+"h":e>=n?(e/n).toFixed(1)+"m":e>=t?(e/t|0)+"s":e+"ms"},n.enabled=function(e){for(var t=0,o=n.skips.length;o>t;t++)if(n.skips[t].test(e))return!1;for(var t=0,o=n.names.length;o>t;t++)if(n.names[t].test(e))return!0;return!1};try{window.localStorage&&n.enable(localStorage.debug)}catch(i){}},{}],11:[function(e,t){t.exports=e("./lib/")},{"./lib/":12}],12:[function(e,t){t.exports=e("./socket"),t.exports.parser=e("engine.io-parser")},{"./socket":13,"engine.io-parser":25}],13:[function(e,t){(function(n){function o(e,t){if(!(this instanceof o))return new o(e,t);if(t=t||{},e&&"object"==typeof e&&(t=e,e=null),e&&(e=u(e),t.host=e.host,t.secure="https"==e.protocol||"wss"==e.protocol,t.port=e.port,e.query&&(t.query=e.query)),this.secure=null!=t.secure?t.secure:n.location&&"https:"==location.protocol,t.host){var i=t.host.split(":");t.hostname=i.shift(),i.length?t.port=i.pop():t.port||(t.port=this.secure?"443":"80")}this.agent=t.agent||!1,this.hostname=t.hostname||(n.location?location.hostname:"localhost"),this.port=t.port||(n.location&&location.port?location.port:this.secure?443:80),this.query=t.query||{},"string"==typeof this.query&&(this.query=f.decode(this.query)),this.upgrade=!1!==t.upgrade,this.path=(t.path||"/engine.io").replace(/\/$/,"")+"/",this.forceJSONP=!!t.forceJSONP,this.jsonp=!1!==t.jsonp,this.forceBase64=!!t.forceBase64,this.enablesXDR=!!t.enablesXDR,this.timestampParam=t.timestampParam||"t",this.timestampRequests=t.timestampRequests,this.transports=t.transports||["polling","websocket"],this.readyState="",this.writeBuffer=[],this.callbackBuffer=[],this.policyPort=t.policyPort||843,this.rememberUpgrade=t.rememberUpgrade||!1,this.binaryType=null,this.onlyBinaryUpgrades=t.onlyBinaryUpgrades,this.pfx=t.pfx||null,this.key=t.key||null,this.passphrase=t.passphrase||null,this.cert=t.cert||null,this.ca=t.ca||null,this.ciphers=t.ciphers||null,this.rejectUnauthorized=t.rejectUnauthorized||null,this.open()}function i(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}var r=e("./transports"),a=e("component-emitter"),s=e("debug")("engine.io-client:socket"),c=e("indexof"),l=e("engine.io-parser"),u=e("parseuri"),p=e("parsejson"),f=e("parseqs");t.exports=o,o.priorWebsocketSuccess=!1,a(o.prototype),o.protocol=l.protocol,o.Socket=o,o.Transport=e("./transport"),o.transports=e("./transports"),o.parser=e("engine.io-parser"),o.prototype.createTransport=function(e){s('creating transport "%s"',e);var t=i(this.query);t.EIO=l.protocol,t.transport=e,this.id&&(t.sid=this.id);var n=new r[e]({agent:this.agent,hostname:this.hostname,port:this.port,secure:this.secure,path:this.path,query:t,forceJSONP:this.forceJSONP,jsonp:this.jsonp,forceBase64:this.forceBase64,enablesXDR:this.enablesXDR,timestampRequests:this.timestampRequests,timestampParam:this.timestampParam,policyPort:this.policyPort,socket:this,pfx:this.pfx,key:this.key,passphrase:this.passphrase,cert:this.cert,ca:this.ca,ciphers:this.ciphers,rejectUnauthorized:this.rejectUnauthorized});return n},o.prototype.open=function(){var e;if(this.rememberUpgrade&&o.priorWebsocketSuccess&&-1!=this.transports.indexOf("websocket"))e="websocket";else{if(0==this.transports.length){var t=this;return void setTimeout(function(){t.emit("error","No transports available")},0)}e=this.transports[0]}this.readyState="opening";var e;try{e=this.createTransport(e)}catch(n){return this.transports.shift(),void this.open()}e.open(),this.setTransport(e)},o.prototype.setTransport=function(e){s("setting transport %s",e.name);var t=this;this.transport&&(s("clearing existing transport %s",this.transport.name),this.transport.removeAllListeners()),this.transport=e,e.on("drain",function(){t.onDrain()}).on("packet",function(e){t.onPacket(e)}).on("error",function(e){t.onError(e)}).on("close",function(){t.onClose("transport close")})},o.prototype.probe=function(e){function t(){if(f.onlyBinaryUpgrades){var t=!this.supportsBinary&&f.transport.supportsBinary;p=p||t}p||(s('probe transport "%s" opened',e),u.send([{type:"ping",data:"probe"}]),u.once("packet",function(t){if(!p)if("pong"==t.type&&"probe"==t.data){if(s('probe transport "%s" pong',e),f.upgrading=!0,f.emit("upgrading",u),!u)return;o.priorWebsocketSuccess="websocket"==u.name,s('pausing current transport "%s"',f.transport.name),f.transport.pause(function(){p||"closed"!=f.readyState&&(s("changing transport and sending upgrade packet"),l(),f.setTransport(u),u.send([{type:"upgrade"}]),f.emit("upgrade",u),u=null,f.upgrading=!1,f.flush())})}else{s('probe transport "%s" failed',e);var n=new Error("probe error");n.transport=u.name,f.emit("upgradeError",n)}}))}function n(){p||(p=!0,l(),u.close(),u=null)}function i(t){var o=new Error("probe error: "+t);o.transport=u.name,n(),s('probe transport "%s" failed because of error: %s',e,t),f.emit("upgradeError",o)}function r(){i("transport closed")}function a(){i("socket closed")}function c(e){u&&e.name!=u.name&&(s('"%s" works - aborting "%s"',e.name,u.name),n())}function l(){u.removeListener("open",t),u.removeListener("error",i),u.removeListener("close",r),f.removeListener("close",a),f.removeListener("upgrading",c)}s('probing transport "%s"',e);var u=this.createTransport(e,{probe:1}),p=!1,f=this;o.priorWebsocketSuccess=!1,u.once("open",t),u.once("error",i),u.once("close",r),this.once("close",a),this.once("upgrading",c),u.open()},o.prototype.onOpen=function(){if(s("socket open"),this.readyState="open",o.priorWebsocketSuccess="websocket"==this.transport.name,this.emit("open"),this.flush(),"open"==this.readyState&&this.upgrade&&this.transport.pause){s("starting upgrade probes");for(var e=0,t=this.upgrades.length;t>e;e++)this.probe(this.upgrades[e])}},o.prototype.onPacket=function(e){if("opening"==this.readyState||"open"==this.readyState)switch(s('socket receive: type "%s", data "%s"',e.type,e.data),this.emit("packet",e),this.emit("heartbeat"),e.type){case"open":this.onHandshake(p(e.data));break;case"pong":this.setPing();break;case"error":var t=new Error("server error");t.code=e.data,this.emit("error",t);break;case"message":this.emit("data",e.data),this.emit("message",e.data)}else s('packet received with socket readyState "%s"',this.readyState)},o.prototype.onHandshake=function(e){this.emit("handshake",e),this.id=e.sid,this.transport.query.sid=e.sid,this.upgrades=this.filterUpgrades(e.upgrades),this.pingInterval=e.pingInterval,this.pingTimeout=e.pingTimeout,this.onOpen(),"closed"!=this.readyState&&(this.setPing(),this.removeListener("heartbeat",this.onHeartbeat),this.on("heartbeat",this.onHeartbeat))},o.prototype.onHeartbeat=function(e){clearTimeout(this.pingTimeoutTimer);var t=this;t.pingTimeoutTimer=setTimeout(function(){"closed"!=t.readyState&&t.onClose("ping timeout")},e||t.pingInterval+t.pingTimeout)},o.prototype.setPing=function(){var e=this;clearTimeout(e.pingIntervalTimer),e.pingIntervalTimer=setTimeout(function(){s("writing ping packet - expecting pong within %sms",e.pingTimeout),e.ping(),e.onHeartbeat(e.pingTimeout)},e.pingInterval)},o.prototype.ping=function(){this.sendPacket("ping")},o.prototype.onDrain=function(){for(var e=0;e<this.prevBufferLen;e++)this.callbackBuffer[e]&&this.callbackBuffer[e]();this.writeBuffer.splice(0,this.prevBufferLen),this.callbackBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,0==this.writeBuffer.length?this.emit("drain"):this.flush()},o.prototype.flush=function(){"closed"!=this.readyState&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length&&(s("flushing %d packets in socket",this.writeBuffer.length),this.transport.send(this.writeBuffer),this.prevBufferLen=this.writeBuffer.length,this.emit("flush"))},o.prototype.write=o.prototype.send=function(e,t){return this.sendPacket("message",e,t),this},o.prototype.sendPacket=function(e,t,n){if("closing"!=this.readyState&&"closed"!=this.readyState){var o={type:e,data:t};this.emit("packetCreate",o),this.writeBuffer.push(o),this.callbackBuffer.push(n),this.flush()}},o.prototype.close=function(){function e(){o.onClose("forced close"),s("socket closing - telling transport to close"),o.transport.close()}function t(){o.removeListener("upgrade",t),o.removeListener("upgradeError",t),e()}function n(){o.once("upgrade",t),o.once("upgradeError",t)}if("opening"==this.readyState||"open"==this.readyState){this.readyState="closing";var o=this;this.writeBuffer.length?this.once("drain",function(){this.upgrading?n():e()}):this.upgrading?n():e()}return this},o.prototype.onError=function(e){s("socket error %j",e),o.priorWebsocketSuccess=!1,this.emit("error",e),this.onClose("transport error",e)},o.prototype.onClose=function(e,t){if("opening"==this.readyState||"open"==this.readyState||"closing"==this.readyState){s('socket close with reason: "%s"',e);var n=this;clearTimeout(this.pingIntervalTimer),clearTimeout(this.pingTimeoutTimer),setTimeout(function(){n.writeBuffer=[],n.callbackBuffer=[],n.prevBufferLen=0},0),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),this.readyState="closed",this.id=null,this.emit("close",e,t)}},o.prototype.filterUpgrades=function(e){for(var t=[],n=0,o=e.length;o>n;n++)~c(this.transports,e[n])&&t.push(e[n]);return t}}).call(this,"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./transport":14,"./transports":15,"component-emitter":9,debug:22,"engine.io-parser":25,indexof:40,parsejson:32,parseqs:33,parseuri:34}],14:[function(e,t){function n(e){this.path=e.path,this.hostname=e.hostname,this.port=e.port,this.secure=e.secure,this.query=e.query,this.timestampParam=e.timestampParam,this.timestampRequests=e.timestampRequests,this.readyState="",this.agent=e.agent||!1,this.socket=e.socket,this.enablesXDR=e.enablesXDR,this.pfx=e.pfx,this.key=e.key,this.passphrase=e.passphrase,this.cert=e.cert,this.ca=e.ca,this.ciphers=e.ciphers,this.rejectUnauthorized=e.rejectUnauthorized}var o=e("engine.io-parser"),i=e("component-emitter");t.exports=n,i(n.prototype),n.timestamps=0,n.prototype.onError=function(e,t){var n=new Error(e);return n.type="TransportError",n.description=t,this.emit("error",n),this},n.prototype.open=function(){return("closed"==this.readyState||""==this.readyState)&&(this.readyState="opening",this.doOpen()),this},n.prototype.close=function(){return("opening"==this.readyState||"open"==this.readyState)&&(this.doClose(),this.onClose()),this},n.prototype.send=function(e){if("open"!=this.readyState)throw new Error("Transport not open");this.write(e)},n.prototype.onOpen=function(){this.readyState="open",this.writable=!0,this.emit("open")},n.prototype.onData=function(e){var t=o.decodePacket(e,this.socket.binaryType);this.onPacket(t)},n.prototype.onPacket=function(e){this.emit("packet",e)},n.prototype.onClose=function(){this.readyState="closed",this.emit("close")}},{"component-emitter":9,"engine.io-parser":25}],15:[function(e,t,n){(function(t){function o(e){var n,o=!1,s=!1,c=!1!==e.jsonp;if(t.location){var l="https:"==location.protocol,u=location.port;u||(u=l?443:80),o=e.hostname!=location.hostname||u!=e.port,s=e.secure!=l}if(e.xdomain=o,e.xscheme=s,n=new i(e),"open"in n&&!e.forceJSONP)return new r(e);if(!c)throw new Error("JSONP disabled");return new a(e)}var i=e("xmlhttprequest"),r=e("./polling-xhr"),a=e("./polling-jsonp"),s=e("./websocket");n.polling=o,n.websocket=s}).call(this,"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./polling-jsonp":16,"./polling-xhr":17,"./websocket":19,xmlhttprequest:20}],16:[function(e,t){(function(n){function o(){}function i(e){r.call(this,e),this.query=this.query||{},s||(n.___eio||(n.___eio=[]),s=n.___eio),this.index=s.length;var t=this;s.push(function(e){t.onData(e)}),this.query.j=this.index,n.document&&n.addEventListener&&n.addEventListener("beforeunload",function(){t.script&&(t.script.onerror=o)},!1)}var r=e("./polling"),a=e("component-inherit");t.exports=i;var s,c=/\n/g,l=/\\n/g;a(i,r),i.prototype.supportsBinary=!1,i.prototype.doClose=function(){this.script&&(this.script.parentNode.removeChild(this.script),this.script=null),this.form&&(this.form.parentNode.removeChild(this.form),this.form=null,this.iframe=null),r.prototype.doClose.call(this)},i.prototype.doPoll=function(){var e=this,t=document.createElement("script");this.script&&(this.script.parentNode.removeChild(this.script),this.script=null),t.async=!0,t.src=this.uri(),t.onerror=function(t){e.onError("jsonp poll error",t)};var n=document.getElementsByTagName("script")[0];n.parentNode.insertBefore(t,n),this.script=t;var o="undefined"!=typeof navigator&&/gecko/i.test(navigator.userAgent);o&&setTimeout(function(){var e=document.createElement("iframe");document.body.appendChild(e),document.body.removeChild(e)},100)},i.prototype.doWrite=function(e,t){function n(){o(),t()}function o(){if(i.iframe)try{i.form.removeChild(i.iframe)}catch(e){i.onError("jsonp polling iframe removal error",e)}try{var t='<iframe src="javascript:0" name="'+i.iframeId+'">';r=document.createElement(t)}catch(e){r=document.createElement("iframe"),r.name=i.iframeId,r.src="javascript:0"}r.id=i.iframeId,i.form.appendChild(r),i.iframe=r}var i=this;if(!this.form){var r,a=document.createElement("form"),s=document.createElement("textarea"),u=this.iframeId="eio_iframe_"+this.index;a.className="socketio",a.style.position="absolute",a.style.top="-1000px",a.style.left="-1000px",a.target=u,a.method="POST",a.setAttribute("accept-charset","utf-8"),s.name="d",a.appendChild(s),document.body.appendChild(a),this.form=a,this.area=s}this.form.action=this.uri(),o(),e=e.replace(l,"\\\n"),this.area.value=e.replace(c,"\\n");try{this.form.submit()}catch(p){}this.iframe.attachEvent?this.iframe.onreadystatechange=function(){"complete"==i.iframe.readyState&&n()}:this.iframe.onload=n}}).call(this,"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./polling":18,"component-inherit":21}],17:[function(e,t){(function(n){function o(){}function i(e){if(c.call(this,e),n.location){var t="https:"==location.protocol,o=location.port;o||(o=t?443:80),this.xd=e.hostname!=n.location.hostname||o!=e.port,this.xs=e.secure!=t}}function r(e){this.method=e.method||"GET",this.uri=e.uri,this.xd=!!e.xd,this.xs=!!e.xs,this.async=!1!==e.async,this.data=void 0!=e.data?e.data:null,this.agent=e.agent,this.isBinary=e.isBinary,this.supportsBinary=e.supportsBinary,this.enablesXDR=e.enablesXDR,this.pfx=e.pfx,this.key=e.key,this.passphrase=e.passphrase,this.cert=e.cert,this.ca=e.ca,this.ciphers=e.ciphers,this.rejectUnauthorized=e.rejectUnauthorized,this.create()}function a(){for(var e in r.requests)r.requests.hasOwnProperty(e)&&r.requests[e].abort()}var s=e("xmlhttprequest"),c=e("./polling"),l=e("component-emitter"),u=e("component-inherit"),p=e("debug")("engine.io-client:polling-xhr");t.exports=i,t.exports.Request=r,u(i,c),i.prototype.supportsBinary=!0,i.prototype.request=function(e){return e=e||{},e.uri=this.uri(),e.xd=this.xd,e.xs=this.xs,e.agent=this.agent||!1,e.supportsBinary=this.supportsBinary,e.enablesXDR=this.enablesXDR,e.pfx=this.pfx,e.key=this.key,e.passphrase=this.passphrase,e.cert=this.cert,e.ca=this.ca,e.ciphers=this.ciphers,e.rejectUnauthorized=this.rejectUnauthorized,new r(e)},i.prototype.doWrite=function(e,t){var n="string"!=typeof e&&void 0!==e,o=this.request({method:"POST",data:e,isBinary:n}),i=this;o.on("success",t),o.on("error",function(e){i.onError("xhr post error",e)}),this.sendXhr=o},i.prototype.doPoll=function(){p("xhr poll");var e=this.request(),t=this;e.on("data",function(e){t.onData(e)}),e.on("error",function(e){t.onError("xhr poll error",e)}),this.pollXhr=e},l(r.prototype),r.prototype.create=function(){var e={agent:this.agent,xdomain:this.xd,xscheme:this.xs,enablesXDR:this.enablesXDR};e.pfx=this.pfx,e.key=this.key,e.passphrase=this.passphrase,e.cert=this.cert,e.ca=this.ca,e.ciphers=this.ciphers,e.rejectUnauthorized=this.rejectUnauthorized;var t=this.xhr=new s(e),o=this;try{if(p("xhr open %s: %s",this.method,this.uri),t.open(this.method,this.uri,this.async),this.supportsBinary&&(t.responseType="arraybuffer"),"POST"==this.method)try{this.isBinary?t.setRequestHeader("Content-type","application/octet-stream"):t.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(i){}"withCredentials"in t&&(t.withCredentials=!0),this.hasXDR()?(t.onload=function(){o.onLoad()},t.onerror=function(){o.onError(t.responseText)}):t.onreadystatechange=function(){4==t.readyState&&(200==t.status||1223==t.status?o.onLoad():setTimeout(function(){o.onError(t.status)},0))},p("xhr data %s",this.data),t.send(this.data)}catch(i){return void setTimeout(function(){o.onError(i)},0)}n.document&&(this.index=r.requestsCount++,r.requests[this.index]=this)},r.prototype.onSuccess=function(){this.emit("success"),this.cleanup()},r.prototype.onData=function(e){this.emit("data",e),this.onSuccess()},r.prototype.onError=function(e){this.emit("error",e),this.cleanup(!0)},r.prototype.cleanup=function(e){if("undefined"!=typeof this.xhr&&null!==this.xhr){if(this.hasXDR()?this.xhr.onload=this.xhr.onerror=o:this.xhr.onreadystatechange=o,e)try{this.xhr.abort()}catch(t){}n.document&&delete r.requests[this.index],this.xhr=null}},r.prototype.onLoad=function(){var e;try{var t;try{t=this.xhr.getResponseHeader("Content-Type").split(";")[0]}catch(n){}e="application/octet-stream"===t?this.xhr.response:this.supportsBinary?"ok":this.xhr.responseText}catch(n){this.onError(n)}null!=e&&this.onData(e)},r.prototype.hasXDR=function(){return"undefined"!=typeof n.XDomainRequest&&!this.xs&&this.enablesXDR},r.prototype.abort=function(){this.cleanup()},n.document&&(r.requestsCount=0,r.requests={},n.attachEvent?n.attachEvent("onunload",a):n.addEventListener&&n.addEventListener("beforeunload",a,!1))}).call(this,"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./polling":18,"component-emitter":9,"component-inherit":21,debug:22,xmlhttprequest:20}],18:[function(e,t){function n(e){var t=e&&e.forceBase64;(!c||t)&&(this.supportsBinary=!1),o.call(this,e)}var o=e("../transport"),i=e("parseqs"),r=e("engine.io-parser"),a=e("component-inherit"),s=e("debug")("engine.io-client:polling");t.exports=n;var c=function(){var t=e("xmlhttprequest"),n=new t({xdomain:!1});return null!=n.responseType}();a(n,o),n.prototype.name="polling",n.prototype.doOpen=function(){this.poll()},n.prototype.pause=function(e){function t(){s("paused"),n.readyState="paused",e()}var n=this;if(this.readyState="pausing",this.polling||!this.writable){var o=0;this.polling&&(s("we are currently polling - waiting to pause"),o++,this.once("pollComplete",function(){s("pre-pause polling complete"),--o||t()})),this.writable||(s("we are currently writing - waiting to pause"),o++,this.once("drain",function(){s("pre-pause writing complete"),--o||t()}))}else t()},n.prototype.poll=function(){s("polling"),this.polling=!0,this.doPoll(),this.emit("poll")},n.prototype.onData=function(e){var t=this;s("polling got data %s",e);var n=function(e){return"opening"==t.readyState&&t.onOpen(),"close"==e.type?(t.onClose(),!1):void t.onPacket(e)};r.decodePayload(e,this.socket.binaryType,n),"closed"!=this.readyState&&(this.polling=!1,this.emit("pollComplete"),"open"==this.readyState?this.poll():s('ignoring poll - transport state "%s"',this.readyState))},n.prototype.doClose=function(){function e(){s("writing close packet"),t.write([{type:"close"}])}var t=this;"open"==this.readyState?(s("transport open - closing"),e()):(s("transport not open - deferring close"),this.once("open",e))},n.prototype.write=function(e){var t=this;this.writable=!1;var n=function(){t.writable=!0,t.emit("drain")},t=this;r.encodePayload(e,this.supportsBinary,function(e){t.doWrite(e,n)})},n.prototype.uri=function(){var e=this.query||{},t=this.secure?"https":"http",n="";return!1!==this.timestampRequests&&(e[this.timestampParam]=+new Date+"-"+o.timestamps++),this.supportsBinary||e.sid||(e.b64=1),e=i.encode(e),this.port&&("https"==t&&443!=this.port||"http"==t&&80!=this.port)&&(n=":"+this.port),e.length&&(e="?"+e),t+"://"+this.hostname+n+this.path+e}},{"../transport":14,"component-inherit":21,debug:22,"engine.io-parser":25,parseqs:33,xmlhttprequest:20}],19:[function(e,t){function n(e){var t=e&&e.forceBase64;t&&(this.supportsBinary=!1),o.call(this,e)}var o=e("../transport"),i=e("engine.io-parser"),r=e("parseqs"),a=e("component-inherit"),s=e("debug")("engine.io-client:websocket"),c=e("ws");t.exports=n,a(n,o),n.prototype.name="websocket",n.prototype.supportsBinary=!0,n.prototype.doOpen=function(){if(this.check()){var e=this.uri(),t=void 0,n={agent:this.agent};n.pfx=this.pfx,n.key=this.key,n.passphrase=this.passphrase,n.cert=this.cert,n.ca=this.ca,n.ciphers=this.ciphers,n.rejectUnauthorized=this.rejectUnauthorized,this.ws=new c(e,t,n),void 0===this.ws.binaryType&&(this.supportsBinary=!1),this.ws.binaryType="arraybuffer",this.addEventListeners()}},n.prototype.addEventListeners=function(){var e=this;this.ws.onopen=function(){e.onOpen()},this.ws.onclose=function(){e.onClose()},this.ws.onmessage=function(t){e.onData(t.data)},this.ws.onerror=function(t){e.onError("websocket error",t)}},"undefined"!=typeof navigator&&/iPad|iPhone|iPod/i.test(navigator.userAgent)&&(n.prototype.onData=function(e){var t=this;setTimeout(function(){o.prototype.onData.call(t,e)},0)}),n.prototype.write=function(e){function t(){n.writable=!0,n.emit("drain")}var n=this;this.writable=!1;for(var o=0,r=e.length;r>o;o++)i.encodePacket(e[o],this.supportsBinary,function(e){try{n.ws.send(e)}catch(t){s("websocket closed before onclose event")}});setTimeout(t,0)},n.prototype.onClose=function(){o.prototype.onClose.call(this)},n.prototype.doClose=function(){"undefined"!=typeof this.ws&&this.ws.close()},n.prototype.uri=function(){var e=this.query||{},t=this.secure?"wss":"ws",n="";return this.port&&("wss"==t&&443!=this.port||"ws"==t&&80!=this.port)&&(n=":"+this.port),this.timestampRequests&&(e[this.timestampParam]=+new Date),this.supportsBinary||(e.b64=1),e=r.encode(e),e.length&&(e="?"+e),t+"://"+this.hostname+n+this.path+e},n.prototype.check=function(){return!(!c||"__initialize"in c&&this.name===n.prototype.name)}},{"../transport":14,"component-inherit":21,debug:22,"engine.io-parser":25,parseqs:33,ws:35}],20:[function(e,t){var n=e("has-cors");t.exports=function(e){var t=e.xdomain,o=e.xscheme,i=e.enablesXDR;try{if("undefined"!=typeof XMLHttpRequest&&(!t||n))return new XMLHttpRequest}catch(r){}try{if("undefined"!=typeof XDomainRequest&&!o&&i)return new XDomainRequest}catch(r){}if(!t)try{return new ActiveXObject("Microsoft.XMLHTTP")}catch(r){}}},{"has-cors":38}],21:[function(e,t){t.exports=function(e,t){var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},{}],22:[function(e,t,n){function o(){return"WebkitAppearance"in document.documentElement.style||window.console&&(console.firebug||console.exception&&console.table)||navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31}function i(){var e=arguments,t=this.useColors;if(e[0]=(t?"%c":"")+this.namespace+(t?" %c":" ")+e[0]+(t?"%c ":" ")+"+"+n.humanize(this.diff),!t)return e;var o="color: "+this.color;e=[e[0],o,"color: inherit"].concat(Array.prototype.slice.call(e,1));var i=0,r=0;return e[0].replace(/%[a-z%]/g,function(e){"%%"!==e&&(i++,"%c"===e&&(r=i))}),e.splice(r,0,o),e}function r(){return"object"==typeof console&&"function"==typeof console.log&&Function.prototype.apply.call(console.log,console,arguments)}function a(e){try{null==e?localStorage.removeItem("debug"):localStorage.debug=e}catch(t){}}function s(){var e;try{e=localStorage.debug}catch(t){}return e}n=t.exports=e("./debug"),n.log=r,n.formatArgs=i,n.save=a,n.load=s,n.useColors=o,n.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],n.formatters.j=function(e){return JSON.stringify(e)},n.enable(s())},{"./debug":23}],23:[function(e,t,n){function o(){return n.colors[u++%n.colors.length]}function i(e){function t(){}function i(){var e=i,t=+new Date,r=t-(l||t);e.diff=r,e.prev=l,e.curr=t,l=t,null==e.useColors&&(e.useColors=n.useColors()),null==e.color&&e.useColors&&(e.color=o());var a=Array.prototype.slice.call(arguments);a[0]=n.coerce(a[0]),"string"!=typeof a[0]&&(a=["%o"].concat(a));var s=0;a[0]=a[0].replace(/%([a-z%])/g,function(t,o){if("%%"===t)return t;s++;var i=n.formatters[o];if("function"==typeof i){var r=a[s];t=i.call(e,r),a.splice(s,1),s--}return t}),"function"==typeof n.formatArgs&&(a=n.formatArgs.apply(e,a));var c=i.log||n.log||void 0;c.apply(e,a)}t.enabled=!1,i.enabled=!0;var r=n.enabled(e)?i:t;return r.namespace=e,r}function r(e){n.save(e);for(var t=(e||"").split(/[\s,]+/),o=t.length,i=0;o>i;i++)t[i]&&(e=t[i].replace(/\*/g,".*?"),"-"===e[0]?n.skips.push(new RegExp("^"+e.substr(1)+"$")):n.names.push(new RegExp("^"+e+"$")))}function a(){n.enable("")}function s(e){var t,o;for(t=0,o=n.skips.length;o>t;t++)if(n.skips[t].test(e))return!1;for(t=0,o=n.names.length;o>t;t++)if(n.names[t].test(e))return!0;return!1}function c(e){return e instanceof Error?e.stack||e.message:e}n=t.exports=i,n.coerce=c,n.disable=a,n.enable=r,n.enabled=s,n.humanize=e("ms"),n.names=[],n.skips=[],n.formatters={};var l,u=0},{ms:24}],24:[function(e,t){function n(e){var t=/^((?:\d+)?\.?\d+) *(ms|seconds?|s|minutes?|m|hours?|h|days?|d|years?|y)?$/i.exec(e);if(t){var n=parseFloat(t[1]),o=(t[2]||"ms").toLowerCase();switch(o){case"years":case"year":case"y":return n*u;case"days":case"day":case"d":return n*l;case"hours":case"hour":case"h":return n*c;case"minutes":case"minute":case"m":return n*s;case"seconds":case"second":case"s":return n*a;case"ms":return n}}}function o(e){return e>=l?Math.round(e/l)+"d":e>=c?Math.round(e/c)+"h":e>=s?Math.round(e/s)+"m":e>=a?Math.round(e/a)+"s":e+"ms"}function i(e){return r(e,l,"day")||r(e,c,"hour")||r(e,s,"minute")||r(e,a,"second")||e+" ms"}function r(e,t,n){return t>e?void 0:1.5*t>e?Math.floor(e/t)+" "+n:Math.ceil(e/t)+" "+n+"s"}var a=1e3,s=60*a,c=60*s,l=24*c,u=365.25*l;t.exports=function(e,t){return t=t||{},"string"==typeof e?n(e):t["long"]?i(e):o(e)}},{}],25:[function(e,t,n){(function(t){function o(e,t){var o="b"+n.packets[e.type]+e.data.data;return t(o)}function i(e,t,o){if(!t)return n.encodeBase64Packet(e,o);var i=e.data,r=new Uint8Array(i),a=new Uint8Array(1+i.byteLength);a[0]=y[e.type];for(var s=0;s<r.length;s++)a[s+1]=r[s];return o(a.buffer)}function r(e,t,o){if(!t)return n.encodeBase64Packet(e,o);var i=new FileReader;return i.onload=function(){e.data=i.result,n.encodePacket(e,t,!0,o)},i.readAsArrayBuffer(e.data)}function a(e,t,o){if(!t)return n.encodeBase64Packet(e,o);if(m)return r(e,t,o);var i=new Uint8Array(1);i[0]=y[e.type];var a=new k([i.buffer,e.data]);return o(a)}function s(e,t,n){for(var o=new Array(e.length),i=f(e.length,n),r=function(e,n,i){t(n,function(t,n){o[e]=n,i(t,o)})},a=0;a<e.length;a++)r(a,e[a],i)}var c=e("./keys"),l=e("has-binary"),u=e("arraybuffer.slice"),p=e("base64-arraybuffer"),f=e("after"),h=e("utf8"),d=navigator.userAgent.match(/Android/i),g=/PhantomJS/i.test(navigator.userAgent),m=d||g;n.protocol=3;var y=n.packets={open:0,close:1,ping:2,pong:3,message:4,upgrade:5,noop:6},v=c(y),b={type:"error",data:"parser error"},k=e("blob");n.encodePacket=function(e,n,r,s){"function"==typeof n&&(s=n,n=!1),"function"==typeof r&&(s=r,r=null);var c=void 0===e.data?void 0:e.data.buffer||e.data;if(t.ArrayBuffer&&c instanceof ArrayBuffer)return i(e,n,s);if(k&&c instanceof t.Blob)return a(e,n,s);if(c&&c.base64)return o(e,s);var l=y[e.type];return void 0!==e.data&&(l+=r?h.encode(String(e.data)):String(e.data)),s(""+l)},n.encodeBase64Packet=function(e,o){var i="b"+n.packets[e.type];if(k&&e.data instanceof k){var r=new FileReader;return r.onload=function(){var e=r.result.split(",")[1];o(i+e)},r.readAsDataURL(e.data)}var a;try{a=String.fromCharCode.apply(null,new Uint8Array(e.data))}catch(s){for(var c=new Uint8Array(e.data),l=new Array(c.length),u=0;u<c.length;u++)l[u]=c[u];a=String.fromCharCode.apply(null,l)}return i+=t.btoa(a),o(i)},n.decodePacket=function(e,t,o){if("string"==typeof e||void 0===e){if("b"==e.charAt(0))return n.decodeBase64Packet(e.substr(1),t);if(o)try{e=h.decode(e)}catch(i){return b}var r=e.charAt(0);return Number(r)==r&&v[r]?e.length>1?{type:v[r],data:e.substring(1)}:{type:v[r]}:b}var a=new Uint8Array(e),r=a[0],s=u(e,1);return k&&"blob"===t&&(s=new k([s])),{type:v[r],data:s}},n.decodeBase64Packet=function(e,n){var o=v[e.charAt(0)];if(!t.ArrayBuffer)return{type:o,data:{base64:!0,data:e.substr(1)}};var i=p.decode(e.substr(1));return"blob"===n&&k&&(i=new k([i])),{type:o,data:i}},n.encodePayload=function(e,t,o){function i(e){return e.length+":"+e}function r(e,o){n.encodePacket(e,!!a&&t,!0,function(e){o(null,i(e))})}"function"==typeof t&&(o=t,t=null);var a=l(e);return t&&a?k&&!m?n.encodePayloadAsBlob(e,o):n.encodePayloadAsArrayBuffer(e,o):e.length?void s(e,r,function(e,t){return o(t.join(""))}):o("0:")},n.decodePayload=function(e,t,o){if("string"!=typeof e)return n.decodePayloadAsBinary(e,t,o);"function"==typeof t&&(o=t,t=null);var i;if(""==e)return o(b,0,1);for(var r,a,s="",c=0,l=e.length;l>c;c++){var u=e.charAt(c);if(":"!=u)s+=u;else{if(""==s||s!=(r=Number(s)))return o(b,0,1);if(a=e.substr(c+1,r),s!=a.length)return o(b,0,1);if(a.length){if(i=n.decodePacket(a,t,!0),b.type==i.type&&b.data==i.data)return o(b,0,1);var p=o(i,c+r,l);if(!1===p)return}c+=r,s=""}}return""!=s?o(b,0,1):void 0},n.encodePayloadAsArrayBuffer=function(e,t){function o(e,t){
DesignScreenshot/output/gitee_run/gitee.com_3_credentials_filled.html:6:Z.group_id&&(n+="&group_id="+Z.group_id),Z.agent_id&&(n+="&agent_id="+Z.agent_id),Re.jsonp(n,function(t){t=t||{},e&&e(t.chatting)})}function D(e){Fe.eachPushFn(e),Re.extend(Z,e),h(Z),le||Le.opened||(ce=!1),Le.loadSrc(),ke&&"function"==typeof e.onReady&&e.onReady()}function z(){var t="不能为空",n=function(e){},o=function(e){e=e||{};var o=e.type,i=e.data,r=Z.customer||{};if(!i)return void n("data"+t);switch(o){case"product":return{url:X+"vistor_data_trace",data:{key:Q,code:Z.code,type:o,data:encodeURIComponent(JSON.stringify(i))},valid:function(){var e=[];return Ie.config.behavior_trace?(!i.name&&e.push("商品名称:"+t),!e.length||(n(e.join("、")),!1)):(n("未开通商品浏览轨迹"),!1)}};case"order":return{url:Y+"/business_api/v1/web_customer_orders",data:{nonce:r.nonce,timestamp:r.timestamp,web_token:r.web_token,customer_token:r.customer_token,signature:r.signature,encryption_algorithm:r.encryption_algorithm,web_plugin_id:G,order:encodeURIComponent(JSON.stringify(i))},valid:function(){var e=[];return Ie.config.customer_order?r.signature?(!i.order_no&&e.push("订单编号:"+t),!i.price&&e.push("订单金额:"+t),!e.length||(n(e.join("、")),!1)):(n("请传入客户身份认证请求参数"),!1):(n("未开通订单事件"),!1)},cb:function(e){1e3!==e.code&&n(e.code_message)}};default:n("type参数错误")}},i={init:function(){Z.manualInit&&F()},setProduct:function(e){e=e||Z.product,e&&Re.sendMessage({type:"setProduct",product:e},Le.iframeEl.contentWindow)},showPanel:function(){E()},hidePanel:function(){Le.hide()},isDrag:function(){document.getElementsByClassName("udesk-client-btn")[0].classList.add("drag")},noDrag:function(){document.getElementsByClassName("udesk-client-btn")[0].classList.remove("drag")},clearProduct:function(){Re.sendMessage({type:"clearProduct"},Le.iframeEl.contentWindow)},getVisitorNo:function(){return be},dataTrace:function(e,t){var n=o({type:e,data:t});n&&n.valid(e,t)&&Re.jsonp(n.url+"?"+Re.urlString(n.data),function(e){n.cb&&n.cb(e)})},updateConfig:function(e){try{"object"==typeof Re.get(e,"panel.css")&&(Le.panelEl.style.cssText=De.toCssText(Re.assign(e.panel.css,{display:Le.panelEl.style.display,visibility:Le.panelEl.style.visibility,bottom:Le.panelEl.style.bottom,zIndex:Le.panelEl.style.zIndex}))),"function"==typeof Re.get(e,"panel.onToggle")&&(Fe.off("panel.onToggle",Re.get(Z,"panel.onToggle")),Fe.pushFn("panel.onToggle",Re.get(e,"panel.onToggle")))}catch(t){}},isPanelOpened:function(){try{return Le.opened}catch(e){}}};e[e.UdeskApiObject]=function(e){if(e){var t,n=arguments,o=e,r=!0;if("string"==typeof e&&i.hasOwnProperty(e))return i[n[0]].apply(null,[].slice.call(n,1));"object"!=typeof e&&(o={},o[n[0]]=n[1]),(o.channel||o.language||o.customer)&&(t=!0),(o.agent_id||o.group_id)&&(we?(r=!1,R(function(e){e?(delete o.group_id,delete o.agent_id,t&&D(o)):(l(o),D(o))})):(l(o),t=!0)),r&&t&&D(o)}},Ce=e[e.UdeskApiObject],I(i)}function P(){H=Re.isTestENV(),q=Re.ifIE(),ee=encodeURIComponent(location.href),te=encodeURIComponent(Re.getReferrer()||""),me=encodeURIComponent(t.title)||"",headEl=De.find("head",t)[0]||t.head||t.getElementsByTagName("head")[0]||{},Q=Re.store("userkey"),fe=De.find("body",t)[0]||t.body||{},ye=(t.documentElement||fe).clientWidth||1366,ve=(t.documentElement||fe).clientHeight,re=ye<=768,Q=Re.store("userkey"),Re.store("on_go_chat",""),Re.store("on_force_chat",""),Re.platform({iphone:function(){re=!0}}),ne=O(ee,decodeURIComponent(Re.store("first_access")||te||""));var e={};if(Ce&&Re.each(Ce.d,function(t){var n=t[0];"object"!=typeof t[0]&&(n={},n[t[0]]=t[1]),Fe.eachPushFn(n),Re.extend(e,n)}),e.link){var n=Re.parseUrl(e.link),o=Re.urlParams(e.link);n.protocol&&(Ee=n.protocol),Y=Ee+"//"+n.host,G=o.web_plugin_id}e.manualInit=e.manualInit||e.manueInit||!1,Be=e.auto_invite_interval,Z=e}function L(){var e=document.createElement("link"),t=Y+"/im_client/css/ui/emotion.css";e.type="text/css",e.rel="stylesheet",e.href=t,headEl.appendChild(e);var n=document.createElement("style"),o='url("'+Y+'/im_client/images/im-emoji-big-1.png")',i="#udesk_pop_dialog .udesk_im_client_emoji { background-image: "+o+"}";n.type="text/css",n.rel="stylesheet";try{n.appendChild(document.createTextNode(i))}catch(r){n.styleSheet.cssText=i}headEl.appendChild(n)}function U(){P(),_();var e=function(e){var t=c(e),n=Oe.vistor||{};l(t),oe="code="+(t.code||"")+"&url="+ee+"&referrer="+(t.src_url||te)+"&keyword="+ne,J="https:"===Ee?"6002":"6001",W=(H?Y.replace(Ee+"//",""):"basevistor.udesk.cn")+":"+J,X=(n[Ee.replace(":","")]||Ee+"//"+W)+"/customerApi/",V=(n["https:"===Ee?"wss":"ws"]||Ee+"//"+W)+"/customer"};Z.code&&Z.link&&A(function(t){e(t),z(),L();var n=Z.manualInit;t.im_guest_enable&&!Z.noVisitor?(Q&&!n&&F(),S(function(e){e=e||{},e.key&&(Q=e.key,Re.store("userkey",Q),Ue.init(),be=e.visitor_no,Pe.updateVisitorNo(be)),!n&&F()})):!n&&F(),n&&(ke=!0,Fe.init(),Fe.execFn("onReady"))})}function F(){se||(se=!0,De.ready(function(){he=De.createEl({id:Ae+"container"}),Re.isEmptyObj(fe)&&(fe=De.find("body",t)[0]||t.body||{}),fe.appendChild(he),Pe.init(),Le.init(),Fe.init(),Q&&Ue.init(),B(_e),b(function(){Le.loadSrc(),k(),je.online&&Ue.startAutoStrategy(),Z.manualInit||(ke=!0,Fe.execFn("onReady"))})}))}var H,q,W,J,X,V,Y,G,Z,Q,ee,te,ne,oe,ie,re,ae,se,ce,le,ue,pe,fe,he,de,ge,me,ye,ve,be,ke,we,_e,xe,Se,Ae="udesk_",Ce=e[e.UdeskApiObject],Te=navigator.userAgent.toLowerCase(),Ee="file:"===location.protocol?"http:":location.protocol,Ne=0,Me=999999999,je={},Oe={},Be=0,Ie={config:{window:{}}};if(!e.__udeskApiInit){e.__udeskApiInit=!0;var Re={isTestENV:function(){return"file:"===location.protocol||/(ud|tiyanudesk|(udesk(.+)?)).com$ |localhost/i.test(location.host)},getCurrentStaticUrl:function(){var e=location.hostname,t=/\.(.*)\.udesk.cn/,n=e.match(t),o=n&&n[1];if(!o)if(/udesk.cn/.test(e))o="";else{if(/localhost|local/.test(e))return"static-ud.udesk.cn";if(/tryudesk/.test(e)){var i=e.match(/\.(.*).tryudesk.cn/);return"static-ud."+i+".tryudesk.com"}}return"static-ud."+(o?o+".":"")+"udesk.cn"},jsonp:function(n,o){if(n){var i=Ae+"jsonp"+Ne++;n+=(n.indexOf("?")>-1?"&":"?")+"callback="+i;var r=t.createElement("script");headEl.appendChild(r),e[i]=function(e){o&&o(e)},r.src=n,r.onerror=function(){o&&o()}}},replaceTpl:function(e,t){if(!e)return"";if(!t)return e;var n=e;"function"==typeof e&&(n=e(t));for(var o in t)n=n.replace(new RegExp("{"+o+"}","gm"),t[o]||"");return n},parseJSON:function(t){try{return e.JSON.parse(t)}catch(n){}return t},extend:function(e){return e?(Re.each(arguments,function(t,n){if(n>0&&t)for(var o in t)e[o]=t[o]}),e):e},each:function(e,t){if(e){var n=e.length;if(n!==o)for(var i=0;i<n&&!1!==t(e[i],i);i++);else for(var r in e)if(!1===t(e[r],r))break}},isEmptyObj:function(e){if(!e)return!1;for(var t in e)return!1;return!0},getReferrer:function(){var t;try{t=e.top.document.referrer}catch(n){try{t=e.parent.document.referrer}catch(n){}}if(t||(t=document.referrer),!t&&e.opener)try{t=e.opener.location.href}catch(n){}return t||""},messageListener:function(t){e.addEventListener?e.addEventListener("message",function(e){var n=Re.parseJSON(e.data)||{};t&&t(n)}):e.attachEvent("onmessage",function(e){var n=Re.parseJSON(e.data)||{};t&&t(n)})},sendMessage:function(e,t){try{e=JSON.stringify(e)||"",t.postMessage(e,Y)}catch(n){}},store:function We(t,n){t="UDESK_"+t;var We=e.localStorage;if(We)try{if(n===o)return We[t]||"";We[t]=n||""}catch(i){}},sessionStore:function(t,n){t="UDESK_"+t;var i=e.sessionStorage;if(i)try{if(n===o)return i[t]||"";i[t]=n||""}catch(r){}},storageListener:function(t){try{e.addEventListener?e.addEventListener("storage",function(e){t&&t(e)}):document.attachEvent&&!K.Browser.opera?document.attachEvent("onstorage",function(e){t&&t(e)}):e.attachEvent("onstorage",function(e){t&&t(e)})}catch(n){}},urlParams:function(e){var t,n={};if(!e)return n;if(t=e.match(new RegExp("[?&][^?&]+=[^?&]+","g")))for(var o=0,i=t.length;o<i;o++){var r,a,s;try{r=t[o].substring(1).split("="),a=decodeURIComponent(r[0]),s=decodeURIComponent(r[1]),n[a]=s}catch(c){r&&r[0]&&(n[r[0]]=r[1]||"")}}return n},urlString:function(e,t){var n="";if(e)for(var o in e)n+="&"+o+"="+(t?encodeURIComponent(e[o]||""):e[o]||"");return n?n.substring(1):""},parseUrl:function(e){e=e||"";var t=e.split("//"),n=t[0]||"",o=(t[1]||"").split("/")[0];return{protocol:n,host:o}},ifIE:function(e,t){var n=document.createElement("b");return n.innerHTML="<!--[if "+(t||"")+" IE "+(e||"")+"]><i></i><![endif]-->",1===n.getElementsByTagName("i").length},platform:function(e){if(e){for(var t,n,o,i=new RegExp("(android|iphone|ipod|ios|ipad|webkit|windows phone|micromessenger)","g");null!=(n=i.exec(Te));)t=!0,o=n[1],e[o]&&e[o](),e.ios&&/iphone|ipod|ipad/.test(o)&&e.ios(),e.wp&&/windows phone/.test(o)&&e.wp(),e.weixin&&/micromessenger/.test(o)&&e.weixin();!t&&e.others&&e.others()}},isRealMob:function(){var e=!1;return this.platform({ios:function(){e=!0},android:function(){e=!0},wp:function(){e=!0}}),e},encodeBase64:function(e){var t,n,o,i,r,a,s,c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",l="",u=0;for(e=this._utf8_encode(e);u<e.length;)t=e.charCodeAt(u++),n=e.charCodeAt(u++),o=e.charCodeAt(u++),i=t>>2,r=(3&t)<<4|n>>4,a=(15&n)<<2|o>>6,s=63&o,isNaN(n)?a=s=64:isNaN(o)&&(s=64),l=l+c.charAt(i)+c.charAt(r)+c.charAt(a)+c.charAt(s);return l},_utf8_encode:function(e){e=e.replace(/\r\n/g,"\n");for(var t="",n=0;n<e.length;n++){var o=e.charCodeAt(n);o<128?t+=String.fromCharCode(o):o>127&&o<2048?(t+=String.fromCharCode(o>>6|192),t+=String.fromCharCode(63&o|128)):(t+=String.fromCharCode(o>>12|224),t+=String.fromCharCode(o>>6&63|128),t+=String.fromCharCode(63&o|128))}return t},aryFindKeys:function(e,t){if(!e&&!t)return!1;for(var o=0,i=t.length;o<i;o++){var r=t[o],a=document.querySelectorAll(r);for(m=0,n=a.length;m<n;m++)if(a[m]===e)return!0}return!1},assign:function(e,t){"use strict";if(null===e||e===o)throw new TypeError("Cannot convert undefined or null to object");for(var n=Object(e),i=1;i<arguments.length;i++){var r=arguments[i];if(null!==r&&r!==o)for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(n[a]=r[a])}return n},set:function(e,t,n){var o=t.substring(0,t.indexOf("."));o?(o in e||(e[o]={}),Re.set(e[o],t.substring(t.indexOf(".")+1),n)):e[t]=n},get:function(e,t){var n=t.substring(0,t.indexOf("."));return n&&n in e?Re.get(e[n],t.substring(t.indexOf(".")+1)):n?e[n]:e[t]}},De={_isReady:!1,_readyList:[],ready:function(e){if(this._isReady)return e&&e();if(!t.body)return e&&this._readyList.push(e),setTimeout(function(){De.ready()});var n=this._readyList;this._isReady=!0;for(var o=0,i=n.length;o<i;o++)n[o]();e&&e(),n.length=0},find:function(e,t){return(t||he).querySelectorAll(e)||[]},createEl:function(e,n){"object"==typeof e&&(n=e,e=""),n=n||{};var o=t.createElement(e||"div"),i=n.css;delete n.css;for(var r in n)o[r]=n[r];return i&&De.css(o,i),o},removeEl:function(e,t){var n=this.find(e,t);Re.each(n,function(e){e.parentNode.removeChild(e)})},hasClass:function(e,t){return RegExp("\\b"+(t||"")+"\\b").test(e||"")},css:function(t,n,i){if(t&&n)if("object"==typeof n)for(var r in n)if(r.indexOf("-")>-1){var a,s=r.split("-")[0],c=r.split("-")[1];a=s+c.substring(0,1).toUpperCase()+c.substring(1),t.style[a]=n[r]}else t.style[r]=n[r];else{if(i===o){if(i=(e.getComputedStyle?e.getComputedStyle(t,null):t.currentStyle)[n]||"","auto"===i)return 0;if("px"===i.slice(i.length-2)){var l=parseFloat(i);return isNaN(l)?i:l}return i}t.style[n]=i}},css3:function(e){var t="";return Re.each((e||"").split(";"),function(e){e&&(t+=e+";",Re.each(["-webkit-","-moz-","-ms-","-o-"],function(n){t+=n+e+";"}))}),t},cssJoin:function(e,t){var n={};if(e){t=(t||"").split(",");for(var o=0,i=t.length;o<i;o++)n[t[o]]=De.css(e,t[o])}return n},outerWidth:function(e){var t=0,n=De.cssJoin(e,"width,paddingLeft,paddingRight,borderLeft,borderRight");for(var o in n)t+=parseFloat(n[o])||0;return t},outerHeight:function(e){var t=0,n=De.cssJoin(e,"height,paddingTop,paddingBottom,borderTop,borderBottom");for(var o in n)t+=parseFloat(n[o])||0;return t},getEvent:function(t){return t||e.event},on:function(e,t,n){e&&(e.addEventListener?e.addEventListener(t,n,!1):e.attachEvent("on"+t,n))},un:function(e,t,n){e&&(e.removeEventListener?e.removeEventListener(t,n,!1):e.detachEvent("on"+t,n))},stopPropagation:function(e){e=this.getEvent(e),e.stopPropagation?e.stopPropagation():e.cancelBubble=!0},getOffset:function(e){for(var t=0,n=0;e&&e!=fe;)t+=e.offsetLeft,n+=e.offsetTop,e=e.offsetParent;return{top:n,left:t}},formatSize:function(e){return e&&parseFloat(e)==e?e+"px":e},hide:function(e){e&&this.css(e,"display","none")},show:function(e,t){t=t||"block",e&&this.css(e,"display",t)},text:function(e,t){if(e)return t===o?"string"==typeof e.textContent?e.textContent:e.innerText:void("string"==typeof e.textContent?e.textContent=t:e.innerText=t)},html:function(e,t){e&&t&&(e.innerHTML=t)},toCssText:function(e){var t=document.createElement("div");return De.css(t,e),t.style.cssText}},ze=function(e){if(e=e||{},e.html){e.type=e.type||"pop";var t,n,o,i,r,a,s=Ae+e.type+"_dialog",c=Re.extend({},Z.pop),l="pop"===e.type,u=d(),p="position:fixed;z-index:"+ ++Me+";font-size:14px;word-break:break-all;word-wrap:break-word;line-height:20px;"+De.css3("box-sizing:border-box;box-shadow:1px 1px 8px #eee"),f={pop:['<div class="{btnChatClz}" style="{commonStyle}border:1px solid #eee;padding:16px 30px 16px 16px;color:#888;cursor:pointer;background-color:#fff;text-align:left;border-radius:4px;box-shadow: 0px 1px 4px rgba(0, 0, 0, 0.25);'+De.css3("transition: margin linear .3s")+'">','<div style="display: flex">','    <img src="{avatar}" style="flex: 0 0 32px;height: 32px;margin-right: 10px;'+De.css3("border-radius:16px")+'">',"<div>",'    <b style="font-size:16px;color:#666;margin-bottom: 6px">{title}</b>','    <div style="overflow: hidden;-webkit-line-clamp: 3;text-overflow:ellipsis;display: -webkit-box;-webkit-box-orient: vertical;word-break:normal">{html}</div>',"</div>",'    <a class="{btnCloseClz}" style="position:absolute;right:12px;top:12px;font-size:24px;cursor:pointer;color:rgba(0, 0, 0, 0.45);text-decoration:none;">&times;</a>',"</div>","</div>"].join(""),frame:['<div style="{commonStyle}top:50%;left:50%;background-color:{frame_color};width:450px;text-align:left;border-radius:4px;box-shadow: 0px 1px 4px rgba(0, 0, 0, 0.25);">','    <a class="{btnCloseClz}" style="position:absolute;right:9px;top:8px;font-size:22px;cursor:pointer;color:#fff;text-decoration:none;">&times;</a>','    <div style="padding:9px 14px 9px 9px;color:#fff;font-size: 14px;line-height: 22px;display:flex;align-items: center"><img style="width: 20px" src="'+(Re.isTestENV()?Ee+("//static-ud."+location.href+".tryudesk.com/img/client-invite.png"):Ee+"//static-ud.udesk.cn/img/client-invite.png")+'" />{title}</div>','    <div style="font-size:13px;padding:24px '+(c.is_custom_bg&&c.bg_url?"106px":0)+" 24px 16px;background:#fff"+(c.is_custom_bg?" url({bg_url})":"")+' no-repeat right bottom;background-size:auto 136px;">','        <div style="color:{color};min-height:'+(c.is_custom_bg&&c.bg_url?"60px":0)+';line-height:22px;margin-bottom:20px;">{html}</div>','        <a class="{btnChatClz}" style="display:inline-block;background-color:{btn_color};color:#fff;padding:5px 16px;cursor:pointer;text-decoration:none;box-shadow: 0px 2px 0px rgba(0, 0, 0, 0.03);border-radius:2px;">'+He.g("tips.beganSession")+"</a>","    </div>","</div>"].join(""),mob_frame:['<div style="{commonStyle}top:50%;left:50%;width:280px;text-align:center;background-color:#fff;border:1px solid #ccc;">','    <div style="color:#333;padding:10px;">','        <img src="{avatar}" style="width:24px;height:24px;'+De.css3("border-radius:12px")+'">',"        <b>{title}</b>","    </div>",'    <div style="color:#333;padding:25px;border-top:1px solid #ccc;border-bottom:1px solid #ccc;">',"        {html}","    </div>",'    <div style="height:50px;line-height:50px;">','        <a class="{btnCloseClz}" style="float:left;width:49%;color:#307AE8;text-decoration:none;text-align:center;border-right:1px solid #ccc;">'+He.g("tips.cancel")+"</a>",'        <a class="{btnChatClz}" style="float:right;width:49%;color:#307AE8;text-decoration:none;text-align:center;">'+He.g("tips.beganSession")+"</a>","    </div>","</div>"].join("")},h=Re.extend({commonStyle:p,btnCloseClz:Ae+"btn_close",btnChatClz:Ae+"btn_chat"},c,e);h.avatar=e.avatar||je.avatar||"",t=Re.replaceTpl(f[e.type],h);var g=Z.pos_flag||"",m=g[0],y=Re.extend({width:q?De.outerWidth(de):De.css(de,"width"),height:q?De.outerHeight(de):De.css(de,"height")},De.getOffset(de)),v=function(){var e=Re.extend({top:y.top,left:y.left,width:q?De.outerWidth(o):De.css(o,"width"),height:q?De.outerHeight(o):De.css(o,"height")}),t=Z.pop.offset||{},n=parseFloat(t.top)||0,i=parseFloat(t.left)||0,r=1,a="unset";Z.targetSelector&&De.css(o,{top:e.top+"px",left:re?"0px":e.left+"px"}),Re.ifIE(8)&&(e.width=Math.max(e.width,320),e.height=Math.max(e.height,70)),u.top&&(n-="v"===m?20:y.height,a="translateY(-100%)"),u.bottom&&(n+="v"===m?y.height:20),u.left&&(i-=20,a="translateX(-100%) translateY(-50%)"),u.right&&(a="translateY(-50%)",i+=y.width+10,r=y.left+y.width+10),u.top||u.bottom?(i-=(e.width-y.width)/2,y.left<e.width?i=(parseFloat(t.left)||0)-10:ye-y.left<e.width&&(i=ye-y.left-e.width+(parseFloat(t.left)||0),i-=20)):n+=y.height/2-20,setTimeout(function(){De.css(o,{marginTop:n+"px",marginLeft:(re?r||i:i)+"px",marginRight:"10px",transform:a})},50)},b=function(){var e,t,n,i,r,a=Z.pop.arrow||{},s={},c={};i=De.formatSize(a.left)||"50%",re&&(i=y.left+(y.width+36)/2-20+"px"),r=De.formatSize(a.top)||"50%",u.top||u.bottom?(e=u.top?"bottom":"top",t="border"+(u.top?"Bottom":"Top")+"Width",n="border"+(u.top?"Top":"Bottom")+"Color",s={left:i,marginLeft:"-11px"},c={marginLeft:"-9px"}):(e=u.left?"right":"left",t="border"+(u.left?"Right":"Left")+"Width",n="border"+(u.left?"Left":"Right")+"Color",s={top:r,marginTop:"-11px"},c={marginTop:"-9px"}),s[e]="-12px",s[t]=0,s[n]="rgba(0,0,0,0.08)",c[e]="3px",c[t]=0,c[n]="#fff";var l=De.createEl("b",{css:{position:"absolute",border:"12px solid transparent"}}),p=De.createEl("b",{css:{position:"absolute",border:"9px solid transparent"}});De.css(l,s),De.css(p,c),l.appendChild(p),o.appendChild(l)},k=function(){var e=De.cssJoin(o,"width,height");De.css(o,{marginTop:-(e.height/2)+"px",marginLeft:-(e.width/2)+"px"})};De.removeEl("#"+s),n=De.createEl({id:s,innerHTML:t}),!Z.targetSelector&&(n.style.position="absolute"),o=n.firstChild,i=De.find("."+h.btnCloseClz,o)[0],r=l?o:De.find("."+h.btnChatClz,o)[0],l?(re&&(u.left?a=y.left-10+"px":u.right&&(a=ye-y.width-y.left-30+"px")),De.css(o,Re.extend(re?{width:a?a:"100%"}:{"min-width":"250px","max-width":"300px"},c.css,/[tb]/.test(g)&&re?{left:0}:{}))):De.css(o,c.css);for(var w in y)"auto"===y[w]&&(y[w]=0);return Z.targetSelector?he.appendChild(n):he.getElementsByClassName("udesk-client-btn")[0].appendChild(n),r.onclick=e.onclick,i.onclick=function(t){De.stopPropagation(t),De.hide(n),e.onclose&&e.onclose()},l?(v(),b()):k(),{show:function(){De.show(n)},hide:function(){De.hide(n)}}}},Pe={_unread:0,baseStyles:{wrapperStyle:["display:flex;align-items:center;justify-content: center;overflow:hidden;"],btn:["display:block;position:fixed;"+De.css3("box-sizing:border-box;"),"font-size:13px;color:#fff;text-align:center;cursor:pointer;text-decoration:none;","z-index:"+ ++Me+";","width:fit-content;","border-radius:4px;"],icon:["display:block;float:left;width:20px;height:20px;"],iconSrc:[Ee+"//"+Re.getCurrentStaticUrl()+"/img/client-btn.png"],line:["display:block;float:left;width:1px;height:100%;background-color:rgba(0, 0, 0, .08);","vertical-align:middle;","background-color:#000\\9;filter:alpha(opacity=10)\\9;"],txt:["display:block;float:left;","overflow-y:hidden; font-size: 14px; color: #fff;"],mob_txt:["display:block;float:none;height:40px;margin:0 10px;line-height:40px;","overflow-y:hidden; font-size: 13px; color: #fff;"],circle:["display:none;position:absolute;top:-13px;right:-13px;height:22px;","text-align:center;line-height:20px;font-size:14px;color:#fff;border-radius:10px;","background-color: #FB5127;padding:0 6px;font-weight:bold;border:1px solid #fff;"],img_circle:["display:none;position:absolute;top:-13px;right:-13px;width:26px;height:26px;","text-align:center;line-height:26px;font-size:14px;color:#fff;border-radius:15px;","background-color: #ff3b30;"],visitor_no:["position: fixed;z-index: "+Me+";color: #fff;text-align: center;font-family: 'Arial Normal', 'Arial';font-size: 13px;"],visitor_no_num:[]},abjuctStyle:function(){var e,t=this.baseStyles,n=(Z.css||{},Z.pos_flag||""),o=n[0],i=n[1],r=n[2],a=Z.visitor_no.enable;switch("i"!==o&&(t.btn.push("box-shadow:0 <0></0> 14px 0 rgba(0, 0, 0, .16);padding:10px;"),Z.color&&t.btn.push("background-color:"+Z.color+";")),o){case"h":t.btn.push("height:40px;"),re&&t.btn.push("width:100%;"),re&&t.btn.push("padding:0px;"),re&&t.icon.push("margin:10px;"),re&&(null==(e=Z.css)?void 0:e.width)&&(Z.css.width=Z.css.width.replace("%","vw"));break;case"v":t.btn.push("width:40px;height:auto;padding:10px 0px;"),t.icon.push("margin:0 7px 10px;"),t.line.push("width:100%;height:1px;"),t.circle.push("left:-13px;right:unset"),t.txt.push("width:40px;height:auto;word-break:break-all;word-wrap:break-word;line-height:20px;letter-spacing:24px;overflow-y:auto;overflow-x:hidden;margin-top:10px;padding-left: 2px;margin-left:10px"),t.mob_txt.push("width:40px;height:auto;float:left;word-break:break-all;word-wrap:break-word;line-height:20px;letter-spacing:24px;overflow-y:auto;overflow-x:hidden;margin-top:10px;padding-left: 2px;"),t.wrapperStyle.push("flex-direction:column;");break;case"c":t.btn.push("width:40px;height:40px;border-radius:20px;"),t.line.push("display:none;"),t.txt.push("display:none;"),t.iconSrc.length=0,t.iconSrc.push(Ee+"//"+Re.getCurrentStaticUrl()+"/img/client-btn.png");break;case"i":t.img_circle.push("left:-13px;top:-13px;right:auto;bottom:auto;")}switch(i){case"l":t.btn.push("left:0;");break;case"r":t.btn.push("right:0;")}switch(r){case"t":t.btn.push("top:0;");break;case"b":t.btn.push("bottom:"+(re&&a?"30px":"0")+";")}var s=Z.visitor_no.color,c=Z.visitor_no.pos_flag||"",l=c[0],u=c[1];if(s||(s=re?"#307AE8":"#649ae8"),t.visitor_no.push("background-color:"+s+";"),re)t.visitor_no.push("width:100%;bottom:0;font-weight:bold;padding:5px 0;");else{switch(t.visitor_no.push("width: 70px;height: 70px;line-height: 22px;border-radius: 2px;"),t.visitor_no_num.push("font-size: 20px;margin-top: 14px;display: block;"),l){case"l":t.visitor_no.push("left:0;");break;case"r":t.visitor_no.push("right:0;")}switch(u){case"t":t.visitor_no.push("top:0;");break;case"b":t.visitor_no.push("bottom:0;")}}},tryCenter:function(e){var t=Z.pos_flag||"",n=t[0],o=t[1],i=t[2],r=Z.visitor_no.pos_flag||"",a=r[0],s=r[1],c=function(t){var n,r=De.cssJoin(t,"width,height,margin-right");De.cssJoin(ge,"width,height");"m"===o&&De.css(e,"left",(ye-parseFloat(r.width))/2+"px"),"m"===i&&(n=(ve-parseFloat(r.height))/2,De.css(e,"top",n+"px")),"m"===a&&De.css(ge,"left",(ye-parseFloat(r.width))/2+"px"),"m"===s&&(n=(ve-parseFloat(r.height))/2,!Re.isRealMob()&&De.css(ge,"top",n+"px"))};if(c(e),"i"===n){var l=De.find("img",e)[0];l.onload=function(){c(l)}}},genVisitorNoHtml:function(){var e=this.baseStyles,t="",n=He.g("tips.visitorNo");return be=be||"",Z.im_guest_enable&&Z.visitor_no.enable&&(t=Re.replaceTpl('<div id="{flag}visitor_no" style="{style}">{text}</div>',{flag:Ae,style:e.visitor_no.join(""),text:re?n+"&nbsp<span>"+be:"</span><b style='"+e.visitor_no_num.join("")+"'><span>"+be+"</span></b>"+n})),t},genHtml:function(){var e,t=this.baseStyles,n=Z.css||{},o=Z.pos_flag||"",i=o[0],r=Z.unread_button||{},a="";if(this.abjuctStyle(),"i"!==i)a=Re.replaceTpl('<div style="{wrapperStyle}"><span style="{iconStyle}"><img src="{iconSrc}" style="width:100%;height:100%;"/></span><span style="{lineStyle}"></span><span id="{flag}btn_text" style="{txtStyle}">{text}</span><span id="{flag}btn_circle" style="{circleStyle}"></span></div>',{flag:Ae,text:"",iconStyle:t.icon.join(""),iconSrc:t.iconSrc.join(""),lineStyle:t.line.join(""),txtStyle:t[re?"mob_txt":"txt"].join(""),circleStyle:t.circle.join(""),wrapperStyle:"h"===i?t.wrapperStyle:""});else if(e='<img class="buttonImg" src="'+(Z.offlineImgUrl||Z.onlineImgUrl)+'" style="max-width:'+(n.width?"unset;":"200px;"),n.width&&(e+="width: "+n.width+";"),n.height&&(e+="height: "+n.height+";"),e+='">',r.enable){var n=r.css||{};for(var s in n)n[s]?t.img_circle.push(s+":"+n[s]+"px;"):t.img_circle.push(s+":auto;");a=["<div>",e,'   <span id="'+Ae+'btn_circle" style="'+t.img_circle.join("")+'"></span>',"</div>"].join("")}else a=e;return a='<a class="udesk-client-btn" style="'+t.btn.join("")+'">'+a+"</a>",a+=this.genVisitorNoHtml()},updateVisitorNo:function(e){if(ge){var t=De.find("span",ge)[0];t.innerText=e}},clickHandler:function(t){try{var n=document.getElementsByClassName("udesk-client-btn")[0];if(n&&n.className.indexOf("drag")>-1)return}catch(o){}if("autoInvite"===t?E("autoInvite"):E(),e&&e.uAnalytics){var i=e.uAnalytics.user().id(),r=e.uAnalytics.user().traits(),a={system:"im",consult_url:e.location.href};Re.assign(a,r.userAttr),e.uAnalytics.identify(i,a),e.uAnalytics.track("onlineconsultclick")}},clearUnread:function(e){if(this._unread){try{if(Le.iframeEl&&Le.iframeEl.contentWindow)Re.sendMessage({type:"clearUnread",content:{clearHistory:e}},Le.iframeEl.contentWindow);else{var t=Z.customer;$.post(Y+"/spa1/sdk_offline_messages/customer_clear_message",{platform:"web",session_key:Z.session_key,web_token:t.web_token,nonce:t.nonce,signature:t.signature,timestamp:t.timestamp,encryption_algorithm:t.encryption_algorithm})}$.each(qe,function(e,t){clearTimeout(t)}.bind(this))}catch(n){}this._unread=0,De.hide(this.circleEl),Z.noBubble||this.popObj&&this.popObj.hide()}},unreadHandler:function(e){if(!Le.opened||!Le.uiOpened){var t=this;if(e.count?this._unread=e.count:this._unread+=1,De.text(this.circleEl,this._unread),De.show(this.circleEl),Fe.execFn("onUnread",{count:this._unread}),!Z.noBubble&&e.msg){var n=function(){try{var e=document.getElementsByClassName("udesk-client-btn")[0];if(e&&e.className.indexOf("drag")>-1)return}catch(n){}t.clickHandler(),o&&o.hide(),t.popObj=!1},o=ze({type:"pop",title:je.nick||He.g("tips.agent"),avatar:je.avatar,html:e.msg||He.g("tips.newMsg"),onclick:n,onclose:function(){t.popObj=!1,t.clearUnread(!0)}});this.popObj=o,de.onclick=n}}},bindSelector:function(e,n){De.on(t,"click",function(t){t=t||window.event;for(var o=t.target,i=e.split(","),r=!1;o&&o!==this;){if(Re.aryFindKeys(o,i)){r=!0;break}o=o.parentNode}r&&n&&n()})},init:function(){var e=this,n=Z.selector;n&&e.bindSelector(n,function(){E()});var o=De.find(Z.targetSelector,t)[0];if(Z.targetSelector&&!o&&e.bindSelector(Z.targetSelector,function(){e.clickHandler()}),!o){o=De.createEl({id:Ae+"btn",innerHTML:this.genHtml()}),he.appendChild(o),o=De.find("a",o)[0],ge=De.find("#"+Ae+"visitor_no")[0],Pe.autoGen=!0,this.tryCenter(o),this.textEl=De.find("#"+Ae+"btn_text",o)[0],this.circleEl=De.find("#"+Ae+"btn_circle",o)[0],this.imgEl=De.find(".buttonImg",o)[0];var i={};try{if(Z.css)if("c"===Z.pos_flag[0]||"v"===Z.pos_flag[0])for(var r in Z.css)"width"!==r&&(i[r]=Z.css[r]);else i=Z.css}catch(a){i=Z.css}De.css(o,i),De.css(ge,Z.visitor_no.css)}o&&(this.el=o,de=o,de.onclick=this.clickHandler)}},Le={opened:!1,uiOpened:!1,_baseStyles:{panel:["position:fixed;bottom:-574px;right:60px;z-index:-1;width:364px;height:572px;","overflow:hidden;display:none;background-color:transparent;","box-shadow:0px 4px 8px rgba(0, 0, 0, 0.25);","border-radius: 4px;","-webkit-overflow-scrolling:touch;","border:1px solid #ddd\\9;",De.css3("transition:bottom 0.3s;")],frame:["width:1px;min-width:100%;*width:100%;height:0;","border:none;padding:0;margin:0;float:none;background:none;",De.css3("transition:height 0.1s;")]},_styleElement:null,_getId:function(){return Ae+"panel"},_createPanel:function(e){var n=this,o=this._baseStyles||{},i=De.createEl({innerHTML:'<div id="'+this._getId()+'"><iframe id="'+Ae+'iframe" frameborder="0" scrolling="no" allowtransparency="true" style="'+o.frame.join("")+'"></iframe></div>'});he.appendChild(i.firstChild),this.panelEl=t.getElementById(Ae+"panel"),this.iframeEl=t.getElementById(Ae+"iframe"),De.on(this.iframeEl,"load",function(){n.iframeLoaded=!0,e&&e()}),q&&!Re.ifIE(8,"gt")||(this.iframeEl.setAttribute("allowfullscreen",""),this.iframeEl.setAttribute("mozallowfullscreen",""),this.iframeEl.setAttribute("webkitallowfullscreen","")),De.css(this.panelEl,Z.panel.css)},_doToggle:function(e){var t=this.panelEl;if(De.css(t,{display:e?"block":"none",visibility:e?"visible":"hidden",bottom:e?"-482px":0,zIndex:e?++Me:-1}),setTimeout(function(){t.style.bottom=e?0:"-482px"},5),e)try{this.sendProduct(),Re.sendMessage({type:"openPanel",preloadData:Oe},this.iframeEl.contentWindow)}catch(n){}},_uiCtrl:function(e){var t=this,n=this.iframeEl,o=Pe.el,i="hide"!==e;this.opened=i,this.uiOpened=i,i?t.iframeLoaded?t._doToggle(i):De.on(t.iframeEl,"load",function(){t.iframeLoaded=!0,t._doToggle(i)}):t._doToggle(i),De.show(i?n:o),Pe.autoGen&&De.hide(i?o:n),setTimeout(function(){n.style.height=i?"100%":"0"},100),Fe.execFn("panel.onToggle",{visible:i})},sendProduct:function(){for(var e=0;e<5;e++)setTimeout(Ce.setProduct,1e3*e)},show:function(e){var t;void 0===e&&(e=0);var n=this;if(this.iframeEl===o&&e<3)return void setTimeout(function(e){return function(){n.show(e)}}(e+1),100);var i=null==(t=this.iframeEl)?void 0:t.contentWindow;this._uiCtrl("show"),Pe.clearUnread(),Re.sessionStore("panel_visible_"+Z.session_key,!0);try{this.sendProduct(),Re.sendMessage({type:"forceLoadPage"},i),Re.sendMessage({type:"openPanel"},i)}catch(r){}this.start_hide_time&&new Date-n.start_hide_time>=6e5&&(setTimeout(function(){n.loadSrc()},50),n.start_hide_time=null),xe&&xe()},_doToggleOther:function(e){var t=this.panelEl;if(De.css(t,{display:"none"}),e)try{this.sendProduct(),Re.sendMessage({type:"openPanel",preloadData:Oe},this.iframeEl.contentWindow)}catch(n){}},_uiCtrlOther:function(e){var t=this,n=this.iframeEl,o=Pe.el,i="hide"!==e;this.opened=i,this.uiOpened=!1,i?t.iframeLoaded?t._doToggleOther(this.uiOpened):De.on(t.iframeEl,"load",function(){t.iframeLoaded=!0,t._doToggle(this.uiOpened)}):t._doToggle(this.uiOpened),De.show(o),Pe.autoGen&&De.hide(n),setTimeout(function(){n.style.height="0"},100)},_show:function(){var e=this,t=this.iframeEl.contentWindow;this._uiCtrlOther("show");try{this.sendProduct(),Re.sendMessage({type:"forceLoadPage"},t),Re.sendMessage({type:"openPanel"},t)}catch(n){}this.start_hide_time&&new Date-e.start_hide_time>=6e5&&(setTimeout(function(){e.loadSrc()},50),e.start_hide_time=null),xe&&xe()},hide:function(){"inner"===Z.mode&&(Re.sessionStore("panel_visible_"+Z.session_key,""),this._uiCtrl("hide"),this.start_hide_time=new Date,xe=s())},loadSrc:function(e){var t=this;this.iframeEl&&p(function(n){t.iframeEl.contentWindow.location.replace(f(e,!1,n))})},_createStyle:function(){if(!this._styleElement){var e,t=this._baseStyles||{},n=Ie.config.window.proportion?100-Ie.config.window.proportion:30;e=Ie.config.window.proportion?"left:0;right:0;bottom:0;top:"+n+"%;height:auto;width:auto;":"left:0;right:0;bottom:0;top:"+n+"px;height:auto;width:auto;",this._styleElement=i("#"+this._getId()+"{"+t.panel.join("")+"}\n@media (max-width: 768px) {#"+this._getId()+"{"+e+"}}")}},init:function(){"inner"===Z.mode&&(this._createStyle(),this._createPanel(function(){var e=Re.sessionStore("panel_visible_"+Z.session_key),t=Re.sessionStore("panel_chatting_"+Z.session_key);e&&!re?E():e||re||t&&R(function(e){e&&N("hideIframe")})}))}},Ue={rejected_num:0,agetn_invite:!1,init:function(){var e=this;this._loaded||(this._loaded=!0,ie=__udeskIo(V+"?key="+Q,{reconnection:!0,reconnectionDelay:2e3,reconnectionAttempts:10}),ie.on("connect",function(){ie.emit("enter",{key:Q,code:Z.code})}),ie.on("reconnect",function(){ie.emit("enter",{key:Q,code:Z.code})}),ie.on("invite",function(t){t&&(je.id=t.agent_id,je.group_id=t.group_id),e.stopAutoStrategy(),e.agent_invite=!0,e.show()}),ie.on("robot_invite",function(e){e&&(je.id=e.agent_id,je.group_id=e.group_id);var t=C();t.removeEventListener("acceptedTransferAgent"),t.removeEventListener("rejectedTransferAgent"),
DesignScreenshot/output/gitee_run/gitee.com_3_credentials_filled.html:10:    var savedTheme = localStorage.getItem('theme');
DesignScreenshot/output/gitee_run/gitee.com_3_credentials_filled.html:345:function(e){"function"==typeof define&&define.amd?define(["jquery"],e):e(jQuery)}(function(e){function t(){var t=n(this);return isNaN(t.datetime)?e(this).text(a.settings.strings.never):e(this).text(i(t.datetime)),this}function n(t){if(!(t=e(t)).data("timeago")){t.data("timeago",{datetime:a.datetime(t)});var n=e.trim(t.text());!(n.length>0)||a.isTime(t)&&t.attr("title")||t.attr("title",n)}return t.data("timeago")}function i(e){return a.inWords(o(e))}function o(e){return(new Date).getTime()-e.getTime()}e.timeago=function(t){return t instanceof Date?i(t):i("string"==typeof t?e.timeago.parse(t):"number"==typeof t?new Date(t):e.timeago.datetime(t))};var a=e.timeago;e.extend(e.timeago,{settings:{refreshMillis:6e4,allowFuture:!1,strings:{prefixAgo:null,prefixFromNow:null,suffixAgo:"\u524d",suffixFromNow:"\u521a\u521a",seconds:"\u4e00\u5206\u949f",minute:"\u4e00\u5206\u949f",minutes:"%d\u5206\u949f",hour:"\u4e00\u5c0f\u65f6",hours:"%d\u5c0f\u65f6",day:"\u4e00\u5929",days:"%d\u5929",month:"\u4e00\u4e2a\u6708",months:"%d\u4e2a\u6708",year:"\u4e00\u5e74",years:"%d\u5e74",never:"\u4ece\u4e0d",wordSeparator:" ",numbers:[]}},inWords:function(t){function n(n,o){var a=e.isFunction(n)?n(o,t):n,r=i.numbers&&i.numbers[o]||o;return a.replace(/%d/i,r)}var i=this.settings.strings,o=i.prefixAgo,a=i.suffixAgo;this.settings.allowFuture&&t<0&&(o=i.prefixFromNow,a=i.suffixFromNow);var r=Math.abs(t)/1e3,s=r/60,c=s/60,l=c/24,u=l/365,d=r<45&&n(i.seconds,Math.round(r))||r<90&&n(i.minute,1)||s<45&&n(i.minutes,Math.round(s))||s<90&&n(i.hour,1)||c<24&&n(i.hours,Math.round(c))||c<42&&n(i.day,1)||l<30&&n(i.days,Math.round(l))||l<45&&n(i.month,1)||l<365&&n(i.months,Math.round(l/30))||u<1.5&&n(i.year,1)||n(i.years,Math.round(u)),p=i.wordSeparator||"";return i.wordSeparator===undefined&&(p=" "),e.trim([o,d].join(p)+a)},parse:function(t){var n=e.trim(t);return n=(n=(n=(n=n.replace(/\.\d+/,"")).replace(/-/,"/").replace(/-/,"/")).replace(/T/," ").replace(/Z/," UTC")).replace(/([\+\-]\d\d)\:?(\d\d)/," $1$2"),new Date(n)},datetime:function(t){var n=a.isTime(t)?e(t).attr("datetime"):e(t).attr("title");return a.parse(n)},isTime:function(t){return"time"===e(t).get(0).tagName.toLowerCase()}});var r={init:function(){var n=e.proxy(t,this);n();var i=a.settings;i.refreshMillis>0&&setInterval(n,i.refreshMillis)},update:function(n){e(this).data("timeago",{datetime:a.parse(n)}),t.apply(this)}};e.fn.timeago=function(e,t){var n=e?r[e]:r.init;if(!n)throw new Error("Unknown function name '"+e+"' for timeago");return this.each(function(){n.call(this,t)}),this},document.createElement("abbr"),document.createElement("time")}),function(){const e={email:/^[\w+\-.]+@[a-z\d\-]+(\.[a-z\d\-]+)*\.[a-z]+$/i,projectName:/^(?!_)(?!.*?_$)(?!-)(?!.*-$)(?!\+)[-a-zA-Z0-9_.\u4e00-\u9fa5\uff00-\uffff+ ]+$/,projectPath:/^[a-zA-Z0-9.][a-zA-Z0-9_\-.]{1,190}$/,projectLabel:/^[0-9A-Za-z\u4e00-\u9fa5]{1}[A-Za-z0-9\-\u4e00-\u9fa5]{0,34}$/,phone:/^[1,8][0-9]{10,11}$/,commitId:/^[0-9a-f]{40}$/,emailSuffix:/^@[a-z\d-]+(\.[a-z\d-]+)*\.[a-z]+$/,positiveInt:/^[1-9]\d*$/,idCard:/(^[1-9]\d{5}(18|19|([23]\d))\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$)|(^[1-9]\d{5}\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}$)/};window.giteeRegex=e}(),function e(t,n,i){function o(r,s){if(!n[r]){if(!t[r]){var c="function"==typeof require&&require;if(!s&&c)return c(r,!0);if(a)return a(r,!0);var l=new Error("Cannot find module '"+r+"'");throw l.code="MODULE_NOT_FOUND",l}var u=n[r]={exports:{}};t[r][0].call(u.exports,function(e){var n=t[r][1][e];return o(n||e)},u,u.exports,e,t,n,i)}return n[r].exports}for(var a="function"==typeof require&&require,r=0;r<i.length;r++)o(i[r]);return o}({1:[function(e,t,n){function i(){return{a:["target","href","title"],abbr:["title"],address:[],area:["shape","coords","href","alt"],article:[],aside:[],audio:["autoplay","controls","loop","preload","src"],b:[],bdi:["dir"],bdo:["dir"],big:[],blockquote:["cite"],br:[],caption:[],center:[],cite:[],code:[],col:["align","valign","span","width"],colgroup:["align","valign","span","width"],dd:[],del:["datetime"],details:["open"],div:[],dl:[],dt:[],em:[],font:["color","size","face"],footer:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],header:[],hr:[],i:[],img:["src","alt","title","width","height"],ins:["datetime"],li:[],mark:[],nav:[],ol:[],p:[],pre:[],s:[],section:[],small:[],span:[],sub:[],sup:[],strong:[],table:["width","border","align","valign"],tbody:["align","valign"],td:["width","rowspan","colspan","align","valign"],tfoot:["align","valign"],th:["width","rowspan","colspan","align","valign"],thead:["align","valign"],tr:["rowspan","align","valign"],tt:[],u:[],ul:[],video:["autoplay","controls","loop","preload","src","height","width"]}}function o(){}function a(){}function r(){}function s(){}function c(e){return e.replace(x,"&lt;").replace(O,"&gt;")}function l(e,t,n,i){if(n=m(n),"href"===t||"src"===t){if("#"===(n=z.trim(n)))return"#";if("http://"!==n.substr(0,7)&&"https://"!==n.substr(0,8)&&"mailto:"!==n.substr(0,7)&&"tel:"!==n.substr(0,4)&&"#"!==n[0]&&"/"!==n[0])return""}else if("background"===t){if(N.lastIndex=0,N.test(n))return""}else if("style"===t){if(q.lastIndex=0,q.test(n))return"";if(E.lastIndex=0,E.test(n)&&(N.lastIndex=0,N.test(n)))return"";!1!==i&&(n=(i=i||T).process(n))}return n=g(n)}function u(e){return e.replace(C,"&quot;")}function d(e){return e.replace(k,'"')}function p(e){return e.replace(_,function(e,t){return"x"===t[0]||"X"===t[0]?String.fromCharCode(parseInt(t.substr(1),16)):String.fromCharCode(parseInt(t,10))})}function f(e){return e.replace(L,":").replace(S," ")}function h(e){for(var t="",n=0,i=e.length;n<i;n++)t+=e.charCodeAt(n)<32?" ":e.charAt(n);return z.trim(t)}function m(e){return e=h(e=f(e=p(e=d(e))))}function g(e){return e=c(e=u(e))}function b(){return""}function v(e,t){function n(t){return!!i||-1!==z.indexOf(e,t)}"function"!=typeof t&&(t=function(){});var i=!Array.isArray(e),o=[],a=!1;return{onIgnoreTag:function(e,i,r){if(n(e)){if(r.isClosing){var s="[/removed]",c=r.position+s.length;return o.push([!1!==a?a:r.position,c]),a=!1,s}return a||(a=r.position),"[removed]"}return t(e,i,r)},remove:function(e){var t="",n=0;return z.forEach(o,function(i){t+=e.slice(n,i[0]),n=i[1]}),t+=e.slice(n)}}}function M(e){return e.replace(W,"")}function y(e){var t=e.split("");return(t=t.filter(function(e){var t=e.charCodeAt(0);return 127!==t&&(!(t<=31)||(10===t||13===t))})).join("")}var A=e("cssfilter").FilterCSS,w=e("cssfilter").getDefaultWhiteList,z=e("./util"),T=new A,x=/</g,O=/>/g,C=/"/g,k=/&quot;/g,_=/&#([a-zA-Z0-9]*);?/gim,L=/&colon;?/gim,S=/&newline;?/gim,N=/((j\s*a\s*v\s*a|v\s*b|l\s*i\s*v\s*e)\s*s\s*c\s*r\s*i\s*p\s*t\s*|m\s*o\s*c\s*h\s*a)\:/gi,q=/e\s*x\s*p\s*r\s*e\s*s\s*s\s*i\s*o\s*n\s*\(.*/gi,E=/u\s*r\s*l\s*\(.*/gi,W=/<!--[\s\S]*?-->/g;n.whiteList=i(),n.getDefaultWhiteList=i,n.onTag=o,n.onIgnoreTag=a,n.onTagAttr=r,n.onIgnoreTagAttr=s,n.safeAttrValue=l,n.escapeHtml=c,n.escapeQuote=u,n.unescapeQuote=d,n.escapeHtmlEntities=p,n.escapeDangerHtml5Entities=f,n.clearNonPrintableCharacter=h,n.friendlyAttrValue=m,n.escapeAttrValue=g,n.onIgnoreTagStripAll=b,n.StripTagBody=v,n.stripCommentTag=M,n.stripBlankChar=y,n.cssFilter=T,n.getDefaultCSSWhiteList=w},{"./util":4,cssfilter:8}],2:[function(e,t,n){function i(e,t){return new r(t).process(e)}var o=e("./default"),a=e("./parser"),r=e("./xss");for(var s in(n=t.exports=i).FilterXSS=r,o)n[s]=o[s];for(var s in a)n[s]=a[s];"undefined"!=typeof window&&(window.filterXSS=t.exports)},{"./default":1,"./parser":3,"./xss":5}],3:[function(e,t,n){function i(e){var t=d.spaceIndex(e);if(-1===t)var n=e.slice(1,-1);else n=e.slice(1,t+1);return"/"===(n=d.trim(n).toLowerCase()).slice(0,1)&&(n=n.slice(1)),"/"===n.slice(-1)&&(n=n.slice(0,-1)),n}function o(e){return"</"===e.slice(0,2)}function a(e,t,n){"user strict";var a="",r=0,s=!1,c=!1,l=0,u=e.length,d="",p="";for(l=0;l<u;l++){var f=e.charAt(l);if(!1===s){if("<"===f){s=l;continue}}else if(!1===c){if("<"===f){a+=n(e.slice(r,l)),s=l,r=l;continue}if(">"===f){a+=n(e.slice(r,s)),d=i(p=e.slice(s,l+1)),a+=t(s,a.length,d,p,o(p)),r=l+1,s=!1;continue}if(('"'===f||"'"===f)&&"="===e.charAt(l-1)){c=f;continue}}else if(f===c){c=!1;continue}}return r<e.length&&(a+=n(e.substr(r))),a}function r(e,t){"user strict";function n(e,n){if(!((e=(e=d.trim(e)).replace(p,"").toLowerCase()).length<1)){var i=t(e,n||"");i&&o.push(i)}}for(var i=0,o=[],a=!1,r=e.length,l=0;l<r;l++){var f,h=e.charAt(l);if(!1!==a||"="!==h)if(!1===a||l!==i||'"'!==h&&"'"!==h||"="!==e.charAt(l-1))if(/\s|\n|\t/.test(h)){if(e=e.replace(/\s|\n|\t/g," "),!1===a){if(-1===(f=s(e,l))){n(d.trim(e.slice(i,l))),a=!1,i=l+1;continue}l=f-1;continue}if(-1===(f=c(e,l-1))){n(a,u(d.trim(e.slice(i,l)))),a=!1,i=l+1;continue}}else;else{if(-1===(f=e.indexOf(h,l+1)))break;n(a,d.trim(e.slice(i+1,f))),a=!1,i=(l=f)+1}else a=e.slice(i,l),i=l+1}return i<e.length&&(!1===a?n(e.slice(i)):n(a,u(d.trim(e.slice(i))))),d.trim(o.join(" "))}function s(e,t){for(;t<e.length;t++){var n=e[t];if(" "!==n)return"="===n?t:-1}}function c(e,t){for(;t>0;t--){var n=e[t];if(" "!==n)return"="===n?t:-1}}function l(e){return'"'===e[0]&&'"'===e[e.length-1]||"'"===e[0]&&"'"===e[e.length-1]}function u(e){return l(e)?e.substr(1,e.length-2):e}var d=e("./util"),p=/[^a-zA-Z0-9_:\.\-]/gim;n.parseTag=a,n.parseAttr=r},{"./util":4}],4:[function(e,t){t.exports={indexOf:function(e,t){var n,i;if(Array.prototype.indexOf)return e.indexOf(t);for(n=0,i=e.length;n<i;n++)if(e[n]===t)return n;return-1},forEach:function(e,t,n){var i,o;if(Array.prototype.forEach)return e.forEach(t,n);for(i=0,o=e.length;i<o;i++)t.call(n,e[i],i,e)},trim:function(e){return String.prototype.trim?e.trim():e.replace(/(^\s*)|(\s*$)/g,"")},spaceIndex:function(e){var t=/\s|\n|\t/.exec(e);return t?t.index:-1}}},{}],5:[function(e,t){function n(e){return e===undefined||null===e}function i(e){var t=d.spaceIndex(e);if(-1===t)return{html:"",closing:"/"===e[e.length-2]};var n="/"===(e=d.trim(e.slice(t+1,-1)))[e.length-1];return n&&(e=d.trim(e.slice(0,-1))),{html:e,closing:n}}function o(e){var t={};for(var n in e)t[n]=e[n];return t}function a(e){(e=o(e||{})).stripIgnoreTag&&(e.onIgnoreTag&&console.error('Notes: cannot use these two options "stripIgnoreTag" and "onIgnoreTag" at the same time'),e.onIgnoreTag=s.onIgnoreTagStripAll),e.whiteList=e.whiteList||s.whiteList,e.onTag=e.onTag||s.onTag,e.onTagAttr=e.onTagAttr||s.onTagAttr,e.onIgnoreTag=e.onIgnoreTag||s.onIgnoreTag,e.onIgnoreTagAttr=e.onIgnoreTagAttr||s.onIgnoreTagAttr,e.safeAttrValue=e.safeAttrValue||s.safeAttrValue,e.escapeHtml=e.escapeHtml||s.escapeHtml,this.options=e,!1===e.css?this.cssFilter=!1:(e.css=e.css||{},this.cssFilter=new r(e.css))}var r=e("cssfilter").FilterCSS,s=e("./default"),c=e("./parser"),l=c.parseTag,u=c.parseAttr,d=e("./util");a.prototype.process=function(e){if(!(e=(e=e||"").toString()))return"";var t=this,o=t.options,a=o.whiteList,r=o.onTag,c=o.onIgnoreTag,p=o.onTagAttr,f=o.onIgnoreTagAttr,h=o.safeAttrValue,m=o.escapeHtml,g=t.cssFilter;o.stripBlankChar&&(e=s.stripBlankChar(e)),o.allowCommentTag||(e=s.stripCommentTag(e));var b=!1;if(o.stripIgnoreTagBody){b=s.StripTagBody(o.stripIgnoreTagBody,c);c=b.onIgnoreTag}var v=l(e,function(e,t,o,s,l){var b,v={sourcePosition:e,position:t,isClosing:l,isWhite:a.hasOwnProperty(o)};if(!n(b=r(o,s,v)))return b;if(v.isWhite){if(v.isClosing)return"</"+o+">";var M=i(s),y=a[o],A=u(M.html,function(e,t){var i,a=-1!==d.indexOf(y,e);return n(i=p(o,e,t,a))?a?(t=h(o,e,t,g))?e+'="'+t+'"':e:n(i=f(o,e,t,a))?void 0:i:i});s="<"+o;return A&&(s+=" "+A),M.closing&&(s+=" /"),s+=">"}return n(b=c(o,s,v))?m(s):b},m);return b&&(v=b.remove(v)),v},t.exports=a},{"./default":1,"./parser":3,"./util":4,cssfilter:8}],6:[function(e,t){function n(e){return e===undefined||null===e}function i(e){var t={};for(var n in e)t[n]=e[n];return t}function o(e){(e=i(e||{})).whiteList=e.whiteList||a.whiteList,e.onAttr=e.onAttr||a.onAttr,e.onIgnoreAttr=e.onIgnoreAttr||a.onIgnoreAttr,e.safeAttrValue=e.safeAttrValue||a.safeAttrValue,this.options=e}var a=e("./default"),r=e("./parser");e("./util");o.prototype.process=function(e){if(!(e=(e=e||"").toString()))return"";var t=this.options,i=t.whiteList,o=t.onAttr,a=t.onIgnoreAttr,s=t.safeAttrValue;return r(e,function(e,t,r,c,l){var u=i[r],d=!1;if(!0===u?d=u:"function"==typeof u?d=u(c):u instanceof RegExp&&(d=u.test(c)),!0!==d&&(d=!1),c=s(r,c)){var p,f={position:t,sourcePosition:e,source:l,isWhite:d};return d?n(p=o(r,c,f))?r+":"+c:p:n(p=a(r,c,f))?void 0:p}})},t.exports=o},{"./default":7,"./parser":9,"./util":10}],7:[function(e,t,n){function i(){var e={"align-content":!1,"align-items":!1,"align-self":!1,"alignment-adjust":!1,"alignment-baseline":!1,all:!1,"anchor-point":!1,animation:!1,"animation-delay":!1,"animation-direction":!1,"animation-duration":!1,"animation-fill-mode":!1,"animation-iteration-count":!1,"animation-name":!1,"animation-play-state":!1,"animation-timing-function":!1,azimuth:!1,"backface-visibility":!1,background:!0,"background-attachment":!0,"background-clip":!0,"background-color":!0,"background-image":!0,"background-origin":!0,"background-position":!0,"background-repeat":!0,"background-size":!0,"baseline-shift":!1,binding:!1,bleed:!1,"bookmark-label":!1,"bookmark-level":!1,"bookmark-state":!1,border:!0,"border-bottom":!0,"border-bottom-color":!0,"border-bottom-left-radius":!0,"border-bottom-right-radius":!0,"border-bottom-style":!0,"border-bottom-width":!0,"border-collapse":!0,"border-color":!0,"border-image":!0,"border-image-outset":!0,"border-image-repeat":!0,"border-image-slice":!0,"border-image-source":!0,"border-image-width":!0,"border-left":!0,"border-left-color":!0,"border-left-style":!0,"border-left-width":!0,"border-radius":!0,"border-right":!0,"border-right-color":!0,"border-right-style":!0,"border-right-width":!0,"border-spacing":!0,"border-style":!0,"border-top":!0,"border-top-color":!0,"border-top-left-radius":!0,"border-top-right-radius":!0,"border-top-style":!0,"border-top-width":!0,"border-width":!0,bottom:!1,"box-decoration-break":!0,"box-shadow":!0,"box-sizing":!0,"box-snap":!0,"box-suppress":!0,"break-after":!0,"break-before":!0,"break-inside":!0,"caption-side":!1,chains:!1,clear:!0,clip:!1,"clip-path":!1,"clip-rule":!1,color:!0,"color-interpolation-filters":!0,"column-count":!1,"column-fill":!1,"column-gap":!1,"column-rule":!1,"column-rule-color":!1,"column-rule-style":!1,"column-rule-width":!1,"column-span":!1,"column-width":!1,columns:!1,contain:!1,content:!1,"counter-increment":!1,"counter-reset":!1,"counter-set":!1,crop:!1,cue:!1,"cue-after":!1,"cue-before":!1,cursor:!1,direction:!1,display:!0,"display-inside":!0,"display-list":!0,"display-outside":!0,"dominant-baseline":!1,elevation:!1,"empty-cells":!1,filter:!1,flex:!1,"flex-basis":!1,"flex-direction":!1,"flex-flow":!1,"flex-grow":!1,"flex-shrink":!1,"flex-wrap":!1,float:!1,"float-offset":!1,"flood-color":!1,"flood-opacity":!1,"flow-from":!1,"flow-into":!1,font:!0,"font-family":!0,"font-feature-settings":!0,"font-kerning":!0,"font-language-override":!0,"font-size":!0,"font-size-adjust":!0,"font-stretch":!0,"font-style":!0,"font-synthesis":!0,"font-variant":!0,"font-variant-alternates":!0,"font-variant-caps":!0,"font-variant-east-asian":!0,"font-variant-ligatures":!0,"font-variant-numeric":!0,"font-variant-position":!0,"font-weight":!0,grid:!1,"grid-area":!1,"grid-auto-columns":!1,"grid-auto-flow":!1,"grid-auto-rows":!1,"grid-column":!1,"grid-column-end":!1,"grid-column-start":!1,"grid-row":!1,"grid-row-end":!1,"grid-row-start":!1,"grid-template":!1,"grid-template-areas":!1,"grid-template-columns":!1,"grid-template-rows":!1,"hanging-punctuation":!1,height:!0,hyphens:!1,icon:!1,"image-orientation":!1,"image-resolution":!1,"ime-mode":!1,"initial-letters":!1,"inline-box-align":!1,"justify-content":!1,"justify-items":!1,"justify-self":!1,left:!1,"letter-spacing":!0,"lighting-color":!0,"line-box-contain":!1,"line-break":!1,"line-grid":!1,"line-height":!1,"line-snap":!1,"line-stacking":!1,"line-stacking-ruby":!1,"line-stacking-shift":!1,"line-stacking-strategy":!1,"list-style":!0,"list-style-image":!0,"list-style-position":!0,"list-style-type":!0,margin:!0,"margin-bottom":!0,"margin-left":!0,"margin-right":!0,"margin-top":!0,"marker-offset":!1,"marker-side":!1,marks:!1,mask:!1,"mask-box":!1,"mask-box-outset":!1,"mask-box-repeat":!1,"mask-box-slice":!1,"mask-box-source":!1,"mask-box-width":!1,"mask-clip":!1,"mask-image":!1,"mask-origin":!1,"mask-position":!1,"mask-repeat":!1,"mask-size":!1,"mask-source-type":!1,"mask-type":!1,"max-height":!0,"max-lines":!1,"max-width":!0,"min-height":!0,"min-width":!0,"move-to":!1,"nav-down":!1,"nav-index":!1,"nav-left":!1,"nav-right":!1,"nav-up":!1,"object-fit":!1,"object-position":!1,opacity:!1,order:!1,orphans:!1,outline:!1,"outline-color":!1,"outline-offset":!1,"outline-style":!1,"outline-width":!1,overflow:!1,"overflow-wrap":!1,"overflow-x":!1,"overflow-y":!1,padding:!0,"padding-bottom":!0,"padding-left":!0,"padding-right":!0,"padding-top":!0,page:!1,"page-break-after":!1,"page-break-before":!1,"page-break-inside":!1,"page-policy":!1,pause:!1,"pause-after":!1,"pause-before":!1,perspective:!1,"perspective-origin":!1,pitch:!1,"pitch-range":!1,"play-during":!1,position:!1,"presentation-level":!1,quotes:!1,"region-fragment":!1,resize:!1,rest:!1,"rest-after":!1,"rest-before":!1,richness:!1,right:!1,rotation:!1,"rotation-point":!1,"ruby-align":!1,"ruby-merge":!1,"ruby-position":!1,"shape-image-threshold":!1,"shape-outside":!1,"shape-margin":!1,size:!1,speak:!1,"speak-as":!1,"speak-header":!1,"speak-numeral":!1,"speak-punctuation":!1,"speech-rate":!1,stress:!1,"string-set":!1,"tab-size":!1,"table-layout":!1,"text-align":!0,"text-align-last":!0,"text-combine-upright":!0,"text-decoration":!0,"text-decoration-color":!0,"text-decoration-line":!0,"text-decoration-skip":!0,"text-decoration-style":!0,"text-emphasis":!0,"text-emphasis-color":!0,"text-emphasis-position":!0,"text-emphasis-style":!0,"text-height":!0,"text-indent":!0,"text-justify":!0,"text-orientation":!0,"text-overflow":!0,"text-shadow":!0,"text-space-collapse":!0,"text-transform":!0,"text-underline-position":!0,"text-wrap":!0,top:!1,transform:!1,"transform-origin":!1,"transform-style":!1,transition:!1,"transition-delay":!1,"transition-duration":!1,"transition-property":!1,"transition-timing-function":!1,"unicode-bidi":!1,"vertical-align":!1,visibility:!1,"voice-balance":!1,"voice-duration":!1,"voice-family":!1,"voice-pitch":!1,"voice-range":!1,"voice-rate":!1,"voice-stress":!1,"voice-volume":!1,volume:!1,"white-space":!1,widows:!1,width:!0,"will-change":!1,"word-break":!0,"word-spacing":!0,"word-wrap":!0,"wrap-flow":!1,"wrap-through":!1,"writing-mode":!1,"z-index":!1};return e}function o(){}function a(){}function r(e,t){return s.test(t)?"":t}var s=/javascript\s*\:/gim;n.whiteList=i(),n.getDefaultWhiteList=i,n.onAttr=o,n.onIgnoreAttr=a,n.safeAttrValue=r},{}],8:[function(e,t,n){function i(e,t){return new a(t).process(e)}var o=e("./default"),a=e("./css");for(var r in(n=t.exports=i).FilterCSS=a,o)n[r]=o[r];"undefined"!=typeof window&&(window.filterCSS=t.exports)},{"./css":6,"./default":7}],9:[function(e,t){function n(e,t){function n(){if(!a){var n=i.trim(e.slice(r,s)),o=n.indexOf(":");if(-1!==o){var l=i.trim(n.slice(0,o)),u=i.trim(n.slice(o+1));if(l){var d=t(r,c.length,l,u,n);d&&(c+=d+"; ")}}}r=s+1}";"!==(e=i.trimRight(e))[e.length-1]&&(e+=";");for(var o=e.length,a=!1,r=0,s=0,c="";s<o;s++){var l=e[s];if("/"===l&&"*"===e[s+1]){var u=e.indexOf("*/",s+2);if(-1===u)break;r=(s=u+1)+1,a=!1}else"("===l?a=!0:")"===l?a=!1:";"===l?a||n():"\n"===l&&n()}return i.trim(c)}var i=e("./util");t.exports=n},{"./util":10}],10:[function(e,t){t.exports={indexOf:function(e,t){var n,i;if(Array.prototype.indexOf)return e.indexOf(t);for(n=0,i=e.length;n<i;n++)if(e[n]===t)return n;return-1},forEach:function(e,t,n){var i,o;if(Array.prototype.forEach)return e.forEach(t,n);for(i=0,o=e.length;i<o;i++)t.call(n,e[i],i,e)},trim:function(e){return String.prototype.trim?e.trim():e.replace(/(^\s*)|(\s*$)/g,"")},trimRight:function(e){return String.prototype.trimRight?e.trimRight():e.replace(/(\s*$)/g,"")}}},{}]},{},[2]),window.escapeHTML=function(){var e=$("<div/>");return function(t){return e.text(t).html()}}(),window.htmlSafe=window.escapeHTML,function(){window.Gitee={}}.call(this),function(){var e=window.location.hostname;"git.oschina.net"===e&&(window.location.href=window.location.href.replace(e,"gitee.com"))}(),function(){var e,t,n;n=function(e,t){var n;return n={onIgnoreTagAttr:function(e,t,n){if("class"===t)return t+'="'+n+'"'}},t&&(n.whiteList=t),filterXSS(e,n)},t=function(e,t){var i,o;o="string"==typeof e?n(e,t):e;try{(i=$(o)).length||(i=$("<div/>").html(o))}catch(a){a,i=$("<div/>").html(o)}return i},e=function(){function e(e){e||(e={}),this.alertText=e.alertText||"Alert",this.confirmText=e.confirmText||"Confirm",this.approveText=e.approveText||"Approve",this.cancelText=e.cancelText||"Cancel",this.okText=e.okText||"Ok",this.className=e.className||""}return e.prototype.alert=function(e,t,i){var o;return t?e||(e=this.alertText):(t=e,e=this.alertText),o='<div class="ui mini modal gitee-modal '+this.className+'">\n  <i class="iconfont icon-close close"></i>\n  <div class="header">'+n(e)+'</div>\n  <div class="content">'+n(t)+'</div>\n  <div class="actions">\n    <div class="ui orange approve button"">'+n(this.okText)+"</div>\n  </div>\n</div>",i?$(o).modal({onApprove:i}).modal("show"):$(o).modal("show")},e.prototype.confirm=function(e,i,o,a,r){var s,c,l,u;return e||(e=this.confirmText),c=this.approveText,r&&"approveText"in r&&(c=r.approveText),l=this.cancelText,r&&"cancelText"in r&&(l=r.cancelText),s=t(i,r&&r.whiteList),r=$.isPlainObject(o)?o:$.extend({},{onApprove:o,onDeny:a},r),u='<div class="ui mini modal gitee-modal '+this.className+'">\n  <i class="iconfont icon-close close"></i>\n  <div class="header">'+n(e)+'</div>\n  <div class="content"></div>\n  <div class="actions">\n    <div class="ui blank cancel button">'+n(l)+'</div>\n    <div class="ui orange approve button">'+n(c)+"</div>\n  </div>\n</div>",$(u).children(".content").append(s).parent().modal(r).modal("show")},e.prototype.tiny_confirm=function(e,t,i,o,a){var r,s;e||(e=this.confirmText);try{(r=$(t)).length||(r=$("<div/>").html(t))}catch(c){c,r=$("<div/>").html(t)}return a=$.isPlainObject(i)?i:$.extend({},{onApprove:i,onDeny:o},a),s='<div class="ui tiny modal gitee-modal '+this.className+'">\n  <i class="iconfont icon-close close"></i>\n  <div class="header">'+n(e)+'</div>\n  <div class="content"></div>\n  <div class="actions">\n    <div class="ui blank cancel button">'+n(this.cancelText)+'</div>\n    <div class="ui orange approve button">'+n(this.approveText)+"</div>\n  </div>\n</div>",$(s).find(".content").append(r).parent().modal(a).modal("show")},e.prototype.info=function(e,i,o){var a,r;return null==o&&(o="mini"),a=t(i),r='<div class="ui '+n(o)+" modal gitee-modal "+this.className+'">\n  <i class="iconfont icon-close close"></i>\n  <div class="header">'+n(e)+'</div>\n  <div class="content"></div>\n</div>',$(r).children(".content").append(a).parent().modal("show")},e}(),"undefined"!=typeof module&&(module.exports=e),this.GiteeModalHelper=e}.call(this),function(){var e;e=function(){function e(e){e||(e={}),e.sendClass||console.error("btnClass must exist"),e.phone||console.error("phone number must exist"),e.captcha||console.error("captcha must exist"),this.options=e,this.btnObj=$(e.sendClass),this.captcha=e.captcha,this.phone=e.phone,this.phoneClass=e.phoneClass,this.captchaClass=e.captchaClass,this.removePhoneDisabled=e.removePhoneDisabled,"undefined"==typeof this.removePhoneDisabled&&(this.removePhoneDisabled=!0),this.removeCaptchaDisabled=e.removeCaptchaDisabled,"undefined"==typeof this.removeCaptchaDisabled&&(this.removeCaptchaDisabled=!0)}return e.prototype.send=function(e){var t;return t=this,this.phone&&""!==this.phone?this.captcha&&""!==this.captcha?this.btnObj?(this.btnObj.addClass("disabled"),$.ajax({url:"/phones/send_phone_captcha",data:{phone:this.phone,img_captcha:this.captcha,check_captcha:e.forceCheckCaptcha||!1},type:"POST",success:function(n){if(t.btnObj.countdown({template:"\u91cd\u65b0\u53d1\u9001 (${time}s)",callback:function(){if(t.btnObj.text("\u91cd\u65b0\u53d1\u9001").removeClass("disabled"),t.visibleToggle(),e.onCaptchaTimeOut)return e.onCaptchaTimeOut()}}),n.notice&&t.showMessage(n.notice),t.visibleToggle(),1===n.result)return e.onSuccess(n)}})):(console.error("invalid button object"),!1):(this.showMessage("\u9a8c\u8bc1\u7801\u4e0d\u80fd\u4e3a\u7a7a"),!1):(this.showMessage("\u624b\u673a\u53f7\u7801\u4e0d\u80fd\u4e3a\u7a7a"),!1)},e.prototype.showMessage=function(e){return Flash?Flash.show(e):Toast(e)},e.prototype.visibleToggle=function(){if(this.phoneClass&&($(this.phoneClass).attr("disabled")?this.removePhoneDisabled&&$(this.phoneClass).attr("disabled",!1):$(this.phoneClass).attr("disabled",!0)),this.captchaClass){if(!$(this.captchaClass).attr("disabled"))return $(this.captchaClass).attr("disabled",!0);if(this.removeCaptchaDisabled)return $(this.captchaClass).attr("disabled",!1)}},e}(),this.SMS=e}.call(this),Gitee.initTabsInDropdown=function(e){function t(t){var i=e.find('.tab-menu-item[data-tab="'+t+'"]');e.find(".tab.active").removeClass("active"),e.find(".tab-menu-item.active").removeClass("active"),e.find(".tab-menu-action.active").removeClass("active"),e.find('.tab[data-tab="'+t+'"]').addClass("active"),e.find('.tab-menu-action[data-tab="'+t+'"]').addClass("active"),i.data("placeholder")&&n.attr("placeholder",i.data("placeholder")),i.addClass("active")}var n=e.find(".ui.search.input input");e.find(".tab-menu-item").on("click",function(){t($(this).data("tab"))});const i=e.dropdown("get selected item");Array.isArray(i)?i.forEach(e=>{t(e.parent().data("tab"))}):t(i.parent().data("tab"))},window.Gitee.initStats=function(){function e(){try{window.gon&&window._hmt&&window.gon.baidu_register_hm_push&&(window.gon.baidu_register_hm_push=undefined,console.log("success sign up"),window._hmt.push(["_trackCustomEvent","Pers_Regist_Success"]),$(document).on("click","[data-track]",function(e){var t=$(this);window._hmt.push(["_trackCustomEvent",t.data("track"),{}]),"A"===t.prop("tagName")&&t.attr("href")&&(e.stopPropagation(),e.preventDefault(),setTimeout(function(){window.location.href=t.attr("href")},200))}))}catch(e){console.error(e)}}function t(){var e,t;try{switch(e=window.gon.info.controller_path.concat("#",window.gon.info.action_name),!0){case/^(mobile\/)?home#index/.test(e):t=window.gon.info.current_user?"homepage_logged":"homepage";break;case/^(mobile\/)?enterprises#index/.test(e):t="enterprise_info";break;case/^(mobile\/)?education#index/.test(e):t="education_info";break;case/^(mobile\/)?gp#index/.test(e):t="premium_info";break;case/^(mobile\/)?explores#index/.test(e):t="explore";break;case/^(mobile\/)?explores#show/.test(e):t="explore_sorts";break;case/^(mobile\/)?open_source_vips#(index|category)/.test(e):t="gvp";break;case/^(mobile\/users#login|sessions#new)/.test(e):t="login";break;case/^(mobile\/users#signup|registrations#new)/.test(e):t="signup";break;case/^(mobile\/)?enterprises#new/.test(e):t="enterprise_new";break;case/^(mobile\/)?users#show/.test(e):t="user_profile";break;case/^(mobile\/profile#index|profiles#\w+)/.test(e):t="user_settings";break;case/^(mobile\/)?(projects|issues|pull_requests|attach_files|wikis|repositories|paas|pages|javadocs|phpdocs|quality_analyses|settings|team_members|deploy_keys|services|hooks|readonly_items|lfs_files)#\w+/.test(e):t="repository";break;case/^(mobile\/)?(groups|groups\/members)#\w+/.test(e):t="organization";break;case/^(mobile\/)?self_services#\w+/.test(e):t="self_services";break;case/^(mobile\/)?help#index/.test(e):t="help_center";break;case/enterprises\/dashboard\/\w+#\w+/.test(e):t=window.gon.info.current_user&&window.gon.info.current_user.official?"enterprise_demo":"enterprise_workspace"}t&&window._hmt.push(["_setPageviewProperty",{page_group:t}])}catch(n){console.error(n)}}function n(){var n=document.createElement("script"),o=document.getElementsByTagName("script")[0];n.src="https://hm.baidu.com/hm.js?"+i,o.parentNode.insertBefore(n,o),"ActiveXObject"in window?n.onreadystatechange=function(){"loaded"!==this.readyState&&"complete"!==this.readyState||((window._hmt=window._hmt||[])&&window._hmt.push(["_setAccount",i]),t(),e())}:n.onload=function(){(window._hmt=window._hmt||[])&&window._hmt.push(["_setAccount",i]),t(),e()}}if(/gitee\.com$/.test(window.location.hostname)){var i="24f17767262929947cc3631f99bfd274";n()}},Gitee.initRepoRemoteWay=function(){$.cookie("remote_way")||$.cookie("remote_way",{expires:360,path:"/"})},function(e,t){var n="undefined"==typeof window?undefined:window.define;"function"==typeof n&&n.amd?n([],function(){return t()}):"object"==typeof module&&module.exports?module.exports=t():e.globalUtils=t()}(this,function(){var e="undefined"==typeof window?{}:window.gon||{},t=function(e,t){var n=new Date(e),i=n.getFullYear(),o=n.getMonth()+1,a=n.getDate(),r=n.getHours(),s=n.getMinutes(),c=n.getSeconds();return(t||"yyyy-MM-dd hh:mm").replace("yyyy",i).replace("MM",o).replace("dd",a).replace("hh",r).replace("mm",s).replace("ss",c).replace(/\b\d{1}\b/g,"0$&")},n=function(e,t,n){var i=null,o=!0;return function(){var a=this,r=arguments;i&&clearTimeout(i),n?(i=setTimeout(function(){e.apply(a,r),o=!0},t),o&&(e.apply(a,r),o=!1)):i=setTimeout(function(){e.apply(a,r)},t)}},i=function(e,t){var n=null,i=Date.now();return function(){var o=Date.now(),a=t-(o-i),r=this,s=arguments;clearTimeout(n),a<=0?(e.apply(r,s),i=Date.now()):n=setTimeout(e,a)}},o=function(e,t){var n,i=t||new Date;try{n=new Date(e),i=new Date(i)}catch(o){return 0}return i.getTime()-n.getTime()},a=function(e){var t={};return Object.keys(e).forEach(function(n){var i=e[n];i instanceof Array&&(i=i.toString()),""!==i&&(t[n]=i)}),1===Number(t.page)&&delete t.page,t},r=function(){for(var e=[].slice.call(arguments),t=0,n="";t<e.length;t++){Object.keys(e[t]).forEach(function(i){n+=i+"="+e[t][i]+"&"})}return n.slice(0,-1)},s=function(e,t){var n=null;return e.some(function(e){return!!t(e)&&(n=e,!0)}),n},c=function(e){return e.substr(0,7)},l=function(){var e=localStorage.getItem("__GiteeBetaMode");return"string"!=typeof e?"gitee.com"!==window.location.hostname||1===window.gon.enterprise.id:"true"===e},u=function(e,t){var n=void 0===t?{}:t,i=n.onSuccess||function(){},o=n.onFail||function(){},a=n.always||function(){};$.post("/check",{"do":"captcha",val:e}).done(function(e){"1"===e?i():o(e),a(e)}).fail(function(e){o(e),a(e)})},d=function(e,t,n,i){var o=void 0===n?{}:n,a=o.onSuccess||function(){},r=o.onError||function(){},s=o.onCancel||function(){},c=o.always||function(){};return $.ajax({url:"/check",data:{"do":e,val:t,entrance:i},type:"POST",success:function(e){"1"===e?a():r(e),c()},error:function(e){"abort"===e.statusText?s():r(e.responseText),c()}})},p=function(e,t){var n=void 0===t?{}:t,i=n.onSuccess||function(){},o=n.onError||function(){},a=n.onCancel||function(){},r=n.always||function(){};return $.ajax({url:"/personal/password_strength",data:{value:e},method:"POST",dataType:"json",success:function(e){"available"===e.status?i(e):o(e),r(e)},error:function(e){"abort"===e.statusText?a():o(e.responseText),r(data)}})},f=function(e,t,n){$.post("/send_phone_email_captcha",$.extend({},e,t)).done(function(e){n(!0,e.message,e.code)}).fail(function(e){n(!1,e.responseJSON.message)})},h=function(e,t){$.post("/check_user_login",{user_login:e}).done(function(e){1===e.result&&e.failed_count>2?t(!0):t(!1)})},m=function(e,t){return $.get("/search/translate",e).done(function(e){t(e)}).fail(function(){t()})},g={appId:e.yunpian_key,container:"undefined"==typeof document?null:document.querySelector("body"),version:"v1",expired:20,winWidth:400,mode:"flat",noButton:!0,onSuccess:function(){},onError:function(){},onFail:function(e,t,n){n()},afterStart:function(){$(".yp-riddler-winbox").css("width","auto")}},b=function(e,t){var n=e[0]||e;if(n instanceof HTMLElement){var i=n.value.length||n.innerHTML.length||0;setTimeout(function(){n.focus(),"number"===n.type?console.warn("Uncaught DOMException: Failed to execute 'setSelectionRange' on 'HTMLInputElement': The input element's type ('number') does not support selection."):n.setSelectionRange(i,i)},50),t&&t.preventDefault()}else console.warn("params error, must is HTMLElement")},v={};"zh-TW"==e.locale?v.langPack={YPcaptcha_01:"\u8acb\u9ede\u64ca\u6309\u9215\u958b\u59cb\u9a57\u8b49",YPcaptcha_02:"\u8acb\u6309\u9806\u5e8f\u9ede\u64ca:",YPcaptcha_03:"\u5411\u53f3\u62d6\u52d5\u6ed1\u584a\u586b\u5145\u62fc\u5716",YPcaptcha_04:"\u9a57\u8b49\u5931\u6557\uff0c\u8acb\u91cd\u8a66",YPcaptcha_05:"\u9a57\u8b49\u6210\u529f"}:"en"==e.locale?v.lang="en":v.lang="zh-cn",$.extend(g,v);var M=function(e){window.Toast?Toast({message:e,position:"bottom"}):window.Flash&&window.Flash.error(e)
DesignScreenshot/output/gitee_run/gitee.com_3_credentials_filled.html:346:},y=null,A=function(e,t){T({container:e[0],mode:"flat",beforeStart:function(e){t.beforeStart&&"function"==typeof t.beforeStart?t.beforeStart(e.bind(this)):e()},onError:function(){var e=t.callback;z($.extend(t,{useCaptch:!0,callback:function(t,n){e(t),n()}}))},onFail:function(e,t,n){n()},onSuccess:function(n,i){n.captcha_type="yunpian",t.callback(n,function(){e.closest(".gitee-modal").modal("hide")}),i()}})},w=function(t){var n,i=e.yunpian_key,o=$('<input maxlength="6"/>'),a=$("<div/>",{"class":"2verify-container"}),r=$("<div/>",{style:"display: flex; flex-direction: column;","class":"2verify-container__image"}),s=$("<div/>",{"class":"2verify-container__yunPian"}),c=$('<div class="ui input right labeled captcha-labeled"/>').append(o),l=$('<div class="ui label"/>'),u=$("<img/>",{src:"/rucaptcha?"+(new Date).getTime(),"class":"captcha_img"}),d=$("<div/>",{"class":"ui error",style:"margin-top: 6px; color: #f14333;"}),p=$('<div class="session__2verify-switch mt-3 mb-1">\u4f7f\u7528\u6709\u95ee\u9898\uff1f<a>\u5207\u6362\u81f3\u5176\u4ed6\u9a8c\u8bc1\u65b9\u5f0f</a></div>'),f=$('<button class="ui disabled orange button fluid large mt-2">\u63d0\u4ea4</div>');return l.append(u),c.append(l),r.append(c).append(d).append(f),a.append(r),o.on("input",function(){6===this.value.length?f.removeClass("disabled"):f.addClass("disabled")}),i&&!0!==t.useCaptch&&(n=!0,r.hide(),a.append(s).append(p),A(s,t),p.find("a").on("click",function(){(n=!n)?(s.show(),r.hide()):(o.val(""),d.text(""),u.attr("src","/rucaptcha?"+(new Date).getTime()),s.hide(),r.show())})),a},z=function(e){var t,n=w(e),i=n.find("input"),o=n.find(".ui.error"),a=n.find(".captcha_img"),r=n.find(".ui.button.large");y||(y=new window.GiteeModalHelper({className:"twice-verification-warpper",approveText:"\u786e\u5b9a",cancelText:"\u53d6\u6d88"})),(t=y.confirm("\u4e8c\u6b21\u9a8c\u8bc1",n)).find(".actions").remove(),t.css("width","auto"),r.on("click",function(){var n=i.val();o.text(""),r.addClass("disabled loading"),u(n,{onSuccess:function(){e.callback({captcha_type:"captcha",captcha:n},function(){t.modal("hide")})},onFail:function(e){o.text(e),i.val(""),a.attr("src","/rucaptcha?"+(new Date).getTime())},always:function(){r.removeClass("disabled loading")}})}),i.on("input",function(){6===this.value.length?r.removeClass("disabled"):r.addClass("disabled")})},T=function(e){var t=window.YpRiddler,n=$.extend({},g,e),i=n.showError||M,o=function(e){429!==e.code?(i("\u9a8c\u8bc1\u670d\u52a1\u5f02\u5e38"),n.onError(e)):i("\u8bf7\u6c42\u8fc7\u4e8e\u9891\u7e41\uff0c\u8bf7\u7a0d\u540e\u518d\u8bd5\uff01")},a=function(e,t,o){i(2===e?"\u9a8c\u8bc1\u9519\u8bef":"\u9a8c\u8bc1\u51fa\u9519\uff1a"+t+" code: "+e),n.onFail(e,t,o)};new t($.extend({},n,{onError:o,onFail:a,onSuccess:function(e,t){n.onSuccess(e,t)}}))},x={email:/^[\w+-.]+@[a-z\d-]+(\.[a-z\d-]+)*\.[a-z]+$/,phone:/^[1,8][0-9]{10,11}$/,imageCaptcha:/^[a-zA-Z0-9]{6}$/,captcha:/^[a-zA-Z0-9]{6}$/};return{formatDate:t,formatPhone:function(e){if((11===e.length||14===e.length)&&e.startsWith("+86")){var t=e.replace("+86","");x.phone.test(t)&&(e=t)}return e},find:s,isBetaMode:l,debouce:n,throttle:i,getDiffTime:o,getCommitShortId:c,simplifyQuery:a,serialize:r,checkCaptcha:u,netCheck:d,validatePwdStrength:p,twiceVerification:T,twiceVerificationModal:function(e){var t=e.callback,n=$(e.container),i=function(){z($.extend(e,{callback:function(e,n){t(e),n()}}))};n.on("click",function(){e.beforeStart&&"function"==typeof e.beforeStart?e.beforeStart(function(){i()}):i()})},twiceVerificationWarpper:z,sendVerificationCode:f,commonRegex:x,canVerifyAccount:h,translate:m,translateCommon:function(e,t,i){var o=$(e),a=$(t);o.on("input",n(function(){a.data("manual")||""===o.val()||(o.data("traslateAjax")&&o.data("traslateAjax").abort(),o.data("traslateAjax",m({q:encodeURIComponent(o.val())},function(e){e.result&&!a.data("manual")&&(a.val(e.result),i())})))},500)),a.on("input",function(){""===this.value?$(this).data("manual",!1):$(this).data("manual",!0)})},clearSelections:function(){window.getSelection?window.getSelection().removeAllRanges():document.selection&&document.selection.empty&&document.selection.empty()},getFocus:b,getUrlQuery:function(e){if(!e)return"";var t=new RegExp("(^|&)"+e+"=([^&]*)(&|$)"),n=window.location.search.substr(1).match(t);return null!=n?decodeURIComponent(n[2]):""},shuffle:function(e){for(var t,n,i=e.length;i;)n=Math.floor(Math.random()*i--),t=e[i],e[i]=e[n],e[n]=t;return e},formPageSizeCheck:function(){var e;$("#page_size").on("input",function(){var t=/^([1-9]|[1-9][0-9]?|100)$/,n=$("#page_size").val();e=!0,""!==n?t.test(n)||(e=!1):e=!0}),$(".search-btn").click(function(t){!1===e&&(Flash.show("\u53ea\u80fd\u8f93\u51651-100\u7684\u6570\u503c"),t.preventDefault())})},createInputHistoryList:function(e,t){function i(){u=c.offset(),p.css({display:"none",position:"absolute",left:u.left+(e.offsetX||0)+"px",top:u.top+c.outerHeight()+(e.offsetY||0)+"px"})}function o(){p.fadeOut(200)}function a(){l.length<=0||p.fadeIn(200)}function r(){l=[],localStorage.setItem(e.key,JSON.stringify(l))}function s(){p.html(d())}e.maxCount=e.maxCount||5;var c=$(e.selector);if(0!==c.length&&e.key){var l=JSON.parse(localStorage.getItem(e.key)||"[]")||[],u=c.offset(),d=function(){for(var e='<div class="item item-title d-flex-between">      <div class="title">\u5386\u53f2\u641c\u7d22</div>      <i class="iconfont clear-btn icon-zhengwenpinglun_shanchuicon"></i>      </div>',t=0;t<l.length;t++){var n=$("<div>").html(l[t]).text();e+='<div class="item item-text" title="'+n+'">'+n+"</div>"}return e},p=$('<div class="search-history-list-wrapper '+e.className+'">'+d()+'</div>"');return $(document).on("mousedown",".search-history-list-wrapper",function(e){e.preventDefault()}),$(document).on("click",".search-history-list-wrapper .item-text",function(){var e=$(this).text();c.val(e),o(),t&&t.onClick&&t.onClick(e)}),$(document).on("mouseenter",".search-history-list-wrapper .item-text",function(){var e=$(this).text();c.val(e)}),$(document).on("click",".search-history-list-wrapper .clear-btn",function(){r(),o(),s()}),$(document).on("click",e.selector,function(){a()}),$(window).on("resize",n(function(){i()},400)),$("body").append(p),i(),{add:function(t){if(t){var n=window.filterXSS(t,{stripIgnoreTag:!1,whiteList:{}});n=window.htmlSafe(n);var i=l.indexOf(n);if(i>-1){var o=l[i];l.splice(i,1),l.unshift(o)}else l.unshift(n),l.length>e.maxCount&&l.pop();localStorage.setItem(e.key,JSON.stringify(l)),s()}},clear:function(){r(),s()},show:function(){i(),a()},hide:function(){o()},removeSelf:function(){p.remove()},refresh:function(){s()},resize:function(){i()}}}},goBackReload:function(){document.referrer&&(location.href=document.referrer)},filterEmoji:function(e){return e?e.replace(/[\uD83C|\uD83D|\uD83E][\uDC00-\uDFFF][\u200D|\uFE0F]|[\uD83C|\uD83D|\uD83E][\uDC00-\uDFFF]|[0-9|*|#]\uFE0F\u20E3|[0-9|#]\u20E3|[\u203C-\u3299]\uFE0F\u200D|[\u203C-\u3299]\uFE0F|[\u2122-\u2B55]|\u303D|[\A9|\AE]\u3030|\uA9|\uAE|\u3030/gi,""):""},isPageInputState:function(){return!!document.activeElement&&["INPUT","TEXTAREA"].indexOf(document.activeElement.tagName)>-1},clearURLParams:function(){window.history&&history.replaceState?history.replaceState({},"",location.origin+location.pathname):Flash.error("\u8bf7\u66f4\u65b0\u60a8\u7684\u6d4f\u89c8\u5668\u540e\u7ee7\u7eed\u8bbf\u95ee")},once:function(e){var t=!1;return function(){t||(t=!0,e.apply(this,arguments))}},aiGenProjectName:function(e,t){$.post("/enhance/desc2name",{scene:"project",description:e.description,negative_words:e.negativeWords,language:e.language}).done(function(e){t(e.data)}).fail(function(){t()})},aiGenProjectDesc:function(e,t){$.post("/enhance/name2desc",{scene:"project",name:e.name,negative_words:e.negativeWords,language:e.language}).done(function(e){t(e.data)}).fail(function(){t()})},aiCheckLimit:function(e){$.get("/enhance/check_limited").done(function(t){e(t.data)}).fail(function(){e()})}}}),function(){function e(){if("hidden"in document)return document.hidden;for(var e=["webkit","moz","mos","o"],t=0,n=e.length;t<n;t++)if(e[t]+"Hidden"in document)return document[e[t]+"Hidden"];return!1}var t;"undefined"!=typeof document.hidden?(hidden="hidden",t="visibilitychange"):"undefined"!=typeof document.msHidden?(hidden="msHidden",t="msvisibilitychange"):"undefined"!=typeof document.webkitHidden&&(hidden="webkitHidden",t="webkitvisibilitychange"),document.addEventListener(t,window.globalUtils.throttle(function(){$(window).trigger("document:visibility",{isHidden:e()})},8e3),!1)}(),function(){this.Flash={hasElement:!1,show:function(e,t,n,i){var o,a,r;if(null==t&&(t="info"),null==n&&(n=3e3),r='<div data-notify="container" class="ui {0} message" role="alert"><i data-notify="dismiss" class="close icon"></i><span data-notify="message">{2}</span></div>',o={message:e=i?e:htmlSafe(e)},a={type:t},e)return a.delay=n,a.template=r,a.offset={x:10,y:30},a.element="#messages-container",this.hasElement||this.findOrInitElement(a),$.notify(o,a)},info:function(e,t){return null==t&&(t=3e3),this.show(e,"info",t)},error:function(e,t){return null==t&&(t=3e3),this.show(e,"error",t)},findOrInitElement:function(e){var t;return $(e.element).length||(t=e.element.replace("#",""),$("body").append('<div class="flash-messages" id="'+t+'"></div>')),this.hasElement=!0}}}.call(this),
DesignScreenshot/output/gitee_run/gitee.com_3_credentials_filled.html:360:!f.silent&&f.verbose&&f.debug&&(f.performance?A.performance.log(arguments):(A.verbose=Function.prototype.bind.call(console.info,console,f.name+":"),A.verbose.apply(console,arguments)))},error:function(){f.silent||(A.error=Function.prototype.bind.call(console.error,console,f.name+":"),A.error.apply(console,arguments))},performance:{log:function(e){var t,n;f.performance&&(n=(t=(new Date).getTime())-(s||t),s=t,c.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:z,"Execution Time":n})),clearTimeout(A.performance.timer),A.performance.timer=setTimeout(A.performance.display,500)},display:function(){var t=f.name+":",n=0;s=!1,clearTimeout(A.performance.timer),e.each(c,function(e,t){n+=t["Execution Time"]}),t+=" "+n+"ms",r&&(t+=" '"+r+"'"),a.length>1&&(t+=" ("+a.length+")"),(console.group!==i||console.table!==i)&&c.length>0&&(console.groupCollapsed(t),console.table?console.table(c):e.each(c,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),c=[]}},invoke:function(t,n,a){var r,s,c,l=h;return n=n||d,a=z||a,"string"==typeof t&&l!==i&&(t=t.split(/[\. ]/),r=t.length-1,e.each(t,function(n,o){var a=n!=r?o+t[n+1].charAt(0).toUpperCase()+t[n+1].slice(1):t;if(e.isPlainObject(l[a])&&n!=r)l=l[a];else{if(l[a]!==i)return s=l[a],!1;if(!e.isPlainObject(l[o])||n==r)return l[o]!==i&&(s=l[o],!1);l=l[o]}})),e.isFunction(s)?c=s.apply(a,n):s!==i&&(c=s),e.isArray(o)?o.push(c):o!==i?o=[o,c]:c!==i&&(o=c),s!==i&&s}}).initialize()}),o!==i?o:this},e.fn.transition.exists={},e.fn.transition.settings={name:"Transition",silent:!1,debug:!1,verbose:!1,performance:!0,namespace:"transition",interval:0,reverse:"auto",onStart:function(){},onComplete:function(){},onShow:function(){},onHide:function(){},useFailSafe:!0,failSafeDelay:100,allowRepeats:!1,displayType:!1,animation:"fade",duration:!1,queue:!0,metadata:{displayType:"display"},className:{animating:"animating",disabled:"disabled",hidden:"hidden",inward:"in",loading:"loading",looping:"looping",outward:"out",transition:"transition",visible:"visible"},error:{noAnimation:"Element is no longer attached to DOM. Unable to animate.  Use silent setting to surpress this warning in production.",repeated:"That animation is already occurring, cancelling repeated animation",method:"The method you called is not defined",support:"This browser does not support CSS animations"}}}(jQuery,window,document),function(e,t,n,i){"use strict";t=void 0!==t&&t.Math==Math?t:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),e.fn.dropdown=function(o){var a,r=e(this),s=e(n),c=r.selector||"",l="ontouchstart"in n.documentElement,u=(new Date).getTime(),d=[],p=arguments[0],f="string"==typeof p,h=[].slice.call(arguments,1);return r.each(function(m){var g,b,v,M,y,A,w,z,T=e.isPlainObject(o)?e.extend(!0,{},e.fn.dropdown.settings,o):e.extend({},e.fn.dropdown.settings),x=T.className,O=T.message,C=T.fields,k=T.keys,_=T.metadata,L=T.namespace,S=T.regExp,N=T.selector,q=T.error,E=T.templates,W="."+L,D="module-"+L,B=e(this),R=e(T.context),X=B.find(N.text),$=B.find(N.search),P=B.find(N.sizer),I=B.find(N.input),j=B.find(N.icon),F=B.prev().find(N.text).length>0?B.prev().find(N.text):B.prev(),H=B.children(N.menu),U=H.find(N.item),V=!1,Y=!1,G=!1,K=this,Q=B.data(D);z={initialize:function(){z.debug("Initializing dropdown",T),z.is.alreadySetup()?z.setup.reference():(z.setup.layout(),z.refreshData(),z.save.defaults(),z.restore.selected(),z.create.id(),z.bind.events(),z.observeChanges(),z.instantiate())},instantiate:function(){z.verbose("Storing instance of dropdown",z),Q=z,B.data(D,z)},destroy:function(){z.verbose("Destroying previous dropdown",B),z.remove.tabbable(),B.off(W).removeData(D),H.off(W),s.off(M),z.disconnect.menuObserver(),z.disconnect.selectObserver()},observeChanges:function(){"MutationObserver"in t&&(A=new MutationObserver(z.event.select.mutation),w=new MutationObserver(z.event.menu.mutation),z.debug("Setting up mutation observer",A,w),z.observe.select(),z.observe.menu())},disconnect:{menuObserver:function(){w&&w.disconnect()},selectObserver:function(){A&&A.disconnect()}},observe:{select:function(){z.has.input()&&A.observe(I[0],{childList:!0,subtree:!0})},menu:function(){z.has.menu()&&w.observe(H[0],{childList:!0,subtree:!0})}},create:{id:function(){y=(Math.random().toString(16)+"000000000").substr(2,8),M="."+y,z.verbose("Creating unique id for element",y)},userChoice:function(t){var n,o,a;return!!(t=t||z.get.userValues())&&(t=e.isArray(t)?t:[t],e.each(t,function(t,r){!1===z.get.item(r)&&(a=T.templates.addition(z.add.variables(O.addResult,r)),o=e("<div />").html(a).attr("data-"+_.value,r).attr("data-"+_.text,r).addClass(x.addition).addClass(x.item),T.hideAdditions&&o.addClass(x.hidden),n=n===i?o:n.add(o),z.verbose("Creating user choices for value",r,o))}),n)},userLabels:function(){var t=z.get.userValues();t&&(z.debug("Adding user labels",t),e.each(t,function(e,t){z.verbose("Adding custom user value"),z.add.label(t,t)}))},menu:function(){H=e("<div />").addClass(x.menu).appendTo(B)},sizer:function(){P=e("<span />").addClass(x.sizer).insertAfter($)}},search:function(e){e=e!==i?e:z.get.query(),z.verbose("Searching for query",e),z.has.minCharacters(e)?z.filter(e):z.hide()},select:{firstUnfiltered:function(){z.verbose("Selecting first non-filtered element"),z.remove.selectedItem(),U.not(N.unselectable).not(N.addition+N.hidden).eq(0).addClass(x.selected)},nextAvailable:function(e){var t=(e=e.eq(0)).nextAll(N.item).not(N.unselectable).eq(0),n=e.prevAll(N.item).not(N.unselectable).eq(0);t.length>0?(z.verbose("Moving selection to",t),t.addClass(x.selected)):(z.verbose("Moving selection to",n),n.addClass(x.selected))}},setup:{api:function(){var e={debug:T.debug,urlData:{value:z.get.value(),query:z.get.query()},on:!1};z.verbose("First request, initializing API"),B.api(e)},layout:function(){B.is("select")&&(z.setup.select(),z.setup.returnedObject()),z.has.menu()||z.create.menu(),z.is.search()&&!z.has.search()&&(z.verbose("Adding search input"),$=e("<input />").addClass(x.search).prop("autocomplete","off").insertBefore(X)),z.is.multiple()&&z.is.searchSelection()&&!z.has.sizer()&&z.create.sizer(),T.allowTab&&z.set.tabbable()},select:function(){var t=z.get.selectValues();z.debug("Dropdown initialized on a select",t),B.is("select")&&(I=B),I.parent(N.dropdown).length>0?(z.debug("UI dropdown already exists. Creating dropdown menu only"),B=I.closest(N.dropdown),z.has.menu()||z.create.menu(),H=B.children(N.menu),z.setup.menu(t)):(z.debug("Creating entire dropdown from select"),B=e("<div />").attr("class",I.attr("class")).addClass(x.selection).addClass(x.dropdown).html(E.dropdown(t)).insertBefore(I),I.hasClass(x.multiple)&&!1===I.prop("multiple")&&(z.error(q.missingMultiple),I.prop("multiple",!0)),I.is("[multiple]")&&z.set.multiple(),I.prop("disabled")&&(z.debug("Disabling dropdown"),B.addClass(x.disabled)),I.removeAttr("class").detach().prependTo(B)),z.refresh()},menu:function(e){H.html(E.menu(e,C)),U=H.find(N.item)},reference:function(){z.debug("Dropdown behavior was called on select, replacing with closest dropdown"),B=B.parent(N.dropdown),z.refresh(),z.setup.returnedObject(),f&&(Q=z,z.invoke(p))},returnedObject:function(){var e=r.slice(0,m),t=r.slice(m+1);r=e.add(B).add(t)}},refresh:function(){z.refreshSelectors(),z.refreshData()},refreshItems:function(){U=H.find(N.item)},refreshSelectors:function(){z.verbose("Refreshing selector cache"),X=B.find(N.text),$=B.find(N.search),I=B.find(N.input),j=B.find(N.icon),F=B.prev().find(N.text).length>0?B.prev().find(N.text):B.prev(),H=B.children(N.menu),U=H.find(N.item)},refreshData:function(){z.verbose("Refreshing cached metadata"),U.removeData(_.text).removeData(_.value)},clearData:function(){z.verbose("Clearing metadata"),U.removeData(_.text).removeData(_.value),B.removeData(_.defaultText).removeData(_.defaultValue).removeData(_.placeholderText)},toggle:function(){z.verbose("Toggling menu visibility"),z.is.active()?z.hide():z.show()},show:function(n){if(n=e.isFunction(n)?n:function(){},z.can.show()&&!z.is.active()){if(z.debug("Showing dropdown"),!z.has.message()||z.has.maxSelections()||z.has.allResultsFiltered()||z.remove.message(),z.is.allFiltered())return!0;!1!==T.onShow.call(K)&&z.animate.show(function(){z.can.click()&&z.bind.intent(),t.navigator.userAgent.indexOf("MSIE ")>0||navigator.userAgent.match(/Trident.*rv\:11\./)||z.has.menuSearch()&&z.focusSearch(),z.set.visible(),n.call(K)})}},hide:function(t){t=e.isFunction(t)?t:function(){},z.is.active()&&(z.debug("Hiding dropdown"),!1!==T.onHide.call(K)&&z.animate.hide(function(){z.remove.visible(),t.call(K)}))},hideOthers:function(){z.verbose("Finding other dropdowns to hide"),r.not(B).has(N.menu+"."+x.visible).dropdown("hide")},hideMenu:function(){z.verbose("Hiding menu  instantaneously"),z.remove.active(),z.remove.visible(),H.transition("hide")},hideSubMenus:function(){var e=H.children(N.item).find(N.menu);z.verbose("Hiding sub menus",e),e.transition("hide")},bind:{events:function(){l&&z.bind.touchEvents(),z.bind.keyboardEvents(),z.bind.inputEvents(),z.bind.mouseEvents()},touchEvents:function(){z.debug("Touch device detected binding additional touch events"),z.is.searchSelection()||z.is.single()&&B.on("touchstart"+W,z.event.test.toggle),H.on("touchstart"+W,N.item,z.event.item.mouseenter)},keyboardEvents:function(){z.verbose("Binding keyboard events"),B.on("keydown"+W,z.event.keydown),z.has.search()&&B.on(z.get.inputEvent()+W,N.search,z.event.input),z.is.multiple()&&s.on("keydown"+M,z.event.document.keydown)},inputEvents:function(){z.verbose("Binding input change events"),B.on("change"+W,N.input,z.event.change)},mouseEvents:function(){z.verbose("Binding mouse events"),z.is.multiple()&&B.on("click"+W,N.label,z.event.label.click).on("click"+W,N.remove,z.event.remove.click),z.is.searchSelection()?(B.on("mousedown"+W,z.event.mousedown).on("mouseup"+W,z.event.mouseup).on("mousedown"+W,N.menu,z.event.menu.mousedown).on("mouseup"+W,N.menu,z.event.menu.mouseup).on("click"+W,N.icon,z.event.icon.click).on("focus"+W,N.search,z.event.search.focus).on("click"+W,N.search,z.event.search.focus).on("blur"+W,N.search,z.event.search.blur).on("click"+W,N.text,z.event.text.focus),z.is.multiple()&&B.on("click"+W,z.event.click)):("click"==T.on?B.on("click"+W,N.icon,z.event.icon.click).on("click"+W,z.event.test.toggle):"hover"==T.on?B.on("mouseenter"+W,z.delay.show).on("mouseleave"+W,z.delay.hide):B.on(T.on+W,z.toggle),B.on("mousedown"+W,z.event.mousedown).on("mouseup"+W,z.event.mouseup).on("focus"+W,z.event.focus).on("blur"+W,z.event.blur)),H.on("mouseenter"+W,N.item,z.event.item.mouseenter).on("mouseleave"+W,N.item,z.event.item.mouseleave).on("click"+W,N.item,z.event.item.click)},intent:function(){z.verbose("Binding hide intent event to document"),l&&s.on("touchstart"+M,z.event.test.touch).on("touchmove"+M,z.event.test.touch),s.on("click"+M,z.event.test.hide)}},unbind:{intent:function(){z.verbose("Removing hide intent event from document"),l&&s.off("touchstart"+M).off("touchmove"+M),s.off("click"+M)}},filter:function(e){var t=e!==i?e:z.get.query(),n=function(){z.is.multiple()&&z.filterActive(),z.select.firstUnfiltered(),z.has.allResultsFiltered()?T.onNoResults.call(K,t)?T.allowAdditions?T.hideAdditions&&(z.verbose("User addition with no menu, setting empty style"),z.set.empty(),z.hideMenu()):(z.verbose("All items filtered, showing message",t),z.add.message(O.noResults)):(z.verbose("All items filtered, hiding dropdown",t),z.hideMenu()):(z.remove.empty(),z.remove.message()),T.allowAdditions&&z.add.userSuggestion(e),z.is.searchSelection()&&z.can.show()&&z.is.focusedOnSearch()&&z.show()};T.useLabels&&z.has.maxSelections()||(T.apiSettings?z.can.useAPI()?z.queryRemote(t,function(){n()}):z.error(q.noAPI):(z.filterItems(t),n()))},queryRemote:function(t,n){var i={errorDuration:!1,cache:"local",throttle:T.throttle,urlData:{query:t},onError:function(){z.add.message(O.serverError),n()},onFailure:function(){z.add.message(O.serverError),n()},onSuccess:function(e){z.remove.message(),z.setup.menu({values:e[C.remoteValues]}),n()}};B.api("get request")||z.setup.api(),i=e.extend(!0,{},i,T.apiSettings),B.api("setting",i).api("query")},filterItems:function(t){if(!T.disableLocalSearch){var n=t!==i?t:z.get.query(),o=null,a=z.escape.regExp(n),r=new RegExp("^"+a,"igm");z.has.query()&&(o=[],z.verbose("Searching for matching values",n),U.each(function(){var t,i,a=e(this);if("both"==T.match||"text"==T.match){if(-1!==(t=String(z.get.choiceText(a,!1))).search(r))return o.push(this),!0;if("exact"===T.fullTextSearch&&z.exactSearch(n,t))return o.push(this),!0;if(!0===T.fullTextSearch&&z.fuzzySearch(n,t))return o.push(this),!0}if("both"==T.match||"value"==T.match){if(-1!==(i=String(z.get.choiceValue(a,t))).search(r))return o.push(this),!0;if(T.fullTextSearch&&z.fuzzySearch(n,i))return o.push(this),!0}})),z.debug("Showing only matched items",n),z.remove.filteredItem(),o&&U.not(o).addClass(x.filtered)}},fuzzySearch:function(e,t){var n=t.length,i=e.length;if(e=e.toLowerCase(),t=t.toLowerCase(),i>n)return!1;if(i===n)return e===t;e:for(var o=0,a=0;o<i;o++){for(var r=e.charCodeAt(o);a<n;)if(t.charCodeAt(a++)===r)continue e;return!1}return!0},exactSearch:function(e,t){return e=e.toLowerCase(),(t=t.toLowerCase()).indexOf(e)>-1},filterActive:function(){T.useLabels&&U.filter("."+x.active).addClass(x.filtered)},focusSearch:function(e){z.has.search()&&!z.is.focusedOnSearch()&&(e?(B.off("focus"+W,N.search),$.focus(),B.on("focus"+W,N.search,z.event.search.focus)):$.focus())},forceSelection:function(){var e=U.not(x.filtered).filter("."+x.selected).eq(0),t=U.not(x.filtered).filter("."+x.active).eq(0),n=e.length>0?e:t;if(n.length>0)return z.debug("Forcing partial selection to selected item",n),void z.event.item.click.call(n,{},!0);T.allowAdditions?(z.set.selected(z.get.query()),z.remove.searchTerm()):z.remove.searchTerm()},event:{change:function(){G||(z.debug("Input changed, updating selection"),z.set.selected())},focus:function(){T.showOnFocus&&!V&&z.is.hidden()&&!b&&z.show()},blur:function(){b=n.activeElement===this,V||b||(z.remove.activeLabel(),z.hide())},mousedown:function(){z.is.searchSelection()?v=!0:V=!0},mouseup:function(){z.is.searchSelection()?v=!1:V=!1},click:function(t){e(t.target).is(B)&&(z.is.focusedOnSearch()?z.show():z.focusSearch())},search:{focus:function(){V=!0,z.is.multiple()&&z.remove.activeLabel(),T.showOnFocus&&z.search()},blur:function(){b=n.activeElement===this,v||Y||b||(T.forceSelection&&z.forceSelection(),z.hide()),v=!1}},icon:{click:function(){z.toggle()}},text:{focus:function(){V=!0,z.focusSearch()}},input:function(){(z.is.multiple()||z.is.searchSelection())&&z.set.filtered(),clearTimeout(z.timer),z.timer=setTimeout(z.search,T.delay.search)},label:{click:function(t){var n=e(this),i=B.find(N.label),o=i.filter("."+x.active),a=n.nextAll("."+x.active),r=n.prevAll("."+x.active),s=a.length>0?n.nextUntil(a).add(o).add(n):n.prevUntil(r).add(o).add(n);t.shiftKey?(o.removeClass(x.active),s.addClass(x.active)):t.ctrlKey?n.toggleClass(x.active):(o.removeClass(x.active),n.addClass(x.active)),T.onLabelSelect.apply(this,i.filter("."+x.active))}},remove:{click:function(){var t=e(this).parent();t.hasClass(x.active)?z.remove.activeLabels():z.remove.activeLabels(t)}},test:{toggle:function(e){var t=z.is.multiple()?z.show:z.toggle;z.is.bubbledLabelClick(e)||z.is.bubbledIconClick(e)||z.determine.eventOnElement(e,t)&&e.preventDefault()},touch:function(e){z.determine.eventOnElement(e,function(){"touchstart"==e.type?z.timer=setTimeout(function(){z.hide()},T.delay.touch):"touchmove"==e.type&&clearTimeout(z.timer)}),e.stopPropagation()},hide:function(e){z.determine.eventInModule(e,z.hide)}},select:{mutation:function(){z.debug("<select> modified, recreating menu"),z.setup.select()}},menu:{mutation:function(t){var n=t[0],i=n.addedNodes?e(n.addedNodes[0]):e(!1),o=n.removedNodes?e(n.removedNodes[0]):e(!1),a=i.add(o),r=a.is(N.addition)||a.closest(N.addition).length>0,s=a.is(N.message)||a.closest(N.message).length>0;r||s?(z.debug("Updating item selector cache"),z.refreshItems()):(z.debug("Menu modified, updating selector cache"),z.refresh())},mousedown:function(){Y=!0},mouseup:function(){Y=!1}},item:{mouseenter:function(t){var n=e(t.target),i=e(this),o=i.children(N.menu),a=i.siblings(N.item).children(N.menu),r=o.length>0;!(o.find(n).length>0)&&r&&(clearTimeout(z.itemTimer),z.itemTimer=setTimeout(function(){z.verbose("Showing sub-menu",o),e.each(a,function(){z.animate.hide(!1,e(this))}),z.animate.show(!1,o)},T.delay.show),t.preventDefault())},mouseleave:function(){var t=e(this).children(N.menu);t.length>0&&(clearTimeout(z.itemTimer),z.itemTimer=setTimeout(function(){z.verbose("Hiding sub-menu",t),z.animate.hide(!1,t)},T.delay.hide))},click:function(t,n){var i=e(this),o=e(t?t.target:""),a=i.find(N.menu),r=z.get.choiceText(i),s=z.get.choiceValue(i,r),c=a.length>0;a.find(o).length>0||c&&!T.allowCategorySelection||(z.is.searchSelection()&&(T.allowAdditions&&z.remove.userAddition(),z.remove.searchTerm(),z.is.focusedOnSearch()||1==n||z.focusSearch(!0)),T.useLabels||(z.remove.filteredItem(),z.set.scrollPosition(i)),z.determine.selectAction.call(this,r,s))}},document:{keydown:function(e){var t=e.which;if(z.is.inObject(t,k)){var n=B.find(N.label),i=n.filter("."+x.active),o=(i.data(_.value),n.index(i)),a=n.length,r=i.length>0,s=i.length>1,c=0===o,l=o+1==a,u=z.is.searchSelection(),d=z.is.focusedOnSearch(),p=z.is.focused(),f=d&&0===z.get.caretPosition();if(u&&!r&&!d)return;t==k.leftArrow?!p&&!f||r?r&&(e.shiftKey?z.verbose("Adding previous label to selection"):(z.verbose("Selecting previous label"),n.removeClass(x.active)),c&&!s?i.addClass(x.active):i.prev(N.siblingLabel).addClass(x.active).end(),e.preventDefault()):(z.verbose("Selecting previous label"),n.last().addClass(x.active)):t==k.rightArrow?(p&&!r&&n.first().addClass(x.active),r&&(e.shiftKey?z.verbose("Adding next label to selection"):(z.verbose("Selecting next label"),n.removeClass(x.active)),l?u?d?n.removeClass(x.active):z.focusSearch():s?i.next(N.siblingLabel).addClass(x.active):i.addClass(x.active):i.next(N.siblingLabel).addClass(x.active),e.preventDefault())):t==k.deleteKey||t==k.backspace?r?(z.verbose("Removing active labels"),l&&u&&!d&&z.focusSearch(),i.last().next(N.siblingLabel).addClass(x.active),z.remove.activeLabels(i),e.preventDefault()):f&&!r&&t==k.backspace&&(z.verbose("Removing last label on input backspace"),i=n.last().addClass(x.active),z.remove.activeLabels(i)):i.removeClass(x.active)}}},keydown:function(e){var t=e.which;if(z.is.inObject(t,k)){var n,i=U.not(N.unselectable).filter("."+x.selected).eq(0),o=H.children("."+x.active).eq(0),a=i.length>0?i:o,r=a.length>0?a.siblings(":not(."+x.filtered+")").addBack():H.children(":not(."+x.filtered+")"),s=a.children(N.menu),c=a.closest(N.menu),l=c.hasClass(x.visible)||c.hasClass(x.animating)||c.parent(N.menu).length>0,u=s.length>0,d=a.length>0,p=a.not(N.unselectable).length>0,f=t==k.delimiter&&T.allowAdditions&&z.is.multiple();if(T.allowAdditions&&T.hideAdditions&&(t==k.enter||f)&&p&&(z.verbose("Selecting item from keyboard shortcut",a),z.event.item.click.call(a,e),z.is.searchSelection()&&z.remove.searchTerm()),z.is.visible()){if((t==k.enter||f)&&(t==k.enter&&d&&u&&!T.allowCategorySelection?(z.verbose("Pressed enter on unselectable category, opening sub menu"),t=k.rightArrow):p&&(z.verbose("Selecting item from keyboard shortcut",a),z.event.item.click.call(a,e),z.is.searchSelection()&&z.remove.searchTerm()),e.preventDefault()),d&&(t==k.leftArrow&&c[0]!==H[0]&&(z.verbose("Left key pressed, closing sub-menu"),z.animate.hide(!1,c),a.removeClass(x.selected),c.closest(N.item).addClass(x.selected),e.preventDefault()),t==k.rightArrow&&u&&(z.verbose("Right key pressed, opening sub-menu"),z.animate.show(!1,s),a.removeClass(x.selected),s.find(N.item).eq(0).addClass(x.selected),e.preventDefault())),t==k.upArrow){if(n=d&&l?a.prevAll(N.item+":not("+N.unselectable+")").eq(0):U.eq(0),r.index(n)<0)return z.verbose("Up key pressed but reached top of current menu"),void e.preventDefault();z.verbose("Up key pressed, changing active item"),a.removeClass(x.selected),n.addClass(x.selected),z.set.scrollPosition(n),T.selectOnKeydown&&z.is.single()&&z.set.selectedItem(n),e.preventDefault()}if(t==k.downArrow){if(0===(n=d&&l?n=a.nextAll(N.item+":not("+N.unselectable+")").eq(0):U.eq(0)).length)return z.verbose("Down key pressed but reached bottom of current menu"),void e.preventDefault();z.verbose("Down key pressed, changing active item"),U.removeClass(x.selected),n.addClass(x.selected),z.set.scrollPosition(n),T.selectOnKeydown&&z.is.single()&&z.set.selectedItem(n),e.preventDefault()}t==k.pageUp&&(z.scrollPage("up"),e.preventDefault()),t==k.pageDown&&(z.scrollPage("down"),e.preventDefault()),t==k.escape&&(z.verbose("Escape key pressed, closing dropdown"),z.hide())}else f&&e.preventDefault(),t!=k.downArrow||z.is.visible()||(z.verbose("Down key pressed, showing dropdown"),z.select.firstUnfiltered(),z.show(),e.preventDefault())}else z.has.search()||z.set.selectedLetter(String.fromCharCode(t))}},trigger:{change:function(){var e=n.createEvent("HTMLEvents"),t=I[0];t&&(z.verbose("Triggering native change event"),e.initEvent("change",!0,!1),t.dispatchEvent(e))}},determine:{selectAction:function(t,n){z.verbose("Determining action",T.action),e.isFunction(z.action[T.action])?(z.verbose("Triggering preset action",T.action,t,n),z.action[T.action].call(K,t,n,this)):e.isFunction(T.action)?(z.verbose("Triggering user action",T.action,t,n),T.action.call(K,t,n,this)):z.error(q.action,T.action)},eventInModule:function(t,i){var o=e(t.target),a=o.closest(n.documentElement).length>0,r=o.closest(B).length>0;return i=e.isFunction(i)?i:function(){},a&&!r?(z.verbose("Triggering event",i),i(),!0):(z.verbose("Event occurred in dropdown, canceling callback"),!1)},eventOnElement:function(t,i){var o=e(t.target),a=o.closest(N.siblingLabel),r=n.body.contains(t.target),s=0===B.find(a).length,c=0===o.closest(H).length;return i=e.isFunction(i)?i:function(){},r&&s&&c?(z.verbose("Triggering event",i),i(),!0):(z.verbose("Event occurred in dropdown menu, canceling callback"),!1)}},action:{nothing:function(){},activate:function(t,n,o){if(n=n!==i?n:t,z.can.activate(e(o))){if(z.set.selected(n,e(o)),z.is.multiple()&&!z.is.allFiltered())return;z.hideAndClear()}},select:function(t,n,o){if(n=n!==i?n:t,z.can.activate(e(o))){if(z.set.value(n,e(o)),z.is.multiple()&&!z.is.allFiltered())return;z.hideAndClear()}},combo:function(t,n,o){n=n!==i?n:t,z.set.selected(n,e(o)),z.hideAndClear()},hide:function(e,t){z.set.value(t,e),z.hideAndClear()}},get:{id:function(){return y},defaultText:function(){return B.data(_.defaultText)},defaultValue:function(){return B.data(_.defaultValue)},placeholderText:function(){return B.data(_.placeholderText)||""},text:function(){return X.text()},query:function(){return e.trim($.val())},searchWidth:function(e){return e=e!==i?e:$.val(),P.text(e),Math.ceil(P.width()+1)},selectionCount:function(){var t=z.get.values();return z.is.multiple()?e.isArray(t)?t.length:0:""!==z.get.value()?1:0},transition:function(e){return"auto"==T.transition?z.is.upward(e)?"slide up":"slide down":T.transition},userValues:function(){var t=z.get.values();return!!t&&(t=e.isArray(t)?t:[t],e.grep(t,function(e){return!1===z.get.item(e)}))},uniqueArray:function(t){return e.grep(t,function(n,i){return e.inArray(n,t)===i})},caretPosition:function(){var e,t,i=$.get(0);return"selectionStart"in i?i.selectionStart:n.selection?(i.focus(),t=(e=n.selection.createRange()).text.length,e.moveStart("character",-i.value.length),e.text.length-t):void 0},value:function(){var t=I.length>0?I.val():B.data(_.value),n=e.isArray(t)&&1===t.length&&""===t[0];return t===i||n?"":t},values:function(){var e=z.get.value();return""===e?"":!z.has.selectInput()&&z.is.multiple()?"string"==typeof e?e.split(T.delimiter):"":e},remoteValues:function(){var t=z.get.values(),n=!1;return t&&("string"==typeof t&&(t=[t]),e.each(t,function(e,t){var i=z.read.remoteData(t);z.verbose("Restoring value from session data",i,t),i&&(n||(n={}),n[t]=i)})),n},choiceText:function(t,n){if(n=n!==i?n:T.preserveHTML,t)return t.find(N.menu).length>0&&(z.verbose("Retrieving text of element with sub-menu"),(t=t.clone()).find(N.menu).remove(),t.find(N.menuIcon).remove()),t.data(_.text)!==i?t.data(_.text):n?e.trim(t.html()):e.trim(t.text())},choiceValue:function(t,n){return n=n||z.get.choiceText(t),!!t&&(t.data(_.value)!==i?String(t.data(_.value)):"string"==typeof n?e.trim(n.toLowerCase()):String(n))},inputEvent:function(){var e=$[0];return!!e&&(e.oninput!==i?"input":e.onpropertychange!==i?"propertychange":"keyup")},selectValues:function(){var t={values:[]};return B.find("option").each(function(){var n=e(this),o=n.html(),a=n.attr("disabled"),r=n.attr("value")!==i?n.attr("value"):o;"auto"===T.placeholder&&""===r?t.placeholder=o:t.values.push({name:o,value:r,disabled:a})}),T.placeholder&&"auto"!==T.placeholder&&(z.debug("Setting placeholder value to",T.placeholder),t.placeholder=T.placeholder),T.sortSelect?(t.values.sort(function(e,t){return e.name>t.name?1:-1}),z.debug("Retrieved and sorted values from select",t)):z.debug("Retrieved values from select",t),t},activeItem:function(){return U.filter("."+x.active)},selectedItem:function(){var e=U.not(N.unselectable).filter("."+x.selected);return e.length>0?e:U.eq(0)},itemWithAdditions:function(e){var t=z.get.item(e),n=z.create.userChoice(e);return n&&n.length>0&&(t=t.length>0?t.add(n):n),t},item:function(t,n){var o,a,r=!1;return t=t!==i?t:z.get.values()!==i?z.get.values():z.get.text(),o=a?t.length>0:t!==i&&null!==t,a=z.is.multiple()&&e.isArray(t),n=""===t||0===t||(n||!1),o&&U.each(function(){var o=e(this),s=z.get.choiceText(o),c=z.get.choiceValue(o,s);if(null!==c&&c!==i)if(a)-1===e.inArray(String(c),t)&&-1===e.inArray(s,t)||(r=r?r.add(o):o);else if(n){if(z.verbose("Ambiguous dropdown value using strict type check",o,t),c===t||s===t)return r=o,!0}else if(String(c)==String(t)||s==t)return z.verbose("Found select item by value",c,t),r=o,!0}),r}},check:{maxSelections:function(e){return!T.maxSelections||((e=e!==i?e:z.get.selectionCount())>=T.maxSelections?(z.debug("Maximum selection count reached"),T.useLabels&&(U.addClass(x.filtered),z.add.message(O.maxSelections)),!0):(z.verbose("No longer at maximum selection count"),z.remove.message(),z.remove.filteredItem(),z.is.searchSelection()&&z.filterItems(),!1))}},restore:{defaults:function(){z.clear(),z.restore.defaultText(),z.restore.defaultValue()},defaultText:function(){var e=z.get.defaultText();e===z.get.placeholderText?(z.debug("Restoring default placeholder text",e),z.set.placeholderText(e)):(z.debug("Restoring default text",e),z.set.text(e))},placeholderText:function(){z.set.placeholderText()},defaultValue:function(){var e=z.get.defaultValue();e!==i&&(z.debug("Restoring default value",e),""!==e?(z.set.value(e),z.set.selected()):(z.remove.activeItem(),z.remove.selectedItem()))},labels:function(){T.allowAdditions&&(T.useLabels||(z.error(q.labels),T.useLabels=!0),z.debug("Restoring selected values"),z.create.userLabels()),z.check.maxSelections()},selected:function(){z.restore.values(),z.is.multiple()?(z.debug("Restoring previously selected values and labels"),z.restore.labels()):z.debug("Restoring previously selected values")},values:function(){z.set.initialLoad(),T.apiSettings&&T.saveRemoteData&&z.get.remoteValues()?z.restore.remoteValues():z.set.selected(),z.remove.initialLoad()},remoteValues:function(){var t=z.get.remoteValues();z.debug("Recreating selected from session data",t),t&&(z.is.single()?e.each(t,function(e,t){z.set.text(t)}):e.each(t,function(e,t){z.add.label(e,t)}))}},read:{remoteData:function(e){var n;if(t.Storage!==i)return(n=sessionStorage.getItem(e))!==i&&n;z.error(q.noStorage)}},save:{defaults:function(){z.save.defaultText(),z.save.placeholderText(),z.save.defaultValue()},defaultValue:function(){var e=z.get.value();z.verbose("Saving default value as",e),B.data(_.defaultValue,e)},defaultText:function(){var e=z.get.text();z.verbose("Saving default text as",e),B.data(_.defaultText,e)},placeholderText:function(){var e;!1!==T.placeholder&&X.hasClass(x.placeholder)&&(e=z.get.text(),z.verbose("Saving placeholder text as",e),B.data(_.placeholderText,e))},remoteData:function(e,n){t.Storage!==i?(z.verbose("Saving remote data to session storage",n,e),sessionStorage.setItem(n,e)):z.error(q.noStorage)}},clear:function(){z.is.multiple()&&T.useLabels?z.remove.labels():(z.remove.activeItem(),z.remove.selectedItem()),z.set.placeholderText(),z.clearValue()},clearValue:function(){z.set.value("")},scrollPage:function(e,t){var n,i,o=t||z.get.selectedItem(),a=o.closest(N.menu),r=a.outerHeight(),s=a.scrollTop(),c=U.eq(0).outerHeight(),l=Math.floor(r/c),u=(a.prop("scrollHeight"),"up"==e?s-c*l:s+c*l),d=U.not(N.unselectable);i="up"==e?d.index(o)-l:d.index(o)+l,(n=("up"==e?i>=0:i<d.length)?d.eq(i):"up"==e?d.first():d.last()).length>0&&(z.debug("Scrolling page",e,n),o.removeClass(x.selected),n.addClass(x.selected),T.selectOnKeydown&&z.is.single()&&z.set.selectedItem(n),a.scrollTop(u))},set:{filtered:function(){var e=z.is.multiple(),t=z.is.searchSelection(),n=e&&t,i=t?z.get.query():"",o="string"==typeof i&&i.length>0,a=z.get.searchWidth(),r=""!==i;e&&o&&(z.verbose("Adjusting input width",a,T.glyphWidth),$.css("width",a)),o||n&&r?(z.verbose("Hiding placeholder text"),X.addClass(x.filtered)):(!e||n&&!r)&&(z.verbose("Showing placeholder text"),X.removeClass(x.filtered))},empty:function(){B.addClass(x.empty)},loading:function(){B.addClass(x.loading)},placeholderText:function(e){e=e||z.get.placeholderText(),z.debug("Setting placeholder text",e),z.set.text(e),X.addClass(x.placeholder)},tabbable:function(){z.has.search()?(z.debug("Added tabindex to searchable dropdown"),$.val("").attr("tabindex",0),H.attr("tabindex",-1)):(z.debug("Added tabindex to dropdown"),B.attr("tabindex")===i&&(B.attr("tabindex",0),H.attr("tabindex",-1)))},initialLoad:function(){z.verbose("Setting initial load"),g=!0},activeItem:function(e){T.allowAdditions&&e.filter(N.addition).length>0?e.addClass(x.filtered):e.addClass(x.active)},partialSearch:function(e){var t=z.get.query().length;$.val(e.substr(0,t))},scrollPosition:function(e,t){var n,o,a,r,s,c,l=5;n=(e=e||z.get.selectedItem()).closest(N.menu),o=e&&e.length>0,t=t!==i&&t,e&&n.length>0&&o&&(e.position().top,n.addClass(x.loading),a=(r=n.scrollTop())-n.offset().top+e.offset().top,t||(c=r+n.height()<a+l,s=a-l<r),z.debug("Scrolling to active item",a),(t||s||c)&&n.scrollTop(a),n.removeClass(x.loading))},text:function(e){"select"!==T.action&&("combo"==T.action?(z.debug("Changing combo button text",e,F),T.preserveHTML?F.html(e):F.text(e)):(e!==z.get.placeholderText()&&X.removeClass(x.placeholder),z.debug("Changing text",e,X),X.removeClass(x.filtered),T.preserveHTML?X.html(e):X.text(e)))},selectedItem:function(e){var t=z.get.choiceValue(e),n=z.get.choiceText(e,!1);z.debug("Setting user selection to item",e),z.remove.activeItem(),z.set.partialSearch(n),z.set.activeItem(e),z.set.selected(t,e),z.set.text(n)},selectedLetter:function(t){var n,i=U.filter("."+x.selected),o=i.length>0&&z.has.firstLetter(i,t),a=!1;o&&(n=i.nextAll(U).eq(0),z.has.firstLetter(n,t)&&(a=n)),a||U.each(function(){if(z.has.firstLetter(e(this),t))return a=e(this),!1}),a&&(z.verbose("Scrolling to next value with letter",t),z.set.scrollPosition(a),i.removeClass(x.selected),a.addClass(x.selected),T.selectOnKeydown&&z.is.single()&&z.set.selectedItem(a))},direction:function(e){"auto"==T.direction?z.is.onScreen(e)?z.remove.upward(e):z.set.upward(e):"upward"==T.direction&&z.set.upward(e)},upward:function(e){(e||B).addClass(x.upward)},value:function(e,t,n){var o=z.escape.value(e),a=I.length>0,r=(z.has.value(e),z.get.values()),s=e!==i?String(e):e;if(a){if(!T.allowReselection&&s==r&&(z.verbose("Skipping value update already same value",e,r),!z.is.initialLoad()))return;z.is.single()&&z.has.selectInput()&&z.can.extendSelect()&&(z.debug("Adding user option",e),z.add.optionValue(e)),z.debug("Updating input value",o,r),G=!0,I.val(o),!1===T.fireOnInit&&z.is.initialLoad()?z.debug("Input native change event ignored on initial load"):z.trigger.change(),G=!1}else z.verbose("Storing value in metadata",o,I),o!==r&&B.data(_.value,s);!1===T.fireOnInit&&z.is.initialLoad()?z.verbose("No callback on initial load",T.onChange):T.onChange.call(K,e,t,n)},active:function(){B.addClass(x.active)},multiple:function(){B.addClass(x.multiple)},visible:function(){B.addClass(x.visible)},exactly:function(e,t){z.debug("Setting selected to exact values"),z.clear(),z.set.selected(e,t)},selected:function(t,n){var i=z.is.multiple();(n=T.allowAdditions?n||z.get.itemWithAdditions(t):n||z.get.item(t))&&(z.debug("Setting selected menu item to",n),z.is.multiple()&&z.remove.searchWidth(),z.is.single()?(z.remove.activeItem(),
DesignScreenshot/output/gitee_run/gitee.com_3_credentials_filled.html:370:regExp:{escape:/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,beginsWith:"(?:s|^)"},fields:{categories:"results",categoryName:"name",categoryResults:"results",description:"description",image:"image",price:"price",results:"results",title:"title",url:"url",action:"action",actionText:"text",actionURL:"url"},selector:{prompt:".prompt",searchButton:".search.button",results:".results",message:".results > .message",category:".category",result:".result",title:".title, .name"},templates:{escape:function(e){var t=/[&<>"'`]/g,n={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},i=function(e){return n[e]};return/[&<>"'`]/.test(e)?e.replace(t,i):e},message:function(e,t){var n="";return e!==i&&t!==i&&(n+='<div class="message '+t+'">',n+="empty"==t?'<div class="header">No Results</div class="header"><div class="description">'+e+'</div class="description">':' <div class="description">'+e+"</div>",n+="</div>"),n},category:function(t,n){var o="";e.fn.search.settings.templates.escape;return t[n.categoryResults]!==i&&(e.each(t[n.categoryResults],function(t,a){a[n.results]!==i&&a.results.length>0&&(o+='<div class="category">',a[n.categoryName]!==i&&(o+='<div class="name">'+a[n.categoryName]+"</div>"),o+='<div class="results">',e.each(a.results,function(e,t){t[n.url]?o+='<a class="result" href="'+t[n.url]+'">':o+='<a class="result">',t[n.image]!==i&&(o+='<div class="image"> <img src="'+t[n.image]+'"></div>'),o+='<div class="content">',t[n.price]!==i&&(o+='<div class="price">'+t[n.price]+"</div>"),t[n.title]!==i&&(o+='<div class="title">'+t[n.title]+"</div>"),t[n.description]!==i&&(o+='<div class="description">'+t[n.description]+"</div>"),o+="</div>",o+="</a>"}),o+="</div>",o+="</div>")}),t[n.action]&&(o+='<a href="'+t[n.action][n.actionURL]+'" class="action">'+t[n.action][n.actionText]+"</a>"),o)},standard:function(t,n){var o="";return t[n.results]!==i&&(e.each(t[n.results],function(e,t){t[n.url]?o+='<a class="result" href="'+t[n.url]+'">':o+='<a class="result">',t[n.image]!==i?o+='<div class="image"> <img src="'+t[n.image]+'"></div>':t[n.icon]!==i&&(o+='<div class="icon"> <i class="'+t[n.icon]+'"></i></div>'),o+='<div class="content">',t[n.price]!==i&&(o+='<div class="price">'+t[n.price]+"</div>"),t[n.title]!==i&&(o+='<div class="title">'+t[n.title]+"</div>"),t[n.description]!==i&&(o+='<div class="description">'+t[n.description]+"</div>"),o+="</div>",o+="</a>"}),t[n.action]&&(o+='<a href="'+t[n.action][n.actionURL]+'" class="action">'+t[n.action][n.actionText]+"</a>"),o)}}}}(jQuery,window,document),function(e,t,n,i){"use strict";t=void 0!==t&&t.Math==Math?t:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();e.api=e.fn.api=function(n){var o,a=e.isFunction(this)?e(t):e(this),r=a.selector||"",s=(new Date).getTime(),c=[],l=arguments[0],u="string"==typeof l,d=[].slice.call(arguments,1);return a.each(function(){var a,p,f,h,m,g,b=e.isPlainObject(n)?e.extend(!0,{},e.fn.api.settings,n):e.extend({},e.fn.api.settings),v=b.namespace,M=b.metadata,y=b.selector,A=b.error,w=b.className,z="."+v,T="module-"+v,x=e(this),O=x.closest(y.form),C=b.stateContext?e(b.stateContext):x,k=this,_=C[0],L=x.data(T);g={initialize:function(){u||g.bind.events(),g.instantiate()},instantiate:function(){g.verbose("Storing instance of module",g),L=g,x.data(T,L)},destroy:function(){g.verbose("Destroying previous module for",k),x.removeData(T).off(z)},bind:{events:function(){var e=g.get.event();e?(g.verbose("Attaching API events to element",e),x.on(e+z,g.event.trigger)):"now"==b.on&&(g.debug("Querying API endpoint immediately"),g.query())}},decode:{json:function(e){if(e!==i&&"string"==typeof e)try{e=JSON.parse(e)}catch(t){}return e}},read:{cachedResponse:function(e){var n;if(t.Storage!==i)return n=sessionStorage.getItem(e),g.debug("Using cached response",e,n),n=g.decode.json(n);g.error(A.noStorage)}},write:{cachedResponse:function(n,o){o&&""===o?g.debug("Response empty, not caching",o):t.Storage!==i?(e.isPlainObject(o)&&(o=JSON.stringify(o)),sessionStorage.setItem(n,o),g.verbose("Storing cached response for url",n,o)):g.error(A.noStorage)}},query:function(){if(g.is.disabled())g.debug("Element is disabled API request aborted");else{if(g.is.loading()){if(!b.interruptRequests)return void g.debug("Cancelling request, previous request is still pending");g.debug("Interrupting previous request"),g.abort()}if(b.defaultData&&e.extend(!0,b.urlData,g.get.defaultData()),b.serializeForm&&(b.data=g.add.formData(b.data)),!1===(p=g.get.settings()))return g.cancelled=!0,void g.error(A.beforeSend);if(g.cancelled=!1,(f=g.get.templatedURL())||g.is.mocked()){if((f=g.add.urlData(f))||g.is.mocked()){if(p.url=b.base+f,a=e.extend(!0,{},b,{type:b.method||b.type,data:h,url:b.base+f,beforeSend:b.beforeXHR,success:function(){},failure:function(){},complete:function(){}}),g.debug("Querying URL",a.url),g.verbose("Using AJAX settings",a),"local"===b.cache&&g.read.cachedResponse(f))return g.debug("Response returned from local cache"),g.request=g.create.request(),void g.request.resolveWith(_,[g.read.cachedResponse(f)]);b.throttle?b.throttleFirstRequest||g.timer?(g.debug("Throttling request",b.throttle),clearTimeout(g.timer),g.timer=setTimeout(function(){g.timer&&delete g.timer,g.debug("Sending throttled request",h,a.method),g.send.request()},b.throttle)):(g.debug("Sending request",h,a.method),g.send.request(),g.timer=setTimeout(function(){},b.throttle)):(g.debug("Sending request",h,a.method),g.send.request())}}else g.error(A.missingURL)}},should:{removeError:function(){return!0===b.hideError||"auto"===b.hideError&&!g.is.form()}},is:{disabled:function(){return x.filter(y.disabled).length>0},expectingJSON:function(){return"json"===b.dataType||"jsonp"===b.dataType},form:function(){return x.is("form")||C.is("form")},mocked:function(){return b.mockResponse||b.mockResponseAsync||b.response||b.responseAsync},input:function(){return x.is("input")},loading:function(){return!!g.request&&"pending"==g.request.state()},abortedRequest:function(e){return e&&e.readyState!==i&&0===e.readyState?(g.verbose("XHR request determined to be aborted"),!0):(g.verbose("XHR request was not aborted"),!1)},validResponse:function(t){return g.is.expectingJSON()&&e.isFunction(b.successTest)?(g.debug("Checking JSON returned success",b.successTest,t),b.successTest(t)?(g.debug("Response passed success test",t),!0):(g.debug("Response failed success test",t),!1)):(g.verbose("Response is not JSON, skipping validation",b.successTest,t),!0)}},was:{cancelled:function(){return g.cancelled||!1},succesful:function(){return g.request&&"resolved"==g.request.state()},failure:function(){return g.request&&"rejected"==g.request.state()},complete:function(){return g.request&&("resolved"==g.request.state()||"rejected"==g.request.state())}},add:{urlData:function(t,n){var o,a;return t&&(o=t.match(b.regExp.required),a=t.match(b.regExp.optional),n=n||b.urlData,o&&(g.debug("Looking for required URL variables",o),e.each(o,function(o,a){var r=-1!==a.indexOf("$")?a.substr(2,a.length-3):a.substr(1,a.length-2),s=e.isPlainObject(n)&&n[r]!==i?n[r]:x.data(r)!==i?x.data(r):C.data(r)!==i?C.data(r):n[r];if(s===i)return g.error(A.requiredParameter,r,t),t=!1,!1;g.verbose("Found required variable",r,s),s=b.encodeParameters?g.get.urlEncodedValue(s):s,t=t.replace(a,s)})),a&&(g.debug("Looking for optional URL variables",o),e.each(a,function(o,a){var r=-1!==a.indexOf("$")?a.substr(3,a.length-4):a.substr(2,a.length-3),s=e.isPlainObject(n)&&n[r]!==i?n[r]:x.data(r)!==i?x.data(r):C.data(r)!==i?C.data(r):n[r];s!==i?(g.verbose("Optional variable Found",r,s),t=t.replace(a,s)):(g.verbose("Optional variable not found",r),t=-1!==t.indexOf("/"+a)?t.replace("/"+a,""):t.replace(a,""))}))),t},formData:function(t){var n=e.fn.serializeObject!==i,o=n?O.serializeObject():O.serialize();return t=t||b.data,e.isPlainObject(t)?n?(g.debug("Extending existing data with form data",t,o),t=e.extend(!0,{},t,o)):(g.error(A.missingSerialize),g.debug("Cant extend data. Replacing data with form data",t,o),t=o):(g.debug("Adding form data",o),t=o),t}},send:{request:function(){g.set.loading(),g.request=g.create.request(),g.is.mocked()?g.mockedXHR=g.create.mockedXHR():g.xhr=g.create.xhr(),b.onRequest.call(_,g.request,g.xhr)}},event:{trigger:function(e){g.query(),"submit"!=e.type&&"click"!=e.type||e.preventDefault()},xhr:{always:function(){},done:function(t,n,i){var o=this,a=(new Date).getTime()-m,r=b.loadingDuration-a,s=!!e.isFunction(b.onResponse)&&(g.is.expectingJSON()?b.onResponse.call(o,e.extend(!0,{},t)):b.onResponse.call(o,t));r=r>0?r:0,s&&(g.debug("Modified API response in onResponse callback",b.onResponse,s,t),t=s),r>0&&g.debug("Response completed early delaying state change by",r),setTimeout(function(){g.is.validResponse(t)?g.request.resolveWith(o,[t,i]):g.request.rejectWith(o,[i,"invalid"])},r)},fail:function(e,t,n){var i=this,o=(new Date).getTime()-m,a=b.loadingDuration-o;(a=a>0?a:0)>0&&g.debug("Response completed early delaying state change by",a),setTimeout(function(){g.is.abortedRequest(e)?g.request.rejectWith(i,[e,"aborted",n]):g.request.rejectWith(i,[e,"error",t,n])},a)}},request:{done:function(e,t){g.debug("Successful API Response",e),"local"===b.cache&&f&&(g.write.cachedResponse(f,e),g.debug("Saving server response locally",g.cache)),b.onSuccess.call(_,e,x,t)},complete:function(e,t){var n,i;g.was.succesful()?(i=e,n=t):(n=e,i=g.get.responseFromXHR(n)),g.remove.loading(),b.onComplete.call(_,i,x,n)},fail:function(e,t,n){var o=g.get.responseFromXHR(e),r=g.get.errorFromRequest(o,t,n);if("aborted"==t)return g.debug("XHR Aborted (Most likely caused by page navigation or CORS Policy)",t,n),b.onAbort.call(_,t,x,e),!0;"invalid"==t?g.debug("JSON did not pass success test. A server-side error has most likely occurred",o):"error"==t&&e!==i&&(g.debug("XHR produced a server error",t,n),200!=e.status&&n!==i&&""!==n&&g.error(A.statusMessage+n,a.url),b.onError.call(_,r,x,e)),b.errorDuration&&"aborted"!==t&&(g.debug("Adding error state"),g.set.error(),g.should.removeError()&&setTimeout(g.remove.error,b.errorDuration)),g.debug("API Request failed",r,e),b.onFailure.call(_,o,x,e)}}},create:{request:function(){return e.Deferred().always(g.event.request.complete).done(g.event.request.done).fail(g.event.request.fail)},mockedXHR:function(){var t,n,i,o=!1,a=!1,r=!1,s=b.mockResponse||b.response,c=b.mockResponseAsync||b.responseAsync;return i=e.Deferred().always(g.event.xhr.complete).done(g.event.xhr.done).fail(g.event.xhr.fail),s?(e.isFunction(s)?(g.debug("Using specified synchronous callback",s),n=s.call(_,p)):(g.debug("Using settings specified response",s),n=s),i.resolveWith(_,[n,o,{responseText:n}])):e.isFunction(c)&&(t=function(e){g.debug("Async callback returned response",e),e?i.resolveWith(_,[e,o,{responseText:e}]):i.rejectWith(_,[{responseText:e},a,r])},g.debug("Using specified async response callback",c),c.call(_,p,t)),i},xhr:function(){var t;return t=e.ajax(a).always(g.event.xhr.always).done(g.event.xhr.done).fail(g.event.xhr.fail),g.verbose("Created server request",t,a),t}},set:{error:function(){g.verbose("Adding error state to element",C),C.addClass(w.error)},loading:function(){g.verbose("Adding loading state to element",C),C.addClass(w.loading),m=(new Date).getTime()}},remove:{error:function(){g.verbose("Removing error state from element",C),C.removeClass(w.error)},loading:function(){g.verbose("Removing loading state from element",C),C.removeClass(w.loading)}},get:{responseFromXHR:function(t){return!!e.isPlainObject(t)&&(g.is.expectingJSON()?g.decode.json(t.responseText):t.responseText)},errorFromRequest:function(t,n,o){return e.isPlainObject(t)&&t.error!==i?t.error:b.error[n]!==i?b.error[n]:o},request:function(){return g.request||!1},xhr:function(){return g.xhr||!1},settings:function(){var t;return(t=b.beforeSend.call(_,b))&&(t.success!==i&&(g.debug("Legacy success callback detected",t),g.error(A.legacyParameters,t.success),t.onSuccess=t.success),t.failure!==i&&(g.debug("Legacy failure callback detected",t),g.error(A.legacyParameters,t.failure),t.onFailure=t.failure),t.complete!==i&&(g.debug("Legacy complete callback detected",t),g.error(A.legacyParameters,t.complete),t.onComplete=t.complete)),t===i&&g.error(A.noReturnedValue),!1===t?t:t!==i?e.extend(!0,{},t):e.extend(!0,{},b)},urlEncodedValue:function(e){var n=t.decodeURIComponent(e),i=t.encodeURIComponent(e);return n!==e?(g.debug("URL value is already encoded, avoiding double encoding",e),e):(g.verbose("Encoding value using encodeURIComponent",e,i),i)},defaultData:function(){var t={};return e.isWindow(k)||(g.is.input()?t.value=x.val():g.is.form()||(t.text=x.text())),t},event:function(){return e.isWindow(k)||"now"==b.on?(g.debug("API called without element, no events attached"),!1):"auto"==b.on?x.is("input")?k.oninput!==i?"input":k.onpropertychange!==i?"propertychange":"keyup":x.is("form")?"submit":"click":b.on},templatedURL:function(e){if(e=e||x.data(M.action)||b.action||!1,f=x.data(M.url)||b.url||!1)return g.debug("Using specified url",f),f;if(e){if(g.debug("Looking up url for action",e,b.api),b.api[e]===i&&!g.is.mocked())return void g.error(A.missingAction,b.action,b.api);f=b.api[e]}else g.is.form()&&(f=x.attr("action")||C.attr("action")||!1,g.debug("No url or action specified, defaulting to form action",f));return f}},abort:function(){var e=g.get.xhr();e&&"resolved"!==e.state()&&(g.debug("Cancelling API request"),e.abort())},reset:function(){g.remove.error(),g.remove.loading()},setting:function(t,n){if(g.debug("Changing setting",t,n),e.isPlainObject(t))e.extend(!0,b,t);else{if(n===i)return b[t];e.isPlainObject(b[t])?e.extend(!0,b[t],n):b[t]=n}},internal:function(t,n){if(e.isPlainObject(t))e.extend(!0,g,t);else{if(n===i)return g[t];g[t]=n}},debug:function(){!b.silent&&b.debug&&(b.performance?g.performance.log(arguments):(g.debug=Function.prototype.bind.call(console.info,console,b.name+":"),g.debug.apply(console,arguments)))},verbose:function(){!b.silent&&b.verbose&&b.debug&&(b.performance?g.performance.log(arguments):(g.verbose=Function.prototype.bind.call(console.info,console,b.name+":"),g.verbose.apply(console,arguments)))},error:function(){b.silent||(g.error=Function.prototype.bind.call(console.error,console,b.name+":"),g.error.apply(console,arguments))},performance:{log:function(e){var t,n;b.performance&&(n=(t=(new Date).getTime())-(s||t),s=t,c.push({Name:e[0],Arguments:[].slice.call(e,1)||"","Execution Time":n})),clearTimeout(g.performance.timer),g.performance.timer=setTimeout(g.performance.display,500)},display:function(){var t=b.name+":",n=0;s=!1,clearTimeout(g.performance.timer),e.each(c,function(e,t){n+=t["Execution Time"]}),t+=" "+n+"ms",r&&(t+=" '"+r+"'"),(console.group!==i||console.table!==i)&&c.length>0&&(console.groupCollapsed(t),console.table?console.table(c):e.each(c,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),c=[]}},invoke:function(t,n,a){var r,s,c,l=L;return n=n||d,a=k||a,"string"==typeof t&&l!==i&&(t=t.split(/[\. ]/),r=t.length-1,e.each(t,function(n,o){var a=n!=r?o+t[n+1].charAt(0).toUpperCase()+t[n+1].slice(1):t;if(e.isPlainObject(l[a])&&n!=r)l=l[a];else{if(l[a]!==i)return s=l[a],!1;if(!e.isPlainObject(l[o])||n==r)return l[o]!==i?(s=l[o],!1):(g.error(A.method,t),!1);l=l[o]}})),e.isFunction(s)?c=s.apply(a,n):s!==i&&(c=s),e.isArray(o)?o.push(c):o!==i?o=[o,c]:c!==i&&(o=c),s}},u?(L===i&&g.initialize(),g.invoke(l)):(L!==i&&L.invoke("destroy"),g.initialize())}),o!==i?o:this},e.api.settings={name:"API",namespace:"api",debug:!1,verbose:!1,performance:!0,api:{},cache:!0,interruptRequests:!0,on:"auto",stateContext:!1,loadingDuration:0,hideError:"auto",errorDuration:2e3,encodeParameters:!0,action:!1,url:!1,base:"",urlData:{},defaultData:!0,serializeForm:!1,throttle:0,throttleFirstRequest:!0,method:"get",data:{},dataType:"json",mockResponse:!1,mockResponseAsync:!1,response:!1,responseAsync:!1,beforeSend:function(e){return e},beforeXHR:function(){},onRequest:function(){},onResponse:!1,onSuccess:function(){},onComplete:function(){},onFailure:function(){},onError:function(){},onAbort:function(){},successTest:!1,error:{beforeSend:"The before send function has aborted the request",error:"There was an error with your request",exitConditions:"API Request Aborted. Exit conditions met",JSONParse:"JSON could not be parsed during error handling",legacyParameters:"You are using legacy API success callback names",method:"The method you called is not defined",missingAction:"API action used but no url was defined",missingSerialize:"jquery-serialize-object is required to add form data to an existing data object",missingURL:"No URL specified for api event",noReturnedValue:"The beforeSend callback must return a settings object, beforeSend ignored.",noStorage:"Caching responses locally requires session storage",parseError:"There was an error parsing your request",requiredParameter:"Missing a required URL parameter: ",statusMessage:"Server gave an error: ",timeout:"Your request timed out"},regExp:{required:/\{\$*[A-z0-9]+\}/g,optional:/\{\/\$*[A-z0-9]+\}/g},className:{loading:"loading",error:"error"},selector:{disabled:".disabled",form:"form"},metadata:{action:"action",url:"url"}}}(jQuery,window,document),function(e,t,n,i){"use strict";e.tab=e.fn.tab=function(n){var o,a,r=e.isFunction(this)?e(t):e(this),s=e.isPlainObject(n)?e.extend(!0,{},e.fn.tab.settings,n):e.extend({},e.fn.tab.settings),c=r.selector||"",l=(new Date).getTime(),u=[],d=arguments[0],p="string"==typeof d,f=[].slice.call(arguments,1);return r.each(function(){var n,h,m,g,b,v=s.className,M=s.metadata,y=s.selector,A=s.error,w="."+s.namespace,z="module-"+s.namespace,T=e(this),x={},O=!0,C=0,k=this,_=T.data(z);o={initialize:function(){o.debug("Initializing tab menu item",T),o.determineTabs(),o.debug("Determining tabs",s.context,h),s.auto&&(o.verbose("Setting up automatic tab retrieval from server"),s.apiSettings={url:s.path+"/{$tab}"}),e.isWindow(k)||(o.debug("Attaching tab activation events to element",T),T.on("click"+w,o.event.click)),o.instantiate()},determineTabs:function(){var t;"parent"===s.context?(T.closest(y.ui).size()>0?(t=T.closest(y.ui),o.verbose("Using closest UI element for determining parent",t)):t=T,n=t.parent(),o.verbose("Determined parent element for creating context",n)):s.context?(n=e(s.context),o.verbose("Using selector for tab context",s.context,n)):n=e("body"),s.childrenOnly?(h=n.children(y.tabs),o.debug("Searching tab context children for tabs",n,h)):(h=n.find(y.tabs),o.debug("Searching tab context for tabs",n,h))},initializeHistory:function(){if(s.history){if(o.debug("Initializing page state"),e.address===i)return o.error(A.state),!1;if("state"==s.historyType){if(o.debug("Using HTML5 to manage state"),!1===s.path)return o.error(A.path),!1;e.address.history(!0).state(s.path)}e.address.bind("change",o.event.history.change)}},instantiate:function(){o.verbose("Storing instance of module",o),T.data(z,o)},destroy:function(){o.debug("Destroying tabs",T),T.removeData(z).off(w)},event:{click:function(t){var n=e(this).data(M.tab);n!==i?(s.history?(o.verbose("Updating page state",t),e.address.value(n)):(o.verbose("Changing tab",t),o.changeTab(n)),t.preventDefault()):o.debug("No tab specified")},history:{change:function(t){var n=t.pathNames.join("/")||o.get.initialPath(),a=s.templates.determineTitle(n)||!1;o.performance.display(),o.debug("History change event",n,t),b=t,n!==i&&o.changeTab(n),a&&e.address.title(a)}}},refresh:function(){m&&(o.debug("Refreshing tab",m),o.changeTab(m))},cache:{read:function(e){return e!==i&&x[e]},add:function(e,t){e=e||m,o.debug("Adding cached content for",e),x[e]=t},remove:function(e){e=e||m,o.debug("Removing cached content for",e),delete x[e]}},set:{state:function(t){e.address.value(t)}},changeTab:function(i){var a=t.history&&t.history.pushState&&s.ignoreFirstLoad&&O,r=s.auto||e.isPlainObject(s.apiSettings),c=r&&!a?o.utilities.pathToArray(i):o.get.defaultPathArray(i);i=o.utilities.arrayToPath(c),e.each(c,function(t,l){var u,d,p,f,h=c.slice(0,t+1),v=o.utilities.arrayToPath(h),M=o.is.tab(v),y=t+1==c.length,w=o.get.tabElement(v);if(o.verbose("Looking for tab",l),M){if(o.verbose("Tab was found",l),m=v,g=o.utilities.filterArray(c,h),y?f=!0:(d=c.slice(0,t+2),p=o.utilities.arrayToPath(d),(f=!o.is.tab(p))&&o.verbose("Tab parameters found",d)),f&&r)return a?(o.debug("Ignoring remote content on first tab load",v),O=!1,o.cache.add(i,w.html()),o.activate.all(v),e.proxy(s.onTabInit,w)(v,g,b),e.proxy(s.onTabLoad,w)(v,g,b)):(o.activate.navigation(v),o.content.fetch(v,i)),!1;o.debug("Opened local tab",v),o.activate.all(v),o.cache.read(v)||(o.cache.add(v,!0),o.debug("First time tab loaded calling tab init"),e.proxy(s.onTabInit,w)(v,g,b)),e.proxy(s.onTabLoad,w)(v,g,b)}else{if(-1!=i.search("/"))return o.error(A.missingTab,T,n,v),!1;if(v=(u=e("#"+i+', a[name="'+i+'"]')).closest("[data-tab]").data("tab"),w=o.get.tabElement(v),u&&u.size()>0&&v)return o.debug("No tab found, but deep anchor link present, opening parent tab"),o.activate.all(v),o.cache.read(v)||(o.cache.add(v,!0),o.debug("First time tab loaded calling tab init"),e.proxy(s.onTabInit,w)(v,g,b)),!1}})},content:{fetch:function(t,n){var a,r,c=o.get.tabElement(t),l={dataType:"html",stateContext:c,onSuccess:function(i){o.cache.add(n,i),o.content.update(t,i),t==m?(o.debug("Content loaded",t),o.activate.tab(t)):o.debug("Content loaded in background",t),e.proxy(s.onTabInit,c)(t,g,b),e.proxy(s.onTabLoad,c)(t,g,b)},urlData:{tab:n}},u=c.data(M.promise)||!1,d=u&&"pending"===u.state();n=n||t,r=o.cache.read(n),s.cache&&r?(o.debug("Showing existing content",n),o.content.update(t,r),o.activate.tab(t),e.proxy(s.onTabLoad,c)(t,g,b)):d?(o.debug("Content is already loading",n),c.addClass(v.loading)):e.api!==i?(a=e.extend(!0,{headers:{"X-Remote":!0}},s.apiSettings,l),o.debug("Retrieving remote content",n,a),e.api(a)):o.error(A.api)},update:function(e,t){o.debug("Updating html for",e),o.get.tabElement(e).html(t)}},activate:{all:function(e){o.activate.tab(e),o.activate.navigation(e)},tab:function(e){var t=o.get.tabElement(e);o.verbose("Showing tab content for",t),t.addClass(v.active).siblings(h).removeClass(v.active+" "+v.loading)},navigation:function(e){var t=o.get.navElement(e);o.verbose("Activating tab navigation for",t,e),t.addClass(v.active).siblings(r).removeClass(v.active+" "+v.loading)}},deactivate:{all:function(){o.deactivate.navigation(),o.deactivate.tabs()},navigation:function(){r.removeClass(v.active)},tabs:function(){h.removeClass(v.active+" "+v.loading)}},is:{tab:function(e){return e!==i&&o.get.tabElement(e).size()>0}},get:{initialPath:function(){return r.eq(0).data(M.tab)||h.eq(0).data(M.tab)},path:function(){return e.address.value()},defaultPathArray:function(e){return o.utilities.pathToArray(o.get.defaultPath(e))},defaultPath:function(e){var t=r.filter("[data-"+M.tab+'^="'+e+'/"]').eq(0).data(M.tab)||!1;if(t){if(o.debug("Found default tab",t),C<s.maxDepth)return C++,o.get.defaultPath(t);o.error(A.recursion)}else o.debug("No default tabs found for",e,h);return C=0,e},navElement:function(e){return e=e||m,r.filter("[data-"+M.tab+'="'+e+'"]')},tabElement:function(e){var t,n,i,a;return e=e||m,i=o.utilities.pathToArray(e),a=o.utilities.last(i),t=h.filter("[data-"+M.tab+'="'+a+'"]'),n=h.filter("[data-"+M.tab+'="'+e+'"]'),t.size()>0?t:n},tab:function(){return m}},utilities:{filterArray:function(t,n){return e.grep(t,function(t){return-1==e.inArray(t,n)})},last:function(t){return!!e.isArray(t)&&t[t.length-1]},pathToArray:function(e){return e===i&&(e=m),"string"==typeof e?e.split("/"):[e]},arrayToPath:function(t){return!!e.isArray(t)&&t.join("/")}},setting:function(t,n){if(o.debug("Changing setting",t,n),e.isPlainObject(t))e.extend(!0,s,t);else{if(n===i)return s[t];s[t]=n}},internal:function(t,n){if(e.isPlainObject(t))e.extend(!0,o,t);else{if(n===i)return o[t];o[t]=n}},debug:function(){s.debug&&(s.performance?o.performance.log(arguments):(o.debug=Function.prototype.bind.call(console.info,console,s.name+":"),o.debug.apply(console,arguments)))},verbose:function(){s.verbose&&s.debug&&(s.performance?o.performance.log(arguments):(o.verbose=Function.prototype.bind.call(console.info,console,s.name+":"),o.verbose.apply(console,arguments)))},error:function(){o.error=Function.prototype.bind.call(console.error,console,s.name+":"),o.error.apply(console,arguments)},performance:{log:function(e){var t,n;s.performance&&(n=(t=(new Date).getTime())-(l||t),l=t,u.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:k,"Execution Time":n})),clearTimeout(o.performance.timer),o.performance.timer=setTimeout(o.performance.display,100)},display:function(){var t=s.name+":",n=0;l=!1,clearTimeout(o.performance.timer),e.each(u,function(e,t){n+=t["Execution Time"]}),t+=" "+n+"ms",c&&(t+=" '"+c+"'"),(console.group!==i||console.table!==i)&&u.length>0&&(console.groupCollapsed(t),console.table?console.table(u):e.each(u,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),u=[]}},invoke:function(t,n,r){var s,c,l,u=_;return n=n||f,r=k||r,"string"==typeof t&&u!==i&&(t=t.split(/[\. ]/),s=t.length-1,e.each(t,function(n,a){var r=n!=s?a+t[n+1].charAt(0).toUpperCase()+t[n+1].slice(1):t;if(e.isPlainObject(u[r])&&n!=s)u=u[r];else{if(u[r]!==i)return c=u[r],!1;if(!e.isPlainObject(u[a])||n==s)return u[a]!==i?(c=u[a],!1):(o.error(A.method,t),!1);u=u[a]}})),e.isFunction(c)?l=c.apply(r,n):c!==i&&(l=c),e.isArray(a)?a.push(l):a!==i?a=[a,l]:l!==i&&(a=l),c}},p?(_===i&&o.initialize(),o.invoke(d)):(_!==i&&o.destroy(),o.initialize())}),o&&!p&&o.initializeHistory(),a!==i?a:this},e.tab=function(n){e(t).tab(n)},e.fn.tab.settings={name:"Tab",namespace:"tab",debug:!1,verbose:!0,performance:!0,auto:!1,history:!1,historyType:"hash",path:!1,context:!1,childrenOnly:!1,maxDepth:25,ignoreFirstLoad:!1,alwaysRefresh:!1,cache:!0,apiSettings:!1,onTabInit:function(){},onTabLoad:function(){},templates:{determineTitle:function(){}},error:{api:"You attempted to load content without API module",method:"The method you called is not defined",missingTab:"Activated tab cannot be found for this context.",noContent:"The tab you specified is missing a content url.",path:"History enabled, but no path was specified",recursion:"Max recursive depth reached",state:"History requires Asual's Address library <https://github.com/asual/jquery-address>"},metadata:{tab:"tab",loaded:"loaded",promise:"promise"},className:{loading:"loading",active:"active"},selector:{tabs:".ui.tab",ui:".ui"}}}(jQuery,window,document),function(e,t,n,i){"use strict";void 0!==(t=void 0!==t&&t.Math==Math?t:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")())&&t.Math==Math||("undefined"!=typeof self&&self.Math==Math?self:Function("return this")());e.fn.progress=function(t){var o,a=e(this),r=a.selector||"",s=(new Date).getTime(),c=[],l=arguments[0],u="string"==typeof l,d=[].slice.call(arguments,1);return a.each(function(){var a,p,f=e.isPlainObject(t)?e.extend(!0,{},e.fn.progress.settings,t):e.extend({},e.fn.progress.settings),h=f.className,m=f.metadata,g=f.namespace,b=f.selector,v=f.error,M="."+g,y="module-"+g,A=e(this),w=e(this).find(b.bar),z=e(this).find(b.progress),T=e(this).find(b.label),x=this,O=A.data(y),C=!1;p={initialize:function(){p.debug("Initializing progress bar",f),p.set.duration(),p.set.transitionEvent(),p.read.metadata(),p.read.settings(),p.instantiate()},instantiate:function(){p.verbose("Storing instance of progress",p),O=p,A.data(y,p)},destroy:function(){p.verbose("Destroying previous progress for",A),clearInterval(O.interval),p.remove.state(),A.removeData(y),O=i},reset:function(){p.remove.nextValue(),p.update.progress(0)},complete:function(){(p.percent===i||p.percent<100)&&(p.remove.progressPoll(),p.set.percent(100))},read:{metadata:function(){var e={percent:A.data(m.percent),total:A.data(m.total),value:A.data(m.value)};e.percent&&(p.debug("Current percent value set from metadata",e.percent),p.set.percent(e.percent)),e.total&&(p.debug("Total value set from metadata",e.total),p.set.total(e.total)),e.value&&(p.debug("Current value set from metadata",e.value),p.set.value(e.value),p.set.progress(e.value))},settings:function(){!1!==f.total&&(p.debug("Current total set in settings",f.total),p.set.total(f.total)),!1!==f.value&&(p.debug("Current value set in settings",f.value),p.set.value(f.value),p.set.progress(p.value)),!1!==f.percent&&(p.debug("Current percent set in settings",f.percent),p.set.percent(f.percent))}},increment:function(e){var t,n;p.has.total()?n=(t=p.get.value())+(e=e||1):(n=(t=p.get.percent())+(e=e||p.get.randomValue()),100,p.debug("Incrementing percentage by",t,n)),n=p.get.normalizedValue(n),p.set.progress(n)},decrement:function(e){var t,n;p.get.total()?(n=(t=p.get.value())-(e=e||1),p.debug("Decrementing value by",e,t)):(n=(t=p.get.percent())-(e=e||p.get.randomValue()),p.debug("Decrementing percentage by",e,t)),n=p.get.normalizedValue(n),p.set.progress(n)},has:{progressPoll:function(){return p.progressPoll},total:function(){return!1!==p.get.total()}},get:{text:function(e){var t=p.value||0,n=p.total||0,i=C?p.get.displayPercent():p.percent||0,o=p.total>0?n-t:100-i;return e=(e=e||"").replace("{value}",t).replace("{total}",n).replace("{left}",o).replace("{percent}",i),p.verbose("Adding variables to progress bar text",e),e},normalizedValue:function(e){if(e<0)return p.debug("Value cannot decrement below 0"),0;if(p.has.total()){if(e>p.total)return p.debug("Value cannot increment above total",p.total),p.total}else if(e>100)return p.debug("Value cannot increment above 100 percent"),100;return e},updateInterval:function(){return"auto"==f.updateInterval?f.duration:f.updateInterval},randomValue:function(){return p.debug("Generating random increment percentage"),Math.floor(Math.random()*f.random.max+f.random.min)},numericValue:function(e){return"string"==typeof e?""!==e.replace(/[^\d.]/g,"")&&+e.replace(/[^\d.]/g,""):e},transitionEnd:function(){var e,t=n.createElement("element"),o={transition:"transitionend",OTransition:"oTransitionEnd",MozTransition:"transitionend",WebkitTransition:"webkitTransitionEnd"};for(e in o)if(t.style[e]!==i)return o[e]},displayPercent:function(){var e=w.width(),t=A.width(),n=e>parseInt(w.css("min-width"),10)?e/t*100:p.percent;return f.precision>0?Math.round(n*(10*f.precision))/(10*f.precision):Math.round(n)},percent:function(){return p.percent||0},value:function(){return p.nextValue||p.value||0},total:function(){return p.total||!1}},create:{progressPoll:function(){p.progressPoll=setTimeout(function(){p.update.toNextValue(),p.remove.progressPoll()},p.get.updateInterval())}},is:{complete:function(){return p.is.success()||p.is.warning()||p.is.error()},success:function(){return A.hasClass(h.success)},warning:function(){return A.hasClass(h.warning)},error:function(){return A.hasClass(h.error)},active:function(){return A.hasClass(h.active)},visible:function(){return A.is(":visible")}},remove:{progressPoll:function(){p.verbose("Removing progress poll timer"),p.progressPoll&&(clearTimeout(p.progressPoll),delete p.progressPoll)},nextValue:function(){p.verbose("Removing progress value stored for next update"),delete p.nextValue},state:function(){p.verbose("Removing stored state"),delete p.total,delete p.percent,delete p.value},active:function(){p.verbose("Removing active state"),A.removeClass(h.active)},success:function(){p.verbose("Removing success state"),A.removeClass(h.success)},warning:function(){p.verbose("Removing warning state"),A.removeClass(h.warning)},error:function(){p.verbose("Removing error state"),A.removeClass(h.error)}},set:{barWidth:function(e){e>100?p.error(v.tooHigh,e):e<0?p.error(v.tooLow,e):(w.css("width",e+"%"),A.attr("data-percent",parseInt(e,10)))},duration:function(e){e="number"==typeof(e=e||f.duration)?e+"ms":e,p.verbose("Setting progress bar transition duration",e),w.css({"transition-duration":e})},percent:function(e){e="string"==typeof e?+e.replace("%",""):e,e=f.precision>0?Math.round(e*(10*f.precision))/(10*f.precision):Math.round(e),p.percent=e,p.has.total()||(p.value=f.precision>0?Math.round(e/100*p.total*(10*f.precision))/(10*f.precision):Math.round(e/100*p.total*10)/10,f.limitValues&&(p.value=p.value>100?100:p.value<0?0:p.value)),p.set.barWidth(e),p.set.labelInterval(),p.set.labels(),f.onChange.call(x,e,p.value,p.total)},labelInterval:function(){var t=function(){p.verbose("Bar finished animating, removing continuous label updates"),clearInterval(p.interval),C=!1,p.set.labels()};clearInterval(p.interval),w.one(a+M,t),C=!0,p.interval=setInterval(function(){e.contains(n.documentElement,x)||(clearInterval(p.interval),C=!1),p.set.labels()},f.framerate)},labels:function(){p.verbose("Setting both bar progress and outer label text"),p.set.barLabel(),p.set.state()},label:function(e){(e=e||"")&&(e=p.get.text(e),p.verbose("Setting label to text",e),T.text(e))},state:function(e){
DesignScreenshot/output/gitee_run/gitee.com_3_credentials_filled.html:397:function(e,t){"function"==typeof define&&define.amd?define(["jquery"],function(e){return t(e)}):"object"==typeof exports?module.exports=t(require("jquery")):t(jQuery)}(0,function(e){var t,n,i;n={ESC:27,TAB:9,ENTER:13,CTRL:17,A:65,P:80,N:78,LEFT:37,UP:38,RIGHT:39,DOWN:40,BACKSPACE:8,SPACE:32},t={beforeSave:function(e){return o.arrayToDefaultHash(e)},matcher:function(e,t,n,i){var o,a,r;return e=e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),n&&(e="(?:^|\\s)"+e),o=decodeURI("%C3%80"),a=decodeURI("%C3%BF"),(r=new RegExp(e+"([A-Za-z"+o+"-"+a+"0-9_"+(i?" ":"")+"'.+-]*)$|"+e+"([^\\x00-\\xff]*)$","gi").exec(t))?r[2]||r[1]:null},filter:function(e,t,n){var i,o,a,r;for(i=[],o=0,r=t.length;o<r;o++)a=t[o],~new String(a[n]).toLowerCase().indexOf(e.toLowerCase())&&i.push(a);return i},remoteFilter:null,sorter:function(e,t,n){var i,o,a,r;if(!e)return t;for(i=[],o=0,r=t.length;o<r;o++)(a=t[o]).atwho_order=new String(a[n]).toLowerCase().indexOf(e.toLowerCase()),a.atwho_order>-1&&i.push(a);return i.sort(function(e,t){return e.atwho_order-t.atwho_order})},tplEval:function(e,t){var n,i;i=e;try{return"string"!=typeof e&&(i=e(t)),i.replace(/\$\{([^\}]*)\}/g,function(e,n){return t[n]})}catch(n){return n,""}},highlighter:function(e,t){var n;return t?(n=new RegExp(">\\s*([^<]*?)("+t.replace("+","\\+")+")([^<]*)\\s*<","ig"),e.replace(n,function(e,t,n,i){return"> "+t+"<strong>"+n+"</strong>"+i+" <"})):e},beforeInsert:function(e){return e},beforeReposition:function(e){return e},afterMatchFailed:function(){}},i=function(){function t(t){this.currentFlag=null,this.controllers={},this.aliasMaps={},this.$inputor=e(t),this.setupRootElement(),this.listen()}return t.prototype.createContainer=function(t){var n;return null!=(n=this.$el)&&n.remove(),e(t.body).append(this.$el=e("<div class='atwho-container'></div>"))},t.prototype.setupRootElement=function(t,n){var i,o;if(null==n&&(n=!1),t)this.window=t.contentWindow,this.document=t.contentDocument||this.window.document,this.iframe=t;else{this.document=this.$inputor[0].ownerDocument,this.window=this.document.defaultView||this.document.parentWindow;try{this.iframe=this.window.frameElement}catch(o){if(i=o,this.iframe=null,e.fn.atwho.debug)throw new Error("iframe auto-discovery is failed.\nPlease use `setIframe` to set the target iframe manually.\n"+i)}}return this.createContainer((this.iframeAsRoot=n)?this.document:document)},t.prototype.controller=function(e){var t,n,i,o;if(this.aliasMaps[e])n=this.controllers[this.aliasMaps[e]];else for(i in o=this.controllers)if(t=o[i],i===e){n=t;break}return n||this.controllers[this.currentFlag]},t.prototype.setContextFor=function(e){return this.currentFlag=e,this},t.prototype.reg=function(e,t){var n,i;return i=(n=this.controllers)[e]||(n[e]=this.$inputor.is("[contentEditable]")?new l(this,e):new r(this,e)),t.alias&&(this.aliasMaps[t.alias]=e),i.init(t),this},t.prototype.listen=function(){return this.$inputor.on("compositionstart",(e=this,function(){var t;return null!=(t=e.controller())&&t.view.hide(),e.isComposing=!0,null})).on("compositionend",function(e){return function(){return e.isComposing=!1,setTimeout(function(t){return e.dispatch(t)}),null}}(this)).on("keyup.atwhoInner",function(e){return function(t){return e.onKeyup(t)}}(this)).on("keydown.atwhoInner",function(e){return function(t){return e.onKeydown(t)}}(this)).on("blur.atwhoInner",function(e){return function(t){var n;if(n=e.controller())return n.expectedQueryCBId=null,n.view.hide(t,n.getOpt("displayTimeout"))}}(this)).on("click.atwhoInner",function(e){return function(t){return e.dispatch(t)}}(this)).on("scroll.atwhoInner",function(e){return function(){var t;return t=e.$inputor.scrollTop(),function(n){var i,o;return i=n.target.scrollTop,t!==i&&null!=(o=e.controller())&&o.view.hide(n),t=i,!0}}}(this)());var e},t.prototype.shutdown=function(){var e,t;for(e in t=this.controllers)t[e].destroy(),delete this.controllers[e];return this.$inputor.off(".atwhoInner"),this.$el.remove()},t.prototype.dispatch=function(e){var t,n,i,o;for(t in o=[],i=this.controllers)n=i[t],o.push(n.lookUp(e));return o},t.prototype.onKeyup=function(t){var i;switch(t.keyCode){case n.ESC:t.preventDefault(),null!=(i=this.controller())&&i.view.hide();break;case n.DOWN:case n.UP:case n.CTRL:case n.ENTER:e.noop();break;case n.P:case n.N:t.ctrlKey||this.dispatch(t);break;default:this.dispatch(t)}},t.prototype.onKeydown=function(t){var i,o;if((o=null!=(i=this.controller())?i.view:void 0)&&o.visible())switch(t.keyCode){case n.ESC:t.preventDefault(),o.hide(t);break;case n.UP:t.preventDefault(),o.prev();break;case n.DOWN:t.preventDefault(),o.next();break;case n.P:if(!t.ctrlKey)return;t.preventDefault(),o.prev();break;case n.N:if(!t.ctrlKey)return;t.preventDefault(),o.next();break;case n.TAB:case n.ENTER:case n.SPACE:if(!o.visible())return;if(!this.controller().getOpt("spaceSelectsMatch")&&t.keyCode===n.SPACE)return;if(!this.controller().getOpt("tabSelectsMatch")&&t.keyCode===n.TAB)return;o.highlighted()?(t.preventDefault(),o.choose(t)):o.hide(t);break;default:e.noop()}},t}();var o,a=[].slice;o=function(){function n(t,n){this.app=t,this.at=n,this.$inputor=this.app.$inputor,this.id=this.$inputor[0].id||this.uid(),this.expectedQueryCBId=null,this.setting=null,this.query=null,this.pos=0,this.range=null,0===(this.$el=e("#atwho-ground-"+this.id,this.app.$el)).length&&this.app.$el.append(this.$el=e("<div id='atwho-ground-"+this.id+"'></div>")),this.model=new u(this),this.view=new d(this)}return n.prototype.uid=function(){return(Math.random().toString(16)+"000000000").substr(2,8)+(new Date).getTime()},n.prototype.init=function(t){return this.setting=e.extend({},this.setting||e.fn.atwho["default"],t),this.view.init(),this.model.reload(this.setting.data)},n.prototype.destroy=function(){return this.trigger("beforeDestroy"),this.model.destroy(),this.view.destroy(),this.$el.remove()},n.prototype.callDefault=function(){var n,i,o,r;r=arguments[0],n=2<=arguments.length?a.call(arguments,1):[];try{return t[r].apply(this,n)}catch(o){return i=o,e.error(i+" Or maybe At.js doesn't have function "+r)}},n.prototype.trigger=function(e,t){var n,i;return null==t&&(t=[]),t.push(this),i=(n=this.getOpt("alias"))?e+"-"+n+".atwho":e+".atwho",this.$inputor.trigger(i,t)},n.prototype.callbacks=function(e){return this.getOpt("callbacks")[e]||t[e]},n.prototype.getOpt=function(e){var t;try{return this.setting[e]}catch(t){return t,null}},n.prototype.insertContentFor=function(t){var n,i;return i=this.getOpt("insertTpl"),n=e.extend({},t.data("item-data"),{"atwho-at":this.at}),this.callbacks("tplEval").call(this,i,n,"onInsert")},n.prototype.renderView=function(e){var t;return t=this.getOpt("searchKey"),e=this.callbacks("sorter").call(this,this.query.text,e.slice(0,1001),t),this.view.render(e.slice(0,this.getOpt("limit")))},n.arrayToDefaultHash=function(t){var n,i,o,a;if(!e.isArray(t))return t;for(a=[],n=0,o=t.length;n<o;n++)i=t[n],e.isPlainObject(i)?a.push(i):a.push({name:i});return a},n.prototype.lookUp=function(e){var t,n;if((!e||"click"!==e.type||this.getOpt("lookUpOnClick"))&&(!this.getOpt("suspendOnComposing")||!this.app.isComposing))return(t=this.catchQuery(e))?(this.app.setContextFor(this.at),(n=this.getOpt("delay"))?this._delayLookUp(t,n):this._lookUp(t),t):(this.expectedQueryCBId=null,t)},n.prototype._delayLookUp=function(e,t){var n,i,o;return n=Date.now?Date.now():(new Date).getTime(),this.previousCallTime||(this.previousCallTime=n),0<(i=t-(n-this.previousCallTime))&&i<t?(this.previousCallTime=n,this._stopDelayedCall(),this.delayedCallTimeout=setTimeout((o=this,function(){return o.previousCallTime=0,o.delayedCallTimeout=null,o._lookUp(e)}),t)):(this._stopDelayedCall(),this.previousCallTime!==n&&(this.previousCallTime=0),this._lookUp(e))},n.prototype._stopDelayedCall=function(){if(this.delayedCallTimeout)return clearTimeout(this.delayedCallTimeout),this.delayedCallTimeout=null},n.prototype._generateQueryCBId=function(){return{}},n.prototype._lookUp=function(t){var n;return n=function(e,t){if(e===this.expectedQueryCBId)return t&&t.length>0?this.renderView(this.constructor.arrayToDefaultHash(t)):this.view.hide()},this.expectedQueryCBId=this._generateQueryCBId(),this.model.query(t.text,e.proxy(n,this,this.expectedQueryCBId))},n}();var r,s=function(e,t){function n(){this.constructor=e}for(var i in t)c.call(t,i)&&(e[i]=t[i]);return n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype,e},c={}.hasOwnProperty;r=function(){function t(){return t.__super__.constructor.apply(this,arguments)}return s(t,o),t.prototype.catchQuery=function(){var e,t,n,i,o,a,r;if(t=this.$inputor.val(),e=this.$inputor.caret("pos",{iframe:this.app.iframe}),r=t.slice(0,e),!((i="string"==typeof(o=this.callbacks("matcher").call(this,this.at,r,this.getOpt("startWithSpace"),this.getOpt("acceptSpaceBar"))))&&o.length<this.getOpt("minLen",0)))return i&&o.length<=this.getOpt("maxLen",20)?(n=(a=e-o.length)+o.length,this.pos=a,o={text:o,headPos:a,endPos:n},this.trigger("matched",[this.at,o.text])):(o=null,this.view.hide()),this.query=o},t.prototype.rect=function(){var t,n,i;if(t=this.$inputor.caret("offset",this.pos-1,{iframe:this.app.iframe}))return this.app.iframe&&!this.app.iframeAsRoot&&(n=e(this.app.iframe).offset(),t.left+=n.left,t.top+=n.top),i=this.app.document.selection?0:2,{left:t.left,top:t.top,bottom:t.top+t.height+i}},t.prototype.insert=function(e){var t,n,i,o,a;return a=""+(i=(n=(t=this.$inputor).val()).slice(0,Math.max(this.query.headPos-this.at.length,0)))+(e+=o=""===(o=this.getOpt("suffix"))?o:o||" ")+n.slice(this.query.endPos||0),t.val(a),t.caret("pos",i.length+e.length,{iframe:this.app.iframe}),t.is(":focus")||t.focus(),t.change()},t}();var l,u,d,p;s=function(e,t){function n(){this.constructor=e}for(var i in t)c.call(t,i)&&(e[i]=t[i]);return n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype,e},c={}.hasOwnProperty;l=function(){function t(){return t.__super__.constructor.apply(this,arguments)}return s(t,o),t.prototype._getRange=function(){var e;if((e=this.app.window.getSelection()).rangeCount>0)return e.getRangeAt(0)},t.prototype._setRange=function(t,n,i){if(null==i&&(i=this._getRange()),i&&n)return n=e(n)[0],"after"===t?(i.setEndAfter(n),i.setStartAfter(n)):(i.setEndBefore(n),i.setStartBefore(n)),i.collapse(!1),this._clearRange(i)},t.prototype._clearRange=function(e){var t;if(null==e&&(e=this._getRange()),t=this.app.window.getSelection(),null==this.ctrl_a_pressed)return t.removeAllRanges(),t.addRange(e)},t.prototype._movingEvent=function(e){var t;return"click"===e.type||(t=e.which)===n.RIGHT||t===n.LEFT||t===n.UP||t===n.DOWN},t.prototype._unwrap=function(t){var n;return(n=(t=e(t).unwrap().get(0)).nextSibling)&&n.nodeValue&&(t.nodeValue+=n.nodeValue,e(n).remove()),t},t.prototype.catchQuery=function(t){var i,o,a,r,s,c,l,u,d,p,f,h;if((h=this._getRange())&&h.collapsed){if(t.which===n.ENTER)return(o=e(h.startContainer).closest(".atwho-query")).contents().unwrap(),o.is(":empty")&&o.remove(),(o=e(".atwho-query",this.app.document)).text(o.text()).contents().last().unwrap(),void this._clearRange();if(/firefox/i.test(navigator.userAgent)){if(e(h.startContainer).is(this.$inputor))return void this._clearRange();t.which===n.BACKSPACE&&h.startContainer.nodeType===document.ELEMENT_NODE&&(d=h.startOffset-1)>=0?((a=h.cloneRange()).setStart(h.startContainer,d),e(a.cloneContents()).contents().last().is(".atwho-inserted")&&(s=e(h.startContainer).contents().get(d),this._setRange("after",e(s).contents().last()))):t.which===n.LEFT&&h.startContainer.nodeType===document.TEXT_NODE&&(i=e(h.startContainer.previousSibling)).is(".atwho-inserted")&&0===h.startOffset&&this._setRange("after",i.contents().last())}if(e(h.startContainer).closest(".atwho-inserted").addClass("atwho-query").siblings().removeClass("atwho-query"),(o=e(".atwho-query",this.app.document)).length>0&&o.is(":empty")&&0===o.text().length&&o.remove(),this._movingEvent(t)||o.removeClass("atwho-inserted"),o.length>0)switch(t.which){case n.LEFT:return this._setRange("before",o.get(0),h),void o.removeClass("atwho-query");case n.RIGHT:return this._setRange("after",o.get(0).nextSibling,h),void o.removeClass("atwho-query")}if(o.length>0&&(f=o.attr("data-atwho-at-query"))&&(o.empty().html(f).attr("data-atwho-at-query",null),this._setRange("after",o.get(0),h)),(a=h.cloneRange()).setStart(h.startContainer,0),c="string"==typeof(u=this.callbacks("matcher").call(this,this.at,a.toString(),this.getOpt("startWithSpace"),this.getOpt("acceptSpaceBar"))),0===o.length&&c&&(r=h.startOffset-this.at.length-u.length)>=0&&(h.setStart(h.startContainer,r),o=e("<span/>",this.app.document).attr(this.getOpt("editableAtwhoQueryAttrs")).addClass("atwho-query"),h.surroundContents(o.get(0)),(l=o.contents().last().get(0))&&(/firefox/i.test(navigator.userAgent)?(h.setStart(l,l.length),h.setEnd(l,l.length),this._clearRange(h)):this._setRange("after",l,h))),!(c&&u.length<this.getOpt("minLen",0)))return c&&u.length<=this.getOpt("maxLen",20)?(p={text:u,el:o},this.trigger("matched",[this.at,p.text]),this.query=p):(this.view.hide(),this.query={el:o},o.text().indexOf(this.at)>=0&&(this._movingEvent(t)&&o.hasClass("atwho-inserted")?o.removeClass("atwho-query"):!1!==this.callbacks("afterMatchFailed").call(this,this.at,o)&&this._setRange("after",this._unwrap(o.text(o.text()).contents().first()))),null)}},t.prototype.rect=function(){var t,n;if((n=this.query.el.offset())&&this.query.el[0].getClientRects().length)return this.app.iframe&&!this.app.iframeAsRoot&&(t=e(this.app.iframe).offset(),n.left+=t.left-this.$inputor.scrollLeft(),n.top+=t.top-this.$inputor.scrollTop()),n.bottom=n.top+this.query.el.height(),n},t.prototype.insert=function(e,t){var n,i,o,a,r;return this.$inputor.is(":focus")||this.$inputor.focus(),(i=this.getOpt("functionOverrides")).insert?i.insert.call(this,e,t):(a=""===(a=this.getOpt("suffix"))?a:a||"\xa0",n=t.data("item-data"),this.query.el.removeClass("atwho-query").addClass("atwho-inserted").html(e).attr("data-atwho-at-query",""+n["atwho-at"]+this.query.text).attr("contenteditable","false"),(o=this._getRange())&&(this.query.el.length&&o.setEndAfter(this.query.el[0]),o.collapse(!1),o.insertNode(r=this.app.document.createTextNode(""+a)),this._setRange("after",r,o)),this.$inputor.is(":focus")||this.$inputor.focus(),this.$inputor.change())},t}(),u=function(){function t(e){this.context=e,this.at=this.context.at,this.storage=this.context.$inputor}return t.prototype.destroy=function(){return this.storage.data(this.at,null)},t.prototype.saved=function(){return this.fetch()>0},t.prototype.query=function(e,t){var n,i,o;return i=this.fetch(),o=this.context.getOpt("searchKey"),i=this.context.callbacks("filter").call(this.context,e,i,o)||[],n=this.context.callbacks("remoteFilter"),i.length>0||!n&&0===i.length?t(i):n.call(this.context,e,t)},t.prototype.fetch=function(){return this.storage.data(this.at)||[]},t.prototype.save=function(e){return this.storage.data(this.at,this.context.callbacks("beforeSave").call(this.context,e||[]))},t.prototype.load=function(e){if(!this.saved()&&e)return this._load(e)},t.prototype.reload=function(e){return this._load(e)},t.prototype._load=function(t){return"string"==typeof t?e.ajax(t,{dataType:"json"}).done((n=this,function(e){return n.save(e)})):this.save(t);var n},t}(),d=function(){function t(t){this.context=t,this.$el=e("<div class='atwho-view'><ul class='atwho-view-ul'></ul></div>"),this.$elUl=this.$el.children(),this.timeoutID=null,this.context.$el.append(this.$el),this.bindEvent()}return t.prototype.init=function(){var e,t;return t=this.context.getOpt("alias")||this.context.at.charCodeAt(0),(e=this.context.getOpt("headerTpl"))&&1===this.$el.children().length&&this.$el.prepend(e),this.$el.attr({id:"at-view-"+t})},t.prototype.destroy=function(){return this.$el.remove()},t.prototype.bindEvent=function(){var t,n,i,o;return t=this.$el.find("ul"),n=0,i=0,t.on("mousemove.atwho-view","li",function(o){var a;if((n!==o.clientX||i!==o.clientY)&&(n=o.clientX,i=o.clientY,!(a=e(o.currentTarget)).hasClass("cur")))return t.find(".cur").removeClass("cur"),a.addClass("cur")}).on("click.atwho-view","li",(o=this,function(n){return t.find(".cur").removeClass("cur"),e(n.currentTarget).addClass("cur"),o.choose(n),n.preventDefault()}))},t.prototype.visible=function(){return e.expr.filters.visible(this.$el[0])},t.prototype.highlighted=function(){return this.$el.find(".cur").length>0},t.prototype.choose=function(e){var t,n;if((t=this.$el.find(".cur")).length&&(n=this.context.insertContentFor(t),this.context._stopDelayedCall(),this.context.insert(this.context.callbacks("beforeInsert").call(this.context,n,t,e),t),this.context.trigger("inserted",[t,e]),this.hide(e)),this.context.getOpt("hideWithoutSuffix"))return this.stopShowing=!0},t.prototype.reposition=function(t){var n,i,o,a;return n=this.context.app.iframeAsRoot?this.context.app.window:window,t.bottom+this.$el.height()-e(n).scrollTop()>e(n).height()&&(t.bottom=t.top-this.$el.height()),t.left>(o=e(n).width()-this.$el.width()-5)&&(t.left=o),i={left:t.left,top:t.bottom},null!=(a=this.context.callbacks("beforeReposition"))&&a.call(this.context,i),this.$el.offset(i),this.context.trigger("reposition",[i])},t.prototype.next=function(){var e,t,n;return(e=this.$el.find(".cur").removeClass("cur").next()).length||(e=this.$el.find("li:first")),e.addClass("cur"),n=(t=e[0]).offsetTop+t.offsetHeight+(t.nextSibling?t.nextSibling.offsetHeight:0),this.scrollTop(Math.max(0,n-this.$el.height()))},t.prototype.prev=function(){var e,t,n;return(t=this.$el.find(".cur").removeClass("cur").prev()).length||(t=this.$el.find("li:last")),t.addClass("cur"),e=(n=t[0]).offsetTop+n.offsetHeight+(n.nextSibling?n.nextSibling.offsetHeight:0),this.scrollTop(Math.max(0,e-this.$el.height()))},t.prototype.scrollTop=function(e){var t;return(t=this.context.getOpt("scrollDuration"))?this.$elUl.animate({scrollTop:e},t):this.$elUl.scrollTop(e)},t.prototype.show=function(){var e;if(!this.stopShowing)return this.visible()||(this.$el.show(),this.$el.scrollTop(0),this.context.trigger("shown")),(e=this.context.rect())?this.reposition(e):void 0;this.stopShowing=!1},t.prototype.hide=function(e,t){var n,i;if(this.visible())return isNaN(t)?(this.$el.hide(),this.context.trigger("hidden",[e])):(i=this,n=function(){return i.hide()},clearTimeout(this.timeoutID),this.timeoutID=setTimeout(n,t))},t.prototype.render=function(t){var n,i,o,a,r,s,c;if(e.isArray(t)&&t.length>0){for(this.$el.find("ul").empty(),i=this.$el.find("ul"),c=this.context.getOpt("displayTpl"),o=0,r=t.length;o<r;o++)a=t[o],a=e.extend({},a,{"atwho-at":this.context.at}),s=this.context.callbacks("tplEval").call(this.context,c,a,"onDisplay"),(n=e(this.context.callbacks("highlighter").call(this.context,s,this.context.query.text))).data("item-data",a),i.append(n);return this.show(),this.context.getOpt("highlightFirst")?i.find("li:first").addClass("cur"):void 0}this.hide()},t}(),p={load:function(e,t){var n;if(n=this.controller(e))return n.model.load(t)},isSelecting:function(){var e;return!!(null!=(e=this.controller())?e.view.visible():void 0)},hide:function(){var e;return null!=(e=this.controller())?e.view.hide():void 0},reposition:function(){var e;if(e=this.controller())return e.view.reposition(e.rect())},setIframe:function(e,t){return this.setupRootElement(e,t),null},run:function(){return this.dispatch()},destroy:function(){return this.shutdown(),this.$inputor.data("atwho",null)}},e.fn.atwho=function(t){var n,o;return n=arguments,o=null,this.filter('textarea, input, [contenteditable=""], [contenteditable=true]').each(function(){var a,r;return(r=(a=e(this)).data("atwho"))||a.data("atwho",r=new i(this)),"object"!=typeof t&&t?p[t]&&r?o=p[t].apply(r,Array.prototype.slice.call(n,1)):e.error("Method "+t+" does not exist on jQuery.atwho"):r.reg(t.at,t)}),null!=o?o:this},e.fn.atwho["default"]={at:void 0,alias:void 0,data:null,displayTpl:"<li>${name}</li>",insertTpl:"${atwho-at}${name}",headerTpl:null,callbacks:t,functionOverrides:{},searchKey:"name",suffix:void 0,hideWithoutSuffix:!1,startWithSpace:!0,acceptSpaceBar:!1,highlightFirst:!0,limit:5,maxLen:20,minLen:0,displayTimeout:300,delay:null,spaceSelectsMatch:!1,tabSelectsMatch:!0,editableAtwhoQueryAttrs:{},scrollDuration:150,suspendOnComposing:!0,lookUpOnClick:!0},e.fn.atwho.debug=!1}),function(e){var t=function(){"use strict";return{isMsie:function(){return!!/(msie|trident)/i.test(navigator.userAgent)&&navigator.userAgent.match(/(msie |rv:)(\d+(.\d+)?)/i)[2]},isBlankString:function(e){return!e||/^\s*$/.test(e)},escapeRegExChars:function(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")},isString:function(e){return"string"==typeof e},isNumber:function(e){return"number"==typeof e},isArray:e.isArray,isFunction:e.isFunction,isObject:e.isPlainObject,isUndefined:function(e){return void 0===e},toStr:function(e){return t.isUndefined(e)||null===e?"":e+""},bind:e.proxy,each:function(t,n){function i(e,t){return n(t,e)}e.each(t,i)},map:e.map,filter:e.grep,every:function(t,n){var i=!0;return t?(e.each(t,function(e,o){return!!(i=n.call(null,o,e,t))&&void 0}),!!i):i},some:function(t,n){var i=!1;return t?(e.each(t,function(e,o){return!(i=n.call(null,o,e,t))&&void 0}),!!i):i},mixin:e.extend,getUniqueId:function(){var e=0;return function(){return e++}}(),templatify:function(t){function n(){return String(t)}return e.isFunction(t)?t:n},defer:function(e){setTimeout(e,0)},debounce:function(e,t,n){var i,o;return function(){var a,r,s=this,c=arguments;return a=function(){i=null,n||(o=e.apply(s,c))},r=n&&!i,clearTimeout(i),i=setTimeout(a,t),r&&(o=e.apply(s,c)),o}},throttle:function(e,t){var n,i,o,a,r,s;return r=0,s=function(){r=new Date,o=null,a=e.apply(n,i)},function(){var c=new Date,l=t-(c-r);return n=this,i=arguments,0>=l?(clearTimeout(o),o=null,r=c,a=e.apply(n,i)):o||(o=setTimeout(s,l)),a}},noop:function(){}}}(),n="0.10.5",i=function(){"use strict";function e(e){return(e=t.toStr(e))?e.split(/\s+/):[]}function n(e){return(e=t.toStr(e))?e.split(/\W+/):[]}function i(e){return function(){var n=[].slice.call(arguments,0);return function(i){var o=[];return t.each(n,function(n){o=o.concat(e(t.toStr(i[n])))}),o}}}return{nonword:n,whitespace:e,obj:{nonword:i(n),whitespace:i(e)}}}(),o=function(){"use strict";function n(n){this.maxSize=t.isNumber(n)?n:100,this.reset(),this.maxSize<=0&&(this.set=this.get=e.noop)}function i(){this.head=this.tail=null}function o(e,t){this.key=e,this.val=t,this.prev=this.next=null}return t.mixin(n.prototype,{set:function(e,t){var n,i=this.list.tail;this.size>=this.maxSize&&(this.list.remove(i),delete this.hash[i.key]),(n=this.hash[e])?(n.val=t,this.list.moveToFront(n)):(n=new o(e,t),this.list.add(n),this.hash[e]=n,this.size++)},get:function(e){var t=this.hash[e];return t?(this.list.moveToFront(t),t.val):void 0},reset:function(){this.size=0,this.hash={},this.list=new i}}),t.mixin(i.prototype,{add:function(e){this.head&&(e.next=this.head,this.head.prev=e),this.head=e,this.tail=this.tail||e},remove:function(e){e.prev?e.prev.next=e.next:this.head=e.next,e.next?e.next.prev=e.prev:this.tail=e.prev},moveToFront:function(e){this.remove(e),this.add(e)}}),n}(),a=function(){"use strict";function e(e){this.prefix=["__",e,"__"].join(""),this.ttlKey="__ttl__",this.keyMatcher=new RegExp("^"+t.escapeRegExChars(this.prefix))}function n(){return(new Date).getTime()}function i(e){return JSON.stringify(t.isUndefined(e)?null:e)}function o(e){return JSON.parse(e)}var a,r;try{(a=window.localStorage).setItem("~~~","!"),a.removeItem("~~~")}catch(s){a=null}return r=a&&window.JSON?{_prefix:function(e){return this.prefix+e},_ttlKey:function(e){return this._prefix(e)+this.ttlKey},get:function(e){return this.isExpired(e)&&this.remove(e),o(a.getItem(this._prefix(e)))},set:function(e,o,r){return t.isNumber(r)?a.setItem(this._ttlKey(e),i(n()+r)):a.removeItem(this._ttlKey(e)),a.setItem(this._prefix(e),i(o))},remove:function(e){return a.removeItem(this._ttlKey(e)),a.removeItem(this._prefix(e)),this},clear:function(){var e,t,n=[],i=a.length;for(e=0;i>e;e++)(t=a.key(e)).match(this.keyMatcher)&&n.push(t.replace(this.keyMatcher,""));for(e=n.length;e--;)this.remove(n[e]);return this},isExpired:function(e){var i=o(a.getItem(this._ttlKey(e)));return!!(t.isNumber(i)&&n()>i)}}:{get:t.noop,set:t.noop,remove:t.noop,clear:t.noop,isExpired:t.noop},t.mixin(e.prototype,r),e}(),r=function(){"use strict";function n(t){t=t||{},this.cancelled=!1,this.lastUrl=null,this._send=t.transport?i(t.transport):e.ajax,this._get=t.rateLimiter?t.rateLimiter(this._get):this._get,this._cache=!1===t.cache?new o(0):c}function i(n){return function(i,o){function a(e){t.defer(function(){s.resolve(e)})}function r(e){t.defer(function(){s.reject(e)})}var s=e.Deferred();return n(i,o,a,r),s}}var a=0,r={},s=6,c=new o(10);return n.setMaxPendingRequests=function(e){s=e},n.resetCache=function(){c.reset()},t.mixin(n.prototype,{_get:function(e,t,n){function i(t){n&&n(null,t),u._cache.set(e,t)}function o(){n&&n(!0)}function c(){a--,delete r[e],u.onDeckRequestArgs&&(u._get.apply(u,u.onDeckRequestArgs),u.onDeckRequestArgs=null)}var l,u=this;this.cancelled||e!==this.lastUrl||((l=r[e])?l.done(i).fail(o):s>a?(a++,r[e]=this._send(e,t).done(i).fail(o).always(c)):this.onDeckRequestArgs=[].slice.call(arguments,0))},get:function(e,n,i){var o;return t.isFunction(n)&&(i=n,n={}),this.cancelled=!1,this.lastUrl=e,(o=this._cache.get(e))?t.defer(function(){i&&i(null,o)}):this._get(e,n,i),!!o},cancel:function(){this.cancelled=!0}}),n}(),s=function(){"use strict";function n(t){(t=t||{}).datumTokenizer&&t.queryTokenizer||e.error("datumTokenizer and queryTokenizer are both required"),this.datumTokenizer=t.datumTokenizer,this.queryTokenizer=t.queryTokenizer,this.reset()}function i(e){return e=t.filter(e,function(e){return!!e}),t.map(e,function(e){return e.toLowerCase()})}function o(){return{ids:[],children:{}}}function a(e){for(var t={},n=[],i=0,o=e.length;o>i;i++)t[e[i]]||(t[e[i]]=!0,n.push(e[i]));return n}function r(e,t){function n(e,t){return e-t}var i=0,o=0,a=[];e=e.sort(n),t=t.sort(n);for(var r=e.length,s=t.length;r>i&&s>o;)e[i]<t[o]?i++:e[i]>t[o]?o++:(a.push(e[i]),i++,o++);return a}return t.mixin(n.prototype,{bootstrap:function(e){this.datums=e.datums,this.trie=e.trie},add:function(e){var n=this;e=t.isArray(e)?e:[e],t.each(e,function(e){var a,r;a=n.datums.push(e)-1,r=i(n.datumTokenizer(e)),t.each(r,function(e){var t,i,r;for(t=n.trie,i=e.split("");r=i.shift();)(t=t.children[r]||(t.children[r]=o())).ids.push(a)})})},get:function(e){var n,o,s=this;return n=i(this.queryTokenizer(e)),t.each(n,function(e){var t,n,i,a;if(o&&0===o.length)return!1;for(t=s.trie,n=e.split("");t&&(i=n.shift());)t=t.children[i];return t&&0===n.length?(a=t.ids.slice(0),void(o=o?r(o,a):a)):(o=[],!1)}),o?t.map(a(o),function(e){return s.datums[e]}):[]},reset:function(){this.datums=[],this.trie=o()},serialize:function(){return{datums:this.datums,trie:this.trie}}}),n}(),c=function(){"use strict";function i(e){return e.local||null}function o(i){var o,a;return a={url:null,thumbprint:"",ttl:864e5,filter:null,ajax:{}},(o=i.prefetch||null)&&(o=t.isString(o)?{url:o}:o,(o=t.mixin(a,o)).thumbprint=n+o.thumbprint,o.ajax.type=o.ajax.type||"GET",o.ajax.dataType=o.ajax.dataType||"json",!o.url&&e.error("prefetch requires url to be set")),o}function a(n){function i(e){return function(n){return t.debounce(n,e)}}function o(e){return function(n){return t.throttle(n,e)}}var a,r;return r={url:null,cache:!0,wildcard:"%QUERY",replace:null,rateLimitBy:"debounce",rateLimitWait:300,send:null,filter:null,ajax:{}},(a=n.remote||null)&&(a=t.isString(a)?{url:a}:a,(a=t.mixin(r,a)).rateLimiter=/^throttle$/i.test(a.rateLimitBy)?o(a.rateLimitWait):i(a.rateLimitWait),a.ajax.type=a.ajax.type||"GET",a.ajax.dataType=a.ajax.dataType||"json",delete a.rateLimitBy,delete a.rateLimitWait,!a.url&&e.error("remote requires url to be set")),a}return{local:i,prefetch:o,remote:a}}();!function(n){"use strict";function o(t){t&&(t.local||t.prefetch||t.remote)||e.error("one of local, prefetch, or remote is required"),this.limit=t.limit||5,this.sorter=l(t.sorter),this.dupDetector=t.dupDetector||u,this.local=c.local(t),this.prefetch=c.prefetch(t),this.remote=c.remote(t),this.cacheKey=this.prefetch?this.prefetch.cacheKey||this.prefetch.url:null,this.index=new s({datumTokenizer:t.datumTokenizer,queryTokenizer:t.queryTokenizer}),this.storage=this.cacheKey?new a(this.cacheKey):null}function l(e){function n(t){return t.sort(e)}function i(e){return e}return t.isFunction(e)?n:i}function u(){return!1}var d,p;d=n.Bloodhound,p={data:"data",protocol:"protocol",thumbprint:"thumbprint"},n.Bloodhound=o,o.noConflict=function(){return n.Bloodhound=d,o},o.tokenizers=i,t.mixin(o.prototype,{_loadPrefetch:function(t){function n(e){a.clear(),a.add(t.filter?t.filter(e):e),a._saveToStorage(a.index.serialize(),t.thumbprint,t.ttl)}var i,o,a=this;return(i=this._readFromStorage(t.thumbprint))?(this.index.bootstrap(i),o=e.Deferred().resolve()):o=e.ajax(t.url,t.ajax).done(n),o},_getFromRemote:function(e,t){function n(e,n){t(e?[]:a.remote.filter?a.remote.filter(n):n)}var i,o,a=this;if(this.transport)return e=e||"",o=encodeURIComponent(e),i=this.remote.replace?this.remote.replace(this.remote.url,e):this.remote.url.replace(this.remote.wildcard,o),this.transport.get(i,this.remote.ajax,n)},_cancelLastRemoteRequest:function(){this.transport&&this.transport.cancel()},_saveToStorage:function(e,t,n){this.storage&&(this.storage.set(p.data,e,n),this.storage.set(p.protocol,location.protocol,n),this.storage.set(p.thumbprint,t,n))},_readFromStorage:function(e){var t,n={};return this.storage&&(n.data=this.storage.get(p.data),n.protocol=this.storage.get(p.protocol),n.thumbprint=this.storage.get(p.thumbprint)),t=n.thumbprint!==e||n.protocol!==location.protocol,n.data&&!t?n.data:null},_initialize:function(){function n(){o.add(t.isFunction(a)?a():a)}var i,o=this,a=this.local;return i=this.prefetch?this._loadPrefetch(this.prefetch):e.Deferred().resolve(),a&&i.done(n),this.transport=this.remote?new r(this.remote):null,this.initPromise=i.promise()},initialize:function(e){return!this.initPromise||e?this._initialize():this.initPromise},add:function(e){this.index.add(e)},get:function(e,n){function i(e){var i=a.slice(0);t.each(e,function(e){return!t.some(i,function(t){return o.dupDetector(e,t)})&&i.push(e),i.length<o.limit}),n&&n(o.sorter(i))}var o=this,a=[],r=!1;a=this.index.get(e),(a=this.sorter(a).slice(0,this.limit)).length<this.limit?r=this._getFromRemote(e,i):this._cancelLastRemoteRequest(),r||(a.length>0||!this.transport)&&n&&n(a)},clear:function(){this.index.reset()},clearPrefetchCache:function(){this.storage&&this.storage.clear()},clearRemoteCache:function(){this.transport&&r.resetCache()},ttAdapter:function(){return t.bind(this.get,this)}})}(this);var l={wrapper:'<span class="twitter-typeahead"></span>',dropdown:'<span class="tt-dropdown-menu"></span>',dataset:'<div class="tt-dataset-%CLASS%"></div>',suggestions:'<span class="tt-suggestions"></span>',suggestion:'<div class="tt-suggestion"></div>'},u=function(){"use strict";var e={wrapper:{position:"relative",display:"inline-block"},hint:{position:"absolute",top:"0",left:"0",borderColor:"transparent",boxShadow:"none",opacity:"1"},input:{position:"relative",verticalAlign:"top",backgroundColor:"transparent"},inputWithNoHint:{position:"relative",verticalAlign:"top"},dropdown:{position:"absolute",top:"100%",left:"0",zIndex:"100",display:"none"},suggestions:{display:"block"},suggestion:{whiteSpace:"nowrap",cursor:"pointer"},suggestionChild:{whiteSpace:"normal"},ltr:{left:"0",right:"auto"},rtl:{left:"auto",right:" 0"}};return t.isMsie()&&t.mixin(e.input,{backgroundImage:"url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)"}),t.isMsie()&&t.isMsie()<=7&&t.mixin(e.input,{marginTop:"-1px"}),e}(),d=function(){"use strict";function n(t){t&&t.el||e.error("EventBus initialized without el"),this.$el=e(t.el)}var i="typeahead:";return t.mixin(n.prototype,{trigger:function(e){var t=[].slice.call(arguments,1);this.$el.trigger(i+e,t)}}),n}(),p=function(){"use strict";function e(e,t,n,i){var o;if(!n)return this;for(t=t.split(c),n=i?s(n,i):n,this._callbacks=this._callbacks||{};o=t.shift();)this._callbacks[o]=this._callbacks[o]||{sync:[],async:[]},this._callbacks[o][e].push(n);return this}function t(t,n,i){return e.call(this,"async",t,n,i)}function n(t,n,i){return e.call(this,"sync",t,n,i)}function i(e){var t;if(!this._callbacks)return this;for(e=e.split(c);t=e.shift();)delete this._callbacks[t];return this}function o(e){var t,n,i,o,r;if(!this._callbacks)return this;for(e=e.split(c),i=[].slice.call(arguments,1);(t=e.shift())&&(n=this._callbacks[t]);)o=a(n.sync,this,[t].concat(i)),r=a(n.async,this,[t].concat(i)),o()&&l(r);return this}function a(e,t,n){function i(){for(var i,o=0,a=e.length;!i&&a>o;o+=1)i=!1===e[o].apply(t,n);return!i}return i}
DesignScreenshot/output/gitee_run/gitee.com_3_credentials_filled.html:419:links:["Africa/Abidjan|Africa/Bamako","Africa/Abidjan|Africa/Banjul","Africa/Abidjan|Africa/Conakry","Africa/Abidjan|Africa/Dakar","Africa/Abidjan|Africa/Freetown","Africa/Abidjan|Africa/Lome","Africa/Abidjan|Africa/Nouakchott","Africa/Abidjan|Africa/Ouagadougou","Africa/Abidjan|Africa/Sao_Tome","Africa/Abidjan|Africa/Timbuktu","Africa/Abidjan|Atlantic/St_Helena","Africa/Cairo|Egypt","Africa/Johannesburg|Africa/Maseru","Africa/Johannesburg|Africa/Mbabane","Africa/Khartoum|Africa/Juba","Africa/Lagos|Africa/Bangui","Africa/Lagos|Africa/Brazzaville","Africa/Lagos|Africa/Douala","Africa/Lagos|Africa/Kinshasa","Africa/Lagos|Africa/Libreville","Africa/Lagos|Africa/Luanda","Africa/Lagos|Africa/Malabo","Africa/Lagos|Africa/Niamey","Africa/Lagos|Africa/Porto-Novo","Africa/Maputo|Africa/Blantyre","Africa/Maputo|Africa/Bujumbura","Africa/Maputo|Africa/Gaborone","Africa/Maputo|Africa/Harare","Africa/Maputo|Africa/Kigali","Africa/Maputo|Africa/Lubumbashi","Africa/Maputo|Africa/Lusaka","Africa/Nairobi|Africa/Addis_Ababa","Africa/Nairobi|Africa/Asmara","Africa/Nairobi|Africa/Asmera","Africa/Nairobi|Africa/Dar_es_Salaam","Africa/Nairobi|Africa/Djibouti","Africa/Nairobi|Africa/Kampala","Africa/Nairobi|Africa/Mogadishu","Africa/Nairobi|Indian/Antananarivo","Africa/Nairobi|Indian/Comoro","Africa/Nairobi|Indian/Mayotte","Africa/Tripoli|Libya","America/Adak|America/Atka","America/Adak|US/Aleutian","America/Anchorage|US/Alaska","America/Argentina/Buenos_Aires|America/Buenos_Aires","America/Argentina/Catamarca|America/Argentina/ComodRivadavia","America/Argentina/Catamarca|America/Catamarca","America/Argentina/Cordoba|America/Cordoba","America/Argentina/Cordoba|America/Rosario","America/Argentina/Jujuy|America/Jujuy","America/Argentina/Mendoza|America/Mendoza","America/Atikokan|America/Coral_Harbour","America/Chicago|US/Central","America/Curacao|America/Aruba","America/Curacao|America/Kralendijk","America/Curacao|America/Lower_Princes","America/Denver|America/Shiprock","America/Denver|Navajo","America/Denver|US/Mountain","America/Detroit|US/Michigan","America/Edmonton|Canada/Mountain","America/Fort_Wayne|America/Indiana/Indianapolis","America/Fort_Wayne|America/Indianapolis","America/Fort_Wayne|US/East-Indiana","America/Halifax|Canada/Atlantic","America/Havana|Cuba","America/Indiana/Knox|America/Knox_IN","America/Indiana/Knox|US/Indiana-Starke","America/Jamaica|Jamaica","America/Kentucky/Louisville|America/Louisville","America/Los_Angeles|US/Pacific","America/Los_Angeles|US/Pacific-New","America/Manaus|Brazil/West","America/Mazatlan|Mexico/BajaSur","America/Mexico_City|Mexico/General","America/New_York|US/Eastern","America/Noronha|Brazil/DeNoronha","America/Panama|America/Cayman","America/Phoenix|US/Arizona","America/Port_of_Spain|America/Anguilla","America/Port_of_Spain|America/Antigua","America/Port_of_Spain|America/Dominica","America/Port_of_Spain|America/Grenada","America/Port_of_Spain|America/Guadeloupe","America/Port_of_Spain|America/Marigot","America/Port_of_Spain|America/Montserrat","America/Port_of_Spain|America/St_Barthelemy","America/Port_of_Spain|America/St_Kitts","America/Port_of_Spain|America/St_Lucia","America/Port_of_Spain|America/St_Thomas","America/Port_of_Spain|America/St_Vincent","America/Port_of_Spain|America/Tortola","America/Port_of_Spain|America/Virgin","America/Regina|Canada/East-Saskatchewan","America/Regina|Canada/Saskatchewan","America/Rio_Branco|America/Porto_Acre","America/Rio_Branco|Brazil/Acre","America/Santiago|Chile/Continental","America/Sao_Paulo|Brazil/East","America/St_Johns|Canada/Newfoundland","America/Tijuana|America/Ensenada","America/Tijuana|America/Santa_Isabel","America/Tijuana|Mexico/BajaNorte","America/Toronto|America/Montreal","America/Toronto|Canada/Eastern","America/Vancouver|Canada/Pacific","America/Whitehorse|Canada/Yukon","America/Winnipeg|Canada/Central","Asia/Ashgabat|Asia/Ashkhabad","Asia/Bangkok|Asia/Phnom_Penh","Asia/Bangkok|Asia/Vientiane","Asia/Dhaka|Asia/Dacca","Asia/Dubai|Asia/Muscat","Asia/Ho_Chi_Minh|Asia/Saigon","Asia/Hong_Kong|Hongkong","Asia/Jerusalem|Asia/Tel_Aviv","Asia/Jerusalem|Israel","Asia/Kathmandu|Asia/Katmandu","Asia/Kolkata|Asia/Calcutta","Asia/Macau|Asia/Macao","Asia/Makassar|Asia/Ujung_Pandang","Asia/Nicosia|Europe/Nicosia","Asia/Qatar|Asia/Bahrain","Asia/Riyadh|Asia/Aden","Asia/Riyadh|Asia/Kuwait","Asia/Seoul|ROK","Asia/Shanghai|Asia/Chongqing","Asia/Shanghai|Asia/Chungking","Asia/Shanghai|Asia/Harbin","Asia/Shanghai|PRC","Asia/Singapore|Singapore","Asia/Taipei|ROC","Asia/Tehran|Iran","Asia/Thimphu|Asia/Thimbu","Asia/Tokyo|Japan","Asia/Ulaanbaatar|Asia/Ulan_Bator","Asia/Urumqi|Asia/Kashgar","Atlantic/Faroe|Atlantic/Faeroe","Atlantic/Reykjavik|Iceland","Australia/Adelaide|Australia/South","Australia/Brisbane|Australia/Queensland","Australia/Broken_Hill|Australia/Yancowinna","Australia/Darwin|Australia/North","Australia/Hobart|Australia/Tasmania","Australia/Lord_Howe|Australia/LHI","Australia/Melbourne|Australia/Victoria","Australia/Perth|Australia/West","Australia/Sydney|Australia/ACT","Australia/Sydney|Australia/Canberra","Australia/Sydney|Australia/NSW","Etc/GMT+0|Etc/GMT","Etc/GMT+0|Etc/GMT-0","Etc/GMT+0|Etc/GMT0","Etc/GMT+0|Etc/Greenwich","Etc/GMT+0|GMT","Etc/GMT+0|GMT+0","Etc/GMT+0|GMT-0","Etc/GMT+0|GMT0","Etc/GMT+0|Greenwich","Etc/UCT|UCT","Etc/UTC|Etc/Universal","Etc/UTC|Etc/Zulu","Etc/UTC|UTC","Etc/UTC|Universal","Etc/UTC|Zulu","Europe/Belgrade|Europe/Ljubljana","Europe/Belgrade|Europe/Podgorica","Europe/Belgrade|Europe/Sarajevo","Europe/Belgrade|Europe/Skopje","Europe/Belgrade|Europe/Zagreb","Europe/Chisinau|Europe/Tiraspol","Europe/Dublin|Eire","Europe/Helsinki|Europe/Mariehamn","Europe/Istanbul|Asia/Istanbul","Europe/Istanbul|Turkey","Europe/Lisbon|Portugal","Europe/London|Europe/Belfast","Europe/London|Europe/Guernsey","Europe/London|Europe/Isle_of_Man","Europe/London|Europe/Jersey","Europe/London|GB","Europe/London|GB-Eire","Europe/Moscow|W-SU","Europe/Oslo|Arctic/Longyearbyen","Europe/Oslo|Atlantic/Jan_Mayen","Europe/Prague|Europe/Bratislava","Europe/Rome|Europe/San_Marino","Europe/Rome|Europe/Vatican","Europe/Warsaw|Poland","Europe/Zurich|Europe/Busingen","Europe/Zurich|Europe/Vaduz","Pacific/Auckland|Antarctica/McMurdo","Pacific/Auckland|Antarctica/South_Pole","Pacific/Auckland|NZ","Pacific/Chatham|NZ-CHAT","Pacific/Chuuk|Pacific/Truk","Pacific/Chuuk|Pacific/Yap","Pacific/Easter|Chile/EasterIsland","Pacific/Guam|Pacific/Saipan","Pacific/Honolulu|Pacific/Johnston","Pacific/Honolulu|US/Hawaii","Pacific/Kwajalein|Kwajalein","Pacific/Pago_Pago|Pacific/Midway","Pacific/Pago_Pago|Pacific/Samoa","Pacific/Pago_Pago|US/Samoa","Pacific/Pohnpei|Pacific/Ponape"]}),e}),function(e,t){function n(n,a){n=n||"",a=a||60;var r,s,c,l,u,d,p=["#1abc9c","#2ecc71","#3498db","#9b59b6","#34495e","#16a085","#27ae60","#2980b9","#8e44ad","#2c3e50","#f1c40f","#e67e22","#e74c3c","#eca0f1","#95a5a6","#f39c12","#d35400","#c0392b","#bdc3c7","#7f8c8d"],f=String(n).toUpperCase().split(" ");if(r=1==f.length?f[0]?f[0].charAt(0):"?":f[0].charAt(0)+f[1].charAt(0),e.devicePixelRatio&&(a*=e.devicePixelRatio),d=[r,a].join("/"),!i)try{(i=JSON.stringify(e.localStorage.getItem("LetterAvatar")))&&"string"!=typeof i||(i={})}catch(err){i={}}return"string"==typeof i[d]?i[d]:(s=(("?"==r?72:r.charCodeAt(0))-64)%20,(c=t.createElement("canvas")).width=a,c.height=a,(l=c.getContext("2d")).fillStyle=p[s-1],l.fillRect(0,0,c.width,c.height),l.font=Math.round(c.width/2)+"px Arial",l.textAlign="center",l.fillStyle="#FFF",a<25?l.fillText(r,a/2,a/1.37):"U"===r||"V"===r||"W"===r?l.fillText(r,a/2,a/1.42):l.fillText(r,a/2,a/1.48),u=c.toDataURL(),i[d]=u,c=null,o&&clearTimeout(o),o=setTimeout(function(){e.localStorage.setItem("LetterAvatar",JSON.stringify(i)),o=0},500),u)}var i,o;if(n.transform=function(){Array.prototype.forEach.call(t.querySelectorAll("img[avatar]"),function(e,t){t=e.getAttribute("avatar"),e.src=n(t,e.getAttribute("width")),e.removeAttribute("avatar"),e.setAttribute("alt",t)})},"function"==typeof define&&define.amd)define(function(){return n});else if("undefined"!=typeof exports)"undefined"!=typeof module&&module.exports&&(exports=module.exports=n),exports.LetterAvatar=n;else{window.LetterAvatar=n;var a=window.MutationObserver||window.WebKitMutationObserver;if(a){var r={childList:!0,subtree:!0,characterData:!0};new a(function(){n.transform()}).observe(t,r)}else t.addEventListener&&(t.addEventListener("DOMContentLoaded",function(){n.transform()}),t.addEventListener("DOMSubtreeModified",function(){n.transform()}),t.addEventListener("DOMNodeInserted",function(){n.transform()}))}}(window,document),
DesignScreenshot/output/gitee_run/gitee.com_3_credentials_filled.html:446:function(e){e.widget("ui.tagit",{options:{allowDuplicates:!1,caseSensitive:!0,fieldName:"tags",placeholderText:null,readOnly:!1,removeConfirmation:!1,tagLimit:null,availableTags:[],autocomplete:{},showAutocompleteOnFocus:!1,allowSpaces:!1,singleField:!1,singleFieldDelimiter:",",singleFieldNode:null,animate:!0,tabIndex:null,beforeTagAdded:null,afterTagAdded:null,beforeTagRemoved:null,afterTagRemoved:null,onTagClicked:null,onTagLimitExceeded:null,onTagAdded:null,onTagRemoved:null,tagSource:null},_create:function(){var t=this;this.element.is("input")?(this.tagList=e("<ul></ul>").insertAfter(this.element),this.options.singleField=!0,this.options.singleFieldNode=this.element,this.element.addClass("tagit-hidden-field")):this.tagList=this.element.find("ul, ol").andSelf().last(),this.tagInput=e('<input type="text" />').addClass("ui-widget-content"),this.options.readOnly&&this.tagInput.attr("disabled","disabled"),this.options.tabIndex&&this.tagInput.attr("tabindex",this.options.tabIndex),this.options.placeholderText&&this.tagInput.attr("placeholder",this.options.placeholderText),this.options.autocomplete.source||(this.options.autocomplete.source=function(t,n){var i=t.term.toLowerCase(),o=e.grep(this.options.availableTags,function(e){return e.toLowerCase().indexOf(i)>-1});this.options.allowDuplicates||(o=this._subtractArray(o,this.assignedTags())),n(o)}),this.options.showAutocompleteOnFocus&&(this.tagInput.focus(function(){t._showAutocomplete()}),"undefined"==typeof this.options.autocomplete.minLength&&(this.options.autocomplete.minLength=0)),e.isFunction(this.options.autocomplete.source)&&(this.options.autocomplete.source=e.proxy(this.options.autocomplete.source,this)),e.isFunction(this.options.tagSource)&&(this.options.tagSource=e.proxy(this.options.tagSource,this)),this.tagList.addClass("tagit").addClass("ui-widget ui-widget-content ui-corner-all").append(e('<li class="tagit-new"></li>').append(this.tagInput)).click(function(n){var i=e(n.target);if(i.hasClass("tagit-label")){var o=i.closest(".tagit-choice");o.hasClass("removed")||t._trigger("onTagClicked",n,{tag:o,tagLabel:t.tagLabel(o)})}else t.tagInput.focus()});var n=!1;if(this.options.singleField)if(this.options.singleFieldNode){var i=e(this.options.singleFieldNode),o=i.val().split(this.options.singleFieldDelimiter);i.val(""),e.each(o,function(e,i){t.createTag(i,null,!0),n=!0})}else this.options.singleFieldNode=e('<input type="hidden" style="display:none;" value="" name="'+this.options.fieldName+'" />'),this.tagList.after(this.options.singleFieldNode);if(n||this.tagList.children("li").each(function(){e(this).hasClass("tagit-new")||(t.createTag(e(this).text(),e(this).attr("class"),!0),e(this).remove())}),this.tagInput.keydown(function(n){if(n.which==e.ui.keyCode.BACKSPACE&&""===t.tagInput.val()){var i=t._lastTag();!t.options.removeConfirmation||i.hasClass("remove")?t.removeTag(i):t.options.removeConfirmation&&i.addClass("remove ui-state-highlight")}else t.options.removeConfirmation&&t._lastTag().removeClass("remove ui-state-highlight");(n.which===e.ui.keyCode.COMMA&&!1===n.shiftKey||n.which===e.ui.keyCode.ENTER||n.which==e.ui.keyCode.TAB&&""!==t.tagInput.val()||n.which==e.ui.keyCode.SPACE&&!0!==t.options.allowSpaces&&('"'!=e.trim(t.tagInput.val()).replace(/^s*/,"").charAt(0)||'"'==e.trim(t.tagInput.val()).charAt(0)&&'"'==e.trim(t.tagInput.val()).charAt(e.trim(t.tagInput.val()).length-1)&&e.trim(t.tagInput.val()).length-1!=0))&&(n.which===e.ui.keyCode.ENTER&&""===t.tagInput.val()||n.preventDefault(),t.options.autocomplete.autoFocus&&t.tagInput.data("autocomplete-open")||(t.tagInput.autocomplete("close"),t.createTag(t._cleanedInput())))}).blur(function(n){var i=n.relatedTarget;t.tagInput.data("autocomplete-open")||e(i).hasClass("cancel-tag-edit")||t.createTag(t._cleanedInput())}),this.options.availableTags||this.options.tagSource||this.options.autocomplete.source){var a={select:function(e,n){return t.createTag(n.item.value),!1}};e.extend(a,this.options.autocomplete),a.source=this.options.tagSource||a.source,this.tagInput.autocomplete(a).bind("autocompleteopen.tagit",function(){t.tagInput.data("autocomplete-open",!0)}).bind("autocompleteclose.tagit",function(){t.tagInput.data("autocomplete-open",!1)}),this.tagInput.autocomplete("widget").addClass("tagit-autocomplete")}},destroy:function(){return e.Widget.prototype.destroy.call(this),this.element.unbind(".tagit"),this.tagList.unbind(".tagit"),this.tagInput.removeData("autocomplete-open"),this.tagList.removeClass(["tagit","ui-widget","ui-widget-content","ui-corner-all","tagit-hidden-field"].join(" ")),this.element.is("input")?(this.element.removeClass("tagit-hidden-field"),this.tagList.remove()):(this.element.children("li").each(function(){e(this).hasClass("tagit-new")?e(this).remove():(e(this).removeClass(["tagit-choice","ui-widget-content","ui-state-default","ui-state-highlight","ui-corner-all","remove","tagit-choice-editable","tagit-choice-read-only"].join(" ")),e(this).text(e(this).children(".tagit-label").text()))}),this.singleFieldNode&&this.singleFieldNode.remove()),this},_cleanedInput:function(){return e.trim(this.tagInput.val().replace(/^"(.*)"$/,"$1"))},_lastTag:function(){return this.tagList.find(".tagit-choice:last:not(.removed)")},_tags:function(){return this.tagList.find(".tagit-choice:not(.removed)")},assignedTags:function(){var t=this,n=[];return this.options.singleField?""===(n=e(this.options.singleFieldNode).val().split(this.options.singleFieldDelimiter))[0]&&(n=[]):this._tags().each(function(){n.push(t.tagLabel(this))}),n},_updateSingleTagsField:function(t){e(this.options.singleFieldNode).val(t.join(this.options.singleFieldDelimiter)).trigger("change")},_subtractArray:function(t,n){for(var i=[],o=0;o<t.length;o++)-1==e.inArray(t[o],n)&&i.push(t[o]);return i},tagLabel:function(t){return this.options.singleField?e(t).find(".tagit-label:first").text():e(t).find("input:first").val()},_showAutocomplete:function(){this.tagInput.autocomplete("search","")},_findTagByLabel:function(t){var n=this,i=null;return this._tags().each(function(){if(n._formatStr(t)==n._formatStr(n.tagLabel(this)))return i=e(this),!1}),i},_isNew:function(e){return!this._findTagByLabel(e)},_formatStr:function(t){return this.options.caseSensitive?t:e.trim(t.toLowerCase())},_effectExists:function(t){return Boolean(e.effects&&(e.effects[t]||e.effects.effect&&e.effects.effect[t]))},createTag:function(t,n,i){var o=this;if(t=e.trim(t),this.options.preprocessTag&&(t=this.options.preprocessTag(t)),""===t)return!1;if(!this.options.allowDuplicates&&!this._isNew(t)){var a=this._findTagByLabel(t);return!1!==this._trigger("onTagExists",null,{existingTag:a,duringInitialization:i})&&this._effectExists("highlight")&&a.effect("highlight"),!1}if(this.options.tagLimit&&this._tags().length>=this.options.tagLimit)return this._trigger("onTagLimitExceeded",null,{duringInitialization:i}),!1;var r=e(this.options.onTagClicked?'<a class="tagit-label"></a>':'<span class="tagit-label"></span>').text(t),s=e("<li></li>").addClass("tagit-choice ui-widget-content ui-state-default ui-corner-all").addClass(n).append(r);if(this.options.readOnly)s.addClass("tagit-choice-read-only");else{s.addClass("tagit-choice-editable");var c=e("<span></span>").addClass("ui-icon ui-icon-close"),l=e('<a><span class="text-icon">\xd7</span></a>').addClass("tagit-close").append(c).click(function(){o.removeTag(s)});s.append(l)}if(!this.options.singleField){var u=r.html();s.append('<input type="hidden" value="'+u+'" name="'+this.options.fieldName+'" class="tagit-hidden-field" />')}if(!1!==this._trigger("beforeTagAdded",null,{tag:s,tagLabel:this.tagLabel(s),duringInitialization:i})){if(this.options.singleField){var d=this.assignedTags();d.push(t),this._updateSingleTagsField(d)}this._trigger("onTagAdded",null,s),this.tagInput.val(""),this.tagInput.parent().before(s),this._trigger("afterTagAdded",null,{tag:s,tagLabel:this.tagLabel(s),duringInitialization:i})}},removeTag:function(t,n){if(n=void 0===n?this.options.animate:n,t=e(t),this._trigger("onTagRemoved",null,t),!1!==this._trigger("beforeTagRemoved",null,{tag:t,tagLabel:this.tagLabel(t)})){if(this.options.singleField){var i=this.assignedTags(),o=this.tagLabel(t);i=e.grep(i,function(e){return e!=o}),this._updateSingleTagsField(i)}if(n){t.addClass("removed");var a=this._effectExists("blind")?["blind",{direction:"horizontal"},"fast"]:["fast"],r=this;a.push(function(){t.remove(),r._trigger("afterTagRemoved",null,{tag:t,tagLabel:r.tagLabel(t)})}),t.fadeOut("fast").hide.apply(t,a).dequeue()}else t.remove(),this._trigger("afterTagRemoved",null,{tag:t,tagLabel:this.tagLabel(t)})}},removeTagByLabel:function(e,t){var n=this._findTagByLabel(e);if(!n)throw"No such tag exists with the name '"+e+"'";this.removeTag(n,t)},removeAll:function(){var e=this;this._tags().each(function(t,n){e.removeTag(n,!1)})}})}(jQuery),function(){this.replaceAllName=function(e,t){var n,i;return n=Object.keys(t).map(function(e){return"("+(e=e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))+" )|("+e+"$)"}),i=new RegExp(n.join("|"),"g"),e.replace(i,function(e){return t[e.trim()]+" "})},this.resetKey=function(e,t,n){var i;return i=e[t],e[n]=i,delete e[t]},this.replaceUserName=function(e){var t,n,i,o,a;if(0===(t=e.find("textarea.md-input")).length&&(t=$("#editor_comment")),o=t.data("users"),n=t.val(),!jQuery.isEmptyObject(o)){for(i in a={},Object.keys(o).forEach(function(e){return a[e]=o[e]}),a)resetKey(a,i,"@"+i);Object.keys(a).map(function(e){return a[e]="@"+a[e]}),n=replaceAllName(n,a)}return t.val(n)}}.call(this),window.Gitee.setFullscreen=function(e){var t=$(this),n=t.data("mode"),i=t.find("i"),o=t.find(".tips"),a=window._web_tips||{},r=a.fullscreenTips||"\u5168\u5c4f",s=a.fullscreenExitTips||"\u9000\u51fa\u5168\u5c4f";(n="boolean"==typeof e?e:!n)?(t.addClass("active"),o.text(s),i.addClass("fa-compress").removeClass("fa-expand"),$("body").addClass("fullscreen-mode"),$("body").trigger("fullscreenchange",!0)):(t.removeClass("active"),o.text(r),i.addClass("fa-expand").removeClass("fa-compress"),$("body").removeClass("fullscreen-mode"),$("body").trigger("fullscreenchange",!1)),t.data("mode",n)},$(function(){function e(){var e=!0;if(l?noticeDropdown.setUnreadCount(l.unreadCount):noticeDropdown.loadUnreadCount(),l)return t.removeClass("ui dropdown"),void n.remove();u.resetPanelPosition(),$(window).on("resize",window.globalUtils.debouce(u.resetPanelPosition,400)),$("body").on("fullscreenchange",window.globalUtils.debouce(u.resetPanelPosition,400,!0)),o.on("click",u.loadNotices),s.on("click",u.markNotices),r.on("click",".noti",u.markNotice),t.on("mousedown",function(e){return e.stopPropagation(),!1}),t.dropdown({on:"hover",onHide:function(){t.removeClass("hoverable")},onShow:function(){var n=null,i=null;t.addClass("hoverable"),e&&(u.activeTabByUnreadCount(),e=!1),(n=o.filter(".active")).length&&((i=noticeDropdown.getNoticesByScope(n.data("scope"))).total_count&&u.renderNotices(i.list),n.trigger("click"))}}),$(window).on("document:visibility",function(e,t){var n=window.noticeDropdown;t.isHidden||(n.storage.setItem(n.storageTimestampKey,Date.now()),$.ajax({url:p,type:"GET",xhrFields:{withCredentials:!0},success:function(e){n.storage.setItem(n.storageDatasKey,JSON.stringify(e)),n.setUnreadCount(e)}}))})}var t=$("#notice-dropdown");if(t.length&&void 0!==t.data("enable")){var n=t.find(".notice-dropdown-panel"),i=t.find(".remind-button"),o=n.find(".notice-dropdown-panel-header .tab"),a=t.find(".notice-count"),r=n.find(".notice-list"),s=n.find(".mark-notices"),c=n.find(".load-all"),l=window.notisPageParams,u=null,d=null,p=t.data("count-path"),f=t.data("mark-notice-path");window.noticeDropdown={unreadCount:{},notices:{},loading:!1,scope:null,timestampExpir:3e4,storageTimestampKey:"unreadCountTimestamp",storageDatasKey:"unreadCountDatas",storage:window.localStorage,requestThrottlingTime:15e3,loadUnreadCount:function(){var e=this;if("hidden"!==window.document.visibilityState){var t=+e.storage.getItem(e.storageTimestampKey)||0,n=Date.now();if(t+e.requestThrottlingTime>n){var i=JSON.parse(e.storage.getItem(e.storageDatasKey));if(i&&$.isPlainObject(i))return void e.setUnreadCount(i)}$.ajax({url:p,type:"GET",xhrFields:{withCredentials:!0},success:function(t){e.storage.setItem(e.storageTimestampKey,n),e.storage.setItem(e.storageDatasKey,JSON.stringify(t)),e.setUnreadCount(t)}})}},setUnreadCount:function(e){try{var t={infos:e.infos||0,referer:e.referer||0,messages:e.messages||0};t.total=t.infos+t.referer+t.messages,this.unreadCount=t,this.storage.setItem(this.storageDatasKey,JSON.stringify(t))}catch(n){this.unreadCount=null}u.updateUnreadCountView(this.unreadCount||0)},setUnreadCountByScope:function(e,t){var n={},i=this.unreadCount;n[e]=t,i=$.extend(i,n),this.setUnreadCount(i)},getUnreadCountByScope:function(e){return this.unreadCount&&this.unreadCount[e]||0},loadNotices:function(e,t,n){var i=this;i.scope=e,$.ajax({url:t,type:"GET",xhrFields:{withCredentials:!0},beforeSend:function(){n.onStart(),i.loading=!0},success:function(t){i.notices[e]=t,n.onComplete(!0,t),i.loading=!1},error:function(e){console.info(e.responseText),n.onComplete(!1),i.loading=!1}})},getNoticesByScope:function(e){return this.notices[e]||{}},clearNoticesByScope:function(e){this.notices[e]=null}},u={loadNotices:function(e){if(!noticeDropdown.loading){var t=$(this),n=t.data("data-path"),i=t.data("html-path"),a=t.data("scope"),r=noticeDropdown.getNoticesByScope(a);return noticeDropdown.loadNotices(a,n,{onStart:function(){Object.keys(r).length?r.total_count?u.renderNotices(r.list):u.toggleDropdownState("empty"):u.toggleDropdownState("loading")},onComplete:function(e,t){e&&t.total_count?u.renderNotices(t.list):u.toggleDropdownState("empty"),t&&t.total_count!=r.total_count&&noticeDropdown.setUnreadCountByScope(a,t.total_count)}}),o.removeClass("active"),t.addClass("active"),c.attr("href",i),e.preventDefault(),!1}},markNotices:function(e){var t=noticeDropdown.scope,n=noticeDropdown.notices[t].list.map(function(e){return e.id}),i=r.css("height"),o={scope:t};"messages"==t?o.message_ids=n:o.noti_ids=n,$.ajax({url:"/notifications/mark_dropdown",data:o,type:"PUT",success:function(e){5===n.length?(r.css("min-height",i),u.renderNotices(e.list)):(u.toggleDropdownState("empty"),r.css("min-height","auto")),noticeDropdown.notices[t]=e,noticeDropdown.setUnreadCountByScope(t,e.total_count)}}),e.preventDefault()},markNotice:function(){var e=$(this),t=e.data("type"),n=e.data("id");if(t&&"message"!=t&&n)return $.ajax({url:f,data:{noti_ids:n},type:"PUT"}),!0},updateUnreadCountView:function(e){if(!e||!e.total)return a.removeClass("visible"),this.toggleDropdownState("empty"),void $('link[rel="shortcut icon"]').attr("href","/assets/favicon.ico");$('link[rel="shortcut icon"]').attr("href","/assets/favicon_message.ico?1581387642851"),Object.keys(e).forEach(function(t){var n=e[t],i=a.filter("."+t);n>10&&"total"===t&&i.addClass("pl-1 pr-1"),n<1?i.empty().removeClass("visible"):n<=99?i.text(n).addClass("visible"):i.html('99<span style="position: relative;top: -1px;">+</span>').addClass("visible")})},toggleDropdownState:function(e){"loading"===e?t.removeClass("empty shown").addClass("loading"):"empty"===e?t.removeClass("loading shown").addClass("empty"):t.removeClass("empty loading").addClass("shown")},renderNotices:function(e){var t=d.noticesTemplate(e);r.html(t),this.toggleDropdownState("shown")},activeTabByUnreadCount:function(){var e=noticeDropdown.unreadCount;e&&e.total&&(e.referer?scope="referer":e.infos?scope="infos":scope="messages",o.removeClass("active"),o.filter('[data-scope="'+scope+'"]').addClass("active"))},resetPanelPosition:function(){var e=null,t=i.offset().left+i.width()/2+n.width()/2;windowWidth=$(window).width(),e=t<windowWidth?i.position().left+i.width()/2-n.width()/2:windowWidth-i.offset().left-n.width(),n.css("left",e+"px")}},d={sanitize:function(e){return"string"!=typeof e?"":e.replace(/<(?:.|\n)*?>/gm,"").replace(/</gm,"&lt;").replace(/>/gm,"&gt;")},noticesTemplate:function(e){return void 0===e?"":e.map(function(e){var t=d.noticeNamespaceTemplate(e.namespace)||"";return"message"==e.type&&(e.message=e.actor.name+" : "+e.content),e.url=e.url||"javascript: void(0);",'<a class="noti" href="'+d.sanitize(e.url)+'" target="_blank" data-type="'+e.type+'" data-id="'+e.id+'"><div class="title">'+d.sanitize(e.message)+'</div><div class="meta"><time class="timeago">'+$.timeago(e.updated_at)+"</time>"+t+"</div></a>"}).join("")},noticeNamespaceTemplate:function(e){if(e)return' \xb7 <span class="namespace">'+d.sanitize(e.name)+"</span>"}},e()}}),$(function(){function e(){var e=null,t=O.offset().left+O.width()/2+M.innerWidth()/2;windowWidth=$(window).width(),e=t<windowWidth?O.position().left+O.width()/2-M.innerWidth()/2:windowWidth-O.offset().left-M.innerWidth(),M.css("left",e+"px")}function t(e){var t={};t[e]=f,1!=d&&2!=d||(gon.info.current_user.id?$.ajax({type:"post",url:"/update_feature_state",data:t,success:function(e){200==e.status&&s()},error:function(){}}):$.cookie(e,f,{path:"/",expires:60}))}function n(){t("slide_id")}function i(){t("feature_log_id")}function o(){T.css("display","block"),x.css("display","none")}function a(){M.stop(!0).slideUp("fast"),T.css("display","none"),x.css("display","block"),h&&C.popup({content:g.function_update,className:{popup:"ui popup notice_popup"},position:"bottom left",offset:5}).popup("show")}function r(){if(0!=d){var e=$.cookie("slide_id");$.cookie("feature_log_id")>=f||e>f?d=0:e==f&&(d=1)}}function s(){$.ajax({type:"get",url:"/feature_notifications",success:function(e){if(200==e.status){e=e.data;if(d=null,null==e)return a(),w.attr("href","javascript:void(0)"),!1;w.attr("href",e.url),v.html(e.title),y.html(e.content),A.attr("src",e.image_url),d=e.noti_level,f=e.id,gon.info.current_user.id||r(),2==d&&(o(),M.stop(!1,!0).slideDown(m)),1==d&&(o(),h&&M.stop(!1,!0).slideDown(m)),0==d&&a()}else a()},error:function(){a()}})}function c(){h=!0,C.css("background-color",p),s()}function l(){k&&clearTimeout(k),k=setTimeout(function(){c()},200)}function u(){k&&clearTimeout(k),M.stop(!1,!0).slideUp("fast",function(){2==d&&n()}),b.css("background-color","transparent"),O.css("background-color","transparent"),C.popup("destroy"),h=!1}if(-1!=$("#feature-update-notice").index()){var d=null,p="#41485B",f=null,h=!1,m=150,g={"zh-CN":{function_update:"\u529f\u80fd\u66f4\u65b0"},"zh-TW":{function_update:"\u529f\u80fd\u66f4\u65b0"},en:{function_update:"Function update"}}[gon.locale||"zh-CN"],b=$("#feature-update-notice"),v=b.find(".notice-update-title"),M=b.find(".feature-update-notice-panel"),y=b.find(".notice-update-des"),A=b.find(".notice-img-show"),w=b.find(" a"),z=b.find(".click-knowed"),T=b.find(".bubl-on-icon"),x=b.find(".bubl-off-icon"),O=b.find(".notice-update-icon"),C=b;$("#home-index").index()>-1&&(p="#F0F0F0",C=O),$(window).on("resize",window.globalUtils.debouce(e,400)),$("body").on("fullscreenchange",window.globalUtils.debouce(e,400,!0)),e(),z.on("click",function(e){i(),T.css("display","none"),x.css("display","block"),u(),M.stop(!1,!0).slideUp(),e.stopPropagation()}),$(document).click(function(){2==d&&(M.stop(!1,!0).slideUp(),n())}),M.on("click",function(e){e.stopPropagation()}),s();var k=null;b.mouseenter(l),b.mouseleave(u),M.mouseenter(function(e){e.stopPropagation()})}}),function(e){e.fn.share=function(t){function n(t,n){var i=o(n);"prepend"==n.mode&&i.reverse(),i.length&&e.each(i,function(i,o){var r=a(o,n),s=n.initialized?t.find(".icon-"+o):e('<a class="social-share-icon icon-'+o+'"></a>');if(!s.length)return!0;s.prop("aria-label","\u5206\u4eab\u5230 "+p[o]),s.prop("href",r),"wechat"===o?s.prop("tabindex",-1):s.prop("target","_blank"),n.initialized||("prepend"==n.mode?t.prepend(s):t.append(s))})}function i(e,t){var n=e.find("a.icon-wechat");n.length&&(n.append('<div class="wechat-qrcode"><h4>'+t.wechatQrcodeTitle+'</h4><div class="qrcode"></div><div class="help">'+t.wechatQrcodeHelper+"</div></div>"),n.find(".qrcode").qrcode({width:t.wechatQrcodeSize,height:t.wechatQrcodeSize,text:t.url}),n.offset().top<100&&n.find(".wechat-qrcode").addClass("bottom"))}function o(t){0===t.mobileSites.length&&t.sites.length&&(t.mobileSites=t.sites);var n=(s()?t.mobileSites:t.sites.length?t.sites:[]).slice(0),i=t.disabled;return"string"==typeof n&&(n=n.split(/\s*,\s*/)),"string"==typeof i&&(i=i.split(/\s*,\s*/)),r()&&i.push("wechat"),i.length&&e.each(i,function(t,i){var o=e.inArray(i,n);-1!==o&&n.splice(o,1)}),n}function a(e,t){var n=d[e];for(var i in t.summary=t.description,t)if(t.hasOwnProperty(i)){var o=e+i.replace(/^[a-z]/,function(e){return e.toUpperCase()}),a=encodeURIComponent(t[o]===undefined?t[i]:t[o]);n=n.replace(new RegExp("{{"+i.toUpperCase()+"}}","g"),a)}return n}function r(){return/MicroMessenger/i.test(navigator.userAgent)}function s(){return e(window).width()<=768}var c=e(document.head),l={url:location.href,site_url:location.origin,source:c.find("[name=site], [name=Site]").attr("content")||document.title,title:c.find("[name=title], [name=Title]").attr("content")||document.title,description:c.find("[name=description], [name=Description]").attr("content")||"",image:e("img:first").prop("src")||"",imageSelector:undefined,weiboKey:"",wechatQrcodeTitle:"\u5fae\u4fe1\u626b\u4e00\u626b\uff1a\u5206\u4eab",wechatQrcodeHelper:"<p>\u5fae\u4fe1\u91cc\u70b9\u201c\u53d1\u73b0\u201d\uff0c\u626b\u4e00\u4e0b</p><p>\u4e8c\u7ef4\u7801\u4fbf\u53ef\u5c06\u672c\u6587\u5206\u4eab\u81f3\u670b\u53cb\u5708\u3002</p>",wechatQrcodeSize:100,mobileSites:[],sites:["weibo","qq","wechat","tencent","douban","qzone","linkedin","diandian","facebook","twitter","google"],disabled:[],initialized:!1},u=e.extend({},l,t),d={qzone:"http://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?url={{URL}}&title={{TITLE}}&desc={{DESCRIPTION}}&summary={{SUMMARY}}&site={{SOURCE}}",qq:"http://connect.qq.com/widget/shareqq/index.html?url={{URL}}&title={{TITLE}}&source={{SOURCE}}&desc={{DESCRIPTION}}&pics={{IMAGE}}&summary={{SUMMARY}}",tencent:"http://share.v.t.qq.com/index.php?c=share&a=index&title={{TITLE}}&url={{URL}}&pic={{IMAGE}}",weibo:"http://service.weibo.com/share/share.php?url={{URL}}&title={{TITLE}}&pic={{IMAGE}}&appkey={{WEIBOKEY}}",wechat:"javascript:;",douban:"http://shuo.douban.com/!service/share?href={{URL}}&name={{TITLE}}&text={{DESCRIPTION}}&image={{IMAGE}}&starid=0&aid=0&style=11",diandian:"http://www.diandian.com/share?lo={{URL}}&ti={{TITLE}}&type=link",linkedin:"http://www.linkedin.com/shareArticle?mini=true&ro=true&title={{TITLE}}&url={{URL}}&summary={{SUMMARY}}&source={{SOURCE}}&armin=armin",facebook:"https://www.facebook.com/sharer/sharer.php?u={{URL}}",twitter:"https://twitter.com/intent/tweet?text={{TITLE}}&url={{URL}}&via={{SITE_URL}}",google:"https://plus.google.com/share?url={{URL}}"},p={qzone:"QQ\u7a7a\u95f4",qq:"QQ",tencent:"\u817e\u8baf\u5fae\u535a",weibo:"\u5fae\u535a",wechat:"\u5fae\u4fe1",douban:"\u8c46\u74e3",diandian:"\u70b9\u70b9",linkedin:"LinkedIn",facebook:"Facebook",twitter:"Twitter",google:"Google"};this.each(function(){if(e(this).data("initialized"))return!0;var t=e.extend({},u,e(this).data());t.imageSelector&&(t.image=e(t.imageSelector).map(function(){return e(this).prop("src")}).get().join("||"));var o=e(this).addClass("share-component social-share");n(o,t),i(o,t),e(this).data("initialized",!0)})},e(function(){e(".share-component,.social-share").share()})}(jQuery),moment.tz.setDefault("Asia/Shanghai"),$.cookie("tz",moment.tz.guess(),{path:"/"}),window.updatePage=function(e){return $.ajax({type:"GET",url:location.href,data:e,dataType:"script"})},window.slugify=function(e){return e.replace(/[^-a-zA-Z0-9]+/g,"_").toLowerCase()},window.ajaxGet=function(e){return $.ajax({type:"GET",url:e,dataType:"script"})},window.getUrlParameter=function(e){for(var t=window.location.search.substring(1).split("&"),n=0;n<t.length;n++){var i=t[n].split("=");if(i[0]==e)return i[1]}},window.showAndHide=function(){},window.errorMessage=function(e){var t;return(t=$("<p>")).addClass("error_message"),t.html(e),t},window.split=function(e){return e.split(/,\s*/)},window.extractLast=function(e){return split(e).pop()},window.disableButtonIfEmptyField=function(e,t){var n,i;return i=$(e),n=i.closest("form").find(t),""===i.val()&&n.disable(),i.on("input",function(){return""===$(this).val()?n.disable():n.enable()})},window.sanitize=function(e){return e.replace(/<(?:.|\n)*?>/gm,"")},window.linkify=function(e){var t;return t=/(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/gi,e.replace(t,"<a href='$1'>$1</a>")},window.htmlSafe=function(){var e;return e=$("<div/>"),function(t){return e.text(t).html()}}(),$(function(){$("#my-dynamic").on("click",function(){return document.cookie="source=my;",document.location.reload(!0),!1}),$("#all-dynamic").on("click",function(){return document.cookie="source=;",document.location.reload(!0),!1}),$.timeago&&$(".timeago:not(.no-trans)").timeago(),$(".field.errors").closest(".ui.form").addClass("error"),$(".tree-item-file-name").on("mouseenter",function(){$(this).find("a").innerWidth()>=295&&($(this).css("overflow","visible"),$(this).parent().find(".tree_time_ago").css("display","none"),$(this).parent().find(".tree_author").css("display","none"))}).on("mouseleave",function(){$(this).css("overflow","hidden"),$(this).parent().find(".tree_time_ago").css("display","inline-block"),$(this).parent().find(".tree_author").css("display","inline-block")}),setTimeout(function(){autosize($(".md-input").not("#editor_comment"))},500)}),$(function(){$(".trigger-submit").on("change",function(){$(this).parents("form").submit()}),$("body").on("click",".captcha_img",function(){$(this).attr("src","/rucaptcha?"+(new Date).getTime())});var e=$("#git-message");e.length>0&&(e.click(function(){e.fadeOut()}),e.show(),"undefined"!=typeof flash_time&&null!==flash_time?setTimeout(function(){e.fadeOut()},flash_time):setTimeout(function(){e.fadeOut()},5e3))}),$(document).on("click",'.markdown-body img[class!="emoji"]',function(){var e=[],t=$(this).attr("src");$.each($(this).parents(".markdown-body").find('img[class!="emoji"]'),function(){$(this).closest("a").attr("href")||e.push({src:$(this).attr("src"),element:this})});for(var n=0;n<e.length;n++)if(e[n].src===t&&e[n].element==this){$.fancybox.open(e,{buttons:["close"]},n);break}}),$(document).on("click",".wysiwyg-body .gwe-image__view img",function(){var e=[],t=$(this).attr("src");$.each($(this).parents(".wysiwyg-body").find(".gwe-image__view img"),function(){$(this).closest("a").attr("href")||e.push({src:$(this).attr("src"),element:this})});for(var n=0;n<e.length;n++)if(e[n].src===t&&e[n].element==this){$.fancybox.open(e,{buttons:["close"]},n);break}}),$(function(){var e=$(".git-nav-expand-bar"),t=$("#git-header-nav"),n=t.find(".gitee-nav__sidebar"),i=t.find(".gitee-nav__sidebar-container"),o=t.find(".gitee-nav__sidebar-close-button");e.on("click",function(){n.toggleClass("is-visible")}),n.on("click",function(){n.removeClass("is-visible")}),o.on("click",function(){n.removeClass("is-visible")}),i.on("click",function(e){e.stopPropagation()})}),$(function(){function e(e){var t=e.find(".ui.dropdown").dropdown("get value"),n=e.find(".ui.input input").val();return{"project[name]":n,"project[path]":n,"project[namespace_path]":t,"project[description]":e.data("description"),"project[public]":e.data("public"),"project[import_url]":e.data("import-url"),ignore:e.data("ignore"),license:e.data("license"),come_from:e.data("come-from"),language_name:e.data("language")}}function t(e,t){e.forEach(function(e){e.disabled(),e.$importOperate.html(importI18n.ready)}),$.post(importArgs.importPath,{projects:t}).done(function(t){t&&200===t.status&&e.forEach(function(e){for(var n in t.data)4===t.data[n].state&&e.url===n&&(e.setError(t.data[n].message),e.enabled())})}).fail(function(t){Flash.show(t&&t.responseJSON&&t.responseJSON.message||"\u5bfc\u5165\u5931\u8d25\uff0c\u8bf7\u7a0d\u540e\u518d\u8bd5"),e.forEach(function(e){e.$importOperate.html(u[0]),e.enabled()})})}function n(e){var t=[],n=[];if(e||(e=r.filter(function(e){return 0===e.data.state||4===e.data.state})),e.forEach(function(e){e.$input.parent().removeClass("error"),e.$importOperate.html("...");var i=e.$dropdown.dropdown("get value"),o=e.$input.val();if(!o||!s.test(o))return e.$input.parent().addClass("error"),void e.setError(importI18n.projectPathError);-1===t.indexOf(i)&&t.push(i),-1===n.indexOf(o)&&n.push(o)}),t.length&&n.length){var i={namespace_paths:t,project_paths:n};$.get(importArgs.checkPath,i).done(function(t){t&&200===t.status&&e.forEach(function(e){var n=Object.keys(t.data),i=e.$dropdown.dropdown("get value");if(n.indexOf(i)>-1){var o=t.data[i],a=e.$input.val();o.indexOf(a)>-1?(e.$input.parent().addClass("error"),e.setError(importI18n.sameProjectName)):e.$importOperate.html(u[0])}else e.$importOperate.html(u[0])})})}}var i=$("#project-import-page"),o=i.find("#btn-import-current"),a=i.find("#project-import-list");if(a.length){var r=[],s="",c=!0,l={0:'<div class="not-started"><i class="iconfont icon-stop"></i> '+importI18n.notStart+"</div>",1:'<div class="scheduling"><i class="iconfont icon-task-state-13"></i> '+importI18n.waiting+"</div>",2:'<div class="running"><i class="iconfont icon-sync"></i> '+importI18n.running+"</div>",3:'<div class="done"><i class="iconfont icon-task-mini"></i> '+importI18n.success+"</div>",4:'<div class="fail"><i class="iconfont icon-msg-block"></i> '+importI18n.fail+"</div>"},u={0:'<div class="ui small basic orange button btn-import">'+importI18n["import"]+"</div>",1:'<a href="javascript:;" class="btn-cancel-import">'+importI18n.cancelImport+"</a>",2:"",3:'<a href="$url" target="_blank">'+importI18n.watchProject+"</a>",4:'<i class="project-icon text-red iconfont icon-report" data-content="$message" data-variation="inverted"></i>'};s=new RegExp(importArgs.projectNameRegex),$.prototype.getTask=function(){var e=$(this).closest("tr[data-import-url]").data("import-url");return r.filter(function(t){return t.url===e}).first()},a.find("tbody tr").each(function(){var e=$(this);r.push({url:e.data("import-url"),$importLine:e,$input:e.find(".ui.input input"),$dropdown:e.find(".ui.dropdown"),$importState:e.find(".import-state"),$importOperate:e.find(".import-operate"),needRefresh:!0,data:{state:0},disabled:function(){e.find(".ui.dropdown, .ui.button, .ui.input").addClass("disabled").removeClass("error").prop("disabled",!0)},enabled:function(){e.find(".ui.dropdown, .ui.button, .ui.input").removeClass("disabled").prop("disabled",!1)},setError:function(t){var n=$(u[4].replace(/\$message/g,t));e.find(".import-operate").html(n),n.popup("show")}})}),o.on("click",function(){var n=r.filter(function(e){return 0===e.data.state||4===e.data.state});if(!n.length)return!1;t(n,n.map(function(t){return e(t.$importLine)}))}),a.on("click",".btn-import",function(){var n=$(this).getTask();t([n],[e(n.$importLine)])}),a.on("click",".btn-cancel-import",function(){var e=$(this).getTask();e&&1===e.data.state&&(e.$importOperate.html(importI18n.cancelling),$.ajax({url:importArgs.cancelImportPath,type:"DELETE",dataType:"json",data:{project_id:e.data.id},success:function(t){t&&200===t.status?e.needRefresh=!0:(Flash.error(err.message),e.needRefresh=!0)},error:function(){Flash.error(importI18n.cancelFail),e.needRefresh=!0}}))}),a.find(".ui.dropdown").dropdown({onChange:function(){c||n([$(this).getTask()])}}),a.find(".ui.input input").on("keyup",window.globalUtils.debouce(function(){c||n([$(this).getTask()])},500)),function i(){var e={import_urls:r.map(function(e){return e.url})};$.get(importArgs.realTimeChangesPath,e).done(function(e){e&&200===e.status&&(r.forEach(function(t){var n=e.data[t.url];n?(c&&(t.$dropdown.dropdown("set selected",n.namespace_path),t.$input.val(n.project_path)),t.$importState.html(l[n.state]),(t.data.state!==n.state||t.needRefresh)&&(4===n.state?t.enabled():t.disabled(),t.$importOperate.html(u[n.state].replace(/\$url/g,n.url).replace(/\$message/g,n.message))),t.data=n):t.needRefresh&&(t.enabled(),t.data={state:0},t.$importState.html(l[0]),t.$importOperate.html(u[0])),t.needRefresh=!1}),c=!1,setTimeout(i,5e3))})}()}}),function(e){function n(){B={q1:null,q2a:null,q2b:null,q2c:null,q3:null,q4a:null,q4b:null,q5:null,q6:null,q7:null},R=JSON.parse(JSON.stringify(B)),Q=0,ee=["q1","q2","q3","q4","q5","q6","q7"],Z=["q1","q2a","q3","q4a","q5","q6","q7"],te=null}function o(e,t){Z.forEach(function(e){$(".step-"+e).hide()}),$(".step-"+e).show(),f(ze),s(e),l(t)}function a(){var e=!1;$.each(R,function(t){B[t]=e?null:R[t],Z[Q]===t&&(e=!0)})}function r(){Y.on("click",function(e){var t=$(e.target).closest(".portlet");t.length&&(P.find(".portlet").attr("class","portlet"),te=t.data("value"),G.removeClass("disabled"),t.addClass("selected"))})}function s(e){var t=$(".step-"+Z[Q]).find(".ui.dropdown").dropdown("get value");t=t.indexOf("-1")>0?null:t,e===Z[0]?U.hide():U.show(),
DesignScreenshot/output/gitee_run/gitee.com_3_credentials_filled.html:470:"undefined"==typeof MX&&(MX={}),MX.XML={ToJSON:function(e,t){if(e.hasChildNodes()){var n=this.ParseNode(e,t);return n["X-Parse-Engine"]="MX.Util.XML",n["X-JSMX-Framework"]="Version 1.2",n}return null},ParseNode:function(e,t){var n={$attribute:null,$count:0,$value:""},i=null;if(e.attributes){n.$attribute={};for(var o=0,a=e.attributes.length;o<a;++o)i=e.attributes[o],n.$attribute[i.nodeName]=i.nodeValue}if(e.hasChildNodes()){3==e.firstChild.nodeType&&(n.$value=e.firstChild.nodeValue.replace(/\n\r*/g,"").replace(/^\s+/,"").replace(/\s+$/,""));var r="",s=null,c=0;for(o=0,a=e.childNodes.length;o<a;++o)if(3!=(i=e.childNodes[o]).nodeType){if(r=i.nodeName,s=this.ParseNode(i,t),null==n[r]){if(n.$count++,!t){c=0;for(var l=0,u=e.childNodes.length;l<u&&(e.childNodes[l].tagName==r&&c++,2!=c);++l);if(1==c){n[r]=s;continue}}n[r]=[]}n[r].push(s)}}return n}},function(){function e(e,t,n){$.ajax({type:"post",url:o+"/star_collections",data:{name:e},dataType:"json",success:function(e){200==e.status?t&&t(e):Flash.error(e.message)},error:function(e){Flash.error(e.responseJSON.message)},complete:function(){n&&n()}})}function t(e,t,n){$.ajax({type:"get",url:o+"/star_collections/my_star_collections",data:{project_id:e||""},dataType:"json",success:function(e){200==e.status?(t&&t(e.data.data),r=e.data.data||[]):Flash.error(e.message)},error:function(e){Flash.error(e.responseJSON.message)},complete:function(){n&&n()}})}function n(e,t,n){e&&t&&$.ajax({type:"post",url:o+"/star_collections/"+t+"/project",data:{ids:[e]},dataType:"json",success:function(e){200==e.status?n&&n(e):Flash.error(e.message)},error:function(e){Flash.error(e.responseJSON.message)}})}function i(e,t,n){e&&t&&$.ajax({type:"delete",url:o+"/star_collections/"+t+"/project",data:{ids:[e]},dataType:"json",success:function(e){200==e.status?n&&n(e):Flash.error(e.message)},error:function(e){Flash.error(e.responseJSON.message)}})}var o=window.gon&&window.gon.info.current_user?"/"+window.gon.info.current_user.username:"";if(o){var a="",r=[],s=window.gon.locale||"zh-CN",c={"zh-CN":{title:"\u5df2\u6210\u529f Star\uff0c\u6dfb\u52a0\u5230\u4ee5\u4e0b\u661f\u9009\u96c6\uff1a",tipCreate:"\u70b9\u51fb\u4e0b\u65b9\u65b0\u5efa\u661f\u9009\u96c6",newCreateBtn:"\u65b0\u5efa\u661f\u9009\u96c6",newCreateInput:"\u8bf7\u8f93\u5165\u661f\u9009\u96c6\u540d\u79f0",create:"\u65b0\u5efa",search:"\u5feb\u901f\u641c\u7d22"},"zh-TW":{title:"\u5df2\u6210\u529fStar\uff0c\u6dfb\u52a0\u5230\u4ee5\u4e0b\u661f\u9078\u96c6\uff1a",tipCreate:"\u9ede\u64ca\u4e0b\u65b9\u65b0\u5efa\u661f\u9078\u96c6",newCreateBtn:"\u65b0\u5efa\u661f\u9078\u96c6",newCreateInput:"\u8acb\u8f38\u5165\u661f\u9078\u96c6\u540d\u7a31",create:"\u65b0\u5efa",search:"\u641c\u7d22"},en:{title:"Starred, you can add it to collections",tipCreate:"Create new collection by clicking the button below",newCreateBtn:"New Collection",newCreateInput:"Please type the collection's name",create:"Create",search:"Search"}},l=function(e){return c[s][e]},u=function(){var e=function(){var e='<div class="star-collection-popup d-none">\n                  <div class="star-collection-popup__header d-flex-between">\n                    <div class="star-collection-popup__header__left">'.concat(l("title"),'</div>\n                    <div class="star-collection-popup__header__right"><i class="iconfont icon-close js-close-popup cursor-pointer hover-color"></i></div>\n                  </div>\n                  <div class="star-collection-popup__body">\n                    <div class="blank-message d-none">').concat(l("tipCreate"),'</div>\n                    <div class="star-collection-popup__search ui input small icon">\n                      <input type="text" class="js-star-collection-search"  placeholder="').concat(l("search"),'"/>\n                      <i class="iconfont icon-search"></i>\n                    </div>\n                    <div class="star-collection-popup__scroll">\n                      <div class="star-collection-popup__list js-star-collection-popup__list">\n\n                      </div>\n                    </div>                    \n                  </div>\n                  <div class="star-collection-popup__footer js-star-collection-popup__footer">\n                    <div class="star-collection-popup__footer--normal js-new-star-collection-btn cursor-pointer hover-color">').concat(l("newCreateBtn"),'</div>\n                    <div class="star-collection-popup__footer--new d-flex-between">\n                      <input class="star-collection-popup__footer__new-input js-star-collection-popup__footer__new-input" maxlength="35" type="text" placeholder="').concat(l("newCreateInput"),'"/>\n                      <div class="star-collection-popup__footer__add-btn js-star-collection-popup__footer__add-btn cursor-pointer hover-color disabled">').concat(l("create"),"</div>\n                    </div>\n                  </div>\n                 </div>");return $(e)}();return $("body").append(e),e};$(function(){var o=u(),s=o.find(".star-collection-popup__scroll"),c=o.find(".js-star-collection-popup__list"),l=o.find(".js-new-star-collection-btn"),d=o.find(".js-star-collection-search"),p=o.find(".js-star-collection-popup__footer"),f=p.find(".js-star-collection-popup__footer__new-input"),h=p.find(".js-star-collection-popup__footer__add-btn"),m={offsetX:8,offsetY:0},g={width:o.outerWidth(),height:o.outerHeight()},b=function(){o.hide()},v=function(e){o.show(),e&&t(e,function(e){x(e),A(e.length)})},M=function(e,t){var n=e.offset();o.css({position:"absolute",zIndex:"1003",position:"absolute",left:Math.max(0,n.left-t.offsetX-g.width)+"px",top:Math.max(0,n.top+t.offsetY)+"px"})},y=function(){p.toggleClass("js-star-collection--editing")},A=function(e){var t=o.find(".blank-message"),n=o.find(".star-collection-popup__search"),i=o.find(".star-collection-popup__scroll");e?e<10?(n.hide(),t.hide(),i.show()):(n.show(),i.show(),t.hide(),i.css({height:"120px"}),d.val(""),setTimeout(function(){d.focus()},200)):(t.show(),n.hide(),i.hide())},w=function(e,t){return!e||e.length<=0?[]:t?e.filter(function(e){return e.name.indexOf(t)>-1}):e},z=function(e){return e?"/assets/gitee_stars/success.png":"/assets/gitee_stars/add.png"},T=function(e){return 0===e?'<i class="iconfont icon-lock ml-1"></i>':""},x=function(e){if(0===e.length)return c.html(""),"";var t="";e.forEach(function(e){var n=z(e.is_endorse),i=T(e.status),o=window.filterXSS(e.name,{stripIgnoreTag:!1,whiteList:{}});t+='<div data-id="'.concat(e.id,'" data-is_endorse="').concat(e.is_endorse?1:0,'" class="star-collection-popup__list__item d-flex-between cursor-pointer">\n        <div class="star-collection-popup__list__item__left d-align-center">\n          <div class="star-collection-popup__list__item__name" title="').concat(o,'">').concat(o,"</div>\n          ").concat(i,'\n          <div class="star-collection-popup__list__item__number ml-1">').concat(e.count,'</div>\n        </div>\n        <img class="star-collection-popup__list__item__status" src="').concat(n,'"/>\n      </div>')}),c.html($(t))};o.on("click",function(e){e.stopPropagation()}),$("body").on("click",function(){b()}),$(window).on("resize",window.globalUtils.throttle(function(){b()},800)),o.on("click",".js-close-popup",function(){b()}),l.on("click",function(e){y(),f.is(":visible")&&window.globalUtils.getFocus(f,e)}),f.on("input",function(){window.filterXSS(f.val().trim()).length>0?h.removeClass("disabled"):h.addClass("disabled")}),d.on("input",function(){var e=$(this).val().trim(),t=w(r,e);x(t)}),h.on("click",window.globalUtils.throttle(function(){if(!h.hasClass("loading")&&!h.hasClass("disabled")){var n=f.val().trim();h.addClass("loading"),e(n,function(){f.val(""),h.addClass("disabled"),a&&t(a,function(e){x(e),y(),A(e.length),s.scrollTop(0)})},function(){h.removeClass("loading")})}},800)),$(window).on("click:star",function(e,t){var s=$(t.el||t.e.currentTarget),c=t.projectId;a=c,s.length?(M(s,t.params||m),v(c),o.off("click",".star-collection-popup__list__item").on("click",".star-collection-popup__list__item",function(){var e=$(this),t=e.attr("data-id"),o=1==e.attr("data-is_endorse"),a=e.find(".star-collection-popup__list__item__status"),s=e.find(".star-collection-popup__list__item__number"),l=(r||[]).findIndex(function(e){return e.id==t});o?i(c,t,function(){if(e.attr("data-is_endorse",0),a.attr("src",z(0)),s.text(parseInt(s.text())-1),l>-1){var t=r[l];t.is_endorse=!1,t.count=t.count-1}}):n(c,t,function(){if(e.attr("data-is_endorse",1),a.attr("src",z(1)),s.text(parseInt(s.text())+1),l>-1){var t=r[l];t.is_endorse=!0,t.count=t.count+1}})})):console.error("Target element not found")})})}}(),$(function(){if($(".markdown-body").length<=0)return;const e="user-content-",t=function(){return decodeURIComponent(window.location.hash.slice(1))},n=function(){return document.getElementById(e+t())},i=function(e,t){e&&t&&setTimeout(function(){$("html, body").animate({scrollTop:$(t).offset().top-50},500)},100)};i(t(),n()),window.addEventListener("hashchange",function(){i(t(),n())})}),$(function(){var e=window.gon.locale||"zh-CN",t={"zh-CN":{copy_success:"\u590d\u5236\u6210\u529f",copy_error:"\u590d\u5236\u5931\u8d25, \u8bf7\u624b\u52a8\u590d\u5236",blank:"\u4ee3\u7801\u5757\u4e3a\u7a7a",tip:"\u70b9\u51fb\u590d\u5236"},"zh-TW":{copy_success:"\u8907\u88fd\u6210\u529f",copy_error:"\u8907\u88fd\u5931\u6557\uff0c\u8acb\u624b\u52d5\u8907\u88fd",blank:"\u7a0b\u5f0f\u78bc\u584a\u70ba\u7a7a",tip:"\u9ede\u64ca\u8907\u88fd"},en:{copy_success:"Copy successfully",copy_error:"Copy failed, please copy manually",blank:"Code block is empty",tip:"Click copy"}},n=function(n){return t[e][n]};$(document).on("mouseenter",".markdown-body .markdown-code-block",function(){var e=$(this).find(".markdown-code-block-copy-btn");e.data("add-popup")||(e.data("add-popup",!0),e.popup({position:"left center",inline:!0,setFluidWidth:!1,html:`<div class='markdown-code-block-copy-tip tip-state'>${n("tip")}</div>`,on:"manual"}))}),$(document).on("mouseleave",".markdown-body .markdown-code-block",function(){$(this).find(".markdown-code-block-copy-btn").popup("hide")}),$(document).on("mouseenter",".markdown-body .markdown-code-block .markdown-code-block-copy-btn",function(){$(this).popup("show")}),$(document).on("mouseleave",".markdown-body .markdown-code-block .markdown-code-block-copy-btn",function(){$(this).closest(".markdown-code-block").find(".tip-state").length>0&&$(this).popup("hide")}),new Clipboard(".markdown-body .markdown-code-block-copy-btn:not(.success)",{target:function(e){return $(e).closest(".markdown-code-block").find("pre")[0]}}).on("success",function(e){e.text?(e.clearSelection(),i(e)):Flash.error(n("blank"))}).on("error",function(){Flash.error(n("copy_error"))});var i=window.globalUtils.debouce(function(e){var t=$(e.trigger);t.addClass("success"),t.popup("change content",`<div class='markdown-code-block-copy-tip success-state'>${n("copy_success")}</div>`),t.popup("show"),setTimeout(function(){t.removeClass("success"),t.popup("hide"),setTimeout(function(){t.popup("change content",`<div class='markdown-code-block-copy-tip tip-state'>${n("tip")}</div>`)},100)},1200)},200)}),window.ThemeSelector=function(){function e(){var e=localStorage.getItem("theme");return e=e&&["light","dark","system"].includes(e)?e:"system"}function t(){var e=["theme-options","theme-options-mobile","theme-arrow","theme-arrow-mobile"].map(function(e){return document.getElementById(e)}),t=e[0],n=e[1],i=e[2],o=e[3];t&&(t.style.display="none",i&&(i.className="fa fa-angle-down theme-arrow")),n&&(n.style.display="none",o&&(o.className="fa fa-angle-down theme-arrow-mobile"))}function n(e){var t,n,i=["theme-icon","theme-icon-mobile"].map(function(e){return document.getElementById(e)}),o=i[0],a=i[1],r="fa fa-adjust",s="\u8ddf\u968f\u7cfb\u7edf";e===h?(r="fa fa-sun-o",s="\u4eae\u8272\u6a21\u5f0f"):e===m&&(r="fa fa-moon-o",s="\u6697\u9ed1\u6a21\u5f0f"),o&&(o.className=r,(t=o.closest(".theme-selector"))&&(t.title=s)),a&&(a.className=r,(n=a.closest(".theme-selector-btn-mobile"))&&(n.title=s))}function i(e){var t,n,i,o=["theme-system-option","theme-light-option","theme-dark-option","theme-system-option-mobile","theme-light-option-mobile","theme-dark-option-mobile"].map(function(e){return document.getElementById(e)}),a=o[0],r=o[1],s=o[2],c=o[3],l=o[4],u=o[5],d=[];for(t=0;t<o.length;t++)(n=o[t])&&n.classList.remove("selected","active");for(e===f?d.push(a,c):e===h?d.push(r,l):e===m&&d.push(s,u),t=0;t<d.length;t++)(i=d[t])&&i.classList.add("selected")}function o(e){e===f?(document.documentElement.classList.remove("dark-mode-override"),document.documentElement.classList.remove("dark-mode")):(document.documentElement.classList.add("dark-mode-override"),e===m?document.documentElement.classList.add("dark-mode"):document.documentElement.classList.remove("dark-mode"))}function a(e){localStorage.setItem("theme",e),o(e),n(e),i(e),t()}function r(e){var t=document.getElementById("theme-options"),n=document.getElementById("theme-arrow");e&&e.stopPropagation(),t&&("none"!==t.style.display?(t.style.display="none",n&&(n.className="fa fa-angle-down theme-arrow")):(t.style.display="block",n&&(n.className="fa fa-angle-up theme-arrow")))}function s(){var e=document.getElementById("theme-options-mobile"),t=document.getElementById("theme-arrow-mobile");e&&("none"!==e.style.display?(e.style.display="none",t&&(t.className="fa fa-angle-down theme-arrow-mobile")):(e.style.display="block",t&&(t.className="fa fa-angle-up theme-arrow-mobile")))}function c(){var t=e();o(t),n(t),i(t)}function l(){g&&b&&(g.removeEventListener?g.removeEventListener("change",b):g.removeListener(b)),v&&document.removeEventListener("click",v),g=null,b=null,v=null}function u(){window.matchMedia&&(g=window.matchMedia("(prefers-color-scheme: dark)"),b=function(){e()===f&&o(f)},g.addEventListener?g.addEventListener("change",b):g.addListener(b))}function d(e){e.target.closest(".theme-selector, .theme-selector-mobile, .theme-options, .theme-options-mobile")||t()}function p(){l(),c(),u(),v=d,document.addEventListener("click",v)}var f="system",h="light",m="dark",g=null,b=null,v=null;return window.ThemeSelector&&window.ThemeSelector.initialized?window.ThemeSelector:("loading"===document.readyState?document.addEventListener("DOMContentLoaded",p):p(),{setTheme:a,toggleThemeSelector:r,toggleThemeSelectorMobile:s,getCurrentTheme:e,initialized:!0})}(),window.setTheme=window.ThemeSelector.setTheme,window.toggleThemeSelector=window.ThemeSelector.toggleThemeSelector,window.toggleThemeSelectorMobile=window.ThemeSelector.toggleThemeSelectorMobile;var aiLoadingTimer=0,aiSkylineData={persona_ident:"",personas_list_url:"",request_url:"",result:{expire:0,token:""},status:""};window.addEventListener("beforeunload",function(){window.jqxhr&&window.jqxhr.abort(),handleClearTimeout()}),window.Gitee.aiAssistant={aiSkylineData:aiSkylineData,getAiSkylineToken:getAiSkylineToken,checkAIAssistantExpire:checkAIAssistantExpire};</script>
DesignScreenshot/output/gitee_run/gitee.com_3_credentials_filled.html:474:<script>!function(n){var i={};function r(t){if(i[t])return i[t].exports;var e=i[t]={i:t,l:!1,exports:{}};return n[t].call(e.exports,e,e.exports,r),e.l=!0,e.exports}r.m=n,r.c=i,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=12)}([function(t,e,n){var i,h,r,o,a,s,d,c,l,u,f,p,g;t.exports=(i=i||(h=Math,r=Object.create||function(){function n(){}return function(t){var e;return n.prototype=t,e=new n,n.prototype=null,e}}(),a=(o={}).lib={},s=a.Base={extend:function(t){var e=r(this);return t&&e.mixIn(t),e.hasOwnProperty("init")&&this.init!==e.init||(e.init=function(){e.$super.init.apply(this,arguments)}),(e.init.prototype=e).$super=this,e},create:function(){var t=this.extend();return t.init.apply(t,arguments),t},init:function(){},mixIn:function(t){for(var e in t)t.hasOwnProperty(e)&&(this[e]=t[e]);t.hasOwnProperty("toString")&&(this.toString=t.toString)},clone:function(){return this.init.prototype.extend(this)}},d=a.WordArray=s.extend({init:function(t,e){t=this.words=t||[],this.sigBytes=null!=e?e:4*t.length},toString:function(t){return(t||l).stringify(this)},concat:function(t){var e=this.words,n=t.words,i=this.sigBytes,r=t.sigBytes;if(this.clamp(),i%4)for(var o=0;o<r;o++){var a=n[o>>>2]>>>24-o%4*8&255;e[i+o>>>2]|=a<<24-(i+o)%4*8}else for(var o=0;o<r;o+=4)e[i+o>>>2]=n[o>>>2];return this.sigBytes+=r,this},clamp:function(){var t=this.words,e=this.sigBytes;t[e>>>2]&=4294967295<<32-e%4*8,t.length=h.ceil(e/4)},clone:function(){var t=s.clone.call(this);return t.words=this.words.slice(0),t},random:function(t){for(var e,n=[],i=function(e){var e=e,n=987654321,i=4294967295;return function(){var t=((n=36969*(65535&n)+(n>>16)&i)<<16)+(e=18e3*(65535&e)+(e>>16)&i)&i;return t/=4294967296,(t+=.5)*(.5<h.random()?1:-1)}},r=0;r<t;r+=4){var o=i(4294967296*(e||h.random()));e=987654071*o(),n.push(4294967296*o()|0)}return new d.init(n,t)}}),c=o.enc={},l=c.Hex={stringify:function(t){for(var e=t.words,n=t.sigBytes,i=[],r=0;r<n;r++){var o=e[r>>>2]>>>24-r%4*8&255;i.push((o>>>4).toString(16)),i.push((15&o).toString(16))}return i.join("")},parse:function(t){for(var e=t.length,n=[],i=0;i<e;i+=2)n[i>>>3]|=parseInt(t.substr(i,2),16)<<24-i%8*4;return new d.init(n,e/2)}},u=c.Latin1={stringify:function(t){for(var e=t.words,n=t.sigBytes,i=[],r=0;r<n;r++){var o=e[r>>>2]>>>24-r%4*8&255;i.push(String.fromCharCode(o))}return i.join("")},parse:function(t){for(var e=t.length,n=[],i=0;i<e;i++)n[i>>>2]|=(255&t.charCodeAt(i))<<24-i%4*8;return new d.init(n,e)}},f=c.Utf8={stringify:function(t){try{return decodeURIComponent(escape(u.stringify(t)))}catch(t){throw new Error("Malformed UTF-8 data")}},parse:function(t){return u.parse(unescape(encodeURIComponent(t)))}},p=a.BufferedBlockAlgorithm=s.extend({reset:function(){this._data=new d.init,this._nDataBytes=0},_append:function(t){"string"==typeof t&&(t=f.parse(t)),this._data.concat(t),this._nDataBytes+=t.sigBytes},_process:function(t){var e=this._data,n=e.words,i=e.sigBytes,r=this.blockSize,o=4*r,a=i/o,s=(a=t?h.ceil(a):h.max((0|a)-this._minBufferSize,0))*r,c=h.min(4*s,i);if(s){for(var l=0;l<s;l+=r)this._doProcessBlock(n,l);var u=n.splice(0,s);e.sigBytes-=c}return new d.init(u,c)},clone:function(){var t=s.clone.call(this);return t._data=this._data.clone(),t},_minBufferSize:0}),a.Hasher=p.extend({cfg:s.extend(),init:function(t){this.cfg=this.cfg.extend(t),this.reset()},reset:function(){p.reset.call(this),this._doReset()},update:function(t){return this._append(t),this._process(),this},finalize:function(t){t&&this._append(t);var e=this._doFinalize();return e},blockSize:16,_createHelper:function(n){return function(t,e){return new n.init(e).finalize(t)}},_createHmacHelper:function(n){return function(t,e){return new g.HMAC.init(n,e).finalize(t)}}}),g=o.algo={},o),i)},function(t,e){t.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADYAAAA2CAMAAAC7m5rvAAAAV1BMVEUAAAAEBAQBAQEAAAAAAAAHBwcDAwNHcEwAAAAAAAD09PS/v7/8/PwBAQGcnJz4+Pj9/f3Pz8/////x8fHS0tK7u7vq6updXV3l5eXt7e3e3t75+fn///8na/+JAAAAHHRSTlMCCxUaBxAeAAEErVTgJ0TI7zb1k3QlqCt5g0vUK9r+DQAAArtJREFUSMeVlouOqjAQhumNpcCCgoi4ff/nPHNpC9ICnklMMOFjOte/xU9qVVEs7WiMlMYIbW1RVftXiixmb849pVIACqGLlEuwqgJKjw64siyVRH8pV6RQYa0WNXK/v2XJ3DnGlBbCyA8O3J1gDBGlyqfnlCR3h9jqyjTLs4esMAfuTjDOhRbmPrYuWneNkaupdlu7wpgyy4Av356PpvuDhwcd8jg2piZ81dUNVGwOlDLHKWHqjkH1CG2oswIQdsfkvbA3lKdim+TLTdQEvm4NdRQV+7FtrmxPQsG06IHq+FUDX3hI5UfgsJVD9zbegXjXb4Mm8hRj6GwKcdGsYIeR5amAWQ3R9CEYGE2LJPzyVMD03R8RfcE84/SgFXmKMB9ZvclctCpLRayNzqhKG/scR28egzPegjM+1h4Jk8VnYEwv6xmT/tstDI6YsZqbQubadjf7nF78b3VPofkz/hxgPPtYVesxyEh3jdnpNQmDoMdgOOcLDFvpz7XUcv+FWePcIGlTf39ILlPLG/77lEC+39C3SqmAfVMAbKUXVXeDXZcbMBSGZYtlmiuttRa3mIGDVs5QFkNr8duhALvBSWesomUDZxzDK7kx3XPUjeLtNlXKLYUd55Woj3nknuQVNKwriLnqU78g+0N0drDwNG+RiicTGx+POK5fza5XGg6/UizpKy76fs1Zfpkbmg5v8GjeQLXzKgkf0jHEFStpI7PBI8S1BoZ1PRAqJYkkkw0c37XdGnbEgiz2URZxQMgaUuV+3lKJCI8swjWI8Dx3zaOmC8Mw0ncidSn5ZHVXhvuXb9irCwYENXqINMW3Qf46c1/qvh2Gtq+XTikPbZvn4PKEl0kpmfDV+BCt7FVNc7WiiQhVJxdDWtm+1CypOvTo6TWUFEJHC/JYXVx6vSBFQU3VsTgUJR6aVBvJ/gHQeVzeaHqlAQAAAABJRU5ErkJggg=="},function(t,e){t.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAXcAAAA2CAMAAAALbSmxAAAAQlBMVEVHcEzW2O0FBQUPDxAEBAQEBAQBAQEAAAABAQHZ3PHKzuCussK9wNLU2OyIiZbW2u+bnavQ1OfR1ejS1uq8wNHIzN+f90J/AAAAFnRSTlMAuhMcCQ4XAQW3aT9lrDK0HIaToFJ8MqDAuAAADqZJREFUeNrsmteCnToMRcGUAzaYZv7/V6+qCyW5mWTehpdkOCDsZVnaElTVy/GBY4CjhaOTA//f4skBf/1UP8e/Pj6CnZkbPBL6H/DfiZ2pGzdtx7zU87GfwV/J/5D6BuxA3Z1LPdZ8jHAcdv0B/63cEXs4lPmyb6c9t2MZx3NV8D/cv8Xb102oH5Pvewnw7pxH2/6A/4ZsKqHdzYx9dw1Sj0m1C/O+/nD/59RJJgL2hbDPoUHsqiHJ0dft+AH/LdDb1jP2wwt21e3449CGPaXWH3T/Qq8P7NOGM+rRAHaiPsSDXN7ZtxCvoepzO/H5y+D3+cvbr0au5z5/cDzbfZv6+0SuxenEQaZB7oCdXTtih3Vwa/cE/jej+1tsX749VnovlH9HXXzu8fzLulS/InEtTttudc55P1NK9Ql7ukKaBr6TbXBf4DSY64m/CH9fAp8zG4r+RobzRje/dng6Pi926WS5kOWylC2WVJyGbR7pIOwnR5k2p65NA2kcXMjnw7lN5kvgLwa/VHUPSRJEM7eRXa7MImtbHnzH8GT3berPJBTqagW6cvc37N0a7Lbv+zmhuIyRP+euGUAfl/7+CveE4wtJvPAWkcEFhTYvRIorO/2pzduCWZPkwa6qjstCXkm0rcxETk1Qi44zEHUuTDslVSQrl+E96xTrV4j9pxfyGRG5MJtOcooviZ/S4J8ZiM2OrLGnZrKf8pHKlQX77rLFhfKD3ctCfsq/40LxEGRq6wHUN6e2zXrWJ1ZLCftql0Rd4tAV/KcK1tqQpjN8Vjhh1+5X2O5JM8t21Wp3bgqxgccc+5h2ZdhhO+Z63s/AJbeCH1ocmDdxAjhyOYLzzMHeDy/rcbfbooUuPQEtTvHv4ePg5ykOoSJvh+J0PFxaakycLtng8vWCndS9gI+ZYoXlW7xJ2tPCbVs23z890MBYTOe3Ci/HjrtYR+v6BH4YAoZTGz1n2PL5jTtebGLITQdT6Z7sgoVZXI5GvgPT6ODDgJ5d+15CN3F32O9KW6bMIhSFLD/m4Dhkdwk2GXiZK2LajW6VwWHw8vrXu0LLfyzzDw53z13gpukupyJ32Gx7Ae5M+1M4z5rChs92YYxLkiW7yB0Zod36ardD7ibFiA9yN3HqjixNjYCvYAgr+PJkdLtcRVPEvlgM6dQiM94uUlhxDlB1NuDTxtAz+LYFanXQPPEswQo1dj+HCzkVtVv+zutJ4UV3bwnPZp13YcPhTmkkK5MLETxQWyY6zo1ktOv7SYILtqn4N4wznXm0S9x54uwhyD3tp5MeeOjzMDYc6O29uRSmQ1JHE96ze9IwGor8LlpTNY9MFic0e76wxRu3TPlc2bYPwu1yqrVbSJp1+NXluWpCF8AlW1yPQwRPmYmlYoDfZpjBro6D3KlOpIsnrhpluh7R0m88EJzVza4R7opjEO6yrC1kx01EIg6hoiHspjcvQRhuCYj9vDbIzM5iUx1eY6pV1qZb4WGLrsEzrItCu52iv/MAWGq3QuXlahM9YMYY18uwOw/BdNM8itH2DDz+nkwrd0Z9yk905zoKd/YftitCOto1ZgOHSxqPdptwbymd1P5IjloNAGd0fSZeiqp2oOgPu6op3Xag56eAFWc7UGxxFJCwgx/4vnVdBVaF/0VadMr4MIl8wPpgNXQquKTP4DINge0KGjfEyweygK8i4/VDSjUUoUKvw247+HtZU96pXbMQTyYj3AWmg5E70WuRe8+xEx0rNFe76O+yRzr2oH1McRidf2+mmFHaCoe39ZlUvypgXF7CblKUll7xmAWsTxQROCcaAPrTzoPHsamXikDBU8ZxR2Lz5Ga08zhzjJvQxnwkAsltnOZGubyj0H9Kw7o3mbbC6A7+dCQOICmh4nPsOejd8NuZMpT6uwTSNbkUrDY8dFJvb9/sCvdGU1uXcUcTY2g8ZRS6sxpm9grT3SQ2UezQffem2BAagLCO8nmAT5HGwgiA6eIbJbqYNG4LTPFUWLQMI5LI/ayLU51wh/+FpC4WR6uJz9lzAaJFScWJZpyyfZ8XYLjHgaSryaujCiz9PaivMncx377Yjdx16TAOR+44WfhpV0dsK5xXk9LwrfBAvXU0+YbQOMQyx925U6Tx6E1xuMydwSN3sGf5ddY0baLFesNq9bAsVDkzEHccHv5n2W1WTBtahuWc7KGXd4k7Xu8yhxpSy4IylmfP0OovxXdqyNbJo7IVVGn8ZLdV7g1LvsQdJg3OfUIiDmq2q6xm4RikC+xB5MktDmlECXli5btQq9a7q1UuCHcxUnCnsEmSoNFT1I7rJ10Lp9UGgnEG4/Wk2xWx46sZihiwxdJIYBSBb5TsU4pOjLaAocEHCurInUQK7MNFpfaF+4td4r6c2THLCwwOluCgcCw0TLi3OnEID9ylTMWc6p7CP4V+zqA59xRpFooy2T574L7RRAkkZjHLS0Vzx7CN08PlI8ffjwXCE3JHN8V428dmNZ3asxTPabXuI5+iA8n+AocoRFXfzsPhbmK/5P5il7jfKnrmHhe12TSzVhurnb7krt8UZJLllnWZe76780hT15lYGG7c2dccM/YjVzCWKxni4DGoAlDhztufsPcYJmlXZMu0jdrIoxQPgzj5kTqxnLtEW7jz4D1J26lEtqUIXnJ/sfvOnfW0pQc6mbRB7kvf3OFF7OcLdokz2WQz8I4qrdjAT9y7yH2iPU5ZyIhgsHoKGcOzUeyW3BsoEUNgWk1DwYWvt2Ndl9wtD+4WZyAFziPttIYHQZvSlNTmKXvBeff3u12O71Lx8nEwd5jfJOmEM8pG3C2fS532rCN/jFEIPmhMrrj6K3cW8RQmaJeRpr5y5ykvqh+YO26BJerkfSS4kbvp/LlEMMpdokQnuz/jnsfhoWiABw0zHGi4IkTuBx37aUOTNS9L7p83u13Kq4Wegb8OUpSNJiLEXaEZqUXbsmVP2Knk79KaFNF/p/FcU4NIHXVdLcsz7nXOHU+NJOuQ+9wkQU2DTdzPvBmVuLPVO/dMd3BDEMssrLOuIYXl41bnaqTLmvXveqa0m3Qkl8+Ru7v01tBXKu7cNk2mR6UcReyLby4KMsUhlC3LNbyrw9NuvHGnIZXcjXLvf+3vPVqcsTfu/Xbl3t65U0v67PvUCkMxZ6kmugTikHOXiJa/iSq5v9qNdZP0NKRu6qWyK6J+X6Gm0kicdz3oe7HFFdjzV7bs7jZViVWRcpm7Zh8WAVwmYCkYufcF9xhtH+K7HyUow//3/8GdWjDiNp2GF6rA8GOJOR6amzd1/LyX9Hng/mr3pU/Qo3hc4vMWnmNFcVAEnVrqOE89Yk+BKKA4kjL2Wuhq9tEfaWxJIE4591a5X/RMneuZJkjCaHpSwZG78Lhw10BjdZNBvD1QuQEfyXc8ml4D7lbn1Ir30SX3z5td4p7VsdQXk3aJS6UBZ5SKfqcub/oO0jiqvmdXjmMoOriO+mkm1eYv3Ck1OepPoK/6OuPe59xZx8/P+r2Hv5eeR2/rgrsWZlfuNDHLzWvQTBsvpHGjqH/pCEj1RtzzF5dxcyt32djPdvN+ZNkHxt2pk5J0u2Cc4cYXLAKJafi1QZ1Gr/H6Entq5cK/+OLPGvMgdWIzMHGnYDvj0ja7lqnM3WTcKc681Kv9pCUfX7VL3aQ88Hmx25HJXP6uFswcavCkxoM2pymeIR7knquU9AIlcae9y+X41e69//4R7l4erO1LUlM9xmL99HfeTmvPIyqGrAX50Q/FtAse5NVg9/TKWrnHVaFqY1w2C8XzIlEZk6h25sXf0ZGP+jjDeenPGP53OZ1DWazFKd1mtCAeoxeo4ArcR5uh1KUZoT1sie19iql0p1PuyUA2F+JuYkB9thvfN3Xl+yaalIsv4ECv0AC43j9u72/nkD6N/FTDZ3OdvH+gNummQ3n8UkC4r9kHCfg0bthi78OyPoktSrGGS+GPx34kKXRpRk6TzJVvozEw9y51LO5v409KRsgsmPRyjfqLmyHuke0j9wj082SXO2txCOn96iyvWWPgQHaex9ddPtJYzviWiN0VyJxOXq52bgOIc3jFHrl3XaotVn5xvPseuUsfuGzJwynUkTs60VL032mxw0wWDoeKZDeG++/yngmflz5OiRVGZ8WlYs8e1Uj2qRvnv2U1RK27JysJklP2ScOT3TZ+TxCv2uh7AievG9KL+f/aOdslB0EYitJZralYqwXf/1VX5CvEoLZbZnbGOv1lJUpEJMm5LntEhJKC05/6J3odYtxv5qFuepqRe5uGUPTk0BWR4kY26yBNWSiSQWZyrZJ6nfX7vGbXPQc31FLbYhMWF/pz4PMlzJOpUdlWyzCo/ISJ8SJcWmQWCaQvnN0KCKIV1ZDYsM2fz/sjXFfPhtqu070b1TVGnXCIN99WC/xEYyxeVxEujimdkpKrz1ddMZkVsCvzYwxgcI7AawS+C6hXcmWrUvoaimI6w9ilR7GG/X6MpQYgLYUJ7Ry4TLkP8zJpJT1iFydlL4PiGyFbfKVl8E3+gIFCM1gqMYgoRUSHQMP6PW3C2W0gi+SuPQGRVpar4n5wuwm9LqGmngxGnjZdUccb1AzSPOAsDuJtANJ+8Vx0sxKSpxIWcofS2Bvy2PLaNmOXXkLesNsfTAspXahK72C1JLlQGE3i6ENyAZZMJjFwg6qBsIOXHWL1xE6jnMxjV/qwezEZIUNsi2yPA/dALqCCTx+FpM/uRwqaN2Qs4JY4b8OUjNcOHLjtda4vnN0DPcZN8XJJaeJ4+wBMQYbgonqGRnxFgJH9T8iEqD3GDr+g1SklO/2rjUHhIe8yZFJdovqDzgAflyujd/+JBH3D894OCQ8n/QKyixn6QqNH+GXNuQSay3ATc9w6aumSAbL1Ag/V89W+Avp8ONknJ5z6zMg65sBIqfvjdnFJCKV/KD9ZUqVf6HH6344HGPR4QwKz+5KXwbRw8c8jnEx+H9GnWup2GsdxanWfkUyW9fxZxfKQiAe3cwLf7XOOB7Smqb6fFCuw/QK4hFJoJgmn4wAAAABJRU5ErkJggg=="},function(t,e){t.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAARQAAAA2CAMAAAAxvZbCAAAAS1BMVEVHcEwAAAAAAAARERPZ2vDU2OwHBwcAAAADAwMAAAAAAAAODg8BAQGytcbN0OTDxtnS1enS1urV2e3Iy960t8iTlaRvb3mpq7vO0uWmqkiCAAAAGXRSTlMAFBAOuLsLAgUHEh0YPIJfl6Suc1A8KR+P56WgUwAADiFJREFUaN7lW9m2rCgSTUVTVBAFp///0o6JQc2sW31Xr9UPSVd1naOAsIlhRxDn9freuk7rvn9DU9jwh3ff91p33F6/12DXBImq6wFbXdcMTIblBzFhSKyb5sU3fpnDujEsKC0/iQpi8n7byTdNC63htoRDYPlFVAgTOzMibevPKYQwwe/NdLwLVH4Nk+MUSBa3mapCo6KUDb5xqtCgX7KwureiOOc2GlMN0cq+lfPz8VuiQhtFR2xbwsSv44iQJH/c990xASr/W1Hpur/28v92aPeX32BAAJH+fbQkJstOmKgICDXduzk75j8t4dn+qcu/m6H7w9g/jP5jl7vW9MTW1EKYzIQJiAkiwA3f99q6gq58Rffeym9eV5FfX1YThzynuI7Un7ZyHcJLz+fID/Mc+cih3SBh+lo70h2Uk7GqYf9pNGMGvvr4BxcU0X20clPFirn3RfDSFPo2VZoiH1J8eqOdtNL4TraWqETx1dg1NvjtRl/fx2bttnkSlI3kJM/EkABmwHGPWn1DJXZ8tmJNcTf4oyq4z4U5itLeptDFeAk/+hso8XjjCK1jpJJWoBNq7xTIxGimnEatyNWoISYTyIkBe9InZHEwcv6qIhdN33jCwj0Ju7KpAsXufRwqLhjEMqT1xuWoyfKeeMF5Cv6kPngvwJzsdWzaDK0UhyB48I0Ffi+k3tmMdIxkJJxReZojREQElE0wERnHjR5rOM95npxlP63iNktM3qtbP7UtH9QrRCDgAYJS1/IyLmdqmlnVymLbcuMv9nrylg4XQcGxfRGkdsec2sqO80B+seKKYTh1g4+uiPU6P9pWJ/rqEJIFtmvt6pDKzsZcMTnwsVDc1oeNYIn7LEA5ms/NZQx1ICBqEl8EBU5IlaJtG3q43+fgD2qAzB94uggKH05hrmw+WWcIlYliFHak1PNYaEHD4EoxoNbYIdJXYvAwP0XDdb2HNlR5oSRIbTESW0BpSetJoOgvoLRuyIIVGAhCBUGpyp3BcjzuoXqA0rJw0p6WHZQYQTGGxyYvZPM2+SU88AERSqi8aMPhKyh0MLCIeWOFUqzG1rI+iu3GHldM0DsVqBSSMoXpU1tvklKxpL0RFJTKKHW6VxhhwH6qfbm2mUHpNaJ2wqAZtNwIKtmjqkPt4DkDvaxIntzo5TfGr1MTobJbadB5RgVd7V6jXWRhjbaTLbIYfwafTpOcdGD1OiMq7J4+2H5VmK5kwNKEJCmGzZJyTYs/CyrQgU7R0esBDQdbdjLuLFswPy15HBc2fSZybvFXaGWNgVXCAo1ZUexGB7seEyrQB1CZRDHgC/D6HEfmZbgHhN0lf8Jol6RA9wEx8WE3tFLoujtGBW1xfbf9H53Pxf1oAQW3PSAoY2TO8FXS90ne8pIzskq8KFCpc4+gSHSGn6D34JQ8rBVe4qsNZMSO1HeKGk/c4pxqUg30briKM64CBAXoK8oJW82CSWSzR3Jy7makZfIs+9yIXYFZSoYhyanPoIiosKTwbvCMgmwMemhSVMBkHwWVh7ip4zj23e3QUCf2spFCvn3jQVLo0EbEBOcft7jeOjtiWRXxVQSF377o1GZTVaUTvxDpfkVMpuiEk3M/EZWsQNeEnarjGX8SFfzmEm0N2IUlWx3yFGBvzOndSBozDIX+YA97M41tToMFWiKY+rkyOykEYoLYjKRArYu6JjymVpnEn0YcLjsLSpgk639jp5YwMSbJt4RAFCDRRzIot7zu3awIKroLD6tN/gzX4NBXVmaF31fDqCAehvSJ9vwRFJmBDg46TJXZUF0Qk3Y5uTElNRXT9m0jkO15OlIfAaVGUAIKKwlK/wx7xT02ZzRRBZfAxcEhRP0R12NT2xLrSo92saVspO6tQVCAaFlYIyrGZHzx1rf4G7Cxt/Wp4fPyl0DivJKdBlgdYuLPNMWECSJTTZJcJQSh88SE5Yw6/NKw51V2/MSk65E0Ntlsl2r1BmOE+iNDaUA8xQ9bbhN/IxZ7fuC8JErwbz2AToGtbB8sYo0aDMCROE2kGShEVYigIF01qC0rYOs3lzjESF0yKILghN5HDC2KCjEd2vLNsxZ8uyFCclcvNsDk++sHKDc5SKSWhY0kJeTdJHtR+BbY0Th+BCVGcQALMjKeBtVsYt8+DAENAtGU0WGon8zwaBzy2oBs/gJKZeCLcwwlMAhYjLlaywITdDz+gkkhRYjAehnb2cy0SJuvbRXq2X0BRUjIGzFBEcCNHPA/cjMrbWuINA2xAw9oeRYYDaAwCxxOPOfxZHfN74mwmB3/IXJU77zvYVjJAJkkTnNVv8j3fAQlGVn7CRMUFbTR9iopHDgiG8J9OFqQuW4bbcr0AIWiHxYjdECZlClyFF4ISSVWiZI/itR33EamKROZEphpaTycOHIYHAN42Bk3YYz3E4MCbl2E4SMo0zdJiTEIhgzmAyYCysYGu4j6s2h7oR93Tqu7E4n3eIeM94skX0DhTCi02jfpQU7vYExjVu93JjRTw+FNnRXOj+sMGr6StUF/5IkmY+CcQSHX6tAiYwsDgdKKf36wdeSWMCKz1qskkRztRgzt9f5Z7WBZHWe9a/bQbDIoG9KjRl8D9iBESROhFVAo1CdN8QR/Xkgk2icS1YVZZZSUPZshAAXxAMqCCKzke9gqXSSFQRGaPyhUn2YbzW3fHBgjJuR4cJpnLgkNzsyqpct8NPH8QLE6n7U9UaFy7KP7JdtO2cAkUoBGrpmWSzoH5mNQqpzzws+Q49zYzQ5kStDCVUeQhnDtJLA8H0fKjPRNUkYBhV2y48iqzJ3E/AlmVfz+MT/AoMx0NMNN8wiVo0meHk2EY1Bi6KOyQ2kSKDwR6qSrMfpNtBBXI6AUgkKC6qGT43CW8girBJnorw0ExsBlaapAzmyhQJk2GkExVSkpkbwdtPNswmJO901y4rcPzjjROrRzOUVx0bxThAgmRVLSHkOZDES9K/JpWyBQaMv6dVpyK1sRQHQCylV7Tokb0QJYAoV9goAyMigUWjGhAezj6esIiikkRVh7/8LjFsFJSQlUYr4htE/SltXrlOzQneFIuLQlEgyfOKtiIta7HNxiiDqlL4GQqjkRoG+gsGek9e0L0oaqWuI3Fd7vzoEjwg1TBmhU+KcrKDslFqKkRIfz0msjpKCI95Ti4OQDJjkZvqL05pjpQoN9zJfQhJYypGkqOmNJoXA85mhh0WJojP3bUlv0AxTyAi0LYw3zL8dQeTH7jioBWgRl5pTBTv8XJFTLoGwAGgoR+JILKJ0mDzhv+eDqYaN6g6w7+npTgyzhjRer6wdBERq8jCmsRohRRZk2a1oQar9J7PQKSoegXDB42BTN4ccmuE4BLXmLfhQ+KXbKjWw70Z6Y0C5bab0JFIiMNtEsMbSiPpxjwlhqE9IArp3vTC+Y3K+3QL1aVyQcbspDTDOpB4V3aT2oPX7MqTZK7JWgkAm3GZTsfdIDzJtxpEM+DZAf9kjcUZumdUdHjNu15JR3VqG4CDKIlEq4gkKmldi6FBj4k4pQxC2cF3Kvb7dbKycvhvrJ/ilNlPnqvuH1AF2Z8NUa7TAUk+sCFFYOBiVKob6DIon2WQ6W82ioRDyJWw+KFzfJLoUVU4ZjTGZV0SU3dDF8AUUCQry7OpZHIO/XmA/mZeLdVD3E7B3WrkB09wGTV/dCTM5921YHCC/Z+Z6izxRPbaYqrCaCAjIKhyR2la4uuAfpqvJkZHiI5uzcskciRqAMTGixC9mpoVolXCQnk2IhVGIQSMeZs/EGCllWtgHKXe8vKB0rkhmJxWQlp6osRs5+LZ1s4XrsNUYuflsJFMoRTXKnQUM77eRJdDZaQOHwETaJ/HhLNpKvcSIm3AMFpd2y6EDIB5Z4XfNtApIhaI67cHJ8nWewNH5O/4F2xnsfvumKR7re7v+Y0Ld+CgEsO+0z7JGi3m/835dYH+Gbp+BWTDqOuB6i8Xu+/YqgpCcRFJHDcMJOlrxjsoHQf4wGDeTGLzPpU7JTdp5m7IYe55bbmSoRV28xi/JM/CxDcSmxWwdt3SSNXtwUkzspTt6HI4UyzwTmTKj45UQs7DZyNIhGiJIhlu7mar7VuoBS30DhJcTrKi8Kp/ED3g1ZUN+xx1bFazG5kHMmNPeUzMQqp2Y0PO5D7odBIWIuySy+XKkvJZDJVFP2bw42ZsE/VR2ATVntsdcp9OWbh1rNfqV54WDD+1IrQDe7k1ICUwSFQY/3fYtNnu5opkPV+VBefAzzlq4ZX93sQUDhELaP6T3JM0OsfEucUuq0zlGcjUn4W60scwJ2X1ivkq4Rv1TtyL2PgJGz//aIFduHLuoy2A45LgKI+oQPpAIGUMF2lDUDh9RPxDXqAxp/MT+jDIaiegwpW1DpCrRPtS2Ul0DWEBMYOEeWenv0ZeGKzkUpb6a3HCHl+rcvdde5+iff2F2qbi43bSkNkcpVOqkzyg86ALHOsnWtbpHgEHq8izvNVKLypUxGF+VNz37FXqZ4AO+4eJExsUbrpf7teyl6V1Qy5RKrstqqKLsqR2TB4wep0qm/1yE9ir24S/+sVPpTQVWnP/QrNnMsLollDgzfEgYh8YkO71a/9t9UAX4vCrzD1Onbwj+VvKUCNs0g6mc93NfSu68dS18KqEzqLkvKck0gY1IX8vnP1Zf/rh7xe0XnX6D6lzP8oc7ydcye7Fsqq6pt9MUuYdL9P/6wpeu6/8/f0+AH8ZLKWblCtyGS9CUmLJ93Qz9Qkd8dgZkX0N7EeZb1emn6c3/PAmGOO8uKKh+sudYk/OJfg1ECCQLciWj6LrRU/eRfs1wLr5kOXutKfhWTyBjuNO/H/mzwP/q5W8U07M8OAAAAAElFTkSuQmCC"},function(t,e,n){var i;t.exports=(i=n(0),i.enc.Latin1)},function(i,r,o){var a,s;!function(t,e,n){"use strict";"undefined"!=typeof window&&o(18)?void 0===(s="function"==typeof(a=n)?a.call(r,o,r,i):a)||(i.exports=s):void 0!==i&&i.exports?i.exports=n():e.exports?e.exports=n():e.Fingerprint2=n()}(0,this,function(){"use strict";void 0===Array.isArray&&(Array.isArray=function(t){return"[object Array]"===Object.prototype.toString.call(t)});var h=function(t,e){t=[t[0]>>>16,65535&t[0],t[1]>>>16,65535&t[1]],e=[e[0]>>>16,65535&e[0],e[1]>>>16,65535&e[1]];var n=[0,0,0,0];return n[3]+=t[3]+e[3],n[2]+=n[3]>>>16,n[3]&=65535,n[2]+=t[2]+e[2],n[1]+=n[2]>>>16,n[2]&=65535,n[1]+=t[1]+e[1],n[0]+=n[1]>>>16,n[1]&=65535,n[0]+=t[0]+e[0],n[0]&=65535,[n[0]<<16|n[1],n[2]<<16|n[3]]},d=function(t,e){t=[t[0]>>>16,65535&t[0],t[1]>>>16,65535&t[1]],e=[e[0]>>>16,65535&e[0],e[1]>>>16,65535&e[1]];var n=[0,0,0,0];return n[3]+=t[3]*e[3],n[2]+=n[3]>>>16,n[3]&=65535,n[2]+=t[2]*e[3],n[1]+=n[2]>>>16,n[2]&=65535,n[2]+=t[3]*e[2],n[1]+=n[2]>>>16,n[2]&=65535,n[1]+=t[1]*e[3],n[0]+=n[1]>>>16,n[1]&=65535,n[1]+=t[2]*e[2],n[0]+=n[1]>>>16,n[1]&=65535,n[1]+=t[3]*e[1],n[0]+=n[1]>>>16,n[1]&=65535,n[0]+=t[0]*e[3]+t[1]*e[2]+t[2]*e[1]+t[3]*e[0],n[0]&=65535,[n[0]<<16|n[1],n[2]<<16|n[3]]},f=function(t,e){return 32===(e%=64)?[t[1],t[0]]:e<32?[t[0]<<e|t[1]>>>32-e,t[1]<<e|t[0]>>>32-e]:(e-=32,[t[1]<<e|t[0]>>>32-e,t[0]<<e|t[1]>>>32-e])},p=function(t,e){return 0===(e%=64)?t:e<32?[t[0]<<e|t[1]>>>32-e,t[1]<<e]:[t[1]<<e-32,0]},g=function(t,e){return[t[0]^e[0],t[1]^e[1]]},m=function(t){return t=g(t,[0,t[0]>>>1]),t=d(t,[4283543511,3981806797]),t=g(t,[0,t[0]>>>1]),t=d(t,[3301882366,444984403]),t=g(t,[0,t[0]>>>1])},s=function(t,e){e=e||0;for(var n=(t=t||"").length%16,i=t.length-n,r=[0,e],o=[0,e],a=[0,0],s=[0,0],c=[2277735313,289559509],l=[1291169091,658871167],u=0;u<i;u+=16)a=[255&t.charCodeAt(u+4)|(255&t.charCodeAt(u+5))<<8|(255&t.charCodeAt(u+6))<<16|(255&t.charCodeAt(u+7))<<24,255&t.charCodeAt(u)|(255&t.charCodeAt(u+1))<<8|(255&t.charCodeAt(u+2))<<16|(255&t.charCodeAt(u+3))<<24],s=[255&t.charCodeAt(u+12)|(255&t.charCodeAt(u+13))<<8|(255&t.charCodeAt(u+14))<<16|(255&t.charCodeAt(u+15))<<24,255&t.charCodeAt(u+8)|(255&t.charCodeAt(u+9))<<8|(255&t.charCodeAt(u+10))<<16|(255&t.charCodeAt(u+11))<<24],a=d(a,c),a=f(a,31),a=d(a,l),r=g(r,a),r=f(r,27),r=h(r,o),r=h(d(r,[0,5]),[0,1390208809]),s=d(s,l),s=f(s,33),s=d(s,c),o=g(o,s),o=f(o,31),o=h(o,r),o=h(d(o,[0,5]),[0,944331445]);switch(a=[0,0],s=[0,0],n){case 15:s=g(s,p([0,t.charCodeAt(u+14)],48));case 14:s=g(s,p([0,t.charCodeAt(u+13)],40));case 13:s=g(s,p([0,t.charCodeAt(u+12)],32));case 12:s=g(s,p([0,t.charCodeAt(u+11)],24));case 11:s=g(s,p([0,t.charCodeAt(u+10)],16));case 10:s=g(s,p([0,t.charCodeAt(u+9)],8));case 9:s=g(s,[0,t.charCodeAt(u+8)]),s=d(s,l),s=f(s,33),s=d(s,c),o=g(o,s);case 8:a=g(a,p([0,t.charCodeAt(u+7)],56));case 7:a=g(a,p([0,t.charCodeAt(u+6)],48));case 6:a=g(a,p([0,t.charCodeAt(u+5)],40));case 5:a=g(a,p([0,t.charCodeAt(u+4)],32));case 4:a=g(a,p([0,t.charCodeAt(u+3)],24));case 3:a=g(a,p([0,t.charCodeAt(u+2)],16));case 2:a=g(a,p([0,t.charCodeAt(u+1)],8));case 1:a=g(a,[0,t.charCodeAt(u)]),a=d(a,c),a=f(a,31),a=d(a,l),r=g(r,a)}return r=g(r,[0,t.length]),o=g(o,[0,t.length]),r=h(r,o),o=h(o,r),r=m(r),o=m(o),r=h(r,o),o=h(o,r),("00000000"+(r[0]>>>0).toString(16)).slice(-8)+("00000000"+(r[1]>>>0).toString(16)).slice(-8)+("00000000"+(o[0]>>>0).toString(16)).slice(-8)+("00000000"+(o[1]>>>0).toString(16)).slice(-8)},t={preprocessor:null,audio:{timeout:1e3,excludeIOS11:!0},fonts:{swfContainerId:"fingerprintjs2",swfPath:"flash/compiled/FontList.swf",userDefinedFonts:[],extendedJsFonts:!1},screen:{detectScreenOrientation:!0},plugins:{sortPluginsFor:[/palemoon/i],excludeIE:!1},extraComponents:[],excludes:{enumerateDevices:!0,pixelRatio:!0,doNotTrack:!0,fontsFlash:!0,adBlock:!0},NOT_AVAILABLE:"not available",ERROR:"error",EXCLUDED:"excluded"},l=function(t,e){if(Array.prototype.forEach&&t.forEach===Array.prototype.forEach)t.forEach(e);else if(t.length===+t.length)for(var n=0,i=t.length;n<i;n++)e(t[n],n,t);else for(var r in t)t.hasOwnProperty(r)&&e(t[r],r,t)},c=function(t,i){var r=[];return null==t?r:Array.prototype.map&&t.map===Array.prototype.map?t.map(i):(l(t,function(t,e,n){r.push(i(t,e,n))}),r)},n=function(){return navigator.mediaDevices&&navigator.mediaDevices.enumerateDevices},i=function(t){var e=[window.screen.width,window.screen.height];return t.screen.detectScreenOrientation&&e.sort().reverse(),e},r=function(t){if(window.screen.availWidth&&window.screen.availHeight){var e=[window.screen.availHeight,window.screen.availWidth];return t.screen.detectScreenOrientation&&e.sort().reverse(),e}return t.NOT_AVAILABLE},o=function(t){if(null==navigator.plugins)return t.NOT_AVAILABLE;for(var e=[],n=0,i=navigator.plugins.length;n<i;n++)navigator.plugins[n]&&e.push(navigator.plugins[n]);return u(t)&&(e=e.sort(function(t,e){return t.name>e.name?1:t.name<e.name?-1:0})),c(e,function(t){var e=c(t,function(t){return[t.type,t.suffixes]});return[t.name,t.description,e]})},a=function(e){var t=[];if(Object.getOwnPropertyDescriptor&&Object.getOwnPropertyDescriptor(window,"ActiveXObject")||"ActiveXObject"in window){t=c(["AcroPDF.PDF","Adodb.Stream","AgControl.AgControl","DevalVRXCtrl.DevalVRXCtrl.1","MacromediaFlashPaper.MacromediaFlashPaper","Msxml2.DOMDocument","Msxml2.XMLHTTP","PDF.PdfCtrl","QuickTime.QuickTime","QuickTimeCheckObject.QuickTimeCheck.1","RealPlayer","RealPlayer.RealPlayer(tm) ActiveX Control (32-bit)","RealVideo.RealVideo(tm) ActiveX Control (32-bit)","Scripting.Dictionary","SWCtl.SWCtl","Shell.UIHelper","ShockwaveFlash.ShockwaveFlash","Skype.Detection","TDCCtl.TDCCtl","WMPlayer.OCX","rmocx.RealPlayer G2 Control","rmocx.RealPlayer G2 Control.1"],function(t){try{return new window.ActiveXObject(t),t}catch(t){return e.ERROR}})}else t.push(e.NOT_AVAILABLE);return navigator.plugins&&(t=t.concat(o(e))),t},u=function(t){for(var e=!1,n=0,i=t.plugins.sortPluginsFor.length;n<i;n++){var r=t.plugins.sortPluginsFor[n];if(navigator.userAgent.match(r)){e=!0;break}}return e},y=function(e){try{return!!window.sessionStorage}catch(t){return e.ERROR}},v=function(e){try{return!!window.localStorage}catch(t){return e.ERROR}},b=function(e){if(M())return e.EXCLUDED;try{return!!window.indexedDB}catch(t){return e.ERROR}},w=function(t){return navigator.hardwareConcurrency?navigator.hardwareConcurrency:t.NOT_AVAILABLE},T=function(t){return navigator.cpuClass||t.NOT_AVAILABLE},A=function(t){return navigator.platform?navigator.platform:t.NOT_AVAILABLE},E=function(t){return navigator.doNotTrack?navigator.doNotTrack:navigator.msDoNotTrack?navigator.msDoNotTrack:window.doNotTrack?window.doNotTrack:t.NOT_AVAILABLE},e=function(){var e,t=0;void 0!==navigator.maxTouchPoints?t=navigator.maxTouchPoints:void 0!==navigator.msMaxTouchPoints&&(t=navigator.msMaxTouchPoints);try{document.createEvent("TouchEvent"),e=!0}catch(t){e=!1}return[t,e,"ontouchstart"in window]},x=function(t){var e=[],n=document.createElement("canvas");n.width=2e3,n.height=200,n.style.display="inline";var i=n.getContext("2d");return i.rect(0,0,10,10),i.rect(2,2,6,6),e.push("canvas winding:"+(!1===i.isPointInPath(5,5,"evenodd")?"yes":"no")),i.textBaseline="alphabetic",i.fillStyle="#f60",i.fillRect(125,1,62,20),i.fillStyle="#069",t.dontUseFakeFontInCanvas?i.font="11pt Arial":i.font="11pt no-real-font-123",i.fillText("Cwm fjordbank glyphs vext quiz, 😃",2,15),i.fillStyle="rgba(102, 204, 0, 0.2)",i.font="18pt Arial",i.fillText("Cwm fjordbank glyphs vext quiz, 😃",4,45),i.globalCompositeOperation="multiply",i.fillStyle="rgb(255,0,255)",i.beginPath(),i.arc(50,50,50,0,2*Math.PI,!0),i.closePath(),i.fill(),i.fillStyle="rgb(0,255,255)",i.beginPath(),i.arc(100,50,50,0,2*Math.PI,!0),i.closePath(),i.fill(),i.fillStyle="rgb(255,255,0)",i.beginPath(),i.arc(75,100,50,0,2*Math.PI,!0),i.closePath(),i.fill(),i.fillStyle="rgb(255,0,255)",i.arc(75,75,75,0,2*Math.PI,!0),i.arc(75,75,25,0,2*Math.PI,!0),i.fill("evenodd"),n.toDataURL&&e.push("canvas fp:"+n.toDataURL()),e},S=function(){var a,t=function(t){return a.clearColor(0,0,0,1),a.enable(a.DEPTH_TEST),a.depthFunc(a.LEQUAL),a.clear(a.COLOR_BUFFER_BIT|a.DEPTH_BUFFER_BIT),"["+t[0]+", "+t[1]+"]"};if(!(a=U()))return null;var s=[],e=a.createBuffer();a.bindBuffer(a.ARRAY_BUFFER,e);var n=new Float32Array([-.2,-.9,0,.4,-.26,0,0,.732134444,0]);a.bufferData(a.ARRAY_BUFFER,n,a.STATIC_DRAW),e.itemSize=3,e.numItems=3;var i=a.createProgram(),r=a.createShader(a.VERTEX_SHADER);a.shaderSource(r,"attribute vec2 attrVertex;varying vec2 varyinTexCoordinate;uniform vec2 uniformOffset;void main(){varyinTexCoordinate=attrVertex+uniformOffset;gl_Position=vec4(attrVertex,0,1);}"),a.compileShader(r);var o=a.createShader(a.FRAGMENT_SHADER);a.shaderSource(o,"precision mediump float;varying vec2 varyinTexCoordinate;void main() {gl_FragColor=vec4(varyinTexCoordinate,0,1);}"),a.compileShader(o),a.attachShader(i,r),a.attachShader(i,o),a.linkProgram(i),a.useProgram(i),i.vertexPosAttrib=a.getAttribLocation(i,"attrVertex"),i.offsetUniform=a.getUniformLocation(i,"uniformOffset"),a.enableVertexAttribArray(i.vertexPosArray),a.vertexAttribPointer(i.vertexPosAttrib,e.itemSize,a.FLOAT,!1,0,0),a.uniform2f(i.offsetUniform,1,1),a.drawArrays(a.TRIANGLE_STRIP,0,e.numItems);try{s.push(a.canvas.toDataURL())}catch(t){}s.push("extensions:"+(a.getSupportedExtensions()||[]).join(";")),s.push("webgl aliased line width range:"+t(a.getParameter(a.ALIASED_LINE_WIDTH_RANGE))),s.push("webgl aliased point size range:"+t(a.getParameter(a.ALIASED_POINT_SIZE_RANGE))),s.push("webgl alpha bits:"+a.getParameter(a.ALPHA_BITS)),s.push("webgl antialiasing:"+(a.getContextAttributes().antialias?"yes":"no")),s.push("webgl blue bits:"+a.getParameter(a.BLUE_BITS)),s.push("webgl depth bits:"+a.getParameter(a.DEPTH_BITS)),s.push("webgl green bits:"+a.getParameter(a.GREEN_BITS)),s.push("webgl max anisotropy:"+function(t){var e=t.getExtension("EXT_texture_filter_anisotropic")||t.getExtension("WEBKIT_EXT_texture_filter_anisotropic")||t.getExtension("MOZ_EXT_texture_filter_anisotropic");if(e){var n=t.getParameter(e.MAX_TEXTURE_MAX_ANISOTROPY_EXT);return 0===n&&(n=2),n}return null}(a)),s.push("webgl max combined texture image units:"+a.getParameter(a.MAX_COMBINED_TEXTURE_IMAGE_UNITS)),s.push("webgl max cube map texture size:"+a.getParameter(a.MAX_CUBE_MAP_TEXTURE_SIZE)),s.push("webgl max fragment uniform vectors:"+a.getParameter(a.MAX_FRAGMENT_UNIFORM_VECTORS)),s.push("webgl max render buffer size:"+a.getParameter(a.MAX_RENDERBUFFER_SIZE)),s.push("webgl max texture image units:"+a.getParameter(a.MAX_TEXTURE_IMAGE_UNITS)),s.push("webgl max texture size:"+a.getParameter(a.MAX_TEXTURE_SIZE)),s.push("webgl max varying vectors:"+a.getParameter(a.MAX_VARYING_VECTORS)),s.push("webgl max vertex attribs:"+a.getParameter(a.MAX_VERTEX_ATTRIBS)),s.push("webgl max vertex texture image units:"+a.getParameter(a.MAX_VERTEX_TEXTURE_IMAGE_UNITS)),s.push("webgl max vertex uniform vectors:"+a.getParameter(a.MAX_VERTEX_UNIFORM_VECTORS)),s.push("webgl max viewport dims:"+t(a.getParameter(a.MAX_VIEWPORT_DIMS))),s.push("webgl red bits:"+a.getParameter(a.RED_BITS)),s.push("webgl renderer:"+a.getParameter(a.RENDERER)),s.push("webgl shading language version:"+a.getParameter(a.SHADING_LANGUAGE_VERSION)),s.push("webgl stencil bits:"+a.getParameter(a.STENCIL_BITS)),s.push("webgl vendor:"+a.getParameter(a.VENDOR)),s.push("webgl version:"+a.getParameter(a.VERSION));try{var c=a.getExtension("WEBGL_debug_renderer_info");c&&(s.push("webgl unmasked vendor:"+a.getParameter(c.UNMASKED_VENDOR_WEBGL)),s.push("webgl unmasked renderer:"+a.getParameter(c.UNMASKED_RENDERER_WEBGL)))}catch(t){}return a.getShaderPrecisionFormat&&l(["FLOAT","INT"],function(o){l(["VERTEX","FRAGMENT"],function(r){l(["HIGH","MEDIUM","LOW"],function(i){l(["precision","rangeMin","rangeMax"],function(t){var e=a.getShaderPrecisionFormat(a[r+"_SHADER"],a[i+"_"+o])[t];"precision"!==t&&(t="precision "+t);var n=["webgl ",r.toLowerCase()," shader ",i.toLowerCase()," ",o.toLowerCase()," ",t,":",e].join("");s.push(n)})})})}),F(a),s},O=function(){try{var t=U(),e=t.getExtension("WEBGL_debug_renderer_info"),n=t.getParameter(e.UNMASKED_VENDOR_WEBGL)+"~"+t.getParameter(e.UNMASKED_RENDERER_WEBGL);return F(t),n}catch(t){return null}},C=function(){var t=document.createElement("div");t.innerHTML="&nbsp;";var e=!(t.className="adsbox");try{document.body.appendChild(t),e=0===document.getElementsByClassName("adsbox")[0].offsetHeight,document.body.removeChild(t)}catch(t){e=!1}return e},B=function(){if(void 0!==navigator.languages)try{if(navigator.languages[0].substr(0,2)!==navigator.language.substr(0,2))return!0}catch(t){return!0}return!1},D=function(){return window.screen.width<window.screen.availWidth||window.screen.height<window.screen.availHeight},k=function(){var t,e=navigator.userAgent.toLowerCase(),n=navigator.oscpu,i=navigator.platform.toLowerCase();if(t=0<=e.indexOf("windows phone")?"Windows Phone":0<=e.indexOf("windows")||0<=e.indexOf("win16")||0<=e.indexOf("win32")||0<=e.indexOf("win64")||0<=e.indexOf("win95")||0<=e.indexOf("win98")||0<=e.indexOf("winnt")||0<=e.indexOf("wow64")?"Windows":0<=e.indexOf("android")?"Android":0<=e.indexOf("linux")||0<=e.indexOf("cros")||0<=e.indexOf("x11")?"Linux":0<=e.indexOf("iphone")||0<=e.indexOf("ipad")||0<=e.indexOf("ipod")||0<=e.indexOf("crios")||0<=e.indexOf("fxios")?"iOS":0<=e.indexOf("macintosh")||0<=e.indexOf("mac_powerpc)")?"Mac":"Other",("ontouchstart"in window||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints)&&"Windows"!==t&&"Windows Phone"!==t&&"Android"!==t&&"iOS"!==t&&"Other"!==t&&-1===e.indexOf("cros"))return!0;if(void 0!==n){if(0<=(n=n.toLowerCase()).indexOf("win")&&"Windows"!==t&&"Windows Phone"!==t)return!0;if(0<=n.indexOf("linux")&&"Linux"!==t&&"Android"!==t)return!0;if(0<=n.indexOf("mac")&&"Mac"!==t&&"iOS"!==t)return!0;if((-1===n.indexOf("win")&&-1===n.indexOf("linux")&&-1===n.indexOf("mac"))!=("Other"===t))return!0}return 0<=i.indexOf("win")&&"Windows"!==t&&"Windows Phone"!==t||((0<=i.indexOf("linux")||0<=i.indexOf("android")||0<=i.indexOf("pike"))&&"Linux"!==t&&"Android"!==t||((0<=i.indexOf("mac")||0<=i.indexOf("ipad")||0<=i.indexOf("ipod")||0<=i.indexOf("iphone"))&&"Mac"!==t&&"iOS"!==t||!(0<=i.indexOf("arm")&&"Windows Phone"===t)&&(!(0<=i.indexOf("pike")&&0<=e.indexOf("opera mini"))&&((i.indexOf("win")<0&&i.indexOf("linux")<0&&i.indexOf("mac")<0&&i.indexOf("iphone")<0&&i.indexOf("ipad")<0&&i.indexOf("ipod")<0)!==("Other"===t)||void 0===navigator.plugins&&"Windows"!==t&&"Windows Phone"!==t))))},R=function(){var t,e=navigator.userAgent.toLowerCase(),n=navigator.productSub;if(0<=e.indexOf("edge/")||0<=e.indexOf("iemobile/"))return!1;if(0<=e.indexOf("opera mini"))return!1;if(("Chrome"===(t=0<=e.indexOf("firefox/")?"Firefox":0<=e.indexOf("opera/")||0<=e.indexOf(" opr/")?"Opera":0<=e.indexOf("chrome/")?"Chrome":0<=e.indexOf("safari/")?0<=e.indexOf("android 1.")||0<=e.indexOf("android 2.")||0<=e.indexOf("android 3.")||0<=e.indexOf("android 4.")?"AOSP":"Safari":0<=e.indexOf("trident/")?"Internet Explorer":"Other")||"Safari"===t||"Opera"===t)&&"20030107"!==n)return!0;var i,r=eval.toString().length;if(37===r&&"Safari"!==t&&"Firefox"!==t&&"Other"!==t)return!0;if(39===r&&"Internet Explorer"!==t&&"Other"!==t)return!0;if(33===r&&"Chrome"!==t&&"AOSP"!==t&&"Opera"!==t&&"Other"!==t)return!0;try{throw"a"}catch(t){try{t.toSource(),i=!0}catch(t){i=!1}}return i&&"Firefox"!==t&&"Other"!==t},I=function(){var t=document.createElement("canvas");return!(!t.getContext||!t.getContext("2d"))},N=function(){if(!I())return!1;var t=U(),e=!!window.WebGLRenderingContext&&!!t;return F(t),e},P=function(){return"Microsoft Internet Explorer"===navigator.appName||!("Netscape"!==navigator.appName||!/Trident/.test(navigator.userAgent))},M=function(){return 2<=("msWriteProfilerMark"in window)+("msLaunchUri"in navigator)+("msSaveBlob"in navigator)},L=function(){return void 0!==window.swfobject},V=function(){return window.swfobject.hasFlashPlayerVersion("9.0.0")},j=function(e,t){var n="___fp_swf_loaded";window[n]=function(t){e(t)};var i,r,o=t.fonts.swfContainerId;(r=document.createElement("div")).setAttribute("id",i.fonts.swfContainerId),document.body.appendChild(r);var a={onReady:n};window.swfobject.embedSWF(t.fonts.swfPath,o,"1","1","9.0.0",!1,a,{allowScriptAccess:"always",menu:"false"},{})},U=function(){var t=document.createElement("canvas"),e=null;try{e=t.getContext("webgl")||t.getContext("experimental-webgl")}catch(t){}return e||(e=null),e},F=function(t){var e=t.getExtension("WEBGL_lose_context");null!=e&&e.loseContext()},_=[{key:"userAgent",getData:function(t){t(navigator.userAgent)}},{key:"webdriver",getData:function(t,e){t(null==navigator.webdriver?e.NOT_AVAILABLE:navigator.webdriver)}},{key:"language",getData:function(t,e){t(navigator.language||navigator.userLanguage||navigator.browserLanguage||navigator.systemLanguage||e.NOT_AVAILABLE)}},{key:"colorDepth",getData:function(t,e){t(window.screen.colorDepth||e.NOT_AVAILABLE)}},{key:"deviceMemory",getData:function(t,e){t(navigator.deviceMemory||e.NOT_AVAILABLE)}},{key:"pixelRatio",getData:function(t,e){t(window.devicePixelRatio||e.NOT_AVAILABLE)}},{key:"hardwareConcurrency",getData:function(t,e){t(w(e))}},{key:"screenResolution",getData:function(t,e){t(i(e))}},{key:"availableScreenResolution",getData:function(t,e){t(r(e))}},{key:"timezoneOffset",getData:function(t){t((new Date).getTimezoneOffset())}},{key:"timezone",getData:function(t,e){window.Intl&&window.Intl.DateTimeFormat?t((new window.Intl.DateTimeFormat).resolvedOptions().timeZone||e.NOT_AVAILABLE):t(e.NOT_AVAILABLE)}},{key:"sessionStorage",getData:function(t,e){t(y(e))}},{key:"localStorage",getData:function(t,e){t(v(e))}},{key:"indexedDb",getData:function(t,e){t(b(e))}},{key:"addBehavior",getData:function(t){t(!!window.HTMLElement.prototype.addBehavior)}},{key:"openDatabase",getData:function(t){t(!!window.openDatabase)}},{key:"cpuClass",getData:function(t,e){t(T(e))}},{key:"platform",getData:function(t,e){t(A(e))}},{key:"doNotTrack",getData:function(t,e){t(E(e))}},{key:"plugins",getData:function(t,e){P()?e.plugins.excludeIE?t(e.EXCLUDED):t(a(e)):t(o(e))}},{key:"canvas",getData:function(t,e){I()?t(x(e)):t(e.NOT_AVAILABLE)}},{key:"webgl",getData:function(t,e){N()?t(S()):t(e.NOT_AVAILABLE)}},{key:"webglVendorAndRenderer",getData:function(t){N()?t(O()):t()}},{key:"adBlock",getData:function(t){t(C())}},{key:"hasLiedLanguages",getData:function(t){t(B())}},{key:"hasLiedResolution",getData:function(t){t(D())}},{key:"hasLiedOs",getData:function(t){t(k())}},{key:"hasLiedBrowser",getData:function(t){t(R())}},{key:"touchSupport",getData:function(t){t(e())}},{key:"fonts",getData:function(t,e){var u=["monospace","sans-serif","serif"],h=["Andale Mono","Arial","Arial Black","Arial Hebrew","Arial MT","Arial Narrow","Arial Rounded MT Bold","Arial Unicode MS","Bitstream Vera Sans Mono","Book Antiqua","Bookman Old Style","Calibri","Cambria","Cambria Math","Century","Century Gothic","Century Schoolbook","Comic Sans","Comic Sans MS","Consolas","Courier","Courier New","Geneva","Georgia","Helvetica","Helvetica Neue","Impact","Lucida Bright","Lucida Calligraphy","Lucida Console","Lucida Fax","LUCIDA GRANDE","Lucida Handwriting","Lucida Sans","Lucida Sans Typewriter","Lucida Sans Unicode","Microsoft Sans Serif","Monaco","Monotype Corsiva","MS Gothic","MS Outlook","MS PGothic","MS Reference Sans Serif","MS Sans Serif","MS Serif","MYRIAD","MYRIAD PRO","Palatino","Palatino Linotype","Segoe Print","Segoe Script","Segoe UI","Segoe UI Light","Segoe UI Semibold","Segoe UI Symbol","Tahoma","Times","Times New Roman","Times New Roman PS","Trebuchet MS","Verdana","Wingdings","Wingdings 2","Wingdings 3"];e.fonts.extendedJsFonts&&(h=h.concat(["Abadi MT Condensed Light","Academy Engraved LET","ADOBE CASLON PRO","Adobe Garamond","ADOBE GARAMOND PRO","Agency FB","Aharoni","Albertus Extra Bold","Albertus Medium","Algerian","Amazone BT","American Typewriter","American Typewriter Condensed","AmerType Md BT","Andalus","Angsana New","AngsanaUPC","Antique Olive","Aparajita","Apple Chancery","Apple Color Emoji","Apple SD Gothic Neo","Arabic Typesetting","ARCHER","ARNO PRO","Arrus BT","Aurora Cn BT","AvantGarde Bk BT","AvantGarde Md BT","AVENIR","Ayuthaya","Bandy","Bangla Sangam MN","Bank Gothic","BankGothic Md BT","Baskerville","Baskerville Old Face","Batang","BatangChe","Bauer Bodoni","Bauhaus 93","Bazooka","Bell MT","Bembo","Benguiat Bk BT","Berlin Sans FB","Berlin Sans FB Demi","Bernard MT Condensed","BernhardFashion BT","BernhardMod BT","Big Caslon","BinnerD","Blackadder ITC","BlairMdITC TT","Bodoni 72","Bodoni 72 Oldstyle","Bodoni 72 Smallcaps","Bodoni MT","Bodoni MT Black","Bodoni MT Condensed","Bodoni MT Poster Compressed","Bookshelf Symbol 7","Boulder","Bradley Hand","Bradley Hand ITC","Bremen Bd BT","Britannic Bold","Broadway","Browallia New","BrowalliaUPC","Brush Script MT","Californian FB","Calisto MT","Calligrapher","Candara","CaslonOpnface BT","Castellar","Centaur","Cezanne","CG Omega","CG Times","Chalkboard","Chalkboard SE","Chalkduster","Charlesworth","Charter Bd BT","Charter BT","Chaucer","ChelthmITC Bk BT","Chiller","Clarendon","Clarendon Condensed","CloisterBlack BT","Cochin","Colonna MT","Constantia","Cooper Black","Copperplate","Copperplate Gothic","Copperplate Gothic Bold","Copperplate Gothic Light","CopperplGoth Bd BT","Corbel","Cordia New","CordiaUPC","Cornerstone","Coronet","Cuckoo","Curlz MT","DaunPenh","Dauphin","David","DB LCD Temp","DELICIOUS","Denmark","DFKai-SB","Didot","DilleniaUPC","DIN","DokChampa","Dotum","DotumChe","Ebrima","Edwardian Script ITC","Elephant","English 111 Vivace BT","Engravers MT","EngraversGothic BT","Eras Bold ITC","Eras Demi ITC","Eras Light ITC","Eras Medium ITC","EucrosiaUPC","Euphemia","Euphemia UCAS","EUROSTILE","Exotc350 Bd BT","FangSong","Felix Titling","Fixedsys","FONTIN","Footlight MT Light","Forte","FrankRuehl","Fransiscan","Freefrm721 Blk BT","FreesiaUPC","Freestyle Script","French Script MT","FrnkGothITC Bk BT","Fruitger","FRUTIGER","Futura","Futura Bk BT","Futura Lt BT","Futura Md BT","Futura ZBlk BT","FuturaBlack BT","Gabriola","Galliard BT","Gautami","Geeza Pro","Geometr231 BT","Geometr231 Hv BT","Geometr231 Lt BT","GeoSlab 703 Lt BT","GeoSlab 703 XBd BT","Gigi","Gill Sans","Gill Sans MT","Gill Sans MT Condensed","Gill Sans MT Ext Condensed Bold","Gill Sans Ultra Bold","Gill Sans Ultra Bold Condensed","Gisha","Gloucester MT Extra Condensed","GOTHAM","GOTHAM BOLD","Goudy Old Style","Goudy Stout","GoudyHandtooled BT","GoudyOLSt BT","Gujarati Sangam MN","Gulim","GulimChe","Gungsuh","GungsuhChe","Gurmukhi MN","Haettenschweiler","Harlow Solid Italic","Harrington","Heather","Heiti SC","Heiti TC","HELV","Herald","High Tower Text","Hiragino Kaku Gothic ProN","Hiragino Mincho ProN","Hoefler Text","Humanst 521 Cn BT","Humanst521 BT","Humanst521 Lt BT","Imprint MT Shadow","Incised901 Bd BT","Incised901 BT","Incised901 Lt BT","INCONSOLATA","Informal Roman","Informal011 BT","INTERSTATE","IrisUPC","Iskoola Pota","JasmineUPC","Jazz LET","Jenson","Jester","Jokerman","Juice ITC","Kabel Bk BT","Kabel Ult BT","Kailasa","KaiTi","Kalinga","Kannada Sangam MN","Kartika","Kaufmann Bd BT","Kaufmann BT","Khmer UI","KodchiangUPC","Kokila","Korinna BT","Kristen ITC","Krungthep","Kunstler Script","Lao UI","Latha","Leelawadee","Letter Gothic","Levenim MT","LilyUPC","Lithograph","Lithograph Light","Long Island","Lydian BT","Magneto","Maiandra GD","Malayalam Sangam MN","Malgun Gothic","Mangal","Marigold","Marion","Marker Felt","Market","Marlett","Matisse ITC","Matura MT Script Capitals","Meiryo","Meiryo UI","Microsoft Himalaya","Microsoft JhengHei","Microsoft New Tai Lue","Microsoft PhagsPa","Microsoft Tai Le","Microsoft Uighur","Microsoft YaHei","Microsoft Yi Baiti","MingLiU","MingLiU_HKSCS","MingLiU_HKSCS-ExtB","MingLiU-ExtB","Minion","Minion Pro","Miriam","Miriam Fixed","Mistral","Modern","Modern No. 20","Mona Lisa Solid ITC TT","Mongolian Baiti","MONO","MoolBoran","Mrs Eaves","MS LineDraw","MS Mincho","MS PMincho","MS Reference Specialty","MS UI Gothic","MT Extra","MUSEO","MV Boli","Nadeem","Narkisim","NEVIS","News Gothic","News GothicMT","NewsGoth BT","Niagara Engraved","Niagara Solid","Noteworthy","NSimSun","Nyala","OCR A Extended","Old Century","Old English Text MT","Onyx","Onyx BT","OPTIMA","Oriya Sangam MN","OSAKA","OzHandicraft BT","Palace Script MT","Papyrus","Parchment","Party LET","Pegasus","Perpetua","Perpetua Titling MT","PetitaBold","Pickwick","Plantagenet Cherokee","Playbill","PMingLiU","PMingLiU-ExtB","Poor Richard","Poster","PosterBodoni BT","PRINCETOWN LET","Pristina","PTBarnum BT","Pythagoras","Raavi","Rage Italic","Ravie","Ribbon131 Bd BT","Rockwell","Rockwell Condensed","Rockwell Extra Bold","Rod","Roman","Sakkal Majalla","Santa Fe LET","Savoye LET","Sceptre","Script","Script MT Bold","SCRIPTINA","Serifa","Serifa BT","Serifa Th BT","ShelleyVolante BT","Sherwood","Shonar Bangla","Showcard Gothic","Shruti","Signboard","SILKSCREEN","SimHei","Simplified Arabic","Simplified Arabic Fixed","SimSun","SimSun-ExtB","Sinhala Sangam MN","Sketch Rockwell","Skia","Small Fonts","Snap ITC","Snell Roundhand","Socket","Souvenir Lt BT","Staccato222 BT","Steamer","Stencil","Storybook","Styllo","Subway","Swis721 BlkEx BT","Swiss911 XCm BT","Sylfaen","Synchro LET","System","Tamil Sangam MN","Technical","Teletype","Telugu Sangam MN","Tempus Sans ITC","Terminal","Thonburi","Traditional Arabic","Trajan","TRAJAN PRO","Tristan","Tubular","Tunga","Tw Cen MT","Tw Cen MT Condensed","Tw Cen MT Condensed Extra Bold","TypoUpright BT","Unicorn","Univers","Univers CE 55 Medium","Univers Condensed","Utsaah","Vagabond","Vani","Vijaya","Viner Hand ITC","VisualUI","Vivaldi","Vladimir Script","Vrinda","Westminster","WHITNEY","Wide Latin","ZapfEllipt BT","ZapfHumnst BT","ZapfHumnst Dm BT","Zapfino","Zurich BlkEx BT","Zurich Ex BT","ZWAdobeF"]));h=(h=h.concat(e.fonts.userDefinedFonts)).filter(function(t,e){return h.indexOf(t)===e});var n=document.getElementsByTagName("body")[0],r=document.createElement("div"),d=document.createElement("div"),i={},o={},f=function(){var t=document.createElement("span");return t.style.position="absolute",t.style.left="-9999px",t.style.fontSize="72px",t.style.fontStyle="normal",t.style.fontWeight="normal",t.style.letterSpacing="normal",t.style.lineBreak="auto",t.style.lineHeight="normal",t.style.textTransform="none",t.style.textAlign="left",t.style.textDecoration="none",t.style.textShadow="none",t.style.whiteSpace="normal",t.style.wordBreak="normal",t.style.wordSpacing="normal",t.innerHTML="mmmmmmmmmmlli",t},a=function(t){for(var e=!1,n=0;n<u.length;n++)if(e=t[n].offsetWidth!==i[u[n]]||t[n].offsetHeight!==o[u[n]])return e;return e},s=function(){for(var t=[],e=0,n=u.length;e<n;e++){var i=f();i.style.fontFamily=u[e],r.appendChild(i),t.push(i)}return t}();n.appendChild(r);for(var c=0,l=u.length;c<l;c++)i[u[c]]=s[c].offsetWidth,o[u[c]]=s[c].offsetHeight;var p=function(){for(var t,e,n,i={},r=0,o=h.length;r<o;r++){for(var a=[],s=0,c=u.length;s<c;s++){var l=(t=h[r],e=u[s],n=void 0,(n=f()).style.fontFamily="'"+t+"',"+e,n);d.appendChild(l),a.push(l)}i[h[r]]=a}return i}();n.appendChild(d);for(var g=[],m=0,y=h.length;m<y;m++)a(p[h[m]])&&g.push(h[m]);n.removeChild(d),n.removeChild(r),t(g)},pauseBefore:!0},{key:"fontsFlash",getData:function(e,t){return L()?V()?t.fonts.swfPath?void j(function(t){e(t)},t):e("missing options.fonts.swfPath"):e("flash not installed"):e("swf object not loaded")},pauseBefore:!0},{key:"audio",getData:function(n,t){var e=t.audio;if(e.excludeIOS11&&navigator.userAgent.match(/OS 11.+Version\/11.+Safari/))return n(t.EXCLUDED);var i=window.OfflineAudioContext||window.webkitOfflineAudioContext;if(null==i)return n(t.NOT_AVAILABLE);var r=new i(1,44100,44100),o=r.createOscillator();o.type="triangle",o.frequency.setValueAtTime(1e4,r.currentTime);var a=r.createDynamicsCompressor();l([["threshold",-50],["knee",40],["ratio",12],["reduction",-20],["attack",0],["release",.25]],function(t){void 0!==a[t[0]]&&"function"==typeof a[t[0]].setValueAtTime&&a[t[0]].setValueAtTime(t[1],r.currentTime)}),o.connect(a),a.connect(r.destination),o.start(0),r.startRendering();var s=setTimeout(function(){return console.warn('Audio fingerprint timed out. Please report bug at https://github.com/fingerprintjs/fingerprintjs with your user agent: "'+navigator.userAgent+'".'),r.oncomplete=function(){},r=null,n("audioTimeout")},e.timeout);r.oncomplete=function(t){var e;try{clearTimeout(s),e=t.renderedBuffer.getChannelData(0).slice(4500,5e3).reduce(function(t,e){return t+Math.abs(e)},0).toString(),o.disconnect(),a.disconnect()}catch(t){return void n(t)}n(e)}}},{key:"enumerateDevices",getData:function(e,t){if(!n())return e(t.NOT_AVAILABLE);navigator.mediaDevices.enumerateDevices().then(function(t){e(t.map(function(t){return"id="+t.deviceId+";gid="+t.groupId+";"+t.kind+";"+t.label}))}).catch(function(t){e(t)})}}],H=function(t){throw new Error("'new Fingerprint()' is deprecated, see https://github.com/fingerprintjs/fingerprintjs#upgrade-guide-from-182-to-200")};return H.get=function(n,i){i?n||(n={}):(i=n,n={}),function(t,e){if(null==e)return;var n,i;for(i in e)null==(n=e[i])||Object.prototype.hasOwnProperty.call(t,i)||(t[i]=n)}(n,t),n.components=n.extraComponents.concat(_);var r={data:[],addPreprocessedComponent:function(t,e){"function"==typeof n.preprocessor&&(e=n.preprocessor(t,e)),r.data.push({key:t,value:e})}},o=-1,a=function(t){if((o+=1)>=n.components.length)i(r.data);else{var e=n.components[o];if(n.excludes[e.key])a(!1);else{if(!t&&e.pauseBefore)return o-=1,void setTimeout(function(){a(!0)},1);try{e.getData(function(t){r.addPreprocessedComponent(e.key,t),a(!1)},n)}catch(t){r.addPreprocessedComponent(e.key,String(t)),a(!1)}}}};a(!1)},H.getPromise=function(n){return new Promise(function(t,e){H.get(n,t)})},H.getV18=function(o,a){return null==a&&(a=o,o={}),H.get(o,function(t){for(var e=[],n=0;n<t.length;n++){var i=t[n];if(i.value===(o.NOT_AVAILABLE||"not available"))e.push({key:i.key,value:"unknown"});else if("plugins"===i.key)e.push({key:"plugins",value:c(i.value,function(t){var e=c(t[2],function(t){return t.join?t.join("~"):t}).join(",");return[t[0],t[1],e].join("::")})});else if(-1!==["canvas","webgl"].indexOf(i.key)&&Array.isArray(i.value))e.push({key:i.key,value:i.value.join("~")});else if(-1!==["sessionStorage","localStorage","indexedDb","addBehavior","openDatabase"].indexOf(i.key)){if(!i.value)continue;e.push({key:i.key,value:1})}else i.value?e.push(i.value.join?{key:i.key,value:i.value.join(";")}:i):e.push({key:i.key,value:i.value})}var r=s(c(e,function(t){return t.value}).join("~~~"),31);a(r,e)})},H.x64hash128=s,H.VERSION="2.1.4",H})},function(t,e){t.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8BAMAAADI0sRBAAAAElBMVEVHcEyPj7V3fp52fZ52fZ52fZ5Xt/B6AAAABXRSTlMABraK6T5p8dIAAABjSURBVDjLY2AYBQMOGE2cBfBIM4eGKuKRZgkNDRLAK41PO9BwfNoZVfFrFxrVDgHCrqHYAEy7KVbZ0GCoNHbNoSHESRMwnIDTSA0XAsEyEjUTyEQEsiCBDEwg+xMoPEYBzQEAYlpTdYl6u9gAAAAASUVORK5CYII="},function(t,e){t.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8BAMAAADI0sRBAAAAD1BMVEVHcExSxBpSxBpV1CpSxBqRg39rAAAABHRSTlMAiOYGvfLd/QAAAFFJREFUOMtjYBgFwwsYKgkjOMxCigaoUiIujggBRhcXAQQPJKXi4oQQYHJxUUDwQFIuLi4IARYXFwcEDyQ1Kj0qPSykCWQDApmIQBYcBcMLAACpu0NXK5UQPQAAAABJRU5ErkJggg=="},function(t,e){t.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAR0AAADIBAMAAAAnwChgAAAAIVBMVEVHcEwZ+igZ+igZ+igZ+igZ+igZ+igZ+igZ+igZ+yga+ilF3P5FAAAACnRSTlMAyq2S5ndCXSoTIhVgFQAABDtJREFUeNrtnT1vGkEQhg+OT1e2EkUJlatEosLtVUkTIVcuIyqUpIkriqShIpKLiAqkVKkIISbZX2kLxUFm975mZ3ZepNve+OUBdveem9mLIoTRurh882oWoYxW39yP9Rglz8jsxi+QOLH5N04x8vQe8qwh4tTN/3GOkKe/z7PFwmN+YuExZozz49qNgXqe5FGecyw85jXI1IySp2mw8hzg0V4xDvFof5+nh3kmqnHah3HMDAvPGgzPrWqeayvPlequ2WB9XDYe1dmnY8XR3f3M0fFswPCorqVdMDw/0PEYVTwnVpyVap5LLDwNK85fMDyLCk8WHtV9Yc2K80cVTw8dzy0YnnGFJ8U/6eOpW3G2YHgmFZ79SLCuAWMrzu8KDy6ekZVnoBnH0nPKt7zg8egKFkvP6erUdoUna7TA/BOYnqvwZI5Kzx0VHjQ9B+afvld67rj90wLLIOji6VV67qjxVHouU7Cg6bnKP1V4hP1T58snIP/UvbhfgJ+MYfB8llJDNDwP37lnAfAU8E8dMdVJ03MNMddJ03OJlAum6bm2mAwekfxTTWouJ+q5E6nJnKjn5kKLXZvon6ZCq92U6J8Smd0AWc/1ZTaTZD2XiGy2W2T/NBXZbdP13CHYDQegziVZz1nv5C1Dnhu6f7IuHzczATzG45s31NVzCTsgP3u5tP74uWeepZd/csyknoB6fnrOXmleqOo5x0q84MVTkjcvIH8959jJLRTxUHe6cv6J80Y9S3kYHyAePccHiMk/cVV6cPmnmKkSJuHScwkLoJhNz/EAYiwP4wDEWR7GAYi1eq7v/WK85WF1b9jM5WG+gLir53wBsVfP+QHir57zm+wFysN6HrO9RPVczQOQRPVclw6IqufKXsltyXhOGfJ0qTeDparnbojbTanqOYdIKgKoRfdPpQEV8VMfxcrDSIDk8Lje6pAAdcWWx2FqZ6WZcpaHXZf2U19Fq+dK+ynHpBVxjrL6Zenpn5j9VNdTz3EDki8PK+enApSHldEv9QDVc2W2wv0Q1XPFAYUpDysOKFD3ZlFAoarnitoFNv/Eo1/4/BMPoGB4igEKh6cYoKDdm/n/rBm0ezNfv4zCNrfm6ZfQ3Zt5gIJ3b2YDCt/cmu2npuGbW7P0i0b3ZpafUuneTAek09yaDkipuTXNT2l1b6Y1c6h1b7r1iy1YQjW3Npx+Ss4/kQBJ+qfygIYO/xQMj6PYafNNEY+rlfVMtXvTcdScbvfmPDfOKmieTm6eRQQFKHT3ZgcLj2u10u3ebGXmmQXPkwlIo7k1C9BYIY9jO6jbvdnGwpMOSKu5NQ3QRCmP42pdt3uziYXHDUjz9DAXoCvFPA5AuoerxVh4bMOp/TyhGOlwNRuQ/uOW6lh4HhtOhIct1VEOV7MBYTyLqoZxepj9E8PAs1/FBiB5ove7OC8jmPHh6ebsndir3wFXkAz2i2iqAQAAAABJRU5ErkJggg=="},function(t,e,n){var i,r,o,a,u,s,c,l;t.exports=(i=n(0),n(15),n(16),o=(r=i).lib,a=o.Base,u=o.WordArray,s=r.algo,c=s.MD5,l=s.EvpKDF=a.extend({cfg:a.extend({keySize:4,hasher:c,iterations:1}),init:function(t){this.cfg=this.cfg.extend(t)},compute:function(t,e){for(var n=this.cfg,i=n.hasher.create(),r=u.create(),o=r.words,a=n.keySize,s=n.iterations;o.length<a;){c&&i.update(c);var c=i.update(t).finalize(e);i.reset();for(var l=1;l<s;l++)c=i.finalize(c),i.reset();r.concat(c)}return r.sigBytes=4*a,r}}),r.EvpKDF=function(t,e,n){return l.create(n).compute(t,e)},i.EvpKDF)},function(t,e,n){var r;t.exports=(r=n(0),n(13),n(14),n(9),n(17),function(){var t=r,e=t.lib.BlockCipher,n=t.algo,l=[],u=[],h=[],d=[],f=[],p=[],g=[],m=[],y=[],v=[];!function(){for(var t=[],e=0;e<256;e++)t[e]=e<128?e<<1:e<<1^283;var n=0,i=0;for(e=0;e<256;e++){var r=i^i<<1^i<<2^i<<3^i<<4;r=r>>>8^255&r^99,l[n]=r;var o=t[u[r]=n],a=t[o],s=t[a],c=257*t[r]^16843008*r;h[n]=c<<24|c>>>8,d[n]=c<<16|c>>>16,f[n]=c<<8|c>>>24,p[n]=c,c=16843009*s^65537*a^257*o^16843008*n,g[r]=c<<24|c>>>8,m[r]=c<<16|c>>>16,y[r]=c<<8|c>>>24,v[r]=c,n?(n=o^t[t[t[s^o]]],i^=t[t[i]]):n=i=1}}();var b=[0,1,2,4,8,16,32,64,128,27,54],i=n.AES=e.extend({_doReset:function(){if(!this._nRounds||this._keyPriorReset!==this._key){for(var t=this._keyPriorReset=this._key,e=t.words,n=t.sigBytes/4,i=4*((this._nRounds=n+6)+1),r=this._keySchedule=[],o=0;o<i;o++)if(o<n)r[o]=e[o];else{var a=r[o-1];o%n?6<n&&o%n==4&&(a=l[a>>>24]<<24|l[a>>>16&255]<<16|l[a>>>8&255]<<8|l[255&a]):(a=l[(a=a<<8|a>>>24)>>>24]<<24|l[a>>>16&255]<<16|l[a>>>8&255]<<8|l[255&a],a^=b[o/n|0]<<24),r[o]=r[o-n]^a}for(var s=this._invKeySchedule=[],c=0;c<i;c++)o=i-c,a=c%4?r[o]:r[o-4],s[c]=c<4||o<=4?a:g[l[a>>>24]]^m[l[a>>>16&255]]^y[l[a>>>8&255]]^v[l[255&a]]}},encryptBlock:function(t,e){this._doCryptBlock(t,e,this._keySchedule,h,d,f,p,l)},decryptBlock:function(t,e){var n=t[e+1];t[e+1]=t[e+3],t[e+3]=n,this._doCryptBlock(t,e,this._invKeySchedule,g,m,y,v,u),n=t[e+1],t[e+1]=t[e+3],t[e+3]=n},_doCryptBlock:function(t,e,n,i,r,o,a,s){for(var c=this._nRounds,l=t[e]^n[0],u=t[e+1]^n[1],h=t[e+2]^n[2],d=t[e+3]^n[3],f=4,p=1;p<c;p++){var g=i[l>>>24]^r[u>>>16&255]^o[h>>>8&255]^a[255&d]^n[f++],m=i[u>>>24]^r[h>>>16&255]^o[d>>>8&255]^a[255&l]^n[f++],y=i[h>>>24]^r[d>>>16&255]^o[l>>>8&255]^a[255&u]^n[f++],v=i[d>>>24]^r[l>>>16&255]^o[u>>>8&255]^a[255&h]^n[f++];l=g,u=m,h=y,d=v}g=(s[l>>>24]<<24|s[u>>>16&255]<<16|s[h>>>8&255]<<8|s[255&d])^n[f++],m=(s[u>>>24]<<24|s[h>>>16&255]<<16|s[d>>>8&255]<<8|s[255&l])^n[f++],y=(s[h>>>24]<<24|s[d>>>16&255]<<16|s[l>>>8&255]<<8|s[255&u])^n[f++],v=(s[d>>>24]<<24|s[l>>>16&255]<<16|s[u>>>8&255]<<8|s[255&h])^n[f++],t[e]=g,t[e+1]=m,t[e+2]=y,t[e+3]=v},keySize:8});t.AES=e._createHelper(i)}(),r.AES)},function(t,e,n){!function(t){"use strict";var e="0123456789abcdefghijklmnopqrstuvwxyz";function c(t){return e.charAt(t)}function n(t,e){return t&e}function l(t,e){return t|e}function i(t,e){return t^e}function r(t,e){return t&~e}function o(t){if(0==t)return-1;var e=0;return 0==(65535&t)&&(t>>=16,e+=16),0==(255&t)&&(t>>=8,e+=8),0==(15&t)&&(t>>=4,e+=4),0==(3&t)&&(t>>=2,e+=2),0==(1&t)&&++e,e}function a(t){for(var e=0;0!=t;)t&=t-1,++e;return e}var s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function u(t){var e,n,i="";for(e=0;e+3<=t.length;e+=3)n=parseInt(t.substring(e,e+3),16),i+=s.charAt(n>>6)+s.charAt(63&n);for(e+1==t.length?(n=parseInt(t.substring(e,e+1),16),i+=s.charAt(n<<2)):e+2==t.length&&(n=parseInt(t.substring(e,e+2),16),i+=s.charAt(n>>2)+s.charAt((3&n)<<4));0<(3&i.length);)i+="=";return i}function h(t){var e,n="",i=0,r=0;for(e=0;e<t.length&&"="!=t.charAt(e);++e){var o=s.indexOf(t.charAt(e));o<0||(i=0==i?(n+=c(o>>2),r=3&o,1):1==i?(n+=c(r<<2|o>>4),r=15&o,2):2==i?(n+=c(r),n+=c(o>>2),r=3&o,3):(n+=c(r<<2|o>>4),n+=c(15&o),0))}return 1==i&&(n+=c(r<<2)),n}var d,f,p=function(t,e){return(p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},g={decode:function(t){var e;if(void 0===d){var n="0123456789ABCDEF",i=" \f\n\r\t \u2028\u2029";for(d={},e=0;e<16;++e)d[n.charAt(e)]=e;for(n=n.toLowerCase(),e=10;e<16;++e)d[n.charAt(e)]=e;for(e=0;e<i.length;++e)d[i.charAt(e)]=-1}var r=[],o=0,a=0;for(e=0;e<t.length;++e){var s=t.charAt(e);if("="==s)break;if(-1!=(s=d[s])){if(void 0===s)throw new Error("Illegal character at offset "+e);o|=s,2<=++a?(r[r.length]=o,a=o=0):o<<=4}}if(a)throw new Error("Hex encoding incomplete: 4 bits missing");return r}},m={decode:function(t){var e;if(void 0===f){var n="= \f\n\r\t \u2028\u2029";for(f=Object.create(null),e=0;e<64;++e)f["ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e)]=e;for(e=0;e<n.length;++e)f[n.charAt(e)]=-1}var i=[],r=0,o=0;for(e=0;e<t.length;++e){var a=t.charAt(e);if("="==a)break;if(-1!=(a=f[a])){if(void 0===a)throw new Error("Illegal character at offset "+e);r|=a,4<=++o?(i[i.length]=r>>16,i[i.length]=r>>8&255,i[i.length]=255&r,o=r=0):r<<=6}}switch(o){case 1:throw new Error("Base64 encoding incomplete: at least 2 bits missing");case 2:i[i.length]=r>>10;break;case 3:i[i.length]=r>>16,i[i.length]=r>>8&255}return i},re:/-----BEGIN [^-]+-----([A-Za-z0-9+\/=\s]+)-----END [^-]+-----|begin-base64[^\n]+\n([A-Za-z0-9+\/=\s]+)====/,unarmor:function(t){var e=m.re.exec(t);if(e)if(e[1])t=e[1];else{if(!e[2])throw new Error("RegExp out of sync");t=e[2]}return m.decode(t)}},y=1e13,v=function(){function t(t){this.buf=[+t||0]}return t.prototype.mulAdd=function(t,e){var n,i,r=this.buf,o=r.length;for(n=0;n<o;++n)(i=r[n]*t+e)<y?e=0:i-=(e=0|i/y)*y,r[n]=i;0<e&&(r[n]=e)},t.prototype.sub=function(t){var e,n,i=this.buf,r=i.length;for(e=0;e<r;++e)n=i[e]-t,t=n<0?(n+=y,1):0,i[e]=n;for(;0===i[i.length-1];)i.pop()},t.prototype.toString=function(t){if(10!=(t||10))throw new Error("only base 10 is supported");for(var e=this.buf,n=e[e.length-1].toString(),i=e.length-2;0<=i;--i)n+=(y+e[i]).toString().substring(1);return n},t.prototype.valueOf=function(){for(var t=this.buf,e=0,n=t.length-1;0<=n;--n)e=e*y+t[n];return e},t.prototype.simplify=function(){var t=this.buf;return 1==t.length?t[0]:this},t}(),b="…",w=/^(\d\d)(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])([01]\d|2[0-3])(?:([0-5]\d)(?:([0-5]\d)(?:[.,](\d{1,3}))?)?)?(Z|[-+](?:[0]\d|1[0-2])([0-5]\d)?)?$/,T=/^(\d\d\d\d)(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])([01]\d|2[0-3])(?:([0-5]\d)(?:([0-5]\d)(?:[.,](\d{1,3}))?)?)?(Z|[-+](?:[0]\d|1[0-2])([0-5]\d)?)?$/;function A(t,e){return t.length>e&&(t=t.substring(0,e)+b),t}var E,x=function(){function n(t,e){this.hexDigits="0123456789ABCDEF",this.pos=t instanceof n?(this.enc=t.enc,t.pos):(this.enc=t,e)}return n.prototype.get=function(t){if(void 0===t&&(t=this.pos++),t>=this.enc.length)throw new Error("Requesting byte offset "+t+" on a stream of length "+this.enc.length);return"string"==typeof this.enc?this.enc.charCodeAt(t):this.enc[t]},n.prototype.hexByte=function(t){return this.hexDigits.charAt(t>>4&15)+this.hexDigits.charAt(15&t)},n.prototype.hexDump=function(t,e,n){for(var i="",r=t;r<e;++r)if(i+=this.hexByte(this.get(r)),!0!==n)switch(15&r){case 7:i+="  ";break;case 15:i+="\n";break;default:i+=" "}return i},n.prototype.isASCII=function(t,e){for(var n=t;n<e;++n){var i=this.get(n);if(i<32||176<i)return!1}return!0},n.prototype.parseStringISO=function(t,e){for(var n="",i=t;i<e;++i)n+=String.fromCharCode(this.get(i));return n},n.prototype.parseStringUTF=function(t,e){for(var n="",i=t;i<e;){var r=this.get(i++);n+=r<128?String.fromCharCode(r):191<r&&r<224?String.fromCharCode((31&r)<<6|63&this.get(i++)):String.fromCharCode((15&r)<<12|(63&this.get(i++))<<6|63&this.get(i++))}return n},n.prototype.parseStringBMP=function(t,e){for(var n,i,r="",o=t;o<e;)n=this.get(o++),i=this.get(o++),r+=String.fromCharCode(n<<8|i);return r},n.prototype.parseTime=function(t,e,n){var i=this.parseStringISO(t,e),r=(n?w:T).exec(i);return r?(n&&(r[1]=+r[1],r[1]+=+r[1]<70?2e3:1900),i=r[1]+"-"+r[2]+"-"+r[3]+" "+r[4],r[5]&&(i+=":"+r[5],r[6]&&(i+=":"+r[6],r[7]&&(i+="."+r[7]))),r[8]&&(i+=" UTC","Z"!=r[8]&&(i+=r[8],r[9]&&(i+=":"+r[9]))),i):"Unrecognized time: "+i},n.prototype.parseInteger=function(t,e){for(var n,i=this.get(t),r=127<i,o=r?255:0,a="";i==o&&++t<e;)i=this.get(t);if(0==(n=e-t))return r?-1:0;if(4<n){for(a=i,n<<=3;0==(128&(+a^o));)a=+a<<1,--n;a="("+n+" bit)\n"}r&&(i-=256);for(var s=new v(i),c=t+1;c<e;++c)s.mulAdd(256,this.get(c));return a+s.toString()},n.prototype.parseBitString=function(t,e,n){for(var i=this.get(t),r=(e-t-1<<3)-i,o="("+r+" bit)\n",a="",s=t+1;s<e;++s){for(var c=this.get(s),l=s==e-1?i:0,u=7;l<=u;--u)a+=c>>u&1?"1":"0";if(a.length>n)return o+A(a,n)}return o+a},n.prototype.parseOctetString=function(t,e,n){if(this.isASCII(t,e))return A(this.parseStringISO(t,e),n);var i=e-t,r="("+i+" byte)\n";(n/=2)<i&&(e=t+n);for(var o=t;o<e;++o)r+=this.hexByte(this.get(o));return n<i&&(r+=b),r},n.prototype.parseOID=function(t,e,n){for(var i="",r=new v,o=0,a=t;a<e;++a){var s=this.get(a);if(r.mulAdd(128,127&s),o+=7,!(128&s)){if(""===i)if((r=r.simplify())instanceof v)r.sub(80),i="2."+r.toString();else{var c=r<80?r<40?0:1:2;i=c+"."+(r-40*c)}else i+="."+r.toString();if(i.length>n)return A(i,n);r=new v,o=0}}return 0<o&&(i+=".incomplete"),i},n}(),S=function(){function u(t,e,n,i,r){if(!(i instanceof O))throw new Error("Invalid tag value.");this.stream=t,this.header=e,this.length=n,this.tag=i,this.sub=r}return u.prototype.typeName=function(){switch(this.tag.tagClass){case 0:switch(this.tag.tagNumber){case 0:return"EOC";case 1:return"BOOLEAN";case 2:return"INTEGER";case 3:return"BIT_STRING";case 4:return"OCTET_STRING";case 5:return"NULL";case 6:return"OBJECT_IDENTIFIER";case 7:return"ObjectDescriptor";case 8:return"EXTERNAL";case 9:return"REAL";case 10:return"ENUMERATED";case 11:return"EMBEDDED_PDV";case 12:return"UTF8String";case 16:return"SEQUENCE";case 17:return"SET";case 18:return"NumericString";case 19:return"PrintableString";case 20:return"TeletexString";case 21:return"VideotexString";case 22:return"IA5String";case 23:return"UTCTime";case 24:return"GeneralizedTime";case 25:return"GraphicString";case 26:return"VisibleString";case 27:return"GeneralString";case 28:return"UniversalString";case 30:return"BMPString"}return"Universal_"+this.tag.tagNumber.toString();case 1:return"Application_"+this.tag.tagNumber.toString();case 2:return"["+this.tag.tagNumber.toString()+"]";case 3:return"Private_"+this.tag.tagNumber.toString()}},u.prototype.content=function(t){if(void 0===this.tag)return null;void 0===t&&(t=1/0);var e=this.posContent(),n=Math.abs(this.length);if(!this.tag.isUniversal())return null!==this.sub?"("+this.sub.length+" elem)":this.stream.parseOctetString(e,e+n,t);switch(this.tag.tagNumber){case 1:return 0===this.stream.get(e)?"false":"true";case 2:return this.stream.parseInteger(e,e+n);case 3:return this.sub?"("+this.sub.length+" elem)":this.stream.parseBitString(e,e+n,t);case 4:return this.sub?"("+this.sub.length+" elem)":this.stream.parseOctetString(e,e+n,t);case 6:return this.stream.parseOID(e,e+n,t);case 16:case 17:return null!==this.sub?"("+this.sub.length+" elem)":"(no elem)";case 12:return A(this.stream.parseStringUTF(e,e+n),t);case 18:case 19:case 20:case 21:case 22:case 26:return A(this.stream.parseStringISO(e,e+n),t);case 30:return A(this.stream.parseStringBMP(e,e+n),t);case 23:case 24:return this.stream.parseTime(e,e+n,23==this.tag.tagNumber)}return null},u.prototype.toString=function(){return this.typeName()+"@"+this.stream.pos+"[header:"+this.header+",length:"+this.length+",sub:"+(null===this.sub?"null":this.sub.length)+"]"},u.prototype.toPrettyString=function(t){void 0===t&&(t="");var e=t+this.typeName()+" @"+this.stream.pos;if(0<=this.length&&(e+="+"),e+=this.length,this.tag.tagConstructed?e+=" (constructed)":!this.tag.isUniversal()||3!=this.tag.tagNumber&&4!=this.tag.tagNumber||null===this.sub||(e+=" (encapsulates)"),e+="\n",null!==this.sub){t+="  ";for(var n=0,i=this.sub.length;n<i;++n)e+=this.sub[n].toPrettyString(t)}return e},u.prototype.posStart=function(){return this.stream.pos},u.prototype.posContent=function(){return this.stream.pos+this.header},u.prototype.posEnd=function(){return this.stream.pos+this.header+Math.abs(this.length)},u.prototype.toHexString=function(){return this.stream.hexDump(this.posStart(),this.posEnd(),!0)},u.decodeLength=function(t){var e=t.get(),n=127&e;if(n==e)return n;if(6<n)throw new Error("Length over 48 bits not supported at position "+(t.pos-1));if(0===n)return null;for(var i=e=0;i<n;++i)e=256*e+t.get();return e},u.prototype.getHexStringValue=function(){var t=this.toHexString(),e=2*this.header,n=2*this.length;return t.substr(e,n)},u.decode=function(t){var i;i=t instanceof x?t:new x(t,0);var e=new x(i),n=new O(i),r=u.decodeLength(i),o=i.pos,a=o-e.pos,s=null,c=function(){var t=[];if(null!==r){for(var e=o+r;i.pos<e;)t[t.length]=u.decode(i);if(i.pos!=e)throw new Error("Content size is not correct for container starting at offset "+o)}else try{for(;;){var n=u.decode(i);if(n.tag.isEOC())break;t[t.length]=n}r=o-i.pos}catch(t){throw new Error("Exception while decoding undefined length content: "+t)}return t};if(n.tagConstructed)s=c();else if(n.isUniversal()&&(3==n.tagNumber||4==n.tagNumber))try{if(3==n.tagNumber&&0!=i.get())throw new Error("BIT STRINGs with unused bits cannot encapsulate.");s=c();for(var l=0;l<s.length;++l)if(s[l].tag.isEOC())throw new Error("EOC is not supposed to be actual content.")}catch(t){s=null}if(null===s){if(null===r)throw new Error("We can't skip over an invalid tag with undefined length at offset "+o);i.pos=o+Math.abs(r)}return new u(e,a,r,n,s)},u}(),O=function(){function t(t){var e=t.get();if(this.tagClass=e>>6,this.tagConstructed=0!=(32&e),this.tagNumber=31&e,31==this.tagNumber){for(var n=new v;e=t.get(),n.mulAdd(128,127&e),128&e;);this.tagNumber=n.simplify()}}return t.prototype.isUniversal=function(){return 0===this.tagClass},t.prototype.isEOC=function(){return 0===this.tagClass&&0===this.tagNumber},t}(),C=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997],B=(1<<26)/C[C.length-1],D=function(){function b(t,e,n){null!=t&&("number"==typeof t?this.fromNumber(t,e,n):null==e&&"string"!=typeof t?this.fromString(t,256):this.fromString(t,e))}return b.prototype.toString=function(t){if(this.s<0)return"-"+this.negate().toString(t);var e;if(16==t)e=4;else if(8==t)e=3;else if(2==t)e=1;else if(32==t)e=5;else{if(4!=t)return this.toRadix(t);e=2}var n,i=(1<<e)-1,r=!1,o="",a=this.t,s=this.DB-a*this.DB%e;if(0<a--)for(s<this.DB&&0<(n=this[a]>>s)&&(r=!0,o=c(n));0<=a;)s<e?(n=(this[a]&(1<<s)-1)<<e-s,n|=this[--a]>>(s+=this.DB-e)):(n=this[a]>>(s-=e)&i,s<=0&&(s+=this.DB,--a)),0<n&&(r=!0),r&&(o+=c(n));return r?o:"0"},b.prototype.negate=function(){var t=P();return b.ZERO.subTo(this,t),t},b.prototype.abs=function(){return this.s<0?this.negate():this},b.prototype.compareTo=function(t){var e=this.s-t.s;if(0!=e)return e;var n=this.t;if(0!=(e=n-t.t))return this.s<0?-e:e;for(;0<=--n;)if(0!=(e=this[n]-t[n]))return e;return 0},b.prototype.bitLength=function(){return this.t<=0?0:this.DB*(this.t-1)+_(this[this.t-1]^this.s&this.DM)},b.prototype.mod=function(t){var e=P();return this.abs().divRemTo(t,null,e),this.s<0&&0<e.compareTo(b.ZERO)&&t.subTo(e,e),e},b.prototype.modPowInt=function(t,e){var n;return n=t<256||e.isEven()?new R(e):new I(e),this.exp(t,n)},b.prototype.clone=function(){var t=P();return this.copyTo(t),t},b.prototype.intValue=function(){if(this.s<0){if(1==this.t)return this[0]-this.DV;if(0==this.t)return-1}else{if(1==this.t)return this[0];if(0==this.t)return 0}return(this[1]&(1<<32-this.DB)-1)<<this.DB|this[0]},b.prototype.byteValue=function(){return 0==this.t?this.s:this[0]<<24>>24},b.prototype.shortValue=function(){return 0==this.t?this.s:this[0]<<16>>16},b.prototype.signum=function(){return this.s<0?-1:this.t<=0||1==this.t&&this[0]<=0?0:1},b.prototype.toByteArray=function(){var t=this.t,e=[];e[0]=this.s;var n,i=this.DB-t*this.DB%8,r=0;if(0<t--)for(i<this.DB&&(n=this[t]>>i)!=(this.s&this.DM)>>i&&(e[r++]=n|this.s<<this.DB-i);0<=t;)i<8?(n=(this[t]&(1<<i)-1)<<8-i,n|=this[--t]>>(i+=this.DB-8)):(n=this[t]>>(i-=8)&255,i<=0&&(i+=this.DB,--t)),0!=(128&n)&&(n|=-256),0==r&&(128&this.s)!=(128&n)&&++r,(0<r||n!=this.s)&&(e[r++]=n);return e},b.prototype.equals=function(t){return 0==this.compareTo(t)},b.prototype.min=function(t){return this.compareTo(t)<0?this:t},b.prototype.max=function(t){return 0<this.compareTo(t)?this:t},b.prototype.and=function(t){var e=P();return this.bitwiseTo(t,n,e),e},b.prototype.or=function(t){var e=P();return this.bitwiseTo(t,l,e),e},b.prototype.xor=function(t){var e=P();return this.bitwiseTo(t,i,e),e},b.prototype.andNot=function(t){var e=P();return this.bitwiseTo(t,r,e),e},b.prototype.not=function(){for(var t=P(),e=0;e<this.t;++e)t[e]=this.DM&~this[e];return t.t=this.t,t.s=~this.s,t},b.prototype.shiftLeft=function(t){var e=P();return t<0?this.rShiftTo(-t,e):this.lShiftTo(t,e),e},b.prototype.shiftRight=function(t){var e=P();return t<0?this.lShiftTo(-t,e):this.rShiftTo(t,e),e},b.prototype.getLowestSetBit=function(){for(var t=0;t<this.t;++t)if(0!=this[t])return t*this.DB+o(this[t]);return this.s<0?this.t*this.DB:-1},b.prototype.bitCount=function(){for(var t=0,e=this.s&this.DM,n=0;n<this.t;++n)t+=a(this[n]^e);return t},b.prototype.testBit=function(t){var e=Math.floor(t/this.DB);return e>=this.t?0!=this.s:0!=(this[e]&1<<t%this.DB)},b.prototype.setBit=function(t){return this.changeBit(t,l)},b.prototype.clearBit=function(t){return this.changeBit(t,r)},b.prototype.flipBit=function(t){return this.changeBit(t,i)},b.prototype.add=function(t){var e=P();return this.addTo(t,e),e},b.prototype.subtract=function(t){var e=P();return this.subTo(t,e),e},b.prototype.multiply=function(t){var e=P();return this.multiplyTo(t,e),e},b.prototype.divide=function(t){var e=P();return this.divRemTo(t,e,null),e},b.prototype.remainder=function(t){var e=P();return this.divRemTo(t,null,e),e},b.prototype.divideAndRemainder=function(t){var e=P(),n=P();return this.divRemTo(t,e,n),[e,n]},b.prototype.modPow=function(t,e){var n,i,r=t.bitLength(),o=F(1);if(r<=0)return o;n=r<18?1:r<48?3:r<144?4:r<768?5:6,i=r<8?new R(e):e.isEven()?new N(e):new I(e);var a=[],s=3,c=n-1,l=(1<<n)-1;if(a[1]=i.convert(this),1<n){var u=P();for(i.sqrTo(a[1],u);s<=l;)a[s]=P(),i.mulTo(u,a[s-2],a[s]),s+=2}var h,d,f=t.t-1,p=!0,g=P();for(r=_(t[f])-1;0<=f;){for(c<=r?h=t[f]>>r-c&l:(h=(t[f]&(1<<r+1)-1)<<c-r,0<f&&(h|=t[f-1]>>this.DB+r-c)),s=n;0==(1&h);)h>>=1,--s;if((r-=s)<0&&(r+=this.DB,--f),p)a[h].copyTo(o),p=!1;else{for(;1<s;)i.sqrTo(o,g),i.sqrTo(g,o),s-=2;0<s?i.sqrTo(o,g):(d=o,o=g,g=d),i.mulTo(g,a[h],o)}for(;0<=f&&0==(t[f]&1<<r);)i.sqrTo(o,g),d=o,o=g,g=d,--r<0&&(r=this.DB-1,--f)}return i.revert(o)},b.prototype.modInverse=function(t){var e=t.isEven();if(this.isEven()&&e||0==t.signum())return b.ZERO;for(var n=t.clone(),i=this.clone(),r=F(1),o=F(0),a=F(0),s=F(1);0!=n.signum();){for(;n.isEven();)n.rShiftTo(1,n),e?(r.isEven()&&o.isEven()||(r.addTo(this,r),o.subTo(t,o)),r.rShiftTo(1,r)):o.isEven()||o.subTo(t,o),o.rShiftTo(1,o);for(;i.isEven();)i.rShiftTo(1,i),e?(a.isEven()&&s.isEven()||(a.addTo(this,a),s.subTo(t,s)),a.rShiftTo(1,a)):s.isEven()||s.subTo(t,s),s.rShiftTo(1,s);0<=n.compareTo(i)?(n.subTo(i,n),e&&r.subTo(a,r),o.subTo(s,o)):(i.subTo(n,i),e&&a.subTo(r,a),s.subTo(o,s))}return 0!=i.compareTo(b.ONE)?b.ZERO:0<=s.compareTo(t)?s.subtract(t):s.signum()<0?(s.addTo(t,s),s.signum()<0?s.add(t):s):s},b.prototype.pow=function(t){return this.exp(t,new k)},b.prototype.gcd=function(t){var e=this.s<0?this.negate():this.clone(),n=t.s<0?t.negate():t.clone();if(e.compareTo(n)<0){var i=e;e=n,n=i}var r=e.getLowestSetBit(),o=n.getLowestSetBit();if(o<0)return e;for(r<o&&(o=r),0<o&&(e.rShiftTo(o,e),n.rShiftTo(o,n));0<e.signum();)0<(r=e.getLowestSetBit())&&e.rShiftTo(r,e),0<(r=n.getLowestSetBit())&&n.rShiftTo(r,n),0<=e.compareTo(n)?(e.subTo(n,e),e.rShiftTo(1,e)):(n.subTo(e,n),n.rShiftTo(1,n));return 0<o&&n.lShiftTo(o,n),n},b.prototype.isProbablePrime=function(t){var e,n=this.abs();if(1==n.t&&n[0]<=C[C.length-1]){for(e=0;e<C.length;++e)if(n[0]==C[e])return!0;return!1}if(n.isEven())return!1;for(e=1;e<C.length;){for(var i=C[e],r=e+1;r<C.length&&i<B;)i*=C[r++];for(i=n.modInt(i);e<r;)if(i%C[e++]==0)return!1}return n.millerRabin(t)},b.prototype.copyTo=function(t){for(var e=this.t-1;0<=e;--e)t[e]=this[e];t.t=this.t,t.s=this.s},b.prototype.fromInt=function(t){this.t=1,this.s=t<0?-1:0,0<t?this[0]=t:t<-1?this[0]=t+this.DV:this.t=0},b.prototype.fromString=function(t,e){var n;if(16==e)n=4;else if(8==e)n=3;else if(256==e)n=8;else if(2==e)n=1;else if(32==e)n=5;else{if(4!=e)return void this.fromRadix(t,e);n=2}this.t=0,this.s=0;for(var i=t.length,r=!1,o=0;0<=--i;){var a=8==n?255&+t[i]:U(t,i);a<0?"-"==t.charAt(i)&&(r=!0):(r=!1,0==o?this[this.t++]=a:o+n>this.DB?(this[this.t-1]|=(a&(1<<this.DB-o)-1)<<o,this[this.t++]=a>>this.DB-o):this[this.t-1]|=a<<o,(o+=n)>=this.DB&&(o-=this.DB))}8==n&&0!=(128&+t[0])&&(this.s=-1,0<o&&(this[this.t-1]|=(1<<this.DB-o)-1<<o)),this.clamp(),r&&b.ZERO.subTo(this,this)},b.prototype.clamp=function(){for(var t=this.s&this.DM;0<this.t&&this[this.t-1]==t;)--this.t},b.prototype.dlShiftTo=function(t,e){var n;for(n=this.t-1;0<=n;--n)e[n+t]=this[n];for(n=t-1;0<=n;--n)e[n]=0;e.t=this.t+t,e.s=this.s},b.prototype.drShiftTo=function(t,e){for(var n=t;n<this.t;++n)e[n-t]=this[n];e.t=Math.max(this.t-t,0),e.s=this.s},b.prototype.lShiftTo=function(t,e){for(var n=t%this.DB,i=this.DB-n,r=(1<<i)-1,o=Math.floor(t/this.DB),a=this.s<<n&this.DM,s=this.t-1;0<=s;--s)e[s+o+1]=this[s]>>i|a,a=(this[s]&r)<<n;for(var s=o-1;0<=s;--s)e[s]=0;e[o]=a,e.t=this.t+o+1,e.s=this.s,e.clamp()},b.prototype.rShiftTo=function(t,e){e.s=this.s;var n=Math.floor(t/this.DB);if(n>=this.t)e.t=0;else{var i=t%this.DB,r=this.DB-i,o=(1<<i)-1;e[0]=this[n]>>i;for(var a=n+1;a<this.t;++a)e[a-n-1]|=(this[a]&o)<<r,e[a-n]=this[a]>>i;0<i&&(e[this.t-n-1]|=(this.s&o)<<r),e.t=this.t-n,e.clamp()}},b.prototype.subTo=function(t,e){for(var n=0,i=0,r=Math.min(t.t,this.t);n<r;)i+=this[n]-t[n],e[n++]=i&this.DM,i>>=this.DB;if(t.t<this.t){for(i-=t.s;n<this.t;)i+=this[n],e[n++]=i&this.DM,i>>=this.DB;i+=this.s}else{for(i+=this.s;n<t.t;)i-=t[n],e[n++]=i&this.DM,i>>=this.DB;i-=t.s}e.s=i<0?-1:0,i<-1?e[n++]=this.DV+i:0<i&&(e[n++]=i),e.t=n,e.clamp()},b.prototype.multiplyTo=function(t,e){var n=this.abs(),i=t.abs(),r=n.t;for(e.t=r+i.t;0<=--r;)e[r]=0;for(r=0;r<i.t;++r)e[r+n.t]=n.am(0,i[r],e,r,0,n.t);e.s=0,e.clamp(),this.s!=t.s&&b.ZERO.subTo(e,e)},b.prototype.squareTo=function(t){for(var e=this.abs(),n=t.t=2*e.t;0<=--n;)t[n]=0;for(n=0;n<e.t-1;++n){var i=e.am(n,e[n],t,2*n,0,1);(t[n+e.t]+=e.am(n+1,2*e[n],t,2*n+1,i,e.t-n-1))>=e.DV&&(t[n+e.t]-=e.DV,t[n+e.t+1]=1)}0<t.t&&(t[t.t-1]+=e.am(n,e[n],t,2*n,0,1)),t.s=0,t.clamp()},b.prototype.divRemTo=function(t,e,n){var i=t.abs();if(!(i.t<=0)){var r=this.abs();if(r.t<i.t)return null!=e&&e.fromInt(0),void(null!=n&&this.copyTo(n));null==n&&(n=P());var o=P(),a=this.s,s=t.s,c=this.DB-_(i[i.t-1]);0<c?(i.lShiftTo(c,o),r.lShiftTo(c,n)):(i.copyTo(o),r.copyTo(n));var l=o.t,u=o[l-1];if(0!=u){var h=u*(1<<this.F1)+(1<l?o[l-2]>>this.F2:0),d=this.FV/h,f=(1<<this.F1)/h,p=1<<this.F2,g=n.t,m=g-l,y=null==e?P():e;for(o.dlShiftTo(m,y),0<=n.compareTo(y)&&(n[n.t++]=1,n.subTo(y,n)),b.ONE.dlShiftTo(l,y),y.subTo(o,o);o.t<l;)o[o.t++]=0;for(;0<=--m;){var v=n[--g]==u?this.DM:Math.floor(n[g]*d+(n[g-1]+p)*f);if((n[g]+=o.am(0,v,n,m,0,l))<v)for(o.dlShiftTo(m,y),n.subTo(y,n);n[g]<--v;)n.subTo(y,n)}null!=e&&(n.drShiftTo(l,e),a!=s&&b.ZERO.subTo(e,e)),n.t=l,n.clamp(),0<c&&n.rShiftTo(c,n),a<0&&b.ZERO.subTo(n,n)}}},b.prototype.invDigit=function(){if(this.t<1)return 0;var t=this[0];if(0==(1&t))return 0;var e=3&t;return 0<(e=(e=(e=(e=e*(2-(15&t)*e)&15)*(2-(255&t)*e)&255)*(2-((65535&t)*e&65535))&65535)*(2-t*e%this.DV)%this.DV)?this.DV-e:-e},b.prototype.isEven=function(){return 0==(0<this.t?1&this[0]:this.s)},b.prototype.exp=function(t,e){if(4294967295<t||t<1)return b.ONE;var n=P(),i=P(),r=e.convert(this),o=_(t)-1;for(r.copyTo(n);0<=--o;)if(e.sqrTo(n,i),0<(t&1<<o))e.mulTo(i,r,n);else{var a=n;n=i,i=a}return e.revert(n)},b.prototype.chunkSize=function(t){return Math.floor(Math.LN2*this.DB/Math.log(t))},b.prototype.toRadix=function(t){if(null==t&&(t=10),0==this.signum()||t<2||36<t)return"0";var e=this.chunkSize(t),n=Math.pow(t,e),i=F(n),r=P(),o=P(),a="";for(this.divRemTo(i,r,o);0<r.signum();)a=(n+o.intValue()).toString(t).substr(1)+a,r.divRemTo(i,r,o);return o.intValue().toString(t)+a},b.prototype.fromRadix=function(t,e){this.fromInt(0),null==e&&(e=10);for(var n=this.chunkSize(e),i=Math.pow(e,n),r=!1,o=0,a=0,s=0;s<t.length;++s){var c=U(t,s);c<0?"-"==t.charAt(s)&&0==this.signum()&&(r=!0):(a=e*a+c,++o>=n&&(this.dMultiply(i),this.dAddOffset(a,0),a=o=0))}0<o&&(this.dMultiply(Math.pow(e,o)),this.dAddOffset(a,0)),r&&b.ZERO.subTo(this,this)},b.prototype.fromNumber=function(t,e,n){if("number"==typeof e)if(t<2)this.fromInt(1);else for(this.fromNumber(t,n),this.testBit(t-1)||this.bitwiseTo(b.ONE.shiftLeft(t-1),l,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(e);)this.dAddOffset(2,0),this.bitLength()>t&&this.subTo(b.ONE.shiftLeft(t-1),this);else{var i=[],r=7&t;i.length=1+(t>>3),e.nextBytes(i),0<r?i[0]&=(1<<r)-1:i[0]=0,this.fromString(i,256)}},b.prototype.bitwiseTo=function(t,e,n){var i,r,o=Math.min(t.t,this.t);for(i=0;i<o;++i)n[i]=e(this[i],t[i]);if(t.t<this.t){for(r=t.s&this.DM,i=o;i<this.t;++i)n[i]=e(this[i],r);n.t=this.t}else{for(r=this.s&this.DM,i=o;i<t.t;++i)n[i]=e(r,t[i]);n.t=t.t}n.s=e(this.s,t.s),n.clamp()},b.prototype.changeBit=function(t,e){var n=b.ONE.shiftLeft(t);return this.bitwiseTo(n,e,n),n},b.prototype.addTo=function(t,e){for(var n=0,i=0,r=Math.min(t.t,this.t);n<r;)i+=this[n]+t[n],e[n++]=i&this.DM,i>>=this.DB;if(t.t<this.t){for(i+=t.s;n<this.t;)i+=this[n],e[n++]=i&this.DM,i>>=this.DB;i+=this.s}else{for(i+=this.s;n<t.t;)i+=t[n],e[n++]=i&this.DM,i>>=this.DB;i+=t.s}e.s=i<0?-1:0,0<i?e[n++]=i:i<-1&&(e[n++]=this.DV+i),e.t=n,e.clamp()},b.prototype.dMultiply=function(t){this[this.t]=this.am(0,t-1,this,0,0,this.t),++this.t,this.clamp()},b.prototype.dAddOffset=function(t,e){if(0!=t){for(;this.t<=e;)this[this.t++]=0;for(this[e]+=t;this[e]>=this.DV;)this[e]-=this.DV,++e>=this.t&&(this[this.t++]=0),++this[e]}},b.prototype.multiplyLowerTo=function(t,e,n){var i=Math.min(this.t+t.t,e);for(n.s=0,n.t=i;0<i;)n[--i]=0;for(var r=n.t-this.t;i<r;++i)n[i+this.t]=this.am(0,t[i],n,i,0,this.t);for(var r=Math.min(t.t,e);i<r;++i)this.am(0,t[i],n,i,0,e-i);n.clamp()},b.prototype.multiplyUpperTo=function(t,e,n){--e;var i=n.t=this.t+t.t-e;for(n.s=0;0<=--i;)n[i]=0;for(i=Math.max(e-this.t,0);i<t.t;++i)n[this.t+i-e]=this.am(e-i,t[i],n,0,0,this.t+i-e);n.clamp(),n.drShiftTo(1,n)},b.prototype.modInt=function(t){if(t<=0)return 0;var e=this.DV%t,n=this.s<0?t-1:0;if(0<this.t)if(0==e)n=this[0]%t;else for(var i=this.t-1;0<=i;--i)n=(e*n+this[i])%t;return n},b.prototype.millerRabin=function(t){var e=this.subtract(b.ONE),n=e.getLowestSetBit();if(n<=0)return!1;var i=e.shiftRight(n);C.length<(t=t+1>>1)&&(t=C.length);for(var r=P(),o=0;o<t;++o){r.fromInt(C[Math.floor(Math.random()*C.length)]);var a=r.modPow(i,this);if(0!=a.compareTo(b.ONE)&&0!=a.compareTo(e)){for(var s=1;s++<n&&0!=a.compareTo(e);)if(0==(a=a.modPowInt(2,this)).compareTo(b.ONE))return!1;if(0!=a.compareTo(e))return!1}}return!0},b.prototype.square=function(){var t=P();return this.squareTo(t),t},b.prototype.gcda=function(t,e){var n=this.s<0?this.negate():this.clone(),i=t.s<0?t.negate():t.clone();if(n.compareTo(i)<0){var r=n;n=i,i=r}var o=n.getLowestSetBit(),a=i.getLowestSetBit();if(a<0)e(n);else{o<a&&(a=o),0<a&&(n.rShiftTo(a,n),i.rShiftTo(a,i));var s=function(){0<(o=n.getLowestSetBit())&&n.rShiftTo(o,n),0<(o=i.getLowestSetBit())&&i.rShiftTo(o,i),0<=n.compareTo(i)?(n.subTo(i,n),n.rShiftTo(1,n)):(i.subTo(n,i),i.rShiftTo(1,i)),0<n.signum()?setTimeout(s,0):(0<a&&i.lShiftTo(a,i),setTimeout(function(){e(i)},0))};setTimeout(s,10)}},b.prototype.fromNumberAsync=function(t,e,n,i){if("number"==typeof e)if(t<2)this.fromInt(1);else{this.fromNumber(t,n),this.testBit(t-1)||this.bitwiseTo(b.ONE.shiftLeft(t-1),l,this),this.isEven()&&this.dAddOffset(1,0);var r=this,o=function(){r.dAddOffset(2,0),r.bitLength()>t&&r.subTo(b.ONE.shiftLeft(t-1),r),r.isProbablePrime(e)?setTimeout(function(){i()},0):setTimeout(o,0)};setTimeout(o,0)}else{var a=[],s=7&t;a.length=1+(t>>3),e.nextBytes(a),0<s?a[0]&=(1<<s)-1:a[0]=0,this.fromString(a,256)}},b}(),k=function(){function t(){}return t.prototype.convert=function(t){return t},t.prototype.revert=function(t){return t},t.prototype.mulTo=function(t,e,n){t.multiplyTo(e,n)},t.prototype.sqrTo=function(t,e){t.squareTo(e)},t}(),R=function(){function t(t){this.m=t}return t.prototype.convert=function(t){return t.s<0||0<=t.compareTo(this.m)?t.mod(this.m):t},t.prototype.revert=function(t){return t},t.prototype.reduce=function(t){t.divRemTo(this.m,null,t)},t.prototype.mulTo=function(t,e,n){t.multiplyTo(e,n),this.reduce(n)},t.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)},t}(),I=function(){function t(t){this.m=t,this.mp=t.invDigit(),this.mpl=32767&this.mp,this.mph=this.mp>>15,this.um=(1<<t.DB-15)-1,this.mt2=2*t.t}return t.prototype.convert=function(t){var e=P();return t.abs().dlShiftTo(this.m.t,e),e.divRemTo(this.m,null,e),t.s<0&&0<e.compareTo(D.ZERO)&&this.m.subTo(e,e),e},t.prototype.revert=function(t){var e=P();return t.copyTo(e),this.reduce(e),e},t.prototype.reduce=function(t){for(;t.t<=this.mt2;)t[t.t++]=0;for(var e=0;e<this.m.t;++e){var n=32767&t[e],i=n*this.mpl+((n*this.mph+(t[e]>>15)*this.mpl&this.um)<<15)&t.DM;for(n=e+this.m.t,t[n]+=this.m.am(0,i,t,e,0,this.m.t);t[n]>=t.DV;)t[n]-=t.DV,t[++n]++}t.clamp(),t.drShiftTo(this.m.t,t),0<=t.compareTo(this.m)&&t.subTo(this.m,t)},t.prototype.mulTo=function(t,e,n){t.multiplyTo(e,n),this.reduce(n)},t.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)},t}(),N=function(){function t(t){this.m=t,this.r2=P(),this.q3=P(),D.ONE.dlShiftTo(2*t.t,this.r2),this.mu=this.r2.divide(t)}return t.prototype.convert=function(t){if(t.s<0||t.t>2*this.m.t)return t.mod(this.m);if(t.compareTo(this.m)<0)return t;var e=P();return t.copyTo(e),this.reduce(e),e},t.prototype.revert=function(t){return t},t.prototype.reduce=function(t){for(t.drShiftTo(this.m.t-1,this.r2),t.t>this.m.t+1&&(t.t=this.m.t+1,t.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);t.compareTo(this.r2)<0;)t.dAddOffset(1,this.m.t+1);for(t.subTo(this.r2,t);0<=t.compareTo(this.m);)t.subTo(this.m,t)},t.prototype.mulTo=function(t,e,n){t.multiplyTo(e,n),this.reduce(n)},t.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)},t}();function P(){return new D(null)}function M(t,e){return new D(t,e)}E="Microsoft Internet Explorer"==navigator.appName?(D.prototype.am=function(t,e,n,i,r,o){for(var a=32767&e,s=e>>15;0<=--o;){var c=32767&this[t],l=this[t++]>>15,u=s*c+l*a;c=a*c+((32767&u)<<15)+n[i]+(1073741823&r),r=(c>>>30)+(u>>>15)+s*l+(r>>>30),n[i++]=1073741823&c}return r},30):"Netscape"!=navigator.appName?(D.prototype.am=function(t,e,n,i,r,o){for(;0<=--o;){var a=e*this[t++]+n[i]+r;r=Math.floor(a/67108864),n[i++]=67108863&a}return r},26):(D.prototype.am=function(t,e,n,i,r,o){for(var a=16383&e,s=e>>14;0<=--o;){var c=16383&this[t],l=this[t++]>>14,u=s*c+l*a;c=a*c+((16383&u)<<14)+n[i]+r,r=(c>>28)+(u>>14)+s*l,n[i++]=268435455&c}return r},28),D.prototype.DB=E,D.prototype.DM=(1<<E)-1,D.prototype.DV=1<<E,D.prototype.FV=Math.pow(2,52),D.prototype.F1=52-E,D.prototype.F2=2*E-52;var L,V,j=[];for(L="0".charCodeAt(0),V=0;V<=9;++V)j[L++]=V;for(L="a".charCodeAt(0),V=10;V<36;++V)j[L++]=V;for(L="A".charCodeAt(0),V=10;V<36;++V)j[L++]=V;function U(t,e){var n=j[t.charCodeAt(e)];return null==n?-1:n}function F(t){var e=P();return e.fromInt(t),e}function _(t){var e,n=1;return 0!=(e=t>>>16)&&(t=e,n+=16),0!=(e=t>>8)&&(t=e,n+=8),0!=(e=t>>4)&&(t=e,n+=4),0!=(e=t>>2)&&(t=e,n+=2),0!=(e=t>>1)&&(t=e,n+=1),n}D.ZERO=F(0),D.ONE=F(1);var H,X,z=function(){function t(){this.i=0,this.j=0,this.S=[]}return t.prototype.init=function(t){var e,n,i;for(e=0;e<256;++e)this.S[e]=e;for(e=n=0;e<256;++e)n=n+this.S[e]+t[e%t.length]&255,i=this.S[e],this.S[e]=this.S[n],this.S[n]=i;this.i=0,this.j=0},t.prototype.next=function(){var t;return this.i=this.i+1&255,this.j=this.j+this.S[this.i]&255,t=this.S[this.i],this.S[this.i]=this.S[this.j],this.S[this.j]=t,this.S[t+this.S[this.i]&255]},t}(),W=256,q=null;if(null==q){q=[];var G=void(X=0);if(window.crypto&&window.crypto.getRandomValues){var K=new Uint32Array(256);for(window.crypto.getRandomValues(K),G=0;G<K.length;++G)q[X++]=255&K[G]}var J=function(t){if(this.count=this.count||0,256<=this.count||W<=X)window.removeEventListener?window.removeEventListener("mousemove",J,!1):window.detachEvent&&window.detachEvent("onmousemove",J);else try{var e=t.x+t.y;q[X++]=255&e,this.count+=1}catch(t){}};window.addEventListener?window.addEventListener("mousemove",J,!1):window.attachEvent&&window.attachEvent("onmousemove",J)}function Y(){if(null==H){for(H=new z;X<W;){var t=Math.floor(65536*Math.random());q[X++]=255&t}for(H.init(q),X=0;X<q.length;++X)q[X]=0;X=0}return H.next()}var Q=function(){function t(){}return t.prototype.nextBytes=function(t){for(var e=0;e<t.length;++e)t[e]=Y()},t}(),Z=function(){function t(){this.n=null,this.e=0,this.d=null,this.p=null,this.q=null,this.dmp1=null,this.dmq1=null,this.coeff=null}return t.prototype.doPublic=function(t){return t.modPowInt(this.e,this.n)},t.prototype.doPrivate=function(t){if(null==this.p||null==this.q)return t.modPow(this.d,this.n);for(var e=t.mod(this.p).modPow(this.dmp1,this.p),n=t.mod(this.q).modPow(this.dmq1,this.q);e.compareTo(n)<0;)e=e.add(this.p);return e.subtract(n).multiply(this.coeff).mod(this.p).multiply(this.q).add(n)},t.prototype.setPublic=function(t,e){null!=t&&null!=e&&0<t.length&&0<e.length?(this.n=M(t,16),this.e=parseInt(e,16)):console.error("Invalid RSA public key")},t.prototype.encrypt=function(t){var e=function(t,e){if(e<t.length+11)return console.error("Message too long for RSA"),null;for(var n=[],i=t.length-1;0<=i&&0<e;){var r=t.charCodeAt(i--);n[--e]=r<128?r:127<r&&r<2048?(n[--e]=63&r|128,r>>6|192):(n[--e]=63&r|128,n[--e]=r>>6&63|128,r>>12|224)}n[--e]=0;for(var o=new Q,a=[];2<e;){for(a[0]=0;0==a[0];)o.nextBytes(a);n[--e]=a[0]}return n[--e]=2,n[--e]=0,new D(n)}(t,this.n.bitLength()+7>>3);if(null==e)return null;var n=this.doPublic(e);if(null==n)return null;var i=n.toString(16);return 0==(1&i.length)?i:"0"+i},t.prototype.setPrivate=function(t,e,n){null!=t&&null!=e&&0<t.length&&0<e.length?(this.n=M(t,16),this.e=parseInt(e,16),this.d=M(n,16)):console.error("Invalid RSA private key")},t.prototype.setPrivateEx=function(t,e,n,i,r,o,a,s){null!=t&&null!=e&&0<t.length&&0<e.length?(this.n=M(t,16),this.e=parseInt(e,16),this.d=M(n,16),this.p=M(i,16),this.q=M(r,16),this.dmp1=M(o,16),this.dmq1=M(a,16),this.coeff=M(s,16)):console.error("Invalid RSA private key")},t.prototype.generate=function(t,e){var n=new Q,i=t>>1;this.e=parseInt(e,16);for(var r=new D(e,16);;){for(;this.p=new D(t-i,1,n),0!=this.p.subtract(D.ONE).gcd(r).compareTo(D.ONE)||!this.p.isProbablePrime(10););for(;this.q=new D(i,1,n),0!=this.q.subtract(D.ONE).gcd(r).compareTo(D.ONE)||!this.q.isProbablePrime(10););if(this.p.compareTo(this.q)<=0){var o=this.p;this.p=this.q,this.q=o}var a=this.p.subtract(D.ONE),s=this.q.subtract(D.ONE),c=a.multiply(s);if(0==c.gcd(r).compareTo(D.ONE)){this.n=this.p.multiply(this.q),this.d=r.modInverse(c),this.dmp1=this.d.mod(a),this.dmq1=this.d.mod(s),this.coeff=this.q.modInverse(this.p);break}}},t.prototype.decrypt=function(t){var e=M(t,16),n=this.doPrivate(e);return null==n?null:function(t,e){for(var n=t.toByteArray(),i=0;i<n.length&&0==n[i];)++i;if(n.length-i!=e-1||2!=n[i])return null;for(++i;0!=n[i];)if(++i>=n.length)return null;for(var r="";++i<n.length;){var o=255&n[i];o<128?r+=String.fromCharCode(o):191<o&&o<224?(r+=String.fromCharCode((31&o)<<6|63&n[i+1]),++i):(r+=String.fromCharCode((15&o)<<12|(63&n[i+1])<<6|63&n[i+2]),i+=2)}return r}(n,this.n.bitLength()+7>>3)},t.prototype.generateAsync=function(t,e,r){var o=new Q,a=t>>1;this.e=parseInt(e,16);var s=new D(e,16),c=this,l=function(){var e=function(){if(c.p.compareTo(c.q)<=0){var t=c.p;c.p=c.q,c.q=t}var e=c.p.subtract(D.ONE),n=c.q.subtract(D.ONE),i=e.multiply(n);0==i.gcd(s).compareTo(D.ONE)?(c.n=c.p.multiply(c.q),c.d=s.modInverse(i),c.dmp1=c.d.mod(e),c.dmq1=c.d.mod(n),c.coeff=c.q.modInverse(c.p),setTimeout(function(){r()},0)):setTimeout(l,0)},n=function(){c.q=P(),c.q.fromNumberAsync(a,1,o,function(){c.q.subtract(D.ONE).gcda(s,function(t){0==t.compareTo(D.ONE)&&c.q.isProbablePrime(10)?setTimeout(e,0):setTimeout(n,0)})})},i=function(){c.p=P(),c.p.fromNumberAsync(t-a,1,o,function(){c.p.subtract(D.ONE).gcda(s,function(t){0==t.compareTo(D.ONE)&&c.p.isProbablePrime(10)?setTimeout(n,0):setTimeout(i,0)})})};setTimeout(i,0)};setTimeout(l,0)},t.prototype.sign=function(t,e,n){var i=$[n]||"",r=i+e(t).toString(),o=function(t,e){if(e<t.length+22)return console.error("Message too long for RSA"),null;for(var n=e-t.length-6,i="",r=0;r<n;r+=2)i+="ff";return M("0001"+i+"00"+t,16)}(r,this.n.bitLength()/4);if(null==o)return null;var a=this.doPrivate(o);if(null==a)return null;var s=a.toString(16);return 0==(1&s.length)?s:"0"+s},t.prototype.verify=function(t,e,n){var i=M(e,16),r=this.doPublic(i);if(null==r)return null;var o=r.toString(16).replace(/^1f+00/,""),a=function(t){for(var e in $)if($.hasOwnProperty(e)){var n=$[e],i=n.length;if(t.substr(0,i)==n)return t.substr(i)}return t}(o);return a==n(t).toString()},t}(),$={md2:"3020300c06082a864886f70d020205000410",md5:"3020300c06082a864886f70d020505000410",sha1:"3021300906052b0e03021a05000414",sha224:"302d300d06096086480165030402040500041c",sha256:"3031300d060960864801650304020105000420",sha384:"3041300d060960864801650304020205000430",sha512:"3051300d060960864801650304020305000440",ripemd160:"3021300906052b2403020105000414"},tt={};tt.lang={extend:function(t,e,n){if(!e||!t)throw new Error("YAHOO.lang.extend failed, please check that all dependencies are included.");var i=function(){};if(i.prototype=e.prototype,t.prototype=new i,(t.prototype.constructor=t).superclass=e.prototype,e.prototype.constructor==Object.prototype.constructor&&(e.prototype.constructor=e),n){var r;for(r in n)t.prototype[r]=n[r];var o=function(){},a=["toString","valueOf"];try{/MSIE/.test(navigator.userAgent)&&(o=function(t,e){for(r=0;r<a.length;r+=1){var n=a[r],i=e[n];"function"==typeof i&&i!=Object.prototype[n]&&(t[n]=i)}})}catch(t){}o(t.prototype,n)}}};var et={};void 0!==et.asn1&&et.asn1||(et.asn1={}),et.asn1.ASN1Util=new function(){this.integerToByteHex=function(t){var e=t.toString(16);return e.length%2==1&&(e="0"+e),e},this.bigIntToMinTwosComplementsHex=function(t){var e=t.toString(16);if("-"!=e.substr(0,1))e.length%2==1?e="0"+e:e.match(/^[0-7]/)||(e="00"+e);else{var n=e.substr(1),i=n.length;i%2==1?i+=1:e.match(/^[0-7]/)||(i+=2);for(var r="",o=0;o<i;o++)r+="f";var a=new D(r,16),s=a.xor(t).add(D.ONE);e=s.toString(16).replace(/^-/,"")}return e},this.getPEMStringFromHex=function(t,e){return hextopem(t,e)},this.newObject=function(t){var e=et,n=e.asn1,i=n.DERBoolean,r=n.DERInteger,o=n.DERBitString,a=n.DEROctetString,s=n.DERNull,c=n.DERObjectIdentifier,l=n.DEREnumerated,u=n.DERUTF8String,h=n.DERNumericString,d=n.DERPrintableString,f=n.DERTeletexString,p=n.DERIA5String,g=n.DERUTCTime,m=n.DERGeneralizedTime,y=n.DERSequence,v=n.DERSet,b=n.DERTaggedObject,w=n.ASN1Util.newObject,T=Object.keys(t);if(1!=T.length)throw"key of param shall be only one.";var A=T[0];if(-1==":bool:int:bitstr:octstr:null:oid:enum:utf8str:numstr:prnstr:telstr:ia5str:utctime:gentime:seq:set:tag:".indexOf(":"+A+":"))throw"undefined key: "+A;if("bool"==A)return new i(t[A]);if("int"==A)return new r(t[A]);if("bitstr"==A)return new o(t[A]);if("octstr"==A)return new a(t[A]);if("null"==A)return new s(t[A]);if("oid"==A)return new c(t[A]);if("enum"==A)return new l(t[A]);if("utf8str"==A)return new u(t[A]);if("numstr"==A)return new h(t[A]);if("prnstr"==A)return new d(t[A]);if("telstr"==A)return new f(t[A]);if("ia5str"==A)return new p(t[A]);if("utctime"==A)return new g(t[A]);if("gentime"==A)return new m(t[A]);if("seq"==A){for(var E=t[A],x=[],S=0;S<E.length;S++){var O=w(E[S]);x.push(O)}return new y({array:x})}if("set"==A){for(var E=t[A],x=[],S=0;S<E.length;S++){var O=w(E[S]);x.push(O)}return new v({array:x})}if("tag"==A){var C=t[A];if("[object Array]"===Object.prototype.toString.call(C)&&3==C.length){var B=w(C[2]);return new b({tag:C[0],explicit:C[1],obj:B})}var D={};if(void 0!==C.explicit&&(D.explicit=C.explicit),void 0!==C.tag&&(D.tag=C.tag),void 0===C.obj)throw"obj shall be specified for 'tag'.";return D.obj=w(C.obj),new b(D)}},this.jsonToASN1HEX=function(t){var e=this.newObject(t);return e.getEncodedHex()}},et.asn1.ASN1Util.oidHexToInt=function(t){for(var e="",n=parseInt(t.substr(0,2),16),i=Math.floor(n/40),r=n%40,e=i+"."+r,o="",a=2;a<t.length;a+=2){var s=parseInt(t.substr(a,2),16),c=("00000000"+s.toString(2)).slice(-8);if(o+=c.substr(1,7),"0"==c.substr(0,1)){var l=new D(o,2);e=e+"."+l.toString(10),o=""}}return e},et.asn1.ASN1Util.oidIntToHex=function(t){var c=function(t){var e=t.toString(16);return 1==e.length&&(e="0"+e),e},e=function(t){var e="",n=new D(t,10),i=n.toString(2),r=7-i.length%7;7==r&&(r=0);for(var o="",a=0;a<r;a++)o+="0";i=o+i;for(var a=0;a<i.length-1;a+=7){var s=i.substr(a,7);a!=i.length-7&&(s="1"+s),e+=c(parseInt(s,2))}return e};if(!t.match(/^[0-9.]+$/))throw"malformed oid string: "+t;var n="",i=t.split("."),r=40*parseInt(i[0])+parseInt(i[1]);n+=c(r),i.splice(0,2);for(var o=0;o<i.length;o++)n+=e(i[o]);return n},et.asn1.ASN1Object=function(){this.getLengthHexFromValue=function(){if(void 0===this.hV||null==this.hV)throw"this.hV is null or undefined.";if(this.hV.length%2==1)throw"value hex must be even length: n="+"".length+",v="+this.hV;var t=this.hV.length/2,e=t.toString(16);if(e.length%2==1&&(e="0"+e),t<128)return e;var n=e.length/2;if(15<n)throw"ASN.1 length too long to represent by 8x: n = "+t.toString(16);var i=128+n;return i.toString(16)+e},this.getEncodedHex=function(){return(null==this.hTLV||this.isModified)&&(this.hV=this.getFreshValueHex(),this.hL=this.getLengthHexFromValue(),this.hTLV=this.hT+this.hL+this.hV,this.isModified=!1),this.hTLV},this.getValueHex=function(){return this.getEncodedHex(),this.hV},this.getFreshValueHex=function(){return""}},et.asn1.DERAbstractString=function(t){et.asn1.DERAbstractString.superclass.constructor.call(this),this.getString=function(){return this.s},this.setString=function(t){this.hTLV=null,this.isModified=!0,this.s=t,this.hV=stohex(this.s)},this.setStringHex=function(t){this.hTLV=null,this.isModified=!0,this.s=null,this.hV=t},this.getFreshValueHex=function(){return this.hV},void 0!==t&&("string"==typeof t?this.setString(t):void 0!==t.str?this.setString(t.str):void 0!==t.hex&&this.setStringHex(t.hex))},tt.lang.extend(et.asn1.DERAbstractString,et.asn1.ASN1Object),et.asn1.DERAbstractTime=function(t){et.asn1.DERAbstractTime.superclass.constructor.call(this),this.localDateToUTC=function(t){utc=t.getTime()+6e4*t.getTimezoneOffset();var e=new Date(utc);return e},this.formatDate=function(t,e,n){var i=this.zeroPadding,r=this.localDateToUTC(t),o=String(r.getFullYear());"utc"==e&&(o=o.substr(2,2));var a=i(String(r.getMonth()+1),2),s=i(String(r.getDate()),2),c=i(String(r.getHours()),2),l=i(String(r.getMinutes()),2),u=i(String(r.getSeconds()),2),h=o+a+s+c+l+u;if(!0===n){var d=r.getMilliseconds();if(0!=d){var f=i(String(d),3);f=f.replace(/[0]+$/,""),h=h+"."+f}}return h+"Z"},this.zeroPadding=function(t,e){return t.length>=e?t:new Array(e-t.length+1).join("0")+t},this.getString=function(){return this.s},this.setString=function(t){this.hTLV=null,this.isModified=!0,this.s=t,this.hV=stohex(t)},this.setByDateValue=function(t,e,n,i,r,o){var a=new Date(Date.UTC(t,e-1,n,i,r,o,0));this.setByDate(a)},this.getFreshValueHex=function(){return this.hV}},tt.lang.extend(et.asn1.DERAbstractTime,et.asn1.ASN1Object),et.asn1.DERAbstractStructured=function(t){et.asn1.DERAbstractString.superclass.constructor.call(this),this.setByASN1ObjectArray=function(t){this.hTLV=null,this.isModified=!0,this.asn1Array=t},this.appendASN1Object=function(t){this.hTLV=null,this.isModified=!0,this.asn1Array.push(t)},this.asn1Array=new Array,void 0!==t&&void 0!==t.array&&(this.asn1Array=t.array)},tt.lang.extend(et.asn1.DERAbstractStructured,et.asn1.ASN1Object),et.asn1.DERBoolean=function(){et.asn1.DERBoolean.superclass.constructor.call(this),this.hT="01",this.hTLV="0101ff"},tt.lang.extend(et.asn1.DERBoolean,et.asn1.ASN1Object),et.asn1.DERInteger=function(t){et.asn1.DERInteger.superclass.constructor.call(this),this.hT="02",this.setByBigInteger=function(t){this.hTLV=null,this.isModified=!0,this.hV=et.asn1.ASN1Util.bigIntToMinTwosComplementsHex(t)},this.setByInteger=function(t){var e=new D(String(t),10);this.setByBigInteger(e)},this.setValueHex=function(t){this.hV=t},this.getFreshValueHex=function(){return this.hV},void 0!==t&&(void 0!==t.bigint?this.setByBigInteger(t.bigint):void 0!==t.int?this.setByInteger(t.int):"number"==typeof t?this.setByInteger(t):void 0!==t.hex&&this.setValueHex(t.hex))},tt.lang.extend(et.asn1.DERInteger,et.asn1.ASN1Object),et.asn1.DERBitString=function(t){if(void 0!==t&&void 0!==t.obj){var e=et.asn1.ASN1Util.newObject(t.obj);t.hex="00"+e.getEncodedHex()}et.asn1.DERBitString.superclass.constructor.call(this),this.hT="03",this.setHexValueIncludingUnusedBits=function(t){this.hTLV=null,this.isModified=!0,this.hV=t},this.setUnusedBitsAndHexValue=function(t,e){if(t<0||7<t)throw"unused bits shall be from 0 to 7: u = "+t;var n="0"+t;this.hTLV=null,this.isModified=!0,this.hV=n+e},this.setByBinaryString=function(t){var e=8-(t=t.replace(/0+$/,"")).length%8;8==e&&(e=0);for(var n=0;n<=e;n++)t+="0";for(var i="",n=0;n<t.length-1;n+=8){var r=t.substr(n,8),o=parseInt(r,2).toString(16);1==o.length&&(o="0"+o),i+=o}this.hTLV=null,this.isModified=!0,this.hV="0"+e+i},this.setByBooleanArray=function(t){for(var e="",n=0;n<t.length;n++)1==t[n]?e+="1":e+="0";this.setByBinaryString(e)},this.newFalseArray=function(t){for(var e=new Array(t),n=0;n<t;n++)e[n]=!1;return e},this.getFreshValueHex=function(){return this.hV},void 0!==t&&("string"==typeof t&&t.toLowerCase().match(/^[0-9a-f]+$/)?this.setHexValueIncludingUnusedBits(t):void 0!==t.hex?this.setHexValueIncludingUnusedBits(t.hex):void 0!==t.bin?this.setByBinaryString(t.bin):void 0!==t.array&&this.setByBooleanArray(t.array))},tt.lang.extend(et.asn1.DERBitString,et.asn1.ASN1Object),et.asn1.DEROctetString=function(t){if(void 0!==t&&void 0!==t.obj){var e=et.asn1.ASN1Util.newObject(t.obj);t.hex=e.getEncodedHex()}et.asn1.DEROctetString.superclass.constructor.call(this,t),this.hT="04"},tt.lang.extend(et.asn1.DEROctetString,et.asn1.DERAbstractString),et.asn1.DERNull=function(){et.asn1.DERNull.superclass.constructor.call(this),this.hT="05",this.hTLV="0500"},tt.lang.extend(et.asn1.DERNull,et.asn1.ASN1Object),et.asn1.DERObjectIdentifier=function(t){var c=function(t){var e=t.toString(16);return 1==e.length&&(e="0"+e),e},o=function(t){var e="",n=new D(t,10),i=n.toString(2),r=7-i.length%7;7==r&&(r=0);for(var o="",a=0;a<r;a++)o+="0";i=o+i;for(var a=0;a<i.length-1;a+=7){var s=i.substr(a,7);a!=i.length-7&&(s="1"+s),e+=c(parseInt(s,2))}return e};et.asn1.DERObjectIdentifier.superclass.constructor.call(this),this.hT="06",this.setValueHex=function(t){this.hTLV=null,this.isModified=!0,this.s=null,this.hV=t},this.setValueOidString=function(t){if(!t.match(/^[0-9.]+$/))throw"malformed oid string: "+t;var e="",n=t.split("."),i=40*parseInt(n[0])+parseInt(n[1]);e+=c(i),n.splice(0,2);for(var r=0;r<n.length;r++)e+=o(n[r]);this.hTLV=null,this.isModified=!0,this.s=null,this.hV=e},this.setValueName=function(t){var e=et.asn1.x509.OID.name2oid(t);if(""===e)throw"DERObjectIdentifier oidName undefined: "+t;this.setValueOidString(e)},this.getFreshValueHex=function(){return this.hV},void 0!==t&&("string"==typeof t?t.match(/^[0-2].[0-9.]+$/)?this.setValueOidString(t):this.setValueName(t):void 0!==t.oid?this.setValueOidString(t.oid):void 0!==t.hex?this.setValueHex(t.hex):void 0!==t.name&&this.setValueName(t.name))},tt.lang.extend(et.asn1.DERObjectIdentifier,et.asn1.ASN1Object),et.asn1.DEREnumerated=function(t){et.asn1.DEREnumerated.superclass.constructor.call(this),this.hT="0a",this.setByBigInteger=function(t){this.hTLV=null,this.isModified=!0,this.hV=et.asn1.ASN1Util.bigIntToMinTwosComplementsHex(t)},this.setByInteger=function(t){var e=new D(String(t),10);this.setByBigInteger(e)},this.setValueHex=function(t){this.hV=t},this.getFreshValueHex=function(){return this.hV},void 0!==t&&(void 0!==t.int?this.setByInteger(t.int):"number"==typeof t?this.setByInteger(t):void 0!==t.hex&&this.setValueHex(t.hex))},tt.lang.extend(et.asn1.DEREnumerated,et.asn1.ASN1Object),et.asn1.DERUTF8String=function(t){et.asn1.DERUTF8String.superclass.constructor.call(this,t),this.hT="0c"},tt.lang.extend(et.asn1.DERUTF8String,et.asn1.DERAbstractString),et.asn1.DERNumericString=function(t){et.asn1.DERNumericString.superclass.constructor.call(this,t),this.hT="12"},tt.lang.extend(et.asn1.DERNumericString,et.asn1.DERAbstractString),et.asn1.DERPrintableString=function(t){et.asn1.DERPrintableString.superclass.constructor.call(this,t),this.hT="13"},tt.lang.extend(et.asn1.DERPrintableString,et.asn1.DERAbstractString),et.asn1.DERTeletexString=function(t){et.asn1.DERTeletexString.superclass.constructor.call(this,t),this.hT="14"},tt.lang.extend(et.asn1.DERTeletexString,et.asn1.DERAbstractString),et.asn1.DERIA5String=function(t){et.asn1.DERIA5String.superclass.constructor.call(this,t),this.hT="16"},tt.lang.extend(et.asn1.DERIA5String,et.asn1.DERAbstractString),et.asn1.DERUTCTime=function(t){et.asn1.DERUTCTime.superclass.constructor.call(this,t),this.hT="17",this.setByDate=function(t){this.hTLV=null,this.isModified=!0,this.date=t,this.s=this.formatDate(this.date,"utc"),this.hV=stohex(this.s)},this.getFreshValueHex=function(){return void 0===this.date&&void 0===this.s&&(this.date=new Date,this.s=this.formatDate(this.date,"utc"),this.hV=stohex(this.s)),this.hV},void 0!==t&&(void 0!==t.str?this.setString(t.str):"string"==typeof t&&t.match(/^[0-9]{12}Z$/)?this.setString(t):void 0!==t.hex?this.setStringHex(t.hex):void 0!==t.date&&this.setByDate(t.date))},tt.lang.extend(et.asn1.DERUTCTime,et.asn1.DERAbstractTime),et.asn1.DERGeneralizedTime=function(t){et.asn1.DERGeneralizedTime.superclass.constructor.call(this,t),this.hT="18",this.withMillis=!1,this.setByDate=function(t){this.hTLV=null,this.isModified=!0,this.date=t,this.s=this.formatDate(this.date,"gen",this.withMillis),this.hV=stohex(this.s)},this.getFreshValueHex=function(){return void 0===this.date&&void 0===this.s&&(this.date=new Date,this.s=this.formatDate(this.date,"gen",this.withMillis),this.hV=stohex(this.s)),this.hV},void 0!==t&&(void 0!==t.str?this.setString(t.str):"string"==typeof t&&t.match(/^[0-9]{14}Z$/)?this.setString(t):void 0!==t.hex?this.setStringHex(t.hex):void 0!==t.date&&this.setByDate(t.date),!0===t.millis&&(this.withMillis=!0))},tt.lang.extend(et.asn1.DERGeneralizedTime,et.asn1.DERAbstractTime),et.asn1.DERSequence=function(t){et.asn1.DERSequence.superclass.constructor.call(this,t),this.hT="30",this.getFreshValueHex=function(){for(var t="",e=0;e<this.asn1Array.length;e++){var n=this.asn1Array[e];t+=n.getEncodedHex()}return this.hV=t,this.hV}},tt.lang.extend(et.asn1.DERSequence,et.asn1.DERAbstractStructured),et.asn1.DERSet=function(t){et.asn1.DERSet.superclass.constructor.call(this,t),this.hT="31",this.sortFlag=!0,this.getFreshValueHex=function(){for(var t=new Array,e=0;e<this.asn1Array.length;e++){var n=this.asn1Array[e];t.push(n.getEncodedHex())}return 1==this.sortFlag&&t.sort(),this.hV=t.join(""),this.hV},void 0!==t&&void 0!==t.sortflag&&0==t.sortflag&&(this.sortFlag=!1)},tt.lang.extend(et.asn1.DERSet,et.asn1.DERAbstractStructured),et.asn1.DERTaggedObject=function(t){et.asn1.DERTaggedObject.superclass.constructor.call(this),this.hT="a0",this.hV="",this.isExplicit=!0,this.asn1Object=null,this.setASN1Object=function(t,e,n){this.hT=e,this.isExplicit=t,this.asn1Object=n,this.isExplicit?(this.hV=this.asn1Object.getEncodedHex(),this.hTLV=null,this.isModified=!0):(this.hV=null,this.hTLV=n.getEncodedHex(),this.hTLV=this.hTLV.replace(/^../,e),this.isModified=!1)},this.getFreshValueHex=function(){return this.hV},void 0!==t&&(void 0!==t.tag&&(this.hT=t.tag),void 0!==t.explicit&&(this.isExplicit=t.explicit),void 0!==t.obj&&(this.asn1Object=t.obj,this.setASN1Object(this.isExplicit,this.hT,this.asn1Object)))},tt.lang.extend(et.asn1.DERTaggedObject,et.asn1.ASN1Object);var nt=function(n){function i(t){var e=n.call(this)||this;return t&&("string"==typeof t?e.parseKey(t):(i.hasPrivateKeyProperty(t)||i.hasPublicKeyProperty(t))&&e.parsePropertiesFrom(t)),e}return function(t,e){function n(){this.constructor=t}p(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}(i,n),i.prototype.parseKey=function(t){try{var e=0,n=0,i=/^\s*(?:[0-9A-Fa-f][0-9A-Fa-f]\s*)+$/.test(t)?g.decode(t):m.unarmor(t),r=S.decode(i);if(3===r.sub.length&&(r=r.sub[2].sub[0]),9===r.sub.length){e=r.sub[1].getHexStringValue(),this.n=M(e,16),n=r.sub[2].getHexStringValue(),this.e=parseInt(n,16);var o=r.sub[3].getHexStringValue();this.d=M(o,16);var a=r.sub[4].getHexStringValue();this.p=M(a,16);var s=r.sub[5].getHexStringValue();this.q=M(s,16);var c=r.sub[6].getHexStringValue();this.dmp1=M(c,16);var l=r.sub[7].getHexStringValue();this.dmq1=M(l,16);var u=r.sub[8].getHexStringValue();this.coeff=M(u,16)}else{if(2!==r.sub.length)return!1;var h=r.sub[1],d=h.sub[0];e=d.sub[0].getHexStringValue(),this.n=M(e,16),n=d.sub[1].getHexStringValue(),this.e=parseInt(n,16)}return!0}catch(t){return!1}},i.prototype.getPrivateBaseKey=function(){var t={array:[new et.asn1.DERInteger({int:0}),new et.asn1.DERInteger({bigint:this.n}),new et.asn1.DERInteger({int:this.e}),new et.asn1.DERInteger({bigint:this.d}),new et.asn1.DERInteger({bigint:this.p}),new et.asn1.DERInteger({bigint:this.q}),new et.asn1.DERInteger({bigint:this.dmp1}),new et.asn1.DERInteger({bigint:this.dmq1}),new et.asn1.DERInteger({bigint:this.coeff})]},e=new et.asn1.DERSequence(t);return e.getEncodedHex()},i.prototype.getPrivateBaseKeyB64=function(){return u(this.getPrivateBaseKey())},i.prototype.getPublicBaseKey=function(){var t=new et.asn1.DERSequence({array:[new et.asn1.DERObjectIdentifier({oid:"1.2.840.113549.1.1.1"}),new et.asn1.DERNull]}),e=new et.asn1.DERSequence({array:[new et.asn1.DERInteger({bigint:this.n}),new et.asn1.DERInteger({int:this.e})]}),n=new et.asn1.DERBitString({hex:"00"+e.getEncodedHex()}),i=new et.asn1.DERSequence({array:[t,n]});return i.getEncodedHex()},i.prototype.getPublicBaseKeyB64=function(){return u(this.getPublicBaseKey())},i.wordwrap=function(t,e){if(e=e||64,!t)return t;var n="(.{1,"+e+"})( +|$\n?)|(.{1,"+e+"})";return t.match(RegExp(n,"g")).join("\n")},i.prototype.getPrivateKey=function(){var t="-----BEGIN RSA PRIVATE KEY-----\n";return t+=i.wordwrap(this.getPrivateBaseKeyB64())+"\n",t+="-----END RSA PRIVATE KEY-----"},i.prototype.getPublicKey=function(){var t="-----BEGIN PUBLIC KEY-----\n";return t+=i.wordwrap(this.getPublicBaseKeyB64())+"\n",t+="-----END PUBLIC KEY-----"},i.hasPublicKeyProperty=function(t){return(t=t||{}).hasOwnProperty("n")&&t.hasOwnProperty("e")},i.hasPrivateKeyProperty=function(t){return(t=t||{}).hasOwnProperty("n")&&t.hasOwnProperty("e")&&t.hasOwnProperty("d")&&t.hasOwnProperty("p")&&t.hasOwnProperty("q")&&t.hasOwnProperty("dmp1")&&t.hasOwnProperty("dmq1")&&t.hasOwnProperty("coeff")},i.prototype.parsePropertiesFrom=function(t){this.n=t.n,this.e=t.e,t.hasOwnProperty("d")&&(this.d=t.d,this.p=t.p,this.q=t.q,this.dmp1=t.dmp1,this.dmq1=t.dmq1,this.coeff=t.coeff)},i}(Z),it=function(){function t(t){t=t||{},this.default_key_size=parseInt(t.default_key_size,10)||1024,this.default_public_exponent=t.default_public_exponent||"010001",this.log=t.log||!1,this.key=null}return t.prototype.setKey=function(t){this.log&&this.key&&console.warn("A key was already set, overriding existing."),this.key=new nt(t)},t.prototype.setPrivateKey=function(t){this.setKey(t)},t.prototype.setPublicKey=function(t){this.setKey(t)},t.prototype.decrypt=function(t){try{return this.getKey().decrypt(h(t))}catch(t){return!1}},t.prototype.encrypt=function(t){try{return u(this.getKey().encrypt(t))}catch(t){return!1}},t.prototype.sign=function(t,e,n){try{return u(this.getKey().sign(t,e,n))}catch(t){return!1}},t.prototype.verify=function(t,e,n){try{return this.getKey().verify(t,h(e),n)}catch(t){return!1}},t.prototype.getKey=function(t){if(!this.key){if(this.key=new nt,t&&"[object Function]"==={}.toString.call(t))return void this.key.generateAsync(this.default_key_size,this.default_public_exponent,t);this.key.generate(this.default_key_size,this.default_public_exponent)}return this.key},t.prototype.getPrivateKey=function(){return this.getKey().getPrivateKey()},t.prototype.getPrivateKeyB64=function(){return this.getKey().getPrivateBaseKeyB64()},t.prototype.getPublicKey=function(){return this.getKey().getPublicKey()},t.prototype.getPublicKeyB64=function(){return this.getKey().getPublicBaseKeyB64()},t.version="3.0.0-rc.1",t}();window.JSEncrypt=it,t.JSEncrypt=it,t.default=it,Object.defineProperty(t,"__esModule",{value:!0})}(e)},function(t,e,n){t.exports=n(25)},function(t,e,n){var i,r,c;t.exports=(i=n(0),c=(r=i).lib.WordArray,r.enc.Base64={stringify:function(t){var e=t.words,n=t.sigBytes,i=this._map;t.clamp();for(var r=[],o=0;o<n;o+=3)for(var a=(e[o>>>2]>>>24-o%4*8&255)<<16|(e[o+1>>>2]>>>24-(o+1)%4*8&255)<<8|e[o+2>>>2]>>>24-(o+2)%4*8&255,s=0;s<4&&o+.75*s<n;s++)r.push(i.charAt(a>>>6*(3-s)&63));var c=i.charAt(64);if(c)for(;r.length%4;)r.push(c);return r.join("")},parse:function(t){var e=t.length,n=this._map,i=this._reverseMap;if(!i){i=this._reverseMap=[];for(var r=0;r<n.length;r++)i[n.charCodeAt(r)]=r}var o=n.charAt(64);if(o){var a=t.indexOf(o);-1!==a&&(e=a)}return function(t,e,n){for(var i=[],r=0,o=0;o<e;o++)if(o%4){var a=n[t.charCodeAt(o-1)]<<o%4*2,s=n[t.charCodeAt(o)]>>>6-o%4*2;i[r>>>2]|=(a|s)<<24-r%4*8,r++}return c.create(i,r)}(t,e,i)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="},i.enc.Base64)},function(t,e,n){var a;t.exports=(a=n(0),function(u){var t=a,e=t.lib,n=e.WordArray,i=e.Hasher,r=t.algo,O=[];!function(){for(var t=0;t<64;t++)O[t]=4294967296*u.abs(u.sin(t+1))|0}();var o=r.MD5=i.extend({_doReset:function(){this._hash=new n.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(t,e){for(var n=0;n<16;n++){var i=e+n,r=t[i];t[i]=16711935&(r<<8|r>>>24)|4278255360&(r<<24|r>>>8)}var o=this._hash.words,a=t[e+0],s=t[e+1],c=t[e+2],l=t[e+3],u=t[e+4],h=t[e+5],d=t[e+6],f=t[e+7],p=t[e+8],g=t[e+9],m=t[e+10],y=t[e+11],v=t[e+12],b=t[e+13],w=t[e+14],T=t[e+15],A=o[0],E=o[1],x=o[2],S=o[3];E=k(E=k(E=k(E=k(E=D(E=D(E=D(E=D(E=B(E=B(E=B(E=B(E=C(E=C(E=C(E=C(E,x=C(x,S=C(S,A=C(A,E,x,S,a,7,O[0]),E,x,s,12,O[1]),A,E,c,17,O[2]),S,A,l,22,O[3]),x=C(x,S=C(S,A=C(A,E,x,S,u,7,O[4]),E,x,h,12,O[5]),A,E,d,17,O[6]),S,A,f,22,O[7]),x=C(x,S=C(S,A=C(A,E,x,S,p,7,O[8]),E,x,g,12,O[9]),A,E,m,17,O[10]),S,A,y,22,O[11]),x=C(x,S=C(S,A=C(A,E,x,S,v,7,O[12]),E,x,b,12,O[13]),A,E,w,17,O[14]),S,A,T,22,O[15]),x=B(x,S=B(S,A=B(A,E,x,S,s,5,O[16]),E,x,d,9,O[17]),A,E,y,14,O[18]),S,A,a,20,O[19]),x=B(x,S=B(S,A=B(A,E,x,S,h,5,O[20]),E,x,m,9,O[21]),A,E,T,14,O[22]),S,A,u,20,O[23]),x=B(x,S=B(S,A=B(A,E,x,S,g,5,O[24]),E,x,w,9,O[25]),A,E,l,14,O[26]),S,A,p,20,O[27]),x=B(x,S=B(S,A=B(A,E,x,S,b,5,O[28]),E,x,c,9,O[29]),A,E,f,14,O[30]),S,A,v,20,O[31]),x=D(x,S=D(S,A=D(A,E,x,S,h,4,O[32]),E,x,p,11,O[33]),A,E,y,16,O[34]),S,A,w,23,O[35]),x=D(x,S=D(S,A=D(A,E,x,S,s,4,O[36]),E,x,u,11,O[37]),A,E,f,16,O[38]),S,A,m,23,O[39]),x=D(x,S=D(S,A=D(A,E,x,S,b,4,O[40]),E,x,a,11,O[41]),A,E,l,16,O[42]),S,A,d,23,O[43]),x=D(x,S=D(S,A=D(A,E,x,S,g,4,O[44]),E,x,v,11,O[45]),A,E,T,16,O[46]),S,A,c,23,O[47]),x=k(x,S=k(S,A=k(A,E,x,S,a,6,O[48]),E,x,f,10,O[49]),A,E,w,15,O[50]),S,A,h,21,O[51]),x=k(x,S=k(S,A=k(A,E,x,S,v,6,O[52]),E,x,l,10,O[53]),A,E,m,15,O[54]),S,A,s,21,O[55]),x=k(x,S=k(S,A=k(A,E,x,S,p,6,O[56]),E,x,T,10,O[57]),A,E,d,15,O[58]),S,A,b,21,O[59]),x=k(x,S=k(S,A=k(A,E,x,S,u,6,O[60]),E,x,y,10,O[61]),A,E,c,15,O[62]),S,A,g,21,O[63]),o[0]=o[0]+A|0,o[1]=o[1]+E|0,o[2]=o[2]+x|0,o[3]=o[3]+S|0},_doFinalize:function(){var t=this._data,e=t.words,n=8*this._nDataBytes,i=8*t.sigBytes;e[i>>>5]|=128<<24-i%32;var r=u.floor(n/4294967296),o=n;e[15+(i+64>>>9<<4)]=16711935&(r<<8|r>>>24)|4278255360&(r<<24|r>>>8),e[14+(i+64>>>9<<4)]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),t.sigBytes=4*(e.length+1),this._process();for(var a=this._hash,s=a.words,c=0;c<4;c++){var l=s[c];s[c]=16711935&(l<<8|l>>>24)|4278255360&(l<<24|l>>>8)}return a},clone:function(){var t=i.clone.call(this);return t._hash=this._hash.clone(),t}});function C(t,e,n,i,r,o,a){var s=t+(e&n|~e&i)+r+a;return(s<<o|s>>>32-o)+e}function B(t,e,n,i,r,o,a){var s=t+(e&i|n&~i)+r+a;return(s<<o|s>>>32-o)+e}function D(t,e,n,i,r,o,a){var s=t+(e^n^i)+r+a;return(s<<o|s>>>32-o)+e}function k(t,e,n,i,r,o,a){var s=t+(n^(e|~i))+r+a;return(s<<o|s>>>32-o)+e}t.MD5=i._createHelper(o),t.HmacMD5=i._createHmacHelper(o)}(Math),a.MD5)},function(t,e,n){var i,r,o,a,s,c,h,l;t.exports=(i=n(0),o=(r=i).lib,a=o.WordArray,s=o.Hasher,c=r.algo,h=[],l=c.SHA1=s.extend({_doReset:function(){this._hash=new a.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(t,e){for(var n=this._hash.words,i=n[0],r=n[1],o=n[2],a=n[3],s=n[4],c=0;c<80;c++){if(c<16)h[c]=0|t[e+c];else{var l=h[c-3]^h[c-8]^h[c-14]^h[c-16];h[c]=l<<1|l>>>31}var u=(i<<5|i>>>27)+s+h[c];u+=c<20?1518500249+(r&o|~r&a):c<40?1859775393+(r^o^a):c<60?(r&o|r&a|o&a)-1894007588:(r^o^a)-899497514,s=a,a=o,o=r<<30|r>>>2,r=i,i=u}n[0]=n[0]+i|0,n[1]=n[1]+r|0,n[2]=n[2]+o|0,n[3]=n[3]+a|0,n[4]=n[4]+s|0},_doFinalize:function(){var t=this._data,e=t.words,n=8*this._nDataBytes,i=8*t.sigBytes;return e[i>>>5]|=128<<24-i%32,e[14+(i+64>>>9<<4)]=Math.floor(n/4294967296),e[15+(i+64>>>9<<4)]=n,t.sigBytes=4*e.length,this._process(),this._hash},clone:function(){var t=s.clone.call(this);return t._hash=this._hash.clone(),t}}),r.SHA1=s._createHelper(l),r.HmacSHA1=s._createHmacHelper(l),i.SHA1)},function(t,e,n){var i,r,o,a,s,l,c;t.exports=(i=n(0),o=(r=i).lib,a=o.Base,s=r.enc,l=s.Utf8,c=r.algo,void(c.HMAC=a.extend({init:function(t,e){t=this._hasher=new t.init,"string"==typeof e&&(e=l.parse(e));var n=t.blockSize,i=4*n;e.sigBytes>i&&(e=t.finalize(e)),e.clamp();for(var r=this._oKey=e.clone(),o=this._iKey=e.clone(),a=r.words,s=o.words,c=0;c<n;c++)a[c]^=1549556828,s[c]^=909522486;r.sigBytes=o.sigBytes=i,this.reset()},reset:function(){var t=this._hasher;t.reset(),t.update(this._iKey)},update:function(t){return this._hasher.update(t),this},finalize:function(t){var e=this._hasher,n=e.finalize(t);e.reset();var i=e.finalize(this._oKey.clone().concat(n));return i}})))},function(t,e,n){var i,r,o,a,c,s,l,u,h,d,f,p,g,m,y,v,b,w,T,A,E,x,S;t.exports=(i=n(0),n(9),void(i.lib.Cipher||(o=(r=i).lib,a=o.Base,c=o.WordArray,s=o.BufferedBlockAlgorithm,(l=r.enc).Utf8,u=l.Base64,h=r.algo,d=h.EvpKDF,f=o.Cipher=s.extend({cfg:a.extend(),createEncryptor:function(t,e){return this.create(this._ENC_XFORM_MODE,t,e)},createDecryptor:function(t,e){return this.create(this._DEC_XFORM_MODE,t,e)},init:function(t,e,n){this.cfg=this.cfg.extend(n),this._xformMode=t,this._key=e,this.reset()},reset:function(){s.reset.call(this),this._doReset()},process:function(t){return this._append(t),this._process()},finalize:function(t){t&&this._append(t);var e=this._doFinalize();return e},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function r(t){return"string"==typeof t?S:A}return function(i){return{encrypt:function(t,e,n){return r(e).encrypt(i,t,e,n)},decrypt:function(t,e,n){return r(e).decrypt(i,t,e,n)}}}}()}),o.StreamCipher=f.extend({_doFinalize:function(){var t=this._process(!0);return t},blockSize:1}),p=r.mode={},g=o.BlockCipherMode=a.extend({createEncryptor:function(t,e){return this.Encryptor.create(t,e)},createDecryptor:function(t,e){return this.Decryptor.create(t,e)},init:function(t,e){this._cipher=t,this._iv=e}}),m=p.CBC=function(){var t=g.extend();function o(t,e,n){var i=this._iv;if(i){var r=i;this._iv=void 0}else var r=this._prevBlock;for(var o=0;o<n;o++)t[e+o]^=r[o]}return t.Encryptor=t.extend({processBlock:function(t,e){var n=this._cipher,i=n.blockSize;o.call(this,t,e,i),n.encryptBlock(t,e),this._prevBlock=t.slice(e,e+i)}}),t.Decryptor=t.extend({processBlock:function(t,e){var n=this._cipher,i=n.blockSize,r=t.slice(e,e+i);n.decryptBlock(t,e),o.call(this,t,e,i),this._prevBlock=r}}),t}(),y=r.pad={},v=y.Pkcs7={pad:function(t,e){for(var n=4*e,i=n-t.sigBytes%n,r=i<<24|i<<16|i<<8|i,o=[],a=0;a<i;a+=4)o.push(r);var s=c.create(o,i);t.concat(s)},unpad:function(t){var e=255&t.words[t.sigBytes-1>>>2];t.sigBytes-=e}},o.BlockCipher=f.extend({cfg:f.cfg.extend({mode:m,padding:v}),reset:function(){f.reset.call(this);var t=this.cfg,e=t.iv,n=t.mode;if(this._xformMode==this._ENC_XFORM_MODE)var i=n.createEncryptor;else{var i=n.createDecryptor;this._minBufferSize=1}this._mode&&this._mode.__creator==i?this._mode.init(this,e&&e.words):(this._mode=i.call(n,this,e&&e.words),this._mode.__creator=i)},_doProcessBlock:function(t,e){this._mode.processBlock(t,e)},_doFinalize:function(){var t=this.cfg.padding;if(this._xformMode==this._ENC_XFORM_MODE){t.pad(this._data,this.blockSize);var e=this._process(!0)}else{var e=this._process(!0);t.unpad(e)}return e},blockSize:4}),b=o.CipherParams=a.extend({init:function(t){this.mixIn(t)},toString:function(t){return(t||this.formatter).stringify(this)}}),w=r.format={},T=w.OpenSSL={stringify:function(t){var e=t.ciphertext,n=t.salt;if(n)var i=c.create([1398893684,1701076831]).concat(n).concat(e);else var i=e;return i.toString(u)},parse:function(t){var e=u.parse(t),n=e.words;if(1398893684==n[0]&&1701076831==n[1]){var i=c.create(n.slice(2,4));n.splice(0,4),e.sigBytes-=16}return b.create({ciphertext:e,salt:i})}},A=o.SerializableCipher=a.extend({cfg:a.extend({format:T}),encrypt:function(t,e,n,i){i=this.cfg.extend(i);var r=t.createEncryptor(n,i),o=r.finalize(e),a=r.cfg;return b.create({ciphertext:o,key:n,iv:a.iv,algorithm:t,mode:a.mode,padding:a.padding,blockSize:t.blockSize,formatter:i.format})},decrypt:function(t,e,n,i){i=this.cfg.extend(i),e=this._parse(e,i.format);var r=t.createDecryptor(n,i).finalize(e.ciphertext);return r},_parse:function(t,e){return"string"==typeof t?e.parse(t,this):t}}),E=r.kdf={},x=E.OpenSSL={execute:function(t,e,n,i){i||(i=c.random(8));var r=d.create({keySize:e+n}).compute(t,i),o=c.create(r.words.slice(e),4*n);return r.sigBytes=4*e,b.create({key:r,iv:o,salt:i})}},S=o.PasswordBasedCipher=A.extend({cfg:A.cfg.extend({kdf:x}),encrypt:function(t,e,n,i){var r=(i=this.cfg.extend(i)).kdf.execute(n,t.keySize,t.ivSize);i.iv=r.iv;var o=A.encrypt.call(this,t,e,r.key,i);return o.mixIn(r),o},decrypt:function(t,e,n,i){i=this.cfg.extend(i),e=this._parse(e,i.format);var r=i.kdf.execute(n,t.keySize,t.ivSize,e.salt);i.iv=r.iv;var o=A.decrypt.call(this,t,e,r.key,i);return o}}))))},function(e,t){(function(t){e.exports=t}).call(this,{})},function(t,e){t.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADIBAMAAABfdrOtAAAALVBMVEVHcEz////////////////////////////////////////////////////////NXt0CAAAADnRSTlMAJvQ9uVSF45/PbxcMBUhOnA0AAAWVSURBVHja7ZzLixxFHMd70plhnrAHIXpZlKyyRGmWDUFFGPSQoBiHTUjQjXFZJeADdoiol1UbUXxEZFg9iAcZFjUqexgGDJvoYRl8IXsIAyYRcwikM+7MKHz/Bg/dPc6jq7oev14Q6ncbqqs+XfWr36OaqZ9lScqFmaaVtNguXkmaUaoC3nrCkDsAoJ/sguUdAMDdSTIKFfhyNEHIfMBAdy4xxm8YyE5SjLQLAN0vAACvJcNI+Qo5GijmkSQYxWq4sa4BALyVBCBPYmAi9/vKX0jGCoGVoZ3cmSJmXPIZgdvKB1uM1vI3/VF7reC3v2C4p0XI+NUZM8GSv49xoEXNwMqkg1ltEzGuu/6AH09aJhllMxjuwNj0AgezSrFitweDdZrRmxqz+jv5RDBUf9LvLoZ4TZdc/IbNsEqDxmd0GFffDoeJdCHF54Jm7x1l9RefcrgMyyrUwvgyqziZX8JYy2RYVmpA8d5VQPx+xoHA9ik8PwiWM1+2lRFY5brB0gkoYX46de6/jjgsakgAMPPhsTjb/O7QyY2NFz4Z6oTus/EvtV0Z6fHoSxvnTx5ksX7GhMwK2Vnhq8mePcbK1SaePCy6wj9UJvouRz/pjj322WmJ3PJbZ6z3WvSDow99+rTkmeLMaP87YyHdI6cVrPdFCUj/yDFFV5Q6dc6Jh3ivvnf+Ib3E/9DXHzzmciE3iTJaAzEQAzEQAzEQAzEQAzEQAzEQAzEQAzEQAzEQAzEQAzGQXYQ4ZBAbwNnoJneXILfoIGvRTfX/FyQN4GEm5K/EIRXgbxpIfjcgGQBvMSFE/6jKsiE1oEcHWY5uqpJB9gJYj25aAvo0kByAheimMtClgewBMBfdNA2gTQLZAtCMbroMYIoEUgYgP0lJWWIvPEddktIAOpyNt0wC4Vhclu1xJKXO9h15dmSWFLD9uQ3gH6o84ibnBUiiVpq3JHUiN8xVbo2986Rd1zJne3sUkBs8gysT+RXuODfYYUBKqrwVybGjppRUeLrN0FhjEbyMxKYxlDT/eOCQGEqWnW4Hi0kQ5ffwVdsg2cNlflzaIokoNQAtvj84qw1x+N4pQ7G9bPBzapvigkE27oDrErjIH+OieIMgYYkdY4t92JPJIrx2XDp+S1/vvVi309PXe8x7uoDX1E6212LjjabN1+Ij3zSAe3UYBfCdSriiWuaYERggBcBraZrifSJLqqMUIaVOi7wJRyWOyEpoKkWsewrsQ6WACC5ETSv5qoipdFrHfdkAui2xja6csvwBsW9mpbpGRlwVPXaW1T1LCqI5VRbKZ6Gc8P4vOMoxuAHgTfFHldYr5Yh/OMmprldOIq4WHEUnWQPwhkzGrPCFOA+ZfD0DwJPP7suQ+uZbB/C6ktolPgBdBNCXjY8XBf3WsJ+T/SpVrAO4S9aqJJO8vZD1eVlIR5WKfEiV7qLwWtafkDTImoKbKNbltHIFAD63FDYknhB+pwqAblPJtITrBnwPAC/Le6J5iX62C8Cbk4fYDgBPLHgdB4D9KtFhXvhG/zUoTsQ/2gmVQPBvMytNxLKWAKAb7/L3qU8knEpszYi0ozGRYCqxdu+XGVD+xGA7ANDhx4gLw7fzVWQfYo0l5dd90DiWF+qIM5aGfhmOK6NVBCbFv5eq+RGjyl9x278yuq4H8fcnGIUpiv7d1/2Wpvh1FvpT8o0yuvcv2+60WT6LpPhKJqIqQqCQOgCiPwocZ10WrhLWd0nVowsKBFUxHrdIJKiu02tGuBO6mju3RRSS2I4kE6hlqPrFtktec2VQyWOMgY8sQrHdkRobmw5zXxMo3y+SEBYQIK/ocymssbEwKIWw06KGWA+Gt9rfD3FTFr0sjl6y788lwLBKi8kzRilJMYZXrJMcw7IeICsWw5NNl6rsDU+uVsRLWAzkX6sCQJh4PoRLAAAAAElFTkSuQmCC"},function(t,e,n){var i=n(21);"string"==typeof i&&(i=[[t.i,i,""]]);var r={hmr:!0,transform:void 0,insertInto:void 0};n(23)(i,r);i.locals&&(t.exports=i.locals)},function(t,e,n){(t.exports=n(22)(!1)).push([t.i,'.yp-riddler {\n  color: black;\n}\n.yp-riddler .yp-riddler-winbox {\n  margin: 100px auto 0 auto;\n  border-radius: 2px;\n}\n.yp-riddler .yp-riddler-win {\n  -webkit-touch-callout: none;\n  /* iOS Safari */\n  -webkit-user-select: none;\n  /* Chrome/Safari/Opera */\n  -khtml-user-select: none;\n  /* Konqueror */\n  -moz-user-select: none;\n  /* Firefox */\n  -ms-user-select: none;\n  /* Internet Explorer/Edge */\n  user-select: none;\n  -moz-box-sizing: content-box;\n  -webkit-box-sizing: content-box;\n  box-sizing: content-box;\n  background-color: white;\n  padding: 10px;\n}\n.yp-riddler .yp-riddler-tip-text-container {\n  text-align: left;\n}\n.yp-riddler .yp-riddler-tip-text-container > * {\n  vertical-align: middle;\n}\n.yp-riddler .yp-riddler-tip-text-container span {\n  color: black;\n}\n.yp-riddler .yp-riddler-tip-text-container img {\n  width: 24%;\n  margin-left: 5px;\n}\n.yp-riddler .yp-riddler-click-img-container {\n  position: relative;\n}\n.yp-riddler .yp-riddler-click-img-container .yp-riddler-power-img {\n  height: 18px;\n  position: absolute;\n  bottom: 8px;\n  right: 8px;\n}\n.yp-riddler .yp-riddler-click-position {\n  width: 32px;\n  height: 32px;\n  background-position: center;\n  background-repeat: no-repeat;\n  background-size: 100%;\n  position: absolute;\n  background-color: rgba(83, 159, 254, 0.8);\n  box-sizing: border-box;\n  box-shadow: 0 0 10px black;\n  border-radius: 50%;\n  text-align: center;\n  line-height: 26px;\n  border: 3px solid white;\n  color: #fff;\n}\n.yp-riddler .yp-riddler-slide-img-container {\n  position: relative;\n}\n.yp-riddler .yp-riddler-slide-img-container > .yp-riddler-slider-bg,\n.yp-riddler .yp-riddler-slide-img-container .yp-riddler-slider-front {\n  display: block;\n}\n.yp-riddler .yp-riddler-slide-img-container .yp-riddler-slider-front {\n  position: absolute;\n  top: 0;\n  left: 0;\n  height: 100%;\n  width: auto;\n}\n.yp-riddler .yp-riddler-slide-img-container .yp-riddler-power-img {\n  height: 18px;\n  position: absolute;\n  bottom: 8px;\n  right: 8px;\n}\n.yp-riddler .yp-riddler-slider-area {\n  margin-top: 10px;\n  background: #E6E7EB;\n  line-height: 40px;\n  height: 40px;\n  text-align: center;\n  position: relative;\n  font-weight: 300;\n  font-size: 5px;\n  cursor: default;\n  user-select: none;\n  text-shadow: none;\n  border-radius: 2px;\n}\n.yp-riddler .yp-riddler-slider-area .yp-riddler-slider-tip-default {\n  white-space: nowrap;\n  overflow: hidden;\n  padding-left: 40px;\n  font-size: 12px;\n  color: #88949d;\n}\n.yp-riddler .yp-riddler-slider-area .yp-riddler-slider-btn {\n  height: 40px;\n  width: 40px;\n  position: absolute;\n  top: 0;\n  background-color: #FFFFFF;\n  box-sizing: border-box;\n  cursor: move;\n  border-radius: 2px;\n  box-shadow: 0px 0px 4px 0px rgba(0, 0, 0, 0.2);\n  display: flex;\n  justify-content: center;\n  align-items: center;\n}\n@keyframes gogogo {\n  from {\n    padding-left: -5px;\n  }\n  to {\n    padding-left: 5px;\n  }\n}\n.yp-riddler .yp-riddler-slider-area .yp-riddler-slider-btn .yp-riddler-slider-btn-sign {\n  width: 16px;\n  pointer-events: none;\n}\n.yp-riddler .yp-riddler-slider-area .yp-riddler-slider-btn .yp-riddler-slider-btn-mask {\n  position: absolute;\n  width: 40px;\n  height: 40px;\n  animation: myfirst 2s;\n  -moz-animation: myfirst 2s;\n  /* Firefox */\n  -webkit-animation: myfirst 2s;\n  /* Safari 和 Chrome */\n  -o-animation: myfirst 2s;\n  top: 0;\n  background: #fff;\n  left: 0;\n}\n@keyframes myfirst {\n  0% {\n    left: 0;\n    width: 40px;\n  }\n  100% {\n    left: 40px;\n    width: 0px;\n  }\n}\n@-moz-keyframes myfirst {\n  /* Firefox */\n  0% {\n    left: 0;\n    width: 40px;\n  }\n  100% {\n    left: 40px;\n    width: 0px;\n  }\n}\n@-webkit-keyframes myfirst {\n  /* Safari 和 Chrome */\n  0% {\n    left: 0;\n    width: 40px;\n  }\n  100% {\n    left: 40px;\n    width: 0px;\n  }\n}\n@-o-keyframes myfirst {\n  /* Opera */\n  0% {\n    left: 0;\n    width: 40px;\n  }\n  100% {\n    left: 40px;\n    width: 0px;\n  }\n}\n.yp-riddler .yp-riddler-slider-area .yp-riddler-slider-trajectory {\n  height: inherit;\n  position: absolute;\n  top: 0;\n  left: 0;\n  background-color: #EAEFFF;\n  border-radius: 2px;\n}\n.yp-riddler.yp-flat .yp-riddler-win-masker {\n  margin: 0;\n}\n.yp-riddler.yp-flat .yp-riddler-winbox {\n  border: 1px solid #eeeeee;\n  margin: 0;\n}\n.yp-riddler.yp-float .yp-riddler-winbox {\n  border: none;\n  box-shadow: 0 0 5px grey;\n}\n.yp-riddler.yp-float .yp-riddler-win-masker {\n  z-index: 3;\n  position: absolute;\n  bottom: 0;\n  left: 0;\n  padding-bottom: 50px;\n  display: none;\n}\n.yp-riddler.yp-float .yp-riddler-win {\n  margin: 0;\n}\n.yp-riddler.yp-external .yp-riddler-winbox {\n  border: none;\n  box-shadow: 0 0 5px grey;\n  -webkit-animation-name: fadeIn;\n  /*动画名称*/\n  -webkit-animation-duration: 500ms;\n  /*动画持续时间*/\n  -webkit-animation-iteration-count: 1;\n  /*动画次数*/\n  -webkit-animation-delay: 0s;\n  /*延迟时间*/\n}\n.yp-riddler.yp-external .yp-riddler-win-masker {\n  position: absolute;\n  bottom: 0;\n  left: 0;\n  padding-bottom: 50px;\n  display: none;\n}\n.yp-riddler.yp-external .yp-riddler-win {\n  margin: 0;\n}\n.yp-riddler.yp-dialog .yp-riddler-win-masker {\n  cursor: auto;\n  position: fixed;\n  top: 0;\n  left: 0;\n  right: 0;\n  bottom: auto;\n  height: 100%;\n  background-color: rgba(0, 0, 0, 0.6);\n  z-index: 999;\n}\n.yp-riddler .yp-riddler-refresh {\n  pointer-events: auto;\n  display: block;\n  width: 18px;\n  height: 18px;\n  position: absolute;\n  top: 10px;\n  right: 10px;\n  transition: 200ms;\n  cursor: pointer;\n  transition: all 500ms ease-in-out;\n}\n.yp-riddler .yp-riddler-win-masker {\n  background: rgba(0, 0, 0, 0);\n  display: none;\n}\n.yp-riddler .yp-riddler-result-alert-success {\n  width: 100%;\n  height: 24px;\n  line-height: 24px;\n  text-align: center;\n  position: absolute;\n  bottom: 0px;\n  background-color: #52c41a;\n  color: #fff;\n  font-size: 12px;\n  font-family: PingFangSC-Regular;\n  transition: height 0.4s ease-out, opacity 0.2s ease-in, visibility 0.2s ease-in;\n}\n.yp-riddler .yp-riddler-result-alert-error {\n  width: 100%;\n  line-height: 24px;\n  text-align: center;\n  position: absolute;\n  bottom: 0px;\n  background-color: #fee8ea;\n  color: #f5222d;\n  font-size: 12px;\n  font-family: PingFangSC-Regular;\n  transition: height 0.4s ease-out, opacity 0.2s ease-in, visibility 0.2s ease-in;\n}\n.yp-riddler.yp-riddler-button {\n  position: relative;\n  line-height: 40px;\n  height: 40px;\n  cursor: pointer;\n  font-family: "PingFang SC", "Microsoft yahei", "Helvetica Neue", "Helvetica", "Arial", sans-serif;\n  user-select: none;\n  text-align: center;\n  width: 100%;\n  outline: none;\n  text-decoration: none;\n  border: 1px solid #D9D9D9;\n  background-color: #F7F9FA;\n  border-radius: 2px;\n  font-size: 14px;\n  color: #757575;\n}\n.yp-riddler.yp-riddler-button:hover {\n  font-size: 14px;\n  color: #1792FA;\n}\n.yp-riddler.yp-riddler-button .yp-riddler-button_logo {\n  display: inline-block;\n  width: 25px;\n  height: 25px;\n  box-sizing: border-box;\n  transition: 200ms;\n  margin-right: 10px;\n  line-height: 25px;\n  position: relative;\n  top: 6.5px;\n}\n.yp-riddler.yp-riddler-button .yp-riddler-button_logo .yp-riddler-btn_a {\n  width: 100%;\n  height: 100%;\n  background: #145cff;\n  border-radius: 100px;\n  opacity: 0.5;\n  box-shadow: 0 0 6px grey;\n}\n.yp-riddler.yp-riddler-button .yp-riddler-button_logo .yp-riddler-btn_b {\n  width: 17px;\n  height: 17px;\n  background: #145cff;\n  border-radius: 100px;\n  opacity: 0.5;\n  position: absolute;\n  top: 4px;\n  left: 4px;\n}\n.yp-riddler.yp-riddler-button:hover .yp-riddler-button_logo {\n  padding: 4px;\n}\n.yp-riddler .yp-riddler-button-sucButton_logo {\n  display: inline-block;\n  width: 19px;\n  vertical-align: middle;\n  background: #26C267;\n  border-radius: 50%;\n  box-shadow: #26C267 0px 0px 10px;\n  padding: 5px;\n}\n.yp-riddler .yp-riddler-button-sucButton_text {\n  display: inline-block;\n  margin: 0 0 0 10px;\n  color: #26C267;\n}\n@-webkit-keyframes fadeIn {\n  0% {\n    opacity: 0;\n    /*初始状态 透明度为0*/\n  }\n  50% {\n    opacity: 0;\n    /*中间状态 透明度为0*/\n  }\n  100% {\n    opacity: 1;\n    /*结尾状态 透明度为1*/\n  }\n}\n',""])},function(t,e){t.exports=function(n){var a=[];return a.toString=function(){return this.map(function(t){var e=function(t,e){var n=t[1]||"",i=t[3];if(!i)return n;if(e&&"function"==typeof btoa){var r=(a=i,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(a))))+" */"),o=i.sources.map(function(t){return"/*# sourceURL="+i.sourceRoot+t+" */"});return[n].concat(o).concat([r]).join("\n")}var a;return[n].join("\n")}(t,n);return t[2]?"@media "+t[2]+"{"+e+"}":e}).join("")},a.i=function(t,e){"string"==typeof t&&(t=[[null,t,""]]);for(var n={},i=0;i<this.length;i++){var r=this[i][0];"number"==typeof r&&(n[r]=!0)}for(i=0;i<t.length;i++){var o=t[i];"number"==typeof o[0]&&n[o[0]]||(e&&!o[2]?o[2]=e:e&&(o[2]="("+o[2]+") and ("+e+")"),a.push(o))}},a}},function(t,e,i){var n,r,o,c={},l=(n=function(){return window&&document&&document.all&&!window.atob},function(){return void 0===r&&(r=n.apply(this,arguments)),r}),a=(o={},function(t,e){if("function"==typeof t)return t();if(void 0===o[t]){var n=function(t,e){return e?e.querySelector(t):document.querySelector(t)}.call(this,t,e);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(t){n=null}o[t]=n}return o[t]}),u=null,h=0,s=[],d=i(24);function f(t,e){for(var n=0;n<t.length;n++){var i=t[n],r=c[i.id];if(r){r.refs++;for(var o=0;o<r.parts.length;o++)r.parts[o](i.parts[o]);for(;o<i.parts.length;o++)r.parts.push(b(i.parts[o],e))}else{var a=[];for(o=0;o<i.parts.length;o++)a.push(b(i.parts[o],e));c[i.id]={id:i.id,refs:1,parts:a}}}}function p(t,e){for(var n=[],i={},r=0;r<t.length;r++){var o=t[r],a=e.base?o[0]+e.base:o[0],s={css:o[1],media:o[2],sourceMap:o[3]};i[a]?i[a].parts.push(s):n.push(i[a]={id:a,parts:[s]})}return n}function g(t,e){var n=a(t.insertInto);if(!n)throw new Error("Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid.");var i=s[s.length-1];if("top"===t.insertAt)i?i.nextSibling?n.insertBefore(e,i.nextSibling):n.appendChild(e):n.insertBefore(e,n.firstChild),s.push(e);else if("bottom"===t.insertAt)n.appendChild(e);else{if("object"!=typeof t.insertAt||!t.insertAt.before)throw new Error("[Style Loader]\n\n Invalid value for parameter 'insertAt' ('options.insertAt') found.\n Must be 'top', 'bottom', or Object.\n (https://github.com/webpack-contrib/style-loader#insertat)\n");var r=a(t.insertAt.before,n);n.insertBefore(e,r)}}function m(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t);var e=s.indexOf(t);0<=e&&s.splice(e,1)}function y(t){var e=document.createElement("style");if(void 0===t.attrs.type&&(t.attrs.type="text/css"),void 0===t.attrs.nonce){var n=function(){0;return i.nc}();n&&(t.attrs.nonce=n)}return v(e,t.attrs),g(t,e),e}function v(e,n){Object.keys(n).forEach(function(t){e.setAttribute(t,n[t])})}function b(e,t){var n,i,r,o,a,s;if(t.transform&&e.css){if(!(o="function"==typeof t.transform?t.transform(e.css):t.transform.default(e.css)))return function(){};e.css=o}if(t.singleton){var c=h++;n=u||(u=y(t)),i=A.bind(null,n,c,!1),r=A.bind(null,n,c,!0)}else r=e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(a=t,s=document.createElement("link"),void 0===a.attrs.type&&(a.attrs.type="text/css"),a.attrs.rel="stylesheet",v(s,a.attrs),g(a,s),i=function(t,e,n){var i=n.css,r=n.sourceMap,o=void 0===e.convertToAbsoluteUrls&&r;(e.convertToAbsoluteUrls||o)&&(i=d(i));r&&(i+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(r))))+" */");var a=new Blob([i],{type:"text/css"}),s=t.href;t.href=URL.createObjectURL(a),s&&URL.revokeObjectURL(s)}.bind(null,n=s,t),function(){m(n),n.href&&URL.revokeObjectURL(n.href)}):(n=y(t),i=function(t,e){var n=e.css,i=e.media;i&&t.setAttribute("media",i);if(t.styleSheet)t.styleSheet.cssText=n;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(n))}}.bind(null,n),function(){m(n)});return i(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;i(e=t)}else r()}}t.exports=function(t,a){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(a=a||{}).attrs="object"==typeof a.attrs?a.attrs:{},a.singleton||"boolean"==typeof a.singleton||(a.singleton=l()),a.insertInto||(a.insertInto="head"),a.insertAt||(a.insertAt="bottom");var s=p(t,a);return f(s,a),function(t){for(var e=[],n=0;n<s.length;n++){var i=s[n];(r=c[i.id]).refs--,e.push(r)}t&&f(p(t,a),a);for(n=0;n<e.length;n++){var r;if(0===(r=e[n]).refs){for(var o=0;o<r.parts.length;o++)r.parts[o]();delete c[r.id]}}}};var w,T=(w=[],function(t,e){return w[t]=e,w.filter(Boolean).join("\n")});function A(t,e,n,i){var r=n?"":i.css;if(t.styleSheet)t.styleSheet.cssText=T(e,r);else{var o=document.createTextNode(r),a=t.childNodes;a[e]&&t.removeChild(a[e]),a.length?t.insertBefore(o,a[e]):t.appendChild(o)}}},function(t,e){t.exports=function(t){var e="undefined"!=typeof window&&window.location;if(!e)throw new Error("fixUrls requires window.location");if(!t||"string"!=typeof t)return t;var r=e.protocol+"//"+e.host,o=r+e.pathname.replace(/\/[^\/]*$/,"/");return t.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,function(t,e){var n,i=e.trim().replace(/^"(.*)"$/,function(t,e){return e}).replace(/^'(.*)'$/,function(t,e){return e});return/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(i)?t:(n=0===i.indexOf("//")?i:0===i.indexOf("/")?r+i:o+i.replace(/^\.\//,""),"url("+JSON.stringify(n)+")")})}},function(t,e,n){"use strict";function l(t,e){return window.YP_RIDDLER_RESOURCE_LANG[e][t]}function i(){var t=navigator.userAgent;return{trident:-1<t.indexOf("Trident"),presto:-1<t.indexOf("Presto"),webKit:-1<t.indexOf("AppleWebKit"),gecko:-1<t.indexOf("Gecko")&&-1==t.indexOf("KHTML"),mobile:!!t.match(/AppleWebKit.*Mobile.*/),ios:!!t.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/),mac:t.match("Macintosh"),android:-1<t.indexOf("Android")||-1<t.indexOf("Adr"),iPhone:-1<t.indexOf("iPhone"),iPad:-1<t.indexOf("iPad"),fireFox:-1<t.indexOf("Firefox"),webApp:-1==t.indexOf("Safari"),weixin:-1<t.indexOf("MicroMessenger"),qq:" qq"==t.match(/\sQQ/i)}}n.r(e);var r={YPcaptcha_01:"请点击按钮开始验证",YPcaptcha_02:"请按顺序点击:",YPcaptcha_03:"向右拖动滑块填充拼图",YPcaptcha_04:"验证失败，请重试",YPcaptcha_05:"验证成功!"},o={"zh-cn":r,en:{YPcaptcha_01:"Click here to verify",YPcaptcha_02:"Select in this order:",YPcaptcha_03:"Drag to verify",YPcaptcha_04:"Sorry, please try again.",YPcaptcha_05:"I am not a robot!"}},S="dialog",a="flat",s="external",c=-1,u=0,h=1,d=2,f=3,p={href:"",enText:"Powered by YunPian's CAPTCHA",chText:"由云片行为验证提供技术支持"};function g(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}var m=function(){function d(t,e,n,i,r,o,a,s,c,l,u,h){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,d),this.captchaId=s,this.winWidth=a,this.onSuccess=t,this.onError=e,this.onFail=n,this.CONTAINER=i,this.jsonpRequest=r,this.getCaptcha=o,this.waterMark=c,this.lang=l,this.logoOptions=u||function(r){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{},e=Object.keys(o);"function"==typeof Object.getOwnPropertySymbols&&(e=e.concat(Object.getOwnPropertySymbols(o).filter(function(t){return Object.getOwnPropertyDescriptor(o,t).enumerable}))),e.forEach(function(t){var e,n,i;e=r,i=o[n=t],n in e?Object.defineProperty(e,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[n]=i})}return r}({},p),this.mode=h}var t,e,n;return t=d,(e=[{key:"render",value:function(t){throw new Error("not implement")}},{key:"verify",value:function(){throw new Error("not implement")}},{key:"destroy",value:function(){var t=this.CONTAINER.getElementsByClassName("yp-riddler-winbox")[0];t&&t.parentNode.removeChild(t)}},{key:"makeWin",value:function(){var t=this.CONTAINER.getElementsByClassName("yp-riddler-win-masker")[0],e=document.createElement("div"),n=document.createElement("div");return n.className="yp-riddler-winbox",n.style.width=this.winWidth+"px","flat"===this.mode&&(n.style.width=this.winWidth-2+"px"),e.className="yp-riddler-win",e.style.width=this.winWidth-26+"px","flat"===this.mode&&(e.style.padding="12px"),n.appendChild(e),t.appendChild(n),e.addEventListener(window.EventObj.click,function(t){t.stopPropagation(),t.preventDefault()}),e}}])&&g(t.prototype,e),n&&g(t,n),d}();function y(t){return(y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function v(t){return function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e<t.length;e++)n[e]=t[e];return n}}(t)||function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function b(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function w(t,e){return!e||"object"!==y(e)&&"function"!=typeof e?function(t){if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(t):e}function T(t){return(T=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function A(t,e){return(A=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var E=n(1),x=n(2),O=n(3),C=function(t){function o(){var t,e;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o);for(var n=arguments.length,i=new Array(n),r=0;r<n;r++)i[r]=arguments[r];return(e=w(this,(t=T(o)).call.apply(t,[this].concat(i)))).position=[],e.clickAmount=0,e.captchaImgTag=null,e.charactersImgTag=null,e.deg=0,e.imgWidth=e.winWidth-26,e.verifyResultTag=null,e}var e,n,i;return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&A(t,e)}(o,m),e=o,(n=[{key:"render",value:function(t){var e=t.clickAmount,n=t.captchaImage,i=t.wordsImage;this.CONTAINER.getElementsByClassName("yp-riddler-win").length||this.createWin(),this.position=[],this.cleanClickSign(),this.clickAmount=e,this.captchaImgTag.src=n,this.charactersImgTag.src=i}},{key:"verify",value:function(){var e=this,t=window.getComputedStyle(this.captchaImgTag,null),n=parseInt(t.width),i=parseInt(t.height),r=this.position.map(function(t){return[t[0]/n,t[1]/i]});this.jsonpRequest("/jsonp/captcha/verify",{points:r},function(t){if(t.code)return e.cleanClickSign(),void e.onFail(t.code,t.msg);e.showVerifyResult("success",l("YPcaptcha_05",e.lang),!0),e.onSuccess({token:t.data.token,authenticate:t.data.authenticate})},this.onFail)}},{key:"showVerifyResult",value:function(t,e,n){var i=this;if(this.verifyResultTag.className="yp-riddler-result yp-riddler-result-alert-".concat(t),this.verifyResultTag.innerHTML=e,this.verifyResultTag.style.height="24px",n)var r=setTimeout(function(){i.hiddenVerifyResult(),clearTimeout(r)},2e3)}},{key:"hiddenVerifyResult",value:function(){this.verifyResultTag.style.height="0px",this.verifyResultTag.innerHTML=""}},{key:"cleanClickSign",value:function(){for(var t=this.CONTAINER.getElementsByClassName("yp-riddler-click-position");t.length;){var e=t[0];e.parentNode.removeChild(e)}this.position=[]}},{key:"addClickSign",value:function(t,e){var n=this,i=this.CONTAINER.getElementsByClassName("yp-riddler-click-img-container")[0],r=i.getBoundingClientRect();if(r.x&&r.y?(t-=r.x,e-=r.y):(t-=r.left,e-=r.top),this.position.length<this.clickAmount){this.position.push([t,e]);var o=document.createElement("div");o.className="yp-riddler-click-position",o.style.top=e-16+"px",o.style.left=t-16+"px";var a=document.createElement("div");a.className="yp-riddler-click-position-index",a.innerHTML=this.position.length,a.addEventListener(window.EventObj.click,function(t){(t.stopPropagation(),t.preventDefault(),t.cancelBubble=!0,parseInt(o.childNodes[0].innerHTML)<n.position.length)?(v(n.CONTAINER.getElementsByClassName("yp-riddler-click-position")).forEach(function(t){i.removeChild(t)}),n.position=[]):(i.removeChild(o),n.position.pop())}),o.appendChild(a),i.appendChild(o),this.position.length===this.clickAmount&&this.verify()}}},{key:"createWin",value:function(){var i=this,t=this.makeWin(),e=document.createElement("div");e.className="yp-riddler-click-img-container",e.style.height=this.winWidth/2+"px",e.addEventListener(window.EventObj.click,function(t){var e=null,n=null;e="touchmove"===window.EventObj.move?(n=t.targetTouches[0].clientX,t.targetTouches[0].clientY):(n=t.clientX,t.clientY),i.addClickSign(n,e)});var n=document.createElement("img");if(n.className="yp-riddler-click-img",n.style.width=this.imgWidth+"px",n.style.height=this.winWidth/2+"px",n.style.backgroundColor="#c7c7c7",this.captchaImgTag=n,e.appendChild(n),t.appendChild(e),this.waterMark){var r=document.createElement("img");r.className="yp-riddler-power-img",r.src="en"===this.lang?x:O,e.appendChild(r)}var o=document.createElement("div");o.className="yp-riddler-tip-text-container";var a=document.createElement("span");a.innerHTML=l("YPcaptcha_02",this.lang),o.appendChild(a);var s=document.createElement("img");this.charactersImgTag=s,o.appendChild(s),this.verifyResultTag=document.createElement("div"),this.verifyResultTag.className="yp-riddler-result",e.appendChild(this.verifyResultTag),t.appendChild(o);var c=document.createElement("img");c.src=E,c.className="yp-riddler-refresh",c.addEventListener(window.EventObj.click,function(t){t.stopPropagation(),t.preventDefault(),i.cleanClickSign(),i.deg+=360,c.style.transform="rotate(".concat(i.deg,"deg)"),i.showVerifyResult("","",!1),i.getCaptcha()}),e.appendChild(c)}}])&&b(e.prototype,n),i&&b(e,i),o}();function B(t){return(B="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function D(t){return function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e<t.length;e++)n[e]=t[e];return n}}(t)||function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function k(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function R(t,e){return!e||"object"!==B(e)&&"function"!=typeof e?function(t){if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(t):e}function I(t){return(I=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function N(t,e){return(N=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var P=n(1),M=n(6),L=n(7),V=n(3),j=n(2),U=n(8),F=function(t){function o(){var t,e;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o);for(var n=arguments.length,i=new Array(n),r=0;r<n;r++)i[r]=arguments[r];return(e=R(this,(t=I(o)).call.apply(t,[this].concat(i)))).position=[],e.bgTag=null,e.alertImgTag=null,e.trajectoryTag=null,e.rawX=0,e.rawTimestamp=0,e.offsetX=0,e.alertTextTag=null,e.btnTag=null,e.isDraging=!1,e.MAX_OFFSET=0,e.MAX_POINTS_AMOUNT=50,e.disabled=!1,e.curErrorIndex=0,e.MAX_ERROR=3,e.mouseDown=!1,e.proption=0,e.deg=0,e.imgWidth=e.winWidth-26,e.verifyResultTag=null,e}var e,n,i;return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&N(t,e)}(o,m),e=o,(n=[{key:"render",value:function(t){var e=t.sliderWidth,n=void 0===e?0:e,i=t.width,r=void 0===i?1:i,o=t.bg,a=void 0===o?"":o,s=t.front,c=void 0===s?"":s,l=this.CONTAINER.getElementsByClassName("yp-riddler-win");l&&!l.length&&(this.proption=(n/r).toFixed(2),this.createWin()),this.bgTag.src=a,this.alertImgTag.src=c,this.alertImgTag.ondragstart=function(){return!1},this.disabled=!1,this.resetPosition()}},{key:"resetPosition",value:function(){this.position=[],this.rawX=0,this.offsetX=0,this.trajectoryTag.style.width="0px",this.moveModule(),this.hiddenVerifyResult(),this.showTip(l("YPcaptcha_03",this.lang))}},{key:"verify",value:function(){var e=this,t=window.getComputedStyle(this.bgTag,null),n=parseInt(t.width),i=this.reducePoints(),r=(this.imgWidth-this.alertImgTag.width)*(this.offsetX/(this.imgWidth-42))/n;this.jsonpRequest("/jsonp/captcha/verify",{points:i,distanceX:r},function(t){if(t.code)return e.resetPosition(),e.disabled=!0,e.curErrorIndex++,void(e.curErrorIndex<e.MAX_ERROR?(e.showVerifyResult("error",l("YPcaptcha_04",e.lang)),setTimeout(function(){e.disabled=!1,setTimeout(function(){return e.onFail(t.code,t.msg,!0)},0)},500)):(e.disabled=!1,e.curErrorIndex=0,setTimeout(function(){return e.onFail(t.code,t.msg,!1)},0)));e.curErrorIndex=0,e.showVerifyResult("success",l("YPcaptcha_05",e.lang),!1),e.onSuccess({token:t.data.token,authenticate:t.data.authenticate})},this.onFail)}},{key:"showTip",value:function(t){this.alertTextTag.innerHTML=t,this.alertTextTag.className="yp-riddler-slider-tip-default"}},{key:"showVerifyResult",value:function(t,e){var n=this,i=!(2<arguments.length&&void 0!==arguments[2])||arguments[2];if("success"===t){this.trajectoryTag.style.background="#E5F6DD",document.querySelector(".yp-riddler-slider-btn-sign").src=U;var r=document.createElement("div");r.className="yp-riddler-slider-btn-mask",document.querySelector(".yp-riddler-slider-btn").appendChild(r);var o=setTimeout(function(){var t=document.querySelector(".yp-riddler-slider-btn");t&&t.removeChild(r),clearTimeout(o)},2e3)}if(this.verifyResultTag.className="yp-riddler-result yp-riddler-result-alert-".concat(t),this.verifyResultTag.innerHTML=e,this.verifyResultTag.style.height="24px",i)var a=setTimeout(function(){n.hiddenVerifyResult(),clearTimeout(a)},2e3)}},{key:"createRightDom",value:function(t){var e=document.createElement("img");e.className="yp-riddler-slider-btn-sign",e.src=M,t.appendChild(e)}},{key:"hiddenVerifyResult",value:function(){this.verifyResultTag.style.height="0px",this.verifyResultTag.innerHTML="",document.querySelector(".yp-riddler-slider-btn-sign").src=M}},{key:"moveModule",value:function(){this.trajectoryTag.style.width="".concat(this.offsetX,"px"),this.btnTag.style.left="".concat(this.offsetX,"px"),this.alertImgTag.style.left=(this.imgWidth-this.alertImgTag.width)*(this.offsetX/(this.imgWidth-40))+"px"}},{key:"reducePoints",value:function(){var t=D(this.position);if(t.length<=this.MAX_POINTS_AMOUNT)return t;var e=[t[0]],n=t[t.length-1],i=Math.floor(t.length/this.MAX_POINTS_AMOUNT);if(i<2)return t;for(var r=1;r<t.length-2;r+=i)e.push(t[r]);return e.push(n),e}},{key:"createWin",value:function(){var e=this,t=this.makeWin(),n=document.createElement("div");if(n.className="yp-riddler-slide-img-container",n.style.width=this.imgWidth+"px",t.appendChild(n),this.waterMark){var i=document.createElement("img");i.className="yp-riddler-power-img",i.src="en"===this.lang?j:V,n.appendChild(i)}this.bgTag=document.createElement("img"),this.bgTag.className="yp-riddler-slider-bg",this.bgTag.style.width=this.imgWidth+"px",this.bgTag.style.height=this.imgWidth/2+"px",this.bgTag.style.backgroundColor="#c7c7c7",this.alertImgTag=document.createElement("img"),this.alertImgTag.className="yp-riddler-slider-front",this.verifyResultTag=document.createElement("div"),this.verifyResultTag.className="yp-riddler-result",n.appendChild(this.bgTag),n.appendChild(this.alertImgTag),n.appendChild(this.verifyResultTag);var r=document.createElement("img");r.src=P,r.addEventListener(window.EventObj.click,function(t){t.stopPropagation(),t.preventDefault(),e.deg+=360,r.style.transform="rotate(".concat(e.deg,"deg)"),e.resetPosition(),e.getCaptcha()}),r.className="yp-riddler-refresh",n.appendChild(r);var o=document.createElement("div");o.className="yp-riddler-slider-area",t.appendChild(o),this.trajectoryTag=document.createElement("div"),this.trajectoryTag.className="yp-riddler-slider-trajectory",o.appendChild(this.trajectoryTag),this.alertTextTag=document.createElement("div"),o.appendChild(this.alertTextTag);var a=document.createElement("div");a.className="yp-riddler-slider-btn",this.createRightDom(a),o.appendChild(a),this.btnTag=a,this.registerDragEvent()}},{key:"registerDragEvent",value:function(){var r=this;this.alertImgTag.addEventListener(window.EventObj.down,function(t){if(!r.offsetX&&!r.disabled){var e=0;e="touchmove"===window.EventObj.move?t.targetTouches[0].pageX:t.pageX,r.mouseDown=!0,r.isDraging=!0,r.rawX=e,r.rawTimestamp=Date.now(),r.showTip(""),r.MAX_OFFSET=r.imgWidth-40,r.trajectoryTag.style.width=(r.proption-.125)*r.imgWidth/2+"px"}}),this.btnTag.addEventListener(window.EventObj.down,function(t){if(!r.offsetX&&!r.disabled){document.querySelector(".yp-riddler-slider-btn-sign").src=L;var e=0;e="touchmove"===window.EventObj.move?t.targetTouches[0].pageX:t.pageX,r.mouseDown=!0,r.isDraging=!0,r.rawX=e,r.rawTimestamp=Date.now(),r.showTip(""),r.MAX_OFFSET=r.imgWidth-40,r.trajectoryTag.style.width=(r.proption-.125)*r.imgWidth/2+"px"}}),document.addEventListener(window.EventObj.up,function(){r.mouseDown&&(document.querySelector(".yp-riddler-slider-btn-sign").src=M,r.isDraging=!1,r.mouseDown=!1,r.verify())}),this.CONTAINER.addEventListener(window.EventObj.up,function(){r.mouseDown&&(document.querySelector(".yp-riddler-slider-btn-sign").src=M,r.isDraging=!1,r.mouseDown=!1,r.verify())}),this.CONTAINER.addEventListener(window.EventObj.move,function(t){var e=0,n=0;if(n="touchmove"===window.EventObj.move?(t.preventDefault(),e=t.targetTouches[0].pageX,t.targetTouches[0].pageY):(e=t.pageX,t.pageY),r.isDraging){r.offsetX=e-r.rawX,r.offsetX<0?r.offsetX=0:r.offsetX>r.MAX_OFFSET&&(r.offsetX=r.MAX_OFFSET);var i=[parseInt(e.toFixed(2)),parseInt(n.toFixed(2)),Date.now()-r.rawTimestamp];r.position.push(i),r.moveModule()}}),this.CONTAINER.getElementsByClassName("yp-riddler-win")[0].addEventListener("mouserleave",function(){r.isDraging&&(r.isDraging=!1,r.resetPosition())})}}])&&k(e.prototype,n),i&&k(e,i),o}();function _(t){return(_="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function H(t){return function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e<t.length;e++)n[e]=t[e];return n}}(t)||function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function X(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function z(t,e){return!e||"object"!==_(e)&&"function"!=typeof e?function(t){if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(t):e}function W(t){return(W=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function q(t,e){return(q=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var G=n(1),K=n(6),J=n(7),Y=n(3),Q=n(2),Z=n(8),$=function(t){function o(){var t,e;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o);for(var n=arguments.length,i=new Array(n),r=0;r<n;r++)i[r]=arguments[r];return(e=z(this,(t=W(o)).call.apply(t,[this].concat(i)))).position=[],e.bgTag=null,e.alertImgTag=null,e.trajectoryTag=null,e.rawX=0,e.rawTimestamp=0,e.offsetX=0,e.alertTextTag=null,e.btnTag=null,e.maskerTag=null,e.isDraging=!1,e.MAX_OFFSET=0,e.MAX_POINTS_AMOUNT=50,e.disabled=!1,e.curErrorIndex=0,e.MAX_ERROR=3,e.mouseDown=!1,e.proption=0,e.deg=0,e}var e,n,i;return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&q(t,e)}(o,m),e=o,(n=[{key:"render",value:function(t){var e=t.sliderWidth,n=void 0===e?0:e,i=t.width,r=void 0===i?1:i,o=t.bg,a=void 0===o?"":o,s=t.front,c=void 0===s?"":s,l=this.CONTAINER.getElementsByClassName("yp-riddler-win");l&&!l.length&&(this.proption=(n/r).toFixed(2),this.createWin()),this.bgTag.src=a,this.alertImgTag.src=c,this.disabled=!1,this.resetPosition()}},{key:"resetPosition",value:function(){this.position=[],this.rawX=0,this.offsetX=0,this.trajectoryTag.style.width="0px",this.maskerTag.style.display="none",this.moveModule(),this.showVerifyResult("","",!1),this.showTip(l("YPcaptcha_03",this.lang))}},{key:"verify",value:function(){var e=this,t=window.getComputedStyle(this.bgTag,null),n=parseInt(t.width),i=this.reducePoints(),r=this.offsetX/n;this.jsonpRequest("/jsonp/captcha/verify",{points:i,distanceX:r},function(t){if(t.code)return e.resetPosition(),e.showTip(l("YPcaptcha_04",e.lang),"error"),e.disabled=!0,e.curErrorIndex++,void(e.curErrorIndex<e.MAX_ERROR?setTimeout(function(){e.showTip(l("YPcaptcha_03",e.lang)),e.disabled=!1,setTimeout(function(){return e.onFail(t.code,t.msg,!0)},0)},500):(e.curErrorIndex=0,setTimeout(function(){return e.onFail(t.code,t.msg,!1)},0)));e.curErrorIndex=0,e.showVerifyResult("success",l("YPcaptcha_05",e.lang),!0),e.onSuccess({token:t.data.token,authenticate:t.data.authenticate})},this.onFail)}},{key:"showTip",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]&&arguments[1];this.alertTextTag.innerHTML=t,this.alertTextTag.className="yp-riddler-slider-tip-"+(e?"error":"default")}},{key:"showVerifyResult",value:function(t,e,n){var i=this.CONTAINER.getElementsByClassName("yp-riddler-slide-img-container");if(n){if(i&&i.length){var r=document.createElement("div");r.className="yp-riddler-result yp-riddler-result-alert-".concat(t),r.innerHTML=e,i[0].appendChild(r)}if("success"===t){this.trajectoryTag.style.background="#E5F6DD",document.querySelector(".yp-riddler-slider-btn-sign").src=Z;var o=document.createElement("div");o.className="yp-riddler-slider-btn-mask",document.querySelector(".yp-riddler-slider-btn").appendChild(o);var a=setTimeout(function(){var t=document.querySelector(".yp-riddler-slider-btn");t&&t.removeChild(o),clearTimeout(a)},2e3)}}else{var s=this.CONTAINER.getElementsByClassName("yp-riddler-result")[0];s&&i[0].removeChild(s)}}},{key:"moveModule",value:function(){this.trajectoryTag.style.width="".concat(this.offsetX,"px"),this.alertImgTag.style.left="".concat(this.offsetX,"px"),this.btnTag.style.left="".concat(this.offsetX,"px")}},{key:"reducePoints",value:function(){var t=H(this.position);if(t.length<=this.MAX_POINTS_AMOUNT)return t;var e=[t[0]],n=t[t.length-1],i=Math.floor(t.length/this.MAX_POINTS_AMOUNT);if(i<2)return t;for(var r=1;r<t.length-2;r+=i)e.push(t[r]);return e.push(n),e}},{key:"externalSlide",value:function(){var t=this.CONTAINER.getElementsByClassName("yp-riddler")[0],e=document.createElement("div");e.className="yp-riddler-slider-area",e.style.height=this.winWidth/8+"px",e.style.width=this.winWidth+"px",e.style.lineHeight=this.winWidth/8+"px",t.appendChild(e);var n=document.createElement("div");n.className="yp-riddler-slider-btn",n.style.width=this.winWidth/6+"px";var i=document.createElement("span");i.className="yp-riddler-slider-tip-default",i.innerHTML=l("YPcaptcha_03",this.lang),e.appendChild(i);var r=document.createElement("img");r.className="yp-riddler-slider-btn-sign",r.src=K,n.appendChild(r),e.appendChild(n)}},{key:"createWin",value:function(){var e=this,t=this.makeWin();t.style.width=this.winWidth+"px",t.style.padding="0px";var n=document.createElement("div");if(n.className="yp-riddler-slide-img-container",n.style.width=this.winWidth+"px",t.appendChild(n),this.waterMark){var i=document.createElement("img");i.className="yp-riddler-power-img",i.src="en"===this.lang?Q:Y,n.appendChild(i)}this.bgTag=document.createElement("img"),this.bgTag.className="yp-riddler-slider-bg",this.bgTag.style.width=this.winWidth+"px",this.bgTag.style.height=this.winWidth/2+"px",this.bgTag.style.backgroundColor="#c7c7c7",this.alertImgTag=document.createElement("img"),this.alertImgTag.className="yp-riddler-slider-front",this.externalSlide(),n.appendChild(this.bgTag),n.appendChild(this.alertImgTag);var r=document.createElement("img");r.src=G,r.addEventListener(window.EventObj.click,function(t){t.stopPropagation(),t.preventDefault(),e.deg+=360,r.style.transform="rotate(".concat(e.deg,"deg)"),e.resetPosition(),e.getCaptcha()}),r.className="yp-riddler-refresh",n.appendChild(r);var o=this.CONTAINER.getElementsByClassName("yp-riddler-slider-area")[0];this.alertTextTag=this.CONTAINER.getElementsByClassName("yp-riddler-slider-tip-default")[0],this.alertTextTag.style.paddingLeft="40px",this.alertTextTag.style.fontSize="14px",this.trajectoryTag=document.createElement("div"),this.trajectoryTag.className="yp-riddler-slider-trajectory",o.appendChild(this.trajectoryTag),this.maskerTag=this.CONTAINER.getElementsByClassName("yp-riddler-win-masker")[0],this.maskerTag.style.display="none",this.btnTag=this.CONTAINER.getElementsByClassName("yp-riddler-slider-btn")[0],this.maskerTag.style.paddingBottom=this.btnTag.offsetHeight+10+"px",this.registerDragEvent()}},{key:"registerDragEvent",value:function(){var c=this;this.btnTag.addEventListener(window.EventObj.down,function(t){if(!c.offsetX&&!c.disabled){document.querySelector(".yp-riddler-slider-btn-sign").src=J,c.maskerTag.style.display="block";var e=0;e="touchmove"===window.EventObj.move?t.targetTouches[0].pageX:t.pageX,c.mouseDown=!0,c.isDraging=!0,c.rawX=e,c.rawTimestamp=Date.now(),c.showTip("");var n=window.getComputedStyle(c.btnTag.parentNode,null),i=window.getComputedStyle(c.btnTag,null),r=c.CONTAINER.getElementsByClassName("yp-riddler-slider-front")[0].offsetWidth,o=parseInt(n.width),a=o-r,s=o-parseInt(i.width);s<(c.MAX_OFFSET=a)&&(c.MAX_OFFSET=s),c.trajectoryTag.style.marginLeft="0px",c.trajectoryTag.style.width=(c.proption-.125)*(c.winWidth-20)/2+"px"}}),this.CONTAINER.addEventListener(window.EventObj.up,function(){c.mouseDown&&(document.querySelector(".yp-riddler-slider-btn-sign").src=K,c.isDraging=!1,c.mouseDown=!1,c.maskerTag.style.display="none",c.verify())}),this.CONTAINER.addEventListener(window.EventObj.move,function(t){var e=0,n=0;if(n="touchmove"===window.EventObj.move?(t.preventDefault(),e=t.targetTouches[0].pageX,t.targetTouches[0].pageY):(e=t.pageX,t.pageY),c.isDraging){c.offsetX=e-c.rawX,c.offsetX<0?c.offsetX=0:c.offsetX>c.MAX_OFFSET&&(c.offsetX=c.MAX_OFFSET);var i=[parseInt(e.toFixed(2)),parseInt(n.toFixed(2)),Date.now()-c.rawTimestamp];c.position.push(i),c.moveModule()}}),this.CONTAINER.getElementsByClassName("yp-riddler-win-masker")[0].addEventListener("mouseleave",function(){c.isDraging&&(c.isDraging=!1,c.resetPosition())})}}])&&X(e.prototype,n),i&&X(e,i),o}();function tt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},i=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(n).filter(function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable}))),i.forEach(function(t){et(e,t,n[t])})}return e}function et(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function nt(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=[],i=!0,r=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(i=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);i=!0);}catch(t){r=!0,o=t}finally{try{i||null==s.return||s.return()}finally{if(r)throw o}}return n}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function it(t,e,n){return(it=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}()?Reflect.construct:function(t,e,n){var i=[null];i.push.apply(i,e);var r=new(Function.bind.apply(t,i));return n&&rt(r,n.prototype),r}).apply(null,arguments)}function rt(t,e){return(rt=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function ot(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function at(t,e,n){return e&&ot(t.prototype,e),n&&ot(t,n),t}var st=function(){function e(t){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),this.pool={},this.expired=1e3*t}return at(e,null,[{key:"Instance",value:function(){if(!this._instance){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];this._instance=it(this,e)}return this._instance}}]),at(e,[{key:"makeScriptId",value:function(t){return"jsonp_".concat(t)}},{key:"preAdd",value:function(){for(var t;(t=Math.random().toString(32).replace("0.",""))in this.pool;);return this.pool[t]={ts:1/0},t}},{key:"add",value:function(t,e,n){var i=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;this.pool[t]={ts:Date.now(),cb:n,failCb:i};var r=document.createElement("script");r.src=e,r.id=this.makeScriptId(t),document.head.appendChild(r)}},{key:"removeCallback",value:function(t){if(t in this.pool){var e=this.pool[t];delete this.pool[t];var n=document.getElementById(this.makeScriptId(t));return n.parentNode.removeChild(n),e}}},{key:"checkExpired",value:function(){var t=!0,e=!1,n=void 0;try{for(var i,r=function(t){t||(t={});var e=Object.keys(t),n=e.length,i=new Array(n);for(;n--;)i[n]=[e[n],t[e[n]]];return i}(this.pool)[Symbol.iterator]();!(t=(i=r.next()).done);t=!0){var o=nt(i.value,2),a=o[0],s=o[1].ts;if(Date.now()>s+this.expired){var c=tt({},this.removeCallback(a),{msg:"request timeout",code:408});c.failCb&&c.failCb(c)}}}catch(t){e=!0,n=t}finally{try{t||null==r.return||r.return()}finally{if(e)throw n}}}},{key:"invoke",value:function(t,e){var n=this.pool[t];n?(this.removeCallback(t),n.cb(e)):console.warn("cb[".concat(t,"] is expired"))}}]),e}();var ct=n(10),lt=n.n(ct),ut=n(4),ht=n.n(ut),dt=n(11),ft=n.n(dt),pt=n(5),gt=n.n(pt),mt={};function yt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},i=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(n).filter(function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable}))),i.forEach(function(t){vt(e,t,n[t])})}return e}function vt(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function bt(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}mt.getRandomStr=function(t){for(var e="";e.length<t;)e+=Math.random().toString(36).substr(2);return e=e.slice(0,t)},mt.getBrowserInfo=function(){var t=[],e={userAgent:navigator.userAgent,language:navigator.language,hardware_concurrency:navigator.hardwareConcurrency,resolution:[window.screen.width,window.screen.height],navigator_platform:navigator.platform};for(var n in e)e.hasOwnProperty(n)&&t.push({key:n,value:e[n]});return t},mt.createUUid=function(){var n=(new Date).getTime();return window.performance&&"function"==typeof window.performance.now&&(n+=window.performance.now()),"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){var e=(n+16*Math.random())%16|0;return n=Math.floor(n/16),("x"===t?e:3&e|8).toString(16)})},mt.cookie={get:function(){for(var t=(0<arguments.length&&void 0!==arguments[0]?arguments[0]:"")+"=",e=document.cookie.split(";"),n=0;n<e.length;n++){for(var i=e[n];" "===i.charAt(0);)i=i.substring(1,i.length);if(0===i.indexOf(t))return decodeURIComponent(i.substring(t.length,i.length))}return null},set:function(t,e,n,i,r){var o="",a="",s="";if(i){var c=document.location.hostname.match(/[a-z0-9][a-z0-9\-]+\.[a-z\.]{2,6}$/i),l=c?c[0]:"";o=l?"; domain=."+l:""}if(n){var u=new Date;u.setTime(u.getTime()+24*n*60*60*1e3),a="; expires="+u.toGMTString()}r&&(s="; secure");var h="".concat(t,"=").concat(encodeURIComponent(e)).concat(a,"; path=/").concat(o).concat(s);return document.cookie=h},parse:function(t){return JSON.parse(mt.cookie.get(t)||null)},remove:function(t,e){mt.cookie.set(t,"",-1,e)}};var wt=n(19),Tt="";document.currentScript&&document.currentScript.src&&(Tt=document.currentScript.src);var At=function(){function x(t){var e=t.config,n=void 0===e?{}:e,i=t.container,r=t.additions,o=t.nativeInfo,a=t.langPack,s=t.onError,c=t.onSuccess,l=t.onFail,u=t.onExit,h=t.beforeStart,d=t.afterStart,f=t.expired,p=t.jsonpField,g=t.hosts,m=t.appId,y=t.noButton,v=t.mode,b=t.winWidth,w=t.lang,T=t.mobile,A=t.username,E=t.version;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,x),this.mode=n.mode||v||S,this.winWidth=n.winWidth||b,this.APP_ID=n.appId||m,this.version=E||"v1",this.EXPIRED=n.expired||f||30,this.JSONP_FIELD=p||"ypjsonp",this.RSA_PUBLIC_KEY="-----BEGIN PUBLIC KEY-----MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDnOWe/gs033L/2/xR3oi6SLAMPBY5VledUqqH6dbCNOdrGX4xW+1x6NUfvmwpHRBA2C7xWDDvOIldTl0rMtERTDy9homrVqEcW6/TY+dSVFL3e2Yg2sVaehHv7FhmATkgfC2FcXt8Wvm99QpKRSrGKpcFYJwOj2F8hJh+rTG0IPQIDAQAB-----END PUBLIC KEY-----",this.HOSTS=n.hosts||g||"https://captcha.yunpian.com",this.NO_BUTTON=n.noButton||y,this.CONTAINER=i.dom||i,this.lang=n.lang||w||"zh-cn",this.langPack=n.langPack||a,this.additions=r||{},this.additions.username=this.additions.username||A||T,this.beforeStart=h||function(t){return t()},this.afterStart=d||function(){},this.onSuccess=c||function(){},this.onError=s||function(){},this.onFail=l||function(t,e,n){console.warn("验证失败:",e,"code:",t),n()},this.onExit=u||function(){},this.fingerprint=null,this.browserInfo=null,this.token=null,this.cbManager=st.Instance(this.EXPIRED),this.validator=null,this.masker=null,this.hasModeBuildDone=!1,this.scrollTop=null,this.waterMark=!0,this.logoOptions={},this.drawIndex=0,this.nativeInfo=o||null,this.init()}var t,e,n;return t=x,(e=[{key:"rsaEncrypt",value:function(t){var e=new ft.a;return e.setPublicKey(this.RSA_PUBLIC_KEY),e.encrypt(t)}},{key:"encrypt",value:function(t){t=JSON.stringify(t);var e=mt.getRandomStr(16),n=mt.getRandomStr(16);return{i:lt.a.encrypt(t,ht.a.parse(e),{iv:ht.a.parse(n)}).toString(),k:this.rsaEncrypt(e+n)}}},{key:"jsonpRequest",value:function(t,e,n){var i=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null,r=this.cbManager.preAdd(),o=location.origin;e.fp=this.fingerprint,e.address=o,e.yp_riddler_id=mt.cookie.get("yp_riddler_id")||"";var a=this.encrypt(e);t="".concat(this.HOSTS,"/").concat(this.version).concat(t,"?cb=").concat(r,"&i=").concat(encodeURIComponent(a.i),"&k=").concat(encodeURIComponent(a.k)),this.token&&(t+="&token=".concat(this.token)),this.APP_ID&&(t+="&captchaId=".concat(this.APP_ID)),this.cbManager.add(r,t,n,i)}},{key:"injectButton",value:function(t){if(!this.NO_BUTTON){var e=document.createElement("div");e.className="yp-riddler-button_logo";var n=document.createElement("div");n.className="yp-riddler-btn_a",e.appendChild(n),(n=document.createElement("div")).className="yp-riddler-btn_b",e.appendChild(n);var i=document.createElement("span");i.className="yp-riddler-button_text",i.innerHTML=l("YPcaptcha_01",this.lang),t.appendChild(e),t.appendChild(i)}}},{key:"injectSuccessBtn",value:function(t){if(!this.NO_BUTTON&&t){this.isVerifySuccess=!0;var e=this.CONTAINER.getElementsByClassName("yp-riddler-button")[0];if(e){var n=this.CONTAINER.getElementsByClassName("yp-riddler-button_logo")[0],i=this.CONTAINER.getElementsByClassName("yp-riddler-button_text")[0];e.removeChild(n),e.removeChild(i);var r=document.createElement("img");r.className="yp-riddler-button-sucButton_logo",r.src=wt;var o=document.createElement("p");return o.className="yp-riddler-button-sucButton_text",o.innerText=l("YPcaptcha_05",this.lang),e.setAttribute("style","background: #EEFFF5; border: 1px solid #26C267"),e.appendChild(r),e.appendChild(o),e}}return null}},{key:"externalSlide",value:function(t){var e=document.createElement("div");e.className="yp-riddler-slider-area",e.style.height=this.winWidth/8+"px",e.style.width=this.winWidth+"px",e.style.lineHeight=this.winWidth/8+"px",t.appendChild(e);var n=document.createElement("div");n.className="yp-riddler-slider-btn",n.style.width=this.winWidth/6+"px";var i=document.createElement("span");i.className="yp-riddler-slider-tip-default",i.innerHTML=l("YPcaptcha_03",this.lang),e.appendChild(i);var r=document.createElement("span");r.className="yp-riddler-slider-btn-sign",r.innerHTML=">&nbsp;>",n.appendChild(r),e.appendChild(n)}},{key:"buildDialogMode",value:function(t){var e=this;this.CONTAINER.addEventListener("click",function(t){if(!e.isVerifySuccess){t.stopPropagation();e.beforeStart(function(){e.getCaptcha(),e.hasModeBuildDone=!0}),i().ios&&window.scrollTo(e.scrollTop,0)}}),this.injectButton(t)}},{key:"buildFloatMode",value:function(n){var i=this;this.CONTAINER.addEventListener("mouseenter",function(){var t=n.getElementsByClassName("yp-riddler-win-masker")[0],e=i.NO_BUTTON?i.CONTAINER:n;t.style.paddingBottom=e.clientHeight+10+"px";i.beforeStart(function(){i.validator||i.hasModeBuildDone?i.showUI(null,!1):(i.getCaptcha(),i.hasModeBuildDone=!0)});i.CONTAINER.addEventListener("mouseleave",function t(){i.hideUI(!1),i.CONTAINER.removeEventListener("mouseleave",t)})}),this.injectButton(n)}},{key:"buildFlatMode",value:function(t){var e=this;this.beforeStart(function(){e.getCaptcha(),e.hasModeBuildDone=!0})}},{key:"buildExternalMode",value:function(t){var e=this;this.beforeStart(function(){e.getCaptcha(),e.hasModeBuildDone=!0})}},{key:"retWidth",value:function(){var t=new RegExp(/^\d+%$/);if(this.winWidth){if(t.test(this.winWidth)){var e=document.body.clientWidth,n=this.winWidth.replace("%","")/100;this.winWidth=n*e}this.winWidth=this.winWidth<230?230:this.winWidth}else this.winWidth=500}},{key:"loadLang",value:function(){window.YP_RIDDLER_RESOURCE_LANG=yt({},window.YP_RIDDLER_RESOURCE_LANG);var t=yt({},r);if(this.langPack&&"{}"!==JSON.stringify(this.langPack))return window.YP_RIDDLER_RESOURCE_LANG.other=yt({},t,this.langPack),void(this.lang="other");this.lang?window.YP_RIDDLER_RESOURCE_LANG[this.lang]=o[this.lang]:window.YP_RIDDLER_RESOURCE_LANG[this.lang]=o["zh-cn"]}},{key:"createPublicCpts",value:function(r){var o=this;gt.a.get({NOT_AVAILABLE:"not available",ERROR:"error",EXCLUDED:"excluded"},function(t){var e=t.map(function(t){return t.value});o.fingerprint=gt.a.x64hash128(e.join(""),31),o.browserInfo=mt.getBrowserInfo();var n=o["build".concat(o.mode[0].toUpperCase()+o.mode.slice(1),"Mode")];n&&n.call(o,r);var i=document.createElement("div");i.className="yp-riddler-win-masker "+o.mode,o.mode===S&&i.addEventListener("click",function(t){t.stopPropagation(),"touchstart"!==window.EventObj.click&&t.preventDefault(),o.validator&&(o.hideUI(),o.onExit())}),r.appendChild(i),o.masker=i})}},{key:"showUI",value:function(t){var e=!(1<arguments.length&&void 0!==arguments[1])||arguments[1];this.masker.style.display="block",e&&this.validator.render(t)}},{key:"hideUI",value:function(){var t=this,e=!(0<arguments.length&&void 0!==arguments[0])||arguments[0];setTimeout(function(){t.masker.style.display="none",e&&t.validator.destroy()},500)}},{key:"getCaptcha",value:function(){var r=this;this.jsonpRequest("/jsonp/captcha/get",{browserInfo:this.browserInfo.filter(function(t){if("webql"!==t.key&&"canvas"!==t.key)return t}),nativeInfo:this.nativeInfo,additions:this.additions,options:{sdk:Tt,sdkBuildVersion:"1.5.0(2021080901)",hosts:this.HOSTS}},function(t){var e;if(t.code)r.onError&&r.onError(t);else if(t.data.type!==d){r.mode===s&&1===t.data.type&&(t.data.type=-1);var n=(e={},vt(e,u,C),vt(e,h,F),vt(e,c,$),vt(e,f,C),e)[t.data.type];r.token=t.data.token,r.logoOptions=yt({},t.data.logoOptions),r.waterMark=t.data.logoOptions.status;var i=function(){r.validator=new n(function(t){r.onSuccess(t,function(){return r.hideUI()},function(){var t=0<arguments.length&&void 0!==arguments[0]&&arguments[0];return r.injectSuccessBtn(t)}),r.token=null},function(){r.onError.apply(r,arguments),r.token=null},function(t,e,n){n||(r.getCaptcha(),r.token=null),r.onFail(t,e,function(){})},r.CONTAINER,function(){r.jsonpRequest.apply(r,arguments)},function(){return r.getCaptcha()},r.winWidth,r.APP_ID,r.waterMark,r.lang,r.logoOptions,r.mode)};r.validator?r.validator instanceof n||(r.hideUI(),i()):i(),r.showUI(t.data),0===r.drawIndex&&setTimeout(function(){r.drawIndex++,r.afterStart()},0)}else r.onSuccess(t.data,function(){},function(){var t=0<arguments.length&&void 0!==arguments[0]&&arguments[0];return r.injectSuccessBtn(t)})},this.onError)}},{key:"setCookie",value:function(){var t=mt.createUUid();mt.cookie.set("yp_riddler_id",t,356)}},{key:"init",value:function(){var e=this;this.loadLang(),this.retWidth(),mt.cookie.get("yp_riddler_id")||this.setCookie(),this.scrollTop=document.documentElement.scrollTop,this.CONTAINER.getElementsByClassName("yp-riddler")[0]&&(this.CONTAINER.innerHTML=""),setInterval(function(){e.cbManager.checkExpired()},500);window[this.JSONP_FIELD]=function(t){window[e.JSONP_FIELD].ret=null,e.cbManager.invoke(t.cb,t)};var t=document.createElement("div");t.className="yp-riddler yp-".concat(this.mode," ").concat(this.mode===a||this.NO_BUTTON||this.mode===s?"":"yp-riddler-button"),this.CONTAINER.appendChild(t),"static"===window.getComputedStyle(this.CONTAINER,null).position&&(this.CONTAINER.style.position="relative"),this.createPublicCpts(t)}}])&&bt(t.prototype,e),n&&bt(t,n),x}();n(20);window.YpRiddler=At;var Et={down:"mousedown",up:"mouseup",move:"mousemove",click:"click"},xt=i();"ontouchend"in document&&(Et={down:"touchstart",up:"touchend",move:"touchmove",click:"touchstart"}),xt.mobile&&"ontouchstart"in document.documentElement==!0&&(Et={down:"touchstart",up:"touchend",move:"touchmove",click:"touchstart"}),xt.mac&&"ontouchstart"in document.documentElement==!0&&(Et={down:"touchstart",up:"touchend",move:"touchmove",click:"touchstart"}),xt.iPad&&"ontouchstart"in document.documentElement==!1&&(Et={down:"mousedown",up:"mouseup",move:"mousemove",click:"click"}),xt.weixin&&xt.mobile&&(Et={down:"touchstart",up:"touchend",move:"touchmove",click:"touchstart"}),xt.fireFox&&-1<navigator.userAgent.indexOf("Mobile")&&(Et={down:"touchstart",up:"touchend",move:"touchmove",click:"touchstart"}),window.EventObj=Et}]);</script><style type="text/css">.yp-riddler {
DesignScreenshot/output/gitee_run/gitee.com_1_initial_page.html:4:},{debug:10,parseuri:42}],7:[function(e,t){function n(e){e=e||{},this.ms=e.min||100,this.max=e.max||1e4,this.factor=e.factor||2,this.jitter=e.jitter>0&&e.jitter<=1?e.jitter:0,this.attempts=0}t.exports=n,n.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=0==(1&Math.floor(10*t))?e-n:e+n}return 0|Math.min(e,this.max)},n.prototype.reset=function(){this.attempts=0},n.prototype.setMin=function(e){this.ms=e},n.prototype.setMax=function(e){this.max=e},n.prototype.setJitter=function(e){this.jitter=e}},{}],8:[function(e,t){var n=[].slice;t.exports=function(e,t){if("string"==typeof t&&(t=e[t]),"function"!=typeof t)throw new Error("bind() requires a function");var o=n.call(arguments,2);return function(){return t.apply(e,o.concat(n.call(arguments)))}}},{}],9:[function(e,t){function n(e){return e?o(e):void 0}function o(e){for(var t in n.prototype)e[t]=n.prototype[t];return e}t.exports=n,n.prototype.on=n.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks[e]=this._callbacks[e]||[]).push(t),this},n.prototype.once=function(e,t){function n(){o.off(e,n),t.apply(this,arguments)}var o=this;return this._callbacks=this._callbacks||{},n.fn=t,this.on(e,n),this},n.prototype.off=n.prototype.removeListener=n.prototype.removeAllListeners=n.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var n=this._callbacks[e];if(!n)return this;if(1==arguments.length)return delete this._callbacks[e],this;for(var o,i=0;i<n.length;i++)if(o=n[i],o===t||o.fn===t){n.splice(i,1);break}return this},n.prototype.emit=function(e){this._callbacks=this._callbacks||{};var t=[].slice.call(arguments,1),n=this._callbacks[e];if(n){n=n.slice(0);for(var o=0,i=n.length;i>o;++o)n[o].apply(this,t)}return this},n.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks[e]||[]},n.prototype.hasListeners=function(e){return!!this.listeners(e).length}},{}],10:[function(e,t){function n(e){return n.enabled(e)?function(t){t=o(t);var i=new Date,r=i-(n[e]||i);n[e]=i,t=e+" "+t+" +"+n.humanize(r),window.console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}:function(){}}function o(e){return e instanceof Error?e.stack||e.message:e}t.exports=n,n.names=[],n.skips=[],n.enable=function(e){try{localStorage.debug=e}catch(t){}for(var o=(e||"").split(/[\s,]+/),i=o.length,r=0;i>r;r++)e=o[r].replace("*",".*?"),"-"===e[0]?n.skips.push(new RegExp("^"+e.substr(1)+"$")):n.names.push(new RegExp("^"+e+"$"))},n.disable=function(){n.enable("")},n.humanize=function(e){var t=1e3,n=6e4,o=60*n;return e>=o?(e/o).toFixed(1)+"h":e>=n?(e/n).toFixed(1)+"m":e>=t?(e/t|0)+"s":e+"ms"},n.enabled=function(e){for(var t=0,o=n.skips.length;o>t;t++)if(n.skips[t].test(e))return!1;for(var t=0,o=n.names.length;o>t;t++)if(n.names[t].test(e))return!0;return!1};try{window.localStorage&&n.enable(localStorage.debug)}catch(i){}},{}],11:[function(e,t){t.exports=e("./lib/")},{"./lib/":12}],12:[function(e,t){t.exports=e("./socket"),t.exports.parser=e("engine.io-parser")},{"./socket":13,"engine.io-parser":25}],13:[function(e,t){(function(n){function o(e,t){if(!(this instanceof o))return new o(e,t);if(t=t||{},e&&"object"==typeof e&&(t=e,e=null),e&&(e=u(e),t.host=e.host,t.secure="https"==e.protocol||"wss"==e.protocol,t.port=e.port,e.query&&(t.query=e.query)),this.secure=null!=t.secure?t.secure:n.location&&"https:"==location.protocol,t.host){var i=t.host.split(":");t.hostname=i.shift(),i.length?t.port=i.pop():t.port||(t.port=this.secure?"443":"80")}this.agent=t.agent||!1,this.hostname=t.hostname||(n.location?location.hostname:"localhost"),this.port=t.port||(n.location&&location.port?location.port:this.secure?443:80),this.query=t.query||{},"string"==typeof this.query&&(this.query=f.decode(this.query)),this.upgrade=!1!==t.upgrade,this.path=(t.path||"/engine.io").replace(/\/$/,"")+"/",this.forceJSONP=!!t.forceJSONP,this.jsonp=!1!==t.jsonp,this.forceBase64=!!t.forceBase64,this.enablesXDR=!!t.enablesXDR,this.timestampParam=t.timestampParam||"t",this.timestampRequests=t.timestampRequests,this.transports=t.transports||["polling","websocket"],this.readyState="",this.writeBuffer=[],this.callbackBuffer=[],this.policyPort=t.policyPort||843,this.rememberUpgrade=t.rememberUpgrade||!1,this.binaryType=null,this.onlyBinaryUpgrades=t.onlyBinaryUpgrades,this.pfx=t.pfx||null,this.key=t.key||null,this.passphrase=t.passphrase||null,this.cert=t.cert||null,this.ca=t.ca||null,this.ciphers=t.ciphers||null,this.rejectUnauthorized=t.rejectUnauthorized||null,this.open()}function i(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}var r=e("./transports"),a=e("component-emitter"),s=e("debug")("engine.io-client:socket"),c=e("indexof"),l=e("engine.io-parser"),u=e("parseuri"),p=e("parsejson"),f=e("parseqs");t.exports=o,o.priorWebsocketSuccess=!1,a(o.prototype),o.protocol=l.protocol,o.Socket=o,o.Transport=e("./transport"),o.transports=e("./transports"),o.parser=e("engine.io-parser"),o.prototype.createTransport=function(e){s('creating transport "%s"',e);var t=i(this.query);t.EIO=l.protocol,t.transport=e,this.id&&(t.sid=this.id);var n=new r[e]({agent:this.agent,hostname:this.hostname,port:this.port,secure:this.secure,path:this.path,query:t,forceJSONP:this.forceJSONP,jsonp:this.jsonp,forceBase64:this.forceBase64,enablesXDR:this.enablesXDR,timestampRequests:this.timestampRequests,timestampParam:this.timestampParam,policyPort:this.policyPort,socket:this,pfx:this.pfx,key:this.key,passphrase:this.passphrase,cert:this.cert,ca:this.ca,ciphers:this.ciphers,rejectUnauthorized:this.rejectUnauthorized});return n},o.prototype.open=function(){var e;if(this.rememberUpgrade&&o.priorWebsocketSuccess&&-1!=this.transports.indexOf("websocket"))e="websocket";else{if(0==this.transports.length){var t=this;return void setTimeout(function(){t.emit("error","No transports available")},0)}e=this.transports[0]}this.readyState="opening";var e;try{e=this.createTransport(e)}catch(n){return this.transports.shift(),void this.open()}e.open(),this.setTransport(e)},o.prototype.setTransport=function(e){s("setting transport %s",e.name);var t=this;this.transport&&(s("clearing existing transport %s",this.transport.name),this.transport.removeAllListeners()),this.transport=e,e.on("drain",function(){t.onDrain()}).on("packet",function(e){t.onPacket(e)}).on("error",function(e){t.onError(e)}).on("close",function(){t.onClose("transport close")})},o.prototype.probe=function(e){function t(){if(f.onlyBinaryUpgrades){var t=!this.supportsBinary&&f.transport.supportsBinary;p=p||t}p||(s('probe transport "%s" opened',e),u.send([{type:"ping",data:"probe"}]),u.once("packet",function(t){if(!p)if("pong"==t.type&&"probe"==t.data){if(s('probe transport "%s" pong',e),f.upgrading=!0,f.emit("upgrading",u),!u)return;o.priorWebsocketSuccess="websocket"==u.name,s('pausing current transport "%s"',f.transport.name),f.transport.pause(function(){p||"closed"!=f.readyState&&(s("changing transport and sending upgrade packet"),l(),f.setTransport(u),u.send([{type:"upgrade"}]),f.emit("upgrade",u),u=null,f.upgrading=!1,f.flush())})}else{s('probe transport "%s" failed',e);var n=new Error("probe error");n.transport=u.name,f.emit("upgradeError",n)}}))}function n(){p||(p=!0,l(),u.close(),u=null)}function i(t){var o=new Error("probe error: "+t);o.transport=u.name,n(),s('probe transport "%s" failed because of error: %s',e,t),f.emit("upgradeError",o)}function r(){i("transport closed")}function a(){i("socket closed")}function c(e){u&&e.name!=u.name&&(s('"%s" works - aborting "%s"',e.name,u.name),n())}function l(){u.removeListener("open",t),u.removeListener("error",i),u.removeListener("close",r),f.removeListener("close",a),f.removeListener("upgrading",c)}s('probing transport "%s"',e);var u=this.createTransport(e,{probe:1}),p=!1,f=this;o.priorWebsocketSuccess=!1,u.once("open",t),u.once("error",i),u.once("close",r),this.once("close",a),this.once("upgrading",c),u.open()},o.prototype.onOpen=function(){if(s("socket open"),this.readyState="open",o.priorWebsocketSuccess="websocket"==this.transport.name,this.emit("open"),this.flush(),"open"==this.readyState&&this.upgrade&&this.transport.pause){s("starting upgrade probes");for(var e=0,t=this.upgrades.length;t>e;e++)this.probe(this.upgrades[e])}},o.prototype.onPacket=function(e){if("opening"==this.readyState||"open"==this.readyState)switch(s('socket receive: type "%s", data "%s"',e.type,e.data),this.emit("packet",e),this.emit("heartbeat"),e.type){case"open":this.onHandshake(p(e.data));break;case"pong":this.setPing();break;case"error":var t=new Error("server error");t.code=e.data,this.emit("error",t);break;case"message":this.emit("data",e.data),this.emit("message",e.data)}else s('packet received with socket readyState "%s"',this.readyState)},o.prototype.onHandshake=function(e){this.emit("handshake",e),this.id=e.sid,this.transport.query.sid=e.sid,this.upgrades=this.filterUpgrades(e.upgrades),this.pingInterval=e.pingInterval,this.pingTimeout=e.pingTimeout,this.onOpen(),"closed"!=this.readyState&&(this.setPing(),this.removeListener("heartbeat",this.onHeartbeat),this.on("heartbeat",this.onHeartbeat))},o.prototype.onHeartbeat=function(e){clearTimeout(this.pingTimeoutTimer);var t=this;t.pingTimeoutTimer=setTimeout(function(){"closed"!=t.readyState&&t.onClose("ping timeout")},e||t.pingInterval+t.pingTimeout)},o.prototype.setPing=function(){var e=this;clearTimeout(e.pingIntervalTimer),e.pingIntervalTimer=setTimeout(function(){s("writing ping packet - expecting pong within %sms",e.pingTimeout),e.ping(),e.onHeartbeat(e.pingTimeout)},e.pingInterval)},o.prototype.ping=function(){this.sendPacket("ping")},o.prototype.onDrain=function(){for(var e=0;e<this.prevBufferLen;e++)this.callbackBuffer[e]&&this.callbackBuffer[e]();this.writeBuffer.splice(0,this.prevBufferLen),this.callbackBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,0==this.writeBuffer.length?this.emit("drain"):this.flush()},o.prototype.flush=function(){"closed"!=this.readyState&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length&&(s("flushing %d packets in socket",this.writeBuffer.length),this.transport.send(this.writeBuffer),this.prevBufferLen=this.writeBuffer.length,this.emit("flush"))},o.prototype.write=o.prototype.send=function(e,t){return this.sendPacket("message",e,t),this},o.prototype.sendPacket=function(e,t,n){if("closing"!=this.readyState&&"closed"!=this.readyState){var o={type:e,data:t};this.emit("packetCreate",o),this.writeBuffer.push(o),this.callbackBuffer.push(n),this.flush()}},o.prototype.close=function(){function e(){o.onClose("forced close"),s("socket closing - telling transport to close"),o.transport.close()}function t(){o.removeListener("upgrade",t),o.removeListener("upgradeError",t),e()}function n(){o.once("upgrade",t),o.once("upgradeError",t)}if("opening"==this.readyState||"open"==this.readyState){this.readyState="closing";var o=this;this.writeBuffer.length?this.once("drain",function(){this.upgrading?n():e()}):this.upgrading?n():e()}return this},o.prototype.onError=function(e){s("socket error %j",e),o.priorWebsocketSuccess=!1,this.emit("error",e),this.onClose("transport error",e)},o.prototype.onClose=function(e,t){if("opening"==this.readyState||"open"==this.readyState||"closing"==this.readyState){s('socket close with reason: "%s"',e);var n=this;clearTimeout(this.pingIntervalTimer),clearTimeout(this.pingTimeoutTimer),setTimeout(function(){n.writeBuffer=[],n.callbackBuffer=[],n.prevBufferLen=0},0),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),this.readyState="closed",this.id=null,this.emit("close",e,t)}},o.prototype.filterUpgrades=function(e){for(var t=[],n=0,o=e.length;o>n;n++)~c(this.transports,e[n])&&t.push(e[n]);return t}}).call(this,"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./transport":14,"./transports":15,"component-emitter":9,debug:22,"engine.io-parser":25,indexof:40,parsejson:32,parseqs:33,parseuri:34}],14:[function(e,t){function n(e){this.path=e.path,this.hostname=e.hostname,this.port=e.port,this.secure=e.secure,this.query=e.query,this.timestampParam=e.timestampParam,this.timestampRequests=e.timestampRequests,this.readyState="",this.agent=e.agent||!1,this.socket=e.socket,this.enablesXDR=e.enablesXDR,this.pfx=e.pfx,this.key=e.key,this.passphrase=e.passphrase,this.cert=e.cert,this.ca=e.ca,this.ciphers=e.ciphers,this.rejectUnauthorized=e.rejectUnauthorized}var o=e("engine.io-parser"),i=e("component-emitter");t.exports=n,i(n.prototype),n.timestamps=0,n.prototype.onError=function(e,t){var n=new Error(e);return n.type="TransportError",n.description=t,this.emit("error",n),this},n.prototype.open=function(){return("closed"==this.readyState||""==this.readyState)&&(this.readyState="opening",this.doOpen()),this},n.prototype.close=function(){return("opening"==this.readyState||"open"==this.readyState)&&(this.doClose(),this.onClose()),this},n.prototype.send=function(e){if("open"!=this.readyState)throw new Error("Transport not open");this.write(e)},n.prototype.onOpen=function(){this.readyState="open",this.writable=!0,this.emit("open")},n.prototype.onData=function(e){var t=o.decodePacket(e,this.socket.binaryType);this.onPacket(t)},n.prototype.onPacket=function(e){this.emit("packet",e)},n.prototype.onClose=function(){this.readyState="closed",this.emit("close")}},{"component-emitter":9,"engine.io-parser":25}],15:[function(e,t,n){(function(t){function o(e){var n,o=!1,s=!1,c=!1!==e.jsonp;if(t.location){var l="https:"==location.protocol,u=location.port;u||(u=l?443:80),o=e.hostname!=location.hostname||u!=e.port,s=e.secure!=l}if(e.xdomain=o,e.xscheme=s,n=new i(e),"open"in n&&!e.forceJSONP)return new r(e);if(!c)throw new Error("JSONP disabled");return new a(e)}var i=e("xmlhttprequest"),r=e("./polling-xhr"),a=e("./polling-jsonp"),s=e("./websocket");n.polling=o,n.websocket=s}).call(this,"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./polling-jsonp":16,"./polling-xhr":17,"./websocket":19,xmlhttprequest:20}],16:[function(e,t){(function(n){function o(){}function i(e){r.call(this,e),this.query=this.query||{},s||(n.___eio||(n.___eio=[]),s=n.___eio),this.index=s.length;var t=this;s.push(function(e){t.onData(e)}),this.query.j=this.index,n.document&&n.addEventListener&&n.addEventListener("beforeunload",function(){t.script&&(t.script.onerror=o)},!1)}var r=e("./polling"),a=e("component-inherit");t.exports=i;var s,c=/\n/g,l=/\\n/g;a(i,r),i.prototype.supportsBinary=!1,i.prototype.doClose=function(){this.script&&(this.script.parentNode.removeChild(this.script),this.script=null),this.form&&(this.form.parentNode.removeChild(this.form),this.form=null,this.iframe=null),r.prototype.doClose.call(this)},i.prototype.doPoll=function(){var e=this,t=document.createElement("script");this.script&&(this.script.parentNode.removeChild(this.script),this.script=null),t.async=!0,t.src=this.uri(),t.onerror=function(t){e.onError("jsonp poll error",t)};var n=document.getElementsByTagName("script")[0];n.parentNode.insertBefore(t,n),this.script=t;var o="undefined"!=typeof navigator&&/gecko/i.test(navigator.userAgent);o&&setTimeout(function(){var e=document.createElement("iframe");document.body.appendChild(e),document.body.removeChild(e)},100)},i.prototype.doWrite=function(e,t){function n(){o(),t()}function o(){if(i.iframe)try{i.form.removeChild(i.iframe)}catch(e){i.onError("jsonp polling iframe removal error",e)}try{var t='<iframe src="javascript:0" name="'+i.iframeId+'">';r=document.createElement(t)}catch(e){r=document.createElement("iframe"),r.name=i.iframeId,r.src="javascript:0"}r.id=i.iframeId,i.form.appendChild(r),i.iframe=r}var i=this;if(!this.form){var r,a=document.createElement("form"),s=document.createElement("textarea"),u=this.iframeId="eio_iframe_"+this.index;a.className="socketio",a.style.position="absolute",a.style.top="-1000px",a.style.left="-1000px",a.target=u,a.method="POST",a.setAttribute("accept-charset","utf-8"),s.name="d",a.appendChild(s),document.body.appendChild(a),this.form=a,this.area=s}this.form.action=this.uri(),o(),e=e.replace(l,"\\\n"),this.area.value=e.replace(c,"\\n");try{this.form.submit()}catch(p){}this.iframe.attachEvent?this.iframe.onreadystatechange=function(){"complete"==i.iframe.readyState&&n()}:this.iframe.onload=n}}).call(this,"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./polling":18,"component-inherit":21}],17:[function(e,t){(function(n){function o(){}function i(e){if(c.call(this,e),n.location){var t="https:"==location.protocol,o=location.port;o||(o=t?443:80),this.xd=e.hostname!=n.location.hostname||o!=e.port,this.xs=e.secure!=t}}function r(e){this.method=e.method||"GET",this.uri=e.uri,this.xd=!!e.xd,this.xs=!!e.xs,this.async=!1!==e.async,this.data=void 0!=e.data?e.data:null,this.agent=e.agent,this.isBinary=e.isBinary,this.supportsBinary=e.supportsBinary,this.enablesXDR=e.enablesXDR,this.pfx=e.pfx,this.key=e.key,this.passphrase=e.passphrase,this.cert=e.cert,this.ca=e.ca,this.ciphers=e.ciphers,this.rejectUnauthorized=e.rejectUnauthorized,this.create()}function a(){for(var e in r.requests)r.requests.hasOwnProperty(e)&&r.requests[e].abort()}var s=e("xmlhttprequest"),c=e("./polling"),l=e("component-emitter"),u=e("component-inherit"),p=e("debug")("engine.io-client:polling-xhr");t.exports=i,t.exports.Request=r,u(i,c),i.prototype.supportsBinary=!0,i.prototype.request=function(e){return e=e||{},e.uri=this.uri(),e.xd=this.xd,e.xs=this.xs,e.agent=this.agent||!1,e.supportsBinary=this.supportsBinary,e.enablesXDR=this.enablesXDR,e.pfx=this.pfx,e.key=this.key,e.passphrase=this.passphrase,e.cert=this.cert,e.ca=this.ca,e.ciphers=this.ciphers,e.rejectUnauthorized=this.rejectUnauthorized,new r(e)},i.prototype.doWrite=function(e,t){var n="string"!=typeof e&&void 0!==e,o=this.request({method:"POST",data:e,isBinary:n}),i=this;o.on("success",t),o.on("error",function(e){i.onError("xhr post error",e)}),this.sendXhr=o},i.prototype.doPoll=function(){p("xhr poll");var e=this.request(),t=this;e.on("data",function(e){t.onData(e)}),e.on("error",function(e){t.onError("xhr poll error",e)}),this.pollXhr=e},l(r.prototype),r.prototype.create=function(){var e={agent:this.agent,xdomain:this.xd,xscheme:this.xs,enablesXDR:this.enablesXDR};e.pfx=this.pfx,e.key=this.key,e.passphrase=this.passphrase,e.cert=this.cert,e.ca=this.ca,e.ciphers=this.ciphers,e.rejectUnauthorized=this.rejectUnauthorized;var t=this.xhr=new s(e),o=this;try{if(p("xhr open %s: %s",this.method,this.uri),t.open(this.method,this.uri,this.async),this.supportsBinary&&(t.responseType="arraybuffer"),"POST"==this.method)try{this.isBinary?t.setRequestHeader("Content-type","application/octet-stream"):t.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(i){}"withCredentials"in t&&(t.withCredentials=!0),this.hasXDR()?(t.onload=function(){o.onLoad()},t.onerror=function(){o.onError(t.responseText)}):t.onreadystatechange=function(){4==t.readyState&&(200==t.status||1223==t.status?o.onLoad():setTimeout(function(){o.onError(t.status)},0))},p("xhr data %s",this.data),t.send(this.data)}catch(i){return void setTimeout(function(){o.onError(i)},0)}n.document&&(this.index=r.requestsCount++,r.requests[this.index]=this)},r.prototype.onSuccess=function(){this.emit("success"),this.cleanup()},r.prototype.onData=function(e){this.emit("data",e),this.onSuccess()},r.prototype.onError=function(e){this.emit("error",e),this.cleanup(!0)},r.prototype.cleanup=function(e){if("undefined"!=typeof this.xhr&&null!==this.xhr){if(this.hasXDR()?this.xhr.onload=this.xhr.onerror=o:this.xhr.onreadystatechange=o,e)try{this.xhr.abort()}catch(t){}n.document&&delete r.requests[this.index],this.xhr=null}},r.prototype.onLoad=function(){var e;try{var t;try{t=this.xhr.getResponseHeader("Content-Type").split(";")[0]}catch(n){}e="application/octet-stream"===t?this.xhr.response:this.supportsBinary?"ok":this.xhr.responseText}catch(n){this.onError(n)}null!=e&&this.onData(e)},r.prototype.hasXDR=function(){return"undefined"!=typeof n.XDomainRequest&&!this.xs&&this.enablesXDR},r.prototype.abort=function(){this.cleanup()},n.document&&(r.requestsCount=0,r.requests={},n.attachEvent?n.attachEvent("onunload",a):n.addEventListener&&n.addEventListener("beforeunload",a,!1))}).call(this,"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./polling":18,"component-emitter":9,"component-inherit":21,debug:22,xmlhttprequest:20}],18:[function(e,t){function n(e){var t=e&&e.forceBase64;(!c||t)&&(this.supportsBinary=!1),o.call(this,e)}var o=e("../transport"),i=e("parseqs"),r=e("engine.io-parser"),a=e("component-inherit"),s=e("debug")("engine.io-client:polling");t.exports=n;var c=function(){var t=e("xmlhttprequest"),n=new t({xdomain:!1});return null!=n.responseType}();a(n,o),n.prototype.name="polling",n.prototype.doOpen=function(){this.poll()},n.prototype.pause=function(e){function t(){s("paused"),n.readyState="paused",e()}var n=this;if(this.readyState="pausing",this.polling||!this.writable){var o=0;this.polling&&(s("we are currently polling - waiting to pause"),o++,this.once("pollComplete",function(){s("pre-pause polling complete"),--o||t()})),this.writable||(s("we are currently writing - waiting to pause"),o++,this.once("drain",function(){s("pre-pause writing complete"),--o||t()}))}else t()},n.prototype.poll=function(){s("polling"),this.polling=!0,this.doPoll(),this.emit("poll")},n.prototype.onData=function(e){var t=this;s("polling got data %s",e);var n=function(e){return"opening"==t.readyState&&t.onOpen(),"close"==e.type?(t.onClose(),!1):void t.onPacket(e)};r.decodePayload(e,this.socket.binaryType,n),"closed"!=this.readyState&&(this.polling=!1,this.emit("pollComplete"),"open"==this.readyState?this.poll():s('ignoring poll - transport state "%s"',this.readyState))},n.prototype.doClose=function(){function e(){s("writing close packet"),t.write([{type:"close"}])}var t=this;"open"==this.readyState?(s("transport open - closing"),e()):(s("transport not open - deferring close"),this.once("open",e))},n.prototype.write=function(e){var t=this;this.writable=!1;var n=function(){t.writable=!0,t.emit("drain")},t=this;r.encodePayload(e,this.supportsBinary,function(e){t.doWrite(e,n)})},n.prototype.uri=function(){var e=this.query||{},t=this.secure?"https":"http",n="";return!1!==this.timestampRequests&&(e[this.timestampParam]=+new Date+"-"+o.timestamps++),this.supportsBinary||e.sid||(e.b64=1),e=i.encode(e),this.port&&("https"==t&&443!=this.port||"http"==t&&80!=this.port)&&(n=":"+this.port),e.length&&(e="?"+e),t+"://"+this.hostname+n+this.path+e}},{"../transport":14,"component-inherit":21,debug:22,"engine.io-parser":25,parseqs:33,xmlhttprequest:20}],19:[function(e,t){function n(e){var t=e&&e.forceBase64;t&&(this.supportsBinary=!1),o.call(this,e)}var o=e("../transport"),i=e("engine.io-parser"),r=e("parseqs"),a=e("component-inherit"),s=e("debug")("engine.io-client:websocket"),c=e("ws");t.exports=n,a(n,o),n.prototype.name="websocket",n.prototype.supportsBinary=!0,n.prototype.doOpen=function(){if(this.check()){var e=this.uri(),t=void 0,n={agent:this.agent};n.pfx=this.pfx,n.key=this.key,n.passphrase=this.passphrase,n.cert=this.cert,n.ca=this.ca,n.ciphers=this.ciphers,n.rejectUnauthorized=this.rejectUnauthorized,this.ws=new c(e,t,n),void 0===this.ws.binaryType&&(this.supportsBinary=!1),this.ws.binaryType="arraybuffer",this.addEventListeners()}},n.prototype.addEventListeners=function(){var e=this;this.ws.onopen=function(){e.onOpen()},this.ws.onclose=function(){e.onClose()},this.ws.onmessage=function(t){e.onData(t.data)},this.ws.onerror=function(t){e.onError("websocket error",t)}},"undefined"!=typeof navigator&&/iPad|iPhone|iPod/i.test(navigator.userAgent)&&(n.prototype.onData=function(e){var t=this;setTimeout(function(){o.prototype.onData.call(t,e)},0)}),n.prototype.write=function(e){function t(){n.writable=!0,n.emit("drain")}var n=this;this.writable=!1;for(var o=0,r=e.length;r>o;o++)i.encodePacket(e[o],this.supportsBinary,function(e){try{n.ws.send(e)}catch(t){s("websocket closed before onclose event")}});setTimeout(t,0)},n.prototype.onClose=function(){o.prototype.onClose.call(this)},n.prototype.doClose=function(){"undefined"!=typeof this.ws&&this.ws.close()},n.prototype.uri=function(){var e=this.query||{},t=this.secure?"wss":"ws",n="";return this.port&&("wss"==t&&443!=this.port||"ws"==t&&80!=this.port)&&(n=":"+this.port),this.timestampRequests&&(e[this.timestampParam]=+new Date),this.supportsBinary||(e.b64=1),e=r.encode(e),e.length&&(e="?"+e),t+"://"+this.hostname+n+this.path+e},n.prototype.check=function(){return!(!c||"__initialize"in c&&this.name===n.prototype.name)}},{"../transport":14,"component-inherit":21,debug:22,"engine.io-parser":25,parseqs:33,ws:35}],20:[function(e,t){var n=e("has-cors");t.exports=function(e){var t=e.xdomain,o=e.xscheme,i=e.enablesXDR;try{if("undefined"!=typeof XMLHttpRequest&&(!t||n))return new XMLHttpRequest}catch(r){}try{if("undefined"!=typeof XDomainRequest&&!o&&i)return new XDomainRequest}catch(r){}if(!t)try{return new ActiveXObject("Microsoft.XMLHTTP")}catch(r){}}},{"has-cors":38}],21:[function(e,t){t.exports=function(e,t){var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},{}],22:[function(e,t,n){function o(){return"WebkitAppearance"in document.documentElement.style||window.console&&(console.firebug||console.exception&&console.table)||navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31}function i(){var e=arguments,t=this.useColors;if(e[0]=(t?"%c":"")+this.namespace+(t?" %c":" ")+e[0]+(t?"%c ":" ")+"+"+n.humanize(this.diff),!t)return e;var o="color: "+this.color;e=[e[0],o,"color: inherit"].concat(Array.prototype.slice.call(e,1));var i=0,r=0;return e[0].replace(/%[a-z%]/g,function(e){"%%"!==e&&(i++,"%c"===e&&(r=i))}),e.splice(r,0,o),e}function r(){return"object"==typeof console&&"function"==typeof console.log&&Function.prototype.apply.call(console.log,console,arguments)}function a(e){try{null==e?localStorage.removeItem("debug"):localStorage.debug=e}catch(t){}}function s(){var e;try{e=localStorage.debug}catch(t){}return e}n=t.exports=e("./debug"),n.log=r,n.formatArgs=i,n.save=a,n.load=s,n.useColors=o,n.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],n.formatters.j=function(e){return JSON.stringify(e)},n.enable(s())},{"./debug":23}],23:[function(e,t,n){function o(){return n.colors[u++%n.colors.length]}function i(e){function t(){}function i(){var e=i,t=+new Date,r=t-(l||t);e.diff=r,e.prev=l,e.curr=t,l=t,null==e.useColors&&(e.useColors=n.useColors()),null==e.color&&e.useColors&&(e.color=o());var a=Array.prototype.slice.call(arguments);a[0]=n.coerce(a[0]),"string"!=typeof a[0]&&(a=["%o"].concat(a));var s=0;a[0]=a[0].replace(/%([a-z%])/g,function(t,o){if("%%"===t)return t;s++;var i=n.formatters[o];if("function"==typeof i){var r=a[s];t=i.call(e,r),a.splice(s,1),s--}return t}),"function"==typeof n.formatArgs&&(a=n.formatArgs.apply(e,a));var c=i.log||n.log||void 0;c.apply(e,a)}t.enabled=!1,i.enabled=!0;var r=n.enabled(e)?i:t;return r.namespace=e,r}function r(e){n.save(e);for(var t=(e||"").split(/[\s,]+/),o=t.length,i=0;o>i;i++)t[i]&&(e=t[i].replace(/\*/g,".*?"),"-"===e[0]?n.skips.push(new RegExp("^"+e.substr(1)+"$")):n.names.push(new RegExp("^"+e+"$")))}function a(){n.enable("")}function s(e){var t,o;for(t=0,o=n.skips.length;o>t;t++)if(n.skips[t].test(e))return!1;for(t=0,o=n.names.length;o>t;t++)if(n.names[t].test(e))return!0;return!1}function c(e){return e instanceof Error?e.stack||e.message:e}n=t.exports=i,n.coerce=c,n.disable=a,n.enable=r,n.enabled=s,n.humanize=e("ms"),n.names=[],n.skips=[],n.formatters={};var l,u=0},{ms:24}],24:[function(e,t){function n(e){var t=/^((?:\d+)?\.?\d+) *(ms|seconds?|s|minutes?|m|hours?|h|days?|d|years?|y)?$/i.exec(e);if(t){var n=parseFloat(t[1]),o=(t[2]||"ms").toLowerCase();switch(o){case"years":case"year":case"y":return n*u;case"days":case"day":case"d":return n*l;case"hours":case"hour":case"h":return n*c;case"minutes":case"minute":case"m":return n*s;case"seconds":case"second":case"s":return n*a;case"ms":return n}}}function o(e){return e>=l?Math.round(e/l)+"d":e>=c?Math.round(e/c)+"h":e>=s?Math.round(e/s)+"m":e>=a?Math.round(e/a)+"s":e+"ms"}function i(e){return r(e,l,"day")||r(e,c,"hour")||r(e,s,"minute")||r(e,a,"second")||e+" ms"}function r(e,t,n){return t>e?void 0:1.5*t>e?Math.floor(e/t)+" "+n:Math.ceil(e/t)+" "+n+"s"}var a=1e3,s=60*a,c=60*s,l=24*c,u=365.25*l;t.exports=function(e,t){return t=t||{},"string"==typeof e?n(e):t["long"]?i(e):o(e)}},{}],25:[function(e,t,n){(function(t){function o(e,t){var o="b"+n.packets[e.type]+e.data.data;return t(o)}function i(e,t,o){if(!t)return n.encodeBase64Packet(e,o);var i=e.data,r=new Uint8Array(i),a=new Uint8Array(1+i.byteLength);a[0]=y[e.type];for(var s=0;s<r.length;s++)a[s+1]=r[s];return o(a.buffer)}function r(e,t,o){if(!t)return n.encodeBase64Packet(e,o);var i=new FileReader;return i.onload=function(){e.data=i.result,n.encodePacket(e,t,!0,o)},i.readAsArrayBuffer(e.data)}function a(e,t,o){if(!t)return n.encodeBase64Packet(e,o);if(m)return r(e,t,o);var i=new Uint8Array(1);i[0]=y[e.type];var a=new k([i.buffer,e.data]);return o(a)}function s(e,t,n){for(var o=new Array(e.length),i=f(e.length,n),r=function(e,n,i){t(n,function(t,n){o[e]=n,i(t,o)})},a=0;a<e.length;a++)r(a,e[a],i)}var c=e("./keys"),l=e("has-binary"),u=e("arraybuffer.slice"),p=e("base64-arraybuffer"),f=e("after"),h=e("utf8"),d=navigator.userAgent.match(/Android/i),g=/PhantomJS/i.test(navigator.userAgent),m=d||g;n.protocol=3;var y=n.packets={open:0,close:1,ping:2,pong:3,message:4,upgrade:5,noop:6},v=c(y),b={type:"error",data:"parser error"},k=e("blob");n.encodePacket=function(e,n,r,s){"function"==typeof n&&(s=n,n=!1),"function"==typeof r&&(s=r,r=null);var c=void 0===e.data?void 0:e.data.buffer||e.data;if(t.ArrayBuffer&&c instanceof ArrayBuffer)return i(e,n,s);if(k&&c instanceof t.Blob)return a(e,n,s);if(c&&c.base64)return o(e,s);var l=y[e.type];return void 0!==e.data&&(l+=r?h.encode(String(e.data)):String(e.data)),s(""+l)},n.encodeBase64Packet=function(e,o){var i="b"+n.packets[e.type];if(k&&e.data instanceof k){var r=new FileReader;return r.onload=function(){var e=r.result.split(",")[1];o(i+e)},r.readAsDataURL(e.data)}var a;try{a=String.fromCharCode.apply(null,new Uint8Array(e.data))}catch(s){for(var c=new Uint8Array(e.data),l=new Array(c.length),u=0;u<c.length;u++)l[u]=c[u];a=String.fromCharCode.apply(null,l)}return i+=t.btoa(a),o(i)},n.decodePacket=function(e,t,o){if("string"==typeof e||void 0===e){if("b"==e.charAt(0))return n.decodeBase64Packet(e.substr(1),t);if(o)try{e=h.decode(e)}catch(i){return b}var r=e.charAt(0);return Number(r)==r&&v[r]?e.length>1?{type:v[r],data:e.substring(1)}:{type:v[r]}:b}var a=new Uint8Array(e),r=a[0],s=u(e,1);return k&&"blob"===t&&(s=new k([s])),{type:v[r],data:s}},n.decodeBase64Packet=function(e,n){var o=v[e.charAt(0)];if(!t.ArrayBuffer)return{type:o,data:{base64:!0,data:e.substr(1)}};var i=p.decode(e.substr(1));return"blob"===n&&k&&(i=new k([i])),{type:o,data:i}},n.encodePayload=function(e,t,o){function i(e){return e.length+":"+e}function r(e,o){n.encodePacket(e,!!a&&t,!0,function(e){o(null,i(e))})}"function"==typeof t&&(o=t,t=null);var a=l(e);return t&&a?k&&!m?n.encodePayloadAsBlob(e,o):n.encodePayloadAsArrayBuffer(e,o):e.length?void s(e,r,function(e,t){return o(t.join(""))}):o("0:")},n.decodePayload=function(e,t,o){if("string"!=typeof e)return n.decodePayloadAsBinary(e,t,o);"function"==typeof t&&(o=t,t=null);var i;if(""==e)return o(b,0,1);for(var r,a,s="",c=0,l=e.length;l>c;c++){var u=e.charAt(c);if(":"!=u)s+=u;else{if(""==s||s!=(r=Number(s)))return o(b,0,1);if(a=e.substr(c+1,r),s!=a.length)return o(b,0,1);if(a.length){if(i=n.decodePacket(a,t,!0),b.type==i.type&&b.data==i.data)return o(b,0,1);var p=o(i,c+r,l);if(!1===p)return}c+=r,s=""}}return""!=s?o(b,0,1):void 0},n.encodePayloadAsArrayBuffer=function(e,t){function o(e,t){
DesignScreenshot/output/gitee_run/gitee.com_1_initial_page.html:6:Z.group_id&&(n+="&group_id="+Z.group_id),Z.agent_id&&(n+="&agent_id="+Z.agent_id),Re.jsonp(n,function(t){t=t||{},e&&e(t.chatting)})}function D(e){Fe.eachPushFn(e),Re.extend(Z,e),h(Z),le||Le.opened||(ce=!1),Le.loadSrc(),ke&&"function"==typeof e.onReady&&e.onReady()}function z(){var t="不能为空",n=function(e){},o=function(e){e=e||{};var o=e.type,i=e.data,r=Z.customer||{};if(!i)return void n("data"+t);switch(o){case"product":return{url:X+"vistor_data_trace",data:{key:Q,code:Z.code,type:o,data:encodeURIComponent(JSON.stringify(i))},valid:function(){var e=[];return Ie.config.behavior_trace?(!i.name&&e.push("商品名称:"+t),!e.length||(n(e.join("、")),!1)):(n("未开通商品浏览轨迹"),!1)}};case"order":return{url:Y+"/business_api/v1/web_customer_orders",data:{nonce:r.nonce,timestamp:r.timestamp,web_token:r.web_token,customer_token:r.customer_token,signature:r.signature,encryption_algorithm:r.encryption_algorithm,web_plugin_id:G,order:encodeURIComponent(JSON.stringify(i))},valid:function(){var e=[];return Ie.config.customer_order?r.signature?(!i.order_no&&e.push("订单编号:"+t),!i.price&&e.push("订单金额:"+t),!e.length||(n(e.join("、")),!1)):(n("请传入客户身份认证请求参数"),!1):(n("未开通订单事件"),!1)},cb:function(e){1e3!==e.code&&n(e.code_message)}};default:n("type参数错误")}},i={init:function(){Z.manualInit&&F()},setProduct:function(e){e=e||Z.product,e&&Re.sendMessage({type:"setProduct",product:e},Le.iframeEl.contentWindow)},showPanel:function(){E()},hidePanel:function(){Le.hide()},isDrag:function(){document.getElementsByClassName("udesk-client-btn")[0].classList.add("drag")},noDrag:function(){document.getElementsByClassName("udesk-client-btn")[0].classList.remove("drag")},clearProduct:function(){Re.sendMessage({type:"clearProduct"},Le.iframeEl.contentWindow)},getVisitorNo:function(){return be},dataTrace:function(e,t){var n=o({type:e,data:t});n&&n.valid(e,t)&&Re.jsonp(n.url+"?"+Re.urlString(n.data),function(e){n.cb&&n.cb(e)})},updateConfig:function(e){try{"object"==typeof Re.get(e,"panel.css")&&(Le.panelEl.style.cssText=De.toCssText(Re.assign(e.panel.css,{display:Le.panelEl.style.display,visibility:Le.panelEl.style.visibility,bottom:Le.panelEl.style.bottom,zIndex:Le.panelEl.style.zIndex}))),"function"==typeof Re.get(e,"panel.onToggle")&&(Fe.off("panel.onToggle",Re.get(Z,"panel.onToggle")),Fe.pushFn("panel.onToggle",Re.get(e,"panel.onToggle")))}catch(t){}},isPanelOpened:function(){try{return Le.opened}catch(e){}}};e[e.UdeskApiObject]=function(e){if(e){var t,n=arguments,o=e,r=!0;if("string"==typeof e&&i.hasOwnProperty(e))return i[n[0]].apply(null,[].slice.call(n,1));"object"!=typeof e&&(o={},o[n[0]]=n[1]),(o.channel||o.language||o.customer)&&(t=!0),(o.agent_id||o.group_id)&&(we?(r=!1,R(function(e){e?(delete o.group_id,delete o.agent_id,t&&D(o)):(l(o),D(o))})):(l(o),t=!0)),r&&t&&D(o)}},Ce=e[e.UdeskApiObject],I(i)}function P(){H=Re.isTestENV(),q=Re.ifIE(),ee=encodeURIComponent(location.href),te=encodeURIComponent(Re.getReferrer()||""),me=encodeURIComponent(t.title)||"",headEl=De.find("head",t)[0]||t.head||t.getElementsByTagName("head")[0]||{},Q=Re.store("userkey"),fe=De.find("body",t)[0]||t.body||{},ye=(t.documentElement||fe).clientWidth||1366,ve=(t.documentElement||fe).clientHeight,re=ye<=768,Q=Re.store("userkey"),Re.store("on_go_chat",""),Re.store("on_force_chat",""),Re.platform({iphone:function(){re=!0}}),ne=O(ee,decodeURIComponent(Re.store("first_access")||te||""));var e={};if(Ce&&Re.each(Ce.d,function(t){var n=t[0];"object"!=typeof t[0]&&(n={},n[t[0]]=t[1]),Fe.eachPushFn(n),Re.extend(e,n)}),e.link){var n=Re.parseUrl(e.link),o=Re.urlParams(e.link);n.protocol&&(Ee=n.protocol),Y=Ee+"//"+n.host,G=o.web_plugin_id}e.manualInit=e.manualInit||e.manueInit||!1,Be=e.auto_invite_interval,Z=e}function L(){var e=document.createElement("link"),t=Y+"/im_client/css/ui/emotion.css";e.type="text/css",e.rel="stylesheet",e.href=t,headEl.appendChild(e);var n=document.createElement("style"),o='url("'+Y+'/im_client/images/im-emoji-big-1.png")',i="#udesk_pop_dialog .udesk_im_client_emoji { background-image: "+o+"}";n.type="text/css",n.rel="stylesheet";try{n.appendChild(document.createTextNode(i))}catch(r){n.styleSheet.cssText=i}headEl.appendChild(n)}function U(){P(),_();var e=function(e){var t=c(e),n=Oe.vistor||{};l(t),oe="code="+(t.code||"")+"&url="+ee+"&referrer="+(t.src_url||te)+"&keyword="+ne,J="https:"===Ee?"6002":"6001",W=(H?Y.replace(Ee+"//",""):"basevistor.udesk.cn")+":"+J,X=(n[Ee.replace(":","")]||Ee+"//"+W)+"/customerApi/",V=(n["https:"===Ee?"wss":"ws"]||Ee+"//"+W)+"/customer"};Z.code&&Z.link&&A(function(t){e(t),z(),L();var n=Z.manualInit;t.im_guest_enable&&!Z.noVisitor?(Q&&!n&&F(),S(function(e){e=e||{},e.key&&(Q=e.key,Re.store("userkey",Q),Ue.init(),be=e.visitor_no,Pe.updateVisitorNo(be)),!n&&F()})):!n&&F(),n&&(ke=!0,Fe.init(),Fe.execFn("onReady"))})}function F(){se||(se=!0,De.ready(function(){he=De.createEl({id:Ae+"container"}),Re.isEmptyObj(fe)&&(fe=De.find("body",t)[0]||t.body||{}),fe.appendChild(he),Pe.init(),Le.init(),Fe.init(),Q&&Ue.init(),B(_e),b(function(){Le.loadSrc(),k(),je.online&&Ue.startAutoStrategy(),Z.manualInit||(ke=!0,Fe.execFn("onReady"))})}))}var H,q,W,J,X,V,Y,G,Z,Q,ee,te,ne,oe,ie,re,ae,se,ce,le,ue,pe,fe,he,de,ge,me,ye,ve,be,ke,we,_e,xe,Se,Ae="udesk_",Ce=e[e.UdeskApiObject],Te=navigator.userAgent.toLowerCase(),Ee="file:"===location.protocol?"http:":location.protocol,Ne=0,Me=999999999,je={},Oe={},Be=0,Ie={config:{window:{}}};if(!e.__udeskApiInit){e.__udeskApiInit=!0;var Re={isTestENV:function(){return"file:"===location.protocol||/(ud|tiyanudesk|(udesk(.+)?)).com$ |localhost/i.test(location.host)},getCurrentStaticUrl:function(){var e=location.hostname,t=/\.(.*)\.udesk.cn/,n=e.match(t),o=n&&n[1];if(!o)if(/udesk.cn/.test(e))o="";else{if(/localhost|local/.test(e))return"static-ud.udesk.cn";if(/tryudesk/.test(e)){var i=e.match(/\.(.*).tryudesk.cn/);return"static-ud."+i+".tryudesk.com"}}return"static-ud."+(o?o+".":"")+"udesk.cn"},jsonp:function(n,o){if(n){var i=Ae+"jsonp"+Ne++;n+=(n.indexOf("?")>-1?"&":"?")+"callback="+i;var r=t.createElement("script");headEl.appendChild(r),e[i]=function(e){o&&o(e)},r.src=n,r.onerror=function(){o&&o()}}},replaceTpl:function(e,t){if(!e)return"";if(!t)return e;var n=e;"function"==typeof e&&(n=e(t));for(var o in t)n=n.replace(new RegExp("{"+o+"}","gm"),t[o]||"");return n},parseJSON:function(t){try{return e.JSON.parse(t)}catch(n){}return t},extend:function(e){return e?(Re.each(arguments,function(t,n){if(n>0&&t)for(var o in t)e[o]=t[o]}),e):e},each:function(e,t){if(e){var n=e.length;if(n!==o)for(var i=0;i<n&&!1!==t(e[i],i);i++);else for(var r in e)if(!1===t(e[r],r))break}},isEmptyObj:function(e){if(!e)return!1;for(var t in e)return!1;return!0},getReferrer:function(){var t;try{t=e.top.document.referrer}catch(n){try{t=e.parent.document.referrer}catch(n){}}if(t||(t=document.referrer),!t&&e.opener)try{t=e.opener.location.href}catch(n){}return t||""},messageListener:function(t){e.addEventListener?e.addEventListener("message",function(e){var n=Re.parseJSON(e.data)||{};t&&t(n)}):e.attachEvent("onmessage",function(e){var n=Re.parseJSON(e.data)||{};t&&t(n)})},sendMessage:function(e,t){try{e=JSON.stringify(e)||"",t.postMessage(e,Y)}catch(n){}},store:function We(t,n){t="UDESK_"+t;var We=e.localStorage;if(We)try{if(n===o)return We[t]||"";We[t]=n||""}catch(i){}},sessionStore:function(t,n){t="UDESK_"+t;var i=e.sessionStorage;if(i)try{if(n===o)return i[t]||"";i[t]=n||""}catch(r){}},storageListener:function(t){try{e.addEventListener?e.addEventListener("storage",function(e){t&&t(e)}):document.attachEvent&&!K.Browser.opera?document.attachEvent("onstorage",function(e){t&&t(e)}):e.attachEvent("onstorage",function(e){t&&t(e)})}catch(n){}},urlParams:function(e){var t,n={};if(!e)return n;if(t=e.match(new RegExp("[?&][^?&]+=[^?&]+","g")))for(var o=0,i=t.length;o<i;o++){var r,a,s;try{r=t[o].substring(1).split("="),a=decodeURIComponent(r[0]),s=decodeURIComponent(r[1]),n[a]=s}catch(c){r&&r[0]&&(n[r[0]]=r[1]||"")}}return n},urlString:function(e,t){var n="";if(e)for(var o in e)n+="&"+o+"="+(t?encodeURIComponent(e[o]||""):e[o]||"");return n?n.substring(1):""},parseUrl:function(e){e=e||"";var t=e.split("//"),n=t[0]||"",o=(t[1]||"").split("/")[0];return{protocol:n,host:o}},ifIE:function(e,t){var n=document.createElement("b");return n.innerHTML="<!--[if "+(t||"")+" IE "+(e||"")+"]><i></i><![endif]-->",1===n.getElementsByTagName("i").length},platform:function(e){if(e){for(var t,n,o,i=new RegExp("(android|iphone|ipod|ios|ipad|webkit|windows phone|micromessenger)","g");null!=(n=i.exec(Te));)t=!0,o=n[1],e[o]&&e[o](),e.ios&&/iphone|ipod|ipad/.test(o)&&e.ios(),e.wp&&/windows phone/.test(o)&&e.wp(),e.weixin&&/micromessenger/.test(o)&&e.weixin();!t&&e.others&&e.others()}},isRealMob:function(){var e=!1;return this.platform({ios:function(){e=!0},android:function(){e=!0},wp:function(){e=!0}}),e},encodeBase64:function(e){var t,n,o,i,r,a,s,c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",l="",u=0;for(e=this._utf8_encode(e);u<e.length;)t=e.charCodeAt(u++),n=e.charCodeAt(u++),o=e.charCodeAt(u++),i=t>>2,r=(3&t)<<4|n>>4,a=(15&n)<<2|o>>6,s=63&o,isNaN(n)?a=s=64:isNaN(o)&&(s=64),l=l+c.charAt(i)+c.charAt(r)+c.charAt(a)+c.charAt(s);return l},_utf8_encode:function(e){e=e.replace(/\r\n/g,"\n");for(var t="",n=0;n<e.length;n++){var o=e.charCodeAt(n);o<128?t+=String.fromCharCode(o):o>127&&o<2048?(t+=String.fromCharCode(o>>6|192),t+=String.fromCharCode(63&o|128)):(t+=String.fromCharCode(o>>12|224),t+=String.fromCharCode(o>>6&63|128),t+=String.fromCharCode(63&o|128))}return t},aryFindKeys:function(e,t){if(!e&&!t)return!1;for(var o=0,i=t.length;o<i;o++){var r=t[o],a=document.querySelectorAll(r);for(m=0,n=a.length;m<n;m++)if(a[m]===e)return!0}return!1},assign:function(e,t){"use strict";if(null===e||e===o)throw new TypeError("Cannot convert undefined or null to object");for(var n=Object(e),i=1;i<arguments.length;i++){var r=arguments[i];if(null!==r&&r!==o)for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(n[a]=r[a])}return n},set:function(e,t,n){var o=t.substring(0,t.indexOf("."));o?(o in e||(e[o]={}),Re.set(e[o],t.substring(t.indexOf(".")+1),n)):e[t]=n},get:function(e,t){var n=t.substring(0,t.indexOf("."));return n&&n in e?Re.get(e[n],t.substring(t.indexOf(".")+1)):n?e[n]:e[t]}},De={_isReady:!1,_readyList:[],ready:function(e){if(this._isReady)return e&&e();if(!t.body)return e&&this._readyList.push(e),setTimeout(function(){De.ready()});var n=this._readyList;this._isReady=!0;for(var o=0,i=n.length;o<i;o++)n[o]();e&&e(),n.length=0},find:function(e,t){return(t||he).querySelectorAll(e)||[]},createEl:function(e,n){"object"==typeof e&&(n=e,e=""),n=n||{};var o=t.createElement(e||"div"),i=n.css;delete n.css;for(var r in n)o[r]=n[r];return i&&De.css(o,i),o},removeEl:function(e,t){var n=this.find(e,t);Re.each(n,function(e){e.parentNode.removeChild(e)})},hasClass:function(e,t){return RegExp("\\b"+(t||"")+"\\b").test(e||"")},css:function(t,n,i){if(t&&n)if("object"==typeof n)for(var r in n)if(r.indexOf("-")>-1){var a,s=r.split("-")[0],c=r.split("-")[1];a=s+c.substring(0,1).toUpperCase()+c.substring(1),t.style[a]=n[r]}else t.style[r]=n[r];else{if(i===o){if(i=(e.getComputedStyle?e.getComputedStyle(t,null):t.currentStyle)[n]||"","auto"===i)return 0;if("px"===i.slice(i.length-2)){var l=parseFloat(i);return isNaN(l)?i:l}return i}t.style[n]=i}},css3:function(e){var t="";return Re.each((e||"").split(";"),function(e){e&&(t+=e+";",Re.each(["-webkit-","-moz-","-ms-","-o-"],function(n){t+=n+e+";"}))}),t},cssJoin:function(e,t){var n={};if(e){t=(t||"").split(",");for(var o=0,i=t.length;o<i;o++)n[t[o]]=De.css(e,t[o])}return n},outerWidth:function(e){var t=0,n=De.cssJoin(e,"width,paddingLeft,paddingRight,borderLeft,borderRight");for(var o in n)t+=parseFloat(n[o])||0;return t},outerHeight:function(e){var t=0,n=De.cssJoin(e,"height,paddingTop,paddingBottom,borderTop,borderBottom");for(var o in n)t+=parseFloat(n[o])||0;return t},getEvent:function(t){return t||e.event},on:function(e,t,n){e&&(e.addEventListener?e.addEventListener(t,n,!1):e.attachEvent("on"+t,n))},un:function(e,t,n){e&&(e.removeEventListener?e.removeEventListener(t,n,!1):e.detachEvent("on"+t,n))},stopPropagation:function(e){e=this.getEvent(e),e.stopPropagation?e.stopPropagation():e.cancelBubble=!0},getOffset:function(e){for(var t=0,n=0;e&&e!=fe;)t+=e.offsetLeft,n+=e.offsetTop,e=e.offsetParent;return{top:n,left:t}},formatSize:function(e){return e&&parseFloat(e)==e?e+"px":e},hide:function(e){e&&this.css(e,"display","none")},show:function(e,t){t=t||"block",e&&this.css(e,"display",t)},text:function(e,t){if(e)return t===o?"string"==typeof e.textContent?e.textContent:e.innerText:void("string"==typeof e.textContent?e.textContent=t:e.innerText=t)},html:function(e,t){e&&t&&(e.innerHTML=t)},toCssText:function(e){var t=document.createElement("div");return De.css(t,e),t.style.cssText}},ze=function(e){if(e=e||{},e.html){e.type=e.type||"pop";var t,n,o,i,r,a,s=Ae+e.type+"_dialog",c=Re.extend({},Z.pop),l="pop"===e.type,u=d(),p="position:fixed;z-index:"+ ++Me+";font-size:14px;word-break:break-all;word-wrap:break-word;line-height:20px;"+De.css3("box-sizing:border-box;box-shadow:1px 1px 8px #eee"),f={pop:['<div class="{btnChatClz}" style="{commonStyle}border:1px solid #eee;padding:16px 30px 16px 16px;color:#888;cursor:pointer;background-color:#fff;text-align:left;border-radius:4px;box-shadow: 0px 1px 4px rgba(0, 0, 0, 0.25);'+De.css3("transition: margin linear .3s")+'">','<div style="display: flex">','    <img src="{avatar}" style="flex: 0 0 32px;height: 32px;margin-right: 10px;'+De.css3("border-radius:16px")+'">',"<div>",'    <b style="font-size:16px;color:#666;margin-bottom: 6px">{title}</b>','    <div style="overflow: hidden;-webkit-line-clamp: 3;text-overflow:ellipsis;display: -webkit-box;-webkit-box-orient: vertical;word-break:normal">{html}</div>',"</div>",'    <a class="{btnCloseClz}" style="position:absolute;right:12px;top:12px;font-size:24px;cursor:pointer;color:rgba(0, 0, 0, 0.45);text-decoration:none;">&times;</a>',"</div>","</div>"].join(""),frame:['<div style="{commonStyle}top:50%;left:50%;background-color:{frame_color};width:450px;text-align:left;border-radius:4px;box-shadow: 0px 1px 4px rgba(0, 0, 0, 0.25);">','    <a class="{btnCloseClz}" style="position:absolute;right:9px;top:8px;font-size:22px;cursor:pointer;color:#fff;text-decoration:none;">&times;</a>','    <div style="padding:9px 14px 9px 9px;color:#fff;font-size: 14px;line-height: 22px;display:flex;align-items: center"><img style="width: 20px" src="'+(Re.isTestENV()?Ee+("//static-ud."+location.href+".tryudesk.com/img/client-invite.png"):Ee+"//static-ud.udesk.cn/img/client-invite.png")+'" />{title}</div>','    <div style="font-size:13px;padding:24px '+(c.is_custom_bg&&c.bg_url?"106px":0)+" 24px 16px;background:#fff"+(c.is_custom_bg?" url({bg_url})":"")+' no-repeat right bottom;background-size:auto 136px;">','        <div style="color:{color};min-height:'+(c.is_custom_bg&&c.bg_url?"60px":0)+';line-height:22px;margin-bottom:20px;">{html}</div>','        <a class="{btnChatClz}" style="display:inline-block;background-color:{btn_color};color:#fff;padding:5px 16px;cursor:pointer;text-decoration:none;box-shadow: 0px 2px 0px rgba(0, 0, 0, 0.03);border-radius:2px;">'+He.g("tips.beganSession")+"</a>","    </div>","</div>"].join(""),mob_frame:['<div style="{commonStyle}top:50%;left:50%;width:280px;text-align:center;background-color:#fff;border:1px solid #ccc;">','    <div style="color:#333;padding:10px;">','        <img src="{avatar}" style="width:24px;height:24px;'+De.css3("border-radius:12px")+'">',"        <b>{title}</b>","    </div>",'    <div style="color:#333;padding:25px;border-top:1px solid #ccc;border-bottom:1px solid #ccc;">',"        {html}","    </div>",'    <div style="height:50px;line-height:50px;">','        <a class="{btnCloseClz}" style="float:left;width:49%;color:#307AE8;text-decoration:none;text-align:center;border-right:1px solid #ccc;">'+He.g("tips.cancel")+"</a>",'        <a class="{btnChatClz}" style="float:right;width:49%;color:#307AE8;text-decoration:none;text-align:center;">'+He.g("tips.beganSession")+"</a>","    </div>","</div>"].join("")},h=Re.extend({commonStyle:p,btnCloseClz:Ae+"btn_close",btnChatClz:Ae+"btn_chat"},c,e);h.avatar=e.avatar||je.avatar||"",t=Re.replaceTpl(f[e.type],h);var g=Z.pos_flag||"",m=g[0],y=Re.extend({width:q?De.outerWidth(de):De.css(de,"width"),height:q?De.outerHeight(de):De.css(de,"height")},De.getOffset(de)),v=function(){var e=Re.extend({top:y.top,left:y.left,width:q?De.outerWidth(o):De.css(o,"width"),height:q?De.outerHeight(o):De.css(o,"height")}),t=Z.pop.offset||{},n=parseFloat(t.top)||0,i=parseFloat(t.left)||0,r=1,a="unset";Z.targetSelector&&De.css(o,{top:e.top+"px",left:re?"0px":e.left+"px"}),Re.ifIE(8)&&(e.width=Math.max(e.width,320),e.height=Math.max(e.height,70)),u.top&&(n-="v"===m?20:y.height,a="translateY(-100%)"),u.bottom&&(n+="v"===m?y.height:20),u.left&&(i-=20,a="translateX(-100%) translateY(-50%)"),u.right&&(a="translateY(-50%)",i+=y.width+10,r=y.left+y.width+10),u.top||u.bottom?(i-=(e.width-y.width)/2,y.left<e.width?i=(parseFloat(t.left)||0)-10:ye-y.left<e.width&&(i=ye-y.left-e.width+(parseFloat(t.left)||0),i-=20)):n+=y.height/2-20,setTimeout(function(){De.css(o,{marginTop:n+"px",marginLeft:(re?r||i:i)+"px",marginRight:"10px",transform:a})},50)},b=function(){var e,t,n,i,r,a=Z.pop.arrow||{},s={},c={};i=De.formatSize(a.left)||"50%",re&&(i=y.left+(y.width+36)/2-20+"px"),r=De.formatSize(a.top)||"50%",u.top||u.bottom?(e=u.top?"bottom":"top",t="border"+(u.top?"Bottom":"Top")+"Width",n="border"+(u.top?"Top":"Bottom")+"Color",s={left:i,marginLeft:"-11px"},c={marginLeft:"-9px"}):(e=u.left?"right":"left",t="border"+(u.left?"Right":"Left")+"Width",n="border"+(u.left?"Left":"Right")+"Color",s={top:r,marginTop:"-11px"},c={marginTop:"-9px"}),s[e]="-12px",s[t]=0,s[n]="rgba(0,0,0,0.08)",c[e]="3px",c[t]=0,c[n]="#fff";var l=De.createEl("b",{css:{position:"absolute",border:"12px solid transparent"}}),p=De.createEl("b",{css:{position:"absolute",border:"9px solid transparent"}});De.css(l,s),De.css(p,c),l.appendChild(p),o.appendChild(l)},k=function(){var e=De.cssJoin(o,"width,height");De.css(o,{marginTop:-(e.height/2)+"px",marginLeft:-(e.width/2)+"px"})};De.removeEl("#"+s),n=De.createEl({id:s,innerHTML:t}),!Z.targetSelector&&(n.style.position="absolute"),o=n.firstChild,i=De.find("."+h.btnCloseClz,o)[0],r=l?o:De.find("."+h.btnChatClz,o)[0],l?(re&&(u.left?a=y.left-10+"px":u.right&&(a=ye-y.width-y.left-30+"px")),De.css(o,Re.extend(re?{width:a?a:"100%"}:{"min-width":"250px","max-width":"300px"},c.css,/[tb]/.test(g)&&re?{left:0}:{}))):De.css(o,c.css);for(var w in y)"auto"===y[w]&&(y[w]=0);return Z.targetSelector?he.appendChild(n):he.getElementsByClassName("udesk-client-btn")[0].appendChild(n),r.onclick=e.onclick,i.onclick=function(t){De.stopPropagation(t),De.hide(n),e.onclose&&e.onclose()},l?(v(),b()):k(),{show:function(){De.show(n)},hide:function(){De.hide(n)}}}},Pe={_unread:0,baseStyles:{wrapperStyle:["display:flex;align-items:center;justify-content: center;overflow:hidden;"],btn:["display:block;position:fixed;"+De.css3("box-sizing:border-box;"),"font-size:13px;color:#fff;text-align:center;cursor:pointer;text-decoration:none;","z-index:"+ ++Me+";","width:fit-content;","border-radius:4px;"],icon:["display:block;float:left;width:20px;height:20px;"],iconSrc:[Ee+"//"+Re.getCurrentStaticUrl()+"/img/client-btn.png"],line:["display:block;float:left;width:1px;height:100%;background-color:rgba(0, 0, 0, .08);","vertical-align:middle;","background-color:#000\\9;filter:alpha(opacity=10)\\9;"],txt:["display:block;float:left;","overflow-y:hidden; font-size: 14px; color: #fff;"],mob_txt:["display:block;float:none;height:40px;margin:0 10px;line-height:40px;","overflow-y:hidden; font-size: 13px; color: #fff;"],circle:["display:none;position:absolute;top:-13px;right:-13px;height:22px;","text-align:center;line-height:20px;font-size:14px;color:#fff;border-radius:10px;","background-color: #FB5127;padding:0 6px;font-weight:bold;border:1px solid #fff;"],img_circle:["display:none;position:absolute;top:-13px;right:-13px;width:26px;height:26px;","text-align:center;line-height:26px;font-size:14px;color:#fff;border-radius:15px;","background-color: #ff3b30;"],visitor_no:["position: fixed;z-index: "+Me+";color: #fff;text-align: center;font-family: 'Arial Normal', 'Arial';font-size: 13px;"],visitor_no_num:[]},abjuctStyle:function(){var e,t=this.baseStyles,n=(Z.css||{},Z.pos_flag||""),o=n[0],i=n[1],r=n[2],a=Z.visitor_no.enable;switch("i"!==o&&(t.btn.push("box-shadow:0 <0></0> 14px 0 rgba(0, 0, 0, .16);padding:10px;"),Z.color&&t.btn.push("background-color:"+Z.color+";")),o){case"h":t.btn.push("height:40px;"),re&&t.btn.push("width:100%;"),re&&t.btn.push("padding:0px;"),re&&t.icon.push("margin:10px;"),re&&(null==(e=Z.css)?void 0:e.width)&&(Z.css.width=Z.css.width.replace("%","vw"));break;case"v":t.btn.push("width:40px;height:auto;padding:10px 0px;"),t.icon.push("margin:0 7px 10px;"),t.line.push("width:100%;height:1px;"),t.circle.push("left:-13px;right:unset"),t.txt.push("width:40px;height:auto;word-break:break-all;word-wrap:break-word;line-height:20px;letter-spacing:24px;overflow-y:auto;overflow-x:hidden;margin-top:10px;padding-left: 2px;margin-left:10px"),t.mob_txt.push("width:40px;height:auto;float:left;word-break:break-all;word-wrap:break-word;line-height:20px;letter-spacing:24px;overflow-y:auto;overflow-x:hidden;margin-top:10px;padding-left: 2px;"),t.wrapperStyle.push("flex-direction:column;");break;case"c":t.btn.push("width:40px;height:40px;border-radius:20px;"),t.line.push("display:none;"),t.txt.push("display:none;"),t.iconSrc.length=0,t.iconSrc.push(Ee+"//"+Re.getCurrentStaticUrl()+"/img/client-btn.png");break;case"i":t.img_circle.push("left:-13px;top:-13px;right:auto;bottom:auto;")}switch(i){case"l":t.btn.push("left:0;");break;case"r":t.btn.push("right:0;")}switch(r){case"t":t.btn.push("top:0;");break;case"b":t.btn.push("bottom:"+(re&&a?"30px":"0")+";")}var s=Z.visitor_no.color,c=Z.visitor_no.pos_flag||"",l=c[0],u=c[1];if(s||(s=re?"#307AE8":"#649ae8"),t.visitor_no.push("background-color:"+s+";"),re)t.visitor_no.push("width:100%;bottom:0;font-weight:bold;padding:5px 0;");else{switch(t.visitor_no.push("width: 70px;height: 70px;line-height: 22px;border-radius: 2px;"),t.visitor_no_num.push("font-size: 20px;margin-top: 14px;display: block;"),l){case"l":t.visitor_no.push("left:0;");break;case"r":t.visitor_no.push("right:0;")}switch(u){case"t":t.visitor_no.push("top:0;");break;case"b":t.visitor_no.push("bottom:0;")}}},tryCenter:function(e){var t=Z.pos_flag||"",n=t[0],o=t[1],i=t[2],r=Z.visitor_no.pos_flag||"",a=r[0],s=r[1],c=function(t){var n,r=De.cssJoin(t,"width,height,margin-right");De.cssJoin(ge,"width,height");"m"===o&&De.css(e,"left",(ye-parseFloat(r.width))/2+"px"),"m"===i&&(n=(ve-parseFloat(r.height))/2,De.css(e,"top",n+"px")),"m"===a&&De.css(ge,"left",(ye-parseFloat(r.width))/2+"px"),"m"===s&&(n=(ve-parseFloat(r.height))/2,!Re.isRealMob()&&De.css(ge,"top",n+"px"))};if(c(e),"i"===n){var l=De.find("img",e)[0];l.onload=function(){c(l)}}},genVisitorNoHtml:function(){var e=this.baseStyles,t="",n=He.g("tips.visitorNo");return be=be||"",Z.im_guest_enable&&Z.visitor_no.enable&&(t=Re.replaceTpl('<div id="{flag}visitor_no" style="{style}">{text}</div>',{flag:Ae,style:e.visitor_no.join(""),text:re?n+"&nbsp<span>"+be:"</span><b style='"+e.visitor_no_num.join("")+"'><span>"+be+"</span></b>"+n})),t},genHtml:function(){var e,t=this.baseStyles,n=Z.css||{},o=Z.pos_flag||"",i=o[0],r=Z.unread_button||{},a="";if(this.abjuctStyle(),"i"!==i)a=Re.replaceTpl('<div style="{wrapperStyle}"><span style="{iconStyle}"><img src="{iconSrc}" style="width:100%;height:100%;"/></span><span style="{lineStyle}"></span><span id="{flag}btn_text" style="{txtStyle}">{text}</span><span id="{flag}btn_circle" style="{circleStyle}"></span></div>',{flag:Ae,text:"",iconStyle:t.icon.join(""),iconSrc:t.iconSrc.join(""),lineStyle:t.line.join(""),txtStyle:t[re?"mob_txt":"txt"].join(""),circleStyle:t.circle.join(""),wrapperStyle:"h"===i?t.wrapperStyle:""});else if(e='<img class="buttonImg" src="'+(Z.offlineImgUrl||Z.onlineImgUrl)+'" style="max-width:'+(n.width?"unset;":"200px;"),n.width&&(e+="width: "+n.width+";"),n.height&&(e+="height: "+n.height+";"),e+='">',r.enable){var n=r.css||{};for(var s in n)n[s]?t.img_circle.push(s+":"+n[s]+"px;"):t.img_circle.push(s+":auto;");a=["<div>",e,'   <span id="'+Ae+'btn_circle" style="'+t.img_circle.join("")+'"></span>',"</div>"].join("")}else a=e;return a='<a class="udesk-client-btn" style="'+t.btn.join("")+'">'+a+"</a>",a+=this.genVisitorNoHtml()},updateVisitorNo:function(e){if(ge){var t=De.find("span",ge)[0];t.innerText=e}},clickHandler:function(t){try{var n=document.getElementsByClassName("udesk-client-btn")[0];if(n&&n.className.indexOf("drag")>-1)return}catch(o){}if("autoInvite"===t?E("autoInvite"):E(),e&&e.uAnalytics){var i=e.uAnalytics.user().id(),r=e.uAnalytics.user().traits(),a={system:"im",consult_url:e.location.href};Re.assign(a,r.userAttr),e.uAnalytics.identify(i,a),e.uAnalytics.track("onlineconsultclick")}},clearUnread:function(e){if(this._unread){try{if(Le.iframeEl&&Le.iframeEl.contentWindow)Re.sendMessage({type:"clearUnread",content:{clearHistory:e}},Le.iframeEl.contentWindow);else{var t=Z.customer;$.post(Y+"/spa1/sdk_offline_messages/customer_clear_message",{platform:"web",session_key:Z.session_key,web_token:t.web_token,nonce:t.nonce,signature:t.signature,timestamp:t.timestamp,encryption_algorithm:t.encryption_algorithm})}$.each(qe,function(e,t){clearTimeout(t)}.bind(this))}catch(n){}this._unread=0,De.hide(this.circleEl),Z.noBubble||this.popObj&&this.popObj.hide()}},unreadHandler:function(e){if(!Le.opened||!Le.uiOpened){var t=this;if(e.count?this._unread=e.count:this._unread+=1,De.text(this.circleEl,this._unread),De.show(this.circleEl),Fe.execFn("onUnread",{count:this._unread}),!Z.noBubble&&e.msg){var n=function(){try{var e=document.getElementsByClassName("udesk-client-btn")[0];if(e&&e.className.indexOf("drag")>-1)return}catch(n){}t.clickHandler(),o&&o.hide(),t.popObj=!1},o=ze({type:"pop",title:je.nick||He.g("tips.agent"),avatar:je.avatar,html:e.msg||He.g("tips.newMsg"),onclick:n,onclose:function(){t.popObj=!1,t.clearUnread(!0)}});this.popObj=o,de.onclick=n}}},bindSelector:function(e,n){De.on(t,"click",function(t){t=t||window.event;for(var o=t.target,i=e.split(","),r=!1;o&&o!==this;){if(Re.aryFindKeys(o,i)){r=!0;break}o=o.parentNode}r&&n&&n()})},init:function(){var e=this,n=Z.selector;n&&e.bindSelector(n,function(){E()});var o=De.find(Z.targetSelector,t)[0];if(Z.targetSelector&&!o&&e.bindSelector(Z.targetSelector,function(){e.clickHandler()}),!o){o=De.createEl({id:Ae+"btn",innerHTML:this.genHtml()}),he.appendChild(o),o=De.find("a",o)[0],ge=De.find("#"+Ae+"visitor_no")[0],Pe.autoGen=!0,this.tryCenter(o),this.textEl=De.find("#"+Ae+"btn_text",o)[0],this.circleEl=De.find("#"+Ae+"btn_circle",o)[0],this.imgEl=De.find(".buttonImg",o)[0];var i={};try{if(Z.css)if("c"===Z.pos_flag[0]||"v"===Z.pos_flag[0])for(var r in Z.css)"width"!==r&&(i[r]=Z.css[r]);else i=Z.css}catch(a){i=Z.css}De.css(o,i),De.css(ge,Z.visitor_no.css)}o&&(this.el=o,de=o,de.onclick=this.clickHandler)}},Le={opened:!1,uiOpened:!1,_baseStyles:{panel:["position:fixed;bottom:-574px;right:60px;z-index:-1;width:364px;height:572px;","overflow:hidden;display:none;background-color:transparent;","box-shadow:0px 4px 8px rgba(0, 0, 0, 0.25);","border-radius: 4px;","-webkit-overflow-scrolling:touch;","border:1px solid #ddd\\9;",De.css3("transition:bottom 0.3s;")],frame:["width:1px;min-width:100%;*width:100%;height:0;","border:none;padding:0;margin:0;float:none;background:none;",De.css3("transition:height 0.1s;")]},_styleElement:null,_getId:function(){return Ae+"panel"},_createPanel:function(e){var n=this,o=this._baseStyles||{},i=De.createEl({innerHTML:'<div id="'+this._getId()+'"><iframe id="'+Ae+'iframe" frameborder="0" scrolling="no" allowtransparency="true" style="'+o.frame.join("")+'"></iframe></div>'});he.appendChild(i.firstChild),this.panelEl=t.getElementById(Ae+"panel"),this.iframeEl=t.getElementById(Ae+"iframe"),De.on(this.iframeEl,"load",function(){n.iframeLoaded=!0,e&&e()}),q&&!Re.ifIE(8,"gt")||(this.iframeEl.setAttribute("allowfullscreen",""),this.iframeEl.setAttribute("mozallowfullscreen",""),this.iframeEl.setAttribute("webkitallowfullscreen","")),De.css(this.panelEl,Z.panel.css)},_doToggle:function(e){var t=this.panelEl;if(De.css(t,{display:e?"block":"none",visibility:e?"visible":"hidden",bottom:e?"-482px":0,zIndex:e?++Me:-1}),setTimeout(function(){t.style.bottom=e?0:"-482px"},5),e)try{this.sendProduct(),Re.sendMessage({type:"openPanel",preloadData:Oe},this.iframeEl.contentWindow)}catch(n){}},_uiCtrl:function(e){var t=this,n=this.iframeEl,o=Pe.el,i="hide"!==e;this.opened=i,this.uiOpened=i,i?t.iframeLoaded?t._doToggle(i):De.on(t.iframeEl,"load",function(){t.iframeLoaded=!0,t._doToggle(i)}):t._doToggle(i),De.show(i?n:o),Pe.autoGen&&De.hide(i?o:n),setTimeout(function(){n.style.height=i?"100%":"0"},100),Fe.execFn("panel.onToggle",{visible:i})},sendProduct:function(){for(var e=0;e<5;e++)setTimeout(Ce.setProduct,1e3*e)},show:function(e){var t;void 0===e&&(e=0);var n=this;if(this.iframeEl===o&&e<3)return void setTimeout(function(e){return function(){n.show(e)}}(e+1),100);var i=null==(t=this.iframeEl)?void 0:t.contentWindow;this._uiCtrl("show"),Pe.clearUnread(),Re.sessionStore("panel_visible_"+Z.session_key,!0);try{this.sendProduct(),Re.sendMessage({type:"forceLoadPage"},i),Re.sendMessage({type:"openPanel"},i)}catch(r){}this.start_hide_time&&new Date-n.start_hide_time>=6e5&&(setTimeout(function(){n.loadSrc()},50),n.start_hide_time=null),xe&&xe()},_doToggleOther:function(e){var t=this.panelEl;if(De.css(t,{display:"none"}),e)try{this.sendProduct(),Re.sendMessage({type:"openPanel",preloadData:Oe},this.iframeEl.contentWindow)}catch(n){}},_uiCtrlOther:function(e){var t=this,n=this.iframeEl,o=Pe.el,i="hide"!==e;this.opened=i,this.uiOpened=!1,i?t.iframeLoaded?t._doToggleOther(this.uiOpened):De.on(t.iframeEl,"load",function(){t.iframeLoaded=!0,t._doToggle(this.uiOpened)}):t._doToggle(this.uiOpened),De.show(o),Pe.autoGen&&De.hide(n),setTimeout(function(){n.style.height="0"},100)},_show:function(){var e=this,t=this.iframeEl.contentWindow;this._uiCtrlOther("show");try{this.sendProduct(),Re.sendMessage({type:"forceLoadPage"},t),Re.sendMessage({type:"openPanel"},t)}catch(n){}this.start_hide_time&&new Date-e.start_hide_time>=6e5&&(setTimeout(function(){e.loadSrc()},50),e.start_hide_time=null),xe&&xe()},hide:function(){"inner"===Z.mode&&(Re.sessionStore("panel_visible_"+Z.session_key,""),this._uiCtrl("hide"),this.start_hide_time=new Date,xe=s())},loadSrc:function(e){var t=this;this.iframeEl&&p(function(n){t.iframeEl.contentWindow.location.replace(f(e,!1,n))})},_createStyle:function(){if(!this._styleElement){var e,t=this._baseStyles||{},n=Ie.config.window.proportion?100-Ie.config.window.proportion:30;e=Ie.config.window.proportion?"left:0;right:0;bottom:0;top:"+n+"%;height:auto;width:auto;":"left:0;right:0;bottom:0;top:"+n+"px;height:auto;width:auto;",this._styleElement=i("#"+this._getId()+"{"+t.panel.join("")+"}\n@media (max-width: 768px) {#"+this._getId()+"{"+e+"}}")}},init:function(){"inner"===Z.mode&&(this._createStyle(),this._createPanel(function(){var e=Re.sessionStore("panel_visible_"+Z.session_key),t=Re.sessionStore("panel_chatting_"+Z.session_key);e&&!re?E():e||re||t&&R(function(e){e&&N("hideIframe")})}))}},Ue={rejected_num:0,agetn_invite:!1,init:function(){var e=this;this._loaded||(this._loaded=!0,ie=__udeskIo(V+"?key="+Q,{reconnection:!0,reconnectionDelay:2e3,reconnectionAttempts:10}),ie.on("connect",function(){ie.emit("enter",{key:Q,code:Z.code})}),ie.on("reconnect",function(){ie.emit("enter",{key:Q,code:Z.code})}),ie.on("invite",function(t){t&&(je.id=t.agent_id,je.group_id=t.group_id),e.stopAutoStrategy(),e.agent_invite=!0,e.show()}),ie.on("robot_invite",function(e){e&&(je.id=e.agent_id,je.group_id=e.group_id);var t=C();t.removeEventListener("acceptedTransferAgent"),t.removeEventListener("rejectedTransferAgent"),
DesignScreenshot/output/gitee_run/gitee.com_1_initial_page.html:10:    var savedTheme = localStorage.getItem('theme');
DesignScreenshot/output/gitee_run/gitee.com_1_initial_page.html:345:function(e){"function"==typeof define&&define.amd?define(["jquery"],e):e(jQuery)}(function(e){function t(){var t=n(this);return isNaN(t.datetime)?e(this).text(a.settings.strings.never):e(this).text(i(t.datetime)),this}function n(t){if(!(t=e(t)).data("timeago")){t.data("timeago",{datetime:a.datetime(t)});var n=e.trim(t.text());!(n.length>0)||a.isTime(t)&&t.attr("title")||t.attr("title",n)}return t.data("timeago")}function i(e){return a.inWords(o(e))}function o(e){return(new Date).getTime()-e.getTime()}e.timeago=function(t){return t instanceof Date?i(t):i("string"==typeof t?e.timeago.parse(t):"number"==typeof t?new Date(t):e.timeago.datetime(t))};var a=e.timeago;e.extend(e.timeago,{settings:{refreshMillis:6e4,allowFuture:!1,strings:{prefixAgo:null,prefixFromNow:null,suffixAgo:"\u524d",suffixFromNow:"\u521a\u521a",seconds:"\u4e00\u5206\u949f",minute:"\u4e00\u5206\u949f",minutes:"%d\u5206\u949f",hour:"\u4e00\u5c0f\u65f6",hours:"%d\u5c0f\u65f6",day:"\u4e00\u5929",days:"%d\u5929",month:"\u4e00\u4e2a\u6708",months:"%d\u4e2a\u6708",year:"\u4e00\u5e74",years:"%d\u5e74",never:"\u4ece\u4e0d",wordSeparator:" ",numbers:[]}},inWords:function(t){function n(n,o){var a=e.isFunction(n)?n(o,t):n,r=i.numbers&&i.numbers[o]||o;return a.replace(/%d/i,r)}var i=this.settings.strings,o=i.prefixAgo,a=i.suffixAgo;this.settings.allowFuture&&t<0&&(o=i.prefixFromNow,a=i.suffixFromNow);var r=Math.abs(t)/1e3,s=r/60,c=s/60,l=c/24,u=l/365,d=r<45&&n(i.seconds,Math.round(r))||r<90&&n(i.minute,1)||s<45&&n(i.minutes,Math.round(s))||s<90&&n(i.hour,1)||c<24&&n(i.hours,Math.round(c))||c<42&&n(i.day,1)||l<30&&n(i.days,Math.round(l))||l<45&&n(i.month,1)||l<365&&n(i.months,Math.round(l/30))||u<1.5&&n(i.year,1)||n(i.years,Math.round(u)),p=i.wordSeparator||"";return i.wordSeparator===undefined&&(p=" "),e.trim([o,d].join(p)+a)},parse:function(t){var n=e.trim(t);return n=(n=(n=(n=n.replace(/\.\d+/,"")).replace(/-/,"/").replace(/-/,"/")).replace(/T/," ").replace(/Z/," UTC")).replace(/([\+\-]\d\d)\:?(\d\d)/," $1$2"),new Date(n)},datetime:function(t){var n=a.isTime(t)?e(t).attr("datetime"):e(t).attr("title");return a.parse(n)},isTime:function(t){return"time"===e(t).get(0).tagName.toLowerCase()}});var r={init:function(){var n=e.proxy(t,this);n();var i=a.settings;i.refreshMillis>0&&setInterval(n,i.refreshMillis)},update:function(n){e(this).data("timeago",{datetime:a.parse(n)}),t.apply(this)}};e.fn.timeago=function(e,t){var n=e?r[e]:r.init;if(!n)throw new Error("Unknown function name '"+e+"' for timeago");return this.each(function(){n.call(this,t)}),this},document.createElement("abbr"),document.createElement("time")}),function(){const e={email:/^[\w+\-.]+@[a-z\d\-]+(\.[a-z\d\-]+)*\.[a-z]+$/i,projectName:/^(?!_)(?!.*?_$)(?!-)(?!.*-$)(?!\+)[-a-zA-Z0-9_.\u4e00-\u9fa5\uff00-\uffff+ ]+$/,projectPath:/^[a-zA-Z0-9.][a-zA-Z0-9_\-.]{1,190}$/,projectLabel:/^[0-9A-Za-z\u4e00-\u9fa5]{1}[A-Za-z0-9\-\u4e00-\u9fa5]{0,34}$/,phone:/^[1,8][0-9]{10,11}$/,commitId:/^[0-9a-f]{40}$/,emailSuffix:/^@[a-z\d-]+(\.[a-z\d-]+)*\.[a-z]+$/,positiveInt:/^[1-9]\d*$/,idCard:/(^[1-9]\d{5}(18|19|([23]\d))\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$)|(^[1-9]\d{5}\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}$)/};window.giteeRegex=e}(),function e(t,n,i){function o(r,s){if(!n[r]){if(!t[r]){var c="function"==typeof require&&require;if(!s&&c)return c(r,!0);if(a)return a(r,!0);var l=new Error("Cannot find module '"+r+"'");throw l.code="MODULE_NOT_FOUND",l}var u=n[r]={exports:{}};t[r][0].call(u.exports,function(e){var n=t[r][1][e];return o(n||e)},u,u.exports,e,t,n,i)}return n[r].exports}for(var a="function"==typeof require&&require,r=0;r<i.length;r++)o(i[r]);return o}({1:[function(e,t,n){function i(){return{a:["target","href","title"],abbr:["title"],address:[],area:["shape","coords","href","alt"],article:[],aside:[],audio:["autoplay","controls","loop","preload","src"],b:[],bdi:["dir"],bdo:["dir"],big:[],blockquote:["cite"],br:[],caption:[],center:[],cite:[],code:[],col:["align","valign","span","width"],colgroup:["align","valign","span","width"],dd:[],del:["datetime"],details:["open"],div:[],dl:[],dt:[],em:[],font:["color","size","face"],footer:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],header:[],hr:[],i:[],img:["src","alt","title","width","height"],ins:["datetime"],li:[],mark:[],nav:[],ol:[],p:[],pre:[],s:[],section:[],small:[],span:[],sub:[],sup:[],strong:[],table:["width","border","align","valign"],tbody:["align","valign"],td:["width","rowspan","colspan","align","valign"],tfoot:["align","valign"],th:["width","rowspan","colspan","align","valign"],thead:["align","valign"],tr:["rowspan","align","valign"],tt:[],u:[],ul:[],video:["autoplay","controls","loop","preload","src","height","width"]}}function o(){}function a(){}function r(){}function s(){}function c(e){return e.replace(x,"&lt;").replace(O,"&gt;")}function l(e,t,n,i){if(n=m(n),"href"===t||"src"===t){if("#"===(n=z.trim(n)))return"#";if("http://"!==n.substr(0,7)&&"https://"!==n.substr(0,8)&&"mailto:"!==n.substr(0,7)&&"tel:"!==n.substr(0,4)&&"#"!==n[0]&&"/"!==n[0])return""}else if("background"===t){if(N.lastIndex=0,N.test(n))return""}else if("style"===t){if(q.lastIndex=0,q.test(n))return"";if(E.lastIndex=0,E.test(n)&&(N.lastIndex=0,N.test(n)))return"";!1!==i&&(n=(i=i||T).process(n))}return n=g(n)}function u(e){return e.replace(C,"&quot;")}function d(e){return e.replace(k,'"')}function p(e){return e.replace(_,function(e,t){return"x"===t[0]||"X"===t[0]?String.fromCharCode(parseInt(t.substr(1),16)):String.fromCharCode(parseInt(t,10))})}function f(e){return e.replace(L,":").replace(S," ")}function h(e){for(var t="",n=0,i=e.length;n<i;n++)t+=e.charCodeAt(n)<32?" ":e.charAt(n);return z.trim(t)}function m(e){return e=h(e=f(e=p(e=d(e))))}function g(e){return e=c(e=u(e))}function b(){return""}function v(e,t){function n(t){return!!i||-1!==z.indexOf(e,t)}"function"!=typeof t&&(t=function(){});var i=!Array.isArray(e),o=[],a=!1;return{onIgnoreTag:function(e,i,r){if(n(e)){if(r.isClosing){var s="[/removed]",c=r.position+s.length;return o.push([!1!==a?a:r.position,c]),a=!1,s}return a||(a=r.position),"[removed]"}return t(e,i,r)},remove:function(e){var t="",n=0;return z.forEach(o,function(i){t+=e.slice(n,i[0]),n=i[1]}),t+=e.slice(n)}}}function M(e){return e.replace(W,"")}function y(e){var t=e.split("");return(t=t.filter(function(e){var t=e.charCodeAt(0);return 127!==t&&(!(t<=31)||(10===t||13===t))})).join("")}var A=e("cssfilter").FilterCSS,w=e("cssfilter").getDefaultWhiteList,z=e("./util"),T=new A,x=/</g,O=/>/g,C=/"/g,k=/&quot;/g,_=/&#([a-zA-Z0-9]*);?/gim,L=/&colon;?/gim,S=/&newline;?/gim,N=/((j\s*a\s*v\s*a|v\s*b|l\s*i\s*v\s*e)\s*s\s*c\s*r\s*i\s*p\s*t\s*|m\s*o\s*c\s*h\s*a)\:/gi,q=/e\s*x\s*p\s*r\s*e\s*s\s*s\s*i\s*o\s*n\s*\(.*/gi,E=/u\s*r\s*l\s*\(.*/gi,W=/<!--[\s\S]*?-->/g;n.whiteList=i(),n.getDefaultWhiteList=i,n.onTag=o,n.onIgnoreTag=a,n.onTagAttr=r,n.onIgnoreTagAttr=s,n.safeAttrValue=l,n.escapeHtml=c,n.escapeQuote=u,n.unescapeQuote=d,n.escapeHtmlEntities=p,n.escapeDangerHtml5Entities=f,n.clearNonPrintableCharacter=h,n.friendlyAttrValue=m,n.escapeAttrValue=g,n.onIgnoreTagStripAll=b,n.StripTagBody=v,n.stripCommentTag=M,n.stripBlankChar=y,n.cssFilter=T,n.getDefaultCSSWhiteList=w},{"./util":4,cssfilter:8}],2:[function(e,t,n){function i(e,t){return new r(t).process(e)}var o=e("./default"),a=e("./parser"),r=e("./xss");for(var s in(n=t.exports=i).FilterXSS=r,o)n[s]=o[s];for(var s in a)n[s]=a[s];"undefined"!=typeof window&&(window.filterXSS=t.exports)},{"./default":1,"./parser":3,"./xss":5}],3:[function(e,t,n){function i(e){var t=d.spaceIndex(e);if(-1===t)var n=e.slice(1,-1);else n=e.slice(1,t+1);return"/"===(n=d.trim(n).toLowerCase()).slice(0,1)&&(n=n.slice(1)),"/"===n.slice(-1)&&(n=n.slice(0,-1)),n}function o(e){return"</"===e.slice(0,2)}function a(e,t,n){"user strict";var a="",r=0,s=!1,c=!1,l=0,u=e.length,d="",p="";for(l=0;l<u;l++){var f=e.charAt(l);if(!1===s){if("<"===f){s=l;continue}}else if(!1===c){if("<"===f){a+=n(e.slice(r,l)),s=l,r=l;continue}if(">"===f){a+=n(e.slice(r,s)),d=i(p=e.slice(s,l+1)),a+=t(s,a.length,d,p,o(p)),r=l+1,s=!1;continue}if(('"'===f||"'"===f)&&"="===e.charAt(l-1)){c=f;continue}}else if(f===c){c=!1;continue}}return r<e.length&&(a+=n(e.substr(r))),a}function r(e,t){"user strict";function n(e,n){if(!((e=(e=d.trim(e)).replace(p,"").toLowerCase()).length<1)){var i=t(e,n||"");i&&o.push(i)}}for(var i=0,o=[],a=!1,r=e.length,l=0;l<r;l++){var f,h=e.charAt(l);if(!1!==a||"="!==h)if(!1===a||l!==i||'"'!==h&&"'"!==h||"="!==e.charAt(l-1))if(/\s|\n|\t/.test(h)){if(e=e.replace(/\s|\n|\t/g," "),!1===a){if(-1===(f=s(e,l))){n(d.trim(e.slice(i,l))),a=!1,i=l+1;continue}l=f-1;continue}if(-1===(f=c(e,l-1))){n(a,u(d.trim(e.slice(i,l)))),a=!1,i=l+1;continue}}else;else{if(-1===(f=e.indexOf(h,l+1)))break;n(a,d.trim(e.slice(i+1,f))),a=!1,i=(l=f)+1}else a=e.slice(i,l),i=l+1}return i<e.length&&(!1===a?n(e.slice(i)):n(a,u(d.trim(e.slice(i))))),d.trim(o.join(" "))}function s(e,t){for(;t<e.length;t++){var n=e[t];if(" "!==n)return"="===n?t:-1}}function c(e,t){for(;t>0;t--){var n=e[t];if(" "!==n)return"="===n?t:-1}}function l(e){return'"'===e[0]&&'"'===e[e.length-1]||"'"===e[0]&&"'"===e[e.length-1]}function u(e){return l(e)?e.substr(1,e.length-2):e}var d=e("./util"),p=/[^a-zA-Z0-9_:\.\-]/gim;n.parseTag=a,n.parseAttr=r},{"./util":4}],4:[function(e,t){t.exports={indexOf:function(e,t){var n,i;if(Array.prototype.indexOf)return e.indexOf(t);for(n=0,i=e.length;n<i;n++)if(e[n]===t)return n;return-1},forEach:function(e,t,n){var i,o;if(Array.prototype.forEach)return e.forEach(t,n);for(i=0,o=e.length;i<o;i++)t.call(n,e[i],i,e)},trim:function(e){return String.prototype.trim?e.trim():e.replace(/(^\s*)|(\s*$)/g,"")},spaceIndex:function(e){var t=/\s|\n|\t/.exec(e);return t?t.index:-1}}},{}],5:[function(e,t){function n(e){return e===undefined||null===e}function i(e){var t=d.spaceIndex(e);if(-1===t)return{html:"",closing:"/"===e[e.length-2]};var n="/"===(e=d.trim(e.slice(t+1,-1)))[e.length-1];return n&&(e=d.trim(e.slice(0,-1))),{html:e,closing:n}}function o(e){var t={};for(var n in e)t[n]=e[n];return t}function a(e){(e=o(e||{})).stripIgnoreTag&&(e.onIgnoreTag&&console.error('Notes: cannot use these two options "stripIgnoreTag" and "onIgnoreTag" at the same time'),e.onIgnoreTag=s.onIgnoreTagStripAll),e.whiteList=e.whiteList||s.whiteList,e.onTag=e.onTag||s.onTag,e.onTagAttr=e.onTagAttr||s.onTagAttr,e.onIgnoreTag=e.onIgnoreTag||s.onIgnoreTag,e.onIgnoreTagAttr=e.onIgnoreTagAttr||s.onIgnoreTagAttr,e.safeAttrValue=e.safeAttrValue||s.safeAttrValue,e.escapeHtml=e.escapeHtml||s.escapeHtml,this.options=e,!1===e.css?this.cssFilter=!1:(e.css=e.css||{},this.cssFilter=new r(e.css))}var r=e("cssfilter").FilterCSS,s=e("./default"),c=e("./parser"),l=c.parseTag,u=c.parseAttr,d=e("./util");a.prototype.process=function(e){if(!(e=(e=e||"").toString()))return"";var t=this,o=t.options,a=o.whiteList,r=o.onTag,c=o.onIgnoreTag,p=o.onTagAttr,f=o.onIgnoreTagAttr,h=o.safeAttrValue,m=o.escapeHtml,g=t.cssFilter;o.stripBlankChar&&(e=s.stripBlankChar(e)),o.allowCommentTag||(e=s.stripCommentTag(e));var b=!1;if(o.stripIgnoreTagBody){b=s.StripTagBody(o.stripIgnoreTagBody,c);c=b.onIgnoreTag}var v=l(e,function(e,t,o,s,l){var b,v={sourcePosition:e,position:t,isClosing:l,isWhite:a.hasOwnProperty(o)};if(!n(b=r(o,s,v)))return b;if(v.isWhite){if(v.isClosing)return"</"+o+">";var M=i(s),y=a[o],A=u(M.html,function(e,t){var i,a=-1!==d.indexOf(y,e);return n(i=p(o,e,t,a))?a?(t=h(o,e,t,g))?e+'="'+t+'"':e:n(i=f(o,e,t,a))?void 0:i:i});s="<"+o;return A&&(s+=" "+A),M.closing&&(s+=" /"),s+=">"}return n(b=c(o,s,v))?m(s):b},m);return b&&(v=b.remove(v)),v},t.exports=a},{"./default":1,"./parser":3,"./util":4,cssfilter:8}],6:[function(e,t){function n(e){return e===undefined||null===e}function i(e){var t={};for(var n in e)t[n]=e[n];return t}function o(e){(e=i(e||{})).whiteList=e.whiteList||a.whiteList,e.onAttr=e.onAttr||a.onAttr,e.onIgnoreAttr=e.onIgnoreAttr||a.onIgnoreAttr,e.safeAttrValue=e.safeAttrValue||a.safeAttrValue,this.options=e}var a=e("./default"),r=e("./parser");e("./util");o.prototype.process=function(e){if(!(e=(e=e||"").toString()))return"";var t=this.options,i=t.whiteList,o=t.onAttr,a=t.onIgnoreAttr,s=t.safeAttrValue;return r(e,function(e,t,r,c,l){var u=i[r],d=!1;if(!0===u?d=u:"function"==typeof u?d=u(c):u instanceof RegExp&&(d=u.test(c)),!0!==d&&(d=!1),c=s(r,c)){var p,f={position:t,sourcePosition:e,source:l,isWhite:d};return d?n(p=o(r,c,f))?r+":"+c:p:n(p=a(r,c,f))?void 0:p}})},t.exports=o},{"./default":7,"./parser":9,"./util":10}],7:[function(e,t,n){function i(){var e={"align-content":!1,"align-items":!1,"align-self":!1,"alignment-adjust":!1,"alignment-baseline":!1,all:!1,"anchor-point":!1,animation:!1,"animation-delay":!1,"animation-direction":!1,"animation-duration":!1,"animation-fill-mode":!1,"animation-iteration-count":!1,"animation-name":!1,"animation-play-state":!1,"animation-timing-function":!1,azimuth:!1,"backface-visibility":!1,background:!0,"background-attachment":!0,"background-clip":!0,"background-color":!0,"background-image":!0,"background-origin":!0,"background-position":!0,"background-repeat":!0,"background-size":!0,"baseline-shift":!1,binding:!1,bleed:!1,"bookmark-label":!1,"bookmark-level":!1,"bookmark-state":!1,border:!0,"border-bottom":!0,"border-bottom-color":!0,"border-bottom-left-radius":!0,"border-bottom-right-radius":!0,"border-bottom-style":!0,"border-bottom-width":!0,"border-collapse":!0,"border-color":!0,"border-image":!0,"border-image-outset":!0,"border-image-repeat":!0,"border-image-slice":!0,"border-image-source":!0,"border-image-width":!0,"border-left":!0,"border-left-color":!0,"border-left-style":!0,"border-left-width":!0,"border-radius":!0,"border-right":!0,"border-right-color":!0,"border-right-style":!0,"border-right-width":!0,"border-spacing":!0,"border-style":!0,"border-top":!0,"border-top-color":!0,"border-top-left-radius":!0,"border-top-right-radius":!0,"border-top-style":!0,"border-top-width":!0,"border-width":!0,bottom:!1,"box-decoration-break":!0,"box-shadow":!0,"box-sizing":!0,"box-snap":!0,"box-suppress":!0,"break-after":!0,"break-before":!0,"break-inside":!0,"caption-side":!1,chains:!1,clear:!0,clip:!1,"clip-path":!1,"clip-rule":!1,color:!0,"color-interpolation-filters":!0,"column-count":!1,"column-fill":!1,"column-gap":!1,"column-rule":!1,"column-rule-color":!1,"column-rule-style":!1,"column-rule-width":!1,"column-span":!1,"column-width":!1,columns:!1,contain:!1,content:!1,"counter-increment":!1,"counter-reset":!1,"counter-set":!1,crop:!1,cue:!1,"cue-after":!1,"cue-before":!1,cursor:!1,direction:!1,display:!0,"display-inside":!0,"display-list":!0,"display-outside":!0,"dominant-baseline":!1,elevation:!1,"empty-cells":!1,filter:!1,flex:!1,"flex-basis":!1,"flex-direction":!1,"flex-flow":!1,"flex-grow":!1,"flex-shrink":!1,"flex-wrap":!1,float:!1,"float-offset":!1,"flood-color":!1,"flood-opacity":!1,"flow-from":!1,"flow-into":!1,font:!0,"font-family":!0,"font-feature-settings":!0,"font-kerning":!0,"font-language-override":!0,"font-size":!0,"font-size-adjust":!0,"font-stretch":!0,"font-style":!0,"font-synthesis":!0,"font-variant":!0,"font-variant-alternates":!0,"font-variant-caps":!0,"font-variant-east-asian":!0,"font-variant-ligatures":!0,"font-variant-numeric":!0,"font-variant-position":!0,"font-weight":!0,grid:!1,"grid-area":!1,"grid-auto-columns":!1,"grid-auto-flow":!1,"grid-auto-rows":!1,"grid-column":!1,"grid-column-end":!1,"grid-column-start":!1,"grid-row":!1,"grid-row-end":!1,"grid-row-start":!1,"grid-template":!1,"grid-template-areas":!1,"grid-template-columns":!1,"grid-template-rows":!1,"hanging-punctuation":!1,height:!0,hyphens:!1,icon:!1,"image-orientation":!1,"image-resolution":!1,"ime-mode":!1,"initial-letters":!1,"inline-box-align":!1,"justify-content":!1,"justify-items":!1,"justify-self":!1,left:!1,"letter-spacing":!0,"lighting-color":!0,"line-box-contain":!1,"line-break":!1,"line-grid":!1,"line-height":!1,"line-snap":!1,"line-stacking":!1,"line-stacking-ruby":!1,"line-stacking-shift":!1,"line-stacking-strategy":!1,"list-style":!0,"list-style-image":!0,"list-style-position":!0,"list-style-type":!0,margin:!0,"margin-bottom":!0,"margin-left":!0,"margin-right":!0,"margin-top":!0,"marker-offset":!1,"marker-side":!1,marks:!1,mask:!1,"mask-box":!1,"mask-box-outset":!1,"mask-box-repeat":!1,"mask-box-slice":!1,"mask-box-source":!1,"mask-box-width":!1,"mask-clip":!1,"mask-image":!1,"mask-origin":!1,"mask-position":!1,"mask-repeat":!1,"mask-size":!1,"mask-source-type":!1,"mask-type":!1,"max-height":!0,"max-lines":!1,"max-width":!0,"min-height":!0,"min-width":!0,"move-to":!1,"nav-down":!1,"nav-index":!1,"nav-left":!1,"nav-right":!1,"nav-up":!1,"object-fit":!1,"object-position":!1,opacity:!1,order:!1,orphans:!1,outline:!1,"outline-color":!1,"outline-offset":!1,"outline-style":!1,"outline-width":!1,overflow:!1,"overflow-wrap":!1,"overflow-x":!1,"overflow-y":!1,padding:!0,"padding-bottom":!0,"padding-left":!0,"padding-right":!0,"padding-top":!0,page:!1,"page-break-after":!1,"page-break-before":!1,"page-break-inside":!1,"page-policy":!1,pause:!1,"pause-after":!1,"pause-before":!1,perspective:!1,"perspective-origin":!1,pitch:!1,"pitch-range":!1,"play-during":!1,position:!1,"presentation-level":!1,quotes:!1,"region-fragment":!1,resize:!1,rest:!1,"rest-after":!1,"rest-before":!1,richness:!1,right:!1,rotation:!1,"rotation-point":!1,"ruby-align":!1,"ruby-merge":!1,"ruby-position":!1,"shape-image-threshold":!1,"shape-outside":!1,"shape-margin":!1,size:!1,speak:!1,"speak-as":!1,"speak-header":!1,"speak-numeral":!1,"speak-punctuation":!1,"speech-rate":!1,stress:!1,"string-set":!1,"tab-size":!1,"table-layout":!1,"text-align":!0,"text-align-last":!0,"text-combine-upright":!0,"text-decoration":!0,"text-decoration-color":!0,"text-decoration-line":!0,"text-decoration-skip":!0,"text-decoration-style":!0,"text-emphasis":!0,"text-emphasis-color":!0,"text-emphasis-position":!0,"text-emphasis-style":!0,"text-height":!0,"text-indent":!0,"text-justify":!0,"text-orientation":!0,"text-overflow":!0,"text-shadow":!0,"text-space-collapse":!0,"text-transform":!0,"text-underline-position":!0,"text-wrap":!0,top:!1,transform:!1,"transform-origin":!1,"transform-style":!1,transition:!1,"transition-delay":!1,"transition-duration":!1,"transition-property":!1,"transition-timing-function":!1,"unicode-bidi":!1,"vertical-align":!1,visibility:!1,"voice-balance":!1,"voice-duration":!1,"voice-family":!1,"voice-pitch":!1,"voice-range":!1,"voice-rate":!1,"voice-stress":!1,"voice-volume":!1,volume:!1,"white-space":!1,widows:!1,width:!0,"will-change":!1,"word-break":!0,"word-spacing":!0,"word-wrap":!0,"wrap-flow":!1,"wrap-through":!1,"writing-mode":!1,"z-index":!1};return e}function o(){}function a(){}function r(e,t){return s.test(t)?"":t}var s=/javascript\s*\:/gim;n.whiteList=i(),n.getDefaultWhiteList=i,n.onAttr=o,n.onIgnoreAttr=a,n.safeAttrValue=r},{}],8:[function(e,t,n){function i(e,t){return new a(t).process(e)}var o=e("./default"),a=e("./css");for(var r in(n=t.exports=i).FilterCSS=a,o)n[r]=o[r];"undefined"!=typeof window&&(window.filterCSS=t.exports)},{"./css":6,"./default":7}],9:[function(e,t){function n(e,t){function n(){if(!a){var n=i.trim(e.slice(r,s)),o=n.indexOf(":");if(-1!==o){var l=i.trim(n.slice(0,o)),u=i.trim(n.slice(o+1));if(l){var d=t(r,c.length,l,u,n);d&&(c+=d+"; ")}}}r=s+1}";"!==(e=i.trimRight(e))[e.length-1]&&(e+=";");for(var o=e.length,a=!1,r=0,s=0,c="";s<o;s++){var l=e[s];if("/"===l&&"*"===e[s+1]){var u=e.indexOf("*/",s+2);if(-1===u)break;r=(s=u+1)+1,a=!1}else"("===l?a=!0:")"===l?a=!1:";"===l?a||n():"\n"===l&&n()}return i.trim(c)}var i=e("./util");t.exports=n},{"./util":10}],10:[function(e,t){t.exports={indexOf:function(e,t){var n,i;if(Array.prototype.indexOf)return e.indexOf(t);for(n=0,i=e.length;n<i;n++)if(e[n]===t)return n;return-1},forEach:function(e,t,n){var i,o;if(Array.prototype.forEach)return e.forEach(t,n);for(i=0,o=e.length;i<o;i++)t.call(n,e[i],i,e)},trim:function(e){return String.prototype.trim?e.trim():e.replace(/(^\s*)|(\s*$)/g,"")},trimRight:function(e){return String.prototype.trimRight?e.trimRight():e.replace(/(\s*$)/g,"")}}},{}]},{},[2]),window.escapeHTML=function(){var e=$("<div/>");return function(t){return e.text(t).html()}}(),window.htmlSafe=window.escapeHTML,function(){window.Gitee={}}.call(this),function(){var e=window.location.hostname;"git.oschina.net"===e&&(window.location.href=window.location.href.replace(e,"gitee.com"))}(),function(){var e,t,n;n=function(e,t){var n;return n={onIgnoreTagAttr:function(e,t,n){if("class"===t)return t+'="'+n+'"'}},t&&(n.whiteList=t),filterXSS(e,n)},t=function(e,t){var i,o;o="string"==typeof e?n(e,t):e;try{(i=$(o)).length||(i=$("<div/>").html(o))}catch(a){a,i=$("<div/>").html(o)}return i},e=function(){function e(e){e||(e={}),this.alertText=e.alertText||"Alert",this.confirmText=e.confirmText||"Confirm",this.approveText=e.approveText||"Approve",this.cancelText=e.cancelText||"Cancel",this.okText=e.okText||"Ok",this.className=e.className||""}return e.prototype.alert=function(e,t,i){var o;return t?e||(e=this.alertText):(t=e,e=this.alertText),o='<div class="ui mini modal gitee-modal '+this.className+'">\n  <i class="iconfont icon-close close"></i>\n  <div class="header">'+n(e)+'</div>\n  <div class="content">'+n(t)+'</div>\n  <div class="actions">\n    <div class="ui orange approve button"">'+n(this.okText)+"</div>\n  </div>\n</div>",i?$(o).modal({onApprove:i}).modal("show"):$(o).modal("show")},e.prototype.confirm=function(e,i,o,a,r){var s,c,l,u;return e||(e=this.confirmText),c=this.approveText,r&&"approveText"in r&&(c=r.approveText),l=this.cancelText,r&&"cancelText"in r&&(l=r.cancelText),s=t(i,r&&r.whiteList),r=$.isPlainObject(o)?o:$.extend({},{onApprove:o,onDeny:a},r),u='<div class="ui mini modal gitee-modal '+this.className+'">\n  <i class="iconfont icon-close close"></i>\n  <div class="header">'+n(e)+'</div>\n  <div class="content"></div>\n  <div class="actions">\n    <div class="ui blank cancel button">'+n(l)+'</div>\n    <div class="ui orange approve button">'+n(c)+"</div>\n  </div>\n</div>",$(u).children(".content").append(s).parent().modal(r).modal("show")},e.prototype.tiny_confirm=function(e,t,i,o,a){var r,s;e||(e=this.confirmText);try{(r=$(t)).length||(r=$("<div/>").html(t))}catch(c){c,r=$("<div/>").html(t)}return a=$.isPlainObject(i)?i:$.extend({},{onApprove:i,onDeny:o},a),s='<div class="ui tiny modal gitee-modal '+this.className+'">\n  <i class="iconfont icon-close close"></i>\n  <div class="header">'+n(e)+'</div>\n  <div class="content"></div>\n  <div class="actions">\n    <div class="ui blank cancel button">'+n(this.cancelText)+'</div>\n    <div class="ui orange approve button">'+n(this.approveText)+"</div>\n  </div>\n</div>",$(s).find(".content").append(r).parent().modal(a).modal("show")},e.prototype.info=function(e,i,o){var a,r;return null==o&&(o="mini"),a=t(i),r='<div class="ui '+n(o)+" modal gitee-modal "+this.className+'">\n  <i class="iconfont icon-close close"></i>\n  <div class="header">'+n(e)+'</div>\n  <div class="content"></div>\n</div>',$(r).children(".content").append(a).parent().modal("show")},e}(),"undefined"!=typeof module&&(module.exports=e),this.GiteeModalHelper=e}.call(this),function(){var e;e=function(){function e(e){e||(e={}),e.sendClass||console.error("btnClass must exist"),e.phone||console.error("phone number must exist"),e.captcha||console.error("captcha must exist"),this.options=e,this.btnObj=$(e.sendClass),this.captcha=e.captcha,this.phone=e.phone,this.phoneClass=e.phoneClass,this.captchaClass=e.captchaClass,this.removePhoneDisabled=e.removePhoneDisabled,"undefined"==typeof this.removePhoneDisabled&&(this.removePhoneDisabled=!0),this.removeCaptchaDisabled=e.removeCaptchaDisabled,"undefined"==typeof this.removeCaptchaDisabled&&(this.removeCaptchaDisabled=!0)}return e.prototype.send=function(e){var t;return t=this,this.phone&&""!==this.phone?this.captcha&&""!==this.captcha?this.btnObj?(this.btnObj.addClass("disabled"),$.ajax({url:"/phones/send_phone_captcha",data:{phone:this.phone,img_captcha:this.captcha,check_captcha:e.forceCheckCaptcha||!1},type:"POST",success:function(n){if(t.btnObj.countdown({template:"\u91cd\u65b0\u53d1\u9001 (${time}s)",callback:function(){if(t.btnObj.text("\u91cd\u65b0\u53d1\u9001").removeClass("disabled"),t.visibleToggle(),e.onCaptchaTimeOut)return e.onCaptchaTimeOut()}}),n.notice&&t.showMessage(n.notice),t.visibleToggle(),1===n.result)return e.onSuccess(n)}})):(console.error("invalid button object"),!1):(this.showMessage("\u9a8c\u8bc1\u7801\u4e0d\u80fd\u4e3a\u7a7a"),!1):(this.showMessage("\u624b\u673a\u53f7\u7801\u4e0d\u80fd\u4e3a\u7a7a"),!1)},e.prototype.showMessage=function(e){return Flash?Flash.show(e):Toast(e)},e.prototype.visibleToggle=function(){if(this.phoneClass&&($(this.phoneClass).attr("disabled")?this.removePhoneDisabled&&$(this.phoneClass).attr("disabled",!1):$(this.phoneClass).attr("disabled",!0)),this.captchaClass){if(!$(this.captchaClass).attr("disabled"))return $(this.captchaClass).attr("disabled",!0);if(this.removeCaptchaDisabled)return $(this.captchaClass).attr("disabled",!1)}},e}(),this.SMS=e}.call(this),Gitee.initTabsInDropdown=function(e){function t(t){var i=e.find('.tab-menu-item[data-tab="'+t+'"]');e.find(".tab.active").removeClass("active"),e.find(".tab-menu-item.active").removeClass("active"),e.find(".tab-menu-action.active").removeClass("active"),e.find('.tab[data-tab="'+t+'"]').addClass("active"),e.find('.tab-menu-action[data-tab="'+t+'"]').addClass("active"),i.data("placeholder")&&n.attr("placeholder",i.data("placeholder")),i.addClass("active")}var n=e.find(".ui.search.input input");e.find(".tab-menu-item").on("click",function(){t($(this).data("tab"))});const i=e.dropdown("get selected item");Array.isArray(i)?i.forEach(e=>{t(e.parent().data("tab"))}):t(i.parent().data("tab"))},window.Gitee.initStats=function(){function e(){try{window.gon&&window._hmt&&window.gon.baidu_register_hm_push&&(window.gon.baidu_register_hm_push=undefined,console.log("success sign up"),window._hmt.push(["_trackCustomEvent","Pers_Regist_Success"]),$(document).on("click","[data-track]",function(e){var t=$(this);window._hmt.push(["_trackCustomEvent",t.data("track"),{}]),"A"===t.prop("tagName")&&t.attr("href")&&(e.stopPropagation(),e.preventDefault(),setTimeout(function(){window.location.href=t.attr("href")},200))}))}catch(e){console.error(e)}}function t(){var e,t;try{switch(e=window.gon.info.controller_path.concat("#",window.gon.info.action_name),!0){case/^(mobile\/)?home#index/.test(e):t=window.gon.info.current_user?"homepage_logged":"homepage";break;case/^(mobile\/)?enterprises#index/.test(e):t="enterprise_info";break;case/^(mobile\/)?education#index/.test(e):t="education_info";break;case/^(mobile\/)?gp#index/.test(e):t="premium_info";break;case/^(mobile\/)?explores#index/.test(e):t="explore";break;case/^(mobile\/)?explores#show/.test(e):t="explore_sorts";break;case/^(mobile\/)?open_source_vips#(index|category)/.test(e):t="gvp";break;case/^(mobile\/users#login|sessions#new)/.test(e):t="login";break;case/^(mobile\/users#signup|registrations#new)/.test(e):t="signup";break;case/^(mobile\/)?enterprises#new/.test(e):t="enterprise_new";break;case/^(mobile\/)?users#show/.test(e):t="user_profile";break;case/^(mobile\/profile#index|profiles#\w+)/.test(e):t="user_settings";break;case/^(mobile\/)?(projects|issues|pull_requests|attach_files|wikis|repositories|paas|pages|javadocs|phpdocs|quality_analyses|settings|team_members|deploy_keys|services|hooks|readonly_items|lfs_files)#\w+/.test(e):t="repository";break;case/^(mobile\/)?(groups|groups\/members)#\w+/.test(e):t="organization";break;case/^(mobile\/)?self_services#\w+/.test(e):t="self_services";break;case/^(mobile\/)?help#index/.test(e):t="help_center";break;case/enterprises\/dashboard\/\w+#\w+/.test(e):t=window.gon.info.current_user&&window.gon.info.current_user.official?"enterprise_demo":"enterprise_workspace"}t&&window._hmt.push(["_setPageviewProperty",{page_group:t}])}catch(n){console.error(n)}}function n(){var n=document.createElement("script"),o=document.getElementsByTagName("script")[0];n.src="https://hm.baidu.com/hm.js?"+i,o.parentNode.insertBefore(n,o),"ActiveXObject"in window?n.onreadystatechange=function(){"loaded"!==this.readyState&&"complete"!==this.readyState||((window._hmt=window._hmt||[])&&window._hmt.push(["_setAccount",i]),t(),e())}:n.onload=function(){(window._hmt=window._hmt||[])&&window._hmt.push(["_setAccount",i]),t(),e()}}if(/gitee\.com$/.test(window.location.hostname)){var i="24f17767262929947cc3631f99bfd274";n()}},Gitee.initRepoRemoteWay=function(){$.cookie("remote_way")||$.cookie("remote_way",{expires:360,path:"/"})},function(e,t){var n="undefined"==typeof window?undefined:window.define;"function"==typeof n&&n.amd?n([],function(){return t()}):"object"==typeof module&&module.exports?module.exports=t():e.globalUtils=t()}(this,function(){var e="undefined"==typeof window?{}:window.gon||{},t=function(e,t){var n=new Date(e),i=n.getFullYear(),o=n.getMonth()+1,a=n.getDate(),r=n.getHours(),s=n.getMinutes(),c=n.getSeconds();return(t||"yyyy-MM-dd hh:mm").replace("yyyy",i).replace("MM",o).replace("dd",a).replace("hh",r).replace("mm",s).replace("ss",c).replace(/\b\d{1}\b/g,"0$&")},n=function(e,t,n){var i=null,o=!0;return function(){var a=this,r=arguments;i&&clearTimeout(i),n?(i=setTimeout(function(){e.apply(a,r),o=!0},t),o&&(e.apply(a,r),o=!1)):i=setTimeout(function(){e.apply(a,r)},t)}},i=function(e,t){var n=null,i=Date.now();return function(){var o=Date.now(),a=t-(o-i),r=this,s=arguments;clearTimeout(n),a<=0?(e.apply(r,s),i=Date.now()):n=setTimeout(e,a)}},o=function(e,t){var n,i=t||new Date;try{n=new Date(e),i=new Date(i)}catch(o){return 0}return i.getTime()-n.getTime()},a=function(e){var t={};return Object.keys(e).forEach(function(n){var i=e[n];i instanceof Array&&(i=i.toString()),""!==i&&(t[n]=i)}),1===Number(t.page)&&delete t.page,t},r=function(){for(var e=[].slice.call(arguments),t=0,n="";t<e.length;t++){Object.keys(e[t]).forEach(function(i){n+=i+"="+e[t][i]+"&"})}return n.slice(0,-1)},s=function(e,t){var n=null;return e.some(function(e){return!!t(e)&&(n=e,!0)}),n},c=function(e){return e.substr(0,7)},l=function(){var e=localStorage.getItem("__GiteeBetaMode");return"string"!=typeof e?"gitee.com"!==window.location.hostname||1===window.gon.enterprise.id:"true"===e},u=function(e,t){var n=void 0===t?{}:t,i=n.onSuccess||function(){},o=n.onFail||function(){},a=n.always||function(){};$.post("/check",{"do":"captcha",val:e}).done(function(e){"1"===e?i():o(e),a(e)}).fail(function(e){o(e),a(e)})},d=function(e,t,n,i){var o=void 0===n?{}:n,a=o.onSuccess||function(){},r=o.onError||function(){},s=o.onCancel||function(){},c=o.always||function(){};return $.ajax({url:"/check",data:{"do":e,val:t,entrance:i},type:"POST",success:function(e){"1"===e?a():r(e),c()},error:function(e){"abort"===e.statusText?s():r(e.responseText),c()}})},p=function(e,t){var n=void 0===t?{}:t,i=n.onSuccess||function(){},o=n.onError||function(){},a=n.onCancel||function(){},r=n.always||function(){};return $.ajax({url:"/personal/password_strength",data:{value:e},method:"POST",dataType:"json",success:function(e){"available"===e.status?i(e):o(e),r(e)},error:function(e){"abort"===e.statusText?a():o(e.responseText),r(data)}})},f=function(e,t,n){$.post("/send_phone_email_captcha",$.extend({},e,t)).done(function(e){n(!0,e.message,e.code)}).fail(function(e){n(!1,e.responseJSON.message)})},h=function(e,t){$.post("/check_user_login",{user_login:e}).done(function(e){1===e.result&&e.failed_count>2?t(!0):t(!1)})},m=function(e,t){return $.get("/search/translate",e).done(function(e){t(e)}).fail(function(){t()})},g={appId:e.yunpian_key,container:"undefined"==typeof document?null:document.querySelector("body"),version:"v1",expired:20,winWidth:400,mode:"flat",noButton:!0,onSuccess:function(){},onError:function(){},onFail:function(e,t,n){n()},afterStart:function(){$(".yp-riddler-winbox").css("width","auto")}},b=function(e,t){var n=e[0]||e;if(n instanceof HTMLElement){var i=n.value.length||n.innerHTML.length||0;setTimeout(function(){n.focus(),"number"===n.type?console.warn("Uncaught DOMException: Failed to execute 'setSelectionRange' on 'HTMLInputElement': The input element's type ('number') does not support selection."):n.setSelectionRange(i,i)},50),t&&t.preventDefault()}else console.warn("params error, must is HTMLElement")},v={};"zh-TW"==e.locale?v.langPack={YPcaptcha_01:"\u8acb\u9ede\u64ca\u6309\u9215\u958b\u59cb\u9a57\u8b49",YPcaptcha_02:"\u8acb\u6309\u9806\u5e8f\u9ede\u64ca:",YPcaptcha_03:"\u5411\u53f3\u62d6\u52d5\u6ed1\u584a\u586b\u5145\u62fc\u5716",YPcaptcha_04:"\u9a57\u8b49\u5931\u6557\uff0c\u8acb\u91cd\u8a66",YPcaptcha_05:"\u9a57\u8b49\u6210\u529f"}:"en"==e.locale?v.lang="en":v.lang="zh-cn",$.extend(g,v);var M=function(e){window.Toast?Toast({message:e,position:"bottom"}):window.Flash&&window.Flash.error(e)
DesignScreenshot/output/gitee_run/gitee.com_1_initial_page.html:346:},y=null,A=function(e,t){T({container:e[0],mode:"flat",beforeStart:function(e){t.beforeStart&&"function"==typeof t.beforeStart?t.beforeStart(e.bind(this)):e()},onError:function(){var e=t.callback;z($.extend(t,{useCaptch:!0,callback:function(t,n){e(t),n()}}))},onFail:function(e,t,n){n()},onSuccess:function(n,i){n.captcha_type="yunpian",t.callback(n,function(){e.closest(".gitee-modal").modal("hide")}),i()}})},w=function(t){var n,i=e.yunpian_key,o=$('<input maxlength="6"/>'),a=$("<div/>",{"class":"2verify-container"}),r=$("<div/>",{style:"display: flex; flex-direction: column;","class":"2verify-container__image"}),s=$("<div/>",{"class":"2verify-container__yunPian"}),c=$('<div class="ui input right labeled captcha-labeled"/>').append(o),l=$('<div class="ui label"/>'),u=$("<img/>",{src:"/rucaptcha?"+(new Date).getTime(),"class":"captcha_img"}),d=$("<div/>",{"class":"ui error",style:"margin-top: 6px; color: #f14333;"}),p=$('<div class="session__2verify-switch mt-3 mb-1">\u4f7f\u7528\u6709\u95ee\u9898\uff1f<a>\u5207\u6362\u81f3\u5176\u4ed6\u9a8c\u8bc1\u65b9\u5f0f</a></div>'),f=$('<button class="ui disabled orange button fluid large mt-2">\u63d0\u4ea4</div>');return l.append(u),c.append(l),r.append(c).append(d).append(f),a.append(r),o.on("input",function(){6===this.value.length?f.removeClass("disabled"):f.addClass("disabled")}),i&&!0!==t.useCaptch&&(n=!0,r.hide(),a.append(s).append(p),A(s,t),p.find("a").on("click",function(){(n=!n)?(s.show(),r.hide()):(o.val(""),d.text(""),u.attr("src","/rucaptcha?"+(new Date).getTime()),s.hide(),r.show())})),a},z=function(e){var t,n=w(e),i=n.find("input"),o=n.find(".ui.error"),a=n.find(".captcha_img"),r=n.find(".ui.button.large");y||(y=new window.GiteeModalHelper({className:"twice-verification-warpper",approveText:"\u786e\u5b9a",cancelText:"\u53d6\u6d88"})),(t=y.confirm("\u4e8c\u6b21\u9a8c\u8bc1",n)).find(".actions").remove(),t.css("width","auto"),r.on("click",function(){var n=i.val();o.text(""),r.addClass("disabled loading"),u(n,{onSuccess:function(){e.callback({captcha_type:"captcha",captcha:n},function(){t.modal("hide")})},onFail:function(e){o.text(e),i.val(""),a.attr("src","/rucaptcha?"+(new Date).getTime())},always:function(){r.removeClass("disabled loading")}})}),i.on("input",function(){6===this.value.length?r.removeClass("disabled"):r.addClass("disabled")})},T=function(e){var t=window.YpRiddler,n=$.extend({},g,e),i=n.showError||M,o=function(e){429!==e.code?(i("\u9a8c\u8bc1\u670d\u52a1\u5f02\u5e38"),n.onError(e)):i("\u8bf7\u6c42\u8fc7\u4e8e\u9891\u7e41\uff0c\u8bf7\u7a0d\u540e\u518d\u8bd5\uff01")},a=function(e,t,o){i(2===e?"\u9a8c\u8bc1\u9519\u8bef":"\u9a8c\u8bc1\u51fa\u9519\uff1a"+t+" code: "+e),n.onFail(e,t,o)};new t($.extend({},n,{onError:o,onFail:a,onSuccess:function(e,t){n.onSuccess(e,t)}}))},x={email:/^[\w+-.]+@[a-z\d-]+(\.[a-z\d-]+)*\.[a-z]+$/,phone:/^[1,8][0-9]{10,11}$/,imageCaptcha:/^[a-zA-Z0-9]{6}$/,captcha:/^[a-zA-Z0-9]{6}$/};return{formatDate:t,formatPhone:function(e){if((11===e.length||14===e.length)&&e.startsWith("+86")){var t=e.replace("+86","");x.phone.test(t)&&(e=t)}return e},find:s,isBetaMode:l,debouce:n,throttle:i,getDiffTime:o,getCommitShortId:c,simplifyQuery:a,serialize:r,checkCaptcha:u,netCheck:d,validatePwdStrength:p,twiceVerification:T,twiceVerificationModal:function(e){var t=e.callback,n=$(e.container),i=function(){z($.extend(e,{callback:function(e,n){t(e),n()}}))};n.on("click",function(){e.beforeStart&&"function"==typeof e.beforeStart?e.beforeStart(function(){i()}):i()})},twiceVerificationWarpper:z,sendVerificationCode:f,commonRegex:x,canVerifyAccount:h,translate:m,translateCommon:function(e,t,i){var o=$(e),a=$(t);o.on("input",n(function(){a.data("manual")||""===o.val()||(o.data("traslateAjax")&&o.data("traslateAjax").abort(),o.data("traslateAjax",m({q:encodeURIComponent(o.val())},function(e){e.result&&!a.data("manual")&&(a.val(e.result),i())})))},500)),a.on("input",function(){""===this.value?$(this).data("manual",!1):$(this).data("manual",!0)})},clearSelections:function(){window.getSelection?window.getSelection().removeAllRanges():document.selection&&document.selection.empty&&document.selection.empty()},getFocus:b,getUrlQuery:function(e){if(!e)return"";var t=new RegExp("(^|&)"+e+"=([^&]*)(&|$)"),n=window.location.search.substr(1).match(t);return null!=n?decodeURIComponent(n[2]):""},shuffle:function(e){for(var t,n,i=e.length;i;)n=Math.floor(Math.random()*i--),t=e[i],e[i]=e[n],e[n]=t;return e},formPageSizeCheck:function(){var e;$("#page_size").on("input",function(){var t=/^([1-9]|[1-9][0-9]?|100)$/,n=$("#page_size").val();e=!0,""!==n?t.test(n)||(e=!1):e=!0}),$(".search-btn").click(function(t){!1===e&&(Flash.show("\u53ea\u80fd\u8f93\u51651-100\u7684\u6570\u503c"),t.preventDefault())})},createInputHistoryList:function(e,t){function i(){u=c.offset(),p.css({display:"none",position:"absolute",left:u.left+(e.offsetX||0)+"px",top:u.top+c.outerHeight()+(e.offsetY||0)+"px"})}function o(){p.fadeOut(200)}function a(){l.length<=0||p.fadeIn(200)}function r(){l=[],localStorage.setItem(e.key,JSON.stringify(l))}function s(){p.html(d())}e.maxCount=e.maxCount||5;var c=$(e.selector);if(0!==c.length&&e.key){var l=JSON.parse(localStorage.getItem(e.key)||"[]")||[],u=c.offset(),d=function(){for(var e='<div class="item item-title d-flex-between">      <div class="title">\u5386\u53f2\u641c\u7d22</div>      <i class="iconfont clear-btn icon-zhengwenpinglun_shanchuicon"></i>      </div>',t=0;t<l.length;t++){var n=$("<div>").html(l[t]).text();e+='<div class="item item-text" title="'+n+'">'+n+"</div>"}return e},p=$('<div class="search-history-list-wrapper '+e.className+'">'+d()+'</div>"');return $(document).on("mousedown",".search-history-list-wrapper",function(e){e.preventDefault()}),$(document).on("click",".search-history-list-wrapper .item-text",function(){var e=$(this).text();c.val(e),o(),t&&t.onClick&&t.onClick(e)}),$(document).on("mouseenter",".search-history-list-wrapper .item-text",function(){var e=$(this).text();c.val(e)}),$(document).on("click",".search-history-list-wrapper .clear-btn",function(){r(),o(),s()}),$(document).on("click",e.selector,function(){a()}),$(window).on("resize",n(function(){i()},400)),$("body").append(p),i(),{add:function(t){if(t){var n=window.filterXSS(t,{stripIgnoreTag:!1,whiteList:{}});n=window.htmlSafe(n);var i=l.indexOf(n);if(i>-1){var o=l[i];l.splice(i,1),l.unshift(o)}else l.unshift(n),l.length>e.maxCount&&l.pop();localStorage.setItem(e.key,JSON.stringify(l)),s()}},clear:function(){r(),s()},show:function(){i(),a()},hide:function(){o()},removeSelf:function(){p.remove()},refresh:function(){s()},resize:function(){i()}}}},goBackReload:function(){document.referrer&&(location.href=document.referrer)},filterEmoji:function(e){return e?e.replace(/[\uD83C|\uD83D|\uD83E][\uDC00-\uDFFF][\u200D|\uFE0F]|[\uD83C|\uD83D|\uD83E][\uDC00-\uDFFF]|[0-9|*|#]\uFE0F\u20E3|[0-9|#]\u20E3|[\u203C-\u3299]\uFE0F\u200D|[\u203C-\u3299]\uFE0F|[\u2122-\u2B55]|\u303D|[\A9|\AE]\u3030|\uA9|\uAE|\u3030/gi,""):""},isPageInputState:function(){return!!document.activeElement&&["INPUT","TEXTAREA"].indexOf(document.activeElement.tagName)>-1},clearURLParams:function(){window.history&&history.replaceState?history.replaceState({},"",location.origin+location.pathname):Flash.error("\u8bf7\u66f4\u65b0\u60a8\u7684\u6d4f\u89c8\u5668\u540e\u7ee7\u7eed\u8bbf\u95ee")},once:function(e){var t=!1;return function(){t||(t=!0,e.apply(this,arguments))}},aiGenProjectName:function(e,t){$.post("/enhance/desc2name",{scene:"project",description:e.description,negative_words:e.negativeWords,language:e.language}).done(function(e){t(e.data)}).fail(function(){t()})},aiGenProjectDesc:function(e,t){$.post("/enhance/name2desc",{scene:"project",name:e.name,negative_words:e.negativeWords,language:e.language}).done(function(e){t(e.data)}).fail(function(){t()})},aiCheckLimit:function(e){$.get("/enhance/check_limited").done(function(t){e(t.data)}).fail(function(){e()})}}}),function(){function e(){if("hidden"in document)return document.hidden;for(var e=["webkit","moz","mos","o"],t=0,n=e.length;t<n;t++)if(e[t]+"Hidden"in document)return document[e[t]+"Hidden"];return!1}var t;"undefined"!=typeof document.hidden?(hidden="hidden",t="visibilitychange"):"undefined"!=typeof document.msHidden?(hidden="msHidden",t="msvisibilitychange"):"undefined"!=typeof document.webkitHidden&&(hidden="webkitHidden",t="webkitvisibilitychange"),document.addEventListener(t,window.globalUtils.throttle(function(){$(window).trigger("document:visibility",{isHidden:e()})},8e3),!1)}(),function(){this.Flash={hasElement:!1,show:function(e,t,n,i){var o,a,r;if(null==t&&(t="info"),null==n&&(n=3e3),r='<div data-notify="container" class="ui {0} message" role="alert"><i data-notify="dismiss" class="close icon"></i><span data-notify="message">{2}</span></div>',o={message:e=i?e:htmlSafe(e)},a={type:t},e)return a.delay=n,a.template=r,a.offset={x:10,y:30},a.element="#messages-container",this.hasElement||this.findOrInitElement(a),$.notify(o,a)},info:function(e,t){return null==t&&(t=3e3),this.show(e,"info",t)},error:function(e,t){return null==t&&(t=3e3),this.show(e,"error",t)},findOrInitElement:function(e){var t;return $(e.element).length||(t=e.element.replace("#",""),$("body").append('<div class="flash-messages" id="'+t+'"></div>')),this.hasElement=!0}}}.call(this),
DesignScreenshot/output/gitee_run/gitee.com_1_initial_page.html:360:!f.silent&&f.verbose&&f.debug&&(f.performance?A.performance.log(arguments):(A.verbose=Function.prototype.bind.call(console.info,console,f.name+":"),A.verbose.apply(console,arguments)))},error:function(){f.silent||(A.error=Function.prototype.bind.call(console.error,console,f.name+":"),A.error.apply(console,arguments))},performance:{log:function(e){var t,n;f.performance&&(n=(t=(new Date).getTime())-(s||t),s=t,c.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:z,"Execution Time":n})),clearTimeout(A.performance.timer),A.performance.timer=setTimeout(A.performance.display,500)},display:function(){var t=f.name+":",n=0;s=!1,clearTimeout(A.performance.timer),e.each(c,function(e,t){n+=t["Execution Time"]}),t+=" "+n+"ms",r&&(t+=" '"+r+"'"),a.length>1&&(t+=" ("+a.length+")"),(console.group!==i||console.table!==i)&&c.length>0&&(console.groupCollapsed(t),console.table?console.table(c):e.each(c,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),c=[]}},invoke:function(t,n,a){var r,s,c,l=h;return n=n||d,a=z||a,"string"==typeof t&&l!==i&&(t=t.split(/[\. ]/),r=t.length-1,e.each(t,function(n,o){var a=n!=r?o+t[n+1].charAt(0).toUpperCase()+t[n+1].slice(1):t;if(e.isPlainObject(l[a])&&n!=r)l=l[a];else{if(l[a]!==i)return s=l[a],!1;if(!e.isPlainObject(l[o])||n==r)return l[o]!==i&&(s=l[o],!1);l=l[o]}})),e.isFunction(s)?c=s.apply(a,n):s!==i&&(c=s),e.isArray(o)?o.push(c):o!==i?o=[o,c]:c!==i&&(o=c),s!==i&&s}}).initialize()}),o!==i?o:this},e.fn.transition.exists={},e.fn.transition.settings={name:"Transition",silent:!1,debug:!1,verbose:!1,performance:!0,namespace:"transition",interval:0,reverse:"auto",onStart:function(){},onComplete:function(){},onShow:function(){},onHide:function(){},useFailSafe:!0,failSafeDelay:100,allowRepeats:!1,displayType:!1,animation:"fade",duration:!1,queue:!0,metadata:{displayType:"display"},className:{animating:"animating",disabled:"disabled",hidden:"hidden",inward:"in",loading:"loading",looping:"looping",outward:"out",transition:"transition",visible:"visible"},error:{noAnimation:"Element is no longer attached to DOM. Unable to animate.  Use silent setting to surpress this warning in production.",repeated:"That animation is already occurring, cancelling repeated animation",method:"The method you called is not defined",support:"This browser does not support CSS animations"}}}(jQuery,window,document),function(e,t,n,i){"use strict";t=void 0!==t&&t.Math==Math?t:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),e.fn.dropdown=function(o){var a,r=e(this),s=e(n),c=r.selector||"",l="ontouchstart"in n.documentElement,u=(new Date).getTime(),d=[],p=arguments[0],f="string"==typeof p,h=[].slice.call(arguments,1);return r.each(function(m){var g,b,v,M,y,A,w,z,T=e.isPlainObject(o)?e.extend(!0,{},e.fn.dropdown.settings,o):e.extend({},e.fn.dropdown.settings),x=T.className,O=T.message,C=T.fields,k=T.keys,_=T.metadata,L=T.namespace,S=T.regExp,N=T.selector,q=T.error,E=T.templates,W="."+L,D="module-"+L,B=e(this),R=e(T.context),X=B.find(N.text),$=B.find(N.search),P=B.find(N.sizer),I=B.find(N.input),j=B.find(N.icon),F=B.prev().find(N.text).length>0?B.prev().find(N.text):B.prev(),H=B.children(N.menu),U=H.find(N.item),V=!1,Y=!1,G=!1,K=this,Q=B.data(D);z={initialize:function(){z.debug("Initializing dropdown",T),z.is.alreadySetup()?z.setup.reference():(z.setup.layout(),z.refreshData(),z.save.defaults(),z.restore.selected(),z.create.id(),z.bind.events(),z.observeChanges(),z.instantiate())},instantiate:function(){z.verbose("Storing instance of dropdown",z),Q=z,B.data(D,z)},destroy:function(){z.verbose("Destroying previous dropdown",B),z.remove.tabbable(),B.off(W).removeData(D),H.off(W),s.off(M),z.disconnect.menuObserver(),z.disconnect.selectObserver()},observeChanges:function(){"MutationObserver"in t&&(A=new MutationObserver(z.event.select.mutation),w=new MutationObserver(z.event.menu.mutation),z.debug("Setting up mutation observer",A,w),z.observe.select(),z.observe.menu())},disconnect:{menuObserver:function(){w&&w.disconnect()},selectObserver:function(){A&&A.disconnect()}},observe:{select:function(){z.has.input()&&A.observe(I[0],{childList:!0,subtree:!0})},menu:function(){z.has.menu()&&w.observe(H[0],{childList:!0,subtree:!0})}},create:{id:function(){y=(Math.random().toString(16)+"000000000").substr(2,8),M="."+y,z.verbose("Creating unique id for element",y)},userChoice:function(t){var n,o,a;return!!(t=t||z.get.userValues())&&(t=e.isArray(t)?t:[t],e.each(t,function(t,r){!1===z.get.item(r)&&(a=T.templates.addition(z.add.variables(O.addResult,r)),o=e("<div />").html(a).attr("data-"+_.value,r).attr("data-"+_.text,r).addClass(x.addition).addClass(x.item),T.hideAdditions&&o.addClass(x.hidden),n=n===i?o:n.add(o),z.verbose("Creating user choices for value",r,o))}),n)},userLabels:function(){var t=z.get.userValues();t&&(z.debug("Adding user labels",t),e.each(t,function(e,t){z.verbose("Adding custom user value"),z.add.label(t,t)}))},menu:function(){H=e("<div />").addClass(x.menu).appendTo(B)},sizer:function(){P=e("<span />").addClass(x.sizer).insertAfter($)}},search:function(e){e=e!==i?e:z.get.query(),z.verbose("Searching for query",e),z.has.minCharacters(e)?z.filter(e):z.hide()},select:{firstUnfiltered:function(){z.verbose("Selecting first non-filtered element"),z.remove.selectedItem(),U.not(N.unselectable).not(N.addition+N.hidden).eq(0).addClass(x.selected)},nextAvailable:function(e){var t=(e=e.eq(0)).nextAll(N.item).not(N.unselectable).eq(0),n=e.prevAll(N.item).not(N.unselectable).eq(0);t.length>0?(z.verbose("Moving selection to",t),t.addClass(x.selected)):(z.verbose("Moving selection to",n),n.addClass(x.selected))}},setup:{api:function(){var e={debug:T.debug,urlData:{value:z.get.value(),query:z.get.query()},on:!1};z.verbose("First request, initializing API"),B.api(e)},layout:function(){B.is("select")&&(z.setup.select(),z.setup.returnedObject()),z.has.menu()||z.create.menu(),z.is.search()&&!z.has.search()&&(z.verbose("Adding search input"),$=e("<input />").addClass(x.search).prop("autocomplete","off").insertBefore(X)),z.is.multiple()&&z.is.searchSelection()&&!z.has.sizer()&&z.create.sizer(),T.allowTab&&z.set.tabbable()},select:function(){var t=z.get.selectValues();z.debug("Dropdown initialized on a select",t),B.is("select")&&(I=B),I.parent(N.dropdown).length>0?(z.debug("UI dropdown already exists. Creating dropdown menu only"),B=I.closest(N.dropdown),z.has.menu()||z.create.menu(),H=B.children(N.menu),z.setup.menu(t)):(z.debug("Creating entire dropdown from select"),B=e("<div />").attr("class",I.attr("class")).addClass(x.selection).addClass(x.dropdown).html(E.dropdown(t)).insertBefore(I),I.hasClass(x.multiple)&&!1===I.prop("multiple")&&(z.error(q.missingMultiple),I.prop("multiple",!0)),I.is("[multiple]")&&z.set.multiple(),I.prop("disabled")&&(z.debug("Disabling dropdown"),B.addClass(x.disabled)),I.removeAttr("class").detach().prependTo(B)),z.refresh()},menu:function(e){H.html(E.menu(e,C)),U=H.find(N.item)},reference:function(){z.debug("Dropdown behavior was called on select, replacing with closest dropdown"),B=B.parent(N.dropdown),z.refresh(),z.setup.returnedObject(),f&&(Q=z,z.invoke(p))},returnedObject:function(){var e=r.slice(0,m),t=r.slice(m+1);r=e.add(B).add(t)}},refresh:function(){z.refreshSelectors(),z.refreshData()},refreshItems:function(){U=H.find(N.item)},refreshSelectors:function(){z.verbose("Refreshing selector cache"),X=B.find(N.text),$=B.find(N.search),I=B.find(N.input),j=B.find(N.icon),F=B.prev().find(N.text).length>0?B.prev().find(N.text):B.prev(),H=B.children(N.menu),U=H.find(N.item)},refreshData:function(){z.verbose("Refreshing cached metadata"),U.removeData(_.text).removeData(_.value)},clearData:function(){z.verbose("Clearing metadata"),U.removeData(_.text).removeData(_.value),B.removeData(_.defaultText).removeData(_.defaultValue).removeData(_.placeholderText)},toggle:function(){z.verbose("Toggling menu visibility"),z.is.active()?z.hide():z.show()},show:function(n){if(n=e.isFunction(n)?n:function(){},z.can.show()&&!z.is.active()){if(z.debug("Showing dropdown"),!z.has.message()||z.has.maxSelections()||z.has.allResultsFiltered()||z.remove.message(),z.is.allFiltered())return!0;!1!==T.onShow.call(K)&&z.animate.show(function(){z.can.click()&&z.bind.intent(),t.navigator.userAgent.indexOf("MSIE ")>0||navigator.userAgent.match(/Trident.*rv\:11\./)||z.has.menuSearch()&&z.focusSearch(),z.set.visible(),n.call(K)})}},hide:function(t){t=e.isFunction(t)?t:function(){},z.is.active()&&(z.debug("Hiding dropdown"),!1!==T.onHide.call(K)&&z.animate.hide(function(){z.remove.visible(),t.call(K)}))},hideOthers:function(){z.verbose("Finding other dropdowns to hide"),r.not(B).has(N.menu+"."+x.visible).dropdown("hide")},hideMenu:function(){z.verbose("Hiding menu  instantaneously"),z.remove.active(),z.remove.visible(),H.transition("hide")},hideSubMenus:function(){var e=H.children(N.item).find(N.menu);z.verbose("Hiding sub menus",e),e.transition("hide")},bind:{events:function(){l&&z.bind.touchEvents(),z.bind.keyboardEvents(),z.bind.inputEvents(),z.bind.mouseEvents()},touchEvents:function(){z.debug("Touch device detected binding additional touch events"),z.is.searchSelection()||z.is.single()&&B.on("touchstart"+W,z.event.test.toggle),H.on("touchstart"+W,N.item,z.event.item.mouseenter)},keyboardEvents:function(){z.verbose("Binding keyboard events"),B.on("keydown"+W,z.event.keydown),z.has.search()&&B.on(z.get.inputEvent()+W,N.search,z.event.input),z.is.multiple()&&s.on("keydown"+M,z.event.document.keydown)},inputEvents:function(){z.verbose("Binding input change events"),B.on("change"+W,N.input,z.event.change)},mouseEvents:function(){z.verbose("Binding mouse events"),z.is.multiple()&&B.on("click"+W,N.label,z.event.label.click).on("click"+W,N.remove,z.event.remove.click),z.is.searchSelection()?(B.on("mousedown"+W,z.event.mousedown).on("mouseup"+W,z.event.mouseup).on("mousedown"+W,N.menu,z.event.menu.mousedown).on("mouseup"+W,N.menu,z.event.menu.mouseup).on("click"+W,N.icon,z.event.icon.click).on("focus"+W,N.search,z.event.search.focus).on("click"+W,N.search,z.event.search.focus).on("blur"+W,N.search,z.event.search.blur).on("click"+W,N.text,z.event.text.focus),z.is.multiple()&&B.on("click"+W,z.event.click)):("click"==T.on?B.on("click"+W,N.icon,z.event.icon.click).on("click"+W,z.event.test.toggle):"hover"==T.on?B.on("mouseenter"+W,z.delay.show).on("mouseleave"+W,z.delay.hide):B.on(T.on+W,z.toggle),B.on("mousedown"+W,z.event.mousedown).on("mouseup"+W,z.event.mouseup).on("focus"+W,z.event.focus).on("blur"+W,z.event.blur)),H.on("mouseenter"+W,N.item,z.event.item.mouseenter).on("mouseleave"+W,N.item,z.event.item.mouseleave).on("click"+W,N.item,z.event.item.click)},intent:function(){z.verbose("Binding hide intent event to document"),l&&s.on("touchstart"+M,z.event.test.touch).on("touchmove"+M,z.event.test.touch),s.on("click"+M,z.event.test.hide)}},unbind:{intent:function(){z.verbose("Removing hide intent event from document"),l&&s.off("touchstart"+M).off("touchmove"+M),s.off("click"+M)}},filter:function(e){var t=e!==i?e:z.get.query(),n=function(){z.is.multiple()&&z.filterActive(),z.select.firstUnfiltered(),z.has.allResultsFiltered()?T.onNoResults.call(K,t)?T.allowAdditions?T.hideAdditions&&(z.verbose("User addition with no menu, setting empty style"),z.set.empty(),z.hideMenu()):(z.verbose("All items filtered, showing message",t),z.add.message(O.noResults)):(z.verbose("All items filtered, hiding dropdown",t),z.hideMenu()):(z.remove.empty(),z.remove.message()),T.allowAdditions&&z.add.userSuggestion(e),z.is.searchSelection()&&z.can.show()&&z.is.focusedOnSearch()&&z.show()};T.useLabels&&z.has.maxSelections()||(T.apiSettings?z.can.useAPI()?z.queryRemote(t,function(){n()}):z.error(q.noAPI):(z.filterItems(t),n()))},queryRemote:function(t,n){var i={errorDuration:!1,cache:"local",throttle:T.throttle,urlData:{query:t},onError:function(){z.add.message(O.serverError),n()},onFailure:function(){z.add.message(O.serverError),n()},onSuccess:function(e){z.remove.message(),z.setup.menu({values:e[C.remoteValues]}),n()}};B.api("get request")||z.setup.api(),i=e.extend(!0,{},i,T.apiSettings),B.api("setting",i).api("query")},filterItems:function(t){if(!T.disableLocalSearch){var n=t!==i?t:z.get.query(),o=null,a=z.escape.regExp(n),r=new RegExp("^"+a,"igm");z.has.query()&&(o=[],z.verbose("Searching for matching values",n),U.each(function(){var t,i,a=e(this);if("both"==T.match||"text"==T.match){if(-1!==(t=String(z.get.choiceText(a,!1))).search(r))return o.push(this),!0;if("exact"===T.fullTextSearch&&z.exactSearch(n,t))return o.push(this),!0;if(!0===T.fullTextSearch&&z.fuzzySearch(n,t))return o.push(this),!0}if("both"==T.match||"value"==T.match){if(-1!==(i=String(z.get.choiceValue(a,t))).search(r))return o.push(this),!0;if(T.fullTextSearch&&z.fuzzySearch(n,i))return o.push(this),!0}})),z.debug("Showing only matched items",n),z.remove.filteredItem(),o&&U.not(o).addClass(x.filtered)}},fuzzySearch:function(e,t){var n=t.length,i=e.length;if(e=e.toLowerCase(),t=t.toLowerCase(),i>n)return!1;if(i===n)return e===t;e:for(var o=0,a=0;o<i;o++){for(var r=e.charCodeAt(o);a<n;)if(t.charCodeAt(a++)===r)continue e;return!1}return!0},exactSearch:function(e,t){return e=e.toLowerCase(),(t=t.toLowerCase()).indexOf(e)>-1},filterActive:function(){T.useLabels&&U.filter("."+x.active).addClass(x.filtered)},focusSearch:function(e){z.has.search()&&!z.is.focusedOnSearch()&&(e?(B.off("focus"+W,N.search),$.focus(),B.on("focus"+W,N.search,z.event.search.focus)):$.focus())},forceSelection:function(){var e=U.not(x.filtered).filter("."+x.selected).eq(0),t=U.not(x.filtered).filter("."+x.active).eq(0),n=e.length>0?e:t;if(n.length>0)return z.debug("Forcing partial selection to selected item",n),void z.event.item.click.call(n,{},!0);T.allowAdditions?(z.set.selected(z.get.query()),z.remove.searchTerm()):z.remove.searchTerm()},event:{change:function(){G||(z.debug("Input changed, updating selection"),z.set.selected())},focus:function(){T.showOnFocus&&!V&&z.is.hidden()&&!b&&z.show()},blur:function(){b=n.activeElement===this,V||b||(z.remove.activeLabel(),z.hide())},mousedown:function(){z.is.searchSelection()?v=!0:V=!0},mouseup:function(){z.is.searchSelection()?v=!1:V=!1},click:function(t){e(t.target).is(B)&&(z.is.focusedOnSearch()?z.show():z.focusSearch())},search:{focus:function(){V=!0,z.is.multiple()&&z.remove.activeLabel(),T.showOnFocus&&z.search()},blur:function(){b=n.activeElement===this,v||Y||b||(T.forceSelection&&z.forceSelection(),z.hide()),v=!1}},icon:{click:function(){z.toggle()}},text:{focus:function(){V=!0,z.focusSearch()}},input:function(){(z.is.multiple()||z.is.searchSelection())&&z.set.filtered(),clearTimeout(z.timer),z.timer=setTimeout(z.search,T.delay.search)},label:{click:function(t){var n=e(this),i=B.find(N.label),o=i.filter("."+x.active),a=n.nextAll("."+x.active),r=n.prevAll("."+x.active),s=a.length>0?n.nextUntil(a).add(o).add(n):n.prevUntil(r).add(o).add(n);t.shiftKey?(o.removeClass(x.active),s.addClass(x.active)):t.ctrlKey?n.toggleClass(x.active):(o.removeClass(x.active),n.addClass(x.active)),T.onLabelSelect.apply(this,i.filter("."+x.active))}},remove:{click:function(){var t=e(this).parent();t.hasClass(x.active)?z.remove.activeLabels():z.remove.activeLabels(t)}},test:{toggle:function(e){var t=z.is.multiple()?z.show:z.toggle;z.is.bubbledLabelClick(e)||z.is.bubbledIconClick(e)||z.determine.eventOnElement(e,t)&&e.preventDefault()},touch:function(e){z.determine.eventOnElement(e,function(){"touchstart"==e.type?z.timer=setTimeout(function(){z.hide()},T.delay.touch):"touchmove"==e.type&&clearTimeout(z.timer)}),e.stopPropagation()},hide:function(e){z.determine.eventInModule(e,z.hide)}},select:{mutation:function(){z.debug("<select> modified, recreating menu"),z.setup.select()}},menu:{mutation:function(t){var n=t[0],i=n.addedNodes?e(n.addedNodes[0]):e(!1),o=n.removedNodes?e(n.removedNodes[0]):e(!1),a=i.add(o),r=a.is(N.addition)||a.closest(N.addition).length>0,s=a.is(N.message)||a.closest(N.message).length>0;r||s?(z.debug("Updating item selector cache"),z.refreshItems()):(z.debug("Menu modified, updating selector cache"),z.refresh())},mousedown:function(){Y=!0},mouseup:function(){Y=!1}},item:{mouseenter:function(t){var n=e(t.target),i=e(this),o=i.children(N.menu),a=i.siblings(N.item).children(N.menu),r=o.length>0;!(o.find(n).length>0)&&r&&(clearTimeout(z.itemTimer),z.itemTimer=setTimeout(function(){z.verbose("Showing sub-menu",o),e.each(a,function(){z.animate.hide(!1,e(this))}),z.animate.show(!1,o)},T.delay.show),t.preventDefault())},mouseleave:function(){var t=e(this).children(N.menu);t.length>0&&(clearTimeout(z.itemTimer),z.itemTimer=setTimeout(function(){z.verbose("Hiding sub-menu",t),z.animate.hide(!1,t)},T.delay.hide))},click:function(t,n){var i=e(this),o=e(t?t.target:""),a=i.find(N.menu),r=z.get.choiceText(i),s=z.get.choiceValue(i,r),c=a.length>0;a.find(o).length>0||c&&!T.allowCategorySelection||(z.is.searchSelection()&&(T.allowAdditions&&z.remove.userAddition(),z.remove.searchTerm(),z.is.focusedOnSearch()||1==n||z.focusSearch(!0)),T.useLabels||(z.remove.filteredItem(),z.set.scrollPosition(i)),z.determine.selectAction.call(this,r,s))}},document:{keydown:function(e){var t=e.which;if(z.is.inObject(t,k)){var n=B.find(N.label),i=n.filter("."+x.active),o=(i.data(_.value),n.index(i)),a=n.length,r=i.length>0,s=i.length>1,c=0===o,l=o+1==a,u=z.is.searchSelection(),d=z.is.focusedOnSearch(),p=z.is.focused(),f=d&&0===z.get.caretPosition();if(u&&!r&&!d)return;t==k.leftArrow?!p&&!f||r?r&&(e.shiftKey?z.verbose("Adding previous label to selection"):(z.verbose("Selecting previous label"),n.removeClass(x.active)),c&&!s?i.addClass(x.active):i.prev(N.siblingLabel).addClass(x.active).end(),e.preventDefault()):(z.verbose("Selecting previous label"),n.last().addClass(x.active)):t==k.rightArrow?(p&&!r&&n.first().addClass(x.active),r&&(e.shiftKey?z.verbose("Adding next label to selection"):(z.verbose("Selecting next label"),n.removeClass(x.active)),l?u?d?n.removeClass(x.active):z.focusSearch():s?i.next(N.siblingLabel).addClass(x.active):i.addClass(x.active):i.next(N.siblingLabel).addClass(x.active),e.preventDefault())):t==k.deleteKey||t==k.backspace?r?(z.verbose("Removing active labels"),l&&u&&!d&&z.focusSearch(),i.last().next(N.siblingLabel).addClass(x.active),z.remove.activeLabels(i),e.preventDefault()):f&&!r&&t==k.backspace&&(z.verbose("Removing last label on input backspace"),i=n.last().addClass(x.active),z.remove.activeLabels(i)):i.removeClass(x.active)}}},keydown:function(e){var t=e.which;if(z.is.inObject(t,k)){var n,i=U.not(N.unselectable).filter("."+x.selected).eq(0),o=H.children("."+x.active).eq(0),a=i.length>0?i:o,r=a.length>0?a.siblings(":not(."+x.filtered+")").addBack():H.children(":not(."+x.filtered+")"),s=a.children(N.menu),c=a.closest(N.menu),l=c.hasClass(x.visible)||c.hasClass(x.animating)||c.parent(N.menu).length>0,u=s.length>0,d=a.length>0,p=a.not(N.unselectable).length>0,f=t==k.delimiter&&T.allowAdditions&&z.is.multiple();if(T.allowAdditions&&T.hideAdditions&&(t==k.enter||f)&&p&&(z.verbose("Selecting item from keyboard shortcut",a),z.event.item.click.call(a,e),z.is.searchSelection()&&z.remove.searchTerm()),z.is.visible()){if((t==k.enter||f)&&(t==k.enter&&d&&u&&!T.allowCategorySelection?(z.verbose("Pressed enter on unselectable category, opening sub menu"),t=k.rightArrow):p&&(z.verbose("Selecting item from keyboard shortcut",a),z.event.item.click.call(a,e),z.is.searchSelection()&&z.remove.searchTerm()),e.preventDefault()),d&&(t==k.leftArrow&&c[0]!==H[0]&&(z.verbose("Left key pressed, closing sub-menu"),z.animate.hide(!1,c),a.removeClass(x.selected),c.closest(N.item).addClass(x.selected),e.preventDefault()),t==k.rightArrow&&u&&(z.verbose("Right key pressed, opening sub-menu"),z.animate.show(!1,s),a.removeClass(x.selected),s.find(N.item).eq(0).addClass(x.selected),e.preventDefault())),t==k.upArrow){if(n=d&&l?a.prevAll(N.item+":not("+N.unselectable+")").eq(0):U.eq(0),r.index(n)<0)return z.verbose("Up key pressed but reached top of current menu"),void e.preventDefault();z.verbose("Up key pressed, changing active item"),a.removeClass(x.selected),n.addClass(x.selected),z.set.scrollPosition(n),T.selectOnKeydown&&z.is.single()&&z.set.selectedItem(n),e.preventDefault()}if(t==k.downArrow){if(0===(n=d&&l?n=a.nextAll(N.item+":not("+N.unselectable+")").eq(0):U.eq(0)).length)return z.verbose("Down key pressed but reached bottom of current menu"),void e.preventDefault();z.verbose("Down key pressed, changing active item"),U.removeClass(x.selected),n.addClass(x.selected),z.set.scrollPosition(n),T.selectOnKeydown&&z.is.single()&&z.set.selectedItem(n),e.preventDefault()}t==k.pageUp&&(z.scrollPage("up"),e.preventDefault()),t==k.pageDown&&(z.scrollPage("down"),e.preventDefault()),t==k.escape&&(z.verbose("Escape key pressed, closing dropdown"),z.hide())}else f&&e.preventDefault(),t!=k.downArrow||z.is.visible()||(z.verbose("Down key pressed, showing dropdown"),z.select.firstUnfiltered(),z.show(),e.preventDefault())}else z.has.search()||z.set.selectedLetter(String.fromCharCode(t))}},trigger:{change:function(){var e=n.createEvent("HTMLEvents"),t=I[0];t&&(z.verbose("Triggering native change event"),e.initEvent("change",!0,!1),t.dispatchEvent(e))}},determine:{selectAction:function(t,n){z.verbose("Determining action",T.action),e.isFunction(z.action[T.action])?(z.verbose("Triggering preset action",T.action,t,n),z.action[T.action].call(K,t,n,this)):e.isFunction(T.action)?(z.verbose("Triggering user action",T.action,t,n),T.action.call(K,t,n,this)):z.error(q.action,T.action)},eventInModule:function(t,i){var o=e(t.target),a=o.closest(n.documentElement).length>0,r=o.closest(B).length>0;return i=e.isFunction(i)?i:function(){},a&&!r?(z.verbose("Triggering event",i),i(),!0):(z.verbose("Event occurred in dropdown, canceling callback"),!1)},eventOnElement:function(t,i){var o=e(t.target),a=o.closest(N.siblingLabel),r=n.body.contains(t.target),s=0===B.find(a).length,c=0===o.closest(H).length;return i=e.isFunction(i)?i:function(){},r&&s&&c?(z.verbose("Triggering event",i),i(),!0):(z.verbose("Event occurred in dropdown menu, canceling callback"),!1)}},action:{nothing:function(){},activate:function(t,n,o){if(n=n!==i?n:t,z.can.activate(e(o))){if(z.set.selected(n,e(o)),z.is.multiple()&&!z.is.allFiltered())return;z.hideAndClear()}},select:function(t,n,o){if(n=n!==i?n:t,z.can.activate(e(o))){if(z.set.value(n,e(o)),z.is.multiple()&&!z.is.allFiltered())return;z.hideAndClear()}},combo:function(t,n,o){n=n!==i?n:t,z.set.selected(n,e(o)),z.hideAndClear()},hide:function(e,t){z.set.value(t,e),z.hideAndClear()}},get:{id:function(){return y},defaultText:function(){return B.data(_.defaultText)},defaultValue:function(){return B.data(_.defaultValue)},placeholderText:function(){return B.data(_.placeholderText)||""},text:function(){return X.text()},query:function(){return e.trim($.val())},searchWidth:function(e){return e=e!==i?e:$.val(),P.text(e),Math.ceil(P.width()+1)},selectionCount:function(){var t=z.get.values();return z.is.multiple()?e.isArray(t)?t.length:0:""!==z.get.value()?1:0},transition:function(e){return"auto"==T.transition?z.is.upward(e)?"slide up":"slide down":T.transition},userValues:function(){var t=z.get.values();return!!t&&(t=e.isArray(t)?t:[t],e.grep(t,function(e){return!1===z.get.item(e)}))},uniqueArray:function(t){return e.grep(t,function(n,i){return e.inArray(n,t)===i})},caretPosition:function(){var e,t,i=$.get(0);return"selectionStart"in i?i.selectionStart:n.selection?(i.focus(),t=(e=n.selection.createRange()).text.length,e.moveStart("character",-i.value.length),e.text.length-t):void 0},value:function(){var t=I.length>0?I.val():B.data(_.value),n=e.isArray(t)&&1===t.length&&""===t[0];return t===i||n?"":t},values:function(){var e=z.get.value();return""===e?"":!z.has.selectInput()&&z.is.multiple()?"string"==typeof e?e.split(T.delimiter):"":e},remoteValues:function(){var t=z.get.values(),n=!1;return t&&("string"==typeof t&&(t=[t]),e.each(t,function(e,t){var i=z.read.remoteData(t);z.verbose("Restoring value from session data",i,t),i&&(n||(n={}),n[t]=i)})),n},choiceText:function(t,n){if(n=n!==i?n:T.preserveHTML,t)return t.find(N.menu).length>0&&(z.verbose("Retrieving text of element with sub-menu"),(t=t.clone()).find(N.menu).remove(),t.find(N.menuIcon).remove()),t.data(_.text)!==i?t.data(_.text):n?e.trim(t.html()):e.trim(t.text())},choiceValue:function(t,n){return n=n||z.get.choiceText(t),!!t&&(t.data(_.value)!==i?String(t.data(_.value)):"string"==typeof n?e.trim(n.toLowerCase()):String(n))},inputEvent:function(){var e=$[0];return!!e&&(e.oninput!==i?"input":e.onpropertychange!==i?"propertychange":"keyup")},selectValues:function(){var t={values:[]};return B.find("option").each(function(){var n=e(this),o=n.html(),a=n.attr("disabled"),r=n.attr("value")!==i?n.attr("value"):o;"auto"===T.placeholder&&""===r?t.placeholder=o:t.values.push({name:o,value:r,disabled:a})}),T.placeholder&&"auto"!==T.placeholder&&(z.debug("Setting placeholder value to",T.placeholder),t.placeholder=T.placeholder),T.sortSelect?(t.values.sort(function(e,t){return e.name>t.name?1:-1}),z.debug("Retrieved and sorted values from select",t)):z.debug("Retrieved values from select",t),t},activeItem:function(){return U.filter("."+x.active)},selectedItem:function(){var e=U.not(N.unselectable).filter("."+x.selected);return e.length>0?e:U.eq(0)},itemWithAdditions:function(e){var t=z.get.item(e),n=z.create.userChoice(e);return n&&n.length>0&&(t=t.length>0?t.add(n):n),t},item:function(t,n){var o,a,r=!1;return t=t!==i?t:z.get.values()!==i?z.get.values():z.get.text(),o=a?t.length>0:t!==i&&null!==t,a=z.is.multiple()&&e.isArray(t),n=""===t||0===t||(n||!1),o&&U.each(function(){var o=e(this),s=z.get.choiceText(o),c=z.get.choiceValue(o,s);if(null!==c&&c!==i)if(a)-1===e.inArray(String(c),t)&&-1===e.inArray(s,t)||(r=r?r.add(o):o);else if(n){if(z.verbose("Ambiguous dropdown value using strict type check",o,t),c===t||s===t)return r=o,!0}else if(String(c)==String(t)||s==t)return z.verbose("Found select item by value",c,t),r=o,!0}),r}},check:{maxSelections:function(e){return!T.maxSelections||((e=e!==i?e:z.get.selectionCount())>=T.maxSelections?(z.debug("Maximum selection count reached"),T.useLabels&&(U.addClass(x.filtered),z.add.message(O.maxSelections)),!0):(z.verbose("No longer at maximum selection count"),z.remove.message(),z.remove.filteredItem(),z.is.searchSelection()&&z.filterItems(),!1))}},restore:{defaults:function(){z.clear(),z.restore.defaultText(),z.restore.defaultValue()},defaultText:function(){var e=z.get.defaultText();e===z.get.placeholderText?(z.debug("Restoring default placeholder text",e),z.set.placeholderText(e)):(z.debug("Restoring default text",e),z.set.text(e))},placeholderText:function(){z.set.placeholderText()},defaultValue:function(){var e=z.get.defaultValue();e!==i&&(z.debug("Restoring default value",e),""!==e?(z.set.value(e),z.set.selected()):(z.remove.activeItem(),z.remove.selectedItem()))},labels:function(){T.allowAdditions&&(T.useLabels||(z.error(q.labels),T.useLabels=!0),z.debug("Restoring selected values"),z.create.userLabels()),z.check.maxSelections()},selected:function(){z.restore.values(),z.is.multiple()?(z.debug("Restoring previously selected values and labels"),z.restore.labels()):z.debug("Restoring previously selected values")},values:function(){z.set.initialLoad(),T.apiSettings&&T.saveRemoteData&&z.get.remoteValues()?z.restore.remoteValues():z.set.selected(),z.remove.initialLoad()},remoteValues:function(){var t=z.get.remoteValues();z.debug("Recreating selected from session data",t),t&&(z.is.single()?e.each(t,function(e,t){z.set.text(t)}):e.each(t,function(e,t){z.add.label(e,t)}))}},read:{remoteData:function(e){var n;if(t.Storage!==i)return(n=sessionStorage.getItem(e))!==i&&n;z.error(q.noStorage)}},save:{defaults:function(){z.save.defaultText(),z.save.placeholderText(),z.save.defaultValue()},defaultValue:function(){var e=z.get.value();z.verbose("Saving default value as",e),B.data(_.defaultValue,e)},defaultText:function(){var e=z.get.text();z.verbose("Saving default text as",e),B.data(_.defaultText,e)},placeholderText:function(){var e;!1!==T.placeholder&&X.hasClass(x.placeholder)&&(e=z.get.text(),z.verbose("Saving placeholder text as",e),B.data(_.placeholderText,e))},remoteData:function(e,n){t.Storage!==i?(z.verbose("Saving remote data to session storage",n,e),sessionStorage.setItem(n,e)):z.error(q.noStorage)}},clear:function(){z.is.multiple()&&T.useLabels?z.remove.labels():(z.remove.activeItem(),z.remove.selectedItem()),z.set.placeholderText(),z.clearValue()},clearValue:function(){z.set.value("")},scrollPage:function(e,t){var n,i,o=t||z.get.selectedItem(),a=o.closest(N.menu),r=a.outerHeight(),s=a.scrollTop(),c=U.eq(0).outerHeight(),l=Math.floor(r/c),u=(a.prop("scrollHeight"),"up"==e?s-c*l:s+c*l),d=U.not(N.unselectable);i="up"==e?d.index(o)-l:d.index(o)+l,(n=("up"==e?i>=0:i<d.length)?d.eq(i):"up"==e?d.first():d.last()).length>0&&(z.debug("Scrolling page",e,n),o.removeClass(x.selected),n.addClass(x.selected),T.selectOnKeydown&&z.is.single()&&z.set.selectedItem(n),a.scrollTop(u))},set:{filtered:function(){var e=z.is.multiple(),t=z.is.searchSelection(),n=e&&t,i=t?z.get.query():"",o="string"==typeof i&&i.length>0,a=z.get.searchWidth(),r=""!==i;e&&o&&(z.verbose("Adjusting input width",a,T.glyphWidth),$.css("width",a)),o||n&&r?(z.verbose("Hiding placeholder text"),X.addClass(x.filtered)):(!e||n&&!r)&&(z.verbose("Showing placeholder text"),X.removeClass(x.filtered))},empty:function(){B.addClass(x.empty)},loading:function(){B.addClass(x.loading)},placeholderText:function(e){e=e||z.get.placeholderText(),z.debug("Setting placeholder text",e),z.set.text(e),X.addClass(x.placeholder)},tabbable:function(){z.has.search()?(z.debug("Added tabindex to searchable dropdown"),$.val("").attr("tabindex",0),H.attr("tabindex",-1)):(z.debug("Added tabindex to dropdown"),B.attr("tabindex")===i&&(B.attr("tabindex",0),H.attr("tabindex",-1)))},initialLoad:function(){z.verbose("Setting initial load"),g=!0},activeItem:function(e){T.allowAdditions&&e.filter(N.addition).length>0?e.addClass(x.filtered):e.addClass(x.active)},partialSearch:function(e){var t=z.get.query().length;$.val(e.substr(0,t))},scrollPosition:function(e,t){var n,o,a,r,s,c,l=5;n=(e=e||z.get.selectedItem()).closest(N.menu),o=e&&e.length>0,t=t!==i&&t,e&&n.length>0&&o&&(e.position().top,n.addClass(x.loading),a=(r=n.scrollTop())-n.offset().top+e.offset().top,t||(c=r+n.height()<a+l,s=a-l<r),z.debug("Scrolling to active item",a),(t||s||c)&&n.scrollTop(a),n.removeClass(x.loading))},text:function(e){"select"!==T.action&&("combo"==T.action?(z.debug("Changing combo button text",e,F),T.preserveHTML?F.html(e):F.text(e)):(e!==z.get.placeholderText()&&X.removeClass(x.placeholder),z.debug("Changing text",e,X),X.removeClass(x.filtered),T.preserveHTML?X.html(e):X.text(e)))},selectedItem:function(e){var t=z.get.choiceValue(e),n=z.get.choiceText(e,!1);z.debug("Setting user selection to item",e),z.remove.activeItem(),z.set.partialSearch(n),z.set.activeItem(e),z.set.selected(t,e),z.set.text(n)},selectedLetter:function(t){var n,i=U.filter("."+x.selected),o=i.length>0&&z.has.firstLetter(i,t),a=!1;o&&(n=i.nextAll(U).eq(0),z.has.firstLetter(n,t)&&(a=n)),a||U.each(function(){if(z.has.firstLetter(e(this),t))return a=e(this),!1}),a&&(z.verbose("Scrolling to next value with letter",t),z.set.scrollPosition(a),i.removeClass(x.selected),a.addClass(x.selected),T.selectOnKeydown&&z.is.single()&&z.set.selectedItem(a))},direction:function(e){"auto"==T.direction?z.is.onScreen(e)?z.remove.upward(e):z.set.upward(e):"upward"==T.direction&&z.set.upward(e)},upward:function(e){(e||B).addClass(x.upward)},value:function(e,t,n){var o=z.escape.value(e),a=I.length>0,r=(z.has.value(e),z.get.values()),s=e!==i?String(e):e;if(a){if(!T.allowReselection&&s==r&&(z.verbose("Skipping value update already same value",e,r),!z.is.initialLoad()))return;z.is.single()&&z.has.selectInput()&&z.can.extendSelect()&&(z.debug("Adding user option",e),z.add.optionValue(e)),z.debug("Updating input value",o,r),G=!0,I.val(o),!1===T.fireOnInit&&z.is.initialLoad()?z.debug("Input native change event ignored on initial load"):z.trigger.change(),G=!1}else z.verbose("Storing value in metadata",o,I),o!==r&&B.data(_.value,s);!1===T.fireOnInit&&z.is.initialLoad()?z.verbose("No callback on initial load",T.onChange):T.onChange.call(K,e,t,n)},active:function(){B.addClass(x.active)},multiple:function(){B.addClass(x.multiple)},visible:function(){B.addClass(x.visible)},exactly:function(e,t){z.debug("Setting selected to exact values"),z.clear(),z.set.selected(e,t)},selected:function(t,n){var i=z.is.multiple();(n=T.allowAdditions?n||z.get.itemWithAdditions(t):n||z.get.item(t))&&(z.debug("Setting selected menu item to",n),z.is.multiple()&&z.remove.searchWidth(),z.is.single()?(z.remove.activeItem(),
DesignScreenshot/output/gitee_run/gitee.com_1_initial_page.html:370:regExp:{escape:/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,beginsWith:"(?:s|^)"},fields:{categories:"results",categoryName:"name",categoryResults:"results",description:"description",image:"image",price:"price",results:"results",title:"title",url:"url",action:"action",actionText:"text",actionURL:"url"},selector:{prompt:".prompt",searchButton:".search.button",results:".results",message:".results > .message",category:".category",result:".result",title:".title, .name"},templates:{escape:function(e){var t=/[&<>"'`]/g,n={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},i=function(e){return n[e]};return/[&<>"'`]/.test(e)?e.replace(t,i):e},message:function(e,t){var n="";return e!==i&&t!==i&&(n+='<div class="message '+t+'">',n+="empty"==t?'<div class="header">No Results</div class="header"><div class="description">'+e+'</div class="description">':' <div class="description">'+e+"</div>",n+="</div>"),n},category:function(t,n){var o="";e.fn.search.settings.templates.escape;return t[n.categoryResults]!==i&&(e.each(t[n.categoryResults],function(t,a){a[n.results]!==i&&a.results.length>0&&(o+='<div class="category">',a[n.categoryName]!==i&&(o+='<div class="name">'+a[n.categoryName]+"</div>"),o+='<div class="results">',e.each(a.results,function(e,t){t[n.url]?o+='<a class="result" href="'+t[n.url]+'">':o+='<a class="result">',t[n.image]!==i&&(o+='<div class="image"> <img src="'+t[n.image]+'"></div>'),o+='<div class="content">',t[n.price]!==i&&(o+='<div class="price">'+t[n.price]+"</div>"),t[n.title]!==i&&(o+='<div class="title">'+t[n.title]+"</div>"),t[n.description]!==i&&(o+='<div class="description">'+t[n.description]+"</div>"),o+="</div>",o+="</a>"}),o+="</div>",o+="</div>")}),t[n.action]&&(o+='<a href="'+t[n.action][n.actionURL]+'" class="action">'+t[n.action][n.actionText]+"</a>"),o)},standard:function(t,n){var o="";return t[n.results]!==i&&(e.each(t[n.results],function(e,t){t[n.url]?o+='<a class="result" href="'+t[n.url]+'">':o+='<a class="result">',t[n.image]!==i?o+='<div class="image"> <img src="'+t[n.image]+'"></div>':t[n.icon]!==i&&(o+='<div class="icon"> <i class="'+t[n.icon]+'"></i></div>'),o+='<div class="content">',t[n.price]!==i&&(o+='<div class="price">'+t[n.price]+"</div>"),t[n.title]!==i&&(o+='<div class="title">'+t[n.title]+"</div>"),t[n.description]!==i&&(o+='<div class="description">'+t[n.description]+"</div>"),o+="</div>",o+="</a>"}),t[n.action]&&(o+='<a href="'+t[n.action][n.actionURL]+'" class="action">'+t[n.action][n.actionText]+"</a>"),o)}}}}(jQuery,window,document),function(e,t,n,i){"use strict";t=void 0!==t&&t.Math==Math?t:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();e.api=e.fn.api=function(n){var o,a=e.isFunction(this)?e(t):e(this),r=a.selector||"",s=(new Date).getTime(),c=[],l=arguments[0],u="string"==typeof l,d=[].slice.call(arguments,1);return a.each(function(){var a,p,f,h,m,g,b=e.isPlainObject(n)?e.extend(!0,{},e.fn.api.settings,n):e.extend({},e.fn.api.settings),v=b.namespace,M=b.metadata,y=b.selector,A=b.error,w=b.className,z="."+v,T="module-"+v,x=e(this),O=x.closest(y.form),C=b.stateContext?e(b.stateContext):x,k=this,_=C[0],L=x.data(T);g={initialize:function(){u||g.bind.events(),g.instantiate()},instantiate:function(){g.verbose("Storing instance of module",g),L=g,x.data(T,L)},destroy:function(){g.verbose("Destroying previous module for",k),x.removeData(T).off(z)},bind:{events:function(){var e=g.get.event();e?(g.verbose("Attaching API events to element",e),x.on(e+z,g.event.trigger)):"now"==b.on&&(g.debug("Querying API endpoint immediately"),g.query())}},decode:{json:function(e){if(e!==i&&"string"==typeof e)try{e=JSON.parse(e)}catch(t){}return e}},read:{cachedResponse:function(e){var n;if(t.Storage!==i)return n=sessionStorage.getItem(e),g.debug("Using cached response",e,n),n=g.decode.json(n);g.error(A.noStorage)}},write:{cachedResponse:function(n,o){o&&""===o?g.debug("Response empty, not caching",o):t.Storage!==i?(e.isPlainObject(o)&&(o=JSON.stringify(o)),sessionStorage.setItem(n,o),g.verbose("Storing cached response for url",n,o)):g.error(A.noStorage)}},query:function(){if(g.is.disabled())g.debug("Element is disabled API request aborted");else{if(g.is.loading()){if(!b.interruptRequests)return void g.debug("Cancelling request, previous request is still pending");g.debug("Interrupting previous request"),g.abort()}if(b.defaultData&&e.extend(!0,b.urlData,g.get.defaultData()),b.serializeForm&&(b.data=g.add.formData(b.data)),!1===(p=g.get.settings()))return g.cancelled=!0,void g.error(A.beforeSend);if(g.cancelled=!1,(f=g.get.templatedURL())||g.is.mocked()){if((f=g.add.urlData(f))||g.is.mocked()){if(p.url=b.base+f,a=e.extend(!0,{},b,{type:b.method||b.type,data:h,url:b.base+f,beforeSend:b.beforeXHR,success:function(){},failure:function(){},complete:function(){}}),g.debug("Querying URL",a.url),g.verbose("Using AJAX settings",a),"local"===b.cache&&g.read.cachedResponse(f))return g.debug("Response returned from local cache"),g.request=g.create.request(),void g.request.resolveWith(_,[g.read.cachedResponse(f)]);b.throttle?b.throttleFirstRequest||g.timer?(g.debug("Throttling request",b.throttle),clearTimeout(g.timer),g.timer=setTimeout(function(){g.timer&&delete g.timer,g.debug("Sending throttled request",h,a.method),g.send.request()},b.throttle)):(g.debug("Sending request",h,a.method),g.send.request(),g.timer=setTimeout(function(){},b.throttle)):(g.debug("Sending request",h,a.method),g.send.request())}}else g.error(A.missingURL)}},should:{removeError:function(){return!0===b.hideError||"auto"===b.hideError&&!g.is.form()}},is:{disabled:function(){return x.filter(y.disabled).length>0},expectingJSON:function(){return"json"===b.dataType||"jsonp"===b.dataType},form:function(){return x.is("form")||C.is("form")},mocked:function(){return b.mockResponse||b.mockResponseAsync||b.response||b.responseAsync},input:function(){return x.is("input")},loading:function(){return!!g.request&&"pending"==g.request.state()},abortedRequest:function(e){return e&&e.readyState!==i&&0===e.readyState?(g.verbose("XHR request determined to be aborted"),!0):(g.verbose("XHR request was not aborted"),!1)},validResponse:function(t){return g.is.expectingJSON()&&e.isFunction(b.successTest)?(g.debug("Checking JSON returned success",b.successTest,t),b.successTest(t)?(g.debug("Response passed success test",t),!0):(g.debug("Response failed success test",t),!1)):(g.verbose("Response is not JSON, skipping validation",b.successTest,t),!0)}},was:{cancelled:function(){return g.cancelled||!1},succesful:function(){return g.request&&"resolved"==g.request.state()},failure:function(){return g.request&&"rejected"==g.request.state()},complete:function(){return g.request&&("resolved"==g.request.state()||"rejected"==g.request.state())}},add:{urlData:function(t,n){var o,a;return t&&(o=t.match(b.regExp.required),a=t.match(b.regExp.optional),n=n||b.urlData,o&&(g.debug("Looking for required URL variables",o),e.each(o,function(o,a){var r=-1!==a.indexOf("$")?a.substr(2,a.length-3):a.substr(1,a.length-2),s=e.isPlainObject(n)&&n[r]!==i?n[r]:x.data(r)!==i?x.data(r):C.data(r)!==i?C.data(r):n[r];if(s===i)return g.error(A.requiredParameter,r,t),t=!1,!1;g.verbose("Found required variable",r,s),s=b.encodeParameters?g.get.urlEncodedValue(s):s,t=t.replace(a,s)})),a&&(g.debug("Looking for optional URL variables",o),e.each(a,function(o,a){var r=-1!==a.indexOf("$")?a.substr(3,a.length-4):a.substr(2,a.length-3),s=e.isPlainObject(n)&&n[r]!==i?n[r]:x.data(r)!==i?x.data(r):C.data(r)!==i?C.data(r):n[r];s!==i?(g.verbose("Optional variable Found",r,s),t=t.replace(a,s)):(g.verbose("Optional variable not found",r),t=-1!==t.indexOf("/"+a)?t.replace("/"+a,""):t.replace(a,""))}))),t},formData:function(t){var n=e.fn.serializeObject!==i,o=n?O.serializeObject():O.serialize();return t=t||b.data,e.isPlainObject(t)?n?(g.debug("Extending existing data with form data",t,o),t=e.extend(!0,{},t,o)):(g.error(A.missingSerialize),g.debug("Cant extend data. Replacing data with form data",t,o),t=o):(g.debug("Adding form data",o),t=o),t}},send:{request:function(){g.set.loading(),g.request=g.create.request(),g.is.mocked()?g.mockedXHR=g.create.mockedXHR():g.xhr=g.create.xhr(),b.onRequest.call(_,g.request,g.xhr)}},event:{trigger:function(e){g.query(),"submit"!=e.type&&"click"!=e.type||e.preventDefault()},xhr:{always:function(){},done:function(t,n,i){var o=this,a=(new Date).getTime()-m,r=b.loadingDuration-a,s=!!e.isFunction(b.onResponse)&&(g.is.expectingJSON()?b.onResponse.call(o,e.extend(!0,{},t)):b.onResponse.call(o,t));r=r>0?r:0,s&&(g.debug("Modified API response in onResponse callback",b.onResponse,s,t),t=s),r>0&&g.debug("Response completed early delaying state change by",r),setTimeout(function(){g.is.validResponse(t)?g.request.resolveWith(o,[t,i]):g.request.rejectWith(o,[i,"invalid"])},r)},fail:function(e,t,n){var i=this,o=(new Date).getTime()-m,a=b.loadingDuration-o;(a=a>0?a:0)>0&&g.debug("Response completed early delaying state change by",a),setTimeout(function(){g.is.abortedRequest(e)?g.request.rejectWith(i,[e,"aborted",n]):g.request.rejectWith(i,[e,"error",t,n])},a)}},request:{done:function(e,t){g.debug("Successful API Response",e),"local"===b.cache&&f&&(g.write.cachedResponse(f,e),g.debug("Saving server response locally",g.cache)),b.onSuccess.call(_,e,x,t)},complete:function(e,t){var n,i;g.was.succesful()?(i=e,n=t):(n=e,i=g.get.responseFromXHR(n)),g.remove.loading(),b.onComplete.call(_,i,x,n)},fail:function(e,t,n){var o=g.get.responseFromXHR(e),r=g.get.errorFromRequest(o,t,n);if("aborted"==t)return g.debug("XHR Aborted (Most likely caused by page navigation or CORS Policy)",t,n),b.onAbort.call(_,t,x,e),!0;"invalid"==t?g.debug("JSON did not pass success test. A server-side error has most likely occurred",o):"error"==t&&e!==i&&(g.debug("XHR produced a server error",t,n),200!=e.status&&n!==i&&""!==n&&g.error(A.statusMessage+n,a.url),b.onError.call(_,r,x,e)),b.errorDuration&&"aborted"!==t&&(g.debug("Adding error state"),g.set.error(),g.should.removeError()&&setTimeout(g.remove.error,b.errorDuration)),g.debug("API Request failed",r,e),b.onFailure.call(_,o,x,e)}}},create:{request:function(){return e.Deferred().always(g.event.request.complete).done(g.event.request.done).fail(g.event.request.fail)},mockedXHR:function(){var t,n,i,o=!1,a=!1,r=!1,s=b.mockResponse||b.response,c=b.mockResponseAsync||b.responseAsync;return i=e.Deferred().always(g.event.xhr.complete).done(g.event.xhr.done).fail(g.event.xhr.fail),s?(e.isFunction(s)?(g.debug("Using specified synchronous callback",s),n=s.call(_,p)):(g.debug("Using settings specified response",s),n=s),i.resolveWith(_,[n,o,{responseText:n}])):e.isFunction(c)&&(t=function(e){g.debug("Async callback returned response",e),e?i.resolveWith(_,[e,o,{responseText:e}]):i.rejectWith(_,[{responseText:e},a,r])},g.debug("Using specified async response callback",c),c.call(_,p,t)),i},xhr:function(){var t;return t=e.ajax(a).always(g.event.xhr.always).done(g.event.xhr.done).fail(g.event.xhr.fail),g.verbose("Created server request",t,a),t}},set:{error:function(){g.verbose("Adding error state to element",C),C.addClass(w.error)},loading:function(){g.verbose("Adding loading state to element",C),C.addClass(w.loading),m=(new Date).getTime()}},remove:{error:function(){g.verbose("Removing error state from element",C),C.removeClass(w.error)},loading:function(){g.verbose("Removing loading state from element",C),C.removeClass(w.loading)}},get:{responseFromXHR:function(t){return!!e.isPlainObject(t)&&(g.is.expectingJSON()?g.decode.json(t.responseText):t.responseText)},errorFromRequest:function(t,n,o){return e.isPlainObject(t)&&t.error!==i?t.error:b.error[n]!==i?b.error[n]:o},request:function(){return g.request||!1},xhr:function(){return g.xhr||!1},settings:function(){var t;return(t=b.beforeSend.call(_,b))&&(t.success!==i&&(g.debug("Legacy success callback detected",t),g.error(A.legacyParameters,t.success),t.onSuccess=t.success),t.failure!==i&&(g.debug("Legacy failure callback detected",t),g.error(A.legacyParameters,t.failure),t.onFailure=t.failure),t.complete!==i&&(g.debug("Legacy complete callback detected",t),g.error(A.legacyParameters,t.complete),t.onComplete=t.complete)),t===i&&g.error(A.noReturnedValue),!1===t?t:t!==i?e.extend(!0,{},t):e.extend(!0,{},b)},urlEncodedValue:function(e){var n=t.decodeURIComponent(e),i=t.encodeURIComponent(e);return n!==e?(g.debug("URL value is already encoded, avoiding double encoding",e),e):(g.verbose("Encoding value using encodeURIComponent",e,i),i)},defaultData:function(){var t={};return e.isWindow(k)||(g.is.input()?t.value=x.val():g.is.form()||(t.text=x.text())),t},event:function(){return e.isWindow(k)||"now"==b.on?(g.debug("API called without element, no events attached"),!1):"auto"==b.on?x.is("input")?k.oninput!==i?"input":k.onpropertychange!==i?"propertychange":"keyup":x.is("form")?"submit":"click":b.on},templatedURL:function(e){if(e=e||x.data(M.action)||b.action||!1,f=x.data(M.url)||b.url||!1)return g.debug("Using specified url",f),f;if(e){if(g.debug("Looking up url for action",e,b.api),b.api[e]===i&&!g.is.mocked())return void g.error(A.missingAction,b.action,b.api);f=b.api[e]}else g.is.form()&&(f=x.attr("action")||C.attr("action")||!1,g.debug("No url or action specified, defaulting to form action",f));return f}},abort:function(){var e=g.get.xhr();e&&"resolved"!==e.state()&&(g.debug("Cancelling API request"),e.abort())},reset:function(){g.remove.error(),g.remove.loading()},setting:function(t,n){if(g.debug("Changing setting",t,n),e.isPlainObject(t))e.extend(!0,b,t);else{if(n===i)return b[t];e.isPlainObject(b[t])?e.extend(!0,b[t],n):b[t]=n}},internal:function(t,n){if(e.isPlainObject(t))e.extend(!0,g,t);else{if(n===i)return g[t];g[t]=n}},debug:function(){!b.silent&&b.debug&&(b.performance?g.performance.log(arguments):(g.debug=Function.prototype.bind.call(console.info,console,b.name+":"),g.debug.apply(console,arguments)))},verbose:function(){!b.silent&&b.verbose&&b.debug&&(b.performance?g.performance.log(arguments):(g.verbose=Function.prototype.bind.call(console.info,console,b.name+":"),g.verbose.apply(console,arguments)))},error:function(){b.silent||(g.error=Function.prototype.bind.call(console.error,console,b.name+":"),g.error.apply(console,arguments))},performance:{log:function(e){var t,n;b.performance&&(n=(t=(new Date).getTime())-(s||t),s=t,c.push({Name:e[0],Arguments:[].slice.call(e,1)||"","Execution Time":n})),clearTimeout(g.performance.timer),g.performance.timer=setTimeout(g.performance.display,500)},display:function(){var t=b.name+":",n=0;s=!1,clearTimeout(g.performance.timer),e.each(c,function(e,t){n+=t["Execution Time"]}),t+=" "+n+"ms",r&&(t+=" '"+r+"'"),(console.group!==i||console.table!==i)&&c.length>0&&(console.groupCollapsed(t),console.table?console.table(c):e.each(c,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),c=[]}},invoke:function(t,n,a){var r,s,c,l=L;return n=n||d,a=k||a,"string"==typeof t&&l!==i&&(t=t.split(/[\. ]/),r=t.length-1,e.each(t,function(n,o){var a=n!=r?o+t[n+1].charAt(0).toUpperCase()+t[n+1].slice(1):t;if(e.isPlainObject(l[a])&&n!=r)l=l[a];else{if(l[a]!==i)return s=l[a],!1;if(!e.isPlainObject(l[o])||n==r)return l[o]!==i?(s=l[o],!1):(g.error(A.method,t),!1);l=l[o]}})),e.isFunction(s)?c=s.apply(a,n):s!==i&&(c=s),e.isArray(o)?o.push(c):o!==i?o=[o,c]:c!==i&&(o=c),s}},u?(L===i&&g.initialize(),g.invoke(l)):(L!==i&&L.invoke("destroy"),g.initialize())}),o!==i?o:this},e.api.settings={name:"API",namespace:"api",debug:!1,verbose:!1,performance:!0,api:{},cache:!0,interruptRequests:!0,on:"auto",stateContext:!1,loadingDuration:0,hideError:"auto",errorDuration:2e3,encodeParameters:!0,action:!1,url:!1,base:"",urlData:{},defaultData:!0,serializeForm:!1,throttle:0,throttleFirstRequest:!0,method:"get",data:{},dataType:"json",mockResponse:!1,mockResponseAsync:!1,response:!1,responseAsync:!1,beforeSend:function(e){return e},beforeXHR:function(){},onRequest:function(){},onResponse:!1,onSuccess:function(){},onComplete:function(){},onFailure:function(){},onError:function(){},onAbort:function(){},successTest:!1,error:{beforeSend:"The before send function has aborted the request",error:"There was an error with your request",exitConditions:"API Request Aborted. Exit conditions met",JSONParse:"JSON could not be parsed during error handling",legacyParameters:"You are using legacy API success callback names",method:"The method you called is not defined",missingAction:"API action used but no url was defined",missingSerialize:"jquery-serialize-object is required to add form data to an existing data object",missingURL:"No URL specified for api event",noReturnedValue:"The beforeSend callback must return a settings object, beforeSend ignored.",noStorage:"Caching responses locally requires session storage",parseError:"There was an error parsing your request",requiredParameter:"Missing a required URL parameter: ",statusMessage:"Server gave an error: ",timeout:"Your request timed out"},regExp:{required:/\{\$*[A-z0-9]+\}/g,optional:/\{\/\$*[A-z0-9]+\}/g},className:{loading:"loading",error:"error"},selector:{disabled:".disabled",form:"form"},metadata:{action:"action",url:"url"}}}(jQuery,window,document),function(e,t,n,i){"use strict";e.tab=e.fn.tab=function(n){var o,a,r=e.isFunction(this)?e(t):e(this),s=e.isPlainObject(n)?e.extend(!0,{},e.fn.tab.settings,n):e.extend({},e.fn.tab.settings),c=r.selector||"",l=(new Date).getTime(),u=[],d=arguments[0],p="string"==typeof d,f=[].slice.call(arguments,1);return r.each(function(){var n,h,m,g,b,v=s.className,M=s.metadata,y=s.selector,A=s.error,w="."+s.namespace,z="module-"+s.namespace,T=e(this),x={},O=!0,C=0,k=this,_=T.data(z);o={initialize:function(){o.debug("Initializing tab menu item",T),o.determineTabs(),o.debug("Determining tabs",s.context,h),s.auto&&(o.verbose("Setting up automatic tab retrieval from server"),s.apiSettings={url:s.path+"/{$tab}"}),e.isWindow(k)||(o.debug("Attaching tab activation events to element",T),T.on("click"+w,o.event.click)),o.instantiate()},determineTabs:function(){var t;"parent"===s.context?(T.closest(y.ui).size()>0?(t=T.closest(y.ui),o.verbose("Using closest UI element for determining parent",t)):t=T,n=t.parent(),o.verbose("Determined parent element for creating context",n)):s.context?(n=e(s.context),o.verbose("Using selector for tab context",s.context,n)):n=e("body"),s.childrenOnly?(h=n.children(y.tabs),o.debug("Searching tab context children for tabs",n,h)):(h=n.find(y.tabs),o.debug("Searching tab context for tabs",n,h))},initializeHistory:function(){if(s.history){if(o.debug("Initializing page state"),e.address===i)return o.error(A.state),!1;if("state"==s.historyType){if(o.debug("Using HTML5 to manage state"),!1===s.path)return o.error(A.path),!1;e.address.history(!0).state(s.path)}e.address.bind("change",o.event.history.change)}},instantiate:function(){o.verbose("Storing instance of module",o),T.data(z,o)},destroy:function(){o.debug("Destroying tabs",T),T.removeData(z).off(w)},event:{click:function(t){var n=e(this).data(M.tab);n!==i?(s.history?(o.verbose("Updating page state",t),e.address.value(n)):(o.verbose("Changing tab",t),o.changeTab(n)),t.preventDefault()):o.debug("No tab specified")},history:{change:function(t){var n=t.pathNames.join("/")||o.get.initialPath(),a=s.templates.determineTitle(n)||!1;o.performance.display(),o.debug("History change event",n,t),b=t,n!==i&&o.changeTab(n),a&&e.address.title(a)}}},refresh:function(){m&&(o.debug("Refreshing tab",m),o.changeTab(m))},cache:{read:function(e){return e!==i&&x[e]},add:function(e,t){e=e||m,o.debug("Adding cached content for",e),x[e]=t},remove:function(e){e=e||m,o.debug("Removing cached content for",e),delete x[e]}},set:{state:function(t){e.address.value(t)}},changeTab:function(i){var a=t.history&&t.history.pushState&&s.ignoreFirstLoad&&O,r=s.auto||e.isPlainObject(s.apiSettings),c=r&&!a?o.utilities.pathToArray(i):o.get.defaultPathArray(i);i=o.utilities.arrayToPath(c),e.each(c,function(t,l){var u,d,p,f,h=c.slice(0,t+1),v=o.utilities.arrayToPath(h),M=o.is.tab(v),y=t+1==c.length,w=o.get.tabElement(v);if(o.verbose("Looking for tab",l),M){if(o.verbose("Tab was found",l),m=v,g=o.utilities.filterArray(c,h),y?f=!0:(d=c.slice(0,t+2),p=o.utilities.arrayToPath(d),(f=!o.is.tab(p))&&o.verbose("Tab parameters found",d)),f&&r)return a?(o.debug("Ignoring remote content on first tab load",v),O=!1,o.cache.add(i,w.html()),o.activate.all(v),e.proxy(s.onTabInit,w)(v,g,b),e.proxy(s.onTabLoad,w)(v,g,b)):(o.activate.navigation(v),o.content.fetch(v,i)),!1;o.debug("Opened local tab",v),o.activate.all(v),o.cache.read(v)||(o.cache.add(v,!0),o.debug("First time tab loaded calling tab init"),e.proxy(s.onTabInit,w)(v,g,b)),e.proxy(s.onTabLoad,w)(v,g,b)}else{if(-1!=i.search("/"))return o.error(A.missingTab,T,n,v),!1;if(v=(u=e("#"+i+', a[name="'+i+'"]')).closest("[data-tab]").data("tab"),w=o.get.tabElement(v),u&&u.size()>0&&v)return o.debug("No tab found, but deep anchor link present, opening parent tab"),o.activate.all(v),o.cache.read(v)||(o.cache.add(v,!0),o.debug("First time tab loaded calling tab init"),e.proxy(s.onTabInit,w)(v,g,b)),!1}})},content:{fetch:function(t,n){var a,r,c=o.get.tabElement(t),l={dataType:"html",stateContext:c,onSuccess:function(i){o.cache.add(n,i),o.content.update(t,i),t==m?(o.debug("Content loaded",t),o.activate.tab(t)):o.debug("Content loaded in background",t),e.proxy(s.onTabInit,c)(t,g,b),e.proxy(s.onTabLoad,c)(t,g,b)},urlData:{tab:n}},u=c.data(M.promise)||!1,d=u&&"pending"===u.state();n=n||t,r=o.cache.read(n),s.cache&&r?(o.debug("Showing existing content",n),o.content.update(t,r),o.activate.tab(t),e.proxy(s.onTabLoad,c)(t,g,b)):d?(o.debug("Content is already loading",n),c.addClass(v.loading)):e.api!==i?(a=e.extend(!0,{headers:{"X-Remote":!0}},s.apiSettings,l),o.debug("Retrieving remote content",n,a),e.api(a)):o.error(A.api)},update:function(e,t){o.debug("Updating html for",e),o.get.tabElement(e).html(t)}},activate:{all:function(e){o.activate.tab(e),o.activate.navigation(e)},tab:function(e){var t=o.get.tabElement(e);o.verbose("Showing tab content for",t),t.addClass(v.active).siblings(h).removeClass(v.active+" "+v.loading)},navigation:function(e){var t=o.get.navElement(e);o.verbose("Activating tab navigation for",t,e),t.addClass(v.active).siblings(r).removeClass(v.active+" "+v.loading)}},deactivate:{all:function(){o.deactivate.navigation(),o.deactivate.tabs()},navigation:function(){r.removeClass(v.active)},tabs:function(){h.removeClass(v.active+" "+v.loading)}},is:{tab:function(e){return e!==i&&o.get.tabElement(e).size()>0}},get:{initialPath:function(){return r.eq(0).data(M.tab)||h.eq(0).data(M.tab)},path:function(){return e.address.value()},defaultPathArray:function(e){return o.utilities.pathToArray(o.get.defaultPath(e))},defaultPath:function(e){var t=r.filter("[data-"+M.tab+'^="'+e+'/"]').eq(0).data(M.tab)||!1;if(t){if(o.debug("Found default tab",t),C<s.maxDepth)return C++,o.get.defaultPath(t);o.error(A.recursion)}else o.debug("No default tabs found for",e,h);return C=0,e},navElement:function(e){return e=e||m,r.filter("[data-"+M.tab+'="'+e+'"]')},tabElement:function(e){var t,n,i,a;return e=e||m,i=o.utilities.pathToArray(e),a=o.utilities.last(i),t=h.filter("[data-"+M.tab+'="'+a+'"]'),n=h.filter("[data-"+M.tab+'="'+e+'"]'),t.size()>0?t:n},tab:function(){return m}},utilities:{filterArray:function(t,n){return e.grep(t,function(t){return-1==e.inArray(t,n)})},last:function(t){return!!e.isArray(t)&&t[t.length-1]},pathToArray:function(e){return e===i&&(e=m),"string"==typeof e?e.split("/"):[e]},arrayToPath:function(t){return!!e.isArray(t)&&t.join("/")}},setting:function(t,n){if(o.debug("Changing setting",t,n),e.isPlainObject(t))e.extend(!0,s,t);else{if(n===i)return s[t];s[t]=n}},internal:function(t,n){if(e.isPlainObject(t))e.extend(!0,o,t);else{if(n===i)return o[t];o[t]=n}},debug:function(){s.debug&&(s.performance?o.performance.log(arguments):(o.debug=Function.prototype.bind.call(console.info,console,s.name+":"),o.debug.apply(console,arguments)))},verbose:function(){s.verbose&&s.debug&&(s.performance?o.performance.log(arguments):(o.verbose=Function.prototype.bind.call(console.info,console,s.name+":"),o.verbose.apply(console,arguments)))},error:function(){o.error=Function.prototype.bind.call(console.error,console,s.name+":"),o.error.apply(console,arguments)},performance:{log:function(e){var t,n;s.performance&&(n=(t=(new Date).getTime())-(l||t),l=t,u.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:k,"Execution Time":n})),clearTimeout(o.performance.timer),o.performance.timer=setTimeout(o.performance.display,100)},display:function(){var t=s.name+":",n=0;l=!1,clearTimeout(o.performance.timer),e.each(u,function(e,t){n+=t["Execution Time"]}),t+=" "+n+"ms",c&&(t+=" '"+c+"'"),(console.group!==i||console.table!==i)&&u.length>0&&(console.groupCollapsed(t),console.table?console.table(u):e.each(u,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),u=[]}},invoke:function(t,n,r){var s,c,l,u=_;return n=n||f,r=k||r,"string"==typeof t&&u!==i&&(t=t.split(/[\. ]/),s=t.length-1,e.each(t,function(n,a){var r=n!=s?a+t[n+1].charAt(0).toUpperCase()+t[n+1].slice(1):t;if(e.isPlainObject(u[r])&&n!=s)u=u[r];else{if(u[r]!==i)return c=u[r],!1;if(!e.isPlainObject(u[a])||n==s)return u[a]!==i?(c=u[a],!1):(o.error(A.method,t),!1);u=u[a]}})),e.isFunction(c)?l=c.apply(r,n):c!==i&&(l=c),e.isArray(a)?a.push(l):a!==i?a=[a,l]:l!==i&&(a=l),c}},p?(_===i&&o.initialize(),o.invoke(d)):(_!==i&&o.destroy(),o.initialize())}),o&&!p&&o.initializeHistory(),a!==i?a:this},e.tab=function(n){e(t).tab(n)},e.fn.tab.settings={name:"Tab",namespace:"tab",debug:!1,verbose:!0,performance:!0,auto:!1,history:!1,historyType:"hash",path:!1,context:!1,childrenOnly:!1,maxDepth:25,ignoreFirstLoad:!1,alwaysRefresh:!1,cache:!0,apiSettings:!1,onTabInit:function(){},onTabLoad:function(){},templates:{determineTitle:function(){}},error:{api:"You attempted to load content without API module",method:"The method you called is not defined",missingTab:"Activated tab cannot be found for this context.",noContent:"The tab you specified is missing a content url.",path:"History enabled, but no path was specified",recursion:"Max recursive depth reached",state:"History requires Asual's Address library <https://github.com/asual/jquery-address>"},metadata:{tab:"tab",loaded:"loaded",promise:"promise"},className:{loading:"loading",active:"active"},selector:{tabs:".ui.tab",ui:".ui"}}}(jQuery,window,document),function(e,t,n,i){"use strict";void 0!==(t=void 0!==t&&t.Math==Math?t:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")())&&t.Math==Math||("undefined"!=typeof self&&self.Math==Math?self:Function("return this")());e.fn.progress=function(t){var o,a=e(this),r=a.selector||"",s=(new Date).getTime(),c=[],l=arguments[0],u="string"==typeof l,d=[].slice.call(arguments,1);return a.each(function(){var a,p,f=e.isPlainObject(t)?e.extend(!0,{},e.fn.progress.settings,t):e.extend({},e.fn.progress.settings),h=f.className,m=f.metadata,g=f.namespace,b=f.selector,v=f.error,M="."+g,y="module-"+g,A=e(this),w=e(this).find(b.bar),z=e(this).find(b.progress),T=e(this).find(b.label),x=this,O=A.data(y),C=!1;p={initialize:function(){p.debug("Initializing progress bar",f),p.set.duration(),p.set.transitionEvent(),p.read.metadata(),p.read.settings(),p.instantiate()},instantiate:function(){p.verbose("Storing instance of progress",p),O=p,A.data(y,p)},destroy:function(){p.verbose("Destroying previous progress for",A),clearInterval(O.interval),p.remove.state(),A.removeData(y),O=i},reset:function(){p.remove.nextValue(),p.update.progress(0)},complete:function(){(p.percent===i||p.percent<100)&&(p.remove.progressPoll(),p.set.percent(100))},read:{metadata:function(){var e={percent:A.data(m.percent),total:A.data(m.total),value:A.data(m.value)};e.percent&&(p.debug("Current percent value set from metadata",e.percent),p.set.percent(e.percent)),e.total&&(p.debug("Total value set from metadata",e.total),p.set.total(e.total)),e.value&&(p.debug("Current value set from metadata",e.value),p.set.value(e.value),p.set.progress(e.value))},settings:function(){!1!==f.total&&(p.debug("Current total set in settings",f.total),p.set.total(f.total)),!1!==f.value&&(p.debug("Current value set in settings",f.value),p.set.value(f.value),p.set.progress(p.value)),!1!==f.percent&&(p.debug("Current percent set in settings",f.percent),p.set.percent(f.percent))}},increment:function(e){var t,n;p.has.total()?n=(t=p.get.value())+(e=e||1):(n=(t=p.get.percent())+(e=e||p.get.randomValue()),100,p.debug("Incrementing percentage by",t,n)),n=p.get.normalizedValue(n),p.set.progress(n)},decrement:function(e){var t,n;p.get.total()?(n=(t=p.get.value())-(e=e||1),p.debug("Decrementing value by",e,t)):(n=(t=p.get.percent())-(e=e||p.get.randomValue()),p.debug("Decrementing percentage by",e,t)),n=p.get.normalizedValue(n),p.set.progress(n)},has:{progressPoll:function(){return p.progressPoll},total:function(){return!1!==p.get.total()}},get:{text:function(e){var t=p.value||0,n=p.total||0,i=C?p.get.displayPercent():p.percent||0,o=p.total>0?n-t:100-i;return e=(e=e||"").replace("{value}",t).replace("{total}",n).replace("{left}",o).replace("{percent}",i),p.verbose("Adding variables to progress bar text",e),e},normalizedValue:function(e){if(e<0)return p.debug("Value cannot decrement below 0"),0;if(p.has.total()){if(e>p.total)return p.debug("Value cannot increment above total",p.total),p.total}else if(e>100)return p.debug("Value cannot increment above 100 percent"),100;return e},updateInterval:function(){return"auto"==f.updateInterval?f.duration:f.updateInterval},randomValue:function(){return p.debug("Generating random increment percentage"),Math.floor(Math.random()*f.random.max+f.random.min)},numericValue:function(e){return"string"==typeof e?""!==e.replace(/[^\d.]/g,"")&&+e.replace(/[^\d.]/g,""):e},transitionEnd:function(){var e,t=n.createElement("element"),o={transition:"transitionend",OTransition:"oTransitionEnd",MozTransition:"transitionend",WebkitTransition:"webkitTransitionEnd"};for(e in o)if(t.style[e]!==i)return o[e]},displayPercent:function(){var e=w.width(),t=A.width(),n=e>parseInt(w.css("min-width"),10)?e/t*100:p.percent;return f.precision>0?Math.round(n*(10*f.precision))/(10*f.precision):Math.round(n)},percent:function(){return p.percent||0},value:function(){return p.nextValue||p.value||0},total:function(){return p.total||!1}},create:{progressPoll:function(){p.progressPoll=setTimeout(function(){p.update.toNextValue(),p.remove.progressPoll()},p.get.updateInterval())}},is:{complete:function(){return p.is.success()||p.is.warning()||p.is.error()},success:function(){return A.hasClass(h.success)},warning:function(){return A.hasClass(h.warning)},error:function(){return A.hasClass(h.error)},active:function(){return A.hasClass(h.active)},visible:function(){return A.is(":visible")}},remove:{progressPoll:function(){p.verbose("Removing progress poll timer"),p.progressPoll&&(clearTimeout(p.progressPoll),delete p.progressPoll)},nextValue:function(){p.verbose("Removing progress value stored for next update"),delete p.nextValue},state:function(){p.verbose("Removing stored state"),delete p.total,delete p.percent,delete p.value},active:function(){p.verbose("Removing active state"),A.removeClass(h.active)},success:function(){p.verbose("Removing success state"),A.removeClass(h.success)},warning:function(){p.verbose("Removing warning state"),A.removeClass(h.warning)},error:function(){p.verbose("Removing error state"),A.removeClass(h.error)}},set:{barWidth:function(e){e>100?p.error(v.tooHigh,e):e<0?p.error(v.tooLow,e):(w.css("width",e+"%"),A.attr("data-percent",parseInt(e,10)))},duration:function(e){e="number"==typeof(e=e||f.duration)?e+"ms":e,p.verbose("Setting progress bar transition duration",e),w.css({"transition-duration":e})},percent:function(e){e="string"==typeof e?+e.replace("%",""):e,e=f.precision>0?Math.round(e*(10*f.precision))/(10*f.precision):Math.round(e),p.percent=e,p.has.total()||(p.value=f.precision>0?Math.round(e/100*p.total*(10*f.precision))/(10*f.precision):Math.round(e/100*p.total*10)/10,f.limitValues&&(p.value=p.value>100?100:p.value<0?0:p.value)),p.set.barWidth(e),p.set.labelInterval(),p.set.labels(),f.onChange.call(x,e,p.value,p.total)},labelInterval:function(){var t=function(){p.verbose("Bar finished animating, removing continuous label updates"),clearInterval(p.interval),C=!1,p.set.labels()};clearInterval(p.interval),w.one(a+M,t),C=!0,p.interval=setInterval(function(){e.contains(n.documentElement,x)||(clearInterval(p.interval),C=!1),p.set.labels()},f.framerate)},labels:function(){p.verbose("Setting both bar progress and outer label text"),p.set.barLabel(),p.set.state()},label:function(e){(e=e||"")&&(e=p.get.text(e),p.verbose("Setting label to text",e),T.text(e))},state:function(e){
DesignScreenshot/output/gitee_run/gitee.com_1_initial_page.html:397:function(e,t){"function"==typeof define&&define.amd?define(["jquery"],function(e){return t(e)}):"object"==typeof exports?module.exports=t(require("jquery")):t(jQuery)}(0,function(e){var t,n,i;n={ESC:27,TAB:9,ENTER:13,CTRL:17,A:65,P:80,N:78,LEFT:37,UP:38,RIGHT:39,DOWN:40,BACKSPACE:8,SPACE:32},t={beforeSave:function(e){return o.arrayToDefaultHash(e)},matcher:function(e,t,n,i){var o,a,r;return e=e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),n&&(e="(?:^|\\s)"+e),o=decodeURI("%C3%80"),a=decodeURI("%C3%BF"),(r=new RegExp(e+"([A-Za-z"+o+"-"+a+"0-9_"+(i?" ":"")+"'.+-]*)$|"+e+"([^\\x00-\\xff]*)$","gi").exec(t))?r[2]||r[1]:null},filter:function(e,t,n){var i,o,a,r;for(i=[],o=0,r=t.length;o<r;o++)a=t[o],~new String(a[n]).toLowerCase().indexOf(e.toLowerCase())&&i.push(a);return i},remoteFilter:null,sorter:function(e,t,n){var i,o,a,r;if(!e)return t;for(i=[],o=0,r=t.length;o<r;o++)(a=t[o]).atwho_order=new String(a[n]).toLowerCase().indexOf(e.toLowerCase()),a.atwho_order>-1&&i.push(a);return i.sort(function(e,t){return e.atwho_order-t.atwho_order})},tplEval:function(e,t){var n,i;i=e;try{return"string"!=typeof e&&(i=e(t)),i.replace(/\$\{([^\}]*)\}/g,function(e,n){return t[n]})}catch(n){return n,""}},highlighter:function(e,t){var n;return t?(n=new RegExp(">\\s*([^<]*?)("+t.replace("+","\\+")+")([^<]*)\\s*<","ig"),e.replace(n,function(e,t,n,i){return"> "+t+"<strong>"+n+"</strong>"+i+" <"})):e},beforeInsert:function(e){return e},beforeReposition:function(e){return e},afterMatchFailed:function(){}},i=function(){function t(t){this.currentFlag=null,this.controllers={},this.aliasMaps={},this.$inputor=e(t),this.setupRootElement(),this.listen()}return t.prototype.createContainer=function(t){var n;return null!=(n=this.$el)&&n.remove(),e(t.body).append(this.$el=e("<div class='atwho-container'></div>"))},t.prototype.setupRootElement=function(t,n){var i,o;if(null==n&&(n=!1),t)this.window=t.contentWindow,this.document=t.contentDocument||this.window.document,this.iframe=t;else{this.document=this.$inputor[0].ownerDocument,this.window=this.document.defaultView||this.document.parentWindow;try{this.iframe=this.window.frameElement}catch(o){if(i=o,this.iframe=null,e.fn.atwho.debug)throw new Error("iframe auto-discovery is failed.\nPlease use `setIframe` to set the target iframe manually.\n"+i)}}return this.createContainer((this.iframeAsRoot=n)?this.document:document)},t.prototype.controller=function(e){var t,n,i,o;if(this.aliasMaps[e])n=this.controllers[this.aliasMaps[e]];else for(i in o=this.controllers)if(t=o[i],i===e){n=t;break}return n||this.controllers[this.currentFlag]},t.prototype.setContextFor=function(e){return this.currentFlag=e,this},t.prototype.reg=function(e,t){var n,i;return i=(n=this.controllers)[e]||(n[e]=this.$inputor.is("[contentEditable]")?new l(this,e):new r(this,e)),t.alias&&(this.aliasMaps[t.alias]=e),i.init(t),this},t.prototype.listen=function(){return this.$inputor.on("compositionstart",(e=this,function(){var t;return null!=(t=e.controller())&&t.view.hide(),e.isComposing=!0,null})).on("compositionend",function(e){return function(){return e.isComposing=!1,setTimeout(function(t){return e.dispatch(t)}),null}}(this)).on("keyup.atwhoInner",function(e){return function(t){return e.onKeyup(t)}}(this)).on("keydown.atwhoInner",function(e){return function(t){return e.onKeydown(t)}}(this)).on("blur.atwhoInner",function(e){return function(t){var n;if(n=e.controller())return n.expectedQueryCBId=null,n.view.hide(t,n.getOpt("displayTimeout"))}}(this)).on("click.atwhoInner",function(e){return function(t){return e.dispatch(t)}}(this)).on("scroll.atwhoInner",function(e){return function(){var t;return t=e.$inputor.scrollTop(),function(n){var i,o;return i=n.target.scrollTop,t!==i&&null!=(o=e.controller())&&o.view.hide(n),t=i,!0}}}(this)());var e},t.prototype.shutdown=function(){var e,t;for(e in t=this.controllers)t[e].destroy(),delete this.controllers[e];return this.$inputor.off(".atwhoInner"),this.$el.remove()},t.prototype.dispatch=function(e){var t,n,i,o;for(t in o=[],i=this.controllers)n=i[t],o.push(n.lookUp(e));return o},t.prototype.onKeyup=function(t){var i;switch(t.keyCode){case n.ESC:t.preventDefault(),null!=(i=this.controller())&&i.view.hide();break;case n.DOWN:case n.UP:case n.CTRL:case n.ENTER:e.noop();break;case n.P:case n.N:t.ctrlKey||this.dispatch(t);break;default:this.dispatch(t)}},t.prototype.onKeydown=function(t){var i,o;if((o=null!=(i=this.controller())?i.view:void 0)&&o.visible())switch(t.keyCode){case n.ESC:t.preventDefault(),o.hide(t);break;case n.UP:t.preventDefault(),o.prev();break;case n.DOWN:t.preventDefault(),o.next();break;case n.P:if(!t.ctrlKey)return;t.preventDefault(),o.prev();break;case n.N:if(!t.ctrlKey)return;t.preventDefault(),o.next();break;case n.TAB:case n.ENTER:case n.SPACE:if(!o.visible())return;if(!this.controller().getOpt("spaceSelectsMatch")&&t.keyCode===n.SPACE)return;if(!this.controller().getOpt("tabSelectsMatch")&&t.keyCode===n.TAB)return;o.highlighted()?(t.preventDefault(),o.choose(t)):o.hide(t);break;default:e.noop()}},t}();var o,a=[].slice;o=function(){function n(t,n){this.app=t,this.at=n,this.$inputor=this.app.$inputor,this.id=this.$inputor[0].id||this.uid(),this.expectedQueryCBId=null,this.setting=null,this.query=null,this.pos=0,this.range=null,0===(this.$el=e("#atwho-ground-"+this.id,this.app.$el)).length&&this.app.$el.append(this.$el=e("<div id='atwho-ground-"+this.id+"'></div>")),this.model=new u(this),this.view=new d(this)}return n.prototype.uid=function(){return(Math.random().toString(16)+"000000000").substr(2,8)+(new Date).getTime()},n.prototype.init=function(t){return this.setting=e.extend({},this.setting||e.fn.atwho["default"],t),this.view.init(),this.model.reload(this.setting.data)},n.prototype.destroy=function(){return this.trigger("beforeDestroy"),this.model.destroy(),this.view.destroy(),this.$el.remove()},n.prototype.callDefault=function(){var n,i,o,r;r=arguments[0],n=2<=arguments.length?a.call(arguments,1):[];try{return t[r].apply(this,n)}catch(o){return i=o,e.error(i+" Or maybe At.js doesn't have function "+r)}},n.prototype.trigger=function(e,t){var n,i;return null==t&&(t=[]),t.push(this),i=(n=this.getOpt("alias"))?e+"-"+n+".atwho":e+".atwho",this.$inputor.trigger(i,t)},n.prototype.callbacks=function(e){return this.getOpt("callbacks")[e]||t[e]},n.prototype.getOpt=function(e){var t;try{return this.setting[e]}catch(t){return t,null}},n.prototype.insertContentFor=function(t){var n,i;return i=this.getOpt("insertTpl"),n=e.extend({},t.data("item-data"),{"atwho-at":this.at}),this.callbacks("tplEval").call(this,i,n,"onInsert")},n.prototype.renderView=function(e){var t;return t=this.getOpt("searchKey"),e=this.callbacks("sorter").call(this,this.query.text,e.slice(0,1001),t),this.view.render(e.slice(0,this.getOpt("limit")))},n.arrayToDefaultHash=function(t){var n,i,o,a;if(!e.isArray(t))return t;for(a=[],n=0,o=t.length;n<o;n++)i=t[n],e.isPlainObject(i)?a.push(i):a.push({name:i});return a},n.prototype.lookUp=function(e){var t,n;if((!e||"click"!==e.type||this.getOpt("lookUpOnClick"))&&(!this.getOpt("suspendOnComposing")||!this.app.isComposing))return(t=this.catchQuery(e))?(this.app.setContextFor(this.at),(n=this.getOpt("delay"))?this._delayLookUp(t,n):this._lookUp(t),t):(this.expectedQueryCBId=null,t)},n.prototype._delayLookUp=function(e,t){var n,i,o;return n=Date.now?Date.now():(new Date).getTime(),this.previousCallTime||(this.previousCallTime=n),0<(i=t-(n-this.previousCallTime))&&i<t?(this.previousCallTime=n,this._stopDelayedCall(),this.delayedCallTimeout=setTimeout((o=this,function(){return o.previousCallTime=0,o.delayedCallTimeout=null,o._lookUp(e)}),t)):(this._stopDelayedCall(),this.previousCallTime!==n&&(this.previousCallTime=0),this._lookUp(e))},n.prototype._stopDelayedCall=function(){if(this.delayedCallTimeout)return clearTimeout(this.delayedCallTimeout),this.delayedCallTimeout=null},n.prototype._generateQueryCBId=function(){return{}},n.prototype._lookUp=function(t){var n;return n=function(e,t){if(e===this.expectedQueryCBId)return t&&t.length>0?this.renderView(this.constructor.arrayToDefaultHash(t)):this.view.hide()},this.expectedQueryCBId=this._generateQueryCBId(),this.model.query(t.text,e.proxy(n,this,this.expectedQueryCBId))},n}();var r,s=function(e,t){function n(){this.constructor=e}for(var i in t)c.call(t,i)&&(e[i]=t[i]);return n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype,e},c={}.hasOwnProperty;r=function(){function t(){return t.__super__.constructor.apply(this,arguments)}return s(t,o),t.prototype.catchQuery=function(){var e,t,n,i,o,a,r;if(t=this.$inputor.val(),e=this.$inputor.caret("pos",{iframe:this.app.iframe}),r=t.slice(0,e),!((i="string"==typeof(o=this.callbacks("matcher").call(this,this.at,r,this.getOpt("startWithSpace"),this.getOpt("acceptSpaceBar"))))&&o.length<this.getOpt("minLen",0)))return i&&o.length<=this.getOpt("maxLen",20)?(n=(a=e-o.length)+o.length,this.pos=a,o={text:o,headPos:a,endPos:n},this.trigger("matched",[this.at,o.text])):(o=null,this.view.hide()),this.query=o},t.prototype.rect=function(){var t,n,i;if(t=this.$inputor.caret("offset",this.pos-1,{iframe:this.app.iframe}))return this.app.iframe&&!this.app.iframeAsRoot&&(n=e(this.app.iframe).offset(),t.left+=n.left,t.top+=n.top),i=this.app.document.selection?0:2,{left:t.left,top:t.top,bottom:t.top+t.height+i}},t.prototype.insert=function(e){var t,n,i,o,a;return a=""+(i=(n=(t=this.$inputor).val()).slice(0,Math.max(this.query.headPos-this.at.length,0)))+(e+=o=""===(o=this.getOpt("suffix"))?o:o||" ")+n.slice(this.query.endPos||0),t.val(a),t.caret("pos",i.length+e.length,{iframe:this.app.iframe}),t.is(":focus")||t.focus(),t.change()},t}();var l,u,d,p;s=function(e,t){function n(){this.constructor=e}for(var i in t)c.call(t,i)&&(e[i]=t[i]);return n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype,e},c={}.hasOwnProperty;l=function(){function t(){return t.__super__.constructor.apply(this,arguments)}return s(t,o),t.prototype._getRange=function(){var e;if((e=this.app.window.getSelection()).rangeCount>0)return e.getRangeAt(0)},t.prototype._setRange=function(t,n,i){if(null==i&&(i=this._getRange()),i&&n)return n=e(n)[0],"after"===t?(i.setEndAfter(n),i.setStartAfter(n)):(i.setEndBefore(n),i.setStartBefore(n)),i.collapse(!1),this._clearRange(i)},t.prototype._clearRange=function(e){var t;if(null==e&&(e=this._getRange()),t=this.app.window.getSelection(),null==this.ctrl_a_pressed)return t.removeAllRanges(),t.addRange(e)},t.prototype._movingEvent=function(e){var t;return"click"===e.type||(t=e.which)===n.RIGHT||t===n.LEFT||t===n.UP||t===n.DOWN},t.prototype._unwrap=function(t){var n;return(n=(t=e(t).unwrap().get(0)).nextSibling)&&n.nodeValue&&(t.nodeValue+=n.nodeValue,e(n).remove()),t},t.prototype.catchQuery=function(t){var i,o,a,r,s,c,l,u,d,p,f,h;if((h=this._getRange())&&h.collapsed){if(t.which===n.ENTER)return(o=e(h.startContainer).closest(".atwho-query")).contents().unwrap(),o.is(":empty")&&o.remove(),(o=e(".atwho-query",this.app.document)).text(o.text()).contents().last().unwrap(),void this._clearRange();if(/firefox/i.test(navigator.userAgent)){if(e(h.startContainer).is(this.$inputor))return void this._clearRange();t.which===n.BACKSPACE&&h.startContainer.nodeType===document.ELEMENT_NODE&&(d=h.startOffset-1)>=0?((a=h.cloneRange()).setStart(h.startContainer,d),e(a.cloneContents()).contents().last().is(".atwho-inserted")&&(s=e(h.startContainer).contents().get(d),this._setRange("after",e(s).contents().last()))):t.which===n.LEFT&&h.startContainer.nodeType===document.TEXT_NODE&&(i=e(h.startContainer.previousSibling)).is(".atwho-inserted")&&0===h.startOffset&&this._setRange("after",i.contents().last())}if(e(h.startContainer).closest(".atwho-inserted").addClass("atwho-query").siblings().removeClass("atwho-query"),(o=e(".atwho-query",this.app.document)).length>0&&o.is(":empty")&&0===o.text().length&&o.remove(),this._movingEvent(t)||o.removeClass("atwho-inserted"),o.length>0)switch(t.which){case n.LEFT:return this._setRange("before",o.get(0),h),void o.removeClass("atwho-query");case n.RIGHT:return this._setRange("after",o.get(0).nextSibling,h),void o.removeClass("atwho-query")}if(o.length>0&&(f=o.attr("data-atwho-at-query"))&&(o.empty().html(f).attr("data-atwho-at-query",null),this._setRange("after",o.get(0),h)),(a=h.cloneRange()).setStart(h.startContainer,0),c="string"==typeof(u=this.callbacks("matcher").call(this,this.at,a.toString(),this.getOpt("startWithSpace"),this.getOpt("acceptSpaceBar"))),0===o.length&&c&&(r=h.startOffset-this.at.length-u.length)>=0&&(h.setStart(h.startContainer,r),o=e("<span/>",this.app.document).attr(this.getOpt("editableAtwhoQueryAttrs")).addClass("atwho-query"),h.surroundContents(o.get(0)),(l=o.contents().last().get(0))&&(/firefox/i.test(navigator.userAgent)?(h.setStart(l,l.length),h.setEnd(l,l.length),this._clearRange(h)):this._setRange("after",l,h))),!(c&&u.length<this.getOpt("minLen",0)))return c&&u.length<=this.getOpt("maxLen",20)?(p={text:u,el:o},this.trigger("matched",[this.at,p.text]),this.query=p):(this.view.hide(),this.query={el:o},o.text().indexOf(this.at)>=0&&(this._movingEvent(t)&&o.hasClass("atwho-inserted")?o.removeClass("atwho-query"):!1!==this.callbacks("afterMatchFailed").call(this,this.at,o)&&this._setRange("after",this._unwrap(o.text(o.text()).contents().first()))),null)}},t.prototype.rect=function(){var t,n;if((n=this.query.el.offset())&&this.query.el[0].getClientRects().length)return this.app.iframe&&!this.app.iframeAsRoot&&(t=e(this.app.iframe).offset(),n.left+=t.left-this.$inputor.scrollLeft(),n.top+=t.top-this.$inputor.scrollTop()),n.bottom=n.top+this.query.el.height(),n},t.prototype.insert=function(e,t){var n,i,o,a,r;return this.$inputor.is(":focus")||this.$inputor.focus(),(i=this.getOpt("functionOverrides")).insert?i.insert.call(this,e,t):(a=""===(a=this.getOpt("suffix"))?a:a||"\xa0",n=t.data("item-data"),this.query.el.removeClass("atwho-query").addClass("atwho-inserted").html(e).attr("data-atwho-at-query",""+n["atwho-at"]+this.query.text).attr("contenteditable","false"),(o=this._getRange())&&(this.query.el.length&&o.setEndAfter(this.query.el[0]),o.collapse(!1),o.insertNode(r=this.app.document.createTextNode(""+a)),this._setRange("after",r,o)),this.$inputor.is(":focus")||this.$inputor.focus(),this.$inputor.change())},t}(),u=function(){function t(e){this.context=e,this.at=this.context.at,this.storage=this.context.$inputor}return t.prototype.destroy=function(){return this.storage.data(this.at,null)},t.prototype.saved=function(){return this.fetch()>0},t.prototype.query=function(e,t){var n,i,o;return i=this.fetch(),o=this.context.getOpt("searchKey"),i=this.context.callbacks("filter").call(this.context,e,i,o)||[],n=this.context.callbacks("remoteFilter"),i.length>0||!n&&0===i.length?t(i):n.call(this.context,e,t)},t.prototype.fetch=function(){return this.storage.data(this.at)||[]},t.prototype.save=function(e){return this.storage.data(this.at,this.context.callbacks("beforeSave").call(this.context,e||[]))},t.prototype.load=function(e){if(!this.saved()&&e)return this._load(e)},t.prototype.reload=function(e){return this._load(e)},t.prototype._load=function(t){return"string"==typeof t?e.ajax(t,{dataType:"json"}).done((n=this,function(e){return n.save(e)})):this.save(t);var n},t}(),d=function(){function t(t){this.context=t,this.$el=e("<div class='atwho-view'><ul class='atwho-view-ul'></ul></div>"),this.$elUl=this.$el.children(),this.timeoutID=null,this.context.$el.append(this.$el),this.bindEvent()}return t.prototype.init=function(){var e,t;return t=this.context.getOpt("alias")||this.context.at.charCodeAt(0),(e=this.context.getOpt("headerTpl"))&&1===this.$el.children().length&&this.$el.prepend(e),this.$el.attr({id:"at-view-"+t})},t.prototype.destroy=function(){return this.$el.remove()},t.prototype.bindEvent=function(){var t,n,i,o;return t=this.$el.find("ul"),n=0,i=0,t.on("mousemove.atwho-view","li",function(o){var a;if((n!==o.clientX||i!==o.clientY)&&(n=o.clientX,i=o.clientY,!(a=e(o.currentTarget)).hasClass("cur")))return t.find(".cur").removeClass("cur"),a.addClass("cur")}).on("click.atwho-view","li",(o=this,function(n){return t.find(".cur").removeClass("cur"),e(n.currentTarget).addClass("cur"),o.choose(n),n.preventDefault()}))},t.prototype.visible=function(){return e.expr.filters.visible(this.$el[0])},t.prototype.highlighted=function(){return this.$el.find(".cur").length>0},t.prototype.choose=function(e){var t,n;if((t=this.$el.find(".cur")).length&&(n=this.context.insertContentFor(t),this.context._stopDelayedCall(),this.context.insert(this.context.callbacks("beforeInsert").call(this.context,n,t,e),t),this.context.trigger("inserted",[t,e]),this.hide(e)),this.context.getOpt("hideWithoutSuffix"))return this.stopShowing=!0},t.prototype.reposition=function(t){var n,i,o,a;return n=this.context.app.iframeAsRoot?this.context.app.window:window,t.bottom+this.$el.height()-e(n).scrollTop()>e(n).height()&&(t.bottom=t.top-this.$el.height()),t.left>(o=e(n).width()-this.$el.width()-5)&&(t.left=o),i={left:t.left,top:t.bottom},null!=(a=this.context.callbacks("beforeReposition"))&&a.call(this.context,i),this.$el.offset(i),this.context.trigger("reposition",[i])},t.prototype.next=function(){var e,t,n;return(e=this.$el.find(".cur").removeClass("cur").next()).length||(e=this.$el.find("li:first")),e.addClass("cur"),n=(t=e[0]).offsetTop+t.offsetHeight+(t.nextSibling?t.nextSibling.offsetHeight:0),this.scrollTop(Math.max(0,n-this.$el.height()))},t.prototype.prev=function(){var e,t,n;return(t=this.$el.find(".cur").removeClass("cur").prev()).length||(t=this.$el.find("li:last")),t.addClass("cur"),e=(n=t[0]).offsetTop+n.offsetHeight+(n.nextSibling?n.nextSibling.offsetHeight:0),this.scrollTop(Math.max(0,e-this.$el.height()))},t.prototype.scrollTop=function(e){var t;return(t=this.context.getOpt("scrollDuration"))?this.$elUl.animate({scrollTop:e},t):this.$elUl.scrollTop(e)},t.prototype.show=function(){var e;if(!this.stopShowing)return this.visible()||(this.$el.show(),this.$el.scrollTop(0),this.context.trigger("shown")),(e=this.context.rect())?this.reposition(e):void 0;this.stopShowing=!1},t.prototype.hide=function(e,t){var n,i;if(this.visible())return isNaN(t)?(this.$el.hide(),this.context.trigger("hidden",[e])):(i=this,n=function(){return i.hide()},clearTimeout(this.timeoutID),this.timeoutID=setTimeout(n,t))},t.prototype.render=function(t){var n,i,o,a,r,s,c;if(e.isArray(t)&&t.length>0){for(this.$el.find("ul").empty(),i=this.$el.find("ul"),c=this.context.getOpt("displayTpl"),o=0,r=t.length;o<r;o++)a=t[o],a=e.extend({},a,{"atwho-at":this.context.at}),s=this.context.callbacks("tplEval").call(this.context,c,a,"onDisplay"),(n=e(this.context.callbacks("highlighter").call(this.context,s,this.context.query.text))).data("item-data",a),i.append(n);return this.show(),this.context.getOpt("highlightFirst")?i.find("li:first").addClass("cur"):void 0}this.hide()},t}(),p={load:function(e,t){var n;if(n=this.controller(e))return n.model.load(t)},isSelecting:function(){var e;return!!(null!=(e=this.controller())?e.view.visible():void 0)},hide:function(){var e;return null!=(e=this.controller())?e.view.hide():void 0},reposition:function(){var e;if(e=this.controller())return e.view.reposition(e.rect())},setIframe:function(e,t){return this.setupRootElement(e,t),null},run:function(){return this.dispatch()},destroy:function(){return this.shutdown(),this.$inputor.data("atwho",null)}},e.fn.atwho=function(t){var n,o;return n=arguments,o=null,this.filter('textarea, input, [contenteditable=""], [contenteditable=true]').each(function(){var a,r;return(r=(a=e(this)).data("atwho"))||a.data("atwho",r=new i(this)),"object"!=typeof t&&t?p[t]&&r?o=p[t].apply(r,Array.prototype.slice.call(n,1)):e.error("Method "+t+" does not exist on jQuery.atwho"):r.reg(t.at,t)}),null!=o?o:this},e.fn.atwho["default"]={at:void 0,alias:void 0,data:null,displayTpl:"<li>${name}</li>",insertTpl:"${atwho-at}${name}",headerTpl:null,callbacks:t,functionOverrides:{},searchKey:"name",suffix:void 0,hideWithoutSuffix:!1,startWithSpace:!0,acceptSpaceBar:!1,highlightFirst:!0,limit:5,maxLen:20,minLen:0,displayTimeout:300,delay:null,spaceSelectsMatch:!1,tabSelectsMatch:!0,editableAtwhoQueryAttrs:{},scrollDuration:150,suspendOnComposing:!0,lookUpOnClick:!0},e.fn.atwho.debug=!1}),function(e){var t=function(){"use strict";return{isMsie:function(){return!!/(msie|trident)/i.test(navigator.userAgent)&&navigator.userAgent.match(/(msie |rv:)(\d+(.\d+)?)/i)[2]},isBlankString:function(e){return!e||/^\s*$/.test(e)},escapeRegExChars:function(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")},isString:function(e){return"string"==typeof e},isNumber:function(e){return"number"==typeof e},isArray:e.isArray,isFunction:e.isFunction,isObject:e.isPlainObject,isUndefined:function(e){return void 0===e},toStr:function(e){return t.isUndefined(e)||null===e?"":e+""},bind:e.proxy,each:function(t,n){function i(e,t){return n(t,e)}e.each(t,i)},map:e.map,filter:e.grep,every:function(t,n){var i=!0;return t?(e.each(t,function(e,o){return!!(i=n.call(null,o,e,t))&&void 0}),!!i):i},some:function(t,n){var i=!1;return t?(e.each(t,function(e,o){return!(i=n.call(null,o,e,t))&&void 0}),!!i):i},mixin:e.extend,getUniqueId:function(){var e=0;return function(){return e++}}(),templatify:function(t){function n(){return String(t)}return e.isFunction(t)?t:n},defer:function(e){setTimeout(e,0)},debounce:function(e,t,n){var i,o;return function(){var a,r,s=this,c=arguments;return a=function(){i=null,n||(o=e.apply(s,c))},r=n&&!i,clearTimeout(i),i=setTimeout(a,t),r&&(o=e.apply(s,c)),o}},throttle:function(e,t){var n,i,o,a,r,s;return r=0,s=function(){r=new Date,o=null,a=e.apply(n,i)},function(){var c=new Date,l=t-(c-r);return n=this,i=arguments,0>=l?(clearTimeout(o),o=null,r=c,a=e.apply(n,i)):o||(o=setTimeout(s,l)),a}},noop:function(){}}}(),n="0.10.5",i=function(){"use strict";function e(e){return(e=t.toStr(e))?e.split(/\s+/):[]}function n(e){return(e=t.toStr(e))?e.split(/\W+/):[]}function i(e){return function(){var n=[].slice.call(arguments,0);return function(i){var o=[];return t.each(n,function(n){o=o.concat(e(t.toStr(i[n])))}),o}}}return{nonword:n,whitespace:e,obj:{nonword:i(n),whitespace:i(e)}}}(),o=function(){"use strict";function n(n){this.maxSize=t.isNumber(n)?n:100,this.reset(),this.maxSize<=0&&(this.set=this.get=e.noop)}function i(){this.head=this.tail=null}function o(e,t){this.key=e,this.val=t,this.prev=this.next=null}return t.mixin(n.prototype,{set:function(e,t){var n,i=this.list.tail;this.size>=this.maxSize&&(this.list.remove(i),delete this.hash[i.key]),(n=this.hash[e])?(n.val=t,this.list.moveToFront(n)):(n=new o(e,t),this.list.add(n),this.hash[e]=n,this.size++)},get:function(e){var t=this.hash[e];return t?(this.list.moveToFront(t),t.val):void 0},reset:function(){this.size=0,this.hash={},this.list=new i}}),t.mixin(i.prototype,{add:function(e){this.head&&(e.next=this.head,this.head.prev=e),this.head=e,this.tail=this.tail||e},remove:function(e){e.prev?e.prev.next=e.next:this.head=e.next,e.next?e.next.prev=e.prev:this.tail=e.prev},moveToFront:function(e){this.remove(e),this.add(e)}}),n}(),a=function(){"use strict";function e(e){this.prefix=["__",e,"__"].join(""),this.ttlKey="__ttl__",this.keyMatcher=new RegExp("^"+t.escapeRegExChars(this.prefix))}function n(){return(new Date).getTime()}function i(e){return JSON.stringify(t.isUndefined(e)?null:e)}function o(e){return JSON.parse(e)}var a,r;try{(a=window.localStorage).setItem("~~~","!"),a.removeItem("~~~")}catch(s){a=null}return r=a&&window.JSON?{_prefix:function(e){return this.prefix+e},_ttlKey:function(e){return this._prefix(e)+this.ttlKey},get:function(e){return this.isExpired(e)&&this.remove(e),o(a.getItem(this._prefix(e)))},set:function(e,o,r){return t.isNumber(r)?a.setItem(this._ttlKey(e),i(n()+r)):a.removeItem(this._ttlKey(e)),a.setItem(this._prefix(e),i(o))},remove:function(e){return a.removeItem(this._ttlKey(e)),a.removeItem(this._prefix(e)),this},clear:function(){var e,t,n=[],i=a.length;for(e=0;i>e;e++)(t=a.key(e)).match(this.keyMatcher)&&n.push(t.replace(this.keyMatcher,""));for(e=n.length;e--;)this.remove(n[e]);return this},isExpired:function(e){var i=o(a.getItem(this._ttlKey(e)));return!!(t.isNumber(i)&&n()>i)}}:{get:t.noop,set:t.noop,remove:t.noop,clear:t.noop,isExpired:t.noop},t.mixin(e.prototype,r),e}(),r=function(){"use strict";function n(t){t=t||{},this.cancelled=!1,this.lastUrl=null,this._send=t.transport?i(t.transport):e.ajax,this._get=t.rateLimiter?t.rateLimiter(this._get):this._get,this._cache=!1===t.cache?new o(0):c}function i(n){return function(i,o){function a(e){t.defer(function(){s.resolve(e)})}function r(e){t.defer(function(){s.reject(e)})}var s=e.Deferred();return n(i,o,a,r),s}}var a=0,r={},s=6,c=new o(10);return n.setMaxPendingRequests=function(e){s=e},n.resetCache=function(){c.reset()},t.mixin(n.prototype,{_get:function(e,t,n){function i(t){n&&n(null,t),u._cache.set(e,t)}function o(){n&&n(!0)}function c(){a--,delete r[e],u.onDeckRequestArgs&&(u._get.apply(u,u.onDeckRequestArgs),u.onDeckRequestArgs=null)}var l,u=this;this.cancelled||e!==this.lastUrl||((l=r[e])?l.done(i).fail(o):s>a?(a++,r[e]=this._send(e,t).done(i).fail(o).always(c)):this.onDeckRequestArgs=[].slice.call(arguments,0))},get:function(e,n,i){var o;return t.isFunction(n)&&(i=n,n={}),this.cancelled=!1,this.lastUrl=e,(o=this._cache.get(e))?t.defer(function(){i&&i(null,o)}):this._get(e,n,i),!!o},cancel:function(){this.cancelled=!0}}),n}(),s=function(){"use strict";function n(t){(t=t||{}).datumTokenizer&&t.queryTokenizer||e.error("datumTokenizer and queryTokenizer are both required"),this.datumTokenizer=t.datumTokenizer,this.queryTokenizer=t.queryTokenizer,this.reset()}function i(e){return e=t.filter(e,function(e){return!!e}),t.map(e,function(e){return e.toLowerCase()})}function o(){return{ids:[],children:{}}}function a(e){for(var t={},n=[],i=0,o=e.length;o>i;i++)t[e[i]]||(t[e[i]]=!0,n.push(e[i]));return n}function r(e,t){function n(e,t){return e-t}var i=0,o=0,a=[];e=e.sort(n),t=t.sort(n);for(var r=e.length,s=t.length;r>i&&s>o;)e[i]<t[o]?i++:e[i]>t[o]?o++:(a.push(e[i]),i++,o++);return a}return t.mixin(n.prototype,{bootstrap:function(e){this.datums=e.datums,this.trie=e.trie},add:function(e){var n=this;e=t.isArray(e)?e:[e],t.each(e,function(e){var a,r;a=n.datums.push(e)-1,r=i(n.datumTokenizer(e)),t.each(r,function(e){var t,i,r;for(t=n.trie,i=e.split("");r=i.shift();)(t=t.children[r]||(t.children[r]=o())).ids.push(a)})})},get:function(e){var n,o,s=this;return n=i(this.queryTokenizer(e)),t.each(n,function(e){var t,n,i,a;if(o&&0===o.length)return!1;for(t=s.trie,n=e.split("");t&&(i=n.shift());)t=t.children[i];return t&&0===n.length?(a=t.ids.slice(0),void(o=o?r(o,a):a)):(o=[],!1)}),o?t.map(a(o),function(e){return s.datums[e]}):[]},reset:function(){this.datums=[],this.trie=o()},serialize:function(){return{datums:this.datums,trie:this.trie}}}),n}(),c=function(){"use strict";function i(e){return e.local||null}function o(i){var o,a;return a={url:null,thumbprint:"",ttl:864e5,filter:null,ajax:{}},(o=i.prefetch||null)&&(o=t.isString(o)?{url:o}:o,(o=t.mixin(a,o)).thumbprint=n+o.thumbprint,o.ajax.type=o.ajax.type||"GET",o.ajax.dataType=o.ajax.dataType||"json",!o.url&&e.error("prefetch requires url to be set")),o}function a(n){function i(e){return function(n){return t.debounce(n,e)}}function o(e){return function(n){return t.throttle(n,e)}}var a,r;return r={url:null,cache:!0,wildcard:"%QUERY",replace:null,rateLimitBy:"debounce",rateLimitWait:300,send:null,filter:null,ajax:{}},(a=n.remote||null)&&(a=t.isString(a)?{url:a}:a,(a=t.mixin(r,a)).rateLimiter=/^throttle$/i.test(a.rateLimitBy)?o(a.rateLimitWait):i(a.rateLimitWait),a.ajax.type=a.ajax.type||"GET",a.ajax.dataType=a.ajax.dataType||"json",delete a.rateLimitBy,delete a.rateLimitWait,!a.url&&e.error("remote requires url to be set")),a}return{local:i,prefetch:o,remote:a}}();!function(n){"use strict";function o(t){t&&(t.local||t.prefetch||t.remote)||e.error("one of local, prefetch, or remote is required"),this.limit=t.limit||5,this.sorter=l(t.sorter),this.dupDetector=t.dupDetector||u,this.local=c.local(t),this.prefetch=c.prefetch(t),this.remote=c.remote(t),this.cacheKey=this.prefetch?this.prefetch.cacheKey||this.prefetch.url:null,this.index=new s({datumTokenizer:t.datumTokenizer,queryTokenizer:t.queryTokenizer}),this.storage=this.cacheKey?new a(this.cacheKey):null}function l(e){function n(t){return t.sort(e)}function i(e){return e}return t.isFunction(e)?n:i}function u(){return!1}var d,p;d=n.Bloodhound,p={data:"data",protocol:"protocol",thumbprint:"thumbprint"},n.Bloodhound=o,o.noConflict=function(){return n.Bloodhound=d,o},o.tokenizers=i,t.mixin(o.prototype,{_loadPrefetch:function(t){function n(e){a.clear(),a.add(t.filter?t.filter(e):e),a._saveToStorage(a.index.serialize(),t.thumbprint,t.ttl)}var i,o,a=this;return(i=this._readFromStorage(t.thumbprint))?(this.index.bootstrap(i),o=e.Deferred().resolve()):o=e.ajax(t.url,t.ajax).done(n),o},_getFromRemote:function(e,t){function n(e,n){t(e?[]:a.remote.filter?a.remote.filter(n):n)}var i,o,a=this;if(this.transport)return e=e||"",o=encodeURIComponent(e),i=this.remote.replace?this.remote.replace(this.remote.url,e):this.remote.url.replace(this.remote.wildcard,o),this.transport.get(i,this.remote.ajax,n)},_cancelLastRemoteRequest:function(){this.transport&&this.transport.cancel()},_saveToStorage:function(e,t,n){this.storage&&(this.storage.set(p.data,e,n),this.storage.set(p.protocol,location.protocol,n),this.storage.set(p.thumbprint,t,n))},_readFromStorage:function(e){var t,n={};return this.storage&&(n.data=this.storage.get(p.data),n.protocol=this.storage.get(p.protocol),n.thumbprint=this.storage.get(p.thumbprint)),t=n.thumbprint!==e||n.protocol!==location.protocol,n.data&&!t?n.data:null},_initialize:function(){function n(){o.add(t.isFunction(a)?a():a)}var i,o=this,a=this.local;return i=this.prefetch?this._loadPrefetch(this.prefetch):e.Deferred().resolve(),a&&i.done(n),this.transport=this.remote?new r(this.remote):null,this.initPromise=i.promise()},initialize:function(e){return!this.initPromise||e?this._initialize():this.initPromise},add:function(e){this.index.add(e)},get:function(e,n){function i(e){var i=a.slice(0);t.each(e,function(e){return!t.some(i,function(t){return o.dupDetector(e,t)})&&i.push(e),i.length<o.limit}),n&&n(o.sorter(i))}var o=this,a=[],r=!1;a=this.index.get(e),(a=this.sorter(a).slice(0,this.limit)).length<this.limit?r=this._getFromRemote(e,i):this._cancelLastRemoteRequest(),r||(a.length>0||!this.transport)&&n&&n(a)},clear:function(){this.index.reset()},clearPrefetchCache:function(){this.storage&&this.storage.clear()},clearRemoteCache:function(){this.transport&&r.resetCache()},ttAdapter:function(){return t.bind(this.get,this)}})}(this);var l={wrapper:'<span class="twitter-typeahead"></span>',dropdown:'<span class="tt-dropdown-menu"></span>',dataset:'<div class="tt-dataset-%CLASS%"></div>',suggestions:'<span class="tt-suggestions"></span>',suggestion:'<div class="tt-suggestion"></div>'},u=function(){"use strict";var e={wrapper:{position:"relative",display:"inline-block"},hint:{position:"absolute",top:"0",left:"0",borderColor:"transparent",boxShadow:"none",opacity:"1"},input:{position:"relative",verticalAlign:"top",backgroundColor:"transparent"},inputWithNoHint:{position:"relative",verticalAlign:"top"},dropdown:{position:"absolute",top:"100%",left:"0",zIndex:"100",display:"none"},suggestions:{display:"block"},suggestion:{whiteSpace:"nowrap",cursor:"pointer"},suggestionChild:{whiteSpace:"normal"},ltr:{left:"0",right:"auto"},rtl:{left:"auto",right:" 0"}};return t.isMsie()&&t.mixin(e.input,{backgroundImage:"url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)"}),t.isMsie()&&t.isMsie()<=7&&t.mixin(e.input,{marginTop:"-1px"}),e}(),d=function(){"use strict";function n(t){t&&t.el||e.error("EventBus initialized without el"),this.$el=e(t.el)}var i="typeahead:";return t.mixin(n.prototype,{trigger:function(e){var t=[].slice.call(arguments,1);this.$el.trigger(i+e,t)}}),n}(),p=function(){"use strict";function e(e,t,n,i){var o;if(!n)return this;for(t=t.split(c),n=i?s(n,i):n,this._callbacks=this._callbacks||{};o=t.shift();)this._callbacks[o]=this._callbacks[o]||{sync:[],async:[]},this._callbacks[o][e].push(n);return this}function t(t,n,i){return e.call(this,"async",t,n,i)}function n(t,n,i){return e.call(this,"sync",t,n,i)}function i(e){var t;if(!this._callbacks)return this;for(e=e.split(c);t=e.shift();)delete this._callbacks[t];return this}function o(e){var t,n,i,o,r;if(!this._callbacks)return this;for(e=e.split(c),i=[].slice.call(arguments,1);(t=e.shift())&&(n=this._callbacks[t]);)o=a(n.sync,this,[t].concat(i)),r=a(n.async,this,[t].concat(i)),o()&&l(r);return this}function a(e,t,n){function i(){for(var i,o=0,a=e.length;!i&&a>o;o+=1)i=!1===e[o].apply(t,n);return!i}return i}
DesignScreenshot/output/gitee_run/gitee.com_1_initial_page.html:419:links:["Africa/Abidjan|Africa/Bamako","Africa/Abidjan|Africa/Banjul","Africa/Abidjan|Africa/Conakry","Africa/Abidjan|Africa/Dakar","Africa/Abidjan|Africa/Freetown","Africa/Abidjan|Africa/Lome","Africa/Abidjan|Africa/Nouakchott","Africa/Abidjan|Africa/Ouagadougou","Africa/Abidjan|Africa/Sao_Tome","Africa/Abidjan|Africa/Timbuktu","Africa/Abidjan|Atlantic/St_Helena","Africa/Cairo|Egypt","Africa/Johannesburg|Africa/Maseru","Africa/Johannesburg|Africa/Mbabane","Africa/Khartoum|Africa/Juba","Africa/Lagos|Africa/Bangui","Africa/Lagos|Africa/Brazzaville","Africa/Lagos|Africa/Douala","Africa/Lagos|Africa/Kinshasa","Africa/Lagos|Africa/Libreville","Africa/Lagos|Africa/Luanda","Africa/Lagos|Africa/Malabo","Africa/Lagos|Africa/Niamey","Africa/Lagos|Africa/Porto-Novo","Africa/Maputo|Africa/Blantyre","Africa/Maputo|Africa/Bujumbura","Africa/Maputo|Africa/Gaborone","Africa/Maputo|Africa/Harare","Africa/Maputo|Africa/Kigali","Africa/Maputo|Africa/Lubumbashi","Africa/Maputo|Africa/Lusaka","Africa/Nairobi|Africa/Addis_Ababa","Africa/Nairobi|Africa/Asmara","Africa/Nairobi|Africa/Asmera","Africa/Nairobi|Africa/Dar_es_Salaam","Africa/Nairobi|Africa/Djibouti","Africa/Nairobi|Africa/Kampala","Africa/Nairobi|Africa/Mogadishu","Africa/Nairobi|Indian/Antananarivo","Africa/Nairobi|Indian/Comoro","Africa/Nairobi|Indian/Mayotte","Africa/Tripoli|Libya","America/Adak|America/Atka","America/Adak|US/Aleutian","America/Anchorage|US/Alaska","America/Argentina/Buenos_Aires|America/Buenos_Aires","America/Argentina/Catamarca|America/Argentina/ComodRivadavia","America/Argentina/Catamarca|America/Catamarca","America/Argentina/Cordoba|America/Cordoba","America/Argentina/Cordoba|America/Rosario","America/Argentina/Jujuy|America/Jujuy","America/Argentina/Mendoza|America/Mendoza","America/Atikokan|America/Coral_Harbour","America/Chicago|US/Central","America/Curacao|America/Aruba","America/Curacao|America/Kralendijk","America/Curacao|America/Lower_Princes","America/Denver|America/Shiprock","America/Denver|Navajo","America/Denver|US/Mountain","America/Detroit|US/Michigan","America/Edmonton|Canada/Mountain","America/Fort_Wayne|America/Indiana/Indianapolis","America/Fort_Wayne|America/Indianapolis","America/Fort_Wayne|US/East-Indiana","America/Halifax|Canada/Atlantic","America/Havana|Cuba","America/Indiana/Knox|America/Knox_IN","America/Indiana/Knox|US/Indiana-Starke","America/Jamaica|Jamaica","America/Kentucky/Louisville|America/Louisville","America/Los_Angeles|US/Pacific","America/Los_Angeles|US/Pacific-New","America/Manaus|Brazil/West","America/Mazatlan|Mexico/BajaSur","America/Mexico_City|Mexico/General","America/New_York|US/Eastern","America/Noronha|Brazil/DeNoronha","America/Panama|America/Cayman","America/Phoenix|US/Arizona","America/Port_of_Spain|America/Anguilla","America/Port_of_Spain|America/Antigua","America/Port_of_Spain|America/Dominica","America/Port_of_Spain|America/Grenada","America/Port_of_Spain|America/Guadeloupe","America/Port_of_Spain|America/Marigot","America/Port_of_Spain|America/Montserrat","America/Port_of_Spain|America/St_Barthelemy","America/Port_of_Spain|America/St_Kitts","America/Port_of_Spain|America/St_Lucia","America/Port_of_Spain|America/St_Thomas","America/Port_of_Spain|America/St_Vincent","America/Port_of_Spain|America/Tortola","America/Port_of_Spain|America/Virgin","America/Regina|Canada/East-Saskatchewan","America/Regina|Canada/Saskatchewan","America/Rio_Branco|America/Porto_Acre","America/Rio_Branco|Brazil/Acre","America/Santiago|Chile/Continental","America/Sao_Paulo|Brazil/East","America/St_Johns|Canada/Newfoundland","America/Tijuana|America/Ensenada","America/Tijuana|America/Santa_Isabel","America/Tijuana|Mexico/BajaNorte","America/Toronto|America/Montreal","America/Toronto|Canada/Eastern","America/Vancouver|Canada/Pacific","America/Whitehorse|Canada/Yukon","America/Winnipeg|Canada/Central","Asia/Ashgabat|Asia/Ashkhabad","Asia/Bangkok|Asia/Phnom_Penh","Asia/Bangkok|Asia/Vientiane","Asia/Dhaka|Asia/Dacca","Asia/Dubai|Asia/Muscat","Asia/Ho_Chi_Minh|Asia/Saigon","Asia/Hong_Kong|Hongkong","Asia/Jerusalem|Asia/Tel_Aviv","Asia/Jerusalem|Israel","Asia/Kathmandu|Asia/Katmandu","Asia/Kolkata|Asia/Calcutta","Asia/Macau|Asia/Macao","Asia/Makassar|Asia/Ujung_Pandang","Asia/Nicosia|Europe/Nicosia","Asia/Qatar|Asia/Bahrain","Asia/Riyadh|Asia/Aden","Asia/Riyadh|Asia/Kuwait","Asia/Seoul|ROK","Asia/Shanghai|Asia/Chongqing","Asia/Shanghai|Asia/Chungking","Asia/Shanghai|Asia/Harbin","Asia/Shanghai|PRC","Asia/Singapore|Singapore","Asia/Taipei|ROC","Asia/Tehran|Iran","Asia/Thimphu|Asia/Thimbu","Asia/Tokyo|Japan","Asia/Ulaanbaatar|Asia/Ulan_Bator","Asia/Urumqi|Asia/Kashgar","Atlantic/Faroe|Atlantic/Faeroe","Atlantic/Reykjavik|Iceland","Australia/Adelaide|Australia/South","Australia/Brisbane|Australia/Queensland","Australia/Broken_Hill|Australia/Yancowinna","Australia/Darwin|Australia/North","Australia/Hobart|Australia/Tasmania","Australia/Lord_Howe|Australia/LHI","Australia/Melbourne|Australia/Victoria","Australia/Perth|Australia/West","Australia/Sydney|Australia/ACT","Australia/Sydney|Australia/Canberra","Australia/Sydney|Australia/NSW","Etc/GMT+0|Etc/GMT","Etc/GMT+0|Etc/GMT-0","Etc/GMT+0|Etc/GMT0","Etc/GMT+0|Etc/Greenwich","Etc/GMT+0|GMT","Etc/GMT+0|GMT+0","Etc/GMT+0|GMT-0","Etc/GMT+0|GMT0","Etc/GMT+0|Greenwich","Etc/UCT|UCT","Etc/UTC|Etc/Universal","Etc/UTC|Etc/Zulu","Etc/UTC|UTC","Etc/UTC|Universal","Etc/UTC|Zulu","Europe/Belgrade|Europe/Ljubljana","Europe/Belgrade|Europe/Podgorica","Europe/Belgrade|Europe/Sarajevo","Europe/Belgrade|Europe/Skopje","Europe/Belgrade|Europe/Zagreb","Europe/Chisinau|Europe/Tiraspol","Europe/Dublin|Eire","Europe/Helsinki|Europe/Mariehamn","Europe/Istanbul|Asia/Istanbul","Europe/Istanbul|Turkey","Europe/Lisbon|Portugal","Europe/London|Europe/Belfast","Europe/London|Europe/Guernsey","Europe/London|Europe/Isle_of_Man","Europe/London|Europe/Jersey","Europe/London|GB","Europe/London|GB-Eire","Europe/Moscow|W-SU","Europe/Oslo|Arctic/Longyearbyen","Europe/Oslo|Atlantic/Jan_Mayen","Europe/Prague|Europe/Bratislava","Europe/Rome|Europe/San_Marino","Europe/Rome|Europe/Vatican","Europe/Warsaw|Poland","Europe/Zurich|Europe/Busingen","Europe/Zurich|Europe/Vaduz","Pacific/Auckland|Antarctica/McMurdo","Pacific/Auckland|Antarctica/South_Pole","Pacific/Auckland|NZ","Pacific/Chatham|NZ-CHAT","Pacific/Chuuk|Pacific/Truk","Pacific/Chuuk|Pacific/Yap","Pacific/Easter|Chile/EasterIsland","Pacific/Guam|Pacific/Saipan","Pacific/Honolulu|Pacific/Johnston","Pacific/Honolulu|US/Hawaii","Pacific/Kwajalein|Kwajalein","Pacific/Pago_Pago|Pacific/Midway","Pacific/Pago_Pago|Pacific/Samoa","Pacific/Pago_Pago|US/Samoa","Pacific/Pohnpei|Pacific/Ponape"]}),e}),function(e,t){function n(n,a){n=n||"",a=a||60;var r,s,c,l,u,d,p=["#1abc9c","#2ecc71","#3498db","#9b59b6","#34495e","#16a085","#27ae60","#2980b9","#8e44ad","#2c3e50","#f1c40f","#e67e22","#e74c3c","#eca0f1","#95a5a6","#f39c12","#d35400","#c0392b","#bdc3c7","#7f8c8d"],f=String(n).toUpperCase().split(" ");if(r=1==f.length?f[0]?f[0].charAt(0):"?":f[0].charAt(0)+f[1].charAt(0),e.devicePixelRatio&&(a*=e.devicePixelRatio),d=[r,a].join("/"),!i)try{(i=JSON.stringify(e.localStorage.getItem("LetterAvatar")))&&"string"!=typeof i||(i={})}catch(err){i={}}return"string"==typeof i[d]?i[d]:(s=(("?"==r?72:r.charCodeAt(0))-64)%20,(c=t.createElement("canvas")).width=a,c.height=a,(l=c.getContext("2d")).fillStyle=p[s-1],l.fillRect(0,0,c.width,c.height),l.font=Math.round(c.width/2)+"px Arial",l.textAlign="center",l.fillStyle="#FFF",a<25?l.fillText(r,a/2,a/1.37):"U"===r||"V"===r||"W"===r?l.fillText(r,a/2,a/1.42):l.fillText(r,a/2,a/1.48),u=c.toDataURL(),i[d]=u,c=null,o&&clearTimeout(o),o=setTimeout(function(){e.localStorage.setItem("LetterAvatar",JSON.stringify(i)),o=0},500),u)}var i,o;if(n.transform=function(){Array.prototype.forEach.call(t.querySelectorAll("img[avatar]"),function(e,t){t=e.getAttribute("avatar"),e.src=n(t,e.getAttribute("width")),e.removeAttribute("avatar"),e.setAttribute("alt",t)})},"function"==typeof define&&define.amd)define(function(){return n});else if("undefined"!=typeof exports)"undefined"!=typeof module&&module.exports&&(exports=module.exports=n),exports.LetterAvatar=n;else{window.LetterAvatar=n;var a=window.MutationObserver||window.WebKitMutationObserver;if(a){var r={childList:!0,subtree:!0,characterData:!0};new a(function(){n.transform()}).observe(t,r)}else t.addEventListener&&(t.addEventListener("DOMContentLoaded",function(){n.transform()}),t.addEventListener("DOMSubtreeModified",function(){n.transform()}),t.addEventListener("DOMNodeInserted",function(){n.transform()}))}}(window,document),
DesignScreenshot/output/gitee_run/gitee.com_1_initial_page.html:446:function(e){e.widget("ui.tagit",{options:{allowDuplicates:!1,caseSensitive:!0,fieldName:"tags",placeholderText:null,readOnly:!1,removeConfirmation:!1,tagLimit:null,availableTags:[],autocomplete:{},showAutocompleteOnFocus:!1,allowSpaces:!1,singleField:!1,singleFieldDelimiter:",",singleFieldNode:null,animate:!0,tabIndex:null,beforeTagAdded:null,afterTagAdded:null,beforeTagRemoved:null,afterTagRemoved:null,onTagClicked:null,onTagLimitExceeded:null,onTagAdded:null,onTagRemoved:null,tagSource:null},_create:function(){var t=this;this.element.is("input")?(this.tagList=e("<ul></ul>").insertAfter(this.element),this.options.singleField=!0,this.options.singleFieldNode=this.element,this.element.addClass("tagit-hidden-field")):this.tagList=this.element.find("ul, ol").andSelf().last(),this.tagInput=e('<input type="text" />').addClass("ui-widget-content"),this.options.readOnly&&this.tagInput.attr("disabled","disabled"),this.options.tabIndex&&this.tagInput.attr("tabindex",this.options.tabIndex),this.options.placeholderText&&this.tagInput.attr("placeholder",this.options.placeholderText),this.options.autocomplete.source||(this.options.autocomplete.source=function(t,n){var i=t.term.toLowerCase(),o=e.grep(this.options.availableTags,function(e){return e.toLowerCase().indexOf(i)>-1});this.options.allowDuplicates||(o=this._subtractArray(o,this.assignedTags())),n(o)}),this.options.showAutocompleteOnFocus&&(this.tagInput.focus(function(){t._showAutocomplete()}),"undefined"==typeof this.options.autocomplete.minLength&&(this.options.autocomplete.minLength=0)),e.isFunction(this.options.autocomplete.source)&&(this.options.autocomplete.source=e.proxy(this.options.autocomplete.source,this)),e.isFunction(this.options.tagSource)&&(this.options.tagSource=e.proxy(this.options.tagSource,this)),this.tagList.addClass("tagit").addClass("ui-widget ui-widget-content ui-corner-all").append(e('<li class="tagit-new"></li>').append(this.tagInput)).click(function(n){var i=e(n.target);if(i.hasClass("tagit-label")){var o=i.closest(".tagit-choice");o.hasClass("removed")||t._trigger("onTagClicked",n,{tag:o,tagLabel:t.tagLabel(o)})}else t.tagInput.focus()});var n=!1;if(this.options.singleField)if(this.options.singleFieldNode){var i=e(this.options.singleFieldNode),o=i.val().split(this.options.singleFieldDelimiter);i.val(""),e.each(o,function(e,i){t.createTag(i,null,!0),n=!0})}else this.options.singleFieldNode=e('<input type="hidden" style="display:none;" value="" name="'+this.options.fieldName+'" />'),this.tagList.after(this.options.singleFieldNode);if(n||this.tagList.children("li").each(function(){e(this).hasClass("tagit-new")||(t.createTag(e(this).text(),e(this).attr("class"),!0),e(this).remove())}),this.tagInput.keydown(function(n){if(n.which==e.ui.keyCode.BACKSPACE&&""===t.tagInput.val()){var i=t._lastTag();!t.options.removeConfirmation||i.hasClass("remove")?t.removeTag(i):t.options.removeConfirmation&&i.addClass("remove ui-state-highlight")}else t.options.removeConfirmation&&t._lastTag().removeClass("remove ui-state-highlight");(n.which===e.ui.keyCode.COMMA&&!1===n.shiftKey||n.which===e.ui.keyCode.ENTER||n.which==e.ui.keyCode.TAB&&""!==t.tagInput.val()||n.which==e.ui.keyCode.SPACE&&!0!==t.options.allowSpaces&&('"'!=e.trim(t.tagInput.val()).replace(/^s*/,"").charAt(0)||'"'==e.trim(t.tagInput.val()).charAt(0)&&'"'==e.trim(t.tagInput.val()).charAt(e.trim(t.tagInput.val()).length-1)&&e.trim(t.tagInput.val()).length-1!=0))&&(n.which===e.ui.keyCode.ENTER&&""===t.tagInput.val()||n.preventDefault(),t.options.autocomplete.autoFocus&&t.tagInput.data("autocomplete-open")||(t.tagInput.autocomplete("close"),t.createTag(t._cleanedInput())))}).blur(function(n){var i=n.relatedTarget;t.tagInput.data("autocomplete-open")||e(i).hasClass("cancel-tag-edit")||t.createTag(t._cleanedInput())}),this.options.availableTags||this.options.tagSource||this.options.autocomplete.source){var a={select:function(e,n){return t.createTag(n.item.value),!1}};e.extend(a,this.options.autocomplete),a.source=this.options.tagSource||a.source,this.tagInput.autocomplete(a).bind("autocompleteopen.tagit",function(){t.tagInput.data("autocomplete-open",!0)}).bind("autocompleteclose.tagit",function(){t.tagInput.data("autocomplete-open",!1)}),this.tagInput.autocomplete("widget").addClass("tagit-autocomplete")}},destroy:function(){return e.Widget.prototype.destroy.call(this),this.element.unbind(".tagit"),this.tagList.unbind(".tagit"),this.tagInput.removeData("autocomplete-open"),this.tagList.removeClass(["tagit","ui-widget","ui-widget-content","ui-corner-all","tagit-hidden-field"].join(" ")),this.element.is("input")?(this.element.removeClass("tagit-hidden-field"),this.tagList.remove()):(this.element.children("li").each(function(){e(this).hasClass("tagit-new")?e(this).remove():(e(this).removeClass(["tagit-choice","ui-widget-content","ui-state-default","ui-state-highlight","ui-corner-all","remove","tagit-choice-editable","tagit-choice-read-only"].join(" ")),e(this).text(e(this).children(".tagit-label").text()))}),this.singleFieldNode&&this.singleFieldNode.remove()),this},_cleanedInput:function(){return e.trim(this.tagInput.val().replace(/^"(.*)"$/,"$1"))},_lastTag:function(){return this.tagList.find(".tagit-choice:last:not(.removed)")},_tags:function(){return this.tagList.find(".tagit-choice:not(.removed)")},assignedTags:function(){var t=this,n=[];return this.options.singleField?""===(n=e(this.options.singleFieldNode).val().split(this.options.singleFieldDelimiter))[0]&&(n=[]):this._tags().each(function(){n.push(t.tagLabel(this))}),n},_updateSingleTagsField:function(t){e(this.options.singleFieldNode).val(t.join(this.options.singleFieldDelimiter)).trigger("change")},_subtractArray:function(t,n){for(var i=[],o=0;o<t.length;o++)-1==e.inArray(t[o],n)&&i.push(t[o]);return i},tagLabel:function(t){return this.options.singleField?e(t).find(".tagit-label:first").text():e(t).find("input:first").val()},_showAutocomplete:function(){this.tagInput.autocomplete("search","")},_findTagByLabel:function(t){var n=this,i=null;return this._tags().each(function(){if(n._formatStr(t)==n._formatStr(n.tagLabel(this)))return i=e(this),!1}),i},_isNew:function(e){return!this._findTagByLabel(e)},_formatStr:function(t){return this.options.caseSensitive?t:e.trim(t.toLowerCase())},_effectExists:function(t){return Boolean(e.effects&&(e.effects[t]||e.effects.effect&&e.effects.effect[t]))},createTag:function(t,n,i){var o=this;if(t=e.trim(t),this.options.preprocessTag&&(t=this.options.preprocessTag(t)),""===t)return!1;if(!this.options.allowDuplicates&&!this._isNew(t)){var a=this._findTagByLabel(t);return!1!==this._trigger("onTagExists",null,{existingTag:a,duringInitialization:i})&&this._effectExists("highlight")&&a.effect("highlight"),!1}if(this.options.tagLimit&&this._tags().length>=this.options.tagLimit)return this._trigger("onTagLimitExceeded",null,{duringInitialization:i}),!1;var r=e(this.options.onTagClicked?'<a class="tagit-label"></a>':'<span class="tagit-label"></span>').text(t),s=e("<li></li>").addClass("tagit-choice ui-widget-content ui-state-default ui-corner-all").addClass(n).append(r);if(this.options.readOnly)s.addClass("tagit-choice-read-only");else{s.addClass("tagit-choice-editable");var c=e("<span></span>").addClass("ui-icon ui-icon-close"),l=e('<a><span class="text-icon">\xd7</span></a>').addClass("tagit-close").append(c).click(function(){o.removeTag(s)});s.append(l)}if(!this.options.singleField){var u=r.html();s.append('<input type="hidden" value="'+u+'" name="'+this.options.fieldName+'" class="tagit-hidden-field" />')}if(!1!==this._trigger("beforeTagAdded",null,{tag:s,tagLabel:this.tagLabel(s),duringInitialization:i})){if(this.options.singleField){var d=this.assignedTags();d.push(t),this._updateSingleTagsField(d)}this._trigger("onTagAdded",null,s),this.tagInput.val(""),this.tagInput.parent().before(s),this._trigger("afterTagAdded",null,{tag:s,tagLabel:this.tagLabel(s),duringInitialization:i})}},removeTag:function(t,n){if(n=void 0===n?this.options.animate:n,t=e(t),this._trigger("onTagRemoved",null,t),!1!==this._trigger("beforeTagRemoved",null,{tag:t,tagLabel:this.tagLabel(t)})){if(this.options.singleField){var i=this.assignedTags(),o=this.tagLabel(t);i=e.grep(i,function(e){return e!=o}),this._updateSingleTagsField(i)}if(n){t.addClass("removed");var a=this._effectExists("blind")?["blind",{direction:"horizontal"},"fast"]:["fast"],r=this;a.push(function(){t.remove(),r._trigger("afterTagRemoved",null,{tag:t,tagLabel:r.tagLabel(t)})}),t.fadeOut("fast").hide.apply(t,a).dequeue()}else t.remove(),this._trigger("afterTagRemoved",null,{tag:t,tagLabel:this.tagLabel(t)})}},removeTagByLabel:function(e,t){var n=this._findTagByLabel(e);if(!n)throw"No such tag exists with the name '"+e+"'";this.removeTag(n,t)},removeAll:function(){var e=this;this._tags().each(function(t,n){e.removeTag(n,!1)})}})}(jQuery),function(){this.replaceAllName=function(e,t){var n,i;return n=Object.keys(t).map(function(e){return"("+(e=e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))+" )|("+e+"$)"}),i=new RegExp(n.join("|"),"g"),e.replace(i,function(e){return t[e.trim()]+" "})},this.resetKey=function(e,t,n){var i;return i=e[t],e[n]=i,delete e[t]},this.replaceUserName=function(e){var t,n,i,o,a;if(0===(t=e.find("textarea.md-input")).length&&(t=$("#editor_comment")),o=t.data("users"),n=t.val(),!jQuery.isEmptyObject(o)){for(i in a={},Object.keys(o).forEach(function(e){return a[e]=o[e]}),a)resetKey(a,i,"@"+i);Object.keys(a).map(function(e){return a[e]="@"+a[e]}),n=replaceAllName(n,a)}return t.val(n)}}.call(this),window.Gitee.setFullscreen=function(e){var t=$(this),n=t.data("mode"),i=t.find("i"),o=t.find(".tips"),a=window._web_tips||{},r=a.fullscreenTips||"\u5168\u5c4f",s=a.fullscreenExitTips||"\u9000\u51fa\u5168\u5c4f";(n="boolean"==typeof e?e:!n)?(t.addClass("active"),o.text(s),i.addClass("fa-compress").removeClass("fa-expand"),$("body").addClass("fullscreen-mode"),$("body").trigger("fullscreenchange",!0)):(t.removeClass("active"),o.text(r),i.addClass("fa-expand").removeClass("fa-compress"),$("body").removeClass("fullscreen-mode"),$("body").trigger("fullscreenchange",!1)),t.data("mode",n)},$(function(){function e(){var e=!0;if(l?noticeDropdown.setUnreadCount(l.unreadCount):noticeDropdown.loadUnreadCount(),l)return t.removeClass("ui dropdown"),void n.remove();u.resetPanelPosition(),$(window).on("resize",window.globalUtils.debouce(u.resetPanelPosition,400)),$("body").on("fullscreenchange",window.globalUtils.debouce(u.resetPanelPosition,400,!0)),o.on("click",u.loadNotices),s.on("click",u.markNotices),r.on("click",".noti",u.markNotice),t.on("mousedown",function(e){return e.stopPropagation(),!1}),t.dropdown({on:"hover",onHide:function(){t.removeClass("hoverable")},onShow:function(){var n=null,i=null;t.addClass("hoverable"),e&&(u.activeTabByUnreadCount(),e=!1),(n=o.filter(".active")).length&&((i=noticeDropdown.getNoticesByScope(n.data("scope"))).total_count&&u.renderNotices(i.list),n.trigger("click"))}}),$(window).on("document:visibility",function(e,t){var n=window.noticeDropdown;t.isHidden||(n.storage.setItem(n.storageTimestampKey,Date.now()),$.ajax({url:p,type:"GET",xhrFields:{withCredentials:!0},success:function(e){n.storage.setItem(n.storageDatasKey,JSON.stringify(e)),n.setUnreadCount(e)}}))})}var t=$("#notice-dropdown");if(t.length&&void 0!==t.data("enable")){var n=t.find(".notice-dropdown-panel"),i=t.find(".remind-button"),o=n.find(".notice-dropdown-panel-header .tab"),a=t.find(".notice-count"),r=n.find(".notice-list"),s=n.find(".mark-notices"),c=n.find(".load-all"),l=window.notisPageParams,u=null,d=null,p=t.data("count-path"),f=t.data("mark-notice-path");window.noticeDropdown={unreadCount:{},notices:{},loading:!1,scope:null,timestampExpir:3e4,storageTimestampKey:"unreadCountTimestamp",storageDatasKey:"unreadCountDatas",storage:window.localStorage,requestThrottlingTime:15e3,loadUnreadCount:function(){var e=this;if("hidden"!==window.document.visibilityState){var t=+e.storage.getItem(e.storageTimestampKey)||0,n=Date.now();if(t+e.requestThrottlingTime>n){var i=JSON.parse(e.storage.getItem(e.storageDatasKey));if(i&&$.isPlainObject(i))return void e.setUnreadCount(i)}$.ajax({url:p,type:"GET",xhrFields:{withCredentials:!0},success:function(t){e.storage.setItem(e.storageTimestampKey,n),e.storage.setItem(e.storageDatasKey,JSON.stringify(t)),e.setUnreadCount(t)}})}},setUnreadCount:function(e){try{var t={infos:e.infos||0,referer:e.referer||0,messages:e.messages||0};t.total=t.infos+t.referer+t.messages,this.unreadCount=t,this.storage.setItem(this.storageDatasKey,JSON.stringify(t))}catch(n){this.unreadCount=null}u.updateUnreadCountView(this.unreadCount||0)},setUnreadCountByScope:function(e,t){var n={},i=this.unreadCount;n[e]=t,i=$.extend(i,n),this.setUnreadCount(i)},getUnreadCountByScope:function(e){return this.unreadCount&&this.unreadCount[e]||0},loadNotices:function(e,t,n){var i=this;i.scope=e,$.ajax({url:t,type:"GET",xhrFields:{withCredentials:!0},beforeSend:function(){n.onStart(),i.loading=!0},success:function(t){i.notices[e]=t,n.onComplete(!0,t),i.loading=!1},error:function(e){console.info(e.responseText),n.onComplete(!1),i.loading=!1}})},getNoticesByScope:function(e){return this.notices[e]||{}},clearNoticesByScope:function(e){this.notices[e]=null}},u={loadNotices:function(e){if(!noticeDropdown.loading){var t=$(this),n=t.data("data-path"),i=t.data("html-path"),a=t.data("scope"),r=noticeDropdown.getNoticesByScope(a);return noticeDropdown.loadNotices(a,n,{onStart:function(){Object.keys(r).length?r.total_count?u.renderNotices(r.list):u.toggleDropdownState("empty"):u.toggleDropdownState("loading")},onComplete:function(e,t){e&&t.total_count?u.renderNotices(t.list):u.toggleDropdownState("empty"),t&&t.total_count!=r.total_count&&noticeDropdown.setUnreadCountByScope(a,t.total_count)}}),o.removeClass("active"),t.addClass("active"),c.attr("href",i),e.preventDefault(),!1}},markNotices:function(e){var t=noticeDropdown.scope,n=noticeDropdown.notices[t].list.map(function(e){return e.id}),i=r.css("height"),o={scope:t};"messages"==t?o.message_ids=n:o.noti_ids=n,$.ajax({url:"/notifications/mark_dropdown",data:o,type:"PUT",success:function(e){5===n.length?(r.css("min-height",i),u.renderNotices(e.list)):(u.toggleDropdownState("empty"),r.css("min-height","auto")),noticeDropdown.notices[t]=e,noticeDropdown.setUnreadCountByScope(t,e.total_count)}}),e.preventDefault()},markNotice:function(){var e=$(this),t=e.data("type"),n=e.data("id");if(t&&"message"!=t&&n)return $.ajax({url:f,data:{noti_ids:n},type:"PUT"}),!0},updateUnreadCountView:function(e){if(!e||!e.total)return a.removeClass("visible"),this.toggleDropdownState("empty"),void $('link[rel="shortcut icon"]').attr("href","/assets/favicon.ico");$('link[rel="shortcut icon"]').attr("href","/assets/favicon_message.ico?1581387642851"),Object.keys(e).forEach(function(t){var n=e[t],i=a.filter("."+t);n>10&&"total"===t&&i.addClass("pl-1 pr-1"),n<1?i.empty().removeClass("visible"):n<=99?i.text(n).addClass("visible"):i.html('99<span style="position: relative;top: -1px;">+</span>').addClass("visible")})},toggleDropdownState:function(e){"loading"===e?t.removeClass("empty shown").addClass("loading"):"empty"===e?t.removeClass("loading shown").addClass("empty"):t.removeClass("empty loading").addClass("shown")},renderNotices:function(e){var t=d.noticesTemplate(e);r.html(t),this.toggleDropdownState("shown")},activeTabByUnreadCount:function(){var e=noticeDropdown.unreadCount;e&&e.total&&(e.referer?scope="referer":e.infos?scope="infos":scope="messages",o.removeClass("active"),o.filter('[data-scope="'+scope+'"]').addClass("active"))},resetPanelPosition:function(){var e=null,t=i.offset().left+i.width()/2+n.width()/2;windowWidth=$(window).width(),e=t<windowWidth?i.position().left+i.width()/2-n.width()/2:windowWidth-i.offset().left-n.width(),n.css("left",e+"px")}},d={sanitize:function(e){return"string"!=typeof e?"":e.replace(/<(?:.|\n)*?>/gm,"").replace(/</gm,"&lt;").replace(/>/gm,"&gt;")},noticesTemplate:function(e){return void 0===e?"":e.map(function(e){var t=d.noticeNamespaceTemplate(e.namespace)||"";return"message"==e.type&&(e.message=e.actor.name+" : "+e.content),e.url=e.url||"javascript: void(0);",'<a class="noti" href="'+d.sanitize(e.url)+'" target="_blank" data-type="'+e.type+'" data-id="'+e.id+'"><div class="title">'+d.sanitize(e.message)+'</div><div class="meta"><time class="timeago">'+$.timeago(e.updated_at)+"</time>"+t+"</div></a>"}).join("")},noticeNamespaceTemplate:function(e){if(e)return' \xb7 <span class="namespace">'+d.sanitize(e.name)+"</span>"}},e()}}),$(function(){function e(){var e=null,t=O.offset().left+O.width()/2+M.innerWidth()/2;windowWidth=$(window).width(),e=t<windowWidth?O.position().left+O.width()/2-M.innerWidth()/2:windowWidth-O.offset().left-M.innerWidth(),M.css("left",e+"px")}function t(e){var t={};t[e]=f,1!=d&&2!=d||(gon.info.current_user.id?$.ajax({type:"post",url:"/update_feature_state",data:t,success:function(e){200==e.status&&s()},error:function(){}}):$.cookie(e,f,{path:"/",expires:60}))}function n(){t("slide_id")}function i(){t("feature_log_id")}function o(){T.css("display","block"),x.css("display","none")}function a(){M.stop(!0).slideUp("fast"),T.css("display","none"),x.css("display","block"),h&&C.popup({content:g.function_update,className:{popup:"ui popup notice_popup"},position:"bottom left",offset:5}).popup("show")}function r(){if(0!=d){var e=$.cookie("slide_id");$.cookie("feature_log_id")>=f||e>f?d=0:e==f&&(d=1)}}function s(){$.ajax({type:"get",url:"/feature_notifications",success:function(e){if(200==e.status){e=e.data;if(d=null,null==e)return a(),w.attr("href","javascript:void(0)"),!1;w.attr("href",e.url),v.html(e.title),y.html(e.content),A.attr("src",e.image_url),d=e.noti_level,f=e.id,gon.info.current_user.id||r(),2==d&&(o(),M.stop(!1,!0).slideDown(m)),1==d&&(o(),h&&M.stop(!1,!0).slideDown(m)),0==d&&a()}else a()},error:function(){a()}})}function c(){h=!0,C.css("background-color",p),s()}function l(){k&&clearTimeout(k),k=setTimeout(function(){c()},200)}function u(){k&&clearTimeout(k),M.stop(!1,!0).slideUp("fast",function(){2==d&&n()}),b.css("background-color","transparent"),O.css("background-color","transparent"),C.popup("destroy"),h=!1}if(-1!=$("#feature-update-notice").index()){var d=null,p="#41485B",f=null,h=!1,m=150,g={"zh-CN":{function_update:"\u529f\u80fd\u66f4\u65b0"},"zh-TW":{function_update:"\u529f\u80fd\u66f4\u65b0"},en:{function_update:"Function update"}}[gon.locale||"zh-CN"],b=$("#feature-update-notice"),v=b.find(".notice-update-title"),M=b.find(".feature-update-notice-panel"),y=b.find(".notice-update-des"),A=b.find(".notice-img-show"),w=b.find(" a"),z=b.find(".click-knowed"),T=b.find(".bubl-on-icon"),x=b.find(".bubl-off-icon"),O=b.find(".notice-update-icon"),C=b;$("#home-index").index()>-1&&(p="#F0F0F0",C=O),$(window).on("resize",window.globalUtils.debouce(e,400)),$("body").on("fullscreenchange",window.globalUtils.debouce(e,400,!0)),e(),z.on("click",function(e){i(),T.css("display","none"),x.css("display","block"),u(),M.stop(!1,!0).slideUp(),e.stopPropagation()}),$(document).click(function(){2==d&&(M.stop(!1,!0).slideUp(),n())}),M.on("click",function(e){e.stopPropagation()}),s();var k=null;b.mouseenter(l),b.mouseleave(u),M.mouseenter(function(e){e.stopPropagation()})}}),function(e){e.fn.share=function(t){function n(t,n){var i=o(n);"prepend"==n.mode&&i.reverse(),i.length&&e.each(i,function(i,o){var r=a(o,n),s=n.initialized?t.find(".icon-"+o):e('<a class="social-share-icon icon-'+o+'"></a>');if(!s.length)return!0;s.prop("aria-label","\u5206\u4eab\u5230 "+p[o]),s.prop("href",r),"wechat"===o?s.prop("tabindex",-1):s.prop("target","_blank"),n.initialized||("prepend"==n.mode?t.prepend(s):t.append(s))})}function i(e,t){var n=e.find("a.icon-wechat");n.length&&(n.append('<div class="wechat-qrcode"><h4>'+t.wechatQrcodeTitle+'</h4><div class="qrcode"></div><div class="help">'+t.wechatQrcodeHelper+"</div></div>"),n.find(".qrcode").qrcode({width:t.wechatQrcodeSize,height:t.wechatQrcodeSize,text:t.url}),n.offset().top<100&&n.find(".wechat-qrcode").addClass("bottom"))}function o(t){0===t.mobileSites.length&&t.sites.length&&(t.mobileSites=t.sites);var n=(s()?t.mobileSites:t.sites.length?t.sites:[]).slice(0),i=t.disabled;return"string"==typeof n&&(n=n.split(/\s*,\s*/)),"string"==typeof i&&(i=i.split(/\s*,\s*/)),r()&&i.push("wechat"),i.length&&e.each(i,function(t,i){var o=e.inArray(i,n);-1!==o&&n.splice(o,1)}),n}function a(e,t){var n=d[e];for(var i in t.summary=t.description,t)if(t.hasOwnProperty(i)){var o=e+i.replace(/^[a-z]/,function(e){return e.toUpperCase()}),a=encodeURIComponent(t[o]===undefined?t[i]:t[o]);n=n.replace(new RegExp("{{"+i.toUpperCase()+"}}","g"),a)}return n}function r(){return/MicroMessenger/i.test(navigator.userAgent)}function s(){return e(window).width()<=768}var c=e(document.head),l={url:location.href,site_url:location.origin,source:c.find("[name=site], [name=Site]").attr("content")||document.title,title:c.find("[name=title], [name=Title]").attr("content")||document.title,description:c.find("[name=description], [name=Description]").attr("content")||"",image:e("img:first").prop("src")||"",imageSelector:undefined,weiboKey:"",wechatQrcodeTitle:"\u5fae\u4fe1\u626b\u4e00\u626b\uff1a\u5206\u4eab",wechatQrcodeHelper:"<p>\u5fae\u4fe1\u91cc\u70b9\u201c\u53d1\u73b0\u201d\uff0c\u626b\u4e00\u4e0b</p><p>\u4e8c\u7ef4\u7801\u4fbf\u53ef\u5c06\u672c\u6587\u5206\u4eab\u81f3\u670b\u53cb\u5708\u3002</p>",wechatQrcodeSize:100,mobileSites:[],sites:["weibo","qq","wechat","tencent","douban","qzone","linkedin","diandian","facebook","twitter","google"],disabled:[],initialized:!1},u=e.extend({},l,t),d={qzone:"http://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?url={{URL}}&title={{TITLE}}&desc={{DESCRIPTION}}&summary={{SUMMARY}}&site={{SOURCE}}",qq:"http://connect.qq.com/widget/shareqq/index.html?url={{URL}}&title={{TITLE}}&source={{SOURCE}}&desc={{DESCRIPTION}}&pics={{IMAGE}}&summary={{SUMMARY}}",tencent:"http://share.v.t.qq.com/index.php?c=share&a=index&title={{TITLE}}&url={{URL}}&pic={{IMAGE}}",weibo:"http://service.weibo.com/share/share.php?url={{URL}}&title={{TITLE}}&pic={{IMAGE}}&appkey={{WEIBOKEY}}",wechat:"javascript:;",douban:"http://shuo.douban.com/!service/share?href={{URL}}&name={{TITLE}}&text={{DESCRIPTION}}&image={{IMAGE}}&starid=0&aid=0&style=11",diandian:"http://www.diandian.com/share?lo={{URL}}&ti={{TITLE}}&type=link",linkedin:"http://www.linkedin.com/shareArticle?mini=true&ro=true&title={{TITLE}}&url={{URL}}&summary={{SUMMARY}}&source={{SOURCE}}&armin=armin",facebook:"https://www.facebook.com/sharer/sharer.php?u={{URL}}",twitter:"https://twitter.com/intent/tweet?text={{TITLE}}&url={{URL}}&via={{SITE_URL}}",google:"https://plus.google.com/share?url={{URL}}"},p={qzone:"QQ\u7a7a\u95f4",qq:"QQ",tencent:"\u817e\u8baf\u5fae\u535a",weibo:"\u5fae\u535a",wechat:"\u5fae\u4fe1",douban:"\u8c46\u74e3",diandian:"\u70b9\u70b9",linkedin:"LinkedIn",facebook:"Facebook",twitter:"Twitter",google:"Google"};this.each(function(){if(e(this).data("initialized"))return!0;var t=e.extend({},u,e(this).data());t.imageSelector&&(t.image=e(t.imageSelector).map(function(){return e(this).prop("src")}).get().join("||"));var o=e(this).addClass("share-component social-share");n(o,t),i(o,t),e(this).data("initialized",!0)})},e(function(){e(".share-component,.social-share").share()})}(jQuery),moment.tz.setDefault("Asia/Shanghai"),$.cookie("tz",moment.tz.guess(),{path:"/"}),window.updatePage=function(e){return $.ajax({type:"GET",url:location.href,data:e,dataType:"script"})},window.slugify=function(e){return e.replace(/[^-a-zA-Z0-9]+/g,"_").toLowerCase()},window.ajaxGet=function(e){return $.ajax({type:"GET",url:e,dataType:"script"})},window.getUrlParameter=function(e){for(var t=window.location.search.substring(1).split("&"),n=0;n<t.length;n++){var i=t[n].split("=");if(i[0]==e)return i[1]}},window.showAndHide=function(){},window.errorMessage=function(e){var t;return(t=$("<p>")).addClass("error_message"),t.html(e),t},window.split=function(e){return e.split(/,\s*/)},window.extractLast=function(e){return split(e).pop()},window.disableButtonIfEmptyField=function(e,t){var n,i;return i=$(e),n=i.closest("form").find(t),""===i.val()&&n.disable(),i.on("input",function(){return""===$(this).val()?n.disable():n.enable()})},window.sanitize=function(e){return e.replace(/<(?:.|\n)*?>/gm,"")},window.linkify=function(e){var t;return t=/(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/gi,e.replace(t,"<a href='$1'>$1</a>")},window.htmlSafe=function(){var e;return e=$("<div/>"),function(t){return e.text(t).html()}}(),$(function(){$("#my-dynamic").on("click",function(){return document.cookie="source=my;",document.location.reload(!0),!1}),$("#all-dynamic").on("click",function(){return document.cookie="source=;",document.location.reload(!0),!1}),$.timeago&&$(".timeago:not(.no-trans)").timeago(),$(".field.errors").closest(".ui.form").addClass("error"),$(".tree-item-file-name").on("mouseenter",function(){$(this).find("a").innerWidth()>=295&&($(this).css("overflow","visible"),$(this).parent().find(".tree_time_ago").css("display","none"),$(this).parent().find(".tree_author").css("display","none"))}).on("mouseleave",function(){$(this).css("overflow","hidden"),$(this).parent().find(".tree_time_ago").css("display","inline-block"),$(this).parent().find(".tree_author").css("display","inline-block")}),setTimeout(function(){autosize($(".md-input").not("#editor_comment"))},500)}),$(function(){$(".trigger-submit").on("change",function(){$(this).parents("form").submit()}),$("body").on("click",".captcha_img",function(){$(this).attr("src","/rucaptcha?"+(new Date).getTime())});var e=$("#git-message");e.length>0&&(e.click(function(){e.fadeOut()}),e.show(),"undefined"!=typeof flash_time&&null!==flash_time?setTimeout(function(){e.fadeOut()},flash_time):setTimeout(function(){e.fadeOut()},5e3))}),$(document).on("click",'.markdown-body img[class!="emoji"]',function(){var e=[],t=$(this).attr("src");$.each($(this).parents(".markdown-body").find('img[class!="emoji"]'),function(){$(this).closest("a").attr("href")||e.push({src:$(this).attr("src"),element:this})});for(var n=0;n<e.length;n++)if(e[n].src===t&&e[n].element==this){$.fancybox.open(e,{buttons:["close"]},n);break}}),$(document).on("click",".wysiwyg-body .gwe-image__view img",function(){var e=[],t=$(this).attr("src");$.each($(this).parents(".wysiwyg-body").find(".gwe-image__view img"),function(){$(this).closest("a").attr("href")||e.push({src:$(this).attr("src"),element:this})});for(var n=0;n<e.length;n++)if(e[n].src===t&&e[n].element==this){$.fancybox.open(e,{buttons:["close"]},n);break}}),$(function(){var e=$(".git-nav-expand-bar"),t=$("#git-header-nav"),n=t.find(".gitee-nav__sidebar"),i=t.find(".gitee-nav__sidebar-container"),o=t.find(".gitee-nav__sidebar-close-button");e.on("click",function(){n.toggleClass("is-visible")}),n.on("click",function(){n.removeClass("is-visible")}),o.on("click",function(){n.removeClass("is-visible")}),i.on("click",function(e){e.stopPropagation()})}),$(function(){function e(e){var t=e.find(".ui.dropdown").dropdown("get value"),n=e.find(".ui.input input").val();return{"project[name]":n,"project[path]":n,"project[namespace_path]":t,"project[description]":e.data("description"),"project[public]":e.data("public"),"project[import_url]":e.data("import-url"),ignore:e.data("ignore"),license:e.data("license"),come_from:e.data("come-from"),language_name:e.data("language")}}function t(e,t){e.forEach(function(e){e.disabled(),e.$importOperate.html(importI18n.ready)}),$.post(importArgs.importPath,{projects:t}).done(function(t){t&&200===t.status&&e.forEach(function(e){for(var n in t.data)4===t.data[n].state&&e.url===n&&(e.setError(t.data[n].message),e.enabled())})}).fail(function(t){Flash.show(t&&t.responseJSON&&t.responseJSON.message||"\u5bfc\u5165\u5931\u8d25\uff0c\u8bf7\u7a0d\u540e\u518d\u8bd5"),e.forEach(function(e){e.$importOperate.html(u[0]),e.enabled()})})}function n(e){var t=[],n=[];if(e||(e=r.filter(function(e){return 0===e.data.state||4===e.data.state})),e.forEach(function(e){e.$input.parent().removeClass("error"),e.$importOperate.html("...");var i=e.$dropdown.dropdown("get value"),o=e.$input.val();if(!o||!s.test(o))return e.$input.parent().addClass("error"),void e.setError(importI18n.projectPathError);-1===t.indexOf(i)&&t.push(i),-1===n.indexOf(o)&&n.push(o)}),t.length&&n.length){var i={namespace_paths:t,project_paths:n};$.get(importArgs.checkPath,i).done(function(t){t&&200===t.status&&e.forEach(function(e){var n=Object.keys(t.data),i=e.$dropdown.dropdown("get value");if(n.indexOf(i)>-1){var o=t.data[i],a=e.$input.val();o.indexOf(a)>-1?(e.$input.parent().addClass("error"),e.setError(importI18n.sameProjectName)):e.$importOperate.html(u[0])}else e.$importOperate.html(u[0])})})}}var i=$("#project-import-page"),o=i.find("#btn-import-current"),a=i.find("#project-import-list");if(a.length){var r=[],s="",c=!0,l={0:'<div class="not-started"><i class="iconfont icon-stop"></i> '+importI18n.notStart+"</div>",1:'<div class="scheduling"><i class="iconfont icon-task-state-13"></i> '+importI18n.waiting+"</div>",2:'<div class="running"><i class="iconfont icon-sync"></i> '+importI18n.running+"</div>",3:'<div class="done"><i class="iconfont icon-task-mini"></i> '+importI18n.success+"</div>",4:'<div class="fail"><i class="iconfont icon-msg-block"></i> '+importI18n.fail+"</div>"},u={0:'<div class="ui small basic orange button btn-import">'+importI18n["import"]+"</div>",1:'<a href="javascript:;" class="btn-cancel-import">'+importI18n.cancelImport+"</a>",2:"",3:'<a href="$url" target="_blank">'+importI18n.watchProject+"</a>",4:'<i class="project-icon text-red iconfont icon-report" data-content="$message" data-variation="inverted"></i>'};s=new RegExp(importArgs.projectNameRegex),$.prototype.getTask=function(){var e=$(this).closest("tr[data-import-url]").data("import-url");return r.filter(function(t){return t.url===e}).first()},a.find("tbody tr").each(function(){var e=$(this);r.push({url:e.data("import-url"),$importLine:e,$input:e.find(".ui.input input"),$dropdown:e.find(".ui.dropdown"),$importState:e.find(".import-state"),$importOperate:e.find(".import-operate"),needRefresh:!0,data:{state:0},disabled:function(){e.find(".ui.dropdown, .ui.button, .ui.input").addClass("disabled").removeClass("error").prop("disabled",!0)},enabled:function(){e.find(".ui.dropdown, .ui.button, .ui.input").removeClass("disabled").prop("disabled",!1)},setError:function(t){var n=$(u[4].replace(/\$message/g,t));e.find(".import-operate").html(n),n.popup("show")}})}),o.on("click",function(){var n=r.filter(function(e){return 0===e.data.state||4===e.data.state});if(!n.length)return!1;t(n,n.map(function(t){return e(t.$importLine)}))}),a.on("click",".btn-import",function(){var n=$(this).getTask();t([n],[e(n.$importLine)])}),a.on("click",".btn-cancel-import",function(){var e=$(this).getTask();e&&1===e.data.state&&(e.$importOperate.html(importI18n.cancelling),$.ajax({url:importArgs.cancelImportPath,type:"DELETE",dataType:"json",data:{project_id:e.data.id},success:function(t){t&&200===t.status?e.needRefresh=!0:(Flash.error(err.message),e.needRefresh=!0)},error:function(){Flash.error(importI18n.cancelFail),e.needRefresh=!0}}))}),a.find(".ui.dropdown").dropdown({onChange:function(){c||n([$(this).getTask()])}}),a.find(".ui.input input").on("keyup",window.globalUtils.debouce(function(){c||n([$(this).getTask()])},500)),function i(){var e={import_urls:r.map(function(e){return e.url})};$.get(importArgs.realTimeChangesPath,e).done(function(e){e&&200===e.status&&(r.forEach(function(t){var n=e.data[t.url];n?(c&&(t.$dropdown.dropdown("set selected",n.namespace_path),t.$input.val(n.project_path)),t.$importState.html(l[n.state]),(t.data.state!==n.state||t.needRefresh)&&(4===n.state?t.enabled():t.disabled(),t.$importOperate.html(u[n.state].replace(/\$url/g,n.url).replace(/\$message/g,n.message))),t.data=n):t.needRefresh&&(t.enabled(),t.data={state:0},t.$importState.html(l[0]),t.$importOperate.html(u[0])),t.needRefresh=!1}),c=!1,setTimeout(i,5e3))})}()}}),function(e){function n(){B={q1:null,q2a:null,q2b:null,q2c:null,q3:null,q4a:null,q4b:null,q5:null,q6:null,q7:null},R=JSON.parse(JSON.stringify(B)),Q=0,ee=["q1","q2","q3","q4","q5","q6","q7"],Z=["q1","q2a","q3","q4a","q5","q6","q7"],te=null}function o(e,t){Z.forEach(function(e){$(".step-"+e).hide()}),$(".step-"+e).show(),f(ze),s(e),l(t)}function a(){var e=!1;$.each(R,function(t){B[t]=e?null:R[t],Z[Q]===t&&(e=!0)})}function r(){Y.on("click",function(e){var t=$(e.target).closest(".portlet");t.length&&(P.find(".portlet").attr("class","portlet"),te=t.data("value"),G.removeClass("disabled"),t.addClass("selected"))})}function s(e){var t=$(".step-"+Z[Q]).find(".ui.dropdown").dropdown("get value");t=t.indexOf("-1")>0?null:t,e===Z[0]?U.hide():U.show(),
DesignScreenshot/output/gitee_run/gitee.com_1_initial_page.html:470:"undefined"==typeof MX&&(MX={}),MX.XML={ToJSON:function(e,t){if(e.hasChildNodes()){var n=this.ParseNode(e,t);return n["X-Parse-Engine"]="MX.Util.XML",n["X-JSMX-Framework"]="Version 1.2",n}return null},ParseNode:function(e,t){var n={$attribute:null,$count:0,$value:""},i=null;if(e.attributes){n.$attribute={};for(var o=0,a=e.attributes.length;o<a;++o)i=e.attributes[o],n.$attribute[i.nodeName]=i.nodeValue}if(e.hasChildNodes()){3==e.firstChild.nodeType&&(n.$value=e.firstChild.nodeValue.replace(/\n\r*/g,"").replace(/^\s+/,"").replace(/\s+$/,""));var r="",s=null,c=0;for(o=0,a=e.childNodes.length;o<a;++o)if(3!=(i=e.childNodes[o]).nodeType){if(r=i.nodeName,s=this.ParseNode(i,t),null==n[r]){if(n.$count++,!t){c=0;for(var l=0,u=e.childNodes.length;l<u&&(e.childNodes[l].tagName==r&&c++,2!=c);++l);if(1==c){n[r]=s;continue}}n[r]=[]}n[r].push(s)}}return n}},function(){function e(e,t,n){$.ajax({type:"post",url:o+"/star_collections",data:{name:e},dataType:"json",success:function(e){200==e.status?t&&t(e):Flash.error(e.message)},error:function(e){Flash.error(e.responseJSON.message)},complete:function(){n&&n()}})}function t(e,t,n){$.ajax({type:"get",url:o+"/star_collections/my_star_collections",data:{project_id:e||""},dataType:"json",success:function(e){200==e.status?(t&&t(e.data.data),r=e.data.data||[]):Flash.error(e.message)},error:function(e){Flash.error(e.responseJSON.message)},complete:function(){n&&n()}})}function n(e,t,n){e&&t&&$.ajax({type:"post",url:o+"/star_collections/"+t+"/project",data:{ids:[e]},dataType:"json",success:function(e){200==e.status?n&&n(e):Flash.error(e.message)},error:function(e){Flash.error(e.responseJSON.message)}})}function i(e,t,n){e&&t&&$.ajax({type:"delete",url:o+"/star_collections/"+t+"/project",data:{ids:[e]},dataType:"json",success:function(e){200==e.status?n&&n(e):Flash.error(e.message)},error:function(e){Flash.error(e.responseJSON.message)}})}var o=window.gon&&window.gon.info.current_user?"/"+window.gon.info.current_user.username:"";if(o){var a="",r=[],s=window.gon.locale||"zh-CN",c={"zh-CN":{title:"\u5df2\u6210\u529f Star\uff0c\u6dfb\u52a0\u5230\u4ee5\u4e0b\u661f\u9009\u96c6\uff1a",tipCreate:"\u70b9\u51fb\u4e0b\u65b9\u65b0\u5efa\u661f\u9009\u96c6",newCreateBtn:"\u65b0\u5efa\u661f\u9009\u96c6",newCreateInput:"\u8bf7\u8f93\u5165\u661f\u9009\u96c6\u540d\u79f0",create:"\u65b0\u5efa",search:"\u5feb\u901f\u641c\u7d22"},"zh-TW":{title:"\u5df2\u6210\u529fStar\uff0c\u6dfb\u52a0\u5230\u4ee5\u4e0b\u661f\u9078\u96c6\uff1a",tipCreate:"\u9ede\u64ca\u4e0b\u65b9\u65b0\u5efa\u661f\u9078\u96c6",newCreateBtn:"\u65b0\u5efa\u661f\u9078\u96c6",newCreateInput:"\u8acb\u8f38\u5165\u661f\u9078\u96c6\u540d\u7a31",create:"\u65b0\u5efa",search:"\u641c\u7d22"},en:{title:"Starred, you can add it to collections",tipCreate:"Create new collection by clicking the button below",newCreateBtn:"New Collection",newCreateInput:"Please type the collection's name",create:"Create",search:"Search"}},l=function(e){return c[s][e]},u=function(){var e=function(){var e='<div class="star-collection-popup d-none">\n                  <div class="star-collection-popup__header d-flex-between">\n                    <div class="star-collection-popup__header__left">'.concat(l("title"),'</div>\n                    <div class="star-collection-popup__header__right"><i class="iconfont icon-close js-close-popup cursor-pointer hover-color"></i></div>\n                  </div>\n                  <div class="star-collection-popup__body">\n                    <div class="blank-message d-none">').concat(l("tipCreate"),'</div>\n                    <div class="star-collection-popup__search ui input small icon">\n                      <input type="text" class="js-star-collection-search"  placeholder="').concat(l("search"),'"/>\n                      <i class="iconfont icon-search"></i>\n                    </div>\n                    <div class="star-collection-popup__scroll">\n                      <div class="star-collection-popup__list js-star-collection-popup__list">\n\n                      </div>\n                    </div>                    \n                  </div>\n                  <div class="star-collection-popup__footer js-star-collection-popup__footer">\n                    <div class="star-collection-popup__footer--normal js-new-star-collection-btn cursor-pointer hover-color">').concat(l("newCreateBtn"),'</div>\n                    <div class="star-collection-popup__footer--new d-flex-between">\n                      <input class="star-collection-popup__footer__new-input js-star-collection-popup__footer__new-input" maxlength="35" type="text" placeholder="').concat(l("newCreateInput"),'"/>\n                      <div class="star-collection-popup__footer__add-btn js-star-collection-popup__footer__add-btn cursor-pointer hover-color disabled">').concat(l("create"),"</div>\n                    </div>\n                  </div>\n                 </div>");return $(e)}();return $("body").append(e),e};$(function(){var o=u(),s=o.find(".star-collection-popup__scroll"),c=o.find(".js-star-collection-popup__list"),l=o.find(".js-new-star-collection-btn"),d=o.find(".js-star-collection-search"),p=o.find(".js-star-collection-popup__footer"),f=p.find(".js-star-collection-popup__footer__new-input"),h=p.find(".js-star-collection-popup__footer__add-btn"),m={offsetX:8,offsetY:0},g={width:o.outerWidth(),height:o.outerHeight()},b=function(){o.hide()},v=function(e){o.show(),e&&t(e,function(e){x(e),A(e.length)})},M=function(e,t){var n=e.offset();o.css({position:"absolute",zIndex:"1003",position:"absolute",left:Math.max(0,n.left-t.offsetX-g.width)+"px",top:Math.max(0,n.top+t.offsetY)+"px"})},y=function(){p.toggleClass("js-star-collection--editing")},A=function(e){var t=o.find(".blank-message"),n=o.find(".star-collection-popup__search"),i=o.find(".star-collection-popup__scroll");e?e<10?(n.hide(),t.hide(),i.show()):(n.show(),i.show(),t.hide(),i.css({height:"120px"}),d.val(""),setTimeout(function(){d.focus()},200)):(t.show(),n.hide(),i.hide())},w=function(e,t){return!e||e.length<=0?[]:t?e.filter(function(e){return e.name.indexOf(t)>-1}):e},z=function(e){return e?"/assets/gitee_stars/success.png":"/assets/gitee_stars/add.png"},T=function(e){return 0===e?'<i class="iconfont icon-lock ml-1"></i>':""},x=function(e){if(0===e.length)return c.html(""),"";var t="";e.forEach(function(e){var n=z(e.is_endorse),i=T(e.status),o=window.filterXSS(e.name,{stripIgnoreTag:!1,whiteList:{}});t+='<div data-id="'.concat(e.id,'" data-is_endorse="').concat(e.is_endorse?1:0,'" class="star-collection-popup__list__item d-flex-between cursor-pointer">\n        <div class="star-collection-popup__list__item__left d-align-center">\n          <div class="star-collection-popup__list__item__name" title="').concat(o,'">').concat(o,"</div>\n          ").concat(i,'\n          <div class="star-collection-popup__list__item__number ml-1">').concat(e.count,'</div>\n        </div>\n        <img class="star-collection-popup__list__item__status" src="').concat(n,'"/>\n      </div>')}),c.html($(t))};o.on("click",function(e){e.stopPropagation()}),$("body").on("click",function(){b()}),$(window).on("resize",window.globalUtils.throttle(function(){b()},800)),o.on("click",".js-close-popup",function(){b()}),l.on("click",function(e){y(),f.is(":visible")&&window.globalUtils.getFocus(f,e)}),f.on("input",function(){window.filterXSS(f.val().trim()).length>0?h.removeClass("disabled"):h.addClass("disabled")}),d.on("input",function(){var e=$(this).val().trim(),t=w(r,e);x(t)}),h.on("click",window.globalUtils.throttle(function(){if(!h.hasClass("loading")&&!h.hasClass("disabled")){var n=f.val().trim();h.addClass("loading"),e(n,function(){f.val(""),h.addClass("disabled"),a&&t(a,function(e){x(e),y(),A(e.length),s.scrollTop(0)})},function(){h.removeClass("loading")})}},800)),$(window).on("click:star",function(e,t){var s=$(t.el||t.e.currentTarget),c=t.projectId;a=c,s.length?(M(s,t.params||m),v(c),o.off("click",".star-collection-popup__list__item").on("click",".star-collection-popup__list__item",function(){var e=$(this),t=e.attr("data-id"),o=1==e.attr("data-is_endorse"),a=e.find(".star-collection-popup__list__item__status"),s=e.find(".star-collection-popup__list__item__number"),l=(r||[]).findIndex(function(e){return e.id==t});o?i(c,t,function(){if(e.attr("data-is_endorse",0),a.attr("src",z(0)),s.text(parseInt(s.text())-1),l>-1){var t=r[l];t.is_endorse=!1,t.count=t.count-1}}):n(c,t,function(){if(e.attr("data-is_endorse",1),a.attr("src",z(1)),s.text(parseInt(s.text())+1),l>-1){var t=r[l];t.is_endorse=!0,t.count=t.count+1}})})):console.error("Target element not found")})})}}(),$(function(){if($(".markdown-body").length<=0)return;const e="user-content-",t=function(){return decodeURIComponent(window.location.hash.slice(1))},n=function(){return document.getElementById(e+t())},i=function(e,t){e&&t&&setTimeout(function(){$("html, body").animate({scrollTop:$(t).offset().top-50},500)},100)};i(t(),n()),window.addEventListener("hashchange",function(){i(t(),n())})}),$(function(){var e=window.gon.locale||"zh-CN",t={"zh-CN":{copy_success:"\u590d\u5236\u6210\u529f",copy_error:"\u590d\u5236\u5931\u8d25, \u8bf7\u624b\u52a8\u590d\u5236",blank:"\u4ee3\u7801\u5757\u4e3a\u7a7a",tip:"\u70b9\u51fb\u590d\u5236"},"zh-TW":{copy_success:"\u8907\u88fd\u6210\u529f",copy_error:"\u8907\u88fd\u5931\u6557\uff0c\u8acb\u624b\u52d5\u8907\u88fd",blank:"\u7a0b\u5f0f\u78bc\u584a\u70ba\u7a7a",tip:"\u9ede\u64ca\u8907\u88fd"},en:{copy_success:"Copy successfully",copy_error:"Copy failed, please copy manually",blank:"Code block is empty",tip:"Click copy"}},n=function(n){return t[e][n]};$(document).on("mouseenter",".markdown-body .markdown-code-block",function(){var e=$(this).find(".markdown-code-block-copy-btn");e.data("add-popup")||(e.data("add-popup",!0),e.popup({position:"left center",inline:!0,setFluidWidth:!1,html:`<div class='markdown-code-block-copy-tip tip-state'>${n("tip")}</div>`,on:"manual"}))}),$(document).on("mouseleave",".markdown-body .markdown-code-block",function(){$(this).find(".markdown-code-block-copy-btn").popup("hide")}),$(document).on("mouseenter",".markdown-body .markdown-code-block .markdown-code-block-copy-btn",function(){$(this).popup("show")}),$(document).on("mouseleave",".markdown-body .markdown-code-block .markdown-code-block-copy-btn",function(){$(this).closest(".markdown-code-block").find(".tip-state").length>0&&$(this).popup("hide")}),new Clipboard(".markdown-body .markdown-code-block-copy-btn:not(.success)",{target:function(e){return $(e).closest(".markdown-code-block").find("pre")[0]}}).on("success",function(e){e.text?(e.clearSelection(),i(e)):Flash.error(n("blank"))}).on("error",function(){Flash.error(n("copy_error"))});var i=window.globalUtils.debouce(function(e){var t=$(e.trigger);t.addClass("success"),t.popup("change content",`<div class='markdown-code-block-copy-tip success-state'>${n("copy_success")}</div>`),t.popup("show"),setTimeout(function(){t.removeClass("success"),t.popup("hide"),setTimeout(function(){t.popup("change content",`<div class='markdown-code-block-copy-tip tip-state'>${n("tip")}</div>`)},100)},1200)},200)}),window.ThemeSelector=function(){function e(){var e=localStorage.getItem("theme");return e=e&&["light","dark","system"].includes(e)?e:"system"}function t(){var e=["theme-options","theme-options-mobile","theme-arrow","theme-arrow-mobile"].map(function(e){return document.getElementById(e)}),t=e[0],n=e[1],i=e[2],o=e[3];t&&(t.style.display="none",i&&(i.className="fa fa-angle-down theme-arrow")),n&&(n.style.display="none",o&&(o.className="fa fa-angle-down theme-arrow-mobile"))}function n(e){var t,n,i=["theme-icon","theme-icon-mobile"].map(function(e){return document.getElementById(e)}),o=i[0],a=i[1],r="fa fa-adjust",s="\u8ddf\u968f\u7cfb\u7edf";e===h?(r="fa fa-sun-o",s="\u4eae\u8272\u6a21\u5f0f"):e===m&&(r="fa fa-moon-o",s="\u6697\u9ed1\u6a21\u5f0f"),o&&(o.className=r,(t=o.closest(".theme-selector"))&&(t.title=s)),a&&(a.className=r,(n=a.closest(".theme-selector-btn-mobile"))&&(n.title=s))}function i(e){var t,n,i,o=["theme-system-option","theme-light-option","theme-dark-option","theme-system-option-mobile","theme-light-option-mobile","theme-dark-option-mobile"].map(function(e){return document.getElementById(e)}),a=o[0],r=o[1],s=o[2],c=o[3],l=o[4],u=o[5],d=[];for(t=0;t<o.length;t++)(n=o[t])&&n.classList.remove("selected","active");for(e===f?d.push(a,c):e===h?d.push(r,l):e===m&&d.push(s,u),t=0;t<d.length;t++)(i=d[t])&&i.classList.add("selected")}function o(e){e===f?(document.documentElement.classList.remove("dark-mode-override"),document.documentElement.classList.remove("dark-mode")):(document.documentElement.classList.add("dark-mode-override"),e===m?document.documentElement.classList.add("dark-mode"):document.documentElement.classList.remove("dark-mode"))}function a(e){localStorage.setItem("theme",e),o(e),n(e),i(e),t()}function r(e){var t=document.getElementById("theme-options"),n=document.getElementById("theme-arrow");e&&e.stopPropagation(),t&&("none"!==t.style.display?(t.style.display="none",n&&(n.className="fa fa-angle-down theme-arrow")):(t.style.display="block",n&&(n.className="fa fa-angle-up theme-arrow")))}function s(){var e=document.getElementById("theme-options-mobile"),t=document.getElementById("theme-arrow-mobile");e&&("none"!==e.style.display?(e.style.display="none",t&&(t.className="fa fa-angle-down theme-arrow-mobile")):(e.style.display="block",t&&(t.className="fa fa-angle-up theme-arrow-mobile")))}function c(){var t=e();o(t),n(t),i(t)}function l(){g&&b&&(g.removeEventListener?g.removeEventListener("change",b):g.removeListener(b)),v&&document.removeEventListener("click",v),g=null,b=null,v=null}function u(){window.matchMedia&&(g=window.matchMedia("(prefers-color-scheme: dark)"),b=function(){e()===f&&o(f)},g.addEventListener?g.addEventListener("change",b):g.addListener(b))}function d(e){e.target.closest(".theme-selector, .theme-selector-mobile, .theme-options, .theme-options-mobile")||t()}function p(){l(),c(),u(),v=d,document.addEventListener("click",v)}var f="system",h="light",m="dark",g=null,b=null,v=null;return window.ThemeSelector&&window.ThemeSelector.initialized?window.ThemeSelector:("loading"===document.readyState?document.addEventListener("DOMContentLoaded",p):p(),{setTheme:a,toggleThemeSelector:r,toggleThemeSelectorMobile:s,getCurrentTheme:e,initialized:!0})}(),window.setTheme=window.ThemeSelector.setTheme,window.toggleThemeSelector=window.ThemeSelector.toggleThemeSelector,window.toggleThemeSelectorMobile=window.ThemeSelector.toggleThemeSelectorMobile;var aiLoadingTimer=0,aiSkylineData={persona_ident:"",personas_list_url:"",request_url:"",result:{expire:0,token:""},status:""};window.addEventListener("beforeunload",function(){window.jqxhr&&window.jqxhr.abort(),handleClearTimeout()}),window.Gitee.aiAssistant={aiSkylineData:aiSkylineData,getAiSkylineToken:getAiSkylineToken,checkAIAssistantExpire:checkAIAssistantExpire};</script>
DesignScreenshot/output/gitee_run/gitee.com_1_initial_page.html:474:<script>!function(n){var i={};function r(t){if(i[t])return i[t].exports;var e=i[t]={i:t,l:!1,exports:{}};return n[t].call(e.exports,e,e.exports,r),e.l=!0,e.exports}r.m=n,r.c=i,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=12)}([function(t,e,n){var i,h,r,o,a,s,d,c,l,u,f,p,g;t.exports=(i=i||(h=Math,r=Object.create||function(){function n(){}return function(t){var e;return n.prototype=t,e=new n,n.prototype=null,e}}(),a=(o={}).lib={},s=a.Base={extend:function(t){var e=r(this);return t&&e.mixIn(t),e.hasOwnProperty("init")&&this.init!==e.init||(e.init=function(){e.$super.init.apply(this,arguments)}),(e.init.prototype=e).$super=this,e},create:function(){var t=this.extend();return t.init.apply(t,arguments),t},init:function(){},mixIn:function(t){for(var e in t)t.hasOwnProperty(e)&&(this[e]=t[e]);t.hasOwnProperty("toString")&&(this.toString=t.toString)},clone:function(){return this.init.prototype.extend(this)}},d=a.WordArray=s.extend({init:function(t,e){t=this.words=t||[],this.sigBytes=null!=e?e:4*t.length},toString:function(t){return(t||l).stringify(this)},concat:function(t){var e=this.words,n=t.words,i=this.sigBytes,r=t.sigBytes;if(this.clamp(),i%4)for(var o=0;o<r;o++){var a=n[o>>>2]>>>24-o%4*8&255;e[i+o>>>2]|=a<<24-(i+o)%4*8}else for(var o=0;o<r;o+=4)e[i+o>>>2]=n[o>>>2];return this.sigBytes+=r,this},clamp:function(){var t=this.words,e=this.sigBytes;t[e>>>2]&=4294967295<<32-e%4*8,t.length=h.ceil(e/4)},clone:function(){var t=s.clone.call(this);return t.words=this.words.slice(0),t},random:function(t){for(var e,n=[],i=function(e){var e=e,n=987654321,i=4294967295;return function(){var t=((n=36969*(65535&n)+(n>>16)&i)<<16)+(e=18e3*(65535&e)+(e>>16)&i)&i;return t/=4294967296,(t+=.5)*(.5<h.random()?1:-1)}},r=0;r<t;r+=4){var o=i(4294967296*(e||h.random()));e=987654071*o(),n.push(4294967296*o()|0)}return new d.init(n,t)}}),c=o.enc={},l=c.Hex={stringify:function(t){for(var e=t.words,n=t.sigBytes,i=[],r=0;r<n;r++){var o=e[r>>>2]>>>24-r%4*8&255;i.push((o>>>4).toString(16)),i.push((15&o).toString(16))}return i.join("")},parse:function(t){for(var e=t.length,n=[],i=0;i<e;i+=2)n[i>>>3]|=parseInt(t.substr(i,2),16)<<24-i%8*4;return new d.init(n,e/2)}},u=c.Latin1={stringify:function(t){for(var e=t.words,n=t.sigBytes,i=[],r=0;r<n;r++){var o=e[r>>>2]>>>24-r%4*8&255;i.push(String.fromCharCode(o))}return i.join("")},parse:function(t){for(var e=t.length,n=[],i=0;i<e;i++)n[i>>>2]|=(255&t.charCodeAt(i))<<24-i%4*8;return new d.init(n,e)}},f=c.Utf8={stringify:function(t){try{return decodeURIComponent(escape(u.stringify(t)))}catch(t){throw new Error("Malformed UTF-8 data")}},parse:function(t){return u.parse(unescape(encodeURIComponent(t)))}},p=a.BufferedBlockAlgorithm=s.extend({reset:function(){this._data=new d.init,this._nDataBytes=0},_append:function(t){"string"==typeof t&&(t=f.parse(t)),this._data.concat(t),this._nDataBytes+=t.sigBytes},_process:function(t){var e=this._data,n=e.words,i=e.sigBytes,r=this.blockSize,o=4*r,a=i/o,s=(a=t?h.ceil(a):h.max((0|a)-this._minBufferSize,0))*r,c=h.min(4*s,i);if(s){for(var l=0;l<s;l+=r)this._doProcessBlock(n,l);var u=n.splice(0,s);e.sigBytes-=c}return new d.init(u,c)},clone:function(){var t=s.clone.call(this);return t._data=this._data.clone(),t},_minBufferSize:0}),a.Hasher=p.extend({cfg:s.extend(),init:function(t){this.cfg=this.cfg.extend(t),this.reset()},reset:function(){p.reset.call(this),this._doReset()},update:function(t){return this._append(t),this._process(),this},finalize:function(t){t&&this._append(t);var e=this._doFinalize();return e},blockSize:16,_createHelper:function(n){return function(t,e){return new n.init(e).finalize(t)}},_createHmacHelper:function(n){return function(t,e){return new g.HMAC.init(n,e).finalize(t)}}}),g=o.algo={},o),i)},function(t,e){t.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADYAAAA2CAMAAAC7m5rvAAAAV1BMVEUAAAAEBAQBAQEAAAAAAAAHBwcDAwNHcEwAAAAAAAD09PS/v7/8/PwBAQGcnJz4+Pj9/f3Pz8/////x8fHS0tK7u7vq6updXV3l5eXt7e3e3t75+fn///8na/+JAAAAHHRSTlMCCxUaBxAeAAEErVTgJ0TI7zb1k3QlqCt5g0vUK9r+DQAAArtJREFUSMeVlouOqjAQhumNpcCCgoi4ff/nPHNpC9ICnklMMOFjOte/xU9qVVEs7WiMlMYIbW1RVftXiixmb849pVIACqGLlEuwqgJKjw64siyVRH8pV6RQYa0WNXK/v2XJ3DnGlBbCyA8O3J1gDBGlyqfnlCR3h9jqyjTLs4esMAfuTjDOhRbmPrYuWneNkaupdlu7wpgyy4Av356PpvuDhwcd8jg2piZ81dUNVGwOlDLHKWHqjkH1CG2oswIQdsfkvbA3lKdim+TLTdQEvm4NdRQV+7FtrmxPQsG06IHq+FUDX3hI5UfgsJVD9zbegXjXb4Mm8hRj6GwKcdGsYIeR5amAWQ3R9CEYGE2LJPzyVMD03R8RfcE84/SgFXmKMB9ZvclctCpLRayNzqhKG/scR28egzPegjM+1h4Jk8VnYEwv6xmT/tstDI6YsZqbQubadjf7nF78b3VPofkz/hxgPPtYVesxyEh3jdnpNQmDoMdgOOcLDFvpz7XUcv+FWePcIGlTf39ILlPLG/77lEC+39C3SqmAfVMAbKUXVXeDXZcbMBSGZYtlmiuttRa3mIGDVs5QFkNr8duhALvBSWesomUDZxzDK7kx3XPUjeLtNlXKLYUd55Woj3nknuQVNKwriLnqU78g+0N0drDwNG+RiicTGx+POK5fza5XGg6/UizpKy76fs1Zfpkbmg5v8GjeQLXzKgkf0jHEFStpI7PBI8S1BoZ1PRAqJYkkkw0c37XdGnbEgiz2URZxQMgaUuV+3lKJCI8swjWI8Dx3zaOmC8Mw0ncidSn5ZHVXhvuXb9irCwYENXqINMW3Qf46c1/qvh2Gtq+XTikPbZvn4PKEl0kpmfDV+BCt7FVNc7WiiQhVJxdDWtm+1CypOvTo6TWUFEJHC/JYXVx6vSBFQU3VsTgUJR6aVBvJ/gHQeVzeaHqlAQAAAABJRU5ErkJggg=="},function(t,e){t.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAXcAAAA2CAMAAAALbSmxAAAAQlBMVEVHcEzW2O0FBQUPDxAEBAQEBAQBAQEAAAABAQHZ3PHKzuCussK9wNLU2OyIiZbW2u+bnavQ1OfR1ejS1uq8wNHIzN+f90J/AAAAFnRSTlMAuhMcCQ4XAQW3aT9lrDK0HIaToFJ8MqDAuAAADqZJREFUeNrsmteCnToMRcGUAzaYZv7/V6+qCyW5mWTehpdkOCDsZVnaElTVy/GBY4CjhaOTA//f4skBf/1UP8e/Pj6CnZkbPBL6H/DfiZ2pGzdtx7zU87GfwV/J/5D6BuxA3Z1LPdZ8jHAcdv0B/63cEXs4lPmyb6c9t2MZx3NV8D/cv8Xb102oH5Pvewnw7pxH2/6A/4ZsKqHdzYx9dw1Sj0m1C/O+/nD/59RJJgL2hbDPoUHsqiHJ0dft+AH/LdDb1jP2wwt21e3449CGPaXWH3T/Qq8P7NOGM+rRAHaiPsSDXN7ZtxCvoepzO/H5y+D3+cvbr0au5z5/cDzbfZv6+0SuxenEQaZB7oCdXTtih3Vwa/cE/jej+1tsX749VnovlH9HXXzu8fzLulS/InEtTttudc55P1NK9Ql7ukKaBr6TbXBf4DSY64m/CH9fAp8zG4r+RobzRje/dng6Pi926WS5kOWylC2WVJyGbR7pIOwnR5k2p65NA2kcXMjnw7lN5kvgLwa/VHUPSRJEM7eRXa7MImtbHnzH8GT3berPJBTqagW6cvc37N0a7Lbv+zmhuIyRP+euGUAfl/7+CveE4wtJvPAWkcEFhTYvRIorO/2pzduCWZPkwa6qjstCXkm0rcxETk1Qi44zEHUuTDslVSQrl+E96xTrV4j9pxfyGRG5MJtOcooviZ/S4J8ZiM2OrLGnZrKf8pHKlQX77rLFhfKD3ctCfsq/40LxEGRq6wHUN6e2zXrWJ1ZLCftql0Rd4tAV/KcK1tqQpjN8Vjhh1+5X2O5JM8t21Wp3bgqxgccc+5h2ZdhhO+Z63s/AJbeCH1ocmDdxAjhyOYLzzMHeDy/rcbfbooUuPQEtTvHv4ePg5ykOoSJvh+J0PFxaakycLtng8vWCndS9gI+ZYoXlW7xJ2tPCbVs23z890MBYTOe3Ci/HjrtYR+v6BH4YAoZTGz1n2PL5jTtebGLITQdT6Z7sgoVZXI5GvgPT6ODDgJ5d+15CN3F32O9KW6bMIhSFLD/m4Dhkdwk2GXiZK2LajW6VwWHw8vrXu0LLfyzzDw53z13gpukupyJ32Gx7Ae5M+1M4z5rChs92YYxLkiW7yB0Zod36ardD7ibFiA9yN3HqjixNjYCvYAgr+PJkdLtcRVPEvlgM6dQiM94uUlhxDlB1NuDTxtAz+LYFanXQPPEswQo1dj+HCzkVtVv+zutJ4UV3bwnPZp13YcPhTmkkK5MLETxQWyY6zo1ktOv7SYILtqn4N4wznXm0S9x54uwhyD3tp5MeeOjzMDYc6O29uRSmQ1JHE96ze9IwGor8LlpTNY9MFic0e76wxRu3TPlc2bYPwu1yqrVbSJp1+NXluWpCF8AlW1yPQwRPmYmlYoDfZpjBro6D3KlOpIsnrhpluh7R0m88EJzVza4R7opjEO6yrC1kx01EIg6hoiHspjcvQRhuCYj9vDbIzM5iUx1eY6pV1qZb4WGLrsEzrItCu52iv/MAWGq3QuXlahM9YMYY18uwOw/BdNM8itH2DDz+nkwrd0Z9yk905zoKd/YftitCOto1ZgOHSxqPdptwbymd1P5IjloNAGd0fSZeiqp2oOgPu6op3Xag56eAFWc7UGxxFJCwgx/4vnVdBVaF/0VadMr4MIl8wPpgNXQquKTP4DINge0KGjfEyweygK8i4/VDSjUUoUKvw247+HtZU96pXbMQTyYj3AWmg5E70WuRe8+xEx0rNFe76O+yRzr2oH1McRidf2+mmFHaCoe39ZlUvypgXF7CblKUll7xmAWsTxQROCcaAPrTzoPHsamXikDBU8ZxR2Lz5Ga08zhzjJvQxnwkAsltnOZGubyj0H9Kw7o3mbbC6A7+dCQOICmh4nPsOejd8NuZMpT6uwTSNbkUrDY8dFJvb9/sCvdGU1uXcUcTY2g8ZRS6sxpm9grT3SQ2UezQffem2BAagLCO8nmAT5HGwgiA6eIbJbqYNG4LTPFUWLQMI5LI/ayLU51wh/+FpC4WR6uJz9lzAaJFScWJZpyyfZ8XYLjHgaSryaujCiz9PaivMncx377Yjdx16TAOR+44WfhpV0dsK5xXk9LwrfBAvXU0+YbQOMQyx925U6Tx6E1xuMydwSN3sGf5ddY0baLFesNq9bAsVDkzEHccHv5n2W1WTBtahuWc7KGXd4k7Xu8yhxpSy4IylmfP0OovxXdqyNbJo7IVVGn8ZLdV7g1LvsQdJg3OfUIiDmq2q6xm4RikC+xB5MktDmlECXli5btQq9a7q1UuCHcxUnCnsEmSoNFT1I7rJ10Lp9UGgnEG4/Wk2xWx46sZihiwxdJIYBSBb5TsU4pOjLaAocEHCurInUQK7MNFpfaF+4td4r6c2THLCwwOluCgcCw0TLi3OnEID9ylTMWc6p7CP4V+zqA59xRpFooy2T574L7RRAkkZjHLS0Vzx7CN08PlI8ffjwXCE3JHN8V428dmNZ3asxTPabXuI5+iA8n+AocoRFXfzsPhbmK/5P5il7jfKnrmHhe12TSzVhurnb7krt8UZJLllnWZe76780hT15lYGG7c2dccM/YjVzCWKxni4DGoAlDhztufsPcYJmlXZMu0jdrIoxQPgzj5kTqxnLtEW7jz4D1J26lEtqUIXnJ/sfvOnfW0pQc6mbRB7kvf3OFF7OcLdokz2WQz8I4qrdjAT9y7yH2iPU5ZyIhgsHoKGcOzUeyW3BsoEUNgWk1DwYWvt2Ndl9wtD+4WZyAFziPttIYHQZvSlNTmKXvBeff3u12O71Lx8nEwd5jfJOmEM8pG3C2fS532rCN/jFEIPmhMrrj6K3cW8RQmaJeRpr5y5ykvqh+YO26BJerkfSS4kbvp/LlEMMpdokQnuz/jnsfhoWiABw0zHGi4IkTuBx37aUOTNS9L7p83u13Kq4Wegb8OUpSNJiLEXaEZqUXbsmVP2Knk79KaFNF/p/FcU4NIHXVdLcsz7nXOHU+NJOuQ+9wkQU2DTdzPvBmVuLPVO/dMd3BDEMssrLOuIYXl41bnaqTLmvXveqa0m3Qkl8+Ru7v01tBXKu7cNk2mR6UcReyLby4KMsUhlC3LNbyrw9NuvHGnIZXcjXLvf+3vPVqcsTfu/Xbl3t65U0v67PvUCkMxZ6kmugTikHOXiJa/iSq5v9qNdZP0NKRu6qWyK6J+X6Gm0kicdz3oe7HFFdjzV7bs7jZViVWRcpm7Zh8WAVwmYCkYufcF9xhtH+K7HyUow//3/8GdWjDiNp2GF6rA8GOJOR6amzd1/LyX9Hng/mr3pU/Qo3hc4vMWnmNFcVAEnVrqOE89Yk+BKKA4kjL2Wuhq9tEfaWxJIE4591a5X/RMneuZJkjCaHpSwZG78Lhw10BjdZNBvD1QuQEfyXc8ml4D7lbn1Ir30SX3z5td4p7VsdQXk3aJS6UBZ5SKfqcub/oO0jiqvmdXjmMoOriO+mkm1eYv3Ck1OepPoK/6OuPe59xZx8/P+r2Hv5eeR2/rgrsWZlfuNDHLzWvQTBsvpHGjqH/pCEj1RtzzF5dxcyt32djPdvN+ZNkHxt2pk5J0u2Cc4cYXLAKJafi1QZ1Gr/H6Entq5cK/+OLPGvMgdWIzMHGnYDvj0ja7lqnM3WTcKc681Kv9pCUfX7VL3aQ88Hmx25HJXP6uFswcavCkxoM2pymeIR7knquU9AIlcae9y+X41e69//4R7l4erO1LUlM9xmL99HfeTmvPIyqGrAX50Q/FtAse5NVg9/TKWrnHVaFqY1w2C8XzIlEZk6h25sXf0ZGP+jjDeenPGP53OZ1DWazFKd1mtCAeoxeo4ArcR5uh1KUZoT1sie19iql0p1PuyUA2F+JuYkB9thvfN3Xl+yaalIsv4ECv0AC43j9u72/nkD6N/FTDZ3OdvH+gNummQ3n8UkC4r9kHCfg0bthi78OyPoktSrGGS+GPx34kKXRpRk6TzJVvozEw9y51LO5v409KRsgsmPRyjfqLmyHuke0j9wj082SXO2txCOn96iyvWWPgQHaex9ddPtJYzviWiN0VyJxOXq52bgOIc3jFHrl3XaotVn5xvPseuUsfuGzJwynUkTs60VL032mxw0wWDoeKZDeG++/yngmflz5OiRVGZ8WlYs8e1Uj2qRvnv2U1RK27JysJklP2ScOT3TZ+TxCv2uh7AievG9KL+f/aOdslB0EYitJZralYqwXf/1VX5CvEoLZbZnbGOv1lJUpEJMm5LntEhJKC05/6J3odYtxv5qFuepqRe5uGUPTk0BWR4kY26yBNWSiSQWZyrZJ6nfX7vGbXPQc31FLbYhMWF/pz4PMlzJOpUdlWyzCo/ISJ8SJcWmQWCaQvnN0KCKIV1ZDYsM2fz/sjXFfPhtqu070b1TVGnXCIN99WC/xEYyxeVxEujimdkpKrz1ddMZkVsCvzYwxgcI7AawS+C6hXcmWrUvoaimI6w9ilR7GG/X6MpQYgLYUJ7Ry4TLkP8zJpJT1iFydlL4PiGyFbfKVl8E3+gIFCM1gqMYgoRUSHQMP6PW3C2W0gi+SuPQGRVpar4n5wuwm9LqGmngxGnjZdUccb1AzSPOAsDuJtANJ+8Vx0sxKSpxIWcofS2Bvy2PLaNmOXXkLesNsfTAspXahK72C1JLlQGE3i6ENyAZZMJjFwg6qBsIOXHWL1xE6jnMxjV/qwezEZIUNsi2yPA/dALqCCTx+FpM/uRwqaN2Qs4JY4b8OUjNcOHLjtda4vnN0DPcZN8XJJaeJ4+wBMQYbgonqGRnxFgJH9T8iEqD3GDr+g1SklO/2rjUHhIe8yZFJdovqDzgAflyujd/+JBH3D894OCQ8n/QKyixn6QqNH+GXNuQSay3ATc9w6aumSAbL1Ag/V89W+Avp8ONknJ5z6zMg65sBIqfvjdnFJCKV/KD9ZUqVf6HH6344HGPR4QwKz+5KXwbRw8c8jnEx+H9GnWup2GsdxanWfkUyW9fxZxfKQiAe3cwLf7XOOB7Smqb6fFCuw/QK4hFJoJgmn4wAAAABJRU5ErkJggg=="},function(t,e){t.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAARQAAAA2CAMAAAAxvZbCAAAAS1BMVEVHcEwAAAAAAAARERPZ2vDU2OwHBwcAAAADAwMAAAAAAAAODg8BAQGytcbN0OTDxtnS1enS1urV2e3Iy960t8iTlaRvb3mpq7vO0uWmqkiCAAAAGXRSTlMAFBAOuLsLAgUHEh0YPIJfl6Suc1A8KR+P56WgUwAADiFJREFUaN7lW9m2rCgSTUVTVBAFp///0o6JQc2sW31Xr9UPSVd1naOAsIlhRxDn9freuk7rvn9DU9jwh3ff91p33F6/12DXBImq6wFbXdcMTIblBzFhSKyb5sU3fpnDujEsKC0/iQpi8n7byTdNC63htoRDYPlFVAgTOzMibevPKYQwwe/NdLwLVH4Nk+MUSBa3mapCo6KUDb5xqtCgX7KwureiOOc2GlMN0cq+lfPz8VuiQhtFR2xbwsSv44iQJH/c990xASr/W1Hpur/28v92aPeX32BAAJH+fbQkJstOmKgICDXduzk75j8t4dn+qcu/m6H7w9g/jP5jl7vW9MTW1EKYzIQJiAkiwA3f99q6gq58Rffeym9eV5FfX1YThzynuI7Un7ZyHcJLz+fID/Mc+cih3SBh+lo70h2Uk7GqYf9pNGMGvvr4BxcU0X20clPFirn3RfDSFPo2VZoiH1J8eqOdtNL4TraWqETx1dg1NvjtRl/fx2bttnkSlI3kJM/EkABmwHGPWn1DJXZ8tmJNcTf4oyq4z4U5itLeptDFeAk/+hso8XjjCK1jpJJWoBNq7xTIxGimnEatyNWoISYTyIkBe9InZHEwcv6qIhdN33jCwj0Ju7KpAsXufRwqLhjEMqT1xuWoyfKeeMF5Cv6kPngvwJzsdWzaDK0UhyB48I0Ffi+k3tmMdIxkJJxReZojREQElE0wERnHjR5rOM95npxlP63iNktM3qtbP7UtH9QrRCDgAYJS1/IyLmdqmlnVymLbcuMv9nrylg4XQcGxfRGkdsec2sqO80B+seKKYTh1g4+uiPU6P9pWJ/rqEJIFtmvt6pDKzsZcMTnwsVDc1oeNYIn7LEA5ms/NZQx1ICBqEl8EBU5IlaJtG3q43+fgD2qAzB94uggKH05hrmw+WWcIlYliFHak1PNYaEHD4EoxoNbYIdJXYvAwP0XDdb2HNlR5oSRIbTESW0BpSetJoOgvoLRuyIIVGAhCBUGpyp3BcjzuoXqA0rJw0p6WHZQYQTGGxyYvZPM2+SU88AERSqi8aMPhKyh0MLCIeWOFUqzG1rI+iu3GHldM0DsVqBSSMoXpU1tvklKxpL0RFJTKKHW6VxhhwH6qfbm2mUHpNaJ2wqAZtNwIKtmjqkPt4DkDvaxIntzo5TfGr1MTobJbadB5RgVd7V6jXWRhjbaTLbIYfwafTpOcdGD1OiMq7J4+2H5VmK5kwNKEJCmGzZJyTYs/CyrQgU7R0esBDQdbdjLuLFswPy15HBc2fSZybvFXaGWNgVXCAo1ZUexGB7seEyrQB1CZRDHgC/D6HEfmZbgHhN0lf8Jol6RA9wEx8WE3tFLoujtGBW1xfbf9H53Pxf1oAQW3PSAoY2TO8FXS90ne8pIzskq8KFCpc4+gSHSGn6D34JQ8rBVe4qsNZMSO1HeKGk/c4pxqUg30briKM64CBAXoK8oJW82CSWSzR3Jy7makZfIs+9yIXYFZSoYhyanPoIiosKTwbvCMgmwMemhSVMBkHwWVh7ip4zj23e3QUCf2spFCvn3jQVLo0EbEBOcft7jeOjtiWRXxVQSF377o1GZTVaUTvxDpfkVMpuiEk3M/EZWsQNeEnarjGX8SFfzmEm0N2IUlWx3yFGBvzOndSBozDIX+YA97M41tToMFWiKY+rkyOykEYoLYjKRArYu6JjymVpnEn0YcLjsLSpgk639jp5YwMSbJt4RAFCDRRzIot7zu3awIKroLD6tN/gzX4NBXVmaF31fDqCAehvSJ9vwRFJmBDg46TJXZUF0Qk3Y5uTElNRXT9m0jkO15OlIfAaVGUAIKKwlK/wx7xT02ZzRRBZfAxcEhRP0R12NT2xLrSo92saVspO6tQVCAaFlYIyrGZHzx1rf4G7Cxt/Wp4fPyl0DivJKdBlgdYuLPNMWECSJTTZJcJQSh88SE5Yw6/NKw51V2/MSk65E0Ntlsl2r1BmOE+iNDaUA8xQ9bbhN/IxZ7fuC8JErwbz2AToGtbB8sYo0aDMCROE2kGShEVYigIF01qC0rYOs3lzjESF0yKILghN5HDC2KCjEd2vLNsxZ8uyFCclcvNsDk++sHKDc5SKSWhY0kJeTdJHtR+BbY0Th+BCVGcQALMjKeBtVsYt8+DAENAtGU0WGon8zwaBzy2oBs/gJKZeCLcwwlMAhYjLlaywITdDz+gkkhRYjAehnb2cy0SJuvbRXq2X0BRUjIGzFBEcCNHPA/cjMrbWuINA2xAw9oeRYYDaAwCxxOPOfxZHfN74mwmB3/IXJU77zvYVjJAJkkTnNVv8j3fAQlGVn7CRMUFbTR9iopHDgiG8J9OFqQuW4bbcr0AIWiHxYjdECZlClyFF4ISSVWiZI/itR33EamKROZEphpaTycOHIYHAN42Bk3YYz3E4MCbl2E4SMo0zdJiTEIhgzmAyYCysYGu4j6s2h7oR93Tqu7E4n3eIeM94skX0DhTCi02jfpQU7vYExjVu93JjRTw+FNnRXOj+sMGr6StUF/5IkmY+CcQSHX6tAiYwsDgdKKf36wdeSWMCKz1qskkRztRgzt9f5Z7WBZHWe9a/bQbDIoG9KjRl8D9iBESROhFVAo1CdN8QR/Xkgk2icS1YVZZZSUPZshAAXxAMqCCKzke9gqXSSFQRGaPyhUn2YbzW3fHBgjJuR4cJpnLgkNzsyqpct8NPH8QLE6n7U9UaFy7KP7JdtO2cAkUoBGrpmWSzoH5mNQqpzzws+Q49zYzQ5kStDCVUeQhnDtJLA8H0fKjPRNUkYBhV2y48iqzJ3E/AlmVfz+MT/AoMx0NMNN8wiVo0meHk2EY1Bi6KOyQ2kSKDwR6qSrMfpNtBBXI6AUgkKC6qGT43CW8girBJnorw0ExsBlaapAzmyhQJk2GkExVSkpkbwdtPNswmJO901y4rcPzjjROrRzOUVx0bxThAgmRVLSHkOZDES9K/JpWyBQaMv6dVpyK1sRQHQCylV7Tokb0QJYAoV9goAyMigUWjGhAezj6esIiikkRVh7/8LjFsFJSQlUYr4htE/SltXrlOzQneFIuLQlEgyfOKtiIta7HNxiiDqlL4GQqjkRoG+gsGek9e0L0oaqWuI3Fd7vzoEjwg1TBmhU+KcrKDslFqKkRIfz0msjpKCI95Ti4OQDJjkZvqL05pjpQoN9zJfQhJYypGkqOmNJoXA85mhh0WJojP3bUlv0AxTyAi0LYw3zL8dQeTH7jioBWgRl5pTBTv8XJFTLoGwAGgoR+JILKJ0mDzhv+eDqYaN6g6w7+npTgyzhjRer6wdBERq8jCmsRohRRZk2a1oQar9J7PQKSoegXDB42BTN4ccmuE4BLXmLfhQ+KXbKjWw70Z6Y0C5bab0JFIiMNtEsMbSiPpxjwlhqE9IArp3vTC+Y3K+3QL1aVyQcbspDTDOpB4V3aT2oPX7MqTZK7JWgkAm3GZTsfdIDzJtxpEM+DZAf9kjcUZumdUdHjNu15JR3VqG4CDKIlEq4gkKmldi6FBj4k4pQxC2cF3Kvb7dbKycvhvrJ/ilNlPnqvuH1AF2Z8NUa7TAUk+sCFFYOBiVKob6DIon2WQ6W82ioRDyJWw+KFzfJLoUVU4ZjTGZV0SU3dDF8AUUCQry7OpZHIO/XmA/mZeLdVD3E7B3WrkB09wGTV/dCTM5921YHCC/Z+Z6izxRPbaYqrCaCAjIKhyR2la4uuAfpqvJkZHiI5uzcskciRqAMTGixC9mpoVolXCQnk2IhVGIQSMeZs/EGCllWtgHKXe8vKB0rkhmJxWQlp6osRs5+LZ1s4XrsNUYuflsJFMoRTXKnQUM77eRJdDZaQOHwETaJ/HhLNpKvcSIm3AMFpd2y6EDIB5Z4XfNtApIhaI67cHJ8nWewNH5O/4F2xnsfvumKR7re7v+Y0Ld+CgEsO+0z7JGi3m/835dYH+Gbp+BWTDqOuB6i8Xu+/YqgpCcRFJHDcMJOlrxjsoHQf4wGDeTGLzPpU7JTdp5m7IYe55bbmSoRV28xi/JM/CxDcSmxWwdt3SSNXtwUkzspTt6HI4UyzwTmTKj45UQs7DZyNIhGiJIhlu7mar7VuoBS30DhJcTrKi8Kp/ED3g1ZUN+xx1bFazG5kHMmNPeUzMQqp2Y0PO5D7odBIWIuySy+XKkvJZDJVFP2bw42ZsE/VR2ATVntsdcp9OWbh1rNfqV54WDD+1IrQDe7k1ICUwSFQY/3fYtNnu5opkPV+VBefAzzlq4ZX93sQUDhELaP6T3JM0OsfEucUuq0zlGcjUn4W60scwJ2X1ivkq4Rv1TtyL2PgJGz//aIFduHLuoy2A45LgKI+oQPpAIGUMF2lDUDh9RPxDXqAxp/MT+jDIaiegwpW1DpCrRPtS2Ul0DWEBMYOEeWenv0ZeGKzkUpb6a3HCHl+rcvdde5+iff2F2qbi43bSkNkcpVOqkzyg86ALHOsnWtbpHgEHq8izvNVKLypUxGF+VNz37FXqZ4AO+4eJExsUbrpf7teyl6V1Qy5RKrstqqKLsqR2TB4wep0qm/1yE9ir24S/+sVPpTQVWnP/QrNnMsLollDgzfEgYh8YkO71a/9t9UAX4vCrzD1Onbwj+VvKUCNs0g6mc93NfSu68dS18KqEzqLkvKck0gY1IX8vnP1Zf/rh7xe0XnX6D6lzP8oc7ydcye7Fsqq6pt9MUuYdL9P/6wpeu6/8/f0+AH8ZLKWblCtyGS9CUmLJ93Qz9Qkd8dgZkX0N7EeZb1emn6c3/PAmGOO8uKKh+sudYk/OJfg1ECCQLciWj6LrRU/eRfs1wLr5kOXutKfhWTyBjuNO/H/mzwP/q5W8U07M8OAAAAAElFTkSuQmCC"},function(t,e,n){var i;t.exports=(i=n(0),i.enc.Latin1)},function(i,r,o){var a,s;!function(t,e,n){"use strict";"undefined"!=typeof window&&o(18)?void 0===(s="function"==typeof(a=n)?a.call(r,o,r,i):a)||(i.exports=s):void 0!==i&&i.exports?i.exports=n():e.exports?e.exports=n():e.Fingerprint2=n()}(0,this,function(){"use strict";void 0===Array.isArray&&(Array.isArray=function(t){return"[object Array]"===Object.prototype.toString.call(t)});var h=function(t,e){t=[t[0]>>>16,65535&t[0],t[1]>>>16,65535&t[1]],e=[e[0]>>>16,65535&e[0],e[1]>>>16,65535&e[1]];var n=[0,0,0,0];return n[3]+=t[3]+e[3],n[2]+=n[3]>>>16,n[3]&=65535,n[2]+=t[2]+e[2],n[1]+=n[2]>>>16,n[2]&=65535,n[1]+=t[1]+e[1],n[0]+=n[1]>>>16,n[1]&=65535,n[0]+=t[0]+e[0],n[0]&=65535,[n[0]<<16|n[1],n[2]<<16|n[3]]},d=function(t,e){t=[t[0]>>>16,65535&t[0],t[1]>>>16,65535&t[1]],e=[e[0]>>>16,65535&e[0],e[1]>>>16,65535&e[1]];var n=[0,0,0,0];return n[3]+=t[3]*e[3],n[2]+=n[3]>>>16,n[3]&=65535,n[2]+=t[2]*e[3],n[1]+=n[2]>>>16,n[2]&=65535,n[2]+=t[3]*e[2],n[1]+=n[2]>>>16,n[2]&=65535,n[1]+=t[1]*e[3],n[0]+=n[1]>>>16,n[1]&=65535,n[1]+=t[2]*e[2],n[0]+=n[1]>>>16,n[1]&=65535,n[1]+=t[3]*e[1],n[0]+=n[1]>>>16,n[1]&=65535,n[0]+=t[0]*e[3]+t[1]*e[2]+t[2]*e[1]+t[3]*e[0],n[0]&=65535,[n[0]<<16|n[1],n[2]<<16|n[3]]},f=function(t,e){return 32===(e%=64)?[t[1],t[0]]:e<32?[t[0]<<e|t[1]>>>32-e,t[1]<<e|t[0]>>>32-e]:(e-=32,[t[1]<<e|t[0]>>>32-e,t[0]<<e|t[1]>>>32-e])},p=function(t,e){return 0===(e%=64)?t:e<32?[t[0]<<e|t[1]>>>32-e,t[1]<<e]:[t[1]<<e-32,0]},g=function(t,e){return[t[0]^e[0],t[1]^e[1]]},m=function(t){return t=g(t,[0,t[0]>>>1]),t=d(t,[4283543511,3981806797]),t=g(t,[0,t[0]>>>1]),t=d(t,[3301882366,444984403]),t=g(t,[0,t[0]>>>1])},s=function(t,e){e=e||0;for(var n=(t=t||"").length%16,i=t.length-n,r=[0,e],o=[0,e],a=[0,0],s=[0,0],c=[2277735313,289559509],l=[1291169091,658871167],u=0;u<i;u+=16)a=[255&t.charCodeAt(u+4)|(255&t.charCodeAt(u+5))<<8|(255&t.charCodeAt(u+6))<<16|(255&t.charCodeAt(u+7))<<24,255&t.charCodeAt(u)|(255&t.charCodeAt(u+1))<<8|(255&t.charCodeAt(u+2))<<16|(255&t.charCodeAt(u+3))<<24],s=[255&t.charCodeAt(u+12)|(255&t.charCodeAt(u+13))<<8|(255&t.charCodeAt(u+14))<<16|(255&t.charCodeAt(u+15))<<24,255&t.charCodeAt(u+8)|(255&t.charCodeAt(u+9))<<8|(255&t.charCodeAt(u+10))<<16|(255&t.charCodeAt(u+11))<<24],a=d(a,c),a=f(a,31),a=d(a,l),r=g(r,a),r=f(r,27),r=h(r,o),r=h(d(r,[0,5]),[0,1390208809]),s=d(s,l),s=f(s,33),s=d(s,c),o=g(o,s),o=f(o,31),o=h(o,r),o=h(d(o,[0,5]),[0,944331445]);switch(a=[0,0],s=[0,0],n){case 15:s=g(s,p([0,t.charCodeAt(u+14)],48));case 14:s=g(s,p([0,t.charCodeAt(u+13)],40));case 13:s=g(s,p([0,t.charCodeAt(u+12)],32));case 12:s=g(s,p([0,t.charCodeAt(u+11)],24));case 11:s=g(s,p([0,t.charCodeAt(u+10)],16));case 10:s=g(s,p([0,t.charCodeAt(u+9)],8));case 9:s=g(s,[0,t.charCodeAt(u+8)]),s=d(s,l),s=f(s,33),s=d(s,c),o=g(o,s);case 8:a=g(a,p([0,t.charCodeAt(u+7)],56));case 7:a=g(a,p([0,t.charCodeAt(u+6)],48));case 6:a=g(a,p([0,t.charCodeAt(u+5)],40));case 5:a=g(a,p([0,t.charCodeAt(u+4)],32));case 4:a=g(a,p([0,t.charCodeAt(u+3)],24));case 3:a=g(a,p([0,t.charCodeAt(u+2)],16));case 2:a=g(a,p([0,t.charCodeAt(u+1)],8));case 1:a=g(a,[0,t.charCodeAt(u)]),a=d(a,c),a=f(a,31),a=d(a,l),r=g(r,a)}return r=g(r,[0,t.length]),o=g(o,[0,t.length]),r=h(r,o),o=h(o,r),r=m(r),o=m(o),r=h(r,o),o=h(o,r),("00000000"+(r[0]>>>0).toString(16)).slice(-8)+("00000000"+(r[1]>>>0).toString(16)).slice(-8)+("00000000"+(o[0]>>>0).toString(16)).slice(-8)+("00000000"+(o[1]>>>0).toString(16)).slice(-8)},t={preprocessor:null,audio:{timeout:1e3,excludeIOS11:!0},fonts:{swfContainerId:"fingerprintjs2",swfPath:"flash/compiled/FontList.swf",userDefinedFonts:[],extendedJsFonts:!1},screen:{detectScreenOrientation:!0},plugins:{sortPluginsFor:[/palemoon/i],excludeIE:!1},extraComponents:[],excludes:{enumerateDevices:!0,pixelRatio:!0,doNotTrack:!0,fontsFlash:!0,adBlock:!0},NOT_AVAILABLE:"not available",ERROR:"error",EXCLUDED:"excluded"},l=function(t,e){if(Array.prototype.forEach&&t.forEach===Array.prototype.forEach)t.forEach(e);else if(t.length===+t.length)for(var n=0,i=t.length;n<i;n++)e(t[n],n,t);else for(var r in t)t.hasOwnProperty(r)&&e(t[r],r,t)},c=function(t,i){var r=[];return null==t?r:Array.prototype.map&&t.map===Array.prototype.map?t.map(i):(l(t,function(t,e,n){r.push(i(t,e,n))}),r)},n=function(){return navigator.mediaDevices&&navigator.mediaDevices.enumerateDevices},i=function(t){var e=[window.screen.width,window.screen.height];return t.screen.detectScreenOrientation&&e.sort().reverse(),e},r=function(t){if(window.screen.availWidth&&window.screen.availHeight){var e=[window.screen.availHeight,window.screen.availWidth];return t.screen.detectScreenOrientation&&e.sort().reverse(),e}return t.NOT_AVAILABLE},o=function(t){if(null==navigator.plugins)return t.NOT_AVAILABLE;for(var e=[],n=0,i=navigator.plugins.length;n<i;n++)navigator.plugins[n]&&e.push(navigator.plugins[n]);return u(t)&&(e=e.sort(function(t,e){return t.name>e.name?1:t.name<e.name?-1:0})),c(e,function(t){var e=c(t,function(t){return[t.type,t.suffixes]});return[t.name,t.description,e]})},a=function(e){var t=[];if(Object.getOwnPropertyDescriptor&&Object.getOwnPropertyDescriptor(window,"ActiveXObject")||"ActiveXObject"in window){t=c(["AcroPDF.PDF","Adodb.Stream","AgControl.AgControl","DevalVRXCtrl.DevalVRXCtrl.1","MacromediaFlashPaper.MacromediaFlashPaper","Msxml2.DOMDocument","Msxml2.XMLHTTP","PDF.PdfCtrl","QuickTime.QuickTime","QuickTimeCheckObject.QuickTimeCheck.1","RealPlayer","RealPlayer.RealPlayer(tm) ActiveX Control (32-bit)","RealVideo.RealVideo(tm) ActiveX Control (32-bit)","Scripting.Dictionary","SWCtl.SWCtl","Shell.UIHelper","ShockwaveFlash.ShockwaveFlash","Skype.Detection","TDCCtl.TDCCtl","WMPlayer.OCX","rmocx.RealPlayer G2 Control","rmocx.RealPlayer G2 Control.1"],function(t){try{return new window.ActiveXObject(t),t}catch(t){return e.ERROR}})}else t.push(e.NOT_AVAILABLE);return navigator.plugins&&(t=t.concat(o(e))),t},u=function(t){for(var e=!1,n=0,i=t.plugins.sortPluginsFor.length;n<i;n++){var r=t.plugins.sortPluginsFor[n];if(navigator.userAgent.match(r)){e=!0;break}}return e},y=function(e){try{return!!window.sessionStorage}catch(t){return e.ERROR}},v=function(e){try{return!!window.localStorage}catch(t){return e.ERROR}},b=function(e){if(M())return e.EXCLUDED;try{return!!window.indexedDB}catch(t){return e.ERROR}},w=function(t){return navigator.hardwareConcurrency?navigator.hardwareConcurrency:t.NOT_AVAILABLE},T=function(t){return navigator.cpuClass||t.NOT_AVAILABLE},A=function(t){return navigator.platform?navigator.platform:t.NOT_AVAILABLE},E=function(t){return navigator.doNotTrack?navigator.doNotTrack:navigator.msDoNotTrack?navigator.msDoNotTrack:window.doNotTrack?window.doNotTrack:t.NOT_AVAILABLE},e=function(){var e,t=0;void 0!==navigator.maxTouchPoints?t=navigator.maxTouchPoints:void 0!==navigator.msMaxTouchPoints&&(t=navigator.msMaxTouchPoints);try{document.createEvent("TouchEvent"),e=!0}catch(t){e=!1}return[t,e,"ontouchstart"in window]},x=function(t){var e=[],n=document.createElement("canvas");n.width=2e3,n.height=200,n.style.display="inline";var i=n.getContext("2d");return i.rect(0,0,10,10),i.rect(2,2,6,6),e.push("canvas winding:"+(!1===i.isPointInPath(5,5,"evenodd")?"yes":"no")),i.textBaseline="alphabetic",i.fillStyle="#f60",i.fillRect(125,1,62,20),i.fillStyle="#069",t.dontUseFakeFontInCanvas?i.font="11pt Arial":i.font="11pt no-real-font-123",i.fillText("Cwm fjordbank glyphs vext quiz, 😃",2,15),i.fillStyle="rgba(102, 204, 0, 0.2)",i.font="18pt Arial",i.fillText("Cwm fjordbank glyphs vext quiz, 😃",4,45),i.globalCompositeOperation="multiply",i.fillStyle="rgb(255,0,255)",i.beginPath(),i.arc(50,50,50,0,2*Math.PI,!0),i.closePath(),i.fill(),i.fillStyle="rgb(0,255,255)",i.beginPath(),i.arc(100,50,50,0,2*Math.PI,!0),i.closePath(),i.fill(),i.fillStyle="rgb(255,255,0)",i.beginPath(),i.arc(75,100,50,0,2*Math.PI,!0),i.closePath(),i.fill(),i.fillStyle="rgb(255,0,255)",i.arc(75,75,75,0,2*Math.PI,!0),i.arc(75,75,25,0,2*Math.PI,!0),i.fill("evenodd"),n.toDataURL&&e.push("canvas fp:"+n.toDataURL()),e},S=function(){var a,t=function(t){return a.clearColor(0,0,0,1),a.enable(a.DEPTH_TEST),a.depthFunc(a.LEQUAL),a.clear(a.COLOR_BUFFER_BIT|a.DEPTH_BUFFER_BIT),"["+t[0]+", "+t[1]+"]"};if(!(a=U()))return null;var s=[],e=a.createBuffer();a.bindBuffer(a.ARRAY_BUFFER,e);var n=new Float32Array([-.2,-.9,0,.4,-.26,0,0,.732134444,0]);a.bufferData(a.ARRAY_BUFFER,n,a.STATIC_DRAW),e.itemSize=3,e.numItems=3;var i=a.createProgram(),r=a.createShader(a.VERTEX_SHADER);a.shaderSource(r,"attribute vec2 attrVertex;varying vec2 varyinTexCoordinate;uniform vec2 uniformOffset;void main(){varyinTexCoordinate=attrVertex+uniformOffset;gl_Position=vec4(attrVertex,0,1);}"),a.compileShader(r);var o=a.createShader(a.FRAGMENT_SHADER);a.shaderSource(o,"precision mediump float;varying vec2 varyinTexCoordinate;void main() {gl_FragColor=vec4(varyinTexCoordinate,0,1);}"),a.compileShader(o),a.attachShader(i,r),a.attachShader(i,o),a.linkProgram(i),a.useProgram(i),i.vertexPosAttrib=a.getAttribLocation(i,"attrVertex"),i.offsetUniform=a.getUniformLocation(i,"uniformOffset"),a.enableVertexAttribArray(i.vertexPosArray),a.vertexAttribPointer(i.vertexPosAttrib,e.itemSize,a.FLOAT,!1,0,0),a.uniform2f(i.offsetUniform,1,1),a.drawArrays(a.TRIANGLE_STRIP,0,e.numItems);try{s.push(a.canvas.toDataURL())}catch(t){}s.push("extensions:"+(a.getSupportedExtensions()||[]).join(";")),s.push("webgl aliased line width range:"+t(a.getParameter(a.ALIASED_LINE_WIDTH_RANGE))),s.push("webgl aliased point size range:"+t(a.getParameter(a.ALIASED_POINT_SIZE_RANGE))),s.push("webgl alpha bits:"+a.getParameter(a.ALPHA_BITS)),s.push("webgl antialiasing:"+(a.getContextAttributes().antialias?"yes":"no")),s.push("webgl blue bits:"+a.getParameter(a.BLUE_BITS)),s.push("webgl depth bits:"+a.getParameter(a.DEPTH_BITS)),s.push("webgl green bits:"+a.getParameter(a.GREEN_BITS)),s.push("webgl max anisotropy:"+function(t){var e=t.getExtension("EXT_texture_filter_anisotropic")||t.getExtension("WEBKIT_EXT_texture_filter_anisotropic")||t.getExtension("MOZ_EXT_texture_filter_anisotropic");if(e){var n=t.getParameter(e.MAX_TEXTURE_MAX_ANISOTROPY_EXT);return 0===n&&(n=2),n}return null}(a)),s.push("webgl max combined texture image units:"+a.getParameter(a.MAX_COMBINED_TEXTURE_IMAGE_UNITS)),s.push("webgl max cube map texture size:"+a.getParameter(a.MAX_CUBE_MAP_TEXTURE_SIZE)),s.push("webgl max fragment uniform vectors:"+a.getParameter(a.MAX_FRAGMENT_UNIFORM_VECTORS)),s.push("webgl max render buffer size:"+a.getParameter(a.MAX_RENDERBUFFER_SIZE)),s.push("webgl max texture image units:"+a.getParameter(a.MAX_TEXTURE_IMAGE_UNITS)),s.push("webgl max texture size:"+a.getParameter(a.MAX_TEXTURE_SIZE)),s.push("webgl max varying vectors:"+a.getParameter(a.MAX_VARYING_VECTORS)),s.push("webgl max vertex attribs:"+a.getParameter(a.MAX_VERTEX_ATTRIBS)),s.push("webgl max vertex texture image units:"+a.getParameter(a.MAX_VERTEX_TEXTURE_IMAGE_UNITS)),s.push("webgl max vertex uniform vectors:"+a.getParameter(a.MAX_VERTEX_UNIFORM_VECTORS)),s.push("webgl max viewport dims:"+t(a.getParameter(a.MAX_VIEWPORT_DIMS))),s.push("webgl red bits:"+a.getParameter(a.RED_BITS)),s.push("webgl renderer:"+a.getParameter(a.RENDERER)),s.push("webgl shading language version:"+a.getParameter(a.SHADING_LANGUAGE_VERSION)),s.push("webgl stencil bits:"+a.getParameter(a.STENCIL_BITS)),s.push("webgl vendor:"+a.getParameter(a.VENDOR)),s.push("webgl version:"+a.getParameter(a.VERSION));try{var c=a.getExtension("WEBGL_debug_renderer_info");c&&(s.push("webgl unmasked vendor:"+a.getParameter(c.UNMASKED_VENDOR_WEBGL)),s.push("webgl unmasked renderer:"+a.getParameter(c.UNMASKED_RENDERER_WEBGL)))}catch(t){}return a.getShaderPrecisionFormat&&l(["FLOAT","INT"],function(o){l(["VERTEX","FRAGMENT"],function(r){l(["HIGH","MEDIUM","LOW"],function(i){l(["precision","rangeMin","rangeMax"],function(t){var e=a.getShaderPrecisionFormat(a[r+"_SHADER"],a[i+"_"+o])[t];"precision"!==t&&(t="precision "+t);var n=["webgl ",r.toLowerCase()," shader ",i.toLowerCase()," ",o.toLowerCase()," ",t,":",e].join("");s.push(n)})})})}),F(a),s},O=function(){try{var t=U(),e=t.getExtension("WEBGL_debug_renderer_info"),n=t.getParameter(e.UNMASKED_VENDOR_WEBGL)+"~"+t.getParameter(e.UNMASKED_RENDERER_WEBGL);return F(t),n}catch(t){return null}},C=function(){var t=document.createElement("div");t.innerHTML="&nbsp;";var e=!(t.className="adsbox");try{document.body.appendChild(t),e=0===document.getElementsByClassName("adsbox")[0].offsetHeight,document.body.removeChild(t)}catch(t){e=!1}return e},B=function(){if(void 0!==navigator.languages)try{if(navigator.languages[0].substr(0,2)!==navigator.language.substr(0,2))return!0}catch(t){return!0}return!1},D=function(){return window.screen.width<window.screen.availWidth||window.screen.height<window.screen.availHeight},k=function(){var t,e=navigator.userAgent.toLowerCase(),n=navigator.oscpu,i=navigator.platform.toLowerCase();if(t=0<=e.indexOf("windows phone")?"Windows Phone":0<=e.indexOf("windows")||0<=e.indexOf("win16")||0<=e.indexOf("win32")||0<=e.indexOf("win64")||0<=e.indexOf("win95")||0<=e.indexOf("win98")||0<=e.indexOf("winnt")||0<=e.indexOf("wow64")?"Windows":0<=e.indexOf("android")?"Android":0<=e.indexOf("linux")||0<=e.indexOf("cros")||0<=e.indexOf("x11")?"Linux":0<=e.indexOf("iphone")||0<=e.indexOf("ipad")||0<=e.indexOf("ipod")||0<=e.indexOf("crios")||0<=e.indexOf("fxios")?"iOS":0<=e.indexOf("macintosh")||0<=e.indexOf("mac_powerpc)")?"Mac":"Other",("ontouchstart"in window||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints)&&"Windows"!==t&&"Windows Phone"!==t&&"Android"!==t&&"iOS"!==t&&"Other"!==t&&-1===e.indexOf("cros"))return!0;if(void 0!==n){if(0<=(n=n.toLowerCase()).indexOf("win")&&"Windows"!==t&&"Windows Phone"!==t)return!0;if(0<=n.indexOf("linux")&&"Linux"!==t&&"Android"!==t)return!0;if(0<=n.indexOf("mac")&&"Mac"!==t&&"iOS"!==t)return!0;if((-1===n.indexOf("win")&&-1===n.indexOf("linux")&&-1===n.indexOf("mac"))!=("Other"===t))return!0}return 0<=i.indexOf("win")&&"Windows"!==t&&"Windows Phone"!==t||((0<=i.indexOf("linux")||0<=i.indexOf("android")||0<=i.indexOf("pike"))&&"Linux"!==t&&"Android"!==t||((0<=i.indexOf("mac")||0<=i.indexOf("ipad")||0<=i.indexOf("ipod")||0<=i.indexOf("iphone"))&&"Mac"!==t&&"iOS"!==t||!(0<=i.indexOf("arm")&&"Windows Phone"===t)&&(!(0<=i.indexOf("pike")&&0<=e.indexOf("opera mini"))&&((i.indexOf("win")<0&&i.indexOf("linux")<0&&i.indexOf("mac")<0&&i.indexOf("iphone")<0&&i.indexOf("ipad")<0&&i.indexOf("ipod")<0)!==("Other"===t)||void 0===navigator.plugins&&"Windows"!==t&&"Windows Phone"!==t))))},R=function(){var t,e=navigator.userAgent.toLowerCase(),n=navigator.productSub;if(0<=e.indexOf("edge/")||0<=e.indexOf("iemobile/"))return!1;if(0<=e.indexOf("opera mini"))return!1;if(("Chrome"===(t=0<=e.indexOf("firefox/")?"Firefox":0<=e.indexOf("opera/")||0<=e.indexOf(" opr/")?"Opera":0<=e.indexOf("chrome/")?"Chrome":0<=e.indexOf("safari/")?0<=e.indexOf("android 1.")||0<=e.indexOf("android 2.")||0<=e.indexOf("android 3.")||0<=e.indexOf("android 4.")?"AOSP":"Safari":0<=e.indexOf("trident/")?"Internet Explorer":"Other")||"Safari"===t||"Opera"===t)&&"20030107"!==n)return!0;var i,r=eval.toString().length;if(37===r&&"Safari"!==t&&"Firefox"!==t&&"Other"!==t)return!0;if(39===r&&"Internet Explorer"!==t&&"Other"!==t)return!0;if(33===r&&"Chrome"!==t&&"AOSP"!==t&&"Opera"!==t&&"Other"!==t)return!0;try{throw"a"}catch(t){try{t.toSource(),i=!0}catch(t){i=!1}}return i&&"Firefox"!==t&&"Other"!==t},I=function(){var t=document.createElement("canvas");return!(!t.getContext||!t.getContext("2d"))},N=function(){if(!I())return!1;var t=U(),e=!!window.WebGLRenderingContext&&!!t;return F(t),e},P=function(){return"Microsoft Internet Explorer"===navigator.appName||!("Netscape"!==navigator.appName||!/Trident/.test(navigator.userAgent))},M=function(){return 2<=("msWriteProfilerMark"in window)+("msLaunchUri"in navigator)+("msSaveBlob"in navigator)},L=function(){return void 0!==window.swfobject},V=function(){return window.swfobject.hasFlashPlayerVersion("9.0.0")},j=function(e,t){var n="___fp_swf_loaded";window[n]=function(t){e(t)};var i,r,o=t.fonts.swfContainerId;(r=document.createElement("div")).setAttribute("id",i.fonts.swfContainerId),document.body.appendChild(r);var a={onReady:n};window.swfobject.embedSWF(t.fonts.swfPath,o,"1","1","9.0.0",!1,a,{allowScriptAccess:"always",menu:"false"},{})},U=function(){var t=document.createElement("canvas"),e=null;try{e=t.getContext("webgl")||t.getContext("experimental-webgl")}catch(t){}return e||(e=null),e},F=function(t){var e=t.getExtension("WEBGL_lose_context");null!=e&&e.loseContext()},_=[{key:"userAgent",getData:function(t){t(navigator.userAgent)}},{key:"webdriver",getData:function(t,e){t(null==navigator.webdriver?e.NOT_AVAILABLE:navigator.webdriver)}},{key:"language",getData:function(t,e){t(navigator.language||navigator.userLanguage||navigator.browserLanguage||navigator.systemLanguage||e.NOT_AVAILABLE)}},{key:"colorDepth",getData:function(t,e){t(window.screen.colorDepth||e.NOT_AVAILABLE)}},{key:"deviceMemory",getData:function(t,e){t(navigator.deviceMemory||e.NOT_AVAILABLE)}},{key:"pixelRatio",getData:function(t,e){t(window.devicePixelRatio||e.NOT_AVAILABLE)}},{key:"hardwareConcurrency",getData:function(t,e){t(w(e))}},{key:"screenResolution",getData:function(t,e){t(i(e))}},{key:"availableScreenResolution",getData:function(t,e){t(r(e))}},{key:"timezoneOffset",getData:function(t){t((new Date).getTimezoneOffset())}},{key:"timezone",getData:function(t,e){window.Intl&&window.Intl.DateTimeFormat?t((new window.Intl.DateTimeFormat).resolvedOptions().timeZone||e.NOT_AVAILABLE):t(e.NOT_AVAILABLE)}},{key:"sessionStorage",getData:function(t,e){t(y(e))}},{key:"localStorage",getData:function(t,e){t(v(e))}},{key:"indexedDb",getData:function(t,e){t(b(e))}},{key:"addBehavior",getData:function(t){t(!!window.HTMLElement.prototype.addBehavior)}},{key:"openDatabase",getData:function(t){t(!!window.openDatabase)}},{key:"cpuClass",getData:function(t,e){t(T(e))}},{key:"platform",getData:function(t,e){t(A(e))}},{key:"doNotTrack",getData:function(t,e){t(E(e))}},{key:"plugins",getData:function(t,e){P()?e.plugins.excludeIE?t(e.EXCLUDED):t(a(e)):t(o(e))}},{key:"canvas",getData:function(t,e){I()?t(x(e)):t(e.NOT_AVAILABLE)}},{key:"webgl",getData:function(t,e){N()?t(S()):t(e.NOT_AVAILABLE)}},{key:"webglVendorAndRenderer",getData:function(t){N()?t(O()):t()}},{key:"adBlock",getData:function(t){t(C())}},{key:"hasLiedLanguages",getData:function(t){t(B())}},{key:"hasLiedResolution",getData:function(t){t(D())}},{key:"hasLiedOs",getData:function(t){t(k())}},{key:"hasLiedBrowser",getData:function(t){t(R())}},{key:"touchSupport",getData:function(t){t(e())}},{key:"fonts",getData:function(t,e){var u=["monospace","sans-serif","serif"],h=["Andale Mono","Arial","Arial Black","Arial Hebrew","Arial MT","Arial Narrow","Arial Rounded MT Bold","Arial Unicode MS","Bitstream Vera Sans Mono","Book Antiqua","Bookman Old Style","Calibri","Cambria","Cambria Math","Century","Century Gothic","Century Schoolbook","Comic Sans","Comic Sans MS","Consolas","Courier","Courier New","Geneva","Georgia","Helvetica","Helvetica Neue","Impact","Lucida Bright","Lucida Calligraphy","Lucida Console","Lucida Fax","LUCIDA GRANDE","Lucida Handwriting","Lucida Sans","Lucida Sans Typewriter","Lucida Sans Unicode","Microsoft Sans Serif","Monaco","Monotype Corsiva","MS Gothic","MS Outlook","MS PGothic","MS Reference Sans Serif","MS Sans Serif","MS Serif","MYRIAD","MYRIAD PRO","Palatino","Palatino Linotype","Segoe Print","Segoe Script","Segoe UI","Segoe UI Light","Segoe UI Semibold","Segoe UI Symbol","Tahoma","Times","Times New Roman","Times New Roman PS","Trebuchet MS","Verdana","Wingdings","Wingdings 2","Wingdings 3"];e.fonts.extendedJsFonts&&(h=h.concat(["Abadi MT Condensed Light","Academy Engraved LET","ADOBE CASLON PRO","Adobe Garamond","ADOBE GARAMOND PRO","Agency FB","Aharoni","Albertus Extra Bold","Albertus Medium","Algerian","Amazone BT","American Typewriter","American Typewriter Condensed","AmerType Md BT","Andalus","Angsana New","AngsanaUPC","Antique Olive","Aparajita","Apple Chancery","Apple Color Emoji","Apple SD Gothic Neo","Arabic Typesetting","ARCHER","ARNO PRO","Arrus BT","Aurora Cn BT","AvantGarde Bk BT","AvantGarde Md BT","AVENIR","Ayuthaya","Bandy","Bangla Sangam MN","Bank Gothic","BankGothic Md BT","Baskerville","Baskerville Old Face","Batang","BatangChe","Bauer Bodoni","Bauhaus 93","Bazooka","Bell MT","Bembo","Benguiat Bk BT","Berlin Sans FB","Berlin Sans FB Demi","Bernard MT Condensed","BernhardFashion BT","BernhardMod BT","Big Caslon","BinnerD","Blackadder ITC","BlairMdITC TT","Bodoni 72","Bodoni 72 Oldstyle","Bodoni 72 Smallcaps","Bodoni MT","Bodoni MT Black","Bodoni MT Condensed","Bodoni MT Poster Compressed","Bookshelf Symbol 7","Boulder","Bradley Hand","Bradley Hand ITC","Bremen Bd BT","Britannic Bold","Broadway","Browallia New","BrowalliaUPC","Brush Script MT","Californian FB","Calisto MT","Calligrapher","Candara","CaslonOpnface BT","Castellar","Centaur","Cezanne","CG Omega","CG Times","Chalkboard","Chalkboard SE","Chalkduster","Charlesworth","Charter Bd BT","Charter BT","Chaucer","ChelthmITC Bk BT","Chiller","Clarendon","Clarendon Condensed","CloisterBlack BT","Cochin","Colonna MT","Constantia","Cooper Black","Copperplate","Copperplate Gothic","Copperplate Gothic Bold","Copperplate Gothic Light","CopperplGoth Bd BT","Corbel","Cordia New","CordiaUPC","Cornerstone","Coronet","Cuckoo","Curlz MT","DaunPenh","Dauphin","David","DB LCD Temp","DELICIOUS","Denmark","DFKai-SB","Didot","DilleniaUPC","DIN","DokChampa","Dotum","DotumChe","Ebrima","Edwardian Script ITC","Elephant","English 111 Vivace BT","Engravers MT","EngraversGothic BT","Eras Bold ITC","Eras Demi ITC","Eras Light ITC","Eras Medium ITC","EucrosiaUPC","Euphemia","Euphemia UCAS","EUROSTILE","Exotc350 Bd BT","FangSong","Felix Titling","Fixedsys","FONTIN","Footlight MT Light","Forte","FrankRuehl","Fransiscan","Freefrm721 Blk BT","FreesiaUPC","Freestyle Script","French Script MT","FrnkGothITC Bk BT","Fruitger","FRUTIGER","Futura","Futura Bk BT","Futura Lt BT","Futura Md BT","Futura ZBlk BT","FuturaBlack BT","Gabriola","Galliard BT","Gautami","Geeza Pro","Geometr231 BT","Geometr231 Hv BT","Geometr231 Lt BT","GeoSlab 703 Lt BT","GeoSlab 703 XBd BT","Gigi","Gill Sans","Gill Sans MT","Gill Sans MT Condensed","Gill Sans MT Ext Condensed Bold","Gill Sans Ultra Bold","Gill Sans Ultra Bold Condensed","Gisha","Gloucester MT Extra Condensed","GOTHAM","GOTHAM BOLD","Goudy Old Style","Goudy Stout","GoudyHandtooled BT","GoudyOLSt BT","Gujarati Sangam MN","Gulim","GulimChe","Gungsuh","GungsuhChe","Gurmukhi MN","Haettenschweiler","Harlow Solid Italic","Harrington","Heather","Heiti SC","Heiti TC","HELV","Herald","High Tower Text","Hiragino Kaku Gothic ProN","Hiragino Mincho ProN","Hoefler Text","Humanst 521 Cn BT","Humanst521 BT","Humanst521 Lt BT","Imprint MT Shadow","Incised901 Bd BT","Incised901 BT","Incised901 Lt BT","INCONSOLATA","Informal Roman","Informal011 BT","INTERSTATE","IrisUPC","Iskoola Pota","JasmineUPC","Jazz LET","Jenson","Jester","Jokerman","Juice ITC","Kabel Bk BT","Kabel Ult BT","Kailasa","KaiTi","Kalinga","Kannada Sangam MN","Kartika","Kaufmann Bd BT","Kaufmann BT","Khmer UI","KodchiangUPC","Kokila","Korinna BT","Kristen ITC","Krungthep","Kunstler Script","Lao UI","Latha","Leelawadee","Letter Gothic","Levenim MT","LilyUPC","Lithograph","Lithograph Light","Long Island","Lydian BT","Magneto","Maiandra GD","Malayalam Sangam MN","Malgun Gothic","Mangal","Marigold","Marion","Marker Felt","Market","Marlett","Matisse ITC","Matura MT Script Capitals","Meiryo","Meiryo UI","Microsoft Himalaya","Microsoft JhengHei","Microsoft New Tai Lue","Microsoft PhagsPa","Microsoft Tai Le","Microsoft Uighur","Microsoft YaHei","Microsoft Yi Baiti","MingLiU","MingLiU_HKSCS","MingLiU_HKSCS-ExtB","MingLiU-ExtB","Minion","Minion Pro","Miriam","Miriam Fixed","Mistral","Modern","Modern No. 20","Mona Lisa Solid ITC TT","Mongolian Baiti","MONO","MoolBoran","Mrs Eaves","MS LineDraw","MS Mincho","MS PMincho","MS Reference Specialty","MS UI Gothic","MT Extra","MUSEO","MV Boli","Nadeem","Narkisim","NEVIS","News Gothic","News GothicMT","NewsGoth BT","Niagara Engraved","Niagara Solid","Noteworthy","NSimSun","Nyala","OCR A Extended","Old Century","Old English Text MT","Onyx","Onyx BT","OPTIMA","Oriya Sangam MN","OSAKA","OzHandicraft BT","Palace Script MT","Papyrus","Parchment","Party LET","Pegasus","Perpetua","Perpetua Titling MT","PetitaBold","Pickwick","Plantagenet Cherokee","Playbill","PMingLiU","PMingLiU-ExtB","Poor Richard","Poster","PosterBodoni BT","PRINCETOWN LET","Pristina","PTBarnum BT","Pythagoras","Raavi","Rage Italic","Ravie","Ribbon131 Bd BT","Rockwell","Rockwell Condensed","Rockwell Extra Bold","Rod","Roman","Sakkal Majalla","Santa Fe LET","Savoye LET","Sceptre","Script","Script MT Bold","SCRIPTINA","Serifa","Serifa BT","Serifa Th BT","ShelleyVolante BT","Sherwood","Shonar Bangla","Showcard Gothic","Shruti","Signboard","SILKSCREEN","SimHei","Simplified Arabic","Simplified Arabic Fixed","SimSun","SimSun-ExtB","Sinhala Sangam MN","Sketch Rockwell","Skia","Small Fonts","Snap ITC","Snell Roundhand","Socket","Souvenir Lt BT","Staccato222 BT","Steamer","Stencil","Storybook","Styllo","Subway","Swis721 BlkEx BT","Swiss911 XCm BT","Sylfaen","Synchro LET","System","Tamil Sangam MN","Technical","Teletype","Telugu Sangam MN","Tempus Sans ITC","Terminal","Thonburi","Traditional Arabic","Trajan","TRAJAN PRO","Tristan","Tubular","Tunga","Tw Cen MT","Tw Cen MT Condensed","Tw Cen MT Condensed Extra Bold","TypoUpright BT","Unicorn","Univers","Univers CE 55 Medium","Univers Condensed","Utsaah","Vagabond","Vani","Vijaya","Viner Hand ITC","VisualUI","Vivaldi","Vladimir Script","Vrinda","Westminster","WHITNEY","Wide Latin","ZapfEllipt BT","ZapfHumnst BT","ZapfHumnst Dm BT","Zapfino","Zurich BlkEx BT","Zurich Ex BT","ZWAdobeF"]));h=(h=h.concat(e.fonts.userDefinedFonts)).filter(function(t,e){return h.indexOf(t)===e});var n=document.getElementsByTagName("body")[0],r=document.createElement("div"),d=document.createElement("div"),i={},o={},f=function(){var t=document.createElement("span");return t.style.position="absolute",t.style.left="-9999px",t.style.fontSize="72px",t.style.fontStyle="normal",t.style.fontWeight="normal",t.style.letterSpacing="normal",t.style.lineBreak="auto",t.style.lineHeight="normal",t.style.textTransform="none",t.style.textAlign="left",t.style.textDecoration="none",t.style.textShadow="none",t.style.whiteSpace="normal",t.style.wordBreak="normal",t.style.wordSpacing="normal",t.innerHTML="mmmmmmmmmmlli",t},a=function(t){for(var e=!1,n=0;n<u.length;n++)if(e=t[n].offsetWidth!==i[u[n]]||t[n].offsetHeight!==o[u[n]])return e;return e},s=function(){for(var t=[],e=0,n=u.length;e<n;e++){var i=f();i.style.fontFamily=u[e],r.appendChild(i),t.push(i)}return t}();n.appendChild(r);for(var c=0,l=u.length;c<l;c++)i[u[c]]=s[c].offsetWidth,o[u[c]]=s[c].offsetHeight;var p=function(){for(var t,e,n,i={},r=0,o=h.length;r<o;r++){for(var a=[],s=0,c=u.length;s<c;s++){var l=(t=h[r],e=u[s],n=void 0,(n=f()).style.fontFamily="'"+t+"',"+e,n);d.appendChild(l),a.push(l)}i[h[r]]=a}return i}();n.appendChild(d);for(var g=[],m=0,y=h.length;m<y;m++)a(p[h[m]])&&g.push(h[m]);n.removeChild(d),n.removeChild(r),t(g)},pauseBefore:!0},{key:"fontsFlash",getData:function(e,t){return L()?V()?t.fonts.swfPath?void j(function(t){e(t)},t):e("missing options.fonts.swfPath"):e("flash not installed"):e("swf object not loaded")},pauseBefore:!0},{key:"audio",getData:function(n,t){var e=t.audio;if(e.excludeIOS11&&navigator.userAgent.match(/OS 11.+Version\/11.+Safari/))return n(t.EXCLUDED);var i=window.OfflineAudioContext||window.webkitOfflineAudioContext;if(null==i)return n(t.NOT_AVAILABLE);var r=new i(1,44100,44100),o=r.createOscillator();o.type="triangle",o.frequency.setValueAtTime(1e4,r.currentTime);var a=r.createDynamicsCompressor();l([["threshold",-50],["knee",40],["ratio",12],["reduction",-20],["attack",0],["release",.25]],function(t){void 0!==a[t[0]]&&"function"==typeof a[t[0]].setValueAtTime&&a[t[0]].setValueAtTime(t[1],r.currentTime)}),o.connect(a),a.connect(r.destination),o.start(0),r.startRendering();var s=setTimeout(function(){return console.warn('Audio fingerprint timed out. Please report bug at https://github.com/fingerprintjs/fingerprintjs with your user agent: "'+navigator.userAgent+'".'),r.oncomplete=function(){},r=null,n("audioTimeout")},e.timeout);r.oncomplete=function(t){var e;try{clearTimeout(s),e=t.renderedBuffer.getChannelData(0).slice(4500,5e3).reduce(function(t,e){return t+Math.abs(e)},0).toString(),o.disconnect(),a.disconnect()}catch(t){return void n(t)}n(e)}}},{key:"enumerateDevices",getData:function(e,t){if(!n())return e(t.NOT_AVAILABLE);navigator.mediaDevices.enumerateDevices().then(function(t){e(t.map(function(t){return"id="+t.deviceId+";gid="+t.groupId+";"+t.kind+";"+t.label}))}).catch(function(t){e(t)})}}],H=function(t){throw new Error("'new Fingerprint()' is deprecated, see https://github.com/fingerprintjs/fingerprintjs#upgrade-guide-from-182-to-200")};return H.get=function(n,i){i?n||(n={}):(i=n,n={}),function(t,e){if(null==e)return;var n,i;for(i in e)null==(n=e[i])||Object.prototype.hasOwnProperty.call(t,i)||(t[i]=n)}(n,t),n.components=n.extraComponents.concat(_);var r={data:[],addPreprocessedComponent:function(t,e){"function"==typeof n.preprocessor&&(e=n.preprocessor(t,e)),r.data.push({key:t,value:e})}},o=-1,a=function(t){if((o+=1)>=n.components.length)i(r.data);else{var e=n.components[o];if(n.excludes[e.key])a(!1);else{if(!t&&e.pauseBefore)return o-=1,void setTimeout(function(){a(!0)},1);try{e.getData(function(t){r.addPreprocessedComponent(e.key,t),a(!1)},n)}catch(t){r.addPreprocessedComponent(e.key,String(t)),a(!1)}}}};a(!1)},H.getPromise=function(n){return new Promise(function(t,e){H.get(n,t)})},H.getV18=function(o,a){return null==a&&(a=o,o={}),H.get(o,function(t){for(var e=[],n=0;n<t.length;n++){var i=t[n];if(i.value===(o.NOT_AVAILABLE||"not available"))e.push({key:i.key,value:"unknown"});else if("plugins"===i.key)e.push({key:"plugins",value:c(i.value,function(t){var e=c(t[2],function(t){return t.join?t.join("~"):t}).join(",");return[t[0],t[1],e].join("::")})});else if(-1!==["canvas","webgl"].indexOf(i.key)&&Array.isArray(i.value))e.push({key:i.key,value:i.value.join("~")});else if(-1!==["sessionStorage","localStorage","indexedDb","addBehavior","openDatabase"].indexOf(i.key)){if(!i.value)continue;e.push({key:i.key,value:1})}else i.value?e.push(i.value.join?{key:i.key,value:i.value.join(";")}:i):e.push({key:i.key,value:i.value})}var r=s(c(e,function(t){return t.value}).join("~~~"),31);a(r,e)})},H.x64hash128=s,H.VERSION="2.1.4",H})},function(t,e){t.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8BAMAAADI0sRBAAAAElBMVEVHcEyPj7V3fp52fZ52fZ52fZ5Xt/B6AAAABXRSTlMABraK6T5p8dIAAABjSURBVDjLY2AYBQMOGE2cBfBIM4eGKuKRZgkNDRLAK41PO9BwfNoZVfFrFxrVDgHCrqHYAEy7KVbZ0GCoNHbNoSHESRMwnIDTSA0XAsEyEjUTyEQEsiCBDEwg+xMoPEYBzQEAYlpTdYl6u9gAAAAASUVORK5CYII="},function(t,e){t.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8BAMAAADI0sRBAAAAD1BMVEVHcExSxBpSxBpV1CpSxBqRg39rAAAABHRSTlMAiOYGvfLd/QAAAFFJREFUOMtjYBgFwwsYKgkjOMxCigaoUiIujggBRhcXAQQPJKXi4oQQYHJxUUDwQFIuLi4IARYXFwcEDyQ1Kj0qPSykCWQDApmIQBYcBcMLAACpu0NXK5UQPQAAAABJRU5ErkJggg=="},function(t,e){t.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAR0AAADIBAMAAAAnwChgAAAAIVBMVEVHcEwZ+igZ+igZ+igZ+igZ+igZ+igZ+igZ+igZ+yga+ilF3P5FAAAACnRSTlMAyq2S5ndCXSoTIhVgFQAABDtJREFUeNrtnT1vGkEQhg+OT1e2EkUJlatEosLtVUkTIVcuIyqUpIkriqShIpKLiAqkVKkIISbZX2kLxUFm975mZ3ZepNve+OUBdveem9mLIoTRurh882oWoYxW39yP9Rglz8jsxi+QOLH5N04x8vQe8qwh4tTN/3GOkKe/z7PFwmN+YuExZozz49qNgXqe5FGecyw85jXI1IySp2mw8hzg0V4xDvFof5+nh3kmqnHah3HMDAvPGgzPrWqeayvPlequ2WB9XDYe1dmnY8XR3f3M0fFswPCorqVdMDw/0PEYVTwnVpyVap5LLDwNK85fMDyLCk8WHtV9Yc2K80cVTw8dzy0YnnGFJ8U/6eOpW3G2YHgmFZ79SLCuAWMrzu8KDy6ekZVnoBnH0nPKt7zg8egKFkvP6erUdoUna7TA/BOYnqvwZI5Kzx0VHjQ9B+afvld67rj90wLLIOji6VV67qjxVHouU7Cg6bnKP1V4hP1T58snIP/UvbhfgJ+MYfB8llJDNDwP37lnAfAU8E8dMdVJ03MNMddJ03OJlAum6bm2mAwekfxTTWouJ+q5E6nJnKjn5kKLXZvon6ZCq92U6J8Smd0AWc/1ZTaTZD2XiGy2W2T/NBXZbdP13CHYDQegziVZz1nv5C1Dnhu6f7IuHzczATzG45s31NVzCTsgP3u5tP74uWeepZd/csyknoB6fnrOXmleqOo5x0q84MVTkjcvIH8959jJLRTxUHe6cv6J80Y9S3kYHyAePccHiMk/cVV6cPmnmKkSJuHScwkLoJhNz/EAYiwP4wDEWR7GAYi1eq7v/WK85WF1b9jM5WG+gLir53wBsVfP+QHir57zm+wFysN6HrO9RPVczQOQRPVclw6IqufKXsltyXhOGfJ0qTeDparnbojbTanqOYdIKgKoRfdPpQEV8VMfxcrDSIDk8Lje6pAAdcWWx2FqZ6WZcpaHXZf2U19Fq+dK+ynHpBVxjrL6Zenpn5j9VNdTz3EDki8PK+enApSHldEv9QDVc2W2wv0Q1XPFAYUpDysOKFD3ZlFAoarnitoFNv/Eo1/4/BMPoGB4igEKh6cYoKDdm/n/rBm0ezNfv4zCNrfm6ZfQ3Zt5gIJ3b2YDCt/cmu2npuGbW7P0i0b3ZpafUuneTAek09yaDkipuTXNT2l1b6Y1c6h1b7r1iy1YQjW3Npx+Ss4/kQBJ+qfygIYO/xQMj6PYafNNEY+rlfVMtXvTcdScbvfmPDfOKmieTm6eRQQFKHT3ZgcLj2u10u3ebGXmmQXPkwlIo7k1C9BYIY9jO6jbvdnGwpMOSKu5NQ3QRCmP42pdt3uziYXHDUjz9DAXoCvFPA5AuoerxVh4bMOp/TyhGOlwNRuQ/uOW6lh4HhtOhIct1VEOV7MBYTyLqoZxepj9E8PAs1/FBiB5ove7OC8jmPHh6ebsndir3wFXkAz2i2iqAQAAAABJRU5ErkJggg=="},function(t,e,n){var i,r,o,a,u,s,c,l;t.exports=(i=n(0),n(15),n(16),o=(r=i).lib,a=o.Base,u=o.WordArray,s=r.algo,c=s.MD5,l=s.EvpKDF=a.extend({cfg:a.extend({keySize:4,hasher:c,iterations:1}),init:function(t){this.cfg=this.cfg.extend(t)},compute:function(t,e){for(var n=this.cfg,i=n.hasher.create(),r=u.create(),o=r.words,a=n.keySize,s=n.iterations;o.length<a;){c&&i.update(c);var c=i.update(t).finalize(e);i.reset();for(var l=1;l<s;l++)c=i.finalize(c),i.reset();r.concat(c)}return r.sigBytes=4*a,r}}),r.EvpKDF=function(t,e,n){return l.create(n).compute(t,e)},i.EvpKDF)},function(t,e,n){var r;t.exports=(r=n(0),n(13),n(14),n(9),n(17),function(){var t=r,e=t.lib.BlockCipher,n=t.algo,l=[],u=[],h=[],d=[],f=[],p=[],g=[],m=[],y=[],v=[];!function(){for(var t=[],e=0;e<256;e++)t[e]=e<128?e<<1:e<<1^283;var n=0,i=0;for(e=0;e<256;e++){var r=i^i<<1^i<<2^i<<3^i<<4;r=r>>>8^255&r^99,l[n]=r;var o=t[u[r]=n],a=t[o],s=t[a],c=257*t[r]^16843008*r;h[n]=c<<24|c>>>8,d[n]=c<<16|c>>>16,f[n]=c<<8|c>>>24,p[n]=c,c=16843009*s^65537*a^257*o^16843008*n,g[r]=c<<24|c>>>8,m[r]=c<<16|c>>>16,y[r]=c<<8|c>>>24,v[r]=c,n?(n=o^t[t[t[s^o]]],i^=t[t[i]]):n=i=1}}();var b=[0,1,2,4,8,16,32,64,128,27,54],i=n.AES=e.extend({_doReset:function(){if(!this._nRounds||this._keyPriorReset!==this._key){for(var t=this._keyPriorReset=this._key,e=t.words,n=t.sigBytes/4,i=4*((this._nRounds=n+6)+1),r=this._keySchedule=[],o=0;o<i;o++)if(o<n)r[o]=e[o];else{var a=r[o-1];o%n?6<n&&o%n==4&&(a=l[a>>>24]<<24|l[a>>>16&255]<<16|l[a>>>8&255]<<8|l[255&a]):(a=l[(a=a<<8|a>>>24)>>>24]<<24|l[a>>>16&255]<<16|l[a>>>8&255]<<8|l[255&a],a^=b[o/n|0]<<24),r[o]=r[o-n]^a}for(var s=this._invKeySchedule=[],c=0;c<i;c++)o=i-c,a=c%4?r[o]:r[o-4],s[c]=c<4||o<=4?a:g[l[a>>>24]]^m[l[a>>>16&255]]^y[l[a>>>8&255]]^v[l[255&a]]}},encryptBlock:function(t,e){this._doCryptBlock(t,e,this._keySchedule,h,d,f,p,l)},decryptBlock:function(t,e){var n=t[e+1];t[e+1]=t[e+3],t[e+3]=n,this._doCryptBlock(t,e,this._invKeySchedule,g,m,y,v,u),n=t[e+1],t[e+1]=t[e+3],t[e+3]=n},_doCryptBlock:function(t,e,n,i,r,o,a,s){for(var c=this._nRounds,l=t[e]^n[0],u=t[e+1]^n[1],h=t[e+2]^n[2],d=t[e+3]^n[3],f=4,p=1;p<c;p++){var g=i[l>>>24]^r[u>>>16&255]^o[h>>>8&255]^a[255&d]^n[f++],m=i[u>>>24]^r[h>>>16&255]^o[d>>>8&255]^a[255&l]^n[f++],y=i[h>>>24]^r[d>>>16&255]^o[l>>>8&255]^a[255&u]^n[f++],v=i[d>>>24]^r[l>>>16&255]^o[u>>>8&255]^a[255&h]^n[f++];l=g,u=m,h=y,d=v}g=(s[l>>>24]<<24|s[u>>>16&255]<<16|s[h>>>8&255]<<8|s[255&d])^n[f++],m=(s[u>>>24]<<24|s[h>>>16&255]<<16|s[d>>>8&255]<<8|s[255&l])^n[f++],y=(s[h>>>24]<<24|s[d>>>16&255]<<16|s[l>>>8&255]<<8|s[255&u])^n[f++],v=(s[d>>>24]<<24|s[l>>>16&255]<<16|s[u>>>8&255]<<8|s[255&h])^n[f++],t[e]=g,t[e+1]=m,t[e+2]=y,t[e+3]=v},keySize:8});t.AES=e._createHelper(i)}(),r.AES)},function(t,e,n){!function(t){"use strict";var e="0123456789abcdefghijklmnopqrstuvwxyz";function c(t){return e.charAt(t)}function n(t,e){return t&e}function l(t,e){return t|e}function i(t,e){return t^e}function r(t,e){return t&~e}function o(t){if(0==t)return-1;var e=0;return 0==(65535&t)&&(t>>=16,e+=16),0==(255&t)&&(t>>=8,e+=8),0==(15&t)&&(t>>=4,e+=4),0==(3&t)&&(t>>=2,e+=2),0==(1&t)&&++e,e}function a(t){for(var e=0;0!=t;)t&=t-1,++e;return e}var s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function u(t){var e,n,i="";for(e=0;e+3<=t.length;e+=3)n=parseInt(t.substring(e,e+3),16),i+=s.charAt(n>>6)+s.charAt(63&n);for(e+1==t.length?(n=parseInt(t.substring(e,e+1),16),i+=s.charAt(n<<2)):e+2==t.length&&(n=parseInt(t.substring(e,e+2),16),i+=s.charAt(n>>2)+s.charAt((3&n)<<4));0<(3&i.length);)i+="=";return i}function h(t){var e,n="",i=0,r=0;for(e=0;e<t.length&&"="!=t.charAt(e);++e){var o=s.indexOf(t.charAt(e));o<0||(i=0==i?(n+=c(o>>2),r=3&o,1):1==i?(n+=c(r<<2|o>>4),r=15&o,2):2==i?(n+=c(r),n+=c(o>>2),r=3&o,3):(n+=c(r<<2|o>>4),n+=c(15&o),0))}return 1==i&&(n+=c(r<<2)),n}var d,f,p=function(t,e){return(p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},g={decode:function(t){var e;if(void 0===d){var n="0123456789ABCDEF",i=" \f\n\r\t \u2028\u2029";for(d={},e=0;e<16;++e)d[n.charAt(e)]=e;for(n=n.toLowerCase(),e=10;e<16;++e)d[n.charAt(e)]=e;for(e=0;e<i.length;++e)d[i.charAt(e)]=-1}var r=[],o=0,a=0;for(e=0;e<t.length;++e){var s=t.charAt(e);if("="==s)break;if(-1!=(s=d[s])){if(void 0===s)throw new Error("Illegal character at offset "+e);o|=s,2<=++a?(r[r.length]=o,a=o=0):o<<=4}}if(a)throw new Error("Hex encoding incomplete: 4 bits missing");return r}},m={decode:function(t){var e;if(void 0===f){var n="= \f\n\r\t \u2028\u2029";for(f=Object.create(null),e=0;e<64;++e)f["ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e)]=e;for(e=0;e<n.length;++e)f[n.charAt(e)]=-1}var i=[],r=0,o=0;for(e=0;e<t.length;++e){var a=t.charAt(e);if("="==a)break;if(-1!=(a=f[a])){if(void 0===a)throw new Error("Illegal character at offset "+e);r|=a,4<=++o?(i[i.length]=r>>16,i[i.length]=r>>8&255,i[i.length]=255&r,o=r=0):r<<=6}}switch(o){case 1:throw new Error("Base64 encoding incomplete: at least 2 bits missing");case 2:i[i.length]=r>>10;break;case 3:i[i.length]=r>>16,i[i.length]=r>>8&255}return i},re:/-----BEGIN [^-]+-----([A-Za-z0-9+\/=\s]+)-----END [^-]+-----|begin-base64[^\n]+\n([A-Za-z0-9+\/=\s]+)====/,unarmor:function(t){var e=m.re.exec(t);if(e)if(e[1])t=e[1];else{if(!e[2])throw new Error("RegExp out of sync");t=e[2]}return m.decode(t)}},y=1e13,v=function(){function t(t){this.buf=[+t||0]}return t.prototype.mulAdd=function(t,e){var n,i,r=this.buf,o=r.length;for(n=0;n<o;++n)(i=r[n]*t+e)<y?e=0:i-=(e=0|i/y)*y,r[n]=i;0<e&&(r[n]=e)},t.prototype.sub=function(t){var e,n,i=this.buf,r=i.length;for(e=0;e<r;++e)n=i[e]-t,t=n<0?(n+=y,1):0,i[e]=n;for(;0===i[i.length-1];)i.pop()},t.prototype.toString=function(t){if(10!=(t||10))throw new Error("only base 10 is supported");for(var e=this.buf,n=e[e.length-1].toString(),i=e.length-2;0<=i;--i)n+=(y+e[i]).toString().substring(1);return n},t.prototype.valueOf=function(){for(var t=this.buf,e=0,n=t.length-1;0<=n;--n)e=e*y+t[n];return e},t.prototype.simplify=function(){var t=this.buf;return 1==t.length?t[0]:this},t}(),b="…",w=/^(\d\d)(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])([01]\d|2[0-3])(?:([0-5]\d)(?:([0-5]\d)(?:[.,](\d{1,3}))?)?)?(Z|[-+](?:[0]\d|1[0-2])([0-5]\d)?)?$/,T=/^(\d\d\d\d)(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])([01]\d|2[0-3])(?:([0-5]\d)(?:([0-5]\d)(?:[.,](\d{1,3}))?)?)?(Z|[-+](?:[0]\d|1[0-2])([0-5]\d)?)?$/;function A(t,e){return t.length>e&&(t=t.substring(0,e)+b),t}var E,x=function(){function n(t,e){this.hexDigits="0123456789ABCDEF",this.pos=t instanceof n?(this.enc=t.enc,t.pos):(this.enc=t,e)}return n.prototype.get=function(t){if(void 0===t&&(t=this.pos++),t>=this.enc.length)throw new Error("Requesting byte offset "+t+" on a stream of length "+this.enc.length);return"string"==typeof this.enc?this.enc.charCodeAt(t):this.enc[t]},n.prototype.hexByte=function(t){return this.hexDigits.charAt(t>>4&15)+this.hexDigits.charAt(15&t)},n.prototype.hexDump=function(t,e,n){for(var i="",r=t;r<e;++r)if(i+=this.hexByte(this.get(r)),!0!==n)switch(15&r){case 7:i+="  ";break;case 15:i+="\n";break;default:i+=" "}return i},n.prototype.isASCII=function(t,e){for(var n=t;n<e;++n){var i=this.get(n);if(i<32||176<i)return!1}return!0},n.prototype.parseStringISO=function(t,e){for(var n="",i=t;i<e;++i)n+=String.fromCharCode(this.get(i));return n},n.prototype.parseStringUTF=function(t,e){for(var n="",i=t;i<e;){var r=this.get(i++);n+=r<128?String.fromCharCode(r):191<r&&r<224?String.fromCharCode((31&r)<<6|63&this.get(i++)):String.fromCharCode((15&r)<<12|(63&this.get(i++))<<6|63&this.get(i++))}return n},n.prototype.parseStringBMP=function(t,e){for(var n,i,r="",o=t;o<e;)n=this.get(o++),i=this.get(o++),r+=String.fromCharCode(n<<8|i);return r},n.prototype.parseTime=function(t,e,n){var i=this.parseStringISO(t,e),r=(n?w:T).exec(i);return r?(n&&(r[1]=+r[1],r[1]+=+r[1]<70?2e3:1900),i=r[1]+"-"+r[2]+"-"+r[3]+" "+r[4],r[5]&&(i+=":"+r[5],r[6]&&(i+=":"+r[6],r[7]&&(i+="."+r[7]))),r[8]&&(i+=" UTC","Z"!=r[8]&&(i+=r[8],r[9]&&(i+=":"+r[9]))),i):"Unrecognized time: "+i},n.prototype.parseInteger=function(t,e){for(var n,i=this.get(t),r=127<i,o=r?255:0,a="";i==o&&++t<e;)i=this.get(t);if(0==(n=e-t))return r?-1:0;if(4<n){for(a=i,n<<=3;0==(128&(+a^o));)a=+a<<1,--n;a="("+n+" bit)\n"}r&&(i-=256);for(var s=new v(i),c=t+1;c<e;++c)s.mulAdd(256,this.get(c));return a+s.toString()},n.prototype.parseBitString=function(t,e,n){for(var i=this.get(t),r=(e-t-1<<3)-i,o="("+r+" bit)\n",a="",s=t+1;s<e;++s){for(var c=this.get(s),l=s==e-1?i:0,u=7;l<=u;--u)a+=c>>u&1?"1":"0";if(a.length>n)return o+A(a,n)}return o+a},n.prototype.parseOctetString=function(t,e,n){if(this.isASCII(t,e))return A(this.parseStringISO(t,e),n);var i=e-t,r="("+i+" byte)\n";(n/=2)<i&&(e=t+n);for(var o=t;o<e;++o)r+=this.hexByte(this.get(o));return n<i&&(r+=b),r},n.prototype.parseOID=function(t,e,n){for(var i="",r=new v,o=0,a=t;a<e;++a){var s=this.get(a);if(r.mulAdd(128,127&s),o+=7,!(128&s)){if(""===i)if((r=r.simplify())instanceof v)r.sub(80),i="2."+r.toString();else{var c=r<80?r<40?0:1:2;i=c+"."+(r-40*c)}else i+="."+r.toString();if(i.length>n)return A(i,n);r=new v,o=0}}return 0<o&&(i+=".incomplete"),i},n}(),S=function(){function u(t,e,n,i,r){if(!(i instanceof O))throw new Error("Invalid tag value.");this.stream=t,this.header=e,this.length=n,this.tag=i,this.sub=r}return u.prototype.typeName=function(){switch(this.tag.tagClass){case 0:switch(this.tag.tagNumber){case 0:return"EOC";case 1:return"BOOLEAN";case 2:return"INTEGER";case 3:return"BIT_STRING";case 4:return"OCTET_STRING";case 5:return"NULL";case 6:return"OBJECT_IDENTIFIER";case 7:return"ObjectDescriptor";case 8:return"EXTERNAL";case 9:return"REAL";case 10:return"ENUMERATED";case 11:return"EMBEDDED_PDV";case 12:return"UTF8String";case 16:return"SEQUENCE";case 17:return"SET";case 18:return"NumericString";case 19:return"PrintableString";case 20:return"TeletexString";case 21:return"VideotexString";case 22:return"IA5String";case 23:return"UTCTime";case 24:return"GeneralizedTime";case 25:return"GraphicString";case 26:return"VisibleString";case 27:return"GeneralString";case 28:return"UniversalString";case 30:return"BMPString"}return"Universal_"+this.tag.tagNumber.toString();case 1:return"Application_"+this.tag.tagNumber.toString();case 2:return"["+this.tag.tagNumber.toString()+"]";case 3:return"Private_"+this.tag.tagNumber.toString()}},u.prototype.content=function(t){if(void 0===this.tag)return null;void 0===t&&(t=1/0);var e=this.posContent(),n=Math.abs(this.length);if(!this.tag.isUniversal())return null!==this.sub?"("+this.sub.length+" elem)":this.stream.parseOctetString(e,e+n,t);switch(this.tag.tagNumber){case 1:return 0===this.stream.get(e)?"false":"true";case 2:return this.stream.parseInteger(e,e+n);case 3:return this.sub?"("+this.sub.length+" elem)":this.stream.parseBitString(e,e+n,t);case 4:return this.sub?"("+this.sub.length+" elem)":this.stream.parseOctetString(e,e+n,t);case 6:return this.stream.parseOID(e,e+n,t);case 16:case 17:return null!==this.sub?"("+this.sub.length+" elem)":"(no elem)";case 12:return A(this.stream.parseStringUTF(e,e+n),t);case 18:case 19:case 20:case 21:case 22:case 26:return A(this.stream.parseStringISO(e,e+n),t);case 30:return A(this.stream.parseStringBMP(e,e+n),t);case 23:case 24:return this.stream.parseTime(e,e+n,23==this.tag.tagNumber)}return null},u.prototype.toString=function(){return this.typeName()+"@"+this.stream.pos+"[header:"+this.header+",length:"+this.length+",sub:"+(null===this.sub?"null":this.sub.length)+"]"},u.prototype.toPrettyString=function(t){void 0===t&&(t="");var e=t+this.typeName()+" @"+this.stream.pos;if(0<=this.length&&(e+="+"),e+=this.length,this.tag.tagConstructed?e+=" (constructed)":!this.tag.isUniversal()||3!=this.tag.tagNumber&&4!=this.tag.tagNumber||null===this.sub||(e+=" (encapsulates)"),e+="\n",null!==this.sub){t+="  ";for(var n=0,i=this.sub.length;n<i;++n)e+=this.sub[n].toPrettyString(t)}return e},u.prototype.posStart=function(){return this.stream.pos},u.prototype.posContent=function(){return this.stream.pos+this.header},u.prototype.posEnd=function(){return this.stream.pos+this.header+Math.abs(this.length)},u.prototype.toHexString=function(){return this.stream.hexDump(this.posStart(),this.posEnd(),!0)},u.decodeLength=function(t){var e=t.get(),n=127&e;if(n==e)return n;if(6<n)throw new Error("Length over 48 bits not supported at position "+(t.pos-1));if(0===n)return null;for(var i=e=0;i<n;++i)e=256*e+t.get();return e},u.prototype.getHexStringValue=function(){var t=this.toHexString(),e=2*this.header,n=2*this.length;return t.substr(e,n)},u.decode=function(t){var i;i=t instanceof x?t:new x(t,0);var e=new x(i),n=new O(i),r=u.decodeLength(i),o=i.pos,a=o-e.pos,s=null,c=function(){var t=[];if(null!==r){for(var e=o+r;i.pos<e;)t[t.length]=u.decode(i);if(i.pos!=e)throw new Error("Content size is not correct for container starting at offset "+o)}else try{for(;;){var n=u.decode(i);if(n.tag.isEOC())break;t[t.length]=n}r=o-i.pos}catch(t){throw new Error("Exception while decoding undefined length content: "+t)}return t};if(n.tagConstructed)s=c();else if(n.isUniversal()&&(3==n.tagNumber||4==n.tagNumber))try{if(3==n.tagNumber&&0!=i.get())throw new Error("BIT STRINGs with unused bits cannot encapsulate.");s=c();for(var l=0;l<s.length;++l)if(s[l].tag.isEOC())throw new Error("EOC is not supposed to be actual content.")}catch(t){s=null}if(null===s){if(null===r)throw new Error("We can't skip over an invalid tag with undefined length at offset "+o);i.pos=o+Math.abs(r)}return new u(e,a,r,n,s)},u}(),O=function(){function t(t){var e=t.get();if(this.tagClass=e>>6,this.tagConstructed=0!=(32&e),this.tagNumber=31&e,31==this.tagNumber){for(var n=new v;e=t.get(),n.mulAdd(128,127&e),128&e;);this.tagNumber=n.simplify()}}return t.prototype.isUniversal=function(){return 0===this.tagClass},t.prototype.isEOC=function(){return 0===this.tagClass&&0===this.tagNumber},t}(),C=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997],B=(1<<26)/C[C.length-1],D=function(){function b(t,e,n){null!=t&&("number"==typeof t?this.fromNumber(t,e,n):null==e&&"string"!=typeof t?this.fromString(t,256):this.fromString(t,e))}return b.prototype.toString=function(t){if(this.s<0)return"-"+this.negate().toString(t);var e;if(16==t)e=4;else if(8==t)e=3;else if(2==t)e=1;else if(32==t)e=5;else{if(4!=t)return this.toRadix(t);e=2}var n,i=(1<<e)-1,r=!1,o="",a=this.t,s=this.DB-a*this.DB%e;if(0<a--)for(s<this.DB&&0<(n=this[a]>>s)&&(r=!0,o=c(n));0<=a;)s<e?(n=(this[a]&(1<<s)-1)<<e-s,n|=this[--a]>>(s+=this.DB-e)):(n=this[a]>>(s-=e)&i,s<=0&&(s+=this.DB,--a)),0<n&&(r=!0),r&&(o+=c(n));return r?o:"0"},b.prototype.negate=function(){var t=P();return b.ZERO.subTo(this,t),t},b.prototype.abs=function(){return this.s<0?this.negate():this},b.prototype.compareTo=function(t){var e=this.s-t.s;if(0!=e)return e;var n=this.t;if(0!=(e=n-t.t))return this.s<0?-e:e;for(;0<=--n;)if(0!=(e=this[n]-t[n]))return e;return 0},b.prototype.bitLength=function(){return this.t<=0?0:this.DB*(this.t-1)+_(this[this.t-1]^this.s&this.DM)},b.prototype.mod=function(t){var e=P();return this.abs().divRemTo(t,null,e),this.s<0&&0<e.compareTo(b.ZERO)&&t.subTo(e,e),e},b.prototype.modPowInt=function(t,e){var n;return n=t<256||e.isEven()?new R(e):new I(e),this.exp(t,n)},b.prototype.clone=function(){var t=P();return this.copyTo(t),t},b.prototype.intValue=function(){if(this.s<0){if(1==this.t)return this[0]-this.DV;if(0==this.t)return-1}else{if(1==this.t)return this[0];if(0==this.t)return 0}return(this[1]&(1<<32-this.DB)-1)<<this.DB|this[0]},b.prototype.byteValue=function(){return 0==this.t?this.s:this[0]<<24>>24},b.prototype.shortValue=function(){return 0==this.t?this.s:this[0]<<16>>16},b.prototype.signum=function(){return this.s<0?-1:this.t<=0||1==this.t&&this[0]<=0?0:1},b.prototype.toByteArray=function(){var t=this.t,e=[];e[0]=this.s;var n,i=this.DB-t*this.DB%8,r=0;if(0<t--)for(i<this.DB&&(n=this[t]>>i)!=(this.s&this.DM)>>i&&(e[r++]=n|this.s<<this.DB-i);0<=t;)i<8?(n=(this[t]&(1<<i)-1)<<8-i,n|=this[--t]>>(i+=this.DB-8)):(n=this[t]>>(i-=8)&255,i<=0&&(i+=this.DB,--t)),0!=(128&n)&&(n|=-256),0==r&&(128&this.s)!=(128&n)&&++r,(0<r||n!=this.s)&&(e[r++]=n);return e},b.prototype.equals=function(t){return 0==this.compareTo(t)},b.prototype.min=function(t){return this.compareTo(t)<0?this:t},b.prototype.max=function(t){return 0<this.compareTo(t)?this:t},b.prototype.and=function(t){var e=P();return this.bitwiseTo(t,n,e),e},b.prototype.or=function(t){var e=P();return this.bitwiseTo(t,l,e),e},b.prototype.xor=function(t){var e=P();return this.bitwiseTo(t,i,e),e},b.prototype.andNot=function(t){var e=P();return this.bitwiseTo(t,r,e),e},b.prototype.not=function(){for(var t=P(),e=0;e<this.t;++e)t[e]=this.DM&~this[e];return t.t=this.t,t.s=~this.s,t},b.prototype.shiftLeft=function(t){var e=P();return t<0?this.rShiftTo(-t,e):this.lShiftTo(t,e),e},b.prototype.shiftRight=function(t){var e=P();return t<0?this.lShiftTo(-t,e):this.rShiftTo(t,e),e},b.prototype.getLowestSetBit=function(){for(var t=0;t<this.t;++t)if(0!=this[t])return t*this.DB+o(this[t]);return this.s<0?this.t*this.DB:-1},b.prototype.bitCount=function(){for(var t=0,e=this.s&this.DM,n=0;n<this.t;++n)t+=a(this[n]^e);return t},b.prototype.testBit=function(t){var e=Math.floor(t/this.DB);return e>=this.t?0!=this.s:0!=(this[e]&1<<t%this.DB)},b.prototype.setBit=function(t){return this.changeBit(t,l)},b.prototype.clearBit=function(t){return this.changeBit(t,r)},b.prototype.flipBit=function(t){return this.changeBit(t,i)},b.prototype.add=function(t){var e=P();return this.addTo(t,e),e},b.prototype.subtract=function(t){var e=P();return this.subTo(t,e),e},b.prototype.multiply=function(t){var e=P();return this.multiplyTo(t,e),e},b.prototype.divide=function(t){var e=P();return this.divRemTo(t,e,null),e},b.prototype.remainder=function(t){var e=P();return this.divRemTo(t,null,e),e},b.prototype.divideAndRemainder=function(t){var e=P(),n=P();return this.divRemTo(t,e,n),[e,n]},b.prototype.modPow=function(t,e){var n,i,r=t.bitLength(),o=F(1);if(r<=0)return o;n=r<18?1:r<48?3:r<144?4:r<768?5:6,i=r<8?new R(e):e.isEven()?new N(e):new I(e);var a=[],s=3,c=n-1,l=(1<<n)-1;if(a[1]=i.convert(this),1<n){var u=P();for(i.sqrTo(a[1],u);s<=l;)a[s]=P(),i.mulTo(u,a[s-2],a[s]),s+=2}var h,d,f=t.t-1,p=!0,g=P();for(r=_(t[f])-1;0<=f;){for(c<=r?h=t[f]>>r-c&l:(h=(t[f]&(1<<r+1)-1)<<c-r,0<f&&(h|=t[f-1]>>this.DB+r-c)),s=n;0==(1&h);)h>>=1,--s;if((r-=s)<0&&(r+=this.DB,--f),p)a[h].copyTo(o),p=!1;else{for(;1<s;)i.sqrTo(o,g),i.sqrTo(g,o),s-=2;0<s?i.sqrTo(o,g):(d=o,o=g,g=d),i.mulTo(g,a[h],o)}for(;0<=f&&0==(t[f]&1<<r);)i.sqrTo(o,g),d=o,o=g,g=d,--r<0&&(r=this.DB-1,--f)}return i.revert(o)},b.prototype.modInverse=function(t){var e=t.isEven();if(this.isEven()&&e||0==t.signum())return b.ZERO;for(var n=t.clone(),i=this.clone(),r=F(1),o=F(0),a=F(0),s=F(1);0!=n.signum();){for(;n.isEven();)n.rShiftTo(1,n),e?(r.isEven()&&o.isEven()||(r.addTo(this,r),o.subTo(t,o)),r.rShiftTo(1,r)):o.isEven()||o.subTo(t,o),o.rShiftTo(1,o);for(;i.isEven();)i.rShiftTo(1,i),e?(a.isEven()&&s.isEven()||(a.addTo(this,a),s.subTo(t,s)),a.rShiftTo(1,a)):s.isEven()||s.subTo(t,s),s.rShiftTo(1,s);0<=n.compareTo(i)?(n.subTo(i,n),e&&r.subTo(a,r),o.subTo(s,o)):(i.subTo(n,i),e&&a.subTo(r,a),s.subTo(o,s))}return 0!=i.compareTo(b.ONE)?b.ZERO:0<=s.compareTo(t)?s.subtract(t):s.signum()<0?(s.addTo(t,s),s.signum()<0?s.add(t):s):s},b.prototype.pow=function(t){return this.exp(t,new k)},b.prototype.gcd=function(t){var e=this.s<0?this.negate():this.clone(),n=t.s<0?t.negate():t.clone();if(e.compareTo(n)<0){var i=e;e=n,n=i}var r=e.getLowestSetBit(),o=n.getLowestSetBit();if(o<0)return e;for(r<o&&(o=r),0<o&&(e.rShiftTo(o,e),n.rShiftTo(o,n));0<e.signum();)0<(r=e.getLowestSetBit())&&e.rShiftTo(r,e),0<(r=n.getLowestSetBit())&&n.rShiftTo(r,n),0<=e.compareTo(n)?(e.subTo(n,e),e.rShiftTo(1,e)):(n.subTo(e,n),n.rShiftTo(1,n));return 0<o&&n.lShiftTo(o,n),n},b.prototype.isProbablePrime=function(t){var e,n=this.abs();if(1==n.t&&n[0]<=C[C.length-1]){for(e=0;e<C.length;++e)if(n[0]==C[e])return!0;return!1}if(n.isEven())return!1;for(e=1;e<C.length;){for(var i=C[e],r=e+1;r<C.length&&i<B;)i*=C[r++];for(i=n.modInt(i);e<r;)if(i%C[e++]==0)return!1}return n.millerRabin(t)},b.prototype.copyTo=function(t){for(var e=this.t-1;0<=e;--e)t[e]=this[e];t.t=this.t,t.s=this.s},b.prototype.fromInt=function(t){this.t=1,this.s=t<0?-1:0,0<t?this[0]=t:t<-1?this[0]=t+this.DV:this.t=0},b.prototype.fromString=function(t,e){var n;if(16==e)n=4;else if(8==e)n=3;else if(256==e)n=8;else if(2==e)n=1;else if(32==e)n=5;else{if(4!=e)return void this.fromRadix(t,e);n=2}this.t=0,this.s=0;for(var i=t.length,r=!1,o=0;0<=--i;){var a=8==n?255&+t[i]:U(t,i);a<0?"-"==t.charAt(i)&&(r=!0):(r=!1,0==o?this[this.t++]=a:o+n>this.DB?(this[this.t-1]|=(a&(1<<this.DB-o)-1)<<o,this[this.t++]=a>>this.DB-o):this[this.t-1]|=a<<o,(o+=n)>=this.DB&&(o-=this.DB))}8==n&&0!=(128&+t[0])&&(this.s=-1,0<o&&(this[this.t-1]|=(1<<this.DB-o)-1<<o)),this.clamp(),r&&b.ZERO.subTo(this,this)},b.prototype.clamp=function(){for(var t=this.s&this.DM;0<this.t&&this[this.t-1]==t;)--this.t},b.prototype.dlShiftTo=function(t,e){var n;for(n=this.t-1;0<=n;--n)e[n+t]=this[n];for(n=t-1;0<=n;--n)e[n]=0;e.t=this.t+t,e.s=this.s},b.prototype.drShiftTo=function(t,e){for(var n=t;n<this.t;++n)e[n-t]=this[n];e.t=Math.max(this.t-t,0),e.s=this.s},b.prototype.lShiftTo=function(t,e){for(var n=t%this.DB,i=this.DB-n,r=(1<<i)-1,o=Math.floor(t/this.DB),a=this.s<<n&this.DM,s=this.t-1;0<=s;--s)e[s+o+1]=this[s]>>i|a,a=(this[s]&r)<<n;for(var s=o-1;0<=s;--s)e[s]=0;e[o]=a,e.t=this.t+o+1,e.s=this.s,e.clamp()},b.prototype.rShiftTo=function(t,e){e.s=this.s;var n=Math.floor(t/this.DB);if(n>=this.t)e.t=0;else{var i=t%this.DB,r=this.DB-i,o=(1<<i)-1;e[0]=this[n]>>i;for(var a=n+1;a<this.t;++a)e[a-n-1]|=(this[a]&o)<<r,e[a-n]=this[a]>>i;0<i&&(e[this.t-n-1]|=(this.s&o)<<r),e.t=this.t-n,e.clamp()}},b.prototype.subTo=function(t,e){for(var n=0,i=0,r=Math.min(t.t,this.t);n<r;)i+=this[n]-t[n],e[n++]=i&this.DM,i>>=this.DB;if(t.t<this.t){for(i-=t.s;n<this.t;)i+=this[n],e[n++]=i&this.DM,i>>=this.DB;i+=this.s}else{for(i+=this.s;n<t.t;)i-=t[n],e[n++]=i&this.DM,i>>=this.DB;i-=t.s}e.s=i<0?-1:0,i<-1?e[n++]=this.DV+i:0<i&&(e[n++]=i),e.t=n,e.clamp()},b.prototype.multiplyTo=function(t,e){var n=this.abs(),i=t.abs(),r=n.t;for(e.t=r+i.t;0<=--r;)e[r]=0;for(r=0;r<i.t;++r)e[r+n.t]=n.am(0,i[r],e,r,0,n.t);e.s=0,e.clamp(),this.s!=t.s&&b.ZERO.subTo(e,e)},b.prototype.squareTo=function(t){for(var e=this.abs(),n=t.t=2*e.t;0<=--n;)t[n]=0;for(n=0;n<e.t-1;++n){var i=e.am(n,e[n],t,2*n,0,1);(t[n+e.t]+=e.am(n+1,2*e[n],t,2*n+1,i,e.t-n-1))>=e.DV&&(t[n+e.t]-=e.DV,t[n+e.t+1]=1)}0<t.t&&(t[t.t-1]+=e.am(n,e[n],t,2*n,0,1)),t.s=0,t.clamp()},b.prototype.divRemTo=function(t,e,n){var i=t.abs();if(!(i.t<=0)){var r=this.abs();if(r.t<i.t)return null!=e&&e.fromInt(0),void(null!=n&&this.copyTo(n));null==n&&(n=P());var o=P(),a=this.s,s=t.s,c=this.DB-_(i[i.t-1]);0<c?(i.lShiftTo(c,o),r.lShiftTo(c,n)):(i.copyTo(o),r.copyTo(n));var l=o.t,u=o[l-1];if(0!=u){var h=u*(1<<this.F1)+(1<l?o[l-2]>>this.F2:0),d=this.FV/h,f=(1<<this.F1)/h,p=1<<this.F2,g=n.t,m=g-l,y=null==e?P():e;for(o.dlShiftTo(m,y),0<=n.compareTo(y)&&(n[n.t++]=1,n.subTo(y,n)),b.ONE.dlShiftTo(l,y),y.subTo(o,o);o.t<l;)o[o.t++]=0;for(;0<=--m;){var v=n[--g]==u?this.DM:Math.floor(n[g]*d+(n[g-1]+p)*f);if((n[g]+=o.am(0,v,n,m,0,l))<v)for(o.dlShiftTo(m,y),n.subTo(y,n);n[g]<--v;)n.subTo(y,n)}null!=e&&(n.drShiftTo(l,e),a!=s&&b.ZERO.subTo(e,e)),n.t=l,n.clamp(),0<c&&n.rShiftTo(c,n),a<0&&b.ZERO.subTo(n,n)}}},b.prototype.invDigit=function(){if(this.t<1)return 0;var t=this[0];if(0==(1&t))return 0;var e=3&t;return 0<(e=(e=(e=(e=e*(2-(15&t)*e)&15)*(2-(255&t)*e)&255)*(2-((65535&t)*e&65535))&65535)*(2-t*e%this.DV)%this.DV)?this.DV-e:-e},b.prototype.isEven=function(){return 0==(0<this.t?1&this[0]:this.s)},b.prototype.exp=function(t,e){if(4294967295<t||t<1)return b.ONE;var n=P(),i=P(),r=e.convert(this),o=_(t)-1;for(r.copyTo(n);0<=--o;)if(e.sqrTo(n,i),0<(t&1<<o))e.mulTo(i,r,n);else{var a=n;n=i,i=a}return e.revert(n)},b.prototype.chunkSize=function(t){return Math.floor(Math.LN2*this.DB/Math.log(t))},b.prototype.toRadix=function(t){if(null==t&&(t=10),0==this.signum()||t<2||36<t)return"0";var e=this.chunkSize(t),n=Math.pow(t,e),i=F(n),r=P(),o=P(),a="";for(this.divRemTo(i,r,o);0<r.signum();)a=(n+o.intValue()).toString(t).substr(1)+a,r.divRemTo(i,r,o);return o.intValue().toString(t)+a},b.prototype.fromRadix=function(t,e){this.fromInt(0),null==e&&(e=10);for(var n=this.chunkSize(e),i=Math.pow(e,n),r=!1,o=0,a=0,s=0;s<t.length;++s){var c=U(t,s);c<0?"-"==t.charAt(s)&&0==this.signum()&&(r=!0):(a=e*a+c,++o>=n&&(this.dMultiply(i),this.dAddOffset(a,0),a=o=0))}0<o&&(this.dMultiply(Math.pow(e,o)),this.dAddOffset(a,0)),r&&b.ZERO.subTo(this,this)},b.prototype.fromNumber=function(t,e,n){if("number"==typeof e)if(t<2)this.fromInt(1);else for(this.fromNumber(t,n),this.testBit(t-1)||this.bitwiseTo(b.ONE.shiftLeft(t-1),l,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(e);)this.dAddOffset(2,0),this.bitLength()>t&&this.subTo(b.ONE.shiftLeft(t-1),this);else{var i=[],r=7&t;i.length=1+(t>>3),e.nextBytes(i),0<r?i[0]&=(1<<r)-1:i[0]=0,this.fromString(i,256)}},b.prototype.bitwiseTo=function(t,e,n){var i,r,o=Math.min(t.t,this.t);for(i=0;i<o;++i)n[i]=e(this[i],t[i]);if(t.t<this.t){for(r=t.s&this.DM,i=o;i<this.t;++i)n[i]=e(this[i],r);n.t=this.t}else{for(r=this.s&this.DM,i=o;i<t.t;++i)n[i]=e(r,t[i]);n.t=t.t}n.s=e(this.s,t.s),n.clamp()},b.prototype.changeBit=function(t,e){var n=b.ONE.shiftLeft(t);return this.bitwiseTo(n,e,n),n},b.prototype.addTo=function(t,e){for(var n=0,i=0,r=Math.min(t.t,this.t);n<r;)i+=this[n]+t[n],e[n++]=i&this.DM,i>>=this.DB;if(t.t<this.t){for(i+=t.s;n<this.t;)i+=this[n],e[n++]=i&this.DM,i>>=this.DB;i+=this.s}else{for(i+=this.s;n<t.t;)i+=t[n],e[n++]=i&this.DM,i>>=this.DB;i+=t.s}e.s=i<0?-1:0,0<i?e[n++]=i:i<-1&&(e[n++]=this.DV+i),e.t=n,e.clamp()},b.prototype.dMultiply=function(t){this[this.t]=this.am(0,t-1,this,0,0,this.t),++this.t,this.clamp()},b.prototype.dAddOffset=function(t,e){if(0!=t){for(;this.t<=e;)this[this.t++]=0;for(this[e]+=t;this[e]>=this.DV;)this[e]-=this.DV,++e>=this.t&&(this[this.t++]=0),++this[e]}},b.prototype.multiplyLowerTo=function(t,e,n){var i=Math.min(this.t+t.t,e);for(n.s=0,n.t=i;0<i;)n[--i]=0;for(var r=n.t-this.t;i<r;++i)n[i+this.t]=this.am(0,t[i],n,i,0,this.t);for(var r=Math.min(t.t,e);i<r;++i)this.am(0,t[i],n,i,0,e-i);n.clamp()},b.prototype.multiplyUpperTo=function(t,e,n){--e;var i=n.t=this.t+t.t-e;for(n.s=0;0<=--i;)n[i]=0;for(i=Math.max(e-this.t,0);i<t.t;++i)n[this.t+i-e]=this.am(e-i,t[i],n,0,0,this.t+i-e);n.clamp(),n.drShiftTo(1,n)},b.prototype.modInt=function(t){if(t<=0)return 0;var e=this.DV%t,n=this.s<0?t-1:0;if(0<this.t)if(0==e)n=this[0]%t;else for(var i=this.t-1;0<=i;--i)n=(e*n+this[i])%t;return n},b.prototype.millerRabin=function(t){var e=this.subtract(b.ONE),n=e.getLowestSetBit();if(n<=0)return!1;var i=e.shiftRight(n);C.length<(t=t+1>>1)&&(t=C.length);for(var r=P(),o=0;o<t;++o){r.fromInt(C[Math.floor(Math.random()*C.length)]);var a=r.modPow(i,this);if(0!=a.compareTo(b.ONE)&&0!=a.compareTo(e)){for(var s=1;s++<n&&0!=a.compareTo(e);)if(0==(a=a.modPowInt(2,this)).compareTo(b.ONE))return!1;if(0!=a.compareTo(e))return!1}}return!0},b.prototype.square=function(){var t=P();return this.squareTo(t),t},b.prototype.gcda=function(t,e){var n=this.s<0?this.negate():this.clone(),i=t.s<0?t.negate():t.clone();if(n.compareTo(i)<0){var r=n;n=i,i=r}var o=n.getLowestSetBit(),a=i.getLowestSetBit();if(a<0)e(n);else{o<a&&(a=o),0<a&&(n.rShiftTo(a,n),i.rShiftTo(a,i));var s=function(){0<(o=n.getLowestSetBit())&&n.rShiftTo(o,n),0<(o=i.getLowestSetBit())&&i.rShiftTo(o,i),0<=n.compareTo(i)?(n.subTo(i,n),n.rShiftTo(1,n)):(i.subTo(n,i),i.rShiftTo(1,i)),0<n.signum()?setTimeout(s,0):(0<a&&i.lShiftTo(a,i),setTimeout(function(){e(i)},0))};setTimeout(s,10)}},b.prototype.fromNumberAsync=function(t,e,n,i){if("number"==typeof e)if(t<2)this.fromInt(1);else{this.fromNumber(t,n),this.testBit(t-1)||this.bitwiseTo(b.ONE.shiftLeft(t-1),l,this),this.isEven()&&this.dAddOffset(1,0);var r=this,o=function(){r.dAddOffset(2,0),r.bitLength()>t&&r.subTo(b.ONE.shiftLeft(t-1),r),r.isProbablePrime(e)?setTimeout(function(){i()},0):setTimeout(o,0)};setTimeout(o,0)}else{var a=[],s=7&t;a.length=1+(t>>3),e.nextBytes(a),0<s?a[0]&=(1<<s)-1:a[0]=0,this.fromString(a,256)}},b}(),k=function(){function t(){}return t.prototype.convert=function(t){return t},t.prototype.revert=function(t){return t},t.prototype.mulTo=function(t,e,n){t.multiplyTo(e,n)},t.prototype.sqrTo=function(t,e){t.squareTo(e)},t}(),R=function(){function t(t){this.m=t}return t.prototype.convert=function(t){return t.s<0||0<=t.compareTo(this.m)?t.mod(this.m):t},t.prototype.revert=function(t){return t},t.prototype.reduce=function(t){t.divRemTo(this.m,null,t)},t.prototype.mulTo=function(t,e,n){t.multiplyTo(e,n),this.reduce(n)},t.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)},t}(),I=function(){function t(t){this.m=t,this.mp=t.invDigit(),this.mpl=32767&this.mp,this.mph=this.mp>>15,this.um=(1<<t.DB-15)-1,this.mt2=2*t.t}return t.prototype.convert=function(t){var e=P();return t.abs().dlShiftTo(this.m.t,e),e.divRemTo(this.m,null,e),t.s<0&&0<e.compareTo(D.ZERO)&&this.m.subTo(e,e),e},t.prototype.revert=function(t){var e=P();return t.copyTo(e),this.reduce(e),e},t.prototype.reduce=function(t){for(;t.t<=this.mt2;)t[t.t++]=0;for(var e=0;e<this.m.t;++e){var n=32767&t[e],i=n*this.mpl+((n*this.mph+(t[e]>>15)*this.mpl&this.um)<<15)&t.DM;for(n=e+this.m.t,t[n]+=this.m.am(0,i,t,e,0,this.m.t);t[n]>=t.DV;)t[n]-=t.DV,t[++n]++}t.clamp(),t.drShiftTo(this.m.t,t),0<=t.compareTo(this.m)&&t.subTo(this.m,t)},t.prototype.mulTo=function(t,e,n){t.multiplyTo(e,n),this.reduce(n)},t.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)},t}(),N=function(){function t(t){this.m=t,this.r2=P(),this.q3=P(),D.ONE.dlShiftTo(2*t.t,this.r2),this.mu=this.r2.divide(t)}return t.prototype.convert=function(t){if(t.s<0||t.t>2*this.m.t)return t.mod(this.m);if(t.compareTo(this.m)<0)return t;var e=P();return t.copyTo(e),this.reduce(e),e},t.prototype.revert=function(t){return t},t.prototype.reduce=function(t){for(t.drShiftTo(this.m.t-1,this.r2),t.t>this.m.t+1&&(t.t=this.m.t+1,t.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);t.compareTo(this.r2)<0;)t.dAddOffset(1,this.m.t+1);for(t.subTo(this.r2,t);0<=t.compareTo(this.m);)t.subTo(this.m,t)},t.prototype.mulTo=function(t,e,n){t.multiplyTo(e,n),this.reduce(n)},t.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)},t}();function P(){return new D(null)}function M(t,e){return new D(t,e)}E="Microsoft Internet Explorer"==navigator.appName?(D.prototype.am=function(t,e,n,i,r,o){for(var a=32767&e,s=e>>15;0<=--o;){var c=32767&this[t],l=this[t++]>>15,u=s*c+l*a;c=a*c+((32767&u)<<15)+n[i]+(1073741823&r),r=(c>>>30)+(u>>>15)+s*l+(r>>>30),n[i++]=1073741823&c}return r},30):"Netscape"!=navigator.appName?(D.prototype.am=function(t,e,n,i,r,o){for(;0<=--o;){var a=e*this[t++]+n[i]+r;r=Math.floor(a/67108864),n[i++]=67108863&a}return r},26):(D.prototype.am=function(t,e,n,i,r,o){for(var a=16383&e,s=e>>14;0<=--o;){var c=16383&this[t],l=this[t++]>>14,u=s*c+l*a;c=a*c+((16383&u)<<14)+n[i]+r,r=(c>>28)+(u>>14)+s*l,n[i++]=268435455&c}return r},28),D.prototype.DB=E,D.prototype.DM=(1<<E)-1,D.prototype.DV=1<<E,D.prototype.FV=Math.pow(2,52),D.prototype.F1=52-E,D.prototype.F2=2*E-52;var L,V,j=[];for(L="0".charCodeAt(0),V=0;V<=9;++V)j[L++]=V;for(L="a".charCodeAt(0),V=10;V<36;++V)j[L++]=V;for(L="A".charCodeAt(0),V=10;V<36;++V)j[L++]=V;function U(t,e){var n=j[t.charCodeAt(e)];return null==n?-1:n}function F(t){var e=P();return e.fromInt(t),e}function _(t){var e,n=1;return 0!=(e=t>>>16)&&(t=e,n+=16),0!=(e=t>>8)&&(t=e,n+=8),0!=(e=t>>4)&&(t=e,n+=4),0!=(e=t>>2)&&(t=e,n+=2),0!=(e=t>>1)&&(t=e,n+=1),n}D.ZERO=F(0),D.ONE=F(1);var H,X,z=function(){function t(){this.i=0,this.j=0,this.S=[]}return t.prototype.init=function(t){var e,n,i;for(e=0;e<256;++e)this.S[e]=e;for(e=n=0;e<256;++e)n=n+this.S[e]+t[e%t.length]&255,i=this.S[e],this.S[e]=this.S[n],this.S[n]=i;this.i=0,this.j=0},t.prototype.next=function(){var t;return this.i=this.i+1&255,this.j=this.j+this.S[this.i]&255,t=this.S[this.i],this.S[this.i]=this.S[this.j],this.S[this.j]=t,this.S[t+this.S[this.i]&255]},t}(),W=256,q=null;if(null==q){q=[];var G=void(X=0);if(window.crypto&&window.crypto.getRandomValues){var K=new Uint32Array(256);for(window.crypto.getRandomValues(K),G=0;G<K.length;++G)q[X++]=255&K[G]}var J=function(t){if(this.count=this.count||0,256<=this.count||W<=X)window.removeEventListener?window.removeEventListener("mousemove",J,!1):window.detachEvent&&window.detachEvent("onmousemove",J);else try{var e=t.x+t.y;q[X++]=255&e,this.count+=1}catch(t){}};window.addEventListener?window.addEventListener("mousemove",J,!1):window.attachEvent&&window.attachEvent("onmousemove",J)}function Y(){if(null==H){for(H=new z;X<W;){var t=Math.floor(65536*Math.random());q[X++]=255&t}for(H.init(q),X=0;X<q.length;++X)q[X]=0;X=0}return H.next()}var Q=function(){function t(){}return t.prototype.nextBytes=function(t){for(var e=0;e<t.length;++e)t[e]=Y()},t}(),Z=function(){function t(){this.n=null,this.e=0,this.d=null,this.p=null,this.q=null,this.dmp1=null,this.dmq1=null,this.coeff=null}return t.prototype.doPublic=function(t){return t.modPowInt(this.e,this.n)},t.prototype.doPrivate=function(t){if(null==this.p||null==this.q)return t.modPow(this.d,this.n);for(var e=t.mod(this.p).modPow(this.dmp1,this.p),n=t.mod(this.q).modPow(this.dmq1,this.q);e.compareTo(n)<0;)e=e.add(this.p);return e.subtract(n).multiply(this.coeff).mod(this.p).multiply(this.q).add(n)},t.prototype.setPublic=function(t,e){null!=t&&null!=e&&0<t.length&&0<e.length?(this.n=M(t,16),this.e=parseInt(e,16)):console.error("Invalid RSA public key")},t.prototype.encrypt=function(t){var e=function(t,e){if(e<t.length+11)return console.error("Message too long for RSA"),null;for(var n=[],i=t.length-1;0<=i&&0<e;){var r=t.charCodeAt(i--);n[--e]=r<128?r:127<r&&r<2048?(n[--e]=63&r|128,r>>6|192):(n[--e]=63&r|128,n[--e]=r>>6&63|128,r>>12|224)}n[--e]=0;for(var o=new Q,a=[];2<e;){for(a[0]=0;0==a[0];)o.nextBytes(a);n[--e]=a[0]}return n[--e]=2,n[--e]=0,new D(n)}(t,this.n.bitLength()+7>>3);if(null==e)return null;var n=this.doPublic(e);if(null==n)return null;var i=n.toString(16);return 0==(1&i.length)?i:"0"+i},t.prototype.setPrivate=function(t,e,n){null!=t&&null!=e&&0<t.length&&0<e.length?(this.n=M(t,16),this.e=parseInt(e,16),this.d=M(n,16)):console.error("Invalid RSA private key")},t.prototype.setPrivateEx=function(t,e,n,i,r,o,a,s){null!=t&&null!=e&&0<t.length&&0<e.length?(this.n=M(t,16),this.e=parseInt(e,16),this.d=M(n,16),this.p=M(i,16),this.q=M(r,16),this.dmp1=M(o,16),this.dmq1=M(a,16),this.coeff=M(s,16)):console.error("Invalid RSA private key")},t.prototype.generate=function(t,e){var n=new Q,i=t>>1;this.e=parseInt(e,16);for(var r=new D(e,16);;){for(;this.p=new D(t-i,1,n),0!=this.p.subtract(D.ONE).gcd(r).compareTo(D.ONE)||!this.p.isProbablePrime(10););for(;this.q=new D(i,1,n),0!=this.q.subtract(D.ONE).gcd(r).compareTo(D.ONE)||!this.q.isProbablePrime(10););if(this.p.compareTo(this.q)<=0){var o=this.p;this.p=this.q,this.q=o}var a=this.p.subtract(D.ONE),s=this.q.subtract(D.ONE),c=a.multiply(s);if(0==c.gcd(r).compareTo(D.ONE)){this.n=this.p.multiply(this.q),this.d=r.modInverse(c),this.dmp1=this.d.mod(a),this.dmq1=this.d.mod(s),this.coeff=this.q.modInverse(this.p);break}}},t.prototype.decrypt=function(t){var e=M(t,16),n=this.doPrivate(e);return null==n?null:function(t,e){for(var n=t.toByteArray(),i=0;i<n.length&&0==n[i];)++i;if(n.length-i!=e-1||2!=n[i])return null;for(++i;0!=n[i];)if(++i>=n.length)return null;for(var r="";++i<n.length;){var o=255&n[i];o<128?r+=String.fromCharCode(o):191<o&&o<224?(r+=String.fromCharCode((31&o)<<6|63&n[i+1]),++i):(r+=String.fromCharCode((15&o)<<12|(63&n[i+1])<<6|63&n[i+2]),i+=2)}return r}(n,this.n.bitLength()+7>>3)},t.prototype.generateAsync=function(t,e,r){var o=new Q,a=t>>1;this.e=parseInt(e,16);var s=new D(e,16),c=this,l=function(){var e=function(){if(c.p.compareTo(c.q)<=0){var t=c.p;c.p=c.q,c.q=t}var e=c.p.subtract(D.ONE),n=c.q.subtract(D.ONE),i=e.multiply(n);0==i.gcd(s).compareTo(D.ONE)?(c.n=c.p.multiply(c.q),c.d=s.modInverse(i),c.dmp1=c.d.mod(e),c.dmq1=c.d.mod(n),c.coeff=c.q.modInverse(c.p),setTimeout(function(){r()},0)):setTimeout(l,0)},n=function(){c.q=P(),c.q.fromNumberAsync(a,1,o,function(){c.q.subtract(D.ONE).gcda(s,function(t){0==t.compareTo(D.ONE)&&c.q.isProbablePrime(10)?setTimeout(e,0):setTimeout(n,0)})})},i=function(){c.p=P(),c.p.fromNumberAsync(t-a,1,o,function(){c.p.subtract(D.ONE).gcda(s,function(t){0==t.compareTo(D.ONE)&&c.p.isProbablePrime(10)?setTimeout(n,0):setTimeout(i,0)})})};setTimeout(i,0)};setTimeout(l,0)},t.prototype.sign=function(t,e,n){var i=$[n]||"",r=i+e(t).toString(),o=function(t,e){if(e<t.length+22)return console.error("Message too long for RSA"),null;for(var n=e-t.length-6,i="",r=0;r<n;r+=2)i+="ff";return M("0001"+i+"00"+t,16)}(r,this.n.bitLength()/4);if(null==o)return null;var a=this.doPrivate(o);if(null==a)return null;var s=a.toString(16);return 0==(1&s.length)?s:"0"+s},t.prototype.verify=function(t,e,n){var i=M(e,16),r=this.doPublic(i);if(null==r)return null;var o=r.toString(16).replace(/^1f+00/,""),a=function(t){for(var e in $)if($.hasOwnProperty(e)){var n=$[e],i=n.length;if(t.substr(0,i)==n)return t.substr(i)}return t}(o);return a==n(t).toString()},t}(),$={md2:"3020300c06082a864886f70d020205000410",md5:"3020300c06082a864886f70d020505000410",sha1:"3021300906052b0e03021a05000414",sha224:"302d300d06096086480165030402040500041c",sha256:"3031300d060960864801650304020105000420",sha384:"3041300d060960864801650304020205000430",sha512:"3051300d060960864801650304020305000440",ripemd160:"3021300906052b2403020105000414"},tt={};tt.lang={extend:function(t,e,n){if(!e||!t)throw new Error("YAHOO.lang.extend failed, please check that all dependencies are included.");var i=function(){};if(i.prototype=e.prototype,t.prototype=new i,(t.prototype.constructor=t).superclass=e.prototype,e.prototype.constructor==Object.prototype.constructor&&(e.prototype.constructor=e),n){var r;for(r in n)t.prototype[r]=n[r];var o=function(){},a=["toString","valueOf"];try{/MSIE/.test(navigator.userAgent)&&(o=function(t,e){for(r=0;r<a.length;r+=1){var n=a[r],i=e[n];"function"==typeof i&&i!=Object.prototype[n]&&(t[n]=i)}})}catch(t){}o(t.prototype,n)}}};var et={};void 0!==et.asn1&&et.asn1||(et.asn1={}),et.asn1.ASN1Util=new function(){this.integerToByteHex=function(t){var e=t.toString(16);return e.length%2==1&&(e="0"+e),e},this.bigIntToMinTwosComplementsHex=function(t){var e=t.toString(16);if("-"!=e.substr(0,1))e.length%2==1?e="0"+e:e.match(/^[0-7]/)||(e="00"+e);else{var n=e.substr(1),i=n.length;i%2==1?i+=1:e.match(/^[0-7]/)||(i+=2);for(var r="",o=0;o<i;o++)r+="f";var a=new D(r,16),s=a.xor(t).add(D.ONE);e=s.toString(16).replace(/^-/,"")}return e},this.getPEMStringFromHex=function(t,e){return hextopem(t,e)},this.newObject=function(t){var e=et,n=e.asn1,i=n.DERBoolean,r=n.DERInteger,o=n.DERBitString,a=n.DEROctetString,s=n.DERNull,c=n.DERObjectIdentifier,l=n.DEREnumerated,u=n.DERUTF8String,h=n.DERNumericString,d=n.DERPrintableString,f=n.DERTeletexString,p=n.DERIA5String,g=n.DERUTCTime,m=n.DERGeneralizedTime,y=n.DERSequence,v=n.DERSet,b=n.DERTaggedObject,w=n.ASN1Util.newObject,T=Object.keys(t);if(1!=T.length)throw"key of param shall be only one.";var A=T[0];if(-1==":bool:int:bitstr:octstr:null:oid:enum:utf8str:numstr:prnstr:telstr:ia5str:utctime:gentime:seq:set:tag:".indexOf(":"+A+":"))throw"undefined key: "+A;if("bool"==A)return new i(t[A]);if("int"==A)return new r(t[A]);if("bitstr"==A)return new o(t[A]);if("octstr"==A)return new a(t[A]);if("null"==A)return new s(t[A]);if("oid"==A)return new c(t[A]);if("enum"==A)return new l(t[A]);if("utf8str"==A)return new u(t[A]);if("numstr"==A)return new h(t[A]);if("prnstr"==A)return new d(t[A]);if("telstr"==A)return new f(t[A]);if("ia5str"==A)return new p(t[A]);if("utctime"==A)return new g(t[A]);if("gentime"==A)return new m(t[A]);if("seq"==A){for(var E=t[A],x=[],S=0;S<E.length;S++){var O=w(E[S]);x.push(O)}return new y({array:x})}if("set"==A){for(var E=t[A],x=[],S=0;S<E.length;S++){var O=w(E[S]);x.push(O)}return new v({array:x})}if("tag"==A){var C=t[A];if("[object Array]"===Object.prototype.toString.call(C)&&3==C.length){var B=w(C[2]);return new b({tag:C[0],explicit:C[1],obj:B})}var D={};if(void 0!==C.explicit&&(D.explicit=C.explicit),void 0!==C.tag&&(D.tag=C.tag),void 0===C.obj)throw"obj shall be specified for 'tag'.";return D.obj=w(C.obj),new b(D)}},this.jsonToASN1HEX=function(t){var e=this.newObject(t);return e.getEncodedHex()}},et.asn1.ASN1Util.oidHexToInt=function(t){for(var e="",n=parseInt(t.substr(0,2),16),i=Math.floor(n/40),r=n%40,e=i+"."+r,o="",a=2;a<t.length;a+=2){var s=parseInt(t.substr(a,2),16),c=("00000000"+s.toString(2)).slice(-8);if(o+=c.substr(1,7),"0"==c.substr(0,1)){var l=new D(o,2);e=e+"."+l.toString(10),o=""}}return e},et.asn1.ASN1Util.oidIntToHex=function(t){var c=function(t){var e=t.toString(16);return 1==e.length&&(e="0"+e),e},e=function(t){var e="",n=new D(t,10),i=n.toString(2),r=7-i.length%7;7==r&&(r=0);for(var o="",a=0;a<r;a++)o+="0";i=o+i;for(var a=0;a<i.length-1;a+=7){var s=i.substr(a,7);a!=i.length-7&&(s="1"+s),e+=c(parseInt(s,2))}return e};if(!t.match(/^[0-9.]+$/))throw"malformed oid string: "+t;var n="",i=t.split("."),r=40*parseInt(i[0])+parseInt(i[1]);n+=c(r),i.splice(0,2);for(var o=0;o<i.length;o++)n+=e(i[o]);return n},et.asn1.ASN1Object=function(){this.getLengthHexFromValue=function(){if(void 0===this.hV||null==this.hV)throw"this.hV is null or undefined.";if(this.hV.length%2==1)throw"value hex must be even length: n="+"".length+",v="+this.hV;var t=this.hV.length/2,e=t.toString(16);if(e.length%2==1&&(e="0"+e),t<128)return e;var n=e.length/2;if(15<n)throw"ASN.1 length too long to represent by 8x: n = "+t.toString(16);var i=128+n;return i.toString(16)+e},this.getEncodedHex=function(){return(null==this.hTLV||this.isModified)&&(this.hV=this.getFreshValueHex(),this.hL=this.getLengthHexFromValue(),this.hTLV=this.hT+this.hL+this.hV,this.isModified=!1),this.hTLV},this.getValueHex=function(){return this.getEncodedHex(),this.hV},this.getFreshValueHex=function(){return""}},et.asn1.DERAbstractString=function(t){et.asn1.DERAbstractString.superclass.constructor.call(this),this.getString=function(){return this.s},this.setString=function(t){this.hTLV=null,this.isModified=!0,this.s=t,this.hV=stohex(this.s)},this.setStringHex=function(t){this.hTLV=null,this.isModified=!0,this.s=null,this.hV=t},this.getFreshValueHex=function(){return this.hV},void 0!==t&&("string"==typeof t?this.setString(t):void 0!==t.str?this.setString(t.str):void 0!==t.hex&&this.setStringHex(t.hex))},tt.lang.extend(et.asn1.DERAbstractString,et.asn1.ASN1Object),et.asn1.DERAbstractTime=function(t){et.asn1.DERAbstractTime.superclass.constructor.call(this),this.localDateToUTC=function(t){utc=t.getTime()+6e4*t.getTimezoneOffset();var e=new Date(utc);return e},this.formatDate=function(t,e,n){var i=this.zeroPadding,r=this.localDateToUTC(t),o=String(r.getFullYear());"utc"==e&&(o=o.substr(2,2));var a=i(String(r.getMonth()+1),2),s=i(String(r.getDate()),2),c=i(String(r.getHours()),2),l=i(String(r.getMinutes()),2),u=i(String(r.getSeconds()),2),h=o+a+s+c+l+u;if(!0===n){var d=r.getMilliseconds();if(0!=d){var f=i(String(d),3);f=f.replace(/[0]+$/,""),h=h+"."+f}}return h+"Z"},this.zeroPadding=function(t,e){return t.length>=e?t:new Array(e-t.length+1).join("0")+t},this.getString=function(){return this.s},this.setString=function(t){this.hTLV=null,this.isModified=!0,this.s=t,this.hV=stohex(t)},this.setByDateValue=function(t,e,n,i,r,o){var a=new Date(Date.UTC(t,e-1,n,i,r,o,0));this.setByDate(a)},this.getFreshValueHex=function(){return this.hV}},tt.lang.extend(et.asn1.DERAbstractTime,et.asn1.ASN1Object),et.asn1.DERAbstractStructured=function(t){et.asn1.DERAbstractString.superclass.constructor.call(this),this.setByASN1ObjectArray=function(t){this.hTLV=null,this.isModified=!0,this.asn1Array=t},this.appendASN1Object=function(t){this.hTLV=null,this.isModified=!0,this.asn1Array.push(t)},this.asn1Array=new Array,void 0!==t&&void 0!==t.array&&(this.asn1Array=t.array)},tt.lang.extend(et.asn1.DERAbstractStructured,et.asn1.ASN1Object),et.asn1.DERBoolean=function(){et.asn1.DERBoolean.superclass.constructor.call(this),this.hT="01",this.hTLV="0101ff"},tt.lang.extend(et.asn1.DERBoolean,et.asn1.ASN1Object),et.asn1.DERInteger=function(t){et.asn1.DERInteger.superclass.constructor.call(this),this.hT="02",this.setByBigInteger=function(t){this.hTLV=null,this.isModified=!0,this.hV=et.asn1.ASN1Util.bigIntToMinTwosComplementsHex(t)},this.setByInteger=function(t){var e=new D(String(t),10);this.setByBigInteger(e)},this.setValueHex=function(t){this.hV=t},this.getFreshValueHex=function(){return this.hV},void 0!==t&&(void 0!==t.bigint?this.setByBigInteger(t.bigint):void 0!==t.int?this.setByInteger(t.int):"number"==typeof t?this.setByInteger(t):void 0!==t.hex&&this.setValueHex(t.hex))},tt.lang.extend(et.asn1.DERInteger,et.asn1.ASN1Object),et.asn1.DERBitString=function(t){if(void 0!==t&&void 0!==t.obj){var e=et.asn1.ASN1Util.newObject(t.obj);t.hex="00"+e.getEncodedHex()}et.asn1.DERBitString.superclass.constructor.call(this),this.hT="03",this.setHexValueIncludingUnusedBits=function(t){this.hTLV=null,this.isModified=!0,this.hV=t},this.setUnusedBitsAndHexValue=function(t,e){if(t<0||7<t)throw"unused bits shall be from 0 to 7: u = "+t;var n="0"+t;this.hTLV=null,this.isModified=!0,this.hV=n+e},this.setByBinaryString=function(t){var e=8-(t=t.replace(/0+$/,"")).length%8;8==e&&(e=0);for(var n=0;n<=e;n++)t+="0";for(var i="",n=0;n<t.length-1;n+=8){var r=t.substr(n,8),o=parseInt(r,2).toString(16);1==o.length&&(o="0"+o),i+=o}this.hTLV=null,this.isModified=!0,this.hV="0"+e+i},this.setByBooleanArray=function(t){for(var e="",n=0;n<t.length;n++)1==t[n]?e+="1":e+="0";this.setByBinaryString(e)},this.newFalseArray=function(t){for(var e=new Array(t),n=0;n<t;n++)e[n]=!1;return e},this.getFreshValueHex=function(){return this.hV},void 0!==t&&("string"==typeof t&&t.toLowerCase().match(/^[0-9a-f]+$/)?this.setHexValueIncludingUnusedBits(t):void 0!==t.hex?this.setHexValueIncludingUnusedBits(t.hex):void 0!==t.bin?this.setByBinaryString(t.bin):void 0!==t.array&&this.setByBooleanArray(t.array))},tt.lang.extend(et.asn1.DERBitString,et.asn1.ASN1Object),et.asn1.DEROctetString=function(t){if(void 0!==t&&void 0!==t.obj){var e=et.asn1.ASN1Util.newObject(t.obj);t.hex=e.getEncodedHex()}et.asn1.DEROctetString.superclass.constructor.call(this,t),this.hT="04"},tt.lang.extend(et.asn1.DEROctetString,et.asn1.DERAbstractString),et.asn1.DERNull=function(){et.asn1.DERNull.superclass.constructor.call(this),this.hT="05",this.hTLV="0500"},tt.lang.extend(et.asn1.DERNull,et.asn1.ASN1Object),et.asn1.DERObjectIdentifier=function(t){var c=function(t){var e=t.toString(16);return 1==e.length&&(e="0"+e),e},o=function(t){var e="",n=new D(t,10),i=n.toString(2),r=7-i.length%7;7==r&&(r=0);for(var o="",a=0;a<r;a++)o+="0";i=o+i;for(var a=0;a<i.length-1;a+=7){var s=i.substr(a,7);a!=i.length-7&&(s="1"+s),e+=c(parseInt(s,2))}return e};et.asn1.DERObjectIdentifier.superclass.constructor.call(this),this.hT="06",this.setValueHex=function(t){this.hTLV=null,this.isModified=!0,this.s=null,this.hV=t},this.setValueOidString=function(t){if(!t.match(/^[0-9.]+$/))throw"malformed oid string: "+t;var e="",n=t.split("."),i=40*parseInt(n[0])+parseInt(n[1]);e+=c(i),n.splice(0,2);for(var r=0;r<n.length;r++)e+=o(n[r]);this.hTLV=null,this.isModified=!0,this.s=null,this.hV=e},this.setValueName=function(t){var e=et.asn1.x509.OID.name2oid(t);if(""===e)throw"DERObjectIdentifier oidName undefined: "+t;this.setValueOidString(e)},this.getFreshValueHex=function(){return this.hV},void 0!==t&&("string"==typeof t?t.match(/^[0-2].[0-9.]+$/)?this.setValueOidString(t):this.setValueName(t):void 0!==t.oid?this.setValueOidString(t.oid):void 0!==t.hex?this.setValueHex(t.hex):void 0!==t.name&&this.setValueName(t.name))},tt.lang.extend(et.asn1.DERObjectIdentifier,et.asn1.ASN1Object),et.asn1.DEREnumerated=function(t){et.asn1.DEREnumerated.superclass.constructor.call(this),this.hT="0a",this.setByBigInteger=function(t){this.hTLV=null,this.isModified=!0,this.hV=et.asn1.ASN1Util.bigIntToMinTwosComplementsHex(t)},this.setByInteger=function(t){var e=new D(String(t),10);this.setByBigInteger(e)},this.setValueHex=function(t){this.hV=t},this.getFreshValueHex=function(){return this.hV},void 0!==t&&(void 0!==t.int?this.setByInteger(t.int):"number"==typeof t?this.setByInteger(t):void 0!==t.hex&&this.setValueHex(t.hex))},tt.lang.extend(et.asn1.DEREnumerated,et.asn1.ASN1Object),et.asn1.DERUTF8String=function(t){et.asn1.DERUTF8String.superclass.constructor.call(this,t),this.hT="0c"},tt.lang.extend(et.asn1.DERUTF8String,et.asn1.DERAbstractString),et.asn1.DERNumericString=function(t){et.asn1.DERNumericString.superclass.constructor.call(this,t),this.hT="12"},tt.lang.extend(et.asn1.DERNumericString,et.asn1.DERAbstractString),et.asn1.DERPrintableString=function(t){et.asn1.DERPrintableString.superclass.constructor.call(this,t),this.hT="13"},tt.lang.extend(et.asn1.DERPrintableString,et.asn1.DERAbstractString),et.asn1.DERTeletexString=function(t){et.asn1.DERTeletexString.superclass.constructor.call(this,t),this.hT="14"},tt.lang.extend(et.asn1.DERTeletexString,et.asn1.DERAbstractString),et.asn1.DERIA5String=function(t){et.asn1.DERIA5String.superclass.constructor.call(this,t),this.hT="16"},tt.lang.extend(et.asn1.DERIA5String,et.asn1.DERAbstractString),et.asn1.DERUTCTime=function(t){et.asn1.DERUTCTime.superclass.constructor.call(this,t),this.hT="17",this.setByDate=function(t){this.hTLV=null,this.isModified=!0,this.date=t,this.s=this.formatDate(this.date,"utc"),this.hV=stohex(this.s)},this.getFreshValueHex=function(){return void 0===this.date&&void 0===this.s&&(this.date=new Date,this.s=this.formatDate(this.date,"utc"),this.hV=stohex(this.s)),this.hV},void 0!==t&&(void 0!==t.str?this.setString(t.str):"string"==typeof t&&t.match(/^[0-9]{12}Z$/)?this.setString(t):void 0!==t.hex?this.setStringHex(t.hex):void 0!==t.date&&this.setByDate(t.date))},tt.lang.extend(et.asn1.DERUTCTime,et.asn1.DERAbstractTime),et.asn1.DERGeneralizedTime=function(t){et.asn1.DERGeneralizedTime.superclass.constructor.call(this,t),this.hT="18",this.withMillis=!1,this.setByDate=function(t){this.hTLV=null,this.isModified=!0,this.date=t,this.s=this.formatDate(this.date,"gen",this.withMillis),this.hV=stohex(this.s)},this.getFreshValueHex=function(){return void 0===this.date&&void 0===this.s&&(this.date=new Date,this.s=this.formatDate(this.date,"gen",this.withMillis),this.hV=stohex(this.s)),this.hV},void 0!==t&&(void 0!==t.str?this.setString(t.str):"string"==typeof t&&t.match(/^[0-9]{14}Z$/)?this.setString(t):void 0!==t.hex?this.setStringHex(t.hex):void 0!==t.date&&this.setByDate(t.date),!0===t.millis&&(this.withMillis=!0))},tt.lang.extend(et.asn1.DERGeneralizedTime,et.asn1.DERAbstractTime),et.asn1.DERSequence=function(t){et.asn1.DERSequence.superclass.constructor.call(this,t),this.hT="30",this.getFreshValueHex=function(){for(var t="",e=0;e<this.asn1Array.length;e++){var n=this.asn1Array[e];t+=n.getEncodedHex()}return this.hV=t,this.hV}},tt.lang.extend(et.asn1.DERSequence,et.asn1.DERAbstractStructured),et.asn1.DERSet=function(t){et.asn1.DERSet.superclass.constructor.call(this,t),this.hT="31",this.sortFlag=!0,this.getFreshValueHex=function(){for(var t=new Array,e=0;e<this.asn1Array.length;e++){var n=this.asn1Array[e];t.push(n.getEncodedHex())}return 1==this.sortFlag&&t.sort(),this.hV=t.join(""),this.hV},void 0!==t&&void 0!==t.sortflag&&0==t.sortflag&&(this.sortFlag=!1)},tt.lang.extend(et.asn1.DERSet,et.asn1.DERAbstractStructured),et.asn1.DERTaggedObject=function(t){et.asn1.DERTaggedObject.superclass.constructor.call(this),this.hT="a0",this.hV="",this.isExplicit=!0,this.asn1Object=null,this.setASN1Object=function(t,e,n){this.hT=e,this.isExplicit=t,this.asn1Object=n,this.isExplicit?(this.hV=this.asn1Object.getEncodedHex(),this.hTLV=null,this.isModified=!0):(this.hV=null,this.hTLV=n.getEncodedHex(),this.hTLV=this.hTLV.replace(/^../,e),this.isModified=!1)},this.getFreshValueHex=function(){return this.hV},void 0!==t&&(void 0!==t.tag&&(this.hT=t.tag),void 0!==t.explicit&&(this.isExplicit=t.explicit),void 0!==t.obj&&(this.asn1Object=t.obj,this.setASN1Object(this.isExplicit,this.hT,this.asn1Object)))},tt.lang.extend(et.asn1.DERTaggedObject,et.asn1.ASN1Object);var nt=function(n){function i(t){var e=n.call(this)||this;return t&&("string"==typeof t?e.parseKey(t):(i.hasPrivateKeyProperty(t)||i.hasPublicKeyProperty(t))&&e.parsePropertiesFrom(t)),e}return function(t,e){function n(){this.constructor=t}p(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}(i,n),i.prototype.parseKey=function(t){try{var e=0,n=0,i=/^\s*(?:[0-9A-Fa-f][0-9A-Fa-f]\s*)+$/.test(t)?g.decode(t):m.unarmor(t),r=S.decode(i);if(3===r.sub.length&&(r=r.sub[2].sub[0]),9===r.sub.length){e=r.sub[1].getHexStringValue(),this.n=M(e,16),n=r.sub[2].getHexStringValue(),this.e=parseInt(n,16);var o=r.sub[3].getHexStringValue();this.d=M(o,16);var a=r.sub[4].getHexStringValue();this.p=M(a,16);var s=r.sub[5].getHexStringValue();this.q=M(s,16);var c=r.sub[6].getHexStringValue();this.dmp1=M(c,16);var l=r.sub[7].getHexStringValue();this.dmq1=M(l,16);var u=r.sub[8].getHexStringValue();this.coeff=M(u,16)}else{if(2!==r.sub.length)return!1;var h=r.sub[1],d=h.sub[0];e=d.sub[0].getHexStringValue(),this.n=M(e,16),n=d.sub[1].getHexStringValue(),this.e=parseInt(n,16)}return!0}catch(t){return!1}},i.prototype.getPrivateBaseKey=function(){var t={array:[new et.asn1.DERInteger({int:0}),new et.asn1.DERInteger({bigint:this.n}),new et.asn1.DERInteger({int:this.e}),new et.asn1.DERInteger({bigint:this.d}),new et.asn1.DERInteger({bigint:this.p}),new et.asn1.DERInteger({bigint:this.q}),new et.asn1.DERInteger({bigint:this.dmp1}),new et.asn1.DERInteger({bigint:this.dmq1}),new et.asn1.DERInteger({bigint:this.coeff})]},e=new et.asn1.DERSequence(t);return e.getEncodedHex()},i.prototype.getPrivateBaseKeyB64=function(){return u(this.getPrivateBaseKey())},i.prototype.getPublicBaseKey=function(){var t=new et.asn1.DERSequence({array:[new et.asn1.DERObjectIdentifier({oid:"1.2.840.113549.1.1.1"}),new et.asn1.DERNull]}),e=new et.asn1.DERSequence({array:[new et.asn1.DERInteger({bigint:this.n}),new et.asn1.DERInteger({int:this.e})]}),n=new et.asn1.DERBitString({hex:"00"+e.getEncodedHex()}),i=new et.asn1.DERSequence({array:[t,n]});return i.getEncodedHex()},i.prototype.getPublicBaseKeyB64=function(){return u(this.getPublicBaseKey())},i.wordwrap=function(t,e){if(e=e||64,!t)return t;var n="(.{1,"+e+"})( +|$\n?)|(.{1,"+e+"})";return t.match(RegExp(n,"g")).join("\n")},i.prototype.getPrivateKey=function(){var t="-----BEGIN RSA PRIVATE KEY-----\n";return t+=i.wordwrap(this.getPrivateBaseKeyB64())+"\n",t+="-----END RSA PRIVATE KEY-----"},i.prototype.getPublicKey=function(){var t="-----BEGIN PUBLIC KEY-----\n";return t+=i.wordwrap(this.getPublicBaseKeyB64())+"\n",t+="-----END PUBLIC KEY-----"},i.hasPublicKeyProperty=function(t){return(t=t||{}).hasOwnProperty("n")&&t.hasOwnProperty("e")},i.hasPrivateKeyProperty=function(t){return(t=t||{}).hasOwnProperty("n")&&t.hasOwnProperty("e")&&t.hasOwnProperty("d")&&t.hasOwnProperty("p")&&t.hasOwnProperty("q")&&t.hasOwnProperty("dmp1")&&t.hasOwnProperty("dmq1")&&t.hasOwnProperty("coeff")},i.prototype.parsePropertiesFrom=function(t){this.n=t.n,this.e=t.e,t.hasOwnProperty("d")&&(this.d=t.d,this.p=t.p,this.q=t.q,this.dmp1=t.dmp1,this.dmq1=t.dmq1,this.coeff=t.coeff)},i}(Z),it=function(){function t(t){t=t||{},this.default_key_size=parseInt(t.default_key_size,10)||1024,this.default_public_exponent=t.default_public_exponent||"010001",this.log=t.log||!1,this.key=null}return t.prototype.setKey=function(t){this.log&&this.key&&console.warn("A key was already set, overriding existing."),this.key=new nt(t)},t.prototype.setPrivateKey=function(t){this.setKey(t)},t.prototype.setPublicKey=function(t){this.setKey(t)},t.prototype.decrypt=function(t){try{return this.getKey().decrypt(h(t))}catch(t){return!1}},t.prototype.encrypt=function(t){try{return u(this.getKey().encrypt(t))}catch(t){return!1}},t.prototype.sign=function(t,e,n){try{return u(this.getKey().sign(t,e,n))}catch(t){return!1}},t.prototype.verify=function(t,e,n){try{return this.getKey().verify(t,h(e),n)}catch(t){return!1}},t.prototype.getKey=function(t){if(!this.key){if(this.key=new nt,t&&"[object Function]"==={}.toString.call(t))return void this.key.generateAsync(this.default_key_size,this.default_public_exponent,t);this.key.generate(this.default_key_size,this.default_public_exponent)}return this.key},t.prototype.getPrivateKey=function(){return this.getKey().getPrivateKey()},t.prototype.getPrivateKeyB64=function(){return this.getKey().getPrivateBaseKeyB64()},t.prototype.getPublicKey=function(){return this.getKey().getPublicKey()},t.prototype.getPublicKeyB64=function(){return this.getKey().getPublicBaseKeyB64()},t.version="3.0.0-rc.1",t}();window.JSEncrypt=it,t.JSEncrypt=it,t.default=it,Object.defineProperty(t,"__esModule",{value:!0})}(e)},function(t,e,n){t.exports=n(25)},function(t,e,n){var i,r,c;t.exports=(i=n(0),c=(r=i).lib.WordArray,r.enc.Base64={stringify:function(t){var e=t.words,n=t.sigBytes,i=this._map;t.clamp();for(var r=[],o=0;o<n;o+=3)for(var a=(e[o>>>2]>>>24-o%4*8&255)<<16|(e[o+1>>>2]>>>24-(o+1)%4*8&255)<<8|e[o+2>>>2]>>>24-(o+2)%4*8&255,s=0;s<4&&o+.75*s<n;s++)r.push(i.charAt(a>>>6*(3-s)&63));var c=i.charAt(64);if(c)for(;r.length%4;)r.push(c);return r.join("")},parse:function(t){var e=t.length,n=this._map,i=this._reverseMap;if(!i){i=this._reverseMap=[];for(var r=0;r<n.length;r++)i[n.charCodeAt(r)]=r}var o=n.charAt(64);if(o){var a=t.indexOf(o);-1!==a&&(e=a)}return function(t,e,n){for(var i=[],r=0,o=0;o<e;o++)if(o%4){var a=n[t.charCodeAt(o-1)]<<o%4*2,s=n[t.charCodeAt(o)]>>>6-o%4*2;i[r>>>2]|=(a|s)<<24-r%4*8,r++}return c.create(i,r)}(t,e,i)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="},i.enc.Base64)},function(t,e,n){var a;t.exports=(a=n(0),function(u){var t=a,e=t.lib,n=e.WordArray,i=e.Hasher,r=t.algo,O=[];!function(){for(var t=0;t<64;t++)O[t]=4294967296*u.abs(u.sin(t+1))|0}();var o=r.MD5=i.extend({_doReset:function(){this._hash=new n.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(t,e){for(var n=0;n<16;n++){var i=e+n,r=t[i];t[i]=16711935&(r<<8|r>>>24)|4278255360&(r<<24|r>>>8)}var o=this._hash.words,a=t[e+0],s=t[e+1],c=t[e+2],l=t[e+3],u=t[e+4],h=t[e+5],d=t[e+6],f=t[e+7],p=t[e+8],g=t[e+9],m=t[e+10],y=t[e+11],v=t[e+12],b=t[e+13],w=t[e+14],T=t[e+15],A=o[0],E=o[1],x=o[2],S=o[3];E=k(E=k(E=k(E=k(E=D(E=D(E=D(E=D(E=B(E=B(E=B(E=B(E=C(E=C(E=C(E=C(E,x=C(x,S=C(S,A=C(A,E,x,S,a,7,O[0]),E,x,s,12,O[1]),A,E,c,17,O[2]),S,A,l,22,O[3]),x=C(x,S=C(S,A=C(A,E,x,S,u,7,O[4]),E,x,h,12,O[5]),A,E,d,17,O[6]),S,A,f,22,O[7]),x=C(x,S=C(S,A=C(A,E,x,S,p,7,O[8]),E,x,g,12,O[9]),A,E,m,17,O[10]),S,A,y,22,O[11]),x=C(x,S=C(S,A=C(A,E,x,S,v,7,O[12]),E,x,b,12,O[13]),A,E,w,17,O[14]),S,A,T,22,O[15]),x=B(x,S=B(S,A=B(A,E,x,S,s,5,O[16]),E,x,d,9,O[17]),A,E,y,14,O[18]),S,A,a,20,O[19]),x=B(x,S=B(S,A=B(A,E,x,S,h,5,O[20]),E,x,m,9,O[21]),A,E,T,14,O[22]),S,A,u,20,O[23]),x=B(x,S=B(S,A=B(A,E,x,S,g,5,O[24]),E,x,w,9,O[25]),A,E,l,14,O[26]),S,A,p,20,O[27]),x=B(x,S=B(S,A=B(A,E,x,S,b,5,O[28]),E,x,c,9,O[29]),A,E,f,14,O[30]),S,A,v,20,O[31]),x=D(x,S=D(S,A=D(A,E,x,S,h,4,O[32]),E,x,p,11,O[33]),A,E,y,16,O[34]),S,A,w,23,O[35]),x=D(x,S=D(S,A=D(A,E,x,S,s,4,O[36]),E,x,u,11,O[37]),A,E,f,16,O[38]),S,A,m,23,O[39]),x=D(x,S=D(S,A=D(A,E,x,S,b,4,O[40]),E,x,a,11,O[41]),A,E,l,16,O[42]),S,A,d,23,O[43]),x=D(x,S=D(S,A=D(A,E,x,S,g,4,O[44]),E,x,v,11,O[45]),A,E,T,16,O[46]),S,A,c,23,O[47]),x=k(x,S=k(S,A=k(A,E,x,S,a,6,O[48]),E,x,f,10,O[49]),A,E,w,15,O[50]),S,A,h,21,O[51]),x=k(x,S=k(S,A=k(A,E,x,S,v,6,O[52]),E,x,l,10,O[53]),A,E,m,15,O[54]),S,A,s,21,O[55]),x=k(x,S=k(S,A=k(A,E,x,S,p,6,O[56]),E,x,T,10,O[57]),A,E,d,15,O[58]),S,A,b,21,O[59]),x=k(x,S=k(S,A=k(A,E,x,S,u,6,O[60]),E,x,y,10,O[61]),A,E,c,15,O[62]),S,A,g,21,O[63]),o[0]=o[0]+A|0,o[1]=o[1]+E|0,o[2]=o[2]+x|0,o[3]=o[3]+S|0},_doFinalize:function(){var t=this._data,e=t.words,n=8*this._nDataBytes,i=8*t.sigBytes;e[i>>>5]|=128<<24-i%32;var r=u.floor(n/4294967296),o=n;e[15+(i+64>>>9<<4)]=16711935&(r<<8|r>>>24)|4278255360&(r<<24|r>>>8),e[14+(i+64>>>9<<4)]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),t.sigBytes=4*(e.length+1),this._process();for(var a=this._hash,s=a.words,c=0;c<4;c++){var l=s[c];s[c]=16711935&(l<<8|l>>>24)|4278255360&(l<<24|l>>>8)}return a},clone:function(){var t=i.clone.call(this);return t._hash=this._hash.clone(),t}});function C(t,e,n,i,r,o,a){var s=t+(e&n|~e&i)+r+a;return(s<<o|s>>>32-o)+e}function B(t,e,n,i,r,o,a){var s=t+(e&i|n&~i)+r+a;return(s<<o|s>>>32-o)+e}function D(t,e,n,i,r,o,a){var s=t+(e^n^i)+r+a;return(s<<o|s>>>32-o)+e}function k(t,e,n,i,r,o,a){var s=t+(n^(e|~i))+r+a;return(s<<o|s>>>32-o)+e}t.MD5=i._createHelper(o),t.HmacMD5=i._createHmacHelper(o)}(Math),a.MD5)},function(t,e,n){var i,r,o,a,s,c,h,l;t.exports=(i=n(0),o=(r=i).lib,a=o.WordArray,s=o.Hasher,c=r.algo,h=[],l=c.SHA1=s.extend({_doReset:function(){this._hash=new a.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(t,e){for(var n=this._hash.words,i=n[0],r=n[1],o=n[2],a=n[3],s=n[4],c=0;c<80;c++){if(c<16)h[c]=0|t[e+c];else{var l=h[c-3]^h[c-8]^h[c-14]^h[c-16];h[c]=l<<1|l>>>31}var u=(i<<5|i>>>27)+s+h[c];u+=c<20?1518500249+(r&o|~r&a):c<40?1859775393+(r^o^a):c<60?(r&o|r&a|o&a)-1894007588:(r^o^a)-899497514,s=a,a=o,o=r<<30|r>>>2,r=i,i=u}n[0]=n[0]+i|0,n[1]=n[1]+r|0,n[2]=n[2]+o|0,n[3]=n[3]+a|0,n[4]=n[4]+s|0},_doFinalize:function(){var t=this._data,e=t.words,n=8*this._nDataBytes,i=8*t.sigBytes;return e[i>>>5]|=128<<24-i%32,e[14+(i+64>>>9<<4)]=Math.floor(n/4294967296),e[15+(i+64>>>9<<4)]=n,t.sigBytes=4*e.length,this._process(),this._hash},clone:function(){var t=s.clone.call(this);return t._hash=this._hash.clone(),t}}),r.SHA1=s._createHelper(l),r.HmacSHA1=s._createHmacHelper(l),i.SHA1)},function(t,e,n){var i,r,o,a,s,l,c;t.exports=(i=n(0),o=(r=i).lib,a=o.Base,s=r.enc,l=s.Utf8,c=r.algo,void(c.HMAC=a.extend({init:function(t,e){t=this._hasher=new t.init,"string"==typeof e&&(e=l.parse(e));var n=t.blockSize,i=4*n;e.sigBytes>i&&(e=t.finalize(e)),e.clamp();for(var r=this._oKey=e.clone(),o=this._iKey=e.clone(),a=r.words,s=o.words,c=0;c<n;c++)a[c]^=1549556828,s[c]^=909522486;r.sigBytes=o.sigBytes=i,this.reset()},reset:function(){var t=this._hasher;t.reset(),t.update(this._iKey)},update:function(t){return this._hasher.update(t),this},finalize:function(t){var e=this._hasher,n=e.finalize(t);e.reset();var i=e.finalize(this._oKey.clone().concat(n));return i}})))},function(t,e,n){var i,r,o,a,c,s,l,u,h,d,f,p,g,m,y,v,b,w,T,A,E,x,S;t.exports=(i=n(0),n(9),void(i.lib.Cipher||(o=(r=i).lib,a=o.Base,c=o.WordArray,s=o.BufferedBlockAlgorithm,(l=r.enc).Utf8,u=l.Base64,h=r.algo,d=h.EvpKDF,f=o.Cipher=s.extend({cfg:a.extend(),createEncryptor:function(t,e){return this.create(this._ENC_XFORM_MODE,t,e)},createDecryptor:function(t,e){return this.create(this._DEC_XFORM_MODE,t,e)},init:function(t,e,n){this.cfg=this.cfg.extend(n),this._xformMode=t,this._key=e,this.reset()},reset:function(){s.reset.call(this),this._doReset()},process:function(t){return this._append(t),this._process()},finalize:function(t){t&&this._append(t);var e=this._doFinalize();return e},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function r(t){return"string"==typeof t?S:A}return function(i){return{encrypt:function(t,e,n){return r(e).encrypt(i,t,e,n)},decrypt:function(t,e,n){return r(e).decrypt(i,t,e,n)}}}}()}),o.StreamCipher=f.extend({_doFinalize:function(){var t=this._process(!0);return t},blockSize:1}),p=r.mode={},g=o.BlockCipherMode=a.extend({createEncryptor:function(t,e){return this.Encryptor.create(t,e)},createDecryptor:function(t,e){return this.Decryptor.create(t,e)},init:function(t,e){this._cipher=t,this._iv=e}}),m=p.CBC=function(){var t=g.extend();function o(t,e,n){var i=this._iv;if(i){var r=i;this._iv=void 0}else var r=this._prevBlock;for(var o=0;o<n;o++)t[e+o]^=r[o]}return t.Encryptor=t.extend({processBlock:function(t,e){var n=this._cipher,i=n.blockSize;o.call(this,t,e,i),n.encryptBlock(t,e),this._prevBlock=t.slice(e,e+i)}}),t.Decryptor=t.extend({processBlock:function(t,e){var n=this._cipher,i=n.blockSize,r=t.slice(e,e+i);n.decryptBlock(t,e),o.call(this,t,e,i),this._prevBlock=r}}),t}(),y=r.pad={},v=y.Pkcs7={pad:function(t,e){for(var n=4*e,i=n-t.sigBytes%n,r=i<<24|i<<16|i<<8|i,o=[],a=0;a<i;a+=4)o.push(r);var s=c.create(o,i);t.concat(s)},unpad:function(t){var e=255&t.words[t.sigBytes-1>>>2];t.sigBytes-=e}},o.BlockCipher=f.extend({cfg:f.cfg.extend({mode:m,padding:v}),reset:function(){f.reset.call(this);var t=this.cfg,e=t.iv,n=t.mode;if(this._xformMode==this._ENC_XFORM_MODE)var i=n.createEncryptor;else{var i=n.createDecryptor;this._minBufferSize=1}this._mode&&this._mode.__creator==i?this._mode.init(this,e&&e.words):(this._mode=i.call(n,this,e&&e.words),this._mode.__creator=i)},_doProcessBlock:function(t,e){this._mode.processBlock(t,e)},_doFinalize:function(){var t=this.cfg.padding;if(this._xformMode==this._ENC_XFORM_MODE){t.pad(this._data,this.blockSize);var e=this._process(!0)}else{var e=this._process(!0);t.unpad(e)}return e},blockSize:4}),b=o.CipherParams=a.extend({init:function(t){this.mixIn(t)},toString:function(t){return(t||this.formatter).stringify(this)}}),w=r.format={},T=w.OpenSSL={stringify:function(t){var e=t.ciphertext,n=t.salt;if(n)var i=c.create([1398893684,1701076831]).concat(n).concat(e);else var i=e;return i.toString(u)},parse:function(t){var e=u.parse(t),n=e.words;if(1398893684==n[0]&&1701076831==n[1]){var i=c.create(n.slice(2,4));n.splice(0,4),e.sigBytes-=16}return b.create({ciphertext:e,salt:i})}},A=o.SerializableCipher=a.extend({cfg:a.extend({format:T}),encrypt:function(t,e,n,i){i=this.cfg.extend(i);var r=t.createEncryptor(n,i),o=r.finalize(e),a=r.cfg;return b.create({ciphertext:o,key:n,iv:a.iv,algorithm:t,mode:a.mode,padding:a.padding,blockSize:t.blockSize,formatter:i.format})},decrypt:function(t,e,n,i){i=this.cfg.extend(i),e=this._parse(e,i.format);var r=t.createDecryptor(n,i).finalize(e.ciphertext);return r},_parse:function(t,e){return"string"==typeof t?e.parse(t,this):t}}),E=r.kdf={},x=E.OpenSSL={execute:function(t,e,n,i){i||(i=c.random(8));var r=d.create({keySize:e+n}).compute(t,i),o=c.create(r.words.slice(e),4*n);return r.sigBytes=4*e,b.create({key:r,iv:o,salt:i})}},S=o.PasswordBasedCipher=A.extend({cfg:A.cfg.extend({kdf:x}),encrypt:function(t,e,n,i){var r=(i=this.cfg.extend(i)).kdf.execute(n,t.keySize,t.ivSize);i.iv=r.iv;var o=A.encrypt.call(this,t,e,r.key,i);return o.mixIn(r),o},decrypt:function(t,e,n,i){i=this.cfg.extend(i),e=this._parse(e,i.format);var r=i.kdf.execute(n,t.keySize,t.ivSize,e.salt);i.iv=r.iv;var o=A.decrypt.call(this,t,e,r.key,i);return o}}))))},function(e,t){(function(t){e.exports=t}).call(this,{})},function(t,e){t.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADIBAMAAABfdrOtAAAALVBMVEVHcEz////////////////////////////////////////////////////////NXt0CAAAADnRSTlMAJvQ9uVSF45/PbxcMBUhOnA0AAAWVSURBVHja7ZzLixxFHMd70plhnrAHIXpZlKyyRGmWDUFFGPSQoBiHTUjQjXFZJeADdoiol1UbUXxEZFg9iAcZFjUqexgGDJvoYRl8IXsIAyYRcwikM+7MKHz/Bg/dPc6jq7oev14Q6ncbqqs+XfWr36OaqZ9lScqFmaaVtNguXkmaUaoC3nrCkDsAoJ/sguUdAMDdSTIKFfhyNEHIfMBAdy4xxm8YyE5SjLQLAN0vAACvJcNI+Qo5GijmkSQYxWq4sa4BALyVBCBPYmAi9/vKX0jGCoGVoZ3cmSJmXPIZgdvKB1uM1vI3/VF7reC3v2C4p0XI+NUZM8GSv49xoEXNwMqkg1ltEzGuu/6AH09aJhllMxjuwNj0AgezSrFitweDdZrRmxqz+jv5RDBUf9LvLoZ4TZdc/IbNsEqDxmd0GFffDoeJdCHF54Jm7x1l9RefcrgMyyrUwvgyqziZX8JYy2RYVmpA8d5VQPx+xoHA9ik8PwiWM1+2lRFY5brB0gkoYX46de6/jjgsakgAMPPhsTjb/O7QyY2NFz4Z6oTus/EvtV0Z6fHoSxvnTx5ksX7GhMwK2Vnhq8mePcbK1SaePCy6wj9UJvouRz/pjj322WmJ3PJbZ6z3WvSDow99+rTkmeLMaP87YyHdI6cVrPdFCUj/yDFFV5Q6dc6Jh3ivvnf+Ib3E/9DXHzzmciE3iTJaAzEQAzEQAzEQAzEQAzEQAzEQAzEQAzEQAzEQAzEQAzGQXYQ4ZBAbwNnoJneXILfoIGvRTfX/FyQN4GEm5K/EIRXgbxpIfjcgGQBvMSFE/6jKsiE1oEcHWY5uqpJB9gJYj25aAvo0kByAheimMtClgewBMBfdNA2gTQLZAtCMbroMYIoEUgYgP0lJWWIvPEddktIAOpyNt0wC4Vhclu1xJKXO9h15dmSWFLD9uQ3gH6o84ibnBUiiVpq3JHUiN8xVbo2986Rd1zJne3sUkBs8gysT+RXuODfYYUBKqrwVybGjppRUeLrN0FhjEbyMxKYxlDT/eOCQGEqWnW4Hi0kQ5ffwVdsg2cNlflzaIokoNQAtvj84qw1x+N4pQ7G9bPBzapvigkE27oDrErjIH+OieIMgYYkdY4t92JPJIrx2XDp+S1/vvVi309PXe8x7uoDX1E6212LjjabN1+Ij3zSAe3UYBfCdSriiWuaYERggBcBraZrifSJLqqMUIaVOi7wJRyWOyEpoKkWsewrsQ6WACC5ETSv5qoipdFrHfdkAui2xja6csvwBsW9mpbpGRlwVPXaW1T1LCqI5VRbKZ6Gc8P4vOMoxuAHgTfFHldYr5Yh/OMmprldOIq4WHEUnWQPwhkzGrPCFOA+ZfD0DwJPP7suQ+uZbB/C6ktolPgBdBNCXjY8XBf3WsJ+T/SpVrAO4S9aqJJO8vZD1eVlIR5WKfEiV7qLwWtafkDTImoKbKNbltHIFAD63FDYknhB+pwqAblPJtITrBnwPAC/Le6J5iX62C8Cbk4fYDgBPLHgdB4D9KtFhXvhG/zUoTsQ/2gmVQPBvMytNxLKWAKAb7/L3qU8knEpszYi0ozGRYCqxdu+XGVD+xGA7ANDhx4gLw7fzVWQfYo0l5dd90DiWF+qIM5aGfhmOK6NVBCbFv5eq+RGjyl9x278yuq4H8fcnGIUpiv7d1/2Wpvh1FvpT8o0yuvcv2+60WT6LpPhKJqIqQqCQOgCiPwocZ10WrhLWd0nVowsKBFUxHrdIJKiu02tGuBO6mju3RRSS2I4kE6hlqPrFtktec2VQyWOMgY8sQrHdkRobmw5zXxMo3y+SEBYQIK/ocymssbEwKIWw06KGWA+Gt9rfD3FTFr0sjl6y788lwLBKi8kzRilJMYZXrJMcw7IeICsWw5NNl6rsDU+uVsRLWAzkX6sCQJh4PoRLAAAAAElFTkSuQmCC"},function(t,e,n){var i=n(21);"string"==typeof i&&(i=[[t.i,i,""]]);var r={hmr:!0,transform:void 0,insertInto:void 0};n(23)(i,r);i.locals&&(t.exports=i.locals)},function(t,e,n){(t.exports=n(22)(!1)).push([t.i,'.yp-riddler {\n  color: black;\n}\n.yp-riddler .yp-riddler-winbox {\n  margin: 100px auto 0 auto;\n  border-radius: 2px;\n}\n.yp-riddler .yp-riddler-win {\n  -webkit-touch-callout: none;\n  /* iOS Safari */\n  -webkit-user-select: none;\n  /* Chrome/Safari/Opera */\n  -khtml-user-select: none;\n  /* Konqueror */\n  -moz-user-select: none;\n  /* Firefox */\n  -ms-user-select: none;\n  /* Internet Explorer/Edge */\n  user-select: none;\n  -moz-box-sizing: content-box;\n  -webkit-box-sizing: content-box;\n  box-sizing: content-box;\n  background-color: white;\n  padding: 10px;\n}\n.yp-riddler .yp-riddler-tip-text-container {\n  text-align: left;\n}\n.yp-riddler .yp-riddler-tip-text-container > * {\n  vertical-align: middle;\n}\n.yp-riddler .yp-riddler-tip-text-container span {\n  color: black;\n}\n.yp-riddler .yp-riddler-tip-text-container img {\n  width: 24%;\n  margin-left: 5px;\n}\n.yp-riddler .yp-riddler-click-img-container {\n  position: relative;\n}\n.yp-riddler .yp-riddler-click-img-container .yp-riddler-power-img {\n  height: 18px;\n  position: absolute;\n  bottom: 8px;\n  right: 8px;\n}\n.yp-riddler .yp-riddler-click-position {\n  width: 32px;\n  height: 32px;\n  background-position: center;\n  background-repeat: no-repeat;\n  background-size: 100%;\n  position: absolute;\n  background-color: rgba(83, 159, 254, 0.8);\n  box-sizing: border-box;\n  box-shadow: 0 0 10px black;\n  border-radius: 50%;\n  text-align: center;\n  line-height: 26px;\n  border: 3px solid white;\n  color: #fff;\n}\n.yp-riddler .yp-riddler-slide-img-container {\n  position: relative;\n}\n.yp-riddler .yp-riddler-slide-img-container > .yp-riddler-slider-bg,\n.yp-riddler .yp-riddler-slide-img-container .yp-riddler-slider-front {\n  display: block;\n}\n.yp-riddler .yp-riddler-slide-img-container .yp-riddler-slider-front {\n  position: absolute;\n  top: 0;\n  left: 0;\n  height: 100%;\n  width: auto;\n}\n.yp-riddler .yp-riddler-slide-img-container .yp-riddler-power-img {\n  height: 18px;\n  position: absolute;\n  bottom: 8px;\n  right: 8px;\n}\n.yp-riddler .yp-riddler-slider-area {\n  margin-top: 10px;\n  background: #E6E7EB;\n  line-height: 40px;\n  height: 40px;\n  text-align: center;\n  position: relative;\n  font-weight: 300;\n  font-size: 5px;\n  cursor: default;\n  user-select: none;\n  text-shadow: none;\n  border-radius: 2px;\n}\n.yp-riddler .yp-riddler-slider-area .yp-riddler-slider-tip-default {\n  white-space: nowrap;\n  overflow: hidden;\n  padding-left: 40px;\n  font-size: 12px;\n  color: #88949d;\n}\n.yp-riddler .yp-riddler-slider-area .yp-riddler-slider-btn {\n  height: 40px;\n  width: 40px;\n  position: absolute;\n  top: 0;\n  background-color: #FFFFFF;\n  box-sizing: border-box;\n  cursor: move;\n  border-radius: 2px;\n  box-shadow: 0px 0px 4px 0px rgba(0, 0, 0, 0.2);\n  display: flex;\n  justify-content: center;\n  align-items: center;\n}\n@keyframes gogogo {\n  from {\n    padding-left: -5px;\n  }\n  to {\n    padding-left: 5px;\n  }\n}\n.yp-riddler .yp-riddler-slider-area .yp-riddler-slider-btn .yp-riddler-slider-btn-sign {\n  width: 16px;\n  pointer-events: none;\n}\n.yp-riddler .yp-riddler-slider-area .yp-riddler-slider-btn .yp-riddler-slider-btn-mask {\n  position: absolute;\n  width: 40px;\n  height: 40px;\n  animation: myfirst 2s;\n  -moz-animation: myfirst 2s;\n  /* Firefox */\n  -webkit-animation: myfirst 2s;\n  /* Safari 和 Chrome */\n  -o-animation: myfirst 2s;\n  top: 0;\n  background: #fff;\n  left: 0;\n}\n@keyframes myfirst {\n  0% {\n    left: 0;\n    width: 40px;\n  }\n  100% {\n    left: 40px;\n    width: 0px;\n  }\n}\n@-moz-keyframes myfirst {\n  /* Firefox */\n  0% {\n    left: 0;\n    width: 40px;\n  }\n  100% {\n    left: 40px;\n    width: 0px;\n  }\n}\n@-webkit-keyframes myfirst {\n  /* Safari 和 Chrome */\n  0% {\n    left: 0;\n    width: 40px;\n  }\n  100% {\n    left: 40px;\n    width: 0px;\n  }\n}\n@-o-keyframes myfirst {\n  /* Opera */\n  0% {\n    left: 0;\n    width: 40px;\n  }\n  100% {\n    left: 40px;\n    width: 0px;\n  }\n}\n.yp-riddler .yp-riddler-slider-area .yp-riddler-slider-trajectory {\n  height: inherit;\n  position: absolute;\n  top: 0;\n  left: 0;\n  background-color: #EAEFFF;\n  border-radius: 2px;\n}\n.yp-riddler.yp-flat .yp-riddler-win-masker {\n  margin: 0;\n}\n.yp-riddler.yp-flat .yp-riddler-winbox {\n  border: 1px solid #eeeeee;\n  margin: 0;\n}\n.yp-riddler.yp-float .yp-riddler-winbox {\n  border: none;\n  box-shadow: 0 0 5px grey;\n}\n.yp-riddler.yp-float .yp-riddler-win-masker {\n  z-index: 3;\n  position: absolute;\n  bottom: 0;\n  left: 0;\n  padding-bottom: 50px;\n  display: none;\n}\n.yp-riddler.yp-float .yp-riddler-win {\n  margin: 0;\n}\n.yp-riddler.yp-external .yp-riddler-winbox {\n  border: none;\n  box-shadow: 0 0 5px grey;\n  -webkit-animation-name: fadeIn;\n  /*动画名称*/\n  -webkit-animation-duration: 500ms;\n  /*动画持续时间*/\n  -webkit-animation-iteration-count: 1;\n  /*动画次数*/\n  -webkit-animation-delay: 0s;\n  /*延迟时间*/\n}\n.yp-riddler.yp-external .yp-riddler-win-masker {\n  position: absolute;\n  bottom: 0;\n  left: 0;\n  padding-bottom: 50px;\n  display: none;\n}\n.yp-riddler.yp-external .yp-riddler-win {\n  margin: 0;\n}\n.yp-riddler.yp-dialog .yp-riddler-win-masker {\n  cursor: auto;\n  position: fixed;\n  top: 0;\n  left: 0;\n  right: 0;\n  bottom: auto;\n  height: 100%;\n  background-color: rgba(0, 0, 0, 0.6);\n  z-index: 999;\n}\n.yp-riddler .yp-riddler-refresh {\n  pointer-events: auto;\n  display: block;\n  width: 18px;\n  height: 18px;\n  position: absolute;\n  top: 10px;\n  right: 10px;\n  transition: 200ms;\n  cursor: pointer;\n  transition: all 500ms ease-in-out;\n}\n.yp-riddler .yp-riddler-win-masker {\n  background: rgba(0, 0, 0, 0);\n  display: none;\n}\n.yp-riddler .yp-riddler-result-alert-success {\n  width: 100%;\n  height: 24px;\n  line-height: 24px;\n  text-align: center;\n  position: absolute;\n  bottom: 0px;\n  background-color: #52c41a;\n  color: #fff;\n  font-size: 12px;\n  font-family: PingFangSC-Regular;\n  transition: height 0.4s ease-out, opacity 0.2s ease-in, visibility 0.2s ease-in;\n}\n.yp-riddler .yp-riddler-result-alert-error {\n  width: 100%;\n  line-height: 24px;\n  text-align: center;\n  position: absolute;\n  bottom: 0px;\n  background-color: #fee8ea;\n  color: #f5222d;\n  font-size: 12px;\n  font-family: PingFangSC-Regular;\n  transition: height 0.4s ease-out, opacity 0.2s ease-in, visibility 0.2s ease-in;\n}\n.yp-riddler.yp-riddler-button {\n  position: relative;\n  line-height: 40px;\n  height: 40px;\n  cursor: pointer;\n  font-family: "PingFang SC", "Microsoft yahei", "Helvetica Neue", "Helvetica", "Arial", sans-serif;\n  user-select: none;\n  text-align: center;\n  width: 100%;\n  outline: none;\n  text-decoration: none;\n  border: 1px solid #D9D9D9;\n  background-color: #F7F9FA;\n  border-radius: 2px;\n  font-size: 14px;\n  color: #757575;\n}\n.yp-riddler.yp-riddler-button:hover {\n  font-size: 14px;\n  color: #1792FA;\n}\n.yp-riddler.yp-riddler-button .yp-riddler-button_logo {\n  display: inline-block;\n  width: 25px;\n  height: 25px;\n  box-sizing: border-box;\n  transition: 200ms;\n  margin-right: 10px;\n  line-height: 25px;\n  position: relative;\n  top: 6.5px;\n}\n.yp-riddler.yp-riddler-button .yp-riddler-button_logo .yp-riddler-btn_a {\n  width: 100%;\n  height: 100%;\n  background: #145cff;\n  border-radius: 100px;\n  opacity: 0.5;\n  box-shadow: 0 0 6px grey;\n}\n.yp-riddler.yp-riddler-button .yp-riddler-button_logo .yp-riddler-btn_b {\n  width: 17px;\n  height: 17px;\n  background: #145cff;\n  border-radius: 100px;\n  opacity: 0.5;\n  position: absolute;\n  top: 4px;\n  left: 4px;\n}\n.yp-riddler.yp-riddler-button:hover .yp-riddler-button_logo {\n  padding: 4px;\n}\n.yp-riddler .yp-riddler-button-sucButton_logo {\n  display: inline-block;\n  width: 19px;\n  vertical-align: middle;\n  background: #26C267;\n  border-radius: 50%;\n  box-shadow: #26C267 0px 0px 10px;\n  padding: 5px;\n}\n.yp-riddler .yp-riddler-button-sucButton_text {\n  display: inline-block;\n  margin: 0 0 0 10px;\n  color: #26C267;\n}\n@-webkit-keyframes fadeIn {\n  0% {\n    opacity: 0;\n    /*初始状态 透明度为0*/\n  }\n  50% {\n    opacity: 0;\n    /*中间状态 透明度为0*/\n  }\n  100% {\n    opacity: 1;\n    /*结尾状态 透明度为1*/\n  }\n}\n',""])},function(t,e){t.exports=function(n){var a=[];return a.toString=function(){return this.map(function(t){var e=function(t,e){var n=t[1]||"",i=t[3];if(!i)return n;if(e&&"function"==typeof btoa){var r=(a=i,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(a))))+" */"),o=i.sources.map(function(t){return"/*# sourceURL="+i.sourceRoot+t+" */"});return[n].concat(o).concat([r]).join("\n")}var a;return[n].join("\n")}(t,n);return t[2]?"@media "+t[2]+"{"+e+"}":e}).join("")},a.i=function(t,e){"string"==typeof t&&(t=[[null,t,""]]);for(var n={},i=0;i<this.length;i++){var r=this[i][0];"number"==typeof r&&(n[r]=!0)}for(i=0;i<t.length;i++){var o=t[i];"number"==typeof o[0]&&n[o[0]]||(e&&!o[2]?o[2]=e:e&&(o[2]="("+o[2]+") and ("+e+")"),a.push(o))}},a}},function(t,e,i){var n,r,o,c={},l=(n=function(){return window&&document&&document.all&&!window.atob},function(){return void 0===r&&(r=n.apply(this,arguments)),r}),a=(o={},function(t,e){if("function"==typeof t)return t();if(void 0===o[t]){var n=function(t,e){return e?e.querySelector(t):document.querySelector(t)}.call(this,t,e);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(t){n=null}o[t]=n}return o[t]}),u=null,h=0,s=[],d=i(24);function f(t,e){for(var n=0;n<t.length;n++){var i=t[n],r=c[i.id];if(r){r.refs++;for(var o=0;o<r.parts.length;o++)r.parts[o](i.parts[o]);for(;o<i.parts.length;o++)r.parts.push(b(i.parts[o],e))}else{var a=[];for(o=0;o<i.parts.length;o++)a.push(b(i.parts[o],e));c[i.id]={id:i.id,refs:1,parts:a}}}}function p(t,e){for(var n=[],i={},r=0;r<t.length;r++){var o=t[r],a=e.base?o[0]+e.base:o[0],s={css:o[1],media:o[2],sourceMap:o[3]};i[a]?i[a].parts.push(s):n.push(i[a]={id:a,parts:[s]})}return n}function g(t,e){var n=a(t.insertInto);if(!n)throw new Error("Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid.");var i=s[s.length-1];if("top"===t.insertAt)i?i.nextSibling?n.insertBefore(e,i.nextSibling):n.appendChild(e):n.insertBefore(e,n.firstChild),s.push(e);else if("bottom"===t.insertAt)n.appendChild(e);else{if("object"!=typeof t.insertAt||!t.insertAt.before)throw new Error("[Style Loader]\n\n Invalid value for parameter 'insertAt' ('options.insertAt') found.\n Must be 'top', 'bottom', or Object.\n (https://github.com/webpack-contrib/style-loader#insertat)\n");var r=a(t.insertAt.before,n);n.insertBefore(e,r)}}function m(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t);var e=s.indexOf(t);0<=e&&s.splice(e,1)}function y(t){var e=document.createElement("style");if(void 0===t.attrs.type&&(t.attrs.type="text/css"),void 0===t.attrs.nonce){var n=function(){0;return i.nc}();n&&(t.attrs.nonce=n)}return v(e,t.attrs),g(t,e),e}function v(e,n){Object.keys(n).forEach(function(t){e.setAttribute(t,n[t])})}function b(e,t){var n,i,r,o,a,s;if(t.transform&&e.css){if(!(o="function"==typeof t.transform?t.transform(e.css):t.transform.default(e.css)))return function(){};e.css=o}if(t.singleton){var c=h++;n=u||(u=y(t)),i=A.bind(null,n,c,!1),r=A.bind(null,n,c,!0)}else r=e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(a=t,s=document.createElement("link"),void 0===a.attrs.type&&(a.attrs.type="text/css"),a.attrs.rel="stylesheet",v(s,a.attrs),g(a,s),i=function(t,e,n){var i=n.css,r=n.sourceMap,o=void 0===e.convertToAbsoluteUrls&&r;(e.convertToAbsoluteUrls||o)&&(i=d(i));r&&(i+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(r))))+" */");var a=new Blob([i],{type:"text/css"}),s=t.href;t.href=URL.createObjectURL(a),s&&URL.revokeObjectURL(s)}.bind(null,n=s,t),function(){m(n),n.href&&URL.revokeObjectURL(n.href)}):(n=y(t),i=function(t,e){var n=e.css,i=e.media;i&&t.setAttribute("media",i);if(t.styleSheet)t.styleSheet.cssText=n;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(n))}}.bind(null,n),function(){m(n)});return i(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;i(e=t)}else r()}}t.exports=function(t,a){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(a=a||{}).attrs="object"==typeof a.attrs?a.attrs:{},a.singleton||"boolean"==typeof a.singleton||(a.singleton=l()),a.insertInto||(a.insertInto="head"),a.insertAt||(a.insertAt="bottom");var s=p(t,a);return f(s,a),function(t){for(var e=[],n=0;n<s.length;n++){var i=s[n];(r=c[i.id]).refs--,e.push(r)}t&&f(p(t,a),a);for(n=0;n<e.length;n++){var r;if(0===(r=e[n]).refs){for(var o=0;o<r.parts.length;o++)r.parts[o]();delete c[r.id]}}}};var w,T=(w=[],function(t,e){return w[t]=e,w.filter(Boolean).join("\n")});function A(t,e,n,i){var r=n?"":i.css;if(t.styleSheet)t.styleSheet.cssText=T(e,r);else{var o=document.createTextNode(r),a=t.childNodes;a[e]&&t.removeChild(a[e]),a.length?t.insertBefore(o,a[e]):t.appendChild(o)}}},function(t,e){t.exports=function(t){var e="undefined"!=typeof window&&window.location;if(!e)throw new Error("fixUrls requires window.location");if(!t||"string"!=typeof t)return t;var r=e.protocol+"//"+e.host,o=r+e.pathname.replace(/\/[^\/]*$/,"/");return t.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,function(t,e){var n,i=e.trim().replace(/^"(.*)"$/,function(t,e){return e}).replace(/^'(.*)'$/,function(t,e){return e});return/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(i)?t:(n=0===i.indexOf("//")?i:0===i.indexOf("/")?r+i:o+i.replace(/^\.\//,""),"url("+JSON.stringify(n)+")")})}},function(t,e,n){"use strict";function l(t,e){return window.YP_RIDDLER_RESOURCE_LANG[e][t]}function i(){var t=navigator.userAgent;return{trident:-1<t.indexOf("Trident"),presto:-1<t.indexOf("Presto"),webKit:-1<t.indexOf("AppleWebKit"),gecko:-1<t.indexOf("Gecko")&&-1==t.indexOf("KHTML"),mobile:!!t.match(/AppleWebKit.*Mobile.*/),ios:!!t.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/),mac:t.match("Macintosh"),android:-1<t.indexOf("Android")||-1<t.indexOf("Adr"),iPhone:-1<t.indexOf("iPhone"),iPad:-1<t.indexOf("iPad"),fireFox:-1<t.indexOf("Firefox"),webApp:-1==t.indexOf("Safari"),weixin:-1<t.indexOf("MicroMessenger"),qq:" qq"==t.match(/\sQQ/i)}}n.r(e);var r={YPcaptcha_01:"请点击按钮开始验证",YPcaptcha_02:"请按顺序点击:",YPcaptcha_03:"向右拖动滑块填充拼图",YPcaptcha_04:"验证失败，请重试",YPcaptcha_05:"验证成功!"},o={"zh-cn":r,en:{YPcaptcha_01:"Click here to verify",YPcaptcha_02:"Select in this order:",YPcaptcha_03:"Drag to verify",YPcaptcha_04:"Sorry, please try again.",YPcaptcha_05:"I am not a robot!"}},S="dialog",a="flat",s="external",c=-1,u=0,h=1,d=2,f=3,p={href:"",enText:"Powered by YunPian's CAPTCHA",chText:"由云片行为验证提供技术支持"};function g(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}var m=function(){function d(t,e,n,i,r,o,a,s,c,l,u,h){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,d),this.captchaId=s,this.winWidth=a,this.onSuccess=t,this.onError=e,this.onFail=n,this.CONTAINER=i,this.jsonpRequest=r,this.getCaptcha=o,this.waterMark=c,this.lang=l,this.logoOptions=u||function(r){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{},e=Object.keys(o);"function"==typeof Object.getOwnPropertySymbols&&(e=e.concat(Object.getOwnPropertySymbols(o).filter(function(t){return Object.getOwnPropertyDescriptor(o,t).enumerable}))),e.forEach(function(t){var e,n,i;e=r,i=o[n=t],n in e?Object.defineProperty(e,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[n]=i})}return r}({},p),this.mode=h}var t,e,n;return t=d,(e=[{key:"render",value:function(t){throw new Error("not implement")}},{key:"verify",value:function(){throw new Error("not implement")}},{key:"destroy",value:function(){var t=this.CONTAINER.getElementsByClassName("yp-riddler-winbox")[0];t&&t.parentNode.removeChild(t)}},{key:"makeWin",value:function(){var t=this.CONTAINER.getElementsByClassName("yp-riddler-win-masker")[0],e=document.createElement("div"),n=document.createElement("div");return n.className="yp-riddler-winbox",n.style.width=this.winWidth+"px","flat"===this.mode&&(n.style.width=this.winWidth-2+"px"),e.className="yp-riddler-win",e.style.width=this.winWidth-26+"px","flat"===this.mode&&(e.style.padding="12px"),n.appendChild(e),t.appendChild(n),e.addEventListener(window.EventObj.click,function(t){t.stopPropagation(),t.preventDefault()}),e}}])&&g(t.prototype,e),n&&g(t,n),d}();function y(t){return(y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function v(t){return function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e<t.length;e++)n[e]=t[e];return n}}(t)||function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function b(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function w(t,e){return!e||"object"!==y(e)&&"function"!=typeof e?function(t){if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(t):e}function T(t){return(T=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function A(t,e){return(A=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var E=n(1),x=n(2),O=n(3),C=function(t){function o(){var t,e;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o);for(var n=arguments.length,i=new Array(n),r=0;r<n;r++)i[r]=arguments[r];return(e=w(this,(t=T(o)).call.apply(t,[this].concat(i)))).position=[],e.clickAmount=0,e.captchaImgTag=null,e.charactersImgTag=null,e.deg=0,e.imgWidth=e.winWidth-26,e.verifyResultTag=null,e}var e,n,i;return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&A(t,e)}(o,m),e=o,(n=[{key:"render",value:function(t){var e=t.clickAmount,n=t.captchaImage,i=t.wordsImage;this.CONTAINER.getElementsByClassName("yp-riddler-win").length||this.createWin(),this.position=[],this.cleanClickSign(),this.clickAmount=e,this.captchaImgTag.src=n,this.charactersImgTag.src=i}},{key:"verify",value:function(){var e=this,t=window.getComputedStyle(this.captchaImgTag,null),n=parseInt(t.width),i=parseInt(t.height),r=this.position.map(function(t){return[t[0]/n,t[1]/i]});this.jsonpRequest("/jsonp/captcha/verify",{points:r},function(t){if(t.code)return e.cleanClickSign(),void e.onFail(t.code,t.msg);e.showVerifyResult("success",l("YPcaptcha_05",e.lang),!0),e.onSuccess({token:t.data.token,authenticate:t.data.authenticate})},this.onFail)}},{key:"showVerifyResult",value:function(t,e,n){var i=this;if(this.verifyResultTag.className="yp-riddler-result yp-riddler-result-alert-".concat(t),this.verifyResultTag.innerHTML=e,this.verifyResultTag.style.height="24px",n)var r=setTimeout(function(){i.hiddenVerifyResult(),clearTimeout(r)},2e3)}},{key:"hiddenVerifyResult",value:function(){this.verifyResultTag.style.height="0px",this.verifyResultTag.innerHTML=""}},{key:"cleanClickSign",value:function(){for(var t=this.CONTAINER.getElementsByClassName("yp-riddler-click-position");t.length;){var e=t[0];e.parentNode.removeChild(e)}this.position=[]}},{key:"addClickSign",value:function(t,e){var n=this,i=this.CONTAINER.getElementsByClassName("yp-riddler-click-img-container")[0],r=i.getBoundingClientRect();if(r.x&&r.y?(t-=r.x,e-=r.y):(t-=r.left,e-=r.top),this.position.length<this.clickAmount){this.position.push([t,e]);var o=document.createElement("div");o.className="yp-riddler-click-position",o.style.top=e-16+"px",o.style.left=t-16+"px";var a=document.createElement("div");a.className="yp-riddler-click-position-index",a.innerHTML=this.position.length,a.addEventListener(window.EventObj.click,function(t){(t.stopPropagation(),t.preventDefault(),t.cancelBubble=!0,parseInt(o.childNodes[0].innerHTML)<n.position.length)?(v(n.CONTAINER.getElementsByClassName("yp-riddler-click-position")).forEach(function(t){i.removeChild(t)}),n.position=[]):(i.removeChild(o),n.position.pop())}),o.appendChild(a),i.appendChild(o),this.position.length===this.clickAmount&&this.verify()}}},{key:"createWin",value:function(){var i=this,t=this.makeWin(),e=document.createElement("div");e.className="yp-riddler-click-img-container",e.style.height=this.winWidth/2+"px",e.addEventListener(window.EventObj.click,function(t){var e=null,n=null;e="touchmove"===window.EventObj.move?(n=t.targetTouches[0].clientX,t.targetTouches[0].clientY):(n=t.clientX,t.clientY),i.addClickSign(n,e)});var n=document.createElement("img");if(n.className="yp-riddler-click-img",n.style.width=this.imgWidth+"px",n.style.height=this.winWidth/2+"px",n.style.backgroundColor="#c7c7c7",this.captchaImgTag=n,e.appendChild(n),t.appendChild(e),this.waterMark){var r=document.createElement("img");r.className="yp-riddler-power-img",r.src="en"===this.lang?x:O,e.appendChild(r)}var o=document.createElement("div");o.className="yp-riddler-tip-text-container";var a=document.createElement("span");a.innerHTML=l("YPcaptcha_02",this.lang),o.appendChild(a);var s=document.createElement("img");this.charactersImgTag=s,o.appendChild(s),this.verifyResultTag=document.createElement("div"),this.verifyResultTag.className="yp-riddler-result",e.appendChild(this.verifyResultTag),t.appendChild(o);var c=document.createElement("img");c.src=E,c.className="yp-riddler-refresh",c.addEventListener(window.EventObj.click,function(t){t.stopPropagation(),t.preventDefault(),i.cleanClickSign(),i.deg+=360,c.style.transform="rotate(".concat(i.deg,"deg)"),i.showVerifyResult("","",!1),i.getCaptcha()}),e.appendChild(c)}}])&&b(e.prototype,n),i&&b(e,i),o}();function B(t){return(B="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function D(t){return function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e<t.length;e++)n[e]=t[e];return n}}(t)||function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function k(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function R(t,e){return!e||"object"!==B(e)&&"function"!=typeof e?function(t){if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(t):e}function I(t){return(I=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function N(t,e){return(N=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var P=n(1),M=n(6),L=n(7),V=n(3),j=n(2),U=n(8),F=function(t){function o(){var t,e;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o);for(var n=arguments.length,i=new Array(n),r=0;r<n;r++)i[r]=arguments[r];return(e=R(this,(t=I(o)).call.apply(t,[this].concat(i)))).position=[],e.bgTag=null,e.alertImgTag=null,e.trajectoryTag=null,e.rawX=0,e.rawTimestamp=0,e.offsetX=0,e.alertTextTag=null,e.btnTag=null,e.isDraging=!1,e.MAX_OFFSET=0,e.MAX_POINTS_AMOUNT=50,e.disabled=!1,e.curErrorIndex=0,e.MAX_ERROR=3,e.mouseDown=!1,e.proption=0,e.deg=0,e.imgWidth=e.winWidth-26,e.verifyResultTag=null,e}var e,n,i;return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&N(t,e)}(o,m),e=o,(n=[{key:"render",value:function(t){var e=t.sliderWidth,n=void 0===e?0:e,i=t.width,r=void 0===i?1:i,o=t.bg,a=void 0===o?"":o,s=t.front,c=void 0===s?"":s,l=this.CONTAINER.getElementsByClassName("yp-riddler-win");l&&!l.length&&(this.proption=(n/r).toFixed(2),this.createWin()),this.bgTag.src=a,this.alertImgTag.src=c,this.alertImgTag.ondragstart=function(){return!1},this.disabled=!1,this.resetPosition()}},{key:"resetPosition",value:function(){this.position=[],this.rawX=0,this.offsetX=0,this.trajectoryTag.style.width="0px",this.moveModule(),this.hiddenVerifyResult(),this.showTip(l("YPcaptcha_03",this.lang))}},{key:"verify",value:function(){var e=this,t=window.getComputedStyle(this.bgTag,null),n=parseInt(t.width),i=this.reducePoints(),r=(this.imgWidth-this.alertImgTag.width)*(this.offsetX/(this.imgWidth-42))/n;this.jsonpRequest("/jsonp/captcha/verify",{points:i,distanceX:r},function(t){if(t.code)return e.resetPosition(),e.disabled=!0,e.curErrorIndex++,void(e.curErrorIndex<e.MAX_ERROR?(e.showVerifyResult("error",l("YPcaptcha_04",e.lang)),setTimeout(function(){e.disabled=!1,setTimeout(function(){return e.onFail(t.code,t.msg,!0)},0)},500)):(e.disabled=!1,e.curErrorIndex=0,setTimeout(function(){return e.onFail(t.code,t.msg,!1)},0)));e.curErrorIndex=0,e.showVerifyResult("success",l("YPcaptcha_05",e.lang),!1),e.onSuccess({token:t.data.token,authenticate:t.data.authenticate})},this.onFail)}},{key:"showTip",value:function(t){this.alertTextTag.innerHTML=t,this.alertTextTag.className="yp-riddler-slider-tip-default"}},{key:"showVerifyResult",value:function(t,e){var n=this,i=!(2<arguments.length&&void 0!==arguments[2])||arguments[2];if("success"===t){this.trajectoryTag.style.background="#E5F6DD",document.querySelector(".yp-riddler-slider-btn-sign").src=U;var r=document.createElement("div");r.className="yp-riddler-slider-btn-mask",document.querySelector(".yp-riddler-slider-btn").appendChild(r);var o=setTimeout(function(){var t=document.querySelector(".yp-riddler-slider-btn");t&&t.removeChild(r),clearTimeout(o)},2e3)}if(this.verifyResultTag.className="yp-riddler-result yp-riddler-result-alert-".concat(t),this.verifyResultTag.innerHTML=e,this.verifyResultTag.style.height="24px",i)var a=setTimeout(function(){n.hiddenVerifyResult(),clearTimeout(a)},2e3)}},{key:"createRightDom",value:function(t){var e=document.createElement("img");e.className="yp-riddler-slider-btn-sign",e.src=M,t.appendChild(e)}},{key:"hiddenVerifyResult",value:function(){this.verifyResultTag.style.height="0px",this.verifyResultTag.innerHTML="",document.querySelector(".yp-riddler-slider-btn-sign").src=M}},{key:"moveModule",value:function(){this.trajectoryTag.style.width="".concat(this.offsetX,"px"),this.btnTag.style.left="".concat(this.offsetX,"px"),this.alertImgTag.style.left=(this.imgWidth-this.alertImgTag.width)*(this.offsetX/(this.imgWidth-40))+"px"}},{key:"reducePoints",value:function(){var t=D(this.position);if(t.length<=this.MAX_POINTS_AMOUNT)return t;var e=[t[0]],n=t[t.length-1],i=Math.floor(t.length/this.MAX_POINTS_AMOUNT);if(i<2)return t;for(var r=1;r<t.length-2;r+=i)e.push(t[r]);return e.push(n),e}},{key:"createWin",value:function(){var e=this,t=this.makeWin(),n=document.createElement("div");if(n.className="yp-riddler-slide-img-container",n.style.width=this.imgWidth+"px",t.appendChild(n),this.waterMark){var i=document.createElement("img");i.className="yp-riddler-power-img",i.src="en"===this.lang?j:V,n.appendChild(i)}this.bgTag=document.createElement("img"),this.bgTag.className="yp-riddler-slider-bg",this.bgTag.style.width=this.imgWidth+"px",this.bgTag.style.height=this.imgWidth/2+"px",this.bgTag.style.backgroundColor="#c7c7c7",this.alertImgTag=document.createElement("img"),this.alertImgTag.className="yp-riddler-slider-front",this.verifyResultTag=document.createElement("div"),this.verifyResultTag.className="yp-riddler-result",n.appendChild(this.bgTag),n.appendChild(this.alertImgTag),n.appendChild(this.verifyResultTag);var r=document.createElement("img");r.src=P,r.addEventListener(window.EventObj.click,function(t){t.stopPropagation(),t.preventDefault(),e.deg+=360,r.style.transform="rotate(".concat(e.deg,"deg)"),e.resetPosition(),e.getCaptcha()}),r.className="yp-riddler-refresh",n.appendChild(r);var o=document.createElement("div");o.className="yp-riddler-slider-area",t.appendChild(o),this.trajectoryTag=document.createElement("div"),this.trajectoryTag.className="yp-riddler-slider-trajectory",o.appendChild(this.trajectoryTag),this.alertTextTag=document.createElement("div"),o.appendChild(this.alertTextTag);var a=document.createElement("div");a.className="yp-riddler-slider-btn",this.createRightDom(a),o.appendChild(a),this.btnTag=a,this.registerDragEvent()}},{key:"registerDragEvent",value:function(){var r=this;this.alertImgTag.addEventListener(window.EventObj.down,function(t){if(!r.offsetX&&!r.disabled){var e=0;e="touchmove"===window.EventObj.move?t.targetTouches[0].pageX:t.pageX,r.mouseDown=!0,r.isDraging=!0,r.rawX=e,r.rawTimestamp=Date.now(),r.showTip(""),r.MAX_OFFSET=r.imgWidth-40,r.trajectoryTag.style.width=(r.proption-.125)*r.imgWidth/2+"px"}}),this.btnTag.addEventListener(window.EventObj.down,function(t){if(!r.offsetX&&!r.disabled){document.querySelector(".yp-riddler-slider-btn-sign").src=L;var e=0;e="touchmove"===window.EventObj.move?t.targetTouches[0].pageX:t.pageX,r.mouseDown=!0,r.isDraging=!0,r.rawX=e,r.rawTimestamp=Date.now(),r.showTip(""),r.MAX_OFFSET=r.imgWidth-40,r.trajectoryTag.style.width=(r.proption-.125)*r.imgWidth/2+"px"}}),document.addEventListener(window.EventObj.up,function(){r.mouseDown&&(document.querySelector(".yp-riddler-slider-btn-sign").src=M,r.isDraging=!1,r.mouseDown=!1,r.verify())}),this.CONTAINER.addEventListener(window.EventObj.up,function(){r.mouseDown&&(document.querySelector(".yp-riddler-slider-btn-sign").src=M,r.isDraging=!1,r.mouseDown=!1,r.verify())}),this.CONTAINER.addEventListener(window.EventObj.move,function(t){var e=0,n=0;if(n="touchmove"===window.EventObj.move?(t.preventDefault(),e=t.targetTouches[0].pageX,t.targetTouches[0].pageY):(e=t.pageX,t.pageY),r.isDraging){r.offsetX=e-r.rawX,r.offsetX<0?r.offsetX=0:r.offsetX>r.MAX_OFFSET&&(r.offsetX=r.MAX_OFFSET);var i=[parseInt(e.toFixed(2)),parseInt(n.toFixed(2)),Date.now()-r.rawTimestamp];r.position.push(i),r.moveModule()}}),this.CONTAINER.getElementsByClassName("yp-riddler-win")[0].addEventListener("mouserleave",function(){r.isDraging&&(r.isDraging=!1,r.resetPosition())})}}])&&k(e.prototype,n),i&&k(e,i),o}();function _(t){return(_="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function H(t){return function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e<t.length;e++)n[e]=t[e];return n}}(t)||function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function X(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function z(t,e){return!e||"object"!==_(e)&&"function"!=typeof e?function(t){if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(t):e}function W(t){return(W=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function q(t,e){return(q=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var G=n(1),K=n(6),J=n(7),Y=n(3),Q=n(2),Z=n(8),$=function(t){function o(){var t,e;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o);for(var n=arguments.length,i=new Array(n),r=0;r<n;r++)i[r]=arguments[r];return(e=z(this,(t=W(o)).call.apply(t,[this].concat(i)))).position=[],e.bgTag=null,e.alertImgTag=null,e.trajectoryTag=null,e.rawX=0,e.rawTimestamp=0,e.offsetX=0,e.alertTextTag=null,e.btnTag=null,e.maskerTag=null,e.isDraging=!1,e.MAX_OFFSET=0,e.MAX_POINTS_AMOUNT=50,e.disabled=!1,e.curErrorIndex=0,e.MAX_ERROR=3,e.mouseDown=!1,e.proption=0,e.deg=0,e}var e,n,i;return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&q(t,e)}(o,m),e=o,(n=[{key:"render",value:function(t){var e=t.sliderWidth,n=void 0===e?0:e,i=t.width,r=void 0===i?1:i,o=t.bg,a=void 0===o?"":o,s=t.front,c=void 0===s?"":s,l=this.CONTAINER.getElementsByClassName("yp-riddler-win");l&&!l.length&&(this.proption=(n/r).toFixed(2),this.createWin()),this.bgTag.src=a,this.alertImgTag.src=c,this.disabled=!1,this.resetPosition()}},{key:"resetPosition",value:function(){this.position=[],this.rawX=0,this.offsetX=0,this.trajectoryTag.style.width="0px",this.maskerTag.style.display="none",this.moveModule(),this.showVerifyResult("","",!1),this.showTip(l("YPcaptcha_03",this.lang))}},{key:"verify",value:function(){var e=this,t=window.getComputedStyle(this.bgTag,null),n=parseInt(t.width),i=this.reducePoints(),r=this.offsetX/n;this.jsonpRequest("/jsonp/captcha/verify",{points:i,distanceX:r},function(t){if(t.code)return e.resetPosition(),e.showTip(l("YPcaptcha_04",e.lang),"error"),e.disabled=!0,e.curErrorIndex++,void(e.curErrorIndex<e.MAX_ERROR?setTimeout(function(){e.showTip(l("YPcaptcha_03",e.lang)),e.disabled=!1,setTimeout(function(){return e.onFail(t.code,t.msg,!0)},0)},500):(e.curErrorIndex=0,setTimeout(function(){return e.onFail(t.code,t.msg,!1)},0)));e.curErrorIndex=0,e.showVerifyResult("success",l("YPcaptcha_05",e.lang),!0),e.onSuccess({token:t.data.token,authenticate:t.data.authenticate})},this.onFail)}},{key:"showTip",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]&&arguments[1];this.alertTextTag.innerHTML=t,this.alertTextTag.className="yp-riddler-slider-tip-"+(e?"error":"default")}},{key:"showVerifyResult",value:function(t,e,n){var i=this.CONTAINER.getElementsByClassName("yp-riddler-slide-img-container");if(n){if(i&&i.length){var r=document.createElement("div");r.className="yp-riddler-result yp-riddler-result-alert-".concat(t),r.innerHTML=e,i[0].appendChild(r)}if("success"===t){this.trajectoryTag.style.background="#E5F6DD",document.querySelector(".yp-riddler-slider-btn-sign").src=Z;var o=document.createElement("div");o.className="yp-riddler-slider-btn-mask",document.querySelector(".yp-riddler-slider-btn").appendChild(o);var a=setTimeout(function(){var t=document.querySelector(".yp-riddler-slider-btn");t&&t.removeChild(o),clearTimeout(a)},2e3)}}else{var s=this.CONTAINER.getElementsByClassName("yp-riddler-result")[0];s&&i[0].removeChild(s)}}},{key:"moveModule",value:function(){this.trajectoryTag.style.width="".concat(this.offsetX,"px"),this.alertImgTag.style.left="".concat(this.offsetX,"px"),this.btnTag.style.left="".concat(this.offsetX,"px")}},{key:"reducePoints",value:function(){var t=H(this.position);if(t.length<=this.MAX_POINTS_AMOUNT)return t;var e=[t[0]],n=t[t.length-1],i=Math.floor(t.length/this.MAX_POINTS_AMOUNT);if(i<2)return t;for(var r=1;r<t.length-2;r+=i)e.push(t[r]);return e.push(n),e}},{key:"externalSlide",value:function(){var t=this.CONTAINER.getElementsByClassName("yp-riddler")[0],e=document.createElement("div");e.className="yp-riddler-slider-area",e.style.height=this.winWidth/8+"px",e.style.width=this.winWidth+"px",e.style.lineHeight=this.winWidth/8+"px",t.appendChild(e);var n=document.createElement("div");n.className="yp-riddler-slider-btn",n.style.width=this.winWidth/6+"px";var i=document.createElement("span");i.className="yp-riddler-slider-tip-default",i.innerHTML=l("YPcaptcha_03",this.lang),e.appendChild(i);var r=document.createElement("img");r.className="yp-riddler-slider-btn-sign",r.src=K,n.appendChild(r),e.appendChild(n)}},{key:"createWin",value:function(){var e=this,t=this.makeWin();t.style.width=this.winWidth+"px",t.style.padding="0px";var n=document.createElement("div");if(n.className="yp-riddler-slide-img-container",n.style.width=this.winWidth+"px",t.appendChild(n),this.waterMark){var i=document.createElement("img");i.className="yp-riddler-power-img",i.src="en"===this.lang?Q:Y,n.appendChild(i)}this.bgTag=document.createElement("img"),this.bgTag.className="yp-riddler-slider-bg",this.bgTag.style.width=this.winWidth+"px",this.bgTag.style.height=this.winWidth/2+"px",this.bgTag.style.backgroundColor="#c7c7c7",this.alertImgTag=document.createElement("img"),this.alertImgTag.className="yp-riddler-slider-front",this.externalSlide(),n.appendChild(this.bgTag),n.appendChild(this.alertImgTag);var r=document.createElement("img");r.src=G,r.addEventListener(window.EventObj.click,function(t){t.stopPropagation(),t.preventDefault(),e.deg+=360,r.style.transform="rotate(".concat(e.deg,"deg)"),e.resetPosition(),e.getCaptcha()}),r.className="yp-riddler-refresh",n.appendChild(r);var o=this.CONTAINER.getElementsByClassName("yp-riddler-slider-area")[0];this.alertTextTag=this.CONTAINER.getElementsByClassName("yp-riddler-slider-tip-default")[0],this.alertTextTag.style.paddingLeft="40px",this.alertTextTag.style.fontSize="14px",this.trajectoryTag=document.createElement("div"),this.trajectoryTag.className="yp-riddler-slider-trajectory",o.appendChild(this.trajectoryTag),this.maskerTag=this.CONTAINER.getElementsByClassName("yp-riddler-win-masker")[0],this.maskerTag.style.display="none",this.btnTag=this.CONTAINER.getElementsByClassName("yp-riddler-slider-btn")[0],this.maskerTag.style.paddingBottom=this.btnTag.offsetHeight+10+"px",this.registerDragEvent()}},{key:"registerDragEvent",value:function(){var c=this;this.btnTag.addEventListener(window.EventObj.down,function(t){if(!c.offsetX&&!c.disabled){document.querySelector(".yp-riddler-slider-btn-sign").src=J,c.maskerTag.style.display="block";var e=0;e="touchmove"===window.EventObj.move?t.targetTouches[0].pageX:t.pageX,c.mouseDown=!0,c.isDraging=!0,c.rawX=e,c.rawTimestamp=Date.now(),c.showTip("");var n=window.getComputedStyle(c.btnTag.parentNode,null),i=window.getComputedStyle(c.btnTag,null),r=c.CONTAINER.getElementsByClassName("yp-riddler-slider-front")[0].offsetWidth,o=parseInt(n.width),a=o-r,s=o-parseInt(i.width);s<(c.MAX_OFFSET=a)&&(c.MAX_OFFSET=s),c.trajectoryTag.style.marginLeft="0px",c.trajectoryTag.style.width=(c.proption-.125)*(c.winWidth-20)/2+"px"}}),this.CONTAINER.addEventListener(window.EventObj.up,function(){c.mouseDown&&(document.querySelector(".yp-riddler-slider-btn-sign").src=K,c.isDraging=!1,c.mouseDown=!1,c.maskerTag.style.display="none",c.verify())}),this.CONTAINER.addEventListener(window.EventObj.move,function(t){var e=0,n=0;if(n="touchmove"===window.EventObj.move?(t.preventDefault(),e=t.targetTouches[0].pageX,t.targetTouches[0].pageY):(e=t.pageX,t.pageY),c.isDraging){c.offsetX=e-c.rawX,c.offsetX<0?c.offsetX=0:c.offsetX>c.MAX_OFFSET&&(c.offsetX=c.MAX_OFFSET);var i=[parseInt(e.toFixed(2)),parseInt(n.toFixed(2)),Date.now()-c.rawTimestamp];c.position.push(i),c.moveModule()}}),this.CONTAINER.getElementsByClassName("yp-riddler-win-masker")[0].addEventListener("mouseleave",function(){c.isDraging&&(c.isDraging=!1,c.resetPosition())})}}])&&X(e.prototype,n),i&&X(e,i),o}();function tt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},i=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(n).filter(function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable}))),i.forEach(function(t){et(e,t,n[t])})}return e}function et(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function nt(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=[],i=!0,r=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(i=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);i=!0);}catch(t){r=!0,o=t}finally{try{i||null==s.return||s.return()}finally{if(r)throw o}}return n}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function it(t,e,n){return(it=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}()?Reflect.construct:function(t,e,n){var i=[null];i.push.apply(i,e);var r=new(Function.bind.apply(t,i));return n&&rt(r,n.prototype),r}).apply(null,arguments)}function rt(t,e){return(rt=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function ot(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function at(t,e,n){return e&&ot(t.prototype,e),n&&ot(t,n),t}var st=function(){function e(t){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),this.pool={},this.expired=1e3*t}return at(e,null,[{key:"Instance",value:function(){if(!this._instance){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];this._instance=it(this,e)}return this._instance}}]),at(e,[{key:"makeScriptId",value:function(t){return"jsonp_".concat(t)}},{key:"preAdd",value:function(){for(var t;(t=Math.random().toString(32).replace("0.",""))in this.pool;);return this.pool[t]={ts:1/0},t}},{key:"add",value:function(t,e,n){var i=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;this.pool[t]={ts:Date.now(),cb:n,failCb:i};var r=document.createElement("script");r.src=e,r.id=this.makeScriptId(t),document.head.appendChild(r)}},{key:"removeCallback",value:function(t){if(t in this.pool){var e=this.pool[t];delete this.pool[t];var n=document.getElementById(this.makeScriptId(t));return n.parentNode.removeChild(n),e}}},{key:"checkExpired",value:function(){var t=!0,e=!1,n=void 0;try{for(var i,r=function(t){t||(t={});var e=Object.keys(t),n=e.length,i=new Array(n);for(;n--;)i[n]=[e[n],t[e[n]]];return i}(this.pool)[Symbol.iterator]();!(t=(i=r.next()).done);t=!0){var o=nt(i.value,2),a=o[0],s=o[1].ts;if(Date.now()>s+this.expired){var c=tt({},this.removeCallback(a),{msg:"request timeout",code:408});c.failCb&&c.failCb(c)}}}catch(t){e=!0,n=t}finally{try{t||null==r.return||r.return()}finally{if(e)throw n}}}},{key:"invoke",value:function(t,e){var n=this.pool[t];n?(this.removeCallback(t),n.cb(e)):console.warn("cb[".concat(t,"] is expired"))}}]),e}();var ct=n(10),lt=n.n(ct),ut=n(4),ht=n.n(ut),dt=n(11),ft=n.n(dt),pt=n(5),gt=n.n(pt),mt={};function yt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},i=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(n).filter(function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable}))),i.forEach(function(t){vt(e,t,n[t])})}return e}function vt(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function bt(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}mt.getRandomStr=function(t){for(var e="";e.length<t;)e+=Math.random().toString(36).substr(2);return e=e.slice(0,t)},mt.getBrowserInfo=function(){var t=[],e={userAgent:navigator.userAgent,language:navigator.language,hardware_concurrency:navigator.hardwareConcurrency,resolution:[window.screen.width,window.screen.height],navigator_platform:navigator.platform};for(var n in e)e.hasOwnProperty(n)&&t.push({key:n,value:e[n]});return t},mt.createUUid=function(){var n=(new Date).getTime();return window.performance&&"function"==typeof window.performance.now&&(n+=window.performance.now()),"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){var e=(n+16*Math.random())%16|0;return n=Math.floor(n/16),("x"===t?e:3&e|8).toString(16)})},mt.cookie={get:function(){for(var t=(0<arguments.length&&void 0!==arguments[0]?arguments[0]:"")+"=",e=document.cookie.split(";"),n=0;n<e.length;n++){for(var i=e[n];" "===i.charAt(0);)i=i.substring(1,i.length);if(0===i.indexOf(t))return decodeURIComponent(i.substring(t.length,i.length))}return null},set:function(t,e,n,i,r){var o="",a="",s="";if(i){var c=document.location.hostname.match(/[a-z0-9][a-z0-9\-]+\.[a-z\.]{2,6}$/i),l=c?c[0]:"";o=l?"; domain=."+l:""}if(n){var u=new Date;u.setTime(u.getTime()+24*n*60*60*1e3),a="; expires="+u.toGMTString()}r&&(s="; secure");var h="".concat(t,"=").concat(encodeURIComponent(e)).concat(a,"; path=/").concat(o).concat(s);return document.cookie=h},parse:function(t){return JSON.parse(mt.cookie.get(t)||null)},remove:function(t,e){mt.cookie.set(t,"",-1,e)}};var wt=n(19),Tt="";document.currentScript&&document.currentScript.src&&(Tt=document.currentScript.src);var At=function(){function x(t){var e=t.config,n=void 0===e?{}:e,i=t.container,r=t.additions,o=t.nativeInfo,a=t.langPack,s=t.onError,c=t.onSuccess,l=t.onFail,u=t.onExit,h=t.beforeStart,d=t.afterStart,f=t.expired,p=t.jsonpField,g=t.hosts,m=t.appId,y=t.noButton,v=t.mode,b=t.winWidth,w=t.lang,T=t.mobile,A=t.username,E=t.version;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,x),this.mode=n.mode||v||S,this.winWidth=n.winWidth||b,this.APP_ID=n.appId||m,this.version=E||"v1",this.EXPIRED=n.expired||f||30,this.JSONP_FIELD=p||"ypjsonp",this.RSA_PUBLIC_KEY="-----BEGIN PUBLIC KEY-----MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDnOWe/gs033L/2/xR3oi6SLAMPBY5VledUqqH6dbCNOdrGX4xW+1x6NUfvmwpHRBA2C7xWDDvOIldTl0rMtERTDy9homrVqEcW6/TY+dSVFL3e2Yg2sVaehHv7FhmATkgfC2FcXt8Wvm99QpKRSrGKpcFYJwOj2F8hJh+rTG0IPQIDAQAB-----END PUBLIC KEY-----",this.HOSTS=n.hosts||g||"https://captcha.yunpian.com",this.NO_BUTTON=n.noButton||y,this.CONTAINER=i.dom||i,this.lang=n.lang||w||"zh-cn",this.langPack=n.langPack||a,this.additions=r||{},this.additions.username=this.additions.username||A||T,this.beforeStart=h||function(t){return t()},this.afterStart=d||function(){},this.onSuccess=c||function(){},this.onError=s||function(){},this.onFail=l||function(t,e,n){console.warn("验证失败:",e,"code:",t),n()},this.onExit=u||function(){},this.fingerprint=null,this.browserInfo=null,this.token=null,this.cbManager=st.Instance(this.EXPIRED),this.validator=null,this.masker=null,this.hasModeBuildDone=!1,this.scrollTop=null,this.waterMark=!0,this.logoOptions={},this.drawIndex=0,this.nativeInfo=o||null,this.init()}var t,e,n;return t=x,(e=[{key:"rsaEncrypt",value:function(t){var e=new ft.a;return e.setPublicKey(this.RSA_PUBLIC_KEY),e.encrypt(t)}},{key:"encrypt",value:function(t){t=JSON.stringify(t);var e=mt.getRandomStr(16),n=mt.getRandomStr(16);return{i:lt.a.encrypt(t,ht.a.parse(e),{iv:ht.a.parse(n)}).toString(),k:this.rsaEncrypt(e+n)}}},{key:"jsonpRequest",value:function(t,e,n){var i=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null,r=this.cbManager.preAdd(),o=location.origin;e.fp=this.fingerprint,e.address=o,e.yp_riddler_id=mt.cookie.get("yp_riddler_id")||"";var a=this.encrypt(e);t="".concat(this.HOSTS,"/").concat(this.version).concat(t,"?cb=").concat(r,"&i=").concat(encodeURIComponent(a.i),"&k=").concat(encodeURIComponent(a.k)),this.token&&(t+="&token=".concat(this.token)),this.APP_ID&&(t+="&captchaId=".concat(this.APP_ID)),this.cbManager.add(r,t,n,i)}},{key:"injectButton",value:function(t){if(!this.NO_BUTTON){var e=document.createElement("div");e.className="yp-riddler-button_logo";var n=document.createElement("div");n.className="yp-riddler-btn_a",e.appendChild(n),(n=document.createElement("div")).className="yp-riddler-btn_b",e.appendChild(n);var i=document.createElement("span");i.className="yp-riddler-button_text",i.innerHTML=l("YPcaptcha_01",this.lang),t.appendChild(e),t.appendChild(i)}}},{key:"injectSuccessBtn",value:function(t){if(!this.NO_BUTTON&&t){this.isVerifySuccess=!0;var e=this.CONTAINER.getElementsByClassName("yp-riddler-button")[0];if(e){var n=this.CONTAINER.getElementsByClassName("yp-riddler-button_logo")[0],i=this.CONTAINER.getElementsByClassName("yp-riddler-button_text")[0];e.removeChild(n),e.removeChild(i);var r=document.createElement("img");r.className="yp-riddler-button-sucButton_logo",r.src=wt;var o=document.createElement("p");return o.className="yp-riddler-button-sucButton_text",o.innerText=l("YPcaptcha_05",this.lang),e.setAttribute("style","background: #EEFFF5; border: 1px solid #26C267"),e.appendChild(r),e.appendChild(o),e}}return null}},{key:"externalSlide",value:function(t){var e=document.createElement("div");e.className="yp-riddler-slider-area",e.style.height=this.winWidth/8+"px",e.style.width=this.winWidth+"px",e.style.lineHeight=this.winWidth/8+"px",t.appendChild(e);var n=document.createElement("div");n.className="yp-riddler-slider-btn",n.style.width=this.winWidth/6+"px";var i=document.createElement("span");i.className="yp-riddler-slider-tip-default",i.innerHTML=l("YPcaptcha_03",this.lang),e.appendChild(i);var r=document.createElement("span");r.className="yp-riddler-slider-btn-sign",r.innerHTML=">&nbsp;>",n.appendChild(r),e.appendChild(n)}},{key:"buildDialogMode",value:function(t){var e=this;this.CONTAINER.addEventListener("click",function(t){if(!e.isVerifySuccess){t.stopPropagation();e.beforeStart(function(){e.getCaptcha(),e.hasModeBuildDone=!0}),i().ios&&window.scrollTo(e.scrollTop,0)}}),this.injectButton(t)}},{key:"buildFloatMode",value:function(n){var i=this;this.CONTAINER.addEventListener("mouseenter",function(){var t=n.getElementsByClassName("yp-riddler-win-masker")[0],e=i.NO_BUTTON?i.CONTAINER:n;t.style.paddingBottom=e.clientHeight+10+"px";i.beforeStart(function(){i.validator||i.hasModeBuildDone?i.showUI(null,!1):(i.getCaptcha(),i.hasModeBuildDone=!0)});i.CONTAINER.addEventListener("mouseleave",function t(){i.hideUI(!1),i.CONTAINER.removeEventListener("mouseleave",t)})}),this.injectButton(n)}},{key:"buildFlatMode",value:function(t){var e=this;this.beforeStart(function(){e.getCaptcha(),e.hasModeBuildDone=!0})}},{key:"buildExternalMode",value:function(t){var e=this;this.beforeStart(function(){e.getCaptcha(),e.hasModeBuildDone=!0})}},{key:"retWidth",value:function(){var t=new RegExp(/^\d+%$/);if(this.winWidth){if(t.test(this.winWidth)){var e=document.body.clientWidth,n=this.winWidth.replace("%","")/100;this.winWidth=n*e}this.winWidth=this.winWidth<230?230:this.winWidth}else this.winWidth=500}},{key:"loadLang",value:function(){window.YP_RIDDLER_RESOURCE_LANG=yt({},window.YP_RIDDLER_RESOURCE_LANG);var t=yt({},r);if(this.langPack&&"{}"!==JSON.stringify(this.langPack))return window.YP_RIDDLER_RESOURCE_LANG.other=yt({},t,this.langPack),void(this.lang="other");this.lang?window.YP_RIDDLER_RESOURCE_LANG[this.lang]=o[this.lang]:window.YP_RIDDLER_RESOURCE_LANG[this.lang]=o["zh-cn"]}},{key:"createPublicCpts",value:function(r){var o=this;gt.a.get({NOT_AVAILABLE:"not available",ERROR:"error",EXCLUDED:"excluded"},function(t){var e=t.map(function(t){return t.value});o.fingerprint=gt.a.x64hash128(e.join(""),31),o.browserInfo=mt.getBrowserInfo();var n=o["build".concat(o.mode[0].toUpperCase()+o.mode.slice(1),"Mode")];n&&n.call(o,r);var i=document.createElement("div");i.className="yp-riddler-win-masker "+o.mode,o.mode===S&&i.addEventListener("click",function(t){t.stopPropagation(),"touchstart"!==window.EventObj.click&&t.preventDefault(),o.validator&&(o.hideUI(),o.onExit())}),r.appendChild(i),o.masker=i})}},{key:"showUI",value:function(t){var e=!(1<arguments.length&&void 0!==arguments[1])||arguments[1];this.masker.style.display="block",e&&this.validator.render(t)}},{key:"hideUI",value:function(){var t=this,e=!(0<arguments.length&&void 0!==arguments[0])||arguments[0];setTimeout(function(){t.masker.style.display="none",e&&t.validator.destroy()},500)}},{key:"getCaptcha",value:function(){var r=this;this.jsonpRequest("/jsonp/captcha/get",{browserInfo:this.browserInfo.filter(function(t){if("webql"!==t.key&&"canvas"!==t.key)return t}),nativeInfo:this.nativeInfo,additions:this.additions,options:{sdk:Tt,sdkBuildVersion:"1.5.0(2021080901)",hosts:this.HOSTS}},function(t){var e;if(t.code)r.onError&&r.onError(t);else if(t.data.type!==d){r.mode===s&&1===t.data.type&&(t.data.type=-1);var n=(e={},vt(e,u,C),vt(e,h,F),vt(e,c,$),vt(e,f,C),e)[t.data.type];r.token=t.data.token,r.logoOptions=yt({},t.data.logoOptions),r.waterMark=t.data.logoOptions.status;var i=function(){r.validator=new n(function(t){r.onSuccess(t,function(){return r.hideUI()},function(){var t=0<arguments.length&&void 0!==arguments[0]&&arguments[0];return r.injectSuccessBtn(t)}),r.token=null},function(){r.onError.apply(r,arguments),r.token=null},function(t,e,n){n||(r.getCaptcha(),r.token=null),r.onFail(t,e,function(){})},r.CONTAINER,function(){r.jsonpRequest.apply(r,arguments)},function(){return r.getCaptcha()},r.winWidth,r.APP_ID,r.waterMark,r.lang,r.logoOptions,r.mode)};r.validator?r.validator instanceof n||(r.hideUI(),i()):i(),r.showUI(t.data),0===r.drawIndex&&setTimeout(function(){r.drawIndex++,r.afterStart()},0)}else r.onSuccess(t.data,function(){},function(){var t=0<arguments.length&&void 0!==arguments[0]&&arguments[0];return r.injectSuccessBtn(t)})},this.onError)}},{key:"setCookie",value:function(){var t=mt.createUUid();mt.cookie.set("yp_riddler_id",t,356)}},{key:"init",value:function(){var e=this;this.loadLang(),this.retWidth(),mt.cookie.get("yp_riddler_id")||this.setCookie(),this.scrollTop=document.documentElement.scrollTop,this.CONTAINER.getElementsByClassName("yp-riddler")[0]&&(this.CONTAINER.innerHTML=""),setInterval(function(){e.cbManager.checkExpired()},500);window[this.JSONP_FIELD]=function(t){window[e.JSONP_FIELD].ret=null,e.cbManager.invoke(t.cb,t)};var t=document.createElement("div");t.className="yp-riddler yp-".concat(this.mode," ").concat(this.mode===a||this.NO_BUTTON||this.mode===s?"":"yp-riddler-button"),this.CONTAINER.appendChild(t),"static"===window.getComputedStyle(this.CONTAINER,null).position&&(this.CONTAINER.style.position="relative"),this.createPublicCpts(t)}}])&&bt(t.prototype,e),n&&bt(t,n),x}();n(20);window.YpRiddler=At;var Et={down:"mousedown",up:"mouseup",move:"mousemove",click:"click"},xt=i();"ontouchend"in document&&(Et={down:"touchstart",up:"touchend",move:"touchmove",click:"touchstart"}),xt.mobile&&"ontouchstart"in document.documentElement==!0&&(Et={down:"touchstart",up:"touchend",move:"touchmove",click:"touchstart"}),xt.mac&&"ontouchstart"in document.documentElement==!0&&(Et={down:"touchstart",up:"touchend",move:"touchmove",click:"touchstart"}),xt.iPad&&"ontouchstart"in document.documentElement==!1&&(Et={down:"mousedown",up:"mouseup",move:"mousemove",click:"click"}),xt.weixin&&xt.mobile&&(Et={down:"touchstart",up:"touchend",move:"touchmove",click:"touchstart"}),xt.fireFox&&-1<navigator.userAgent.indexOf("Mobile")&&(Et={down:"touchstart",up:"touchend",move:"touchmove",click:"touchstart"}),window.EventObj=Et}]);</script><style type="text/css">.yp-riddler {
DesignScreenshot/output/test-download/index.html:1462:this.timer=setTimeout(function(){_this.save()},500)}},{key:"getData",value:function getData(cb){try{var storageStr=localStorage.getItem(this.lsName);if(storageStr){cb(storageStr)}else{cb("")}}catch(e){console.error(e);cb("")}}},{key:"save",value:function save(){var _this2=this;this.getData(function(str){var content=str+"\n"+_this2.tmpList.join("\n");try{localStorage.setItem(_this2.lsName,content)}catch(error){}})}}],[{key:"getInstance",value:function getInstance(){if(!this.instance){
DesignScreenshot/output/test-download/index.html:5908:return e&&e.prototype===t},Me={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0,$width:!0,$height:!0,$top:!0,$localStorage:!0},Ie=function(){if("undefined"==typeof window)return!1;for(var t in window)try{!Me["$"+t]&&G(window,t)&&null!==window[t]&&"object"==typeof window[t]&&Ee(window[t])
DesignScreenshot/output/test-download/index.html:6082:}!function(){function getUA(){var e,t={},n=navigator.userAgent.toLowerCase();return t.mac=navigator.platform.toUpperCase().indexOf("MAC")>=0,(e=n.match(/rv:([\d.]+)\) like gecko/))?t.ie=e[1]:(e=n.match(/(msie\s|trident.*rv:)([\w.]+)/))?t.ie=e[2]:(e=n.match(/firefox\/([\d.]+)/))?t.firefox=e[1]:(e=n.match(/chrome\/([\d.]+)/))?t.chrome=e[1]:(e=n.match(/opera.([\d.]+)/))?t.opera=e[1]:(e=n.match(/version\/([\d.]+).*safari/))?t.safari=e[1]:0,t}function getDefaultQueryHis(){try{return JSON.parse(localStorage.getItem("index_ls_default_query"))
DesignScreenshot/output/test-download/index.html:6084:}),e.on("keydown keyup cut paste setValue input",checkInputValue)}}function checkInputValue(){var e=$input.val();setTimeout(function(){var t=$input.val();(t!==e||t.length>0)&&$(".kw-placeholder").toggleClass("placeholders-hidden",t.length>0)},0)}function removePlaceHolder(e,t){t?e.removeAttr("placeholder"):$(".kw-placeholder").remove()}function testLocalStorage(){var e="test";try{return localStorage.setItem(e,e),localStorage.removeItem(e),!0}catch(t){return!1}}function getShowCount(e,t){var n=0;return t&&t.query&&t.query===e&&t.count&&(n=t.count),n
DesignScreenshot/output/test-download/index.html:6085:}function recordDefaultQuery(e,t){var n={query:e,time:(new Date).getTime(),count:1};t&&t.query&&e===t.query&&t.count&&(n.count=t.count+1),setTimeout(function(){try{localStorage.removeItem("index_ls_default_query"),localStorage.setItem("index_ls_default_query",JSON.stringify(n))}catch(e){return!1}},0)}function jsonPolyfill(){var json={parse:function(sJSON){return eval("("+sJSON+")")},stringify:function(){var e=Object.prototype.toString,t=Object.prototype.hasOwnProperty,n=Array.isArray||function(t){return"[object Array]"===e.call(t)
DesignScreenshot/output/test-download/index.html:6157:t.__esModule=!0,t.SpyCacheService=void 0,o=n.__importDefault(o);var s=function(){function e(e){var n=this;this.query=e;try{localStorage.removeItem("SpyLocalCache")}catch(i){}this.spyCache=new o["default"]({maxRecordLen:150,onFlush:t.getFlushFun(),storage:"localstorage",costTime:t.costTime,key:"pcSpyLocalCache",compress:"no"}),window.onbeforeunload=function(){n.spyCache.save()}}t=e,e.getFlushFun=function(){function e(e){var t=bds.comm.ishome?"1_79":"1_87",n="https://sp1.baidu.com/5b1ZeDe5KgQFm2e88IuM_a/mwb2.gif?pid="+t+"&type=except&group=localcache",i=JSON.stringify({pid:t,type:"except",group:"localcache",ts:Date.now(),lid:e[0].qid,info:{msg:"webb sdk localcache",pageUrl:location.href,log:JSON.stringify(e)}});
DesignScreenshot/output/test-download/index.html:6174:return t||Math.random()<e},e.sendLsInfo=function(){t.shouldSend(.001)&&window.requestIdleCallback&&window.requestIdleCallback(function(){var e=t.getLsLen(),n=e.totalLen,i=e.spyLen,o=500*parseInt((parseInt(n,10)/500).toFixed(0),10),r=t.getLsMaxLen(o);a.send({info:{lsMaxLen:r,totalLen:n,spyLen:i},group:"lsInfo",dim:{}},"pf_comm")})},e.getLsMaxLen=function(e){if(localStorage&&!localStorage.getItem("size")){var t=0;try{for(t=500;1e4>=t;t+=500)localStorage.setItem("test",new Array(1024*t+1).join("a"))
DesignScreenshot/output/test-download/index.html:6175:}catch(n){localStorage.removeItem("test"),localStorage.setItem("size",(e+t-500).toString())}}return localStorage.getItem("size")},e.getLsLen=function(){var e=0,n=0,i=0;for(var o in localStorage)localStorage.hasOwnProperty(o)&&(o.indexOf("SpyLocalCache")>-1&&(i+=t.getBytesCount(localStorage[o])+t.getBytesCount(o)),n=t.getBytesCount(localStorage[o])+t.getBytesCount(o),e+=n);return{totalLen:(e/1024).toFixed(2),spyLen:(i/1024).toFixed(2)}},e.getBytesCount=function(e,t){void 0===t&&(t="");var n=0,i=0,o=t.toLowerCase();
DesignScreenshot/output/test-download/index.html:6214:return n.__generator(this,function(){if(e=this.invokeService.getOneInvokeInfo(8),t=parseInt(localStorage.getItem("mcpTipBoxShowTime")||"0",10),(new Date).getTime()>t&&this.invokeService.hitMcp(8)&&e&&e.ext)try{i=JSON.parse(e.ext),o=+i.waitTime||3,setTimeout(function(){r.isInteract()||r.tipbox.showTipBox(i)},1e3*o)}catch(n){}return[2]})})},e.prototype.showBanner=function(){var e=document.querySelector(".bds-lead-ipad"),t=this.invokeService.getOneInvokeInfo(10);if(e&&t&&t.ext)try{var n=JSON.parse(t.ext);
DesignScreenshot/output/test-download/index.html:6554:}function o(e){if(window.localStorage){var t=l.get(),i=!!$(e).attr("data-safe-icon-run");return(t.split(",").length<2||-1!==t.indexOf(n()))&&!i}return!0}function r(e){if(!o(e))return!1;$(e).attr("data-safe-icon-run",!0),$(e).attr("hint-type","anim-newBao");var t=$(e),i=$($(e).parents("div.result.c-container")),r=i.attr("data-click"),a=r?r.replace("safe","ani-safe"):"";setTimeout(function(){t.addClass("animate"),i.attr("data-click",a),t.one("animationend",function(){t.removeClass("animate"),setTimeout(function(){t.addClass("animate"),$(e).attr("hint-type","newBao"),t.one("animationend",function(){i.attr("data-click",r)
DesignScreenshot/output/test-download/index.html:6555:})},1e3)})},1e3),ns_c_pj({qid:bds.comm.qid||""},"pj=animaBao&"),l.set(n()+"~"+ +new Date)}function a(e){var t=function(){return window.localStorage&&window.localStorage.getItem(e)?window.localStorage.getItem(e):""},n=function(n){if(window.localStorage){var i=t();return""===n?(window.localStorage.setItem(e,n),!0):2===i.split(",").length||-1!==i.indexOf(n.split("~")[0])?!1:(n=i?i+","+String(n):String(n),window.localStorage.setItem(e,n),!0)}return!0},i=function(){var e=t();+new Date-+e.split(",")[0].split("~").pop()>=u&&n("")
DesignScreenshot/output/test-download/index.html:6606:for(var t=0;t<e.length&&!(this.sendNum>10);t++){var n=e[t],i=n.getAttribute("data-cv");if(i){var o=i.split("_"),r="0";if(2!==o.length&&3!==o.length)continue;3===o.length&&(r=o.shift()||"",i=o.join("_")),e[t].removeAttribute("data-cv"),this.send(i,+r)}}},e.prototype.initStorage=function(){var e={enabled:!0};try{localStorage.setItem("_t","1"),localStorage.removeItem("_t")}catch(t){e.enabled=!1}return e.enabled?localStorage:{enabled:!1,storgae:{},setItem:function(e,t){this.storgae[e]=t},getItem:function(e){return this.storgae[e]
DesignScreenshot/output/test-download/index.html:6623:var t=Date.now();if(!Uh[Mh])if(Uh.length>=5){var n=Object.keys(Uh).reduce(function(e,t){return"length"!==Uh[t]&&Uh[t].time<=e.time?{time:Uh[t].time,path:t}:e},{time:t,path:""}).path;delete Uh[n]}else Uh.length++;Uh[Mh]={list:e,time:t},localStorage.setItem("RETRY_LOG_LIST",JSON.stringify(Uh))}function D(){var e;Ph||(Ph=!0,Mh=location.origin+location.pathname);try{Uh=JSON.parse(localStorage.getItem("RETRY_LOG_LIST"))||{length:0}}catch(e){Uh={length:0}}return(null===(e=Uh[Mh])||void 0===e?void 0:e.list)||[]
DesignScreenshot/output/test-download/index.html:6777:if(this.retryLogList.set(i,{url:t,loggerData:n,loggerId:i,failTimes:1,sendCountDown:this._getDelayTime(1)}),this.retryLogList.size>this.retryLogListMax){var o=this.retryLogList.keys().next().value;this.retryLogList.delete(o)}this.active(),R(Array.from(this.retryLogList))}},{key:"removeLog",value:function(e){e&&this.retryLogList.delete(e)&&(0===this.retryLogList.size?(Ph||D(),Uh[Mh]&&(delete Uh[Mh],Uh.length--),localStorage.setItem("RETRY_LOG_LIST",JSON.stringify(Uh))):R(this.retryLogList))}},{key:"updateLog",value:function(e){if(e){var t=this.retryLogList.get(e);
DesignScreenshot/output/test-download/index.html:6848:};var i=encodeURIComponent(JSON.stringify({data:e}));ft("baiduboxapp://v19/utils/setClipboardData?params=".concat(i,"&callback=_naCopyCb_"),"baiduboxapp")})},Xm=function(e){return Lt(500,Ym,e)};window.__UIA_VERSION__="2.4.7";var Zm=n(function(e,t){!function(n){function i(e){if(e=e||("undefined"!=typeof localStorage?localStorage:null),!e)throw new Error("ExpiredStorage: No storage base class provided and 'localStorage' is undefined! Please provide a valid base storage class.");if(!(e.setItem&&e.getItem&&e.removeItem&&e.clear))throw new Error("ExpiredStorage: Storage class  don't support one or more of the required API functions: getItem, setItem, removeItem or clear.");
DesignScreenshot/output/test-download/index.html:6872:}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},b=function(){function e(e,t){this.data=e,this.weight=t}return e.prototype.preOrder=function(e){e.push(this),this.left&&this.left.preOrder(e),this.right&&this.right.preOrder(e)},e}(),y=function(){function e(){}return e.prototype.set=function(){},e.prototype.get=function(){},e.prototype.rm=function(){},e}(),w=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return e(n,t),n.isSupport=function(){return!!window.localStorage
DesignScreenshot/output/test-download/index.html:6873:},n.prototype.set=function(e,t){try{localStorage.setItem(e,t)}catch(n){console.error(n)}},n.prototype.get=function(e,t){var n=null;try{n=localStorage.getItem(e)}catch(i){console.error(i)}t&&t(n)},n.prototype.rm=function(e){try{localStorage.removeItem(e)}catch(t){console.error(t)}},n}(y),_=function(t){function n(){var e=t.call(this)||this;e.databaseName="spyLC",e.db=null,e.setQueue=[],e.getQueue=[];var n=window.indexedDB.open(e.databaseName);return n.onupgradeneeded=function(t){e.db=t.target&&t.target.result,e.db&&!e.db.objectStoreNames.contains(e.databaseName)&&e.db.createObjectStore(e.databaseName,{keyPath:"key"}),e.runQueueTask()
DesignScreenshot/output/test-download/index.html:7094:}(),Y=function(){function e(e,t,n,i,o){var r=this;this.observer=null,this.document=document,this.ls=e,this.logServe=t,this.require=n,this.contentRight=$("#content_right"),this.sampleServ=i,this.userInfo=o,this.UPS=window.UPS,this.shouldBlockTts()?($("body").removeClass("open-result-tts"),localStorage.setItem("set_result_tts","close")):(this.initAClick(!0),this.require(["@baidu/pc-tts-player"],function(e){var t,n=null===(t=r.contentRight.offset())||void 0===t?void 0:t.left,i=n?"".concat(n,"px"):"870px";
DesignScreenshot/output/test-download/index.html:7114:t.__esModule=!0,t.PageModule=void 0;var v=function(){function e(){this.container=new n.Container,this.resultDI=this.container.createChildContainer();var e=this.container;e.addValue(i.DOCUMENT_TOKEN,document),e.addValue(i.PERFORMANCE_TOKEN,window.performance),e.addValue(i.LOCAL_STORAGE_TOKEN,window.localStorage),e.addValue(i.NAVIGATOR_TOKEN,window.navigator),e.addValue(i.REQUIRE_TOKEN,window.require),e.addValue(i.PERF_SYNC_DATA_TOKEN,window.__perf_www_datas),e.addFactory(i.SCOPE_TOKEN,i.scopeFactory({root:document.body}),[]),e.addService(i.Log),e.addService(i.AlaLog),e.addService(i.MidLog),e.addService(i.UbcLog),e.addService(i.Cookie),e.addValue(i.WebbConfig,i.webbConfigValue),e.addService(i.WebbInstance),e.addService(i.Query),e.addService(i.Device),e.addService(i.CodeCover),e.addService(i.Sample),e.addService(i.HttpsDomain),e.addService(i.User),e.addService(d.PeakStyle),e.addService(u.HeadGradient),e.addService(l.IsuiHeadFixed),e.addService(i.Conf),e.addService(p.OutlineSafari),e.addService(o.SpyCacheService),e.addService(i.EventEmitter),e.addService(i.InvokeService),e.addService(i.XPath),e.addService(i.AladdinUtils),e.addService(f.UtilsService),this.queryService=e.create(i.Query),this.deviceService=e.create(i.Device),this.codeCoverService=e.create(i.CodeCover),this.sampleService=e.create(i.Sample),this.userService=e.create(i.User),this.peakStyleService=e.create(d.PeakStyle),this.headGradientService=e.create(u.HeadGradient),this.isuiHeadFixedService=e.create(l.IsuiHeadFixed),this.utilsService=e.create(f.UtilsService),this.conf=e.create(i.Conf),e.create(p.OutlineSafari),e.addService(h.AgingTools),this.tools=e.create(h.AgingTools)
DesignScreenshot/output/test-download/index.html:7141:}(),bds.comm.inputUpgrade&&!function(){require(["new-input/js/new_input"],function(e){var t=e.MainInput,n=new t;n.init()})}(),$(window).on("swap_end",function(){var e=$("html"),t=$("body"),n=$(".content_none"),i=n&&n.length>0||!1,o=e.hasClass("big-event-gray"),r=bds&&bds.comm&&bds.comm.isGray;t.hasClass("big-event-gray")&&t.removeClass("big-event-gray"),!o||i||r||e.removeClass("big-event-gray"),!o&&r&&e.addClass("big-event-gray")}),$(window).on("swap_end",function(){try{localStorage.setItem("search_request_time",Date.now())
DesignScreenshot/output/test-download/index.html:7181:baseParams,{rsv_clk_extra:JSON.stringify(extraData)}):baseParams;log(logParams)}catch(e){console.error("SEND MID LOG ERROR",e)}}function setStorage(name,value){try{localStorage.setItem(name,value)}catch(e){console.error("SET LOCALSTORAGE ERROR",e)}}function getStorage(name){try{return localStorage.getItem(name)}catch(e){console.error("GET LOCALSTORAGE ERROR",e);return null}}function isDarkMode(){var agingTools=getStorage("agingTools");return agingTools&&(
DesignScreenshot/output/test-download/index.html:7220:}else if(window.localStorage){_storage=_createLocalStorage()}else{_storage=_createCookie()}return _storage}function _createUserData(){$(document.body).append($.formatString('<div id="#{id}" style="display:none;"></div>',{id:_guid+"-storage"}));_getElement().addBehavior("#default#userData");return{set:function(key,value,callback,options){var status=_status.SUCCESS,ele=_getElement(),newKey=_getKey(key),time=options&&options.expires?options.expires:(new Date).getTime()+365*24*60*60*1e3;if(isDate(
DesignScreenshot/output/test-download/index.html:7222:var status=_status.SUCCESS,ele=_getElement(),newKey=_getKey(key),val;try{ele.load(newKey);val=ele.getAttribute(newKey);if(val){ele.removeAttribute(newKey);ele.expires=new Date(315532799e3).toUTCString();ele.save(newKey)}else{status=_status.FAILURE}}catch(e){status=_status.FAILURE}callback&&callback.call(this,status,val)}}}function _createLocalStorage(){return{set:function(key,value,callback,options){var status=_status.SUCCESS,storage=window.localStorage,newKey=_getKey(key),
DesignScreenshot/output/test-download/index.html:7223:time=options&&options.expires?options.expires:0;if(isDate(time)){time=time.getTime()}else if(time>0){time=(new Date).getTime()+(time-0)}try{storage.setItem(newKey,time+"|"+value)}catch(e){status=_status.OVERFLOW}callback&&callback.call(this,status,value)},get:function(key){var status=_status.SUCCESS,storage=window.localStorage,newKey=_getKey(key),val=null,index,time;try{val=storage.getItem(newKey)}catch(e){return{status:_status.FAILURE,value:null}}if(val){index=val.indexOf("|");time=parseInt(
DesignScreenshot/output/test-download/index.html:7224:val.substring(0,index),10);if(new Date(time).getTime()>(new Date).getTime()||time==0){val=val.substring(index+1,val.length)}else{val=null;status=_status.FAILURE;this.del(key)}}else{status=_status.FAILURE}return{status:status,value:val}},del:function(key,callback){var status=_status.SUCCESS,storage=window.localStorage,newKey=_getKey(key),val=null;try{val=storage.getItem(newKey)}catch(e){status=_status.FAILURE}if(val){val=val.substring(val.indexOf("|")+1,val.length)
DesignScreenshot/output/test-download/index.html:7410:).on("keydown",function(e){if(e.keyCode===13){isKeyDown=true}});$(".s_btn_wr").on("click",function(e){if(/\/s\?.*(wd|word)=.+/.test(location.href)){return}var placeholderData;try{placeholderData=localStorage.getItem("placeholderData")?JSON.parse(localStorage.getItem("placeholderData")):{}}catch(e){}var str_sa="";var query=$("#kw").val()?"":$("#kw").attr("placeholder");if(placeholderData&&placeholderData.list&&placeholderData.list.length>0&&query!==""){for(
DesignScreenshot/output/test-download/index.html:7415:var bds=bds||{};bds.se=bds.se||{};bds.se.store=function(){var l={},h=window,k=h.document,c="localStorage",o="globalStorage",d="__storejs__",g;l.disabled=false;l.set=function(e,p){};l.get=function(e){};l.remove=function(e){};l.clear=function(){};l.transact=function(e,r,p){var q=l.get(e);if(p==null){p=r;r=null}if(typeof q=="undefined"){q=r||{}}p(q);l.set(e,q)};l.getAll=function(){};l.serialize=function(e){return String(e)};l.deserialize=function(e){if(typeof e!="string"){return undefined}return e}
DesignScreenshot/output/test-download/index.html:7469:;var nodeSample=bds&&bds.comm&&bds.comm.nodeSample;if(nodeSample.indexOf("need_carousels")>-1||nodeSample.indexOf("no_need_carousels")>-1){var input=$("#kw");var placeholderList=JSON.parse(localStorage.getItem("placeholderList")||"{}");var signNum=JSON.parse(localStorage.getItem("signNum")||null);if(!input.val()&&signNum!==null&&placeholderList.box[signNum]){input.val(placeholderList.box[signNum].show_text);F.fire("superman:placeholder","click",{clickType:"click"})}var placeholder=$(
DesignScreenshot/output/test-download/index.html:7477:$(document).ready(function(){var isNewTopMenu=bds.comm&&bds.comm.newTopMenu===1;window._load_status="dom_ready";(function(){if(Math.random()*100<1&&$.browser.edge){window.testedge=function(fn){var health;if(/testedge=1/i.test(fn.toString())){try{window.localStorage.setItem("_super_edgehealth","good")}catch(e){}health="1"}else{health="0"}var imgLog=function(src){var n="imglog__"+(new Date).getTime();var c=window[n]=new Image;c.onload=c.onerror=function(){window[n]=null};c.src=src;c=null}
DesignScreenshot/output/100.64.0.2_run/100.64.0.2_8083_1_initial_page.html:97:`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const o=new this(t);return n.forEach(r=>o.set(r)),o}static accessor(t){const o=(this[lm]=this[lm]={accessors:{}}).accessors,r=this.prototype;function s(i){const a=pi(i);o[a]||(sR(r,i),o[a]=!0)}return W.isArray(t)?t.forEach(s):s(t),this}};gn.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);W.reduceDescriptors(gn.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(o){this[n]=o}}});W.freezeMethods(gn);function vc(e,t){const n=this||Aa,o=t||n,r=gn.from(o.headers);let s=o.data;return W.forEach(e,function(a){s=a.call(n,s,r.normalize(),t?t.status:void 0)}),r.normalize(),s}function e_(e){return!!(e&&e.__CANCEL__)}function ii(e,t,n){Ve.call(this,e??"canceled",Ve.ERR_CANCELED,t,n),this.name="CanceledError"}W.inherits(ii,Ve,{__CANCEL__:!0});function t_(e,t,n){const o=n.config.validateStatus;!n.status||!o||o(n.status)?e(n):t(new Ve("Request failed with status code "+n.status,[Ve.ERR_BAD_REQUEST,Ve.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function iR(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function aR(e,t){e=e||10;const n=new Array(e),o=new Array(e);let r=0,s=0,i;return t=t!==void 0?t:1e3,function(l){const u=Date.now(),c=o[s];i||(i=u),n[r]=l,o[r]=u;let d=s,p=0;for(;d!==r;)p+=n[d++],d=d%e;if(r=(r+1)%e,r===s&&(s=(s+1)%e),u-i<t)return;const h=c&&u-c;return h?Math.round(p*1e3/h):void 0}}function lR(e,t){let n=0,o=1e3/t,r,s;const i=(u,c=Date.now())=>{n=c,r=null,s&&(clearTimeout(s),s=null),e(...u)};return[(...u)=>{const c=Date.now(),d=c-n;d>=o?i(u,c):(r=u,s||(s=setTimeout(()=>{s=null,i(r)},o-d)))},()=>r&&i(r)]}const Bl=(e,t,n=3)=>{let o=0;const r=aR(50,250);return lR(s=>{const i=s.loaded,a=s.lengthComputable?s.total:void 0,l=i-o,u=r(l),c=i<=a;o=i;const d={loaded:i,total:a,progress:a?i/a:void 0,bytes:l,rate:u||void 0,estimated:u&&a&&c?(a-i)/u:void 0,event:s,lengthComputable:a!=null,[t?"download":"upload"]:!0};e(d)},n)},um=(e,t)=>{const n=e!=null;return[o=>t[0]({lengthComputable:n,total:e,loaded:o}),t[1]]},cm=e=>(...t)=>W.asap(()=>e(...t)),uR=Jt.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,Jt.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(Jt.origin),Jt.navigator&&/(msie|trident)/i.test(Jt.navigator.userAgent)):()=>!0,cR=Jt.hasStandardBrowserEnv?{write(e,t,n,o,r,s){const i=[e+"="+encodeURIComponent(t)];W.isNumber(n)&&i.push("expires="+new Date(n).toGMTString()),W.isString(o)&&i.push("path="+o),W.isString(r)&&i.push("domain="+r),s===!0&&i.push("secure"),document.cookie=i.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function dR(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function fR(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function n_(e,t,n){let o=!dR(t);return e&&(o||n==!1)?fR(e,t):t}const dm=e=>e instanceof gn?{...e}:e;function Zr(e,t){t=t||{};const n={};function o(u,c,d,p){return W.isPlainObject(u)&&W.isPlainObject(c)?W.merge.call({caseless:p},u,c):W.isPlainObject(c)?W.merge({},c):W.isArray(c)?c.slice():c}function r(u,c,d,p){if(W.isUndefined(c)){if(!W.isUndefined(u))return o(void 0,u,d,p)}else return o(u,c,d,p)}function s(u,c){if(!W.isUndefined(c))return o(void 0,c)}function i(u,c){if(W.isUndefined(c)){if(!W.isUndefined(u))return o(void 0,u)}else return o(void 0,c)}function a(u,c,d){if(d in t)return o(u,c);if(d in e)return o(void 0,u)}const l={url:s,method:s,data:s,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,responseEncoding:i,validateStatus:a,headers:(u,c,d)=>r(dm(u),dm(c),d,!0)};return W.forEach(Object.keys({...e,...t}),function(c){const d=l[c]||r,p=d(e[c],t[c],c);W.isUndefined(p)&&d!==a||(n[c]=p)}),n}const o_=e=>{const t=Zr({},e);let{data:n,withXSRFToken:o,xsrfHeaderName:r,xsrfCookieName:s,headers:i,auth:a}=t;t.headers=i=gn.from(i),t.url=Xb(n_(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),a&&i.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):"")));let l;if(W.isFormData(n)){if(Jt.hasStandardBrowserEnv||Jt.hasStandardBrowserWebWorkerEnv)i.setContentType(void 0);else if((l=i.getContentType())!==!1){const[u,...c]=l?l.split(";").map(d=>d.trim()).filter(Boolean):[];i.setContentType([u||"multipart/form-data",...c].join("; "))}}if(Jt.hasStandardBrowserEnv&&(o&&W.isFunction(o)&&(o=o(t)),o||o!==!1&&uR(t.url))){const u=r&&s&&cR.read(s);u&&i.set(r,u)}return t},pR=typeof XMLHttpRequest<"u",hR=pR&&function(e){return new Promise(function(n,o){const r=o_(e);let s=r.data;const i=gn.from(r.headers).normalize();let{responseType:a,onUploadProgress:l,onDownloadProgress:u}=r,c,d,p,h,m;function g(){h&&h(),m&&m(),r.cancelToken&&r.cancelToken.unsubscribe(c),r.signal&&r.signal.removeEventListener("abort",c)}let v=new XMLHttpRequest;v.open(r.method.toUpperCase(),r.url,!0),v.timeout=r.timeout;function y(){if(!v)return;const _=gn.from("getAllResponseHeaders"in v&&v.getAllResponseHeaders()),T={data:!a||a==="text"||a==="json"?v.responseText:v.response,status:v.status,statusText:v.statusText,headers:_,config:e,request:v};t_(function(D){n(D),g()},function(D){o(D),g()},T),v=null}"onloadend"in v?v.onloadend=y:v.onreadystatechange=function(){!v||v.readyState!==4||v.status===0&&!(v.responseURL&&v.responseURL.indexOf("file:")===0)||setTimeout(y)},v.onabort=function(){v&&(o(new Ve("Request aborted",Ve.ECONNABORTED,e,v)),v=null)},v.onerror=function(){o(new Ve("Network Error",Ve.ERR_NETWORK,e,v)),v=null},v.ontimeout=function(){let O=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const T=r.transitional||Jb;r.timeoutErrorMessage&&(O=r.timeoutErrorMessage),o(new Ve(O,T.clarifyTimeoutError?Ve.ETIMEDOUT:Ve.ECONNABORTED,e,v)),v=null},s===void 0&&i.setContentType(null),"setRequestHeader"in v&&W.forEach(i.toJSON(),function(O,T){v.setRequestHeader(T,O)}),W.isUndefined(r.withCredentials)||(v.withCredentials=!!r.withCredentials),a&&a!=="json"&&(v.responseType=r.responseType),u&&([p,m]=Bl(u,!0),v.addEventListener("progress",p)),l&&v.upload&&([d,h]=Bl(l),v.upload.addEventListener("progress",d),v.upload.addEventListener("loadend",h)),(r.cancelToken||r.signal)&&(c=_=>{v&&(o(!_||_.type?new ii(null,e,v):_),v.abort(),v=null)},r.cancelToken&&r.cancelToken.subscribe(c),r.signal&&(r.signal.aborted?c():r.signal.addEventListener("abort",c)));const b=iR(r.url);if(b&&Jt.protocols.indexOf(b)===-1){o(new Ve("Unsupported protocol "+b+":",Ve.ERR_BAD_REQUEST,e));return}v.send(s||null)})},mR=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let o=new AbortController,r;const s=function(u){if(!r){r=!0,a();const c=u instanceof Error?u:this.reason;o.abort(c instanceof Ve?c:new ii(c instanceof Error?c.message:c))}};let i=t&&setTimeout(()=>{i=null,s(new Ve(`timeout ${t} of ms exceeded`,Ve.ETIMEDOUT))},t);const a=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach(u=>{u.unsubscribe?u.unsubscribe(s):u.removeEventListener("abort",s)}),e=null)};e.forEach(u=>u.addEventListener("abort",s));const{signal:l}=o;return l.unsubscribe=()=>W.asap(a),l}},gR=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let o=0,r;for(;o<n;)r=o+t,yield e.slice(o,r),o=r},vR=async function*(e,t){for await(const n of yR(e))yield*gR(n,t)},yR=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:n,value:o}=await t.read();if(n)break;yield o}}finally{await t.cancel()}},fm=(e,t,n,o)=>{const r=vR(e,t);let s=0,i,a=l=>{i||(i=!0,o&&o(l))};return new ReadableStream({async pull(l){try{const{done:u,value:c}=await r.next();if(u){a(),l.close();return}let d=c.byteLength;if(n){let p=s+=d;n(p)}l.enqueue(new Uint8Array(c))}catch(u){throw a(u),u}},cancel(l){return a(l),r.return()}},{highWaterMark:2})},Ru=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",r_=Ru&&typeof ReadableStream=="function",bR=Ru&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),s_=(e,...t)=>{try{return!!e(...t)}catch{return!1}},_R=r_&&s_(()=>{let e=!1;const t=new Request(Jt.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),pm=64*1024,jd=r_&&s_(()=>W.isReadableStream(new Response("").body)),Ml={stream:jd&&(e=>e.body)};Ru&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!Ml[t]&&(Ml[t]=W.isFunction(e[t])?n=>n[t]():(n,o)=>{throw new Ve(`Response type '${t}' is not supported`,Ve.ERR_NOT_SUPPORT,o)})})})(new Response);const wR=async e=>{if(e==null)return 0;if(W.isBlob(e))return e.size;if(W.isSpecCompliantForm(e))return(await new Request(Jt.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(W.isArrayBufferView(e)||W.isArrayBuffer(e))return e.byteLength;if(W.isURLSearchParams(e)&&(e=e+""),W.isString(e))return(await bR(e)).byteLength},SR=async(e,t)=>{const n=W.toFiniteNumber(e.getContentLength());return n??wR(t)},CR=Ru&&(async e=>{let{url:t,method:n,data:o,signal:r,cancelToken:s,timeout:i,onDownloadProgress:a,onUploadProgress:l,responseType:u,headers:c,withCredentials:d="same-origin",fetchOptions:p}=o_(e);u=u?(u+"").toLowerCase():"text";let h=mR([r,s&&s.toAbortSignal()],i),m;const g=h&&h.unsubscribe&&(()=>{h.unsubscribe()});let v;try{if(l&&_R&&n!=="get"&&n!=="head"&&(v=await SR(c,o))!==0){let T=new Request(t,{method:"POST",body:o,duplex:"half"}),A;if(W.isFormData(o)&&(A=T.headers.get("content-type"))&&c.setContentType(A),T.body){const[D,P]=um(v,Bl(cm(l)));o=fm(T.body,pm,D,P)}}W.isString(d)||(d=d?"include":"omit");const y="credentials"in Request.prototype;m=new Request(t,{...p,signal:h,method:n.toUpperCase(),headers:c.normalize().toJSON(),body:o,duplex:"half",credentials:y?d:void 0});let b=await fetch(m,p);const _=jd&&(u==="stream"||u==="response");if(jd&&(a||_&&g)){const T={};["status","statusText","headers"].forEach(w=>{T[w]=b[w]});const A=W.toFiniteNumber(b.headers.get("content-length")),[D,P]=a&&um(A,Bl(cm(a),!0))||[];b=new Response(fm(b.body,pm,D,()=>{P&&P(),g&&g()}),T)}u=u||"text";let O=await Ml[W.findKey(Ml,u)||"text"](b,e);return!_&&g&&g(),await new Promise((T,A)=>{t_(T,A,{data:O,headers:gn.from(b.headers),status:b.status,statusText:b.statusText,config:e,request:m})})}catch(y){throw g&&g(),y&&y.name==="TypeError"&&/Load failed|fetch/i.test(y.message)?Object.assign(new Ve("Network Error",Ve.ERR_NETWORK,e,m),{cause:y.cause||y}):Ve.from(y,y&&y.code,e,m)}}),Vd={http:FD,xhr:hR,fetch:CR};W.forEach(Vd,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const hm=e=>`- ${e}`,xR=e=>W.isFunction(e)||e===null||e===!1,i_={getAdapter:e=>{e=W.isArray(e)?e:[e];const{length:t}=e;let n,o;const r={};for(let s=0;s<t;s++){n=e[s];let i;if(o=n,!xR(n)&&(o=Vd[(i=String(n)).toLowerCase()],o===void 0))throw new Ve(`Unknown adapter '${i}'`);if(o)break;r[i||"#"+s]=o}if(!o){const s=Object.entries(r).map(([a,l])=>`adapter ${a} `+(l===!1?"is not supported by the environment":"is not available in the build"));let i=t?s.length>1?`since :
DesignScreenshot/output/100.64.0.2_run/100.64.0.2_8083_1_initial_page.html:100:`+s):o.stack=s}catch{}}throw o}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Zr(this.defaults,n);const{transitional:o,paramsSerializer:r,headers:s}=n;o!==void 0&&ul.assertOptions(o,{silentJSONParsing:Jn.transitional(Jn.boolean),forcedJSONParsing:Jn.transitional(Jn.boolean),clarifyTimeoutError:Jn.transitional(Jn.boolean)},!1),r!=null&&(W.isFunction(r)?n.paramsSerializer={serialize:r}:ul.assertOptions(r,{encode:Jn.function,serialize:Jn.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),ul.assertOptions(n,{baseUrl:Jn.spelling("baseURL"),withXsrfToken:Jn.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let i=s&&W.merge(s.common,s[n.method]);s&&W.forEach(["delete","get","head","post","put","patch","common"],m=>{delete s[m]}),n.headers=gn.concat(i,s);const a=[];let l=!0;this.interceptors.request.forEach(function(g){typeof g.runWhen=="function"&&g.runWhen(n)===!1||(l=l&&g.synchronous,a.unshift(g.fulfilled,g.rejected))});const u=[];this.interceptors.response.forEach(function(g){u.push(g.fulfilled,g.rejected)});let c,d=0,p;if(!l){const m=[mm.bind(this),void 0];for(m.unshift(...a),m.push(...u),p=m.length,c=Promise.resolve(n);d<p;)c=c.then(m[d++],m[d++]);return c}p=a.length;let h=n;for(d=0;d<p;){const m=a[d++],g=a[d++];try{h=m(h)}catch(v){g.call(this,v);break}}try{c=mm.call(this,h)}catch(m){return Promise.reject(m)}for(d=0,p=u.length;d<p;)c=c.then(u[d++],u[d++]);return c}getUri(t){t=Zr(this.defaults,t);const n=n_(t.baseURL,t.url,t.allowAbsoluteUrls);return Xb(n,t.params,t.paramsSerializer)}};W.forEach(["delete","get","head","options"],function(t){Wr.prototype[t]=function(n,o){return this.request(Zr(o||{},{method:t,url:n,data:(o||{}).data}))}});W.forEach(["post","put","patch"],function(t){function n(o){return function(s,i,a){return this.request(Zr(a||{},{method:t,headers:o?{"Content-Type":"multipart/form-data"}:{},url:s,data:i}))}}Wr.prototype[t]=n(),Wr.prototype[t+"Form"]=n(!0)});let AR=class l_{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(s){n=s});const o=this;this.promise.then(r=>{if(!o._listeners)return;let s=o._listeners.length;for(;s-- >0;)o._listeners[s](r);o._listeners=null}),this.promise.then=r=>{let s;const i=new Promise(a=>{o.subscribe(a),s=a}).then(r);return i.cancel=function(){o.unsubscribe(s)},i},t(function(s,i,a){o.reason||(o.reason=new ii(s,i,a),n(o.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=o=>{t.abort(o)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new l_(function(r){t=r}),cancel:t}}};function OR(e){return function(n){return e.apply(null,n)}}function TR(e){return W.isObject(e)&&e.isAxiosError===!0}const Ud={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Ud).forEach(([e,t])=>{Ud[t]=e});function u_(e){const t=new Wr(e),n=Lb(Wr.prototype.request,t);return W.extend(n,Wr.prototype,t,{allOwnKeys:!0}),W.extend(n,t,null,{allOwnKeys:!0}),n.create=function(r){return u_(Zr(e,r))},n}const xt=u_(Aa);xt.Axios=Wr;xt.CanceledError=ii;xt.CancelToken=AR;xt.isCancel=e_;xt.VERSION=a_;xt.toFormData=Du;xt.AxiosError=Ve;xt.Cancel=xt.CanceledError;xt.all=function(t){return Promise.all(t)};xt.spread=OR;xt.isAxiosError=TR;xt.mergeConfig=Zr;xt.AxiosHeaders=gn;xt.formToJSON=e=>Zb(W.isHTMLForm(e)?new FormData(e):e);xt.getAdapter=i_.getAdapter;xt.HttpStatusCode=Ud;xt.default=xt;const{Axios:DL,AxiosError:RL,CanceledError:BL,isCancel:ML,CancelToken:qL,VERSION:$L,all:FL,Cancel:LL,isAxiosError:NL,spread:jL,toFormData:VL,AxiosHeaders:UL,HttpStatusCode:HL,formToJSON:zL,getAdapter:KL,mergeConfig:WL}=xt;let Hd=1;var PR=class{constructor(){Mt(this,"subscribers");Mt(this,"toasts");Mt(this,"dismissedToasts");Mt(this,"subscribe",e=>(this.subscribers.push(e),()=>{const t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}));Mt(this,"publish",e=>{this.subscribers.forEach(t=>t(e))});Mt(this,"addToast",e=>{this.publish(e),this.toasts=[...this.toasts,e]});Mt(this,"create",e=>{var i;const{message:t,...n}=e,o=typeof e.id=="number"||e.id&&((i=e.id)==null?void 0:i.length)>0?e.id:Hd++,r=this.toasts.find(a=>a.id===o),s=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(o)&&this.dismissedToasts.delete(o),r?this.toasts=this.toasts.map(a=>a.id===o?(this.publish({...a,...e,id:o,title:t}),{...a,...e,id:o,dismissible:s,title:t}):a):this.addToast({title:t,...n,dismissible:s,id:o}),o});Mt(this,"dismiss",e=>(e?(this.dismissedToasts.add(e),requestAnimationFrame(()=>this.subscribers.forEach(t=>t({id:e,dismiss:!0})))):this.toasts.forEach(t=>{this.subscribers.forEach(n=>n({id:t.id,dismiss:!0}))}),e));Mt(this,"message",(e,t)=>this.create({...t,message:e,type:"default"}));Mt(this,"error",(e,t)=>this.create({...t,type:"error",message:e}));Mt(this,"success",(e,t)=>this.create({...t,type:"success",message:e}));Mt(this,"info",(e,t)=>this.create({...t,type:"info",message:e}));Mt(this,"warning",(e,t)=>this.create({...t,type:"warning",message:e}));Mt(this,"loading",(e,t)=>this.create({...t,type:"loading",message:e}));Mt(this,"promise",(e,t)=>{if(!t)return;let n;t.loading!==void 0&&(n=this.create({...t,promise:e,type:"loading",message:t.loading,description:typeof t.description!="function"?t.description:void 0}));const o=Promise.resolve(e instanceof Function?e():e);let r=n!==void 0,s;const i=o.then(async l=>{if(s=["resolve",l],so(l))r=!1,this.create({id:n,type:"default",message:l});else if(IR(l)&&!l.ok){r=!1;const c=typeof t.error=="function"?await t.error(`HTTP error! status: ${l.status}`):t.error,d=typeof t.description=="function"?await t.description(`HTTP error! status: ${l.status}`):t.description,h=typeof c=="object"&&!so(c)?c:{message:c||"",id:n||""};this.create({id:n,type:"error",description:d,...h})}else if(l instanceof Error){r=!1;const c=typeof t.error=="function"?await t.error(l):t.error,d=typeof t.description=="function"?await t.description(l):t.description,h=typeof c=="object"&&!so(c)?c:{message:c||"",id:n||""};this.create({id:n,type:"error",description:d,...h})}else if(t.success!==void 0){r=!1;const c=typeof t.success=="function"?await t.success(l):t.success,d=typeof t.description=="function"?await t.description(l):t.description,h=typeof c=="object"&&!so(c)?c:{message:c||"",id:n||""};this.create({id:n,type:"success",description:d,...h})}}).catch(async l=>{if(s=["reject",l],t.error!==void 0){r=!1;const u=typeof t.error=="function"?await t.error(l):t.error,c=typeof t.description=="function"?await t.description(l):t.description,p=typeof u=="object"&&!so(u)?u:{message:u||"",id:n||""};this.create({id:n,type:"error",description:c,...p})}}).finally(()=>{var l;r&&(this.dismiss(n),n=void 0),(l=t.finally)==null||l.call(t)}),a=()=>new Promise((l,u)=>i.then(()=>s[0]==="reject"?u(s[1]):l(s[1])).catch(u));return typeof n!="string"&&typeof n!="number"?{unwrap:a}:Object.assign(n,{unwrap:a})});Mt(this,"custom",(e,t)=>{const n=(t==null?void 0:t.id)||Hd++;return this.publish({component:e,id:n,...t}),n});Mt(this,"getActiveToasts",()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)));this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}};const hn=new PR;function kR(e,t){const n=(t==null?void 0:t.id)||Hd++;return hn.create({message:e,id:n,type:"default",...t}),n}const IR=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",DR=kR,RR=()=>hn.toasts,BR=()=>hn.getActiveToasts(),Bi=Object.assign(DR,{success:hn.success,info:hn.info,warning:hn.warning,error:hn.error,custom:hn.custom,message:hn.message,promise:hn.promise,dismiss:hn.dismiss,loading:hn.loading},{getHistory:RR,getToasts:BR});function Wa(e){return e.label!==void 0}const MR=3,c_="24px",d_="16px",vm=4e3,qR=356,$R=14,FR=45,f_=200;function LR(){const e=N(!1);return ut(()=>{const t=()=>{e.value=document.hidden};return document.addEventListener("visibilitychange",t),()=>window.removeEventListener("visibilitychange",t)}),{isDocumentHidden:e}}function Go(...e){return e.filter(Boolean).join(" ")}function NR(e){const[t,n]=e.split("-"),o=[];return t&&o.push(t),n&&o.push(n),o}function jR(e,t){const n={};return[e,t].forEach((o,r)=>{const s=r===1,i=s?"--mobile-offset":"--offset",a=s?d_:c_;function l(u){["top","right","bottom","left"].forEach(c=>{n[`${i}-${c}`]=typeof u=="number"?`${u}px`:u})}typeof o=="number"||typeof o=="string"?l(o):typeof o=="object"?["top","right","bottom","left"].forEach(u=>{o[u]===void 0?n[`${i}-${u}`]=a:n[`${i}-${u}`]=typeof o[u]=="number"?`${o[u]}px`:o[u]}):l(a)}),n}const VR=["data-rich-colors","data-styled","data-mounted","data-promise","data-swiped","data-removed","data-visible","data-y-position","data-x-position","data-index","data-front","data-swiping","data-dismissible","data-type","data-invert","data-swipe-out","data-swipe-direction","data-expanded"],UR=["aria-label","data-disabled"];var HR=F({__name:"Toast",props:{toast:{},toasts:{},index:{},swipeDirections:{},expanded:{type:Boolean},invert:{type:Boolean},heights:{},gap:{},position:{},visibleToasts:{},expandByDefault:{type:Boolean},closeButton:{type:Boolean},interacting:{type:Boolean},style:{},cancelButtonStyle:{},actionButtonStyle:{},duration:{},class:{},unstyled:{type:Boolean},descriptionClass:{},loadingIcon:{},classes:{},icons:{},closeButtonAriaLabel:{},defaultRichColors:{type:Boolean}},emits:["update:heights","update:height","removeToast"],setup(e,{emit:t}){const n=e,o=t,r=N(null),s=N(null),i=N(!1),a=N(!1),l=N(!1),u=N(!1),c=N(!1),d=N(0),p=N(0),h=N(n.toast.duration||n.duration||vm),m=N(null),g=N(null),v=U(()=>n.index===0),y=U(()=>n.index+1<=n.visibleToasts),b=U(()=>n.toast.type),_=U(()=>n.toast.dismissible!==!1),O=U(()=>n.toast.class||""),T=U(()=>n.descriptionClass||""),A=U(()=>{const x=n.toast.position||n.position,H=n.heights.filter(X=>X.position===x).findIndex(X=>X.toastId===n.toast.id);return H>=0?H:0}),D=U(()=>{const x=n.toast.position||n.position;return n.heights.filter(H=>H.position===x).reduce((H,X,pe)=>pe>=A.value?H:H+X.height,0)}),P=U(()=>A.value*n.gap+D.value||0),w=U(()=>n.toast.closeButton??n.closeButton),k=U(()=>n.toast.duration||n.duration||vm),$=N(0),R=N(0),G=N(null),J=U(()=>n.position.split("-")),ne=U(()=>J.value[0]),ae=U(()=>J.value[1]),re=U(()=>typeof n.toast.title!="string"),L=U(()=>typeof n.toast.description!="string"),{isDocumentHidden:oe}=LR(),Y=U(()=>b.value&&b.value==="loading");je(()=>{i.value=!0,h.value=k.value}),ut(async()=>{if(!i.value||!g.value)return;await We();const x=g.value,z=x.style.height;x.style.height="auto";const H=x.getBoundingClientRect().height;x.style.height=z,p.value=H,o("update:height",{toastId:n.toast.id,height:H,position:n.toast.position||n.position})});function ee(){a.value=!0,d.value=P.value,setTimeout(()=>{o("removeToast",n.toast)},f_)}function le(){var x,z;if(Y.value||!_.value)return{};ee(),(z=(x=n.toast).onDismiss)==null||z.call(x,n.toast)}function ye(x){Y.value||!_.value||(m.value=new Date,d.value=P.value,x.target.setPointerCapture(x.pointerId),x.target.tagName!=="BUTTON"&&(l.value=!0,G.value={x:x.clientX,y:x.clientY}))}function me(){var S,I,j,K,Z,Q,ue;if(u.value||!_.value)return;G.value=null;const x=Number(((S=g.value)==null?void 0:S.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),z=Number(((I=g.value)==null?void 0:I.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),H=new Date().getTime()-(((j=m.value)==null?void 0:j.getTime())||0),X=r.value==="x"?x:z,pe=Math.abs(X)/H;if(Math.abs(X)>=FR||pe>.11){d.value=P.value,(Z=(K=n.toast).onDismiss)==null||Z.call(K,n.toast),r.value==="x"?s.value=x>0?"right":"left":s.value=z>0?"down":"up",ee(),u.value=!0;return}else(Q=g.value)==null||Q.style.setProperty("--swipe-amount-x","0px"),(ue=g.value)==null||ue.style.setProperty("--swipe-amount-y","0px");c.value=!1,l.value=!1,r.value=null}function Pe(x){var j,K,Z,Q;if(!G.value||!_.value||(((K=(j=window==null?void 0:window.getSelection())==null?void 0:j.toString())==null?void 0:K.length)??!1))return;const H=x.clientY-G.value.y,X=x.clientX-G.value.x,pe=n.swipeDirections??NR(n.position);!r.value&&(Math.abs(X)>1||Math.abs(H)>1)&&(r.value=Math.abs(X)>Math.abs(H)?"x":"y");let S={x:0,y:0};const I=ue=>1/(1.5+Math.abs(ue)/20);if(r.value==="y"){if(pe.includes("top")||pe.includes("bottom"))if(pe.includes("top")&&H<0||pe.includes("bottom")&&H>0)S.y=H;else{const ue=H*I(H);S.y=Math.abs(ue)<Math.abs(H)?ue:H}}else if(r.value==="x"&&(pe.includes("left")||pe.includes("right")))if(pe.includes("left")&&X<0||pe.includes("right")&&X>0)S.x=X;else{const ue=X*I(X);S.x=Math.abs(ue)<Math.abs(X)?ue:X}(Math.abs(S.x)>0||Math.abs(S.y)>0)&&(c.value=!0),(Z=g.value)==null||Z.style.setProperty("--swipe-amount-x",`${S.x}px`),(Q=g.value)==null||Q.style.setProperty("--swipe-amount-y",`${S.y}px`)}je(()=>{if(i.value=!0,!g.value)return;const x=g.value.getBoundingClientRect().height;p.value=x;const z=[{toastId:n.toast.id,height:x,position:n.toast.position},...n.heights];o("update:heights",z)}),Ys(()=>{g.value&&o("removeToast",n.toast)}),ut(x=>{if(n.toast.promise&&b.value==="loading"||n.toast.duration===1/0||n.toast.type==="loading")return;let z;const H=()=>{if(R.value<$.value){const pe=new Date().getTime()-$.value;h.value=h.value-pe}R.value=new Date().getTime()},X=()=>{h.value!==1/0&&($.value=new Date().getTime(),z=setTimeout(()=>{var pe,S;(S=(pe=n.toast).onAutoClose)==null||S.call(pe,n.toast),ee()},h.value))};n.expanded||n.interacting||oe.value?H():X(),x(()=>{clearTimeout(z)})}),Ce(()=>n.toast.delete,x=>{x!==void 0&&x&&ee()},{deep:!0});function Se(){l.value=!1,r.value=null,G.value=null}return(x,z)=>{var H,X,pe,S,I,j,K,Z,Q,ue,fe,de,se,xe,ge,Ee,ke,He,tt,Ye,At,mt,$t,Ft,yn,Cr,Bt;return C(),ie("li",{tabindex:"0",ref_key:"toastRef",ref:g,class:qe(f(Go)(n.class,O.value,(H=x.classes)==null?void 0:H.toast,(X=x.toast.classes)==null?void 0:X.toast,(pe=x.classes)==null?void 0:pe[b.value],(I=(S=x.toast)==null?void 0:S.classes)==null?void 0:I[b.value])),"data-sonner-toast":"","data-rich-colors":x.toast.richColors??x.defaultRichColors,"data-styled":!(x.toast.component||(j=x.toast)!=null&&j.unstyled||x.unstyled),"data-mounted":i.value,"data-promise":!!x.toast.promise,"data-swiped":c.value,"data-removed":a.value,"data-visible":y.value,"data-y-position":ne.value,"data-x-position":ae.value,"data-index":x.index,"data-front":v.value,"data-swiping":l.value,"data-dismissible":_.value,"data-type":b.value,"data-invert":x.toast.invert||x.invert,"data-swipe-out":u.value,"data-swipe-direction":s.value,"data-expanded":!!(x.expanded||x.expandByDefault&&i.value),style:Pt({"--index":x.index,"--toasts-before":x.index,"--z-index":x.toasts.length-x.index,"--offset":`${a.value?d.value:P.value}px`,"--initial-height":x.expandByDefault?"auto":`${p.value}px`,...x.style,...n.toast.style}),onDragend:Se,onPointerdown:ye,onPointerup:me,onPointermove:Pe},[w.value&&!x.toast.component&&b.value!=="loading"?(C(),ie("button",{key:0,"aria-label":x.closeButtonAriaLabel||"Close toast","data-disabled":Y.value,"data-close-button":"true",class:qe(f(Go)((K=x.classes)==null?void 0:K.closeButton,(Q=(Z=x.toast)==null?void 0:Z.classes)==null?void 0:Q.closeButton)),onClick:le},[(ue=x.icons)!=null&&ue.close?(C(),B(ro((fe=x.icons)==null?void 0:fe.close),{key:0})):V(x.$slots,"close-icon",{key:1})],10,UR)):Be("v-if",!0),x.toast.component?(C(),B(ro(x.toast.component),te({key:1},x.toast.componentProps,{onCloseToast:le}),null,16)):(C(),ie(Ie,{key:2},[b.value!=="default"||x.toast.icon||x.toast.promise?(C(),ie("div",{key:0,"data-icon":"",class:qe(f(Go)((de=x.classes)==null?void 0:de.icon,(xe=(se=x.toast)==null?void 0:se.classes)==null?void 0:xe.icon))},[x.toast.icon?(C(),B(ro(x.toast.icon),{key:0})):(C(),ie(Ie,{key:1},[b.value==="loading"?V(x.$slots,"loading-icon",{key:0}):b.value==="success"?V(x.$slots,"success-icon",{key:1}):b.value==="error"?V(x.$slots,"error-icon",{key:2}):b.value==="warning"?V(x.$slots,"warning-icon",{key:3}):b.value==="info"?V(x.$slots,"info-icon",{key:4}):Be("v-if",!0)],64))],2)):Be("v-if",!0),ce("div",{"data-content":"",class:qe(f(Go)((ge=x.classes)==null?void 0:ge.content,(ke=(Ee=x.toast)==null?void 0:Ee.classes)==null?void 0:ke.content))},[ce("div",{"data-title":"",class:qe(f(Go)((He=x.classes)==null?void 0:He.title,(tt=x.toast.classes)==null?void 0:tt.title))},[re.value?(C(),B(ro(x.toast.title),ct(te({key:0},x.toast.componentProps)),null,16)):(C(),ie(Ie,{key:1},[rt(Ne(x.toast.title),1)],64))],2),x.toast.description?(C(),ie("div",{key:0,"data-description":"",class:qe(f(Go)(x.descriptionClass,T.value,(Ye=x.classes)==null?void 0:Ye.description,(At=x.toast.classes)==null?void 0:At.description))},[L.value?(C(),B(ro(x.toast.description),ct(te({key:0},x.toast.componentProps)),null,16)):(C(),ie(Ie,{key:1},[rt(Ne(x.toast.description),1)],64))],2)):Be("v-if",!0)],2),x.toast.cancel?(C(),ie("button",{key:1,style:Pt(x.toast.cancelButtonStyle||x.cancelButtonStyle),class:qe(f(Go)((mt=x.classes)==null?void 0:mt.cancelButton,($t=x.toast.classes)==null?void 0:$t.cancelButton)),"data-button":"","data-cancel":"",onClick:z[0]||(z[0]=Lt=>{var Qn,Yn;f(Wa)(x.toast.cancel)&&_.value&&((Yn=(Qn=x.toast.cancel).onClick)==null||Yn.call(Qn,Lt),ee())})},Ne(f(Wa)(x.toast.cancel)?(Ft=x.toast.cancel)==null?void 0:Ft.label:x.toast.cancel),7)):Be("v-if",!0),x.toast.action?(C(),ie("button",{key:2,style:Pt(x.toast.actionButtonStyle||x.actionButtonStyle),class:qe(f(Go)((yn=x.classes)==null?void 0:yn.actionButton,(Cr=x.toast.classes)==null?void 0:Cr.actionButton)),"data-button":"","data-action":"",onClick:z[1]||(z[1]=Lt=>{var Qn,Yn;f(Wa)(x.toast.action)&&((Yn=(Qn=x.toast.action).onClick)==null||Yn.call(Qn,Lt),!Lt.defaultPrevented&&ee())})},Ne(f(Wa)(x.toast.action)?(Bt=x.toast.action)==null?void 0:Bt.label:x.toast.action),7)):Be("v-if",!0)],64))],46,VR)}}}),zR=HR,Oa=(e,t)=>{const n=e.__vccOpts||e;for(const[o,r]of t)n[o]=r;return n};const KR={},WR={xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stoke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"};function GR(e,t){return C(),ie("svg",WR,t[0]||(t[0]=[ce("line",{x1:"18",y1:"6",x2:"6",y2:"18"},null,-1),ce("line",{x1:"6",y1:"6",x2:"18",y2:"18"},null,-1)]))}var QR=Oa(KR,[["render",GR]]);const YR=["data-visible"],XR={class:"sonner-spinner"};var JR=F({__name:"Loader",props:{visible:{type:Boolean}},setup(e){const t=Array(12).fill(0);return(n,o)=>(C(),ie("div",{class:"sonner-loading-wrapper","data-visible":n.visible},[ce("div",XR,[(C(!0),ie(Ie,null,wt(f(t),r=>(C(),ie("div",{key:`spinner-bar-${r}`,class:"sonner-loading-bar"}))),128))])],8,YR))}}),ZR=JR;const eB={},tB={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"};function nB(e,t){return C(),ie("svg",tB,t[0]||(t[0]=[ce("path",{"fill-rule":"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z","clip-rule":"evenodd"},null,-1)]))}var oB=Oa(eB,[["render",nB]]);const rB={},sB={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"};function iB(e,t){return C(),ie("svg",sB,t[0]||(t[0]=[ce("path",{"fill-rule":"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z","clip-rule":"evenodd"},null,-1)]))}var aB=Oa(rB,[["render",iB]]);const lB={},uB={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"};function cB(e,t){return C(),ie("svg",uB,t[0]||(t[0]=[ce("path",{"fill-rule":"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z","clip-rule":"evenodd"},null,-1)]))}var dB=Oa(lB,[["render",cB]]);const fB={},pB={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"};function hB(e,t){return C(),ie("svg",pB,t[0]||(t[0]=[ce("path",{"fill-rule":"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z","clip-rule":"evenodd"},null,-1)]))}var mB=Oa(fB,[["render",hB]]);const gB=["aria-label"],vB=["data-sonner-theme","dir","data-theme","data-rich-colors","data-y-position","data-x-position","data-lifted"],yB=typeof window<"u"&&typeof document<"u";function bB(){if(typeof window>"u"||typeof document>"u")return"ltr";const e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}var _B=F({name:"Toaster",inheritAttrs:!1,__name:"Toaster",props:{invert:{type:Boolean,default:!1},theme:{default:"light"},position:{default:"bottom-right"},hotkey:{default:()=>["altKey","KeyT"]},richColors:{type:Boolean,default:!1},expand:{type:Boolean,default:!1},duration:{},gap:{default:$R},visibleToasts:{default:MR},closeButton:{type:Boolean,default:!1},toastOptions:{default:()=>({})},class:{default:""},style:{},offset:{default:c_},mobileOffset:{default:d_},dir:{default:"auto"},swipeDirections:{},icons:{},containerAriaLabel:{default:"Notifications"}},setup(e){const t=e,n=g0(),o=N([]);function r(w,k){return o.value.filter($=>!$.position&&k===0||$.position===w)}const s=U(()=>{const w=o.value.filter(k=>k.position).map(k=>k.position);return w.length>0?Array.from(new Set([t.position].concat(w))):[t.position]}),i=U(()=>{const w={};return s.value.forEach(k=>{w[k]=o.value.filter($=>$.position===k)}),w}),a=N([]),l=N(!1),u=N(!1),c=N(t.theme!=="system"?t.theme:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),d=N(null),p=N(null),h=N(!1),m=t.hotkey.join("+").replace(/Key/g,"").replace(/Digit/g,"");function g(w){var k;(k=o.value.find($=>$.id===w.id))!=null&&k.delete||hn.dismiss(w.id),o.value=o.value.filter(({id:$})=>$!==w.id),setTimeout(()=>{o.value.find($=>$.id===w.id)||(a.value=a.value.filter($=>$.toastId!==w.id))},f_+50)}function v(w){var k,$;h.value&&!(($=(k=w.currentTarget)==null?void 0:k.contains)!=null&&$.call(k,w.relatedTarget))&&(h.value=!1,p.value&&(p.value.focus({preventScroll:!0}),p.value=null))}function y(w){w.target instanceof HTMLElement&&w.target.dataset.dismissible==="false"||h.value||(h.value=!0,p.value=w.relatedTarget)}function b(w){w.target&&w.target instanceof HTMLElement&&w.target.dataset.dismissible==="false"||(u.value=!0)}ut(w=>{const k=hn.subscribe($=>{if($.dismiss){requestAnimationFrame(()=>{o.value=o.value.map(R=>R.id===$.id?{...R,delete:!0}:R)});return}We(()=>{const R=o.value.findIndex(G=>G.id===$.id);R!==-1?o.value=[...o.value.slice(0,R),{...o.value[R],...$},...o.value.slice(R+1)]:o.value=[$,...o.value]})});w(k)}),ut(w=>{if(typeof window>"u")return;if(t.theme!=="system"){c.value=t.theme;return}const k=window.matchMedia("(prefers-color-scheme: dark)"),$=G=>{c.value=G?"dark":"light"};$(k.matches);const R=G=>{$(G.matches)};try{k.addEventListener("change",R)}catch{k.addListener(R)}w(()=>{try{k.removeEventListener("change",R)}catch{k.removeListener(R)}})}),ut(()=>{d.value&&p.value&&(p.value.focus({preventScroll:!0}),p.value=null,h.value=!1)}),ut(()=>{o.value.length<=1&&(l.value=!1)}),ut(w=>{function k($){const R=t.hotkey.every(ne=>$[ne]||$.code===ne),G=Array.isArray(d.value)?d.value[0]:d.value;R&&(l.value=!0,G==null||G.focus());const J=document.activeElement===d.value||(G==null?void 0:G.contains(document.activeElement));$.code==="Escape"&&J&&(l.value=!1)}yB&&(document.addEventListener("keydown",k),w(()=>{document.removeEventListener("keydown",k)}))});function _(){l.value=!0}function O(){u.value||(l.value=!1)}function T(){l.value=!1}function A(){u.value=!1}function D(w){a.value=w}function P(w){const k=a.value.findIndex($=>$.toastId===w.toastId);if(k!==-1)a.value[k]=w;else{const $=a.value.findIndex(R=>R.position===w.position);$!==-1?a.value.splice($,0,w):a.value.unshift(w)}}return(w,k)=>(C(),ie(Ie,null,[Be(" Remove item from normal navigation flow, only available via hotkey "),ce("section",{"aria-label":`${w.containerAriaLabel} ${f(m)}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false"},[(C(!0),ie(Ie,null,wt(s.value,($,R)=>{var G;return C(),ie("ol",te({key:$,ref_for:!0,ref_key:"listRef",ref:d,"data-sonner-toaster":"","data-sonner-theme":c.value,class:t.class,dir:w.dir==="auto"?bB():w.dir,tabIndex:-1,"data-theme":w.theme,"data-rich-colors":w.richColors,"data-y-position":$.split("-")[0],"data-x-position":$.split("-")[1],"data-lifted":l.value&&o.value.length>1&&!w.expand,style:{"--front-toast-height":`${((G=a.value[0])==null?void 0:G.height)||0}px`,"--width":`${f(qR)}px`,"--gap":`${w.gap}px`,...w.style,...f(n).style,...f(jR)(w.offset,w.mobileOffset)}},w.$attrs,{onBlur:v,onFocus:y,onMouseenter:_,onMousemove:_,onMouseleave:O,onDragend:T,onPointerdown:b,onPointerup:A}),[(C(!0),ie(Ie,null,wt(r($,R),(J,ne)=>{var ae,re,L,oe,Y,ee,le,ye,me,Pe;return C(),B(zR,{key:J.id,heights:a.value,icons:w.icons,index:ne,toast:J,defaultRichColors:w.richColors,duration:((ae=w.toastOptions)==null?void 0:ae.duration)??w.duration,class:qe(((re=w.toastOptions)==null?void 0:re.class)??""),descriptionClass:(L=w.toastOptions)==null?void 0:L.descriptionClass,invert:w.invert,visibleToasts:w.visibleToasts,closeButton:((oe=w.toastOptions)==null?void 0:oe.closeButton)??w.closeButton,interacting:u.value,position:$,style:Pt((Y=w.toastOptions)==null?void 0:Y.style),unstyled:(ee=w.toastOptions)==null?void 0:ee.unstyled,classes:(le=w.toastOptions)==null?void 0:le.classes,cancelButtonStyle:(ye=w.toastOptions)==null?void 0:ye.cancelButtonStyle,actionButtonStyle:(me=w.toastOptions)==null?void 0:me.actionButtonStyle,"close-button-aria-label":(Pe=w.toastOptions)==null?void 0:Pe.closeButtonAriaLabel,toasts:i.value[$],expandByDefault:w.expand,gap:w.gap,expanded:l.value,swipeDirections:t.swipeDirections,"onUpdate:heights":D,"onUpdate:height":P,onRemoveToast:g},{"close-icon":E(()=>[V(w.$slots,"close-icon",{},()=>[q(QR)])]),"loading-icon":E(()=>[V(w.$slots,"loading-icon",{},()=>[q(ZR,{visible:J.type==="loading"},null,8,["visible"])])]),"success-icon":E(()=>[V(w.$slots,"success-icon",{},()=>[q(oB)])]),"error-icon":E(()=>[V(w.$slots,"error-icon",{},()=>[q(mB)])]),"warning-icon":E(()=>[V(w.$slots,"warning-icon",{},()=>[q(dB)])]),"info-icon":E(()=>[V(w.$slots,"info-icon",{},()=>[q(aB)])]),_:2},1032,["heights","icons","index","toast","defaultRichColors","duration","class","descriptionClass","invert","visibleToasts","closeButton","interacting","position","style","unstyled","classes","cancelButtonStyle","actionButtonStyle","close-button-aria-label","toasts","expandByDefault","gap","expanded","swipeDirections"])}),128))],16,vB)}),128))],8,gB)],2112))}}),wB=_B;const ko=xt.create({baseURL:"https://api.beenglish.eu.org/DesignScreenshot/admin-api",timeout:12e4,headers:{"Content-Type":"application/json"}});let bc=!1;const _c=[],SB=async()=>{try{const e=localStorage.getItem("refreshToken");if(!e)throw new Error("No refresh token found");const t=await xt.post(`/system/auth/refresh-token?refreshToken=${e}`),{token:n,refreshToken:o}=t.data;return localStorage.setItem("accessToken",n),localStorage.setItem("refreshToken",o),n}catch(e){return localStorage.removeItem("accessToken"),localStorage.removeItem("refreshToken"),window.location.href="/auth",Promise.reject(e)}};ko.interceptors.request.use(e=>{const t=localStorage.getItem("accessToken");return t&&e.headers&&(e.headers.Authorization=`Bearer ${t}`),e},e=>Promise.reject(e));ko.interceptors.response.use(async e=>{const{data:t,status:n}=e;if(n!==200)return Bi.error(t.msg||"请求失败"),Promise.reject(new Error(t.msg||"请求失败"));if(t.code===401){const o=e.config;if(!o._retry){if(bc)return new Promise(r=>{_c.push(s=>{o.headers&&(o.headers.Authorization=`Bearer ${s}`),r(ko(o))})});o._retry=!0,bc=!0;try{const r=await SB();return o.headers&&(o.headers.Authorization=`Bearer ${r}`),_c.forEach(s=>s(r)),_c.length=0,ko(o)}catch(r){return Promise.reject(r)}finally{bc=!1}}}return t.code===0?t.data:(Bi.error(t.msg||"请求失败"),Promise.reject(new Error(t.msg||"请求失败")))},e=>{const t=e.message||"网络错误";return Bi.error(t),Promise.reject(e)});const wr=(e,t)=>ko.get(e,{params:t}),Sr=(e,t,n)=>ko.post(e,t,n),p_=(e,t)=>ko.put(e,t),h_=(e,t)=>ko.delete(e,{params:t}),GL=(e,t)=>ko.post(e,t,{headers:{"Content-Type":"multipart/form-data"}}),CB=e=>wr("/admin/app/page",e),xB=e=>wr("/admin/app/get-app-details",{appId:e}),EB=e=>wr("/admin/app/list",e),QL=e=>Sr("/admin/app/create",e),YL=e=>p_("/admin/app/update",e),XL=e=>h_("/admin/app/delete",e),ep=Symbol("platform"),m_=bf("app",()=>{const e=N([]);return{apps:e,fetchApps:async n=>{const o=await EB({platform:n});e.value=o}}});/*!
DesignScreenshot/output/100.64.0.2_run/100.64.0.2_8083_1_initial_page.html:104:  */const ms=typeof document<"u";function g_(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function AB(e){return e.__esModule||e[Symbol.toStringTag]==="Module"||e.default&&g_(e.default)}const st=Object.assign;function wc(e,t){const n={};for(const o in t){const r=t[o];n[o]=Kn(r)?r.map(e):e(r)}return n}const Mi=()=>{},Kn=Array.isArray,v_=/#/g,OB=/&/g,TB=/\//g,PB=/=/g,kB=/\?/g,y_=/\+/g,IB=/%5B/g,DB=/%5D/g,b_=/%5E/g,RB=/%60/g,__=/%7B/g,BB=/%7C/g,w_=/%7D/g,MB=/%20/g;function tp(e){return encodeURI(""+e).replace(BB,"|").replace(IB,"[").replace(DB,"]")}function qB(e){return tp(e).replace(__,"{").replace(w_,"}").replace(b_,"^")}function zd(e){return tp(e).replace(y_,"%2B").replace(MB,"+").replace(v_,"%23").replace(OB,"%26").replace(RB,"`").replace(__,"{").replace(w_,"}").replace(b_,"^")}function $B(e){return zd(e).replace(PB,"%3D")}function FB(e){return tp(e).replace(v_,"%23").replace(kB,"%3F")}function LB(e){return e==null?"":FB(e).replace(TB,"%2F")}function ra(e){try{return decodeURIComponent(""+e)}catch{}return""+e}const NB=/\/$/,jB=e=>e.replace(NB,"");function Sc(e,t,n="/"){let o,r={},s="",i="";const a=t.indexOf("#");let l=t.indexOf("?");return a<l&&a>=0&&(l=-1),l>-1&&(o=t.slice(0,l),s=t.slice(l+1,a>-1?a:t.length),r=e(s)),a>-1&&(o=o||t.slice(0,a),i=t.slice(a,t.length)),o=zB(o??t,n),{fullPath:o+(s&&"?")+s+i,path:o,query:r,hash:ra(i)}}function VB(e,t){const n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}function ym(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function UB(e,t,n){const o=t.matched.length-1,r=n.matched.length-1;return o>-1&&o===r&&Hs(t.matched[o],n.matched[r])&&S_(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function Hs(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function S_(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(!HB(e[n],t[n]))return!1;return!0}function HB(e,t){return Kn(e)?bm(e,t):Kn(t)?bm(t,e):e===t}function bm(e,t){return Kn(t)?e.length===t.length&&e.every((n,o)=>n===t[o]):e.length===1&&e[0]===t}function zB(e,t){if(e.startsWith("/"))return e;if(!e)return t;const n=t.split("/"),o=e.split("/"),r=o[o.length-1];(r===".."||r===".")&&o.push("");let s=n.length-1,i,a;for(i=0;i<o.length;i++)if(a=o[i],a!==".")if(a==="..")s>1&&s--;else break;return n.slice(0,s).join("/")+"/"+o.slice(i).join("/")}const Qo={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0};var sa;(function(e){e.pop="pop",e.push="push"})(sa||(sa={}));var qi;(function(e){e.back="back",e.forward="forward",e.unknown=""})(qi||(qi={}));function KB(e){if(!e)if(ms){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),jB(e)}const WB=/^[^#]+#/;function GB(e,t){return e.replace(WB,"#")+t}function QB(e,t){const n=document.documentElement.getBoundingClientRect(),o=e.getBoundingClientRect();return{behavior:t.behavior,left:o.left-n.left-(t.left||0),top:o.top-n.top-(t.top||0)}}const Mu=()=>({left:window.scrollX,top:window.scrollY});function YB(e){let t;if("el"in e){const n=e.el,o=typeof n=="string"&&n.startsWith("#"),r=typeof n=="string"?o?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!r)return;t=QB(r,e)}else t=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left!=null?t.left:window.scrollX,t.top!=null?t.top:window.scrollY)}function _m(e,t){return(history.state?history.state.position-t:-1)+e}const Kd=new Map;function XB(e,t){Kd.set(e,t)}function JB(e){const t=Kd.get(e);return Kd.delete(e),t}let ZB=()=>location.protocol+"//"+location.host;function C_(e,t){const{pathname:n,search:o,hash:r}=t,s=e.indexOf("#");if(s>-1){let a=r.includes(e.slice(s))?e.slice(s).length:1,l=r.slice(a);return l[0]!=="/"&&(l="/"+l),ym(l,"")}return ym(n,e)+o+r}function eM(e,t,n,o){let r=[],s=[],i=null;const a=({state:p})=>{const h=C_(e,location),m=n.value,g=t.value;let v=0;if(p){if(n.value=h,t.value=p,i&&i===m){i=null;return}v=g?p.position-g.position:0}else o(h);r.forEach(y=>{y(n.value,m,{delta:v,type:sa.pop,direction:v?v>0?qi.forward:qi.back:qi.unknown})})};function l(){i=n.value}function u(p){r.push(p);const h=()=>{const m=r.indexOf(p);m>-1&&r.splice(m,1)};return s.push(h),h}function c(){const{history:p}=window;p.state&&p.replaceState(st({},p.state,{scroll:Mu()}),"")}function d(){for(const p of s)p();s=[],window.removeEventListener("popstate",a),window.removeEventListener("beforeunload",c)}return window.addEventListener("popstate",a),window.addEventListener("beforeunload",c,{passive:!0}),{pauseListeners:l,listen:u,destroy:d}}function wm(e,t,n,o=!1,r=!1){return{back:e,current:t,forward:n,replaced:o,position:window.history.length,scroll:r?Mu():null}}function tM(e){const{history:t,location:n}=window,o={value:C_(e,n)},r={value:t.state};r.value||s(o.value,{back:null,current:o.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function s(l,u,c){const d=e.indexOf("#"),p=d>-1?(n.host&&document.querySelector("base")?e:e.slice(d))+l:ZB()+e+l;try{t[c?"replaceState":"pushState"](u,"",p),r.value=u}catch(h){console.error(h),n[c?"replace":"assign"](p)}}function i(l,u){const c=st({},t.state,wm(r.value.back,l,r.value.forward,!0),u,{position:r.value.position});s(l,c,!0),o.value=l}function a(l,u){const c=st({},r.value,t.state,{forward:l,scroll:Mu()});s(c.current,c,!0);const d=st({},wm(o.value,l,null),{position:c.position+1},u);s(l,d,!1),o.value=l}return{location:o,state:r,push:a,replace:i}}function nM(e){e=KB(e);const t=tM(e),n=eM(e,t.state,t.location,t.replace);function o(s,i=!0){i||n.pauseListeners(),history.go(s)}const r=st({location:"",base:e,go:o,createHref:GB.bind(null,e)},t,n);return Object.defineProperty(r,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(r,"state",{enumerable:!0,get:()=>t.state.value}),r}function oM(e){return typeof e=="string"||e&&typeof e=="object"}function x_(e){return typeof e=="string"||typeof e=="symbol"}const E_=Symbol("");var Sm;(function(e){e[e.aborted=4]="aborted",e[e.cancelled=8]="cancelled",e[e.duplicated=16]="duplicated"})(Sm||(Sm={}));function zs(e,t){return st(new Error,{type:e,[E_]:!0},t)}function So(e,t){return e instanceof Error&&E_ in e&&(t==null||!!(e.type&t))}const Cm="[^/]+?",rM={sensitive:!1,strict:!1,start:!0,end:!0},sM=/[.+*?^${}()[\]/\\]/g;function iM(e,t){const n=st({},rM,t),o=[];let r=n.start?"^":"";const s=[];for(const u of e){const c=u.length?[]:[90];n.strict&&!u.length&&(r+="/");for(let d=0;d<u.length;d++){const p=u[d];let h=40+(n.sensitive?.25:0);if(p.type===0)d||(r+="/"),r+=p.value.replace(sM,"\\$&"),h+=40;else if(p.type===1){const{value:m,repeatable:g,optional:v,regexp:y}=p;s.push({name:m,repeatable:g,optional:v});const b=y||Cm;if(b!==Cm){h+=10;try{new RegExp(`(${b})`)}catch(O){throw new Error(`Invalid custom RegExp for param "${m}" (${b}): `+O.message)}}let _=g?`((?:${b})(?:/(?:${b}))*)`:`(${b})`;d||(_=v&&u.length<2?`(?:/${_})`:"/"+_),v&&(_+="?"),r+=_,h+=20,v&&(h+=-8),g&&(h+=-20),b===".*"&&(h+=-50)}c.push(h)}o.push(c)}if(n.strict&&n.end){const u=o.length-1;o[u][o[u].length-1]+=.7000000000000001}n.strict||(r+="/?"),n.end?r+="$":n.strict&&!r.endsWith("/")&&(r+="(?:/|$)");const i=new RegExp(r,n.sensitive?"":"i");function a(u){const c=u.match(i),d={};if(!c)return null;for(let p=1;p<c.length;p++){const h=c[p]||"",m=s[p-1];d[m.name]=h&&m.repeatable?h.split("/"):h}return d}function l(u){let c="",d=!1;for(const p of e){(!d||!c.endsWith("/"))&&(c+="/"),d=!1;for(const h of p)if(h.type===0)c+=h.value;else if(h.type===1){const{value:m,repeatable:g,optional:v}=h,y=m in u?u[m]:"";if(Kn(y)&&!g)throw new Error(`Provided param "${m}" is an array but it is not repeatable (* or + modifiers)`);const b=Kn(y)?y.join("/"):y;if(!b)if(v)p.length<2&&(c.endsWith("/")?c=c.slice(0,-1):d=!0);else throw new Error(`Missing required param "${m}"`);c+=b}}return c||"/"}return{re:i,score:o,keys:s,parse:a,stringify:l}}function aM(e,t){let n=0;for(;n<e.length&&n<t.length;){const o=t[n]-e[n];if(o)return o;n++}return e.length<t.length?e.length===1&&e[0]===80?-1:1:e.length>t.length?t.length===1&&t[0]===80?1:-1:0}function A_(e,t){let n=0;const o=e.score,r=t.score;for(;n<o.length&&n<r.length;){const s=aM(o[n],r[n]);if(s)return s;n++}if(Math.abs(r.length-o.length)===1){if(xm(o))return 1;if(xm(r))return-1}return r.length-o.length}function xm(e){const t=e[e.length-1];return e.length>0&&t[t.length-1]<0}const lM={type:0,value:""},uM=/[a-zA-Z0-9_]/;function cM(e){if(!e)return[[]];if(e==="/")return[[lM]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(h){throw new Error(`ERR (${n})/"${u}": ${h}`)}let n=0,o=n;const r=[];let s;function i(){s&&r.push(s),s=[]}let a=0,l,u="",c="";function d(){u&&(n===0?s.push({type:0,value:u}):n===1||n===2||n===3?(s.length>1&&(l==="*"||l==="+")&&t(`A repeatable param (${u}) must be alone in its segment. eg: '/:ids+.`),s.push({type:1,value:u,regexp:c,repeatable:l==="*"||l==="+",optional:l==="*"||l==="?"})):t("Invalid state to consume buffer"),u="")}function p(){u+=l}for(;a<e.length;){if(l=e[a++],l==="\\"&&n!==2){o=n,n=4;continue}switch(n){case 0:l==="/"?(u&&d(),i()):l===":"?(d(),n=1):p();break;case 4:p(),n=o;break;case 1:l==="("?n=2:uM.test(l)?p():(d(),n=0,l!=="*"&&l!=="?"&&l!=="+"&&a--);break;case 2:l===")"?c[c.length-1]=="\\"?c=c.slice(0,-1)+l:n=3:c+=l;break;case 3:d(),n=0,l!=="*"&&l!=="?"&&l!=="+"&&a--,c="";break;default:t("Unknown state");break}}return n===2&&t(`Unfinished custom RegExp for param "${u}"`),d(),i(),r}function dM(e,t,n){const o=iM(cM(e.path),n),r=st(o,{record:e,parent:t,children:[],alias:[]});return t&&!r.record.aliasOf==!t.record.aliasOf&&t.children.push(r),r}function fM(e,t){const n=[],o=new Map;t=Tm({strict:!1,end:!0,sensitive:!1},t);function r(d){return o.get(d)}function s(d,p,h){const m=!h,g=Am(d);g.aliasOf=h&&h.record;const v=Tm(t,d),y=[g];if("alias"in d){const O=typeof d.alias=="string"?[d.alias]:d.alias;for(const T of O)y.push(Am(st({},g,{components:h?h.record.components:g.components,path:T,aliasOf:h?h.record:g})))}let b,_;for(const O of y){const{path:T}=O;if(p&&T[0]!=="/"){const A=p.record.path,D=A[A.length-1]==="/"?"":"/";O.path=p.record.path+(T&&D+T)}if(b=dM(O,p,v),h?h.alias.push(b):(_=_||b,_!==b&&_.alias.push(b),m&&d.name&&!Om(b)&&i(d.name)),O_(b)&&l(b),g.children){const A=g.children;for(let D=0;D<A.length;D++)s(A[D],b,h&&h.children[D])}h=h||b}return _?()=>{i(_)}:Mi}function i(d){if(x_(d)){const p=o.get(d);p&&(o.delete(d),n.splice(n.indexOf(p),1),p.children.forEach(i),p.alias.forEach(i))}else{const p=n.indexOf(d);p>-1&&(n.splice(p,1),d.record.name&&o.delete(d.record.name),d.children.forEach(i),d.alias.forEach(i))}}function a(){return n}function l(d){const p=mM(d,n);n.splice(p,0,d),d.record.name&&!Om(d)&&o.set(d.record.name,d)}function u(d,p){let h,m={},g,v;if("name"in d&&d.name){if(h=o.get(d.name),!h)throw zs(1,{location:d});v=h.record.name,m=st(Em(p.params,h.keys.filter(_=>!_.optional).concat(h.parent?h.parent.keys.filter(_=>_.optional):[]).map(_=>_.name)),d.params&&Em(d.params,h.keys.map(_=>_.name))),g=h.stringify(m)}else if(d.path!=null)g=d.path,h=n.find(_=>_.re.test(g)),h&&(m=h.parse(g),v=h.record.name);else{if(h=p.name?o.get(p.name):n.find(_=>_.re.test(p.path)),!h)throw zs(1,{location:d,currentLocation:p});v=h.record.name,m=st({},p.params,d.params),g=h.stringify(m)}const y=[];let b=h;for(;b;)y.unshift(b.record),b=b.parent;return{name:v,path:g,params:m,matched:y,meta:hM(y)}}e.forEach(d=>s(d));function c(){n.length=0,o.clear()}return{addRoute:s,resolve:u,removeRoute:i,clearRoutes:c,getRoutes:a,getRecordMatcher:r}}function Em(e,t){const n={};for(const o of t)o in e&&(n[o]=e[o]);return n}function Am(e){const t={path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:e.aliasOf,beforeEnter:e.beforeEnter,props:pM(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in e?e.components||null:e.component&&{default:e.component}};return Object.defineProperty(t,"mods",{value:{}}),t}function pM(e){const t={},n=e.props||!1;if("component"in e)t.default=n;else for(const o in e.components)t[o]=typeof n=="object"?n[o]:n;return t}function Om(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function hM(e){return e.reduce((t,n)=>st(t,n.meta),{})}function Tm(e,t){const n={};for(const o in e)n[o]=o in t?t[o]:e[o];return n}function mM(e,t){let n=0,o=t.length;for(;n!==o;){const s=n+o>>1;A_(e,t[s])<0?o=s:n=s+1}const r=gM(e);return r&&(o=t.lastIndexOf(r,o-1)),o}function gM(e){let t=e;for(;t=t.parent;)if(O_(t)&&A_(e,t)===0)return t}function O_({record:e}){return!!(e.name||e.components&&Object.keys(e.components).length||e.redirect)}function vM(e){const t={};if(e===""||e==="?")return t;const o=(e[0]==="?"?e.slice(1):e).split("&");for(let r=0;r<o.length;++r){const s=o[r].replace(y_," "),i=s.indexOf("="),a=ra(i<0?s:s.slice(0,i)),l=i<0?null:ra(s.slice(i+1));if(a in t){let u=t[a];Kn(u)||(u=t[a]=[u]),u.push(l)}else t[a]=l}return t}function Pm(e){let t="";for(let n in e){const o=e[n];if(n=$B(n),o==null){o!==void 0&&(t+=(t.length?"&":"")+n);continue}(Kn(o)?o.map(s=>s&&zd(s)):[o&&zd(o)]).forEach(s=>{s!==void 0&&(t+=(t.length?"&":"")+n,s!=null&&(t+="="+s))})}return t}function yM(e){const t={};for(const n in e){const o=e[n];o!==void 0&&(t[n]=Kn(o)?o.map(r=>r==null?null:""+r):o==null?o:""+o)}return t}const bM=Symbol(""),km=Symbol(""),qu=Symbol(""),np=Symbol(""),Wd=Symbol("");function hi(){let e=[];function t(o){return e.push(o),()=>{const r=e.indexOf(o);r>-1&&e.splice(r,1)}}function n(){e=[]}return{add:t,list:()=>e.slice(),reset:n}}function or(e,t,n,o,r,s=i=>i()){const i=o&&(o.enterCallbacks[r]=o.enterCallbacks[r]||[]);return()=>new Promise((a,l)=>{const u=p=>{p===!1?l(zs(4,{from:n,to:t})):p instanceof Error?l(p):oM(p)?l(zs(2,{from:t,to:p})):(i&&o.enterCallbacks[r]===i&&typeof p=="function"&&i.push(p),a())},c=s(()=>e.call(o&&o.instances[r],t,n,u));let d=Promise.resolve(c);e.length<3&&(d=d.then(u)),d.catch(p=>l(p))})}function Cc(e,t,n,o,r=s=>s()){const s=[];for(const i of e)for(const a in i.components){let l=i.components[a];if(!(t!=="beforeRouteEnter"&&!i.instances[a]))if(g_(l)){const c=(l.__vccOpts||l)[t];c&&s.push(or(c,n,o,i,a,r))}else{let u=l();s.push(()=>u.then(c=>{if(!c)throw new Error(`Couldn't resolve component "${a}" at "${i.path}"`);const d=AB(c)?c.default:c;i.mods[a]=c,i.components[a]=d;const h=(d.__vccOpts||d)[t];return h&&or(h,n,o,i,a,r)()}))}}return s}function Im(e){const t=kt(qu),n=kt(np),o=U(()=>{const l=f(e.to);return t.resolve(l)}),r=U(()=>{const{matched:l}=o.value,{length:u}=l,c=l[u-1],d=n.matched;if(!c||!d.length)return-1;const p=d.findIndex(Hs.bind(null,c));if(p>-1)return p;const h=Dm(l[u-2]);return u>1&&Dm(c)===h&&d[d.length-1].path!==h?d.findIndex(Hs.bind(null,l[u-2])):p}),s=U(()=>r.value>-1&&xM(n.params,o.value.params)),i=U(()=>r.value>-1&&r.value===n.matched.length-1&&S_(n.params,o.value.params));function a(l={}){if(CM(l)){const u=t[f(e.replace)?"replace":"push"](f(e.to)).catch(Mi);return e.viewTransition&&typeof document<"u"&&"startViewTransition"in document&&document.startViewTransition(()=>u),u}return Promise.resolve()}return{route:o,href:U(()=>o.value.href),isActive:s,isExactActive:i,navigate:a}}function _M(e){return e.length===1?e[0]:e}const wM=F({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"},viewTransition:Boolean},useLink:Im,setup(e,{slots:t}){const n=Ht(Im(e)),{options:o}=kt(qu),r=U(()=>({[Rm(e.activeClass,o.linkActiveClass,"router-link-active")]:n.isActive,[Rm(e.exactActiveClass,o.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const s=t.default&&_M(t.default(n));return e.custom?s:un("a",{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:r.value},s)}}}),SM=wM;function CM(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget&&e.currentTarget.getAttribute){const t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function xM(e,t){for(const n in t){const o=t[n],r=e[n];if(typeof o=="string"){if(o!==r)return!1}else if(!Kn(r)||r.length!==o.length||o.some((s,i)=>s!==r[i]))return!1}return!0}function Dm(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const Rm=(e,t,n)=>e??t??n,EM=F({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){const o=kt(Wd),r=U(()=>e.route||o.value),s=kt(km,0),i=U(()=>{let u=f(s);const{matched:c}=r.value;let d;for(;(d=c[u])&&!d.components;)u++;return u}),a=U(()=>r.value.matched[i.value]);Nn(km,U(()=>i.value+1)),Nn(bM,a),Nn(Wd,r);const l=N();return Ce(()=>[l.value,a.value,e.name],([u,c,d],[p,h,m])=>{c&&(c.instances[d]=u,h&&h!==c&&u&&u===p&&(c.leaveGuards.size||(c.leaveGuards=h.leaveGuards),c.updateGuards.size||(c.updateGuards=h.updateGuards))),u&&c&&(!h||!Hs(c,h)||!p)&&(c.enterCallbacks[d]||[]).forEach(g=>g(u))},{flush:"post"}),()=>{const u=r.value,c=e.name,d=a.value,p=d&&d.components[c];if(!p)return Bm(n.default,{Component:p,route:u});const h=d.props[c],m=h?h===!0?u.params:typeof h=="function"?h(u):h:null,v=un(p,st({},m,t,{onVnodeUnmounted:y=>{y.component.isUnmounted&&(d.instances[c]=null)},ref:l}));return Bm(n.default,{Component:v,route:u})||v}}});function Bm(e,t){if(!e)return null;const n=e(t);return n.length===1?n[0]:n}const AM=EM;function OM(e){const t=fM(e.routes,e),n=e.parseQuery||vM,o=e.stringifyQuery||Pm,r=e.history,s=hi(),i=hi(),a=hi(),l=Cn(Qo);let u=Qo;ms&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const c=wc.bind(null,x=>""+x),d=wc.bind(null,LB),p=wc.bind(null,ra);function h(x,z){let H,X;return x_(x)?(H=t.getRecordMatcher(x),X=z):X=x,t.addRoute(X,H)}function m(x){const z=t.getRecordMatcher(x);z&&t.removeRoute(z)}function g(){return t.getRoutes().map(x=>x.record)}function v(x){return!!t.getRecordMatcher(x)}function y(x,z){if(z=st({},z||l.value),typeof x=="string"){const j=Sc(n,x,z.path),K=t.resolve({path:j.path},z),Z=r.createHref(j.fullPath);return st(j,K,{params:p(K.params),hash:ra(j.hash),redirectedFrom:void 0,href:Z})}let H;if(x.path!=null)H=st({},x,{path:Sc(n,x.path,z.path).path});else{const j=st({},x.params);for(const K in j)j[K]==null&&delete j[K];H=st({},x,{params:d(j)}),z.params=d(z.params)}const X=t.resolve(H,z),pe=x.hash||"";X.params=c(p(X.params));const S=VB(o,st({},x,{hash:qB(pe),path:X.path})),I=r.createHref(S);return st({fullPath:S,hash:pe,query:o===Pm?yM(x.query):x.query||{}},X,{redirectedFrom:void 0,href:I})}function b(x){return typeof x=="string"?Sc(n,x,l.value.path):st({},x)}function _(x,z){if(u!==x)return zs(8,{from:z,to:x})}function O(x){return D(x)}function T(x){return O(st(b(x),{replace:!0}))}function A(x){const z=x.matched[x.matched.length-1];if(z&&z.redirect){const{redirect:H}=z;let X=typeof H=="function"?H(x):H;return typeof X=="string"&&(X=X.includes("?")||X.includes("#")?X=b(X):{path:X},X.params={}),st({query:x.query,hash:x.hash,params:X.path!=null?{}:x.params},X)}}function D(x,z){const H=u=y(x),X=l.value,pe=x.state,S=x.force,I=x.replace===!0,j=A(H);if(j)return D(st(b(j),{state:typeof j=="object"?st({},pe,j.state):pe,force:S,replace:I}),z||H);const K=H;K.redirectedFrom=z;let Z;return!S&&UB(o,X,H)&&(Z=zs(16,{to:K,from:X}),ee(X,X,!0,!1)),(Z?Promise.resolve(Z):k(K,X)).catch(Q=>So(Q)?So(Q,2)?Q:Y(Q):L(Q,K,X)).then(Q=>{if(Q){if(So(Q,2))return D(st({replace:I},b(Q.to),{state:typeof Q.to=="object"?st({},pe,Q.to.state):pe,force:S}),z||K)}else Q=R(K,X,!0,I,pe);return $(K,X,Q),Q})}function P(x,z){const H=_(x,z);return H?Promise.reject(H):Promise.resolve()}function w(x){const z=me.values().next().value;return z&&typeof z.runWithContext=="function"?z.runWithContext(x):x()}function k(x,z){let H;const[X,pe,S]=TM(x,z);H=Cc(X.reverse(),"beforeRouteLeave",x,z);for(const j of X)j.leaveGuards.forEach(K=>{H.push(or(K,x,z))});const I=P.bind(null,x,z);return H.push(I),Se(H).then(()=>{H=[];for(const j of s.list())H.push(or(j,x,z));return H.push(I),Se(H)}).then(()=>{H=Cc(pe,"beforeRouteUpdate",x,z);for(const j of pe)j.updateGuards.forEach(K=>{H.push(or(K,x,z))});return H.push(I),Se(H)}).then(()=>{H=[];for(const j of S)if(j.beforeEnter)if(Kn(j.beforeEnter))for(const K of j.beforeEnter)H.push(or(K,x,z));else H.push(or(j.beforeEnter,x,z));return H.push(I),Se(H)}).then(()=>(x.matched.forEach(j=>j.enterCallbacks={}),H=Cc(S,"beforeRouteEnter",x,z,w),H.push(I),Se(H))).then(()=>{H=[];for(const j of i.list())H.push(or(j,x,z));return H.push(I),Se(H)}).catch(j=>So(j,8)?j:Promise.reject(j))}function $(x,z,H){a.list().forEach(X=>w(()=>X(x,z,H)))}function R(x,z,H,X,pe){const S=_(x,z);if(S)return S;const I=z===Qo,j=ms?history.state:{};H&&(X||I?r.replace(x.fullPath,st({scroll:I&&j&&j.scroll},pe)):r.push(x.fullPath,pe)),l.value=x,ee(x,z,H,I),Y()}let G;function J(){G||(G=r.listen((x,z,H)=>{if(!Pe.listening)return;const X=y(x),pe=A(X);if(pe){D(st(pe,{replace:!0,force:!0}),X).catch(Mi);return}u=X;const S=l.value;ms&&XB(_m(S.fullPath,H.delta),Mu()),k(X,S).catch(I=>So(I,12)?I:So(I,2)?(D(st(b(I.to),{force:!0}),X).then(j=>{So(j,20)&&!H.delta&&H.type===sa.pop&&r.go(-1,!1)}).catch(Mi),Promise.reject()):(H.delta&&r.go(-H.delta,!1),L(I,X,S))).then(I=>{I=I||R(X,S,!1),I&&(H.delta&&!So(I,8)?r.go(-H.delta,!1):H.type===sa.pop&&So(I,20)&&r.go(-1,!1)),$(X,S,I)}).catch(Mi)}))}let ne=hi(),ae=hi(),re;function L(x,z,H){Y(x);const X=ae.list();return X.length?X.forEach(pe=>pe(x,z,H)):console.error(x),Promise.reject(x)}function oe(){return re&&l.value!==Qo?Promise.resolve():new Promise((x,z)=>{ne.add([x,z])})}function Y(x){return re||(re=!x,J(),ne.list().forEach(([z,H])=>x?H(x):z()),ne.reset()),x}function ee(x,z,H,X){const{scrollBehavior:pe}=e;if(!ms||!pe)return Promise.resolve();const S=!H&&JB(_m(x.fullPath,0))||(X||!H)&&history.state&&history.state.scroll||null;return We().then(()=>pe(x,z,S)).then(I=>I&&YB(I)).catch(I=>L(I,x,z))}const le=x=>r.go(x);let ye;const me=new Set,Pe={currentRoute:l,listening:!0,addRoute:h,removeRoute:m,clearRoutes:t.clearRoutes,hasRoute:v,getRoutes:g,resolve:y,options:e,push:O,replace:T,go:le,back:()=>le(-1),forward:()=>le(1),beforeEach:s.add,beforeResolve:i.add,afterEach:a.add,onError:ae.add,isReady:oe,install(x){const z=this;x.component("RouterLink",SM),x.component("RouterView",AM),x.config.globalProperties.$router=z,Object.defineProperty(x.config.globalProperties,"$route",{enumerable:!0,get:()=>f(l)}),ms&&!ye&&l.value===Qo&&(ye=!0,O(r.location).catch(pe=>{}));const H={};for(const pe in Qo)Object.defineProperty(H,pe,{get:()=>l.value[pe],enumerable:!0});x.provide(qu,z),x.provide(np,Zl(H)),x.provide(Wd,l);const X=x.unmount;me.add(x),x.unmount=function(){me.delete(x),me.size<1&&(u=Qo,G&&G(),G=null,l.value=Qo,ye=!1,re=!1),X()}}};function Se(x){return x.reduce((z,H)=>z.then(()=>w(H)),Promise.resolve())}return Pe}function TM(e,t){const n=[],o=[],r=[],s=Math.max(t.matched.length,e.matched.length);for(let i=0;i<s;i++){const a=t.matched[i];a&&(e.matched.find(u=>Hs(u,a))?o.push(a):n.push(a));const l=e.matched[i];l&&(t.matched.find(u=>Hs(u,l))||r.push(l))}return[n,o,r]}function Ta(){return kt(qu)}function T_(e){return kt(np)}const PM={class:"w-full flex items-center justify-between"},kM={class:"text-gray-500"},IM=F({__name:"SearchDialog",props:{modelValue:{type:Boolean,default:!1},modelModifiers:{}},emits:["update:modelValue"],setup(e){const t=ts(e,"modelValue"),n=Ta(),o=N(""),r=kt(ep);U(()=>`在 ${(r==null?void 0:r.value)||"All Platforms"} 中搜索应用...`);const{apps:s}=va(m_()),i=U(()=>r!=null&&r.value?s.value.filter(l=>l.platform===r.value):[]),a=l=>{const{id:u,platform:c}=l;t.value=!1,n.push({path:"/details",query:{id:u,platform:c}})};return(l,u)=>{const c=JI,d=Yf,p=Rd;return C(),B(f(Fk),{open:t.value,"onUpdate:open":u[1]||(u[1]=h=>t.value=h)},{default:E(()=>[q(f(Ab),{modelValue:f(o),"onUpdate:modelValue":u[0]||(u[0]=h=>$e(o)?o.value=h:null),placeholder:"Type a command or search..."},null,8,["modelValue"]),q(f(Ob),{class:"h-100"},{default:E(()=>[q(f(Eb),null,{default:E(()=>[q(c,{title:"No apps found in this platform",description:"You can change the platform or search another app"})]),_:1}),q(p,{heading:"apps"},{default:E(()=>[(C(!0),ie(Ie,null,wt(f(i),h=>(C(),B(f(Dd),{value:h.name,key:h.id,onClick:m=>a(h)},{default:E(()=>[ce("div",PM,[q(d,{logo:h.appLogoUrl,name:h.name,description:h.appTagline??""},null,8,["logo","name","description"]),ce("span",kM,Ne(h.platform),1)])]),_:2},1032,["value","onClick"]))),128))]),_:1})]),_:1})]),_:1},8,["open"])}}}),Mm=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,qm=fb,DM=(e,t)=>n=>{var o;if((t==null?void 0:t.variants)==null)return qm(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:r,defaultVariants:s}=t,i=Object.keys(r).map(u=>{const c=n==null?void 0:n[u],d=s==null?void 0:s[u];if(c===null)return null;const p=Mm(c)||Mm(d);return r[u][p]}),a=n&&Object.entries(n).reduce((u,c)=>{let[d,p]=c;return p===void 0||(u[d]=p),u},{}),l=t==null||(o=t.compoundVariants)===null||o===void 0?void 0:o.reduce((u,c)=>{let{class:d,className:p,...h}=c;return Object.entries(h).every(m=>{let[g,v]=m;return Array.isArray(v)?v.includes({...s,...a}[g]):{...s,...a}[g]===v})?[...u,d,p]:u},[]);return qm(e,i,l,n==null?void 0:n.class,n==null?void 0:n.className)},vn=F({__name:"Button",props:{variant:{},size:{},class:{},asChild:{type:Boolean},as:{default:"button"}},setup(e){const t=e;return(n,o)=>(C(),B(f(Ae),{"data-slot":"button",as:n.as,"as-child":n.asChild,class:qe(f(Fe)(f(op)({variant:n.variant,size:n.size}),t.class))},{default:E(()=>[V(n.$slots,"default")]),_:3},8,["as","as-child","class"]))}}),op=DM("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-md font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive cursor-pointer",{variants:{variant:{default:"bg-primary text-primary-foreground shadow-xs hover:bg-primary/90",destructive:"bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-11 rounded-md px-6 has-[>svg]:px-4",icon:"size-9"}},defaultVariants:{variant:"default",size:"lg"}}),rp=F({__name:"Tabs",props:{defaultValue:{},orientation:{},dir:{},activationMode:{},modelValue:{},unmountOnHide:{type:Boolean},asChild:{type:Boolean},as:{},class:{}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,o=t,r=et(n,"class"),s=ft(r,o);return(i,a)=>(C(),B(f(vP),te({"data-slot":"tabs"},f(s),{class:f(Fe)("flex flex-col gap-2",n.class)}),{default:E(()=>[V(i.$slots,"default")]),_:3},16,["class"]))}}),sp=F({__name:"TabsList",props:{loop:{type:Boolean},asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,n=et(t,"class");return(o,r)=>(C(),B(f(wP),te({"data-slot":"tabs-list"},f(n),{class:f(Fe)("bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-lg p-[3px]",t.class)}),{default:E(()=>[V(o.$slots,"default")]),_:3},16,["class"]))}}),ip=F({__name:"TabsTrigger",props:{value:{},disabled:{type:Boolean},asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,n=et(t,"class"),o=Kt(n);return(r,s)=>(C(),B(f(CP),te({"data-slot":"tabs-trigger"},f(o),{class:f(Fe)("data-[state=active]:bg-background dark:data-[state=active]:text-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 text-foreground dark:text-muted-foreground inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-md font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 hover:bg-background hover:text-foreground cursor-pointer text-muted-foreground data-[state=active]:bg-transparent data-[state=active]:text-foreground data-[state=active]:shadow-none",t.class)}),{default:E(()=>[V(r.$slots,"default")]),_:3},16,["class"]))}}),JL=e=>Sr("/system/auth/login",e),ZL=e=>Sr("/system/auth/social-login",e),RM=()=>Sr("/system/auth/logout"),BM=()=>wr("/system/auth/get-user-info"),MM=F({__name:"Avatar",props:{class:{}},setup(e){const t=e;return(n,o)=>(C(),B(f(F1),{"data-slot":"avatar",class:qe(f(Fe)("relative flex size-8 shrink-0 overflow-hidden rounded-full",t.class))},{default:E(()=>[V(n.$slots,"default")]),_:3},8,["class"]))}}),qM=F({__name:"AvatarFallback",props:{delayMs:{},asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,n=et(t,"class");return(o,r)=>(C(),B(f(N1),te({"data-slot":"avatar-fallback"},f(n),{class:f(Fe)("bg-muted flex size-full items-center justify-center rounded-full",t.class)}),{default:E(()=>[V(o.$slots,"default")]),_:3},16,["class"]))}}),$M=F({__name:"AvatarImage",props:{src:{},referrerPolicy:{},crossOrigin:{},asChild:{type:Boolean},as:{}},setup(e){const t=e;return(n,o)=>(C(),B(f(U1),te({"data-slot":"avatar-image"},t,{class:"aspect-square size-full"}),{default:E(()=>[V(n.$slots,"default")]),_:3},16))}}),P_=F({__name:"DropdownMenu",props:{defaultOpen:{type:Boolean},open:{type:Boolean},dir:{},modal:{type:Boolean}},emits:["update:open"],setup(e,{emit:t}){const r=ft(e,t);return(s,i)=>(C(),B(f(BO),te({"data-slot":"dropdown-menu"},f(r)),{default:E(()=>[V(s.$slots,"default")]),_:3},16))}}),k_=F({__name:"DropdownMenuContent",props:{forceMount:{type:Boolean},loop:{type:Boolean},side:{},sideOffset:{default:4},sideFlip:{type:Boolean},align:{},alignOffset:{},alignFlip:{type:Boolean},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},positionStrategy:{},updatePositionStrategy:{},disableUpdateOnLayoutShift:{type:Boolean},prioritizePosition:{type:Boolean},reference:{},asChild:{type:Boolean},as:{},class:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","closeAutoFocus"],setup(e,{emit:t}){const n=e,o=t,r=et(n,"class"),s=ft(r,o);return(i,a)=>(C(),B(f(HO),null,{default:E(()=>[q(f(qO),te({"data-slot":"dropdown-menu-content"},f(s),{class:f(Fe)("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--reka-dropdown-menu-content-available-height) min-w-[8rem] origin-(--reka-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",n.class)}),{default:E(()=>[V(i.$slots,"default")]),_:3},16,["class"])]),_:3}))}}),FM=F({__name:"DropdownMenuGroup",props:{asChild:{type:Boolean},as:{}},setup(e){const t=e;return(n,o)=>(C(),B(f(FO),te({"data-slot":"dropdown-menu-group"},t),{default:E(()=>[V(n.$slots,"default")]),_:3},16))}}),Br=F({__name:"DropdownMenuItem",props:{disabled:{type:Boolean},textValue:{},asChild:{type:Boolean},as:{},class:{},inset:{type:Boolean},variant:{default:"default"}},setup(e){const t=e,n=et(t,"inset","variant","class"),o=Kt(n);return(r,s)=>(C(),B(f(NO),te({"data-slot":"dropdown-menu-item","data-inset":r.inset?"":void 0,"data-variant":r.variant},f(o),{class:f(Fe)("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive-foreground data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/40 data-[variant=destructive]:focus:text-destructive-foreground data-[variant=destructive]:*:[svg]:!text-destructive-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t.class)}),{default:E(()=>[V(r.$slots,"default")]),_:3},16,["data-inset","data-variant","class"]))}}),LM=F({__name:"DropdownMenuLabel",props:{asChild:{type:Boolean},as:{},class:{},inset:{type:Boolean}},setup(e){const t=e,n=et(t,"class","inset"),o=Kt(n);return(r,s)=>(C(),B(f(VO),te({"data-slot":"dropdown-menu-label","data-inset":r.inset?"":void 0},f(o),{class:f(Fe)("px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",t.class)}),{default:E(()=>[V(r.$slots,"default")]),_:3},16,["data-inset","class"]))}}),$m=F({__name:"DropdownMenuSeparator",props:{asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,n=et(t,"class");return(o,r)=>(C(),B(f(KO),te({"data-slot":"dropdown-menu-separator"},f(n),{class:f(Fe)("bg-border -mx-1 my-1 h-px",t.class)}),null,16,["class"]))}}),I_=F({__name:"DropdownMenuTrigger",props:{disabled:{type:Boolean},asChild:{type:Boolean},as:{}},setup(e){const n=Kt(e);return(o,r)=>(C(),B(f(GO),te({"data-slot":"dropdown-menu-trigger"},f(n)),{default:E(()=>[V(o.$slots,"default")]),_:3},16))}}),D_=bf("user",()=>{const e=N({avatar:"",nickname:"",username:""});return{userInfo:e,fetchUserInfo:async()=>{const n=await BM();e.value=n}}}),NM=F({__name:"UserAvatar",setup(e){const t=D_(),{userInfo:n}=va(t),o=Ta(),r=N([{to:"/apps",label:"我的App"},{to:"/favorites",label:"我的收藏"},{to:"/settings",label:"设置"}]),s=async()=>{try{await RM(),localStorage.removeItem("accessToken"),localStorage.removeItem("refreshToken"),console.log("Logout successful"),o.replace("/auth")}catch(i){console.error("Logout failed",i)}};return(i,a)=>{const l=pf("RouterLink");return C(),B(f(P_),{modal:!1},{default:E(()=>[q(f(I_),{"as-child":""},{default:E(()=>[q(f(MM),{class:"cursor-pointer"},{default:E(()=>[q(f($M),{src:f(n).avatar},null,8,["src"]),q(f(qM),null,{default:E(()=>{var u;return[rt(Ne(((u=f(n).nickname[0])==null?void 0:u.toUpperCase())||"U"),1)]}),_:1})]),_:1})]),_:1}),q(f(k_),{class:"w-48",align:"end","side-offset":8},{default:E(()=>[q(f(LM),null,{default:E(()=>a[0]||(a[0]=[rt("我的账户",-1)])),_:1,__:[0]}),q(f($m)),q(f(FM),null,{default:E(()=>[(C(!0),ie(Ie,null,wt(r.value,u=>(C(),B(f(Br),{key:u.to,"as-child":""},{default:E(()=>[q(l,{to:u.to,class:"cursor-pointer"},{default:E(()=>[rt(Ne(u.label),1)]),_:2},1032,["to"])]),_:2},1024))),128))]),_:1}),q(f($m)),q(f(Br),{class:"cursor-pointer",onClick:s},{default:E(()=>a[1]||(a[1]=[rt(" 退出登录 ",-1)])),_:1,__:[1]})]),_:1})]),_:1})}}}),jM=[{label:"ios",value:"ios",icon:"mdi:apple"},{label:"android",value:"android",icon:"mdi:android"},{label:"web",value:"web",icon:"mdi:web"}],Ks=[{label:"Apps",value:"appCategories",icon:"duo-icons:app",categoryType:0},{label:"Screens",value:"screenPatterns",icon:"simple-line-icons:screen-smartphone",categoryType:1},{label:"UI Elements",value:"screenElements",icon:"humbleicons:switch-on",categoryType:2},{label:"Flows",value:"flowActions",icon:"fluent:flow-32-regular",categoryType:3}],ql=[...Ks.slice(0,2),...Ks.slice(2)],VM={class:"grid grid-cols-3 gap-4 items-center fixed top-0 left-0 right-0 h-18 shrink-0 z-1 bg-background px-4 lg:px-20"},UM={class:"col-span-1 flex items-center h-full"},HM={class:"col-span-1 h-full flex items-center py-3"},zM={class:"col-span-1 h-full flex justify-end items-center"},KM=F({__name:"Header",props:{modelValue:{required:!0},modelModifiers:{}},emits:Un(["searchClick","platformClick"],["update:modelValue"]),setup(e,{emit:t}){const n=ts(e,"modelValue"),o=t,r=l=>({ios:"iOS",android:"Android",web:"Web"})[l]||l,s=U(()=>`在 ${r(n.value)} 上搜索...`),i=l=>{o("platformClick",l)},a=()=>{o("searchClick")};return(l,u)=>{const c=Ho;return C(),ie("div",VM,[ce("div",UM,[q(f(rp),{modelValue:n.value,"onUpdate:modelValue":u[0]||(u[0]=d=>n.value=d)},{default:E(()=>[q(f(sp),{class:"bg-transparent p-0"},{default:E(()=>[(C(!0),ie(Ie,null,wt(f(jM),d=>(C(),B(f(ip),{key:d.label,value:d.label,onClick:p=>i(d.value)},{default:E(()=>[q(c,{icon:d.icon,class:"h-4 w-4 mr-2"},null,8,["icon"]),rt(" "+Ne(r(d.value)),1)]),_:2},1032,["value","onClick"]))),128))]),_:1})]),_:1},8,["modelValue"])]),ce("div",HM,[q(f(vn),{variant:"outline",class:"w-full justify-start text-muted-foreground rounded-full cursor-pointer",onClick:a},{default:E(()=>[q(c,{icon:"lucide:search",class:"h-4 w-4 mr-2"}),rt(" "+Ne(s.value),1)]),_:1})]),ce("div",zM,[q(f(NM))])])}}}),WM=F({__name:"Sonner",props:{invert:{type:Boolean},theme:{},position:{},hotkey:{},richColors:{type:Boolean},expand:{type:Boolean},duration:{},gap:{},visibleToasts:{},closeButton:{type:Boolean},toastOptions:{},class:{},style:{},offset:{},mobileOffset:{},dir:{},swipeDirections:{},icons:{},containerAriaLabel:{}},setup(e){const t=e;return(n,o)=>(C(),B(f(wB),te({class:"toaster group"},t,{style:{"--normal-bg":"var(--popover)","--normal-text":"var(--popover-foreground)","--normal-border":"var(--border)"}}),null,16))}}),GM=()=>wr("/admin/app-category/list-all"),Gd=e=>{if(e===null||typeof e!="object")return e;if(e instanceof Date)return new Date(e.getTime());if(Array.isArray(e))return e.map(n=>Gd(n));const t={};for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=Gd(e[n]));return t},cl=(e,t,n)=>{const o=new Map,r=e.map(a=>{const l=Gd(a),u={...l,id:l[t.id],label:l[t.label],value:l[t.value],level:1,parentId:l[t.parentId]??null,expanded:!1};return o.set(u.id,u),u}),s=[];r.forEach(a=>{if(a.parentId!==null){const l=a.parentId!==void 0?o.get(a.parentId):void 0;l?(a.level=l.level+1,l.children||(l.children=[]),l.children.push(a)):s.push(a)}else s.push(a)});const i=a=>(n!=null&&n.order&&(a.sort((l,u)=>{const c=l[n.order],d=u[n.order];return typeof c=="number"&&typeof d=="number"?c-d:String(c).localeCompare(String(d))}),a.forEach(l=>{var u;(u=l.children)!=null&&u.length&&(l.children=i(l.children))})),a);return i(s)},Fm=(e,t)=>{const n=new Set(e),o=new Set(t);let r=0;for(const s of n)o.has(s)&&r++;return r},QM=(e,t={})=>{const{keepChildren:n=!1,keepLevel:o=!1,keepExpanded:r=!1}=t,s=[],i=(a,l=null)=>{(Array.isArray(a)?a:[a]).forEach(c=>{var p;const d={};Object.entries(c).forEach(([h,m])=>{["children","level","expanded","parentId","label"].includes(h)||(d[h]=m)}),n&&c.children&&(d.children=c.children),o&&(d.level=c.level),r&&c.expanded!==void 0&&(d.expanded=c.expanded),l!==null&&(d.parentId=l),s.push(d),(p=c.children)!=null&&p.length&&i(c.children,c.id)})};return i(e),s},$u=bf("definition",()=>{const e=N([]);return{definitions:e,fetchDefinitions:async()=>{const n=await GM();e.value=cl(n,{id:"id",label:"displayName",value:"id",parentId:"parentId"},{order:"orderNum"})}}}),YM=F({__name:"App",setup(e){const t=Ta(),n=T_(),{fetchDefinitions:o}=$u(),{fetchApps:r}=m_(),s=["auth","settings","chat"],i=N("ios");Nn(ep,U(()=>i.value));const a=()=>{c.value=!0},l=h=>{t.replace("/"),i.value=h,localStorage.setItem("platform",h)},u=()=>{const h=localStorage.getItem("platform");h?i.value=h:(i.value="ios",localStorage.setItem("platform","ios"))},c=N(!1),d=U(()=>!s.includes(n.name)),p=U(()=>n.name!=="chat");return je(()=>{u(),o(),r(i.value)}),(h,m)=>{const g=pf("RouterView"),v=IM;return C(),ie(Ie,null,[ce("div",{class:qe(["w-full max-w-[2000px] mx-auto relative h-full min-h-full",{"px-4 lg:px-20":f(p),"pt-18":f(d)}])},[f(d)?(C(),B(KM,{key:0,modelValue:f(i),"onUpdate:modelValue":m[0]||(m[0]=y=>$e(i)?i.value=y:null),onSearchClick:a,onPlatformClick:l},null,8,["modelValue"])):Be("",!0),q(g)],2),q(v,{modelValue:f(c),"onUpdate:modelValue":m[1]||(m[1]=y=>$e(c)?c.value=y:null)},null,8,["modelValue"]),q(f(WM),{position:"top-right",richColors:"",closeButton:""})],64)}}}),XM="modulepreload",JM=function(e){return"/"+e},Lm={},mi=function(t,n,o){let r=Promise.resolve();if(n&&n.length>0){let i=function(u){return Promise.all(u.map(c=>Promise.resolve(c).then(d=>({status:"fulfilled",value:d}),d=>({status:"rejected",reason:d}))))};document.getElementsByTagName("link");const a=document.querySelector("meta[property=csp-nonce]"),l=(a==null?void 0:a.nonce)||(a==null?void 0:a.getAttribute("nonce"));r=i(n.map(u=>{if(u=JM(u),u in Lm)return;Lm[u]=!0;const c=u.endsWith(".css"),d=c?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${u}"]${d}`))return;const p=document.createElement("link");if(p.rel=c?"stylesheet":XM,c||(p.as="script"),p.crossOrigin="",p.href=u,l&&p.setAttribute("nonce",l),document.head.appendChild(p),c)return new Promise((h,m)=>{p.addEventListener("load",h),p.addEventListener("error",()=>m(new Error(`Unable to preload CSS for ${u}`)))})}))}function s(i){const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=i,window.dispatchEvent(a),!a.defaultPrevented)throw i}return r.then(i=>{for(const a of i||[])a.status==="rejected"&&s(a.reason);return t().catch(s)})},ZM=F({__name:"AlertDialog",props:{open:{type:Boolean},defaultOpen:{type:Boolean}},emits:["update:open"],setup(e,{emit:t}){const r=ft(e,t);return(s,i)=>(C(),B(f(P1),te({"data-slot":"alert-dialog"},f(r)),{default:E(()=>[V(s.$slots,"default")]),_:3},16))}}),eq=F({__name:"AlertDialogAction",props:{asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,n=et(t,"class");return(o,r)=>(C(),B(f(m1),te(f(n),{class:f(Fe)(f(op)(),t.class)}),{default:E(()=>[V(o.$slots,"default")]),_:3},16,["class"]))}}),tq=F({__name:"AlertDialogCancel",props:{asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,n=et(t,"class");return(o,r)=>(C(),B(f(w1),te(f(n),{class:f(Fe)(f(op)({variant:"outline"}),"mt-2 sm:mt-0",t.class)}),{default:E(()=>[V(o.$slots,"default")]),_:3},16,["class"]))}}),nq=F({__name:"AlertDialogContent",props:{forceMount:{type:Boolean},disableOutsidePointerEvents:{type:Boolean},asChild:{type:Boolean},as:{},class:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(e,{emit:t}){const n=e,o=t,r=et(n,"class"),s=ft(r,o);return(i,a)=>(C(),B(f(O1),null,{default:E(()=>[q(f(E1),{"data-slot":"alert-dialog-overlay",class:"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/80"}),q(f(b1),te({"data-slot":"alert-dialog-content"},f(s),{class:f(Fe)("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",n.class)}),{default:E(()=>[V(i.$slots,"default")]),_:3},16,["class"])]),_:3}))}}),oq=F({__name:"AlertDialogDescription",props:{asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,n=et(t,"class");return(o,r)=>(C(),B(f(C1),te({"data-slot":"alert-dialog-description"},f(n),{class:f(Fe)("text-muted-foreground text-sm",t.class)}),{default:E(()=>[V(o.$slots,"default")]),_:3},16,["class"]))}}),rq=F({__name:"AlertDialogFooter",props:{class:{}},setup(e){const t=e;return(n,o)=>(C(),ie("div",{"data-slot":"alert-dialog-footer",class:qe(f(Fe)("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",t.class))},[V(n.$slots,"default")],2))}}),sq=F({__name:"AlertDialogHeader",props:{class:{}},setup(e){const t=e;return(n,o)=>(C(),ie("div",{"data-slot":"alert-dialog-header",class:qe(f(Fe)("flex flex-col gap-2 text-center sm:text-left",t.class))},[V(n.$slots,"default")],2))}}),iq=F({__name:"AlertDialogTitle",props:{asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,n=et(t,"class");return(o,r)=>(C(),B(f(I1),te({"data-slot":"alert-dialog-title"},f(n),{class:f(Fe)("text-lg font-semibold",t.class)}),{default:E(()=>[V(o.$slots,"default")]),_:3},16,["class"]))}}),aq=F({__name:"AlertDialogTrigger",props:{asChild:{type:Boolean},as:{}},setup(e){const t=e;return(n,o)=>(C(),B(f(R1),te({"data-slot":"alert-dialog-trigger"},t),{default:E(()=>[V(n.$slots,"default")]),_:3},16))}}),ap=F({__name:"AlertConfirm",props:Un({title:{},description:{default:""},cancelText:{default:"cancel"},actionText:{default:"confirm"}},{modelValue:{type:Boolean,required:!1},modelModifiers:{}}),emits:Un(["confirm"],["update:modelValue"]),setup(e,{expose:t,emit:n}){const o=n,r=ts(e,"modelValue"),s=()=>{o("confirm"),r.value=!1},i=()=>{r.value=!1};return t({open:()=>r.value=!0,close:()=>r.value=!1}),(a,l)=>(C(),B(f(ZM),{open:r.value,"onUpdate:open":l[0]||(l[0]=u=>r.value=u)},{default:E(()=>[q(f(aq),{"as-child":""},{default:E(()=>[V(a.$slots,"default")]),_:3}),q(f(nq),null,{default:E(()=>[q(f(sq),null,{default:E(()=>[q(f(iq),null,{default:E(()=>[rt(Ne(a.title),1)]),_:1}),q(f(oq),null,{default:E(()=>[rt(Ne(a.description),1)]),_:1})]),_:1}),q(f(rq),null,{default:E(()=>[q(f(tq),{onClick:i},{default:E(()=>[rt(Ne(a.cancelText),1)]),_:1}),q(f(eq),{onClick:s},{default:E(()=>[rt(Ne(a.actionText),1)]),_:1})]),_:1})]),_:1})]),_:3},8,["open"]))}}),R_=F({__name:"ScrollBar",props:{orientation:{default:"vertical"},forceMount:{type:Boolean},asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,n=et(t,"class");return(o,r)=>(C(),B(f(mT),te({"data-slot":"scroll-area-scrollbar"},f(n),{class:f(Fe)("flex touch-none p-px transition-colors select-none",o.orientation==="vertical"&&"h-full w-2.5 border-l border-l-transparent",o.orientation==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent",t.class)}),{default:E(()=>[q(f(_T),{"data-slot":"scroll-area-thumb",class:"bg-border relative flex-1 rounded-full"})]),_:1},16,["class"]))}}),lp=F({__name:"ScrollArea",props:{type:{},dir:{},scrollHideDelay:{},asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,n=et(t,"class");return(o,r)=>(C(),B(f(XO),te({"data-slot":"scroll-area"},f(n),{class:f(Fe)("relative",t.class)}),{default:E(()=>[q(f(ST),{"data-slot":"scroll-area-viewport",class:"focus-visible:ring-ring/50 size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:outline-1"},{default:E(()=>[V(o.$slots,"default")]),_:3}),q(R_),q(f(tT))]),_:3},16,["class"]))}}),lq=e=>Sr("/admin/favorite/create-app-favorite",{...e,favoriteType:1}),eN=e=>wr("/admin/app/page",{...e,type:2}),uq=e=>Sr("/admin/favorite-section/create",e),tN=e=>wr("/admin/app-section/get-favorite",e),xc=F({__name:"Tooltip",props:{defaultOpen:{type:Boolean},open:{type:Boolean},delayDuration:{},disableHoverableContent:{type:Boolean},disableClosingTrigger:{type:Boolean},disabled:{type:Boolean},ignoreNonKeyboardFocus:{type:Boolean}},emits:["update:open"],setup(e,{emit:t}){const r=ft(e,t);return(s,i)=>(C(),B(f(IP),te({"data-slot":"tooltip"},f(r)),{default:E(()=>[V(s.$slots,"default")]),_:3},16))}}),Ec=F({inheritAttrs:!1,__name:"TooltipContent",props:{forceMount:{type:Boolean},ariaLabel:{},asChild:{type:Boolean},as:{},side:{},sideOffset:{default:4},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},positionStrategy:{},updatePositionStrategy:{},class:{}},emits:["escapeKeyDown","pointerDownOutside"],setup(e,{emit:t}){const n=e,o=t,r=et(n,"class"),s=ft(r,o);return(i,a)=>(C(),B(f(FP),null,{default:E(()=>[q(f(qP),te({"data-slot":"tooltip-content"},{...f(s),...i.$attrs},{class:f(Fe)("bg-primary text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit rounded-md px-3 py-1.5 text-xs text-balance",n.class)}),{default:E(()=>[V(i.$slots,"default"),q(f(EP),{class:"bg-primary fill-primary z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]"})]),_:3},16,["class"])]),_:3}))}}),Ac=F({__name:"TooltipProvider",props:{delayDuration:{default:0},skipDelayDuration:{},disableHoverableContent:{type:Boolean},disableClosingTrigger:{type:Boolean},disabled:{type:Boolean},ignoreNonKeyboardFocus:{type:Boolean}},setup(e){const t=e;return(n,o)=>(C(),B(f(TP),ct(yt(t)),{default:E(()=>[V(n.$slots,"default")]),_:3},16))}}),Oc=F({__name:"TooltipTrigger",props:{reference:{},asChild:{type:Boolean},as:{}},setup(e){const t=e;return(n,o)=>(C(),B(f(NP),te({"data-slot":"tooltip-trigger"},t),{default:E(()=>[V(n.$slots,"default")]),_:3},16))}}),Tc=N(null);function cq(){return{copiedScreen:Tc,copyScreen:n=>{Tc.value=JSON.parse(JSON.stringify(n))},clearClipboard:()=>{Tc.value=null}}}var dq=Object.defineProperty,$l=Object.getOwnPropertySymbols,B_=Object.prototype.hasOwnProperty,M_=Object.prototype.propertyIsEnumerable,Nm=(e,t,n)=>t in e?dq(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,vs=(e,t)=>{for(var n in t||(t={}))B_.call(t,n)&&Nm(e,n,t[n]);if($l)for(var n of $l(t))M_.call(t,n)&&Nm(e,n,t[n]);return e},q_=(e,t)=>{var n={};for(var o in e)B_.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&$l)for(var o of $l(e))t.indexOf(o)<0&&M_.call(e,o)&&(n[o]=e[o]);return n};const $_="[vue-draggable-plus]: ";function fq(e){console.warn($_+e)}function pq(e){console.error($_+e)}function jm(e,t,n){return n>=0&&n<e.length&&e.splice(n,0,e.splice(t,1)[0]),e}function hq(e){return e.replace(/-(\w)/g,(t,n)=>n?n.toUpperCase():"")}function mq(e){return Object.keys(e).reduce((t,n)=>(typeof e[n]<"u"&&(t[hq(n)]=e[n]),t),{})}function Vm(e,t){return Array.isArray(e)&&e.splice(t,1),e}function Um(e,t,n){return Array.isArray(e)&&e.splice(t,0,n),e}function gq(e){return typeof e>"u"}function vq(e){return typeof e=="string"}function Hm(e,t,n){const o=e.children[n];e.insertBefore(t,o)}function Pc(e){e.parentNode&&e.parentNode.removeChild(e)}function yq(e,t=document){var n;let o=null;return typeof(t==null?void 0:t.querySelector)=="function"?o=(n=t==null?void 0:t.querySelector)==null?void 0:n.call(t,e):o=document.querySelector(e),o||fq(`Element not found: ${e}`),o}function bq(e,t,n=null){return function(...o){return e.apply(n,o),t.apply(n,o)}}function _q(e,t){const n=vs({},e);return Object.keys(t).forEach(o=>{n[o]?n[o]=bq(e[o],t[o]):n[o]=t[o]}),n}function wq(e){return e instanceof HTMLElement}function zm(e,t){Object.keys(e).forEach(n=>{t(n,e[n])})}function Sq(e){return e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97)}const Cq=Object.assign;/**!
DesignScreenshot/output/100.64.0.2_run/100.64.0.2_8083_1_initial_page.html:110:              transform 0.3s ease-out`}},[q(m,{variant:"outline",class:"rounded-full",border:!1,onClick:d[0]||(d[0]=Ze(v=>c.$emit("save",c.id),["stop"]))},{default:E(()=>d[2]||(d[2]=[rt(" save ",-1)])),_:1,__:[2]}),q(m,{class:"rounded-full",border:!1,onClick:d[1]||(d[1]=Ze(v=>c.$emit("copy",c.id),["stop"]))},{default:E(()=>d[3]||(d[3]=[rt(" copy ",-1)])),_:1,__:[3]})],2)],2)]),c.name||c.logo?(C(),B(g,{key:0,name:c.name,logo:c.logo,class:"flex-shrink-0 relative z-30 mt-1"},null,8,["name","logo"])):Be("",!0)],2)}}}),og=F({__name:"Checkbox",props:{defaultValue:{type:[Boolean,String]},modelValue:{type:[Boolean,String,null]},disabled:{type:Boolean},value:{},id:{},asChild:{type:Boolean},as:{},name:{},required:{type:Boolean},class:{}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,o=t,r=et(n,"class"),s=ft(r,o);return(i,a)=>(C(),B(f(iE),te({"data-slot":"checkbox"},f(s),{class:f(Fe)("peer border-input data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",n.class)}),{default:E(()=>[q(f(lE),{"data-slot":"checkbox-indicator",class:"flex items-center justify-center text-current transition-none"},{default:E(()=>[V(i.$slots,"default",{},()=>[q(f(xb),{class:"size-3.5"})])]),_:3})]),_:3},16,["class"]))}}),P$=F({__name:"Popover",props:{defaultOpen:{type:Boolean},open:{type:Boolean},modal:{type:Boolean}},emits:["update:open"],setup(e,{emit:t}){const r=ft(e,t);return(s,i)=>(C(),B(f(_O),te({"data-slot":"popover"},f(r)),{default:E(()=>[V(s.$slots,"default")]),_:3},16))}}),k$=F({inheritAttrs:!1,__name:"PopoverContent",props:{forceMount:{type:Boolean},side:{},sideOffset:{default:4},sideFlip:{type:Boolean},align:{default:"center"},alignOffset:{},alignFlip:{type:Boolean},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},positionStrategy:{},updatePositionStrategy:{},disableUpdateOnLayoutShift:{type:Boolean},prioritizePosition:{type:Boolean},reference:{},asChild:{type:Boolean},as:{},disableOutsidePointerEvents:{type:Boolean},class:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(e,{emit:t}){const n=e,o=t,r=et(n,"class"),s=ft(r,o);return(i,a)=>(C(),B(f(PO),null,{default:E(()=>[q(f(OO),te({"data-slot":"popover-content"},{...f(s),...i.$attrs},{class:f(Fe)("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 rounded-md border p-4 shadow-md origin-(--reka-popover-content-transform-origin) outline-hidden",n.class)}),{default:E(()=>[V(i.$slots,"default")]),_:3},16,["class"])]),_:3}))}}),I$=F({__name:"PopoverTrigger",props:{asChild:{type:Boolean},as:{}},setup(e){const t=e;return(n,o)=>(C(),B(f(IO),te({"data-slot":"popover-trigger"},t),{default:E(()=>[V(n.$slots,"default")]),_:3},16))}}),D$={class:"truncate text-left"},R$={key:0,class:"ml-1.5 font-normal text-xs px-1.5 py-0.5 bg-background/20 rounded-full"},B$={key:0,class:"text-xs mt-1 text-muted-foreground"},M$=["for"],q$=["for"],$$=F({__name:"Dropdown",props:{defaultLabel:{},data:{},selectionMode:{default:"single"},placement:{default:"center"},searchable:{type:Boolean,default:!0}},emits:["change"],setup(e,{expose:t,emit:n}){const o=n,r=N(!1),s=N(""),i=N([]),a=U(()=>!e.data||e.data.length===0||e.data.every(h=>!h.children||h.children.length===0)),l=U(()=>{var h;return((h=e.data)==null?void 0:h.flatMap(m=>m.children??[]))??[]}),u=U(()=>l.value.filter(h=>i.value.includes(h.id))),c=U(()=>{if(!e.data)return[];const h=s.value.toLowerCase();return e.data.map(m=>{var v;const g=(v=m.children)==null?void 0:v.filter(y=>{const b=i.value.includes(y.id),_=y.label.toLowerCase().includes(h);return h?_:!b});return g&&g.length>0?{...m,children:g}:null}).filter(m=>m!==null)}),d=h=>{if(e.selectionMode==="single")i.value=i.value[0]===h?[]:[h],r.value=!1;else{const m=[...i.value],g=m.indexOf(h);g>-1?m.splice(g,1):m.push(h),i.value=m}},p=()=>{i.value=[],s.value=""};return Ce(u,h=>{o("change",h)},{deep:!0}),t({clear:p}),(h,m)=>(C(),B(f(P$),{open:f(r),"onUpdate:open":m[1]||(m[1]=g=>$e(r)?r.value=g:null)},{default:E(()=>[q(f(I$),{"as-child":""},{default:E(()=>[q(f(vn),{variant:f(u).length>0?"default":"outline",role:"combobox","aria-expanded":f(r),class:"h-11 justify-between px-4 font-semibold rounded-full transition-colors duration-200"},{default:E(()=>{var g;return[ce("span",D$,[f(u).length===0?(C(),ie(Ie,{key:0},[rt(Ne(h.defaultLabel),1)],64)):(C(),ie(Ie,{key:1},[rt(Ne((g=f(u)[0])==null?void 0:g.label)+" ",1),h.selectionMode==="multiple"&&f(u).length>1?(C(),ie("span",R$," +"+Ne(f(u).length-1),1)):Be("",!0)],64))]),f(u).length>0?(C(),B(f(Pk),{key:0,class:"ml-2 h-4 w-4 shrink-0 opacity-50",onClick:Ze(p,["stop","prevent"])})):(C(),B(f(Kf),{key:1,class:qe(["ml-2 h-4 w-4 shrink-0 opacity-50 transition-transform",{"rotate-180":f(r)}])},null,8,["class"]))]}),_:1},8,["variant","aria-expanded"])]),_:1}),q(f(k$),{class:"w-80 p-0",align:h.placement},{default:E(()=>[q(f(Cb),{class:"max-h-[480px] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md"},{default:E(()=>[h.searchable?(C(),B(f(Ab),{key:0,modelValue:f(s),"onUpdate:modelValue":m[0]||(m[0]=g=>$e(s)?s.value=g:null),placeholder:"搜索...",class:"h-10 w-full rounded-none border-0 border-b focus-visible:ring-0 focus-visible:ring-offset-0"},null,8,["modelValue"])):Be("",!0),q(f(Ob),{class:"flex-1 overflow-y-auto overscroll-contain custom-scrollbar"},{default:E(()=>[q(f(Eb),{class:"py-6 text-center text-sm"},{default:E(()=>[ce("p",null,Ne(f(a)?"暂无数据":"未找到结果"),1),f(a)?Be("",!0):(C(),ie("p",B$,"请尝试其他关键词"))]),_:1}),f(u).length>0&&f(s)===""?(C(),B(f(Rd),{key:0,heading:"已选"},{default:E(()=>[(C(!0),ie(Ie,null,wt(f(u),g=>(C(),B(f(Dd),{key:`selected-${g.id}`,value:g.label,onSelect:Ze(v=>d(g.id),["prevent"]),class:"cursor-pointer"},{default:E(()=>[q(f(og),{id:`selected-${g.id}`,"model-value":!0,class:"mr-2"},null,8,["id"]),ce("label",{for:`selected-${g.id}`,class:"cursor-pointer"},Ne(g.label),9,M$)]),_:2},1032,["value","onSelect"]))),128))]),_:1})):Be("",!0),(C(!0),ie(Ie,null,wt(f(c),g=>(C(),B(f(Rd),{key:g.label,heading:g.label},{default:E(()=>[(C(!0),ie(Ie,null,wt(g.children,v=>(C(),B(f(Dd),{key:v.id,value:v.label,onSelect:Ze(y=>d(v.id),["prevent"]),class:"cursor-pointer"},{default:E(()=>[q(f(og),{id:v.id,"model-value":f(i).includes(v.id),class:"mr-2"},null,8,["id","model-value"]),ce("label",{for:v.id,class:"cursor-pointer"},Ne(v.label),9,q$)]),_:2},1032,["value","onSelect"]))),128))]),_:2},1032,["heading"]))),128))]),_:1})]),_:1})]),_:1},8,["align"])]),_:1},8,["open"]))}}),gl=Lu($$,[["__scopeId","data-v-cce68d8f"]]),F$={class:"flex flex-col gap-6"},L$={class:"flex gap-8"},N$={class:"w-24 h-24"},j$={class:"flex-1 flex items-center"},V$={class:"text-5xl font-semibold text-primary"},U$={class:"flex gap-8"},H$={class:"flex flex-col gap-1"},z$={class:"text-sm font-semibold text-primary text-center"},K$={class:"flex flex-col gap-1"},W$={class:"text-sm font-semibold text-primary text-center"},G$=F({__name:"StoreAppCard",props:{logoUrl:{},name:{},description:{},platform:{},rating:{},categories:{}},emits:["click"],setup(e,{emit:t}){return(n,o)=>{var s;const r=ri;return C(),ie("div",F$,[ce("div",L$,[ce("div",N$,[q(r,{src:n.logoUrl,class:"rounded-3xl"},null,8,["src"])]),ce("div",j$,[ce("span",V$,Ne(n.name)+"—"+Ne(n.description),1)])]),ce("div",U$,[ce("div",H$,[o[0]||(o[0]=ce("span",{class:"text-sm text-textSecondary"},"Platform",-1)),ce("span",z$,Ne(n.platform),1)]),ce("div",K$,[o[1]||(o[1]=ce("span",{class:"text-sm text-textSecondary"},"Category",-1)),ce("span",W$,Ne((s=n.categories)==null?void 0:s.join(", ")),1)])])])}}}),Q$=e=>Sr("/admin/app-info/create",e),Y$=e=>wr("/admin/screen/page",e),X$=F({__name:"Select",props:{open:{type:Boolean},defaultOpen:{type:Boolean},defaultValue:{},modelValue:{},by:{type:[String,Function]},dir:{},multiple:{type:Boolean},autocomplete:{},disabled:{type:Boolean},name:{},required:{type:Boolean}},emits:["update:modelValue","update:open"],setup(e,{emit:t}){const r=ft(e,t);return(s,i)=>(C(),B(f(kT),te({"data-slot":"select"},f(r)),{default:E(()=>[V(s.$slots,"default")]),_:3},16))}}),J$=F({inheritAttrs:!1,__name:"SelectContent",props:{forceMount:{type:Boolean},position:{default:"popper"},bodyLock:{type:Boolean},side:{},sideOffset:{},sideFlip:{type:Boolean},align:{},alignOffset:{},alignFlip:{type:Boolean},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},positionStrategy:{},updatePositionStrategy:{},disableUpdateOnLayoutShift:{type:Boolean},prioritizePosition:{type:Boolean},reference:{},asChild:{type:Boolean},as:{},class:{}},emits:["closeAutoFocus","escapeKeyDown","pointerDownOutside"],setup(e,{emit:t}){const n=e,o=t,r=et(n,"class"),s=ft(r,o);return(i,a)=>(C(),B(f(oP),null,{default:E(()=>[q(f(UT),te({"data-slot":"select-content"},{...f(s),...i.$attrs},{class:f(Fe)("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--reka-select-content-available-height) min-w-[8rem] overflow-x-hidden overflow-y-auto rounded-md border shadow-md",i.position==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",n.class)}),{default:E(()=>[q(f(oF)),q(f(hP),{class:qe(f(Fe)("p-1",i.position==="popper"&&"h-[var(--reka-select-trigger-height)] w-full min-w-[var(--reka-select-trigger-width)] scroll-my-1"))},{default:E(()=>[V(i.$slots,"default")]),_:3},8,["class"]),q(f(nF))]),_:3},16,["class"])]),_:3}))}}),Z$=F({__name:"SelectGroup",props:{asChild:{type:Boolean},as:{}},setup(e){const t=e;return(n,o)=>(C(),B(f(KT),te({"data-slot":"select-group"},t),{default:E(()=>[V(n.$slots,"default")]),_:3},16))}}),eF={class:"absolute right-2 flex size-3.5 items-center justify-center"},tF=F({__name:"SelectItem",props:{value:{},disabled:{type:Boolean},textValue:{},asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,n=et(t,"class"),o=Kt(n);return(r,s)=>(C(),B(f(XT),te({"data-slot":"select-item"},f(o),{class:f(Fe)("focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",t.class)}),{default:E(()=>[ce("span",eF,[q(f(ZT),null,{default:E(()=>[q(f(xb),{class:"size-4"})]),_:1})]),q(f(tP),null,{default:E(()=>[V(r.$slots,"default")]),_:3})]),_:3},16,["class"]))}}),nF=F({__name:"SelectScrollDownButton",props:{asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,n=et(t,"class"),o=Kt(n);return(r,s)=>(C(),B(f(iP),te({"data-slot":"select-scroll-down-button"},f(o),{class:f(Fe)("flex cursor-default items-center justify-center py-1",t.class)}),{default:E(()=>[V(r.$slots,"default",{},()=>[q(f(Kf),{class:"size-4"})])]),_:3},16,["class"]))}}),oF=F({__name:"SelectScrollUpButton",props:{asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,n=et(t,"class"),o=Kt(n);return(r,s)=>(C(),B(f(lP),te({"data-slot":"select-scroll-up-button"},f(o),{class:f(Fe)("flex cursor-default items-center justify-center py-1",t.class)}),{default:E(()=>[V(r.$slots,"default",{},()=>[q(f(Tk),{class:"size-4"})])]),_:3},16,["class"]))}}),rF=F({__name:"SelectTrigger",props:{disabled:{type:Boolean},reference:{},asChild:{type:Boolean},as:{},class:{},size:{default:"default"}},setup(e){const t=e,n=et(t,"class","size"),o=Kt(n);return(r,s)=>(C(),B(f(cP),te({"data-slot":"select-trigger","data-size":r.size},f(o),{class:f(Fe)("border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t.class)}),{default:E(()=>[V(r.$slots,"default"),q(f(GT),{"as-child":""},{default:E(()=>[q(f(Kf),{class:"size-4 opacity-50"})]),_:1})]),_:3},16,["data-size","class"]))}}),sF=F({__name:"SelectValue",props:{placeholder:{},asChild:{type:Boolean},as:{}},setup(e){const t=e;return(n,o)=>(C(),B(f(fP),te({"data-slot":"select-value"},t),{default:E(()=>[V(n.$slots,"default")]),_:3},16))}}),rg=e=>Array.isArray(e)&&e.length>0,iF={class:"flex flex-col gap-3 pb-10"},aF={class:"sticky-dropdown-filters flex py-2 gap-2"},lF={key:1,class:"text-center p-10"},uF=F({__name:"Details",setup(e){const t=T_(),{definitions:n}=va($u()),o=ya(),r=N(t.query.platform),s=U(()=>((r==null?void 0:r.value)==="web"?ql:Ks).slice(1)),i=N(s.value[0].label),a=T=>{var P;const A=(P=s.value.find(w=>w.label===T))==null?void 0:P.value,D=n.value.find(w=>w.slug===A&&w.platformType===r.value);return D==null?void 0:D.children},l=U(()=>Number(t.query.id)),{data:u,isLoading:c}=hC({queryKey:["appDetails",l],queryFn:async()=>{const T=await xB(l.value)||[];return rg(T)&&(T.sort((A,D)=>new Date(D.createTime).getTime()-new Date(A.createTime).getTime()),T.forEach(A=>{A.appSections=A.appSections||[]})),T},enabled:U(()=>!!l.value)}),d=N(""),p=U(()=>u.value?u.value.map(T=>({id:T.externalVersionId,label:T.createTime,value:T.externalVersionId})):[]);Ce(()=>u.value,T=>{T&&rg(T)&&(d.value=T[0].externalVersionId)},{immediate:!0});const h=U(()=>{var T;return!u.value||!d.value?(T=u.value)==null?void 0:T[0]:u.value.find(A=>A.externalVersionId===d.value)}),m=N();Ce(h,T=>{T?m.value=JSON.parse(JSON.stringify(T)):m.value=void 0},{deep:!0,immediate:!0});const g=N([]),v=T=>{g.value=(T==null?void 0:T.map(A=>A.displayName))||[]},y=U(()=>{if(m.value&&m.value.appSections)return m.value.appSections.map(A=>A.screens).flat().filter(Boolean)}),b=U(()=>{if(y.value&&y.value.length>0){let T=y.value;return g.value.length>0&&(i.value==="Screens"&&(T=T.filter(A=>A.screenPatterns&&Fm(A.screenPatterns,g.value))),i.value==="UI Elements"&&(T=T.filter(A=>A.screenElements&&Fm(A.screenElements,g.value)))),T}}),_=Ii({mutationFn:Q$,onSuccess:()=>{o.invalidateQueries({queryKey:["appDetails",l.value]})}}),O=()=>{if(!m.value||!m.value.id){console.warn("App info not available to create a new AppInfo.");return}_.mutate({appId:m.value.id})};return(T,A)=>{const D=G$,P=gl,w=Ho,k=tw,$=T$;return C(),ie("div",iF,[f(m)?(C(),B(D,{key:0,name:f(m).appName,"logo-url":f(m).appLogoUrl,platform:f(m).platform,description:f(m).appTagline,categories:f(m).allAppCategories},null,8,["name","logo-url","platform","description","categories"])):Be("",!0),q(f(rp),{modelValue:f(i),"onUpdate:modelValue":A[0]||(A[0]=R=>$e(i)?i.value=R:null),class:"!-ml-2"},{default:E(()=>[q(f(sp),{class:"bg-transparent p-0"},{default:E(()=>[(C(!0),ie(Ie,null,wt(f(s),R=>(C(),B(f(ip),{key:R.label,value:R.label,class:"!font-bold"},{default:E(()=>[rt(Ne(R.label),1)]),_:2},1032,["value"]))),128))]),_:1})]),_:1},8,["modelValue"]),ce("div",aF,[q(f(X$),{modelValue:f(d),"onUpdate:modelValue":A[1]||(A[1]=R=>$e(d)?d.value=R:null)},{default:E(()=>[q(f(rF),{class:"w-60 !h-11 rounded-full"},{default:E(()=>[q(f(sF),{placeholder:"Version",class:"font-bold truncate text-base"})]),_:1}),q(f(J$),null,{default:E(()=>[q(f(Z$),null,{default:E(()=>[(C(!0),ie(Ie,null,wt(f(p),R=>(C(),B(f(tF),{key:R.id,value:R.value},{default:E(()=>[rt(Ne(R.label),1)]),_:2},1032,["value"]))),128))]),_:1})]),_:1})]),_:1},8,["modelValue"]),(C(),B(P,{key:f(i),"default-label":f(i),data:a(f(i)),onChange:v,"selection-mode":"multiple",placement:"start"},null,8,["default-label","data"])),f(i)==="Flows"?(C(),B(f(ap),{key:0,title:"确定要创建新的Flow吗？",description:"这将创建一个新的App的Flow版本。",onConfirm:O},{default:E(()=>[q(f(vn),{disabled:f(_).isPending.value,class:"flex items-center gap-2 cursor-pointer"},{default:E(()=>[q(w,{icon:f(_).isPending.value?"eos-icons:loading":"ep:plus",class:"text-sm"},null,8,["icon"]),A[3]||(A[3]=ce("span",null,"Create New Flow",-1))]),_:1,__:[3]},8,["disabled"])]),_:1})):Be("",!0)]),f(c)?(C(),ie("div",lF,"Loading...")):f(i)==="Screens"||f(i)==="UI Elements"||f(i)==="Marketing Pages"?(C(),ie("div",{key:2,class:qe(["grid gap-x-5 gap-y-12 flex-1",f(r)==="web"?"grid-cols-[repeat(auto-fill,minmax(min(100%,500px),1fr))]":"grid-cols-[repeat(auto-fill,minmax(min(100%,230px),1fr))]"])},[(C(!0),ie(Ie,null,wt(f(b),(R,G)=>(C(),B(k,{key:G,id:R.id,src:R.screenUrl,platform:f(r)},null,8,["id","src","platform"]))),128))],2)):Be("",!0),f(i)==="Flows"&&f(m)?(C(),B($,{key:3,modelValue:f(m).appSections,"onUpdate:modelValue":A[2]||(A[2]=R=>f(m).appSections=R),platform:f(r),"app-info-id":f(m).id},null,8,["modelValue","platform","app-info-id"])):Be("",!0)])}}}),cF=Lu(uF,[["__scopeId","data-v-282accd6"]]);function dF(e){return Object.prototype.toString.call(e)==="[object Object]"}function sg(e){return dF(e)||Array.isArray(e)}function fF(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function fp(e,t){const n=Object.keys(e),o=Object.keys(t);if(n.length!==o.length)return!1;const r=JSON.stringify(Object.keys(e.breakpoints||{})),s=JSON.stringify(Object.keys(t.breakpoints||{}));return r!==s?!1:n.every(i=>{const a=e[i],l=t[i];return typeof a=="function"?`${a}`==`${l}`:!sg(a)||!sg(l)?a===l:fp(a,l)})}function ig(e){return e.concat().sort((t,n)=>t.name>n.name?1:-1).map(t=>t.options)}function pF(e,t){if(e.length!==t.length)return!1;const n=ig(e),o=ig(t);return n.every((r,s)=>{const i=o[s];return fp(r,i)})}function pp(e){return typeof e=="number"}function ef(e){return typeof e=="string"}function Nu(e){return typeof e=="boolean"}function ag(e){return Object.prototype.toString.call(e)==="[object Object]"}function _t(e){return Math.abs(e)}function hp(e){return Math.sign(e)}function Vi(e,t){return _t(e-t)}function hF(e,t){if(e===0||t===0||_t(e)<=_t(t))return 0;const n=Vi(_t(e),_t(t));return _t(n/e)}function mF(e){return Math.round(e*100)/100}function ia(e){return aa(e).map(Number)}function jn(e){return e[Ia(e)]}function Ia(e){return Math.max(0,e.length-1)}function mp(e,t){return t===Ia(e)}function lg(e,t=0){return Array.from(Array(e),(n,o)=>t+o)}function aa(e){return Object.keys(e)}function nw(e,t){return[e,t].reduce((n,o)=>(aa(o).forEach(r=>{const s=n[r],i=o[r],a=ag(s)&&ag(i);n[r]=a?nw(s,i):i}),n),{})}function tf(e,t){return typeof t.MouseEvent<"u"&&e instanceof t.MouseEvent}function gF(e,t){const n={start:o,center:r,end:s};function o(){return 0}function r(l){return s(l)/2}function s(l){return t-l}function i(l,u){return ef(e)?n[e](l):e(t,l,u)}return{measure:i}}function la(){let e=[];function t(r,s,i,a={passive:!0}){let l;if("addEventListener"in r)r.addEventListener(s,i,a),l=()=>r.removeEventListener(s,i,a);else{const u=r;u.addListener(i),l=()=>u.removeListener(i)}return e.push(l),o}function n(){e=e.filter(r=>r())}const o={add:t,clear:n};return o}function vF(e,t,n,o){const r=la(),s=1e3/60;let i=null,a=0,l=0;function u(){r.add(e,"visibilitychange",()=>{e.hidden&&m()})}function c(){h(),r.clear()}function d(v){if(!l)return;i||(i=v,n(),n());const y=v-i;for(i=v,a+=y;a>=s;)n(),a-=s;const b=a/s;o(b),l&&(l=t.requestAnimationFrame(d))}function p(){l||(l=t.requestAnimationFrame(d))}function h(){t.cancelAnimationFrame(l),i=null,a=0,l=0}function m(){i=null,a=0}return{init:u,destroy:c,start:p,stop:h,update:n,render:o}}function yF(e,t){const n=t==="rtl",o=e==="y",r=o?"y":"x",s=o?"x":"y",i=!o&&n?-1:1,a=c(),l=d();function u(m){const{height:g,width:v}=m;return o?g:v}function c(){return o?"top":n?"right":"left"}function d(){return o?"bottom":n?"left":"right"}function p(m){return m*i}return{scroll:r,cross:s,startEdge:a,endEdge:l,measureSize:u,direction:p}}function es(e=0,t=0){const n=_t(e-t);function o(u){return u<e}function r(u){return u>t}function s(u){return o(u)||r(u)}function i(u){return s(u)?o(u)?e:t:u}function a(u){return n?u-n*Math.ceil((u-t)/n):u}return{length:n,max:t,min:e,constrain:i,reachedAny:s,reachedMax:r,reachedMin:o,removeOffset:a}}function ow(e,t,n){const{constrain:o}=es(0,e),r=e+1;let s=i(t);function i(p){return n?_t((r+p)%r):o(p)}function a(){return s}function l(p){return s=i(p),d}function u(p){return c().set(a()+p)}function c(){return ow(e,a(),n)}const d={get:a,set:l,add:u,clone:c};return d}function bF(e,t,n,o,r,s,i,a,l,u,c,d,p,h,m,g,v,y,b){const{cross:_,direction:O}=e,T=["INPUT","SELECT","TEXTAREA"],A={passive:!1},D=la(),P=la(),w=es(50,225).constrain(h.measure(20)),k={mouse:300,touch:400},$={mouse:500,touch:600},R=m?43:25;let G=!1,J=0,ne=0,ae=!1,re=!1,L=!1,oe=!1;function Y(S){if(!b)return;function I(K){(Nu(b)||b(S,K))&&Se(K)}const j=t;D.add(j,"dragstart",K=>K.preventDefault(),A).add(j,"touchmove",()=>{},A).add(j,"touchend",()=>{}).add(j,"touchstart",I).add(j,"mousedown",I).add(j,"touchcancel",z).add(j,"contextmenu",z).add(j,"click",H,!0)}function ee(){D.clear(),P.clear()}function le(){const S=oe?n:t;P.add(S,"touchmove",x,A).add(S,"touchend",z).add(S,"mousemove",x,A).add(S,"mouseup",z)}function ye(S){const I=S.nodeName||"";return T.includes(I)}function me(){return(m?$:k)[oe?"mouse":"touch"]}function Pe(S,I){const j=d.add(hp(S)*-1),K=c.byDistance(S,!m).distance;return m||_t(S)<w?K:v&&I?K*.5:c.byIndex(j.get(),0).distance}function Se(S){const I=tf(S,o);oe=I,L=m&&I&&!S.buttons&&G,G=Vi(r.get(),i.get())>=2,!(I&&S.button!==0)&&(ye(S.target)||(ae=!0,s.pointerDown(S),u.useFriction(0).useDuration(0),r.set(i),le(),J=s.readPoint(S),ne=s.readPoint(S,_),p.emit("pointerDown")))}function x(S){if(!tf(S,o)&&S.touches.length>=2)return z(S);const j=s.readPoint(S),K=s.readPoint(S,_),Z=Vi(j,J),Q=Vi(K,ne);if(!re&&!oe&&(!S.cancelable||(re=Z>Q,!re)))return z(S);const ue=s.pointerMove(S);Z>g&&(L=!0),u.useFriction(.3).useDuration(.75),a.start(),r.add(O(ue)),S.preventDefault()}function z(S){const j=c.byDistance(0,!1).index!==d.get(),K=s.pointerUp(S)*me(),Z=Pe(O(K),j),Q=hF(K,Z),ue=R-10*Q,fe=y+Q/50;re=!1,ae=!1,P.clear(),u.useDuration(ue).useFriction(fe),l.distance(Z,!m),oe=!1,p.emit("pointerUp")}function H(S){L&&(S.stopPropagation(),S.preventDefault(),L=!1)}function X(){return ae}return{init:Y,destroy:ee,pointerDown:X}}function _F(e,t){let o,r;function s(d){return d.timeStamp}function i(d,p){const m=`client${(p||e.scroll)==="x"?"X":"Y"}`;return(tf(d,t)?d:d.touches[0])[m]}function a(d){return o=d,r=d,i(d)}function l(d){const p=i(d)-i(r),h=s(d)-s(o)>170;return r=d,h&&(o=d),p}function u(d){if(!o||!r)return 0;const p=i(r)-i(o),h=s(d)-s(o),m=s(d)-s(r)>170,g=p/h;return h&&!m&&_t(g)>.1?g:0}return{pointerDown:a,pointerMove:l,pointerUp:u,readPoint:i}}function wF(){function e(n){const{offsetTop:o,offsetLeft:r,offsetWidth:s,offsetHeight:i}=n;return{top:o,right:r+s,bottom:o+i,left:r,width:s,height:i}}return{measure:e}}function SF(e){function t(o){return e*(o/100)}return{measure:t}}function CF(e,t,n,o,r,s,i){const a=[e].concat(o);let l,u,c=[],d=!1;function p(v){return r.measureSize(i.measure(v))}function h(v){if(!s)return;u=p(e),c=o.map(p);function y(b){for(const _ of b){if(d)return;const O=_.target===e,T=o.indexOf(_.target),A=O?u:c[T],D=p(O?e:o[T]);if(_t(D-A)>=.5){v.reInit(),t.emit("resize");break}}}l=new ResizeObserver(b=>{(Nu(s)||s(v,b))&&y(b)}),n.requestAnimationFrame(()=>{a.forEach(b=>l.observe(b))})}function m(){d=!0,l&&l.disconnect()}return{init:h,destroy:m}}function xF(e,t,n,o,r,s){let i=0,a=0,l=r,u=s,c=e.get(),d=0;function p(){const A=o.get()-e.get(),D=!l;let P=0;return D?(i=0,n.set(o),e.set(o),P=A):(n.set(e),i+=A/l,i*=u,c+=i,e.add(i),P=c-d),a=hp(P),d=c,T}function h(){const A=o.get()-t.get();return _t(A)<.001}function m(){return l}function g(){return a}function v(){return i}function y(){return _(r)}function b(){return O(s)}function _(A){return l=A,T}function O(A){return u=A,T}const T={direction:g,duration:m,velocity:v,seek:p,settled:h,useBaseFriction:b,useBaseDuration:y,useFriction:O,useDuration:_};return T}function EF(e,t,n,o,r){const s=r.measure(10),i=r.measure(50),a=es(.1,.99);let l=!1;function u(){return!(l||!e.reachedAny(n.get())||!e.reachedAny(t.get()))}function c(h){if(!u())return;const m=e.reachedMin(t.get())?"min":"max",g=_t(e[m]-t.get()),v=n.get()-t.get(),y=a.constrain(g/i);n.subtract(v*y),!h&&_t(v)<s&&(n.set(e.constrain(n.get())),o.useDuration(25).useBaseFriction())}function d(h){l=!h}return{shouldConstrain:u,constrain:c,toggleActive:d}}function AF(e,t,n,o,r){const s=es(-t+e,0),i=d(),a=c(),l=p();function u(m,g){return Vi(m,g)<=1}function c(){const m=i[0],g=jn(i),v=i.lastIndexOf(m),y=i.indexOf(g)+1;return es(v,y)}function d(){return n.map((m,g)=>{const{min:v,max:y}=s,b=s.constrain(m),_=!g,O=mp(n,g);return _?y:O||u(v,b)?v:u(y,b)?y:b}).map(m=>parseFloat(m.toFixed(3)))}function p(){if(t<=e+r)return[s.max];if(o==="keepSnaps")return i;const{min:m,max:g}=a;return i.slice(m,g)}return{snapsContained:l,scrollContainLimit:a}}function OF(e,t,n){const o=t[0],r=n?o-e:jn(t);return{limit:es(r,o)}}function TF(e,t,n,o){const s=t.min+.1,i=t.max+.1,{reachedMin:a,reachedMax:l}=es(s,i);function u(p){return p===1?l(n.get()):p===-1?a(n.get()):!1}function c(p){if(!u(p))return;const h=e*(p*-1);o.forEach(m=>m.add(h))}return{loop:c}}function PF(e){const{max:t,length:n}=e;function o(s){const i=s-t;return n?i/-n:0}return{get:o}}function kF(e,t,n,o,r){const{startEdge:s,endEdge:i}=e,{groupSlides:a}=r,l=d().map(t.measure),u=p(),c=h();function d(){return a(o).map(g=>jn(g)[i]-g[0][s]).map(_t)}function p(){return o.map(g=>n[s]-g[s]).map(g=>-_t(g))}function h(){return a(u).map(g=>g[0]).map((g,v)=>g+l[v])}return{snaps:u,snapsAligned:c}}function IF(e,t,n,o,r,s){const{groupSlides:i}=r,{min:a,max:l}=o,u=c();function c(){const p=i(s),h=!e||t==="keepSnaps";return n.length===1?[s]:h?p:p.slice(a,l).map((m,g,v)=>{const y=!g,b=mp(v,g);if(y){const _=jn(v[0])+1;return lg(_)}if(b){const _=Ia(s)-jn(v)[0]+1;return lg(_,jn(v)[0])}return m})}return{slideRegistry:u}}function DF(e,t,n,o,r){const{reachedAny:s,removeOffset:i,constrain:a}=o;function l(m){return m.concat().sort((g,v)=>_t(g)-_t(v))[0]}function u(m){const g=e?i(m):a(m),v=t.map((b,_)=>({diff:c(b-g,0),index:_})).sort((b,_)=>_t(b.diff)-_t(_.diff)),{index:y}=v[0];return{index:y,distance:g}}function c(m,g){const v=[m,m+n,m-n];if(!e)return m;if(!g)return l(v);const y=v.filter(b=>hp(b)===g);return y.length?l(y):jn(v)-n}function d(m,g){const v=t[m]-r.get(),y=c(v,g);return{index:m,distance:y}}function p(m,g){const v=r.get()+m,{index:y,distance:b}=u(v),_=!e&&s(v);if(!g||_)return{index:y,distance:m};const O=t[y]-b,T=m+c(O,0);return{index:y,distance:T}}return{byDistance:p,byIndex:d,shortcut:c}}function RF(e,t,n,o,r,s,i){function a(d){const p=d.distance,h=d.index!==t.get();s.add(p),p&&(o.duration()?e.start():(e.update(),e.render(1),e.update())),h&&(n.set(t.get()),t.set(d.index),i.emit("select"))}function l(d,p){const h=r.byDistance(d,p);a(h)}function u(d,p){const h=t.clone().set(d),m=r.byIndex(h.get(),p);a(m)}return{distance:l,index:u}}function BF(e,t,n,o,r,s,i,a){const l={passive:!0,capture:!0};let u=0;function c(h){if(!a)return;function m(g){if(new Date().getTime()-u>10)return;i.emit("slideFocusStart"),e.scrollLeft=0;const b=n.findIndex(_=>_.includes(g));pp(b)&&(r.useDuration(0),o.index(b,0),i.emit("slideFocus"))}s.add(document,"keydown",d,!1),t.forEach((g,v)=>{s.add(g,"focus",y=>{(Nu(a)||a(h,y))&&m(v)},l)})}function d(h){h.code==="Tab"&&(u=new Date().getTime())}return{init:c}}function wi(e){let t=e;function n(){return t}function o(l){t=i(l)}function r(l){t+=i(l)}function s(l){t-=i(l)}function i(l){return pp(l)?l:l.get()}return{get:n,set:o,add:r,subtract:s}}function rw(e,t){const n=e.scroll==="x"?i:a,o=t.style;let r=null,s=!1;function i(p){return`translate3d(${p}px,0px,0px)`}function a(p){return`translate3d(0px,${p}px,0px)`}function l(p){if(s)return;const h=mF(e.direction(p));h!==r&&(o.transform=n(h),r=h)}function u(p){s=!p}function c(){s||(o.transform="",t.getAttribute("style")||t.removeAttribute("style"))}return{clear:c,to:l,toggleActive:u}}function MF(e,t,n,o,r,s,i,a,l){const c=ia(r),d=ia(r).reverse(),p=y().concat(b());function h(D,P){return D.reduce((w,k)=>w-r[k],P)}function m(D,P){return D.reduce((w,k)=>h(w,P)>0?w.concat([k]):w,[])}function g(D){return s.map((P,w)=>({start:P-o[w]+.5+D,end:P+t-.5+D}))}function v(D,P,w){const k=g(P);return D.map($=>{const R=w?0:-n,G=w?n:0,J=w?"end":"start",ne=k[$][J];return{index:$,loopPoint:ne,slideLocation:wi(-1),translate:rw(e,l[$]),target:()=>a.get()>ne?R:G}})}function y(){const D=i[0],P=m(d,D);return v(P,n,!1)}function b(){const D=t-i[0]-1,P=m(c,D);return v(P,-n,!0)}function _(){return p.every(({index:D})=>{const P=c.filter(w=>w!==D);return h(P,t)<=.1})}function O(){p.forEach(D=>{const{target:P,translate:w,slideLocation:k}=D,$=P();$!==k.get()&&(w.to($),k.set($))})}function T(){p.forEach(D=>D.translate.clear())}return{canLoop:_,clear:T,loop:O,loopPoints:p}}function qF(e,t,n){let o,r=!1;function s(l){if(!n)return;function u(c){for(const d of c)if(d.type==="childList"){l.reInit(),t.emit("slidesChanged");break}}o=new MutationObserver(c=>{r||(Nu(n)||n(l,c))&&u(c)}),o.observe(e,{childList:!0})}function i(){o&&o.disconnect(),r=!0}return{init:s,destroy:i}}function $F(e,t,n,o){const r={};let s=null,i=null,a,l=!1;function u(){a=new IntersectionObserver(m=>{l||(m.forEach(g=>{const v=t.indexOf(g.target);r[v]=g}),s=null,i=null,n.emit("slidesInView"))},{root:e.parentElement,threshold:o}),t.forEach(m=>a.observe(m))}function c(){a&&a.disconnect(),l=!0}function d(m){return aa(r).reduce((g,v)=>{const y=parseInt(v),{isIntersecting:b}=r[y];return(m&&b||!m&&!b)&&g.push(y),g},[])}function p(m=!0){if(m&&s)return s;if(!m&&i)return i;const g=d(m);return m&&(s=g),m||(i=g),g}return{init:u,destroy:c,get:p}}function FF(e,t,n,o,r,s){const{measureSize:i,startEdge:a,endEdge:l}=e,u=n[0]&&r,c=m(),d=g(),p=n.map(i),h=v();function m(){if(!u)return 0;const b=n[0];return _t(t[a]-b[a])}function g(){if(!u)return 0;const b=s.getComputedStyle(jn(o));return parseFloat(b.getPropertyValue(`margin-${l}`))}function v(){return n.map((b,_,O)=>{const T=!_,A=mp(O,_);return T?p[_]+c:A?p[_]+d:O[_+1][a]-b[a]}).map(_t)}return{slideSizes:p,slideSizesWithGaps:h,startGap:c,endGap:d}}function LF(e,t,n,o,r,s,i,a,l){const{startEdge:u,endEdge:c,direction:d}=e,p=pp(n);function h(y,b){return ia(y).filter(_=>_%b===0).map(_=>y.slice(_,_+b))}function m(y){return y.length?ia(y).reduce((b,_,O)=>{const T=jn(b)||0,A=T===0,D=_===Ia(y),P=r[u]-s[T][u],w=r[u]-s[_][c],k=!o&&A?d(i):0,$=!o&&D?d(a):0,R=_t(w-$-(P+k));return O&&R>t+l&&b.push(_),D&&b.push(y.length),b},[]).map((b,_,O)=>{const T=Math.max(O[_-1]||0);return y.slice(T,b)}):[]}function g(y){return p?h(y,n):m(y)}return{groupSlides:g}}function NF(e,t,n,o,r,s,i){const{align:a,axis:l,direction:u,startIndex:c,loop:d,duration:p,dragFree:h,dragThreshold:m,inViewThreshold:g,slidesToScroll:v,skipSnaps:y,containScroll:b,watchResize:_,watchSlides:O,watchDrag:T,watchFocus:A}=s,D=2,P=wF(),w=P.measure(t),k=n.map(P.measure),$=yF(l,u),R=$.measureSize(w),G=SF(R),J=gF(a,R),ne=!d&&!!b,ae=d||!!b,{slideSizes:re,slideSizesWithGaps:L,startGap:oe,endGap:Y}=FF($,w,k,n,ae,r),ee=LF($,R,v,d,w,k,oe,Y,D),{snaps:le,snapsAligned:ye}=kF($,J,w,k,ee),me=-jn(le)+jn(L),{snapsContained:Pe,scrollContainLimit:Se}=AF(R,me,ye,b,D),x=ne?Pe:ye,{limit:z}=OF(me,x,d),H=ow(Ia(x),c,d),X=H.clone(),pe=ia(n),S=({dragHandler:mt,scrollBody:$t,scrollBounds:Ft,options:{loop:yn}})=>{yn||Ft.constrain(mt.pointerDown()),$t.seek()},I=({scrollBody:mt,translate:$t,location:Ft,offsetLocation:yn,previousLocation:Cr,scrollLooper:Bt,slideLooper:Lt,dragHandler:Qn,animation:Yn,eventHandler:vp,scrollBounds:iw,options:{loop:yp}},bp)=>{const _p=mt.settled(),aw=!iw.shouldConstrain(),wp=yp?_p:_p&&aw,Sp=wp&&!Qn.pointerDown();Sp&&Yn.stop();const lw=Ft.get()*bp+Cr.get()*(1-bp);yn.set(lw),yp&&(Bt.loop(mt.direction()),Lt.loop()),$t.to(yn.get()),Sp&&vp.emit("settle"),wp||vp.emit("scroll")},j=vF(o,r,()=>S(At),mt=>I(At,mt)),K=.68,Z=x[H.get()],Q=wi(Z),ue=wi(Z),fe=wi(Z),de=wi(Z),se=xF(Q,fe,ue,de,p,K),xe=DF(d,x,me,z,de),ge=RF(j,H,X,se,xe,de,i),Ee=PF(z),ke=la(),He=$F(t,n,i,g),{slideRegistry:tt}=IF(ne,b,x,Se,ee,pe),Ye=BF(e,n,tt,ge,se,ke,i,A),At={ownerDocument:o,ownerWindow:r,eventHandler:i,containerRect:w,slideRects:k,animation:j,axis:$,dragHandler:bF($,e,o,r,de,_F($,r),Q,j,ge,se,xe,H,i,G,h,m,y,K,T),eventStore:ke,percentOfView:G,index:H,indexPrevious:X,limit:z,location:Q,offsetLocation:fe,previousLocation:ue,options:s,resizeHandler:CF(t,i,r,n,$,_,P),scrollBody:se,scrollBounds:EF(z,fe,de,se,G),scrollLooper:TF(me,z,fe,[Q,fe,ue,de]),scrollProgress:Ee,scrollSnapList:x.map(Ee.get),scrollSnaps:x,scrollTarget:xe,scrollTo:ge,slideLooper:MF($,R,me,re,L,le,x,fe,n),slideFocus:Ye,slidesHandler:qF(t,i,O),slidesInView:He,slideIndexes:pe,slideRegistry:tt,slidesToScroll:ee,target:de,translate:rw($,t)};return At}function jF(){let e={},t;function n(u){t=u}function o(u){return e[u]||[]}function r(u){return o(u).forEach(c=>c(t,u)),l}function s(u,c){return e[u]=o(u).concat([c]),l}function i(u,c){return e[u]=o(u).filter(d=>d!==c),l}function a(){e={}}const l={init:n,emit:r,off:i,on:s,clear:a};return l}const VF={align:"center",axis:"x",container:null,slides:null,containScroll:"trimSnaps",direction:"ltr",slidesToScroll:1,inViewThreshold:0,breakpoints:{},dragFree:!1,dragThreshold:10,loop:!1,skipSnaps:!1,duration:25,startIndex:0,active:!0,watchDrag:!0,watchResize:!0,watchSlides:!0,watchFocus:!0};function UF(e){function t(s,i){return nw(s,i||{})}function n(s){const i=s.breakpoints||{},a=aa(i).filter(l=>e.matchMedia(l).matches).map(l=>i[l]).reduce((l,u)=>t(l,u),{});return t(s,a)}function o(s){return s.map(i=>aa(i.breakpoints||{})).reduce((i,a)=>i.concat(a),[]).map(e.matchMedia)}return{mergeOptions:t,optionsAtMedia:n,optionsMediaQueries:o}}function HF(e){let t=[];function n(s,i){return t=i.filter(({options:a})=>e.optionsAtMedia(a).active!==!1),t.forEach(a=>a.init(s,e)),i.reduce((a,l)=>Object.assign(a,{[l.name]:l}),{})}function o(){t=t.filter(s=>s.destroy())}return{init:n,destroy:o}}function Ul(e,t,n){const o=e.ownerDocument,r=o.defaultView,s=UF(r),i=HF(s),a=la(),l=jF(),{mergeOptions:u,optionsAtMedia:c,optionsMediaQueries:d}=s,{on:p,off:h,emit:m}=l,g=$;let v=!1,y,b=u(VF,Ul.globalOptions),_=u(b),O=[],T,A,D;function P(){const{container:pe,slides:S}=_;A=(ef(pe)?e.querySelector(pe):pe)||e.children[0];const j=ef(S)?A.querySelectorAll(S):S;D=[].slice.call(j||A.children)}function w(pe){const S=NF(e,A,D,o,r,pe,l);if(pe.loop&&!S.slideLooper.canLoop()){const I=Object.assign({},pe,{loop:!1});return w(I)}return S}function k(pe,S){v||(b=u(b,pe),_=c(b),O=S||O,P(),y=w(_),d([b,...O.map(({options:I})=>I)]).forEach(I=>a.add(I,"change",$)),_.active&&(y.translate.to(y.location.get()),y.animation.init(),y.slidesInView.init(),y.slideFocus.init(X),y.eventHandler.init(X),y.resizeHandler.init(X),y.slidesHandler.init(X),y.options.loop&&y.slideLooper.loop(),A.offsetParent&&D.length&&y.dragHandler.init(X),T=i.init(X,O)))}function $(pe,S){const I=ee();R(),k(u({startIndex:I},pe),S),l.emit("reInit")}function R(){y.dragHandler.destroy(),y.eventStore.clear(),y.translate.clear(),y.slideLooper.clear(),y.resizeHandler.destroy(),y.slidesHandler.destroy(),y.slidesInView.destroy(),y.animation.destroy(),i.destroy(),a.clear()}function G(){v||(v=!0,a.clear(),R(),l.emit("destroy"),l.clear())}function J(pe,S,I){!_.active||v||(y.scrollBody.useBaseFriction().useDuration(S===!0?0:_.duration),y.scrollTo.index(pe,I||0))}function ne(pe){const S=y.index.add(1).get();J(S,pe,-1)}function ae(pe){const S=y.index.add(-1).get();J(S,pe,1)}function re(){return y.index.add(1).get()!==ee()}function L(){return y.index.add(-1).get()!==ee()}function oe(){return y.scrollSnapList}function Y(){return y.scrollProgress.get(y.offsetLocation.get())}function ee(){return y.index.get()}function le(){return y.indexPrevious.get()}function ye(){return y.slidesInView.get()}function me(){return y.slidesInView.get(!1)}function Pe(){return T}function Se(){return y}function x(){return e}function z(){return A}function H(){return D}const X={canScrollNext:re,canScrollPrev:L,containerNode:z,internalEngine:Se,destroy:G,off:h,on:p,emit:m,plugins:Pe,previousScrollSnap:le,reInit:g,rootNode:x,scrollNext:ne,scrollPrev:ae,scrollProgress:Y,scrollSnapList:oe,scrollTo:J,selectedScrollSnap:ee,slideNodes:H,slidesInView:ye,slidesNotInView:me};return k(t,n),setTimeout(()=>l.emit("init"),0),X}Ul.globalOptions=void 0;function gp(e={},t=[]){const n=$e(e),o=$e(t);let r=n?e.value:e,s=o?t.value:t;const i=Cn(),a=Cn();function l(){a.value&&a.value.reInit(r,s)}return je(()=>{!fF()||!i.value||(Ul.globalOptions=gp.globalOptions,a.value=Ul(i.value,r,s))}),Ys(()=>{a.value&&a.value.destroy()}),n&&Ce(e,u=>{fp(r,u)||(r=u,l())}),o&&Ce(t,u=>{pF(s,u)||(s=u,l())}),[i,a]}gp.globalOptions=void 0;const[zF,KF]=bC(({opts:e,orientation:t,plugins:n},o)=>{const[r,s]=gp({...e,axis:t==="horizontal"?"x":"y"},n);function i(){var d;(d=s.value)==null||d.scrollPrev()}function a(){var d;(d=s.value)==null||d.scrollNext()}const l=N(!1),u=N(!1);function c(d){l.value=(d==null?void 0:d.canScrollNext())||!1,u.value=(d==null?void 0:d.canScrollPrev())||!1}return je(()=>{var d,p,h;s.value&&((d=s.value)==null||d.on("init",c),(p=s.value)==null||p.on("reInit",c),(h=s.value)==null||h.on("select",c),o("init-api",s.value))}),{carouselRef:r,carouselApi:s,canScrollPrev:u,canScrollNext:l,scrollPrev:i,scrollNext:a,orientation:t}});function ju(){const e=KF();if(!e)throw new Error("useCarousel must be used within a <Carousel />");return e}const WF=F({__name:"Carousel",props:{opts:{},plugins:{},orientation:{default:"horizontal"},class:{}},emits:["init-api"],setup(e,{expose:t,emit:n}){const o=e,r=n,{canScrollNext:s,canScrollPrev:i,carouselApi:a,carouselRef:l,orientation:u,scrollNext:c,scrollPrev:d}=zF(o,r);t({canScrollNext:s,canScrollPrev:i,carouselApi:a,carouselRef:l,orientation:u,scrollNext:c,scrollPrev:d});function p(h){const m=o.orientation==="vertical"?"ArrowUp":"ArrowLeft",g=o.orientation==="vertical"?"ArrowDown":"ArrowRight";if(h.key===m){h.preventDefault(),d();return}h.key===g&&(h.preventDefault(),c())}return(h,m)=>(C(),ie("div",{"data-slot":"carousel",class:qe(f(Fe)("relative",o.class)),role:"region","aria-roledescription":"carousel",tabindex:"0",onKeydown:p},[V(h.$slots,"default",{canScrollNext:f(s),canScrollPrev:f(i),carouselApi:f(a),carouselRef:f(l),orientation:f(u),scrollNext:f(c),scrollPrev:f(d)})],34))}}),GF=F({__name:"CarouselNext",props:{variant:{default:"outline"},size:{default:"icon"},class:{}},setup(e){const t=e,{orientation:n,canScrollNext:o,scrollNext:r}=ju();return(s,i)=>(C(),B(f(vn),{"data-slot":"carousel-next",disabled:!f(o),class:qe(f(Fe)("absolute size-8 rounded-full",f(n)==="horizontal"?"top-1/2 -right-12 -translate-y-1/2":"-bottom-12 left-1/2 -translate-x-1/2 rotate-90",t.class)),variant:s.variant,size:s.size,onClick:f(r)},{default:E(()=>[V(s.$slots,"default",{},()=>[q(f(Ok)),i[0]||(i[0]=ce("span",{class:"sr-only"},"Next Slide",-1))])]),_:3},8,["disabled","class","variant","size","onClick"]))}}),QF=F({__name:"CarouselPrevious",props:{variant:{default:"outline"},size:{default:"icon"},class:{}},setup(e){const t=e,{orientation:n,canScrollPrev:o,scrollPrev:r}=ju();return(s,i)=>(C(),B(f(vn),{"data-slot":"carousel-previous",disabled:!f(o),class:qe(f(Fe)("absolute size-8 rounded-full",f(n)==="horizontal"?"top-1/2 -left-12 -translate-y-1/2":"-top-12 left-1/2 -translate-x-1/2 rotate-90",t.class)),variant:s.variant,size:s.size,onClick:f(r)},{default:E(()=>[V(s.$slots,"default",{},()=>[q(f(Ak)),i[0]||(i[0]=ce("span",{class:"sr-only"},"Previous Slide",-1))])]),_:3},8,["disabled","class","variant","size","onClick"]))}}),YF=F({inheritAttrs:!1,__name:"CarouselContent",props:{class:{}},setup(e){const t=e,{carouselRef:n,orientation:o}=ju();return(r,s)=>(C(),ie("div",{ref_key:"carouselRef",ref:n,"data-slot":"carousel-content",class:"overflow-hidden h-full"},[ce("div",te({class:f(Fe)("flex",f(o)==="horizontal"?"-ml-4 h-full":"-mt-4 flex-col",t.class)},r.$attrs),[V(r.$slots,"default")],16)],512))}}),XF=F({__name:"CarouselItem",props:{class:{}},setup(e){const t=e,{orientation:n}=ju();return(o,r)=>(C(),ie("div",{"data-slot":"carousel-item",role:"group","aria-roledescription":"slide",class:qe(f(Fe)("min-w-0 shrink-0 grow-0 basis-full",f(n)==="horizontal"?"pl-4":"pt-4",t.class))},[V(o.$slots,"default")],2))}}),JF=F({__name:"AspectRatio",props:{ratio:{},asChild:{type:Boolean},as:{}},setup(e){const t=e;return(n,o)=>(C(),B(f(M1),te({"data-slot":"aspect-ratio"},t),{default:E(()=>[V(n.$slots,"default")]),_:3},16))}}),ZF={class:"relative flex flex-col gap-4 cursor-pointer group"},eL=F({__name:"AppCard",props:Un({name:{},description:{},logo:{},videoUrl:{},previewScreens:{},platform:{},isFavorite:{type:Boolean}},{isFavorite:{type:Boolean,default:!1},isFavoriteModifiers:{}}),emits:Un(["click","toggle-favorite"],["update:isFavorite"]),setup(e,{emit:t}){const n=ts(e,"isFavorite"),o=t,r=U(()=>e.platform==="web"),s={video:"video",image:ri},i=U(()=>r.value?16/10:393/892),a=U(()=>e.videoUrl?[{type:"video",id:"video",props:{src:e.videoUrl,muted:!0,autoplay:!0,loop:!0,playsinline:!0,class:"object-contain"}}]:(e.previewScreens||[]).map(c=>({type:"image",id:c.id,props:{src:c.screenUrl,fit:"contain",class:"object-contain"}}))),l=()=>{o("click")},u=()=>{n.value=!n.value,o("toggle-favorite")};return(c,d)=>{const p=XF,h=YF,m=QF,g=GF,v=WF,y=Yf;return C(),ie("div",ZF,[ce("div",{class:qe(["w-full overflow-hidden bg-[#f0f0f0] rounded-4xl flex items-center justify-center hover:bg-[#f4f4f4] transition-colors duration-300",f(r)?"aspect-[1/1]":"aspect-[7/10]"])},[q(v,{class:qe(["relative w-full h-full max-w-xs",f(r)?"h-[51%]":"h-[85%]"])},{default:E(()=>[q(h,{class:"rounded-2xl",onClick:l},{default:E(()=>[(C(!0),ie(Ie,null,wt(f(a),(b,_)=>(C(),B(p,{key:b.id||_,class:"flex items-center justify-center w-full h-full"},{default:E(()=>[q(f(JF),{ratio:f(i)},{default:E(()=>[(C(),B(ro(s[b.type]),te({ref_for:!0},b.props,{class:["w-full h-full object-contain",f(r)?"rounded-xs":"rounded-2xl"]}),null,16,["class"]))]),_:2},1032,["ratio"])]),_:2},1024))),128))]),_:1}),q(m),q(g)]),_:1},8,["class"])],2),ce("div",{class:"absolute top-2 right-2 z-10 p-2 rounded-full bg-white/50 backdrop-blur-sm opacity-0 group-hover:opacity-100 transition-opacity",onClick:Ze(u,["stop"])},[q(f(Ik),{class:qe(["w-5 h-5 text-yellow-400",n.value?"fill-yellow-400":"fill-none"])},null,8,["class"])]),q(y,{logo:c.logo,name:c.name,description:c.description},null,8,["logo","name","description"])])}}}),tL=Lu(eL,[["__scopeId","data-v-49595ce3"]]),nL={class:"relative w-full overflow-hidden flex items-center"},oL={class:"flex w-max space-x-2"},rL=F({__name:"Filter",props:{platformType:{},type:{}},emits:["change"],setup(e,{expose:t,emit:n}){const o=N(null),r=N(null),{arrivedState:s}=FC(r,{throttle:50}),{left:i,right:a}=dt(s);je(()=>{var v;if(o.value){const y=(v=o.value.$el)==null?void 0:v.querySelector("[data-reka-scroll-area-viewport]");y?r.value=y:console.error("无法找到 ScrollArea 的 viewport 元素。")}});const l=v=>{if(r.value){const y=r.value.offsetWidth*.8;r.value.scrollBy({left:v==="left"?-y:y,behavior:"smooth"})}},u=n,{definitions:c}=va($u()),d=N(),p=U(()=>{var O,T;const y=(O=(e.platformType==="web"?ql:Ks).find(A=>A.label===e.type))==null?void 0:O.value,b=c==null?void 0:c.value.find(A=>A.platformType===e.platformType&&A.slug===y);return(((T=b==null?void 0:b.children)==null?void 0:T.map(A=>A.children).flat())||[]).map(A=>A?{id:typeof A.id=="number"?String(A.id):A.id||"",label:A.label||"",definition:A.definition||"",exampleScreens:Array.isArray(A.exampleScreens)?A.exampleScreens:[]}:null).filter(Boolean)}),h=v=>{d.value=d.value===v?void 0:v},m=v=>{const y=p.value.find(b=>b.id===v);u("change",y)},g=()=>{d.value=void 0};return Ce(d,v=>{m(v)},{immediate:!0}),t({reset:g}),(v,y)=>{const b=Ho;return C(),ie("div",nL,[Fs(q(f(vn),{variant:"outline",class:"absolute left-0 top-1/2 -translate-y-1/2 w-10 rounded-full z-10 bg-background transition-opacity cursor-pointer",onClick:y[0]||(y[0]=_=>l("left"))},{default:E(()=>[q(b,{icon:"lucide:chevron-left",class:"h-4 w-4"})]),_:1},512),[[Yi,!f(i)]]),q(f(lp),{ref_key:"scrollAreaRef",ref:o,class:"flex-1 overflow-auto whitespace-nowrap rounded-md"},{default:E(()=>[ce("div",oL,[(C(!0),ie(Ie,null,wt(p.value,_=>(C(),B(f(vn),{class:"rounded-full cursor-pointer",key:_.id,variant:d.value===_.id?"default":"outline",onClick:O=>h(_.id)},{default:E(()=>[rt(Ne(_.label),1)]),_:2},1032,["variant","onClick"]))),128))])]),_:1},512),Fs(q(f(vn),{variant:"outline",class:"absolute right-0 top-1/2 -translate-y-1/2 w-10 rounded-full z-10 p-0 bg-background transition-opacity cursor-pointer",onClick:y[1]||(y[1]=_=>l("right"))},{default:E(()=>[q(b,{icon:"lucide:chevron-right",class:"h-4 w-4"})]),_:1},512),[[Yi,!f(a)]])])}}}),sL=(e,t=null,n=0)=>{const o=()=>{const r=t==null?void 0:t.value;r?r.scrollHeight-r.scrollTop-r.clientHeight<=n&&e():document.documentElement.scrollHeight-document.documentElement.scrollTop-window.innerHeight<=n&&e()};je(()=>{const r=t==null?void 0:t.value;r?r.addEventListener("scroll",o):window.addEventListener("scroll",o)}),Rt(()=>{const r=t==null?void 0:t.value;r?r.removeEventListener("scroll",o):window.removeEventListener("scroll",o)})},iL={class:"flex flex-col gap-5 py-8"},aL={class:"flex-1 min-w-0 flex flex-col gap-y-5"},lL={class:"flex items-center"},uL={key:0,class:"flex items-center gap-x-2 ml-auto"},cL={key:2,class:"flex flex-col gap-5"},dL={class:"flex gap-4 px-1 py-4"},fL={class:"flex justify-between group hover:cursor-pointer"},pL={class:"flex flex-col gap-2"},hL={class:"flex items-center gap-2 text-xl h-7 font-bold"},mL={class:"flex gap-2 opacity-0 group-hover:opacity-100 transition-all duration-100"},gL=F({__name:"HomeView",setup(e){var oe;const t=Ta(),n=ya(),o=Ii({mutationFn:Y=>A.value.find(le=>le.id===Y)?lq({appId:Y,type:1}):Promise.reject("App not found"),onSuccess:()=>{n.invalidateQueries({queryKey:["app",p,m]})}}),r=Y=>{console.log("Toggling favorite for app:",Y),o.mutate(Y)},s=kt(ep),i=U(()=>(s==null?void 0:s.value)==="web"),a=U(()=>i.value?"web":"mobile"),l=U(()=>a.value),u=$u(),{definitions:c}=va(u),d=U(()=>s?s.value==="web"?ql:Ks:[]),p=N(((oe=d.value[0])==null?void 0:oe.label)||""),h=N(null),m=N(),g=N(),v=N(),y=N(),b=N([]),_=(Y,ee)=>{if(typeof Y=="number")if(ee)b.value.push(Y);else{const le=b.value.indexOf(Y);le>-1&&b.value.splice(le,1)}},O=Y=>{if(!c.value||c.value.length===0)return[];const ee=c.value.find(le=>le.slug===Y&&le.platformType===l.value);return(ee==null?void 0:ee.children)||[]},T=U(()=>p.value||"Apps");Ce(()=>s==null?void 0:s.value,(Y,ee)=>{var ye;if(Y===ee)return;const le=p.value;if(le==="Marketing Pages"&&Y!=="web")p.value="Apps";else{const me=Y==="web"?ql:Ks;me.find(Se=>Se.label===le)||(p.value=((ye=me[0])==null?void 0:ye.label)||"")}ae(),g.value=void 0,v.value=void 0,y.value=void 0,G()},{immediate:!1});const A=U(()=>{var Y;return((Y=w.value)==null?void 0:Y.pages.flatMap(ee=>ee.list))??[]}),D=U(()=>{var Y;return((Y=w.value)==null?void 0:Y.pages.flatMap(ee=>ee.list))??[]}),P=Y=>{var ye;const ee=d.value.find(me=>me.label===p.value),le={platform:s==null?void 0:s.value,type:1,categoryType:ee==null?void 0:ee.categoryType,pageNo:Y,pageSize:20};return(ye=m.value)!=null&&ye.id&&(le.categoryId=m.value.id),le},{data:w,fetchNextPage:k,hasNextPage:$,isFetching:R,refetch:G}=mC({queryKey:["home",p,m],queryFn:async({pageParam:Y=1})=>{const ee=P(Y);return p.value==="Apps"?CB(ee):Y$(ee)},getNextPageParam:(Y,ee)=>{if(!Y)return;const le=Math.ceil(Y.total/20);if(ee.length<le)return ee.length+1},initialPageParam:1}),J=Y=>{m.value=Y},ne=()=>{ae(),g.value=void 0,v.value=void 0,y.value=void 0},ae=()=>{h.value&&h.value.reset(),m.value=void 0};sL(()=>{$.value&&!R.value&&k()});const L=Y=>{t.push({path:"/details",query:{id:Y.id,platform:Y.platform}})};return(Y,ee)=>{const le=rL,ye=tL,me=tw,Pe=ri;return C(),ie("div",iL,[ee[8]||(ee[8]=ce("h1",{class:"text-[44px] font-[600]"},"Discover",-1)),ce("div",aL,[ce("div",lL,[q(f(rp),{modelValue:f(p),"onUpdate:modelValue":[ee[0]||(ee[0]=Se=>$e(p)?p.value=Se:null),ne]},{default:E(()=>[q(f(sp),{class:"bg-transparent p-0"},{default:E(()=>[(C(!0),ie(Ie,null,wt(f(d),Se=>(C(),B(f(ip),{key:Se.label,value:Se.label,class:"!font-bold"},{default:E(()=>[rt(Ne(Se.label),1)]),_:2},1032,["value"]))),128))]),_:1})]),_:1},8,["modelValue"]),f(p)!=="Apps"?(C(),ie("div",uL,[q(f(gl),{data:O("appCategories"),"default-label":"Apps",onChange:ee[1]||(ee[1]=Se=>g.value=Se),"selection-mode":"single",placement:"end"},null,8,["data"]),f(p)!=="UI Elements"&&f(p)!=="Flows"?(C(),B(f(gl),{key:0,data:O("screenElements"),"default-label":"UI Elements",onChange:ee[2]||(ee[2]=Se=>v.value=Se),"selection-mode":"single",placement:"end"},null,8,["data"])):Be("",!0),f(p)!=="Screens"&&f(p)!=="Flows"?(C(),B(f(gl),{key:1,data:O("screenPatterns"),"default-label":"Screens",onChange:ee[3]||(ee[3]=Se=>y.value=Se),"selection-mode":"single",placement:"end"},null,8,["data"])):Be("",!0)])):Be("",!0)]),q(le,{"platform-type":f(a),type:f(T),onChange:J,ref_key:"filterRef",ref:h,class:"w-full"},null,8,["platform-type","type"]),f(p)==="Apps"?(C(),ie("div",{key:0,class:qe(["grid gap-x-4 gap-y-12",f(i)?"grid-cols-[repeat(auto-fill,minmax(min(100%,450px),1fr))]":"grid-cols-[repeat(auto-fill,minmax(min(100%,350px),1fr))]"])},[(C(!0),ie(Ie,null,wt(f(A),Se=>(C(),B(ye,{key:Se.id,id:Se.id,name:Se.name,description:Se.appTagline,logo:Se.appLogoUrl,"video-url":Se.previewVideoUrl??"","preview-screens":Se.previewScreens,onClick:x=>L(Se),platform:f(s),onToggleFavorite:()=>r(Se.id)},null,8,["id","name","description","logo","video-url","preview-screens","onClick","platform","onToggleFavorite"]))),128))],2)):["Screens","UI Elements"].includes(f(p))?(C(),ie("div",{key:1,class:qe(["grid gap-x-5 gap-y-12",f(i)?"grid-cols-[repeat(auto-fill,minmax(min(100%,500px),1fr))]":"grid-cols-[repeat(auto-fill,minmax(min(100%,230px),1fr))] auto-rows-max"])},[(C(!0),ie(Ie,null,wt(f(D),(Se,x)=>(C(),B(me,{key:x,id:Se.screenRespVO.id,src:Se.screenRespVO.screenUrl,name:Se.appRespVO.name,logo:Se.appRespVO.appLogoUrl,selected:f(b).includes(Se.screenRespVO.id),onSelect:_,platform:f(s)},null,8,["id","src","name","logo","selected","platform"]))),128))],2)):f(p)==="Flows"?(C(),ie("div",cL,[q(f(lp),{class:"w-full"},{default:E(()=>[ce("div",dL,[(C(!0),ie(Ie,null,wt(f(D),(Se,x)=>(C(),B(Pe,{key:x,src:Se.screenRespVO.screenUrl,class:qe(["shrink-0 object-cover",[f(i)?"aspect-[16/11] w-[595px] rounded-lg":"aspect-[393/892] w-[215px] rounded-3xl","transition-transform hover:scale-[1.02]"]])},null,8,["src","class"]))),128))])]),_:1}),ce("div",fL,[ce("div",pL,[ce("div",hL,[ee[4]||(ee[4]=ce("span",{class:"group-hover:underline underline-offset-8 transition-all duration-300"},"Onboarding",-1)),ee[5]||(ee[5]=ce("span",{class:"text-gray-500"},"in",-1)),q(Pe,{class:"h-full"}),ee[6]||(ee[6]=ce("span",{class:"group-hover:underline underline-offset-8 transition-all duration-300"},"MoonPay",-1))]),ee[7]||(ee[7]=ce("span",{class:"text-sm text-gray-500"}," 100+ screens ",-1))]),ce("div",mL,[q(f(vn),{text:"Save",class:"bg-black text-white hover:opacity-80"}),q(f(vn),{text:"Copy",class:"bg-[#E3E3E3] hover:opacity-80 text-black"})])])])):Be("",!0)])])}}}),sw=OM({history:nM("/"),routes:[{path:"/",name:"home",component:gL},{path:"/details",name:"details",component:cF},{path:"/apps",name:"apps",component:()=>mi(()=>import("./Apps-BRMcQyeI.js"),__vite__mapDeps([0,1,2,3,4,5,6]))},{path:"/auth",name:"auth",component:()=>mi(()=>import("./Auth-BJGZikMq.js"),__vite__mapDeps([7,3,4,1,8]))},{path:"/settings",name:"settings",component:()=>mi(()=>import("./Settings-CkK03M1s.js"),__vite__mapDeps([9,4]))},{path:"/favorites",name:"favorites",component:()=>mi(()=>import("./Favorites-C1kb4hNA.js"),__vite__mapDeps([10,5,1]))},{path:"/chat",name:"chat",component:()=>mi(()=>import("./Chat-CbyEIPNl.js"),__vite__mapDeps([11,2,12]))}]});sw.beforeEach((e,t,n)=>{const o=localStorage.getItem("accessToken"),{fetchUserInfo:r,userInfo:s}=D_(),i=["auth"];return o?(!s.id&&e.name!=="auth"&&r(),e.name==="auth"?n({name:"home"}):n()):i.includes(e.name)?n():n({name:"auth"})});const Vu=DS(YM);Vu.use(pC);Vu.use(MS());Vu.use(sw);Vu.mount("#app");export{Ii as $,By as A,mo as B,Uo as C,kf as D,Un as E,ts as F,ie as G,Fs as H,Ho as I,Pt as J,Ne as K,AS as L,et as M,ft as N,Fe as O,Ae as P,Kt as Q,Ry as R,qe as S,EL as T,$e as U,My as V,ce as W,rt as X,GL as Y,ya as Z,vn as _,In as a,df as a$,wk as a0,Bk as a1,$k as a2,qk as a3,ri as a4,wt as a5,Ie as a6,X$ as a7,ct as a8,yt as a9,un as aA,zg as aB,ut as aC,We as aD,Et as aE,Ys as aF,Nn as aG,bd as aH,zt as aI,Dk as aJ,xb as aK,lb as aL,yP as aM,bP as aN,ql as aO,Ks as aP,mC as aQ,sL as aR,rp as aS,sp as aT,ip as aU,u$ as aV,ep as aW,eN as aX,tN as aY,DM as aZ,tu as a_,rF as aa,sF as ab,J$ as ac,Z$ as ad,tF as ae,YL as af,QL as ag,hC as ah,xL as ai,ap as aj,jM as ak,Yf as al,Ta as am,EB as an,XL as ao,Lu as ap,bL as aq,JL as ar,ZL as as,Bi as at,Ht as au,je as av,Ge as aw,Qs as ax,kt as ay,ro as az,dt as b,U as c,F as d,ve as e,Pf as f,B as g,uu as h,C as i,E as j,Be as k,Ze as l,te as m,ns as n,Gs as o,lt as p,q,V as r,Cn as s,yL as t,f as u,Yr as v,Ce as w,N as x,js as y,qo as z};
DesignScreenshot/output/100.64.0.2_run/100.64.0.2_8083_3_credentials_filled.html:97:`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const o=new this(t);return n.forEach(r=>o.set(r)),o}static accessor(t){const o=(this[lm]=this[lm]={accessors:{}}).accessors,r=this.prototype;function s(i){const a=pi(i);o[a]||(sR(r,i),o[a]=!0)}return W.isArray(t)?t.forEach(s):s(t),this}};gn.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);W.reduceDescriptors(gn.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(o){this[n]=o}}});W.freezeMethods(gn);function vc(e,t){const n=this||Aa,o=t||n,r=gn.from(o.headers);let s=o.data;return W.forEach(e,function(a){s=a.call(n,s,r.normalize(),t?t.status:void 0)}),r.normalize(),s}function e_(e){return!!(e&&e.__CANCEL__)}function ii(e,t,n){Ve.call(this,e??"canceled",Ve.ERR_CANCELED,t,n),this.name="CanceledError"}W.inherits(ii,Ve,{__CANCEL__:!0});function t_(e,t,n){const o=n.config.validateStatus;!n.status||!o||o(n.status)?e(n):t(new Ve("Request failed with status code "+n.status,[Ve.ERR_BAD_REQUEST,Ve.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function iR(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function aR(e,t){e=e||10;const n=new Array(e),o=new Array(e);let r=0,s=0,i;return t=t!==void 0?t:1e3,function(l){const u=Date.now(),c=o[s];i||(i=u),n[r]=l,o[r]=u;let d=s,p=0;for(;d!==r;)p+=n[d++],d=d%e;if(r=(r+1)%e,r===s&&(s=(s+1)%e),u-i<t)return;const h=c&&u-c;return h?Math.round(p*1e3/h):void 0}}function lR(e,t){let n=0,o=1e3/t,r,s;const i=(u,c=Date.now())=>{n=c,r=null,s&&(clearTimeout(s),s=null),e(...u)};return[(...u)=>{const c=Date.now(),d=c-n;d>=o?i(u,c):(r=u,s||(s=setTimeout(()=>{s=null,i(r)},o-d)))},()=>r&&i(r)]}const Bl=(e,t,n=3)=>{let o=0;const r=aR(50,250);return lR(s=>{const i=s.loaded,a=s.lengthComputable?s.total:void 0,l=i-o,u=r(l),c=i<=a;o=i;const d={loaded:i,total:a,progress:a?i/a:void 0,bytes:l,rate:u||void 0,estimated:u&&a&&c?(a-i)/u:void 0,event:s,lengthComputable:a!=null,[t?"download":"upload"]:!0};e(d)},n)},um=(e,t)=>{const n=e!=null;return[o=>t[0]({lengthComputable:n,total:e,loaded:o}),t[1]]},cm=e=>(...t)=>W.asap(()=>e(...t)),uR=Jt.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,Jt.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(Jt.origin),Jt.navigator&&/(msie|trident)/i.test(Jt.navigator.userAgent)):()=>!0,cR=Jt.hasStandardBrowserEnv?{write(e,t,n,o,r,s){const i=[e+"="+encodeURIComponent(t)];W.isNumber(n)&&i.push("expires="+new Date(n).toGMTString()),W.isString(o)&&i.push("path="+o),W.isString(r)&&i.push("domain="+r),s===!0&&i.push("secure"),document.cookie=i.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function dR(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function fR(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function n_(e,t,n){let o=!dR(t);return e&&(o||n==!1)?fR(e,t):t}const dm=e=>e instanceof gn?{...e}:e;function Zr(e,t){t=t||{};const n={};function o(u,c,d,p){return W.isPlainObject(u)&&W.isPlainObject(c)?W.merge.call({caseless:p},u,c):W.isPlainObject(c)?W.merge({},c):W.isArray(c)?c.slice():c}function r(u,c,d,p){if(W.isUndefined(c)){if(!W.isUndefined(u))return o(void 0,u,d,p)}else return o(u,c,d,p)}function s(u,c){if(!W.isUndefined(c))return o(void 0,c)}function i(u,c){if(W.isUndefined(c)){if(!W.isUndefined(u))return o(void 0,u)}else return o(void 0,c)}function a(u,c,d){if(d in t)return o(u,c);if(d in e)return o(void 0,u)}const l={url:s,method:s,data:s,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,responseEncoding:i,validateStatus:a,headers:(u,c,d)=>r(dm(u),dm(c),d,!0)};return W.forEach(Object.keys({...e,...t}),function(c){const d=l[c]||r,p=d(e[c],t[c],c);W.isUndefined(p)&&d!==a||(n[c]=p)}),n}const o_=e=>{const t=Zr({},e);let{data:n,withXSRFToken:o,xsrfHeaderName:r,xsrfCookieName:s,headers:i,auth:a}=t;t.headers=i=gn.from(i),t.url=Xb(n_(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),a&&i.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):"")));let l;if(W.isFormData(n)){if(Jt.hasStandardBrowserEnv||Jt.hasStandardBrowserWebWorkerEnv)i.setContentType(void 0);else if((l=i.getContentType())!==!1){const[u,...c]=l?l.split(";").map(d=>d.trim()).filter(Boolean):[];i.setContentType([u||"multipart/form-data",...c].join("; "))}}if(Jt.hasStandardBrowserEnv&&(o&&W.isFunction(o)&&(o=o(t)),o||o!==!1&&uR(t.url))){const u=r&&s&&cR.read(s);u&&i.set(r,u)}return t},pR=typeof XMLHttpRequest<"u",hR=pR&&function(e){return new Promise(function(n,o){const r=o_(e);let s=r.data;const i=gn.from(r.headers).normalize();let{responseType:a,onUploadProgress:l,onDownloadProgress:u}=r,c,d,p,h,m;function g(){h&&h(),m&&m(),r.cancelToken&&r.cancelToken.unsubscribe(c),r.signal&&r.signal.removeEventListener("abort",c)}let v=new XMLHttpRequest;v.open(r.method.toUpperCase(),r.url,!0),v.timeout=r.timeout;function y(){if(!v)return;const _=gn.from("getAllResponseHeaders"in v&&v.getAllResponseHeaders()),T={data:!a||a==="text"||a==="json"?v.responseText:v.response,status:v.status,statusText:v.statusText,headers:_,config:e,request:v};t_(function(D){n(D),g()},function(D){o(D),g()},T),v=null}"onloadend"in v?v.onloadend=y:v.onreadystatechange=function(){!v||v.readyState!==4||v.status===0&&!(v.responseURL&&v.responseURL.indexOf("file:")===0)||setTimeout(y)},v.onabort=function(){v&&(o(new Ve("Request aborted",Ve.ECONNABORTED,e,v)),v=null)},v.onerror=function(){o(new Ve("Network Error",Ve.ERR_NETWORK,e,v)),v=null},v.ontimeout=function(){let O=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const T=r.transitional||Jb;r.timeoutErrorMessage&&(O=r.timeoutErrorMessage),o(new Ve(O,T.clarifyTimeoutError?Ve.ETIMEDOUT:Ve.ECONNABORTED,e,v)),v=null},s===void 0&&i.setContentType(null),"setRequestHeader"in v&&W.forEach(i.toJSON(),function(O,T){v.setRequestHeader(T,O)}),W.isUndefined(r.withCredentials)||(v.withCredentials=!!r.withCredentials),a&&a!=="json"&&(v.responseType=r.responseType),u&&([p,m]=Bl(u,!0),v.addEventListener("progress",p)),l&&v.upload&&([d,h]=Bl(l),v.upload.addEventListener("progress",d),v.upload.addEventListener("loadend",h)),(r.cancelToken||r.signal)&&(c=_=>{v&&(o(!_||_.type?new ii(null,e,v):_),v.abort(),v=null)},r.cancelToken&&r.cancelToken.subscribe(c),r.signal&&(r.signal.aborted?c():r.signal.addEventListener("abort",c)));const b=iR(r.url);if(b&&Jt.protocols.indexOf(b)===-1){o(new Ve("Unsupported protocol "+b+":",Ve.ERR_BAD_REQUEST,e));return}v.send(s||null)})},mR=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let o=new AbortController,r;const s=function(u){if(!r){r=!0,a();const c=u instanceof Error?u:this.reason;o.abort(c instanceof Ve?c:new ii(c instanceof Error?c.message:c))}};let i=t&&setTimeout(()=>{i=null,s(new Ve(`timeout ${t} of ms exceeded`,Ve.ETIMEDOUT))},t);const a=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach(u=>{u.unsubscribe?u.unsubscribe(s):u.removeEventListener("abort",s)}),e=null)};e.forEach(u=>u.addEventListener("abort",s));const{signal:l}=o;return l.unsubscribe=()=>W.asap(a),l}},gR=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let o=0,r;for(;o<n;)r=o+t,yield e.slice(o,r),o=r},vR=async function*(e,t){for await(const n of yR(e))yield*gR(n,t)},yR=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:n,value:o}=await t.read();if(n)break;yield o}}finally{await t.cancel()}},fm=(e,t,n,o)=>{const r=vR(e,t);let s=0,i,a=l=>{i||(i=!0,o&&o(l))};return new ReadableStream({async pull(l){try{const{done:u,value:c}=await r.next();if(u){a(),l.close();return}let d=c.byteLength;if(n){let p=s+=d;n(p)}l.enqueue(new Uint8Array(c))}catch(u){throw a(u),u}},cancel(l){return a(l),r.return()}},{highWaterMark:2})},Ru=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",r_=Ru&&typeof ReadableStream=="function",bR=Ru&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),s_=(e,...t)=>{try{return!!e(...t)}catch{return!1}},_R=r_&&s_(()=>{let e=!1;const t=new Request(Jt.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),pm=64*1024,jd=r_&&s_(()=>W.isReadableStream(new Response("").body)),Ml={stream:jd&&(e=>e.body)};Ru&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!Ml[t]&&(Ml[t]=W.isFunction(e[t])?n=>n[t]():(n,o)=>{throw new Ve(`Response type '${t}' is not supported`,Ve.ERR_NOT_SUPPORT,o)})})})(new Response);const wR=async e=>{if(e==null)return 0;if(W.isBlob(e))return e.size;if(W.isSpecCompliantForm(e))return(await new Request(Jt.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(W.isArrayBufferView(e)||W.isArrayBuffer(e))return e.byteLength;if(W.isURLSearchParams(e)&&(e=e+""),W.isString(e))return(await bR(e)).byteLength},SR=async(e,t)=>{const n=W.toFiniteNumber(e.getContentLength());return n??wR(t)},CR=Ru&&(async e=>{let{url:t,method:n,data:o,signal:r,cancelToken:s,timeout:i,onDownloadProgress:a,onUploadProgress:l,responseType:u,headers:c,withCredentials:d="same-origin",fetchOptions:p}=o_(e);u=u?(u+"").toLowerCase():"text";let h=mR([r,s&&s.toAbortSignal()],i),m;const g=h&&h.unsubscribe&&(()=>{h.unsubscribe()});let v;try{if(l&&_R&&n!=="get"&&n!=="head"&&(v=await SR(c,o))!==0){let T=new Request(t,{method:"POST",body:o,duplex:"half"}),A;if(W.isFormData(o)&&(A=T.headers.get("content-type"))&&c.setContentType(A),T.body){const[D,P]=um(v,Bl(cm(l)));o=fm(T.body,pm,D,P)}}W.isString(d)||(d=d?"include":"omit");const y="credentials"in Request.prototype;m=new Request(t,{...p,signal:h,method:n.toUpperCase(),headers:c.normalize().toJSON(),body:o,duplex:"half",credentials:y?d:void 0});let b=await fetch(m,p);const _=jd&&(u==="stream"||u==="response");if(jd&&(a||_&&g)){const T={};["status","statusText","headers"].forEach(w=>{T[w]=b[w]});const A=W.toFiniteNumber(b.headers.get("content-length")),[D,P]=a&&um(A,Bl(cm(a),!0))||[];b=new Response(fm(b.body,pm,D,()=>{P&&P(),g&&g()}),T)}u=u||"text";let O=await Ml[W.findKey(Ml,u)||"text"](b,e);return!_&&g&&g(),await new Promise((T,A)=>{t_(T,A,{data:O,headers:gn.from(b.headers),status:b.status,statusText:b.statusText,config:e,request:m})})}catch(y){throw g&&g(),y&&y.name==="TypeError"&&/Load failed|fetch/i.test(y.message)?Object.assign(new Ve("Network Error",Ve.ERR_NETWORK,e,m),{cause:y.cause||y}):Ve.from(y,y&&y.code,e,m)}}),Vd={http:FD,xhr:hR,fetch:CR};W.forEach(Vd,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const hm=e=>`- ${e}`,xR=e=>W.isFunction(e)||e===null||e===!1,i_={getAdapter:e=>{e=W.isArray(e)?e:[e];const{length:t}=e;let n,o;const r={};for(let s=0;s<t;s++){n=e[s];let i;if(o=n,!xR(n)&&(o=Vd[(i=String(n)).toLowerCase()],o===void 0))throw new Ve(`Unknown adapter '${i}'`);if(o)break;r[i||"#"+s]=o}if(!o){const s=Object.entries(r).map(([a,l])=>`adapter ${a} `+(l===!1?"is not supported by the environment":"is not available in the build"));let i=t?s.length>1?`since :
DesignScreenshot/output/100.64.0.2_run/100.64.0.2_8083_3_credentials_filled.html:100:`+s):o.stack=s}catch{}}throw o}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Zr(this.defaults,n);const{transitional:o,paramsSerializer:r,headers:s}=n;o!==void 0&&ul.assertOptions(o,{silentJSONParsing:Jn.transitional(Jn.boolean),forcedJSONParsing:Jn.transitional(Jn.boolean),clarifyTimeoutError:Jn.transitional(Jn.boolean)},!1),r!=null&&(W.isFunction(r)?n.paramsSerializer={serialize:r}:ul.assertOptions(r,{encode:Jn.function,serialize:Jn.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),ul.assertOptions(n,{baseUrl:Jn.spelling("baseURL"),withXsrfToken:Jn.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let i=s&&W.merge(s.common,s[n.method]);s&&W.forEach(["delete","get","head","post","put","patch","common"],m=>{delete s[m]}),n.headers=gn.concat(i,s);const a=[];let l=!0;this.interceptors.request.forEach(function(g){typeof g.runWhen=="function"&&g.runWhen(n)===!1||(l=l&&g.synchronous,a.unshift(g.fulfilled,g.rejected))});const u=[];this.interceptors.response.forEach(function(g){u.push(g.fulfilled,g.rejected)});let c,d=0,p;if(!l){const m=[mm.bind(this),void 0];for(m.unshift(...a),m.push(...u),p=m.length,c=Promise.resolve(n);d<p;)c=c.then(m[d++],m[d++]);return c}p=a.length;let h=n;for(d=0;d<p;){const m=a[d++],g=a[d++];try{h=m(h)}catch(v){g.call(this,v);break}}try{c=mm.call(this,h)}catch(m){return Promise.reject(m)}for(d=0,p=u.length;d<p;)c=c.then(u[d++],u[d++]);return c}getUri(t){t=Zr(this.defaults,t);const n=n_(t.baseURL,t.url,t.allowAbsoluteUrls);return Xb(n,t.params,t.paramsSerializer)}};W.forEach(["delete","get","head","options"],function(t){Wr.prototype[t]=function(n,o){return this.request(Zr(o||{},{method:t,url:n,data:(o||{}).data}))}});W.forEach(["post","put","patch"],function(t){function n(o){return function(s,i,a){return this.request(Zr(a||{},{method:t,headers:o?{"Content-Type":"multipart/form-data"}:{},url:s,data:i}))}}Wr.prototype[t]=n(),Wr.prototype[t+"Form"]=n(!0)});let AR=class l_{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(s){n=s});const o=this;this.promise.then(r=>{if(!o._listeners)return;let s=o._listeners.length;for(;s-- >0;)o._listeners[s](r);o._listeners=null}),this.promise.then=r=>{let s;const i=new Promise(a=>{o.subscribe(a),s=a}).then(r);return i.cancel=function(){o.unsubscribe(s)},i},t(function(s,i,a){o.reason||(o.reason=new ii(s,i,a),n(o.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=o=>{t.abort(o)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new l_(function(r){t=r}),cancel:t}}};function OR(e){return function(n){return e.apply(null,n)}}function TR(e){return W.isObject(e)&&e.isAxiosError===!0}const Ud={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Ud).forEach(([e,t])=>{Ud[t]=e});function u_(e){const t=new Wr(e),n=Lb(Wr.prototype.request,t);return W.extend(n,Wr.prototype,t,{allOwnKeys:!0}),W.extend(n,t,null,{allOwnKeys:!0}),n.create=function(r){return u_(Zr(e,r))},n}const xt=u_(Aa);xt.Axios=Wr;xt.CanceledError=ii;xt.CancelToken=AR;xt.isCancel=e_;xt.VERSION=a_;xt.toFormData=Du;xt.AxiosError=Ve;xt.Cancel=xt.CanceledError;xt.all=function(t){return Promise.all(t)};xt.spread=OR;xt.isAxiosError=TR;xt.mergeConfig=Zr;xt.AxiosHeaders=gn;xt.formToJSON=e=>Zb(W.isHTMLForm(e)?new FormData(e):e);xt.getAdapter=i_.getAdapter;xt.HttpStatusCode=Ud;xt.default=xt;const{Axios:DL,AxiosError:RL,CanceledError:BL,isCancel:ML,CancelToken:qL,VERSION:$L,all:FL,Cancel:LL,isAxiosError:NL,spread:jL,toFormData:VL,AxiosHeaders:UL,HttpStatusCode:HL,formToJSON:zL,getAdapter:KL,mergeConfig:WL}=xt;let Hd=1;var PR=class{constructor(){Mt(this,"subscribers");Mt(this,"toasts");Mt(this,"dismissedToasts");Mt(this,"subscribe",e=>(this.subscribers.push(e),()=>{const t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}));Mt(this,"publish",e=>{this.subscribers.forEach(t=>t(e))});Mt(this,"addToast",e=>{this.publish(e),this.toasts=[...this.toasts,e]});Mt(this,"create",e=>{var i;const{message:t,...n}=e,o=typeof e.id=="number"||e.id&&((i=e.id)==null?void 0:i.length)>0?e.id:Hd++,r=this.toasts.find(a=>a.id===o),s=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(o)&&this.dismissedToasts.delete(o),r?this.toasts=this.toasts.map(a=>a.id===o?(this.publish({...a,...e,id:o,title:t}),{...a,...e,id:o,dismissible:s,title:t}):a):this.addToast({title:t,...n,dismissible:s,id:o}),o});Mt(this,"dismiss",e=>(e?(this.dismissedToasts.add(e),requestAnimationFrame(()=>this.subscribers.forEach(t=>t({id:e,dismiss:!0})))):this.toasts.forEach(t=>{this.subscribers.forEach(n=>n({id:t.id,dismiss:!0}))}),e));Mt(this,"message",(e,t)=>this.create({...t,message:e,type:"default"}));Mt(this,"error",(e,t)=>this.create({...t,type:"error",message:e}));Mt(this,"success",(e,t)=>this.create({...t,type:"success",message:e}));Mt(this,"info",(e,t)=>this.create({...t,type:"info",message:e}));Mt(this,"warning",(e,t)=>this.create({...t,type:"warning",message:e}));Mt(this,"loading",(e,t)=>this.create({...t,type:"loading",message:e}));Mt(this,"promise",(e,t)=>{if(!t)return;let n;t.loading!==void 0&&(n=this.create({...t,promise:e,type:"loading",message:t.loading,description:typeof t.description!="function"?t.description:void 0}));const o=Promise.resolve(e instanceof Function?e():e);let r=n!==void 0,s;const i=o.then(async l=>{if(s=["resolve",l],so(l))r=!1,this.create({id:n,type:"default",message:l});else if(IR(l)&&!l.ok){r=!1;const c=typeof t.error=="function"?await t.error(`HTTP error! status: ${l.status}`):t.error,d=typeof t.description=="function"?await t.description(`HTTP error! status: ${l.status}`):t.description,h=typeof c=="object"&&!so(c)?c:{message:c||"",id:n||""};this.create({id:n,type:"error",description:d,...h})}else if(l instanceof Error){r=!1;const c=typeof t.error=="function"?await t.error(l):t.error,d=typeof t.description=="function"?await t.description(l):t.description,h=typeof c=="object"&&!so(c)?c:{message:c||"",id:n||""};this.create({id:n,type:"error",description:d,...h})}else if(t.success!==void 0){r=!1;const c=typeof t.success=="function"?await t.success(l):t.success,d=typeof t.description=="function"?await t.description(l):t.description,h=typeof c=="object"&&!so(c)?c:{message:c||"",id:n||""};this.create({id:n,type:"success",description:d,...h})}}).catch(async l=>{if(s=["reject",l],t.error!==void 0){r=!1;const u=typeof t.error=="function"?await t.error(l):t.error,c=typeof t.description=="function"?await t.description(l):t.description,p=typeof u=="object"&&!so(u)?u:{message:u||"",id:n||""};this.create({id:n,type:"error",description:c,...p})}}).finally(()=>{var l;r&&(this.dismiss(n),n=void 0),(l=t.finally)==null||l.call(t)}),a=()=>new Promise((l,u)=>i.then(()=>s[0]==="reject"?u(s[1]):l(s[1])).catch(u));return typeof n!="string"&&typeof n!="number"?{unwrap:a}:Object.assign(n,{unwrap:a})});Mt(this,"custom",(e,t)=>{const n=(t==null?void 0:t.id)||Hd++;return this.publish({component:e,id:n,...t}),n});Mt(this,"getActiveToasts",()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)));this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}};const hn=new PR;function kR(e,t){const n=(t==null?void 0:t.id)||Hd++;return hn.create({message:e,id:n,type:"default",...t}),n}const IR=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",DR=kR,RR=()=>hn.toasts,BR=()=>hn.getActiveToasts(),Bi=Object.assign(DR,{success:hn.success,info:hn.info,warning:hn.warning,error:hn.error,custom:hn.custom,message:hn.message,promise:hn.promise,dismiss:hn.dismiss,loading:hn.loading},{getHistory:RR,getToasts:BR});function Wa(e){return e.label!==void 0}const MR=3,c_="24px",d_="16px",vm=4e3,qR=356,$R=14,FR=45,f_=200;function LR(){const e=N(!1);return ut(()=>{const t=()=>{e.value=document.hidden};return document.addEventListener("visibilitychange",t),()=>window.removeEventListener("visibilitychange",t)}),{isDocumentHidden:e}}function Go(...e){return e.filter(Boolean).join(" ")}function NR(e){const[t,n]=e.split("-"),o=[];return t&&o.push(t),n&&o.push(n),o}function jR(e,t){const n={};return[e,t].forEach((o,r)=>{const s=r===1,i=s?"--mobile-offset":"--offset",a=s?d_:c_;function l(u){["top","right","bottom","left"].forEach(c=>{n[`${i}-${c}`]=typeof u=="number"?`${u}px`:u})}typeof o=="number"||typeof o=="string"?l(o):typeof o=="object"?["top","right","bottom","left"].forEach(u=>{o[u]===void 0?n[`${i}-${u}`]=a:n[`${i}-${u}`]=typeof o[u]=="number"?`${o[u]}px`:o[u]}):l(a)}),n}const VR=["data-rich-colors","data-styled","data-mounted","data-promise","data-swiped","data-removed","data-visible","data-y-position","data-x-position","data-index","data-front","data-swiping","data-dismissible","data-type","data-invert","data-swipe-out","data-swipe-direction","data-expanded"],UR=["aria-label","data-disabled"];var HR=F({__name:"Toast",props:{toast:{},toasts:{},index:{},swipeDirections:{},expanded:{type:Boolean},invert:{type:Boolean},heights:{},gap:{},position:{},visibleToasts:{},expandByDefault:{type:Boolean},closeButton:{type:Boolean},interacting:{type:Boolean},style:{},cancelButtonStyle:{},actionButtonStyle:{},duration:{},class:{},unstyled:{type:Boolean},descriptionClass:{},loadingIcon:{},classes:{},icons:{},closeButtonAriaLabel:{},defaultRichColors:{type:Boolean}},emits:["update:heights","update:height","removeToast"],setup(e,{emit:t}){const n=e,o=t,r=N(null),s=N(null),i=N(!1),a=N(!1),l=N(!1),u=N(!1),c=N(!1),d=N(0),p=N(0),h=N(n.toast.duration||n.duration||vm),m=N(null),g=N(null),v=U(()=>n.index===0),y=U(()=>n.index+1<=n.visibleToasts),b=U(()=>n.toast.type),_=U(()=>n.toast.dismissible!==!1),O=U(()=>n.toast.class||""),T=U(()=>n.descriptionClass||""),A=U(()=>{const x=n.toast.position||n.position,H=n.heights.filter(X=>X.position===x).findIndex(X=>X.toastId===n.toast.id);return H>=0?H:0}),D=U(()=>{const x=n.toast.position||n.position;return n.heights.filter(H=>H.position===x).reduce((H,X,pe)=>pe>=A.value?H:H+X.height,0)}),P=U(()=>A.value*n.gap+D.value||0),w=U(()=>n.toast.closeButton??n.closeButton),k=U(()=>n.toast.duration||n.duration||vm),$=N(0),R=N(0),G=N(null),J=U(()=>n.position.split("-")),ne=U(()=>J.value[0]),ae=U(()=>J.value[1]),re=U(()=>typeof n.toast.title!="string"),L=U(()=>typeof n.toast.description!="string"),{isDocumentHidden:oe}=LR(),Y=U(()=>b.value&&b.value==="loading");je(()=>{i.value=!0,h.value=k.value}),ut(async()=>{if(!i.value||!g.value)return;await We();const x=g.value,z=x.style.height;x.style.height="auto";const H=x.getBoundingClientRect().height;x.style.height=z,p.value=H,o("update:height",{toastId:n.toast.id,height:H,position:n.toast.position||n.position})});function ee(){a.value=!0,d.value=P.value,setTimeout(()=>{o("removeToast",n.toast)},f_)}function le(){var x,z;if(Y.value||!_.value)return{};ee(),(z=(x=n.toast).onDismiss)==null||z.call(x,n.toast)}function ye(x){Y.value||!_.value||(m.value=new Date,d.value=P.value,x.target.setPointerCapture(x.pointerId),x.target.tagName!=="BUTTON"&&(l.value=!0,G.value={x:x.clientX,y:x.clientY}))}function me(){var S,I,j,K,Z,Q,ue;if(u.value||!_.value)return;G.value=null;const x=Number(((S=g.value)==null?void 0:S.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),z=Number(((I=g.value)==null?void 0:I.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),H=new Date().getTime()-(((j=m.value)==null?void 0:j.getTime())||0),X=r.value==="x"?x:z,pe=Math.abs(X)/H;if(Math.abs(X)>=FR||pe>.11){d.value=P.value,(Z=(K=n.toast).onDismiss)==null||Z.call(K,n.toast),r.value==="x"?s.value=x>0?"right":"left":s.value=z>0?"down":"up",ee(),u.value=!0;return}else(Q=g.value)==null||Q.style.setProperty("--swipe-amount-x","0px"),(ue=g.value)==null||ue.style.setProperty("--swipe-amount-y","0px");c.value=!1,l.value=!1,r.value=null}function Pe(x){var j,K,Z,Q;if(!G.value||!_.value||(((K=(j=window==null?void 0:window.getSelection())==null?void 0:j.toString())==null?void 0:K.length)??!1))return;const H=x.clientY-G.value.y,X=x.clientX-G.value.x,pe=n.swipeDirections??NR(n.position);!r.value&&(Math.abs(X)>1||Math.abs(H)>1)&&(r.value=Math.abs(X)>Math.abs(H)?"x":"y");let S={x:0,y:0};const I=ue=>1/(1.5+Math.abs(ue)/20);if(r.value==="y"){if(pe.includes("top")||pe.includes("bottom"))if(pe.includes("top")&&H<0||pe.includes("bottom")&&H>0)S.y=H;else{const ue=H*I(H);S.y=Math.abs(ue)<Math.abs(H)?ue:H}}else if(r.value==="x"&&(pe.includes("left")||pe.includes("right")))if(pe.includes("left")&&X<0||pe.includes("right")&&X>0)S.x=X;else{const ue=X*I(X);S.x=Math.abs(ue)<Math.abs(X)?ue:X}(Math.abs(S.x)>0||Math.abs(S.y)>0)&&(c.value=!0),(Z=g.value)==null||Z.style.setProperty("--swipe-amount-x",`${S.x}px`),(Q=g.value)==null||Q.style.setProperty("--swipe-amount-y",`${S.y}px`)}je(()=>{if(i.value=!0,!g.value)return;const x=g.value.getBoundingClientRect().height;p.value=x;const z=[{toastId:n.toast.id,height:x,position:n.toast.position},...n.heights];o("update:heights",z)}),Ys(()=>{g.value&&o("removeToast",n.toast)}),ut(x=>{if(n.toast.promise&&b.value==="loading"||n.toast.duration===1/0||n.toast.type==="loading")return;let z;const H=()=>{if(R.value<$.value){const pe=new Date().getTime()-$.value;h.value=h.value-pe}R.value=new Date().getTime()},X=()=>{h.value!==1/0&&($.value=new Date().getTime(),z=setTimeout(()=>{var pe,S;(S=(pe=n.toast).onAutoClose)==null||S.call(pe,n.toast),ee()},h.value))};n.expanded||n.interacting||oe.value?H():X(),x(()=>{clearTimeout(z)})}),Ce(()=>n.toast.delete,x=>{x!==void 0&&x&&ee()},{deep:!0});function Se(){l.value=!1,r.value=null,G.value=null}return(x,z)=>{var H,X,pe,S,I,j,K,Z,Q,ue,fe,de,se,xe,ge,Ee,ke,He,tt,Ye,At,mt,$t,Ft,yn,Cr,Bt;return C(),ie("li",{tabindex:"0",ref_key:"toastRef",ref:g,class:qe(f(Go)(n.class,O.value,(H=x.classes)==null?void 0:H.toast,(X=x.toast.classes)==null?void 0:X.toast,(pe=x.classes)==null?void 0:pe[b.value],(I=(S=x.toast)==null?void 0:S.classes)==null?void 0:I[b.value])),"data-sonner-toast":"","data-rich-colors":x.toast.richColors??x.defaultRichColors,"data-styled":!(x.toast.component||(j=x.toast)!=null&&j.unstyled||x.unstyled),"data-mounted":i.value,"data-promise":!!x.toast.promise,"data-swiped":c.value,"data-removed":a.value,"data-visible":y.value,"data-y-position":ne.value,"data-x-position":ae.value,"data-index":x.index,"data-front":v.value,"data-swiping":l.value,"data-dismissible":_.value,"data-type":b.value,"data-invert":x.toast.invert||x.invert,"data-swipe-out":u.value,"data-swipe-direction":s.value,"data-expanded":!!(x.expanded||x.expandByDefault&&i.value),style:Pt({"--index":x.index,"--toasts-before":x.index,"--z-index":x.toasts.length-x.index,"--offset":`${a.value?d.value:P.value}px`,"--initial-height":x.expandByDefault?"auto":`${p.value}px`,...x.style,...n.toast.style}),onDragend:Se,onPointerdown:ye,onPointerup:me,onPointermove:Pe},[w.value&&!x.toast.component&&b.value!=="loading"?(C(),ie("button",{key:0,"aria-label":x.closeButtonAriaLabel||"Close toast","data-disabled":Y.value,"data-close-button":"true",class:qe(f(Go)((K=x.classes)==null?void 0:K.closeButton,(Q=(Z=x.toast)==null?void 0:Z.classes)==null?void 0:Q.closeButton)),onClick:le},[(ue=x.icons)!=null&&ue.close?(C(),B(ro((fe=x.icons)==null?void 0:fe.close),{key:0})):V(x.$slots,"close-icon",{key:1})],10,UR)):Be("v-if",!0),x.toast.component?(C(),B(ro(x.toast.component),te({key:1},x.toast.componentProps,{onCloseToast:le}),null,16)):(C(),ie(Ie,{key:2},[b.value!=="default"||x.toast.icon||x.toast.promise?(C(),ie("div",{key:0,"data-icon":"",class:qe(f(Go)((de=x.classes)==null?void 0:de.icon,(xe=(se=x.toast)==null?void 0:se.classes)==null?void 0:xe.icon))},[x.toast.icon?(C(),B(ro(x.toast.icon),{key:0})):(C(),ie(Ie,{key:1},[b.value==="loading"?V(x.$slots,"loading-icon",{key:0}):b.value==="success"?V(x.$slots,"success-icon",{key:1}):b.value==="error"?V(x.$slots,"error-icon",{key:2}):b.value==="warning"?V(x.$slots,"warning-icon",{key:3}):b.value==="info"?V(x.$slots,"info-icon",{key:4}):Be("v-if",!0)],64))],2)):Be("v-if",!0),ce("div",{"data-content":"",class:qe(f(Go)((ge=x.classes)==null?void 0:ge.content,(ke=(Ee=x.toast)==null?void 0:Ee.classes)==null?void 0:ke.content))},[ce("div",{"data-title":"",class:qe(f(Go)((He=x.classes)==null?void 0:He.title,(tt=x.toast.classes)==null?void 0:tt.title))},[re.value?(C(),B(ro(x.toast.title),ct(te({key:0},x.toast.componentProps)),null,16)):(C(),ie(Ie,{key:1},[rt(Ne(x.toast.title),1)],64))],2),x.toast.description?(C(),ie("div",{key:0,"data-description":"",class:qe(f(Go)(x.descriptionClass,T.value,(Ye=x.classes)==null?void 0:Ye.description,(At=x.toast.classes)==null?void 0:At.description))},[L.value?(C(),B(ro(x.toast.description),ct(te({key:0},x.toast.componentProps)),null,16)):(C(),ie(Ie,{key:1},[rt(Ne(x.toast.description),1)],64))],2)):Be("v-if",!0)],2),x.toast.cancel?(C(),ie("button",{key:1,style:Pt(x.toast.cancelButtonStyle||x.cancelButtonStyle),class:qe(f(Go)((mt=x.classes)==null?void 0:mt.cancelButton,($t=x.toast.classes)==null?void 0:$t.cancelButton)),"data-button":"","data-cancel":"",onClick:z[0]||(z[0]=Lt=>{var Qn,Yn;f(Wa)(x.toast.cancel)&&_.value&&((Yn=(Qn=x.toast.cancel).onClick)==null||Yn.call(Qn,Lt),ee())})},Ne(f(Wa)(x.toast.cancel)?(Ft=x.toast.cancel)==null?void 0:Ft.label:x.toast.cancel),7)):Be("v-if",!0),x.toast.action?(C(),ie("button",{key:2,style:Pt(x.toast.actionButtonStyle||x.actionButtonStyle),class:qe(f(Go)((yn=x.classes)==null?void 0:yn.actionButton,(Cr=x.toast.classes)==null?void 0:Cr.actionButton)),"data-button":"","data-action":"",onClick:z[1]||(z[1]=Lt=>{var Qn,Yn;f(Wa)(x.toast.action)&&((Yn=(Qn=x.toast.action).onClick)==null||Yn.call(Qn,Lt),!Lt.defaultPrevented&&ee())})},Ne(f(Wa)(x.toast.action)?(Bt=x.toast.action)==null?void 0:Bt.label:x.toast.action),7)):Be("v-if",!0)],64))],46,VR)}}}),zR=HR,Oa=(e,t)=>{const n=e.__vccOpts||e;for(const[o,r]of t)n[o]=r;return n};const KR={},WR={xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stoke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"};function GR(e,t){return C(),ie("svg",WR,t[0]||(t[0]=[ce("line",{x1:"18",y1:"6",x2:"6",y2:"18"},null,-1),ce("line",{x1:"6",y1:"6",x2:"18",y2:"18"},null,-1)]))}var QR=Oa(KR,[["render",GR]]);const YR=["data-visible"],XR={class:"sonner-spinner"};var JR=F({__name:"Loader",props:{visible:{type:Boolean}},setup(e){const t=Array(12).fill(0);return(n,o)=>(C(),ie("div",{class:"sonner-loading-wrapper","data-visible":n.visible},[ce("div",XR,[(C(!0),ie(Ie,null,wt(f(t),r=>(C(),ie("div",{key:`spinner-bar-${r}`,class:"sonner-loading-bar"}))),128))])],8,YR))}}),ZR=JR;const eB={},tB={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"};function nB(e,t){return C(),ie("svg",tB,t[0]||(t[0]=[ce("path",{"fill-rule":"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z","clip-rule":"evenodd"},null,-1)]))}var oB=Oa(eB,[["render",nB]]);const rB={},sB={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"};function iB(e,t){return C(),ie("svg",sB,t[0]||(t[0]=[ce("path",{"fill-rule":"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z","clip-rule":"evenodd"},null,-1)]))}var aB=Oa(rB,[["render",iB]]);const lB={},uB={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"};function cB(e,t){return C(),ie("svg",uB,t[0]||(t[0]=[ce("path",{"fill-rule":"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z","clip-rule":"evenodd"},null,-1)]))}var dB=Oa(lB,[["render",cB]]);const fB={},pB={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"};function hB(e,t){return C(),ie("svg",pB,t[0]||(t[0]=[ce("path",{"fill-rule":"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z","clip-rule":"evenodd"},null,-1)]))}var mB=Oa(fB,[["render",hB]]);const gB=["aria-label"],vB=["data-sonner-theme","dir","data-theme","data-rich-colors","data-y-position","data-x-position","data-lifted"],yB=typeof window<"u"&&typeof document<"u";function bB(){if(typeof window>"u"||typeof document>"u")return"ltr";const e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}var _B=F({name:"Toaster",inheritAttrs:!1,__name:"Toaster",props:{invert:{type:Boolean,default:!1},theme:{default:"light"},position:{default:"bottom-right"},hotkey:{default:()=>["altKey","KeyT"]},richColors:{type:Boolean,default:!1},expand:{type:Boolean,default:!1},duration:{},gap:{default:$R},visibleToasts:{default:MR},closeButton:{type:Boolean,default:!1},toastOptions:{default:()=>({})},class:{default:""},style:{},offset:{default:c_},mobileOffset:{default:d_},dir:{default:"auto"},swipeDirections:{},icons:{},containerAriaLabel:{default:"Notifications"}},setup(e){const t=e,n=g0(),o=N([]);function r(w,k){return o.value.filter($=>!$.position&&k===0||$.position===w)}const s=U(()=>{const w=o.value.filter(k=>k.position).map(k=>k.position);return w.length>0?Array.from(new Set([t.position].concat(w))):[t.position]}),i=U(()=>{const w={};return s.value.forEach(k=>{w[k]=o.value.filter($=>$.position===k)}),w}),a=N([]),l=N(!1),u=N(!1),c=N(t.theme!=="system"?t.theme:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),d=N(null),p=N(null),h=N(!1),m=t.hotkey.join("+").replace(/Key/g,"").replace(/Digit/g,"");function g(w){var k;(k=o.value.find($=>$.id===w.id))!=null&&k.delete||hn.dismiss(w.id),o.value=o.value.filter(({id:$})=>$!==w.id),setTimeout(()=>{o.value.find($=>$.id===w.id)||(a.value=a.value.filter($=>$.toastId!==w.id))},f_+50)}function v(w){var k,$;h.value&&!(($=(k=w.currentTarget)==null?void 0:k.contains)!=null&&$.call(k,w.relatedTarget))&&(h.value=!1,p.value&&(p.value.focus({preventScroll:!0}),p.value=null))}function y(w){w.target instanceof HTMLElement&&w.target.dataset.dismissible==="false"||h.value||(h.value=!0,p.value=w.relatedTarget)}function b(w){w.target&&w.target instanceof HTMLElement&&w.target.dataset.dismissible==="false"||(u.value=!0)}ut(w=>{const k=hn.subscribe($=>{if($.dismiss){requestAnimationFrame(()=>{o.value=o.value.map(R=>R.id===$.id?{...R,delete:!0}:R)});return}We(()=>{const R=o.value.findIndex(G=>G.id===$.id);R!==-1?o.value=[...o.value.slice(0,R),{...o.value[R],...$},...o.value.slice(R+1)]:o.value=[$,...o.value]})});w(k)}),ut(w=>{if(typeof window>"u")return;if(t.theme!=="system"){c.value=t.theme;return}const k=window.matchMedia("(prefers-color-scheme: dark)"),$=G=>{c.value=G?"dark":"light"};$(k.matches);const R=G=>{$(G.matches)};try{k.addEventListener("change",R)}catch{k.addListener(R)}w(()=>{try{k.removeEventListener("change",R)}catch{k.removeListener(R)}})}),ut(()=>{d.value&&p.value&&(p.value.focus({preventScroll:!0}),p.value=null,h.value=!1)}),ut(()=>{o.value.length<=1&&(l.value=!1)}),ut(w=>{function k($){const R=t.hotkey.every(ne=>$[ne]||$.code===ne),G=Array.isArray(d.value)?d.value[0]:d.value;R&&(l.value=!0,G==null||G.focus());const J=document.activeElement===d.value||(G==null?void 0:G.contains(document.activeElement));$.code==="Escape"&&J&&(l.value=!1)}yB&&(document.addEventListener("keydown",k),w(()=>{document.removeEventListener("keydown",k)}))});function _(){l.value=!0}function O(){u.value||(l.value=!1)}function T(){l.value=!1}function A(){u.value=!1}function D(w){a.value=w}function P(w){const k=a.value.findIndex($=>$.toastId===w.toastId);if(k!==-1)a.value[k]=w;else{const $=a.value.findIndex(R=>R.position===w.position);$!==-1?a.value.splice($,0,w):a.value.unshift(w)}}return(w,k)=>(C(),ie(Ie,null,[Be(" Remove item from normal navigation flow, only available via hotkey "),ce("section",{"aria-label":`${w.containerAriaLabel} ${f(m)}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false"},[(C(!0),ie(Ie,null,wt(s.value,($,R)=>{var G;return C(),ie("ol",te({key:$,ref_for:!0,ref_key:"listRef",ref:d,"data-sonner-toaster":"","data-sonner-theme":c.value,class:t.class,dir:w.dir==="auto"?bB():w.dir,tabIndex:-1,"data-theme":w.theme,"data-rich-colors":w.richColors,"data-y-position":$.split("-")[0],"data-x-position":$.split("-")[1],"data-lifted":l.value&&o.value.length>1&&!w.expand,style:{"--front-toast-height":`${((G=a.value[0])==null?void 0:G.height)||0}px`,"--width":`${f(qR)}px`,"--gap":`${w.gap}px`,...w.style,...f(n).style,...f(jR)(w.offset,w.mobileOffset)}},w.$attrs,{onBlur:v,onFocus:y,onMouseenter:_,onMousemove:_,onMouseleave:O,onDragend:T,onPointerdown:b,onPointerup:A}),[(C(!0),ie(Ie,null,wt(r($,R),(J,ne)=>{var ae,re,L,oe,Y,ee,le,ye,me,Pe;return C(),B(zR,{key:J.id,heights:a.value,icons:w.icons,index:ne,toast:J,defaultRichColors:w.richColors,duration:((ae=w.toastOptions)==null?void 0:ae.duration)??w.duration,class:qe(((re=w.toastOptions)==null?void 0:re.class)??""),descriptionClass:(L=w.toastOptions)==null?void 0:L.descriptionClass,invert:w.invert,visibleToasts:w.visibleToasts,closeButton:((oe=w.toastOptions)==null?void 0:oe.closeButton)??w.closeButton,interacting:u.value,position:$,style:Pt((Y=w.toastOptions)==null?void 0:Y.style),unstyled:(ee=w.toastOptions)==null?void 0:ee.unstyled,classes:(le=w.toastOptions)==null?void 0:le.classes,cancelButtonStyle:(ye=w.toastOptions)==null?void 0:ye.cancelButtonStyle,actionButtonStyle:(me=w.toastOptions)==null?void 0:me.actionButtonStyle,"close-button-aria-label":(Pe=w.toastOptions)==null?void 0:Pe.closeButtonAriaLabel,toasts:i.value[$],expandByDefault:w.expand,gap:w.gap,expanded:l.value,swipeDirections:t.swipeDirections,"onUpdate:heights":D,"onUpdate:height":P,onRemoveToast:g},{"close-icon":E(()=>[V(w.$slots,"close-icon",{},()=>[q(QR)])]),"loading-icon":E(()=>[V(w.$slots,"loading-icon",{},()=>[q(ZR,{visible:J.type==="loading"},null,8,["visible"])])]),"success-icon":E(()=>[V(w.$slots,"success-icon",{},()=>[q(oB)])]),"error-icon":E(()=>[V(w.$slots,"error-icon",{},()=>[q(mB)])]),"warning-icon":E(()=>[V(w.$slots,"warning-icon",{},()=>[q(dB)])]),"info-icon":E(()=>[V(w.$slots,"info-icon",{},()=>[q(aB)])]),_:2},1032,["heights","icons","index","toast","defaultRichColors","duration","class","descriptionClass","invert","visibleToasts","closeButton","interacting","position","style","unstyled","classes","cancelButtonStyle","actionButtonStyle","close-button-aria-label","toasts","expandByDefault","gap","expanded","swipeDirections"])}),128))],16,vB)}),128))],8,gB)],2112))}}),wB=_B;const ko=xt.create({baseURL:"https://api.beenglish.eu.org/DesignScreenshot/admin-api",timeout:12e4,headers:{"Content-Type":"application/json"}});let bc=!1;const _c=[],SB=async()=>{try{const e=localStorage.getItem("refreshToken");if(!e)throw new Error("No refresh token found");const t=await xt.post(`/system/auth/refresh-token?refreshToken=${e}`),{token:n,refreshToken:o}=t.data;return localStorage.setItem("accessToken",n),localStorage.setItem("refreshToken",o),n}catch(e){return localStorage.removeItem("accessToken"),localStorage.removeItem("refreshToken"),window.location.href="/auth",Promise.reject(e)}};ko.interceptors.request.use(e=>{const t=localStorage.getItem("accessToken");return t&&e.headers&&(e.headers.Authorization=`Bearer ${t}`),e},e=>Promise.reject(e));ko.interceptors.response.use(async e=>{const{data:t,status:n}=e;if(n!==200)return Bi.error(t.msg||"请求失败"),Promise.reject(new Error(t.msg||"请求失败"));if(t.code===401){const o=e.config;if(!o._retry){if(bc)return new Promise(r=>{_c.push(s=>{o.headers&&(o.headers.Authorization=`Bearer ${s}`),r(ko(o))})});o._retry=!0,bc=!0;try{const r=await SB();return o.headers&&(o.headers.Authorization=`Bearer ${r}`),_c.forEach(s=>s(r)),_c.length=0,ko(o)}catch(r){return Promise.reject(r)}finally{bc=!1}}}return t.code===0?t.data:(Bi.error(t.msg||"请求失败"),Promise.reject(new Error(t.msg||"请求失败")))},e=>{const t=e.message||"网络错误";return Bi.error(t),Promise.reject(e)});const wr=(e,t)=>ko.get(e,{params:t}),Sr=(e,t,n)=>ko.post(e,t,n),p_=(e,t)=>ko.put(e,t),h_=(e,t)=>ko.delete(e,{params:t}),GL=(e,t)=>ko.post(e,t,{headers:{"Content-Type":"multipart/form-data"}}),CB=e=>wr("/admin/app/page",e),xB=e=>wr("/admin/app/get-app-details",{appId:e}),EB=e=>wr("/admin/app/list",e),QL=e=>Sr("/admin/app/create",e),YL=e=>p_("/admin/app/update",e),XL=e=>h_("/admin/app/delete",e),ep=Symbol("platform"),m_=bf("app",()=>{const e=N([]);return{apps:e,fetchApps:async n=>{const o=await EB({platform:n});e.value=o}}});/*!
DesignScreenshot/output/100.64.0.2_run/100.64.0.2_8083_3_credentials_filled.html:104:  */const ms=typeof document<"u";function g_(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function AB(e){return e.__esModule||e[Symbol.toStringTag]==="Module"||e.default&&g_(e.default)}const st=Object.assign;function wc(e,t){const n={};for(const o in t){const r=t[o];n[o]=Kn(r)?r.map(e):e(r)}return n}const Mi=()=>{},Kn=Array.isArray,v_=/#/g,OB=/&/g,TB=/\//g,PB=/=/g,kB=/\?/g,y_=/\+/g,IB=/%5B/g,DB=/%5D/g,b_=/%5E/g,RB=/%60/g,__=/%7B/g,BB=/%7C/g,w_=/%7D/g,MB=/%20/g;function tp(e){return encodeURI(""+e).replace(BB,"|").replace(IB,"[").replace(DB,"]")}function qB(e){return tp(e).replace(__,"{").replace(w_,"}").replace(b_,"^")}function zd(e){return tp(e).replace(y_,"%2B").replace(MB,"+").replace(v_,"%23").replace(OB,"%26").replace(RB,"`").replace(__,"{").replace(w_,"}").replace(b_,"^")}function $B(e){return zd(e).replace(PB,"%3D")}function FB(e){return tp(e).replace(v_,"%23").replace(kB,"%3F")}function LB(e){return e==null?"":FB(e).replace(TB,"%2F")}function ra(e){try{return decodeURIComponent(""+e)}catch{}return""+e}const NB=/\/$/,jB=e=>e.replace(NB,"");function Sc(e,t,n="/"){let o,r={},s="",i="";const a=t.indexOf("#");let l=t.indexOf("?");return a<l&&a>=0&&(l=-1),l>-1&&(o=t.slice(0,l),s=t.slice(l+1,a>-1?a:t.length),r=e(s)),a>-1&&(o=o||t.slice(0,a),i=t.slice(a,t.length)),o=zB(o??t,n),{fullPath:o+(s&&"?")+s+i,path:o,query:r,hash:ra(i)}}function VB(e,t){const n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}function ym(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function UB(e,t,n){const o=t.matched.length-1,r=n.matched.length-1;return o>-1&&o===r&&Hs(t.matched[o],n.matched[r])&&S_(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function Hs(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function S_(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(!HB(e[n],t[n]))return!1;return!0}function HB(e,t){return Kn(e)?bm(e,t):Kn(t)?bm(t,e):e===t}function bm(e,t){return Kn(t)?e.length===t.length&&e.every((n,o)=>n===t[o]):e.length===1&&e[0]===t}function zB(e,t){if(e.startsWith("/"))return e;if(!e)return t;const n=t.split("/"),o=e.split("/"),r=o[o.length-1];(r===".."||r===".")&&o.push("");let s=n.length-1,i,a;for(i=0;i<o.length;i++)if(a=o[i],a!==".")if(a==="..")s>1&&s--;else break;return n.slice(0,s).join("/")+"/"+o.slice(i).join("/")}const Qo={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0};var sa;(function(e){e.pop="pop",e.push="push"})(sa||(sa={}));var qi;(function(e){e.back="back",e.forward="forward",e.unknown=""})(qi||(qi={}));function KB(e){if(!e)if(ms){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),jB(e)}const WB=/^[^#]+#/;function GB(e,t){return e.replace(WB,"#")+t}function QB(e,t){const n=document.documentElement.getBoundingClientRect(),o=e.getBoundingClientRect();return{behavior:t.behavior,left:o.left-n.left-(t.left||0),top:o.top-n.top-(t.top||0)}}const Mu=()=>({left:window.scrollX,top:window.scrollY});function YB(e){let t;if("el"in e){const n=e.el,o=typeof n=="string"&&n.startsWith("#"),r=typeof n=="string"?o?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!r)return;t=QB(r,e)}else t=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left!=null?t.left:window.scrollX,t.top!=null?t.top:window.scrollY)}function _m(e,t){return(history.state?history.state.position-t:-1)+e}const Kd=new Map;function XB(e,t){Kd.set(e,t)}function JB(e){const t=Kd.get(e);return Kd.delete(e),t}let ZB=()=>location.protocol+"//"+location.host;function C_(e,t){const{pathname:n,search:o,hash:r}=t,s=e.indexOf("#");if(s>-1){let a=r.includes(e.slice(s))?e.slice(s).length:1,l=r.slice(a);return l[0]!=="/"&&(l="/"+l),ym(l,"")}return ym(n,e)+o+r}function eM(e,t,n,o){let r=[],s=[],i=null;const a=({state:p})=>{const h=C_(e,location),m=n.value,g=t.value;let v=0;if(p){if(n.value=h,t.value=p,i&&i===m){i=null;return}v=g?p.position-g.position:0}else o(h);r.forEach(y=>{y(n.value,m,{delta:v,type:sa.pop,direction:v?v>0?qi.forward:qi.back:qi.unknown})})};function l(){i=n.value}function u(p){r.push(p);const h=()=>{const m=r.indexOf(p);m>-1&&r.splice(m,1)};return s.push(h),h}function c(){const{history:p}=window;p.state&&p.replaceState(st({},p.state,{scroll:Mu()}),"")}function d(){for(const p of s)p();s=[],window.removeEventListener("popstate",a),window.removeEventListener("beforeunload",c)}return window.addEventListener("popstate",a),window.addEventListener("beforeunload",c,{passive:!0}),{pauseListeners:l,listen:u,destroy:d}}function wm(e,t,n,o=!1,r=!1){return{back:e,current:t,forward:n,replaced:o,position:window.history.length,scroll:r?Mu():null}}function tM(e){const{history:t,location:n}=window,o={value:C_(e,n)},r={value:t.state};r.value||s(o.value,{back:null,current:o.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function s(l,u,c){const d=e.indexOf("#"),p=d>-1?(n.host&&document.querySelector("base")?e:e.slice(d))+l:ZB()+e+l;try{t[c?"replaceState":"pushState"](u,"",p),r.value=u}catch(h){console.error(h),n[c?"replace":"assign"](p)}}function i(l,u){const c=st({},t.state,wm(r.value.back,l,r.value.forward,!0),u,{position:r.value.position});s(l,c,!0),o.value=l}function a(l,u){const c=st({},r.value,t.state,{forward:l,scroll:Mu()});s(c.current,c,!0);const d=st({},wm(o.value,l,null),{position:c.position+1},u);s(l,d,!1),o.value=l}return{location:o,state:r,push:a,replace:i}}function nM(e){e=KB(e);const t=tM(e),n=eM(e,t.state,t.location,t.replace);function o(s,i=!0){i||n.pauseListeners(),history.go(s)}const r=st({location:"",base:e,go:o,createHref:GB.bind(null,e)},t,n);return Object.defineProperty(r,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(r,"state",{enumerable:!0,get:()=>t.state.value}),r}function oM(e){return typeof e=="string"||e&&typeof e=="object"}function x_(e){return typeof e=="string"||typeof e=="symbol"}const E_=Symbol("");var Sm;(function(e){e[e.aborted=4]="aborted",e[e.cancelled=8]="cancelled",e[e.duplicated=16]="duplicated"})(Sm||(Sm={}));function zs(e,t){return st(new Error,{type:e,[E_]:!0},t)}function So(e,t){return e instanceof Error&&E_ in e&&(t==null||!!(e.type&t))}const Cm="[^/]+?",rM={sensitive:!1,strict:!1,start:!0,end:!0},sM=/[.+*?^${}()[\]/\\]/g;function iM(e,t){const n=st({},rM,t),o=[];let r=n.start?"^":"";const s=[];for(const u of e){const c=u.length?[]:[90];n.strict&&!u.length&&(r+="/");for(let d=0;d<u.length;d++){const p=u[d];let h=40+(n.sensitive?.25:0);if(p.type===0)d||(r+="/"),r+=p.value.replace(sM,"\\$&"),h+=40;else if(p.type===1){const{value:m,repeatable:g,optional:v,regexp:y}=p;s.push({name:m,repeatable:g,optional:v});const b=y||Cm;if(b!==Cm){h+=10;try{new RegExp(`(${b})`)}catch(O){throw new Error(`Invalid custom RegExp for param "${m}" (${b}): `+O.message)}}let _=g?`((?:${b})(?:/(?:${b}))*)`:`(${b})`;d||(_=v&&u.length<2?`(?:/${_})`:"/"+_),v&&(_+="?"),r+=_,h+=20,v&&(h+=-8),g&&(h+=-20),b===".*"&&(h+=-50)}c.push(h)}o.push(c)}if(n.strict&&n.end){const u=o.length-1;o[u][o[u].length-1]+=.7000000000000001}n.strict||(r+="/?"),n.end?r+="$":n.strict&&!r.endsWith("/")&&(r+="(?:/|$)");const i=new RegExp(r,n.sensitive?"":"i");function a(u){const c=u.match(i),d={};if(!c)return null;for(let p=1;p<c.length;p++){const h=c[p]||"",m=s[p-1];d[m.name]=h&&m.repeatable?h.split("/"):h}return d}function l(u){let c="",d=!1;for(const p of e){(!d||!c.endsWith("/"))&&(c+="/"),d=!1;for(const h of p)if(h.type===0)c+=h.value;else if(h.type===1){const{value:m,repeatable:g,optional:v}=h,y=m in u?u[m]:"";if(Kn(y)&&!g)throw new Error(`Provided param "${m}" is an array but it is not repeatable (* or + modifiers)`);const b=Kn(y)?y.join("/"):y;if(!b)if(v)p.length<2&&(c.endsWith("/")?c=c.slice(0,-1):d=!0);else throw new Error(`Missing required param "${m}"`);c+=b}}return c||"/"}return{re:i,score:o,keys:s,parse:a,stringify:l}}function aM(e,t){let n=0;for(;n<e.length&&n<t.length;){const o=t[n]-e[n];if(o)return o;n++}return e.length<t.length?e.length===1&&e[0]===80?-1:1:e.length>t.length?t.length===1&&t[0]===80?1:-1:0}function A_(e,t){let n=0;const o=e.score,r=t.score;for(;n<o.length&&n<r.length;){const s=aM(o[n],r[n]);if(s)return s;n++}if(Math.abs(r.length-o.length)===1){if(xm(o))return 1;if(xm(r))return-1}return r.length-o.length}function xm(e){const t=e[e.length-1];return e.length>0&&t[t.length-1]<0}const lM={type:0,value:""},uM=/[a-zA-Z0-9_]/;function cM(e){if(!e)return[[]];if(e==="/")return[[lM]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(h){throw new Error(`ERR (${n})/"${u}": ${h}`)}let n=0,o=n;const r=[];let s;function i(){s&&r.push(s),s=[]}let a=0,l,u="",c="";function d(){u&&(n===0?s.push({type:0,value:u}):n===1||n===2||n===3?(s.length>1&&(l==="*"||l==="+")&&t(`A repeatable param (${u}) must be alone in its segment. eg: '/:ids+.`),s.push({type:1,value:u,regexp:c,repeatable:l==="*"||l==="+",optional:l==="*"||l==="?"})):t("Invalid state to consume buffer"),u="")}function p(){u+=l}for(;a<e.length;){if(l=e[a++],l==="\\"&&n!==2){o=n,n=4;continue}switch(n){case 0:l==="/"?(u&&d(),i()):l===":"?(d(),n=1):p();break;case 4:p(),n=o;break;case 1:l==="("?n=2:uM.test(l)?p():(d(),n=0,l!=="*"&&l!=="?"&&l!=="+"&&a--);break;case 2:l===")"?c[c.length-1]=="\\"?c=c.slice(0,-1)+l:n=3:c+=l;break;case 3:d(),n=0,l!=="*"&&l!=="?"&&l!=="+"&&a--,c="";break;default:t("Unknown state");break}}return n===2&&t(`Unfinished custom RegExp for param "${u}"`),d(),i(),r}function dM(e,t,n){const o=iM(cM(e.path),n),r=st(o,{record:e,parent:t,children:[],alias:[]});return t&&!r.record.aliasOf==!t.record.aliasOf&&t.children.push(r),r}function fM(e,t){const n=[],o=new Map;t=Tm({strict:!1,end:!0,sensitive:!1},t);function r(d){return o.get(d)}function s(d,p,h){const m=!h,g=Am(d);g.aliasOf=h&&h.record;const v=Tm(t,d),y=[g];if("alias"in d){const O=typeof d.alias=="string"?[d.alias]:d.alias;for(const T of O)y.push(Am(st({},g,{components:h?h.record.components:g.components,path:T,aliasOf:h?h.record:g})))}let b,_;for(const O of y){const{path:T}=O;if(p&&T[0]!=="/"){const A=p.record.path,D=A[A.length-1]==="/"?"":"/";O.path=p.record.path+(T&&D+T)}if(b=dM(O,p,v),h?h.alias.push(b):(_=_||b,_!==b&&_.alias.push(b),m&&d.name&&!Om(b)&&i(d.name)),O_(b)&&l(b),g.children){const A=g.children;for(let D=0;D<A.length;D++)s(A[D],b,h&&h.children[D])}h=h||b}return _?()=>{i(_)}:Mi}function i(d){if(x_(d)){const p=o.get(d);p&&(o.delete(d),n.splice(n.indexOf(p),1),p.children.forEach(i),p.alias.forEach(i))}else{const p=n.indexOf(d);p>-1&&(n.splice(p,1),d.record.name&&o.delete(d.record.name),d.children.forEach(i),d.alias.forEach(i))}}function a(){return n}function l(d){const p=mM(d,n);n.splice(p,0,d),d.record.name&&!Om(d)&&o.set(d.record.name,d)}function u(d,p){let h,m={},g,v;if("name"in d&&d.name){if(h=o.get(d.name),!h)throw zs(1,{location:d});v=h.record.name,m=st(Em(p.params,h.keys.filter(_=>!_.optional).concat(h.parent?h.parent.keys.filter(_=>_.optional):[]).map(_=>_.name)),d.params&&Em(d.params,h.keys.map(_=>_.name))),g=h.stringify(m)}else if(d.path!=null)g=d.path,h=n.find(_=>_.re.test(g)),h&&(m=h.parse(g),v=h.record.name);else{if(h=p.name?o.get(p.name):n.find(_=>_.re.test(p.path)),!h)throw zs(1,{location:d,currentLocation:p});v=h.record.name,m=st({},p.params,d.params),g=h.stringify(m)}const y=[];let b=h;for(;b;)y.unshift(b.record),b=b.parent;return{name:v,path:g,params:m,matched:y,meta:hM(y)}}e.forEach(d=>s(d));function c(){n.length=0,o.clear()}return{addRoute:s,resolve:u,removeRoute:i,clearRoutes:c,getRoutes:a,getRecordMatcher:r}}function Em(e,t){const n={};for(const o of t)o in e&&(n[o]=e[o]);return n}function Am(e){const t={path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:e.aliasOf,beforeEnter:e.beforeEnter,props:pM(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in e?e.components||null:e.component&&{default:e.component}};return Object.defineProperty(t,"mods",{value:{}}),t}function pM(e){const t={},n=e.props||!1;if("component"in e)t.default=n;else for(const o in e.components)t[o]=typeof n=="object"?n[o]:n;return t}function Om(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function hM(e){return e.reduce((t,n)=>st(t,n.meta),{})}function Tm(e,t){const n={};for(const o in e)n[o]=o in t?t[o]:e[o];return n}function mM(e,t){let n=0,o=t.length;for(;n!==o;){const s=n+o>>1;A_(e,t[s])<0?o=s:n=s+1}const r=gM(e);return r&&(o=t.lastIndexOf(r,o-1)),o}function gM(e){let t=e;for(;t=t.parent;)if(O_(t)&&A_(e,t)===0)return t}function O_({record:e}){return!!(e.name||e.components&&Object.keys(e.components).length||e.redirect)}function vM(e){const t={};if(e===""||e==="?")return t;const o=(e[0]==="?"?e.slice(1):e).split("&");for(let r=0;r<o.length;++r){const s=o[r].replace(y_," "),i=s.indexOf("="),a=ra(i<0?s:s.slice(0,i)),l=i<0?null:ra(s.slice(i+1));if(a in t){let u=t[a];Kn(u)||(u=t[a]=[u]),u.push(l)}else t[a]=l}return t}function Pm(e){let t="";for(let n in e){const o=e[n];if(n=$B(n),o==null){o!==void 0&&(t+=(t.length?"&":"")+n);continue}(Kn(o)?o.map(s=>s&&zd(s)):[o&&zd(o)]).forEach(s=>{s!==void 0&&(t+=(t.length?"&":"")+n,s!=null&&(t+="="+s))})}return t}function yM(e){const t={};for(const n in e){const o=e[n];o!==void 0&&(t[n]=Kn(o)?o.map(r=>r==null?null:""+r):o==null?o:""+o)}return t}const bM=Symbol(""),km=Symbol(""),qu=Symbol(""),np=Symbol(""),Wd=Symbol("");function hi(){let e=[];function t(o){return e.push(o),()=>{const r=e.indexOf(o);r>-1&&e.splice(r,1)}}function n(){e=[]}return{add:t,list:()=>e.slice(),reset:n}}function or(e,t,n,o,r,s=i=>i()){const i=o&&(o.enterCallbacks[r]=o.enterCallbacks[r]||[]);return()=>new Promise((a,l)=>{const u=p=>{p===!1?l(zs(4,{from:n,to:t})):p instanceof Error?l(p):oM(p)?l(zs(2,{from:t,to:p})):(i&&o.enterCallbacks[r]===i&&typeof p=="function"&&i.push(p),a())},c=s(()=>e.call(o&&o.instances[r],t,n,u));let d=Promise.resolve(c);e.length<3&&(d=d.then(u)),d.catch(p=>l(p))})}function Cc(e,t,n,o,r=s=>s()){const s=[];for(const i of e)for(const a in i.components){let l=i.components[a];if(!(t!=="beforeRouteEnter"&&!i.instances[a]))if(g_(l)){const c=(l.__vccOpts||l)[t];c&&s.push(or(c,n,o,i,a,r))}else{let u=l();s.push(()=>u.then(c=>{if(!c)throw new Error(`Couldn't resolve component "${a}" at "${i.path}"`);const d=AB(c)?c.default:c;i.mods[a]=c,i.components[a]=d;const h=(d.__vccOpts||d)[t];return h&&or(h,n,o,i,a,r)()}))}}return s}function Im(e){const t=kt(qu),n=kt(np),o=U(()=>{const l=f(e.to);return t.resolve(l)}),r=U(()=>{const{matched:l}=o.value,{length:u}=l,c=l[u-1],d=n.matched;if(!c||!d.length)return-1;const p=d.findIndex(Hs.bind(null,c));if(p>-1)return p;const h=Dm(l[u-2]);return u>1&&Dm(c)===h&&d[d.length-1].path!==h?d.findIndex(Hs.bind(null,l[u-2])):p}),s=U(()=>r.value>-1&&xM(n.params,o.value.params)),i=U(()=>r.value>-1&&r.value===n.matched.length-1&&S_(n.params,o.value.params));function a(l={}){if(CM(l)){const u=t[f(e.replace)?"replace":"push"](f(e.to)).catch(Mi);return e.viewTransition&&typeof document<"u"&&"startViewTransition"in document&&document.startViewTransition(()=>u),u}return Promise.resolve()}return{route:o,href:U(()=>o.value.href),isActive:s,isExactActive:i,navigate:a}}function _M(e){return e.length===1?e[0]:e}const wM=F({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"},viewTransition:Boolean},useLink:Im,setup(e,{slots:t}){const n=Ht(Im(e)),{options:o}=kt(qu),r=U(()=>({[Rm(e.activeClass,o.linkActiveClass,"router-link-active")]:n.isActive,[Rm(e.exactActiveClass,o.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const s=t.default&&_M(t.default(n));return e.custom?s:un("a",{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:r.value},s)}}}),SM=wM;function CM(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget&&e.currentTarget.getAttribute){const t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function xM(e,t){for(const n in t){const o=t[n],r=e[n];if(typeof o=="string"){if(o!==r)return!1}else if(!Kn(r)||r.length!==o.length||o.some((s,i)=>s!==r[i]))return!1}return!0}function Dm(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const Rm=(e,t,n)=>e??t??n,EM=F({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){const o=kt(Wd),r=U(()=>e.route||o.value),s=kt(km,0),i=U(()=>{let u=f(s);const{matched:c}=r.value;let d;for(;(d=c[u])&&!d.components;)u++;return u}),a=U(()=>r.value.matched[i.value]);Nn(km,U(()=>i.value+1)),Nn(bM,a),Nn(Wd,r);const l=N();return Ce(()=>[l.value,a.value,e.name],([u,c,d],[p,h,m])=>{c&&(c.instances[d]=u,h&&h!==c&&u&&u===p&&(c.leaveGuards.size||(c.leaveGuards=h.leaveGuards),c.updateGuards.size||(c.updateGuards=h.updateGuards))),u&&c&&(!h||!Hs(c,h)||!p)&&(c.enterCallbacks[d]||[]).forEach(g=>g(u))},{flush:"post"}),()=>{const u=r.value,c=e.name,d=a.value,p=d&&d.components[c];if(!p)return Bm(n.default,{Component:p,route:u});const h=d.props[c],m=h?h===!0?u.params:typeof h=="function"?h(u):h:null,v=un(p,st({},m,t,{onVnodeUnmounted:y=>{y.component.isUnmounted&&(d.instances[c]=null)},ref:l}));return Bm(n.default,{Component:v,route:u})||v}}});function Bm(e,t){if(!e)return null;const n=e(t);return n.length===1?n[0]:n}const AM=EM;function OM(e){const t=fM(e.routes,e),n=e.parseQuery||vM,o=e.stringifyQuery||Pm,r=e.history,s=hi(),i=hi(),a=hi(),l=Cn(Qo);let u=Qo;ms&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const c=wc.bind(null,x=>""+x),d=wc.bind(null,LB),p=wc.bind(null,ra);function h(x,z){let H,X;return x_(x)?(H=t.getRecordMatcher(x),X=z):X=x,t.addRoute(X,H)}function m(x){const z=t.getRecordMatcher(x);z&&t.removeRoute(z)}function g(){return t.getRoutes().map(x=>x.record)}function v(x){return!!t.getRecordMatcher(x)}function y(x,z){if(z=st({},z||l.value),typeof x=="string"){const j=Sc(n,x,z.path),K=t.resolve({path:j.path},z),Z=r.createHref(j.fullPath);return st(j,K,{params:p(K.params),hash:ra(j.hash),redirectedFrom:void 0,href:Z})}let H;if(x.path!=null)H=st({},x,{path:Sc(n,x.path,z.path).path});else{const j=st({},x.params);for(const K in j)j[K]==null&&delete j[K];H=st({},x,{params:d(j)}),z.params=d(z.params)}const X=t.resolve(H,z),pe=x.hash||"";X.params=c(p(X.params));const S=VB(o,st({},x,{hash:qB(pe),path:X.path})),I=r.createHref(S);return st({fullPath:S,hash:pe,query:o===Pm?yM(x.query):x.query||{}},X,{redirectedFrom:void 0,href:I})}function b(x){return typeof x=="string"?Sc(n,x,l.value.path):st({},x)}function _(x,z){if(u!==x)return zs(8,{from:z,to:x})}function O(x){return D(x)}function T(x){return O(st(b(x),{replace:!0}))}function A(x){const z=x.matched[x.matched.length-1];if(z&&z.redirect){const{redirect:H}=z;let X=typeof H=="function"?H(x):H;return typeof X=="string"&&(X=X.includes("?")||X.includes("#")?X=b(X):{path:X},X.params={}),st({query:x.query,hash:x.hash,params:X.path!=null?{}:x.params},X)}}function D(x,z){const H=u=y(x),X=l.value,pe=x.state,S=x.force,I=x.replace===!0,j=A(H);if(j)return D(st(b(j),{state:typeof j=="object"?st({},pe,j.state):pe,force:S,replace:I}),z||H);const K=H;K.redirectedFrom=z;let Z;return!S&&UB(o,X,H)&&(Z=zs(16,{to:K,from:X}),ee(X,X,!0,!1)),(Z?Promise.resolve(Z):k(K,X)).catch(Q=>So(Q)?So(Q,2)?Q:Y(Q):L(Q,K,X)).then(Q=>{if(Q){if(So(Q,2))return D(st({replace:I},b(Q.to),{state:typeof Q.to=="object"?st({},pe,Q.to.state):pe,force:S}),z||K)}else Q=R(K,X,!0,I,pe);return $(K,X,Q),Q})}function P(x,z){const H=_(x,z);return H?Promise.reject(H):Promise.resolve()}function w(x){const z=me.values().next().value;return z&&typeof z.runWithContext=="function"?z.runWithContext(x):x()}function k(x,z){let H;const[X,pe,S]=TM(x,z);H=Cc(X.reverse(),"beforeRouteLeave",x,z);for(const j of X)j.leaveGuards.forEach(K=>{H.push(or(K,x,z))});const I=P.bind(null,x,z);return H.push(I),Se(H).then(()=>{H=[];for(const j of s.list())H.push(or(j,x,z));return H.push(I),Se(H)}).then(()=>{H=Cc(pe,"beforeRouteUpdate",x,z);for(const j of pe)j.updateGuards.forEach(K=>{H.push(or(K,x,z))});return H.push(I),Se(H)}).then(()=>{H=[];for(const j of S)if(j.beforeEnter)if(Kn(j.beforeEnter))for(const K of j.beforeEnter)H.push(or(K,x,z));else H.push(or(j.beforeEnter,x,z));return H.push(I),Se(H)}).then(()=>(x.matched.forEach(j=>j.enterCallbacks={}),H=Cc(S,"beforeRouteEnter",x,z,w),H.push(I),Se(H))).then(()=>{H=[];for(const j of i.list())H.push(or(j,x,z));return H.push(I),Se(H)}).catch(j=>So(j,8)?j:Promise.reject(j))}function $(x,z,H){a.list().forEach(X=>w(()=>X(x,z,H)))}function R(x,z,H,X,pe){const S=_(x,z);if(S)return S;const I=z===Qo,j=ms?history.state:{};H&&(X||I?r.replace(x.fullPath,st({scroll:I&&j&&j.scroll},pe)):r.push(x.fullPath,pe)),l.value=x,ee(x,z,H,I),Y()}let G;function J(){G||(G=r.listen((x,z,H)=>{if(!Pe.listening)return;const X=y(x),pe=A(X);if(pe){D(st(pe,{replace:!0,force:!0}),X).catch(Mi);return}u=X;const S=l.value;ms&&XB(_m(S.fullPath,H.delta),Mu()),k(X,S).catch(I=>So(I,12)?I:So(I,2)?(D(st(b(I.to),{force:!0}),X).then(j=>{So(j,20)&&!H.delta&&H.type===sa.pop&&r.go(-1,!1)}).catch(Mi),Promise.reject()):(H.delta&&r.go(-H.delta,!1),L(I,X,S))).then(I=>{I=I||R(X,S,!1),I&&(H.delta&&!So(I,8)?r.go(-H.delta,!1):H.type===sa.pop&&So(I,20)&&r.go(-1,!1)),$(X,S,I)}).catch(Mi)}))}let ne=hi(),ae=hi(),re;function L(x,z,H){Y(x);const X=ae.list();return X.length?X.forEach(pe=>pe(x,z,H)):console.error(x),Promise.reject(x)}function oe(){return re&&l.value!==Qo?Promise.resolve():new Promise((x,z)=>{ne.add([x,z])})}function Y(x){return re||(re=!x,J(),ne.list().forEach(([z,H])=>x?H(x):z()),ne.reset()),x}function ee(x,z,H,X){const{scrollBehavior:pe}=e;if(!ms||!pe)return Promise.resolve();const S=!H&&JB(_m(x.fullPath,0))||(X||!H)&&history.state&&history.state.scroll||null;return We().then(()=>pe(x,z,S)).then(I=>I&&YB(I)).catch(I=>L(I,x,z))}const le=x=>r.go(x);let ye;const me=new Set,Pe={currentRoute:l,listening:!0,addRoute:h,removeRoute:m,clearRoutes:t.clearRoutes,hasRoute:v,getRoutes:g,resolve:y,options:e,push:O,replace:T,go:le,back:()=>le(-1),forward:()=>le(1),beforeEach:s.add,beforeResolve:i.add,afterEach:a.add,onError:ae.add,isReady:oe,install(x){const z=this;x.component("RouterLink",SM),x.component("RouterView",AM),x.config.globalProperties.$router=z,Object.defineProperty(x.config.globalProperties,"$route",{enumerable:!0,get:()=>f(l)}),ms&&!ye&&l.value===Qo&&(ye=!0,O(r.location).catch(pe=>{}));const H={};for(const pe in Qo)Object.defineProperty(H,pe,{get:()=>l.value[pe],enumerable:!0});x.provide(qu,z),x.provide(np,Zl(H)),x.provide(Wd,l);const X=x.unmount;me.add(x),x.unmount=function(){me.delete(x),me.size<1&&(u=Qo,G&&G(),G=null,l.value=Qo,ye=!1,re=!1),X()}}};function Se(x){return x.reduce((z,H)=>z.then(()=>w(H)),Promise.resolve())}return Pe}function TM(e,t){const n=[],o=[],r=[],s=Math.max(t.matched.length,e.matched.length);for(let i=0;i<s;i++){const a=t.matched[i];a&&(e.matched.find(u=>Hs(u,a))?o.push(a):n.push(a));const l=e.matched[i];l&&(t.matched.find(u=>Hs(u,l))||r.push(l))}return[n,o,r]}function Ta(){return kt(qu)}function T_(e){return kt(np)}const PM={class:"w-full flex items-center justify-between"},kM={class:"text-gray-500"},IM=F({__name:"SearchDialog",props:{modelValue:{type:Boolean,default:!1},modelModifiers:{}},emits:["update:modelValue"],setup(e){const t=ts(e,"modelValue"),n=Ta(),o=N(""),r=kt(ep);U(()=>`在 ${(r==null?void 0:r.value)||"All Platforms"} 中搜索应用...`);const{apps:s}=va(m_()),i=U(()=>r!=null&&r.value?s.value.filter(l=>l.platform===r.value):[]),a=l=>{const{id:u,platform:c}=l;t.value=!1,n.push({path:"/details",query:{id:u,platform:c}})};return(l,u)=>{const c=JI,d=Yf,p=Rd;return C(),B(f(Fk),{open:t.value,"onUpdate:open":u[1]||(u[1]=h=>t.value=h)},{default:E(()=>[q(f(Ab),{modelValue:f(o),"onUpdate:modelValue":u[0]||(u[0]=h=>$e(o)?o.value=h:null),placeholder:"Type a command or search..."},null,8,["modelValue"]),q(f(Ob),{class:"h-100"},{default:E(()=>[q(f(Eb),null,{default:E(()=>[q(c,{title:"No apps found in this platform",description:"You can change the platform or search another app"})]),_:1}),q(p,{heading:"apps"},{default:E(()=>[(C(!0),ie(Ie,null,wt(f(i),h=>(C(),B(f(Dd),{value:h.name,key:h.id,onClick:m=>a(h)},{default:E(()=>[ce("div",PM,[q(d,{logo:h.appLogoUrl,name:h.name,description:h.appTagline??""},null,8,["logo","name","description"]),ce("span",kM,Ne(h.platform),1)])]),_:2},1032,["value","onClick"]))),128))]),_:1})]),_:1})]),_:1},8,["open"])}}}),Mm=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,qm=fb,DM=(e,t)=>n=>{var o;if((t==null?void 0:t.variants)==null)return qm(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:r,defaultVariants:s}=t,i=Object.keys(r).map(u=>{const c=n==null?void 0:n[u],d=s==null?void 0:s[u];if(c===null)return null;const p=Mm(c)||Mm(d);return r[u][p]}),a=n&&Object.entries(n).reduce((u,c)=>{let[d,p]=c;return p===void 0||(u[d]=p),u},{}),l=t==null||(o=t.compoundVariants)===null||o===void 0?void 0:o.reduce((u,c)=>{let{class:d,className:p,...h}=c;return Object.entries(h).every(m=>{let[g,v]=m;return Array.isArray(v)?v.includes({...s,...a}[g]):{...s,...a}[g]===v})?[...u,d,p]:u},[]);return qm(e,i,l,n==null?void 0:n.class,n==null?void 0:n.className)},vn=F({__name:"Button",props:{variant:{},size:{},class:{},asChild:{type:Boolean},as:{default:"button"}},setup(e){const t=e;return(n,o)=>(C(),B(f(Ae),{"data-slot":"button",as:n.as,"as-child":n.asChild,class:qe(f(Fe)(f(op)({variant:n.variant,size:n.size}),t.class))},{default:E(()=>[V(n.$slots,"default")]),_:3},8,["as","as-child","class"]))}}),op=DM("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-md font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive cursor-pointer",{variants:{variant:{default:"bg-primary text-primary-foreground shadow-xs hover:bg-primary/90",destructive:"bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-11 rounded-md px-6 has-[>svg]:px-4",icon:"size-9"}},defaultVariants:{variant:"default",size:"lg"}}),rp=F({__name:"Tabs",props:{defaultValue:{},orientation:{},dir:{},activationMode:{},modelValue:{},unmountOnHide:{type:Boolean},asChild:{type:Boolean},as:{},class:{}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,o=t,r=et(n,"class"),s=ft(r,o);return(i,a)=>(C(),B(f(vP),te({"data-slot":"tabs"},f(s),{class:f(Fe)("flex flex-col gap-2",n.class)}),{default:E(()=>[V(i.$slots,"default")]),_:3},16,["class"]))}}),sp=F({__name:"TabsList",props:{loop:{type:Boolean},asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,n=et(t,"class");return(o,r)=>(C(),B(f(wP),te({"data-slot":"tabs-list"},f(n),{class:f(Fe)("bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-lg p-[3px]",t.class)}),{default:E(()=>[V(o.$slots,"default")]),_:3},16,["class"]))}}),ip=F({__name:"TabsTrigger",props:{value:{},disabled:{type:Boolean},asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,n=et(t,"class"),o=Kt(n);return(r,s)=>(C(),B(f(CP),te({"data-slot":"tabs-trigger"},f(o),{class:f(Fe)("data-[state=active]:bg-background dark:data-[state=active]:text-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 text-foreground dark:text-muted-foreground inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-md font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 hover:bg-background hover:text-foreground cursor-pointer text-muted-foreground data-[state=active]:bg-transparent data-[state=active]:text-foreground data-[state=active]:shadow-none",t.class)}),{default:E(()=>[V(r.$slots,"default")]),_:3},16,["class"]))}}),JL=e=>Sr("/system/auth/login",e),ZL=e=>Sr("/system/auth/social-login",e),RM=()=>Sr("/system/auth/logout"),BM=()=>wr("/system/auth/get-user-info"),MM=F({__name:"Avatar",props:{class:{}},setup(e){const t=e;return(n,o)=>(C(),B(f(F1),{"data-slot":"avatar",class:qe(f(Fe)("relative flex size-8 shrink-0 overflow-hidden rounded-full",t.class))},{default:E(()=>[V(n.$slots,"default")]),_:3},8,["class"]))}}),qM=F({__name:"AvatarFallback",props:{delayMs:{},asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,n=et(t,"class");return(o,r)=>(C(),B(f(N1),te({"data-slot":"avatar-fallback"},f(n),{class:f(Fe)("bg-muted flex size-full items-center justify-center rounded-full",t.class)}),{default:E(()=>[V(o.$slots,"default")]),_:3},16,["class"]))}}),$M=F({__name:"AvatarImage",props:{src:{},referrerPolicy:{},crossOrigin:{},asChild:{type:Boolean},as:{}},setup(e){const t=e;return(n,o)=>(C(),B(f(U1),te({"data-slot":"avatar-image"},t,{class:"aspect-square size-full"}),{default:E(()=>[V(n.$slots,"default")]),_:3},16))}}),P_=F({__name:"DropdownMenu",props:{defaultOpen:{type:Boolean},open:{type:Boolean},dir:{},modal:{type:Boolean}},emits:["update:open"],setup(e,{emit:t}){const r=ft(e,t);return(s,i)=>(C(),B(f(BO),te({"data-slot":"dropdown-menu"},f(r)),{default:E(()=>[V(s.$slots,"default")]),_:3},16))}}),k_=F({__name:"DropdownMenuContent",props:{forceMount:{type:Boolean},loop:{type:Boolean},side:{},sideOffset:{default:4},sideFlip:{type:Boolean},align:{},alignOffset:{},alignFlip:{type:Boolean},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},positionStrategy:{},updatePositionStrategy:{},disableUpdateOnLayoutShift:{type:Boolean},prioritizePosition:{type:Boolean},reference:{},asChild:{type:Boolean},as:{},class:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","closeAutoFocus"],setup(e,{emit:t}){const n=e,o=t,r=et(n,"class"),s=ft(r,o);return(i,a)=>(C(),B(f(HO),null,{default:E(()=>[q(f(qO),te({"data-slot":"dropdown-menu-content"},f(s),{class:f(Fe)("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--reka-dropdown-menu-content-available-height) min-w-[8rem] origin-(--reka-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",n.class)}),{default:E(()=>[V(i.$slots,"default")]),_:3},16,["class"])]),_:3}))}}),FM=F({__name:"DropdownMenuGroup",props:{asChild:{type:Boolean},as:{}},setup(e){const t=e;return(n,o)=>(C(),B(f(FO),te({"data-slot":"dropdown-menu-group"},t),{default:E(()=>[V(n.$slots,"default")]),_:3},16))}}),Br=F({__name:"DropdownMenuItem",props:{disabled:{type:Boolean},textValue:{},asChild:{type:Boolean},as:{},class:{},inset:{type:Boolean},variant:{default:"default"}},setup(e){const t=e,n=et(t,"inset","variant","class"),o=Kt(n);return(r,s)=>(C(),B(f(NO),te({"data-slot":"dropdown-menu-item","data-inset":r.inset?"":void 0,"data-variant":r.variant},f(o),{class:f(Fe)("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive-foreground data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/40 data-[variant=destructive]:focus:text-destructive-foreground data-[variant=destructive]:*:[svg]:!text-destructive-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t.class)}),{default:E(()=>[V(r.$slots,"default")]),_:3},16,["data-inset","data-variant","class"]))}}),LM=F({__name:"DropdownMenuLabel",props:{asChild:{type:Boolean},as:{},class:{},inset:{type:Boolean}},setup(e){const t=e,n=et(t,"class","inset"),o=Kt(n);return(r,s)=>(C(),B(f(VO),te({"data-slot":"dropdown-menu-label","data-inset":r.inset?"":void 0},f(o),{class:f(Fe)("px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",t.class)}),{default:E(()=>[V(r.$slots,"default")]),_:3},16,["data-inset","class"]))}}),$m=F({__name:"DropdownMenuSeparator",props:{asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,n=et(t,"class");return(o,r)=>(C(),B(f(KO),te({"data-slot":"dropdown-menu-separator"},f(n),{class:f(Fe)("bg-border -mx-1 my-1 h-px",t.class)}),null,16,["class"]))}}),I_=F({__name:"DropdownMenuTrigger",props:{disabled:{type:Boolean},asChild:{type:Boolean},as:{}},setup(e){const n=Kt(e);return(o,r)=>(C(),B(f(GO),te({"data-slot":"dropdown-menu-trigger"},f(n)),{default:E(()=>[V(o.$slots,"default")]),_:3},16))}}),D_=bf("user",()=>{const e=N({avatar:"",nickname:"",username:""});return{userInfo:e,fetchUserInfo:async()=>{const n=await BM();e.value=n}}}),NM=F({__name:"UserAvatar",setup(e){const t=D_(),{userInfo:n}=va(t),o=Ta(),r=N([{to:"/apps",label:"我的App"},{to:"/favorites",label:"我的收藏"},{to:"/settings",label:"设置"}]),s=async()=>{try{await RM(),localStorage.removeItem("accessToken"),localStorage.removeItem("refreshToken"),console.log("Logout successful"),o.replace("/auth")}catch(i){console.error("Logout failed",i)}};return(i,a)=>{const l=pf("RouterLink");return C(),B(f(P_),{modal:!1},{default:E(()=>[q(f(I_),{"as-child":""},{default:E(()=>[q(f(MM),{class:"cursor-pointer"},{default:E(()=>[q(f($M),{src:f(n).avatar},null,8,["src"]),q(f(qM),null,{default:E(()=>{var u;return[rt(Ne(((u=f(n).nickname[0])==null?void 0:u.toUpperCase())||"U"),1)]}),_:1})]),_:1})]),_:1}),q(f(k_),{class:"w-48",align:"end","side-offset":8},{default:E(()=>[q(f(LM),null,{default:E(()=>a[0]||(a[0]=[rt("我的账户",-1)])),_:1,__:[0]}),q(f($m)),q(f(FM),null,{default:E(()=>[(C(!0),ie(Ie,null,wt(r.value,u=>(C(),B(f(Br),{key:u.to,"as-child":""},{default:E(()=>[q(l,{to:u.to,class:"cursor-pointer"},{default:E(()=>[rt(Ne(u.label),1)]),_:2},1032,["to"])]),_:2},1024))),128))]),_:1}),q(f($m)),q(f(Br),{class:"cursor-pointer",onClick:s},{default:E(()=>a[1]||(a[1]=[rt(" 退出登录 ",-1)])),_:1,__:[1]})]),_:1})]),_:1})}}}),jM=[{label:"ios",value:"ios",icon:"mdi:apple"},{label:"android",value:"android",icon:"mdi:android"},{label:"web",value:"web",icon:"mdi:web"}],Ks=[{label:"Apps",value:"appCategories",icon:"duo-icons:app",categoryType:0},{label:"Screens",value:"screenPatterns",icon:"simple-line-icons:screen-smartphone",categoryType:1},{label:"UI Elements",value:"screenElements",icon:"humbleicons:switch-on",categoryType:2},{label:"Flows",value:"flowActions",icon:"fluent:flow-32-regular",categoryType:3}],ql=[...Ks.slice(0,2),...Ks.slice(2)],VM={class:"grid grid-cols-3 gap-4 items-center fixed top-0 left-0 right-0 h-18 shrink-0 z-1 bg-background px-4 lg:px-20"},UM={class:"col-span-1 flex items-center h-full"},HM={class:"col-span-1 h-full flex items-center py-3"},zM={class:"col-span-1 h-full flex justify-end items-center"},KM=F({__name:"Header",props:{modelValue:{required:!0},modelModifiers:{}},emits:Un(["searchClick","platformClick"],["update:modelValue"]),setup(e,{emit:t}){const n=ts(e,"modelValue"),o=t,r=l=>({ios:"iOS",android:"Android",web:"Web"})[l]||l,s=U(()=>`在 ${r(n.value)} 上搜索...`),i=l=>{o("platformClick",l)},a=()=>{o("searchClick")};return(l,u)=>{const c=Ho;return C(),ie("div",VM,[ce("div",UM,[q(f(rp),{modelValue:n.value,"onUpdate:modelValue":u[0]||(u[0]=d=>n.value=d)},{default:E(()=>[q(f(sp),{class:"bg-transparent p-0"},{default:E(()=>[(C(!0),ie(Ie,null,wt(f(jM),d=>(C(),B(f(ip),{key:d.label,value:d.label,onClick:p=>i(d.value)},{default:E(()=>[q(c,{icon:d.icon,class:"h-4 w-4 mr-2"},null,8,["icon"]),rt(" "+Ne(r(d.value)),1)]),_:2},1032,["value","onClick"]))),128))]),_:1})]),_:1},8,["modelValue"])]),ce("div",HM,[q(f(vn),{variant:"outline",class:"w-full justify-start text-muted-foreground rounded-full cursor-pointer",onClick:a},{default:E(()=>[q(c,{icon:"lucide:search",class:"h-4 w-4 mr-2"}),rt(" "+Ne(s.value),1)]),_:1})]),ce("div",zM,[q(f(NM))])])}}}),WM=F({__name:"Sonner",props:{invert:{type:Boolean},theme:{},position:{},hotkey:{},richColors:{type:Boolean},expand:{type:Boolean},duration:{},gap:{},visibleToasts:{},closeButton:{type:Boolean},toastOptions:{},class:{},style:{},offset:{},mobileOffset:{},dir:{},swipeDirections:{},icons:{},containerAriaLabel:{}},setup(e){const t=e;return(n,o)=>(C(),B(f(wB),te({class:"toaster group"},t,{style:{"--normal-bg":"var(--popover)","--normal-text":"var(--popover-foreground)","--normal-border":"var(--border)"}}),null,16))}}),GM=()=>wr("/admin/app-category/list-all"),Gd=e=>{if(e===null||typeof e!="object")return e;if(e instanceof Date)return new Date(e.getTime());if(Array.isArray(e))return e.map(n=>Gd(n));const t={};for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=Gd(e[n]));return t},cl=(e,t,n)=>{const o=new Map,r=e.map(a=>{const l=Gd(a),u={...l,id:l[t.id],label:l[t.label],value:l[t.value],level:1,parentId:l[t.parentId]??null,expanded:!1};return o.set(u.id,u),u}),s=[];r.forEach(a=>{if(a.parentId!==null){const l=a.parentId!==void 0?o.get(a.parentId):void 0;l?(a.level=l.level+1,l.children||(l.children=[]),l.children.push(a)):s.push(a)}else s.push(a)});const i=a=>(n!=null&&n.order&&(a.sort((l,u)=>{const c=l[n.order],d=u[n.order];return typeof c=="number"&&typeof d=="number"?c-d:String(c).localeCompare(String(d))}),a.forEach(l=>{var u;(u=l.children)!=null&&u.length&&(l.children=i(l.children))})),a);return i(s)},Fm=(e,t)=>{const n=new Set(e),o=new Set(t);let r=0;for(const s of n)o.has(s)&&r++;return r},QM=(e,t={})=>{const{keepChildren:n=!1,keepLevel:o=!1,keepExpanded:r=!1}=t,s=[],i=(a,l=null)=>{(Array.isArray(a)?a:[a]).forEach(c=>{var p;const d={};Object.entries(c).forEach(([h,m])=>{["children","level","expanded","parentId","label"].includes(h)||(d[h]=m)}),n&&c.children&&(d.children=c.children),o&&(d.level=c.level),r&&c.expanded!==void 0&&(d.expanded=c.expanded),l!==null&&(d.parentId=l),s.push(d),(p=c.children)!=null&&p.length&&i(c.children,c.id)})};return i(e),s},$u=bf("definition",()=>{const e=N([]);return{definitions:e,fetchDefinitions:async()=>{const n=await GM();e.value=cl(n,{id:"id",label:"displayName",value:"id",parentId:"parentId"},{order:"orderNum"})}}}),YM=F({__name:"App",setup(e){const t=Ta(),n=T_(),{fetchDefinitions:o}=$u(),{fetchApps:r}=m_(),s=["auth","settings","chat"],i=N("ios");Nn(ep,U(()=>i.value));const a=()=>{c.value=!0},l=h=>{t.replace("/"),i.value=h,localStorage.setItem("platform",h)},u=()=>{const h=localStorage.getItem("platform");h?i.value=h:(i.value="ios",localStorage.setItem("platform","ios"))},c=N(!1),d=U(()=>!s.includes(n.name)),p=U(()=>n.name!=="chat");return je(()=>{u(),o(),r(i.value)}),(h,m)=>{const g=pf("RouterView"),v=IM;return C(),ie(Ie,null,[ce("div",{class:qe(["w-full max-w-[2000px] mx-auto relative h-full min-h-full",{"px-4 lg:px-20":f(p),"pt-18":f(d)}])},[f(d)?(C(),B(KM,{key:0,modelValue:f(i),"onUpdate:modelValue":m[0]||(m[0]=y=>$e(i)?i.value=y:null),onSearchClick:a,onPlatformClick:l},null,8,["modelValue"])):Be("",!0),q(g)],2),q(v,{modelValue:f(c),"onUpdate:modelValue":m[1]||(m[1]=y=>$e(c)?c.value=y:null)},null,8,["modelValue"]),q(f(WM),{position:"top-right",richColors:"",closeButton:""})],64)}}}),XM="modulepreload",JM=function(e){return"/"+e},Lm={},mi=function(t,n,o){let r=Promise.resolve();if(n&&n.length>0){let i=function(u){return Promise.all(u.map(c=>Promise.resolve(c).then(d=>({status:"fulfilled",value:d}),d=>({status:"rejected",reason:d}))))};document.getElementsByTagName("link");const a=document.querySelector("meta[property=csp-nonce]"),l=(a==null?void 0:a.nonce)||(a==null?void 0:a.getAttribute("nonce"));r=i(n.map(u=>{if(u=JM(u),u in Lm)return;Lm[u]=!0;const c=u.endsWith(".css"),d=c?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${u}"]${d}`))return;const p=document.createElement("link");if(p.rel=c?"stylesheet":XM,c||(p.as="script"),p.crossOrigin="",p.href=u,l&&p.setAttribute("nonce",l),document.head.appendChild(p),c)return new Promise((h,m)=>{p.addEventListener("load",h),p.addEventListener("error",()=>m(new Error(`Unable to preload CSS for ${u}`)))})}))}function s(i){const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=i,window.dispatchEvent(a),!a.defaultPrevented)throw i}return r.then(i=>{for(const a of i||[])a.status==="rejected"&&s(a.reason);return t().catch(s)})},ZM=F({__name:"AlertDialog",props:{open:{type:Boolean},defaultOpen:{type:Boolean}},emits:["update:open"],setup(e,{emit:t}){const r=ft(e,t);return(s,i)=>(C(),B(f(P1),te({"data-slot":"alert-dialog"},f(r)),{default:E(()=>[V(s.$slots,"default")]),_:3},16))}}),eq=F({__name:"AlertDialogAction",props:{asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,n=et(t,"class");return(o,r)=>(C(),B(f(m1),te(f(n),{class:f(Fe)(f(op)(),t.class)}),{default:E(()=>[V(o.$slots,"default")]),_:3},16,["class"]))}}),tq=F({__name:"AlertDialogCancel",props:{asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,n=et(t,"class");return(o,r)=>(C(),B(f(w1),te(f(n),{class:f(Fe)(f(op)({variant:"outline"}),"mt-2 sm:mt-0",t.class)}),{default:E(()=>[V(o.$slots,"default")]),_:3},16,["class"]))}}),nq=F({__name:"AlertDialogContent",props:{forceMount:{type:Boolean},disableOutsidePointerEvents:{type:Boolean},asChild:{type:Boolean},as:{},class:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(e,{emit:t}){const n=e,o=t,r=et(n,"class"),s=ft(r,o);return(i,a)=>(C(),B(f(O1),null,{default:E(()=>[q(f(E1),{"data-slot":"alert-dialog-overlay",class:"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/80"}),q(f(b1),te({"data-slot":"alert-dialog-content"},f(s),{class:f(Fe)("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",n.class)}),{default:E(()=>[V(i.$slots,"default")]),_:3},16,["class"])]),_:3}))}}),oq=F({__name:"AlertDialogDescription",props:{asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,n=et(t,"class");return(o,r)=>(C(),B(f(C1),te({"data-slot":"alert-dialog-description"},f(n),{class:f(Fe)("text-muted-foreground text-sm",t.class)}),{default:E(()=>[V(o.$slots,"default")]),_:3},16,["class"]))}}),rq=F({__name:"AlertDialogFooter",props:{class:{}},setup(e){const t=e;return(n,o)=>(C(),ie("div",{"data-slot":"alert-dialog-footer",class:qe(f(Fe)("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",t.class))},[V(n.$slots,"default")],2))}}),sq=F({__name:"AlertDialogHeader",props:{class:{}},setup(e){const t=e;return(n,o)=>(C(),ie("div",{"data-slot":"alert-dialog-header",class:qe(f(Fe)("flex flex-col gap-2 text-center sm:text-left",t.class))},[V(n.$slots,"default")],2))}}),iq=F({__name:"AlertDialogTitle",props:{asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,n=et(t,"class");return(o,r)=>(C(),B(f(I1),te({"data-slot":"alert-dialog-title"},f(n),{class:f(Fe)("text-lg font-semibold",t.class)}),{default:E(()=>[V(o.$slots,"default")]),_:3},16,["class"]))}}),aq=F({__name:"AlertDialogTrigger",props:{asChild:{type:Boolean},as:{}},setup(e){const t=e;return(n,o)=>(C(),B(f(R1),te({"data-slot":"alert-dialog-trigger"},t),{default:E(()=>[V(n.$slots,"default")]),_:3},16))}}),ap=F({__name:"AlertConfirm",props:Un({title:{},description:{default:""},cancelText:{default:"cancel"},actionText:{default:"confirm"}},{modelValue:{type:Boolean,required:!1},modelModifiers:{}}),emits:Un(["confirm"],["update:modelValue"]),setup(e,{expose:t,emit:n}){const o=n,r=ts(e,"modelValue"),s=()=>{o("confirm"),r.value=!1},i=()=>{r.value=!1};return t({open:()=>r.value=!0,close:()=>r.value=!1}),(a,l)=>(C(),B(f(ZM),{open:r.value,"onUpdate:open":l[0]||(l[0]=u=>r.value=u)},{default:E(()=>[q(f(aq),{"as-child":""},{default:E(()=>[V(a.$slots,"default")]),_:3}),q(f(nq),null,{default:E(()=>[q(f(sq),null,{default:E(()=>[q(f(iq),null,{default:E(()=>[rt(Ne(a.title),1)]),_:1}),q(f(oq),null,{default:E(()=>[rt(Ne(a.description),1)]),_:1})]),_:1}),q(f(rq),null,{default:E(()=>[q(f(tq),{onClick:i},{default:E(()=>[rt(Ne(a.cancelText),1)]),_:1}),q(f(eq),{onClick:s},{default:E(()=>[rt(Ne(a.actionText),1)]),_:1})]),_:1})]),_:1})]),_:3},8,["open"]))}}),R_=F({__name:"ScrollBar",props:{orientation:{default:"vertical"},forceMount:{type:Boolean},asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,n=et(t,"class");return(o,r)=>(C(),B(f(mT),te({"data-slot":"scroll-area-scrollbar"},f(n),{class:f(Fe)("flex touch-none p-px transition-colors select-none",o.orientation==="vertical"&&"h-full w-2.5 border-l border-l-transparent",o.orientation==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent",t.class)}),{default:E(()=>[q(f(_T),{"data-slot":"scroll-area-thumb",class:"bg-border relative flex-1 rounded-full"})]),_:1},16,["class"]))}}),lp=F({__name:"ScrollArea",props:{type:{},dir:{},scrollHideDelay:{},asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,n=et(t,"class");return(o,r)=>(C(),B(f(XO),te({"data-slot":"scroll-area"},f(n),{class:f(Fe)("relative",t.class)}),{default:E(()=>[q(f(ST),{"data-slot":"scroll-area-viewport",class:"focus-visible:ring-ring/50 size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:outline-1"},{default:E(()=>[V(o.$slots,"default")]),_:3}),q(R_),q(f(tT))]),_:3},16,["class"]))}}),lq=e=>Sr("/admin/favorite/create-app-favorite",{...e,favoriteType:1}),eN=e=>wr("/admin/app/page",{...e,type:2}),uq=e=>Sr("/admin/favorite-section/create",e),tN=e=>wr("/admin/app-section/get-favorite",e),xc=F({__name:"Tooltip",props:{defaultOpen:{type:Boolean},open:{type:Boolean},delayDuration:{},disableHoverableContent:{type:Boolean},disableClosingTrigger:{type:Boolean},disabled:{type:Boolean},ignoreNonKeyboardFocus:{type:Boolean}},emits:["update:open"],setup(e,{emit:t}){const r=ft(e,t);return(s,i)=>(C(),B(f(IP),te({"data-slot":"tooltip"},f(r)),{default:E(()=>[V(s.$slots,"default")]),_:3},16))}}),Ec=F({inheritAttrs:!1,__name:"TooltipContent",props:{forceMount:{type:Boolean},ariaLabel:{},asChild:{type:Boolean},as:{},side:{},sideOffset:{default:4},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},positionStrategy:{},updatePositionStrategy:{},class:{}},emits:["escapeKeyDown","pointerDownOutside"],setup(e,{emit:t}){const n=e,o=t,r=et(n,"class"),s=ft(r,o);return(i,a)=>(C(),B(f(FP),null,{default:E(()=>[q(f(qP),te({"data-slot":"tooltip-content"},{...f(s),...i.$attrs},{class:f(Fe)("bg-primary text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit rounded-md px-3 py-1.5 text-xs text-balance",n.class)}),{default:E(()=>[V(i.$slots,"default"),q(f(EP),{class:"bg-primary fill-primary z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]"})]),_:3},16,["class"])]),_:3}))}}),Ac=F({__name:"TooltipProvider",props:{delayDuration:{default:0},skipDelayDuration:{},disableHoverableContent:{type:Boolean},disableClosingTrigger:{type:Boolean},disabled:{type:Boolean},ignoreNonKeyboardFocus:{type:Boolean}},setup(e){const t=e;return(n,o)=>(C(),B(f(TP),ct(yt(t)),{default:E(()=>[V(n.$slots,"default")]),_:3},16))}}),Oc=F({__name:"TooltipTrigger",props:{reference:{},asChild:{type:Boolean},as:{}},setup(e){const t=e;return(n,o)=>(C(),B(f(NP),te({"data-slot":"tooltip-trigger"},t),{default:E(()=>[V(n.$slots,"default")]),_:3},16))}}),Tc=N(null);function cq(){return{copiedScreen:Tc,copyScreen:n=>{Tc.value=JSON.parse(JSON.stringify(n))},clearClipboard:()=>{Tc.value=null}}}var dq=Object.defineProperty,$l=Object.getOwnPropertySymbols,B_=Object.prototype.hasOwnProperty,M_=Object.prototype.propertyIsEnumerable,Nm=(e,t,n)=>t in e?dq(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,vs=(e,t)=>{for(var n in t||(t={}))B_.call(t,n)&&Nm(e,n,t[n]);if($l)for(var n of $l(t))M_.call(t,n)&&Nm(e,n,t[n]);return e},q_=(e,t)=>{var n={};for(var o in e)B_.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&$l)for(var o of $l(e))t.indexOf(o)<0&&M_.call(e,o)&&(n[o]=e[o]);return n};const $_="[vue-draggable-plus]: ";function fq(e){console.warn($_+e)}function pq(e){console.error($_+e)}function jm(e,t,n){return n>=0&&n<e.length&&e.splice(n,0,e.splice(t,1)[0]),e}function hq(e){return e.replace(/-(\w)/g,(t,n)=>n?n.toUpperCase():"")}function mq(e){return Object.keys(e).reduce((t,n)=>(typeof e[n]<"u"&&(t[hq(n)]=e[n]),t),{})}function Vm(e,t){return Array.isArray(e)&&e.splice(t,1),e}function Um(e,t,n){return Array.isArray(e)&&e.splice(t,0,n),e}function gq(e){return typeof e>"u"}function vq(e){return typeof e=="string"}function Hm(e,t,n){const o=e.children[n];e.insertBefore(t,o)}function Pc(e){e.parentNode&&e.parentNode.removeChild(e)}function yq(e,t=document){var n;let o=null;return typeof(t==null?void 0:t.querySelector)=="function"?o=(n=t==null?void 0:t.querySelector)==null?void 0:n.call(t,e):o=document.querySelector(e),o||fq(`Element not found: ${e}`),o}function bq(e,t,n=null){return function(...o){return e.apply(n,o),t.apply(n,o)}}function _q(e,t){const n=vs({},e);return Object.keys(t).forEach(o=>{n[o]?n[o]=bq(e[o],t[o]):n[o]=t[o]}),n}function wq(e){return e instanceof HTMLElement}function zm(e,t){Object.keys(e).forEach(n=>{t(n,e[n])})}function Sq(e){return e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97)}const Cq=Object.assign;/**!
DesignScreenshot/output/100.64.0.2_run/100.64.0.2_8083_3_credentials_filled.html:110:              transform 0.3s ease-out`}},[q(m,{variant:"outline",class:"rounded-full",border:!1,onClick:d[0]||(d[0]=Ze(v=>c.$emit("save",c.id),["stop"]))},{default:E(()=>d[2]||(d[2]=[rt(" save ",-1)])),_:1,__:[2]}),q(m,{class:"rounded-full",border:!1,onClick:d[1]||(d[1]=Ze(v=>c.$emit("copy",c.id),["stop"]))},{default:E(()=>d[3]||(d[3]=[rt(" copy ",-1)])),_:1,__:[3]})],2)],2)]),c.name||c.logo?(C(),B(g,{key:0,name:c.name,logo:c.logo,class:"flex-shrink-0 relative z-30 mt-1"},null,8,["name","logo"])):Be("",!0)],2)}}}),og=F({__name:"Checkbox",props:{defaultValue:{type:[Boolean,String]},modelValue:{type:[Boolean,String,null]},disabled:{type:Boolean},value:{},id:{},asChild:{type:Boolean},as:{},name:{},required:{type:Boolean},class:{}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,o=t,r=et(n,"class"),s=ft(r,o);return(i,a)=>(C(),B(f(iE),te({"data-slot":"checkbox"},f(s),{class:f(Fe)("peer border-input data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",n.class)}),{default:E(()=>[q(f(lE),{"data-slot":"checkbox-indicator",class:"flex items-center justify-center text-current transition-none"},{default:E(()=>[V(i.$slots,"default",{},()=>[q(f(xb),{class:"size-3.5"})])]),_:3})]),_:3},16,["class"]))}}),P$=F({__name:"Popover",props:{defaultOpen:{type:Boolean},open:{type:Boolean},modal:{type:Boolean}},emits:["update:open"],setup(e,{emit:t}){const r=ft(e,t);return(s,i)=>(C(),B(f(_O),te({"data-slot":"popover"},f(r)),{default:E(()=>[V(s.$slots,"default")]),_:3},16))}}),k$=F({inheritAttrs:!1,__name:"PopoverContent",props:{forceMount:{type:Boolean},side:{},sideOffset:{default:4},sideFlip:{type:Boolean},align:{default:"center"},alignOffset:{},alignFlip:{type:Boolean},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},positionStrategy:{},updatePositionStrategy:{},disableUpdateOnLayoutShift:{type:Boolean},prioritizePosition:{type:Boolean},reference:{},asChild:{type:Boolean},as:{},disableOutsidePointerEvents:{type:Boolean},class:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(e,{emit:t}){const n=e,o=t,r=et(n,"class"),s=ft(r,o);return(i,a)=>(C(),B(f(PO),null,{default:E(()=>[q(f(OO),te({"data-slot":"popover-content"},{...f(s),...i.$attrs},{class:f(Fe)("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 rounded-md border p-4 shadow-md origin-(--reka-popover-content-transform-origin) outline-hidden",n.class)}),{default:E(()=>[V(i.$slots,"default")]),_:3},16,["class"])]),_:3}))}}),I$=F({__name:"PopoverTrigger",props:{asChild:{type:Boolean},as:{}},setup(e){const t=e;return(n,o)=>(C(),B(f(IO),te({"data-slot":"popover-trigger"},t),{default:E(()=>[V(n.$slots,"default")]),_:3},16))}}),D$={class:"truncate text-left"},R$={key:0,class:"ml-1.5 font-normal text-xs px-1.5 py-0.5 bg-background/20 rounded-full"},B$={key:0,class:"text-xs mt-1 text-muted-foreground"},M$=["for"],q$=["for"],$$=F({__name:"Dropdown",props:{defaultLabel:{},data:{},selectionMode:{default:"single"},placement:{default:"center"},searchable:{type:Boolean,default:!0}},emits:["change"],setup(e,{expose:t,emit:n}){const o=n,r=N(!1),s=N(""),i=N([]),a=U(()=>!e.data||e.data.length===0||e.data.every(h=>!h.children||h.children.length===0)),l=U(()=>{var h;return((h=e.data)==null?void 0:h.flatMap(m=>m.children??[]))??[]}),u=U(()=>l.value.filter(h=>i.value.includes(h.id))),c=U(()=>{if(!e.data)return[];const h=s.value.toLowerCase();return e.data.map(m=>{var v;const g=(v=m.children)==null?void 0:v.filter(y=>{const b=i.value.includes(y.id),_=y.label.toLowerCase().includes(h);return h?_:!b});return g&&g.length>0?{...m,children:g}:null}).filter(m=>m!==null)}),d=h=>{if(e.selectionMode==="single")i.value=i.value[0]===h?[]:[h],r.value=!1;else{const m=[...i.value],g=m.indexOf(h);g>-1?m.splice(g,1):m.push(h),i.value=m}},p=()=>{i.value=[],s.value=""};return Ce(u,h=>{o("change",h)},{deep:!0}),t({clear:p}),(h,m)=>(C(),B(f(P$),{open:f(r),"onUpdate:open":m[1]||(m[1]=g=>$e(r)?r.value=g:null)},{default:E(()=>[q(f(I$),{"as-child":""},{default:E(()=>[q(f(vn),{variant:f(u).length>0?"default":"outline",role:"combobox","aria-expanded":f(r),class:"h-11 justify-between px-4 font-semibold rounded-full transition-colors duration-200"},{default:E(()=>{var g;return[ce("span",D$,[f(u).length===0?(C(),ie(Ie,{key:0},[rt(Ne(h.defaultLabel),1)],64)):(C(),ie(Ie,{key:1},[rt(Ne((g=f(u)[0])==null?void 0:g.label)+" ",1),h.selectionMode==="multiple"&&f(u).length>1?(C(),ie("span",R$," +"+Ne(f(u).length-1),1)):Be("",!0)],64))]),f(u).length>0?(C(),B(f(Pk),{key:0,class:"ml-2 h-4 w-4 shrink-0 opacity-50",onClick:Ze(p,["stop","prevent"])})):(C(),B(f(Kf),{key:1,class:qe(["ml-2 h-4 w-4 shrink-0 opacity-50 transition-transform",{"rotate-180":f(r)}])},null,8,["class"]))]}),_:1},8,["variant","aria-expanded"])]),_:1}),q(f(k$),{class:"w-80 p-0",align:h.placement},{default:E(()=>[q(f(Cb),{class:"max-h-[480px] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md"},{default:E(()=>[h.searchable?(C(),B(f(Ab),{key:0,modelValue:f(s),"onUpdate:modelValue":m[0]||(m[0]=g=>$e(s)?s.value=g:null),placeholder:"搜索...",class:"h-10 w-full rounded-none border-0 border-b focus-visible:ring-0 focus-visible:ring-offset-0"},null,8,["modelValue"])):Be("",!0),q(f(Ob),{class:"flex-1 overflow-y-auto overscroll-contain custom-scrollbar"},{default:E(()=>[q(f(Eb),{class:"py-6 text-center text-sm"},{default:E(()=>[ce("p",null,Ne(f(a)?"暂无数据":"未找到结果"),1),f(a)?Be("",!0):(C(),ie("p",B$,"请尝试其他关键词"))]),_:1}),f(u).length>0&&f(s)===""?(C(),B(f(Rd),{key:0,heading:"已选"},{default:E(()=>[(C(!0),ie(Ie,null,wt(f(u),g=>(C(),B(f(Dd),{key:`selected-${g.id}`,value:g.label,onSelect:Ze(v=>d(g.id),["prevent"]),class:"cursor-pointer"},{default:E(()=>[q(f(og),{id:`selected-${g.id}`,"model-value":!0,class:"mr-2"},null,8,["id"]),ce("label",{for:`selected-${g.id}`,class:"cursor-pointer"},Ne(g.label),9,M$)]),_:2},1032,["value","onSelect"]))),128))]),_:1})):Be("",!0),(C(!0),ie(Ie,null,wt(f(c),g=>(C(),B(f(Rd),{key:g.label,heading:g.label},{default:E(()=>[(C(!0),ie(Ie,null,wt(g.children,v=>(C(),B(f(Dd),{key:v.id,value:v.label,onSelect:Ze(y=>d(v.id),["prevent"]),class:"cursor-pointer"},{default:E(()=>[q(f(og),{id:v.id,"model-value":f(i).includes(v.id),class:"mr-2"},null,8,["id","model-value"]),ce("label",{for:v.id,class:"cursor-pointer"},Ne(v.label),9,q$)]),_:2},1032,["value","onSelect"]))),128))]),_:2},1032,["heading"]))),128))]),_:1})]),_:1})]),_:1},8,["align"])]),_:1},8,["open"]))}}),gl=Lu($$,[["__scopeId","data-v-cce68d8f"]]),F$={class:"flex flex-col gap-6"},L$={class:"flex gap-8"},N$={class:"w-24 h-24"},j$={class:"flex-1 flex items-center"},V$={class:"text-5xl font-semibold text-primary"},U$={class:"flex gap-8"},H$={class:"flex flex-col gap-1"},z$={class:"text-sm font-semibold text-primary text-center"},K$={class:"flex flex-col gap-1"},W$={class:"text-sm font-semibold text-primary text-center"},G$=F({__name:"StoreAppCard",props:{logoUrl:{},name:{},description:{},platform:{},rating:{},categories:{}},emits:["click"],setup(e,{emit:t}){return(n,o)=>{var s;const r=ri;return C(),ie("div",F$,[ce("div",L$,[ce("div",N$,[q(r,{src:n.logoUrl,class:"rounded-3xl"},null,8,["src"])]),ce("div",j$,[ce("span",V$,Ne(n.name)+"—"+Ne(n.description),1)])]),ce("div",U$,[ce("div",H$,[o[0]||(o[0]=ce("span",{class:"text-sm text-textSecondary"},"Platform",-1)),ce("span",z$,Ne(n.platform),1)]),ce("div",K$,[o[1]||(o[1]=ce("span",{class:"text-sm text-textSecondary"},"Category",-1)),ce("span",W$,Ne((s=n.categories)==null?void 0:s.join(", ")),1)])])])}}}),Q$=e=>Sr("/admin/app-info/create",e),Y$=e=>wr("/admin/screen/page",e),X$=F({__name:"Select",props:{open:{type:Boolean},defaultOpen:{type:Boolean},defaultValue:{},modelValue:{},by:{type:[String,Function]},dir:{},multiple:{type:Boolean},autocomplete:{},disabled:{type:Boolean},name:{},required:{type:Boolean}},emits:["update:modelValue","update:open"],setup(e,{emit:t}){const r=ft(e,t);return(s,i)=>(C(),B(f(kT),te({"data-slot":"select"},f(r)),{default:E(()=>[V(s.$slots,"default")]),_:3},16))}}),J$=F({inheritAttrs:!1,__name:"SelectContent",props:{forceMount:{type:Boolean},position:{default:"popper"},bodyLock:{type:Boolean},side:{},sideOffset:{},sideFlip:{type:Boolean},align:{},alignOffset:{},alignFlip:{type:Boolean},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},positionStrategy:{},updatePositionStrategy:{},disableUpdateOnLayoutShift:{type:Boolean},prioritizePosition:{type:Boolean},reference:{},asChild:{type:Boolean},as:{},class:{}},emits:["closeAutoFocus","escapeKeyDown","pointerDownOutside"],setup(e,{emit:t}){const n=e,o=t,r=et(n,"class"),s=ft(r,o);return(i,a)=>(C(),B(f(oP),null,{default:E(()=>[q(f(UT),te({"data-slot":"select-content"},{...f(s),...i.$attrs},{class:f(Fe)("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--reka-select-content-available-height) min-w-[8rem] overflow-x-hidden overflow-y-auto rounded-md border shadow-md",i.position==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",n.class)}),{default:E(()=>[q(f(oF)),q(f(hP),{class:qe(f(Fe)("p-1",i.position==="popper"&&"h-[var(--reka-select-trigger-height)] w-full min-w-[var(--reka-select-trigger-width)] scroll-my-1"))},{default:E(()=>[V(i.$slots,"default")]),_:3},8,["class"]),q(f(nF))]),_:3},16,["class"])]),_:3}))}}),Z$=F({__name:"SelectGroup",props:{asChild:{type:Boolean},as:{}},setup(e){const t=e;return(n,o)=>(C(),B(f(KT),te({"data-slot":"select-group"},t),{default:E(()=>[V(n.$slots,"default")]),_:3},16))}}),eF={class:"absolute right-2 flex size-3.5 items-center justify-center"},tF=F({__name:"SelectItem",props:{value:{},disabled:{type:Boolean},textValue:{},asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,n=et(t,"class"),o=Kt(n);return(r,s)=>(C(),B(f(XT),te({"data-slot":"select-item"},f(o),{class:f(Fe)("focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",t.class)}),{default:E(()=>[ce("span",eF,[q(f(ZT),null,{default:E(()=>[q(f(xb),{class:"size-4"})]),_:1})]),q(f(tP),null,{default:E(()=>[V(r.$slots,"default")]),_:3})]),_:3},16,["class"]))}}),nF=F({__name:"SelectScrollDownButton",props:{asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,n=et(t,"class"),o=Kt(n);return(r,s)=>(C(),B(f(iP),te({"data-slot":"select-scroll-down-button"},f(o),{class:f(Fe)("flex cursor-default items-center justify-center py-1",t.class)}),{default:E(()=>[V(r.$slots,"default",{},()=>[q(f(Kf),{class:"size-4"})])]),_:3},16,["class"]))}}),oF=F({__name:"SelectScrollUpButton",props:{asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,n=et(t,"class"),o=Kt(n);return(r,s)=>(C(),B(f(lP),te({"data-slot":"select-scroll-up-button"},f(o),{class:f(Fe)("flex cursor-default items-center justify-center py-1",t.class)}),{default:E(()=>[V(r.$slots,"default",{},()=>[q(f(Tk),{class:"size-4"})])]),_:3},16,["class"]))}}),rF=F({__name:"SelectTrigger",props:{disabled:{type:Boolean},reference:{},asChild:{type:Boolean},as:{},class:{},size:{default:"default"}},setup(e){const t=e,n=et(t,"class","size"),o=Kt(n);return(r,s)=>(C(),B(f(cP),te({"data-slot":"select-trigger","data-size":r.size},f(o),{class:f(Fe)("border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t.class)}),{default:E(()=>[V(r.$slots,"default"),q(f(GT),{"as-child":""},{default:E(()=>[q(f(Kf),{class:"size-4 opacity-50"})]),_:1})]),_:3},16,["data-size","class"]))}}),sF=F({__name:"SelectValue",props:{placeholder:{},asChild:{type:Boolean},as:{}},setup(e){const t=e;return(n,o)=>(C(),B(f(fP),te({"data-slot":"select-value"},t),{default:E(()=>[V(n.$slots,"default")]),_:3},16))}}),rg=e=>Array.isArray(e)&&e.length>0,iF={class:"flex flex-col gap-3 pb-10"},aF={class:"sticky-dropdown-filters flex py-2 gap-2"},lF={key:1,class:"text-center p-10"},uF=F({__name:"Details",setup(e){const t=T_(),{definitions:n}=va($u()),o=ya(),r=N(t.query.platform),s=U(()=>((r==null?void 0:r.value)==="web"?ql:Ks).slice(1)),i=N(s.value[0].label),a=T=>{var P;const A=(P=s.value.find(w=>w.label===T))==null?void 0:P.value,D=n.value.find(w=>w.slug===A&&w.platformType===r.value);return D==null?void 0:D.children},l=U(()=>Number(t.query.id)),{data:u,isLoading:c}=hC({queryKey:["appDetails",l],queryFn:async()=>{const T=await xB(l.value)||[];return rg(T)&&(T.sort((A,D)=>new Date(D.createTime).getTime()-new Date(A.createTime).getTime()),T.forEach(A=>{A.appSections=A.appSections||[]})),T},enabled:U(()=>!!l.value)}),d=N(""),p=U(()=>u.value?u.value.map(T=>({id:T.externalVersionId,label:T.createTime,value:T.externalVersionId})):[]);Ce(()=>u.value,T=>{T&&rg(T)&&(d.value=T[0].externalVersionId)},{immediate:!0});const h=U(()=>{var T;return!u.value||!d.value?(T=u.value)==null?void 0:T[0]:u.value.find(A=>A.externalVersionId===d.value)}),m=N();Ce(h,T=>{T?m.value=JSON.parse(JSON.stringify(T)):m.value=void 0},{deep:!0,immediate:!0});const g=N([]),v=T=>{g.value=(T==null?void 0:T.map(A=>A.displayName))||[]},y=U(()=>{if(m.value&&m.value.appSections)return m.value.appSections.map(A=>A.screens).flat().filter(Boolean)}),b=U(()=>{if(y.value&&y.value.length>0){let T=y.value;return g.value.length>0&&(i.value==="Screens"&&(T=T.filter(A=>A.screenPatterns&&Fm(A.screenPatterns,g.value))),i.value==="UI Elements"&&(T=T.filter(A=>A.screenElements&&Fm(A.screenElements,g.value)))),T}}),_=Ii({mutationFn:Q$,onSuccess:()=>{o.invalidateQueries({queryKey:["appDetails",l.value]})}}),O=()=>{if(!m.value||!m.value.id){console.warn("App info not available to create a new AppInfo.");return}_.mutate({appId:m.value.id})};return(T,A)=>{const D=G$,P=gl,w=Ho,k=tw,$=T$;return C(),ie("div",iF,[f(m)?(C(),B(D,{key:0,name:f(m).appName,"logo-url":f(m).appLogoUrl,platform:f(m).platform,description:f(m).appTagline,categories:f(m).allAppCategories},null,8,["name","logo-url","platform","description","categories"])):Be("",!0),q(f(rp),{modelValue:f(i),"onUpdate:modelValue":A[0]||(A[0]=R=>$e(i)?i.value=R:null),class:"!-ml-2"},{default:E(()=>[q(f(sp),{class:"bg-transparent p-0"},{default:E(()=>[(C(!0),ie(Ie,null,wt(f(s),R=>(C(),B(f(ip),{key:R.label,value:R.label,class:"!font-bold"},{default:E(()=>[rt(Ne(R.label),1)]),_:2},1032,["value"]))),128))]),_:1})]),_:1},8,["modelValue"]),ce("div",aF,[q(f(X$),{modelValue:f(d),"onUpdate:modelValue":A[1]||(A[1]=R=>$e(d)?d.value=R:null)},{default:E(()=>[q(f(rF),{class:"w-60 !h-11 rounded-full"},{default:E(()=>[q(f(sF),{placeholder:"Version",class:"font-bold truncate text-base"})]),_:1}),q(f(J$),null,{default:E(()=>[q(f(Z$),null,{default:E(()=>[(C(!0),ie(Ie,null,wt(f(p),R=>(C(),B(f(tF),{key:R.id,value:R.value},{default:E(()=>[rt(Ne(R.label),1)]),_:2},1032,["value"]))),128))]),_:1})]),_:1})]),_:1},8,["modelValue"]),(C(),B(P,{key:f(i),"default-label":f(i),data:a(f(i)),onChange:v,"selection-mode":"multiple",placement:"start"},null,8,["default-label","data"])),f(i)==="Flows"?(C(),B(f(ap),{key:0,title:"确定要创建新的Flow吗？",description:"这将创建一个新的App的Flow版本。",onConfirm:O},{default:E(()=>[q(f(vn),{disabled:f(_).isPending.value,class:"flex items-center gap-2 cursor-pointer"},{default:E(()=>[q(w,{icon:f(_).isPending.value?"eos-icons:loading":"ep:plus",class:"text-sm"},null,8,["icon"]),A[3]||(A[3]=ce("span",null,"Create New Flow",-1))]),_:1,__:[3]},8,["disabled"])]),_:1})):Be("",!0)]),f(c)?(C(),ie("div",lF,"Loading...")):f(i)==="Screens"||f(i)==="UI Elements"||f(i)==="Marketing Pages"?(C(),ie("div",{key:2,class:qe(["grid gap-x-5 gap-y-12 flex-1",f(r)==="web"?"grid-cols-[repeat(auto-fill,minmax(min(100%,500px),1fr))]":"grid-cols-[repeat(auto-fill,minmax(min(100%,230px),1fr))]"])},[(C(!0),ie(Ie,null,wt(f(b),(R,G)=>(C(),B(k,{key:G,id:R.id,src:R.screenUrl,platform:f(r)},null,8,["id","src","platform"]))),128))],2)):Be("",!0),f(i)==="Flows"&&f(m)?(C(),B($,{key:3,modelValue:f(m).appSections,"onUpdate:modelValue":A[2]||(A[2]=R=>f(m).appSections=R),platform:f(r),"app-info-id":f(m).id},null,8,["modelValue","platform","app-info-id"])):Be("",!0)])}}}),cF=Lu(uF,[["__scopeId","data-v-282accd6"]]);function dF(e){return Object.prototype.toString.call(e)==="[object Object]"}function sg(e){return dF(e)||Array.isArray(e)}function fF(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function fp(e,t){const n=Object.keys(e),o=Object.keys(t);if(n.length!==o.length)return!1;const r=JSON.stringify(Object.keys(e.breakpoints||{})),s=JSON.stringify(Object.keys(t.breakpoints||{}));return r!==s?!1:n.every(i=>{const a=e[i],l=t[i];return typeof a=="function"?`${a}`==`${l}`:!sg(a)||!sg(l)?a===l:fp(a,l)})}function ig(e){return e.concat().sort((t,n)=>t.name>n.name?1:-1).map(t=>t.options)}function pF(e,t){if(e.length!==t.length)return!1;const n=ig(e),o=ig(t);return n.every((r,s)=>{const i=o[s];return fp(r,i)})}function pp(e){return typeof e=="number"}function ef(e){return typeof e=="string"}function Nu(e){return typeof e=="boolean"}function ag(e){return Object.prototype.toString.call(e)==="[object Object]"}function _t(e){return Math.abs(e)}function hp(e){return Math.sign(e)}function Vi(e,t){return _t(e-t)}function hF(e,t){if(e===0||t===0||_t(e)<=_t(t))return 0;const n=Vi(_t(e),_t(t));return _t(n/e)}function mF(e){return Math.round(e*100)/100}function ia(e){return aa(e).map(Number)}function jn(e){return e[Ia(e)]}function Ia(e){return Math.max(0,e.length-1)}function mp(e,t){return t===Ia(e)}function lg(e,t=0){return Array.from(Array(e),(n,o)=>t+o)}function aa(e){return Object.keys(e)}function nw(e,t){return[e,t].reduce((n,o)=>(aa(o).forEach(r=>{const s=n[r],i=o[r],a=ag(s)&&ag(i);n[r]=a?nw(s,i):i}),n),{})}function tf(e,t){return typeof t.MouseEvent<"u"&&e instanceof t.MouseEvent}function gF(e,t){const n={start:o,center:r,end:s};function o(){return 0}function r(l){return s(l)/2}function s(l){return t-l}function i(l,u){return ef(e)?n[e](l):e(t,l,u)}return{measure:i}}function la(){let e=[];function t(r,s,i,a={passive:!0}){let l;if("addEventListener"in r)r.addEventListener(s,i,a),l=()=>r.removeEventListener(s,i,a);else{const u=r;u.addListener(i),l=()=>u.removeListener(i)}return e.push(l),o}function n(){e=e.filter(r=>r())}const o={add:t,clear:n};return o}function vF(e,t,n,o){const r=la(),s=1e3/60;let i=null,a=0,l=0;function u(){r.add(e,"visibilitychange",()=>{e.hidden&&m()})}function c(){h(),r.clear()}function d(v){if(!l)return;i||(i=v,n(),n());const y=v-i;for(i=v,a+=y;a>=s;)n(),a-=s;const b=a/s;o(b),l&&(l=t.requestAnimationFrame(d))}function p(){l||(l=t.requestAnimationFrame(d))}function h(){t.cancelAnimationFrame(l),i=null,a=0,l=0}function m(){i=null,a=0}return{init:u,destroy:c,start:p,stop:h,update:n,render:o}}function yF(e,t){const n=t==="rtl",o=e==="y",r=o?"y":"x",s=o?"x":"y",i=!o&&n?-1:1,a=c(),l=d();function u(m){const{height:g,width:v}=m;return o?g:v}function c(){return o?"top":n?"right":"left"}function d(){return o?"bottom":n?"left":"right"}function p(m){return m*i}return{scroll:r,cross:s,startEdge:a,endEdge:l,measureSize:u,direction:p}}function es(e=0,t=0){const n=_t(e-t);function o(u){return u<e}function r(u){return u>t}function s(u){return o(u)||r(u)}function i(u){return s(u)?o(u)?e:t:u}function a(u){return n?u-n*Math.ceil((u-t)/n):u}return{length:n,max:t,min:e,constrain:i,reachedAny:s,reachedMax:r,reachedMin:o,removeOffset:a}}function ow(e,t,n){const{constrain:o}=es(0,e),r=e+1;let s=i(t);function i(p){return n?_t((r+p)%r):o(p)}function a(){return s}function l(p){return s=i(p),d}function u(p){return c().set(a()+p)}function c(){return ow(e,a(),n)}const d={get:a,set:l,add:u,clone:c};return d}function bF(e,t,n,o,r,s,i,a,l,u,c,d,p,h,m,g,v,y,b){const{cross:_,direction:O}=e,T=["INPUT","SELECT","TEXTAREA"],A={passive:!1},D=la(),P=la(),w=es(50,225).constrain(h.measure(20)),k={mouse:300,touch:400},$={mouse:500,touch:600},R=m?43:25;let G=!1,J=0,ne=0,ae=!1,re=!1,L=!1,oe=!1;function Y(S){if(!b)return;function I(K){(Nu(b)||b(S,K))&&Se(K)}const j=t;D.add(j,"dragstart",K=>K.preventDefault(),A).add(j,"touchmove",()=>{},A).add(j,"touchend",()=>{}).add(j,"touchstart",I).add(j,"mousedown",I).add(j,"touchcancel",z).add(j,"contextmenu",z).add(j,"click",H,!0)}function ee(){D.clear(),P.clear()}function le(){const S=oe?n:t;P.add(S,"touchmove",x,A).add(S,"touchend",z).add(S,"mousemove",x,A).add(S,"mouseup",z)}function ye(S){const I=S.nodeName||"";return T.includes(I)}function me(){return(m?$:k)[oe?"mouse":"touch"]}function Pe(S,I){const j=d.add(hp(S)*-1),K=c.byDistance(S,!m).distance;return m||_t(S)<w?K:v&&I?K*.5:c.byIndex(j.get(),0).distance}function Se(S){const I=tf(S,o);oe=I,L=m&&I&&!S.buttons&&G,G=Vi(r.get(),i.get())>=2,!(I&&S.button!==0)&&(ye(S.target)||(ae=!0,s.pointerDown(S),u.useFriction(0).useDuration(0),r.set(i),le(),J=s.readPoint(S),ne=s.readPoint(S,_),p.emit("pointerDown")))}function x(S){if(!tf(S,o)&&S.touches.length>=2)return z(S);const j=s.readPoint(S),K=s.readPoint(S,_),Z=Vi(j,J),Q=Vi(K,ne);if(!re&&!oe&&(!S.cancelable||(re=Z>Q,!re)))return z(S);const ue=s.pointerMove(S);Z>g&&(L=!0),u.useFriction(.3).useDuration(.75),a.start(),r.add(O(ue)),S.preventDefault()}function z(S){const j=c.byDistance(0,!1).index!==d.get(),K=s.pointerUp(S)*me(),Z=Pe(O(K),j),Q=hF(K,Z),ue=R-10*Q,fe=y+Q/50;re=!1,ae=!1,P.clear(),u.useDuration(ue).useFriction(fe),l.distance(Z,!m),oe=!1,p.emit("pointerUp")}function H(S){L&&(S.stopPropagation(),S.preventDefault(),L=!1)}function X(){return ae}return{init:Y,destroy:ee,pointerDown:X}}function _F(e,t){let o,r;function s(d){return d.timeStamp}function i(d,p){const m=`client${(p||e.scroll)==="x"?"X":"Y"}`;return(tf(d,t)?d:d.touches[0])[m]}function a(d){return o=d,r=d,i(d)}function l(d){const p=i(d)-i(r),h=s(d)-s(o)>170;return r=d,h&&(o=d),p}function u(d){if(!o||!r)return 0;const p=i(r)-i(o),h=s(d)-s(o),m=s(d)-s(r)>170,g=p/h;return h&&!m&&_t(g)>.1?g:0}return{pointerDown:a,pointerMove:l,pointerUp:u,readPoint:i}}function wF(){function e(n){const{offsetTop:o,offsetLeft:r,offsetWidth:s,offsetHeight:i}=n;return{top:o,right:r+s,bottom:o+i,left:r,width:s,height:i}}return{measure:e}}function SF(e){function t(o){return e*(o/100)}return{measure:t}}function CF(e,t,n,o,r,s,i){const a=[e].concat(o);let l,u,c=[],d=!1;function p(v){return r.measureSize(i.measure(v))}function h(v){if(!s)return;u=p(e),c=o.map(p);function y(b){for(const _ of b){if(d)return;const O=_.target===e,T=o.indexOf(_.target),A=O?u:c[T],D=p(O?e:o[T]);if(_t(D-A)>=.5){v.reInit(),t.emit("resize");break}}}l=new ResizeObserver(b=>{(Nu(s)||s(v,b))&&y(b)}),n.requestAnimationFrame(()=>{a.forEach(b=>l.observe(b))})}function m(){d=!0,l&&l.disconnect()}return{init:h,destroy:m}}function xF(e,t,n,o,r,s){let i=0,a=0,l=r,u=s,c=e.get(),d=0;function p(){const A=o.get()-e.get(),D=!l;let P=0;return D?(i=0,n.set(o),e.set(o),P=A):(n.set(e),i+=A/l,i*=u,c+=i,e.add(i),P=c-d),a=hp(P),d=c,T}function h(){const A=o.get()-t.get();return _t(A)<.001}function m(){return l}function g(){return a}function v(){return i}function y(){return _(r)}function b(){return O(s)}function _(A){return l=A,T}function O(A){return u=A,T}const T={direction:g,duration:m,velocity:v,seek:p,settled:h,useBaseFriction:b,useBaseDuration:y,useFriction:O,useDuration:_};return T}function EF(e,t,n,o,r){const s=r.measure(10),i=r.measure(50),a=es(.1,.99);let l=!1;function u(){return!(l||!e.reachedAny(n.get())||!e.reachedAny(t.get()))}function c(h){if(!u())return;const m=e.reachedMin(t.get())?"min":"max",g=_t(e[m]-t.get()),v=n.get()-t.get(),y=a.constrain(g/i);n.subtract(v*y),!h&&_t(v)<s&&(n.set(e.constrain(n.get())),o.useDuration(25).useBaseFriction())}function d(h){l=!h}return{shouldConstrain:u,constrain:c,toggleActive:d}}function AF(e,t,n,o,r){const s=es(-t+e,0),i=d(),a=c(),l=p();function u(m,g){return Vi(m,g)<=1}function c(){const m=i[0],g=jn(i),v=i.lastIndexOf(m),y=i.indexOf(g)+1;return es(v,y)}function d(){return n.map((m,g)=>{const{min:v,max:y}=s,b=s.constrain(m),_=!g,O=mp(n,g);return _?y:O||u(v,b)?v:u(y,b)?y:b}).map(m=>parseFloat(m.toFixed(3)))}function p(){if(t<=e+r)return[s.max];if(o==="keepSnaps")return i;const{min:m,max:g}=a;return i.slice(m,g)}return{snapsContained:l,scrollContainLimit:a}}function OF(e,t,n){const o=t[0],r=n?o-e:jn(t);return{limit:es(r,o)}}function TF(e,t,n,o){const s=t.min+.1,i=t.max+.1,{reachedMin:a,reachedMax:l}=es(s,i);function u(p){return p===1?l(n.get()):p===-1?a(n.get()):!1}function c(p){if(!u(p))return;const h=e*(p*-1);o.forEach(m=>m.add(h))}return{loop:c}}function PF(e){const{max:t,length:n}=e;function o(s){const i=s-t;return n?i/-n:0}return{get:o}}function kF(e,t,n,o,r){const{startEdge:s,endEdge:i}=e,{groupSlides:a}=r,l=d().map(t.measure),u=p(),c=h();function d(){return a(o).map(g=>jn(g)[i]-g[0][s]).map(_t)}function p(){return o.map(g=>n[s]-g[s]).map(g=>-_t(g))}function h(){return a(u).map(g=>g[0]).map((g,v)=>g+l[v])}return{snaps:u,snapsAligned:c}}function IF(e,t,n,o,r,s){const{groupSlides:i}=r,{min:a,max:l}=o,u=c();function c(){const p=i(s),h=!e||t==="keepSnaps";return n.length===1?[s]:h?p:p.slice(a,l).map((m,g,v)=>{const y=!g,b=mp(v,g);if(y){const _=jn(v[0])+1;return lg(_)}if(b){const _=Ia(s)-jn(v)[0]+1;return lg(_,jn(v)[0])}return m})}return{slideRegistry:u}}function DF(e,t,n,o,r){const{reachedAny:s,removeOffset:i,constrain:a}=o;function l(m){return m.concat().sort((g,v)=>_t(g)-_t(v))[0]}function u(m){const g=e?i(m):a(m),v=t.map((b,_)=>({diff:c(b-g,0),index:_})).sort((b,_)=>_t(b.diff)-_t(_.diff)),{index:y}=v[0];return{index:y,distance:g}}function c(m,g){const v=[m,m+n,m-n];if(!e)return m;if(!g)return l(v);const y=v.filter(b=>hp(b)===g);return y.length?l(y):jn(v)-n}function d(m,g){const v=t[m]-r.get(),y=c(v,g);return{index:m,distance:y}}function p(m,g){const v=r.get()+m,{index:y,distance:b}=u(v),_=!e&&s(v);if(!g||_)return{index:y,distance:m};const O=t[y]-b,T=m+c(O,0);return{index:y,distance:T}}return{byDistance:p,byIndex:d,shortcut:c}}function RF(e,t,n,o,r,s,i){function a(d){const p=d.distance,h=d.index!==t.get();s.add(p),p&&(o.duration()?e.start():(e.update(),e.render(1),e.update())),h&&(n.set(t.get()),t.set(d.index),i.emit("select"))}function l(d,p){const h=r.byDistance(d,p);a(h)}function u(d,p){const h=t.clone().set(d),m=r.byIndex(h.get(),p);a(m)}return{distance:l,index:u}}function BF(e,t,n,o,r,s,i,a){const l={passive:!0,capture:!0};let u=0;function c(h){if(!a)return;function m(g){if(new Date().getTime()-u>10)return;i.emit("slideFocusStart"),e.scrollLeft=0;const b=n.findIndex(_=>_.includes(g));pp(b)&&(r.useDuration(0),o.index(b,0),i.emit("slideFocus"))}s.add(document,"keydown",d,!1),t.forEach((g,v)=>{s.add(g,"focus",y=>{(Nu(a)||a(h,y))&&m(v)},l)})}function d(h){h.code==="Tab"&&(u=new Date().getTime())}return{init:c}}function wi(e){let t=e;function n(){return t}function o(l){t=i(l)}function r(l){t+=i(l)}function s(l){t-=i(l)}function i(l){return pp(l)?l:l.get()}return{get:n,set:o,add:r,subtract:s}}function rw(e,t){const n=e.scroll==="x"?i:a,o=t.style;let r=null,s=!1;function i(p){return`translate3d(${p}px,0px,0px)`}function a(p){return`translate3d(0px,${p}px,0px)`}function l(p){if(s)return;const h=mF(e.direction(p));h!==r&&(o.transform=n(h),r=h)}function u(p){s=!p}function c(){s||(o.transform="",t.getAttribute("style")||t.removeAttribute("style"))}return{clear:c,to:l,toggleActive:u}}function MF(e,t,n,o,r,s,i,a,l){const c=ia(r),d=ia(r).reverse(),p=y().concat(b());function h(D,P){return D.reduce((w,k)=>w-r[k],P)}function m(D,P){return D.reduce((w,k)=>h(w,P)>0?w.concat([k]):w,[])}function g(D){return s.map((P,w)=>({start:P-o[w]+.5+D,end:P+t-.5+D}))}function v(D,P,w){const k=g(P);return D.map($=>{const R=w?0:-n,G=w?n:0,J=w?"end":"start",ne=k[$][J];return{index:$,loopPoint:ne,slideLocation:wi(-1),translate:rw(e,l[$]),target:()=>a.get()>ne?R:G}})}function y(){const D=i[0],P=m(d,D);return v(P,n,!1)}function b(){const D=t-i[0]-1,P=m(c,D);return v(P,-n,!0)}function _(){return p.every(({index:D})=>{const P=c.filter(w=>w!==D);return h(P,t)<=.1})}function O(){p.forEach(D=>{const{target:P,translate:w,slideLocation:k}=D,$=P();$!==k.get()&&(w.to($),k.set($))})}function T(){p.forEach(D=>D.translate.clear())}return{canLoop:_,clear:T,loop:O,loopPoints:p}}function qF(e,t,n){let o,r=!1;function s(l){if(!n)return;function u(c){for(const d of c)if(d.type==="childList"){l.reInit(),t.emit("slidesChanged");break}}o=new MutationObserver(c=>{r||(Nu(n)||n(l,c))&&u(c)}),o.observe(e,{childList:!0})}function i(){o&&o.disconnect(),r=!0}return{init:s,destroy:i}}function $F(e,t,n,o){const r={};let s=null,i=null,a,l=!1;function u(){a=new IntersectionObserver(m=>{l||(m.forEach(g=>{const v=t.indexOf(g.target);r[v]=g}),s=null,i=null,n.emit("slidesInView"))},{root:e.parentElement,threshold:o}),t.forEach(m=>a.observe(m))}function c(){a&&a.disconnect(),l=!0}function d(m){return aa(r).reduce((g,v)=>{const y=parseInt(v),{isIntersecting:b}=r[y];return(m&&b||!m&&!b)&&g.push(y),g},[])}function p(m=!0){if(m&&s)return s;if(!m&&i)return i;const g=d(m);return m&&(s=g),m||(i=g),g}return{init:u,destroy:c,get:p}}function FF(e,t,n,o,r,s){const{measureSize:i,startEdge:a,endEdge:l}=e,u=n[0]&&r,c=m(),d=g(),p=n.map(i),h=v();function m(){if(!u)return 0;const b=n[0];return _t(t[a]-b[a])}function g(){if(!u)return 0;const b=s.getComputedStyle(jn(o));return parseFloat(b.getPropertyValue(`margin-${l}`))}function v(){return n.map((b,_,O)=>{const T=!_,A=mp(O,_);return T?p[_]+c:A?p[_]+d:O[_+1][a]-b[a]}).map(_t)}return{slideSizes:p,slideSizesWithGaps:h,startGap:c,endGap:d}}function LF(e,t,n,o,r,s,i,a,l){const{startEdge:u,endEdge:c,direction:d}=e,p=pp(n);function h(y,b){return ia(y).filter(_=>_%b===0).map(_=>y.slice(_,_+b))}function m(y){return y.length?ia(y).reduce((b,_,O)=>{const T=jn(b)||0,A=T===0,D=_===Ia(y),P=r[u]-s[T][u],w=r[u]-s[_][c],k=!o&&A?d(i):0,$=!o&&D?d(a):0,R=_t(w-$-(P+k));return O&&R>t+l&&b.push(_),D&&b.push(y.length),b},[]).map((b,_,O)=>{const T=Math.max(O[_-1]||0);return y.slice(T,b)}):[]}function g(y){return p?h(y,n):m(y)}return{groupSlides:g}}function NF(e,t,n,o,r,s,i){const{align:a,axis:l,direction:u,startIndex:c,loop:d,duration:p,dragFree:h,dragThreshold:m,inViewThreshold:g,slidesToScroll:v,skipSnaps:y,containScroll:b,watchResize:_,watchSlides:O,watchDrag:T,watchFocus:A}=s,D=2,P=wF(),w=P.measure(t),k=n.map(P.measure),$=yF(l,u),R=$.measureSize(w),G=SF(R),J=gF(a,R),ne=!d&&!!b,ae=d||!!b,{slideSizes:re,slideSizesWithGaps:L,startGap:oe,endGap:Y}=FF($,w,k,n,ae,r),ee=LF($,R,v,d,w,k,oe,Y,D),{snaps:le,snapsAligned:ye}=kF($,J,w,k,ee),me=-jn(le)+jn(L),{snapsContained:Pe,scrollContainLimit:Se}=AF(R,me,ye,b,D),x=ne?Pe:ye,{limit:z}=OF(me,x,d),H=ow(Ia(x),c,d),X=H.clone(),pe=ia(n),S=({dragHandler:mt,scrollBody:$t,scrollBounds:Ft,options:{loop:yn}})=>{yn||Ft.constrain(mt.pointerDown()),$t.seek()},I=({scrollBody:mt,translate:$t,location:Ft,offsetLocation:yn,previousLocation:Cr,scrollLooper:Bt,slideLooper:Lt,dragHandler:Qn,animation:Yn,eventHandler:vp,scrollBounds:iw,options:{loop:yp}},bp)=>{const _p=mt.settled(),aw=!iw.shouldConstrain(),wp=yp?_p:_p&&aw,Sp=wp&&!Qn.pointerDown();Sp&&Yn.stop();const lw=Ft.get()*bp+Cr.get()*(1-bp);yn.set(lw),yp&&(Bt.loop(mt.direction()),Lt.loop()),$t.to(yn.get()),Sp&&vp.emit("settle"),wp||vp.emit("scroll")},j=vF(o,r,()=>S(At),mt=>I(At,mt)),K=.68,Z=x[H.get()],Q=wi(Z),ue=wi(Z),fe=wi(Z),de=wi(Z),se=xF(Q,fe,ue,de,p,K),xe=DF(d,x,me,z,de),ge=RF(j,H,X,se,xe,de,i),Ee=PF(z),ke=la(),He=$F(t,n,i,g),{slideRegistry:tt}=IF(ne,b,x,Se,ee,pe),Ye=BF(e,n,tt,ge,se,ke,i,A),At={ownerDocument:o,ownerWindow:r,eventHandler:i,containerRect:w,slideRects:k,animation:j,axis:$,dragHandler:bF($,e,o,r,de,_F($,r),Q,j,ge,se,xe,H,i,G,h,m,y,K,T),eventStore:ke,percentOfView:G,index:H,indexPrevious:X,limit:z,location:Q,offsetLocation:fe,previousLocation:ue,options:s,resizeHandler:CF(t,i,r,n,$,_,P),scrollBody:se,scrollBounds:EF(z,fe,de,se,G),scrollLooper:TF(me,z,fe,[Q,fe,ue,de]),scrollProgress:Ee,scrollSnapList:x.map(Ee.get),scrollSnaps:x,scrollTarget:xe,scrollTo:ge,slideLooper:MF($,R,me,re,L,le,x,fe,n),slideFocus:Ye,slidesHandler:qF(t,i,O),slidesInView:He,slideIndexes:pe,slideRegistry:tt,slidesToScroll:ee,target:de,translate:rw($,t)};return At}function jF(){let e={},t;function n(u){t=u}function o(u){return e[u]||[]}function r(u){return o(u).forEach(c=>c(t,u)),l}function s(u,c){return e[u]=o(u).concat([c]),l}function i(u,c){return e[u]=o(u).filter(d=>d!==c),l}function a(){e={}}const l={init:n,emit:r,off:i,on:s,clear:a};return l}const VF={align:"center",axis:"x",container:null,slides:null,containScroll:"trimSnaps",direction:"ltr",slidesToScroll:1,inViewThreshold:0,breakpoints:{},dragFree:!1,dragThreshold:10,loop:!1,skipSnaps:!1,duration:25,startIndex:0,active:!0,watchDrag:!0,watchResize:!0,watchSlides:!0,watchFocus:!0};function UF(e){function t(s,i){return nw(s,i||{})}function n(s){const i=s.breakpoints||{},a=aa(i).filter(l=>e.matchMedia(l).matches).map(l=>i[l]).reduce((l,u)=>t(l,u),{});return t(s,a)}function o(s){return s.map(i=>aa(i.breakpoints||{})).reduce((i,a)=>i.concat(a),[]).map(e.matchMedia)}return{mergeOptions:t,optionsAtMedia:n,optionsMediaQueries:o}}function HF(e){let t=[];function n(s,i){return t=i.filter(({options:a})=>e.optionsAtMedia(a).active!==!1),t.forEach(a=>a.init(s,e)),i.reduce((a,l)=>Object.assign(a,{[l.name]:l}),{})}function o(){t=t.filter(s=>s.destroy())}return{init:n,destroy:o}}function Ul(e,t,n){const o=e.ownerDocument,r=o.defaultView,s=UF(r),i=HF(s),a=la(),l=jF(),{mergeOptions:u,optionsAtMedia:c,optionsMediaQueries:d}=s,{on:p,off:h,emit:m}=l,g=$;let v=!1,y,b=u(VF,Ul.globalOptions),_=u(b),O=[],T,A,D;function P(){const{container:pe,slides:S}=_;A=(ef(pe)?e.querySelector(pe):pe)||e.children[0];const j=ef(S)?A.querySelectorAll(S):S;D=[].slice.call(j||A.children)}function w(pe){const S=NF(e,A,D,o,r,pe,l);if(pe.loop&&!S.slideLooper.canLoop()){const I=Object.assign({},pe,{loop:!1});return w(I)}return S}function k(pe,S){v||(b=u(b,pe),_=c(b),O=S||O,P(),y=w(_),d([b,...O.map(({options:I})=>I)]).forEach(I=>a.add(I,"change",$)),_.active&&(y.translate.to(y.location.get()),y.animation.init(),y.slidesInView.init(),y.slideFocus.init(X),y.eventHandler.init(X),y.resizeHandler.init(X),y.slidesHandler.init(X),y.options.loop&&y.slideLooper.loop(),A.offsetParent&&D.length&&y.dragHandler.init(X),T=i.init(X,O)))}function $(pe,S){const I=ee();R(),k(u({startIndex:I},pe),S),l.emit("reInit")}function R(){y.dragHandler.destroy(),y.eventStore.clear(),y.translate.clear(),y.slideLooper.clear(),y.resizeHandler.destroy(),y.slidesHandler.destroy(),y.slidesInView.destroy(),y.animation.destroy(),i.destroy(),a.clear()}function G(){v||(v=!0,a.clear(),R(),l.emit("destroy"),l.clear())}function J(pe,S,I){!_.active||v||(y.scrollBody.useBaseFriction().useDuration(S===!0?0:_.duration),y.scrollTo.index(pe,I||0))}function ne(pe){const S=y.index.add(1).get();J(S,pe,-1)}function ae(pe){const S=y.index.add(-1).get();J(S,pe,1)}function re(){return y.index.add(1).get()!==ee()}function L(){return y.index.add(-1).get()!==ee()}function oe(){return y.scrollSnapList}function Y(){return y.scrollProgress.get(y.offsetLocation.get())}function ee(){return y.index.get()}function le(){return y.indexPrevious.get()}function ye(){return y.slidesInView.get()}function me(){return y.slidesInView.get(!1)}function Pe(){return T}function Se(){return y}function x(){return e}function z(){return A}function H(){return D}const X={canScrollNext:re,canScrollPrev:L,containerNode:z,internalEngine:Se,destroy:G,off:h,on:p,emit:m,plugins:Pe,previousScrollSnap:le,reInit:g,rootNode:x,scrollNext:ne,scrollPrev:ae,scrollProgress:Y,scrollSnapList:oe,scrollTo:J,selectedScrollSnap:ee,slideNodes:H,slidesInView:ye,slidesNotInView:me};return k(t,n),setTimeout(()=>l.emit("init"),0),X}Ul.globalOptions=void 0;function gp(e={},t=[]){const n=$e(e),o=$e(t);let r=n?e.value:e,s=o?t.value:t;const i=Cn(),a=Cn();function l(){a.value&&a.value.reInit(r,s)}return je(()=>{!fF()||!i.value||(Ul.globalOptions=gp.globalOptions,a.value=Ul(i.value,r,s))}),Ys(()=>{a.value&&a.value.destroy()}),n&&Ce(e,u=>{fp(r,u)||(r=u,l())}),o&&Ce(t,u=>{pF(s,u)||(s=u,l())}),[i,a]}gp.globalOptions=void 0;const[zF,KF]=bC(({opts:e,orientation:t,plugins:n},o)=>{const[r,s]=gp({...e,axis:t==="horizontal"?"x":"y"},n);function i(){var d;(d=s.value)==null||d.scrollPrev()}function a(){var d;(d=s.value)==null||d.scrollNext()}const l=N(!1),u=N(!1);function c(d){l.value=(d==null?void 0:d.canScrollNext())||!1,u.value=(d==null?void 0:d.canScrollPrev())||!1}return je(()=>{var d,p,h;s.value&&((d=s.value)==null||d.on("init",c),(p=s.value)==null||p.on("reInit",c),(h=s.value)==null||h.on("select",c),o("init-api",s.value))}),{carouselRef:r,carouselApi:s,canScrollPrev:u,canScrollNext:l,scrollPrev:i,scrollNext:a,orientation:t}});function ju(){const e=KF();if(!e)throw new Error("useCarousel must be used within a <Carousel />");return e}const WF=F({__name:"Carousel",props:{opts:{},plugins:{},orientation:{default:"horizontal"},class:{}},emits:["init-api"],setup(e,{expose:t,emit:n}){const o=e,r=n,{canScrollNext:s,canScrollPrev:i,carouselApi:a,carouselRef:l,orientation:u,scrollNext:c,scrollPrev:d}=zF(o,r);t({canScrollNext:s,canScrollPrev:i,carouselApi:a,carouselRef:l,orientation:u,scrollNext:c,scrollPrev:d});function p(h){const m=o.orientation==="vertical"?"ArrowUp":"ArrowLeft",g=o.orientation==="vertical"?"ArrowDown":"ArrowRight";if(h.key===m){h.preventDefault(),d();return}h.key===g&&(h.preventDefault(),c())}return(h,m)=>(C(),ie("div",{"data-slot":"carousel",class:qe(f(Fe)("relative",o.class)),role:"region","aria-roledescription":"carousel",tabindex:"0",onKeydown:p},[V(h.$slots,"default",{canScrollNext:f(s),canScrollPrev:f(i),carouselApi:f(a),carouselRef:f(l),orientation:f(u),scrollNext:f(c),scrollPrev:f(d)})],34))}}),GF=F({__name:"CarouselNext",props:{variant:{default:"outline"},size:{default:"icon"},class:{}},setup(e){const t=e,{orientation:n,canScrollNext:o,scrollNext:r}=ju();return(s,i)=>(C(),B(f(vn),{"data-slot":"carousel-next",disabled:!f(o),class:qe(f(Fe)("absolute size-8 rounded-full",f(n)==="horizontal"?"top-1/2 -right-12 -translate-y-1/2":"-bottom-12 left-1/2 -translate-x-1/2 rotate-90",t.class)),variant:s.variant,size:s.size,onClick:f(r)},{default:E(()=>[V(s.$slots,"default",{},()=>[q(f(Ok)),i[0]||(i[0]=ce("span",{class:"sr-only"},"Next Slide",-1))])]),_:3},8,["disabled","class","variant","size","onClick"]))}}),QF=F({__name:"CarouselPrevious",props:{variant:{default:"outline"},size:{default:"icon"},class:{}},setup(e){const t=e,{orientation:n,canScrollPrev:o,scrollPrev:r}=ju();return(s,i)=>(C(),B(f(vn),{"data-slot":"carousel-previous",disabled:!f(o),class:qe(f(Fe)("absolute size-8 rounded-full",f(n)==="horizontal"?"top-1/2 -left-12 -translate-y-1/2":"-top-12 left-1/2 -translate-x-1/2 rotate-90",t.class)),variant:s.variant,size:s.size,onClick:f(r)},{default:E(()=>[V(s.$slots,"default",{},()=>[q(f(Ak)),i[0]||(i[0]=ce("span",{class:"sr-only"},"Previous Slide",-1))])]),_:3},8,["disabled","class","variant","size","onClick"]))}}),YF=F({inheritAttrs:!1,__name:"CarouselContent",props:{class:{}},setup(e){const t=e,{carouselRef:n,orientation:o}=ju();return(r,s)=>(C(),ie("div",{ref_key:"carouselRef",ref:n,"data-slot":"carousel-content",class:"overflow-hidden h-full"},[ce("div",te({class:f(Fe)("flex",f(o)==="horizontal"?"-ml-4 h-full":"-mt-4 flex-col",t.class)},r.$attrs),[V(r.$slots,"default")],16)],512))}}),XF=F({__name:"CarouselItem",props:{class:{}},setup(e){const t=e,{orientation:n}=ju();return(o,r)=>(C(),ie("div",{"data-slot":"carousel-item",role:"group","aria-roledescription":"slide",class:qe(f(Fe)("min-w-0 shrink-0 grow-0 basis-full",f(n)==="horizontal"?"pl-4":"pt-4",t.class))},[V(o.$slots,"default")],2))}}),JF=F({__name:"AspectRatio",props:{ratio:{},asChild:{type:Boolean},as:{}},setup(e){const t=e;return(n,o)=>(C(),B(f(M1),te({"data-slot":"aspect-ratio"},t),{default:E(()=>[V(n.$slots,"default")]),_:3},16))}}),ZF={class:"relative flex flex-col gap-4 cursor-pointer group"},eL=F({__name:"AppCard",props:Un({name:{},description:{},logo:{},videoUrl:{},previewScreens:{},platform:{},isFavorite:{type:Boolean}},{isFavorite:{type:Boolean,default:!1},isFavoriteModifiers:{}}),emits:Un(["click","toggle-favorite"],["update:isFavorite"]),setup(e,{emit:t}){const n=ts(e,"isFavorite"),o=t,r=U(()=>e.platform==="web"),s={video:"video",image:ri},i=U(()=>r.value?16/10:393/892),a=U(()=>e.videoUrl?[{type:"video",id:"video",props:{src:e.videoUrl,muted:!0,autoplay:!0,loop:!0,playsinline:!0,class:"object-contain"}}]:(e.previewScreens||[]).map(c=>({type:"image",id:c.id,props:{src:c.screenUrl,fit:"contain",class:"object-contain"}}))),l=()=>{o("click")},u=()=>{n.value=!n.value,o("toggle-favorite")};return(c,d)=>{const p=XF,h=YF,m=QF,g=GF,v=WF,y=Yf;return C(),ie("div",ZF,[ce("div",{class:qe(["w-full overflow-hidden bg-[#f0f0f0] rounded-4xl flex items-center justify-center hover:bg-[#f4f4f4] transition-colors duration-300",f(r)?"aspect-[1/1]":"aspect-[7/10]"])},[q(v,{class:qe(["relative w-full h-full max-w-xs",f(r)?"h-[51%]":"h-[85%]"])},{default:E(()=>[q(h,{class:"rounded-2xl",onClick:l},{default:E(()=>[(C(!0),ie(Ie,null,wt(f(a),(b,_)=>(C(),B(p,{key:b.id||_,class:"flex items-center justify-center w-full h-full"},{default:E(()=>[q(f(JF),{ratio:f(i)},{default:E(()=>[(C(),B(ro(s[b.type]),te({ref_for:!0},b.props,{class:["w-full h-full object-contain",f(r)?"rounded-xs":"rounded-2xl"]}),null,16,["class"]))]),_:2},1032,["ratio"])]),_:2},1024))),128))]),_:1}),q(m),q(g)]),_:1},8,["class"])],2),ce("div",{class:"absolute top-2 right-2 z-10 p-2 rounded-full bg-white/50 backdrop-blur-sm opacity-0 group-hover:opacity-100 transition-opacity",onClick:Ze(u,["stop"])},[q(f(Ik),{class:qe(["w-5 h-5 text-yellow-400",n.value?"fill-yellow-400":"fill-none"])},null,8,["class"])]),q(y,{logo:c.logo,name:c.name,description:c.description},null,8,["logo","name","description"])])}}}),tL=Lu(eL,[["__scopeId","data-v-49595ce3"]]),nL={class:"relative w-full overflow-hidden flex items-center"},oL={class:"flex w-max space-x-2"},rL=F({__name:"Filter",props:{platformType:{},type:{}},emits:["change"],setup(e,{expose:t,emit:n}){const o=N(null),r=N(null),{arrivedState:s}=FC(r,{throttle:50}),{left:i,right:a}=dt(s);je(()=>{var v;if(o.value){const y=(v=o.value.$el)==null?void 0:v.querySelector("[data-reka-scroll-area-viewport]");y?r.value=y:console.error("无法找到 ScrollArea 的 viewport 元素。")}});const l=v=>{if(r.value){const y=r.value.offsetWidth*.8;r.value.scrollBy({left:v==="left"?-y:y,behavior:"smooth"})}},u=n,{definitions:c}=va($u()),d=N(),p=U(()=>{var O,T;const y=(O=(e.platformType==="web"?ql:Ks).find(A=>A.label===e.type))==null?void 0:O.value,b=c==null?void 0:c.value.find(A=>A.platformType===e.platformType&&A.slug===y);return(((T=b==null?void 0:b.children)==null?void 0:T.map(A=>A.children).flat())||[]).map(A=>A?{id:typeof A.id=="number"?String(A.id):A.id||"",label:A.label||"",definition:A.definition||"",exampleScreens:Array.isArray(A.exampleScreens)?A.exampleScreens:[]}:null).filter(Boolean)}),h=v=>{d.value=d.value===v?void 0:v},m=v=>{const y=p.value.find(b=>b.id===v);u("change",y)},g=()=>{d.value=void 0};return Ce(d,v=>{m(v)},{immediate:!0}),t({reset:g}),(v,y)=>{const b=Ho;return C(),ie("div",nL,[Fs(q(f(vn),{variant:"outline",class:"absolute left-0 top-1/2 -translate-y-1/2 w-10 rounded-full z-10 bg-background transition-opacity cursor-pointer",onClick:y[0]||(y[0]=_=>l("left"))},{default:E(()=>[q(b,{icon:"lucide:chevron-left",class:"h-4 w-4"})]),_:1},512),[[Yi,!f(i)]]),q(f(lp),{ref_key:"scrollAreaRef",ref:o,class:"flex-1 overflow-auto whitespace-nowrap rounded-md"},{default:E(()=>[ce("div",oL,[(C(!0),ie(Ie,null,wt(p.value,_=>(C(),B(f(vn),{class:"rounded-full cursor-pointer",key:_.id,variant:d.value===_.id?"default":"outline",onClick:O=>h(_.id)},{default:E(()=>[rt(Ne(_.label),1)]),_:2},1032,["variant","onClick"]))),128))])]),_:1},512),Fs(q(f(vn),{variant:"outline",class:"absolute right-0 top-1/2 -translate-y-1/2 w-10 rounded-full z-10 p-0 bg-background transition-opacity cursor-pointer",onClick:y[1]||(y[1]=_=>l("right"))},{default:E(()=>[q(b,{icon:"lucide:chevron-right",class:"h-4 w-4"})]),_:1},512),[[Yi,!f(a)]])])}}}),sL=(e,t=null,n=0)=>{const o=()=>{const r=t==null?void 0:t.value;r?r.scrollHeight-r.scrollTop-r.clientHeight<=n&&e():document.documentElement.scrollHeight-document.documentElement.scrollTop-window.innerHeight<=n&&e()};je(()=>{const r=t==null?void 0:t.value;r?r.addEventListener("scroll",o):window.addEventListener("scroll",o)}),Rt(()=>{const r=t==null?void 0:t.value;r?r.removeEventListener("scroll",o):window.removeEventListener("scroll",o)})},iL={class:"flex flex-col gap-5 py-8"},aL={class:"flex-1 min-w-0 flex flex-col gap-y-5"},lL={class:"flex items-center"},uL={key:0,class:"flex items-center gap-x-2 ml-auto"},cL={key:2,class:"flex flex-col gap-5"},dL={class:"flex gap-4 px-1 py-4"},fL={class:"flex justify-between group hover:cursor-pointer"},pL={class:"flex flex-col gap-2"},hL={class:"flex items-center gap-2 text-xl h-7 font-bold"},mL={class:"flex gap-2 opacity-0 group-hover:opacity-100 transition-all duration-100"},gL=F({__name:"HomeView",setup(e){var oe;const t=Ta(),n=ya(),o=Ii({mutationFn:Y=>A.value.find(le=>le.id===Y)?lq({appId:Y,type:1}):Promise.reject("App not found"),onSuccess:()=>{n.invalidateQueries({queryKey:["app",p,m]})}}),r=Y=>{console.log("Toggling favorite for app:",Y),o.mutate(Y)},s=kt(ep),i=U(()=>(s==null?void 0:s.value)==="web"),a=U(()=>i.value?"web":"mobile"),l=U(()=>a.value),u=$u(),{definitions:c}=va(u),d=U(()=>s?s.value==="web"?ql:Ks:[]),p=N(((oe=d.value[0])==null?void 0:oe.label)||""),h=N(null),m=N(),g=N(),v=N(),y=N(),b=N([]),_=(Y,ee)=>{if(typeof Y=="number")if(ee)b.value.push(Y);else{const le=b.value.indexOf(Y);le>-1&&b.value.splice(le,1)}},O=Y=>{if(!c.value||c.value.length===0)return[];const ee=c.value.find(le=>le.slug===Y&&le.platformType===l.value);return(ee==null?void 0:ee.children)||[]},T=U(()=>p.value||"Apps");Ce(()=>s==null?void 0:s.value,(Y,ee)=>{var ye;if(Y===ee)return;const le=p.value;if(le==="Marketing Pages"&&Y!=="web")p.value="Apps";else{const me=Y==="web"?ql:Ks;me.find(Se=>Se.label===le)||(p.value=((ye=me[0])==null?void 0:ye.label)||"")}ae(),g.value=void 0,v.value=void 0,y.value=void 0,G()},{immediate:!1});const A=U(()=>{var Y;return((Y=w.value)==null?void 0:Y.pages.flatMap(ee=>ee.list))??[]}),D=U(()=>{var Y;return((Y=w.value)==null?void 0:Y.pages.flatMap(ee=>ee.list))??[]}),P=Y=>{var ye;const ee=d.value.find(me=>me.label===p.value),le={platform:s==null?void 0:s.value,type:1,categoryType:ee==null?void 0:ee.categoryType,pageNo:Y,pageSize:20};return(ye=m.value)!=null&&ye.id&&(le.categoryId=m.value.id),le},{data:w,fetchNextPage:k,hasNextPage:$,isFetching:R,refetch:G}=mC({queryKey:["home",p,m],queryFn:async({pageParam:Y=1})=>{const ee=P(Y);return p.value==="Apps"?CB(ee):Y$(ee)},getNextPageParam:(Y,ee)=>{if(!Y)return;const le=Math.ceil(Y.total/20);if(ee.length<le)return ee.length+1},initialPageParam:1}),J=Y=>{m.value=Y},ne=()=>{ae(),g.value=void 0,v.value=void 0,y.value=void 0},ae=()=>{h.value&&h.value.reset(),m.value=void 0};sL(()=>{$.value&&!R.value&&k()});const L=Y=>{t.push({path:"/details",query:{id:Y.id,platform:Y.platform}})};return(Y,ee)=>{const le=rL,ye=tL,me=tw,Pe=ri;return C(),ie("div",iL,[ee[8]||(ee[8]=ce("h1",{class:"text-[44px] font-[600]"},"Discover",-1)),ce("div",aL,[ce("div",lL,[q(f(rp),{modelValue:f(p),"onUpdate:modelValue":[ee[0]||(ee[0]=Se=>$e(p)?p.value=Se:null),ne]},{default:E(()=>[q(f(sp),{class:"bg-transparent p-0"},{default:E(()=>[(C(!0),ie(Ie,null,wt(f(d),Se=>(C(),B(f(ip),{key:Se.label,value:Se.label,class:"!font-bold"},{default:E(()=>[rt(Ne(Se.label),1)]),_:2},1032,["value"]))),128))]),_:1})]),_:1},8,["modelValue"]),f(p)!=="Apps"?(C(),ie("div",uL,[q(f(gl),{data:O("appCategories"),"default-label":"Apps",onChange:ee[1]||(ee[1]=Se=>g.value=Se),"selection-mode":"single",placement:"end"},null,8,["data"]),f(p)!=="UI Elements"&&f(p)!=="Flows"?(C(),B(f(gl),{key:0,data:O("screenElements"),"default-label":"UI Elements",onChange:ee[2]||(ee[2]=Se=>v.value=Se),"selection-mode":"single",placement:"end"},null,8,["data"])):Be("",!0),f(p)!=="Screens"&&f(p)!=="Flows"?(C(),B(f(gl),{key:1,data:O("screenPatterns"),"default-label":"Screens",onChange:ee[3]||(ee[3]=Se=>y.value=Se),"selection-mode":"single",placement:"end"},null,8,["data"])):Be("",!0)])):Be("",!0)]),q(le,{"platform-type":f(a),type:f(T),onChange:J,ref_key:"filterRef",ref:h,class:"w-full"},null,8,["platform-type","type"]),f(p)==="Apps"?(C(),ie("div",{key:0,class:qe(["grid gap-x-4 gap-y-12",f(i)?"grid-cols-[repeat(auto-fill,minmax(min(100%,450px),1fr))]":"grid-cols-[repeat(auto-fill,minmax(min(100%,350px),1fr))]"])},[(C(!0),ie(Ie,null,wt(f(A),Se=>(C(),B(ye,{key:Se.id,id:Se.id,name:Se.name,description:Se.appTagline,logo:Se.appLogoUrl,"video-url":Se.previewVideoUrl??"","preview-screens":Se.previewScreens,onClick:x=>L(Se),platform:f(s),onToggleFavorite:()=>r(Se.id)},null,8,["id","name","description","logo","video-url","preview-screens","onClick","platform","onToggleFavorite"]))),128))],2)):["Screens","UI Elements"].includes(f(p))?(C(),ie("div",{key:1,class:qe(["grid gap-x-5 gap-y-12",f(i)?"grid-cols-[repeat(auto-fill,minmax(min(100%,500px),1fr))]":"grid-cols-[repeat(auto-fill,minmax(min(100%,230px),1fr))] auto-rows-max"])},[(C(!0),ie(Ie,null,wt(f(D),(Se,x)=>(C(),B(me,{key:x,id:Se.screenRespVO.id,src:Se.screenRespVO.screenUrl,name:Se.appRespVO.name,logo:Se.appRespVO.appLogoUrl,selected:f(b).includes(Se.screenRespVO.id),onSelect:_,platform:f(s)},null,8,["id","src","name","logo","selected","platform"]))),128))],2)):f(p)==="Flows"?(C(),ie("div",cL,[q(f(lp),{class:"w-full"},{default:E(()=>[ce("div",dL,[(C(!0),ie(Ie,null,wt(f(D),(Se,x)=>(C(),B(Pe,{key:x,src:Se.screenRespVO.screenUrl,class:qe(["shrink-0 object-cover",[f(i)?"aspect-[16/11] w-[595px] rounded-lg":"aspect-[393/892] w-[215px] rounded-3xl","transition-transform hover:scale-[1.02]"]])},null,8,["src","class"]))),128))])]),_:1}),ce("div",fL,[ce("div",pL,[ce("div",hL,[ee[4]||(ee[4]=ce("span",{class:"group-hover:underline underline-offset-8 transition-all duration-300"},"Onboarding",-1)),ee[5]||(ee[5]=ce("span",{class:"text-gray-500"},"in",-1)),q(Pe,{class:"h-full"}),ee[6]||(ee[6]=ce("span",{class:"group-hover:underline underline-offset-8 transition-all duration-300"},"MoonPay",-1))]),ee[7]||(ee[7]=ce("span",{class:"text-sm text-gray-500"}," 100+ screens ",-1))]),ce("div",mL,[q(f(vn),{text:"Save",class:"bg-black text-white hover:opacity-80"}),q(f(vn),{text:"Copy",class:"bg-[#E3E3E3] hover:opacity-80 text-black"})])])])):Be("",!0)])])}}}),sw=OM({history:nM("/"),routes:[{path:"/",name:"home",component:gL},{path:"/details",name:"details",component:cF},{path:"/apps",name:"apps",component:()=>mi(()=>import("./Apps-BRMcQyeI.js"),__vite__mapDeps([0,1,2,3,4,5,6]))},{path:"/auth",name:"auth",component:()=>mi(()=>import("./Auth-BJGZikMq.js"),__vite__mapDeps([7,3,4,1,8]))},{path:"/settings",name:"settings",component:()=>mi(()=>import("./Settings-CkK03M1s.js"),__vite__mapDeps([9,4]))},{path:"/favorites",name:"favorites",component:()=>mi(()=>import("./Favorites-C1kb4hNA.js"),__vite__mapDeps([10,5,1]))},{path:"/chat",name:"chat",component:()=>mi(()=>import("./Chat-CbyEIPNl.js"),__vite__mapDeps([11,2,12]))}]});sw.beforeEach((e,t,n)=>{const o=localStorage.getItem("accessToken"),{fetchUserInfo:r,userInfo:s}=D_(),i=["auth"];return o?(!s.id&&e.name!=="auth"&&r(),e.name==="auth"?n({name:"home"}):n()):i.includes(e.name)?n():n({name:"auth"})});const Vu=DS(YM);Vu.use(pC);Vu.use(MS());Vu.use(sw);Vu.mount("#app");export{Ii as $,By as A,mo as B,Uo as C,kf as D,Un as E,ts as F,ie as G,Fs as H,Ho as I,Pt as J,Ne as K,AS as L,et as M,ft as N,Fe as O,Ae as P,Kt as Q,Ry as R,qe as S,EL as T,$e as U,My as V,ce as W,rt as X,GL as Y,ya as Z,vn as _,In as a,df as a$,wk as a0,Bk as a1,$k as a2,qk as a3,ri as a4,wt as a5,Ie as a6,X$ as a7,ct as a8,yt as a9,un as aA,zg as aB,ut as aC,We as aD,Et as aE,Ys as aF,Nn as aG,bd as aH,zt as aI,Dk as aJ,xb as aK,lb as aL,yP as aM,bP as aN,ql as aO,Ks as aP,mC as aQ,sL as aR,rp as aS,sp as aT,ip as aU,u$ as aV,ep as aW,eN as aX,tN as aY,DM as aZ,tu as a_,rF as aa,sF as ab,J$ as ac,Z$ as ad,tF as ae,YL as af,QL as ag,hC as ah,xL as ai,ap as aj,jM as ak,Yf as al,Ta as am,EB as an,XL as ao,Lu as ap,bL as aq,JL as ar,ZL as as,Bi as at,Ht as au,je as av,Ge as aw,Qs as ax,kt as ay,ro as az,dt as b,U as c,F as d,ve as e,Pf as f,B as g,uu as h,C as i,E as j,Be as k,Ze as l,te as m,ns as n,Gs as o,lt as p,q,V as r,Cn as s,yL as t,f as u,Yr as v,Ce as w,N as x,js as y,qo as z};
DesignScreenshot/output/test_run/login_page.html:97:`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const o=new this(t);return n.forEach(r=>o.set(r)),o}static accessor(t){const o=(this[lm]=this[lm]={accessors:{}}).accessors,r=this.prototype;function s(i){const a=pi(i);o[a]||(sR(r,i),o[a]=!0)}return W.isArray(t)?t.forEach(s):s(t),this}};gn.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);W.reduceDescriptors(gn.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(o){this[n]=o}}});W.freezeMethods(gn);function vc(e,t){const n=this||Aa,o=t||n,r=gn.from(o.headers);let s=o.data;return W.forEach(e,function(a){s=a.call(n,s,r.normalize(),t?t.status:void 0)}),r.normalize(),s}function e_(e){return!!(e&&e.__CANCEL__)}function ii(e,t,n){Ve.call(this,e??"canceled",Ve.ERR_CANCELED,t,n),this.name="CanceledError"}W.inherits(ii,Ve,{__CANCEL__:!0});function t_(e,t,n){const o=n.config.validateStatus;!n.status||!o||o(n.status)?e(n):t(new Ve("Request failed with status code "+n.status,[Ve.ERR_BAD_REQUEST,Ve.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function iR(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function aR(e,t){e=e||10;const n=new Array(e),o=new Array(e);let r=0,s=0,i;return t=t!==void 0?t:1e3,function(l){const u=Date.now(),c=o[s];i||(i=u),n[r]=l,o[r]=u;let d=s,p=0;for(;d!==r;)p+=n[d++],d=d%e;if(r=(r+1)%e,r===s&&(s=(s+1)%e),u-i<t)return;const h=c&&u-c;return h?Math.round(p*1e3/h):void 0}}function lR(e,t){let n=0,o=1e3/t,r,s;const i=(u,c=Date.now())=>{n=c,r=null,s&&(clearTimeout(s),s=null),e(...u)};return[(...u)=>{const c=Date.now(),d=c-n;d>=o?i(u,c):(r=u,s||(s=setTimeout(()=>{s=null,i(r)},o-d)))},()=>r&&i(r)]}const Bl=(e,t,n=3)=>{let o=0;const r=aR(50,250);return lR(s=>{const i=s.loaded,a=s.lengthComputable?s.total:void 0,l=i-o,u=r(l),c=i<=a;o=i;const d={loaded:i,total:a,progress:a?i/a:void 0,bytes:l,rate:u||void 0,estimated:u&&a&&c?(a-i)/u:void 0,event:s,lengthComputable:a!=null,[t?"download":"upload"]:!0};e(d)},n)},um=(e,t)=>{const n=e!=null;return[o=>t[0]({lengthComputable:n,total:e,loaded:o}),t[1]]},cm=e=>(...t)=>W.asap(()=>e(...t)),uR=Jt.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,Jt.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(Jt.origin),Jt.navigator&&/(msie|trident)/i.test(Jt.navigator.userAgent)):()=>!0,cR=Jt.hasStandardBrowserEnv?{write(e,t,n,o,r,s){const i=[e+"="+encodeURIComponent(t)];W.isNumber(n)&&i.push("expires="+new Date(n).toGMTString()),W.isString(o)&&i.push("path="+o),W.isString(r)&&i.push("domain="+r),s===!0&&i.push("secure"),document.cookie=i.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function dR(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function fR(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function n_(e,t,n){let o=!dR(t);return e&&(o||n==!1)?fR(e,t):t}const dm=e=>e instanceof gn?{...e}:e;function Zr(e,t){t=t||{};const n={};function o(u,c,d,p){return W.isPlainObject(u)&&W.isPlainObject(c)?W.merge.call({caseless:p},u,c):W.isPlainObject(c)?W.merge({},c):W.isArray(c)?c.slice():c}function r(u,c,d,p){if(W.isUndefined(c)){if(!W.isUndefined(u))return o(void 0,u,d,p)}else return o(u,c,d,p)}function s(u,c){if(!W.isUndefined(c))return o(void 0,c)}function i(u,c){if(W.isUndefined(c)){if(!W.isUndefined(u))return o(void 0,u)}else return o(void 0,c)}function a(u,c,d){if(d in t)return o(u,c);if(d in e)return o(void 0,u)}const l={url:s,method:s,data:s,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,responseEncoding:i,validateStatus:a,headers:(u,c,d)=>r(dm(u),dm(c),d,!0)};return W.forEach(Object.keys({...e,...t}),function(c){const d=l[c]||r,p=d(e[c],t[c],c);W.isUndefined(p)&&d!==a||(n[c]=p)}),n}const o_=e=>{const t=Zr({},e);let{data:n,withXSRFToken:o,xsrfHeaderName:r,xsrfCookieName:s,headers:i,auth:a}=t;t.headers=i=gn.from(i),t.url=Xb(n_(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),a&&i.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):"")));let l;if(W.isFormData(n)){if(Jt.hasStandardBrowserEnv||Jt.hasStandardBrowserWebWorkerEnv)i.setContentType(void 0);else if((l=i.getContentType())!==!1){const[u,...c]=l?l.split(";").map(d=>d.trim()).filter(Boolean):[];i.setContentType([u||"multipart/form-data",...c].join("; "))}}if(Jt.hasStandardBrowserEnv&&(o&&W.isFunction(o)&&(o=o(t)),o||o!==!1&&uR(t.url))){const u=r&&s&&cR.read(s);u&&i.set(r,u)}return t},pR=typeof XMLHttpRequest<"u",hR=pR&&function(e){return new Promise(function(n,o){const r=o_(e);let s=r.data;const i=gn.from(r.headers).normalize();let{responseType:a,onUploadProgress:l,onDownloadProgress:u}=r,c,d,p,h,m;function g(){h&&h(),m&&m(),r.cancelToken&&r.cancelToken.unsubscribe(c),r.signal&&r.signal.removeEventListener("abort",c)}let v=new XMLHttpRequest;v.open(r.method.toUpperCase(),r.url,!0),v.timeout=r.timeout;function y(){if(!v)return;const _=gn.from("getAllResponseHeaders"in v&&v.getAllResponseHeaders()),T={data:!a||a==="text"||a==="json"?v.responseText:v.response,status:v.status,statusText:v.statusText,headers:_,config:e,request:v};t_(function(D){n(D),g()},function(D){o(D),g()},T),v=null}"onloadend"in v?v.onloadend=y:v.onreadystatechange=function(){!v||v.readyState!==4||v.status===0&&!(v.responseURL&&v.responseURL.indexOf("file:")===0)||setTimeout(y)},v.onabort=function(){v&&(o(new Ve("Request aborted",Ve.ECONNABORTED,e,v)),v=null)},v.onerror=function(){o(new Ve("Network Error",Ve.ERR_NETWORK,e,v)),v=null},v.ontimeout=function(){let O=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const T=r.transitional||Jb;r.timeoutErrorMessage&&(O=r.timeoutErrorMessage),o(new Ve(O,T.clarifyTimeoutError?Ve.ETIMEDOUT:Ve.ECONNABORTED,e,v)),v=null},s===void 0&&i.setContentType(null),"setRequestHeader"in v&&W.forEach(i.toJSON(),function(O,T){v.setRequestHeader(T,O)}),W.isUndefined(r.withCredentials)||(v.withCredentials=!!r.withCredentials),a&&a!=="json"&&(v.responseType=r.responseType),u&&([p,m]=Bl(u,!0),v.addEventListener("progress",p)),l&&v.upload&&([d,h]=Bl(l),v.upload.addEventListener("progress",d),v.upload.addEventListener("loadend",h)),(r.cancelToken||r.signal)&&(c=_=>{v&&(o(!_||_.type?new ii(null,e,v):_),v.abort(),v=null)},r.cancelToken&&r.cancelToken.subscribe(c),r.signal&&(r.signal.aborted?c():r.signal.addEventListener("abort",c)));const b=iR(r.url);if(b&&Jt.protocols.indexOf(b)===-1){o(new Ve("Unsupported protocol "+b+":",Ve.ERR_BAD_REQUEST,e));return}v.send(s||null)})},mR=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let o=new AbortController,r;const s=function(u){if(!r){r=!0,a();const c=u instanceof Error?u:this.reason;o.abort(c instanceof Ve?c:new ii(c instanceof Error?c.message:c))}};let i=t&&setTimeout(()=>{i=null,s(new Ve(`timeout ${t} of ms exceeded`,Ve.ETIMEDOUT))},t);const a=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach(u=>{u.unsubscribe?u.unsubscribe(s):u.removeEventListener("abort",s)}),e=null)};e.forEach(u=>u.addEventListener("abort",s));const{signal:l}=o;return l.unsubscribe=()=>W.asap(a),l}},gR=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let o=0,r;for(;o<n;)r=o+t,yield e.slice(o,r),o=r},vR=async function*(e,t){for await(const n of yR(e))yield*gR(n,t)},yR=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:n,value:o}=await t.read();if(n)break;yield o}}finally{await t.cancel()}},fm=(e,t,n,o)=>{const r=vR(e,t);let s=0,i,a=l=>{i||(i=!0,o&&o(l))};return new ReadableStream({async pull(l){try{const{done:u,value:c}=await r.next();if(u){a(),l.close();return}let d=c.byteLength;if(n){let p=s+=d;n(p)}l.enqueue(new Uint8Array(c))}catch(u){throw a(u),u}},cancel(l){return a(l),r.return()}},{highWaterMark:2})},Ru=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",r_=Ru&&typeof ReadableStream=="function",bR=Ru&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),s_=(e,...t)=>{try{return!!e(...t)}catch{return!1}},_R=r_&&s_(()=>{let e=!1;const t=new Request(Jt.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),pm=64*1024,jd=r_&&s_(()=>W.isReadableStream(new Response("").body)),Ml={stream:jd&&(e=>e.body)};Ru&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!Ml[t]&&(Ml[t]=W.isFunction(e[t])?n=>n[t]():(n,o)=>{throw new Ve(`Response type '${t}' is not supported`,Ve.ERR_NOT_SUPPORT,o)})})})(new Response);const wR=async e=>{if(e==null)return 0;if(W.isBlob(e))return e.size;if(W.isSpecCompliantForm(e))return(await new Request(Jt.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(W.isArrayBufferView(e)||W.isArrayBuffer(e))return e.byteLength;if(W.isURLSearchParams(e)&&(e=e+""),W.isString(e))return(await bR(e)).byteLength},SR=async(e,t)=>{const n=W.toFiniteNumber(e.getContentLength());return n??wR(t)},CR=Ru&&(async e=>{let{url:t,method:n,data:o,signal:r,cancelToken:s,timeout:i,onDownloadProgress:a,onUploadProgress:l,responseType:u,headers:c,withCredentials:d="same-origin",fetchOptions:p}=o_(e);u=u?(u+"").toLowerCase():"text";let h=mR([r,s&&s.toAbortSignal()],i),m;const g=h&&h.unsubscribe&&(()=>{h.unsubscribe()});let v;try{if(l&&_R&&n!=="get"&&n!=="head"&&(v=await SR(c,o))!==0){let T=new Request(t,{method:"POST",body:o,duplex:"half"}),A;if(W.isFormData(o)&&(A=T.headers.get("content-type"))&&c.setContentType(A),T.body){const[D,P]=um(v,Bl(cm(l)));o=fm(T.body,pm,D,P)}}W.isString(d)||(d=d?"include":"omit");const y="credentials"in Request.prototype;m=new Request(t,{...p,signal:h,method:n.toUpperCase(),headers:c.normalize().toJSON(),body:o,duplex:"half",credentials:y?d:void 0});let b=await fetch(m,p);const _=jd&&(u==="stream"||u==="response");if(jd&&(a||_&&g)){const T={};["status","statusText","headers"].forEach(w=>{T[w]=b[w]});const A=W.toFiniteNumber(b.headers.get("content-length")),[D,P]=a&&um(A,Bl(cm(a),!0))||[];b=new Response(fm(b.body,pm,D,()=>{P&&P(),g&&g()}),T)}u=u||"text";let O=await Ml[W.findKey(Ml,u)||"text"](b,e);return!_&&g&&g(),await new Promise((T,A)=>{t_(T,A,{data:O,headers:gn.from(b.headers),status:b.status,statusText:b.statusText,config:e,request:m})})}catch(y){throw g&&g(),y&&y.name==="TypeError"&&/Load failed|fetch/i.test(y.message)?Object.assign(new Ve("Network Error",Ve.ERR_NETWORK,e,m),{cause:y.cause||y}):Ve.from(y,y&&y.code,e,m)}}),Vd={http:FD,xhr:hR,fetch:CR};W.forEach(Vd,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const hm=e=>`- ${e}`,xR=e=>W.isFunction(e)||e===null||e===!1,i_={getAdapter:e=>{e=W.isArray(e)?e:[e];const{length:t}=e;let n,o;const r={};for(let s=0;s<t;s++){n=e[s];let i;if(o=n,!xR(n)&&(o=Vd[(i=String(n)).toLowerCase()],o===void 0))throw new Ve(`Unknown adapter '${i}'`);if(o)break;r[i||"#"+s]=o}if(!o){const s=Object.entries(r).map(([a,l])=>`adapter ${a} `+(l===!1?"is not supported by the environment":"is not available in the build"));let i=t?s.length>1?`since :
DesignScreenshot/output/test_run/login_page.html:100:`+s):o.stack=s}catch{}}throw o}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Zr(this.defaults,n);const{transitional:o,paramsSerializer:r,headers:s}=n;o!==void 0&&ul.assertOptions(o,{silentJSONParsing:Jn.transitional(Jn.boolean),forcedJSONParsing:Jn.transitional(Jn.boolean),clarifyTimeoutError:Jn.transitional(Jn.boolean)},!1),r!=null&&(W.isFunction(r)?n.paramsSerializer={serialize:r}:ul.assertOptions(r,{encode:Jn.function,serialize:Jn.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),ul.assertOptions(n,{baseUrl:Jn.spelling("baseURL"),withXsrfToken:Jn.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let i=s&&W.merge(s.common,s[n.method]);s&&W.forEach(["delete","get","head","post","put","patch","common"],m=>{delete s[m]}),n.headers=gn.concat(i,s);const a=[];let l=!0;this.interceptors.request.forEach(function(g){typeof g.runWhen=="function"&&g.runWhen(n)===!1||(l=l&&g.synchronous,a.unshift(g.fulfilled,g.rejected))});const u=[];this.interceptors.response.forEach(function(g){u.push(g.fulfilled,g.rejected)});let c,d=0,p;if(!l){const m=[mm.bind(this),void 0];for(m.unshift(...a),m.push(...u),p=m.length,c=Promise.resolve(n);d<p;)c=c.then(m[d++],m[d++]);return c}p=a.length;let h=n;for(d=0;d<p;){const m=a[d++],g=a[d++];try{h=m(h)}catch(v){g.call(this,v);break}}try{c=mm.call(this,h)}catch(m){return Promise.reject(m)}for(d=0,p=u.length;d<p;)c=c.then(u[d++],u[d++]);return c}getUri(t){t=Zr(this.defaults,t);const n=n_(t.baseURL,t.url,t.allowAbsoluteUrls);return Xb(n,t.params,t.paramsSerializer)}};W.forEach(["delete","get","head","options"],function(t){Wr.prototype[t]=function(n,o){return this.request(Zr(o||{},{method:t,url:n,data:(o||{}).data}))}});W.forEach(["post","put","patch"],function(t){function n(o){return function(s,i,a){return this.request(Zr(a||{},{method:t,headers:o?{"Content-Type":"multipart/form-data"}:{},url:s,data:i}))}}Wr.prototype[t]=n(),Wr.prototype[t+"Form"]=n(!0)});let AR=class l_{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(s){n=s});const o=this;this.promise.then(r=>{if(!o._listeners)return;let s=o._listeners.length;for(;s-- >0;)o._listeners[s](r);o._listeners=null}),this.promise.then=r=>{let s;const i=new Promise(a=>{o.subscribe(a),s=a}).then(r);return i.cancel=function(){o.unsubscribe(s)},i},t(function(s,i,a){o.reason||(o.reason=new ii(s,i,a),n(o.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=o=>{t.abort(o)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new l_(function(r){t=r}),cancel:t}}};function OR(e){return function(n){return e.apply(null,n)}}function TR(e){return W.isObject(e)&&e.isAxiosError===!0}const Ud={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Ud).forEach(([e,t])=>{Ud[t]=e});function u_(e){const t=new Wr(e),n=Lb(Wr.prototype.request,t);return W.extend(n,Wr.prototype,t,{allOwnKeys:!0}),W.extend(n,t,null,{allOwnKeys:!0}),n.create=function(r){return u_(Zr(e,r))},n}const xt=u_(Aa);xt.Axios=Wr;xt.CanceledError=ii;xt.CancelToken=AR;xt.isCancel=e_;xt.VERSION=a_;xt.toFormData=Du;xt.AxiosError=Ve;xt.Cancel=xt.CanceledError;xt.all=function(t){return Promise.all(t)};xt.spread=OR;xt.isAxiosError=TR;xt.mergeConfig=Zr;xt.AxiosHeaders=gn;xt.formToJSON=e=>Zb(W.isHTMLForm(e)?new FormData(e):e);xt.getAdapter=i_.getAdapter;xt.HttpStatusCode=Ud;xt.default=xt;const{Axios:DL,AxiosError:RL,CanceledError:BL,isCancel:ML,CancelToken:qL,VERSION:$L,all:FL,Cancel:LL,isAxiosError:NL,spread:jL,toFormData:VL,AxiosHeaders:UL,HttpStatusCode:HL,formToJSON:zL,getAdapter:KL,mergeConfig:WL}=xt;let Hd=1;var PR=class{constructor(){Mt(this,"subscribers");Mt(this,"toasts");Mt(this,"dismissedToasts");Mt(this,"subscribe",e=>(this.subscribers.push(e),()=>{const t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}));Mt(this,"publish",e=>{this.subscribers.forEach(t=>t(e))});Mt(this,"addToast",e=>{this.publish(e),this.toasts=[...this.toasts,e]});Mt(this,"create",e=>{var i;const{message:t,...n}=e,o=typeof e.id=="number"||e.id&&((i=e.id)==null?void 0:i.length)>0?e.id:Hd++,r=this.toasts.find(a=>a.id===o),s=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(o)&&this.dismissedToasts.delete(o),r?this.toasts=this.toasts.map(a=>a.id===o?(this.publish({...a,...e,id:o,title:t}),{...a,...e,id:o,dismissible:s,title:t}):a):this.addToast({title:t,...n,dismissible:s,id:o}),o});Mt(this,"dismiss",e=>(e?(this.dismissedToasts.add(e),requestAnimationFrame(()=>this.subscribers.forEach(t=>t({id:e,dismiss:!0})))):this.toasts.forEach(t=>{this.subscribers.forEach(n=>n({id:t.id,dismiss:!0}))}),e));Mt(this,"message",(e,t)=>this.create({...t,message:e,type:"default"}));Mt(this,"error",(e,t)=>this.create({...t,type:"error",message:e}));Mt(this,"success",(e,t)=>this.create({...t,type:"success",message:e}));Mt(this,"info",(e,t)=>this.create({...t,type:"info",message:e}));Mt(this,"warning",(e,t)=>this.create({...t,type:"warning",message:e}));Mt(this,"loading",(e,t)=>this.create({...t,type:"loading",message:e}));Mt(this,"promise",(e,t)=>{if(!t)return;let n;t.loading!==void 0&&(n=this.create({...t,promise:e,type:"loading",message:t.loading,description:typeof t.description!="function"?t.description:void 0}));const o=Promise.resolve(e instanceof Function?e():e);let r=n!==void 0,s;const i=o.then(async l=>{if(s=["resolve",l],so(l))r=!1,this.create({id:n,type:"default",message:l});else if(IR(l)&&!l.ok){r=!1;const c=typeof t.error=="function"?await t.error(`HTTP error! status: ${l.status}`):t.error,d=typeof t.description=="function"?await t.description(`HTTP error! status: ${l.status}`):t.description,h=typeof c=="object"&&!so(c)?c:{message:c||"",id:n||""};this.create({id:n,type:"error",description:d,...h})}else if(l instanceof Error){r=!1;const c=typeof t.error=="function"?await t.error(l):t.error,d=typeof t.description=="function"?await t.description(l):t.description,h=typeof c=="object"&&!so(c)?c:{message:c||"",id:n||""};this.create({id:n,type:"error",description:d,...h})}else if(t.success!==void 0){r=!1;const c=typeof t.success=="function"?await t.success(l):t.success,d=typeof t.description=="function"?await t.description(l):t.description,h=typeof c=="object"&&!so(c)?c:{message:c||"",id:n||""};this.create({id:n,type:"success",description:d,...h})}}).catch(async l=>{if(s=["reject",l],t.error!==void 0){r=!1;const u=typeof t.error=="function"?await t.error(l):t.error,c=typeof t.description=="function"?await t.description(l):t.description,p=typeof u=="object"&&!so(u)?u:{message:u||"",id:n||""};this.create({id:n,type:"error",description:c,...p})}}).finally(()=>{var l;r&&(this.dismiss(n),n=void 0),(l=t.finally)==null||l.call(t)}),a=()=>new Promise((l,u)=>i.then(()=>s[0]==="reject"?u(s[1]):l(s[1])).catch(u));return typeof n!="string"&&typeof n!="number"?{unwrap:a}:Object.assign(n,{unwrap:a})});Mt(this,"custom",(e,t)=>{const n=(t==null?void 0:t.id)||Hd++;return this.publish({component:e,id:n,...t}),n});Mt(this,"getActiveToasts",()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)));this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}};const hn=new PR;function kR(e,t){const n=(t==null?void 0:t.id)||Hd++;return hn.create({message:e,id:n,type:"default",...t}),n}const IR=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",DR=kR,RR=()=>hn.toasts,BR=()=>hn.getActiveToasts(),Bi=Object.assign(DR,{success:hn.success,info:hn.info,warning:hn.warning,error:hn.error,custom:hn.custom,message:hn.message,promise:hn.promise,dismiss:hn.dismiss,loading:hn.loading},{getHistory:RR,getToasts:BR});function Wa(e){return e.label!==void 0}const MR=3,c_="24px",d_="16px",vm=4e3,qR=356,$R=14,FR=45,f_=200;function LR(){const e=N(!1);return ut(()=>{const t=()=>{e.value=document.hidden};return document.addEventListener("visibilitychange",t),()=>window.removeEventListener("visibilitychange",t)}),{isDocumentHidden:e}}function Go(...e){return e.filter(Boolean).join(" ")}function NR(e){const[t,n]=e.split("-"),o=[];return t&&o.push(t),n&&o.push(n),o}function jR(e,t){const n={};return[e,t].forEach((o,r)=>{const s=r===1,i=s?"--mobile-offset":"--offset",a=s?d_:c_;function l(u){["top","right","bottom","left"].forEach(c=>{n[`${i}-${c}`]=typeof u=="number"?`${u}px`:u})}typeof o=="number"||typeof o=="string"?l(o):typeof o=="object"?["top","right","bottom","left"].forEach(u=>{o[u]===void 0?n[`${i}-${u}`]=a:n[`${i}-${u}`]=typeof o[u]=="number"?`${o[u]}px`:o[u]}):l(a)}),n}const VR=["data-rich-colors","data-styled","data-mounted","data-promise","data-swiped","data-removed","data-visible","data-y-position","data-x-position","data-index","data-front","data-swiping","data-dismissible","data-type","data-invert","data-swipe-out","data-swipe-direction","data-expanded"],UR=["aria-label","data-disabled"];var HR=F({__name:"Toast",props:{toast:{},toasts:{},index:{},swipeDirections:{},expanded:{type:Boolean},invert:{type:Boolean},heights:{},gap:{},position:{},visibleToasts:{},expandByDefault:{type:Boolean},closeButton:{type:Boolean},interacting:{type:Boolean},style:{},cancelButtonStyle:{},actionButtonStyle:{},duration:{},class:{},unstyled:{type:Boolean},descriptionClass:{},loadingIcon:{},classes:{},icons:{},closeButtonAriaLabel:{},defaultRichColors:{type:Boolean}},emits:["update:heights","update:height","removeToast"],setup(e,{emit:t}){const n=e,o=t,r=N(null),s=N(null),i=N(!1),a=N(!1),l=N(!1),u=N(!1),c=N(!1),d=N(0),p=N(0),h=N(n.toast.duration||n.duration||vm),m=N(null),g=N(null),v=U(()=>n.index===0),y=U(()=>n.index+1<=n.visibleToasts),b=U(()=>n.toast.type),_=U(()=>n.toast.dismissible!==!1),O=U(()=>n.toast.class||""),T=U(()=>n.descriptionClass||""),A=U(()=>{const x=n.toast.position||n.position,H=n.heights.filter(X=>X.position===x).findIndex(X=>X.toastId===n.toast.id);return H>=0?H:0}),D=U(()=>{const x=n.toast.position||n.position;return n.heights.filter(H=>H.position===x).reduce((H,X,pe)=>pe>=A.value?H:H+X.height,0)}),P=U(()=>A.value*n.gap+D.value||0),w=U(()=>n.toast.closeButton??n.closeButton),k=U(()=>n.toast.duration||n.duration||vm),$=N(0),R=N(0),G=N(null),J=U(()=>n.position.split("-")),ne=U(()=>J.value[0]),ae=U(()=>J.value[1]),re=U(()=>typeof n.toast.title!="string"),L=U(()=>typeof n.toast.description!="string"),{isDocumentHidden:oe}=LR(),Y=U(()=>b.value&&b.value==="loading");je(()=>{i.value=!0,h.value=k.value}),ut(async()=>{if(!i.value||!g.value)return;await We();const x=g.value,z=x.style.height;x.style.height="auto";const H=x.getBoundingClientRect().height;x.style.height=z,p.value=H,o("update:height",{toastId:n.toast.id,height:H,position:n.toast.position||n.position})});function ee(){a.value=!0,d.value=P.value,setTimeout(()=>{o("removeToast",n.toast)},f_)}function le(){var x,z;if(Y.value||!_.value)return{};ee(),(z=(x=n.toast).onDismiss)==null||z.call(x,n.toast)}function ye(x){Y.value||!_.value||(m.value=new Date,d.value=P.value,x.target.setPointerCapture(x.pointerId),x.target.tagName!=="BUTTON"&&(l.value=!0,G.value={x:x.clientX,y:x.clientY}))}function me(){var S,I,j,K,Z,Q,ue;if(u.value||!_.value)return;G.value=null;const x=Number(((S=g.value)==null?void 0:S.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),z=Number(((I=g.value)==null?void 0:I.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),H=new Date().getTime()-(((j=m.value)==null?void 0:j.getTime())||0),X=r.value==="x"?x:z,pe=Math.abs(X)/H;if(Math.abs(X)>=FR||pe>.11){d.value=P.value,(Z=(K=n.toast).onDismiss)==null||Z.call(K,n.toast),r.value==="x"?s.value=x>0?"right":"left":s.value=z>0?"down":"up",ee(),u.value=!0;return}else(Q=g.value)==null||Q.style.setProperty("--swipe-amount-x","0px"),(ue=g.value)==null||ue.style.setProperty("--swipe-amount-y","0px");c.value=!1,l.value=!1,r.value=null}function Pe(x){var j,K,Z,Q;if(!G.value||!_.value||(((K=(j=window==null?void 0:window.getSelection())==null?void 0:j.toString())==null?void 0:K.length)??!1))return;const H=x.clientY-G.value.y,X=x.clientX-G.value.x,pe=n.swipeDirections??NR(n.position);!r.value&&(Math.abs(X)>1||Math.abs(H)>1)&&(r.value=Math.abs(X)>Math.abs(H)?"x":"y");let S={x:0,y:0};const I=ue=>1/(1.5+Math.abs(ue)/20);if(r.value==="y"){if(pe.includes("top")||pe.includes("bottom"))if(pe.includes("top")&&H<0||pe.includes("bottom")&&H>0)S.y=H;else{const ue=H*I(H);S.y=Math.abs(ue)<Math.abs(H)?ue:H}}else if(r.value==="x"&&(pe.includes("left")||pe.includes("right")))if(pe.includes("left")&&X<0||pe.includes("right")&&X>0)S.x=X;else{const ue=X*I(X);S.x=Math.abs(ue)<Math.abs(X)?ue:X}(Math.abs(S.x)>0||Math.abs(S.y)>0)&&(c.value=!0),(Z=g.value)==null||Z.style.setProperty("--swipe-amount-x",`${S.x}px`),(Q=g.value)==null||Q.style.setProperty("--swipe-amount-y",`${S.y}px`)}je(()=>{if(i.value=!0,!g.value)return;const x=g.value.getBoundingClientRect().height;p.value=x;const z=[{toastId:n.toast.id,height:x,position:n.toast.position},...n.heights];o("update:heights",z)}),Ys(()=>{g.value&&o("removeToast",n.toast)}),ut(x=>{if(n.toast.promise&&b.value==="loading"||n.toast.duration===1/0||n.toast.type==="loading")return;let z;const H=()=>{if(R.value<$.value){const pe=new Date().getTime()-$.value;h.value=h.value-pe}R.value=new Date().getTime()},X=()=>{h.value!==1/0&&($.value=new Date().getTime(),z=setTimeout(()=>{var pe,S;(S=(pe=n.toast).onAutoClose)==null||S.call(pe,n.toast),ee()},h.value))};n.expanded||n.interacting||oe.value?H():X(),x(()=>{clearTimeout(z)})}),Ce(()=>n.toast.delete,x=>{x!==void 0&&x&&ee()},{deep:!0});function Se(){l.value=!1,r.value=null,G.value=null}return(x,z)=>{var H,X,pe,S,I,j,K,Z,Q,ue,fe,de,se,xe,ge,Ee,ke,He,tt,Ye,At,mt,$t,Ft,yn,Cr,Bt;return C(),ie("li",{tabindex:"0",ref_key:"toastRef",ref:g,class:qe(f(Go)(n.class,O.value,(H=x.classes)==null?void 0:H.toast,(X=x.toast.classes)==null?void 0:X.toast,(pe=x.classes)==null?void 0:pe[b.value],(I=(S=x.toast)==null?void 0:S.classes)==null?void 0:I[b.value])),"data-sonner-toast":"","data-rich-colors":x.toast.richColors??x.defaultRichColors,"data-styled":!(x.toast.component||(j=x.toast)!=null&&j.unstyled||x.unstyled),"data-mounted":i.value,"data-promise":!!x.toast.promise,"data-swiped":c.value,"data-removed":a.value,"data-visible":y.value,"data-y-position":ne.value,"data-x-position":ae.value,"data-index":x.index,"data-front":v.value,"data-swiping":l.value,"data-dismissible":_.value,"data-type":b.value,"data-invert":x.toast.invert||x.invert,"data-swipe-out":u.value,"data-swipe-direction":s.value,"data-expanded":!!(x.expanded||x.expandByDefault&&i.value),style:Pt({"--index":x.index,"--toasts-before":x.index,"--z-index":x.toasts.length-x.index,"--offset":`${a.value?d.value:P.value}px`,"--initial-height":x.expandByDefault?"auto":`${p.value}px`,...x.style,...n.toast.style}),onDragend:Se,onPointerdown:ye,onPointerup:me,onPointermove:Pe},[w.value&&!x.toast.component&&b.value!=="loading"?(C(),ie("button",{key:0,"aria-label":x.closeButtonAriaLabel||"Close toast","data-disabled":Y.value,"data-close-button":"true",class:qe(f(Go)((K=x.classes)==null?void 0:K.closeButton,(Q=(Z=x.toast)==null?void 0:Z.classes)==null?void 0:Q.closeButton)),onClick:le},[(ue=x.icons)!=null&&ue.close?(C(),B(ro((fe=x.icons)==null?void 0:fe.close),{key:0})):V(x.$slots,"close-icon",{key:1})],10,UR)):Be("v-if",!0),x.toast.component?(C(),B(ro(x.toast.component),te({key:1},x.toast.componentProps,{onCloseToast:le}),null,16)):(C(),ie(Ie,{key:2},[b.value!=="default"||x.toast.icon||x.toast.promise?(C(),ie("div",{key:0,"data-icon":"",class:qe(f(Go)((de=x.classes)==null?void 0:de.icon,(xe=(se=x.toast)==null?void 0:se.classes)==null?void 0:xe.icon))},[x.toast.icon?(C(),B(ro(x.toast.icon),{key:0})):(C(),ie(Ie,{key:1},[b.value==="loading"?V(x.$slots,"loading-icon",{key:0}):b.value==="success"?V(x.$slots,"success-icon",{key:1}):b.value==="error"?V(x.$slots,"error-icon",{key:2}):b.value==="warning"?V(x.$slots,"warning-icon",{key:3}):b.value==="info"?V(x.$slots,"info-icon",{key:4}):Be("v-if",!0)],64))],2)):Be("v-if",!0),ce("div",{"data-content":"",class:qe(f(Go)((ge=x.classes)==null?void 0:ge.content,(ke=(Ee=x.toast)==null?void 0:Ee.classes)==null?void 0:ke.content))},[ce("div",{"data-title":"",class:qe(f(Go)((He=x.classes)==null?void 0:He.title,(tt=x.toast.classes)==null?void 0:tt.title))},[re.value?(C(),B(ro(x.toast.title),ct(te({key:0},x.toast.componentProps)),null,16)):(C(),ie(Ie,{key:1},[rt(Ne(x.toast.title),1)],64))],2),x.toast.description?(C(),ie("div",{key:0,"data-description":"",class:qe(f(Go)(x.descriptionClass,T.value,(Ye=x.classes)==null?void 0:Ye.description,(At=x.toast.classes)==null?void 0:At.description))},[L.value?(C(),B(ro(x.toast.description),ct(te({key:0},x.toast.componentProps)),null,16)):(C(),ie(Ie,{key:1},[rt(Ne(x.toast.description),1)],64))],2)):Be("v-if",!0)],2),x.toast.cancel?(C(),ie("button",{key:1,style:Pt(x.toast.cancelButtonStyle||x.cancelButtonStyle),class:qe(f(Go)((mt=x.classes)==null?void 0:mt.cancelButton,($t=x.toast.classes)==null?void 0:$t.cancelButton)),"data-button":"","data-cancel":"",onClick:z[0]||(z[0]=Lt=>{var Qn,Yn;f(Wa)(x.toast.cancel)&&_.value&&((Yn=(Qn=x.toast.cancel).onClick)==null||Yn.call(Qn,Lt),ee())})},Ne(f(Wa)(x.toast.cancel)?(Ft=x.toast.cancel)==null?void 0:Ft.label:x.toast.cancel),7)):Be("v-if",!0),x.toast.action?(C(),ie("button",{key:2,style:Pt(x.toast.actionButtonStyle||x.actionButtonStyle),class:qe(f(Go)((yn=x.classes)==null?void 0:yn.actionButton,(Cr=x.toast.classes)==null?void 0:Cr.actionButton)),"data-button":"","data-action":"",onClick:z[1]||(z[1]=Lt=>{var Qn,Yn;f(Wa)(x.toast.action)&&((Yn=(Qn=x.toast.action).onClick)==null||Yn.call(Qn,Lt),!Lt.defaultPrevented&&ee())})},Ne(f(Wa)(x.toast.action)?(Bt=x.toast.action)==null?void 0:Bt.label:x.toast.action),7)):Be("v-if",!0)],64))],46,VR)}}}),zR=HR,Oa=(e,t)=>{const n=e.__vccOpts||e;for(const[o,r]of t)n[o]=r;return n};const KR={},WR={xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stoke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"};function GR(e,t){return C(),ie("svg",WR,t[0]||(t[0]=[ce("line",{x1:"18",y1:"6",x2:"6",y2:"18"},null,-1),ce("line",{x1:"6",y1:"6",x2:"18",y2:"18"},null,-1)]))}var QR=Oa(KR,[["render",GR]]);const YR=["data-visible"],XR={class:"sonner-spinner"};var JR=F({__name:"Loader",props:{visible:{type:Boolean}},setup(e){const t=Array(12).fill(0);return(n,o)=>(C(),ie("div",{class:"sonner-loading-wrapper","data-visible":n.visible},[ce("div",XR,[(C(!0),ie(Ie,null,wt(f(t),r=>(C(),ie("div",{key:`spinner-bar-${r}`,class:"sonner-loading-bar"}))),128))])],8,YR))}}),ZR=JR;const eB={},tB={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"};function nB(e,t){return C(),ie("svg",tB,t[0]||(t[0]=[ce("path",{"fill-rule":"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z","clip-rule":"evenodd"},null,-1)]))}var oB=Oa(eB,[["render",nB]]);const rB={},sB={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"};function iB(e,t){return C(),ie("svg",sB,t[0]||(t[0]=[ce("path",{"fill-rule":"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z","clip-rule":"evenodd"},null,-1)]))}var aB=Oa(rB,[["render",iB]]);const lB={},uB={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"};function cB(e,t){return C(),ie("svg",uB,t[0]||(t[0]=[ce("path",{"fill-rule":"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z","clip-rule":"evenodd"},null,-1)]))}var dB=Oa(lB,[["render",cB]]);const fB={},pB={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"};function hB(e,t){return C(),ie("svg",pB,t[0]||(t[0]=[ce("path",{"fill-rule":"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z","clip-rule":"evenodd"},null,-1)]))}var mB=Oa(fB,[["render",hB]]);const gB=["aria-label"],vB=["data-sonner-theme","dir","data-theme","data-rich-colors","data-y-position","data-x-position","data-lifted"],yB=typeof window<"u"&&typeof document<"u";function bB(){if(typeof window>"u"||typeof document>"u")return"ltr";const e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}var _B=F({name:"Toaster",inheritAttrs:!1,__name:"Toaster",props:{invert:{type:Boolean,default:!1},theme:{default:"light"},position:{default:"bottom-right"},hotkey:{default:()=>["altKey","KeyT"]},richColors:{type:Boolean,default:!1},expand:{type:Boolean,default:!1},duration:{},gap:{default:$R},visibleToasts:{default:MR},closeButton:{type:Boolean,default:!1},toastOptions:{default:()=>({})},class:{default:""},style:{},offset:{default:c_},mobileOffset:{default:d_},dir:{default:"auto"},swipeDirections:{},icons:{},containerAriaLabel:{default:"Notifications"}},setup(e){const t=e,n=g0(),o=N([]);function r(w,k){return o.value.filter($=>!$.position&&k===0||$.position===w)}const s=U(()=>{const w=o.value.filter(k=>k.position).map(k=>k.position);return w.length>0?Array.from(new Set([t.position].concat(w))):[t.position]}),i=U(()=>{const w={};return s.value.forEach(k=>{w[k]=o.value.filter($=>$.position===k)}),w}),a=N([]),l=N(!1),u=N(!1),c=N(t.theme!=="system"?t.theme:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),d=N(null),p=N(null),h=N(!1),m=t.hotkey.join("+").replace(/Key/g,"").replace(/Digit/g,"");function g(w){var k;(k=o.value.find($=>$.id===w.id))!=null&&k.delete||hn.dismiss(w.id),o.value=o.value.filter(({id:$})=>$!==w.id),setTimeout(()=>{o.value.find($=>$.id===w.id)||(a.value=a.value.filter($=>$.toastId!==w.id))},f_+50)}function v(w){var k,$;h.value&&!(($=(k=w.currentTarget)==null?void 0:k.contains)!=null&&$.call(k,w.relatedTarget))&&(h.value=!1,p.value&&(p.value.focus({preventScroll:!0}),p.value=null))}function y(w){w.target instanceof HTMLElement&&w.target.dataset.dismissible==="false"||h.value||(h.value=!0,p.value=w.relatedTarget)}function b(w){w.target&&w.target instanceof HTMLElement&&w.target.dataset.dismissible==="false"||(u.value=!0)}ut(w=>{const k=hn.subscribe($=>{if($.dismiss){requestAnimationFrame(()=>{o.value=o.value.map(R=>R.id===$.id?{...R,delete:!0}:R)});return}We(()=>{const R=o.value.findIndex(G=>G.id===$.id);R!==-1?o.value=[...o.value.slice(0,R),{...o.value[R],...$},...o.value.slice(R+1)]:o.value=[$,...o.value]})});w(k)}),ut(w=>{if(typeof window>"u")return;if(t.theme!=="system"){c.value=t.theme;return}const k=window.matchMedia("(prefers-color-scheme: dark)"),$=G=>{c.value=G?"dark":"light"};$(k.matches);const R=G=>{$(G.matches)};try{k.addEventListener("change",R)}catch{k.addListener(R)}w(()=>{try{k.removeEventListener("change",R)}catch{k.removeListener(R)}})}),ut(()=>{d.value&&p.value&&(p.value.focus({preventScroll:!0}),p.value=null,h.value=!1)}),ut(()=>{o.value.length<=1&&(l.value=!1)}),ut(w=>{function k($){const R=t.hotkey.every(ne=>$[ne]||$.code===ne),G=Array.isArray(d.value)?d.value[0]:d.value;R&&(l.value=!0,G==null||G.focus());const J=document.activeElement===d.value||(G==null?void 0:G.contains(document.activeElement));$.code==="Escape"&&J&&(l.value=!1)}yB&&(document.addEventListener("keydown",k),w(()=>{document.removeEventListener("keydown",k)}))});function _(){l.value=!0}function O(){u.value||(l.value=!1)}function T(){l.value=!1}function A(){u.value=!1}function D(w){a.value=w}function P(w){const k=a.value.findIndex($=>$.toastId===w.toastId);if(k!==-1)a.value[k]=w;else{const $=a.value.findIndex(R=>R.position===w.position);$!==-1?a.value.splice($,0,w):a.value.unshift(w)}}return(w,k)=>(C(),ie(Ie,null,[Be(" Remove item from normal navigation flow, only available via hotkey "),ce("section",{"aria-label":`${w.containerAriaLabel} ${f(m)}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false"},[(C(!0),ie(Ie,null,wt(s.value,($,R)=>{var G;return C(),ie("ol",te({key:$,ref_for:!0,ref_key:"listRef",ref:d,"data-sonner-toaster":"","data-sonner-theme":c.value,class:t.class,dir:w.dir==="auto"?bB():w.dir,tabIndex:-1,"data-theme":w.theme,"data-rich-colors":w.richColors,"data-y-position":$.split("-")[0],"data-x-position":$.split("-")[1],"data-lifted":l.value&&o.value.length>1&&!w.expand,style:{"--front-toast-height":`${((G=a.value[0])==null?void 0:G.height)||0}px`,"--width":`${f(qR)}px`,"--gap":`${w.gap}px`,...w.style,...f(n).style,...f(jR)(w.offset,w.mobileOffset)}},w.$attrs,{onBlur:v,onFocus:y,onMouseenter:_,onMousemove:_,onMouseleave:O,onDragend:T,onPointerdown:b,onPointerup:A}),[(C(!0),ie(Ie,null,wt(r($,R),(J,ne)=>{var ae,re,L,oe,Y,ee,le,ye,me,Pe;return C(),B(zR,{key:J.id,heights:a.value,icons:w.icons,index:ne,toast:J,defaultRichColors:w.richColors,duration:((ae=w.toastOptions)==null?void 0:ae.duration)??w.duration,class:qe(((re=w.toastOptions)==null?void 0:re.class)??""),descriptionClass:(L=w.toastOptions)==null?void 0:L.descriptionClass,invert:w.invert,visibleToasts:w.visibleToasts,closeButton:((oe=w.toastOptions)==null?void 0:oe.closeButton)??w.closeButton,interacting:u.value,position:$,style:Pt((Y=w.toastOptions)==null?void 0:Y.style),unstyled:(ee=w.toastOptions)==null?void 0:ee.unstyled,classes:(le=w.toastOptions)==null?void 0:le.classes,cancelButtonStyle:(ye=w.toastOptions)==null?void 0:ye.cancelButtonStyle,actionButtonStyle:(me=w.toastOptions)==null?void 0:me.actionButtonStyle,"close-button-aria-label":(Pe=w.toastOptions)==null?void 0:Pe.closeButtonAriaLabel,toasts:i.value[$],expandByDefault:w.expand,gap:w.gap,expanded:l.value,swipeDirections:t.swipeDirections,"onUpdate:heights":D,"onUpdate:height":P,onRemoveToast:g},{"close-icon":E(()=>[V(w.$slots,"close-icon",{},()=>[q(QR)])]),"loading-icon":E(()=>[V(w.$slots,"loading-icon",{},()=>[q(ZR,{visible:J.type==="loading"},null,8,["visible"])])]),"success-icon":E(()=>[V(w.$slots,"success-icon",{},()=>[q(oB)])]),"error-icon":E(()=>[V(w.$slots,"error-icon",{},()=>[q(mB)])]),"warning-icon":E(()=>[V(w.$slots,"warning-icon",{},()=>[q(dB)])]),"info-icon":E(()=>[V(w.$slots,"info-icon",{},()=>[q(aB)])]),_:2},1032,["heights","icons","index","toast","defaultRichColors","duration","class","descriptionClass","invert","visibleToasts","closeButton","interacting","position","style","unstyled","classes","cancelButtonStyle","actionButtonStyle","close-button-aria-label","toasts","expandByDefault","gap","expanded","swipeDirections"])}),128))],16,vB)}),128))],8,gB)],2112))}}),wB=_B;const ko=xt.create({baseURL:"https://api.beenglish.eu.org/DesignScreenshot/admin-api",timeout:12e4,headers:{"Content-Type":"application/json"}});let bc=!1;const _c=[],SB=async()=>{try{const e=localStorage.getItem("refreshToken");if(!e)throw new Error("No refresh token found");const t=await xt.post(`/system/auth/refresh-token?refreshToken=${e}`),{token:n,refreshToken:o}=t.data;return localStorage.setItem("accessToken",n),localStorage.setItem("refreshToken",o),n}catch(e){return localStorage.removeItem("accessToken"),localStorage.removeItem("refreshToken"),window.location.href="/auth",Promise.reject(e)}};ko.interceptors.request.use(e=>{const t=localStorage.getItem("accessToken");return t&&e.headers&&(e.headers.Authorization=`Bearer ${t}`),e},e=>Promise.reject(e));ko.interceptors.response.use(async e=>{const{data:t,status:n}=e;if(n!==200)return Bi.error(t.msg||"请求失败"),Promise.reject(new Error(t.msg||"请求失败"));if(t.code===401){const o=e.config;if(!o._retry){if(bc)return new Promise(r=>{_c.push(s=>{o.headers&&(o.headers.Authorization=`Bearer ${s}`),r(ko(o))})});o._retry=!0,bc=!0;try{const r=await SB();return o.headers&&(o.headers.Authorization=`Bearer ${r}`),_c.forEach(s=>s(r)),_c.length=0,ko(o)}catch(r){return Promise.reject(r)}finally{bc=!1}}}return t.code===0?t.data:(Bi.error(t.msg||"请求失败"),Promise.reject(new Error(t.msg||"请求失败")))},e=>{const t=e.message||"网络错误";return Bi.error(t),Promise.reject(e)});const wr=(e,t)=>ko.get(e,{params:t}),Sr=(e,t,n)=>ko.post(e,t,n),p_=(e,t)=>ko.put(e,t),h_=(e,t)=>ko.delete(e,{params:t}),GL=(e,t)=>ko.post(e,t,{headers:{"Content-Type":"multipart/form-data"}}),CB=e=>wr("/admin/app/page",e),xB=e=>wr("/admin/app/get-app-details",{appId:e}),EB=e=>wr("/admin/app/list",e),QL=e=>Sr("/admin/app/create",e),YL=e=>p_("/admin/app/update",e),XL=e=>h_("/admin/app/delete",e),ep=Symbol("platform"),m_=bf("app",()=>{const e=N([]);return{apps:e,fetchApps:async n=>{const o=await EB({platform:n});e.value=o}}});/*!
DesignScreenshot/output/test_run/login_page.html:104:  */const ms=typeof document<"u";function g_(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function AB(e){return e.__esModule||e[Symbol.toStringTag]==="Module"||e.default&&g_(e.default)}const st=Object.assign;function wc(e,t){const n={};for(const o in t){const r=t[o];n[o]=Kn(r)?r.map(e):e(r)}return n}const Mi=()=>{},Kn=Array.isArray,v_=/#/g,OB=/&/g,TB=/\//g,PB=/=/g,kB=/\?/g,y_=/\+/g,IB=/%5B/g,DB=/%5D/g,b_=/%5E/g,RB=/%60/g,__=/%7B/g,BB=/%7C/g,w_=/%7D/g,MB=/%20/g;function tp(e){return encodeURI(""+e).replace(BB,"|").replace(IB,"[").replace(DB,"]")}function qB(e){return tp(e).replace(__,"{").replace(w_,"}").replace(b_,"^")}function zd(e){return tp(e).replace(y_,"%2B").replace(MB,"+").replace(v_,"%23").replace(OB,"%26").replace(RB,"`").replace(__,"{").replace(w_,"}").replace(b_,"^")}function $B(e){return zd(e).replace(PB,"%3D")}function FB(e){return tp(e).replace(v_,"%23").replace(kB,"%3F")}function LB(e){return e==null?"":FB(e).replace(TB,"%2F")}function ra(e){try{return decodeURIComponent(""+e)}catch{}return""+e}const NB=/\/$/,jB=e=>e.replace(NB,"");function Sc(e,t,n="/"){let o,r={},s="",i="";const a=t.indexOf("#");let l=t.indexOf("?");return a<l&&a>=0&&(l=-1),l>-1&&(o=t.slice(0,l),s=t.slice(l+1,a>-1?a:t.length),r=e(s)),a>-1&&(o=o||t.slice(0,a),i=t.slice(a,t.length)),o=zB(o??t,n),{fullPath:o+(s&&"?")+s+i,path:o,query:r,hash:ra(i)}}function VB(e,t){const n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}function ym(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function UB(e,t,n){const o=t.matched.length-1,r=n.matched.length-1;return o>-1&&o===r&&Hs(t.matched[o],n.matched[r])&&S_(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function Hs(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function S_(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(!HB(e[n],t[n]))return!1;return!0}function HB(e,t){return Kn(e)?bm(e,t):Kn(t)?bm(t,e):e===t}function bm(e,t){return Kn(t)?e.length===t.length&&e.every((n,o)=>n===t[o]):e.length===1&&e[0]===t}function zB(e,t){if(e.startsWith("/"))return e;if(!e)return t;const n=t.split("/"),o=e.split("/"),r=o[o.length-1];(r===".."||r===".")&&o.push("");let s=n.length-1,i,a;for(i=0;i<o.length;i++)if(a=o[i],a!==".")if(a==="..")s>1&&s--;else break;return n.slice(0,s).join("/")+"/"+o.slice(i).join("/")}const Qo={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0};var sa;(function(e){e.pop="pop",e.push="push"})(sa||(sa={}));var qi;(function(e){e.back="back",e.forward="forward",e.unknown=""})(qi||(qi={}));function KB(e){if(!e)if(ms){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),jB(e)}const WB=/^[^#]+#/;function GB(e,t){return e.replace(WB,"#")+t}function QB(e,t){const n=document.documentElement.getBoundingClientRect(),o=e.getBoundingClientRect();return{behavior:t.behavior,left:o.left-n.left-(t.left||0),top:o.top-n.top-(t.top||0)}}const Mu=()=>({left:window.scrollX,top:window.scrollY});function YB(e){let t;if("el"in e){const n=e.el,o=typeof n=="string"&&n.startsWith("#"),r=typeof n=="string"?o?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!r)return;t=QB(r,e)}else t=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left!=null?t.left:window.scrollX,t.top!=null?t.top:window.scrollY)}function _m(e,t){return(history.state?history.state.position-t:-1)+e}const Kd=new Map;function XB(e,t){Kd.set(e,t)}function JB(e){const t=Kd.get(e);return Kd.delete(e),t}let ZB=()=>location.protocol+"//"+location.host;function C_(e,t){const{pathname:n,search:o,hash:r}=t,s=e.indexOf("#");if(s>-1){let a=r.includes(e.slice(s))?e.slice(s).length:1,l=r.slice(a);return l[0]!=="/"&&(l="/"+l),ym(l,"")}return ym(n,e)+o+r}function eM(e,t,n,o){let r=[],s=[],i=null;const a=({state:p})=>{const h=C_(e,location),m=n.value,g=t.value;let v=0;if(p){if(n.value=h,t.value=p,i&&i===m){i=null;return}v=g?p.position-g.position:0}else o(h);r.forEach(y=>{y(n.value,m,{delta:v,type:sa.pop,direction:v?v>0?qi.forward:qi.back:qi.unknown})})};function l(){i=n.value}function u(p){r.push(p);const h=()=>{const m=r.indexOf(p);m>-1&&r.splice(m,1)};return s.push(h),h}function c(){const{history:p}=window;p.state&&p.replaceState(st({},p.state,{scroll:Mu()}),"")}function d(){for(const p of s)p();s=[],window.removeEventListener("popstate",a),window.removeEventListener("beforeunload",c)}return window.addEventListener("popstate",a),window.addEventListener("beforeunload",c,{passive:!0}),{pauseListeners:l,listen:u,destroy:d}}function wm(e,t,n,o=!1,r=!1){return{back:e,current:t,forward:n,replaced:o,position:window.history.length,scroll:r?Mu():null}}function tM(e){const{history:t,location:n}=window,o={value:C_(e,n)},r={value:t.state};r.value||s(o.value,{back:null,current:o.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function s(l,u,c){const d=e.indexOf("#"),p=d>-1?(n.host&&document.querySelector("base")?e:e.slice(d))+l:ZB()+e+l;try{t[c?"replaceState":"pushState"](u,"",p),r.value=u}catch(h){console.error(h),n[c?"replace":"assign"](p)}}function i(l,u){const c=st({},t.state,wm(r.value.back,l,r.value.forward,!0),u,{position:r.value.position});s(l,c,!0),o.value=l}function a(l,u){const c=st({},r.value,t.state,{forward:l,scroll:Mu()});s(c.current,c,!0);const d=st({},wm(o.value,l,null),{position:c.position+1},u);s(l,d,!1),o.value=l}return{location:o,state:r,push:a,replace:i}}function nM(e){e=KB(e);const t=tM(e),n=eM(e,t.state,t.location,t.replace);function o(s,i=!0){i||n.pauseListeners(),history.go(s)}const r=st({location:"",base:e,go:o,createHref:GB.bind(null,e)},t,n);return Object.defineProperty(r,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(r,"state",{enumerable:!0,get:()=>t.state.value}),r}function oM(e){return typeof e=="string"||e&&typeof e=="object"}function x_(e){return typeof e=="string"||typeof e=="symbol"}const E_=Symbol("");var Sm;(function(e){e[e.aborted=4]="aborted",e[e.cancelled=8]="cancelled",e[e.duplicated=16]="duplicated"})(Sm||(Sm={}));function zs(e,t){return st(new Error,{type:e,[E_]:!0},t)}function So(e,t){return e instanceof Error&&E_ in e&&(t==null||!!(e.type&t))}const Cm="[^/]+?",rM={sensitive:!1,strict:!1,start:!0,end:!0},sM=/[.+*?^${}()[\]/\\]/g;function iM(e,t){const n=st({},rM,t),o=[];let r=n.start?"^":"";const s=[];for(const u of e){const c=u.length?[]:[90];n.strict&&!u.length&&(r+="/");for(let d=0;d<u.length;d++){const p=u[d];let h=40+(n.sensitive?.25:0);if(p.type===0)d||(r+="/"),r+=p.value.replace(sM,"\\$&"),h+=40;else if(p.type===1){const{value:m,repeatable:g,optional:v,regexp:y}=p;s.push({name:m,repeatable:g,optional:v});const b=y||Cm;if(b!==Cm){h+=10;try{new RegExp(`(${b})`)}catch(O){throw new Error(`Invalid custom RegExp for param "${m}" (${b}): `+O.message)}}let _=g?`((?:${b})(?:/(?:${b}))*)`:`(${b})`;d||(_=v&&u.length<2?`(?:/${_})`:"/"+_),v&&(_+="?"),r+=_,h+=20,v&&(h+=-8),g&&(h+=-20),b===".*"&&(h+=-50)}c.push(h)}o.push(c)}if(n.strict&&n.end){const u=o.length-1;o[u][o[u].length-1]+=.7000000000000001}n.strict||(r+="/?"),n.end?r+="$":n.strict&&!r.endsWith("/")&&(r+="(?:/|$)");const i=new RegExp(r,n.sensitive?"":"i");function a(u){const c=u.match(i),d={};if(!c)return null;for(let p=1;p<c.length;p++){const h=c[p]||"",m=s[p-1];d[m.name]=h&&m.repeatable?h.split("/"):h}return d}function l(u){let c="",d=!1;for(const p of e){(!d||!c.endsWith("/"))&&(c+="/"),d=!1;for(const h of p)if(h.type===0)c+=h.value;else if(h.type===1){const{value:m,repeatable:g,optional:v}=h,y=m in u?u[m]:"";if(Kn(y)&&!g)throw new Error(`Provided param "${m}" is an array but it is not repeatable (* or + modifiers)`);const b=Kn(y)?y.join("/"):y;if(!b)if(v)p.length<2&&(c.endsWith("/")?c=c.slice(0,-1):d=!0);else throw new Error(`Missing required param "${m}"`);c+=b}}return c||"/"}return{re:i,score:o,keys:s,parse:a,stringify:l}}function aM(e,t){let n=0;for(;n<e.length&&n<t.length;){const o=t[n]-e[n];if(o)return o;n++}return e.length<t.length?e.length===1&&e[0]===80?-1:1:e.length>t.length?t.length===1&&t[0]===80?1:-1:0}function A_(e,t){let n=0;const o=e.score,r=t.score;for(;n<o.length&&n<r.length;){const s=aM(o[n],r[n]);if(s)return s;n++}if(Math.abs(r.length-o.length)===1){if(xm(o))return 1;if(xm(r))return-1}return r.length-o.length}function xm(e){const t=e[e.length-1];return e.length>0&&t[t.length-1]<0}const lM={type:0,value:""},uM=/[a-zA-Z0-9_]/;function cM(e){if(!e)return[[]];if(e==="/")return[[lM]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(h){throw new Error(`ERR (${n})/"${u}": ${h}`)}let n=0,o=n;const r=[];let s;function i(){s&&r.push(s),s=[]}let a=0,l,u="",c="";function d(){u&&(n===0?s.push({type:0,value:u}):n===1||n===2||n===3?(s.length>1&&(l==="*"||l==="+")&&t(`A repeatable param (${u}) must be alone in its segment. eg: '/:ids+.`),s.push({type:1,value:u,regexp:c,repeatable:l==="*"||l==="+",optional:l==="*"||l==="?"})):t("Invalid state to consume buffer"),u="")}function p(){u+=l}for(;a<e.length;){if(l=e[a++],l==="\\"&&n!==2){o=n,n=4;continue}switch(n){case 0:l==="/"?(u&&d(),i()):l===":"?(d(),n=1):p();break;case 4:p(),n=o;break;case 1:l==="("?n=2:uM.test(l)?p():(d(),n=0,l!=="*"&&l!=="?"&&l!=="+"&&a--);break;case 2:l===")"?c[c.length-1]=="\\"?c=c.slice(0,-1)+l:n=3:c+=l;break;case 3:d(),n=0,l!=="*"&&l!=="?"&&l!=="+"&&a--,c="";break;default:t("Unknown state");break}}return n===2&&t(`Unfinished custom RegExp for param "${u}"`),d(),i(),r}function dM(e,t,n){const o=iM(cM(e.path),n),r=st(o,{record:e,parent:t,children:[],alias:[]});return t&&!r.record.aliasOf==!t.record.aliasOf&&t.children.push(r),r}function fM(e,t){const n=[],o=new Map;t=Tm({strict:!1,end:!0,sensitive:!1},t);function r(d){return o.get(d)}function s(d,p,h){const m=!h,g=Am(d);g.aliasOf=h&&h.record;const v=Tm(t,d),y=[g];if("alias"in d){const O=typeof d.alias=="string"?[d.alias]:d.alias;for(const T of O)y.push(Am(st({},g,{components:h?h.record.components:g.components,path:T,aliasOf:h?h.record:g})))}let b,_;for(const O of y){const{path:T}=O;if(p&&T[0]!=="/"){const A=p.record.path,D=A[A.length-1]==="/"?"":"/";O.path=p.record.path+(T&&D+T)}if(b=dM(O,p,v),h?h.alias.push(b):(_=_||b,_!==b&&_.alias.push(b),m&&d.name&&!Om(b)&&i(d.name)),O_(b)&&l(b),g.children){const A=g.children;for(let D=0;D<A.length;D++)s(A[D],b,h&&h.children[D])}h=h||b}return _?()=>{i(_)}:Mi}function i(d){if(x_(d)){const p=o.get(d);p&&(o.delete(d),n.splice(n.indexOf(p),1),p.children.forEach(i),p.alias.forEach(i))}else{const p=n.indexOf(d);p>-1&&(n.splice(p,1),d.record.name&&o.delete(d.record.name),d.children.forEach(i),d.alias.forEach(i))}}function a(){return n}function l(d){const p=mM(d,n);n.splice(p,0,d),d.record.name&&!Om(d)&&o.set(d.record.name,d)}function u(d,p){let h,m={},g,v;if("name"in d&&d.name){if(h=o.get(d.name),!h)throw zs(1,{location:d});v=h.record.name,m=st(Em(p.params,h.keys.filter(_=>!_.optional).concat(h.parent?h.parent.keys.filter(_=>_.optional):[]).map(_=>_.name)),d.params&&Em(d.params,h.keys.map(_=>_.name))),g=h.stringify(m)}else if(d.path!=null)g=d.path,h=n.find(_=>_.re.test(g)),h&&(m=h.parse(g),v=h.record.name);else{if(h=p.name?o.get(p.name):n.find(_=>_.re.test(p.path)),!h)throw zs(1,{location:d,currentLocation:p});v=h.record.name,m=st({},p.params,d.params),g=h.stringify(m)}const y=[];let b=h;for(;b;)y.unshift(b.record),b=b.parent;return{name:v,path:g,params:m,matched:y,meta:hM(y)}}e.forEach(d=>s(d));function c(){n.length=0,o.clear()}return{addRoute:s,resolve:u,removeRoute:i,clearRoutes:c,getRoutes:a,getRecordMatcher:r}}function Em(e,t){const n={};for(const o of t)o in e&&(n[o]=e[o]);return n}function Am(e){const t={path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:e.aliasOf,beforeEnter:e.beforeEnter,props:pM(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in e?e.components||null:e.component&&{default:e.component}};return Object.defineProperty(t,"mods",{value:{}}),t}function pM(e){const t={},n=e.props||!1;if("component"in e)t.default=n;else for(const o in e.components)t[o]=typeof n=="object"?n[o]:n;return t}function Om(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function hM(e){return e.reduce((t,n)=>st(t,n.meta),{})}function Tm(e,t){const n={};for(const o in e)n[o]=o in t?t[o]:e[o];return n}function mM(e,t){let n=0,o=t.length;for(;n!==o;){const s=n+o>>1;A_(e,t[s])<0?o=s:n=s+1}const r=gM(e);return r&&(o=t.lastIndexOf(r,o-1)),o}function gM(e){let t=e;for(;t=t.parent;)if(O_(t)&&A_(e,t)===0)return t}function O_({record:e}){return!!(e.name||e.components&&Object.keys(e.components).length||e.redirect)}function vM(e){const t={};if(e===""||e==="?")return t;const o=(e[0]==="?"?e.slice(1):e).split("&");for(let r=0;r<o.length;++r){const s=o[r].replace(y_," "),i=s.indexOf("="),a=ra(i<0?s:s.slice(0,i)),l=i<0?null:ra(s.slice(i+1));if(a in t){let u=t[a];Kn(u)||(u=t[a]=[u]),u.push(l)}else t[a]=l}return t}function Pm(e){let t="";for(let n in e){const o=e[n];if(n=$B(n),o==null){o!==void 0&&(t+=(t.length?"&":"")+n);continue}(Kn(o)?o.map(s=>s&&zd(s)):[o&&zd(o)]).forEach(s=>{s!==void 0&&(t+=(t.length?"&":"")+n,s!=null&&(t+="="+s))})}return t}function yM(e){const t={};for(const n in e){const o=e[n];o!==void 0&&(t[n]=Kn(o)?o.map(r=>r==null?null:""+r):o==null?o:""+o)}return t}const bM=Symbol(""),km=Symbol(""),qu=Symbol(""),np=Symbol(""),Wd=Symbol("");function hi(){let e=[];function t(o){return e.push(o),()=>{const r=e.indexOf(o);r>-1&&e.splice(r,1)}}function n(){e=[]}return{add:t,list:()=>e.slice(),reset:n}}function or(e,t,n,o,r,s=i=>i()){const i=o&&(o.enterCallbacks[r]=o.enterCallbacks[r]||[]);return()=>new Promise((a,l)=>{const u=p=>{p===!1?l(zs(4,{from:n,to:t})):p instanceof Error?l(p):oM(p)?l(zs(2,{from:t,to:p})):(i&&o.enterCallbacks[r]===i&&typeof p=="function"&&i.push(p),a())},c=s(()=>e.call(o&&o.instances[r],t,n,u));let d=Promise.resolve(c);e.length<3&&(d=d.then(u)),d.catch(p=>l(p))})}function Cc(e,t,n,o,r=s=>s()){const s=[];for(const i of e)for(const a in i.components){let l=i.components[a];if(!(t!=="beforeRouteEnter"&&!i.instances[a]))if(g_(l)){const c=(l.__vccOpts||l)[t];c&&s.push(or(c,n,o,i,a,r))}else{let u=l();s.push(()=>u.then(c=>{if(!c)throw new Error(`Couldn't resolve component "${a}" at "${i.path}"`);const d=AB(c)?c.default:c;i.mods[a]=c,i.components[a]=d;const h=(d.__vccOpts||d)[t];return h&&or(h,n,o,i,a,r)()}))}}return s}function Im(e){const t=kt(qu),n=kt(np),o=U(()=>{const l=f(e.to);return t.resolve(l)}),r=U(()=>{const{matched:l}=o.value,{length:u}=l,c=l[u-1],d=n.matched;if(!c||!d.length)return-1;const p=d.findIndex(Hs.bind(null,c));if(p>-1)return p;const h=Dm(l[u-2]);return u>1&&Dm(c)===h&&d[d.length-1].path!==h?d.findIndex(Hs.bind(null,l[u-2])):p}),s=U(()=>r.value>-1&&xM(n.params,o.value.params)),i=U(()=>r.value>-1&&r.value===n.matched.length-1&&S_(n.params,o.value.params));function a(l={}){if(CM(l)){const u=t[f(e.replace)?"replace":"push"](f(e.to)).catch(Mi);return e.viewTransition&&typeof document<"u"&&"startViewTransition"in document&&document.startViewTransition(()=>u),u}return Promise.resolve()}return{route:o,href:U(()=>o.value.href),isActive:s,isExactActive:i,navigate:a}}function _M(e){return e.length===1?e[0]:e}const wM=F({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"},viewTransition:Boolean},useLink:Im,setup(e,{slots:t}){const n=Ht(Im(e)),{options:o}=kt(qu),r=U(()=>({[Rm(e.activeClass,o.linkActiveClass,"router-link-active")]:n.isActive,[Rm(e.exactActiveClass,o.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const s=t.default&&_M(t.default(n));return e.custom?s:un("a",{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:r.value},s)}}}),SM=wM;function CM(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget&&e.currentTarget.getAttribute){const t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function xM(e,t){for(const n in t){const o=t[n],r=e[n];if(typeof o=="string"){if(o!==r)return!1}else if(!Kn(r)||r.length!==o.length||o.some((s,i)=>s!==r[i]))return!1}return!0}function Dm(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const Rm=(e,t,n)=>e??t??n,EM=F({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){const o=kt(Wd),r=U(()=>e.route||o.value),s=kt(km,0),i=U(()=>{let u=f(s);const{matched:c}=r.value;let d;for(;(d=c[u])&&!d.components;)u++;return u}),a=U(()=>r.value.matched[i.value]);Nn(km,U(()=>i.value+1)),Nn(bM,a),Nn(Wd,r);const l=N();return Ce(()=>[l.value,a.value,e.name],([u,c,d],[p,h,m])=>{c&&(c.instances[d]=u,h&&h!==c&&u&&u===p&&(c.leaveGuards.size||(c.leaveGuards=h.leaveGuards),c.updateGuards.size||(c.updateGuards=h.updateGuards))),u&&c&&(!h||!Hs(c,h)||!p)&&(c.enterCallbacks[d]||[]).forEach(g=>g(u))},{flush:"post"}),()=>{const u=r.value,c=e.name,d=a.value,p=d&&d.components[c];if(!p)return Bm(n.default,{Component:p,route:u});const h=d.props[c],m=h?h===!0?u.params:typeof h=="function"?h(u):h:null,v=un(p,st({},m,t,{onVnodeUnmounted:y=>{y.component.isUnmounted&&(d.instances[c]=null)},ref:l}));return Bm(n.default,{Component:v,route:u})||v}}});function Bm(e,t){if(!e)return null;const n=e(t);return n.length===1?n[0]:n}const AM=EM;function OM(e){const t=fM(e.routes,e),n=e.parseQuery||vM,o=e.stringifyQuery||Pm,r=e.history,s=hi(),i=hi(),a=hi(),l=Cn(Qo);let u=Qo;ms&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const c=wc.bind(null,x=>""+x),d=wc.bind(null,LB),p=wc.bind(null,ra);function h(x,z){let H,X;return x_(x)?(H=t.getRecordMatcher(x),X=z):X=x,t.addRoute(X,H)}function m(x){const z=t.getRecordMatcher(x);z&&t.removeRoute(z)}function g(){return t.getRoutes().map(x=>x.record)}function v(x){return!!t.getRecordMatcher(x)}function y(x,z){if(z=st({},z||l.value),typeof x=="string"){const j=Sc(n,x,z.path),K=t.resolve({path:j.path},z),Z=r.createHref(j.fullPath);return st(j,K,{params:p(K.params),hash:ra(j.hash),redirectedFrom:void 0,href:Z})}let H;if(x.path!=null)H=st({},x,{path:Sc(n,x.path,z.path).path});else{const j=st({},x.params);for(const K in j)j[K]==null&&delete j[K];H=st({},x,{params:d(j)}),z.params=d(z.params)}const X=t.resolve(H,z),pe=x.hash||"";X.params=c(p(X.params));const S=VB(o,st({},x,{hash:qB(pe),path:X.path})),I=r.createHref(S);return st({fullPath:S,hash:pe,query:o===Pm?yM(x.query):x.query||{}},X,{redirectedFrom:void 0,href:I})}function b(x){return typeof x=="string"?Sc(n,x,l.value.path):st({},x)}function _(x,z){if(u!==x)return zs(8,{from:z,to:x})}function O(x){return D(x)}function T(x){return O(st(b(x),{replace:!0}))}function A(x){const z=x.matched[x.matched.length-1];if(z&&z.redirect){const{redirect:H}=z;let X=typeof H=="function"?H(x):H;return typeof X=="string"&&(X=X.includes("?")||X.includes("#")?X=b(X):{path:X},X.params={}),st({query:x.query,hash:x.hash,params:X.path!=null?{}:x.params},X)}}function D(x,z){const H=u=y(x),X=l.value,pe=x.state,S=x.force,I=x.replace===!0,j=A(H);if(j)return D(st(b(j),{state:typeof j=="object"?st({},pe,j.state):pe,force:S,replace:I}),z||H);const K=H;K.redirectedFrom=z;let Z;return!S&&UB(o,X,H)&&(Z=zs(16,{to:K,from:X}),ee(X,X,!0,!1)),(Z?Promise.resolve(Z):k(K,X)).catch(Q=>So(Q)?So(Q,2)?Q:Y(Q):L(Q,K,X)).then(Q=>{if(Q){if(So(Q,2))return D(st({replace:I},b(Q.to),{state:typeof Q.to=="object"?st({},pe,Q.to.state):pe,force:S}),z||K)}else Q=R(K,X,!0,I,pe);return $(K,X,Q),Q})}function P(x,z){const H=_(x,z);return H?Promise.reject(H):Promise.resolve()}function w(x){const z=me.values().next().value;return z&&typeof z.runWithContext=="function"?z.runWithContext(x):x()}function k(x,z){let H;const[X,pe,S]=TM(x,z);H=Cc(X.reverse(),"beforeRouteLeave",x,z);for(const j of X)j.leaveGuards.forEach(K=>{H.push(or(K,x,z))});const I=P.bind(null,x,z);return H.push(I),Se(H).then(()=>{H=[];for(const j of s.list())H.push(or(j,x,z));return H.push(I),Se(H)}).then(()=>{H=Cc(pe,"beforeRouteUpdate",x,z);for(const j of pe)j.updateGuards.forEach(K=>{H.push(or(K,x,z))});return H.push(I),Se(H)}).then(()=>{H=[];for(const j of S)if(j.beforeEnter)if(Kn(j.beforeEnter))for(const K of j.beforeEnter)H.push(or(K,x,z));else H.push(or(j.beforeEnter,x,z));return H.push(I),Se(H)}).then(()=>(x.matched.forEach(j=>j.enterCallbacks={}),H=Cc(S,"beforeRouteEnter",x,z,w),H.push(I),Se(H))).then(()=>{H=[];for(const j of i.list())H.push(or(j,x,z));return H.push(I),Se(H)}).catch(j=>So(j,8)?j:Promise.reject(j))}function $(x,z,H){a.list().forEach(X=>w(()=>X(x,z,H)))}function R(x,z,H,X,pe){const S=_(x,z);if(S)return S;const I=z===Qo,j=ms?history.state:{};H&&(X||I?r.replace(x.fullPath,st({scroll:I&&j&&j.scroll},pe)):r.push(x.fullPath,pe)),l.value=x,ee(x,z,H,I),Y()}let G;function J(){G||(G=r.listen((x,z,H)=>{if(!Pe.listening)return;const X=y(x),pe=A(X);if(pe){D(st(pe,{replace:!0,force:!0}),X).catch(Mi);return}u=X;const S=l.value;ms&&XB(_m(S.fullPath,H.delta),Mu()),k(X,S).catch(I=>So(I,12)?I:So(I,2)?(D(st(b(I.to),{force:!0}),X).then(j=>{So(j,20)&&!H.delta&&H.type===sa.pop&&r.go(-1,!1)}).catch(Mi),Promise.reject()):(H.delta&&r.go(-H.delta,!1),L(I,X,S))).then(I=>{I=I||R(X,S,!1),I&&(H.delta&&!So(I,8)?r.go(-H.delta,!1):H.type===sa.pop&&So(I,20)&&r.go(-1,!1)),$(X,S,I)}).catch(Mi)}))}let ne=hi(),ae=hi(),re;function L(x,z,H){Y(x);const X=ae.list();return X.length?X.forEach(pe=>pe(x,z,H)):console.error(x),Promise.reject(x)}function oe(){return re&&l.value!==Qo?Promise.resolve():new Promise((x,z)=>{ne.add([x,z])})}function Y(x){return re||(re=!x,J(),ne.list().forEach(([z,H])=>x?H(x):z()),ne.reset()),x}function ee(x,z,H,X){const{scrollBehavior:pe}=e;if(!ms||!pe)return Promise.resolve();const S=!H&&JB(_m(x.fullPath,0))||(X||!H)&&history.state&&history.state.scroll||null;return We().then(()=>pe(x,z,S)).then(I=>I&&YB(I)).catch(I=>L(I,x,z))}const le=x=>r.go(x);let ye;const me=new Set,Pe={currentRoute:l,listening:!0,addRoute:h,removeRoute:m,clearRoutes:t.clearRoutes,hasRoute:v,getRoutes:g,resolve:y,options:e,push:O,replace:T,go:le,back:()=>le(-1),forward:()=>le(1),beforeEach:s.add,beforeResolve:i.add,afterEach:a.add,onError:ae.add,isReady:oe,install(x){const z=this;x.component("RouterLink",SM),x.component("RouterView",AM),x.config.globalProperties.$router=z,Object.defineProperty(x.config.globalProperties,"$route",{enumerable:!0,get:()=>f(l)}),ms&&!ye&&l.value===Qo&&(ye=!0,O(r.location).catch(pe=>{}));const H={};for(const pe in Qo)Object.defineProperty(H,pe,{get:()=>l.value[pe],enumerable:!0});x.provide(qu,z),x.provide(np,Zl(H)),x.provide(Wd,l);const X=x.unmount;me.add(x),x.unmount=function(){me.delete(x),me.size<1&&(u=Qo,G&&G(),G=null,l.value=Qo,ye=!1,re=!1),X()}}};function Se(x){return x.reduce((z,H)=>z.then(()=>w(H)),Promise.resolve())}return Pe}function TM(e,t){const n=[],o=[],r=[],s=Math.max(t.matched.length,e.matched.length);for(let i=0;i<s;i++){const a=t.matched[i];a&&(e.matched.find(u=>Hs(u,a))?o.push(a):n.push(a));const l=e.matched[i];l&&(t.matched.find(u=>Hs(u,l))||r.push(l))}return[n,o,r]}function Ta(){return kt(qu)}function T_(e){return kt(np)}const PM={class:"w-full flex items-center justify-between"},kM={class:"text-gray-500"},IM=F({__name:"SearchDialog",props:{modelValue:{type:Boolean,default:!1},modelModifiers:{}},emits:["update:modelValue"],setup(e){const t=ts(e,"modelValue"),n=Ta(),o=N(""),r=kt(ep);U(()=>`在 ${(r==null?void 0:r.value)||"All Platforms"} 中搜索应用...`);const{apps:s}=va(m_()),i=U(()=>r!=null&&r.value?s.value.filter(l=>l.platform===r.value):[]),a=l=>{const{id:u,platform:c}=l;t.value=!1,n.push({path:"/details",query:{id:u,platform:c}})};return(l,u)=>{const c=JI,d=Yf,p=Rd;return C(),B(f(Fk),{open:t.value,"onUpdate:open":u[1]||(u[1]=h=>t.value=h)},{default:E(()=>[q(f(Ab),{modelValue:f(o),"onUpdate:modelValue":u[0]||(u[0]=h=>$e(o)?o.value=h:null),placeholder:"Type a command or search..."},null,8,["modelValue"]),q(f(Ob),{class:"h-100"},{default:E(()=>[q(f(Eb),null,{default:E(()=>[q(c,{title:"No apps found in this platform",description:"You can change the platform or search another app"})]),_:1}),q(p,{heading:"apps"},{default:E(()=>[(C(!0),ie(Ie,null,wt(f(i),h=>(C(),B(f(Dd),{value:h.name,key:h.id,onClick:m=>a(h)},{default:E(()=>[ce("div",PM,[q(d,{logo:h.appLogoUrl,name:h.name,description:h.appTagline??""},null,8,["logo","name","description"]),ce("span",kM,Ne(h.platform),1)])]),_:2},1032,["value","onClick"]))),128))]),_:1})]),_:1})]),_:1},8,["open"])}}}),Mm=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,qm=fb,DM=(e,t)=>n=>{var o;if((t==null?void 0:t.variants)==null)return qm(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:r,defaultVariants:s}=t,i=Object.keys(r).map(u=>{const c=n==null?void 0:n[u],d=s==null?void 0:s[u];if(c===null)return null;const p=Mm(c)||Mm(d);return r[u][p]}),a=n&&Object.entries(n).reduce((u,c)=>{let[d,p]=c;return p===void 0||(u[d]=p),u},{}),l=t==null||(o=t.compoundVariants)===null||o===void 0?void 0:o.reduce((u,c)=>{let{class:d,className:p,...h}=c;return Object.entries(h).every(m=>{let[g,v]=m;return Array.isArray(v)?v.includes({...s,...a}[g]):{...s,...a}[g]===v})?[...u,d,p]:u},[]);return qm(e,i,l,n==null?void 0:n.class,n==null?void 0:n.className)},vn=F({__name:"Button",props:{variant:{},size:{},class:{},asChild:{type:Boolean},as:{default:"button"}},setup(e){const t=e;return(n,o)=>(C(),B(f(Ae),{"data-slot":"button",as:n.as,"as-child":n.asChild,class:qe(f(Fe)(f(op)({variant:n.variant,size:n.size}),t.class))},{default:E(()=>[V(n.$slots,"default")]),_:3},8,["as","as-child","class"]))}}),op=DM("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-md font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive cursor-pointer",{variants:{variant:{default:"bg-primary text-primary-foreground shadow-xs hover:bg-primary/90",destructive:"bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-11 rounded-md px-6 has-[>svg]:px-4",icon:"size-9"}},defaultVariants:{variant:"default",size:"lg"}}),rp=F({__name:"Tabs",props:{defaultValue:{},orientation:{},dir:{},activationMode:{},modelValue:{},unmountOnHide:{type:Boolean},asChild:{type:Boolean},as:{},class:{}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,o=t,r=et(n,"class"),s=ft(r,o);return(i,a)=>(C(),B(f(vP),te({"data-slot":"tabs"},f(s),{class:f(Fe)("flex flex-col gap-2",n.class)}),{default:E(()=>[V(i.$slots,"default")]),_:3},16,["class"]))}}),sp=F({__name:"TabsList",props:{loop:{type:Boolean},asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,n=et(t,"class");return(o,r)=>(C(),B(f(wP),te({"data-slot":"tabs-list"},f(n),{class:f(Fe)("bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-lg p-[3px]",t.class)}),{default:E(()=>[V(o.$slots,"default")]),_:3},16,["class"]))}}),ip=F({__name:"TabsTrigger",props:{value:{},disabled:{type:Boolean},asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,n=et(t,"class"),o=Kt(n);return(r,s)=>(C(),B(f(CP),te({"data-slot":"tabs-trigger"},f(o),{class:f(Fe)("data-[state=active]:bg-background dark:data-[state=active]:text-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 text-foreground dark:text-muted-foreground inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-md font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 hover:bg-background hover:text-foreground cursor-pointer text-muted-foreground data-[state=active]:bg-transparent data-[state=active]:text-foreground data-[state=active]:shadow-none",t.class)}),{default:E(()=>[V(r.$slots,"default")]),_:3},16,["class"]))}}),JL=e=>Sr("/system/auth/login",e),ZL=e=>Sr("/system/auth/social-login",e),RM=()=>Sr("/system/auth/logout"),BM=()=>wr("/system/auth/get-user-info"),MM=F({__name:"Avatar",props:{class:{}},setup(e){const t=e;return(n,o)=>(C(),B(f(F1),{"data-slot":"avatar",class:qe(f(Fe)("relative flex size-8 shrink-0 overflow-hidden rounded-full",t.class))},{default:E(()=>[V(n.$slots,"default")]),_:3},8,["class"]))}}),qM=F({__name:"AvatarFallback",props:{delayMs:{},asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,n=et(t,"class");return(o,r)=>(C(),B(f(N1),te({"data-slot":"avatar-fallback"},f(n),{class:f(Fe)("bg-muted flex size-full items-center justify-center rounded-full",t.class)}),{default:E(()=>[V(o.$slots,"default")]),_:3},16,["class"]))}}),$M=F({__name:"AvatarImage",props:{src:{},referrerPolicy:{},crossOrigin:{},asChild:{type:Boolean},as:{}},setup(e){const t=e;return(n,o)=>(C(),B(f(U1),te({"data-slot":"avatar-image"},t,{class:"aspect-square size-full"}),{default:E(()=>[V(n.$slots,"default")]),_:3},16))}}),P_=F({__name:"DropdownMenu",props:{defaultOpen:{type:Boolean},open:{type:Boolean},dir:{},modal:{type:Boolean}},emits:["update:open"],setup(e,{emit:t}){const r=ft(e,t);return(s,i)=>(C(),B(f(BO),te({"data-slot":"dropdown-menu"},f(r)),{default:E(()=>[V(s.$slots,"default")]),_:3},16))}}),k_=F({__name:"DropdownMenuContent",props:{forceMount:{type:Boolean},loop:{type:Boolean},side:{},sideOffset:{default:4},sideFlip:{type:Boolean},align:{},alignOffset:{},alignFlip:{type:Boolean},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},positionStrategy:{},updatePositionStrategy:{},disableUpdateOnLayoutShift:{type:Boolean},prioritizePosition:{type:Boolean},reference:{},asChild:{type:Boolean},as:{},class:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","closeAutoFocus"],setup(e,{emit:t}){const n=e,o=t,r=et(n,"class"),s=ft(r,o);return(i,a)=>(C(),B(f(HO),null,{default:E(()=>[q(f(qO),te({"data-slot":"dropdown-menu-content"},f(s),{class:f(Fe)("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--reka-dropdown-menu-content-available-height) min-w-[8rem] origin-(--reka-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",n.class)}),{default:E(()=>[V(i.$slots,"default")]),_:3},16,["class"])]),_:3}))}}),FM=F({__name:"DropdownMenuGroup",props:{asChild:{type:Boolean},as:{}},setup(e){const t=e;return(n,o)=>(C(),B(f(FO),te({"data-slot":"dropdown-menu-group"},t),{default:E(()=>[V(n.$slots,"default")]),_:3},16))}}),Br=F({__name:"DropdownMenuItem",props:{disabled:{type:Boolean},textValue:{},asChild:{type:Boolean},as:{},class:{},inset:{type:Boolean},variant:{default:"default"}},setup(e){const t=e,n=et(t,"inset","variant","class"),o=Kt(n);return(r,s)=>(C(),B(f(NO),te({"data-slot":"dropdown-menu-item","data-inset":r.inset?"":void 0,"data-variant":r.variant},f(o),{class:f(Fe)("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive-foreground data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/40 data-[variant=destructive]:focus:text-destructive-foreground data-[variant=destructive]:*:[svg]:!text-destructive-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t.class)}),{default:E(()=>[V(r.$slots,"default")]),_:3},16,["data-inset","data-variant","class"]))}}),LM=F({__name:"DropdownMenuLabel",props:{asChild:{type:Boolean},as:{},class:{},inset:{type:Boolean}},setup(e){const t=e,n=et(t,"class","inset"),o=Kt(n);return(r,s)=>(C(),B(f(VO),te({"data-slot":"dropdown-menu-label","data-inset":r.inset?"":void 0},f(o),{class:f(Fe)("px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",t.class)}),{default:E(()=>[V(r.$slots,"default")]),_:3},16,["data-inset","class"]))}}),$m=F({__name:"DropdownMenuSeparator",props:{asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,n=et(t,"class");return(o,r)=>(C(),B(f(KO),te({"data-slot":"dropdown-menu-separator"},f(n),{class:f(Fe)("bg-border -mx-1 my-1 h-px",t.class)}),null,16,["class"]))}}),I_=F({__name:"DropdownMenuTrigger",props:{disabled:{type:Boolean},asChild:{type:Boolean},as:{}},setup(e){const n=Kt(e);return(o,r)=>(C(),B(f(GO),te({"data-slot":"dropdown-menu-trigger"},f(n)),{default:E(()=>[V(o.$slots,"default")]),_:3},16))}}),D_=bf("user",()=>{const e=N({avatar:"",nickname:"",username:""});return{userInfo:e,fetchUserInfo:async()=>{const n=await BM();e.value=n}}}),NM=F({__name:"UserAvatar",setup(e){const t=D_(),{userInfo:n}=va(t),o=Ta(),r=N([{to:"/apps",label:"我的App"},{to:"/favorites",label:"我的收藏"},{to:"/settings",label:"设置"}]),s=async()=>{try{await RM(),localStorage.removeItem("accessToken"),localStorage.removeItem("refreshToken"),console.log("Logout successful"),o.replace("/auth")}catch(i){console.error("Logout failed",i)}};return(i,a)=>{const l=pf("RouterLink");return C(),B(f(P_),{modal:!1},{default:E(()=>[q(f(I_),{"as-child":""},{default:E(()=>[q(f(MM),{class:"cursor-pointer"},{default:E(()=>[q(f($M),{src:f(n).avatar},null,8,["src"]),q(f(qM),null,{default:E(()=>{var u;return[rt(Ne(((u=f(n).nickname[0])==null?void 0:u.toUpperCase())||"U"),1)]}),_:1})]),_:1})]),_:1}),q(f(k_),{class:"w-48",align:"end","side-offset":8},{default:E(()=>[q(f(LM),null,{default:E(()=>a[0]||(a[0]=[rt("我的账户",-1)])),_:1,__:[0]}),q(f($m)),q(f(FM),null,{default:E(()=>[(C(!0),ie(Ie,null,wt(r.value,u=>(C(),B(f(Br),{key:u.to,"as-child":""},{default:E(()=>[q(l,{to:u.to,class:"cursor-pointer"},{default:E(()=>[rt(Ne(u.label),1)]),_:2},1032,["to"])]),_:2},1024))),128))]),_:1}),q(f($m)),q(f(Br),{class:"cursor-pointer",onClick:s},{default:E(()=>a[1]||(a[1]=[rt(" 退出登录 ",-1)])),_:1,__:[1]})]),_:1})]),_:1})}}}),jM=[{label:"ios",value:"ios",icon:"mdi:apple"},{label:"android",value:"android",icon:"mdi:android"},{label:"web",value:"web",icon:"mdi:web"}],Ks=[{label:"Apps",value:"appCategories",icon:"duo-icons:app",categoryType:0},{label:"Screens",value:"screenPatterns",icon:"simple-line-icons:screen-smartphone",categoryType:1},{label:"UI Elements",value:"screenElements",icon:"humbleicons:switch-on",categoryType:2},{label:"Flows",value:"flowActions",icon:"fluent:flow-32-regular",categoryType:3}],ql=[...Ks.slice(0,2),...Ks.slice(2)],VM={class:"grid grid-cols-3 gap-4 items-center fixed top-0 left-0 right-0 h-18 shrink-0 z-1 bg-background px-4 lg:px-20"},UM={class:"col-span-1 flex items-center h-full"},HM={class:"col-span-1 h-full flex items-center py-3"},zM={class:"col-span-1 h-full flex justify-end items-center"},KM=F({__name:"Header",props:{modelValue:{required:!0},modelModifiers:{}},emits:Un(["searchClick","platformClick"],["update:modelValue"]),setup(e,{emit:t}){const n=ts(e,"modelValue"),o=t,r=l=>({ios:"iOS",android:"Android",web:"Web"})[l]||l,s=U(()=>`在 ${r(n.value)} 上搜索...`),i=l=>{o("platformClick",l)},a=()=>{o("searchClick")};return(l,u)=>{const c=Ho;return C(),ie("div",VM,[ce("div",UM,[q(f(rp),{modelValue:n.value,"onUpdate:modelValue":u[0]||(u[0]=d=>n.value=d)},{default:E(()=>[q(f(sp),{class:"bg-transparent p-0"},{default:E(()=>[(C(!0),ie(Ie,null,wt(f(jM),d=>(C(),B(f(ip),{key:d.label,value:d.label,onClick:p=>i(d.value)},{default:E(()=>[q(c,{icon:d.icon,class:"h-4 w-4 mr-2"},null,8,["icon"]),rt(" "+Ne(r(d.value)),1)]),_:2},1032,["value","onClick"]))),128))]),_:1})]),_:1},8,["modelValue"])]),ce("div",HM,[q(f(vn),{variant:"outline",class:"w-full justify-start text-muted-foreground rounded-full cursor-pointer",onClick:a},{default:E(()=>[q(c,{icon:"lucide:search",class:"h-4 w-4 mr-2"}),rt(" "+Ne(s.value),1)]),_:1})]),ce("div",zM,[q(f(NM))])])}}}),WM=F({__name:"Sonner",props:{invert:{type:Boolean},theme:{},position:{},hotkey:{},richColors:{type:Boolean},expand:{type:Boolean},duration:{},gap:{},visibleToasts:{},closeButton:{type:Boolean},toastOptions:{},class:{},style:{},offset:{},mobileOffset:{},dir:{},swipeDirections:{},icons:{},containerAriaLabel:{}},setup(e){const t=e;return(n,o)=>(C(),B(f(wB),te({class:"toaster group"},t,{style:{"--normal-bg":"var(--popover)","--normal-text":"var(--popover-foreground)","--normal-border":"var(--border)"}}),null,16))}}),GM=()=>wr("/admin/app-category/list-all"),Gd=e=>{if(e===null||typeof e!="object")return e;if(e instanceof Date)return new Date(e.getTime());if(Array.isArray(e))return e.map(n=>Gd(n));const t={};for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=Gd(e[n]));return t},cl=(e,t,n)=>{const o=new Map,r=e.map(a=>{const l=Gd(a),u={...l,id:l[t.id],label:l[t.label],value:l[t.value],level:1,parentId:l[t.parentId]??null,expanded:!1};return o.set(u.id,u),u}),s=[];r.forEach(a=>{if(a.parentId!==null){const l=a.parentId!==void 0?o.get(a.parentId):void 0;l?(a.level=l.level+1,l.children||(l.children=[]),l.children.push(a)):s.push(a)}else s.push(a)});const i=a=>(n!=null&&n.order&&(a.sort((l,u)=>{const c=l[n.order],d=u[n.order];return typeof c=="number"&&typeof d=="number"?c-d:String(c).localeCompare(String(d))}),a.forEach(l=>{var u;(u=l.children)!=null&&u.length&&(l.children=i(l.children))})),a);return i(s)},Fm=(e,t)=>{const n=new Set(e),o=new Set(t);let r=0;for(const s of n)o.has(s)&&r++;return r},QM=(e,t={})=>{const{keepChildren:n=!1,keepLevel:o=!1,keepExpanded:r=!1}=t,s=[],i=(a,l=null)=>{(Array.isArray(a)?a:[a]).forEach(c=>{var p;const d={};Object.entries(c).forEach(([h,m])=>{["children","level","expanded","parentId","label"].includes(h)||(d[h]=m)}),n&&c.children&&(d.children=c.children),o&&(d.level=c.level),r&&c.expanded!==void 0&&(d.expanded=c.expanded),l!==null&&(d.parentId=l),s.push(d),(p=c.children)!=null&&p.length&&i(c.children,c.id)})};return i(e),s},$u=bf("definition",()=>{const e=N([]);return{definitions:e,fetchDefinitions:async()=>{const n=await GM();e.value=cl(n,{id:"id",label:"displayName",value:"id",parentId:"parentId"},{order:"orderNum"})}}}),YM=F({__name:"App",setup(e){const t=Ta(),n=T_(),{fetchDefinitions:o}=$u(),{fetchApps:r}=m_(),s=["auth","settings","chat"],i=N("ios");Nn(ep,U(()=>i.value));const a=()=>{c.value=!0},l=h=>{t.replace("/"),i.value=h,localStorage.setItem("platform",h)},u=()=>{const h=localStorage.getItem("platform");h?i.value=h:(i.value="ios",localStorage.setItem("platform","ios"))},c=N(!1),d=U(()=>!s.includes(n.name)),p=U(()=>n.name!=="chat");return je(()=>{u(),o(),r(i.value)}),(h,m)=>{const g=pf("RouterView"),v=IM;return C(),ie(Ie,null,[ce("div",{class:qe(["w-full max-w-[2000px] mx-auto relative h-full min-h-full",{"px-4 lg:px-20":f(p),"pt-18":f(d)}])},[f(d)?(C(),B(KM,{key:0,modelValue:f(i),"onUpdate:modelValue":m[0]||(m[0]=y=>$e(i)?i.value=y:null),onSearchClick:a,onPlatformClick:l},null,8,["modelValue"])):Be("",!0),q(g)],2),q(v,{modelValue:f(c),"onUpdate:modelValue":m[1]||(m[1]=y=>$e(c)?c.value=y:null)},null,8,["modelValue"]),q(f(WM),{position:"top-right",richColors:"",closeButton:""})],64)}}}),XM="modulepreload",JM=function(e){return"/"+e},Lm={},mi=function(t,n,o){let r=Promise.resolve();if(n&&n.length>0){let i=function(u){return Promise.all(u.map(c=>Promise.resolve(c).then(d=>({status:"fulfilled",value:d}),d=>({status:"rejected",reason:d}))))};document.getElementsByTagName("link");const a=document.querySelector("meta[property=csp-nonce]"),l=(a==null?void 0:a.nonce)||(a==null?void 0:a.getAttribute("nonce"));r=i(n.map(u=>{if(u=JM(u),u in Lm)return;Lm[u]=!0;const c=u.endsWith(".css"),d=c?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${u}"]${d}`))return;const p=document.createElement("link");if(p.rel=c?"stylesheet":XM,c||(p.as="script"),p.crossOrigin="",p.href=u,l&&p.setAttribute("nonce",l),document.head.appendChild(p),c)return new Promise((h,m)=>{p.addEventListener("load",h),p.addEventListener("error",()=>m(new Error(`Unable to preload CSS for ${u}`)))})}))}function s(i){const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=i,window.dispatchEvent(a),!a.defaultPrevented)throw i}return r.then(i=>{for(const a of i||[])a.status==="rejected"&&s(a.reason);return t().catch(s)})},ZM=F({__name:"AlertDialog",props:{open:{type:Boolean},defaultOpen:{type:Boolean}},emits:["update:open"],setup(e,{emit:t}){const r=ft(e,t);return(s,i)=>(C(),B(f(P1),te({"data-slot":"alert-dialog"},f(r)),{default:E(()=>[V(s.$slots,"default")]),_:3},16))}}),eq=F({__name:"AlertDialogAction",props:{asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,n=et(t,"class");return(o,r)=>(C(),B(f(m1),te(f(n),{class:f(Fe)(f(op)(),t.class)}),{default:E(()=>[V(o.$slots,"default")]),_:3},16,["class"]))}}),tq=F({__name:"AlertDialogCancel",props:{asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,n=et(t,"class");return(o,r)=>(C(),B(f(w1),te(f(n),{class:f(Fe)(f(op)({variant:"outline"}),"mt-2 sm:mt-0",t.class)}),{default:E(()=>[V(o.$slots,"default")]),_:3},16,["class"]))}}),nq=F({__name:"AlertDialogContent",props:{forceMount:{type:Boolean},disableOutsidePointerEvents:{type:Boolean},asChild:{type:Boolean},as:{},class:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(e,{emit:t}){const n=e,o=t,r=et(n,"class"),s=ft(r,o);return(i,a)=>(C(),B(f(O1),null,{default:E(()=>[q(f(E1),{"data-slot":"alert-dialog-overlay",class:"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/80"}),q(f(b1),te({"data-slot":"alert-dialog-content"},f(s),{class:f(Fe)("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",n.class)}),{default:E(()=>[V(i.$slots,"default")]),_:3},16,["class"])]),_:3}))}}),oq=F({__name:"AlertDialogDescription",props:{asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,n=et(t,"class");return(o,r)=>(C(),B(f(C1),te({"data-slot":"alert-dialog-description"},f(n),{class:f(Fe)("text-muted-foreground text-sm",t.class)}),{default:E(()=>[V(o.$slots,"default")]),_:3},16,["class"]))}}),rq=F({__name:"AlertDialogFooter",props:{class:{}},setup(e){const t=e;return(n,o)=>(C(),ie("div",{"data-slot":"alert-dialog-footer",class:qe(f(Fe)("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",t.class))},[V(n.$slots,"default")],2))}}),sq=F({__name:"AlertDialogHeader",props:{class:{}},setup(e){const t=e;return(n,o)=>(C(),ie("div",{"data-slot":"alert-dialog-header",class:qe(f(Fe)("flex flex-col gap-2 text-center sm:text-left",t.class))},[V(n.$slots,"default")],2))}}),iq=F({__name:"AlertDialogTitle",props:{asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,n=et(t,"class");return(o,r)=>(C(),B(f(I1),te({"data-slot":"alert-dialog-title"},f(n),{class:f(Fe)("text-lg font-semibold",t.class)}),{default:E(()=>[V(o.$slots,"default")]),_:3},16,["class"]))}}),aq=F({__name:"AlertDialogTrigger",props:{asChild:{type:Boolean},as:{}},setup(e){const t=e;return(n,o)=>(C(),B(f(R1),te({"data-slot":"alert-dialog-trigger"},t),{default:E(()=>[V(n.$slots,"default")]),_:3},16))}}),ap=F({__name:"AlertConfirm",props:Un({title:{},description:{default:""},cancelText:{default:"cancel"},actionText:{default:"confirm"}},{modelValue:{type:Boolean,required:!1},modelModifiers:{}}),emits:Un(["confirm"],["update:modelValue"]),setup(e,{expose:t,emit:n}){const o=n,r=ts(e,"modelValue"),s=()=>{o("confirm"),r.value=!1},i=()=>{r.value=!1};return t({open:()=>r.value=!0,close:()=>r.value=!1}),(a,l)=>(C(),B(f(ZM),{open:r.value,"onUpdate:open":l[0]||(l[0]=u=>r.value=u)},{default:E(()=>[q(f(aq),{"as-child":""},{default:E(()=>[V(a.$slots,"default")]),_:3}),q(f(nq),null,{default:E(()=>[q(f(sq),null,{default:E(()=>[q(f(iq),null,{default:E(()=>[rt(Ne(a.title),1)]),_:1}),q(f(oq),null,{default:E(()=>[rt(Ne(a.description),1)]),_:1})]),_:1}),q(f(rq),null,{default:E(()=>[q(f(tq),{onClick:i},{default:E(()=>[rt(Ne(a.cancelText),1)]),_:1}),q(f(eq),{onClick:s},{default:E(()=>[rt(Ne(a.actionText),1)]),_:1})]),_:1})]),_:1})]),_:3},8,["open"]))}}),R_=F({__name:"ScrollBar",props:{orientation:{default:"vertical"},forceMount:{type:Boolean},asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,n=et(t,"class");return(o,r)=>(C(),B(f(mT),te({"data-slot":"scroll-area-scrollbar"},f(n),{class:f(Fe)("flex touch-none p-px transition-colors select-none",o.orientation==="vertical"&&"h-full w-2.5 border-l border-l-transparent",o.orientation==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent",t.class)}),{default:E(()=>[q(f(_T),{"data-slot":"scroll-area-thumb",class:"bg-border relative flex-1 rounded-full"})]),_:1},16,["class"]))}}),lp=F({__name:"ScrollArea",props:{type:{},dir:{},scrollHideDelay:{},asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,n=et(t,"class");return(o,r)=>(C(),B(f(XO),te({"data-slot":"scroll-area"},f(n),{class:f(Fe)("relative",t.class)}),{default:E(()=>[q(f(ST),{"data-slot":"scroll-area-viewport",class:"focus-visible:ring-ring/50 size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:outline-1"},{default:E(()=>[V(o.$slots,"default")]),_:3}),q(R_),q(f(tT))]),_:3},16,["class"]))}}),lq=e=>Sr("/admin/favorite/create-app-favorite",{...e,favoriteType:1}),eN=e=>wr("/admin/app/page",{...e,type:2}),uq=e=>Sr("/admin/favorite-section/create",e),tN=e=>wr("/admin/app-section/get-favorite",e),xc=F({__name:"Tooltip",props:{defaultOpen:{type:Boolean},open:{type:Boolean},delayDuration:{},disableHoverableContent:{type:Boolean},disableClosingTrigger:{type:Boolean},disabled:{type:Boolean},ignoreNonKeyboardFocus:{type:Boolean}},emits:["update:open"],setup(e,{emit:t}){const r=ft(e,t);return(s,i)=>(C(),B(f(IP),te({"data-slot":"tooltip"},f(r)),{default:E(()=>[V(s.$slots,"default")]),_:3},16))}}),Ec=F({inheritAttrs:!1,__name:"TooltipContent",props:{forceMount:{type:Boolean},ariaLabel:{},asChild:{type:Boolean},as:{},side:{},sideOffset:{default:4},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},positionStrategy:{},updatePositionStrategy:{},class:{}},emits:["escapeKeyDown","pointerDownOutside"],setup(e,{emit:t}){const n=e,o=t,r=et(n,"class"),s=ft(r,o);return(i,a)=>(C(),B(f(FP),null,{default:E(()=>[q(f(qP),te({"data-slot":"tooltip-content"},{...f(s),...i.$attrs},{class:f(Fe)("bg-primary text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit rounded-md px-3 py-1.5 text-xs text-balance",n.class)}),{default:E(()=>[V(i.$slots,"default"),q(f(EP),{class:"bg-primary fill-primary z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]"})]),_:3},16,["class"])]),_:3}))}}),Ac=F({__name:"TooltipProvider",props:{delayDuration:{default:0},skipDelayDuration:{},disableHoverableContent:{type:Boolean},disableClosingTrigger:{type:Boolean},disabled:{type:Boolean},ignoreNonKeyboardFocus:{type:Boolean}},setup(e){const t=e;return(n,o)=>(C(),B(f(TP),ct(yt(t)),{default:E(()=>[V(n.$slots,"default")]),_:3},16))}}),Oc=F({__name:"TooltipTrigger",props:{reference:{},asChild:{type:Boolean},as:{}},setup(e){const t=e;return(n,o)=>(C(),B(f(NP),te({"data-slot":"tooltip-trigger"},t),{default:E(()=>[V(n.$slots,"default")]),_:3},16))}}),Tc=N(null);function cq(){return{copiedScreen:Tc,copyScreen:n=>{Tc.value=JSON.parse(JSON.stringify(n))},clearClipboard:()=>{Tc.value=null}}}var dq=Object.defineProperty,$l=Object.getOwnPropertySymbols,B_=Object.prototype.hasOwnProperty,M_=Object.prototype.propertyIsEnumerable,Nm=(e,t,n)=>t in e?dq(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,vs=(e,t)=>{for(var n in t||(t={}))B_.call(t,n)&&Nm(e,n,t[n]);if($l)for(var n of $l(t))M_.call(t,n)&&Nm(e,n,t[n]);return e},q_=(e,t)=>{var n={};for(var o in e)B_.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&$l)for(var o of $l(e))t.indexOf(o)<0&&M_.call(e,o)&&(n[o]=e[o]);return n};const $_="[vue-draggable-plus]: ";function fq(e){console.warn($_+e)}function pq(e){console.error($_+e)}function jm(e,t,n){return n>=0&&n<e.length&&e.splice(n,0,e.splice(t,1)[0]),e}function hq(e){return e.replace(/-(\w)/g,(t,n)=>n?n.toUpperCase():"")}function mq(e){return Object.keys(e).reduce((t,n)=>(typeof e[n]<"u"&&(t[hq(n)]=e[n]),t),{})}function Vm(e,t){return Array.isArray(e)&&e.splice(t,1),e}function Um(e,t,n){return Array.isArray(e)&&e.splice(t,0,n),e}function gq(e){return typeof e>"u"}function vq(e){return typeof e=="string"}function Hm(e,t,n){const o=e.children[n];e.insertBefore(t,o)}function Pc(e){e.parentNode&&e.parentNode.removeChild(e)}function yq(e,t=document){var n;let o=null;return typeof(t==null?void 0:t.querySelector)=="function"?o=(n=t==null?void 0:t.querySelector)==null?void 0:n.call(t,e):o=document.querySelector(e),o||fq(`Element not found: ${e}`),o}function bq(e,t,n=null){return function(...o){return e.apply(n,o),t.apply(n,o)}}function _q(e,t){const n=vs({},e);return Object.keys(t).forEach(o=>{n[o]?n[o]=bq(e[o],t[o]):n[o]=t[o]}),n}function wq(e){return e instanceof HTMLElement}function zm(e,t){Object.keys(e).forEach(n=>{t(n,e[n])})}function Sq(e){return e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97)}const Cq=Object.assign;/**!
DesignScreenshot/output/test_run/login_page.html:110:              transform 0.3s ease-out`}},[q(m,{variant:"outline",class:"rounded-full",border:!1,onClick:d[0]||(d[0]=Ze(v=>c.$emit("save",c.id),["stop"]))},{default:E(()=>d[2]||(d[2]=[rt(" save ",-1)])),_:1,__:[2]}),q(m,{class:"rounded-full",border:!1,onClick:d[1]||(d[1]=Ze(v=>c.$emit("copy",c.id),["stop"]))},{default:E(()=>d[3]||(d[3]=[rt(" copy ",-1)])),_:1,__:[3]})],2)],2)]),c.name||c.logo?(C(),B(g,{key:0,name:c.name,logo:c.logo,class:"flex-shrink-0 relative z-30 mt-1"},null,8,["name","logo"])):Be("",!0)],2)}}}),og=F({__name:"Checkbox",props:{defaultValue:{type:[Boolean,String]},modelValue:{type:[Boolean,String,null]},disabled:{type:Boolean},value:{},id:{},asChild:{type:Boolean},as:{},name:{},required:{type:Boolean},class:{}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,o=t,r=et(n,"class"),s=ft(r,o);return(i,a)=>(C(),B(f(iE),te({"data-slot":"checkbox"},f(s),{class:f(Fe)("peer border-input data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",n.class)}),{default:E(()=>[q(f(lE),{"data-slot":"checkbox-indicator",class:"flex items-center justify-center text-current transition-none"},{default:E(()=>[V(i.$slots,"default",{},()=>[q(f(xb),{class:"size-3.5"})])]),_:3})]),_:3},16,["class"]))}}),P$=F({__name:"Popover",props:{defaultOpen:{type:Boolean},open:{type:Boolean},modal:{type:Boolean}},emits:["update:open"],setup(e,{emit:t}){const r=ft(e,t);return(s,i)=>(C(),B(f(_O),te({"data-slot":"popover"},f(r)),{default:E(()=>[V(s.$slots,"default")]),_:3},16))}}),k$=F({inheritAttrs:!1,__name:"PopoverContent",props:{forceMount:{type:Boolean},side:{},sideOffset:{default:4},sideFlip:{type:Boolean},align:{default:"center"},alignOffset:{},alignFlip:{type:Boolean},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},positionStrategy:{},updatePositionStrategy:{},disableUpdateOnLayoutShift:{type:Boolean},prioritizePosition:{type:Boolean},reference:{},asChild:{type:Boolean},as:{},disableOutsidePointerEvents:{type:Boolean},class:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(e,{emit:t}){const n=e,o=t,r=et(n,"class"),s=ft(r,o);return(i,a)=>(C(),B(f(PO),null,{default:E(()=>[q(f(OO),te({"data-slot":"popover-content"},{...f(s),...i.$attrs},{class:f(Fe)("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 rounded-md border p-4 shadow-md origin-(--reka-popover-content-transform-origin) outline-hidden",n.class)}),{default:E(()=>[V(i.$slots,"default")]),_:3},16,["class"])]),_:3}))}}),I$=F({__name:"PopoverTrigger",props:{asChild:{type:Boolean},as:{}},setup(e){const t=e;return(n,o)=>(C(),B(f(IO),te({"data-slot":"popover-trigger"},t),{default:E(()=>[V(n.$slots,"default")]),_:3},16))}}),D$={class:"truncate text-left"},R$={key:0,class:"ml-1.5 font-normal text-xs px-1.5 py-0.5 bg-background/20 rounded-full"},B$={key:0,class:"text-xs mt-1 text-muted-foreground"},M$=["for"],q$=["for"],$$=F({__name:"Dropdown",props:{defaultLabel:{},data:{},selectionMode:{default:"single"},placement:{default:"center"},searchable:{type:Boolean,default:!0}},emits:["change"],setup(e,{expose:t,emit:n}){const o=n,r=N(!1),s=N(""),i=N([]),a=U(()=>!e.data||e.data.length===0||e.data.every(h=>!h.children||h.children.length===0)),l=U(()=>{var h;return((h=e.data)==null?void 0:h.flatMap(m=>m.children??[]))??[]}),u=U(()=>l.value.filter(h=>i.value.includes(h.id))),c=U(()=>{if(!e.data)return[];const h=s.value.toLowerCase();return e.data.map(m=>{var v;const g=(v=m.children)==null?void 0:v.filter(y=>{const b=i.value.includes(y.id),_=y.label.toLowerCase().includes(h);return h?_:!b});return g&&g.length>0?{...m,children:g}:null}).filter(m=>m!==null)}),d=h=>{if(e.selectionMode==="single")i.value=i.value[0]===h?[]:[h],r.value=!1;else{const m=[...i.value],g=m.indexOf(h);g>-1?m.splice(g,1):m.push(h),i.value=m}},p=()=>{i.value=[],s.value=""};return Ce(u,h=>{o("change",h)},{deep:!0}),t({clear:p}),(h,m)=>(C(),B(f(P$),{open:f(r),"onUpdate:open":m[1]||(m[1]=g=>$e(r)?r.value=g:null)},{default:E(()=>[q(f(I$),{"as-child":""},{default:E(()=>[q(f(vn),{variant:f(u).length>0?"default":"outline",role:"combobox","aria-expanded":f(r),class:"h-11 justify-between px-4 font-semibold rounded-full transition-colors duration-200"},{default:E(()=>{var g;return[ce("span",D$,[f(u).length===0?(C(),ie(Ie,{key:0},[rt(Ne(h.defaultLabel),1)],64)):(C(),ie(Ie,{key:1},[rt(Ne((g=f(u)[0])==null?void 0:g.label)+" ",1),h.selectionMode==="multiple"&&f(u).length>1?(C(),ie("span",R$," +"+Ne(f(u).length-1),1)):Be("",!0)],64))]),f(u).length>0?(C(),B(f(Pk),{key:0,class:"ml-2 h-4 w-4 shrink-0 opacity-50",onClick:Ze(p,["stop","prevent"])})):(C(),B(f(Kf),{key:1,class:qe(["ml-2 h-4 w-4 shrink-0 opacity-50 transition-transform",{"rotate-180":f(r)}])},null,8,["class"]))]}),_:1},8,["variant","aria-expanded"])]),_:1}),q(f(k$),{class:"w-80 p-0",align:h.placement},{default:E(()=>[q(f(Cb),{class:"max-h-[480px] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md"},{default:E(()=>[h.searchable?(C(),B(f(Ab),{key:0,modelValue:f(s),"onUpdate:modelValue":m[0]||(m[0]=g=>$e(s)?s.value=g:null),placeholder:"搜索...",class:"h-10 w-full rounded-none border-0 border-b focus-visible:ring-0 focus-visible:ring-offset-0"},null,8,["modelValue"])):Be("",!0),q(f(Ob),{class:"flex-1 overflow-y-auto overscroll-contain custom-scrollbar"},{default:E(()=>[q(f(Eb),{class:"py-6 text-center text-sm"},{default:E(()=>[ce("p",null,Ne(f(a)?"暂无数据":"未找到结果"),1),f(a)?Be("",!0):(C(),ie("p",B$,"请尝试其他关键词"))]),_:1}),f(u).length>0&&f(s)===""?(C(),B(f(Rd),{key:0,heading:"已选"},{default:E(()=>[(C(!0),ie(Ie,null,wt(f(u),g=>(C(),B(f(Dd),{key:`selected-${g.id}`,value:g.label,onSelect:Ze(v=>d(g.id),["prevent"]),class:"cursor-pointer"},{default:E(()=>[q(f(og),{id:`selected-${g.id}`,"model-value":!0,class:"mr-2"},null,8,["id"]),ce("label",{for:`selected-${g.id}`,class:"cursor-pointer"},Ne(g.label),9,M$)]),_:2},1032,["value","onSelect"]))),128))]),_:1})):Be("",!0),(C(!0),ie(Ie,null,wt(f(c),g=>(C(),B(f(Rd),{key:g.label,heading:g.label},{default:E(()=>[(C(!0),ie(Ie,null,wt(g.children,v=>(C(),B(f(Dd),{key:v.id,value:v.label,onSelect:Ze(y=>d(v.id),["prevent"]),class:"cursor-pointer"},{default:E(()=>[q(f(og),{id:v.id,"model-value":f(i).includes(v.id),class:"mr-2"},null,8,["id","model-value"]),ce("label",{for:v.id,class:"cursor-pointer"},Ne(v.label),9,q$)]),_:2},1032,["value","onSelect"]))),128))]),_:2},1032,["heading"]))),128))]),_:1})]),_:1})]),_:1},8,["align"])]),_:1},8,["open"]))}}),gl=Lu($$,[["__scopeId","data-v-cce68d8f"]]),F$={class:"flex flex-col gap-6"},L$={class:"flex gap-8"},N$={class:"w-24 h-24"},j$={class:"flex-1 flex items-center"},V$={class:"text-5xl font-semibold text-primary"},U$={class:"flex gap-8"},H$={class:"flex flex-col gap-1"},z$={class:"text-sm font-semibold text-primary text-center"},K$={class:"flex flex-col gap-1"},W$={class:"text-sm font-semibold text-primary text-center"},G$=F({__name:"StoreAppCard",props:{logoUrl:{},name:{},description:{},platform:{},rating:{},categories:{}},emits:["click"],setup(e,{emit:t}){return(n,o)=>{var s;const r=ri;return C(),ie("div",F$,[ce("div",L$,[ce("div",N$,[q(r,{src:n.logoUrl,class:"rounded-3xl"},null,8,["src"])]),ce("div",j$,[ce("span",V$,Ne(n.name)+"—"+Ne(n.description),1)])]),ce("div",U$,[ce("div",H$,[o[0]||(o[0]=ce("span",{class:"text-sm text-textSecondary"},"Platform",-1)),ce("span",z$,Ne(n.platform),1)]),ce("div",K$,[o[1]||(o[1]=ce("span",{class:"text-sm text-textSecondary"},"Category",-1)),ce("span",W$,Ne((s=n.categories)==null?void 0:s.join(", ")),1)])])])}}}),Q$=e=>Sr("/admin/app-info/create",e),Y$=e=>wr("/admin/screen/page",e),X$=F({__name:"Select",props:{open:{type:Boolean},defaultOpen:{type:Boolean},defaultValue:{},modelValue:{},by:{type:[String,Function]},dir:{},multiple:{type:Boolean},autocomplete:{},disabled:{type:Boolean},name:{},required:{type:Boolean}},emits:["update:modelValue","update:open"],setup(e,{emit:t}){const r=ft(e,t);return(s,i)=>(C(),B(f(kT),te({"data-slot":"select"},f(r)),{default:E(()=>[V(s.$slots,"default")]),_:3},16))}}),J$=F({inheritAttrs:!1,__name:"SelectContent",props:{forceMount:{type:Boolean},position:{default:"popper"},bodyLock:{type:Boolean},side:{},sideOffset:{},sideFlip:{type:Boolean},align:{},alignOffset:{},alignFlip:{type:Boolean},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},positionStrategy:{},updatePositionStrategy:{},disableUpdateOnLayoutShift:{type:Boolean},prioritizePosition:{type:Boolean},reference:{},asChild:{type:Boolean},as:{},class:{}},emits:["closeAutoFocus","escapeKeyDown","pointerDownOutside"],setup(e,{emit:t}){const n=e,o=t,r=et(n,"class"),s=ft(r,o);return(i,a)=>(C(),B(f(oP),null,{default:E(()=>[q(f(UT),te({"data-slot":"select-content"},{...f(s),...i.$attrs},{class:f(Fe)("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--reka-select-content-available-height) min-w-[8rem] overflow-x-hidden overflow-y-auto rounded-md border shadow-md",i.position==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",n.class)}),{default:E(()=>[q(f(oF)),q(f(hP),{class:qe(f(Fe)("p-1",i.position==="popper"&&"h-[var(--reka-select-trigger-height)] w-full min-w-[var(--reka-select-trigger-width)] scroll-my-1"))},{default:E(()=>[V(i.$slots,"default")]),_:3},8,["class"]),q(f(nF))]),_:3},16,["class"])]),_:3}))}}),Z$=F({__name:"SelectGroup",props:{asChild:{type:Boolean},as:{}},setup(e){const t=e;return(n,o)=>(C(),B(f(KT),te({"data-slot":"select-group"},t),{default:E(()=>[V(n.$slots,"default")]),_:3},16))}}),eF={class:"absolute right-2 flex size-3.5 items-center justify-center"},tF=F({__name:"SelectItem",props:{value:{},disabled:{type:Boolean},textValue:{},asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,n=et(t,"class"),o=Kt(n);return(r,s)=>(C(),B(f(XT),te({"data-slot":"select-item"},f(o),{class:f(Fe)("focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",t.class)}),{default:E(()=>[ce("span",eF,[q(f(ZT),null,{default:E(()=>[q(f(xb),{class:"size-4"})]),_:1})]),q(f(tP),null,{default:E(()=>[V(r.$slots,"default")]),_:3})]),_:3},16,["class"]))}}),nF=F({__name:"SelectScrollDownButton",props:{asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,n=et(t,"class"),o=Kt(n);return(r,s)=>(C(),B(f(iP),te({"data-slot":"select-scroll-down-button"},f(o),{class:f(Fe)("flex cursor-default items-center justify-center py-1",t.class)}),{default:E(()=>[V(r.$slots,"default",{},()=>[q(f(Kf),{class:"size-4"})])]),_:3},16,["class"]))}}),oF=F({__name:"SelectScrollUpButton",props:{asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,n=et(t,"class"),o=Kt(n);return(r,s)=>(C(),B(f(lP),te({"data-slot":"select-scroll-up-button"},f(o),{class:f(Fe)("flex cursor-default items-center justify-center py-1",t.class)}),{default:E(()=>[V(r.$slots,"default",{},()=>[q(f(Tk),{class:"size-4"})])]),_:3},16,["class"]))}}),rF=F({__name:"SelectTrigger",props:{disabled:{type:Boolean},reference:{},asChild:{type:Boolean},as:{},class:{},size:{default:"default"}},setup(e){const t=e,n=et(t,"class","size"),o=Kt(n);return(r,s)=>(C(),B(f(cP),te({"data-slot":"select-trigger","data-size":r.size},f(o),{class:f(Fe)("border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t.class)}),{default:E(()=>[V(r.$slots,"default"),q(f(GT),{"as-child":""},{default:E(()=>[q(f(Kf),{class:"size-4 opacity-50"})]),_:1})]),_:3},16,["data-size","class"]))}}),sF=F({__name:"SelectValue",props:{placeholder:{},asChild:{type:Boolean},as:{}},setup(e){const t=e;return(n,o)=>(C(),B(f(fP),te({"data-slot":"select-value"},t),{default:E(()=>[V(n.$slots,"default")]),_:3},16))}}),rg=e=>Array.isArray(e)&&e.length>0,iF={class:"flex flex-col gap-3 pb-10"},aF={class:"sticky-dropdown-filters flex py-2 gap-2"},lF={key:1,class:"text-center p-10"},uF=F({__name:"Details",setup(e){const t=T_(),{definitions:n}=va($u()),o=ya(),r=N(t.query.platform),s=U(()=>((r==null?void 0:r.value)==="web"?ql:Ks).slice(1)),i=N(s.value[0].label),a=T=>{var P;const A=(P=s.value.find(w=>w.label===T))==null?void 0:P.value,D=n.value.find(w=>w.slug===A&&w.platformType===r.value);return D==null?void 0:D.children},l=U(()=>Number(t.query.id)),{data:u,isLoading:c}=hC({queryKey:["appDetails",l],queryFn:async()=>{const T=await xB(l.value)||[];return rg(T)&&(T.sort((A,D)=>new Date(D.createTime).getTime()-new Date(A.createTime).getTime()),T.forEach(A=>{A.appSections=A.appSections||[]})),T},enabled:U(()=>!!l.value)}),d=N(""),p=U(()=>u.value?u.value.map(T=>({id:T.externalVersionId,label:T.createTime,value:T.externalVersionId})):[]);Ce(()=>u.value,T=>{T&&rg(T)&&(d.value=T[0].externalVersionId)},{immediate:!0});const h=U(()=>{var T;return!u.value||!d.value?(T=u.value)==null?void 0:T[0]:u.value.find(A=>A.externalVersionId===d.value)}),m=N();Ce(h,T=>{T?m.value=JSON.parse(JSON.stringify(T)):m.value=void 0},{deep:!0,immediate:!0});const g=N([]),v=T=>{g.value=(T==null?void 0:T.map(A=>A.displayName))||[]},y=U(()=>{if(m.value&&m.value.appSections)return m.value.appSections.map(A=>A.screens).flat().filter(Boolean)}),b=U(()=>{if(y.value&&y.value.length>0){let T=y.value;return g.value.length>0&&(i.value==="Screens"&&(T=T.filter(A=>A.screenPatterns&&Fm(A.screenPatterns,g.value))),i.value==="UI Elements"&&(T=T.filter(A=>A.screenElements&&Fm(A.screenElements,g.value)))),T}}),_=Ii({mutationFn:Q$,onSuccess:()=>{o.invalidateQueries({queryKey:["appDetails",l.value]})}}),O=()=>{if(!m.value||!m.value.id){console.warn("App info not available to create a new AppInfo.");return}_.mutate({appId:m.value.id})};return(T,A)=>{const D=G$,P=gl,w=Ho,k=tw,$=T$;return C(),ie("div",iF,[f(m)?(C(),B(D,{key:0,name:f(m).appName,"logo-url":f(m).appLogoUrl,platform:f(m).platform,description:f(m).appTagline,categories:f(m).allAppCategories},null,8,["name","logo-url","platform","description","categories"])):Be("",!0),q(f(rp),{modelValue:f(i),"onUpdate:modelValue":A[0]||(A[0]=R=>$e(i)?i.value=R:null),class:"!-ml-2"},{default:E(()=>[q(f(sp),{class:"bg-transparent p-0"},{default:E(()=>[(C(!0),ie(Ie,null,wt(f(s),R=>(C(),B(f(ip),{key:R.label,value:R.label,class:"!font-bold"},{default:E(()=>[rt(Ne(R.label),1)]),_:2},1032,["value"]))),128))]),_:1})]),_:1},8,["modelValue"]),ce("div",aF,[q(f(X$),{modelValue:f(d),"onUpdate:modelValue":A[1]||(A[1]=R=>$e(d)?d.value=R:null)},{default:E(()=>[q(f(rF),{class:"w-60 !h-11 rounded-full"},{default:E(()=>[q(f(sF),{placeholder:"Version",class:"font-bold truncate text-base"})]),_:1}),q(f(J$),null,{default:E(()=>[q(f(Z$),null,{default:E(()=>[(C(!0),ie(Ie,null,wt(f(p),R=>(C(),B(f(tF),{key:R.id,value:R.value},{default:E(()=>[rt(Ne(R.label),1)]),_:2},1032,["value"]))),128))]),_:1})]),_:1})]),_:1},8,["modelValue"]),(C(),B(P,{key:f(i),"default-label":f(i),data:a(f(i)),onChange:v,"selection-mode":"multiple",placement:"start"},null,8,["default-label","data"])),f(i)==="Flows"?(C(),B(f(ap),{key:0,title:"确定要创建新的Flow吗？",description:"这将创建一个新的App的Flow版本。",onConfirm:O},{default:E(()=>[q(f(vn),{disabled:f(_).isPending.value,class:"flex items-center gap-2 cursor-pointer"},{default:E(()=>[q(w,{icon:f(_).isPending.value?"eos-icons:loading":"ep:plus",class:"text-sm"},null,8,["icon"]),A[3]||(A[3]=ce("span",null,"Create New Flow",-1))]),_:1,__:[3]},8,["disabled"])]),_:1})):Be("",!0)]),f(c)?(C(),ie("div",lF,"Loading...")):f(i)==="Screens"||f(i)==="UI Elements"||f(i)==="Marketing Pages"?(C(),ie("div",{key:2,class:qe(["grid gap-x-5 gap-y-12 flex-1",f(r)==="web"?"grid-cols-[repeat(auto-fill,minmax(min(100%,500px),1fr))]":"grid-cols-[repeat(auto-fill,minmax(min(100%,230px),1fr))]"])},[(C(!0),ie(Ie,null,wt(f(b),(R,G)=>(C(),B(k,{key:G,id:R.id,src:R.screenUrl,platform:f(r)},null,8,["id","src","platform"]))),128))],2)):Be("",!0),f(i)==="Flows"&&f(m)?(C(),B($,{key:3,modelValue:f(m).appSections,"onUpdate:modelValue":A[2]||(A[2]=R=>f(m).appSections=R),platform:f(r),"app-info-id":f(m).id},null,8,["modelValue","platform","app-info-id"])):Be("",!0)])}}}),cF=Lu(uF,[["__scopeId","data-v-282accd6"]]);function dF(e){return Object.prototype.toString.call(e)==="[object Object]"}function sg(e){return dF(e)||Array.isArray(e)}function fF(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function fp(e,t){const n=Object.keys(e),o=Object.keys(t);if(n.length!==o.length)return!1;const r=JSON.stringify(Object.keys(e.breakpoints||{})),s=JSON.stringify(Object.keys(t.breakpoints||{}));return r!==s?!1:n.every(i=>{const a=e[i],l=t[i];return typeof a=="function"?`${a}`==`${l}`:!sg(a)||!sg(l)?a===l:fp(a,l)})}function ig(e){return e.concat().sort((t,n)=>t.name>n.name?1:-1).map(t=>t.options)}function pF(e,t){if(e.length!==t.length)return!1;const n=ig(e),o=ig(t);return n.every((r,s)=>{const i=o[s];return fp(r,i)})}function pp(e){return typeof e=="number"}function ef(e){return typeof e=="string"}function Nu(e){return typeof e=="boolean"}function ag(e){return Object.prototype.toString.call(e)==="[object Object]"}function _t(e){return Math.abs(e)}function hp(e){return Math.sign(e)}function Vi(e,t){return _t(e-t)}function hF(e,t){if(e===0||t===0||_t(e)<=_t(t))return 0;const n=Vi(_t(e),_t(t));return _t(n/e)}function mF(e){return Math.round(e*100)/100}function ia(e){return aa(e).map(Number)}function jn(e){return e[Ia(e)]}function Ia(e){return Math.max(0,e.length-1)}function mp(e,t){return t===Ia(e)}function lg(e,t=0){return Array.from(Array(e),(n,o)=>t+o)}function aa(e){return Object.keys(e)}function nw(e,t){return[e,t].reduce((n,o)=>(aa(o).forEach(r=>{const s=n[r],i=o[r],a=ag(s)&&ag(i);n[r]=a?nw(s,i):i}),n),{})}function tf(e,t){return typeof t.MouseEvent<"u"&&e instanceof t.MouseEvent}function gF(e,t){const n={start:o,center:r,end:s};function o(){return 0}function r(l){return s(l)/2}function s(l){return t-l}function i(l,u){return ef(e)?n[e](l):e(t,l,u)}return{measure:i}}function la(){let e=[];function t(r,s,i,a={passive:!0}){let l;if("addEventListener"in r)r.addEventListener(s,i,a),l=()=>r.removeEventListener(s,i,a);else{const u=r;u.addListener(i),l=()=>u.removeListener(i)}return e.push(l),o}function n(){e=e.filter(r=>r())}const o={add:t,clear:n};return o}function vF(e,t,n,o){const r=la(),s=1e3/60;let i=null,a=0,l=0;function u(){r.add(e,"visibilitychange",()=>{e.hidden&&m()})}function c(){h(),r.clear()}function d(v){if(!l)return;i||(i=v,n(),n());const y=v-i;for(i=v,a+=y;a>=s;)n(),a-=s;const b=a/s;o(b),l&&(l=t.requestAnimationFrame(d))}function p(){l||(l=t.requestAnimationFrame(d))}function h(){t.cancelAnimationFrame(l),i=null,a=0,l=0}function m(){i=null,a=0}return{init:u,destroy:c,start:p,stop:h,update:n,render:o}}function yF(e,t){const n=t==="rtl",o=e==="y",r=o?"y":"x",s=o?"x":"y",i=!o&&n?-1:1,a=c(),l=d();function u(m){const{height:g,width:v}=m;return o?g:v}function c(){return o?"top":n?"right":"left"}function d(){return o?"bottom":n?"left":"right"}function p(m){return m*i}return{scroll:r,cross:s,startEdge:a,endEdge:l,measureSize:u,direction:p}}function es(e=0,t=0){const n=_t(e-t);function o(u){return u<e}function r(u){return u>t}function s(u){return o(u)||r(u)}function i(u){return s(u)?o(u)?e:t:u}function a(u){return n?u-n*Math.ceil((u-t)/n):u}return{length:n,max:t,min:e,constrain:i,reachedAny:s,reachedMax:r,reachedMin:o,removeOffset:a}}function ow(e,t,n){const{constrain:o}=es(0,e),r=e+1;let s=i(t);function i(p){return n?_t((r+p)%r):o(p)}function a(){return s}function l(p){return s=i(p),d}function u(p){return c().set(a()+p)}function c(){return ow(e,a(),n)}const d={get:a,set:l,add:u,clone:c};return d}function bF(e,t,n,o,r,s,i,a,l,u,c,d,p,h,m,g,v,y,b){const{cross:_,direction:O}=e,T=["INPUT","SELECT","TEXTAREA"],A={passive:!1},D=la(),P=la(),w=es(50,225).constrain(h.measure(20)),k={mouse:300,touch:400},$={mouse:500,touch:600},R=m?43:25;let G=!1,J=0,ne=0,ae=!1,re=!1,L=!1,oe=!1;function Y(S){if(!b)return;function I(K){(Nu(b)||b(S,K))&&Se(K)}const j=t;D.add(j,"dragstart",K=>K.preventDefault(),A).add(j,"touchmove",()=>{},A).add(j,"touchend",()=>{}).add(j,"touchstart",I).add(j,"mousedown",I).add(j,"touchcancel",z).add(j,"contextmenu",z).add(j,"click",H,!0)}function ee(){D.clear(),P.clear()}function le(){const S=oe?n:t;P.add(S,"touchmove",x,A).add(S,"touchend",z).add(S,"mousemove",x,A).add(S,"mouseup",z)}function ye(S){const I=S.nodeName||"";return T.includes(I)}function me(){return(m?$:k)[oe?"mouse":"touch"]}function Pe(S,I){const j=d.add(hp(S)*-1),K=c.byDistance(S,!m).distance;return m||_t(S)<w?K:v&&I?K*.5:c.byIndex(j.get(),0).distance}function Se(S){const I=tf(S,o);oe=I,L=m&&I&&!S.buttons&&G,G=Vi(r.get(),i.get())>=2,!(I&&S.button!==0)&&(ye(S.target)||(ae=!0,s.pointerDown(S),u.useFriction(0).useDuration(0),r.set(i),le(),J=s.readPoint(S),ne=s.readPoint(S,_),p.emit("pointerDown")))}function x(S){if(!tf(S,o)&&S.touches.length>=2)return z(S);const j=s.readPoint(S),K=s.readPoint(S,_),Z=Vi(j,J),Q=Vi(K,ne);if(!re&&!oe&&(!S.cancelable||(re=Z>Q,!re)))return z(S);const ue=s.pointerMove(S);Z>g&&(L=!0),u.useFriction(.3).useDuration(.75),a.start(),r.add(O(ue)),S.preventDefault()}function z(S){const j=c.byDistance(0,!1).index!==d.get(),K=s.pointerUp(S)*me(),Z=Pe(O(K),j),Q=hF(K,Z),ue=R-10*Q,fe=y+Q/50;re=!1,ae=!1,P.clear(),u.useDuration(ue).useFriction(fe),l.distance(Z,!m),oe=!1,p.emit("pointerUp")}function H(S){L&&(S.stopPropagation(),S.preventDefault(),L=!1)}function X(){return ae}return{init:Y,destroy:ee,pointerDown:X}}function _F(e,t){let o,r;function s(d){return d.timeStamp}function i(d,p){const m=`client${(p||e.scroll)==="x"?"X":"Y"}`;return(tf(d,t)?d:d.touches[0])[m]}function a(d){return o=d,r=d,i(d)}function l(d){const p=i(d)-i(r),h=s(d)-s(o)>170;return r=d,h&&(o=d),p}function u(d){if(!o||!r)return 0;const p=i(r)-i(o),h=s(d)-s(o),m=s(d)-s(r)>170,g=p/h;return h&&!m&&_t(g)>.1?g:0}return{pointerDown:a,pointerMove:l,pointerUp:u,readPoint:i}}function wF(){function e(n){const{offsetTop:o,offsetLeft:r,offsetWidth:s,offsetHeight:i}=n;return{top:o,right:r+s,bottom:o+i,left:r,width:s,height:i}}return{measure:e}}function SF(e){function t(o){return e*(o/100)}return{measure:t}}function CF(e,t,n,o,r,s,i){const a=[e].concat(o);let l,u,c=[],d=!1;function p(v){return r.measureSize(i.measure(v))}function h(v){if(!s)return;u=p(e),c=o.map(p);function y(b){for(const _ of b){if(d)return;const O=_.target===e,T=o.indexOf(_.target),A=O?u:c[T],D=p(O?e:o[T]);if(_t(D-A)>=.5){v.reInit(),t.emit("resize");break}}}l=new ResizeObserver(b=>{(Nu(s)||s(v,b))&&y(b)}),n.requestAnimationFrame(()=>{a.forEach(b=>l.observe(b))})}function m(){d=!0,l&&l.disconnect()}return{init:h,destroy:m}}function xF(e,t,n,o,r,s){let i=0,a=0,l=r,u=s,c=e.get(),d=0;function p(){const A=o.get()-e.get(),D=!l;let P=0;return D?(i=0,n.set(o),e.set(o),P=A):(n.set(e),i+=A/l,i*=u,c+=i,e.add(i),P=c-d),a=hp(P),d=c,T}function h(){const A=o.get()-t.get();return _t(A)<.001}function m(){return l}function g(){return a}function v(){return i}function y(){return _(r)}function b(){return O(s)}function _(A){return l=A,T}function O(A){return u=A,T}const T={direction:g,duration:m,velocity:v,seek:p,settled:h,useBaseFriction:b,useBaseDuration:y,useFriction:O,useDuration:_};return T}function EF(e,t,n,o,r){const s=r.measure(10),i=r.measure(50),a=es(.1,.99);let l=!1;function u(){return!(l||!e.reachedAny(n.get())||!e.reachedAny(t.get()))}function c(h){if(!u())return;const m=e.reachedMin(t.get())?"min":"max",g=_t(e[m]-t.get()),v=n.get()-t.get(),y=a.constrain(g/i);n.subtract(v*y),!h&&_t(v)<s&&(n.set(e.constrain(n.get())),o.useDuration(25).useBaseFriction())}function d(h){l=!h}return{shouldConstrain:u,constrain:c,toggleActive:d}}function AF(e,t,n,o,r){const s=es(-t+e,0),i=d(),a=c(),l=p();function u(m,g){return Vi(m,g)<=1}function c(){const m=i[0],g=jn(i),v=i.lastIndexOf(m),y=i.indexOf(g)+1;return es(v,y)}function d(){return n.map((m,g)=>{const{min:v,max:y}=s,b=s.constrain(m),_=!g,O=mp(n,g);return _?y:O||u(v,b)?v:u(y,b)?y:b}).map(m=>parseFloat(m.toFixed(3)))}function p(){if(t<=e+r)return[s.max];if(o==="keepSnaps")return i;const{min:m,max:g}=a;return i.slice(m,g)}return{snapsContained:l,scrollContainLimit:a}}function OF(e,t,n){const o=t[0],r=n?o-e:jn(t);return{limit:es(r,o)}}function TF(e,t,n,o){const s=t.min+.1,i=t.max+.1,{reachedMin:a,reachedMax:l}=es(s,i);function u(p){return p===1?l(n.get()):p===-1?a(n.get()):!1}function c(p){if(!u(p))return;const h=e*(p*-1);o.forEach(m=>m.add(h))}return{loop:c}}function PF(e){const{max:t,length:n}=e;function o(s){const i=s-t;return n?i/-n:0}return{get:o}}function kF(e,t,n,o,r){const{startEdge:s,endEdge:i}=e,{groupSlides:a}=r,l=d().map(t.measure),u=p(),c=h();function d(){return a(o).map(g=>jn(g)[i]-g[0][s]).map(_t)}function p(){return o.map(g=>n[s]-g[s]).map(g=>-_t(g))}function h(){return a(u).map(g=>g[0]).map((g,v)=>g+l[v])}return{snaps:u,snapsAligned:c}}function IF(e,t,n,o,r,s){const{groupSlides:i}=r,{min:a,max:l}=o,u=c();function c(){const p=i(s),h=!e||t==="keepSnaps";return n.length===1?[s]:h?p:p.slice(a,l).map((m,g,v)=>{const y=!g,b=mp(v,g);if(y){const _=jn(v[0])+1;return lg(_)}if(b){const _=Ia(s)-jn(v)[0]+1;return lg(_,jn(v)[0])}return m})}return{slideRegistry:u}}function DF(e,t,n,o,r){const{reachedAny:s,removeOffset:i,constrain:a}=o;function l(m){return m.concat().sort((g,v)=>_t(g)-_t(v))[0]}function u(m){const g=e?i(m):a(m),v=t.map((b,_)=>({diff:c(b-g,0),index:_})).sort((b,_)=>_t(b.diff)-_t(_.diff)),{index:y}=v[0];return{index:y,distance:g}}function c(m,g){const v=[m,m+n,m-n];if(!e)return m;if(!g)return l(v);const y=v.filter(b=>hp(b)===g);return y.length?l(y):jn(v)-n}function d(m,g){const v=t[m]-r.get(),y=c(v,g);return{index:m,distance:y}}function p(m,g){const v=r.get()+m,{index:y,distance:b}=u(v),_=!e&&s(v);if(!g||_)return{index:y,distance:m};const O=t[y]-b,T=m+c(O,0);return{index:y,distance:T}}return{byDistance:p,byIndex:d,shortcut:c}}function RF(e,t,n,o,r,s,i){function a(d){const p=d.distance,h=d.index!==t.get();s.add(p),p&&(o.duration()?e.start():(e.update(),e.render(1),e.update())),h&&(n.set(t.get()),t.set(d.index),i.emit("select"))}function l(d,p){const h=r.byDistance(d,p);a(h)}function u(d,p){const h=t.clone().set(d),m=r.byIndex(h.get(),p);a(m)}return{distance:l,index:u}}function BF(e,t,n,o,r,s,i,a){const l={passive:!0,capture:!0};let u=0;function c(h){if(!a)return;function m(g){if(new Date().getTime()-u>10)return;i.emit("slideFocusStart"),e.scrollLeft=0;const b=n.findIndex(_=>_.includes(g));pp(b)&&(r.useDuration(0),o.index(b,0),i.emit("slideFocus"))}s.add(document,"keydown",d,!1),t.forEach((g,v)=>{s.add(g,"focus",y=>{(Nu(a)||a(h,y))&&m(v)},l)})}function d(h){h.code==="Tab"&&(u=new Date().getTime())}return{init:c}}function wi(e){let t=e;function n(){return t}function o(l){t=i(l)}function r(l){t+=i(l)}function s(l){t-=i(l)}function i(l){return pp(l)?l:l.get()}return{get:n,set:o,add:r,subtract:s}}function rw(e,t){const n=e.scroll==="x"?i:a,o=t.style;let r=null,s=!1;function i(p){return`translate3d(${p}px,0px,0px)`}function a(p){return`translate3d(0px,${p}px,0px)`}function l(p){if(s)return;const h=mF(e.direction(p));h!==r&&(o.transform=n(h),r=h)}function u(p){s=!p}function c(){s||(o.transform="",t.getAttribute("style")||t.removeAttribute("style"))}return{clear:c,to:l,toggleActive:u}}function MF(e,t,n,o,r,s,i,a,l){const c=ia(r),d=ia(r).reverse(),p=y().concat(b());function h(D,P){return D.reduce((w,k)=>w-r[k],P)}function m(D,P){return D.reduce((w,k)=>h(w,P)>0?w.concat([k]):w,[])}function g(D){return s.map((P,w)=>({start:P-o[w]+.5+D,end:P+t-.5+D}))}function v(D,P,w){const k=g(P);return D.map($=>{const R=w?0:-n,G=w?n:0,J=w?"end":"start",ne=k[$][J];return{index:$,loopPoint:ne,slideLocation:wi(-1),translate:rw(e,l[$]),target:()=>a.get()>ne?R:G}})}function y(){const D=i[0],P=m(d,D);return v(P,n,!1)}function b(){const D=t-i[0]-1,P=m(c,D);return v(P,-n,!0)}function _(){return p.every(({index:D})=>{const P=c.filter(w=>w!==D);return h(P,t)<=.1})}function O(){p.forEach(D=>{const{target:P,translate:w,slideLocation:k}=D,$=P();$!==k.get()&&(w.to($),k.set($))})}function T(){p.forEach(D=>D.translate.clear())}return{canLoop:_,clear:T,loop:O,loopPoints:p}}function qF(e,t,n){let o,r=!1;function s(l){if(!n)return;function u(c){for(const d of c)if(d.type==="childList"){l.reInit(),t.emit("slidesChanged");break}}o=new MutationObserver(c=>{r||(Nu(n)||n(l,c))&&u(c)}),o.observe(e,{childList:!0})}function i(){o&&o.disconnect(),r=!0}return{init:s,destroy:i}}function $F(e,t,n,o){const r={};let s=null,i=null,a,l=!1;function u(){a=new IntersectionObserver(m=>{l||(m.forEach(g=>{const v=t.indexOf(g.target);r[v]=g}),s=null,i=null,n.emit("slidesInView"))},{root:e.parentElement,threshold:o}),t.forEach(m=>a.observe(m))}function c(){a&&a.disconnect(),l=!0}function d(m){return aa(r).reduce((g,v)=>{const y=parseInt(v),{isIntersecting:b}=r[y];return(m&&b||!m&&!b)&&g.push(y),g},[])}function p(m=!0){if(m&&s)return s;if(!m&&i)return i;const g=d(m);return m&&(s=g),m||(i=g),g}return{init:u,destroy:c,get:p}}function FF(e,t,n,o,r,s){const{measureSize:i,startEdge:a,endEdge:l}=e,u=n[0]&&r,c=m(),d=g(),p=n.map(i),h=v();function m(){if(!u)return 0;const b=n[0];return _t(t[a]-b[a])}function g(){if(!u)return 0;const b=s.getComputedStyle(jn(o));return parseFloat(b.getPropertyValue(`margin-${l}`))}function v(){return n.map((b,_,O)=>{const T=!_,A=mp(O,_);return T?p[_]+c:A?p[_]+d:O[_+1][a]-b[a]}).map(_t)}return{slideSizes:p,slideSizesWithGaps:h,startGap:c,endGap:d}}function LF(e,t,n,o,r,s,i,a,l){const{startEdge:u,endEdge:c,direction:d}=e,p=pp(n);function h(y,b){return ia(y).filter(_=>_%b===0).map(_=>y.slice(_,_+b))}function m(y){return y.length?ia(y).reduce((b,_,O)=>{const T=jn(b)||0,A=T===0,D=_===Ia(y),P=r[u]-s[T][u],w=r[u]-s[_][c],k=!o&&A?d(i):0,$=!o&&D?d(a):0,R=_t(w-$-(P+k));return O&&R>t+l&&b.push(_),D&&b.push(y.length),b},[]).map((b,_,O)=>{const T=Math.max(O[_-1]||0);return y.slice(T,b)}):[]}function g(y){return p?h(y,n):m(y)}return{groupSlides:g}}function NF(e,t,n,o,r,s,i){const{align:a,axis:l,direction:u,startIndex:c,loop:d,duration:p,dragFree:h,dragThreshold:m,inViewThreshold:g,slidesToScroll:v,skipSnaps:y,containScroll:b,watchResize:_,watchSlides:O,watchDrag:T,watchFocus:A}=s,D=2,P=wF(),w=P.measure(t),k=n.map(P.measure),$=yF(l,u),R=$.measureSize(w),G=SF(R),J=gF(a,R),ne=!d&&!!b,ae=d||!!b,{slideSizes:re,slideSizesWithGaps:L,startGap:oe,endGap:Y}=FF($,w,k,n,ae,r),ee=LF($,R,v,d,w,k,oe,Y,D),{snaps:le,snapsAligned:ye}=kF($,J,w,k,ee),me=-jn(le)+jn(L),{snapsContained:Pe,scrollContainLimit:Se}=AF(R,me,ye,b,D),x=ne?Pe:ye,{limit:z}=OF(me,x,d),H=ow(Ia(x),c,d),X=H.clone(),pe=ia(n),S=({dragHandler:mt,scrollBody:$t,scrollBounds:Ft,options:{loop:yn}})=>{yn||Ft.constrain(mt.pointerDown()),$t.seek()},I=({scrollBody:mt,translate:$t,location:Ft,offsetLocation:yn,previousLocation:Cr,scrollLooper:Bt,slideLooper:Lt,dragHandler:Qn,animation:Yn,eventHandler:vp,scrollBounds:iw,options:{loop:yp}},bp)=>{const _p=mt.settled(),aw=!iw.shouldConstrain(),wp=yp?_p:_p&&aw,Sp=wp&&!Qn.pointerDown();Sp&&Yn.stop();const lw=Ft.get()*bp+Cr.get()*(1-bp);yn.set(lw),yp&&(Bt.loop(mt.direction()),Lt.loop()),$t.to(yn.get()),Sp&&vp.emit("settle"),wp||vp.emit("scroll")},j=vF(o,r,()=>S(At),mt=>I(At,mt)),K=.68,Z=x[H.get()],Q=wi(Z),ue=wi(Z),fe=wi(Z),de=wi(Z),se=xF(Q,fe,ue,de,p,K),xe=DF(d,x,me,z,de),ge=RF(j,H,X,se,xe,de,i),Ee=PF(z),ke=la(),He=$F(t,n,i,g),{slideRegistry:tt}=IF(ne,b,x,Se,ee,pe),Ye=BF(e,n,tt,ge,se,ke,i,A),At={ownerDocument:o,ownerWindow:r,eventHandler:i,containerRect:w,slideRects:k,animation:j,axis:$,dragHandler:bF($,e,o,r,de,_F($,r),Q,j,ge,se,xe,H,i,G,h,m,y,K,T),eventStore:ke,percentOfView:G,index:H,indexPrevious:X,limit:z,location:Q,offsetLocation:fe,previousLocation:ue,options:s,resizeHandler:CF(t,i,r,n,$,_,P),scrollBody:se,scrollBounds:EF(z,fe,de,se,G),scrollLooper:TF(me,z,fe,[Q,fe,ue,de]),scrollProgress:Ee,scrollSnapList:x.map(Ee.get),scrollSnaps:x,scrollTarget:xe,scrollTo:ge,slideLooper:MF($,R,me,re,L,le,x,fe,n),slideFocus:Ye,slidesHandler:qF(t,i,O),slidesInView:He,slideIndexes:pe,slideRegistry:tt,slidesToScroll:ee,target:de,translate:rw($,t)};return At}function jF(){let e={},t;function n(u){t=u}function o(u){return e[u]||[]}function r(u){return o(u).forEach(c=>c(t,u)),l}function s(u,c){return e[u]=o(u).concat([c]),l}function i(u,c){return e[u]=o(u).filter(d=>d!==c),l}function a(){e={}}const l={init:n,emit:r,off:i,on:s,clear:a};return l}const VF={align:"center",axis:"x",container:null,slides:null,containScroll:"trimSnaps",direction:"ltr",slidesToScroll:1,inViewThreshold:0,breakpoints:{},dragFree:!1,dragThreshold:10,loop:!1,skipSnaps:!1,duration:25,startIndex:0,active:!0,watchDrag:!0,watchResize:!0,watchSlides:!0,watchFocus:!0};function UF(e){function t(s,i){return nw(s,i||{})}function n(s){const i=s.breakpoints||{},a=aa(i).filter(l=>e.matchMedia(l).matches).map(l=>i[l]).reduce((l,u)=>t(l,u),{});return t(s,a)}function o(s){return s.map(i=>aa(i.breakpoints||{})).reduce((i,a)=>i.concat(a),[]).map(e.matchMedia)}return{mergeOptions:t,optionsAtMedia:n,optionsMediaQueries:o}}function HF(e){let t=[];function n(s,i){return t=i.filter(({options:a})=>e.optionsAtMedia(a).active!==!1),t.forEach(a=>a.init(s,e)),i.reduce((a,l)=>Object.assign(a,{[l.name]:l}),{})}function o(){t=t.filter(s=>s.destroy())}return{init:n,destroy:o}}function Ul(e,t,n){const o=e.ownerDocument,r=o.defaultView,s=UF(r),i=HF(s),a=la(),l=jF(),{mergeOptions:u,optionsAtMedia:c,optionsMediaQueries:d}=s,{on:p,off:h,emit:m}=l,g=$;let v=!1,y,b=u(VF,Ul.globalOptions),_=u(b),O=[],T,A,D;function P(){const{container:pe,slides:S}=_;A=(ef(pe)?e.querySelector(pe):pe)||e.children[0];const j=ef(S)?A.querySelectorAll(S):S;D=[].slice.call(j||A.children)}function w(pe){const S=NF(e,A,D,o,r,pe,l);if(pe.loop&&!S.slideLooper.canLoop()){const I=Object.assign({},pe,{loop:!1});return w(I)}return S}function k(pe,S){v||(b=u(b,pe),_=c(b),O=S||O,P(),y=w(_),d([b,...O.map(({options:I})=>I)]).forEach(I=>a.add(I,"change",$)),_.active&&(y.translate.to(y.location.get()),y.animation.init(),y.slidesInView.init(),y.slideFocus.init(X),y.eventHandler.init(X),y.resizeHandler.init(X),y.slidesHandler.init(X),y.options.loop&&y.slideLooper.loop(),A.offsetParent&&D.length&&y.dragHandler.init(X),T=i.init(X,O)))}function $(pe,S){const I=ee();R(),k(u({startIndex:I},pe),S),l.emit("reInit")}function R(){y.dragHandler.destroy(),y.eventStore.clear(),y.translate.clear(),y.slideLooper.clear(),y.resizeHandler.destroy(),y.slidesHandler.destroy(),y.slidesInView.destroy(),y.animation.destroy(),i.destroy(),a.clear()}function G(){v||(v=!0,a.clear(),R(),l.emit("destroy"),l.clear())}function J(pe,S,I){!_.active||v||(y.scrollBody.useBaseFriction().useDuration(S===!0?0:_.duration),y.scrollTo.index(pe,I||0))}function ne(pe){const S=y.index.add(1).get();J(S,pe,-1)}function ae(pe){const S=y.index.add(-1).get();J(S,pe,1)}function re(){return y.index.add(1).get()!==ee()}function L(){return y.index.add(-1).get()!==ee()}function oe(){return y.scrollSnapList}function Y(){return y.scrollProgress.get(y.offsetLocation.get())}function ee(){return y.index.get()}function le(){return y.indexPrevious.get()}function ye(){return y.slidesInView.get()}function me(){return y.slidesInView.get(!1)}function Pe(){return T}function Se(){return y}function x(){return e}function z(){return A}function H(){return D}const X={canScrollNext:re,canScrollPrev:L,containerNode:z,internalEngine:Se,destroy:G,off:h,on:p,emit:m,plugins:Pe,previousScrollSnap:le,reInit:g,rootNode:x,scrollNext:ne,scrollPrev:ae,scrollProgress:Y,scrollSnapList:oe,scrollTo:J,selectedScrollSnap:ee,slideNodes:H,slidesInView:ye,slidesNotInView:me};return k(t,n),setTimeout(()=>l.emit("init"),0),X}Ul.globalOptions=void 0;function gp(e={},t=[]){const n=$e(e),o=$e(t);let r=n?e.value:e,s=o?t.value:t;const i=Cn(),a=Cn();function l(){a.value&&a.value.reInit(r,s)}return je(()=>{!fF()||!i.value||(Ul.globalOptions=gp.globalOptions,a.value=Ul(i.value,r,s))}),Ys(()=>{a.value&&a.value.destroy()}),n&&Ce(e,u=>{fp(r,u)||(r=u,l())}),o&&Ce(t,u=>{pF(s,u)||(s=u,l())}),[i,a]}gp.globalOptions=void 0;const[zF,KF]=bC(({opts:e,orientation:t,plugins:n},o)=>{const[r,s]=gp({...e,axis:t==="horizontal"?"x":"y"},n);function i(){var d;(d=s.value)==null||d.scrollPrev()}function a(){var d;(d=s.value)==null||d.scrollNext()}const l=N(!1),u=N(!1);function c(d){l.value=(d==null?void 0:d.canScrollNext())||!1,u.value=(d==null?void 0:d.canScrollPrev())||!1}return je(()=>{var d,p,h;s.value&&((d=s.value)==null||d.on("init",c),(p=s.value)==null||p.on("reInit",c),(h=s.value)==null||h.on("select",c),o("init-api",s.value))}),{carouselRef:r,carouselApi:s,canScrollPrev:u,canScrollNext:l,scrollPrev:i,scrollNext:a,orientation:t}});function ju(){const e=KF();if(!e)throw new Error("useCarousel must be used within a <Carousel />");return e}const WF=F({__name:"Carousel",props:{opts:{},plugins:{},orientation:{default:"horizontal"},class:{}},emits:["init-api"],setup(e,{expose:t,emit:n}){const o=e,r=n,{canScrollNext:s,canScrollPrev:i,carouselApi:a,carouselRef:l,orientation:u,scrollNext:c,scrollPrev:d}=zF(o,r);t({canScrollNext:s,canScrollPrev:i,carouselApi:a,carouselRef:l,orientation:u,scrollNext:c,scrollPrev:d});function p(h){const m=o.orientation==="vertical"?"ArrowUp":"ArrowLeft",g=o.orientation==="vertical"?"ArrowDown":"ArrowRight";if(h.key===m){h.preventDefault(),d();return}h.key===g&&(h.preventDefault(),c())}return(h,m)=>(C(),ie("div",{"data-slot":"carousel",class:qe(f(Fe)("relative",o.class)),role:"region","aria-roledescription":"carousel",tabindex:"0",onKeydown:p},[V(h.$slots,"default",{canScrollNext:f(s),canScrollPrev:f(i),carouselApi:f(a),carouselRef:f(l),orientation:f(u),scrollNext:f(c),scrollPrev:f(d)})],34))}}),GF=F({__name:"CarouselNext",props:{variant:{default:"outline"},size:{default:"icon"},class:{}},setup(e){const t=e,{orientation:n,canScrollNext:o,scrollNext:r}=ju();return(s,i)=>(C(),B(f(vn),{"data-slot":"carousel-next",disabled:!f(o),class:qe(f(Fe)("absolute size-8 rounded-full",f(n)==="horizontal"?"top-1/2 -right-12 -translate-y-1/2":"-bottom-12 left-1/2 -translate-x-1/2 rotate-90",t.class)),variant:s.variant,size:s.size,onClick:f(r)},{default:E(()=>[V(s.$slots,"default",{},()=>[q(f(Ok)),i[0]||(i[0]=ce("span",{class:"sr-only"},"Next Slide",-1))])]),_:3},8,["disabled","class","variant","size","onClick"]))}}),QF=F({__name:"CarouselPrevious",props:{variant:{default:"outline"},size:{default:"icon"},class:{}},setup(e){const t=e,{orientation:n,canScrollPrev:o,scrollPrev:r}=ju();return(s,i)=>(C(),B(f(vn),{"data-slot":"carousel-previous",disabled:!f(o),class:qe(f(Fe)("absolute size-8 rounded-full",f(n)==="horizontal"?"top-1/2 -left-12 -translate-y-1/2":"-top-12 left-1/2 -translate-x-1/2 rotate-90",t.class)),variant:s.variant,size:s.size,onClick:f(r)},{default:E(()=>[V(s.$slots,"default",{},()=>[q(f(Ak)),i[0]||(i[0]=ce("span",{class:"sr-only"},"Previous Slide",-1))])]),_:3},8,["disabled","class","variant","size","onClick"]))}}),YF=F({inheritAttrs:!1,__name:"CarouselContent",props:{class:{}},setup(e){const t=e,{carouselRef:n,orientation:o}=ju();return(r,s)=>(C(),ie("div",{ref_key:"carouselRef",ref:n,"data-slot":"carousel-content",class:"overflow-hidden h-full"},[ce("div",te({class:f(Fe)("flex",f(o)==="horizontal"?"-ml-4 h-full":"-mt-4 flex-col",t.class)},r.$attrs),[V(r.$slots,"default")],16)],512))}}),XF=F({__name:"CarouselItem",props:{class:{}},setup(e){const t=e,{orientation:n}=ju();return(o,r)=>(C(),ie("div",{"data-slot":"carousel-item",role:"group","aria-roledescription":"slide",class:qe(f(Fe)("min-w-0 shrink-0 grow-0 basis-full",f(n)==="horizontal"?"pl-4":"pt-4",t.class))},[V(o.$slots,"default")],2))}}),JF=F({__name:"AspectRatio",props:{ratio:{},asChild:{type:Boolean},as:{}},setup(e){const t=e;return(n,o)=>(C(),B(f(M1),te({"data-slot":"aspect-ratio"},t),{default:E(()=>[V(n.$slots,"default")]),_:3},16))}}),ZF={class:"relative flex flex-col gap-4 cursor-pointer group"},eL=F({__name:"AppCard",props:Un({name:{},description:{},logo:{},videoUrl:{},previewScreens:{},platform:{},isFavorite:{type:Boolean}},{isFavorite:{type:Boolean,default:!1},isFavoriteModifiers:{}}),emits:Un(["click","toggle-favorite"],["update:isFavorite"]),setup(e,{emit:t}){const n=ts(e,"isFavorite"),o=t,r=U(()=>e.platform==="web"),s={video:"video",image:ri},i=U(()=>r.value?16/10:393/892),a=U(()=>e.videoUrl?[{type:"video",id:"video",props:{src:e.videoUrl,muted:!0,autoplay:!0,loop:!0,playsinline:!0,class:"object-contain"}}]:(e.previewScreens||[]).map(c=>({type:"image",id:c.id,props:{src:c.screenUrl,fit:"contain",class:"object-contain"}}))),l=()=>{o("click")},u=()=>{n.value=!n.value,o("toggle-favorite")};return(c,d)=>{const p=XF,h=YF,m=QF,g=GF,v=WF,y=Yf;return C(),ie("div",ZF,[ce("div",{class:qe(["w-full overflow-hidden bg-[#f0f0f0] rounded-4xl flex items-center justify-center hover:bg-[#f4f4f4] transition-colors duration-300",f(r)?"aspect-[1/1]":"aspect-[7/10]"])},[q(v,{class:qe(["relative w-full h-full max-w-xs",f(r)?"h-[51%]":"h-[85%]"])},{default:E(()=>[q(h,{class:"rounded-2xl",onClick:l},{default:E(()=>[(C(!0),ie(Ie,null,wt(f(a),(b,_)=>(C(),B(p,{key:b.id||_,class:"flex items-center justify-center w-full h-full"},{default:E(()=>[q(f(JF),{ratio:f(i)},{default:E(()=>[(C(),B(ro(s[b.type]),te({ref_for:!0},b.props,{class:["w-full h-full object-contain",f(r)?"rounded-xs":"rounded-2xl"]}),null,16,["class"]))]),_:2},1032,["ratio"])]),_:2},1024))),128))]),_:1}),q(m),q(g)]),_:1},8,["class"])],2),ce("div",{class:"absolute top-2 right-2 z-10 p-2 rounded-full bg-white/50 backdrop-blur-sm opacity-0 group-hover:opacity-100 transition-opacity",onClick:Ze(u,["stop"])},[q(f(Ik),{class:qe(["w-5 h-5 text-yellow-400",n.value?"fill-yellow-400":"fill-none"])},null,8,["class"])]),q(y,{logo:c.logo,name:c.name,description:c.description},null,8,["logo","name","description"])])}}}),tL=Lu(eL,[["__scopeId","data-v-49595ce3"]]),nL={class:"relative w-full overflow-hidden flex items-center"},oL={class:"flex w-max space-x-2"},rL=F({__name:"Filter",props:{platformType:{},type:{}},emits:["change"],setup(e,{expose:t,emit:n}){const o=N(null),r=N(null),{arrivedState:s}=FC(r,{throttle:50}),{left:i,right:a}=dt(s);je(()=>{var v;if(o.value){const y=(v=o.value.$el)==null?void 0:v.querySelector("[data-reka-scroll-area-viewport]");y?r.value=y:console.error("无法找到 ScrollArea 的 viewport 元素。")}});const l=v=>{if(r.value){const y=r.value.offsetWidth*.8;r.value.scrollBy({left:v==="left"?-y:y,behavior:"smooth"})}},u=n,{definitions:c}=va($u()),d=N(),p=U(()=>{var O,T;const y=(O=(e.platformType==="web"?ql:Ks).find(A=>A.label===e.type))==null?void 0:O.value,b=c==null?void 0:c.value.find(A=>A.platformType===e.platformType&&A.slug===y);return(((T=b==null?void 0:b.children)==null?void 0:T.map(A=>A.children).flat())||[]).map(A=>A?{id:typeof A.id=="number"?String(A.id):A.id||"",label:A.label||"",definition:A.definition||"",exampleScreens:Array.isArray(A.exampleScreens)?A.exampleScreens:[]}:null).filter(Boolean)}),h=v=>{d.value=d.value===v?void 0:v},m=v=>{const y=p.value.find(b=>b.id===v);u("change",y)},g=()=>{d.value=void 0};return Ce(d,v=>{m(v)},{immediate:!0}),t({reset:g}),(v,y)=>{const b=Ho;return C(),ie("div",nL,[Fs(q(f(vn),{variant:"outline",class:"absolute left-0 top-1/2 -translate-y-1/2 w-10 rounded-full z-10 bg-background transition-opacity cursor-pointer",onClick:y[0]||(y[0]=_=>l("left"))},{default:E(()=>[q(b,{icon:"lucide:chevron-left",class:"h-4 w-4"})]),_:1},512),[[Yi,!f(i)]]),q(f(lp),{ref_key:"scrollAreaRef",ref:o,class:"flex-1 overflow-auto whitespace-nowrap rounded-md"},{default:E(()=>[ce("div",oL,[(C(!0),ie(Ie,null,wt(p.value,_=>(C(),B(f(vn),{class:"rounded-full cursor-pointer",key:_.id,variant:d.value===_.id?"default":"outline",onClick:O=>h(_.id)},{default:E(()=>[rt(Ne(_.label),1)]),_:2},1032,["variant","onClick"]))),128))])]),_:1},512),Fs(q(f(vn),{variant:"outline",class:"absolute right-0 top-1/2 -translate-y-1/2 w-10 rounded-full z-10 p-0 bg-background transition-opacity cursor-pointer",onClick:y[1]||(y[1]=_=>l("right"))},{default:E(()=>[q(b,{icon:"lucide:chevron-right",class:"h-4 w-4"})]),_:1},512),[[Yi,!f(a)]])])}}}),sL=(e,t=null,n=0)=>{const o=()=>{const r=t==null?void 0:t.value;r?r.scrollHeight-r.scrollTop-r.clientHeight<=n&&e():document.documentElement.scrollHeight-document.documentElement.scrollTop-window.innerHeight<=n&&e()};je(()=>{const r=t==null?void 0:t.value;r?r.addEventListener("scroll",o):window.addEventListener("scroll",o)}),Rt(()=>{const r=t==null?void 0:t.value;r?r.removeEventListener("scroll",o):window.removeEventListener("scroll",o)})},iL={class:"flex flex-col gap-5 py-8"},aL={class:"flex-1 min-w-0 flex flex-col gap-y-5"},lL={class:"flex items-center"},uL={key:0,class:"flex items-center gap-x-2 ml-auto"},cL={key:2,class:"flex flex-col gap-5"},dL={class:"flex gap-4 px-1 py-4"},fL={class:"flex justify-between group hover:cursor-pointer"},pL={class:"flex flex-col gap-2"},hL={class:"flex items-center gap-2 text-xl h-7 font-bold"},mL={class:"flex gap-2 opacity-0 group-hover:opacity-100 transition-all duration-100"},gL=F({__name:"HomeView",setup(e){var oe;const t=Ta(),n=ya(),o=Ii({mutationFn:Y=>A.value.find(le=>le.id===Y)?lq({appId:Y,type:1}):Promise.reject("App not found"),onSuccess:()=>{n.invalidateQueries({queryKey:["app",p,m]})}}),r=Y=>{console.log("Toggling favorite for app:",Y),o.mutate(Y)},s=kt(ep),i=U(()=>(s==null?void 0:s.value)==="web"),a=U(()=>i.value?"web":"mobile"),l=U(()=>a.value),u=$u(),{definitions:c}=va(u),d=U(()=>s?s.value==="web"?ql:Ks:[]),p=N(((oe=d.value[0])==null?void 0:oe.label)||""),h=N(null),m=N(),g=N(),v=N(),y=N(),b=N([]),_=(Y,ee)=>{if(typeof Y=="number")if(ee)b.value.push(Y);else{const le=b.value.indexOf(Y);le>-1&&b.value.splice(le,1)}},O=Y=>{if(!c.value||c.value.length===0)return[];const ee=c.value.find(le=>le.slug===Y&&le.platformType===l.value);return(ee==null?void 0:ee.children)||[]},T=U(()=>p.value||"Apps");Ce(()=>s==null?void 0:s.value,(Y,ee)=>{var ye;if(Y===ee)return;const le=p.value;if(le==="Marketing Pages"&&Y!=="web")p.value="Apps";else{const me=Y==="web"?ql:Ks;me.find(Se=>Se.label===le)||(p.value=((ye=me[0])==null?void 0:ye.label)||"")}ae(),g.value=void 0,v.value=void 0,y.value=void 0,G()},{immediate:!1});const A=U(()=>{var Y;return((Y=w.value)==null?void 0:Y.pages.flatMap(ee=>ee.list))??[]}),D=U(()=>{var Y;return((Y=w.value)==null?void 0:Y.pages.flatMap(ee=>ee.list))??[]}),P=Y=>{var ye;const ee=d.value.find(me=>me.label===p.value),le={platform:s==null?void 0:s.value,type:1,categoryType:ee==null?void 0:ee.categoryType,pageNo:Y,pageSize:20};return(ye=m.value)!=null&&ye.id&&(le.categoryId=m.value.id),le},{data:w,fetchNextPage:k,hasNextPage:$,isFetching:R,refetch:G}=mC({queryKey:["home",p,m],queryFn:async({pageParam:Y=1})=>{const ee=P(Y);return p.value==="Apps"?CB(ee):Y$(ee)},getNextPageParam:(Y,ee)=>{if(!Y)return;const le=Math.ceil(Y.total/20);if(ee.length<le)return ee.length+1},initialPageParam:1}),J=Y=>{m.value=Y},ne=()=>{ae(),g.value=void 0,v.value=void 0,y.value=void 0},ae=()=>{h.value&&h.value.reset(),m.value=void 0};sL(()=>{$.value&&!R.value&&k()});const L=Y=>{t.push({path:"/details",query:{id:Y.id,platform:Y.platform}})};return(Y,ee)=>{const le=rL,ye=tL,me=tw,Pe=ri;return C(),ie("div",iL,[ee[8]||(ee[8]=ce("h1",{class:"text-[44px] font-[600]"},"Discover",-1)),ce("div",aL,[ce("div",lL,[q(f(rp),{modelValue:f(p),"onUpdate:modelValue":[ee[0]||(ee[0]=Se=>$e(p)?p.value=Se:null),ne]},{default:E(()=>[q(f(sp),{class:"bg-transparent p-0"},{default:E(()=>[(C(!0),ie(Ie,null,wt(f(d),Se=>(C(),B(f(ip),{key:Se.label,value:Se.label,class:"!font-bold"},{default:E(()=>[rt(Ne(Se.label),1)]),_:2},1032,["value"]))),128))]),_:1})]),_:1},8,["modelValue"]),f(p)!=="Apps"?(C(),ie("div",uL,[q(f(gl),{data:O("appCategories"),"default-label":"Apps",onChange:ee[1]||(ee[1]=Se=>g.value=Se),"selection-mode":"single",placement:"end"},null,8,["data"]),f(p)!=="UI Elements"&&f(p)!=="Flows"?(C(),B(f(gl),{key:0,data:O("screenElements"),"default-label":"UI Elements",onChange:ee[2]||(ee[2]=Se=>v.value=Se),"selection-mode":"single",placement:"end"},null,8,["data"])):Be("",!0),f(p)!=="Screens"&&f(p)!=="Flows"?(C(),B(f(gl),{key:1,data:O("screenPatterns"),"default-label":"Screens",onChange:ee[3]||(ee[3]=Se=>y.value=Se),"selection-mode":"single",placement:"end"},null,8,["data"])):Be("",!0)])):Be("",!0)]),q(le,{"platform-type":f(a),type:f(T),onChange:J,ref_key:"filterRef",ref:h,class:"w-full"},null,8,["platform-type","type"]),f(p)==="Apps"?(C(),ie("div",{key:0,class:qe(["grid gap-x-4 gap-y-12",f(i)?"grid-cols-[repeat(auto-fill,minmax(min(100%,450px),1fr))]":"grid-cols-[repeat(auto-fill,minmax(min(100%,350px),1fr))]"])},[(C(!0),ie(Ie,null,wt(f(A),Se=>(C(),B(ye,{key:Se.id,id:Se.id,name:Se.name,description:Se.appTagline,logo:Se.appLogoUrl,"video-url":Se.previewVideoUrl??"","preview-screens":Se.previewScreens,onClick:x=>L(Se),platform:f(s),onToggleFavorite:()=>r(Se.id)},null,8,["id","name","description","logo","video-url","preview-screens","onClick","platform","onToggleFavorite"]))),128))],2)):["Screens","UI Elements"].includes(f(p))?(C(),ie("div",{key:1,class:qe(["grid gap-x-5 gap-y-12",f(i)?"grid-cols-[repeat(auto-fill,minmax(min(100%,500px),1fr))]":"grid-cols-[repeat(auto-fill,minmax(min(100%,230px),1fr))] auto-rows-max"])},[(C(!0),ie(Ie,null,wt(f(D),(Se,x)=>(C(),B(me,{key:x,id:Se.screenRespVO.id,src:Se.screenRespVO.screenUrl,name:Se.appRespVO.name,logo:Se.appRespVO.appLogoUrl,selected:f(b).includes(Se.screenRespVO.id),onSelect:_,platform:f(s)},null,8,["id","src","name","logo","selected","platform"]))),128))],2)):f(p)==="Flows"?(C(),ie("div",cL,[q(f(lp),{class:"w-full"},{default:E(()=>[ce("div",dL,[(C(!0),ie(Ie,null,wt(f(D),(Se,x)=>(C(),B(Pe,{key:x,src:Se.screenRespVO.screenUrl,class:qe(["shrink-0 object-cover",[f(i)?"aspect-[16/11] w-[595px] rounded-lg":"aspect-[393/892] w-[215px] rounded-3xl","transition-transform hover:scale-[1.02]"]])},null,8,["src","class"]))),128))])]),_:1}),ce("div",fL,[ce("div",pL,[ce("div",hL,[ee[4]||(ee[4]=ce("span",{class:"group-hover:underline underline-offset-8 transition-all duration-300"},"Onboarding",-1)),ee[5]||(ee[5]=ce("span",{class:"text-gray-500"},"in",-1)),q(Pe,{class:"h-full"}),ee[6]||(ee[6]=ce("span",{class:"group-hover:underline underline-offset-8 transition-all duration-300"},"MoonPay",-1))]),ee[7]||(ee[7]=ce("span",{class:"text-sm text-gray-500"}," 100+ screens ",-1))]),ce("div",mL,[q(f(vn),{text:"Save",class:"bg-black text-white hover:opacity-80"}),q(f(vn),{text:"Copy",class:"bg-[#E3E3E3] hover:opacity-80 text-black"})])])])):Be("",!0)])])}}}),sw=OM({history:nM("/"),routes:[{path:"/",name:"home",component:gL},{path:"/details",name:"details",component:cF},{path:"/apps",name:"apps",component:()=>mi(()=>import("./Apps-BRMcQyeI.js"),__vite__mapDeps([0,1,2,3,4,5,6]))},{path:"/auth",name:"auth",component:()=>mi(()=>import("./Auth-BJGZikMq.js"),__vite__mapDeps([7,3,4,1,8]))},{path:"/settings",name:"settings",component:()=>mi(()=>import("./Settings-CkK03M1s.js"),__vite__mapDeps([9,4]))},{path:"/favorites",name:"favorites",component:()=>mi(()=>import("./Favorites-C1kb4hNA.js"),__vite__mapDeps([10,5,1]))},{path:"/chat",name:"chat",component:()=>mi(()=>import("./Chat-CbyEIPNl.js"),__vite__mapDeps([11,2,12]))}]});sw.beforeEach((e,t,n)=>{const o=localStorage.getItem("accessToken"),{fetchUserInfo:r,userInfo:s}=D_(),i=["auth"];return o?(!s.id&&e.name!=="auth"&&r(),e.name==="auth"?n({name:"home"}):n()):i.includes(e.name)?n():n({name:"auth"})});const Vu=DS(YM);Vu.use(pC);Vu.use(MS());Vu.use(sw);Vu.mount("#app");export{Ii as $,By as A,mo as B,Uo as C,kf as D,Un as E,ts as F,ie as G,Fs as H,Ho as I,Pt as J,Ne as K,AS as L,et as M,ft as N,Fe as O,Ae as P,Kt as Q,Ry as R,qe as S,EL as T,$e as U,My as V,ce as W,rt as X,GL as Y,ya as Z,vn as _,In as a,df as a$,wk as a0,Bk as a1,$k as a2,qk as a3,ri as a4,wt as a5,Ie as a6,X$ as a7,ct as a8,yt as a9,un as aA,zg as aB,ut as aC,We as aD,Et as aE,Ys as aF,Nn as aG,bd as aH,zt as aI,Dk as aJ,xb as aK,lb as aL,yP as aM,bP as aN,ql as aO,Ks as aP,mC as aQ,sL as aR,rp as aS,sp as aT,ip as aU,u$ as aV,ep as aW,eN as aX,tN as aY,DM as aZ,tu as a_,rF as aa,sF as ab,J$ as ac,Z$ as ad,tF as ae,YL as af,QL as ag,hC as ah,xL as ai,ap as aj,jM as ak,Yf as al,Ta as am,EB as an,XL as ao,Lu as ap,bL as aq,JL as ar,ZL as as,Bi as at,Ht as au,je as av,Ge as aw,Qs as ax,kt as ay,ro as az,dt as b,U as c,F as d,ve as e,Pf as f,B as g,uu as h,C as i,E as j,Be as k,Ze as l,te as m,ns as n,Gs as o,lt as p,q,V as r,Cn as s,yL as t,f as u,Yr as v,Ce as w,N as x,js as y,qo as z};
DesignScreenshot/output/100.64.0.2_run/100.64.0.2_8083_4_after_login.html:97:`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const o=new this(t);return n.forEach(r=>o.set(r)),o}static accessor(t){const o=(this[lm]=this[lm]={accessors:{}}).accessors,r=this.prototype;function s(i){const a=pi(i);o[a]||(sR(r,i),o[a]=!0)}return W.isArray(t)?t.forEach(s):s(t),this}};gn.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);W.reduceDescriptors(gn.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(o){this[n]=o}}});W.freezeMethods(gn);function vc(e,t){const n=this||Aa,o=t||n,r=gn.from(o.headers);let s=o.data;return W.forEach(e,function(a){s=a.call(n,s,r.normalize(),t?t.status:void 0)}),r.normalize(),s}function e_(e){return!!(e&&e.__CANCEL__)}function ii(e,t,n){Ve.call(this,e??"canceled",Ve.ERR_CANCELED,t,n),this.name="CanceledError"}W.inherits(ii,Ve,{__CANCEL__:!0});function t_(e,t,n){const o=n.config.validateStatus;!n.status||!o||o(n.status)?e(n):t(new Ve("Request failed with status code "+n.status,[Ve.ERR_BAD_REQUEST,Ve.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function iR(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function aR(e,t){e=e||10;const n=new Array(e),o=new Array(e);let r=0,s=0,i;return t=t!==void 0?t:1e3,function(l){const u=Date.now(),c=o[s];i||(i=u),n[r]=l,o[r]=u;let d=s,p=0;for(;d!==r;)p+=n[d++],d=d%e;if(r=(r+1)%e,r===s&&(s=(s+1)%e),u-i<t)return;const h=c&&u-c;return h?Math.round(p*1e3/h):void 0}}function lR(e,t){let n=0,o=1e3/t,r,s;const i=(u,c=Date.now())=>{n=c,r=null,s&&(clearTimeout(s),s=null),e(...u)};return[(...u)=>{const c=Date.now(),d=c-n;d>=o?i(u,c):(r=u,s||(s=setTimeout(()=>{s=null,i(r)},o-d)))},()=>r&&i(r)]}const Bl=(e,t,n=3)=>{let o=0;const r=aR(50,250);return lR(s=>{const i=s.loaded,a=s.lengthComputable?s.total:void 0,l=i-o,u=r(l),c=i<=a;o=i;const d={loaded:i,total:a,progress:a?i/a:void 0,bytes:l,rate:u||void 0,estimated:u&&a&&c?(a-i)/u:void 0,event:s,lengthComputable:a!=null,[t?"download":"upload"]:!0};e(d)},n)},um=(e,t)=>{const n=e!=null;return[o=>t[0]({lengthComputable:n,total:e,loaded:o}),t[1]]},cm=e=>(...t)=>W.asap(()=>e(...t)),uR=Jt.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,Jt.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(Jt.origin),Jt.navigator&&/(msie|trident)/i.test(Jt.navigator.userAgent)):()=>!0,cR=Jt.hasStandardBrowserEnv?{write(e,t,n,o,r,s){const i=[e+"="+encodeURIComponent(t)];W.isNumber(n)&&i.push("expires="+new Date(n).toGMTString()),W.isString(o)&&i.push("path="+o),W.isString(r)&&i.push("domain="+r),s===!0&&i.push("secure"),document.cookie=i.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function dR(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function fR(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function n_(e,t,n){let o=!dR(t);return e&&(o||n==!1)?fR(e,t):t}const dm=e=>e instanceof gn?{...e}:e;function Zr(e,t){t=t||{};const n={};function o(u,c,d,p){return W.isPlainObject(u)&&W.isPlainObject(c)?W.merge.call({caseless:p},u,c):W.isPlainObject(c)?W.merge({},c):W.isArray(c)?c.slice():c}function r(u,c,d,p){if(W.isUndefined(c)){if(!W.isUndefined(u))return o(void 0,u,d,p)}else return o(u,c,d,p)}function s(u,c){if(!W.isUndefined(c))return o(void 0,c)}function i(u,c){if(W.isUndefined(c)){if(!W.isUndefined(u))return o(void 0,u)}else return o(void 0,c)}function a(u,c,d){if(d in t)return o(u,c);if(d in e)return o(void 0,u)}const l={url:s,method:s,data:s,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,responseEncoding:i,validateStatus:a,headers:(u,c,d)=>r(dm(u),dm(c),d,!0)};return W.forEach(Object.keys({...e,...t}),function(c){const d=l[c]||r,p=d(e[c],t[c],c);W.isUndefined(p)&&d!==a||(n[c]=p)}),n}const o_=e=>{const t=Zr({},e);let{data:n,withXSRFToken:o,xsrfHeaderName:r,xsrfCookieName:s,headers:i,auth:a}=t;t.headers=i=gn.from(i),t.url=Xb(n_(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),a&&i.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):"")));let l;if(W.isFormData(n)){if(Jt.hasStandardBrowserEnv||Jt.hasStandardBrowserWebWorkerEnv)i.setContentType(void 0);else if((l=i.getContentType())!==!1){const[u,...c]=l?l.split(";").map(d=>d.trim()).filter(Boolean):[];i.setContentType([u||"multipart/form-data",...c].join("; "))}}if(Jt.hasStandardBrowserEnv&&(o&&W.isFunction(o)&&(o=o(t)),o||o!==!1&&uR(t.url))){const u=r&&s&&cR.read(s);u&&i.set(r,u)}return t},pR=typeof XMLHttpRequest<"u",hR=pR&&function(e){return new Promise(function(n,o){const r=o_(e);let s=r.data;const i=gn.from(r.headers).normalize();let{responseType:a,onUploadProgress:l,onDownloadProgress:u}=r,c,d,p,h,m;function g(){h&&h(),m&&m(),r.cancelToken&&r.cancelToken.unsubscribe(c),r.signal&&r.signal.removeEventListener("abort",c)}let v=new XMLHttpRequest;v.open(r.method.toUpperCase(),r.url,!0),v.timeout=r.timeout;function y(){if(!v)return;const _=gn.from("getAllResponseHeaders"in v&&v.getAllResponseHeaders()),T={data:!a||a==="text"||a==="json"?v.responseText:v.response,status:v.status,statusText:v.statusText,headers:_,config:e,request:v};t_(function(D){n(D),g()},function(D){o(D),g()},T),v=null}"onloadend"in v?v.onloadend=y:v.onreadystatechange=function(){!v||v.readyState!==4||v.status===0&&!(v.responseURL&&v.responseURL.indexOf("file:")===0)||setTimeout(y)},v.onabort=function(){v&&(o(new Ve("Request aborted",Ve.ECONNABORTED,e,v)),v=null)},v.onerror=function(){o(new Ve("Network Error",Ve.ERR_NETWORK,e,v)),v=null},v.ontimeout=function(){let O=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const T=r.transitional||Jb;r.timeoutErrorMessage&&(O=r.timeoutErrorMessage),o(new Ve(O,T.clarifyTimeoutError?Ve.ETIMEDOUT:Ve.ECONNABORTED,e,v)),v=null},s===void 0&&i.setContentType(null),"setRequestHeader"in v&&W.forEach(i.toJSON(),function(O,T){v.setRequestHeader(T,O)}),W.isUndefined(r.withCredentials)||(v.withCredentials=!!r.withCredentials),a&&a!=="json"&&(v.responseType=r.responseType),u&&([p,m]=Bl(u,!0),v.addEventListener("progress",p)),l&&v.upload&&([d,h]=Bl(l),v.upload.addEventListener("progress",d),v.upload.addEventListener("loadend",h)),(r.cancelToken||r.signal)&&(c=_=>{v&&(o(!_||_.type?new ii(null,e,v):_),v.abort(),v=null)},r.cancelToken&&r.cancelToken.subscribe(c),r.signal&&(r.signal.aborted?c():r.signal.addEventListener("abort",c)));const b=iR(r.url);if(b&&Jt.protocols.indexOf(b)===-1){o(new Ve("Unsupported protocol "+b+":",Ve.ERR_BAD_REQUEST,e));return}v.send(s||null)})},mR=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let o=new AbortController,r;const s=function(u){if(!r){r=!0,a();const c=u instanceof Error?u:this.reason;o.abort(c instanceof Ve?c:new ii(c instanceof Error?c.message:c))}};let i=t&&setTimeout(()=>{i=null,s(new Ve(`timeout ${t} of ms exceeded`,Ve.ETIMEDOUT))},t);const a=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach(u=>{u.unsubscribe?u.unsubscribe(s):u.removeEventListener("abort",s)}),e=null)};e.forEach(u=>u.addEventListener("abort",s));const{signal:l}=o;return l.unsubscribe=()=>W.asap(a),l}},gR=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let o=0,r;for(;o<n;)r=o+t,yield e.slice(o,r),o=r},vR=async function*(e,t){for await(const n of yR(e))yield*gR(n,t)},yR=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:n,value:o}=await t.read();if(n)break;yield o}}finally{await t.cancel()}},fm=(e,t,n,o)=>{const r=vR(e,t);let s=0,i,a=l=>{i||(i=!0,o&&o(l))};return new ReadableStream({async pull(l){try{const{done:u,value:c}=await r.next();if(u){a(),l.close();return}let d=c.byteLength;if(n){let p=s+=d;n(p)}l.enqueue(new Uint8Array(c))}catch(u){throw a(u),u}},cancel(l){return a(l),r.return()}},{highWaterMark:2})},Ru=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",r_=Ru&&typeof ReadableStream=="function",bR=Ru&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),s_=(e,...t)=>{try{return!!e(...t)}catch{return!1}},_R=r_&&s_(()=>{let e=!1;const t=new Request(Jt.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),pm=64*1024,jd=r_&&s_(()=>W.isReadableStream(new Response("").body)),Ml={stream:jd&&(e=>e.body)};Ru&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!Ml[t]&&(Ml[t]=W.isFunction(e[t])?n=>n[t]():(n,o)=>{throw new Ve(`Response type '${t}' is not supported`,Ve.ERR_NOT_SUPPORT,o)})})})(new Response);const wR=async e=>{if(e==null)return 0;if(W.isBlob(e))return e.size;if(W.isSpecCompliantForm(e))return(await new Request(Jt.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(W.isArrayBufferView(e)||W.isArrayBuffer(e))return e.byteLength;if(W.isURLSearchParams(e)&&(e=e+""),W.isString(e))return(await bR(e)).byteLength},SR=async(e,t)=>{const n=W.toFiniteNumber(e.getContentLength());return n??wR(t)},CR=Ru&&(async e=>{let{url:t,method:n,data:o,signal:r,cancelToken:s,timeout:i,onDownloadProgress:a,onUploadProgress:l,responseType:u,headers:c,withCredentials:d="same-origin",fetchOptions:p}=o_(e);u=u?(u+"").toLowerCase():"text";let h=mR([r,s&&s.toAbortSignal()],i),m;const g=h&&h.unsubscribe&&(()=>{h.unsubscribe()});let v;try{if(l&&_R&&n!=="get"&&n!=="head"&&(v=await SR(c,o))!==0){let T=new Request(t,{method:"POST",body:o,duplex:"half"}),A;if(W.isFormData(o)&&(A=T.headers.get("content-type"))&&c.setContentType(A),T.body){const[D,P]=um(v,Bl(cm(l)));o=fm(T.body,pm,D,P)}}W.isString(d)||(d=d?"include":"omit");const y="credentials"in Request.prototype;m=new Request(t,{...p,signal:h,method:n.toUpperCase(),headers:c.normalize().toJSON(),body:o,duplex:"half",credentials:y?d:void 0});let b=await fetch(m,p);const _=jd&&(u==="stream"||u==="response");if(jd&&(a||_&&g)){const T={};["status","statusText","headers"].forEach(w=>{T[w]=b[w]});const A=W.toFiniteNumber(b.headers.get("content-length")),[D,P]=a&&um(A,Bl(cm(a),!0))||[];b=new Response(fm(b.body,pm,D,()=>{P&&P(),g&&g()}),T)}u=u||"text";let O=await Ml[W.findKey(Ml,u)||"text"](b,e);return!_&&g&&g(),await new Promise((T,A)=>{t_(T,A,{data:O,headers:gn.from(b.headers),status:b.status,statusText:b.statusText,config:e,request:m})})}catch(y){throw g&&g(),y&&y.name==="TypeError"&&/Load failed|fetch/i.test(y.message)?Object.assign(new Ve("Network Error",Ve.ERR_NETWORK,e,m),{cause:y.cause||y}):Ve.from(y,y&&y.code,e,m)}}),Vd={http:FD,xhr:hR,fetch:CR};W.forEach(Vd,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const hm=e=>`- ${e}`,xR=e=>W.isFunction(e)||e===null||e===!1,i_={getAdapter:e=>{e=W.isArray(e)?e:[e];const{length:t}=e;let n,o;const r={};for(let s=0;s<t;s++){n=e[s];let i;if(o=n,!xR(n)&&(o=Vd[(i=String(n)).toLowerCase()],o===void 0))throw new Ve(`Unknown adapter '${i}'`);if(o)break;r[i||"#"+s]=o}if(!o){const s=Object.entries(r).map(([a,l])=>`adapter ${a} `+(l===!1?"is not supported by the environment":"is not available in the build"));let i=t?s.length>1?`since :
DesignScreenshot/output/100.64.0.2_run/100.64.0.2_8083_4_after_login.html:100:`+s):o.stack=s}catch{}}throw o}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Zr(this.defaults,n);const{transitional:o,paramsSerializer:r,headers:s}=n;o!==void 0&&ul.assertOptions(o,{silentJSONParsing:Jn.transitional(Jn.boolean),forcedJSONParsing:Jn.transitional(Jn.boolean),clarifyTimeoutError:Jn.transitional(Jn.boolean)},!1),r!=null&&(W.isFunction(r)?n.paramsSerializer={serialize:r}:ul.assertOptions(r,{encode:Jn.function,serialize:Jn.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),ul.assertOptions(n,{baseUrl:Jn.spelling("baseURL"),withXsrfToken:Jn.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let i=s&&W.merge(s.common,s[n.method]);s&&W.forEach(["delete","get","head","post","put","patch","common"],m=>{delete s[m]}),n.headers=gn.concat(i,s);const a=[];let l=!0;this.interceptors.request.forEach(function(g){typeof g.runWhen=="function"&&g.runWhen(n)===!1||(l=l&&g.synchronous,a.unshift(g.fulfilled,g.rejected))});const u=[];this.interceptors.response.forEach(function(g){u.push(g.fulfilled,g.rejected)});let c,d=0,p;if(!l){const m=[mm.bind(this),void 0];for(m.unshift(...a),m.push(...u),p=m.length,c=Promise.resolve(n);d<p;)c=c.then(m[d++],m[d++]);return c}p=a.length;let h=n;for(d=0;d<p;){const m=a[d++],g=a[d++];try{h=m(h)}catch(v){g.call(this,v);break}}try{c=mm.call(this,h)}catch(m){return Promise.reject(m)}for(d=0,p=u.length;d<p;)c=c.then(u[d++],u[d++]);return c}getUri(t){t=Zr(this.defaults,t);const n=n_(t.baseURL,t.url,t.allowAbsoluteUrls);return Xb(n,t.params,t.paramsSerializer)}};W.forEach(["delete","get","head","options"],function(t){Wr.prototype[t]=function(n,o){return this.request(Zr(o||{},{method:t,url:n,data:(o||{}).data}))}});W.forEach(["post","put","patch"],function(t){function n(o){return function(s,i,a){return this.request(Zr(a||{},{method:t,headers:o?{"Content-Type":"multipart/form-data"}:{},url:s,data:i}))}}Wr.prototype[t]=n(),Wr.prototype[t+"Form"]=n(!0)});let AR=class l_{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(s){n=s});const o=this;this.promise.then(r=>{if(!o._listeners)return;let s=o._listeners.length;for(;s-- >0;)o._listeners[s](r);o._listeners=null}),this.promise.then=r=>{let s;const i=new Promise(a=>{o.subscribe(a),s=a}).then(r);return i.cancel=function(){o.unsubscribe(s)},i},t(function(s,i,a){o.reason||(o.reason=new ii(s,i,a),n(o.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=o=>{t.abort(o)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new l_(function(r){t=r}),cancel:t}}};function OR(e){return function(n){return e.apply(null,n)}}function TR(e){return W.isObject(e)&&e.isAxiosError===!0}const Ud={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Ud).forEach(([e,t])=>{Ud[t]=e});function u_(e){const t=new Wr(e),n=Lb(Wr.prototype.request,t);return W.extend(n,Wr.prototype,t,{allOwnKeys:!0}),W.extend(n,t,null,{allOwnKeys:!0}),n.create=function(r){return u_(Zr(e,r))},n}const xt=u_(Aa);xt.Axios=Wr;xt.CanceledError=ii;xt.CancelToken=AR;xt.isCancel=e_;xt.VERSION=a_;xt.toFormData=Du;xt.AxiosError=Ve;xt.Cancel=xt.CanceledError;xt.all=function(t){return Promise.all(t)};xt.spread=OR;xt.isAxiosError=TR;xt.mergeConfig=Zr;xt.AxiosHeaders=gn;xt.formToJSON=e=>Zb(W.isHTMLForm(e)?new FormData(e):e);xt.getAdapter=i_.getAdapter;xt.HttpStatusCode=Ud;xt.default=xt;const{Axios:DL,AxiosError:RL,CanceledError:BL,isCancel:ML,CancelToken:qL,VERSION:$L,all:FL,Cancel:LL,isAxiosError:NL,spread:jL,toFormData:VL,AxiosHeaders:UL,HttpStatusCode:HL,formToJSON:zL,getAdapter:KL,mergeConfig:WL}=xt;let Hd=1;var PR=class{constructor(){Mt(this,"subscribers");Mt(this,"toasts");Mt(this,"dismissedToasts");Mt(this,"subscribe",e=>(this.subscribers.push(e),()=>{const t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}));Mt(this,"publish",e=>{this.subscribers.forEach(t=>t(e))});Mt(this,"addToast",e=>{this.publish(e),this.toasts=[...this.toasts,e]});Mt(this,"create",e=>{var i;const{message:t,...n}=e,o=typeof e.id=="number"||e.id&&((i=e.id)==null?void 0:i.length)>0?e.id:Hd++,r=this.toasts.find(a=>a.id===o),s=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(o)&&this.dismissedToasts.delete(o),r?this.toasts=this.toasts.map(a=>a.id===o?(this.publish({...a,...e,id:o,title:t}),{...a,...e,id:o,dismissible:s,title:t}):a):this.addToast({title:t,...n,dismissible:s,id:o}),o});Mt(this,"dismiss",e=>(e?(this.dismissedToasts.add(e),requestAnimationFrame(()=>this.subscribers.forEach(t=>t({id:e,dismiss:!0})))):this.toasts.forEach(t=>{this.subscribers.forEach(n=>n({id:t.id,dismiss:!0}))}),e));Mt(this,"message",(e,t)=>this.create({...t,message:e,type:"default"}));Mt(this,"error",(e,t)=>this.create({...t,type:"error",message:e}));Mt(this,"success",(e,t)=>this.create({...t,type:"success",message:e}));Mt(this,"info",(e,t)=>this.create({...t,type:"info",message:e}));Mt(this,"warning",(e,t)=>this.create({...t,type:"warning",message:e}));Mt(this,"loading",(e,t)=>this.create({...t,type:"loading",message:e}));Mt(this,"promise",(e,t)=>{if(!t)return;let n;t.loading!==void 0&&(n=this.create({...t,promise:e,type:"loading",message:t.loading,description:typeof t.description!="function"?t.description:void 0}));const o=Promise.resolve(e instanceof Function?e():e);let r=n!==void 0,s;const i=o.then(async l=>{if(s=["resolve",l],so(l))r=!1,this.create({id:n,type:"default",message:l});else if(IR(l)&&!l.ok){r=!1;const c=typeof t.error=="function"?await t.error(`HTTP error! status: ${l.status}`):t.error,d=typeof t.description=="function"?await t.description(`HTTP error! status: ${l.status}`):t.description,h=typeof c=="object"&&!so(c)?c:{message:c||"",id:n||""};this.create({id:n,type:"error",description:d,...h})}else if(l instanceof Error){r=!1;const c=typeof t.error=="function"?await t.error(l):t.error,d=typeof t.description=="function"?await t.description(l):t.description,h=typeof c=="object"&&!so(c)?c:{message:c||"",id:n||""};this.create({id:n,type:"error",description:d,...h})}else if(t.success!==void 0){r=!1;const c=typeof t.success=="function"?await t.success(l):t.success,d=typeof t.description=="function"?await t.description(l):t.description,h=typeof c=="object"&&!so(c)?c:{message:c||"",id:n||""};this.create({id:n,type:"success",description:d,...h})}}).catch(async l=>{if(s=["reject",l],t.error!==void 0){r=!1;const u=typeof t.error=="function"?await t.error(l):t.error,c=typeof t.description=="function"?await t.description(l):t.description,p=typeof u=="object"&&!so(u)?u:{message:u||"",id:n||""};this.create({id:n,type:"error",description:c,...p})}}).finally(()=>{var l;r&&(this.dismiss(n),n=void 0),(l=t.finally)==null||l.call(t)}),a=()=>new Promise((l,u)=>i.then(()=>s[0]==="reject"?u(s[1]):l(s[1])).catch(u));return typeof n!="string"&&typeof n!="number"?{unwrap:a}:Object.assign(n,{unwrap:a})});Mt(this,"custom",(e,t)=>{const n=(t==null?void 0:t.id)||Hd++;return this.publish({component:e,id:n,...t}),n});Mt(this,"getActiveToasts",()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)));this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}};const hn=new PR;function kR(e,t){const n=(t==null?void 0:t.id)||Hd++;return hn.create({message:e,id:n,type:"default",...t}),n}const IR=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",DR=kR,RR=()=>hn.toasts,BR=()=>hn.getActiveToasts(),Bi=Object.assign(DR,{success:hn.success,info:hn.info,warning:hn.warning,error:hn.error,custom:hn.custom,message:hn.message,promise:hn.promise,dismiss:hn.dismiss,loading:hn.loading},{getHistory:RR,getToasts:BR});function Wa(e){return e.label!==void 0}const MR=3,c_="24px",d_="16px",vm=4e3,qR=356,$R=14,FR=45,f_=200;function LR(){const e=N(!1);return ut(()=>{const t=()=>{e.value=document.hidden};return document.addEventListener("visibilitychange",t),()=>window.removeEventListener("visibilitychange",t)}),{isDocumentHidden:e}}function Go(...e){return e.filter(Boolean).join(" ")}function NR(e){const[t,n]=e.split("-"),o=[];return t&&o.push(t),n&&o.push(n),o}function jR(e,t){const n={};return[e,t].forEach((o,r)=>{const s=r===1,i=s?"--mobile-offset":"--offset",a=s?d_:c_;function l(u){["top","right","bottom","left"].forEach(c=>{n[`${i}-${c}`]=typeof u=="number"?`${u}px`:u})}typeof o=="number"||typeof o=="string"?l(o):typeof o=="object"?["top","right","bottom","left"].forEach(u=>{o[u]===void 0?n[`${i}-${u}`]=a:n[`${i}-${u}`]=typeof o[u]=="number"?`${o[u]}px`:o[u]}):l(a)}),n}const VR=["data-rich-colors","data-styled","data-mounted","data-promise","data-swiped","data-removed","data-visible","data-y-position","data-x-position","data-index","data-front","data-swiping","data-dismissible","data-type","data-invert","data-swipe-out","data-swipe-direction","data-expanded"],UR=["aria-label","data-disabled"];var HR=F({__name:"Toast",props:{toast:{},toasts:{},index:{},swipeDirections:{},expanded:{type:Boolean},invert:{type:Boolean},heights:{},gap:{},position:{},visibleToasts:{},expandByDefault:{type:Boolean},closeButton:{type:Boolean},interacting:{type:Boolean},style:{},cancelButtonStyle:{},actionButtonStyle:{},duration:{},class:{},unstyled:{type:Boolean},descriptionClass:{},loadingIcon:{},classes:{},icons:{},closeButtonAriaLabel:{},defaultRichColors:{type:Boolean}},emits:["update:heights","update:height","removeToast"],setup(e,{emit:t}){const n=e,o=t,r=N(null),s=N(null),i=N(!1),a=N(!1),l=N(!1),u=N(!1),c=N(!1),d=N(0),p=N(0),h=N(n.toast.duration||n.duration||vm),m=N(null),g=N(null),v=U(()=>n.index===0),y=U(()=>n.index+1<=n.visibleToasts),b=U(()=>n.toast.type),_=U(()=>n.toast.dismissible!==!1),O=U(()=>n.toast.class||""),T=U(()=>n.descriptionClass||""),A=U(()=>{const x=n.toast.position||n.position,H=n.heights.filter(X=>X.position===x).findIndex(X=>X.toastId===n.toast.id);return H>=0?H:0}),D=U(()=>{const x=n.toast.position||n.position;return n.heights.filter(H=>H.position===x).reduce((H,X,pe)=>pe>=A.value?H:H+X.height,0)}),P=U(()=>A.value*n.gap+D.value||0),w=U(()=>n.toast.closeButton??n.closeButton),k=U(()=>n.toast.duration||n.duration||vm),$=N(0),R=N(0),G=N(null),J=U(()=>n.position.split("-")),ne=U(()=>J.value[0]),ae=U(()=>J.value[1]),re=U(()=>typeof n.toast.title!="string"),L=U(()=>typeof n.toast.description!="string"),{isDocumentHidden:oe}=LR(),Y=U(()=>b.value&&b.value==="loading");je(()=>{i.value=!0,h.value=k.value}),ut(async()=>{if(!i.value||!g.value)return;await We();const x=g.value,z=x.style.height;x.style.height="auto";const H=x.getBoundingClientRect().height;x.style.height=z,p.value=H,o("update:height",{toastId:n.toast.id,height:H,position:n.toast.position||n.position})});function ee(){a.value=!0,d.value=P.value,setTimeout(()=>{o("removeToast",n.toast)},f_)}function le(){var x,z;if(Y.value||!_.value)return{};ee(),(z=(x=n.toast).onDismiss)==null||z.call(x,n.toast)}function ye(x){Y.value||!_.value||(m.value=new Date,d.value=P.value,x.target.setPointerCapture(x.pointerId),x.target.tagName!=="BUTTON"&&(l.value=!0,G.value={x:x.clientX,y:x.clientY}))}function me(){var S,I,j,K,Z,Q,ue;if(u.value||!_.value)return;G.value=null;const x=Number(((S=g.value)==null?void 0:S.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),z=Number(((I=g.value)==null?void 0:I.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),H=new Date().getTime()-(((j=m.value)==null?void 0:j.getTime())||0),X=r.value==="x"?x:z,pe=Math.abs(X)/H;if(Math.abs(X)>=FR||pe>.11){d.value=P.value,(Z=(K=n.toast).onDismiss)==null||Z.call(K,n.toast),r.value==="x"?s.value=x>0?"right":"left":s.value=z>0?"down":"up",ee(),u.value=!0;return}else(Q=g.value)==null||Q.style.setProperty("--swipe-amount-x","0px"),(ue=g.value)==null||ue.style.setProperty("--swipe-amount-y","0px");c.value=!1,l.value=!1,r.value=null}function Pe(x){var j,K,Z,Q;if(!G.value||!_.value||(((K=(j=window==null?void 0:window.getSelection())==null?void 0:j.toString())==null?void 0:K.length)??!1))return;const H=x.clientY-G.value.y,X=x.clientX-G.value.x,pe=n.swipeDirections??NR(n.position);!r.value&&(Math.abs(X)>1||Math.abs(H)>1)&&(r.value=Math.abs(X)>Math.abs(H)?"x":"y");let S={x:0,y:0};const I=ue=>1/(1.5+Math.abs(ue)/20);if(r.value==="y"){if(pe.includes("top")||pe.includes("bottom"))if(pe.includes("top")&&H<0||pe.includes("bottom")&&H>0)S.y=H;else{const ue=H*I(H);S.y=Math.abs(ue)<Math.abs(H)?ue:H}}else if(r.value==="x"&&(pe.includes("left")||pe.includes("right")))if(pe.includes("left")&&X<0||pe.includes("right")&&X>0)S.x=X;else{const ue=X*I(X);S.x=Math.abs(ue)<Math.abs(X)?ue:X}(Math.abs(S.x)>0||Math.abs(S.y)>0)&&(c.value=!0),(Z=g.value)==null||Z.style.setProperty("--swipe-amount-x",`${S.x}px`),(Q=g.value)==null||Q.style.setProperty("--swipe-amount-y",`${S.y}px`)}je(()=>{if(i.value=!0,!g.value)return;const x=g.value.getBoundingClientRect().height;p.value=x;const z=[{toastId:n.toast.id,height:x,position:n.toast.position},...n.heights];o("update:heights",z)}),Ys(()=>{g.value&&o("removeToast",n.toast)}),ut(x=>{if(n.toast.promise&&b.value==="loading"||n.toast.duration===1/0||n.toast.type==="loading")return;let z;const H=()=>{if(R.value<$.value){const pe=new Date().getTime()-$.value;h.value=h.value-pe}R.value=new Date().getTime()},X=()=>{h.value!==1/0&&($.value=new Date().getTime(),z=setTimeout(()=>{var pe,S;(S=(pe=n.toast).onAutoClose)==null||S.call(pe,n.toast),ee()},h.value))};n.expanded||n.interacting||oe.value?H():X(),x(()=>{clearTimeout(z)})}),Ce(()=>n.toast.delete,x=>{x!==void 0&&x&&ee()},{deep:!0});function Se(){l.value=!1,r.value=null,G.value=null}return(x,z)=>{var H,X,pe,S,I,j,K,Z,Q,ue,fe,de,se,xe,ge,Ee,ke,He,tt,Ye,At,mt,$t,Ft,yn,Cr,Bt;return C(),ie("li",{tabindex:"0",ref_key:"toastRef",ref:g,class:qe(f(Go)(n.class,O.value,(H=x.classes)==null?void 0:H.toast,(X=x.toast.classes)==null?void 0:X.toast,(pe=x.classes)==null?void 0:pe[b.value],(I=(S=x.toast)==null?void 0:S.classes)==null?void 0:I[b.value])),"data-sonner-toast":"","data-rich-colors":x.toast.richColors??x.defaultRichColors,"data-styled":!(x.toast.component||(j=x.toast)!=null&&j.unstyled||x.unstyled),"data-mounted":i.value,"data-promise":!!x.toast.promise,"data-swiped":c.value,"data-removed":a.value,"data-visible":y.value,"data-y-position":ne.value,"data-x-position":ae.value,"data-index":x.index,"data-front":v.value,"data-swiping":l.value,"data-dismissible":_.value,"data-type":b.value,"data-invert":x.toast.invert||x.invert,"data-swipe-out":u.value,"data-swipe-direction":s.value,"data-expanded":!!(x.expanded||x.expandByDefault&&i.value),style:Pt({"--index":x.index,"--toasts-before":x.index,"--z-index":x.toasts.length-x.index,"--offset":`${a.value?d.value:P.value}px`,"--initial-height":x.expandByDefault?"auto":`${p.value}px`,...x.style,...n.toast.style}),onDragend:Se,onPointerdown:ye,onPointerup:me,onPointermove:Pe},[w.value&&!x.toast.component&&b.value!=="loading"?(C(),ie("button",{key:0,"aria-label":x.closeButtonAriaLabel||"Close toast","data-disabled":Y.value,"data-close-button":"true",class:qe(f(Go)((K=x.classes)==null?void 0:K.closeButton,(Q=(Z=x.toast)==null?void 0:Z.classes)==null?void 0:Q.closeButton)),onClick:le},[(ue=x.icons)!=null&&ue.close?(C(),B(ro((fe=x.icons)==null?void 0:fe.close),{key:0})):V(x.$slots,"close-icon",{key:1})],10,UR)):Be("v-if",!0),x.toast.component?(C(),B(ro(x.toast.component),te({key:1},x.toast.componentProps,{onCloseToast:le}),null,16)):(C(),ie(Ie,{key:2},[b.value!=="default"||x.toast.icon||x.toast.promise?(C(),ie("div",{key:0,"data-icon":"",class:qe(f(Go)((de=x.classes)==null?void 0:de.icon,(xe=(se=x.toast)==null?void 0:se.classes)==null?void 0:xe.icon))},[x.toast.icon?(C(),B(ro(x.toast.icon),{key:0})):(C(),ie(Ie,{key:1},[b.value==="loading"?V(x.$slots,"loading-icon",{key:0}):b.value==="success"?V(x.$slots,"success-icon",{key:1}):b.value==="error"?V(x.$slots,"error-icon",{key:2}):b.value==="warning"?V(x.$slots,"warning-icon",{key:3}):b.value==="info"?V(x.$slots,"info-icon",{key:4}):Be("v-if",!0)],64))],2)):Be("v-if",!0),ce("div",{"data-content":"",class:qe(f(Go)((ge=x.classes)==null?void 0:ge.content,(ke=(Ee=x.toast)==null?void 0:Ee.classes)==null?void 0:ke.content))},[ce("div",{"data-title":"",class:qe(f(Go)((He=x.classes)==null?void 0:He.title,(tt=x.toast.classes)==null?void 0:tt.title))},[re.value?(C(),B(ro(x.toast.title),ct(te({key:0},x.toast.componentProps)),null,16)):(C(),ie(Ie,{key:1},[rt(Ne(x.toast.title),1)],64))],2),x.toast.description?(C(),ie("div",{key:0,"data-description":"",class:qe(f(Go)(x.descriptionClass,T.value,(Ye=x.classes)==null?void 0:Ye.description,(At=x.toast.classes)==null?void 0:At.description))},[L.value?(C(),B(ro(x.toast.description),ct(te({key:0},x.toast.componentProps)),null,16)):(C(),ie(Ie,{key:1},[rt(Ne(x.toast.description),1)],64))],2)):Be("v-if",!0)],2),x.toast.cancel?(C(),ie("button",{key:1,style:Pt(x.toast.cancelButtonStyle||x.cancelButtonStyle),class:qe(f(Go)((mt=x.classes)==null?void 0:mt.cancelButton,($t=x.toast.classes)==null?void 0:$t.cancelButton)),"data-button":"","data-cancel":"",onClick:z[0]||(z[0]=Lt=>{var Qn,Yn;f(Wa)(x.toast.cancel)&&_.value&&((Yn=(Qn=x.toast.cancel).onClick)==null||Yn.call(Qn,Lt),ee())})},Ne(f(Wa)(x.toast.cancel)?(Ft=x.toast.cancel)==null?void 0:Ft.label:x.toast.cancel),7)):Be("v-if",!0),x.toast.action?(C(),ie("button",{key:2,style:Pt(x.toast.actionButtonStyle||x.actionButtonStyle),class:qe(f(Go)((yn=x.classes)==null?void 0:yn.actionButton,(Cr=x.toast.classes)==null?void 0:Cr.actionButton)),"data-button":"","data-action":"",onClick:z[1]||(z[1]=Lt=>{var Qn,Yn;f(Wa)(x.toast.action)&&((Yn=(Qn=x.toast.action).onClick)==null||Yn.call(Qn,Lt),!Lt.defaultPrevented&&ee())})},Ne(f(Wa)(x.toast.action)?(Bt=x.toast.action)==null?void 0:Bt.label:x.toast.action),7)):Be("v-if",!0)],64))],46,VR)}}}),zR=HR,Oa=(e,t)=>{const n=e.__vccOpts||e;for(const[o,r]of t)n[o]=r;return n};const KR={},WR={xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stoke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"};function GR(e,t){return C(),ie("svg",WR,t[0]||(t[0]=[ce("line",{x1:"18",y1:"6",x2:"6",y2:"18"},null,-1),ce("line",{x1:"6",y1:"6",x2:"18",y2:"18"},null,-1)]))}var QR=Oa(KR,[["render",GR]]);const YR=["data-visible"],XR={class:"sonner-spinner"};var JR=F({__name:"Loader",props:{visible:{type:Boolean}},setup(e){const t=Array(12).fill(0);return(n,o)=>(C(),ie("div",{class:"sonner-loading-wrapper","data-visible":n.visible},[ce("div",XR,[(C(!0),ie(Ie,null,wt(f(t),r=>(C(),ie("div",{key:`spinner-bar-${r}`,class:"sonner-loading-bar"}))),128))])],8,YR))}}),ZR=JR;const eB={},tB={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"};function nB(e,t){return C(),ie("svg",tB,t[0]||(t[0]=[ce("path",{"fill-rule":"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z","clip-rule":"evenodd"},null,-1)]))}var oB=Oa(eB,[["render",nB]]);const rB={},sB={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"};function iB(e,t){return C(),ie("svg",sB,t[0]||(t[0]=[ce("path",{"fill-rule":"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z","clip-rule":"evenodd"},null,-1)]))}var aB=Oa(rB,[["render",iB]]);const lB={},uB={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"};function cB(e,t){return C(),ie("svg",uB,t[0]||(t[0]=[ce("path",{"fill-rule":"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z","clip-rule":"evenodd"},null,-1)]))}var dB=Oa(lB,[["render",cB]]);const fB={},pB={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"};function hB(e,t){return C(),ie("svg",pB,t[0]||(t[0]=[ce("path",{"fill-rule":"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z","clip-rule":"evenodd"},null,-1)]))}var mB=Oa(fB,[["render",hB]]);const gB=["aria-label"],vB=["data-sonner-theme","dir","data-theme","data-rich-colors","data-y-position","data-x-position","data-lifted"],yB=typeof window<"u"&&typeof document<"u";function bB(){if(typeof window>"u"||typeof document>"u")return"ltr";const e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}var _B=F({name:"Toaster",inheritAttrs:!1,__name:"Toaster",props:{invert:{type:Boolean,default:!1},theme:{default:"light"},position:{default:"bottom-right"},hotkey:{default:()=>["altKey","KeyT"]},richColors:{type:Boolean,default:!1},expand:{type:Boolean,default:!1},duration:{},gap:{default:$R},visibleToasts:{default:MR},closeButton:{type:Boolean,default:!1},toastOptions:{default:()=>({})},class:{default:""},style:{},offset:{default:c_},mobileOffset:{default:d_},dir:{default:"auto"},swipeDirections:{},icons:{},containerAriaLabel:{default:"Notifications"}},setup(e){const t=e,n=g0(),o=N([]);function r(w,k){return o.value.filter($=>!$.position&&k===0||$.position===w)}const s=U(()=>{const w=o.value.filter(k=>k.position).map(k=>k.position);return w.length>0?Array.from(new Set([t.position].concat(w))):[t.position]}),i=U(()=>{const w={};return s.value.forEach(k=>{w[k]=o.value.filter($=>$.position===k)}),w}),a=N([]),l=N(!1),u=N(!1),c=N(t.theme!=="system"?t.theme:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),d=N(null),p=N(null),h=N(!1),m=t.hotkey.join("+").replace(/Key/g,"").replace(/Digit/g,"");function g(w){var k;(k=o.value.find($=>$.id===w.id))!=null&&k.delete||hn.dismiss(w.id),o.value=o.value.filter(({id:$})=>$!==w.id),setTimeout(()=>{o.value.find($=>$.id===w.id)||(a.value=a.value.filter($=>$.toastId!==w.id))},f_+50)}function v(w){var k,$;h.value&&!(($=(k=w.currentTarget)==null?void 0:k.contains)!=null&&$.call(k,w.relatedTarget))&&(h.value=!1,p.value&&(p.value.focus({preventScroll:!0}),p.value=null))}function y(w){w.target instanceof HTMLElement&&w.target.dataset.dismissible==="false"||h.value||(h.value=!0,p.value=w.relatedTarget)}function b(w){w.target&&w.target instanceof HTMLElement&&w.target.dataset.dismissible==="false"||(u.value=!0)}ut(w=>{const k=hn.subscribe($=>{if($.dismiss){requestAnimationFrame(()=>{o.value=o.value.map(R=>R.id===$.id?{...R,delete:!0}:R)});return}We(()=>{const R=o.value.findIndex(G=>G.id===$.id);R!==-1?o.value=[...o.value.slice(0,R),{...o.value[R],...$},...o.value.slice(R+1)]:o.value=[$,...o.value]})});w(k)}),ut(w=>{if(typeof window>"u")return;if(t.theme!=="system"){c.value=t.theme;return}const k=window.matchMedia("(prefers-color-scheme: dark)"),$=G=>{c.value=G?"dark":"light"};$(k.matches);const R=G=>{$(G.matches)};try{k.addEventListener("change",R)}catch{k.addListener(R)}w(()=>{try{k.removeEventListener("change",R)}catch{k.removeListener(R)}})}),ut(()=>{d.value&&p.value&&(p.value.focus({preventScroll:!0}),p.value=null,h.value=!1)}),ut(()=>{o.value.length<=1&&(l.value=!1)}),ut(w=>{function k($){const R=t.hotkey.every(ne=>$[ne]||$.code===ne),G=Array.isArray(d.value)?d.value[0]:d.value;R&&(l.value=!0,G==null||G.focus());const J=document.activeElement===d.value||(G==null?void 0:G.contains(document.activeElement));$.code==="Escape"&&J&&(l.value=!1)}yB&&(document.addEventListener("keydown",k),w(()=>{document.removeEventListener("keydown",k)}))});function _(){l.value=!0}function O(){u.value||(l.value=!1)}function T(){l.value=!1}function A(){u.value=!1}function D(w){a.value=w}function P(w){const k=a.value.findIndex($=>$.toastId===w.toastId);if(k!==-1)a.value[k]=w;else{const $=a.value.findIndex(R=>R.position===w.position);$!==-1?a.value.splice($,0,w):a.value.unshift(w)}}return(w,k)=>(C(),ie(Ie,null,[Be(" Remove item from normal navigation flow, only available via hotkey "),ce("section",{"aria-label":`${w.containerAriaLabel} ${f(m)}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false"},[(C(!0),ie(Ie,null,wt(s.value,($,R)=>{var G;return C(),ie("ol",te({key:$,ref_for:!0,ref_key:"listRef",ref:d,"data-sonner-toaster":"","data-sonner-theme":c.value,class:t.class,dir:w.dir==="auto"?bB():w.dir,tabIndex:-1,"data-theme":w.theme,"data-rich-colors":w.richColors,"data-y-position":$.split("-")[0],"data-x-position":$.split("-")[1],"data-lifted":l.value&&o.value.length>1&&!w.expand,style:{"--front-toast-height":`${((G=a.value[0])==null?void 0:G.height)||0}px`,"--width":`${f(qR)}px`,"--gap":`${w.gap}px`,...w.style,...f(n).style,...f(jR)(w.offset,w.mobileOffset)}},w.$attrs,{onBlur:v,onFocus:y,onMouseenter:_,onMousemove:_,onMouseleave:O,onDragend:T,onPointerdown:b,onPointerup:A}),[(C(!0),ie(Ie,null,wt(r($,R),(J,ne)=>{var ae,re,L,oe,Y,ee,le,ye,me,Pe;return C(),B(zR,{key:J.id,heights:a.value,icons:w.icons,index:ne,toast:J,defaultRichColors:w.richColors,duration:((ae=w.toastOptions)==null?void 0:ae.duration)??w.duration,class:qe(((re=w.toastOptions)==null?void 0:re.class)??""),descriptionClass:(L=w.toastOptions)==null?void 0:L.descriptionClass,invert:w.invert,visibleToasts:w.visibleToasts,closeButton:((oe=w.toastOptions)==null?void 0:oe.closeButton)??w.closeButton,interacting:u.value,position:$,style:Pt((Y=w.toastOptions)==null?void 0:Y.style),unstyled:(ee=w.toastOptions)==null?void 0:ee.unstyled,classes:(le=w.toastOptions)==null?void 0:le.classes,cancelButtonStyle:(ye=w.toastOptions)==null?void 0:ye.cancelButtonStyle,actionButtonStyle:(me=w.toastOptions)==null?void 0:me.actionButtonStyle,"close-button-aria-label":(Pe=w.toastOptions)==null?void 0:Pe.closeButtonAriaLabel,toasts:i.value[$],expandByDefault:w.expand,gap:w.gap,expanded:l.value,swipeDirections:t.swipeDirections,"onUpdate:heights":D,"onUpdate:height":P,onRemoveToast:g},{"close-icon":E(()=>[V(w.$slots,"close-icon",{},()=>[q(QR)])]),"loading-icon":E(()=>[V(w.$slots,"loading-icon",{},()=>[q(ZR,{visible:J.type==="loading"},null,8,["visible"])])]),"success-icon":E(()=>[V(w.$slots,"success-icon",{},()=>[q(oB)])]),"error-icon":E(()=>[V(w.$slots,"error-icon",{},()=>[q(mB)])]),"warning-icon":E(()=>[V(w.$slots,"warning-icon",{},()=>[q(dB)])]),"info-icon":E(()=>[V(w.$slots,"info-icon",{},()=>[q(aB)])]),_:2},1032,["heights","icons","index","toast","defaultRichColors","duration","class","descriptionClass","invert","visibleToasts","closeButton","interacting","position","style","unstyled","classes","cancelButtonStyle","actionButtonStyle","close-button-aria-label","toasts","expandByDefault","gap","expanded","swipeDirections"])}),128))],16,vB)}),128))],8,gB)],2112))}}),wB=_B;const ko=xt.create({baseURL:"https://api.beenglish.eu.org/DesignScreenshot/admin-api",timeout:12e4,headers:{"Content-Type":"application/json"}});let bc=!1;const _c=[],SB=async()=>{try{const e=localStorage.getItem("refreshToken");if(!e)throw new Error("No refresh token found");const t=await xt.post(`/system/auth/refresh-token?refreshToken=${e}`),{token:n,refreshToken:o}=t.data;return localStorage.setItem("accessToken",n),localStorage.setItem("refreshToken",o),n}catch(e){return localStorage.removeItem("accessToken"),localStorage.removeItem("refreshToken"),window.location.href="/auth",Promise.reject(e)}};ko.interceptors.request.use(e=>{const t=localStorage.getItem("accessToken");return t&&e.headers&&(e.headers.Authorization=`Bearer ${t}`),e},e=>Promise.reject(e));ko.interceptors.response.use(async e=>{const{data:t,status:n}=e;if(n!==200)return Bi.error(t.msg||"请求失败"),Promise.reject(new Error(t.msg||"请求失败"));if(t.code===401){const o=e.config;if(!o._retry){if(bc)return new Promise(r=>{_c.push(s=>{o.headers&&(o.headers.Authorization=`Bearer ${s}`),r(ko(o))})});o._retry=!0,bc=!0;try{const r=await SB();return o.headers&&(o.headers.Authorization=`Bearer ${r}`),_c.forEach(s=>s(r)),_c.length=0,ko(o)}catch(r){return Promise.reject(r)}finally{bc=!1}}}return t.code===0?t.data:(Bi.error(t.msg||"请求失败"),Promise.reject(new Error(t.msg||"请求失败")))},e=>{const t=e.message||"网络错误";return Bi.error(t),Promise.reject(e)});const wr=(e,t)=>ko.get(e,{params:t}),Sr=(e,t,n)=>ko.post(e,t,n),p_=(e,t)=>ko.put(e,t),h_=(e,t)=>ko.delete(e,{params:t}),GL=(e,t)=>ko.post(e,t,{headers:{"Content-Type":"multipart/form-data"}}),CB=e=>wr("/admin/app/page",e),xB=e=>wr("/admin/app/get-app-details",{appId:e}),EB=e=>wr("/admin/app/list",e),QL=e=>Sr("/admin/app/create",e),YL=e=>p_("/admin/app/update",e),XL=e=>h_("/admin/app/delete",e),ep=Symbol("platform"),m_=bf("app",()=>{const e=N([]);return{apps:e,fetchApps:async n=>{const o=await EB({platform:n});e.value=o}}});/*!
DesignScreenshot/output/100.64.0.2_run/100.64.0.2_8083_4_after_login.html:104:  */const ms=typeof document<"u";function g_(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function AB(e){return e.__esModule||e[Symbol.toStringTag]==="Module"||e.default&&g_(e.default)}const st=Object.assign;function wc(e,t){const n={};for(const o in t){const r=t[o];n[o]=Kn(r)?r.map(e):e(r)}return n}const Mi=()=>{},Kn=Array.isArray,v_=/#/g,OB=/&/g,TB=/\//g,PB=/=/g,kB=/\?/g,y_=/\+/g,IB=/%5B/g,DB=/%5D/g,b_=/%5E/g,RB=/%60/g,__=/%7B/g,BB=/%7C/g,w_=/%7D/g,MB=/%20/g;function tp(e){return encodeURI(""+e).replace(BB,"|").replace(IB,"[").replace(DB,"]")}function qB(e){return tp(e).replace(__,"{").replace(w_,"}").replace(b_,"^")}function zd(e){return tp(e).replace(y_,"%2B").replace(MB,"+").replace(v_,"%23").replace(OB,"%26").replace(RB,"`").replace(__,"{").replace(w_,"}").replace(b_,"^")}function $B(e){return zd(e).replace(PB,"%3D")}function FB(e){return tp(e).replace(v_,"%23").replace(kB,"%3F")}function LB(e){return e==null?"":FB(e).replace(TB,"%2F")}function ra(e){try{return decodeURIComponent(""+e)}catch{}return""+e}const NB=/\/$/,jB=e=>e.replace(NB,"");function Sc(e,t,n="/"){let o,r={},s="",i="";const a=t.indexOf("#");let l=t.indexOf("?");return a<l&&a>=0&&(l=-1),l>-1&&(o=t.slice(0,l),s=t.slice(l+1,a>-1?a:t.length),r=e(s)),a>-1&&(o=o||t.slice(0,a),i=t.slice(a,t.length)),o=zB(o??t,n),{fullPath:o+(s&&"?")+s+i,path:o,query:r,hash:ra(i)}}function VB(e,t){const n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}function ym(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function UB(e,t,n){const o=t.matched.length-1,r=n.matched.length-1;return o>-1&&o===r&&Hs(t.matched[o],n.matched[r])&&S_(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function Hs(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function S_(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(!HB(e[n],t[n]))return!1;return!0}function HB(e,t){return Kn(e)?bm(e,t):Kn(t)?bm(t,e):e===t}function bm(e,t){return Kn(t)?e.length===t.length&&e.every((n,o)=>n===t[o]):e.length===1&&e[0]===t}function zB(e,t){if(e.startsWith("/"))return e;if(!e)return t;const n=t.split("/"),o=e.split("/"),r=o[o.length-1];(r===".."||r===".")&&o.push("");let s=n.length-1,i,a;for(i=0;i<o.length;i++)if(a=o[i],a!==".")if(a==="..")s>1&&s--;else break;return n.slice(0,s).join("/")+"/"+o.slice(i).join("/")}const Qo={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0};var sa;(function(e){e.pop="pop",e.push="push"})(sa||(sa={}));var qi;(function(e){e.back="back",e.forward="forward",e.unknown=""})(qi||(qi={}));function KB(e){if(!e)if(ms){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),jB(e)}const WB=/^[^#]+#/;function GB(e,t){return e.replace(WB,"#")+t}function QB(e,t){const n=document.documentElement.getBoundingClientRect(),o=e.getBoundingClientRect();return{behavior:t.behavior,left:o.left-n.left-(t.left||0),top:o.top-n.top-(t.top||0)}}const Mu=()=>({left:window.scrollX,top:window.scrollY});function YB(e){let t;if("el"in e){const n=e.el,o=typeof n=="string"&&n.startsWith("#"),r=typeof n=="string"?o?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!r)return;t=QB(r,e)}else t=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left!=null?t.left:window.scrollX,t.top!=null?t.top:window.scrollY)}function _m(e,t){return(history.state?history.state.position-t:-1)+e}const Kd=new Map;function XB(e,t){Kd.set(e,t)}function JB(e){const t=Kd.get(e);return Kd.delete(e),t}let ZB=()=>location.protocol+"//"+location.host;function C_(e,t){const{pathname:n,search:o,hash:r}=t,s=e.indexOf("#");if(s>-1){let a=r.includes(e.slice(s))?e.slice(s).length:1,l=r.slice(a);return l[0]!=="/"&&(l="/"+l),ym(l,"")}return ym(n,e)+o+r}function eM(e,t,n,o){let r=[],s=[],i=null;const a=({state:p})=>{const h=C_(e,location),m=n.value,g=t.value;let v=0;if(p){if(n.value=h,t.value=p,i&&i===m){i=null;return}v=g?p.position-g.position:0}else o(h);r.forEach(y=>{y(n.value,m,{delta:v,type:sa.pop,direction:v?v>0?qi.forward:qi.back:qi.unknown})})};function l(){i=n.value}function u(p){r.push(p);const h=()=>{const m=r.indexOf(p);m>-1&&r.splice(m,1)};return s.push(h),h}function c(){const{history:p}=window;p.state&&p.replaceState(st({},p.state,{scroll:Mu()}),"")}function d(){for(const p of s)p();s=[],window.removeEventListener("popstate",a),window.removeEventListener("beforeunload",c)}return window.addEventListener("popstate",a),window.addEventListener("beforeunload",c,{passive:!0}),{pauseListeners:l,listen:u,destroy:d}}function wm(e,t,n,o=!1,r=!1){return{back:e,current:t,forward:n,replaced:o,position:window.history.length,scroll:r?Mu():null}}function tM(e){const{history:t,location:n}=window,o={value:C_(e,n)},r={value:t.state};r.value||s(o.value,{back:null,current:o.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function s(l,u,c){const d=e.indexOf("#"),p=d>-1?(n.host&&document.querySelector("base")?e:e.slice(d))+l:ZB()+e+l;try{t[c?"replaceState":"pushState"](u,"",p),r.value=u}catch(h){console.error(h),n[c?"replace":"assign"](p)}}function i(l,u){const c=st({},t.state,wm(r.value.back,l,r.value.forward,!0),u,{position:r.value.position});s(l,c,!0),o.value=l}function a(l,u){const c=st({},r.value,t.state,{forward:l,scroll:Mu()});s(c.current,c,!0);const d=st({},wm(o.value,l,null),{position:c.position+1},u);s(l,d,!1),o.value=l}return{location:o,state:r,push:a,replace:i}}function nM(e){e=KB(e);const t=tM(e),n=eM(e,t.state,t.location,t.replace);function o(s,i=!0){i||n.pauseListeners(),history.go(s)}const r=st({location:"",base:e,go:o,createHref:GB.bind(null,e)},t,n);return Object.defineProperty(r,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(r,"state",{enumerable:!0,get:()=>t.state.value}),r}function oM(e){return typeof e=="string"||e&&typeof e=="object"}function x_(e){return typeof e=="string"||typeof e=="symbol"}const E_=Symbol("");var Sm;(function(e){e[e.aborted=4]="aborted",e[e.cancelled=8]="cancelled",e[e.duplicated=16]="duplicated"})(Sm||(Sm={}));function zs(e,t){return st(new Error,{type:e,[E_]:!0},t)}function So(e,t){return e instanceof Error&&E_ in e&&(t==null||!!(e.type&t))}const Cm="[^/]+?",rM={sensitive:!1,strict:!1,start:!0,end:!0},sM=/[.+*?^${}()[\]/\\]/g;function iM(e,t){const n=st({},rM,t),o=[];let r=n.start?"^":"";const s=[];for(const u of e){const c=u.length?[]:[90];n.strict&&!u.length&&(r+="/");for(let d=0;d<u.length;d++){const p=u[d];let h=40+(n.sensitive?.25:0);if(p.type===0)d||(r+="/"),r+=p.value.replace(sM,"\\$&"),h+=40;else if(p.type===1){const{value:m,repeatable:g,optional:v,regexp:y}=p;s.push({name:m,repeatable:g,optional:v});const b=y||Cm;if(b!==Cm){h+=10;try{new RegExp(`(${b})`)}catch(O){throw new Error(`Invalid custom RegExp for param "${m}" (${b}): `+O.message)}}let _=g?`((?:${b})(?:/(?:${b}))*)`:`(${b})`;d||(_=v&&u.length<2?`(?:/${_})`:"/"+_),v&&(_+="?"),r+=_,h+=20,v&&(h+=-8),g&&(h+=-20),b===".*"&&(h+=-50)}c.push(h)}o.push(c)}if(n.strict&&n.end){const u=o.length-1;o[u][o[u].length-1]+=.7000000000000001}n.strict||(r+="/?"),n.end?r+="$":n.strict&&!r.endsWith("/")&&(r+="(?:/|$)");const i=new RegExp(r,n.sensitive?"":"i");function a(u){const c=u.match(i),d={};if(!c)return null;for(let p=1;p<c.length;p++){const h=c[p]||"",m=s[p-1];d[m.name]=h&&m.repeatable?h.split("/"):h}return d}function l(u){let c="",d=!1;for(const p of e){(!d||!c.endsWith("/"))&&(c+="/"),d=!1;for(const h of p)if(h.type===0)c+=h.value;else if(h.type===1){const{value:m,repeatable:g,optional:v}=h,y=m in u?u[m]:"";if(Kn(y)&&!g)throw new Error(`Provided param "${m}" is an array but it is not repeatable (* or + modifiers)`);const b=Kn(y)?y.join("/"):y;if(!b)if(v)p.length<2&&(c.endsWith("/")?c=c.slice(0,-1):d=!0);else throw new Error(`Missing required param "${m}"`);c+=b}}return c||"/"}return{re:i,score:o,keys:s,parse:a,stringify:l}}function aM(e,t){let n=0;for(;n<e.length&&n<t.length;){const o=t[n]-e[n];if(o)return o;n++}return e.length<t.length?e.length===1&&e[0]===80?-1:1:e.length>t.length?t.length===1&&t[0]===80?1:-1:0}function A_(e,t){let n=0;const o=e.score,r=t.score;for(;n<o.length&&n<r.length;){const s=aM(o[n],r[n]);if(s)return s;n++}if(Math.abs(r.length-o.length)===1){if(xm(o))return 1;if(xm(r))return-1}return r.length-o.length}function xm(e){const t=e[e.length-1];return e.length>0&&t[t.length-1]<0}const lM={type:0,value:""},uM=/[a-zA-Z0-9_]/;function cM(e){if(!e)return[[]];if(e==="/")return[[lM]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(h){throw new Error(`ERR (${n})/"${u}": ${h}`)}let n=0,o=n;const r=[];let s;function i(){s&&r.push(s),s=[]}let a=0,l,u="",c="";function d(){u&&(n===0?s.push({type:0,value:u}):n===1||n===2||n===3?(s.length>1&&(l==="*"||l==="+")&&t(`A repeatable param (${u}) must be alone in its segment. eg: '/:ids+.`),s.push({type:1,value:u,regexp:c,repeatable:l==="*"||l==="+",optional:l==="*"||l==="?"})):t("Invalid state to consume buffer"),u="")}function p(){u+=l}for(;a<e.length;){if(l=e[a++],l==="\\"&&n!==2){o=n,n=4;continue}switch(n){case 0:l==="/"?(u&&d(),i()):l===":"?(d(),n=1):p();break;case 4:p(),n=o;break;case 1:l==="("?n=2:uM.test(l)?p():(d(),n=0,l!=="*"&&l!=="?"&&l!=="+"&&a--);break;case 2:l===")"?c[c.length-1]=="\\"?c=c.slice(0,-1)+l:n=3:c+=l;break;case 3:d(),n=0,l!=="*"&&l!=="?"&&l!=="+"&&a--,c="";break;default:t("Unknown state");break}}return n===2&&t(`Unfinished custom RegExp for param "${u}"`),d(),i(),r}function dM(e,t,n){const o=iM(cM(e.path),n),r=st(o,{record:e,parent:t,children:[],alias:[]});return t&&!r.record.aliasOf==!t.record.aliasOf&&t.children.push(r),r}function fM(e,t){const n=[],o=new Map;t=Tm({strict:!1,end:!0,sensitive:!1},t);function r(d){return o.get(d)}function s(d,p,h){const m=!h,g=Am(d);g.aliasOf=h&&h.record;const v=Tm(t,d),y=[g];if("alias"in d){const O=typeof d.alias=="string"?[d.alias]:d.alias;for(const T of O)y.push(Am(st({},g,{components:h?h.record.components:g.components,path:T,aliasOf:h?h.record:g})))}let b,_;for(const O of y){const{path:T}=O;if(p&&T[0]!=="/"){const A=p.record.path,D=A[A.length-1]==="/"?"":"/";O.path=p.record.path+(T&&D+T)}if(b=dM(O,p,v),h?h.alias.push(b):(_=_||b,_!==b&&_.alias.push(b),m&&d.name&&!Om(b)&&i(d.name)),O_(b)&&l(b),g.children){const A=g.children;for(let D=0;D<A.length;D++)s(A[D],b,h&&h.children[D])}h=h||b}return _?()=>{i(_)}:Mi}function i(d){if(x_(d)){const p=o.get(d);p&&(o.delete(d),n.splice(n.indexOf(p),1),p.children.forEach(i),p.alias.forEach(i))}else{const p=n.indexOf(d);p>-1&&(n.splice(p,1),d.record.name&&o.delete(d.record.name),d.children.forEach(i),d.alias.forEach(i))}}function a(){return n}function l(d){const p=mM(d,n);n.splice(p,0,d),d.record.name&&!Om(d)&&o.set(d.record.name,d)}function u(d,p){let h,m={},g,v;if("name"in d&&d.name){if(h=o.get(d.name),!h)throw zs(1,{location:d});v=h.record.name,m=st(Em(p.params,h.keys.filter(_=>!_.optional).concat(h.parent?h.parent.keys.filter(_=>_.optional):[]).map(_=>_.name)),d.params&&Em(d.params,h.keys.map(_=>_.name))),g=h.stringify(m)}else if(d.path!=null)g=d.path,h=n.find(_=>_.re.test(g)),h&&(m=h.parse(g),v=h.record.name);else{if(h=p.name?o.get(p.name):n.find(_=>_.re.test(p.path)),!h)throw zs(1,{location:d,currentLocation:p});v=h.record.name,m=st({},p.params,d.params),g=h.stringify(m)}const y=[];let b=h;for(;b;)y.unshift(b.record),b=b.parent;return{name:v,path:g,params:m,matched:y,meta:hM(y)}}e.forEach(d=>s(d));function c(){n.length=0,o.clear()}return{addRoute:s,resolve:u,removeRoute:i,clearRoutes:c,getRoutes:a,getRecordMatcher:r}}function Em(e,t){const n={};for(const o of t)o in e&&(n[o]=e[o]);return n}function Am(e){const t={path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:e.aliasOf,beforeEnter:e.beforeEnter,props:pM(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in e?e.components||null:e.component&&{default:e.component}};return Object.defineProperty(t,"mods",{value:{}}),t}function pM(e){const t={},n=e.props||!1;if("component"in e)t.default=n;else for(const o in e.components)t[o]=typeof n=="object"?n[o]:n;return t}function Om(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function hM(e){return e.reduce((t,n)=>st(t,n.meta),{})}function Tm(e,t){const n={};for(const o in e)n[o]=o in t?t[o]:e[o];return n}function mM(e,t){let n=0,o=t.length;for(;n!==o;){const s=n+o>>1;A_(e,t[s])<0?o=s:n=s+1}const r=gM(e);return r&&(o=t.lastIndexOf(r,o-1)),o}function gM(e){let t=e;for(;t=t.parent;)if(O_(t)&&A_(e,t)===0)return t}function O_({record:e}){return!!(e.name||e.components&&Object.keys(e.components).length||e.redirect)}function vM(e){const t={};if(e===""||e==="?")return t;const o=(e[0]==="?"?e.slice(1):e).split("&");for(let r=0;r<o.length;++r){const s=o[r].replace(y_," "),i=s.indexOf("="),a=ra(i<0?s:s.slice(0,i)),l=i<0?null:ra(s.slice(i+1));if(a in t){let u=t[a];Kn(u)||(u=t[a]=[u]),u.push(l)}else t[a]=l}return t}function Pm(e){let t="";for(let n in e){const o=e[n];if(n=$B(n),o==null){o!==void 0&&(t+=(t.length?"&":"")+n);continue}(Kn(o)?o.map(s=>s&&zd(s)):[o&&zd(o)]).forEach(s=>{s!==void 0&&(t+=(t.length?"&":"")+n,s!=null&&(t+="="+s))})}return t}function yM(e){const t={};for(const n in e){const o=e[n];o!==void 0&&(t[n]=Kn(o)?o.map(r=>r==null?null:""+r):o==null?o:""+o)}return t}const bM=Symbol(""),km=Symbol(""),qu=Symbol(""),np=Symbol(""),Wd=Symbol("");function hi(){let e=[];function t(o){return e.push(o),()=>{const r=e.indexOf(o);r>-1&&e.splice(r,1)}}function n(){e=[]}return{add:t,list:()=>e.slice(),reset:n}}function or(e,t,n,o,r,s=i=>i()){const i=o&&(o.enterCallbacks[r]=o.enterCallbacks[r]||[]);return()=>new Promise((a,l)=>{const u=p=>{p===!1?l(zs(4,{from:n,to:t})):p instanceof Error?l(p):oM(p)?l(zs(2,{from:t,to:p})):(i&&o.enterCallbacks[r]===i&&typeof p=="function"&&i.push(p),a())},c=s(()=>e.call(o&&o.instances[r],t,n,u));let d=Promise.resolve(c);e.length<3&&(d=d.then(u)),d.catch(p=>l(p))})}function Cc(e,t,n,o,r=s=>s()){const s=[];for(const i of e)for(const a in i.components){let l=i.components[a];if(!(t!=="beforeRouteEnter"&&!i.instances[a]))if(g_(l)){const c=(l.__vccOpts||l)[t];c&&s.push(or(c,n,o,i,a,r))}else{let u=l();s.push(()=>u.then(c=>{if(!c)throw new Error(`Couldn't resolve component "${a}" at "${i.path}"`);const d=AB(c)?c.default:c;i.mods[a]=c,i.components[a]=d;const h=(d.__vccOpts||d)[t];return h&&or(h,n,o,i,a,r)()}))}}return s}function Im(e){const t=kt(qu),n=kt(np),o=U(()=>{const l=f(e.to);return t.resolve(l)}),r=U(()=>{const{matched:l}=o.value,{length:u}=l,c=l[u-1],d=n.matched;if(!c||!d.length)return-1;const p=d.findIndex(Hs.bind(null,c));if(p>-1)return p;const h=Dm(l[u-2]);return u>1&&Dm(c)===h&&d[d.length-1].path!==h?d.findIndex(Hs.bind(null,l[u-2])):p}),s=U(()=>r.value>-1&&xM(n.params,o.value.params)),i=U(()=>r.value>-1&&r.value===n.matched.length-1&&S_(n.params,o.value.params));function a(l={}){if(CM(l)){const u=t[f(e.replace)?"replace":"push"](f(e.to)).catch(Mi);return e.viewTransition&&typeof document<"u"&&"startViewTransition"in document&&document.startViewTransition(()=>u),u}return Promise.resolve()}return{route:o,href:U(()=>o.value.href),isActive:s,isExactActive:i,navigate:a}}function _M(e){return e.length===1?e[0]:e}const wM=F({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"},viewTransition:Boolean},useLink:Im,setup(e,{slots:t}){const n=Ht(Im(e)),{options:o}=kt(qu),r=U(()=>({[Rm(e.activeClass,o.linkActiveClass,"router-link-active")]:n.isActive,[Rm(e.exactActiveClass,o.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const s=t.default&&_M(t.default(n));return e.custom?s:un("a",{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:r.value},s)}}}),SM=wM;function CM(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget&&e.currentTarget.getAttribute){const t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function xM(e,t){for(const n in t){const o=t[n],r=e[n];if(typeof o=="string"){if(o!==r)return!1}else if(!Kn(r)||r.length!==o.length||o.some((s,i)=>s!==r[i]))return!1}return!0}function Dm(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const Rm=(e,t,n)=>e??t??n,EM=F({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){const o=kt(Wd),r=U(()=>e.route||o.value),s=kt(km,0),i=U(()=>{let u=f(s);const{matched:c}=r.value;let d;for(;(d=c[u])&&!d.components;)u++;return u}),a=U(()=>r.value.matched[i.value]);Nn(km,U(()=>i.value+1)),Nn(bM,a),Nn(Wd,r);const l=N();return Ce(()=>[l.value,a.value,e.name],([u,c,d],[p,h,m])=>{c&&(c.instances[d]=u,h&&h!==c&&u&&u===p&&(c.leaveGuards.size||(c.leaveGuards=h.leaveGuards),c.updateGuards.size||(c.updateGuards=h.updateGuards))),u&&c&&(!h||!Hs(c,h)||!p)&&(c.enterCallbacks[d]||[]).forEach(g=>g(u))},{flush:"post"}),()=>{const u=r.value,c=e.name,d=a.value,p=d&&d.components[c];if(!p)return Bm(n.default,{Component:p,route:u});const h=d.props[c],m=h?h===!0?u.params:typeof h=="function"?h(u):h:null,v=un(p,st({},m,t,{onVnodeUnmounted:y=>{y.component.isUnmounted&&(d.instances[c]=null)},ref:l}));return Bm(n.default,{Component:v,route:u})||v}}});function Bm(e,t){if(!e)return null;const n=e(t);return n.length===1?n[0]:n}const AM=EM;function OM(e){const t=fM(e.routes,e),n=e.parseQuery||vM,o=e.stringifyQuery||Pm,r=e.history,s=hi(),i=hi(),a=hi(),l=Cn(Qo);let u=Qo;ms&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const c=wc.bind(null,x=>""+x),d=wc.bind(null,LB),p=wc.bind(null,ra);function h(x,z){let H,X;return x_(x)?(H=t.getRecordMatcher(x),X=z):X=x,t.addRoute(X,H)}function m(x){const z=t.getRecordMatcher(x);z&&t.removeRoute(z)}function g(){return t.getRoutes().map(x=>x.record)}function v(x){return!!t.getRecordMatcher(x)}function y(x,z){if(z=st({},z||l.value),typeof x=="string"){const j=Sc(n,x,z.path),K=t.resolve({path:j.path},z),Z=r.createHref(j.fullPath);return st(j,K,{params:p(K.params),hash:ra(j.hash),redirectedFrom:void 0,href:Z})}let H;if(x.path!=null)H=st({},x,{path:Sc(n,x.path,z.path).path});else{const j=st({},x.params);for(const K in j)j[K]==null&&delete j[K];H=st({},x,{params:d(j)}),z.params=d(z.params)}const X=t.resolve(H,z),pe=x.hash||"";X.params=c(p(X.params));const S=VB(o,st({},x,{hash:qB(pe),path:X.path})),I=r.createHref(S);return st({fullPath:S,hash:pe,query:o===Pm?yM(x.query):x.query||{}},X,{redirectedFrom:void 0,href:I})}function b(x){return typeof x=="string"?Sc(n,x,l.value.path):st({},x)}function _(x,z){if(u!==x)return zs(8,{from:z,to:x})}function O(x){return D(x)}function T(x){return O(st(b(x),{replace:!0}))}function A(x){const z=x.matched[x.matched.length-1];if(z&&z.redirect){const{redirect:H}=z;let X=typeof H=="function"?H(x):H;return typeof X=="string"&&(X=X.includes("?")||X.includes("#")?X=b(X):{path:X},X.params={}),st({query:x.query,hash:x.hash,params:X.path!=null?{}:x.params},X)}}function D(x,z){const H=u=y(x),X=l.value,pe=x.state,S=x.force,I=x.replace===!0,j=A(H);if(j)return D(st(b(j),{state:typeof j=="object"?st({},pe,j.state):pe,force:S,replace:I}),z||H);const K=H;K.redirectedFrom=z;let Z;return!S&&UB(o,X,H)&&(Z=zs(16,{to:K,from:X}),ee(X,X,!0,!1)),(Z?Promise.resolve(Z):k(K,X)).catch(Q=>So(Q)?So(Q,2)?Q:Y(Q):L(Q,K,X)).then(Q=>{if(Q){if(So(Q,2))return D(st({replace:I},b(Q.to),{state:typeof Q.to=="object"?st({},pe,Q.to.state):pe,force:S}),z||K)}else Q=R(K,X,!0,I,pe);return $(K,X,Q),Q})}function P(x,z){const H=_(x,z);return H?Promise.reject(H):Promise.resolve()}function w(x){const z=me.values().next().value;return z&&typeof z.runWithContext=="function"?z.runWithContext(x):x()}function k(x,z){let H;const[X,pe,S]=TM(x,z);H=Cc(X.reverse(),"beforeRouteLeave",x,z);for(const j of X)j.leaveGuards.forEach(K=>{H.push(or(K,x,z))});const I=P.bind(null,x,z);return H.push(I),Se(H).then(()=>{H=[];for(const j of s.list())H.push(or(j,x,z));return H.push(I),Se(H)}).then(()=>{H=Cc(pe,"beforeRouteUpdate",x,z);for(const j of pe)j.updateGuards.forEach(K=>{H.push(or(K,x,z))});return H.push(I),Se(H)}).then(()=>{H=[];for(const j of S)if(j.beforeEnter)if(Kn(j.beforeEnter))for(const K of j.beforeEnter)H.push(or(K,x,z));else H.push(or(j.beforeEnter,x,z));return H.push(I),Se(H)}).then(()=>(x.matched.forEach(j=>j.enterCallbacks={}),H=Cc(S,"beforeRouteEnter",x,z,w),H.push(I),Se(H))).then(()=>{H=[];for(const j of i.list())H.push(or(j,x,z));return H.push(I),Se(H)}).catch(j=>So(j,8)?j:Promise.reject(j))}function $(x,z,H){a.list().forEach(X=>w(()=>X(x,z,H)))}function R(x,z,H,X,pe){const S=_(x,z);if(S)return S;const I=z===Qo,j=ms?history.state:{};H&&(X||I?r.replace(x.fullPath,st({scroll:I&&j&&j.scroll},pe)):r.push(x.fullPath,pe)),l.value=x,ee(x,z,H,I),Y()}let G;function J(){G||(G=r.listen((x,z,H)=>{if(!Pe.listening)return;const X=y(x),pe=A(X);if(pe){D(st(pe,{replace:!0,force:!0}),X).catch(Mi);return}u=X;const S=l.value;ms&&XB(_m(S.fullPath,H.delta),Mu()),k(X,S).catch(I=>So(I,12)?I:So(I,2)?(D(st(b(I.to),{force:!0}),X).then(j=>{So(j,20)&&!H.delta&&H.type===sa.pop&&r.go(-1,!1)}).catch(Mi),Promise.reject()):(H.delta&&r.go(-H.delta,!1),L(I,X,S))).then(I=>{I=I||R(X,S,!1),I&&(H.delta&&!So(I,8)?r.go(-H.delta,!1):H.type===sa.pop&&So(I,20)&&r.go(-1,!1)),$(X,S,I)}).catch(Mi)}))}let ne=hi(),ae=hi(),re;function L(x,z,H){Y(x);const X=ae.list();return X.length?X.forEach(pe=>pe(x,z,H)):console.error(x),Promise.reject(x)}function oe(){return re&&l.value!==Qo?Promise.resolve():new Promise((x,z)=>{ne.add([x,z])})}function Y(x){return re||(re=!x,J(),ne.list().forEach(([z,H])=>x?H(x):z()),ne.reset()),x}function ee(x,z,H,X){const{scrollBehavior:pe}=e;if(!ms||!pe)return Promise.resolve();const S=!H&&JB(_m(x.fullPath,0))||(X||!H)&&history.state&&history.state.scroll||null;return We().then(()=>pe(x,z,S)).then(I=>I&&YB(I)).catch(I=>L(I,x,z))}const le=x=>r.go(x);let ye;const me=new Set,Pe={currentRoute:l,listening:!0,addRoute:h,removeRoute:m,clearRoutes:t.clearRoutes,hasRoute:v,getRoutes:g,resolve:y,options:e,push:O,replace:T,go:le,back:()=>le(-1),forward:()=>le(1),beforeEach:s.add,beforeResolve:i.add,afterEach:a.add,onError:ae.add,isReady:oe,install(x){const z=this;x.component("RouterLink",SM),x.component("RouterView",AM),x.config.globalProperties.$router=z,Object.defineProperty(x.config.globalProperties,"$route",{enumerable:!0,get:()=>f(l)}),ms&&!ye&&l.value===Qo&&(ye=!0,O(r.location).catch(pe=>{}));const H={};for(const pe in Qo)Object.defineProperty(H,pe,{get:()=>l.value[pe],enumerable:!0});x.provide(qu,z),x.provide(np,Zl(H)),x.provide(Wd,l);const X=x.unmount;me.add(x),x.unmount=function(){me.delete(x),me.size<1&&(u=Qo,G&&G(),G=null,l.value=Qo,ye=!1,re=!1),X()}}};function Se(x){return x.reduce((z,H)=>z.then(()=>w(H)),Promise.resolve())}return Pe}function TM(e,t){const n=[],o=[],r=[],s=Math.max(t.matched.length,e.matched.length);for(let i=0;i<s;i++){const a=t.matched[i];a&&(e.matched.find(u=>Hs(u,a))?o.push(a):n.push(a));const l=e.matched[i];l&&(t.matched.find(u=>Hs(u,l))||r.push(l))}return[n,o,r]}function Ta(){return kt(qu)}function T_(e){return kt(np)}const PM={class:"w-full flex items-center justify-between"},kM={class:"text-gray-500"},IM=F({__name:"SearchDialog",props:{modelValue:{type:Boolean,default:!1},modelModifiers:{}},emits:["update:modelValue"],setup(e){const t=ts(e,"modelValue"),n=Ta(),o=N(""),r=kt(ep);U(()=>`在 ${(r==null?void 0:r.value)||"All Platforms"} 中搜索应用...`);const{apps:s}=va(m_()),i=U(()=>r!=null&&r.value?s.value.filter(l=>l.platform===r.value):[]),a=l=>{const{id:u,platform:c}=l;t.value=!1,n.push({path:"/details",query:{id:u,platform:c}})};return(l,u)=>{const c=JI,d=Yf,p=Rd;return C(),B(f(Fk),{open:t.value,"onUpdate:open":u[1]||(u[1]=h=>t.value=h)},{default:E(()=>[q(f(Ab),{modelValue:f(o),"onUpdate:modelValue":u[0]||(u[0]=h=>$e(o)?o.value=h:null),placeholder:"Type a command or search..."},null,8,["modelValue"]),q(f(Ob),{class:"h-100"},{default:E(()=>[q(f(Eb),null,{default:E(()=>[q(c,{title:"No apps found in this platform",description:"You can change the platform or search another app"})]),_:1}),q(p,{heading:"apps"},{default:E(()=>[(C(!0),ie(Ie,null,wt(f(i),h=>(C(),B(f(Dd),{value:h.name,key:h.id,onClick:m=>a(h)},{default:E(()=>[ce("div",PM,[q(d,{logo:h.appLogoUrl,name:h.name,description:h.appTagline??""},null,8,["logo","name","description"]),ce("span",kM,Ne(h.platform),1)])]),_:2},1032,["value","onClick"]))),128))]),_:1})]),_:1})]),_:1},8,["open"])}}}),Mm=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,qm=fb,DM=(e,t)=>n=>{var o;if((t==null?void 0:t.variants)==null)return qm(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:r,defaultVariants:s}=t,i=Object.keys(r).map(u=>{const c=n==null?void 0:n[u],d=s==null?void 0:s[u];if(c===null)return null;const p=Mm(c)||Mm(d);return r[u][p]}),a=n&&Object.entries(n).reduce((u,c)=>{let[d,p]=c;return p===void 0||(u[d]=p),u},{}),l=t==null||(o=t.compoundVariants)===null||o===void 0?void 0:o.reduce((u,c)=>{let{class:d,className:p,...h}=c;return Object.entries(h).every(m=>{let[g,v]=m;return Array.isArray(v)?v.includes({...s,...a}[g]):{...s,...a}[g]===v})?[...u,d,p]:u},[]);return qm(e,i,l,n==null?void 0:n.class,n==null?void 0:n.className)},vn=F({__name:"Button",props:{variant:{},size:{},class:{},asChild:{type:Boolean},as:{default:"button"}},setup(e){const t=e;return(n,o)=>(C(),B(f(Ae),{"data-slot":"button",as:n.as,"as-child":n.asChild,class:qe(f(Fe)(f(op)({variant:n.variant,size:n.size}),t.class))},{default:E(()=>[V(n.$slots,"default")]),_:3},8,["as","as-child","class"]))}}),op=DM("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-md font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive cursor-pointer",{variants:{variant:{default:"bg-primary text-primary-foreground shadow-xs hover:bg-primary/90",destructive:"bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-11 rounded-md px-6 has-[>svg]:px-4",icon:"size-9"}},defaultVariants:{variant:"default",size:"lg"}}),rp=F({__name:"Tabs",props:{defaultValue:{},orientation:{},dir:{},activationMode:{},modelValue:{},unmountOnHide:{type:Boolean},asChild:{type:Boolean},as:{},class:{}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,o=t,r=et(n,"class"),s=ft(r,o);return(i,a)=>(C(),B(f(vP),te({"data-slot":"tabs"},f(s),{class:f(Fe)("flex flex-col gap-2",n.class)}),{default:E(()=>[V(i.$slots,"default")]),_:3},16,["class"]))}}),sp=F({__name:"TabsList",props:{loop:{type:Boolean},asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,n=et(t,"class");return(o,r)=>(C(),B(f(wP),te({"data-slot":"tabs-list"},f(n),{class:f(Fe)("bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-lg p-[3px]",t.class)}),{default:E(()=>[V(o.$slots,"default")]),_:3},16,["class"]))}}),ip=F({__name:"TabsTrigger",props:{value:{},disabled:{type:Boolean},asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,n=et(t,"class"),o=Kt(n);return(r,s)=>(C(),B(f(CP),te({"data-slot":"tabs-trigger"},f(o),{class:f(Fe)("data-[state=active]:bg-background dark:data-[state=active]:text-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 text-foreground dark:text-muted-foreground inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-md font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 hover:bg-background hover:text-foreground cursor-pointer text-muted-foreground data-[state=active]:bg-transparent data-[state=active]:text-foreground data-[state=active]:shadow-none",t.class)}),{default:E(()=>[V(r.$slots,"default")]),_:3},16,["class"]))}}),JL=e=>Sr("/system/auth/login",e),ZL=e=>Sr("/system/auth/social-login",e),RM=()=>Sr("/system/auth/logout"),BM=()=>wr("/system/auth/get-user-info"),MM=F({__name:"Avatar",props:{class:{}},setup(e){const t=e;return(n,o)=>(C(),B(f(F1),{"data-slot":"avatar",class:qe(f(Fe)("relative flex size-8 shrink-0 overflow-hidden rounded-full",t.class))},{default:E(()=>[V(n.$slots,"default")]),_:3},8,["class"]))}}),qM=F({__name:"AvatarFallback",props:{delayMs:{},asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,n=et(t,"class");return(o,r)=>(C(),B(f(N1),te({"data-slot":"avatar-fallback"},f(n),{class:f(Fe)("bg-muted flex size-full items-center justify-center rounded-full",t.class)}),{default:E(()=>[V(o.$slots,"default")]),_:3},16,["class"]))}}),$M=F({__name:"AvatarImage",props:{src:{},referrerPolicy:{},crossOrigin:{},asChild:{type:Boolean},as:{}},setup(e){const t=e;return(n,o)=>(C(),B(f(U1),te({"data-slot":"avatar-image"},t,{class:"aspect-square size-full"}),{default:E(()=>[V(n.$slots,"default")]),_:3},16))}}),P_=F({__name:"DropdownMenu",props:{defaultOpen:{type:Boolean},open:{type:Boolean},dir:{},modal:{type:Boolean}},emits:["update:open"],setup(e,{emit:t}){const r=ft(e,t);return(s,i)=>(C(),B(f(BO),te({"data-slot":"dropdown-menu"},f(r)),{default:E(()=>[V(s.$slots,"default")]),_:3},16))}}),k_=F({__name:"DropdownMenuContent",props:{forceMount:{type:Boolean},loop:{type:Boolean},side:{},sideOffset:{default:4},sideFlip:{type:Boolean},align:{},alignOffset:{},alignFlip:{type:Boolean},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},positionStrategy:{},updatePositionStrategy:{},disableUpdateOnLayoutShift:{type:Boolean},prioritizePosition:{type:Boolean},reference:{},asChild:{type:Boolean},as:{},class:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","closeAutoFocus"],setup(e,{emit:t}){const n=e,o=t,r=et(n,"class"),s=ft(r,o);return(i,a)=>(C(),B(f(HO),null,{default:E(()=>[q(f(qO),te({"data-slot":"dropdown-menu-content"},f(s),{class:f(Fe)("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--reka-dropdown-menu-content-available-height) min-w-[8rem] origin-(--reka-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",n.class)}),{default:E(()=>[V(i.$slots,"default")]),_:3},16,["class"])]),_:3}))}}),FM=F({__name:"DropdownMenuGroup",props:{asChild:{type:Boolean},as:{}},setup(e){const t=e;return(n,o)=>(C(),B(f(FO),te({"data-slot":"dropdown-menu-group"},t),{default:E(()=>[V(n.$slots,"default")]),_:3},16))}}),Br=F({__name:"DropdownMenuItem",props:{disabled:{type:Boolean},textValue:{},asChild:{type:Boolean},as:{},class:{},inset:{type:Boolean},variant:{default:"default"}},setup(e){const t=e,n=et(t,"inset","variant","class"),o=Kt(n);return(r,s)=>(C(),B(f(NO),te({"data-slot":"dropdown-menu-item","data-inset":r.inset?"":void 0,"data-variant":r.variant},f(o),{class:f(Fe)("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive-foreground data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/40 data-[variant=destructive]:focus:text-destructive-foreground data-[variant=destructive]:*:[svg]:!text-destructive-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t.class)}),{default:E(()=>[V(r.$slots,"default")]),_:3},16,["data-inset","data-variant","class"]))}}),LM=F({__name:"DropdownMenuLabel",props:{asChild:{type:Boolean},as:{},class:{},inset:{type:Boolean}},setup(e){const t=e,n=et(t,"class","inset"),o=Kt(n);return(r,s)=>(C(),B(f(VO),te({"data-slot":"dropdown-menu-label","data-inset":r.inset?"":void 0},f(o),{class:f(Fe)("px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",t.class)}),{default:E(()=>[V(r.$slots,"default")]),_:3},16,["data-inset","class"]))}}),$m=F({__name:"DropdownMenuSeparator",props:{asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,n=et(t,"class");return(o,r)=>(C(),B(f(KO),te({"data-slot":"dropdown-menu-separator"},f(n),{class:f(Fe)("bg-border -mx-1 my-1 h-px",t.class)}),null,16,["class"]))}}),I_=F({__name:"DropdownMenuTrigger",props:{disabled:{type:Boolean},asChild:{type:Boolean},as:{}},setup(e){const n=Kt(e);return(o,r)=>(C(),B(f(GO),te({"data-slot":"dropdown-menu-trigger"},f(n)),{default:E(()=>[V(o.$slots,"default")]),_:3},16))}}),D_=bf("user",()=>{const e=N({avatar:"",nickname:"",username:""});return{userInfo:e,fetchUserInfo:async()=>{const n=await BM();e.value=n}}}),NM=F({__name:"UserAvatar",setup(e){const t=D_(),{userInfo:n}=va(t),o=Ta(),r=N([{to:"/apps",label:"我的App"},{to:"/favorites",label:"我的收藏"},{to:"/settings",label:"设置"}]),s=async()=>{try{await RM(),localStorage.removeItem("accessToken"),localStorage.removeItem("refreshToken"),console.log("Logout successful"),o.replace("/auth")}catch(i){console.error("Logout failed",i)}};return(i,a)=>{const l=pf("RouterLink");return C(),B(f(P_),{modal:!1},{default:E(()=>[q(f(I_),{"as-child":""},{default:E(()=>[q(f(MM),{class:"cursor-pointer"},{default:E(()=>[q(f($M),{src:f(n).avatar},null,8,["src"]),q(f(qM),null,{default:E(()=>{var u;return[rt(Ne(((u=f(n).nickname[0])==null?void 0:u.toUpperCase())||"U"),1)]}),_:1})]),_:1})]),_:1}),q(f(k_),{class:"w-48",align:"end","side-offset":8},{default:E(()=>[q(f(LM),null,{default:E(()=>a[0]||(a[0]=[rt("我的账户",-1)])),_:1,__:[0]}),q(f($m)),q(f(FM),null,{default:E(()=>[(C(!0),ie(Ie,null,wt(r.value,u=>(C(),B(f(Br),{key:u.to,"as-child":""},{default:E(()=>[q(l,{to:u.to,class:"cursor-pointer"},{default:E(()=>[rt(Ne(u.label),1)]),_:2},1032,["to"])]),_:2},1024))),128))]),_:1}),q(f($m)),q(f(Br),{class:"cursor-pointer",onClick:s},{default:E(()=>a[1]||(a[1]=[rt(" 退出登录 ",-1)])),_:1,__:[1]})]),_:1})]),_:1})}}}),jM=[{label:"ios",value:"ios",icon:"mdi:apple"},{label:"android",value:"android",icon:"mdi:android"},{label:"web",value:"web",icon:"mdi:web"}],Ks=[{label:"Apps",value:"appCategories",icon:"duo-icons:app",categoryType:0},{label:"Screens",value:"screenPatterns",icon:"simple-line-icons:screen-smartphone",categoryType:1},{label:"UI Elements",value:"screenElements",icon:"humbleicons:switch-on",categoryType:2},{label:"Flows",value:"flowActions",icon:"fluent:flow-32-regular",categoryType:3}],ql=[...Ks.slice(0,2),...Ks.slice(2)],VM={class:"grid grid-cols-3 gap-4 items-center fixed top-0 left-0 right-0 h-18 shrink-0 z-1 bg-background px-4 lg:px-20"},UM={class:"col-span-1 flex items-center h-full"},HM={class:"col-span-1 h-full flex items-center py-3"},zM={class:"col-span-1 h-full flex justify-end items-center"},KM=F({__name:"Header",props:{modelValue:{required:!0},modelModifiers:{}},emits:Un(["searchClick","platformClick"],["update:modelValue"]),setup(e,{emit:t}){const n=ts(e,"modelValue"),o=t,r=l=>({ios:"iOS",android:"Android",web:"Web"})[l]||l,s=U(()=>`在 ${r(n.value)} 上搜索...`),i=l=>{o("platformClick",l)},a=()=>{o("searchClick")};return(l,u)=>{const c=Ho;return C(),ie("div",VM,[ce("div",UM,[q(f(rp),{modelValue:n.value,"onUpdate:modelValue":u[0]||(u[0]=d=>n.value=d)},{default:E(()=>[q(f(sp),{class:"bg-transparent p-0"},{default:E(()=>[(C(!0),ie(Ie,null,wt(f(jM),d=>(C(),B(f(ip),{key:d.label,value:d.label,onClick:p=>i(d.value)},{default:E(()=>[q(c,{icon:d.icon,class:"h-4 w-4 mr-2"},null,8,["icon"]),rt(" "+Ne(r(d.value)),1)]),_:2},1032,["value","onClick"]))),128))]),_:1})]),_:1},8,["modelValue"])]),ce("div",HM,[q(f(vn),{variant:"outline",class:"w-full justify-start text-muted-foreground rounded-full cursor-pointer",onClick:a},{default:E(()=>[q(c,{icon:"lucide:search",class:"h-4 w-4 mr-2"}),rt(" "+Ne(s.value),1)]),_:1})]),ce("div",zM,[q(f(NM))])])}}}),WM=F({__name:"Sonner",props:{invert:{type:Boolean},theme:{},position:{},hotkey:{},richColors:{type:Boolean},expand:{type:Boolean},duration:{},gap:{},visibleToasts:{},closeButton:{type:Boolean},toastOptions:{},class:{},style:{},offset:{},mobileOffset:{},dir:{},swipeDirections:{},icons:{},containerAriaLabel:{}},setup(e){const t=e;return(n,o)=>(C(),B(f(wB),te({class:"toaster group"},t,{style:{"--normal-bg":"var(--popover)","--normal-text":"var(--popover-foreground)","--normal-border":"var(--border)"}}),null,16))}}),GM=()=>wr("/admin/app-category/list-all"),Gd=e=>{if(e===null||typeof e!="object")return e;if(e instanceof Date)return new Date(e.getTime());if(Array.isArray(e))return e.map(n=>Gd(n));const t={};for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=Gd(e[n]));return t},cl=(e,t,n)=>{const o=new Map,r=e.map(a=>{const l=Gd(a),u={...l,id:l[t.id],label:l[t.label],value:l[t.value],level:1,parentId:l[t.parentId]??null,expanded:!1};return o.set(u.id,u),u}),s=[];r.forEach(a=>{if(a.parentId!==null){const l=a.parentId!==void 0?o.get(a.parentId):void 0;l?(a.level=l.level+1,l.children||(l.children=[]),l.children.push(a)):s.push(a)}else s.push(a)});const i=a=>(n!=null&&n.order&&(a.sort((l,u)=>{const c=l[n.order],d=u[n.order];return typeof c=="number"&&typeof d=="number"?c-d:String(c).localeCompare(String(d))}),a.forEach(l=>{var u;(u=l.children)!=null&&u.length&&(l.children=i(l.children))})),a);return i(s)},Fm=(e,t)=>{const n=new Set(e),o=new Set(t);let r=0;for(const s of n)o.has(s)&&r++;return r},QM=(e,t={})=>{const{keepChildren:n=!1,keepLevel:o=!1,keepExpanded:r=!1}=t,s=[],i=(a,l=null)=>{(Array.isArray(a)?a:[a]).forEach(c=>{var p;const d={};Object.entries(c).forEach(([h,m])=>{["children","level","expanded","parentId","label"].includes(h)||(d[h]=m)}),n&&c.children&&(d.children=c.children),o&&(d.level=c.level),r&&c.expanded!==void 0&&(d.expanded=c.expanded),l!==null&&(d.parentId=l),s.push(d),(p=c.children)!=null&&p.length&&i(c.children,c.id)})};return i(e),s},$u=bf("definition",()=>{const e=N([]);return{definitions:e,fetchDefinitions:async()=>{const n=await GM();e.value=cl(n,{id:"id",label:"displayName",value:"id",parentId:"parentId"},{order:"orderNum"})}}}),YM=F({__name:"App",setup(e){const t=Ta(),n=T_(),{fetchDefinitions:o}=$u(),{fetchApps:r}=m_(),s=["auth","settings","chat"],i=N("ios");Nn(ep,U(()=>i.value));const a=()=>{c.value=!0},l=h=>{t.replace("/"),i.value=h,localStorage.setItem("platform",h)},u=()=>{const h=localStorage.getItem("platform");h?i.value=h:(i.value="ios",localStorage.setItem("platform","ios"))},c=N(!1),d=U(()=>!s.includes(n.name)),p=U(()=>n.name!=="chat");return je(()=>{u(),o(),r(i.value)}),(h,m)=>{const g=pf("RouterView"),v=IM;return C(),ie(Ie,null,[ce("div",{class:qe(["w-full max-w-[2000px] mx-auto relative h-full min-h-full",{"px-4 lg:px-20":f(p),"pt-18":f(d)}])},[f(d)?(C(),B(KM,{key:0,modelValue:f(i),"onUpdate:modelValue":m[0]||(m[0]=y=>$e(i)?i.value=y:null),onSearchClick:a,onPlatformClick:l},null,8,["modelValue"])):Be("",!0),q(g)],2),q(v,{modelValue:f(c),"onUpdate:modelValue":m[1]||(m[1]=y=>$e(c)?c.value=y:null)},null,8,["modelValue"]),q(f(WM),{position:"top-right",richColors:"",closeButton:""})],64)}}}),XM="modulepreload",JM=function(e){return"/"+e},Lm={},mi=function(t,n,o){let r=Promise.resolve();if(n&&n.length>0){let i=function(u){return Promise.all(u.map(c=>Promise.resolve(c).then(d=>({status:"fulfilled",value:d}),d=>({status:"rejected",reason:d}))))};document.getElementsByTagName("link");const a=document.querySelector("meta[property=csp-nonce]"),l=(a==null?void 0:a.nonce)||(a==null?void 0:a.getAttribute("nonce"));r=i(n.map(u=>{if(u=JM(u),u in Lm)return;Lm[u]=!0;const c=u.endsWith(".css"),d=c?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${u}"]${d}`))return;const p=document.createElement("link");if(p.rel=c?"stylesheet":XM,c||(p.as="script"),p.crossOrigin="",p.href=u,l&&p.setAttribute("nonce",l),document.head.appendChild(p),c)return new Promise((h,m)=>{p.addEventListener("load",h),p.addEventListener("error",()=>m(new Error(`Unable to preload CSS for ${u}`)))})}))}function s(i){const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=i,window.dispatchEvent(a),!a.defaultPrevented)throw i}return r.then(i=>{for(const a of i||[])a.status==="rejected"&&s(a.reason);return t().catch(s)})},ZM=F({__name:"AlertDialog",props:{open:{type:Boolean},defaultOpen:{type:Boolean}},emits:["update:open"],setup(e,{emit:t}){const r=ft(e,t);return(s,i)=>(C(),B(f(P1),te({"data-slot":"alert-dialog"},f(r)),{default:E(()=>[V(s.$slots,"default")]),_:3},16))}}),eq=F({__name:"AlertDialogAction",props:{asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,n=et(t,"class");return(o,r)=>(C(),B(f(m1),te(f(n),{class:f(Fe)(f(op)(),t.class)}),{default:E(()=>[V(o.$slots,"default")]),_:3},16,["class"]))}}),tq=F({__name:"AlertDialogCancel",props:{asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,n=et(t,"class");return(o,r)=>(C(),B(f(w1),te(f(n),{class:f(Fe)(f(op)({variant:"outline"}),"mt-2 sm:mt-0",t.class)}),{default:E(()=>[V(o.$slots,"default")]),_:3},16,["class"]))}}),nq=F({__name:"AlertDialogContent",props:{forceMount:{type:Boolean},disableOutsidePointerEvents:{type:Boolean},asChild:{type:Boolean},as:{},class:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(e,{emit:t}){const n=e,o=t,r=et(n,"class"),s=ft(r,o);return(i,a)=>(C(),B(f(O1),null,{default:E(()=>[q(f(E1),{"data-slot":"alert-dialog-overlay",class:"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/80"}),q(f(b1),te({"data-slot":"alert-dialog-content"},f(s),{class:f(Fe)("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",n.class)}),{default:E(()=>[V(i.$slots,"default")]),_:3},16,["class"])]),_:3}))}}),oq=F({__name:"AlertDialogDescription",props:{asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,n=et(t,"class");return(o,r)=>(C(),B(f(C1),te({"data-slot":"alert-dialog-description"},f(n),{class:f(Fe)("text-muted-foreground text-sm",t.class)}),{default:E(()=>[V(o.$slots,"default")]),_:3},16,["class"]))}}),rq=F({__name:"AlertDialogFooter",props:{class:{}},setup(e){const t=e;return(n,o)=>(C(),ie("div",{"data-slot":"alert-dialog-footer",class:qe(f(Fe)("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",t.class))},[V(n.$slots,"default")],2))}}),sq=F({__name:"AlertDialogHeader",props:{class:{}},setup(e){const t=e;return(n,o)=>(C(),ie("div",{"data-slot":"alert-dialog-header",class:qe(f(Fe)("flex flex-col gap-2 text-center sm:text-left",t.class))},[V(n.$slots,"default")],2))}}),iq=F({__name:"AlertDialogTitle",props:{asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,n=et(t,"class");return(o,r)=>(C(),B(f(I1),te({"data-slot":"alert-dialog-title"},f(n),{class:f(Fe)("text-lg font-semibold",t.class)}),{default:E(()=>[V(o.$slots,"default")]),_:3},16,["class"]))}}),aq=F({__name:"AlertDialogTrigger",props:{asChild:{type:Boolean},as:{}},setup(e){const t=e;return(n,o)=>(C(),B(f(R1),te({"data-slot":"alert-dialog-trigger"},t),{default:E(()=>[V(n.$slots,"default")]),_:3},16))}}),ap=F({__name:"AlertConfirm",props:Un({title:{},description:{default:""},cancelText:{default:"cancel"},actionText:{default:"confirm"}},{modelValue:{type:Boolean,required:!1},modelModifiers:{}}),emits:Un(["confirm"],["update:modelValue"]),setup(e,{expose:t,emit:n}){const o=n,r=ts(e,"modelValue"),s=()=>{o("confirm"),r.value=!1},i=()=>{r.value=!1};return t({open:()=>r.value=!0,close:()=>r.value=!1}),(a,l)=>(C(),B(f(ZM),{open:r.value,"onUpdate:open":l[0]||(l[0]=u=>r.value=u)},{default:E(()=>[q(f(aq),{"as-child":""},{default:E(()=>[V(a.$slots,"default")]),_:3}),q(f(nq),null,{default:E(()=>[q(f(sq),null,{default:E(()=>[q(f(iq),null,{default:E(()=>[rt(Ne(a.title),1)]),_:1}),q(f(oq),null,{default:E(()=>[rt(Ne(a.description),1)]),_:1})]),_:1}),q(f(rq),null,{default:E(()=>[q(f(tq),{onClick:i},{default:E(()=>[rt(Ne(a.cancelText),1)]),_:1}),q(f(eq),{onClick:s},{default:E(()=>[rt(Ne(a.actionText),1)]),_:1})]),_:1})]),_:1})]),_:3},8,["open"]))}}),R_=F({__name:"ScrollBar",props:{orientation:{default:"vertical"},forceMount:{type:Boolean},asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,n=et(t,"class");return(o,r)=>(C(),B(f(mT),te({"data-slot":"scroll-area-scrollbar"},f(n),{class:f(Fe)("flex touch-none p-px transition-colors select-none",o.orientation==="vertical"&&"h-full w-2.5 border-l border-l-transparent",o.orientation==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent",t.class)}),{default:E(()=>[q(f(_T),{"data-slot":"scroll-area-thumb",class:"bg-border relative flex-1 rounded-full"})]),_:1},16,["class"]))}}),lp=F({__name:"ScrollArea",props:{type:{},dir:{},scrollHideDelay:{},asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,n=et(t,"class");return(o,r)=>(C(),B(f(XO),te({"data-slot":"scroll-area"},f(n),{class:f(Fe)("relative",t.class)}),{default:E(()=>[q(f(ST),{"data-slot":"scroll-area-viewport",class:"focus-visible:ring-ring/50 size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:outline-1"},{default:E(()=>[V(o.$slots,"default")]),_:3}),q(R_),q(f(tT))]),_:3},16,["class"]))}}),lq=e=>Sr("/admin/favorite/create-app-favorite",{...e,favoriteType:1}),eN=e=>wr("/admin/app/page",{...e,type:2}),uq=e=>Sr("/admin/favorite-section/create",e),tN=e=>wr("/admin/app-section/get-favorite",e),xc=F({__name:"Tooltip",props:{defaultOpen:{type:Boolean},open:{type:Boolean},delayDuration:{},disableHoverableContent:{type:Boolean},disableClosingTrigger:{type:Boolean},disabled:{type:Boolean},ignoreNonKeyboardFocus:{type:Boolean}},emits:["update:open"],setup(e,{emit:t}){const r=ft(e,t);return(s,i)=>(C(),B(f(IP),te({"data-slot":"tooltip"},f(r)),{default:E(()=>[V(s.$slots,"default")]),_:3},16))}}),Ec=F({inheritAttrs:!1,__name:"TooltipContent",props:{forceMount:{type:Boolean},ariaLabel:{},asChild:{type:Boolean},as:{},side:{},sideOffset:{default:4},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},positionStrategy:{},updatePositionStrategy:{},class:{}},emits:["escapeKeyDown","pointerDownOutside"],setup(e,{emit:t}){const n=e,o=t,r=et(n,"class"),s=ft(r,o);return(i,a)=>(C(),B(f(FP),null,{default:E(()=>[q(f(qP),te({"data-slot":"tooltip-content"},{...f(s),...i.$attrs},{class:f(Fe)("bg-primary text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit rounded-md px-3 py-1.5 text-xs text-balance",n.class)}),{default:E(()=>[V(i.$slots,"default"),q(f(EP),{class:"bg-primary fill-primary z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]"})]),_:3},16,["class"])]),_:3}))}}),Ac=F({__name:"TooltipProvider",props:{delayDuration:{default:0},skipDelayDuration:{},disableHoverableContent:{type:Boolean},disableClosingTrigger:{type:Boolean},disabled:{type:Boolean},ignoreNonKeyboardFocus:{type:Boolean}},setup(e){const t=e;return(n,o)=>(C(),B(f(TP),ct(yt(t)),{default:E(()=>[V(n.$slots,"default")]),_:3},16))}}),Oc=F({__name:"TooltipTrigger",props:{reference:{},asChild:{type:Boolean},as:{}},setup(e){const t=e;return(n,o)=>(C(),B(f(NP),te({"data-slot":"tooltip-trigger"},t),{default:E(()=>[V(n.$slots,"default")]),_:3},16))}}),Tc=N(null);function cq(){return{copiedScreen:Tc,copyScreen:n=>{Tc.value=JSON.parse(JSON.stringify(n))},clearClipboard:()=>{Tc.value=null}}}var dq=Object.defineProperty,$l=Object.getOwnPropertySymbols,B_=Object.prototype.hasOwnProperty,M_=Object.prototype.propertyIsEnumerable,Nm=(e,t,n)=>t in e?dq(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,vs=(e,t)=>{for(var n in t||(t={}))B_.call(t,n)&&Nm(e,n,t[n]);if($l)for(var n of $l(t))M_.call(t,n)&&Nm(e,n,t[n]);return e},q_=(e,t)=>{var n={};for(var o in e)B_.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&$l)for(var o of $l(e))t.indexOf(o)<0&&M_.call(e,o)&&(n[o]=e[o]);return n};const $_="[vue-draggable-plus]: ";function fq(e){console.warn($_+e)}function pq(e){console.error($_+e)}function jm(e,t,n){return n>=0&&n<e.length&&e.splice(n,0,e.splice(t,1)[0]),e}function hq(e){return e.replace(/-(\w)/g,(t,n)=>n?n.toUpperCase():"")}function mq(e){return Object.keys(e).reduce((t,n)=>(typeof e[n]<"u"&&(t[hq(n)]=e[n]),t),{})}function Vm(e,t){return Array.isArray(e)&&e.splice(t,1),e}function Um(e,t,n){return Array.isArray(e)&&e.splice(t,0,n),e}function gq(e){return typeof e>"u"}function vq(e){return typeof e=="string"}function Hm(e,t,n){const o=e.children[n];e.insertBefore(t,o)}function Pc(e){e.parentNode&&e.parentNode.removeChild(e)}function yq(e,t=document){var n;let o=null;return typeof(t==null?void 0:t.querySelector)=="function"?o=(n=t==null?void 0:t.querySelector)==null?void 0:n.call(t,e):o=document.querySelector(e),o||fq(`Element not found: ${e}`),o}function bq(e,t,n=null){return function(...o){return e.apply(n,o),t.apply(n,o)}}function _q(e,t){const n=vs({},e);return Object.keys(t).forEach(o=>{n[o]?n[o]=bq(e[o],t[o]):n[o]=t[o]}),n}function wq(e){return e instanceof HTMLElement}function zm(e,t){Object.keys(e).forEach(n=>{t(n,e[n])})}function Sq(e){return e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97)}const Cq=Object.assign;/**!
DesignScreenshot/output/100.64.0.2_run/100.64.0.2_8083_4_after_login.html:110:              transform 0.3s ease-out`}},[q(m,{variant:"outline",class:"rounded-full",border:!1,onClick:d[0]||(d[0]=Ze(v=>c.$emit("save",c.id),["stop"]))},{default:E(()=>d[2]||(d[2]=[rt(" save ",-1)])),_:1,__:[2]}),q(m,{class:"rounded-full",border:!1,onClick:d[1]||(d[1]=Ze(v=>c.$emit("copy",c.id),["stop"]))},{default:E(()=>d[3]||(d[3]=[rt(" copy ",-1)])),_:1,__:[3]})],2)],2)]),c.name||c.logo?(C(),B(g,{key:0,name:c.name,logo:c.logo,class:"flex-shrink-0 relative z-30 mt-1"},null,8,["name","logo"])):Be("",!0)],2)}}}),og=F({__name:"Checkbox",props:{defaultValue:{type:[Boolean,String]},modelValue:{type:[Boolean,String,null]},disabled:{type:Boolean},value:{},id:{},asChild:{type:Boolean},as:{},name:{},required:{type:Boolean},class:{}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,o=t,r=et(n,"class"),s=ft(r,o);return(i,a)=>(C(),B(f(iE),te({"data-slot":"checkbox"},f(s),{class:f(Fe)("peer border-input data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",n.class)}),{default:E(()=>[q(f(lE),{"data-slot":"checkbox-indicator",class:"flex items-center justify-center text-current transition-none"},{default:E(()=>[V(i.$slots,"default",{},()=>[q(f(xb),{class:"size-3.5"})])]),_:3})]),_:3},16,["class"]))}}),P$=F({__name:"Popover",props:{defaultOpen:{type:Boolean},open:{type:Boolean},modal:{type:Boolean}},emits:["update:open"],setup(e,{emit:t}){const r=ft(e,t);return(s,i)=>(C(),B(f(_O),te({"data-slot":"popover"},f(r)),{default:E(()=>[V(s.$slots,"default")]),_:3},16))}}),k$=F({inheritAttrs:!1,__name:"PopoverContent",props:{forceMount:{type:Boolean},side:{},sideOffset:{default:4},sideFlip:{type:Boolean},align:{default:"center"},alignOffset:{},alignFlip:{type:Boolean},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},positionStrategy:{},updatePositionStrategy:{},disableUpdateOnLayoutShift:{type:Boolean},prioritizePosition:{type:Boolean},reference:{},asChild:{type:Boolean},as:{},disableOutsidePointerEvents:{type:Boolean},class:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(e,{emit:t}){const n=e,o=t,r=et(n,"class"),s=ft(r,o);return(i,a)=>(C(),B(f(PO),null,{default:E(()=>[q(f(OO),te({"data-slot":"popover-content"},{...f(s),...i.$attrs},{class:f(Fe)("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 rounded-md border p-4 shadow-md origin-(--reka-popover-content-transform-origin) outline-hidden",n.class)}),{default:E(()=>[V(i.$slots,"default")]),_:3},16,["class"])]),_:3}))}}),I$=F({__name:"PopoverTrigger",props:{asChild:{type:Boolean},as:{}},setup(e){const t=e;return(n,o)=>(C(),B(f(IO),te({"data-slot":"popover-trigger"},t),{default:E(()=>[V(n.$slots,"default")]),_:3},16))}}),D$={class:"truncate text-left"},R$={key:0,class:"ml-1.5 font-normal text-xs px-1.5 py-0.5 bg-background/20 rounded-full"},B$={key:0,class:"text-xs mt-1 text-muted-foreground"},M$=["for"],q$=["for"],$$=F({__name:"Dropdown",props:{defaultLabel:{},data:{},selectionMode:{default:"single"},placement:{default:"center"},searchable:{type:Boolean,default:!0}},emits:["change"],setup(e,{expose:t,emit:n}){const o=n,r=N(!1),s=N(""),i=N([]),a=U(()=>!e.data||e.data.length===0||e.data.every(h=>!h.children||h.children.length===0)),l=U(()=>{var h;return((h=e.data)==null?void 0:h.flatMap(m=>m.children??[]))??[]}),u=U(()=>l.value.filter(h=>i.value.includes(h.id))),c=U(()=>{if(!e.data)return[];const h=s.value.toLowerCase();return e.data.map(m=>{var v;const g=(v=m.children)==null?void 0:v.filter(y=>{const b=i.value.includes(y.id),_=y.label.toLowerCase().includes(h);return h?_:!b});return g&&g.length>0?{...m,children:g}:null}).filter(m=>m!==null)}),d=h=>{if(e.selectionMode==="single")i.value=i.value[0]===h?[]:[h],r.value=!1;else{const m=[...i.value],g=m.indexOf(h);g>-1?m.splice(g,1):m.push(h),i.value=m}},p=()=>{i.value=[],s.value=""};return Ce(u,h=>{o("change",h)},{deep:!0}),t({clear:p}),(h,m)=>(C(),B(f(P$),{open:f(r),"onUpdate:open":m[1]||(m[1]=g=>$e(r)?r.value=g:null)},{default:E(()=>[q(f(I$),{"as-child":""},{default:E(()=>[q(f(vn),{variant:f(u).length>0?"default":"outline",role:"combobox","aria-expanded":f(r),class:"h-11 justify-between px-4 font-semibold rounded-full transition-colors duration-200"},{default:E(()=>{var g;return[ce("span",D$,[f(u).length===0?(C(),ie(Ie,{key:0},[rt(Ne(h.defaultLabel),1)],64)):(C(),ie(Ie,{key:1},[rt(Ne((g=f(u)[0])==null?void 0:g.label)+" ",1),h.selectionMode==="multiple"&&f(u).length>1?(C(),ie("span",R$," +"+Ne(f(u).length-1),1)):Be("",!0)],64))]),f(u).length>0?(C(),B(f(Pk),{key:0,class:"ml-2 h-4 w-4 shrink-0 opacity-50",onClick:Ze(p,["stop","prevent"])})):(C(),B(f(Kf),{key:1,class:qe(["ml-2 h-4 w-4 shrink-0 opacity-50 transition-transform",{"rotate-180":f(r)}])},null,8,["class"]))]}),_:1},8,["variant","aria-expanded"])]),_:1}),q(f(k$),{class:"w-80 p-0",align:h.placement},{default:E(()=>[q(f(Cb),{class:"max-h-[480px] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md"},{default:E(()=>[h.searchable?(C(),B(f(Ab),{key:0,modelValue:f(s),"onUpdate:modelValue":m[0]||(m[0]=g=>$e(s)?s.value=g:null),placeholder:"搜索...",class:"h-10 w-full rounded-none border-0 border-b focus-visible:ring-0 focus-visible:ring-offset-0"},null,8,["modelValue"])):Be("",!0),q(f(Ob),{class:"flex-1 overflow-y-auto overscroll-contain custom-scrollbar"},{default:E(()=>[q(f(Eb),{class:"py-6 text-center text-sm"},{default:E(()=>[ce("p",null,Ne(f(a)?"暂无数据":"未找到结果"),1),f(a)?Be("",!0):(C(),ie("p",B$,"请尝试其他关键词"))]),_:1}),f(u).length>0&&f(s)===""?(C(),B(f(Rd),{key:0,heading:"已选"},{default:E(()=>[(C(!0),ie(Ie,null,wt(f(u),g=>(C(),B(f(Dd),{key:`selected-${g.id}`,value:g.label,onSelect:Ze(v=>d(g.id),["prevent"]),class:"cursor-pointer"},{default:E(()=>[q(f(og),{id:`selected-${g.id}`,"model-value":!0,class:"mr-2"},null,8,["id"]),ce("label",{for:`selected-${g.id}`,class:"cursor-pointer"},Ne(g.label),9,M$)]),_:2},1032,["value","onSelect"]))),128))]),_:1})):Be("",!0),(C(!0),ie(Ie,null,wt(f(c),g=>(C(),B(f(Rd),{key:g.label,heading:g.label},{default:E(()=>[(C(!0),ie(Ie,null,wt(g.children,v=>(C(),B(f(Dd),{key:v.id,value:v.label,onSelect:Ze(y=>d(v.id),["prevent"]),class:"cursor-pointer"},{default:E(()=>[q(f(og),{id:v.id,"model-value":f(i).includes(v.id),class:"mr-2"},null,8,["id","model-value"]),ce("label",{for:v.id,class:"cursor-pointer"},Ne(v.label),9,q$)]),_:2},1032,["value","onSelect"]))),128))]),_:2},1032,["heading"]))),128))]),_:1})]),_:1})]),_:1},8,["align"])]),_:1},8,["open"]))}}),gl=Lu($$,[["__scopeId","data-v-cce68d8f"]]),F$={class:"flex flex-col gap-6"},L$={class:"flex gap-8"},N$={class:"w-24 h-24"},j$={class:"flex-1 flex items-center"},V$={class:"text-5xl font-semibold text-primary"},U$={class:"flex gap-8"},H$={class:"flex flex-col gap-1"},z$={class:"text-sm font-semibold text-primary text-center"},K$={class:"flex flex-col gap-1"},W$={class:"text-sm font-semibold text-primary text-center"},G$=F({__name:"StoreAppCard",props:{logoUrl:{},name:{},description:{},platform:{},rating:{},categories:{}},emits:["click"],setup(e,{emit:t}){return(n,o)=>{var s;const r=ri;return C(),ie("div",F$,[ce("div",L$,[ce("div",N$,[q(r,{src:n.logoUrl,class:"rounded-3xl"},null,8,["src"])]),ce("div",j$,[ce("span",V$,Ne(n.name)+"—"+Ne(n.description),1)])]),ce("div",U$,[ce("div",H$,[o[0]||(o[0]=ce("span",{class:"text-sm text-textSecondary"},"Platform",-1)),ce("span",z$,Ne(n.platform),1)]),ce("div",K$,[o[1]||(o[1]=ce("span",{class:"text-sm text-textSecondary"},"Category",-1)),ce("span",W$,Ne((s=n.categories)==null?void 0:s.join(", ")),1)])])])}}}),Q$=e=>Sr("/admin/app-info/create",e),Y$=e=>wr("/admin/screen/page",e),X$=F({__name:"Select",props:{open:{type:Boolean},defaultOpen:{type:Boolean},defaultValue:{},modelValue:{},by:{type:[String,Function]},dir:{},multiple:{type:Boolean},autocomplete:{},disabled:{type:Boolean},name:{},required:{type:Boolean}},emits:["update:modelValue","update:open"],setup(e,{emit:t}){const r=ft(e,t);return(s,i)=>(C(),B(f(kT),te({"data-slot":"select"},f(r)),{default:E(()=>[V(s.$slots,"default")]),_:3},16))}}),J$=F({inheritAttrs:!1,__name:"SelectContent",props:{forceMount:{type:Boolean},position:{default:"popper"},bodyLock:{type:Boolean},side:{},sideOffset:{},sideFlip:{type:Boolean},align:{},alignOffset:{},alignFlip:{type:Boolean},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},positionStrategy:{},updatePositionStrategy:{},disableUpdateOnLayoutShift:{type:Boolean},prioritizePosition:{type:Boolean},reference:{},asChild:{type:Boolean},as:{},class:{}},emits:["closeAutoFocus","escapeKeyDown","pointerDownOutside"],setup(e,{emit:t}){const n=e,o=t,r=et(n,"class"),s=ft(r,o);return(i,a)=>(C(),B(f(oP),null,{default:E(()=>[q(f(UT),te({"data-slot":"select-content"},{...f(s),...i.$attrs},{class:f(Fe)("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--reka-select-content-available-height) min-w-[8rem] overflow-x-hidden overflow-y-auto rounded-md border shadow-md",i.position==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",n.class)}),{default:E(()=>[q(f(oF)),q(f(hP),{class:qe(f(Fe)("p-1",i.position==="popper"&&"h-[var(--reka-select-trigger-height)] w-full min-w-[var(--reka-select-trigger-width)] scroll-my-1"))},{default:E(()=>[V(i.$slots,"default")]),_:3},8,["class"]),q(f(nF))]),_:3},16,["class"])]),_:3}))}}),Z$=F({__name:"SelectGroup",props:{asChild:{type:Boolean},as:{}},setup(e){const t=e;return(n,o)=>(C(),B(f(KT),te({"data-slot":"select-group"},t),{default:E(()=>[V(n.$slots,"default")]),_:3},16))}}),eF={class:"absolute right-2 flex size-3.5 items-center justify-center"},tF=F({__name:"SelectItem",props:{value:{},disabled:{type:Boolean},textValue:{},asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,n=et(t,"class"),o=Kt(n);return(r,s)=>(C(),B(f(XT),te({"data-slot":"select-item"},f(o),{class:f(Fe)("focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",t.class)}),{default:E(()=>[ce("span",eF,[q(f(ZT),null,{default:E(()=>[q(f(xb),{class:"size-4"})]),_:1})]),q(f(tP),null,{default:E(()=>[V(r.$slots,"default")]),_:3})]),_:3},16,["class"]))}}),nF=F({__name:"SelectScrollDownButton",props:{asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,n=et(t,"class"),o=Kt(n);return(r,s)=>(C(),B(f(iP),te({"data-slot":"select-scroll-down-button"},f(o),{class:f(Fe)("flex cursor-default items-center justify-center py-1",t.class)}),{default:E(()=>[V(r.$slots,"default",{},()=>[q(f(Kf),{class:"size-4"})])]),_:3},16,["class"]))}}),oF=F({__name:"SelectScrollUpButton",props:{asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,n=et(t,"class"),o=Kt(n);return(r,s)=>(C(),B(f(lP),te({"data-slot":"select-scroll-up-button"},f(o),{class:f(Fe)("flex cursor-default items-center justify-center py-1",t.class)}),{default:E(()=>[V(r.$slots,"default",{},()=>[q(f(Tk),{class:"size-4"})])]),_:3},16,["class"]))}}),rF=F({__name:"SelectTrigger",props:{disabled:{type:Boolean},reference:{},asChild:{type:Boolean},as:{},class:{},size:{default:"default"}},setup(e){const t=e,n=et(t,"class","size"),o=Kt(n);return(r,s)=>(C(),B(f(cP),te({"data-slot":"select-trigger","data-size":r.size},f(o),{class:f(Fe)("border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t.class)}),{default:E(()=>[V(r.$slots,"default"),q(f(GT),{"as-child":""},{default:E(()=>[q(f(Kf),{class:"size-4 opacity-50"})]),_:1})]),_:3},16,["data-size","class"]))}}),sF=F({__name:"SelectValue",props:{placeholder:{},asChild:{type:Boolean},as:{}},setup(e){const t=e;return(n,o)=>(C(),B(f(fP),te({"data-slot":"select-value"},t),{default:E(()=>[V(n.$slots,"default")]),_:3},16))}}),rg=e=>Array.isArray(e)&&e.length>0,iF={class:"flex flex-col gap-3 pb-10"},aF={class:"sticky-dropdown-filters flex py-2 gap-2"},lF={key:1,class:"text-center p-10"},uF=F({__name:"Details",setup(e){const t=T_(),{definitions:n}=va($u()),o=ya(),r=N(t.query.platform),s=U(()=>((r==null?void 0:r.value)==="web"?ql:Ks).slice(1)),i=N(s.value[0].label),a=T=>{var P;const A=(P=s.value.find(w=>w.label===T))==null?void 0:P.value,D=n.value.find(w=>w.slug===A&&w.platformType===r.value);return D==null?void 0:D.children},l=U(()=>Number(t.query.id)),{data:u,isLoading:c}=hC({queryKey:["appDetails",l],queryFn:async()=>{const T=await xB(l.value)||[];return rg(T)&&(T.sort((A,D)=>new Date(D.createTime).getTime()-new Date(A.createTime).getTime()),T.forEach(A=>{A.appSections=A.appSections||[]})),T},enabled:U(()=>!!l.value)}),d=N(""),p=U(()=>u.value?u.value.map(T=>({id:T.externalVersionId,label:T.createTime,value:T.externalVersionId})):[]);Ce(()=>u.value,T=>{T&&rg(T)&&(d.value=T[0].externalVersionId)},{immediate:!0});const h=U(()=>{var T;return!u.value||!d.value?(T=u.value)==null?void 0:T[0]:u.value.find(A=>A.externalVersionId===d.value)}),m=N();Ce(h,T=>{T?m.value=JSON.parse(JSON.stringify(T)):m.value=void 0},{deep:!0,immediate:!0});const g=N([]),v=T=>{g.value=(T==null?void 0:T.map(A=>A.displayName))||[]},y=U(()=>{if(m.value&&m.value.appSections)return m.value.appSections.map(A=>A.screens).flat().filter(Boolean)}),b=U(()=>{if(y.value&&y.value.length>0){let T=y.value;return g.value.length>0&&(i.value==="Screens"&&(T=T.filter(A=>A.screenPatterns&&Fm(A.screenPatterns,g.value))),i.value==="UI Elements"&&(T=T.filter(A=>A.screenElements&&Fm(A.screenElements,g.value)))),T}}),_=Ii({mutationFn:Q$,onSuccess:()=>{o.invalidateQueries({queryKey:["appDetails",l.value]})}}),O=()=>{if(!m.value||!m.value.id){console.warn("App info not available to create a new AppInfo.");return}_.mutate({appId:m.value.id})};return(T,A)=>{const D=G$,P=gl,w=Ho,k=tw,$=T$;return C(),ie("div",iF,[f(m)?(C(),B(D,{key:0,name:f(m).appName,"logo-url":f(m).appLogoUrl,platform:f(m).platform,description:f(m).appTagline,categories:f(m).allAppCategories},null,8,["name","logo-url","platform","description","categories"])):Be("",!0),q(f(rp),{modelValue:f(i),"onUpdate:modelValue":A[0]||(A[0]=R=>$e(i)?i.value=R:null),class:"!-ml-2"},{default:E(()=>[q(f(sp),{class:"bg-transparent p-0"},{default:E(()=>[(C(!0),ie(Ie,null,wt(f(s),R=>(C(),B(f(ip),{key:R.label,value:R.label,class:"!font-bold"},{default:E(()=>[rt(Ne(R.label),1)]),_:2},1032,["value"]))),128))]),_:1})]),_:1},8,["modelValue"]),ce("div",aF,[q(f(X$),{modelValue:f(d),"onUpdate:modelValue":A[1]||(A[1]=R=>$e(d)?d.value=R:null)},{default:E(()=>[q(f(rF),{class:"w-60 !h-11 rounded-full"},{default:E(()=>[q(f(sF),{placeholder:"Version",class:"font-bold truncate text-base"})]),_:1}),q(f(J$),null,{default:E(()=>[q(f(Z$),null,{default:E(()=>[(C(!0),ie(Ie,null,wt(f(p),R=>(C(),B(f(tF),{key:R.id,value:R.value},{default:E(()=>[rt(Ne(R.label),1)]),_:2},1032,["value"]))),128))]),_:1})]),_:1})]),_:1},8,["modelValue"]),(C(),B(P,{key:f(i),"default-label":f(i),data:a(f(i)),onChange:v,"selection-mode":"multiple",placement:"start"},null,8,["default-label","data"])),f(i)==="Flows"?(C(),B(f(ap),{key:0,title:"确定要创建新的Flow吗？",description:"这将创建一个新的App的Flow版本。",onConfirm:O},{default:E(()=>[q(f(vn),{disabled:f(_).isPending.value,class:"flex items-center gap-2 cursor-pointer"},{default:E(()=>[q(w,{icon:f(_).isPending.value?"eos-icons:loading":"ep:plus",class:"text-sm"},null,8,["icon"]),A[3]||(A[3]=ce("span",null,"Create New Flow",-1))]),_:1,__:[3]},8,["disabled"])]),_:1})):Be("",!0)]),f(c)?(C(),ie("div",lF,"Loading...")):f(i)==="Screens"||f(i)==="UI Elements"||f(i)==="Marketing Pages"?(C(),ie("div",{key:2,class:qe(["grid gap-x-5 gap-y-12 flex-1",f(r)==="web"?"grid-cols-[repeat(auto-fill,minmax(min(100%,500px),1fr))]":"grid-cols-[repeat(auto-fill,minmax(min(100%,230px),1fr))]"])},[(C(!0),ie(Ie,null,wt(f(b),(R,G)=>(C(),B(k,{key:G,id:R.id,src:R.screenUrl,platform:f(r)},null,8,["id","src","platform"]))),128))],2)):Be("",!0),f(i)==="Flows"&&f(m)?(C(),B($,{key:3,modelValue:f(m).appSections,"onUpdate:modelValue":A[2]||(A[2]=R=>f(m).appSections=R),platform:f(r),"app-info-id":f(m).id},null,8,["modelValue","platform","app-info-id"])):Be("",!0)])}}}),cF=Lu(uF,[["__scopeId","data-v-282accd6"]]);function dF(e){return Object.prototype.toString.call(e)==="[object Object]"}function sg(e){return dF(e)||Array.isArray(e)}function fF(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function fp(e,t){const n=Object.keys(e),o=Object.keys(t);if(n.length!==o.length)return!1;const r=JSON.stringify(Object.keys(e.breakpoints||{})),s=JSON.stringify(Object.keys(t.breakpoints||{}));return r!==s?!1:n.every(i=>{const a=e[i],l=t[i];return typeof a=="function"?`${a}`==`${l}`:!sg(a)||!sg(l)?a===l:fp(a,l)})}function ig(e){return e.concat().sort((t,n)=>t.name>n.name?1:-1).map(t=>t.options)}function pF(e,t){if(e.length!==t.length)return!1;const n=ig(e),o=ig(t);return n.every((r,s)=>{const i=o[s];return fp(r,i)})}function pp(e){return typeof e=="number"}function ef(e){return typeof e=="string"}function Nu(e){return typeof e=="boolean"}function ag(e){return Object.prototype.toString.call(e)==="[object Object]"}function _t(e){return Math.abs(e)}function hp(e){return Math.sign(e)}function Vi(e,t){return _t(e-t)}function hF(e,t){if(e===0||t===0||_t(e)<=_t(t))return 0;const n=Vi(_t(e),_t(t));return _t(n/e)}function mF(e){return Math.round(e*100)/100}function ia(e){return aa(e).map(Number)}function jn(e){return e[Ia(e)]}function Ia(e){return Math.max(0,e.length-1)}function mp(e,t){return t===Ia(e)}function lg(e,t=0){return Array.from(Array(e),(n,o)=>t+o)}function aa(e){return Object.keys(e)}function nw(e,t){return[e,t].reduce((n,o)=>(aa(o).forEach(r=>{const s=n[r],i=o[r],a=ag(s)&&ag(i);n[r]=a?nw(s,i):i}),n),{})}function tf(e,t){return typeof t.MouseEvent<"u"&&e instanceof t.MouseEvent}function gF(e,t){const n={start:o,center:r,end:s};function o(){return 0}function r(l){return s(l)/2}function s(l){return t-l}function i(l,u){return ef(e)?n[e](l):e(t,l,u)}return{measure:i}}function la(){let e=[];function t(r,s,i,a={passive:!0}){let l;if("addEventListener"in r)r.addEventListener(s,i,a),l=()=>r.removeEventListener(s,i,a);else{const u=r;u.addListener(i),l=()=>u.removeListener(i)}return e.push(l),o}function n(){e=e.filter(r=>r())}const o={add:t,clear:n};return o}function vF(e,t,n,o){const r=la(),s=1e3/60;let i=null,a=0,l=0;function u(){r.add(e,"visibilitychange",()=>{e.hidden&&m()})}function c(){h(),r.clear()}function d(v){if(!l)return;i||(i=v,n(),n());const y=v-i;for(i=v,a+=y;a>=s;)n(),a-=s;const b=a/s;o(b),l&&(l=t.requestAnimationFrame(d))}function p(){l||(l=t.requestAnimationFrame(d))}function h(){t.cancelAnimationFrame(l),i=null,a=0,l=0}function m(){i=null,a=0}return{init:u,destroy:c,start:p,stop:h,update:n,render:o}}function yF(e,t){const n=t==="rtl",o=e==="y",r=o?"y":"x",s=o?"x":"y",i=!o&&n?-1:1,a=c(),l=d();function u(m){const{height:g,width:v}=m;return o?g:v}function c(){return o?"top":n?"right":"left"}function d(){return o?"bottom":n?"left":"right"}function p(m){return m*i}return{scroll:r,cross:s,startEdge:a,endEdge:l,measureSize:u,direction:p}}function es(e=0,t=0){const n=_t(e-t);function o(u){return u<e}function r(u){return u>t}function s(u){return o(u)||r(u)}function i(u){return s(u)?o(u)?e:t:u}function a(u){return n?u-n*Math.ceil((u-t)/n):u}return{length:n,max:t,min:e,constrain:i,reachedAny:s,reachedMax:r,reachedMin:o,removeOffset:a}}function ow(e,t,n){const{constrain:o}=es(0,e),r=e+1;let s=i(t);function i(p){return n?_t((r+p)%r):o(p)}function a(){return s}function l(p){return s=i(p),d}function u(p){return c().set(a()+p)}function c(){return ow(e,a(),n)}const d={get:a,set:l,add:u,clone:c};return d}function bF(e,t,n,o,r,s,i,a,l,u,c,d,p,h,m,g,v,y,b){const{cross:_,direction:O}=e,T=["INPUT","SELECT","TEXTAREA"],A={passive:!1},D=la(),P=la(),w=es(50,225).constrain(h.measure(20)),k={mouse:300,touch:400},$={mouse:500,touch:600},R=m?43:25;let G=!1,J=0,ne=0,ae=!1,re=!1,L=!1,oe=!1;function Y(S){if(!b)return;function I(K){(Nu(b)||b(S,K))&&Se(K)}const j=t;D.add(j,"dragstart",K=>K.preventDefault(),A).add(j,"touchmove",()=>{},A).add(j,"touchend",()=>{}).add(j,"touchstart",I).add(j,"mousedown",I).add(j,"touchcancel",z).add(j,"contextmenu",z).add(j,"click",H,!0)}function ee(){D.clear(),P.clear()}function le(){const S=oe?n:t;P.add(S,"touchmove",x,A).add(S,"touchend",z).add(S,"mousemove",x,A).add(S,"mouseup",z)}function ye(S){const I=S.nodeName||"";return T.includes(I)}function me(){return(m?$:k)[oe?"mouse":"touch"]}function Pe(S,I){const j=d.add(hp(S)*-1),K=c.byDistance(S,!m).distance;return m||_t(S)<w?K:v&&I?K*.5:c.byIndex(j.get(),0).distance}function Se(S){const I=tf(S,o);oe=I,L=m&&I&&!S.buttons&&G,G=Vi(r.get(),i.get())>=2,!(I&&S.button!==0)&&(ye(S.target)||(ae=!0,s.pointerDown(S),u.useFriction(0).useDuration(0),r.set(i),le(),J=s.readPoint(S),ne=s.readPoint(S,_),p.emit("pointerDown")))}function x(S){if(!tf(S,o)&&S.touches.length>=2)return z(S);const j=s.readPoint(S),K=s.readPoint(S,_),Z=Vi(j,J),Q=Vi(K,ne);if(!re&&!oe&&(!S.cancelable||(re=Z>Q,!re)))return z(S);const ue=s.pointerMove(S);Z>g&&(L=!0),u.useFriction(.3).useDuration(.75),a.start(),r.add(O(ue)),S.preventDefault()}function z(S){const j=c.byDistance(0,!1).index!==d.get(),K=s.pointerUp(S)*me(),Z=Pe(O(K),j),Q=hF(K,Z),ue=R-10*Q,fe=y+Q/50;re=!1,ae=!1,P.clear(),u.useDuration(ue).useFriction(fe),l.distance(Z,!m),oe=!1,p.emit("pointerUp")}function H(S){L&&(S.stopPropagation(),S.preventDefault(),L=!1)}function X(){return ae}return{init:Y,destroy:ee,pointerDown:X}}function _F(e,t){let o,r;function s(d){return d.timeStamp}function i(d,p){const m=`client${(p||e.scroll)==="x"?"X":"Y"}`;return(tf(d,t)?d:d.touches[0])[m]}function a(d){return o=d,r=d,i(d)}function l(d){const p=i(d)-i(r),h=s(d)-s(o)>170;return r=d,h&&(o=d),p}function u(d){if(!o||!r)return 0;const p=i(r)-i(o),h=s(d)-s(o),m=s(d)-s(r)>170,g=p/h;return h&&!m&&_t(g)>.1?g:0}return{pointerDown:a,pointerMove:l,pointerUp:u,readPoint:i}}function wF(){function e(n){const{offsetTop:o,offsetLeft:r,offsetWidth:s,offsetHeight:i}=n;return{top:o,right:r+s,bottom:o+i,left:r,width:s,height:i}}return{measure:e}}function SF(e){function t(o){return e*(o/100)}return{measure:t}}function CF(e,t,n,o,r,s,i){const a=[e].concat(o);let l,u,c=[],d=!1;function p(v){return r.measureSize(i.measure(v))}function h(v){if(!s)return;u=p(e),c=o.map(p);function y(b){for(const _ of b){if(d)return;const O=_.target===e,T=o.indexOf(_.target),A=O?u:c[T],D=p(O?e:o[T]);if(_t(D-A)>=.5){v.reInit(),t.emit("resize");break}}}l=new ResizeObserver(b=>{(Nu(s)||s(v,b))&&y(b)}),n.requestAnimationFrame(()=>{a.forEach(b=>l.observe(b))})}function m(){d=!0,l&&l.disconnect()}return{init:h,destroy:m}}function xF(e,t,n,o,r,s){let i=0,a=0,l=r,u=s,c=e.get(),d=0;function p(){const A=o.get()-e.get(),D=!l;let P=0;return D?(i=0,n.set(o),e.set(o),P=A):(n.set(e),i+=A/l,i*=u,c+=i,e.add(i),P=c-d),a=hp(P),d=c,T}function h(){const A=o.get()-t.get();return _t(A)<.001}function m(){return l}function g(){return a}function v(){return i}function y(){return _(r)}function b(){return O(s)}function _(A){return l=A,T}function O(A){return u=A,T}const T={direction:g,duration:m,velocity:v,seek:p,settled:h,useBaseFriction:b,useBaseDuration:y,useFriction:O,useDuration:_};return T}function EF(e,t,n,o,r){const s=r.measure(10),i=r.measure(50),a=es(.1,.99);let l=!1;function u(){return!(l||!e.reachedAny(n.get())||!e.reachedAny(t.get()))}function c(h){if(!u())return;const m=e.reachedMin(t.get())?"min":"max",g=_t(e[m]-t.get()),v=n.get()-t.get(),y=a.constrain(g/i);n.subtract(v*y),!h&&_t(v)<s&&(n.set(e.constrain(n.get())),o.useDuration(25).useBaseFriction())}function d(h){l=!h}return{shouldConstrain:u,constrain:c,toggleActive:d}}function AF(e,t,n,o,r){const s=es(-t+e,0),i=d(),a=c(),l=p();function u(m,g){return Vi(m,g)<=1}function c(){const m=i[0],g=jn(i),v=i.lastIndexOf(m),y=i.indexOf(g)+1;return es(v,y)}function d(){return n.map((m,g)=>{const{min:v,max:y}=s,b=s.constrain(m),_=!g,O=mp(n,g);return _?y:O||u(v,b)?v:u(y,b)?y:b}).map(m=>parseFloat(m.toFixed(3)))}function p(){if(t<=e+r)return[s.max];if(o==="keepSnaps")return i;const{min:m,max:g}=a;return i.slice(m,g)}return{snapsContained:l,scrollContainLimit:a}}function OF(e,t,n){const o=t[0],r=n?o-e:jn(t);return{limit:es(r,o)}}function TF(e,t,n,o){const s=t.min+.1,i=t.max+.1,{reachedMin:a,reachedMax:l}=es(s,i);function u(p){return p===1?l(n.get()):p===-1?a(n.get()):!1}function c(p){if(!u(p))return;const h=e*(p*-1);o.forEach(m=>m.add(h))}return{loop:c}}function PF(e){const{max:t,length:n}=e;function o(s){const i=s-t;return n?i/-n:0}return{get:o}}function kF(e,t,n,o,r){const{startEdge:s,endEdge:i}=e,{groupSlides:a}=r,l=d().map(t.measure),u=p(),c=h();function d(){return a(o).map(g=>jn(g)[i]-g[0][s]).map(_t)}function p(){return o.map(g=>n[s]-g[s]).map(g=>-_t(g))}function h(){return a(u).map(g=>g[0]).map((g,v)=>g+l[v])}return{snaps:u,snapsAligned:c}}function IF(e,t,n,o,r,s){const{groupSlides:i}=r,{min:a,max:l}=o,u=c();function c(){const p=i(s),h=!e||t==="keepSnaps";return n.length===1?[s]:h?p:p.slice(a,l).map((m,g,v)=>{const y=!g,b=mp(v,g);if(y){const _=jn(v[0])+1;return lg(_)}if(b){const _=Ia(s)-jn(v)[0]+1;return lg(_,jn(v)[0])}return m})}return{slideRegistry:u}}function DF(e,t,n,o,r){const{reachedAny:s,removeOffset:i,constrain:a}=o;function l(m){return m.concat().sort((g,v)=>_t(g)-_t(v))[0]}function u(m){const g=e?i(m):a(m),v=t.map((b,_)=>({diff:c(b-g,0),index:_})).sort((b,_)=>_t(b.diff)-_t(_.diff)),{index:y}=v[0];return{index:y,distance:g}}function c(m,g){const v=[m,m+n,m-n];if(!e)return m;if(!g)return l(v);const y=v.filter(b=>hp(b)===g);return y.length?l(y):jn(v)-n}function d(m,g){const v=t[m]-r.get(),y=c(v,g);return{index:m,distance:y}}function p(m,g){const v=r.get()+m,{index:y,distance:b}=u(v),_=!e&&s(v);if(!g||_)return{index:y,distance:m};const O=t[y]-b,T=m+c(O,0);return{index:y,distance:T}}return{byDistance:p,byIndex:d,shortcut:c}}function RF(e,t,n,o,r,s,i){function a(d){const p=d.distance,h=d.index!==t.get();s.add(p),p&&(o.duration()?e.start():(e.update(),e.render(1),e.update())),h&&(n.set(t.get()),t.set(d.index),i.emit("select"))}function l(d,p){const h=r.byDistance(d,p);a(h)}function u(d,p){const h=t.clone().set(d),m=r.byIndex(h.get(),p);a(m)}return{distance:l,index:u}}function BF(e,t,n,o,r,s,i,a){const l={passive:!0,capture:!0};let u=0;function c(h){if(!a)return;function m(g){if(new Date().getTime()-u>10)return;i.emit("slideFocusStart"),e.scrollLeft=0;const b=n.findIndex(_=>_.includes(g));pp(b)&&(r.useDuration(0),o.index(b,0),i.emit("slideFocus"))}s.add(document,"keydown",d,!1),t.forEach((g,v)=>{s.add(g,"focus",y=>{(Nu(a)||a(h,y))&&m(v)},l)})}function d(h){h.code==="Tab"&&(u=new Date().getTime())}return{init:c}}function wi(e){let t=e;function n(){return t}function o(l){t=i(l)}function r(l){t+=i(l)}function s(l){t-=i(l)}function i(l){return pp(l)?l:l.get()}return{get:n,set:o,add:r,subtract:s}}function rw(e,t){const n=e.scroll==="x"?i:a,o=t.style;let r=null,s=!1;function i(p){return`translate3d(${p}px,0px,0px)`}function a(p){return`translate3d(0px,${p}px,0px)`}function l(p){if(s)return;const h=mF(e.direction(p));h!==r&&(o.transform=n(h),r=h)}function u(p){s=!p}function c(){s||(o.transform="",t.getAttribute("style")||t.removeAttribute("style"))}return{clear:c,to:l,toggleActive:u}}function MF(e,t,n,o,r,s,i,a,l){const c=ia(r),d=ia(r).reverse(),p=y().concat(b());function h(D,P){return D.reduce((w,k)=>w-r[k],P)}function m(D,P){return D.reduce((w,k)=>h(w,P)>0?w.concat([k]):w,[])}function g(D){return s.map((P,w)=>({start:P-o[w]+.5+D,end:P+t-.5+D}))}function v(D,P,w){const k=g(P);return D.map($=>{const R=w?0:-n,G=w?n:0,J=w?"end":"start",ne=k[$][J];return{index:$,loopPoint:ne,slideLocation:wi(-1),translate:rw(e,l[$]),target:()=>a.get()>ne?R:G}})}function y(){const D=i[0],P=m(d,D);return v(P,n,!1)}function b(){const D=t-i[0]-1,P=m(c,D);return v(P,-n,!0)}function _(){return p.every(({index:D})=>{const P=c.filter(w=>w!==D);return h(P,t)<=.1})}function O(){p.forEach(D=>{const{target:P,translate:w,slideLocation:k}=D,$=P();$!==k.get()&&(w.to($),k.set($))})}function T(){p.forEach(D=>D.translate.clear())}return{canLoop:_,clear:T,loop:O,loopPoints:p}}function qF(e,t,n){let o,r=!1;function s(l){if(!n)return;function u(c){for(const d of c)if(d.type==="childList"){l.reInit(),t.emit("slidesChanged");break}}o=new MutationObserver(c=>{r||(Nu(n)||n(l,c))&&u(c)}),o.observe(e,{childList:!0})}function i(){o&&o.disconnect(),r=!0}return{init:s,destroy:i}}function $F(e,t,n,o){const r={};let s=null,i=null,a,l=!1;function u(){a=new IntersectionObserver(m=>{l||(m.forEach(g=>{const v=t.indexOf(g.target);r[v]=g}),s=null,i=null,n.emit("slidesInView"))},{root:e.parentElement,threshold:o}),t.forEach(m=>a.observe(m))}function c(){a&&a.disconnect(),l=!0}function d(m){return aa(r).reduce((g,v)=>{const y=parseInt(v),{isIntersecting:b}=r[y];return(m&&b||!m&&!b)&&g.push(y),g},[])}function p(m=!0){if(m&&s)return s;if(!m&&i)return i;const g=d(m);return m&&(s=g),m||(i=g),g}return{init:u,destroy:c,get:p}}function FF(e,t,n,o,r,s){const{measureSize:i,startEdge:a,endEdge:l}=e,u=n[0]&&r,c=m(),d=g(),p=n.map(i),h=v();function m(){if(!u)return 0;const b=n[0];return _t(t[a]-b[a])}function g(){if(!u)return 0;const b=s.getComputedStyle(jn(o));return parseFloat(b.getPropertyValue(`margin-${l}`))}function v(){return n.map((b,_,O)=>{const T=!_,A=mp(O,_);return T?p[_]+c:A?p[_]+d:O[_+1][a]-b[a]}).map(_t)}return{slideSizes:p,slideSizesWithGaps:h,startGap:c,endGap:d}}function LF(e,t,n,o,r,s,i,a,l){const{startEdge:u,endEdge:c,direction:d}=e,p=pp(n);function h(y,b){return ia(y).filter(_=>_%b===0).map(_=>y.slice(_,_+b))}function m(y){return y.length?ia(y).reduce((b,_,O)=>{const T=jn(b)||0,A=T===0,D=_===Ia(y),P=r[u]-s[T][u],w=r[u]-s[_][c],k=!o&&A?d(i):0,$=!o&&D?d(a):0,R=_t(w-$-(P+k));return O&&R>t+l&&b.push(_),D&&b.push(y.length),b},[]).map((b,_,O)=>{const T=Math.max(O[_-1]||0);return y.slice(T,b)}):[]}function g(y){return p?h(y,n):m(y)}return{groupSlides:g}}function NF(e,t,n,o,r,s,i){const{align:a,axis:l,direction:u,startIndex:c,loop:d,duration:p,dragFree:h,dragThreshold:m,inViewThreshold:g,slidesToScroll:v,skipSnaps:y,containScroll:b,watchResize:_,watchSlides:O,watchDrag:T,watchFocus:A}=s,D=2,P=wF(),w=P.measure(t),k=n.map(P.measure),$=yF(l,u),R=$.measureSize(w),G=SF(R),J=gF(a,R),ne=!d&&!!b,ae=d||!!b,{slideSizes:re,slideSizesWithGaps:L,startGap:oe,endGap:Y}=FF($,w,k,n,ae,r),ee=LF($,R,v,d,w,k,oe,Y,D),{snaps:le,snapsAligned:ye}=kF($,J,w,k,ee),me=-jn(le)+jn(L),{snapsContained:Pe,scrollContainLimit:Se}=AF(R,me,ye,b,D),x=ne?Pe:ye,{limit:z}=OF(me,x,d),H=ow(Ia(x),c,d),X=H.clone(),pe=ia(n),S=({dragHandler:mt,scrollBody:$t,scrollBounds:Ft,options:{loop:yn}})=>{yn||Ft.constrain(mt.pointerDown()),$t.seek()},I=({scrollBody:mt,translate:$t,location:Ft,offsetLocation:yn,previousLocation:Cr,scrollLooper:Bt,slideLooper:Lt,dragHandler:Qn,animation:Yn,eventHandler:vp,scrollBounds:iw,options:{loop:yp}},bp)=>{const _p=mt.settled(),aw=!iw.shouldConstrain(),wp=yp?_p:_p&&aw,Sp=wp&&!Qn.pointerDown();Sp&&Yn.stop();const lw=Ft.get()*bp+Cr.get()*(1-bp);yn.set(lw),yp&&(Bt.loop(mt.direction()),Lt.loop()),$t.to(yn.get()),Sp&&vp.emit("settle"),wp||vp.emit("scroll")},j=vF(o,r,()=>S(At),mt=>I(At,mt)),K=.68,Z=x[H.get()],Q=wi(Z),ue=wi(Z),fe=wi(Z),de=wi(Z),se=xF(Q,fe,ue,de,p,K),xe=DF(d,x,me,z,de),ge=RF(j,H,X,se,xe,de,i),Ee=PF(z),ke=la(),He=$F(t,n,i,g),{slideRegistry:tt}=IF(ne,b,x,Se,ee,pe),Ye=BF(e,n,tt,ge,se,ke,i,A),At={ownerDocument:o,ownerWindow:r,eventHandler:i,containerRect:w,slideRects:k,animation:j,axis:$,dragHandler:bF($,e,o,r,de,_F($,r),Q,j,ge,se,xe,H,i,G,h,m,y,K,T),eventStore:ke,percentOfView:G,index:H,indexPrevious:X,limit:z,location:Q,offsetLocation:fe,previousLocation:ue,options:s,resizeHandler:CF(t,i,r,n,$,_,P),scrollBody:se,scrollBounds:EF(z,fe,de,se,G),scrollLooper:TF(me,z,fe,[Q,fe,ue,de]),scrollProgress:Ee,scrollSnapList:x.map(Ee.get),scrollSnaps:x,scrollTarget:xe,scrollTo:ge,slideLooper:MF($,R,me,re,L,le,x,fe,n),slideFocus:Ye,slidesHandler:qF(t,i,O),slidesInView:He,slideIndexes:pe,slideRegistry:tt,slidesToScroll:ee,target:de,translate:rw($,t)};return At}function jF(){let e={},t;function n(u){t=u}function o(u){return e[u]||[]}function r(u){return o(u).forEach(c=>c(t,u)),l}function s(u,c){return e[u]=o(u).concat([c]),l}function i(u,c){return e[u]=o(u).filter(d=>d!==c),l}function a(){e={}}const l={init:n,emit:r,off:i,on:s,clear:a};return l}const VF={align:"center",axis:"x",container:null,slides:null,containScroll:"trimSnaps",direction:"ltr",slidesToScroll:1,inViewThreshold:0,breakpoints:{},dragFree:!1,dragThreshold:10,loop:!1,skipSnaps:!1,duration:25,startIndex:0,active:!0,watchDrag:!0,watchResize:!0,watchSlides:!0,watchFocus:!0};function UF(e){function t(s,i){return nw(s,i||{})}function n(s){const i=s.breakpoints||{},a=aa(i).filter(l=>e.matchMedia(l).matches).map(l=>i[l]).reduce((l,u)=>t(l,u),{});return t(s,a)}function o(s){return s.map(i=>aa(i.breakpoints||{})).reduce((i,a)=>i.concat(a),[]).map(e.matchMedia)}return{mergeOptions:t,optionsAtMedia:n,optionsMediaQueries:o}}function HF(e){let t=[];function n(s,i){return t=i.filter(({options:a})=>e.optionsAtMedia(a).active!==!1),t.forEach(a=>a.init(s,e)),i.reduce((a,l)=>Object.assign(a,{[l.name]:l}),{})}function o(){t=t.filter(s=>s.destroy())}return{init:n,destroy:o}}function Ul(e,t,n){const o=e.ownerDocument,r=o.defaultView,s=UF(r),i=HF(s),a=la(),l=jF(),{mergeOptions:u,optionsAtMedia:c,optionsMediaQueries:d}=s,{on:p,off:h,emit:m}=l,g=$;let v=!1,y,b=u(VF,Ul.globalOptions),_=u(b),O=[],T,A,D;function P(){const{container:pe,slides:S}=_;A=(ef(pe)?e.querySelector(pe):pe)||e.children[0];const j=ef(S)?A.querySelectorAll(S):S;D=[].slice.call(j||A.children)}function w(pe){const S=NF(e,A,D,o,r,pe,l);if(pe.loop&&!S.slideLooper.canLoop()){const I=Object.assign({},pe,{loop:!1});return w(I)}return S}function k(pe,S){v||(b=u(b,pe),_=c(b),O=S||O,P(),y=w(_),d([b,...O.map(({options:I})=>I)]).forEach(I=>a.add(I,"change",$)),_.active&&(y.translate.to(y.location.get()),y.animation.init(),y.slidesInView.init(),y.slideFocus.init(X),y.eventHandler.init(X),y.resizeHandler.init(X),y.slidesHandler.init(X),y.options.loop&&y.slideLooper.loop(),A.offsetParent&&D.length&&y.dragHandler.init(X),T=i.init(X,O)))}function $(pe,S){const I=ee();R(),k(u({startIndex:I},pe),S),l.emit("reInit")}function R(){y.dragHandler.destroy(),y.eventStore.clear(),y.translate.clear(),y.slideLooper.clear(),y.resizeHandler.destroy(),y.slidesHandler.destroy(),y.slidesInView.destroy(),y.animation.destroy(),i.destroy(),a.clear()}function G(){v||(v=!0,a.clear(),R(),l.emit("destroy"),l.clear())}function J(pe,S,I){!_.active||v||(y.scrollBody.useBaseFriction().useDuration(S===!0?0:_.duration),y.scrollTo.index(pe,I||0))}function ne(pe){const S=y.index.add(1).get();J(S,pe,-1)}function ae(pe){const S=y.index.add(-1).get();J(S,pe,1)}function re(){return y.index.add(1).get()!==ee()}function L(){return y.index.add(-1).get()!==ee()}function oe(){return y.scrollSnapList}function Y(){return y.scrollProgress.get(y.offsetLocation.get())}function ee(){return y.index.get()}function le(){return y.indexPrevious.get()}function ye(){return y.slidesInView.get()}function me(){return y.slidesInView.get(!1)}function Pe(){return T}function Se(){return y}function x(){return e}function z(){return A}function H(){return D}const X={canScrollNext:re,canScrollPrev:L,containerNode:z,internalEngine:Se,destroy:G,off:h,on:p,emit:m,plugins:Pe,previousScrollSnap:le,reInit:g,rootNode:x,scrollNext:ne,scrollPrev:ae,scrollProgress:Y,scrollSnapList:oe,scrollTo:J,selectedScrollSnap:ee,slideNodes:H,slidesInView:ye,slidesNotInView:me};return k(t,n),setTimeout(()=>l.emit("init"),0),X}Ul.globalOptions=void 0;function gp(e={},t=[]){const n=$e(e),o=$e(t);let r=n?e.value:e,s=o?t.value:t;const i=Cn(),a=Cn();function l(){a.value&&a.value.reInit(r,s)}return je(()=>{!fF()||!i.value||(Ul.globalOptions=gp.globalOptions,a.value=Ul(i.value,r,s))}),Ys(()=>{a.value&&a.value.destroy()}),n&&Ce(e,u=>{fp(r,u)||(r=u,l())}),o&&Ce(t,u=>{pF(s,u)||(s=u,l())}),[i,a]}gp.globalOptions=void 0;const[zF,KF]=bC(({opts:e,orientation:t,plugins:n},o)=>{const[r,s]=gp({...e,axis:t==="horizontal"?"x":"y"},n);function i(){var d;(d=s.value)==null||d.scrollPrev()}function a(){var d;(d=s.value)==null||d.scrollNext()}const l=N(!1),u=N(!1);function c(d){l.value=(d==null?void 0:d.canScrollNext())||!1,u.value=(d==null?void 0:d.canScrollPrev())||!1}return je(()=>{var d,p,h;s.value&&((d=s.value)==null||d.on("init",c),(p=s.value)==null||p.on("reInit",c),(h=s.value)==null||h.on("select",c),o("init-api",s.value))}),{carouselRef:r,carouselApi:s,canScrollPrev:u,canScrollNext:l,scrollPrev:i,scrollNext:a,orientation:t}});function ju(){const e=KF();if(!e)throw new Error("useCarousel must be used within a <Carousel />");return e}const WF=F({__name:"Carousel",props:{opts:{},plugins:{},orientation:{default:"horizontal"},class:{}},emits:["init-api"],setup(e,{expose:t,emit:n}){const o=e,r=n,{canScrollNext:s,canScrollPrev:i,carouselApi:a,carouselRef:l,orientation:u,scrollNext:c,scrollPrev:d}=zF(o,r);t({canScrollNext:s,canScrollPrev:i,carouselApi:a,carouselRef:l,orientation:u,scrollNext:c,scrollPrev:d});function p(h){const m=o.orientation==="vertical"?"ArrowUp":"ArrowLeft",g=o.orientation==="vertical"?"ArrowDown":"ArrowRight";if(h.key===m){h.preventDefault(),d();return}h.key===g&&(h.preventDefault(),c())}return(h,m)=>(C(),ie("div",{"data-slot":"carousel",class:qe(f(Fe)("relative",o.class)),role:"region","aria-roledescription":"carousel",tabindex:"0",onKeydown:p},[V(h.$slots,"default",{canScrollNext:f(s),canScrollPrev:f(i),carouselApi:f(a),carouselRef:f(l),orientation:f(u),scrollNext:f(c),scrollPrev:f(d)})],34))}}),GF=F({__name:"CarouselNext",props:{variant:{default:"outline"},size:{default:"icon"},class:{}},setup(e){const t=e,{orientation:n,canScrollNext:o,scrollNext:r}=ju();return(s,i)=>(C(),B(f(vn),{"data-slot":"carousel-next",disabled:!f(o),class:qe(f(Fe)("absolute size-8 rounded-full",f(n)==="horizontal"?"top-1/2 -right-12 -translate-y-1/2":"-bottom-12 left-1/2 -translate-x-1/2 rotate-90",t.class)),variant:s.variant,size:s.size,onClick:f(r)},{default:E(()=>[V(s.$slots,"default",{},()=>[q(f(Ok)),i[0]||(i[0]=ce("span",{class:"sr-only"},"Next Slide",-1))])]),_:3},8,["disabled","class","variant","size","onClick"]))}}),QF=F({__name:"CarouselPrevious",props:{variant:{default:"outline"},size:{default:"icon"},class:{}},setup(e){const t=e,{orientation:n,canScrollPrev:o,scrollPrev:r}=ju();return(s,i)=>(C(),B(f(vn),{"data-slot":"carousel-previous",disabled:!f(o),class:qe(f(Fe)("absolute size-8 rounded-full",f(n)==="horizontal"?"top-1/2 -left-12 -translate-y-1/2":"-top-12 left-1/2 -translate-x-1/2 rotate-90",t.class)),variant:s.variant,size:s.size,onClick:f(r)},{default:E(()=>[V(s.$slots,"default",{},()=>[q(f(Ak)),i[0]||(i[0]=ce("span",{class:"sr-only"},"Previous Slide",-1))])]),_:3},8,["disabled","class","variant","size","onClick"]))}}),YF=F({inheritAttrs:!1,__name:"CarouselContent",props:{class:{}},setup(e){const t=e,{carouselRef:n,orientation:o}=ju();return(r,s)=>(C(),ie("div",{ref_key:"carouselRef",ref:n,"data-slot":"carousel-content",class:"overflow-hidden h-full"},[ce("div",te({class:f(Fe)("flex",f(o)==="horizontal"?"-ml-4 h-full":"-mt-4 flex-col",t.class)},r.$attrs),[V(r.$slots,"default")],16)],512))}}),XF=F({__name:"CarouselItem",props:{class:{}},setup(e){const t=e,{orientation:n}=ju();return(o,r)=>(C(),ie("div",{"data-slot":"carousel-item",role:"group","aria-roledescription":"slide",class:qe(f(Fe)("min-w-0 shrink-0 grow-0 basis-full",f(n)==="horizontal"?"pl-4":"pt-4",t.class))},[V(o.$slots,"default")],2))}}),JF=F({__name:"AspectRatio",props:{ratio:{},asChild:{type:Boolean},as:{}},setup(e){const t=e;return(n,o)=>(C(),B(f(M1),te({"data-slot":"aspect-ratio"},t),{default:E(()=>[V(n.$slots,"default")]),_:3},16))}}),ZF={class:"relative flex flex-col gap-4 cursor-pointer group"},eL=F({__name:"AppCard",props:Un({name:{},description:{},logo:{},videoUrl:{},previewScreens:{},platform:{},isFavorite:{type:Boolean}},{isFavorite:{type:Boolean,default:!1},isFavoriteModifiers:{}}),emits:Un(["click","toggle-favorite"],["update:isFavorite"]),setup(e,{emit:t}){const n=ts(e,"isFavorite"),o=t,r=U(()=>e.platform==="web"),s={video:"video",image:ri},i=U(()=>r.value?16/10:393/892),a=U(()=>e.videoUrl?[{type:"video",id:"video",props:{src:e.videoUrl,muted:!0,autoplay:!0,loop:!0,playsinline:!0,class:"object-contain"}}]:(e.previewScreens||[]).map(c=>({type:"image",id:c.id,props:{src:c.screenUrl,fit:"contain",class:"object-contain"}}))),l=()=>{o("click")},u=()=>{n.value=!n.value,o("toggle-favorite")};return(c,d)=>{const p=XF,h=YF,m=QF,g=GF,v=WF,y=Yf;return C(),ie("div",ZF,[ce("div",{class:qe(["w-full overflow-hidden bg-[#f0f0f0] rounded-4xl flex items-center justify-center hover:bg-[#f4f4f4] transition-colors duration-300",f(r)?"aspect-[1/1]":"aspect-[7/10]"])},[q(v,{class:qe(["relative w-full h-full max-w-xs",f(r)?"h-[51%]":"h-[85%]"])},{default:E(()=>[q(h,{class:"rounded-2xl",onClick:l},{default:E(()=>[(C(!0),ie(Ie,null,wt(f(a),(b,_)=>(C(),B(p,{key:b.id||_,class:"flex items-center justify-center w-full h-full"},{default:E(()=>[q(f(JF),{ratio:f(i)},{default:E(()=>[(C(),B(ro(s[b.type]),te({ref_for:!0},b.props,{class:["w-full h-full object-contain",f(r)?"rounded-xs":"rounded-2xl"]}),null,16,["class"]))]),_:2},1032,["ratio"])]),_:2},1024))),128))]),_:1}),q(m),q(g)]),_:1},8,["class"])],2),ce("div",{class:"absolute top-2 right-2 z-10 p-2 rounded-full bg-white/50 backdrop-blur-sm opacity-0 group-hover:opacity-100 transition-opacity",onClick:Ze(u,["stop"])},[q(f(Ik),{class:qe(["w-5 h-5 text-yellow-400",n.value?"fill-yellow-400":"fill-none"])},null,8,["class"])]),q(y,{logo:c.logo,name:c.name,description:c.description},null,8,["logo","name","description"])])}}}),tL=Lu(eL,[["__scopeId","data-v-49595ce3"]]),nL={class:"relative w-full overflow-hidden flex items-center"},oL={class:"flex w-max space-x-2"},rL=F({__name:"Filter",props:{platformType:{},type:{}},emits:["change"],setup(e,{expose:t,emit:n}){const o=N(null),r=N(null),{arrivedState:s}=FC(r,{throttle:50}),{left:i,right:a}=dt(s);je(()=>{var v;if(o.value){const y=(v=o.value.$el)==null?void 0:v.querySelector("[data-reka-scroll-area-viewport]");y?r.value=y:console.error("无法找到 ScrollArea 的 viewport 元素。")}});const l=v=>{if(r.value){const y=r.value.offsetWidth*.8;r.value.scrollBy({left:v==="left"?-y:y,behavior:"smooth"})}},u=n,{definitions:c}=va($u()),d=N(),p=U(()=>{var O,T;const y=(O=(e.platformType==="web"?ql:Ks).find(A=>A.label===e.type))==null?void 0:O.value,b=c==null?void 0:c.value.find(A=>A.platformType===e.platformType&&A.slug===y);return(((T=b==null?void 0:b.children)==null?void 0:T.map(A=>A.children).flat())||[]).map(A=>A?{id:typeof A.id=="number"?String(A.id):A.id||"",label:A.label||"",definition:A.definition||"",exampleScreens:Array.isArray(A.exampleScreens)?A.exampleScreens:[]}:null).filter(Boolean)}),h=v=>{d.value=d.value===v?void 0:v},m=v=>{const y=p.value.find(b=>b.id===v);u("change",y)},g=()=>{d.value=void 0};return Ce(d,v=>{m(v)},{immediate:!0}),t({reset:g}),(v,y)=>{const b=Ho;return C(),ie("div",nL,[Fs(q(f(vn),{variant:"outline",class:"absolute left-0 top-1/2 -translate-y-1/2 w-10 rounded-full z-10 bg-background transition-opacity cursor-pointer",onClick:y[0]||(y[0]=_=>l("left"))},{default:E(()=>[q(b,{icon:"lucide:chevron-left",class:"h-4 w-4"})]),_:1},512),[[Yi,!f(i)]]),q(f(lp),{ref_key:"scrollAreaRef",ref:o,class:"flex-1 overflow-auto whitespace-nowrap rounded-md"},{default:E(()=>[ce("div",oL,[(C(!0),ie(Ie,null,wt(p.value,_=>(C(),B(f(vn),{class:"rounded-full cursor-pointer",key:_.id,variant:d.value===_.id?"default":"outline",onClick:O=>h(_.id)},{default:E(()=>[rt(Ne(_.label),1)]),_:2},1032,["variant","onClick"]))),128))])]),_:1},512),Fs(q(f(vn),{variant:"outline",class:"absolute right-0 top-1/2 -translate-y-1/2 w-10 rounded-full z-10 p-0 bg-background transition-opacity cursor-pointer",onClick:y[1]||(y[1]=_=>l("right"))},{default:E(()=>[q(b,{icon:"lucide:chevron-right",class:"h-4 w-4"})]),_:1},512),[[Yi,!f(a)]])])}}}),sL=(e,t=null,n=0)=>{const o=()=>{const r=t==null?void 0:t.value;r?r.scrollHeight-r.scrollTop-r.clientHeight<=n&&e():document.documentElement.scrollHeight-document.documentElement.scrollTop-window.innerHeight<=n&&e()};je(()=>{const r=t==null?void 0:t.value;r?r.addEventListener("scroll",o):window.addEventListener("scroll",o)}),Rt(()=>{const r=t==null?void 0:t.value;r?r.removeEventListener("scroll",o):window.removeEventListener("scroll",o)})},iL={class:"flex flex-col gap-5 py-8"},aL={class:"flex-1 min-w-0 flex flex-col gap-y-5"},lL={class:"flex items-center"},uL={key:0,class:"flex items-center gap-x-2 ml-auto"},cL={key:2,class:"flex flex-col gap-5"},dL={class:"flex gap-4 px-1 py-4"},fL={class:"flex justify-between group hover:cursor-pointer"},pL={class:"flex flex-col gap-2"},hL={class:"flex items-center gap-2 text-xl h-7 font-bold"},mL={class:"flex gap-2 opacity-0 group-hover:opacity-100 transition-all duration-100"},gL=F({__name:"HomeView",setup(e){var oe;const t=Ta(),n=ya(),o=Ii({mutationFn:Y=>A.value.find(le=>le.id===Y)?lq({appId:Y,type:1}):Promise.reject("App not found"),onSuccess:()=>{n.invalidateQueries({queryKey:["app",p,m]})}}),r=Y=>{console.log("Toggling favorite for app:",Y),o.mutate(Y)},s=kt(ep),i=U(()=>(s==null?void 0:s.value)==="web"),a=U(()=>i.value?"web":"mobile"),l=U(()=>a.value),u=$u(),{definitions:c}=va(u),d=U(()=>s?s.value==="web"?ql:Ks:[]),p=N(((oe=d.value[0])==null?void 0:oe.label)||""),h=N(null),m=N(),g=N(),v=N(),y=N(),b=N([]),_=(Y,ee)=>{if(typeof Y=="number")if(ee)b.value.push(Y);else{const le=b.value.indexOf(Y);le>-1&&b.value.splice(le,1)}},O=Y=>{if(!c.value||c.value.length===0)return[];const ee=c.value.find(le=>le.slug===Y&&le.platformType===l.value);return(ee==null?void 0:ee.children)||[]},T=U(()=>p.value||"Apps");Ce(()=>s==null?void 0:s.value,(Y,ee)=>{var ye;if(Y===ee)return;const le=p.value;if(le==="Marketing Pages"&&Y!=="web")p.value="Apps";else{const me=Y==="web"?ql:Ks;me.find(Se=>Se.label===le)||(p.value=((ye=me[0])==null?void 0:ye.label)||"")}ae(),g.value=void 0,v.value=void 0,y.value=void 0,G()},{immediate:!1});const A=U(()=>{var Y;return((Y=w.value)==null?void 0:Y.pages.flatMap(ee=>ee.list))??[]}),D=U(()=>{var Y;return((Y=w.value)==null?void 0:Y.pages.flatMap(ee=>ee.list))??[]}),P=Y=>{var ye;const ee=d.value.find(me=>me.label===p.value),le={platform:s==null?void 0:s.value,type:1,categoryType:ee==null?void 0:ee.categoryType,pageNo:Y,pageSize:20};return(ye=m.value)!=null&&ye.id&&(le.categoryId=m.value.id),le},{data:w,fetchNextPage:k,hasNextPage:$,isFetching:R,refetch:G}=mC({queryKey:["home",p,m],queryFn:async({pageParam:Y=1})=>{const ee=P(Y);return p.value==="Apps"?CB(ee):Y$(ee)},getNextPageParam:(Y,ee)=>{if(!Y)return;const le=Math.ceil(Y.total/20);if(ee.length<le)return ee.length+1},initialPageParam:1}),J=Y=>{m.value=Y},ne=()=>{ae(),g.value=void 0,v.value=void 0,y.value=void 0},ae=()=>{h.value&&h.value.reset(),m.value=void 0};sL(()=>{$.value&&!R.value&&k()});const L=Y=>{t.push({path:"/details",query:{id:Y.id,platform:Y.platform}})};return(Y,ee)=>{const le=rL,ye=tL,me=tw,Pe=ri;return C(),ie("div",iL,[ee[8]||(ee[8]=ce("h1",{class:"text-[44px] font-[600]"},"Discover",-1)),ce("div",aL,[ce("div",lL,[q(f(rp),{modelValue:f(p),"onUpdate:modelValue":[ee[0]||(ee[0]=Se=>$e(p)?p.value=Se:null),ne]},{default:E(()=>[q(f(sp),{class:"bg-transparent p-0"},{default:E(()=>[(C(!0),ie(Ie,null,wt(f(d),Se=>(C(),B(f(ip),{key:Se.label,value:Se.label,class:"!font-bold"},{default:E(()=>[rt(Ne(Se.label),1)]),_:2},1032,["value"]))),128))]),_:1})]),_:1},8,["modelValue"]),f(p)!=="Apps"?(C(),ie("div",uL,[q(f(gl),{data:O("appCategories"),"default-label":"Apps",onChange:ee[1]||(ee[1]=Se=>g.value=Se),"selection-mode":"single",placement:"end"},null,8,["data"]),f(p)!=="UI Elements"&&f(p)!=="Flows"?(C(),B(f(gl),{key:0,data:O("screenElements"),"default-label":"UI Elements",onChange:ee[2]||(ee[2]=Se=>v.value=Se),"selection-mode":"single",placement:"end"},null,8,["data"])):Be("",!0),f(p)!=="Screens"&&f(p)!=="Flows"?(C(),B(f(gl),{key:1,data:O("screenPatterns"),"default-label":"Screens",onChange:ee[3]||(ee[3]=Se=>y.value=Se),"selection-mode":"single",placement:"end"},null,8,["data"])):Be("",!0)])):Be("",!0)]),q(le,{"platform-type":f(a),type:f(T),onChange:J,ref_key:"filterRef",ref:h,class:"w-full"},null,8,["platform-type","type"]),f(p)==="Apps"?(C(),ie("div",{key:0,class:qe(["grid gap-x-4 gap-y-12",f(i)?"grid-cols-[repeat(auto-fill,minmax(min(100%,450px),1fr))]":"grid-cols-[repeat(auto-fill,minmax(min(100%,350px),1fr))]"])},[(C(!0),ie(Ie,null,wt(f(A),Se=>(C(),B(ye,{key:Se.id,id:Se.id,name:Se.name,description:Se.appTagline,logo:Se.appLogoUrl,"video-url":Se.previewVideoUrl??"","preview-screens":Se.previewScreens,onClick:x=>L(Se),platform:f(s),onToggleFavorite:()=>r(Se.id)},null,8,["id","name","description","logo","video-url","preview-screens","onClick","platform","onToggleFavorite"]))),128))],2)):["Screens","UI Elements"].includes(f(p))?(C(),ie("div",{key:1,class:qe(["grid gap-x-5 gap-y-12",f(i)?"grid-cols-[repeat(auto-fill,minmax(min(100%,500px),1fr))]":"grid-cols-[repeat(auto-fill,minmax(min(100%,230px),1fr))] auto-rows-max"])},[(C(!0),ie(Ie,null,wt(f(D),(Se,x)=>(C(),B(me,{key:x,id:Se.screenRespVO.id,src:Se.screenRespVO.screenUrl,name:Se.appRespVO.name,logo:Se.appRespVO.appLogoUrl,selected:f(b).includes(Se.screenRespVO.id),onSelect:_,platform:f(s)},null,8,["id","src","name","logo","selected","platform"]))),128))],2)):f(p)==="Flows"?(C(),ie("div",cL,[q(f(lp),{class:"w-full"},{default:E(()=>[ce("div",dL,[(C(!0),ie(Ie,null,wt(f(D),(Se,x)=>(C(),B(Pe,{key:x,src:Se.screenRespVO.screenUrl,class:qe(["shrink-0 object-cover",[f(i)?"aspect-[16/11] w-[595px] rounded-lg":"aspect-[393/892] w-[215px] rounded-3xl","transition-transform hover:scale-[1.02]"]])},null,8,["src","class"]))),128))])]),_:1}),ce("div",fL,[ce("div",pL,[ce("div",hL,[ee[4]||(ee[4]=ce("span",{class:"group-hover:underline underline-offset-8 transition-all duration-300"},"Onboarding",-1)),ee[5]||(ee[5]=ce("span",{class:"text-gray-500"},"in",-1)),q(Pe,{class:"h-full"}),ee[6]||(ee[6]=ce("span",{class:"group-hover:underline underline-offset-8 transition-all duration-300"},"MoonPay",-1))]),ee[7]||(ee[7]=ce("span",{class:"text-sm text-gray-500"}," 100+ screens ",-1))]),ce("div",mL,[q(f(vn),{text:"Save",class:"bg-black text-white hover:opacity-80"}),q(f(vn),{text:"Copy",class:"bg-[#E3E3E3] hover:opacity-80 text-black"})])])])):Be("",!0)])])}}}),sw=OM({history:nM("/"),routes:[{path:"/",name:"home",component:gL},{path:"/details",name:"details",component:cF},{path:"/apps",name:"apps",component:()=>mi(()=>import("./Apps-BRMcQyeI.js"),__vite__mapDeps([0,1,2,3,4,5,6]))},{path:"/auth",name:"auth",component:()=>mi(()=>import("./Auth-BJGZikMq.js"),__vite__mapDeps([7,3,4,1,8]))},{path:"/settings",name:"settings",component:()=>mi(()=>import("./Settings-CkK03M1s.js"),__vite__mapDeps([9,4]))},{path:"/favorites",name:"favorites",component:()=>mi(()=>import("./Favorites-C1kb4hNA.js"),__vite__mapDeps([10,5,1]))},{path:"/chat",name:"chat",component:()=>mi(()=>import("./Chat-CbyEIPNl.js"),__vite__mapDeps([11,2,12]))}]});sw.beforeEach((e,t,n)=>{const o=localStorage.getItem("accessToken"),{fetchUserInfo:r,userInfo:s}=D_(),i=["auth"];return o?(!s.id&&e.name!=="auth"&&r(),e.name==="auth"?n({name:"home"}):n()):i.includes(e.name)?n():n({name:"auth"})});const Vu=DS(YM);Vu.use(pC);Vu.use(MS());Vu.use(sw);Vu.mount("#app");export{Ii as $,By as A,mo as B,Uo as C,kf as D,Un as E,ts as F,ie as G,Fs as H,Ho as I,Pt as J,Ne as K,AS as L,et as M,ft as N,Fe as O,Ae as P,Kt as Q,Ry as R,qe as S,EL as T,$e as U,My as V,ce as W,rt as X,GL as Y,ya as Z,vn as _,In as a,df as a$,wk as a0,Bk as a1,$k as a2,qk as a3,ri as a4,wt as a5,Ie as a6,X$ as a7,ct as a8,yt as a9,un as aA,zg as aB,ut as aC,We as aD,Et as aE,Ys as aF,Nn as aG,bd as aH,zt as aI,Dk as aJ,xb as aK,lb as aL,yP as aM,bP as aN,ql as aO,Ks as aP,mC as aQ,sL as aR,rp as aS,sp as aT,ip as aU,u$ as aV,ep as aW,eN as aX,tN as aY,DM as aZ,tu as a_,rF as aa,sF as ab,J$ as ac,Z$ as ad,tF as ae,YL as af,QL as ag,hC as ah,xL as ai,ap as aj,jM as ak,Yf as al,Ta as am,EB as an,XL as ao,Lu as ap,bL as aq,JL as ar,ZL as as,Bi as at,Ht as au,je as av,Ge as aw,Qs as ax,kt as ay,ro as az,dt as b,U as c,F as d,ve as e,Pf as f,B as g,uu as h,C as i,E as j,Be as k,Ze as l,te as m,ns as n,Gs as o,lt as p,q,V as r,Cn as s,yL as t,f as u,Yr as v,Ce as w,N as x,js as y,qo as z};
DesignScreenshot/output/test_run/homepage_after_login.html:97:`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const o=new this(t);return n.forEach(r=>o.set(r)),o}static accessor(t){const o=(this[lm]=this[lm]={accessors:{}}).accessors,r=this.prototype;function s(i){const a=pi(i);o[a]||(sR(r,i),o[a]=!0)}return W.isArray(t)?t.forEach(s):s(t),this}};gn.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);W.reduceDescriptors(gn.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(o){this[n]=o}}});W.freezeMethods(gn);function vc(e,t){const n=this||Aa,o=t||n,r=gn.from(o.headers);let s=o.data;return W.forEach(e,function(a){s=a.call(n,s,r.normalize(),t?t.status:void 0)}),r.normalize(),s}function e_(e){return!!(e&&e.__CANCEL__)}function ii(e,t,n){Ve.call(this,e??"canceled",Ve.ERR_CANCELED,t,n),this.name="CanceledError"}W.inherits(ii,Ve,{__CANCEL__:!0});function t_(e,t,n){const o=n.config.validateStatus;!n.status||!o||o(n.status)?e(n):t(new Ve("Request failed with status code "+n.status,[Ve.ERR_BAD_REQUEST,Ve.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function iR(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function aR(e,t){e=e||10;const n=new Array(e),o=new Array(e);let r=0,s=0,i;return t=t!==void 0?t:1e3,function(l){const u=Date.now(),c=o[s];i||(i=u),n[r]=l,o[r]=u;let d=s,p=0;for(;d!==r;)p+=n[d++],d=d%e;if(r=(r+1)%e,r===s&&(s=(s+1)%e),u-i<t)return;const h=c&&u-c;return h?Math.round(p*1e3/h):void 0}}function lR(e,t){let n=0,o=1e3/t,r,s;const i=(u,c=Date.now())=>{n=c,r=null,s&&(clearTimeout(s),s=null),e(...u)};return[(...u)=>{const c=Date.now(),d=c-n;d>=o?i(u,c):(r=u,s||(s=setTimeout(()=>{s=null,i(r)},o-d)))},()=>r&&i(r)]}const Bl=(e,t,n=3)=>{let o=0;const r=aR(50,250);return lR(s=>{const i=s.loaded,a=s.lengthComputable?s.total:void 0,l=i-o,u=r(l),c=i<=a;o=i;const d={loaded:i,total:a,progress:a?i/a:void 0,bytes:l,rate:u||void 0,estimated:u&&a&&c?(a-i)/u:void 0,event:s,lengthComputable:a!=null,[t?"download":"upload"]:!0};e(d)},n)},um=(e,t)=>{const n=e!=null;return[o=>t[0]({lengthComputable:n,total:e,loaded:o}),t[1]]},cm=e=>(...t)=>W.asap(()=>e(...t)),uR=Jt.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,Jt.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(Jt.origin),Jt.navigator&&/(msie|trident)/i.test(Jt.navigator.userAgent)):()=>!0,cR=Jt.hasStandardBrowserEnv?{write(e,t,n,o,r,s){const i=[e+"="+encodeURIComponent(t)];W.isNumber(n)&&i.push("expires="+new Date(n).toGMTString()),W.isString(o)&&i.push("path="+o),W.isString(r)&&i.push("domain="+r),s===!0&&i.push("secure"),document.cookie=i.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function dR(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function fR(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function n_(e,t,n){let o=!dR(t);return e&&(o||n==!1)?fR(e,t):t}const dm=e=>e instanceof gn?{...e}:e;function Zr(e,t){t=t||{};const n={};function o(u,c,d,p){return W.isPlainObject(u)&&W.isPlainObject(c)?W.merge.call({caseless:p},u,c):W.isPlainObject(c)?W.merge({},c):W.isArray(c)?c.slice():c}function r(u,c,d,p){if(W.isUndefined(c)){if(!W.isUndefined(u))return o(void 0,u,d,p)}else return o(u,c,d,p)}function s(u,c){if(!W.isUndefined(c))return o(void 0,c)}function i(u,c){if(W.isUndefined(c)){if(!W.isUndefined(u))return o(void 0,u)}else return o(void 0,c)}function a(u,c,d){if(d in t)return o(u,c);if(d in e)return o(void 0,u)}const l={url:s,method:s,data:s,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,responseEncoding:i,validateStatus:a,headers:(u,c,d)=>r(dm(u),dm(c),d,!0)};return W.forEach(Object.keys({...e,...t}),function(c){const d=l[c]||r,p=d(e[c],t[c],c);W.isUndefined(p)&&d!==a||(n[c]=p)}),n}const o_=e=>{const t=Zr({},e);let{data:n,withXSRFToken:o,xsrfHeaderName:r,xsrfCookieName:s,headers:i,auth:a}=t;t.headers=i=gn.from(i),t.url=Xb(n_(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),a&&i.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):"")));let l;if(W.isFormData(n)){if(Jt.hasStandardBrowserEnv||Jt.hasStandardBrowserWebWorkerEnv)i.setContentType(void 0);else if((l=i.getContentType())!==!1){const[u,...c]=l?l.split(";").map(d=>d.trim()).filter(Boolean):[];i.setContentType([u||"multipart/form-data",...c].join("; "))}}if(Jt.hasStandardBrowserEnv&&(o&&W.isFunction(o)&&(o=o(t)),o||o!==!1&&uR(t.url))){const u=r&&s&&cR.read(s);u&&i.set(r,u)}return t},pR=typeof XMLHttpRequest<"u",hR=pR&&function(e){return new Promise(function(n,o){const r=o_(e);let s=r.data;const i=gn.from(r.headers).normalize();let{responseType:a,onUploadProgress:l,onDownloadProgress:u}=r,c,d,p,h,m;function g(){h&&h(),m&&m(),r.cancelToken&&r.cancelToken.unsubscribe(c),r.signal&&r.signal.removeEventListener("abort",c)}let v=new XMLHttpRequest;v.open(r.method.toUpperCase(),r.url,!0),v.timeout=r.timeout;function y(){if(!v)return;const _=gn.from("getAllResponseHeaders"in v&&v.getAllResponseHeaders()),T={data:!a||a==="text"||a==="json"?v.responseText:v.response,status:v.status,statusText:v.statusText,headers:_,config:e,request:v};t_(function(D){n(D),g()},function(D){o(D),g()},T),v=null}"onloadend"in v?v.onloadend=y:v.onreadystatechange=function(){!v||v.readyState!==4||v.status===0&&!(v.responseURL&&v.responseURL.indexOf("file:")===0)||setTimeout(y)},v.onabort=function(){v&&(o(new Ve("Request aborted",Ve.ECONNABORTED,e,v)),v=null)},v.onerror=function(){o(new Ve("Network Error",Ve.ERR_NETWORK,e,v)),v=null},v.ontimeout=function(){let O=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const T=r.transitional||Jb;r.timeoutErrorMessage&&(O=r.timeoutErrorMessage),o(new Ve(O,T.clarifyTimeoutError?Ve.ETIMEDOUT:Ve.ECONNABORTED,e,v)),v=null},s===void 0&&i.setContentType(null),"setRequestHeader"in v&&W.forEach(i.toJSON(),function(O,T){v.setRequestHeader(T,O)}),W.isUndefined(r.withCredentials)||(v.withCredentials=!!r.withCredentials),a&&a!=="json"&&(v.responseType=r.responseType),u&&([p,m]=Bl(u,!0),v.addEventListener("progress",p)),l&&v.upload&&([d,h]=Bl(l),v.upload.addEventListener("progress",d),v.upload.addEventListener("loadend",h)),(r.cancelToken||r.signal)&&(c=_=>{v&&(o(!_||_.type?new ii(null,e,v):_),v.abort(),v=null)},r.cancelToken&&r.cancelToken.subscribe(c),r.signal&&(r.signal.aborted?c():r.signal.addEventListener("abort",c)));const b=iR(r.url);if(b&&Jt.protocols.indexOf(b)===-1){o(new Ve("Unsupported protocol "+b+":",Ve.ERR_BAD_REQUEST,e));return}v.send(s||null)})},mR=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let o=new AbortController,r;const s=function(u){if(!r){r=!0,a();const c=u instanceof Error?u:this.reason;o.abort(c instanceof Ve?c:new ii(c instanceof Error?c.message:c))}};let i=t&&setTimeout(()=>{i=null,s(new Ve(`timeout ${t} of ms exceeded`,Ve.ETIMEDOUT))},t);const a=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach(u=>{u.unsubscribe?u.unsubscribe(s):u.removeEventListener("abort",s)}),e=null)};e.forEach(u=>u.addEventListener("abort",s));const{signal:l}=o;return l.unsubscribe=()=>W.asap(a),l}},gR=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let o=0,r;for(;o<n;)r=o+t,yield e.slice(o,r),o=r},vR=async function*(e,t){for await(const n of yR(e))yield*gR(n,t)},yR=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:n,value:o}=await t.read();if(n)break;yield o}}finally{await t.cancel()}},fm=(e,t,n,o)=>{const r=vR(e,t);let s=0,i,a=l=>{i||(i=!0,o&&o(l))};return new ReadableStream({async pull(l){try{const{done:u,value:c}=await r.next();if(u){a(),l.close();return}let d=c.byteLength;if(n){let p=s+=d;n(p)}l.enqueue(new Uint8Array(c))}catch(u){throw a(u),u}},cancel(l){return a(l),r.return()}},{highWaterMark:2})},Ru=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",r_=Ru&&typeof ReadableStream=="function",bR=Ru&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),s_=(e,...t)=>{try{return!!e(...t)}catch{return!1}},_R=r_&&s_(()=>{let e=!1;const t=new Request(Jt.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),pm=64*1024,jd=r_&&s_(()=>W.isReadableStream(new Response("").body)),Ml={stream:jd&&(e=>e.body)};Ru&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!Ml[t]&&(Ml[t]=W.isFunction(e[t])?n=>n[t]():(n,o)=>{throw new Ve(`Response type '${t}' is not supported`,Ve.ERR_NOT_SUPPORT,o)})})})(new Response);const wR=async e=>{if(e==null)return 0;if(W.isBlob(e))return e.size;if(W.isSpecCompliantForm(e))return(await new Request(Jt.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(W.isArrayBufferView(e)||W.isArrayBuffer(e))return e.byteLength;if(W.isURLSearchParams(e)&&(e=e+""),W.isString(e))return(await bR(e)).byteLength},SR=async(e,t)=>{const n=W.toFiniteNumber(e.getContentLength());return n??wR(t)},CR=Ru&&(async e=>{let{url:t,method:n,data:o,signal:r,cancelToken:s,timeout:i,onDownloadProgress:a,onUploadProgress:l,responseType:u,headers:c,withCredentials:d="same-origin",fetchOptions:p}=o_(e);u=u?(u+"").toLowerCase():"text";let h=mR([r,s&&s.toAbortSignal()],i),m;const g=h&&h.unsubscribe&&(()=>{h.unsubscribe()});let v;try{if(l&&_R&&n!=="get"&&n!=="head"&&(v=await SR(c,o))!==0){let T=new Request(t,{method:"POST",body:o,duplex:"half"}),A;if(W.isFormData(o)&&(A=T.headers.get("content-type"))&&c.setContentType(A),T.body){const[D,P]=um(v,Bl(cm(l)));o=fm(T.body,pm,D,P)}}W.isString(d)||(d=d?"include":"omit");const y="credentials"in Request.prototype;m=new Request(t,{...p,signal:h,method:n.toUpperCase(),headers:c.normalize().toJSON(),body:o,duplex:"half",credentials:y?d:void 0});let b=await fetch(m,p);const _=jd&&(u==="stream"||u==="response");if(jd&&(a||_&&g)){const T={};["status","statusText","headers"].forEach(w=>{T[w]=b[w]});const A=W.toFiniteNumber(b.headers.get("content-length")),[D,P]=a&&um(A,Bl(cm(a),!0))||[];b=new Response(fm(b.body,pm,D,()=>{P&&P(),g&&g()}),T)}u=u||"text";let O=await Ml[W.findKey(Ml,u)||"text"](b,e);return!_&&g&&g(),await new Promise((T,A)=>{t_(T,A,{data:O,headers:gn.from(b.headers),status:b.status,statusText:b.statusText,config:e,request:m})})}catch(y){throw g&&g(),y&&y.name==="TypeError"&&/Load failed|fetch/i.test(y.message)?Object.assign(new Ve("Network Error",Ve.ERR_NETWORK,e,m),{cause:y.cause||y}):Ve.from(y,y&&y.code,e,m)}}),Vd={http:FD,xhr:hR,fetch:CR};W.forEach(Vd,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const hm=e=>`- ${e}`,xR=e=>W.isFunction(e)||e===null||e===!1,i_={getAdapter:e=>{e=W.isArray(e)?e:[e];const{length:t}=e;let n,o;const r={};for(let s=0;s<t;s++){n=e[s];let i;if(o=n,!xR(n)&&(o=Vd[(i=String(n)).toLowerCase()],o===void 0))throw new Ve(`Unknown adapter '${i}'`);if(o)break;r[i||"#"+s]=o}if(!o){const s=Object.entries(r).map(([a,l])=>`adapter ${a} `+(l===!1?"is not supported by the environment":"is not available in the build"));let i=t?s.length>1?`since :
DesignScreenshot/output/test_run/homepage_after_login.html:100:`+s):o.stack=s}catch{}}throw o}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Zr(this.defaults,n);const{transitional:o,paramsSerializer:r,headers:s}=n;o!==void 0&&ul.assertOptions(o,{silentJSONParsing:Jn.transitional(Jn.boolean),forcedJSONParsing:Jn.transitional(Jn.boolean),clarifyTimeoutError:Jn.transitional(Jn.boolean)},!1),r!=null&&(W.isFunction(r)?n.paramsSerializer={serialize:r}:ul.assertOptions(r,{encode:Jn.function,serialize:Jn.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),ul.assertOptions(n,{baseUrl:Jn.spelling("baseURL"),withXsrfToken:Jn.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let i=s&&W.merge(s.common,s[n.method]);s&&W.forEach(["delete","get","head","post","put","patch","common"],m=>{delete s[m]}),n.headers=gn.concat(i,s);const a=[];let l=!0;this.interceptors.request.forEach(function(g){typeof g.runWhen=="function"&&g.runWhen(n)===!1||(l=l&&g.synchronous,a.unshift(g.fulfilled,g.rejected))});const u=[];this.interceptors.response.forEach(function(g){u.push(g.fulfilled,g.rejected)});let c,d=0,p;if(!l){const m=[mm.bind(this),void 0];for(m.unshift(...a),m.push(...u),p=m.length,c=Promise.resolve(n);d<p;)c=c.then(m[d++],m[d++]);return c}p=a.length;let h=n;for(d=0;d<p;){const m=a[d++],g=a[d++];try{h=m(h)}catch(v){g.call(this,v);break}}try{c=mm.call(this,h)}catch(m){return Promise.reject(m)}for(d=0,p=u.length;d<p;)c=c.then(u[d++],u[d++]);return c}getUri(t){t=Zr(this.defaults,t);const n=n_(t.baseURL,t.url,t.allowAbsoluteUrls);return Xb(n,t.params,t.paramsSerializer)}};W.forEach(["delete","get","head","options"],function(t){Wr.prototype[t]=function(n,o){return this.request(Zr(o||{},{method:t,url:n,data:(o||{}).data}))}});W.forEach(["post","put","patch"],function(t){function n(o){return function(s,i,a){return this.request(Zr(a||{},{method:t,headers:o?{"Content-Type":"multipart/form-data"}:{},url:s,data:i}))}}Wr.prototype[t]=n(),Wr.prototype[t+"Form"]=n(!0)});let AR=class l_{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(s){n=s});const o=this;this.promise.then(r=>{if(!o._listeners)return;let s=o._listeners.length;for(;s-- >0;)o._listeners[s](r);o._listeners=null}),this.promise.then=r=>{let s;const i=new Promise(a=>{o.subscribe(a),s=a}).then(r);return i.cancel=function(){o.unsubscribe(s)},i},t(function(s,i,a){o.reason||(o.reason=new ii(s,i,a),n(o.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=o=>{t.abort(o)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new l_(function(r){t=r}),cancel:t}}};function OR(e){return function(n){return e.apply(null,n)}}function TR(e){return W.isObject(e)&&e.isAxiosError===!0}const Ud={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Ud).forEach(([e,t])=>{Ud[t]=e});function u_(e){const t=new Wr(e),n=Lb(Wr.prototype.request,t);return W.extend(n,Wr.prototype,t,{allOwnKeys:!0}),W.extend(n,t,null,{allOwnKeys:!0}),n.create=function(r){return u_(Zr(e,r))},n}const xt=u_(Aa);xt.Axios=Wr;xt.CanceledError=ii;xt.CancelToken=AR;xt.isCancel=e_;xt.VERSION=a_;xt.toFormData=Du;xt.AxiosError=Ve;xt.Cancel=xt.CanceledError;xt.all=function(t){return Promise.all(t)};xt.spread=OR;xt.isAxiosError=TR;xt.mergeConfig=Zr;xt.AxiosHeaders=gn;xt.formToJSON=e=>Zb(W.isHTMLForm(e)?new FormData(e):e);xt.getAdapter=i_.getAdapter;xt.HttpStatusCode=Ud;xt.default=xt;const{Axios:DL,AxiosError:RL,CanceledError:BL,isCancel:ML,CancelToken:qL,VERSION:$L,all:FL,Cancel:LL,isAxiosError:NL,spread:jL,toFormData:VL,AxiosHeaders:UL,HttpStatusCode:HL,formToJSON:zL,getAdapter:KL,mergeConfig:WL}=xt;let Hd=1;var PR=class{constructor(){Mt(this,"subscribers");Mt(this,"toasts");Mt(this,"dismissedToasts");Mt(this,"subscribe",e=>(this.subscribers.push(e),()=>{const t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}));Mt(this,"publish",e=>{this.subscribers.forEach(t=>t(e))});Mt(this,"addToast",e=>{this.publish(e),this.toasts=[...this.toasts,e]});Mt(this,"create",e=>{var i;const{message:t,...n}=e,o=typeof e.id=="number"||e.id&&((i=e.id)==null?void 0:i.length)>0?e.id:Hd++,r=this.toasts.find(a=>a.id===o),s=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(o)&&this.dismissedToasts.delete(o),r?this.toasts=this.toasts.map(a=>a.id===o?(this.publish({...a,...e,id:o,title:t}),{...a,...e,id:o,dismissible:s,title:t}):a):this.addToast({title:t,...n,dismissible:s,id:o}),o});Mt(this,"dismiss",e=>(e?(this.dismissedToasts.add(e),requestAnimationFrame(()=>this.subscribers.forEach(t=>t({id:e,dismiss:!0})))):this.toasts.forEach(t=>{this.subscribers.forEach(n=>n({id:t.id,dismiss:!0}))}),e));Mt(this,"message",(e,t)=>this.create({...t,message:e,type:"default"}));Mt(this,"error",(e,t)=>this.create({...t,type:"error",message:e}));Mt(this,"success",(e,t)=>this.create({...t,type:"success",message:e}));Mt(this,"info",(e,t)=>this.create({...t,type:"info",message:e}));Mt(this,"warning",(e,t)=>this.create({...t,type:"warning",message:e}));Mt(this,"loading",(e,t)=>this.create({...t,type:"loading",message:e}));Mt(this,"promise",(e,t)=>{if(!t)return;let n;t.loading!==void 0&&(n=this.create({...t,promise:e,type:"loading",message:t.loading,description:typeof t.description!="function"?t.description:void 0}));const o=Promise.resolve(e instanceof Function?e():e);let r=n!==void 0,s;const i=o.then(async l=>{if(s=["resolve",l],so(l))r=!1,this.create({id:n,type:"default",message:l});else if(IR(l)&&!l.ok){r=!1;const c=typeof t.error=="function"?await t.error(`HTTP error! status: ${l.status}`):t.error,d=typeof t.description=="function"?await t.description(`HTTP error! status: ${l.status}`):t.description,h=typeof c=="object"&&!so(c)?c:{message:c||"",id:n||""};this.create({id:n,type:"error",description:d,...h})}else if(l instanceof Error){r=!1;const c=typeof t.error=="function"?await t.error(l):t.error,d=typeof t.description=="function"?await t.description(l):t.description,h=typeof c=="object"&&!so(c)?c:{message:c||"",id:n||""};this.create({id:n,type:"error",description:d,...h})}else if(t.success!==void 0){r=!1;const c=typeof t.success=="function"?await t.success(l):t.success,d=typeof t.description=="function"?await t.description(l):t.description,h=typeof c=="object"&&!so(c)?c:{message:c||"",id:n||""};this.create({id:n,type:"success",description:d,...h})}}).catch(async l=>{if(s=["reject",l],t.error!==void 0){r=!1;const u=typeof t.error=="function"?await t.error(l):t.error,c=typeof t.description=="function"?await t.description(l):t.description,p=typeof u=="object"&&!so(u)?u:{message:u||"",id:n||""};this.create({id:n,type:"error",description:c,...p})}}).finally(()=>{var l;r&&(this.dismiss(n),n=void 0),(l=t.finally)==null||l.call(t)}),a=()=>new Promise((l,u)=>i.then(()=>s[0]==="reject"?u(s[1]):l(s[1])).catch(u));return typeof n!="string"&&typeof n!="number"?{unwrap:a}:Object.assign(n,{unwrap:a})});Mt(this,"custom",(e,t)=>{const n=(t==null?void 0:t.id)||Hd++;return this.publish({component:e,id:n,...t}),n});Mt(this,"getActiveToasts",()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)));this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}};const hn=new PR;function kR(e,t){const n=(t==null?void 0:t.id)||Hd++;return hn.create({message:e,id:n,type:"default",...t}),n}const IR=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",DR=kR,RR=()=>hn.toasts,BR=()=>hn.getActiveToasts(),Bi=Object.assign(DR,{success:hn.success,info:hn.info,warning:hn.warning,error:hn.error,custom:hn.custom,message:hn.message,promise:hn.promise,dismiss:hn.dismiss,loading:hn.loading},{getHistory:RR,getToasts:BR});function Wa(e){return e.label!==void 0}const MR=3,c_="24px",d_="16px",vm=4e3,qR=356,$R=14,FR=45,f_=200;function LR(){const e=N(!1);return ut(()=>{const t=()=>{e.value=document.hidden};return document.addEventListener("visibilitychange",t),()=>window.removeEventListener("visibilitychange",t)}),{isDocumentHidden:e}}function Go(...e){return e.filter(Boolean).join(" ")}function NR(e){const[t,n]=e.split("-"),o=[];return t&&o.push(t),n&&o.push(n),o}function jR(e,t){const n={};return[e,t].forEach((o,r)=>{const s=r===1,i=s?"--mobile-offset":"--offset",a=s?d_:c_;function l(u){["top","right","bottom","left"].forEach(c=>{n[`${i}-${c}`]=typeof u=="number"?`${u}px`:u})}typeof o=="number"||typeof o=="string"?l(o):typeof o=="object"?["top","right","bottom","left"].forEach(u=>{o[u]===void 0?n[`${i}-${u}`]=a:n[`${i}-${u}`]=typeof o[u]=="number"?`${o[u]}px`:o[u]}):l(a)}),n}const VR=["data-rich-colors","data-styled","data-mounted","data-promise","data-swiped","data-removed","data-visible","data-y-position","data-x-position","data-index","data-front","data-swiping","data-dismissible","data-type","data-invert","data-swipe-out","data-swipe-direction","data-expanded"],UR=["aria-label","data-disabled"];var HR=F({__name:"Toast",props:{toast:{},toasts:{},index:{},swipeDirections:{},expanded:{type:Boolean},invert:{type:Boolean},heights:{},gap:{},position:{},visibleToasts:{},expandByDefault:{type:Boolean},closeButton:{type:Boolean},interacting:{type:Boolean},style:{},cancelButtonStyle:{},actionButtonStyle:{},duration:{},class:{},unstyled:{type:Boolean},descriptionClass:{},loadingIcon:{},classes:{},icons:{},closeButtonAriaLabel:{},defaultRichColors:{type:Boolean}},emits:["update:heights","update:height","removeToast"],setup(e,{emit:t}){const n=e,o=t,r=N(null),s=N(null),i=N(!1),a=N(!1),l=N(!1),u=N(!1),c=N(!1),d=N(0),p=N(0),h=N(n.toast.duration||n.duration||vm),m=N(null),g=N(null),v=U(()=>n.index===0),y=U(()=>n.index+1<=n.visibleToasts),b=U(()=>n.toast.type),_=U(()=>n.toast.dismissible!==!1),O=U(()=>n.toast.class||""),T=U(()=>n.descriptionClass||""),A=U(()=>{const x=n.toast.position||n.position,H=n.heights.filter(X=>X.position===x).findIndex(X=>X.toastId===n.toast.id);return H>=0?H:0}),D=U(()=>{const x=n.toast.position||n.position;return n.heights.filter(H=>H.position===x).reduce((H,X,pe)=>pe>=A.value?H:H+X.height,0)}),P=U(()=>A.value*n.gap+D.value||0),w=U(()=>n.toast.closeButton??n.closeButton),k=U(()=>n.toast.duration||n.duration||vm),$=N(0),R=N(0),G=N(null),J=U(()=>n.position.split("-")),ne=U(()=>J.value[0]),ae=U(()=>J.value[1]),re=U(()=>typeof n.toast.title!="string"),L=U(()=>typeof n.toast.description!="string"),{isDocumentHidden:oe}=LR(),Y=U(()=>b.value&&b.value==="loading");je(()=>{i.value=!0,h.value=k.value}),ut(async()=>{if(!i.value||!g.value)return;await We();const x=g.value,z=x.style.height;x.style.height="auto";const H=x.getBoundingClientRect().height;x.style.height=z,p.value=H,o("update:height",{toastId:n.toast.id,height:H,position:n.toast.position||n.position})});function ee(){a.value=!0,d.value=P.value,setTimeout(()=>{o("removeToast",n.toast)},f_)}function le(){var x,z;if(Y.value||!_.value)return{};ee(),(z=(x=n.toast).onDismiss)==null||z.call(x,n.toast)}function ye(x){Y.value||!_.value||(m.value=new Date,d.value=P.value,x.target.setPointerCapture(x.pointerId),x.target.tagName!=="BUTTON"&&(l.value=!0,G.value={x:x.clientX,y:x.clientY}))}function me(){var S,I,j,K,Z,Q,ue;if(u.value||!_.value)return;G.value=null;const x=Number(((S=g.value)==null?void 0:S.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),z=Number(((I=g.value)==null?void 0:I.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),H=new Date().getTime()-(((j=m.value)==null?void 0:j.getTime())||0),X=r.value==="x"?x:z,pe=Math.abs(X)/H;if(Math.abs(X)>=FR||pe>.11){d.value=P.value,(Z=(K=n.toast).onDismiss)==null||Z.call(K,n.toast),r.value==="x"?s.value=x>0?"right":"left":s.value=z>0?"down":"up",ee(),u.value=!0;return}else(Q=g.value)==null||Q.style.setProperty("--swipe-amount-x","0px"),(ue=g.value)==null||ue.style.setProperty("--swipe-amount-y","0px");c.value=!1,l.value=!1,r.value=null}function Pe(x){var j,K,Z,Q;if(!G.value||!_.value||(((K=(j=window==null?void 0:window.getSelection())==null?void 0:j.toString())==null?void 0:K.length)??!1))return;const H=x.clientY-G.value.y,X=x.clientX-G.value.x,pe=n.swipeDirections??NR(n.position);!r.value&&(Math.abs(X)>1||Math.abs(H)>1)&&(r.value=Math.abs(X)>Math.abs(H)?"x":"y");let S={x:0,y:0};const I=ue=>1/(1.5+Math.abs(ue)/20);if(r.value==="y"){if(pe.includes("top")||pe.includes("bottom"))if(pe.includes("top")&&H<0||pe.includes("bottom")&&H>0)S.y=H;else{const ue=H*I(H);S.y=Math.abs(ue)<Math.abs(H)?ue:H}}else if(r.value==="x"&&(pe.includes("left")||pe.includes("right")))if(pe.includes("left")&&X<0||pe.includes("right")&&X>0)S.x=X;else{const ue=X*I(X);S.x=Math.abs(ue)<Math.abs(X)?ue:X}(Math.abs(S.x)>0||Math.abs(S.y)>0)&&(c.value=!0),(Z=g.value)==null||Z.style.setProperty("--swipe-amount-x",`${S.x}px`),(Q=g.value)==null||Q.style.setProperty("--swipe-amount-y",`${S.y}px`)}je(()=>{if(i.value=!0,!g.value)return;const x=g.value.getBoundingClientRect().height;p.value=x;const z=[{toastId:n.toast.id,height:x,position:n.toast.position},...n.heights];o("update:heights",z)}),Ys(()=>{g.value&&o("removeToast",n.toast)}),ut(x=>{if(n.toast.promise&&b.value==="loading"||n.toast.duration===1/0||n.toast.type==="loading")return;let z;const H=()=>{if(R.value<$.value){const pe=new Date().getTime()-$.value;h.value=h.value-pe}R.value=new Date().getTime()},X=()=>{h.value!==1/0&&($.value=new Date().getTime(),z=setTimeout(()=>{var pe,S;(S=(pe=n.toast).onAutoClose)==null||S.call(pe,n.toast),ee()},h.value))};n.expanded||n.interacting||oe.value?H():X(),x(()=>{clearTimeout(z)})}),Ce(()=>n.toast.delete,x=>{x!==void 0&&x&&ee()},{deep:!0});function Se(){l.value=!1,r.value=null,G.value=null}return(x,z)=>{var H,X,pe,S,I,j,K,Z,Q,ue,fe,de,se,xe,ge,Ee,ke,He,tt,Ye,At,mt,$t,Ft,yn,Cr,Bt;return C(),ie("li",{tabindex:"0",ref_key:"toastRef",ref:g,class:qe(f(Go)(n.class,O.value,(H=x.classes)==null?void 0:H.toast,(X=x.toast.classes)==null?void 0:X.toast,(pe=x.classes)==null?void 0:pe[b.value],(I=(S=x.toast)==null?void 0:S.classes)==null?void 0:I[b.value])),"data-sonner-toast":"","data-rich-colors":x.toast.richColors??x.defaultRichColors,"data-styled":!(x.toast.component||(j=x.toast)!=null&&j.unstyled||x.unstyled),"data-mounted":i.value,"data-promise":!!x.toast.promise,"data-swiped":c.value,"data-removed":a.value,"data-visible":y.value,"data-y-position":ne.value,"data-x-position":ae.value,"data-index":x.index,"data-front":v.value,"data-swiping":l.value,"data-dismissible":_.value,"data-type":b.value,"data-invert":x.toast.invert||x.invert,"data-swipe-out":u.value,"data-swipe-direction":s.value,"data-expanded":!!(x.expanded||x.expandByDefault&&i.value),style:Pt({"--index":x.index,"--toasts-before":x.index,"--z-index":x.toasts.length-x.index,"--offset":`${a.value?d.value:P.value}px`,"--initial-height":x.expandByDefault?"auto":`${p.value}px`,...x.style,...n.toast.style}),onDragend:Se,onPointerdown:ye,onPointerup:me,onPointermove:Pe},[w.value&&!x.toast.component&&b.value!=="loading"?(C(),ie("button",{key:0,"aria-label":x.closeButtonAriaLabel||"Close toast","data-disabled":Y.value,"data-close-button":"true",class:qe(f(Go)((K=x.classes)==null?void 0:K.closeButton,(Q=(Z=x.toast)==null?void 0:Z.classes)==null?void 0:Q.closeButton)),onClick:le},[(ue=x.icons)!=null&&ue.close?(C(),B(ro((fe=x.icons)==null?void 0:fe.close),{key:0})):V(x.$slots,"close-icon",{key:1})],10,UR)):Be("v-if",!0),x.toast.component?(C(),B(ro(x.toast.component),te({key:1},x.toast.componentProps,{onCloseToast:le}),null,16)):(C(),ie(Ie,{key:2},[b.value!=="default"||x.toast.icon||x.toast.promise?(C(),ie("div",{key:0,"data-icon":"",class:qe(f(Go)((de=x.classes)==null?void 0:de.icon,(xe=(se=x.toast)==null?void 0:se.classes)==null?void 0:xe.icon))},[x.toast.icon?(C(),B(ro(x.toast.icon),{key:0})):(C(),ie(Ie,{key:1},[b.value==="loading"?V(x.$slots,"loading-icon",{key:0}):b.value==="success"?V(x.$slots,"success-icon",{key:1}):b.value==="error"?V(x.$slots,"error-icon",{key:2}):b.value==="warning"?V(x.$slots,"warning-icon",{key:3}):b.value==="info"?V(x.$slots,"info-icon",{key:4}):Be("v-if",!0)],64))],2)):Be("v-if",!0),ce("div",{"data-content":"",class:qe(f(Go)((ge=x.classes)==null?void 0:ge.content,(ke=(Ee=x.toast)==null?void 0:Ee.classes)==null?void 0:ke.content))},[ce("div",{"data-title":"",class:qe(f(Go)((He=x.classes)==null?void 0:He.title,(tt=x.toast.classes)==null?void 0:tt.title))},[re.value?(C(),B(ro(x.toast.title),ct(te({key:0},x.toast.componentProps)),null,16)):(C(),ie(Ie,{key:1},[rt(Ne(x.toast.title),1)],64))],2),x.toast.description?(C(),ie("div",{key:0,"data-description":"",class:qe(f(Go)(x.descriptionClass,T.value,(Ye=x.classes)==null?void 0:Ye.description,(At=x.toast.classes)==null?void 0:At.description))},[L.value?(C(),B(ro(x.toast.description),ct(te({key:0},x.toast.componentProps)),null,16)):(C(),ie(Ie,{key:1},[rt(Ne(x.toast.description),1)],64))],2)):Be("v-if",!0)],2),x.toast.cancel?(C(),ie("button",{key:1,style:Pt(x.toast.cancelButtonStyle||x.cancelButtonStyle),class:qe(f(Go)((mt=x.classes)==null?void 0:mt.cancelButton,($t=x.toast.classes)==null?void 0:$t.cancelButton)),"data-button":"","data-cancel":"",onClick:z[0]||(z[0]=Lt=>{var Qn,Yn;f(Wa)(x.toast.cancel)&&_.value&&((Yn=(Qn=x.toast.cancel).onClick)==null||Yn.call(Qn,Lt),ee())})},Ne(f(Wa)(x.toast.cancel)?(Ft=x.toast.cancel)==null?void 0:Ft.label:x.toast.cancel),7)):Be("v-if",!0),x.toast.action?(C(),ie("button",{key:2,style:Pt(x.toast.actionButtonStyle||x.actionButtonStyle),class:qe(f(Go)((yn=x.classes)==null?void 0:yn.actionButton,(Cr=x.toast.classes)==null?void 0:Cr.actionButton)),"data-button":"","data-action":"",onClick:z[1]||(z[1]=Lt=>{var Qn,Yn;f(Wa)(x.toast.action)&&((Yn=(Qn=x.toast.action).onClick)==null||Yn.call(Qn,Lt),!Lt.defaultPrevented&&ee())})},Ne(f(Wa)(x.toast.action)?(Bt=x.toast.action)==null?void 0:Bt.label:x.toast.action),7)):Be("v-if",!0)],64))],46,VR)}}}),zR=HR,Oa=(e,t)=>{const n=e.__vccOpts||e;for(const[o,r]of t)n[o]=r;return n};const KR={},WR={xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stoke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"};function GR(e,t){return C(),ie("svg",WR,t[0]||(t[0]=[ce("line",{x1:"18",y1:"6",x2:"6",y2:"18"},null,-1),ce("line",{x1:"6",y1:"6",x2:"18",y2:"18"},null,-1)]))}var QR=Oa(KR,[["render",GR]]);const YR=["data-visible"],XR={class:"sonner-spinner"};var JR=F({__name:"Loader",props:{visible:{type:Boolean}},setup(e){const t=Array(12).fill(0);return(n,o)=>(C(),ie("div",{class:"sonner-loading-wrapper","data-visible":n.visible},[ce("div",XR,[(C(!0),ie(Ie,null,wt(f(t),r=>(C(),ie("div",{key:`spinner-bar-${r}`,class:"sonner-loading-bar"}))),128))])],8,YR))}}),ZR=JR;const eB={},tB={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"};function nB(e,t){return C(),ie("svg",tB,t[0]||(t[0]=[ce("path",{"fill-rule":"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z","clip-rule":"evenodd"},null,-1)]))}var oB=Oa(eB,[["render",nB]]);const rB={},sB={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"};function iB(e,t){return C(),ie("svg",sB,t[0]||(t[0]=[ce("path",{"fill-rule":"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z","clip-rule":"evenodd"},null,-1)]))}var aB=Oa(rB,[["render",iB]]);const lB={},uB={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"};function cB(e,t){return C(),ie("svg",uB,t[0]||(t[0]=[ce("path",{"fill-rule":"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z","clip-rule":"evenodd"},null,-1)]))}var dB=Oa(lB,[["render",cB]]);const fB={},pB={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"};function hB(e,t){return C(),ie("svg",pB,t[0]||(t[0]=[ce("path",{"fill-rule":"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z","clip-rule":"evenodd"},null,-1)]))}var mB=Oa(fB,[["render",hB]]);const gB=["aria-label"],vB=["data-sonner-theme","dir","data-theme","data-rich-colors","data-y-position","data-x-position","data-lifted"],yB=typeof window<"u"&&typeof document<"u";function bB(){if(typeof window>"u"||typeof document>"u")return"ltr";const e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}var _B=F({name:"Toaster",inheritAttrs:!1,__name:"Toaster",props:{invert:{type:Boolean,default:!1},theme:{default:"light"},position:{default:"bottom-right"},hotkey:{default:()=>["altKey","KeyT"]},richColors:{type:Boolean,default:!1},expand:{type:Boolean,default:!1},duration:{},gap:{default:$R},visibleToasts:{default:MR},closeButton:{type:Boolean,default:!1},toastOptions:{default:()=>({})},class:{default:""},style:{},offset:{default:c_},mobileOffset:{default:d_},dir:{default:"auto"},swipeDirections:{},icons:{},containerAriaLabel:{default:"Notifications"}},setup(e){const t=e,n=g0(),o=N([]);function r(w,k){return o.value.filter($=>!$.position&&k===0||$.position===w)}const s=U(()=>{const w=o.value.filter(k=>k.position).map(k=>k.position);return w.length>0?Array.from(new Set([t.position].concat(w))):[t.position]}),i=U(()=>{const w={};return s.value.forEach(k=>{w[k]=o.value.filter($=>$.position===k)}),w}),a=N([]),l=N(!1),u=N(!1),c=N(t.theme!=="system"?t.theme:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),d=N(null),p=N(null),h=N(!1),m=t.hotkey.join("+").replace(/Key/g,"").replace(/Digit/g,"");function g(w){var k;(k=o.value.find($=>$.id===w.id))!=null&&k.delete||hn.dismiss(w.id),o.value=o.value.filter(({id:$})=>$!==w.id),setTimeout(()=>{o.value.find($=>$.id===w.id)||(a.value=a.value.filter($=>$.toastId!==w.id))},f_+50)}function v(w){var k,$;h.value&&!(($=(k=w.currentTarget)==null?void 0:k.contains)!=null&&$.call(k,w.relatedTarget))&&(h.value=!1,p.value&&(p.value.focus({preventScroll:!0}),p.value=null))}function y(w){w.target instanceof HTMLElement&&w.target.dataset.dismissible==="false"||h.value||(h.value=!0,p.value=w.relatedTarget)}function b(w){w.target&&w.target instanceof HTMLElement&&w.target.dataset.dismissible==="false"||(u.value=!0)}ut(w=>{const k=hn.subscribe($=>{if($.dismiss){requestAnimationFrame(()=>{o.value=o.value.map(R=>R.id===$.id?{...R,delete:!0}:R)});return}We(()=>{const R=o.value.findIndex(G=>G.id===$.id);R!==-1?o.value=[...o.value.slice(0,R),{...o.value[R],...$},...o.value.slice(R+1)]:o.value=[$,...o.value]})});w(k)}),ut(w=>{if(typeof window>"u")return;if(t.theme!=="system"){c.value=t.theme;return}const k=window.matchMedia("(prefers-color-scheme: dark)"),$=G=>{c.value=G?"dark":"light"};$(k.matches);const R=G=>{$(G.matches)};try{k.addEventListener("change",R)}catch{k.addListener(R)}w(()=>{try{k.removeEventListener("change",R)}catch{k.removeListener(R)}})}),ut(()=>{d.value&&p.value&&(p.value.focus({preventScroll:!0}),p.value=null,h.value=!1)}),ut(()=>{o.value.length<=1&&(l.value=!1)}),ut(w=>{function k($){const R=t.hotkey.every(ne=>$[ne]||$.code===ne),G=Array.isArray(d.value)?d.value[0]:d.value;R&&(l.value=!0,G==null||G.focus());const J=document.activeElement===d.value||(G==null?void 0:G.contains(document.activeElement));$.code==="Escape"&&J&&(l.value=!1)}yB&&(document.addEventListener("keydown",k),w(()=>{document.removeEventListener("keydown",k)}))});function _(){l.value=!0}function O(){u.value||(l.value=!1)}function T(){l.value=!1}function A(){u.value=!1}function D(w){a.value=w}function P(w){const k=a.value.findIndex($=>$.toastId===w.toastId);if(k!==-1)a.value[k]=w;else{const $=a.value.findIndex(R=>R.position===w.position);$!==-1?a.value.splice($,0,w):a.value.unshift(w)}}return(w,k)=>(C(),ie(Ie,null,[Be(" Remove item from normal navigation flow, only available via hotkey "),ce("section",{"aria-label":`${w.containerAriaLabel} ${f(m)}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false"},[(C(!0),ie(Ie,null,wt(s.value,($,R)=>{var G;return C(),ie("ol",te({key:$,ref_for:!0,ref_key:"listRef",ref:d,"data-sonner-toaster":"","data-sonner-theme":c.value,class:t.class,dir:w.dir==="auto"?bB():w.dir,tabIndex:-1,"data-theme":w.theme,"data-rich-colors":w.richColors,"data-y-position":$.split("-")[0],"data-x-position":$.split("-")[1],"data-lifted":l.value&&o.value.length>1&&!w.expand,style:{"--front-toast-height":`${((G=a.value[0])==null?void 0:G.height)||0}px`,"--width":`${f(qR)}px`,"--gap":`${w.gap}px`,...w.style,...f(n).style,...f(jR)(w.offset,w.mobileOffset)}},w.$attrs,{onBlur:v,onFocus:y,onMouseenter:_,onMousemove:_,onMouseleave:O,onDragend:T,onPointerdown:b,onPointerup:A}),[(C(!0),ie(Ie,null,wt(r($,R),(J,ne)=>{var ae,re,L,oe,Y,ee,le,ye,me,Pe;return C(),B(zR,{key:J.id,heights:a.value,icons:w.icons,index:ne,toast:J,defaultRichColors:w.richColors,duration:((ae=w.toastOptions)==null?void 0:ae.duration)??w.duration,class:qe(((re=w.toastOptions)==null?void 0:re.class)??""),descriptionClass:(L=w.toastOptions)==null?void 0:L.descriptionClass,invert:w.invert,visibleToasts:w.visibleToasts,closeButton:((oe=w.toastOptions)==null?void 0:oe.closeButton)??w.closeButton,interacting:u.value,position:$,style:Pt((Y=w.toastOptions)==null?void 0:Y.style),unstyled:(ee=w.toastOptions)==null?void 0:ee.unstyled,classes:(le=w.toastOptions)==null?void 0:le.classes,cancelButtonStyle:(ye=w.toastOptions)==null?void 0:ye.cancelButtonStyle,actionButtonStyle:(me=w.toastOptions)==null?void 0:me.actionButtonStyle,"close-button-aria-label":(Pe=w.toastOptions)==null?void 0:Pe.closeButtonAriaLabel,toasts:i.value[$],expandByDefault:w.expand,gap:w.gap,expanded:l.value,swipeDirections:t.swipeDirections,"onUpdate:heights":D,"onUpdate:height":P,onRemoveToast:g},{"close-icon":E(()=>[V(w.$slots,"close-icon",{},()=>[q(QR)])]),"loading-icon":E(()=>[V(w.$slots,"loading-icon",{},()=>[q(ZR,{visible:J.type==="loading"},null,8,["visible"])])]),"success-icon":E(()=>[V(w.$slots,"success-icon",{},()=>[q(oB)])]),"error-icon":E(()=>[V(w.$slots,"error-icon",{},()=>[q(mB)])]),"warning-icon":E(()=>[V(w.$slots,"warning-icon",{},()=>[q(dB)])]),"info-icon":E(()=>[V(w.$slots,"info-icon",{},()=>[q(aB)])]),_:2},1032,["heights","icons","index","toast","defaultRichColors","duration","class","descriptionClass","invert","visibleToasts","closeButton","interacting","position","style","unstyled","classes","cancelButtonStyle","actionButtonStyle","close-button-aria-label","toasts","expandByDefault","gap","expanded","swipeDirections"])}),128))],16,vB)}),128))],8,gB)],2112))}}),wB=_B;const ko=xt.create({baseURL:"https://api.beenglish.eu.org/DesignScreenshot/admin-api",timeout:12e4,headers:{"Content-Type":"application/json"}});let bc=!1;const _c=[],SB=async()=>{try{const e=localStorage.getItem("refreshToken");if(!e)throw new Error("No refresh token found");const t=await xt.post(`/system/auth/refresh-token?refreshToken=${e}`),{token:n,refreshToken:o}=t.data;return localStorage.setItem("accessToken",n),localStorage.setItem("refreshToken",o),n}catch(e){return localStorage.removeItem("accessToken"),localStorage.removeItem("refreshToken"),window.location.href="/auth",Promise.reject(e)}};ko.interceptors.request.use(e=>{const t=localStorage.getItem("accessToken");return t&&e.headers&&(e.headers.Authorization=`Bearer ${t}`),e},e=>Promise.reject(e));ko.interceptors.response.use(async e=>{const{data:t,status:n}=e;if(n!==200)return Bi.error(t.msg||"请求失败"),Promise.reject(new Error(t.msg||"请求失败"));if(t.code===401){const o=e.config;if(!o._retry){if(bc)return new Promise(r=>{_c.push(s=>{o.headers&&(o.headers.Authorization=`Bearer ${s}`),r(ko(o))})});o._retry=!0,bc=!0;try{const r=await SB();return o.headers&&(o.headers.Authorization=`Bearer ${r}`),_c.forEach(s=>s(r)),_c.length=0,ko(o)}catch(r){return Promise.reject(r)}finally{bc=!1}}}return t.code===0?t.data:(Bi.error(t.msg||"请求失败"),Promise.reject(new Error(t.msg||"请求失败")))},e=>{const t=e.message||"网络错误";return Bi.error(t),Promise.reject(e)});const wr=(e,t)=>ko.get(e,{params:t}),Sr=(e,t,n)=>ko.post(e,t,n),p_=(e,t)=>ko.put(e,t),h_=(e,t)=>ko.delete(e,{params:t}),GL=(e,t)=>ko.post(e,t,{headers:{"Content-Type":"multipart/form-data"}}),CB=e=>wr("/admin/app/page",e),xB=e=>wr("/admin/app/get-app-details",{appId:e}),EB=e=>wr("/admin/app/list",e),QL=e=>Sr("/admin/app/create",e),YL=e=>p_("/admin/app/update",e),XL=e=>h_("/admin/app/delete",e),ep=Symbol("platform"),m_=bf("app",()=>{const e=N([]);return{apps:e,fetchApps:async n=>{const o=await EB({platform:n});e.value=o}}});/*!
DesignScreenshot/output/test_run/homepage_after_login.html:104:  */const ms=typeof document<"u";function g_(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function AB(e){return e.__esModule||e[Symbol.toStringTag]==="Module"||e.default&&g_(e.default)}const st=Object.assign;function wc(e,t){const n={};for(const o in t){const r=t[o];n[o]=Kn(r)?r.map(e):e(r)}return n}const Mi=()=>{},Kn=Array.isArray,v_=/#/g,OB=/&/g,TB=/\//g,PB=/=/g,kB=/\?/g,y_=/\+/g,IB=/%5B/g,DB=/%5D/g,b_=/%5E/g,RB=/%60/g,__=/%7B/g,BB=/%7C/g,w_=/%7D/g,MB=/%20/g;function tp(e){return encodeURI(""+e).replace(BB,"|").replace(IB,"[").replace(DB,"]")}function qB(e){return tp(e).replace(__,"{").replace(w_,"}").replace(b_,"^")}function zd(e){return tp(e).replace(y_,"%2B").replace(MB,"+").replace(v_,"%23").replace(OB,"%26").replace(RB,"`").replace(__,"{").replace(w_,"}").replace(b_,"^")}function $B(e){return zd(e).replace(PB,"%3D")}function FB(e){return tp(e).replace(v_,"%23").replace(kB,"%3F")}function LB(e){return e==null?"":FB(e).replace(TB,"%2F")}function ra(e){try{return decodeURIComponent(""+e)}catch{}return""+e}const NB=/\/$/,jB=e=>e.replace(NB,"");function Sc(e,t,n="/"){let o,r={},s="",i="";const a=t.indexOf("#");let l=t.indexOf("?");return a<l&&a>=0&&(l=-1),l>-1&&(o=t.slice(0,l),s=t.slice(l+1,a>-1?a:t.length),r=e(s)),a>-1&&(o=o||t.slice(0,a),i=t.slice(a,t.length)),o=zB(o??t,n),{fullPath:o+(s&&"?")+s+i,path:o,query:r,hash:ra(i)}}function VB(e,t){const n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}function ym(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function UB(e,t,n){const o=t.matched.length-1,r=n.matched.length-1;return o>-1&&o===r&&Hs(t.matched[o],n.matched[r])&&S_(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function Hs(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function S_(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(!HB(e[n],t[n]))return!1;return!0}function HB(e,t){return Kn(e)?bm(e,t):Kn(t)?bm(t,e):e===t}function bm(e,t){return Kn(t)?e.length===t.length&&e.every((n,o)=>n===t[o]):e.length===1&&e[0]===t}function zB(e,t){if(e.startsWith("/"))return e;if(!e)return t;const n=t.split("/"),o=e.split("/"),r=o[o.length-1];(r===".."||r===".")&&o.push("");let s=n.length-1,i,a;for(i=0;i<o.length;i++)if(a=o[i],a!==".")if(a==="..")s>1&&s--;else break;return n.slice(0,s).join("/")+"/"+o.slice(i).join("/")}const Qo={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0};var sa;(function(e){e.pop="pop",e.push="push"})(sa||(sa={}));var qi;(function(e){e.back="back",e.forward="forward",e.unknown=""})(qi||(qi={}));function KB(e){if(!e)if(ms){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),jB(e)}const WB=/^[^#]+#/;function GB(e,t){return e.replace(WB,"#")+t}function QB(e,t){const n=document.documentElement.getBoundingClientRect(),o=e.getBoundingClientRect();return{behavior:t.behavior,left:o.left-n.left-(t.left||0),top:o.top-n.top-(t.top||0)}}const Mu=()=>({left:window.scrollX,top:window.scrollY});function YB(e){let t;if("el"in e){const n=e.el,o=typeof n=="string"&&n.startsWith("#"),r=typeof n=="string"?o?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!r)return;t=QB(r,e)}else t=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left!=null?t.left:window.scrollX,t.top!=null?t.top:window.scrollY)}function _m(e,t){return(history.state?history.state.position-t:-1)+e}const Kd=new Map;function XB(e,t){Kd.set(e,t)}function JB(e){const t=Kd.get(e);return Kd.delete(e),t}let ZB=()=>location.protocol+"//"+location.host;function C_(e,t){const{pathname:n,search:o,hash:r}=t,s=e.indexOf("#");if(s>-1){let a=r.includes(e.slice(s))?e.slice(s).length:1,l=r.slice(a);return l[0]!=="/"&&(l="/"+l),ym(l,"")}return ym(n,e)+o+r}function eM(e,t,n,o){let r=[],s=[],i=null;const a=({state:p})=>{const h=C_(e,location),m=n.value,g=t.value;let v=0;if(p){if(n.value=h,t.value=p,i&&i===m){i=null;return}v=g?p.position-g.position:0}else o(h);r.forEach(y=>{y(n.value,m,{delta:v,type:sa.pop,direction:v?v>0?qi.forward:qi.back:qi.unknown})})};function l(){i=n.value}function u(p){r.push(p);const h=()=>{const m=r.indexOf(p);m>-1&&r.splice(m,1)};return s.push(h),h}function c(){const{history:p}=window;p.state&&p.replaceState(st({},p.state,{scroll:Mu()}),"")}function d(){for(const p of s)p();s=[],window.removeEventListener("popstate",a),window.removeEventListener("beforeunload",c)}return window.addEventListener("popstate",a),window.addEventListener("beforeunload",c,{passive:!0}),{pauseListeners:l,listen:u,destroy:d}}function wm(e,t,n,o=!1,r=!1){return{back:e,current:t,forward:n,replaced:o,position:window.history.length,scroll:r?Mu():null}}function tM(e){const{history:t,location:n}=window,o={value:C_(e,n)},r={value:t.state};r.value||s(o.value,{back:null,current:o.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function s(l,u,c){const d=e.indexOf("#"),p=d>-1?(n.host&&document.querySelector("base")?e:e.slice(d))+l:ZB()+e+l;try{t[c?"replaceState":"pushState"](u,"",p),r.value=u}catch(h){console.error(h),n[c?"replace":"assign"](p)}}function i(l,u){const c=st({},t.state,wm(r.value.back,l,r.value.forward,!0),u,{position:r.value.position});s(l,c,!0),o.value=l}function a(l,u){const c=st({},r.value,t.state,{forward:l,scroll:Mu()});s(c.current,c,!0);const d=st({},wm(o.value,l,null),{position:c.position+1},u);s(l,d,!1),o.value=l}return{location:o,state:r,push:a,replace:i}}function nM(e){e=KB(e);const t=tM(e),n=eM(e,t.state,t.location,t.replace);function o(s,i=!0){i||n.pauseListeners(),history.go(s)}const r=st({location:"",base:e,go:o,createHref:GB.bind(null,e)},t,n);return Object.defineProperty(r,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(r,"state",{enumerable:!0,get:()=>t.state.value}),r}function oM(e){return typeof e=="string"||e&&typeof e=="object"}function x_(e){return typeof e=="string"||typeof e=="symbol"}const E_=Symbol("");var Sm;(function(e){e[e.aborted=4]="aborted",e[e.cancelled=8]="cancelled",e[e.duplicated=16]="duplicated"})(Sm||(Sm={}));function zs(e,t){return st(new Error,{type:e,[E_]:!0},t)}function So(e,t){return e instanceof Error&&E_ in e&&(t==null||!!(e.type&t))}const Cm="[^/]+?",rM={sensitive:!1,strict:!1,start:!0,end:!0},sM=/[.+*?^${}()[\]/\\]/g;function iM(e,t){const n=st({},rM,t),o=[];let r=n.start?"^":"";const s=[];for(const u of e){const c=u.length?[]:[90];n.strict&&!u.length&&(r+="/");for(let d=0;d<u.length;d++){const p=u[d];let h=40+(n.sensitive?.25:0);if(p.type===0)d||(r+="/"),r+=p.value.replace(sM,"\\$&"),h+=40;else if(p.type===1){const{value:m,repeatable:g,optional:v,regexp:y}=p;s.push({name:m,repeatable:g,optional:v});const b=y||Cm;if(b!==Cm){h+=10;try{new RegExp(`(${b})`)}catch(O){throw new Error(`Invalid custom RegExp for param "${m}" (${b}): `+O.message)}}let _=g?`((?:${b})(?:/(?:${b}))*)`:`(${b})`;d||(_=v&&u.length<2?`(?:/${_})`:"/"+_),v&&(_+="?"),r+=_,h+=20,v&&(h+=-8),g&&(h+=-20),b===".*"&&(h+=-50)}c.push(h)}o.push(c)}if(n.strict&&n.end){const u=o.length-1;o[u][o[u].length-1]+=.7000000000000001}n.strict||(r+="/?"),n.end?r+="$":n.strict&&!r.endsWith("/")&&(r+="(?:/|$)");const i=new RegExp(r,n.sensitive?"":"i");function a(u){const c=u.match(i),d={};if(!c)return null;for(let p=1;p<c.length;p++){const h=c[p]||"",m=s[p-1];d[m.name]=h&&m.repeatable?h.split("/"):h}return d}function l(u){let c="",d=!1;for(const p of e){(!d||!c.endsWith("/"))&&(c+="/"),d=!1;for(const h of p)if(h.type===0)c+=h.value;else if(h.type===1){const{value:m,repeatable:g,optional:v}=h,y=m in u?u[m]:"";if(Kn(y)&&!g)throw new Error(`Provided param "${m}" is an array but it is not repeatable (* or + modifiers)`);const b=Kn(y)?y.join("/"):y;if(!b)if(v)p.length<2&&(c.endsWith("/")?c=c.slice(0,-1):d=!0);else throw new Error(`Missing required param "${m}"`);c+=b}}return c||"/"}return{re:i,score:o,keys:s,parse:a,stringify:l}}function aM(e,t){let n=0;for(;n<e.length&&n<t.length;){const o=t[n]-e[n];if(o)return o;n++}return e.length<t.length?e.length===1&&e[0]===80?-1:1:e.length>t.length?t.length===1&&t[0]===80?1:-1:0}function A_(e,t){let n=0;const o=e.score,r=t.score;for(;n<o.length&&n<r.length;){const s=aM(o[n],r[n]);if(s)return s;n++}if(Math.abs(r.length-o.length)===1){if(xm(o))return 1;if(xm(r))return-1}return r.length-o.length}function xm(e){const t=e[e.length-1];return e.length>0&&t[t.length-1]<0}const lM={type:0,value:""},uM=/[a-zA-Z0-9_]/;function cM(e){if(!e)return[[]];if(e==="/")return[[lM]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(h){throw new Error(`ERR (${n})/"${u}": ${h}`)}let n=0,o=n;const r=[];let s;function i(){s&&r.push(s),s=[]}let a=0,l,u="",c="";function d(){u&&(n===0?s.push({type:0,value:u}):n===1||n===2||n===3?(s.length>1&&(l==="*"||l==="+")&&t(`A repeatable param (${u}) must be alone in its segment. eg: '/:ids+.`),s.push({type:1,value:u,regexp:c,repeatable:l==="*"||l==="+",optional:l==="*"||l==="?"})):t("Invalid state to consume buffer"),u="")}function p(){u+=l}for(;a<e.length;){if(l=e[a++],l==="\\"&&n!==2){o=n,n=4;continue}switch(n){case 0:l==="/"?(u&&d(),i()):l===":"?(d(),n=1):p();break;case 4:p(),n=o;break;case 1:l==="("?n=2:uM.test(l)?p():(d(),n=0,l!=="*"&&l!=="?"&&l!=="+"&&a--);break;case 2:l===")"?c[c.length-1]=="\\"?c=c.slice(0,-1)+l:n=3:c+=l;break;case 3:d(),n=0,l!=="*"&&l!=="?"&&l!=="+"&&a--,c="";break;default:t("Unknown state");break}}return n===2&&t(`Unfinished custom RegExp for param "${u}"`),d(),i(),r}function dM(e,t,n){const o=iM(cM(e.path),n),r=st(o,{record:e,parent:t,children:[],alias:[]});return t&&!r.record.aliasOf==!t.record.aliasOf&&t.children.push(r),r}function fM(e,t){const n=[],o=new Map;t=Tm({strict:!1,end:!0,sensitive:!1},t);function r(d){return o.get(d)}function s(d,p,h){const m=!h,g=Am(d);g.aliasOf=h&&h.record;const v=Tm(t,d),y=[g];if("alias"in d){const O=typeof d.alias=="string"?[d.alias]:d.alias;for(const T of O)y.push(Am(st({},g,{components:h?h.record.components:g.components,path:T,aliasOf:h?h.record:g})))}let b,_;for(const O of y){const{path:T}=O;if(p&&T[0]!=="/"){const A=p.record.path,D=A[A.length-1]==="/"?"":"/";O.path=p.record.path+(T&&D+T)}if(b=dM(O,p,v),h?h.alias.push(b):(_=_||b,_!==b&&_.alias.push(b),m&&d.name&&!Om(b)&&i(d.name)),O_(b)&&l(b),g.children){const A=g.children;for(let D=0;D<A.length;D++)s(A[D],b,h&&h.children[D])}h=h||b}return _?()=>{i(_)}:Mi}function i(d){if(x_(d)){const p=o.get(d);p&&(o.delete(d),n.splice(n.indexOf(p),1),p.children.forEach(i),p.alias.forEach(i))}else{const p=n.indexOf(d);p>-1&&(n.splice(p,1),d.record.name&&o.delete(d.record.name),d.children.forEach(i),d.alias.forEach(i))}}function a(){return n}function l(d){const p=mM(d,n);n.splice(p,0,d),d.record.name&&!Om(d)&&o.set(d.record.name,d)}function u(d,p){let h,m={},g,v;if("name"in d&&d.name){if(h=o.get(d.name),!h)throw zs(1,{location:d});v=h.record.name,m=st(Em(p.params,h.keys.filter(_=>!_.optional).concat(h.parent?h.parent.keys.filter(_=>_.optional):[]).map(_=>_.name)),d.params&&Em(d.params,h.keys.map(_=>_.name))),g=h.stringify(m)}else if(d.path!=null)g=d.path,h=n.find(_=>_.re.test(g)),h&&(m=h.parse(g),v=h.record.name);else{if(h=p.name?o.get(p.name):n.find(_=>_.re.test(p.path)),!h)throw zs(1,{location:d,currentLocation:p});v=h.record.name,m=st({},p.params,d.params),g=h.stringify(m)}const y=[];let b=h;for(;b;)y.unshift(b.record),b=b.parent;return{name:v,path:g,params:m,matched:y,meta:hM(y)}}e.forEach(d=>s(d));function c(){n.length=0,o.clear()}return{addRoute:s,resolve:u,removeRoute:i,clearRoutes:c,getRoutes:a,getRecordMatcher:r}}function Em(e,t){const n={};for(const o of t)o in e&&(n[o]=e[o]);return n}function Am(e){const t={path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:e.aliasOf,beforeEnter:e.beforeEnter,props:pM(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in e?e.components||null:e.component&&{default:e.component}};return Object.defineProperty(t,"mods",{value:{}}),t}function pM(e){const t={},n=e.props||!1;if("component"in e)t.default=n;else for(const o in e.components)t[o]=typeof n=="object"?n[o]:n;return t}function Om(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function hM(e){return e.reduce((t,n)=>st(t,n.meta),{})}function Tm(e,t){const n={};for(const o in e)n[o]=o in t?t[o]:e[o];return n}function mM(e,t){let n=0,o=t.length;for(;n!==o;){const s=n+o>>1;A_(e,t[s])<0?o=s:n=s+1}const r=gM(e);return r&&(o=t.lastIndexOf(r,o-1)),o}function gM(e){let t=e;for(;t=t.parent;)if(O_(t)&&A_(e,t)===0)return t}function O_({record:e}){return!!(e.name||e.components&&Object.keys(e.components).length||e.redirect)}function vM(e){const t={};if(e===""||e==="?")return t;const o=(e[0]==="?"?e.slice(1):e).split("&");for(let r=0;r<o.length;++r){const s=o[r].replace(y_," "),i=s.indexOf("="),a=ra(i<0?s:s.slice(0,i)),l=i<0?null:ra(s.slice(i+1));if(a in t){let u=t[a];Kn(u)||(u=t[a]=[u]),u.push(l)}else t[a]=l}return t}function Pm(e){let t="";for(let n in e){const o=e[n];if(n=$B(n),o==null){o!==void 0&&(t+=(t.length?"&":"")+n);continue}(Kn(o)?o.map(s=>s&&zd(s)):[o&&zd(o)]).forEach(s=>{s!==void 0&&(t+=(t.length?"&":"")+n,s!=null&&(t+="="+s))})}return t}function yM(e){const t={};for(const n in e){const o=e[n];o!==void 0&&(t[n]=Kn(o)?o.map(r=>r==null?null:""+r):o==null?o:""+o)}return t}const bM=Symbol(""),km=Symbol(""),qu=Symbol(""),np=Symbol(""),Wd=Symbol("");function hi(){let e=[];function t(o){return e.push(o),()=>{const r=e.indexOf(o);r>-1&&e.splice(r,1)}}function n(){e=[]}return{add:t,list:()=>e.slice(),reset:n}}function or(e,t,n,o,r,s=i=>i()){const i=o&&(o.enterCallbacks[r]=o.enterCallbacks[r]||[]);return()=>new Promise((a,l)=>{const u=p=>{p===!1?l(zs(4,{from:n,to:t})):p instanceof Error?l(p):oM(p)?l(zs(2,{from:t,to:p})):(i&&o.enterCallbacks[r]===i&&typeof p=="function"&&i.push(p),a())},c=s(()=>e.call(o&&o.instances[r],t,n,u));let d=Promise.resolve(c);e.length<3&&(d=d.then(u)),d.catch(p=>l(p))})}function Cc(e,t,n,o,r=s=>s()){const s=[];for(const i of e)for(const a in i.components){let l=i.components[a];if(!(t!=="beforeRouteEnter"&&!i.instances[a]))if(g_(l)){const c=(l.__vccOpts||l)[t];c&&s.push(or(c,n,o,i,a,r))}else{let u=l();s.push(()=>u.then(c=>{if(!c)throw new Error(`Couldn't resolve component "${a}" at "${i.path}"`);const d=AB(c)?c.default:c;i.mods[a]=c,i.components[a]=d;const h=(d.__vccOpts||d)[t];return h&&or(h,n,o,i,a,r)()}))}}return s}function Im(e){const t=kt(qu),n=kt(np),o=U(()=>{const l=f(e.to);return t.resolve(l)}),r=U(()=>{const{matched:l}=o.value,{length:u}=l,c=l[u-1],d=n.matched;if(!c||!d.length)return-1;const p=d.findIndex(Hs.bind(null,c));if(p>-1)return p;const h=Dm(l[u-2]);return u>1&&Dm(c)===h&&d[d.length-1].path!==h?d.findIndex(Hs.bind(null,l[u-2])):p}),s=U(()=>r.value>-1&&xM(n.params,o.value.params)),i=U(()=>r.value>-1&&r.value===n.matched.length-1&&S_(n.params,o.value.params));function a(l={}){if(CM(l)){const u=t[f(e.replace)?"replace":"push"](f(e.to)).catch(Mi);return e.viewTransition&&typeof document<"u"&&"startViewTransition"in document&&document.startViewTransition(()=>u),u}return Promise.resolve()}return{route:o,href:U(()=>o.value.href),isActive:s,isExactActive:i,navigate:a}}function _M(e){return e.length===1?e[0]:e}const wM=F({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"},viewTransition:Boolean},useLink:Im,setup(e,{slots:t}){const n=Ht(Im(e)),{options:o}=kt(qu),r=U(()=>({[Rm(e.activeClass,o.linkActiveClass,"router-link-active")]:n.isActive,[Rm(e.exactActiveClass,o.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const s=t.default&&_M(t.default(n));return e.custom?s:un("a",{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:r.value},s)}}}),SM=wM;function CM(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget&&e.currentTarget.getAttribute){const t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function xM(e,t){for(const n in t){const o=t[n],r=e[n];if(typeof o=="string"){if(o!==r)return!1}else if(!Kn(r)||r.length!==o.length||o.some((s,i)=>s!==r[i]))return!1}return!0}function Dm(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const Rm=(e,t,n)=>e??t??n,EM=F({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){const o=kt(Wd),r=U(()=>e.route||o.value),s=kt(km,0),i=U(()=>{let u=f(s);const{matched:c}=r.value;let d;for(;(d=c[u])&&!d.components;)u++;return u}),a=U(()=>r.value.matched[i.value]);Nn(km,U(()=>i.value+1)),Nn(bM,a),Nn(Wd,r);const l=N();return Ce(()=>[l.value,a.value,e.name],([u,c,d],[p,h,m])=>{c&&(c.instances[d]=u,h&&h!==c&&u&&u===p&&(c.leaveGuards.size||(c.leaveGuards=h.leaveGuards),c.updateGuards.size||(c.updateGuards=h.updateGuards))),u&&c&&(!h||!Hs(c,h)||!p)&&(c.enterCallbacks[d]||[]).forEach(g=>g(u))},{flush:"post"}),()=>{const u=r.value,c=e.name,d=a.value,p=d&&d.components[c];if(!p)return Bm(n.default,{Component:p,route:u});const h=d.props[c],m=h?h===!0?u.params:typeof h=="function"?h(u):h:null,v=un(p,st({},m,t,{onVnodeUnmounted:y=>{y.component.isUnmounted&&(d.instances[c]=null)},ref:l}));return Bm(n.default,{Component:v,route:u})||v}}});function Bm(e,t){if(!e)return null;const n=e(t);return n.length===1?n[0]:n}const AM=EM;function OM(e){const t=fM(e.routes,e),n=e.parseQuery||vM,o=e.stringifyQuery||Pm,r=e.history,s=hi(),i=hi(),a=hi(),l=Cn(Qo);let u=Qo;ms&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const c=wc.bind(null,x=>""+x),d=wc.bind(null,LB),p=wc.bind(null,ra);function h(x,z){let H,X;return x_(x)?(H=t.getRecordMatcher(x),X=z):X=x,t.addRoute(X,H)}function m(x){const z=t.getRecordMatcher(x);z&&t.removeRoute(z)}function g(){return t.getRoutes().map(x=>x.record)}function v(x){return!!t.getRecordMatcher(x)}function y(x,z){if(z=st({},z||l.value),typeof x=="string"){const j=Sc(n,x,z.path),K=t.resolve({path:j.path},z),Z=r.createHref(j.fullPath);return st(j,K,{params:p(K.params),hash:ra(j.hash),redirectedFrom:void 0,href:Z})}let H;if(x.path!=null)H=st({},x,{path:Sc(n,x.path,z.path).path});else{const j=st({},x.params);for(const K in j)j[K]==null&&delete j[K];H=st({},x,{params:d(j)}),z.params=d(z.params)}const X=t.resolve(H,z),pe=x.hash||"";X.params=c(p(X.params));const S=VB(o,st({},x,{hash:qB(pe),path:X.path})),I=r.createHref(S);return st({fullPath:S,hash:pe,query:o===Pm?yM(x.query):x.query||{}},X,{redirectedFrom:void 0,href:I})}function b(x){return typeof x=="string"?Sc(n,x,l.value.path):st({},x)}function _(x,z){if(u!==x)return zs(8,{from:z,to:x})}function O(x){return D(x)}function T(x){return O(st(b(x),{replace:!0}))}function A(x){const z=x.matched[x.matched.length-1];if(z&&z.redirect){const{redirect:H}=z;let X=typeof H=="function"?H(x):H;return typeof X=="string"&&(X=X.includes("?")||X.includes("#")?X=b(X):{path:X},X.params={}),st({query:x.query,hash:x.hash,params:X.path!=null?{}:x.params},X)}}function D(x,z){const H=u=y(x),X=l.value,pe=x.state,S=x.force,I=x.replace===!0,j=A(H);if(j)return D(st(b(j),{state:typeof j=="object"?st({},pe,j.state):pe,force:S,replace:I}),z||H);const K=H;K.redirectedFrom=z;let Z;return!S&&UB(o,X,H)&&(Z=zs(16,{to:K,from:X}),ee(X,X,!0,!1)),(Z?Promise.resolve(Z):k(K,X)).catch(Q=>So(Q)?So(Q,2)?Q:Y(Q):L(Q,K,X)).then(Q=>{if(Q){if(So(Q,2))return D(st({replace:I},b(Q.to),{state:typeof Q.to=="object"?st({},pe,Q.to.state):pe,force:S}),z||K)}else Q=R(K,X,!0,I,pe);return $(K,X,Q),Q})}function P(x,z){const H=_(x,z);return H?Promise.reject(H):Promise.resolve()}function w(x){const z=me.values().next().value;return z&&typeof z.runWithContext=="function"?z.runWithContext(x):x()}function k(x,z){let H;const[X,pe,S]=TM(x,z);H=Cc(X.reverse(),"beforeRouteLeave",x,z);for(const j of X)j.leaveGuards.forEach(K=>{H.push(or(K,x,z))});const I=P.bind(null,x,z);return H.push(I),Se(H).then(()=>{H=[];for(const j of s.list())H.push(or(j,x,z));return H.push(I),Se(H)}).then(()=>{H=Cc(pe,"beforeRouteUpdate",x,z);for(const j of pe)j.updateGuards.forEach(K=>{H.push(or(K,x,z))});return H.push(I),Se(H)}).then(()=>{H=[];for(const j of S)if(j.beforeEnter)if(Kn(j.beforeEnter))for(const K of j.beforeEnter)H.push(or(K,x,z));else H.push(or(j.beforeEnter,x,z));return H.push(I),Se(H)}).then(()=>(x.matched.forEach(j=>j.enterCallbacks={}),H=Cc(S,"beforeRouteEnter",x,z,w),H.push(I),Se(H))).then(()=>{H=[];for(const j of i.list())H.push(or(j,x,z));return H.push(I),Se(H)}).catch(j=>So(j,8)?j:Promise.reject(j))}function $(x,z,H){a.list().forEach(X=>w(()=>X(x,z,H)))}function R(x,z,H,X,pe){const S=_(x,z);if(S)return S;const I=z===Qo,j=ms?history.state:{};H&&(X||I?r.replace(x.fullPath,st({scroll:I&&j&&j.scroll},pe)):r.push(x.fullPath,pe)),l.value=x,ee(x,z,H,I),Y()}let G;function J(){G||(G=r.listen((x,z,H)=>{if(!Pe.listening)return;const X=y(x),pe=A(X);if(pe){D(st(pe,{replace:!0,force:!0}),X).catch(Mi);return}u=X;const S=l.value;ms&&XB(_m(S.fullPath,H.delta),Mu()),k(X,S).catch(I=>So(I,12)?I:So(I,2)?(D(st(b(I.to),{force:!0}),X).then(j=>{So(j,20)&&!H.delta&&H.type===sa.pop&&r.go(-1,!1)}).catch(Mi),Promise.reject()):(H.delta&&r.go(-H.delta,!1),L(I,X,S))).then(I=>{I=I||R(X,S,!1),I&&(H.delta&&!So(I,8)?r.go(-H.delta,!1):H.type===sa.pop&&So(I,20)&&r.go(-1,!1)),$(X,S,I)}).catch(Mi)}))}let ne=hi(),ae=hi(),re;function L(x,z,H){Y(x);const X=ae.list();return X.length?X.forEach(pe=>pe(x,z,H)):console.error(x),Promise.reject(x)}function oe(){return re&&l.value!==Qo?Promise.resolve():new Promise((x,z)=>{ne.add([x,z])})}function Y(x){return re||(re=!x,J(),ne.list().forEach(([z,H])=>x?H(x):z()),ne.reset()),x}function ee(x,z,H,X){const{scrollBehavior:pe}=e;if(!ms||!pe)return Promise.resolve();const S=!H&&JB(_m(x.fullPath,0))||(X||!H)&&history.state&&history.state.scroll||null;return We().then(()=>pe(x,z,S)).then(I=>I&&YB(I)).catch(I=>L(I,x,z))}const le=x=>r.go(x);let ye;const me=new Set,Pe={currentRoute:l,listening:!0,addRoute:h,removeRoute:m,clearRoutes:t.clearRoutes,hasRoute:v,getRoutes:g,resolve:y,options:e,push:O,replace:T,go:le,back:()=>le(-1),forward:()=>le(1),beforeEach:s.add,beforeResolve:i.add,afterEach:a.add,onError:ae.add,isReady:oe,install(x){const z=this;x.component("RouterLink",SM),x.component("RouterView",AM),x.config.globalProperties.$router=z,Object.defineProperty(x.config.globalProperties,"$route",{enumerable:!0,get:()=>f(l)}),ms&&!ye&&l.value===Qo&&(ye=!0,O(r.location).catch(pe=>{}));const H={};for(const pe in Qo)Object.defineProperty(H,pe,{get:()=>l.value[pe],enumerable:!0});x.provide(qu,z),x.provide(np,Zl(H)),x.provide(Wd,l);const X=x.unmount;me.add(x),x.unmount=function(){me.delete(x),me.size<1&&(u=Qo,G&&G(),G=null,l.value=Qo,ye=!1,re=!1),X()}}};function Se(x){return x.reduce((z,H)=>z.then(()=>w(H)),Promise.resolve())}return Pe}function TM(e,t){const n=[],o=[],r=[],s=Math.max(t.matched.length,e.matched.length);for(let i=0;i<s;i++){const a=t.matched[i];a&&(e.matched.find(u=>Hs(u,a))?o.push(a):n.push(a));const l=e.matched[i];l&&(t.matched.find(u=>Hs(u,l))||r.push(l))}return[n,o,r]}function Ta(){return kt(qu)}function T_(e){return kt(np)}const PM={class:"w-full flex items-center justify-between"},kM={class:"text-gray-500"},IM=F({__name:"SearchDialog",props:{modelValue:{type:Boolean,default:!1},modelModifiers:{}},emits:["update:modelValue"],setup(e){const t=ts(e,"modelValue"),n=Ta(),o=N(""),r=kt(ep);U(()=>`在 ${(r==null?void 0:r.value)||"All Platforms"} 中搜索应用...`);const{apps:s}=va(m_()),i=U(()=>r!=null&&r.value?s.value.filter(l=>l.platform===r.value):[]),a=l=>{const{id:u,platform:c}=l;t.value=!1,n.push({path:"/details",query:{id:u,platform:c}})};return(l,u)=>{const c=JI,d=Yf,p=Rd;return C(),B(f(Fk),{open:t.value,"onUpdate:open":u[1]||(u[1]=h=>t.value=h)},{default:E(()=>[q(f(Ab),{modelValue:f(o),"onUpdate:modelValue":u[0]||(u[0]=h=>$e(o)?o.value=h:null),placeholder:"Type a command or search..."},null,8,["modelValue"]),q(f(Ob),{class:"h-100"},{default:E(()=>[q(f(Eb),null,{default:E(()=>[q(c,{title:"No apps found in this platform",description:"You can change the platform or search another app"})]),_:1}),q(p,{heading:"apps"},{default:E(()=>[(C(!0),ie(Ie,null,wt(f(i),h=>(C(),B(f(Dd),{value:h.name,key:h.id,onClick:m=>a(h)},{default:E(()=>[ce("div",PM,[q(d,{logo:h.appLogoUrl,name:h.name,description:h.appTagline??""},null,8,["logo","name","description"]),ce("span",kM,Ne(h.platform),1)])]),_:2},1032,["value","onClick"]))),128))]),_:1})]),_:1})]),_:1},8,["open"])}}}),Mm=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,qm=fb,DM=(e,t)=>n=>{var o;if((t==null?void 0:t.variants)==null)return qm(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:r,defaultVariants:s}=t,i=Object.keys(r).map(u=>{const c=n==null?void 0:n[u],d=s==null?void 0:s[u];if(c===null)return null;const p=Mm(c)||Mm(d);return r[u][p]}),a=n&&Object.entries(n).reduce((u,c)=>{let[d,p]=c;return p===void 0||(u[d]=p),u},{}),l=t==null||(o=t.compoundVariants)===null||o===void 0?void 0:o.reduce((u,c)=>{let{class:d,className:p,...h}=c;return Object.entries(h).every(m=>{let[g,v]=m;return Array.isArray(v)?v.includes({...s,...a}[g]):{...s,...a}[g]===v})?[...u,d,p]:u},[]);return qm(e,i,l,n==null?void 0:n.class,n==null?void 0:n.className)},vn=F({__name:"Button",props:{variant:{},size:{},class:{},asChild:{type:Boolean},as:{default:"button"}},setup(e){const t=e;return(n,o)=>(C(),B(f(Ae),{"data-slot":"button",as:n.as,"as-child":n.asChild,class:qe(f(Fe)(f(op)({variant:n.variant,size:n.size}),t.class))},{default:E(()=>[V(n.$slots,"default")]),_:3},8,["as","as-child","class"]))}}),op=DM("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-md font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive cursor-pointer",{variants:{variant:{default:"bg-primary text-primary-foreground shadow-xs hover:bg-primary/90",destructive:"bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-11 rounded-md px-6 has-[>svg]:px-4",icon:"size-9"}},defaultVariants:{variant:"default",size:"lg"}}),rp=F({__name:"Tabs",props:{defaultValue:{},orientation:{},dir:{},activationMode:{},modelValue:{},unmountOnHide:{type:Boolean},asChild:{type:Boolean},as:{},class:{}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,o=t,r=et(n,"class"),s=ft(r,o);return(i,a)=>(C(),B(f(vP),te({"data-slot":"tabs"},f(s),{class:f(Fe)("flex flex-col gap-2",n.class)}),{default:E(()=>[V(i.$slots,"default")]),_:3},16,["class"]))}}),sp=F({__name:"TabsList",props:{loop:{type:Boolean},asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,n=et(t,"class");return(o,r)=>(C(),B(f(wP),te({"data-slot":"tabs-list"},f(n),{class:f(Fe)("bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-lg p-[3px]",t.class)}),{default:E(()=>[V(o.$slots,"default")]),_:3},16,["class"]))}}),ip=F({__name:"TabsTrigger",props:{value:{},disabled:{type:Boolean},asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,n=et(t,"class"),o=Kt(n);return(r,s)=>(C(),B(f(CP),te({"data-slot":"tabs-trigger"},f(o),{class:f(Fe)("data-[state=active]:bg-background dark:data-[state=active]:text-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 text-foreground dark:text-muted-foreground inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-md font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 hover:bg-background hover:text-foreground cursor-pointer text-muted-foreground data-[state=active]:bg-transparent data-[state=active]:text-foreground data-[state=active]:shadow-none",t.class)}),{default:E(()=>[V(r.$slots,"default")]),_:3},16,["class"]))}}),JL=e=>Sr("/system/auth/login",e),ZL=e=>Sr("/system/auth/social-login",e),RM=()=>Sr("/system/auth/logout"),BM=()=>wr("/system/auth/get-user-info"),MM=F({__name:"Avatar",props:{class:{}},setup(e){const t=e;return(n,o)=>(C(),B(f(F1),{"data-slot":"avatar",class:qe(f(Fe)("relative flex size-8 shrink-0 overflow-hidden rounded-full",t.class))},{default:E(()=>[V(n.$slots,"default")]),_:3},8,["class"]))}}),qM=F({__name:"AvatarFallback",props:{delayMs:{},asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,n=et(t,"class");return(o,r)=>(C(),B(f(N1),te({"data-slot":"avatar-fallback"},f(n),{class:f(Fe)("bg-muted flex size-full items-center justify-center rounded-full",t.class)}),{default:E(()=>[V(o.$slots,"default")]),_:3},16,["class"]))}}),$M=F({__name:"AvatarImage",props:{src:{},referrerPolicy:{},crossOrigin:{},asChild:{type:Boolean},as:{}},setup(e){const t=e;return(n,o)=>(C(),B(f(U1),te({"data-slot":"avatar-image"},t,{class:"aspect-square size-full"}),{default:E(()=>[V(n.$slots,"default")]),_:3},16))}}),P_=F({__name:"DropdownMenu",props:{defaultOpen:{type:Boolean},open:{type:Boolean},dir:{},modal:{type:Boolean}},emits:["update:open"],setup(e,{emit:t}){const r=ft(e,t);return(s,i)=>(C(),B(f(BO),te({"data-slot":"dropdown-menu"},f(r)),{default:E(()=>[V(s.$slots,"default")]),_:3},16))}}),k_=F({__name:"DropdownMenuContent",props:{forceMount:{type:Boolean},loop:{type:Boolean},side:{},sideOffset:{default:4},sideFlip:{type:Boolean},align:{},alignOffset:{},alignFlip:{type:Boolean},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},positionStrategy:{},updatePositionStrategy:{},disableUpdateOnLayoutShift:{type:Boolean},prioritizePosition:{type:Boolean},reference:{},asChild:{type:Boolean},as:{},class:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","closeAutoFocus"],setup(e,{emit:t}){const n=e,o=t,r=et(n,"class"),s=ft(r,o);return(i,a)=>(C(),B(f(HO),null,{default:E(()=>[q(f(qO),te({"data-slot":"dropdown-menu-content"},f(s),{class:f(Fe)("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--reka-dropdown-menu-content-available-height) min-w-[8rem] origin-(--reka-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",n.class)}),{default:E(()=>[V(i.$slots,"default")]),_:3},16,["class"])]),_:3}))}}),FM=F({__name:"DropdownMenuGroup",props:{asChild:{type:Boolean},as:{}},setup(e){const t=e;return(n,o)=>(C(),B(f(FO),te({"data-slot":"dropdown-menu-group"},t),{default:E(()=>[V(n.$slots,"default")]),_:3},16))}}),Br=F({__name:"DropdownMenuItem",props:{disabled:{type:Boolean},textValue:{},asChild:{type:Boolean},as:{},class:{},inset:{type:Boolean},variant:{default:"default"}},setup(e){const t=e,n=et(t,"inset","variant","class"),o=Kt(n);return(r,s)=>(C(),B(f(NO),te({"data-slot":"dropdown-menu-item","data-inset":r.inset?"":void 0,"data-variant":r.variant},f(o),{class:f(Fe)("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive-foreground data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/40 data-[variant=destructive]:focus:text-destructive-foreground data-[variant=destructive]:*:[svg]:!text-destructive-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t.class)}),{default:E(()=>[V(r.$slots,"default")]),_:3},16,["data-inset","data-variant","class"]))}}),LM=F({__name:"DropdownMenuLabel",props:{asChild:{type:Boolean},as:{},class:{},inset:{type:Boolean}},setup(e){const t=e,n=et(t,"class","inset"),o=Kt(n);return(r,s)=>(C(),B(f(VO),te({"data-slot":"dropdown-menu-label","data-inset":r.inset?"":void 0},f(o),{class:f(Fe)("px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",t.class)}),{default:E(()=>[V(r.$slots,"default")]),_:3},16,["data-inset","class"]))}}),$m=F({__name:"DropdownMenuSeparator",props:{asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,n=et(t,"class");return(o,r)=>(C(),B(f(KO),te({"data-slot":"dropdown-menu-separator"},f(n),{class:f(Fe)("bg-border -mx-1 my-1 h-px",t.class)}),null,16,["class"]))}}),I_=F({__name:"DropdownMenuTrigger",props:{disabled:{type:Boolean},asChild:{type:Boolean},as:{}},setup(e){const n=Kt(e);return(o,r)=>(C(),B(f(GO),te({"data-slot":"dropdown-menu-trigger"},f(n)),{default:E(()=>[V(o.$slots,"default")]),_:3},16))}}),D_=bf("user",()=>{const e=N({avatar:"",nickname:"",username:""});return{userInfo:e,fetchUserInfo:async()=>{const n=await BM();e.value=n}}}),NM=F({__name:"UserAvatar",setup(e){const t=D_(),{userInfo:n}=va(t),o=Ta(),r=N([{to:"/apps",label:"我的App"},{to:"/favorites",label:"我的收藏"},{to:"/settings",label:"设置"}]),s=async()=>{try{await RM(),localStorage.removeItem("accessToken"),localStorage.removeItem("refreshToken"),console.log("Logout successful"),o.replace("/auth")}catch(i){console.error("Logout failed",i)}};return(i,a)=>{const l=pf("RouterLink");return C(),B(f(P_),{modal:!1},{default:E(()=>[q(f(I_),{"as-child":""},{default:E(()=>[q(f(MM),{class:"cursor-pointer"},{default:E(()=>[q(f($M),{src:f(n).avatar},null,8,["src"]),q(f(qM),null,{default:E(()=>{var u;return[rt(Ne(((u=f(n).nickname[0])==null?void 0:u.toUpperCase())||"U"),1)]}),_:1})]),_:1})]),_:1}),q(f(k_),{class:"w-48",align:"end","side-offset":8},{default:E(()=>[q(f(LM),null,{default:E(()=>a[0]||(a[0]=[rt("我的账户",-1)])),_:1,__:[0]}),q(f($m)),q(f(FM),null,{default:E(()=>[(C(!0),ie(Ie,null,wt(r.value,u=>(C(),B(f(Br),{key:u.to,"as-child":""},{default:E(()=>[q(l,{to:u.to,class:"cursor-pointer"},{default:E(()=>[rt(Ne(u.label),1)]),_:2},1032,["to"])]),_:2},1024))),128))]),_:1}),q(f($m)),q(f(Br),{class:"cursor-pointer",onClick:s},{default:E(()=>a[1]||(a[1]=[rt(" 退出登录 ",-1)])),_:1,__:[1]})]),_:1})]),_:1})}}}),jM=[{label:"ios",value:"ios",icon:"mdi:apple"},{label:"android",value:"android",icon:"mdi:android"},{label:"web",value:"web",icon:"mdi:web"}],Ks=[{label:"Apps",value:"appCategories",icon:"duo-icons:app",categoryType:0},{label:"Screens",value:"screenPatterns",icon:"simple-line-icons:screen-smartphone",categoryType:1},{label:"UI Elements",value:"screenElements",icon:"humbleicons:switch-on",categoryType:2},{label:"Flows",value:"flowActions",icon:"fluent:flow-32-regular",categoryType:3}],ql=[...Ks.slice(0,2),...Ks.slice(2)],VM={class:"grid grid-cols-3 gap-4 items-center fixed top-0 left-0 right-0 h-18 shrink-0 z-1 bg-background px-4 lg:px-20"},UM={class:"col-span-1 flex items-center h-full"},HM={class:"col-span-1 h-full flex items-center py-3"},zM={class:"col-span-1 h-full flex justify-end items-center"},KM=F({__name:"Header",props:{modelValue:{required:!0},modelModifiers:{}},emits:Un(["searchClick","platformClick"],["update:modelValue"]),setup(e,{emit:t}){const n=ts(e,"modelValue"),o=t,r=l=>({ios:"iOS",android:"Android",web:"Web"})[l]||l,s=U(()=>`在 ${r(n.value)} 上搜索...`),i=l=>{o("platformClick",l)},a=()=>{o("searchClick")};return(l,u)=>{const c=Ho;return C(),ie("div",VM,[ce("div",UM,[q(f(rp),{modelValue:n.value,"onUpdate:modelValue":u[0]||(u[0]=d=>n.value=d)},{default:E(()=>[q(f(sp),{class:"bg-transparent p-0"},{default:E(()=>[(C(!0),ie(Ie,null,wt(f(jM),d=>(C(),B(f(ip),{key:d.label,value:d.label,onClick:p=>i(d.value)},{default:E(()=>[q(c,{icon:d.icon,class:"h-4 w-4 mr-2"},null,8,["icon"]),rt(" "+Ne(r(d.value)),1)]),_:2},1032,["value","onClick"]))),128))]),_:1})]),_:1},8,["modelValue"])]),ce("div",HM,[q(f(vn),{variant:"outline",class:"w-full justify-start text-muted-foreground rounded-full cursor-pointer",onClick:a},{default:E(()=>[q(c,{icon:"lucide:search",class:"h-4 w-4 mr-2"}),rt(" "+Ne(s.value),1)]),_:1})]),ce("div",zM,[q(f(NM))])])}}}),WM=F({__name:"Sonner",props:{invert:{type:Boolean},theme:{},position:{},hotkey:{},richColors:{type:Boolean},expand:{type:Boolean},duration:{},gap:{},visibleToasts:{},closeButton:{type:Boolean},toastOptions:{},class:{},style:{},offset:{},mobileOffset:{},dir:{},swipeDirections:{},icons:{},containerAriaLabel:{}},setup(e){const t=e;return(n,o)=>(C(),B(f(wB),te({class:"toaster group"},t,{style:{"--normal-bg":"var(--popover)","--normal-text":"var(--popover-foreground)","--normal-border":"var(--border)"}}),null,16))}}),GM=()=>wr("/admin/app-category/list-all"),Gd=e=>{if(e===null||typeof e!="object")return e;if(e instanceof Date)return new Date(e.getTime());if(Array.isArray(e))return e.map(n=>Gd(n));const t={};for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=Gd(e[n]));return t},cl=(e,t,n)=>{const o=new Map,r=e.map(a=>{const l=Gd(a),u={...l,id:l[t.id],label:l[t.label],value:l[t.value],level:1,parentId:l[t.parentId]??null,expanded:!1};return o.set(u.id,u),u}),s=[];r.forEach(a=>{if(a.parentId!==null){const l=a.parentId!==void 0?o.get(a.parentId):void 0;l?(a.level=l.level+1,l.children||(l.children=[]),l.children.push(a)):s.push(a)}else s.push(a)});const i=a=>(n!=null&&n.order&&(a.sort((l,u)=>{const c=l[n.order],d=u[n.order];return typeof c=="number"&&typeof d=="number"?c-d:String(c).localeCompare(String(d))}),a.forEach(l=>{var u;(u=l.children)!=null&&u.length&&(l.children=i(l.children))})),a);return i(s)},Fm=(e,t)=>{const n=new Set(e),o=new Set(t);let r=0;for(const s of n)o.has(s)&&r++;return r},QM=(e,t={})=>{const{keepChildren:n=!1,keepLevel:o=!1,keepExpanded:r=!1}=t,s=[],i=(a,l=null)=>{(Array.isArray(a)?a:[a]).forEach(c=>{var p;const d={};Object.entries(c).forEach(([h,m])=>{["children","level","expanded","parentId","label"].includes(h)||(d[h]=m)}),n&&c.children&&(d.children=c.children),o&&(d.level=c.level),r&&c.expanded!==void 0&&(d.expanded=c.expanded),l!==null&&(d.parentId=l),s.push(d),(p=c.children)!=null&&p.length&&i(c.children,c.id)})};return i(e),s},$u=bf("definition",()=>{const e=N([]);return{definitions:e,fetchDefinitions:async()=>{const n=await GM();e.value=cl(n,{id:"id",label:"displayName",value:"id",parentId:"parentId"},{order:"orderNum"})}}}),YM=F({__name:"App",setup(e){const t=Ta(),n=T_(),{fetchDefinitions:o}=$u(),{fetchApps:r}=m_(),s=["auth","settings","chat"],i=N("ios");Nn(ep,U(()=>i.value));const a=()=>{c.value=!0},l=h=>{t.replace("/"),i.value=h,localStorage.setItem("platform",h)},u=()=>{const h=localStorage.getItem("platform");h?i.value=h:(i.value="ios",localStorage.setItem("platform","ios"))},c=N(!1),d=U(()=>!s.includes(n.name)),p=U(()=>n.name!=="chat");return je(()=>{u(),o(),r(i.value)}),(h,m)=>{const g=pf("RouterView"),v=IM;return C(),ie(Ie,null,[ce("div",{class:qe(["w-full max-w-[2000px] mx-auto relative h-full min-h-full",{"px-4 lg:px-20":f(p),"pt-18":f(d)}])},[f(d)?(C(),B(KM,{key:0,modelValue:f(i),"onUpdate:modelValue":m[0]||(m[0]=y=>$e(i)?i.value=y:null),onSearchClick:a,onPlatformClick:l},null,8,["modelValue"])):Be("",!0),q(g)],2),q(v,{modelValue:f(c),"onUpdate:modelValue":m[1]||(m[1]=y=>$e(c)?c.value=y:null)},null,8,["modelValue"]),q(f(WM),{position:"top-right",richColors:"",closeButton:""})],64)}}}),XM="modulepreload",JM=function(e){return"/"+e},Lm={},mi=function(t,n,o){let r=Promise.resolve();if(n&&n.length>0){let i=function(u){return Promise.all(u.map(c=>Promise.resolve(c).then(d=>({status:"fulfilled",value:d}),d=>({status:"rejected",reason:d}))))};document.getElementsByTagName("link");const a=document.querySelector("meta[property=csp-nonce]"),l=(a==null?void 0:a.nonce)||(a==null?void 0:a.getAttribute("nonce"));r=i(n.map(u=>{if(u=JM(u),u in Lm)return;Lm[u]=!0;const c=u.endsWith(".css"),d=c?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${u}"]${d}`))return;const p=document.createElement("link");if(p.rel=c?"stylesheet":XM,c||(p.as="script"),p.crossOrigin="",p.href=u,l&&p.setAttribute("nonce",l),document.head.appendChild(p),c)return new Promise((h,m)=>{p.addEventListener("load",h),p.addEventListener("error",()=>m(new Error(`Unable to preload CSS for ${u}`)))})}))}function s(i){const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=i,window.dispatchEvent(a),!a.defaultPrevented)throw i}return r.then(i=>{for(const a of i||[])a.status==="rejected"&&s(a.reason);return t().catch(s)})},ZM=F({__name:"AlertDialog",props:{open:{type:Boolean},defaultOpen:{type:Boolean}},emits:["update:open"],setup(e,{emit:t}){const r=ft(e,t);return(s,i)=>(C(),B(f(P1),te({"data-slot":"alert-dialog"},f(r)),{default:E(()=>[V(s.$slots,"default")]),_:3},16))}}),eq=F({__name:"AlertDialogAction",props:{asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,n=et(t,"class");return(o,r)=>(C(),B(f(m1),te(f(n),{class:f(Fe)(f(op)(),t.class)}),{default:E(()=>[V(o.$slots,"default")]),_:3},16,["class"]))}}),tq=F({__name:"AlertDialogCancel",props:{asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,n=et(t,"class");return(o,r)=>(C(),B(f(w1),te(f(n),{class:f(Fe)(f(op)({variant:"outline"}),"mt-2 sm:mt-0",t.class)}),{default:E(()=>[V(o.$slots,"default")]),_:3},16,["class"]))}}),nq=F({__name:"AlertDialogContent",props:{forceMount:{type:Boolean},disableOutsidePointerEvents:{type:Boolean},asChild:{type:Boolean},as:{},class:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(e,{emit:t}){const n=e,o=t,r=et(n,"class"),s=ft(r,o);return(i,a)=>(C(),B(f(O1),null,{default:E(()=>[q(f(E1),{"data-slot":"alert-dialog-overlay",class:"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/80"}),q(f(b1),te({"data-slot":"alert-dialog-content"},f(s),{class:f(Fe)("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",n.class)}),{default:E(()=>[V(i.$slots,"default")]),_:3},16,["class"])]),_:3}))}}),oq=F({__name:"AlertDialogDescription",props:{asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,n=et(t,"class");return(o,r)=>(C(),B(f(C1),te({"data-slot":"alert-dialog-description"},f(n),{class:f(Fe)("text-muted-foreground text-sm",t.class)}),{default:E(()=>[V(o.$slots,"default")]),_:3},16,["class"]))}}),rq=F({__name:"AlertDialogFooter",props:{class:{}},setup(e){const t=e;return(n,o)=>(C(),ie("div",{"data-slot":"alert-dialog-footer",class:qe(f(Fe)("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",t.class))},[V(n.$slots,"default")],2))}}),sq=F({__name:"AlertDialogHeader",props:{class:{}},setup(e){const t=e;return(n,o)=>(C(),ie("div",{"data-slot":"alert-dialog-header",class:qe(f(Fe)("flex flex-col gap-2 text-center sm:text-left",t.class))},[V(n.$slots,"default")],2))}}),iq=F({__name:"AlertDialogTitle",props:{asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,n=et(t,"class");return(o,r)=>(C(),B(f(I1),te({"data-slot":"alert-dialog-title"},f(n),{class:f(Fe)("text-lg font-semibold",t.class)}),{default:E(()=>[V(o.$slots,"default")]),_:3},16,["class"]))}}),aq=F({__name:"AlertDialogTrigger",props:{asChild:{type:Boolean},as:{}},setup(e){const t=e;return(n,o)=>(C(),B(f(R1),te({"data-slot":"alert-dialog-trigger"},t),{default:E(()=>[V(n.$slots,"default")]),_:3},16))}}),ap=F({__name:"AlertConfirm",props:Un({title:{},description:{default:""},cancelText:{default:"cancel"},actionText:{default:"confirm"}},{modelValue:{type:Boolean,required:!1},modelModifiers:{}}),emits:Un(["confirm"],["update:modelValue"]),setup(e,{expose:t,emit:n}){const o=n,r=ts(e,"modelValue"),s=()=>{o("confirm"),r.value=!1},i=()=>{r.value=!1};return t({open:()=>r.value=!0,close:()=>r.value=!1}),(a,l)=>(C(),B(f(ZM),{open:r.value,"onUpdate:open":l[0]||(l[0]=u=>r.value=u)},{default:E(()=>[q(f(aq),{"as-child":""},{default:E(()=>[V(a.$slots,"default")]),_:3}),q(f(nq),null,{default:E(()=>[q(f(sq),null,{default:E(()=>[q(f(iq),null,{default:E(()=>[rt(Ne(a.title),1)]),_:1}),q(f(oq),null,{default:E(()=>[rt(Ne(a.description),1)]),_:1})]),_:1}),q(f(rq),null,{default:E(()=>[q(f(tq),{onClick:i},{default:E(()=>[rt(Ne(a.cancelText),1)]),_:1}),q(f(eq),{onClick:s},{default:E(()=>[rt(Ne(a.actionText),1)]),_:1})]),_:1})]),_:1})]),_:3},8,["open"]))}}),R_=F({__name:"ScrollBar",props:{orientation:{default:"vertical"},forceMount:{type:Boolean},asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,n=et(t,"class");return(o,r)=>(C(),B(f(mT),te({"data-slot":"scroll-area-scrollbar"},f(n),{class:f(Fe)("flex touch-none p-px transition-colors select-none",o.orientation==="vertical"&&"h-full w-2.5 border-l border-l-transparent",o.orientation==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent",t.class)}),{default:E(()=>[q(f(_T),{"data-slot":"scroll-area-thumb",class:"bg-border relative flex-1 rounded-full"})]),_:1},16,["class"]))}}),lp=F({__name:"ScrollArea",props:{type:{},dir:{},scrollHideDelay:{},asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,n=et(t,"class");return(o,r)=>(C(),B(f(XO),te({"data-slot":"scroll-area"},f(n),{class:f(Fe)("relative",t.class)}),{default:E(()=>[q(f(ST),{"data-slot":"scroll-area-viewport",class:"focus-visible:ring-ring/50 size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:outline-1"},{default:E(()=>[V(o.$slots,"default")]),_:3}),q(R_),q(f(tT))]),_:3},16,["class"]))}}),lq=e=>Sr("/admin/favorite/create-app-favorite",{...e,favoriteType:1}),eN=e=>wr("/admin/app/page",{...e,type:2}),uq=e=>Sr("/admin/favorite-section/create",e),tN=e=>wr("/admin/app-section/get-favorite",e),xc=F({__name:"Tooltip",props:{defaultOpen:{type:Boolean},open:{type:Boolean},delayDuration:{},disableHoverableContent:{type:Boolean},disableClosingTrigger:{type:Boolean},disabled:{type:Boolean},ignoreNonKeyboardFocus:{type:Boolean}},emits:["update:open"],setup(e,{emit:t}){const r=ft(e,t);return(s,i)=>(C(),B(f(IP),te({"data-slot":"tooltip"},f(r)),{default:E(()=>[V(s.$slots,"default")]),_:3},16))}}),Ec=F({inheritAttrs:!1,__name:"TooltipContent",props:{forceMount:{type:Boolean},ariaLabel:{},asChild:{type:Boolean},as:{},side:{},sideOffset:{default:4},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},positionStrategy:{},updatePositionStrategy:{},class:{}},emits:["escapeKeyDown","pointerDownOutside"],setup(e,{emit:t}){const n=e,o=t,r=et(n,"class"),s=ft(r,o);return(i,a)=>(C(),B(f(FP),null,{default:E(()=>[q(f(qP),te({"data-slot":"tooltip-content"},{...f(s),...i.$attrs},{class:f(Fe)("bg-primary text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit rounded-md px-3 py-1.5 text-xs text-balance",n.class)}),{default:E(()=>[V(i.$slots,"default"),q(f(EP),{class:"bg-primary fill-primary z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]"})]),_:3},16,["class"])]),_:3}))}}),Ac=F({__name:"TooltipProvider",props:{delayDuration:{default:0},skipDelayDuration:{},disableHoverableContent:{type:Boolean},disableClosingTrigger:{type:Boolean},disabled:{type:Boolean},ignoreNonKeyboardFocus:{type:Boolean}},setup(e){const t=e;return(n,o)=>(C(),B(f(TP),ct(yt(t)),{default:E(()=>[V(n.$slots,"default")]),_:3},16))}}),Oc=F({__name:"TooltipTrigger",props:{reference:{},asChild:{type:Boolean},as:{}},setup(e){const t=e;return(n,o)=>(C(),B(f(NP),te({"data-slot":"tooltip-trigger"},t),{default:E(()=>[V(n.$slots,"default")]),_:3},16))}}),Tc=N(null);function cq(){return{copiedScreen:Tc,copyScreen:n=>{Tc.value=JSON.parse(JSON.stringify(n))},clearClipboard:()=>{Tc.value=null}}}var dq=Object.defineProperty,$l=Object.getOwnPropertySymbols,B_=Object.prototype.hasOwnProperty,M_=Object.prototype.propertyIsEnumerable,Nm=(e,t,n)=>t in e?dq(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,vs=(e,t)=>{for(var n in t||(t={}))B_.call(t,n)&&Nm(e,n,t[n]);if($l)for(var n of $l(t))M_.call(t,n)&&Nm(e,n,t[n]);return e},q_=(e,t)=>{var n={};for(var o in e)B_.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&$l)for(var o of $l(e))t.indexOf(o)<0&&M_.call(e,o)&&(n[o]=e[o]);return n};const $_="[vue-draggable-plus]: ";function fq(e){console.warn($_+e)}function pq(e){console.error($_+e)}function jm(e,t,n){return n>=0&&n<e.length&&e.splice(n,0,e.splice(t,1)[0]),e}function hq(e){return e.replace(/-(\w)/g,(t,n)=>n?n.toUpperCase():"")}function mq(e){return Object.keys(e).reduce((t,n)=>(typeof e[n]<"u"&&(t[hq(n)]=e[n]),t),{})}function Vm(e,t){return Array.isArray(e)&&e.splice(t,1),e}function Um(e,t,n){return Array.isArray(e)&&e.splice(t,0,n),e}function gq(e){return typeof e>"u"}function vq(e){return typeof e=="string"}function Hm(e,t,n){const o=e.children[n];e.insertBefore(t,o)}function Pc(e){e.parentNode&&e.parentNode.removeChild(e)}function yq(e,t=document){var n;let o=null;return typeof(t==null?void 0:t.querySelector)=="function"?o=(n=t==null?void 0:t.querySelector)==null?void 0:n.call(t,e):o=document.querySelector(e),o||fq(`Element not found: ${e}`),o}function bq(e,t,n=null){return function(...o){return e.apply(n,o),t.apply(n,o)}}function _q(e,t){const n=vs({},e);return Object.keys(t).forEach(o=>{n[o]?n[o]=bq(e[o],t[o]):n[o]=t[o]}),n}function wq(e){return e instanceof HTMLElement}function zm(e,t){Object.keys(e).forEach(n=>{t(n,e[n])})}function Sq(e){return e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97)}const Cq=Object.assign;/**!
DesignScreenshot/output/test_run/homepage_after_login.html:110:              transform 0.3s ease-out`}},[q(m,{variant:"outline",class:"rounded-full",border:!1,onClick:d[0]||(d[0]=Ze(v=>c.$emit("save",c.id),["stop"]))},{default:E(()=>d[2]||(d[2]=[rt(" save ",-1)])),_:1,__:[2]}),q(m,{class:"rounded-full",border:!1,onClick:d[1]||(d[1]=Ze(v=>c.$emit("copy",c.id),["stop"]))},{default:E(()=>d[3]||(d[3]=[rt(" copy ",-1)])),_:1,__:[3]})],2)],2)]),c.name||c.logo?(C(),B(g,{key:0,name:c.name,logo:c.logo,class:"flex-shrink-0 relative z-30 mt-1"},null,8,["name","logo"])):Be("",!0)],2)}}}),og=F({__name:"Checkbox",props:{defaultValue:{type:[Boolean,String]},modelValue:{type:[Boolean,String,null]},disabled:{type:Boolean},value:{},id:{},asChild:{type:Boolean},as:{},name:{},required:{type:Boolean},class:{}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,o=t,r=et(n,"class"),s=ft(r,o);return(i,a)=>(C(),B(f(iE),te({"data-slot":"checkbox"},f(s),{class:f(Fe)("peer border-input data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",n.class)}),{default:E(()=>[q(f(lE),{"data-slot":"checkbox-indicator",class:"flex items-center justify-center text-current transition-none"},{default:E(()=>[V(i.$slots,"default",{},()=>[q(f(xb),{class:"size-3.5"})])]),_:3})]),_:3},16,["class"]))}}),P$=F({__name:"Popover",props:{defaultOpen:{type:Boolean},open:{type:Boolean},modal:{type:Boolean}},emits:["update:open"],setup(e,{emit:t}){const r=ft(e,t);return(s,i)=>(C(),B(f(_O),te({"data-slot":"popover"},f(r)),{default:E(()=>[V(s.$slots,"default")]),_:3},16))}}),k$=F({inheritAttrs:!1,__name:"PopoverContent",props:{forceMount:{type:Boolean},side:{},sideOffset:{default:4},sideFlip:{type:Boolean},align:{default:"center"},alignOffset:{},alignFlip:{type:Boolean},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},positionStrategy:{},updatePositionStrategy:{},disableUpdateOnLayoutShift:{type:Boolean},prioritizePosition:{type:Boolean},reference:{},asChild:{type:Boolean},as:{},disableOutsidePointerEvents:{type:Boolean},class:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(e,{emit:t}){const n=e,o=t,r=et(n,"class"),s=ft(r,o);return(i,a)=>(C(),B(f(PO),null,{default:E(()=>[q(f(OO),te({"data-slot":"popover-content"},{...f(s),...i.$attrs},{class:f(Fe)("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 rounded-md border p-4 shadow-md origin-(--reka-popover-content-transform-origin) outline-hidden",n.class)}),{default:E(()=>[V(i.$slots,"default")]),_:3},16,["class"])]),_:3}))}}),I$=F({__name:"PopoverTrigger",props:{asChild:{type:Boolean},as:{}},setup(e){const t=e;return(n,o)=>(C(),B(f(IO),te({"data-slot":"popover-trigger"},t),{default:E(()=>[V(n.$slots,"default")]),_:3},16))}}),D$={class:"truncate text-left"},R$={key:0,class:"ml-1.5 font-normal text-xs px-1.5 py-0.5 bg-background/20 rounded-full"},B$={key:0,class:"text-xs mt-1 text-muted-foreground"},M$=["for"],q$=["for"],$$=F({__name:"Dropdown",props:{defaultLabel:{},data:{},selectionMode:{default:"single"},placement:{default:"center"},searchable:{type:Boolean,default:!0}},emits:["change"],setup(e,{expose:t,emit:n}){const o=n,r=N(!1),s=N(""),i=N([]),a=U(()=>!e.data||e.data.length===0||e.data.every(h=>!h.children||h.children.length===0)),l=U(()=>{var h;return((h=e.data)==null?void 0:h.flatMap(m=>m.children??[]))??[]}),u=U(()=>l.value.filter(h=>i.value.includes(h.id))),c=U(()=>{if(!e.data)return[];const h=s.value.toLowerCase();return e.data.map(m=>{var v;const g=(v=m.children)==null?void 0:v.filter(y=>{const b=i.value.includes(y.id),_=y.label.toLowerCase().includes(h);return h?_:!b});return g&&g.length>0?{...m,children:g}:null}).filter(m=>m!==null)}),d=h=>{if(e.selectionMode==="single")i.value=i.value[0]===h?[]:[h],r.value=!1;else{const m=[...i.value],g=m.indexOf(h);g>-1?m.splice(g,1):m.push(h),i.value=m}},p=()=>{i.value=[],s.value=""};return Ce(u,h=>{o("change",h)},{deep:!0}),t({clear:p}),(h,m)=>(C(),B(f(P$),{open:f(r),"onUpdate:open":m[1]||(m[1]=g=>$e(r)?r.value=g:null)},{default:E(()=>[q(f(I$),{"as-child":""},{default:E(()=>[q(f(vn),{variant:f(u).length>0?"default":"outline",role:"combobox","aria-expanded":f(r),class:"h-11 justify-between px-4 font-semibold rounded-full transition-colors duration-200"},{default:E(()=>{var g;return[ce("span",D$,[f(u).length===0?(C(),ie(Ie,{key:0},[rt(Ne(h.defaultLabel),1)],64)):(C(),ie(Ie,{key:1},[rt(Ne((g=f(u)[0])==null?void 0:g.label)+" ",1),h.selectionMode==="multiple"&&f(u).length>1?(C(),ie("span",R$," +"+Ne(f(u).length-1),1)):Be("",!0)],64))]),f(u).length>0?(C(),B(f(Pk),{key:0,class:"ml-2 h-4 w-4 shrink-0 opacity-50",onClick:Ze(p,["stop","prevent"])})):(C(),B(f(Kf),{key:1,class:qe(["ml-2 h-4 w-4 shrink-0 opacity-50 transition-transform",{"rotate-180":f(r)}])},null,8,["class"]))]}),_:1},8,["variant","aria-expanded"])]),_:1}),q(f(k$),{class:"w-80 p-0",align:h.placement},{default:E(()=>[q(f(Cb),{class:"max-h-[480px] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md"},{default:E(()=>[h.searchable?(C(),B(f(Ab),{key:0,modelValue:f(s),"onUpdate:modelValue":m[0]||(m[0]=g=>$e(s)?s.value=g:null),placeholder:"搜索...",class:"h-10 w-full rounded-none border-0 border-b focus-visible:ring-0 focus-visible:ring-offset-0"},null,8,["modelValue"])):Be("",!0),q(f(Ob),{class:"flex-1 overflow-y-auto overscroll-contain custom-scrollbar"},{default:E(()=>[q(f(Eb),{class:"py-6 text-center text-sm"},{default:E(()=>[ce("p",null,Ne(f(a)?"暂无数据":"未找到结果"),1),f(a)?Be("",!0):(C(),ie("p",B$,"请尝试其他关键词"))]),_:1}),f(u).length>0&&f(s)===""?(C(),B(f(Rd),{key:0,heading:"已选"},{default:E(()=>[(C(!0),ie(Ie,null,wt(f(u),g=>(C(),B(f(Dd),{key:`selected-${g.id}`,value:g.label,onSelect:Ze(v=>d(g.id),["prevent"]),class:"cursor-pointer"},{default:E(()=>[q(f(og),{id:`selected-${g.id}`,"model-value":!0,class:"mr-2"},null,8,["id"]),ce("label",{for:`selected-${g.id}`,class:"cursor-pointer"},Ne(g.label),9,M$)]),_:2},1032,["value","onSelect"]))),128))]),_:1})):Be("",!0),(C(!0),ie(Ie,null,wt(f(c),g=>(C(),B(f(Rd),{key:g.label,heading:g.label},{default:E(()=>[(C(!0),ie(Ie,null,wt(g.children,v=>(C(),B(f(Dd),{key:v.id,value:v.label,onSelect:Ze(y=>d(v.id),["prevent"]),class:"cursor-pointer"},{default:E(()=>[q(f(og),{id:v.id,"model-value":f(i).includes(v.id),class:"mr-2"},null,8,["id","model-value"]),ce("label",{for:v.id,class:"cursor-pointer"},Ne(v.label),9,q$)]),_:2},1032,["value","onSelect"]))),128))]),_:2},1032,["heading"]))),128))]),_:1})]),_:1})]),_:1},8,["align"])]),_:1},8,["open"]))}}),gl=Lu($$,[["__scopeId","data-v-cce68d8f"]]),F$={class:"flex flex-col gap-6"},L$={class:"flex gap-8"},N$={class:"w-24 h-24"},j$={class:"flex-1 flex items-center"},V$={class:"text-5xl font-semibold text-primary"},U$={class:"flex gap-8"},H$={class:"flex flex-col gap-1"},z$={class:"text-sm font-semibold text-primary text-center"},K$={class:"flex flex-col gap-1"},W$={class:"text-sm font-semibold text-primary text-center"},G$=F({__name:"StoreAppCard",props:{logoUrl:{},name:{},description:{},platform:{},rating:{},categories:{}},emits:["click"],setup(e,{emit:t}){return(n,o)=>{var s;const r=ri;return C(),ie("div",F$,[ce("div",L$,[ce("div",N$,[q(r,{src:n.logoUrl,class:"rounded-3xl"},null,8,["src"])]),ce("div",j$,[ce("span",V$,Ne(n.name)+"—"+Ne(n.description),1)])]),ce("div",U$,[ce("div",H$,[o[0]||(o[0]=ce("span",{class:"text-sm text-textSecondary"},"Platform",-1)),ce("span",z$,Ne(n.platform),1)]),ce("div",K$,[o[1]||(o[1]=ce("span",{class:"text-sm text-textSecondary"},"Category",-1)),ce("span",W$,Ne((s=n.categories)==null?void 0:s.join(", ")),1)])])])}}}),Q$=e=>Sr("/admin/app-info/create",e),Y$=e=>wr("/admin/screen/page",e),X$=F({__name:"Select",props:{open:{type:Boolean},defaultOpen:{type:Boolean},defaultValue:{},modelValue:{},by:{type:[String,Function]},dir:{},multiple:{type:Boolean},autocomplete:{},disabled:{type:Boolean},name:{},required:{type:Boolean}},emits:["update:modelValue","update:open"],setup(e,{emit:t}){const r=ft(e,t);return(s,i)=>(C(),B(f(kT),te({"data-slot":"select"},f(r)),{default:E(()=>[V(s.$slots,"default")]),_:3},16))}}),J$=F({inheritAttrs:!1,__name:"SelectContent",props:{forceMount:{type:Boolean},position:{default:"popper"},bodyLock:{type:Boolean},side:{},sideOffset:{},sideFlip:{type:Boolean},align:{},alignOffset:{},alignFlip:{type:Boolean},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},positionStrategy:{},updatePositionStrategy:{},disableUpdateOnLayoutShift:{type:Boolean},prioritizePosition:{type:Boolean},reference:{},asChild:{type:Boolean},as:{},class:{}},emits:["closeAutoFocus","escapeKeyDown","pointerDownOutside"],setup(e,{emit:t}){const n=e,o=t,r=et(n,"class"),s=ft(r,o);return(i,a)=>(C(),B(f(oP),null,{default:E(()=>[q(f(UT),te({"data-slot":"select-content"},{...f(s),...i.$attrs},{class:f(Fe)("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--reka-select-content-available-height) min-w-[8rem] overflow-x-hidden overflow-y-auto rounded-md border shadow-md",i.position==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",n.class)}),{default:E(()=>[q(f(oF)),q(f(hP),{class:qe(f(Fe)("p-1",i.position==="popper"&&"h-[var(--reka-select-trigger-height)] w-full min-w-[var(--reka-select-trigger-width)] scroll-my-1"))},{default:E(()=>[V(i.$slots,"default")]),_:3},8,["class"]),q(f(nF))]),_:3},16,["class"])]),_:3}))}}),Z$=F({__name:"SelectGroup",props:{asChild:{type:Boolean},as:{}},setup(e){const t=e;return(n,o)=>(C(),B(f(KT),te({"data-slot":"select-group"},t),{default:E(()=>[V(n.$slots,"default")]),_:3},16))}}),eF={class:"absolute right-2 flex size-3.5 items-center justify-center"},tF=F({__name:"SelectItem",props:{value:{},disabled:{type:Boolean},textValue:{},asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,n=et(t,"class"),o=Kt(n);return(r,s)=>(C(),B(f(XT),te({"data-slot":"select-item"},f(o),{class:f(Fe)("focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",t.class)}),{default:E(()=>[ce("span",eF,[q(f(ZT),null,{default:E(()=>[q(f(xb),{class:"size-4"})]),_:1})]),q(f(tP),null,{default:E(()=>[V(r.$slots,"default")]),_:3})]),_:3},16,["class"]))}}),nF=F({__name:"SelectScrollDownButton",props:{asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,n=et(t,"class"),o=Kt(n);return(r,s)=>(C(),B(f(iP),te({"data-slot":"select-scroll-down-button"},f(o),{class:f(Fe)("flex cursor-default items-center justify-center py-1",t.class)}),{default:E(()=>[V(r.$slots,"default",{},()=>[q(f(Kf),{class:"size-4"})])]),_:3},16,["class"]))}}),oF=F({__name:"SelectScrollUpButton",props:{asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,n=et(t,"class"),o=Kt(n);return(r,s)=>(C(),B(f(lP),te({"data-slot":"select-scroll-up-button"},f(o),{class:f(Fe)("flex cursor-default items-center justify-center py-1",t.class)}),{default:E(()=>[V(r.$slots,"default",{},()=>[q(f(Tk),{class:"size-4"})])]),_:3},16,["class"]))}}),rF=F({__name:"SelectTrigger",props:{disabled:{type:Boolean},reference:{},asChild:{type:Boolean},as:{},class:{},size:{default:"default"}},setup(e){const t=e,n=et(t,"class","size"),o=Kt(n);return(r,s)=>(C(),B(f(cP),te({"data-slot":"select-trigger","data-size":r.size},f(o),{class:f(Fe)("border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t.class)}),{default:E(()=>[V(r.$slots,"default"),q(f(GT),{"as-child":""},{default:E(()=>[q(f(Kf),{class:"size-4 opacity-50"})]),_:1})]),_:3},16,["data-size","class"]))}}),sF=F({__name:"SelectValue",props:{placeholder:{},asChild:{type:Boolean},as:{}},setup(e){const t=e;return(n,o)=>(C(),B(f(fP),te({"data-slot":"select-value"},t),{default:E(()=>[V(n.$slots,"default")]),_:3},16))}}),rg=e=>Array.isArray(e)&&e.length>0,iF={class:"flex flex-col gap-3 pb-10"},aF={class:"sticky-dropdown-filters flex py-2 gap-2"},lF={key:1,class:"text-center p-10"},uF=F({__name:"Details",setup(e){const t=T_(),{definitions:n}=va($u()),o=ya(),r=N(t.query.platform),s=U(()=>((r==null?void 0:r.value)==="web"?ql:Ks).slice(1)),i=N(s.value[0].label),a=T=>{var P;const A=(P=s.value.find(w=>w.label===T))==null?void 0:P.value,D=n.value.find(w=>w.slug===A&&w.platformType===r.value);return D==null?void 0:D.children},l=U(()=>Number(t.query.id)),{data:u,isLoading:c}=hC({queryKey:["appDetails",l],queryFn:async()=>{const T=await xB(l.value)||[];return rg(T)&&(T.sort((A,D)=>new Date(D.createTime).getTime()-new Date(A.createTime).getTime()),T.forEach(A=>{A.appSections=A.appSections||[]})),T},enabled:U(()=>!!l.value)}),d=N(""),p=U(()=>u.value?u.value.map(T=>({id:T.externalVersionId,label:T.createTime,value:T.externalVersionId})):[]);Ce(()=>u.value,T=>{T&&rg(T)&&(d.value=T[0].externalVersionId)},{immediate:!0});const h=U(()=>{var T;return!u.value||!d.value?(T=u.value)==null?void 0:T[0]:u.value.find(A=>A.externalVersionId===d.value)}),m=N();Ce(h,T=>{T?m.value=JSON.parse(JSON.stringify(T)):m.value=void 0},{deep:!0,immediate:!0});const g=N([]),v=T=>{g.value=(T==null?void 0:T.map(A=>A.displayName))||[]},y=U(()=>{if(m.value&&m.value.appSections)return m.value.appSections.map(A=>A.screens).flat().filter(Boolean)}),b=U(()=>{if(y.value&&y.value.length>0){let T=y.value;return g.value.length>0&&(i.value==="Screens"&&(T=T.filter(A=>A.screenPatterns&&Fm(A.screenPatterns,g.value))),i.value==="UI Elements"&&(T=T.filter(A=>A.screenElements&&Fm(A.screenElements,g.value)))),T}}),_=Ii({mutationFn:Q$,onSuccess:()=>{o.invalidateQueries({queryKey:["appDetails",l.value]})}}),O=()=>{if(!m.value||!m.value.id){console.warn("App info not available to create a new AppInfo.");return}_.mutate({appId:m.value.id})};return(T,A)=>{const D=G$,P=gl,w=Ho,k=tw,$=T$;return C(),ie("div",iF,[f(m)?(C(),B(D,{key:0,name:f(m).appName,"logo-url":f(m).appLogoUrl,platform:f(m).platform,description:f(m).appTagline,categories:f(m).allAppCategories},null,8,["name","logo-url","platform","description","categories"])):Be("",!0),q(f(rp),{modelValue:f(i),"onUpdate:modelValue":A[0]||(A[0]=R=>$e(i)?i.value=R:null),class:"!-ml-2"},{default:E(()=>[q(f(sp),{class:"bg-transparent p-0"},{default:E(()=>[(C(!0),ie(Ie,null,wt(f(s),R=>(C(),B(f(ip),{key:R.label,value:R.label,class:"!font-bold"},{default:E(()=>[rt(Ne(R.label),1)]),_:2},1032,["value"]))),128))]),_:1})]),_:1},8,["modelValue"]),ce("div",aF,[q(f(X$),{modelValue:f(d),"onUpdate:modelValue":A[1]||(A[1]=R=>$e(d)?d.value=R:null)},{default:E(()=>[q(f(rF),{class:"w-60 !h-11 rounded-full"},{default:E(()=>[q(f(sF),{placeholder:"Version",class:"font-bold truncate text-base"})]),_:1}),q(f(J$),null,{default:E(()=>[q(f(Z$),null,{default:E(()=>[(C(!0),ie(Ie,null,wt(f(p),R=>(C(),B(f(tF),{key:R.id,value:R.value},{default:E(()=>[rt(Ne(R.label),1)]),_:2},1032,["value"]))),128))]),_:1})]),_:1})]),_:1},8,["modelValue"]),(C(),B(P,{key:f(i),"default-label":f(i),data:a(f(i)),onChange:v,"selection-mode":"multiple",placement:"start"},null,8,["default-label","data"])),f(i)==="Flows"?(C(),B(f(ap),{key:0,title:"确定要创建新的Flow吗？",description:"这将创建一个新的App的Flow版本。",onConfirm:O},{default:E(()=>[q(f(vn),{disabled:f(_).isPending.value,class:"flex items-center gap-2 cursor-pointer"},{default:E(()=>[q(w,{icon:f(_).isPending.value?"eos-icons:loading":"ep:plus",class:"text-sm"},null,8,["icon"]),A[3]||(A[3]=ce("span",null,"Create New Flow",-1))]),_:1,__:[3]},8,["disabled"])]),_:1})):Be("",!0)]),f(c)?(C(),ie("div",lF,"Loading...")):f(i)==="Screens"||f(i)==="UI Elements"||f(i)==="Marketing Pages"?(C(),ie("div",{key:2,class:qe(["grid gap-x-5 gap-y-12 flex-1",f(r)==="web"?"grid-cols-[repeat(auto-fill,minmax(min(100%,500px),1fr))]":"grid-cols-[repeat(auto-fill,minmax(min(100%,230px),1fr))]"])},[(C(!0),ie(Ie,null,wt(f(b),(R,G)=>(C(),B(k,{key:G,id:R.id,src:R.screenUrl,platform:f(r)},null,8,["id","src","platform"]))),128))],2)):Be("",!0),f(i)==="Flows"&&f(m)?(C(),B($,{key:3,modelValue:f(m).appSections,"onUpdate:modelValue":A[2]||(A[2]=R=>f(m).appSections=R),platform:f(r),"app-info-id":f(m).id},null,8,["modelValue","platform","app-info-id"])):Be("",!0)])}}}),cF=Lu(uF,[["__scopeId","data-v-282accd6"]]);function dF(e){return Object.prototype.toString.call(e)==="[object Object]"}function sg(e){return dF(e)||Array.isArray(e)}function fF(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function fp(e,t){const n=Object.keys(e),o=Object.keys(t);if(n.length!==o.length)return!1;const r=JSON.stringify(Object.keys(e.breakpoints||{})),s=JSON.stringify(Object.keys(t.breakpoints||{}));return r!==s?!1:n.every(i=>{const a=e[i],l=t[i];return typeof a=="function"?`${a}`==`${l}`:!sg(a)||!sg(l)?a===l:fp(a,l)})}function ig(e){return e.concat().sort((t,n)=>t.name>n.name?1:-1).map(t=>t.options)}function pF(e,t){if(e.length!==t.length)return!1;const n=ig(e),o=ig(t);return n.every((r,s)=>{const i=o[s];return fp(r,i)})}function pp(e){return typeof e=="number"}function ef(e){return typeof e=="string"}function Nu(e){return typeof e=="boolean"}function ag(e){return Object.prototype.toString.call(e)==="[object Object]"}function _t(e){return Math.abs(e)}function hp(e){return Math.sign(e)}function Vi(e,t){return _t(e-t)}function hF(e,t){if(e===0||t===0||_t(e)<=_t(t))return 0;const n=Vi(_t(e),_t(t));return _t(n/e)}function mF(e){return Math.round(e*100)/100}function ia(e){return aa(e).map(Number)}function jn(e){return e[Ia(e)]}function Ia(e){return Math.max(0,e.length-1)}function mp(e,t){return t===Ia(e)}function lg(e,t=0){return Array.from(Array(e),(n,o)=>t+o)}function aa(e){return Object.keys(e)}function nw(e,t){return[e,t].reduce((n,o)=>(aa(o).forEach(r=>{const s=n[r],i=o[r],a=ag(s)&&ag(i);n[r]=a?nw(s,i):i}),n),{})}function tf(e,t){return typeof t.MouseEvent<"u"&&e instanceof t.MouseEvent}function gF(e,t){const n={start:o,center:r,end:s};function o(){return 0}function r(l){return s(l)/2}function s(l){return t-l}function i(l,u){return ef(e)?n[e](l):e(t,l,u)}return{measure:i}}function la(){let e=[];function t(r,s,i,a={passive:!0}){let l;if("addEventListener"in r)r.addEventListener(s,i,a),l=()=>r.removeEventListener(s,i,a);else{const u=r;u.addListener(i),l=()=>u.removeListener(i)}return e.push(l),o}function n(){e=e.filter(r=>r())}const o={add:t,clear:n};return o}function vF(e,t,n,o){const r=la(),s=1e3/60;let i=null,a=0,l=0;function u(){r.add(e,"visibilitychange",()=>{e.hidden&&m()})}function c(){h(),r.clear()}function d(v){if(!l)return;i||(i=v,n(),n());const y=v-i;for(i=v,a+=y;a>=s;)n(),a-=s;const b=a/s;o(b),l&&(l=t.requestAnimationFrame(d))}function p(){l||(l=t.requestAnimationFrame(d))}function h(){t.cancelAnimationFrame(l),i=null,a=0,l=0}function m(){i=null,a=0}return{init:u,destroy:c,start:p,stop:h,update:n,render:o}}function yF(e,t){const n=t==="rtl",o=e==="y",r=o?"y":"x",s=o?"x":"y",i=!o&&n?-1:1,a=c(),l=d();function u(m){const{height:g,width:v}=m;return o?g:v}function c(){return o?"top":n?"right":"left"}function d(){return o?"bottom":n?"left":"right"}function p(m){return m*i}return{scroll:r,cross:s,startEdge:a,endEdge:l,measureSize:u,direction:p}}function es(e=0,t=0){const n=_t(e-t);function o(u){return u<e}function r(u){return u>t}function s(u){return o(u)||r(u)}function i(u){return s(u)?o(u)?e:t:u}function a(u){return n?u-n*Math.ceil((u-t)/n):u}return{length:n,max:t,min:e,constrain:i,reachedAny:s,reachedMax:r,reachedMin:o,removeOffset:a}}function ow(e,t,n){const{constrain:o}=es(0,e),r=e+1;let s=i(t);function i(p){return n?_t((r+p)%r):o(p)}function a(){return s}function l(p){return s=i(p),d}function u(p){return c().set(a()+p)}function c(){return ow(e,a(),n)}const d={get:a,set:l,add:u,clone:c};return d}function bF(e,t,n,o,r,s,i,a,l,u,c,d,p,h,m,g,v,y,b){const{cross:_,direction:O}=e,T=["INPUT","SELECT","TEXTAREA"],A={passive:!1},D=la(),P=la(),w=es(50,225).constrain(h.measure(20)),k={mouse:300,touch:400},$={mouse:500,touch:600},R=m?43:25;let G=!1,J=0,ne=0,ae=!1,re=!1,L=!1,oe=!1;function Y(S){if(!b)return;function I(K){(Nu(b)||b(S,K))&&Se(K)}const j=t;D.add(j,"dragstart",K=>K.preventDefault(),A).add(j,"touchmove",()=>{},A).add(j,"touchend",()=>{}).add(j,"touchstart",I).add(j,"mousedown",I).add(j,"touchcancel",z).add(j,"contextmenu",z).add(j,"click",H,!0)}function ee(){D.clear(),P.clear()}function le(){const S=oe?n:t;P.add(S,"touchmove",x,A).add(S,"touchend",z).add(S,"mousemove",x,A).add(S,"mouseup",z)}function ye(S){const I=S.nodeName||"";return T.includes(I)}function me(){return(m?$:k)[oe?"mouse":"touch"]}function Pe(S,I){const j=d.add(hp(S)*-1),K=c.byDistance(S,!m).distance;return m||_t(S)<w?K:v&&I?K*.5:c.byIndex(j.get(),0).distance}function Se(S){const I=tf(S,o);oe=I,L=m&&I&&!S.buttons&&G,G=Vi(r.get(),i.get())>=2,!(I&&S.button!==0)&&(ye(S.target)||(ae=!0,s.pointerDown(S),u.useFriction(0).useDuration(0),r.set(i),le(),J=s.readPoint(S),ne=s.readPoint(S,_),p.emit("pointerDown")))}function x(S){if(!tf(S,o)&&S.touches.length>=2)return z(S);const j=s.readPoint(S),K=s.readPoint(S,_),Z=Vi(j,J),Q=Vi(K,ne);if(!re&&!oe&&(!S.cancelable||(re=Z>Q,!re)))return z(S);const ue=s.pointerMove(S);Z>g&&(L=!0),u.useFriction(.3).useDuration(.75),a.start(),r.add(O(ue)),S.preventDefault()}function z(S){const j=c.byDistance(0,!1).index!==d.get(),K=s.pointerUp(S)*me(),Z=Pe(O(K),j),Q=hF(K,Z),ue=R-10*Q,fe=y+Q/50;re=!1,ae=!1,P.clear(),u.useDuration(ue).useFriction(fe),l.distance(Z,!m),oe=!1,p.emit("pointerUp")}function H(S){L&&(S.stopPropagation(),S.preventDefault(),L=!1)}function X(){return ae}return{init:Y,destroy:ee,pointerDown:X}}function _F(e,t){let o,r;function s(d){return d.timeStamp}function i(d,p){const m=`client${(p||e.scroll)==="x"?"X":"Y"}`;return(tf(d,t)?d:d.touches[0])[m]}function a(d){return o=d,r=d,i(d)}function l(d){const p=i(d)-i(r),h=s(d)-s(o)>170;return r=d,h&&(o=d),p}function u(d){if(!o||!r)return 0;const p=i(r)-i(o),h=s(d)-s(o),m=s(d)-s(r)>170,g=p/h;return h&&!m&&_t(g)>.1?g:0}return{pointerDown:a,pointerMove:l,pointerUp:u,readPoint:i}}function wF(){function e(n){const{offsetTop:o,offsetLeft:r,offsetWidth:s,offsetHeight:i}=n;return{top:o,right:r+s,bottom:o+i,left:r,width:s,height:i}}return{measure:e}}function SF(e){function t(o){return e*(o/100)}return{measure:t}}function CF(e,t,n,o,r,s,i){const a=[e].concat(o);let l,u,c=[],d=!1;function p(v){return r.measureSize(i.measure(v))}function h(v){if(!s)return;u=p(e),c=o.map(p);function y(b){for(const _ of b){if(d)return;const O=_.target===e,T=o.indexOf(_.target),A=O?u:c[T],D=p(O?e:o[T]);if(_t(D-A)>=.5){v.reInit(),t.emit("resize");break}}}l=new ResizeObserver(b=>{(Nu(s)||s(v,b))&&y(b)}),n.requestAnimationFrame(()=>{a.forEach(b=>l.observe(b))})}function m(){d=!0,l&&l.disconnect()}return{init:h,destroy:m}}function xF(e,t,n,o,r,s){let i=0,a=0,l=r,u=s,c=e.get(),d=0;function p(){const A=o.get()-e.get(),D=!l;let P=0;return D?(i=0,n.set(o),e.set(o),P=A):(n.set(e),i+=A/l,i*=u,c+=i,e.add(i),P=c-d),a=hp(P),d=c,T}function h(){const A=o.get()-t.get();return _t(A)<.001}function m(){return l}function g(){return a}function v(){return i}function y(){return _(r)}function b(){return O(s)}function _(A){return l=A,T}function O(A){return u=A,T}const T={direction:g,duration:m,velocity:v,seek:p,settled:h,useBaseFriction:b,useBaseDuration:y,useFriction:O,useDuration:_};return T}function EF(e,t,n,o,r){const s=r.measure(10),i=r.measure(50),a=es(.1,.99);let l=!1;function u(){return!(l||!e.reachedAny(n.get())||!e.reachedAny(t.get()))}function c(h){if(!u())return;const m=e.reachedMin(t.get())?"min":"max",g=_t(e[m]-t.get()),v=n.get()-t.get(),y=a.constrain(g/i);n.subtract(v*y),!h&&_t(v)<s&&(n.set(e.constrain(n.get())),o.useDuration(25).useBaseFriction())}function d(h){l=!h}return{shouldConstrain:u,constrain:c,toggleActive:d}}function AF(e,t,n,o,r){const s=es(-t+e,0),i=d(),a=c(),l=p();function u(m,g){return Vi(m,g)<=1}function c(){const m=i[0],g=jn(i),v=i.lastIndexOf(m),y=i.indexOf(g)+1;return es(v,y)}function d(){return n.map((m,g)=>{const{min:v,max:y}=s,b=s.constrain(m),_=!g,O=mp(n,g);return _?y:O||u(v,b)?v:u(y,b)?y:b}).map(m=>parseFloat(m.toFixed(3)))}function p(){if(t<=e+r)return[s.max];if(o==="keepSnaps")return i;const{min:m,max:g}=a;return i.slice(m,g)}return{snapsContained:l,scrollContainLimit:a}}function OF(e,t,n){const o=t[0],r=n?o-e:jn(t);return{limit:es(r,o)}}function TF(e,t,n,o){const s=t.min+.1,i=t.max+.1,{reachedMin:a,reachedMax:l}=es(s,i);function u(p){return p===1?l(n.get()):p===-1?a(n.get()):!1}function c(p){if(!u(p))return;const h=e*(p*-1);o.forEach(m=>m.add(h))}return{loop:c}}function PF(e){const{max:t,length:n}=e;function o(s){const i=s-t;return n?i/-n:0}return{get:o}}function kF(e,t,n,o,r){const{startEdge:s,endEdge:i}=e,{groupSlides:a}=r,l=d().map(t.measure),u=p(),c=h();function d(){return a(o).map(g=>jn(g)[i]-g[0][s]).map(_t)}function p(){return o.map(g=>n[s]-g[s]).map(g=>-_t(g))}function h(){return a(u).map(g=>g[0]).map((g,v)=>g+l[v])}return{snaps:u,snapsAligned:c}}function IF(e,t,n,o,r,s){const{groupSlides:i}=r,{min:a,max:l}=o,u=c();function c(){const p=i(s),h=!e||t==="keepSnaps";return n.length===1?[s]:h?p:p.slice(a,l).map((m,g,v)=>{const y=!g,b=mp(v,g);if(y){const _=jn(v[0])+1;return lg(_)}if(b){const _=Ia(s)-jn(v)[0]+1;return lg(_,jn(v)[0])}return m})}return{slideRegistry:u}}function DF(e,t,n,o,r){const{reachedAny:s,removeOffset:i,constrain:a}=o;function l(m){return m.concat().sort((g,v)=>_t(g)-_t(v))[0]}function u(m){const g=e?i(m):a(m),v=t.map((b,_)=>({diff:c(b-g,0),index:_})).sort((b,_)=>_t(b.diff)-_t(_.diff)),{index:y}=v[0];return{index:y,distance:g}}function c(m,g){const v=[m,m+n,m-n];if(!e)return m;if(!g)return l(v);const y=v.filter(b=>hp(b)===g);return y.length?l(y):jn(v)-n}function d(m,g){const v=t[m]-r.get(),y=c(v,g);return{index:m,distance:y}}function p(m,g){const v=r.get()+m,{index:y,distance:b}=u(v),_=!e&&s(v);if(!g||_)return{index:y,distance:m};const O=t[y]-b,T=m+c(O,0);return{index:y,distance:T}}return{byDistance:p,byIndex:d,shortcut:c}}function RF(e,t,n,o,r,s,i){function a(d){const p=d.distance,h=d.index!==t.get();s.add(p),p&&(o.duration()?e.start():(e.update(),e.render(1),e.update())),h&&(n.set(t.get()),t.set(d.index),i.emit("select"))}function l(d,p){const h=r.byDistance(d,p);a(h)}function u(d,p){const h=t.clone().set(d),m=r.byIndex(h.get(),p);a(m)}return{distance:l,index:u}}function BF(e,t,n,o,r,s,i,a){const l={passive:!0,capture:!0};let u=0;function c(h){if(!a)return;function m(g){if(new Date().getTime()-u>10)return;i.emit("slideFocusStart"),e.scrollLeft=0;const b=n.findIndex(_=>_.includes(g));pp(b)&&(r.useDuration(0),o.index(b,0),i.emit("slideFocus"))}s.add(document,"keydown",d,!1),t.forEach((g,v)=>{s.add(g,"focus",y=>{(Nu(a)||a(h,y))&&m(v)},l)})}function d(h){h.code==="Tab"&&(u=new Date().getTime())}return{init:c}}function wi(e){let t=e;function n(){return t}function o(l){t=i(l)}function r(l){t+=i(l)}function s(l){t-=i(l)}function i(l){return pp(l)?l:l.get()}return{get:n,set:o,add:r,subtract:s}}function rw(e,t){const n=e.scroll==="x"?i:a,o=t.style;let r=null,s=!1;function i(p){return`translate3d(${p}px,0px,0px)`}function a(p){return`translate3d(0px,${p}px,0px)`}function l(p){if(s)return;const h=mF(e.direction(p));h!==r&&(o.transform=n(h),r=h)}function u(p){s=!p}function c(){s||(o.transform="",t.getAttribute("style")||t.removeAttribute("style"))}return{clear:c,to:l,toggleActive:u}}function MF(e,t,n,o,r,s,i,a,l){const c=ia(r),d=ia(r).reverse(),p=y().concat(b());function h(D,P){return D.reduce((w,k)=>w-r[k],P)}function m(D,P){return D.reduce((w,k)=>h(w,P)>0?w.concat([k]):w,[])}function g(D){return s.map((P,w)=>({start:P-o[w]+.5+D,end:P+t-.5+D}))}function v(D,P,w){const k=g(P);return D.map($=>{const R=w?0:-n,G=w?n:0,J=w?"end":"start",ne=k[$][J];return{index:$,loopPoint:ne,slideLocation:wi(-1),translate:rw(e,l[$]),target:()=>a.get()>ne?R:G}})}function y(){const D=i[0],P=m(d,D);return v(P,n,!1)}function b(){const D=t-i[0]-1,P=m(c,D);return v(P,-n,!0)}function _(){return p.every(({index:D})=>{const P=c.filter(w=>w!==D);return h(P,t)<=.1})}function O(){p.forEach(D=>{const{target:P,translate:w,slideLocation:k}=D,$=P();$!==k.get()&&(w.to($),k.set($))})}function T(){p.forEach(D=>D.translate.clear())}return{canLoop:_,clear:T,loop:O,loopPoints:p}}function qF(e,t,n){let o,r=!1;function s(l){if(!n)return;function u(c){for(const d of c)if(d.type==="childList"){l.reInit(),t.emit("slidesChanged");break}}o=new MutationObserver(c=>{r||(Nu(n)||n(l,c))&&u(c)}),o.observe(e,{childList:!0})}function i(){o&&o.disconnect(),r=!0}return{init:s,destroy:i}}function $F(e,t,n,o){const r={};let s=null,i=null,a,l=!1;function u(){a=new IntersectionObserver(m=>{l||(m.forEach(g=>{const v=t.indexOf(g.target);r[v]=g}),s=null,i=null,n.emit("slidesInView"))},{root:e.parentElement,threshold:o}),t.forEach(m=>a.observe(m))}function c(){a&&a.disconnect(),l=!0}function d(m){return aa(r).reduce((g,v)=>{const y=parseInt(v),{isIntersecting:b}=r[y];return(m&&b||!m&&!b)&&g.push(y),g},[])}function p(m=!0){if(m&&s)return s;if(!m&&i)return i;const g=d(m);return m&&(s=g),m||(i=g),g}return{init:u,destroy:c,get:p}}function FF(e,t,n,o,r,s){const{measureSize:i,startEdge:a,endEdge:l}=e,u=n[0]&&r,c=m(),d=g(),p=n.map(i),h=v();function m(){if(!u)return 0;const b=n[0];return _t(t[a]-b[a])}function g(){if(!u)return 0;const b=s.getComputedStyle(jn(o));return parseFloat(b.getPropertyValue(`margin-${l}`))}function v(){return n.map((b,_,O)=>{const T=!_,A=mp(O,_);return T?p[_]+c:A?p[_]+d:O[_+1][a]-b[a]}).map(_t)}return{slideSizes:p,slideSizesWithGaps:h,startGap:c,endGap:d}}function LF(e,t,n,o,r,s,i,a,l){const{startEdge:u,endEdge:c,direction:d}=e,p=pp(n);function h(y,b){return ia(y).filter(_=>_%b===0).map(_=>y.slice(_,_+b))}function m(y){return y.length?ia(y).reduce((b,_,O)=>{const T=jn(b)||0,A=T===0,D=_===Ia(y),P=r[u]-s[T][u],w=r[u]-s[_][c],k=!o&&A?d(i):0,$=!o&&D?d(a):0,R=_t(w-$-(P+k));return O&&R>t+l&&b.push(_),D&&b.push(y.length),b},[]).map((b,_,O)=>{const T=Math.max(O[_-1]||0);return y.slice(T,b)}):[]}function g(y){return p?h(y,n):m(y)}return{groupSlides:g}}function NF(e,t,n,o,r,s,i){const{align:a,axis:l,direction:u,startIndex:c,loop:d,duration:p,dragFree:h,dragThreshold:m,inViewThreshold:g,slidesToScroll:v,skipSnaps:y,containScroll:b,watchResize:_,watchSlides:O,watchDrag:T,watchFocus:A}=s,D=2,P=wF(),w=P.measure(t),k=n.map(P.measure),$=yF(l,u),R=$.measureSize(w),G=SF(R),J=gF(a,R),ne=!d&&!!b,ae=d||!!b,{slideSizes:re,slideSizesWithGaps:L,startGap:oe,endGap:Y}=FF($,w,k,n,ae,r),ee=LF($,R,v,d,w,k,oe,Y,D),{snaps:le,snapsAligned:ye}=kF($,J,w,k,ee),me=-jn(le)+jn(L),{snapsContained:Pe,scrollContainLimit:Se}=AF(R,me,ye,b,D),x=ne?Pe:ye,{limit:z}=OF(me,x,d),H=ow(Ia(x),c,d),X=H.clone(),pe=ia(n),S=({dragHandler:mt,scrollBody:$t,scrollBounds:Ft,options:{loop:yn}})=>{yn||Ft.constrain(mt.pointerDown()),$t.seek()},I=({scrollBody:mt,translate:$t,location:Ft,offsetLocation:yn,previousLocation:Cr,scrollLooper:Bt,slideLooper:Lt,dragHandler:Qn,animation:Yn,eventHandler:vp,scrollBounds:iw,options:{loop:yp}},bp)=>{const _p=mt.settled(),aw=!iw.shouldConstrain(),wp=yp?_p:_p&&aw,Sp=wp&&!Qn.pointerDown();Sp&&Yn.stop();const lw=Ft.get()*bp+Cr.get()*(1-bp);yn.set(lw),yp&&(Bt.loop(mt.direction()),Lt.loop()),$t.to(yn.get()),Sp&&vp.emit("settle"),wp||vp.emit("scroll")},j=vF(o,r,()=>S(At),mt=>I(At,mt)),K=.68,Z=x[H.get()],Q=wi(Z),ue=wi(Z),fe=wi(Z),de=wi(Z),se=xF(Q,fe,ue,de,p,K),xe=DF(d,x,me,z,de),ge=RF(j,H,X,se,xe,de,i),Ee=PF(z),ke=la(),He=$F(t,n,i,g),{slideRegistry:tt}=IF(ne,b,x,Se,ee,pe),Ye=BF(e,n,tt,ge,se,ke,i,A),At={ownerDocument:o,ownerWindow:r,eventHandler:i,containerRect:w,slideRects:k,animation:j,axis:$,dragHandler:bF($,e,o,r,de,_F($,r),Q,j,ge,se,xe,H,i,G,h,m,y,K,T),eventStore:ke,percentOfView:G,index:H,indexPrevious:X,limit:z,location:Q,offsetLocation:fe,previousLocation:ue,options:s,resizeHandler:CF(t,i,r,n,$,_,P),scrollBody:se,scrollBounds:EF(z,fe,de,se,G),scrollLooper:TF(me,z,fe,[Q,fe,ue,de]),scrollProgress:Ee,scrollSnapList:x.map(Ee.get),scrollSnaps:x,scrollTarget:xe,scrollTo:ge,slideLooper:MF($,R,me,re,L,le,x,fe,n),slideFocus:Ye,slidesHandler:qF(t,i,O),slidesInView:He,slideIndexes:pe,slideRegistry:tt,slidesToScroll:ee,target:de,translate:rw($,t)};return At}function jF(){let e={},t;function n(u){t=u}function o(u){return e[u]||[]}function r(u){return o(u).forEach(c=>c(t,u)),l}function s(u,c){return e[u]=o(u).concat([c]),l}function i(u,c){return e[u]=o(u).filter(d=>d!==c),l}function a(){e={}}const l={init:n,emit:r,off:i,on:s,clear:a};return l}const VF={align:"center",axis:"x",container:null,slides:null,containScroll:"trimSnaps",direction:"ltr",slidesToScroll:1,inViewThreshold:0,breakpoints:{},dragFree:!1,dragThreshold:10,loop:!1,skipSnaps:!1,duration:25,startIndex:0,active:!0,watchDrag:!0,watchResize:!0,watchSlides:!0,watchFocus:!0};function UF(e){function t(s,i){return nw(s,i||{})}function n(s){const i=s.breakpoints||{},a=aa(i).filter(l=>e.matchMedia(l).matches).map(l=>i[l]).reduce((l,u)=>t(l,u),{});return t(s,a)}function o(s){return s.map(i=>aa(i.breakpoints||{})).reduce((i,a)=>i.concat(a),[]).map(e.matchMedia)}return{mergeOptions:t,optionsAtMedia:n,optionsMediaQueries:o}}function HF(e){let t=[];function n(s,i){return t=i.filter(({options:a})=>e.optionsAtMedia(a).active!==!1),t.forEach(a=>a.init(s,e)),i.reduce((a,l)=>Object.assign(a,{[l.name]:l}),{})}function o(){t=t.filter(s=>s.destroy())}return{init:n,destroy:o}}function Ul(e,t,n){const o=e.ownerDocument,r=o.defaultView,s=UF(r),i=HF(s),a=la(),l=jF(),{mergeOptions:u,optionsAtMedia:c,optionsMediaQueries:d}=s,{on:p,off:h,emit:m}=l,g=$;let v=!1,y,b=u(VF,Ul.globalOptions),_=u(b),O=[],T,A,D;function P(){const{container:pe,slides:S}=_;A=(ef(pe)?e.querySelector(pe):pe)||e.children[0];const j=ef(S)?A.querySelectorAll(S):S;D=[].slice.call(j||A.children)}function w(pe){const S=NF(e,A,D,o,r,pe,l);if(pe.loop&&!S.slideLooper.canLoop()){const I=Object.assign({},pe,{loop:!1});return w(I)}return S}function k(pe,S){v||(b=u(b,pe),_=c(b),O=S||O,P(),y=w(_),d([b,...O.map(({options:I})=>I)]).forEach(I=>a.add(I,"change",$)),_.active&&(y.translate.to(y.location.get()),y.animation.init(),y.slidesInView.init(),y.slideFocus.init(X),y.eventHandler.init(X),y.resizeHandler.init(X),y.slidesHandler.init(X),y.options.loop&&y.slideLooper.loop(),A.offsetParent&&D.length&&y.dragHandler.init(X),T=i.init(X,O)))}function $(pe,S){const I=ee();R(),k(u({startIndex:I},pe),S),l.emit("reInit")}function R(){y.dragHandler.destroy(),y.eventStore.clear(),y.translate.clear(),y.slideLooper.clear(),y.resizeHandler.destroy(),y.slidesHandler.destroy(),y.slidesInView.destroy(),y.animation.destroy(),i.destroy(),a.clear()}function G(){v||(v=!0,a.clear(),R(),l.emit("destroy"),l.clear())}function J(pe,S,I){!_.active||v||(y.scrollBody.useBaseFriction().useDuration(S===!0?0:_.duration),y.scrollTo.index(pe,I||0))}function ne(pe){const S=y.index.add(1).get();J(S,pe,-1)}function ae(pe){const S=y.index.add(-1).get();J(S,pe,1)}function re(){return y.index.add(1).get()!==ee()}function L(){return y.index.add(-1).get()!==ee()}function oe(){return y.scrollSnapList}function Y(){return y.scrollProgress.get(y.offsetLocation.get())}function ee(){return y.index.get()}function le(){return y.indexPrevious.get()}function ye(){return y.slidesInView.get()}function me(){return y.slidesInView.get(!1)}function Pe(){return T}function Se(){return y}function x(){return e}function z(){return A}function H(){return D}const X={canScrollNext:re,canScrollPrev:L,containerNode:z,internalEngine:Se,destroy:G,off:h,on:p,emit:m,plugins:Pe,previousScrollSnap:le,reInit:g,rootNode:x,scrollNext:ne,scrollPrev:ae,scrollProgress:Y,scrollSnapList:oe,scrollTo:J,selectedScrollSnap:ee,slideNodes:H,slidesInView:ye,slidesNotInView:me};return k(t,n),setTimeout(()=>l.emit("init"),0),X}Ul.globalOptions=void 0;function gp(e={},t=[]){const n=$e(e),o=$e(t);let r=n?e.value:e,s=o?t.value:t;const i=Cn(),a=Cn();function l(){a.value&&a.value.reInit(r,s)}return je(()=>{!fF()||!i.value||(Ul.globalOptions=gp.globalOptions,a.value=Ul(i.value,r,s))}),Ys(()=>{a.value&&a.value.destroy()}),n&&Ce(e,u=>{fp(r,u)||(r=u,l())}),o&&Ce(t,u=>{pF(s,u)||(s=u,l())}),[i,a]}gp.globalOptions=void 0;const[zF,KF]=bC(({opts:e,orientation:t,plugins:n},o)=>{const[r,s]=gp({...e,axis:t==="horizontal"?"x":"y"},n);function i(){var d;(d=s.value)==null||d.scrollPrev()}function a(){var d;(d=s.value)==null||d.scrollNext()}const l=N(!1),u=N(!1);function c(d){l.value=(d==null?void 0:d.canScrollNext())||!1,u.value=(d==null?void 0:d.canScrollPrev())||!1}return je(()=>{var d,p,h;s.value&&((d=s.value)==null||d.on("init",c),(p=s.value)==null||p.on("reInit",c),(h=s.value)==null||h.on("select",c),o("init-api",s.value))}),{carouselRef:r,carouselApi:s,canScrollPrev:u,canScrollNext:l,scrollPrev:i,scrollNext:a,orientation:t}});function ju(){const e=KF();if(!e)throw new Error("useCarousel must be used within a <Carousel />");return e}const WF=F({__name:"Carousel",props:{opts:{},plugins:{},orientation:{default:"horizontal"},class:{}},emits:["init-api"],setup(e,{expose:t,emit:n}){const o=e,r=n,{canScrollNext:s,canScrollPrev:i,carouselApi:a,carouselRef:l,orientation:u,scrollNext:c,scrollPrev:d}=zF(o,r);t({canScrollNext:s,canScrollPrev:i,carouselApi:a,carouselRef:l,orientation:u,scrollNext:c,scrollPrev:d});function p(h){const m=o.orientation==="vertical"?"ArrowUp":"ArrowLeft",g=o.orientation==="vertical"?"ArrowDown":"ArrowRight";if(h.key===m){h.preventDefault(),d();return}h.key===g&&(h.preventDefault(),c())}return(h,m)=>(C(),ie("div",{"data-slot":"carousel",class:qe(f(Fe)("relative",o.class)),role:"region","aria-roledescription":"carousel",tabindex:"0",onKeydown:p},[V(h.$slots,"default",{canScrollNext:f(s),canScrollPrev:f(i),carouselApi:f(a),carouselRef:f(l),orientation:f(u),scrollNext:f(c),scrollPrev:f(d)})],34))}}),GF=F({__name:"CarouselNext",props:{variant:{default:"outline"},size:{default:"icon"},class:{}},setup(e){const t=e,{orientation:n,canScrollNext:o,scrollNext:r}=ju();return(s,i)=>(C(),B(f(vn),{"data-slot":"carousel-next",disabled:!f(o),class:qe(f(Fe)("absolute size-8 rounded-full",f(n)==="horizontal"?"top-1/2 -right-12 -translate-y-1/2":"-bottom-12 left-1/2 -translate-x-1/2 rotate-90",t.class)),variant:s.variant,size:s.size,onClick:f(r)},{default:E(()=>[V(s.$slots,"default",{},()=>[q(f(Ok)),i[0]||(i[0]=ce("span",{class:"sr-only"},"Next Slide",-1))])]),_:3},8,["disabled","class","variant","size","onClick"]))}}),QF=F({__name:"CarouselPrevious",props:{variant:{default:"outline"},size:{default:"icon"},class:{}},setup(e){const t=e,{orientation:n,canScrollPrev:o,scrollPrev:r}=ju();return(s,i)=>(C(),B(f(vn),{"data-slot":"carousel-previous",disabled:!f(o),class:qe(f(Fe)("absolute size-8 rounded-full",f(n)==="horizontal"?"top-1/2 -left-12 -translate-y-1/2":"-top-12 left-1/2 -translate-x-1/2 rotate-90",t.class)),variant:s.variant,size:s.size,onClick:f(r)},{default:E(()=>[V(s.$slots,"default",{},()=>[q(f(Ak)),i[0]||(i[0]=ce("span",{class:"sr-only"},"Previous Slide",-1))])]),_:3},8,["disabled","class","variant","size","onClick"]))}}),YF=F({inheritAttrs:!1,__name:"CarouselContent",props:{class:{}},setup(e){const t=e,{carouselRef:n,orientation:o}=ju();return(r,s)=>(C(),ie("div",{ref_key:"carouselRef",ref:n,"data-slot":"carousel-content",class:"overflow-hidden h-full"},[ce("div",te({class:f(Fe)("flex",f(o)==="horizontal"?"-ml-4 h-full":"-mt-4 flex-col",t.class)},r.$attrs),[V(r.$slots,"default")],16)],512))}}),XF=F({__name:"CarouselItem",props:{class:{}},setup(e){const t=e,{orientation:n}=ju();return(o,r)=>(C(),ie("div",{"data-slot":"carousel-item",role:"group","aria-roledescription":"slide",class:qe(f(Fe)("min-w-0 shrink-0 grow-0 basis-full",f(n)==="horizontal"?"pl-4":"pt-4",t.class))},[V(o.$slots,"default")],2))}}),JF=F({__name:"AspectRatio",props:{ratio:{},asChild:{type:Boolean},as:{}},setup(e){const t=e;return(n,o)=>(C(),B(f(M1),te({"data-slot":"aspect-ratio"},t),{default:E(()=>[V(n.$slots,"default")]),_:3},16))}}),ZF={class:"relative flex flex-col gap-4 cursor-pointer group"},eL=F({__name:"AppCard",props:Un({name:{},description:{},logo:{},videoUrl:{},previewScreens:{},platform:{},isFavorite:{type:Boolean}},{isFavorite:{type:Boolean,default:!1},isFavoriteModifiers:{}}),emits:Un(["click","toggle-favorite"],["update:isFavorite"]),setup(e,{emit:t}){const n=ts(e,"isFavorite"),o=t,r=U(()=>e.platform==="web"),s={video:"video",image:ri},i=U(()=>r.value?16/10:393/892),a=U(()=>e.videoUrl?[{type:"video",id:"video",props:{src:e.videoUrl,muted:!0,autoplay:!0,loop:!0,playsinline:!0,class:"object-contain"}}]:(e.previewScreens||[]).map(c=>({type:"image",id:c.id,props:{src:c.screenUrl,fit:"contain",class:"object-contain"}}))),l=()=>{o("click")},u=()=>{n.value=!n.value,o("toggle-favorite")};return(c,d)=>{const p=XF,h=YF,m=QF,g=GF,v=WF,y=Yf;return C(),ie("div",ZF,[ce("div",{class:qe(["w-full overflow-hidden bg-[#f0f0f0] rounded-4xl flex items-center justify-center hover:bg-[#f4f4f4] transition-colors duration-300",f(r)?"aspect-[1/1]":"aspect-[7/10]"])},[q(v,{class:qe(["relative w-full h-full max-w-xs",f(r)?"h-[51%]":"h-[85%]"])},{default:E(()=>[q(h,{class:"rounded-2xl",onClick:l},{default:E(()=>[(C(!0),ie(Ie,null,wt(f(a),(b,_)=>(C(),B(p,{key:b.id||_,class:"flex items-center justify-center w-full h-full"},{default:E(()=>[q(f(JF),{ratio:f(i)},{default:E(()=>[(C(),B(ro(s[b.type]),te({ref_for:!0},b.props,{class:["w-full h-full object-contain",f(r)?"rounded-xs":"rounded-2xl"]}),null,16,["class"]))]),_:2},1032,["ratio"])]),_:2},1024))),128))]),_:1}),q(m),q(g)]),_:1},8,["class"])],2),ce("div",{class:"absolute top-2 right-2 z-10 p-2 rounded-full bg-white/50 backdrop-blur-sm opacity-0 group-hover:opacity-100 transition-opacity",onClick:Ze(u,["stop"])},[q(f(Ik),{class:qe(["w-5 h-5 text-yellow-400",n.value?"fill-yellow-400":"fill-none"])},null,8,["class"])]),q(y,{logo:c.logo,name:c.name,description:c.description},null,8,["logo","name","description"])])}}}),tL=Lu(eL,[["__scopeId","data-v-49595ce3"]]),nL={class:"relative w-full overflow-hidden flex items-center"},oL={class:"flex w-max space-x-2"},rL=F({__name:"Filter",props:{platformType:{},type:{}},emits:["change"],setup(e,{expose:t,emit:n}){const o=N(null),r=N(null),{arrivedState:s}=FC(r,{throttle:50}),{left:i,right:a}=dt(s);je(()=>{var v;if(o.value){const y=(v=o.value.$el)==null?void 0:v.querySelector("[data-reka-scroll-area-viewport]");y?r.value=y:console.error("无法找到 ScrollArea 的 viewport 元素。")}});const l=v=>{if(r.value){const y=r.value.offsetWidth*.8;r.value.scrollBy({left:v==="left"?-y:y,behavior:"smooth"})}},u=n,{definitions:c}=va($u()),d=N(),p=U(()=>{var O,T;const y=(O=(e.platformType==="web"?ql:Ks).find(A=>A.label===e.type))==null?void 0:O.value,b=c==null?void 0:c.value.find(A=>A.platformType===e.platformType&&A.slug===y);return(((T=b==null?void 0:b.children)==null?void 0:T.map(A=>A.children).flat())||[]).map(A=>A?{id:typeof A.id=="number"?String(A.id):A.id||"",label:A.label||"",definition:A.definition||"",exampleScreens:Array.isArray(A.exampleScreens)?A.exampleScreens:[]}:null).filter(Boolean)}),h=v=>{d.value=d.value===v?void 0:v},m=v=>{const y=p.value.find(b=>b.id===v);u("change",y)},g=()=>{d.value=void 0};return Ce(d,v=>{m(v)},{immediate:!0}),t({reset:g}),(v,y)=>{const b=Ho;return C(),ie("div",nL,[Fs(q(f(vn),{variant:"outline",class:"absolute left-0 top-1/2 -translate-y-1/2 w-10 rounded-full z-10 bg-background transition-opacity cursor-pointer",onClick:y[0]||(y[0]=_=>l("left"))},{default:E(()=>[q(b,{icon:"lucide:chevron-left",class:"h-4 w-4"})]),_:1},512),[[Yi,!f(i)]]),q(f(lp),{ref_key:"scrollAreaRef",ref:o,class:"flex-1 overflow-auto whitespace-nowrap rounded-md"},{default:E(()=>[ce("div",oL,[(C(!0),ie(Ie,null,wt(p.value,_=>(C(),B(f(vn),{class:"rounded-full cursor-pointer",key:_.id,variant:d.value===_.id?"default":"outline",onClick:O=>h(_.id)},{default:E(()=>[rt(Ne(_.label),1)]),_:2},1032,["variant","onClick"]))),128))])]),_:1},512),Fs(q(f(vn),{variant:"outline",class:"absolute right-0 top-1/2 -translate-y-1/2 w-10 rounded-full z-10 p-0 bg-background transition-opacity cursor-pointer",onClick:y[1]||(y[1]=_=>l("right"))},{default:E(()=>[q(b,{icon:"lucide:chevron-right",class:"h-4 w-4"})]),_:1},512),[[Yi,!f(a)]])])}}}),sL=(e,t=null,n=0)=>{const o=()=>{const r=t==null?void 0:t.value;r?r.scrollHeight-r.scrollTop-r.clientHeight<=n&&e():document.documentElement.scrollHeight-document.documentElement.scrollTop-window.innerHeight<=n&&e()};je(()=>{const r=t==null?void 0:t.value;r?r.addEventListener("scroll",o):window.addEventListener("scroll",o)}),Rt(()=>{const r=t==null?void 0:t.value;r?r.removeEventListener("scroll",o):window.removeEventListener("scroll",o)})},iL={class:"flex flex-col gap-5 py-8"},aL={class:"flex-1 min-w-0 flex flex-col gap-y-5"},lL={class:"flex items-center"},uL={key:0,class:"flex items-center gap-x-2 ml-auto"},cL={key:2,class:"flex flex-col gap-5"},dL={class:"flex gap-4 px-1 py-4"},fL={class:"flex justify-between group hover:cursor-pointer"},pL={class:"flex flex-col gap-2"},hL={class:"flex items-center gap-2 text-xl h-7 font-bold"},mL={class:"flex gap-2 opacity-0 group-hover:opacity-100 transition-all duration-100"},gL=F({__name:"HomeView",setup(e){var oe;const t=Ta(),n=ya(),o=Ii({mutationFn:Y=>A.value.find(le=>le.id===Y)?lq({appId:Y,type:1}):Promise.reject("App not found"),onSuccess:()=>{n.invalidateQueries({queryKey:["app",p,m]})}}),r=Y=>{console.log("Toggling favorite for app:",Y),o.mutate(Y)},s=kt(ep),i=U(()=>(s==null?void 0:s.value)==="web"),a=U(()=>i.value?"web":"mobile"),l=U(()=>a.value),u=$u(),{definitions:c}=va(u),d=U(()=>s?s.value==="web"?ql:Ks:[]),p=N(((oe=d.value[0])==null?void 0:oe.label)||""),h=N(null),m=N(),g=N(),v=N(),y=N(),b=N([]),_=(Y,ee)=>{if(typeof Y=="number")if(ee)b.value.push(Y);else{const le=b.value.indexOf(Y);le>-1&&b.value.splice(le,1)}},O=Y=>{if(!c.value||c.value.length===0)return[];const ee=c.value.find(le=>le.slug===Y&&le.platformType===l.value);return(ee==null?void 0:ee.children)||[]},T=U(()=>p.value||"Apps");Ce(()=>s==null?void 0:s.value,(Y,ee)=>{var ye;if(Y===ee)return;const le=p.value;if(le==="Marketing Pages"&&Y!=="web")p.value="Apps";else{const me=Y==="web"?ql:Ks;me.find(Se=>Se.label===le)||(p.value=((ye=me[0])==null?void 0:ye.label)||"")}ae(),g.value=void 0,v.value=void 0,y.value=void 0,G()},{immediate:!1});const A=U(()=>{var Y;return((Y=w.value)==null?void 0:Y.pages.flatMap(ee=>ee.list))??[]}),D=U(()=>{var Y;return((Y=w.value)==null?void 0:Y.pages.flatMap(ee=>ee.list))??[]}),P=Y=>{var ye;const ee=d.value.find(me=>me.label===p.value),le={platform:s==null?void 0:s.value,type:1,categoryType:ee==null?void 0:ee.categoryType,pageNo:Y,pageSize:20};return(ye=m.value)!=null&&ye.id&&(le.categoryId=m.value.id),le},{data:w,fetchNextPage:k,hasNextPage:$,isFetching:R,refetch:G}=mC({queryKey:["home",p,m],queryFn:async({pageParam:Y=1})=>{const ee=P(Y);return p.value==="Apps"?CB(ee):Y$(ee)},getNextPageParam:(Y,ee)=>{if(!Y)return;const le=Math.ceil(Y.total/20);if(ee.length<le)return ee.length+1},initialPageParam:1}),J=Y=>{m.value=Y},ne=()=>{ae(),g.value=void 0,v.value=void 0,y.value=void 0},ae=()=>{h.value&&h.value.reset(),m.value=void 0};sL(()=>{$.value&&!R.value&&k()});const L=Y=>{t.push({path:"/details",query:{id:Y.id,platform:Y.platform}})};return(Y,ee)=>{const le=rL,ye=tL,me=tw,Pe=ri;return C(),ie("div",iL,[ee[8]||(ee[8]=ce("h1",{class:"text-[44px] font-[600]"},"Discover",-1)),ce("div",aL,[ce("div",lL,[q(f(rp),{modelValue:f(p),"onUpdate:modelValue":[ee[0]||(ee[0]=Se=>$e(p)?p.value=Se:null),ne]},{default:E(()=>[q(f(sp),{class:"bg-transparent p-0"},{default:E(()=>[(C(!0),ie(Ie,null,wt(f(d),Se=>(C(),B(f(ip),{key:Se.label,value:Se.label,class:"!font-bold"},{default:E(()=>[rt(Ne(Se.label),1)]),_:2},1032,["value"]))),128))]),_:1})]),_:1},8,["modelValue"]),f(p)!=="Apps"?(C(),ie("div",uL,[q(f(gl),{data:O("appCategories"),"default-label":"Apps",onChange:ee[1]||(ee[1]=Se=>g.value=Se),"selection-mode":"single",placement:"end"},null,8,["data"]),f(p)!=="UI Elements"&&f(p)!=="Flows"?(C(),B(f(gl),{key:0,data:O("screenElements"),"default-label":"UI Elements",onChange:ee[2]||(ee[2]=Se=>v.value=Se),"selection-mode":"single",placement:"end"},null,8,["data"])):Be("",!0),f(p)!=="Screens"&&f(p)!=="Flows"?(C(),B(f(gl),{key:1,data:O("screenPatterns"),"default-label":"Screens",onChange:ee[3]||(ee[3]=Se=>y.value=Se),"selection-mode":"single",placement:"end"},null,8,["data"])):Be("",!0)])):Be("",!0)]),q(le,{"platform-type":f(a),type:f(T),onChange:J,ref_key:"filterRef",ref:h,class:"w-full"},null,8,["platform-type","type"]),f(p)==="Apps"?(C(),ie("div",{key:0,class:qe(["grid gap-x-4 gap-y-12",f(i)?"grid-cols-[repeat(auto-fill,minmax(min(100%,450px),1fr))]":"grid-cols-[repeat(auto-fill,minmax(min(100%,350px),1fr))]"])},[(C(!0),ie(Ie,null,wt(f(A),Se=>(C(),B(ye,{key:Se.id,id:Se.id,name:Se.name,description:Se.appTagline,logo:Se.appLogoUrl,"video-url":Se.previewVideoUrl??"","preview-screens":Se.previewScreens,onClick:x=>L(Se),platform:f(s),onToggleFavorite:()=>r(Se.id)},null,8,["id","name","description","logo","video-url","preview-screens","onClick","platform","onToggleFavorite"]))),128))],2)):["Screens","UI Elements"].includes(f(p))?(C(),ie("div",{key:1,class:qe(["grid gap-x-5 gap-y-12",f(i)?"grid-cols-[repeat(auto-fill,minmax(min(100%,500px),1fr))]":"grid-cols-[repeat(auto-fill,minmax(min(100%,230px),1fr))] auto-rows-max"])},[(C(!0),ie(Ie,null,wt(f(D),(Se,x)=>(C(),B(me,{key:x,id:Se.screenRespVO.id,src:Se.screenRespVO.screenUrl,name:Se.appRespVO.name,logo:Se.appRespVO.appLogoUrl,selected:f(b).includes(Se.screenRespVO.id),onSelect:_,platform:f(s)},null,8,["id","src","name","logo","selected","platform"]))),128))],2)):f(p)==="Flows"?(C(),ie("div",cL,[q(f(lp),{class:"w-full"},{default:E(()=>[ce("div",dL,[(C(!0),ie(Ie,null,wt(f(D),(Se,x)=>(C(),B(Pe,{key:x,src:Se.screenRespVO.screenUrl,class:qe(["shrink-0 object-cover",[f(i)?"aspect-[16/11] w-[595px] rounded-lg":"aspect-[393/892] w-[215px] rounded-3xl","transition-transform hover:scale-[1.02]"]])},null,8,["src","class"]))),128))])]),_:1}),ce("div",fL,[ce("div",pL,[ce("div",hL,[ee[4]||(ee[4]=ce("span",{class:"group-hover:underline underline-offset-8 transition-all duration-300"},"Onboarding",-1)),ee[5]||(ee[5]=ce("span",{class:"text-gray-500"},"in",-1)),q(Pe,{class:"h-full"}),ee[6]||(ee[6]=ce("span",{class:"group-hover:underline underline-offset-8 transition-all duration-300"},"MoonPay",-1))]),ee[7]||(ee[7]=ce("span",{class:"text-sm text-gray-500"}," 100+ screens ",-1))]),ce("div",mL,[q(f(vn),{text:"Save",class:"bg-black text-white hover:opacity-80"}),q(f(vn),{text:"Copy",class:"bg-[#E3E3E3] hover:opacity-80 text-black"})])])])):Be("",!0)])])}}}),sw=OM({history:nM("/"),routes:[{path:"/",name:"home",component:gL},{path:"/details",name:"details",component:cF},{path:"/apps",name:"apps",component:()=>mi(()=>import("./Apps-BRMcQyeI.js"),__vite__mapDeps([0,1,2,3,4,5,6]))},{path:"/auth",name:"auth",component:()=>mi(()=>import("./Auth-BJGZikMq.js"),__vite__mapDeps([7,3,4,1,8]))},{path:"/settings",name:"settings",component:()=>mi(()=>import("./Settings-CkK03M1s.js"),__vite__mapDeps([9,4]))},{path:"/favorites",name:"favorites",component:()=>mi(()=>import("./Favorites-C1kb4hNA.js"),__vite__mapDeps([10,5,1]))},{path:"/chat",name:"chat",component:()=>mi(()=>import("./Chat-CbyEIPNl.js"),__vite__mapDeps([11,2,12]))}]});sw.beforeEach((e,t,n)=>{const o=localStorage.getItem("accessToken"),{fetchUserInfo:r,userInfo:s}=D_(),i=["auth"];return o?(!s.id&&e.name!=="auth"&&r(),e.name==="auth"?n({name:"home"}):n()):i.includes(e.name)?n():n({name:"auth"})});const Vu=DS(YM);Vu.use(pC);Vu.use(MS());Vu.use(sw);Vu.mount("#app");export{Ii as $,By as A,mo as B,Uo as C,kf as D,Un as E,ts as F,ie as G,Fs as H,Ho as I,Pt as J,Ne as K,AS as L,et as M,ft as N,Fe as O,Ae as P,Kt as Q,Ry as R,qe as S,EL as T,$e as U,My as V,ce as W,rt as X,GL as Y,ya as Z,vn as _,In as a,df as a$,wk as a0,Bk as a1,$k as a2,qk as a3,ri as a4,wt as a5,Ie as a6,X$ as a7,ct as a8,yt as a9,un as aA,zg as aB,ut as aC,We as aD,Et as aE,Ys as aF,Nn as aG,bd as aH,zt as aI,Dk as aJ,xb as aK,lb as aL,yP as aM,bP as aN,ql as aO,Ks as aP,mC as aQ,sL as aR,rp as aS,sp as aT,ip as aU,u$ as aV,ep as aW,eN as aX,tN as aY,DM as aZ,tu as a_,rF as aa,sF as ab,J$ as ac,Z$ as ad,tF as ae,YL as af,QL as ag,hC as ah,xL as ai,ap as aj,jM as ak,Yf as al,Ta as am,EB as an,XL as ao,Lu as ap,bL as aq,JL as ar,ZL as as,Bi as at,Ht as au,je as av,Ge as aw,Qs as ax,kt as ay,ro as az,dt as b,U as c,F as d,ve as e,Pf as f,B as g,uu as h,C as i,E as j,Be as k,Ze as l,te as m,ns as n,Gs as o,lt as p,q,V as r,Cn as s,yL as t,f as u,Yr as v,Ce as w,N as x,js as y,qo as z};
DesignScreenshot/output/test_run/baidu_test.html:2846:this.timer=setTimeout(function(){_this.save()},500)}},{key:"getData",value:function getData(cb){try{var storageStr=localStorage.getItem(this.lsName);if(storageStr){cb(storageStr)}else{cb("")}}catch(e){console.error(e);cb("")}}},{key:"save",value:function save(){var _this2=this;this.getData(function(str){var content=str+"\n"+_this2.tmpList.join("\n");try{localStorage.setItem(_this2.lsName,content)}catch(error){}})}}],[{key:"getInstance",value:function getInstance(){if(!this.instance){
DesignScreenshot/output/test_run/baidu_test.html:4667:</script><script>define("superman-san/app/chat-input/result_53c558b",["san","tslib","@searchfe/inject-js"],function(__WEBPACK_EXTERNAL_MODULE__0__,__WEBPACK_EXTERNAL_MODULE__1__,__WEBPACK_EXTERNAL_MODULE__5__){return a=[function(t,e){t.exports=__WEBPACK_EXTERNAL_MODULE__0__},function(t,e){t.exports=__WEBPACK_EXTERNAL_MODULE__1__},function(t,e,n){e=function(){"use strict";function o(t){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function o(t){return typeof t}:function o(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var r=n(0).defineComponent;function s(t){if(null===t||t===undefined)throw new TypeError("Cannot convert undefined or null to object");for(var e=Object(t),n=1;n<arguments.length;n++){var i=arguments[n];if(null!==i&&i!==undefined)for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(e[a]=i[a])}return e}t.exports=function(t,e,n){for(var i=function(t){var e=[t];"function"==typeof t&&(e.push(t.prototype),t.prototype.constructor&&e.push(t.prototype.constructor.prototype));return e}(t),a=0;a<i.length;a++)e&&("string"==typeof e?i[a].template=e:e instanceof Array?i[a].aPack=e:i[a].aNode=e),n.length&&function(t,e){for(var n={},i=0;i<e.length;i++)s(n,e[i]);var a=t.initData;t.initData=a?function(){return s({},a.call(this),{$style:n})}:function(){return{$style:n}}}(i[a],n);return"object"===o(t)?r(t):t}}.apply(e,[]);e===undefined||(t.exports=e)},function(t,e,n){e=function(){"use strict";t.exports=function(n){var l=[];return l.toString=function(){return this.map(function(t){var e=function(t,e){var n=t[1]||"",i=t[3];if(!i)return n;if(e&&"function"==typeof btoa){t=function(t){t=btoa(unescape(encodeURIComponent(JSON.stringify(t)))),t="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(t);return"/*# ".concat(t," */")}(i),e=i.sources.map(function(t){return"/*# sourceURL=".concat(i.sourceRoot||"").concat(t," */")});return[n].concat(e).concat([t]).join("\n")}return[n].join("\n")}(t,n);return t[2]?"@media ".concat(t[2]," {").concat(e,"}"):e}).join("")},l.i=function(t,e,n){"string"==typeof t&&(t=[[null,t,""]]);var i={};if(n)for(var a=0;a<this.length;a++){var o=this[a][0];null!=o&&(i[o]=!0)}for(var r=0;r<t.length;r++){var s=[].concat(t[r]);n&&i[s[0]]||(e&&(s[2]?s[2]="".concat(e," and ").concat(s[2]):s[2]=e),l.push(s))}},l}}.apply(e,[]);e===undefined||(t.exports=e)},function(t,e,n){"use strict";function l(t,e){for(var n=[],i={},a=0;a<e.length;a++){var o=e[a],r=o[0],o={id:t+":"+a,css:o[1],media:o[2],sourceMap:o[3]};i[r]?i[r].parts.push(o):n.push(i[r]={id:r,parts:[o]})}return n}n.r(e),n.d(e,"default",function(){return a});n="undefined"!=typeof document;if("undefined"!=typeof DEBUG&&DEBUG&&!n)throw new Error("vue-style-loader cannot be used in a non-browser environment. Use { target: 'node' } in your Webpack config to indicate a server-rendering environment.");var u={},i=n&&(document.head||document.getElementsByTagName("head")[0]),o=null,r=0,c=!1,s=function(){},p=null,d="data-vue-ssr-id",h="undefined"!=typeof navigator&&/msie [6-9]\b/.test(navigator.userAgent.toLowerCase());function a(r,t,e,n){c=!!n.runAsProduction||e,p=n||{};var s=l(r,t);return g(s),function(t){for(var e=[],n=0;n<s.length;n++){var i=s[n];(a=u[i.id]).refs--,e.push(a)}t?g(s=l(r,t)):s=[];for(var a,n=0;n<e.length;n++)if(0===(a=e[n]).refs){for(var o=0;o<a.parts.length;o++)a.parts[o]();delete u[a.id]}}}function g(t){for(var e=0;e<t.length;e++){var n=t[e],i=u[n.id];if(i){i.refs++;for(var a=0;a<i.parts.length;a++)i.parts[a](n.parts[a]);for(;a<n.parts.length;a++)i.parts.push(m(n.parts[a]));i.parts.length>n.parts.length&&(i.parts.length=n.parts.length)}else{for(var o=[],a=0;a<n.parts.length;a++)o.push(m(n.parts[a]));u[n.id]={id:n.id,refs:1,parts:o}}}}function f(){var t,e=document.createElement("style"),n=p.attributes||{};for(t in e.type="text/css",n)n.hasOwnProperty(t)&&e.setAttribute(t,n[t]);return i.appendChild(e),e}function m(e){var t,n,i,a=document.querySelector("style["+d+'~="'+e.id+'"]');if(a){if(c)return s;a.parentNode.removeChild(a)}return i=h?(t=r++,a=o=o||f(),n=_.bind(null,a,t,!1),_.bind(null,a,t,!0)):(a=f(),n=function(t,e){var n=e.css,i=e.media,a=e.sourceMap;i&&t.setAttribute("media",i);p.ssrId&&t.setAttribute(d,e.id);a&&(n+="\n/*# sourceURL="+a.sources[0]+" */",n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(a))))+" */");if(t.styleSheet)t.styleSheet.cssText=n;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(n))}}.bind(null,a),function(){a.parentNode.removeChild(a)}),n(e),function(t){t?t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap||n(e=t):i()}}var v,b=(v=[],function(t,e){return v[t]=e,v.filter(Boolean).join("\n")});function _(t,e,n,i){n=n?"":i.css;t.styleSheet?t.styleSheet.cssText=b(e,n):(i=document.createTextNode(n),(n=t.childNodes)[e]&&t.removeChild(n[e]),n.length?t.insertBefore(i,n[e]):t.appendChild(i))}},function(t,e){t.exports=__WEBPACK_EXTERNAL_MODULE__5__},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.s_session=e.ls=e.bds=e.$=e.F=void 0,e.F=window.F,e.$=window.$,e.bds=window.bds,e.ls=window.localStorage,e.s_session=window.s_session},,,,,,,,,,,,,,,,,,,,,,,,,,,function(t,u,e){"use strict";Object.defineProperty(u,"__esModule",{value:!0}),u.UploadFile=u.imageAccept=u.FILE_STATUS=u.UploadStatus=u.getFileNameSuffix=u.getFileType=u.suffixToFileType=u.UPLOAD_IMAGE_TYPE=u.UPLOAD_FILE_TYPE=void 0;var I=e(1),n=e(65),o="/aichat/api/file/sts",s="/aichat/api/file/upload",k="/aichat/api/file/loop",l="/aichat/api/knowledge/file/delete";u.UPLOAD_FILE_TYPE=[".pdf",".doc",".docx",".txt",".xls",".xlsx",".csv",".ppt",".pptx"],u.UPLOAD_IMAGE_TYPE=[".jpeg",".png",".jpg",".bmp",".webp"];var i=/\.(\w+)$/,a={pdf:"PDF",doc:"Word",docx:"Word",txt:"TXT",xls:"Excel",xlsx:"Excel",ppt:"PPT",pptx:"PPT",csv:"Excel",py:"Code",java:"Code",js:"Code",html:"Code",css:"Code",ts:"Code",c:"Code",cpp:"Code",cc:"Code",h:"Code",go:"Code"};u.suffixToFileType=function(t){if(!t)return"unknown";t=t.toLowerCase();return a[t]||"unknown"};u.getFileType=function(t){t=t.match(i);return t?(0,u.suffixToFileType)(t[1]):"unknown"};var C;u.getFileNameSuffix=function(t){t=t.match(i);return t?t[0]:""},(e=C=u.UploadStatus||(u.UploadStatus={}))[e.INIT=-1]="INIT",e[e.UPLOADING=0]="UPLOADING",e[e.BOS_SUCCESS=1]="BOS_SUCCESS",e[e.NETWORK_ERROR=2]="NETWORK_ERROR",e[e.RISK_DENY=3]="RISK_DENY",e[e.FILE_NUM_EXCEED_LIMIT=4]="FILE_NUM_EXCEED_LIMIT",e[e.FILE_SIZE_EXCEED_LIMIT=5]="FILE_SIZE_EXCEED_LIMIT",e[e.KNOWLEDGE_SUCCESS=6]="KNOWLEDGE_SUCCESS",e[e.KNOWLEDGE_ERROR=7]="KNOWLEDGE_ERROR",e[e.SET_FILE_NUM=8]="SET_FILE_NUM",e[e.NOT_AVAILABLE=9]="NOT_AVAILABLE",(e=u.FILE_STATUS||(u.FILE_STATUS={}))[e.UNACTIVE=0]="UNACTIVE",e[e.ACTIVE=1]="ACTIVE",e[e.EXPIRED=2]="EXPIRED";var T="https://chat.baidu.com";u.imageAccept=".jpeg, .png, .jpg, .bmp, .webp";var c=".pdf, .doc, .docx, .txt, .xls, .xlsx, .csv, .ppt, .pptx",p=(0,n.hitSample)("PC_AI_SEARCH_OLD_CODE")?"":".py, .java, .js, .html, .css, .ts, .c, .cpp, .cc, .h, .go",d=u.imageAccept+", "+c;r.create=function(n){return(0,I.__awaiter)(this,void 0,void 0,function(){var e;return(0,I.__generator)(this,function(t){switch(t.label){case 0:return(e=null,n.isChatSearch)?(e=n.sdk,[3,3]):[3,1];case 1:return[4,function(){return(0,I.__awaiter)(this,void 0,void 0,function(){return(0,I.__generator)(this,function(t){return[2,new Promise(function(e,n){window.require(["@baiducloud/sdk/dist/baidubce-sdk.bundle.min"],function(t){e(t)},function(t){n(t)})})]})})}()];case 2:e=t.sent(),t.label=3;case 3:return[2,new r(n,e)]}})})},r.prototype.getFile=function(l){return(0,I.__awaiter)(this,void 0,void 0,function(){var s=this;return(0,I.__generator)(this,function(t){return[2,new Promise(function(e,n){try{var t=document.createElement("input"),i=s.options,a=i.type,o=i.maxNum;t.type="file",t.accept="all"===a?d:"image"===a?u.imageAccept:c+", "+p,t.multiple=1<o,t.onchange=function(t){return s.handleFileChange(t,e,n,l)},t.click()}catch(r){n(r)}})]})})},r.prototype.getCouldUploadFiles=function(t){var e=t.filter(function(t){t=t.name.split(".")||[],t=null===t?void 0:t[t.length-1];return t&&(d+", "+p).includes(t.toLocaleLowerCase())});return e.length!==t.length&&this.options.callback({status:C.NOT_AVAILABLE}),e},r.prototype.handleFileChange=function(u,c,p,d){return(0,I.__awaiter)(this,void 0,void 0,function(){var n,i,a,o,r,s,l=this;return(0,I.__generator)(this,function(t){switch(t.label){case 0:if(t.trys.push([0,2,,3]),o=null==u?void 0:u.target,o=Array.from(o.files||[]),o=this.getCouldUploadFiles(o),d&&!d(o))return[2];if(o.length>this.options.maxNum)return this.options.callback({status:C.FILE_NUM_EXCEED_LIMIT}),p(new Error("File selection failed")),[2];this.options.callback({status:C.SET_FILE_NUM,num:o.length});try{for(n=(0,I.__values)(o),i=n.next();!i.done;i=n.next()){if((a=i.value).size>1024*this.options.maxSize*1024)return this.options.callback({status:C.FILE_SIZE_EXCEED_LIMIT}),p(new Error("File selection failed")),[2];if(0===a.size)return this.options.callback({status:C.RISK_DENY}),p(new Error("File selection failed")),[2]}}catch(e){r={error:e}}finally{try{i&&!i.done&&(s=n["return"])&&s.call(n)}finally{if(r)throw r.error}}return this.files=o,[4,Promise.all(o.map(function(t,e){return l.uploadFile(t,e)}))];case 1:return t.sent(),c(),[3,3];case 2:return o=t.sent(),p(o),[3,3];case 3:return[2]}})})},r.prototype.uploadFiles=function(t){var n=this;return Promise.all(this.getCouldUploadFiles(t).map(function(t,e){return n.uploadFile(t,e)}))},r.prototype.uploadFile=function(d,h){return void 0===h&&(h=0),(0,I.__awaiter)(this,void 0,void 0,function(){var p,e=this;return(0,I.__generator)(this,function(t){return p=Date.now()+h+function(){var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_",e="",n=new Uint8Array(6);crypto.getRandomValues(n);for(var i=0;i<6;i++)e+=t[n[i]%t.length];return e}(),[2,new Promise(function(u,c){return(0,I.__awaiter)(e,void 0,void 0,function(){var e,n,i,a,o,l=this;return(0,I.__generator)(this,function(t){switch(t.label){case 0:return(t.trys.push([0,3,,4]),d)?(this.files||(this.files=[d]),d.size>1024*this.options.maxSize*1024?(this.options.callback({status:C.FILE_SIZE_EXCEED_LIMIT}),c(new Error("File selection failed")),[2]):0===d.size?(this.options.callback({status:C.RISK_DENY}),c(new Error("File selection failed")),[2]):(this.sdk||navigator.onLine||this.options.callback({status:C.NETWORK_ERROR,fileInfo:{fileIndex:h}}),[4,this.getSts()])):[2];case 1:return i=t.sent(),e=i.ak,a=i.sk,o=i.token,n=i.preFixPath,this.options.callback({status:C.INIT,progress:0,fileInfo:{fileName:d.name,fileType:d.type,fileSize:d.size,fileIndex:h,fileToken:p}}),i=this.sdk.BosClient,a=new i({endpoint:"https://aisearch.bj.bcebos.com",credentials:{ak:e,sk:a},sessionToken:o}),i=null===(o=d.name)||void 0===o?void 0:o.split(".").pop(),o=this.sdk.MimeType.guess(i),i=p+"."+i,o.startsWith("text/")&&(o+="; charset=UTF-8"),[4,a.putSuperObject({bucketName:"aisearch",objectName:n+i,chunkSize:1048576,ContentLength:d.size,ContentType:o,data:d,onProgress:function(t){t=t.progress;l.options.callback({status:C.UPLOADING,progress:t,fileInfo:{fileIndex:h,fileToken:p}})},onStateChange:function(r,s){return(0,I.__awaiter)(l,void 0,void 0,function(){var e,n,i,a,o;return(0,I.__generator)(this,function(t){switch(t.label){case 0:if("completed"!==r)return[3,7];t.label=1;case 1:return t.trys.push([1,5,,6]),this.options.callback({status:C.UPLOADING,progress:1,fileInfo:{fileIndex:h,fileToken:p}}),e=s.data.key,n=btoa(e.split("/").pop()),[4,this.upLoadConfirm({path:e,size:d.size,name:d.name,id:n,type:"all"===this.options.type?d.type.startsWith("image/")?"image":"file":this.options.type},h)];case 2:return i=t.sent().file_url,this.options.callback({status:C.BOS_SUCCESS,progress:1,fileInfo:{fileIndex:h,fileId:n,fileUrl:i,filePath:e,fileToken:p}}),!this.options.knowledgeId||this.preventUploadSet.has(p)?[3,4]:[4,this.getUploadKnowledgeStatus(n)];case 3:t.sent(),this.options.callback({status:C.KNOWLEDGE_SUCCESS,fileInfo:{fileToken:p,fileUrl:i}}),t.label=4;case 4:return u(),[3,6];case 5:return o=t.sent(),o=(null==(a=o)?void 0:a.status)||C.NETWORK_ERROR,this.options.callback({status:o,fileInfo:{fileIndex:h,fileToken:p}}),c(a),[3,6];case 6:return[3,8];case 7:"failed"===r&&(this.options.callback({status:C.NETWORK_ERROR,fileInfo:{fileIndex:h,fileToken:p}}),c(new Error("Network disconnected"))),t.label=8;case 8:return[2]}})})}}).start()];case 2:return t.sent(),[3,4];case 3:return o=t.sent(),o=(null==(a=o)?void 0:a.status)||C.NETWORK_ERROR,this.options.callback({status:o,fileInfo:{fileIndex:h,fileToken:p}}),c(a),[3,4];case 4:return[2]}})})})]})})},r.prototype.reTryUpload=function(){return(0,I.__awaiter)(this,void 0,void 0,function(){var e,n=this;return(0,I.__generator)(this,function(t){switch(t.label){case 0:return e=this.files,[4,Promise.all(e.map(function(t,e){return n.uploadFile(t,e)}))];case 1:return[2,t.sent()]}})})},r.prototype.getSts=function(){return(0,I.__awaiter)(this,void 0,void 0,function(){var e=this;return(0,I.__generator)(this,function(t){return[2,new Promise(function(i,a){return(0,I.__awaiter)(e,void 0,void 0,function(){var e,n;return(0,I.__generator)(this,function(t){switch(t.label){case 0:return t.trys.push([0,3,,4]),e=(this.options.sseHost||T)+o+("?tk="+this.options.token)+(this.options.knowledgeId?"&knowledgeId="+this.options.knowledgeId:""),[4,fetch(e,{mode:"cors",credentials:"include"})];case 1:return(n=t.sent()).ok||a({status:C.NETWORK_ERROR}),[4,n.json()];case 2:return 0===(n=t.sent()).status?i(n.data):a({status:C.NETWORK_ERROR}),[3,4];case 3:return t.sent(),a({status:C.NETWORK_ERROR}),[3,4];case 4:return[2]}})})})]})})},r.prototype.upLoadConfirm=function(o,r){return(0,I.__awaiter)(this,void 0,void 0,function(){var e=this;return(0,I.__generator)(this,function(t){return[2,new Promise(function(i,a){return(0,I.__awaiter)(e,void 0,void 0,function(){var e,n;return(0,I.__generator)(this,function(t){switch(t.label){case 0:return t.trys.push([0,3,,4]),n=(this.options.sseHost||T)+s+("?tk="+this.options.token),[4,fetch(n,{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify(Object.assign({},o,this.options.uploadBody,this.options.knowledgeId?{knowledgeId:this.options.knowledgeId,sort:r}:{}))})];case 1:return[4,t.sent().json()];case 2:return e=t.sent(),e=(n=e||{}).status,n=n.data,0===e?i(n):a(-1===e||-5===e?{status:C.RISK_DENY}:{status:C.NETWORK_ERROR}),[3,4];case 3:return t.sent(),a({status:C.NETWORK_ERROR}),[3,4];case 4:return[2]}})})})]})})},r.prototype.loop=function(){return(0,I.__awaiter)(this,void 0,void 0,function(){var i,a,o,r,s,l,u,c,p,d,h,g,f,m,v,b,_,x,w,y,S,E=this;return(0,I.__generator)(this,function(t){switch(t.label){case 0:if(!this.uploadMap.size)return[2];i=1e3,a=Date.now();try{for(o=(0,I.__values)(Array.from(this.uploadMap.keys())),r=o.next();!r.done;r=o.next())m=r.value,(v=this.uploadMap.get(m))&&(s=(0,I.__read)(v,3),l=s[0],_=s[2],1e4+i<a-l&&(_({status:C.KNOWLEDGE_ERROR}),this.uploadMap["delete"](m)))}catch(e){x={error:e}}finally{try{r&&!r.done&&(w=o["return"])&&w.call(o)}finally{if(x)throw x.error}}u=Array.from(this.uploadMap.keys()),t.label=1;case 1:return t.trys.push([1,4,5,6]),c=""+(this.options.sseHost||T)+k+"?knowledgeId="+this.options.knowledgeId+"&fids="+u.join(",")+"&tk="+this.options.token,[4,fetch(c)];case 2:return[4,t.sent().json()];case 3:for(m in c=t.sent(),p=c.data.data)(v=this.uploadMap.get(m))&&(d=(0,I.__read)(v,3),h=d[1],_=d[2],1===p[m]?h():_({status:C.KNOWLEDGE_ERROR}),this.uploadMap["delete"](m));return[3,6];case 4:t.sent();try{for(g=(0,I.__values)(u),f=g.next();!f.done;f=g.next())m=f.value,(v=this.uploadMap.get(m))&&(b=(0,I.__read)(v,3),(_=b[2])({status:C.KNOWLEDGE_ERROR}),this.uploadMap["delete"](m))}catch(n){y={error:n}}finally{try{f&&!f.done&&(S=g["return"])&&S.call(g)}finally{if(y)throw y.error}}return[3,6];case 5:return this.uploadMap.size?setTimeout(function(){return E.loop()},i):this.inLoop=!1,[7];case 6:return[2]}})})},r.prototype.getUploadKnowledgeStatus=function(a){return(0,I.__awaiter)(this,void 0,void 0,function(){var i=this;return(0,I.__generator)(this,function(t){return[2,new Promise(function(e,n){return(0,I.__awaiter)(i,void 0,void 0,function(){return(0,I.__generator)(this,function(t){return this.uploadMap.set(a,[Date.now(),e,n]),this.inLoop||(this.inLoop=!0,this.loop()),[2]})})})]})})},r.deleteFile=function(o,r,s){return(0,I.__awaiter)(this,void 0,void 0,function(){var e,n,i,a;return(0,I.__generator)(this,function(t){switch(t.label){case 0:return t.trys.push([0,3,,4]),e=r.sseHost,a=r.knowledgeId,n=r.fileId,i=r.fileToken,a=""+(e||T)+l+"?knowledgeId="+a+"&fileId="+n+"&tk="+r.token,o&&(o.uploadMap["delete"](n),i&&o.preventUploadSet.add(i)),n?[4,fetch(a)]:[3,2];case 1:t.sent(),s&&s(),t.label=2;case 2:return[3,4];case 3:return t.sent(),[3,4];case 4:return[2]}})})},n=r;function r(t,e){this.files=[],this.inLoop=!1,this.preventUploadSet=new Set,this.uploadMap=new Map,this.options=t,this.sdk=e}u.UploadFile=n},,,,,,,,,,,,,,,,,,,,,,,,,,,,function(t,e){t.exports=' <div class="{{$style[\'chat-input-background\']}}"> <div id="input-root" style="height: {{rootHeight}}px"> <chat-input initial-row="{{initialRow}}" ai-placeholder="{{guideWord}}"> <file-container s-if="{{fileList && fileList.length && isHome}}" file-list="{{fileList}}" slot="top-band" on-show-delete="handleFileContainerLog"></file-container> <div s-if="{{!isAiPanelSearch && isShowDeepSearch}}" slot="left-tool"> <d-tooltip content="{{isAiSearch ? \'\' : hoverText.deepSearch}}" on-hover="sendUbcLog(\'show\', \'aisou_hover\')" top="48" anchor="left"> <div class="{{$style[\'aisearch-btn\']}} {{isAiSearch ? $style[\'aisearch-btn-active\']: $style[\'aisearch-btn-deactive\']}}" on-click="handleClickAiSearch($event)"> <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20"> <path xmlns="http://www.w3.org/2000/svg" d="M9.99962 3.56027C12.9286 1.80482 15.7468 1.4081 17.1461 2.80734C18.5453 4.20558 18.1468 7.02324 16.3912 9.95187C18.1471 12.8808 18.5461 15.6989 17.1471 17.0984C15.7477 18.4977 12.9288 18.0996 9.99962 16.3435C7.07099 18.0991 4.25333 18.4975 2.85509 17.0984C1.45595 15.6992 1.853 12.8805 3.60802 9.95187C1.853 7.02337 1.45596 4.20455 2.85509 2.80636C4.25329 1.40759 7.07143 1.80565 9.99962 3.56027ZM4.43224 11.197C3.23935 13.4025 2.9844 15.344 3.79649 16.1569C4.6086 16.9691 6.54976 16.7131 8.75548 15.5202C7.96542 14.9464 7.18096 14.2784 6.42735 13.5251C5.67394 12.7717 5.00603 11.987 4.43224 11.197ZM15.568 11.196C14.994 11.9863 14.3265 12.7715 13.5729 13.5251C12.8192 14.2788 12.034 14.9462 11.2438 15.5202C13.4499 16.7134 15.3923 16.9681 16.2047 16.1569C17.017 15.3447 16.7615 13.4023 15.568 11.196ZM10.0006 5.14035C9.12238 5.7335 8.2287 6.46303 7.36974 7.32199C6.51095 8.18077 5.78118 9.07393 5.1881 9.95187C5.78132 10.8303 6.51057 11.7245 7.36974 12.5837C8.22856 13.4425 9.12252 14.1714 10.0006 14.7644C10.8787 14.1713 11.7726 13.4425 12.6315 12.5837C13.4905 11.7246 14.219 10.8302 14.8121 9.95187C14.2191 9.074 13.4901 8.1806 12.6315 7.32199C11.7725 6.46301 10.8788 5.7335 10.0006 5.14035ZM9.99767 8.50851C10.3805 8.50851 10.7484 8.6597 11.0191 8.93039C11.2899 9.20113 11.442 9.56898 11.442 9.95187C11.442 10.3346 11.2897 10.7017 11.0191 10.9724C10.7484 11.2431 10.3806 11.3952 9.99767 11.3952C9.6149 11.3951 9.24782 11.243 8.97716 10.9724C8.70651 10.7017 8.55435 10.3347 8.55431 9.95187C8.55431 9.56898 8.70641 9.20113 8.97716 8.93039C9.2478 8.65987 9.61501 8.5086 9.99767 8.50851ZM8.75548 4.38351C6.55014 3.19109 4.60849 2.93675 3.79649 3.74875C2.98472 4.56095 3.23966 6.50237 4.43224 8.70773C5.00602 7.91753 5.67307 7.13219 6.42638 6.37863C7.18016 5.6251 7.96523 4.95737 8.75548 4.38351ZM16.2047 3.74875C15.3925 2.93662 13.4506 3.19148 11.2447 4.38449C12.0349 4.95825 12.8203 5.62537 13.5738 6.37863C14.3272 7.13226 14.9941 7.91764 15.568 8.70773C16.7605 6.50207 17.0159 4.56084 16.2047 3.74875Z" fill="currentColor" fill-opacity="0.85"/> </svg> <span>深度搜索</span> </div> </d-tooltip> </div> <div slot="right-tool" class="{{$style[\'right-tool\']}} {{!isShowFileUpload && !isShowMic ? $style[\'right-tool-no-margin\'] : \'\'}}"> <div id="smart-input-mic" class="{{$style[\'smart-input-mic\']}}" on-click="handleClickMic($event)"> <d-tooltip content="语音搜索"> <div class="{{$style[\'tool-item\']}}"> <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20" fill="currentColor" class="{{$style[\'week-svg\']}}"> <path d="M15.8886 12.1672C16.0846 11.8472 16.4952 11.721 16.8407 11.887C17.2092 12.0642 17.3643 12.5066 17.1874 12.8752L17.0624 13.1233C15.8397 15.456 13.4938 17.1087 10.7411 17.3625V18.6106C10.7411 19.0197 10.409 19.3518 9.99992 19.3518C9.59082 19.3518 9.25871 19.0197 9.25871 18.6106V17.3625C6.50644 17.1085 4.16103 15.4558 2.93839 13.1233L2.81339 12.8752L2.7841 12.8059C2.65664 12.4528 2.81445 12.053 3.16007 11.887C3.50571 11.721 3.91626 11.8471 4.11222 12.1672L4.14835 12.2336L4.24992 12.4368C5.33499 14.5067 7.50371 15.9161 9.99992 15.9163C12.5769 15.9162 14.8043 14.4136 15.8515 12.2336L15.8886 12.1672ZM10.1259 0.835205C12.7649 0.902096 14.8835 3.06198 14.8837 5.71704V9.23364L14.8827 9.35962C14.8159 11.9988 12.6552 14.1174 9.99992 14.1174L9.87394 14.1165C7.27671 14.0506 5.18287 11.9569 5.1171 9.35962L5.11613 9.23364V5.71704C5.11629 3.01985 7.3027 0.83331 9.99992 0.833252L10.1259 0.835205ZM9.99992 2.3147C8.1209 2.31476 6.59773 3.83805 6.59757 5.71704V9.23364C6.59764 11.1127 8.12084 12.6359 9.99992 12.636C11.879 12.636 13.4022 11.1128 13.4023 9.23364V5.71704C13.4021 3.83802 11.879 2.3147 9.99992 2.3147Z"/> </svg> </div> </d-tooltip> </div> <d-tooltip s-if="{{isShowFileUpload}}" content="{{hoverText.file}}" maxWidth="300"> <div on-click="handleClickUploadFile(\'file\', null , $event)" class="{{$style[\'tool-item\']}}"> <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20" fill="none" class="{{$style[\'week-svg\']}}"> <path d="M11.4405 5.94065L7.25022 10.1309C6.52703 10.8541 6.52703 12.0266 7.25022 12.7498V12.7498C7.97342 13.473 9.14595 13.473 9.86914 12.7498L11.3095 11.3094L14.0594 8.55957L14.7141 7.90484C16.1605 6.45845 16.1605 4.1134 14.7141 2.66701V2.66701C13.2677 1.22062 10.9227 1.22062 9.4763 2.66701L3.97658 8.16673C1.807 10.3363 1.807 13.8539 3.97658 16.0235V16.0235C6.14616 18.1931 9.66374 18.193 11.8333 16.0235L16.6783 11.1785" stroke="currentColor" stroke-width="1.48148"/> </svg> </div> </d-tooltip> <d-tooltip s-if="{{isShowFileUpload}}" content="{{hoverText.pic}}"> <div on-click="handleClickUploadFile(\'image\', null , $event)" class="{{$style[\'tool-item\']}}"> <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20" fill="none" class="{{$style[\'week-svg\']}}"> <path d="M1.85254 4.81475C1.85254 3.58745 2.84746 2.59253 4.07476 2.59253H15.9266C17.1539 2.59253 18.1488 3.58745 18.1488 4.81475V15.1851C18.1488 16.4124 17.1539 17.4073 15.9266 17.4073H4.07476C2.84746 17.4073 1.85254 16.4124 1.85254 15.1851V4.81475Z" stroke="currentColor" stroke-width="1.48148"/> <circle cx="13.7134" cy="7.14282" r="1.75926" stroke="currentColor" stroke-width="1.48148"/> <path d="M1.85254 14.2326L5.08479 9.72923C5.81885 8.70649 7.25508 8.49716 8.25052 9.26783L17.4999 16.4286" stroke="currentColor" stroke-width="1.48148"/> </svg> </div> </d-tooltip> </div> <div slot="chat-input-extension"> <div class="{{$style[\'panel-list\']}}"> <panel-btn s-for="panel, pindex in inputPanel" panel="{{panel}}" pos="{{pindex + 1}}" on-click="handleClickPanelBtn" on-show-log="handlePanelBtnShow"></panel-btn> </div> </div> </chat-input> </div> <d-toast s-ref="toast" message="{{toastMsg}}" duration="{{toastDuration}}"></d-toast> <animation-video s-if="{{isShowOpenningAnime}}"></animation-video> </div> '},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i,p=n(1),a=n(0),o=(0,p.__importDefault)(n(233)),s=(0,p.__importDefault)(n(236)),r=(0,p.__importDefault)(n(272)),l=(0,p.__importDefault)(n(275)),u=(0,p.__importDefault)(n(278)),c=(0,p.__importDefault)(n(281)),d=(0,p.__importDefault)(n(284)),h=n(33),g=n(6),f=[],m="https://chat.baidu.com",v={office_create:7,photo_editing:8,ai_ppt:9,ai_read:10,ai_code:11},n=n(5),n=(i=a.Component,(0,p.__extends)(b,i),b.prototype.initData=function(){return{rootHeight:102,isHome:!0,initialRow:2,isAiSearch:!1,isShowMic:!1,isShowFileUpload:!0,isAiPanelSearch:!1,isShowOpenningAnime:!1,fileItem:null,panelMaxHeight:358,isShowDeepSearch:!0,inputPanel:[],guideWordPrefix:"",guideWord:"",isFileUploading:!1,token:"",fileList:[],toastMsg:"",toastDuration:2e3,hoverText:{},hasShowOverWordToast:!1,ro:null}},b.prototype.attached=function(){var c=this;this.checkAnime(),this.handlePopStateCallback=this.handlePopState.bind(this),window.addEventListener("popstate",this.handlePopStateCallback),this.nextTick(function(){var l,u,e,n,t,i,a,o,r=document.querySelector("#input-root");c.chatInputInstance=new s["default"]({rootDom:r,initialRow:c.data.get("initialRow"),isSsr:!0,initialFocus:!0,hasOpenAnime:!0,panelMaxHeight:c.data.get("panelMaxHeight"),aiPlaceholder:c.data.get("guideWord")}),c.chatInputInstance.on("panel-close",function(){c.resetStatus()}),c.chatInputInstance.on("change",function(t){var e=(0,g.$)("#main-wrapper");"normal"===t&&e.length&&e.trigger("smartInputRerender")}),c.chatInputInstance.on("panel-scroll",function(){c.sendUbcLog("slide","function_panel",{})}),c.chatInputInstance.on("prefix-click",function(){c.sendUbcLog("click","search_kuang",{pos:"title_hover"})}),c.chatInputInstance.on("threshold",function(t){c.showToast({message:"最多发送"+t+"字符内容"})}),c.chatInputInstance.on("prefix-hover",function(){c.sendUbcLog("show","title_hover",{})}),c.chatInputInstance.on("panel-render",function(t){c.data.set("isAiPanelSearch",!0),c.resetMic(!1),"ai_chat"!==t.type&&(c.data.set("isShowFileUpload",!1),c.data.set("fileList",[]))}),c.chatInputInstance.on("input",function(t){"ai"!==c.chatInputInstance.getMode()&&(c.checkSupportIs(),(0,g.$)("#kw").val(t),76<t.length&&!c.data.get("hasShowOverWordToast")&&(c.showToast({message:"当前内容超过76字符，将跳转AI助手提供更优质回答",duration:4e3}),c.data.set("hasShowOverWordToast",!0)))}),c.chatInputInstance.on("panel-item-click",function(t){c.sendUbcLog("click","function_panel",{function_tab:t.functionTab,function_name:t.functionName}),"ai_read"===c.chatInputInstance.getCurrentPanelName()&&c.data.set("fileList",[]),c.chatInputInstance.addAiInputContent(t)}),c.chatInputInstance.on("panel-item-upload",c.handleClickUploadFile.bind(c)),c.chatInputInstance.on("prefix-file-click-delete",function(){c.handleFileContainerLog({type:"click",value:"file_clear"}),c.handlePrefixClear()}),c.chatInputInstance.on("prefix-file-back-delete",function(){c.data.set("fileList",[])}),c.chatInputInstance.on("clear",function(){c.sendUbcLog("click","content_clear")}),c.chatInputInstance.on("click",function(t){c.sendUbcLog("click","search_kuang",{query:t,is_query_over:76<t.length?"1":"0",pos:"searchbox"})}),c.chatInputInstance.on("submit",c.handleSubmit.bind(c)),r&&(l=r.querySelector(".tools-clear-icon"),u=l.classList.contains("show-clear-icon"),l&&new MutationObserver(function(t){var e,n;try{for(var i=(0,p.__values)(t),a=i.next();!a.done;a=i.next()){var o,r=a.value;"attributes"!==r.type||"class"!==r.attributeName||(o=l.classList.contains("show-clear-icon"))!==u&&(u=o)&&c.sendUbcLog("show","content_clear")}}catch(s){e={error:s}}finally{try{a&&!a.done&&(n=i["return"])&&n.call(i)}finally{if(e)throw e.error}}}).observe(l,{attributes:!0,attributeFilter:["class"]}),c.watch("isAiSearch",function(t){var e,n,i=r.querySelector("#chat-textarea");i&&(i=t?null!==(e=i.dataset.aiPlaceholder)&&void 0!==e?e:"":null!==(n=i.dataset.normalPlaceholder)&&void 0!==n?n:"",n=c.data.get("guideWordPrefix"),c.chatInputInstance.setPlaceHolder(t&&n?n+i:i),c.resetMic(!t))}),(t=(0,g.$)("#chat-input-main")).length&&t.on("homepredict",function(){c.chatInputInstance.setInitalRow(1),c.data.set("isHome",!1),c.data.set("initialRow",1)}),e=r.querySelector(".chat-input-container"),n=document.querySelector("#head_wrapper"),t=document.querySelector(".smart_input_height_superman"),i=!0,a=t?"35%":"39%",e&&"undefined"!=typeof ResizeObserver&&n&&(null!=(o=new ResizeObserver(function(){var t;null!==(t=null===(t=window.bds)||void 0===t?void 0:t.comm)&&void 0!==t&&t.ishome&&!i&&(t=e.clientHeight,c.data.set("rootHeight",t+3),n.style.height="calc("+a+" + "+t+"px)"),i=!1}))&&o.observe(e),c.data.set("ro",o)),"normal"!==c.chatInputInstance.getMode()||(o=(0,g.$)("#main-wrapper")).length&&o.trigger("smartInputRerender"))})},b.prototype.handlePopState=function(){var t;try{var e=new URL(location.href).searchParams,n=e.get("wd")||e.get("word");this.chatInputInstance.getValue()||(null!==(t=this.chatInputInstance)&&void 0!==t&&t.closeSugUpdate(),this.chatInputInstance.setValue(n))}catch(err){console.warn(err)}},b.prototype.disposed=function(){var t;window.removeEventListener("popstate",this.handlePopStateCallback);var e=this.data.get("ro");null!==(t=null==e?void 0:e.disconnect)&&void 0!==t&&t.call(e)},b.prototype.checkSupportIs=function(){var t,e;null!==(t=null===(e=window.bds)||void 0===e?void 0:e.comm)&&void 0!==t&&t.supportis&&(this.data.set("isShowOpenningAnime",!1),this.data.set("rootHeight",0),null!==(t=null==(e=this.data.get("ro"))?void 0:e.disconnect)&&void 0!==t&&t.call(e),this.data.set("ro",null))},b.prototype.gotoChat=function(t){var e=t.query,n=t.sseQuery,i=t.hasImage,a=t.hasFile,o="input_overq",r="input_overq",s={ai_chat:"aidialog",ai_ppt:"ppt",office_create:"office",photo_editing:"pic",ai_read:"read",ai_code:"code"},l=this.chatInputInstance.getFunctionInfo(),t=l.functionType,l=l.functionName;s[t]?r=(o="functab_"+s[t])+(l?"_"+l:""):this.data.get("isAiSearch")?r=o="aiinput_other":i?r=o="aiinput_duomo_pic":a&&(r=o="aiinput_duomo_file");a={};this.data.get("isAiSearch")&&(a={modelName:"smartMode",modelFunction:{deepSearch:"1"}}),location.href=m+"/search?word="+encodeURIComponent(e)+"&extParamsJson="+encodeURIComponent(JSON.stringify({enter_type:"home_"+o,sa:"home_"+r}))+(a?"&usedModel="+encodeURIComponent(JSON.stringify(a)):"")+(0!==n.length?"&fileInfo="+encodeURIComponent(JSON.stringify(n)):"")+(v[t]?"&openInputMode="+v[t]:"")},b.prototype.checkAnime=function(){var t="INPUT_ANIME_LAST_SHOWN_DATE",e=(new Date).toISOString().split("T")[0];localStorage.getItem(t)!==e&&(this.data.set("isShowOpenningAnime",!0),localStorage.setItem(t,e))},b.prototype.resetMic=function(t){window.__supportvoice&&(this.data.set("isShowMic",t),(0,g.$)("#smart-input-mic").css("display",t?"block":"none"))},b.prototype.resetStatus=function(){this.data.set("fileList",[]),this.data.set("isAiSearch",!1),this.resetMic(!0),this.data.set("isAiPanelSearch",!1),this.data.set("isShowFileUpload",!0),this.data.set("isShowDeepSearch",!0)},b.prototype.handleClickAiSearch=function(t){null!=t&&t.stopPropagation(),null!==(t=this.chatInputInstance)&&void 0!==t&&t.setFocus();t=!this.data.get("isAiSearch");this.sendUbcLog("click","deepsearch_btn",{aisou_btn:t?"1":"0"}),this.data.set("isAiSearch",t),this.resetMic(!t),localStorage.setItem("SUPERPAGE_AISEARCH",t?"1":"0")},b.prototype.handleClickMic=function(t){t.stopPropagation(),this.sendUbcLog("click","search_kuang",{pos:"voice",query:this.chatInputInstance.getValue(),is_query_over:76<this.chatInputInstance.getValue().length?"1":"0"})},b.prototype.handleFileContainerLog=function(t){var e=this.chatInputInstance.getCurrentPanelName();this.sendUbcLog(t.type,t.value,{area:e||"blank",aisou_btn:!e&&this.data.get("isAiSearch")?"1":"0"})},b.prototype.handlePrefixClear=function(){var t;this.data.set("fileList",[]),this.chatInputInstance.getCurrentPanelName()||(t=this.chatInputInstance.getValue(),this.chatInputInstance.reset(),this.chatInputInstance.setValue(t))},b.prototype.handleClickUploadFile=function(c,i,a){var o;return(0,p.__awaiter)(this,void 0,void 0,function(){var r,s,l,e,n,u=this;return(0,p.__generator)(this,function(t){switch(t.label){case 0:return null!==(o=null==a?void 0:a.stopPropagation)&&void 0!==o&&o.call(a),(e=(0,g.$)('.result-molecule[tpl="app/chat-input"]')).length&&e.trigger("duomo-btn-click",{uploadType:c,uploadFile:i}),this.sendUbcLog("click","search_kuang",{pos:"file"===c?c:"pic",query:this.chatInputInstance.getValue(),is_query_over:76<this.chatInputInstance.getValue().length?"1":"0"}),r=this.chatInputInstance.getValue(),s=+new Date,l=null,n=function(t){var n=t.status,i=t.fileInfo,a=t.progress,o=u.data.get("fileList");if(n===h.UploadStatus.INIT){1<=f.length&&(f.shift(),o.shift());var e=!1;f.forEach(function(t){t.timeStamp===s&&(e=!0)}),e||(f.push({uploadFileIns:l,timeStamp:s}),u.chatInputInstance.fileUpLoadInput(),u.resetMic(!1),r&&u.chatInputInstance.setValue(r)),!o.length&&i&&o.push({status:h.UploadStatus.UPLOADING,timeStamp:s,fileName:i.fileName,uploadType:c,fileType:(0,h.getFileType)(i.fileName),fileSize:i.fileSize,progress:a,fileId:i.fileId})}else if(n===h.UploadStatus.UPLOADING)o.forEach(function(t,e){t.timeStamp===s&&(o[e].status=n,o[e].progress=a)}),u.data.set("isFileUploading",!0);else if(n===h.UploadStatus.NOT_AVAILABLE)u.showToast({message:"暂不支持此格式，换个文件试试"}),u.data.set("isFileUploading",!1);else if(n===h.UploadStatus.BOS_SUCCESS)o.forEach(function(t,e){t.timeStamp===s&&(o[e].progress=a,o[e].status=n,o[e].url=null==i?void 0:i.fileUrl,o[e].fileId=null==i?void 0:i.fileId,o[e].filePath=null==i?void 0:i.filePath)}),u.handleFileContainerLog({type:"show",value:"file_icon"}),u.data.set("isFileUploading",!1);else if(n===h.UploadStatus.NETWORK_ERROR)o.forEach(function(t,e){t.timeStamp===s&&(o[e].status=n)}),u.showToast({message:"网络错误，请重试"}),f.pop(),o.shift(),u.chatInputInstance.reset(),u.data.set("isFileUploading",!1);else{if(n===h.UploadStatus.RISK_DENY)return u.showToast({message:"当前文件暂不支持，换个文件试试吧"}),f.pop(),o.shift(),u.chatInputInstance.reset(),void u.data.set("isFileUploading",!1);if(n===h.UploadStatus.FILE_SIZE_EXCEED_LIMIT)return u.showToast({message:"file"===c?"文件超过50M，请重新选择后上传":"图片超过10M，请重新选择后上传"}),f.pop(),o.shift(),u.chatInputInstance.reset(),void u.data.set("isFileUploading",!1);u.data.set("isFileUploading",!1)}t=JSON.parse(JSON.stringify(o));u.data.get("isHome")||u.chatInputInstance.renderAiInputFilePrefix(t[0]),u.data.set("fileList",t)},e=window.s_session.qid||"",n={type:c,maxSize:50,maxNum:1,token:btoa(this.data.get("token")+"||"+s+"|"+e)+"-"+e,callback:n},"image"===c&&(n.maxSize=10),[4,h.UploadFile.create(n)];case 1:return l=t.sent(),(i?l.uploadFile(i):l.getFile())["catch"](function(){}),[2]}})})},b.prototype.showToast=function(t){var e=t.message,t=t.duration,t=void 0===t?2e3:t;this.data.set("toastMsg",e),this.data.set("toastDuration",t),this.ref("toast").show()},b.prototype.handlePanelBtnShow=function(t){var e=t.value,t=t.ext;this.sendUbcLog("show",e,t)},b.prototype.handleSubmit=function(t,e){if(this.sendUbcLog("click","search_kuang",{query:t,is_query_over:76<t.length?"1":"0",pos:e}),"ai"===this.chatInputInstance.getMode()){var a,o,n=this.data.get("fileList"),i=this.data.get("isFileUploading");n.filter(function(t){return 0===t.status}).length||i?this.showToast({message:"文件上传中"}):0!==n.length||t?(r=t.slice(0,1e3),o=a=!1,s=n.map(function(t){var e,n,i=t.uploadType;return"image"===i?a=!0:"file"===i&&(o=!0),{type:null==i?void 0:i.toUpperCase(),data:((e={})[i]=(0,p.__assign)(((n={})[i+"_url"]=t.url,n[i+"_id"]=t.fileId,n),"file"===i?{file_name:t.fileName,file_type:t.fileType,file_size:t.fileSize}:{}),e)}}),r&&0!==(null==s?void 0:s.length)&&s.unshift({data:{text:{query:r}},type:"TEXT"}),"sug"===e&&this.chatInputInstance.hideSug(!0),this.gotoChat({query:r,sseQuery:s,hasImage:a,hasFile:o})):this.showToast({message:"请输入你的问题"})}else{var r=document.querySelector("#chat-textarea"),s=(null==r?void 0:r.dataset.normalPlaceholder)||"";if(this.data.get("isAiSearch")||76<t.length){var s=(null==r?void 0:r.dataset.aiPlaceholder)||"",r=t&&t.slice(0,1e3)||s;return"sug"===e&&this.chatInputInstance.hideSug(!0),void(r&&this.gotoChat({query:r,sseQuery:[],hasImage:!1,hasFile:!1}))}t=t||s,(0,g.$)("#kw").val(t),t===s&&(null!==(s=this.chatInputInstance)&&void 0!==s&&s.closeSugUpdate(),this.chatInputInstance.setValue(t)),(0,g.$)("#form").trigger("submit"),this.checkSupportIs()}},b.prototype.handleClickPanelBtn=function(t){var n=this,i=t.panel,t=t.pos;if(this.sendUbcLog("click","ai_search"===i.type?"home_operate":"capsule_bub",{function_type:i.type,pos:t}),"ai_chat"===i.type||"ai_ppt"===i.type)return this.chatInputInstance.openAiPanel(i),void("ai_ppt"===i.type&&this.nextTick(function(){var t;n.chatInputInstance.addAiInputContent({inputCustom:null===(t=null===(t=null===(t=i["function"])||void 0===t?void 0:t.data)||void 0===t?void 0:t.input)||void 0===t?void 0:t.input_custom})}));g.$.ajax({url:m+"/aichat/api/getChatTools?type="+i.type,type:"GET",data:"",headers:{"Content-Type":"application/json"},traditional:!0,success:function(t){var e;t&&0===t.status&&(e=(null===(e=null===(e=null===(e=t.data)||void 0===e?void 0:e.jump_panel)||void 0===e?void 0:e.data)||void 0===e?void 0:e[i.type])||{},Object.assign(e,{"function":null===(t=t.data)||void 0===t?void 0:t["function"]}),n.chatInputInstance.openAiPanel(i,e))}})},b.prototype.sendUbcLog=function(t,e,n){var i;void 0===n&&(n={});var a=((null===(a=this.chatInputInstance)||void 0===a?void 0:a.getStatusInfo())||{}).panelName,a=(0,p.__assign)({function_type:a},n);"click"===t?null!==(n=g.F.ubc)&&void 0!==n&&n.sendClickLog(e,a):"show"===t?null!==(i=g.F.ubc)&&void 0!==i&&i.sendShowLog(e,a):null!==(i=g.F.ubc)&&void 0!==i&&i.sendLog(t,e,a)},b.trimWhitespace="all",b.components={"chat-input":o["default"],"panel-btn":l["default"],"file-container":r["default"],"d-tooltip":u["default"],"d-toast":c["default"],"animation-video":d["default"]},b.messages={"ui:input-delete-file":function(){this.handlePrefixClear()}},(0,p.__decorate)([n.injectable],b));function b(t){t=i.call(this,t)||this;return t.chatInputInstance=null,t}e["default"]=n},function(t,e){t.exports=' <div class="chat-input-anchor {{newInputBox ? \'chat-input-anchor-ai-search\' : \'\'}}"> <div id="chat-input-main" class="{{initialRow === 2 ? \'two-line-input\': \'one-line-input\'}}"> <div class="chat-input-op-anime"></div> <div class="chat-input-wrapper-border {{newInputBox ? \'chat-input-wrapper-border-ai-search\' : \'\'}}"></div> <div class="chat-input-wrapper-box-shadow"></div> <div class="chat-input-wrapper chat-normal-wrapper"> <slot name="optimizer-loading-mask"></slot> <div class="chat-input-container"> <div id="chat-input-top-band"> <slot name="top-band"></slot> </div> <div id="chat-input-area"> <textarea id="chat-textarea" class="chat-input-textarea chat-input-scroll-style" data-ai-placeholder="{{aiPlaceholder}}" rows="1" value="{{query}}" onkeydown="if (event.keyCode === 13) event.preventDefault();"></textarea> </div> <div class="chat-input-tool"> <div id="left-tool" class="left-tools-wrapper"> <slot name="left-tool"></slot> </div> <div class="tools-placeholder-wrapper"></div> <div class="right-tools-wrapper"> <div id="right-tool"> <div class="tools-clear-icon {{query ? \'show-clear-icon\' : \'\'}}"> <svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" fill="none"> <g opacity="0.5" clip-path="url(#clip0_789_21003)"> <path d="M9.00033 17.3334C13.6027 17.3334 17.3337 13.6024 17.3337 9.00008C17.3337 4.39772 13.6027 0.666748 9.00033 0.666748C4.39796 0.666748 0.666992 4.39772 0.666992 9.00008C0.666992 13.6024 4.39796 17.3334 9.00033 17.3334ZM12.1384 6.80482L9.94309 9.00008L12.1384 11.1953L11.1955 12.1381L9.00026 9.94288L6.80503 12.1381L5.86219 11.1953L8.05746 9.00008L5.86219 6.80482L6.80503 5.86202L9.00026 8.05728L11.1955 5.86202L12.1384 6.80482Z" fill="#9195A3"/> </g> <defs> <clipPath id="clip0_789_21003"> <rect width="18" height="18" fill="white"/> </clipPath> </defs> </svg> </div> <slot name="right-tool"></slot> </div> <img s-if="{{newInputBox}}" id="chat-submit-button-ai" class="{{isSubmitButtonActive ? \'chat-submit-button-ai-active\' : \'\'}}" src="https://psstatic.cdn.bcebos.com/basics/chat/send-icon_1750678058000.svg" alt on-click="handleSubmit"> <button s-else id="chat-submit-button" on-click="handleSubmit"> 百度一下 </button> </div> </div> </div> <div id="chat-input-panel"> </div> <slot s-if="{{newInputBox}}" name="chat-search-sug"></slot> <slot s-if="{{newInputBox}}" name="chat-input-prompt-optimizer"></slot> </div> </div> <div s-if="{{initialRow !== 1}}" id="chat-input-extension"> <slot name="chat-input-extension"></slot> </div> </div> '},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i,a=n(1),n=n(0),a=(i=n.Component,(0,a.__extends)(o,i),o.prototype.initData=function(){return{initialRow:1,query:"",aiPlaceholder:"",newInputBox:!1,isSubmitButtonActive:!1}},o);function o(){return null!==i&&i.apply(this,arguments)||this}e["default"]=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.hitSample=e.insertAtRange=e.handleCustomInputData=e.isCaretAtEnd=e.createSugPanelDom=e.handleInputFieldBackspace=e.handleInputFieldChange=e.existCustomNode=e.focusNeedInput=e.focusInputLast=e.getCustomInputNode=e.getInputNode=e.getTextNode=e.getCursorPosition=e.setCursorToNode=e.deleteWaitNode=e.cancelWaitDeleteNode=e.setWaitDeleteNode=e.isWaitDeleteNode=e.isInputFieldNode=e.isNoWidthNode=e.isInputNode=e.getNoWidthNode=e.clearCustomNode=void 0;var c=n(1),i=n(66),p="input-custom-item",a="input-custom-placeholder",o="input-custom-no-width",r="deletion",s="input-custom-need-clear-text";function l(){var t=document.createElement("div");return t.innerHTML='<span contentEditable="'+((0,i.isFirefox)()||(0,i.isQQBrowser)()?"true":"false")+'" \n        class="'+o+'">&nbsp;</span>',t.childNodes[0]}function u(t){return!(null===(t=null==t?void 0:t.className)||void 0===t||!t.includes(p))}function d(t){return!(null===(t=null==t?void 0:t.className)||void 0===t||!t.includes(o))}function h(t){return null==t?void 0:t.classList.contains("ai-input-editor-content")}function g(t){null!=t&&t.setAttribute&&t.setAttribute(r,"0")}function f(t){var e,n;u(t)&&(e=null==t?void 0:t.nextSibling,n=null==t?void 0:t.previousSibling,e instanceof HTMLElement&&d(e)&&e.remove(),n instanceof HTMLElement&&d(n)&&n.remove(),t.remove())}function m(t){var e,n,i;!t||(n=t.parentNode)&&n instanceof HTMLElement&&n.isContentEditable&&(e=document.createRange(),t.nodeType===Node.TEXT_NODE?e.setStart(i=t,i.length):t instanceof HTMLElement&&0<t.childNodes.length?(null==(n=t.lastChild)?void 0:n.nodeType)===Node.TEXT_NODE?e.setStart(i=n,i.length):e.setStart(t,t.childNodes.length):e.setStart(t,0),e.collapse(!0),null!=(t=window.getSelection())&&t.removeAllRanges(),null!=t&&t.addRange(e))}function v(){var t=window.getSelection(),t=null==t?void 0:t.getRangeAt(0);if(t)return{startContainer:t.startContainer,startOffset:t.startOffset,endOffset:t.endOffset}}function b(t){return document.createTextNode(t.content||t.value||"")}function _(t,e){var n=document.createElement("span");n.id="cs-custom-input-"+e,n.contentEditable="true",n.innerText=t.value||t["default"]||"",n.setAttribute("placeholder",t.placeHolder||"填写内容"),t.value||t["default"]||n.setAttribute(r,"1");e=[p];return t.value||t["default"]?e.push(s):e.push(a),n.className=e.join(" "),n.addEventListener("click",function(t){(0,i.isFirefox)()&&t.target&&!t.target.innerText&&m(t.target),t.target&&t.target.classList.contains(s)&&(t.target.innerText="",t.target.classList.remove(s),m(t.target),t.stopPropagation())}),n}function x(n){n&&requestAnimationFrame(function(){requestAnimationFrame(function(){var t=window.getSelection(),e=document.createRange();e.selectNodeContents(n),e.collapse(!1),null!=t&&t.removeAllRanges(),null!=t&&t.addRange(e),n.focus()})})}e.clearCustomNode=function(t){var n;null!=t&&t.childNodes&&(n=[],t.childNodes.forEach(function(t){var e;t instanceof HTMLElement&&(null!==(e=null==t?void 0:t.className)&&void 0!==e&&e.includes(o)||null!==(e=null==t?void 0:t.className)&&void 0!==e&&e.includes(p))&&n.push(t)}),n.forEach(function(t){t.remove()}))},e.getNoWidthNode=l,e.isInputNode=u,e.isNoWidthNode=d,e.isInputFieldNode=h,e.isWaitDeleteNode=function(t){return!(null==t||!t.getAttribute||"1"!==(null==t?void 0:t.getAttribute(r)))},e.setWaitDeleteNode=function(t){null!=t&&t.setAttribute&&t.setAttribute(r,"1")},e.cancelWaitDeleteNode=g,e.deleteWaitNode=f,e.setCursorToNode=m,e.getCursorPosition=v,e.getTextNode=b,e.getInputNode=_,e.getCustomInputNode=function(t){var n=[];return t.forEach(function(t,e){"text"===t.type?n.push(b(t)):"input"===t.type&&(n.push(l()),n.push(_(t,e)),n.push(l()))}),n},e.focusInputLast=x,e.focusNeedInput=function(t){var e,n,i,a=Array.from((null==t?void 0:t.childNodes)||[]),o=-1;try{for(var r=(0,c.__values)(a),s=r.next();!s.done;s=r.next()){var l=s.value;if(l instanceof HTMLElement&&null!==(i=null==l?void 0:l.className)&&void 0!==i&&i.includes(p)&&(null==l||!l.innerText)){o=Array.prototype.indexOf.call(a,l);break}}}catch(u){e={error:u}}finally{try{s&&!s.done&&(n=r["return"])&&n.call(r)}finally{if(e)throw e.error}}null!=a&&a.length&&-1!==o?m(a[o]):x(t)},e.existCustomNode=function(t){var e,n,i;if(null==t||!t.childNodes)return!1;try{for(var a=(0,c.__values)(Array.from(t.childNodes)),o=a.next();!o.done;o=a.next()){var r=o.value;if(r instanceof HTMLElement&&null!==(i=null==r?void 0:r.className)&&void 0!==i&&i.includes(p))return!0}}catch(s){e={error:s}}finally{try{o&&!o.done&&(n=a["return"])&&n.call(a)}finally{if(e)throw e.error}}return!1},e.handleInputFieldChange=function(t){var e;null!==(e=null==t?void 0:t.childNodes)&&void 0!==e&&e.length&&Array.prototype.forEach.call(t.childNodes,function(t){var e;t instanceof HTMLElement&&(u(t)&&(t.innerText&&"\n"!==t.innerText?(null!==(e=t.classList)&&void 0!==e&&e.remove(a),g(t)):(t.innerText="",null!==(e=t.classList)&&void 0!==e&&e.add(a))),d(t)&&(u(t.previousSibling)||u(t.nextSibling)||t.remove()))})},e.handleInputFieldBackspace=function(t){var e,n=(r=v()).startContainer,i=r.startOffset,a=r.endOffset,o=null,r=null,r=n.nodeType===Node.TEXT_NODE?(o=n.parentElement,0===i?n.previousSibling:n):null==(o=n)?void 0:o.childNodes[i-1];h(o)&&r&&d(r)&&(t.preventDefault&&t.preventDefault(),u(e=null==r?void 0:r.previousSibling)&&(null!=e&&e.innerText?(e.innerText=null===(r=null==e?void 0:e.innerText)||void 0===r?void 0:r.slice(0,-1),m(e)):f(e))),u(o)&&(1===(null===(e=null==o?void 0:o.innerText)||void 0===e?void 0:e.length)||0===i&&(null===(e=null==o?void 0:o.innerText)||void 0===e?void 0:e.length)===a&&i!==a?(t.preventDefault&&t.preventDefault(),o&&(o.innerText=""),setTimeout(function(){m(o)},0)):0===i&&0===a&&(t.preventDefault&&t.preventDefault(),(null==(t=null===(a=null==o?void 0:o.previousSibling)||void 0===a?void 0:a.previousSibling)?void 0:t.nodeType)===Node.TEXT_NODE&&t.textContent?(t.textContent=null===(a=null==t?void 0:t.textContent)||void 0===a?void 0:a.slice(0,-1),m(t)):d(t)&&m(t)))},e.createSugPanelDom=function(t){var a=document.createElement("div");return a.className="ai-sug-panel-list",t.forEach(function(t,e){var n=document.createElement("div");n.className="ai-sug-panel-btn";var i=document.createElement("img");i.src=t.icon,i.alt="",n.appendChild(i);i=document.createElement("span");i.textContent=t.text,n.appendChild(i),a.appendChild(n),0===e&&((e=document.createElement("div")).className="ai-sug-panel-divider",a.appendChild(e))}),a},e.isCaretAtEnd=function(t){var e=window.getSelection();if(!e||!e.rangeCount)return!1;var n=e.getRangeAt(0).cloneRange();return(e=document.createRange()).selectNodeContents(t),e.collapse(!1),0===n.compareBoundaryPoints(Range.END_TO_END,e)},e.handleCustomInputData=function(t){return t.map(function(t){return(0,c.__assign)((0,c.__assign)({},t),{realValue:t.value||t["default"]})})},e.insertAtRange=function(t){var e,n=document.getSelection();null!=n&&n.rangeCount&&((e=n.getRangeAt(0)).deleteContents(),e.insertNode(t),e.setStartAfter(t),e.setEndAfter(t),n.removeAllRanges(),n.addRange(e))};e.hitSample=function(t){var e="undefined"!=typeof window?window.bds:null;if(e){e=e.comm||{};return 0<=(Array.isArray(e.sampleval)&&0<e.sampleval.length?e.sampleval:e.nodeSample||[]).indexOf(t)}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isQQBrowser=e.isFirefox=e.isWindows=e.getPlatform=e.getUserAgentInfo=void 0;e.getUserAgentInfo=function(){var t="undefined"!=typeof navigator?navigator.userAgent.toLowerCase():"",e=t.includes("iphone")||t.includes("ipod")||t.includes("ipad"),n=t.includes("android"),i=t.includes("baiduboxapp"),a=t.includes("searchcraft"),o=t.includes("theme/dark"),r=t.includes("bdhonorbrowser"),s=t.includes("huawei"),l=t.includes("qqbrowser"),u=t.includes("safari")&&!t.includes("chrome"),c=t.includes("firefox"),p=t.includes("arkweb")&&t.includes("tablet"),d=t.includes("ipad")||p,h=t.includes("arkweb")&&!d;return{isIOS:e,isAndroid:n,isBaiduBox:i,isSearchCraft:a,isDarkMode:o,isQQBrowser:l,isSafari:u,platform:!d&&/Mobi|Android|iPhone|ArkWeb/i.test(t||"")?"wise":"pc",isWindows:t.includes("windows"),isFirefox:c,scene:"RECALL_SCENE",isBdhonor:r,isHarmony:h,isHarmonyPad:p,isHuawei:s}};var i=(0,e.getUserAgentInfo)();e.getPlatform=function(){return i.platform};e.isWindows=function(){return i.isWindows};e.isFirefox=function(){return i.isFirefox};e.isQQBrowser=function(){return i.isQQBrowser}},function(t,e){t.exports=' <div class="input-panel-create"> <div class="input-panel-create-tab"> <div s-for="item in tabList" class="input-panel-create-tab-item {{selectedTab === item.tab_id ? \'input-panel-create-tab-item-selected\' : \'\'}}" on-click="handleTabClick(item.tab_id)"> {{item.tab_name}} </div> </div> <div class="input-panel-create-content"> <div s-for="itemList, index in showContentList" class="input-panel-create-content-list"> <create-item s-for="item, itemIndex in itemList" data="{{item}}" order="{{index * 4 + itemIndex}}" selected="{{selectedBtn === item.button_id}}" on-click="native:handleItemClick(item, index * 4 + itemIndex + 1)"></create-item> </div> </div> </div> '},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i,o=n(1),a=n(0),r=(0,o.__importDefault)(n(245)),s=n(71),r=(i=a.Component,(0,o.__extends)(l,i),l.prototype.initData=function(){return{list:[],place_holdaer:"",tab_list:[],title:"",selectedTab:"all",type:""}},l.prototype.handleTabClick=function(t){this.data.get("selectedTab")!==t&&this.data.set("selectedTab",t)},l.prototype.handleItemClick=function(t,e){this.data.set("selectedBtn",t.button_id);var n=this.data.get("selectedTab"),i=t.button_id,a=(null==t?void 0:t["function"])||{};"input"===a.type&&(a=null===(t=a.data.input||{})?void 0:t.interactionType,this.fire("click",(0,o.__assign)((0,o.__assign)({agentInfo:t.agentInfo,inputCustom:null===t?void 0:t.input_custom},a?{interactionType:a}:{}),{functionTab:n,functionName:i,index:e})))},l.components={"create-item":r["default"]},l.computed={tabList:function(){var t=(this.data.get("tab_list")||[]).slice();return t.unshift({tab_id:"all",tab_name:"全部"}),t},showContentList:function(){var e=this.data.get("selectedTab"),t=this.data.get("list")||[];if("all"===e)return(0,s.splitArrayTo4)(t);t=t.filter(function(t){return(null==t?void 0:t.tab_id)===e});return(0,s.splitArrayTo4)(t)}},l);function l(){return null!==i&&i.apply(this,arguments)||this}e["default"]=r},function(t,e){t.exports=' <div s-ref="creatItem" class="input-panel-create-item {{selected ? \'input-panel-create-item-selected\' : \'\'}}"> <img class="input-panel-create-item-img" src="{{data.icon}}"> <div class="input-panel-create-item-text"> <div class="input-panel-create-item-title"> {{data.text}} </div> <div class="input-panel-create-item-desc"> <img s-if="data.desc_icon" class="input-panel-create-item-logo" src="{{data.desc_icon}}"> {{data.desc}} </div> </div> </div> '},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i,a=n(1),n=n(0),a=(i=n.Component,(0,a.__extends)(o,i),o.prototype.attached=function(){},o.prototype.detached=function(){},o.prototype.initData=function(){return{data:{},selected:!1,order:-1}},o);function o(){return null!==i&&i.apply(this,arguments)||this}e["default"]=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.shuffleArray=e.getDayDiff=e.getMillisecondFromSecond=e.isArray=e.splitArrayTo4=void 0;var o=n(1);e.splitArrayTo4=function(t){for(var e=[],n=0;n<t.length;n+=4)e.push(t.slice(n,n+4));return e};function r(t){return"[object Array]"===Object.prototype.toString.call(t)}function i(t){return t<1e10?1e3*t:t}e.isArray=r,e.getMillisecondFromSecond=i,e.getDayDiff=function(t){var e=i(e=t||(new Date).getTime()),t=new Date(e),e=new Date(t.getFullYear(),t.getMonth(),t.getDate()).getTime(),t=new Date,t=new Date(t.getFullYear(),t.getMonth(),t.getDate()).getTime();return Math.floor((t-e)/864e5)},e.shuffleArray=function(t){if(!r(t))return[];for(var e=t.slice(),n=e.length-1;0<n;n--){var i=Math.floor(Math.random()*(n+1)),a=(0,o.__read)([e[i],e[n]],2);e[n]=a[0],e[i]=a[1]}return e}},function(t,e){t.exports=' <div class="input-panel-draw"> <div class="input-panel-draw-tools"> <div s-for="item, index in tools.list" class="input-panel-draw-tools-list-item" on-click="native:handleToolsBtnClick(item, index)"> <img class="input-panel-draw-tools-list-item-icon" src="{{item.icon}}"> {{item.text}} </div> </div> <div class="input-panel-draw-content"> <div s-for="itemList, index in showContentList" class="input-panel-draw-content-list-item"> <fragment s-for="item, itemIndex in itemList"> <draw-item class="input-panel-draw-content-list-item-btn" data="{{item}}" order="{{index * 4 + itemIndex}}" on-btn-click="handleDrawBtnClick(item, index * 4 + itemIndex + 1)"></draw-item> </fragment> </div> </div> </div> '},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i,a=n(1),o=n(0),r=n(71),n=(0,a.__importDefault)(n(252)),s="SUPERPAGE_SEARCH_DRAW_ITEM_SHUFFLE",l="SUPERPAGE_SEARCH_DRAW_ITEM_SHUFFLE_TIME",n=(i=o.Component,(0,a.__extends)(u,i),u.prototype.initData=function(){return{tools:{},sameStyle:{},place_holdaer:"",default_content:""}},u.prototype.attached=function(){this.data.set("showContentList",this.getRandomContentList())},u.prototype.getRandomContentList=function(){var t=[],e=0;try{t=JSON.parse(localStorage.getItem(s)||"[]"),e=Number(localStorage.getItem(l)||0)}catch(o){t=[],e=0}var n=this.data.get("same_style.list")||[],i=(0,r.splitArrayTo4)(n);(!e||t.length!==i.length||0<(0,r.getDayDiff)(e))&&(t=(0,r.shuffleArray)(Array.from({length:i.length},function(t,e){return e})),localStorage.setItem(s,JSON.stringify(t)),localStorage.setItem(l,String(+new Date)));var a=[];return t.forEach(function(t,e){a[t]=i[e]}),a},u.prototype.detached=function(){this.data.set("showContentList",this.getRandomContentList())},u.prototype.handleToolsBtnClick=function(t){var t=(null==t?void 0:t["function"])||{};"link"===t.type&&window.open(null===(t=null===(t=t.data)||void 0===t?void 0:t.link)||void 0===t?void 0:t.url)},u.prototype.handleDrawBtnClick=function(t,e){var n=t.button_id,t=(null==t?void 0:t["function"])||{};"input"===t.type&&(t=t.data.input||{},this.fire("click",{inputCustom:null===t?void 0:t.input_custom,functionName:n,index:e}))},u.components={"draw-item":n["default"]},u);function u(){return null!==i&&i.apply(this,arguments)||this}e["default"]=n},function(t,e){t.exports=' <div class="input-panel-draw-item" on-click="handleBtnClick"> <img class="input-panel-draw-item-img" src="{{data.icon}}"> <div class="input-panel-draw-item-text">{{desc}}</div> <div class="input-panel-draw-item-btn"> 做同款 </div> </div> '},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i,a=n(1),n=n(0),a=(i=n.Component,(0,a.__extends)(o,i),o.prototype.initData=function(){return{data:{},order:-1}},o.prototype.handleBtnClick=function(){this.fire("btn-click",this.data.get("data"))},o.computed={desc:function(){var t=this.data.get("data.text"),e=this.data.get("data.agentInfo");return null!=e&&e.agentName?"@"+e.agentName:t}},o);function o(){return null!==i&&i.apply(this,arguments)||this}e["default"]=a},function(t,e){t.exports=' <div class="input-panel-read"> <div class="input-panel-read-content"> <div on-click="handleBtnClick(item, index)" s-for="item, index in list" class="input-panel-read-content-btn"> <img class="input-panel-read-content-btn-img" src="{{item.icon}}"> <div class="input-panel-read-content-btn-name">{{item.text}}</div> <div class="input-panel-read-content-btn-desc">{{item.desc}}</div> <div class="input-panel-read-content-btn-limit">{{item.limit}}</div> </div> </div> </div> '},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i,a=n(1),n=n(0),a=(i=n.Component,(0,a.__extends)(o,i),o.prototype.initData=function(){return{list:[]}},o.prototype.attached=function(){},o.prototype.handleBtnClick=function(t,e){var n=t.button_id;"upload"===t["function"].type?this.fire("input-upload",{uploadType:0===e?"file":"image",functionName:n}):"input"===t["function"].type&&this.fire("click",{inputCustom:null===(t=null===(t=t["function"].data)||void 0===t?void 0:t.input)||void 0===t?void 0:t.input_custom,functionName:n})},o);function o(){return null!==i&&i.apply(this,arguments)||this}e["default"]=a},function(t,e){t.exports=' <div class="input-panel-code"> <code s-for="item in list" item="{{item}}" on-click="native:handlePanelBtnClick(item)"></code> </div> '},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i,a=n(1),o=n(0),n=(0,a.__importDefault)(n(263)),n=(i=o.Component,(0,a.__extends)(r,i),r.prototype.initData=function(){return{list:[]}},r.prototype.handlePanelBtnClick=function(t){var e=(t||{})["function"];"input"===(null==e?void 0:e.type)&&(t=e.data.input||{},e=null==e?void 0:e.interactionType,this.fire("click",(0,a.__assign)({inputCustom:null===t?void 0:t.input_custom},e?{interactionType:e}:{})))},r.components={code:n["default"]},r);function r(){return null!==i&&i.apply(this,arguments)||this}e["default"]=n},function(t,e){t.exports=' <div class="input-panel-code-item" on-click="handleBtnClick"> <img class="input-panel-code-item-icon" src="{{item.icon}}"> <div class="input-panel-code-item-text">{{item.text}}</div> </div> '},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i,a=n(1),n=n(0),a=(i=n.Component,(0,a.__extends)(o,i),o.prototype.initData=function(){return{item:{}}},o);function o(){return null!==i&&i.apply(this,arguments)||this}e["default"]=a},function(t,e){t.exports=' <div id="ai-input-file-tag" class="{{$style[\'ai-input-file-container\']}}"> <fragment s-for="fileItem in fileList"> <div s-if="{{fileItem.uploadType === \'file\'}}" class="{{$style[\'ai-input-file\']}} {{fileItem.status === 0 ? $style[\'ai-input-file-uploading\'] : \'\'}} {{fileItem.status === 2 ? $style[\'ai-input-file-failed\'] : \'\'}}" on-click="handleFileClick($event, fileItem)" on-mouseenter="sendFileLog(\'show\', \'file_clear\')"> <div class="{{$style[\'ai-input-file-icon\']}}"> <img class="{{$style[\'ai-input-file-icon-img\']}}" src="{{getFileIcon(fileItem)}}"> <img s-if="{{fileItem.status === 0}}" class="{{$style[\'ai-input-file-icon-loading\']}}" src="{{loadingIcon}}"> </div> <div class="{{$style[\'ai-input-file-content\']}}"> <div class="{{$style[\'ai-input-file-name\']}}">{{fileItem.fileName}}</div> <div class="{{$style[\'ai-input-file-desc\']}}"> <div s-if="{{fileItem.status === 1}}" class="{{$style[\'ai-input-file-desc-success\']}}"> <div class="{{$style[\'ai-input-file-desc-success-name\']}}">{{fileItem.fileType}}</div> <div class="{{$style[\'ai-input-file-desc-success-size\']}}">{{formatBytes(fileItem.fileSize)}}</div> </div> <div s-else class="{{$style[\'ai-input-file-desc-success-desc\']}}">{{getFileDesc(fileItem)}}</div> </div> </div> <div on-click="handleDelete($event, fileItem)" class="{{$style[\'ai-input-file-delete\']}}"> <img class="{{$style[\'ai-input-file-delete-icon\']}}" src="{{deleteIcon}}"> </div> </div> <div class="{{$style[\'ai-input-image\']}} {{fileItem.status === 0 ? $style[\'ai-input-image-uploading\'] : \'\'}} {{fileItem.status === 2 ? $style[\'ai-input-image-uploading\'] : \'\'}}" s-elif="{{fileItem.uploadType === \'image\'}}" on-mouseenter="sendFileLog(\'show\', \'file_clear\')"> <img on-click="handleFileClick($event, fileItem)" class="{{$style[\'ai-input-image-bg\']}}" src="{{getImageUrl(fileItem)}}"> <img s-if="{{fileItem.status === 0}}" class="{{$style[\'ai-input-file-icon-loading\']}}" src="{{loadingIcon}}"> <div on-click="handleDelete" class="{{$style[\'ai-input-file-delete\']}}"> <img class="{{$style[\'ai-input-file-delete-icon\']}}" src="{{deleteIcon}}"> </div> </div> </fragment> </div> '},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i,a=n(1),o=n(0),n="https://psstatic.cdn.bcebos.com/basics/",r={PDF:n+"aichat/pdf-wise_1744600722000.png",Word:n+"aichat/word-wise_1744600783000.png",PPT:n+"aichat/ppt-wise_1744600745000.png",TXT:n+"aichat/txt-wise_1744600762000.png",Excel:n+"aichat/excel-wise_1744600701000.png",Code:n+"aichat/code_1753701401000.png",unknown:""},a=(i=o.Component,(0,a.__extends)(s,i),s.prototype.initData=function(){return{fileList:[],deleteIcon:"https://gips2.baidu.com/it/u=3457981003,2090099587&fm=3028&app=3028&f=PNG&fmt=auto&q=100&size=f45_45",uploadIcon:"https://gips3.baidu.com/it/u=4026099389,3432486988&fm=3028&app=3028&f=PNG&fmt=auto&q=100&size=f108_108",loadingIcon:"https://gips0.baidu.com/it/u=1698361030,3674932214&fm=3028&app=3028&f=PNG&fmt=auto&q=100&size=f48_48",imgLoadingIcon:"https://gips3.baidu.com/it/u=140255751,3013049321&fm=3028&app=3028&f=PNG&fmt=auto&q=100&size=f180_180",reuploadIcon:"https://gips0.baidu.com/it/u=3781075682,3319294780&fm=3028&app=3028&f=PNG&fmt=auto&q=100&size=f108_108",reuploadImgIcon:"https://gips3.baidu.com/it/u=3971192352,3667158809&fm=3028&app=3028&f=PNG&fmt=auto&q=100&size=f180_180"}},s.prototype.handlePanelBtnClick=function(){var t=this.data.get("panel");this.fire("click",t)},s.prototype.formatBytes=function(t){if("[object Number]"!==Object.prototype.toString.call(t))return"0B";for(var e=-1;t>=Math.pow(1024,++e+1););return""+Math.round(t/Math.pow(1024,e)*100)/100+["B","KB","MB","GB"][e]},s.prototype.getFileIcon=function(t){return 0===t.status?this.data.get("uploadIcon"):1===t.status?r[t.fileType]:(t.status,this.data.get("reuploadIcon"))},s.prototype.getImageUrl=function(t){return 1===t.status?t.url:2===t.status?this.data.get("reuploadImgIcon"):this.data.get("imgLoadingIcon")},s.prototype.getFileDesc=function(t){return 0===t.status?"上传中 "+Math.round(1e4*t.progress)/100+"%":1===t.status?t.fileType+" "+this.formatBytes(t.fileSize):2===t.status?"点击图标重新上传":""},s.prototype.handleDelete=function(){this.dispatch("ui:input-delete-file",{}),this.sendFileLog("click","file_clear")},s.prototype.sendFileLog=function(t,e){this.fire("show-delete",{type:t,value:e})},s.trimWhitespace="all",s);function s(){return null!==i&&i.apply(this,arguments)||this}e["default"]=a},function(t,e){t.exports=' <div class="{{$style[\'panel\']}} {{panel.type === \'ai_search\' ? $style[\'new_search_guide_bub\'] : \'\'}} {{panel.guide && isShowGuide ? $style[\'panel-guide\'] : \'\'}}" on-click="handlePanelBtnClick" on-mouseenter="showHover" on-mouseleave="hideHover"> <fragment s-if="{{panel.type === \'ai_search\'}}"> <a href="{{panel.url}}" target="_blank" class="{{$style[\'new_search_guide_bub_container\']}}"> <div class="{{$style[\'new_search_guide_bub_container_left\']}}"> <img src="{{panel.icon}}" class="{{$style[\'search_icon\']}}"> </div> <div class="{{$style[\'new_search_guide_bub_container_center\']}}"> <span s-for="chunk in splitText" class="{{chunk.type === \'text\' ? \'\' : $style[\'emoji\']}}"> {{chunk.content}} </span> </div> </a> </fragment> <fragment s-else> <a s-if="{{panel.url}}" class="{{$style[\'tag-a\']}} {{$style[\'panel-link\']}}" href="{{panel.url}}" target="_blank"> <img src="{{panel.icon}}" alt> <span>{{panel.text}}</span> </a> <fragment s-else> <img src="{{panel.icon}}" alt> <span>{{panel.text}}</span> </fragment> </fragment> </div> '},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i,a=n(1),n=n(0),o="INPUT_PANEL_BTN_CLICKED_GUIDE",a=(i=n.Component,(0,a.__extends)(r,i),r.prototype.initData=function(){return{panel:{},pos:0,isHover:!1,isShowGuide:!1}},r.prototype.attached=function(){var t=this.data.get("panel");if(t.guide){var e=localStorage.getItem(o);try{var n=e&&JSON.parse(e)||{};this.data.set("isShowGuide",!e||!n[t.type])}catch(err){console.warn(err)}}this.fire("show-log",{value:"ai_search"===(null==t?void 0:t.type)?"home_operate":"capsule_bub",ext:{function_type:null==t?void 0:t.type,pos:this.data.get("pos")}})},r.prototype.handlePanelBtnClick=function(){var t,e=this.data.get("panel");if(e.guide){this.data.set("isShowGuide",!1);var n=localStorage.getItem(o),i={};try{n?(i=JSON.parse(n))[e.type]="1":((t={})[e.type]="1",i=t),localStorage.setItem(o,JSON.stringify(i))}catch(err){console.warn(err)}}this.fire("click",{panel:e,pos:this.data.get("pos")})},r.prototype.showHover=function(){this.data.set("isHover",!0)},r.prototype.hideHover=function(){this.data.set("isHover",!1)},r.trimWhitespace="all",r.computed={splitText:function(){for(var t=this.data.get("panel.text")||"",e=[],n=new RegExp(["[\\u{1F600}-\\u{1F64F}]","[\\u{1F300}-\\u{1F5FF}]","[\\u{1F680}-\\u{1F6FF}]","[\\u{2600}-\\u{26FF}]"].join("|"),"gu"),i=n.exec(t),a=0;null!==i;){var o=i.index;a<o&&e.push({type:"text",content:t.slice(a,o)}),e.push({type:"emoji",content:i[0]}),a=o+i[0].length,i=n.exec(t)}return a<t.length&&e.push({type:"text",content:t.slice(a)}),e}},r);function r(){return null!==i&&i.apply(this,arguments)||this}e["default"]=a},function(t,e){t.exports=' <div class="{{$style[\'tooltip-wrapper\']}} {{getAnchorStyle}}"> <div on-mouseenter="showTooltip" on-mouseleave="hideTooltip"> <slot></slot> </div> <div s-if="{{isShowTooltip && content}}" style="{{getTooltipStyle}}" class="{{$style[\'tooltip\']}}"> <span>{{ content }}</span> </div> </div> '},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i,a=n(1),n=n(0),a=(i=n.Component,(0,a.__extends)(o,i),o.prototype.initData=function(){return{content:"",top:"",maxWidth:"",isShowTooltip:!1,anchor:"center"}},o.prototype.showTooltip=function(){this.data.set("isShowTooltip",!0),this.fire("hover",{})},o.prototype.hideTooltip=function(){this.data.set("isShowTooltip",!1)},o.trimWhitespace="all",o.computed={getAnchorStyle:function(){return this.data.get("$style")["anchor-"+this.data.get("anchor")]},getTooltipStyle:function(){var t=this.data.get("top"),e=this.data.get("maxWidth"),n="";return t&&(n+="top: "+t+"px;"),e&&(n+="max-width: "+e+"px;"),n}},o);function o(){return null!==i&&i.apply(this,arguments)||this}e["default"]=a},function(t,e){t.exports=" <div s-if=\"visible\" class=\"{{$style['toast-root']}} {{isView ? $style['toast-root-view'] : ''}}\"> <div class=\"{{$style['toast-content']}}\">{{ message }}</div> </div> "},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i,a=n(1),n=n(0),a=(i=n.Component,(0,a.__extends)(o,i),o.prototype.initData=function(){return{visible:!1,isView:!1,message:"",duration:2e3,timer:null}},o.prototype.show=function(){var e=this;document.body.appendChild(this.el),this.data.set("visible",!0),this.nextTick(function(){e.data.set("isView",!0),clearTimeout(e.data.get("timer"));var t=setTimeout(function(){e.hide()},e.data.get("duration"));e.data.set("timer",t)})},o.prototype.hide=function(){var t=this;this.data.set("isView",!1);var e=setTimeout(function(){t.data.set("visible",!1)},300);clearTimeout(this.data.get("timer")),clearTimeout(e),this.data.set("timer",null)},o.trimWhitespace="all",o);function o(){return null!==i&&i.apply(this,arguments)||this}e["default"]=a},function(t,e){t.exports=' <div id="chat-input-anime-video" class="{{$style[\'animation-video\']}}" style="pointer-events: {{supportPropagation ? \'none\' : \'auto\'}}"> <canvas s-ref="canvas" class="{{$style[\'gif-canvas\']}}"> </canvas> </div> '},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i,a=n(1),n=n(0),a=(i=n.Component,(0,a.__extends)(o,i),o.prototype.initData=function(){return{afxUrl:"https://psstatic.cdn.bcebos.com/basics/chat/afx 2_1750155358000.mp4",bgWidth:"100%",bgHeight:"100%",imgType:"",supportPropagation:!1,inView:!0,autoplay:!0,loop:!1,alphaDirection:"left",resourceWidth:400,resourceHeight:400,hasPlay:!1}},o.prototype.attached=function(){var i=this;this.data.get("afxUrl")?this.nextTick(function(){i.createVideoElement();var e=i.video;i.videoEventListener(e,"play"),i.videoEventListener(e,"pause"),i.videoEventListener(e,"ended");var n=i.ref("canvas");i.canvas=n,i.bindInitAnimation=i.initCanPlayThrough.bind(i),i.bindHandleNotLoopEnded=i.handleNotLoopEnded.bind(i),i.video.addEventListener("canplaythrough",i.bindInitAnimation,{once:!0}),i.video.addEventListener("ended",i.bindHandleNotLoopEnded),i.watch("afxUrl",function(t){i.video.pause(),i.video.src=t,i.video.load(),i.data.get("autoplay")&&i.data.get("inView")&&(i.initAnimation(n,e),i.frameDrawHandler=i.frameDrawHandler||i.prepareFrameDraw(i.gl,i.posBuffer,i.videoTexture,e),i.playVideo(e))})}):console.error("[component animation-video]: afxUrl is required")},o.prototype.detached=function(){var t;null!==(t=this.video)&&void 0!==t&&t.removeEventListener("canplaythrough",this.bindInitAnimation),null!==(t=this.video)&&void 0!==t&&t.removeEventListener("ended",this.bindHandleNotLoopEnded),clearTimeout(this.timer),this.timer=null},o.prototype.initCanPlayThrough=function(){var e=this,n=this.video;this.initAnimation(this.canvas,n),this.frameDrawHandler=this.frameDrawHandler||this.prepareFrameDraw(this.gl,this.posBuffer,this.videoTexture,n),this.data.get("autoplay")&&this.data.get("inView")&&this.playVideo(n),this.watch("inView",function(t){t&&n&&e.playVideo(n)})},o.prototype.playVideo=function(t){!t||(t=t.play())&&t["catch"](function(t){console.error("animation video play error",t)})},o.prototype.createVideoElement=function(){var t,e=document.createElement("video");e.muted=!0,e.volume=0,e.setAttribute("crossorigin","anonymous"),e.setAttribute("webkit-playsinline","true"),e.setAttribute("playsinline","true"),e.setAttribute("x-webkit-airplay","true"),e.setAttribute("t7-video-player-type","inline"),this.data.get("loop")&&e.setAttribute("loop",""),e.src=this.data.get("afxUrl"),e.load(),e.style.display="none",null!==(t=null===document||void 0===document?void 0:document.body)&&void 0!==t&&t.appendChild(e),this.video=e},o.prototype.handleNotLoopEnded=function(){},o.prototype.videoEventListener=function(t,e){var n=this;t&&t.addEventListener(e,function(){var t;"play"===e?null!==(t=n.frameDrawHandler)&&void 0!==t&&t.startFrameUpdate():"pause"!==e&&"ended"!==e||null!==(t=n.frameDrawHandler)&&void 0!==t&&t.stopFrameUpdate()},!1)},o.prototype.safeNumber=function(t){return isNaN(parseInt(t,10))?0:parseInt(t,10)},o.prototype.initAnimation=function(t,e){if(t&&e){var n=this.data.get("alphaDirection"),i=this.safeNumber(this.data.get("resourceWidth")),a=this.safeNumber(this.data.get("resourceHeight"));t.width=Math.ceil(i/2),t.height=a;e=t.getContext("webgl");if(!e)throw"WebGLRenderingContext Error";e.viewport(0,0,t.width,t.height),e.clearColor(0,0,0,0),e.clear(e.COLOR_BUFFER_BIT|e.DEPTH_BUFFER_BIT);i=this.createVertexBuffer(e,[-1,-1,1,-1,-1,1,1,1]),a=this.createProgram(e,"\n    attribute vec2 position;\n    varying vec2 v_Texcoord;\n    void main() {\n        v_Texcoord = (position + 1.0) * 0.5;\n        gl_Position = vec4(position, 0.0, 1.0);\n    }\n","\n    precision highp float;\n    uniform sampler2D tex;\n    varying vec2 v_Texcoord;\n    uniform int alphaDirection; // alpha 通道的方向，为 0 时表示 alpha 通道在左边，为 1 时，表示 alpha 通道在右边\n    void main() {\n        // 取左边画面的像素\n        vec2 left = v_Texcoord * vec2(0.5, 1.0);\n\n        // 取右边画面的像素\n        vec2 right = v_Texcoord * vec2(0.5, 1.0) + vec2(0.5, 0.0);\n\n        if (alphaDirection == 1) {\n            vec3 rgb = texture2D(tex, left).rgb;\n            float a = texture2D(tex, right).r;\n            gl_FragColor = vec4(rgb, a);\n        }\n        else {\n            vec3 rgb = texture2D(tex, right).rgb;\n            float a = texture2D(tex, left).r;\n            gl_FragColor = vec4(rgb, a);\n        }\n    }\n");a&&i&&(t=e.getUniformLocation(a,"tex"),e.useProgram(a),this.setVertexBuffer(e,a,"position",i,2),e.uniform1i(t,0),a=e.getUniformLocation(a,"alphaDirection"),e.uniform1i(a,"right"===n?1:0),this.videoTexture=this.createImageTexture(e),this.gl=e,this.posBuffer=i)}},o.prototype.createVertexBuffer=function(t,e){var n=t.createBuffer();return e&&this.updateVertexBuffer(t,n,e),n},o.prototype.updateVertexBuffer=function(t,e,n){t.bindBuffer(t.ARRAY_BUFFER,e),n instanceof Array&&(n=new Float32Array(n)),t.bufferData(t.ARRAY_BUFFER,n,t.STATIC_DRAW)},o.prototype.createProgram=function(e,t,n){var i=e.createShader(e.VERTEX_SHADER),a=e.createShader(e.FRAGMENT_SHADER);if(!i||!a)return null;e.shaderSource(i,t),e.shaderSource(a,n),e.compileShader(i),e.compileShader(a),[i,a].forEach(function(t){e.getShaderParameter(t,e.COMPILE_STATUS)});n=e.createProgram();return n?(e.attachShader(n,i),e.attachShader(n,a),e.linkProgram(n),n):null},o.prototype.setVertexBuffer=function(t,e,n,i,a){t.bindBuffer(t.ARRAY_BUFFER,i);n=t.getAttribLocation(e,n);t.enableVertexAttribArray(n),t.vertexAttribPointer(n,a,t.FLOAT,!1,0,0)},o.prototype.createImageTexture=function(t){var e=t.createTexture();return t.bindTexture(t.TEXTURE_2D,e),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.LINEAR),t.bindTexture(t.TEXTURE_2D,null),e},o.prototype.prepareFrameDraw=function(t,e,n,i){var a=t.UNSIGNED_BYTE,o=null,r=function(){o=(i.readyState<i.HAVE_CURRENT_DATA||(t.bindBuffer(t.ARRAY_BUFFER,e),t.bindTexture(t.TEXTURE_2D,n),t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL,!0),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,a,i),t.drawArrays(t.TRIANGLE_STRIP,0,4)),requestAnimationFrame(r))};return{startFrameUpdate:function(){r()},stopFrameUpdate:function(){o&&cancelAnimationFrame(o)}}},o.trimWhitespace="all",o);function o(){var t=null!==i&&i.apply(this,arguments)||this;return t.timer=null,t.gl=null,t.program=null,t.videoTexture=null,t.posBuffer=null,t.video=null,t.canvas=null,t}e["default"]=a},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(t,e,n){t.exports=n(230)},function(t,e,n){var i=n(2),a=[n(231)],o=n(61),r=n(62)["default"];t.exports=n(62),t.exports["default"]=i(r,o,a)},function(t,e,n){var i=n(232);(i="string"==typeof i?[[t.i,i,""]]:i).locals&&(t.exports=i.locals);(0,n(4)["default"])("285fce29",i,!0,{runAsProduction:!0})},function(t,e,n){(e=n(3)(!1)).push([t.i,".chat-input-background_3edHa {\n  position: relative;\n}\n.week-svg_3KTGJ {\n  opacity: 0.85;\n}\n.week-svg_3KTGJ:hover {\n  opacity: 1;\n}\n.aisearch-btn_1yI-K {\n  border-radius: 12px;\n  border: 0.5px solid rgba(219, 220, 224, 0.85);\n  height: 40px;\n  display: flex;\n  align-items: center;\n  padding: 0 12px;\n  gap: 6px;\n  cursor: pointer;\n  font-size: 14px;\n  font-weight: 500;\n  box-sizing: border-box;\n  color: #333333;\n}\n.aisearch-btn-active_2XFWO {\n  background-color: rgba(78, 110, 242, 0.09);\n  color: #4E6EF2;\n  border-color: rgba(78, 110, 242, 0.12);\n  font-weight: 500;\n}\n.aisearch-btn-deactive_atbR4:hover {\n  background-color: #F5F6F9;\n  color: #4E6EF2;\n  border-color: #DBDCE0;\n}\n.right-tool_3we_U {\n  display: flex;\n}\n.right-tool_3we_U.right-tool-no-margin_1fwj_ {\n  margin-right: -15px;\n}\n.right-tool_3we_U > *:not(:last-child) {\n  margin-right: 15px;\n}\n.right-tool_3we_U .tool-item_1e6GD {\n  display: flex;\n  cursor: pointer;\n  color: #333;\n}\n.right-tool_3we_U .tool-item_1e6GD svg {\n  display: block;\n}\n.right-tool_3we_U .tool-item_1e6GD:hover {\n  color: #4E6EF2;\n}\n.panel-list_8jHmm {\n  display: flex;\n  justify-content: center;\n}\n.panel-list_8jHmm > *:not(:last-child) {\n  margin-right: 9px;\n}\n.smart-input-mic_3blO0 {\n  display: none;\n}\n",""]),e.locals={"chat-input-background":"chat-input-background_3edHa",chatInputBackground:"chat-input-background_3edHa","week-svg":"week-svg_3KTGJ",weekSvg:"week-svg_3KTGJ","aisearch-btn":"aisearch-btn_1yI-K",aisearchBtn:"aisearch-btn_1yI-K","aisearch-btn-active":"aisearch-btn-active_2XFWO",aisearchBtnActive:"aisearch-btn-active_2XFWO","aisearch-btn-deactive":"aisearch-btn-deactive_atbR4",aisearchBtnDeactive:"aisearch-btn-deactive_atbR4","right-tool":"right-tool_3we_U",rightTool:"right-tool_3we_U","right-tool-no-margin":"right-tool-no-margin_1fwj_",rightToolNoMargin:"right-tool-no-margin_1fwj_","tool-item":"tool-item_1e6GD",toolItem:"tool-item_1e6GD","panel-list":"panel-list_8jHmm",panelList:"panel-list_8jHmm","smart-input-mic":"smart-input-mic_3blO0",smartInputMic:"smart-input-mic_3blO0"},t.exports=e},function(t,e,n){var i=n(2),a=[n(234)],o=n(63),r=n(64)["default"];t.exports=n(64),t.exports["default"]=i(r,o,a)},function(t,e,n){var i=n(235);(i="string"==typeof i?[[t.i,i,""]]:i).locals&&(t.exports=i.locals);(0,n(4)["default"])("9aa2c530",i,!0,{attributes:{"data-for":"result"},runAsProduction:!0})},function(t,e,n){(e=n(3)(!1)).push([t.i,".chat-input-anchor {\n  position: relative;\n  width: 100%;\n  height: 100%;\n  -webkit-font-smoothing: antialiased;\n  /* 标准抗锯齿 */\n  -moz-osx-font-smoothing: grayscale;\n  /* 针对Mac的字体平滑 */\n}\n#chat-input-main {\n  position: absolute;\n  top: 0;\n  width: 100%;\n  z-index: 99;\n  border-radius: 19px;\n}\n#chat-input-main * {\n  font-family: arial;\n}\n#chat-input-main.chat-input-main-focus:before {\n  opacity: 0.14;\n}\n#chat-input-main.chat-input-main-focus .chat-input-wrapper {\n  box-shadow: 0 13px 18px -15px rgba(77, 128, 255, 0.2);\n}\n#chat-input-main.chat-input-main-focus .chat-input-wrapper.chat-ai-wrapper #chat-input-panel {\n  display: block;\n}\n#chat-input-main.chat-input-main-focus .chat-input-wrapper-box-shadow {\n  box-shadow: 0 10px 40px -8px rgba(77, 128, 255, 0.1);\n}\n#chat-input-main.chat-input-main-focus .chat-input-textarea {\n  max-height: 70px;\n  overflow-x: hidden;\n  overflow-y: auto;\n}\n#chat-input-main.chat-input-main-focus .chat-input-ai .ai-input-editor {\n  max-height: 70px;\n  overflow-y: scroll;\n}\n#chat-input-main.openning-anime .chat-input-op-anime {\n  z-index: 2;\n  position: absolute;\n  top: 0;\n  right: 0;\n  bottom: 0;\n  left: 0;\n  pointer-events: none;\n  border-radius: inherit;\n  overflow: hidden;\n  transition: opacity 1s ease;\n}\n#chat-input-main.openning-anime .chat-input-op-anime:before {\n  content: '';\n  width: 1000px;\n  height: 1000px;\n  top: 50%;\n  left: 50%;\n  transform-origin: center;\n  position: absolute;\n  background-size: 100% 100%;\n  animation: rotateAndFade 5s linear forwards;\n  background-image: url(https://gips0.baidu.com/it/u=14154217,3818936281&fm=3028&app=3028&f=PNG&fmt=auto&q=100&size=f384_384);\n}\n@keyframes rotateAndFade {\n  0% {\n    opacity: 0;\n    transform: translate(-50%, -50%) rotate(0deg);\n  }\n  20% {\n    opacity: 1;\n    transform: translate(-50%, -50%) rotate(120deg);\n    /* 1s 旋转 120° */\n  }\n  80% {\n    opacity: 1;\n    transform: translate(-50%, -50%) rotate(480deg);\n    /* 接着旋转两圈（2s + 1s） */\n  }\n  100% {\n    opacity: 0;\n    transform: translate(-50%, -50%) rotate(600deg);\n    /* 最后 1s 再转 120° */\n  }\n}\n#chat-input-main .chat-input-wrapper-border {\n  z-index: 1;\n  position: absolute;\n  border: 1.5px solid transparent;\n  top: 0;\n  right: 0;\n  bottom: 0;\n  left: 0;\n  pointer-events: none;\n  border-radius: inherit;\n  background: #4e6ef2;\n  background: linear-gradient(white, white) padding-box, linear-gradient(160deg, #3377fe, #4c6fff, #8370ff, #ba59ff) border-box;\n}\n#chat-input-main .chat-input-wrapper-border.chat-input-wrapper-border-ai-search {\n  z-index: 2;\n}\n#chat-input-main .chat-input-wrapper-box-shadow {\n  position: absolute;\n  top: 0;\n  right: 0;\n  bottom: 0;\n  left: 0;\n  pointer-events: none;\n  border-radius: inherit;\n  box-shadow: 0 10px 40px -8px rgba(77, 128, 255, 0.05);\n}\n#chat-input-main .chat-input-wrapper {\n  position: relative;\n  z-index: 3;\n  border: 1.5px solid transparent;\n  border-radius: inherit;\n  background: linear-gradient(white, white) padding-box, transparent border-box;\n  background-origin: border-box;\n  background-clip: padding-box, border-box;\n  box-shadow: 0 13px 18px -15px rgba(77, 128, 255, 0.1);\n}\n#chat-input-main .chat-input-wrapper .chat-input-container {\n  padding: 9px 9px 9px 0px;\n}\n#chat-input-main .chat-input-wrapper .chat-input-container:hover {\n  cursor: text;\n}\n#chat-input-main .chat-input-wrapper.chat-ai-wrapper #chat-input-panel {\n  display: none;\n}\n#chat-input-main .chat-input-wrapper.chat-ai-wrapper #chat-input-panel.panel-expand {\n  opacity: 1;\n  transition: max-height 280ms ease, opacity 280ms ease;\n}\n#chat-input-main .chat-input-wrapper.chat-ai-wrapper #chat-input-panel.panel-shrink {\n  opacity: 0;\n  max-height: 0;\n  transition: max-height 160ms ease, opacity 160ms ease;\n}\n#chat-input-main .chat-input-wrapper.chat-ai-wrapper .chat-input-container {\n  padding-left: 9px;\n}\n#chat-input-main .chat-input-wrapper.chat-ai-wrapper.chat-ai-file-wrapper .chat-input-container {\n  padding-left: 18px;\n}\n#chat-input-main .chat-input-wrapper.chat-normal-wrapper .chat-input-container {\n  padding-left: 18px;\n}\n#chat-input-main .chat-input-wrapper.chat-normal-wrapper #chat-input-panel.panel-expand {\n  opacity: 1;\n}\n#chat-input-main .chat-input-wrapper.chat-normal-wrapper #chat-input-panel.panel-shrink {\n  display: none;\n}\n#chat-input-main .chat-input-wrapper #chat-input-panel {\n  position: relative;\n  overflow: hidden;\n}\n#chat-input-main .chat-input-wrapper #chat-input-panel .chat-input-panel-divider {\n  margin-top: 1px;\n  border-top: 0.3px solid #dbdce0;\n  position: absolute;\n  left: 15px;\n  right: 9px;\n  top: 0;\n}\n#chat-input-main .chat-input-wrapper #chat-input-panel .chat-input-panel-container {\n  max-height: inherit;\n  overflow: hidden;\n  border-bottom-left-radius: 18px;\n  border-bottom-right-radius: 18px;\n}\n#chat-input-main .chat-input-scroll-style::-webkit-scrollbar {\n  display: block;\n  width: 4px;\n}\n#chat-input-main .chat-input-scroll-style:hover::-webkit-scrollbar-thumb {\n  background-color: rgba(78, 110, 242, 0.1);\n  border-radius: 4px;\n}\n#chat-input-main .chat-input-scroll-style::-webkit-scrollbar-track {\n  box-shadow: none;\n  background-color: initial;\n}\n#chat-input-main .chat-input-textarea {\n  width: 100%;\n  max-height: 26px;\n  cursor: auto;\n  padding: 0;\n  overflow: hidden;\n  resize: none;\n  font-size: 16px;\n  border: none;\n  outline: none;\n  line-height: 26px;\n  display: block;\n  caret-color: #335bff;\n}\n#chat-input-main .chat-input-textarea::placeholder {\n  padding-left: 1px;\n  color: #9195a3;\n}\n#chat-input-main .chat-input-ai {\n  position: relative;\n}\n#chat-input-main .chat-input-ai .ai-input-prefix-wrapper {\n  z-index: 1;\n  display: inline-flex;\n  padding: 5px 6px 5px 6px;\n  background: none;\n  border-radius: 9px;\n  position: relative;\n  cursor: pointer;\n}\n#chat-input-main .chat-input-ai .ai-input-prefix-wrapper .close-icon {\n  display: none;\n  cursor: pointer;\n  position: fixed;\n}\n#chat-input-main .chat-input-ai .ai-input-prefix-wrapper:hover {\n  background: rgba(78, 110, 242, 0.09);\n}\n#chat-input-main .chat-input-ai .ai-input-prefix-wrapper:hover .close-icon {\n  display: block;\n}\n#chat-input-main .chat-input-ai .ai-input-prefix-wrapper .ai-input-prefix {\n  user-select: none;\n  font-size: 16px;\n  line-height: 16px;\n  font-weight: 500;\n  background: linear-gradient(90deg, #2867fa, #873cff);\n  -webkit-background-clip: text;\n  color: transparent;\n  -webkit-text-fill-color: transparent;\n  /* Safari 兼容 */\n}\n#chat-input-main .chat-input-ai .cs-pc-input-agent {\n  display: inline-block;\n  color: #2440B3;\n  padding-left: 3px;\n  padding-right: 3px;\n  font-weight: 500;\n}\n#chat-input-main .chat-input-ai .cs-pc-input-agent .agent-icon-ai {\n  font-size: 11px;\n  line-height: 11px;\n  position: relative;\n  top: -4px;\n  font-weight: 400;\n}\n#chat-input-main .chat-input-ai .ai-input-editor {\n  outline: none;\n  line-height: 28px;\n  font-size: 16px;\n  cursor: text;\n  max-height: 28px;\n  overflow-y: hidden;\n  overflow-x: hidden;\n  caret-color: #335bff;\n  -moz-user-select: text;\n  user-select: text;\n}\n#chat-input-main .chat-input-ai .ai-input-editor.ai-input-caret-hidden {\n  caret-color: transparent;\n}\n#chat-input-main .chat-input-ai .ai-input-editor.ai-input-placeholder:after {\n  color: #9195a3;\n  content: attr(placeholder);\n  padding-left: 1px;\n}\n#chat-input-main .chat-input-ai .ai-input-editor * {\n  text-indent: 0;\n}\n#chat-input-main .chat-input-ai .ai-input-editor .input-custom-item {\n  padding: 0 9px;\n  border-radius: 9px;\n  background-color: rgba(78, 110, 242, 0.09);\n  max-width: calc(100% - 27px);\n  font-weight: 500;\n  color: #4e6ef2;\n  display: inline-block;\n  line-height: 26px;\n}\n#chat-input-main .chat-input-ai .ai-input-editor .input-custom-item:focus {\n  outline: none;\n}\n#chat-input-main .chat-input-ai .ai-input-editor .input-custom-placeholder:after {\n  content: attr(placeholder);\n  color: rgba(78, 110, 242, 0.4);\n}\n#chat-input-main .chat-input-ai .ai-input-editor .input-custom-no-width {\n  user-select: none;\n  display: inline-block;\n  width: 3px;\n}\n#chat-input-main .chat-input-tool {\n  padding-top: 9px;\n  align-items: center;\n  display: flex;\n  justify-content: center;\n  width: 100%;\n}\n#chat-input-main .chat-input-tool * {\n  user-select: none;\n}\n#chat-input-main .chat-input-tool .tools-placeholder-wrapper {\n  flex: 1 1;\n  min-width: 12px;\n}\n#chat-input-main .chat-input-tool .right-tools-wrapper {\n  padding-left: 9px;\n  background: #fff;\n  border-radius: 12px;\n  align-items: center;\n  display: flex;\n}\n#chat-input-main .chat-input-tool .right-tools-wrapper #right-tool {\n  display: flex;\n  align-items: center;\n  margin-right: 18px;\n}\n#chat-input-main .chat-input-tool .right-tools-wrapper #right-tool .tools-clear-icon {\n  display: none;\n  cursor: pointer;\n  margin-right: 15px;\n}\n#chat-input-main .chat-input-tool .right-tools-wrapper #right-tool .tools-clear-icon.show-clear-icon {\n  display: block;\n  opacity: 0.85;\n}\n#chat-input-main .chat-input-tool .right-tools-wrapper #right-tool .tools-clear-icon svg {\n  display: block;\n}\n#chat-input-main .chat-input-tool .right-tools-wrapper #chat-submit-button {\n  font-size: 17px;\n  font-weight: 500;\n  width: 108px;\n  height: 44px;\n  cursor: pointer;\n  color: #fff;\n  border-radius: 15px;\n  position: relative;\n  border: none;\n  background: linear-gradient(136deg, #286aff, #4e6ef2, #7274f9, #9f66ff);\n}\n#chat-input-main .chat-input-tool .right-tools-wrapper #chat-submit-button:hover {\n  background-image: linear-gradient(rgba(0, 0, 0, 0.09), rgba(0, 0, 0, 0.09)), linear-gradient(136deg, #286aff, #4e6ef2, #7274f9, #9f66ff);\n}\n#chat-input-main .chat-input-tool .right-tools-wrapper #chat-submit-button-ai {\n  cursor: pointer;\n  opacity: 0.3;\n}\n#chat-input-main .chat-input-tool .right-tools-wrapper #chat-submit-button-ai.chat-submit-button-ai-active {\n  opacity: 1;\n}\n.one-line-textarea #chat-input-main .chat-input-textarea {\n  white-space: nowrap;\n}\n#chat-input-extension {\n  position: absolute;\n  width: 100%;\n  bottom: -88px;\n}\n#chat-input-main.one-line-input #chat-input-area {\n  width: 100%;\n}\n#chat-input-main.one-line-input .chat-input-wrapper .chat-input-container {\n  padding-bottom: 9px;\n}\n#chat-input-main.one-line-input .chat-input-tool {\n  position: absolute;\n  right: 2.5px;\n  top: 2.5px;\n  padding-top: 0;\n  width: auto;\n}\n#chat-input-main.one-line-input .chat-input-tool #left-tool {\n  display: none;\n}\n#chat-input-main.one-line-input .chat-input-tool #chat-submit-button {\n  height: 38px;\n}\n.chat-input-anchor-ai-search #chat-input-main {\n  border-radius: 21px;\n}\n.chat-input-anchor-ai-search #chat-input-main .chat-input-tool {\n  margin-top: 12px;\n}\n.chat-input-anchor-ai-search #chat-input-main .chat-input-container {\n  padding: 9px 12px 11px 12px !important;\n}\n.chat-input-anchor-ai-search #chat-input-main .chat-input-container .right-tools-wrapper {\n  margin-top: 3px;\n}\n.chat-input-anchor-ai-search #chat-input-main .chat-input-container #chat-input-top-band {\n  padding-left: 3px;\n}\n.chat-input-anchor-ai-search #chat-input-main .chat-input-container #chat-input-area {\n  padding-left: 3px;\n}\n.chat-input-anchor-ai-search #chat-input-main .chat-input-scroll-style {\n  scrollbar-width: auto;\n  scrollbar-color: auto;\n}\n@keyframes rotateForever {\n  from {\n    transform: rotate(0deg);\n  }\n  to {\n    transform: rotate(360deg);\n  }\n}\n.ai-input-file-delete {\n  width: 15px;\n  height: 15px;\n  position: fixed;\n  display: none;\n}\n.ai-input-file-delete .ai-input-file-delete-icon {\n  width: 100%;\n  height: 100%;\n}\n.ai-input-file {\n  position: relative;\n  height: 28px;\n  max-width: 243px;\n  display: inline-flex;\n  flex-direction: row;\n  cursor: pointer;\n  padding-right: 6px;\n  vertical-align: bottom;\n  align-items: center;\n}\n.ai-input-file:hover .ai-input-file-delete {\n  display: flex;\n}\n.ai-input-file:hover .ai-input-file-inner {\n  background: linear-gradient(0deg, rgba(0, 0, 0, 0.03) 0%, rgba(0, 0, 0, 0.03) 100%), #f5f6fa;\n}\n.ai-input-file .ai-input-file-inner {\n  position: relative;\n  height: 28px;\n  max-width: 243px;\n  display: inline-flex;\n  flex-direction: row;\n  border-radius: 6px;\n  background-color: #f5f6f9;\n  box-sizing: border-box;\n  cursor: pointer;\n  padding: 6px;\n  vertical-align: bottom;\n  align-items: center;\n}\n.ai-input-file .ai-input-file-icon {\n  position: relative;\n}\n.ai-input-file .ai-input-file-icon .ai-input-file-icon-img {\n  width: 16px;\n  height: 16px;\n  border-radius: var(--cos-rounded-sm);\n  display: block;\n}\n.ai-input-file .ai-input-file-name {\n  font-size: 16px;\n  line-height: 16px;\n  margin-left: 3px;\n  white-space: nowrap;\n  overflow: hidden;\n  text-overflow: ellipsis;\n}\n.ai-input-file-uploading .ai-input-file-icon-loading {\n  position: absolute;\n  top: calc(50% - 5px);\n  left: calc(50% - 5px);\n  width: 10px;\n  height: 10px;\n  animation: rotateForever 1s linear infinite;\n}\n.ai-input-file-failed .ai-input-file-content {\n  color: #848691;\n}\n.ai-input-image {\n  position: relative;\n  vertical-align: bottom;\n  width: 28px;\n  height: 28px;\n  display: inline-flex;\n  flex-direction: row;\n  border-radius: 6px;\n  cursor: pointer;\n  padding-right: 6px;\n}\n.ai-input-image .ai-input-image-bg {\n  object-fit: cover;\n  border-radius: 6px;\n  min-width: 100%;\n}\n.ai-input-image:hover .ai-input-file-delete {\n  display: flex;\n}\n.ai-input-image-uploading .ai-input-file-icon-loading {\n  position: absolute;\n  top: calc(50% - 5px);\n  left: calc(50% - 5px);\n  width: 10px;\n  height: 10px;\n  animation: rotateForever 1s linear infinite;\n}\n.ai-bdsug.ai-bdsug-new {\n  font-size: 14px;\n  font-weight: 400;\n  color: #1e1f24;\n  padding-bottom: 14px;\n  margin-top: calc(9px + 5px);\n  -webkit-font-smoothing: auto;\n  -moz-osx-font-smoothing: auto;\n}\n.ai-bdsug.ai-bdsug-new ul {\n  /* 通用直达模板热标样式 */\n  /* 老数据热标样式 */\n  /* 通用直达模板 */\n}\n.ai-bdsug.ai-bdsug-new ul li.bdsug-store {\n  color: #1e1f24;\n}\n.ai-bdsug.ai-bdsug-new ul li.bdsug-s {\n  background-color: #f5f5f6;\n  color: #315efb;\n}\n.ai-bdsug.ai-bdsug-new ul li.bdsug-s span {\n  color: #315efb;\n}\n.ai-bdsug.ai-bdsug-new ul li.bdsug-s b {\n  color: #315efb;\n}\n.ai-bdsug.ai-bdsug-new ul li.bdsug-s .direct-sug-wrap .name {\n  color: #315efb;\n}\n.ai-bdsug.ai-bdsug-new ul li.bdsug-s .direct-sug-wrap .brief,\n.ai-bdsug.ai-bdsug-new ul li.bdsug-s .direct-sug-wrap .info {\n  color: #1e1f24;\n}\n.ai-bdsug.ai-bdsug-new ul li {\n  position: relative;\n  padding-left: 18px;\n  padding-right: 9px;\n  min-height: 28px;\n  line-height: 28px;\n  cursor: pointer;\n  color: #626675;\n}\n.ai-bdsug.ai-bdsug-new ul li span {\n  color: #1e1f24;\n}\n.ai-bdsug.ai-bdsug-new ul li b {\n  font-weight: 400;\n  color: #1e1f24;\n}\n.ai-bdsug.ai-bdsug-new ul li .bdsug-store-del {\n  right: 9px;\n  text-decoration: none;\n}\n.ai-bdsug.ai-bdsug-new ul li .bdsug-store-del:hover {\n  color: #315efb;\n}\n.ai-bdsug.ai-bdsug-new ul .bdsug-ai-guide {\n  box-sizing: content-box;\n  display: inline-flex;\n  align-items: center;\n  justify-content: center;\n  padding: 0 3px;\n  border-radius: 3px;\n  margin-left: 3px;\n  transform: translateY(-0.5px);\n}\n.ai-bdsug.ai-bdsug-new ul .bdsug-ai-guide #bdsug-ai-text {\n  color: #6e4bfa;\n  font-size: 12px;\n}\n.ai-bdsug.ai-bdsug-new ul .bdsug-ai-guide .bdsug-logo {\n  margin-left: 1px;\n  margin-right: 3px;\n  height: 14px;\n}\n.ai-bdsug.ai-bdsug-new ul .sug-tag-text {\n  position: sticky;\n  right: -4px;\n  margin-top: -2.5px;\n  display: inline-block;\n  box-sizing: border-box;\n  margin-left: 6px;\n  padding: 1px;\n  font-size: 12px;\n  line-height: 12px;\n  font-weight: 500;\n  text-align: center;\n  border-radius: 4px;\n  vertical-align: middle;\n  border-width: 1px;\n  border-style: solid;\n}\n.ai-bdsug.ai-bdsug-new ul .sug-tag-img {\n  height: 18px;\n  max-width: 80px;\n  vertical-align: middle;\n  margin-left: 6px;\n}\n.ai-bdsug.ai-bdsug-new ul .sug-new-tag {\n  text-align: center;\n  margin-left: 6px;\n  box-sizing: border-box;\n  font-size: 12px;\n  line-height: 14px;\n  padding: 1px 4px;\n  font-weight: 500;\n}\n.ai-bdsug.ai-bdsug-new ul .sug-new-tag-grey {\n  color: #858585;\n  border: 1px solid rgba(133, 133, 133, 0.5);\n  border-radius: 4px;\n}\n.ai-bdsug.ai-bdsug-new ul .sug-new-tag-blue {\n  color: #3366ff;\n  border: 1px solid rgba(51, 102, 255, 0.4);\n  border-radius: 4px;\n}\n.ai-bdsug.ai-bdsug-new ul .sug-new-tag-orange {\n  color: #ff3333;\n  border: 1px solid rgba(255, 51, 51, 0.4);\n  border-radius: 4px;\n}\n.ai-bdsug.ai-bdsug-new ul .sug-hot-orange,\n.ai-bdsug.ai-bdsug-new ul .sug-hot-grey,\n.ai-bdsug.ai-bdsug-new ul .sug-hot-blue {\n  display: inline-block;\n  width: 12px;\n  height: 12px;\n  font-size: 12px;\n  line-height: 12px;\n  padding: 2px;\n  text-align: center;\n  font-weight: 500;\n  margin-left: 6px;\n  vertical-align: text-bottom;\n}\n.ai-bdsug.ai-bdsug-new ul .direct-sug-wrap {\n  display: block;\n  height: 40px;\n  padding: 7px 0;\n  color: #626675;\n  /* 顶部样式 */\n  /* 底部样式 */\n}\n.ai-bdsug.ai-bdsug-new ul .direct-sug-wrap .left-img-wrap {\n  position: relative;\n}\n.ai-bdsug.ai-bdsug-new ul .direct-sug-wrap .left-img-wrap::before {\n  content: '';\n  width: 38px;\n  height: 38px;\n  position: absolute;\n  top: 0;\n  right: 0;\n  left: 0;\n  bottom: 0;\n  border: 1px solid rgba(0, 0, 0, 0.06);\n  border-radius: 9px;\n}\n.ai-bdsug.ai-bdsug-new ul .direct-sug-wrap .left-img {\n  box-sizing: border-box;\n  float: left;\n  width: 40px;\n  height: 40px;\n  border-radius: 9px;\n  margin-right: 6px;\n}\n.ai-bdsug.ai-bdsug-new ul .direct-sug-wrap .content {\n  float: left;\n}\n.ai-bdsug.ai-bdsug-new ul .direct-sug-wrap .header {\n  margin-bottom: 6px;\n  line-height: 18px;\n  height: 18px;\n  vertical-align: middle;\n}\n.ai-bdsug.ai-bdsug-new ul .direct-sug-wrap .name {\n  float: left;\n  font-size: 16px;\n  font-weight: 500;\n  color: #626675;\n}\n.ai-bdsug.ai-bdsug-new ul .direct-sug-wrap .tag-img {\n  width: 18px;\n  margin-left: 4px;\n}\n.ai-bdsug.ai-bdsug-new ul .direct-sug-wrap .more {\n  line-height: 14px;\n  width: 240px;\n}\n.ai-bdsug.ai-bdsug-new ul .direct-sug-wrap .brief,\n.ai-bdsug.ai-bdsug-new ul .direct-sug-wrap .info {\n  font-size: 14px;\n  font-weight: 400;\n  color: #626675;\n}\n.ai-bdsug.ai-bdsug-new ul .direct-sug-wrap .brief {\n  margin-right: 6px;\n}\n.ai-bdsug.ai-bdsug-new ul .direct-sug-wrap .right-btn {\n  float: right;\n  margin-top: 8px;\n  margin-right: 6px;\n  width: 60px;\n  height: 24px;\n  text-align: center;\n  font-size: 14px;\n  color: #3366ff;\n  line-height: 24px;\n  background-image: linear-gradient(111deg, #e8f7ff 0%, #edf0ff 100%);\n  border-radius: 12px;\n}\n.ai-bdsug.ai-bdsug-new ul .direct-sug-wrap .right-btn:hover {\n  background: #315efb;\n  color: #fff;\n}\n.ai-bdsug.ai-bdsug-new .bdsug-feedback-tool-zone {\n  margin-top: 10px;\n}\n.ai-bdsug.ai-bdsug-new .bdsug-feedback-tool-zone .setup_storeSug:hover {\n  color: #315efb !important;\n}\n.ai-bdsug.ai-bdsug-new .bdsug-feedback-tool-zone .del_all_storeSug:hover {\n  color: #315efb !important;\n}\n.ai-bdsug.ai-bdsug-new .bdsug-feedback-tool-zone .more_storeSug:hover {\n  color: #315efb !important;\n}\n.ai-bdsug.ai-bdsug-new .ai-bdsug-feedback-wrap {\n  background: none;\n  text-align: right;\n  margin-right: 15px;\n}\n.ai-bdsug.ai-bdsug-new .ai-bdsug-feedback-wrap .bdsug-feedback {\n  color: #9195a3;\n  font-size: 13px;\n  cursor: pointer;\n}\n.ai-bdsug.ai-bdsug-new .ai-bdsug-feedback-wrap .bdsug-feedback:hover {\n  color: #315efb;\n}\n.ai-sug-panel-list {\n  -webkit-font-smoothing: auto;\n  -moz-osx-font-smoothing: auto;\n  display: flex;\n  justify-content: start;\n  margin-bottom: 10px;\n  margin-left: 17px;\n}\n.ai-sug-panel-list .ai-sug-panel-divider {\n  height: 14px;\n  margin: 0 7.5px;\n  align-self: center;\n  border-right: 0.5px solid #dbdce0;\n}\n.ai-sug-panel-list .ai-sug-panel-btn {\n  cursor: pointer;\n  padding: 0 7.5px;\n  border-radius: 9px;\n  height: 30px;\n  display: flex;\n  align-items: center;\n  font-size: 14px;\n  line-height: 14px;\n}\n.ai-sug-panel-list .ai-sug-panel-btn img {\n  height: 14px;\n  width: 14px;\n  margin-right: 6px;\n}\n.ai-sug-panel-list .ai-sug-panel-btn:hover {\n  color: #315efb;\n}\n.ai-sug-panel-list .ai-sug-panel-btn:hover img {\n  filter: brightness(0) saturate(100%) invert(35%) sepia(77%) saturate(2345%) hue-rotate(218deg) brightness(103%) contrast(99%);\n}\n",""]),t.exports=e},function(t,e,x){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var w=x(1),o=x(33),y=x(65),S=x(237),E=x(238),u=x(239),r=x(66),n=(i.prototype.render=function(){this.rootDom.innerHTML='\n            <div class="chat-input-anchor">\n                <div id="chat-input-main">\n                    <div class="chat-input-wrapper">\n                        <div class="chat-input-area">\n                            <textarea\n                                id="chat-textarea"\n                                class="chat-input-textarea"\n                                placeholder="{{placeholder}}"\n                                rows="1"\n                            >\n                            </textarea>\n                        </div>\n                        <div class="chat-input-tool">\n                            <div id="left-tool" class="left-tools-wrapper">\n                                <slot name="left-tool"></slot>\n                            </div>\n                            <div class="tools-placeholder-wrapper"></div>\n                            <div class="right-tools-wrapper">\n                                <div id="right-tool">\n                                    <slot name="right-tool"></slot>\n                                </div>\n                                <button id="chat-submit-button" on-click="handleSubmit">百度一下</button>\n                            </div>\n                        </div>\n                        <div id="chat-input-pannel"></div>\n                    </div>\n                </div>\n                <div id="chat-input-extension">\n                    <slot name="chat-input-extension"></slot>\n                </div>\n            </div>\n        ',this.init()},i.prototype.init=function(){var t;this.clearEl=this.rootDom.querySelector(".tools-clear-icon"),this.wrapperEl=this.rootDom.querySelector(".chat-input-wrapper"),this.inputEl=this.rootDom.querySelector("#chat-textarea"),this.panelEl=this.rootDom.querySelector("#chat-input-panel"),this.inputMainDom=this.rootDom.querySelector("#chat-input-main"),this.inputContainEl=this.rootDom.querySelector(".chat-input-container"),null!==(t=this.inputEl)&&void 0!==t&&t.removeAttribute("onkeydown"),this.isChatSearch||this.initSugInstace()},i.prototype.attached=function(t){var e,n,i,a=t.initialFocus,t=t.hasOpenAnime,t=void 0!==t&&t;void 0!==a&&!a||null===(e=this.inputEl)||void 0===e||e.focus(),t&&(t=(new Date).toISOString().split("T")[0],localStorage.getItem(S.INPUT_ANIME_LS_KEY)!==t&&(localStorage.setItem(S.INPUT_ANIME_LS_KEY,t),null!=(n=this.inputMainDom)&&n.classList.add("openning-anime"),i=setTimeout(function(){null!=n&&n.classList.remove("openning-anime")},S.OPENING_ANIMATION_DURATION),document.querySelector(".chat-input-anchor").addEventListener("click",function(){clearTimeout(i),n.querySelector(".chat-input-op-anime").style.opacity="0";var t=setTimeout(function(){null!=n&&n.classList.remove("openning-anime"),clearTimeout(t)},1200)},!0)))},i.prototype.nextTick=function(t){var r=this;return this.nextTicksCallbackList.push(null!=t?t:function(){}),this.pending||(this.pending=!0,Promise.resolve().then(function(){var t,e;r.pending=!1;var n=r.nextTicksCallbackList.slice(0);r.nextTicksCallbackList.length=0;try{for(var i=(0,w.__values)(n),a=i.next();!a.done;a=i.next())(0,a.value)()}catch(o){t={error:o}}finally{try{a&&!a.done&&(e=i["return"])&&e.call(i)}finally{if(t)throw t.error}}})),t?Promise.resolve():new Promise(function(t){r.nextTicksCallbackList.push(t)})},i.prototype.getMode=function(){return this.mode},i.prototype.setMode=function(t){var e,n=this,i=this.rootDom.querySelector("#chat-input-area");i&&t!==this.mode&&((this.mode=t)===E.ChatInputMode.AI?(this.savedNormalInputDom=i.innerHTML,i.innerHTML='\n                <div\n                    id="ai-input"\n                    class="chat-input-ai"\n                >\n                    <div\n                        id="ai-input-editor"\n                        class="ai-input-editor chat-input-scroll-style"\n                        data-ai-placeholder='+this.aiPlaceholder+'\n                        contenteditable="true"\n                        spellcheck="false"\n                        data-placeholder="请输入内容..."\n                    >\n                    </div>\n                </div>\n            ',null!==(e=this.wrapperEl)&&void 0!==e&&e.classList.add("chat-ai-wrapper"),null!==(e=this.wrapperEl)&&void 0!==e&&e.classList.remove("chat-normal-wrapper","chat-ai-file-wrapper"),this.inputEl=this.rootDom.querySelector("#ai-input #ai-input-editor"),this.sugPanelInstance&&(null!==(e=null===(e=this.panelEl)||void 0===e?void 0:e.querySelector(".ai-bdsug"))&&void 0!==e&&e.remove(),null!==(e=null===(e=this.panelEl)||void 0===e?void 0:e.querySelector(".ai-sug-panel-list"))&&void 0!==e&&e.remove(),this.sugPanelInstance.destroy(),this.sugPanelInstance=null)):(i.innerHTML=this.savedNormalInputDom||'\n                <textarea\n                    id="chat-textarea"\n                    class="chat-input-textarea chat-input-scroll-style"\n                    rows="1"\n                >\n                </textarea>',this.inputEl=this.rootDom.querySelector("#chat-textarea"),null!==(i=this.wrapperEl)&&void 0!==i&&i.classList.add("chat-normal-wrapper"),null!==(i=this.wrapperEl)&&void 0!==i&&i.classList.remove("chat-ai-wrapper","chat-ai-file-wrapper"),this.panelEl.style.maxHeight="0",this.isChatSearch||this.nextTick(function(){n.mode===E.ChatInputMode.NORMAL&&n.initSugInstace()})),this.eventBinder.clear(E.ListenrEventType.INPUT),this.bindInputAreaEvent(),this.eventEmitter.emit("change",t))},i.prototype.getCustomInputNode=function(t){var n=[];return t.forEach(function(t,e){"text"===t.type?n.push((0,y.getTextNode)(t)):"input"===t.type&&(n.push((0,y.getNoWidthNode)()),n.push((0,y.getInputNode)(t,e)),n.push((0,y.getNoWidthNode)()))}),n},i.prototype.upperPcInput=function(a,o,r,s){var l,u,c,p;return(0,w.__awaiter)(this,void 0,void 0,function(){var e,n,i=this;return(0,w.__generator)(this,function(t){return e=null===(l=this.inputEl)||void 0===l?void 0:l.querySelector(".ai-input-editor-content"),(e=a.isChatSearch?this.inputEl:e)?(r&&null!==(u=null===(u=this.inputEl)||void 0===u?void 0:u.querySelector(".ai-input-prefix"))&&void 0!==u&&u.setAttribute("data-function-tab",r),s&&null!==(p=null===(c=this.inputEl)||void 0===c?void 0:c.querySelector(".ai-input-prefix"))&&void 0!==p&&p.setAttribute("data-function-name",s),"text"===o?(n=document.createTextNode(a.word),"query"===a.type?e.appendChild(n):e.insertBefore(n,e.firstChild)):"input-custom"===o?(n=(0,y.handleCustomInputData)(a),this.getCustomInputNode(n).forEach(function(t){null!=e&&e.appendChild(t)})):"agent"===o&&this.addAiInputAgent({agentName:a.source_name,agentId:a.agent_id,agentSearchId:a.agent_search_id}),setTimeout(function(){var t;null!==(t=i.inputEl)&&void 0!==t&&t.classList.remove("ai-input-caret-hidden"),(0,y.focusNeedInput)(i.inputEl.querySelector(".ai-input-editor-content")),i.inputEl.scrollTop=null===(t=i.inputEl)||void 0===t?void 0:t.scrollHeight},80)):null!==(c=this.inputEl)&&void 0!==c&&c.classList.remove("ai-input-caret-hidden"),[2]})})},i.prototype.getStatusInfo=function(){return{panelName:this.getCurrentPanelName()}},i.prototype.setInitalRow=function(t){this.initialRow=t},i.prototype.addAiInputContent=function(t){var e;null!==(e=this.inputEl)&&void 0!==e&&e.classList.add("ai-input-caret-hidden"),t.noClear||this.clearInput(),null!==(e=t.inputCustom)&&void 0!==e&&e.length?(this.isChatSearch&&(this.aiInputStatus.isCustomInput=!0),this.upperPcInput(t.inputCustom,"input-custom",t.functionTab,t.functionName)):t.word&&this.upperPcInput(t,"text")},i.prototype.fileUpLoadInput=function(){var t;this.mode!==E.ChatInputMode.AI?(this.temporaryContent=this.getValue(),this.sugPanelInstance&&(null!==(t=null===(t=this.panelEl)||void 0===t?void 0:t.querySelector(".ai-bdsug"))&&void 0!==t&&t.remove(),null!==(t=null===(t=this.panelEl)||void 0===t?void 0:t.querySelector(".ai-sug-panel-list"))&&void 0!==t&&t.remove(),this.sugPanelInstance.destroy(),this.sugPanelInstance=null),this.setMode(E.ChatInputMode.AI),null!==(t=this.wrapperEl)&&void 0!==t&&t.classList.add("chat-ai-file-wrapper")):"ai_read"===this.getCurrentPanelName()&&!this.getAiInputStatus().isUserInput&&this.getValue()&&this.clearInput(),this.resetPlaceholder("描述想要了解的内容")},i.prototype.reset=function(){this.closePanel()},i.prototype.getFunctionInfo=function(){var t=null===(t=this.inputEl)||void 0===t?void 0:t.querySelector(".ai-input-prefix");return{functionType:(null==t?void 0:t.getAttribute("data-function-type"))||"",functionTab:(null==t?void 0:t.getAttribute("data-function-tab"))||"",functionName:(null==t?void 0:t.getAttribute("data-function-name"))||""}},i.prototype.addAiInputPrefix=function(t,e){var n;this.inputEl&&this.mode===E.ChatInputMode.AI&&((n=document.createElement("span")).className="ai-input-prefix-wrapper",n.contentEditable="false",n.innerHTML='\n            <span class="ai-input-prefix" data-function-type="'+e+'">\n                '+t+'\n                <img\n                    class="close-icon"\n                    src="https://gips2.baidu.com/it/u=3457981003,2090099587&fm=3028&app=3028&f=PNG&fmt=auto&q=100&size=f45_45"\n                    width="15"\n                    height="15"\n                >\n            </span>\n\n        ',this.bindPrefixEvent(n),(t=document.createElement("span")).className="ai-input-editor-content",this.inputEl.append(t),this.inputEl.insertBefore(n,this.inputEl.firstChild),this.prefixEl=n)},i.prototype.addAiInputAgent=function(t){var e,n=this;this.inputEl&&this.mode===E.ChatInputMode.AI&&!this.inputEl.querySelector(".cs-pc-input-agent")&&((e=document.createElement("span")).className="cs-pc-input-agent",e.contentEditable="false",e.innerText="@"+t.agentName,this.inputEl.append(e),this.agentEl=e,this.hasAgent||this.removeUserInputSugText(),this.nextTick(function(){(0,y.focusInputLast)(n.inputEl)}),this.hasAgent=!0)},i.prototype.removeUserInputSugText=function(){var e=this,t=null!==(n=this.inputEl.childNodes)&&void 0!==n?n:[],n=Array.from(t).findIndex(function(t){return t===e.agentEl});if(!(n<=0))for(var i=n-1;0<=i;i--)if(t[i]&&t[i].nodeType===Node.TEXT_NODE){var a=t[i].textContent.lastIndexOf("@");if(-1!==a){t[i].textContent=t[i].textContent.substring(0,a);break}t[i].textContent=""}},i.prototype.bindPrefixEvent=function(e){var n,i,a=this;e&&(n=e.querySelector(".close-icon"),this.eventBinder.add(e,"mouseenter",function(){var t;n&&(null!==(t=a.eventEmitter)&&void 0!==t&&t.emit("prefix-hover"),t=e.getBoundingClientRect(),n.style.cssText="\n                top: "+(t.top-7.5)+"px;\n                left: "+(t.left+t.width-7.5)+"px;\n            ",a.nextTick(function(){n.style.display="block"}))},E.ListenrEventType.OTHER),this.eventBinder.add(e,"mouseleave",function(){n&&(n.style.cssText="\n                display: none;\n            ")},E.ListenrEventType.OTHER),i=function(t){t.stopPropagation(),a.eventEmitter.emit("prefix-click"),a.closePanel(),null!=n&&n.removeEventListener("mousedown",i)},e.addEventListener("mousedown",i))},i.prototype.renderAiInputFilePrefix=function(i){var a;return(0,w.__awaiter)(this,void 0,void 0,function(){var s,l,u,e,n,c=this;return(0,w.__generator)(this,function(t){switch(t.label){case 0:return this.inputEl&&this.mode===E.ChatInputMode.AI&&i&&this.curFileStatus!==i.status?(this.curFileStatus=i.status,[4,Promise.resolve().then(function(){return(0,w.__importStar)(x(240))})]):[2];case 1:return e=t.sent(),s=e.getFileIcon,l=e.getImageUrl,u=e.IconMaps,n=document.createDocumentFragment(),e=function(t,e){var n,i,a,o=document.createElement("span");o.contentEditable="false",o.id="ai-input-file-tag",o.className=["file"===t?"ai-input-file":"ai-input-image",0===e.status?"file"===t?"ai-input-file-uploading":"ai-input-image-uploading":"",2===e.status?"ai-input-file-failed":""].filter(Boolean).join(" "),"file"===t?((n=document.createElement("span")).className="ai-input-file-inner",(a=document.createElement("span")).className="ai-input-file-icon",(i=document.createElement("img")).className="ai-input-file-icon-img",i.src=s(e),a.appendChild(i),0===e.status&&((r=document.createElement("img")).className="ai-input-file-icon-loading",r.src=u.loadingIcon,a.appendChild(r)),n.appendChild(a),(a=document.createElement("span")).className="ai-input-file-name",a.textContent=e.fileName,n.appendChild(a),o.appendChild(n)):"image"===t&&((t=document.createElement("img")).className="ai-input-image-bg",t.src=l(e),o.appendChild(t),0===e.status&&((r=document.createElement("img")).className="ai-input-file-icon-loading",r.src=u.loadingIcon,o.appendChild(r)));e=document.createElement("span");e.className="ai-input-file-delete";var r=document.createElement("img");return r.className="ai-input-file-delete-icon",r.src=u.deleteIcon,e.appendChild(r),o.appendChild(e),c.bindFilePrefixEvent(o),o},"file"!==i.uploadType&&"image"!==i.uploadType||(e=e(i.uploadType,i),n.appendChild(e)),null!==(a=this.inputEl.querySelector("#ai-input-file-tag"))&&void 0!==a&&a.remove(),this.getCurrentPanelName()?this.inputEl.appendChild(n):this.inputEl.insertBefore(n,this.inputEl.firstChild),(n=this.inputEl.lastChild)&&n.nodeType===Node.TEXT_NODE&&" "===n.data||this.inputEl.appendChild(document.createTextNode(" ")),this.temporaryContent&&i.status===o.UploadStatus.BOS_SUCCESS&&(this.temporaryContent=this.getValue(),this.setValue(""),this.initPanelInputDom=this.inputEl.innerHTML,this.getValue()||this.setValue(this.temporaryContent),this.temporaryContent=""),this.temporaryContent&&(this.getValue()||this.setValue(this.temporaryContent)),o.UploadStatus.BOS_SUCCESS&&"ai_read"===this.getCurrentPanelName()&&(this.initPanelInputDom=this.inputEl.innerHTML),this.resetPlaceholder("描述想要了解的内容"),this.nextTick(function(){(0,y.setCursorToNode)(c.inputEl.lastChild)}),[2]}})})},i.prototype.bindFilePrefixEvent=function(e){var n,i,a=this;e&&(n=e.querySelector(".ai-input-file-delete"),this.eventBinder.add(e,"mouseenter",function(){var t=e.getBoundingClientRect();n.style.cssText="\n                top: "+(t.top-4.5)+"px;\n                left: "+(t.right-11)+"px;\n            ",a.eventEmitter.emit("prefix-file-hover")},E.ListenrEventType.OTHER),i=function(t){t.stopPropagation(),e.remove(),n.removeEventListener("click",i),a.eventEmitter.emit("prefix-file-click-delete"),a.initPanelInputDom=a.inputEl.innerHTML},n.addEventListener("click",i),e.appendChild(n))},i.prototype.setValue=function(t){var e=this;this.inputEl&&(this.mode===E.ChatInputMode.NORMAL?this.inputEl.value=t:(t=document.createTextNode(t),Array.from(this.inputEl.childNodes).forEach(function(t){t.nodeType===Node.TEXT_NODE&&e.inputEl.removeChild(t)}),this.inputEl.appendChild(t)),this.checkClearIcon(),this.resetPlaceholder())},i.prototype.setFocus=function(){var t;null!==(t=this.inputEl)&&void 0!==t&&t.focus()},i.prototype.getValue=function(){if(!this.inputEl)return"";if(this.mode===E.ChatInputMode.NORMAL)return this.inputEl.value.trim();var t=Array.from(this.inputEl.childNodes);return 0===t.length?"":t.filter(function(t){return!(t instanceof HTMLElement&&(t.classList.contains("ai-input-prefix-wrapper")||t.classList.contains("ai-input-file")||t.classList.contains("cs-pc-input-agent")))}).map(function(t){return t.nodeType===Node.TEXT_NODE?t.textContent||"":t instanceof HTMLElement?t.innerText:""}).join("").trim()},i.prototype.getHasAgent=function(){return this.hasAgent},i.prototype.getPrefixEl=function(){return this.prefixEl},i.prototype.getHasPrefixEl=function(){return!!this.prefixEl},i.prototype.getInputEl=function(){return this.inputEl},i.prototype.closeSugUpdate=function(){var t;null!==(t=null===(t=this.sugPanelInstance)||void 0===t?void 0:t.sug)&&void 0!==t&&t.closeSugUpdate()},i.prototype.openAiPanel=function(e,n){var i;return(0,w.__awaiter)(this,void 0,void 0,function(){return(0,w.__generator)(this,function(t){return this.sugPanelInstance&&(null!==(i=null===(i=this.panelEl)||void 0===i?void 0:i.querySelector(".ai-bdsug"))&&void 0!==i&&i.remove(),null!==(i=null===(i=this.panelEl)||void 0===i?void 0:i.querySelector(".ai-sug-panel-list"))&&void 0!==i&&i.remove(),this.sugPanelInstance.destroy(),this.sugPanelInstance=null),e&&this.currentPanelName===e.type?(0,y.focusInputLast)(this.inputEl):(this.mode===E.ChatInputMode.AI&&this.closePanel({needFocus:!1}),this.currentPanelName=e.type,this.setMode(E.ChatInputMode.AI),this.addAiInputPrefix(e.text,e.type),this.checkClearIcon(),this.setPlaceHolder((null==n?void 0:n.place_holder)||"问我任何问题"),this.renderPanelFromSanComponent(e.type,n),this.initPanelInputDom=this.inputEl.innerHTML,this.eventEmitter.emit("panel-render",e),this.addDefaultContent(n)),[2]})})},i.prototype.addDefaultContent=function(t){var e=this,n=null==t?void 0:t["function"],i=null==t?void 0:t.default_content;(n||i)&&(n?this.nextTick(function(){var t;e.addAiInputContent({inputCustom:(null===(t=null==n?void 0:n.data)||void 0===t?void 0:t.input.input_custom)||{}})}):(this.addPrefixHolder(),this.aiPrefixContent=i,this.nextTick(function(){e.setValue(i)})))},i.prototype.resetAiInputStatus=function(){this.aiInputStatus={isComposing:!1,isBreakRow:!1,isCustomInput:!1,isUserInput:!1}},i.prototype.getAiInputStatus=function(){return this.aiInputStatus},i.prototype.closePanel=function(t){var e,n=this,i=(t||{}).needFocus,a=void 0===i||i,o=this.panelEl;if(o){if(this.aiPrefixContent="",this.currentPanelName="",this.initPanelInputDom="",this.currentPanelInstance&&(null!==(i=(t=this.currentPanelInstance).dispose)&&void 0!==i&&i.call(t),this.currentPanelInstance=null),this.isChatSearch?(this.setMode(E.ChatInputMode.AI),this.setPlaceHolder(this.aiPlaceholder),(this.prefixEl=null)!==(e=this.clearEl)&&void 0!==e&&e.classList.remove("show-clear-icon")):(this.resetAiInputStatus(),this.setMode(E.ChatInputMode.NORMAL)),o.querySelector(".ai-bdsug"))o.querySelectorAll(".chat-input-panel-container").forEach(function(t){return t.remove()});else for(;o.firstChild;)o.removeChild(o.firstChild);this.eventEmitter.emit("panel-close"),null!==(e=this.prefixEmptyDom)&&void 0!==e&&e.remove(),this.prefixEmptyDom=null,a&&(this.isChatSearch||setTimeout(function(){(0,y.focusInputLast)(n.inputEl);var t=n.getValue().length;n.inputEl.setSelectionRange(t,t),n.checkClearIcon()},80))}},i.prototype.showPlaceHolder=function(){var t;null!==(t=this.inputEl)&&void 0!==t&&t.classList.contains("ai-input-placeholder")||null!==(t=this.inputEl)&&void 0!==t&&t.classList.add("ai-input-placeholder")},i.prototype.hidePlaceHolder=function(){var t,e;null!==(t=this.inputEl)&&void 0!==t&&t.classList.contains("ai-input-placeholder")&&null!==(e=this.inputEl)&&void 0!==e&&e.classList.remove("ai-input-placeholder")},i.prototype.checkClearIcon=function(){var t;this.getValue()?null!==(t=this.clearEl)&&void 0!==t&&t.classList.add("show-clear-icon"):null!==(t=this.clearEl)&&void 0!==t&&t.classList.remove("show-clear-icon")},i.prototype.renderPanelFromSanComponent=function(t,i){var e,a=this,o=this.panelEl;if(o){var r=document.createElement("div");r.className="chat-input-panel-container";var n=((n={})[E.ChatPanel.CREATE]=function(){return Promise.resolve().then(function(){return(0,w.__importStar)(x(241))})},n[E.ChatPanel.PHOTO]=function(){return Promise.resolve().then(function(){return(0,w.__importStar)(x(248))})},n[E.ChatPanel.READ]=function(){return Promise.resolve().then(function(){return(0,w.__importStar)(x(255))})},n[E.ChatPanel.CODE]=function(){return Promise.resolve().then(function(){return(0,w.__importStar)(x(259))})},n);try{n[t],null!==(e=n[t])&&void 0!==e&&e.call(n).then(function(t){var e,n=t["default"]||t;a.currentPanelInstance&&(null!==(t=(e=a.currentPanelInstance).dispose)&&void 0!==t&&t.call(e),a.currentPanelInstance=null);n=new n({data:i});n.on("click",function(t,e){a.eventEmitter.emit("panel-item-click",t,e)}),n.on("input-upload",a.handleInputUpload.bind(a)),n.attach(r),a.renderPanelDivider(),o.appendChild(r),a.currentPanelInstance=n})}catch(err){console.error("面板加载失败",err)}}},i.prototype.handleInputUpload=function(a){var o;return(0,w.__awaiter)(this,void 0,void 0,function(){var e,n,i;return(0,w.__generator)(this,function(t){return e=a.uploadType,n=a.uploadFile,(i=a.functionName)&&null!==(o=null===(o=this.inputEl)||void 0===o?void 0:o.querySelector(".ai-input-prefix"))&&void 0!==o&&o.setAttribute("data-function-name",i),this.eventEmitter.emit("panel-item-upload",e,n),[2]})})},i.prototype.bindAllEvent=function(){this.bindInputAreaEvent(),this.bindOtherEvent()},i.prototype.bindInputAreaEvent=function(){this.bindMousedown(),this.bindBlur(),this.bindFocus(),this.bindClick(),this.bindKeyDown(),this.bindCompositionStart(),this.bindInput(),this.bindCompositionEnd(),this.bindKeyUp(),this.bindPaste(),this.bindSubmit(),this.bindWheel()},i.prototype.bindWheel=function(){var o=this;this.eventBinder.add(this.inputEl,"wheel",function(t){var e=o.inputEl,n=e.scrollTop,i=e.scrollHeight,a=e.clientHeight,e=t.deltaY;(0===n&&e<0||i<=n+a&&0<e)&&(t.preventDefault(),t.stopPropagation())},E.ListenrEventType.INPUT,{passive:!1})},i.prototype.bindOtherEvent=function(){this.bindChatTool(),this.bindClear(),this.bindContainerClick(),this.bindBeforeInput(),this.bindWindowScroll(),this.bindContainerScroll()},i.prototype.bindContainerScroll=function(){var s=this;this.inputContainEl&&this.eventBinder.add(this.inputContainEl,"wheel",function(t){var e;if(s.isChatSearch){var n=t.target.classList||[];try{for(var i=(0,w.__values)(Array.from(n)),a=i.next();!a.done;a=i.next())if(a.value.includes("input-capsules-model-list"))return}catch(r){o={error:r}}finally{try{a&&!a.done&&(e=i["return"])&&e.call(i)}finally{if(o)throw o.error}}}var o=t.deltaY;t.preventDefault(),t.stopPropagation(),s.inputEl.scrollTop+=o},E.ListenrEventType.OTHER,{passive:!1})},i.prototype.bindWindowScroll=function(){var e=this,n=!1,i=window.scrollY;window.addEventListener("scroll",function(){var t;window.scrollY!==i&&(n||(1!==e.initialRow||null!==(t=e.wrapperEl)&&void 0!==t&&t.classList.contains("one-line-input")||null!==(t=e.wrapperEl)&&void 0!==t&&t.classList.add("one-line-input"),window.requestAnimationFrame(function(){var t;null!==(t=e.inputEl)&&void 0!==t&&t.blur(),n=!1}),n=!0))})},i.prototype.bindContainerClick=function(){var t=this;this.inputContainEl&&this.inputEl&&this.eventBinder.add(this.inputContainEl,"click",function(){return(0,w.__awaiter)(t,void 0,void 0,function(){var e;return(0,w.__generator)(this,function(t){return this.mode===E.ChatInputMode.NORMAL?(e=this.inputEl).setSelectionRange(e.value.length,e.value.length):(0,y.focusInputLast)(this.inputEl),[2]})})},E.ListenrEventType.OTHER)},i.prototype.bindBeforeInput=function(){var r=this;this.inputEl&&this.mode!==E.ChatInputMode.AI&&this.eventBinder.add(this.inputEl,"beforeinput",function(t){var e,n=r.inputEl,i=n.value,a=n.selectionStart,o=n.selectionEnd,n="";"insertText"===t.inputType||"insertCompositionText"===t.inputType?n=null!==(e=t.data)&&void 0!==e?e:"":"insertFromPaste"===t.inputType&&t instanceof ClipboardEvent&&(n=null!==(e=null===(e=t.clipboardData)||void 0===e?void 0:e.getData("text"))&&void 0!==e?e:"");n=i.length-(o-a)+n.length;i.length>S.INPUT_MAX_LENGTH&&n>i.length&&(r.eventEmitter.emit("threshold",S.INPUT_MAX_LENGTH),t.preventDefault())},E.ListenrEventType.INPUT)},i.prototype.bindMousedown=function(){this.inputEl&&this.eventBinder.add(this.inputEl,"mousedown",function(t){t.stopPropagation()},E.ListenrEventType.INPUT)},i.prototype.bindClick=function(){var e=this;this.inputEl&&this.eventBinder.add(this.inputEl,"click",function(t){t.stopPropagation(),e.oneLineTextarea&&e.mode!==E.ChatInputMode.AI||null!==(t=e.inputMainDom)&&void 0!==t&&t.classList.remove("one-line-input"),e.eventEmitter.emit("click",e.getValue())},E.ListenrEventType.INPUT)},i.prototype.bindPaste=function(){var t=this;this.inputEl&&this.eventBinder.add(this.inputEl,"paste",function(_){return(0,w.__awaiter)(t,void 0,void 0,function(){var n,i,a,o,r,s,l,u,c,p,d,h,g,f,m,v,b;return(0,w.__generator)(this,function(t){switch(t.label){case 0:return this.mode===E.ChatInputMode.NORMAL?(h="",_.clipboardData&&(h=_.clipboardData.getData("text/plain")),f=this.inputEl,n=this.isChatSearch?this.maxLength:S.INPUT_MAX_LENGTH,f.innerText.length+h.length>n&&(_.preventDefault(),this.eventEmitter.emit("threshold",S.INPUT_MAX_LENGTH),h=h.slice(0,n-f.innerText.length),this.setValue(this.getValue()+h),this.recalculateInputHeight()),[2]):(_.preventDefault(),(g=_.clipboardData)?(i=Array.from(g.items)||[],a={},o="",[4,Promise.resolve().then(function(){return(0,w.__importStar)(x(33))})]):[2]);case 1:f=t.sent(),r=f.getFileNameSuffix,s=f.UPLOAD_FILE_TYPE,l=f.UPLOAD_IMAGE_TYPE;try{for(u=(0,w.__values)(i),c=u.next();!c.done;c=u.next())"file"===(p=c.value).kind&&(a=p.getAsFile(),d=r(a.name),s.includes(d)?o="file":l.includes(d)&&(o="image"))}catch(e){v={error:e}}finally{try{c&&!c.done&&(b=u["return"])&&b.call(u)}finally{if(v)throw v.error}}return o&&this.eventEmitter.emit("panel-item-upload",o,a),h="",_.clipboardData?h=_.clipboardData.getData("text/plain"):window.clipboardData&&(h=window.clipboardData.getData("Text")),h.length,g=this.inputEl,f=this.isChatSearch?this.maxLength:S.INPUT_MAX_LENGTH,g.innerText.length+h.length>f&&(this.eventEmitter.emit("threshold",S.INPUT_MAX_LENGTH),h=h.slice(0,f-g.innerText.length)),(m=h.split("\n")).forEach(function(t,e){t=document.createTextNode(t);(0,y.insertAtRange)(t),e!==m.length-1&&(0,y.insertAtRange)(document.createElement("br"))}),this.isCursorAtEnd()&&(this.inputEl.scrollTop=this.inputEl.scrollHeight),[2]}})})},E.ListenrEventType.INPUT)},i.prototype.isCursorAtEnd=function(){var t=window.getSelection();if(!t||!this.inputEl)return!1;var e=t.getRangeAt(0),t=e.cloneRange();return t.selectNodeContents(this.inputEl),t.setStart(e.endContainer,e.endOffset),0===t.toString().length},i.prototype.bindCompositionStart=function(){var t=this;this.inputEl&&this.eventBinder.add(this.inputEl,"compositionstart",function(){t.aiInputStatus.isComposing=!0},E.ListenrEventType.INPUT)},i.prototype.bindCompositionEnd=function(){var t=this;this.inputEl&&this.eventBinder.add(this.inputEl,"compositionend",function(){t.nextTick(function(){t.aiInputStatus.isComposing=!1})},E.ListenrEventType.INPUT)},i.prototype.bindClear=function(){var e=this;this.clearEl&&this.eventBinder.add(this.clearEl,"click",function(t){t.stopPropagation(),e.clearInput(),e.eventEmitter.emit("clear",e.getValue())},E.ListenrEventType.OTHER)},i.prototype.getCurrentPanelName=function(){return this.currentPanelName},i.prototype.setPlaceHolder=function(t){var e;this.inputEl&&(this.inputEl.setAttribute("placeholder",t),this.mode===E.ChatInputMode.AI&&null!==(e=this.inputEl)&&void 0!==e&&e.classList.add("ai-input-placeholder"))},i.prototype.resetPlaceholder=function(t){var e,n;this.inputEl&&(e=this.inputEl.getAttribute("placeholder"),t&&e!==t&&(this.inputEl.setAttribute("placeholder",t),this.mode===E.ChatInputMode.AI&&null!==(n=this.inputEl)&&void 0!==n&&n.classList.add("ai-input-placeholder")),t=this.aiPrefixContent,n=this.getValue(),!t&&!n||t===n&&!this.aiInputStatus.isUserInput?this.showPlaceHolder():this.hidePlaceHolder())},i.prototype.clearInput=function(t){var e=this;null!=t&&t.stopPropagation(),this.inputEl instanceof HTMLTextAreaElement?(this.inputEl.value="",null!==(t=this.clearEl)&&void 0!==t&&t.classList.remove("show-clear-icon"),this.inputEl.focus()):(this.inputEl.innerHTML=this.initPanelInputDom,this.bindPrefixEvent(this.inputEl.querySelector(".ai-input-prefix-wrapper")),this.bindFilePrefixEvent(this.inputEl.querySelector("#ai-input-file-tag")),window.requestAnimationFrame(function(){(0,y.focusInputLast)(e.inputEl)}),this.isChatSearch&&(this.hasAgent=!1,this.aiInputStatus.isCustomInput=!1)),this.recalculateInputHeight()},i.prototype.destroy=function(){var t,e;null!==(e=this.sugPanelInstance)&&void 0!==e&&e.destroy(),(this.sugPanelInstance=null)!==(e=null===(t=this.sanInstance)||void 0===t?void 0:t.dispose)&&void 0!==e&&e.call(t),this.rootDom.innerHTML="",this.eventBinder.clear()},i.prototype.initSugInstace=function(){return(0,w.__awaiter)(this,void 0,void 0,function(){var e,n;return(0,w.__generator)(this,function(t){switch(t.label){case 0:return e={bds:window.bds,maxNum:10,withoutRich:window.bds.comm.supportis,withoutZhixin:!0,form:document.querySelector("#form"),ipt:this.inputEl,newIpt:this.inputEl,newWrapper:this.panelEl,aiWrapper:this.panelEl,cbname:"bdsugresultcb",sugClickCallback:this.sugClick.bind(this),sugFeedbackClick:this.sugFeedbackClick.bind(this),hideSugCallback:this.hideSug.bind(this),useFeedback:!window.bds.comm.ishome,showSugCallback:this.showSug.bind(this),submission:window.form_submit},this.sugPanelInstance&&(this.sugPanelInstance.destroy(),this.sugPanelInstance=null),[4,Promise.resolve().then(function(){return(0,w.__importStar)(x(266))})];case 1:return n=t.sent(),n=n["default"]||n,n=new n(e),this.sugPanelInstance=n,this.renderPanelDivider(),[2]}})})},i.prototype.renderPanelDivider=function(){var t,e;this.panelEl.querySelector(".chat-input-panel-divider")||((t=document.createElement("div")).className="chat-input-panel-divider",(e=null===(e=this.panelEl)||void 0===e?void 0:e.firstChild)?this.panelEl.insertBefore(t,e):null!==(e=this.panelEl)&&void 0!==e&&e.appendChild(t))},i.prototype.bindChatTool=function(){var l=this,t=this.rootDom.querySelector(".chat-input-tool");this.eventBinder.add(this.inputContainEl,"mousedown",function(t){document.activeElement===l.inputEl&&(t.preventDefault(),t.stopPropagation())},E.ListenrEventType.TOOLS),this.eventBinder.add(this.inputContainEl,"click",function(t){null!=t&&t.stopPropagation(),l.nextTick(function(){(0,y.focusInputLast)(l.inputEl)}),l.eventEmitter.emit("click",l.getValue())},E.ListenrEventType.TOOLS),this.eventBinder.add(t,"mousedown",function(t){l.inputEl&&document.activeElement===l.inputEl&&(t.preventDefault(),t.stopPropagation())},E.ListenrEventType.TOOLS),this.eventBinder.add(t,"click",function(t){l.inputEl&&document.activeElement===l.inputEl&&(t.preventDefault(),t.stopPropagation(),l.eventEmitter.emit("click",l.getValue()))},E.ListenrEventType.TOOLS),this.eventBinder.add(this.panelEl,"mousedown",function(t){t.preventDefault()},E.ListenrEventType.PANEL);var u=null;this.eventBinder.add(this.panelEl,"wheel",function(t){for(var e,n,i,a,o,r,s=t.target;s&&s!==l.panelEl;){if(50<=s.scrollHeight-s.clientHeight)break;s=s.parentElement}!s||s.scrollHeight<=s.clientHeight||(e=s.scrollTop,n=s.scrollHeight,r=s.clientHeight,i=0<(o=t.deltaY),a=o<0,o=0===e,r=n<=e+r,u&&clearTimeout(u),u=setTimeout(function(){l.eventEmitter.emit("panel-scroll"),u=null},100),(o&&a||r&&i)&&(t.preventDefault(),t.stopPropagation()))},E.ListenrEventType.PANEL,{passive:!1})},i.prototype.bindFocus=function(){var e=this;this.inputEl&&this.eventBinder.add(this.inputEl,"focus",function(){var t;1===e.initialRow&&(e.oneLineTextarea&&e.mode!==E.ChatInputMode.AI||null!==(t=e.inputMainDom)&&void 0!==t&&t.classList.remove("one-line-input")),e.mode===E.ChatInputMode.NORMAL?null!==(t=e.inputMainDom)&&void 0!==t&&t.classList.add("chat-input-main-focus"):e.nextTick(function(){e.resetFocusClass("focus"),(0,y.focusInputLast)(e.inputEl),e.eventEmitter.emit("focus")})},E.ListenrEventType.INPUT)},i.prototype.bindBlur=function(){var n=this;this.inputEl&&this.eventBinder.add(this.inputEl,"blur",function(){var t,e;1!==n.initialRow||null!==(t=n.inputMainDom)&&void 0!==t&&t.classList.contains("one-line-input")||null!==(e=n.inputMainDom)&&void 0!==e&&e.classList.add("one-line-input"),n.mode===E.ChatInputMode.NORMAL?(null!==(e=n.sugPanelInstance)&&void 0!==e&&e.hide(),n.inputEl.scrollTop=0,null!==(e=n.panelEl)&&void 0!==e&&e.classList.remove("chat-input-max-height"),null!==(e=n.inputMainDom)&&void 0!==e&&e.classList.remove("chat-input-main-focus")):(n.inputEl.scrollTop=0,n.nextTick(function(){n.resetFocusClass("blur"),n.eventEmitter.emit("blur")}))},E.ListenrEventType.INPUT)},i.prototype.resetFocusClass=function(t){var e,n=this;"focus"===t?(this.blurTimer?(clearTimeout(this.blurTimer),this.blurTimer=null):null!==(e=this.inputMainDom)&&void 0!==e&&e.classList.add("chat-input-main-focus"),null!==(e=this.panelEl)&&void 0!==e&&e.classList.remove("panel-shrink"),window.requestAnimationFrame(function(){var t;null!==(t=n.panelEl)&&void 0!==t&&t.classList.add("panel-expand"),n.eventEmitter.emit("sug-panel-show"),n.panelEl.style.maxHeight=n.mode===E.ChatInputMode.NORMAL?"600px":n.panelMaxHeight+"px"})):(null!==(e=this.panelEl)&&void 0!==e&&e.classList.remove("panel-expand"),null!==(e=this.panelEl)&&void 0!==e&&e.classList.add("panel-shrink"),this.panelEl.style.maxHeight="0px",this.blurTimer&&(clearTimeout(this.blurTimer),this.blurTimer=null),this.blurTimer=setTimeout(function(){var t;null!==(t=n.inputMainDom)&&void 0!==t&&t.classList.remove("chat-input-main-focus"),clearTimeout(n.blurTimer),n.blurTimer=null},160))},i.prototype.recalculateInputHeight=function(){this.oneLineTextarea||(this.inputEl.style.height="auto",this.inputEl.style.height=this.inputEl.scrollHeight+"px")},i.prototype.addPrefixHolder=function(){var n=this,t=(0,r.getUserAgentInfo)().isSafari?"&nbsp;":"&#xFEFF;";this.prefixEl&&(this.prefixEmptyDom?this.prefixEmptyDom.innerHTML=t:(this.prefixEmptyDom=document.createElement("span"),this.prefixEmptyDom.innerHTML=t,null!==(t=this.prefixEl)&&void 0!==t&&t.insertAdjacentElement("afterend",this.prefixEmptyDom)),requestAnimationFrame(function(){var t=document.createRange(),e=window.getSelection();null!=t&&t.setStartAfter(n.prefixEl),null!=t&&t.setEndAfter(n.prefixEl),null!=e&&e.removeAllRanges(),null!=e&&e.addRange(t)}))},i.prototype.addAgentHolder=function(){var n=this,t=(0,r.getUserAgentInfo)().isSafari?"&nbsp;":"&#xFEFF;";this.agentEl&&(this.agentEmptyDom?this.agentEmptyDom.innerHTML=t:(this.agentEmptyDom=document.createElement("span"),this.agentEmptyDom.innerHTML=t,null!==(t=this.agentEl)&&void 0!==t&&t.insertAdjacentElement("afterend",this.agentEmptyDom)),requestAnimationFrame(function(){var t=document.createRange(),e=window.getSelection();null!=t&&t.setStartAfter(n.agentEl),null!=t&&t.setEndAfter(n.agentEl),null!=e&&e.removeAllRanges(),null!=e&&e.addRange(t)}))},i.prototype.bindInput=function(){var e=this;this.inputEl&&(this.mode===E.ChatInputMode.AI?this.nextTick(function(){return(0,w.__awaiter)(e,void 0,void 0,function(){return(0,w.__generator)(this,function(t){return(0,y.focusInputLast)(this.inputEl),this.observer=new MutationObserver(this.aiInputChangeHandler.bind(this)),this.observer.observe(this.inputEl,{childList:!0,subtree:!0,characterData:!0}),[2]})})}):this.eventBinder.add(this.inputEl,"input",function(){e.recalculateInputHeight();var t=e.getValue();e.checkClearIcon(),e.eventEmitter.emit("input",t)},E.ListenrEventType.INPUT))},i.prototype.aiInputChangeHandler=function(){var a,o;return(0,w.__awaiter)(this,void 0,void 0,function(){var e,n,i;return(0,w.__generator)(this,function(t){return this.inputEl?(i=this.inputEl.querySelector(".ai-input-prefix-wrapper"),n=null===(a=this.inputContainEl)||void 0===a?void 0:a.querySelector("#ai-input-file-tag"),this.isChatSearch||i||n||this.getCurrentPanelName()?(e=this.inputEl.querySelector(".ai-input-editor-content"),n=(null===(a=e)||void 0===a?void 0:a.innerText)||"",this.eventEmitter.emit("input",this.getValue()),this.checkClearIcon(),this.getValue()?((0,y.handleInputFieldChange)(e),this.resetPlaceholder()):(null!==(a=null===(a=this.inputEl)||void 0===a?void 0:a.querySelectorAll("br"))&&void 0!==a&&a.forEach(function(t){return t.remove()}),this.showPlaceHolder()),this.recalculateInputHeight(),i&&!this.aiInputStatus.isBreakRow&&("\n"===n||0===n.length)||this.isChatSearch&&""===this.getValue()||(e=(0,r.getUserAgentInfo)(),n=this.aiInputStatus.isComposing,i&&!i.nextSibling&&(n&&(0,y.focusInputLast)(this.inputEl),null!==(o=this.prefixEmptyDom)&&void 0!==o&&o.remove(),this.prefixEmptyDom=null,e.isSafari&&this.addPrefixHolder()),(i=this.inputEl.querySelector(".cs-pc-input-agent"))&&!i.nextSibling&&(n&&(0,y.focusInputLast)(this.inputEl),null!==(o=this.agentEmptyDom)&&void 0!==o&&o.remove(),this.agentEmptyDom=null,e.isSafari&&this.addAgentHolder(),(0,y.focusInputLast)(this.inputEl)),!i&&this.hasAgent&&(this.hasAgent=!1,this.eventEmitter.emit("prefix-agent-click")))):this.closePanel(),[2]):[2]})})},i.prototype.bindSubmit=function(){var e=this,t=this.isChatSearch?this.rootDom.querySelector("#chat-submit-button-ai"):this.rootDom.querySelector("#chat-submit-button");this.eventBinder.add(t,"click",function(t){t.stopPropagation();t=e.getValue();e.eventEmitter.emit("submit",t.slice(0,S.INPUT_MAX_LENGTH),"se_btn"),e.nextTick(function(){e.inputEl.blur()})},E.ListenrEventType.INPUT)},i.prototype.sugClick=function(t){var e=this;this.eventEmitter.emit("submit",t,"sug"),this.nextTick(function(){e.inputEl.blur()})},i.prototype.sugFeedbackClick=function(){var t=this;this.nextTick(function(){t.inputEl.blur()})},i.prototype.hideSug=function(t){void 0===t&&(t=!1),this.panelEl&&this.closeSugPanel(t)},i.prototype.showSug=function(){this.panelEl&&this.openSugPanel()},i.prototype.openSugPanel=function(){var t,e=this;this.panelEl&&(this.oneLineTextarea&&this.mode!==E.ChatInputMode.AI||(null!==(t=this.inputMainDom)&&void 0!==t&&t.classList.remove("one-line-input"),this.eventEmitter.emit("deep-search-show")),this.panelEl.classList.remove("panel-shrink"),window.requestAnimationFrame(function(){var t;e.panelEl&&(e.panelEl.classList.contains("panel-expand")||(e.panelEl.classList.add("panel-expand"),e.eventEmitter.emit("sug-panel-show")),t=e.mode===E.ChatInputMode.NORMAL?"600px":e.panelMaxHeight+"px",e.panelEl.style.maxHeight=t)}))},i.prototype.closeSugPanel=function(t){void 0===t&&(t=!1),this.panelEl&&(t?this.panelEl.style.display="none":(this.panelEl.classList.remove("panel-expand"),this.panelEl.classList.contains("panel-shrink")||this.panelEl.classList.add("panel-shrink"),this.panelEl.style.maxHeight="0px"))},i.prototype.bindKeyUp=function(){var e=this;this.inputEl&&this.eventBinder.add(this.inputEl,"keyup",function(t){e.nextTick(function(){"Shift"!==t.key&&"Meta"!==t.key&&"Control"!==t.key||setTimeout(function(){e.aiInputStatus.isBreakRow=!1},100)})},E.ListenrEventType.INPUT)},i.prototype.bindKeyDown=function(){var h,g=this;this.inputEl&&(h=this.inputEl,this.eventBinder.add(h,"keydown",function(t){var e=window.getSelection();if(e){var n;if(g.mode===E.ChatInputMode.AI&&(g.aiInputStatus.isUserInput=!0),g.mode===E.ChatInputMode.AI&&(t.ctrlKey||t.metaKey)&&"a"===t.key.toLowerCase()){var i,a,o,r,s=null===(a=g.inputEl)||void 0===a?void 0:a.querySelector("#ai-input-file-tag");document.activeElement===h&&(g.prefixEl||s)&&(t.preventDefault(),i=(o=h.querySelector("#ai-input-file-tag"))?o.nextSibling:null===(r=g.inputEl.firstChild)||void 0===r?void 0:r.nextSibling,a=s?0:1,r=((o=g.inputEl.lastChild).nodeType===Node.TEXT_NODE?o.nodeValue:o.childNodes).length,(s=document.createRange()).setStart(i,a),s.setEnd(o,r),e.removeAllRanges(),e.addRange(s))}else if("Enter"===t.key)g.aiInputStatus.isCustomInput||g.aiInputStatus.isComposing||!(g.aiInputStatus.isBreakRow||t.shiftKey||t.metaKey||t.ctrlKey)?g.aiInputStatus.isComposing||!g.aiInputStatus.isCustomInput&&g.aiInputStatus.isBreakRow||(t.preventDefault(),l=g.getValue(),g.eventEmitter.emit("submit",l,"enter"),g.nextTick(function(){g.inputEl.blur()})):g.mode===E.ChatInputMode.NORMAL?(c=g.inputEl,t.preventDefault(),u=c.selectionStart,e=c.selectionEnd,l=c.value,c.value=l.substring(0,u)+"\n"+l.substring(e),c.selectionStart=c.selectionEnd=u+1,g.recalculateInputHeight(),c.selectionStart===c.value.length&&(c.scrollTop=c.scrollHeight)):(n=h.scrollHeight,setTimeout(function(){h.scrollHeight<=n&&(0,y.insertAtRange)(document.createElement("br"))},50));else if(g.mode===E.ChatInputMode.AI&&"Shift"===t.key||"Meta"===t.key||"Control"===t.key)g.aiInputStatus.isBreakRow=!0;else if(g.mode===E.ChatInputMode.AI&&"Backspace"===t.key){if(""===g.getValue()){t.preventDefault();var l=Array.from(g.inputEl.childNodes),u=l.find(function(t){return t instanceof HTMLElement&&t.classList.contains("ai-input-prefix-wrapper")}),c=l.find(function(t){return t instanceof HTMLElement&&"ai-input-file-tag"===t.id});if(c&&u)return c.remove(),void g.eventEmitter.emit("prefix-file-back-delete");if(g.isChatSearch){var p=l.find(function(t){return t instanceof HTMLElement&&t.classList.contains("cs-pc-input-agent")});if(p)return p.remove(),g.hasAgent=!1,g.setMode(E.ChatInputMode.AI),g.setPlaceHolder(g.aiPlaceholder),void g.eventEmitter.emit("prefix-agent-click")}g.closePanel()}else{var d=window.getSelection();if(!d||!d.anchorNode)return}(g.aiInputStatus.isBreakRow=!1,y.handleInputFieldBackspace)(t)}else["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"].includes(t.key)?g.getMode()===E.ChatInputMode.AI&&""===g.getValue()?(t.preventDefault(),t.stopPropagation()):"ArrowLeft"!==t.key&&"ArrowUp"!==t.key||(p=window.getSelection())&&p.isCollapsed&&g.prefixEl&&(p=(d=p.getRangeAt(0)).startContainer,d=d.startOffset,g.prefixEl.nextSibling===p&&0===d&&t.preventDefault()):" "===t.key||"Space"===t.code?g.getValue()||g.mode!==E.ChatInputMode.AI||t.preventDefault():g.aiInputStatus.isBreakRow=!1}},E.ListenrEventType.INPUT))},i);function i(t){this.sanInstance=null,this.sugPanelInstance=null,this.blurTimer=null,this.temporaryContent="",this.mode=E.ChatInputMode.NORMAL,this.nextTicksCallbackList=[],this.pending=!1,this.hasAgent=!1,this.observer=null,this.curFileStatus="",this.inputEl=null,this.clearEl=null,this.panelEl=null,this.inputMainDom=null,this.wrapperEl=null,this.inputContainEl=null,this.prefixEl=null,this.agentEl=null,this.currentPanelName="",this.savedNormalInputDom="",this.prefixEmptyDom=null,this.agentEmptyDom=null,this.initPanelInputDom="",this.eventBinder=new u.DomEventBinder,this.eventEmitter=new u.TypedEventEmitter,this.on=this.eventEmitter.on.bind(this.eventEmitter),this.off=this.eventEmitter.off.bind(this.eventEmitter),this.aiPrefixContent="",this.aiInputStatus={isComposing:!1,isBreakRow:!1,isCustomInput:!1,isUserInput:!1};var e=t.rootDom,n=t.isSsr,i=t.initialRow,a=void 0===i?2:i,o=t.panelMaxHeight,r=t.aiPlaceholder,s=t.isChatSearch,l=void 0!==s&&s,i=t.maxLength,s=void 0===i?2e3:i,i=t.oneLineTextarea,i=void 0!==i&&i;if(!e)throw new Error("A valid DOM element is required！");this.rootDom=e,this.initialRow=a,this.panelMaxHeight=o,this.aiPlaceholder=r,this.isChatSearch=l,this.oneLineTextarea=i,this.maxLength=s,n||l?this.init():this.render(),this.bindAllEvent(),this.isChatSearch&&(this.setMode(E.ChatInputMode.AI),this.setPlaceHolder(this.aiPlaceholder)),this.attached(t)}e["default"]=n},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.INPUT_ANIME_LS_KEY=e.OPENING_ANIMATION_DURATION=e.INPUT_MAX_LENGTH=void 0,e.INPUT_MAX_LENGTH=1e3,e.OPENING_ANIMATION_DURATION=5e3,e.INPUT_ANIME_LS_KEY="INPUT_BORDER_ANIME_LAST_SHOWN_DATE"},function(t,e,n){"use strict";var i;Object.defineProperty(e,"__esModule",{value:!0}),e.ListenrEventType=e.ChatPanel=e.ChatInputMode=void 0,(i=e.ChatInputMode||(e.ChatInputMode={})).AI="ai",i.NORMAL="normal",(i=e.ChatPanel||(e.ChatPanel={})).CREATE="office_create",i.PHOTO="photo_editing",i.READ="ai_read",i.CODE="ai_code",(e=e.ListenrEventType||(e.ListenrEventType={})).INPUT="input",e.SUG="sug",e.TOOLS="tools",e.OTHER="other",e.PANEL="panel"},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TypedEventEmitter=e.DomEventBinder=void 0;var i=(a.prototype.add=function(t,e,n,i,a){t&&n&&(t.addEventListener(e,n,a),this.bindings.push({el:t,type:e,handler:n,options:a,eventType:i}))},a.prototype.clear=function(o){o||(this.bindings.forEach(function(t){var e=t.el,n=t.type,i=t.handler,t=t.options;i&&e.removeEventListener(n,i,t)}),this.bindings=[]),this.bindings.forEach(function(t){var e=t.el,n=t.type,i=t.handler,a=t.options;t.eventType===o&&i&&e.removeEventListener(n,i,a)})},a);function a(){this.bindings=[]}e.DomEventBinder=i;o.prototype.on=function(t,e){var n;null!==(n=this.listeners)&&void 0!==n&&n[t]||(this.listeners[t]=[]),this.listeners[t].push(e)},o.prototype.emit=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];null!==(t=this.listeners[t])&&void 0!==t&&t.forEach(function(t){t.apply(null,e)})},o.prototype.off=function(t){this.listeners[t]&&delete this.listeners[t]},i=o;function o(){this.listeners={}}e.TypedEventEmitter=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getFileDesc=e.getImageUrl=e.getFileIcon=e.formatBytes=e.IconMaps=void 0;var i="https://psstatic.cdn.bcebos.com/basics/",a={PDF:i+"aichat/pdf-wise_1744600722000.png",Word:i+"aichat/word-wise_1744600783000.png",PPT:i+"aichat/ppt-wise_1744600745000.png",TXT:i+"aichat/txt-wise_1744600762000.png",Excel:i+"aichat/excel-wise_1744600701000.png",Code:i+"aichat/code_1753701401000.png",unknown:""};e.IconMaps={deleteIcon:"https://gips2.baidu.com/it/u=3457981003,2090099587&fm=3028&app=3028&f=PNG&fmt=auto&q=100&size=f45_45",uploadIcon:"https://gips3.baidu.com/it/u=4026099389,3432486988&fm=3028&app=3028&f=PNG&fmt=auto&q=100&size=f108_108",loadingIcon:"https://gips0.baidu.com/it/u=1698361030,3674932214&fm=3028&app=3028&f=PNG&fmt=auto&q=100&size=f48_48",imgLoadingIcon:"https://gips3.baidu.com/it/u=140255751,3013049321&fm=3028&app=3028&f=PNG&fmt=auto&q=100&size=f180_180",reuploadIcon:"https://gips0.baidu.com/it/u=3781075682,3319294780&fm=3028&app=3028&f=PNG&fmt=auto&q=100&size=f108_108",reuploadImgIcon:"https://gips3.baidu.com/it/u=3971192352,3667158809&fm=3028&app=3028&f=PNG&fmt=auto&q=100&size=f180_180"},e.formatBytes=function(t){if("number"!=typeof t||isNaN(t)||t<0)return"0B";for(var e=["B","KB","MB","GB","TB","PB"],n=0;1024<=t&&n<e.length-1;)t/=1024,n++;return""+Math.round(100*t)/100+e[n]},e.getFileIcon=function(t){return 0===t.status?e.IconMaps.uploadIcon:1===t.status?a[t.fileType]:(t.status,e.IconMaps.reuploadIcon)},e.getImageUrl=function(t){return 1===t.status?t.url:2===t.status?e.IconMaps.reuploadImgIcon:e.IconMaps.imgLoadingIcon},e.getFileDesc=function(t){return 0===t.status?"上传中 "+Math.round(1e4*t.progress)/100+"%":2===t.status?"点击图标重新上传":""}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});n=(0,n(1).__importDefault)(n(242));e["default"]=n["default"]},function(t,e,n){var i=n(2),a=[n(243)],o=n(67),r=n(68)["default"];t.exports=n(68),t.exports["default"]=i(r,o,a)},function(t,e,n){var i=n(244);(i="string"==typeof i?[[t.i,i,""]]:i).locals&&(t.exports=i.locals);(0,n(4)["default"])("d9353962",i,!0,{attributes:{"data-for":"result"},runAsProduction:!0})},function(t,e,n){(e=n(3)(!1)).push([t.i,".input-panel-create {\n  width: 100%;\n  height: 100%;\n  display: flex;\n  flex-direction: column;\n  max-height: inherit;\n  position: relative;\n}\n.input-panel-create:after {\n  content: '';\n  position: absolute;\n  bottom: 0;\n  width: 100%;\n  height: 38px;\n  background: linear-gradient(to bottom, rgba(255, 255, 255, 0) 0%, #ffffff 100%);\n  pointer-events: none;\n}\n.input-panel-create .input-panel-create-tab {\n  width: 100%;\n  margin-top: 15px;\n  margin-bottom: 6px;\n  gap: 12px;\n  flex: 0 0 auto;\n  padding: 0 9px;\n  box-sizing: border-box;\n  display: flex;\n}\n.input-panel-create .input-panel-create-tab .input-panel-create-tab-item {\n  position: relative;\n  cursor: pointer;\n  padding: 6px 9px;\n  font-size: 14px;\n  line-height: 13px;\n  font-weight: 400;\n}\n.input-panel-create .input-panel-create-tab .input-panel-create-tab-item:hover {\n  color: #4E6EF2;\n}\n.input-panel-create .input-panel-create-tab .input-panel-create-tab-item-selected {\n  font-weight: 500;\n  color: #4E6EF2;\n}\n.input-panel-create .input-panel-create-tab .input-panel-create-tab-item-selected:after {\n  content: '';\n  position: absolute;\n  bottom: -1px;\n  left: 50%;\n  transform: translateX(-50%);\n  width: 14px;\n  height: 1px;\n  background: #4E6EF2;\n}\n.input-panel-create .input-panel-create-content {\n  flex: 1;\n  overflow-y: scroll;\n  overflow-x: hidden;\n  padding: 9px 18px 0 18px;\n}\n.input-panel-create .input-panel-create-content::-webkit-scrollbar {\n  width: 4px;\n}\n.input-panel-create .input-panel-create-content:hover::-webkit-scrollbar-thumb {\n  background-color: rgba(102, 51, 255, 0.1);\n  border-radius: 4px;\n}\n.input-panel-create .input-panel-create-content::-webkit-scrollbar-track {\n  box-shadow: none;\n  background-color: initial;\n}\n.input-panel-create .input-panel-create-content .input-panel-create-content-list {\n  display: flex;\n  flex-direction: row;\n  justify-content: flex-start;\n  gap: 9px;\n}\n.input-panel-create .input-panel-create-content .input-panel-create-content-list:last-child {\n  margin-bottom: 18px;\n}\n.input-panel-create .input-panel-create-content .input-panel-create-content-list:nth-child(n + 2) {\n  margin-top: 9px;\n}\n",""]),t.exports=e},function(t,e,n){var i=n(2),a=[n(246)],o=n(69),r=n(70)["default"];t.exports=n(70),t.exports["default"]=i(r,o,a)},function(t,e,n){var i=n(247);(i="string"==typeof i?[[t.i,i,""]]:i).locals&&(t.exports=i.locals);(0,n(4)["default"])("7b109575",i,!0,{attributes:{"data-for":"result"},runAsProduction:!0})},function(t,e,n){(e=n(3)(!1)).push([t.i,".input-panel-create-item {\n  border: 0.5px solid #DBDCE0;\n  border-radius: 18px;\n  padding: 15px 12px;\n  color: #333;\n  box-sizing: border-box;\n  display: flex;\n  align-items: center;\n  max-width: calc(25% - 6px);\n  cursor: pointer;\n  flex: 1;\n}\n.input-panel-create-item .input-panel-create-item-img {\n  width: 36px;\n  height: 36px;\n  border-radius: 9px;\n  flex-shrink: 0;\n  border: 0.5px solid transparent;\n}\n.input-panel-create-item .input-panel-create-item-text {\n  margin-left: 9px;\n  flex: 1;\n  overflow: hidden;\n}\n.input-panel-create-item .input-panel-create-item-text .input-panel-create-item-title {\n  font-weight: 500;\n  font-size: 14px;\n  line-height: 18px;\n}\n.input-panel-create-item .input-panel-create-item-text .input-panel-create-item-desc {\n  font-size: 13px;\n  line-height: 18px;\n  color: #9195a3;\n  margin-top: 4.5px;\n  display: block;\n  overflow: hidden;\n  text-overflow: ellipsis;\n  white-space: nowrap;\n  -webkit-line-clamp: 1;\n}\n.input-panel-create-item .input-panel-create-item-text .input-panel-create-item-desc .input-panel-create-item-logo {\n  position: relative;\n  top: 2px;\n  width: 14px;\n  height: 14px;\n}\n.input-panel-create-item:hover {\n  background: rgba(78, 110, 242, 0.03);\n}\n.input-panel-create-item:hover .input-panel-create-item-img {\n  border: 0.5px solid rgba(0, 0, 0, 0.1);\n}\n",""]),t.exports=e},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});n=(0,n(1).__importDefault)(n(249));e["default"]=n["default"]},function(t,e,n){var i=n(2),a=[n(250)],o=n(72),r=n(73)["default"];t.exports=n(73),t.exports["default"]=i(r,o,a)},function(t,e,n){var i=n(251);(i="string"==typeof i?[[t.i,i,""]]:i).locals&&(t.exports=i.locals);(0,n(4)["default"])("727d95e2",i,!0,{attributes:{"data-for":"result"},runAsProduction:!0})},function(t,e,n){(e=n(3)(!1)).push([t.i,".input-panel-draw {\n  width: 100%;\n  height: calc(540px - 21px);\n  max-height: inherit;\n  display: flex;\n  flex-direction: column;\n  box-sizing: border-box;\n}\n.input-panel-draw:after {\n  content: '';\n  position: absolute;\n  border-bottom-right-radius: 19px;\n  border-bottom-left-radius: 19px;\n  bottom: 0;\n  width: 100%;\n  height: 38px;\n  background: linear-gradient(to bottom, rgba(255, 255, 255, 0) 0%, #ffffff 100%);\n  pointer-events: none;\n}\n.input-panel-draw .input-panel-draw-tools {\n  width: 100%;\n  margin-top: 15px;\n  overflow-x: hidden;\n  display: flex;\n  gap: 9px;\n  padding: 0 18px;\n  box-sizing: border-box;\n  font-weight: 500;\n  justify-content: space-between;\n}\n.input-panel-draw .input-panel-draw-tools .input-panel-draw-tools-list-item {\n  flex-shrink: 0;\n  font-size: 14px;\n  line-height: 14px;\n  font-weight: 400;\n  height: 36px;\n  flex: 1;\n  border-radius: 12px;\n  background: linear-gradient(104.43deg, rgba(237, 242, 255, 0.6) 26.24%, rgba(238, 235, 255, 0.6) 80.64%);\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  gap: 9px;\n  cursor: pointer;\n}\n.input-panel-draw .input-panel-draw-tools .input-panel-draw-tools-list-item .input-panel-draw-tools-list-item-icon {\n  width: 16px;\n  height: 16px;\n  flex-shrink: 0;\n}\n.input-panel-draw .input-panel-draw-tools .input-panel-draw-tools-list-item:hover {\n  color: #4E6EF2;\n  background: #eff2fe;\n}\n.input-panel-draw .input-panel-draw-tools .input-panel-draw-tools-list-item:hover img {\n  filter: brightness(0) saturate(100%) invert(35%) sepia(77%) saturate(2345%) hue-rotate(218deg) brightness(103%) contrast(99%);\n}\n.input-panel-draw .input-panel-draw-content {\n  box-sizing: border-box;\n  position: relative;\n  width: 100%;\n  margin-top: 15px;\n  padding: 0 18px;\n  overflow-y: scroll;\n  flex: 1;\n}\n.input-panel-draw .input-panel-draw-content::-webkit-scrollbar {\n  width: 4px;\n}\n.input-panel-draw .input-panel-draw-content:hover::-webkit-scrollbar-thumb {\n  background-color: rgba(78, 110, 242, 0.1);\n  border-radius: 4px;\n}\n.input-panel-draw .input-panel-draw-content::-webkit-scrollbar-track {\n  box-shadow: none;\n  background-color: initial;\n}\n.input-panel-draw .input-panel-draw-content .input-panel-draw-content-list-item {\n  display: flex;\n  flex-direction: row;\n  gap: 3px;\n}\n.input-panel-draw .input-panel-draw-content .input-panel-draw-content-list-item:nth-child(n + 2) {\n  margin-top: 2px;\n}\n.input-panel-draw .input-panel-draw-content .input-panel-draw-content-list-item-btn {\n  flex: 1;\n}\n.input-panel-draw .input-panel-draw-content .input-panel-draw-content-list-item:first-child .input-panel-draw-content-list-item-btn:first-child {\n  border-top-left-radius: 9px;\n}\n.input-panel-draw .input-panel-draw-content .input-panel-draw-content-list-item:first-child .input-panel-draw-content-list-item-btn:last-child {\n  border-top-right-radius: 9px;\n}\n.input-panel-draw .input-panel-draw-content .input-panel-draw-content-list-item:last-child {\n  margin-bottom: 18px;\n}\n.input-panel-draw .input-panel-draw-content .input-panel-draw-content-list-item:last-child .input-panel-draw-content-list-item-btn:first-child {\n  border-bottom-left-radius: 9px;\n}\n.input-panel-draw .input-panel-draw-content .input-panel-draw-content-list-item:last-child .input-panel-draw-content-list-item-btn:last-child {\n  border-bottom-right-radius: 9px;\n}\n",""]),t.exports=e},function(t,e,n){var i=n(2),a=[n(253)],o=n(74),r=n(75)["default"];t.exports=n(75),t.exports["default"]=i(r,o,a)},function(t,e,n){var i=n(254);(i="string"==typeof i?[[t.i,i,""]]:i).locals&&(t.exports=i.locals);(0,n(4)["default"])("1511dbb5",i,!0,{attributes:{"data-for":"result"},runAsProduction:!0})},function(t,e,n){(e=n(3)(!1)).push([t.i,".input-panel-draw-item {\n  aspect-ratio: 1 / 1;\n  position: relative;\n  overflow: hidden;\n  cursor: pointer;\n}\n.input-panel-draw-item .input-panel-draw-item-img {\n  width: 100%;\n  height: 100%;\n  position: relative;\n}\n.input-panel-draw-item .input-panel-draw-item-text {\n  box-sizing: border-box;\n  position: absolute;\n  border-radius: 3px;\n  top: 12px;\n  left: 12px;\n  background: #FFFFFFB2;\n  backdrop-filter: blur(24px);\n  padding: 0 3px;\n  height: 16px;\n  color: #333333;\n  font-weight: 500;\n  font-size: 12px;\n  line-height: 16px;\n}\n.input-panel-draw-item .input-panel-draw-item-btn {\n  position: absolute;\n  font-size: 14px;\n  bottom: 12px;\n  transition: opacity 240ms ease-in-out;\n  left: 50%;\n  transform: translateX(-50%);\n  width: 100px;\n  height: 30px;\n  z-index: 10;\n  border-radius: 15px;\n  background: #FFFFFFE5;\n  box-shadow: 0px 4px 16px 0px #00000014;\n  display: flex;\n  justify-content: center;\n  align-items: center;\n  opacity: 0;\n  backdrop-filter: blur(30px);\n}\n.input-panel-draw-item .input-panel-draw-item-btn:hover {\n  color: #4E6EF2;\n  backdrop-filter: blur(30px);\n}\n.input-panel-draw-item:hover .input-panel-draw-item-btn {\n  opacity: 1;\n}\n",""]),t.exports=e},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});n=(0,n(1).__importDefault)(n(256));e["default"]=n["default"]},function(t,e,n){var i=n(2),a=[n(257)],o=n(76),r=n(77)["default"];t.exports=n(77),t.exports["default"]=i(r,o,a)},function(t,e,n){var i=n(258);(i="string"==typeof i?[[t.i,i,""]]:i).locals&&(t.exports=i.locals);(0,n(4)["default"])("65843262",i,!0,{attributes:{"data-for":"result"},runAsProduction:!0})},function(t,e,n){(e=n(3)(!1)).push([t.i,".input-panel-read {\n  width: 100%;\n}\n.input-panel-read .input-panel-read-content {\n  margin-top: 20px;\n  margin-bottom: 18px;\n  display: flex;\n  padding: 0 18px;\n  gap: 15px;\n}\n.input-panel-read .input-panel-read-content .input-panel-read-content-btn {\n  flex: 1;\n  width: 245px;\n  height: 150px;\n  border-radius: 15px;\n  padding: 18px;\n  display: flex;\n  flex-direction: column;\n  justify-content: flex-start;\n  align-items: center;\n  box-sizing: border-box;\n  cursor: pointer;\n  position: relative;\n  overflow: hidden;\n  border: 0.5px solid #dbdce0;\n}\n.input-panel-read .input-panel-read-content .input-panel-read-content-btn:hover {\n  background: rgba(78, 110, 242, 0.03);\n  color: #4E6EF2;\n}\n.input-panel-read .input-panel-read-content .input-panel-read-content-btn:hover .input-panel-read-content-btn-img {\n  border: 0.5px solid rgba(0, 0, 0, 0.1);\n}\n.input-panel-read .input-panel-read-content .input-panel-read-content-btn .input-panel-read-content-btn-img {\n  width: 40px;\n  height: 40px;\n  border-radius: 9px;\n  border: 0.5px solid transparent;\n}\n.input-panel-read .input-panel-read-content .input-panel-read-content-btn .input-panel-read-content-btn-name {\n  font-size: 14px;\n  line-height: 14px;\n  font-weight: 500;\n  text-align: center;\n  margin-top: 18px;\n}\n.input-panel-read .input-panel-read-content .input-panel-read-content-btn .input-panel-read-content-btn-desc {\n  font-size: 12px;\n  line-height: 12px;\n  font-weight: 400;\n  text-align: center;\n  color: #b7b9c1;\n  margin-top: 9px;\n}\n.input-panel-read .input-panel-read-content .input-panel-read-content-btn .input-panel-read-content-btn-limit {\n  font-size: 12px;\n  line-height: 12px;\n  font-weight: 400;\n  text-align: center;\n  color: #b7b9c1;\n  margin-top: 9px;\n}\n",""]),t.exports=e},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});n=(0,n(1).__importDefault)(n(260));e["default"]=n["default"]},function(t,e,n){var i=n(2),a=[n(261)],o=n(78),r=n(79)["default"];t.exports=n(79),t.exports["default"]=i(r,o,a)},function(t,e,n){var i=n(262);(i="string"==typeof i?[[t.i,i,""]]:i).locals&&(t.exports=i.locals);(0,n(4)["default"])("67d40f74",i,!0,{attributes:{"data-for":"result"},runAsProduction:!0})},function(t,e,n){(e=n(3)(!1)).push([t.i,".input-panel-code {\n  margin-top: 10px;\n  margin-bottom: 9px;\n}\n",""]),t.exports=e},function(t,e,n){var i=n(2),a=[n(264)],o=n(80),r=n(81)["default"];t.exports=n(81),t.exports["default"]=i(r,o,a)},function(t,e,n){var i=n(265);(i="string"==typeof i?[[t.i,i,""]]:i).locals&&(t.exports=i.locals);(0,n(4)["default"])("631982de",i,!0,{attributes:{"data-for":"result"},runAsProduction:!0})},function(t,e,n){(e=n(3)(!1)).push([t.i,".input-panel-code-item {\n  display: flex;\n  align-items: center;\n  height: 36px;\n}\n.input-panel-code-item:hover {\n  background-color: #F5F6FA;\n  color: #4E6EF2;\n  cursor: pointer;\n}\n.input-panel-code-item:hover .input-panel-code-item-icon {\n  filter: brightness(0) saturate(100%) invert(35%) sepia(77%) saturate(2345%) hue-rotate(218deg) brightness(103%) contrast(99%);\n}\n.input-panel-code-item-icon {\n  width: 16px;\n  height: 16px;\n  margin-left: 18px;\n}\n.input-panel-code-item-text {\n  font-size: 14px;\n  margin-left: 6px;\n}\n",""]),t.exports=e},function(t,e,n){var n=[e,n(267)],n=function(t,a){"use strict";var e;function o(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=void 0,a=(e=a)&&e.__esModule?e:{"default":e};var n=function(){function e(t){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),this.sug=(0,a["default"])()(t)}var t,n,i;return t=e,(n=[{key:"show",value:function(){this.sug.show()}},{key:"hide",value:function(){this.sug.hide()}},{key:"destroy",value:function(){this.sug.destroy(),this.sug=null}}])&&o(t.prototype,n),i&&o(t,i),e}();t["default"]=n}.apply(e,n);n===undefined||(t.exports=n)},function(module,exports,__webpack_require__){var __WEBPACK_AMD_DEFINE_ARRAY__,__WEBPACK_AMD_DEFINE_RESULT__,__WEBPACK_AMD_DEFINE_ARRAY__=[exports,__webpack_require__(268),__webpack_require__(269),__webpack_require__(270),__webpack_require__(271)],__WEBPACK_AMD_DEFINE_RESULT__=function(_exports,_util,_ubcLog,_ImeTrack,_quickDelete){"use strict";function initSug(){"undefined"!=typeof window&&(window.sendUbcLog=_ubcLog.sendUbcLog,window.imgSugSend=_ubcLog.imgSugSend,window.sugHisClickSend=_ubcLog.sugHisClickSend,window.sugHisShowSend=_ubcLog.sugHisShowSend,window.aiGuideShowSend=_ubcLog.aiGuideShowSend,window.sendIptLog=_ubcLog.sendIptLog,window.getQueryString=_ubcLog.getQueryString,window.checkHsugIn=_util.checkHsugIn,window.checkHsugShow=_util.checkHsugShow,window.ImeTrack=_ImeTrack.ImeTrack,window.QuickDelete=_quickDelete.QuickDelete);var bdSug=function bdSug(t){return new SUGOBJ(t).outInterface()},supportInputEvent="oninput"in document.createElement("input")&&!navigator.userAgent.match(/MSIE 9/)&&!navigator.userAgent.match(/chrome\/(28|29|30|31)/i),isPad=null!==(navigator&&navigator.userAgent?navigator.userAgent:"").match(/ipad|android|tablet/i),BDSUG_TIMESTAMP_START=14183424e5,BDSUG_QUERY_LEV=4,NEW_INPUT_DOM_ID="chat-textarea",OLD_INPUT_DOM_ID="form";function getCursorPositionInContentEditable(t){var e=0,n=window.getSelection();return 0<n.rangeCount&&((n=n.getRangeAt(0)).commonAncestorContainer.parentNode===t&&(e=n.startOffset)),e}function SUGOBJ(t){var e=this,t=e.opts=t||{};e.ipt=t.ipt||null,e.reverse=t.reverse||!1,e.form=t.form||null,e.aiWrapper=t.aiWrapper||null,e.submission=t.submission||null,e.maxNum=t.maxNum||10,e.bds=t.bds||null,e.sids=e.bds&&e.bds.comm&&e.bds.comm.sid,1===pageState?e.nodeSample=e.bds&&e.bds.comm&&bds.comm.sampleval||[]:e.nodeSample=e.bds&&e.bds.comm&&bds.comm.nodeSample||[],e.inputDomId=NEW_INPUT_DOM_ID,e.newWrapper=t.newWrapper||null,e.withoutRich=t.withoutRich||!1,e.withoutStat=t.withoutStat||!1,e.withoutZhixin=t.withoutZhixin||!1,e.visible=!1,e.stopRefresh=!1,e.renderCallback=t.renderCallback||function(){},e.selectCallback=t.selectCallback||function(){},e.sugClickCallback=t.sugClickCallback||function(){},e.sugFeedbackClick=t.sugFeedbackClick||function(){},e.hideSugCallback=t.hideSugCallback||function(){},e.showSugCallback=t.showSugCallback||function(){},e.onlyCache=!1,e.requesting=!1,e.shouldSugUpdate=!0,e.storestr=e.storestr||"",e.storearr=e.storearr||[],e.zhixinsug=[],e.zhixintemplate={},e.zhixinused={},e.zhixindata={},e.query=e.ipt&&e.ipt.value,e.inputValue=e.query,e.showValue=e.query,e.sugValue="",e.queryValue="",e.reqValue="",e.value=e.query,e.index=-1,e.sugcontainer,e.dataCached={},e.dataArray=[],e.dataStored=[],e.dataAladdin=[],e.dataDirect=[],e.directSugSelected=!1,e.dataHot=[],e.timer,e.rsv_sug=0,e.rsv_sug1=0,e.rsv_sug3=0,e.rsv_sug4=0,e.rsv_sug7=[0,0,0],e.rsv_sug9=0,e.initTime=0,e.inputT=0,e.rsv_bp=t&&t.comm&&1===t.comm.ishome?0:1,e.jqXhr=null,e.currentSugSample="",e.isSugSample3=!1,e.isSugSample4=!1,e.isSugSample=!1,e.currentSearchStatus=-1,e.ipt&&e.init(),e.pwd="",e.hisSwitch=t.hisSwitch,e.useFeedback=t.useFeedback,e.sugprod=t.prod||"",e.tn=t.tn||"",e.requestDefaultData={},e.showRightContent=!1,e.backFrame=!1,e.prevQuery=e.query,e.backDelete=!1,e.requestQuery=[e.query],e.isAddQuery=!1,e.normalLog="",e.recommendLog="",e.searchHistroyLog="",e.isReturnSearch=!1}function xss(t){return t.toString().replace(/[<%3C]/g,"&lt;").replace(/[>%3E]/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")}return SUGOBJ.prototype={updateInitData:function updateInitData(type){var me=this,opts=me.opts||{};me.setsug=!0,me.setsugstorage=!0,me.sets={},me.sugcookie=navigator.cookieEnabled&&/sug=(\d)/.test(document.cookie)?RegExp.$1:3,me.sugstorecookie=navigator.cookieEnabled&&/sugstore=(\d)/.test(document.cookie)?RegExp.$1:1,me.bds&&me.bds.comm&&me.bds.comm.personalData&&("string"==typeof me.bds.comm.personalData?me.sets=eval("("+me.bds.comm.personalData+")"):me.sets=me.bds.comm.personalData),me.sets.errno&&0===me.sets.errno&&me.sets.sugSet&&me.sets.sugSet.ErrMsg&&"SUCCESS"===me.sets.sugSet.ErrMsg?"0"===me.sets.sugSet.value&&(me.setsug=!1):"0"===me.sugcookie&&(me.setsug=!1),me.sets.errno&&0===me.sets.errno&&me.sets.sugStoreSet&&me.sets.sugStoreSet.ErrMsg&&"SUCCESS"===me.sets.sugStoreSet.ErrMsg?"0"===me.sets.sugStoreSet.value&&(me.setsugstorage=!1):"0"===me.sugstorecookie&&(me.setsugstorage=!1),me.loggedon=me.bds&&(0,_util.bdsStore)()&&!(0,_util.bdsStore)().disabled&&navigator.cookieEnabled,me.showsug=opts.showsug||me.setsug,me.showsugstore=opts.showsugstore||me.showsug&&me.loggedon&&me.setsugstorage,me.query=me.bds.comm.query,me.pinyin=me.bds.comm.pinyin,me.sugHost=me.bds.comm.sugHost||"",me.sid=navigator.cookieEnabled&&/H_PS_PSSID=([0-9_]+)/.test(document.cookie)?RegExp.$1:me.bds.comm.sid;var canWriteStore=!0,isLogin=me.bds&&me.bds.comm&&me.bds.comm.username;(isLogin||me.bds&&me.bds.se&&(0,_util.bdsStore)()&&1==(0,_util.bdsStore)().get("wwwPassLogout"))&&(canWriteStore=!1),me.bds&&me.bds.comm&&me.bds.comm.sampleval&&-1<$.inArray("sample_his",me.bds.comm.sampleval)&&(canWriteStore=!0),("init"!==type||document.referrer)&&canWriteStore&&me.writeStore(),me.writeStore(),(0,_util.bdsStore)().set("wwwPassLogout",0)},check:function(){var t=this;if(t.value!==t.ipt.value&&t.showValue!==t.ipt.value){if(t.inputValue=t.showValue=t.value=t.ipt.value,t.bds&&t.bds.comm&&0===t.bds.comm.ishome&&t.addStat("oq",t.bds.comm.confirmQuery?xss(t.bds.comm.confirmQuery):""),t.bds&&t.bds.comm&&t.bds.comm.confirmQid&&t.addStat("rsv_pq",t.bds.comm.confirmQid),$(t.ipt).trigger("inputChange",[t]),!t.shouldSugUpdate)return void(t.shouldSugUpdate=!0);t.request(t.value)}},startCircle:function(){var t=this;t.timer||($(t.ipt).trigger("start",[t]),t.timer=setTimeout(function e(){t.check(),t.timer=setTimeout(e,200)},200),supportInputEvent&&$(t.ipt).bind("input",function(){t.check()}))},stopCircle:function(){var t=this;t.timer&&(clearTimeout(t.timer),supportInputEvent&&$(t.ipt).unbind("input"),t.timer=null,$(t.ipt).trigger("stop",[t]))},callback:function(t,e){var n=this;if(t&&(t.g||t.z||n.checkStore(t)&&0<n.checkStore(t).length)){if(n.queryValue=t.q,n.dataCached[t.q]=t,n.onlyCache)return;if($(n.ipt).trigger("dataReady",[n]),!n.withoutZhixin){var i=function i(t){n.zhixintemplate[t]&&!n.zhixinused[t]&&(n.zhixinused[t]=$.ajax({crossDomain:!0,url:n.zhixintemplate[t],dataType:"script",scriptCharset:"UTF-8"}))};if(t.zzx)for(var a=0;a<t.zzx.length;a++)t.zzx[a]&&t.zzx[a].type&&(n.zhixinsug.push({value:t.g[a].q,type:t.zzx[a].type,url:t.zzx[a].url}),i(t.zzx[a].type))}n.dataArray=n.packData(t),n.requestDefaultData=t,n.normalLog=n.getNormalSugOrHisLog({total:t.g&&t.g.length}),n.render(n.dataArray),""===t.q&&(n.dataCached[t.q]=null)}else n.hideSug()},sendSugShowLog:function(t){c({rsv_ct:10,rsv_cst:1,rsv_clk_extra:JSON.stringify(t)})},getNormalSugOrHisLog:function(t){var e=""===this.inputValue?"his":"sug";return{total:t.total,pos:"left",type:e}},getRecommendOrHisLog:function(t,e){return{total:t||0,pos:e}},sendBackFrameShowSugLog:function(){c({rsv_ct:10,rsv_cst:11})},buildUrl:function(t,e,n){var i=this,a=i.sid.replace(/_/g,","),o="pc",r="/sugrec?pre=1&p=3&ie=utf-8&json=1&prod="+(o=i.sugprod?i.sugprod:o)+"&from=pc_web"+(a?"&sugsid="+a:""),s=(i.sugHost,""),l=[],u=[];try{var c=(0,_util.bdsStore)().get("BDSUGSTORED"),u=c&&$.parseJSON(c)||[]}catch(g){}for(var p=0;p<u.length;p++){var d=u[p].t?+u[p].t+BDSUG_TIMESTAMP_START:(new Date).getTime(),d={time:d=Math.round(d/1e3),kw:decodeURIComponent(u[p].q),hide:u[p].hide};u[p].s&&u[p].s>BDSUG_QUERY_LEV&&(d.fq=u[p].s-BDSUG_QUERY_LEV+1),(!d.hide||("search_sug_1"===i.currentSugSample||"search_sug_2"===i.currentSugSample||"search_sug_5"===i.currentSugSample||i.isSugSample3&&0===i.currentSearchStatus)&&""!==t)&&(delete d.hide,l.push(d)),10<l.length&&l.shift()}""===t&&(r="/sugrec?",s="&prod=pc_his&from=pc_web&json=1&sid="+i.sid+"&hisdata=",$.stringify&&l.length&&(s+=encodeURIComponent($.stringify(l))),!window.__sam_his_hot||i.bds&&i.bds.comm&&i.bds.comm.username||(s+="&type=4"),s+="&_t="+(new Date).getTime());o=e?"&sugmode="+e:"";i.backDelete&&""!==i.inputValue&&(o="&sugmode=3");a=0;try{a=+(localStorage.getItem("search_request_time")||0)}catch(err){console.error(err)}c="search_sug_3-2"===i.currentSugSample?18e5:72e4;Date.now()-a>c?i.currentSearchStatus=1:i.currentSearchStatus=0,2==+e&&(h="&hot_launch=",1===i.currentSearchStatus?h+=1:h+=0,o+=h),""!==t&&$.stringify&&l.length&&(s+="&his="+encodeURIComponent($.stringify(l))),0<i.sugcookie&&(i.sugcookie=3);var h="",h=""===t?i.isSugSample3?r+"&wd="+encodeURIComponent(i.queryValue)+s:r+s:r+"&wd="+encodeURIComponent(t)+s;return bds.comm.supportis&&(h+="&req=2"),window.bds&&bds.comm&&bds.comm.cur_query&&(h+="&bs="+encodeURIComponent(bds.comm.cur_query)),window.bds&&bds.comm&&bds.comm.cur_disp_query&&(h+="&pbs="+encodeURIComponent(bds.comm.cur_disp_query)),!window._is_sugemptyhot_sam||!bds.comm.ishome||bds.comm.username||t||n?t||n||(h+="&sc=eb"):h+="&sc=hot",i.newIpt?h+="&csor="+getCursorPositionInContentEditable(i.newIpt):h+="&csor="+(0,_ImeTrack.getCursortPosition)(i.ipt),i.pwd&&(h+="&pwd="+encodeURIComponent(i.pwd)),h+=o,i.pwd=t,h},request:function(e,n){var a=this;if(!("search_sug_3-1"===a.currentSugSample||"search_sug_3-2"===a.currentSugSample)||1!==a.currentSearchStatus||!a.backFrame||""!==a.inputValue){e=e&&$.limitWd(e,160),a.directSugSelected=!1,a.isAddQuery=e.length>a.prevQuery.length;var i=!1;if(a.backDelete=!1,e.length<a.queryValue.length&&!a.isAddQuery?a.requestQuery.forEach(function(t){i=-1!==t.indexOf(e)}):i=!1,i?(a.requestQuery.push(e),a.backDelete=!0):a.backDelete=!1,a.requesting=!0,"_blank"===$(a.form).attr("target")&&1===$(a.ipt).attr("data-bfocus"))$(a.ipt).focus().attr("data-bfocus",0),a.requesting=!1;else if(a.showsug){var t=function t(){a.jqXhr=$.ajax({dataType:"jsonp","async":!0,url:a.buildUrl(e,n),jsonp:"cb",timeout:5e3,success:function(t){t=r(t),a.callback(t,n)},complete:function(){a.jqXhr=null,a.requesting=!1},always:function(){a.jqXhr=null,a.requesting=!1}})},o=function o(t,e){if(!Array.isArray(t)||0===t.length||Number.isNaN(e)||e<0)return-1;for(var n=e;n<t.length;n++)if(t[n]&&"sug"===t[n].type)return n;return-1},r=function r(t){if(!a.showsugstore&&""===a.value||bds.comm.pcSugSwitch)return t;if(!t.g)return t;var e=+bds.comm.sugAiIndex-1,n=t.g.length,i=o(t.g,e);return 0<=i?(t.g[i].type="ai_guide",t.g[i].sa="s_"+i+"_bb2"):(e=t.g&&t.g[0]&&t.g[0].q||"",i=t.g?t.g.length+1:0,t.g[n]={type:"ai_guide",sa:"s_"+i+"_bb2",q:e}),t};if(a.reqValue=e,2!==n&&a.dataCached[e])return a.requesting=!1,void a.callback(a.dataCached[e]);a.jqXhr&&a.jqXhr.abort(),""!==e||a.backFrame&&a.isSugSample3?t():a.jqXhr=$.ajax({type:"GET",dataType:"json","async":!0,url:a.buildUrl(e,n),timeout:5e3,xhrFields:{withCredentials:!0},crossDomain:!0,success:function(t){t=r(t),a.callback(t,n)},complete:function(){a.jqXhr=null,a.requesting=!1},always:function(){a.jqXhr=null,a.requesting=!1}}),a.rsv_sug3++,a.addStat("rsv_sug3",a.rsv_sug3),a.initTime=(new Date).getTime()}}},packData:function(t){var e=this,n=[];e.checkHot(t),e.checkAla(t),e.checkStore(t),e.bds.comm.supportis||e.checkDirect(t);for(var i=e.mergeData(t),a=0;a<i.length;a++)e.reverse?n.unshift(i[a]):n.push(i[a]);return n},checkHot:function(t){var e=this;if(e.dataHot=[],t.g&&t.g.length)for(var n=0;n<t.g.length;n++){var i=t.g[n];(!i.t||"hot"!==i.t)&&(!window.__sam_his_hot||!i.t||"hs"!==i.t||window.me.bds&&e.bds.comm&&e.bds.comm.username)||e.dataHot.push({value:i.q,otherData:i.st})}},checkDirect:function(t){this.dataDirect=[],t.tzx&&"6"===t.tzx.type&&t.tzx.info&&(t=t.tzx.info,this.dataDirect.push({value:t.site,otherData:t}))},checkAla:function(t){if(this.dataAladdin=[],t.z&&0<t.z.length&&!this.withoutRich)for(var e=0;e<t.z.length;e++){var n=t.z[e];n.id&&n.type&&n.key&&n.word&&this.dataAladdin.push({value:n.key,otherData:n})}else this.dataAladdin=[]},writeStore:function(t,e){var n=this;if(n.query&&n.pinyin&&(0,_util.checkHsugIn)(n.query)){n.getStore();var i=encodeURIComponent(n.query.toLowerCase()),a=encodeURIComponent(n.pinyin.toLowerCase()),o=BDSUG_QUERY_LEV,r=(new Date).getTime()-BDSUG_TIMESTAMP_START,s=-1;$.each(n.storearr,function(t,e){e.p===a&&(e.q=i,o=(e.s||BDSUG_QUERY_LEV)+1,e.t=r,s=t)}),-1<s&&n.storearr.splice(s,1);var l=document.location.search||location.search;if(/base_query/.test(l))return;l=n.showsugstore?0:1;n.storearr.push({q:i,p:a,s:o,t:r,hide:l}),50<n.storearr.length&&n.storearr.shift(),n.setStore()}},checkStore:function(t){var a=this;if(a.dataStored=[],a.showsugstore&&(0,_util.checkHsugShow)(a.value)){if(t&&t.g&&t.g.length)for(var e=0;e<t.g.length;e++)(n=t.g[e]).type&&("his_normal"===n.type||"his_rec"===n.type)&&$.trim(n.q)&&a.dataStored.push({value:$.trim(n.q),pinyin:"|",s:4,t:""});0===a.dataStored.length&&(a.getStore(),$.each(a.storearr,function(t,e){var n=decodeURIComponent(e.q),i=decodeURIComponent(e.p);0!==n.indexOf(a.value.toLowerCase())&&0!==i.indexOf(a.value.toLowerCase())||a.dataStored.unshift({value:n,pinyin:i,s:e.s,t:e.t})}))}else if(a.showsugstore&&""===a.value){if(t&&t.g&&t.g.length)for(var n,e=0;e<t.g.length;e++)(n=t.g[e]).type&&("his_normal"===n.type||"his_rec"===n.type)&&$.trim(n.q)&&a.dataStored.push({value:$.trim(n.q),pinyin:"|",s:4,t:""});!window._is_sugempty_sam||a.bds&&a.bds.comm&&a.bds.comm.username||(a.getStore(),$.each(a.storearr,function(t,e){var n=decodeURIComponent(e.q),i=decodeURIComponent(e.p);a.dataStored.unshift({value:n,pinyin:i,s:e.s,t:e.t})}))}return a.dataStored},placeHolder:function(t){this.placeholder=t||"",$(this.ipt).attr("placeholder",this.placeholder)},getStore:function(){var t=this;try{t.storestr=(0,_util.bdsStore)().get("BDSUGSTORED"),t.storearr=t.storestr&&$.parseJSON(t.storestr)||[]}catch(e){t.storestr="[]",t.storearr=[]}$.each(t.storearr,function(t,e){e.t=e.t||0,e.s=e.s||4})},setStore:function(){var n="";$.each(this.storearr,function(t,e){n+=(0===t?"":",")+'{"q":"'+e.q+'","p":"'+e.p+'","s":'+e.s+',"t":'+e.t+',"hide":'+(e.hide||0)+"}"}),this.storestr="["+n+"]";try{(0,_util.bdsStore)().set("BDSUGSTORED",this.storestr)}catch(t){console.error(err)}},mergeData:function(t){var v=this,e=[],n=0,i=0;if((v.rsv_sug=0)<v.dataHot.length&&""===v.value){for(var a=0;a<v.dataHot.length&&(n++,e.push(p({v:v.dataHot[a].value,type:"hot",otherData:v.dataHot[a].otherData})),!(8<=n));a++);return e}if(0<v.dataDirect.length&&(e.push(p({v:v.dataDirect[0].value,type:"direct",otherData:v.dataDirect[0].otherData})),ns_c({pj_name:"zhida_sug",zhida_prefix:encodeURIComponent(v.inputValue),zhida_query:encodeURIComponent(v.dataDirect[0].value),zhida_chufa:encodeURIComponent(v.dataDirect[0].otherData.hit_q),zhida_bp:v.bds.comm.ishome?0:1})),0<v.dataAladdin.length)for(a=0;a<v.dataAladdin.length&&(e.push(p({v:v.dataAladdin[0].value,type:"ala",otherData:v.dataAladdin[0].otherData})),!(1<=++n));a++);if(0<v.dataStored.length)for(a=0;a<v.dataStored.length;a++){for(var o=!1,r=0;r<e.length;r++)"direct"!==e[r].type&&v.dataStored[a].value===e[r].value&&(o=!0);var s=""===v.inputValue;if(!o&&s&&""===v.inputValue&&(e.push(p({v:v.dataStored[a].value,type:"store",otherData:v.dataStored[a].pinyin,s:v.dataStored[a].s||0})),n++,0===i&&"|"===v.dataStored[a].pinyin&&(i=3)),v.rsv_sug++,""===v.value&&9<=n)break;if(""!==v.value&&2<=n)break}var l=[];if(t.g&&0<t.g.length){for(a=0;a<t.g.length;a++)if("sug"===t.g[a].type||"direct_new"===t.g[a].type||"ai_guide"===t.g[a].type){for(o=!1,r=0;r<e.length;r++)"direct"!==e[r].type&&t.g[a].q===e[r].value&&(o=!0);if(!o){var u={};if(t.g[a].info&&t.g[a].info.vec_str_raw[0])try{u=JSON.parse(t.g[a].info.vec_str_raw[0])}catch(err){console.error(err)}var c=t.g[a].q;"direct_new"===t.g[a].type&&u&&(c=u.value.query||u.value.name&&u.value.name[0].text||""),"sug"!==t.g[a].type&&!v.isShowDirectSug(u)||(l.push(p({v:c,type:t.g[a].type,otherData:t.g[a].st,info:u})),i=i||1)}}e=""===v.value&&l.length?(v.bds.comm.supportis?l.slice(0,Math.max(4-e.length,2)):l.slice(0,Math.max(10-e.length,5))).concat(e):e.concat(l)}switch(i){case 1:v.rsv_sug7[0]=1;break;case 3:v.rsv_sug7[2]=1}return e;function p(t){var e=t.v,n=t.type,i=t.otherData,a=t.s,o=t.info,s={},l=(s.value=e)&&p(e,v.queryValue),r=!1;switch(v.isSugSample&&(r=!0,"search_sug_1"!==v.currentSugSample&&"search_sug_base"!==v.currentSugSample||(r=!1)),n){case"direct":"-"===i.iconurl?s.html='<p link="'+i.siteurl+'">'+i.site+"<span>"+i.showurl+"</span><i>官网</i></p>":s.html='<p link="'+i.siteurl+'"><img src="'+i.iconurl+'"/>'+i.site+"<span>"+i.showurl+"</span></p>",s.type="direct";break;case"ala":s.html="<h3>"+l+"</h3><p>"+i.word+"</p>",s.type="ala",s.alaid=i.id;break;case"ai_guide":s.html=l+'<div class="bdsug-ai-guide"><span style="color: #4e6ef2; font-size: 13px; font-weight: 500;">问</span><img class="bdsug-logo" src="https://psstatic.cdn.bcebos.com/basics/aichat/ai-icon_1753948692000.png"/></div>';break;case"store":2===i["new"]&&(l+='<span class="bdsug-newicon">&nbsp;[<i>企业</i>]</span>'),s.html="<span>"+l+"</span>",v.isSugSample&&r&&(s.html='<i class="c-icon sug-history-icon">&#xe6a8;</i>'+l),!v.bds.comm.username&&"|"===i||(s.html+='<u class="bdsug-store-del '+("|"===i?"bdsug-store-del-cloud":"")+'" title="如您不需要此搜索历史提示，&#13;可在右上角搜索设置中关闭">删除</u>'),s.type="store",s.pinyin=i,s.s=a;break;case"direct_new":!function(t){!t.flag||(i=t.value&&t.value.tag)&&(l+='<span class="sug-tag-comm sug-hot-orange">'+i+"</span>");{var e,n,i,a,o,r;"1020"===t.type&&t.value&&(a=t.value.img,o=t.value.brief||"",r=t.value.info||"",e=t.value.name[0]&&t.value.name[0].text||"",n=t.value.link,i="",(a||o)&&(s.isDouble=!0),o=o?'<span class="brief">'+o+"</span>":"",r=r?'<span class="info">'+r+"</span>":"",l=s.isDouble?(t.value&&t.value.img&&(i='<div class="left-img-wrap"><img class="left-img" src="'+a+'"></div>'),a=h(t.value),o='<div class="content"><div class="header"><span class="name">'+e+"</span>"+a+'</div><div class="more c-line-clamp1">'+o+r+"</div></div>",r='<div class="right-btn">查看</div>',n?"<a"+(' href="'+n+'" data-flag="'+t.flag+'"')+' target="_blank" class="direct-sug-wrap">'+i+o+r+"</a>":'<div class="direct-sug-wrap" data-flag="'+t.flag+'">'+i+o+r+"</div>"):p(e,v.queryValue)+h(t.value,t.flag))}}(o),s.html=l;break;default:i&&i["new"]&&2===i["new"]&&(l+='<span class="bdsug-newicon">&nbsp;[<i>企业</i>]</span>'),"sug"===n&&v.isSugSample&&r&&(l='<i class="c-icon sug-search-icon">&#xe6a7;</i>'+l),s.html=l}if(!v.withoutZhixin&&0<v.zhixinsug.length)for(var u,c=0;c<v.zhixinsug.length;c++)s.value===v.zhixinsug[c].value&&"ala"!==s.type&&(s.zxtype=v.zhixinsug[c].type,s.zxurl=v.zhixinsug[c].url,s.html.split(u='<i class="bdsug-arrow"></i>').length<=1&&(s.html+=u));return s;function p(t,e){return t=$.subByte(t,"41"),t=e&&t?(t=$.trim(t),e=$.trim(e),0===t.indexOf(e)&&t!==e?function(t,e){var n=2<arguments.length&&arguments[2]!==undefined&&arguments[2];t=d(t);var i=e=d(e),e=e.length;if(n)return'<b class="total-b">'+t+"</b>";t="<b>"+t.substring(e)+"</b>";return i+t}(t,e):d(t)):d(t)}function d(t){return t=(t=(t=t.replace(/&/g,"&amp;")).replace(/</g,"&lt;")).replace(/>/g,"&gt;")}function h(t,e){if(t.tag_style_list){var n="";return t.tag_style_list.forEach(function(t){1===t.tag_type?n+=g(t,e):2===t.tag_type&&(n+=m(t,e))}),n}if(t.tag_style){var i=t.tag_style.tag_type;if(1===i)return g(t.tag_style,e);if(2===i)return m(t.tag_style,e)}return t.tag?'<span class="'+("sug-tag-comm sug-new-tag sug-new-tag-"+(t.tagColor||"grey"))+'">'+t.tag+"</span>"||!1:""}function g(t,e){return'<span class="sug-tag-comm sug-tag-text" style="'+("border-color: "+f(t.border_color)+";background-color:"+f(t.bg_color)+";color:"+f(t.text_color))+'"'+(' data-flag="'+e+'"')+">"+t.text+"</span>"||!1}function f(t){if(!t)return"";var e=parseInt("0x"+t.slice(1,3),16)/255;return"rgba("+[parseInt("0x"+t.slice(3,5),16),parseInt("0x"+t.slice(5,7),16),parseInt("0x"+t.slice(7,9),16),e].join(",")+");"}function m(t,e){t=t.image;return t?'<img class="sug-tag-comm sug-tag-img" src="'+t+'" data-flag="'+e+'">':""}}},isShowDirectSug:function(t){if("1020"===t.type&&t.value){var e=t.value.name[0]&&t.value.name[0].text||"",n=t.value.img,i=t.value.brief||"",t=t.value.info||"";if(!e)return!1;if(n&&!i&&!t)return!1}return!0},sendSpecialSugClickLog:function(t,e,n){c({rsv_ct:10,rsv_cst:t,rsv_clk_extra:JSON.stringify({flag:e,index:n})})},render:function(a){var o=this;if(o.is_selecting=!1,o.sugcontainer||(o.sugcontainer=document.createElement("DIV"),f=o.searchNewStyle,u="",o.isSugSample3&&(u=" bdsug-sample3"),o.sugcontainer.className=f?"sam-bdsug ai-bdsug ai-bdsug-new new-pmd"+u:"ai-bdsug ai-bdsug-new new-pmd"+u,$(o.sugcontainer).delegate("li","mouseenter",function(){0<$(o.sugcontainer).find(".bdsug-store-del").length&&(0,_ubcLog.sendUbcLog)("show","single_his_delete",{recom_query:$(this).attr("data-key")}),o.stopCircle();var t=$(this).data("key");o.blurSug($(o.sugcontainer).find("li")),o.focusSug(this,t),o.index=$(o.sugcontainer).find("li").index($(this)),o.hoverSug=t}).delegate("li","mouseleave",function(){o.startCircle(),$(this).removeClass("bdsug-s")}).delegate("li","click",function(){o.index=$(o.sugcontainer).find("li").index($(this));var t=$(this).find(".direct-sug-wrap"),e=$(this).find("a"),n=0<$(this).find(".bdsug-ai-guide").length;if(0<e.length)o.sendSpecialSugClickLog(14,$(e).data("flag"),o.index);else{var i=!!o.ipt.value;if(0<t.length)(0,_ubcLog.sugHisClickSend)("click",i,o.ipt.value,"pic",{recom_query:$(t).context.dataset.key,is_log:bds.comm.username?1:0,order:o.index+1}),o.sendSpecialSugClickLog(15,$(t).data("flag"),o.index);else{if(n&&""!==o.value&&!bds.comm.pcSugSwitch){var a=this.dataset&&this.dataset.key,n={enter_type:"sug_direct",sa:"iks_purpose_dibu",apagelid:bds.comm.qid,ori_lid:bds.comm.qid};return(0,_ubcLog.sugHisClickSend)("click",i,o.ipt.value,"ai",{recom_query:$(t).context.dataset.key,is_log:bds.comm.username?1:0,order:o.index+1}),void(window.location.href="https://chat.baidu.com/search?word="+encodeURIComponent(a)+"&pd=csaitab&setype=csaitab&extParamsJson="+encodeURIComponent(JSON.stringify(n)))}(0,_ubcLog.sugHisClickSend)("click",i,o.ipt.value,"common",{recom_query:$(t).context.dataset.key,is_log:bds.comm.username?1:0,order:o.index+1})}i=$(this).find(".sug-tag-comm");!e.length&&!t.length&&0<i.length&&o.sendSpecialSugClickLog(16,$(i).data("flag"),o.index),o.startCircle();i=$(this).data("key");$(".kw-placeholder").hasClass("placeholders-hidden")||$(".kw-placeholder").addClass("placeholders-hidden"),o.directSugSelected=!!$(this).hasClass("bdsug-direct"),$(this).hasClass("bdsug-hot")&&o.addStat("rsv_sug8","hot"),o.newIpt&&(o.newIpt.textContent=i),o.sugValue=o.showValue=o.value=o.ipt.value=i,o.ipt.value?o.quickdelete._show():o.quickdelete._hide(),o.hideSug(),o.bds&&o.bds.comm&&0===o.bds.comm.ishome&&o.addStat("oq",o.bds.comm.confirmQuery?xss(o.bds.comm.confirmQuery):""),o.bds&&o.bds.comm&&o.bds.comm.confirmQid&&o.addStat("rsv_pq",o.bds.comm.confirmQid),o.addStat("sug",xss(i)),o.addStat("rsv_sug2",1),o.sugClickCallback(i)}}),$(o.sugcontainer).click(function(t){t.stopPropagation()})),0<a.length){var t=document.createElement("UL");bds.comm.ishome||t.setAttribute("id","normalSugSearchUl");for(var r=o.bds&&o.bds.util&&o.bds.util.domain?o.bds.util.domain.get("http://sclick.baidu.com"):"http://sclick.baidu.com",e=0;e<a.length;e++){var n,i,s,l=document.createElement("LI");a[e].isDouble&&$(l).css("line-height","normal"),l.innerHTML=a[e].html,a[e].zxtype&&a[e].zxurl&&(n=a[e].value,i=a[e].zxtype,s=a[e].zxurl,o.zhixindata[n]&&o.zhixindata[n].responseJSON&&0===o.zhixindata[n].responseJSON.status&&o.zhixindata[n].responseJSON.data&&0<o.zhixindata[n].responseJSON.data.length||(o.zhixindata[n]=$.ajax({dataType:"jsonp","async":!0,url:s,jsonp:"cb"})),$(l).addClass("bdsug-zx").on("focused",function(){var t=$(this).data("key"),e=o.zhixindata[t]&&o.zhixindata[t].responseJSON&&0===o.zhixindata[t].responseJSON.status&&o.zhixindata[t].responseJSON.data&&0<o.zhixindata[t].responseJSON.data.length,n=$(o.sugcontainer).find(".bdsug-box")[0];e&&n&&o.bds.se.sugzx&&o.bds.se.sugzx[i]&&((t=o.bds.se.sugzx[i](o.zhixindata[t].responseJSON.data,t,o.outInterface(),o))instanceof jQuery&&($(o.sugcontainer).addClass("bdsug-showzx"),$(n).empty().append(t),$(o.sugcontainer).height()<$(o.sugcontainer).find(".bdsug-box").height()&&$(o.sugcontainer).css({height:$(o.sugcontainer).find(".bdsug-box").height()})))}).on("blured",function(){$(o.sugcontainer).removeClass("bdsug-showzx"),$(o.sugcontainer).css({height:"auto"})})),o.setSug(l,a[e].value,a[e].type),t.appendChild(l)}$(o.sugcontainer).prependTo(o.aiWrapper);var u=document.createElement("div");u.appendChild(t),o.sugcontainer.innerHTML=u&&u.innerHTML,$(o.sugcontainer).removeClass("bdsug-showzx"),$(o.sugcontainer).css({height:"auto"});var p=$(o.sugcontainer).find("ul li");o.withoutZhixin||($(o.sugcontainer).addClass("bdsug-showarrow"),$(o.sugcontainer).append($('<div class="bdsug-box"></div>')),$(o.aiWrapper).find(".bdsug-tmp").length||$(o.aiWrapper).append($('<div class="bdsug-tmp"></div>')),$(o.sugcontainer).find(".bdsug-box").on("mouseenter",function(){$(o.sugcontainer).addClass("bdsug-showzx"),$(p[o.index]).addClass("bdsug-s")}).on("mouseleave",function(){$(o.sugcontainer).removeClass("bdsug-showzx"),$(p[o.index]).removeClass("bdsug-s"),$(o.sugcontainer).css({height:"auto"})}).on("click",function(t){t.stopPropagation()})),$(o.aiWrapper).find(".bdsug-tmp").empty();var d=$("<li>").appendTo($("<div>").addClass("bdsug-showzx").appendTo($(o.aiWrapper).find(".bdsug-tmp"))),h=$("<div>").css({position:"absolute",display:"inline-block",top:"-10000px",left:"-10000px"}).appendTo($(o.aiWrapper).find(".bdsug-tmp"));$.each(p,function(t,e){h.html($(e).html());h.width()>d.width()-$(o.sugcontainer).find(".bdsug-arrow").width()-28&&$(e).addClass("bdsug-overflow c-line-clamp1")});var g="0";if(0===o.bds.comm.ishome?g="0":1===o.bds.comm.ishome&&window.s_domain&&"home"===window.s_domain.base?g="2":1===o.bds.comm.ishome&&(g="1"),""===o.value&&a.length){for(var f,m=0,e=0;e<a.length;e++)a[e].type&&"store"===a[e].type&&m++;ns_c({pj_name:"es_sug",es_sug_hot:o.dataHot.length,es_sug_num:a.length,eb_sug_num:a.length-m,es_sug_bp:g+"_"+(o.bds.comm.supportis?1:0)}),(o.dataStored.length&&3<o.dataStored.length||o.dataHot.length&&3<o.dataHot.length)&&(f=o.searchNewStyle,u="",!(f='<span class="setup_storeSug" style="margin-right:15px; text-decoration:none; cursor:pointer;font-size: 13px; color: #9195a3">关闭历史</span>')===o.hisSwitch&&(f=""),u=o.bds.comm.username?'<div style="background:none;" class="bdsug-feedback-tool-zone">'+f+'<span class="del_all_storeSug" style="margin-right: 15px; text-decoration:none; cursor:pointer;font-size: 13px; color: #9195a3">删除历史</span><a class="more_storeSug" href="http://i.baidu.com/my/history?from=pssug"target="_blank" style="color:#666; text-decoration:none;margin-right: 9px; font-size: 13px; color: #9195a3">更多历史</a></div>':'<div style="background:none;" class="bdsug-feedback-tool-zone"><span class="setup_storeSug" style="margin-right: 9px; text-decoration:none; cursor:pointer;font-size: 13px; color: #9195a3">关闭历史</span></div>',$(o.sugcontainer).append(u),$(o.sugcontainer).find(".del_all_storeSug").click(function(){(0,_ubcLog.sendUbcLog)("click","delete_his",{area:"delete"}),o.isSugSample&&c({rsv_ct:10,rsv_cst:12}),o.dataStored[0]&&o.dataStored[0].pinyin&&"|"===o.dataStored[0].pinyin&&$.ajax({type:"POST",dataType:"json",scriptCharset:"utf-8",timeout:6e3,url:"https://www.baidu.com/recsys/hisproxy/data/usrclear",xhrFields:{withCredentials:!0},crossDomain:!0,success:function(){}}),o.storearr=[],o.setStore(),o.hideSug(),(window["BD_PS_C"+(new Date).getTime()]=new Image).src=r+"/w.gif?q=delall&fm=beha&rsv_sug=delall&rsv_sid="+o.bds.comm.sid+"&t="+(new Date).getTime()+"&rsv_sug9=es_"+g+"_"+(o.bds.comm.supportis?1:0)+"&path=http://www.baidu.com"}),$(o.sugcontainer).find(".more_storeSug").click(function(){(0,_ubcLog.sendUbcLog)("click","more_his"),ns_c({pj_name:"hs_sug_more"})}),$(o.sugcontainer).find(".close_hotSug").click(function(){o.hideSug(),ns_c({pj_name:"hot_sug_close"})}),$(o.sugcontainer).find(".setup_storeSug").click(function(){(0,_ubcLog.sendUbcLog)("click","close_his"),o.bds.event.trigger("bd.se.loadpanel",{tab:"general",tipsConfig:{content:o.bds&&o.bds.comm&&o.bds.comm.username?"关闭该账号下所有设备的搜索历史":"该选项可以关闭您的历史记录",wrapper:"#se-setting-5"}}),o.hideSug(),ns_c({pj_name:"hs_sug_setup"})}))}$.each(p,function(t,e){var i=t;a[t]&&"store"===a[t].type&&$(e).find("u").click(function(t){var n;t.stopPropagation(),$(e).remove(),o.bds&&o.bds.comm&&o.bds.comm.username&&(t=$(this).parent().attr("data-key"),(0,_ubcLog.sendUbcLog)("click","single_his_delete",{recom_query:t}),o.requestDelHis(t)),a[i].pinyin&&"|"===a[i].pinyin?(n=!(o.dataCached={}),$.each(o.storearr,function(t,e){encodeURIComponent(o.dataArray[i].value)===o.storearr[t].q&&(n=t)})):(n=!1,$.each(o.storearr,function(t,e){o.dataArray[i].pinyin===decodeURIComponent(o.storearr[t].p)&&(n=t)})),!1!==n&&(o.storearr.splice(n,1),o.setStore()),(window["BD_PS_C"+(new Date).getTime()]=new Image).src=r+"/w.gif?q="+encodeURIComponent(a[i].value)+"&fm=beha&rsv_sug=del&rsv_sid="+o.bds.comm.sid+"&t="+(new Date).getTime()+(""===o.value?"&rsv_sug9=es_"+g+"_"+(o.bds.comm.supportis?1:0):"")+"&path=http://www.baidu.com"})}),!!window.ActiveXObject&&(!document.documentMode||document.documentMode<=9)||""!==o.value&&!1!==o.useFeedback&&($(o.sugcontainer).append('<div class="ai-bdsug-feedback-wrap"><span class="bdsug-feedback">反馈</span></div>'),$(".ai-bdsug-feedback-wrap").on("click",function(){var n=o.dataArray;o.dataArray.forEach(function(t,e){n[e]=t.value}),o.isSugSample&&c({rsv_ct:10,rsv_cst:13});var t=o.requestDefaultData.g_mot||[];("search_sug_2"===o.currentSugSample||"search_sug_5"===o.currentSugSample||o.isSugSample3&&0===o.currentSearchStatus)&&3<=t.length&&t.forEach(function(t){n.push(t.q)}),o.sugFeedbackClick(),o.bds.se.ShortCut.initSugBar(n),o.hideSug()})),$(o.ipt).trigger("render",[o]),o.renderCallback(),o.visible||o.hideSug(),o.showSug();-1!==["search_sug_2","search_sug_3-1","search_sug_3-2","search_sug_4-1","search_sug_4-2","search_sug_5"].indexOf(o.currentSugSample)&&o.showRightContent&&(o.backFrame||"search_sug_5"===o.currentSugSample&&o.backDelete)?$(".wrapper_new #"+o.inputDomId+" .ai-bdsug-new").addClass("search-sug-short"):$(".wrapper_new #"+o.inputDomId+" .ai-bdsug-new").removeClass("search-sug-short")}else o.hideSug()},renderSugContainer:function(){var t,e=this;e.sugcontainer||(e.sugcontainer=document.createElement("DIV"),t=e.searchNewStyle,e.sugcontainer.className=t?"sam-bdsug ai-bdsug ai-bdsug-new new-pmd bdsug-sample3":"ai-bdsug ai-bdsug-new new-pmd bdsug-sample3"),$(e.sugcontainer).prependTo(e.aiWrapper)},escapeHTML:function(t){return t=(t=(t=t.replace(/&/g,"&amp;")).replace(/</g,"&lt;")).replace(/>/g,"&gt;")},renderSearchHistory:function(t,e,n){var i=this;if(i.renderSugContainer(),t&&0<t.length&&0<i.dataArray.length){var a=t||[];$("#sugSearchHisUl")[0]&&$("#sugSearchHisUl")[0].remove(),$("#rightSugSearchHisUl")[0]&&$("#rightSugSearchHisUl")[0].remove();var o=document.createElement("ul");i.sugcontainer.appendChild(o);var r="search_sug_4-1"===i.currentSugSample||"search_sug_4-2"===i.currentSugSample,t=r?"rightSugSearchHisUl":"sugSearchHisUl";o.setAttribute("id",t);var s="#"+t;r&&e&&(s="#rightSugSearchHisUl",(u=document.createElement("div")).setAttribute("class","search-history-title"),u.innerHTML=i.escapeHTML(e),$(s)[0]&&$(s)[0].append(u));var l='<u class="bdsug-store-del bdsug-store-del-cloud" title="如您不需要此搜索历史提示，&#13;可在右上角搜索设置中关闭">删除</u>';"0"===bds.comm.isUserLogin&&(l="");for(var u,p=0;p<a.slice(0,10).length;p++){var d=document.createElement("li");d.setAttribute("class","c-line-clamp1"),d.innerHTML='<i class="c-icon sug-history-icon">&#xe6a8;</i>'+i.escapeHTML(a[p].q)+l,i.setSug(d,a[p].q,a[p].type),$(i.sugcontainer).delegate("li","mouseover",function(){$(this).addClass("bdsug-s")}).delegate("li","mouseout",function(){$(this).removeClass("bdsug-s")}).delegate("li","click",function(){i.startCircle();var t=$(this).data("key");i.ipt.value=t,i.sugValue=i.showValue=i.value=t,i.index=$(i.sugcontainer).find("li").index($(this)),i.ipt&&i.ipt.value?i.quickdelete._show():i.quickdelete._hide(),i.hideSug(),$(i.ipt).trigger("formSubmit")}),o.appendChild(d)}r&&(u=$("#rightSugSearchHisUl").height(),(r=$("#normalSugSearchUl").height())<u?$("#normalSugSearchUl").height(u):$("#normalSugSearchUl").height(r)),$(s+" li").each(function(t){var e=i.backFrame;$(this).click(function(){c({rsv_ct:10,rsv_cst:6,rsv_clk_extra:JSON.stringify({pos:n,index:t,status:i.currentSearchStatus,test:i.currentSugSample,backFrame:e})})})}),$(s+" li u").each(function(t,e){$(e).on("click",function(t){t.stopPropagation(),1===$(s+" li").length&&($(".search-history-title")[0]&&$(".search-history-title")[0].remove(),"search_sug_3-1"!==i.currentSugSample&&"search_sug_3-2"!==i.currentSugSample||i.setLeftGussStyle());var e=$(this).parent().attr("data-key"),t=[];try{var n=localStorage.getItem("BDSUGSTORED"),t=JSON.parse(n)}catch(err){console.error(err)}t=t.filter(function(t){return decodeURIComponent(t.q)!==e});try{localStorage.setItem("BDSUGSTORED",JSON.stringify(t))}catch(err){console.error(err)}i.requestDelHis(e),$(this.parentNode).remove(),0===$("#rightSugSearchHisUl li").length&&($("#normalSugSearchUl").width("auto"),$("#normalSugSearchUl li").width("auto"))})}),i.renderCallback()}},requestDelHis:function(t){$.ajax({type:"POST",scriptCharset:"utf-8",dataType:"json",timeout:6e3,url:"https://www.baidu.com/recsys/hisproxy/data/usrdelete",data:{items:JSON.stringify([{query:t,ts:""}])},xhrFields:{withCredentials:!0},crossDomain:!0,success:function(){}})},setLeftGussStyle:function(){$("#sugSearchGuessUl").attr("id","leftSugSearchHisUl"),$("bdsug ai-bdsug-new new-pmd").css("overflow","hidden"),$(".wrapper_new #"+this.inputDomId+" .ai-bdsug-new").css("overflow","hidden")},renderRecomend:function(t,e,n){var i=this;i.renderSugContainer();var a=t||[];if($("#sugSearchGuessUl")[0]&&$("#sugSearchGuessUl")[0].remove(),$("#leftSugSearchHisUl")[0]&&$("#leftSugSearchHisUl")[0].remove(),3<=a.length){var o=document.createElement("ul"),t=i.requestDefaultData.g_mot;t&&0===t.length?(o.setAttribute("id","leftSugSearchHisUl"),i.setLeftGussStyle()):o.setAttribute("id","sugSearchGuessUl"),i.sugcontainer.appendChild(o);t=document.createElement("div");t.setAttribute("class","search-recommend-title"),t.innerHTML=i.escapeHTML(e),$("#sugSearchGuessUl")[0]&&$("#sugSearchGuessUl")[0].append(t);for(var r=0;r<a.slice(0,7).length;r++){var s=document.createElement("li");s.setAttribute("class","c-line-clamp1"),s.innerHTML='<i class="c-icon sug-search-icon">&#xe6a7;</i>'+i.escapeHTML(a[r].q),i.setSug(s,a[r].q,a[r].type),$(i.sugcontainer).delegate("li","mouseenter",function(){$(this).addClass("bdsug-s")}).delegate("li","mouseleave",function(){$(this).removeClass("bdsug-s")}).delegate("li","click",function(){i.startCircle();var t=$(this).data("key");i.newIpt&&(i.newIpt.textContent=t),i.sugValue=i.showValue=i.value=i.ipt.value=t,i.index=$(i.sugcontainer).find("li").index($(this)),i.ipt.value?i.quickdelete._show():i.quickdelete._hide(),i.hideSug(),$(i.ipt).trigger("formSubmit")}),o.appendChild(s)}($("#sugSearchGuessUl li").length?$("#sugSearchGuessUl li"):$("#leftSugSearchHisUl li")).each(function(t){var e=i.backFrame?1:0;$(this).click(function(){c({rsv_ct:10,rsv_cst:3,rsv_clk_extra:JSON.stringify({index:t,pos:n,status:i.currentSearchStatus,test:i.currentSugSample,backFrame:e})})})});e=$("#sugSearchGuessUl").height(),t=$("#normalSugSearchUl").height();t<e?$("#normalSugSearchUl").height(e):$("#normalSugSearchUl").height(t),i.renderCallback()}},renderBottomContent:function(t){var i=this,t=i.requestDefaultData;$(".search-sug-bottom-tools")[0]&&$(".search-sug-bottom-tools")[0].remove();var e='<span class="setup_storeSug">关闭历史</span>',n='<span class="del_storeSug">删除历史</span><a class="more_storeSug" href="http://i.baidu.com/my/history?from=pssug"target="_blank" class="more_storeSug">更多历史</a>',a="";i.useFeedback&&(a='<span class="bdsug-feedback">反馈</span>'),(t.g&&t.g.length<4||!i.showsugstore)&&(n=e=""),+bds.comm.isUserLogin||(n=""),i.showsugstore||($("#sugSearchGuessUl").attr("id","leftSugSearchHisUl"),r=$("#sugSearchHisUl").height(),$("#sugSearchHisUl li").each(function(){this.remove()}),$("#leftSugSearchHisUl .search-recommend-title").css("margin",0),$("#sugSearchHisUl").height(r+28)),t.g_mot&&t.g_mot.length<3&&(a="");var o,r=$("#sugSearchGuessUl").height();0===i.currentSearchStatus?r<(o=$("#normalSugSearchUl").height())?$("#normalSugSearchUl").height(o):$("#normalSugSearchUl").height(r):1===i.currentSearchStatus&&(o=(i.isSugSample3&&!i.showsugstore?$("#leftSugSearchHisUl"):$("#sugSearchHisUl")).height(),(r=i.isSugSample3&&!i.showsugstore?$("#sugSearchHisUl").height():r)<o?$("#sugSearchHisUl").height(o):$("#sugSearchHisUl").height(r));a='<div class="search-sug-bottom-tools">'+e+n+a+"</div>";$(i.sugcontainer).append(a),$(i.sugcontainer).find(".del_storeSug").click(function(){c({rsv_ct:10,rsv_cst:12}),i.aa=!0,i.dataStored[0]&&i.dataStored[0].pinyin&&"|"===i.dataStored[0].pinyin&&$.ajax({type:"POST",dataType:"json",scriptCharset:"utf-8",timeout:6e3,url:"https://www.baidu.com/recsys/hisproxy/data/usrclear",xhrFields:{withCredentials:!0},crossDomain:!0,success:function(){}}),i.storearr=[];try{localStorage.setItem("BDSUGSTORED","")}catch(err){console.error(err)}$("#sugSearchHisUl li").each(function(){$(this).remove()}),$("#sugSearchGuessUl").attr("id","leftSugSearchHisUl");var t="0";0===i.bds.comm.ishome?t="0":1===i.bds.comm.ishome&&window.s_domain&&"home"===window.s_domain.base?t="2":1===i.bds.comm.ishome&&(t="1");var e=window["BD_PS_C"+(new Date).getTime()]=new Image,n=i.bds&&i.bds.util&&i.bds.util.domain?i.bds.util.domain.get("http://sclick.baidu.com"):"http://sclick.baidu.com";e.src=n+"/w.gif?q=delall&fm=beha&rsv_sug=delall&rsv_sid="+i.bds.comm.sid+"&t="+(new Date).getTime()+"&rsv_sug9=es_"+t+"_"+(i.bds.comm.supportis?1:0)+"&path=http://www.baidu.com"}),$(i.sugcontainer).find(".more_storeSug").click(function(){ns_c({pj_name:"hs_sug_more"})}),$(i.sugcontainer).find(".close_hotSug").click(function(){i.hideSug(),ns_c({pj_name:"hot_sug_close"})}),$(i.sugcontainer).find(".setup_storeSug").click(function(){i.bds.event.trigger("bd.se.loadpanel",{tab:"general",tipsConfig:{content:i.bds&&i.bds.comm&&i.bds.comm.username?"关闭该账号下所有设备的搜索历史":"该选项可以关闭您的历史记录",wrapper:"#se-setting-5"}}),i.hideSug(),ns_c({pj_name:"hs_sug_setup"})}),$(".bdsug-feedback").on("click",function(){c({rsv_ct:10,rsv_cst:13});var e=[];(t.g_mot&&t.g_mot.length&&t.g_mot).forEach(function(t){e.push(t.q)}),i.bds.se.ShortCut.initSugBar(e),i.hideSug()})},setAutocomplete:function(t){$(this.ipt).attr("autocomplete",t)},setSug:function(t,e,n){$(t).attr("data-key",e),n&&$(t).addClass("bdsug-"+n)},setupSug:function(){var t=this,e=t.ipt&&t.ipt.value;if(e){if(t.requesting)return;t.dataCached[e]&&!t.onlyCache?t.callback(t.dataCached[e],"2"):t.request(e,"2")}else if(t.dataCached[e]){if(t.onlyCache)return;t.callback(t.dataCached[e],"2")}else t.request(e)},hasShown:function(){var t=$("#chat-input-panel");return!(!this.visible&&!t.hasClass("panel-expand"))},showSug:function(){var t,e=this;e.index=-1,e.sugcontainer&&0!==e.sugcontainer.clientHeight||(t=e.ipt&&e.ipt.value?"sug_board":"his_board",(0,_ubcLog.sugHisShowSend)(t),0<(t=$(e.sugcontainer).find(".bdsug-ai-guide")).length&&(t=t.parent().attr("data-key"),(0,_ubcLog.aiGuideShowSend)({query:e.ipt.value||"",recom_query:t}))),0<$(e.sugcontainer).find(".direct-sug-wrap").length&&(0,_ubcLog.imgSugSend)("show",e.ipt.value,"pic"),e.ipt.value===e.reqValue&&((e.bds.comm.ishome?$(e.ipt):$(".s_ipt_wr")).addClass("new-ipt-focus"),e.showSugCallback()),e.visible=!0,e.rsv_sug1++,e.addStat("rsv_sug1",e.rsv_sug1),e.addStat("rsv_sug7",e.rsv_sug7.join(""))},hideSug:function(){var t=this;t.is_selecting=!1,$(t.ipt).trigger("hide",[t]),$(t.ipt).removeClass("new-ipt-focus"),$(".s_ipt_wr").removeClass("new-ipt-focus"),t.hideSugCallback(),t.visible=!1,t.jqXhr&&t.jqXhr.abort(),t.jqXhr=null},selectSug:function(t){var e=this,n=$(e.sugcontainer).find("li");if(e.blurSug(n),e.directSugSelected=-1!==t&&n.eq(t).hasClass("bdsug-direct"),-1!==t){e.is_selecting=!0;var i=$($(n)[t]).attr("data-key");if(e.focusSug(n[t],i),e.newIpt){e.newIpt.textContent=i;try{var a=document.createRange(),o=window.getSelection(),r=e.newIpt.lastChild;r&&(a.setStart(r,r.length),a.collapse(!0),o.removeAllRanges(),o.addRange(a))}catch(s){}}$("#kw").val(i),e.sugValue=e.showValue=e.value=e.ipt.value=i,e.addStat("sug",i),e.bds&&e.bds.comm&&0===e.bds.comm.ishome&&e.addStat("oq",e.bds.comm.confirmQuery?xss(e.bds.comm.confirmQuery):""),e.bds&&e.bds.comm&&e.bds.comm.confirmQid&&e.addStat("rsv_pq",e.bds.comm.confirmQid),e.addStat("rsv_n",1)}else e.is_selecting=!1,e.selectCallback(e.inputValue),e.newIpt&&(e.newIpt.textContent=e.inputValue),e.showValue=e.value=e.ipt.value=e.inputValue,e.sugValue="",e.removeStat("sug"),e.removeStat("rsv_n");e.inputValue||1!==e.bds.comm.ishome?e.stopRefresh=!1:e.stopRefresh=!0,$(e.ipt).trigger("selectSug",[e,t,i])},blurSug:function(t){this.backFrame=!1,$(t).removeClass("bdsug-s"),$(t).trigger("blured")},focusSug:function(t,e){$(t).addClass("bdsug-s"),$(t).trigger("focused"),this.selectCallback(e)},pressUp:function(t){var e=this,t=$(e.sugcontainer).find("li").length;e.index--,e.index<-1&&(e.index=t-1),e.selectSug(e.index)},pressDown:function(t){var e=this,t=$(e.sugcontainer).find("li").length;e.index++,e.index>=t&&(e.index=-1),e.selectSug(e.index)},addStat:function(t,e){e=encodeURIComponent(e);var n,i=this;i.stat||(i.stat={}),i.stat[t]=e,i.withoutStat||((n=$(i.form).find('input[type="hidden"][name="'+t+'"]')).length?$(n).val(e):$(i.form).append('<input type="hidden" name="'+t+'" value="'+e+'"/>'))},removeStat:function(t){if(!this.withoutStat&&($(this.form).find('input[type="hidden"][name="'+t+'"]').remove(),!this.stat))try{delete this.stat[t]}catch(e){}},setNewsRsv:function(t){"sug"===t?this.addStat("rsv_dl","news_t_sug"):"box"===t?this.addStat("rsv_dl","news_t_sk"):"his"===t&&this.addStat("rsv_dl","news_t_his")},clearStat:function(){var t=this;t.bds&&t.bds.comm&&t.bds.comm.isAsync&&(t.removeStat("rsp"),t.removeStat("prefixsug"),1===t.bds.comm.ishome?t.addStat("rsv_dl","ib"):"news"===t.tn?t.setNewsRsv("box"):t.addStat("rsv_dl","tb")),t.rsv_sug7=[0,0,0],t.removeStat("rsv_n"),t.removeStat("rsv_sug"),t.removeStat("rsv_sug1"),t.removeStat("rsv_sug2"),t.removeStat("rsv_sug3"),t.removeStat("rsv_sug4"),t.removeStat("rsv_sug5"),t.removeStat("rsv_sug6"),t.removeStat("rsv_sug7"),t.removeStat("rsv_sug8"),t.removeStat("rsv_sug9"),t.stat={}},getRsvStatus:function(t){var e=this,n=[],i=[-2];if(e.rsv_sug){for(var a in i=[-1],e.dataArray)t===e.dataArray[a].value&&(i=[0,a],a<e.rsv_sug&&(i=[1,a]));for(a=0;a<e.rsv_sug&&e.dataArray[a];a++)n.push(e.dataArray[a].value.length,e.dataArray[a].s);i.push(e.index,e.rsv_sug,n.join("."))}return i.join("_")},formSubmit:function(t){var e,n=this,i=!0,a=n.bds&&n.bds.comm&&1===n.bds.comm.ishome?"i":"t",o="t";if("/"===window.location.pathname&&(o="i"),n.newIpt&&$(n.newIpt).trigger("blur"),$($(n.sugcontainer).find("li")[n.index]).children("a").length&&n.isReturnSearch){var r=$($(n.sugcontainer).find("li")[n.index]).children("a").attr("href");return window.open(r,"_blank"),void n.hideSug()}n.addStat("rsv_btype",o),-1!==n.index?(n.addStat("f",3),n.addStat("prefixsug",xss(n.inputValue)),n.addStat("rsp",n.index),""===n.inputValue?"news"===n.tn?n.setNewsRsv("his"):n.addStat("rsv_dl",a+"h_"+n.index):"news"===n.tn?n.setNewsRsv("sug"):n.addStat("rsv_dl",a+"s_"+n.index),n.dataArray[n.index]&&n.dataArray[n.index].alaid?n.addStat("rsv_sug5",n.dataArray[n.index].alaid):n.removeStat("rsv_sug5")):n.addStat("f",8),!n.dataArray[n.index]||""!==n.inputValue&&"|"!==n.dataArray[n.index].pinyin||"store"!==n.dataArray[n.index].type?""===n.inputValue&&n.addStat("rsv_sug9","eb_"+(n.bds.comm.supportis?1:0)):(o="0",0===n.bds.comm.ishome?o="0":1===n.bds.comm.ishome&&window.s_domain&&"home"===window.s_domain.base?o="2":1===n.bds.comm.ishome&&(o="1"),n.addStat("rsv_sug9","es_"+o+"_"+(n.bds.comm.supportis?1:0))),n.sugValue===n.value?(n.removeStat("rsv_n"),n.removeStat("sug")):n.hoverSug===n.value&&n.sugValue===n.value||("news"===n.tn?n.setNewsRsv("box"):n.addStat("rsv_dl",a+"b"),n.addStat("f",8)),0!==n.inputT?(n.addStat("inputT",(new Date).getTime()-n.inputT),n.directInputT=(new Date).getTime()-n.inputT,n.inputT=0):n.removeStat("inputT"),0!==n.rsv_sug4&&(n.addStat("rsv_sug4",(new Date).getTime()-n.rsv_sug4),n.rsv_sug4=0),n.rsv_sug&&n.addStat("rsv_sug",n.rsv_sug),$($(n.sugcontainer).find("li")[n.index]).hasClass("bdsug-zx")?"all"===$(n.sugcontainer).find(".bdsug-box").attr("bdsug-click")?n.addStat("rsv_sugtp",1):n.addStat("rsv_sugtp",0):n.removeStat("rsv_sugtp");try{e=(new Date).getTime(),document.cookie="WWW_ST="+e+";expires="+new Date(e+1e4).toGMTString()}catch(s){}0===n.index&&0<n.dataDirect.length&&n.directSugSelected?(window.open($(n.sugcontainer).find(".bdsug-direct p").attr("link"),"_blank"),n.blankHandle(),ns_c({pj_name:"zhida_sug",sug_prefix:encodeURIComponent(n.inputValue),sug_query:encodeURIComponent(n.dataDirect[0].value),sug_siteurl:encodeURIComponent(n.dataDirect[0].otherData.siteurl),sug_chufa:encodeURIComponent(n.dataDirect[0].otherData.hit_q),sug_inputT:n.directInputT||0,rsv_bp:n.bds.comm.ishome?0:1}),n.bds&&n.bds.comm&&n.bds.comm.username&&(e=(e=n.bds&&n.bds.util&&n.bds.util.domain&&n.bds.util.domain.get("http://api.open.baidu.com/new_hsug/data/write"))+"?query="+encodeURIComponent(n.dataDirect[0].value)+"&src=1&f=3&st="+(n.showsugstore?"1":"0"),$.ajax({dataType:"jsonp",scriptCharset:"utf-8",jsonp:"cb",timeout:6e3,url:e,success:function(){}})),n.index=-1,n.directSugSelected=!1):($.isFunction(n.submission)&&(i=n.submission.call(n.form,t),n.hideSug(),n.inputValue=n.value,n.dataCached={},n.clearStat()),i&&(t=n.newIpt?n.newIpt.textContent:n.ipt&&n.ipt.value,i=$("#kw").attr("placeholder")||$(".kw-placeholder").text(),t?(t=$.limitWd(t),n.value=n.inputValue=n.showValue=t,n.newIpt?n.newIpt.textContent=t:n.ipt.value=t):i&&(t=$.limitWd(i),$(".kw-placeholder").hide(),n.value=n.inputValue=n.showValue=t,n.newIpt?n.newIpt.textContent=t:n.ipt.value=t,n.addStat("rsv_dq",1)),n.form.submit(),n.blankHandle())),"_blank"!==$(n.form).attr("target")&&n.addStat("rsv_bp",1),n.removeStat("rsv_dq")},blankHandle:function(){var t=this;/12783|14655|14668/.test(t.bds.comm.sid)?setTimeout(function(){t.newIpt?t.newIpt.textContent="":t.ipt.value="",t.value=t.inputValue=t.showValue="",(navigator&&navigator.userAgent?navigator.userAgent:"").match(/(msie [2-8])/i)||$(t.ipt).focus()},25):/13488|14654|14667/.test(t.bds.comm.sid)&&setTimeout(function(){$(t.ipt).select()},25)},init:function(){var e=this;e.searchNewStyle=e.bds&&e.bds.comm&&e.bds.comm.sampleval&&-1<$.inArray("new_search_style",e.bds.comm.sampleval)||e.bds.comm.nodeSample&&-1<$.inArray("new_search_style",e.bds.comm.nodeSample),e.setAutocomplete("off"),e.setCurrentSugSample(),e.addStat("rsv_bp",e.rsv_bp),e.updateInitData("init"),e.bds.se.sugdnscached||($.ajax({type:"GET",dataType:"json","async":!0,url:e.buildUrl("","",!0),timeout:5e3,xhrFields:{withCredentials:!0},crossDomain:!0,success:function(t){}}),e.bds.se.sugdnscached=1);e.imt=new _ImeTrack.ImeTrack({iptId:"chat-textarea",adv:!0,innerchange:!1}),e.quickdelete=new _quickDelete.QuickDelete,e.ipt&&e.ipt.value&&e.quickdelete._show(),$(e.ipt).on("inputChange",function(t,e){e.prevQuery=e.queryValue,("search_sug_3-1"===e.currentSugSample||"search_sug_3-2"===e.currentSugSample)&&e.backFrame&&1===e.currentSearchStatus&&""===e.inputValue||(e.backFrame=!1),e.imt.triggerInputChange(t),e.ipt&&e.ipt.value?e.quickdelete._show():e.quickdelete._hide()}),$(e.ipt).on("blur",function(){e.backFrame=!1}),e.startCircle(),e.clearStat();var t=e.ipt;$(".chat-input-container").on("click.sug",function(){e.hasShown()||(e.onlyCache=!1,e.setupSug())}).on("mouseenter.sug",function(t){document.activeElement!==e.ipt&&(e.onlyCache=!0,e.setupSug())}),$(".chat-input-tool").on("click.sug",function(){e.hasShown()||(e.onlyCache=!1,e.setupSug())}),$(t).on("mousedown",function(){e.onlyCache=!1}).on("click",function(t){t.stopPropagation(),e.hasShown()||e.requesting||(e.onlyCache=!1,e.setupSug(),0===e.rsv_sug4&&(e.rsv_sug4=(new Date).getTime()))}).on("focus",function(){bds.comm.ishome||(e.onlyCache=!1,e.setupSug(),e.startCircle())}).on("keydown",function(t){t.stopPropagation(),e.startCircle(),t=t||window.event,0===e.inputT&&(e.inputT=(new Date).getTime()),0===e.rsv_sug4&&(e.rsv_sug4=(new Date).getTime()),9!==t.keyCode&&27!==t.keyCode||e.hideSug(),13===t.keyCode&&(e.addStat("rsv_sug2",0),bds.comm.ishome||(0,_ubcLog.sendIptLog)("enter"),e.isReturnSearch=!0,e.ipt&&e.ipt.value?e.quickdelete._show():e.quickdelete._hide()),86===t.keyCode&&t.ctrlKey&&e.addStat("rsv_n",2),e.sugcontainer&&e.visible?(38===t.keyCode&&(t.preventDefault(),e.pressUp()),40===t.keyCode&&(t.preventDefault(),e.pressDown())):e.sugcontainer||38!==t.keyCode&&40!==t.keyCode||(t.preventDefault(),e.request(e.value))}),this.onFormSubmit=this.onFormSubmit.bind(this),e.form&&$(e.form).on("submit",this.onFormSubmit)},onFormSubmit:function(t){var e=this;return e.bds&&e.bds.comm&&0===e.bds.comm.ishome&&e.addStat("oq",e.bds.comm.confirmQuery?xss(e.bds.comm.confirmQuery):""),e.bds&&e.bds.comm&&e.bds.comm.confirmQid&&e.addStat("rsv_pq",e.bds.comm.confirmQid),e.formSubmit(t),!1},outInterface:function(){var n,i=this;return{setVisibleSug:(n=$('<i class="c-icon c-icon-bear-round"></i>'),function(t){var e;for(n.remove(),e=0;e<i.dataArray.length;e++)if(i.dataArray[e].value===t){n.appendTo($(i.sugcontainer).find("li").eq(e));break}}),getStat:function(t){if(i.stat)return i.stat[t]},clearStat:function(){return i.clearStat()},setKey:function(t){i.ipt.value=i.value=i.inputValue=i.showValue=t},visible:function(){return i.visible},is_selecting:function(){return i.visible&&i.is_selecting},data:function(){return i.dataArray&&i.dataArray.length?$.grep(i.dataArray,function(t){return"direct"!==t.type}):[]},show:function(){return i.showSug()},hide:function(){return i.hideSug()},start:function(){return i.startCircle()},stop:function(){return i.stopCircle()},setMaxNum:function(t){return i.maxNum=t},check:function(){return i.check()},formSubmit:function(){return i.formSubmit()},updateInitData:function(){return i.updateInitData()},on:function(){$(i.ipt).on.apply($(i.ipt),arguments)},height:function(){return $(i.sugcontainer).height()},off:function(){$(i.ipt).off.apply($(i.ipt),arguments)},getRsvStatus:function(t){return i.getRsvStatus(t)},setCurrentSugSample:function(t){return i.setCurrentSugSample(t)},destroy:function(){return i.destroy()},closeSugUpdate:function(){i.shouldSugUpdate=!1}}},setCurrentSugSample:function(t){var e=this;bds.comm.sampleval;t&&t.length,e.currentSugSample="",e.prevQuery=e.query,e.requestQuery=[e.query],e.backDelete=!1,e.isAddQuery=!1,e.showRightContent=!1,e.isSugSample3=!1,e.isSugSample4=!1,e.isSugSample=!1},destroy:function(){var t=this;t.hideSug(!0),t.form&&$(t.form).off("submit",t.onFormSubmit),t.sugcontainer&&$(t.sugcontainer).off("click"),t.timer&&(clearTimeout(t.timer),t.timer=null);var e=$(".chat-input-container");e&&e.off(".sug");e=$(".chat-input-tool");e&&e.off(".sug"),t.ipt=null,t.form=null,t.sugcontainer=null,t.dataArray=[],t.dataDirect=[],t.reqValue="",t.inputValue="",t.showValue="",t.sugValue="",t.value="",t.index=-1,t.stat={}}},bdSug}Object.defineProperty(_exports,"__esModule",{value:!0}),_exports["default"]=initSug}.apply(exports,__WEBPACK_AMD_DEFINE_ARRAY__);__WEBPACK_AMD_DEFINE_RESULT__===undefined||(module.exports=__WEBPACK_AMD_DEFINE_RESULT__)},function(t,e,n){e=function(t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.bdsStore=function(){return e.se.store},t.checkHsugIn=function(t){if(window.__sample_hsug_length)return 4<=t.length||18<=encodeURIComponent(t).length;return 4<=t.length||18<=encodeURIComponent(t).length},t.checkHsugShow=function(t){return 1<=t.length&&3<encodeURIComponent(t).length};var e=window.bds||{};e.se=e.se||{},e.se.store=function(){var i,o={},e=window,t=e.document,r="localStorage",n="globalStorage",a="__storejs__";if(o.disabled=!1,o.set=function(t,e){},o.get=function(t){},o.remove=function(t){},o.clear=function(){},o.transact=function(t,e,n){var i=o.get(t);null==n&&(n=e,e=null),n(i=void 0===i?e||{}:i),o.set(t,i)},o.getAll=function(){},o.serialize=function(t){return String(t)},o.deserialize=function(t){return"string"!=typeof t?undefined:t},function(){try{return r in e&&e[r]}catch(t){return}}())i=e[r],o.set=function(t,e){if(e===undefined)return o.remove(t);i.setItem(t,o.serialize(e))},o.get=function(t){return o.deserialize(i.getItem(t))},o.remove=function(t){i.removeItem(t)},o.clear=function(){i.clear()},o.getAll=function(){for(var t={},e=0;e<i.length;++e){var n=i.key(e);t[n]=o.get(n)}return t};else if(function(){try{return n in e&&e[n]&&e[n][e.location.hostname]}catch(t){return}}())i=e[n][e.location.hostname],o.set=function(t,e){if(e===undefined)return o.remove(t);i[t]=o.serialize(e)},o.get=function(t){return o.deserialize(i[t]&&i[t].value)},o.remove=function(t){delete i[t]},o.clear=function(){for(var t in i)delete i[t]},o.getAll=function(){for(var t={},e=0;e<i.length;++e){var n=i.key(e);t[n]=o.get(n)}return t};else if(t.documentElement.addBehavior){var s,l,u=function u(e){return function(){var t=Array.prototype.slice.call(arguments,0);t.unshift(i),s.appendChild(i),i.addBehavior("#default#userData"),i.load(r);t=e.apply(o,t);return s.removeChild(i),t}},c=function c(t){return"_"+t};try{(l=new ActiveXObject("htmlfile")).open(),l.write("<script>document.w=window<\/script><iframe src='/favicon.ico'></iframe>"),l.close(),s=l.w.frames[0].document,i=s.createElement("div")}catch(p){i=t.createElement("div"),s=t.body}o.set=u(function(t,e,n){return e=c(e),n===undefined?o.remove(e):(t.setAttribute(e,o.serialize(n)),void t.save(r))}),o.get=u(function(t,e){return e=c(e),o.deserialize(t.getAttribute(e))}),o.remove=u(function(t,e){e=c(e),t.removeAttribute(e),t.save(r)}),o.clear=u(function(t){var e=t.XMLDocument.documentElement.attributes;t.load(r);for(var n,i=0;n=e[i];i++)t.removeAttribute(n.name);t.save(r)}),o.getAll=u(function(t){var e=t.XMLDocument.documentElement.attributes;t.load(r);for(var n,i={},a=0;n=e[a];++a)i[n]=o.get(n);return i})}try{o.set(a,a),o.get(a)!=a&&(o.disabled=!0),o.remove(a)}catch(p){o.disabled=!0}return o}()}.apply(e,[e]);e===undefined||(t.exports=e)},function(t,e,n){e=function(t){"use strict";function r(){return(r=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n,i=arguments[e];for(n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])}return t}).apply(this,arguments)}Object.defineProperty(t,"__esModule",{value:!0}),t.aiGuideShowSend=function(){var t=0<arguments.length&&arguments[0]!==undefined?arguments[0]:{};s("show","sug_ai_query",r({rsv_dl:l("rsv_dl")},t))},t.getQueryString=l,t.imgSugSend=function(t,e,n){var i=3<arguments.length&&arguments[3]!==undefined?arguments[3]:{};s(t,e?"sug_query":"his_query",r({query:e||"",sug_type:n,rsv_dl:l("rsv_dl")},i))},t.sendIptLog=function(t){var e="";{var n;"undefined"!=typeof document&&(n=document.getElementById("kw"),e=n?n.value:"")}s("click","search_kuang",{pos:t,query:e})},t.sendUbcLog=s,t.sugHisClickSend=function(t,e,n,i){var a=4<arguments.length&&arguments[4]!==undefined?arguments[4]:{},o=e?"sug_query":"his_board",n={query:n,rsv_dl:l("rsv_dl")};n[e?"sug_type":"his_type"]=i,s(t,o,r(n,a))},t.sugHisShowSend=function(t){var e=1<arguments.length&&arguments[1]!==undefined?arguments[1]:{};s("show",t,r({rsv_dl:l("rsv_dl")},e))};var a={version:"2.0",page:"undefined"!=typeof window&&window.bds&&window.bds.comm&&window.bds.comm.ishome?"home":"a",from:"search",queryParams:{appname:"pcsearch"}};function s(t){var e=1<arguments.length&&arguments[1]!==undefined?arguments[1]:"",n=2<arguments.length&&arguments[2]!==undefined?arguments[2]:{},i="18463";a.page=window.bds&&window.bds.comm&&window.bds.comm.ishome?"home":"a","function"==typeof window.ubc&&(window.ubc(i+".init",18463,a),window.ubc(i+".config",a),n={type:t,value:e,ext:r({qid:window.bds&&window.bds.comm&&window.bds.comm.qid||""},n)},window.bds&&window.bds.comm&&window.bds.comm.ishome?r(n.ext,{status:window.bds.comm.ishome?"default":"input"}):r(n.ext,{rsv_dl:l("rsv_dl")}),window.ubc(i+".event",n))}function l(t){if("undefined"==typeof window)return"";for(var e=window.location.search.substring(1).split("&"),n=0;n<e.length;n++){var i=e[n].split("=");if(decodeURIComponent(i[0])===t)return decodeURIComponent(i[1]||"")}return""}}.apply(e,[e]);e===undefined||(t.exports=e)},function(t,e,n){e=function(t){"use strict";function l(t){var e,n,i=0;return document.selection?(t.focus(),e=document.selection.createRange(),n=0,t&&t.value&&(n=t.value.length),e.moveStart("character",-n),i=e.text.length-1):!t.selectionStart&&"0"!==t.selectionStart||(i=t.selectionStart),i}Object.defineProperty(t,"__esModule",{value:!0}),t.ImeTrack=void 0,t.getCursortPosition=l;var e=(n.prototype={checkLog:function(t){for(var e=this.logs.length,n=!1;0<e;)-1!==this.logs[--e].type.indexOf("unval-")?(t.type=(-1===t.type.indexOf("unval-")?"":"unval-")+this.logs[e].type.replace("unval-","")+"-"+t.type.replace("unval-",""),this.logs[e]=t,n=!0):e=-2;if(n)return!1;for(;this.logs.length>=this.opts.logmaxnum;)this.logs.shift();return!0},analyseLog:function(){var e,t,n,i,a,o,r,s=this;0<this.logs.length&&-1===this.logs[this.logs.length-1].type.indexOf("unval")&&(e=function e(){if(s.opts.adv)for(var t=0;t<i.length;t++)256<i.charCodeAt(t)&&(o=i.substring(0,t+1),r=i.substring(t+1))},n=(t=this.logs[this.logs.length-1]).val.substring(0,t.start),i=t.val.substring(t.start,t.cursor),a=t.val.substring(t.cursor),r=o="",229===t.kd?256<i.charCodeAt(i.length-1)||!i.match(/[\x00-\x80]/g)?(this._keyposition=l(this.ipt),t.type+="-endime",0===i.length&&(t.type+="-cancelime")):(t.type+="-imeinput",e()):!(-1<t.type.indexOf("paste-mouse"))&&-1<t.type.indexOf("change-unkey")?0===i.length?(this._keyposition=l(this.ipt),1<this.logs.length&&-1<this.logs[this.logs.length-2].type.indexOf("upsave")&&(t.type+="-link")):256<i.charCodeAt(i.length-1)||!i.match(/[\x00-\x80]/g)?(this._keyposition=l(this.ipt),t.type+="-endime"):(t.type+="-imeinput",e()):this._keyposition=l(this.ipt),this.opts.adv&&(t.type+="-adv",t.strA=n,t.strB=i,t.strB1=o,t.strB2=r,t.strC=a),this.onLogChange&&this.onLogChange.call(this,t))},addLog:function(t){t.kd=this._kdcode,t.val=this.ipt.value||this.ipt.textContent,t.start=this._keyposition,t.cursor=l(this.ipt),t.type=t.type||0,t.time=(new Date).getTime(),0!==this.logs.length&&this.logs[this.logs.length-1].val===t.val&&-1===this.logs[this.logs.length-1].type.indexOf("unval-")&&-1===t.type.indexOf("unval-")||(this.checkLog(t)&&this.logs.push(t),this.analyseLog())},getLog:function(){return this.logs.slice(0)},triggerInputChange:function(t){this.inputchangeHandle(t)},diffLog:function(){for(var t=[],e=!1,n=0;n<this.logs.length;n++)if(0!==n){var i=this.logs[n];if(i.strB&&i.strA){if(0===i.strB.length&&i.strA.length<this.logs[n-1].strA.length){t=[];continue}if(-1<i.type.indexOf("link")||-1<i.type.indexOf("paste")){t=[];continue}}var a=i.time-this.logs[n-1].time;3e3<a&&(t=[]);var o=0,r=(i.val.match(/[^\x00-\x80]/g)||[]).length-(this.logs[n-1].val.match(/[^\x00-\x80]/g)||[]).length;0<r?o=1:r=(i.val.match(/[\x00-\x80]/g)||[]).length-(this.logs[n-1].val.match(/[\x00-\x80]/g)||[]).length,-1<i.type.indexOf("ime")?(o+=2,e=!0):-1<i.type.indexOf("unval")&&e?o+=2:e=!1,0<r&&t.push(o,r,a)}return t}},n);function n(t){var n=this;n.logs=[],n.opts=t||{},n.opts.logmaxnum=t.logmaxnum||10,n.opts.adv=t.adv||!1,this.onLogChange=t.onLogChange,n.opts.innerchange===undefined&&(n.opts.innerchange=!0),n.ipt=document.getElementById(n.opts.iptId),n._kdcode=0,n._kdevt={},n._keyposition=0,n.ipt&&(n.ipt.onkeydown=function(t){t=t||window.event;n._kdcode=t.keyCode||t.which,n._kdevt=t},n.ipt.onkeyup=function(t){t=t||window.event,t=t.keyCode||t.which,n.ipt.value,l(n.ipt);n._kdcode&&(n.addLog({ku:t,type:"upsave"}),n._kdcode=0,n._kdevt={},n.oldval=n.ipt.value||n.ipt.textContent)},n.ipt.onpaste=function(t){n._kdevt.ctrlKey?n.addLog({type:"unval-paste-key"}):n.addLog({type:"unval-paste-mouse"})},n.oldval=n.ipt.value||n.ipt.textContent||"",n.inputchangeHandle=function(t){var e;n._kdcode?n.addLog({type:"unval-change-key"}):(e="",n.logs.length&&(new Date).getTime()-function(){for(var t=n.logs.length-1;t<n.logs.length-1;t--)if(-1===n.logs[t].type.indexOf("unval-"))return n.logs[t].time;return 0}()<300&&(e="unval-"),n.addLog({type:e+"change-unkey"}))},n.timmer,n.opts.innerchange&&(n.ipt.onfocus=function(e){n.timmer=setInterval(function(){var t;t=e,n.ipt.value===n.oldval&&n.ipt.textContent===n.oldval||(n.oldval=n.ipt.value||n.ipt.textContent,n.inputchangeHandle(t))},200)},n.ipt.onblur=function(){clearInterval(n.timmer)}))}t.ImeTrack=e}.apply(e,[e]);e===undefined||(t.exports=e)},function(t,e,n){e=function(t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.QuickDelete=void 0,t.clearAllHistory=function(t){try{localStorage.removeItem("searchHistory"),t&&t(!0)}catch(e){console.error("清空历史记录失败:",e),t&&t(!1)}},t.getHistoryCount=function(){try{return JSON.parse(localStorage.getItem("searchHistory")||"[]").length}catch(t){return console.error("获取历史记录数量失败:",t),0}},t.quickDeleteHistory=function(e,t){if(e)try{var n=JSON.parse(localStorage.getItem("searchHistory")||"[]").filter(function(t){return t.query!==e});localStorage.setItem("searchHistory",JSON.stringify(n)),t&&t(!0)}catch(i){console.error("删除本地历史记录失败:",i),t&&t(!1)}else t&&t(!1)};var e=(n.prototype={constructor:n,_init:function(){this.quickdelete=$(".quickdelete"),this.quickdeleteline=$(".quickdelete-line"),this.ipt=$("#kw"),this._bind_event()},_hide:function(){this.quickdelete.hide(),this.quickdeleteline.hide()},_show:function(){this.quickdelete.show(),this.quickdeleteline.show()},_bind_event:function(){var t=this,e=t.ipt;t.quickdelete.on("click",function(){"function"==typeof window.sendIptLog&&window.sendIptLog("delete"),e.val("").focus(),t._hide(),"function"==typeof window.ns_c&&window.ns_c({fm:"behs",tab:"search-delete"})})}},n);function n(){this._init()}t.QuickDelete=e}.apply(e,[e]);e===undefined||(t.exports=e)},function(t,e,n){var i=n(2),a=[n(273)],o=n(82),r=n(83)["default"];t.exports=n(83),t.exports["default"]=i(r,o,a)},function(t,e,n){var i=n(274);(i="string"==typeof i?[[t.i,i,""]]:i).locals&&(t.exports=i.locals);(0,n(4)["default"])("a31e7fbe",i,!0,{runAsProduction:!0})},function(t,e,n){(e=n(3)(!1)).push([t.i,".ai-input-file-container_xRzHh {\n  margin-top: 9px;\n  margin-bottom: 9px;\n}\n@keyframes rotateForever_8KU3o {\n  from {\n    transform: rotate(0deg);\n  }\n  to {\n    transform: rotate(360deg);\n  }\n}\n.ai-input-file-container_xRzHh .ai-input-file-delete_1QD3M {\n  width: 15px;\n  height: 15px;\n  position: absolute;\n  top: -5px;\n  right: -5px;\n  display: none;\n}\n.ai-input-file-container_xRzHh .ai-input-file-delete_1QD3M .ai-input-file-delete-icon_BYYgo {\n  width: 100%;\n  height: 100%;\n}\n.ai-input-file-container_xRzHh .ai-input-file_2Kkhl {\n  position: relative;\n  width: 220px;\n  height: 60px;\n  display: flex;\n  flex-direction: row;\n  border-radius: 18px;\n  background-color: #F5F6FA;\n  padding: 12px;\n  box-sizing: border-box;\n  cursor: pointer;\n}\n.ai-input-file-container_xRzHh .ai-input-file_2Kkhl .ai-input-file-icon_1EiWJ {\n  width: 36px;\n  height: 36px;\n  border-radius: 9px;\n  margin-right: 9px;\n  position: relative;\n}\n.ai-input-file-container_xRzHh .ai-input-file_2Kkhl .ai-input-file-icon_1EiWJ .ai-input-file-icon-img_2Yzh9 {\n  border-radius: 9px;\n  border: 0.5px solid rgba(0, 0, 0, 0.1);\n  width: 100%;\n  height: 100%;\n}\n.ai-input-file-container_xRzHh .ai-input-file_2Kkhl .ai-input-file-content_2qNRC {\n  display: flex;\n  flex-direction: column;\n  justify-content: space-between;\n  align-items: flex-start;\n  height: 100%;\n  overflow: hidden;\n  flex: 1;\n  padding: 1.5px 0;\n  box-sizing: border-box;\n}\n.ai-input-file-container_xRzHh .ai-input-file_2Kkhl .ai-input-file-content_2qNRC .ai-input-file-name_1XHAS {\n  font-size: 12px;\n  line-height: 12px;\n  font-weight: 500;\n  width: 100%;\n  white-space: nowrap;\n  text-overflow: ellipsis;\n  overflow: hidden;\n}\n.ai-input-file-container_xRzHh .ai-input-file_2Kkhl .ai-input-file-content_2qNRC .ai-input-file-desc_au0OF {\n  font-size: 12px;\n  line-height: 12px;\n  font-weight: 400;\n  width: 100%;\n}\n.ai-input-file-container_xRzHh .ai-input-file_2Kkhl .ai-input-file-content_2qNRC .ai-input-file-desc-success_FJnRM {\n  display: flex;\n}\n.ai-input-file-container_xRzHh .ai-input-file_2Kkhl .ai-input-file-content_2qNRC .ai-input-file-desc-success-name_3OBQf {\n  margin-right: 6px;\n  flex: 0 1 auto;\n}\n.ai-input-file-container_xRzHh .ai-input-file_2Kkhl .ai-input-file-content_2qNRC .ai-input-file-desc-success-size_3HQAA {\n  flex: 1;\n}\n.ai-input-file-container_xRzHh .ai-input-file_2Kkhl:hover {\n  background: linear-gradient(0deg, rgba(0, 0, 0, 0.03) 0%, rgba(0, 0, 0, 0.03) 100%), #F5F6FA;\n}\n.ai-input-file-container_xRzHh .ai-input-file_2Kkhl:hover .ai-input-file-delete_1QD3M {\n  display: flex;\n}\n.ai-input-file-container_xRzHh .ai-input-file-uploading_O0X8a .ai-input-file-icon-loading_3AzB0 {\n  position: absolute;\n  top: 10px;\n  left: 10px;\n  width: 16px;\n  height: 16px;\n  animation: rotateForever_8KU3o 1s linear infinite;\n}\n.ai-input-file-container_xRzHh .ai-input-file-failed_2Ksz6 .ai-input-file-content_2qNRC {\n  color: #848691;\n}\n.ai-input-file-container_xRzHh .ai-input-image_3h1_T {\n  position: relative;\n  width: 60px;\n  height: 60px;\n  display: flex;\n  flex-direction: row;\n  border-radius: 18px;\n  cursor: pointer;\n}\n.ai-input-file-container_xRzHh .ai-input-image_3h1_T .ai-input-image-bg_1v9Q6 {\n  object-fit: cover;\n  border-radius: 18px;\n  min-width: 100%;\n}\n.ai-input-file-container_xRzHh .ai-input-image_3h1_T:hover .ai-input-file-delete_1QD3M {\n  display: flex;\n}\n.ai-input-file-container_xRzHh .ai-input-image-uploading_2oUyk .ai-input-file-icon-loading_3AzB0 {\n  position: absolute;\n  top: 18px;\n  left: 18px;\n  width: 24px;\n  height: 24px;\n  animation: rotateForever_8KU3o 1s linear infinite;\n}\n",""]),e.locals={"ai-input-file-container":"ai-input-file-container_xRzHh",aiInputFileContainer:"ai-input-file-container_xRzHh","ai-input-file-delete":"ai-input-file-delete_1QD3M",aiInputFileDelete:"ai-input-file-delete_1QD3M","ai-input-file-delete-icon":"ai-input-file-delete-icon_BYYgo",aiInputFileDeleteIcon:"ai-input-file-delete-icon_BYYgo","ai-input-file":"ai-input-file_2Kkhl",aiInputFile:"ai-input-file_2Kkhl","ai-input-file-icon":"ai-input-file-icon_1EiWJ",aiInputFileIcon:"ai-input-file-icon_1EiWJ","ai-input-file-icon-img":"ai-input-file-icon-img_2Yzh9",aiInputFileIconImg:"ai-input-file-icon-img_2Yzh9","ai-input-file-content":"ai-input-file-content_2qNRC",aiInputFileContent:"ai-input-file-content_2qNRC","ai-input-file-name":"ai-input-file-name_1XHAS",aiInputFileName:"ai-input-file-name_1XHAS","ai-input-file-desc":"ai-input-file-desc_au0OF",aiInputFileDesc:"ai-input-file-desc_au0OF","ai-input-file-desc-success":"ai-input-file-desc-success_FJnRM",aiInputFileDescSuccess:"ai-input-file-desc-success_FJnRM","ai-input-file-desc-success-name":"ai-input-file-desc-success-name_3OBQf",aiInputFileDescSuccessName:"ai-input-file-desc-success-name_3OBQf","ai-input-file-desc-success-size":"ai-input-file-desc-success-size_3HQAA",aiInputFileDescSuccessSize:"ai-input-file-desc-success-size_3HQAA","ai-input-file-uploading":"ai-input-file-uploading_O0X8a",aiInputFileUploading:"ai-input-file-uploading_O0X8a","ai-input-file-icon-loading":"ai-input-file-icon-loading_3AzB0",aiInputFileIconLoading:"ai-input-file-icon-loading_3AzB0",rotateForever:"rotateForever_8KU3o","ai-input-file-failed":"ai-input-file-failed_2Ksz6",aiInputFileFailed:"ai-input-file-failed_2Ksz6","ai-input-image":"ai-input-image_3h1_T",aiInputImage:"ai-input-image_3h1_T","ai-input-image-bg":"ai-input-image-bg_1v9Q6",aiInputImageBg:"ai-input-image-bg_1v9Q6","ai-input-image-uploading":"ai-input-image-uploading_2oUyk",aiInputImageUploading:"ai-input-image-uploading_2oUyk"},t.exports=e},function(t,e,n){var i=n(2),a=[n(276)],o=n(84),r=n(85)["default"];t.exports=n(85),t.exports["default"]=i(r,o,a)},function(t,e,n){var i=n(277);(i="string"==typeof i?[[t.i,i,""]]:i).locals&&(t.exports=i.locals);(0,n(4)["default"])("43cd0966",i,!0,{runAsProduction:!0})},function(t,e,n){(e=n(3)(!1)).push([t.i,'.panel_2vfwX {\n  position: relative;\n  cursor: pointer;\n  border-radius: 12px;\n  height: 40px;\n  box-sizing: border-box;\n  flex-grow: 1;\n  flex-shrink: 0;\n  background: linear-gradient(to right, #F2F7FF, #F2F0FF);\n  display: flex;\n  justify-content: center;\n  align-items: center;\n  font-size: 14px;\n  font-weight: 500;\n  color: #333333;\n}\n.panel-guide_1OQr9:before {\n  content: "";\n  position: absolute;\n  top: -1px;\n  right: -1px;\n  width: 7px;\n  height: 7px;\n  background-color: #F73131;\n  border-radius: 50px;\n  box-shadow: 0px 1.56px 7.78px 0px #FF274B4D;\n}\n.panel_2vfwX img {\n  height: 16px;\n  width: 16px;\n  margin-right: 6px;\n}\n.panel_2vfwX:hover {\n  color: #4E6EF2;\n  background: #eff2fe;\n}\n.panel_2vfwX:hover img:not(.search_icon_1oYvb) {\n  filter: brightness(0) saturate(100%) invert(35%) sepia(77%) saturate(2345%) hue-rotate(218deg) brightness(103%) contrast(99%);\n}\n.panel_2vfwX .panel-link_1IIS3 {\n  display: flex;\n  align-items: center;\n  color: inherit;\n  justify-content: center;\n  width: 100%;\n  height: 100%;\n}\n.panel_2vfwX .panel-link_1IIS3:hover {\n  text-decoration: none;\n  background: transparent;\n  color: inherit;\n}\n.panel_2vfwX .panel-link_1IIS3:active,\n.panel_2vfwX .panel-link_1IIS3:visited {\n  text-decoration: none;\n  color: unset;\n}\n.panel_2vfwX .new_search_guide_bub_container_EUWhk {\n  width: 100%;\n  height: 100%;\n  border-radius: 12px;\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  background: linear-gradient(95.84deg, #EDF6FF 5.59%, #F0F3FF 51.42%, #F5F0FF 97.24%);\n  background-color: #fff;\n}\n.panel_2vfwX .new_search_guide_bub_container_EUWhk:hover {\n  text-decoration: none;\n  background: transparent;\n}\n.panel_2vfwX .new_search_guide_bub_container_EUWhk:hover .new_search_guide_bub_container_center_1OCA8 .pure-text_1QMPs {\n  color: #4E6EF2;\n  background: unset;\n  -webkit-background-clip: unset;\n  background-clip: unset;\n  -webkit-text-fill-color: unset;\n}\n.panel_2vfwX .new_search_guide_bub_container_EUWhk:active,\n.panel_2vfwX .new_search_guide_bub_container_EUWhk:visited {\n  text-decoration: none;\n  color: unset;\n}\n.panel_2vfwX .new_search_guide_bub_container_EUWhk .new_search_guide_bub_container_left_HTM3d {\n  position: relative;\n}\n.panel_2vfwX .new_search_guide_bub_container_EUWhk .new_search_guide_bub_container_left_HTM3d .search_icon_1oYvb {\n  width: 58px;\n  height: 14px;\n  display: block;\n}\n.panel_2vfwX .new_search_guide_bub_container_EUWhk .new_search_guide_bub_container_center_1OCA8 {\n  font-family: PingFang SC;\n  font-size: 14px;\n  font-weight: 500;\n  letter-spacing: 0.06em;\n  text-align: left;\n  line-height: 20px;\n  background: linear-gradient(90deg, #2867FA 0%, #873CFF 100%);\n  -webkit-background-clip: text;\n  background-clip: text;\n  -webkit-text-fill-color: transparent;\n  color: transparent;\n}\n.panel_2vfwX .new_search_guide_bub_container_EUWhk .new_search_guide_bub_container_center_1OCA8 .emoji_1WJ1Q {\n  color: #333;\n  -webkit-text-fill-color: #333;\n}\n',""]),e.locals={panel:"panel_2vfwX","panel-guide":"panel-guide_1OQr9",panelGuide:"panel-guide_1OQr9",search_icon:"search_icon_1oYvb",searchIcon:"search_icon_1oYvb","panel-link":"panel-link_1IIS3",panelLink:"panel-link_1IIS3",new_search_guide_bub_container:"new_search_guide_bub_container_EUWhk",newSearchGuideBubContainer:"new_search_guide_bub_container_EUWhk",new_search_guide_bub_container_center:"new_search_guide_bub_container_center_1OCA8",newSearchGuideBubContainerCenter:"new_search_guide_bub_container_center_1OCA8","pure-text":"pure-text_1QMPs",pureText:"pure-text_1QMPs",new_search_guide_bub_container_left:"new_search_guide_bub_container_left_HTM3d",newSearchGuideBubContainerLeft:"new_search_guide_bub_container_left_HTM3d",emoji:"emoji_1WJ1Q"},t.exports=e},function(t,e,n){var i=n(2),a=[n(279)],o=n(86),r=n(87)["default"];t.exports=n(87),t.exports["default"]=i(r,o,a)},function(t,e,n){var i=n(280);(i="string"==typeof i?[[t.i,i,""]]:i).locals&&(t.exports=i.locals);(0,n(4)["default"])("f72a6ad4",i,!0,{runAsProduction:!0})},function(t,e,n){(e=n(3)(!1)).push([t.i,".tooltip-wrapper_1paL6 {\n  position: relative;\n  cursor: pointer;\n}\n.tooltip-wrapper_1paL6:hover .tooltip_3tG1Z {\n  opacity: 1;\n}\n.tooltip-wrapper_1paL6.anchor-center_ZAuUP .tooltip_3tG1Z {\n  left: 50%;\n  transform: translateX(-50%);\n}\n.tooltip-wrapper_1paL6.anchor-center_ZAuUP .tooltip_3tG1Z:before {\n  left: 50%;\n  margin-left: -6px;\n}\n.tooltip-wrapper_1paL6.anchor-left_2rMNl .tooltip_3tG1Z {\n  left: 0;\n}\n.tooltip-wrapper_1paL6.anchor-left_2rMNl .tooltip_3tG1Z:before {\n  left: 16px;\n}\n.tooltip-wrapper_1paL6.anchor-right_2AGkY .tooltip_3tG1Z {\n  right: -5px;\n}\n.tooltip-wrapper_1paL6.anchor-right_2AGkY .tooltip_3tG1Z:before {\n  right: 10px;\n}\n.tooltip-wrapper_1paL6 .tooltip_3tG1Z {\n  background-color: #fff;\n  color: #333;\n  box-sizing: border-box;\n  display: inline-block;\n  max-width: 280px;\n  width: max-content;\n  min-width: fit-content;\n  font-size: 14px;\n  text-align: left;\n  padding: 9px 12px;\n  border-radius: 12px;\n  position: absolute;\n  z-index: 1;\n  top: 35px;\n  opacity: 0;\n  transition: opacity 0.2s;\n  box-shadow: 0 6px 21px 0 rgba(30, 31, 36, 0.2);\n}\n.tooltip-wrapper_1paL6 .tooltip_3tG1Z:before {\n  content: '';\n  position: absolute;\n  top: -6px;\n  width: 0;\n  height: 0;\n  border-left: 6px solid transparent;\n  border-right: 6px solid transparent;\n  border-bottom: 6px solid #fff;\n}\n",""]),e.locals={"tooltip-wrapper":"tooltip-wrapper_1paL6",tooltipWrapper:"tooltip-wrapper_1paL6",tooltip:"tooltip_3tG1Z","anchor-center":"anchor-center_ZAuUP",anchorCenter:"anchor-center_ZAuUP","anchor-left":"anchor-left_2rMNl",anchorLeft:"anchor-left_2rMNl","anchor-right":"anchor-right_2AGkY",anchorRight:"anchor-right_2AGkY"},t.exports=e},function(t,e,n){var i=n(2),a=[n(282)],o=n(88),r=n(89)["default"];t.exports=n(89),t.exports["default"]=i(r,o,a)},function(t,e,n){var i=n(283);(i="string"==typeof i?[[t.i,i,""]]:i).locals&&(t.exports=i.locals);(0,n(4)["default"])("85324b30",i,!0,{runAsProduction:!0})},function(t,e,n){(e=n(3)(!1)).push([t.i,".toast-root_1ZTPr {\n  align-items: center;\n  background-color: #fff;\n  border-radius: 12px;\n  box-shadow: 0 6px 21px 0 #1e1f2433;\n  box-sizing: border-box;\n  color: #333;\n  display: flex;\n  height: 42px;\n  top: 15px;\n  left: 50%;\n  opacity: 0;\n  padding: 12px 15px;\n  pointer-events: none;\n  position: fixed;\n  text-align: center;\n  transform: translate(-50%);\n  transition: top 0.3s ease, opacity 0.16s ease;\n  z-index: 902;\n}\n.toast-root-view_28aig {\n  opacity: 1;\n}\n.toast-content_14k2i {\n  flex-shrink: 0;\n  text-align: center;\n  font-size: 16px;\n  line-height: 23px;\n  margin: 3px 0;\n}\n",""]),e.locals={"toast-root":"toast-root_1ZTPr",toastRoot:"toast-root_1ZTPr","toast-root-view":"toast-root-view_28aig",toastRootView:"toast-root-view_28aig","toast-content":"toast-content_14k2i",toastContent:"toast-content_14k2i"},t.exports=e},function(t,e,n){var i=n(2),a=[n(285)],o=n(90),r=n(91)["default"];t.exports=n(91),t.exports["default"]=i(r,o,a)},function(t,e,n){var i=n(286);(i="string"==typeof i?[[t.i,i,""]]:i).locals&&(t.exports=i.locals);(0,n(4)["default"])("4c5469f6",i,!0,{runAsProduction:!0})},function(t,e,n){(e=n(3)(!1)).push([t.i,".animation-video_1b2M9 {\n  height: 300%;\n  width: 145%;\n  position: absolute;\n  top: -94px;\n  left: -162px;\n  filter: blur(10px);\n  z-index: -1;\n}\n.animation-video_1b2M9 .gif-canvas_1600e {\n  height: 100%;\n  width: 100%;\n  position: absolute;\n  left: 0;\n  top: 0;\n}\n",""]),e.locals={"animation-video":"animation-video_1b2M9",animationVideo:"animation-video_1b2M9","gif-canvas":"gif-canvas_1600e",gifCanvas:"gif-canvas_1600e"},t.exports=e}],b={},d.m=a,d.c=b,d.d=function(t,e,n){d.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},d.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},d.t=function(e,t){if(1&t&&(e=d(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(d.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)d.d(n,i,function(t){return e[t]}.bind(null,i));return n},d.n=function(t){var e=t&&t.__esModule?function(){return t["default"]}:function(){return t};return d.d(e,"a",e),e},d.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},d.p="https://pss.bdstatic.com",d(d.s=229);function d(t){if(b[t])return b[t].exports;var e=b[t]={i:t,l:!1,exports:{}};return a[t].call(e.exports,e,e.exports,d),e.l=!0,e.exports}var a,b});</script><script>define("@baidu/guarantee-popper/index",["exports"],function(e){"use strict";function t(e,t){return e(t={exports:{}},t.exports),t.exports}function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e
DesignScreenshot/output/test_run/baidu_test.html:4784:}function h(){if(y){var o="getAllResponseHeaders"in y?s(y.getAllResponseHeaders()):null,i={data:b&&"text"!==b&&"json"!==b?y.response:y.responseText,status:y.status,statusText:y.statusText,headers:o,config:e,request:y};r(function(e){t(e),d()},function(e){n(e),d()},i),y=null}}var g,m=e.data,v=e.headers,b=e.responseType;o.isFormData(m)&&delete v["Content-Type"];var y=new XMLHttpRequest;if(e.auth){var w=e.auth.username||"",x=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";v.Authorization="Basic "+btoa(w+":"+x)
DesignScreenshot/output/test_run/baidu_test.html:7871:return e&&e.prototype===t},Me={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0,$width:!0,$height:!0,$top:!0,$localStorage:!0},Ie=function(){if("undefined"==typeof window)return!1;for(var t in window)try{!Me["$"+t]&&G(window,t)&&null!==window[t]&&"object"==typeof window[t]&&Ee(window[t])
DesignScreenshot/output/test_run/baidu_test.html:8044:}!function(){function getUA(){var e,t={},n=navigator.userAgent.toLowerCase();return t.mac=navigator.platform.toUpperCase().indexOf("MAC")>=0,(e=n.match(/rv:([\d.]+)\) like gecko/))?t.ie=e[1]:(e=n.match(/(msie\s|trident.*rv:)([\w.]+)/))?t.ie=e[2]:(e=n.match(/firefox\/([\d.]+)/))?t.firefox=e[1]:(e=n.match(/chrome\/([\d.]+)/))?t.chrome=e[1]:(e=n.match(/opera.([\d.]+)/))?t.opera=e[1]:(e=n.match(/version\/([\d.]+).*safari/))?t.safari=e[1]:0,t}function getDefaultQueryHis(){try{return JSON.parse(localStorage.getItem("index_ls_default_query"))
DesignScreenshot/output/test_run/baidu_test.html:8046:}),e.on("keydown keyup cut paste setValue input",checkInputValue)}}function checkInputValue(){var e=$input.val();setTimeout(function(){var t=$input.val();(t!==e||t.length>0)&&$(".kw-placeholder").toggleClass("placeholders-hidden",t.length>0)},0)}function removePlaceHolder(e,t){t?e.removeAttr("placeholder"):$(".kw-placeholder").remove()}function testLocalStorage(){var e="test";try{return localStorage.setItem(e,e),localStorage.removeItem(e),!0}catch(t){return!1}}function getShowCount(e,t){var n=0;return t&&t.query&&t.query===e&&t.count&&(n=t.count),n
DesignScreenshot/output/test_run/baidu_test.html:8047:}function recordDefaultQuery(e,t){var n={query:e,time:(new Date).getTime(),count:1};t&&t.query&&e===t.query&&t.count&&(n.count=t.count+1),setTimeout(function(){try{localStorage.removeItem("index_ls_default_query"),localStorage.setItem("index_ls_default_query",JSON.stringify(n))}catch(e){return!1}},0)}function jsonPolyfill(){var json={parse:function(sJSON){return eval("("+sJSON+")")},stringify:function(){var e=Object.prototype.toString,t=Object.prototype.hasOwnProperty,n=Array.isArray||function(t){return"[object Array]"===e.call(t)
DesignScreenshot/output/test_run/baidu_test.html:8119:t.__esModule=!0,t.SpyCacheService=void 0,o=n.__importDefault(o);var s=function(){function e(e){var n=this;this.query=e;try{localStorage.removeItem("SpyLocalCache")}catch(i){}this.spyCache=new o["default"]({maxRecordLen:150,onFlush:t.getFlushFun(),storage:"localstorage",costTime:t.costTime,key:"pcSpyLocalCache",compress:"no"}),window.onbeforeunload=function(){n.spyCache.save()}}t=e,e.getFlushFun=function(){function e(e){var t=bds.comm.ishome?"1_79":"1_87",n="https://sp1.baidu.com/5b1ZeDe5KgQFm2e88IuM_a/mwb2.gif?pid="+t+"&type=except&group=localcache",i=JSON.stringify({pid:t,type:"except",group:"localcache",ts:Date.now(),lid:e[0].qid,info:{msg:"webb sdk localcache",pageUrl:location.href,log:JSON.stringify(e)}});
DesignScreenshot/output/test_run/baidu_test.html:8136:return t||Math.random()<e},e.sendLsInfo=function(){t.shouldSend(.001)&&window.requestIdleCallback&&window.requestIdleCallback(function(){var e=t.getLsLen(),n=e.totalLen,i=e.spyLen,o=500*parseInt((parseInt(n,10)/500).toFixed(0),10),r=t.getLsMaxLen(o);a.send({info:{lsMaxLen:r,totalLen:n,spyLen:i},group:"lsInfo",dim:{}},"pf_comm")})},e.getLsMaxLen=function(e){if(localStorage&&!localStorage.getItem("size")){var t=0;try{for(t=500;1e4>=t;t+=500)localStorage.setItem("test",new Array(1024*t+1).join("a"))
DesignScreenshot/output/test_run/baidu_test.html:8137:}catch(n){localStorage.removeItem("test"),localStorage.setItem("size",(e+t-500).toString())}}return localStorage.getItem("size")},e.getLsLen=function(){var e=0,n=0,i=0;for(var o in localStorage)localStorage.hasOwnProperty(o)&&(o.indexOf("SpyLocalCache")>-1&&(i+=t.getBytesCount(localStorage[o])+t.getBytesCount(o)),n=t.getBytesCount(localStorage[o])+t.getBytesCount(o),e+=n);return{totalLen:(e/1024).toFixed(2),spyLen:(i/1024).toFixed(2)}},e.getBytesCount=function(e,t){void 0===t&&(t="");var n=0,i=0,o=t.toLowerCase();
DesignScreenshot/output/test_run/baidu_test.html:8157:if(!(this.pcSelectAISearch<=0)){try{var t="true"===localStorage.getItem(this.IS_SELECT_AI_GUIDE);if(t)return}catch(n){return}if(!$("#con-at").get(0)&&!$("#top-ad").get(0)){var i=$("#content_left"),o=$("#1");if(o.length||i.length){var r=1===this.pcSelectAISearch?"https://psstatic.cdn.bcebos.com/basics/aichat/selected-search-guide-img_1755153246000.png":"https://psstatic.cdn.bcebos.com/basics/aichat/selected-search-guide-img-two_1755237974000.png",a=$('\n            <div class="select-search-ai-guide">\n                <div class="selected-search-guide-title">\n                    划选文本唤起更多功能\n                    <i class="selected-search-guide-close-icon">&#xe696;</i>\n                </div>\n                <img\n                    class="selected-search-guide-img"\n                    src="'+r+'"\n                    alt=""\n                />\n            </div>').css({position:"absolute",left:"calc(100% + 30px)"});
DesignScreenshot/output/test_run/baidu_test.html:8158:i.css("position","relative").append(a),$(".selected-search-guide-close-icon").on("click",function(){e.closeGuide("close_clk")});try{localStorage.setItem(this.IS_SELECT_AI_GUIDE,"true")}catch(s){}setTimeout(function(){e.closeGuide("show_5s")},5e3),this.sendGuideLog("show","choose_pop_guide")}}}},e.prototype.closeGuide=function(e){var t=$(".select-search-ai-guide");t.length&&t.is(":visible")&&(t.hide(),this.sendGuideLog("click","choose_pop_guide_close",e))},e.prototype.mouseupAction=function(e){try{var t=this.getSelectionContent(),n=t.selectedText,i=t.rangePos,o=this.calculateStr(n),r={top:e.pageY,left:e.pageX};
DesignScreenshot/output/test_run/baidu_test.html:8184:return n.__generator(this,function(){if(e=this.invokeService.getOneInvokeInfo(8),t=parseInt(localStorage.getItem("mcpTipBoxShowTime")||"0",10),(new Date).getTime()>t&&this.invokeService.hitMcp(8)&&e&&e.ext)try{i=JSON.parse(e.ext),o=+i.waitTime||3,setTimeout(function(){r.isInteract()||r.tipbox.showTipBox(i)},1e3*o)}catch(n){}return[2]})})},e.prototype.showBanner=function(){var e=document.querySelector(".bds-lead-ipad"),t=this.invokeService.getOneInvokeInfo(10);if(e&&t&&t.ext)try{var n=JSON.parse(t.ext);
DesignScreenshot/output/test_run/baidu_test.html:8524:}function o(e){if(window.localStorage){var t=l.get(),i=!!$(e).attr("data-safe-icon-run");return(t.split(",").length<2||-1!==t.indexOf(n()))&&!i}return!0}function r(e){if(!o(e))return!1;$(e).attr("data-safe-icon-run",!0),$(e).attr("hint-type","anim-newBao");var t=$(e),i=$($(e).parents("div.result.c-container")),r=i.attr("data-click"),a=r?r.replace("safe","ani-safe"):"";setTimeout(function(){t.addClass("animate"),i.attr("data-click",a),t.one("animationend",function(){t.removeClass("animate"),setTimeout(function(){t.addClass("animate"),$(e).attr("hint-type","newBao"),t.one("animationend",function(){i.attr("data-click",r)
DesignScreenshot/output/test_run/baidu_test.html:8525:})},1e3)})},1e3),ns_c_pj({qid:bds.comm.qid||""},"pj=animaBao&"),l.set(n()+"~"+ +new Date)}function a(e){var t=function(){return window.localStorage&&window.localStorage.getItem(e)?window.localStorage.getItem(e):""},n=function(n){if(window.localStorage){var i=t();return""===n?(window.localStorage.setItem(e,n),!0):2===i.split(",").length||-1!==i.indexOf(n.split("~")[0])?!1:(n=i?i+","+String(n):String(n),window.localStorage.setItem(e,n),!0)}return!0},i=function(){var e=t();+new Date-+e.split(",")[0].split("~").pop()>=u&&n("")
DesignScreenshot/output/test_run/baidu_test.html:8576:for(var t=0;t<e.length&&!(this.sendNum>10);t++){var n=e[t],i=n.getAttribute("data-cv");if(i){var o=i.split("_"),r="0";if(2!==o.length&&3!==o.length)continue;3===o.length&&(r=o.shift()||"",i=o.join("_")),e[t].removeAttribute("data-cv"),this.send(i,+r)}}},e.prototype.initStorage=function(){var e={enabled:!0};try{localStorage.setItem("_t","1"),localStorage.removeItem("_t")}catch(t){e.enabled=!1}return e.enabled?localStorage:{enabled:!1,storgae:{},setItem:function(e,t){this.storgae[e]=t},getItem:function(e){return this.storgae[e]
DesignScreenshot/output/test_run/baidu_test.html:8593:var t=Date.now();if(!Mh[Uh])if(Mh.length>=5){var n=Object.keys(Mh).reduce(function(e,t){return"length"!==Mh[t]&&Mh[t].time<=e.time?{time:Mh[t].time,path:t}:e},{time:t,path:""}).path;delete Mh[n]}else Mh.length++;Mh[Uh]={list:e,time:t},localStorage.setItem("RETRY_LOG_LIST",JSON.stringify(Mh))}function D(){var e;Ph||(Ph=!0,Uh=location.origin+location.pathname);try{Mh=JSON.parse(localStorage.getItem("RETRY_LOG_LIST"))||{length:0}}catch(e){Mh={length:0}}return(null===(e=Mh[Uh])||void 0===e?void 0:e.list)||[]
DesignScreenshot/output/test_run/baidu_test.html:8747:if(this.retryLogList.set(i,{url:t,loggerData:n,loggerId:i,failTimes:1,sendCountDown:this._getDelayTime(1)}),this.retryLogList.size>this.retryLogListMax){var o=this.retryLogList.keys().next().value;this.retryLogList.delete(o)}this.active(),R(Array.from(this.retryLogList))}},{key:"removeLog",value:function(e){e&&this.retryLogList.delete(e)&&(0===this.retryLogList.size?(Ph||D(),Mh[Uh]&&(delete Mh[Uh],Mh.length--),localStorage.setItem("RETRY_LOG_LIST",JSON.stringify(Mh))):R(this.retryLogList))}},{key:"updateLog",value:function(e){if(e){var t=this.retryLogList.get(e);
DesignScreenshot/output/test_run/baidu_test.html:8818:};var i=encodeURIComponent(JSON.stringify({data:e}));ft("baiduboxapp://v19/utils/setClipboardData?params=".concat(i,"&callback=_naCopyCb_"),"baiduboxapp")})},Xm=function(e){return Lt(500,Ym,e)};window.__UIA_VERSION__="2.4.7";var Zm=n(function(e,t){!function(n){function i(e){if(e=e||("undefined"!=typeof localStorage?localStorage:null),!e)throw new Error("ExpiredStorage: No storage base class provided and 'localStorage' is undefined! Please provide a valid base storage class.");if(!(e.setItem&&e.getItem&&e.removeItem&&e.clear))throw new Error("ExpiredStorage: Storage class  don't support one or more of the required API functions: getItem, setItem, removeItem or clear.");
DesignScreenshot/output/test_run/baidu_test.html:8842:}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},b=function(){function e(e,t){this.data=e,this.weight=t}return e.prototype.preOrder=function(e){e.push(this),this.left&&this.left.preOrder(e),this.right&&this.right.preOrder(e)},e}(),y=function(){function e(){}return e.prototype.set=function(){},e.prototype.get=function(){},e.prototype.rm=function(){},e}(),w=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return e(n,t),n.isSupport=function(){return!!window.localStorage
DesignScreenshot/output/test_run/baidu_test.html:8843:},n.prototype.set=function(e,t){try{localStorage.setItem(e,t)}catch(n){console.error(n)}},n.prototype.get=function(e,t){var n=null;try{n=localStorage.getItem(e)}catch(i){console.error(i)}t&&t(n)},n.prototype.rm=function(e){try{localStorage.removeItem(e)}catch(t){console.error(t)}},n}(y),_=function(t){function n(){var e=t.call(this)||this;e.databaseName="spyLC",e.db=null,e.setQueue=[],e.getQueue=[];var n=window.indexedDB.open(e.databaseName);return n.onupgradeneeded=function(t){e.db=t.target&&t.target.result,e.db&&!e.db.objectStoreNames.contains(e.databaseName)&&e.db.createObjectStore(e.databaseName,{keyPath:"key"}),e.runQueueTask()
DesignScreenshot/output/test_run/baidu_test.html:9064:}(),Y=function(){function e(e,t,n,i,o){var r=this;this.observer=null,this.document=document,this.ls=e,this.logServe=t,this.require=n,this.contentRight=$("#content_right"),this.sampleServ=i,this.userInfo=o,this.UPS=window.UPS,this.shouldBlockTts()?($("body").removeClass("open-result-tts"),localStorage.setItem("set_result_tts","close")):(this.initAClick(!0),this.require(["@baidu/pc-tts-player"],function(e){var t,n=null===(t=r.contentRight.offset())||void 0===t?void 0:t.left,i=n?"".concat(n,"px"):"870px";
DesignScreenshot/output/test_run/baidu_test.html:9084:t.__esModule=!0,t.PageModule=void 0;var v=function(){function e(){this.container=new n.Container,this.resultDI=this.container.createChildContainer();var e=this.container;e.addValue(i.DOCUMENT_TOKEN,document),e.addValue(i.PERFORMANCE_TOKEN,window.performance),e.addValue(i.LOCAL_STORAGE_TOKEN,window.localStorage),e.addValue(i.NAVIGATOR_TOKEN,window.navigator),e.addValue(i.REQUIRE_TOKEN,window.require),e.addValue(i.PERF_SYNC_DATA_TOKEN,window.__perf_www_datas),e.addFactory(i.SCOPE_TOKEN,i.scopeFactory({root:document.body}),[]),e.addService(i.Log),e.addService(i.AlaLog),e.addService(i.MidLog),e.addService(i.UbcLog),e.addService(i.Cookie),e.addValue(i.WebbConfig,i.webbConfigValue),e.addService(i.WebbInstance),e.addService(i.Query),e.addService(i.Device),e.addService(i.CodeCover),e.addService(i.Sample),e.addService(i.HttpsDomain),e.addService(i.User),e.addService(d.PeakStyle),e.addService(u.HeadGradient),e.addService(l.IsuiHeadFixed),e.addService(i.Conf),e.addService(p.OutlineSafari),e.addService(o.SpyCacheService),e.addService(i.EventEmitter),e.addService(i.InvokeService),e.addService(i.XPath),e.addService(i.AladdinUtils),e.addService(f.UtilsService),this.queryService=e.create(i.Query),this.deviceService=e.create(i.Device),this.codeCoverService=e.create(i.CodeCover),this.sampleService=e.create(i.Sample),this.userService=e.create(i.User),this.peakStyleService=e.create(d.PeakStyle),this.headGradientService=e.create(u.HeadGradient),this.isuiHeadFixedService=e.create(l.IsuiHeadFixed),this.utilsService=e.create(f.UtilsService),this.conf=e.create(i.Conf),e.create(p.OutlineSafari),e.addService(h.AgingTools),this.tools=e.create(h.AgingTools)
DesignScreenshot/output/test_run/baidu_test.html:9111:}(),bds.comm.inputUpgrade&&!function(){require(["new-input/js/new_input"],function(e){var t=e.MainInput,n=new t;n.init()})}(),$(window).on("swap_end",function(){var e=$("html"),t=$("body"),n=$(".content_none"),i=n&&n.length>0||!1,o=e.hasClass("big-event-gray"),r=bds&&bds.comm&&bds.comm.isGray;t.hasClass("big-event-gray")&&t.removeClass("big-event-gray"),!o||i||r||e.removeClass("big-event-gray"),!o&&r&&e.addClass("big-event-gray")}),$(window).on("swap_end",function(){try{localStorage.setItem("search_request_time",Date.now())
DesignScreenshot/output/test_run/baidu_test.html:9148:baseParams,{rsv_clk_extra:JSON.stringify(extraData)}):baseParams;log(logParams)}catch(e){console.error("SEND MID LOG ERROR",e)}}function setStorage(name,value){try{localStorage.setItem(name,value)}catch(e){console.error("SET LOCALSTORAGE ERROR",e)}}function getStorage(name){try{return localStorage.getItem(name)}catch(e){console.error("GET LOCALSTORAGE ERROR",e);return null}}function isDarkMode(){var agingTools=getStorage("agingTools");return agingTools&&(
DesignScreenshot/output/test_run/baidu_test.html:9187:}else if(window.localStorage){_storage=_createLocalStorage()}else{_storage=_createCookie()}return _storage}function _createUserData(){$(document.body).append($.formatString('<div id="#{id}" style="display:none;"></div>',{id:_guid+"-storage"}));_getElement().addBehavior("#default#userData");return{set:function(key,value,callback,options){var status=_status.SUCCESS,ele=_getElement(),newKey=_getKey(key),time=options&&options.expires?options.expires:(new Date).getTime()+365*24*60*60*1e3;if(isDate(
DesignScreenshot/output/test_run/baidu_test.html:9189:var status=_status.SUCCESS,ele=_getElement(),newKey=_getKey(key),val;try{ele.load(newKey);val=ele.getAttribute(newKey);if(val){ele.removeAttribute(newKey);ele.expires=new Date(315532799e3).toUTCString();ele.save(newKey)}else{status=_status.FAILURE}}catch(e){status=_status.FAILURE}callback&&callback.call(this,status,val)}}}function _createLocalStorage(){return{set:function(key,value,callback,options){var status=_status.SUCCESS,storage=window.localStorage,newKey=_getKey(key),
DesignScreenshot/output/test_run/baidu_test.html:9190:time=options&&options.expires?options.expires:0;if(isDate(time)){time=time.getTime()}else if(time>0){time=(new Date).getTime()+(time-0)}try{storage.setItem(newKey,time+"|"+value)}catch(e){status=_status.OVERFLOW}callback&&callback.call(this,status,value)},get:function(key){var status=_status.SUCCESS,storage=window.localStorage,newKey=_getKey(key),val=null,index,time;try{val=storage.getItem(newKey)}catch(e){return{status:_status.FAILURE,value:null}}if(val){index=val.indexOf("|");time=parseInt(
DesignScreenshot/output/test_run/baidu_test.html:9191:val.substring(0,index),10);if(new Date(time).getTime()>(new Date).getTime()||time==0){val=val.substring(index+1,val.length)}else{val=null;status=_status.FAILURE;this.del(key)}}else{status=_status.FAILURE}return{status:status,value:val}},del:function(key,callback){var status=_status.SUCCESS,storage=window.localStorage,newKey=_getKey(key),val=null;try{val=storage.getItem(newKey)}catch(e){status=_status.FAILURE}if(val){val=val.substring(val.indexOf("|")+1,val.length)
DesignScreenshot/output/test_run/baidu_test.html:9375:).on("keydown",function(e){if(e.keyCode===13){isKeyDown=true}});$(".s_btn_wr").on("click",function(e){if(/\/s\?.*(wd|word)=.+/.test(location.href)){return}var placeholderData;try{placeholderData=localStorage.getItem("placeholderData")?JSON.parse(localStorage.getItem("placeholderData")):{}}catch(e){}var str_sa="";var query=$("#kw").val()?"":$("#kw").attr("placeholder");if(placeholderData&&placeholderData.list&&placeholderData.list.length>0&&query!==""){for(
DesignScreenshot/output/test_run/baidu_test.html:9380:var bds=bds||{};bds.se=bds.se||{};bds.se.store=function(){var l={},h=window,k=h.document,c="localStorage",o="globalStorage",d="__storejs__",g;l.disabled=false;l.set=function(e,p){};l.get=function(e){};l.remove=function(e){};l.clear=function(){};l.transact=function(e,r,p){var q=l.get(e);if(p==null){p=r;r=null}if(typeof q=="undefined"){q=r||{}}p(q);l.set(e,q)};l.getAll=function(){};l.serialize=function(e){return String(e)};l.deserialize=function(e){if(typeof e!="string"){return undefined}return e}
DesignScreenshot/output/test_run/baidu_test.html:9434:;var nodeSample=bds&&bds.comm&&bds.comm.nodeSample;if(nodeSample.indexOf("need_carousels")>-1||nodeSample.indexOf("no_need_carousels")>-1){var input=$("#kw");var placeholderList=JSON.parse(localStorage.getItem("placeholderList")||"{}");var signNum=JSON.parse(localStorage.getItem("signNum")||null);if(!input.val()&&signNum!==null&&placeholderList.box[signNum]){input.val(placeholderList.box[signNum].show_text);F.fire("superman:placeholder","click",{clickType:"click"})}var placeholder=$(
DesignScreenshot/output/test_run/baidu_test.html:9442:$(document).ready(function(){var isNewTopMenu=bds.comm&&bds.comm.newTopMenu===1;window._load_status="dom_ready";(function(){if(Math.random()*100<1&&$.browser.edge){window.testedge=function(fn){var health;if(/testedge=1/i.test(fn.toString())){try{window.localStorage.setItem("_super_edgehealth","good")}catch(e){}health="1"}else{health="0"}var imgLog=function(src){var n="imglog__"+(new Date).getTime();var c=window[n]=new Image;c.onload=c.onerror=function(){window[n]=null};c.src=src;c=null}
DesignScreenshot/output/user_info_run/2_homepage_after_login.html:97:`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const o=new this(t);return n.forEach(r=>o.set(r)),o}static accessor(t){const o=(this[lm]=this[lm]={accessors:{}}).accessors,r=this.prototype;function s(i){const a=pi(i);o[a]||(sR(r,i),o[a]=!0)}return W.isArray(t)?t.forEach(s):s(t),this}};gn.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);W.reduceDescriptors(gn.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(o){this[n]=o}}});W.freezeMethods(gn);function vc(e,t){const n=this||Aa,o=t||n,r=gn.from(o.headers);let s=o.data;return W.forEach(e,function(a){s=a.call(n,s,r.normalize(),t?t.status:void 0)}),r.normalize(),s}function e_(e){return!!(e&&e.__CANCEL__)}function ii(e,t,n){Ve.call(this,e??"canceled",Ve.ERR_CANCELED,t,n),this.name="CanceledError"}W.inherits(ii,Ve,{__CANCEL__:!0});function t_(e,t,n){const o=n.config.validateStatus;!n.status||!o||o(n.status)?e(n):t(new Ve("Request failed with status code "+n.status,[Ve.ERR_BAD_REQUEST,Ve.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function iR(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function aR(e,t){e=e||10;const n=new Array(e),o=new Array(e);let r=0,s=0,i;return t=t!==void 0?t:1e3,function(l){const u=Date.now(),c=o[s];i||(i=u),n[r]=l,o[r]=u;let d=s,p=0;for(;d!==r;)p+=n[d++],d=d%e;if(r=(r+1)%e,r===s&&(s=(s+1)%e),u-i<t)return;const h=c&&u-c;return h?Math.round(p*1e3/h):void 0}}function lR(e,t){let n=0,o=1e3/t,r,s;const i=(u,c=Date.now())=>{n=c,r=null,s&&(clearTimeout(s),s=null),e(...u)};return[(...u)=>{const c=Date.now(),d=c-n;d>=o?i(u,c):(r=u,s||(s=setTimeout(()=>{s=null,i(r)},o-d)))},()=>r&&i(r)]}const Bl=(e,t,n=3)=>{let o=0;const r=aR(50,250);return lR(s=>{const i=s.loaded,a=s.lengthComputable?s.total:void 0,l=i-o,u=r(l),c=i<=a;o=i;const d={loaded:i,total:a,progress:a?i/a:void 0,bytes:l,rate:u||void 0,estimated:u&&a&&c?(a-i)/u:void 0,event:s,lengthComputable:a!=null,[t?"download":"upload"]:!0};e(d)},n)},um=(e,t)=>{const n=e!=null;return[o=>t[0]({lengthComputable:n,total:e,loaded:o}),t[1]]},cm=e=>(...t)=>W.asap(()=>e(...t)),uR=Jt.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,Jt.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(Jt.origin),Jt.navigator&&/(msie|trident)/i.test(Jt.navigator.userAgent)):()=>!0,cR=Jt.hasStandardBrowserEnv?{write(e,t,n,o,r,s){const i=[e+"="+encodeURIComponent(t)];W.isNumber(n)&&i.push("expires="+new Date(n).toGMTString()),W.isString(o)&&i.push("path="+o),W.isString(r)&&i.push("domain="+r),s===!0&&i.push("secure"),document.cookie=i.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function dR(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function fR(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function n_(e,t,n){let o=!dR(t);return e&&(o||n==!1)?fR(e,t):t}const dm=e=>e instanceof gn?{...e}:e;function Zr(e,t){t=t||{};const n={};function o(u,c,d,p){return W.isPlainObject(u)&&W.isPlainObject(c)?W.merge.call({caseless:p},u,c):W.isPlainObject(c)?W.merge({},c):W.isArray(c)?c.slice():c}function r(u,c,d,p){if(W.isUndefined(c)){if(!W.isUndefined(u))return o(void 0,u,d,p)}else return o(u,c,d,p)}function s(u,c){if(!W.isUndefined(c))return o(void 0,c)}function i(u,c){if(W.isUndefined(c)){if(!W.isUndefined(u))return o(void 0,u)}else return o(void 0,c)}function a(u,c,d){if(d in t)return o(u,c);if(d in e)return o(void 0,u)}const l={url:s,method:s,data:s,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,responseEncoding:i,validateStatus:a,headers:(u,c,d)=>r(dm(u),dm(c),d,!0)};return W.forEach(Object.keys({...e,...t}),function(c){const d=l[c]||r,p=d(e[c],t[c],c);W.isUndefined(p)&&d!==a||(n[c]=p)}),n}const o_=e=>{const t=Zr({},e);let{data:n,withXSRFToken:o,xsrfHeaderName:r,xsrfCookieName:s,headers:i,auth:a}=t;t.headers=i=gn.from(i),t.url=Xb(n_(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),a&&i.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):"")));let l;if(W.isFormData(n)){if(Jt.hasStandardBrowserEnv||Jt.hasStandardBrowserWebWorkerEnv)i.setContentType(void 0);else if((l=i.getContentType())!==!1){const[u,...c]=l?l.split(";").map(d=>d.trim()).filter(Boolean):[];i.setContentType([u||"multipart/form-data",...c].join("; "))}}if(Jt.hasStandardBrowserEnv&&(o&&W.isFunction(o)&&(o=o(t)),o||o!==!1&&uR(t.url))){const u=r&&s&&cR.read(s);u&&i.set(r,u)}return t},pR=typeof XMLHttpRequest<"u",hR=pR&&function(e){return new Promise(function(n,o){const r=o_(e);let s=r.data;const i=gn.from(r.headers).normalize();let{responseType:a,onUploadProgress:l,onDownloadProgress:u}=r,c,d,p,h,m;function g(){h&&h(),m&&m(),r.cancelToken&&r.cancelToken.unsubscribe(c),r.signal&&r.signal.removeEventListener("abort",c)}let v=new XMLHttpRequest;v.open(r.method.toUpperCase(),r.url,!0),v.timeout=r.timeout;function y(){if(!v)return;const _=gn.from("getAllResponseHeaders"in v&&v.getAllResponseHeaders()),T={data:!a||a==="text"||a==="json"?v.responseText:v.response,status:v.status,statusText:v.statusText,headers:_,config:e,request:v};t_(function(D){n(D),g()},function(D){o(D),g()},T),v=null}"onloadend"in v?v.onloadend=y:v.onreadystatechange=function(){!v||v.readyState!==4||v.status===0&&!(v.responseURL&&v.responseURL.indexOf("file:")===0)||setTimeout(y)},v.onabort=function(){v&&(o(new Ve("Request aborted",Ve.ECONNABORTED,e,v)),v=null)},v.onerror=function(){o(new Ve("Network Error",Ve.ERR_NETWORK,e,v)),v=null},v.ontimeout=function(){let O=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const T=r.transitional||Jb;r.timeoutErrorMessage&&(O=r.timeoutErrorMessage),o(new Ve(O,T.clarifyTimeoutError?Ve.ETIMEDOUT:Ve.ECONNABORTED,e,v)),v=null},s===void 0&&i.setContentType(null),"setRequestHeader"in v&&W.forEach(i.toJSON(),function(O,T){v.setRequestHeader(T,O)}),W.isUndefined(r.withCredentials)||(v.withCredentials=!!r.withCredentials),a&&a!=="json"&&(v.responseType=r.responseType),u&&([p,m]=Bl(u,!0),v.addEventListener("progress",p)),l&&v.upload&&([d,h]=Bl(l),v.upload.addEventListener("progress",d),v.upload.addEventListener("loadend",h)),(r.cancelToken||r.signal)&&(c=_=>{v&&(o(!_||_.type?new ii(null,e,v):_),v.abort(),v=null)},r.cancelToken&&r.cancelToken.subscribe(c),r.signal&&(r.signal.aborted?c():r.signal.addEventListener("abort",c)));const b=iR(r.url);if(b&&Jt.protocols.indexOf(b)===-1){o(new Ve("Unsupported protocol "+b+":",Ve.ERR_BAD_REQUEST,e));return}v.send(s||null)})},mR=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let o=new AbortController,r;const s=function(u){if(!r){r=!0,a();const c=u instanceof Error?u:this.reason;o.abort(c instanceof Ve?c:new ii(c instanceof Error?c.message:c))}};let i=t&&setTimeout(()=>{i=null,s(new Ve(`timeout ${t} of ms exceeded`,Ve.ETIMEDOUT))},t);const a=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach(u=>{u.unsubscribe?u.unsubscribe(s):u.removeEventListener("abort",s)}),e=null)};e.forEach(u=>u.addEventListener("abort",s));const{signal:l}=o;return l.unsubscribe=()=>W.asap(a),l}},gR=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let o=0,r;for(;o<n;)r=o+t,yield e.slice(o,r),o=r},vR=async function*(e,t){for await(const n of yR(e))yield*gR(n,t)},yR=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:n,value:o}=await t.read();if(n)break;yield o}}finally{await t.cancel()}},fm=(e,t,n,o)=>{const r=vR(e,t);let s=0,i,a=l=>{i||(i=!0,o&&o(l))};return new ReadableStream({async pull(l){try{const{done:u,value:c}=await r.next();if(u){a(),l.close();return}let d=c.byteLength;if(n){let p=s+=d;n(p)}l.enqueue(new Uint8Array(c))}catch(u){throw a(u),u}},cancel(l){return a(l),r.return()}},{highWaterMark:2})},Ru=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",r_=Ru&&typeof ReadableStream=="function",bR=Ru&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),s_=(e,...t)=>{try{return!!e(...t)}catch{return!1}},_R=r_&&s_(()=>{let e=!1;const t=new Request(Jt.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),pm=64*1024,jd=r_&&s_(()=>W.isReadableStream(new Response("").body)),Ml={stream:jd&&(e=>e.body)};Ru&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!Ml[t]&&(Ml[t]=W.isFunction(e[t])?n=>n[t]():(n,o)=>{throw new Ve(`Response type '${t}' is not supported`,Ve.ERR_NOT_SUPPORT,o)})})})(new Response);const wR=async e=>{if(e==null)return 0;if(W.isBlob(e))return e.size;if(W.isSpecCompliantForm(e))return(await new Request(Jt.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(W.isArrayBufferView(e)||W.isArrayBuffer(e))return e.byteLength;if(W.isURLSearchParams(e)&&(e=e+""),W.isString(e))return(await bR(e)).byteLength},SR=async(e,t)=>{const n=W.toFiniteNumber(e.getContentLength());return n??wR(t)},CR=Ru&&(async e=>{let{url:t,method:n,data:o,signal:r,cancelToken:s,timeout:i,onDownloadProgress:a,onUploadProgress:l,responseType:u,headers:c,withCredentials:d="same-origin",fetchOptions:p}=o_(e);u=u?(u+"").toLowerCase():"text";let h=mR([r,s&&s.toAbortSignal()],i),m;const g=h&&h.unsubscribe&&(()=>{h.unsubscribe()});let v;try{if(l&&_R&&n!=="get"&&n!=="head"&&(v=await SR(c,o))!==0){let T=new Request(t,{method:"POST",body:o,duplex:"half"}),A;if(W.isFormData(o)&&(A=T.headers.get("content-type"))&&c.setContentType(A),T.body){const[D,P]=um(v,Bl(cm(l)));o=fm(T.body,pm,D,P)}}W.isString(d)||(d=d?"include":"omit");const y="credentials"in Request.prototype;m=new Request(t,{...p,signal:h,method:n.toUpperCase(),headers:c.normalize().toJSON(),body:o,duplex:"half",credentials:y?d:void 0});let b=await fetch(m,p);const _=jd&&(u==="stream"||u==="response");if(jd&&(a||_&&g)){const T={};["status","statusText","headers"].forEach(w=>{T[w]=b[w]});const A=W.toFiniteNumber(b.headers.get("content-length")),[D,P]=a&&um(A,Bl(cm(a),!0))||[];b=new Response(fm(b.body,pm,D,()=>{P&&P(),g&&g()}),T)}u=u||"text";let O=await Ml[W.findKey(Ml,u)||"text"](b,e);return!_&&g&&g(),await new Promise((T,A)=>{t_(T,A,{data:O,headers:gn.from(b.headers),status:b.status,statusText:b.statusText,config:e,request:m})})}catch(y){throw g&&g(),y&&y.name==="TypeError"&&/Load failed|fetch/i.test(y.message)?Object.assign(new Ve("Network Error",Ve.ERR_NETWORK,e,m),{cause:y.cause||y}):Ve.from(y,y&&y.code,e,m)}}),Vd={http:FD,xhr:hR,fetch:CR};W.forEach(Vd,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const hm=e=>`- ${e}`,xR=e=>W.isFunction(e)||e===null||e===!1,i_={getAdapter:e=>{e=W.isArray(e)?e:[e];const{length:t}=e;let n,o;const r={};for(let s=0;s<t;s++){n=e[s];let i;if(o=n,!xR(n)&&(o=Vd[(i=String(n)).toLowerCase()],o===void 0))throw new Ve(`Unknown adapter '${i}'`);if(o)break;r[i||"#"+s]=o}if(!o){const s=Object.entries(r).map(([a,l])=>`adapter ${a} `+(l===!1?"is not supported by the environment":"is not available in the build"));let i=t?s.length>1?`since :
DesignScreenshot/output/user_info_run/2_homepage_after_login.html:100:`+s):o.stack=s}catch{}}throw o}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Zr(this.defaults,n);const{transitional:o,paramsSerializer:r,headers:s}=n;o!==void 0&&ul.assertOptions(o,{silentJSONParsing:Jn.transitional(Jn.boolean),forcedJSONParsing:Jn.transitional(Jn.boolean),clarifyTimeoutError:Jn.transitional(Jn.boolean)},!1),r!=null&&(W.isFunction(r)?n.paramsSerializer={serialize:r}:ul.assertOptions(r,{encode:Jn.function,serialize:Jn.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),ul.assertOptions(n,{baseUrl:Jn.spelling("baseURL"),withXsrfToken:Jn.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let i=s&&W.merge(s.common,s[n.method]);s&&W.forEach(["delete","get","head","post","put","patch","common"],m=>{delete s[m]}),n.headers=gn.concat(i,s);const a=[];let l=!0;this.interceptors.request.forEach(function(g){typeof g.runWhen=="function"&&g.runWhen(n)===!1||(l=l&&g.synchronous,a.unshift(g.fulfilled,g.rejected))});const u=[];this.interceptors.response.forEach(function(g){u.push(g.fulfilled,g.rejected)});let c,d=0,p;if(!l){const m=[mm.bind(this),void 0];for(m.unshift(...a),m.push(...u),p=m.length,c=Promise.resolve(n);d<p;)c=c.then(m[d++],m[d++]);return c}p=a.length;let h=n;for(d=0;d<p;){const m=a[d++],g=a[d++];try{h=m(h)}catch(v){g.call(this,v);break}}try{c=mm.call(this,h)}catch(m){return Promise.reject(m)}for(d=0,p=u.length;d<p;)c=c.then(u[d++],u[d++]);return c}getUri(t){t=Zr(this.defaults,t);const n=n_(t.baseURL,t.url,t.allowAbsoluteUrls);return Xb(n,t.params,t.paramsSerializer)}};W.forEach(["delete","get","head","options"],function(t){Wr.prototype[t]=function(n,o){return this.request(Zr(o||{},{method:t,url:n,data:(o||{}).data}))}});W.forEach(["post","put","patch"],function(t){function n(o){return function(s,i,a){return this.request(Zr(a||{},{method:t,headers:o?{"Content-Type":"multipart/form-data"}:{},url:s,data:i}))}}Wr.prototype[t]=n(),Wr.prototype[t+"Form"]=n(!0)});let AR=class l_{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(s){n=s});const o=this;this.promise.then(r=>{if(!o._listeners)return;let s=o._listeners.length;for(;s-- >0;)o._listeners[s](r);o._listeners=null}),this.promise.then=r=>{let s;const i=new Promise(a=>{o.subscribe(a),s=a}).then(r);return i.cancel=function(){o.unsubscribe(s)},i},t(function(s,i,a){o.reason||(o.reason=new ii(s,i,a),n(o.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=o=>{t.abort(o)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new l_(function(r){t=r}),cancel:t}}};function OR(e){return function(n){return e.apply(null,n)}}function TR(e){return W.isObject(e)&&e.isAxiosError===!0}const Ud={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Ud).forEach(([e,t])=>{Ud[t]=e});function u_(e){const t=new Wr(e),n=Lb(Wr.prototype.request,t);return W.extend(n,Wr.prototype,t,{allOwnKeys:!0}),W.extend(n,t,null,{allOwnKeys:!0}),n.create=function(r){return u_(Zr(e,r))},n}const xt=u_(Aa);xt.Axios=Wr;xt.CanceledError=ii;xt.CancelToken=AR;xt.isCancel=e_;xt.VERSION=a_;xt.toFormData=Du;xt.AxiosError=Ve;xt.Cancel=xt.CanceledError;xt.all=function(t){return Promise.all(t)};xt.spread=OR;xt.isAxiosError=TR;xt.mergeConfig=Zr;xt.AxiosHeaders=gn;xt.formToJSON=e=>Zb(W.isHTMLForm(e)?new FormData(e):e);xt.getAdapter=i_.getAdapter;xt.HttpStatusCode=Ud;xt.default=xt;const{Axios:DL,AxiosError:RL,CanceledError:BL,isCancel:ML,CancelToken:qL,VERSION:$L,all:FL,Cancel:LL,isAxiosError:NL,spread:jL,toFormData:VL,AxiosHeaders:UL,HttpStatusCode:HL,formToJSON:zL,getAdapter:KL,mergeConfig:WL}=xt;let Hd=1;var PR=class{constructor(){Mt(this,"subscribers");Mt(this,"toasts");Mt(this,"dismissedToasts");Mt(this,"subscribe",e=>(this.subscribers.push(e),()=>{const t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}));Mt(this,"publish",e=>{this.subscribers.forEach(t=>t(e))});Mt(this,"addToast",e=>{this.publish(e),this.toasts=[...this.toasts,e]});Mt(this,"create",e=>{var i;const{message:t,...n}=e,o=typeof e.id=="number"||e.id&&((i=e.id)==null?void 0:i.length)>0?e.id:Hd++,r=this.toasts.find(a=>a.id===o),s=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(o)&&this.dismissedToasts.delete(o),r?this.toasts=this.toasts.map(a=>a.id===o?(this.publish({...a,...e,id:o,title:t}),{...a,...e,id:o,dismissible:s,title:t}):a):this.addToast({title:t,...n,dismissible:s,id:o}),o});Mt(this,"dismiss",e=>(e?(this.dismissedToasts.add(e),requestAnimationFrame(()=>this.subscribers.forEach(t=>t({id:e,dismiss:!0})))):this.toasts.forEach(t=>{this.subscribers.forEach(n=>n({id:t.id,dismiss:!0}))}),e));Mt(this,"message",(e,t)=>this.create({...t,message:e,type:"default"}));Mt(this,"error",(e,t)=>this.create({...t,type:"error",message:e}));Mt(this,"success",(e,t)=>this.create({...t,type:"success",message:e}));Mt(this,"info",(e,t)=>this.create({...t,type:"info",message:e}));Mt(this,"warning",(e,t)=>this.create({...t,type:"warning",message:e}));Mt(this,"loading",(e,t)=>this.create({...t,type:"loading",message:e}));Mt(this,"promise",(e,t)=>{if(!t)return;let n;t.loading!==void 0&&(n=this.create({...t,promise:e,type:"loading",message:t.loading,description:typeof t.description!="function"?t.description:void 0}));const o=Promise.resolve(e instanceof Function?e():e);let r=n!==void 0,s;const i=o.then(async l=>{if(s=["resolve",l],so(l))r=!1,this.create({id:n,type:"default",message:l});else if(IR(l)&&!l.ok){r=!1;const c=typeof t.error=="function"?await t.error(`HTTP error! status: ${l.status}`):t.error,d=typeof t.description=="function"?await t.description(`HTTP error! status: ${l.status}`):t.description,h=typeof c=="object"&&!so(c)?c:{message:c||"",id:n||""};this.create({id:n,type:"error",description:d,...h})}else if(l instanceof Error){r=!1;const c=typeof t.error=="function"?await t.error(l):t.error,d=typeof t.description=="function"?await t.description(l):t.description,h=typeof c=="object"&&!so(c)?c:{message:c||"",id:n||""};this.create({id:n,type:"error",description:d,...h})}else if(t.success!==void 0){r=!1;const c=typeof t.success=="function"?await t.success(l):t.success,d=typeof t.description=="function"?await t.description(l):t.description,h=typeof c=="object"&&!so(c)?c:{message:c||"",id:n||""};this.create({id:n,type:"success",description:d,...h})}}).catch(async l=>{if(s=["reject",l],t.error!==void 0){r=!1;const u=typeof t.error=="function"?await t.error(l):t.error,c=typeof t.description=="function"?await t.description(l):t.description,p=typeof u=="object"&&!so(u)?u:{message:u||"",id:n||""};this.create({id:n,type:"error",description:c,...p})}}).finally(()=>{var l;r&&(this.dismiss(n),n=void 0),(l=t.finally)==null||l.call(t)}),a=()=>new Promise((l,u)=>i.then(()=>s[0]==="reject"?u(s[1]):l(s[1])).catch(u));return typeof n!="string"&&typeof n!="number"?{unwrap:a}:Object.assign(n,{unwrap:a})});Mt(this,"custom",(e,t)=>{const n=(t==null?void 0:t.id)||Hd++;return this.publish({component:e,id:n,...t}),n});Mt(this,"getActiveToasts",()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)));this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}};const hn=new PR;function kR(e,t){const n=(t==null?void 0:t.id)||Hd++;return hn.create({message:e,id:n,type:"default",...t}),n}const IR=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",DR=kR,RR=()=>hn.toasts,BR=()=>hn.getActiveToasts(),Bi=Object.assign(DR,{success:hn.success,info:hn.info,warning:hn.warning,error:hn.error,custom:hn.custom,message:hn.message,promise:hn.promise,dismiss:hn.dismiss,loading:hn.loading},{getHistory:RR,getToasts:BR});function Wa(e){return e.label!==void 0}const MR=3,c_="24px",d_="16px",vm=4e3,qR=356,$R=14,FR=45,f_=200;function LR(){const e=N(!1);return ut(()=>{const t=()=>{e.value=document.hidden};return document.addEventListener("visibilitychange",t),()=>window.removeEventListener("visibilitychange",t)}),{isDocumentHidden:e}}function Go(...e){return e.filter(Boolean).join(" ")}function NR(e){const[t,n]=e.split("-"),o=[];return t&&o.push(t),n&&o.push(n),o}function jR(e,t){const n={};return[e,t].forEach((o,r)=>{const s=r===1,i=s?"--mobile-offset":"--offset",a=s?d_:c_;function l(u){["top","right","bottom","left"].forEach(c=>{n[`${i}-${c}`]=typeof u=="number"?`${u}px`:u})}typeof o=="number"||typeof o=="string"?l(o):typeof o=="object"?["top","right","bottom","left"].forEach(u=>{o[u]===void 0?n[`${i}-${u}`]=a:n[`${i}-${u}`]=typeof o[u]=="number"?`${o[u]}px`:o[u]}):l(a)}),n}const VR=["data-rich-colors","data-styled","data-mounted","data-promise","data-swiped","data-removed","data-visible","data-y-position","data-x-position","data-index","data-front","data-swiping","data-dismissible","data-type","data-invert","data-swipe-out","data-swipe-direction","data-expanded"],UR=["aria-label","data-disabled"];var HR=F({__name:"Toast",props:{toast:{},toasts:{},index:{},swipeDirections:{},expanded:{type:Boolean},invert:{type:Boolean},heights:{},gap:{},position:{},visibleToasts:{},expandByDefault:{type:Boolean},closeButton:{type:Boolean},interacting:{type:Boolean},style:{},cancelButtonStyle:{},actionButtonStyle:{},duration:{},class:{},unstyled:{type:Boolean},descriptionClass:{},loadingIcon:{},classes:{},icons:{},closeButtonAriaLabel:{},defaultRichColors:{type:Boolean}},emits:["update:heights","update:height","removeToast"],setup(e,{emit:t}){const n=e,o=t,r=N(null),s=N(null),i=N(!1),a=N(!1),l=N(!1),u=N(!1),c=N(!1),d=N(0),p=N(0),h=N(n.toast.duration||n.duration||vm),m=N(null),g=N(null),v=U(()=>n.index===0),y=U(()=>n.index+1<=n.visibleToasts),b=U(()=>n.toast.type),_=U(()=>n.toast.dismissible!==!1),O=U(()=>n.toast.class||""),T=U(()=>n.descriptionClass||""),A=U(()=>{const x=n.toast.position||n.position,H=n.heights.filter(X=>X.position===x).findIndex(X=>X.toastId===n.toast.id);return H>=0?H:0}),D=U(()=>{const x=n.toast.position||n.position;return n.heights.filter(H=>H.position===x).reduce((H,X,pe)=>pe>=A.value?H:H+X.height,0)}),P=U(()=>A.value*n.gap+D.value||0),w=U(()=>n.toast.closeButton??n.closeButton),k=U(()=>n.toast.duration||n.duration||vm),$=N(0),R=N(0),G=N(null),J=U(()=>n.position.split("-")),ne=U(()=>J.value[0]),ae=U(()=>J.value[1]),re=U(()=>typeof n.toast.title!="string"),L=U(()=>typeof n.toast.description!="string"),{isDocumentHidden:oe}=LR(),Y=U(()=>b.value&&b.value==="loading");je(()=>{i.value=!0,h.value=k.value}),ut(async()=>{if(!i.value||!g.value)return;await We();const x=g.value,z=x.style.height;x.style.height="auto";const H=x.getBoundingClientRect().height;x.style.height=z,p.value=H,o("update:height",{toastId:n.toast.id,height:H,position:n.toast.position||n.position})});function ee(){a.value=!0,d.value=P.value,setTimeout(()=>{o("removeToast",n.toast)},f_)}function le(){var x,z;if(Y.value||!_.value)return{};ee(),(z=(x=n.toast).onDismiss)==null||z.call(x,n.toast)}function ye(x){Y.value||!_.value||(m.value=new Date,d.value=P.value,x.target.setPointerCapture(x.pointerId),x.target.tagName!=="BUTTON"&&(l.value=!0,G.value={x:x.clientX,y:x.clientY}))}function me(){var S,I,j,K,Z,Q,ue;if(u.value||!_.value)return;G.value=null;const x=Number(((S=g.value)==null?void 0:S.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),z=Number(((I=g.value)==null?void 0:I.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),H=new Date().getTime()-(((j=m.value)==null?void 0:j.getTime())||0),X=r.value==="x"?x:z,pe=Math.abs(X)/H;if(Math.abs(X)>=FR||pe>.11){d.value=P.value,(Z=(K=n.toast).onDismiss)==null||Z.call(K,n.toast),r.value==="x"?s.value=x>0?"right":"left":s.value=z>0?"down":"up",ee(),u.value=!0;return}else(Q=g.value)==null||Q.style.setProperty("--swipe-amount-x","0px"),(ue=g.value)==null||ue.style.setProperty("--swipe-amount-y","0px");c.value=!1,l.value=!1,r.value=null}function Pe(x){var j,K,Z,Q;if(!G.value||!_.value||(((K=(j=window==null?void 0:window.getSelection())==null?void 0:j.toString())==null?void 0:K.length)??!1))return;const H=x.clientY-G.value.y,X=x.clientX-G.value.x,pe=n.swipeDirections??NR(n.position);!r.value&&(Math.abs(X)>1||Math.abs(H)>1)&&(r.value=Math.abs(X)>Math.abs(H)?"x":"y");let S={x:0,y:0};const I=ue=>1/(1.5+Math.abs(ue)/20);if(r.value==="y"){if(pe.includes("top")||pe.includes("bottom"))if(pe.includes("top")&&H<0||pe.includes("bottom")&&H>0)S.y=H;else{const ue=H*I(H);S.y=Math.abs(ue)<Math.abs(H)?ue:H}}else if(r.value==="x"&&(pe.includes("left")||pe.includes("right")))if(pe.includes("left")&&X<0||pe.includes("right")&&X>0)S.x=X;else{const ue=X*I(X);S.x=Math.abs(ue)<Math.abs(X)?ue:X}(Math.abs(S.x)>0||Math.abs(S.y)>0)&&(c.value=!0),(Z=g.value)==null||Z.style.setProperty("--swipe-amount-x",`${S.x}px`),(Q=g.value)==null||Q.style.setProperty("--swipe-amount-y",`${S.y}px`)}je(()=>{if(i.value=!0,!g.value)return;const x=g.value.getBoundingClientRect().height;p.value=x;const z=[{toastId:n.toast.id,height:x,position:n.toast.position},...n.heights];o("update:heights",z)}),Ys(()=>{g.value&&o("removeToast",n.toast)}),ut(x=>{if(n.toast.promise&&b.value==="loading"||n.toast.duration===1/0||n.toast.type==="loading")return;let z;const H=()=>{if(R.value<$.value){const pe=new Date().getTime()-$.value;h.value=h.value-pe}R.value=new Date().getTime()},X=()=>{h.value!==1/0&&($.value=new Date().getTime(),z=setTimeout(()=>{var pe,S;(S=(pe=n.toast).onAutoClose)==null||S.call(pe,n.toast),ee()},h.value))};n.expanded||n.interacting||oe.value?H():X(),x(()=>{clearTimeout(z)})}),Ce(()=>n.toast.delete,x=>{x!==void 0&&x&&ee()},{deep:!0});function Se(){l.value=!1,r.value=null,G.value=null}return(x,z)=>{var H,X,pe,S,I,j,K,Z,Q,ue,fe,de,se,xe,ge,Ee,ke,He,tt,Ye,At,mt,$t,Ft,yn,Cr,Bt;return C(),ie("li",{tabindex:"0",ref_key:"toastRef",ref:g,class:qe(f(Go)(n.class,O.value,(H=x.classes)==null?void 0:H.toast,(X=x.toast.classes)==null?void 0:X.toast,(pe=x.classes)==null?void 0:pe[b.value],(I=(S=x.toast)==null?void 0:S.classes)==null?void 0:I[b.value])),"data-sonner-toast":"","data-rich-colors":x.toast.richColors??x.defaultRichColors,"data-styled":!(x.toast.component||(j=x.toast)!=null&&j.unstyled||x.unstyled),"data-mounted":i.value,"data-promise":!!x.toast.promise,"data-swiped":c.value,"data-removed":a.value,"data-visible":y.value,"data-y-position":ne.value,"data-x-position":ae.value,"data-index":x.index,"data-front":v.value,"data-swiping":l.value,"data-dismissible":_.value,"data-type":b.value,"data-invert":x.toast.invert||x.invert,"data-swipe-out":u.value,"data-swipe-direction":s.value,"data-expanded":!!(x.expanded||x.expandByDefault&&i.value),style:Pt({"--index":x.index,"--toasts-before":x.index,"--z-index":x.toasts.length-x.index,"--offset":`${a.value?d.value:P.value}px`,"--initial-height":x.expandByDefault?"auto":`${p.value}px`,...x.style,...n.toast.style}),onDragend:Se,onPointerdown:ye,onPointerup:me,onPointermove:Pe},[w.value&&!x.toast.component&&b.value!=="loading"?(C(),ie("button",{key:0,"aria-label":x.closeButtonAriaLabel||"Close toast","data-disabled":Y.value,"data-close-button":"true",class:qe(f(Go)((K=x.classes)==null?void 0:K.closeButton,(Q=(Z=x.toast)==null?void 0:Z.classes)==null?void 0:Q.closeButton)),onClick:le},[(ue=x.icons)!=null&&ue.close?(C(),B(ro((fe=x.icons)==null?void 0:fe.close),{key:0})):V(x.$slots,"close-icon",{key:1})],10,UR)):Be("v-if",!0),x.toast.component?(C(),B(ro(x.toast.component),te({key:1},x.toast.componentProps,{onCloseToast:le}),null,16)):(C(),ie(Ie,{key:2},[b.value!=="default"||x.toast.icon||x.toast.promise?(C(),ie("div",{key:0,"data-icon":"",class:qe(f(Go)((de=x.classes)==null?void 0:de.icon,(xe=(se=x.toast)==null?void 0:se.classes)==null?void 0:xe.icon))},[x.toast.icon?(C(),B(ro(x.toast.icon),{key:0})):(C(),ie(Ie,{key:1},[b.value==="loading"?V(x.$slots,"loading-icon",{key:0}):b.value==="success"?V(x.$slots,"success-icon",{key:1}):b.value==="error"?V(x.$slots,"error-icon",{key:2}):b.value==="warning"?V(x.$slots,"warning-icon",{key:3}):b.value==="info"?V(x.$slots,"info-icon",{key:4}):Be("v-if",!0)],64))],2)):Be("v-if",!0),ce("div",{"data-content":"",class:qe(f(Go)((ge=x.classes)==null?void 0:ge.content,(ke=(Ee=x.toast)==null?void 0:Ee.classes)==null?void 0:ke.content))},[ce("div",{"data-title":"",class:qe(f(Go)((He=x.classes)==null?void 0:He.title,(tt=x.toast.classes)==null?void 0:tt.title))},[re.value?(C(),B(ro(x.toast.title),ct(te({key:0},x.toast.componentProps)),null,16)):(C(),ie(Ie,{key:1},[rt(Ne(x.toast.title),1)],64))],2),x.toast.description?(C(),ie("div",{key:0,"data-description":"",class:qe(f(Go)(x.descriptionClass,T.value,(Ye=x.classes)==null?void 0:Ye.description,(At=x.toast.classes)==null?void 0:At.description))},[L.value?(C(),B(ro(x.toast.description),ct(te({key:0},x.toast.componentProps)),null,16)):(C(),ie(Ie,{key:1},[rt(Ne(x.toast.description),1)],64))],2)):Be("v-if",!0)],2),x.toast.cancel?(C(),ie("button",{key:1,style:Pt(x.toast.cancelButtonStyle||x.cancelButtonStyle),class:qe(f(Go)((mt=x.classes)==null?void 0:mt.cancelButton,($t=x.toast.classes)==null?void 0:$t.cancelButton)),"data-button":"","data-cancel":"",onClick:z[0]||(z[0]=Lt=>{var Qn,Yn;f(Wa)(x.toast.cancel)&&_.value&&((Yn=(Qn=x.toast.cancel).onClick)==null||Yn.call(Qn,Lt),ee())})},Ne(f(Wa)(x.toast.cancel)?(Ft=x.toast.cancel)==null?void 0:Ft.label:x.toast.cancel),7)):Be("v-if",!0),x.toast.action?(C(),ie("button",{key:2,style:Pt(x.toast.actionButtonStyle||x.actionButtonStyle),class:qe(f(Go)((yn=x.classes)==null?void 0:yn.actionButton,(Cr=x.toast.classes)==null?void 0:Cr.actionButton)),"data-button":"","data-action":"",onClick:z[1]||(z[1]=Lt=>{var Qn,Yn;f(Wa)(x.toast.action)&&((Yn=(Qn=x.toast.action).onClick)==null||Yn.call(Qn,Lt),!Lt.defaultPrevented&&ee())})},Ne(f(Wa)(x.toast.action)?(Bt=x.toast.action)==null?void 0:Bt.label:x.toast.action),7)):Be("v-if",!0)],64))],46,VR)}}}),zR=HR,Oa=(e,t)=>{const n=e.__vccOpts||e;for(const[o,r]of t)n[o]=r;return n};const KR={},WR={xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stoke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"};function GR(e,t){return C(),ie("svg",WR,t[0]||(t[0]=[ce("line",{x1:"18",y1:"6",x2:"6",y2:"18"},null,-1),ce("line",{x1:"6",y1:"6",x2:"18",y2:"18"},null,-1)]))}var QR=Oa(KR,[["render",GR]]);const YR=["data-visible"],XR={class:"sonner-spinner"};var JR=F({__name:"Loader",props:{visible:{type:Boolean}},setup(e){const t=Array(12).fill(0);return(n,o)=>(C(),ie("div",{class:"sonner-loading-wrapper","data-visible":n.visible},[ce("div",XR,[(C(!0),ie(Ie,null,wt(f(t),r=>(C(),ie("div",{key:`spinner-bar-${r}`,class:"sonner-loading-bar"}))),128))])],8,YR))}}),ZR=JR;const eB={},tB={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"};function nB(e,t){return C(),ie("svg",tB,t[0]||(t[0]=[ce("path",{"fill-rule":"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z","clip-rule":"evenodd"},null,-1)]))}var oB=Oa(eB,[["render",nB]]);const rB={},sB={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"};function iB(e,t){return C(),ie("svg",sB,t[0]||(t[0]=[ce("path",{"fill-rule":"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z","clip-rule":"evenodd"},null,-1)]))}var aB=Oa(rB,[["render",iB]]);const lB={},uB={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"};function cB(e,t){return C(),ie("svg",uB,t[0]||(t[0]=[ce("path",{"fill-rule":"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z","clip-rule":"evenodd"},null,-1)]))}var dB=Oa(lB,[["render",cB]]);const fB={},pB={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"};function hB(e,t){return C(),ie("svg",pB,t[0]||(t[0]=[ce("path",{"fill-rule":"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z","clip-rule":"evenodd"},null,-1)]))}var mB=Oa(fB,[["render",hB]]);const gB=["aria-label"],vB=["data-sonner-theme","dir","data-theme","data-rich-colors","data-y-position","data-x-position","data-lifted"],yB=typeof window<"u"&&typeof document<"u";function bB(){if(typeof window>"u"||typeof document>"u")return"ltr";const e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}var _B=F({name:"Toaster",inheritAttrs:!1,__name:"Toaster",props:{invert:{type:Boolean,default:!1},theme:{default:"light"},position:{default:"bottom-right"},hotkey:{default:()=>["altKey","KeyT"]},richColors:{type:Boolean,default:!1},expand:{type:Boolean,default:!1},duration:{},gap:{default:$R},visibleToasts:{default:MR},closeButton:{type:Boolean,default:!1},toastOptions:{default:()=>({})},class:{default:""},style:{},offset:{default:c_},mobileOffset:{default:d_},dir:{default:"auto"},swipeDirections:{},icons:{},containerAriaLabel:{default:"Notifications"}},setup(e){const t=e,n=g0(),o=N([]);function r(w,k){return o.value.filter($=>!$.position&&k===0||$.position===w)}const s=U(()=>{const w=o.value.filter(k=>k.position).map(k=>k.position);return w.length>0?Array.from(new Set([t.position].concat(w))):[t.position]}),i=U(()=>{const w={};return s.value.forEach(k=>{w[k]=o.value.filter($=>$.position===k)}),w}),a=N([]),l=N(!1),u=N(!1),c=N(t.theme!=="system"?t.theme:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),d=N(null),p=N(null),h=N(!1),m=t.hotkey.join("+").replace(/Key/g,"").replace(/Digit/g,"");function g(w){var k;(k=o.value.find($=>$.id===w.id))!=null&&k.delete||hn.dismiss(w.id),o.value=o.value.filter(({id:$})=>$!==w.id),setTimeout(()=>{o.value.find($=>$.id===w.id)||(a.value=a.value.filter($=>$.toastId!==w.id))},f_+50)}function v(w){var k,$;h.value&&!(($=(k=w.currentTarget)==null?void 0:k.contains)!=null&&$.call(k,w.relatedTarget))&&(h.value=!1,p.value&&(p.value.focus({preventScroll:!0}),p.value=null))}function y(w){w.target instanceof HTMLElement&&w.target.dataset.dismissible==="false"||h.value||(h.value=!0,p.value=w.relatedTarget)}function b(w){w.target&&w.target instanceof HTMLElement&&w.target.dataset.dismissible==="false"||(u.value=!0)}ut(w=>{const k=hn.subscribe($=>{if($.dismiss){requestAnimationFrame(()=>{o.value=o.value.map(R=>R.id===$.id?{...R,delete:!0}:R)});return}We(()=>{const R=o.value.findIndex(G=>G.id===$.id);R!==-1?o.value=[...o.value.slice(0,R),{...o.value[R],...$},...o.value.slice(R+1)]:o.value=[$,...o.value]})});w(k)}),ut(w=>{if(typeof window>"u")return;if(t.theme!=="system"){c.value=t.theme;return}const k=window.matchMedia("(prefers-color-scheme: dark)"),$=G=>{c.value=G?"dark":"light"};$(k.matches);const R=G=>{$(G.matches)};try{k.addEventListener("change",R)}catch{k.addListener(R)}w(()=>{try{k.removeEventListener("change",R)}catch{k.removeListener(R)}})}),ut(()=>{d.value&&p.value&&(p.value.focus({preventScroll:!0}),p.value=null,h.value=!1)}),ut(()=>{o.value.length<=1&&(l.value=!1)}),ut(w=>{function k($){const R=t.hotkey.every(ne=>$[ne]||$.code===ne),G=Array.isArray(d.value)?d.value[0]:d.value;R&&(l.value=!0,G==null||G.focus());const J=document.activeElement===d.value||(G==null?void 0:G.contains(document.activeElement));$.code==="Escape"&&J&&(l.value=!1)}yB&&(document.addEventListener("keydown",k),w(()=>{document.removeEventListener("keydown",k)}))});function _(){l.value=!0}function O(){u.value||(l.value=!1)}function T(){l.value=!1}function A(){u.value=!1}function D(w){a.value=w}function P(w){const k=a.value.findIndex($=>$.toastId===w.toastId);if(k!==-1)a.value[k]=w;else{const $=a.value.findIndex(R=>R.position===w.position);$!==-1?a.value.splice($,0,w):a.value.unshift(w)}}return(w,k)=>(C(),ie(Ie,null,[Be(" Remove item from normal navigation flow, only available via hotkey "),ce("section",{"aria-label":`${w.containerAriaLabel} ${f(m)}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false"},[(C(!0),ie(Ie,null,wt(s.value,($,R)=>{var G;return C(),ie("ol",te({key:$,ref_for:!0,ref_key:"listRef",ref:d,"data-sonner-toaster":"","data-sonner-theme":c.value,class:t.class,dir:w.dir==="auto"?bB():w.dir,tabIndex:-1,"data-theme":w.theme,"data-rich-colors":w.richColors,"data-y-position":$.split("-")[0],"data-x-position":$.split("-")[1],"data-lifted":l.value&&o.value.length>1&&!w.expand,style:{"--front-toast-height":`${((G=a.value[0])==null?void 0:G.height)||0}px`,"--width":`${f(qR)}px`,"--gap":`${w.gap}px`,...w.style,...f(n).style,...f(jR)(w.offset,w.mobileOffset)}},w.$attrs,{onBlur:v,onFocus:y,onMouseenter:_,onMousemove:_,onMouseleave:O,onDragend:T,onPointerdown:b,onPointerup:A}),[(C(!0),ie(Ie,null,wt(r($,R),(J,ne)=>{var ae,re,L,oe,Y,ee,le,ye,me,Pe;return C(),B(zR,{key:J.id,heights:a.value,icons:w.icons,index:ne,toast:J,defaultRichColors:w.richColors,duration:((ae=w.toastOptions)==null?void 0:ae.duration)??w.duration,class:qe(((re=w.toastOptions)==null?void 0:re.class)??""),descriptionClass:(L=w.toastOptions)==null?void 0:L.descriptionClass,invert:w.invert,visibleToasts:w.visibleToasts,closeButton:((oe=w.toastOptions)==null?void 0:oe.closeButton)??w.closeButton,interacting:u.value,position:$,style:Pt((Y=w.toastOptions)==null?void 0:Y.style),unstyled:(ee=w.toastOptions)==null?void 0:ee.unstyled,classes:(le=w.toastOptions)==null?void 0:le.classes,cancelButtonStyle:(ye=w.toastOptions)==null?void 0:ye.cancelButtonStyle,actionButtonStyle:(me=w.toastOptions)==null?void 0:me.actionButtonStyle,"close-button-aria-label":(Pe=w.toastOptions)==null?void 0:Pe.closeButtonAriaLabel,toasts:i.value[$],expandByDefault:w.expand,gap:w.gap,expanded:l.value,swipeDirections:t.swipeDirections,"onUpdate:heights":D,"onUpdate:height":P,onRemoveToast:g},{"close-icon":E(()=>[V(w.$slots,"close-icon",{},()=>[q(QR)])]),"loading-icon":E(()=>[V(w.$slots,"loading-icon",{},()=>[q(ZR,{visible:J.type==="loading"},null,8,["visible"])])]),"success-icon":E(()=>[V(w.$slots,"success-icon",{},()=>[q(oB)])]),"error-icon":E(()=>[V(w.$slots,"error-icon",{},()=>[q(mB)])]),"warning-icon":E(()=>[V(w.$slots,"warning-icon",{},()=>[q(dB)])]),"info-icon":E(()=>[V(w.$slots,"info-icon",{},()=>[q(aB)])]),_:2},1032,["heights","icons","index","toast","defaultRichColors","duration","class","descriptionClass","invert","visibleToasts","closeButton","interacting","position","style","unstyled","classes","cancelButtonStyle","actionButtonStyle","close-button-aria-label","toasts","expandByDefault","gap","expanded","swipeDirections"])}),128))],16,vB)}),128))],8,gB)],2112))}}),wB=_B;const ko=xt.create({baseURL:"https://api.beenglish.eu.org/DesignScreenshot/admin-api",timeout:12e4,headers:{"Content-Type":"application/json"}});let bc=!1;const _c=[],SB=async()=>{try{const e=localStorage.getItem("refreshToken");if(!e)throw new Error("No refresh token found");const t=await xt.post(`/system/auth/refresh-token?refreshToken=${e}`),{token:n,refreshToken:o}=t.data;return localStorage.setItem("accessToken",n),localStorage.setItem("refreshToken",o),n}catch(e){return localStorage.removeItem("accessToken"),localStorage.removeItem("refreshToken"),window.location.href="/auth",Promise.reject(e)}};ko.interceptors.request.use(e=>{const t=localStorage.getItem("accessToken");return t&&e.headers&&(e.headers.Authorization=`Bearer ${t}`),e},e=>Promise.reject(e));ko.interceptors.response.use(async e=>{const{data:t,status:n}=e;if(n!==200)return Bi.error(t.msg||"请求失败"),Promise.reject(new Error(t.msg||"请求失败"));if(t.code===401){const o=e.config;if(!o._retry){if(bc)return new Promise(r=>{_c.push(s=>{o.headers&&(o.headers.Authorization=`Bearer ${s}`),r(ko(o))})});o._retry=!0,bc=!0;try{const r=await SB();return o.headers&&(o.headers.Authorization=`Bearer ${r}`),_c.forEach(s=>s(r)),_c.length=0,ko(o)}catch(r){return Promise.reject(r)}finally{bc=!1}}}return t.code===0?t.data:(Bi.error(t.msg||"请求失败"),Promise.reject(new Error(t.msg||"请求失败")))},e=>{const t=e.message||"网络错误";return Bi.error(t),Promise.reject(e)});const wr=(e,t)=>ko.get(e,{params:t}),Sr=(e,t,n)=>ko.post(e,t,n),p_=(e,t)=>ko.put(e,t),h_=(e,t)=>ko.delete(e,{params:t}),GL=(e,t)=>ko.post(e,t,{headers:{"Content-Type":"multipart/form-data"}}),CB=e=>wr("/admin/app/page",e),xB=e=>wr("/admin/app/get-app-details",{appId:e}),EB=e=>wr("/admin/app/list",e),QL=e=>Sr("/admin/app/create",e),YL=e=>p_("/admin/app/update",e),XL=e=>h_("/admin/app/delete",e),ep=Symbol("platform"),m_=bf("app",()=>{const e=N([]);return{apps:e,fetchApps:async n=>{const o=await EB({platform:n});e.value=o}}});/*!
DesignScreenshot/output/user_info_run/2_homepage_after_login.html:104:  */const ms=typeof document<"u";function g_(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function AB(e){return e.__esModule||e[Symbol.toStringTag]==="Module"||e.default&&g_(e.default)}const st=Object.assign;function wc(e,t){const n={};for(const o in t){const r=t[o];n[o]=Kn(r)?r.map(e):e(r)}return n}const Mi=()=>{},Kn=Array.isArray,v_=/#/g,OB=/&/g,TB=/\//g,PB=/=/g,kB=/\?/g,y_=/\+/g,IB=/%5B/g,DB=/%5D/g,b_=/%5E/g,RB=/%60/g,__=/%7B/g,BB=/%7C/g,w_=/%7D/g,MB=/%20/g;function tp(e){return encodeURI(""+e).replace(BB,"|").replace(IB,"[").replace(DB,"]")}function qB(e){return tp(e).replace(__,"{").replace(w_,"}").replace(b_,"^")}function zd(e){return tp(e).replace(y_,"%2B").replace(MB,"+").replace(v_,"%23").replace(OB,"%26").replace(RB,"`").replace(__,"{").replace(w_,"}").replace(b_,"^")}function $B(e){return zd(e).replace(PB,"%3D")}function FB(e){return tp(e).replace(v_,"%23").replace(kB,"%3F")}function LB(e){return e==null?"":FB(e).replace(TB,"%2F")}function ra(e){try{return decodeURIComponent(""+e)}catch{}return""+e}const NB=/\/$/,jB=e=>e.replace(NB,"");function Sc(e,t,n="/"){let o,r={},s="",i="";const a=t.indexOf("#");let l=t.indexOf("?");return a<l&&a>=0&&(l=-1),l>-1&&(o=t.slice(0,l),s=t.slice(l+1,a>-1?a:t.length),r=e(s)),a>-1&&(o=o||t.slice(0,a),i=t.slice(a,t.length)),o=zB(o??t,n),{fullPath:o+(s&&"?")+s+i,path:o,query:r,hash:ra(i)}}function VB(e,t){const n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}function ym(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function UB(e,t,n){const o=t.matched.length-1,r=n.matched.length-1;return o>-1&&o===r&&Hs(t.matched[o],n.matched[r])&&S_(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function Hs(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function S_(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(!HB(e[n],t[n]))return!1;return!0}function HB(e,t){return Kn(e)?bm(e,t):Kn(t)?bm(t,e):e===t}function bm(e,t){return Kn(t)?e.length===t.length&&e.every((n,o)=>n===t[o]):e.length===1&&e[0]===t}function zB(e,t){if(e.startsWith("/"))return e;if(!e)return t;const n=t.split("/"),o=e.split("/"),r=o[o.length-1];(r===".."||r===".")&&o.push("");let s=n.length-1,i,a;for(i=0;i<o.length;i++)if(a=o[i],a!==".")if(a==="..")s>1&&s--;else break;return n.slice(0,s).join("/")+"/"+o.slice(i).join("/")}const Qo={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0};var sa;(function(e){e.pop="pop",e.push="push"})(sa||(sa={}));var qi;(function(e){e.back="back",e.forward="forward",e.unknown=""})(qi||(qi={}));function KB(e){if(!e)if(ms){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),jB(e)}const WB=/^[^#]+#/;function GB(e,t){return e.replace(WB,"#")+t}function QB(e,t){const n=document.documentElement.getBoundingClientRect(),o=e.getBoundingClientRect();return{behavior:t.behavior,left:o.left-n.left-(t.left||0),top:o.top-n.top-(t.top||0)}}const Mu=()=>({left:window.scrollX,top:window.scrollY});function YB(e){let t;if("el"in e){const n=e.el,o=typeof n=="string"&&n.startsWith("#"),r=typeof n=="string"?o?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!r)return;t=QB(r,e)}else t=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left!=null?t.left:window.scrollX,t.top!=null?t.top:window.scrollY)}function _m(e,t){return(history.state?history.state.position-t:-1)+e}const Kd=new Map;function XB(e,t){Kd.set(e,t)}function JB(e){const t=Kd.get(e);return Kd.delete(e),t}let ZB=()=>location.protocol+"//"+location.host;function C_(e,t){const{pathname:n,search:o,hash:r}=t,s=e.indexOf("#");if(s>-1){let a=r.includes(e.slice(s))?e.slice(s).length:1,l=r.slice(a);return l[0]!=="/"&&(l="/"+l),ym(l,"")}return ym(n,e)+o+r}function eM(e,t,n,o){let r=[],s=[],i=null;const a=({state:p})=>{const h=C_(e,location),m=n.value,g=t.value;let v=0;if(p){if(n.value=h,t.value=p,i&&i===m){i=null;return}v=g?p.position-g.position:0}else o(h);r.forEach(y=>{y(n.value,m,{delta:v,type:sa.pop,direction:v?v>0?qi.forward:qi.back:qi.unknown})})};function l(){i=n.value}function u(p){r.push(p);const h=()=>{const m=r.indexOf(p);m>-1&&r.splice(m,1)};return s.push(h),h}function c(){const{history:p}=window;p.state&&p.replaceState(st({},p.state,{scroll:Mu()}),"")}function d(){for(const p of s)p();s=[],window.removeEventListener("popstate",a),window.removeEventListener("beforeunload",c)}return window.addEventListener("popstate",a),window.addEventListener("beforeunload",c,{passive:!0}),{pauseListeners:l,listen:u,destroy:d}}function wm(e,t,n,o=!1,r=!1){return{back:e,current:t,forward:n,replaced:o,position:window.history.length,scroll:r?Mu():null}}function tM(e){const{history:t,location:n}=window,o={value:C_(e,n)},r={value:t.state};r.value||s(o.value,{back:null,current:o.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function s(l,u,c){const d=e.indexOf("#"),p=d>-1?(n.host&&document.querySelector("base")?e:e.slice(d))+l:ZB()+e+l;try{t[c?"replaceState":"pushState"](u,"",p),r.value=u}catch(h){console.error(h),n[c?"replace":"assign"](p)}}function i(l,u){const c=st({},t.state,wm(r.value.back,l,r.value.forward,!0),u,{position:r.value.position});s(l,c,!0),o.value=l}function a(l,u){const c=st({},r.value,t.state,{forward:l,scroll:Mu()});s(c.current,c,!0);const d=st({},wm(o.value,l,null),{position:c.position+1},u);s(l,d,!1),o.value=l}return{location:o,state:r,push:a,replace:i}}function nM(e){e=KB(e);const t=tM(e),n=eM(e,t.state,t.location,t.replace);function o(s,i=!0){i||n.pauseListeners(),history.go(s)}const r=st({location:"",base:e,go:o,createHref:GB.bind(null,e)},t,n);return Object.defineProperty(r,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(r,"state",{enumerable:!0,get:()=>t.state.value}),r}function oM(e){return typeof e=="string"||e&&typeof e=="object"}function x_(e){return typeof e=="string"||typeof e=="symbol"}const E_=Symbol("");var Sm;(function(e){e[e.aborted=4]="aborted",e[e.cancelled=8]="cancelled",e[e.duplicated=16]="duplicated"})(Sm||(Sm={}));function zs(e,t){return st(new Error,{type:e,[E_]:!0},t)}function So(e,t){return e instanceof Error&&E_ in e&&(t==null||!!(e.type&t))}const Cm="[^/]+?",rM={sensitive:!1,strict:!1,start:!0,end:!0},sM=/[.+*?^${}()[\]/\\]/g;function iM(e,t){const n=st({},rM,t),o=[];let r=n.start?"^":"";const s=[];for(const u of e){const c=u.length?[]:[90];n.strict&&!u.length&&(r+="/");for(let d=0;d<u.length;d++){const p=u[d];let h=40+(n.sensitive?.25:0);if(p.type===0)d||(r+="/"),r+=p.value.replace(sM,"\\$&"),h+=40;else if(p.type===1){const{value:m,repeatable:g,optional:v,regexp:y}=p;s.push({name:m,repeatable:g,optional:v});const b=y||Cm;if(b!==Cm){h+=10;try{new RegExp(`(${b})`)}catch(O){throw new Error(`Invalid custom RegExp for param "${m}" (${b}): `+O.message)}}let _=g?`((?:${b})(?:/(?:${b}))*)`:`(${b})`;d||(_=v&&u.length<2?`(?:/${_})`:"/"+_),v&&(_+="?"),r+=_,h+=20,v&&(h+=-8),g&&(h+=-20),b===".*"&&(h+=-50)}c.push(h)}o.push(c)}if(n.strict&&n.end){const u=o.length-1;o[u][o[u].length-1]+=.7000000000000001}n.strict||(r+="/?"),n.end?r+="$":n.strict&&!r.endsWith("/")&&(r+="(?:/|$)");const i=new RegExp(r,n.sensitive?"":"i");function a(u){const c=u.match(i),d={};if(!c)return null;for(let p=1;p<c.length;p++){const h=c[p]||"",m=s[p-1];d[m.name]=h&&m.repeatable?h.split("/"):h}return d}function l(u){let c="",d=!1;for(const p of e){(!d||!c.endsWith("/"))&&(c+="/"),d=!1;for(const h of p)if(h.type===0)c+=h.value;else if(h.type===1){const{value:m,repeatable:g,optional:v}=h,y=m in u?u[m]:"";if(Kn(y)&&!g)throw new Error(`Provided param "${m}" is an array but it is not repeatable (* or + modifiers)`);const b=Kn(y)?y.join("/"):y;if(!b)if(v)p.length<2&&(c.endsWith("/")?c=c.slice(0,-1):d=!0);else throw new Error(`Missing required param "${m}"`);c+=b}}return c||"/"}return{re:i,score:o,keys:s,parse:a,stringify:l}}function aM(e,t){let n=0;for(;n<e.length&&n<t.length;){const o=t[n]-e[n];if(o)return o;n++}return e.length<t.length?e.length===1&&e[0]===80?-1:1:e.length>t.length?t.length===1&&t[0]===80?1:-1:0}function A_(e,t){let n=0;const o=e.score,r=t.score;for(;n<o.length&&n<r.length;){const s=aM(o[n],r[n]);if(s)return s;n++}if(Math.abs(r.length-o.length)===1){if(xm(o))return 1;if(xm(r))return-1}return r.length-o.length}function xm(e){const t=e[e.length-1];return e.length>0&&t[t.length-1]<0}const lM={type:0,value:""},uM=/[a-zA-Z0-9_]/;function cM(e){if(!e)return[[]];if(e==="/")return[[lM]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(h){throw new Error(`ERR (${n})/"${u}": ${h}`)}let n=0,o=n;const r=[];let s;function i(){s&&r.push(s),s=[]}let a=0,l,u="",c="";function d(){u&&(n===0?s.push({type:0,value:u}):n===1||n===2||n===3?(s.length>1&&(l==="*"||l==="+")&&t(`A repeatable param (${u}) must be alone in its segment. eg: '/:ids+.`),s.push({type:1,value:u,regexp:c,repeatable:l==="*"||l==="+",optional:l==="*"||l==="?"})):t("Invalid state to consume buffer"),u="")}function p(){u+=l}for(;a<e.length;){if(l=e[a++],l==="\\"&&n!==2){o=n,n=4;continue}switch(n){case 0:l==="/"?(u&&d(),i()):l===":"?(d(),n=1):p();break;case 4:p(),n=o;break;case 1:l==="("?n=2:uM.test(l)?p():(d(),n=0,l!=="*"&&l!=="?"&&l!=="+"&&a--);break;case 2:l===")"?c[c.length-1]=="\\"?c=c.slice(0,-1)+l:n=3:c+=l;break;case 3:d(),n=0,l!=="*"&&l!=="?"&&l!=="+"&&a--,c="";break;default:t("Unknown state");break}}return n===2&&t(`Unfinished custom RegExp for param "${u}"`),d(),i(),r}function dM(e,t,n){const o=iM(cM(e.path),n),r=st(o,{record:e,parent:t,children:[],alias:[]});return t&&!r.record.aliasOf==!t.record.aliasOf&&t.children.push(r),r}function fM(e,t){const n=[],o=new Map;t=Tm({strict:!1,end:!0,sensitive:!1},t);function r(d){return o.get(d)}function s(d,p,h){const m=!h,g=Am(d);g.aliasOf=h&&h.record;const v=Tm(t,d),y=[g];if("alias"in d){const O=typeof d.alias=="string"?[d.alias]:d.alias;for(const T of O)y.push(Am(st({},g,{components:h?h.record.components:g.components,path:T,aliasOf:h?h.record:g})))}let b,_;for(const O of y){const{path:T}=O;if(p&&T[0]!=="/"){const A=p.record.path,D=A[A.length-1]==="/"?"":"/";O.path=p.record.path+(T&&D+T)}if(b=dM(O,p,v),h?h.alias.push(b):(_=_||b,_!==b&&_.alias.push(b),m&&d.name&&!Om(b)&&i(d.name)),O_(b)&&l(b),g.children){const A=g.children;for(let D=0;D<A.length;D++)s(A[D],b,h&&h.children[D])}h=h||b}return _?()=>{i(_)}:Mi}function i(d){if(x_(d)){const p=o.get(d);p&&(o.delete(d),n.splice(n.indexOf(p),1),p.children.forEach(i),p.alias.forEach(i))}else{const p=n.indexOf(d);p>-1&&(n.splice(p,1),d.record.name&&o.delete(d.record.name),d.children.forEach(i),d.alias.forEach(i))}}function a(){return n}function l(d){const p=mM(d,n);n.splice(p,0,d),d.record.name&&!Om(d)&&o.set(d.record.name,d)}function u(d,p){let h,m={},g,v;if("name"in d&&d.name){if(h=o.get(d.name),!h)throw zs(1,{location:d});v=h.record.name,m=st(Em(p.params,h.keys.filter(_=>!_.optional).concat(h.parent?h.parent.keys.filter(_=>_.optional):[]).map(_=>_.name)),d.params&&Em(d.params,h.keys.map(_=>_.name))),g=h.stringify(m)}else if(d.path!=null)g=d.path,h=n.find(_=>_.re.test(g)),h&&(m=h.parse(g),v=h.record.name);else{if(h=p.name?o.get(p.name):n.find(_=>_.re.test(p.path)),!h)throw zs(1,{location:d,currentLocation:p});v=h.record.name,m=st({},p.params,d.params),g=h.stringify(m)}const y=[];let b=h;for(;b;)y.unshift(b.record),b=b.parent;return{name:v,path:g,params:m,matched:y,meta:hM(y)}}e.forEach(d=>s(d));function c(){n.length=0,o.clear()}return{addRoute:s,resolve:u,removeRoute:i,clearRoutes:c,getRoutes:a,getRecordMatcher:r}}function Em(e,t){const n={};for(const o of t)o in e&&(n[o]=e[o]);return n}function Am(e){const t={path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:e.aliasOf,beforeEnter:e.beforeEnter,props:pM(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in e?e.components||null:e.component&&{default:e.component}};return Object.defineProperty(t,"mods",{value:{}}),t}function pM(e){const t={},n=e.props||!1;if("component"in e)t.default=n;else for(const o in e.components)t[o]=typeof n=="object"?n[o]:n;return t}function Om(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function hM(e){return e.reduce((t,n)=>st(t,n.meta),{})}function Tm(e,t){const n={};for(const o in e)n[o]=o in t?t[o]:e[o];return n}function mM(e,t){let n=0,o=t.length;for(;n!==o;){const s=n+o>>1;A_(e,t[s])<0?o=s:n=s+1}const r=gM(e);return r&&(o=t.lastIndexOf(r,o-1)),o}function gM(e){let t=e;for(;t=t.parent;)if(O_(t)&&A_(e,t)===0)return t}function O_({record:e}){return!!(e.name||e.components&&Object.keys(e.components).length||e.redirect)}function vM(e){const t={};if(e===""||e==="?")return t;const o=(e[0]==="?"?e.slice(1):e).split("&");for(let r=0;r<o.length;++r){const s=o[r].replace(y_," "),i=s.indexOf("="),a=ra(i<0?s:s.slice(0,i)),l=i<0?null:ra(s.slice(i+1));if(a in t){let u=t[a];Kn(u)||(u=t[a]=[u]),u.push(l)}else t[a]=l}return t}function Pm(e){let t="";for(let n in e){const o=e[n];if(n=$B(n),o==null){o!==void 0&&(t+=(t.length?"&":"")+n);continue}(Kn(o)?o.map(s=>s&&zd(s)):[o&&zd(o)]).forEach(s=>{s!==void 0&&(t+=(t.length?"&":"")+n,s!=null&&(t+="="+s))})}return t}function yM(e){const t={};for(const n in e){const o=e[n];o!==void 0&&(t[n]=Kn(o)?o.map(r=>r==null?null:""+r):o==null?o:""+o)}return t}const bM=Symbol(""),km=Symbol(""),qu=Symbol(""),np=Symbol(""),Wd=Symbol("");function hi(){let e=[];function t(o){return e.push(o),()=>{const r=e.indexOf(o);r>-1&&e.splice(r,1)}}function n(){e=[]}return{add:t,list:()=>e.slice(),reset:n}}function or(e,t,n,o,r,s=i=>i()){const i=o&&(o.enterCallbacks[r]=o.enterCallbacks[r]||[]);return()=>new Promise((a,l)=>{const u=p=>{p===!1?l(zs(4,{from:n,to:t})):p instanceof Error?l(p):oM(p)?l(zs(2,{from:t,to:p})):(i&&o.enterCallbacks[r]===i&&typeof p=="function"&&i.push(p),a())},c=s(()=>e.call(o&&o.instances[r],t,n,u));let d=Promise.resolve(c);e.length<3&&(d=d.then(u)),d.catch(p=>l(p))})}function Cc(e,t,n,o,r=s=>s()){const s=[];for(const i of e)for(const a in i.components){let l=i.components[a];if(!(t!=="beforeRouteEnter"&&!i.instances[a]))if(g_(l)){const c=(l.__vccOpts||l)[t];c&&s.push(or(c,n,o,i,a,r))}else{let u=l();s.push(()=>u.then(c=>{if(!c)throw new Error(`Couldn't resolve component "${a}" at "${i.path}"`);const d=AB(c)?c.default:c;i.mods[a]=c,i.components[a]=d;const h=(d.__vccOpts||d)[t];return h&&or(h,n,o,i,a,r)()}))}}return s}function Im(e){const t=kt(qu),n=kt(np),o=U(()=>{const l=f(e.to);return t.resolve(l)}),r=U(()=>{const{matched:l}=o.value,{length:u}=l,c=l[u-1],d=n.matched;if(!c||!d.length)return-1;const p=d.findIndex(Hs.bind(null,c));if(p>-1)return p;const h=Dm(l[u-2]);return u>1&&Dm(c)===h&&d[d.length-1].path!==h?d.findIndex(Hs.bind(null,l[u-2])):p}),s=U(()=>r.value>-1&&xM(n.params,o.value.params)),i=U(()=>r.value>-1&&r.value===n.matched.length-1&&S_(n.params,o.value.params));function a(l={}){if(CM(l)){const u=t[f(e.replace)?"replace":"push"](f(e.to)).catch(Mi);return e.viewTransition&&typeof document<"u"&&"startViewTransition"in document&&document.startViewTransition(()=>u),u}return Promise.resolve()}return{route:o,href:U(()=>o.value.href),isActive:s,isExactActive:i,navigate:a}}function _M(e){return e.length===1?e[0]:e}const wM=F({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"},viewTransition:Boolean},useLink:Im,setup(e,{slots:t}){const n=Ht(Im(e)),{options:o}=kt(qu),r=U(()=>({[Rm(e.activeClass,o.linkActiveClass,"router-link-active")]:n.isActive,[Rm(e.exactActiveClass,o.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const s=t.default&&_M(t.default(n));return e.custom?s:un("a",{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:r.value},s)}}}),SM=wM;function CM(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget&&e.currentTarget.getAttribute){const t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function xM(e,t){for(const n in t){const o=t[n],r=e[n];if(typeof o=="string"){if(o!==r)return!1}else if(!Kn(r)||r.length!==o.length||o.some((s,i)=>s!==r[i]))return!1}return!0}function Dm(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const Rm=(e,t,n)=>e??t??n,EM=F({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){const o=kt(Wd),r=U(()=>e.route||o.value),s=kt(km,0),i=U(()=>{let u=f(s);const{matched:c}=r.value;let d;for(;(d=c[u])&&!d.components;)u++;return u}),a=U(()=>r.value.matched[i.value]);Nn(km,U(()=>i.value+1)),Nn(bM,a),Nn(Wd,r);const l=N();return Ce(()=>[l.value,a.value,e.name],([u,c,d],[p,h,m])=>{c&&(c.instances[d]=u,h&&h!==c&&u&&u===p&&(c.leaveGuards.size||(c.leaveGuards=h.leaveGuards),c.updateGuards.size||(c.updateGuards=h.updateGuards))),u&&c&&(!h||!Hs(c,h)||!p)&&(c.enterCallbacks[d]||[]).forEach(g=>g(u))},{flush:"post"}),()=>{const u=r.value,c=e.name,d=a.value,p=d&&d.components[c];if(!p)return Bm(n.default,{Component:p,route:u});const h=d.props[c],m=h?h===!0?u.params:typeof h=="function"?h(u):h:null,v=un(p,st({},m,t,{onVnodeUnmounted:y=>{y.component.isUnmounted&&(d.instances[c]=null)},ref:l}));return Bm(n.default,{Component:v,route:u})||v}}});function Bm(e,t){if(!e)return null;const n=e(t);return n.length===1?n[0]:n}const AM=EM;function OM(e){const t=fM(e.routes,e),n=e.parseQuery||vM,o=e.stringifyQuery||Pm,r=e.history,s=hi(),i=hi(),a=hi(),l=Cn(Qo);let u=Qo;ms&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const c=wc.bind(null,x=>""+x),d=wc.bind(null,LB),p=wc.bind(null,ra);function h(x,z){let H,X;return x_(x)?(H=t.getRecordMatcher(x),X=z):X=x,t.addRoute(X,H)}function m(x){const z=t.getRecordMatcher(x);z&&t.removeRoute(z)}function g(){return t.getRoutes().map(x=>x.record)}function v(x){return!!t.getRecordMatcher(x)}function y(x,z){if(z=st({},z||l.value),typeof x=="string"){const j=Sc(n,x,z.path),K=t.resolve({path:j.path},z),Z=r.createHref(j.fullPath);return st(j,K,{params:p(K.params),hash:ra(j.hash),redirectedFrom:void 0,href:Z})}let H;if(x.path!=null)H=st({},x,{path:Sc(n,x.path,z.path).path});else{const j=st({},x.params);for(const K in j)j[K]==null&&delete j[K];H=st({},x,{params:d(j)}),z.params=d(z.params)}const X=t.resolve(H,z),pe=x.hash||"";X.params=c(p(X.params));const S=VB(o,st({},x,{hash:qB(pe),path:X.path})),I=r.createHref(S);return st({fullPath:S,hash:pe,query:o===Pm?yM(x.query):x.query||{}},X,{redirectedFrom:void 0,href:I})}function b(x){return typeof x=="string"?Sc(n,x,l.value.path):st({},x)}function _(x,z){if(u!==x)return zs(8,{from:z,to:x})}function O(x){return D(x)}function T(x){return O(st(b(x),{replace:!0}))}function A(x){const z=x.matched[x.matched.length-1];if(z&&z.redirect){const{redirect:H}=z;let X=typeof H=="function"?H(x):H;return typeof X=="string"&&(X=X.includes("?")||X.includes("#")?X=b(X):{path:X},X.params={}),st({query:x.query,hash:x.hash,params:X.path!=null?{}:x.params},X)}}function D(x,z){const H=u=y(x),X=l.value,pe=x.state,S=x.force,I=x.replace===!0,j=A(H);if(j)return D(st(b(j),{state:typeof j=="object"?st({},pe,j.state):pe,force:S,replace:I}),z||H);const K=H;K.redirectedFrom=z;let Z;return!S&&UB(o,X,H)&&(Z=zs(16,{to:K,from:X}),ee(X,X,!0,!1)),(Z?Promise.resolve(Z):k(K,X)).catch(Q=>So(Q)?So(Q,2)?Q:Y(Q):L(Q,K,X)).then(Q=>{if(Q){if(So(Q,2))return D(st({replace:I},b(Q.to),{state:typeof Q.to=="object"?st({},pe,Q.to.state):pe,force:S}),z||K)}else Q=R(K,X,!0,I,pe);return $(K,X,Q),Q})}function P(x,z){const H=_(x,z);return H?Promise.reject(H):Promise.resolve()}function w(x){const z=me.values().next().value;return z&&typeof z.runWithContext=="function"?z.runWithContext(x):x()}function k(x,z){let H;const[X,pe,S]=TM(x,z);H=Cc(X.reverse(),"beforeRouteLeave",x,z);for(const j of X)j.leaveGuards.forEach(K=>{H.push(or(K,x,z))});const I=P.bind(null,x,z);return H.push(I),Se(H).then(()=>{H=[];for(const j of s.list())H.push(or(j,x,z));return H.push(I),Se(H)}).then(()=>{H=Cc(pe,"beforeRouteUpdate",x,z);for(const j of pe)j.updateGuards.forEach(K=>{H.push(or(K,x,z))});return H.push(I),Se(H)}).then(()=>{H=[];for(const j of S)if(j.beforeEnter)if(Kn(j.beforeEnter))for(const K of j.beforeEnter)H.push(or(K,x,z));else H.push(or(j.beforeEnter,x,z));return H.push(I),Se(H)}).then(()=>(x.matched.forEach(j=>j.enterCallbacks={}),H=Cc(S,"beforeRouteEnter",x,z,w),H.push(I),Se(H))).then(()=>{H=[];for(const j of i.list())H.push(or(j,x,z));return H.push(I),Se(H)}).catch(j=>So(j,8)?j:Promise.reject(j))}function $(x,z,H){a.list().forEach(X=>w(()=>X(x,z,H)))}function R(x,z,H,X,pe){const S=_(x,z);if(S)return S;const I=z===Qo,j=ms?history.state:{};H&&(X||I?r.replace(x.fullPath,st({scroll:I&&j&&j.scroll},pe)):r.push(x.fullPath,pe)),l.value=x,ee(x,z,H,I),Y()}let G;function J(){G||(G=r.listen((x,z,H)=>{if(!Pe.listening)return;const X=y(x),pe=A(X);if(pe){D(st(pe,{replace:!0,force:!0}),X).catch(Mi);return}u=X;const S=l.value;ms&&XB(_m(S.fullPath,H.delta),Mu()),k(X,S).catch(I=>So(I,12)?I:So(I,2)?(D(st(b(I.to),{force:!0}),X).then(j=>{So(j,20)&&!H.delta&&H.type===sa.pop&&r.go(-1,!1)}).catch(Mi),Promise.reject()):(H.delta&&r.go(-H.delta,!1),L(I,X,S))).then(I=>{I=I||R(X,S,!1),I&&(H.delta&&!So(I,8)?r.go(-H.delta,!1):H.type===sa.pop&&So(I,20)&&r.go(-1,!1)),$(X,S,I)}).catch(Mi)}))}let ne=hi(),ae=hi(),re;function L(x,z,H){Y(x);const X=ae.list();return X.length?X.forEach(pe=>pe(x,z,H)):console.error(x),Promise.reject(x)}function oe(){return re&&l.value!==Qo?Promise.resolve():new Promise((x,z)=>{ne.add([x,z])})}function Y(x){return re||(re=!x,J(),ne.list().forEach(([z,H])=>x?H(x):z()),ne.reset()),x}function ee(x,z,H,X){const{scrollBehavior:pe}=e;if(!ms||!pe)return Promise.resolve();const S=!H&&JB(_m(x.fullPath,0))||(X||!H)&&history.state&&history.state.scroll||null;return We().then(()=>pe(x,z,S)).then(I=>I&&YB(I)).catch(I=>L(I,x,z))}const le=x=>r.go(x);let ye;const me=new Set,Pe={currentRoute:l,listening:!0,addRoute:h,removeRoute:m,clearRoutes:t.clearRoutes,hasRoute:v,getRoutes:g,resolve:y,options:e,push:O,replace:T,go:le,back:()=>le(-1),forward:()=>le(1),beforeEach:s.add,beforeResolve:i.add,afterEach:a.add,onError:ae.add,isReady:oe,install(x){const z=this;x.component("RouterLink",SM),x.component("RouterView",AM),x.config.globalProperties.$router=z,Object.defineProperty(x.config.globalProperties,"$route",{enumerable:!0,get:()=>f(l)}),ms&&!ye&&l.value===Qo&&(ye=!0,O(r.location).catch(pe=>{}));const H={};for(const pe in Qo)Object.defineProperty(H,pe,{get:()=>l.value[pe],enumerable:!0});x.provide(qu,z),x.provide(np,Zl(H)),x.provide(Wd,l);const X=x.unmount;me.add(x),x.unmount=function(){me.delete(x),me.size<1&&(u=Qo,G&&G(),G=null,l.value=Qo,ye=!1,re=!1),X()}}};function Se(x){return x.reduce((z,H)=>z.then(()=>w(H)),Promise.resolve())}return Pe}function TM(e,t){const n=[],o=[],r=[],s=Math.max(t.matched.length,e.matched.length);for(let i=0;i<s;i++){const a=t.matched[i];a&&(e.matched.find(u=>Hs(u,a))?o.push(a):n.push(a));const l=e.matched[i];l&&(t.matched.find(u=>Hs(u,l))||r.push(l))}return[n,o,r]}function Ta(){return kt(qu)}function T_(e){return kt(np)}const PM={class:"w-full flex items-center justify-between"},kM={class:"text-gray-500"},IM=F({__name:"SearchDialog",props:{modelValue:{type:Boolean,default:!1},modelModifiers:{}},emits:["update:modelValue"],setup(e){const t=ts(e,"modelValue"),n=Ta(),o=N(""),r=kt(ep);U(()=>`在 ${(r==null?void 0:r.value)||"All Platforms"} 中搜索应用...`);const{apps:s}=va(m_()),i=U(()=>r!=null&&r.value?s.value.filter(l=>l.platform===r.value):[]),a=l=>{const{id:u,platform:c}=l;t.value=!1,n.push({path:"/details",query:{id:u,platform:c}})};return(l,u)=>{const c=JI,d=Yf,p=Rd;return C(),B(f(Fk),{open:t.value,"onUpdate:open":u[1]||(u[1]=h=>t.value=h)},{default:E(()=>[q(f(Ab),{modelValue:f(o),"onUpdate:modelValue":u[0]||(u[0]=h=>$e(o)?o.value=h:null),placeholder:"Type a command or search..."},null,8,["modelValue"]),q(f(Ob),{class:"h-100"},{default:E(()=>[q(f(Eb),null,{default:E(()=>[q(c,{title:"No apps found in this platform",description:"You can change the platform or search another app"})]),_:1}),q(p,{heading:"apps"},{default:E(()=>[(C(!0),ie(Ie,null,wt(f(i),h=>(C(),B(f(Dd),{value:h.name,key:h.id,onClick:m=>a(h)},{default:E(()=>[ce("div",PM,[q(d,{logo:h.appLogoUrl,name:h.name,description:h.appTagline??""},null,8,["logo","name","description"]),ce("span",kM,Ne(h.platform),1)])]),_:2},1032,["value","onClick"]))),128))]),_:1})]),_:1})]),_:1},8,["open"])}}}),Mm=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,qm=fb,DM=(e,t)=>n=>{var o;if((t==null?void 0:t.variants)==null)return qm(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:r,defaultVariants:s}=t,i=Object.keys(r).map(u=>{const c=n==null?void 0:n[u],d=s==null?void 0:s[u];if(c===null)return null;const p=Mm(c)||Mm(d);return r[u][p]}),a=n&&Object.entries(n).reduce((u,c)=>{let[d,p]=c;return p===void 0||(u[d]=p),u},{}),l=t==null||(o=t.compoundVariants)===null||o===void 0?void 0:o.reduce((u,c)=>{let{class:d,className:p,...h}=c;return Object.entries(h).every(m=>{let[g,v]=m;return Array.isArray(v)?v.includes({...s,...a}[g]):{...s,...a}[g]===v})?[...u,d,p]:u},[]);return qm(e,i,l,n==null?void 0:n.class,n==null?void 0:n.className)},vn=F({__name:"Button",props:{variant:{},size:{},class:{},asChild:{type:Boolean},as:{default:"button"}},setup(e){const t=e;return(n,o)=>(C(),B(f(Ae),{"data-slot":"button",as:n.as,"as-child":n.asChild,class:qe(f(Fe)(f(op)({variant:n.variant,size:n.size}),t.class))},{default:E(()=>[V(n.$slots,"default")]),_:3},8,["as","as-child","class"]))}}),op=DM("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-md font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive cursor-pointer",{variants:{variant:{default:"bg-primary text-primary-foreground shadow-xs hover:bg-primary/90",destructive:"bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-11 rounded-md px-6 has-[>svg]:px-4",icon:"size-9"}},defaultVariants:{variant:"default",size:"lg"}}),rp=F({__name:"Tabs",props:{defaultValue:{},orientation:{},dir:{},activationMode:{},modelValue:{},unmountOnHide:{type:Boolean},asChild:{type:Boolean},as:{},class:{}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,o=t,r=et(n,"class"),s=ft(r,o);return(i,a)=>(C(),B(f(vP),te({"data-slot":"tabs"},f(s),{class:f(Fe)("flex flex-col gap-2",n.class)}),{default:E(()=>[V(i.$slots,"default")]),_:3},16,["class"]))}}),sp=F({__name:"TabsList",props:{loop:{type:Boolean},asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,n=et(t,"class");return(o,r)=>(C(),B(f(wP),te({"data-slot":"tabs-list"},f(n),{class:f(Fe)("bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-lg p-[3px]",t.class)}),{default:E(()=>[V(o.$slots,"default")]),_:3},16,["class"]))}}),ip=F({__name:"TabsTrigger",props:{value:{},disabled:{type:Boolean},asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,n=et(t,"class"),o=Kt(n);return(r,s)=>(C(),B(f(CP),te({"data-slot":"tabs-trigger"},f(o),{class:f(Fe)("data-[state=active]:bg-background dark:data-[state=active]:text-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 text-foreground dark:text-muted-foreground inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-md font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 hover:bg-background hover:text-foreground cursor-pointer text-muted-foreground data-[state=active]:bg-transparent data-[state=active]:text-foreground data-[state=active]:shadow-none",t.class)}),{default:E(()=>[V(r.$slots,"default")]),_:3},16,["class"]))}}),JL=e=>Sr("/system/auth/login",e),ZL=e=>Sr("/system/auth/social-login",e),RM=()=>Sr("/system/auth/logout"),BM=()=>wr("/system/auth/get-user-info"),MM=F({__name:"Avatar",props:{class:{}},setup(e){const t=e;return(n,o)=>(C(),B(f(F1),{"data-slot":"avatar",class:qe(f(Fe)("relative flex size-8 shrink-0 overflow-hidden rounded-full",t.class))},{default:E(()=>[V(n.$slots,"default")]),_:3},8,["class"]))}}),qM=F({__name:"AvatarFallback",props:{delayMs:{},asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,n=et(t,"class");return(o,r)=>(C(),B(f(N1),te({"data-slot":"avatar-fallback"},f(n),{class:f(Fe)("bg-muted flex size-full items-center justify-center rounded-full",t.class)}),{default:E(()=>[V(o.$slots,"default")]),_:3},16,["class"]))}}),$M=F({__name:"AvatarImage",props:{src:{},referrerPolicy:{},crossOrigin:{},asChild:{type:Boolean},as:{}},setup(e){const t=e;return(n,o)=>(C(),B(f(U1),te({"data-slot":"avatar-image"},t,{class:"aspect-square size-full"}),{default:E(()=>[V(n.$slots,"default")]),_:3},16))}}),P_=F({__name:"DropdownMenu",props:{defaultOpen:{type:Boolean},open:{type:Boolean},dir:{},modal:{type:Boolean}},emits:["update:open"],setup(e,{emit:t}){const r=ft(e,t);return(s,i)=>(C(),B(f(BO),te({"data-slot":"dropdown-menu"},f(r)),{default:E(()=>[V(s.$slots,"default")]),_:3},16))}}),k_=F({__name:"DropdownMenuContent",props:{forceMount:{type:Boolean},loop:{type:Boolean},side:{},sideOffset:{default:4},sideFlip:{type:Boolean},align:{},alignOffset:{},alignFlip:{type:Boolean},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},positionStrategy:{},updatePositionStrategy:{},disableUpdateOnLayoutShift:{type:Boolean},prioritizePosition:{type:Boolean},reference:{},asChild:{type:Boolean},as:{},class:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","closeAutoFocus"],setup(e,{emit:t}){const n=e,o=t,r=et(n,"class"),s=ft(r,o);return(i,a)=>(C(),B(f(HO),null,{default:E(()=>[q(f(qO),te({"data-slot":"dropdown-menu-content"},f(s),{class:f(Fe)("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--reka-dropdown-menu-content-available-height) min-w-[8rem] origin-(--reka-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",n.class)}),{default:E(()=>[V(i.$slots,"default")]),_:3},16,["class"])]),_:3}))}}),FM=F({__name:"DropdownMenuGroup",props:{asChild:{type:Boolean},as:{}},setup(e){const t=e;return(n,o)=>(C(),B(f(FO),te({"data-slot":"dropdown-menu-group"},t),{default:E(()=>[V(n.$slots,"default")]),_:3},16))}}),Br=F({__name:"DropdownMenuItem",props:{disabled:{type:Boolean},textValue:{},asChild:{type:Boolean},as:{},class:{},inset:{type:Boolean},variant:{default:"default"}},setup(e){const t=e,n=et(t,"inset","variant","class"),o=Kt(n);return(r,s)=>(C(),B(f(NO),te({"data-slot":"dropdown-menu-item","data-inset":r.inset?"":void 0,"data-variant":r.variant},f(o),{class:f(Fe)("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive-foreground data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/40 data-[variant=destructive]:focus:text-destructive-foreground data-[variant=destructive]:*:[svg]:!text-destructive-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t.class)}),{default:E(()=>[V(r.$slots,"default")]),_:3},16,["data-inset","data-variant","class"]))}}),LM=F({__name:"DropdownMenuLabel",props:{asChild:{type:Boolean},as:{},class:{},inset:{type:Boolean}},setup(e){const t=e,n=et(t,"class","inset"),o=Kt(n);return(r,s)=>(C(),B(f(VO),te({"data-slot":"dropdown-menu-label","data-inset":r.inset?"":void 0},f(o),{class:f(Fe)("px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",t.class)}),{default:E(()=>[V(r.$slots,"default")]),_:3},16,["data-inset","class"]))}}),$m=F({__name:"DropdownMenuSeparator",props:{asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,n=et(t,"class");return(o,r)=>(C(),B(f(KO),te({"data-slot":"dropdown-menu-separator"},f(n),{class:f(Fe)("bg-border -mx-1 my-1 h-px",t.class)}),null,16,["class"]))}}),I_=F({__name:"DropdownMenuTrigger",props:{disabled:{type:Boolean},asChild:{type:Boolean},as:{}},setup(e){const n=Kt(e);return(o,r)=>(C(),B(f(GO),te({"data-slot":"dropdown-menu-trigger"},f(n)),{default:E(()=>[V(o.$slots,"default")]),_:3},16))}}),D_=bf("user",()=>{const e=N({avatar:"",nickname:"",username:""});return{userInfo:e,fetchUserInfo:async()=>{const n=await BM();e.value=n}}}),NM=F({__name:"UserAvatar",setup(e){const t=D_(),{userInfo:n}=va(t),o=Ta(),r=N([{to:"/apps",label:"我的App"},{to:"/favorites",label:"我的收藏"},{to:"/settings",label:"设置"}]),s=async()=>{try{await RM(),localStorage.removeItem("accessToken"),localStorage.removeItem("refreshToken"),console.log("Logout successful"),o.replace("/auth")}catch(i){console.error("Logout failed",i)}};return(i,a)=>{const l=pf("RouterLink");return C(),B(f(P_),{modal:!1},{default:E(()=>[q(f(I_),{"as-child":""},{default:E(()=>[q(f(MM),{class:"cursor-pointer"},{default:E(()=>[q(f($M),{src:f(n).avatar},null,8,["src"]),q(f(qM),null,{default:E(()=>{var u;return[rt(Ne(((u=f(n).nickname[0])==null?void 0:u.toUpperCase())||"U"),1)]}),_:1})]),_:1})]),_:1}),q(f(k_),{class:"w-48",align:"end","side-offset":8},{default:E(()=>[q(f(LM),null,{default:E(()=>a[0]||(a[0]=[rt("我的账户",-1)])),_:1,__:[0]}),q(f($m)),q(f(FM),null,{default:E(()=>[(C(!0),ie(Ie,null,wt(r.value,u=>(C(),B(f(Br),{key:u.to,"as-child":""},{default:E(()=>[q(l,{to:u.to,class:"cursor-pointer"},{default:E(()=>[rt(Ne(u.label),1)]),_:2},1032,["to"])]),_:2},1024))),128))]),_:1}),q(f($m)),q(f(Br),{class:"cursor-pointer",onClick:s},{default:E(()=>a[1]||(a[1]=[rt(" 退出登录 ",-1)])),_:1,__:[1]})]),_:1})]),_:1})}}}),jM=[{label:"ios",value:"ios",icon:"mdi:apple"},{label:"android",value:"android",icon:"mdi:android"},{label:"web",value:"web",icon:"mdi:web"}],Ks=[{label:"Apps",value:"appCategories",icon:"duo-icons:app",categoryType:0},{label:"Screens",value:"screenPatterns",icon:"simple-line-icons:screen-smartphone",categoryType:1},{label:"UI Elements",value:"screenElements",icon:"humbleicons:switch-on",categoryType:2},{label:"Flows",value:"flowActions",icon:"fluent:flow-32-regular",categoryType:3}],ql=[...Ks.slice(0,2),...Ks.slice(2)],VM={class:"grid grid-cols-3 gap-4 items-center fixed top-0 left-0 right-0 h-18 shrink-0 z-1 bg-background px-4 lg:px-20"},UM={class:"col-span-1 flex items-center h-full"},HM={class:"col-span-1 h-full flex items-center py-3"},zM={class:"col-span-1 h-full flex justify-end items-center"},KM=F({__name:"Header",props:{modelValue:{required:!0},modelModifiers:{}},emits:Un(["searchClick","platformClick"],["update:modelValue"]),setup(e,{emit:t}){const n=ts(e,"modelValue"),o=t,r=l=>({ios:"iOS",android:"Android",web:"Web"})[l]||l,s=U(()=>`在 ${r(n.value)} 上搜索...`),i=l=>{o("platformClick",l)},a=()=>{o("searchClick")};return(l,u)=>{const c=Ho;return C(),ie("div",VM,[ce("div",UM,[q(f(rp),{modelValue:n.value,"onUpdate:modelValue":u[0]||(u[0]=d=>n.value=d)},{default:E(()=>[q(f(sp),{class:"bg-transparent p-0"},{default:E(()=>[(C(!0),ie(Ie,null,wt(f(jM),d=>(C(),B(f(ip),{key:d.label,value:d.label,onClick:p=>i(d.value)},{default:E(()=>[q(c,{icon:d.icon,class:"h-4 w-4 mr-2"},null,8,["icon"]),rt(" "+Ne(r(d.value)),1)]),_:2},1032,["value","onClick"]))),128))]),_:1})]),_:1},8,["modelValue"])]),ce("div",HM,[q(f(vn),{variant:"outline",class:"w-full justify-start text-muted-foreground rounded-full cursor-pointer",onClick:a},{default:E(()=>[q(c,{icon:"lucide:search",class:"h-4 w-4 mr-2"}),rt(" "+Ne(s.value),1)]),_:1})]),ce("div",zM,[q(f(NM))])])}}}),WM=F({__name:"Sonner",props:{invert:{type:Boolean},theme:{},position:{},hotkey:{},richColors:{type:Boolean},expand:{type:Boolean},duration:{},gap:{},visibleToasts:{},closeButton:{type:Boolean},toastOptions:{},class:{},style:{},offset:{},mobileOffset:{},dir:{},swipeDirections:{},icons:{},containerAriaLabel:{}},setup(e){const t=e;return(n,o)=>(C(),B(f(wB),te({class:"toaster group"},t,{style:{"--normal-bg":"var(--popover)","--normal-text":"var(--popover-foreground)","--normal-border":"var(--border)"}}),null,16))}}),GM=()=>wr("/admin/app-category/list-all"),Gd=e=>{if(e===null||typeof e!="object")return e;if(e instanceof Date)return new Date(e.getTime());if(Array.isArray(e))return e.map(n=>Gd(n));const t={};for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=Gd(e[n]));return t},cl=(e,t,n)=>{const o=new Map,r=e.map(a=>{const l=Gd(a),u={...l,id:l[t.id],label:l[t.label],value:l[t.value],level:1,parentId:l[t.parentId]??null,expanded:!1};return o.set(u.id,u),u}),s=[];r.forEach(a=>{if(a.parentId!==null){const l=a.parentId!==void 0?o.get(a.parentId):void 0;l?(a.level=l.level+1,l.children||(l.children=[]),l.children.push(a)):s.push(a)}else s.push(a)});const i=a=>(n!=null&&n.order&&(a.sort((l,u)=>{const c=l[n.order],d=u[n.order];return typeof c=="number"&&typeof d=="number"?c-d:String(c).localeCompare(String(d))}),a.forEach(l=>{var u;(u=l.children)!=null&&u.length&&(l.children=i(l.children))})),a);return i(s)},Fm=(e,t)=>{const n=new Set(e),o=new Set(t);let r=0;for(const s of n)o.has(s)&&r++;return r},QM=(e,t={})=>{const{keepChildren:n=!1,keepLevel:o=!1,keepExpanded:r=!1}=t,s=[],i=(a,l=null)=>{(Array.isArray(a)?a:[a]).forEach(c=>{var p;const d={};Object.entries(c).forEach(([h,m])=>{["children","level","expanded","parentId","label"].includes(h)||(d[h]=m)}),n&&c.children&&(d.children=c.children),o&&(d.level=c.level),r&&c.expanded!==void 0&&(d.expanded=c.expanded),l!==null&&(d.parentId=l),s.push(d),(p=c.children)!=null&&p.length&&i(c.children,c.id)})};return i(e),s},$u=bf("definition",()=>{const e=N([]);return{definitions:e,fetchDefinitions:async()=>{const n=await GM();e.value=cl(n,{id:"id",label:"displayName",value:"id",parentId:"parentId"},{order:"orderNum"})}}}),YM=F({__name:"App",setup(e){const t=Ta(),n=T_(),{fetchDefinitions:o}=$u(),{fetchApps:r}=m_(),s=["auth","settings","chat"],i=N("ios");Nn(ep,U(()=>i.value));const a=()=>{c.value=!0},l=h=>{t.replace("/"),i.value=h,localStorage.setItem("platform",h)},u=()=>{const h=localStorage.getItem("platform");h?i.value=h:(i.value="ios",localStorage.setItem("platform","ios"))},c=N(!1),d=U(()=>!s.includes(n.name)),p=U(()=>n.name!=="chat");return je(()=>{u(),o(),r(i.value)}),(h,m)=>{const g=pf("RouterView"),v=IM;return C(),ie(Ie,null,[ce("div",{class:qe(["w-full max-w-[2000px] mx-auto relative h-full min-h-full",{"px-4 lg:px-20":f(p),"pt-18":f(d)}])},[f(d)?(C(),B(KM,{key:0,modelValue:f(i),"onUpdate:modelValue":m[0]||(m[0]=y=>$e(i)?i.value=y:null),onSearchClick:a,onPlatformClick:l},null,8,["modelValue"])):Be("",!0),q(g)],2),q(v,{modelValue:f(c),"onUpdate:modelValue":m[1]||(m[1]=y=>$e(c)?c.value=y:null)},null,8,["modelValue"]),q(f(WM),{position:"top-right",richColors:"",closeButton:""})],64)}}}),XM="modulepreload",JM=function(e){return"/"+e},Lm={},mi=function(t,n,o){let r=Promise.resolve();if(n&&n.length>0){let i=function(u){return Promise.all(u.map(c=>Promise.resolve(c).then(d=>({status:"fulfilled",value:d}),d=>({status:"rejected",reason:d}))))};document.getElementsByTagName("link");const a=document.querySelector("meta[property=csp-nonce]"),l=(a==null?void 0:a.nonce)||(a==null?void 0:a.getAttribute("nonce"));r=i(n.map(u=>{if(u=JM(u),u in Lm)return;Lm[u]=!0;const c=u.endsWith(".css"),d=c?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${u}"]${d}`))return;const p=document.createElement("link");if(p.rel=c?"stylesheet":XM,c||(p.as="script"),p.crossOrigin="",p.href=u,l&&p.setAttribute("nonce",l),document.head.appendChild(p),c)return new Promise((h,m)=>{p.addEventListener("load",h),p.addEventListener("error",()=>m(new Error(`Unable to preload CSS for ${u}`)))})}))}function s(i){const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=i,window.dispatchEvent(a),!a.defaultPrevented)throw i}return r.then(i=>{for(const a of i||[])a.status==="rejected"&&s(a.reason);return t().catch(s)})},ZM=F({__name:"AlertDialog",props:{open:{type:Boolean},defaultOpen:{type:Boolean}},emits:["update:open"],setup(e,{emit:t}){const r=ft(e,t);return(s,i)=>(C(),B(f(P1),te({"data-slot":"alert-dialog"},f(r)),{default:E(()=>[V(s.$slots,"default")]),_:3},16))}}),eq=F({__name:"AlertDialogAction",props:{asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,n=et(t,"class");return(o,r)=>(C(),B(f(m1),te(f(n),{class:f(Fe)(f(op)(),t.class)}),{default:E(()=>[V(o.$slots,"default")]),_:3},16,["class"]))}}),tq=F({__name:"AlertDialogCancel",props:{asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,n=et(t,"class");return(o,r)=>(C(),B(f(w1),te(f(n),{class:f(Fe)(f(op)({variant:"outline"}),"mt-2 sm:mt-0",t.class)}),{default:E(()=>[V(o.$slots,"default")]),_:3},16,["class"]))}}),nq=F({__name:"AlertDialogContent",props:{forceMount:{type:Boolean},disableOutsidePointerEvents:{type:Boolean},asChild:{type:Boolean},as:{},class:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(e,{emit:t}){const n=e,o=t,r=et(n,"class"),s=ft(r,o);return(i,a)=>(C(),B(f(O1),null,{default:E(()=>[q(f(E1),{"data-slot":"alert-dialog-overlay",class:"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/80"}),q(f(b1),te({"data-slot":"alert-dialog-content"},f(s),{class:f(Fe)("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",n.class)}),{default:E(()=>[V(i.$slots,"default")]),_:3},16,["class"])]),_:3}))}}),oq=F({__name:"AlertDialogDescription",props:{asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,n=et(t,"class");return(o,r)=>(C(),B(f(C1),te({"data-slot":"alert-dialog-description"},f(n),{class:f(Fe)("text-muted-foreground text-sm",t.class)}),{default:E(()=>[V(o.$slots,"default")]),_:3},16,["class"]))}}),rq=F({__name:"AlertDialogFooter",props:{class:{}},setup(e){const t=e;return(n,o)=>(C(),ie("div",{"data-slot":"alert-dialog-footer",class:qe(f(Fe)("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",t.class))},[V(n.$slots,"default")],2))}}),sq=F({__name:"AlertDialogHeader",props:{class:{}},setup(e){const t=e;return(n,o)=>(C(),ie("div",{"data-slot":"alert-dialog-header",class:qe(f(Fe)("flex flex-col gap-2 text-center sm:text-left",t.class))},[V(n.$slots,"default")],2))}}),iq=F({__name:"AlertDialogTitle",props:{asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,n=et(t,"class");return(o,r)=>(C(),B(f(I1),te({"data-slot":"alert-dialog-title"},f(n),{class:f(Fe)("text-lg font-semibold",t.class)}),{default:E(()=>[V(o.$slots,"default")]),_:3},16,["class"]))}}),aq=F({__name:"AlertDialogTrigger",props:{asChild:{type:Boolean},as:{}},setup(e){const t=e;return(n,o)=>(C(),B(f(R1),te({"data-slot":"alert-dialog-trigger"},t),{default:E(()=>[V(n.$slots,"default")]),_:3},16))}}),ap=F({__name:"AlertConfirm",props:Un({title:{},description:{default:""},cancelText:{default:"cancel"},actionText:{default:"confirm"}},{modelValue:{type:Boolean,required:!1},modelModifiers:{}}),emits:Un(["confirm"],["update:modelValue"]),setup(e,{expose:t,emit:n}){const o=n,r=ts(e,"modelValue"),s=()=>{o("confirm"),r.value=!1},i=()=>{r.value=!1};return t({open:()=>r.value=!0,close:()=>r.value=!1}),(a,l)=>(C(),B(f(ZM),{open:r.value,"onUpdate:open":l[0]||(l[0]=u=>r.value=u)},{default:E(()=>[q(f(aq),{"as-child":""},{default:E(()=>[V(a.$slots,"default")]),_:3}),q(f(nq),null,{default:E(()=>[q(f(sq),null,{default:E(()=>[q(f(iq),null,{default:E(()=>[rt(Ne(a.title),1)]),_:1}),q(f(oq),null,{default:E(()=>[rt(Ne(a.description),1)]),_:1})]),_:1}),q(f(rq),null,{default:E(()=>[q(f(tq),{onClick:i},{default:E(()=>[rt(Ne(a.cancelText),1)]),_:1}),q(f(eq),{onClick:s},{default:E(()=>[rt(Ne(a.actionText),1)]),_:1})]),_:1})]),_:1})]),_:3},8,["open"]))}}),R_=F({__name:"ScrollBar",props:{orientation:{default:"vertical"},forceMount:{type:Boolean},asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,n=et(t,"class");return(o,r)=>(C(),B(f(mT),te({"data-slot":"scroll-area-scrollbar"},f(n),{class:f(Fe)("flex touch-none p-px transition-colors select-none",o.orientation==="vertical"&&"h-full w-2.5 border-l border-l-transparent",o.orientation==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent",t.class)}),{default:E(()=>[q(f(_T),{"data-slot":"scroll-area-thumb",class:"bg-border relative flex-1 rounded-full"})]),_:1},16,["class"]))}}),lp=F({__name:"ScrollArea",props:{type:{},dir:{},scrollHideDelay:{},asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,n=et(t,"class");return(o,r)=>(C(),B(f(XO),te({"data-slot":"scroll-area"},f(n),{class:f(Fe)("relative",t.class)}),{default:E(()=>[q(f(ST),{"data-slot":"scroll-area-viewport",class:"focus-visible:ring-ring/50 size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:outline-1"},{default:E(()=>[V(o.$slots,"default")]),_:3}),q(R_),q(f(tT))]),_:3},16,["class"]))}}),lq=e=>Sr("/admin/favorite/create-app-favorite",{...e,favoriteType:1}),eN=e=>wr("/admin/app/page",{...e,type:2}),uq=e=>Sr("/admin/favorite-section/create",e),tN=e=>wr("/admin/app-section/get-favorite",e),xc=F({__name:"Tooltip",props:{defaultOpen:{type:Boolean},open:{type:Boolean},delayDuration:{},disableHoverableContent:{type:Boolean},disableClosingTrigger:{type:Boolean},disabled:{type:Boolean},ignoreNonKeyboardFocus:{type:Boolean}},emits:["update:open"],setup(e,{emit:t}){const r=ft(e,t);return(s,i)=>(C(),B(f(IP),te({"data-slot":"tooltip"},f(r)),{default:E(()=>[V(s.$slots,"default")]),_:3},16))}}),Ec=F({inheritAttrs:!1,__name:"TooltipContent",props:{forceMount:{type:Boolean},ariaLabel:{},asChild:{type:Boolean},as:{},side:{},sideOffset:{default:4},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},positionStrategy:{},updatePositionStrategy:{},class:{}},emits:["escapeKeyDown","pointerDownOutside"],setup(e,{emit:t}){const n=e,o=t,r=et(n,"class"),s=ft(r,o);return(i,a)=>(C(),B(f(FP),null,{default:E(()=>[q(f(qP),te({"data-slot":"tooltip-content"},{...f(s),...i.$attrs},{class:f(Fe)("bg-primary text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit rounded-md px-3 py-1.5 text-xs text-balance",n.class)}),{default:E(()=>[V(i.$slots,"default"),q(f(EP),{class:"bg-primary fill-primary z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]"})]),_:3},16,["class"])]),_:3}))}}),Ac=F({__name:"TooltipProvider",props:{delayDuration:{default:0},skipDelayDuration:{},disableHoverableContent:{type:Boolean},disableClosingTrigger:{type:Boolean},disabled:{type:Boolean},ignoreNonKeyboardFocus:{type:Boolean}},setup(e){const t=e;return(n,o)=>(C(),B(f(TP),ct(yt(t)),{default:E(()=>[V(n.$slots,"default")]),_:3},16))}}),Oc=F({__name:"TooltipTrigger",props:{reference:{},asChild:{type:Boolean},as:{}},setup(e){const t=e;return(n,o)=>(C(),B(f(NP),te({"data-slot":"tooltip-trigger"},t),{default:E(()=>[V(n.$slots,"default")]),_:3},16))}}),Tc=N(null);function cq(){return{copiedScreen:Tc,copyScreen:n=>{Tc.value=JSON.parse(JSON.stringify(n))},clearClipboard:()=>{Tc.value=null}}}var dq=Object.defineProperty,$l=Object.getOwnPropertySymbols,B_=Object.prototype.hasOwnProperty,M_=Object.prototype.propertyIsEnumerable,Nm=(e,t,n)=>t in e?dq(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,vs=(e,t)=>{for(var n in t||(t={}))B_.call(t,n)&&Nm(e,n,t[n]);if($l)for(var n of $l(t))M_.call(t,n)&&Nm(e,n,t[n]);return e},q_=(e,t)=>{var n={};for(var o in e)B_.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&$l)for(var o of $l(e))t.indexOf(o)<0&&M_.call(e,o)&&(n[o]=e[o]);return n};const $_="[vue-draggable-plus]: ";function fq(e){console.warn($_+e)}function pq(e){console.error($_+e)}function jm(e,t,n){return n>=0&&n<e.length&&e.splice(n,0,e.splice(t,1)[0]),e}function hq(e){return e.replace(/-(\w)/g,(t,n)=>n?n.toUpperCase():"")}function mq(e){return Object.keys(e).reduce((t,n)=>(typeof e[n]<"u"&&(t[hq(n)]=e[n]),t),{})}function Vm(e,t){return Array.isArray(e)&&e.splice(t,1),e}function Um(e,t,n){return Array.isArray(e)&&e.splice(t,0,n),e}function gq(e){return typeof e>"u"}function vq(e){return typeof e=="string"}function Hm(e,t,n){const o=e.children[n];e.insertBefore(t,o)}function Pc(e){e.parentNode&&e.parentNode.removeChild(e)}function yq(e,t=document){var n;let o=null;return typeof(t==null?void 0:t.querySelector)=="function"?o=(n=t==null?void 0:t.querySelector)==null?void 0:n.call(t,e):o=document.querySelector(e),o||fq(`Element not found: ${e}`),o}function bq(e,t,n=null){return function(...o){return e.apply(n,o),t.apply(n,o)}}function _q(e,t){const n=vs({},e);return Object.keys(t).forEach(o=>{n[o]?n[o]=bq(e[o],t[o]):n[o]=t[o]}),n}function wq(e){return e instanceof HTMLElement}function zm(e,t){Object.keys(e).forEach(n=>{t(n,e[n])})}function Sq(e){return e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97)}const Cq=Object.assign;/**!
DesignScreenshot/output/user_info_run/2_homepage_after_login.html:110:              transform 0.3s ease-out`}},[q(m,{variant:"outline",class:"rounded-full",border:!1,onClick:d[0]||(d[0]=Ze(v=>c.$emit("save",c.id),["stop"]))},{default:E(()=>d[2]||(d[2]=[rt(" save ",-1)])),_:1,__:[2]}),q(m,{class:"rounded-full",border:!1,onClick:d[1]||(d[1]=Ze(v=>c.$emit("copy",c.id),["stop"]))},{default:E(()=>d[3]||(d[3]=[rt(" copy ",-1)])),_:1,__:[3]})],2)],2)]),c.name||c.logo?(C(),B(g,{key:0,name:c.name,logo:c.logo,class:"flex-shrink-0 relative z-30 mt-1"},null,8,["name","logo"])):Be("",!0)],2)}}}),og=F({__name:"Checkbox",props:{defaultValue:{type:[Boolean,String]},modelValue:{type:[Boolean,String,null]},disabled:{type:Boolean},value:{},id:{},asChild:{type:Boolean},as:{},name:{},required:{type:Boolean},class:{}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,o=t,r=et(n,"class"),s=ft(r,o);return(i,a)=>(C(),B(f(iE),te({"data-slot":"checkbox"},f(s),{class:f(Fe)("peer border-input data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",n.class)}),{default:E(()=>[q(f(lE),{"data-slot":"checkbox-indicator",class:"flex items-center justify-center text-current transition-none"},{default:E(()=>[V(i.$slots,"default",{},()=>[q(f(xb),{class:"size-3.5"})])]),_:3})]),_:3},16,["class"]))}}),P$=F({__name:"Popover",props:{defaultOpen:{type:Boolean},open:{type:Boolean},modal:{type:Boolean}},emits:["update:open"],setup(e,{emit:t}){const r=ft(e,t);return(s,i)=>(C(),B(f(_O),te({"data-slot":"popover"},f(r)),{default:E(()=>[V(s.$slots,"default")]),_:3},16))}}),k$=F({inheritAttrs:!1,__name:"PopoverContent",props:{forceMount:{type:Boolean},side:{},sideOffset:{default:4},sideFlip:{type:Boolean},align:{default:"center"},alignOffset:{},alignFlip:{type:Boolean},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},positionStrategy:{},updatePositionStrategy:{},disableUpdateOnLayoutShift:{type:Boolean},prioritizePosition:{type:Boolean},reference:{},asChild:{type:Boolean},as:{},disableOutsidePointerEvents:{type:Boolean},class:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(e,{emit:t}){const n=e,o=t,r=et(n,"class"),s=ft(r,o);return(i,a)=>(C(),B(f(PO),null,{default:E(()=>[q(f(OO),te({"data-slot":"popover-content"},{...f(s),...i.$attrs},{class:f(Fe)("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 rounded-md border p-4 shadow-md origin-(--reka-popover-content-transform-origin) outline-hidden",n.class)}),{default:E(()=>[V(i.$slots,"default")]),_:3},16,["class"])]),_:3}))}}),I$=F({__name:"PopoverTrigger",props:{asChild:{type:Boolean},as:{}},setup(e){const t=e;return(n,o)=>(C(),B(f(IO),te({"data-slot":"popover-trigger"},t),{default:E(()=>[V(n.$slots,"default")]),_:3},16))}}),D$={class:"truncate text-left"},R$={key:0,class:"ml-1.5 font-normal text-xs px-1.5 py-0.5 bg-background/20 rounded-full"},B$={key:0,class:"text-xs mt-1 text-muted-foreground"},M$=["for"],q$=["for"],$$=F({__name:"Dropdown",props:{defaultLabel:{},data:{},selectionMode:{default:"single"},placement:{default:"center"},searchable:{type:Boolean,default:!0}},emits:["change"],setup(e,{expose:t,emit:n}){const o=n,r=N(!1),s=N(""),i=N([]),a=U(()=>!e.data||e.data.length===0||e.data.every(h=>!h.children||h.children.length===0)),l=U(()=>{var h;return((h=e.data)==null?void 0:h.flatMap(m=>m.children??[]))??[]}),u=U(()=>l.value.filter(h=>i.value.includes(h.id))),c=U(()=>{if(!e.data)return[];const h=s.value.toLowerCase();return e.data.map(m=>{var v;const g=(v=m.children)==null?void 0:v.filter(y=>{const b=i.value.includes(y.id),_=y.label.toLowerCase().includes(h);return h?_:!b});return g&&g.length>0?{...m,children:g}:null}).filter(m=>m!==null)}),d=h=>{if(e.selectionMode==="single")i.value=i.value[0]===h?[]:[h],r.value=!1;else{const m=[...i.value],g=m.indexOf(h);g>-1?m.splice(g,1):m.push(h),i.value=m}},p=()=>{i.value=[],s.value=""};return Ce(u,h=>{o("change",h)},{deep:!0}),t({clear:p}),(h,m)=>(C(),B(f(P$),{open:f(r),"onUpdate:open":m[1]||(m[1]=g=>$e(r)?r.value=g:null)},{default:E(()=>[q(f(I$),{"as-child":""},{default:E(()=>[q(f(vn),{variant:f(u).length>0?"default":"outline",role:"combobox","aria-expanded":f(r),class:"h-11 justify-between px-4 font-semibold rounded-full transition-colors duration-200"},{default:E(()=>{var g;return[ce("span",D$,[f(u).length===0?(C(),ie(Ie,{key:0},[rt(Ne(h.defaultLabel),1)],64)):(C(),ie(Ie,{key:1},[rt(Ne((g=f(u)[0])==null?void 0:g.label)+" ",1),h.selectionMode==="multiple"&&f(u).length>1?(C(),ie("span",R$," +"+Ne(f(u).length-1),1)):Be("",!0)],64))]),f(u).length>0?(C(),B(f(Pk),{key:0,class:"ml-2 h-4 w-4 shrink-0 opacity-50",onClick:Ze(p,["stop","prevent"])})):(C(),B(f(Kf),{key:1,class:qe(["ml-2 h-4 w-4 shrink-0 opacity-50 transition-transform",{"rotate-180":f(r)}])},null,8,["class"]))]}),_:1},8,["variant","aria-expanded"])]),_:1}),q(f(k$),{class:"w-80 p-0",align:h.placement},{default:E(()=>[q(f(Cb),{class:"max-h-[480px] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md"},{default:E(()=>[h.searchable?(C(),B(f(Ab),{key:0,modelValue:f(s),"onUpdate:modelValue":m[0]||(m[0]=g=>$e(s)?s.value=g:null),placeholder:"搜索...",class:"h-10 w-full rounded-none border-0 border-b focus-visible:ring-0 focus-visible:ring-offset-0"},null,8,["modelValue"])):Be("",!0),q(f(Ob),{class:"flex-1 overflow-y-auto overscroll-contain custom-scrollbar"},{default:E(()=>[q(f(Eb),{class:"py-6 text-center text-sm"},{default:E(()=>[ce("p",null,Ne(f(a)?"暂无数据":"未找到结果"),1),f(a)?Be("",!0):(C(),ie("p",B$,"请尝试其他关键词"))]),_:1}),f(u).length>0&&f(s)===""?(C(),B(f(Rd),{key:0,heading:"已选"},{default:E(()=>[(C(!0),ie(Ie,null,wt(f(u),g=>(C(),B(f(Dd),{key:`selected-${g.id}`,value:g.label,onSelect:Ze(v=>d(g.id),["prevent"]),class:"cursor-pointer"},{default:E(()=>[q(f(og),{id:`selected-${g.id}`,"model-value":!0,class:"mr-2"},null,8,["id"]),ce("label",{for:`selected-${g.id}`,class:"cursor-pointer"},Ne(g.label),9,M$)]),_:2},1032,["value","onSelect"]))),128))]),_:1})):Be("",!0),(C(!0),ie(Ie,null,wt(f(c),g=>(C(),B(f(Rd),{key:g.label,heading:g.label},{default:E(()=>[(C(!0),ie(Ie,null,wt(g.children,v=>(C(),B(f(Dd),{key:v.id,value:v.label,onSelect:Ze(y=>d(v.id),["prevent"]),class:"cursor-pointer"},{default:E(()=>[q(f(og),{id:v.id,"model-value":f(i).includes(v.id),class:"mr-2"},null,8,["id","model-value"]),ce("label",{for:v.id,class:"cursor-pointer"},Ne(v.label),9,q$)]),_:2},1032,["value","onSelect"]))),128))]),_:2},1032,["heading"]))),128))]),_:1})]),_:1})]),_:1},8,["align"])]),_:1},8,["open"]))}}),gl=Lu($$,[["__scopeId","data-v-cce68d8f"]]),F$={class:"flex flex-col gap-6"},L$={class:"flex gap-8"},N$={class:"w-24 h-24"},j$={class:"flex-1 flex items-center"},V$={class:"text-5xl font-semibold text-primary"},U$={class:"flex gap-8"},H$={class:"flex flex-col gap-1"},z$={class:"text-sm font-semibold text-primary text-center"},K$={class:"flex flex-col gap-1"},W$={class:"text-sm font-semibold text-primary text-center"},G$=F({__name:"StoreAppCard",props:{logoUrl:{},name:{},description:{},platform:{},rating:{},categories:{}},emits:["click"],setup(e,{emit:t}){return(n,o)=>{var s;const r=ri;return C(),ie("div",F$,[ce("div",L$,[ce("div",N$,[q(r,{src:n.logoUrl,class:"rounded-3xl"},null,8,["src"])]),ce("div",j$,[ce("span",V$,Ne(n.name)+"—"+Ne(n.description),1)])]),ce("div",U$,[ce("div",H$,[o[0]||(o[0]=ce("span",{class:"text-sm text-textSecondary"},"Platform",-1)),ce("span",z$,Ne(n.platform),1)]),ce("div",K$,[o[1]||(o[1]=ce("span",{class:"text-sm text-textSecondary"},"Category",-1)),ce("span",W$,Ne((s=n.categories)==null?void 0:s.join(", ")),1)])])])}}}),Q$=e=>Sr("/admin/app-info/create",e),Y$=e=>wr("/admin/screen/page",e),X$=F({__name:"Select",props:{open:{type:Boolean},defaultOpen:{type:Boolean},defaultValue:{},modelValue:{},by:{type:[String,Function]},dir:{},multiple:{type:Boolean},autocomplete:{},disabled:{type:Boolean},name:{},required:{type:Boolean}},emits:["update:modelValue","update:open"],setup(e,{emit:t}){const r=ft(e,t);return(s,i)=>(C(),B(f(kT),te({"data-slot":"select"},f(r)),{default:E(()=>[V(s.$slots,"default")]),_:3},16))}}),J$=F({inheritAttrs:!1,__name:"SelectContent",props:{forceMount:{type:Boolean},position:{default:"popper"},bodyLock:{type:Boolean},side:{},sideOffset:{},sideFlip:{type:Boolean},align:{},alignOffset:{},alignFlip:{type:Boolean},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},positionStrategy:{},updatePositionStrategy:{},disableUpdateOnLayoutShift:{type:Boolean},prioritizePosition:{type:Boolean},reference:{},asChild:{type:Boolean},as:{},class:{}},emits:["closeAutoFocus","escapeKeyDown","pointerDownOutside"],setup(e,{emit:t}){const n=e,o=t,r=et(n,"class"),s=ft(r,o);return(i,a)=>(C(),B(f(oP),null,{default:E(()=>[q(f(UT),te({"data-slot":"select-content"},{...f(s),...i.$attrs},{class:f(Fe)("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--reka-select-content-available-height) min-w-[8rem] overflow-x-hidden overflow-y-auto rounded-md border shadow-md",i.position==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",n.class)}),{default:E(()=>[q(f(oF)),q(f(hP),{class:qe(f(Fe)("p-1",i.position==="popper"&&"h-[var(--reka-select-trigger-height)] w-full min-w-[var(--reka-select-trigger-width)] scroll-my-1"))},{default:E(()=>[V(i.$slots,"default")]),_:3},8,["class"]),q(f(nF))]),_:3},16,["class"])]),_:3}))}}),Z$=F({__name:"SelectGroup",props:{asChild:{type:Boolean},as:{}},setup(e){const t=e;return(n,o)=>(C(),B(f(KT),te({"data-slot":"select-group"},t),{default:E(()=>[V(n.$slots,"default")]),_:3},16))}}),eF={class:"absolute right-2 flex size-3.5 items-center justify-center"},tF=F({__name:"SelectItem",props:{value:{},disabled:{type:Boolean},textValue:{},asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,n=et(t,"class"),o=Kt(n);return(r,s)=>(C(),B(f(XT),te({"data-slot":"select-item"},f(o),{class:f(Fe)("focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",t.class)}),{default:E(()=>[ce("span",eF,[q(f(ZT),null,{default:E(()=>[q(f(xb),{class:"size-4"})]),_:1})]),q(f(tP),null,{default:E(()=>[V(r.$slots,"default")]),_:3})]),_:3},16,["class"]))}}),nF=F({__name:"SelectScrollDownButton",props:{asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,n=et(t,"class"),o=Kt(n);return(r,s)=>(C(),B(f(iP),te({"data-slot":"select-scroll-down-button"},f(o),{class:f(Fe)("flex cursor-default items-center justify-center py-1",t.class)}),{default:E(()=>[V(r.$slots,"default",{},()=>[q(f(Kf),{class:"size-4"})])]),_:3},16,["class"]))}}),oF=F({__name:"SelectScrollUpButton",props:{asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,n=et(t,"class"),o=Kt(n);return(r,s)=>(C(),B(f(lP),te({"data-slot":"select-scroll-up-button"},f(o),{class:f(Fe)("flex cursor-default items-center justify-center py-1",t.class)}),{default:E(()=>[V(r.$slots,"default",{},()=>[q(f(Tk),{class:"size-4"})])]),_:3},16,["class"]))}}),rF=F({__name:"SelectTrigger",props:{disabled:{type:Boolean},reference:{},asChild:{type:Boolean},as:{},class:{},size:{default:"default"}},setup(e){const t=e,n=et(t,"class","size"),o=Kt(n);return(r,s)=>(C(),B(f(cP),te({"data-slot":"select-trigger","data-size":r.size},f(o),{class:f(Fe)("border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t.class)}),{default:E(()=>[V(r.$slots,"default"),q(f(GT),{"as-child":""},{default:E(()=>[q(f(Kf),{class:"size-4 opacity-50"})]),_:1})]),_:3},16,["data-size","class"]))}}),sF=F({__name:"SelectValue",props:{placeholder:{},asChild:{type:Boolean},as:{}},setup(e){const t=e;return(n,o)=>(C(),B(f(fP),te({"data-slot":"select-value"},t),{default:E(()=>[V(n.$slots,"default")]),_:3},16))}}),rg=e=>Array.isArray(e)&&e.length>0,iF={class:"flex flex-col gap-3 pb-10"},aF={class:"sticky-dropdown-filters flex py-2 gap-2"},lF={key:1,class:"text-center p-10"},uF=F({__name:"Details",setup(e){const t=T_(),{definitions:n}=va($u()),o=ya(),r=N(t.query.platform),s=U(()=>((r==null?void 0:r.value)==="web"?ql:Ks).slice(1)),i=N(s.value[0].label),a=T=>{var P;const A=(P=s.value.find(w=>w.label===T))==null?void 0:P.value,D=n.value.find(w=>w.slug===A&&w.platformType===r.value);return D==null?void 0:D.children},l=U(()=>Number(t.query.id)),{data:u,isLoading:c}=hC({queryKey:["appDetails",l],queryFn:async()=>{const T=await xB(l.value)||[];return rg(T)&&(T.sort((A,D)=>new Date(D.createTime).getTime()-new Date(A.createTime).getTime()),T.forEach(A=>{A.appSections=A.appSections||[]})),T},enabled:U(()=>!!l.value)}),d=N(""),p=U(()=>u.value?u.value.map(T=>({id:T.externalVersionId,label:T.createTime,value:T.externalVersionId})):[]);Ce(()=>u.value,T=>{T&&rg(T)&&(d.value=T[0].externalVersionId)},{immediate:!0});const h=U(()=>{var T;return!u.value||!d.value?(T=u.value)==null?void 0:T[0]:u.value.find(A=>A.externalVersionId===d.value)}),m=N();Ce(h,T=>{T?m.value=JSON.parse(JSON.stringify(T)):m.value=void 0},{deep:!0,immediate:!0});const g=N([]),v=T=>{g.value=(T==null?void 0:T.map(A=>A.displayName))||[]},y=U(()=>{if(m.value&&m.value.appSections)return m.value.appSections.map(A=>A.screens).flat().filter(Boolean)}),b=U(()=>{if(y.value&&y.value.length>0){let T=y.value;return g.value.length>0&&(i.value==="Screens"&&(T=T.filter(A=>A.screenPatterns&&Fm(A.screenPatterns,g.value))),i.value==="UI Elements"&&(T=T.filter(A=>A.screenElements&&Fm(A.screenElements,g.value)))),T}}),_=Ii({mutationFn:Q$,onSuccess:()=>{o.invalidateQueries({queryKey:["appDetails",l.value]})}}),O=()=>{if(!m.value||!m.value.id){console.warn("App info not available to create a new AppInfo.");return}_.mutate({appId:m.value.id})};return(T,A)=>{const D=G$,P=gl,w=Ho,k=tw,$=T$;return C(),ie("div",iF,[f(m)?(C(),B(D,{key:0,name:f(m).appName,"logo-url":f(m).appLogoUrl,platform:f(m).platform,description:f(m).appTagline,categories:f(m).allAppCategories},null,8,["name","logo-url","platform","description","categories"])):Be("",!0),q(f(rp),{modelValue:f(i),"onUpdate:modelValue":A[0]||(A[0]=R=>$e(i)?i.value=R:null),class:"!-ml-2"},{default:E(()=>[q(f(sp),{class:"bg-transparent p-0"},{default:E(()=>[(C(!0),ie(Ie,null,wt(f(s),R=>(C(),B(f(ip),{key:R.label,value:R.label,class:"!font-bold"},{default:E(()=>[rt(Ne(R.label),1)]),_:2},1032,["value"]))),128))]),_:1})]),_:1},8,["modelValue"]),ce("div",aF,[q(f(X$),{modelValue:f(d),"onUpdate:modelValue":A[1]||(A[1]=R=>$e(d)?d.value=R:null)},{default:E(()=>[q(f(rF),{class:"w-60 !h-11 rounded-full"},{default:E(()=>[q(f(sF),{placeholder:"Version",class:"font-bold truncate text-base"})]),_:1}),q(f(J$),null,{default:E(()=>[q(f(Z$),null,{default:E(()=>[(C(!0),ie(Ie,null,wt(f(p),R=>(C(),B(f(tF),{key:R.id,value:R.value},{default:E(()=>[rt(Ne(R.label),1)]),_:2},1032,["value"]))),128))]),_:1})]),_:1})]),_:1},8,["modelValue"]),(C(),B(P,{key:f(i),"default-label":f(i),data:a(f(i)),onChange:v,"selection-mode":"multiple",placement:"start"},null,8,["default-label","data"])),f(i)==="Flows"?(C(),B(f(ap),{key:0,title:"确定要创建新的Flow吗？",description:"这将创建一个新的App的Flow版本。",onConfirm:O},{default:E(()=>[q(f(vn),{disabled:f(_).isPending.value,class:"flex items-center gap-2 cursor-pointer"},{default:E(()=>[q(w,{icon:f(_).isPending.value?"eos-icons:loading":"ep:plus",class:"text-sm"},null,8,["icon"]),A[3]||(A[3]=ce("span",null,"Create New Flow",-1))]),_:1,__:[3]},8,["disabled"])]),_:1})):Be("",!0)]),f(c)?(C(),ie("div",lF,"Loading...")):f(i)==="Screens"||f(i)==="UI Elements"||f(i)==="Marketing Pages"?(C(),ie("div",{key:2,class:qe(["grid gap-x-5 gap-y-12 flex-1",f(r)==="web"?"grid-cols-[repeat(auto-fill,minmax(min(100%,500px),1fr))]":"grid-cols-[repeat(auto-fill,minmax(min(100%,230px),1fr))]"])},[(C(!0),ie(Ie,null,wt(f(b),(R,G)=>(C(),B(k,{key:G,id:R.id,src:R.screenUrl,platform:f(r)},null,8,["id","src","platform"]))),128))],2)):Be("",!0),f(i)==="Flows"&&f(m)?(C(),B($,{key:3,modelValue:f(m).appSections,"onUpdate:modelValue":A[2]||(A[2]=R=>f(m).appSections=R),platform:f(r),"app-info-id":f(m).id},null,8,["modelValue","platform","app-info-id"])):Be("",!0)])}}}),cF=Lu(uF,[["__scopeId","data-v-282accd6"]]);function dF(e){return Object.prototype.toString.call(e)==="[object Object]"}function sg(e){return dF(e)||Array.isArray(e)}function fF(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function fp(e,t){const n=Object.keys(e),o=Object.keys(t);if(n.length!==o.length)return!1;const r=JSON.stringify(Object.keys(e.breakpoints||{})),s=JSON.stringify(Object.keys(t.breakpoints||{}));return r!==s?!1:n.every(i=>{const a=e[i],l=t[i];return typeof a=="function"?`${a}`==`${l}`:!sg(a)||!sg(l)?a===l:fp(a,l)})}function ig(e){return e.concat().sort((t,n)=>t.name>n.name?1:-1).map(t=>t.options)}function pF(e,t){if(e.length!==t.length)return!1;const n=ig(e),o=ig(t);return n.every((r,s)=>{const i=o[s];return fp(r,i)})}function pp(e){return typeof e=="number"}function ef(e){return typeof e=="string"}function Nu(e){return typeof e=="boolean"}function ag(e){return Object.prototype.toString.call(e)==="[object Object]"}function _t(e){return Math.abs(e)}function hp(e){return Math.sign(e)}function Vi(e,t){return _t(e-t)}function hF(e,t){if(e===0||t===0||_t(e)<=_t(t))return 0;const n=Vi(_t(e),_t(t));return _t(n/e)}function mF(e){return Math.round(e*100)/100}function ia(e){return aa(e).map(Number)}function jn(e){return e[Ia(e)]}function Ia(e){return Math.max(0,e.length-1)}function mp(e,t){return t===Ia(e)}function lg(e,t=0){return Array.from(Array(e),(n,o)=>t+o)}function aa(e){return Object.keys(e)}function nw(e,t){return[e,t].reduce((n,o)=>(aa(o).forEach(r=>{const s=n[r],i=o[r],a=ag(s)&&ag(i);n[r]=a?nw(s,i):i}),n),{})}function tf(e,t){return typeof t.MouseEvent<"u"&&e instanceof t.MouseEvent}function gF(e,t){const n={start:o,center:r,end:s};function o(){return 0}function r(l){return s(l)/2}function s(l){return t-l}function i(l,u){return ef(e)?n[e](l):e(t,l,u)}return{measure:i}}function la(){let e=[];function t(r,s,i,a={passive:!0}){let l;if("addEventListener"in r)r.addEventListener(s,i,a),l=()=>r.removeEventListener(s,i,a);else{const u=r;u.addListener(i),l=()=>u.removeListener(i)}return e.push(l),o}function n(){e=e.filter(r=>r())}const o={add:t,clear:n};return o}function vF(e,t,n,o){const r=la(),s=1e3/60;let i=null,a=0,l=0;function u(){r.add(e,"visibilitychange",()=>{e.hidden&&m()})}function c(){h(),r.clear()}function d(v){if(!l)return;i||(i=v,n(),n());const y=v-i;for(i=v,a+=y;a>=s;)n(),a-=s;const b=a/s;o(b),l&&(l=t.requestAnimationFrame(d))}function p(){l||(l=t.requestAnimationFrame(d))}function h(){t.cancelAnimationFrame(l),i=null,a=0,l=0}function m(){i=null,a=0}return{init:u,destroy:c,start:p,stop:h,update:n,render:o}}function yF(e,t){const n=t==="rtl",o=e==="y",r=o?"y":"x",s=o?"x":"y",i=!o&&n?-1:1,a=c(),l=d();function u(m){const{height:g,width:v}=m;return o?g:v}function c(){return o?"top":n?"right":"left"}function d(){return o?"bottom":n?"left":"right"}function p(m){return m*i}return{scroll:r,cross:s,startEdge:a,endEdge:l,measureSize:u,direction:p}}function es(e=0,t=0){const n=_t(e-t);function o(u){return u<e}function r(u){return u>t}function s(u){return o(u)||r(u)}function i(u){return s(u)?o(u)?e:t:u}function a(u){return n?u-n*Math.ceil((u-t)/n):u}return{length:n,max:t,min:e,constrain:i,reachedAny:s,reachedMax:r,reachedMin:o,removeOffset:a}}function ow(e,t,n){const{constrain:o}=es(0,e),r=e+1;let s=i(t);function i(p){return n?_t((r+p)%r):o(p)}function a(){return s}function l(p){return s=i(p),d}function u(p){return c().set(a()+p)}function c(){return ow(e,a(),n)}const d={get:a,set:l,add:u,clone:c};return d}function bF(e,t,n,o,r,s,i,a,l,u,c,d,p,h,m,g,v,y,b){const{cross:_,direction:O}=e,T=["INPUT","SELECT","TEXTAREA"],A={passive:!1},D=la(),P=la(),w=es(50,225).constrain(h.measure(20)),k={mouse:300,touch:400},$={mouse:500,touch:600},R=m?43:25;let G=!1,J=0,ne=0,ae=!1,re=!1,L=!1,oe=!1;function Y(S){if(!b)return;function I(K){(Nu(b)||b(S,K))&&Se(K)}const j=t;D.add(j,"dragstart",K=>K.preventDefault(),A).add(j,"touchmove",()=>{},A).add(j,"touchend",()=>{}).add(j,"touchstart",I).add(j,"mousedown",I).add(j,"touchcancel",z).add(j,"contextmenu",z).add(j,"click",H,!0)}function ee(){D.clear(),P.clear()}function le(){const S=oe?n:t;P.add(S,"touchmove",x,A).add(S,"touchend",z).add(S,"mousemove",x,A).add(S,"mouseup",z)}function ye(S){const I=S.nodeName||"";return T.includes(I)}function me(){return(m?$:k)[oe?"mouse":"touch"]}function Pe(S,I){const j=d.add(hp(S)*-1),K=c.byDistance(S,!m).distance;return m||_t(S)<w?K:v&&I?K*.5:c.byIndex(j.get(),0).distance}function Se(S){const I=tf(S,o);oe=I,L=m&&I&&!S.buttons&&G,G=Vi(r.get(),i.get())>=2,!(I&&S.button!==0)&&(ye(S.target)||(ae=!0,s.pointerDown(S),u.useFriction(0).useDuration(0),r.set(i),le(),J=s.readPoint(S),ne=s.readPoint(S,_),p.emit("pointerDown")))}function x(S){if(!tf(S,o)&&S.touches.length>=2)return z(S);const j=s.readPoint(S),K=s.readPoint(S,_),Z=Vi(j,J),Q=Vi(K,ne);if(!re&&!oe&&(!S.cancelable||(re=Z>Q,!re)))return z(S);const ue=s.pointerMove(S);Z>g&&(L=!0),u.useFriction(.3).useDuration(.75),a.start(),r.add(O(ue)),S.preventDefault()}function z(S){const j=c.byDistance(0,!1).index!==d.get(),K=s.pointerUp(S)*me(),Z=Pe(O(K),j),Q=hF(K,Z),ue=R-10*Q,fe=y+Q/50;re=!1,ae=!1,P.clear(),u.useDuration(ue).useFriction(fe),l.distance(Z,!m),oe=!1,p.emit("pointerUp")}function H(S){L&&(S.stopPropagation(),S.preventDefault(),L=!1)}function X(){return ae}return{init:Y,destroy:ee,pointerDown:X}}function _F(e,t){let o,r;function s(d){return d.timeStamp}function i(d,p){const m=`client${(p||e.scroll)==="x"?"X":"Y"}`;return(tf(d,t)?d:d.touches[0])[m]}function a(d){return o=d,r=d,i(d)}function l(d){const p=i(d)-i(r),h=s(d)-s(o)>170;return r=d,h&&(o=d),p}function u(d){if(!o||!r)return 0;const p=i(r)-i(o),h=s(d)-s(o),m=s(d)-s(r)>170,g=p/h;return h&&!m&&_t(g)>.1?g:0}return{pointerDown:a,pointerMove:l,pointerUp:u,readPoint:i}}function wF(){function e(n){const{offsetTop:o,offsetLeft:r,offsetWidth:s,offsetHeight:i}=n;return{top:o,right:r+s,bottom:o+i,left:r,width:s,height:i}}return{measure:e}}function SF(e){function t(o){return e*(o/100)}return{measure:t}}function CF(e,t,n,o,r,s,i){const a=[e].concat(o);let l,u,c=[],d=!1;function p(v){return r.measureSize(i.measure(v))}function h(v){if(!s)return;u=p(e),c=o.map(p);function y(b){for(const _ of b){if(d)return;const O=_.target===e,T=o.indexOf(_.target),A=O?u:c[T],D=p(O?e:o[T]);if(_t(D-A)>=.5){v.reInit(),t.emit("resize");break}}}l=new ResizeObserver(b=>{(Nu(s)||s(v,b))&&y(b)}),n.requestAnimationFrame(()=>{a.forEach(b=>l.observe(b))})}function m(){d=!0,l&&l.disconnect()}return{init:h,destroy:m}}function xF(e,t,n,o,r,s){let i=0,a=0,l=r,u=s,c=e.get(),d=0;function p(){const A=o.get()-e.get(),D=!l;let P=0;return D?(i=0,n.set(o),e.set(o),P=A):(n.set(e),i+=A/l,i*=u,c+=i,e.add(i),P=c-d),a=hp(P),d=c,T}function h(){const A=o.get()-t.get();return _t(A)<.001}function m(){return l}function g(){return a}function v(){return i}function y(){return _(r)}function b(){return O(s)}function _(A){return l=A,T}function O(A){return u=A,T}const T={direction:g,duration:m,velocity:v,seek:p,settled:h,useBaseFriction:b,useBaseDuration:y,useFriction:O,useDuration:_};return T}function EF(e,t,n,o,r){const s=r.measure(10),i=r.measure(50),a=es(.1,.99);let l=!1;function u(){return!(l||!e.reachedAny(n.get())||!e.reachedAny(t.get()))}function c(h){if(!u())return;const m=e.reachedMin(t.get())?"min":"max",g=_t(e[m]-t.get()),v=n.get()-t.get(),y=a.constrain(g/i);n.subtract(v*y),!h&&_t(v)<s&&(n.set(e.constrain(n.get())),o.useDuration(25).useBaseFriction())}function d(h){l=!h}return{shouldConstrain:u,constrain:c,toggleActive:d}}function AF(e,t,n,o,r){const s=es(-t+e,0),i=d(),a=c(),l=p();function u(m,g){return Vi(m,g)<=1}function c(){const m=i[0],g=jn(i),v=i.lastIndexOf(m),y=i.indexOf(g)+1;return es(v,y)}function d(){return n.map((m,g)=>{const{min:v,max:y}=s,b=s.constrain(m),_=!g,O=mp(n,g);return _?y:O||u(v,b)?v:u(y,b)?y:b}).map(m=>parseFloat(m.toFixed(3)))}function p(){if(t<=e+r)return[s.max];if(o==="keepSnaps")return i;const{min:m,max:g}=a;return i.slice(m,g)}return{snapsContained:l,scrollContainLimit:a}}function OF(e,t,n){const o=t[0],r=n?o-e:jn(t);return{limit:es(r,o)}}function TF(e,t,n,o){const s=t.min+.1,i=t.max+.1,{reachedMin:a,reachedMax:l}=es(s,i);function u(p){return p===1?l(n.get()):p===-1?a(n.get()):!1}function c(p){if(!u(p))return;const h=e*(p*-1);o.forEach(m=>m.add(h))}return{loop:c}}function PF(e){const{max:t,length:n}=e;function o(s){const i=s-t;return n?i/-n:0}return{get:o}}function kF(e,t,n,o,r){const{startEdge:s,endEdge:i}=e,{groupSlides:a}=r,l=d().map(t.measure),u=p(),c=h();function d(){return a(o).map(g=>jn(g)[i]-g[0][s]).map(_t)}function p(){return o.map(g=>n[s]-g[s]).map(g=>-_t(g))}function h(){return a(u).map(g=>g[0]).map((g,v)=>g+l[v])}return{snaps:u,snapsAligned:c}}function IF(e,t,n,o,r,s){const{groupSlides:i}=r,{min:a,max:l}=o,u=c();function c(){const p=i(s),h=!e||t==="keepSnaps";return n.length===1?[s]:h?p:p.slice(a,l).map((m,g,v)=>{const y=!g,b=mp(v,g);if(y){const _=jn(v[0])+1;return lg(_)}if(b){const _=Ia(s)-jn(v)[0]+1;return lg(_,jn(v)[0])}return m})}return{slideRegistry:u}}function DF(e,t,n,o,r){const{reachedAny:s,removeOffset:i,constrain:a}=o;function l(m){return m.concat().sort((g,v)=>_t(g)-_t(v))[0]}function u(m){const g=e?i(m):a(m),v=t.map((b,_)=>({diff:c(b-g,0),index:_})).sort((b,_)=>_t(b.diff)-_t(_.diff)),{index:y}=v[0];return{index:y,distance:g}}function c(m,g){const v=[m,m+n,m-n];if(!e)return m;if(!g)return l(v);const y=v.filter(b=>hp(b)===g);return y.length?l(y):jn(v)-n}function d(m,g){const v=t[m]-r.get(),y=c(v,g);return{index:m,distance:y}}function p(m,g){const v=r.get()+m,{index:y,distance:b}=u(v),_=!e&&s(v);if(!g||_)return{index:y,distance:m};const O=t[y]-b,T=m+c(O,0);return{index:y,distance:T}}return{byDistance:p,byIndex:d,shortcut:c}}function RF(e,t,n,o,r,s,i){function a(d){const p=d.distance,h=d.index!==t.get();s.add(p),p&&(o.duration()?e.start():(e.update(),e.render(1),e.update())),h&&(n.set(t.get()),t.set(d.index),i.emit("select"))}function l(d,p){const h=r.byDistance(d,p);a(h)}function u(d,p){const h=t.clone().set(d),m=r.byIndex(h.get(),p);a(m)}return{distance:l,index:u}}function BF(e,t,n,o,r,s,i,a){const l={passive:!0,capture:!0};let u=0;function c(h){if(!a)return;function m(g){if(new Date().getTime()-u>10)return;i.emit("slideFocusStart"),e.scrollLeft=0;const b=n.findIndex(_=>_.includes(g));pp(b)&&(r.useDuration(0),o.index(b,0),i.emit("slideFocus"))}s.add(document,"keydown",d,!1),t.forEach((g,v)=>{s.add(g,"focus",y=>{(Nu(a)||a(h,y))&&m(v)},l)})}function d(h){h.code==="Tab"&&(u=new Date().getTime())}return{init:c}}function wi(e){let t=e;function n(){return t}function o(l){t=i(l)}function r(l){t+=i(l)}function s(l){t-=i(l)}function i(l){return pp(l)?l:l.get()}return{get:n,set:o,add:r,subtract:s}}function rw(e,t){const n=e.scroll==="x"?i:a,o=t.style;let r=null,s=!1;function i(p){return`translate3d(${p}px,0px,0px)`}function a(p){return`translate3d(0px,${p}px,0px)`}function l(p){if(s)return;const h=mF(e.direction(p));h!==r&&(o.transform=n(h),r=h)}function u(p){s=!p}function c(){s||(o.transform="",t.getAttribute("style")||t.removeAttribute("style"))}return{clear:c,to:l,toggleActive:u}}function MF(e,t,n,o,r,s,i,a,l){const c=ia(r),d=ia(r).reverse(),p=y().concat(b());function h(D,P){return D.reduce((w,k)=>w-r[k],P)}function m(D,P){return D.reduce((w,k)=>h(w,P)>0?w.concat([k]):w,[])}function g(D){return s.map((P,w)=>({start:P-o[w]+.5+D,end:P+t-.5+D}))}function v(D,P,w){const k=g(P);return D.map($=>{const R=w?0:-n,G=w?n:0,J=w?"end":"start",ne=k[$][J];return{index:$,loopPoint:ne,slideLocation:wi(-1),translate:rw(e,l[$]),target:()=>a.get()>ne?R:G}})}function y(){const D=i[0],P=m(d,D);return v(P,n,!1)}function b(){const D=t-i[0]-1,P=m(c,D);return v(P,-n,!0)}function _(){return p.every(({index:D})=>{const P=c.filter(w=>w!==D);return h(P,t)<=.1})}function O(){p.forEach(D=>{const{target:P,translate:w,slideLocation:k}=D,$=P();$!==k.get()&&(w.to($),k.set($))})}function T(){p.forEach(D=>D.translate.clear())}return{canLoop:_,clear:T,loop:O,loopPoints:p}}function qF(e,t,n){let o,r=!1;function s(l){if(!n)return;function u(c){for(const d of c)if(d.type==="childList"){l.reInit(),t.emit("slidesChanged");break}}o=new MutationObserver(c=>{r||(Nu(n)||n(l,c))&&u(c)}),o.observe(e,{childList:!0})}function i(){o&&o.disconnect(),r=!0}return{init:s,destroy:i}}function $F(e,t,n,o){const r={};let s=null,i=null,a,l=!1;function u(){a=new IntersectionObserver(m=>{l||(m.forEach(g=>{const v=t.indexOf(g.target);r[v]=g}),s=null,i=null,n.emit("slidesInView"))},{root:e.parentElement,threshold:o}),t.forEach(m=>a.observe(m))}function c(){a&&a.disconnect(),l=!0}function d(m){return aa(r).reduce((g,v)=>{const y=parseInt(v),{isIntersecting:b}=r[y];return(m&&b||!m&&!b)&&g.push(y),g},[])}function p(m=!0){if(m&&s)return s;if(!m&&i)return i;const g=d(m);return m&&(s=g),m||(i=g),g}return{init:u,destroy:c,get:p}}function FF(e,t,n,o,r,s){const{measureSize:i,startEdge:a,endEdge:l}=e,u=n[0]&&r,c=m(),d=g(),p=n.map(i),h=v();function m(){if(!u)return 0;const b=n[0];return _t(t[a]-b[a])}function g(){if(!u)return 0;const b=s.getComputedStyle(jn(o));return parseFloat(b.getPropertyValue(`margin-${l}`))}function v(){return n.map((b,_,O)=>{const T=!_,A=mp(O,_);return T?p[_]+c:A?p[_]+d:O[_+1][a]-b[a]}).map(_t)}return{slideSizes:p,slideSizesWithGaps:h,startGap:c,endGap:d}}function LF(e,t,n,o,r,s,i,a,l){const{startEdge:u,endEdge:c,direction:d}=e,p=pp(n);function h(y,b){return ia(y).filter(_=>_%b===0).map(_=>y.slice(_,_+b))}function m(y){return y.length?ia(y).reduce((b,_,O)=>{const T=jn(b)||0,A=T===0,D=_===Ia(y),P=r[u]-s[T][u],w=r[u]-s[_][c],k=!o&&A?d(i):0,$=!o&&D?d(a):0,R=_t(w-$-(P+k));return O&&R>t+l&&b.push(_),D&&b.push(y.length),b},[]).map((b,_,O)=>{const T=Math.max(O[_-1]||0);return y.slice(T,b)}):[]}function g(y){return p?h(y,n):m(y)}return{groupSlides:g}}function NF(e,t,n,o,r,s,i){const{align:a,axis:l,direction:u,startIndex:c,loop:d,duration:p,dragFree:h,dragThreshold:m,inViewThreshold:g,slidesToScroll:v,skipSnaps:y,containScroll:b,watchResize:_,watchSlides:O,watchDrag:T,watchFocus:A}=s,D=2,P=wF(),w=P.measure(t),k=n.map(P.measure),$=yF(l,u),R=$.measureSize(w),G=SF(R),J=gF(a,R),ne=!d&&!!b,ae=d||!!b,{slideSizes:re,slideSizesWithGaps:L,startGap:oe,endGap:Y}=FF($,w,k,n,ae,r),ee=LF($,R,v,d,w,k,oe,Y,D),{snaps:le,snapsAligned:ye}=kF($,J,w,k,ee),me=-jn(le)+jn(L),{snapsContained:Pe,scrollContainLimit:Se}=AF(R,me,ye,b,D),x=ne?Pe:ye,{limit:z}=OF(me,x,d),H=ow(Ia(x),c,d),X=H.clone(),pe=ia(n),S=({dragHandler:mt,scrollBody:$t,scrollBounds:Ft,options:{loop:yn}})=>{yn||Ft.constrain(mt.pointerDown()),$t.seek()},I=({scrollBody:mt,translate:$t,location:Ft,offsetLocation:yn,previousLocation:Cr,scrollLooper:Bt,slideLooper:Lt,dragHandler:Qn,animation:Yn,eventHandler:vp,scrollBounds:iw,options:{loop:yp}},bp)=>{const _p=mt.settled(),aw=!iw.shouldConstrain(),wp=yp?_p:_p&&aw,Sp=wp&&!Qn.pointerDown();Sp&&Yn.stop();const lw=Ft.get()*bp+Cr.get()*(1-bp);yn.set(lw),yp&&(Bt.loop(mt.direction()),Lt.loop()),$t.to(yn.get()),Sp&&vp.emit("settle"),wp||vp.emit("scroll")},j=vF(o,r,()=>S(At),mt=>I(At,mt)),K=.68,Z=x[H.get()],Q=wi(Z),ue=wi(Z),fe=wi(Z),de=wi(Z),se=xF(Q,fe,ue,de,p,K),xe=DF(d,x,me,z,de),ge=RF(j,H,X,se,xe,de,i),Ee=PF(z),ke=la(),He=$F(t,n,i,g),{slideRegistry:tt}=IF(ne,b,x,Se,ee,pe),Ye=BF(e,n,tt,ge,se,ke,i,A),At={ownerDocument:o,ownerWindow:r,eventHandler:i,containerRect:w,slideRects:k,animation:j,axis:$,dragHandler:bF($,e,o,r,de,_F($,r),Q,j,ge,se,xe,H,i,G,h,m,y,K,T),eventStore:ke,percentOfView:G,index:H,indexPrevious:X,limit:z,location:Q,offsetLocation:fe,previousLocation:ue,options:s,resizeHandler:CF(t,i,r,n,$,_,P),scrollBody:se,scrollBounds:EF(z,fe,de,se,G),scrollLooper:TF(me,z,fe,[Q,fe,ue,de]),scrollProgress:Ee,scrollSnapList:x.map(Ee.get),scrollSnaps:x,scrollTarget:xe,scrollTo:ge,slideLooper:MF($,R,me,re,L,le,x,fe,n),slideFocus:Ye,slidesHandler:qF(t,i,O),slidesInView:He,slideIndexes:pe,slideRegistry:tt,slidesToScroll:ee,target:de,translate:rw($,t)};return At}function jF(){let e={},t;function n(u){t=u}function o(u){return e[u]||[]}function r(u){return o(u).forEach(c=>c(t,u)),l}function s(u,c){return e[u]=o(u).concat([c]),l}function i(u,c){return e[u]=o(u).filter(d=>d!==c),l}function a(){e={}}const l={init:n,emit:r,off:i,on:s,clear:a};return l}const VF={align:"center",axis:"x",container:null,slides:null,containScroll:"trimSnaps",direction:"ltr",slidesToScroll:1,inViewThreshold:0,breakpoints:{},dragFree:!1,dragThreshold:10,loop:!1,skipSnaps:!1,duration:25,startIndex:0,active:!0,watchDrag:!0,watchResize:!0,watchSlides:!0,watchFocus:!0};function UF(e){function t(s,i){return nw(s,i||{})}function n(s){const i=s.breakpoints||{},a=aa(i).filter(l=>e.matchMedia(l).matches).map(l=>i[l]).reduce((l,u)=>t(l,u),{});return t(s,a)}function o(s){return s.map(i=>aa(i.breakpoints||{})).reduce((i,a)=>i.concat(a),[]).map(e.matchMedia)}return{mergeOptions:t,optionsAtMedia:n,optionsMediaQueries:o}}function HF(e){let t=[];function n(s,i){return t=i.filter(({options:a})=>e.optionsAtMedia(a).active!==!1),t.forEach(a=>a.init(s,e)),i.reduce((a,l)=>Object.assign(a,{[l.name]:l}),{})}function o(){t=t.filter(s=>s.destroy())}return{init:n,destroy:o}}function Ul(e,t,n){const o=e.ownerDocument,r=o.defaultView,s=UF(r),i=HF(s),a=la(),l=jF(),{mergeOptions:u,optionsAtMedia:c,optionsMediaQueries:d}=s,{on:p,off:h,emit:m}=l,g=$;let v=!1,y,b=u(VF,Ul.globalOptions),_=u(b),O=[],T,A,D;function P(){const{container:pe,slides:S}=_;A=(ef(pe)?e.querySelector(pe):pe)||e.children[0];const j=ef(S)?A.querySelectorAll(S):S;D=[].slice.call(j||A.children)}function w(pe){const S=NF(e,A,D,o,r,pe,l);if(pe.loop&&!S.slideLooper.canLoop()){const I=Object.assign({},pe,{loop:!1});return w(I)}return S}function k(pe,S){v||(b=u(b,pe),_=c(b),O=S||O,P(),y=w(_),d([b,...O.map(({options:I})=>I)]).forEach(I=>a.add(I,"change",$)),_.active&&(y.translate.to(y.location.get()),y.animation.init(),y.slidesInView.init(),y.slideFocus.init(X),y.eventHandler.init(X),y.resizeHandler.init(X),y.slidesHandler.init(X),y.options.loop&&y.slideLooper.loop(),A.offsetParent&&D.length&&y.dragHandler.init(X),T=i.init(X,O)))}function $(pe,S){const I=ee();R(),k(u({startIndex:I},pe),S),l.emit("reInit")}function R(){y.dragHandler.destroy(),y.eventStore.clear(),y.translate.clear(),y.slideLooper.clear(),y.resizeHandler.destroy(),y.slidesHandler.destroy(),y.slidesInView.destroy(),y.animation.destroy(),i.destroy(),a.clear()}function G(){v||(v=!0,a.clear(),R(),l.emit("destroy"),l.clear())}function J(pe,S,I){!_.active||v||(y.scrollBody.useBaseFriction().useDuration(S===!0?0:_.duration),y.scrollTo.index(pe,I||0))}function ne(pe){const S=y.index.add(1).get();J(S,pe,-1)}function ae(pe){const S=y.index.add(-1).get();J(S,pe,1)}function re(){return y.index.add(1).get()!==ee()}function L(){return y.index.add(-1).get()!==ee()}function oe(){return y.scrollSnapList}function Y(){return y.scrollProgress.get(y.offsetLocation.get())}function ee(){return y.index.get()}function le(){return y.indexPrevious.get()}function ye(){return y.slidesInView.get()}function me(){return y.slidesInView.get(!1)}function Pe(){return T}function Se(){return y}function x(){return e}function z(){return A}function H(){return D}const X={canScrollNext:re,canScrollPrev:L,containerNode:z,internalEngine:Se,destroy:G,off:h,on:p,emit:m,plugins:Pe,previousScrollSnap:le,reInit:g,rootNode:x,scrollNext:ne,scrollPrev:ae,scrollProgress:Y,scrollSnapList:oe,scrollTo:J,selectedScrollSnap:ee,slideNodes:H,slidesInView:ye,slidesNotInView:me};return k(t,n),setTimeout(()=>l.emit("init"),0),X}Ul.globalOptions=void 0;function gp(e={},t=[]){const n=$e(e),o=$e(t);let r=n?e.value:e,s=o?t.value:t;const i=Cn(),a=Cn();function l(){a.value&&a.value.reInit(r,s)}return je(()=>{!fF()||!i.value||(Ul.globalOptions=gp.globalOptions,a.value=Ul(i.value,r,s))}),Ys(()=>{a.value&&a.value.destroy()}),n&&Ce(e,u=>{fp(r,u)||(r=u,l())}),o&&Ce(t,u=>{pF(s,u)||(s=u,l())}),[i,a]}gp.globalOptions=void 0;const[zF,KF]=bC(({opts:e,orientation:t,plugins:n},o)=>{const[r,s]=gp({...e,axis:t==="horizontal"?"x":"y"},n);function i(){var d;(d=s.value)==null||d.scrollPrev()}function a(){var d;(d=s.value)==null||d.scrollNext()}const l=N(!1),u=N(!1);function c(d){l.value=(d==null?void 0:d.canScrollNext())||!1,u.value=(d==null?void 0:d.canScrollPrev())||!1}return je(()=>{var d,p,h;s.value&&((d=s.value)==null||d.on("init",c),(p=s.value)==null||p.on("reInit",c),(h=s.value)==null||h.on("select",c),o("init-api",s.value))}),{carouselRef:r,carouselApi:s,canScrollPrev:u,canScrollNext:l,scrollPrev:i,scrollNext:a,orientation:t}});function ju(){const e=KF();if(!e)throw new Error("useCarousel must be used within a <Carousel />");return e}const WF=F({__name:"Carousel",props:{opts:{},plugins:{},orientation:{default:"horizontal"},class:{}},emits:["init-api"],setup(e,{expose:t,emit:n}){const o=e,r=n,{canScrollNext:s,canScrollPrev:i,carouselApi:a,carouselRef:l,orientation:u,scrollNext:c,scrollPrev:d}=zF(o,r);t({canScrollNext:s,canScrollPrev:i,carouselApi:a,carouselRef:l,orientation:u,scrollNext:c,scrollPrev:d});function p(h){const m=o.orientation==="vertical"?"ArrowUp":"ArrowLeft",g=o.orientation==="vertical"?"ArrowDown":"ArrowRight";if(h.key===m){h.preventDefault(),d();return}h.key===g&&(h.preventDefault(),c())}return(h,m)=>(C(),ie("div",{"data-slot":"carousel",class:qe(f(Fe)("relative",o.class)),role:"region","aria-roledescription":"carousel",tabindex:"0",onKeydown:p},[V(h.$slots,"default",{canScrollNext:f(s),canScrollPrev:f(i),carouselApi:f(a),carouselRef:f(l),orientation:f(u),scrollNext:f(c),scrollPrev:f(d)})],34))}}),GF=F({__name:"CarouselNext",props:{variant:{default:"outline"},size:{default:"icon"},class:{}},setup(e){const t=e,{orientation:n,canScrollNext:o,scrollNext:r}=ju();return(s,i)=>(C(),B(f(vn),{"data-slot":"carousel-next",disabled:!f(o),class:qe(f(Fe)("absolute size-8 rounded-full",f(n)==="horizontal"?"top-1/2 -right-12 -translate-y-1/2":"-bottom-12 left-1/2 -translate-x-1/2 rotate-90",t.class)),variant:s.variant,size:s.size,onClick:f(r)},{default:E(()=>[V(s.$slots,"default",{},()=>[q(f(Ok)),i[0]||(i[0]=ce("span",{class:"sr-only"},"Next Slide",-1))])]),_:3},8,["disabled","class","variant","size","onClick"]))}}),QF=F({__name:"CarouselPrevious",props:{variant:{default:"outline"},size:{default:"icon"},class:{}},setup(e){const t=e,{orientation:n,canScrollPrev:o,scrollPrev:r}=ju();return(s,i)=>(C(),B(f(vn),{"data-slot":"carousel-previous",disabled:!f(o),class:qe(f(Fe)("absolute size-8 rounded-full",f(n)==="horizontal"?"top-1/2 -left-12 -translate-y-1/2":"-top-12 left-1/2 -translate-x-1/2 rotate-90",t.class)),variant:s.variant,size:s.size,onClick:f(r)},{default:E(()=>[V(s.$slots,"default",{},()=>[q(f(Ak)),i[0]||(i[0]=ce("span",{class:"sr-only"},"Previous Slide",-1))])]),_:3},8,["disabled","class","variant","size","onClick"]))}}),YF=F({inheritAttrs:!1,__name:"CarouselContent",props:{class:{}},setup(e){const t=e,{carouselRef:n,orientation:o}=ju();return(r,s)=>(C(),ie("div",{ref_key:"carouselRef",ref:n,"data-slot":"carousel-content",class:"overflow-hidden h-full"},[ce("div",te({class:f(Fe)("flex",f(o)==="horizontal"?"-ml-4 h-full":"-mt-4 flex-col",t.class)},r.$attrs),[V(r.$slots,"default")],16)],512))}}),XF=F({__name:"CarouselItem",props:{class:{}},setup(e){const t=e,{orientation:n}=ju();return(o,r)=>(C(),ie("div",{"data-slot":"carousel-item",role:"group","aria-roledescription":"slide",class:qe(f(Fe)("min-w-0 shrink-0 grow-0 basis-full",f(n)==="horizontal"?"pl-4":"pt-4",t.class))},[V(o.$slots,"default")],2))}}),JF=F({__name:"AspectRatio",props:{ratio:{},asChild:{type:Boolean},as:{}},setup(e){const t=e;return(n,o)=>(C(),B(f(M1),te({"data-slot":"aspect-ratio"},t),{default:E(()=>[V(n.$slots,"default")]),_:3},16))}}),ZF={class:"relative flex flex-col gap-4 cursor-pointer group"},eL=F({__name:"AppCard",props:Un({name:{},description:{},logo:{},videoUrl:{},previewScreens:{},platform:{},isFavorite:{type:Boolean}},{isFavorite:{type:Boolean,default:!1},isFavoriteModifiers:{}}),emits:Un(["click","toggle-favorite"],["update:isFavorite"]),setup(e,{emit:t}){const n=ts(e,"isFavorite"),o=t,r=U(()=>e.platform==="web"),s={video:"video",image:ri},i=U(()=>r.value?16/10:393/892),a=U(()=>e.videoUrl?[{type:"video",id:"video",props:{src:e.videoUrl,muted:!0,autoplay:!0,loop:!0,playsinline:!0,class:"object-contain"}}]:(e.previewScreens||[]).map(c=>({type:"image",id:c.id,props:{src:c.screenUrl,fit:"contain",class:"object-contain"}}))),l=()=>{o("click")},u=()=>{n.value=!n.value,o("toggle-favorite")};return(c,d)=>{const p=XF,h=YF,m=QF,g=GF,v=WF,y=Yf;return C(),ie("div",ZF,[ce("div",{class:qe(["w-full overflow-hidden bg-[#f0f0f0] rounded-4xl flex items-center justify-center hover:bg-[#f4f4f4] transition-colors duration-300",f(r)?"aspect-[1/1]":"aspect-[7/10]"])},[q(v,{class:qe(["relative w-full h-full max-w-xs",f(r)?"h-[51%]":"h-[85%]"])},{default:E(()=>[q(h,{class:"rounded-2xl",onClick:l},{default:E(()=>[(C(!0),ie(Ie,null,wt(f(a),(b,_)=>(C(),B(p,{key:b.id||_,class:"flex items-center justify-center w-full h-full"},{default:E(()=>[q(f(JF),{ratio:f(i)},{default:E(()=>[(C(),B(ro(s[b.type]),te({ref_for:!0},b.props,{class:["w-full h-full object-contain",f(r)?"rounded-xs":"rounded-2xl"]}),null,16,["class"]))]),_:2},1032,["ratio"])]),_:2},1024))),128))]),_:1}),q(m),q(g)]),_:1},8,["class"])],2),ce("div",{class:"absolute top-2 right-2 z-10 p-2 rounded-full bg-white/50 backdrop-blur-sm opacity-0 group-hover:opacity-100 transition-opacity",onClick:Ze(u,["stop"])},[q(f(Ik),{class:qe(["w-5 h-5 text-yellow-400",n.value?"fill-yellow-400":"fill-none"])},null,8,["class"])]),q(y,{logo:c.logo,name:c.name,description:c.description},null,8,["logo","name","description"])])}}}),tL=Lu(eL,[["__scopeId","data-v-49595ce3"]]),nL={class:"relative w-full overflow-hidden flex items-center"},oL={class:"flex w-max space-x-2"},rL=F({__name:"Filter",props:{platformType:{},type:{}},emits:["change"],setup(e,{expose:t,emit:n}){const o=N(null),r=N(null),{arrivedState:s}=FC(r,{throttle:50}),{left:i,right:a}=dt(s);je(()=>{var v;if(o.value){const y=(v=o.value.$el)==null?void 0:v.querySelector("[data-reka-scroll-area-viewport]");y?r.value=y:console.error("无法找到 ScrollArea 的 viewport 元素。")}});const l=v=>{if(r.value){const y=r.value.offsetWidth*.8;r.value.scrollBy({left:v==="left"?-y:y,behavior:"smooth"})}},u=n,{definitions:c}=va($u()),d=N(),p=U(()=>{var O,T;const y=(O=(e.platformType==="web"?ql:Ks).find(A=>A.label===e.type))==null?void 0:O.value,b=c==null?void 0:c.value.find(A=>A.platformType===e.platformType&&A.slug===y);return(((T=b==null?void 0:b.children)==null?void 0:T.map(A=>A.children).flat())||[]).map(A=>A?{id:typeof A.id=="number"?String(A.id):A.id||"",label:A.label||"",definition:A.definition||"",exampleScreens:Array.isArray(A.exampleScreens)?A.exampleScreens:[]}:null).filter(Boolean)}),h=v=>{d.value=d.value===v?void 0:v},m=v=>{const y=p.value.find(b=>b.id===v);u("change",y)},g=()=>{d.value=void 0};return Ce(d,v=>{m(v)},{immediate:!0}),t({reset:g}),(v,y)=>{const b=Ho;return C(),ie("div",nL,[Fs(q(f(vn),{variant:"outline",class:"absolute left-0 top-1/2 -translate-y-1/2 w-10 rounded-full z-10 bg-background transition-opacity cursor-pointer",onClick:y[0]||(y[0]=_=>l("left"))},{default:E(()=>[q(b,{icon:"lucide:chevron-left",class:"h-4 w-4"})]),_:1},512),[[Yi,!f(i)]]),q(f(lp),{ref_key:"scrollAreaRef",ref:o,class:"flex-1 overflow-auto whitespace-nowrap rounded-md"},{default:E(()=>[ce("div",oL,[(C(!0),ie(Ie,null,wt(p.value,_=>(C(),B(f(vn),{class:"rounded-full cursor-pointer",key:_.id,variant:d.value===_.id?"default":"outline",onClick:O=>h(_.id)},{default:E(()=>[rt(Ne(_.label),1)]),_:2},1032,["variant","onClick"]))),128))])]),_:1},512),Fs(q(f(vn),{variant:"outline",class:"absolute right-0 top-1/2 -translate-y-1/2 w-10 rounded-full z-10 p-0 bg-background transition-opacity cursor-pointer",onClick:y[1]||(y[1]=_=>l("right"))},{default:E(()=>[q(b,{icon:"lucide:chevron-right",class:"h-4 w-4"})]),_:1},512),[[Yi,!f(a)]])])}}}),sL=(e,t=null,n=0)=>{const o=()=>{const r=t==null?void 0:t.value;r?r.scrollHeight-r.scrollTop-r.clientHeight<=n&&e():document.documentElement.scrollHeight-document.documentElement.scrollTop-window.innerHeight<=n&&e()};je(()=>{const r=t==null?void 0:t.value;r?r.addEventListener("scroll",o):window.addEventListener("scroll",o)}),Rt(()=>{const r=t==null?void 0:t.value;r?r.removeEventListener("scroll",o):window.removeEventListener("scroll",o)})},iL={class:"flex flex-col gap-5 py-8"},aL={class:"flex-1 min-w-0 flex flex-col gap-y-5"},lL={class:"flex items-center"},uL={key:0,class:"flex items-center gap-x-2 ml-auto"},cL={key:2,class:"flex flex-col gap-5"},dL={class:"flex gap-4 px-1 py-4"},fL={class:"flex justify-between group hover:cursor-pointer"},pL={class:"flex flex-col gap-2"},hL={class:"flex items-center gap-2 text-xl h-7 font-bold"},mL={class:"flex gap-2 opacity-0 group-hover:opacity-100 transition-all duration-100"},gL=F({__name:"HomeView",setup(e){var oe;const t=Ta(),n=ya(),o=Ii({mutationFn:Y=>A.value.find(le=>le.id===Y)?lq({appId:Y,type:1}):Promise.reject("App not found"),onSuccess:()=>{n.invalidateQueries({queryKey:["app",p,m]})}}),r=Y=>{console.log("Toggling favorite for app:",Y),o.mutate(Y)},s=kt(ep),i=U(()=>(s==null?void 0:s.value)==="web"),a=U(()=>i.value?"web":"mobile"),l=U(()=>a.value),u=$u(),{definitions:c}=va(u),d=U(()=>s?s.value==="web"?ql:Ks:[]),p=N(((oe=d.value[0])==null?void 0:oe.label)||""),h=N(null),m=N(),g=N(),v=N(),y=N(),b=N([]),_=(Y,ee)=>{if(typeof Y=="number")if(ee)b.value.push(Y);else{const le=b.value.indexOf(Y);le>-1&&b.value.splice(le,1)}},O=Y=>{if(!c.value||c.value.length===0)return[];const ee=c.value.find(le=>le.slug===Y&&le.platformType===l.value);return(ee==null?void 0:ee.children)||[]},T=U(()=>p.value||"Apps");Ce(()=>s==null?void 0:s.value,(Y,ee)=>{var ye;if(Y===ee)return;const le=p.value;if(le==="Marketing Pages"&&Y!=="web")p.value="Apps";else{const me=Y==="web"?ql:Ks;me.find(Se=>Se.label===le)||(p.value=((ye=me[0])==null?void 0:ye.label)||"")}ae(),g.value=void 0,v.value=void 0,y.value=void 0,G()},{immediate:!1});const A=U(()=>{var Y;return((Y=w.value)==null?void 0:Y.pages.flatMap(ee=>ee.list))??[]}),D=U(()=>{var Y;return((Y=w.value)==null?void 0:Y.pages.flatMap(ee=>ee.list))??[]}),P=Y=>{var ye;const ee=d.value.find(me=>me.label===p.value),le={platform:s==null?void 0:s.value,type:1,categoryType:ee==null?void 0:ee.categoryType,pageNo:Y,pageSize:20};return(ye=m.value)!=null&&ye.id&&(le.categoryId=m.value.id),le},{data:w,fetchNextPage:k,hasNextPage:$,isFetching:R,refetch:G}=mC({queryKey:["home",p,m],queryFn:async({pageParam:Y=1})=>{const ee=P(Y);return p.value==="Apps"?CB(ee):Y$(ee)},getNextPageParam:(Y,ee)=>{if(!Y)return;const le=Math.ceil(Y.total/20);if(ee.length<le)return ee.length+1},initialPageParam:1}),J=Y=>{m.value=Y},ne=()=>{ae(),g.value=void 0,v.value=void 0,y.value=void 0},ae=()=>{h.value&&h.value.reset(),m.value=void 0};sL(()=>{$.value&&!R.value&&k()});const L=Y=>{t.push({path:"/details",query:{id:Y.id,platform:Y.platform}})};return(Y,ee)=>{const le=rL,ye=tL,me=tw,Pe=ri;return C(),ie("div",iL,[ee[8]||(ee[8]=ce("h1",{class:"text-[44px] font-[600]"},"Discover",-1)),ce("div",aL,[ce("div",lL,[q(f(rp),{modelValue:f(p),"onUpdate:modelValue":[ee[0]||(ee[0]=Se=>$e(p)?p.value=Se:null),ne]},{default:E(()=>[q(f(sp),{class:"bg-transparent p-0"},{default:E(()=>[(C(!0),ie(Ie,null,wt(f(d),Se=>(C(),B(f(ip),{key:Se.label,value:Se.label,class:"!font-bold"},{default:E(()=>[rt(Ne(Se.label),1)]),_:2},1032,["value"]))),128))]),_:1})]),_:1},8,["modelValue"]),f(p)!=="Apps"?(C(),ie("div",uL,[q(f(gl),{data:O("appCategories"),"default-label":"Apps",onChange:ee[1]||(ee[1]=Se=>g.value=Se),"selection-mode":"single",placement:"end"},null,8,["data"]),f(p)!=="UI Elements"&&f(p)!=="Flows"?(C(),B(f(gl),{key:0,data:O("screenElements"),"default-label":"UI Elements",onChange:ee[2]||(ee[2]=Se=>v.value=Se),"selection-mode":"single",placement:"end"},null,8,["data"])):Be("",!0),f(p)!=="Screens"&&f(p)!=="Flows"?(C(),B(f(gl),{key:1,data:O("screenPatterns"),"default-label":"Screens",onChange:ee[3]||(ee[3]=Se=>y.value=Se),"selection-mode":"single",placement:"end"},null,8,["data"])):Be("",!0)])):Be("",!0)]),q(le,{"platform-type":f(a),type:f(T),onChange:J,ref_key:"filterRef",ref:h,class:"w-full"},null,8,["platform-type","type"]),f(p)==="Apps"?(C(),ie("div",{key:0,class:qe(["grid gap-x-4 gap-y-12",f(i)?"grid-cols-[repeat(auto-fill,minmax(min(100%,450px),1fr))]":"grid-cols-[repeat(auto-fill,minmax(min(100%,350px),1fr))]"])},[(C(!0),ie(Ie,null,wt(f(A),Se=>(C(),B(ye,{key:Se.id,id:Se.id,name:Se.name,description:Se.appTagline,logo:Se.appLogoUrl,"video-url":Se.previewVideoUrl??"","preview-screens":Se.previewScreens,onClick:x=>L(Se),platform:f(s),onToggleFavorite:()=>r(Se.id)},null,8,["id","name","description","logo","video-url","preview-screens","onClick","platform","onToggleFavorite"]))),128))],2)):["Screens","UI Elements"].includes(f(p))?(C(),ie("div",{key:1,class:qe(["grid gap-x-5 gap-y-12",f(i)?"grid-cols-[repeat(auto-fill,minmax(min(100%,500px),1fr))]":"grid-cols-[repeat(auto-fill,minmax(min(100%,230px),1fr))] auto-rows-max"])},[(C(!0),ie(Ie,null,wt(f(D),(Se,x)=>(C(),B(me,{key:x,id:Se.screenRespVO.id,src:Se.screenRespVO.screenUrl,name:Se.appRespVO.name,logo:Se.appRespVO.appLogoUrl,selected:f(b).includes(Se.screenRespVO.id),onSelect:_,platform:f(s)},null,8,["id","src","name","logo","selected","platform"]))),128))],2)):f(p)==="Flows"?(C(),ie("div",cL,[q(f(lp),{class:"w-full"},{default:E(()=>[ce("div",dL,[(C(!0),ie(Ie,null,wt(f(D),(Se,x)=>(C(),B(Pe,{key:x,src:Se.screenRespVO.screenUrl,class:qe(["shrink-0 object-cover",[f(i)?"aspect-[16/11] w-[595px] rounded-lg":"aspect-[393/892] w-[215px] rounded-3xl","transition-transform hover:scale-[1.02]"]])},null,8,["src","class"]))),128))])]),_:1}),ce("div",fL,[ce("div",pL,[ce("div",hL,[ee[4]||(ee[4]=ce("span",{class:"group-hover:underline underline-offset-8 transition-all duration-300"},"Onboarding",-1)),ee[5]||(ee[5]=ce("span",{class:"text-gray-500"},"in",-1)),q(Pe,{class:"h-full"}),ee[6]||(ee[6]=ce("span",{class:"group-hover:underline underline-offset-8 transition-all duration-300"},"MoonPay",-1))]),ee[7]||(ee[7]=ce("span",{class:"text-sm text-gray-500"}," 100+ screens ",-1))]),ce("div",mL,[q(f(vn),{text:"Save",class:"bg-black text-white hover:opacity-80"}),q(f(vn),{text:"Copy",class:"bg-[#E3E3E3] hover:opacity-80 text-black"})])])])):Be("",!0)])])}}}),sw=OM({history:nM("/"),routes:[{path:"/",name:"home",component:gL},{path:"/details",name:"details",component:cF},{path:"/apps",name:"apps",component:()=>mi(()=>import("./Apps-BRMcQyeI.js"),__vite__mapDeps([0,1,2,3,4,5,6]))},{path:"/auth",name:"auth",component:()=>mi(()=>import("./Auth-BJGZikMq.js"),__vite__mapDeps([7,3,4,1,8]))},{path:"/settings",name:"settings",component:()=>mi(()=>import("./Settings-CkK03M1s.js"),__vite__mapDeps([9,4]))},{path:"/favorites",name:"favorites",component:()=>mi(()=>import("./Favorites-C1kb4hNA.js"),__vite__mapDeps([10,5,1]))},{path:"/chat",name:"chat",component:()=>mi(()=>import("./Chat-CbyEIPNl.js"),__vite__mapDeps([11,2,12]))}]});sw.beforeEach((e,t,n)=>{const o=localStorage.getItem("accessToken"),{fetchUserInfo:r,userInfo:s}=D_(),i=["auth"];return o?(!s.id&&e.name!=="auth"&&r(),e.name==="auth"?n({name:"home"}):n()):i.includes(e.name)?n():n({name:"auth"})});const Vu=DS(YM);Vu.use(pC);Vu.use(MS());Vu.use(sw);Vu.mount("#app");export{Ii as $,By as A,mo as B,Uo as C,kf as D,Un as E,ts as F,ie as G,Fs as H,Ho as I,Pt as J,Ne as K,AS as L,et as M,ft as N,Fe as O,Ae as P,Kt as Q,Ry as R,qe as S,EL as T,$e as U,My as V,ce as W,rt as X,GL as Y,ya as Z,vn as _,In as a,df as a$,wk as a0,Bk as a1,$k as a2,qk as a3,ri as a4,wt as a5,Ie as a6,X$ as a7,ct as a8,yt as a9,un as aA,zg as aB,ut as aC,We as aD,Et as aE,Ys as aF,Nn as aG,bd as aH,zt as aI,Dk as aJ,xb as aK,lb as aL,yP as aM,bP as aN,ql as aO,Ks as aP,mC as aQ,sL as aR,rp as aS,sp as aT,ip as aU,u$ as aV,ep as aW,eN as aX,tN as aY,DM as aZ,tu as a_,rF as aa,sF as ab,J$ as ac,Z$ as ad,tF as ae,YL as af,QL as ag,hC as ah,xL as ai,ap as aj,jM as ak,Yf as al,Ta as am,EB as an,XL as ao,Lu as ap,bL as aq,JL as ar,ZL as as,Bi as at,Ht as au,je as av,Ge as aw,Qs as ax,kt as ay,ro as az,dt as b,U as c,F as d,ve as e,Pf as f,B as g,uu as h,C as i,E as j,Be as k,Ze as l,te as m,ns as n,Gs as o,lt as p,q,V as r,Cn as s,yL as t,f as u,Yr as v,Ce as w,N as x,js as y,qo as z};
DesignScreenshot/output/user_info_run/1_login_page.html:97:`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const o=new this(t);return n.forEach(r=>o.set(r)),o}static accessor(t){const o=(this[lm]=this[lm]={accessors:{}}).accessors,r=this.prototype;function s(i){const a=pi(i);o[a]||(sR(r,i),o[a]=!0)}return W.isArray(t)?t.forEach(s):s(t),this}};gn.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);W.reduceDescriptors(gn.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(o){this[n]=o}}});W.freezeMethods(gn);function vc(e,t){const n=this||Aa,o=t||n,r=gn.from(o.headers);let s=o.data;return W.forEach(e,function(a){s=a.call(n,s,r.normalize(),t?t.status:void 0)}),r.normalize(),s}function e_(e){return!!(e&&e.__CANCEL__)}function ii(e,t,n){Ve.call(this,e??"canceled",Ve.ERR_CANCELED,t,n),this.name="CanceledError"}W.inherits(ii,Ve,{__CANCEL__:!0});function t_(e,t,n){const o=n.config.validateStatus;!n.status||!o||o(n.status)?e(n):t(new Ve("Request failed with status code "+n.status,[Ve.ERR_BAD_REQUEST,Ve.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function iR(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function aR(e,t){e=e||10;const n=new Array(e),o=new Array(e);let r=0,s=0,i;return t=t!==void 0?t:1e3,function(l){const u=Date.now(),c=o[s];i||(i=u),n[r]=l,o[r]=u;let d=s,p=0;for(;d!==r;)p+=n[d++],d=d%e;if(r=(r+1)%e,r===s&&(s=(s+1)%e),u-i<t)return;const h=c&&u-c;return h?Math.round(p*1e3/h):void 0}}function lR(e,t){let n=0,o=1e3/t,r,s;const i=(u,c=Date.now())=>{n=c,r=null,s&&(clearTimeout(s),s=null),e(...u)};return[(...u)=>{const c=Date.now(),d=c-n;d>=o?i(u,c):(r=u,s||(s=setTimeout(()=>{s=null,i(r)},o-d)))},()=>r&&i(r)]}const Bl=(e,t,n=3)=>{let o=0;const r=aR(50,250);return lR(s=>{const i=s.loaded,a=s.lengthComputable?s.total:void 0,l=i-o,u=r(l),c=i<=a;o=i;const d={loaded:i,total:a,progress:a?i/a:void 0,bytes:l,rate:u||void 0,estimated:u&&a&&c?(a-i)/u:void 0,event:s,lengthComputable:a!=null,[t?"download":"upload"]:!0};e(d)},n)},um=(e,t)=>{const n=e!=null;return[o=>t[0]({lengthComputable:n,total:e,loaded:o}),t[1]]},cm=e=>(...t)=>W.asap(()=>e(...t)),uR=Jt.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,Jt.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(Jt.origin),Jt.navigator&&/(msie|trident)/i.test(Jt.navigator.userAgent)):()=>!0,cR=Jt.hasStandardBrowserEnv?{write(e,t,n,o,r,s){const i=[e+"="+encodeURIComponent(t)];W.isNumber(n)&&i.push("expires="+new Date(n).toGMTString()),W.isString(o)&&i.push("path="+o),W.isString(r)&&i.push("domain="+r),s===!0&&i.push("secure"),document.cookie=i.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function dR(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function fR(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function n_(e,t,n){let o=!dR(t);return e&&(o||n==!1)?fR(e,t):t}const dm=e=>e instanceof gn?{...e}:e;function Zr(e,t){t=t||{};const n={};function o(u,c,d,p){return W.isPlainObject(u)&&W.isPlainObject(c)?W.merge.call({caseless:p},u,c):W.isPlainObject(c)?W.merge({},c):W.isArray(c)?c.slice():c}function r(u,c,d,p){if(W.isUndefined(c)){if(!W.isUndefined(u))return o(void 0,u,d,p)}else return o(u,c,d,p)}function s(u,c){if(!W.isUndefined(c))return o(void 0,c)}function i(u,c){if(W.isUndefined(c)){if(!W.isUndefined(u))return o(void 0,u)}else return o(void 0,c)}function a(u,c,d){if(d in t)return o(u,c);if(d in e)return o(void 0,u)}const l={url:s,method:s,data:s,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,responseEncoding:i,validateStatus:a,headers:(u,c,d)=>r(dm(u),dm(c),d,!0)};return W.forEach(Object.keys({...e,...t}),function(c){const d=l[c]||r,p=d(e[c],t[c],c);W.isUndefined(p)&&d!==a||(n[c]=p)}),n}const o_=e=>{const t=Zr({},e);let{data:n,withXSRFToken:o,xsrfHeaderName:r,xsrfCookieName:s,headers:i,auth:a}=t;t.headers=i=gn.from(i),t.url=Xb(n_(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),a&&i.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):"")));let l;if(W.isFormData(n)){if(Jt.hasStandardBrowserEnv||Jt.hasStandardBrowserWebWorkerEnv)i.setContentType(void 0);else if((l=i.getContentType())!==!1){const[u,...c]=l?l.split(";").map(d=>d.trim()).filter(Boolean):[];i.setContentType([u||"multipart/form-data",...c].join("; "))}}if(Jt.hasStandardBrowserEnv&&(o&&W.isFunction(o)&&(o=o(t)),o||o!==!1&&uR(t.url))){const u=r&&s&&cR.read(s);u&&i.set(r,u)}return t},pR=typeof XMLHttpRequest<"u",hR=pR&&function(e){return new Promise(function(n,o){const r=o_(e);let s=r.data;const i=gn.from(r.headers).normalize();let{responseType:a,onUploadProgress:l,onDownloadProgress:u}=r,c,d,p,h,m;function g(){h&&h(),m&&m(),r.cancelToken&&r.cancelToken.unsubscribe(c),r.signal&&r.signal.removeEventListener("abort",c)}let v=new XMLHttpRequest;v.open(r.method.toUpperCase(),r.url,!0),v.timeout=r.timeout;function y(){if(!v)return;const _=gn.from("getAllResponseHeaders"in v&&v.getAllResponseHeaders()),T={data:!a||a==="text"||a==="json"?v.responseText:v.response,status:v.status,statusText:v.statusText,headers:_,config:e,request:v};t_(function(D){n(D),g()},function(D){o(D),g()},T),v=null}"onloadend"in v?v.onloadend=y:v.onreadystatechange=function(){!v||v.readyState!==4||v.status===0&&!(v.responseURL&&v.responseURL.indexOf("file:")===0)||setTimeout(y)},v.onabort=function(){v&&(o(new Ve("Request aborted",Ve.ECONNABORTED,e,v)),v=null)},v.onerror=function(){o(new Ve("Network Error",Ve.ERR_NETWORK,e,v)),v=null},v.ontimeout=function(){let O=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const T=r.transitional||Jb;r.timeoutErrorMessage&&(O=r.timeoutErrorMessage),o(new Ve(O,T.clarifyTimeoutError?Ve.ETIMEDOUT:Ve.ECONNABORTED,e,v)),v=null},s===void 0&&i.setContentType(null),"setRequestHeader"in v&&W.forEach(i.toJSON(),function(O,T){v.setRequestHeader(T,O)}),W.isUndefined(r.withCredentials)||(v.withCredentials=!!r.withCredentials),a&&a!=="json"&&(v.responseType=r.responseType),u&&([p,m]=Bl(u,!0),v.addEventListener("progress",p)),l&&v.upload&&([d,h]=Bl(l),v.upload.addEventListener("progress",d),v.upload.addEventListener("loadend",h)),(r.cancelToken||r.signal)&&(c=_=>{v&&(o(!_||_.type?new ii(null,e,v):_),v.abort(),v=null)},r.cancelToken&&r.cancelToken.subscribe(c),r.signal&&(r.signal.aborted?c():r.signal.addEventListener("abort",c)));const b=iR(r.url);if(b&&Jt.protocols.indexOf(b)===-1){o(new Ve("Unsupported protocol "+b+":",Ve.ERR_BAD_REQUEST,e));return}v.send(s||null)})},mR=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let o=new AbortController,r;const s=function(u){if(!r){r=!0,a();const c=u instanceof Error?u:this.reason;o.abort(c instanceof Ve?c:new ii(c instanceof Error?c.message:c))}};let i=t&&setTimeout(()=>{i=null,s(new Ve(`timeout ${t} of ms exceeded`,Ve.ETIMEDOUT))},t);const a=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach(u=>{u.unsubscribe?u.unsubscribe(s):u.removeEventListener("abort",s)}),e=null)};e.forEach(u=>u.addEventListener("abort",s));const{signal:l}=o;return l.unsubscribe=()=>W.asap(a),l}},gR=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let o=0,r;for(;o<n;)r=o+t,yield e.slice(o,r),o=r},vR=async function*(e,t){for await(const n of yR(e))yield*gR(n,t)},yR=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:n,value:o}=await t.read();if(n)break;yield o}}finally{await t.cancel()}},fm=(e,t,n,o)=>{const r=vR(e,t);let s=0,i,a=l=>{i||(i=!0,o&&o(l))};return new ReadableStream({async pull(l){try{const{done:u,value:c}=await r.next();if(u){a(),l.close();return}let d=c.byteLength;if(n){let p=s+=d;n(p)}l.enqueue(new Uint8Array(c))}catch(u){throw a(u),u}},cancel(l){return a(l),r.return()}},{highWaterMark:2})},Ru=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",r_=Ru&&typeof ReadableStream=="function",bR=Ru&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),s_=(e,...t)=>{try{return!!e(...t)}catch{return!1}},_R=r_&&s_(()=>{let e=!1;const t=new Request(Jt.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),pm=64*1024,jd=r_&&s_(()=>W.isReadableStream(new Response("").body)),Ml={stream:jd&&(e=>e.body)};Ru&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!Ml[t]&&(Ml[t]=W.isFunction(e[t])?n=>n[t]():(n,o)=>{throw new Ve(`Response type '${t}' is not supported`,Ve.ERR_NOT_SUPPORT,o)})})})(new Response);const wR=async e=>{if(e==null)return 0;if(W.isBlob(e))return e.size;if(W.isSpecCompliantForm(e))return(await new Request(Jt.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(W.isArrayBufferView(e)||W.isArrayBuffer(e))return e.byteLength;if(W.isURLSearchParams(e)&&(e=e+""),W.isString(e))return(await bR(e)).byteLength},SR=async(e,t)=>{const n=W.toFiniteNumber(e.getContentLength());return n??wR(t)},CR=Ru&&(async e=>{let{url:t,method:n,data:o,signal:r,cancelToken:s,timeout:i,onDownloadProgress:a,onUploadProgress:l,responseType:u,headers:c,withCredentials:d="same-origin",fetchOptions:p}=o_(e);u=u?(u+"").toLowerCase():"text";let h=mR([r,s&&s.toAbortSignal()],i),m;const g=h&&h.unsubscribe&&(()=>{h.unsubscribe()});let v;try{if(l&&_R&&n!=="get"&&n!=="head"&&(v=await SR(c,o))!==0){let T=new Request(t,{method:"POST",body:o,duplex:"half"}),A;if(W.isFormData(o)&&(A=T.headers.get("content-type"))&&c.setContentType(A),T.body){const[D,P]=um(v,Bl(cm(l)));o=fm(T.body,pm,D,P)}}W.isString(d)||(d=d?"include":"omit");const y="credentials"in Request.prototype;m=new Request(t,{...p,signal:h,method:n.toUpperCase(),headers:c.normalize().toJSON(),body:o,duplex:"half",credentials:y?d:void 0});let b=await fetch(m,p);const _=jd&&(u==="stream"||u==="response");if(jd&&(a||_&&g)){const T={};["status","statusText","headers"].forEach(w=>{T[w]=b[w]});const A=W.toFiniteNumber(b.headers.get("content-length")),[D,P]=a&&um(A,Bl(cm(a),!0))||[];b=new Response(fm(b.body,pm,D,()=>{P&&P(),g&&g()}),T)}u=u||"text";let O=await Ml[W.findKey(Ml,u)||"text"](b,e);return!_&&g&&g(),await new Promise((T,A)=>{t_(T,A,{data:O,headers:gn.from(b.headers),status:b.status,statusText:b.statusText,config:e,request:m})})}catch(y){throw g&&g(),y&&y.name==="TypeError"&&/Load failed|fetch/i.test(y.message)?Object.assign(new Ve("Network Error",Ve.ERR_NETWORK,e,m),{cause:y.cause||y}):Ve.from(y,y&&y.code,e,m)}}),Vd={http:FD,xhr:hR,fetch:CR};W.forEach(Vd,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const hm=e=>`- ${e}`,xR=e=>W.isFunction(e)||e===null||e===!1,i_={getAdapter:e=>{e=W.isArray(e)?e:[e];const{length:t}=e;let n,o;const r={};for(let s=0;s<t;s++){n=e[s];let i;if(o=n,!xR(n)&&(o=Vd[(i=String(n)).toLowerCase()],o===void 0))throw new Ve(`Unknown adapter '${i}'`);if(o)break;r[i||"#"+s]=o}if(!o){const s=Object.entries(r).map(([a,l])=>`adapter ${a} `+(l===!1?"is not supported by the environment":"is not available in the build"));let i=t?s.length>1?`since :
DesignScreenshot/output/user_info_run/1_login_page.html:100:`+s):o.stack=s}catch{}}throw o}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Zr(this.defaults,n);const{transitional:o,paramsSerializer:r,headers:s}=n;o!==void 0&&ul.assertOptions(o,{silentJSONParsing:Jn.transitional(Jn.boolean),forcedJSONParsing:Jn.transitional(Jn.boolean),clarifyTimeoutError:Jn.transitional(Jn.boolean)},!1),r!=null&&(W.isFunction(r)?n.paramsSerializer={serialize:r}:ul.assertOptions(r,{encode:Jn.function,serialize:Jn.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),ul.assertOptions(n,{baseUrl:Jn.spelling("baseURL"),withXsrfToken:Jn.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let i=s&&W.merge(s.common,s[n.method]);s&&W.forEach(["delete","get","head","post","put","patch","common"],m=>{delete s[m]}),n.headers=gn.concat(i,s);const a=[];let l=!0;this.interceptors.request.forEach(function(g){typeof g.runWhen=="function"&&g.runWhen(n)===!1||(l=l&&g.synchronous,a.unshift(g.fulfilled,g.rejected))});const u=[];this.interceptors.response.forEach(function(g){u.push(g.fulfilled,g.rejected)});let c,d=0,p;if(!l){const m=[mm.bind(this),void 0];for(m.unshift(...a),m.push(...u),p=m.length,c=Promise.resolve(n);d<p;)c=c.then(m[d++],m[d++]);return c}p=a.length;let h=n;for(d=0;d<p;){const m=a[d++],g=a[d++];try{h=m(h)}catch(v){g.call(this,v);break}}try{c=mm.call(this,h)}catch(m){return Promise.reject(m)}for(d=0,p=u.length;d<p;)c=c.then(u[d++],u[d++]);return c}getUri(t){t=Zr(this.defaults,t);const n=n_(t.baseURL,t.url,t.allowAbsoluteUrls);return Xb(n,t.params,t.paramsSerializer)}};W.forEach(["delete","get","head","options"],function(t){Wr.prototype[t]=function(n,o){return this.request(Zr(o||{},{method:t,url:n,data:(o||{}).data}))}});W.forEach(["post","put","patch"],function(t){function n(o){return function(s,i,a){return this.request(Zr(a||{},{method:t,headers:o?{"Content-Type":"multipart/form-data"}:{},url:s,data:i}))}}Wr.prototype[t]=n(),Wr.prototype[t+"Form"]=n(!0)});let AR=class l_{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(s){n=s});const o=this;this.promise.then(r=>{if(!o._listeners)return;let s=o._listeners.length;for(;s-- >0;)o._listeners[s](r);o._listeners=null}),this.promise.then=r=>{let s;const i=new Promise(a=>{o.subscribe(a),s=a}).then(r);return i.cancel=function(){o.unsubscribe(s)},i},t(function(s,i,a){o.reason||(o.reason=new ii(s,i,a),n(o.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=o=>{t.abort(o)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new l_(function(r){t=r}),cancel:t}}};function OR(e){return function(n){return e.apply(null,n)}}function TR(e){return W.isObject(e)&&e.isAxiosError===!0}const Ud={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Ud).forEach(([e,t])=>{Ud[t]=e});function u_(e){const t=new Wr(e),n=Lb(Wr.prototype.request,t);return W.extend(n,Wr.prototype,t,{allOwnKeys:!0}),W.extend(n,t,null,{allOwnKeys:!0}),n.create=function(r){return u_(Zr(e,r))},n}const xt=u_(Aa);xt.Axios=Wr;xt.CanceledError=ii;xt.CancelToken=AR;xt.isCancel=e_;xt.VERSION=a_;xt.toFormData=Du;xt.AxiosError=Ve;xt.Cancel=xt.CanceledError;xt.all=function(t){return Promise.all(t)};xt.spread=OR;xt.isAxiosError=TR;xt.mergeConfig=Zr;xt.AxiosHeaders=gn;xt.formToJSON=e=>Zb(W.isHTMLForm(e)?new FormData(e):e);xt.getAdapter=i_.getAdapter;xt.HttpStatusCode=Ud;xt.default=xt;const{Axios:DL,AxiosError:RL,CanceledError:BL,isCancel:ML,CancelToken:qL,VERSION:$L,all:FL,Cancel:LL,isAxiosError:NL,spread:jL,toFormData:VL,AxiosHeaders:UL,HttpStatusCode:HL,formToJSON:zL,getAdapter:KL,mergeConfig:WL}=xt;let Hd=1;var PR=class{constructor(){Mt(this,"subscribers");Mt(this,"toasts");Mt(this,"dismissedToasts");Mt(this,"subscribe",e=>(this.subscribers.push(e),()=>{const t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}));Mt(this,"publish",e=>{this.subscribers.forEach(t=>t(e))});Mt(this,"addToast",e=>{this.publish(e),this.toasts=[...this.toasts,e]});Mt(this,"create",e=>{var i;const{message:t,...n}=e,o=typeof e.id=="number"||e.id&&((i=e.id)==null?void 0:i.length)>0?e.id:Hd++,r=this.toasts.find(a=>a.id===o),s=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(o)&&this.dismissedToasts.delete(o),r?this.toasts=this.toasts.map(a=>a.id===o?(this.publish({...a,...e,id:o,title:t}),{...a,...e,id:o,dismissible:s,title:t}):a):this.addToast({title:t,...n,dismissible:s,id:o}),o});Mt(this,"dismiss",e=>(e?(this.dismissedToasts.add(e),requestAnimationFrame(()=>this.subscribers.forEach(t=>t({id:e,dismiss:!0})))):this.toasts.forEach(t=>{this.subscribers.forEach(n=>n({id:t.id,dismiss:!0}))}),e));Mt(this,"message",(e,t)=>this.create({...t,message:e,type:"default"}));Mt(this,"error",(e,t)=>this.create({...t,type:"error",message:e}));Mt(this,"success",(e,t)=>this.create({...t,type:"success",message:e}));Mt(this,"info",(e,t)=>this.create({...t,type:"info",message:e}));Mt(this,"warning",(e,t)=>this.create({...t,type:"warning",message:e}));Mt(this,"loading",(e,t)=>this.create({...t,type:"loading",message:e}));Mt(this,"promise",(e,t)=>{if(!t)return;let n;t.loading!==void 0&&(n=this.create({...t,promise:e,type:"loading",message:t.loading,description:typeof t.description!="function"?t.description:void 0}));const o=Promise.resolve(e instanceof Function?e():e);let r=n!==void 0,s;const i=o.then(async l=>{if(s=["resolve",l],so(l))r=!1,this.create({id:n,type:"default",message:l});else if(IR(l)&&!l.ok){r=!1;const c=typeof t.error=="function"?await t.error(`HTTP error! status: ${l.status}`):t.error,d=typeof t.description=="function"?await t.description(`HTTP error! status: ${l.status}`):t.description,h=typeof c=="object"&&!so(c)?c:{message:c||"",id:n||""};this.create({id:n,type:"error",description:d,...h})}else if(l instanceof Error){r=!1;const c=typeof t.error=="function"?await t.error(l):t.error,d=typeof t.description=="function"?await t.description(l):t.description,h=typeof c=="object"&&!so(c)?c:{message:c||"",id:n||""};this.create({id:n,type:"error",description:d,...h})}else if(t.success!==void 0){r=!1;const c=typeof t.success=="function"?await t.success(l):t.success,d=typeof t.description=="function"?await t.description(l):t.description,h=typeof c=="object"&&!so(c)?c:{message:c||"",id:n||""};this.create({id:n,type:"success",description:d,...h})}}).catch(async l=>{if(s=["reject",l],t.error!==void 0){r=!1;const u=typeof t.error=="function"?await t.error(l):t.error,c=typeof t.description=="function"?await t.description(l):t.description,p=typeof u=="object"&&!so(u)?u:{message:u||"",id:n||""};this.create({id:n,type:"error",description:c,...p})}}).finally(()=>{var l;r&&(this.dismiss(n),n=void 0),(l=t.finally)==null||l.call(t)}),a=()=>new Promise((l,u)=>i.then(()=>s[0]==="reject"?u(s[1]):l(s[1])).catch(u));return typeof n!="string"&&typeof n!="number"?{unwrap:a}:Object.assign(n,{unwrap:a})});Mt(this,"custom",(e,t)=>{const n=(t==null?void 0:t.id)||Hd++;return this.publish({component:e,id:n,...t}),n});Mt(this,"getActiveToasts",()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)));this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}};const hn=new PR;function kR(e,t){const n=(t==null?void 0:t.id)||Hd++;return hn.create({message:e,id:n,type:"default",...t}),n}const IR=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",DR=kR,RR=()=>hn.toasts,BR=()=>hn.getActiveToasts(),Bi=Object.assign(DR,{success:hn.success,info:hn.info,warning:hn.warning,error:hn.error,custom:hn.custom,message:hn.message,promise:hn.promise,dismiss:hn.dismiss,loading:hn.loading},{getHistory:RR,getToasts:BR});function Wa(e){return e.label!==void 0}const MR=3,c_="24px",d_="16px",vm=4e3,qR=356,$R=14,FR=45,f_=200;function LR(){const e=N(!1);return ut(()=>{const t=()=>{e.value=document.hidden};return document.addEventListener("visibilitychange",t),()=>window.removeEventListener("visibilitychange",t)}),{isDocumentHidden:e}}function Go(...e){return e.filter(Boolean).join(" ")}function NR(e){const[t,n]=e.split("-"),o=[];return t&&o.push(t),n&&o.push(n),o}function jR(e,t){const n={};return[e,t].forEach((o,r)=>{const s=r===1,i=s?"--mobile-offset":"--offset",a=s?d_:c_;function l(u){["top","right","bottom","left"].forEach(c=>{n[`${i}-${c}`]=typeof u=="number"?`${u}px`:u})}typeof o=="number"||typeof o=="string"?l(o):typeof o=="object"?["top","right","bottom","left"].forEach(u=>{o[u]===void 0?n[`${i}-${u}`]=a:n[`${i}-${u}`]=typeof o[u]=="number"?`${o[u]}px`:o[u]}):l(a)}),n}const VR=["data-rich-colors","data-styled","data-mounted","data-promise","data-swiped","data-removed","data-visible","data-y-position","data-x-position","data-index","data-front","data-swiping","data-dismissible","data-type","data-invert","data-swipe-out","data-swipe-direction","data-expanded"],UR=["aria-label","data-disabled"];var HR=F({__name:"Toast",props:{toast:{},toasts:{},index:{},swipeDirections:{},expanded:{type:Boolean},invert:{type:Boolean},heights:{},gap:{},position:{},visibleToasts:{},expandByDefault:{type:Boolean},closeButton:{type:Boolean},interacting:{type:Boolean},style:{},cancelButtonStyle:{},actionButtonStyle:{},duration:{},class:{},unstyled:{type:Boolean},descriptionClass:{},loadingIcon:{},classes:{},icons:{},closeButtonAriaLabel:{},defaultRichColors:{type:Boolean}},emits:["update:heights","update:height","removeToast"],setup(e,{emit:t}){const n=e,o=t,r=N(null),s=N(null),i=N(!1),a=N(!1),l=N(!1),u=N(!1),c=N(!1),d=N(0),p=N(0),h=N(n.toast.duration||n.duration||vm),m=N(null),g=N(null),v=U(()=>n.index===0),y=U(()=>n.index+1<=n.visibleToasts),b=U(()=>n.toast.type),_=U(()=>n.toast.dismissible!==!1),O=U(()=>n.toast.class||""),T=U(()=>n.descriptionClass||""),A=U(()=>{const x=n.toast.position||n.position,H=n.heights.filter(X=>X.position===x).findIndex(X=>X.toastId===n.toast.id);return H>=0?H:0}),D=U(()=>{const x=n.toast.position||n.position;return n.heights.filter(H=>H.position===x).reduce((H,X,pe)=>pe>=A.value?H:H+X.height,0)}),P=U(()=>A.value*n.gap+D.value||0),w=U(()=>n.toast.closeButton??n.closeButton),k=U(()=>n.toast.duration||n.duration||vm),$=N(0),R=N(0),G=N(null),J=U(()=>n.position.split("-")),ne=U(()=>J.value[0]),ae=U(()=>J.value[1]),re=U(()=>typeof n.toast.title!="string"),L=U(()=>typeof n.toast.description!="string"),{isDocumentHidden:oe}=LR(),Y=U(()=>b.value&&b.value==="loading");je(()=>{i.value=!0,h.value=k.value}),ut(async()=>{if(!i.value||!g.value)return;await We();const x=g.value,z=x.style.height;x.style.height="auto";const H=x.getBoundingClientRect().height;x.style.height=z,p.value=H,o("update:height",{toastId:n.toast.id,height:H,position:n.toast.position||n.position})});function ee(){a.value=!0,d.value=P.value,setTimeout(()=>{o("removeToast",n.toast)},f_)}function le(){var x,z;if(Y.value||!_.value)return{};ee(),(z=(x=n.toast).onDismiss)==null||z.call(x,n.toast)}function ye(x){Y.value||!_.value||(m.value=new Date,d.value=P.value,x.target.setPointerCapture(x.pointerId),x.target.tagName!=="BUTTON"&&(l.value=!0,G.value={x:x.clientX,y:x.clientY}))}function me(){var S,I,j,K,Z,Q,ue;if(u.value||!_.value)return;G.value=null;const x=Number(((S=g.value)==null?void 0:S.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),z=Number(((I=g.value)==null?void 0:I.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),H=new Date().getTime()-(((j=m.value)==null?void 0:j.getTime())||0),X=r.value==="x"?x:z,pe=Math.abs(X)/H;if(Math.abs(X)>=FR||pe>.11){d.value=P.value,(Z=(K=n.toast).onDismiss)==null||Z.call(K,n.toast),r.value==="x"?s.value=x>0?"right":"left":s.value=z>0?"down":"up",ee(),u.value=!0;return}else(Q=g.value)==null||Q.style.setProperty("--swipe-amount-x","0px"),(ue=g.value)==null||ue.style.setProperty("--swipe-amount-y","0px");c.value=!1,l.value=!1,r.value=null}function Pe(x){var j,K,Z,Q;if(!G.value||!_.value||(((K=(j=window==null?void 0:window.getSelection())==null?void 0:j.toString())==null?void 0:K.length)??!1))return;const H=x.clientY-G.value.y,X=x.clientX-G.value.x,pe=n.swipeDirections??NR(n.position);!r.value&&(Math.abs(X)>1||Math.abs(H)>1)&&(r.value=Math.abs(X)>Math.abs(H)?"x":"y");let S={x:0,y:0};const I=ue=>1/(1.5+Math.abs(ue)/20);if(r.value==="y"){if(pe.includes("top")||pe.includes("bottom"))if(pe.includes("top")&&H<0||pe.includes("bottom")&&H>0)S.y=H;else{const ue=H*I(H);S.y=Math.abs(ue)<Math.abs(H)?ue:H}}else if(r.value==="x"&&(pe.includes("left")||pe.includes("right")))if(pe.includes("left")&&X<0||pe.includes("right")&&X>0)S.x=X;else{const ue=X*I(X);S.x=Math.abs(ue)<Math.abs(X)?ue:X}(Math.abs(S.x)>0||Math.abs(S.y)>0)&&(c.value=!0),(Z=g.value)==null||Z.style.setProperty("--swipe-amount-x",`${S.x}px`),(Q=g.value)==null||Q.style.setProperty("--swipe-amount-y",`${S.y}px`)}je(()=>{if(i.value=!0,!g.value)return;const x=g.value.getBoundingClientRect().height;p.value=x;const z=[{toastId:n.toast.id,height:x,position:n.toast.position},...n.heights];o("update:heights",z)}),Ys(()=>{g.value&&o("removeToast",n.toast)}),ut(x=>{if(n.toast.promise&&b.value==="loading"||n.toast.duration===1/0||n.toast.type==="loading")return;let z;const H=()=>{if(R.value<$.value){const pe=new Date().getTime()-$.value;h.value=h.value-pe}R.value=new Date().getTime()},X=()=>{h.value!==1/0&&($.value=new Date().getTime(),z=setTimeout(()=>{var pe,S;(S=(pe=n.toast).onAutoClose)==null||S.call(pe,n.toast),ee()},h.value))};n.expanded||n.interacting||oe.value?H():X(),x(()=>{clearTimeout(z)})}),Ce(()=>n.toast.delete,x=>{x!==void 0&&x&&ee()},{deep:!0});function Se(){l.value=!1,r.value=null,G.value=null}return(x,z)=>{var H,X,pe,S,I,j,K,Z,Q,ue,fe,de,se,xe,ge,Ee,ke,He,tt,Ye,At,mt,$t,Ft,yn,Cr,Bt;return C(),ie("li",{tabindex:"0",ref_key:"toastRef",ref:g,class:qe(f(Go)(n.class,O.value,(H=x.classes)==null?void 0:H.toast,(X=x.toast.classes)==null?void 0:X.toast,(pe=x.classes)==null?void 0:pe[b.value],(I=(S=x.toast)==null?void 0:S.classes)==null?void 0:I[b.value])),"data-sonner-toast":"","data-rich-colors":x.toast.richColors??x.defaultRichColors,"data-styled":!(x.toast.component||(j=x.toast)!=null&&j.unstyled||x.unstyled),"data-mounted":i.value,"data-promise":!!x.toast.promise,"data-swiped":c.value,"data-removed":a.value,"data-visible":y.value,"data-y-position":ne.value,"data-x-position":ae.value,"data-index":x.index,"data-front":v.value,"data-swiping":l.value,"data-dismissible":_.value,"data-type":b.value,"data-invert":x.toast.invert||x.invert,"data-swipe-out":u.value,"data-swipe-direction":s.value,"data-expanded":!!(x.expanded||x.expandByDefault&&i.value),style:Pt({"--index":x.index,"--toasts-before":x.index,"--z-index":x.toasts.length-x.index,"--offset":`${a.value?d.value:P.value}px`,"--initial-height":x.expandByDefault?"auto":`${p.value}px`,...x.style,...n.toast.style}),onDragend:Se,onPointerdown:ye,onPointerup:me,onPointermove:Pe},[w.value&&!x.toast.component&&b.value!=="loading"?(C(),ie("button",{key:0,"aria-label":x.closeButtonAriaLabel||"Close toast","data-disabled":Y.value,"data-close-button":"true",class:qe(f(Go)((K=x.classes)==null?void 0:K.closeButton,(Q=(Z=x.toast)==null?void 0:Z.classes)==null?void 0:Q.closeButton)),onClick:le},[(ue=x.icons)!=null&&ue.close?(C(),B(ro((fe=x.icons)==null?void 0:fe.close),{key:0})):V(x.$slots,"close-icon",{key:1})],10,UR)):Be("v-if",!0),x.toast.component?(C(),B(ro(x.toast.component),te({key:1},x.toast.componentProps,{onCloseToast:le}),null,16)):(C(),ie(Ie,{key:2},[b.value!=="default"||x.toast.icon||x.toast.promise?(C(),ie("div",{key:0,"data-icon":"",class:qe(f(Go)((de=x.classes)==null?void 0:de.icon,(xe=(se=x.toast)==null?void 0:se.classes)==null?void 0:xe.icon))},[x.toast.icon?(C(),B(ro(x.toast.icon),{key:0})):(C(),ie(Ie,{key:1},[b.value==="loading"?V(x.$slots,"loading-icon",{key:0}):b.value==="success"?V(x.$slots,"success-icon",{key:1}):b.value==="error"?V(x.$slots,"error-icon",{key:2}):b.value==="warning"?V(x.$slots,"warning-icon",{key:3}):b.value==="info"?V(x.$slots,"info-icon",{key:4}):Be("v-if",!0)],64))],2)):Be("v-if",!0),ce("div",{"data-content":"",class:qe(f(Go)((ge=x.classes)==null?void 0:ge.content,(ke=(Ee=x.toast)==null?void 0:Ee.classes)==null?void 0:ke.content))},[ce("div",{"data-title":"",class:qe(f(Go)((He=x.classes)==null?void 0:He.title,(tt=x.toast.classes)==null?void 0:tt.title))},[re.value?(C(),B(ro(x.toast.title),ct(te({key:0},x.toast.componentProps)),null,16)):(C(),ie(Ie,{key:1},[rt(Ne(x.toast.title),1)],64))],2),x.toast.description?(C(),ie("div",{key:0,"data-description":"",class:qe(f(Go)(x.descriptionClass,T.value,(Ye=x.classes)==null?void 0:Ye.description,(At=x.toast.classes)==null?void 0:At.description))},[L.value?(C(),B(ro(x.toast.description),ct(te({key:0},x.toast.componentProps)),null,16)):(C(),ie(Ie,{key:1},[rt(Ne(x.toast.description),1)],64))],2)):Be("v-if",!0)],2),x.toast.cancel?(C(),ie("button",{key:1,style:Pt(x.toast.cancelButtonStyle||x.cancelButtonStyle),class:qe(f(Go)((mt=x.classes)==null?void 0:mt.cancelButton,($t=x.toast.classes)==null?void 0:$t.cancelButton)),"data-button":"","data-cancel":"",onClick:z[0]||(z[0]=Lt=>{var Qn,Yn;f(Wa)(x.toast.cancel)&&_.value&&((Yn=(Qn=x.toast.cancel).onClick)==null||Yn.call(Qn,Lt),ee())})},Ne(f(Wa)(x.toast.cancel)?(Ft=x.toast.cancel)==null?void 0:Ft.label:x.toast.cancel),7)):Be("v-if",!0),x.toast.action?(C(),ie("button",{key:2,style:Pt(x.toast.actionButtonStyle||x.actionButtonStyle),class:qe(f(Go)((yn=x.classes)==null?void 0:yn.actionButton,(Cr=x.toast.classes)==null?void 0:Cr.actionButton)),"data-button":"","data-action":"",onClick:z[1]||(z[1]=Lt=>{var Qn,Yn;f(Wa)(x.toast.action)&&((Yn=(Qn=x.toast.action).onClick)==null||Yn.call(Qn,Lt),!Lt.defaultPrevented&&ee())})},Ne(f(Wa)(x.toast.action)?(Bt=x.toast.action)==null?void 0:Bt.label:x.toast.action),7)):Be("v-if",!0)],64))],46,VR)}}}),zR=HR,Oa=(e,t)=>{const n=e.__vccOpts||e;for(const[o,r]of t)n[o]=r;return n};const KR={},WR={xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stoke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"};function GR(e,t){return C(),ie("svg",WR,t[0]||(t[0]=[ce("line",{x1:"18",y1:"6",x2:"6",y2:"18"},null,-1),ce("line",{x1:"6",y1:"6",x2:"18",y2:"18"},null,-1)]))}var QR=Oa(KR,[["render",GR]]);const YR=["data-visible"],XR={class:"sonner-spinner"};var JR=F({__name:"Loader",props:{visible:{type:Boolean}},setup(e){const t=Array(12).fill(0);return(n,o)=>(C(),ie("div",{class:"sonner-loading-wrapper","data-visible":n.visible},[ce("div",XR,[(C(!0),ie(Ie,null,wt(f(t),r=>(C(),ie("div",{key:`spinner-bar-${r}`,class:"sonner-loading-bar"}))),128))])],8,YR))}}),ZR=JR;const eB={},tB={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"};function nB(e,t){return C(),ie("svg",tB,t[0]||(t[0]=[ce("path",{"fill-rule":"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z","clip-rule":"evenodd"},null,-1)]))}var oB=Oa(eB,[["render",nB]]);const rB={},sB={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"};function iB(e,t){return C(),ie("svg",sB,t[0]||(t[0]=[ce("path",{"fill-rule":"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z","clip-rule":"evenodd"},null,-1)]))}var aB=Oa(rB,[["render",iB]]);const lB={},uB={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"};function cB(e,t){return C(),ie("svg",uB,t[0]||(t[0]=[ce("path",{"fill-rule":"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z","clip-rule":"evenodd"},null,-1)]))}var dB=Oa(lB,[["render",cB]]);const fB={},pB={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"};function hB(e,t){return C(),ie("svg",pB,t[0]||(t[0]=[ce("path",{"fill-rule":"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z","clip-rule":"evenodd"},null,-1)]))}var mB=Oa(fB,[["render",hB]]);const gB=["aria-label"],vB=["data-sonner-theme","dir","data-theme","data-rich-colors","data-y-position","data-x-position","data-lifted"],yB=typeof window<"u"&&typeof document<"u";function bB(){if(typeof window>"u"||typeof document>"u")return"ltr";const e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}var _B=F({name:"Toaster",inheritAttrs:!1,__name:"Toaster",props:{invert:{type:Boolean,default:!1},theme:{default:"light"},position:{default:"bottom-right"},hotkey:{default:()=>["altKey","KeyT"]},richColors:{type:Boolean,default:!1},expand:{type:Boolean,default:!1},duration:{},gap:{default:$R},visibleToasts:{default:MR},closeButton:{type:Boolean,default:!1},toastOptions:{default:()=>({})},class:{default:""},style:{},offset:{default:c_},mobileOffset:{default:d_},dir:{default:"auto"},swipeDirections:{},icons:{},containerAriaLabel:{default:"Notifications"}},setup(e){const t=e,n=g0(),o=N([]);function r(w,k){return o.value.filter($=>!$.position&&k===0||$.position===w)}const s=U(()=>{const w=o.value.filter(k=>k.position).map(k=>k.position);return w.length>0?Array.from(new Set([t.position].concat(w))):[t.position]}),i=U(()=>{const w={};return s.value.forEach(k=>{w[k]=o.value.filter($=>$.position===k)}),w}),a=N([]),l=N(!1),u=N(!1),c=N(t.theme!=="system"?t.theme:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),d=N(null),p=N(null),h=N(!1),m=t.hotkey.join("+").replace(/Key/g,"").replace(/Digit/g,"");function g(w){var k;(k=o.value.find($=>$.id===w.id))!=null&&k.delete||hn.dismiss(w.id),o.value=o.value.filter(({id:$})=>$!==w.id),setTimeout(()=>{o.value.find($=>$.id===w.id)||(a.value=a.value.filter($=>$.toastId!==w.id))},f_+50)}function v(w){var k,$;h.value&&!(($=(k=w.currentTarget)==null?void 0:k.contains)!=null&&$.call(k,w.relatedTarget))&&(h.value=!1,p.value&&(p.value.focus({preventScroll:!0}),p.value=null))}function y(w){w.target instanceof HTMLElement&&w.target.dataset.dismissible==="false"||h.value||(h.value=!0,p.value=w.relatedTarget)}function b(w){w.target&&w.target instanceof HTMLElement&&w.target.dataset.dismissible==="false"||(u.value=!0)}ut(w=>{const k=hn.subscribe($=>{if($.dismiss){requestAnimationFrame(()=>{o.value=o.value.map(R=>R.id===$.id?{...R,delete:!0}:R)});return}We(()=>{const R=o.value.findIndex(G=>G.id===$.id);R!==-1?o.value=[...o.value.slice(0,R),{...o.value[R],...$},...o.value.slice(R+1)]:o.value=[$,...o.value]})});w(k)}),ut(w=>{if(typeof window>"u")return;if(t.theme!=="system"){c.value=t.theme;return}const k=window.matchMedia("(prefers-color-scheme: dark)"),$=G=>{c.value=G?"dark":"light"};$(k.matches);const R=G=>{$(G.matches)};try{k.addEventListener("change",R)}catch{k.addListener(R)}w(()=>{try{k.removeEventListener("change",R)}catch{k.removeListener(R)}})}),ut(()=>{d.value&&p.value&&(p.value.focus({preventScroll:!0}),p.value=null,h.value=!1)}),ut(()=>{o.value.length<=1&&(l.value=!1)}),ut(w=>{function k($){const R=t.hotkey.every(ne=>$[ne]||$.code===ne),G=Array.isArray(d.value)?d.value[0]:d.value;R&&(l.value=!0,G==null||G.focus());const J=document.activeElement===d.value||(G==null?void 0:G.contains(document.activeElement));$.code==="Escape"&&J&&(l.value=!1)}yB&&(document.addEventListener("keydown",k),w(()=>{document.removeEventListener("keydown",k)}))});function _(){l.value=!0}function O(){u.value||(l.value=!1)}function T(){l.value=!1}function A(){u.value=!1}function D(w){a.value=w}function P(w){const k=a.value.findIndex($=>$.toastId===w.toastId);if(k!==-1)a.value[k]=w;else{const $=a.value.findIndex(R=>R.position===w.position);$!==-1?a.value.splice($,0,w):a.value.unshift(w)}}return(w,k)=>(C(),ie(Ie,null,[Be(" Remove item from normal navigation flow, only available via hotkey "),ce("section",{"aria-label":`${w.containerAriaLabel} ${f(m)}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false"},[(C(!0),ie(Ie,null,wt(s.value,($,R)=>{var G;return C(),ie("ol",te({key:$,ref_for:!0,ref_key:"listRef",ref:d,"data-sonner-toaster":"","data-sonner-theme":c.value,class:t.class,dir:w.dir==="auto"?bB():w.dir,tabIndex:-1,"data-theme":w.theme,"data-rich-colors":w.richColors,"data-y-position":$.split("-")[0],"data-x-position":$.split("-")[1],"data-lifted":l.value&&o.value.length>1&&!w.expand,style:{"--front-toast-height":`${((G=a.value[0])==null?void 0:G.height)||0}px`,"--width":`${f(qR)}px`,"--gap":`${w.gap}px`,...w.style,...f(n).style,...f(jR)(w.offset,w.mobileOffset)}},w.$attrs,{onBlur:v,onFocus:y,onMouseenter:_,onMousemove:_,onMouseleave:O,onDragend:T,onPointerdown:b,onPointerup:A}),[(C(!0),ie(Ie,null,wt(r($,R),(J,ne)=>{var ae,re,L,oe,Y,ee,le,ye,me,Pe;return C(),B(zR,{key:J.id,heights:a.value,icons:w.icons,index:ne,toast:J,defaultRichColors:w.richColors,duration:((ae=w.toastOptions)==null?void 0:ae.duration)??w.duration,class:qe(((re=w.toastOptions)==null?void 0:re.class)??""),descriptionClass:(L=w.toastOptions)==null?void 0:L.descriptionClass,invert:w.invert,visibleToasts:w.visibleToasts,closeButton:((oe=w.toastOptions)==null?void 0:oe.closeButton)??w.closeButton,interacting:u.value,position:$,style:Pt((Y=w.toastOptions)==null?void 0:Y.style),unstyled:(ee=w.toastOptions)==null?void 0:ee.unstyled,classes:(le=w.toastOptions)==null?void 0:le.classes,cancelButtonStyle:(ye=w.toastOptions)==null?void 0:ye.cancelButtonStyle,actionButtonStyle:(me=w.toastOptions)==null?void 0:me.actionButtonStyle,"close-button-aria-label":(Pe=w.toastOptions)==null?void 0:Pe.closeButtonAriaLabel,toasts:i.value[$],expandByDefault:w.expand,gap:w.gap,expanded:l.value,swipeDirections:t.swipeDirections,"onUpdate:heights":D,"onUpdate:height":P,onRemoveToast:g},{"close-icon":E(()=>[V(w.$slots,"close-icon",{},()=>[q(QR)])]),"loading-icon":E(()=>[V(w.$slots,"loading-icon",{},()=>[q(ZR,{visible:J.type==="loading"},null,8,["visible"])])]),"success-icon":E(()=>[V(w.$slots,"success-icon",{},()=>[q(oB)])]),"error-icon":E(()=>[V(w.$slots,"error-icon",{},()=>[q(mB)])]),"warning-icon":E(()=>[V(w.$slots,"warning-icon",{},()=>[q(dB)])]),"info-icon":E(()=>[V(w.$slots,"info-icon",{},()=>[q(aB)])]),_:2},1032,["heights","icons","index","toast","defaultRichColors","duration","class","descriptionClass","invert","visibleToasts","closeButton","interacting","position","style","unstyled","classes","cancelButtonStyle","actionButtonStyle","close-button-aria-label","toasts","expandByDefault","gap","expanded","swipeDirections"])}),128))],16,vB)}),128))],8,gB)],2112))}}),wB=_B;const ko=xt.create({baseURL:"https://api.beenglish.eu.org/DesignScreenshot/admin-api",timeout:12e4,headers:{"Content-Type":"application/json"}});let bc=!1;const _c=[],SB=async()=>{try{const e=localStorage.getItem("refreshToken");if(!e)throw new Error("No refresh token found");const t=await xt.post(`/system/auth/refresh-token?refreshToken=${e}`),{token:n,refreshToken:o}=t.data;return localStorage.setItem("accessToken",n),localStorage.setItem("refreshToken",o),n}catch(e){return localStorage.removeItem("accessToken"),localStorage.removeItem("refreshToken"),window.location.href="/auth",Promise.reject(e)}};ko.interceptors.request.use(e=>{const t=localStorage.getItem("accessToken");return t&&e.headers&&(e.headers.Authorization=`Bearer ${t}`),e},e=>Promise.reject(e));ko.interceptors.response.use(async e=>{const{data:t,status:n}=e;if(n!==200)return Bi.error(t.msg||"请求失败"),Promise.reject(new Error(t.msg||"请求失败"));if(t.code===401){const o=e.config;if(!o._retry){if(bc)return new Promise(r=>{_c.push(s=>{o.headers&&(o.headers.Authorization=`Bearer ${s}`),r(ko(o))})});o._retry=!0,bc=!0;try{const r=await SB();return o.headers&&(o.headers.Authorization=`Bearer ${r}`),_c.forEach(s=>s(r)),_c.length=0,ko(o)}catch(r){return Promise.reject(r)}finally{bc=!1}}}return t.code===0?t.data:(Bi.error(t.msg||"请求失败"),Promise.reject(new Error(t.msg||"请求失败")))},e=>{const t=e.message||"网络错误";return Bi.error(t),Promise.reject(e)});const wr=(e,t)=>ko.get(e,{params:t}),Sr=(e,t,n)=>ko.post(e,t,n),p_=(e,t)=>ko.put(e,t),h_=(e,t)=>ko.delete(e,{params:t}),GL=(e,t)=>ko.post(e,t,{headers:{"Content-Type":"multipart/form-data"}}),CB=e=>wr("/admin/app/page",e),xB=e=>wr("/admin/app/get-app-details",{appId:e}),EB=e=>wr("/admin/app/list",e),QL=e=>Sr("/admin/app/create",e),YL=e=>p_("/admin/app/update",e),XL=e=>h_("/admin/app/delete",e),ep=Symbol("platform"),m_=bf("app",()=>{const e=N([]);return{apps:e,fetchApps:async n=>{const o=await EB({platform:n});e.value=o}}});/*!
DesignScreenshot/output/user_info_run/1_login_page.html:104:  */const ms=typeof document<"u";function g_(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function AB(e){return e.__esModule||e[Symbol.toStringTag]==="Module"||e.default&&g_(e.default)}const st=Object.assign;function wc(e,t){const n={};for(const o in t){const r=t[o];n[o]=Kn(r)?r.map(e):e(r)}return n}const Mi=()=>{},Kn=Array.isArray,v_=/#/g,OB=/&/g,TB=/\//g,PB=/=/g,kB=/\?/g,y_=/\+/g,IB=/%5B/g,DB=/%5D/g,b_=/%5E/g,RB=/%60/g,__=/%7B/g,BB=/%7C/g,w_=/%7D/g,MB=/%20/g;function tp(e){return encodeURI(""+e).replace(BB,"|").replace(IB,"[").replace(DB,"]")}function qB(e){return tp(e).replace(__,"{").replace(w_,"}").replace(b_,"^")}function zd(e){return tp(e).replace(y_,"%2B").replace(MB,"+").replace(v_,"%23").replace(OB,"%26").replace(RB,"`").replace(__,"{").replace(w_,"}").replace(b_,"^")}function $B(e){return zd(e).replace(PB,"%3D")}function FB(e){return tp(e).replace(v_,"%23").replace(kB,"%3F")}function LB(e){return e==null?"":FB(e).replace(TB,"%2F")}function ra(e){try{return decodeURIComponent(""+e)}catch{}return""+e}const NB=/\/$/,jB=e=>e.replace(NB,"");function Sc(e,t,n="/"){let o,r={},s="",i="";const a=t.indexOf("#");let l=t.indexOf("?");return a<l&&a>=0&&(l=-1),l>-1&&(o=t.slice(0,l),s=t.slice(l+1,a>-1?a:t.length),r=e(s)),a>-1&&(o=o||t.slice(0,a),i=t.slice(a,t.length)),o=zB(o??t,n),{fullPath:o+(s&&"?")+s+i,path:o,query:r,hash:ra(i)}}function VB(e,t){const n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}function ym(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function UB(e,t,n){const o=t.matched.length-1,r=n.matched.length-1;return o>-1&&o===r&&Hs(t.matched[o],n.matched[r])&&S_(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function Hs(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function S_(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(!HB(e[n],t[n]))return!1;return!0}function HB(e,t){return Kn(e)?bm(e,t):Kn(t)?bm(t,e):e===t}function bm(e,t){return Kn(t)?e.length===t.length&&e.every((n,o)=>n===t[o]):e.length===1&&e[0]===t}function zB(e,t){if(e.startsWith("/"))return e;if(!e)return t;const n=t.split("/"),o=e.split("/"),r=o[o.length-1];(r===".."||r===".")&&o.push("");let s=n.length-1,i,a;for(i=0;i<o.length;i++)if(a=o[i],a!==".")if(a==="..")s>1&&s--;else break;return n.slice(0,s).join("/")+"/"+o.slice(i).join("/")}const Qo={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0};var sa;(function(e){e.pop="pop",e.push="push"})(sa||(sa={}));var qi;(function(e){e.back="back",e.forward="forward",e.unknown=""})(qi||(qi={}));function KB(e){if(!e)if(ms){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),jB(e)}const WB=/^[^#]+#/;function GB(e,t){return e.replace(WB,"#")+t}function QB(e,t){const n=document.documentElement.getBoundingClientRect(),o=e.getBoundingClientRect();return{behavior:t.behavior,left:o.left-n.left-(t.left||0),top:o.top-n.top-(t.top||0)}}const Mu=()=>({left:window.scrollX,top:window.scrollY});function YB(e){let t;if("el"in e){const n=e.el,o=typeof n=="string"&&n.startsWith("#"),r=typeof n=="string"?o?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!r)return;t=QB(r,e)}else t=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left!=null?t.left:window.scrollX,t.top!=null?t.top:window.scrollY)}function _m(e,t){return(history.state?history.state.position-t:-1)+e}const Kd=new Map;function XB(e,t){Kd.set(e,t)}function JB(e){const t=Kd.get(e);return Kd.delete(e),t}let ZB=()=>location.protocol+"//"+location.host;function C_(e,t){const{pathname:n,search:o,hash:r}=t,s=e.indexOf("#");if(s>-1){let a=r.includes(e.slice(s))?e.slice(s).length:1,l=r.slice(a);return l[0]!=="/"&&(l="/"+l),ym(l,"")}return ym(n,e)+o+r}function eM(e,t,n,o){let r=[],s=[],i=null;const a=({state:p})=>{const h=C_(e,location),m=n.value,g=t.value;let v=0;if(p){if(n.value=h,t.value=p,i&&i===m){i=null;return}v=g?p.position-g.position:0}else o(h);r.forEach(y=>{y(n.value,m,{delta:v,type:sa.pop,direction:v?v>0?qi.forward:qi.back:qi.unknown})})};function l(){i=n.value}function u(p){r.push(p);const h=()=>{const m=r.indexOf(p);m>-1&&r.splice(m,1)};return s.push(h),h}function c(){const{history:p}=window;p.state&&p.replaceState(st({},p.state,{scroll:Mu()}),"")}function d(){for(const p of s)p();s=[],window.removeEventListener("popstate",a),window.removeEventListener("beforeunload",c)}return window.addEventListener("popstate",a),window.addEventListener("beforeunload",c,{passive:!0}),{pauseListeners:l,listen:u,destroy:d}}function wm(e,t,n,o=!1,r=!1){return{back:e,current:t,forward:n,replaced:o,position:window.history.length,scroll:r?Mu():null}}function tM(e){const{history:t,location:n}=window,o={value:C_(e,n)},r={value:t.state};r.value||s(o.value,{back:null,current:o.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function s(l,u,c){const d=e.indexOf("#"),p=d>-1?(n.host&&document.querySelector("base")?e:e.slice(d))+l:ZB()+e+l;try{t[c?"replaceState":"pushState"](u,"",p),r.value=u}catch(h){console.error(h),n[c?"replace":"assign"](p)}}function i(l,u){const c=st({},t.state,wm(r.value.back,l,r.value.forward,!0),u,{position:r.value.position});s(l,c,!0),o.value=l}function a(l,u){const c=st({},r.value,t.state,{forward:l,scroll:Mu()});s(c.current,c,!0);const d=st({},wm(o.value,l,null),{position:c.position+1},u);s(l,d,!1),o.value=l}return{location:o,state:r,push:a,replace:i}}function nM(e){e=KB(e);const t=tM(e),n=eM(e,t.state,t.location,t.replace);function o(s,i=!0){i||n.pauseListeners(),history.go(s)}const r=st({location:"",base:e,go:o,createHref:GB.bind(null,e)},t,n);return Object.defineProperty(r,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(r,"state",{enumerable:!0,get:()=>t.state.value}),r}function oM(e){return typeof e=="string"||e&&typeof e=="object"}function x_(e){return typeof e=="string"||typeof e=="symbol"}const E_=Symbol("");var Sm;(function(e){e[e.aborted=4]="aborted",e[e.cancelled=8]="cancelled",e[e.duplicated=16]="duplicated"})(Sm||(Sm={}));function zs(e,t){return st(new Error,{type:e,[E_]:!0},t)}function So(e,t){return e instanceof Error&&E_ in e&&(t==null||!!(e.type&t))}const Cm="[^/]+?",rM={sensitive:!1,strict:!1,start:!0,end:!0},sM=/[.+*?^${}()[\]/\\]/g;function iM(e,t){const n=st({},rM,t),o=[];let r=n.start?"^":"";const s=[];for(const u of e){const c=u.length?[]:[90];n.strict&&!u.length&&(r+="/");for(let d=0;d<u.length;d++){const p=u[d];let h=40+(n.sensitive?.25:0);if(p.type===0)d||(r+="/"),r+=p.value.replace(sM,"\\$&"),h+=40;else if(p.type===1){const{value:m,repeatable:g,optional:v,regexp:y}=p;s.push({name:m,repeatable:g,optional:v});const b=y||Cm;if(b!==Cm){h+=10;try{new RegExp(`(${b})`)}catch(O){throw new Error(`Invalid custom RegExp for param "${m}" (${b}): `+O.message)}}let _=g?`((?:${b})(?:/(?:${b}))*)`:`(${b})`;d||(_=v&&u.length<2?`(?:/${_})`:"/"+_),v&&(_+="?"),r+=_,h+=20,v&&(h+=-8),g&&(h+=-20),b===".*"&&(h+=-50)}c.push(h)}o.push(c)}if(n.strict&&n.end){const u=o.length-1;o[u][o[u].length-1]+=.7000000000000001}n.strict||(r+="/?"),n.end?r+="$":n.strict&&!r.endsWith("/")&&(r+="(?:/|$)");const i=new RegExp(r,n.sensitive?"":"i");function a(u){const c=u.match(i),d={};if(!c)return null;for(let p=1;p<c.length;p++){const h=c[p]||"",m=s[p-1];d[m.name]=h&&m.repeatable?h.split("/"):h}return d}function l(u){let c="",d=!1;for(const p of e){(!d||!c.endsWith("/"))&&(c+="/"),d=!1;for(const h of p)if(h.type===0)c+=h.value;else if(h.type===1){const{value:m,repeatable:g,optional:v}=h,y=m in u?u[m]:"";if(Kn(y)&&!g)throw new Error(`Provided param "${m}" is an array but it is not repeatable (* or + modifiers)`);const b=Kn(y)?y.join("/"):y;if(!b)if(v)p.length<2&&(c.endsWith("/")?c=c.slice(0,-1):d=!0);else throw new Error(`Missing required param "${m}"`);c+=b}}return c||"/"}return{re:i,score:o,keys:s,parse:a,stringify:l}}function aM(e,t){let n=0;for(;n<e.length&&n<t.length;){const o=t[n]-e[n];if(o)return o;n++}return e.length<t.length?e.length===1&&e[0]===80?-1:1:e.length>t.length?t.length===1&&t[0]===80?1:-1:0}function A_(e,t){let n=0;const o=e.score,r=t.score;for(;n<o.length&&n<r.length;){const s=aM(o[n],r[n]);if(s)return s;n++}if(Math.abs(r.length-o.length)===1){if(xm(o))return 1;if(xm(r))return-1}return r.length-o.length}function xm(e){const t=e[e.length-1];return e.length>0&&t[t.length-1]<0}const lM={type:0,value:""},uM=/[a-zA-Z0-9_]/;function cM(e){if(!e)return[[]];if(e==="/")return[[lM]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(h){throw new Error(`ERR (${n})/"${u}": ${h}`)}let n=0,o=n;const r=[];let s;function i(){s&&r.push(s),s=[]}let a=0,l,u="",c="";function d(){u&&(n===0?s.push({type:0,value:u}):n===1||n===2||n===3?(s.length>1&&(l==="*"||l==="+")&&t(`A repeatable param (${u}) must be alone in its segment. eg: '/:ids+.`),s.push({type:1,value:u,regexp:c,repeatable:l==="*"||l==="+",optional:l==="*"||l==="?"})):t("Invalid state to consume buffer"),u="")}function p(){u+=l}for(;a<e.length;){if(l=e[a++],l==="\\"&&n!==2){o=n,n=4;continue}switch(n){case 0:l==="/"?(u&&d(),i()):l===":"?(d(),n=1):p();break;case 4:p(),n=o;break;case 1:l==="("?n=2:uM.test(l)?p():(d(),n=0,l!=="*"&&l!=="?"&&l!=="+"&&a--);break;case 2:l===")"?c[c.length-1]=="\\"?c=c.slice(0,-1)+l:n=3:c+=l;break;case 3:d(),n=0,l!=="*"&&l!=="?"&&l!=="+"&&a--,c="";break;default:t("Unknown state");break}}return n===2&&t(`Unfinished custom RegExp for param "${u}"`),d(),i(),r}function dM(e,t,n){const o=iM(cM(e.path),n),r=st(o,{record:e,parent:t,children:[],alias:[]});return t&&!r.record.aliasOf==!t.record.aliasOf&&t.children.push(r),r}function fM(e,t){const n=[],o=new Map;t=Tm({strict:!1,end:!0,sensitive:!1},t);function r(d){return o.get(d)}function s(d,p,h){const m=!h,g=Am(d);g.aliasOf=h&&h.record;const v=Tm(t,d),y=[g];if("alias"in d){const O=typeof d.alias=="string"?[d.alias]:d.alias;for(const T of O)y.push(Am(st({},g,{components:h?h.record.components:g.components,path:T,aliasOf:h?h.record:g})))}let b,_;for(const O of y){const{path:T}=O;if(p&&T[0]!=="/"){const A=p.record.path,D=A[A.length-1]==="/"?"":"/";O.path=p.record.path+(T&&D+T)}if(b=dM(O,p,v),h?h.alias.push(b):(_=_||b,_!==b&&_.alias.push(b),m&&d.name&&!Om(b)&&i(d.name)),O_(b)&&l(b),g.children){const A=g.children;for(let D=0;D<A.length;D++)s(A[D],b,h&&h.children[D])}h=h||b}return _?()=>{i(_)}:Mi}function i(d){if(x_(d)){const p=o.get(d);p&&(o.delete(d),n.splice(n.indexOf(p),1),p.children.forEach(i),p.alias.forEach(i))}else{const p=n.indexOf(d);p>-1&&(n.splice(p,1),d.record.name&&o.delete(d.record.name),d.children.forEach(i),d.alias.forEach(i))}}function a(){return n}function l(d){const p=mM(d,n);n.splice(p,0,d),d.record.name&&!Om(d)&&o.set(d.record.name,d)}function u(d,p){let h,m={},g,v;if("name"in d&&d.name){if(h=o.get(d.name),!h)throw zs(1,{location:d});v=h.record.name,m=st(Em(p.params,h.keys.filter(_=>!_.optional).concat(h.parent?h.parent.keys.filter(_=>_.optional):[]).map(_=>_.name)),d.params&&Em(d.params,h.keys.map(_=>_.name))),g=h.stringify(m)}else if(d.path!=null)g=d.path,h=n.find(_=>_.re.test(g)),h&&(m=h.parse(g),v=h.record.name);else{if(h=p.name?o.get(p.name):n.find(_=>_.re.test(p.path)),!h)throw zs(1,{location:d,currentLocation:p});v=h.record.name,m=st({},p.params,d.params),g=h.stringify(m)}const y=[];let b=h;for(;b;)y.unshift(b.record),b=b.parent;return{name:v,path:g,params:m,matched:y,meta:hM(y)}}e.forEach(d=>s(d));function c(){n.length=0,o.clear()}return{addRoute:s,resolve:u,removeRoute:i,clearRoutes:c,getRoutes:a,getRecordMatcher:r}}function Em(e,t){const n={};for(const o of t)o in e&&(n[o]=e[o]);return n}function Am(e){const t={path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:e.aliasOf,beforeEnter:e.beforeEnter,props:pM(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in e?e.components||null:e.component&&{default:e.component}};return Object.defineProperty(t,"mods",{value:{}}),t}function pM(e){const t={},n=e.props||!1;if("component"in e)t.default=n;else for(const o in e.components)t[o]=typeof n=="object"?n[o]:n;return t}function Om(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function hM(e){return e.reduce((t,n)=>st(t,n.meta),{})}function Tm(e,t){const n={};for(const o in e)n[o]=o in t?t[o]:e[o];return n}function mM(e,t){let n=0,o=t.length;for(;n!==o;){const s=n+o>>1;A_(e,t[s])<0?o=s:n=s+1}const r=gM(e);return r&&(o=t.lastIndexOf(r,o-1)),o}function gM(e){let t=e;for(;t=t.parent;)if(O_(t)&&A_(e,t)===0)return t}function O_({record:e}){return!!(e.name||e.components&&Object.keys(e.components).length||e.redirect)}function vM(e){const t={};if(e===""||e==="?")return t;const o=(e[0]==="?"?e.slice(1):e).split("&");for(let r=0;r<o.length;++r){const s=o[r].replace(y_," "),i=s.indexOf("="),a=ra(i<0?s:s.slice(0,i)),l=i<0?null:ra(s.slice(i+1));if(a in t){let u=t[a];Kn(u)||(u=t[a]=[u]),u.push(l)}else t[a]=l}return t}function Pm(e){let t="";for(let n in e){const o=e[n];if(n=$B(n),o==null){o!==void 0&&(t+=(t.length?"&":"")+n);continue}(Kn(o)?o.map(s=>s&&zd(s)):[o&&zd(o)]).forEach(s=>{s!==void 0&&(t+=(t.length?"&":"")+n,s!=null&&(t+="="+s))})}return t}function yM(e){const t={};for(const n in e){const o=e[n];o!==void 0&&(t[n]=Kn(o)?o.map(r=>r==null?null:""+r):o==null?o:""+o)}return t}const bM=Symbol(""),km=Symbol(""),qu=Symbol(""),np=Symbol(""),Wd=Symbol("");function hi(){let e=[];function t(o){return e.push(o),()=>{const r=e.indexOf(o);r>-1&&e.splice(r,1)}}function n(){e=[]}return{add:t,list:()=>e.slice(),reset:n}}function or(e,t,n,o,r,s=i=>i()){const i=o&&(o.enterCallbacks[r]=o.enterCallbacks[r]||[]);return()=>new Promise((a,l)=>{const u=p=>{p===!1?l(zs(4,{from:n,to:t})):p instanceof Error?l(p):oM(p)?l(zs(2,{from:t,to:p})):(i&&o.enterCallbacks[r]===i&&typeof p=="function"&&i.push(p),a())},c=s(()=>e.call(o&&o.instances[r],t,n,u));let d=Promise.resolve(c);e.length<3&&(d=d.then(u)),d.catch(p=>l(p))})}function Cc(e,t,n,o,r=s=>s()){const s=[];for(const i of e)for(const a in i.components){let l=i.components[a];if(!(t!=="beforeRouteEnter"&&!i.instances[a]))if(g_(l)){const c=(l.__vccOpts||l)[t];c&&s.push(or(c,n,o,i,a,r))}else{let u=l();s.push(()=>u.then(c=>{if(!c)throw new Error(`Couldn't resolve component "${a}" at "${i.path}"`);const d=AB(c)?c.default:c;i.mods[a]=c,i.components[a]=d;const h=(d.__vccOpts||d)[t];return h&&or(h,n,o,i,a,r)()}))}}return s}function Im(e){const t=kt(qu),n=kt(np),o=U(()=>{const l=f(e.to);return t.resolve(l)}),r=U(()=>{const{matched:l}=o.value,{length:u}=l,c=l[u-1],d=n.matched;if(!c||!d.length)return-1;const p=d.findIndex(Hs.bind(null,c));if(p>-1)return p;const h=Dm(l[u-2]);return u>1&&Dm(c)===h&&d[d.length-1].path!==h?d.findIndex(Hs.bind(null,l[u-2])):p}),s=U(()=>r.value>-1&&xM(n.params,o.value.params)),i=U(()=>r.value>-1&&r.value===n.matched.length-1&&S_(n.params,o.value.params));function a(l={}){if(CM(l)){const u=t[f(e.replace)?"replace":"push"](f(e.to)).catch(Mi);return e.viewTransition&&typeof document<"u"&&"startViewTransition"in document&&document.startViewTransition(()=>u),u}return Promise.resolve()}return{route:o,href:U(()=>o.value.href),isActive:s,isExactActive:i,navigate:a}}function _M(e){return e.length===1?e[0]:e}const wM=F({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"},viewTransition:Boolean},useLink:Im,setup(e,{slots:t}){const n=Ht(Im(e)),{options:o}=kt(qu),r=U(()=>({[Rm(e.activeClass,o.linkActiveClass,"router-link-active")]:n.isActive,[Rm(e.exactActiveClass,o.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const s=t.default&&_M(t.default(n));return e.custom?s:un("a",{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:r.value},s)}}}),SM=wM;function CM(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget&&e.currentTarget.getAttribute){const t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function xM(e,t){for(const n in t){const o=t[n],r=e[n];if(typeof o=="string"){if(o!==r)return!1}else if(!Kn(r)||r.length!==o.length||o.some((s,i)=>s!==r[i]))return!1}return!0}function Dm(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const Rm=(e,t,n)=>e??t??n,EM=F({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){const o=kt(Wd),r=U(()=>e.route||o.value),s=kt(km,0),i=U(()=>{let u=f(s);const{matched:c}=r.value;let d;for(;(d=c[u])&&!d.components;)u++;return u}),a=U(()=>r.value.matched[i.value]);Nn(km,U(()=>i.value+1)),Nn(bM,a),Nn(Wd,r);const l=N();return Ce(()=>[l.value,a.value,e.name],([u,c,d],[p,h,m])=>{c&&(c.instances[d]=u,h&&h!==c&&u&&u===p&&(c.leaveGuards.size||(c.leaveGuards=h.leaveGuards),c.updateGuards.size||(c.updateGuards=h.updateGuards))),u&&c&&(!h||!Hs(c,h)||!p)&&(c.enterCallbacks[d]||[]).forEach(g=>g(u))},{flush:"post"}),()=>{const u=r.value,c=e.name,d=a.value,p=d&&d.components[c];if(!p)return Bm(n.default,{Component:p,route:u});const h=d.props[c],m=h?h===!0?u.params:typeof h=="function"?h(u):h:null,v=un(p,st({},m,t,{onVnodeUnmounted:y=>{y.component.isUnmounted&&(d.instances[c]=null)},ref:l}));return Bm(n.default,{Component:v,route:u})||v}}});function Bm(e,t){if(!e)return null;const n=e(t);return n.length===1?n[0]:n}const AM=EM;function OM(e){const t=fM(e.routes,e),n=e.parseQuery||vM,o=e.stringifyQuery||Pm,r=e.history,s=hi(),i=hi(),a=hi(),l=Cn(Qo);let u=Qo;ms&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const c=wc.bind(null,x=>""+x),d=wc.bind(null,LB),p=wc.bind(null,ra);function h(x,z){let H,X;return x_(x)?(H=t.getRecordMatcher(x),X=z):X=x,t.addRoute(X,H)}function m(x){const z=t.getRecordMatcher(x);z&&t.removeRoute(z)}function g(){return t.getRoutes().map(x=>x.record)}function v(x){return!!t.getRecordMatcher(x)}function y(x,z){if(z=st({},z||l.value),typeof x=="string"){const j=Sc(n,x,z.path),K=t.resolve({path:j.path},z),Z=r.createHref(j.fullPath);return st(j,K,{params:p(K.params),hash:ra(j.hash),redirectedFrom:void 0,href:Z})}let H;if(x.path!=null)H=st({},x,{path:Sc(n,x.path,z.path).path});else{const j=st({},x.params);for(const K in j)j[K]==null&&delete j[K];H=st({},x,{params:d(j)}),z.params=d(z.params)}const X=t.resolve(H,z),pe=x.hash||"";X.params=c(p(X.params));const S=VB(o,st({},x,{hash:qB(pe),path:X.path})),I=r.createHref(S);return st({fullPath:S,hash:pe,query:o===Pm?yM(x.query):x.query||{}},X,{redirectedFrom:void 0,href:I})}function b(x){return typeof x=="string"?Sc(n,x,l.value.path):st({},x)}function _(x,z){if(u!==x)return zs(8,{from:z,to:x})}function O(x){return D(x)}function T(x){return O(st(b(x),{replace:!0}))}function A(x){const z=x.matched[x.matched.length-1];if(z&&z.redirect){const{redirect:H}=z;let X=typeof H=="function"?H(x):H;return typeof X=="string"&&(X=X.includes("?")||X.includes("#")?X=b(X):{path:X},X.params={}),st({query:x.query,hash:x.hash,params:X.path!=null?{}:x.params},X)}}function D(x,z){const H=u=y(x),X=l.value,pe=x.state,S=x.force,I=x.replace===!0,j=A(H);if(j)return D(st(b(j),{state:typeof j=="object"?st({},pe,j.state):pe,force:S,replace:I}),z||H);const K=H;K.redirectedFrom=z;let Z;return!S&&UB(o,X,H)&&(Z=zs(16,{to:K,from:X}),ee(X,X,!0,!1)),(Z?Promise.resolve(Z):k(K,X)).catch(Q=>So(Q)?So(Q,2)?Q:Y(Q):L(Q,K,X)).then(Q=>{if(Q){if(So(Q,2))return D(st({replace:I},b(Q.to),{state:typeof Q.to=="object"?st({},pe,Q.to.state):pe,force:S}),z||K)}else Q=R(K,X,!0,I,pe);return $(K,X,Q),Q})}function P(x,z){const H=_(x,z);return H?Promise.reject(H):Promise.resolve()}function w(x){const z=me.values().next().value;return z&&typeof z.runWithContext=="function"?z.runWithContext(x):x()}function k(x,z){let H;const[X,pe,S]=TM(x,z);H=Cc(X.reverse(),"beforeRouteLeave",x,z);for(const j of X)j.leaveGuards.forEach(K=>{H.push(or(K,x,z))});const I=P.bind(null,x,z);return H.push(I),Se(H).then(()=>{H=[];for(const j of s.list())H.push(or(j,x,z));return H.push(I),Se(H)}).then(()=>{H=Cc(pe,"beforeRouteUpdate",x,z);for(const j of pe)j.updateGuards.forEach(K=>{H.push(or(K,x,z))});return H.push(I),Se(H)}).then(()=>{H=[];for(const j of S)if(j.beforeEnter)if(Kn(j.beforeEnter))for(const K of j.beforeEnter)H.push(or(K,x,z));else H.push(or(j.beforeEnter,x,z));return H.push(I),Se(H)}).then(()=>(x.matched.forEach(j=>j.enterCallbacks={}),H=Cc(S,"beforeRouteEnter",x,z,w),H.push(I),Se(H))).then(()=>{H=[];for(const j of i.list())H.push(or(j,x,z));return H.push(I),Se(H)}).catch(j=>So(j,8)?j:Promise.reject(j))}function $(x,z,H){a.list().forEach(X=>w(()=>X(x,z,H)))}function R(x,z,H,X,pe){const S=_(x,z);if(S)return S;const I=z===Qo,j=ms?history.state:{};H&&(X||I?r.replace(x.fullPath,st({scroll:I&&j&&j.scroll},pe)):r.push(x.fullPath,pe)),l.value=x,ee(x,z,H,I),Y()}let G;function J(){G||(G=r.listen((x,z,H)=>{if(!Pe.listening)return;const X=y(x),pe=A(X);if(pe){D(st(pe,{replace:!0,force:!0}),X).catch(Mi);return}u=X;const S=l.value;ms&&XB(_m(S.fullPath,H.delta),Mu()),k(X,S).catch(I=>So(I,12)?I:So(I,2)?(D(st(b(I.to),{force:!0}),X).then(j=>{So(j,20)&&!H.delta&&H.type===sa.pop&&r.go(-1,!1)}).catch(Mi),Promise.reject()):(H.delta&&r.go(-H.delta,!1),L(I,X,S))).then(I=>{I=I||R(X,S,!1),I&&(H.delta&&!So(I,8)?r.go(-H.delta,!1):H.type===sa.pop&&So(I,20)&&r.go(-1,!1)),$(X,S,I)}).catch(Mi)}))}let ne=hi(),ae=hi(),re;function L(x,z,H){Y(x);const X=ae.list();return X.length?X.forEach(pe=>pe(x,z,H)):console.error(x),Promise.reject(x)}function oe(){return re&&l.value!==Qo?Promise.resolve():new Promise((x,z)=>{ne.add([x,z])})}function Y(x){return re||(re=!x,J(),ne.list().forEach(([z,H])=>x?H(x):z()),ne.reset()),x}function ee(x,z,H,X){const{scrollBehavior:pe}=e;if(!ms||!pe)return Promise.resolve();const S=!H&&JB(_m(x.fullPath,0))||(X||!H)&&history.state&&history.state.scroll||null;return We().then(()=>pe(x,z,S)).then(I=>I&&YB(I)).catch(I=>L(I,x,z))}const le=x=>r.go(x);let ye;const me=new Set,Pe={currentRoute:l,listening:!0,addRoute:h,removeRoute:m,clearRoutes:t.clearRoutes,hasRoute:v,getRoutes:g,resolve:y,options:e,push:O,replace:T,go:le,back:()=>le(-1),forward:()=>le(1),beforeEach:s.add,beforeResolve:i.add,afterEach:a.add,onError:ae.add,isReady:oe,install(x){const z=this;x.component("RouterLink",SM),x.component("RouterView",AM),x.config.globalProperties.$router=z,Object.defineProperty(x.config.globalProperties,"$route",{enumerable:!0,get:()=>f(l)}),ms&&!ye&&l.value===Qo&&(ye=!0,O(r.location).catch(pe=>{}));const H={};for(const pe in Qo)Object.defineProperty(H,pe,{get:()=>l.value[pe],enumerable:!0});x.provide(qu,z),x.provide(np,Zl(H)),x.provide(Wd,l);const X=x.unmount;me.add(x),x.unmount=function(){me.delete(x),me.size<1&&(u=Qo,G&&G(),G=null,l.value=Qo,ye=!1,re=!1),X()}}};function Se(x){return x.reduce((z,H)=>z.then(()=>w(H)),Promise.resolve())}return Pe}function TM(e,t){const n=[],o=[],r=[],s=Math.max(t.matched.length,e.matched.length);for(let i=0;i<s;i++){const a=t.matched[i];a&&(e.matched.find(u=>Hs(u,a))?o.push(a):n.push(a));const l=e.matched[i];l&&(t.matched.find(u=>Hs(u,l))||r.push(l))}return[n,o,r]}function Ta(){return kt(qu)}function T_(e){return kt(np)}const PM={class:"w-full flex items-center justify-between"},kM={class:"text-gray-500"},IM=F({__name:"SearchDialog",props:{modelValue:{type:Boolean,default:!1},modelModifiers:{}},emits:["update:modelValue"],setup(e){const t=ts(e,"modelValue"),n=Ta(),o=N(""),r=kt(ep);U(()=>`在 ${(r==null?void 0:r.value)||"All Platforms"} 中搜索应用...`);const{apps:s}=va(m_()),i=U(()=>r!=null&&r.value?s.value.filter(l=>l.platform===r.value):[]),a=l=>{const{id:u,platform:c}=l;t.value=!1,n.push({path:"/details",query:{id:u,platform:c}})};return(l,u)=>{const c=JI,d=Yf,p=Rd;return C(),B(f(Fk),{open:t.value,"onUpdate:open":u[1]||(u[1]=h=>t.value=h)},{default:E(()=>[q(f(Ab),{modelValue:f(o),"onUpdate:modelValue":u[0]||(u[0]=h=>$e(o)?o.value=h:null),placeholder:"Type a command or search..."},null,8,["modelValue"]),q(f(Ob),{class:"h-100"},{default:E(()=>[q(f(Eb),null,{default:E(()=>[q(c,{title:"No apps found in this platform",description:"You can change the platform or search another app"})]),_:1}),q(p,{heading:"apps"},{default:E(()=>[(C(!0),ie(Ie,null,wt(f(i),h=>(C(),B(f(Dd),{value:h.name,key:h.id,onClick:m=>a(h)},{default:E(()=>[ce("div",PM,[q(d,{logo:h.appLogoUrl,name:h.name,description:h.appTagline??""},null,8,["logo","name","description"]),ce("span",kM,Ne(h.platform),1)])]),_:2},1032,["value","onClick"]))),128))]),_:1})]),_:1})]),_:1},8,["open"])}}}),Mm=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,qm=fb,DM=(e,t)=>n=>{var o;if((t==null?void 0:t.variants)==null)return qm(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:r,defaultVariants:s}=t,i=Object.keys(r).map(u=>{const c=n==null?void 0:n[u],d=s==null?void 0:s[u];if(c===null)return null;const p=Mm(c)||Mm(d);return r[u][p]}),a=n&&Object.entries(n).reduce((u,c)=>{let[d,p]=c;return p===void 0||(u[d]=p),u},{}),l=t==null||(o=t.compoundVariants)===null||o===void 0?void 0:o.reduce((u,c)=>{let{class:d,className:p,...h}=c;return Object.entries(h).every(m=>{let[g,v]=m;return Array.isArray(v)?v.includes({...s,...a}[g]):{...s,...a}[g]===v})?[...u,d,p]:u},[]);return qm(e,i,l,n==null?void 0:n.class,n==null?void 0:n.className)},vn=F({__name:"Button",props:{variant:{},size:{},class:{},asChild:{type:Boolean},as:{default:"button"}},setup(e){const t=e;return(n,o)=>(C(),B(f(Ae),{"data-slot":"button",as:n.as,"as-child":n.asChild,class:qe(f(Fe)(f(op)({variant:n.variant,size:n.size}),t.class))},{default:E(()=>[V(n.$slots,"default")]),_:3},8,["as","as-child","class"]))}}),op=DM("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-md font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive cursor-pointer",{variants:{variant:{default:"bg-primary text-primary-foreground shadow-xs hover:bg-primary/90",destructive:"bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-11 rounded-md px-6 has-[>svg]:px-4",icon:"size-9"}},defaultVariants:{variant:"default",size:"lg"}}),rp=F({__name:"Tabs",props:{defaultValue:{},orientation:{},dir:{},activationMode:{},modelValue:{},unmountOnHide:{type:Boolean},asChild:{type:Boolean},as:{},class:{}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,o=t,r=et(n,"class"),s=ft(r,o);return(i,a)=>(C(),B(f(vP),te({"data-slot":"tabs"},f(s),{class:f(Fe)("flex flex-col gap-2",n.class)}),{default:E(()=>[V(i.$slots,"default")]),_:3},16,["class"]))}}),sp=F({__name:"TabsList",props:{loop:{type:Boolean},asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,n=et(t,"class");return(o,r)=>(C(),B(f(wP),te({"data-slot":"tabs-list"},f(n),{class:f(Fe)("bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-lg p-[3px]",t.class)}),{default:E(()=>[V(o.$slots,"default")]),_:3},16,["class"]))}}),ip=F({__name:"TabsTrigger",props:{value:{},disabled:{type:Boolean},asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,n=et(t,"class"),o=Kt(n);return(r,s)=>(C(),B(f(CP),te({"data-slot":"tabs-trigger"},f(o),{class:f(Fe)("data-[state=active]:bg-background dark:data-[state=active]:text-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 text-foreground dark:text-muted-foreground inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-md font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 hover:bg-background hover:text-foreground cursor-pointer text-muted-foreground data-[state=active]:bg-transparent data-[state=active]:text-foreground data-[state=active]:shadow-none",t.class)}),{default:E(()=>[V(r.$slots,"default")]),_:3},16,["class"]))}}),JL=e=>Sr("/system/auth/login",e),ZL=e=>Sr("/system/auth/social-login",e),RM=()=>Sr("/system/auth/logout"),BM=()=>wr("/system/auth/get-user-info"),MM=F({__name:"Avatar",props:{class:{}},setup(e){const t=e;return(n,o)=>(C(),B(f(F1),{"data-slot":"avatar",class:qe(f(Fe)("relative flex size-8 shrink-0 overflow-hidden rounded-full",t.class))},{default:E(()=>[V(n.$slots,"default")]),_:3},8,["class"]))}}),qM=F({__name:"AvatarFallback",props:{delayMs:{},asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,n=et(t,"class");return(o,r)=>(C(),B(f(N1),te({"data-slot":"avatar-fallback"},f(n),{class:f(Fe)("bg-muted flex size-full items-center justify-center rounded-full",t.class)}),{default:E(()=>[V(o.$slots,"default")]),_:3},16,["class"]))}}),$M=F({__name:"AvatarImage",props:{src:{},referrerPolicy:{},crossOrigin:{},asChild:{type:Boolean},as:{}},setup(e){const t=e;return(n,o)=>(C(),B(f(U1),te({"data-slot":"avatar-image"},t,{class:"aspect-square size-full"}),{default:E(()=>[V(n.$slots,"default")]),_:3},16))}}),P_=F({__name:"DropdownMenu",props:{defaultOpen:{type:Boolean},open:{type:Boolean},dir:{},modal:{type:Boolean}},emits:["update:open"],setup(e,{emit:t}){const r=ft(e,t);return(s,i)=>(C(),B(f(BO),te({"data-slot":"dropdown-menu"},f(r)),{default:E(()=>[V(s.$slots,"default")]),_:3},16))}}),k_=F({__name:"DropdownMenuContent",props:{forceMount:{type:Boolean},loop:{type:Boolean},side:{},sideOffset:{default:4},sideFlip:{type:Boolean},align:{},alignOffset:{},alignFlip:{type:Boolean},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},positionStrategy:{},updatePositionStrategy:{},disableUpdateOnLayoutShift:{type:Boolean},prioritizePosition:{type:Boolean},reference:{},asChild:{type:Boolean},as:{},class:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","closeAutoFocus"],setup(e,{emit:t}){const n=e,o=t,r=et(n,"class"),s=ft(r,o);return(i,a)=>(C(),B(f(HO),null,{default:E(()=>[q(f(qO),te({"data-slot":"dropdown-menu-content"},f(s),{class:f(Fe)("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--reka-dropdown-menu-content-available-height) min-w-[8rem] origin-(--reka-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",n.class)}),{default:E(()=>[V(i.$slots,"default")]),_:3},16,["class"])]),_:3}))}}),FM=F({__name:"DropdownMenuGroup",props:{asChild:{type:Boolean},as:{}},setup(e){const t=e;return(n,o)=>(C(),B(f(FO),te({"data-slot":"dropdown-menu-group"},t),{default:E(()=>[V(n.$slots,"default")]),_:3},16))}}),Br=F({__name:"DropdownMenuItem",props:{disabled:{type:Boolean},textValue:{},asChild:{type:Boolean},as:{},class:{},inset:{type:Boolean},variant:{default:"default"}},setup(e){const t=e,n=et(t,"inset","variant","class"),o=Kt(n);return(r,s)=>(C(),B(f(NO),te({"data-slot":"dropdown-menu-item","data-inset":r.inset?"":void 0,"data-variant":r.variant},f(o),{class:f(Fe)("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive-foreground data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/40 data-[variant=destructive]:focus:text-destructive-foreground data-[variant=destructive]:*:[svg]:!text-destructive-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t.class)}),{default:E(()=>[V(r.$slots,"default")]),_:3},16,["data-inset","data-variant","class"]))}}),LM=F({__name:"DropdownMenuLabel",props:{asChild:{type:Boolean},as:{},class:{},inset:{type:Boolean}},setup(e){const t=e,n=et(t,"class","inset"),o=Kt(n);return(r,s)=>(C(),B(f(VO),te({"data-slot":"dropdown-menu-label","data-inset":r.inset?"":void 0},f(o),{class:f(Fe)("px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",t.class)}),{default:E(()=>[V(r.$slots,"default")]),_:3},16,["data-inset","class"]))}}),$m=F({__name:"DropdownMenuSeparator",props:{asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,n=et(t,"class");return(o,r)=>(C(),B(f(KO),te({"data-slot":"dropdown-menu-separator"},f(n),{class:f(Fe)("bg-border -mx-1 my-1 h-px",t.class)}),null,16,["class"]))}}),I_=F({__name:"DropdownMenuTrigger",props:{disabled:{type:Boolean},asChild:{type:Boolean},as:{}},setup(e){const n=Kt(e);return(o,r)=>(C(),B(f(GO),te({"data-slot":"dropdown-menu-trigger"},f(n)),{default:E(()=>[V(o.$slots,"default")]),_:3},16))}}),D_=bf("user",()=>{const e=N({avatar:"",nickname:"",username:""});return{userInfo:e,fetchUserInfo:async()=>{const n=await BM();e.value=n}}}),NM=F({__name:"UserAvatar",setup(e){const t=D_(),{userInfo:n}=va(t),o=Ta(),r=N([{to:"/apps",label:"我的App"},{to:"/favorites",label:"我的收藏"},{to:"/settings",label:"设置"}]),s=async()=>{try{await RM(),localStorage.removeItem("accessToken"),localStorage.removeItem("refreshToken"),console.log("Logout successful"),o.replace("/auth")}catch(i){console.error("Logout failed",i)}};return(i,a)=>{const l=pf("RouterLink");return C(),B(f(P_),{modal:!1},{default:E(()=>[q(f(I_),{"as-child":""},{default:E(()=>[q(f(MM),{class:"cursor-pointer"},{default:E(()=>[q(f($M),{src:f(n).avatar},null,8,["src"]),q(f(qM),null,{default:E(()=>{var u;return[rt(Ne(((u=f(n).nickname[0])==null?void 0:u.toUpperCase())||"U"),1)]}),_:1})]),_:1})]),_:1}),q(f(k_),{class:"w-48",align:"end","side-offset":8},{default:E(()=>[q(f(LM),null,{default:E(()=>a[0]||(a[0]=[rt("我的账户",-1)])),_:1,__:[0]}),q(f($m)),q(f(FM),null,{default:E(()=>[(C(!0),ie(Ie,null,wt(r.value,u=>(C(),B(f(Br),{key:u.to,"as-child":""},{default:E(()=>[q(l,{to:u.to,class:"cursor-pointer"},{default:E(()=>[rt(Ne(u.label),1)]),_:2},1032,["to"])]),_:2},1024))),128))]),_:1}),q(f($m)),q(f(Br),{class:"cursor-pointer",onClick:s},{default:E(()=>a[1]||(a[1]=[rt(" 退出登录 ",-1)])),_:1,__:[1]})]),_:1})]),_:1})}}}),jM=[{label:"ios",value:"ios",icon:"mdi:apple"},{label:"android",value:"android",icon:"mdi:android"},{label:"web",value:"web",icon:"mdi:web"}],Ks=[{label:"Apps",value:"appCategories",icon:"duo-icons:app",categoryType:0},{label:"Screens",value:"screenPatterns",icon:"simple-line-icons:screen-smartphone",categoryType:1},{label:"UI Elements",value:"screenElements",icon:"humbleicons:switch-on",categoryType:2},{label:"Flows",value:"flowActions",icon:"fluent:flow-32-regular",categoryType:3}],ql=[...Ks.slice(0,2),...Ks.slice(2)],VM={class:"grid grid-cols-3 gap-4 items-center fixed top-0 left-0 right-0 h-18 shrink-0 z-1 bg-background px-4 lg:px-20"},UM={class:"col-span-1 flex items-center h-full"},HM={class:"col-span-1 h-full flex items-center py-3"},zM={class:"col-span-1 h-full flex justify-end items-center"},KM=F({__name:"Header",props:{modelValue:{required:!0},modelModifiers:{}},emits:Un(["searchClick","platformClick"],["update:modelValue"]),setup(e,{emit:t}){const n=ts(e,"modelValue"),o=t,r=l=>({ios:"iOS",android:"Android",web:"Web"})[l]||l,s=U(()=>`在 ${r(n.value)} 上搜索...`),i=l=>{o("platformClick",l)},a=()=>{o("searchClick")};return(l,u)=>{const c=Ho;return C(),ie("div",VM,[ce("div",UM,[q(f(rp),{modelValue:n.value,"onUpdate:modelValue":u[0]||(u[0]=d=>n.value=d)},{default:E(()=>[q(f(sp),{class:"bg-transparent p-0"},{default:E(()=>[(C(!0),ie(Ie,null,wt(f(jM),d=>(C(),B(f(ip),{key:d.label,value:d.label,onClick:p=>i(d.value)},{default:E(()=>[q(c,{icon:d.icon,class:"h-4 w-4 mr-2"},null,8,["icon"]),rt(" "+Ne(r(d.value)),1)]),_:2},1032,["value","onClick"]))),128))]),_:1})]),_:1},8,["modelValue"])]),ce("div",HM,[q(f(vn),{variant:"outline",class:"w-full justify-start text-muted-foreground rounded-full cursor-pointer",onClick:a},{default:E(()=>[q(c,{icon:"lucide:search",class:"h-4 w-4 mr-2"}),rt(" "+Ne(s.value),1)]),_:1})]),ce("div",zM,[q(f(NM))])])}}}),WM=F({__name:"Sonner",props:{invert:{type:Boolean},theme:{},position:{},hotkey:{},richColors:{type:Boolean},expand:{type:Boolean},duration:{},gap:{},visibleToasts:{},closeButton:{type:Boolean},toastOptions:{},class:{},style:{},offset:{},mobileOffset:{},dir:{},swipeDirections:{},icons:{},containerAriaLabel:{}},setup(e){const t=e;return(n,o)=>(C(),B(f(wB),te({class:"toaster group"},t,{style:{"--normal-bg":"var(--popover)","--normal-text":"var(--popover-foreground)","--normal-border":"var(--border)"}}),null,16))}}),GM=()=>wr("/admin/app-category/list-all"),Gd=e=>{if(e===null||typeof e!="object")return e;if(e instanceof Date)return new Date(e.getTime());if(Array.isArray(e))return e.map(n=>Gd(n));const t={};for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=Gd(e[n]));return t},cl=(e,t,n)=>{const o=new Map,r=e.map(a=>{const l=Gd(a),u={...l,id:l[t.id],label:l[t.label],value:l[t.value],level:1,parentId:l[t.parentId]??null,expanded:!1};return o.set(u.id,u),u}),s=[];r.forEach(a=>{if(a.parentId!==null){const l=a.parentId!==void 0?o.get(a.parentId):void 0;l?(a.level=l.level+1,l.children||(l.children=[]),l.children.push(a)):s.push(a)}else s.push(a)});const i=a=>(n!=null&&n.order&&(a.sort((l,u)=>{const c=l[n.order],d=u[n.order];return typeof c=="number"&&typeof d=="number"?c-d:String(c).localeCompare(String(d))}),a.forEach(l=>{var u;(u=l.children)!=null&&u.length&&(l.children=i(l.children))})),a);return i(s)},Fm=(e,t)=>{const n=new Set(e),o=new Set(t);let r=0;for(const s of n)o.has(s)&&r++;return r},QM=(e,t={})=>{const{keepChildren:n=!1,keepLevel:o=!1,keepExpanded:r=!1}=t,s=[],i=(a,l=null)=>{(Array.isArray(a)?a:[a]).forEach(c=>{var p;const d={};Object.entries(c).forEach(([h,m])=>{["children","level","expanded","parentId","label"].includes(h)||(d[h]=m)}),n&&c.children&&(d.children=c.children),o&&(d.level=c.level),r&&c.expanded!==void 0&&(d.expanded=c.expanded),l!==null&&(d.parentId=l),s.push(d),(p=c.children)!=null&&p.length&&i(c.children,c.id)})};return i(e),s},$u=bf("definition",()=>{const e=N([]);return{definitions:e,fetchDefinitions:async()=>{const n=await GM();e.value=cl(n,{id:"id",label:"displayName",value:"id",parentId:"parentId"},{order:"orderNum"})}}}),YM=F({__name:"App",setup(e){const t=Ta(),n=T_(),{fetchDefinitions:o}=$u(),{fetchApps:r}=m_(),s=["auth","settings","chat"],i=N("ios");Nn(ep,U(()=>i.value));const a=()=>{c.value=!0},l=h=>{t.replace("/"),i.value=h,localStorage.setItem("platform",h)},u=()=>{const h=localStorage.getItem("platform");h?i.value=h:(i.value="ios",localStorage.setItem("platform","ios"))},c=N(!1),d=U(()=>!s.includes(n.name)),p=U(()=>n.name!=="chat");return je(()=>{u(),o(),r(i.value)}),(h,m)=>{const g=pf("RouterView"),v=IM;return C(),ie(Ie,null,[ce("div",{class:qe(["w-full max-w-[2000px] mx-auto relative h-full min-h-full",{"px-4 lg:px-20":f(p),"pt-18":f(d)}])},[f(d)?(C(),B(KM,{key:0,modelValue:f(i),"onUpdate:modelValue":m[0]||(m[0]=y=>$e(i)?i.value=y:null),onSearchClick:a,onPlatformClick:l},null,8,["modelValue"])):Be("",!0),q(g)],2),q(v,{modelValue:f(c),"onUpdate:modelValue":m[1]||(m[1]=y=>$e(c)?c.value=y:null)},null,8,["modelValue"]),q(f(WM),{position:"top-right",richColors:"",closeButton:""})],64)}}}),XM="modulepreload",JM=function(e){return"/"+e},Lm={},mi=function(t,n,o){let r=Promise.resolve();if(n&&n.length>0){let i=function(u){return Promise.all(u.map(c=>Promise.resolve(c).then(d=>({status:"fulfilled",value:d}),d=>({status:"rejected",reason:d}))))};document.getElementsByTagName("link");const a=document.querySelector("meta[property=csp-nonce]"),l=(a==null?void 0:a.nonce)||(a==null?void 0:a.getAttribute("nonce"));r=i(n.map(u=>{if(u=JM(u),u in Lm)return;Lm[u]=!0;const c=u.endsWith(".css"),d=c?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${u}"]${d}`))return;const p=document.createElement("link");if(p.rel=c?"stylesheet":XM,c||(p.as="script"),p.crossOrigin="",p.href=u,l&&p.setAttribute("nonce",l),document.head.appendChild(p),c)return new Promise((h,m)=>{p.addEventListener("load",h),p.addEventListener("error",()=>m(new Error(`Unable to preload CSS for ${u}`)))})}))}function s(i){const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=i,window.dispatchEvent(a),!a.defaultPrevented)throw i}return r.then(i=>{for(const a of i||[])a.status==="rejected"&&s(a.reason);return t().catch(s)})},ZM=F({__name:"AlertDialog",props:{open:{type:Boolean},defaultOpen:{type:Boolean}},emits:["update:open"],setup(e,{emit:t}){const r=ft(e,t);return(s,i)=>(C(),B(f(P1),te({"data-slot":"alert-dialog"},f(r)),{default:E(()=>[V(s.$slots,"default")]),_:3},16))}}),eq=F({__name:"AlertDialogAction",props:{asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,n=et(t,"class");return(o,r)=>(C(),B(f(m1),te(f(n),{class:f(Fe)(f(op)(),t.class)}),{default:E(()=>[V(o.$slots,"default")]),_:3},16,["class"]))}}),tq=F({__name:"AlertDialogCancel",props:{asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,n=et(t,"class");return(o,r)=>(C(),B(f(w1),te(f(n),{class:f(Fe)(f(op)({variant:"outline"}),"mt-2 sm:mt-0",t.class)}),{default:E(()=>[V(o.$slots,"default")]),_:3},16,["class"]))}}),nq=F({__name:"AlertDialogContent",props:{forceMount:{type:Boolean},disableOutsidePointerEvents:{type:Boolean},asChild:{type:Boolean},as:{},class:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(e,{emit:t}){const n=e,o=t,r=et(n,"class"),s=ft(r,o);return(i,a)=>(C(),B(f(O1),null,{default:E(()=>[q(f(E1),{"data-slot":"alert-dialog-overlay",class:"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/80"}),q(f(b1),te({"data-slot":"alert-dialog-content"},f(s),{class:f(Fe)("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",n.class)}),{default:E(()=>[V(i.$slots,"default")]),_:3},16,["class"])]),_:3}))}}),oq=F({__name:"AlertDialogDescription",props:{asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,n=et(t,"class");return(o,r)=>(C(),B(f(C1),te({"data-slot":"alert-dialog-description"},f(n),{class:f(Fe)("text-muted-foreground text-sm",t.class)}),{default:E(()=>[V(o.$slots,"default")]),_:3},16,["class"]))}}),rq=F({__name:"AlertDialogFooter",props:{class:{}},setup(e){const t=e;return(n,o)=>(C(),ie("div",{"data-slot":"alert-dialog-footer",class:qe(f(Fe)("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",t.class))},[V(n.$slots,"default")],2))}}),sq=F({__name:"AlertDialogHeader",props:{class:{}},setup(e){const t=e;return(n,o)=>(C(),ie("div",{"data-slot":"alert-dialog-header",class:qe(f(Fe)("flex flex-col gap-2 text-center sm:text-left",t.class))},[V(n.$slots,"default")],2))}}),iq=F({__name:"AlertDialogTitle",props:{asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,n=et(t,"class");return(o,r)=>(C(),B(f(I1),te({"data-slot":"alert-dialog-title"},f(n),{class:f(Fe)("text-lg font-semibold",t.class)}),{default:E(()=>[V(o.$slots,"default")]),_:3},16,["class"]))}}),aq=F({__name:"AlertDialogTrigger",props:{asChild:{type:Boolean},as:{}},setup(e){const t=e;return(n,o)=>(C(),B(f(R1),te({"data-slot":"alert-dialog-trigger"},t),{default:E(()=>[V(n.$slots,"default")]),_:3},16))}}),ap=F({__name:"AlertConfirm",props:Un({title:{},description:{default:""},cancelText:{default:"cancel"},actionText:{default:"confirm"}},{modelValue:{type:Boolean,required:!1},modelModifiers:{}}),emits:Un(["confirm"],["update:modelValue"]),setup(e,{expose:t,emit:n}){const o=n,r=ts(e,"modelValue"),s=()=>{o("confirm"),r.value=!1},i=()=>{r.value=!1};return t({open:()=>r.value=!0,close:()=>r.value=!1}),(a,l)=>(C(),B(f(ZM),{open:r.value,"onUpdate:open":l[0]||(l[0]=u=>r.value=u)},{default:E(()=>[q(f(aq),{"as-child":""},{default:E(()=>[V(a.$slots,"default")]),_:3}),q(f(nq),null,{default:E(()=>[q(f(sq),null,{default:E(()=>[q(f(iq),null,{default:E(()=>[rt(Ne(a.title),1)]),_:1}),q(f(oq),null,{default:E(()=>[rt(Ne(a.description),1)]),_:1})]),_:1}),q(f(rq),null,{default:E(()=>[q(f(tq),{onClick:i},{default:E(()=>[rt(Ne(a.cancelText),1)]),_:1}),q(f(eq),{onClick:s},{default:E(()=>[rt(Ne(a.actionText),1)]),_:1})]),_:1})]),_:1})]),_:3},8,["open"]))}}),R_=F({__name:"ScrollBar",props:{orientation:{default:"vertical"},forceMount:{type:Boolean},asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,n=et(t,"class");return(o,r)=>(C(),B(f(mT),te({"data-slot":"scroll-area-scrollbar"},f(n),{class:f(Fe)("flex touch-none p-px transition-colors select-none",o.orientation==="vertical"&&"h-full w-2.5 border-l border-l-transparent",o.orientation==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent",t.class)}),{default:E(()=>[q(f(_T),{"data-slot":"scroll-area-thumb",class:"bg-border relative flex-1 rounded-full"})]),_:1},16,["class"]))}}),lp=F({__name:"ScrollArea",props:{type:{},dir:{},scrollHideDelay:{},asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,n=et(t,"class");return(o,r)=>(C(),B(f(XO),te({"data-slot":"scroll-area"},f(n),{class:f(Fe)("relative",t.class)}),{default:E(()=>[q(f(ST),{"data-slot":"scroll-area-viewport",class:"focus-visible:ring-ring/50 size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:outline-1"},{default:E(()=>[V(o.$slots,"default")]),_:3}),q(R_),q(f(tT))]),_:3},16,["class"]))}}),lq=e=>Sr("/admin/favorite/create-app-favorite",{...e,favoriteType:1}),eN=e=>wr("/admin/app/page",{...e,type:2}),uq=e=>Sr("/admin/favorite-section/create",e),tN=e=>wr("/admin/app-section/get-favorite",e),xc=F({__name:"Tooltip",props:{defaultOpen:{type:Boolean},open:{type:Boolean},delayDuration:{},disableHoverableContent:{type:Boolean},disableClosingTrigger:{type:Boolean},disabled:{type:Boolean},ignoreNonKeyboardFocus:{type:Boolean}},emits:["update:open"],setup(e,{emit:t}){const r=ft(e,t);return(s,i)=>(C(),B(f(IP),te({"data-slot":"tooltip"},f(r)),{default:E(()=>[V(s.$slots,"default")]),_:3},16))}}),Ec=F({inheritAttrs:!1,__name:"TooltipContent",props:{forceMount:{type:Boolean},ariaLabel:{},asChild:{type:Boolean},as:{},side:{},sideOffset:{default:4},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},positionStrategy:{},updatePositionStrategy:{},class:{}},emits:["escapeKeyDown","pointerDownOutside"],setup(e,{emit:t}){const n=e,o=t,r=et(n,"class"),s=ft(r,o);return(i,a)=>(C(),B(f(FP),null,{default:E(()=>[q(f(qP),te({"data-slot":"tooltip-content"},{...f(s),...i.$attrs},{class:f(Fe)("bg-primary text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit rounded-md px-3 py-1.5 text-xs text-balance",n.class)}),{default:E(()=>[V(i.$slots,"default"),q(f(EP),{class:"bg-primary fill-primary z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]"})]),_:3},16,["class"])]),_:3}))}}),Ac=F({__name:"TooltipProvider",props:{delayDuration:{default:0},skipDelayDuration:{},disableHoverableContent:{type:Boolean},disableClosingTrigger:{type:Boolean},disabled:{type:Boolean},ignoreNonKeyboardFocus:{type:Boolean}},setup(e){const t=e;return(n,o)=>(C(),B(f(TP),ct(yt(t)),{default:E(()=>[V(n.$slots,"default")]),_:3},16))}}),Oc=F({__name:"TooltipTrigger",props:{reference:{},asChild:{type:Boolean},as:{}},setup(e){const t=e;return(n,o)=>(C(),B(f(NP),te({"data-slot":"tooltip-trigger"},t),{default:E(()=>[V(n.$slots,"default")]),_:3},16))}}),Tc=N(null);function cq(){return{copiedScreen:Tc,copyScreen:n=>{Tc.value=JSON.parse(JSON.stringify(n))},clearClipboard:()=>{Tc.value=null}}}var dq=Object.defineProperty,$l=Object.getOwnPropertySymbols,B_=Object.prototype.hasOwnProperty,M_=Object.prototype.propertyIsEnumerable,Nm=(e,t,n)=>t in e?dq(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,vs=(e,t)=>{for(var n in t||(t={}))B_.call(t,n)&&Nm(e,n,t[n]);if($l)for(var n of $l(t))M_.call(t,n)&&Nm(e,n,t[n]);return e},q_=(e,t)=>{var n={};for(var o in e)B_.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&$l)for(var o of $l(e))t.indexOf(o)<0&&M_.call(e,o)&&(n[o]=e[o]);return n};const $_="[vue-draggable-plus]: ";function fq(e){console.warn($_+e)}function pq(e){console.error($_+e)}function jm(e,t,n){return n>=0&&n<e.length&&e.splice(n,0,e.splice(t,1)[0]),e}function hq(e){return e.replace(/-(\w)/g,(t,n)=>n?n.toUpperCase():"")}function mq(e){return Object.keys(e).reduce((t,n)=>(typeof e[n]<"u"&&(t[hq(n)]=e[n]),t),{})}function Vm(e,t){return Array.isArray(e)&&e.splice(t,1),e}function Um(e,t,n){return Array.isArray(e)&&e.splice(t,0,n),e}function gq(e){return typeof e>"u"}function vq(e){return typeof e=="string"}function Hm(e,t,n){const o=e.children[n];e.insertBefore(t,o)}function Pc(e){e.parentNode&&e.parentNode.removeChild(e)}function yq(e,t=document){var n;let o=null;return typeof(t==null?void 0:t.querySelector)=="function"?o=(n=t==null?void 0:t.querySelector)==null?void 0:n.call(t,e):o=document.querySelector(e),o||fq(`Element not found: ${e}`),o}function bq(e,t,n=null){return function(...o){return e.apply(n,o),t.apply(n,o)}}function _q(e,t){const n=vs({},e);return Object.keys(t).forEach(o=>{n[o]?n[o]=bq(e[o],t[o]):n[o]=t[o]}),n}function wq(e){return e instanceof HTMLElement}function zm(e,t){Object.keys(e).forEach(n=>{t(n,e[n])})}function Sq(e){return e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97)}const Cq=Object.assign;/**!
DesignScreenshot/output/user_info_run/1_login_page.html:110:              transform 0.3s ease-out`}},[q(m,{variant:"outline",class:"rounded-full",border:!1,onClick:d[0]||(d[0]=Ze(v=>c.$emit("save",c.id),["stop"]))},{default:E(()=>d[2]||(d[2]=[rt(" save ",-1)])),_:1,__:[2]}),q(m,{class:"rounded-full",border:!1,onClick:d[1]||(d[1]=Ze(v=>c.$emit("copy",c.id),["stop"]))},{default:E(()=>d[3]||(d[3]=[rt(" copy ",-1)])),_:1,__:[3]})],2)],2)]),c.name||c.logo?(C(),B(g,{key:0,name:c.name,logo:c.logo,class:"flex-shrink-0 relative z-30 mt-1"},null,8,["name","logo"])):Be("",!0)],2)}}}),og=F({__name:"Checkbox",props:{defaultValue:{type:[Boolean,String]},modelValue:{type:[Boolean,String,null]},disabled:{type:Boolean},value:{},id:{},asChild:{type:Boolean},as:{},name:{},required:{type:Boolean},class:{}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,o=t,r=et(n,"class"),s=ft(r,o);return(i,a)=>(C(),B(f(iE),te({"data-slot":"checkbox"},f(s),{class:f(Fe)("peer border-input data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",n.class)}),{default:E(()=>[q(f(lE),{"data-slot":"checkbox-indicator",class:"flex items-center justify-center text-current transition-none"},{default:E(()=>[V(i.$slots,"default",{},()=>[q(f(xb),{class:"size-3.5"})])]),_:3})]),_:3},16,["class"]))}}),P$=F({__name:"Popover",props:{defaultOpen:{type:Boolean},open:{type:Boolean},modal:{type:Boolean}},emits:["update:open"],setup(e,{emit:t}){const r=ft(e,t);return(s,i)=>(C(),B(f(_O),te({"data-slot":"popover"},f(r)),{default:E(()=>[V(s.$slots,"default")]),_:3},16))}}),k$=F({inheritAttrs:!1,__name:"PopoverContent",props:{forceMount:{type:Boolean},side:{},sideOffset:{default:4},sideFlip:{type:Boolean},align:{default:"center"},alignOffset:{},alignFlip:{type:Boolean},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},positionStrategy:{},updatePositionStrategy:{},disableUpdateOnLayoutShift:{type:Boolean},prioritizePosition:{type:Boolean},reference:{},asChild:{type:Boolean},as:{},disableOutsidePointerEvents:{type:Boolean},class:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(e,{emit:t}){const n=e,o=t,r=et(n,"class"),s=ft(r,o);return(i,a)=>(C(),B(f(PO),null,{default:E(()=>[q(f(OO),te({"data-slot":"popover-content"},{...f(s),...i.$attrs},{class:f(Fe)("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 rounded-md border p-4 shadow-md origin-(--reka-popover-content-transform-origin) outline-hidden",n.class)}),{default:E(()=>[V(i.$slots,"default")]),_:3},16,["class"])]),_:3}))}}),I$=F({__name:"PopoverTrigger",props:{asChild:{type:Boolean},as:{}},setup(e){const t=e;return(n,o)=>(C(),B(f(IO),te({"data-slot":"popover-trigger"},t),{default:E(()=>[V(n.$slots,"default")]),_:3},16))}}),D$={class:"truncate text-left"},R$={key:0,class:"ml-1.5 font-normal text-xs px-1.5 py-0.5 bg-background/20 rounded-full"},B$={key:0,class:"text-xs mt-1 text-muted-foreground"},M$=["for"],q$=["for"],$$=F({__name:"Dropdown",props:{defaultLabel:{},data:{},selectionMode:{default:"single"},placement:{default:"center"},searchable:{type:Boolean,default:!0}},emits:["change"],setup(e,{expose:t,emit:n}){const o=n,r=N(!1),s=N(""),i=N([]),a=U(()=>!e.data||e.data.length===0||e.data.every(h=>!h.children||h.children.length===0)),l=U(()=>{var h;return((h=e.data)==null?void 0:h.flatMap(m=>m.children??[]))??[]}),u=U(()=>l.value.filter(h=>i.value.includes(h.id))),c=U(()=>{if(!e.data)return[];const h=s.value.toLowerCase();return e.data.map(m=>{var v;const g=(v=m.children)==null?void 0:v.filter(y=>{const b=i.value.includes(y.id),_=y.label.toLowerCase().includes(h);return h?_:!b});return g&&g.length>0?{...m,children:g}:null}).filter(m=>m!==null)}),d=h=>{if(e.selectionMode==="single")i.value=i.value[0]===h?[]:[h],r.value=!1;else{const m=[...i.value],g=m.indexOf(h);g>-1?m.splice(g,1):m.push(h),i.value=m}},p=()=>{i.value=[],s.value=""};return Ce(u,h=>{o("change",h)},{deep:!0}),t({clear:p}),(h,m)=>(C(),B(f(P$),{open:f(r),"onUpdate:open":m[1]||(m[1]=g=>$e(r)?r.value=g:null)},{default:E(()=>[q(f(I$),{"as-child":""},{default:E(()=>[q(f(vn),{variant:f(u).length>0?"default":"outline",role:"combobox","aria-expanded":f(r),class:"h-11 justify-between px-4 font-semibold rounded-full transition-colors duration-200"},{default:E(()=>{var g;return[ce("span",D$,[f(u).length===0?(C(),ie(Ie,{key:0},[rt(Ne(h.defaultLabel),1)],64)):(C(),ie(Ie,{key:1},[rt(Ne((g=f(u)[0])==null?void 0:g.label)+" ",1),h.selectionMode==="multiple"&&f(u).length>1?(C(),ie("span",R$," +"+Ne(f(u).length-1),1)):Be("",!0)],64))]),f(u).length>0?(C(),B(f(Pk),{key:0,class:"ml-2 h-4 w-4 shrink-0 opacity-50",onClick:Ze(p,["stop","prevent"])})):(C(),B(f(Kf),{key:1,class:qe(["ml-2 h-4 w-4 shrink-0 opacity-50 transition-transform",{"rotate-180":f(r)}])},null,8,["class"]))]}),_:1},8,["variant","aria-expanded"])]),_:1}),q(f(k$),{class:"w-80 p-0",align:h.placement},{default:E(()=>[q(f(Cb),{class:"max-h-[480px] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md"},{default:E(()=>[h.searchable?(C(),B(f(Ab),{key:0,modelValue:f(s),"onUpdate:modelValue":m[0]||(m[0]=g=>$e(s)?s.value=g:null),placeholder:"搜索...",class:"h-10 w-full rounded-none border-0 border-b focus-visible:ring-0 focus-visible:ring-offset-0"},null,8,["modelValue"])):Be("",!0),q(f(Ob),{class:"flex-1 overflow-y-auto overscroll-contain custom-scrollbar"},{default:E(()=>[q(f(Eb),{class:"py-6 text-center text-sm"},{default:E(()=>[ce("p",null,Ne(f(a)?"暂无数据":"未找到结果"),1),f(a)?Be("",!0):(C(),ie("p",B$,"请尝试其他关键词"))]),_:1}),f(u).length>0&&f(s)===""?(C(),B(f(Rd),{key:0,heading:"已选"},{default:E(()=>[(C(!0),ie(Ie,null,wt(f(u),g=>(C(),B(f(Dd),{key:`selected-${g.id}`,value:g.label,onSelect:Ze(v=>d(g.id),["prevent"]),class:"cursor-pointer"},{default:E(()=>[q(f(og),{id:`selected-${g.id}`,"model-value":!0,class:"mr-2"},null,8,["id"]),ce("label",{for:`selected-${g.id}`,class:"cursor-pointer"},Ne(g.label),9,M$)]),_:2},1032,["value","onSelect"]))),128))]),_:1})):Be("",!0),(C(!0),ie(Ie,null,wt(f(c),g=>(C(),B(f(Rd),{key:g.label,heading:g.label},{default:E(()=>[(C(!0),ie(Ie,null,wt(g.children,v=>(C(),B(f(Dd),{key:v.id,value:v.label,onSelect:Ze(y=>d(v.id),["prevent"]),class:"cursor-pointer"},{default:E(()=>[q(f(og),{id:v.id,"model-value":f(i).includes(v.id),class:"mr-2"},null,8,["id","model-value"]),ce("label",{for:v.id,class:"cursor-pointer"},Ne(v.label),9,q$)]),_:2},1032,["value","onSelect"]))),128))]),_:2},1032,["heading"]))),128))]),_:1})]),_:1})]),_:1},8,["align"])]),_:1},8,["open"]))}}),gl=Lu($$,[["__scopeId","data-v-cce68d8f"]]),F$={class:"flex flex-col gap-6"},L$={class:"flex gap-8"},N$={class:"w-24 h-24"},j$={class:"flex-1 flex items-center"},V$={class:"text-5xl font-semibold text-primary"},U$={class:"flex gap-8"},H$={class:"flex flex-col gap-1"},z$={class:"text-sm font-semibold text-primary text-center"},K$={class:"flex flex-col gap-1"},W$={class:"text-sm font-semibold text-primary text-center"},G$=F({__name:"StoreAppCard",props:{logoUrl:{},name:{},description:{},platform:{},rating:{},categories:{}},emits:["click"],setup(e,{emit:t}){return(n,o)=>{var s;const r=ri;return C(),ie("div",F$,[ce("div",L$,[ce("div",N$,[q(r,{src:n.logoUrl,class:"rounded-3xl"},null,8,["src"])]),ce("div",j$,[ce("span",V$,Ne(n.name)+"—"+Ne(n.description),1)])]),ce("div",U$,[ce("div",H$,[o[0]||(o[0]=ce("span",{class:"text-sm text-textSecondary"},"Platform",-1)),ce("span",z$,Ne(n.platform),1)]),ce("div",K$,[o[1]||(o[1]=ce("span",{class:"text-sm text-textSecondary"},"Category",-1)),ce("span",W$,Ne((s=n.categories)==null?void 0:s.join(", ")),1)])])])}}}),Q$=e=>Sr("/admin/app-info/create",e),Y$=e=>wr("/admin/screen/page",e),X$=F({__name:"Select",props:{open:{type:Boolean},defaultOpen:{type:Boolean},defaultValue:{},modelValue:{},by:{type:[String,Function]},dir:{},multiple:{type:Boolean},autocomplete:{},disabled:{type:Boolean},name:{},required:{type:Boolean}},emits:["update:modelValue","update:open"],setup(e,{emit:t}){const r=ft(e,t);return(s,i)=>(C(),B(f(kT),te({"data-slot":"select"},f(r)),{default:E(()=>[V(s.$slots,"default")]),_:3},16))}}),J$=F({inheritAttrs:!1,__name:"SelectContent",props:{forceMount:{type:Boolean},position:{default:"popper"},bodyLock:{type:Boolean},side:{},sideOffset:{},sideFlip:{type:Boolean},align:{},alignOffset:{},alignFlip:{type:Boolean},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},positionStrategy:{},updatePositionStrategy:{},disableUpdateOnLayoutShift:{type:Boolean},prioritizePosition:{type:Boolean},reference:{},asChild:{type:Boolean},as:{},class:{}},emits:["closeAutoFocus","escapeKeyDown","pointerDownOutside"],setup(e,{emit:t}){const n=e,o=t,r=et(n,"class"),s=ft(r,o);return(i,a)=>(C(),B(f(oP),null,{default:E(()=>[q(f(UT),te({"data-slot":"select-content"},{...f(s),...i.$attrs},{class:f(Fe)("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--reka-select-content-available-height) min-w-[8rem] overflow-x-hidden overflow-y-auto rounded-md border shadow-md",i.position==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",n.class)}),{default:E(()=>[q(f(oF)),q(f(hP),{class:qe(f(Fe)("p-1",i.position==="popper"&&"h-[var(--reka-select-trigger-height)] w-full min-w-[var(--reka-select-trigger-width)] scroll-my-1"))},{default:E(()=>[V(i.$slots,"default")]),_:3},8,["class"]),q(f(nF))]),_:3},16,["class"])]),_:3}))}}),Z$=F({__name:"SelectGroup",props:{asChild:{type:Boolean},as:{}},setup(e){const t=e;return(n,o)=>(C(),B(f(KT),te({"data-slot":"select-group"},t),{default:E(()=>[V(n.$slots,"default")]),_:3},16))}}),eF={class:"absolute right-2 flex size-3.5 items-center justify-center"},tF=F({__name:"SelectItem",props:{value:{},disabled:{type:Boolean},textValue:{},asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,n=et(t,"class"),o=Kt(n);return(r,s)=>(C(),B(f(XT),te({"data-slot":"select-item"},f(o),{class:f(Fe)("focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",t.class)}),{default:E(()=>[ce("span",eF,[q(f(ZT),null,{default:E(()=>[q(f(xb),{class:"size-4"})]),_:1})]),q(f(tP),null,{default:E(()=>[V(r.$slots,"default")]),_:3})]),_:3},16,["class"]))}}),nF=F({__name:"SelectScrollDownButton",props:{asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,n=et(t,"class"),o=Kt(n);return(r,s)=>(C(),B(f(iP),te({"data-slot":"select-scroll-down-button"},f(o),{class:f(Fe)("flex cursor-default items-center justify-center py-1",t.class)}),{default:E(()=>[V(r.$slots,"default",{},()=>[q(f(Kf),{class:"size-4"})])]),_:3},16,["class"]))}}),oF=F({__name:"SelectScrollUpButton",props:{asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,n=et(t,"class"),o=Kt(n);return(r,s)=>(C(),B(f(lP),te({"data-slot":"select-scroll-up-button"},f(o),{class:f(Fe)("flex cursor-default items-center justify-center py-1",t.class)}),{default:E(()=>[V(r.$slots,"default",{},()=>[q(f(Tk),{class:"size-4"})])]),_:3},16,["class"]))}}),rF=F({__name:"SelectTrigger",props:{disabled:{type:Boolean},reference:{},asChild:{type:Boolean},as:{},class:{},size:{default:"default"}},setup(e){const t=e,n=et(t,"class","size"),o=Kt(n);return(r,s)=>(C(),B(f(cP),te({"data-slot":"select-trigger","data-size":r.size},f(o),{class:f(Fe)("border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t.class)}),{default:E(()=>[V(r.$slots,"default"),q(f(GT),{"as-child":""},{default:E(()=>[q(f(Kf),{class:"size-4 opacity-50"})]),_:1})]),_:3},16,["data-size","class"]))}}),sF=F({__name:"SelectValue",props:{placeholder:{},asChild:{type:Boolean},as:{}},setup(e){const t=e;return(n,o)=>(C(),B(f(fP),te({"data-slot":"select-value"},t),{default:E(()=>[V(n.$slots,"default")]),_:3},16))}}),rg=e=>Array.isArray(e)&&e.length>0,iF={class:"flex flex-col gap-3 pb-10"},aF={class:"sticky-dropdown-filters flex py-2 gap-2"},lF={key:1,class:"text-center p-10"},uF=F({__name:"Details",setup(e){const t=T_(),{definitions:n}=va($u()),o=ya(),r=N(t.query.platform),s=U(()=>((r==null?void 0:r.value)==="web"?ql:Ks).slice(1)),i=N(s.value[0].label),a=T=>{var P;const A=(P=s.value.find(w=>w.label===T))==null?void 0:P.value,D=n.value.find(w=>w.slug===A&&w.platformType===r.value);return D==null?void 0:D.children},l=U(()=>Number(t.query.id)),{data:u,isLoading:c}=hC({queryKey:["appDetails",l],queryFn:async()=>{const T=await xB(l.value)||[];return rg(T)&&(T.sort((A,D)=>new Date(D.createTime).getTime()-new Date(A.createTime).getTime()),T.forEach(A=>{A.appSections=A.appSections||[]})),T},enabled:U(()=>!!l.value)}),d=N(""),p=U(()=>u.value?u.value.map(T=>({id:T.externalVersionId,label:T.createTime,value:T.externalVersionId})):[]);Ce(()=>u.value,T=>{T&&rg(T)&&(d.value=T[0].externalVersionId)},{immediate:!0});const h=U(()=>{var T;return!u.value||!d.value?(T=u.value)==null?void 0:T[0]:u.value.find(A=>A.externalVersionId===d.value)}),m=N();Ce(h,T=>{T?m.value=JSON.parse(JSON.stringify(T)):m.value=void 0},{deep:!0,immediate:!0});const g=N([]),v=T=>{g.value=(T==null?void 0:T.map(A=>A.displayName))||[]},y=U(()=>{if(m.value&&m.value.appSections)return m.value.appSections.map(A=>A.screens).flat().filter(Boolean)}),b=U(()=>{if(y.value&&y.value.length>0){let T=y.value;return g.value.length>0&&(i.value==="Screens"&&(T=T.filter(A=>A.screenPatterns&&Fm(A.screenPatterns,g.value))),i.value==="UI Elements"&&(T=T.filter(A=>A.screenElements&&Fm(A.screenElements,g.value)))),T}}),_=Ii({mutationFn:Q$,onSuccess:()=>{o.invalidateQueries({queryKey:["appDetails",l.value]})}}),O=()=>{if(!m.value||!m.value.id){console.warn("App info not available to create a new AppInfo.");return}_.mutate({appId:m.value.id})};return(T,A)=>{const D=G$,P=gl,w=Ho,k=tw,$=T$;return C(),ie("div",iF,[f(m)?(C(),B(D,{key:0,name:f(m).appName,"logo-url":f(m).appLogoUrl,platform:f(m).platform,description:f(m).appTagline,categories:f(m).allAppCategories},null,8,["name","logo-url","platform","description","categories"])):Be("",!0),q(f(rp),{modelValue:f(i),"onUpdate:modelValue":A[0]||(A[0]=R=>$e(i)?i.value=R:null),class:"!-ml-2"},{default:E(()=>[q(f(sp),{class:"bg-transparent p-0"},{default:E(()=>[(C(!0),ie(Ie,null,wt(f(s),R=>(C(),B(f(ip),{key:R.label,value:R.label,class:"!font-bold"},{default:E(()=>[rt(Ne(R.label),1)]),_:2},1032,["value"]))),128))]),_:1})]),_:1},8,["modelValue"]),ce("div",aF,[q(f(X$),{modelValue:f(d),"onUpdate:modelValue":A[1]||(A[1]=R=>$e(d)?d.value=R:null)},{default:E(()=>[q(f(rF),{class:"w-60 !h-11 rounded-full"},{default:E(()=>[q(f(sF),{placeholder:"Version",class:"font-bold truncate text-base"})]),_:1}),q(f(J$),null,{default:E(()=>[q(f(Z$),null,{default:E(()=>[(C(!0),ie(Ie,null,wt(f(p),R=>(C(),B(f(tF),{key:R.id,value:R.value},{default:E(()=>[rt(Ne(R.label),1)]),_:2},1032,["value"]))),128))]),_:1})]),_:1})]),_:1},8,["modelValue"]),(C(),B(P,{key:f(i),"default-label":f(i),data:a(f(i)),onChange:v,"selection-mode":"multiple",placement:"start"},null,8,["default-label","data"])),f(i)==="Flows"?(C(),B(f(ap),{key:0,title:"确定要创建新的Flow吗？",description:"这将创建一个新的App的Flow版本。",onConfirm:O},{default:E(()=>[q(f(vn),{disabled:f(_).isPending.value,class:"flex items-center gap-2 cursor-pointer"},{default:E(()=>[q(w,{icon:f(_).isPending.value?"eos-icons:loading":"ep:plus",class:"text-sm"},null,8,["icon"]),A[3]||(A[3]=ce("span",null,"Create New Flow",-1))]),_:1,__:[3]},8,["disabled"])]),_:1})):Be("",!0)]),f(c)?(C(),ie("div",lF,"Loading...")):f(i)==="Screens"||f(i)==="UI Elements"||f(i)==="Marketing Pages"?(C(),ie("div",{key:2,class:qe(["grid gap-x-5 gap-y-12 flex-1",f(r)==="web"?"grid-cols-[repeat(auto-fill,minmax(min(100%,500px),1fr))]":"grid-cols-[repeat(auto-fill,minmax(min(100%,230px),1fr))]"])},[(C(!0),ie(Ie,null,wt(f(b),(R,G)=>(C(),B(k,{key:G,id:R.id,src:R.screenUrl,platform:f(r)},null,8,["id","src","platform"]))),128))],2)):Be("",!0),f(i)==="Flows"&&f(m)?(C(),B($,{key:3,modelValue:f(m).appSections,"onUpdate:modelValue":A[2]||(A[2]=R=>f(m).appSections=R),platform:f(r),"app-info-id":f(m).id},null,8,["modelValue","platform","app-info-id"])):Be("",!0)])}}}),cF=Lu(uF,[["__scopeId","data-v-282accd6"]]);function dF(e){return Object.prototype.toString.call(e)==="[object Object]"}function sg(e){return dF(e)||Array.isArray(e)}function fF(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function fp(e,t){const n=Object.keys(e),o=Object.keys(t);if(n.length!==o.length)return!1;const r=JSON.stringify(Object.keys(e.breakpoints||{})),s=JSON.stringify(Object.keys(t.breakpoints||{}));return r!==s?!1:n.every(i=>{const a=e[i],l=t[i];return typeof a=="function"?`${a}`==`${l}`:!sg(a)||!sg(l)?a===l:fp(a,l)})}function ig(e){return e.concat().sort((t,n)=>t.name>n.name?1:-1).map(t=>t.options)}function pF(e,t){if(e.length!==t.length)return!1;const n=ig(e),o=ig(t);return n.every((r,s)=>{const i=o[s];return fp(r,i)})}function pp(e){return typeof e=="number"}function ef(e){return typeof e=="string"}function Nu(e){return typeof e=="boolean"}function ag(e){return Object.prototype.toString.call(e)==="[object Object]"}function _t(e){return Math.abs(e)}function hp(e){return Math.sign(e)}function Vi(e,t){return _t(e-t)}function hF(e,t){if(e===0||t===0||_t(e)<=_t(t))return 0;const n=Vi(_t(e),_t(t));return _t(n/e)}function mF(e){return Math.round(e*100)/100}function ia(e){return aa(e).map(Number)}function jn(e){return e[Ia(e)]}function Ia(e){return Math.max(0,e.length-1)}function mp(e,t){return t===Ia(e)}function lg(e,t=0){return Array.from(Array(e),(n,o)=>t+o)}function aa(e){return Object.keys(e)}function nw(e,t){return[e,t].reduce((n,o)=>(aa(o).forEach(r=>{const s=n[r],i=o[r],a=ag(s)&&ag(i);n[r]=a?nw(s,i):i}),n),{})}function tf(e,t){return typeof t.MouseEvent<"u"&&e instanceof t.MouseEvent}function gF(e,t){const n={start:o,center:r,end:s};function o(){return 0}function r(l){return s(l)/2}function s(l){return t-l}function i(l,u){return ef(e)?n[e](l):e(t,l,u)}return{measure:i}}function la(){let e=[];function t(r,s,i,a={passive:!0}){let l;if("addEventListener"in r)r.addEventListener(s,i,a),l=()=>r.removeEventListener(s,i,a);else{const u=r;u.addListener(i),l=()=>u.removeListener(i)}return e.push(l),o}function n(){e=e.filter(r=>r())}const o={add:t,clear:n};return o}function vF(e,t,n,o){const r=la(),s=1e3/60;let i=null,a=0,l=0;function u(){r.add(e,"visibilitychange",()=>{e.hidden&&m()})}function c(){h(),r.clear()}function d(v){if(!l)return;i||(i=v,n(),n());const y=v-i;for(i=v,a+=y;a>=s;)n(),a-=s;const b=a/s;o(b),l&&(l=t.requestAnimationFrame(d))}function p(){l||(l=t.requestAnimationFrame(d))}function h(){t.cancelAnimationFrame(l),i=null,a=0,l=0}function m(){i=null,a=0}return{init:u,destroy:c,start:p,stop:h,update:n,render:o}}function yF(e,t){const n=t==="rtl",o=e==="y",r=o?"y":"x",s=o?"x":"y",i=!o&&n?-1:1,a=c(),l=d();function u(m){const{height:g,width:v}=m;return o?g:v}function c(){return o?"top":n?"right":"left"}function d(){return o?"bottom":n?"left":"right"}function p(m){return m*i}return{scroll:r,cross:s,startEdge:a,endEdge:l,measureSize:u,direction:p}}function es(e=0,t=0){const n=_t(e-t);function o(u){return u<e}function r(u){return u>t}function s(u){return o(u)||r(u)}function i(u){return s(u)?o(u)?e:t:u}function a(u){return n?u-n*Math.ceil((u-t)/n):u}return{length:n,max:t,min:e,constrain:i,reachedAny:s,reachedMax:r,reachedMin:o,removeOffset:a}}function ow(e,t,n){const{constrain:o}=es(0,e),r=e+1;let s=i(t);function i(p){return n?_t((r+p)%r):o(p)}function a(){return s}function l(p){return s=i(p),d}function u(p){return c().set(a()+p)}function c(){return ow(e,a(),n)}const d={get:a,set:l,add:u,clone:c};return d}function bF(e,t,n,o,r,s,i,a,l,u,c,d,p,h,m,g,v,y,b){const{cross:_,direction:O}=e,T=["INPUT","SELECT","TEXTAREA"],A={passive:!1},D=la(),P=la(),w=es(50,225).constrain(h.measure(20)),k={mouse:300,touch:400},$={mouse:500,touch:600},R=m?43:25;let G=!1,J=0,ne=0,ae=!1,re=!1,L=!1,oe=!1;function Y(S){if(!b)return;function I(K){(Nu(b)||b(S,K))&&Se(K)}const j=t;D.add(j,"dragstart",K=>K.preventDefault(),A).add(j,"touchmove",()=>{},A).add(j,"touchend",()=>{}).add(j,"touchstart",I).add(j,"mousedown",I).add(j,"touchcancel",z).add(j,"contextmenu",z).add(j,"click",H,!0)}function ee(){D.clear(),P.clear()}function le(){const S=oe?n:t;P.add(S,"touchmove",x,A).add(S,"touchend",z).add(S,"mousemove",x,A).add(S,"mouseup",z)}function ye(S){const I=S.nodeName||"";return T.includes(I)}function me(){return(m?$:k)[oe?"mouse":"touch"]}function Pe(S,I){const j=d.add(hp(S)*-1),K=c.byDistance(S,!m).distance;return m||_t(S)<w?K:v&&I?K*.5:c.byIndex(j.get(),0).distance}function Se(S){const I=tf(S,o);oe=I,L=m&&I&&!S.buttons&&G,G=Vi(r.get(),i.get())>=2,!(I&&S.button!==0)&&(ye(S.target)||(ae=!0,s.pointerDown(S),u.useFriction(0).useDuration(0),r.set(i),le(),J=s.readPoint(S),ne=s.readPoint(S,_),p.emit("pointerDown")))}function x(S){if(!tf(S,o)&&S.touches.length>=2)return z(S);const j=s.readPoint(S),K=s.readPoint(S,_),Z=Vi(j,J),Q=Vi(K,ne);if(!re&&!oe&&(!S.cancelable||(re=Z>Q,!re)))return z(S);const ue=s.pointerMove(S);Z>g&&(L=!0),u.useFriction(.3).useDuration(.75),a.start(),r.add(O(ue)),S.preventDefault()}function z(S){const j=c.byDistance(0,!1).index!==d.get(),K=s.pointerUp(S)*me(),Z=Pe(O(K),j),Q=hF(K,Z),ue=R-10*Q,fe=y+Q/50;re=!1,ae=!1,P.clear(),u.useDuration(ue).useFriction(fe),l.distance(Z,!m),oe=!1,p.emit("pointerUp")}function H(S){L&&(S.stopPropagation(),S.preventDefault(),L=!1)}function X(){return ae}return{init:Y,destroy:ee,pointerDown:X}}function _F(e,t){let o,r;function s(d){return d.timeStamp}function i(d,p){const m=`client${(p||e.scroll)==="x"?"X":"Y"}`;return(tf(d,t)?d:d.touches[0])[m]}function a(d){return o=d,r=d,i(d)}function l(d){const p=i(d)-i(r),h=s(d)-s(o)>170;return r=d,h&&(o=d),p}function u(d){if(!o||!r)return 0;const p=i(r)-i(o),h=s(d)-s(o),m=s(d)-s(r)>170,g=p/h;return h&&!m&&_t(g)>.1?g:0}return{pointerDown:a,pointerMove:l,pointerUp:u,readPoint:i}}function wF(){function e(n){const{offsetTop:o,offsetLeft:r,offsetWidth:s,offsetHeight:i}=n;return{top:o,right:r+s,bottom:o+i,left:r,width:s,height:i}}return{measure:e}}function SF(e){function t(o){return e*(o/100)}return{measure:t}}function CF(e,t,n,o,r,s,i){const a=[e].concat(o);let l,u,c=[],d=!1;function p(v){return r.measureSize(i.measure(v))}function h(v){if(!s)return;u=p(e),c=o.map(p);function y(b){for(const _ of b){if(d)return;const O=_.target===e,T=o.indexOf(_.target),A=O?u:c[T],D=p(O?e:o[T]);if(_t(D-A)>=.5){v.reInit(),t.emit("resize");break}}}l=new ResizeObserver(b=>{(Nu(s)||s(v,b))&&y(b)}),n.requestAnimationFrame(()=>{a.forEach(b=>l.observe(b))})}function m(){d=!0,l&&l.disconnect()}return{init:h,destroy:m}}function xF(e,t,n,o,r,s){let i=0,a=0,l=r,u=s,c=e.get(),d=0;function p(){const A=o.get()-e.get(),D=!l;let P=0;return D?(i=0,n.set(o),e.set(o),P=A):(n.set(e),i+=A/l,i*=u,c+=i,e.add(i),P=c-d),a=hp(P),d=c,T}function h(){const A=o.get()-t.get();return _t(A)<.001}function m(){return l}function g(){return a}function v(){return i}function y(){return _(r)}function b(){return O(s)}function _(A){return l=A,T}function O(A){return u=A,T}const T={direction:g,duration:m,velocity:v,seek:p,settled:h,useBaseFriction:b,useBaseDuration:y,useFriction:O,useDuration:_};return T}function EF(e,t,n,o,r){const s=r.measure(10),i=r.measure(50),a=es(.1,.99);let l=!1;function u(){return!(l||!e.reachedAny(n.get())||!e.reachedAny(t.get()))}function c(h){if(!u())return;const m=e.reachedMin(t.get())?"min":"max",g=_t(e[m]-t.get()),v=n.get()-t.get(),y=a.constrain(g/i);n.subtract(v*y),!h&&_t(v)<s&&(n.set(e.constrain(n.get())),o.useDuration(25).useBaseFriction())}function d(h){l=!h}return{shouldConstrain:u,constrain:c,toggleActive:d}}function AF(e,t,n,o,r){const s=es(-t+e,0),i=d(),a=c(),l=p();function u(m,g){return Vi(m,g)<=1}function c(){const m=i[0],g=jn(i),v=i.lastIndexOf(m),y=i.indexOf(g)+1;return es(v,y)}function d(){return n.map((m,g)=>{const{min:v,max:y}=s,b=s.constrain(m),_=!g,O=mp(n,g);return _?y:O||u(v,b)?v:u(y,b)?y:b}).map(m=>parseFloat(m.toFixed(3)))}function p(){if(t<=e+r)return[s.max];if(o==="keepSnaps")return i;const{min:m,max:g}=a;return i.slice(m,g)}return{snapsContained:l,scrollContainLimit:a}}function OF(e,t,n){const o=t[0],r=n?o-e:jn(t);return{limit:es(r,o)}}function TF(e,t,n,o){const s=t.min+.1,i=t.max+.1,{reachedMin:a,reachedMax:l}=es(s,i);function u(p){return p===1?l(n.get()):p===-1?a(n.get()):!1}function c(p){if(!u(p))return;const h=e*(p*-1);o.forEach(m=>m.add(h))}return{loop:c}}function PF(e){const{max:t,length:n}=e;function o(s){const i=s-t;return n?i/-n:0}return{get:o}}function kF(e,t,n,o,r){const{startEdge:s,endEdge:i}=e,{groupSlides:a}=r,l=d().map(t.measure),u=p(),c=h();function d(){return a(o).map(g=>jn(g)[i]-g[0][s]).map(_t)}function p(){return o.map(g=>n[s]-g[s]).map(g=>-_t(g))}function h(){return a(u).map(g=>g[0]).map((g,v)=>g+l[v])}return{snaps:u,snapsAligned:c}}function IF(e,t,n,o,r,s){const{groupSlides:i}=r,{min:a,max:l}=o,u=c();function c(){const p=i(s),h=!e||t==="keepSnaps";return n.length===1?[s]:h?p:p.slice(a,l).map((m,g,v)=>{const y=!g,b=mp(v,g);if(y){const _=jn(v[0])+1;return lg(_)}if(b){const _=Ia(s)-jn(v)[0]+1;return lg(_,jn(v)[0])}return m})}return{slideRegistry:u}}function DF(e,t,n,o,r){const{reachedAny:s,removeOffset:i,constrain:a}=o;function l(m){return m.concat().sort((g,v)=>_t(g)-_t(v))[0]}function u(m){const g=e?i(m):a(m),v=t.map((b,_)=>({diff:c(b-g,0),index:_})).sort((b,_)=>_t(b.diff)-_t(_.diff)),{index:y}=v[0];return{index:y,distance:g}}function c(m,g){const v=[m,m+n,m-n];if(!e)return m;if(!g)return l(v);const y=v.filter(b=>hp(b)===g);return y.length?l(y):jn(v)-n}function d(m,g){const v=t[m]-r.get(),y=c(v,g);return{index:m,distance:y}}function p(m,g){const v=r.get()+m,{index:y,distance:b}=u(v),_=!e&&s(v);if(!g||_)return{index:y,distance:m};const O=t[y]-b,T=m+c(O,0);return{index:y,distance:T}}return{byDistance:p,byIndex:d,shortcut:c}}function RF(e,t,n,o,r,s,i){function a(d){const p=d.distance,h=d.index!==t.get();s.add(p),p&&(o.duration()?e.start():(e.update(),e.render(1),e.update())),h&&(n.set(t.get()),t.set(d.index),i.emit("select"))}function l(d,p){const h=r.byDistance(d,p);a(h)}function u(d,p){const h=t.clone().set(d),m=r.byIndex(h.get(),p);a(m)}return{distance:l,index:u}}function BF(e,t,n,o,r,s,i,a){const l={passive:!0,capture:!0};let u=0;function c(h){if(!a)return;function m(g){if(new Date().getTime()-u>10)return;i.emit("slideFocusStart"),e.scrollLeft=0;const b=n.findIndex(_=>_.includes(g));pp(b)&&(r.useDuration(0),o.index(b,0),i.emit("slideFocus"))}s.add(document,"keydown",d,!1),t.forEach((g,v)=>{s.add(g,"focus",y=>{(Nu(a)||a(h,y))&&m(v)},l)})}function d(h){h.code==="Tab"&&(u=new Date().getTime())}return{init:c}}function wi(e){let t=e;function n(){return t}function o(l){t=i(l)}function r(l){t+=i(l)}function s(l){t-=i(l)}function i(l){return pp(l)?l:l.get()}return{get:n,set:o,add:r,subtract:s}}function rw(e,t){const n=e.scroll==="x"?i:a,o=t.style;let r=null,s=!1;function i(p){return`translate3d(${p}px,0px,0px)`}function a(p){return`translate3d(0px,${p}px,0px)`}function l(p){if(s)return;const h=mF(e.direction(p));h!==r&&(o.transform=n(h),r=h)}function u(p){s=!p}function c(){s||(o.transform="",t.getAttribute("style")||t.removeAttribute("style"))}return{clear:c,to:l,toggleActive:u}}function MF(e,t,n,o,r,s,i,a,l){const c=ia(r),d=ia(r).reverse(),p=y().concat(b());function h(D,P){return D.reduce((w,k)=>w-r[k],P)}function m(D,P){return D.reduce((w,k)=>h(w,P)>0?w.concat([k]):w,[])}function g(D){return s.map((P,w)=>({start:P-o[w]+.5+D,end:P+t-.5+D}))}function v(D,P,w){const k=g(P);return D.map($=>{const R=w?0:-n,G=w?n:0,J=w?"end":"start",ne=k[$][J];return{index:$,loopPoint:ne,slideLocation:wi(-1),translate:rw(e,l[$]),target:()=>a.get()>ne?R:G}})}function y(){const D=i[0],P=m(d,D);return v(P,n,!1)}function b(){const D=t-i[0]-1,P=m(c,D);return v(P,-n,!0)}function _(){return p.every(({index:D})=>{const P=c.filter(w=>w!==D);return h(P,t)<=.1})}function O(){p.forEach(D=>{const{target:P,translate:w,slideLocation:k}=D,$=P();$!==k.get()&&(w.to($),k.set($))})}function T(){p.forEach(D=>D.translate.clear())}return{canLoop:_,clear:T,loop:O,loopPoints:p}}function qF(e,t,n){let o,r=!1;function s(l){if(!n)return;function u(c){for(const d of c)if(d.type==="childList"){l.reInit(),t.emit("slidesChanged");break}}o=new MutationObserver(c=>{r||(Nu(n)||n(l,c))&&u(c)}),o.observe(e,{childList:!0})}function i(){o&&o.disconnect(),r=!0}return{init:s,destroy:i}}function $F(e,t,n,o){const r={};let s=null,i=null,a,l=!1;function u(){a=new IntersectionObserver(m=>{l||(m.forEach(g=>{const v=t.indexOf(g.target);r[v]=g}),s=null,i=null,n.emit("slidesInView"))},{root:e.parentElement,threshold:o}),t.forEach(m=>a.observe(m))}function c(){a&&a.disconnect(),l=!0}function d(m){return aa(r).reduce((g,v)=>{const y=parseInt(v),{isIntersecting:b}=r[y];return(m&&b||!m&&!b)&&g.push(y),g},[])}function p(m=!0){if(m&&s)return s;if(!m&&i)return i;const g=d(m);return m&&(s=g),m||(i=g),g}return{init:u,destroy:c,get:p}}function FF(e,t,n,o,r,s){const{measureSize:i,startEdge:a,endEdge:l}=e,u=n[0]&&r,c=m(),d=g(),p=n.map(i),h=v();function m(){if(!u)return 0;const b=n[0];return _t(t[a]-b[a])}function g(){if(!u)return 0;const b=s.getComputedStyle(jn(o));return parseFloat(b.getPropertyValue(`margin-${l}`))}function v(){return n.map((b,_,O)=>{const T=!_,A=mp(O,_);return T?p[_]+c:A?p[_]+d:O[_+1][a]-b[a]}).map(_t)}return{slideSizes:p,slideSizesWithGaps:h,startGap:c,endGap:d}}function LF(e,t,n,o,r,s,i,a,l){const{startEdge:u,endEdge:c,direction:d}=e,p=pp(n);function h(y,b){return ia(y).filter(_=>_%b===0).map(_=>y.slice(_,_+b))}function m(y){return y.length?ia(y).reduce((b,_,O)=>{const T=jn(b)||0,A=T===0,D=_===Ia(y),P=r[u]-s[T][u],w=r[u]-s[_][c],k=!o&&A?d(i):0,$=!o&&D?d(a):0,R=_t(w-$-(P+k));return O&&R>t+l&&b.push(_),D&&b.push(y.length),b},[]).map((b,_,O)=>{const T=Math.max(O[_-1]||0);return y.slice(T,b)}):[]}function g(y){return p?h(y,n):m(y)}return{groupSlides:g}}function NF(e,t,n,o,r,s,i){const{align:a,axis:l,direction:u,startIndex:c,loop:d,duration:p,dragFree:h,dragThreshold:m,inViewThreshold:g,slidesToScroll:v,skipSnaps:y,containScroll:b,watchResize:_,watchSlides:O,watchDrag:T,watchFocus:A}=s,D=2,P=wF(),w=P.measure(t),k=n.map(P.measure),$=yF(l,u),R=$.measureSize(w),G=SF(R),J=gF(a,R),ne=!d&&!!b,ae=d||!!b,{slideSizes:re,slideSizesWithGaps:L,startGap:oe,endGap:Y}=FF($,w,k,n,ae,r),ee=LF($,R,v,d,w,k,oe,Y,D),{snaps:le,snapsAligned:ye}=kF($,J,w,k,ee),me=-jn(le)+jn(L),{snapsContained:Pe,scrollContainLimit:Se}=AF(R,me,ye,b,D),x=ne?Pe:ye,{limit:z}=OF(me,x,d),H=ow(Ia(x),c,d),X=H.clone(),pe=ia(n),S=({dragHandler:mt,scrollBody:$t,scrollBounds:Ft,options:{loop:yn}})=>{yn||Ft.constrain(mt.pointerDown()),$t.seek()},I=({scrollBody:mt,translate:$t,location:Ft,offsetLocation:yn,previousLocation:Cr,scrollLooper:Bt,slideLooper:Lt,dragHandler:Qn,animation:Yn,eventHandler:vp,scrollBounds:iw,options:{loop:yp}},bp)=>{const _p=mt.settled(),aw=!iw.shouldConstrain(),wp=yp?_p:_p&&aw,Sp=wp&&!Qn.pointerDown();Sp&&Yn.stop();const lw=Ft.get()*bp+Cr.get()*(1-bp);yn.set(lw),yp&&(Bt.loop(mt.direction()),Lt.loop()),$t.to(yn.get()),Sp&&vp.emit("settle"),wp||vp.emit("scroll")},j=vF(o,r,()=>S(At),mt=>I(At,mt)),K=.68,Z=x[H.get()],Q=wi(Z),ue=wi(Z),fe=wi(Z),de=wi(Z),se=xF(Q,fe,ue,de,p,K),xe=DF(d,x,me,z,de),ge=RF(j,H,X,se,xe,de,i),Ee=PF(z),ke=la(),He=$F(t,n,i,g),{slideRegistry:tt}=IF(ne,b,x,Se,ee,pe),Ye=BF(e,n,tt,ge,se,ke,i,A),At={ownerDocument:o,ownerWindow:r,eventHandler:i,containerRect:w,slideRects:k,animation:j,axis:$,dragHandler:bF($,e,o,r,de,_F($,r),Q,j,ge,se,xe,H,i,G,h,m,y,K,T),eventStore:ke,percentOfView:G,index:H,indexPrevious:X,limit:z,location:Q,offsetLocation:fe,previousLocation:ue,options:s,resizeHandler:CF(t,i,r,n,$,_,P),scrollBody:se,scrollBounds:EF(z,fe,de,se,G),scrollLooper:TF(me,z,fe,[Q,fe,ue,de]),scrollProgress:Ee,scrollSnapList:x.map(Ee.get),scrollSnaps:x,scrollTarget:xe,scrollTo:ge,slideLooper:MF($,R,me,re,L,le,x,fe,n),slideFocus:Ye,slidesHandler:qF(t,i,O),slidesInView:He,slideIndexes:pe,slideRegistry:tt,slidesToScroll:ee,target:de,translate:rw($,t)};return At}function jF(){let e={},t;function n(u){t=u}function o(u){return e[u]||[]}function r(u){return o(u).forEach(c=>c(t,u)),l}function s(u,c){return e[u]=o(u).concat([c]),l}function i(u,c){return e[u]=o(u).filter(d=>d!==c),l}function a(){e={}}const l={init:n,emit:r,off:i,on:s,clear:a};return l}const VF={align:"center",axis:"x",container:null,slides:null,containScroll:"trimSnaps",direction:"ltr",slidesToScroll:1,inViewThreshold:0,breakpoints:{},dragFree:!1,dragThreshold:10,loop:!1,skipSnaps:!1,duration:25,startIndex:0,active:!0,watchDrag:!0,watchResize:!0,watchSlides:!0,watchFocus:!0};function UF(e){function t(s,i){return nw(s,i||{})}function n(s){const i=s.breakpoints||{},a=aa(i).filter(l=>e.matchMedia(l).matches).map(l=>i[l]).reduce((l,u)=>t(l,u),{});return t(s,a)}function o(s){return s.map(i=>aa(i.breakpoints||{})).reduce((i,a)=>i.concat(a),[]).map(e.matchMedia)}return{mergeOptions:t,optionsAtMedia:n,optionsMediaQueries:o}}function HF(e){let t=[];function n(s,i){return t=i.filter(({options:a})=>e.optionsAtMedia(a).active!==!1),t.forEach(a=>a.init(s,e)),i.reduce((a,l)=>Object.assign(a,{[l.name]:l}),{})}function o(){t=t.filter(s=>s.destroy())}return{init:n,destroy:o}}function Ul(e,t,n){const o=e.ownerDocument,r=o.defaultView,s=UF(r),i=HF(s),a=la(),l=jF(),{mergeOptions:u,optionsAtMedia:c,optionsMediaQueries:d}=s,{on:p,off:h,emit:m}=l,g=$;let v=!1,y,b=u(VF,Ul.globalOptions),_=u(b),O=[],T,A,D;function P(){const{container:pe,slides:S}=_;A=(ef(pe)?e.querySelector(pe):pe)||e.children[0];const j=ef(S)?A.querySelectorAll(S):S;D=[].slice.call(j||A.children)}function w(pe){const S=NF(e,A,D,o,r,pe,l);if(pe.loop&&!S.slideLooper.canLoop()){const I=Object.assign({},pe,{loop:!1});return w(I)}return S}function k(pe,S){v||(b=u(b,pe),_=c(b),O=S||O,P(),y=w(_),d([b,...O.map(({options:I})=>I)]).forEach(I=>a.add(I,"change",$)),_.active&&(y.translate.to(y.location.get()),y.animation.init(),y.slidesInView.init(),y.slideFocus.init(X),y.eventHandler.init(X),y.resizeHandler.init(X),y.slidesHandler.init(X),y.options.loop&&y.slideLooper.loop(),A.offsetParent&&D.length&&y.dragHandler.init(X),T=i.init(X,O)))}function $(pe,S){const I=ee();R(),k(u({startIndex:I},pe),S),l.emit("reInit")}function R(){y.dragHandler.destroy(),y.eventStore.clear(),y.translate.clear(),y.slideLooper.clear(),y.resizeHandler.destroy(),y.slidesHandler.destroy(),y.slidesInView.destroy(),y.animation.destroy(),i.destroy(),a.clear()}function G(){v||(v=!0,a.clear(),R(),l.emit("destroy"),l.clear())}function J(pe,S,I){!_.active||v||(y.scrollBody.useBaseFriction().useDuration(S===!0?0:_.duration),y.scrollTo.index(pe,I||0))}function ne(pe){const S=y.index.add(1).get();J(S,pe,-1)}function ae(pe){const S=y.index.add(-1).get();J(S,pe,1)}function re(){return y.index.add(1).get()!==ee()}function L(){return y.index.add(-1).get()!==ee()}function oe(){return y.scrollSnapList}function Y(){return y.scrollProgress.get(y.offsetLocation.get())}function ee(){return y.index.get()}function le(){return y.indexPrevious.get()}function ye(){return y.slidesInView.get()}function me(){return y.slidesInView.get(!1)}function Pe(){return T}function Se(){return y}function x(){return e}function z(){return A}function H(){return D}const X={canScrollNext:re,canScrollPrev:L,containerNode:z,internalEngine:Se,destroy:G,off:h,on:p,emit:m,plugins:Pe,previousScrollSnap:le,reInit:g,rootNode:x,scrollNext:ne,scrollPrev:ae,scrollProgress:Y,scrollSnapList:oe,scrollTo:J,selectedScrollSnap:ee,slideNodes:H,slidesInView:ye,slidesNotInView:me};return k(t,n),setTimeout(()=>l.emit("init"),0),X}Ul.globalOptions=void 0;function gp(e={},t=[]){const n=$e(e),o=$e(t);let r=n?e.value:e,s=o?t.value:t;const i=Cn(),a=Cn();function l(){a.value&&a.value.reInit(r,s)}return je(()=>{!fF()||!i.value||(Ul.globalOptions=gp.globalOptions,a.value=Ul(i.value,r,s))}),Ys(()=>{a.value&&a.value.destroy()}),n&&Ce(e,u=>{fp(r,u)||(r=u,l())}),o&&Ce(t,u=>{pF(s,u)||(s=u,l())}),[i,a]}gp.globalOptions=void 0;const[zF,KF]=bC(({opts:e,orientation:t,plugins:n},o)=>{const[r,s]=gp({...e,axis:t==="horizontal"?"x":"y"},n);function i(){var d;(d=s.value)==null||d.scrollPrev()}function a(){var d;(d=s.value)==null||d.scrollNext()}const l=N(!1),u=N(!1);function c(d){l.value=(d==null?void 0:d.canScrollNext())||!1,u.value=(d==null?void 0:d.canScrollPrev())||!1}return je(()=>{var d,p,h;s.value&&((d=s.value)==null||d.on("init",c),(p=s.value)==null||p.on("reInit",c),(h=s.value)==null||h.on("select",c),o("init-api",s.value))}),{carouselRef:r,carouselApi:s,canScrollPrev:u,canScrollNext:l,scrollPrev:i,scrollNext:a,orientation:t}});function ju(){const e=KF();if(!e)throw new Error("useCarousel must be used within a <Carousel />");return e}const WF=F({__name:"Carousel",props:{opts:{},plugins:{},orientation:{default:"horizontal"},class:{}},emits:["init-api"],setup(e,{expose:t,emit:n}){const o=e,r=n,{canScrollNext:s,canScrollPrev:i,carouselApi:a,carouselRef:l,orientation:u,scrollNext:c,scrollPrev:d}=zF(o,r);t({canScrollNext:s,canScrollPrev:i,carouselApi:a,carouselRef:l,orientation:u,scrollNext:c,scrollPrev:d});function p(h){const m=o.orientation==="vertical"?"ArrowUp":"ArrowLeft",g=o.orientation==="vertical"?"ArrowDown":"ArrowRight";if(h.key===m){h.preventDefault(),d();return}h.key===g&&(h.preventDefault(),c())}return(h,m)=>(C(),ie("div",{"data-slot":"carousel",class:qe(f(Fe)("relative",o.class)),role:"region","aria-roledescription":"carousel",tabindex:"0",onKeydown:p},[V(h.$slots,"default",{canScrollNext:f(s),canScrollPrev:f(i),carouselApi:f(a),carouselRef:f(l),orientation:f(u),scrollNext:f(c),scrollPrev:f(d)})],34))}}),GF=F({__name:"CarouselNext",props:{variant:{default:"outline"},size:{default:"icon"},class:{}},setup(e){const t=e,{orientation:n,canScrollNext:o,scrollNext:r}=ju();return(s,i)=>(C(),B(f(vn),{"data-slot":"carousel-next",disabled:!f(o),class:qe(f(Fe)("absolute size-8 rounded-full",f(n)==="horizontal"?"top-1/2 -right-12 -translate-y-1/2":"-bottom-12 left-1/2 -translate-x-1/2 rotate-90",t.class)),variant:s.variant,size:s.size,onClick:f(r)},{default:E(()=>[V(s.$slots,"default",{},()=>[q(f(Ok)),i[0]||(i[0]=ce("span",{class:"sr-only"},"Next Slide",-1))])]),_:3},8,["disabled","class","variant","size","onClick"]))}}),QF=F({__name:"CarouselPrevious",props:{variant:{default:"outline"},size:{default:"icon"},class:{}},setup(e){const t=e,{orientation:n,canScrollPrev:o,scrollPrev:r}=ju();return(s,i)=>(C(),B(f(vn),{"data-slot":"carousel-previous",disabled:!f(o),class:qe(f(Fe)("absolute size-8 rounded-full",f(n)==="horizontal"?"top-1/2 -left-12 -translate-y-1/2":"-top-12 left-1/2 -translate-x-1/2 rotate-90",t.class)),variant:s.variant,size:s.size,onClick:f(r)},{default:E(()=>[V(s.$slots,"default",{},()=>[q(f(Ak)),i[0]||(i[0]=ce("span",{class:"sr-only"},"Previous Slide",-1))])]),_:3},8,["disabled","class","variant","size","onClick"]))}}),YF=F({inheritAttrs:!1,__name:"CarouselContent",props:{class:{}},setup(e){const t=e,{carouselRef:n,orientation:o}=ju();return(r,s)=>(C(),ie("div",{ref_key:"carouselRef",ref:n,"data-slot":"carousel-content",class:"overflow-hidden h-full"},[ce("div",te({class:f(Fe)("flex",f(o)==="horizontal"?"-ml-4 h-full":"-mt-4 flex-col",t.class)},r.$attrs),[V(r.$slots,"default")],16)],512))}}),XF=F({__name:"CarouselItem",props:{class:{}},setup(e){const t=e,{orientation:n}=ju();return(o,r)=>(C(),ie("div",{"data-slot":"carousel-item",role:"group","aria-roledescription":"slide",class:qe(f(Fe)("min-w-0 shrink-0 grow-0 basis-full",f(n)==="horizontal"?"pl-4":"pt-4",t.class))},[V(o.$slots,"default")],2))}}),JF=F({__name:"AspectRatio",props:{ratio:{},asChild:{type:Boolean},as:{}},setup(e){const t=e;return(n,o)=>(C(),B(f(M1),te({"data-slot":"aspect-ratio"},t),{default:E(()=>[V(n.$slots,"default")]),_:3},16))}}),ZF={class:"relative flex flex-col gap-4 cursor-pointer group"},eL=F({__name:"AppCard",props:Un({name:{},description:{},logo:{},videoUrl:{},previewScreens:{},platform:{},isFavorite:{type:Boolean}},{isFavorite:{type:Boolean,default:!1},isFavoriteModifiers:{}}),emits:Un(["click","toggle-favorite"],["update:isFavorite"]),setup(e,{emit:t}){const n=ts(e,"isFavorite"),o=t,r=U(()=>e.platform==="web"),s={video:"video",image:ri},i=U(()=>r.value?16/10:393/892),a=U(()=>e.videoUrl?[{type:"video",id:"video",props:{src:e.videoUrl,muted:!0,autoplay:!0,loop:!0,playsinline:!0,class:"object-contain"}}]:(e.previewScreens||[]).map(c=>({type:"image",id:c.id,props:{src:c.screenUrl,fit:"contain",class:"object-contain"}}))),l=()=>{o("click")},u=()=>{n.value=!n.value,o("toggle-favorite")};return(c,d)=>{const p=XF,h=YF,m=QF,g=GF,v=WF,y=Yf;return C(),ie("div",ZF,[ce("div",{class:qe(["w-full overflow-hidden bg-[#f0f0f0] rounded-4xl flex items-center justify-center hover:bg-[#f4f4f4] transition-colors duration-300",f(r)?"aspect-[1/1]":"aspect-[7/10]"])},[q(v,{class:qe(["relative w-full h-full max-w-xs",f(r)?"h-[51%]":"h-[85%]"])},{default:E(()=>[q(h,{class:"rounded-2xl",onClick:l},{default:E(()=>[(C(!0),ie(Ie,null,wt(f(a),(b,_)=>(C(),B(p,{key:b.id||_,class:"flex items-center justify-center w-full h-full"},{default:E(()=>[q(f(JF),{ratio:f(i)},{default:E(()=>[(C(),B(ro(s[b.type]),te({ref_for:!0},b.props,{class:["w-full h-full object-contain",f(r)?"rounded-xs":"rounded-2xl"]}),null,16,["class"]))]),_:2},1032,["ratio"])]),_:2},1024))),128))]),_:1}),q(m),q(g)]),_:1},8,["class"])],2),ce("div",{class:"absolute top-2 right-2 z-10 p-2 rounded-full bg-white/50 backdrop-blur-sm opacity-0 group-hover:opacity-100 transition-opacity",onClick:Ze(u,["stop"])},[q(f(Ik),{class:qe(["w-5 h-5 text-yellow-400",n.value?"fill-yellow-400":"fill-none"])},null,8,["class"])]),q(y,{logo:c.logo,name:c.name,description:c.description},null,8,["logo","name","description"])])}}}),tL=Lu(eL,[["__scopeId","data-v-49595ce3"]]),nL={class:"relative w-full overflow-hidden flex items-center"},oL={class:"flex w-max space-x-2"},rL=F({__name:"Filter",props:{platformType:{},type:{}},emits:["change"],setup(e,{expose:t,emit:n}){const o=N(null),r=N(null),{arrivedState:s}=FC(r,{throttle:50}),{left:i,right:a}=dt(s);je(()=>{var v;if(o.value){const y=(v=o.value.$el)==null?void 0:v.querySelector("[data-reka-scroll-area-viewport]");y?r.value=y:console.error("无法找到 ScrollArea 的 viewport 元素。")}});const l=v=>{if(r.value){const y=r.value.offsetWidth*.8;r.value.scrollBy({left:v==="left"?-y:y,behavior:"smooth"})}},u=n,{definitions:c}=va($u()),d=N(),p=U(()=>{var O,T;const y=(O=(e.platformType==="web"?ql:Ks).find(A=>A.label===e.type))==null?void 0:O.value,b=c==null?void 0:c.value.find(A=>A.platformType===e.platformType&&A.slug===y);return(((T=b==null?void 0:b.children)==null?void 0:T.map(A=>A.children).flat())||[]).map(A=>A?{id:typeof A.id=="number"?String(A.id):A.id||"",label:A.label||"",definition:A.definition||"",exampleScreens:Array.isArray(A.exampleScreens)?A.exampleScreens:[]}:null).filter(Boolean)}),h=v=>{d.value=d.value===v?void 0:v},m=v=>{const y=p.value.find(b=>b.id===v);u("change",y)},g=()=>{d.value=void 0};return Ce(d,v=>{m(v)},{immediate:!0}),t({reset:g}),(v,y)=>{const b=Ho;return C(),ie("div",nL,[Fs(q(f(vn),{variant:"outline",class:"absolute left-0 top-1/2 -translate-y-1/2 w-10 rounded-full z-10 bg-background transition-opacity cursor-pointer",onClick:y[0]||(y[0]=_=>l("left"))},{default:E(()=>[q(b,{icon:"lucide:chevron-left",class:"h-4 w-4"})]),_:1},512),[[Yi,!f(i)]]),q(f(lp),{ref_key:"scrollAreaRef",ref:o,class:"flex-1 overflow-auto whitespace-nowrap rounded-md"},{default:E(()=>[ce("div",oL,[(C(!0),ie(Ie,null,wt(p.value,_=>(C(),B(f(vn),{class:"rounded-full cursor-pointer",key:_.id,variant:d.value===_.id?"default":"outline",onClick:O=>h(_.id)},{default:E(()=>[rt(Ne(_.label),1)]),_:2},1032,["variant","onClick"]))),128))])]),_:1},512),Fs(q(f(vn),{variant:"outline",class:"absolute right-0 top-1/2 -translate-y-1/2 w-10 rounded-full z-10 p-0 bg-background transition-opacity cursor-pointer",onClick:y[1]||(y[1]=_=>l("right"))},{default:E(()=>[q(b,{icon:"lucide:chevron-right",class:"h-4 w-4"})]),_:1},512),[[Yi,!f(a)]])])}}}),sL=(e,t=null,n=0)=>{const o=()=>{const r=t==null?void 0:t.value;r?r.scrollHeight-r.scrollTop-r.clientHeight<=n&&e():document.documentElement.scrollHeight-document.documentElement.scrollTop-window.innerHeight<=n&&e()};je(()=>{const r=t==null?void 0:t.value;r?r.addEventListener("scroll",o):window.addEventListener("scroll",o)}),Rt(()=>{const r=t==null?void 0:t.value;r?r.removeEventListener("scroll",o):window.removeEventListener("scroll",o)})},iL={class:"flex flex-col gap-5 py-8"},aL={class:"flex-1 min-w-0 flex flex-col gap-y-5"},lL={class:"flex items-center"},uL={key:0,class:"flex items-center gap-x-2 ml-auto"},cL={key:2,class:"flex flex-col gap-5"},dL={class:"flex gap-4 px-1 py-4"},fL={class:"flex justify-between group hover:cursor-pointer"},pL={class:"flex flex-col gap-2"},hL={class:"flex items-center gap-2 text-xl h-7 font-bold"},mL={class:"flex gap-2 opacity-0 group-hover:opacity-100 transition-all duration-100"},gL=F({__name:"HomeView",setup(e){var oe;const t=Ta(),n=ya(),o=Ii({mutationFn:Y=>A.value.find(le=>le.id===Y)?lq({appId:Y,type:1}):Promise.reject("App not found"),onSuccess:()=>{n.invalidateQueries({queryKey:["app",p,m]})}}),r=Y=>{console.log("Toggling favorite for app:",Y),o.mutate(Y)},s=kt(ep),i=U(()=>(s==null?void 0:s.value)==="web"),a=U(()=>i.value?"web":"mobile"),l=U(()=>a.value),u=$u(),{definitions:c}=va(u),d=U(()=>s?s.value==="web"?ql:Ks:[]),p=N(((oe=d.value[0])==null?void 0:oe.label)||""),h=N(null),m=N(),g=N(),v=N(),y=N(),b=N([]),_=(Y,ee)=>{if(typeof Y=="number")if(ee)b.value.push(Y);else{const le=b.value.indexOf(Y);le>-1&&b.value.splice(le,1)}},O=Y=>{if(!c.value||c.value.length===0)return[];const ee=c.value.find(le=>le.slug===Y&&le.platformType===l.value);return(ee==null?void 0:ee.children)||[]},T=U(()=>p.value||"Apps");Ce(()=>s==null?void 0:s.value,(Y,ee)=>{var ye;if(Y===ee)return;const le=p.value;if(le==="Marketing Pages"&&Y!=="web")p.value="Apps";else{const me=Y==="web"?ql:Ks;me.find(Se=>Se.label===le)||(p.value=((ye=me[0])==null?void 0:ye.label)||"")}ae(),g.value=void 0,v.value=void 0,y.value=void 0,G()},{immediate:!1});const A=U(()=>{var Y;return((Y=w.value)==null?void 0:Y.pages.flatMap(ee=>ee.list))??[]}),D=U(()=>{var Y;return((Y=w.value)==null?void 0:Y.pages.flatMap(ee=>ee.list))??[]}),P=Y=>{var ye;const ee=d.value.find(me=>me.label===p.value),le={platform:s==null?void 0:s.value,type:1,categoryType:ee==null?void 0:ee.categoryType,pageNo:Y,pageSize:20};return(ye=m.value)!=null&&ye.id&&(le.categoryId=m.value.id),le},{data:w,fetchNextPage:k,hasNextPage:$,isFetching:R,refetch:G}=mC({queryKey:["home",p,m],queryFn:async({pageParam:Y=1})=>{const ee=P(Y);return p.value==="Apps"?CB(ee):Y$(ee)},getNextPageParam:(Y,ee)=>{if(!Y)return;const le=Math.ceil(Y.total/20);if(ee.length<le)return ee.length+1},initialPageParam:1}),J=Y=>{m.value=Y},ne=()=>{ae(),g.value=void 0,v.value=void 0,y.value=void 0},ae=()=>{h.value&&h.value.reset(),m.value=void 0};sL(()=>{$.value&&!R.value&&k()});const L=Y=>{t.push({path:"/details",query:{id:Y.id,platform:Y.platform}})};return(Y,ee)=>{const le=rL,ye=tL,me=tw,Pe=ri;return C(),ie("div",iL,[ee[8]||(ee[8]=ce("h1",{class:"text-[44px] font-[600]"},"Discover",-1)),ce("div",aL,[ce("div",lL,[q(f(rp),{modelValue:f(p),"onUpdate:modelValue":[ee[0]||(ee[0]=Se=>$e(p)?p.value=Se:null),ne]},{default:E(()=>[q(f(sp),{class:"bg-transparent p-0"},{default:E(()=>[(C(!0),ie(Ie,null,wt(f(d),Se=>(C(),B(f(ip),{key:Se.label,value:Se.label,class:"!font-bold"},{default:E(()=>[rt(Ne(Se.label),1)]),_:2},1032,["value"]))),128))]),_:1})]),_:1},8,["modelValue"]),f(p)!=="Apps"?(C(),ie("div",uL,[q(f(gl),{data:O("appCategories"),"default-label":"Apps",onChange:ee[1]||(ee[1]=Se=>g.value=Se),"selection-mode":"single",placement:"end"},null,8,["data"]),f(p)!=="UI Elements"&&f(p)!=="Flows"?(C(),B(f(gl),{key:0,data:O("screenElements"),"default-label":"UI Elements",onChange:ee[2]||(ee[2]=Se=>v.value=Se),"selection-mode":"single",placement:"end"},null,8,["data"])):Be("",!0),f(p)!=="Screens"&&f(p)!=="Flows"?(C(),B(f(gl),{key:1,data:O("screenPatterns"),"default-label":"Screens",onChange:ee[3]||(ee[3]=Se=>y.value=Se),"selection-mode":"single",placement:"end"},null,8,["data"])):Be("",!0)])):Be("",!0)]),q(le,{"platform-type":f(a),type:f(T),onChange:J,ref_key:"filterRef",ref:h,class:"w-full"},null,8,["platform-type","type"]),f(p)==="Apps"?(C(),ie("div",{key:0,class:qe(["grid gap-x-4 gap-y-12",f(i)?"grid-cols-[repeat(auto-fill,minmax(min(100%,450px),1fr))]":"grid-cols-[repeat(auto-fill,minmax(min(100%,350px),1fr))]"])},[(C(!0),ie(Ie,null,wt(f(A),Se=>(C(),B(ye,{key:Se.id,id:Se.id,name:Se.name,description:Se.appTagline,logo:Se.appLogoUrl,"video-url":Se.previewVideoUrl??"","preview-screens":Se.previewScreens,onClick:x=>L(Se),platform:f(s),onToggleFavorite:()=>r(Se.id)},null,8,["id","name","description","logo","video-url","preview-screens","onClick","platform","onToggleFavorite"]))),128))],2)):["Screens","UI Elements"].includes(f(p))?(C(),ie("div",{key:1,class:qe(["grid gap-x-5 gap-y-12",f(i)?"grid-cols-[repeat(auto-fill,minmax(min(100%,500px),1fr))]":"grid-cols-[repeat(auto-fill,minmax(min(100%,230px),1fr))] auto-rows-max"])},[(C(!0),ie(Ie,null,wt(f(D),(Se,x)=>(C(),B(me,{key:x,id:Se.screenRespVO.id,src:Se.screenRespVO.screenUrl,name:Se.appRespVO.name,logo:Se.appRespVO.appLogoUrl,selected:f(b).includes(Se.screenRespVO.id),onSelect:_,platform:f(s)},null,8,["id","src","name","logo","selected","platform"]))),128))],2)):f(p)==="Flows"?(C(),ie("div",cL,[q(f(lp),{class:"w-full"},{default:E(()=>[ce("div",dL,[(C(!0),ie(Ie,null,wt(f(D),(Se,x)=>(C(),B(Pe,{key:x,src:Se.screenRespVO.screenUrl,class:qe(["shrink-0 object-cover",[f(i)?"aspect-[16/11] w-[595px] rounded-lg":"aspect-[393/892] w-[215px] rounded-3xl","transition-transform hover:scale-[1.02]"]])},null,8,["src","class"]))),128))])]),_:1}),ce("div",fL,[ce("div",pL,[ce("div",hL,[ee[4]||(ee[4]=ce("span",{class:"group-hover:underline underline-offset-8 transition-all duration-300"},"Onboarding",-1)),ee[5]||(ee[5]=ce("span",{class:"text-gray-500"},"in",-1)),q(Pe,{class:"h-full"}),ee[6]||(ee[6]=ce("span",{class:"group-hover:underline underline-offset-8 transition-all duration-300"},"MoonPay",-1))]),ee[7]||(ee[7]=ce("span",{class:"text-sm text-gray-500"}," 100+ screens ",-1))]),ce("div",mL,[q(f(vn),{text:"Save",class:"bg-black text-white hover:opacity-80"}),q(f(vn),{text:"Copy",class:"bg-[#E3E3E3] hover:opacity-80 text-black"})])])])):Be("",!0)])])}}}),sw=OM({history:nM("/"),routes:[{path:"/",name:"home",component:gL},{path:"/details",name:"details",component:cF},{path:"/apps",name:"apps",component:()=>mi(()=>import("./Apps-BRMcQyeI.js"),__vite__mapDeps([0,1,2,3,4,5,6]))},{path:"/auth",name:"auth",component:()=>mi(()=>import("./Auth-BJGZikMq.js"),__vite__mapDeps([7,3,4,1,8]))},{path:"/settings",name:"settings",component:()=>mi(()=>import("./Settings-CkK03M1s.js"),__vite__mapDeps([9,4]))},{path:"/favorites",name:"favorites",component:()=>mi(()=>import("./Favorites-C1kb4hNA.js"),__vite__mapDeps([10,5,1]))},{path:"/chat",name:"chat",component:()=>mi(()=>import("./Chat-CbyEIPNl.js"),__vite__mapDeps([11,2,12]))}]});sw.beforeEach((e,t,n)=>{const o=localStorage.getItem("accessToken"),{fetchUserInfo:r,userInfo:s}=D_(),i=["auth"];return o?(!s.id&&e.name!=="auth"&&r(),e.name==="auth"?n({name:"home"}):n()):i.includes(e.name)?n():n({name:"auth"})});const Vu=DS(YM);Vu.use(pC);Vu.use(MS());Vu.use(sw);Vu.mount("#app");export{Ii as $,By as A,mo as B,Uo as C,kf as D,Un as E,ts as F,ie as G,Fs as H,Ho as I,Pt as J,Ne as K,AS as L,et as M,ft as N,Fe as O,Ae as P,Kt as Q,Ry as R,qe as S,EL as T,$e as U,My as V,ce as W,rt as X,GL as Y,ya as Z,vn as _,In as a,df as a$,wk as a0,Bk as a1,$k as a2,qk as a3,ri as a4,wt as a5,Ie as a6,X$ as a7,ct as a8,yt as a9,un as aA,zg as aB,ut as aC,We as aD,Et as aE,Ys as aF,Nn as aG,bd as aH,zt as aI,Dk as aJ,xb as aK,lb as aL,yP as aM,bP as aN,ql as aO,Ks as aP,mC as aQ,sL as aR,rp as aS,sp as aT,ip as aU,u$ as aV,ep as aW,eN as aX,tN as aY,DM as aZ,tu as a_,rF as aa,sF as ab,J$ as ac,Z$ as ad,tF as ae,YL as af,QL as ag,hC as ah,xL as ai,ap as aj,jM as ak,Yf as al,Ta as am,EB as an,XL as ao,Lu as ap,bL as aq,JL as ar,ZL as as,Bi as at,Ht as au,je as av,Ge as aw,Qs as ax,kt as ay,ro as az,dt as b,U as c,F as d,ve as e,Pf as f,B as g,uu as h,C as i,E as j,Be as k,Ze as l,te as m,ns as n,Gs as o,lt as p,q,V as r,Cn as s,yL as t,f as u,Yr as v,Ce as w,N as x,js as y,qo as z};
DesignScreenshot/src/main/resources/test_actions.py:28:    headers = {"Content-Type": "application/json", "Authorization": f"Bearer {api_key}"}
DesignScreenshot/src/main/resources/ai_studio_code.py:27:    headers = {"Content-Type": "application/json", "Authorization": f"Bearer {api_key}"}
DesignScreenshot/src/main/resources/ai_studio_code.py:39:    headers = {"Content-Type": "application/json", "Authorization": f"Bearer {api_key}"}
DesignScreenshot/src/main/resources/actions.py:29:        "Authorization": f"Bearer {api_key}"
DesignScreenshot/src/main/java/com/fxsb/designscreenshot/service/penpot/PenpotServiceImpl.java:49:                .header("Authorization", "Token " + user.getPenpotToken())
DesignScreenshot/src/main/java/com/fxsb/designscreenshot/service/penpot/PenpotServiceImpl.java:72:                .header("Authorization", "Token " +user.getPenpotToken())
DesignScreenshot/src/main/java/com/fxsb/designscreenshot/service/penpot/PenpotServiceImpl.java:93:                .header("Authorization", "Token " + user.getPenpotToken())
DesignScreenshot/src/main/java/com/fxsb/designscreenshot/service/penpot/PenpotServiceImpl.java:122:                .header("Authorization", "Token " + user.getPenpotToken())
DesignScreenshot/src/main/java/com/fxsb/designscreenshot/service/penpot/PenpotServiceImpl.java:151:                .header("Authorization", "Token " + user.getPenpotToken())
DesignScreenshot/src/main/java/com/fxsb/designscreenshot/service/oauth2/OAuth2TokenService.java:50:     * @param refreshToken 刷新令牌
DesignScreenshot/src/main/java/com/fxsb/designscreenshot/service/oauth2/OAuth2TokenService.java:54:    OAuth2AccessTokenDO refreshAccessToken(String refreshToken, String clientId);
DesignScreenshot/src/main/java/com/fxsb/designscreenshot/service/oauth2/OAuth2TokenService.java:61:     * @param accessToken 访问令牌
DesignScreenshot/src/main/java/com/fxsb/designscreenshot/service/oauth2/OAuth2TokenService.java:64:    OAuth2AccessTokenDO getAccessToken(String accessToken);
DesignScreenshot/src/main/java/com/fxsb/designscreenshot/service/oauth2/OAuth2TokenService.java:69:     * @param accessToken 访问令牌
DesignScreenshot/src/main/java/com/fxsb/designscreenshot/service/oauth2/OAuth2TokenService.java:72:    OAuth2AccessTokenDO checkAccessToken(String accessToken);
DesignScreenshot/src/main/java/com/fxsb/designscreenshot/service/oauth2/OAuth2TokenService.java:80:     * @param accessToken 刷新令牌
DesignScreenshot/src/main/java/com/fxsb/designscreenshot/service/oauth2/OAuth2TokenService.java:83:    OAuth2AccessTokenDO removeAccessToken(String accessToken);
DesignScreenshot/src/main/java/com/fxsb/designscreenshot/service/oauth2/OAuth2GrantService.java:38:     * 对应 Spring Security OAuth2 的 AuthorizationEndpoint 的 generateCode 方法
DesignScreenshot/src/main/java/com/fxsb/designscreenshot/service/oauth2/OAuth2GrantService.java:48:    String grantAuthorizationCodeForCode(Long userId, Integer userType,
DesignScreenshot/src/main/java/com/fxsb/designscreenshot/service/oauth2/OAuth2GrantService.java:53:     * 授权码模式，第二阶段，获得 accessToken 访问令牌
DesignScreenshot/src/main/java/com/fxsb/designscreenshot/service/oauth2/OAuth2GrantService.java:55:     * 对应 Spring Security OAuth2 的 AuthorizationCodeTokenGranter 功能
DesignScreenshot/src/main/java/com/fxsb/designscreenshot/service/oauth2/OAuth2GrantService.java:63:    OAuth2AccessTokenDO grantAuthorizationCodeForAccessToken(String clientId, String code,
DesignScreenshot/src/main/java/com/fxsb/designscreenshot/service/oauth2/OAuth2GrantService.java:85:     * @param refreshToken 刷新令牌
DesignScreenshot/src/main/java/com/fxsb/designscreenshot/service/oauth2/OAuth2GrantService.java:89:    OAuth2AccessTokenDO grantRefreshToken(String refreshToken, String clientId);
DesignScreenshot/src/main/java/com/fxsb/designscreenshot/service/oauth2/OAuth2GrantService.java:107:     * @param accessToken 访问令牌
DesignScreenshot/src/main/java/com/fxsb/designscreenshot/service/oauth2/OAuth2GrantService.java:111:    boolean revokeToken(String clientId, String accessToken);
DesignScreenshot/src/main/java/com/fxsb/designscreenshot/service/oauth2/OAuth2GrantServiceImpl.java:41:    public String grantAuthorizationCodeForCode(Long userId, Integer userType,
DesignScreenshot/src/main/java/com/fxsb/designscreenshot/service/oauth2/OAuth2GrantServiceImpl.java:44:        return oauth2CodeService.createAuthorizationCode(userId, userType, clientId, scopes,
DesignScreenshot/src/main/java/com/fxsb/designscreenshot/service/oauth2/OAuth2GrantServiceImpl.java:49:    public OAuth2AccessTokenDO grantAuthorizationCodeForAccessToken(String clientId, String code,
DesignScreenshot/src/main/java/com/fxsb/designscreenshot/service/oauth2/OAuth2GrantServiceImpl.java:51:        OAuth2CodeDO codeDO = oauth2CodeService.consumeAuthorizationCode(code);
DesignScreenshot/src/main/java/com/fxsb/designscreenshot/service/oauth2/OAuth2GrantServiceImpl.java:83:    public OAuth2AccessTokenDO grantRefreshToken(String refreshToken, String clientId) {
DesignScreenshot/src/main/java/com/fxsb/designscreenshot/service/oauth2/OAuth2GrantServiceImpl.java:84:        return oauth2TokenService.refreshAccessToken(refreshToken, clientId);
DesignScreenshot/src/main/java/com/fxsb/designscreenshot/service/oauth2/OAuth2GrantServiceImpl.java:94:    public boolean revokeToken(String clientId, String accessToken) {
DesignScreenshot/src/main/java/com/fxsb/designscreenshot/service/oauth2/OAuth2GrantServiceImpl.java:96:        OAuth2AccessTokenDO accessTokenDO = oauth2TokenService.getAccessToken(accessToken);
DesignScreenshot/src/main/java/com/fxsb/designscreenshot/service/oauth2/OAuth2GrantServiceImpl.java:97:        if (accessTokenDO == null || ObjectUtil.notEqual(clientId, accessTokenDO.getClientId())) {
DesignScreenshot/src/main/java/com/fxsb/designscreenshot/service/oauth2/OAuth2GrantServiceImpl.java:101:        return oauth2TokenService.removeAccessToken(accessToken) != null;
DesignScreenshot/src/main/java/com/fxsb/designscreenshot/service/oauth2/OAuth2CodeService.java:10: * 从功能上，和 Spring Security OAuth 的 JdbcAuthorizationCodeServices 的功能，提供授权码的操作
DesignScreenshot/src/main/java/com/fxsb/designscreenshot/service/oauth2/OAuth2CodeService.java:19:     * 参考 JdbcAuthorizationCodeServices 的 createAuthorizationCode 方法
DesignScreenshot/src/main/java/com/fxsb/designscreenshot/service/oauth2/OAuth2CodeService.java:29:    OAuth2CodeDO createAuthorizationCode(Long userId, Integer userType, String clientId,
DesignScreenshot/src/main/java/com/fxsb/designscreenshot/service/oauth2/OAuth2CodeService.java:37:    OAuth2CodeDO consumeAuthorizationCode(String code);
DesignScreenshot/src/main/java/com/fxsb/designscreenshot/service/oauth2/OAuth2TokenServiceImpl.java:50:        OAuth2RefreshTokenDO refreshTokenDO = createOAuth2RefreshToken(userId, userType, clientDO, scopes);
DesignScreenshot/src/main/java/com/fxsb/designscreenshot/service/oauth2/OAuth2TokenServiceImpl.java:52:        return createOAuth2AccessToken(refreshTokenDO, clientDO);
DesignScreenshot/src/main/java/com/fxsb/designscreenshot/service/oauth2/OAuth2TokenServiceImpl.java:59:        OAuth2RefreshTokenDO refreshTokenDO = createOAuth2RefreshToken(userId, userType, clientDO, roleId, scopes);
DesignScreenshot/src/main/java/com/fxsb/designscreenshot/service/oauth2/OAuth2TokenServiceImpl.java:61:        return createOAuth2AccessToken(refreshTokenDO, clientDO);
DesignScreenshot/src/main/java/com/fxsb/designscreenshot/service/oauth2/OAuth2TokenServiceImpl.java:65:    public OAuth2AccessTokenDO refreshAccessToken(String refreshToken, String clientId) {
DesignScreenshot/src/main/java/com/fxsb/designscreenshot/service/oauth2/OAuth2TokenServiceImpl.java:67:        OAuth2RefreshTokenDO refreshTokenDO = oauth2RefreshTokenMapper.selectByRefreshToken(refreshToken);
DesignScreenshot/src/main/java/com/fxsb/designscreenshot/service/oauth2/OAuth2TokenServiceImpl.java:68:        if (refreshTokenDO == null) {
DesignScreenshot/src/main/java/com/fxsb/designscreenshot/service/oauth2/OAuth2TokenServiceImpl.java:74:        if (ObjectUtil.notEqual(clientId, refreshTokenDO.getClientId())) {
DesignScreenshot/src/main/java/com/fxsb/designscreenshot/service/oauth2/OAuth2TokenServiceImpl.java:79:        List<OAuth2AccessTokenDO> accessTokenDOs = oauth2AccessTokenMapper.selectListByRefreshToken(refreshToken);
DesignScreenshot/src/main/java/com/fxsb/designscreenshot/service/oauth2/OAuth2TokenServiceImpl.java:80:        if (CollUtil.isNotEmpty(accessTokenDOs)) {
DesignScreenshot/src/main/java/com/fxsb/designscreenshot/service/oauth2/OAuth2TokenServiceImpl.java:81:            oauth2AccessTokenMapper.deleteBatchIds(convertSet(accessTokenDOs, OAuth2AccessTokenDO::getId));
DesignScreenshot/src/main/java/com/fxsb/designscreenshot/service/oauth2/OAuth2TokenServiceImpl.java:82:            oauth2AccessTokenRedisDAO.deleteList(convertSet(accessTokenDOs, OAuth2AccessTokenDO::getAccessToken));
DesignScreenshot/src/main/java/com/fxsb/designscreenshot/service/oauth2/OAuth2TokenServiceImpl.java:86:        if (DateUtils.isExpired(refreshTokenDO.getExpiresTime())) {
DesignScreenshot/src/main/java/com/fxsb/designscreenshot/service/oauth2/OAuth2TokenServiceImpl.java:87:            oauth2RefreshTokenMapper.deleteById(refreshTokenDO.getId());
DesignScreenshot/src/main/java/com/fxsb/designscreenshot/service/oauth2/OAuth2TokenServiceImpl.java:92:        return createOAuth2AccessToken(refreshTokenDO, clientDO);
DesignScreenshot/src/main/java/com/fxsb/designscreenshot/service/oauth2/OAuth2TokenServiceImpl.java:96:    public OAuth2AccessTokenDO getAccessToken(String accessToken) {
DesignScreenshot/src/main/java/com/fxsb/designscreenshot/service/oauth2/OAuth2TokenServiceImpl.java:98:        OAuth2AccessTokenDO accessTokenDO = oauth2AccessTokenRedisDAO.get(accessToken);
DesignScreenshot/src/main/java/com/fxsb/designscreenshot/service/oauth2/OAuth2TokenServiceImpl.java:99:        if (accessTokenDO != null) {
DesignScreenshot/src/main/java/com/fxsb/designscreenshot/service/oauth2/OAuth2TokenServiceImpl.java:100:            return accessTokenDO;
DesignScreenshot/src/main/java/com/fxsb/designscreenshot/service/oauth2/OAuth2TokenServiceImpl.java:104:        accessTokenDO = oauth2AccessTokenMapper.selectByAccessToken(accessToken);
DesignScreenshot/src/main/java/com/fxsb/designscreenshot/service/oauth2/OAuth2TokenServiceImpl.java:106:        if (accessTokenDO != null && !DateUtils.isExpired(accessTokenDO.getExpiresTime())) {
DesignScreenshot/src/main/java/com/fxsb/designscreenshot/service/oauth2/OAuth2TokenServiceImpl.java:107:            oauth2AccessTokenRedisDAO.set(accessTokenDO);
DesignScreenshot/src/main/java/com/fxsb/designscreenshot/service/oauth2/OAuth2TokenServiceImpl.java:109:        return accessTokenDO;
DesignScreenshot/src/main/java/com/fxsb/designscreenshot/service/oauth2/OAuth2TokenServiceImpl.java:113:    public OAuth2AccessTokenDO checkAccessToken(String accessToken) {
DesignScreenshot/src/main/java/com/fxsb/designscreenshot/service/oauth2/OAuth2TokenServiceImpl.java:114:        OAuth2AccessTokenDO accessTokenDO = getAccessToken(accessToken);
DesignScreenshot/src/main/java/com/fxsb/designscreenshot/service/oauth2/OAuth2TokenServiceImpl.java:115:        if (accessTokenDO == null) {
DesignScreenshot/src/main/java/com/fxsb/designscreenshot/service/oauth2/OAuth2TokenServiceImpl.java:118:        if (DateUtils.isExpired(accessTokenDO.getExpiresTime())) {
DesignScreenshot/src/main/java/com/fxsb/designscreenshot/service/oauth2/OAuth2TokenServiceImpl.java:121:        return accessTokenDO;
DesignScreenshot/src/main/java/com/fxsb/designscreenshot/service/oauth2/OAuth2TokenServiceImpl.java:125:    public OAuth2AccessTokenDO removeAccessToken(String accessToken) {
DesignScreenshot/src/main/java/com/fxsb/designscreenshot/service/oauth2/OAuth2TokenServiceImpl.java:127:        OAuth2AccessTokenDO accessTokenDO = oauth2AccessTokenMapper.selectByAccessToken(accessToken);
DesignScreenshot/src/main/java/com/fxsb/designscreenshot/service/oauth2/OAuth2TokenServiceImpl.java:128:        if (accessTokenDO == null) {
DesignScreenshot/src/main/java/com/fxsb/designscreenshot/service/oauth2/OAuth2TokenServiceImpl.java:131:        oauth2AccessTokenMapper.deleteById(accessTokenDO.getId());
DesignScreenshot/src/main/java/com/fxsb/designscreenshot/service/oauth2/OAuth2TokenServiceImpl.java:132:        oauth2AccessTokenRedisDAO.delete(accessToken);
DesignScreenshot/src/main/java/com/fxsb/designscreenshot/service/oauth2/OAuth2TokenServiceImpl.java:134:        oauth2RefreshTokenMapper.deleteByRefreshToken(accessTokenDO.getRefreshToken());
DesignScreenshot/src/main/java/com/fxsb/designscreenshot/service/oauth2/OAuth2TokenServiceImpl.java:135:        return accessTokenDO;
DesignScreenshot/src/main/java/com/fxsb/designscreenshot/service/oauth2/OAuth2TokenServiceImpl.java:143:    private OAuth2AccessTokenDO createOAuth2AccessToken(OAuth2RefreshTokenDO refreshTokenDO, OAuth2ClientDO clientDO) {
DesignScreenshot/src/main/java/com/fxsb/designscreenshot/service/oauth2/OAuth2TokenServiceImpl.java:144:        OAuth2AccessTokenDO accessTokenDO = new OAuth2AccessTokenDO();
DesignScreenshot/src/main/java/com/fxsb/designscreenshot/service/oauth2/OAuth2TokenServiceImpl.java:145:        accessTokenDO.setAccessToken(generateAccessToken());
DesignScreenshot/src/main/java/com/fxsb/designscreenshot/service/oauth2/OAuth2TokenServiceImpl.java:146:        accessTokenDO.setUserId(refreshTokenDO.getUserId());
DesignScreenshot/src/main/java/com/fxsb/designscreenshot/service/oauth2/OAuth2TokenServiceImpl.java:147:        accessTokenDO.setUserType(refreshTokenDO.getUserType());
DesignScreenshot/src/main/java/com/fxsb/designscreenshot/service/oauth2/OAuth2TokenServiceImpl.java:148:        accessTokenDO.setClientId(clientDO.getClientId());
DesignScreenshot/src/main/java/com/fxsb/designscreenshot/service/oauth2/OAuth2TokenServiceImpl.java:149:        accessTokenDO.setScopes(refreshTokenDO.getScopes());
DesignScreenshot/src/main/java/com/fxsb/designscreenshot/service/oauth2/OAuth2TokenServiceImpl.java:150:        accessTokenDO.setRefreshToken(refreshTokenDO.getRefreshToken());
DesignScreenshot/src/main/java/com/fxsb/designscreenshot/service/oauth2/OAuth2TokenServiceImpl.java:151:        accessTokenDO.setRoleId(refreshTokenDO.getRoleId());
DesignScreenshot/src/main/java/com/fxsb/designscreenshot/service/oauth2/OAuth2TokenServiceImpl.java:152:        accessTokenDO.setExpiresTime(LocalDateTime.now().plusSeconds(clientDO.getAccessTokenValiditySeconds()));
DesignScreenshot/src/main/java/com/fxsb/designscreenshot/service/oauth2/OAuth2TokenServiceImpl.java:153:        oauth2AccessTokenMapper.insert(accessTokenDO);
DesignScreenshot/src/main/java/com/fxsb/designscreenshot/service/oauth2/OAuth2TokenServiceImpl.java:155:        oauth2AccessTokenRedisDAO.set(accessTokenDO);
DesignScreenshot/src/main/java/com/fxsb/designscreenshot/service/oauth2/OAuth2TokenServiceImpl.java:156:        return accessTokenDO;
DesignScreenshot/src/main/java/com/fxsb/designscreenshot/service/oauth2/OAuth2TokenServiceImpl.java:160:        OAuth2RefreshTokenDO refreshToken = new OAuth2RefreshTokenDO().setRefreshToken(generateRefreshToken())
DesignScreenshot/src/main/java/com/fxsb/designscreenshot/service/oauth2/OAuth2TokenServiceImpl.java:164:        oauth2RefreshTokenMapper.insert(refreshToken);
DesignScreenshot/src/main/java/com/fxsb/designscreenshot/service/oauth2/OAuth2TokenServiceImpl.java:165:        return refreshToken;
DesignScreenshot/src/main/java/com/fxsb/designscreenshot/service/oauth2/OAuth2TokenServiceImpl.java:169:        OAuth2RefreshTokenDO refreshToken = new OAuth2RefreshTokenDO().setRefreshToken(generateRefreshToken())
DesignScreenshot/src/main/java/com/fxsb/designscreenshot/service/oauth2/OAuth2TokenServiceImpl.java:174:        oauth2RefreshTokenMapper.insert(refreshToken);
DesignScreenshot/src/main/java/com/fxsb/designscreenshot/service/oauth2/OAuth2TokenServiceImpl.java:175:        return refreshToken;
DesignScreenshot/src/main/java/com/fxsb/designscreenshot/service/oauth2/OAuth2CodeServiceImpl.java:36:    public OAuth2CodeDO createAuthorizationCode(Long userId, Integer userType, String clientId,
DesignScreenshot/src/main/java/com/fxsb/designscreenshot/service/oauth2/OAuth2CodeServiceImpl.java:52:    public OAuth2CodeDO consumeAuthorizationCode(String code) {
DesignScreenshot/src/main/java/com/fxsb/designscreenshot/service/ai/AiServiceImpl.java:31:        headers.set("Authorization", "Bearer " + apiKey);
DesignScreenshot/src/main/java/com/fxsb/designscreenshot/service/auth/AdminAuthService.java:60:     * @param refreshToken 刷新令牌
DesignScreenshot/src/main/java/com/fxsb/designscreenshot/service/auth/AdminAuthService.java:63:    AuthLoginRespVO refreshToken(String refreshToken);
DesignScreenshot/src/main/java/com/fxsb/designscreenshot/service/auth/AdminAuthServiceImpl.java:158:        OAuth2AccessTokenDO accessTokenDO = oauth2TokenService.createAccessToken(userId, getUserType().getValue(),
DesignScreenshot/src/main/java/com/fxsb/designscreenshot/service/auth/AdminAuthServiceImpl.java:161:        return AuthConvert.INSTANCE.convert(accessTokenDO);
DesignScreenshot/src/main/java/com/fxsb/designscreenshot/service/auth/AdminAuthServiceImpl.java:167:        OAuth2AccessTokenDO accessTokenDO = oauth2TokenService.createAccessToken(userId, getUserType().getValue(),
DesignScreenshot/src/main/java/com/fxsb/designscreenshot/service/auth/AdminAuthServiceImpl.java:170:        return AuthConvert.INSTANCE.convert(accessTokenDO);
DesignScreenshot/src/main/java/com/fxsb/designscreenshot/service/auth/AdminAuthServiceImpl.java:173:    public AuthLoginRespVO refreshToken(String refreshToken) {
DesignScreenshot/src/main/java/com/fxsb/designscreenshot/service/auth/AdminAuthServiceImpl.java:174:        OAuth2AccessTokenDO accessTokenDO = oauth2TokenService.refreshAccessToken(refreshToken, OAuth2ClientConstants.CLIENT_ID_DEFAULT);
DesignScreenshot/src/main/java/com/fxsb/designscreenshot/service/auth/AdminAuthServiceImpl.java:175:        return AuthConvert.INSTANCE.convert(accessTokenDO);
--- rust middleware/security ---
DesignScreenshot/rust-backend/src/main.rs:20:use tower_http::{cors::{Any, CorsLayer}, trace::TraceLayer};
DesignScreenshot/rust-backend/src/main.rs:226:async fn login(State(state): State<AppState>, Json(req): Json<LoginReq>) -> Json<ApiResponse<Value>> {
DesignScreenshot/rust-backend/src/main.rs:865:    let generated = extension.map(|ext| format!("{digest}.{ext}")).unwrap_or(digest);
DesignScreenshot/rust-backend/src/main.rs:866:    // Preserve the legacy FileService behavior: generated path is followed by the original name.
DesignScreenshot/rust-backend/src/main.rs:867:    format!("{generated}{filename}")
DesignScreenshot/rust-backend/src/main.rs:927:    tracing_subscriber::fmt().with_env_filter(tracing_subscriber::EnvFilter::try_from_default_env().unwrap_or_else(|_|"design_screenshot_api=info,tower_http=info".into())).init();
DesignScreenshot/rust-backend/src/main.rs:942:        .route("/system/auth/login",post(login)).route("/system/auth/refresh-token",post(refresh_token)).route("/system/auth/logout",post(logout)).route("/system/auth/get-user-info",get(user_info))
DesignScreenshot/rust-backend/src/main.rs:949:    let cors=CorsLayer::new().allow_origin(Any).allow_methods([Method::GET,Method::POST,Method::PUT,Method::DELETE,Method::OPTIONS]).allow_headers(Any);
DesignScreenshot/rust-backend/src/main.rs:953:    let app=Router::new().route("/health",get(health)).route("/doc.html",get(health)).nest("/admin-api",api).layer(DefaultBodyLimit::max(100*1024*1024)).layer(cors).layer(TraceLayer::new_for_http()).layer(middleware::from_fn_with_state(state.clone(),enforce_ip_allowlist)).with_state(state);
