intlayer-editor 9.4.4 → 9.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/client/dist/assets/CodeBlockShiki-BEeimB71.js +2 -0
- package/client/dist/assets/MarkDownRender-DKvUNxNK.js +1 -0
- package/client/dist/assets/MarkDownRender-DhMlgm14.js +25 -0
- package/client/dist/assets/{MarkdownEditor-DWz0fVZF.js → MarkdownEditor-JjkRh9Wo.js} +54 -54
- package/client/dist/assets/{dist-CMBnegHe.js → dist-BMR831Ty.js} +1 -1
- package/client/dist/assets/dist-CcmWBeAo.js +1 -0
- package/client/dist/assets/dynamic-Cl5uPODm.js +41 -0
- package/client/dist/assets/index-CXSTru2g.js +108 -0
- package/client/dist/assets/index-CmHcNYMx.css +2 -0
- package/client/dist/assets/purify.es-7fJ1DZ6H.js +3 -0
- package/client/dist/assets/react-CwJFpaho.js +1 -0
- package/client/dist/assets/rolldown-runtime-hePW80VL.js +1 -0
- package/client/dist/assets/{shikiBundle-C2Pc5KKu.js → shikiBundle-CJIKzMGl.js} +1 -1
- package/client/dist/index.html +6 -5
- package/package.json +16 -17
- package/client/dist/assets/CodeBlockShiki-Bjm0Ego0.js +0 -2
- package/client/dist/assets/MarkDownRender-DL6ufzaY.js +0 -1
- package/client/dist/assets/MarkDownRender-clRAHZLd.js +0 -23
- package/client/dist/assets/dist-DmXGrB9_.js +0 -1
- package/client/dist/assets/dynamic-D3VGB1Rn.js +0 -41
- package/client/dist/assets/index-BNSCZ8xm.js +0 -108
- package/client/dist/assets/index-DB7qjJFL.css +0 -2
- package/client/dist/assets/purify.es-ChwZkWde.js +0 -3
- package/client/dist/assets/react-SIfiwpqq.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as e}from"./react-SIfiwpqq.js";import{a as t,i as n}from"./MarkDownRender-clRAHZLd.js";import{l as r}from"./index-BNSCZ8xm.js";var i=class extends Error{constructor(e){super(e),this.name=`ShikiError`}};function a(e){return o(e)}function o(e){return Array.isArray(e)?s(e):e instanceof RegExp?e:typeof e==`object`?c(e):e}function s(e){let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=o(e[n]);return t}function c(e){let t={};for(let n in e)t[n]=o(e[n]);return t}function l(e,...t){return t.forEach(t=>{for(let n in t)e[n]=t[n]}),e}function u(e){let t=~e.lastIndexOf(`/`)||~e.lastIndexOf(`\\`);return t===0?e:~t===e.length-1?u(e.substring(0,e.length-1)):e.substr(~t+1)}var d=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,f=class{static hasCaptures(e){return e!==null&&(d.lastIndex=0,d.test(e))}static replaceCaptures(e,t,n){return e.replace(d,(e,r,i,a)=>{let o=n[parseInt(r||i,10)];if(o){let e=t.substring(o.start,o.end);for(;e[0]===`.`;)e=e.substring(1);switch(a){case`downcase`:return e.toLowerCase();case`upcase`:return e.toUpperCase();default:return e}}else return e})}};function p(e,t){return e<t?-1:+(e>t)}function m(e,t){if(e===null&&t===null)return 0;if(!e)return-1;if(!t)return 1;let n=e.length,r=t.length;if(n===r){for(let r=0;r<n;r++){let n=p(e[r],t[r]);if(n!==0)return n}return 0}return n-r}function h(e){return!!(/^#[0-9a-f]{6}$/i.test(e)||/^#[0-9a-f]{8}$/i.test(e)||/^#[0-9a-f]{3}$/i.test(e)||/^#[0-9a-f]{4}$/i.test(e))}function g(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,`\\$&`)}var _=class{constructor(e){this.fn=e}cache=new Map;get(e){if(this.cache.has(e))return this.cache.get(e);let t=this.fn(e);return this.cache.set(e,t),t}},v=class{constructor(e,t,n){this._colorMap=e,this._defaults=t,this._root=n}static createFromRawTheme(e,t){return this.createFromParsedTheme(ie(e),t)}static createFromParsedTheme(e,t){return oe(e,t)}_cachedMatchRoot=new _(e=>this._root.match(e));getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(e){if(e===null)return this._defaults;let t=e.scopeName,n=this._cachedMatchRoot.get(t).find(t=>te(e.parent,t.parentScopes));return n?new re(n.fontStyle,n.foreground,n.background):null}},ee=class e{constructor(e,t){this.parent=e,this.scopeName=t}static push(t,n){for(let r of n)t=new e(t,r);return t}static from(...t){let n=null;for(let r=0;r<t.length;r++)n=new e(n,t[r]);return n}push(t){return new e(this,t)}getSegments(){let e=this,t=[];for(;e;)t.push(e.scopeName),e=e.parent;return t.reverse(),t}toString(){return this.getSegments().join(` `)}extends(e){return this===e||this.parent!==null&&this.parent.extends(e)}getExtensionIfDefined(e){let t=[],n=this;for(;n&&n!==e;)t.push(n.scopeName),n=n.parent;return n===e?t.reverse():void 0}};function te(e,t){if(t.length===0)return!0;for(let n=0;n<t.length;n++){let r=t[n],i=!1;if(r===`>`){if(n===t.length-1)return!1;r=t[++n],i=!0}for(;e&&!ne(e.scopeName,r);){if(i)return!1;e=e.parent}if(!e)return!1;e=e.parent}return!0}function ne(e,t){return t===e||e.startsWith(t)&&e[t.length]===`.`}var re=class{constructor(e,t,n){this.fontStyle=e,this.foregroundId=t,this.backgroundId=n}};function ie(e){if(!e||!e.settings||!Array.isArray(e.settings))return[];let t=e.settings,n=[],r=0;for(let e=0,i=t.length;e<i;e++){let i=t[e];if(!i.settings)continue;let a;if(typeof i.scope==`string`){let e=i.scope;e=e.replace(/^[,]+/,``),e=e.replace(/[,]+$/,``),a=e.split(`,`)}else a=Array.isArray(i.scope)?i.scope:[``];let o=-1;if(typeof i.settings.fontStyle==`string`){o=0;let e=i.settings.fontStyle.split(` `);for(let t=0,n=e.length;t<n;t++)switch(e[t]){case`italic`:o|=1;break;case`bold`:o|=2;break;case`underline`:o|=4;break;case`strikethrough`:o|=8}}let s=null;typeof i.settings.foreground==`string`&&h(i.settings.foreground)&&(s=i.settings.foreground);let c=null;typeof i.settings.background==`string`&&h(i.settings.background)&&(c=i.settings.background);for(let t=0,i=a.length;t<i;t++){let i=a[t].trim().split(` `),l=i[i.length-1],u=null;i.length>1&&(u=i.slice(0,i.length-1),u.reverse()),n[r++]=new ae(l,u,e,o,s,c)}}return n}var ae=class{constructor(e,t,n,r,i,a){this.scope=e,this.parentScopes=t,this.index=n,this.fontStyle=r,this.foreground=i,this.background=a}},y=(e=>(e[e.NotSet=-1]=`NotSet`,e[e.None=0]=`None`,e[e.Italic=1]=`Italic`,e[e.Bold=2]=`Bold`,e[e.Underline=4]=`Underline`,e[e.Strikethrough=8]=`Strikethrough`,e))(y||{});function oe(e,t){e.sort((e,t)=>{let n=p(e.scope,t.scope);return n!==0||(n=m(e.parentScopes,t.parentScopes),n!==0)?n:e.index-t.index});let n=0,r=`#000000`,i=`#ffffff`;for(;e.length>=1&&e[0].scope===``;){let t=e.shift();t.fontStyle!==-1&&(n=t.fontStyle),t.foreground!==null&&(r=t.foreground),t.background!==null&&(i=t.background)}let a=new se(t),o=new re(n,a.getId(r),a.getId(i)),s=new ue(new le(0,null,-1,0,0),[]);for(let t=0,n=e.length;t<n;t++){let n=e[t];s.insert(0,n.scope,n.parentScopes,n.fontStyle,a.getId(n.foreground),a.getId(n.background))}return new v(a,o,s)}var se=class{_isFrozen;_lastColorId;_id2color;_color2id;constructor(e){if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(e)){this._isFrozen=!0;for(let t=0,n=e.length;t<n;t++)this._color2id[e[t]]=t,this._id2color[t]=e[t]}else this._isFrozen=!1}getId(e){if(e===null)return 0;e=e.toUpperCase();let t=this._color2id[e];if(t)return t;if(this._isFrozen)throw Error(`Missing color in color map - ${e}`);return t=++this._lastColorId,this._color2id[e]=t,this._id2color[t]=e,t}getColorMap(){return this._id2color.slice(0)}},ce=Object.freeze([]),le=class e{scopeDepth;parentScopes;fontStyle;foreground;background;constructor(e,t,n,r,i){this.scopeDepth=e,this.parentScopes=t||ce,this.fontStyle=n,this.foreground=r,this.background=i}clone(){return new e(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(e){let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=e[n].clone();return t}acceptOverwrite(e,t,n,r){this.scopeDepth>e?console.log(`how did this happen?`):this.scopeDepth=e,t!==-1&&(this.fontStyle=t),n!==0&&(this.foreground=n),r!==0&&(this.background=r)}},ue=class e{constructor(e,t=[],n={}){this._mainRule=e,this._children=n,this._rulesWithParentScopes=t}_rulesWithParentScopes;static _cmpBySpecificity(e,t){if(e.scopeDepth!==t.scopeDepth)return t.scopeDepth-e.scopeDepth;let n=0,r=0;for(;e.parentScopes[n]===`>`&&n++,t.parentScopes[r]===`>`&&r++,!(n>=e.parentScopes.length||r>=t.parentScopes.length);){let i=t.parentScopes[r].length-e.parentScopes[n].length;if(i!==0)return i;n++,r++}return t.parentScopes.length-e.parentScopes.length}match(t){if(t!==``){let e=t.indexOf(`.`),n,r;if(e===-1?(n=t,r=``):(n=t.substring(0,e),r=t.substring(e+1)),this._children.hasOwnProperty(n))return this._children[n].match(r)}let n=this._rulesWithParentScopes.concat(this._mainRule);return n.sort(e._cmpBySpecificity),n}insert(t,n,r,i,a,o){if(n===``){this._doInsertHere(t,r,i,a,o);return}let s=n.indexOf(`.`),c,l;s===-1?(c=n,l=``):(c=n.substring(0,s),l=n.substring(s+1));let u;this._children.hasOwnProperty(c)?u=this._children[c]:(u=new e(this._mainRule.clone(),le.cloneArr(this._rulesWithParentScopes)),this._children[c]=u),u.insert(t+1,l,r,i,a,o)}_doInsertHere(e,t,n,r,i){if(t===null){this._mainRule.acceptOverwrite(e,n,r,i);return}for(let a=0,o=this._rulesWithParentScopes.length;a<o;a++){let o=this._rulesWithParentScopes[a];if(m(o.parentScopes,t)===0){o.acceptOverwrite(e,n,r,i);return}}n===-1&&(n=this._mainRule.fontStyle),r===0&&(r=this._mainRule.foreground),i===0&&(i=this._mainRule.background),this._rulesWithParentScopes.push(new le(e,t,n,r,i))}},b=class e{static toBinaryStr(e){return e.toString(2).padStart(32,`0`)}static print(t){let n=e.getLanguageId(t),r=e.getTokenType(t),i=e.getFontStyle(t),a=e.getForeground(t),o=e.getBackground(t);console.log({languageId:n,tokenType:r,fontStyle:i,foreground:a,background:o})}static getLanguageId(e){return(e&255)>>>0}static getTokenType(e){return(e&768)>>>8}static containsBalancedBrackets(e){return!!(e&1024)}static getFontStyle(e){return(e&30720)>>>11}static getForeground(e){return(e&16744448)>>>15}static getBackground(e){return(e&4278190080)>>>24}static set(t,n,r,i,a,o,s){let c=e.getLanguageId(t),l=e.getTokenType(t),u=+!!e.containsBalancedBrackets(t),d=e.getFontStyle(t),f=e.getForeground(t),p=e.getBackground(t);return n!==0&&(c=n),r!==8&&(l=fe(r)),i!==null&&(u=+!!i),a!==-1&&(d=a),o!==0&&(f=o),s!==0&&(p=s),(c<<0|l<<8|u<<10|d<<11|f<<15|p<<24)>>>0}};function de(e){return e}function fe(e){return e}function x(e,t){let n=[],r=me(e),i=r.next();for(;i!==null;){let e=0;if(i.length===2&&i.charAt(1)===`:`){switch(i.charAt(0)){case`R`:e=1;break;case`L`:e=-1;break;default:console.log(`Unknown priority ${i} in scope selector`)}i=r.next()}let t=o();if(n.push({matcher:t,priority:e}),i!==`,`)break;i=r.next()}return n;function a(){if(i===`-`){i=r.next();let e=a();return t=>!!e&&!e(t)}if(i===`(`){i=r.next();let e=s();return i===`)`&&(i=r.next()),e}if(pe(i)){let e=[];do e.push(i),i=r.next();while(pe(i));return n=>t(e,n)}return null}function o(){let e=[],t=a();for(;t;)e.push(t),t=a();return t=>e.every(e=>e(t))}function s(){let e=[],t=o();for(;t&&(e.push(t),i===`|`||i===`,`);){do i=r.next();while(i===`|`||i===`,`);t=o()}return t=>e.some(e=>e(t))}}function pe(e){return!!e&&!!e.match(/[\w\.:]+/)}function me(e){let t=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,n=t.exec(e);return{next:()=>{if(!n)return null;let r=n[0];return n=t.exec(e),r}}}function he(e){typeof e.dispose==`function`&&e.dispose()}var S=class{constructor(e){this.scopeName=e}toKey(){return this.scopeName}},ge=class{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}},_e=class{_references=[];_seenReferenceKeys=new Set;get references(){return this._references}visitedRule=new Set;add(e){let t=e.toKey();this._seenReferenceKeys.has(t)||(this._seenReferenceKeys.add(t),this._references.push(e))}},ve=class{constructor(e,t){this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new S(this.initialScopeName)]}seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){let e=this.Q;this.Q=[];let t=new _e;for(let n of e)ye(n,this.initialScopeName,this.repo,t);for(let e of t.references)if(e instanceof S){if(this.seenFullScopeRequests.has(e.scopeName))continue;this.seenFullScopeRequests.add(e.scopeName),this.Q.push(e)}else{if(this.seenFullScopeRequests.has(e.scopeName)||this.seenPartialScopeRequests.has(e.toKey()))continue;this.seenPartialScopeRequests.add(e.toKey()),this.Q.push(e)}}};function ye(e,t,n,r){let i=n.lookup(e.scopeName);if(!i){if(e.scopeName===t)throw Error(`No grammar provided for <${t}>`);return}let a=n.lookup(t);e instanceof S?C({baseGrammar:a,selfGrammar:i},r):be(e.ruleName,{baseGrammar:a,selfGrammar:i,repository:i.repository},r);let o=n.injections(e.scopeName);if(o)for(let e of o)r.add(new S(e))}function be(e,t,n){if(t.repository&&t.repository[e]){let r=t.repository[e];xe([r],t,n)}}function C(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&xe(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&xe(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function xe(e,t,n){for(let r of e){if(n.visitedRule.has(r))continue;n.visitedRule.add(r);let e=r.repository?l({},t.repository,r.repository):t.repository;Array.isArray(r.patterns)&&xe(r.patterns,{...t,repository:e},n);let i=r.include;if(!i)continue;let a=De(i);switch(a.kind){case 0:C({...t,selfGrammar:t.baseGrammar},n);break;case 1:C(t,n);break;case 2:be(a.ruleName,{...t,repository:e},n);break;case 3:case 4:let r=a.scopeName===t.selfGrammar.scopeName?t.selfGrammar:a.scopeName===t.baseGrammar.scopeName?t.baseGrammar:void 0;if(r){let i={baseGrammar:t.baseGrammar,selfGrammar:r,repository:e};a.kind===4?be(a.ruleName,i,n):C(i,n)}else a.kind===4?n.add(new ge(a.scopeName,a.ruleName)):n.add(new S(a.scopeName))}}}var Se=class{kind=0},Ce=class{kind=1},we=class{constructor(e){this.ruleName=e}kind=2},Te=class{constructor(e){this.scopeName=e}kind=3},Ee=class{constructor(e,t){this.scopeName=e,this.ruleName=t}kind=4};function De(e){if(e===`$base`)return new Se;if(e===`$self`)return new Ce;let t=e.indexOf(`#`);return t===-1?new Te(e):t===0?new we(e.substring(1)):new Ee(e.substring(0,t),e.substring(t+1))}var Oe=/\\(\d+)/,ke=/\\(\d+)/g,Ae=-1,je=-2;function Me(e){return e}function Ne(e){return e}var w=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(e,t,n,r){this.$location=e,this.id=t,this._name=n||null,this._nameIsCapturing=f.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=f.hasCaptures(this._contentName)}get debugName(){let e=this.$location?`${u(this.$location.filename)}:${this.$location.line}`:`unknown`;return`${this.constructor.name}#${this.id} @ ${e}`}getName(e,t){return!this._nameIsCapturing||this._name===null||e===null||t===null?this._name:f.replaceCaptures(this._name,e,t)}getContentName(e,t){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:f.replaceCaptures(this._contentName,e,t)}},Pe=class extends w{retokenizeCapturedWithRuleId;constructor(e,t,n,r,i){super(e,t,n,r),this.retokenizeCapturedWithRuleId=i}dispose(){}collectPatterns(e,t){throw Error(`Not supported!`)}compile(e,t){throw Error(`Not supported!`)}compileAG(e,t,n,r){throw Error(`Not supported!`)}},Fe=class extends w{_match;captures;_cachedCompiledPatterns;constructor(e,t,n,r,i){super(e,t,n,null),this._match=new T(r,this.id),this.captures=i,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(e,t){t.push(this._match)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new E,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},Ie=class extends w{hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,i){super(e,t,n,r),this.patterns=i.patterns,this.hasMissingPatterns=i.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null)}collectPatterns(e,t){for(let n of this.patterns)e.getRule(n).collectPatterns(e,t)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new E,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},Le=class extends w{_begin;beginCaptures;_end;endHasBackReferences;endCaptures;applyEndPatternLast;hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,i,a,o,s,c,l){super(e,t,n,r),this._begin=new T(i,this.id),this.beginCaptures=a,this._end=new T(o||``,-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=s,this.applyEndPatternLast=c||!1,this.patterns=l.patterns,this.hasMissingPatterns=l.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(e,t){return this._end.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e,t).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e,t).compileAG(e,n,r)}_getCachedCompiledPatterns(e,t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new E;for(let t of this.patterns)e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns);this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}return this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,t):this._cachedCompiledPatterns.setSource(0,t)),this._cachedCompiledPatterns}},Re=class extends w{_begin;beginCaptures;whileCaptures;_while;whileHasBackReferences;hasMissingPatterns;patterns;_cachedCompiledPatterns;_cachedCompiledWhilePatterns;constructor(e,t,n,r,i,a,o,s,c){super(e,t,n,r),this._begin=new T(i,this.id),this.beginCaptures=a,this.whileCaptures=s,this._while=new T(o,je),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=c.patterns,this.hasMissingPatterns=c.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null),this._cachedCompiledWhilePatterns&&=(this._cachedCompiledWhilePatterns.dispose(),null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(e,t){return this._while.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new E;for(let t of this.patterns)e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(e,t){return this._getCachedCompiledWhilePatterns(e,t).compile(e)}compileWhileAG(e,t,n,r){return this._getCachedCompiledWhilePatterns(e,t).compileAG(e,n,r)}_getCachedCompiledWhilePatterns(e,t){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new E,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,t||``),this._cachedCompiledWhilePatterns}},ze=class e{static createCaptureRule(e,t,n,r,i){return e.registerRule(e=>new Pe(t,e,n,r,i))}static getCompiledRuleId(t,n,r){return t.id||n.registerRule(i=>{if(t.id=i,t.match)return new Fe(t.$vscodeTextmateLocation,t.id,t.name,t.match,e._compileCaptures(t.captures,n,r));if(t.begin===void 0){t.repository&&(r=l({},r,t.repository));let i=t.patterns;return i===void 0&&t.include&&(i=[{include:t.include}]),new Ie(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,e._compilePatterns(i,n,r))}return t.while?new Re(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,e._compileCaptures(t.beginCaptures||t.captures,n,r),t.while,e._compileCaptures(t.whileCaptures||t.captures,n,r),e._compilePatterns(t.patterns,n,r)):new Le(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,e._compileCaptures(t.beginCaptures||t.captures,n,r),t.end,e._compileCaptures(t.endCaptures||t.captures,n,r),t.applyEndPatternLast,e._compilePatterns(t.patterns,n,r))}),t.id}static _compileCaptures(t,n,r){let i=[];if(t){let a=0;for(let e in t){if(e===`$vscodeTextmateLocation`)continue;let t=parseInt(e,10);t>a&&(a=t)}for(let e=0;e<=a;e++)i[e]=null;for(let a in t){if(a===`$vscodeTextmateLocation`)continue;let o=parseInt(a,10),s=0;t[a].patterns&&(s=e.getCompiledRuleId(t[a],n,r)),i[o]=e.createCaptureRule(n,t[a].$vscodeTextmateLocation,t[a].name,t[a].contentName,s)}}return i}static _compilePatterns(t,n,r){let i=[];if(t)for(let a=0,o=t.length;a<o;a++){let o=t[a],s=-1;if(o.include){let t=De(o.include);switch(t.kind){case 0:case 1:s=e.getCompiledRuleId(r[o.include],n,r);break;case 2:let i=r[t.ruleName];i&&(s=e.getCompiledRuleId(i,n,r));break;case 3:case 4:let a=t.scopeName,c=t.kind===4?t.ruleName:null,l=n.getExternalGrammar(a,r);if(l){if(c){let t=l.repository[c];t&&(s=e.getCompiledRuleId(t,n,l.repository))}else s=e.getCompiledRuleId(l.repository.$self,n,l.repository)}}}else s=e.getCompiledRuleId(o,n,r);if(s!==-1){let e=n.getRule(s),t=!1;if((e instanceof Ie||e instanceof Le||e instanceof Re)&&e.hasMissingPatterns&&e.patterns.length===0&&(t=!0),t)continue;i.push(s)}}return{patterns:i,hasMissingPatterns:(t?t.length:0)!==i.length}}},T=class e{source;ruleId;hasAnchor;hasBackReferences;_anchorCache;constructor(e,t){if(e&&typeof e==`string`){let t=e.length,n=0,r=[],i=!1;for(let a=0;a<t;a++)if(e.charAt(a)===`\\`&&a+1<t){let t=e.charAt(a+1);t===`z`?(r.push(e.substring(n,a)),r.push(`$(?!\\n)(?<!\\n)`),n=a+2):(t===`A`||t===`G`)&&(i=!0),a++}this.hasAnchor=i,n===0?this.source=e:(r.push(e.substring(n,t)),this.source=r.join(``))}else this.hasAnchor=!1,this.source=e;this._anchorCache=this.hasAnchor?this._buildAnchorCache():null,this.ruleId=t,this.hasBackReferences=typeof this.source==`string`&&Oe.test(this.source)}clone(){return new e(this.source,this.ruleId)}setSource(e){this.source!==e&&(this.source=e,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(e,t){if(typeof this.source!=`string`)throw Error(`This method should only be called if the source is a string`);let n=t.map(t=>e.substring(t.start,t.end));return ke.lastIndex=0,this.source.replace(ke,(e,t)=>g(n[parseInt(t,10)]||``))}_buildAnchorCache(){if(typeof this.source!=`string`)throw Error(`This method should only be called if the source is a string`);let e=[],t=[],n=[],r=[],i,a,o,s;for(i=0,a=this.source.length;i<a;i++)o=this.source.charAt(i),e[i]=o,t[i]=o,n[i]=o,r[i]=o,o===`\\`&&i+1<a&&(s=this.source.charAt(i+1),s===`A`?(e[i+1]=``,t[i+1]=``,n[i+1]=`A`,r[i+1]=`A`):s===`G`?(e[i+1]=``,t[i+1]=`G`,n[i+1]=``,r[i+1]=`G`):(e[i+1]=s,t[i+1]=s,n[i+1]=s,r[i+1]=s),i++);return{A0_G0:e.join(``),A0_G1:t.join(``),A1_G0:n.join(``),A1_G1:r.join(``)}}resolveAnchors(e,t){return!this.hasAnchor||!this._anchorCache||typeof this.source!=`string`?this.source:e?t?this._anchorCache.A1_G1:this._anchorCache.A1_G0:t?this._anchorCache.A0_G1:this._anchorCache.A0_G0}},E=class{_items;_hasAnchors;_cached;_anchorCache;constructor(){this._items=[],this._hasAnchors=!1,this._cached=null,this._anchorCache={A0_G0:null,A0_G1:null,A1_G0:null,A1_G1:null}}dispose(){this._disposeCaches()}_disposeCaches(){this._cached&&=(this._cached.dispose(),null),this._anchorCache.A0_G0&&(this._anchorCache.A0_G0.dispose(),this._anchorCache.A0_G0=null),this._anchorCache.A0_G1&&(this._anchorCache.A0_G1.dispose(),this._anchorCache.A0_G1=null),this._anchorCache.A1_G0&&(this._anchorCache.A1_G0.dispose(),this._anchorCache.A1_G0=null),this._anchorCache.A1_G1&&(this._anchorCache.A1_G1.dispose(),this._anchorCache.A1_G1=null)}push(e){this._items.push(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}unshift(e){this._items.unshift(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}length(){return this._items.length}setSource(e,t){this._items[e].source!==t&&(this._disposeCaches(),this._items[e].setSource(t))}compile(e){if(!this._cached){let t=this._items.map(e=>e.source);this._cached=new Be(e,t,this._items.map(e=>e.ruleId))}return this._cached}compileAG(e,t,n){return this._hasAnchors?t?n?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G0):n?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G0):this.compile(e)}_resolveAnchors(e,t,n){return new Be(e,this._items.map(e=>e.resolveAnchors(t,n)),this._items.map(e=>e.ruleId))}},Be=class{constructor(e,t,n){this.regExps=t,this.rules=n,this.scanner=e.createOnigScanner(t)}scanner;dispose(){typeof this.scanner.dispose==`function`&&this.scanner.dispose()}toString(){let e=[];for(let t=0,n=this.rules.length;t<n;t++)e.push(` - `+this.rules[t]+`: `+this.regExps[t]);return e.join(`
|
|
1
|
+
import{n as e}from"./rolldown-runtime-hePW80VL.js";import{a as t,i as n}from"./MarkDownRender-DhMlgm14.js";import{l as r}from"./index-CXSTru2g.js";var i=class extends Error{constructor(e){super(e),this.name=`ShikiError`}};function a(e){return o(e)}function o(e){return Array.isArray(e)?s(e):e instanceof RegExp?e:typeof e==`object`?c(e):e}function s(e){let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=o(e[n]);return t}function c(e){let t={};for(let n in e)t[n]=o(e[n]);return t}function l(e,...t){return t.forEach(t=>{for(let n in t)e[n]=t[n]}),e}function u(e){let t=~e.lastIndexOf(`/`)||~e.lastIndexOf(`\\`);return t===0?e:~t===e.length-1?u(e.substring(0,e.length-1)):e.substr(~t+1)}var d=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,f=class{static hasCaptures(e){return e!==null&&(d.lastIndex=0,d.test(e))}static replaceCaptures(e,t,n){return e.replace(d,(e,r,i,a)=>{let o=n[parseInt(r||i,10)];if(o){let e=t.substring(o.start,o.end);for(;e[0]===`.`;)e=e.substring(1);switch(a){case`downcase`:return e.toLowerCase();case`upcase`:return e.toUpperCase();default:return e}}else return e})}};function p(e,t){return e<t?-1:+(e>t)}function m(e,t){if(e===null&&t===null)return 0;if(!e)return-1;if(!t)return 1;let n=e.length,r=t.length;if(n===r){for(let r=0;r<n;r++){let n=p(e[r],t[r]);if(n!==0)return n}return 0}return n-r}function h(e){return!!(/^#[0-9a-f]{6}$/i.test(e)||/^#[0-9a-f]{8}$/i.test(e)||/^#[0-9a-f]{3}$/i.test(e)||/^#[0-9a-f]{4}$/i.test(e))}function g(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,`\\$&`)}var _=class{constructor(e){this.fn=e}cache=new Map;get(e){if(this.cache.has(e))return this.cache.get(e);let t=this.fn(e);return this.cache.set(e,t),t}},v=class{constructor(e,t,n){this._colorMap=e,this._defaults=t,this._root=n}static createFromRawTheme(e,t){return this.createFromParsedTheme(ie(e),t)}static createFromParsedTheme(e,t){return oe(e,t)}_cachedMatchRoot=new _(e=>this._root.match(e));getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(e){if(e===null)return this._defaults;let t=e.scopeName,n=this._cachedMatchRoot.get(t).find(t=>te(e.parent,t.parentScopes));return n?new re(n.fontStyle,n.foreground,n.background):null}},ee=class e{constructor(e,t){this.parent=e,this.scopeName=t}static push(t,n){for(let r of n)t=new e(t,r);return t}static from(...t){let n=null;for(let r=0;r<t.length;r++)n=new e(n,t[r]);return n}push(t){return new e(this,t)}getSegments(){let e=this,t=[];for(;e;)t.push(e.scopeName),e=e.parent;return t.reverse(),t}toString(){return this.getSegments().join(` `)}extends(e){return this===e||this.parent!==null&&this.parent.extends(e)}getExtensionIfDefined(e){let t=[],n=this;for(;n&&n!==e;)t.push(n.scopeName),n=n.parent;return n===e?t.reverse():void 0}};function te(e,t){if(t.length===0)return!0;for(let n=0;n<t.length;n++){let r=t[n],i=!1;if(r===`>`){if(n===t.length-1)return!1;r=t[++n],i=!0}for(;e&&!ne(e.scopeName,r);){if(i)return!1;e=e.parent}if(!e)return!1;e=e.parent}return!0}function ne(e,t){return t===e||e.startsWith(t)&&e[t.length]===`.`}var re=class{constructor(e,t,n){this.fontStyle=e,this.foregroundId=t,this.backgroundId=n}};function ie(e){if(!e||!e.settings||!Array.isArray(e.settings))return[];let t=e.settings,n=[],r=0;for(let e=0,i=t.length;e<i;e++){let i=t[e];if(!i.settings)continue;let a;if(typeof i.scope==`string`){let e=i.scope;e=e.replace(/^[,]+/,``),e=e.replace(/[,]+$/,``),a=e.split(`,`)}else a=Array.isArray(i.scope)?i.scope:[``];let o=-1;if(typeof i.settings.fontStyle==`string`){o=0;let e=i.settings.fontStyle.split(` `);for(let t=0,n=e.length;t<n;t++)switch(e[t]){case`italic`:o|=1;break;case`bold`:o|=2;break;case`underline`:o|=4;break;case`strikethrough`:o|=8}}let s=null;typeof i.settings.foreground==`string`&&h(i.settings.foreground)&&(s=i.settings.foreground);let c=null;typeof i.settings.background==`string`&&h(i.settings.background)&&(c=i.settings.background);for(let t=0,i=a.length;t<i;t++){let i=a[t].trim().split(` `),l=i[i.length-1],u=null;i.length>1&&(u=i.slice(0,i.length-1),u.reverse()),n[r++]=new ae(l,u,e,o,s,c)}}return n}var ae=class{constructor(e,t,n,r,i,a){this.scope=e,this.parentScopes=t,this.index=n,this.fontStyle=r,this.foreground=i,this.background=a}},y=(e=>(e[e.NotSet=-1]=`NotSet`,e[e.None=0]=`None`,e[e.Italic=1]=`Italic`,e[e.Bold=2]=`Bold`,e[e.Underline=4]=`Underline`,e[e.Strikethrough=8]=`Strikethrough`,e))(y||{});function oe(e,t){e.sort((e,t)=>{let n=p(e.scope,t.scope);return n!==0||(n=m(e.parentScopes,t.parentScopes),n!==0)?n:e.index-t.index});let n=0,r=`#000000`,i=`#ffffff`;for(;e.length>=1&&e[0].scope===``;){let t=e.shift();t.fontStyle!==-1&&(n=t.fontStyle),t.foreground!==null&&(r=t.foreground),t.background!==null&&(i=t.background)}let a=new se(t),o=new re(n,a.getId(r),a.getId(i)),s=new ue(new le(0,null,-1,0,0),[]);for(let t=0,n=e.length;t<n;t++){let n=e[t];s.insert(0,n.scope,n.parentScopes,n.fontStyle,a.getId(n.foreground),a.getId(n.background))}return new v(a,o,s)}var se=class{_isFrozen;_lastColorId;_id2color;_color2id;constructor(e){if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(e)){this._isFrozen=!0;for(let t=0,n=e.length;t<n;t++)this._color2id[e[t]]=t,this._id2color[t]=e[t]}else this._isFrozen=!1}getId(e){if(e===null)return 0;e=e.toUpperCase();let t=this._color2id[e];if(t)return t;if(this._isFrozen)throw Error(`Missing color in color map - ${e}`);return t=++this._lastColorId,this._color2id[e]=t,this._id2color[t]=e,t}getColorMap(){return this._id2color.slice(0)}},ce=Object.freeze([]),le=class e{scopeDepth;parentScopes;fontStyle;foreground;background;constructor(e,t,n,r,i){this.scopeDepth=e,this.parentScopes=t||ce,this.fontStyle=n,this.foreground=r,this.background=i}clone(){return new e(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(e){let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=e[n].clone();return t}acceptOverwrite(e,t,n,r){this.scopeDepth>e?console.log(`how did this happen?`):this.scopeDepth=e,t!==-1&&(this.fontStyle=t),n!==0&&(this.foreground=n),r!==0&&(this.background=r)}},ue=class e{constructor(e,t=[],n={}){this._mainRule=e,this._children=n,this._rulesWithParentScopes=t}_rulesWithParentScopes;static _cmpBySpecificity(e,t){if(e.scopeDepth!==t.scopeDepth)return t.scopeDepth-e.scopeDepth;let n=0,r=0;for(;e.parentScopes[n]===`>`&&n++,t.parentScopes[r]===`>`&&r++,!(n>=e.parentScopes.length||r>=t.parentScopes.length);){let i=t.parentScopes[r].length-e.parentScopes[n].length;if(i!==0)return i;n++,r++}return t.parentScopes.length-e.parentScopes.length}match(t){if(t!==``){let e=t.indexOf(`.`),n,r;if(e===-1?(n=t,r=``):(n=t.substring(0,e),r=t.substring(e+1)),this._children.hasOwnProperty(n))return this._children[n].match(r)}let n=this._rulesWithParentScopes.concat(this._mainRule);return n.sort(e._cmpBySpecificity),n}insert(t,n,r,i,a,o){if(n===``){this._doInsertHere(t,r,i,a,o);return}let s=n.indexOf(`.`),c,l;s===-1?(c=n,l=``):(c=n.substring(0,s),l=n.substring(s+1));let u;this._children.hasOwnProperty(c)?u=this._children[c]:(u=new e(this._mainRule.clone(),le.cloneArr(this._rulesWithParentScopes)),this._children[c]=u),u.insert(t+1,l,r,i,a,o)}_doInsertHere(e,t,n,r,i){if(t===null){this._mainRule.acceptOverwrite(e,n,r,i);return}for(let a=0,o=this._rulesWithParentScopes.length;a<o;a++){let o=this._rulesWithParentScopes[a];if(m(o.parentScopes,t)===0){o.acceptOverwrite(e,n,r,i);return}}n===-1&&(n=this._mainRule.fontStyle),r===0&&(r=this._mainRule.foreground),i===0&&(i=this._mainRule.background),this._rulesWithParentScopes.push(new le(e,t,n,r,i))}},b=class e{static toBinaryStr(e){return e.toString(2).padStart(32,`0`)}static print(t){let n=e.getLanguageId(t),r=e.getTokenType(t),i=e.getFontStyle(t),a=e.getForeground(t),o=e.getBackground(t);console.log({languageId:n,tokenType:r,fontStyle:i,foreground:a,background:o})}static getLanguageId(e){return(e&255)>>>0}static getTokenType(e){return(e&768)>>>8}static containsBalancedBrackets(e){return!!(e&1024)}static getFontStyle(e){return(e&30720)>>>11}static getForeground(e){return(e&16744448)>>>15}static getBackground(e){return(e&4278190080)>>>24}static set(t,n,r,i,a,o,s){let c=e.getLanguageId(t),l=e.getTokenType(t),u=+!!e.containsBalancedBrackets(t),d=e.getFontStyle(t),f=e.getForeground(t),p=e.getBackground(t);return n!==0&&(c=n),r!==8&&(l=fe(r)),i!==null&&(u=+!!i),a!==-1&&(d=a),o!==0&&(f=o),s!==0&&(p=s),(c<<0|l<<8|u<<10|d<<11|f<<15|p<<24)>>>0}};function de(e){return e}function fe(e){return e}function x(e,t){let n=[],r=me(e),i=r.next();for(;i!==null;){let e=0;if(i.length===2&&i.charAt(1)===`:`){switch(i.charAt(0)){case`R`:e=1;break;case`L`:e=-1;break;default:console.log(`Unknown priority ${i} in scope selector`)}i=r.next()}let t=o();if(n.push({matcher:t,priority:e}),i!==`,`)break;i=r.next()}return n;function a(){if(i===`-`){i=r.next();let e=a();return t=>!!e&&!e(t)}if(i===`(`){i=r.next();let e=s();return i===`)`&&(i=r.next()),e}if(pe(i)){let e=[];do e.push(i),i=r.next();while(pe(i));return n=>t(e,n)}return null}function o(){let e=[],t=a();for(;t;)e.push(t),t=a();return t=>e.every(e=>e(t))}function s(){let e=[],t=o();for(;t&&(e.push(t),i===`|`||i===`,`);){do i=r.next();while(i===`|`||i===`,`);t=o()}return t=>e.some(e=>e(t))}}function pe(e){return!!e&&!!e.match(/[\w\.:]+/)}function me(e){let t=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,n=t.exec(e);return{next:()=>{if(!n)return null;let r=n[0];return n=t.exec(e),r}}}function he(e){typeof e.dispose==`function`&&e.dispose()}var S=class{constructor(e){this.scopeName=e}toKey(){return this.scopeName}},ge=class{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}},_e=class{_references=[];_seenReferenceKeys=new Set;get references(){return this._references}visitedRule=new Set;add(e){let t=e.toKey();this._seenReferenceKeys.has(t)||(this._seenReferenceKeys.add(t),this._references.push(e))}},ve=class{constructor(e,t){this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new S(this.initialScopeName)]}seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){let e=this.Q;this.Q=[];let t=new _e;for(let n of e)ye(n,this.initialScopeName,this.repo,t);for(let e of t.references)if(e instanceof S){if(this.seenFullScopeRequests.has(e.scopeName))continue;this.seenFullScopeRequests.add(e.scopeName),this.Q.push(e)}else{if(this.seenFullScopeRequests.has(e.scopeName)||this.seenPartialScopeRequests.has(e.toKey()))continue;this.seenPartialScopeRequests.add(e.toKey()),this.Q.push(e)}}};function ye(e,t,n,r){let i=n.lookup(e.scopeName);if(!i){if(e.scopeName===t)throw Error(`No grammar provided for <${t}>`);return}let a=n.lookup(t);e instanceof S?C({baseGrammar:a,selfGrammar:i},r):be(e.ruleName,{baseGrammar:a,selfGrammar:i,repository:i.repository},r);let o=n.injections(e.scopeName);if(o)for(let e of o)r.add(new S(e))}function be(e,t,n){if(t.repository&&t.repository[e]){let r=t.repository[e];xe([r],t,n)}}function C(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&xe(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&xe(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function xe(e,t,n){for(let r of e){if(n.visitedRule.has(r))continue;n.visitedRule.add(r);let e=r.repository?l({},t.repository,r.repository):t.repository;Array.isArray(r.patterns)&&xe(r.patterns,{...t,repository:e},n);let i=r.include;if(!i)continue;let a=De(i);switch(a.kind){case 0:C({...t,selfGrammar:t.baseGrammar},n);break;case 1:C(t,n);break;case 2:be(a.ruleName,{...t,repository:e},n);break;case 3:case 4:let r=a.scopeName===t.selfGrammar.scopeName?t.selfGrammar:a.scopeName===t.baseGrammar.scopeName?t.baseGrammar:void 0;if(r){let i={baseGrammar:t.baseGrammar,selfGrammar:r,repository:e};a.kind===4?be(a.ruleName,i,n):C(i,n)}else a.kind===4?n.add(new ge(a.scopeName,a.ruleName)):n.add(new S(a.scopeName))}}}var Se=class{kind=0},Ce=class{kind=1},we=class{constructor(e){this.ruleName=e}kind=2},Te=class{constructor(e){this.scopeName=e}kind=3},Ee=class{constructor(e,t){this.scopeName=e,this.ruleName=t}kind=4};function De(e){if(e===`$base`)return new Se;if(e===`$self`)return new Ce;let t=e.indexOf(`#`);return t===-1?new Te(e):t===0?new we(e.substring(1)):new Ee(e.substring(0,t),e.substring(t+1))}var Oe=/\\(\d+)/,ke=/\\(\d+)/g,Ae=-1,je=-2;function Me(e){return e}function Ne(e){return e}var w=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(e,t,n,r){this.$location=e,this.id=t,this._name=n||null,this._nameIsCapturing=f.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=f.hasCaptures(this._contentName)}get debugName(){let e=this.$location?`${u(this.$location.filename)}:${this.$location.line}`:`unknown`;return`${this.constructor.name}#${this.id} @ ${e}`}getName(e,t){return!this._nameIsCapturing||this._name===null||e===null||t===null?this._name:f.replaceCaptures(this._name,e,t)}getContentName(e,t){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:f.replaceCaptures(this._contentName,e,t)}},Pe=class extends w{retokenizeCapturedWithRuleId;constructor(e,t,n,r,i){super(e,t,n,r),this.retokenizeCapturedWithRuleId=i}dispose(){}collectPatterns(e,t){throw Error(`Not supported!`)}compile(e,t){throw Error(`Not supported!`)}compileAG(e,t,n,r){throw Error(`Not supported!`)}},Fe=class extends w{_match;captures;_cachedCompiledPatterns;constructor(e,t,n,r,i){super(e,t,n,null),this._match=new T(r,this.id),this.captures=i,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(e,t){t.push(this._match)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new E,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},Ie=class extends w{hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,i){super(e,t,n,r),this.patterns=i.patterns,this.hasMissingPatterns=i.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null)}collectPatterns(e,t){for(let n of this.patterns)e.getRule(n).collectPatterns(e,t)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new E,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},Le=class extends w{_begin;beginCaptures;_end;endHasBackReferences;endCaptures;applyEndPatternLast;hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,i,a,o,s,c,l){super(e,t,n,r),this._begin=new T(i,this.id),this.beginCaptures=a,this._end=new T(o||``,-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=s,this.applyEndPatternLast=c||!1,this.patterns=l.patterns,this.hasMissingPatterns=l.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(e,t){return this._end.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e,t).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e,t).compileAG(e,n,r)}_getCachedCompiledPatterns(e,t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new E;for(let t of this.patterns)e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns);this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}return this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,t):this._cachedCompiledPatterns.setSource(0,t)),this._cachedCompiledPatterns}},Re=class extends w{_begin;beginCaptures;whileCaptures;_while;whileHasBackReferences;hasMissingPatterns;patterns;_cachedCompiledPatterns;_cachedCompiledWhilePatterns;constructor(e,t,n,r,i,a,o,s,c){super(e,t,n,r),this._begin=new T(i,this.id),this.beginCaptures=a,this.whileCaptures=s,this._while=new T(o,je),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=c.patterns,this.hasMissingPatterns=c.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null),this._cachedCompiledWhilePatterns&&=(this._cachedCompiledWhilePatterns.dispose(),null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(e,t){return this._while.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new E;for(let t of this.patterns)e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(e,t){return this._getCachedCompiledWhilePatterns(e,t).compile(e)}compileWhileAG(e,t,n,r){return this._getCachedCompiledWhilePatterns(e,t).compileAG(e,n,r)}_getCachedCompiledWhilePatterns(e,t){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new E,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,t||``),this._cachedCompiledWhilePatterns}},ze=class e{static createCaptureRule(e,t,n,r,i){return e.registerRule(e=>new Pe(t,e,n,r,i))}static getCompiledRuleId(t,n,r){return t.id||n.registerRule(i=>{if(t.id=i,t.match)return new Fe(t.$vscodeTextmateLocation,t.id,t.name,t.match,e._compileCaptures(t.captures,n,r));if(t.begin===void 0){t.repository&&(r=l({},r,t.repository));let i=t.patterns;return i===void 0&&t.include&&(i=[{include:t.include}]),new Ie(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,e._compilePatterns(i,n,r))}return t.while?new Re(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,e._compileCaptures(t.beginCaptures||t.captures,n,r),t.while,e._compileCaptures(t.whileCaptures||t.captures,n,r),e._compilePatterns(t.patterns,n,r)):new Le(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,e._compileCaptures(t.beginCaptures||t.captures,n,r),t.end,e._compileCaptures(t.endCaptures||t.captures,n,r),t.applyEndPatternLast,e._compilePatterns(t.patterns,n,r))}),t.id}static _compileCaptures(t,n,r){let i=[];if(t){let a=0;for(let e in t){if(e===`$vscodeTextmateLocation`)continue;let t=parseInt(e,10);t>a&&(a=t)}for(let e=0;e<=a;e++)i[e]=null;for(let a in t){if(a===`$vscodeTextmateLocation`)continue;let o=parseInt(a,10),s=0;t[a].patterns&&(s=e.getCompiledRuleId(t[a],n,r)),i[o]=e.createCaptureRule(n,t[a].$vscodeTextmateLocation,t[a].name,t[a].contentName,s)}}return i}static _compilePatterns(t,n,r){let i=[];if(t)for(let a=0,o=t.length;a<o;a++){let o=t[a],s=-1;if(o.include){let t=De(o.include);switch(t.kind){case 0:case 1:s=e.getCompiledRuleId(r[o.include],n,r);break;case 2:let i=r[t.ruleName];i&&(s=e.getCompiledRuleId(i,n,r));break;case 3:case 4:let a=t.scopeName,c=t.kind===4?t.ruleName:null,l=n.getExternalGrammar(a,r);if(l){if(c){let t=l.repository[c];t&&(s=e.getCompiledRuleId(t,n,l.repository))}else s=e.getCompiledRuleId(l.repository.$self,n,l.repository)}}}else s=e.getCompiledRuleId(o,n,r);if(s!==-1){let e=n.getRule(s),t=!1;if((e instanceof Ie||e instanceof Le||e instanceof Re)&&e.hasMissingPatterns&&e.patterns.length===0&&(t=!0),t)continue;i.push(s)}}return{patterns:i,hasMissingPatterns:(t?t.length:0)!==i.length}}},T=class e{source;ruleId;hasAnchor;hasBackReferences;_anchorCache;constructor(e,t){if(e&&typeof e==`string`){let t=e.length,n=0,r=[],i=!1;for(let a=0;a<t;a++)if(e.charAt(a)===`\\`&&a+1<t){let t=e.charAt(a+1);t===`z`?(r.push(e.substring(n,a)),r.push(`$(?!\\n)(?<!\\n)`),n=a+2):(t===`A`||t===`G`)&&(i=!0),a++}this.hasAnchor=i,n===0?this.source=e:(r.push(e.substring(n,t)),this.source=r.join(``))}else this.hasAnchor=!1,this.source=e;this._anchorCache=this.hasAnchor?this._buildAnchorCache():null,this.ruleId=t,this.hasBackReferences=typeof this.source==`string`&&Oe.test(this.source)}clone(){return new e(this.source,this.ruleId)}setSource(e){this.source!==e&&(this.source=e,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(e,t){if(typeof this.source!=`string`)throw Error(`This method should only be called if the source is a string`);let n=t.map(t=>e.substring(t.start,t.end));return ke.lastIndex=0,this.source.replace(ke,(e,t)=>g(n[parseInt(t,10)]||``))}_buildAnchorCache(){if(typeof this.source!=`string`)throw Error(`This method should only be called if the source is a string`);let e=[],t=[],n=[],r=[],i,a,o,s;for(i=0,a=this.source.length;i<a;i++)o=this.source.charAt(i),e[i]=o,t[i]=o,n[i]=o,r[i]=o,o===`\\`&&i+1<a&&(s=this.source.charAt(i+1),s===`A`?(e[i+1]=``,t[i+1]=``,n[i+1]=`A`,r[i+1]=`A`):s===`G`?(e[i+1]=``,t[i+1]=`G`,n[i+1]=``,r[i+1]=`G`):(e[i+1]=s,t[i+1]=s,n[i+1]=s,r[i+1]=s),i++);return{A0_G0:e.join(``),A0_G1:t.join(``),A1_G0:n.join(``),A1_G1:r.join(``)}}resolveAnchors(e,t){return!this.hasAnchor||!this._anchorCache||typeof this.source!=`string`?this.source:e?t?this._anchorCache.A1_G1:this._anchorCache.A1_G0:t?this._anchorCache.A0_G1:this._anchorCache.A0_G0}},E=class{_items;_hasAnchors;_cached;_anchorCache;constructor(){this._items=[],this._hasAnchors=!1,this._cached=null,this._anchorCache={A0_G0:null,A0_G1:null,A1_G0:null,A1_G1:null}}dispose(){this._disposeCaches()}_disposeCaches(){this._cached&&=(this._cached.dispose(),null),this._anchorCache.A0_G0&&(this._anchorCache.A0_G0.dispose(),this._anchorCache.A0_G0=null),this._anchorCache.A0_G1&&(this._anchorCache.A0_G1.dispose(),this._anchorCache.A0_G1=null),this._anchorCache.A1_G0&&(this._anchorCache.A1_G0.dispose(),this._anchorCache.A1_G0=null),this._anchorCache.A1_G1&&(this._anchorCache.A1_G1.dispose(),this._anchorCache.A1_G1=null)}push(e){this._items.push(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}unshift(e){this._items.unshift(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}length(){return this._items.length}setSource(e,t){this._items[e].source!==t&&(this._disposeCaches(),this._items[e].setSource(t))}compile(e){if(!this._cached){let t=this._items.map(e=>e.source);this._cached=new Be(e,t,this._items.map(e=>e.ruleId))}return this._cached}compileAG(e,t,n){return this._hasAnchors?t?n?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G0):n?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G0):this.compile(e)}_resolveAnchors(e,t,n){return new Be(e,this._items.map(e=>e.resolveAnchors(t,n)),this._items.map(e=>e.ruleId))}},Be=class{constructor(e,t,n){this.regExps=t,this.rules=n,this.scanner=e.createOnigScanner(t)}scanner;dispose(){typeof this.scanner.dispose==`function`&&this.scanner.dispose()}toString(){let e=[];for(let t=0,n=this.rules.length;t<n;t++)e.push(` - `+this.rules[t]+`: `+this.regExps[t]);return e.join(`
|
|
2
2
|
`)}findNextMatchSync(e,t,n){let r=this.scanner.findNextMatchSync(e,t,n);return r?{ruleId:this.rules[r.index],captureIndices:r.captureIndices}:null}},Ve=class{constructor(e,t){this.languageId=e,this.tokenType=t}},He=class e{_defaultAttributes;_embeddedLanguagesMatcher;constructor(e,t){this._defaultAttributes=new Ve(e,8),this._embeddedLanguagesMatcher=new Ue(Object.entries(t||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(t){return t===null?e._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(t)}static _NULL_SCOPE_METADATA=new Ve(0,0);_getBasicScopeAttributes=new _(e=>new Ve(this._scopeToLanguage(e),this._toStandardTokenType(e)));_scopeToLanguage(e){return this._embeddedLanguagesMatcher.match(e)||0}_toStandardTokenType(t){let n=t.match(e.STANDARD_TOKEN_TYPE_REGEXP);if(!n)return 8;switch(n[1]){case`comment`:return 1;case`string`:return 2;case`regex`:return 3;case`meta.embedded`:return 0}throw Error(`Unexpected match for standard token type!`)}static STANDARD_TOKEN_TYPE_REGEXP=/\b(comment|string|regex|meta\.embedded)\b/},Ue=class{values;scopesRegExp;constructor(e){if(e.length===0)this.values=null,this.scopesRegExp=null;else{this.values=new Map(e);let t=e.map(([e,t])=>g(e));t.sort(),t.reverse(),this.scopesRegExp=RegExp(`^((${t.join(`)|(`)}))($|\\.)`,``)}}match(e){if(!this.scopesRegExp)return;let t=e.match(this.scopesRegExp);if(t)return this.values.get(t[1])}};typeof process<`u`&&{}.VSCODE_TEXTMATE_DEBUG;var We=class{constructor(e,t){this.stack=e,this.stoppedEarly=t}};function Ge(e,t,n,r,i,a,o,s){let c=t.content.length,l=!1,u=-1;if(o){let o=Ke(e,t,n,r,i,a);i=o.stack,r=o.linePos,n=o.isFirstLine,u=o.anchorPosition}let d=Date.now();for(;!l;){if(s!==0&&Date.now()-d>s)return new We(i,!0);f()}return new We(i,!1);function f(){let o=qe(e,t,n,r,i,u);if(!o){a.produce(i,c),l=!0;return}let s=o.captureIndices,d=o.matchedRuleId,f=s&&s.length>0?s[0].end>r:!1;if(d===Ae){let o=i.getRule(e);a.produce(i,s[0].start),i=i.withContentNameScopesList(i.nameScopesList),D(e,t,n,i,a,o.endCaptures,s),a.produce(i,s[0].end);let d=i;if(i=i.parent,u=d.getAnchorPos(),!f&&d.getEnterPos()===r){i=d,a.produce(i,c),l=!0;return}}else{let o=e.getRule(d);a.produce(i,s[0].start);let p=i,m=o.getName(t.content,s),h=i.contentNameScopesList.pushAttributed(m,e);if(i=i.push(d,r,u,s[0].end===c,null,h,h),o instanceof Le){let r=o;D(e,t,n,i,a,r.beginCaptures,s),a.produce(i,s[0].end),u=s[0].end;let d=r.getContentName(t.content,s),m=h.pushAttributed(d,e);if(i=i.withContentNameScopesList(m),r.endHasBackReferences&&(i=i.withEndRule(r.getEndWithResolvedBackReferences(t.content,s))),!f&&p.hasSameRuleAs(i)){i=i.pop(),a.produce(i,c),l=!0;return}}else if(o instanceof Re){let r=o;D(e,t,n,i,a,r.beginCaptures,s),a.produce(i,s[0].end),u=s[0].end;let d=r.getContentName(t.content,s),m=h.pushAttributed(d,e);if(i=i.withContentNameScopesList(m),r.whileHasBackReferences&&(i=i.withEndRule(r.getWhileWithResolvedBackReferences(t.content,s))),!f&&p.hasSameRuleAs(i)){i=i.pop(),a.produce(i,c),l=!0;return}}else if(D(e,t,n,i,a,o.captures,s),a.produce(i,s[0].end),i=i.pop(),!f){i=i.safePop(),a.produce(i,c),l=!0;return}}s[0].end>r&&(r=s[0].end,n=!1)}}function Ke(e,t,n,r,i,a){let o=i.beginRuleCapturedEOL?0:-1,s=[];for(let t=i;t;t=t.pop()){let n=t.getRule(e);n instanceof Re&&s.push({rule:n,stack:t})}for(let c=s.pop();c;c=s.pop()){let{ruleScanner:s,findOptions:l}=Ze(c.rule,e,c.stack.endRule,n,r===o),u=s.findNextMatchSync(t,r,l);if(u){if(u.ruleId!==je){i=c.stack.pop();break}u.captureIndices&&u.captureIndices.length&&(a.produce(c.stack,u.captureIndices[0].start),D(e,t,n,c.stack,a,c.rule.whileCaptures,u.captureIndices),a.produce(c.stack,u.captureIndices[0].end),o=u.captureIndices[0].end,u.captureIndices[0].end>r&&(r=u.captureIndices[0].end,n=!1))}else{i=c.stack.pop();break}}return{stack:i,linePos:r,anchorPosition:o,isFirstLine:n}}function qe(e,t,n,r,i,a){let o=Je(e,t,n,r,i,a),s=e.getInjections();if(s.length===0)return o;let c=Ye(s,e,t,n,r,i,a);if(!c)return o;if(!o)return c;let l=o.captureIndices[0].start,u=c.captureIndices[0].start;return u<l||c.priorityMatch&&u===l?c:o}function Je(e,t,n,r,i,a){let{ruleScanner:o,findOptions:s}=Xe(i.getRule(e),e,i.endRule,n,r===a),c=o.findNextMatchSync(t,r,s);return c?{captureIndices:c.captureIndices,matchedRuleId:c.ruleId}:null}function Ye(e,t,n,r,i,a,o){let s=Number.MAX_VALUE,c=null,l,u=0,d=a.contentNameScopesList.getScopeNames();for(let a=0,f=e.length;a<f;a++){let f=e[a];if(!f.matcher(d))continue;let{ruleScanner:p,findOptions:m}=Xe(t.getRule(f.ruleId),t,null,r,i===o),h=p.findNextMatchSync(n,i,m);if(!h)continue;let g=h.captureIndices[0].start;if(!(g>=s)&&(s=g,c=h.captureIndices,l=h.ruleId,u=f.priority,s===i))break}return c?{priorityMatch:u===-1,captureIndices:c,matchedRuleId:l}:null}function Xe(e,t,n,r,i){return{ruleScanner:e.compileAG(t,n,r,i),findOptions:0}}function Ze(e,t,n,r,i){return{ruleScanner:e.compileWhileAG(t,n,r,i),findOptions:0}}function D(e,t,n,r,i,a,o){if(a.length===0)return;let s=t.content,c=Math.min(a.length,o.length),l=[],u=o[0].end;for(let t=0;t<c;t++){let c=a[t];if(c===null)continue;let d=o[t];if(d.length===0)continue;if(d.start>u)break;for(;l.length>0&&l[l.length-1].endPos<=d.start;)i.produceFromScopes(l[l.length-1].scopes,l[l.length-1].endPos),l.pop();if(l.length>0?i.produceFromScopes(l[l.length-1].scopes,d.start):i.produce(r,d.start),c.retokenizeCapturedWithRuleId){let t=c.getName(s,o),a=r.contentNameScopesList.pushAttributed(t,e),l=c.getContentName(s,o),u=a.pushAttributed(l,e),f=r.push(c.retokenizeCapturedWithRuleId,d.start,-1,!1,null,a,u),p=e.createOnigString(s.substring(0,d.end));Ge(e,p,n&&d.start===0,d.start,f,i,!1,0),he(p);continue}let f=c.getName(s,o);if(f!==null){let t=(l.length>0?l[l.length-1].scopes:r.contentNameScopesList).pushAttributed(f,e);l.push(new Qe(t,d.end))}}for(;l.length>0;)i.produceFromScopes(l[l.length-1].scopes,l[l.length-1].endPos),l.pop()}var Qe=class{scopes;endPos;constructor(e,t){this.scopes=e,this.endPos=t}};function $e(e,t,n,r,i,a,o,s){return new nt(e,t,n,r,i,a,o,s)}function et(e,t,n,r,i){let a=x(t,O),o=ze.getCompiledRuleId(n,r,i.repository);for(let n of a)e.push({debugSelector:t,matcher:n.matcher,ruleId:o,grammar:i,priority:n.priority})}function O(e,t){if(t.length<e.length)return!1;let n=0;return e.every(e=>{for(let r=n;r<t.length;r++)if(tt(t[r],e))return n=r+1,!0;return!1})}function tt(e,t){if(!e)return!1;if(e===t)return!0;let n=t.length;return e.length>n&&e.substr(0,n)===t&&e[n]===`.`}var nt=class{constructor(e,t,n,r,i,a,o,s){if(this._rootScopeName=e,this.balancedBracketSelectors=a,this._onigLib=s,this._basicScopeAttributesProvider=new He(n,r),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=o,this._grammar=rt(t,null),this._injections=null,this._tokenTypeMatchers=[],i)for(let e of Object.keys(i)){let t=x(e,O);for(let n of t)this._tokenTypeMatchers.push({matcher:n.matcher,type:i[e]})}}_rootId;_lastRuleId;_ruleId2desc;_includedGrammars;_grammarRepository;_grammar;_injections;_basicScopeAttributesProvider;_tokenTypeMatchers;get themeProvider(){return this._grammarRepository}dispose(){for(let e of this._ruleId2desc)e&&e.dispose()}createOnigScanner(e){return this._onigLib.createOnigScanner(e)}createOnigString(e){return this._onigLib.createOnigString(e)}getMetadataForScope(e){return this._basicScopeAttributesProvider.getBasicScopeAttributes(e)}_collectInjections(){let e={lookup:e=>e===this._rootScopeName?this._grammar:this.getExternalGrammar(e),injections:e=>this._grammarRepository.injections(e)},t=[],n=this._rootScopeName,r=e.lookup(n);if(r){let e=r.injections;if(e)for(let n in e)et(t,n,e[n],this,r);let i=this._grammarRepository.injections(n);i&&i.forEach(e=>{let n=this.getExternalGrammar(e);if(n){let e=n.injectionSelector;e&&et(t,e,n,this,n)}})}return t.sort((e,t)=>e.priority-t.priority),t}getInjections(){return this._injections===null&&(this._injections=this._collectInjections()),this._injections}registerRule(e){let t=++this._lastRuleId,n=e(Me(t));return this._ruleId2desc[t]=n,n}getRule(e){return this._ruleId2desc[Ne(e)]}getExternalGrammar(e,t){if(this._includedGrammars[e])return this._includedGrammars[e];if(this._grammarRepository){let n=this._grammarRepository.lookup(e);if(n)return this._includedGrammars[e]=rt(n,t&&t.$base),this._includedGrammars[e]}}tokenizeLine(e,t,n=0){let r=this._tokenize(e,t,!1,n);return{tokens:r.lineTokens.getResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}tokenizeLine2(e,t,n=0){let r=this._tokenize(e,t,!0,n);return{tokens:r.lineTokens.getBinaryResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}_tokenize(e,t,n,r){this._rootId===-1&&(this._rootId=ze.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections());let i;if(!t||t===it.NULL){i=!0;let e=this._basicScopeAttributesProvider.getDefaultAttributes(),n=this.themeProvider.getDefaults(),r=b.set(0,e.languageId,e.tokenType,null,n.fontStyle,n.foregroundId,n.backgroundId),a=this.getRule(this._rootId).getName(null,null),o;o=a?k.createRootAndLookUpScopeName(a,r,this):k.createRoot(`unknown`,r),t=new it(null,this._rootId,-1,-1,!1,null,o,o)}else i=!1,t.reset();e+=`
|
|
3
3
|
`;let a=this.createOnigString(e),o=a.content.length,s=new ot(n,e,this._tokenTypeMatchers,this.balancedBracketSelectors),c=Ge(this,a,i,0,t,s,!0,r);return he(a),{lineLength:o,lineTokens:s,ruleStack:c.stack,stoppedEarly:c.stoppedEarly}}};function rt(e,t){return e=a(e),e.repository=e.repository||{},e.repository.$self={$vscodeTextmateLocation:e.$vscodeTextmateLocation,patterns:e.patterns,name:e.scopeName},e.repository.$base=t||e.repository.$self,e}var k=class e{constructor(e,t,n){this.parent=e,this.scopePath=t,this.tokenAttributes=n}static fromExtension(t,n){let r=t,i=t?.scopePath??null;for(let t of n)i=ee.push(i,t.scopeNames),r=new e(r,i,t.encodedTokenAttributes);return r}static createRoot(t,n){return new e(null,new ee(null,t),n)}static createRootAndLookUpScopeName(t,n,r){let i=r.getMetadataForScope(t),a=new ee(null,t),o=r.themeProvider.themeMatch(a),s=e.mergeAttributes(n,i,o);return new e(null,a,s)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(` `)}equals(t){return e.equals(this,t)}static equals(e,t){do{if(e===t||!e&&!t)return!0;if(!e||!t||e.scopeName!==t.scopeName||e.tokenAttributes!==t.tokenAttributes)return!1;e=e.parent,t=t.parent}while(!0)}static mergeAttributes(e,t,n){let r=-1,i=0,a=0;return n!==null&&(r=n.fontStyle,i=n.foregroundId,a=n.backgroundId),b.set(e,t.languageId,t.tokenType,null,r,i,a)}pushAttributed(t,n){if(t===null)return this;if(t.indexOf(` `)===-1)return e._pushAttributed(this,t,n);let r=t.split(/ /g),i=this;for(let t of r)i=e._pushAttributed(i,t,n);return i}static _pushAttributed(t,n,r){let i=r.getMetadataForScope(n),a=t.scopePath.push(n),o=r.themeProvider.themeMatch(a),s=e.mergeAttributes(t.tokenAttributes,i,o);return new e(t,a,s)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(e){let t=[],n=this;for(;n&&n!==e;)t.push({encodedTokenAttributes:n.tokenAttributes,scopeNames:n.scopePath.getExtensionIfDefined(n.parent?.scopePath??null)}),n=n.parent;return n===e?t.reverse():void 0}},it=class e{constructor(e,t,n,r,i,a,o,s){this.parent=e,this.ruleId=t,this.beginRuleCapturedEOL=i,this.endRule=a,this.nameScopesList=o,this.contentNameScopesList=s,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=n,this._anchorPos=r}_stackElementBrand=void 0;static NULL=new e(null,0,0,0,!1,null,null,null);_enterPos;_anchorPos;depth;equals(t){return t!==null&&e._equals(this,t)}static _equals(e,t){return e===t?!0:this._structuralEquals(e,t)?k.equals(e.contentNameScopesList,t.contentNameScopesList):!1}static _structuralEquals(e,t){do{if(e===t||!e&&!t)return!0;if(!e||!t||e.depth!==t.depth||e.ruleId!==t.ruleId||e.endRule!==t.endRule)return!1;e=e.parent,t=t.parent}while(!0)}clone(){return this}static _reset(e){for(;e;)e._enterPos=-1,e._anchorPos=-1,e=e.parent}reset(){e._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(t,n,r,i,a,o,s){return new e(this,t,n,r,i,a,o,s)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(e){return e.getRule(this.ruleId)}toString(){let e=[];return this._writeString(e,0),`[`+e.join(`,`)+`]`}_writeString(e,t){return this.parent&&(t=this.parent._writeString(e,t)),e[t++]=`(${this.ruleId}, ${this.nameScopesList?.toString()}, ${this.contentNameScopesList?.toString()})`,t}withContentNameScopesList(e){return this.contentNameScopesList===e?this:this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,e)}withEndRule(t){return this.endRule===t?this:new e(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,t,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(e){let t=this;for(;t&&t._enterPos===e._enterPos;){if(t.ruleId===e.ruleId)return!0;t=t.parent}return!1}toStateStackFrame(){return{ruleId:Ne(this.ruleId),beginRuleCapturedEOL:this.beginRuleCapturedEOL,endRule:this.endRule,nameScopesList:this.nameScopesList?.getExtensionIfDefined(this.parent?.nameScopesList??null)??[],contentNameScopesList:this.contentNameScopesList?.getExtensionIfDefined(this.nameScopesList)??[]}}static pushFrame(t,n){let r=k.fromExtension(t?.nameScopesList??null,n.nameScopesList);return new e(t,Me(n.ruleId),n.enterPos??-1,n.anchorPos??-1,n.beginRuleCapturedEOL,n.endRule,r,k.fromExtension(r,n.contentNameScopesList))}},at=class{balancedBracketScopes;unbalancedBracketScopes;allowAny=!1;constructor(e,t){this.balancedBracketScopes=e.flatMap(e=>e===`*`?(this.allowAny=!0,[]):x(e,O).map(e=>e.matcher)),this.unbalancedBracketScopes=t.flatMap(e=>x(e,O).map(e=>e.matcher))}get matchesAlways(){return this.allowAny&&this.unbalancedBracketScopes.length===0}get matchesNever(){return this.balancedBracketScopes.length===0&&!this.allowAny}match(e){for(let t of this.unbalancedBracketScopes)if(t(e))return!1;for(let t of this.balancedBracketScopes)if(t(e))return!0;return this.allowAny}},ot=class{constructor(e,t,n,r){this.balancedBracketSelectors=r,this._emitBinaryTokens=e,this._tokenTypeOverrides=n,this._lineText=null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}_emitBinaryTokens;_lineText;_tokens;_binaryTokens;_lastTokenEndIndex;_tokenTypeOverrides;produce(e,t){this.produceFromScopes(e.contentNameScopesList,t)}produceFromScopes(e,t){if(this._lastTokenEndIndex>=t)return;if(this._emitBinaryTokens){let n=e?.tokenAttributes??0,r=!1;if(this.balancedBracketSelectors?.matchesAlways&&(r=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){let t=e?.getScopeNames()??[];for(let e of this._tokenTypeOverrides)e.matcher(t)&&(n=b.set(n,0,de(e.type),null,-1,0,0));this.balancedBracketSelectors&&(r=this.balancedBracketSelectors.match(t))}if(r&&(n=b.set(n,0,8,r,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===n){this._lastTokenEndIndex=t;return}this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(n),this._lastTokenEndIndex=t;return}let n=e?.getScopeNames()??[];this._tokens.push({startIndex:this._lastTokenEndIndex,endIndex:t,scopes:n}),this._lastTokenEndIndex=t}getResult(e,t){return this._tokens.length>0&&this._tokens[this._tokens.length-1].startIndex===t-1&&this._tokens.pop(),this._tokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._tokens[this._tokens.length-1].startIndex=0),this._tokens}getBinaryResult(e,t){this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-2]===t-1&&(this._binaryTokens.pop(),this._binaryTokens.pop()),this._binaryTokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._binaryTokens[this._binaryTokens.length-2]=0);let n=new Uint32Array(this._binaryTokens.length);for(let e=0,t=this._binaryTokens.length;e<t;e++)n[e]=this._binaryTokens[e];return n}},st=class{constructor(e,t){this._onigLib=t,this._theme=e}_grammars=new Map;_rawGrammars=new Map;_injectionGrammars=new Map;_theme;dispose(){for(let e of this._grammars.values())e.dispose()}setTheme(e){this._theme=e}getColorMap(){return this._theme.getColorMap()}addGrammar(e,t){this._rawGrammars.set(e.scopeName,e),t&&this._injectionGrammars.set(e.scopeName,t)}lookup(e){return this._rawGrammars.get(e)}injections(e){return this._injectionGrammars.get(e)}getDefaults(){return this._theme.getDefaults()}themeMatch(e){return this._theme.match(e)}grammarForScopeName(e,t,n,r,i){if(!this._grammars.has(e)){let a=this._rawGrammars.get(e);if(!a)return null;this._grammars.set(e,$e(e,a,t,n,r,i,this,this._onigLib))}return this._grammars.get(e)}},ct=class{_options;_syncRegistry;_ensureGrammarCache;constructor(e){this._options=e,this._syncRegistry=new st(v.createFromRawTheme(e.theme,e.colorMap),e.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(e,t){this._syncRegistry.setTheme(v.createFromRawTheme(e,t))}getColorMap(){return this._syncRegistry.getColorMap()}loadGrammarWithEmbeddedLanguages(e,t,n){return this.loadGrammarWithConfiguration(e,t,{embeddedLanguages:n})}loadGrammarWithConfiguration(e,t,n){return this._loadGrammar(e,t,n.embeddedLanguages,n.tokenTypes,new at(n.balancedBracketSelectors||[],n.unbalancedBracketSelectors||[]))}loadGrammar(e){return this._loadGrammar(e,0,null,null,null)}_loadGrammar(e,t,n,r,i){let a=new ve(this._syncRegistry,e);for(;a.Q.length>0;)a.Q.map(e=>this._loadSingleGrammar(e.scopeName)),a.processQueue();return this._grammarForScopeName(e,t,n,r,i)}_loadSingleGrammar(e){this._ensureGrammarCache.has(e)||(this._doLoadSingleGrammar(e),this._ensureGrammarCache.set(e,!0))}_doLoadSingleGrammar(e){let t=this._options.loadGrammar(e);if(t){let n=typeof this._options.getInjections==`function`?this._options.getInjections(e):void 0;this._syncRegistry.addGrammar(t,n)}}addGrammar(e,t=[],n=0,r=null){return this._syncRegistry.addGrammar(e,t),this._grammarForScopeName(e.scopeName,n,r)}_grammarForScopeName(e,t=0,n=null,r=null,i=null){return this._syncRegistry.grammarForScopeName(e,t,n,r,i)}},lt=it.NULL;function A(e,t){let n=typeof e==`string`?{}:{...e.colorReplacements},r=typeof e==`string`?e:e.name;for(let[e,i]of Object.entries(t?.colorReplacements||{}))typeof i==`string`?n[e]=i:e===r&&Object.assign(n,i);return n}function j(e,t){return e&&(t?.[e?.toLowerCase()]||e)}function ut(e){return Array.isArray(e)?e:[e]}async function dt(e){return Promise.resolve(typeof e==`function`?e():e).then(e=>e.default||e)}function M(e){return!e||[`plaintext`,`txt`,`text`,`plain`].includes(e)}function ft(e){return e===`ansi`||M(e)}function N(e){return e===`none`}function pt(e){return N(e)}var mt=/(\r?\n)/g;function P(e,t=!1){if(e.length===0)return[[``,0]];let n=e.split(mt),r=0,i=[];for(let e=0;e<n.length;e+=2){let a=t?n[e]+(n[e+1]||``):n[e];i.push([a,r]),r+=n[e].length,r+=n[e+1]?.length||0}return i}var ht={light:`#333333`,dark:`#bbbbbb`},gt={light:`#fffffe`,dark:`#1e1e1e`},_t=`__shiki_resolved`;function vt(e){if(e?.[_t])return e;let t={...e};t.tokenColors&&!t.settings&&(t.settings=t.tokenColors,delete t.tokenColors),t.type||=`dark`,t.colorReplacements={...t.colorReplacements},t.settings||=[];let{bg:n,fg:r}=t;if(!n||!r){let e=t.settings?t.settings.find(e=>!e.name&&!e.scope):void 0;e?.settings?.foreground&&(r=e.settings.foreground),e?.settings?.background&&(n=e.settings.background),!r&&t?.colors?.[`editor.foreground`]&&(r=t.colors[`editor.foreground`]),!n&&t?.colors?.[`editor.background`]&&(n=t.colors[`editor.background`]),r||=t.type===`light`?ht.light:ht.dark,n||=t.type===`light`?gt.light:gt.dark,t.fg=r,t.bg=n}t.settings[0]&&t.settings[0].settings&&!t.settings[0].scope||t.settings.unshift({settings:{foreground:t.fg,background:t.bg}});let i=0,a=new Map;function o(e){if(a.has(e))return a.get(e);i+=1;let n=`#${i.toString(16).padStart(8,`0`).toLowerCase()}`;return t.colorReplacements?.[`#${n}`]?o(e):(a.set(e,n),n)}t.settings=t.settings.map(e=>{let n=e.settings?.foreground&&!e.settings.foreground.startsWith(`#`),r=e.settings?.background&&!e.settings.background.startsWith(`#`);if(!n&&!r)return e;let i={...e,settings:{...e.settings}};if(n){let n=o(e.settings.foreground);t.colorReplacements[n]=e.settings.foreground,i.settings.foreground=n}if(r){let n=o(e.settings.background);t.colorReplacements[n]=e.settings.background,i.settings.background=n}return i});for(let e of Object.keys(t.colors||{}))if((e===`editor.foreground`||e===`editor.background`||e.startsWith(`terminal.ansi`))&&!t.colors[e]?.startsWith(`#`)){let n=o(t.colors[e]);t.colorReplacements[n]=t.colors[e],t.colors[e]=n}return Object.defineProperty(t,_t,{enumerable:!1,writable:!1,value:!0}),t}async function yt(e){return[...new Set((await Promise.all(e.filter(e=>!ft(e)).map(async e=>await dt(e).then(e=>Array.isArray(e)?e:[e])))).flat())]}async function bt(e){return(await Promise.all(e.map(async e=>pt(e)?null:vt(await dt(e))))).filter(e=>!!e)}function xt(e,t){if(!t)return e;if(t[e]){let n=new Set([e]);for(;t[e];){if(e=t[e],n.has(e))throw new i(`Circular alias \`${[...n].join(` -> `)} -> ${e}\``);n.add(e)}}return e}var St=class extends ct{_resolver;_themes;_langs;_alias;_resolvedThemes=new Map;_resolvedGrammars=new Map;_langMap=new Map;_langGraph=new Map;_textmateThemeCache=new WeakMap;_loadedThemesCache=null;_loadedLanguagesCache=null;constructor(e,t,n,r={}){super(e),this._resolver=e,this._themes=t,this._langs=n,this._alias=r,this._themes.map(e=>this.loadTheme(e)),this.loadLanguages(this._langs)}getTheme(e){return typeof e==`string`?this._resolvedThemes.get(e):this.loadTheme(e)}loadTheme(e){let t=vt(e);return t.name&&(this._resolvedThemes.set(t.name,t),this._loadedThemesCache=null),t}getLoadedThemes(){return this._loadedThemesCache||=[...this._resolvedThemes.keys()],this._loadedThemesCache}setTheme(e){let t=this._textmateThemeCache.get(e);t||(t=v.createFromRawTheme(e),this._textmateThemeCache.set(e,t)),this._syncRegistry.setTheme(t)}getGrammar(e){return e=xt(e,this._alias),this._resolvedGrammars.get(e)}loadLanguage(e){if(this.getGrammar(e.name))return;let t=new Set([...this._langMap.values()].filter(t=>t.embeddedLangsLazy?.includes(e.name)));this._resolver.addLanguage(e);let n={balancedBracketSelectors:e.balancedBracketSelectors||[`*`],unbalancedBracketSelectors:e.unbalancedBracketSelectors||[]};this._syncRegistry._rawGrammars.set(e.scopeName,e);let r=this.loadGrammarWithConfiguration(e.scopeName,1,n);if(r.name=e.name,this._resolvedGrammars.set(e.name,r),e.aliases&&e.aliases.forEach(t=>{this._alias[t]=e.name}),this._loadedLanguagesCache=null,t.size)for(let e of t)this._resolvedGrammars.delete(e.name),this._loadedLanguagesCache=null,this._syncRegistry?._injectionGrammars?.delete(e.scopeName),this._syncRegistry?._grammars?.delete(e.scopeName),this.loadLanguage(this._langMap.get(e.name))}dispose(){super.dispose(),this._resolvedThemes.clear(),this._resolvedGrammars.clear(),this._langMap.clear(),this._langGraph.clear(),this._loadedThemesCache=null}loadLanguages(e){for(let t of e)this.resolveEmbeddedLanguages(t);let t=[...this._langGraph.entries()],n=t.filter(([e,t])=>!t);if(n.length){let e=t.filter(([e,t])=>t?(t.embeddedLanguages||t.embeddedLangs)?.some(e=>n.map(([e])=>e).includes(e)):!1).filter(e=>!n.includes(e));throw new i(`Missing languages ${n.map(([e])=>`\`${e}\``).join(`, `)}, required by ${e.map(([e])=>`\`${e}\``).join(`, `)}`)}for(let[e,n]of t)this._resolver.addLanguage(n);for(let[e,n]of t)this.loadLanguage(n)}getLoadedLanguages(){return this._loadedLanguagesCache||=[...new Set([...this._resolvedGrammars.keys(),...Object.keys(this._alias)])],this._loadedLanguagesCache}resolveEmbeddedLanguages(e){this._langMap.set(e.name,e),this._langGraph.set(e.name,e);let t=e.embeddedLanguages??e.embeddedLangs;if(t)for(let e of t)this._langGraph.set(e,this._langMap.get(e))}},Ct=class{_langs=new Map;_scopeToLang=new Map;_injections=new Map;_onigLib;constructor(e,t){this._onigLib={createOnigScanner:t=>e.createScanner(t),createOnigString:t=>e.createString(t)},t.forEach(e=>this.addLanguage(e))}get onigLib(){return this._onigLib}getLangRegistration(e){return this._langs.get(e)}loadGrammar(e){return this._scopeToLang.get(e)}addLanguage(e){this._langs.set(e.name,e),e.aliases&&e.aliases.forEach(t=>{this._langs.set(t,e)}),this._scopeToLang.set(e.scopeName,e),e.injectTo&&e.injectTo.forEach(t=>{this._injections.get(t)||this._injections.set(t,[]),this._injections.get(t).push(e.scopeName)})}getInjections(e){let t=e.split(`.`),n=[];for(let e=1;e<=t.length;e++){let r=t.slice(0,e).join(`.`);n=[...n,...this._injections.get(r)||[]]}return n}},F=0;function wt(e){F+=1,e.warnings!==!1&&F>=10&&F%10==0&&console.warn(`[Shiki] ${F} instances have been created. Shiki is supposed to be used as a singleton, consider refactoring your code to cache your highlighter instance; Or call \`highlighter.dispose()\` to release unused instances.`);let t=!1;if(!e.engine)throw new i("`engine` option is required for synchronous mode");let n=(e.langs||[]).flat(1),r=(e.themes||[]).flat(1).map(vt),a=new St(new Ct(e.engine,n),r,n,e.langAlias),o;function s(t){return xt(t,e.langAlias)}function c(e){_();let t=a.getGrammar(typeof e==`string`?e:e.name);if(!t)throw new i(`Language \`${e}\` not found, you may need to load it first`);return t}function l(e){if(e===`none`)return{bg:``,fg:``,name:`none`,settings:[],type:`dark`};_();let t=a.getTheme(e);if(!t)throw new i(`Theme \`${e}\` not found, you may need to load it first`);return t}function u(e){_();let t=l(e);return o!==e&&(a.setTheme(t),o=e),{theme:t,colorMap:a.getColorMap()}}function d(){return _(),a.getLoadedThemes()}function f(){return _(),a.getLoadedLanguages()}function p(...e){_(),a.loadLanguages(e.flat(1))}async function m(...e){return p(await yt(e))}function h(...e){_();for(let t of e.flat(1))a.loadTheme(t)}async function g(...e){return _(),h(await bt(e))}function _(){if(t)throw new i(`Shiki instance has been disposed`)}function v(){t||(t=!0,a.dispose(),--F)}return{setTheme:u,getTheme:l,getLanguage:c,getLoadedThemes:d,getLoadedLanguages:f,resolveLangAlias:s,loadLanguage:m,loadLanguageSync:p,loadTheme:g,loadThemeSync:h,dispose:v,[Symbol.dispose]:v}}async function Tt(e){e.engine||console.warn("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");let[t,n,r]=await Promise.all([bt(e.themes||[]),yt(e.langs||[]),e.engine]);return wt({...e,themes:t,langs:n,engine:r})}var Et=new WeakMap;function Dt(e,t){Et.set(e,t)}function I(e){return Et.get(e)}var L=class e{_stacks={};lang;get themes(){return Object.keys(this._stacks)}get theme(){return this.themes[0]}get _stack(){return this._stacks[this.theme]}static initial(t,n){return new e(Object.fromEntries(ut(n).map(e=>[e,lt])),t)}constructor(...e){if(e.length===2){let[t,n]=e;this.lang=n,this._stacks=t}else{let[t,n,r]=e;this.lang=n,this._stacks={[r]:t}}}getInternalStack(e=this.theme){return this._stacks[e]}getScopes(e=this.theme){return Ot(this._stacks[e])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}};function Ot(e){let t=[],n=new Set;function r(e){if(n.has(e))return;n.add(e);let i=e?.nameScopesList?.scopeName;i&&t.push(i),e.parent&&r(e.parent)}return r(e),t}function kt(e,t){if(!(e instanceof L))throw new i(`Invalid grammar state`);return e.getInternalStack(t)}var At=/,/,jt=/ /;function Mt(e,t,n={}){let{theme:r=e.getLoadedThemes()[0]}=n;if(M(e.resolveLangAlias(n.lang||`text`))||N(r))return P(t).map(e=>[{content:e[0],offset:e[1]}]);let{theme:a,colorMap:o}=e.setTheme(r),s=e.getLanguage(n.lang||`text`);if(n.grammarState){if(n.grammarState.lang!==s.name)throw new i(`Grammar state language "${n.grammarState.lang}" does not match highlight language "${s.name}"`);if(!n.grammarState.themes.includes(a.name))throw new i(`Grammar state themes "${n.grammarState.themes}" do not contain highlight theme "${a.name}"`)}return Pt(t,s,a,o,n)}function Nt(...e){if(e.length===2)return I(e[1]);let[t,n,r={}]=e,{lang:a=`text`,theme:o=t.getLoadedThemes()[0]}=r;if(M(a)||N(o))throw new i(`Plain language does not have grammar state`);if(a===`ansi`)throw new i(`ANSI language does not have grammar state`);let{theme:s,colorMap:c}=t.setTheme(o),l=t.getLanguage(a);return new L(Ft(n,l,s,c,r).stateStack,l.name,s.name)}function Pt(e,t,n,r,i){let a=Ft(e,t,n,r,i),o=new L(a.stateStack,t.name,n.name);return Dt(a.tokens,o),a.tokens}function Ft(e,t,n,r,i){let a=A(n,i),{tokenizeMaxLineLength:o=0,tokenizeTimeLimit:s=500,includeExplanation:c=!1}=i,l=P(e),u=i.grammarState?kt(i.grammarState,n.name)??lt:i.grammarContextCode==null?lt:Ft(i.grammarContextCode,t,n,r,{...i,grammarState:void 0,grammarContextCode:void 0}).stateStack,d=[],f=[];for(let e=0,i=l.length;e<i;e++){let[i,p]=l[e];if(i===``){d=[],f.push([]);continue}if(o>0&&i.length>=o){d=[],f.push([{content:i,offset:p,color:``,fontStyle:0}]);continue}let m,h,g;c&&c!==`tokenType`&&(m=t.tokenizeLine(i,u,s),h=m.tokens,g=0);let _=t.tokenizeLine2(i,u,s),v=_.tokens.length/2;for(let e=0;e<v;e++){let t=_.tokens[2*e],o=e+1<v?_.tokens[2*e+2]:i.length;if(t===o)continue;let s=_.tokens[2*e+1],l=j(r[b.getForeground(s)],a),u=b.getFontStyle(s),f={content:i.substring(t,o),offset:p+t,color:l,fontStyle:u};if(c===`tokenType`)f.type=b.getTokenType(s);else if(c){let e=[];if(c!==`scopeName`)for(let t of n.settings){let n;switch(typeof t.scope){case`string`:n=t.scope.split(At).map(e=>e.trim());break;case`object`:n=t.scope;break;default:continue}e.push({settings:t,selectors:n.map(e=>e.split(jt))})}f.explanation=[];let r=0;for(;t+r<o;){let t=h[g],n=i.substring(t.startIndex,t.endIndex);r+=n.length,f.explanation.push({content:n,scopes:c===`scopeName`?It(t.scopes):Lt(e,t.scopes)}),g+=1}}d.push(f)}f.push(d),d=[],u=_.ruleStack}return{tokens:f,stateStack:u}}function It(e){return e.map(e=>({scopeName:e}))}function Lt(e,t){let n=[];for(let r=0,i=t.length;r<i;r++){let i=t[r];n[r]={scopeName:i,themeMatches:Bt(e,i,t.slice(0,r))}}return n}function Rt(e,t){return e===t||t.substring(0,e.length)===e&&t[e.length]===`.`}function zt(e,t,n){if(!Rt(e.at(-1),t))return!1;let r=e.length-2,i=n.length-1;for(;r>=0&&i>=0;)Rt(e[r],n[i])&&--r,--i;return r===-1}function Bt(e,t,n){let r=[];for(let{selectors:i,settings:a}of e)for(let e of i)if(zt(e,t,n)){r.push(a);break}return r}function Vt(e,t,n,r=Mt){let i=Object.entries(n.themes).filter(e=>e[1]).map(e=>({color:e[0],theme:e[1]})),a=i.map(i=>{let a=r(e,t,{...n,theme:i.theme});return{tokens:a,state:I(a),theme:typeof i.theme==`string`?i.theme:i.theme.name}}),o=Ht(...a.map(e=>e.tokens)),s=o[0].map((e,t)=>e.map((e,r)=>{let a={content:e.content,variants:{},offset:e.offset};return`includeExplanation`in n&&n.includeExplanation&&(a.explanation=e.explanation),o.forEach((e,n)=>{let{content:o,explanation:s,offset:c,...l}=e[t][r];a.variants[i[n].color]=l}),a})),c=a[0].state?new L(Object.fromEntries(a.map(e=>[e.theme,e.state?.getInternalStack(e.theme)])),a[0].state.lang):void 0;return c&&Dt(s,c),s}function Ht(...e){let t=e.map(()=>[]),n=e.length;for(let r=0;r<e[0].length;r++){let i=e.map(e=>e[r]),a=t.map(()=>[]);t.forEach((e,t)=>e.push(a[t]));let o=i.map(()=>0),s=i.map(e=>e[0]);for(;s.every(e=>e);){let e=Math.min(...s.map(e=>e.content.length));for(let t=0;t<n;t++){let n=s[t];n.content.length===e?(a[t].push(n),o[t]+=1,s[t]=i[t][o[t]]):(a[t].push({...n,content:n.content.slice(0,e)}),s[t]={...n,content:n.content.slice(e),offset:n.offset+e})}}}return t}var Ut=[`area`,`base`,`basefont`,`bgsound`,`br`,`col`,`command`,`embed`,`frame`,`hr`,`image`,`img`,`input`,`keygen`,`link`,`meta`,`param`,`source`,`track`,`wbr`],R=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};R.prototype.normal={},R.prototype.property={},R.prototype.space=void 0;function Wt(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new R(n,r,t)}function Gt(e){return e.toLowerCase()}var z=class{constructor(e,t){this.attribute=t,this.property=e}};z.prototype.attribute=``,z.prototype.booleanish=!1,z.prototype.boolean=!1,z.prototype.commaOrSpaceSeparated=!1,z.prototype.commaSeparated=!1,z.prototype.defined=!1,z.prototype.mustUseProperty=!1,z.prototype.number=!1,z.prototype.overloadedBoolean=!1,z.prototype.property=``,z.prototype.spaceSeparated=!1,z.prototype.space=void 0;var Kt=e({boolean:()=>B,booleanish:()=>V,commaOrSpaceSeparated:()=>G,commaSeparated:()=>W,number:()=>H,overloadedBoolean:()=>Jt,spaceSeparated:()=>U}),qt=0,B=K(),V=K(),Jt=K(),H=K(),U=K(),W=K(),G=K();function K(){return 2**++qt}var Yt=Object.keys(Kt),Xt=class extends z{constructor(e,t,n,r){let i=-1;if(super(e,t),Zt(this,`space`,r),typeof n==`number`)for(;++i<Yt.length;){let e=Yt[i];Zt(this,Yt[i],(n&Kt[e])===Kt[e])}}};Xt.prototype.defined=!0;function Zt(e,t,n){n&&(e[t]=n)}function q(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let a=new Xt(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[Gt(r)]=r,n[Gt(a.attribute)]=r}return new R(t,n,e.space)}var Qt=q({properties:{ariaActiveDescendant:null,ariaAtomic:V,ariaAutoComplete:null,ariaBusy:V,ariaChecked:V,ariaColCount:H,ariaColIndex:H,ariaColSpan:H,ariaControls:U,ariaCurrent:null,ariaDescribedBy:U,ariaDetails:null,ariaDisabled:V,ariaDropEffect:U,ariaErrorMessage:null,ariaExpanded:V,ariaFlowTo:U,ariaGrabbed:V,ariaHasPopup:null,ariaHidden:V,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:U,ariaLevel:H,ariaLive:null,ariaModal:V,ariaMultiLine:V,ariaMultiSelectable:V,ariaOrientation:null,ariaOwns:U,ariaPlaceholder:null,ariaPosInSet:H,ariaPressed:V,ariaReadOnly:V,ariaRelevant:null,ariaRequired:V,ariaRoleDescription:U,ariaRowCount:H,ariaRowIndex:H,ariaRowSpan:H,ariaSelected:V,ariaSetSize:H,ariaSort:null,ariaValueMax:H,ariaValueMin:H,ariaValueNow:H,ariaValueText:null,role:null},transform(e,t){return t===`role`?t:`aria-`+t.slice(4).toLowerCase()}});function $t(e,t){return t in e?e[t]:t}function en(e,t){return $t(e,t.toLowerCase())}var tn=q({attributes:{acceptcharset:`accept-charset`,classname:`class`,htmlfor:`for`,httpequiv:`http-equiv`},mustUseProperty:[`checked`,`multiple`,`muted`,`selected`],properties:{abbr:null,accept:W,acceptCharset:U,accessKey:U,action:null,allow:null,allowFullScreen:B,allowPaymentRequest:B,allowUserMedia:B,alpha:B,alt:null,as:null,async:B,autoCapitalize:null,autoComplete:U,autoFocus:B,autoPlay:B,blocking:U,capture:null,charSet:null,checked:B,cite:null,className:U,closedBy:null,colorSpace:null,cols:H,colSpan:H,command:null,commandFor:null,content:null,contentEditable:V,controls:B,controlsList:U,coords:H|W,crossOrigin:null,data:null,dateTime:null,decoding:null,default:B,defer:B,dir:null,dirName:null,disabled:B,download:Jt,draggable:V,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:B,formTarget:null,headers:U,height:H,hidden:Jt,high:H,href:null,hrefLang:null,htmlFor:U,httpEquiv:U,id:null,imageSizes:null,imageSrcSet:null,inert:B,inputMode:null,integrity:null,is:null,isMap:B,itemId:null,itemProp:U,itemRef:U,itemScope:B,itemType:U,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:B,low:H,manifest:null,max:null,maxLength:H,media:null,method:null,min:null,minLength:H,multiple:B,muted:B,name:null,nonce:null,noModule:B,noValidate:B,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:B,optimum:H,pattern:null,ping:U,placeholder:null,playsInline:B,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:B,referrerPolicy:null,rel:U,required:B,reversed:B,rows:H,rowSpan:H,sandbox:U,scope:null,scoped:B,seamless:B,selected:B,shadowRootClonable:B,shadowRootCustomElementRegistry:B,shadowRootDelegatesFocus:B,shadowRootMode:null,shadowRootSerializable:B,shape:null,size:H,sizes:null,slot:null,span:H,spellCheck:V,src:null,srcDoc:null,srcLang:null,srcSet:null,start:H,step:null,style:null,tabIndex:H,target:null,title:null,translate:null,type:null,typeMustMatch:B,useMap:null,value:V,width:H,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:U,axis:null,background:null,bgColor:null,border:H,borderColor:null,bottomMargin:H,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:B,declare:B,event:null,face:null,frame:null,frameBorder:null,hSpace:H,leftMargin:H,link:null,longDesc:null,lowSrc:null,marginHeight:H,marginWidth:H,noResize:B,noHref:B,noShade:B,noWrap:B,object:null,profile:null,prompt:null,rev:null,rightMargin:H,rules:null,scheme:null,scrolling:V,standby:null,summary:null,text:null,topMargin:H,valueType:null,version:null,vAlign:null,vLink:null,vSpace:H,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:B,disablePictureInPicture:B,disableRemotePlayback:B,exportParts:W,part:U,prefix:null,property:null,results:H,security:null,unselectable:null},space:`html`,transform:en}),nn=q({attributes:{accentHeight:`accent-height`,alignmentBaseline:`alignment-baseline`,arabicForm:`arabic-form`,baselineShift:`baseline-shift`,capHeight:`cap-height`,className:`class`,clipPath:`clip-path`,clipRule:`clip-rule`,colorInterpolation:`color-interpolation`,colorInterpolationFilters:`color-interpolation-filters`,colorProfile:`color-profile`,colorRendering:`color-rendering`,crossOrigin:`crossorigin`,dataType:`datatype`,dominantBaseline:`dominant-baseline`,enableBackground:`enable-background`,fillOpacity:`fill-opacity`,fillRule:`fill-rule`,floodColor:`flood-color`,floodOpacity:`flood-opacity`,fontFamily:`font-family`,fontSize:`font-size`,fontSizeAdjust:`font-size-adjust`,fontStretch:`font-stretch`,fontStyle:`font-style`,fontVariant:`font-variant`,fontWeight:`font-weight`,glyphName:`glyph-name`,glyphOrientationHorizontal:`glyph-orientation-horizontal`,glyphOrientationVertical:`glyph-orientation-vertical`,hrefLang:`hreflang`,horizAdvX:`horiz-adv-x`,horizOriginX:`horiz-origin-x`,horizOriginY:`horiz-origin-y`,imageRendering:`image-rendering`,letterSpacing:`letter-spacing`,lightingColor:`lighting-color`,markerEnd:`marker-end`,markerMid:`marker-mid`,markerStart:`marker-start`,maskType:`mask-type`,navDown:`nav-down`,navDownLeft:`nav-down-left`,navDownRight:`nav-down-right`,navLeft:`nav-left`,navNext:`nav-next`,navPrev:`nav-prev`,navRight:`nav-right`,navUp:`nav-up`,navUpLeft:`nav-up-left`,navUpRight:`nav-up-right`,onAbort:`onabort`,onActivate:`onactivate`,onAfterPrint:`onafterprint`,onBeforePrint:`onbeforeprint`,onBegin:`onbegin`,onCancel:`oncancel`,onCanPlay:`oncanplay`,onCanPlayThrough:`oncanplaythrough`,onChange:`onchange`,onClick:`onclick`,onClose:`onclose`,onCopy:`oncopy`,onCueChange:`oncuechange`,onCut:`oncut`,onDblClick:`ondblclick`,onDrag:`ondrag`,onDragEnd:`ondragend`,onDragEnter:`ondragenter`,onDragExit:`ondragexit`,onDragLeave:`ondragleave`,onDragOver:`ondragover`,onDragStart:`ondragstart`,onDrop:`ondrop`,onDurationChange:`ondurationchange`,onEmptied:`onemptied`,onEnd:`onend`,onEnded:`onended`,onError:`onerror`,onFocus:`onfocus`,onFocusIn:`onfocusin`,onFocusOut:`onfocusout`,onHashChange:`onhashchange`,onInput:`oninput`,onInvalid:`oninvalid`,onKeyDown:`onkeydown`,onKeyPress:`onkeypress`,onKeyUp:`onkeyup`,onLoad:`onload`,onLoadedData:`onloadeddata`,onLoadedMetadata:`onloadedmetadata`,onLoadStart:`onloadstart`,onMessage:`onmessage`,onMouseDown:`onmousedown`,onMouseEnter:`onmouseenter`,onMouseLeave:`onmouseleave`,onMouseMove:`onmousemove`,onMouseOut:`onmouseout`,onMouseOver:`onmouseover`,onMouseUp:`onmouseup`,onMouseWheel:`onmousewheel`,onOffline:`onoffline`,onOnline:`ononline`,onPageHide:`onpagehide`,onPageShow:`onpageshow`,onPaste:`onpaste`,onPause:`onpause`,onPlay:`onplay`,onPlaying:`onplaying`,onPopState:`onpopstate`,onProgress:`onprogress`,onRateChange:`onratechange`,onRepeat:`onrepeat`,onReset:`onreset`,onResize:`onresize`,onScroll:`onscroll`,onSeeked:`onseeked`,onSeeking:`onseeking`,onSelect:`onselect`,onShow:`onshow`,onStalled:`onstalled`,onStorage:`onstorage`,onSubmit:`onsubmit`,onSuspend:`onsuspend`,onTimeUpdate:`ontimeupdate`,onToggle:`ontoggle`,onUnload:`onunload`,onVolumeChange:`onvolumechange`,onWaiting:`onwaiting`,onZoom:`onzoom`,overlinePosition:`overline-position`,overlineThickness:`overline-thickness`,paintOrder:`paint-order`,panose1:`panose-1`,pointerEvents:`pointer-events`,referrerPolicy:`referrerpolicy`,renderingIntent:`rendering-intent`,shapeRendering:`shape-rendering`,stopColor:`stop-color`,stopOpacity:`stop-opacity`,strikethroughPosition:`strikethrough-position`,strikethroughThickness:`strikethrough-thickness`,strokeDashArray:`stroke-dasharray`,strokeDashOffset:`stroke-dashoffset`,strokeLineCap:`stroke-linecap`,strokeLineJoin:`stroke-linejoin`,strokeMiterLimit:`stroke-miterlimit`,strokeOpacity:`stroke-opacity`,strokeWidth:`stroke-width`,tabIndex:`tabindex`,textAnchor:`text-anchor`,textDecoration:`text-decoration`,textRendering:`text-rendering`,transformOrigin:`transform-origin`,typeOf:`typeof`,underlinePosition:`underline-position`,underlineThickness:`underline-thickness`,unicodeBidi:`unicode-bidi`,unicodeRange:`unicode-range`,unitsPerEm:`units-per-em`,vAlphabetic:`v-alphabetic`,vHanging:`v-hanging`,vIdeographic:`v-ideographic`,vMathematical:`v-mathematical`,vectorEffect:`vector-effect`,vertAdvY:`vert-adv-y`,vertOriginX:`vert-origin-x`,vertOriginY:`vert-origin-y`,wordSpacing:`word-spacing`,writingMode:`writing-mode`,xHeight:`x-height`,playbackOrder:`playbackorder`,timelineBegin:`timelinebegin`},properties:{about:G,accentHeight:H,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:H,amplitude:H,arabicForm:null,ascent:H,attributeName:null,attributeType:null,azimuth:H,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:H,by:null,calcMode:null,capHeight:H,className:U,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:H,diffuseConstant:H,direction:null,display:null,dur:null,divisor:H,dominantBaseline:null,download:B,dx:null,dy:null,edgeMode:null,editable:null,elevation:H,enableBackground:null,end:null,event:null,exponent:H,externalResourcesRequired:null,fill:null,fillOpacity:H,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:W,g2:W,glyphName:W,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:H,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:H,horizOriginX:H,horizOriginY:H,id:null,ideographic:H,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:H,k:H,k1:H,k2:H,k3:H,k4:H,kernelMatrix:G,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:H,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:H,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:H,overlineThickness:H,paintOrder:null,panose1:null,path:null,pathLength:H,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:U,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:H,pointsAtY:H,pointsAtZ:H,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:G,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:G,rev:G,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:G,requiredFeatures:G,requiredFonts:G,requiredFormats:G,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:H,specularExponent:H,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:H,strikethroughThickness:H,string:null,stroke:null,strokeDashArray:G,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:H,strokeOpacity:H,strokeWidth:null,style:null,surfaceScale:H,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:G,tabIndex:H,tableValues:null,target:null,targetX:H,targetY:H,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:G,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:H,underlineThickness:H,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:H,values:null,vAlphabetic:H,vMathematical:H,vectorEffect:null,vHanging:H,vIdeographic:H,version:null,vertAdvY:H,vertOriginX:H,vertOriginY:H,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:H,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:`svg`,transform:$t}),rn=q({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:`xlink`,transform(e,t){return`xlink:`+t.slice(5).toLowerCase()}}),an=q({attributes:{xmlnsxlink:`xmlns:xlink`},properties:{xmlnsXLink:null,xmlns:null},space:`xmlns`,transform:en}),on=q({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:`xml`,transform(e,t){return`xml:`+t.slice(3).toLowerCase()}}),sn=/[A-Z]/g,cn=/-[a-z]/g,ln=/^data[-\w.:]+$/i;function un(e,t){let n=Gt(t),r=t,i=z;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)===`data`&&ln.test(t)){if(t.charAt(4)===`-`){let e=t.slice(5).replace(cn,fn);r=`data`+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!cn.test(e)){let n=e.replace(sn,dn);n.charAt(0)!==`-`&&(n=`-`+n),t=`data`+n}}i=Xt}return new i(r,t)}function dn(e){return`-`+e.toLowerCase()}function fn(e){return e.charAt(1).toUpperCase()}var pn=Wt([Qt,tn,rn,an,on],`html`),mn=Wt([Qt,nn,rn,an,on],`svg`),hn={}.hasOwnProperty;function gn(e,t){let n=t||{};function r(t,...n){let i=r.invalid,a=r.handlers;if(t&&hn.call(t,e)){let n=String(t[e]);i=hn.call(a,n)?a[n]:r.unknown}if(i)return i.call(this,t,...n)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}var _n=/["&'<>`]/g,vn=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,yn=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,bn=/[|\\{}()[\]^$+*?.]/g,xn=new WeakMap;function Sn(e,t){if(e=e.replace(t.subset?Cn(t.subset):_n,r),t.subset||t.escapeOnly)return e;return e.replace(vn,n).replace(yn,r);function n(e,n,r){return t.format((e.charCodeAt(0)-55296)*1024+e.charCodeAt(1)-56320+65536,r.charCodeAt(n+2),t)}function r(e,n,r){return t.format(e.charCodeAt(0),r.charCodeAt(n+1),t)}}function Cn(e){let t=xn.get(e);return t||(t=wn(e),xn.set(e,t)),t}function wn(e){let t=[],n=-1;for(;++n<e.length;)t.push(e[n].replace(bn,`\\$&`));return RegExp(`(?:`+t.join(`|`)+`)`,`g`)}var Tn=/[\dA-Fa-f]/;function En(e,t,n){let r=`&#x`+e.toString(16).toUpperCase();return n&&t&&!Tn.test(String.fromCharCode(t))?r:r+`;`}var Dn=/\d/;function On(e,t,n){let r=`&#`+String(e);return n&&t&&!Dn.test(String.fromCharCode(t))?r:r+`;`}var kn=`AElig.AMP.Aacute.Acirc.Agrave.Aring.Atilde.Auml.COPY.Ccedil.ETH.Eacute.Ecirc.Egrave.Euml.GT.Iacute.Icirc.Igrave.Iuml.LT.Ntilde.Oacute.Ocirc.Ograve.Oslash.Otilde.Ouml.QUOT.REG.THORN.Uacute.Ucirc.Ugrave.Uuml.Yacute.aacute.acirc.acute.aelig.agrave.amp.aring.atilde.auml.brvbar.ccedil.cedil.cent.copy.curren.deg.divide.eacute.ecirc.egrave.eth.euml.frac12.frac14.frac34.gt.iacute.icirc.iexcl.igrave.iquest.iuml.laquo.lt.macr.micro.middot.nbsp.not.ntilde.oacute.ocirc.ograve.ordf.ordm.oslash.otilde.ouml.para.plusmn.pound.quot.raquo.reg.sect.shy.sup1.sup2.sup3.szlig.thorn.times.uacute.ucirc.ugrave.uml.uuml.yacute.yen.yuml`.split(`.`),An={nbsp:`\xA0`,iexcl:`¡`,cent:`¢`,pound:`£`,curren:`¤`,yen:`¥`,brvbar:`¦`,sect:`§`,uml:`¨`,copy:`©`,ordf:`ª`,laquo:`«`,not:`¬`,shy:``,reg:`®`,macr:`¯`,deg:`°`,plusmn:`±`,sup2:`²`,sup3:`³`,acute:`´`,micro:`µ`,para:`¶`,middot:`·`,cedil:`¸`,sup1:`¹`,ordm:`º`,raquo:`»`,frac14:`¼`,frac12:`½`,frac34:`¾`,iquest:`¿`,Agrave:`À`,Aacute:`Á`,Acirc:`Â`,Atilde:`Ã`,Auml:`Ä`,Aring:`Å`,AElig:`Æ`,Ccedil:`Ç`,Egrave:`È`,Eacute:`É`,Ecirc:`Ê`,Euml:`Ë`,Igrave:`Ì`,Iacute:`Í`,Icirc:`Î`,Iuml:`Ï`,ETH:`Ð`,Ntilde:`Ñ`,Ograve:`Ò`,Oacute:`Ó`,Ocirc:`Ô`,Otilde:`Õ`,Ouml:`Ö`,times:`×`,Oslash:`Ø`,Ugrave:`Ù`,Uacute:`Ú`,Ucirc:`Û`,Uuml:`Ü`,Yacute:`Ý`,THORN:`Þ`,szlig:`ß`,agrave:`à`,aacute:`á`,acirc:`â`,atilde:`ã`,auml:`ä`,aring:`å`,aelig:`æ`,ccedil:`ç`,egrave:`è`,eacute:`é`,ecirc:`ê`,euml:`ë`,igrave:`ì`,iacute:`í`,icirc:`î`,iuml:`ï`,eth:`ð`,ntilde:`ñ`,ograve:`ò`,oacute:`ó`,ocirc:`ô`,otilde:`õ`,ouml:`ö`,divide:`÷`,oslash:`ø`,ugrave:`ù`,uacute:`ú`,ucirc:`û`,uuml:`ü`,yacute:`ý`,thorn:`þ`,yuml:`ÿ`,fnof:`ƒ`,Alpha:`Α`,Beta:`Β`,Gamma:`Γ`,Delta:`Δ`,Epsilon:`Ε`,Zeta:`Ζ`,Eta:`Η`,Theta:`Θ`,Iota:`Ι`,Kappa:`Κ`,Lambda:`Λ`,Mu:`Μ`,Nu:`Ν`,Xi:`Ξ`,Omicron:`Ο`,Pi:`Π`,Rho:`Ρ`,Sigma:`Σ`,Tau:`Τ`,Upsilon:`Υ`,Phi:`Φ`,Chi:`Χ`,Psi:`Ψ`,Omega:`Ω`,alpha:`α`,beta:`β`,gamma:`γ`,delta:`δ`,epsilon:`ε`,zeta:`ζ`,eta:`η`,theta:`θ`,iota:`ι`,kappa:`κ`,lambda:`λ`,mu:`μ`,nu:`ν`,xi:`ξ`,omicron:`ο`,pi:`π`,rho:`ρ`,sigmaf:`ς`,sigma:`σ`,tau:`τ`,upsilon:`υ`,phi:`φ`,chi:`χ`,psi:`ψ`,omega:`ω`,thetasym:`ϑ`,upsih:`ϒ`,piv:`ϖ`,bull:`•`,hellip:`…`,prime:`′`,Prime:`″`,oline:`‾`,frasl:`⁄`,weierp:`℘`,image:`ℑ`,real:`ℜ`,trade:`™`,alefsym:`ℵ`,larr:`←`,uarr:`↑`,rarr:`→`,darr:`↓`,harr:`↔`,crarr:`↵`,lArr:`⇐`,uArr:`⇑`,rArr:`⇒`,dArr:`⇓`,hArr:`⇔`,forall:`∀`,part:`∂`,exist:`∃`,empty:`∅`,nabla:`∇`,isin:`∈`,notin:`∉`,ni:`∋`,prod:`∏`,sum:`∑`,minus:`−`,lowast:`∗`,radic:`√`,prop:`∝`,infin:`∞`,ang:`∠`,and:`∧`,or:`∨`,cap:`∩`,cup:`∪`,int:`∫`,there4:`∴`,sim:`∼`,cong:`≅`,asymp:`≈`,ne:`≠`,equiv:`≡`,le:`≤`,ge:`≥`,sub:`⊂`,sup:`⊃`,nsub:`⊄`,sube:`⊆`,supe:`⊇`,oplus:`⊕`,otimes:`⊗`,perp:`⊥`,sdot:`⋅`,lceil:`⌈`,rceil:`⌉`,lfloor:`⌊`,rfloor:`⌋`,lang:`〈`,rang:`〉`,loz:`◊`,spades:`♠`,clubs:`♣`,hearts:`♥`,diams:`♦`,quot:`"`,amp:`&`,lt:`<`,gt:`>`,OElig:`Œ`,oelig:`œ`,Scaron:`Š`,scaron:`š`,Yuml:`Ÿ`,circ:`ˆ`,tilde:`˜`,ensp:` `,emsp:` `,thinsp:` `,zwnj:``,zwj:``,lrm:``,rlm:``,ndash:`–`,mdash:`—`,lsquo:`‘`,rsquo:`’`,sbquo:`‚`,ldquo:`“`,rdquo:`”`,bdquo:`„`,dagger:`†`,Dagger:`‡`,permil:`‰`,lsaquo:`‹`,rsaquo:`›`,euro:`€`},jn=[`cent`,`copy`,`divide`,`gt`,`lt`,`not`,`para`,`times`],Mn={}.hasOwnProperty,Nn={},Pn;for(Pn in An)Mn.call(An,Pn)&&(Nn[An[Pn]]=Pn);var Fn=/[^\dA-Za-z]/;function In(e,t,n,r){let i=String.fromCharCode(e);if(Mn.call(Nn,i)){let e=Nn[i],a=`&`+e;return n&&kn.includes(e)&&!jn.includes(e)&&(!r||t&&t!==61&&Fn.test(String.fromCharCode(t)))?a:a+`;`}return``}function Ln(e,t,n){let r=En(e,t,n.omitOptionalSemicolons),i;if((n.useNamedReferences||n.useShortestReferences)&&(i=In(e,t,n.omitOptionalSemicolons,n.attribute)),(n.useShortestReferences||!i)&&n.useShortestReferences){let i=On(e,t,n.omitOptionalSemicolons);i.length<r.length&&(r=i)}return i&&(!n.useShortestReferences||i.length<r.length)?i:r}function J(e,t){return Sn(e,Object.assign({format:Ln},t))}var Rn=/^>|^->|<!--|-->|--!>|<!-$/g,zn=[`>`],Bn=[`<`,`>`];function Vn(e,t,n,r){return r.settings.bogusComments?`<?`+J(e.value,Object.assign({},r.settings.characterReferences,{subset:zn}))+`>`:`<!--`+e.value.replace(Rn,i)+`-->`;function i(e){return J(e,Object.assign({},r.settings.characterReferences,{subset:Bn}))}}function Hn(e,t,n,r){return`<!`+(r.settings.upperDoctype?`DOCTYPE`:`doctype`)+(r.settings.tightDoctype?``:` `)+`html>`}function Un(e,t){let n=String(e);if(typeof t!=`string`)throw TypeError(`Expected character`);let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function Wn(e,t){let n=t||{};return(e[e.length-1]===``?[...e,``]:e).join((n.padRight?` `:``)+`,`+(n.padLeft===!1?``:` `)).trim()}function Gn(e){return e.join(` `).trim()}var Kn=/[ \t\n\f\r]/g;function qn(e){return typeof e==`object`?e.type===`text`&&Jn(e.value):Jn(e)}function Jn(e){return e.replace(Kn,``)===``}var Y=Zn(1),Yn=Zn(-1),Xn=[];function Zn(e){return t;function t(t,n,r){let i=t?t.children:Xn,a=(n||0)+e,o=i[a];if(!r)for(;o&&qn(o);)a+=e,o=i[a];return o}}var Qn={}.hasOwnProperty;function $n(e){return t;function t(t,n,r){return Qn.call(e,t.tagName)&&e[t.tagName](t,n,r)}}var er=$n({body:rr,caption:tr,colgroup:tr,dd:sr,dt:or,head:tr,html:nr,li:ar,optgroup:lr,option:ur,p:ir,rp:cr,rt:cr,tbody:fr,td:hr,tfoot:pr,th:hr,thead:dr,tr:mr});function tr(e,t,n){let r=Y(n,t,!0);return!r||r.type!==`comment`&&!(r.type===`text`&&qn(r.value.charAt(0)))}function nr(e,t,n){let r=Y(n,t);return!r||r.type!==`comment`}function rr(e,t,n){let r=Y(n,t);return!r||r.type!==`comment`}function ir(e,t,n){let r=Y(n,t);return r?r.type===`element`&&(r.tagName===`address`||r.tagName===`article`||r.tagName===`aside`||r.tagName===`blockquote`||r.tagName===`details`||r.tagName===`div`||r.tagName===`dl`||r.tagName===`fieldset`||r.tagName===`figcaption`||r.tagName===`figure`||r.tagName===`footer`||r.tagName===`form`||r.tagName===`h1`||r.tagName===`h2`||r.tagName===`h3`||r.tagName===`h4`||r.tagName===`h5`||r.tagName===`h6`||r.tagName===`header`||r.tagName===`hgroup`||r.tagName===`hr`||r.tagName===`main`||r.tagName===`menu`||r.tagName===`nav`||r.tagName===`ol`||r.tagName===`p`||r.tagName===`pre`||r.tagName===`section`||r.tagName===`table`||r.tagName===`ul`):!n||n.type!==`element`||n.tagName!==`a`&&n.tagName!==`audio`&&n.tagName!==`del`&&n.tagName!==`ins`&&n.tagName!==`map`&&n.tagName!==`noscript`&&n.tagName!==`video`}function ar(e,t,n){let r=Y(n,t);return!r||r.type===`element`&&r.tagName===`li`}function or(e,t,n){let r=Y(n,t);return!!(r&&r.type===`element`&&(r.tagName===`dt`||r.tagName===`dd`))}function sr(e,t,n){let r=Y(n,t);return!r||r.type===`element`&&(r.tagName===`dt`||r.tagName===`dd`)}function cr(e,t,n){let r=Y(n,t);return!r||r.type===`element`&&(r.tagName===`rp`||r.tagName===`rt`)}function lr(e,t,n){let r=Y(n,t);return!r||r.type===`element`&&r.tagName===`optgroup`}function ur(e,t,n){let r=Y(n,t);return!r||r.type===`element`&&(r.tagName===`option`||r.tagName===`optgroup`)}function dr(e,t,n){let r=Y(n,t);return!!(r&&r.type===`element`&&(r.tagName===`tbody`||r.tagName===`tfoot`))}function fr(e,t,n){let r=Y(n,t);return!r||r.type===`element`&&(r.tagName===`tbody`||r.tagName===`tfoot`)}function pr(e,t,n){return!Y(n,t)}function mr(e,t,n){let r=Y(n,t);return!r||r.type===`element`&&r.tagName===`tr`}function hr(e,t,n){let r=Y(n,t);return!r||r.type===`element`&&(r.tagName===`td`||r.tagName===`th`)}var gr=$n({body:yr,colgroup:br,head:vr,html:_r,tbody:xr});function _r(e){let t=Y(e,-1);return!t||t.type!==`comment`}function vr(e){let t=new Set;for(let n of e.children)if(n.type===`element`&&(n.tagName===`base`||n.tagName===`title`)){if(t.has(n.tagName))return!1;t.add(n.tagName)}let n=e.children[0];return!n||n.type===`element`}function yr(e){let t=Y(e,-1,!0);return!t||t.type!==`comment`&&!(t.type===`text`&&qn(t.value.charAt(0)))&&(t.type!==`element`||t.tagName!==`meta`&&t.tagName!==`link`&&t.tagName!==`script`&&t.tagName!==`style`&&t.tagName!==`template`)}function br(e,t,n){let r=Yn(n,t),i=Y(e,-1,!0);return n&&r&&r.type===`element`&&r.tagName===`colgroup`&&er(r,n.children.indexOf(r),n)?!1:!!(i&&i.type===`element`&&i.tagName===`col`)}function xr(e,t,n){let r=Yn(n,t),i=Y(e,-1);return n&&r&&r.type===`element`&&(r.tagName===`thead`||r.tagName===`tbody`)&&er(r,n.children.indexOf(r),n)?!1:!!(i&&i.type===`element`&&i.tagName===`tr`)}var Sr={name:[[`
|
|
4
4
|
\f\r &/=>`.split(``),`
|
package/client/dist/index.html
CHANGED
|
@@ -5,11 +5,12 @@
|
|
|
5
5
|
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
|
|
6
6
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
7
7
|
<title>Intlayer Editor</title>
|
|
8
|
-
<script type="module" crossorigin src="/assets/index-
|
|
9
|
-
<link rel="modulepreload" crossorigin href="/assets/
|
|
10
|
-
<link rel="modulepreload" crossorigin href="/assets/
|
|
11
|
-
<link rel="modulepreload" crossorigin href="/assets/
|
|
12
|
-
<link rel="
|
|
8
|
+
<script type="module" crossorigin src="/assets/index-CXSTru2g.js"></script>
|
|
9
|
+
<link rel="modulepreload" crossorigin href="/assets/rolldown-runtime-hePW80VL.js">
|
|
10
|
+
<link rel="modulepreload" crossorigin href="/assets/react-CwJFpaho.js">
|
|
11
|
+
<link rel="modulepreload" crossorigin href="/assets/dist-CcmWBeAo.js">
|
|
12
|
+
<link rel="modulepreload" crossorigin href="/assets/dynamic-Cl5uPODm.js">
|
|
13
|
+
<link rel="stylesheet" crossorigin href="/assets/index-CmHcNYMx.css">
|
|
13
14
|
</head>
|
|
14
15
|
<body>
|
|
15
16
|
<div id="root"></div>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "intlayer-editor",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.5.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Integrate the Intlayer visual editor into your Intlayer projects, enabling CMS-like content management with multilingual support.",
|
|
6
6
|
"keywords": [
|
|
@@ -93,41 +93,40 @@
|
|
|
93
93
|
"@fastify/formbody": "9.0.0",
|
|
94
94
|
"@fastify/helmet": "13.1.1",
|
|
95
95
|
"@fastify/static": "10.1.3",
|
|
96
|
-
"@intlayer/config": "9.
|
|
97
|
-
"@intlayer/engine": "9.
|
|
98
|
-
"@intlayer/unmerged-dictionaries-entry": "9.
|
|
99
|
-
"fastify": "5.12.
|
|
100
|
-
"fastify-intlayer": "9.
|
|
96
|
+
"@intlayer/config": "9.5.1",
|
|
97
|
+
"@intlayer/engine": "9.5.1",
|
|
98
|
+
"@intlayer/unmerged-dictionaries-entry": "9.5.1",
|
|
99
|
+
"fastify": "5.12.3",
|
|
100
|
+
"fastify-intlayer": "9.5.1",
|
|
101
101
|
"mime": "4.1.0"
|
|
102
102
|
},
|
|
103
103
|
"devDependencies": {
|
|
104
|
-
"@intlayer/design-system": "9.
|
|
105
|
-
"@intlayer/editor-react": "9.
|
|
106
|
-
"@intlayer/types": "9.
|
|
107
|
-
"@rolldown/plugin-babel": "0.2.3",
|
|
104
|
+
"@intlayer/design-system": "9.5.1",
|
|
105
|
+
"@intlayer/editor-react": "9.5.1",
|
|
106
|
+
"@intlayer/types": "9.5.1",
|
|
108
107
|
"@tailwindcss/vite": "4.3.3",
|
|
109
108
|
"@tanstack/react-query": "5.102.8",
|
|
110
|
-
"@types/node": "26.
|
|
109
|
+
"@types/node": "26.5.0",
|
|
111
110
|
"@types/react": "19.2.18",
|
|
112
111
|
"@types/react-dom": "19.2.7",
|
|
113
112
|
"@utils/ts-config": "1.0.4",
|
|
114
113
|
"@vitejs/plugin-react": "6.1.1",
|
|
115
|
-
"autoprefixer": "10.5.
|
|
116
|
-
"babel-plugin-react-compiler": "1.0.0",
|
|
114
|
+
"autoprefixer": "10.5.5",
|
|
117
115
|
"framer-motion": "13.2.0",
|
|
118
116
|
"fuse.js": "7.5.0",
|
|
119
117
|
"globals": "17.12.0",
|
|
120
|
-
"intlayer": "9.
|
|
121
|
-
"lucide-react": "1.
|
|
118
|
+
"intlayer": "9.5.1",
|
|
119
|
+
"lucide-react": "1.43.0",
|
|
120
|
+
"oxc-transform-react": "^0.149.0",
|
|
122
121
|
"react": "19.2.8",
|
|
123
122
|
"react-dom": "19.2.8",
|
|
124
|
-
"react-intlayer": "9.
|
|
123
|
+
"react-intlayer": "9.5.1",
|
|
125
124
|
"react-router-dom": "7.18.3",
|
|
126
125
|
"tailwindcss": "4.3.3",
|
|
127
126
|
"tsdown": "0.23.0",
|
|
128
127
|
"typescript": "7.0.2",
|
|
129
128
|
"vite": "8.2.2",
|
|
130
|
-
"vite-intlayer": "9.
|
|
129
|
+
"vite-intlayer": "9.5.1",
|
|
131
130
|
"vitest": "5.0.0"
|
|
132
131
|
},
|
|
133
132
|
"engines": {
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/shikiBundle-C2Pc5KKu.js","assets/react-SIfiwpqq.js","assets/MarkDownRender-clRAHZLd.js","assets/dynamic-D3VGB1Rn.js","assets/dist-DmXGrB9_.js","assets/index-BNSCZ8xm.js","assets/index-DB7qjJFL.css"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{i as e,t}from"./react-SIfiwpqq.js";import{n,r}from"./dist-DmXGrB9_.js";import{c as i,o as a,r as o,s}from"./MarkDownRender-clRAHZLd.js";import{l as c}from"./index-BNSCZ8xm.js";var l=r(),u=e(t(),1),d=n(),f=async(e,t)=>{let{codeToHtml:n}=await c(async()=>{let{codeToHtml:e}=await import(`./shikiBundle-C2Pc5KKu.js`).then(e=>e.i);return{codeToHtml:e}},__vite__mapDeps([0,1,2,3,4,5,6]));return n(String(e),{lang:a(t).id,themes:o,defaultColor:!1})},p=e=>{let t=(0,l.c)(7),{children:n,lang:r}=e,[a,o]=(0,u.useState)(null),c,p;t[0]!==n||t[1]!==r?(c=()=>{let e=!1;return f(n,r).then(t=>{e||o(t)}).catch(t=>{console.error(`Failed to highlight code:`,t),e||o(``)}),()=>{e=!0}},p=[n,r],t[0]=n,t[1]=r,t[2]=c,t[3]=p):(c=t[2],p=t[3]),(0,u.useEffect)(c,p);let m;return t[4]!==n||t[5]!==a?(m=(0,d.jsx)(`div`,{className:i,children:a?(0,d.jsx)(`div`,{dangerouslySetInnerHTML:{__html:a}}):(0,d.jsx)(s,{children:n})}),t[4]=n,t[5]=a,t[6]=m):m=t[6],m};export{p as CodeBlockShiki};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{t as e}from"./MarkDownRender-clRAHZLd.js";export{e as MarkdownRenderer};
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/CodeBlockShiki-Bjm0Ego0.js","assets/react-SIfiwpqq.js","assets/dist-DmXGrB9_.js","assets/index-BNSCZ8xm.js","assets/dynamic-D3VGB1Rn.js","assets/index-DB7qjJFL.css","assets/astro-JHDYjn39.js","assets/json-B88Oqtu5.js","assets/javascript-BzbQS41l.js","assets/typescript-j_1H8WHN.js","assets/css-LbU1hoFO.js","assets/postcss-D_Wz94rJ.js","assets/tsx-BOvsFOI6.js","assets/css-CdtkT07m.js","assets/html-DYtkB_T1.js","assets/html-B2cKP6UN.js","assets/javascript-Yelw-5ZN.js","assets/json-CaljABEy.js","assets/svelte-tEuLYt3E.js","assets/tsx-5f3ulCja.js","assets/typescript-Utq2Cl8c.js","assets/vue-Bg0byEaI.js","assets/shikiBundle-C2Pc5KKu.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{i as e,t}from"./react-SIfiwpqq.js";import{A as n,N as r,P as i,St as a,a as o,c as s,et as c,i as l,j as u,l as d,m as f,n as p,o as m,p as h,r as g,s as _,t as v,tt as y,u as b}from"./dynamic-D3VGB1Rn.js";import{n as x,r as S,t as C}from"./dist-DmXGrB9_.js";import{l as w}from"./index-BNSCZ8xm.js";var T={blockQuote:`0`,breakLine:`1`,breakThematic:`2`,codeBlock:`3`,codeFenced:`4`,codeInline:`5`,footnote:`6`,footnoteReference:`7`,gfmTask:`8`,heading:`9`,headingSetext:`10`,htmlBlock:`11`,htmlComment:`12`,htmlSelfClosing:`13`,customComponent:`34`,image:`14`,link:`15`,linkAngleBraceStyleDetector:`16`,linkBareUrlDetector:`17`,newlineCoalescer:`19`,orderedList:`20`,paragraph:`21`,ref:`22`,refImage:`23`,refLink:`24`,table:`25`,tableSeparator:`26`,text:`27`,textBolded:`28`,textEmphasized:`29`,textEscaped:`30`,textMarked:`31`,textStrikethroughed:`32`,unorderedList:`33`},E={MAX:0,HIGH:1,MED:2,LOW:3,MIN:4},D=`allowFullScreen.allowTransparency.autoComplete.autoFocus.autoPlay.cellPadding.cellSpacing.charSet.classId.colSpan.contentEditable.contextMenu.crossOrigin.encType.formAction.formEncType.formMethod.formNoValidate.formTarget.frameBorder.hrefLang.inputMode.keyParams.keyType.marginHeight.marginWidth.maxLength.mediaGroup.minLength.noValidate.radioGroup.readOnly.rowSpan.spellCheck.srcDoc.srcLang.srcSet.tabIndex.useMap`.split(`.`).reduce((e,t)=>(e[t.toLowerCase()]=t,e),{class:`className`,for:`htmlFor`}),O={amp:`&`,apos:`'`,gt:`>`,lt:`<`,nbsp:`\xA0`,quot:`“`},ee=[`style`,`script`,`pre`],k=[`src`,`href`,`data`,`formAction`,`srcDoc`,`action`],te=/([-A-Z0-9_:]+)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|(?:\{((?:\\.|{[^}]*?}|[^}])*)\})))?/gi,ne=/\n{2,}$/,re=/^(\s*>[\s\S]*?)(?=\n\n|$)/,ie=/^ *> ?/gm,ae=/^(?:\[!([^\]]*)\]\n)?([\s\S]*)/,oe=/^ {2,}\n/,se=/^(?:([-*_])( *\1){2,}) *(?:\n *)+\n/,ce=/^(?: {1,3})?(`{3,}|~{3,}) *(\S+)? *([^\n]*?)?\n([\s\S]*?)(?:\1\n?|$)/,le=/^(?: {4}[^\n]+\n*)+(?:\n *)+\n?/,ue=/^([ \t]*)(`{3,}|~{3,})/,de=/^(`+)((?:\\`|(?!\1)`|[^`])+)\1/,fe=/^(?:\n *)*\n/,pe=/^\[\^([^\]]+)](:(.*)((\n+ {4,}.*)|(\n(?!\[\^).+))*)/,me=/^\[\^([^\]]+)]/,he=/^---[ \t]*\n(.|\n)*?\n---[ \t]*\n/,ge=/^\s*?\[(x|\s)\]/,_e=/^ *(#{1,6}) *([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,ve=/^ *(#{1,6}) +([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,ye=/^([^\n]+)\n *(=|-)\2{2,} *\n/,be=`[^>"'<]*`,A=`${be}(?:(?:"[^"\\n]*"|'[^'\\n]*'|<.*?>|["'])${be})*`,xe=`(?![^>]*/>)`,Se=`<\\1[^>]*?>`,Ce=RegExp(`^ *(?!<[a-zA-Z][^ >/]* ?/>)<([a-zA-Z][^ >/]*) ?(${xe}${A})>\\n?(\\s*(?:${Se}[\\s\\S]*?</\\1>|(?!<\\1\\b)[\\s\\S])*?)</\\1>(?!</\\1>)\\n*`,`i`),we=/&([a-z0-9]+|#[0-9]{1,6}|#x[0-9a-fA-F]{1,6});/gi,Te=/^<!--[\s\S]*?(?:-->)/,Ee=/^(data|aria|x)-[a-z_][a-z\d_.-]*$/,De=RegExp(`^ *<([a-zA-Z][a-zA-Z0-9:]*)(?:\\s+(${A}))?/?>(?!</\\1>)(\\s*\\n)?`,`i`),Oe=RegExp(`^ *<([A-Z][a-zA-Z0-9]*)(?:\\s+(${A}))?>\\n?(\\s*(?:${Se}[\\s\\S]*?</\\1>|(?!<\\1\\b)[\\s\\S])*?)</\\1>(?!</\\1>)\\n*`),ke=/^\{.*\}$/,Ae=/^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/,je=/^<([^ >]+[:@/][^ >]+)>/,Me=/-([a-z])?/gi,Ne=/^(\|.*)\n(?: *(\|? *[-:]+ *\|[-| :]*)\n((?:.*\|.*\n)*))?\n?/,Pe=/(^ *\||\| *$)/g,Fe=/^ *:-+: *$/,Ie=/^ *:-+ *$/,Le=/^ *-+: *$/,Re=/^[^\n]+(?: {2}\n|\n{2,})/,ze=/^\[([^\]]*)\]:\s+<?([^\s>]+)>?\s*("([^"]*)")?/,Be=/^!\[([^\]]*)\] ?\[([^\]]*)\]/,Ve=/^\[([^\]]*)\] ?\[([^\]]*)\]/,He=/^ *<([a-z][a-z0-9:-]*)\b/i,Ue=/^ *<([a-zA-Z][a-zA-Z0-9:]*)[\s>/]/,We=/^ *<([A-Z][a-zA-Z0-9]*)/,Ge=/(\n|^[-*]\s|^#|^ {2,}|^-{2,}|^>\s)/,Ke=/\r\n?|\f|\t/g,qe=/^\n+/,Je=/^\n*([ \t]*)/,j=`(?:\\d+\\.)`,M=`(?:[*+-])`,Ye=/^\\([^0-9A-Za-z\s])/,Xe=/\\([^0-9A-Za-z\s])/g,Ze=/^[\s\S](?:(?! {2}\n|[0-9]\.|http)[^=*_~\-\n:<`\\[!])*/,Qe=/^(:[a-zA-Z0-9-_]+:)/,N=e=>`(?=[\\s\\S]+?\\1${e?`\\1`:``})`,P="((?:\\[.*?\\][([].*?[)\\]]|<.*?>(?:.*?<.*?>)?|`.*?`|\\\\[^\\s]|[\\s\\S])+?)",$e=RegExp(`^([*_])\\1${N(1)}${P}\\1\\1(?!\\1)`),et=RegExp(`^([*_])${N(0)}${P}\\1(?!\\1)`),tt=RegExp(`^(==)${N(0)}${P}\\1`),nt=RegExp(`^(~~)${N(0)}${P}\\1`),rt=e=>`( *)(`+(e===1?j:M)+`) +`,it=rt(1),at=rt(2),ot=e=>RegExp(`^`+(e===1?it:at)),st=ot(1),ct=ot(2),lt=e=>RegExp(`^`+(e===1?it:at)+`[^\\n]*(?:\\n(?!\\1`+(e===1?j:M)+` )[^\\n]*)*(\\n|$)`,`gm`),ut=lt(1),dt=lt(2),ft=e=>{let t=e===1?j:M;return RegExp(`^( *)(`+t+`) [\\s\\S]+?(?:\\n{2,}(?! )(?!\\1`+t+` (?!`+t+` ))\\n*|\\s*\\n*$)`)},pt=ft(1),mt=ft(2),F=e=>{let t=e.length;for(;t>0&&e[t-1]<=` `;)t--;return e.slice(0,t)},I=(e,t)=>e.startsWith(t),ht=e=>{let t=e[0];return(t===`"`||t===`'`)&&e.length>=2&&e[e.length-1]===t?e.slice(1,-1):e},L=e=>e&&e.replace(Xe,`$1`),gt=(...e)=>e.filter(Boolean).join(` `),R=(e,t,n)=>{let r=e,i=t.split(`.`);for(;i.length&&(r=r[i[0]],r!==void 0);)i.shift();return r??n},_t=[[/[ÀÁÂÃÄÅàáâãä忯]/g,`a`],[/[çÇ]/g,`c`],[/[ðÐ]/g,`d`],[/[ÈÉÊËéèêë]/g,`e`],[/[ÏïÎîÍíÌì]/g,`i`],[/[Ññ]/g,`n`],[/[øØœŒÕõÔôÓóÒò]/g,`o`],[/[ÜüÛûÚúÙù]/g,`u`],[/[ŸÿÝý]/g,`y`],[/[^a-z0-9- ]/gi,``],[/ /gi,`-`]],vt=e=>{let t=e;for(let e=0;e<_t.length;e++){let[n,r]=_t[e];t=t.replace(n,r)}return t.toLowerCase()},yt=/(javascript|vbscript|data(?!:image)):/i,bt=/[^A-Za-z0-9/:]/g,xt=e=>{if(e.indexOf(`:`)===-1&&e.indexOf(`%`)===-1)return e;try{let t=decodeURIComponent(e).replace(bt,``);if(yt.test(t))return console.warn(`Input contains an unsafe JavaScript/VBScript/data expression, it will not be rendered.`,t),null}catch{return console.warn(`Input could not be decoded due to malformed syntax or characters, it will not be rendered.`,e),null}return e},St=e=>e.replace(Ke,e=>e===` `?` `:e===`\f`?``:`
|
|
3
|
-
`),Ct=(e,t)=>{if(!t)return e;let n=e.split(`
|
|
4
|
-
`),r=null,i=(e,t)=>t&&e.startsWith(t)?e.slice(t.length):e;return n.map(e=>{let n=e.match(ue);if(!r)return n&&(r={indentation:n[1],marker:n[2]}),i(e,t);let a=n?.[2]?.startsWith(r.marker),{indentation:o}=r;return a&&(r=null),i(e,o)}).join(`
|
|
5
|
-
`)},wt=e=>(e.indexOf(`-`)!==-1&&e.match(Ee)===null&&(e=e.replace(Me,(e,t)=>t.toUpperCase())),e),Tt=e=>{let t=[],n=``,r=!1,i=!1,a=``;if(!e)return t;for(let o=0;o<e.length;o++){let s=e[o];if((s===`"`||s===`'`)&&!r&&(i?s===a&&(i=!1,a=``):(i=!0,a=s)),s===`(`&&n.endsWith(`url`)?r=!0:s===`)`&&r&&(r=!1),s===`;`&&!i&&!r){let e=n.trim();if(e){let n=e.indexOf(`:`);if(n>0){let r=e.slice(0,n).trim(),i=e.slice(n+1).trim();t.push([r,i])}}n=``}else n+=s}let o=n.trim();if(o){let e=o.indexOf(`:`);if(e>0){let n=o.slice(0,e).trim(),r=o.slice(e+1).trim();t.push([n,r])}}return t},Et=(e,t,n,r)=>t===`style`?Tt(n).reduce((t,[n,i])=>{let a=n.replace(/(-[a-z])/g,e=>e[1].toUpperCase());return t[a]=r(i,e,n),t},{}):k.indexOf(t)===-1?(n.match(ke)&&(n=L(n.slice(1,n.length-1))),n===`true`||n!==`false`&&n):r(L(n),e,t),Dt=e=>Le.test(e)?`right`:Fe.test(e)?`center`:(Ie.test(e),`left`),Ot=e=>e.replace(Pe,``).split(`|`).map(Dt),kt=(e,t,n,r)=>{let i=n.inTable;n.inTable=!0;let a=[[]],o=``,s=()=>{if(!o)return;let e=a[a.length-1];e.push.apply(e,t(o,n)),o=``};return e.trim().split(/(`[^`]*`|\\\||\|)/).filter(Boolean).forEach((e,t,n)=>{if(e.trim()===`|`&&(s(),r)){t!==0&&t!==n.length-1&&a.push([]);return}o+=e}),s(),n.inTable=i,a},At=(e,t,n)=>e.trim().split(`
|
|
6
|
-
`).map(e=>kt(e,t,n,!0)),jt=(e,t,n)=>{if(Array.isArray(n)){for(let t=0;t<n.length;t++)if(I(e,n[t]))return!0;return!1}return n(e,t)},z=e=>(e.inline=1,e),B=e=>z((t,n)=>n.inline?e.exec(t):null),V=e=>z((t,n)=>n.inline||n.simple?e.exec(t):null),H=e=>(t,n)=>n.inline||n.simple?null:e.exec(t),U=e=>z((t,n)=>typeof e==`function`?e(t,n):e.exec(t)),W=(e,t,n)=>{let r=n.inline??!1,i=n.simple??!1;n.inline=!0,n.simple=!0;let a=e(t,n);return n.inline=r,n.simple=i,a},Mt=(e,t,n)=>{let r=n.inline??!1,i=n.simple??!1;n.inline=!1,n.simple=!0;let a=e(t,n);return n.inline=r,n.simple=i,a},G=(e,t,n={})=>{let r=n.inline||!1;n.inline=!1;let i=F(t),a=e(/\n\n$/.test(i)===!1?i.endsWith(`
|
|
7
|
-
`)?`${i}\n`:`${i}\n\n`:i,n);return n.inline=r,a},K=(e,t,n)=>({children:W(t,e[2]??``,n)}),q=()=>({}),Nt=()=>null,Pt=(e,t)=>{for(let n=0;n<e.length;n++)if(e[n].test(t))return!0;return!1},Ft=new Map,It=(e,t)=>{for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0},Lt=(e,t)=>{let n=Ft.get(e.length);if(n){for(let t=0;t<n.length;t++)if(It(e,n[t].names))return n[t].order}let r=e.slice().sort((e,n)=>t[e]._order-t[n]._order||+e-n),i={names:e.slice(),order:r};return n?n.push(i):Ft.set(e.length,[i]),r},Rt=(e,t)=>{let n=t.lastIndexOf(`
|
|
8
|
-
`),r=e.prevCaptureHasBlankLine!==void 0;e.prevCaptureHasBlankLine!==!0&&(e.prevCaptureHasBlankLine=t.indexOf(`
|
|
9
|
-
|
|
10
|
-
`)!==-1||r&&t.charCodeAt(0)===10&&e.prevCaptureIndent===``);let i=n===-1?e.prevCaptureIndent===void 0?void 0:e.prevCaptureIndent+t:t.slice(n+1);if(i===void 0||i===``){e.prevCaptureIndent=i;return}for(let t=0;t<i.length;t++)if(i.charCodeAt(t)!==32){e.prevCaptureIndent=void 0;return}e.prevCaptureIndent=i},zt=e=>{let t=Object.keys(e);t.forEach(t=>{let n=e[t]?._order;(typeof n!=`number`||!Number.isFinite(n))&&console.warn(`intlayer: Invalid order for rule \`${t}\`: ${n}`)});let n=Lt(t,e),r=n.length,i=Array(r),a=Array(r),o=Array(r);for(let t=0;t<r;t++){let r=e[n[t]];i[t]=r._qualify,a[t]=r._match,o[t]=r._parse}let s=(e,t={})=>{let c=[];if(t.prevCaptureHasBlankLine===void 0&&(t.prevCaptureIndent=``),e.trim())for(;e;)for(let l=0;l<r;l++){let r=i[l];if(r&&!jt(e,t,r))continue;let u=a[l](e,t);if(u?.[0]){e=e.substring(u[0].length);let r=o[l](u,s,t);Rt(t,u[0]),r.type||=n[l],c.push(r);break}}return c};return(e,t)=>s(St(e),t)},Bt=e=>{let t=(n,r={})=>{if(!Array.isArray(n))return e(n,t,r);let i=r.key,a=[],o=!1,s=0;for(let e=0;e<n.length;e++){let i=t(n[e],{...r,key:s}),c=typeof i==`string`;c&&o?a[a.length-1]=a[a.length-1]+i:i!==null&&(a.push(i),s++),o=c}return r.key=i,a};return t},Vt=(e,t)=>(n,r,i)=>{let a=e[n.type]?._render;return t?t(()=>a?.(n,r,i),n,r,i):a?.(n,r,i)},Ht=/^!\[(.*?)\]\( *((?:\([^)]*\)|[^() ])*) *"?([^)"]*)?"?\)/,Ut=RegExp(`^\\[((?:\\[[^\\[\\]]*(?:\\[[^\\[\\]]*\\][^\\[\\]]*)*\\]|[^\\[\\]])*)\\]\\(\\s*<?((?:\\([^)]*\\)|[^\\s\\\\]|\\\\.)*?)>?(?:\\s+['"]([\\s\\S]*?)['"])?\\s*\\)`),Wt=new Map,Gt=e=>{let t=Wt.get(e);if(t)return t;let n=RegExp(`</${e}>`,`i`);return Wt.set(e,n),n},Kt=e=>{let t=null;return n=>{if(typeof n!=`string`)return n;let r=R(e,n);if(r)return r;if(!t){t=new Map;for(let n of Object.keys(e)){let e=n.toLowerCase();t.has(e)||t.set(e,n)}}let i=t.get(n.toLowerCase());return(i?R(e,i):void 0)||n}},qt=e=>t=>e.slugify?e.slugify(t,vt):vt(t),Jt=(e,t)=>{let{runtime:n,components:r={}}=e,i=Kt(r),a=t.tagfilter?[`title`,`textarea`,`style`,`xmp`,`iframe`,`noembed`,`noframes`,`script`,`plaintext`]:[];return(e,t,...r)=>{if(typeof e==`string`&&a.includes(e.toLowerCase()))return null;let o=typeof e==`string`,s=gt(t?.className,t?.class),c={},l=!1;if(t)for(let e in t){let n=t[e];n!=null&&(e===`className`||e===`class`?l||=(s&&(c.className=s),!0):c[e]=n)}!l&&s&&(c.className=s);let u=c;n.normalizeProps&&o&&(u=n.normalizeProps(e,c));let d=i(e);return n.createElement(d,u,...r.length===1?[r[0]]:r)}},Yt=(e,t,n,r,i,a,o,s)=>{let c=qt(t),l=t.sanitizer??xt,u=t.namedCodesToUnicode?{...O,...t.namedCodesToUnicode}:O,d=t=>{let n=t===1,r=n?pt:mt,i=n?ut:dt,a=n?st:ct;return{_qualify:e=>a.test(e),_match:z((e,t)=>{let n=t.prevCaptureIndent,i=n!==void 0,a=t.list??(!t.inline&&!t.simple);if(i&&a){let t=n?n+e:e;return r.exec(t)}return null}),_order:E.HIGH,_parse(e,t,r){let o=e[2],s=n?+o.slice(0,-1):void 0,c=e[0].replace(ne,`
|
|
11
|
-
`).match(i);if(!c)return{items:[],ordered:n,start:s};let l=!1;return{items:c.map((e,n)=>{let i=a.exec(e),o=i?i[0].length:0,s=RegExp(`^ {1,${o}}`,`gm`),u=e.replace(s,``).replace(a,``),d=n===c.length-1,f=u.indexOf(`
|
|
12
|
-
|
|
13
|
-
`)!==-1||d&&l;l=f;let p=r.inline,m=r.list;r.list=!0;let h;f?(r.inline=!1,h=`${F(u)}\n\n`):(r.inline=!0,h=F(u));let g=t(h,r);return r.inline=p,r.list=m,g}),ordered:n,start:s}},_render(t,n,r={}){let i=t.ordered?`ol`:`ul`,a={key:r.key};return t.ordered&&t.start!=null&&(a.start=t.start),e(i,a,...t.items.map((t,i)=>e(`li`,{key:i},n(t,r))))}}},f=(e,t)=>{if(t.inline||t.simple||t.inHTML&&e.indexOf(`
|
|
14
|
-
|
|
15
|
-
`)===-1&&!t.prevCaptureHasBlankLine)return null;let n=0;for(;;){let t=e.indexOf(`
|
|
16
|
-
`,n),r=e.slice(n,t===-1?void 0:t+1);if(Pt(s,r)||t===-1||!r.trim())break;n=t+1}let r=e.slice(0,n);if(r===``)return null;let i=F(r);return i===``?null:[r,void 0,i]};return{[T.blockQuote]:{_qualify:[`>`],_match:H(re),_order:E.HIGH,_parse(e,t,n){let r=e[0].replace(ie,``).match(ae),i=r?.[1],a=r?.[2]??``;return{alert:i,children:a.indexOf(`
|
|
17
|
-
`)===-1?W(t,a,n):G(t,a,n)}},_render(t,n,r={}){let i={key:r.key};return t.alert&&(i.className=`markdown-alert-${c(t.alert.toLowerCase())}`,t.children.unshift({attrs:{},children:[{type:T.text,text:t.alert}],noInnerParse:!0,type:T.htmlBlock,tag:`header`})),e(`blockquote`,i,n(t.children,r))}},[T.breakLine]:{_qualify:[` `],_match:U(oe),_order:E.HIGH,_parse:q,_render(t,n,r={}){return e(`br`,{key:r.key})}},[T.breakThematic]:{_qualify:[`--`,`__`,`**`,`- `,`* `,`_ `],_match:H(se),_order:E.HIGH,_parse:q,_render(t,n,r={}){return e(`hr`,{key:r.key})}},[T.codeBlock]:{_qualify:[` `],_match:H(le),_order:E.MAX,_parse(e){return{type:T.codeBlock,lang:void 0,text:L(F(e[0].replace(/^ {4}/gm,``)))}},_render(t,n,r={}){let i={...t.attrs??{}},a=t.lang?`lang-${t.lang}`:`lang-plaintext`;return i.className=i.className?`${i.className} ${a}`:a,e(`pre`,{key:r.key},e(`code`,i,t.text))}},[T.codeFenced]:{_qualify:["```",`~~~`],_match:H(ce),_order:E.MAX,_parse(e){return{attrs:a(`code`,e[3]??``),lang:e[2]||void 0,text:e[4],type:T.codeBlock}}},[T.codeInline]:{_qualify:["`"],_match:V(de),_order:E.LOW,_parse(e){return{text:L(e[2])}},_render(t,n,r={}){return e(`code`,{key:r.key},t.text)}},[T.footnote]:{_qualify:[`[^`],_match:H(pe),_order:E.MAX,_parse(e){return r.push({footnote:e[2],identifier:e[1]}),{}},_render:Nt},[T.footnoteReference]:{_qualify:[`[^`],_match:B(me),_order:E.HIGH,_parse(e){return{target:`#${c(e[1])}`,text:e[1]}},_render(t,n,r={}){return e(`a`,{key:r.key,href:l(t.target,`a`,`href`)??void 0},e(`sup`,{key:r.key},t.text))}},[T.gfmTask]:{_qualify:[`[ ]`,`[x]`],_match:B(ge),_order:E.HIGH,_parse(e){return{completed:e[1].toLowerCase()===`x`}},_render(t,n,r={}){return e(`input`,{checked:t.completed,key:r.key,readOnly:!0,type:`checkbox`})}},[T.heading]:{_qualify:[`#`],_match:H(n.enforceAtxHeadings?ve:_e),_order:E.HIGH,_parse(e,t,n){return{children:W(t,e[2],n),id:c(e[2]),level:e[1].length}},_render(t,n,r={}){return e(`h${t.level}`,{id:t.id,key:r.key},n(t.children,r))}},[T.headingSetext]:{_qualify:e=>{let t=e.indexOf(`
|
|
18
|
-
`);return t>0&&t<e.length-1&&(e[t+1]===`=`||e[t+1]===`-`)},_match:H(ye),_order:E.MAX,_parse(e,t,n){return{children:W(t,e[1],n),level:e[2]===`=`?1:2,type:T.heading}}},[T.htmlBlock]:{_qualify:e=>{if(n.disableParsingRawHTML)return!1;let t=He.exec(e);return t?Gt(t[1]).test(e):!1},_match:U(Ce),_order:E.HIGH,_parse(e,t,n){let r=e[3].match(Je)?.[1]??``,i=Ct(e[3],r),s=o(i)?G:W,c=e[1].trim(),l=ee.indexOf(c.toLowerCase())!==-1,u=l?c.toLowerCase():c,d={attrs:a(u,e[2]??``),noInnerParse:l,tag:u};if(n.inAnchor=n.inAnchor||c.toLowerCase()===`a`,l)d.text=e[3];else{let e=n.inHTML;n.inHTML=!0,d.children=s(t,i,n),n.inHTML=e}return n.inAnchor=!1,d},_render(t,n,r={}){return e(t.tag,{key:r.key,...t.attrs??{}},t.text??(t.children?n(t.children,r):``))}},[T.htmlComment]:{_qualify:[`<!`],_match:U(Te),_order:E.HIGH,_parse:q,_render:Nt},[T.htmlSelfClosing]:{_qualify:e=>!n.disableParsingRawHTML&&Ue.test(e),_match:U(De),_order:E.HIGH,_parse(e){let t=e[1].trim();return{attrs:a(t,e[2]||``),tag:t}},_render(t,n,r={}){return e(t.tag,{key:r.key,...t.attrs??{}})}},[T.customComponent]:{_qualify:e=>We.test(e),_match:U(Oe),_order:E.MAX,_parse(e,t,n){let r=e[3].match(Je)?.[1]??``,i=Ct(e[3],r),s=o(i)?G:W,c=e[1].trim(),l={attrs:a(c,e[2]??``),noInnerParse:!1,tag:c},u=n.inHTML;return n.inHTML=!0,l.children=s(t,i,n),n.inHTML=u,l},_render(t,n,r={}){return e(t.tag,{key:r.key,...t.attrs??{}},t.text??(t.children?n(t.children,r):``))}},[T.paragraph]:{_match:f,_order:E.LOW,_parse:K,_render(t,n,r={}){return e(`p`,{key:r.key},n(t.children,r))}},[T.image]:{_qualify:[`![`],_match:V(Ht),_order:E.HIGH,_parse(e){return{alt:L(e[1]),target:L(e[2]),title:L(e[3])}},_render(t,n,r={}){return e(`img`,{key:r.key,alt:t.alt??void 0,title:t.title??void 0,src:l(t.target,`img`,`src`)??void 0})}},[T.link]:{_qualify:[`[`],_match:B(Ut),_order:E.LOW,_parse(e,t,n){return{children:Mt(t,e[1],n),target:L(e[2]),title:L(e[3])}},_render(t,n,r={}){let i=l(t.target,`a`,`href`);return e(`a`,{key:r.key,href:i??void 0,title:t.title??void 0},n(t.children,r))}},[T.linkAngleBraceStyleDetector]:{_qualify:[`<`],_match:B(je),_order:E.MAX,_parse(e){let t=e[1],n=!1;return t.indexOf(`@`)!==-1&&t.indexOf(`//`)===-1&&(n=!0,t=t.replace(`mailto:`,``)),{children:[{text:t,type:T.text}],target:n?`mailto:${t}`:t,type:T.link}}},[T.linkBareUrlDetector]:{_qualify:(e,t)=>!!(t.inline&&!t.inAnchor&&!n.disableAutoLink&&(I(e,`http://`)||I(e,`https://`))),_match:B(Ae),_order:E.MAX,_parse(e){return{children:[{text:e[1],type:T.text}],target:e[1],type:T.link}}},[T.newlineCoalescer]:{_match:H(fe),_order:E.LOW,_parse:q,_render(){return`
|
|
19
|
-
`}},[T.orderedList]:d(1),[T.unorderedList]:d(2),[T.ref]:{_qualify:[`[`],_match:U(ze),_order:E.MAX,_parse(e){return i[e[1]]={target:e[2],title:e[4]},{}},_render:Nt},[T.refImage]:{_qualify:[`![`],_match:V(Be),_order:E.MAX,_parse(e){return{alt:e[1]?L(e[1]):void 0,ref:e[2]}},_render(t,n,r={}){let a=i[t.ref];return a?e(`img`,{key:r.key,alt:t.alt,src:l(a.target,`img`,`src`)??void 0,title:a.title}):null}},[T.refLink]:{_qualify:e=>e[0]===`[`&&e.indexOf(`](`)===-1,_match:B(Ve),_order:E.MAX,_parse(e,t,n){return{children:Mt(t,e[1],n),fallbackChildren:e[0],ref:e[2]}},_render(t,n,r={}){let a=i[t.ref];return a?e(`a`,{key:r.key,href:l(a.target,`a`,`href`)??void 0,title:a.title},n(t.children,r)):e(`span`,{key:r.key},t.fallbackChildren)}},[T.table]:{_qualify:[`|`],_match:H(Ne),_order:E.HIGH,_parse(e,t,n){n.inline=!0;let r=e[2]?Ot(e[2]):[],i=e[3]?At(e[3],t,n):[],a=kt(e[1],t,n,!!i.length);return n.inline=!1,i.length?{align:r,cells:i,header:a,type:T.table}:{children:a.flat(),type:T.paragraph}},_render(t,n,r={}){let i=t,a=e=>i.align[e]&&i.align[e]!==`left`?{textAlign:i.align[e]}:{};return e(`table`,{key:r.key},e(`thead`,null,e(`tr`,null,...i.header.map((t,i)=>e(`th`,{key:i,style:a(i)},n(t,r))))),e(`tbody`,null,...i.cells.map((t,i)=>e(`tr`,{key:i},...t.map((t,i)=>e(`td`,{key:i,style:a(i)},n(t,r)))))))}},[T.tableSeparator]:{_match:(e,t)=>t.inTable&&e[0]===`|`?/^\|/.exec(e):null,_order:E.HIGH,_parse(){return{type:T.tableSeparator}},_render(){return` | `}},[T.text]:{_match:z((e,t)=>Qe.exec(e)||Ze.exec(e)||/^[\s\S]/.exec(e)),_order:E.MIN,_parse(e){let t=e[0];return{text:t.indexOf(`&`)===-1?t:t.replace(we,(e,t)=>t.startsWith(`#x`)?String.fromCharCode(parseInt(t.slice(2),16)):t.startsWith(`#`)?String.fromCharCode(parseInt(t.slice(1),10)):u[t]||e)}},_render(e){return e.text}},[T.textBolded]:{_qualify:[`**`,`__`],_match:V($e),_order:E.MED,_parse(e,t,n){return{children:t(e[2],n)}},_render(t,n,r={}){return e(`strong`,{key:r.key},n(t.children,r))}},[T.textEmphasized]:{_qualify:[`*`,`_`],_match:V(et),_order:E.LOW,_parse(e,t,n){return{children:t(e[2],n)}},_render(t,n,r={}){return e(`em`,{key:r.key},n(t.children,r))}},[T.textEscaped]:{_qualify:[`\\`],_match:V(Ye),_order:E.HIGH,_parse(e){return{text:e[1],type:T.text}}},[T.textMarked]:{_qualify:[`==`],_match:V(tt),_order:E.LOW,_parse:K,_render(t,n,r={}){return e(`mark`,{key:r.key},n(t.children,r))}},[T.textStrikethroughed]:{_qualify:[`~~`],_match:V(nt),_order:E.LOW,_parse:K,_render(t,n,r={}){return e(`del`,{key:r.key},n(t.children,r))}}}},Xt=()=>null,Zt=(e,t,n,r,i)=>{let a=(e,r)=>{if(!r?.trim())return null;let i=r.match(te);return i?i.reduce((r,i)=>{let a=i.indexOf(`=`);if(a!==-1){let o=wt(i.slice(0,a)).trim(),s=ht(i.slice(a+1).trim()),c=D[o]??o;if(c===`ref`)return r;r[c]=Et(e,o,s,t.sanitizer??xt),typeof r[c]==`string`&&(Ce.test(r[c])||De.test(r[c]))&&(r[c]=en(r[c].trim(),t,n).ast)}else i!==`style`&&(r[D[i]??i]=!0);return r},{}):null},o=[re,ce,le,n.enforceAtxHeadings?ve:_e,ye,Ne,pt,mt,Oe],s=n.disableParsingRawHTML?o:[...o,Re,Ce,Te,De,Oe],c=Yt(e,t,n,r,i,a,e=>{let t=e.replace(qe,``),n=t.length>2048?t.slice(0,2048):t;return n.indexOf(`
|
|
20
|
-
|
|
21
|
-
`)!==-1||Pt(s,n)},o);return n.disableParsingRawHTML?Object.keys(c).reduce((e,t)=>(t!==T.htmlBlock&&t!==T.htmlSelfClosing&&(e[t]=c[t]),e),{}):c},Qt=(e,t,n,r,i)=>{let a=zt(n),o=t.preserveFrontmatter?e:e.replace(he,``),s=o.replace(qe,``),c=t.forceInline||!t.forceBlock&&Ge.test(s)===!1,l=a(c?o:`${F(s)}\n\n`,{inline:c});if(r.length>0)for(let e of r)e.parsedAst=a(e.footnote,{inline:!0});return{ast:l,footnotes:r,references:i,inline:c}},$t=(e,t,n,r,i)=>{let a=t.components??{},o=qt(t),s=e.footnotes||[],c=Bt(Vt(r,n.renderRule)),l=e.inline,u=c(e.ast,{inline:l});for(;typeof u[u.length-1]==`string`&&!u[u.length-1].trim();)u.pop();let d=(()=>{if(n.wrapper===null)return u;let e=n.wrapper??(l?`span`:`div`);if(u.length>1||n.forceWrapper)return i(e,{key:`outer`},u);if(u.length===1){let e=u[0];if(typeof e==`string`){let t={key:`outer`};if(!l&&a){let n=R(a,`p.props`,{})??{},r=gt(t.className,n.className),o={...t,...n};return r&&(o.className=r),i(`span`,o,e)}return i(`span`,t,e)}return e}return i(e,{key:`outer`},null)})();return s.length?i(`div`,null,d,i(`footer`,{key:`footer`},...s.map(e=>i(`div`,{id:o(e.identifier),key:e.identifier},e.identifier,c(e.parsedAst||e.footnote,{inline:!0}))))):d},en=(e=``,t,n={})=>{let r=[],i={};return Qt(e,n,Zt(Xt,t,n,r,i),r,i)},tn=(e,t,n={})=>{let r=Jt(t,n);return $t(e,t,n,Zt(r,t,n,e.footnotes??[],e.references??{}),r)},nn=(e=``,t,n={})=>{if(typeof e!=`string`)throw console.error(`intlayer: the first argument must be a string. Received`,typeof e),Error(`intlayer: the first argument must be a string`);let r=[],i={},a=Jt(t,n),o=Zt(a,t,n,r,i);return $t(Qt(e,n,o,r,i),t,n,o,a)},J=S(),Y=e(t(),1),rn={createElement:Y.createElement,cloneElement:Y.cloneElement,Fragment:Y.Fragment,normalizeProps:(e,t)=>t},an=(e=``,t={})=>{let{createElement:n,disableAutoLink:r,disableParsingRawHTML:i,enforceAtxHeadings:a,forceBlock:o,forceInline:s,forceWrapper:c,namedCodesToUnicode:l,components:u,renderRule:d,sanitizer:f,slugify:p,wrapper:m,preserveFrontmatter:h,tagfilter:g}=t,_={runtime:n?{...rn,createElement:n}:rn,components:u,namedCodesToUnicode:l,sanitizer:f,slugify:p},v={disableAutoLink:r,disableParsingRawHTML:i,enforceAtxHeadings:a,forceBlock:o,forceInline:s,forceWrapper:c,renderRule:d,wrapper:m,preserveFrontmatter:h,tagfilter:g};return typeof e==`string`?nn(e,_,v):tn(e,_,v)},X=x(),on=(e,{components:t,wrapper:n,forceBlock:r,forceInline:i,preserveFrontmatter:a,tagfilter:o}={})=>an(e,{components:t,forceBlock:r,forceInline:i,wrapper:n,forceWrapper:!!n,preserveFrontmatter:a,tagfilter:o}),sn=c(`move-diagonal`,[[`path`,{d:`M11 19H5v-6`,key:`8awifj`}],[`path`,{d:`M13 5h6v6`,key:`7voy1q`}],[`path`,{d:`M19 5 5 19`,key:`wwaj1z`}]]),cn=c(`play`,[[`path`,{d:`M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z`,key:`10ikf1`}]]),ln=e=>{let{enable:t=!0,onSwipeLeft:n,onSwipeRight:r,itemIndex:i,itemCount:a,thresholdPct:o=20,touchAction:s=`pan-y`,disableWhenSelectingText:c=!0}=e,l=(0,Y.useRef)(null),[u,d]=(0,Y.useState)(!1),[f,p]=(0,Y.useState)(0),m=(0,Y.useRef)({pointerId:null,startX:0,startY:0,lastX:0,axisLocked:!1,isHorizontal:!1}),h=(0,Y.useRef)(!1),g=()=>{let e=l.current;return e?e.clientWidth:0},_=e=>{let t=i<=0,n=i>=a-1;return t&&e>0||n&&e<0?e/(1+Math.abs(e)/30):e},v=e=>{t&&m.current.pointerId===null&&(m.current.pointerId=e.pointerId,m.current.startX=e.clientX,m.current.startY=e.clientY,m.current.lastX=e.clientX,m.current.axisLocked=!1,m.current.isHorizontal=!1,h.current=!1,d(!1),p(0))},y=e=>{if(!t||m.current.pointerId!==e.pointerId)return;let n=g();if(!n)return;let r=e.clientX-m.current.startX,i=e.clientY-m.current.startY;if(c){let e=typeof window<`u`?window.getSelection?.():null;if(e&&e.rangeCount>0&&!e.isCollapsed){h.current=!0;return}}if(!m.current.axisLocked){let e=Math.abs(r),t=Math.abs(i);(e>6||t>6)&&(m.current.axisLocked=!0,m.current.isHorizontal=e>t)}if(!m.current.isHorizontal)return;try{e.currentTarget.setPointerCapture(e.pointerId)}catch{}e.preventDefault(),u||d(!0);let a=r/n*100;p(_(a)),m.current.lastX=e.clientX},b=e=>{try{e.currentTarget.releasePointerCapture(e.pointerId)}catch{}let t=m.current.isHorizontal,i=f;if(d(!1),p(0),m.current.pointerId=null,m.current.axisLocked=!1,m.current.isHorizontal=!1,h.current){h.current=!1;return}t&&(i>o?r?.():i<-o&&n?.())};return(0,Y.useEffect)(()=>{p(0),d(!1)},[i]),{containerRef:l,isDragging:u,dragDeltaPct:f,containerProps:{ref:l,onPointerDown:v,onPointerMove:y,onPointerUp:e=>{t&&m.current.pointerId===e.pointerId&&b(e)},onPointerCancel:e=>{t&&m.current.pointerId===e.pointerId&&b(e)},style:{touchAction:s}}}},un=({children:e})=>(0,X.jsx)(`div`,{className:`min-w-0 max-w-full overflow-x-auto`,children:(0,X.jsx)(`pre`,{className:`min-w-0 max-w-full overflow-x-auto [-ms-overflow-style:none] [scrollbar-width:none] [&::-webkit-scrollbar]:hidden`,children:(0,X.jsx)(`code`,{children:typeof e==`string`?e.split(`
|
|
22
|
-
`).map((e,t)=>(0,X.jsx)(`span`,{className:`line block w-full`,children:e},`line-${t}-${e.slice(0,10)}`)):e})})}),dn=`[&_pre.shiki]:!bg-transparent min-w-0 max-w-full overflow-auto bg-transparent [-ms-overflow-style:none] [scrollbar-width:none] [&::-webkit-scrollbar]:hidden [&_pre.shiki]:max-w-full [&_pre.shiki]:overflow-x-auto [&_pre::-webkit-scrollbar]:hidden [&_pre]:[-ms-overflow-style:none] [&_pre]:[scrollbar-width:none]`,fn=({html:e})=>(0,X.jsx)(`div`,{className:dn,children:(0,X.jsx)(`div`,{dangerouslySetInnerHTML:{__html:e}})}),pn=(0,Y.lazy)(()=>w(()=>import(`./CodeBlockShiki-Bjm0Ego0.js`).then(e=>({default:e.CodeBlockShiki})),__vite__mapDeps([0,1,2,3,4,5]))),mn=({className:e,onChange:t,isEditable:n,children:r,lang:i,highlightedHtml:a,...o})=>(0,X.jsx)(`div`,{className:C(`flex w-full min-w-0 max-w-full overflow-x-auto`,e),...o,children:a?(0,X.jsx)(fn,{html:a}):(0,X.jsx)(Y.Suspense,{fallback:(0,X.jsx)(un,{children:r}),children:(0,X.jsx)(pn,{lang:i,children:r})})}),Z={astro:()=>w(()=>import(`./astro-JHDYjn39.js`),__vite__mapDeps([6,7,8,9,10,11,12])),bash:()=>w(()=>import(`./bash-CLZ0U2zV.js`),[]),css:()=>w(()=>import(`./css-CdtkT07m.js`),__vite__mapDeps([13,10])),html:()=>w(()=>import(`./html-DYtkB_T1.js`),__vite__mapDeps([14,15,8,10])),javascript:()=>w(()=>import(`./javascript-Yelw-5ZN.js`),__vite__mapDeps([16,8])),json:()=>w(()=>import(`./json-CaljABEy.js`),__vite__mapDeps([17,7])),json5:()=>w(()=>import(`./json5-BR5RXkoi.js`),[]),jsonc:()=>w(()=>import(`./jsonc-CYpm1nAK.js`),[]),markdown:()=>w(()=>import(`./markdown-BYOwaDjH.js`),[]),svelte:()=>w(()=>import(`./svelte-tEuLYt3E.js`),__vite__mapDeps([18,8,9,10,11])),tsx:()=>w(()=>import(`./tsx-5f3ulCja.js`),__vite__mapDeps([19,12])),typescript:()=>w(()=>import(`./typescript-Utq2Cl8c.js`),__vite__mapDeps([20,9])),vue:()=>w(()=>import(`./vue-Bg0byEaI.js`),__vite__mapDeps([21,7,8,9,10,15])),xml:()=>w(()=>import(`./xml-DMbpbO54.js`),[]),yaml:()=>w(()=>import(`./yaml-rwi0_p6S.js`),[])};Object.keys(Z);var hn={cjs:`javascript`,console:`bash`,cts:`typescript`,dockerfile:`docker`,gql:`graphql`,htm:`html`,js:`javascript`,jsonc:`json5`,jsx:`tsx`,md:`markdown`,mdx:`markdown`,mjs:`javascript`,mts:`typescript`,postcss:`css`,sh:`bash`,shell:`bash`,shellscript:`bash`,ts:`typescript`,yml:`yaml`,zsh:`bash`},gn=`plaintext`,_n=e=>{let t=(e??``).trim().toLowerCase(),n=hn[t]??t,r=Z[n];return r?{id:n,loadGrammar:r}:{id:gn,loadGrammar:null}},vn={light:`github-light`,dark:`github-dark`};function yn(e){if(!e)return{href:``,label:``};if(/^https?:\/\//i.test(e))try{let t=new URL(e);return{href:t.href,label:t.host}}catch{return{href:e,label:e}}return{href:e,label:e}}var bn=e=>{if(!e||!/^https?:\/\//i.test(e))return null;try{let t=new URL(e);return/(^|\.)youtube(-nocookie)?\.com$/.test(t.hostname)&&t.pathname.replace(/^\/embed\//,``).split(`/`)[0]||null}catch{return null}},xn=()=>{let e=(0,J.c)(5),t=(0,Y.useRef)(null),[n,r]=(0,Y.useState)(!1),i,a;e[0]===n?(i=e[1],a=e[2]):(i=()=>{let e=t.current;if(!e||n)return;if(typeof IntersectionObserver>`u`){r(!0);return}let i=new IntersectionObserver(e=>{e.some(wn)&&(r(!0),i.disconnect())},{rootMargin:`200px`});return i.observe(e),()=>i.disconnect()},a=[n],e[0]=n,e[1]=i,e[2]=a),(0,Y.useEffect)(i,a);let o;return e[3]===n?o=e[4]:(o={elementRef:t,hasBecomeVisible:n},e[3]=n,e[4]=o),o},Sn=e=>{let t=(0,J.c)(17),{src:n,title:r,className:i,frameProps:a}=e,[o,s]=(0,Y.useState)(!1),{elementRef:c,hasBecomeVisible:l}=xn(),u;t[0]===n?u=t[1]:(u=bn(n),t[0]=n,t[1]=u);let d=u;if(d&&!o){let e=r??`Play video`,n;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(n=()=>s(!0),t[2]=n):n=t[2];let a;return t[3]!==i||t[4]!==e||t[5]!==d?(a=(0,X.jsxs)(`button`,{type:`button`,"aria-label":e,onClick:n,className:C(`group relative block cursor-pointer border-0 bg-card p-0`,i),children:[(0,X.jsxs)(`picture`,{children:[(0,X.jsx)(`source`,{srcSet:`https://i.ytimg.com/vi_webp/${d}/hqdefault.webp`,type:`image/webp`}),(0,X.jsx)(`img`,{src:`https://i.ytimg.com/vi/${d}/hqdefault.jpg`,alt:``,width:480,height:360,fetchPriority:`high`,decoding:`async`,className:`size-full object-cover`})]}),(0,X.jsx)(`span`,{className:`absolute inset-0 flex items-center justify-center`,children:(0,X.jsx)(`span`,{className:`flex size-14 items-center justify-center rounded-full bg-text/70 text-text-opposite transition-transform group-hover:scale-110`,children:(0,X.jsx)(cn,{className:`size-6 translate-x-0.5 fill-current`})})})]}),t[3]=i,t[4]=e,t[5]=d,t[6]=a):a=t[6],a}if(!l&&!o){let e;return t[7]!==i||t[8]!==c?(e=(0,X.jsx)(`div`,{ref:c,"aria-hidden":!0,className:i}),t[7]=i,t[8]=c,t[9]=e):e=t[9],e}let f;if(t[10]!==i||t[11]!==a||t[12]!==o||t[13]!==n||t[14]!==r||t[15]!==d){let e;bb0:{if(!o||!d||!n){e=n;break bb0}let t=new URL(n);t.searchParams.set(`autoplay`,`1`),e=t.href}let s=e;f=(0,X.jsx)(`iframe`,{...a,src:s,title:r,loading:`lazy`,className:i}),t[10]=i,t[11]=a,t[12]=o,t[13]=n,t[14]=r,t[15]=d,t[16]=f}else f=t[16];return f},Cn=e=>{let t=(0,J.c)(2),{src:n,className:r,title:a,...o}=e,[s,c]=(0,Y.useState)(!1),{href:d,label:f}=yn(n),p;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(p=()=>c(!0),t[0]=p):p=t[0];let m;return t[1]===Symbol.for(`react.memo_cache_sentinel`)?(m=()=>c(!1),t[1]=m):m=t[1],(0,X.jsxs)(u,{roundedSize:`2xl`,border:!0,borderColor:`neutral`,className:`overflow-hidden p-0`,gap:`none`,children:[(0,X.jsx)(Sn,{src:n,title:a,frameProps:o,className:C(`block max-h-[80vh] min-h-[12rem] w-full border-0`,r)}),(0,X.jsxs)(`div`,{className:`flex items-center justify-between gap-3 px-3 py-1`,children:[d?(0,X.jsx)(h,{href:d,target:`_blank`,rel:`noopener noreferrer`,label:``,color:`neutral`,className:`inline-flex min-w-0 max-w-[calc(100%-3rem)] items-center gap-2 text-muted-foreground text-xs underline-offset-2 hover:text-foreground hover:underline`,children:f}):(0,X.jsx)(`span`,{className:`text-neutral text-sm`,children:`Embedded frame`}),(0,X.jsx)(i,{variant:`hoverable`,size:`icon-md`,onClick:p,label:`Open embedded page in fullscreen`,Icon:sn})]}),(0,X.jsx)(l,{isOpen:s,onClose:m,size:`unset`,hasCloseButton:!0,isScrollable:!0,padding:`sm`,children:s&&n?(0,X.jsx)(u,{roundedSize:`2xl`,border:!0,borderColor:`neutral`,className:`overflow-hidden p-0`,gap:`none`,children:(0,X.jsx)(`iframe`,{...o,src:n,title:a??`Embedded content`,allowFullScreen:!0,className:`block min-h-[82vh] w-full border-0`})}):null})]})};function wn(e){return e.isIntersecting}var Tn=(0,Y.createContext)({packageManager:`npm`,setPackageManager:()=>{},codeFormat:`typescript`,setCodeFormat:()=>{},contentDeclarationFormat:`typescript`,setContentDeclarationFormat:()=>{}}),Q=()=>(0,Y.useContext)(Tn),En=e=>{let t=(0,J.c)(8),{children:r}=e,[i,a]=n(`packageManager`,`npm`),[o,s]=n(`codeFormat`,`typescript`),[c,l]=n(`contentDeclarationFormat`,`typescript`),u;return t[0]!==r||t[1]!==o||t[2]!==c||t[3]!==i||t[4]!==s||t[5]!==l||t[6]!==a?(u=(0,X.jsx)(Tn,{value:{packageManager:i,setPackageManager:a,codeFormat:o,setCodeFormat:s,contentDeclarationFormat:c,setContentDeclarationFormat:l},children:r}),t[0]=r,t[1]=o,t[2]=c,t[3]=i,t[4]=s,t[5]=l,t[6]=a,t[7]=u):u=t[7],u},Dn=700,On=({isRollable:e=!0,minHeight:t=Dn,children:n,className:i})=>{let[o,s]=(0,Y.useState)(0),[c,l]=(0,Y.useState)(!0),u=(0,Y.useRef)(null),{expandCollapseContent:d}=a(`expand-collapse`),f=o>t,p=(0,Y.useCallback)(e=>{if(u.current?.disconnect(),u.current=null,!e)return;if(typeof ResizeObserver>`u`){s(e.clientHeight);return}let t=new ResizeObserver(([e])=>{e&&s(e.contentRect.height)});t.observe(e),u.current=t},[]);return(0,Y.useEffect)(()=>()=>u.current?.disconnect(),[]),e?f?(0,X.jsxs)(r,{isHidden:c,minHeight:t,className:`w-full overflow-x-auto overflow-y-hidden`,children:[(0,X.jsx)(`div`,{className:C(`grid w-full`,i),ref:p,children:n}),(0,X.jsx)(`button`,{className:C(`absolute right-0 bottom-0 flex w-full cursor-pointer items-center justify-center rounded-t-2xl bg-linear-to-t from-card/80 to-transparent px-3 py-0.5 text-md text-neutral-700 shadow-[0_0_10px_-15px_rgba(0,0,0,0.3)] backdrop-blur transition-all duration-300 hover:py-1 dark:text-neutral-400`,c?`w-full`:`w-32`),type:`button`,onClick:()=>l(e=>!e),children:d(c)})]}):(0,X.jsx)(`div`,{className:C(`grid w-full`,i),ref:p,children:n}):n},kn=({children:e,originalLang:t,targetFormat:n,initialHtml:r})=>{let[i,a]=(0,Y.useState)(r??null),o=(0,Y.useRef)(r??null);(0,Y.useEffect)(()=>{if(r&&n===`typescript`){o.current=r,a(r);return}let i=!1;return(async()=>{try{let r=e,s=_n(t).id;if(n!==`typescript`){let{transformCode:a,deriveLanguage:o}=await w(async()=>{let{transformCode:e,deriveLanguage:t}=await import(`./codeTransformer-DVPQQcdP.js`);return{transformCode:e,deriveLanguage:t}},[]);if(i)return;r=a(String(e),n),s=_n(o(t,n)).id}let{codeToHtml:c}=await w(async()=>{let{codeToHtml:e}=await import(`./shikiBundle-C2Pc5KKu.js`).then(e=>e.i);return{codeToHtml:e}},__vite__mapDeps([22,1,3,4,2,5]));if(i)return;let l=await c(String(r),{lang:s,themes:vn,defaultColor:!1});i||(o.current=l,a(l))}catch{i||a(``)}})(),()=>{i=!0}},[e,t,n,r]);let s=i??o.current;return s?(0,X.jsx)(`div`,{dangerouslySetInnerHTML:{__html:s},style:{backgroundColor:`transparent`}}):(0,X.jsx)(`pre`,{className:`min-w-0 max-w-full overflow-x-auto`,children:(0,X.jsx)(`code`,{children:e})})},An=e=>{if(e!=null){if(Array.isArray(e))return e;if(typeof e==`string`&&e.startsWith(`[`))try{let t=JSON.parse(e);if(Array.isArray(t))return t}catch{}return[e]}},jn=e=>{let t=(0,J.c)(1),{children:n,...r}=e,{packageManager:i,codeFormat:a,contentDeclarationFormat:o}=Q(),s=r.packageManager===void 0,c=i===r.packageManager,l=An(r.codeFormat),u=l===void 0,d=l?l.includes(a):!1,f=An(r.contentDeclarationFormat),p=f===void 0,m=f?f.includes(o):!1;if((s||c)&&(u||d)&&(p||m))return n;let h;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(h=(0,X.jsx)(X.Fragment,{}),t[0]=h):h=t[0],h},Mn=e=>{let t=(0,J.c)(11),{availableFormats:n}=e,{codeFormat:r,setCodeFormat:i,setContentDeclarationFormat:o}=Q(),s=a(`code-selectors`),c;t[0]===n?c=t[1]:(c=e=>!n||n.includes(e),t[0]=n,t[1]=c);let l=c,u;t[2]!==i||t[3]!==o?(u=e=>{i(e),o(e)},t[2]=i,t[3]=o,t[4]=u):u=t[4];let d;return t[5]!==r||t[6]!==s.codeFormat.label.value||t[7]!==s.codeFormat.placeholder.value||t[8]!==l||t[9]!==u?(d=(0,X.jsxs)(f,{value:r,onValueChange:u,children:[(0,X.jsx)(f.Trigger,{className:`py-1!`,"aria-label":s.codeFormat.label.value,children:(0,X.jsx)(f.Value,{placeholder:s.codeFormat.placeholder.value})}),(0,X.jsxs)(f.Content,{children:[l(`typescript`)&&(0,X.jsx)(f.Item,{value:`typescript`,children:`TypeScript`}),l(`esm`)&&(0,X.jsx)(f.Item,{value:`esm`,children:`ESM`}),l(`commonjs`)&&(0,X.jsx)(f.Item,{value:`commonjs`,children:`CommonJS`})]})]}),t[5]=r,t[6]=s.codeFormat.label.value,t[7]=s.codeFormat.placeholder.value,t[8]=l,t[9]=u,t[10]=d):d=t[10],d},Nn=()=>{let e=(0,J.c)(5),{contentDeclarationFormat:t,setContentDeclarationFormat:n}=Q(),r=a(`code-selectors`),i;return e[0]!==r.contentDeclarationFormat.label.value||e[1]!==r.contentDeclarationFormat.placeholder.value||e[2]!==t||e[3]!==n?(i=(0,X.jsxs)(f,{value:t,onValueChange:n,children:[(0,X.jsx)(f.Trigger,{className:`py-1!`,"aria-label":r.contentDeclarationFormat.label.value,children:(0,X.jsx)(f.Value,{placeholder:r.contentDeclarationFormat.placeholder.value})}),(0,X.jsxs)(f.Content,{children:[(0,X.jsx)(f.Item,{value:`typescript`,children:`TypeScript`}),(0,X.jsx)(f.Item,{value:`commonjs`,children:`CommonJS`}),(0,X.jsx)(f.Item,{value:`esm`,children:`ESM`}),(0,X.jsx)(f.Item,{value:`json`,children:`JSON`})]})]}),e[0]=r.contentDeclarationFormat.label.value,e[1]=r.contentDeclarationFormat.placeholder.value,e[2]=t,e[3]=n,e[4]=i):i=e[4],i},Pn=e=>{let{code:t,...n}=e,{title:r,description:i}=a(`code`);return(0,X.jsxs)(v,{identifier:`copy`,children:[(0,X.jsx)(p,{content:t,...n}),(0,X.jsxs)(v.Detail,{identifier:`copy`,className:`flex min-w-64 flex-col gap-3 p-3 text-sm`,xAlign:`end`,children:[(0,X.jsx)(`strong`,{children:r}),(0,X.jsx)(`p`,{className:`text-neutral`,children:i})]})]})},Fn=()=>{let e=(0,J.c)(5),{packageManager:t,setPackageManager:n}=Q(),r=a(`code-selectors`);a(`code-selectors`);let i;return e[0]!==r.packageManager.label.value||e[1]!==r.packageManager.placeholder.value||e[2]!==t||e[3]!==n?(i=(0,X.jsxs)(f,{value:t,onValueChange:n,children:[(0,X.jsx)(f.Trigger,{className:`py-1!`,"aria-label":r.packageManager.label.value,children:(0,X.jsx)(f.Value,{placeholder:r.packageManager.placeholder.value})}),(0,X.jsxs)(f.Content,{children:[(0,X.jsx)(f.Item,{value:`npm`,children:`npm`}),(0,X.jsx)(f.Item,{value:`pnpm`,children:`pnpm`}),(0,X.jsx)(f.Item,{value:`yarn`,children:`yarn`}),(0,X.jsx)(f.Item,{value:`bun`,children:`bun`})]})]}),e[0]=r.packageManager.label.value,e[1]=r.packageManager.placeholder.value,e[2]=t,e[3]=n,e[4]=i):i=e[4],i},In=700,Ln=new Set([`tsx`,`jsx`]),Rn=e=>{if(e){if(Array.isArray(e))return e;if(typeof e==`string`&&e.startsWith(`[`))try{let t=JSON.parse(e);if(Array.isArray(t))return t}catch{}return[e]}},zn=({children:e,language:t,highlightedHtml:n,showHeader:r=!0,showLineNumbers:i=!0,className:a,fileName:o,packageManager:s,codeFormat:c,contentDeclarationFormat:l,isRollable:d=!0,lang:f,...p})=>{let{codeFormat:m,contentDeclarationFormat:h}=Q(),g=(0,Y.useMemo)(()=>Rn(c),[c]),_=(0,Y.useMemo)(()=>Rn(l),[l]),v=g!==void 0&&g.length>1&&g.includes(`typescript`),y=_!==void 0&&_.length>1&&_.includes(`typescript`),b=v||y,x=y?h:m,S=(0,Y.useMemo)(()=>{let e=y?_:g;if(!e)return e;let n=e.filter(e=>e!==`json`);return Ln.has(t)&&(n=n.filter(e=>e!==`commonjs`)),n},[y,_,g,t]),T=(0,Y.useMemo)(()=>!S||S.includes(x)?x:S[S.length-1]??`typescript`,[S,x]),[E,D]=(0,Y.useState)(o);(0,Y.useEffect)(()=>{if(!b||T===`typescript`){D(o);return}if(!o)return;let e=!1;return(async()=>{let{deriveFileName:t}=await w(async()=>{let{deriveFileName:e}=await import(`./codeTransformer-DVPQQcdP.js`);return{deriveFileName:e}},[]);e||D(t(o,T))})(),()=>{e=!0}},[o,b,T]);let O=(0,Y.useMemo)(()=>{let t=Array.isArray(e)?e.join(``):String(e);return t.endsWith(`
|
|
23
|
-
`)?t.slice(0,-1):t},[e]),[ee,k]=(0,Y.useState)(O);(0,Y.useEffect)(()=>{if(!b||T===`typescript`){k(O);return}let e=!1;return(async()=>{let{transformCode:t}=await w(async()=>{let{transformCode:e}=await import(`./codeTransformer-DVPQQcdP.js`);return{transformCode:e}},[]);e||k(t(O,T))})(),()=>{e=!0}},[O,b,T]);let te=s||c||l;return(0,X.jsx)(jn,{packageManager:s,codeFormat:c,contentDeclarationFormat:l,children:(0,X.jsxs)(u,{className:C(`relative min-w-0 max-w-full text-sm leading-6`,i&&`with-line-number ml-0`,a),transparency:`lg`,...p,children:[r&&(0,X.jsxs)(X.Fragment,{children:[(0,X.jsxs)(`div`,{className:`grid w-full grid-cols-[1fr_auto] items-center justify-between rounded-t-xl border-b bg-card/50 py-1.5 pr-12 pl-4 text-muted-foreground text-xs`,children:[(0,X.jsx)(`span`,{className:`truncate`,children:E??t}),(0,X.jsxs)(`div`,{className:`flex items-center gap-2`,children:[s&&(0,X.jsx)(Fn,{}),c&&(0,X.jsx)(Mn,{availableFormats:S}),l&&(0,X.jsx)(Nn,{})]})]}),(0,X.jsx)(`div`,{className:`sticky top-46 z-20`,children:(0,X.jsx)(`div`,{className:C(`absolute right-2 bottom-0 flex h-7 items-center`,te&&`h-11`),children:(0,X.jsx)(Pn,{code:ee})})})]}),(0,X.jsx)(On,{minHeight:In,isRollable:d,className:`min-w-0 max-w-full overflow-x-auto p-2`,children:b?(0,X.jsx)(kn,{originalLang:t,targetFormat:T,initialHtml:n,children:O}):(0,X.jsx)(mn,{lang:t,highlightedHtml:n,children:O})})]})})},Bn=(0,Y.createContext)({tabsValues:{},setTabsValues:()=>{}}),Vn=()=>(0,Y.useContext)(Bn),Hn=e=>{let t=(0,J.c)(4),{children:n}=e,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r={},t[0]=r):r=t[0];let[i,a]=(0,Y.useState)(r),o;return t[1]!==n||t[2]!==i?(o=(0,X.jsx)(Bn,{value:{tabsValues:i,setTabsValues:a},children:n}),t[1]=n,t[2]=i,t[3]=o):o=t[3],o},Un=e=>e.trim().replace(/\s+/g,`-`).replace(/[^\w-]/g,``),Wn=e=>{let t=new Map;return e.map((e,n)=>{let r=Un(e)||String(n),i=t.get(r)??0;return t.set(r,i+1),i===0?r:`${r}-${i+1}`})},Gn=(0,Y.createContext)(void 0),Kn=y(`relative w-full rounded-lg`,{variants:{background:{with:`border bg-background/2 shadow-[0_0_10px_-15px_rgba(0,0,0,0.3)] backdrop-blur`,without:``},variant:{default:``,bordered:`border-2`,ghost:`border-0 bg-transparent shadow-none`}},defaultVariants:{variant:`default`}}),qn=({value:e,label:t},n)=>{let r=e??t;return typeof r==`string`?r:String(n)},$=({children:e,...t})=>(0,X.jsx)(`div`,{...t,children:e});$.displayName=`TabItem`;var Jn=Object.assign(e=>{let t=(0,J.c)(2),{defaultTab:n,group:r,variant:i,children:a,className:o,headerClassName:s,fullHeight:c,...l}=e,u=Y.Children.toArray(a).filter(Yn).map(Xn),d=u[0]?.value,{tabsValues:f,setTabsValues:p}=Vn(),[m,h]=(0,Y.useState)(n??d??``),_=(r&&typeof f==`object`?f?.[r]:m)??n??d,v;t[0]===_?v=t[1]:(v=e=>e.value===_,t[0]=_,t[1]=v);let y=u.findIndex(v),b=u.length,x=Wn(u.map(Zn)),{containerProps:S,dragDeltaPct:w,isDragging:T}=ln({itemIndex:y,itemCount:b,onSwipeLeft:()=>{let e=Math.min(b-1,y+1),t=u[e]?.value;t&&E(t)},onSwipeRight:()=>{let e=Math.max(0,y-1),t=u[e]?.value;t&&E(t)}}),E=e=>{h(e),typeof p==`function`&&p(t=>({...t,[r]:e}))},D={activeTab:m??d??``,setActiveTab:E};return(0,X.jsx)(Gn.Provider,{value:D,children:(0,X.jsxs)(`div`,{className:C(Kn({variant:i}),c&&`flex h-full flex-col overflow-hidden`,o),...l,children:[(0,X.jsx)(`div`,{className:C(`flex shrink-0 gap-3 p-3`,s),children:(0,X.jsx)(g,{selectedChoice:_,tabs:u.map((e,t)=>{let{label:n,value:r,disabled:i}=e,a=_===r,o=x[t];return(0,X.jsx)(`button`,{className:C(`cursor-pointer whitespace-nowrap rounded-md px-4 py-1 font-medium text-sm transition-colors focus:outline-none`,!a&&`text-neutral/70`),"data-active":a,disabled:i,onClick:()=>!i&&E(r),role:`tab`,"aria-selected":a,"aria-controls":`tabpanel-${o}`,id:`tab-${o}`,type:`button`,children:n??r},r)}),hoverable:!0,color:`text`})}),(0,X.jsx)(`div`,{className:C(`relative w-full min-w-0 overflow-x-clip [-webkit-clip-path:inset(0)] [clip-path:inset(0)]`,c&&`min-h-0 flex-1`),...S,children:(0,X.jsx)(`div`,{className:C(`grid w-full min-w-0`,c&&`h-full`,T?`transition-none`:`transition-transform duration-300 ease-in-out`),style:{gridTemplateColumns:`repeat(${u.length}, 100%)`,transform:`translateX(-${y*100-(T?w:0)}%)`},children:u.map((e,t)=>{let{value:n,children:r,className:i}=e,a=t===y,o=x[t];return(0,X.jsx)(`div`,{role:`tabpanel`,"aria-labelledby":`tab-${o}`,id:`tabpanel-${o}`,inert:!a,tabIndex:a?0:-1,"data-active":a,className:C(`w-full min-w-0 p-3 opacity-100 transition-opacity duration-300 ease-in-out`,c&&`h-full overflow-y-auto`,!a&&`pointer-events-none opacity-0`,i),children:(0,X.jsx)(`div`,{className:C(`flex w-full min-w-0 flex-col items-stretch gap-6`,c&&`min-h-full`),children:r})},n)})})})]})})},{Item:$});function Yn(e){return(0,Y.isValidElement)(e)&&e.type===$}function Xn(e,t){return{...e.props,value:qn(e.props,t)}}function Zn(e){let{value:t}=e;return t}var Qn=e=>{let t=(0,J.c)(6),{setIsModalOpen:n}=e,{modal:r}=a(`table`),o;if(t[0]!==r.description||t[1]!==r.title||t[2]!==n){let e;t[4]===n?e=t[5]:(e=()=>{n(!0)},t[4]=n,t[5]=e),o=(0,X.jsx)(`div`,{className:`pointer-events-none absolute inset-y-0 right-4 z-10`,children:(0,X.jsx)(`div`,{className:`pointer-events-auto sticky top-48 pt-4`,children:(0,X.jsxs)(v,{identifier:`expand`,children:[(0,X.jsx)(i,{variant:`hoverable`,size:`icon-md`,onClick:e,label:r.title,Icon:sn}),(0,X.jsxs)(v.Detail,{identifier:`expand`,className:`flex min-w-64 flex-col gap-3 p-3 text-sm`,xAlign:`end`,children:[(0,X.jsx)(`strong`,{children:r.title}),(0,X.jsx)(`p`,{className:`text-neutral`,children:r.description})]})]})})}),t[0]=r.description,t[1]=r.title,t[2]=n,t[3]=o}else o=t[3];return o},$n=(0,Y.forwardRef)(({className:e,isInteractive:t,...n},r)=>(0,X.jsx)(`table`,{ref:r,className:C(`w-full table-auto border-separate border-spacing-0 overflow-hidden rounded-2xl text-left text-sm`,`[&_thead_tr:first-child_th:first-child]:rounded-tl-2xl`,`[&_thead_tr:first-child_th:last-child]:rounded-tr-2xl`,`[&_tbody_tr:last-child_td:first-child]:rounded-bl-2xl`,`[&_tbody_tr:last-child_td:last-child]:rounded-br-2xl`,`supports-[corner-shape:squircle]:rounded-3xl`,`supports-[corner-shape:squircle]:[&_thead_tr:first-child_th:first-child]:rounded-tl-3xl`,`supports-[corner-shape:squircle]:[&_thead_tr:first-child_th:last-child]:rounded-tr-3xl`,`supports-[corner-shape:squircle]:[&_tbody_tr:last-child_td:first-child]:rounded-bl-3xl`,`supports-[corner-shape:squircle]:[&_tbody_tr:last-child_td:last-child]:rounded-br-3xl`,t&&`[&_tbody_tr:hover]:bg-neutral/40 [&_tbody_tr:hover]:dark:bg-neutral-dark/40 [&_tbody_tr]:cursor-pointer [&_tbody_tr]:transition-colors`,e),...n})),er=.55,tr=5,nr=30,rr=(e,t,n)=>{let r=(0,J.c)(3),i;r[0]!==t||r[1]!==e?(i=()=>{if(!e.current)return;let n=[];Array.from(e.current.querySelectorAll(`tr`)).forEach(e=>{Array.from(e.children).forEach((e,t)=>{let r=e.textContent?.trim().length??0;(n[t]===void 0||r>n[t])&&(n[t]=r)})});let r=e=>{let t=Array.from(e.querySelectorAll(`tr`));if(t.length===0)return;let r=(e,t)=>{let r=Math.min(nr,Math.max(tr,(n[t]??0)*er));e.style.minWidth=`${r}rem`,e.style.maxWidth=`${nr}rem`};e.querySelectorAll(`th`).forEach((e,t)=>{r(e,t)}),t.forEach(e=>{e.querySelectorAll(`td`).forEach((e,t)=>{r(e,t)})})};r(e.current),t.current&&r(t.current)},r[0]=t,r[1]=e,r[2]=i):i=r[2],(0,Y.useEffect)(i,n)},ir=({className:e,isRollable:t=!1,displayModal:n,isInteractive:r,onClick:i,...a})=>{let[o,s]=(0,Y.useState)(!1),[c,u]=(0,Y.useState)(null),d=(0,Y.useRef)(null),f=(0,Y.useRef)(null);rr(d,f,[a.children,o]),(0,Y.useEffect)(()=>{if(o&&c!==null&&f.current){let e=f.current.rows[c];e&&(e.scrollIntoView({behavior:`smooth`,block:`center`}),e.classList.add(`bg-card`),e.style.transition=`background-color 0.3s ease-in-out`)}},[o,c]),(0,Y.useEffect)(()=>{o||u(null)},[o]);let p=e=>{if(n){let t=e.target.closest(`tr`);t?.closest(`tbody`)&&(u(t.rowIndex),s(!0))}i?.(e)};return(0,X.jsxs)(`div`,{className:`group relative`,children:[n&&(0,X.jsx)(Qn,{setIsModalOpen:s}),(0,X.jsx)(On,{isRollable:t,className:`max-w-full overflow-x-auto bg-background text-left`,children:(0,X.jsx)($n,{ref:d,className:e,isInteractive:r??n,onClick:p,onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&p(e)},...a})}),(0,X.jsx)(l,{isOpen:o,onClose:()=>s(!1),size:`xl`,hasCloseButton:!0,isScrollable:!0,children:o?(0,X.jsx)(`div`,{className:`grid`,children:(0,X.jsx)($n,{ref:f,className:C(`min-w-full max-w-full text-left`,e),isInteractive:r,...a})}):(0,X.jsx)(X.Fragment,{})})]})},ar=({className:e,...t})=>(0,X.jsx)(`th`,{className:C(`border border-b border-solid bg-neutral/10 p-4`,e),...t}),or=({className:e,...t})=>(0,X.jsx)(`tr`,{className:C(`hover:bg-neutral/10`,e),...t}),sr=({className:e,...t})=>(0,X.jsx)(`td`,{className:C(`border border-b border-solid p-4`,e),...t}),cr=({className:e,...t})=>(0,X.jsx)(`hr`,{className:C(`mx-6 mt-16 border-dashed text-neutral`,e),...t}),lr=e=>(0,X.jsx)(o,{isClickable:!0,className:`mb-16 mb-8 text-foreground`,...e}),ur=e=>(0,X.jsx)(m,{isClickable:!0,className:`mt-16 text-foreground`,...e}),dr=e=>(0,X.jsx)(_,{isClickable:!0,className:`mt-5 text-foreground`,...e}),fr=e=>(0,X.jsx)(s,{isClickable:!0,className:`mt-3 text-foreground`,...e}),pr=e=>(0,X.jsx)(d,{isClickable:!0,className:`mt-3 text-foreground`,...e}),mr=e=>(0,X.jsx)(b,{isClickable:!0,className:`mt-3 text-foreground`,...e}),hr=e=>(0,X.jsx)(`strong`,{className:`text-foreground`,...e}),gr=(0,Y.memo)(({className:e,children:t,highlightedHtml:n,lang:r,...i})=>{let a=String(t??``).replace(/\n$/,``);if(!e){let e=a.replace(/&(?:amp;)?#(\d+);/g,(e,t)=>String.fromCharCode(parseInt(t,10)));return(0,X.jsx)(`code`,{className:`rounded-md border border-neutral/30 bg-card/60 box-decoration-clone px-1.5 py-0.5 font-mono text-[0.875em] leading-[inherit]`,children:e})}let o=e?.replace(/lang(?:uage)?-/,``)||`plaintext`;return(0,X.jsx)(zn,{...i,language:o,showHeader:!0,highlightedHtml:n,className:`border`,children:a})},(e,t)=>e.children===t.children&&e.className===t.className&&e.highlightedHtml===t.highlightedHtml),_r=e=>(0,X.jsx)(gr,{...e}),vr=({className:e,...t})=>(0,X.jsx)(`blockquote`,{className:C(`mt-5 gap-3 border-card border-l-4 pl-5 text-muted-foreground [&_strong]:text-neutral`,e),...t}),yr=({className:e,...t})=>(0,X.jsx)(`ul`,{className:C(`mt-5 flex list-disc flex-col gap-3 pl-5 marker:text-neutral/80`,e),...t}),br=({className:e,...t})=>(0,X.jsx)(`ol`,{className:C(`mt-5 flex list-decimal flex-col gap-3 pl-5 marker:text-neutral/80`,e),...t}),xr=({className:e,alt:t,src:n,...r})=>(0,X.jsx)(`img`,{...r,alt:t??``,loading:`lazy`,className:C(`max-h-[80vh] max-w-full rounded-md`,e),src:n?.includes(`github.com`)?n?.replace(`github.com`,`raw.githubusercontent.com`).replace(`/blob/`,`/`):n}),Sr=e=>t=>(0,X.jsx)(h,{isExternalLink:t.href?.startsWith(`http`),underlined:!0,locale:e,label:``,color:`text`,...t}),Cr={h1:lr,h2:ur,h3:dr,h4:fr,h5:pr,h6:mr,strong:hr,blockquote:vr,ul:yr,ol:br,img:xr,pre:e=>(0,X.jsx)(X.Fragment,{children:e.children}),table:e=>(0,X.jsx)(ir,{isRollable:!0,displayModal:!0,...e}),th:ar,tr:or,td:sr,hr:cr,Tabs:e=>(0,X.jsx)(Jn,{...e,className:`rounded-xl border border-card`,headerClassName:`sticky rounded-xl top-24 z-5 bg-background/70 backdrop-blur overflow-x-auto`}),Tab:Jn.Item,Columns:({className:e,...t})=>(0,X.jsx)(`div`,{className:C(`flex gap-4 max-md:flex-col`,e),...t}),Column:({className:e,...t})=>(0,X.jsx)(`div`,{className:C(`flex-1`,e),...t}),iframe:e=>(0,X.jsx)(Cn,{...e})},wr=e=>({...Cr,code:_r,a:Sr(e)}),Tr=({children:e,locale:t,forceBlock:n,preserveFrontmatter:r,tagfilter:i,components:a,wrapper:o})=>{let s=on(e,{components:{...wr(t),...a},wrapper:o,forceBlock:n,preserveFrontmatter:r,tagfilter:i});return(0,X.jsx)(En,{children:(0,X.jsx)(Hn,{children:s})})};export{Z as a,dn as c,hn as i,Cn as n,_n as o,vn as r,un as s,Tr as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{n as e,t}from"./react-SIfiwpqq.js";var n=e((e=>{var n=t().__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;e.c=function(e){return n.H.useMemoCache(e)}})),r=e(((e,t)=>{t.exports=n()})),i=e((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),a=e(((e,t)=>{t.exports=i()})),o=Array.isArray,s=e=>{if(!e)return``;if(typeof e==`string`)return e;if(typeof e==`number`)return``+e;let t=``;if(o(e)){let n=e.length;for(let r=0;r<n;r++){let n=e[r];if(!n)continue;let i=typeof n==`string`?n:s(n);i&&(t&&(t+=` `),t+=i)}return t}if(typeof e==`object`)for(let n in e)e[n]&&(t&&(t+=` `),t+=n);return t},c=(e,t)=>{let n=e.length,r=t.length,i=Array(n+r);for(let t=0;t<n;t++)i[t]=e[t];for(let e=0;e<r;e++)i[n+e]=t[e];return i},l=(e,t)=>({classGroupId:e,validator:t}),u=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),d=`-`,f=[],p=`arbitrary..`,m=e=>{let t=ee(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{if(e[0]===`[`&&e[e.length-1]===`]`)return g(e);let n=e.split(d);return h(n,+(n[0]===``&&n.length>1),t)},getConflictingClassGroupIds:(e,t)=>{if(t){let t=r[e],i=n[e];return t?i?c(i,t):t:i||f}return n[e]||f}}},h=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;let r=e[t],i=n.nextPart.get(r);if(i){let n=h(e,t+1,i);if(n)return n}let a=n.validators;if(a===null)return;let o=t===0?e.join(d):e.slice(t).join(d),s=a.length;for(let e=0;e<s;e++){let t=a[e];if(t.validator(o))return t.classGroupId}},g=e=>{let t=e.slice(1,-1),n=t.indexOf(`:`);if(n===-1)return;let r=t.slice(0,n);return r?p+r:void 0},ee=e=>{let{theme:t,classGroups:n}=e;return _(n,t)},_=(e,t)=>{let n=u();for(let r in e){let i=e[r];v(i,n,r,t)}return n},v=(e,t,n,r)=>{let i=e.length;for(let a=0;a<i;a++){let i=e[a];te(i,t,n,r)}},te=(e,t,n,r)=>{if(typeof e==`string`){y(e,t,n);return}if(typeof e==`function`){b(e,t,n,r);return}x(e,t,n,r)},y=(e,t,n)=>{let r=e===``?t:S(t,e);r.classGroupId=n},b=(e,t,n,r)=>{if(C(e)){v(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(l(n,e))},x=(e,t,n,r)=>{let i=Object.entries(e),a=i.length;for(let e=0;e<a;e++){let[a,o]=i[e];v(o,S(t,a),n,r)}},S=(e,t)=>{let n=e,r=t.split(d),i=r.length;for(let e=0;e<i;e++){let t=r[e],i=n.nextPart.get(t);i||(i=u(),n.nextPart.set(t,i)),n=i}return n},C=e=>`isThemeGetter`in e&&e.isThemeGetter===!0,ne=58,re=47,w=91,ie=93,T=40,E=41,D=33,O=(e,t,n,r)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:void 0}),k=e=>{let t=[],n=0,r=0,i=0,a,o=e.length;for(let s=0;s<o;s++){let o=e.charCodeAt(s);if(n===0&&r===0){if(o===ne){t.push(e.slice(i,s)),i=s+1;continue}if(o===re){a=s;continue}}o===w?n++:o===ie?n--:o===T?r++:o===E&&r--}let s=t.length===0?e:e.slice(i),c=s,l=!1,u=s.length-1;s.charCodeAt(u)===D?(c=s.slice(0,-1),l=!0):s.charCodeAt(0)===D&&(c=s.slice(1),l=!0);let d=a&&a>i?a-i:void 0;return O(t,l,c,d)},A=e=>{let t=new Set(e.orderSensitiveModifiers);return e=>{let n=[],r=[];for(let i=0;i<e.length;i++){let a=e[i],o=a[0]===`[`,s=t.has(a);if(o||s){if(r.length>0){r.sort();for(let e=0;e<r.length;e++)n.push(r[e]);r=[]}n.push(a)}else r.push(a)}if(r.length>0){r.sort();for(let e=0;e<r.length;e++)n.push(r[e])}return n}},j={isExternal:!0,classId:-1,conflictIds:[]},ae=4096,oe=16384,se=e=>{let t=A(e),n=M(e),{getClassGroupId:r,getConflictingClassGroupIds:i}=m(e),a=Object.create(null),o=Object.create(null),s=0,c=new Int32Array(256),l=0,u=new Uint8Array(64),d=!1,f=e=>{let t=[],n=e.length,r=-1;d=!1;for(let i=0;i<n;i++){let n=e.charCodeAt(i);n===32?r!==-1&&(t.push(e.slice(r,i)),r=-1):n>=9&&n<=13?(d=!0,r!==-1&&(t.push(e.slice(r,i)),r=-1)):r===-1&&(r=i)}return r!==-1&&t.push(e.slice(r)),t},p=new Map,h=0,g=e=>{let t=p.get(e);if(t===void 0&&(t=h++,p.set(e,t),t>=c.length)){let e=new Int32Array(c.length*2);e.set(c),c=e}return t},ee=e=>{let{isExternal:a,modifiers:o,hasImportantModifier:s,baseClassName:c,maybePostfixModifierPosition:l}=k(e);if(a)return j;let u=!!l,d;if(u){d=r(c.substring(0,l));let e=d&&n[d]?r(c):void 0;e&&e!==d&&(d=e,u=!1)}else d=r(c);if(!d){if(!u||(d=r(c),!d))return j;u=!1}let f=o.length===0?``:o.length===1?o[0]:t(o).join(`:`),p=s?f+`!`:f,m=i(d,u),h=[];for(let e=0;e<m.length;e++)h.push(g(p+m[e]));return{isExternal:!1,classId:g(p+d),conflictIds:h}},_=e=>{let t=a[e];return t===void 0?(t=o[e],t===void 0&&(t=ee(e)),a[e]=t,++s>ae&&(s=0,o=a,a=Object.create(null)),t):t};return{parseClassName:k,sortModifiers:t,postfixLookupClassGroupIds:n,getClassGroupId:r,getConflictingClassGroupIds:i,getClassDescriptor:_,mergeClassList:e=>{let t=f(e),n=t.length;if(n===1)return t[0];h>oe&&(p.clear(),h=0,a=Object.create(null),o=Object.create(null),s=0),l=l+1|0,l===0&&(l=1);let r=l;if(n>u.length){let e=u.length;for(;e<n;)e*=2;u=new Uint8Array(e)}let i=!1,m=0;for(let e=n-1;e>=0;--e){let n=t[e];m+=n.length;let a=_(n);if(a.isExternal){u[e]=1;continue}let o=a.classId;if(c[o]===r){u[e]=0,i=!0;continue}c[o]=r;let s=a.conflictIds;for(let e=0;e<s.length;e++)c[s[e]]=r;u[e]=1}if(!i&&!d&&e.length===m+n-1)return e;let g=``;for(let e=0;e<n;e++)u[e]===1&&(g&&(g+=` `),g+=t[e]);return g}}},M=e=>{let t=Object.create(null),n=e.postfixLookupClassGroups;if(n)for(let e=0;e<n.length;e++)t[n[e]]=!0;return t},N=(...e)=>{let t=0,n,r,i=``;for(;t<e.length;)(n=e[t++])&&(r=P(n))&&(i&&(i+=` `),i+=r);return i},P=e=>{if(typeof e==`string`)return e;let t,n=``;for(let r=0;r<e.length;r++)e[r]&&(t=P(e[r]))&&(n&&(n+=` `),n+=t);return n},F=500,ce=e=>{let t,n,r=Object.create(null),i=Object.create(null),a=0,o=r=>(t=se(e()),n=t.mergeClassList,c.mergeString=s,s(r)),s=e=>{let t=r[e];return t===void 0?(t=i[e],t===void 0&&(t=n(e)),r[e]=t,++a>F&&(a=0,i=r,r=Object.create(null)),t):t},c=(...e)=>c.mergeString(N(...e));return c.mergeString=o,c},I=[],L=e=>{let t=t=>t[e]||I;return t.isThemeGetter=!0,t},R=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,z=/^\((?:(\w[\w-]*):)?(.+)\)$/i,B=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,V=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,H=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,le=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,ue=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,de=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,fe=Number,pe=Number.isNaN,me=Number.isInteger,U=e=>B.test(e),W=e=>!!e&&!pe(fe(e)),G=e=>!!e&&me(fe(e)),he=e=>e.endsWith(`%`)&&W(e.slice(0,-1)),K=e=>V.test(e),ge=()=>!0,_e=e=>H.test(e)&&!le.test(e),ve=()=>!1,ye=e=>ue.test(e),be=e=>de.test(e),xe=e=>!q(e)&&!X(e),Se=e=>e.startsWith(`@container`)&&(e[10]===`/`&&e[11]!==void 0||e[11]===`s`&&e[16]!==void 0&&e.startsWith(`-size/`,10)||e[11]===`n`&&e[18]!==void 0&&e.startsWith(`-normal/`,10)),Ce=e=>Q(e,Le,ve),q=e=>R.test(e),J=e=>Q(e,Re,_e),we=e=>Q(e,ze,W),Te=e=>Q(e,Ve,ge),Ee=e=>Q(e,Be,ve),De=e=>Q(e,Fe,ve),Oe=e=>Q(e,Ie,be),Y=e=>Q(e,He,ye),X=e=>z.test(e),Z=e=>$(e,Re),ke=e=>$(e,Be),Ae=e=>$(e,Fe),je=e=>$(e,Le),Me=e=>$(e,Ie),Ne=e=>$(e,He,!0),Pe=e=>$(e,Ve,!0),Q=(e,t,n)=>{let r=R.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},$=(e,t,n=!1)=>{let r=z.exec(e);return r?r[1]?t(r[1]):n:!1},Fe=e=>e===`position`||e===`percentage`,Ie=e=>e===`image`||e===`url`,Le=e=>e===`length`||e===`size`||e===`bg-size`,Re=e=>e===`length`,ze=e=>e===`number`,Be=e=>e===`family-name`,Ve=e=>e===`number`||e===`weight`,He=e=>e===`shadow`,Ue=ce(()=>{let e=L(`color`),t=L(`font`),n=L(`text`),r=L(`font-weight`),i=L(`tracking`),a=L(`leading`),o=L(`breakpoint`),s=L(`container`),c=L(`spacing`),l=L(`radius`),u=L(`shadow`),d=L(`inset-shadow`),f=L(`text-shadow`),p=L(`drop-shadow`),m=L(`blur`),h=L(`perspective`),g=L(`aspect`),ee=L(`ease`),_=L(`animate`),v=()=>[`auto`,`avoid`,`all`,`avoid-page`,`page`,`left`,`right`,`column`],te=()=>[`center`,`top`,`bottom`,`left`,`right`,`top-left`,`left-top`,`top-right`,`right-top`,`bottom-right`,`right-bottom`,`bottom-left`,`left-bottom`],y=()=>[...te(),X,q],b=()=>[`auto`,`hidden`,`clip`,`visible`,`scroll`],x=()=>[`auto`,`contain`,`none`],S=()=>[X,q,c],C=()=>[U,`full`,`auto`,...S()],ne=()=>[G,`none`,`subgrid`,X,q],re=()=>[`auto`,{span:[`full`,G,X,q]},G,X,q],w=()=>[G,`auto`,X,q],ie=()=>[`auto`,`min`,`max`,`fr`,X,q],T=()=>[`start`,`end`,`center`,`between`,`around`,`evenly`,`stretch`,`baseline`,`center-safe`,`end-safe`],E=()=>[`start`,`end`,`center`,`stretch`,`center-safe`,`end-safe`],D=()=>[`auto`,...S()],O=()=>[U,`auto`,`full`,`dvw`,`dvh`,`lvw`,`lvh`,`svw`,`svh`,`min`,`max`,`fit`,...S()],k=()=>[U,`screen`,`full`,`dvw`,`lvw`,`svw`,`min`,`max`,`fit`,...S()],A=()=>[U,`screen`,`full`,`lh`,`dvh`,`lvh`,`svh`,`min`,`max`,`fit`,...S()],j=()=>[e,X,q],ae=()=>[...te(),Ae,De,{position:[X,q]}],oe=()=>[`no-repeat`,{repeat:[``,`x`,`y`,`space`,`round`]}],se=()=>[`auto`,`cover`,`contain`,je,Ce,{size:[X,q]}],M=()=>[he,Z,J],N=()=>[``,`none`,`full`,l,X,q],P=()=>[``,W,Z,J],F=()=>[`solid`,`dashed`,`dotted`,`double`],ce=()=>[`normal`,`multiply`,`screen`,`overlay`,`darken`,`lighten`,`color-dodge`,`color-burn`,`hard-light`,`soft-light`,`difference`,`exclusion`,`hue`,`saturation`,`color`,`luminosity`],I=()=>[W,he,Ae,De],R=()=>[``,`none`,m,X,q],z=()=>[`none`,W,X,q],B=()=>[`none`,W,X,q],V=()=>[W,X,q],H=()=>[U,`full`,...S()];return{theme:{animate:[`spin`,`ping`,`pulse`,`bounce`],aspect:[`video`],blur:[K],breakpoint:[K],color:[ge],container:[K],"drop-shadow":[K],ease:[`in`,`out`,`in-out`],font:[xe],"font-weight":[`thin`,`extralight`,`light`,`normal`,`medium`,`semibold`,`bold`,`extrabold`,`black`],"inset-shadow":[K],leading:[`none`,`tight`,`snug`,`normal`,`relaxed`,`loose`],perspective:[`dramatic`,`near`,`normal`,`midrange`,`distant`,`none`],radius:[K],shadow:[K],spacing:[`px`,W],text:[K],"text-shadow":[K],tracking:[`tighter`,`tight`,`normal`,`wide`,`wider`,`widest`]},classGroups:{aspect:[{aspect:[`auto`,`square`,U,q,X,g]}],container:[`container`],"container-type":[{"@container":[``,`normal`,`size`,X,q]}],"container-named":[Se],columns:[{columns:[W,q,X,s]}],"break-after":[{"break-after":v()}],"break-before":[{"break-before":v()}],"break-inside":[{"break-inside":[`auto`,`avoid`,`avoid-page`,`avoid-column`]}],"box-decoration":[{"box-decoration":[`slice`,`clone`]}],box:[{box:[`border`,`content`]}],display:[`block`,`inline-block`,`inline`,`flex`,`inline-flex`,`table`,`inline-table`,`table-caption`,`table-cell`,`table-column`,`table-column-group`,`table-footer-group`,`table-header-group`,`table-row-group`,`table-row`,`flow-root`,`grid`,`inline-grid`,`contents`,`list-item`,`hidden`],sr:[`sr-only`,`not-sr-only`],float:[{float:[`right`,`left`,`none`,`start`,`end`]}],clear:[{clear:[`left`,`right`,`both`,`none`,`start`,`end`]}],isolation:[`isolate`,`isolation-auto`],"object-fit":[{object:[`contain`,`cover`,`fill`,`none`,`scale-down`]}],"object-position":[{object:y()}],overflow:[{overflow:b()}],"overflow-x":[{"overflow-x":b()}],"overflow-y":[{"overflow-y":b()}],overscroll:[{overscroll:x()}],"overscroll-x":[{"overscroll-x":x()}],"overscroll-y":[{"overscroll-y":x()}],position:[`static`,`fixed`,`absolute`,`relative`,`sticky`],inset:[{inset:C()}],"inset-x":[{"inset-x":C()}],"inset-y":[{"inset-y":C()}],start:[{"inset-s":C(),start:C()}],end:[{"inset-e":C(),end:C()}],"inset-bs":[{"inset-bs":C()}],"inset-be":[{"inset-be":C()}],top:[{top:C()}],right:[{right:C()}],bottom:[{bottom:C()}],left:[{left:C()}],visibility:[`visible`,`invisible`,`collapse`],z:[{z:[G,`auto`,X,q]}],basis:[{basis:[U,`full`,`auto`,s,...S()]}],"flex-direction":[{flex:[`row`,`row-reverse`,`col`,`col-reverse`]}],"flex-wrap":[{flex:[`nowrap`,`wrap`,`wrap-reverse`]}],flex:[{flex:[W,U,`auto`,`initial`,`none`,q]}],grow:[{grow:[``,W,X,q]}],shrink:[{shrink:[``,W,X,q]}],order:[{order:[G,`first`,`last`,`none`,X,q]}],"grid-cols":[{"grid-cols":ne()}],"col-start-end":[{col:re()}],"col-start":[{"col-start":w()}],"col-end":[{"col-end":w()}],"grid-rows":[{"grid-rows":ne()}],"row-start-end":[{row:re()}],"row-start":[{"row-start":w()}],"row-end":[{"row-end":w()}],"grid-flow":[{"grid-flow":[`row`,`col`,`dense`,`row-dense`,`col-dense`]}],"auto-cols":[{"auto-cols":ie()}],"auto-rows":[{"auto-rows":ie()}],gap:[{gap:S()}],"gap-x":[{"gap-x":S()}],"gap-y":[{"gap-y":S()}],"justify-content":[{justify:[...T(),`normal`]}],"justify-items":[{"justify-items":[...E(),`normal`]}],"justify-self":[{"justify-self":[`auto`,...E()]}],"align-content":[{content:[`normal`,...T()]}],"align-items":[{items:[...E(),{baseline:[``,`last`]}]}],"align-self":[{self:[`auto`,...E(),{baseline:[``,`last`]}]}],"place-content":[{"place-content":T()}],"place-items":[{"place-items":[...E(),`baseline`]}],"place-self":[{"place-self":[`auto`,...E()]}],p:[{p:S()}],px:[{px:S()}],py:[{py:S()}],ps:[{ps:S()}],pe:[{pe:S()}],pbs:[{pbs:S()}],pbe:[{pbe:S()}],pt:[{pt:S()}],pr:[{pr:S()}],pb:[{pb:S()}],pl:[{pl:S()}],m:[{m:D()}],mx:[{mx:D()}],my:[{my:D()}],ms:[{ms:D()}],me:[{me:D()}],mbs:[{mbs:D()}],mbe:[{mbe:D()}],mt:[{mt:D()}],mr:[{mr:D()}],mb:[{mb:D()}],ml:[{ml:D()}],"space-x":[{"space-x":S()}],"space-x-reverse":[`space-x-reverse`],"space-y":[{"space-y":S()}],"space-y-reverse":[`space-y-reverse`],size:[{size:O()}],"inline-size":[{inline:[`auto`,...k()]}],"min-inline-size":[{"min-inline":[`auto`,...k()]}],"max-inline-size":[{"max-inline":[`none`,...k()]}],"block-size":[{block:[`auto`,...A()]}],"min-block-size":[{"min-block":[`auto`,...A()]}],"max-block-size":[{"max-block":[`none`,...A()]}],w:[{w:[s,`screen`,...O()]}],"min-w":[{"min-w":[s,`screen`,`none`,...O()]}],"max-w":[{"max-w":[s,`screen`,`none`,`prose`,{screen:[o]},...O()]}],h:[{h:[`screen`,`lh`,...O()]}],"min-h":[{"min-h":[`screen`,`lh`,`none`,...O()]}],"max-h":[{"max-h":[`screen`,`lh`,...O()]}],"font-size":[{text:[`base`,n,Z,J]}],"font-smoothing":[`antialiased`,`subpixel-antialiased`],"font-style":[`italic`,`not-italic`],"font-weight":[{font:[r,Pe,Te]}],"font-stretch":[{"font-stretch":[`ultra-condensed`,`extra-condensed`,`condensed`,`semi-condensed`,`normal`,`semi-expanded`,`expanded`,`extra-expanded`,`ultra-expanded`,he,q]}],"font-family":[{font:[ke,Ee,t]}],"font-features":[{"font-features":[q]}],"fvn-normal":[`normal-nums`],"fvn-ordinal":[`ordinal`],"fvn-slashed-zero":[`slashed-zero`],"fvn-figure":[`lining-nums`,`oldstyle-nums`],"fvn-spacing":[`proportional-nums`,`tabular-nums`],"fvn-fraction":[`diagonal-fractions`,`stacked-fractions`],tracking:[{tracking:[i,X,q]}],"line-clamp":[{"line-clamp":[W,`none`,X,we]}],leading:[{leading:[a,...S()]}],"list-image":[{"list-image":[`none`,X,q]}],"list-style-position":[{list:[`inside`,`outside`]}],"list-style-type":[{list:[`disc`,`decimal`,`none`,X,q]}],"text-alignment":[{text:[`left`,`center`,`right`,`justify`,`start`,`end`]}],"placeholder-color":[{placeholder:j()}],"text-color":[{text:j()}],"text-decoration":[`underline`,`overline`,`line-through`,`no-underline`],"text-decoration-style":[{decoration:[...F(),`wavy`]}],"text-decoration-thickness":[{decoration:[W,`from-font`,`auto`,X,J]}],"text-decoration-color":[{decoration:j()}],"underline-offset":[{"underline-offset":[W,`auto`,X,q]}],"text-transform":[`uppercase`,`lowercase`,`capitalize`,`normal-case`],"text-overflow":[`truncate`,`text-ellipsis`,`text-clip`],"text-wrap":[{text:[`wrap`,`nowrap`,`balance`,`pretty`]}],indent:[{indent:S()}],"tab-size":[{tab:[G,X,q]}],"vertical-align":[{align:[`baseline`,`top`,`middle`,`bottom`,`text-top`,`text-bottom`,`sub`,`super`,X,q]}],whitespace:[{whitespace:[`normal`,`nowrap`,`pre`,`pre-line`,`pre-wrap`,`break-spaces`]}],break:[{break:[`normal`,`words`,`all`,`keep`]}],wrap:[{wrap:[`break-word`,`anywhere`,`normal`]}],hyphens:[{hyphens:[`none`,`manual`,`auto`]}],content:[{content:[`none`,X,q]}],"bg-attachment":[{bg:[`fixed`,`local`,`scroll`]}],"bg-clip":[{"bg-clip":[`border`,`padding`,`content`,`text`]}],"bg-origin":[{"bg-origin":[`border`,`padding`,`content`]}],"bg-position":[{bg:ae()}],"bg-repeat":[{bg:oe()}],"bg-size":[{bg:se()}],"bg-image":[{bg:[`none`,{linear:[{to:[`t`,`tr`,`r`,`br`,`b`,`bl`,`l`,`tl`]},G,X,q],radial:[``,X,q],conic:[G,X,q]},Me,Oe]}],"bg-color":[{bg:j()}],"gradient-from-pos":[{from:M()}],"gradient-via-pos":[{via:M()}],"gradient-to-pos":[{to:M()}],"gradient-from":[{from:j()}],"gradient-via":[{via:j()}],"gradient-to":[{to:j()}],rounded:[{rounded:N()}],"rounded-s":[{"rounded-s":N()}],"rounded-e":[{"rounded-e":N()}],"rounded-t":[{"rounded-t":N()}],"rounded-r":[{"rounded-r":N()}],"rounded-b":[{"rounded-b":N()}],"rounded-l":[{"rounded-l":N()}],"rounded-ss":[{"rounded-ss":N()}],"rounded-se":[{"rounded-se":N()}],"rounded-ee":[{"rounded-ee":N()}],"rounded-es":[{"rounded-es":N()}],"rounded-tl":[{"rounded-tl":N()}],"rounded-tr":[{"rounded-tr":N()}],"rounded-br":[{"rounded-br":N()}],"rounded-bl":[{"rounded-bl":N()}],"border-w":[{border:P()}],"border-w-x":[{"border-x":P()}],"border-w-y":[{"border-y":P()}],"border-w-s":[{"border-s":P()}],"border-w-e":[{"border-e":P()}],"border-w-bs":[{"border-bs":P()}],"border-w-be":[{"border-be":P()}],"border-w-t":[{"border-t":P()}],"border-w-r":[{"border-r":P()}],"border-w-b":[{"border-b":P()}],"border-w-l":[{"border-l":P()}],"divide-x":[{"divide-x":P()}],"divide-x-reverse":[`divide-x-reverse`],"divide-y":[{"divide-y":P()}],"divide-y-reverse":[`divide-y-reverse`],"border-style":[{border:[...F(),`hidden`,`none`]}],"divide-style":[{divide:[...F(),`hidden`,`none`]}],"border-color":[{border:j()}],"border-color-x":[{"border-x":j()}],"border-color-y":[{"border-y":j()}],"border-color-s":[{"border-s":j()}],"border-color-e":[{"border-e":j()}],"border-color-bs":[{"border-bs":j()}],"border-color-be":[{"border-be":j()}],"border-color-t":[{"border-t":j()}],"border-color-r":[{"border-r":j()}],"border-color-b":[{"border-b":j()}],"border-color-l":[{"border-l":j()}],"divide-color":[{divide:j()}],"outline-style":[{outline:[...F(),`none`,`hidden`]}],"outline-offset":[{"outline-offset":[W,X,q]}],"outline-w":[{outline:[``,W,Z,J]}],"outline-color":[{outline:j()}],shadow:[{shadow:[``,`none`,u,Ne,Y]}],"shadow-color":[{shadow:j()}],"inset-shadow":[{"inset-shadow":[`none`,d,Ne,Y]}],"inset-shadow-color":[{"inset-shadow":j()}],"ring-w":[{ring:P()}],"ring-w-inset":[`ring-inset`],"ring-color":[{ring:j()}],"ring-offset-w":[{"ring-offset":[W,J]}],"ring-offset-color":[{"ring-offset":j()}],"inset-ring-w":[{"inset-ring":P()}],"inset-ring-color":[{"inset-ring":j()}],"text-shadow":[{"text-shadow":[`none`,f,Ne,Y]}],"text-shadow-color":[{"text-shadow":j()}],opacity:[{opacity:[W,X,q]}],"mix-blend":[{"mix-blend":[...ce(),`plus-darker`,`plus-lighter`]}],"bg-blend":[{"bg-blend":ce()}],"mask-clip":[{"mask-clip":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]},`mask-no-clip`],"mask-composite":[{mask:[`add`,`subtract`,`intersect`,`exclude`]}],"mask-image-linear-pos":[{"mask-linear":[W]}],"mask-image-linear-from-pos":[{"mask-linear-from":I()}],"mask-image-linear-to-pos":[{"mask-linear-to":I()}],"mask-image-linear-from-color":[{"mask-linear-from":j()}],"mask-image-linear-to-color":[{"mask-linear-to":j()}],"mask-image-t-from-pos":[{"mask-t-from":I()}],"mask-image-t-to-pos":[{"mask-t-to":I()}],"mask-image-t-from-color":[{"mask-t-from":j()}],"mask-image-t-to-color":[{"mask-t-to":j()}],"mask-image-r-from-pos":[{"mask-r-from":I()}],"mask-image-r-to-pos":[{"mask-r-to":I()}],"mask-image-r-from-color":[{"mask-r-from":j()}],"mask-image-r-to-color":[{"mask-r-to":j()}],"mask-image-b-from-pos":[{"mask-b-from":I()}],"mask-image-b-to-pos":[{"mask-b-to":I()}],"mask-image-b-from-color":[{"mask-b-from":j()}],"mask-image-b-to-color":[{"mask-b-to":j()}],"mask-image-l-from-pos":[{"mask-l-from":I()}],"mask-image-l-to-pos":[{"mask-l-to":I()}],"mask-image-l-from-color":[{"mask-l-from":j()}],"mask-image-l-to-color":[{"mask-l-to":j()}],"mask-image-x-from-pos":[{"mask-x-from":I()}],"mask-image-x-to-pos":[{"mask-x-to":I()}],"mask-image-x-from-color":[{"mask-x-from":j()}],"mask-image-x-to-color":[{"mask-x-to":j()}],"mask-image-y-from-pos":[{"mask-y-from":I()}],"mask-image-y-to-pos":[{"mask-y-to":I()}],"mask-image-y-from-color":[{"mask-y-from":j()}],"mask-image-y-to-color":[{"mask-y-to":j()}],"mask-image-radial":[{"mask-radial":[X,q]}],"mask-image-radial-from-pos":[{"mask-radial-from":I()}],"mask-image-radial-to-pos":[{"mask-radial-to":I()}],"mask-image-radial-from-color":[{"mask-radial-from":j()}],"mask-image-radial-to-color":[{"mask-radial-to":j()}],"mask-image-radial-shape":[{"mask-radial":[`circle`,`ellipse`]}],"mask-image-radial-size":[{"mask-radial":[{closest:[`side`,`corner`],farthest:[`side`,`corner`]}]}],"mask-image-radial-pos":[{"mask-radial-at":te()}],"mask-image-conic-pos":[{"mask-conic":[W]}],"mask-image-conic-from-pos":[{"mask-conic-from":I()}],"mask-image-conic-to-pos":[{"mask-conic-to":I()}],"mask-image-conic-from-color":[{"mask-conic-from":j()}],"mask-image-conic-to-color":[{"mask-conic-to":j()}],"mask-mode":[{mask:[`alpha`,`luminance`,`match`]}],"mask-origin":[{"mask-origin":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]}],"mask-position":[{mask:ae()}],"mask-repeat":[{mask:oe()}],"mask-size":[{mask:se()}],"mask-type":[{"mask-type":[`alpha`,`luminance`]}],"mask-image":[{mask:[`none`,X,q]}],filter:[{filter:[``,`none`,X,q]}],blur:[{blur:R()}],brightness:[{brightness:[W,X,q]}],contrast:[{contrast:[W,X,q]}],"drop-shadow":[{"drop-shadow":[``,`none`,p,Ne,Y]}],"drop-shadow-color":[{"drop-shadow":j()}],grayscale:[{grayscale:[``,W,X,q]}],"hue-rotate":[{"hue-rotate":[W,X,q]}],invert:[{invert:[``,W,X,q]}],saturate:[{saturate:[W,X,q]}],sepia:[{sepia:[``,W,X,q]}],"backdrop-filter":[{"backdrop-filter":[``,`none`,X,q]}],"backdrop-blur":[{"backdrop-blur":R()}],"backdrop-brightness":[{"backdrop-brightness":[W,X,q]}],"backdrop-contrast":[{"backdrop-contrast":[W,X,q]}],"backdrop-grayscale":[{"backdrop-grayscale":[``,W,X,q]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[W,X,q]}],"backdrop-invert":[{"backdrop-invert":[``,W,X,q]}],"backdrop-opacity":[{"backdrop-opacity":[W,X,q]}],"backdrop-saturate":[{"backdrop-saturate":[W,X,q]}],"backdrop-sepia":[{"backdrop-sepia":[``,W,X,q]}],"border-collapse":[{border:[`collapse`,`separate`]}],"border-spacing":[{"border-spacing":S()}],"border-spacing-x":[{"border-spacing-x":S()}],"border-spacing-y":[{"border-spacing-y":S()}],"table-layout":[{table:[`auto`,`fixed`]}],caption:[{caption:[`top`,`bottom`]}],transition:[{transition:[``,`all`,`colors`,`opacity`,`shadow`,`transform`,`none`,X,q]}],"transition-behavior":[{transition:[`normal`,`discrete`]}],duration:[{duration:[W,`initial`,X,q]}],ease:[{ease:[`linear`,`initial`,ee,X,q]}],delay:[{delay:[W,X,q]}],animate:[{animate:[`none`,_,X,q]}],backface:[{backface:[`hidden`,`visible`]}],perspective:[{perspective:[h,X,q]}],"perspective-origin":[{"perspective-origin":y()}],rotate:[{rotate:z()}],"rotate-x":[{"rotate-x":z()}],"rotate-y":[{"rotate-y":z()}],"rotate-z":[{"rotate-z":z()}],scale:[{scale:B()}],"scale-x":[{"scale-x":B()}],"scale-y":[{"scale-y":B()}],"scale-z":[{"scale-z":B()}],"scale-3d":[`scale-3d`],skew:[{skew:V()}],"skew-x":[{"skew-x":V()}],"skew-y":[{"skew-y":V()}],transform:[{transform:[X,q,``,`none`,`gpu`,`cpu`]}],"transform-origin":[{origin:y()}],"transform-style":[{transform:[`3d`,`flat`]}],translate:[{translate:H()}],"translate-x":[{"translate-x":H()}],"translate-y":[{"translate-y":H()}],"translate-z":[{"translate-z":H()}],"translate-none":[`translate-none`],zoom:[{zoom:[G,X,q]}],accent:[{accent:j()}],appearance:[{appearance:[`none`,`auto`]}],"caret-color":[{caret:j()}],"color-scheme":[{scheme:[`normal`,`dark`,`light`,`light-dark`,`only-dark`,`only-light`]}],cursor:[{cursor:[`auto`,`default`,`pointer`,`wait`,`text`,`move`,`help`,`not-allowed`,`none`,`context-menu`,`progress`,`cell`,`crosshair`,`vertical-text`,`alias`,`copy`,`no-drop`,`grab`,`grabbing`,`all-scroll`,`col-resize`,`row-resize`,`n-resize`,`e-resize`,`s-resize`,`w-resize`,`ne-resize`,`nw-resize`,`se-resize`,`sw-resize`,`ew-resize`,`ns-resize`,`nesw-resize`,`nwse-resize`,`zoom-in`,`zoom-out`,X,q]}],"field-sizing":[{"field-sizing":[`fixed`,`content`]}],"pointer-events":[{"pointer-events":[`auto`,`none`]}],resize:[{resize:[`none`,``,`y`,`x`]}],"scroll-behavior":[{scroll:[`auto`,`smooth`]}],"scrollbar-thumb-color":[{"scrollbar-thumb":j()}],"scrollbar-track-color":[{"scrollbar-track":j()}],"scrollbar-gutter":[{"scrollbar-gutter":[`auto`,`stable`,`both`]}],"scrollbar-w":[{scrollbar:[`auto`,`thin`,`none`]}],"scroll-m":[{"scroll-m":S()}],"scroll-mx":[{"scroll-mx":S()}],"scroll-my":[{"scroll-my":S()}],"scroll-ms":[{"scroll-ms":S()}],"scroll-me":[{"scroll-me":S()}],"scroll-mbs":[{"scroll-mbs":S()}],"scroll-mbe":[{"scroll-mbe":S()}],"scroll-mt":[{"scroll-mt":S()}],"scroll-mr":[{"scroll-mr":S()}],"scroll-mb":[{"scroll-mb":S()}],"scroll-ml":[{"scroll-ml":S()}],"scroll-p":[{"scroll-p":S()}],"scroll-px":[{"scroll-px":S()}],"scroll-py":[{"scroll-py":S()}],"scroll-ps":[{"scroll-ps":S()}],"scroll-pe":[{"scroll-pe":S()}],"scroll-pbs":[{"scroll-pbs":S()}],"scroll-pbe":[{"scroll-pbe":S()}],"scroll-pt":[{"scroll-pt":S()}],"scroll-pr":[{"scroll-pr":S()}],"scroll-pb":[{"scroll-pb":S()}],"scroll-pl":[{"scroll-pl":S()}],"snap-align":[{snap:[`start`,`end`,`center`,`align-none`]}],"snap-stop":[{snap:[`normal`,`always`]}],"snap-type":[{snap:[`none`,`x`,`y`,`both`]}],"snap-strictness":[{snap:[`mandatory`,`proximity`]}],touch:[{touch:[`auto`,`none`,`manipulation`]}],"touch-x":[{"touch-pan":[`x`,`left`,`right`]}],"touch-y":[{"touch-pan":[`y`,`up`,`down`]}],"touch-pz":[`touch-pinch-zoom`],select:[{select:[`none`,`text`,`all`,`auto`]}],"will-change":[{"will-change":[`auto`,`scroll`,`contents`,`transform`,X,q]}],fill:[{fill:[`none`,...j()]}],"stroke-w":[{stroke:[W,Z,J,we]}],stroke:[{stroke:[`none`,...j()]}],"forced-color-adjust":[{"forced-color-adjust":[`auto`,`none`]}]},conflictingClassGroups:{"container-named":[`container-type`],overflow:[`overflow-x`,`overflow-y`],overscroll:[`overscroll-x`,`overscroll-y`],inset:[`inset-x`,`inset-y`,`inset-bs`,`inset-be`,`start`,`end`,`top`,`right`,`bottom`,`left`],"inset-x":[`right`,`left`],"inset-y":[`top`,`bottom`],flex:[`basis`,`grow`,`shrink`],gap:[`gap-x`,`gap-y`],p:[`px`,`py`,`ps`,`pe`,`pbs`,`pbe`,`pt`,`pr`,`pb`,`pl`],px:[`pr`,`pl`],py:[`pt`,`pb`],m:[`mx`,`my`,`ms`,`me`,`mbs`,`mbe`,`mt`,`mr`,`mb`,`ml`],mx:[`mr`,`ml`],my:[`mt`,`mb`],size:[`w`,`h`],"font-size":[`leading`],"fvn-normal":[`fvn-ordinal`,`fvn-slashed-zero`,`fvn-figure`,`fvn-spacing`,`fvn-fraction`],"fvn-ordinal":[`fvn-normal`],"fvn-slashed-zero":[`fvn-normal`],"fvn-figure":[`fvn-normal`],"fvn-spacing":[`fvn-normal`],"fvn-fraction":[`fvn-normal`],"line-clamp":[`display`,`overflow`],rounded:[`rounded-s`,`rounded-e`,`rounded-t`,`rounded-r`,`rounded-b`,`rounded-l`,`rounded-ss`,`rounded-se`,`rounded-ee`,`rounded-es`,`rounded-tl`,`rounded-tr`,`rounded-br`,`rounded-bl`],"rounded-s":[`rounded-ss`,`rounded-es`],"rounded-e":[`rounded-se`,`rounded-ee`],"rounded-t":[`rounded-tl`,`rounded-tr`],"rounded-r":[`rounded-tr`,`rounded-br`],"rounded-b":[`rounded-br`,`rounded-bl`],"rounded-l":[`rounded-tl`,`rounded-bl`],"border-spacing":[`border-spacing-x`,`border-spacing-y`],"border-w":[`border-w-x`,`border-w-y`,`border-w-s`,`border-w-e`,`border-w-bs`,`border-w-be`,`border-w-t`,`border-w-r`,`border-w-b`,`border-w-l`],"border-w-x":[`border-w-r`,`border-w-l`],"border-w-y":[`border-w-t`,`border-w-b`],"border-color":[`border-color-x`,`border-color-y`,`border-color-s`,`border-color-e`,`border-color-bs`,`border-color-be`,`border-color-t`,`border-color-r`,`border-color-b`,`border-color-l`],"border-color-x":[`border-color-r`,`border-color-l`],"border-color-y":[`border-color-t`,`border-color-b`],translate:[`translate-x`,`translate-y`,`translate-none`],"translate-none":[`translate`,`translate-x`,`translate-y`,`translate-z`],"scroll-m":[`scroll-mx`,`scroll-my`,`scroll-ms`,`scroll-me`,`scroll-mbs`,`scroll-mbe`,`scroll-mt`,`scroll-mr`,`scroll-mb`,`scroll-ml`],"scroll-mx":[`scroll-mr`,`scroll-ml`],"scroll-my":[`scroll-mt`,`scroll-mb`],"scroll-p":[`scroll-px`,`scroll-py`,`scroll-ps`,`scroll-pe`,`scroll-pbs`,`scroll-pbe`,`scroll-pt`,`scroll-pr`,`scroll-pb`,`scroll-pl`],"scroll-px":[`scroll-pr`,`scroll-pl`],"scroll-py":[`scroll-pt`,`scroll-pb`],touch:[`touch-x`,`touch-y`,`touch-pz`],"touch-x":[`touch`],"touch-y":[`touch`],"touch-pz":[`touch`]},conflictingClassGroupModifiers:{"font-size":[`leading`]},postfixLookupClassGroups:[`container-type`],orderSensitiveModifiers:[`*`,`**`,`after`,`backdrop`,`before`,`details-content`,`file`,`first-letter`,`first-line`,`marker`,`placeholder`,`selection`]}}),We=8,Ge=e=>{let t=new WeakMap;return(n,r)=>{let i=r.length,a=!0;for(let e=0;e<i;e++){let t=r[e];if(t&&typeof t!=`string`){a=!1;break}}if(a){let e=t.get(n);if(e!==void 0)for(let t=0;t<e.length;t++){let n=e[t],a=n.values,o=!0;for(let e=0;e<i;e++)if(a[e]!==r[e]){o=!1;break}if(o)return n.result}}let o=n[0];for(let e=0;e<i;e++){let t=r[e];t&&(o+=typeof t==`string`?t:s(t)),o+=n[e+1]}let c=e.mergeString(o);if(a){let e=t.get(n);e===void 0&&(e=[],t.set(n,e)),e.length>=We&&e.shift(),e.push({values:r,result:c})}return c}},Ke=(()=>{let e=Error();return!(`line`in e)&&!(`lineNumber`in e)})(),qe=64,Je=500,Ye=(e=>{let t=Ge(e),n=new Map,r=new Map,i=0,a=t=>{let a=t.length,o=``,c=-1,l=0,u=!0;for(let e=0;e<a;e++){let n=t[e];if(n){if(typeof n!=`string`){u=!1;break}c===-1&&(o=n,c=e),l++}}if(u){if(l===0)return``;if(l===1)return e.mergeString(o);let s=n.get(o);if(s===void 0&&(s=r.get(o)),s!==void 0)for(let e=0;e<s.length;e++){let n=s[e],r=n.rest;if(r.length!==l-1)continue;let i=0,o=!0;for(let e=c+1;e<a;e++){let n=t[e];if(n&&n!==r[i++]){o=!1;break}}if(o)return n.result}let u=o,d=[];for(let e=c+1;e<a;e++){let n=t[e];n&&(u+=` `+n,d.push(n))}let f=e.mergeString(u),p=n.get(o);return p===void 0&&(p=[],n.set(o,p)),p.length>=qe&&p.shift(),p.push({rest:d,result:f}),++i>Je&&(i=0,r=n,n=new Map),f}let d=``;for(let e=0;e<a;e++){let n=t[e];if(!n)continue;let r=typeof n==`string`?n:s(n);r&&(d&&(d+=` `),d+=r)}return e.mergeString(d)};return function(){let n=arguments[0];if(Array.isArray(n)&&`raw`in n){let e=n,r=arguments.length,i=[];for(let e=1;e<r;e++)i.push(arguments[e]);return t(e,i)}let r=arguments.length;if(r===1)return typeof n==`string`?e.mergeString(n):e.mergeString(s(n));if(Ke){let e=[];for(let t=0;t<r;t++)e.push(arguments[t]);return a(e)}let i=``;for(let e=0;e<r;e++){let t=arguments[e];if(!t)continue;let n=typeof t==`string`?t:s(t);n&&(i&&(i+=` `),i+=n)}return e.mergeString(i)}})(Ue);export{a as n,r,Ye as t};
|