232 lines
1.1 MiB
JavaScript
232 lines
1.1 MiB
JavaScript
|
var L7=Object.defineProperty;var R7=(oi,bi,wi)=>bi in oi?L7(oi,bi,{enumerable:!0,configurable:!0,writable:!0,value:wi}):oi[bi]=wi;var vl=(oi,bi,wi)=>(R7(oi,typeof bi!="symbol"?bi+"":bi,wi),wi),ev=(oi,bi,wi)=>{if(!bi.has(oi))throw TypeError("Cannot "+wi)};var Wr=(oi,bi,wi)=>(ev(oi,bi,"read from private field"),wi?wi.call(oi):bi.get(oi)),Vl=(oi,bi,wi)=>{if(bi.has(oi))throw TypeError("Cannot add the same private member more than once");bi instanceof WeakSet?bi.add(oi):bi.set(oi,wi)},Qa=(oi,bi,wi,vi)=>(ev(oi,bi,"write to private field"),vi?vi.call(oi,wi):bi.set(oi,wi),wi);var qf=(oi,bi,wi)=>(ev(oi,bi,"access private method"),wi);(function(){var __webpack_modules__={"./node_modules/@vue/reactivity/dist/reactivity.esm-bundler.js":function(oi,bi,wi){"use strict";wi.d(bi,{C4:function(){return fs},EW:function(){return bc},Gc:function(){return su},IG:function(){return Rc},IJ:function(){return ma},KR:function(){return mo},Kh:function(){return ec},Pr:function(){return Oc},QW:function(){return jd},X2:function(){return bn},bl:function(){return mn},fE:function(){return Da},g8:function(){return Ya},hZ:function(){return Wi},i9:function(){return Us},ju:function(){return ru},lW:function(){return cf},o5:function(){return _n},u4:function(){return ki},ux:function(){return Go},yC:function(){return Li}});var vi=wi("./node_modules/@vue/shared/dist/shared.esm-bundler.js");function ri(ln,...Tn){console.warn(`[Vue warn] ${ln}`,...Tn)}let yi;class Li{constructor(Tn=!1){this.detached=Tn,this._active=!0,this.effects=[],this.cleanups=[],this.parent=yi,!Tn&&yi&&(this.index=(yi.scopes||(yi.scopes=[])).push(this)-1)}get active(){return this._active}run(Tn){if(this._active){const ts=yi;try{return yi=this,Tn()}finally{yi=ts}}}on(){yi=this}off(){yi=this.parent}stop(Tn){if(this._active){let ts,xs;for(ts=0,xs=this.effects.length;ts<xs;ts++)this.effects[ts].stop();for(ts=0,xs=this.cleanups.length;ts<xs;ts++)this.cleanups[ts]();if(this.scopes)for(ts=0,xs=this.scopes.length;ts<xs;ts++)this.scopes[ts].stop(!0);if(!this.detached&&this.parent&&!Tn){const As=this.parent.scopes.pop();As&&As!==this&&(this.parent.scopes[this.index]=As,As.index=this.index)}this.parent=void 0,this._active=!1}}}function Ji(ln){return new Li(ln)}function tn(ln,Tn=yi){Tn&&Tn.active&&Tn.effects.push(ln)}function _n(){return yi}function In(ln){yi&&yi.cleanups.push(ln)}let Vn;class bn{constructor(Tn,ts,xs,As){this.fn=Tn,this.trigger=ts,this.scheduler=xs,this.active=!0,this.deps=[],this._dirtyLevel=4,this._trackId=0,this._runnings=0,this._shouldSchedule=!1,this._depsLength=0,tn(this,As)}get dirty(){if(this._dirtyLevel===2||this._dirtyLevel===3){this._dirtyLevel=1,fs();for(let Tn=0;Tn<this._depsLength;Tn++){const ts=this.deps[Tn];if(ts.computed&&(Zi(ts.computed),this._dirtyLevel>=4))break}this._dirtyLevel===1&&(this._dirtyLevel=0),mn()}return this._dirtyLevel>=4}set dirty(Tn){this._dirtyLevel=Tn?4:0}run(){if(this._dirtyLevel=0,!this.active)return this.fn();let Tn=sn,ts=Vn;try{return sn=!0,Vn=this,this._runnings++,un(this),this.fn()}finally{ls(this),this._runnings--,Vn=ts,sn=Tn}}stop(){var Tn;this.active&&(un(this),ls(this),(Tn=this.onStop)==null||Tn.call(this),this.active=!1)}}function Zi(ln){return ln.value}function un(ln){ln._trackId++,ln._depsLength=0}function ls(ln){if(ln.deps.length>ln._depsLength){for(let Tn=ln._depsLength;Tn<ln.deps.length;Tn++)ks(ln.deps[Tn],ln);ln.deps.length=ln._depsLength}}function ks(ln,Tn){const ts=ln.get(Tn);ts!==void 0&&Tn._trackId!==ts&&(ln.delete(Tn),ln.size===0&&ln.cleanup())}function En(ln,Tn){ln.effect instanceof bn&&(ln=ln.effect.fn);const ts=new bn(ln,NOOP,()=>{ts.dirty&&ts.run()});Tn&&(extend(ts,Tn),Tn.scope&&tn(ts,Tn.scope)),(!Tn||!Tn.lazy)&&ts.run();const xs=ts.run.bind(ts);return xs.effect=ts,xs}function qi(ln){ln.effect.stop()}let sn=!0,rs=0;const hs=[];function fs(){hs.push(sn),sn=!1}function yn(){hs.push(sn),sn=!0}function mn(){const ln=hs.pop();sn=ln===void 0?!0:ln}function Mn(){rs++}function pi(){for(rs--;!rs&&dn.length;)dn.shift()()}function rn(ln,Tn,ts){var xs;if(Tn.get(ln)!==ln._trackId){Tn.set(ln,ln._trackId);const As=ln.deps[ln._depsLength];As
|
|||
|
`),Ni]);else{const Vi=[`[Vue warn]: ${ui}`,...mi];Ni.length&&Vi.push(`
|
|||
|
`,...In(Ni)),console.warn(...Vi)}(0,vi.bl)()}function _n(){let ui=yi[yi.length-1];if(!ui)return[];const mi=[];for(;ui;){const Ei=mi[0];Ei&&Ei.vnode===ui?Ei.recurseCount++:mi.push({vnode:ui,recurseCount:0});const Di=ui.component&&ui.component.parent;ui=Di&&Di.vnode}return mi}function In(ui){const mi=[];return ui.forEach((Ei,Di)=>{mi.push(...Di===0?[]:[`
|
|||
|
`],...Vn(Ei))}),mi}function Vn({vnode:ui,recurseCount:mi}){const Ei=mi>0?`... (${mi} recursive calls)`:"",Di=ui.component?ui.component.parent==null:!1,Ni=` at <${uu(ui.component,ui.type,Di)}`,Vi=">"+Ei;return ui.props?[Ni,...bn(ui.props),Vi]:[Ni+Vi]}function bn(ui){const mi=[],Ei=Object.keys(ui);return Ei.slice(0,3).forEach(Di=>{mi.push(...Zi(Di,ui[Di]))}),Ei.length>3&&mi.push(" ..."),mi}function Zi(ui,mi,Ei){return(0,ri.Kg)(mi)?(mi=JSON.stringify(mi),Ei?mi:[`${ui}=${mi}`]):typeof mi=="number"||typeof mi=="boolean"||mi==null?Ei?mi:[`${ui}=${mi}`]:(0,vi.i9)(mi)?(mi=Zi(ui,(0,vi.ux)(mi.value),!0),Ei?mi:[`${ui}=Ref<`,mi,">"]):(0,ri.Tn)(mi)?[`${ui}=fn${mi.name?`<${mi.name}>`:""}`]:(mi=(0,vi.ux)(mi),Ei?mi:[`${ui}=`,mi])}function un(ui,mi){}const ls={SETUP_FUNCTION:0,0:"SETUP_FUNCTION",RENDER_FUNCTION:1,1:"RENDER_FUNCTION",WATCH_GETTER:2,2:"WATCH_GETTER",WATCH_CALLBACK:3,3:"WATCH_CALLBACK",WATCH_CLEANUP:4,4:"WATCH_CLEANUP",NATIVE_EVENT_HANDLER:5,5:"NATIVE_EVENT_HANDLER",COMPONENT_EVENT_HANDLER:6,6:"COMPONENT_EVENT_HANDLER",VNODE_HOOK:7,7:"VNODE_HOOK",DIRECTIVE_HOOK:8,8:"DIRECTIVE_HOOK",TRANSITION_HOOK:9,9:"TRANSITION_HOOK",APP_ERROR_HANDLER:10,10:"APP_ERROR_HANDLER",APP_WARN_HANDLER:11,11:"APP_WARN_HANDLER",FUNCTION_REF:12,12:"FUNCTION_REF",ASYNC_COMPONENT_LOADER:13,13:"ASYNC_COMPONENT_LOADER",SCHEDULER:14,14:"SCHEDULER"},ks={sp:"serverPrefetch hook",bc:"beforeCreate hook",c:"created hook",bm:"beforeMount hook",m:"mounted hook",bu:"beforeUpdate hook",u:"updated",bum:"beforeUnmount hook",um:"unmounted hook",a:"activated hook",da:"deactivated hook",ec:"errorCaptured hook",rtc:"renderTracked hook",rtg:"renderTriggered hook",0:"setup function",1:"render function",2:"watcher getter",3:"watcher callback",4:"watcher cleanup function",5:"native event handler",6:"component event handler",7:"vnode hook",8:"directive hook",9:"transition hook",10:"app errorHandler",11:"app warnHandler",12:"ref function",13:"async component loader",14:"scheduler flush. This is likely a Vue internals bug. Please open an issue at https://github.com/vuejs/core ."};function En(ui,mi,Ei,Di){try{return Di?ui(...Di):ui()}catch(Ni){sn(Ni,mi,Ei)}}function qi(ui,mi,Ei,Di){if((0,ri.Tn)(ui)){const Ni=En(ui,mi,Ei,Di);return Ni&&(0,ri.yL)(Ni)&&Ni.catch(Vi=>{sn(Vi,mi,Ei)}),Ni}if((0,ri.cy)(ui)){const Ni=[];for(let Vi=0;Vi<ui.length;Vi++)Ni.push(qi(ui[Vi],mi,Ei,Di));return Ni}}function sn(ui,mi,Ei,Di=!0){const Ni=mi?mi.vnode:null;if(mi){let Vi=mi.parent;const cn=mi.proxy,An=`https://vuejs.org/error-reference/#runtime-${Ei}`;for(;Vi;){const Qn=Vi.ec;if(Qn){for(let ds=0;ds<Qn.length;ds++)if(Qn[ds](ui,cn,An)===!1)return}Vi=Vi.parent}const qn=mi.appContext.config.errorHandler;if(qn){(0,vi.C4)(),En(qn,null,10,[ui,cn,An]),(0,vi.bl)();return}}rs(ui,Ei,Ni,Di)}function rs(ui,mi,Ei,Di=!0){console.error(ui)}let hs=!1,fs=!1;const yn=[];let mn=0;const Mn=[];let pi=null,rn=0;const dn=Promise.resolve();let pn=null;const Pn=100;function nn(ui){const mi=pn||dn;return ui?mi.then(this?ui.bind(this):ui):mi}function Ai(ui){let mi=mn+1,Ei=yn.length;for(;mi<Ei;){const Di=mi+Ei>>>1,Ni=yn[Di],Vi=Fi(Ni);Vi<ui||Vi===ui&&Ni.pre?mi=Di+1:Ei=Di}return mi}function Ri(ui){(!yn.length||!yn.includes(ui,hs&&ui.allowRecurse?mn+1:mn))&&(ui.id==null?yn.push(ui):yn.splice(Ai(ui.id),0,ui),ki())}function ki(){!hs&&!fs&&(fs=!0,pn=dn.then(zi))}function Wi(ui){const mi=yn.indexOf(ui);mi>mn&&yn.splice(mi,1)}function an(ui){(0,ri.cy)(ui)?Mn.push(...ui):(!pi||!pi.includes(ui,ui.allowRecurse?rn+1:rn))&&Mn.push(ui),ki()}function Fn(ui,mi,Ei=hs?mn+1:0){for(;Ei<yn.length;Ei++){const Di=yn[Ei];if(Di&&Di.pre){if(ui&&Di.id!==ui.uid)continue;yn.splice(Ei,1),Ei--,Di()}}}function en(ui){if(Mn.length){const mi=[...new Set(Mn)].sort((Ei,Di)=>Fi(Ei)-Fi(Di));if(Mn.length=0,pi){pi.push(...mi);return}for(pi=mi,rn=0;rn<pi.length;rn++)pi[rn]();pi=null,rn=0}}const Fi=ui=>ui.id==null?1/0:ui.id,Oi=(ui,mi)=>{const Ei=Fi(ui)-Fi(mi);if(Ei===0){if(ui.pre&&!mi.pre)return-1;if(mi.pre&&!ui.pre)return 1}return Ei};function zi(ui){fs=!1,hs=!0,yn.sort(Oi);const mi=ri.tE;try{for(mn=0;mn<yn.length;mn++){const Ei=yn[mn];Ei&&Ei.active!==!1&&En(Ei,null,14
|
|||
|
- rendered on server: ${ds(qn)}
|
|||
|
- expected on client: ${ds(Qn)}
|
|||
|
Note: this mismatch is check-only. The DOM will not be rectified in production due to performance overhead.
|
|||
|
You should fix the source of the mismatch.`;return tn(Cn,ui,is),!0}return!1}function ul(ui){return new Set(ui.trim().split(/\s+/))}function dm(ui,mi){if(ui.size!==mi.size)return!1;for(const Ei of ui)if(!mi.has(Ei))return!1;return!0}function Id(ui){const mi=new Map;for(const Ei of ui.split(";")){let[Di,Ni]=Ei.split(":");Di=Di?.trim(),Ni=Ni?.trim(),Di&&Ni&&mi.set(Di,Ni)}return mi}function Xu(ui,mi){if(ui.size!==mi.size)return!1;for(const[Ei,Di]of ui)if(Di!==mi.get(Ei))return!1;return!0}let Pd,Kf;function iv(ui,mi){ui.appContext.config.performance&&xp()&&Kf.mark(`vue-${mi}-${ui.uid}`)}function gh(ui,mi){if(ui.appContext.config.performance&&xp()){const Ei=`vue-${mi}-${ui.uid}`,Di=Ei+":end";Kf.mark(Di),Kf.measure(`<${uu(ui,ui.type)}> ${mi}`,Ei,Di),Kf.clearMarks(Ei),Kf.clearMarks(Di)}}function xp(){return Pd!==void 0||(typeof window<"u"&&window.performance?(Pd=!0,Kf=window.performance):Pd=!1),Pd}function nv(){const ui=[]}const el=cf;function sv(ui){return gf(ui)}function $c(ui){return gf(ui,ac)}function gf(ui,mi){nv();const Ei=(0,ri.We)();Ei.__VUE__=!0;const{insert:Di,remove:Ni,patchProp:Vi,createElement:cn,createText:An,createComment:qn,setText:Qn,setElementText:ds,parentNode:Cn,nextSibling:is,setScopeId:Ss=ri.tE,insertStaticContent:qs}=ui,oo=(xn,$n,_s,Rs=null,Ms=null,Qs=null,io=void 0,Ws=null,Kr=!!$n.dynamicChildren)=>{if(xn===$n)return;xn&&!Vc(xn,$n)&&(Rs=$d(xn),fu(xn,Ms,Qs,!0),xn=null),$n.patchFlag===-2&&(Kr=!1,$n.dynamicChildren=null);const{type:Is,ref:no,shapeFlag:So}=$n;switch(Is){case vf:Qo(xn,$n,_s,Rs);break;case yl:Vo(xn,$n,_s,Rs);break;case Yf:xn==null&&Os($n,_s,Rs,io);break;case $a:aa(xn,$n,_s,Rs,Ms,Qs,io,Ws,Kr);break;default:So&1?Ks(xn,$n,_s,Rs,Ms,Qs,io,Ws,Kr):So&6?Pa(xn,$n,_s,Rs,Ms,Qs,io,Ws,Kr):(So&64||So&128)&&Is.process(xn,$n,_s,Rs,Ms,Qs,io,Ws,Kr,tf)}no!=null&&Ms&&No(no,xn&&xn.ref,Qs,$n||xn,!$n)},Qo=(xn,$n,_s,Rs)=>{if(xn==null)Di($n.el=An($n.children),_s,Rs);else{const Ms=$n.el=xn.el;$n.children!==xn.children&&Qn(Ms,$n.children)}},Vo=(xn,$n,_s,Rs)=>{xn==null?Di($n.el=qn($n.children||""),_s,Rs):$n.el=xn.el},Os=(xn,$n,_s,Rs)=>{[xn.el,xn.anchor]=qs(xn.children,$n,_s,Rs,xn.el,xn.anchor)},os=(xn,$n,_s,Rs)=>{if($n.children!==xn.children){const Ms=is(xn.anchor);js(xn),[$n.el,$n.anchor]=qs($n.children,_s,Ms,Rs)}else $n.el=xn.el,$n.anchor=xn.anchor},bs=({el:xn,anchor:$n},_s,Rs)=>{let Ms;for(;xn&&xn!==$n;)Ms=is(xn),Di(xn,_s,Rs),xn=Ms;Di($n,_s,Rs)},js=({el:xn,anchor:$n})=>{let _s;for(;xn&&xn!==$n;)_s=is(xn),Ni(xn),xn=_s;Ni($n)},Ks=(xn,$n,_s,Rs,Ms,Qs,io,Ws,Kr)=>{$n.type==="svg"?io="svg":$n.type==="math"&&(io="mathml"),xn==null?Ns($n,_s,Rs,Ms,Qs,io,Ws,Kr):eo(xn,$n,Ms,Qs,io,Ws,Kr)},Ns=(xn,$n,_s,Rs,Ms,Qs,io,Ws)=>{let Kr,Is;const{props:no,shapeFlag:So,transition:yo,dirs:Mo}=xn;if(Kr=xn.el=cn(xn.type,Qs,no&&no.is,no),So&8?ds(Kr,xn.children):So&16&&Gr(xn.children,Kr,null,Rs,Ms,Xf(xn,Qs),io,Ws),Mo&&ba(xn,null,Rs,"created"),Gs(Kr,xn,xn.scopeId,io,Rs),no){for(const la in no)la!=="value"&&!(0,ri.SU)(la)&&Vi(Kr,la,null,no[la],Qs,xn.children,Rs,Ms,du);"value"in no&&Vi(Kr,"value",null,no.value,Qs),(Is=no.onVnodeBeforeMount)&&Nl(Is,Rs,xn)}Mo&&ba(xn,null,Rs,"beforeMount");const ta=hm(Ms,yo);ta&&yo.beforeEnter(Kr),Di(Kr,$n,_s),((Is=no&&no.onVnodeMounted)||ta||Mo)&&el(()=>{Is&&Nl(Is,Rs,xn),ta&&yo.enter(Kr),Mo&&ba(xn,null,Rs,"mounted")},Ms)},Gs=(xn,$n,_s,Rs,Ms)=>{if(_s&&Ss(xn,_s),Rs)for(let Qs=0;Qs<Rs.length;Qs++)Ss(xn,Rs[Qs]);if(Ms){let Qs=Ms.subTree;if($n===Qs){const io=Ms.vnode;Gs(xn,io,io.scopeId,io.slotScopeIds,Ms.parent)}}},Gr=(xn,$n,_s,Rs,Ms,Qs,io,Ws,Kr=0)=>{for(let Is=Kr;Is<xn.length;Is++){const no=xn[Is]=Ws?Au(xn[Is]):tl(xn[Is]);oo(null,no,$n,_s,Rs,Ms,Qs,io,Ws)}},eo=(xn,$n,_s,Rs,Ms,Qs,io)=>{const Ws=$n.el=xn.el;let{patchFlag:Kr,dynamicChildren:Is,dirs:no}=$n;Kr|=xn.patchFlag&16;const So=xn.props||ri.MZ,yo=$n.props||ri.MZ;let Mo;if(_s&&wc(_s,!1),(Mo=yo.onVnodeBeforeUpdate)&&Nl(Mo,_s,$n,xn),no&&ba($n,xn,_s,"beforeUpdate"),_s&&wc(_s,!0),Is?To(xn.dynamicChildren,Is,Ws,_s,Rs,Xf($n,Ms),Qs):io||jc(xn,$n,Ws,null,_s,Rs,Xf($n,Ms),Qs,!1),Kr>0){if(Kr&16)fa(Ws,$n,So,yo,_s,Rs,Ms);else if(Kr&2&&So.class!==yo.class&&Vi(Ws,"class",null,yo.class,
|
|||
|
`)}function ca(Yn){if(un(Yn)){const Ts={};for(let Us=0;Us<Yn.length;Us++){const mo=Yn[Us],ma=rs(mo)?kn(mo):ca(mo);if(ma)for(const ea in ma)Ts[ea]=ma[ea]}return Ts}else if(rs(Yn)||fs(Yn))return Yn}const gi=/;(?![^(]*\))/g,Si=/:([^]+)/,$i=/\/\*[^]*?\*\//g;function kn(Yn){const Ts={};return Yn.replace($i,"").split(gi).forEach(Us=>{if(Us){const mo=Us.split(Si);mo.length>1&&(Ts[mo[0].trim()]=mo[1].trim())}}),Ts}function Ln(Yn){let Ts="";if(!Yn||rs(Yn))return Ts;for(const Us in Yn){const mo=Yn[Us],ma=Us.startsWith("--")?Us:Wi(Us);(rs(mo)||typeof mo=="number")&&(Ts+=`${ma}:${mo};`)}return Ts}function Un(Yn){let Ts="";if(rs(Yn))Ts=Yn;else if(un(Yn))for(let Us=0;Us<Yn.length;Us++){const mo=Un(Yn[Us]);mo&&(Ts+=mo+" ")}else if(fs(Yn))for(const Us in Yn)Yn[Us]&&(Ts+=Us+" ");return Ts.trim()}function Jn(Yn){if(!Yn)return null;let{class:Ts,style:Us}=Yn;return Ts&&!rs(Ts)&&(Yn.class=Un(Ts)),Us&&(Yn.style=ca(Us)),Yn}const Ys="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",bo="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",_o="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",pa="area,base,br,col,embed,hr,img,input,link,meta,param,source,track,wbr",ka=null,Aa=null,ha=null,sa=null,Do="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",ra=vi(Do),rl=vi(Do+",async,autofocus,autoplay,controls,default,defer,disabled,hidden,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected");function bl(Yn){return!!Yn||Yn===""}const nu=/[>/="'\u0009\u000a\u000c\u0020]/,ec={};function su(Yn){if(ec.hasOwnProperty(Yn))return ec[Yn];const Ts=nu.test(Yn);return Ts&&console.error(`unsafe attribute name: ${Yn}`),ec[Yn]=!Ts}const Ta={acceptCharset:"accept-charset",className:"class",htmlFor:"for",httpEquiv:"http-equiv"},La=null,va=null;function Ya(Yn){if(Yn==null)return!1;const Ts=typeof Yn;return Ts==="string"||Ts==="number"||Ts==="boolean"}const Zo=/["'&<>]/;function Da(Yn){const Ts=""+Yn,Us=Zo.exec(Ts);if(!Us)return Ts;let mo="",ma,ea,Ra=0;for(ea=Us.index;ea<Ts.length;ea++){switch(Ts.charCodeAt(ea)){case 34:ma=""";break;case 38:ma="&";break;case 39:ma="'";break;case 60:ma="<";break;case 62:ma=">";break;default:continue}Ra!==ea&&(mo+=Ts.slice(Ra,ea)),Ra=ea+1,mo+=ma}return Ra!==ea?mo+Ts.slice(Ra,ea):mo}const ru=/^-?>|<!--|-->|--!>|<!-$/g;function Go(Yn){return Yn.replace(ru,"")}function Rc(Yn,Ts){if(Yn.length!==Ts.length)return!1;let Us=!0;for(let mo=0;Us&&mo<Yn.length;mo++)Us=El(Yn[mo],Ts[mo]);return Us}function El(Yn,Ts){if(Yn===Ts)return!0;let Us=En(Yn),mo=En(Ts);if(Us||mo)return Us&&mo?Yn.getTime()===Ts.getTime():!1;if(Us=hs(Yn),mo=hs(Ts),Us||mo)return Yn===Ts;if(Us=un(
|
|||
|
`),ri=null,yi=0;vi.length>0;){var Li=vi.shift(),Ji=Li.match(/^\s*([a-zA-Z:\-\.]+:)(.*)/);yi===0&&Ji?(Li.split(":"),ri=Ji[1].slice(0,-1),wi[ri]=Ji[2]):wi[ri]+=Li,yi+=Bt(Li)}for(var tn in wi)Ft(oi,tn,wi[tn])}}function jt(oi){Ae(oi);for(var bi=0;bi<oi.attributes.length;bi++){var wi=oi.attributes[bi].name,vi=oi.attributes[bi].value;if(g(wi,"hx-on")||g(wi,"data-hx-on")){var ri=wi.indexOf("-on")+3,yi=wi.slice(ri,ri+1);if(yi==="-"||yi===":"){var Li=wi.slice(ri+1);g(Li,":")?Li="htmx"+Li:g(Li,"-")?Li="htmx:"+Li.slice(1):g(Li,"htmx-")&&(Li="htmx:"+Li.slice(5)),Ft(oi,Li,vi)}}}}function _t(oi){if(v(oi,Q.config.disableSelector)){m(oi);return}var bi=ae(oi);if(bi.initHash!==Le(oi)){Ne(oi),bi.initHash=Le(oi),Vt(oi),ce(oi,"htmx:beforeProcessNode"),oi.value&&(bi.lastValue=oi.value);var wi=it(oi),vi=Ht(oi,bi,wi);vi||(ne(oi,"hx-boost")==="true"?lt(oi,bi,wi):o(oi,"hx-trigger")&&wi.forEach(function(Li){Lt(oi,Li,bi,function(){})})),(oi.tagName==="FORM"||ee(oi,"type")==="submit"&&o(oi,"form"))&&Ut(oi);var ri=te(oi,"hx-sse");ri&&St(oi,bi,ri);var yi=te(oi,"hx-ws");yi&&mt(oi,bi,yi),ce(oi,"htmx:afterProcessNode")}}function zt(oi){if(oi=p(oi),v(oi,Q.config.disableSelector)){m(oi);return}_t(oi),oe(Pt(oi),function(bi){_t(bi)}),oe(kt(oi),jt)}function $t(oi){return oi.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}function Wt(oi,bi){var wi;return window.CustomEvent&&typeof window.CustomEvent=="function"?wi=new CustomEvent(oi,{bubbles:!0,cancelable:!0,detail:bi}):(wi=re().createEvent("CustomEvent"),wi.initCustomEvent(oi,!0,!0,bi)),wi}function fe(oi,bi,wi){ce(oi,bi,le({error:bi},wi))}function Gt(oi){return oi==="htmx:afterProcessNode"}function R(oi,bi){oe(Fr(oi),function(wi){try{bi(wi)}catch(vi){b(vi)}})}function b(oi){console.error?console.error(oi):console.log&&console.log("ERROR: ",oi)}function ce(oi,bi,wi){oi=p(oi),wi==null&&(wi={}),wi.elt=oi;var vi=Wt(bi,wi);Q.logger&&!Gt(bi)&&Q.logger(oi,bi,wi),wi.error&&(b(wi.error),ce(oi,"htmx:error",{errorInfo:wi}));var ri=oi.dispatchEvent(vi),yi=$t(bi);if(ri&&yi!==bi){var Li=Wt(yi,vi.detail);ri=ri&&oi.dispatchEvent(Li)}return R(oi,function(Ji){ri=ri&&Ji.onEvent(bi,vi)!==!1&&!vi.defaultPrevented}),ri}var Jt=location.pathname+location.search;function Zt(){var oi=re().querySelector("[hx-history-elt],[data-hx-history-elt]");return oi||re().body}function Kt(oi,bi,wi,vi){if(U()){if(Q.config.historyCacheSize<=0){localStorage.removeItem("htmx-history-cache");return}oi=B(oi);for(var ri=E(localStorage.getItem("htmx-history-cache"))||[],yi=0;yi<ri.length;yi++)if(ri[yi].url===oi){ri.splice(yi,1);break}var Li={url:oi,content:bi,title:wi,scroll:vi};for(ce(re().body,"htmx:historyItemCreated",{item:Li,cache:ri}),ri.push(Li);ri.length>Q.config.historyCacheSize;)ri.shift();for(;ri.length>0;)try{localStorage.setItem("htmx-history-cache",JSON.stringify(ri));break}catch(Ji){fe(re().body,"htmx:historyCacheError",{cause:Ji,cache:ri}),ri.shift()}}}function Yt(oi){if(!U())return null;oi=B(oi);for(var bi=E(localStorage.getItem("htmx-history-cache"))||[],wi=0;wi<bi.length;wi++)if(bi[wi].url===oi)return bi[wi];return null}function Qt(oi){var bi=Q.config.requestClass,wi=oi.cloneNode(!0);return oe(f(wi,"."+bi),function(vi){n(vi,bi)}),wi.innerHTML}function er(){var oi=Zt(),bi=Jt||location.pathname+location.search,wi;try{wi=re().querySelector('[hx-history="false" i],[data-hx-history="false" i]')}catch{wi=re().querySelector('[hx-history="false"],[data-hx-history="false"]')}wi||(ce(re().body,"htmx:beforeHistorySave",{path:bi,historyElt:oi}),Kt(bi,Qt(oi),re().title,window.scrollY)),Q.config.historyEnabled&&history.replaceState({htmx:!0},re().title,window.location.href)}function tr(oi){Q.config.getCacheBusterParam&&(oi=oi.replace(/org\.htmx\.cache-buster=[^&]*&?/,""),(G(oi,"&")||G(oi,"?"))&&(oi=oi.slice(0,-1))),Q.config.historyEnabled&&history.pushState({htmx:!0},"",oi),Jt=oi}function rr(oi){Q.config.historyEnabled&&history.replaceState({htmx:!0},"",oi),Jt=oi}function nr(oi){oe(oi,function(bi){bi.call()})}function ir(oi){var bi=new XMLHttpRequest,wi={path:oi,xhr:bi};ce(re().body,"htmx:historyCacheMiss",wi),bi.open("GET",oi,!0),bi.setRequestH
|
|||
|
`):ci)),di};var ou=/^(?:focusinfocus|focusoutblur)$/,fh=function(ci){ci.stopPropagation()};pi.extend(pi.event,{trigger:function(ci,di,xi,Ci){var Ii,Pi,Ui,Sn,vn,Hn,as,vs,ns=[xi||rs],gs=un.call(ci,"type")?ci.type:ci,Lo=un.call(ci,"namespace")?ci.namespace.split("."):[];if(Pi=vs=Ui=xi=xi||rs,!(xi.nodeType===3||xi.nodeType===8)&&!ou.test(gs+pi.event.triggered)&&(gs.indexOf(".")>-1&&(Lo=gs.split("."),gs=Lo.shift(),Lo.sort()),vn=gs.indexOf(":")<0&&"on"+gs,ci=ci[pi.expando]?ci:new pi.Event(gs,typeof ci=="object"&&ci),ci.isTrigger=Ci?2:3,ci.namespace=Lo.join("."),ci.rnamespace=ci.namespace?new RegExp("(^|\\.)"+Lo.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,ci.result=void 0,ci.target||(ci.target=xi),di=di==null?[ci]:pi.makeArray(di,[ci]),as=pi.event.special[gs]||{},!(!Ci&&as.trigger&&as.trigger.apply(xi,di)===!1))){if(!Ci&&!as.noBubble&&!sn(xi)){for(Sn=as.delegateType||gs,ou.test(Sn+gs)||(Pi=Pi.parentNode);Pi;Pi=Pi.parentNode)ns.push(Pi),Ui=Pi;Ui===(xi.ownerDocument||rs)&&ns.push(Ui.defaultView||Ui.parentWindow||ri)}for(Ii=0;(Pi=ns[Ii++])&&!ci.isPropagationStopped();)vs=Pi,ci.type=Ii>1?Sn:as.bindType||gs,Hn=(Jn.get(Pi,"events")||Object.create(null))[ci.type]&&Jn.get(Pi,"handle"),Hn&&Hn.apply(Pi,di),Hn=vn&&Pi[vn],Hn&&Hn.apply&&Ln(Pi)&&(ci.result=Hn.apply(Pi,di),ci.result===!1&&ci.preventDefault());return ci.type=gs,!Ci&&!ci.isDefaultPrevented()&&(!as._default||as._default.apply(ns.pop(),di)===!1)&&Ln(xi)&&vn&&qi(xi[gs])&&!sn(xi)&&(Ui=xi[vn],Ui&&(xi[vn]=null),pi.event.triggered=gs,ci.isPropagationStopped()&&vs.addEventListener(gs,fh),xi[gs](),ci.isPropagationStopped()&&vs.removeEventListener(gs,fh),pi.event.triggered=void 0,Ui&&(xi[vn]=Ui)),ci.result}},simulate:function(ci,di,xi){var Ci=pi.extend(new pi.Event,xi,{type:ci,isSimulated:!0});pi.event.trigger(Ci,null,di)}}),pi.fn.extend({trigger:function(ci,di){return this.each(function(){pi.event.trigger(ci,di,this)})},triggerHandler:function(ci,di){var xi=this[0];if(xi)return pi.event.trigger(ci,di,xi,!0)}});var cm=/\[\]$/,yu=/\r?\n/g,dh=/^(?:submit|button|image|reset|file)$/i,Bf=/^(?:input|select|textarea|keygen)/i;function au(ci,di,xi,Ci){var Ii;if(Array.isArray(di))pi.each(di,function(Pi,Ui){xi||cm.test(ci)?Ci(ci,Ui):au(ci+"["+(typeof Ui=="object"&&Ui!=null?Pi:"")+"]",Ui,xi,Ci)});else if(!xi&&yn(di)==="object")for(Ii in di)au(ci+"["+Ii+"]",di[Ii],xi,Ci);else Ci(ci,di)}pi.param=function(ci,di){var xi,Ci=[],Ii=function(Pi,Ui){var Sn=qi(Ui)?Ui():Ui;Ci[Ci.length]=encodeURIComponent(Pi)+"="+encodeURIComponent(Sn??"")};if(ci==null)return"";if(Array.isArray(ci)||ci.jquery&&!pi.isPlainObject(ci))pi.each(ci,function(){Ii(this.name,this.value)});else for(xi in ci)au(xi,ci[xi],di,Ii);return Ci.join("&")},pi.fn.extend({serialize:function(){return pi.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var ci=pi.prop(this,"elements");return ci?pi.makeArray(ci):this}).filter(function(){var ci=this.type;return this.name&&!pi(this).is(":disabled")&&Bf.test(this.nodeName)&&!dh.test(ci)&&(this.checked||!La.test(ci))}).map(function(ci,di){var xi=pi(this).val();return xi==null?null:Array.isArray(xi)?pi.map(xi,function(Ci){return{name:di.name,value:Ci.replace(yu,`\r
|
|||
|
`)}}):{name:di.name,value:xi.replace(yu,`\r
|
|||
|
`)}}).get()}});var df=/%20/g,wu=/#.*$/,xu=/([?&])_=[^&]*/,Nu=/^(.*?):[ \t]*([^\r\n]*)$/mg,ic=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Ad=/^(?:GET|HEAD)$/,Bu=/^\/\//,Hu={},Pc={},Dl="*/".concat("*"),$u=rs.createElement("a");$u.href=zl.href;function Td(ci){return function(di,xi){typeof di!="string"&&(xi=di,di="*");var Ci,Ii=0,Pi=di.toLowerCase().match(Xn)||[];if(qi(xi))for(;Ci=Pi[Ii++];)Ci[0]==="+"?(Ci=Ci.slice(1)||"*",(ci[Ci]=ci[Ci]||[]).unshift(xi)):(ci[Ci]=ci[Ci]||[]).push(xi)}}function Ld(ci,di,xi,Ci){var Ii={},Pi=ci===Pc;function Ui(Sn){var vn;return Ii[Sn]=!0,pi.each(ci[Sn]||[],function(Hn,as){var vs=as(di,xi,Ci);if(typeof vs=="string"&&!Pi&&!Ii[vs])return di.dataTypes.unshift(vs),Ui(vs),!1;if(Pi)return!(vn=vs)}),vn}return Ui(di.dataTypes[0])||!Ii["*"]&&Ui("*")}function Hf(ci,di){var xi,Ci,Ii=pi.ajaxSettings.flatOptions||{};for(xi in di)di[xi]!==void 0&&((Ii[xi]?ci:Ci||(Ci={}))[xi]=di[xi]);return Ci&&pi.extend(!0,ci,Ci),ci}function hh(ci,di,xi){for(var Ci,Ii,Pi,Ui,Sn=ci.contents,vn=ci.dataTypes;vn[0]==="*";)vn.shift(),Ci===void 0&&(Ci=ci.mimeType||di.getResponseHeader("Content-Type"));if(Ci){for(Ii in Sn)if(Sn[Ii]&&Sn[Ii].test(Ci)){vn.unshift(Ii);break}}if(vn[0]in xi)Pi=vn[0];else{for(Ii in xi){if(!vn[0]||ci.converters[Ii+" "+vn[0]]){Pi=Ii;break}Ui||(Ui=Ii)}Pi=Pi||Ui}if(Pi)return Pi!==vn[0]&&vn.unshift(Pi),xi[Pi]}function hf(ci,di,xi,Ci){var Ii,Pi,Ui,Sn,vn,Hn={},as=ci.dataTypes.slice();if(as[1])for(Ui in ci.converters)Hn[Ui.toLowerCase()]=ci.converters[Ui];for(Pi=as.shift();Pi;)if(ci.responseFields[Pi]&&(xi[ci.responseFields[Pi]]=di),!vn&&Ci&&ci.dataFilter&&(di=ci.dataFilter(di,ci.dataType)),vn=Pi,Pi=as.shift(),Pi){if(Pi==="*")Pi=vn;else if(vn!=="*"&&vn!==Pi){if(Ui=Hn[vn+" "+Pi]||Hn["* "+Pi],!Ui){for(Ii in Hn)if(Sn=Ii.split(" "),Sn[1]===Pi&&(Ui=Hn[vn+" "+Sn[0]]||Hn["* "+Sn[0]],Ui)){Ui===!0?Ui=Hn[Ii]:Hn[Ii]!==!0&&(Pi=Sn[0],as.unshift(Sn[1]));break}}if(Ui!==!0)if(Ui&&ci.throws)di=Ui(di);else try{di=Ui(di)}catch(vs){return{state:"parsererror",error:Ui?vs:"No conversion from "+vn+" to "+Pi}}}}return{state:"success",data:di}}pi.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:zl.href,type:"GET",isLocal:ic.test(zl.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Dl,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":pi.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(ci,di){return di?Hf(Hf(ci,pi.ajaxSettings),di):Hf(pi.ajaxSettings,ci)},ajaxPrefilter:Td(Hu),ajaxTransport:Td(Pc),ajax:function(ci,di){typeof ci=="object"&&(di=ci,ci=void 0),di=di||{};var xi,Ci,Ii,Pi,Ui,Sn,vn,Hn,as,vs,ns=pi.ajaxSetup({},di),gs=ns.context||ns,Lo=ns.context&&(gs.nodeType||gs.jquery)?pi(gs):pi.event,Ko=pi.Deferred(),Fo=pi.Callbacks("once memory"),Fa=ns.statusCode||{},Ba={},yc={},Kl="canceled",Bo={readyState:0,getResponseHeader:function(Xo){var Ma;if(vn){if(!Pi)for(Pi={};Ma=Nu.exec(Ii);)Pi[Ma[1].toLowerCase()+" "]=(Pi[Ma[1].toLowerCase()+" "]||[]).concat(Ma[2]);Ma=Pi[Xo.toLowerCase()+" "]}return Ma==null?null:Ma.join(", ")},getAllResponseHeaders:function(){return vn?Ii:null},setRequestHeader:function(Xo,Ma){return vn==null&&(Xo=yc[Xo.toLowerCase()]=yc[Xo.toLowerCase()]||Xo,Ba[Xo]=Ma),this},overrideMimeType:function(Xo){return vn==null&&(ns.mimeType=Xo),this},statusCode:function(Xo){var Ma;if(Xo)if(vn)Bo.always(Xo[Bo.status]);else for(Ma in Xo)Fa[Ma]=[Fa[Ma],Xo[Ma]];return this},abort:function(Xo){var Ma=Xo||Kl;return xi&&xi.abort(Ma),Ia(0,Ma),this}};if(Ko.promise(Bo),ns.url=((ci||ns.url||zl.href)+"").replace(Bu,zl.protocol+"//"),ns.type=di.method||di.type||ns.method||ns.type,ns.dataTypes=(ns.dataType||"*").toLowerCase().match(Xn)||[""],ns.crossDomain==null){Sn=rs.createElement("a");try{Sn.href=ns.url,Sn.href=Sn.href,ns.crossDomain=$u.protocol+"//"+$u.host!=Sn.protocol+"//"+Sn.ho
|
|||
|
(`+bn+": "+Zi+")");un.name="ChunkLoadError",un.code="CSS_CHUNK_LOAD_FAILED",un.type=bn,un.request=Zi,_n.parentNode&&_n.parentNode.removeChild(_n),tn(un)}};return _n.onerror=_n.onload=In,_n.href=yi,Li?Li.parentNode.insertBefore(_n,Li.nextSibling):document.head.appendChild(_n),_n},bi=function(ri,yi){for(var Li=document.getElementsByTagName("link"),Ji=0;Ji<Li.length;Ji++){var tn=Li[Ji],_n=tn.getAttribute("data-href")||tn.getAttribute("href");if(tn.rel==="stylesheet"&&(_n===ri||_n===yi))return tn}for(var In=document.getElementsByTagName("style"),Ji=0;Ji<In.length;Ji++){var tn=In[Ji],_n=tn.getAttribute("data-href");if(_n===ri||_n===yi)return tn}},wi=function(ri){return new Promise(function(yi,Li){var Ji=__webpack_require__.miniCssF(ri),tn=__webpack_require__.p+Ji;if(bi(Ji,tn))return yi();oi(ri,tn,null,yi,Li)})},vi={index:0};__webpack_require__.f.miniCss=function(ri,yi){var Li={katex:1,"asciinema-player":1,dropzone:1,monaco:1,"contributors-graph":1,"code-frequency-graph":1,"recent-commits-graph":1,colorpicker:1};vi[ri]?yi.push(vi[ri]):vi[ri]!==0&&Li[ri]&&yi.push(vi[ri]=wi(ri).then(function(){vi[ri]=0},function(Ji){throw delete vi[ri],Ji}))}}}(),function(){var oi={index:0};__webpack_require__.f.j=function(vi,ri){var yi=__webpack_require__.o(oi,vi)?oi[vi]:void 0;if(yi!==0)if(yi)ri.push(yi[2]);else{var Li=new Promise(function(In,Vn){yi=oi[vi]=[In,Vn]});ri.push(yi[2]=Li);var Ji=__webpack_require__.p+__webpack_require__.u(vi),tn=new Error,_n=function(In){if(__webpack_require__.o(oi,vi)&&(yi=oi[vi],yi!==0&&(oi[vi]=void 0),yi)){var Vn=In&&(In.type==="load"?"missing":In.type),bn=In&&In.target&&In.target.src;tn.message="Loading chunk "+vi+` failed.
|
|||
|
(`+Vn+": "+bn+")",tn.name="ChunkLoadError",tn.type=Vn,tn.request=bn,yi[1](tn)}};__webpack_require__.l(Ji,_n,"chunk-"+vi,vi)}};var bi=function(vi,ri){var yi=ri[0],Li=ri[1],Ji=ri[2],tn,_n,In=0;if(yi.some(function(bn){return oi[bn]!==0})){for(tn in Li)__webpack_require__.o(Li,tn)&&(__webpack_require__.m[tn]=Li[tn]);if(Ji)var Vn=Ji(__webpack_require__)}for(vi&&vi(ri);In<yi.length;In++)_n=yi[In],__webpack_require__.o(oi,_n)&&oi[_n]&&oi[_n][0](),oi[_n]=0},wi=self.webpackChunk=self.webpackChunk||[];wi.forEach(bi.bind(null,0)),wi.push=bi.bind(null,wi.push.bind(wi))}();var __webpack_exports__={};(function(){"use strict";var oi=__webpack_require__("./node_modules/jquery/dist/jquery.js");window.$=window.jQuery=oi})(),function(){(function(oi,bi,wi,vi){"use strict";oi.isWindow=oi.isWindow||function(ri){return ri!=null&&ri===ri.window},bi=typeof bi<"u"&&bi.Math==Math?bi:typeof self<"u"&&self.Math==Math?self:Function("return this")(),oi.api=oi.fn.api=function(ri){var yi=oi.isFunction(this)?oi(bi):oi(this),Li=yi.selector||"",Ji=new Date().getTime(),tn=[],_n=arguments[0],In=typeof _n=="string",Vn=[].slice.call(arguments,1),bn;return yi.each(function(){var Zi=oi.isPlainObject(ri)?oi.extend(!0,{},oi.fn.api.settings,ri):oi.extend({},oi.fn.api.settings),un=Zi.namespace,ls=Zi.metadata,ks=Zi.selector,En=Zi.error,qi=Zi.className,sn="."+un,rs="module-"+un,hs=oi(this),fs=hs.closest(ks.form),yn=Zi.stateContext?oi(Zi.stateContext):hs,mn,Mn,pi,rn,dn,pn=this,Pn=yn[0],nn=hs.data(rs),Ai;Ai={initialize:function(){In||Ai.bind.events(),Ai.instantiate()},instantiate:function(){Ai.verbose("Storing instance of module",Ai),nn=Ai,hs.data(rs,nn)},destroy:function(){Ai.verbose("Destroying previous module for",pn),hs.removeData(rs).off(sn)},bind:{events:function(){var Ri=Ai.get.event();Ri?(Ai.verbose("Attaching API events to element",Ri),hs.on(Ri+sn,Ai.event.trigger)):Zi.on=="now"&&(Ai.debug("Querying API endpoint immediately"),Ai.query())}},decode:{json:function(Ri){if(Ri!==vi&&typeof Ri=="string")try{Ri=JSON.parse(Ri)}catch{}return Ri}},read:{cachedResponse:function(Ri){var ki;if(bi.Storage===vi){Ai.error(En.noStorage);return}return ki=sessionStorage.getItem(Ri),Ai.debug("Using cached response",Ri,ki),ki=Ai.decode.json(ki),ki}},write:{cachedResponse:function(Ri,ki){if(ki&&ki===""){Ai.debug("Response empty, not caching",ki);return}if(bi.Storage===vi){Ai.error(En.noStorage);return}oi.isPlainObject(ki)&&(ki=JSON.stringify(ki)),sessionStorage.setItem(Ri,ki),Ai.verbose("Storing cached response for url",Ri,ki)}},query:function(){if(Ai.is.disabled()){Ai.debug("Element is disabled API request aborted");return}if(Ai.is.loading())if(Zi.interruptRequests)Ai.debug("Interrupting previous request"),Ai.abort();else{Ai.debug("Cancelling request, previous request is still pending");return}if(Zi.defaultData&&oi.extend(!0,Zi.urlData,Ai.get.defaultData()),Zi.serializeForm&&(Zi.data=Ai.add.formData(Zi.data)),Mn=Ai.get.settings(),Mn===!1){Ai.cancelled=!0,Ai.error(En.beforeSend);return}else Ai.cancelled=!1;if(pi=Ai.get.templatedURL(),!pi&&!Ai.is.mocked()){Ai.error(En.missingURL);return}if(pi=Ai.add.urlData(pi),!(!pi&&!Ai.is.mocked())){if(Mn.url=Zi.base+pi,mn=oi.extend(!0,{},Zi,{type:Zi.method||Zi.type,data:rn,url:Zi.base+pi,beforeSend:Zi.beforeXHR,success:function(){},failure:function(){},complete:function(){}}),Ai.debug("Querying URL",mn.url),Ai.verbose("Using AJAX settings",mn),Zi.cache==="local"&&Ai.read.cachedResponse(pi)){Ai.debug("Response returned from local cache"),Ai.request=Ai.create.request(),Ai.request.resolveWith(Pn,[Ai.read.cachedResponse(pi)]);return}Zi.throttle?!Zi.throttleFirstRequest&&!Ai.timer?(Ai.debug("Sending request",rn,mn.method),Ai.send.request(),Ai.timer=setTimeout(function(){},Zi.throttle)):(Ai.debug("Throttling request",Zi.throttle),clearTimeout(Ai.timer),Ai.timer=setTimeout(function(){Ai.timer&&delete Ai.timer,Ai.debug("Sending throttled request",rn,mn.method),Ai.send.request()},Zi.throttle)):(Ai.debug("Sending request",rn,mn.method),Ai.send.request())}},should:{removeError:function(){return Zi.hideError===!0||Zi.hideError==="auto"&&!Ai.is.form()}},is:{d
|
|||
|
`)}function _o(ei){if(mn(ei)){const ti={};for(let ii=0;ii<ei.length;ii++){const ni=ei[ii],si=Pn(ni)?ha(ni):_o(ni);if(si)for(const ai in si)ti[ai]=si[ai]}return ti}else if(Pn(ei)||Ai(ei))return ei}const pa=/;(?![^(]*\))/g,ka=/:([^]+)/,Aa=/\/\*[^]*?\*\//g;function ha(ei){const ti={};return ei.replace(Aa,"").split(pa).forEach(ii=>{if(ii){const ni=ii.split(ka);ni.length>1&&(ti[ni[0].trim()]=ni[1].trim())}}),ti}function sa(ei){let ti="";if(!ei||Pn(ei))return ti;for(const ii in ei){const ni=ei[ii];if(Pn(ni)||typeof ni=="number"){const si=ii.startsWith("--")?ii:Bi(ii);ti+=`${si}:${ni};`}}return ti}function Do(ei){let ti="";if(Pn(ei))ti=ei;else if(mn(ei))for(let ii=0;ii<ei.length;ii++){const ni=Do(ei[ii]);ni&&(ti+=ni+" ")}else if(Ai(ei))for(const ii in ei)ei[ii]&&(ti+=ii+" ");return ti.trim()}function ra(ei){if(!ei)return null;let{class:ti,style:ii}=ei;return ti&&!Pn(ti)&&(ei.class=Do(ti)),ii&&(ei.style=_o(ii)),ei}const rl="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",bl="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",nu="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",ec="area,base,br,col,embed,hr,img,input,link,meta,param,source,track,wbr",su=null,Ta=null,La=null,va=null,Ya="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",Zo=null,Da=Zi(Ya+",async,autofocus,autoplay,controls,default,defer,disabled,hidden,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected");function ru(ei){return!!ei||ei===""}const Go=/[>/="'\u0009\u000a\u000c\u0020]/,Rc={};function El(ei){if(Rc.hasOwnProperty(ei))return Rc[ei];const ti=Go.test(ei);return ti&&console.error(`unsafe attribute name: ${ei}`),Rc[ei]=!ti}const kl={acceptCharset:"accept-charset",className:"class",htmlFor:"for",httpEquiv:"http-equiv"},tc=null,Mc=null;function bc(ei){if(ei==null)return!1;const ti=typeof ei;return ti==="string"||ti==="number"||ti==="boolean"}const Yn=/["'&<>]/;function Ts(ei){const ti=""+ei,ii=Yn.exec(ti);if(!ii)return ti;let ni="",si,ai,li=0;for(ai=ii.index;ai<ti.length;ai++){switch(ti.charCodeAt(ai)){case 34:si=""";break;case 38:si="&";break;case 39:si="'";break;case 60:si="<";break;case 62:si=">";break;default:continue}li!==ai&&(ni+=ti.slice(li,ai)),li=ai+1,ni+=si}return li!==ai?ni+ti.slice(li,ai):ni}const Us=/^-?>|<!--|-->|--!>|<!-$/g;function mo(ei){return ei.replace(Us,"")}function ma(ei,ti){if(ei.length!==ti.length)return!1;let ii=!0;for(let ni=0;ii&&ni<ei.length;ni++)ii=ea(ei[ni],ti[ni]);return ii}function ea(ei,ti){if(ei===ti)return!0;let ii=rn(ei),ni=rn(ti);if(ii||ni)return ii&&ni?ei.getTime()===ti.getTime():!1;if(ii=nn(ei),ni=nn(ti),ii||ni)return ei===ti;if(ii
|
|||
|
`),si]);else{const ai=[`[Vue warn]: ${ei}`,...ti];si.length&&ai.push(`
|
|||
|
`,...mh(si)),console.warn(...ai)}Wa(),oc=!1}function Hc(){let ei=rc[rc.length-1];if(!ei)return[];const ti=[];for(;ei;){const ii=ti[0];ii&&ii.vnode===ei?ii.recurseCount++:ti.push({vnode:ei,recurseCount:0});const ni=ei.component&&ei.component.parent;ei=ni&&ni.vnode}return ti}function mh(ei){const ti=[];return ei.forEach((ii,ni)=>{ti.push(...ni===0?[]:[`
|
|||
|
`],...Wu(ii))}),ti}function Wu({vnode:ei,recurseCount:ti}){const ii=ti>0?`... (${ti} recursive calls)`:"",ni=ei.component?ei.component.parent==null:!1,si=` at <${Up(ei.component,ei.type,ni)}`,ai=">"+ii;return ei.props?[si,...zu(ei.props),ai]:[si+ai]}function zu(ei){const ti=[],ii=Object.keys(ei);return ii.slice(0,3).forEach(ni=>{ti.push(...lu(ni,ei[ni]))}),ii.length>3&&ti.push(" ..."),ti}function lu(ei,ti,ii){return Pn(ti)?(ti=JSON.stringify(ti),ii?ti:[`${ei}=${ti}`]):typeof ti=="number"||typeof ti=="boolean"||ti==null?ii?ti:[`${ei}=${ti}`]:Ia(ti)?(ti=lu(ei,gs(ti.value),!0),ii?ti:[`${ei}=Ref<`,ti,">"]):pn(ti)?[`${ei}=fn${ti.name?`<${ti.name}>`:""}`]:(ti=gs(ti),ii?ti:[`${ei}=`,ti])}function Wf(ei,ti){}const ph={SETUP_FUNCTION:0,0:"SETUP_FUNCTION",RENDER_FUNCTION:1,1:"RENDER_FUNCTION",WATCH_GETTER:2,2:"WATCH_GETTER",WATCH_CALLBACK:3,3:"WATCH_CALLBACK",WATCH_CLEANUP:4,4:"WATCH_CLEANUP",NATIVE_EVENT_HANDLER:5,5:"NATIVE_EVENT_HANDLER",COMPONENT_EVENT_HANDLER:6,6:"COMPONENT_EVENT_HANDLER",VNODE_HOOK:7,7:"VNODE_HOOK",DIRECTIVE_HOOK:8,8:"DIRECTIVE_HOOK",TRANSITION_HOOK:9,9:"TRANSITION_HOOK",APP_ERROR_HANDLER:10,10:"APP_ERROR_HANDLER",APP_WARN_HANDLER:11,11:"APP_WARN_HANDLER",FUNCTION_REF:12,12:"FUNCTION_REF",ASYNC_COMPONENT_LOADER:13,13:"ASYNC_COMPONENT_LOADER",SCHEDULER:14,14:"SCHEDULER",COMPONENT_UPDATE:15,15:"COMPONENT_UPDATE"},Ku={sp:"serverPrefetch hook",bc:"beforeCreate hook",c:"created hook",bm:"beforeMount hook",m:"mounted hook",bu:"beforeUpdate hook",u:"updated",bum:"beforeUnmount hook",um:"unmounted hook",a:"activated hook",da:"deactivated hook",ec:"errorCaptured hook",rtc:"renderTracked hook",rtg:"renderTriggered hook",0:"setup function",1:"render function",2:"watcher getter",3:"watcher callback",4:"watcher cleanup function",5:"native event handler",6:"component event handler",7:"vnode hook",8:"directive hook",9:"transition hook",10:"app errorHandler",11:"app warnHandler",12:"ref function",13:"async component loader",14:"scheduler flush",15:"component update"};function Pl(ei,ti,ii,ni){try{return ni?ei(...ni):ei()}catch(si){Su(si,ti,ii)}}function _l(ei,ti,ii,ni){if(pn(ei)){const si=Pl(ei,ti,ii,ni);return si&&Ri(si)&&si.catch(ai=>{Su(ai,ti,ii)}),si}if(mn(ei)){const si=[];for(let ai=0;ai<ei.length;ai++)si.push(_l(ei[ai],ti,ii,ni));return si}}function Su(ei,ti,ii,ni=!0){const si=ti?ti.vnode:null;if(ti){let ai=ti.parent;const li=ti.proxy,fi=`https://vuejs.org/error-reference/#runtime-${ii}`;for(;ai;){const _i=ai.ec;if(_i){for(let ji=0;ji<_i.length;ji++)if(_i[ji](ei,li,fi)===!1)return}ai=ai.parent}const hi=ti.appContext.config.errorHandler;if(hi){Eo(),Pl(hi,null,10,[ei,li,fi]),Wa();return}}zf(ei,ii,si,ni)}function zf(ei,ti,ii,ni=!0){console.error(ei)}let Cu=!1,fn=!1;const Rn=[];let Zn=0;const ss=[];let ps=null,Hs=0;const Jr=Promise.resolve();let lo=null;const Zr=100;function Wo(ei){const ti=lo||Jr;return ei?ti.then(this?ei.bind(this):ei):ti}function Ao(ei){let ti=Zn+1,ii=Rn.length;for(;ti<ii;){const ni=ti+ii>>>1,si=Rn[ni],ai=Ha(si);ai<ei||ai===ei&&si.pre?ti=ni+1:ii=ni}return ti}function ko(ei){(!Rn.length||!Rn.includes(ei,Cu&&ei.allowRecurse?Zn+1:Zn))&&(ei.id==null?Rn.push(ei):Rn.splice(Ao(ei.id),0,ei),No())}function No(){!Cu&&!fn&&(fn=!0,lo=Jr.then(Eu))}function ho(ei){const ti=Rn.indexOf(ei);ti>Zn&&Rn.splice(ti,1)}function oa(ei){mn(ei)?ss.push(...ei):(!ps||!ps.includes(ei,ei.allowRecurse?Hs+1:Hs))&&ss.push(ei),No()}function cl(ei,ti,ii=Cu?Zn+1:0){for(;ii<Rn.length;ii++){const ni=Rn[ii];if(ni&&ni.pre){if(ei&&ni.id!==ei.uid)continue;Rn.splice(ii,1),ii--,ni()}}}function Sa(ei){if(ss.length){const ti=[...new Set(ss)].sort((ii,ni)=>Ha(ii)-Ha(ni));if(ss.length=0,ps){ps.push(...ti);return}for(ps=ti,Hs=0;Hs<ps.length;Hs++){const ii=ps[Hs];ii.active!==!1&&ii()}ps=null,Hs=0}}const Ha=ei=>ei.id==null?1/0:ei.id,ac=(ei,ti)=>{const ii=Ha(ei)-Ha(ti);if(ii===0){if(ei.pre&&!ti.pre)return-1;if(ti.pre&&!ei.pre)return 1}return ii};function Eu(ei){fn=!1,Cu=!0,Rn.sort(ac);const ti=ks;try{for(Zn=0;Zn<Rn.length;Zn++){const ii=Rn[Zn];ii&&ii.active!==!1&&Pl(ii,ii.i,ii.i?15:14)}}finally{Zn=0,Rn.length=0,Sa(ei),Cu=!1,lo=null,(Rn.length||ss.length)
|
|||
|
- rendered on server: ${_i(fi)}
|
|||
|
- expected on client: ${_i(hi)}
|
|||
|
Note: this mismatch is check-only. The DOM will not be rectified in production due to performance overhead.
|
|||
|
You should fix the source of the mismatch.`;return ll(ji,ei,Mi),!0}return!1}function hv(ei){return new Set(ei.trim().split(/\s+/))}function ow(ei,ti){if(ei.size!==ti.size)return!1;for(const ii of ei)if(!ti.has(ii))return!1;return!0}function mv(ei){const ti=new Map;for(const ii of ei.split(";")){let[ni,si]=ii.split(":");ni=ni.trim(),si=si&&si.trim(),ni&&si&&ti.set(ni,si)}return ti}function aw(ei,ti){if(ei.size!==ti.size)return!1;for(const[ii,ni]of ei)if(ni!==ti.get(ii))return!1;return!0}function pv(ei,ti,ii){const ni=ei.subTree;if(ei.getCssVars&&(ti===ni||ni&&ni.type===xl&&ni.children.includes(ti))){const si=ei.getCssVars();for(const ai in si)ii.set(`--${ai}`,String(si[ai]))}ti===ni&&ei.parent&&pv(ei.parent,ei.vnode,ii)}let Oh,Ud;function O7(ei,ti){ei.appContext.config.performance&&gv()&&Ud.mark(`vue-${ti}-${ei.uid}`)}function D7(ei,ti){if(ei.appContext.config.performance&&gv()){const ii=`vue-${ti}-${ei.uid}`,ni=ii+":end";Ud.mark(ni),Ud.measure(`<${Up(ei,ei.type)}> ${ti}`,ii,ni),Ud.clearMarks(ii),Ud.clearMarks(ni)}}function gv(){return Oh!==void 0||(typeof window<"u"&&window.performance?(Oh=!0,Ud=window.performance):Oh=!1),Oh}function lw(){const ei=[]}const wl=kv;function F7(ei){return vv(ei)}function I7(ei){return vv(ei,rw)}function vv(ei,ti){lw();const ii=getGlobalThis();ii.__VUE__=!0;const{insert:ni,remove:si,patchProp:ai,createElement:li,createText:fi,createComment:hi,setText:_i,setElementText:ji,parentNode:Mi,nextSibling:Ki,setScopeId:on=NOOP,insertStaticContent:hn}=ei,gn=(jn,Nn,ms,Fs=null,Ls=null,Ps=null,Js=void 0,Xs=null,Zs=!!Nn.dynamicChildren)=>{if(jn===Nn)return;jn&&!mu(jn,Nn)&&(Fs=vc(jn),nl(jn,Ls,Ps,!0),jn=null),Nn.patchFlag===-2&&(Zs=!1,Nn.dynamicChildren=null);const{type:Ds,ref:ro,shapeFlag:vo}=Nn;switch(Ds){case xf:es(jn,Nn,ms,Fs);break;case dl:Wn(jn,Nn,ms,Fs);break;case zd:jn==null&&Gn(Nn,ms,Fs,Js);break;case xl:Yr(jn,Nn,ms,Fs,Ls,Ps,Js,Xs,Zs);break;default:vo&1?Kn(jn,Nn,ms,Fs,Ls,Ps,Js,Xs,Zs):vo&6?Co(jn,Nn,ms,Fs,Ls,Ps,Js,Xs,Zs):(vo&64||vo&128)&&Ds.process(jn,Nn,ms,Fs,Ls,Ps,Js,Xs,Zs,Tc)}ro!=null&&Ls&&Ws(ro,jn&&jn.ref,Ps,Nn||jn,!Nn)},es=(jn,Nn,ms,Fs)=>{if(jn==null)ni(Nn.el=fi(Nn.children),ms,Fs);else{const Ls=Nn.el=jn.el;Nn.children!==jn.children&&_i(Ls,Nn.children)}},Wn=(jn,Nn,ms,Fs)=>{jn==null?ni(Nn.el=hi(Nn.children||""),ms,Fs):Nn.el=jn.el},Gn=(jn,Nn,ms,Fs)=>{[jn.el,jn.anchor]=hn(jn.children,Nn,ms,Fs,jn.el,jn.anchor)},Dn=(jn,Nn,ms,Fs)=>{if(Nn.children!==jn.children){const Ls=Ki(jn.anchor);Bn(jn),[Nn.el,Nn.anchor]=hn(Nn.children,ms,Ls,Fs)}else Nn.el=jn.el,Nn.anchor=jn.anchor},Xi=({el:jn,anchor:Nn},ms,Fs)=>{let Ls;for(;jn&&jn!==Nn;)Ls=Ki(jn),ni(jn,ms,Fs),jn=Ls;ni(Nn,ms,Fs)},Bn=({el:jn,anchor:Nn})=>{let ms;for(;jn&&jn!==Nn;)ms=Ki(jn),si(jn),jn=ms;si(Nn)},Kn=(jn,Nn,ms,Fs,Ls,Ps,Js,Xs,Zs)=>{Nn.type==="svg"?Js="svg":Nn.type==="math"&&(Js="mathml"),jn==null?us(Nn,ms,Fs,Ls,Ps,Js,Xs,Zs):Cs(jn,Nn,Ls,Ps,Js,Xs,Zs)},us=(jn,Nn,ms,Fs,Ls,Ps,Js,Xs)=>{let Zs,Ds;const{props:ro,shapeFlag:vo,transition:po,dirs:Oo}=jn;if(Zs=jn.el=li(jn.type,Ps,ro&&ro.is,ro),vo&8?ji(Zs,jn.children):vo&16&&ws(jn.children,Zs,null,Fs,Ls,Op(jn,Ps),Js,Xs),Oo&&xc(jn,null,Fs,"created"),$s(Zs,jn,jn.scopeId,Js,Fs),ro){for(const wa in ro)wa!=="value"&&!isReservedProp(wa)&&ai(Zs,wa,null,ro[wa],Ps,Fs);"value"in ro&&ai(Zs,"value",null,ro.value,Ps),(Ds=ro.onVnodeBeforeMount)&&fc(Ds,Fs,jn)}Oo&&xc(jn,null,Fs,"beforeMount");const zo=bv(Ls,po);zo&&po.beforeEnter(Zs),ni(Zs,Nn,ms),((Ds=ro&&ro.onVnodeMounted)||zo||Oo)&&wl(()=>{Ds&&fc(Ds,Fs,jn),zo&&po.enter(Zs),Oo&&xc(jn,null,Fs,"mounted")},Ls)},$s=(jn,Nn,ms,Fs,Ls)=>{if(ms&&on(jn,ms),Fs)for(let Ps=0;Ps<Fs.length;Ps++)on(jn,Fs[Ps]);if(Ls){let Ps=Ls.subTree;if(Nn===Ps){const Js=Ls.vnode;$s(jn,Js,Js.scopeId,Js.slotScopeIds,Ls.parent)}}},ws=(jn,Nn,ms,Fs,Ls,Ps,Js,Xs,Zs=0)=>{for(let Ds=Zs;Ds<jn.length;Ds++){const ro=jn[Ds]=Xs?jf(jn[Ds]):Yl(jn[Ds]);gn(null,ro,Nn,ms,Fs,Ls,Ps,Js,Xs)}},Cs=(jn,Nn,ms,Fs,Ls,Ps,Js)=>{const Xs=Nn.el=jn.el;let{patchFlag:Zs,dynamicChildren:Ds,dirs:ro}=Nn;Zs|=jn.patchFlag&16;const vo=jn.props||EMPTY_OBJ,po=Nn.props||EMPTY_OBJ;let Oo;if(ms&&od(ms,!1),(Oo=po.onVnodeBeforeUpdate)&&fc(Oo,ms,Nn,jn),ro&&xc
|
|||
|
Expected function or array of functions, received type ${typeof ei}.`),NOOP)}function j1(ei,ti){if((0,yi.cy)(ti)){const ii=ei.stopImmediatePropagation;return ei.stopImmediatePropagation=()=>{ii.call(ei),ei._stopped=!0},ti.map(ni=>si=>!si._stopped&&ni&&ni(si))}else return ti}const o0=ei=>ei.charCodeAt(0)===111&&ei.charCodeAt(1)===110&&ei.charCodeAt(2)>96&&ei.charCodeAt(2)<123,S1=(ei,ti,ii,ni,si,ai,li,fi,hi)=>{const _i=si==="svg";ti==="class"?u1(ei,ni,_i):ti==="style"?h1(ei,ii,ni):(0,yi.Mp)(ti)?(0,yi.CP)(ti)||b1(ei,ti,ii,ni,li):(ti[0]==="."?(ti=ti.slice(1),!0):ti[0]==="^"?(ti=ti.slice(1),!1):C1(ei,ti,ni,_i))?g1(ei,ti,ni,ai,li,fi,hi):(ti==="true-value"?ei._trueValue=ni:ti==="false-value"&&(ei._falseValue=ni),p1(ei,ti,ni,_i))};function C1(ei,ti,ii,ni){if(ni)return!!(ti==="innerHTML"||ti==="textContent"||ti in ei&&o0(ti)&&(0,yi.Tn)(ii));if(ti==="spellcheck"||ti==="draggable"||ti==="translate"||ti==="form"||ti==="list"&&ei.tagName==="INPUT"||ti==="type"&&ei.tagName==="TEXTAREA")return!1;if(ti==="width"||ti==="height"){const si=ei.tagName;if(si==="IMG"||si==="VIDEO"||si==="CANVAS"||si==="SOURCE")return!1}return o0(ti)&&(0,yi.Kg)(ii)?!1:ti in ei}function E1(ei,ti){const ii=defineComponent(ei);class ni extends Yp{constructor(ai){super(ii,ai,ti)}}return ni.def=ii,ni}const mR=ei=>E1(ei,H1),k1=typeof HTMLElement<"u"?HTMLElement:class{};class Yp extends k1{constructor(ti,ii={},ni){super(),this._def=ti,this._props=ii,this._instance=null,this._connected=!1,this._resolved=!1,this._numberProps=null,this._ob=null,this.shadowRoot&&ni?ni(this._createVNode(),this.shadowRoot):(this.attachShadow({mode:"open"}),this._def.__asyncLoader||this._resolveProps(this._def))}connectedCallback(){this._connected=!0,this._instance||(this._resolved?this._update():this._resolveDef())}disconnectedCallback(){this._connected=!1,this._ob&&(this._ob.disconnect(),this._ob=null),(0,ri.dY)(()=>{this._connected||(y0(null,this.shadowRoot),this._instance=null)})}_resolveDef(){this._resolved=!0;for(let ni=0;ni<this.attributes.length;ni++)this._setAttr(this.attributes[ni].name);this._ob=new MutationObserver(ni=>{for(const si of ni)this._setAttr(si.attributeName)}),this._ob.observe(this,{attributes:!0});const ti=(ni,si=!1)=>{const{props:ai,styles:li}=ni;let fi;if(ai&&!(0,yi.cy)(ai))for(const hi in ai){const _i=ai[hi];(_i===Number||_i&&_i.type===Number)&&(hi in this._props&&(this._props[hi]=(0,yi.Ro)(this._props[hi])),(fi||(fi=Object.create(null)))[(0,yi.PT)(hi)]=!0)}this._numberProps=fi,si&&this._resolveProps(ni),this._applyStyles(li),this._update()},ii=this._def.__asyncLoader;ii?ii().then(ni=>ti(ni,!0)):ti(this._def)}_resolveProps(ti){const{props:ii}=ti,ni=(0,yi.cy)(ii)?ii:Object.keys(ii||{});for(const si of Object.keys(this))si[0]!=="_"&&ni.includes(si)&&this._setProp(si,this[si],!0,!1);for(const si of ni.map(yi.PT))Object.defineProperty(this,si,{get(){return this._getProp(si)},set(ai){this._setProp(si,ai)}})}_setAttr(ti){let ii=this.hasAttribute(ti)?this.getAttribute(ti):void 0;const ni=(0,yi.PT)(ti);this._numberProps&&this._numberProps[ni]&&(ii=(0,yi.Ro)(ii)),this._setProp(ni,ii,!1)}_getProp(ti){return this._props[ti]}_setProp(ti,ii,ni=!0,si=!0){ii!==this._props[ti]&&(this._props[ti]=ii,si&&this._instance&&this._update(),ni&&(ii===!0?this.setAttribute((0,yi.Tg)(ti),""):typeof ii=="string"||typeof ii=="number"?this.setAttribute((0,yi.Tg)(ti),ii+""):ii||this.removeAttribute((0,yi.Tg)(ti))))}_update(){y0(this._createVNode(),this.shadowRoot)}_createVNode(){const ti=(0,ri.bF)(this._def,(0,yi.X$)({},this._props));return this._instance||(ti.ce=ii=>{this._instance=ii,ii.isCE=!0;const ni=(ai,li)=>{this.dispatchEvent(new CustomEvent(ai,{detail:li}))};ii.emit=(ai,...li)=>{ni(ai,li),(0,yi.Tg)(ai)!==ai&&ni((0,yi.Tg)(ai),li)};let si=this;for(;si=si&&(si.parentNode||si.host);)if(si instanceof Yp){ii.parent=si._instance,ii.provides=si._instance.provides;break}}),ti}_applyStyles(ti){ti&&ti.forEach(ii=>{const ni=document.createElement("style");ni.textContent=ii,this.shadowRoot.appendChild(ni)})}}function pR(ei="$style"){{const ti=getCurrentInstance();if(!ti)return EMPTY_OBJ;const ii=t
|
|||
|
otherwise if the "input" handles click event for intermediate status, it breaks the internal state`),(0,ri.Lk)("input",(0,ri.v6)({type:"checkbox",class:"hidden"},ei.checkboxArchivedFilterProps),null,16),(0,ri.Lk)("label",null,[(0,ri.bF)(li,{name:"octicon-archive",size:16,"class-name":"tw-mr-1"}),(0,ri.eW)(" "+(0,yi.v_)(ei.textShowArchived),1)])],8,ix)]),(0,ri.Lk)("a",{class:"item",onClick:ti[6]||(ti[6]=fi=>ei.togglePrivateFilter())},[(0,ri.Lk)("div",{class:"ui checkbox",ref:"checkboxPrivateFilter",title:ei.checkboxPrivateFilterTitle},[(0,ri.Lk)("input",(0,ri.v6)({type:"checkbox",class:"hidden"},ei.checkboxPrivateFilterProps),null,16),(0,ri.Lk)("label",null,[(0,ri.bF)(li,{name:"octicon-lock",size:16,"class-name":"tw-mr-1"}),(0,ri.eW)(" "+(0,yi.v_)(ei.textShowPrivate),1)])],8,nx)])])],8,ex)]),(0,ri.Lk)("overflow-menu",sx,[(0,ri.Lk)("div",rx,[(0,ri.Lk)("a",{class:(0,yi.C4)(["item",{active:ei.reposFilter==="all"}]),tabindex:"0",onClick:ti[7]||(ti[7]=fi=>ei.changeReposFilter("all"))},[(0,ri.eW)((0,yi.v_)(ei.textAll)+" ",1),(0,ri.bo)((0,ri.Lk)("div",{class:"ui circular mini grey label"},(0,yi.v_)(ei.repoTypeCount),513),[[Jl,ei.reposFilter==="all"]])],2),(0,ri.Lk)("a",{class:(0,yi.C4)(["item",{active:ei.reposFilter==="sources"}]),tabindex:"0",onClick:ti[8]||(ti[8]=fi=>ei.changeReposFilter("sources"))},[(0,ri.eW)((0,yi.v_)(ei.textSources)+" ",1),(0,ri.bo)((0,ri.Lk)("div",{class:"ui circular mini grey label"},(0,yi.v_)(ei.repoTypeCount),513),[[Jl,ei.reposFilter==="sources"]])],2),(0,ri.Lk)("a",{class:(0,yi.C4)(["item",{active:ei.reposFilter==="forks"}]),tabindex:"0",onClick:ti[9]||(ti[9]=fi=>ei.changeReposFilter("forks"))},[(0,ri.eW)((0,yi.v_)(ei.textForks)+" ",1),(0,ri.bo)((0,ri.Lk)("div",{class:"ui circular mini grey label"},(0,yi.v_)(ei.repoTypeCount),513),[[Jl,ei.reposFilter==="forks"]])],2),ei.isMirrorsEnabled?((0,ri.uX)(),(0,ri.CE)("a",{key:0,class:(0,yi.C4)(["item",{active:ei.reposFilter==="mirrors"}]),tabindex:"0",onClick:ti[10]||(ti[10]=fi=>ei.changeReposFilter("mirrors"))},[(0,ri.eW)((0,yi.v_)(ei.textMirrors)+" ",1),(0,ri.bo)((0,ri.Lk)("div",{class:"ui circular mini grey label"},(0,yi.v_)(ei.repoTypeCount),513),[[Jl,ei.reposFilter==="mirrors"]])],2)):(0,ri.Q3)("v-if",!0),(0,ri.Lk)("a",{class:(0,yi.C4)(["item",{active:ei.reposFilter==="collaborative"}]),tabindex:"0",onClick:ti[11]||(ti[11]=fi=>ei.changeReposFilter("collaborative"))},[(0,ri.eW)((0,yi.v_)(ei.textCollaborative)+" ",1),(0,ri.bo)((0,ri.Lk)("div",{class:"ui circular mini grey label"},(0,yi.v_)(ei.repoTypeCount),513),[[Jl,ei.reposFilter==="collaborative"]])],2)])])]),ei.repos.length?((0,ri.uX)(),(0,ri.CE)("div",ox,[(0,ri.Lk)("ul",ax,[((0,ri.uX)(!0),(0,ri.CE)(ri.FK,null,(0,ri.pI)(ei.repos,(fi,hi)=>((0,ri.uX)(),(0,ri.CE)("li",{class:(0,yi.C4)(["tw-flex tw-items-center tw-py-2",{active:hi===ei.activeIndex}]),key:fi.id},[(0,ri.Lk)("a",{class:"repo-list-link muted",href:fi.link},[(0,ri.bF)(li,{name:ei.repoIcon(fi),size:16,"class-name":"repo-list-icon"},null,8,["name"]),(0,ri.Lk)("div",cx,(0,yi.v_)(fi.full_name),1),fi.archived?((0,ri.uX)(),(0,ri.CE)("div",ux,[(0,ri.bF)(li,{name:"octicon-archive",size:16})])):(0,ri.Q3)("v-if",!0)],8,lx),fi.latest_commit_status_state?((0,ri.uX)(),(0,ri.CE)("a",{key:0,class:"tw-flex tw-items-center",href:fi.latest_commit_status_state_link,"data-tooltip-content":fi.locale_latest_commit_status_state},[(0,ri.Q3)(" the commit status icon logic is taken from templates/repo/commit_status.tmpl "),(0,ri.bF)(li,{name:ei.statusIcon(fi.latest_commit_status_state),"class-name":"tw-ml-2 commit-status icon text "+ei.statusColor(fi.latest_commit_status_state),size:16},null,8,["name","class-name"])],8,fx)):(0,ri.Q3)("v-if",!0)],2))),128))]),ei.showMoreReposLink?((0,ri.uX)(),(0,ri.CE)("div",dx,[hx,(0,ri.Lk)("div",mx,[(0,ri.Lk)("a",{class:(0,yi.C4)(["item navigation tw-py-1",{disabled:ei.page===1}]),onClick:ti[12]||(ti[12]=fi=>ei.changePage(1)),title:ei.textFirstPage},[(0,ri.bF)(li,{name:"gitea-double-chevron-left",size:16,"class-name":"tw-mr-1"})],10,px),(0,ri.Lk)("a",{class:(0,yi.C4)(["item navigation tw-py-1",{disabled:ei.page==
|
|||
|
%ctippy.js
|
|||
|
|
|||
|
%c`+ab(ei)+`
|
|||
|
|
|||
|
%c\u{1F477}\u200D This is a development-only message. It will be removed in production.
|
|||
|
`)}function lb(ei){return[ej(ei),"color: #00C584; font-size: 1.3em; font-weight: bold;","line-height: 1.5","color: #a6a095;"]}var Jh;function AR(){Jh=new Set}function tj(ei,ti){if(ei&&!Jh.has(ti)){var ii;Jh.add(ti),(ii=console).warn.apply(ii,lb(ti))}}function cb(ei,ti){if(ei&&!Jh.has(ti)){var ii;Jh.add(ti),(ii=console).error.apply(ii,lb(ti))}}function TR(ei){var ti=!ei,ii=Object.prototype.toString.call(ei)==="[object Object]"&&!ei.addEventListener;cb(ti,["tippy() was passed","`"+String(ei)+"`","as its targets (first) argument. Valid types are: String, Element,","Element[], or NodeList."].join(" ")),cb(ii,["tippy() was passed a plain object which is not supported as an argument","for virtual positioning. Use props.getReferenceClientRect instead."].join(" "))}var ub={animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},ij={allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999},pc=Object.assign({appendTo:Q0,aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},ub,ij),nj=Object.keys(pc),sj=function(ti){var ii=Object.keys(ti);ii.forEach(function(ni){pc[ni]=ti[ni]})};function fb(ei){var ti=ei.plugins||[],ii=ti.reduce(function(ni,si){var ai=si.name,li=si.defaultValue;if(ai){var fi;ni[ai]=ei[ai]!==void 0?ei[ai]:(fi=pc[ai])!=null?fi:li}return ni},{});return Object.assign({},ei,ii)}function rj(ei,ti){var ii=ti?Object.keys(fb(Object.assign({},pc,{plugins:ti}))):nj,ni=ii.reduce(function(si,ai){var li=(ei.getAttribute("data-tippy-"+ai)||"").trim();if(!li)return si;if(ai==="content")si[ai]=li;else try{si[ai]=JSON.parse(li)}catch{si[ai]=li}return si},{});return ni}function db(ei,ti){var ii=Object.assign({},ti,{content:Y0(ti.content,[ei])},ti.ignoreAttributes?{}:rj(ei,ti.plugins));return ii.aria=Object.assign({},pc.aria,ii.aria),ii.aria={expanded:ii.aria.expanded==="auto"?ti.interactive:ii.aria.expanded,content:ii.aria.content==="auto"?ti.interactive?null:"describedby":ii.aria.content},ii}function LR(ei,ti){ei===void 0&&(ei={}),ti===void 0&&(ti=[]);var ii=Object.keys(ei);ii.forEach(function(ni){var si=ug(pc,Object.keys(ub)),ai=!V5(si,ni);ai&&(ai=ti.filter(function(li){return li.name===ni}).length===0),tj(ai,["`"+ni+"`","is not a valid prop. You may have spelled it incorrectly, or if it's","a plugin, forgot to pass it in an array as props.plugins.",`
|
|||
|
|
|||
|
`,`All props: https://atomiks.github.io/tippyjs/v6/all-props/
|
|||
|
`,"Plugins: https://atomiks.github.io/tippyjs/v6/plugins/"].join(" "))})}var oj=function(){return"innerHTML"};function mg(ei,ti){ei[oj()]=ti}function hb(ei){var ti=md();return ei===!0?ti.className=X0:(ti.className=G0,zm(ei)?ti.appendChild(ei):mg(ti,ei)),ti}function mb(ei,ti){zm(ti.content)?(mg(ei,""),ei.appendChild(ti.content)):typeof ti.content!="function"&&(ti.allowHTML?mg(ei,ti.content):ei.textContent=ti.content)}function Km(ei){var ti=ei.firstElementChild,ii=th(ti.children);return{box:ti,content:ii.find(function(ni){return ni.classList.contains(z0)}),arrow:ii.find(function(ni){return ni.classList.contains(X0)||ni.classList.contains(G0)}),backdrop:ii.find(function(ni){return ni.classList.contains(K0)})}}function pb(ei){var ti=md(),ii=md();ii.className=$5,ii.setAttribute("data-state","hidden"),ii.setAttribute("tabindex","-1");var ni=md();ni.className=z0,ni.setAttribute("data-state","hidden"),mb(ni,ei.props),ti.appendChild(ii),ii.appendChild(ni),si(ei.props,ei.props);function si(ai,li){var fi=Km(ti),hi=fi.box,_i=fi.content,ji=fi.arrow;li.theme?hi.setAttribute("data-theme",li.theme):hi.removeAttribute("data-theme"),typeof li.animation=="string"?hi.setAttribute("data-animation",li.animation):hi.removeAttribute("data-animation"),li.inertia?hi.setAttribute("data-inertia",""):hi.removeAttribute("data-inertia"),hi.style.maxWidth=typeof li.maxWidth=="number"?li.maxWidth+"px":li.maxWidth,li.role?hi.setAttribute("role",li.role):hi.removeAttribute("role"),(ai.content!==li.content||ai.allowHTML!==li.allowHTML)&&mb(_i,ei.props),li.arrow?ji?ai.arrow!==li.arrow&&(hi.removeChild(ji),hi.appendChild(hb(li.arrow))):hi.appendChild(hb(li.arrow)):ji&&hi.removeChild(ji)}return{popper:ti,onUpdate:si}}pb.$$tippy=!0;var aj=1,Xm=[],Gm=[];function lj(ei,ti){var ii=db(ei,Object.assign({},pc,fb(tb(ti)))),ni,si,ai,li=!1,fi=!1,hi=!1,_i=!1,ji,Mi,Ki,on=[],hn=J0(jn,ii.interactiveDebounce),gn,es=aj++,Wn=null,Gn=W5(ii.plugins),Dn={isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},Xi={id:es,reference:ei,popper:md(),popperInstance:Wn,props:ii,state:Dn,plugins:Gn,clearDelayTimeouts:po,setProps:Oo,setContent:zo,show:wa,hide:da,hideWithInteractivity:sl,enable:ro,disable:vo,unmount:Lc,destroy:Pf};if(!ii.render)return Xi;var Bn=ii.render(Xi),Kn=Bn.popper,us=Bn.onUpdate;Kn.setAttribute("data-tippy-root",""),Kn.id="tippy-"+Xi.id,Xi.popper=Kn,ei._tippy=Xi,Kn._tippy=Xi;var $s=Gn.map(function(ys){return ys.fn(Xi)}),ws=ei.hasAttribute("aria-expanded");return Tc(),Oa(),xo(),to("onCreate",[Xi]),ii.showOnCreate&&Zs(),Kn.addEventListener("mouseenter",function(){Xi.props.interactive&&Xi.state.isVisible&&Xi.clearDelayTimeouts()}),Kn.addEventListener("mouseleave",function(){Xi.props.interactive&&Xi.props.trigger.indexOf("mouseenter")>=0&&Co().addEventListener("mousemove",hn)}),Xi;function Cs(){var ys=Xi.props.touch;return Array.isArray(ys)?ys:[ys,0]}function zs(){return Cs()[0]==="hold"}function Es(){var ys;return!!((ys=Xi.props.render)!=null&&ys.$$tippy)}function Yr(){return gn||ei}function Co(){var ys=Yr().parentNode;return ys?nb(ys):document}function Ho(){return Km(Kn)}function Qr(ys){return Xi.state.isMounted&&!Xi.state.isVisible||Ou.isTouch||ji&&ji.type==="focus"?0:lg(Xi.props.delay,ys?0:1,pc.delay)}function xo(ys){ys===void 0&&(ys=!1),Kn.style.pointerEvents=Xi.props.interactive&&!ys?"":"none",Kn.style.zIndex=""+Xi.props.zIndex}function to(ys,co,Ro){if(Ro===void 0&&(Ro=!0),$s.forEach(function($o){$o[ys]&&$o[ys].apply($o,co)}),Ro){var Uo;(Uo=Xi.props)[ys].apply(Uo,co)}}function ao(){var ys=Xi.props.aria;if(ys.content){var co="aria-"+ys.content,Ro=Kn.id,Uo=Lf(Xi.props.triggerTarget||ei);Uo.forEach(function($o){var Cl=$o.getAttribute(co);if(Xi.state.isVisible)$o.setAttribute(co,Cl?Cl+" "+Ro:Ro);else{var iu=Cl&&Cl.replace(Ro,"").trim();iu?$o.setAttribute(co,iu):$o.removeAttribute(co)}})}}function Oa(){if(!(ws||!Xi.props.aria.expanded)){var ys=Lf(Xi.props.triggerTarget||ei);ys.forEach(function(co){Xi.props.interactive?co.setAttribute("aria-expanded",Xi.state.isVisible&&co===Yr()?"true":"false"):co.removeAttribute("aria-expanded")})}}function Sl(){Co().remove
|
|||
|
<div class='toast-icon'>${(0,Io.JW)(fi)}</div>
|
|||
|
<div class='toast-body'>${ai?ei:Ua(ei)}</div>
|
|||
|
<button class='toast-close'>${(0,Io.JW)("octicon-x")}</button>
|
|||
|
`,escapeMarkup:!1,gravity:ii??"top",position:ni??"center",duration:si??_i,style:{background:hi},...li});return ji.showToast(),ji.toastElement.querySelector(".toast-close").addEventListener("click",()=>ji.hideToast()),ji}function BR(ei,ti){return Cg(ei,"info",ti)}function HR(ei,ti){return Cg(ei,"warning",ti)}function pl(ei,ti){return Cg(ei,"error",ti)}const{appSubUrl:VS}=window.config;let $b,Vb,Ub,Wb;function US(ei,ti,ii,ni){let si=Hi(".content-history-detail-dialog");si.length||(si=Hi(`
|
|||
|
<div class="ui modal content-history-detail-dialog">
|
|||
|
${(0,Io.JW)("octicon-x",16,"close icon inside")}
|
|||
|
<div class="header tw-flex tw-items-center tw-justify-between">
|
|||
|
<div>${ni}</div>
|
|||
|
<div class="ui dropdown dialog-header-options tw-mr-8 tw-hidden">
|
|||
|
${Vb}
|
|||
|
${(0,Io.JW)("octicon-triangle-down",14,"dropdown icon")}
|
|||
|
<div class="menu">
|
|||
|
<div class="item red text" data-option-item="delete">${Ub}</div>
|
|||
|
</div>
|
|||
|
</div>
|
|||
|
</div>
|
|||
|
<div class="comment-diff-data is-loading"></div>
|
|||
|
</div>`),si.appendTo(Hi("body")),si.find(".dialog-header-options").dropdown({showOnFocus:!1,allowReselection:!0,async onChange(ai,li,fi){const hi=fi.data("option-item");if(hi==="delete"){if(window.confirm(Wb))try{const _i=new URLSearchParams;_i.append("comment_id",ti),_i.append("history_id",ii);const Mi=await(await(0,so.LO)(`${ei}/content-history/soft-delete?${_i.toString()}`)).json();Mi.ok?si.modal("hide"):pl(Mi.message)}catch(_i){console.error("Error:",_i),pl("An error occurred while deleting the history.")}}else pl(`unknown option item: ${hi}`)},onHide(){Hi(this).dropdown("clear",!0)}}),si.modal({async onShow(){try{const ai=new URLSearchParams;ai.append("comment_id",ti),ai.append("history_id",ii);const li=`${ei}/content-history/detail?${ai.toString()}`,hi=await(await(0,so.fG)(li)).json(),_i=si.find(".comment-diff-data")[0];_i?.classList.remove("is-loading"),_i.innerHTML=hi.diffHtml,hi.canSoftDelete&&(0,zn.fi)(si.find(".dialog-header-options"))}catch(ai){console.error("Error:",ai)}},onHidden(){si.remove()}}).modal("show"))}function zb(ei,ti,ii){const ni=ti.find(".comment-header-left"),si=`
|
|||
|
<div class="ui dropdown interact-fg content-history-menu" data-comment-id="${ii}">
|
|||
|
• ${$b}${(0,Io.JW)("octicon-triangle-down",14,"dropdown icon")}
|
|||
|
<div class="menu">
|
|||
|
</div>
|
|||
|
</div>`;ni.find(".content-history-menu").remove(),ni.append(Hi(si)),ni.find(".dropdown").dropdown({action:"hide",apiSettings:{cache:!1,url:`${ei}/content-history/list?comment_id=${ii}`},saveRemoteData:!1,onHide(){Hi(this).dropdown("change values",null)},onChange(ai,li,fi){ai&&!fi.find("[data-history-is-deleted=1]").length&&US(ei,ii,ai,li)}})}async function Kb(){const ei=Hi("#issueIndex").val();if(!ei)return;const ti=Hi(".repository.issue .timeline-item.comment.first"),ii=Hi(".repository.issue .comment-list .comment");if(!ti.length&&!ii.length)return;const ni=Hi("#repolink").val(),si=`${VS}/${ni}/issues/${ei}`;try{const li=await(await(0,so.fG)(`${si}/content-history/overview`)).json();$b=li.i18n.textEdited,Ub=li.i18n.textDeleteFromHistory,Wb=li.i18n.textDeleteFromHistoryConfirm,Vb=li.i18n.textOptions,li.editedHistoryCountMap[0]&&ti.length&&zb(si,ti,"0");for(const[fi,hi]of Object.entries(li.editedHistoryCountMap)){if(fi==="0")continue;const _i=Hi(`#issuecomment-${fi}`);zb(si,_i,fi)}}catch(ai){console.error("Error:",ai)}}const{appSubUrl:Eg,notificationSettings:ih,enableTimeTracking:WS,assetVersionEncoded:zS}=window.config;function KS(){if(!WS)return;const ei=document.querySelectorAll(".active-stopwatch"),ti=document.querySelector(".active-stopwatch-popup");if(!ei.length||!ti)return;const ii=ei[0]?.getAttribute("data-seconds");ii&&Gb(parseInt(ii));for(const ai of ei)ai.removeAttribute("href"),pd(ai,{content:ti.cloneNode(!0),placement:"bottom-end",trigger:"click",maxWidth:"none",interactive:!0,hideOnClick:!0,theme:"default"});let ni=!1;const si=ai=>{ai<=0||!Number.isFinite(ai)||(ni=!0,setTimeout(()=>XS(si,ai),ai))};if(ih.EventSourceUpdateTime>0&&window.EventSource&&window.SharedWorker){const ai=new SharedWorker(`${__webpack_require__.p}js/eventsource.sharedworker.js?v=${zS}`,"notification-worker");ai.addEventListener("error",li=>{console.error("worker error",li)}),ai.port.addEventListener("messageerror",()=>{console.error("unable to deserialize message")}),ai.port.postMessage({type:"start",url:`${window.location.origin}${Eg}/user/events`}),ai.port.addEventListener("message",li=>{if(!li.data||!li.data.type){console.error("unknown worker message event",li);return}if(li.data.type==="stopwatches")Xb(JSON.parse(li.data.data));else if(li.data.type==="no-event-source")ni||si(ih.MinTimeout);else if(li.data.type==="error")console.error("worker port event error",li.data);else if(li.data.type==="logout"){if(li.data.data!=="here")return;ai.port.postMessage({type:"close"}),ai.port.close(),Ib()}else li.data.type==="close"&&(ai.port.postMessage({type:"close"}),ai.port.close())}),ai.port.addEventListener("error",li=>{console.error("worker port error",li)}),ai.port.start(),window.addEventListener("beforeunload",()=>{ai.port.postMessage({type:"close"}),ai.port.close()});return}si(ih.MinTimeout)}async function XS(ei,ti){await GS()?ti<ih.MaxTimeout&&(ti+=ih.TimeoutStep):ti=ih.MinTimeout,ei(ti)}async function GS(){const ei=await(0,so.fG)(`${Eg}/user/stopwatches`);if(!ei.ok)return console.error("Failed to fetch stopwatch data"),!1;const ti=await ei.json();return Xb(ti)}function Xb(ei){const ti=ei[0],ii=document.querySelectorAll(".active-stopwatch");if(!ti)(0,zn.y9)(ii);else{const{repo_owner_name:ni,repo_name:si,issue_index:ai,seconds:li}=ti,fi=`${Eg}/${ni}/${si}/issues/${ai}`;document.querySelector(".stopwatch-link")?.setAttribute("href",fi),document.querySelector(".stopwatch-commit")?.setAttribute("action",`${fi}/times/stopwatch/toggle`),document.querySelector(".stopwatch-cancel")?.setAttribute("action",`${fi}/times/stopwatch/cancel`);const hi=document.querySelector(".stopwatch-issue");hi&&(hi.textContent=`${ni}/${si}#${ai}`),Gb(li),(0,zn.fi)(ii)}return!!ei.length}function Gb(ei){if(!Number.isFinite(ei))return;const ti=new Date(Date.now()-ei*1e3).toISOString();for(const ii of document.querySelectorAll(".header-stopwatch-dot")){const ni=ii.querySelector(":scope > relative-time");if(ni)ni.setAttribute("datetime",ti);else{const si=document.createElement("relative-time");si.setAttribute("format","micro"),si.setAttribute("datetime",ti),si.setAttrib
|
|||
|
body {margin: 0; padding: 0; overflow: hidden}
|
|||
|
#mermaid {display: block; margin: 0 auto}
|
|||
|
blockquote, dd, dl, figure, h1, h2, h3, h4, h5, h6, hr, p, pre {margin: 0}`;async function sC(){const ei=document.querySelectorAll(".markup code.language-mermaid");if(!ei.length)return;const{default:ti}=await __webpack_require__.e("mermaid").then(__webpack_require__.bind(__webpack_require__,"./node_modules/mermaid/dist/mermaid.core.mjs"));ti.initialize({startOnLoad:!1,theme:(0,na.g4)()?"dark":"neutral",securityLevel:"strict"});for(const ii of ei){const ni=ii.closest("pre");if(ni.hasAttribute("data-render-done"))continue;const si=ii.textContent;if(Ag>=0&&si.length>Ag){tm(ni,new Error(`Mermaid source of ${si.length} characters exceeds the maximum allowed length of ${Ag}.`));continue}try{await ti.parse(si)}catch(ai){tm(ni,ai);continue}try{const{svg:ai}=await ti.render("mermaid",si),li=document.createElement("iframe");li.classList.add("markup-render","tw-invisible"),li.srcdoc=`<html><head><style>${nC}</style></head><body>${ai}</body></html>`;const fi=document.createElement("div");fi.classList.add("mermaid-block","is-loading","tw-hidden"),fi.append(li);const hi=i_();hi.setAttribute("data-clipboard-text",si),fi.append(hi),li.addEventListener("load",()=>{ni.replaceWith(fi),fi.classList.remove("tw-hidden"),li.style.height=`${li.contentWindow.document.body.clientHeight}px`,setTimeout(()=>{fi.classList.remove("is-loading"),li.classList.remove("tw-invisible")},0)}),document.body.append(fi)}catch(ai){tm(ni,ai)}}}function rC(ei){return ei.classList.contains("is-loading")?ei:ei.closest("pre")}async function oC(){const ei=document.querySelectorAll(".markup code.language-math");if(!ei.length)return;const[{default:ti}]=await Promise.all([Promise.all([__webpack_require__.e("katex-"),__webpack_require__.e("katex")]).then(__webpack_require__.bind(__webpack_require__,"./node_modules/katex/dist/katex.mjs")),Promise.all([__webpack_require__.e("katex-"),__webpack_require__.e("katex")]).then(__webpack_require__.bind(__webpack_require__,"./node_modules/katex/dist/katex.css"))]),ii=1e3,ni=25,si=1e3;for(const ai of ei){const li=rC(ai);if(li.hasAttribute("data-render-done"))continue;const fi=ai.textContent;if(fi.length>ii){tm(li,new Error(`Math source of ${fi.length} characters exceeds the maximum allowed length of ${ii}.`));continue}const hi=ai.classList.contains("display"),_i=hi?"p":"span";try{const ji=document.createElement(_i);ti.render(fi,ji,{maxSize:ni,maxExpand:si,displayMode:hi}),li.replaceWith(ji)}catch(ji){tm(li,ji)}}}async function aC(){const ei=document.querySelectorAll(".asciinema-player-container");if(!ei.length)return;const[ti]=await Promise.all([__webpack_require__.e("asciinema-player").then(__webpack_require__.bind(__webpack_require__,"./node_modules/asciinema-player/dist/index.js")),__webpack_require__.e("asciinema-player").then(__webpack_require__.bind(__webpack_require__,"./node_modules/asciinema-player/dist/bundle/asciinema-player.css"))]);for(const ii of ei)ti.create(ii.getAttribute("data-asciinema-player-src"),ii,{poster:"npt:1:0:0"})}const n_=ei=>ei.preventDefault();function lC(){for(const ei of document.querySelectorAll(".markup[data-can-edit=true]")||[]){const ti=ei.parentNode,ii=ei.querySelectorAll(".task-list-item input[type=checkbox]");for(const ni of ii){if(ni.hasAttribute("data-editable"))return;ni.setAttribute("data-editable","true"),ni.addEventListener("input",async()=>{const si=ni.checked?"x":" ",ai=parseInt(ni.getAttribute("data-source-position"))+1,li=ti.querySelector(".raw-content"),fi=li.textContent,hi=new TextEncoder,_i=hi.encode(fi);if(_i[ai-1]!=="[".codePointAt(0)||_i[ai]!==" ".codePointAt(0)&&_i[ai]!=="x".codePointAt(0)||_i[ai+1]!=="]".codePointAt(0))throw ni.checked=!ni.checked,new Error(`Expected position to be space or x and surrounded by brackets, but it's not: position=${ai}`);_i.set(hi.encode(si),ai);const ji=new TextDecoder().decode(_i);if(ji!==fi){for(const Mi of ii)Mi.addEventListener("click",n_);try{const Mi=ti.querySelector(".edit-content-zone"),Ki=Mi.getAttribute("data-update-url"),on=Mi.getAttribute("data-context"),hn=new FormData;hn.append("ignore_attachments","true"),hn.append("content",ji),h
|
|||
|
<a role="button" class="ui basic button pdf-fallback-button" href="[url]">${si}</a>
|
|||
|
`}),ii.classList.remove("is-loading")}}(function(ei){ei.fn.areYouSure=function(ti){var ii=ei.extend({message:"You have unsaved changes!",dirtyClass:"dirty",change:null,silent:!1,addRemoveFieldsMarksDirty:!1,fieldEvents:"change keyup propertychange input",fieldSelector:":input:not(input[type=submit]):not(input[type=button])"},ti),ni=function(ji){if(ji.hasClass("ays-ignore")||ji.hasClass("aysIgnore")||ji.attr("data-ays-ignore")||ji.attr("name")===void 0)return null;if(ji.is(":disabled"))return"ays-disabled";var Mi,Ki=ji.attr("type");switch(ji.is("select")&&(Ki="select"),Ki){case"checkbox":case"radio":Mi=ji.is(":checked");break;case"select":Mi="",ji.find("option").each(function(on){var hn=ei(this);hn.is(":selected")&&(Mi+=hn.val())});break;default:Mi=ji.val()}return Mi},si=function(ji){ji.data("ays-orig",ni(ji))},ai=function(ji){var Mi=function(es){var Wn=es.data("ays-orig");return Wn===void 0?!1:ni(es)!=Wn},Ki=ei(this).is("form")?ei(this):ei(this).parents("form");if(Mi(ei(ji.target))){fi(Ki,!0);return}const on=Ki.find(ii.fieldSelector);if(ii.addRemoveFieldsMarksDirty){var hn=Ki.data("ays-orig-field-count");if(hn!=on.length){fi(Ki,!0);return}}var gn=!1;on.each(function(){var es=ei(this);if(Mi(es))return gn=!0,!1}),fi(Ki,gn)},li=function(ji){var Mi=ji.find(ii.fieldSelector);ei(Mi).each(function(){si(ei(this))}),ei(Mi).unbind(ii.fieldEvents,ai),ei(Mi).bind(ii.fieldEvents,ai),ji.data("ays-orig-field-count",ei(Mi).length),fi(ji,!1)},fi=function(ji,Mi){var Ki=Mi!=ji.hasClass(ii.dirtyClass);ji.toggleClass(ii.dirtyClass,Mi),Ki&&(ii.change&&ii.change.call(ji,ji),Mi&&ji.trigger("dirty.areYouSure",[ji]),Mi||ji.trigger("clean.areYouSure",[ji]),ji.trigger("change.areYouSure",[ji]))},hi=function(){var ji=ei(this),Mi=ji.find(ii.fieldSelector);ei(Mi).each(function(){var Ki=ei(this);Ki.data("ays-orig")||(si(Ki),Ki.bind(ii.fieldEvents,ai))}),ji.trigger("checkform.areYouSure")},_i=function(){li(ei(this))};return!ii.silent&&!window.aysUnloadSet&&(window.aysUnloadSet=!0,ei(window).bind("beforeunload",function(){if(ei("form").filter("."+ii.dirtyClass).length!=0){if(navigator.userAgent.toLowerCase().match(/msie|chrome/)){if(window.aysHasPrompted)return;window.aysHasPrompted=!0,window.setTimeout(function(){window.aysHasPrompted=!1},900)}return ii.message}})),this.each(function(ji){if(ei(this).is("form")){var Mi=ei(this);Mi.submit(function(){Mi.removeClass(ii.dirtyClass)}),Mi.bind("reset",function(){fi(Mi,!1)}),Mi.bind("rescan.areYouSure",hi),Mi.bind("reinitialize.areYouSure",_i),Mi.bind("checkform.areYouSure",ai),li(Mi)}})}})(jQuery);async function r_(ei,ti){const[{Dropzone:ii}]=await Promise.all([__webpack_require__.e("dropzone").then(__webpack_require__.bind(__webpack_require__,"./node_modules/dropzone/dist/dropzone.mjs")),__webpack_require__.e("dropzone").then(__webpack_require__.bind(__webpack_require__,"./node_modules/dropzone/dist/dropzone.css"))]);return new ii(ei,ti)}function ep(ei){let ti=ei.closest("form");return ti?(ti.checkValidity()?ti.dispatchEvent(new SubmitEvent("submit",{bubbles:!0,cancelable:!0})):ti.reportValidity(),!0):(ti=ei.closest(".ui.form"),ti?(ti.querySelector(".ui.primary.button")?.click(),!0):!1)}const{i18n:o_}=window.config;function a_(ei,{confirmButtonColor:ti="primary"}={}){return new Promise(ii=>{const ni=(0,zn.SL)(`
|
|||
|
<div class="ui g-modal-confirm modal">
|
|||
|
<div class="content">${Ua(ei)}</div>
|
|||
|
<div class="actions">
|
|||
|
<button class="ui cancel button">${(0,Io.JW)("octicon-x")} ${Ua(o_.modal_cancel)}</button>
|
|||
|
<button class="ui ${ti} ok button">${(0,Io.JW)("octicon-check")} ${Ua(o_.modal_confirm)}</button>
|
|||
|
</div>
|
|||
|
</div>
|
|||
|
`);document.body.append(ni);const si=Hi(ni);si.modal({onApprove(){ii(!0)},onHidden(){si.remove(),ii(!1)}}).modal("show")})}var l_=__webpack_require__("./node_modules/htmx.org/dist/htmx.min.js"),$R=__webpack_require__("./node_modules/idiomorph/dist/idiomorph-ext.js");l_.config.requestClass="is-loading",l_.config.scrollIntoViewOnBoost=!1,document.body.addEventListener("htmx:sendError",ei=>{pl(`Network error when calling ${ei.detail.requestConfig.path}`)}),document.body.addEventListener("htmx:responseError",ei=>{pl(`Error ${ei.detail.xhr.status} when calling ${ei.detail.requestConfig.path}`)});const{appUrl:Tg,appSubUrl:uC,csrfToken:fC,i18n:Lg}=window.config;function dC(){Hi(".user.signin").length||Hi("form:not(.ignore-dirty)").areYouSure()}function hC(){const ei=document.getElementById("navbar"),ti=document.getElementById("navbar-expand-toggle");!ei||!ti||ti.addEventListener("click",()=>{const ii=ti.classList.contains("active");ei.classList.toggle("navbar-menu-open",!ii),ti.classList.toggle("active",!ii)})}function mC(){async function ei(){const ti=Hi(this);await(0,so.fG)(ti.data("url")),window.location.reload()}Hi(".language-menu a[lang]").on("click",ei)}function pC(){document.addEventListener("keydown",ei=>{if(ei.key!=="Enter")return;(ei.ctrlKey||ei.metaKey)&&!ei.altKey&&ei.target.matches("textarea")?ep(ei.target)&&ei.preventDefault():ei.target.matches("input")&&!ei.target.closest("form")&&ep(ei.target)&&ei.preventDefault()})}function gC(){Hi(document).on("keypress","div.ui.button,span.ui.button",ei=>{(ei.code===" "||ei.code==="Enter")&&(Hi(ei.target).trigger("click"),ei.preventDefault())})}function vC(ei){const ti=document.createElement("form"),ii=document.createElement("input");ti.method="post",ti.action=`${uC}/-/fetch-redirect`,ii.type="hidden",ii.name="redirect",ii.value=ei,ti.append(ii),document.body.append(ti),ti.submit()}async function c_(ei,ti,ii){try{const ni=await(0,so.Em)(ti,ii);if(ni.status===200){let{redirect:si}=await ni.json();si=si||ei.getAttribute("data-redirect"),ei.classList.remove("dirty"),si?vC(si):window.location.reload();return}else if(ni.status>=400&&ni.status<500){const si=await ni.json();si.errorMessage?pl(si.errorMessage,{useHtmlBody:si.renderFormat==="html"}):pl(`server error: ${ni.status}`)}else pl(`server error: ${ni.status}`)}catch(ni){ni.name!=="AbortError"&&(console.error("error when doRequest",ni),pl(`${Lg.network_error} ${ni}`))}ei.classList.remove("is-loading","loading-icon-2px")}async function bC(ei){if(!ei.target.classList.contains("form-fetch-action"))return;ei.preventDefault();const ti=ei.target;if(ti.classList.contains("is-loading"))return;ti.classList.add("is-loading"),ti.clientHeight<50&&ti.classList.add("loading-icon-2px");const ii=ti.getAttribute("method")||"get",ni=ti.getAttribute("action"),si=new FormData(ti),ai=(0,zn.IU)(ei),[li,fi]=[ai?.getAttribute("name"),ai?.getAttribute("value")];li&&si.append(li,fi||"");let hi=ni;const _i={method:ii.toUpperCase()};if(ii.toLowerCase()==="get"){const ji=new URLSearchParams;for(const[Ki,on]of si)ji.append(Ki,on.toString());const Mi=hi.indexOf("?");Mi!==-1&&(hi=hi.slice(0,Mi)),hi+=`?${ji.toString()}`}else _i.body=si;await c_(ti,hi,_i)}function _C(){const ei=Hi(".ui.dropdown");ei.filter(":not(.custom)").dropdown(),ei.filter(".jump").dropdown({action:"hide",onShow(){this._tippy?.hide(),this._tippy?.disable()},onHide(){this._tippy?.enable(),setTimeout(()=>{Hi(this).dropdown("is hidden")&&Hi(this).find(".menu > .item").each((ii,ni)=>{ni._tippy?.hide()})},2e3)}}),ei.filter(".upward").dropdown("setting","direction","upward"),ei.filter(".downward").dropdown("setting","direction","downward"),Hi(".tabular.menu .item").tab(),(0,zn.Gz)(),document.addEventListener("submit",bC),document.addEventListener("click",wC)}function yC(){for(const ei of document.querySelectorAll(".dropzone"))Rg(ei)}function Rg(ei){const ti=Hi(ei),ii=r_(ei,{url:ti.data("upload-url"),headers:{"X-Csrf-Token":fC},maxFiles:ti.data("max-file"),maxFilesize:ti.data("max-size"),acceptedFiles:["*/*",""].includes(ti.data("accepts"))?null:ti.data("accepts"),addRemoveLinks:!0,dictDefau
|
|||
|
Mismatched ROOT_URL config causes wrong URL links for web UI/mail content/webhook notification/OAuth2 sign-in.`,"warning")}function CC(){const ei=document.getElementById("oauth2-login-navigator");if(!ei)return;const ti=document.getElementById("oauth2-login-navigator-inner");u_();for(const ii of ei.querySelectorAll(".oauth-login-link"))ii.addEventListener("click",()=>{ti.classList.add("tw-invisible"),ei.classList.add("is-loading"),setTimeout(()=>{ei.classList.remove("is-loading"),ti.classList.remove("tw-invisible")},5e3)})}function nh(ei,ti,ii){ti.innerHTML=(0,Io.JW)(`octicon-chevron-${ii?"right":"down"}`,18),ei.setAttribute("data-folded",ii),ii&&ei.getBoundingClientRect().top<0&&ei.scrollIntoView()}function EC(ei,ti){nh(ei,ti,ei.getAttribute("data-folded")!=="true")}var f_=function(ei,ti,ii,ni){if(ii==="a"&&!ni)throw new TypeError("Private accessor was defined without a getter");if(typeof ti=="function"?ei!==ti||!ni:!ti.has(ei))throw new TypeError("Cannot read private member from an object whose class did not declare it");return ii==="m"?ni:ii==="a"?ni.call(ei):ni?ni.value:ti.get(ei)},tp,Mg;const kC=["[data-md-button]","md-header","md-bold","md-italic","md-quote","md-code","md-link","md-image","md-unordered-list","md-ordered-list","md-task-list","md-mention","md-ref","md-strikethrough"];function d_(ei){const ti=[];for(const ii of ei.querySelectorAll(kC.join(", ")))ii.hidden||ii.offsetWidth<=0&&ii.offsetHeight<=0||ii.closest("markdown-toolbar")===ei&&ti.push(ii);return ti}function h_(ei){return function(ti){(ti.key===" "||ti.key==="Enter")&&ei(ti)}}const Zl=new WeakMap,AC={"header-1":{prefix:"# "},"header-2":{prefix:"## "},"header-3":{prefix:"### "},"header-4":{prefix:"#### "},"header-5":{prefix:"##### "},"header-6":{prefix:"###### "},bold:{prefix:"**",suffix:"**",trimFirst:!0},italic:{prefix:"_",suffix:"_",trimFirst:!0},quote:{prefix:"> ",multiline:!0,surroundWithNewlines:!0},code:{prefix:"`",suffix:"`",blockPrefix:"```",blockSuffix:"```"},link:{prefix:"[",suffix:"](url)",replaceNext:"url",scanFor:"https?://"},image:{prefix:"![",suffix:"](url)",replaceNext:"url",scanFor:"https?://"},"unordered-list":{prefix:"- ",multiline:!0,unorderedList:!0},"ordered-list":{prefix:"1. ",multiline:!0,orderedList:!0},"task-list":{prefix:"- [ ] ",multiline:!0,surroundWithNewlines:!0},mention:{prefix:"@",prefixSpace:!0},ref:{prefix:"#",prefixSpace:!0},strikethrough:{prefix:"~~",suffix:"~~",trimFirst:!0}};class kc extends HTMLElement{constructor(){super();const ti=ii=>{const ni=Zl.get(this);ni&&(ii.preventDefault(),Fg(this,ni))};this.addEventListener("keydown",h_(ti)),this.addEventListener("click",ti)}connectedCallback(){this.hasAttribute("role")||this.setAttribute("role","button")}click(){const ti=Zl.get(this);ti&&Fg(this,ti)}}class m_ extends kc{constructor(){super(...arguments),tp.add(this)}connectedCallback(){const ti=parseInt(this.getAttribute("level")||"3",10);f_(this,tp,"m",Mg).call(this,ti)}static get observedAttributes(){return["level"]}attributeChangedCallback(ti,ii,ni){if(ti!=="level")return;const si=parseInt(ni||"3",10);f_(this,tp,"m",Mg).call(this,si)}}tp=new WeakSet,Mg=function(ti){if(ti<1||ti>6)return;const ii=`${"#".repeat(ti)} `;Zl.set(this,{prefix:ii})},window.customElements.get("md-header")||(window.MarkdownHeaderButtonElement=m_,window.customElements.define("md-header",m_));class p_ extends kc{connectedCallback(){Zl.set(this,{prefix:"**",suffix:"**",trimFirst:!0})}}window.customElements.get("md-bold")||(window.MarkdownBoldButtonElement=p_,window.customElements.define("md-bold",p_));class g_ extends kc{connectedCallback(){Zl.set(this,{prefix:"_",suffix:"_",trimFirst:!0})}}window.customElements.get("md-italic")||(window.MarkdownItalicButtonElement=g_,window.customElements.define("md-italic",g_));class v_ extends kc{connectedCallback(){Zl.set(this,{prefix:"> ",multiline:!0,surroundWithNewlines:!0})}}window.customElements.get("md-quote")||(window.MarkdownQuoteButtonElement=v_,window.customElements.define("md-quote",v_));class b_ extends kc{connectedCallback(){Zl.set(this,{prefix:"`",suffix:"`",blockPrefix:"```",blockSuffix:"
|
|||
|
`).length>1}function M_(ei,ti){return Array(ti+1).join(ei)}function TC(ei,ti){let ii=ti;for(;ei[ii]&&ei[ii-1]!=null&&!ei[ii-1].match(/\s/);)ii--;return ii}function LC(ei,ti,ii){let ni=ti;const si=ii?/\n/:/\s/;for(;ei[ni]&&!ei[ni].match(si);)ni++;return ni}let _d=null;function RC(ei,{text:ti,selectionStart:ii,selectionEnd:ni}){const si=ei.selectionStart,ai=ei.value.slice(0,si),li=ei.value.slice(ei.selectionEnd);if(_d===null||_d===!0){ei.contentEditable="true";try{_d=document.execCommand("insertText",!1,ti)}catch{_d=!1}ei.contentEditable="false"}if(_d&&!ei.value.slice(0,ei.selectionStart).endsWith(ti)&&(_d=!1),!_d){try{document.execCommand("ms-beginUndoUnit")}catch{}ei.value=ai+ti+li;try{document.execCommand("ms-endUndoUnit")}catch{}ei.dispatchEvent(new CustomEvent("input",{bubbles:!0,cancelable:!0}))}ii!=null&&ni!=null?ei.setSelectionRange(ii,ni):ei.setSelectionRange(si,ei.selectionEnd)}function MC(ei,ti){const ii=ei.value.slice(ei.selectionStart,ei.selectionEnd);let ni;ti.orderedList||ti.unorderedList?ni=qC(ei,ti):ti.multiline&&Og(ii)?ni=IC(ei,ti):ni=FC(ei,ti),RC(ei,ni)}function OC(ei){const ti=ei.value.split(`
|
|||
|
`);let ii=0;for(let ni=0;ni<ti.length;ni++){const si=ti[ni].length+1;ei.selectionStart>=ii&&ei.selectionStart<ii+si&&(ei.selectionStart=ii),ei.selectionEnd>=ii&&ei.selectionEnd<ii+si&&(ei.selectionEnd=ii+si-1),ii+=si}}function DC(ei,ti,ii,ni=!1){if(ei.selectionStart===ei.selectionEnd)ei.selectionStart=TC(ei.value,ei.selectionStart),ei.selectionEnd=LC(ei.value,ei.selectionEnd,ni);else{const si=ei.selectionStart-ti.length,ai=ei.selectionEnd+ii.length,li=ei.value.slice(si,ei.selectionStart)===ti,fi=ei.value.slice(ei.selectionEnd,ai)===ii;li&&fi&&(ei.selectionStart=si,ei.selectionEnd=ai)}return ei.value.slice(ei.selectionStart,ei.selectionEnd)}function Dg(ei){const ti=ei.value.slice(0,ei.selectionStart),ii=ei.value.slice(ei.selectionEnd),ni=ti.match(/\n*$/),si=ii.match(/^\n*/),ai=ni?ni[0].length:0,li=si?si[0].length:0;let fi,hi;return ti.match(/\S/)&&ai<2&&(fi=M_(`
|
|||
|
`,2-ai)),ii.match(/\S/)&&li<2&&(hi=M_(`
|
|||
|
`,2-li)),fi==null&&(fi=""),hi==null&&(hi=""),{newlinesToAppend:fi,newlinesToPrepend:hi}}function FC(ei,ti){let ii,ni;const{prefix:si,suffix:ai,blockPrefix:li,blockSuffix:fi,replaceNext:hi,prefixSpace:_i,scanFor:ji,surroundWithNewlines:Mi}=ti,Ki=ei.selectionStart,on=ei.selectionEnd;let hn=ei.value.slice(ei.selectionStart,ei.selectionEnd),gn=Og(hn)&&li.length>0?`${li}
|
|||
|
`:si,es=Og(hn)&&fi.length>0?`
|
|||
|
${fi}`:ai;if(_i){const Xi=ei.value[ei.selectionStart-1];ei.selectionStart!==0&&Xi!=null&&!Xi.match(/\s/)&&(gn=` ${gn}`)}hn=DC(ei,gn,es,ti.multiline);let Wn=ei.selectionStart,Gn=ei.selectionEnd;const Dn=hi.length>0&&es.indexOf(hi)>-1&&hn.length>0;if(Mi){const Xi=Dg(ei);ii=Xi.newlinesToAppend,ni=Xi.newlinesToPrepend,gn=ii+si,es+=ni}if(hn.startsWith(gn)&&hn.endsWith(es)){const Xi=hn.slice(gn.length,hn.length-es.length);if(Ki===on){let Bn=Ki-gn.length;Bn=Math.max(Bn,Wn),Bn=Math.min(Bn,Wn+Xi.length),Wn=Gn=Bn}else Gn=Wn+Xi.length;return{text:Xi,selectionStart:Wn,selectionEnd:Gn}}else if(Dn)if(ji.length>0&&hn.match(ji)){es=es.replace(hi,hn);const Xi=gn+es;return Wn=Gn=Wn+gn.length,{text:Xi,selectionStart:Wn,selectionEnd:Gn}}else{const Xi=gn+hn+es;return Wn=Wn+gn.length+hn.length+es.indexOf(hi),Gn=Wn+hi.length,{text:Xi,selectionStart:Wn,selectionEnd:Gn}}else{let Xi=gn+hn+es;Wn=Ki+gn.length,Gn=on+gn.length;const Bn=hn.match(/^\s*|\s*$/g);if(ti.trimFirst&&Bn){const Kn=Bn[0]||"",us=Bn[1]||"";Xi=Kn+gn+hn.trim()+es+us,Wn+=Kn.length,Gn-=us.length}return{text:Xi,selectionStart:Wn,selectionEnd:Gn}}}function IC(ei,ti){const{prefix:ii,suffix:ni,surroundWithNewlines:si}=ti;let ai=ei.value.slice(ei.selectionStart,ei.selectionEnd),li=ei.selectionStart,fi=ei.selectionEnd;const hi=ai.split(`
|
|||
|
`);if(hi.every(ji=>ji.startsWith(ii)&&ji.endsWith(ni)))ai=hi.map(ji=>ji.slice(ii.length,ji.length-ni.length)).join(`
|
|||
|
`),fi=li+ai.length;else if(ai=hi.map(ji=>ii+ji+ni).join(`
|
|||
|
`),si){const{newlinesToAppend:ji,newlinesToPrepend:Mi}=Dg(ei);li+=ji.length,fi=li+ai.length,ai=ji+ai+Mi}return{text:ai,selectionStart:li,selectionEnd:fi}}function O_(ei){const ti=ei.split(`
|
|||
|
`),ii=/^\d+\.\s+/,ni=ti.every(ai=>ii.test(ai));let si=ti;return ni&&(si=ti.map(ai=>ai.replace(ii,""))),{text:si.join(`
|
|||
|
`),processed:ni}}function D_(ei){const ti=ei.split(`
|
|||
|
`),ii="- ",ni=ti.every(ai=>ai.startsWith(ii));let si=ti;return ni&&(si=ti.map(ai=>ai.slice(ii.length,ai.length))),{text:si.join(`
|
|||
|
`),processed:ni}}function im(ei,ti){return ti?"- ":`${ei+1}. `}function PC(ei,ti){let ii,ni,si;return ei.orderedList?(ni=O_(ti),ii=D_(ni.text),si=ii.text):(ni=D_(ti),ii=O_(ni.text),si=ii.text),[ni,ii,si]}function qC(ei,ti){const ii=ei.selectionStart===ei.selectionEnd;let ni=ei.selectionStart,si=ei.selectionEnd;OC(ei);const ai=ei.value.slice(ei.selectionStart,ei.selectionEnd),[li,fi,hi]=PC(ti,ai),_i=hi.split(`
|
|||
|
`).map((gn,es)=>`${im(es,ti.unorderedList)}${gn}`),ji=_i.reduce((gn,es,Wn)=>gn+im(Wn,ti.unorderedList).length,0),Mi=_i.reduce((gn,es,Wn)=>gn+im(Wn,!ti.unorderedList).length,0);if(li.processed)return ii?(ni=Math.max(ni-im(0,ti.unorderedList).length,0),si=ni):(ni=ei.selectionStart,si=ei.selectionEnd-ji),{text:hi,selectionStart:ni,selectionEnd:si};const{newlinesToAppend:Ki,newlinesToPrepend:on}=Dg(ei),hn=Ki+_i.join(`
|
|||
|
`)+on;return ii?(ni=Math.max(ni+im(0,ti.unorderedList).length+Ki.length,0),si=ni):fi.processed?(ni=Math.max(ei.selectionStart+Ki.length,0),si=ei.selectionEnd+Ki.length+ji-Mi):(ni=Math.max(ei.selectionStart+Ki.length,0),si=ei.selectionEnd+Ki.length+ji),{text:hn,selectionStart:ni,selectionEnd:si}}function Fg(ei,ti){const ii=ei.closest("markdown-toolbar");if(!(ii instanceof ip))return;const si=Object.assign(Object.assign({},{prefix:"",suffix:"",blockPrefix:"",blockSuffix:"",multiline:!1,replaceNext:"",prefixSpace:!1,scanFor:"",surroundWithNewlines:!1,orderedList:!1,unorderedList:!1,trimFirst:!1}),ti),ai=ii.field;ai&&(ai.focus(),MC(ai,si))}var VR=null;class NC{constructor(ti,ii,{tabInsertsSuggestions:ni,defaultFirstOption:si,scrollIntoViewOptions:ai}={}){this.input=ti,this.list=ii,this.tabInsertsSuggestions=ni??!0,this.defaultFirstOption=si??!1,this.scrollIntoViewOptions=ai??{block:"nearest",inline:"nearest"},this.isComposing=!1,ii.id||(ii.id=`combobox-${Math.random().toString().slice(2,6)}`),this.ctrlBindings=!!navigator.userAgent.match(/Macintosh/),this.keyboardEventHandler=li=>BC(li,this),this.compositionEventHandler=li=>VC(li,this),this.inputHandler=this.clearSelection.bind(this),ti.setAttribute("role","combobox"),ti.setAttribute("aria-controls",ii.id),ti.setAttribute("aria-expanded","false"),ti.setAttribute("aria-autocomplete","list"),ti.setAttribute("aria-haspopup","listbox")}destroy(){this.clearSelection(),this.stop(),this.input.removeAttribute("role"),this.input.removeAttribute("aria-controls"),this.input.removeAttribute("aria-expanded"),this.input.removeAttribute("aria-autocomplete"),this.input.removeAttribute("aria-haspopup")}start(){this.input.setAttribute("aria-expanded","true"),this.input.addEventListener("compositionstart",this.compositionEventHandler),this.input.addEventListener("compositionend",this.compositionEventHandler),this.input.addEventListener("input",this.inputHandler),this.input.addEventListener("keydown",this.keyboardEventHandler),this.list.addEventListener("click",F_),this.indicateDefaultOption()}stop(){this.clearSelection(),this.input.setAttribute("aria-expanded","false"),this.input.removeEventListener("compositionstart",this.compositionEventHandler),this.input.removeEventListener("compositionend",this.compositionEventHandler),this.input.removeEventListener("input",this.inputHandler),this.input.removeEventListener("keydown",this.keyboardEventHandler),this.list.removeEventListener("click",F_)}indicateDefaultOption(){var ti;this.defaultFirstOption&&((ti=Array.from(this.list.querySelectorAll('[role="option"]:not([aria-disabled="true"])')).filter(Ig)[0])===null||ti===void 0||ti.setAttribute("data-combobox-option-default","true"))}navigate(ti=1){const ii=Array.from(this.list.querySelectorAll('[aria-selected="true"]')).filter(Ig)[0],ni=Array.from(this.list.querySelectorAll('[role="option"]')).filter(Ig),si=ni.indexOf(ii);if(si===ni.length-1&&ti===1||si===0&&ti===-1){this.clearSelection(),this.input.focus();return}let ai=ti===1?0:ni.length-1;if(ii&&si>=0){const fi=si+ti;fi>=0&&fi<ni.length&&(ai=fi)}const li=ni[ai];if(li)for(const fi of ni)fi.removeAttribute("data-combobox-option-default"),li===fi?(this.input.setAttribute("aria-activedescendant",li.id),li.setAttribute("aria-selected","true"),$C(li),li.scrollIntoView(this.scrollIntoViewOptions)):fi.removeAttribute("aria-selected")}clearSelection(){this.input.removeAttribute("aria-activedescendant");for(const ti of this.list.querySelectorAll('[aria-selected="true"]'))ti.removeAttribute("aria-selected");this.indicateDefaultOption()}}function BC(ei,ti){if(!(ei.shiftKey||ei.metaKey||ei.altKey)&&!(!ti.ctrlBindings&&ei.ctrlKey)&&!ti.isComposing)switch(ei.key){case"Enter":I_(ti.input,ti.list)&&ei.preventDefault();break;case"Tab":ti.tabInsertsSuggestions&&I_(ti.input,ti.list)&&ei.preventDefault();break;case"Escape":ti.clearSelection();break;case"ArrowDown":ti.navigate(1),ei.preventDefault();break;case"ArrowUp":ti.navigate(-1),ei.preventDefault();break;case"n":ti.ctrlBindings&&ei.ctrlKey&&(ti.navigate(1),ei.preventDefault());break;case"p":ti.ctrlBindings&&ei.ctrl
|
|||
|
`,ii-1)>li||ei.lastIndexOf(".",ii-1)>li)return}else if(ei.lastIndexOf(" ",ii-1)>li)return;const fi=ei[li-1];return fi&&!UC.test(fi)?void 0:{text:ei.substring(li+ti.length,ii),position:li+ti.length}}const zC=["position:absolute;","overflow:auto;","word-wrap:break-word;","top:0px;","left:-9999px;"],P_=["box-sizing","font-family","font-size","font-style","font-variant","font-weight","height","letter-spacing","line-height","max-height","min-height","padding-bottom","padding-left","padding-right","padding-top","border-bottom","border-left","border-right","border-top","text-decoration","text-indent","text-transform","width","word-spacing"],q_=new WeakMap;function KC(ei,ti){const ii=ei.nodeName.toLowerCase();if(ii!=="textarea"&&ii!=="input")throw new Error("expected textField to a textarea or input");let ni=q_.get(ei);if(ni&&ni.parentElement===ei.parentElement)ni.innerHTML="";else{ni=document.createElement("div"),q_.set(ei,ni);const fi=window.getComputedStyle(ei),hi=zC.slice(0);ii==="textarea"?hi.push("white-space:pre-wrap;"):hi.push("white-space:nowrap;");for(let _i=0,ji=P_.length;_i<ji;_i++){const Mi=P_[_i];hi.push(`${Mi}:${fi.getPropertyValue(Mi)};`)}ni.style.cssText=hi.join(" ")}const si=document.createElement("span");si.style.cssText="position: absolute;",si.innerHTML=" ";let ai,li;if(typeof ti=="number"){let fi=ei.value.substring(0,ti);fi&&(ai=document.createTextNode(fi)),fi=ei.value.substring(ti),fi&&(li=document.createTextNode(fi))}else{const fi=ei.value;fi&&(ai=document.createTextNode(fi))}if(ai&&ni.appendChild(ai),ni.appendChild(si),li&&ni.appendChild(li),!ni.parentElement){if(!ei.parentElement)throw new Error("textField must have a parentElement to mirror");ei.parentElement.insertBefore(ni,ei)}return ni.scrollTop=ei.scrollTop,ni.scrollLeft=ei.scrollLeft,{mirror:ni,marker:si}}function XC(ei,ti=ei.selectionEnd){const{mirror:ii,marker:ni}=KC(ei,ti),si=ii.getBoundingClientRect(),ai=ni.getBoundingClientRect();return setTimeout(()=>{ii.remove()},5e3),{top:ai.top-si.top,left:ai.left-si.left}}const np=new WeakMap;function GC(ei){try{if(ei.matches(":popover-open"))return!0}catch{}try{if(ei.matches("dialog:modal"))return!0}catch{}try{if(ei.matches(":fullscreen"))return!0}catch{}return!1}class QC{constructor(ti,ii){this.expander=ti,this.input=ii,this.combobox=null,this.menu=null,this.match=null,this.justPasted=!1,this.lookBackIndex=0,this.oninput=this.onInput.bind(this),this.onpaste=this.onPaste.bind(this),this.onkeydown=this.onKeydown.bind(this),this.oncommit=this.onCommit.bind(this),this.onmousedown=this.onMousedown.bind(this),this.onblur=this.onBlur.bind(this),this.interactingWithList=!1,ii.addEventListener("paste",this.onpaste),ii.addEventListener("input",this.oninput),ii.addEventListener("keydown",this.onkeydown),ii.addEventListener("blur",this.onblur)}destroy(){this.input.removeEventListener("paste",this.onpaste),this.input.removeEventListener("input",this.oninput),this.input.removeEventListener("keydown",this.onkeydown),this.input.removeEventListener("blur",this.onblur)}dismissMenu(){this.deactivate()&&(this.lookBackIndex=this.input.selectionEnd||this.lookBackIndex)}activate(ti,ii){var ni,si;if(this.input!==document.activeElement&&this.input!==((si=(ni=document.activeElement)===null||ni===void 0?void 0:ni.shadowRoot)===null||si===void 0?void 0:si.activeElement))return;this.deactivate(),this.menu=ii,ii.id||(ii.id=`text-expander-${Math.floor(Math.random()*1e5).toString()}`),this.expander.append(ii),this.combobox=new NC(this.input,ii),this.expander.dispatchEvent(new Event("text-expander-activate"));let{top:ai,left:li}=XC(this.input,ti.position);if(GC(ii)){const fi=this.input.getBoundingClientRect();ai+=fi.top,li+=fi.left,getComputedStyle(ii).position==="absolute"&&(ai+=window.scrollY,li+=window.scrollX)}ii.style.top=`${ai}px`,ii.style.left=`${li}px`,this.combobox.start(),ii.addEventListener("combobox-commit",this.oncommit),ii.addEventListener("mousedown",this.onmousedown),this.combobox.navigate(1)}deactivate(){const ti=this.menu;return!ti||!this.combobox?!1:(this.expander.dispatchEvent(new Event("text-expander-deactiv
|
|||
|
<div class="tribute-item">
|
|||
|
<img src="${Ua(ni.original.avatar)}" class="tw-mr-2"/>
|
|||
|
<span class="name">${Ua(ni.original.name)}</span>
|
|||
|
${ni.original.fullname&&ni.original.fullname!==""?`<span class="fullname">${Ua(ni.original.fullname)}</span>`:""}
|
|||
|
</div>
|
|||
|
`}),ii}async function eE(ei,{mentions:ti,emoji:ii}={}){const{default:ni}=await __webpack_require__.e("tribute").then(__webpack_require__.t.bind(__webpack_require__,"./node_modules/tributejs/dist/tribute.min.js",19)),si=ZC({mentions:ti,emoji:ii}),ai=new ni({collection:si,noMatchTemplate:""});return ai.attach(ei),ai}async function tE(ei){const ti=new Uint8Array(await ei.arrayBuffer()),ii=[];if(ti.length<12)return ii;const ni=new DataView(ti.buffer);if(ni.getBigUint64(0)!==9894494448401390090n)return ii;const si=new TextDecoder;let ai=8;for(;ai<ti.length;){const li=ni.getUint32(ai);ii.push({name:si.decode(ti.slice(ai+4,ai+8)),data:ti.slice(ai+8,ai+8+li)}),ai+=li+12}return ii}async function iE(ei){let ti=0,ii=1;if(ei.type==="image/png")try{for(const{name:ni,data:si}of await tE(ei)){const ai=new DataView(si.buffer);ni==="IHDR"&&si?.length?ti=ai.getUint32(0):ni==="pHYs"&&si?.length&&ai.getUint8(8)===1&&(ii=Math.round(ai.getUint32(0)/39.3701)/72)}}catch{}return{width:ti,dppx:ii}}async function nE(ei,ti){const ii=new FormData;return ii.append("file",ei,ei.name),await(await(0,so.LO)(ti,{data:ii})).json()}function sp(ei){ei.dispatchEvent(new CustomEvent("ce-editor-content-changed",{bubbles:!0}))}class sE{constructor(ti){this.editor=ti}insertPlaceholder(ti){const ii=this.editor,ni=ii.selectionStart,si=ii.selectionEnd;ii.value=ii.value.substring(0,ni)+ti+ii.value.substring(si),ii.selectionStart=ni,ii.selectionEnd=ni+ti.length,ii.focus(),sp(ii)}replacePlaceholder(ti,ii){const ni=this.editor,si=ni.selectionStart,ai=ni.selectionEnd;ni.value.substring(si,ai)===ti?(ni.value=ni.value.substring(0,si)+ii+ni.value.substring(ai),ni.selectionEnd=si+ii.length):(ni.value=ni.value.replace(ti,ii),ni.selectionEnd-=ti.length,ni.selectionEnd+=ii.length),ni.selectionStart=ni.selectionEnd,ni.focus(),sp(ni)}}class rE{constructor(ti){this.editor=ti}insertPlaceholder(ti){const ii=this.editor,ni=ii.getCursor("start"),si=ii.getCursor("end");ii.replaceSelection(ti),si.ch=ni.ch+ti.length,ii.setSelection(ni,si),ii.focus(),sp(ii.getTextArea())}replacePlaceholder(ti,ii){const ni=this.editor,si=ni.getCursor("end");ni.getSelection()===ti?ni.replaceSelection(ii):ni.setValue(ni.getValue().replace(ti,ii)),si.ch-=ti.length,si.ch+=ii.length,ni.setSelection(si,si),ni.focus(),sp(ni.getTextArea())}}async function V_(ei,ti,ii,ni){const si=ti.getAttribute("data-upload-url"),ai=ti.querySelector(".files");if(!(!ti||!si||!ai||!ii.length)){ni.preventDefault(),ni.stopPropagation();for(const li of ii){const fi=li.name.slice(0,li.name.lastIndexOf(".")),hi=`![${fi}](uploading ...)`;ei.insertPlaceholder(hi);const{uuid:_i}=await nE(li,si),{width:ji,dppx:Mi}=await iE(li);let Ki;if(ji>0&&Mi>1){const hn=`attachments/${_i}`;Ki=`<img width="${Math.round(ji/Mi)}" alt="${Ua(fi)}" src="${Ua(hn)}">`}else{const hn=`/attachments/${_i}`;Ki=`![${fi}](${hn})`}ei.replacePlaceholder(hi,Ki);const on=document.createElement("input");on.setAttribute("name","files"),on.setAttribute("type","hidden"),on.setAttribute("id",_i),on.value=_i,ai.append(on)}}}function oE(ei,ti,ii){const{value:ni,selectionStart:si,selectionEnd:ai,_shiftDown:li}=ei;if(li)return;const fi=ni.substring(si,ai),hi=ti.trim();fi&&QS(hi)&&(ii.stopPropagation(),ii.preventDefault(),(0,zn.Pj)(ei,`[${fi}](${hi})`))}function aE(ei,ti){ei.codemirror.on("paste",(ii,ni)=>{const{images:si}=(0,zn.l1)(ni);si.length&&V_(new rE(ei.codemirror),ti,si,ni)})}function lE(ei,ti){ei.addEventListener("paste",ii=>{const{images:ni,text:si}=(0,zn.l1)(ii);ni.length?V_(new sE(ei),ti,ni,ii):si&&oE(ei,si,ii)})}var cE=__webpack_require__("./node_modules/tinycolor2/esm/tinycolor.js");const U_={},W_={},uE={fontFamily:"var(--fonts-monospace)",fontSize:14,guides:{bracketPairs:!1,indentation:!1},links:!1,minimap:{enabled:!1},occurrencesHighlight:"off",overviewRulerLanes:0,renderLineHighlight:"all",renderLineHighlightOnlyWhenFocus:!0,rulers:!1,scrollbar:{horizontalScrollbarSize:6,verticalScrollbarSize:6},scrollBeyondLastLine:!1,automaticLayout:!0};function fE(ei){try{return JSON.parse(ei.getAttribute("data-editorconfig"))}catch{return null}}function dE(ei){for(cons
|
|||
|
- [ ] ${si.getSelection()}`),si.focus()},icon:(0,Io.JW)("gitea-empty-checkbox"),title:"Add Checkbox (empty)"},"gitea-checkbox-checked":{action(ni){const si=ni.codemirror;si.replaceSelection(`
|
|||
|
- [x] ${si.getSelection()}`),si.focus()},icon:(0,Io.JW)("octicon-checkbox"),title:"Add Checkbox (checked)"},"gitea-switch-to-textarea":{action:()=>{ti.userPreferredEditor="textarea",ti.switchToTextarea()},icon:(0,Io.JW)("octicon-arrow-switch"),title:"Revert to simple textarea"},"gitea-code-inline":{action(ni){const si=ni.codemirror,ai=si.getSelection();if(si.replaceSelection(`\`${ai}\``),!ai){const li=si.getCursor();si.setCursor(li.line,li.ch-1)}si.focus()},icon:(0,Io.JW)("octicon-chevron-right"),title:"Add Inline Code"}};for(const[ni,si]of Object.entries(ii))typeof si!="string"&&(si.name=ni);return ii}const Y_=6;function J_(ei){const ti=new Map(Array.from(ei.entries()).sort((ii,ni)=>ii[1]-ni[1]));return Array.from(ti.keys()).slice(0,Y_)}function xE(ei){const ti=ei.toLowerCase().replaceAll("_"," ");if(!ti)return Pg.slice(0,Y_).map(ni=>ni.aliases[0]);const ii=new Map;for(const{aliases:ni}of Pg){const si=ni[0];for(const[ai,li]of ni.entries()){const fi=li.replaceAll("_"," ").indexOf(ti);if(fi===-1)continue;const hi=ii.get(si),_i=fi+ai;ii.set(si,hi?hi-_i:_i)}}return J_(ii)}function jE(ei){const ti=ei.toLowerCase(),ii=new Map;for(const ni of window.config.mentionValues??[]){const si=ni.key.toLowerCase().indexOf(ti);if(si===-1)continue;const ai=ii.get(ni);ii.set(ni,ai?ai-si:si)}return J_(ii)}function SE(ei){ei?.addEventListener("text-expander-change",({detail:{key:ti,provide:ii,text:ni}})=>{if(ti===":"){const si=xE(ni);if(!si.length)return ii({matched:!1});const ai=document.createElement("ul");ai.classList.add("suggestions");for(const li of si){const fi=Ng(li),hi=document.createElement("li");hi.setAttribute("role","option"),hi.setAttribute("data-value",fi),hi.textContent=`${fi} ${li}`,ai.append(hi)}ii({matched:!0,fragment:ai})}else if(ti==="@"){const si=jE(ni);if(!si.length)return ii({matched:!1});const ai=document.createElement("ul");ai.classList.add("suggestions");for(const{value:li,name:fi,fullname:hi,avatar:_i}of si){const ji=document.createElement("li");ji.setAttribute("role","option"),ji.setAttribute("data-value",`${ti}${li}`);const Mi=document.createElement("img");Mi.src=_i,ji.append(Mi);const Ki=document.createElement("span");if(Ki.textContent=fi,ji.append(Ki),hi&&hi.toLowerCase()!==fi){const on=document.createElement("span");on.classList.add("fullname"),on.textContent=hi,ji.append(on)}ai.append(ji)}ii({matched:!0,fragment:ai})}}),ei?.addEventListener("text-expander-value",({detail:ti})=>{if(ti?.item){const ii=ti.key==="@"?" ":"";ti.value=`${ti.item.getAttribute("data-value")}${ii}`}})}let sh=0;function Z_(ei){return ei.value?!0:((0,zn.EH)(ei)?(ei.required=!0,ei.closest("form")?.reportValidity()):pl("Require non-empty content"),!1)}class CE{constructor(ti,ii={}){ti._giteaComboMarkdownEditor=this,this.options=ii,this.container=ti}async init(){this.prepareEasyMDEToolbarActions(),this.setupContainer(),this.setupTab(),this.setupDropzone(),this.setupTextarea(),await this.switchToUserPreference()}applyEditorHeights(ti,ii){ii&&(ii.minHeight&&(ti.style.minHeight=ii.minHeight),ii.height&&(ti.style.height=ii.height),ii.maxHeight&&(ti.style.maxHeight=ii.maxHeight))}setupContainer(){SE(this.container.querySelector("text-expander")),this.container.addEventListener("ce-editor-content-changed",ti=>this.options?.onContentChanged?.(this,ti))}setupTextarea(){this.textarea=this.container.querySelector(".markdown-text-editor"),this.textarea._giteaComboMarkdownEditor=this,this.textarea.id=`_combo_markdown_editor_${String(sh++)}`,this.textarea.addEventListener("input",ai=>this.options?.onContentChanged?.(this,ai)),this.applyEditorHeights(this.textarea,this.options.editorHeights),this.textarea.getAttribute("data-disable-autosize")!=="true"&&(this.textareaAutosize=(0,zn.DS)(this.textarea,{viewportMarginBottom:130})),this.textareaMarkdownToolbar=this.container.querySelector("markdown-toolbar"),this.textareaMarkdownToolbar.setAttribute("for",this.textarea.id);for(const ai of this.textareaMarkdownToolbar.querySelectorAll(".markdown-toolbar-button"))ai.setAttribute("role","button"),ai.nodeName==="BUTTON"&&!ai.getAttribute("type")&&ai.setAttribut
|
|||
|
<div class="text small gt-word-break">${Ua(_i.repository.full_name)}</div>`,value:_i.id})}),li},cache:!1},fullTextSearch:!0}),Hi(".menu a.label-filter-item").each(function(){Hi(this).on("click",function(ai){ai.altKey&&(ai.preventDefault(),ty(this))})}),Hi(".menu .ui.dropdown.label-filter").on("keydown",ai=>{if(ai.altKey&&ai.keyCode===13){const li=document.querySelector(".menu .ui.dropdown.label-filter .menu .item.selected");li&&ty(li)}}),Hi(".ui.dropdown.label-filter, .ui.dropdown.select-label").dropdown("setting",{hideDividers:"empty"}).dropdown("refreshItems")}function TE(){document.addEventListener("click",async ei=>{if(!ei.target.matches(".delete-comment"))return;ei.preventDefault();const ti=ei.target;if(window.confirm(ti.getAttribute("data-locale")))try{if(!(await(0,so.LO)(ti.getAttribute("data-url"))).ok)throw new Error("Failed to delete comment");const ni=ti.closest(".conversation-holder"),si=ti.closest(".timeline-item"),ai=ti.closest(".timeline-item-group");if(ni?.querySelector(".pending-label")){const li=document.querySelector("#review-box .review-comments-counter");let fi=parseInt(li?.getAttribute("data-pending-comment-number"))-1||0;fi=Math.max(fi,0),li.setAttribute("data-pending-comment-number",fi),li.textContent=String(fi)}if(document.getElementById(ti.getAttribute("data-comment-id"))?.remove(),ni&&!ni.querySelector(".comment")){const li=ni.getAttribute("data-path"),fi=ni.getAttribute("data-side"),hi=ni.getAttribute("data-idx");ni.closest("tr").getAttribute("data-line-type")==="same"?document.querySelector(`[data-path="${li}"] .add-code-comment[data-idx="${hi}"]`).classList.remove("tw-invisible"):document.querySelector(`[data-path="${li}"] .add-code-comment[data-side="${fi}"][data-idx="${hi}"]`).classList.remove("tw-invisible"),ni.remove()}!ai?.querySelector(".timeline-item.comment")&&!si?.querySelector(".conversation-holder")&&ai?.querySelector(".timeline-avatar")?.classList.remove("timeline-avatar-offset")}catch(ii){console.error(ii)}})}function LE(){Hi(document).on("click",".delete-dependency-button",ei=>{const ti=ei.currentTarget.getAttribute("data-id"),ii=ei.currentTarget.getAttribute("data-type");Hi(".remove-dependency").modal({closable:!1,duration:200,onApprove:()=>{Hi("#removeDependencyID").val(ti),Hi("#dependencyType").val(ii),Hi("#removeDependencyForm").trigger("submit")}}).modal("show")})}function RE(){document.addEventListener("click",ei=>{if(!ei.target.matches(".cancel-code-comment"))return;const ti=ei.target.closest("form");ti?.classList.contains("comment-form")?((0,zn.y9)(ti),(0,zn.fi)(ti.closest(".comment-code-cloud")?.querySelectorAll("button.comment-form-reply"))):ti.closest(".comment-code-cloud")?.remove()})}function ME(){const ei=document.querySelector(".update-button > button");ei&&(ei.addEventListener("click",async function(ti){ti.preventDefault();const ii=this.getAttribute("data-redirect");this.classList.add("is-loading");let ni;try{ni=await(0,so.LO)(this.getAttribute("data-do"))}catch(ai){console.error(ai)}finally{this.classList.remove("is-loading")}let si;try{si=await ni?.json()}catch(ai){console.error(ai)}si?.redirect?window.location.href=si.redirect:ii?window.location.href=ii:window.location.reload()}),Hi(".update-button > .dropdown").dropdown({onChange(ti,ii,ni){const si=ni[0].getAttribute("data-do");if(si){const ai=ei.querySelector(".button-text");ai&&(ai.textContent=ni.text()),ei.setAttribute("data-do",si)}}}))}function OE(){Hi(".show-instruction").on("click",()=>{(0,zn.oi)(Hi(".instruct-content"))})}function DE(){const ei=document.getElementById("allow-edits-from-maintainers");if(!ei)return;const ti=ei.querySelector('input[type="checkbox"]');ti.addEventListener("input",async()=>{const ii=`${ei.getAttribute("data-url")}/set_allow_maintainer_edit`;ei.classList.add("is-loading");try{const ni=await(0,so.LO)(ii,{data:new URLSearchParams({allow_maintainer_edit:ti.checked})});if(!ni.ok)throw new Error("Failed to update maintainer edit permission");const si=await ni.json();ti.checked=si.allow_maintainer_edit}catch(ni){ti.checked=!ti.checked,console.error(ni),Mf(ei,ei.getAttribute("dat
|
|||
|
<tr class="add-comment" data-line-type="${ji}">
|
|||
|
${ai?`
|
|||
|
<td class="add-comment-left" colspan="4"></td>
|
|||
|
<td class="add-comment-right" colspan="4"></td>
|
|||
|
`:`
|
|||
|
<td class="add-comment-left add-comment-right" colspan="5"></td>
|
|||
|
`}
|
|||
|
</tr>`),Hi(_i).after(Ki));const on=Ki.find(`.add-comment-${li}`);if(!on.find(".comment-code-cloud").length&&!Ki.find('button[name="pending_review"]').length)try{const es=await(await(0,so.fG)(this.closest("[data-new-comment-url]")?.getAttribute("data-new-comment-url"))).text();on.html(es),on.find("input[name='line']").val(fi),on.find("input[name='side']").val(li==="left"?"previous":"proposed"),on.find("input[name='path']").val(hi),Rg(on.find(".dropzone")[0]),(await Of(on.find(".combo-markdown-editor"))).focus()}catch(gn){console.error(gn)}})}function NE(){Hi(document).on("click",".reference-issue",function(ei){const ti=Hi(this),ii=Hi(`#${ti.data("target")}`).text(),ni=ti.data("poster-username"),si=(0,na.oK)(ti.data("reference")),ai=Hi(ti.data("modal"));ai.find('textarea[name="content"]').val(`${ii}
|
|||
|
|
|||
|
_Originally posted by @${ni} in ${si}_`),ai.modal("show"),ei.preventDefault()})}function BE(){Hi(".toggle-wip a, .toggle-wip button").on("click",async ei=>{ei.preventDefault();const ti=ei.currentTarget.closest(".toggle-wip"),ii=ti.getAttribute("data-title"),ni=ti.getAttribute("data-wip-prefix"),si=ti.getAttribute("data-update-url");try{const ai=new URLSearchParams;if(ai.append("title",ii?.startsWith(ni)?ii.slice(ni.length).trim():`${ni.trim()} ${ii}`),!(await(0,so.LO)(si,{data:ai})).ok)throw new Error("Failed to toggle WIP status");window.location.reload()}catch(ai){console.error(ai)}})}function HE(){const ei=document.querySelector("#issue-title-display"),ti=document.querySelector("#issue-title-editor");if(!ti)return;const ii=ti.querySelector("input"),ni=ii.getAttribute("data-old-title");ei.querySelector("#issue-title-edit-show").addEventListener("click",()=>{(0,zn.y9)(ei),(0,zn.y9)("#pull-desc-display"),(0,zn.fi)(ti),(0,zn.fi)("#pull-desc-editor"),ii.value.trim()||(ii.value=ni),ii.focus()}),ti.querySelector(".ui.cancel.button").addEventListener("click",()=>{(0,zn.y9)(ti),(0,zn.y9)("#pull-desc-editor"),(0,zn.fi)(ei),(0,zn.fi)("#pull-desc-display")});const ai=document.querySelector("#pull-desc-editor")?.getAttribute("data-target-update-url"),li=ti.querySelector(".ui.primary.button");li.addEventListener("click",async()=>{const fi=ii.value.trim();try{if(fi&&fi!==ni){const hi=await(0,so.LO)(li.getAttribute("data-update-url"),{data:new URLSearchParams({title:fi})});if(!hi.ok)throw new Error(`Failed to update issue title: ${hi.statusText}`)}if(ai){const hi=document.querySelector("#pull-target-branch").getAttribute("data-branch"),_i=document.querySelector("#branch_target").textContent;if(hi!==_i){const ji=await(0,so.LO)(ai,{data:new URLSearchParams({target_branch:hi})});if(!ji.ok)throw new Error(`Failed to update PR target branch: ${ji.statusText}`)}}window.location.reload()}catch(hi){console.error(hi),pl(hi.message)}})}function $E(){document.querySelector("#branch-select")?.addEventListener("click",ei=>{const ti=ei.target.closest(".item[data-branch]");if(!ti)return;const ii=document.querySelector("#pull-target-branch"),ni=ii.getAttribute("data-basename"),si=ti.getAttribute("data-branch"),ai=ii.getAttribute("data-branch");ii.textContent=ii.textContent.replace(`${ni}:${ai}`,`${ni}:${si}`),ii.setAttribute("data-branch",si)})}function VE(ei){const ti={},ii=document.getElementById("status-button");ii&&(ti.onContentChanged=ni=>{const si=ii.getAttribute(ni.value().trim()?"data-status-and-comment":"data-status");ii.textContent=si}),Of(ei.find(".combo-markdown-editor"),ti)}function UE(ei){const ti=ei.find(".combo-editor-dropzone"),ii=async ni=>{const si=ni.find(".form-field-dropzone"),ai=ni.find(".form-field-real"),li=ni.find(".combo-markdown-editor"),fi=await Of(li,{onContentChanged:hi=>{ai.val(hi.value())}});ai.on("focus",async()=>{(0,zn.fi)(ei.find(".combo-editor-dropzone .form-field-real")),(0,zn.y9)(ei.find(".combo-editor-dropzone .combo-markdown-editor")),(0,zn.y9)(ei.find(".combo-editor-dropzone .form-field-dropzone")),(0,zn.y9)(ai),(0,zn.fi)(li),(0,zn.fi)(si),await fi.switchToUserPreference(),fi.focus()})};for(const ni of ti)ii(Hi(ni))}function WE(){if(document.querySelector(".archived-label-hint"))for(const ei of document.querySelectorAll("[data-is-archived]"))(0,zn.oi)(ei,ei.classList.contains("checked"))}function zE(){for(const ei of document.querySelectorAll(".js-toggle-commit-body"))ei.addEventListener("click",function(ti){ti.preventDefault();const ii=this.getAttribute("aria-expanded")==="true";(0,zn.oi)(this.parentElement.querySelector(".commit-body")),this.setAttribute("aria-expanded",String(!ii))})}function KE(){for(const ei of document.querySelectorAll('[data-tippy="commit-statuses"]')){const ti=document.querySelector(".repository.file.list")||document.querySelector(".repository.diff");pd(ei,{content:ei.nextElementSibling,placement:ti?"top-start":"bottom-start",interactive:!0,role:"dialog",theme:"box-with-header"})}}const{appSubUrl:ny}=window.config;function XE(){const ei=document.getElementById("manage_topic");if(!ei
|
|||
|
globstar while`,ti,Ki,ii,on,hn),this.matchOne(ti.slice(Ki),ii.slice(on),ni))return this.debug("globstar found match!",Ki,hi,hn),!0;if(hn==="."||hn===".."||!si.dot&&hn.charAt(0)==="."){this.debug("dot detected!",ti,Ki,ii,on);break}this.debug("globstar swallow a segment, and continue"),Ki++}return!!(ni&&(this.debug(`
|
|||
|
>>> no match, partial?`,ti,Ki,ii,on),Ki===hi))}let gn;if(typeof ji=="string"?(gn=Mi===ji,this.debug("string match",ji,Mi,gn)):(gn=ji.test(Mi),this.debug("pattern match",ji,Mi,gn)),!gn)return!1}if(li===hi&&fi===_i)return!0;if(li===hi)return ni;if(fi===_i)return li===hi-1&&ti[li]==="";throw new Error("wtf?")}braceExpand(){return my(this.pattern,this.options)}parse(ti){op(ti);const ii=this.options;if(ti==="**")return Qc;if(ti==="")return"";let ni,si=null;(ni=ti.match(Dk))?si=ii.dot?Ik:Fk:(ni=ti.match(Sk))?si=(ii.nocase?ii.dot?Ak:kk:ii.dot?Ek:Ck)(ni[1]):(ni=ti.match(Pk))?si=(ii.nocase?ii.dot?Nk:qk:ii.dot?Bk:Hk)(ni):(ni=ti.match(Tk))?si=ii.dot?Rk:Lk:(ni=ti.match(Mk))&&(si=Ok);const ai=lp.fromGlob(ti,this.options).toMMPattern();return si&&typeof ai=="object"&&Reflect.defineProperty(ai,"test",{value:si}),ai}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;const ti=this.set;if(!ti.length)return this.regexp=!1,this.regexp;const ii=this.options,ni=ii.noglobstar?Vk:ii.dot?Uk:Wk,si=new Set(ii.nocase?["i"]:[]);let ai=ti.map(hi=>{const _i=hi.map(ji=>{if(ji instanceof RegExp)for(const Mi of ji.flags.split(""))si.add(Mi);return typeof ji=="string"?Qk(ji):ji===Qc?Qc:ji._src});return _i.forEach((ji,Mi)=>{const Ki=_i[Mi+1],on=_i[Mi-1];ji!==Qc||on===Qc||(on===void 0?Ki!==void 0&&Ki!==Qc?_i[Mi+1]="(?:\\/|"+ni+"\\/)?"+Ki:_i[Mi]=ni:Ki===void 0?_i[Mi-1]=on+"(?:\\/|"+ni+")?":Ki!==Qc&&(_i[Mi-1]=on+"(?:\\/|\\/"+ni+"\\/)"+Ki,_i[Mi+1]=Qc))}),_i.filter(ji=>ji!==Qc).join("/")}).join("|");const[li,fi]=ti.length>1?["(?:",")"]:["",""];ai="^"+li+ai+fi+"$",this.negate&&(ai="^(?!"+ai+").+$");try{this.regexp=new RegExp(ai,[...si].join(""))}catch{this.regexp=!1}return this.regexp}slashSplit(ti){return this.preserveMultipleSlashes?ti.split("/"):this.isWindows&&/^\/\/[^\/]+/.test(ti)?["",...ti.split(/\/+/)]:ti.split(/\/+/)}match(ti,ii=this.partial){if(this.debug("match",ti,this.pattern),this.comment)return!1;if(this.empty)return ti==="";if(ti==="/"&&ii)return!0;const ni=this.options;this.isWindows&&(ti=ti.split("\\").join("/"));const si=this.slashSplit(ti);this.debug(this.pattern,"split",si);const ai=this.set;this.debug(this.pattern,"set",ai);let li=si[si.length-1];if(!li)for(let fi=si.length-2;!li&&fi>=0;fi--)li=si[fi];for(let fi=0;fi<ai.length;fi++){const hi=ai[fi];let _i=si;if(ni.matchBase&&hi.length===1&&(_i=[li]),this.matchOne(_i,hi,ii))return ni.flipNegate?!0:!this.negate}return ni.flipNegate?!1:this.negate}static defaults(ti){return Hl.defaults(ti).Minimatch}}Hl.AST=lp,Hl.Minimatch=cp,Hl.escape=jk,Hl.unescape=sm;const{appSubUrl:Yk,csrfToken:Jk}=window.config;function Zk(){Hi(".page-content.repository .ui.dropdown.access-mode").each((ei,ti)=>{const ii=Hi(ti),ni=ii.find("> .text");ii.dropdown({async action(si,ai){const li=ti.getAttribute("data-last-value");try{ti.setAttribute("data-last-value",ai),ii.dropdown("hide");const fi=new FormData;fi.append("uid",ti.getAttribute("data-uid")),fi.append("mode",ai),await(0,so.LO)(ti.getAttribute("data-url"),{data:fi})}catch{ni.text("(error)"),ti.setAttribute("data-last-value",li)}},onChange(si,ai,li){ni.text(ai)},onHide(){setTimeout(()=>{ii.dropdown("get item",ti.getAttribute("data-last-value"))?ii.dropdown("set selected",ti.getAttribute("data-last-value")):ni.text("(none)")},0)}})})}function eA(){const ei=document.getElementById("search-team-box");ei&&Hi(ei).search({minCharacters:2,apiSettings:{url:`${Yk}/org/${ei.getAttribute("data-org-name")}/teams/-/search?q={query}`,headers:{"X-Csrf-Token":Jk},onResponse(ti){const ii=[];return Hi.each(ti.data,(ni,si)=>{ii.push({title:si.name,description:`${si.permission} access`})}),{results:ii}}},searchFields:["name","description"],showNoResults:!1})}function tA(){if(!Hi(".edit.githook").length)return;const ei=document.querySelector(".hook-filename").textContent,ti=K_(Hi("#content")[0],ei,{language:"shell"})}function iA(){if(!document.querySelector(".repository.settings.branches"))return;for(const ti of document.getElementsByClassName("toggle-target-enabled"))ti.addEventListener("change",function(){document.querySelector(this.getAttribute("data-target"))?.classList.
|
|||
|
if this component is shown, either the user is an admin (can do a merge without checks), or they are a writer who has the permission to do a merge
|
|||
|
if the user is a writer and can't do a merge now (canMergeNow==false), then only show the Auto Merge for them
|
|||
|
How to test the UI manually:
|
|||
|
* Method 1: manually set some variables in pull.tmpl, eg: {{$notAllOverridableChecksOk = true}} {{$canMergeNow = false}}
|
|||
|
* Method 2: make a protected branch, then set state=pending/success :
|
|||
|
curl -X POST \${root_url}/api/v1/repos/\${owner}/\${repo}/statuses/\${sha} \\
|
|||
|
-H "accept: application/json" -H "authorization: Basic $base64_auth" -H "Content-Type: application/json" \\
|
|||
|
-d '{"context": "test/context", "description": "description", "state": "\${state}", "target_url": "http://localhost"}'
|
|||
|
`),(0,ri.Lk)("div",null,[(0,ri.Q3)(" eslint-disable-next-line vue/no-v-html "),ei.mergeForm.hasPendingPullRequestMerge?((0,ri.uX)(),(0,ri.CE)("div",{key:0,innerHTML:ei.mergeForm.hasPendingPullRequestMergeTip,class:"ui info message"},null,8,v2)):(0,ri.Q3)("v-if",!0),(0,ri.Q3)(" another similar form is in pull.tmpl (manual merge)"),ei.showActionForm?((0,ri.uX)(),(0,ri.CE)("form",{key:1,class:"ui form form-fetch-action",action:ei.mergeForm.baseLink+"/merge",method:"post"},[(0,ri.Lk)("input",{type:"hidden",name:"_csrf",value:ei.csrfToken},null,8,_2),(0,ri.bo)((0,ri.Lk)("input",{type:"hidden",name:"head_commit_id","onUpdate:modelValue":ti[0]||(ti[0]=fi=>ei.mergeForm.pullHeadCommitID=fi)},null,512),[[Cc,ei.mergeForm.pullHeadCommitID]]),(0,ri.bo)((0,ri.Lk)("input",{type:"hidden",name:"merge_when_checks_succeed","onUpdate:modelValue":ti[1]||(ti[1]=fi=>ei.autoMergeWhenSucceed=fi)},null,512),[[Cc,ei.autoMergeWhenSucceed]]),(0,ri.bo)((0,ri.Lk)("input",{type:"hidden",name:"force_merge","onUpdate:modelValue":ti[2]||(ti[2]=fi=>ai.forceMerge=fi)},null,512),[[Cc,ai.forceMerge]]),ei.mergeStyleDetail.hideMergeMessageTexts?(0,ri.Q3)("v-if",!0):((0,ri.uX)(),(0,ri.CE)(ri.FK,{key:0},[(0,ri.Lk)("div",y2,[(0,ri.bo)((0,ri.Lk)("input",{type:"text",name:"merge_title_field","onUpdate:modelValue":ti[3]||(ti[3]=fi=>ei.mergeTitleFieldValue=fi)},null,512),[[Cc,ei.mergeTitleFieldValue]])]),(0,ri.Lk)("div",w2,[(0,ri.bo)((0,ri.Lk)("textarea",{name:"merge_message_field",rows:"5",placeholder:ei.mergeForm.mergeMessageFieldPlaceHolder,"onUpdate:modelValue":ti[4]||(ti[4]=fi=>ei.mergeMessageFieldValue=fi)},null,8,x2),[[Cc,ei.mergeMessageFieldValue]]),ei.mergeMessageFieldValue!==ei.mergeForm.defaultMergeMessage?((0,ri.uX)(),(0,ri.CE)("button",{key:0,onClick:ti[5]||(ti[5]=ml((...fi)=>ai.clearMergeMessage&&ai.clearMergeMessage(...fi),["prevent"])),class:"btn tw-mt-1 tw-p-1 interact-fg","data-tooltip-content":ei.mergeForm.textClearMergeMessageHint},(0,yi.v_)(ei.mergeForm.textClearMergeMessage),9,j2)):(0,ri.Q3)("v-if",!0)])],64)),ei.mergeStyle==="manually-merged"?((0,ri.uX)(),(0,ri.CE)("div",S2,[(0,ri.Lk)("input",{type:"text",name:"merge_commit_id",placeholder:ei.mergeForm.textMergeCommitId},null,8,C2)])):(0,ri.Q3)("v-if",!0),(0,ri.Lk)("button",{class:(0,yi.C4)(["ui button",ai.mergeButtonStyleClass]),type:"submit",name:"do",value:ei.mergeStyle},[(0,ri.eW)((0,yi.v_)(ei.mergeStyleDetail.textDoMerge)+" ",1),ei.autoMergeWhenSucceed?((0,ri.uX)(),(0,ri.CE)(ri.FK,{key:0},[(0,ri.eW)((0,yi.v_)(ei.mergeForm.textAutoMergeButtonWhenSucceed),1)],64)):(0,ri.Q3)("v-if",!0)],10,E2),(0,ri.Lk)("button",{class:"ui button merge-cancel",onClick:ti[6]||(ti[6]=fi=>ai.toggleActionForm(!1))},(0,yi.v_)(ei.mergeForm.textCancel),1),ei.mergeForm.isPullBranchDeletable&&!ei.autoMergeWhenSucceed?((0,ri.uX)(),(0,ri.CE)("div",k2,[(0,ri.bo)((0,ri.Lk)("input",{name:"delete_branch_after_merge",type:"checkbox","onUpdate:modelValue":ti[7]||(ti[7]=fi=>ei.deleteBranchAfterMerge=fi),id:"delete-branch-after-merge"},null,512),[[Jp,ei.deleteBranchAfterMerge]]),(0,ri.Lk)("label",A2,(0,yi.v_)(ei.mergeForm.textDeleteBranch),1)])):(0,ri.Q3)("v-if",!0)],8,b2)):(0,ri.Q3)("v-if",!0),ei.showActionForm?(0,ri.Q3)("v-if",!0):((0,ri.uX)(),(0,ri.CE)("div",T2,[(0,ri.Q3)(" the merge button "),(0,ri.Lk)("div",{class:(0,yi.C4)(["ui buttons merge-button",[ei.mergeForm.emptyCommit?"":ei.mergeForm.allOverridableChecksOk?"primary":"red"]]),onClick:ti[9]||(ti[9]=fi=>ai.toggleActionForm(!0))},[(0,ri.Lk)("button",L2,[(0,ri.bF)(li,{name:"octicon-git-merge"}),(0,ri.Lk)("span",R2,[(0,ri.eW)((0,yi.v_)(ei.mergeStyleDetail.textDoMerge)+" ",1),ei.autoMergeWhenSucceed?((0,ri.uX)(),(0,ri.CE)(ri.FK,{key:0},[(0,ri.eW)((0,yi.v_)(ei.mergeForm.textAutoMergeButtonWhenSucceed),1)],64)):(0,ri.Q3)("v-if",!0)])]),ei.mergeStyleAllowedCount>1?((0,ri.uX)(),(0,ri.CE)("div",{key:0,class:"ui dropdown icon button",onClick:ti[8]||(ti[8]=ml(fi=>ei.showMergeStyleMenu=!ei.showMergeStyleMenu,["stop"]))},[(0,ri.bF)(li,{name:"octicon-triangle-down",size:14}),(0,ri.Lk)("div",{class:(0,yi.C4)(["menu",{show:ei.showMergeStyleMenu}])},[((0,ri.uX)(!0),(0,ri.CE)(ri.FK,n
|
|||
|
> `)}
|
|||
|
|
|||
|
`;let si;if(Hi(this).hasClass("quote-reply-diff")){const ai=Hi(this).closest(".comment-code-cloud").find("button.comment-form-reply");si=await iy(ai)}else si=Bg(Hi("#comment-form .combo-markdown-editor"));si&&(si.value()?si.value(`${si.value()}
|
|||
|
|
|||
|
${ni}`):si.value(ni),si.focus(),si.moveCursorToEnd())})}function mp(){const ei=[document.querySelector(".edit-content-zone:not(.tw-hidden) textarea"),document.querySelector("#comment-form textarea")];for(const ti of ei)if(ti&&ti.value.trim().length>10){if(ti.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()}function Y2(){const ei=Hi(".comment.form");if(!ei.length)return;ei.find(".field.combo-editor-dropzone").length?UE(ei):ei.find(".combo-markdown-editor").length&&VE(ei);function ti(){const si=document.querySelector(".ui.dropdown.select-branch");if(!si)return;const ai=si.getAttribute("data-url-update-issueref"),li=Hi(si);li.find(".reference-list-menu").find(".item:not(.no-select)").on("click",async function(hi){hi.preventDefault();const _i=this.getAttribute("data-id"),ji=this.getAttribute("data-name");if(ai)try{await(0,so.LO)(ai,{data:new URLSearchParams({ref:_i})}),window.location.reload()}catch(Mi){console.error(Mi)}else{const Mi=this.getAttribute("data-id-selector");document.querySelector(Mi).value=_i,si.querySelector(".text-branch-name").textContent=ji}}),li.find(".reference.column").on("click",function(){return(0,zn.y9)(li.find(".scrolling.reference-list-menu")),(0,zn.fi)(this.getAttribute("data-target")),(0,zn.xP)(this.parentNode,".branch-tag-item",hi=>hi.classList.remove("active")),this.classList.add("active"),!1})}ti();function ii(si,ai){const li=Hi(`.ui.${ai}.list`),fi=li.find(".no-select"),hi=Hi(`.${si} .menu`);let _i=hi.data("action")==="update";const ji={};Hi(`.${si}`).dropdown({action:"nothing",fullTextSearch:"exact",async onHide(){if(_i=hi.data("action")==="update",_i){const Mi=Object.entries(ji);for(const[Ki,on]of Mi)await rh(on["update-url"],on.action,on["issue-id"],Ki);Mi.length&&mp()}}}),hi.find(".item:not(.no-select)").on("click",function(Mi){if(Mi.preventDefault(),Hi(this).hasClass("ban-change"))return!1;_i=hi.data("action")==="update";const Ki=this,on=this.getAttribute("data-scope");if(Hi(this).parent().find(".item").each(function(){if(on){if(this.getAttribute("data-scope")!==on||this!==Ki&&!Hi(this).hasClass("checked"))return!0}else if(this!==Ki)return!0;Hi(this).hasClass("checked")?(Hi(this).removeClass("checked"),Hi(this).find(".octicon-check").addClass("tw-invisible"),_i&&(Hi(this).data("id")in ji?delete ji[Hi(this).data("id")]:ji[Hi(this).data("id")]={"update-url":hi.data("update-url"),action:"detach","issue-id":hi.data("issue-id")})):(Hi(this).addClass("checked"),Hi(this).find(".octicon-check").removeClass("tw-invisible"),_i&&(Hi(this).data("id")in ji?delete ji[Hi(this).data("id")]:ji[Hi(this).data("id")]={"update-url":hi.data("update-url"),action:"attach","issue-id":hi.data("issue-id")}))}),si==="select-reviewers-modify"||si==="select-assignees-modify")return!1;const hn=[];return Hi(this).parent().find(".item").each(function(){Hi(this).hasClass("checked")?(hn.push(Hi(this).data("id")),Hi(Hi(this).data("id-selector")).removeClass("tw-hidden")):Hi(Hi(this).data("id-selector")).addClass("tw-hidden")}),hn.length?fi.addClass("tw-hidden"):fi.removeClass("tw-hidden"),Hi(Hi(this).parent().data("id")).val(hn.join(",")),!1}),hi.find(".no-select.item").on("click",function(Mi){if(Mi.preventDefault(),_i&&(async()=>(await rh(hi.data("update-url"),"clear",hi.data("issue-id"),""),mp()))(),Hi(this).parent().find(".item").each(function(){Hi(this).removeClass("checked"),Hi(this).find(".octicon-check").addClass("tw-invisible")}),si==="select-reviewers-modify"||si==="select-assignees-modify")return!1;li.find(".item").each(function(){Hi(this).addClass("tw-hidden")}),fi.removeClass("tw-hidden"),Hi(Hi(this).parent().data("id")).val("")})}ii("select-label","labels"),ii("select-assignees","assignees"),ii("select-assignees-modify","assignees"),ii("select-reviewers-modify","assignees");function ni(si,ai){const li=Hi(`${si} .menu`),fi=Hi(`.ui${si}.list`),hi=li.data("action")==="update";li.find(".item:not(.no-select)").on("click",function(){Hi(this).parent().find(".item").eac
|
|||
|
<a class="item muted sidebar-item-link" href=${Hi(this).data("href")}>
|
|||
|
${_i}
|
|||
|
${Ua(Hi(this).text())}
|
|||
|
</a>
|
|||
|
`),Hi(`.ui${si}.list .no-select`).addClass("tw-hidden"),Hi(ai).val(Hi(this).data("id"))}),li.find(".no-select.item").on("click",function(){Hi(this).parent().find(".item:not(.no-select)").each(function(){Hi(this).removeClass("selected active")}),hi&&(async()=>(await rh(li.data("update-url"),"",li.data("issue-id"),Hi(this).data("id")),mp()))(),fi.find(".selected").html(""),fi.find(".no-select").removeClass("tw-hidden"),Hi(ai).val("")})}ni(".select-project","#project_id"),ni(".select-milestone","#milestone_id"),ni(".select-assignee","#assignee_id")}function J2(){if(!Hi(".page-content.repository").length)return;if(h2(".js-branch-tag-selector"),Hi(".repository.settings.options").length>0){Hi(".enable-system").on("change",function(){this.checked?(Hi(Hi(this).data("target")).removeClass("disabled"),Hi(this).data("context")||Hi(Hi(this).data("context")).addClass("disabled")):(Hi(Hi(this).data("target")).addClass("disabled"),Hi(this).data("context")||Hi(Hi(this).data("context")).removeClass("disabled"))}),Hi(".enable-system-radio").on("change",function(){this.value==="false"?(Hi(Hi(this).data("target")).addClass("disabled"),Hi(this).data("context")!==void 0&&Hi(Hi(this).data("context")).removeClass("disabled")):this.value==="true"&&(Hi(Hi(this).data("target")).removeClass("disabled"),Hi(this).data("context")!==void 0&&Hi(Hi(this).data("context")).addClass("disabled"))});const ii=Hi(".js-tracker-issue-style");ii.on("change input",()=>{const ni=ii.filter(":checked").val();Hi("#tracker-issue-style-regex-box").toggleClass("disabled",ni!=="regexp")})}Ey(".repository.labels"),Hi(".repository.new.milestone").length>0&&Hi("#clear-date").on("click",()=>(Hi("#deadline").val(""),!1)),Hi(".repository.new.repo").length>0&&Hi('input[name="gitignores"], input[name="license"]').on("change",()=>{const ii=Hi('input[name="gitignores"]').val(),ni=Hi('input[name="license"]').val();(ii||ni)&&(document.querySelector('input[name="auto_init"]').checked=!0)}),Hi(".repository.diff").length&&(lk(".choose.branch .dropdown"),ck(".choose.branch .dropdown")),ak(),g2(),iA(),Hi(".repository.view.issue").length>0&&(Q2(),$E(),HE(),BE(),PE(),nT(),NE(),TE(),LE(),RE(),ME(),gy(),z2(),K2());const ti=Hi(".repository.compare.pull");ti.length>0&&ti.find("button.show-form").on("click",function(ii){ii.preventDefault(),(0,zn.y9)(Hi(this).parent());const ni=ti.find(".pullrequest-form");(0,zn.fi)(ni)}),$T()}const{i18n:om}=window.config;function Z2(){const ei=document.getElementById("copy-content");!ei||ei.classList.contains("disabled")||ei.addEventListener("click",async()=>{if(ei.classList.contains("is-loading"))return;let ti,ii=!1;const ni=ei.getAttribute("data-link");if(ni){ei.classList.add("is-loading","loading-icon-2px");try{const ai=await(0,so.fG)(ni,{credentials:"include",redirect:"follow"}),li=ai.headers.get("content-type");li.startsWith("image/")&&!li.startsWith("image/svg")?(ii=!0,ti=await ai.blob()):ti=await ai.text()}catch{return Mf(ei,om.copy_error)}finally{ei.classList.remove("is-loading","loading-icon-2px")}}else{const ai=document.querySelectorAll(".file-view .lines-code");ti=Array.from(ai,li=>li.textContent).join("")}if(await Zh(ti))Mf(ei,om.copy_success);else if(ii){const ai=await Zh(await(0,na.hC)(ti,"image/png"));Mf(ei,ai?om.copy_success:om.copy_error)}else Mf(ei,om.copy_error)})}async function eL(){const ei=document.querySelector("#captcha");if(!ei)return;const ti=ei.getAttribute("data-sitekey"),ii=(0,na.g4)(),ni={sitekey:ti,theme:ii?"dark":"light"};switch(ei.getAttribute("data-captcha-type")){case"g-recaptcha":{window.grecaptcha&&window.grecaptcha.ready(()=>{window.grecaptcha.render(ei,ni)});break}case"cf-turnstile":{window.turnstile&&window.turnstile.render(ei,ni);break}case"h-captcha":{window.hcaptcha&&window.hcaptcha.render(ei,ni);break}case"m-captcha":{const{default:si}=await __webpack_require__.e("mcaptcha-vanilla-glue").then(__webpack_require__.t.bind(__webpack_require__,"./node_modules/@mcaptcha/vanilla-glue/dist/index.js",19));si.INPUT_NAME="m-captcha-response";const ai=ei.getAttribute("data-instance-url");si.default({siteKey:{instanceUrl:new
|
|||
|
currentJobStepsStates[i].cursor === null means the log is loaded for the first time
|
|||
|
`),ei.isDone(ei.run.status)&&ei.currentJobStepsStates[_i].expanded&&ei.currentJobStepsStates[_i].cursor===null?((0,ri.uX)(),(0,ri.Wv)(fi,{key:0,name:"octicon-sync",class:"tw-mr-2 job-status-rotate"})):((0,ri.uX)(),(0,ri.Wv)(fi,{key:1,name:ei.currentJobStepsStates[_i].expanded?"octicon-chevron-down":"octicon-chevron-right",class:(0,yi.C4)(["tw-mr-2",!ei.isExpandable(hi.status)&&"tw-invisible"])},null,8,["name","class"])),(0,ri.bF)(li,{status:hi.status,class:"tw-mr-2"},null,8,["status"]),(0,ri.Lk)("span",VL,(0,yi.v_)(hi.summary),1),(0,ri.Lk)("span",UL,(0,yi.v_)(hi.duration),1)],10,$L),(0,ri.Q3)(` the log elements could be a lot, do not use v-if to destroy/reconstruct the DOM,
|
|||
|
use native DOM elements for "log line" to improve performance, Vue is not suitable for managing so many reactive elements. `),(0,ri.bo)((0,ri.Lk)("div",{class:"job-step-logs",ref_for:!0,ref:"logs"},null,512),[[Jl,ei.currentJobStepsStates[_i].expanded]])]))),128))],512)):(0,ri.Q3)("v-if",!0)])])])}const zL=["data-tooltip-content"];function KL(ei,ti,ii,ni,si,ai){const li=(0,ri.g2)("SvgIcon");return ii.status?((0,ri.uX)(),(0,ri.CE)("span",{key:0,class:"tw-flex tw-items-center","data-tooltip-content":ii.localeStatus},[ii.status==="success"?((0,ri.uX)(),(0,ri.Wv)(li,{key:0,name:"octicon-check-circle-fill",class:"text green",size:ii.size,"class-name":ii.className},null,8,["size","class-name"])):ii.status==="skipped"?((0,ri.uX)(),(0,ri.Wv)(li,{key:1,name:"octicon-skip",class:"text grey",size:ii.size,"class-name":ii.className},null,8,["size","class-name"])):ii.status==="waiting"?((0,ri.uX)(),(0,ri.Wv)(li,{key:2,name:"octicon-clock",class:"text yellow",size:ii.size,"class-name":ii.className},null,8,["size","class-name"])):ii.status==="blocked"?((0,ri.uX)(),(0,ri.Wv)(li,{key:3,name:"octicon-blocked",class:"text yellow",size:ii.size,"class-name":ii.className},null,8,["size","class-name"])):ii.status==="running"?((0,ri.uX)(),(0,ri.Wv)(li,{key:4,name:"octicon-meter",class:"text yellow",size:ii.size,"class-name":"job-status-rotate "+ii.className},null,8,["size","class-name"])):["failure","cancelled","unknown"].includes(ii.status)?((0,ri.uX)(),(0,ri.Wv)(li,{key:5,name:"octicon-x-circle-fill",class:"text red",size:ii.size},null,8,["size"])):(0,ri.Q3)("v-if",!0)],8,zL)):(0,ri.Q3)("v-if",!0)}var XL={components:{SvgIcon:Io.Ah},props:{status:{type:String,required:!0},size:{type:Number,default:16},className:{type:String,default:""},localeStatus:{type:String,default:""}}},GL=(0,zc.A)(XL,[["render",KL]]),Qg=function(ei,ti){return Object.defineProperty?Object.defineProperty(ei,"raw",{value:ti}):ei.raw=ti,ei},ya;(function(ei){ei[ei.EOS=0]="EOS",ei[ei.Text=1]="Text",ei[ei.Incomplete=2]="Incomplete",ei[ei.ESC=3]="ESC",ei[ei.Unknown=4]="Unknown",ei[ei.SGR=5]="SGR",ei[ei.OSCURL=6]="OSCURL"})(ya||(ya={}));class QL{constructor(){this.VERSION="6.0.2",this.setup_palettes(),this._use_classes=!1,this.bold=!1,this.faint=!1,this.italic=!1,this.underline=!1,this.fg=this.bg=null,this._buffer="",this._url_allowlist={http:1,https:1},this._escape_html=!0,this.boldStyle="font-weight:bold",this.faintStyle="opacity:0.7",this.italicStyle="font-style:italic",this.underlineStyle="text-decoration:underline"}set use_classes(ti){this._use_classes=ti}get use_classes(){return this._use_classes}set url_allowlist(ti){this._url_allowlist=ti}get url_allowlist(){return this._url_allowlist}set escape_html(ti){this._escape_html=ti}get escape_html(){return this._escape_html}set boldStyle(ti){this._boldStyle=ti}get boldStyle(){return this._boldStyle}set faintStyle(ti){this._faintStyle=ti}get faintStyle(){return this._faintStyle}set italicStyle(ti){this._italicStyle=ti}get italicStyle(){return this._italicStyle}set underlineStyle(ti){this._underlineStyle=ti}get underlineStyle(){return this._underlineStyle}setup_palettes(){this.ansi_colors=[[{rgb:[0,0,0],class_name:"ansi-black"},{rgb:[187,0,0],class_name:"ansi-red"},{rgb:[0,187,0],class_name:"ansi-green"},{rgb:[187,187,0],class_name:"ansi-yellow"},{rgb:[0,0,187],class_name:"ansi-blue"},{rgb:[187,0,187],class_name:"ansi-magenta"},{rgb:[0,187,187],class_name:"ansi-cyan"},{rgb:[255,255,255],class_name:"ansi-white"}],[{rgb:[85,85,85],class_name:"ansi-bright-black"},{rgb:[255,85,85],class_name:"ansi-bright-red"},{rgb:[0,255,0],class_name:"ansi-bright-green"},{rgb:[255,255,85],class_name:"ansi-bright-yellow"},{rgb:[85,85,255],class_name:"ansi-bright-blue"},{rgb:[255,85,255],class_name:"ansi-bright-magenta"},{rgb:[85,255,255],class_name:"ansi-bright-cyan"},{rgb:[255,255,255],class_name:"ansi-bright-white"}]],this.palette_256=[],this.ansi_colors.forEach(ni=>{ni.forEach(si=>{this.palette_256.push(si)})});let ti=[0,95,135,175,215,255];for(let ni=0;ni<6;++ni)for(let si=0;si<6;++si)for(let ai=0;ai<6;++ai){let li={rgb:[ti[ni],ti[si],
|
|||
|
^ # beginning of line
|
|||
|
#
|
|||
|
# First attempt
|
|||
|
(?: # legal sequence
|
|||
|
\x1B[ # CSI
|
|||
|
([<-?]?) # private-mode char
|
|||
|
([d;]*) # any digits or semicolons
|
|||
|
([ -/]? # an intermediate modifier
|
|||
|
[@-~]) # the command
|
|||
|
)
|
|||
|
| # alternate (second attempt)
|
|||
|
(?: # illegal sequence
|
|||
|
\x1B[ # CSI
|
|||
|
[ -~]* # anything legal
|
|||
|
([\0-:]) # anything illegal
|
|||
|
)
|
|||
|
`],[`
|
|||
|
^ # beginning of line
|
|||
|
#
|
|||
|
# First attempt
|
|||
|
(?: # legal sequence
|
|||
|
\\x1b\\[ # CSI
|
|||
|
([\\x3c-\\x3f]?) # private-mode char
|
|||
|
([\\d;]*) # any digits or semicolons
|
|||
|
([\\x20-\\x2f]? # an intermediate modifier
|
|||
|
[\\x40-\\x7e]) # the command
|
|||
|
)
|
|||
|
| # alternate (second attempt)
|
|||
|
(?: # illegal sequence
|
|||
|
\\x1b\\[ # CSI
|
|||
|
[\\x20-\\x7e]* # anything legal
|
|||
|
([\\x00-\\x1f:]) # anything illegal
|
|||
|
)
|
|||
|
`]))));let li=this._buffer.match(this._csi_regex);if(li===null)return ti.kind=ya.Incomplete,ti;if(li[4])return ti.kind=ya.ESC,ti.text=this._buffer.slice(0,1),this._buffer=this._buffer.slice(1),ti;li[1]!=""||li[3]!="m"?ti.kind=ya.Unknown:ti.kind=ya.SGR,ti.text=li[2];var ai=li[0].length;return this._buffer=this._buffer.slice(ai),ti}else if(si=="]"){if(ii<4)return ti.kind=ya.Incomplete,ti;if(this._buffer.charAt(2)!="8"||this._buffer.charAt(3)!=";")return ti.kind=ya.ESC,ti.text=this._buffer.slice(0,1),this._buffer=this._buffer.slice(1),ti;this._osc_st||(this._osc_st=YL(Py||(Py=Qg([`
|
|||
|
(?: # legal sequence
|
|||
|
(\x1B\\) # ESC | # alternate
|
|||
|
(\x07) # BEL (what xterm did)
|
|||
|
)
|
|||
|
| # alternate (second attempt)
|
|||
|
( # illegal sequence
|
|||
|
[\0-] # anything illegal
|
|||
|
| # alternate
|
|||
|
[\b-] # anything illegal
|
|||
|
| # alternate
|
|||
|
[-] # anything illegal
|
|||
|
)
|
|||
|
`],[`
|
|||
|
(?: # legal sequence
|
|||
|
(\\x1b\\\\) # ESC \\
|
|||
|
| # alternate
|
|||
|
(\\x07) # BEL (what xterm did)
|
|||
|
)
|
|||
|
| # alternate (second attempt)
|
|||
|
( # illegal sequence
|
|||
|
[\\x00-\\x06] # anything illegal
|
|||
|
| # alternate
|
|||
|
[\\x08-\\x1a] # anything illegal
|
|||
|
| # alternate
|
|||
|
[\\x1c-\\x1f] # anything illegal
|
|||
|
)
|
|||
|
`])))),this._osc_st.lastIndex=0;{let hi=this._osc_st.exec(this._buffer);if(hi===null)return ti.kind=ya.Incomplete,ti;if(hi[3])return ti.kind=ya.ESC,ti.text=this._buffer.slice(0,1),this._buffer=this._buffer.slice(1),ti}{let hi=this._osc_st.exec(this._buffer);if(hi===null)return ti.kind=ya.Incomplete,ti;if(hi[3])return ti.kind=ya.ESC,ti.text=this._buffer.slice(0,1),this._buffer=this._buffer.slice(1),ti}this._osc_regex||(this._osc_regex=Fy(qy||(qy=Qg([`
|
|||
|
^ # beginning of line
|
|||
|
#
|
|||
|
\x1B]8; # OSC Hyperlink
|
|||
|
[ -:<-~]* # params (excluding ;)
|
|||
|
; # end of params
|
|||
|
([!-~]{0,512}) # URL capture
|
|||
|
(?: # ST
|
|||
|
(?:\x1B\\) # ESC | # alternate
|
|||
|
(?:\x07) # BEL (what xterm did)
|
|||
|
)
|
|||
|
([ -~]+) # TEXT capture
|
|||
|
\x1B]8;; # OSC Hyperlink End
|
|||
|
(?: # ST
|
|||
|
(?:\x1B\\) # ESC | # alternate
|
|||
|
(?:\x07) # BEL (what xterm did)
|
|||
|
)
|
|||
|
`],[`
|
|||
|
^ # beginning of line
|
|||
|
#
|
|||
|
\\x1b\\]8; # OSC Hyperlink
|
|||
|
[\\x20-\\x3a\\x3c-\\x7e]* # params (excluding ;)
|
|||
|
; # end of params
|
|||
|
([\\x21-\\x7e]{0,512}) # URL capture
|
|||
|
(?: # ST
|
|||
|
(?:\\x1b\\\\) # ESC \\
|
|||
|
| # alternate
|
|||
|
(?:\\x07) # BEL (what xterm did)
|
|||
|
)
|
|||
|
([\\x20-\\x7e]+) # TEXT capture
|
|||
|
\\x1b\\]8;; # OSC Hyperlink End
|
|||
|
(?: # ST
|
|||
|
(?:\\x1b\\\\) # ESC \\
|
|||
|
| # alternate
|
|||
|
(?:\\x07) # BEL (what xterm did)
|
|||
|
)
|
|||
|
`]))));let li=this._buffer.match(this._osc_regex);if(li===null)return ti.kind=ya.ESC,ti.text=this._buffer.slice(0,1),this._buffer=this._buffer.slice(1),ti;ti.kind=ya.OSCURL,ti.url=li[1],ti.text=li[2];var ai=li[0].length;return this._buffer=this._buffer.slice(ai),ti}else if(si=="(")return ti.kind=ya.Unknown,this._buffer=this._buffer.slice(3),ti}}ansi_to_html(ti){this.append_buffer(ti);for(var ii=[];;){var ni=this.get_next_packet();if(ni.kind==ya.EOS||ni.kind==ya.Incomplete)break;ni.kind==ya.ESC||ni.kind==ya.Unknown||(ni.kind==ya.Text?ii.push(this.transform_to_html(this.with_state(ni))):ni.kind==ya.SGR?this.process_ansi(ni):ni.kind==ya.OSCURL&&ii.push(this.process_hyperlink(ni)))}return ii.join("")}with_state(ti){return{bold:this.bold,faint:this.faint,italic:this.italic,underline:this.underline,fg:this.fg,bg:this.bg,text:ti.text}}process_ansi(ti){let ii=ti.text.split(";");for(;ii.length>0;){let ni=ii.shift(),si=parseInt(ni,10);if(isNaN(si)||si===0)this.fg=null,this.bg=null,this.bold=!1,this.faint=!1,this.italic=!1,this.underline=!1;else if(si===1)this.bold=!0;else if(si===2)this.faint=!0;else if(si===3)this.italic=!0;else if(si===4)this.underline=!0;else if(si===21)this.bold=!1;else if(si===22)this.faint=!1,this.bold=!1;else if(si===23)this.italic=!1;else if(si===24)this.underline=!1;else if(si===39)this.fg=null;else if(si===49)this.bg=null;else if(si>=30&&si<38)this.fg=this.ansi_colors[0][si-30];else if(si>=40&&si<48)this.bg=this.ansi_colors[0][si-40];else if(si>=90&&si<98)this.fg=this.ansi_colors[1][si-90];else if(si>=100&&si<108)this.bg=this.ansi_colors[1][si-100];else if((si===38||si===48)&&ii.length>0){let ai=si===38,li=ii.shift();if(li==="5"&&ii.length>0){let fi=parseInt(ii.shift(),10);fi>=0&&fi<=255&&(ai?this.fg=this.palette_256[fi]:this.bg=this.palette_256[fi])}if(li==="2"&&ii.length>2){let fi=parseInt(ii.shift(),10),hi=parseInt(ii.shift(),10),_i=parseInt(ii.shift(),10);if(fi>=0&&fi<=255&&hi>=0&&hi<=255&&_i>=0&&_i<=255){let ji={rgb:[fi,hi,_i],class_name:"truecolor"};ai?this.fg=ji:this.bg=ji}}}}}transform_to_html(ti){let ii=ti.text;if(ii.length===0||(ii=this.escape_txt_for_html(ii),!ti.bold&&!ti.italic&&!ti.underline&&ti.fg===null&&ti.bg===null))return ii;let ni=[],si=[],ai=ti.fg,li=ti.bg;ti.bold&&ni.push(this._boldStyle),ti.faint&&ni.push(this._faintStyle),ti.italic&&ni.push(this._italicStyle),ti.underline&&ni.push(this._underlineStyle),this._use_classes?(ai&&(ai.class_name!=="truecolor"?si.push(`${ai.class_name}-fg`):ni.push(`color:rgb(${ai.rgb.join(",")})`)),li&&(li.class_name!=="truecolor"?si.push(`${li.class_name}-bg`):ni.push(`background-color:rgb(${li.rgb.join(",")})`))):(ai&&ni.push(`color:rgb(${ai.rgb.join(",")})`),li&&ni.push(`background-color:rgb(${li.rgb})`));let fi="",hi="";return si.length&&(fi=` class="${si.join(" ")}"`),ni.length&&(hi=` style="${ni.join(";")}"`),`<span${hi}${fi}>${ii}</span>`}process_hyperlink(ti){let ii=ti.url.split(":");return ii.length<1||!this._url_allowlist[ii[0]]?"":`<a href="${this.escape_txt_for_html(ti.url)}">${this.escape_txt_for_html(ti.text)}</a>`}}function Fy(ei,...ti){let ii=ei.raw[0],ni=/^\s+|\s+\n|\s*#[\s\S]*?\n|\n/gm,si=ii.replace(ni,"");return new RegExp(si)}function YL(ei,...ti){let ii=ei.raw[0],ni=/^\s+|\s+\n|\s*#[\s\S]*?\n|\n/gm,si=ii.replace(ni,"");return new RegExp(si,"g")}var Iy,Py,qy;const JL=[[/\x1b\[\d+[A-H]/g,""],[/\x1b\[\d?[JK]/g,"\r"]];function ZL(ei){const ti=new QL;if(ti.use_classes=!0,ei.endsWith(`\r
|
|||
|
`)?ei=ei.substring(0,ei.length-2):ei.endsWith(`
|
|||
|
`)&&(ei=ei.substring(0,ei.length-1)),ei.includes("\x1B"))for(const[ni,si]of JL)ei=ei.replace(ni,si);if(!ei.includes("\r"))return ti.ansi_to_html(ei);const ii=[];for(const ni of ei.split("\r")){if(ni==="")continue;const si=ti.ansi_to_html(ni);si!==""&&ii.push(si)}return ii.join(`
|
|||
|
`)}const Ny={name:"RepoActionView",components:{SvgIcon:Io.Ah,ActionRunStatus:GL},props:{runIndex:String,jobIndex:String,actionsURL:String,locale:Object},data(){return{loading:!1,intervalID:null,currentJobStepsStates:[],artifacts:[],onHoverRerunIndex:-1,menuVisible:!1,isFullScreen:!1,timeVisible:{"log-time-stamp":!1,"log-time-seconds":!1},run:{link:"",title:"",status:"",canCancel:!1,canApprove:!1,canRerun:!1,done:!1,workflowID:"",workflowLink:"",isSchedule:!1,jobs:[],commit:{localeCommit:"",localePushedBy:"",shortSHA:"",link:"",pusher:{displayName:"",link:""},branch:{name:"",link:""}}},currentJob:{title:"",detail:"",steps:[]}}},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:{getLogsContainer(ei){const ti=this.$refs.logs[ei];return ti._stepLogsActiveContainer??ti},beginLogGroup(ei){const ti=this.$refs.logs[ei],ii=document.createElement("div");ii.classList.add("job-log-group");const ni=document.createElement("div");ni.classList.add("job-log-group-summary");const si=document.createElement("div");si.classList.add("job-log-list"),ii.append(ni),ii.append(si),ti._stepLogsActiveContainer=si},endLogGroup(ei){const ti=this.$refs.logs[ei];ti._stepLogsActiveContainer=null},toggleStepLogs(ei){this.currentJobStepsStates[ei].expanded=!this.currentJobStepsStates[ei].expanded,this.currentJobStepsStates[ei].expanded&&this.loadJob()},cancelRun(){(0,so.LO)(`${this.run.link}/cancel`)},approveRun(){(0,so.LO)(`${this.run.link}/approve`)},createLogLine(ei,ti,ii){const ni=document.createElement("div");ni.classList.add("job-log-line"),ni.setAttribute("id",`jobstep-${ii}-${ei.index}`),ni._jobLogTime=ei.timestamp;const si=document.createElement("a");si.classList.add("line-num","muted"),si.textContent=ei.index,si.setAttribute("href",`#jobstep-${ii}-${ei.index}`),ni.append(si);const ai=document.createElement("span");ai.className="log-time-stamp";const li=new Date(parseFloat(ei.timestamp*1e3)),fi=(0,_b.Rt)(li);ai.textContent=fi,(0,zn.oi)(ai,this.timeVisible["log-time-stamp"]);const hi=document.createElement("span");hi.className="log-time-seconds";const _i=Math.floor(parseFloat(ei.timestamp)-parseFloat(ti));hi.textContent=`${_i}s`,(0,zn.oi)(hi,this.timeVisible["log-time-seconds"]);const ji=document.createElement("span");return ji.className="log-msg",ji.innerHTML=ZL(ei.message),ni.append(ai),ni.append(ji),ni.append(hi),ni},appendLogs(ei,ti,ii){for(const ni of ti)this.getLogsContainer(ei).append(this.createLogLine(ni,ii,ei))},async fetchArtifacts(){return await(await(0,so.fG)(`${this.actionsURL}/runs/${this.runIndex}/artifacts`)).json()},async deleteArtifact(ei){window.confirm(this.locale.confirmDeleteArtifact.replace("%s",ei))&&(await(0,so.SJ)(`${this.run.link}/artifacts/${ei}`),await this.loadJob())},async fetchJob(){const ei=this.currentJobStepsStates.map((ii,ni)=>({step:ni,cursor:ii.cursor,expanded:ii.expanded}));return await(await(0,so.LO)(`${this.actionsURL}/runs/${this.runIndex}/jobs/${this.jobIndex}`,{data:{logCursors:ei}})).json()},async loadJob(){if(!this.loading)try{this.loading=!0;let ei,ti;try{[ei,ti]=await Promise.all([this.fetchJob(),this.fetchArtifacts()])}catch(ii){if(ii instanceof TypeError)return;throw ii}this.artifacts=ti.artifacts||[],this.run=ei.state.run,this.currentJob=ei.state.currentJob;for(let ii=0;ii<this.currentJob.steps.length;ii++)this.currentJobStepsStates[ii]||(this.currentJobStepsStates[ii]={cursor:null,expanded:!1});for(const ii of ei.logs.stepsLog)this.currentJobStepsStates[ii.step].cursor=ii.cursor,this.appendLogs(ii.step,ii.lines,ii.started);this.run.done&&this.intervalID&&(clearInterval(this.intervalID),this.intervalID=null)}finally{this.loading=!1}},isDone(ei){return["success","skipped","failure","cance
|
|||
|
|
|||
|
//# sourceMappingURL=index.js.df4efb37.map
|