PageSourceSearch

https://hellonash.ai/assets/codemirror-language.fYY1KuXq.js

js hellonash.ai collected 2026-10-05 12:01:55 UTC 17,898 bytes, 1 lines download raw bytes

vendor: 4,250 bytes, line 1
1import{b$ as t,c0 as e,bX as r,c1 as s,c2 as n,c3 as i,c4 as o,c5 as a,c6 as l,c7 as h,c8 as c}from"./vendor.CwFuMHEp.js";import{P as u,F as f,d,E as p,f as m,j as g,S as k,l as w}from"./codemirror-state.BBEo-1jv.js";import{E as v,V as y,D as x,l as b,a as A}from"./codemirror-view.Evc6LZf4.js";var S;const C=new t;function T(t){return f.define({combine:t?e=>e.concat(t):void 0})}const B=new t;class P{constructor(t,e,r=[],s=""){this.data=t,this.name=s,p.prototype.hasOwnProperty("tree")||Object.defineProperty(p.prototype,"tree",{get(){return I(this)}}),this.parser=e,this.extension=[F.of(this),p.languageData.of((t,e,r)=>{let s=D(t,e,r),n=s.type.prop(C);if(!n)return[];let i=t.facet(n),o=s.type.prop(B);if(o){let n=s.resolve(e-s.from,r);for(let e of o)if(e.test(n,t)){let r=t.facet(e.facet);return"replace"==e.type?r:r.concat(i)}}return i})].concat(r)}isActiveAt(t,e,r=-1){return D(t,e,r).type.prop(C)==this.data}findRegions(e){let r=e.facet(F);if((null==r?void 0:r.data)==this.data)return[{from:0,to:e.doc.length}];if(!r||!r.allowsNesting)return[];let s=[],i=(e,r)=>{if(e.prop(C)==this.data)return void s.push({from:r,to:r+e.length});let o=e.prop(t.mounted);if(o){if(o.tree.prop(C)==this.data){if(o.overlay)for(let t of o.overlay)s.push({from:t.from+r,to:t.to+r});else s.push({from:r,to:r+e.length});return}if(o.overlay){let t=s.length;if(i(o.tree,o.overlay[0].from+r),s.length>t)return}}for(let t=0;t<e.children.length;t++){let s=e.children[t];s instanceof n&&i(s,e.positions[t]+r)}};return i(I(e),0),s}get allowsNesting(){return!0}}function D(t,e,r){let s=t.facet(F),n=I(t).topNode;if(!s||s.allowsNesting)for(let o=n;o;o=o.enter(e,r,i.ExcludeBuffers|i.EnterBracketed))o.type.isTop&&(n=o);return n}P.setState=k.define();class O extends P{constructor(t,e,r){super(t,e,[],r),this.parser=e}static define(t){let e=T(t.languageData);return new O(e,t.parser.configure({props:[C.add(t=>t.isTop?e:void 0)]}),t.name)}configure(t,e){return new O(this.data,this.parser.configure(t),e||this.name)}get allowsNesting(){return this.parser.hasWrappers()}}function I(t){let e=t.field(P.state,!1);return e?e.tree:n.empty}class N{constructor(t){this.doc=t,this.cursorPos=0,this.string="",this.cursor=t.iter()}get length(){return this.doc.length}syncTo(t){return this.string=this.cursor.next(t-this.cursorPos).value,this.cursorPos=t+this.string.length,this.cursorPos-this.string.length}chunk(t){return this.syncTo(t),this.string}get lineChunks(){return!0}read(t,e){let r=this.cursorPos-this.string.length;return t<r||e>=this.cursorPos?this.doc.sliceString(t,e):this.string.slice(t-r,e-r)}}let L=null;class j{constructor(t,e,r=[],s,n,i,o,a){this.parser=t,this.state=e,this.fragments=r,this.tree=s,this.treeLen=n,this.viewport=i,this.skipped=o,this.scheduleOn=a,this.parse=null,this.tempSkipped=[]}static create(t,e,r){return new j(t,e,[],n.empty,0,r,[],null)}startParse(){return this.parser.startParse(new N(this.state.doc),this.fragments)}work(t,e){return null!=e&&e>=this.state.doc.length&&(e=void 0),this.tree!=n.empty&&this.isDone(null!=e?e:this.state.doc.length)?(this.takeTree(),!0):this.withContext(()=>{var r;if("number"==typeof t){let e=Date.now()+t;t=()=>Date.now()>e}for(this.parse||(this.parse=this.startParse()),null!=e&&(null==this.parse.stoppedAt||this.parse.stoppedAt>e)&&e<this.state.doc.length&&this.parse.stopAt(e);;){let s=this.parse.advance();if(s){if(this.fragments=this.withoutTempSkipped(o.addTree(s,this.fragments,null!=this.parse.stoppedAt)),this.treeLen=null!==(r=this.parse.stoppedAt)&&void 0!==r?r:this.state.doc.length,this.tree=s,this.parse=null,!(this.treeLen<(null!=e?e:this.state.doc.length)))return!0;this.parse=this.startParse()}if(t())return!1}})}takeTree(){let t,e;this.parse&&(t=this.parse.parsedPos)>=this.treeLen&&((null==this.parse.stoppedAt||this.parse.stoppedAt>t)&&this.parse.stopAt(t),this.withContext(()=>{for(;!(e=this.parse.advance()););}),this.treeLen=t,this.tree=e,this.fragments=this.withoutTempSkipped(o.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(t){let e=L;L=this;try{return t()}finally{L=e}}withoutTempSkipped(t){for(let e;e=this.tempSkipped.pop();)t=M(t,e.from,e.to);return t}changes(t,e){let{fragments:r,tree:s,treeLen:i,viewport:a,skipped:l}=this;if(this.takeTree(),!t.empty){let e=[];
vendor: 6,226 bytes, line 1
1if(t.iterChangedRanges((t,r,s,n)=>e.push({fromA:t,toA:r,fromB:s,toB:n})),r=o.applyChanges(r,e),s=n.empty,i=0,a={from:t.mapPos(a.from,-1),to:t.mapPos(a.to,1)},this.skipped.length){l=[];for(let e of this.skipped){let r=t.mapPos(e.from,1),s=t.mapPos(e.to,-1);r<s&&l.push({from:r,to:s})}}}return new j(this.parser,e,r,s,i,a,l,this.scheduleOn)}updateViewport(t){if(this.viewport.from==t.from&&this.viewport.to==t.to)return!1;this.viewport=t;let e=this.skipped.length;for(let r=0;r<this.skipped.length;r++){let{from:e,to:s}=this.skipped[r];e<t.to&&s>t.from&&(this.fragments=M(this.fragments,e,s),this.skipped.splice(r--,1))}return!(this.skipped.length>=e)&&(this.reset(),!0)}reset(){this.parse&&(this.takeTree(),this.parse=null)}skipUntilInView(t,e){this.skipped.push({from:t,to:e})}static getSkippingParser(t){return new class extends a{createParse(e,r,s){let i=s[0].from,o=s[s.length-1].to;return{parsedPos:i,advance(){let e=L;if(e){for(let t of s)e.tempSkipped.push(t);t&&(e.scheduleOn=e.scheduleOn?Promise.all([e.scheduleOn,t]):t)}return this.parsedPos=o,new n(l.none,[],[],o-i)},stoppedAt:null,stopAt(){}}}}}isDone(t){t=Math.min(t,this.state.doc.length);let e=this.fragments;return this.treeLen>=t&&e.length&&0==e[0].from&&e[0].to>=t}static get(){return L}}function M(t,e,r){return o.applyChanges(t,[{fromA:e,toA:r,fromB:e,toB:r}])}class E{constructor(t){this.context=t,this.tree=t.tree}apply(t){if(!t.docChanged&&this.tree==this.context.tree)return this;let e=this.context.changes(t.changes,t.state),r=this.context.treeLen==t.startState.doc.length?void 0:Math.max(t.changes.mapPos(this.context.treeLen),e.viewport.to);return e.work(20,r)||e.takeTree(),new E(e)}static init(t){let e=Math.min(3e3,t.doc.length),r=j.create(t.facet(F).parser,t,{from:0,to:e});return r.work(20,e)||r.takeTree(),new E(r)}}P.state=w.define({create:E.init,update(t,e){for(let r of e.effects)if(r.is(P.setState))return r.value;return e.startState.facet(F)!=e.state.facet(F)?E.init(e.state):t.apply(e)}});let W=t=>{let e=setTimeout(()=>t(),500);return()=>clearTimeout(e)};"undefined"!=typeof requestIdleCallback&&(W=t=>{let e=-1,r=setTimeout(()=>{e=requestIdleCallback(t,{timeout:400})},100);return()=>e<0?clearTimeout(r):cancelIdleCallback(e)});const R="undefined"!=typeof navigator&&(null===(S=navigator.scheduling)||void 0===S?void 0:S.isInputPending)?()=>navigator.scheduling.isInputPending():null,$=y.fromClass(class{constructor(t){this.view=t,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}update(t){let e=this.view.state.field(P.state).context;(e.updateViewport(t.view.viewport)||this.view.viewport.to>e.treeLen)&&this.scheduleWork(),(t.docChanged||t.selectionSet)&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(e)}scheduleWork(){if(this.working)return;let{state:t}=this.view,e=t.field(P.state);e.tree==e.context.tree&&e.context.isDone(t.doc.length)||(this.working=W(this.work))}work(t){this.working=null;let e=Date.now();if(this.chunkEnd<e&&(this.chunkEnd<0||this.view.hasFocus)&&(this.chunkEnd=e+3e4,this.chunkBudget=3e3),this.chunkBudget<=0)return;let{state:r,viewport:{to:s}}=this.view,n=r.field(P.state);if(n.tree==n.context.tree&&n.context.isDone(s+1e5))return;let i=Date.now()+Math.min(this.chunkBudget,100,t&&!R?Math.max(25,t.timeRemaining()-5):1e9),o=n.context.treeLen<s&&r.doc.length>s+1e3,a=n.context.work(()=>R&&R()||Date.now()>i,s+(o?0:1e5));this.chunkBudget-=Date.now()-e,(a||this.chunkBudget<=0)&&(n.context.takeTree(),this.view.dispatch({effects:P.setState.of(new E(n.context))})),this.chunkBudget>0&&(!a||o)&&this.scheduleWork(),this.checkAsyncSchedule(n.context)}checkAsyncSchedule(t){t.scheduleOn&&(this.workScheduled++,t.scheduleOn.then(()=>this.scheduleWork()).catch(t=>b(this.view.state,t)).then(()=>this.workScheduled--),t.scheduleOn=null)}destroy(){this.working&&this.working()}isWorking(){return!!(this.working||this.workScheduled>0)}},{eventHandlers:{focus(){this.scheduleWork()}}}),F=f.define({combine:t=>t.length?t[0]:null,enables:t=>[P.state,$,v.contentAttributes.compute([t],e=>{let r=e.facet(t);return r&&r.name?{"data-language":r.name}:{}})]});class q{constructor(t,e=[]){this.language=t,this.support=e,this.extension=[t,e]}}const V=f.define(),z=f.define({combine:t=>{if(!t.length)return"  ";let e=t[0];if(!e||/\S/.test(e)||Array.from(e).some(t=>t!=e[0]))throw new Error("Invalid indent unit: "+JSON.stringify(t[0]));return e}});function U(t){let e=t.facet(z);return 9==e.charCodeAt(0)?t.tabSize*e.length:e.length}function H(t,e){let r="",s=t.tabSize,n=t.facet(z)[0];if("\t"==n){for(;e>=s;)r+="\t",e-=s;n=" "}for(let i=0;i<e;i++)r+=n;return r}function J(t,e){t instanceof p&&(t=new X(t));for(let s of t.state.facet(V)){let r=s(t,e);if(void 0!==r)return r}let r=I(t.state);return r.length>=e?function(t,e,r){let s=e.resolveStack(r),n=e.resolveInner(r,-1).resolve(r,0).enterUnfinishedNodesBefore(r);if(n!=s.node){let t=[];for(let e=n;e&&!(e.from<s.node.from||e.to>s.node.to||e.from==s.node.from&&e.type==s.node.type);e=e.parent)t.push(e);for(let e=t.length-1;e>=0;e--)s={node:t[e],next:s}}return G(s,t,r)}(t,r,e):null}class X{constructor(t,e={}){this.state=t,this.options=e,this.unit=U(t)}lineAt(t,e=1){let r=this.state.doc.lineAt(t),{simulateBreak:s,simulateDoubleBreak:n}=this.options;return null!=s&&s>=r.from&&s<=r.to?n&&s==t?{text:"",from:t}:(e<0?s<t:s<=t)?{text:r.text.slice(s-r.from),from:s}:{text:r.text.slice(0,s-r.from),from:r.from}:r}textAfterPos(t,e=1){if(this.options.simulateDoubleBreak&&t==this.options.simulateBreak)return"";let{text:r,from:s}=this.lineAt(t,e);return r.slice(t-s,Math.min(r.length,t+100-s))}column(t,e=1){let{text:r,from:s}=this.lineAt(t,e),n=this.countColumn(r,t-s),i=this.options.overrideIndentation?this.options.overrideIndentation(s):-1;return i>-1&&(n+=i-this.countColumn(r,r.search(/\S|$/))),n}countColumn(t,e=t.length){return m(t,this.state.tabSize,e)}lineIndent(t,e=1){let{text:r,from:s}=this.lineAt(t,e),n=this.options.overrideIndentation;if(n){let t=n(s);if(t>-1)return t}return this.countColumn(r,r.search(/\S|$/))}get simulatedBreak(){return this.options.simulateBreak||null}}const _=new t;function G(t,e,r){for(let s=t;s;s=s.next){let t=K(s.node);
vendor: 7,422 bytes, line 1
1if(t)return t(Y.create(e,r,s))}return 0}function K(e){let r=e.type.prop(_);if(r)return r;let s,n=e.firstChild;if(n&&(s=n.type.prop(t.closedBy))){let t=e.lastChild,r=t&&s.indexOf(t.name)>-1;return e=>et(e,!0,1,void 0,r&&!function(t){return t.pos==t.options.simulateBreak&&t.options.simulateDoubleBreak}(e)?t.from:void 0)}return null==e.parent?Q:null}function Q(){return 0}class Y extends X{constructor(t,e,r){super(t.state,t.options),this.base=t,this.pos=e,this.context=r}get node(){return this.context.node}static create(t,e,r){return new Y(t,e,r)}get textAfter(){return this.textAfterPos(this.pos)}get baseIndent(){return this.baseIndentFor(this.node)}baseIndentFor(t){let e=this.state.doc.lineAt(t.from);for(;;){let r=t.resolve(e.from);for(;r.parent&&r.parent.from==r.from;)r=r.parent;if(Z(r,t))break;e=this.state.doc.lineAt(r.from)}return this.lineIndent(e.from)}continue(){return G(this.context.next,this.base,this.pos)}}function Z(t,e){for(let r=e;r;r=r.parent)if(t==r)return!0;return!1}function tt({closing:t,align:e=!0,units:r=1}){return s=>et(s,e,r,t)}function et(t,e,r,s,n){let i=t.textAfter,o=i.match(/^\s*/)[0].length,a=s&&i.slice(o,o+s.length)==s||n==t.pos+o,l=e?function(t){let e=t.node,r=e.childAfter(e.from),s=e.lastChild;if(!r)return null;let n=t.options.simulateBreak,i=t.state.doc.lineAt(r.from),o=null==n||n<=i.from?i.to:Math.min(i.to,n);for(let a=r.to;;){let t=e.childAfter(a);if(!t||t==s)return null;if(!t.type.isSkipped){if(t.from>=o)return null;let e=/^ */.exec(i.text.slice(r.to-i.from))[0].length;return{from:r.from,to:r.to+e}}a=t.to}}(t):null;return l?a?t.column(l.from):t.column(l.to):t.baseIndent+(a?0:t.unit*r)}const rt=t=>t.baseIndent;function st({except:t,units:e=1}={}){return r=>{let s=t&&t.test(r.textAfter);return r.baseIndent+(s?0:e*r.unit)}}const nt=new t;function it(t){let e=t.firstChild,r=t.lastChild;return e&&e.to<r.from?{from:e.to,to:r.type.isError?t.to:r.from}:null}class ot{constructor(t,s){let n;function i(t){let e=r.newName();return(n||(n=Object.create(null)))["."+e]=t,e}this.specs=t;const o="string"==typeof s.all?s.all:s.all?i(s.all):void 0,a=s.scope;this.scope=a instanceof P?t=>t.prop(C)==a.data:a?t=>t==a:void 0,this.style=e(t.map(t=>({tag:t.tag,class:t.class||i(Object.assign({},t,{tag:null}))})),{all:o}).style,this.module=n?new r(n):null,this.themeType=s.themeType}static define(t,e){return new ot(t,e||{})}}const at=f.define(),lt=f.define({combine:t=>t.length?[t[0]]:null});function ht(t){let e=t.facet(at);return e.length?e:t.facet(lt)}function ct(t,e){let r,s=[ft];return t instanceof ot&&(t.module&&s.push(v.styleModule.of(t.module)),r=t.themeType),r?s.push(at.computeN([v.darkTheme],e=>e.facet(v.darkTheme)==("dark"==r)?[t]:[])):s.push(at.of(t)),s}class ut{constructor(t){this.markCache=Object.create(null),this.tree=I(t.state),this.decorations=this.buildDeco(t,ht(t.state)),this.decoratedTo=t.viewport.to}update(t){let e=I(t.state),r=ht(t.state),s=r!=ht(t.startState),{viewport:n}=t.view,i=t.changes.mapPos(this.decoratedTo,1);e.length<n.to&&!s&&e.type==this.tree.type&&i>=n.to?(this.decorations=this.decorations.map(t.changes),this.decoratedTo=i):(e!=this.tree||t.viewportChanged||s)&&(this.tree=e,this.decorations=this.buildDeco(t.view,r),this.decoratedTo=n.to)}buildDeco(t,e){if(!e||!this.tree.length)return x.none;let r=new g;for(let{from:n,to:i}of t.visibleRanges)s(this.tree,e,(t,e,s)=>{r.add(t,e,this.markCache[s]||(this.markCache[s]=x.mark({class:s})))},n,i);return r.finish()}}const ft=u.high(y.fromClass(ut,{decorations:t=>t.decorations})),dt=v.baseTheme({"&.cm-focused .cm-matchingBracket":{backgroundColor:"#328c8252"},"&.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bb555544"}}),pt="()[]{}",mt=f.define({combine:t=>d(t,{afterCursor:!0,brackets:pt,maxScanDistance:1e4,renderMatch:wt})}),gt=x.mark({class:"cm-matchingBracket"}),kt=x.mark({class:"cm-nonmatchingBracket"});function wt(t){let e=[],r=t.matched?gt:kt;return e.push(r.range(t.start.from,t.start.to)),t.end&&e.push(r.range(t.end.from,t.end.to)),e}function vt(t){let e=[],r=t.facet(mt);for(let s of t.selection.ranges){if(!s.empty)continue;let n=Ct(t,s.head,-1,r)||s.head>0&&Ct(t,s.head-1,1,r)||r.afterCursor&&(Ct(t,s.head,1,r)||s.head<t.doc.length&&Ct(t,s.head+1,-1,r));n&&(e=e.concat(r.renderMatch(n,t)))}return x.set(e,!0)}const yt=[y.fromClass(class{constructor(t){this.paused=!1,this.decorations=vt(t.state)}update(t){(t.docChanged||t.selectionSet||this.paused)&&(t.view.composing?(this.decorations=this.decorations.map(t.changes),this.paused=!0):(this.decorations=vt(t.state),this.paused=!1))}},{decorations:t=>t.decorations}),dt];function xt(t={}){return[mt.of(t),yt]}const bt=new t;function At(e,r,s){let n=e.prop(r<0?t.openedBy:t.closedBy);if(n)return n;if(1==e.name.length){let t=s.indexOf(e.name);if(t>-1&&t%2==(r<0?1:0))return[s[t+r]]}return null}function St(t){let e=t.type.prop(bt);return e?e(t.node):t}function Ct(t,e,r,s={}){let n=s.maxScanDistance||1e4,i=s.brackets||pt,o=I(t),a=o.resolveInner(e,r);for(let l=a;l;l=l.parent){let s=At(l.type,r,i);if(s&&l.from<l.to){let n=St(l);if(n&&(r>0?e>=n.from&&e<n.to:e>n.from&&e<=n.to))return Tt(t,e,r,l,n,s,i)}}return function(t,e,r,s,n,i,o){let a=r<0?t.sliceDoc(e-1,e):t.sliceDoc(e,e+1),l=o.indexOf(a);if(l<0||l%2==0!=r>0)return null;let h={from:r<0?e-1:e,to:r>0?e+1:e},c=t.doc.iterRange(e,r>0?t.doc.length:0),u=0;for(let f=0;!c.next().done&&f<=i;){let t=c.value;r<0&&(f+=t.length);let i=e+f*r;for(let e=r>0?0:t.length-1,a=r>0?t.length:-1;e!=a;e+=r){let a=o.indexOf(t[e]);if(!(a<0||s.resolveInner(i+e,1).type!=n))if(a%2==0==r>0)u++;else{if(1==u)return{start:h,end:{from:i+e,to:i+e+1},matched:a>>1==l>>1};u--}}r>0&&(f+=t.length)}return c.done?{start:h,matched:!1}:null}(t,e,r,o,a.type,n,i)}function Tt(t,e,r,s,n,i,o){let a=s.parent,l={from:n.from,to:n.to},h=0,c=null==a?void 0:a.cursor();if(c&&(r<0?c.childBefore(s.from):c.childAfter(s.to)))do{if(r<0?c.to<=s.from:c.from>=s.to){if(0==h&&i.indexOf(c.type.name)>-1&&c.from<c.to){let t=St(c);return{start:l,end:t?{from:t.from,to:t.to}:void 0,matched:!0}}if(At(c.type,r,o))h++;else if(At(c.type,-r,o)){if(0==h){let t=St(c);return{start:l,end:t&&t.from<t.to?{from:t.from,to:t.to}:void 0,matched:!1}}h--}}}while(r<0?c.prevSibling():c.nextSibling());return{start:l,matched:!1}}const Bt=Object.create(null),Pt=[l.none],Dt=[],Ot=Object.create(null),It=Object.create(null);for(let[jt,Mt]of[["variable","variableName"],["variable-2","variableName.special"],["string-2","string.special"],["def","variableName.definition"],["tag","tagName"],["attribute","attributeName"],["type","typeName"],["builtin","variableName.standard"],["qualifier","modifier"],["error","invalid"],["header","heading"],["property","propertyName"]])It[jt]=Lt(Bt,Mt);function Nt(t,e){Dt.indexOf(t)>-1||(Dt.push(t),console.warn(e))}function Lt(t,e){let r=[];for(let a of e.split(" ")){let e=[];for(let r of a.split(".")){let s=t[r]||h[r];s?"function"==typeof s?e.length?e=e.map(s):Nt(r,`Modifier ${r} used at start of tag`):e.length?Nt(r,`Tag ${r} used as modifier`):e=Array.isArray(s)?s:[s]:Nt(r,`Unknown highlighting tag ${r}`)}for(let t of e)r.push(t)}if(!r.length)return 0;let s=e.replace(/ /g,"_"),n=s+" "+r.map(t=>t.id),i=Ot[n];if(i)return i.id;let o=Ot[n]=l.define({id:Pt.length,name:s,props:[c({[s]:r})]});return Pt.push(o),o.id}A.RTL,A.LTR;export{ot as H,X as I,q as L,H as a,U as b,O as c,_ as d,st as e,nt as f,J as g,it as h,z as i,B as j,rt as k,tt as l,Ct as m,T as n,bt as o,ct as p,xt as q,I as s};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.