stylelint-config-inspector 2.0.0
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/LICENSE +201 -0
- package/README.md +134 -0
- package/bin.mjs +35 -0
- package/dist/cli.mjs +5571 -0
- package/dist/nitro.json +15 -0
- package/dist/public/200.html +1 -0
- package/dist/public/404.html +1 -0
- package/dist/public/_nuxt/3_mkTJ2v.js +3 -0
- package/dist/public/_nuxt/BDH0pOV6.js +1 -0
- package/dist/public/_nuxt/BFHLvPhn.js +1 -0
- package/dist/public/_nuxt/BKBBWEz4.js +1 -0
- package/dist/public/_nuxt/BgZd1qfO.js +141 -0
- package/dist/public/_nuxt/BiE9LVQS.js +2 -0
- package/dist/public/_nuxt/BwdVnuqT.js +1 -0
- package/dist/public/_nuxt/C3ZQgAGz.js +1 -0
- package/dist/public/_nuxt/C62pfWG4.js +1 -0
- package/dist/public/_nuxt/C79VbMUr.js +1 -0
- package/dist/public/_nuxt/CMyQ_JSA.js +1 -0
- package/dist/public/_nuxt/CYI4Dqes.js +1 -0
- package/dist/public/_nuxt/D5CeIdpL.js +1 -0
- package/dist/public/_nuxt/D9VMXJyI.js +1 -0
- package/dist/public/_nuxt/DBzO6yCd.js +1 -0
- package/dist/public/_nuxt/DDlp5JcD.js +1 -0
- package/dist/public/_nuxt/DJcdwkbC.js +2 -0
- package/dist/public/_nuxt/DUtXDOXB.js +1 -0
- package/dist/public/_nuxt/DYop16xf.js +1 -0
- package/dist/public/_nuxt/D_UhJN5P.js +1 -0
- package/dist/public/_nuxt/Gf5y-pjW.js +1 -0
- package/dist/public/_nuxt/RuleList.BHVYWeDI.css +1 -0
- package/dist/public/_nuxt/b9fIUieR.js +1 -0
- package/dist/public/_nuxt/builds/latest.json +1 -0
- package/dist/public/_nuxt/builds/meta/983f1582-17c6-4f54-b47e-9777e04df821.json +1 -0
- package/dist/public/_nuxt/cxyxlHGV.js +13 -0
- package/dist/public/_nuxt/entry.BbIOcLZN.css +1 -0
- package/dist/public/_nuxt/error-404.8srCDDge.css +1 -0
- package/dist/public/_nuxt/error-500.BOFFatCP.css +1 -0
- package/dist/public/_nuxt/nBUflmkO.js +1 -0
- package/dist/public/_nuxt/rX12-d6r.js +1 -0
- package/dist/public/_nuxt/v8C1EvL9.js +1 -0
- package/dist/public/favicon.svg +18 -0
- package/dist/public/fonts/inter-29ede7bd.woff2 +0 -0
- package/dist/public/fonts/inter-2ee02ca4.woff2 +0 -0
- package/dist/public/fonts/inter-51c54b02.woff2 +0 -0
- package/dist/public/fonts/inter-6022da7d.woff2 +0 -0
- package/dist/public/fonts/inter-90d48bd7.woff2 +0 -0
- package/dist/public/fonts/inter-9335538f.woff2 +0 -0
- package/dist/public/fonts/inter-97eb2241.woff2 +0 -0
- package/dist/public/fonts/spacemono-04b9632a.woff2 +0 -0
- package/dist/public/fonts/spacemono-67dc236e.woff2 +0 -0
- package/dist/public/fonts/spacemono-7114c271.woff2 +0 -0
- package/dist/public/index.html +1 -0
- package/dist/public/stylelint/credits.md +9 -0
- package/dist/public/stylelint/stylelint-icon-and-text-white-square.png +0 -0
- package/dist/public/stylelint/stylelint-icon-and-text-white-square.svg +1 -0
- package/dist/public/stylelint/stylelint-icon-and-text-white.png +0 -0
- package/dist/public/stylelint/stylelint-icon-black.svg +1 -0
- package/dist/public/stylelint/stylelint-icon-white-512.png +0 -0
- package/dist/public/stylelint/stylelint-icon-white.svg +1 -0
- package/dist/public/stylelint/stylelint-text-black-256.png +0 -0
- package/dist/public/stylelint/stylelint-text-black.svg +1 -0
- package/dist/public/stylelint/stylelint-text-white-256.png +0 -0
- package/dist/public/stylelint/stylelint-text-white.svg +1 -0
- package/dist/stylelint-config-recommended-DpulrXp2.mjs +46 -0
- package/package.json +336 -0
- package/stylelint.config.mjs +1249 -0
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{f as e,g as t,h as n,m as r,n as i,r as a,s as o,u as s,x as c}from"./rX12-d6r.js";import{A as l,C as u,D as d,It as f,J as p,L as m,N as h,O as g,Q as _,Rt as v,S as y,W as b,X as x,Y as S,b as C,h as w,nt as T,rt as E,ut as D,x as O,y as k,yt as A,zt as j}from"./3_mkTJ2v.js";import{d as M}from"./D9VMXJyI.js";import{a as ee,i as N,r as te,t as P}from"#entry";import{i as F,n as ne,o as I,r as L,t as re}from"./cxyxlHGV.js";import{t as ie}from"./BDH0pOV6.js";var R={key:1,class:`flex-none`,op30:``},ae={key:2},z={class:`colorized-rule-name__name`,op75:``},oe=l({__name:`ColorizedRuleName`,props:{name:{},prefix:{},url:{},as:{},deprecated:{type:[Boolean,Object]},borderless:{type:Boolean},break:{type:Boolean},hoverReveal:{type:Boolean},hideCorePrefix:{type:Boolean,default:!0}},setup(e){let t=e,n=/^\/+/,r=k(()=>{let e=t.name.split(`/`),r=e[0]??``;return e.length===1?t.prefix?{scope:t.prefix,name:r.replace(n,``)}:{scope:void 0,name:r}:{scope:r,name:e.slice(1).join(`/`)}}),i=k(()=>{if(r.value.scope&&!(t.hideCorePrefix&&r.value.scope===`stylelint`))return r.value.scope}),a=k(()=>r.value.scope?r.value.scope===`plugin`&&t.prefix?t.prefix:r.value.scope:``),o=k(()=>I(a.value));return(n,a)=>(b(),O(_(e.as||`div`),{title:t.name,class:f([`colorized-rule-name`,[e.as===`button`?`colorized-rule-name--button`:``,e.deprecated?`line-through`:``,e.borderless?``:`badge`,e.hoverReveal?`colorized-rule-name--hoverable`:``]])},{default:T(()=>[i.value?(b(),u(`span`,{key:0,class:`flex-none`,style:v({color:o.value})},j(i.value),5)):y(``,!0),i.value?(b(),u(`span`,R,`/`)):y(``,!0),i.value&&t.break?(b(),u(`br`,ae)):y(``,!0),C(`span`,z,j(r.value.name),1)]),_:1},8,[`title`,`class`]))}}),se=Object.assign(ie(oe,[[`__scopeId`,`data-v-e8ebe894`]]),{__name:`ColorizedRuleName`}),ce=/\[\s*'--',\s*(\S.+),\s*'--'\s*\],?/g,B=/"(\w+)":/g,V=/"/g;function H(e){let t=`${e}`;return t.endsWith(`1`)&&e!==11?`${t}st`:t.endsWith(`2`)&&e!==12?`${t}nd`:t.endsWith(`3`)&&e!==13?`${t}rd`:`${e}th`}function U(e){return W(e).replace(ce,`$1, // [!code muted]`)}function W(e){return JSON.stringify(e,null,2).replace(B,`$1:`).replace(V,`'`)}var le=[`title`],G=l({__name:`RuleLevelIcon`,props:{level:{},hasOptions:{type:Boolean},hasRedundantOptions:{type:Boolean},configIndex:{},class:{}},setup(e){let t=e,n=k(()=>t.configIndex==null?`Enabled as '${t.level}'`:`Enabled as '${t.level}', in the ${H(t.configIndex+1)} config item`),r=k(()=>({error:`text-red op80`,warn:`text-yellow5 op80 dark:text-yellow4`,off:`text-gray op62`})[t.level]),i=k(()=>({error:`i-ph-warning-circle-duotone`,warn:`i-ph-warning-duotone`,off:`i-ph-circle-half-tilt-duotone`})[t.level]);return(a,o)=>(b(),u(`div`,{relative:``,"inline-flex":``,"items-center":``,"justify-center":``,"leading-none":``,class:f([r.value,t.class]),title:n.value},[C(`div`,{class:f(i.value)},null,2),e.hasOptions?(b(),u(`div`,{key:0,absolute:``,"right--2px":``,"top--2px":``,"h-6px":``,"w-6px":``,"rounded-full":``,"bg-current":``,op75:``,class:f(e.hasRedundantOptions?`text-blue5`:``)},null,2)):y(``,!0)],10,le))}}),K=Object.assign(G,{__name:`RuleLevelIcon`}),q=[[/^(<!--)(.+)(-->)$/,!1],[/^(\/\*)(.+)(\*\/)$/,!1],[/^(\/\/|["'#]|;{1,2}|%{1,2}|--)(.*)$/,!0],[/^(\*)(.+)$/,!0]];function ue(e,t,n){let r=[];for(let i of e){if(n===`v3`){let e=i.children.flatMap((e,t)=>{if(e.type!==`element`)return e;let n=e.children[0];if(n.type!==`text`)return e;let r=t===i.children.length-1;if(!Y(n.value,r))return e;let a=n.value.split(/(\s+\/\/)/);if(a.length<=1)return e;let o=[a[0]];for(let e=1;e<a.length;e+=2)o.push(a[e]+(a[e+1]||``));return o=o.filter(Boolean),o.length<=1?e:o.map(t=>({...e,children:[{type:`text`,value:t}]}))});e.length!==i.children.length&&(i.children=e)}let e=i.children,a=e.length-1;n===`v1`?a=0:t&&(a=e.length-2);for(let n=Math.max(a,0);n<e.length;n++){let a=e[n];if(a.type!==`element`)continue;let o=a.children.at(0);if(o?.type!==`text`)continue;let s=n===e.length-1,c=Y(o.value,s);if(!c&&n>0&&o.value.trim().startsWith(`[!code`)){let t=e[n-1];if(t?.type===`element`){let n=t.children.at(0);if(n?.type===`text`&&n.value.includes(`//`)){let l=Y(n.value+o.value,s);if(l){c=l,r.push({info:l,line:i,token:t,isLineCommentOnly:e.length===2&&t.children.length===1&&a.children.length===1,isJsxStyle:!1,additionalTokens:[a]});continue}}}}if(c)if(t&&!s&&n!==0){let t=J(e[n-1],`{`)&&J(e[n+1],`}`);r.push({info:c,line:i,token:a,isLineCommentOnly:e.length===3&&a.children.length===1,isJsxStyle:t,additionalTokens:void 0})}else r.push({info:c,line:i,token:a,isLineCommentOnly:e.length===1&&a.children.length===1,isJsxStyle:!1,additionalTokens:void 0})}}return r}function J(e,t){if(e.type!==`element`)return!1;let n=e.children[0];return n.type===`text`?n.value.trim()===t:!1}function Y(e,t){let n=e.trimStart(),r=e.length-n.length;n=n.trimEnd();let i=e.length-n.length-r;for(let[e,a]of q){if(a&&!t)continue;let o=e.exec(n);if(o)return[` `.repeat(r)+o[1],o[2],o[3]?o[3]+` `.repeat(i):void 0]}}function X(e){let t=e.match(/(?:\/\/|["'#]|;{1,2}|%{1,2}|--)(\s*)$/);return t&&t[1].trim().length===0?e.slice(0,t.index):e}function de(e,t,n,r){return r??=`v3`,{name:e,code(e){let i=e.children.filter(e=>e.type===`element`),a=[];e.data??={};let o=e.data;o._shiki_notation??=ue(i,[`jsx`,`tsx`].includes(this.options.lang),r);let s=o._shiki_notation;for(let e of s){if(e.info[1].length===0)continue;let o=i.indexOf(e.line);e.isLineCommentOnly&&r!==`v1`&&o++;let s=!1;if(e.info[1]=e.info[1].replace(t,(...t)=>n.call(this,t,e.line,e.token,i,o)?(s=!0,``):t[0]),!s)continue;r===`v1`&&(e.info[1]=X(e.info[1]));let c=e.info[1].trim().length===0;if(c&&(e.info[1]=``),c&&e.isLineCommentOnly)a.push(e.line);else if(c&&e.isJsxStyle)e.line.children.splice(e.line.children.indexOf(e.token)-1,3);else if(c){if(e.additionalTokens)for(let t=e.additionalTokens.length-1;t>=0;t--){let n=e.additionalTokens[t],r=e.line.children.indexOf(n);r!==-1&&e.line.children.splice(r,1)}e.line.children.splice(e.line.children.indexOf(e.token),1)}else{let t=e.token.children[0];if(t.type===`text`&&(t.value=e.info.join(``),e.additionalTokens))for(let t of e.additionalTokens){let e=t.children[0];e?.type===`text`&&(e.value=``)}}}for(let t of a){let n=e.children.indexOf(t),r=e.children[n+1],i=1;r?.type===`text`&&r?.value===`
|
|
2
|
+
`&&(i=2),e.children.splice(n,i)}}}}function fe(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function pe(e={},t=`@shikijs/transformers:notation-map`){let{classMap:n={},classActivePre:r=void 0,classActiveCode:i=void 0}=e;return de(t,RegExp(`#?\\s*\\[!code (${Object.keys(n).map(fe).join(`|`)})(:\\d+)?\\]`,`gi`),function([e,t,a=`:1`],o,s,c,l){let u=Number.parseInt(a.slice(1),10);for(let e=l;e<Math.min(l+u,c.length);e++)this.addClassToHast(c[e],n[t]);return r&&this.addClassToHast(this.pre,r),i&&this.addClassToHast(this.code,i),!0},e.matchAlgorithm)}var me=l({name:`Shiki`,props:{code:{type:String,required:!0},lang:{type:String,required:!0}},setup(e){let t=k(()=>L.value?L.value.codeToHtml(e.code,{lang:e.lang,theme:P.value?`vitesse-dark`:`vitesse-light`,transformers:[{pre(e){e.properties.style=``}},pe({classMap:{muted:`muted`}},`@shikijs/transformers:notation-muted`)]}):ne(e.code));return()=>h(`div`,{class:`filter-hue-rotate-90`,innerHTML:t.value})}}),Z;function he(e){return Z=!0,[`--`,e,`--`]}function Q(e,t){if(t===void 0||typeof e!=typeof t)return e;if(e===t)return he(e);if(typeof e==`object`&&e&&t!==null){if(Array.isArray(e)&&Array.isArray(t)&&e.length===t.length)return e.length===0?he(e):e.map((e,n)=>Q(e,t[n]));if(!Array.isArray(e)&&!Array.isArray(t))return Object.keys(e).reduce((n,r)=>(n[r]=Q(e[r],t[r]),n),{})}return e}function ge(e,t){return Z=!1,{options:e.map((e,n)=>Q(e,n<t.length?t[n]:void 0)),hasRedundantOptions:Z}}var _e={"min-w-100":``,p4:``,flex:`~ col gap-2`},ve={flex:`~ gap-1 items-center`},ye={key:0,ml1:``,op50:``},be={key:1,ml1:``,op50:``},xe={key:3,op50:``},Se={key:0,flex:`~ gap-2`},Ce={flex:`~ col gap-2`},we={flex:`~ gap-2 items-center wrap`},Te={"items-center":``,"justify-between":``,"md:flex":``},Ee={flex:`~ gap-1`,op50:``},De={key:0,border:`~ base rounded-full`,flex:`~ gap-2 items-center`,"bg-active":``,px2:``,py1:``,"text-sm":``},Oe={key:1,border:`~ base rounded-full`,flex:`~ gap-2 items-center`,"bg-active":``,px2:``,py1:``,"text-sm":``},ke={key:0,op50:``},Ae={key:2,op50:``},je=l({__name:`RuleStateItem`,props:{state:{},isLocal:{type:Boolean}},setup(e){let t=e,n={error:`text-red`,warn:`text-amber`,off:`text-gray`},r=k(()=>o.value.configs[t.state.configIndex]),a=k(()=>i(t.state.name)),c=k(()=>ge(t.state.options??[],a.value)),l=k(()=>t.state.primaryOption!==void 0||!!t.state.options?.length),m=k(()=>!!a.value?.length),h=k(()=>l.value&&m.value),_=D({viewType:k(()=>!l.value&&a.value?.length?`default`:`state`).value}),v=M();function x(){s.rule=t.state.name,s.plugins=[],v.push(`/configs`)}return(t,i)=>{let o=K,s=F,v=re,S=me;return b(),u(`div`,_e,[C(`div`,ve,[g(o,{level:e.state.level,"config-index":e.state.configIndex},null,8,[`level`,`config-index`]),e.state.level===`off`?(b(),u(`span`,ye,`Turned `)):(b(),u(`span`,be,`Set to `)),C(`span`,{"font-mono":``,class:f(n[e.state.level])},j(e.state.level),3),e.isLocal?(b(),u(`div`,xe,` in this config `)):(b(),u(w,{key:2},[i[5]||=C(`span`,{op50:``},`in`,-1),C(`button`,{hover:`!color-base`,"text-gray":``,onClick:i[0]||=e=>x()},[r.value.name?(b(),O(s,{key:0,name:r.value.name,px2:``,"font-mono":``,border:`~ base rounded`},null,8,[`name`])):y(``,!0),i[3]||=C(`span`,{op50:``},` the `,-1),d(` `+j(A(H)(e.state.configIndex+1))+` `,1),i[4]||=C(`span`,{op50:``},` config item `,-1)])],64))]),e.isLocal?y(``,!0):(b(),u(`div`,Se,[r.value.files?(b(),u(w,{key:0},[i[7]||=C(`div`,{"i-ph-file-magnifying-glass-duotone":``,my1:``,"flex-none":``,op75:``},null,-1),C(`div`,Ce,[i[6]||=C(`div`,{op50:``},` Applies to files matching `,-1),C(`div`,we,[(b(!0),u(w,null,p(r.value.files?.flat(),(e,t)=>(b(),O(v,{key:t,glob:e},null,8,[`glob`]))),128))])])],64)):r.value.rules?(b(),u(w,{key:1},[i[8]||=C(`div`,{"i-ph-files-duotone":``,my1:``,"flex-none":``,op75:``},null,-1),i[9]||=C(`div`,{op50:``},` Applied generally for all files `,-1)],64)):y(``,!0)])),l.value||a.value?.length?(b(),u(w,{key:1},[C(`div`,Te,[C(`div`,Ee,[h.value?(b(),u(w,{key:0},[l.value?(b(),u(`button`,{key:0,"btn-action":``,class:f({"btn-action-active":_.viewType===`state`}),onClick:i[1]||=e=>_.viewType=`state`},[...i[10]||=[C(`div`,{"i-ph-sliders-duotone":``,my1:``,"flex-none":``,op75:``},null,-1),d(` Rule options `,-1)]],2)):y(``,!0),m.value?(b(),u(`button`,{key:1,"btn-action":``,class:f({"btn-action-active":_.viewType===`default`}),onClick:i[2]||=e=>_.viewType=`default`},[...i[11]||=[C(`div`,{"i-ph-faders-duotone":``,my1:``,"flex-none":``,op75:``},null,-1),d(` Option defaults `,-1)]],2)):y(``,!0)],64)):(b(),u(w,{key:1},[l.value?(b(),u(`div`,De,[...i[12]||=[C(`div`,{"i-ph-sliders-duotone":``,my1:``,"flex-none":``,op75:``},null,-1),d(` Rule options `,-1)]])):m.value?(b(),u(`div`,Oe,[...i[13]||=[C(`div`,{"i-ph-faders-duotone":``,my1:``,"flex-none":``,op75:``},null,-1),d(` Option defaults `,-1)]])):y(``,!0)],64))])]),_.viewType===`state`?(b(),u(w,{key:0},[e.state.primaryOption===void 0?y(``,!0):(b(),O(S,{key:0,lang:`ts`,code:`configuredPrimaryOption: ${A(U)(e.state.primaryOption)}`,rounded:``,"bg-code":``,p2:``,"text-sm":``},null,8,[`code`])),(b(!0),u(w,null,p(c.value.options,(e,t)=>(b(),O(S,{key:t,lang:`ts`,code:A(U)(e),rounded:``,"bg-code":``,p2:``,"text-sm":``},null,8,[`code`]))),128))],64)):y(``,!0),_.viewType===`default`?(b(),u(w,{key:1},[l.value?y(``,!0):(b(),u(`div`,ke,` No explicit options are configured in this state; showing Stylelint defaults. `)),(b(!0),u(w,null,p(a.value,(e,t)=>(b(),O(S,{key:t,lang:`ts`,code:A(U)(e),rounded:``,"bg-code":``,p2:``,"text-sm":``},null,8,[`code`]))),128))],64)):y(``,!0)],64)):y(``,!0),_.viewType===`state`&&c.value.hasRedundantOptions?(b(),u(`div`,Ae,[...i[14]||=[d(` Options `,-1),C(`span`,{italic:``,op75:``},`italicized`,-1),d(` match the default for the rule `,-1)]])):y(``,!0)])}}}),$=Object.assign(je,{__name:`RuleStateItem`}),Me={border:`~ red/25 rounded`,"select-none":``,"bg-red:5":``,px1:``,"text-xs":``,"text-red":``},Ne={key:0,"p-2":``,"text-sm":``,op75:``},Pe={key:0,mb1:``,flex:`~ gap-1`,"text-red":``},Fe={key:1},Ie={key:2},Le={mt2:``},Re=[`href`],ze=l({__name:`RuleDeprecatedInfo`,props:{deprecated:{type:[Boolean,Object]},invalid:{type:Boolean}},setup(e){let t=k(()=>{if(!(!e.deprecated||typeof e.deprecated==`boolean`))return e.deprecated}),n=k(()=>{if(!t.value)return;let e=``;return t.value.deprecatedSince&&(e+=`was deprecated in v${t.value.deprecatedSince}`),t.value.availableUntil&&(e&&(e+=`, and `),e+=`will be removed in v${t.value.availableUntil}`),`This rule ${e}.`});function r(e){return[`text-blue5 dark:text-blue4`,e?`underline`:``]}return(i,a)=>{let o=te;return b(),O(A(ee),{"inline-block":``,disabled:!t.value},{popper:T(({shown:e})=>[e&&t.value?(b(),u(`div`,Ne,[t.value.message?(b(),u(`p`,Pe,[a[0]||=C(`span`,{"i-ph-warning-duotone":``,"inline-block":``},null,-1),d(j(t.value.message),1)])):y(``,!0),n.value?(b(),u(`p`,Fe,j(n.value),1)):y(``,!0),t.value.replacedBy?.length?(b(),u(`p`,Ie,[a[2]||=d(` Please use the `,-1),(b(!0),u(w,null,p(t.value.replacedBy,({rule:e,plugin:n},i)=>(b(),u(w,null,[e?(b(),O(o,{key:e.name,class:f(r(e.url)),href:e.url,target:`_blank`},{default:T(()=>[d(j(e.name??e.url),1)]),_:2},1032,[`class`,`href`])):y(``,!0),n?(b(),u(w,{key:1},[a[1]||=d(` in `,-1),(b(),O(o,{key:n.name,class:f(r(n.url)),href:n.url,target:`_blank`},{default:T(()=>[d(j(n.name??n.url),1)]),_:2},1032,[`class`,`href`]))],64)):y(``,!0),d(j(i===t.value.replacedBy.length-1?`.`:i===0?``:`, `),1)],64))),256))])):y(``,!0),C(`p`,Le,[C(`a`,{"text-red":``,underline:``,href:t.value.url},`Learn more`,8,Re)])])):y(``,!0)]),default:T(()=>[C(`div`,Me,j(e.invalid?`INVALID`:`DEPRECATED`),1)]),_:1},8,[`disabled`])}}}),Be=Object.assign(ze,{__name:`RuleDeprecatedInfo`}),Ve={key:2,"h-5":``,"w-5":``,op0:``},He={"min-w-0":``,"w-full":``,"inline-flex":``,"items-center":``,"gap-1":``},Ue={key:0,"max-h":`50vh`,"min-w":`min(32rem,82vw)`,"text-sm":``,"leading-5":``},We={flex:`~ items-center gap-2`,p3:``},Ge={key:0,"i-ph-magic-wand-duotone":``,op60:``},Ke={border:`t base`,px3:``,pb3:``,"pt2.5":``},qe={flex:`~ items-center gap-1.5 wrap`},Je={"font-mono":``},Ye={class:`wrap mt2 flex items-center gap-2`},Xe={"text-sm":``,"font-medium":``,op80:``},Ze={key:0,class:`inline-flex border border-violet/30 rounded-full bg-violet/8 px2 py0.5 text-xs text-violet7 dark:text-violet3`},Qe={key:0,class:`mt2 inline-flex items-start gap-1.5 text-sm op80`},$e={class:`inline-flex flex-col gap-0.5`},et={grid:`~ cols-[repeat(4,1.15rem)]`,"min-h-5":``,"items-center":``,"justify-items-center":``,"gap-x-1.5":``},tt={key:0,class:`col-start-1`,"i-ph-seal-warning-duotone":``,"text-red5":``,op80:``},nt={key:1,class:`col-start-2`,"i-ph-check-square-duotone":``,"text-green6":``,op70:``},rt={key:2,class:`col-start-3`,"i-ph-wrench-duotone":``,"text-amber6":``,op70:``},it={key:3,class:`col-start-4`,"i-ph-prohibit-inset-duotone":``,op60:``},at=[`title`],ot={key:0},st={key:1,class:`mx-0.5 inline text-[0.94em] text-violet7 font-mono dark:text-violet3`},ct={key:0,"i-ph-asterisk":``,"text-2.5":``,"text-amber5":``,op55:``},lt={key:1,"i-ph-chat-centered-text-duotone":``,"text-3":``,"text-violet5":``,op55:``},ut={key:1,flex:``,"flex-auto":``,"flex-col":``,"items-start":``,"justify-end":``},dt={flex:`~ gap-2`,mt1:``},ft={key:1,"i-ph-check-square-duotone":``,op50:``},pt={key:2,"i-ph-wrench-duotone":``,op50:``},mt=`foo`,ht=`Built-in stylelint rule: Do not use a prefix in your config.`,gt=l({__name:`RuleItem`,props:{rule:{},ruleStates:{},value:{},class:{},gridView:{type:Boolean},dimDisabled:{type:Boolean}},emits:[`badgeClick`,`stateClick`],setup(e,{emit:a}){let o=e,s=a,l=/no more than|at most|at least|specificity|match pattern|to be one of|must be|should be|allowed list|disallowed list/,m=/<value>|‹([^›]+)›/gu;function h(e){let{hasRedundantOptions:t}=ge(e??[],i(o.rule.name));return t}let{copy:_}=c();function D(e){return e&&e[0].toUpperCase()+e.slice(1)}function M(e){if(typeof e==`string`)return e;let t=JSON.stringify(e);return t===void 0?String(e):t}function ee(e){return typeof e==`string`||typeof e==`number`}function P(e,t){let n=e.slice(Math.max(0,t-56),t).toLowerCase();return l.test(n)}function F(e,t){if(!e.includes(`<value>`)||!ee(t))return e;let n=M(t);if(!n.length)return e;let r=`<value>`,i=[],a=e.indexOf(r);for(;a!==-1;)i.push(a),a=e.indexOf(r,a+7);if(!i.length)return e;if(i.length===1)return P(e,i[0])?e.replace(r,n):e;let o=[],s=0,c=!1;for(let t of i)o.push(e.slice(s,t)),P(e,t)?(o.push(n),c=!0):o.push(r),s=t+7;return o.push(e.slice(s)),c?o.join(``):e}let ne=k(()=>{let e=o.ruleStates;if(e?.length)return e.toReversed().find(e=>e.level!==`off`)??e.at(-1)}),L=k(()=>{if(o.value!==void 0)return t(o.value)??n(o.value)?.[0]}),re=k(()=>{if(L.value!==void 0)return L.value;let e=ne.value;if(e)return e.primaryOption??e.options?.[0]}),ie=k(()=>{let e=o.ruleStates;return e?.length?e.every(e=>e.level===`off`):!1}),R=k(()=>{if(o.rule.invalid)return`Invalid rule has no description`;let e=o.rule.docs?.description,t=D(e)??`No description available`,n=re.value;return n===void 0?t:F(t,n)}),ae=k(()=>{let e=R.value,t=[],n=0;for(let r of e.matchAll(m)){let i=r.index??0;n<i&&t.push({type:`text`,value:e.slice(n,i)}),t.push({type:`token`,value:r[1]??mt}),n=i+r[0].length}return n<e.length&&t.push({type:`text`,value:e.slice(n)}),t.length?t:[{type:`text`,value:e}]}),z=k(()=>!!o.rule.docs?.descriptionMissing&&!o.rule.invalid),oe=k(()=>o.rule.docs?.descriptionSource),ce=k(()=>oe.value===`message`&&!z.value),B=k(()=>o.rule.docs?.urlSource===`inferred`),V=k(()=>B.value?`Docs (inferred from plugin package metadata)`:`Docs`),H=k(()=>o.dimDisabled??!0?o.value===void 0?ie.value:r(o.value)===`off`:!1),U=k(()=>H.value?`op55 hover:op100 transition-opacity`:``),W=k(()=>(o.ruleStates?.length??0)>0),le=k(()=>o.value!==void 0),G=k(()=>o.rule.plugin===`stylelint`?!0:o.rule.name.startsWith(`stylelint/`)),q=k(()=>{if(G.value)return`stylelint`;if(o.rule.pluginPackageName)return o.rule.pluginPackageName;if(o.rule.plugin)return`stylelint-${o.rule.plugin}`}),ue=k(()=>G.value?`Rule source`:`Plugin package`),J=k(()=>q.value?q.value:o.rule.plugin?o.rule.plugin:`unknown`),Y=k(()=>{let e=q.value||o.rule.plugin||`stylelint`;return{color:I(e),borderColor:I(e,.5),backgroundColor:I(e,.1)}}),X=k(()=>{let[e]=o.rule.name.split(`/`);if(e===`plugin`)return q.value?{firstLineBeforePrefix:`This rule is published with a generic`,firstLineAfterPrefix:`prefix.`}:{firstLineBeforePrefix:`This rule uses a generic`,firstLineAfterPrefix:`prefix from its upstream package.`}});return(i,a)=>{let c=K,l=$,m=x(`VDropdown`),D=se,k=te,M=Be;return b(),u(w,null,[C(`div`,{class:f([o.class,U.value,e.gridView?`absolute top-2 right-2 flex justify-end items-start`:`w-full flex items-center justify-end`]),"text-lg":``},[W.value?(b(),u(`div`,{key:0,flex:`~ items-center gap-0.5 justify-end`,class:f(e.gridView?`flex-col`:``)},[(b(!0),u(w,null,p(e.ruleStates,(e,t)=>(b(),O(m,{key:t},{popper:T(({shown:t})=>[t?(b(),O(l,{key:0,state:e},null,8,[`state`])):y(``,!0)]),default:T(()=>[g(c,{level:e.level,"config-index":e.configIndex,"has-options":e.primaryOption!==void 0||!!e.options?.length,"has-redundant-options":h(e.options)},null,8,[`level`,`config-index`,`has-options`,`has-redundant-options`])]),_:2},1024))),128))],2)):le.value?(b(),O(c,{key:1,level:A(r)(e.value),"has-options":A(t)(e.value)!==void 0||!!A(n)(e.value)?.length,"has-redundant-options":h(A(n)(e.value))},null,8,[`level`,`has-options`,`has-redundant-options`])):e.gridView?y(``,!0):(b(),u(`div`,Ve))],2),C(`div`,{class:f([o.class,U.value]),relative:``,"min-w-0":``,pr2:``},[g(m,null,{popper:T(({shown:t})=>[t?(b(),u(`div`,Ue,[C(`div`,We,[!e.rule.invalid&&e.rule.docs?.url?E((b(),O(k,{key:0,class:`inline-flex items-center gap-1.5 border border-base rounded-full bg-black/8 px3 py1.5 text-sm text-inherit no-underline transition dark:bg-white/6 hover:bg-black/14 dark:hover:bg-white/12`,to:e.rule.docs?.url,target:`_blank`,rel:`noopener noreferrer`,title:V.value},{default:T(()=>[a[3]||=C(`div`,{"i-ph-book-duotone":``},null,-1),a[4]||=d(` Docs `,-1),B.value?(b(),u(`div`,Ge)):y(``,!0)]),_:1},8,[`to`,`title`])),[[A(N),V.value]]):y(``,!0),C(`button`,{class:`inline-flex items-center gap-1.5 border border-base rounded-full bg-black/8 px3 py1.5 text-sm text-inherit transition dark:bg-white/6 hover:bg-black/14 dark:hover:bg-white/12`,title:`Copy`,onClick:a[1]||=t=>A(_)(e.rule.name)},[...a[5]||=[C(`div`,{"i-ph-copy-duotone":``},null,-1),d(` Copy name `,-1)]]),S(i.$slots,`popup-actions`)]),C(`div`,Ke,[C(`div`,qe,[a[6]||=C(`span`,{"text-sm":``,op70:``},`Rule name`,-1),C(`code`,Je,j(e.rule.name),1)]),C(`div`,Ye,[C(`span`,Xe,j(ue.value),1),C(`code`,{class:`inline-flex items-center border rounded-full px2 py0.5 text-sm font-mono`,style:v(Y.value)},j(J.value),5),G.value?(b(),u(`span`,Ze,[...a[7]||=[d(` Built-in rule · omit `,-1),C(`span`,{class:`mx1 text-violet8 font-mono dark:text-violet2`},`stylelint/`,-1),d(` in config `,-1)]])):y(``,!0)]),X.value?(b(),u(`div`,Qe,[a[10]||=C(`span`,{"i-ph-info-duotone":``,"mt0.25":``,"text-sm":``},null,-1),C(`span`,$e,[C(`span`,null,[d(j(X.value.firstLineBeforePrefix)+` `,1),a[8]||=C(`span`,{class:`mx0.5 text-violet7 font-mono dark:text-violet3`},`plugin/`,-1),d(` `+j(X.value.firstLineAfterPrefix),1)]),a[9]||=C(`span`,null,[d(` Keep the `),C(`span`,{class:`mx0.5 text-violet7 font-mono dark:text-violet3`},`plugin/`),d(` prefix in your config. `)],-1)])])):y(``,!0)]),S(i.$slots,`popup`)])):y(``,!0)]),default:T(()=>[C(`div`,He,[G.value?E((b(),u(`span`,{key:0,class:`inline-flex flex-none cursor-help items-center text-violet6 op75 dark:text-violet3`,title:ht},[...a[2]||=[C(`span`,{"i-ph-asterisk":``,class:`text-3 leading-none`},null,-1)]])),[[A(N),ht]]):y(``,!0),g(D,{name:e.rule.name,prefix:e.rule.plugin,deprecated:e.rule.deprecated,borderless:!0,break:e.gridView,"hover-reveal":!1,title:e.rule.name,class:`min-w-0`,"text-start":``,as:`button`,onClick:a[0]||=e=>s(`badgeClick`,e)},null,8,[`name`,`prefix`,`deprecated`,`break`,`title`])])]),_:3})],2),e.gridView?y(``,!0):(b(),u(`div`,{key:0,class:f([o.class,U.value]),mx2:``,"min-w-0":``,flex:``,"justify-center":``},[C(`div`,et,[e.rule.invalid?E((b(),u(`div`,tt,null,512)),[[A(N),`❌ Invalid rule`]]):y(``,!0),e.rule.docs?.recommended?E((b(),u(`div`,nt,null,512)),[[A(N),`✅ Recommended`]]):y(``,!0),e.rule.fixable?E((b(),u(`div`,rt,null,512)),[[A(N),`🔧 Fixable`]]):y(``,!0),e.rule.deprecated?E((b(),u(`div`,it,null,512)),[[A(N),`🪦 Deprecated`]]):y(``,!0)])],2)),C(`div`,{class:f([o.class,U.value]),"min-w-0":``,flex:`~ gap-2 items-center`,"of-hidden":``},[C(`div`,{title:R.value,class:f([e.rule.deprecated?`line-through`:``,e.rule.invalid?`text-red`:``,e.gridView?`op55 text-sm leading-5`:`op75 text-sm ws-nowrap of-hidden text-ellipsis line-clamp-1`])},[(b(!0),u(w,null,p(ae.value,(e,t)=>(b(),u(w,{key:t},[e.type===`text`?(b(),u(`span`,ot,j(e.value),1)):(b(),u(`code`,st,j(e.value),1))],64))),128))],10,at),z.value?E((b(),u(`div`,ct,null,512)),[[A(N),`No description metadata found for this rule; showing a generated fallback.`]]):ce.value?E((b(),u(`div`,lt,null,512)),[[A(N),`Description derived from plugin message templates because dedicated metadata is missing.`]]):y(``,!0)],2),e.gridView&&(e.rule.invalid||e.rule.deprecated||e.rule.fixable||e.rule.docs?.recommended)?(b(),u(`div`,ut,[C(`div`,dt,[e.rule.invalid||e.rule.deprecated?(b(),O(M,{key:0,deprecated:e.rule.deprecated,invalid:e.rule.invalid},null,8,[`deprecated`,`invalid`])):y(``,!0),e.rule.docs?.recommended?E((b(),u(`div`,ft,null,512)),[[A(N),`✅ Recommended`]]):y(``,!0),e.rule.fixable?E((b(),u(`div`,pt,null,512)),[[A(N),`🔧 Fixable`]]):y(``,!0)])])):y(``,!0)],64)}}}),_t=Object.assign(gt,{__name:`RuleItem`}),vt=`42px_minmax(12rem,clamp(12rem,32vw,24rem))_5rem_minmax(0,1fr)`,yt=l({__name:`RuleList`,props:{rules:{},getBind:{type:Function},filter:{type:Function},listColumns:{},dimDisabled:{type:Boolean},showRuleStates:{type:Boolean},gridView:{type:Boolean}},setup(t){let n=t,r=k(()=>n.gridView??e.value),i=k(()=>Array.isArray(n.rules)?n.rules.map(e=>e.name):Object.keys(n.rules)),s=k(()=>n.dimDisabled??!0);function c(e){return Array.isArray(n.rules)?n.rules.find(t=>t.name===e):a(e)}function d(e){return Array.isArray(n.rules)?void 0:n.rules[e]}let _=k(()=>r.value?`grid grid-cols-[repeat(auto-fill,minmax(min(100%,350px),1fr))] gap-2`:`grid max-w-full min-w-0 gap-x-2 gap-y-2 items-center`),x=k(()=>{if(!r.value)return{gridTemplateColumns:(n.listColumns||vt).replaceAll(`_`,` `)}}),C=l({setup(e,{slots:t}){return()=>r.value?h(`div`,{class:`relative border border-base max-w-full rounded-lg p4 py3 flex flex-col gap-2 of-hidden justify-start`},t.default?.()):h(w,t.default?.())}});return(e,a)=>{let l=$,h=_t;return b(),u(`div`,{class:f(_.value),style:v(x.value)},[(b(!0),u(w,null,p(i.value,i=>(b(),u(w,{key:i},[n.filter?.(i)===!1?y(``,!0):(b(),O(A(C),{key:0},{default:T(()=>[g(h,m({rule:c(i),"rule-states":n.showRuleStates!==!1&&Array.isArray(t.rules)?A(o).ruleToState.get(i)||[]:void 0,"grid-view":r.value,value:d(i)},{ref_for:!0},t.getBind?.(i),{"dim-disabled":s.value}),{popup:T(()=>[S(e.$slots,`popup`,{ruleName:i,value:d(i)},()=>[(b(!0),u(w,null,p(A(o).ruleToState.get(i)||[],(e,t)=>(b(),O(l,{key:t,border:`t base`,state:e},null,8,[`state`]))),128))])]),"popup-actions":T(()=>[S(e.$slots,`popup-actions`,{ruleName:i})]),_:2},1040,[`rule`,`rule-states`,`grid-view`,`value`,`dim-disabled`])]),_:2},1024))],64))),128))],6)}}}),bt=Object.assign(yt,{__name:`RuleList`});export{se as a,W as i,$ as n,K as r,bt as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{C as e,W as t,b as n,zt as r}from"./3_mkTJ2v.js";import{t as i}from"./nBUflmkO.js";import{t as a}from"./BDH0pOV6.js";var o={class:`antialiased bg-white dark:bg-[#020420] dark:text-white font-sans grid min-h-screen overflow-hidden place-content-center text-[#020420] tracking-wide`},s={class:`max-w-520px text-center`},c=[`textContent`],l=[`textContent`],u=[`textContent`],d=a({__name:`error-500`,props:{appName:{type:String,default:`Nuxt`},status:{type:Number,default:500},statusText:{type:String,default:`Internal server error`},description:{type:String,default:`This page is temporarily unavailable.`},refresh:{type:String,default:`Refresh this page`}},setup(a){let d=a;return i({title:`${d.status} - ${d.statusText} | ${d.appName}`,script:[{innerHTML:`!function(){const e=document.createElement("link").relList;if(!(e&&e.supports&&e.supports("modulepreload"))){for(const e of document.querySelectorAll('link[rel="modulepreload"]'))r(e);new MutationObserver(e=>{for(const o of e)if("childList"===o.type)for(const e of o.addedNodes)"LINK"===e.tagName&&"modulepreload"===e.rel&&r(e)}).observe(document,{childList:!0,subtree:!0})}function r(e){if(e.ep)return;e.ep=!0;const r=function(e){const r={};return e.integrity&&(r.integrity=e.integrity),e.referrerPolicy&&(r.referrerPolicy=e.referrerPolicy),"use-credentials"===e.crossOrigin?r.credentials="include":"anonymous"===e.crossOrigin?r.credentials="omit":r.credentials="same-origin",r}(e);fetch(e.href,r)}}();`}],style:[{innerHTML:`*,:after,:before{border-color:var(--un-default-border-color,#e5e7eb);border-style:solid;border-width:0;box-sizing:border-box}:after,:before{--un-content:""}html{line-height:1.5;-webkit-text-size-adjust:100%;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-feature-settings:normal;font-variation-settings:normal;-moz-tab-size:4;tab-size:4;-webkit-tap-highlight-color:transparent}body{line-height:inherit;margin:0}h1,h2{font-size:inherit;font-weight:inherit}h1,h2,p{margin:0}*,:after,:before{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 transparent;--un-ring-shadow:0 0 transparent;--un-shadow-inset: ;--un-shadow:0 0 transparent;--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgba(147,197,253,.5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }`}]}),(i,d)=>(t(),e(`div`,o,[n(`div`,s,[n(`h1`,{class:`font-semibold leading-none mb-4 sm:text-[110px] tabular-nums text-[80px]`,textContent:r(a.status)},null,8,c),n(`h2`,{class:`font-semibold mb-2 sm:text-3xl text-2xl`,textContent:r(a.statusText)},null,8,l),n(`p`,{class:`mb-4 px-2 text-[#64748B] text-md`,textContent:r(a.description)},null,8,u)])]))}},[[`__scopeId`,`data-v-d349100d`]]);export{d as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e=Object.freeze(JSON.parse(`{"colors":{"activityBar.activeBorder":"#1c6b48","activityBar.background":"#ffffff","activityBar.border":"#f0f0f0","activityBar.foreground":"#393a34","activityBar.inactiveForeground":"#393a3450","activityBarBadge.background":"#4e4f47","activityBarBadge.foreground":"#ffffff","badge.background":"#393a3490","badge.foreground":"#ffffff","breadcrumb.activeSelectionForeground":"#22222218","breadcrumb.background":"#f7f7f7","breadcrumb.focusForeground":"#393a34","breadcrumb.foreground":"#6a737d","breadcrumbPicker.background":"#ffffff","button.background":"#1c6b48","button.foreground":"#ffffff","button.hoverBackground":"#1c6b48","checkbox.background":"#f7f7f7","checkbox.border":"#d1d5da","debugToolBar.background":"#ffffff","descriptionForeground":"#393a3490","diffEditor.insertedTextBackground":"#1c6b4830","diffEditor.removedTextBackground":"#ab595940","dropdown.background":"#ffffff","dropdown.border":"#f0f0f0","dropdown.foreground":"#393a34","dropdown.listBackground":"#f7f7f7","editor.background":"#ffffff","editor.findMatchBackground":"#e6cc7744","editor.findMatchHighlightBackground":"#e6cc7766","editor.focusedStackFrameHighlightBackground":"#fff5b1","editor.foldBackground":"#22222210","editor.foreground":"#393a34","editor.inactiveSelectionBackground":"#22222210","editor.lineHighlightBackground":"#f7f7f7","editor.selectionBackground":"#22222218","editor.selectionHighlightBackground":"#22222210","editor.stackFrameHighlightBackground":"#fffbdd","editor.wordHighlightBackground":"#1c6b4805","editor.wordHighlightStrongBackground":"#1c6b4810","editorBracketHighlight.foreground1":"#2993a3","editorBracketHighlight.foreground2":"#1e754f","editorBracketHighlight.foreground3":"#a65e2b","editorBracketHighlight.foreground4":"#a13865","editorBracketHighlight.foreground5":"#bda437","editorBracketHighlight.foreground6":"#296aa3","editorBracketMatch.background":"#1c6b4820","editorError.foreground":"#ab5959","editorGroup.border":"#f0f0f0","editorGroupHeader.tabsBackground":"#ffffff","editorGroupHeader.tabsBorder":"#f0f0f0","editorGutter.addedBackground":"#1e754f","editorGutter.commentRangeForeground":"#393a3450","editorGutter.deletedBackground":"#ab5959","editorGutter.foldingControlForeground":"#393a3490","editorGutter.modifiedBackground":"#296aa3","editorHint.foreground":"#1e754f","editorIndentGuide.activeBackground":"#00000030","editorIndentGuide.background":"#00000015","editorInfo.foreground":"#296aa3","editorInlayHint.background":"#f7f7f7","editorInlayHint.foreground":"#999999","editorLineNumber.activeForeground":"#4e4f47","editorLineNumber.foreground":"#393a3450","editorOverviewRuler.border":"#fff","editorStickyScroll.background":"#f7f7f7","editorStickyScrollHover.background":"#f7f7f7","editorWarning.foreground":"#a65e2b","editorWhitespace.foreground":"#00000015","editorWidget.background":"#ffffff","errorForeground":"#ab5959","focusBorder":"#00000000","foreground":"#393a34","gitDecoration.addedResourceForeground":"#1e754f","gitDecoration.conflictingResourceForeground":"#a65e2b","gitDecoration.deletedResourceForeground":"#ab5959","gitDecoration.ignoredResourceForeground":"#393a3450","gitDecoration.modifiedResourceForeground":"#296aa3","gitDecoration.submoduleResourceForeground":"#393a3490","gitDecoration.untrackedResourceForeground":"#2993a3","input.background":"#f7f7f7","input.border":"#f0f0f0","input.foreground":"#393a34","input.placeholderForeground":"#393a3490","inputOption.activeBackground":"#393a3450","list.activeSelectionBackground":"#f7f7f7","list.activeSelectionForeground":"#393a34","list.focusBackground":"#f7f7f7","list.highlightForeground":"#1c6b48","list.hoverBackground":"#f7f7f7","list.hoverForeground":"#393a34","list.inactiveFocusBackground":"#ffffff","list.inactiveSelectionBackground":"#f7f7f7","list.inactiveSelectionForeground":"#393a34","menu.separatorBackground":"#f0f0f0","notificationCenterHeader.background":"#ffffff","notificationCenterHeader.foreground":"#6a737d","notifications.background":"#ffffff","notifications.border":"#f0f0f0","notifications.foreground":"#393a34","notificationsErrorIcon.foreground":"#ab5959","notificationsInfoIcon.foreground":"#296aa3","notificationsWarningIcon.foreground":"#a65e2b","panel.background":"#ffffff","panel.border":"#f0f0f0","panelInput.border":"#e1e4e8","panelTitle.activeBorder":"#1c6b48","panelTitle.activeForeground":"#393a34","panelTitle.inactiveForeground":"#6a737d","peekViewEditor.background":"#ffffff","peekViewResult.background":"#ffffff","pickerGroup.border":"#f0f0f0","pickerGroup.foreground":"#393a34","problemsErrorIcon.foreground":"#ab5959","problemsInfoIcon.foreground":"#296aa3","problemsWarningIcon.foreground":"#a65e2b","progressBar.background":"#1c6b48","quickInput.background":"#ffffff","quickInput.foreground":"#393a34","quickInputList.focusBackground":"#f7f7f7","scrollbar.shadow":"#6a737d33","scrollbarSlider.activeBackground":"#393a3450","scrollbarSlider.background":"#393a3410","scrollbarSlider.hoverBackground":"#393a3450","settings.headerForeground":"#393a34","settings.modifiedItemIndicator":"#1c6b48","sideBar.background":"#ffffff","sideBar.border":"#f0f0f0","sideBar.foreground":"#4e4f47","sideBarSectionHeader.background":"#ffffff","sideBarSectionHeader.border":"#f0f0f0","sideBarSectionHeader.foreground":"#393a34","sideBarTitle.foreground":"#393a34","statusBar.background":"#ffffff","statusBar.border":"#f0f0f0","statusBar.debuggingBackground":"#f7f7f7","statusBar.debuggingForeground":"#4e4f47","statusBar.foreground":"#4e4f47","statusBar.noFolderBackground":"#ffffff","statusBarItem.prominentBackground":"#f7f7f7","tab.activeBackground":"#ffffff","tab.activeBorder":"#f0f0f0","tab.activeBorderTop":"#393a3490","tab.activeForeground":"#393a34","tab.border":"#f0f0f0","tab.hoverBackground":"#f7f7f7","tab.inactiveBackground":"#ffffff","tab.inactiveForeground":"#6a737d","tab.unfocusedActiveBorder":"#f0f0f0","tab.unfocusedActiveBorderTop":"#f0f0f0","tab.unfocusedHoverBackground":"#ffffff","terminal.ansiBlack":"#121212","terminal.ansiBlue":"#296aa3","terminal.ansiBrightBlack":"#aaaaaa","terminal.ansiBrightBlue":"#296aa3","terminal.ansiBrightCyan":"#2993a3","terminal.ansiBrightGreen":"#1e754f","terminal.ansiBrightMagenta":"#a13865","terminal.ansiBrightRed":"#ab5959","terminal.ansiBrightWhite":"#dddddd","terminal.ansiBrightYellow":"#bda437","terminal.ansiCyan":"#2993a3","terminal.ansiGreen":"#1e754f","terminal.ansiMagenta":"#a13865","terminal.ansiRed":"#ab5959","terminal.ansiWhite":"#dbd7ca","terminal.ansiYellow":"#bda437","terminal.foreground":"#393a34","terminal.selectionBackground":"#22222218","textBlockQuote.background":"#ffffff","textBlockQuote.border":"#f0f0f0","textCodeBlock.background":"#ffffff","textLink.activeForeground":"#1c6b48","textLink.foreground":"#1c6b48","textPreformat.foreground":"#586069","textSeparator.foreground":"#d1d5da","titleBar.activeBackground":"#ffffff","titleBar.activeForeground":"#4e4f47","titleBar.border":"#f7f7f7","titleBar.inactiveBackground":"#ffffff","titleBar.inactiveForeground":"#6a737d","tree.indentGuidesStroke":"#e1e4e8","welcomePage.buttonBackground":"#f6f8fa","welcomePage.buttonHoverBackground":"#e1e4e8"},"displayName":"Vitesse Light","name":"vitesse-light","semanticHighlighting":true,"semanticTokenColors":{"class":"#5a6aa6","interface":"#2e808f","namespace":"#b05a78","property":"#998418","type":"#2e808f"},"tokenColors":[{"scope":["comment","punctuation.definition.comment","string.comment"],"settings":{"foreground":"#a0ada0"}},{"scope":["delimiter.bracket","delimiter","invalid.illegal.character-not-allowed-here.html","keyword.operator.rest","keyword.operator.spread","keyword.operator.type.annotation","keyword.operator.relational","keyword.operator.assignment","keyword.operator.type","meta.brace","meta.tag.block.any.html","meta.tag.inline.any.html","meta.tag.structure.input.void.html","meta.type.annotation","meta.embedded.block.github-actions-expression","storage.type.function.arrow","meta.objectliteral.ts","punctuation","punctuation.definition.string.begin.html.vue","punctuation.definition.string.end.html.vue"],"settings":{"foreground":"#999999"}},{"scope":["constant","entity.name.constant","variable.language","meta.definition.variable"],"settings":{"foreground":"#a65e2b"}},{"scope":["entity","entity.name"],"settings":{"foreground":"#59873a"}},{"scope":"variable.parameter.function","settings":{"foreground":"#393a34"}},{"scope":["entity.name.tag","tag.html"],"settings":{"foreground":"#1e754f"}},{"scope":"entity.name.function","settings":{"foreground":"#59873a"}},{"scope":["keyword","storage.type.class.jsdoc","punctuation.definition.template-expression"],"settings":{"foreground":"#1e754f"}},{"scope":["storage","storage.type","support.type.builtin","constant.language.undefined","constant.language.null","constant.language.import-export-all.ts"],"settings":{"foreground":"#ab5959"}},{"scope":["text.html.derivative","storage.modifier.package","storage.modifier.import","storage.type.java"],"settings":{"foreground":"#393a34"}},{"scope":["string","string punctuation.section.embedded source","attribute.value"],"settings":{"foreground":"#b56959"}},{"scope":["punctuation.definition.string"],"settings":{"foreground":"#b5695977"}},{"scope":["punctuation.support.type.property-name"],"settings":{"foreground":"#99841877"}},{"scope":"support","settings":{"foreground":"#998418"}},{"scope":["property","meta.property-name","meta.object-literal.key","entity.name.tag.yaml","attribute.name"],"settings":{"foreground":"#998418"}},{"scope":["entity.other.attribute-name","invalid.deprecated.entity.other.attribute-name.html"],"settings":{"foreground":"#b07d48"}},{"scope":["variable","identifier"],"settings":{"foreground":"#b07d48"}},{"scope":["support.type.primitive","entity.name.type"],"settings":{"foreground":"#2e8f82"}},{"scope":"namespace","settings":{"foreground":"#b05a78"}},{"scope":["keyword.operator","keyword.operator.assignment.compound","meta.var.expr.ts"],"settings":{"foreground":"#ab5959"}},{"scope":"invalid.broken","settings":{"fontStyle":"italic","foreground":"#b31d28"}},{"scope":"invalid.deprecated","settings":{"fontStyle":"italic","foreground":"#b31d28"}},{"scope":"invalid.illegal","settings":{"fontStyle":"italic","foreground":"#b31d28"}},{"scope":"invalid.unimplemented","settings":{"fontStyle":"italic","foreground":"#b31d28"}},{"scope":"carriage-return","settings":{"background":"#d73a49","content":"^M","fontStyle":"italic underline","foreground":"#fafbfc"}},{"scope":"message.error","settings":{"foreground":"#b31d28"}},{"scope":"string variable","settings":{"foreground":"#b56959"}},{"scope":["source.regexp","string.regexp"],"settings":{"foreground":"#ab5e3f"}},{"scope":["string.regexp.character-class","string.regexp constant.character.escape","string.regexp source.ruby.embedded","string.regexp string.regexp.arbitrary-repitition"],"settings":{"foreground":"#b56959"}},{"scope":"string.regexp constant.character.escape","settings":{"foreground":"#bda437"}},{"scope":["support.constant"],"settings":{"foreground":"#a65e2b"}},{"scope":["keyword.operator.quantifier.regexp","constant.numeric","number"],"settings":{"foreground":"#2f798a"}},{"scope":["keyword.other.unit"],"settings":{"foreground":"#ab5959"}},{"scope":["constant.language.boolean","constant.language"],"settings":{"foreground":"#1e754f"}},{"scope":"meta.module-reference","settings":{"foreground":"#1c6b48"}},{"scope":"punctuation.definition.list.begin.markdown","settings":{"foreground":"#a65e2b"}},{"scope":["markup.heading","markup.heading entity.name"],"settings":{"fontStyle":"bold","foreground":"#1c6b48"}},{"scope":"markup.quote","settings":{"foreground":"#2e808f"}},{"scope":"markup.italic","settings":{"fontStyle":"italic","foreground":"#393a34"}},{"scope":"markup.bold","settings":{"fontStyle":"bold","foreground":"#393a34"}},{"scope":"markup.raw","settings":{"foreground":"#1c6b48"}},{"scope":["markup.deleted","meta.diff.header.from-file","punctuation.definition.deleted"],"settings":{"background":"#ffeef0","foreground":"#b31d28"}},{"scope":["markup.inserted","meta.diff.header.to-file","punctuation.definition.inserted"],"settings":{"background":"#f0fff4","foreground":"#22863a"}},{"scope":["markup.changed","punctuation.definition.changed"],"settings":{"background":"#ffebda","foreground":"#e36209"}},{"scope":["markup.ignored","markup.untracked"],"settings":{"background":"#005cc5","foreground":"#f6f8fa"}},{"scope":"meta.diff.range","settings":{"fontStyle":"bold","foreground":"#6f42c1"}},{"scope":"meta.diff.header","settings":{"foreground":"#005cc5"}},{"scope":"meta.separator","settings":{"fontStyle":"bold","foreground":"#005cc5"}},{"scope":"meta.output","settings":{"foreground":"#005cc5"}},{"scope":["brackethighlighter.tag","brackethighlighter.curly","brackethighlighter.round","brackethighlighter.square","brackethighlighter.angle","brackethighlighter.quote"],"settings":{"foreground":"#586069"}},{"scope":"brackethighlighter.unmatched","settings":{"foreground":"#b31d28"}},{"scope":["constant.other.reference.link","string.other.link","punctuation.definition.string.begin.markdown","punctuation.definition.string.end.markdown"],"settings":{"foreground":"#b56959"}},{"scope":["markup.underline.link.markdown","markup.underline.link.image.markdown"],"settings":{"fontStyle":"underline","foreground":"#393a3490"}},{"scope":["type.identifier","constant.other.character-class.regexp"],"settings":{"foreground":"#5a6aa6"}},{"scope":["entity.other.attribute-name.html.vue"],"settings":{"foreground":"#59873a"}},{"scope":["invalid.illegal.unrecognized-tag.html"],"settings":{"fontStyle":"normal"}}],"type":"light"}`));export{e as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{_ as e,d as t,f as n,p as r,s as i,v as a,w as o}from"./rX12-d6r.js";import{$ as s,A as c,C as l,D as u,I as d,It as f,J as p,L as m,O as h,Rt as g,S as _,W as v,Y as y,Z as ee,b,et as x,ft as te,h as S,nt as C,rt as w,x as T,y as E,yt as D,zt as O}from"./3_mkTJ2v.js";import{a as ne,i as k}from"./DUtXDOXB.js";import"./D5CeIdpL.js";import"./D9VMXJyI.js";import{o as A}from"./cxyxlHGV.js";import{r as re,t as ie}from"./BiE9LVQS.js";import"./BgZd1qfO.js";import{t as ae}from"./CMyQ_JSA.js";var j={flex:`~ inline gap-1 wrap`,"of-hidden":``,"text-sm":``},M=[`title`],N=[`value`,`title`],P=c({__name:`OptionSelectGroup`,props:d({options:{},titles:{},tooltips:{},classes:{},props:{}},{modelValue:{type:[String,Number]},modelModifiers:{}}),emits:[`update:modelValue`],setup(e){let t=s(e,`modelValue`);return(n,r)=>(v(),l(`fieldset`,j,[(v(!0),l(S,null,p(e.options,(i,a)=>(v(),l(`label`,m({key:i,border:`~ base rounded-full`,relative:``,"px2.5":``,"py0.5":``,"hover:bg-hover":``,class:[i===t.value?`bg-active`:`saturate-0 hover:saturate-100`,e.props?.[a]?.class||``]},{ref_for:!0},e.props?.[a],{title:e.tooltips?.[a]??e.titles?.[a]}),[b(`div`,{class:f([i===t.value?``:`op50`,e.titles?.[a]?``:`capitalize`,e.classes?.[a]||``])},[y(n.$slots,`default`,{value:i,title:e.titles?.[a],index:a},()=>[u(O(e.titles?.[a]??i),1)])],2),w(b(`input`,{"onUpdate:modelValue":r[0]||=e=>t.value=e,type:`radio`,value:i,title:e.tooltips?.[a]??e.titles?.[a],absolute:``,"inset-0":``,"op-0.1":``},null,8,N),[[k,t.value]])],16,M))),128))]))}}),oe=Object.assign(P,{__name:`OptionSelectGroup`}),se={py4:``,flex:`~ col gap-2`},F={relative:``,flex:``},I={grid:`~ cols-[max-content_1fr] gap-2`,my2:``,"items-center":``},L={class:`space-y-2`},R={class:`flex flex-wrap items-center gap-2`},z=[`onClick`],B={class:`flex items-center`},V={"ml--1":``,"mr-1":``,flex:``,"items-center":``},H={flex:``,"items-center":``,"gap-1":``},U={key:0,"i-ph-check-square-duotone":``,"ml--0.5":``,"text-green":``},W={key:1,"i-ph-wrench-duotone":``,"ml--0.5":``,"text-amber":``},G={key:2,"i-ph-prohibit-inset-duotone":``,"ml--1":``,"text-gray":``},K={"items-center":``,"justify-between":``,"gap-2":``,"md:flex":``},ce={flex:`~ gap-2`,"lt-sm:flex-col":``},le={flex:`~ inline gap-2 items-center`,border:`~ gray/20 rounded-full`,"bg-gray:10":``,px3:``,py1:``},ue={op75:``},de={"text-sm":``,op50:``},fe={flex:`~ inline gap-2 items-center`,border:`~ gray/20 rounded-full`,"bg-gray:5":``,px3:``,py1:``,"text-sm":``},pe={"font-mono":``},me={"font-mono":``},he={"font-mono":``},ge={key:0,"i-ph-info-duotone":``,"text-violet5":``,op70:``},_e={flex:`~ gap-1`},ve=`56px_minmax(14rem,clamp(14rem,38vw,30rem))_5.25rem_minmax(0,1fr)`,ye=`Descriptions are best-effort: Stylelint and many plugins do not ship consistent rule description metadata. Chat icon = message-derived, asterisk = generated fallback.`,q=c({__name:`rules`,setup(s){let c=E(()=>Object.values(i.value.rules)),d=E(()=>[...new Set(c.value.map(e=>e.plugin))].filter(e=>typeof e==`string`&&e.length>0)),m=E(()=>d.value.map(e=>({value:e,title:e,style:{color:A(e),borderColor:A(e,.55),backgroundColor:A(e,.1)}}))),y=E({get:()=>t.plugins,set:e=>{t.plugins=[...new Set(e)].toSorted((e,t)=>e.localeCompare(t))}}),k=E(()=>y.value.length>0),j=e=>y.value.includes(e);function M(e){let t=new Set(y.value);t.has(e)?t.delete(e):t.add(e),y.value=[...t]}function N(){y.value=[]}let P=E(()=>c.value.some(e=>e.docs?.descriptionSource===`generated`||!!e.docs?.descriptionMissing));function q(e){return(i.value.ruleToState.get(e)?.length??0)>0}function J(t){return e(i.value.ruleToState.get(t))}function Y(e){return a(i.value.ruleToState.get(e))}function be(e){return r.dimDisabledRules?!q(e)&&t.state!==`unused`?`op42`:q(e)&&!Y(e)?`rule-muted-off`:``:``}let xe=E(()=>c.value.filter(e=>J(e.name)).length),Se=E(()=>c.value.filter(e=>!J(e.name)).length),Ce=E(()=>c.value.filter(e=>!!e.docs?.recommended).length),X=E(()=>{let e=c.value;switch(k.value&&(e=e.filter(e=>{let[t,n]=e.name.split(`/`),r=n?t??``:``,i=typeof e.plugin==`string`?e.plugin:``,a=new Set([i,r].filter(Boolean));return y.value.some(e=>a.has(e))})),t.fixable!=null&&(e=e.filter(e=>!!e.fixable===t.fixable)),t.state){case`using`:e=e.filter(e=>J(e.name));break;case`unused`:e=e.filter(e=>!J(e.name));break;case`overloads`:e=e.filter(e=>(i.value.ruleToState.get(e.name)?.length||0)>1);break;case`error`:e=e.filter(e=>i.value.ruleToState.get(e.name)?.some(e=>e.level===`error`));break;case`warn`:e=e.filter(e=>i.value.ruleToState.get(e.name)?.some(e=>e.level===`warn`));break;case`off`:e=e.filter(e=>i.value.ruleToState.get(e.name)?.some(e=>e.level===`off`));break;case`off-only`:e=e.filter(e=>{let t=i.value.ruleToState.get(e.name);return t?.length?t.every(e=>e.level===`off`):!1});break}switch(t.status){case`active`:e=e.filter(e=>Y(e.name));break;case`recommended`:e=e.filter(e=>e.docs?.recommended);break;case`fixable`:e=e.filter(e=>e.fixable);break;case`deprecated`:e=e.filter(e=>e.deprecated);break}return e}),we=E(()=>new ae(X.value,{keys:[`name`,`docs.description`],threshold:.5})),Z=te(X.value);!t.search&&!k.value&&t.state===`using`&&t.status===`active`&&(t.status=``),x(()=>t.status,e=>{e===`recommended`&&t.state===`using`&&(t.state=``)}),x(()=>t.state,e=>{e===`unused`&&t.status===`active`&&(t.status=``)}),o(()=>[t.search,X.value],()=>{if(!t.search)return Z.value=X.value;Z.value=we.value.search(t.search).map(e=>e.item)},{debounce:200});let Q=E(()=>!(t.search||k.value||t.state!==`using`||t.status));function Te(){t.search=``,N(),t.state=`using`,t.status=``}function $(e){n.value=e===`grid`}return(e,i)=>{let a=re,o=oe,s=ie,d=ee(`tooltip`);return v(),l(`div`,null,[b(`div`,se,[b(`div`,F,[w(b(`input`,{"onUpdate:modelValue":i[0]||=e=>D(t).search=e,class:f(D(t).search?`font-mono`:``),placeholder:`Search rules...`,border:`~ base rounded-full`,"w-full":``,"bg-transparent":``,px3:``,py2:``,pl10:``,"outline-none":``},null,2),[[ne,D(t).search]]),i[6]||=b(`div`,{absolute:``,"bottom-0":``,"left-0":``,"top-0":``,flex:`~ items-center justify-center`,p4:``,op50:``},[b(`div`,{"i-ph-magnifying-glass-duotone":``})],-1)]),b(`div`,I,[i[8]||=b(`div`,{"text-right":``,"text-sm":``,op50:``},` Plugins `,-1),b(`div`,L,[i[7]||=b(`div`,{class:`text-xs text-zinc-600 font-semibold tracking-wide uppercase dark:text-zinc-300/85`},` Plugin `,-1),b(`div`,R,[b(`button`,{type:`button`,class:f([`plugin-filter-button badge border border-base px-2 py-0.5 text-xs transition`,[k.value?`bg-white/65 text-zinc-700 hover:bg-black/6 dark:bg-zinc-900/30 dark:text-zinc-300 dark:hover:bg-zinc-800/50`:`bg-violet-100 text-violet-800 dark:bg-zinc-700/45 dark:text-zinc-100`]]),onClick:N},` All plugins `,2),(v(!0),l(S,null,p(m.value,e=>(v(),l(`button`,{key:e.value,type:`button`,class:f([`plugin-filter-button badge border border-base px-2 py-0.5 text-xs transition`,[j(e.value)?`bg-violet-100 text-violet-800 opacity-100 dark:bg-zinc-700/45 dark:text-zinc-100`:k.value?`bg-white/65 text-zinc-700 opacity-55 hover:opacity-85 dark:bg-zinc-900/30 dark:text-zinc-300 dark:opacity-45 dark:hover:opacity-80`:`bg-white/65 text-zinc-700 hover:bg-black/6 dark:bg-zinc-900/30 dark:text-zinc-300 dark:hover:bg-zinc-800/50`]]),style:g(e.style),onClick:t=>M(e.value)},O(e.title),15,z))),128))])]),i[9]||=b(`div`,{"text-right":``,"text-sm":``,op50:``},` State `,-1),h(o,{modelValue:D(t).state,"onUpdate:modelValue":i[1]||=e=>D(t).state=e,options:[``,`using`,`unused`,`error`,`warn`,`off`,`overloads`,`off-only`],titles:[`All`,`Using`,`Unused`,`Error`,`Warn`,`Off`,`Overloaded`,`Off Only`],tooltips:[`Show every rule`,`Rules currently active in at least one config block`,`Rules currently disabled in all config blocks`,`Rules with effective error severity`,`Rules with effective warning severity`,`Rules set to off`,`Rules with mixed state across overrides`,`Rules explicitly off and never active`]},{default:C(({value:e,title:t})=>[b(`div`,B,[b(`div`,V,[e===`error`||e===`overloads`?(v(),T(a,{key:0,level:`error`})):_(``,!0),e===`warn`||e===`overloads`?(v(),T(a,{key:1,level:`warn`})):_(``,!0),e===`off`||e===`off-only`||e===`overloads`?(v(),T(a,{key:2,level:`off`})):_(``,!0)]),u(` `+O(t||e),1)])]),_:1},8,[`modelValue`]),i[10]||=b(`div`,{"text-right":``,"text-sm":``,op50:``},` Status `,-1),h(o,{modelValue:D(t).status,"onUpdate:modelValue":i[2]||=e=>D(t).status=e,options:[``,`active`,`recommended`,`fixable`,`deprecated`],titles:[`All`,`Active`,`Recommended`,`Fixable`,`Deprecated`],tooltips:[`Show every rule status`,`Rules that are enabled in at least one matched config item`,`Rules recommended by Stylelint or plugin metadata`,`Rules that support automatic fixes`,`Rules marked as deprecated by upstream metadata`]},{default:C(({value:e,title:t})=>[b(`div`,H,[e===`recommended`?(v(),l(`div`,U)):_(``,!0),e===`fixable`?(v(),l(`div`,W)):_(``,!0),e===`deprecated`?(v(),l(`div`,G)):_(``,!0),u(` `+O(t||e),1)])]),_:1},8,[`modelValue`])])]),b(`div`,K,[b(`div`,ce,[b(`div`,le,[i[11]||=b(`div`,{"i-ph-list-checks-duotone":``},null,-1),b(`span`,null,O(Z.value.length),1),b(`span`,ue,`rules `+O(Q.value?`in use`:`filtered`),1),b(`span`,de,`out of `+O(c.value.length)+` rules`,1)]),b(`div`,fe,[i[12]||=b(`span`,{op70:``},`Using`,-1),b(`span`,pe,O(xe.value),1),i[13]||=b(`span`,{op40:``},`•`,-1),i[14]||=b(`span`,{op70:``},`Unused`,-1),b(`span`,me,O(Se.value),1),i[15]||=b(`span`,{op40:``},`•`,-1),i[16]||=b(`span`,{op70:``},`Recommended`,-1),b(`span`,he,O(Ce.value),1),P.value?w((v(),l(`div`,ge,null,512)),[[d,ye]]):_(``,!0)]),Q.value?_(``,!0):(v(),l(`button`,{key:0,flex:`~ inline gap-2 items-center self-start`,border:`~ purple/20 rounded-full`,"bg-purple:10":``,px3:``,py1:``,onClick:i[3]||=e=>Te()},[...i[17]||=[b(`div`,{"i-ph-funnel-duotone":``,"text-purple":``},null,-1),b(`span`,{op50:``},`Clear Filter`,-1),b(`div`,{"i-ph-x":``,"ml--1":``,"text-sm":``,op25:``,"hover:op100":``},null,-1)]]))]),b(`div`,_e,[b(`button`,{"btn-action":``,class:f({"btn-action-active":!D(n)}),onClick:i[4]||=e=>$(`list`)},[...i[18]||=[b(`div`,{"i-ph-list-duotone":``},null,-1),u(` List `,-1)]],2),b(`button`,{"btn-action":``,class:f({"btn-action-active":D(n)}),onClick:i[5]||=e=>$(`grid`)},[...i[19]||=[b(`div`,{"i-ph-grid-four-duotone":``},null,-1),u(` Grid `,-1)]],2)])]),h(s,{my4:``,"grid-view":D(n),rules:Z.value,"list-columns":ve,"dim-disabled":D(r).dimDisabledRules,"get-bind":e=>({class:be(e)})},null,8,[`grid-view`,`rules`,`dim-disabled`,`get-bind`])])}}});export{q as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{A as e,It as t,Q as n,W as r,Z as i,b as a,nt as o,rt as s,x as c,y as l,zt as u}from"./3_mkTJ2v.js";var d=e({__name:`SummarizeItem`,props:{icon:{},number:{},color:{},title:{},clickable:{type:Boolean,default:!1}},emits:[`click`],setup(e,{emit:d}){let f=e,p=d,m=l(()=>f.clickable?`button`:`div`);return(e,l)=>{let d=i(`tooltip`);return s((r(),c(n(m.value),{class:t([`inline-flex items-center gap-1.5 text-left leading-none`,[f.number?f.color:`op25`,f.clickable?`cursor-pointer transition hover:op100`:``]]),onClick:l[0]||=e=>p(`click`)},{default:o(()=>[a(`div`,{class:t([f.icon,`h-4 w-4 flex-none text-center`])},null,2),a(`span`,{"inline-block":``,"min-w":`1.75ch`,"text-right":``,"font-mono":``,"tabular-nums":``,class:t(f.color)},u(f.number||``),3)]),_:1},8,[`class`])),[[d,`${f.number} ${f.title}`]])}}}),f=Object.assign(d,{__name:`SummarizeItem`});export{f as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function e(e){return Array.isArray?Array.isArray(e):d(e)===`[object Array]`}var t=1/0;function n(e){if(typeof e==`string`)return e;let n=e+``;return n==`0`&&1/e==-t?`-0`:n}function r(e){return e==null?``:n(e)}function i(e){return typeof e==`string`}function a(e){return typeof e==`number`}function o(e){return e===!0||e===!1||c(e)&&d(e)==`[object Boolean]`}function s(e){return typeof e==`object`}function c(e){return s(e)&&e!==null}function l(e){return e!=null}function u(e){return!e.trim().length}function d(e){return e==null?e===void 0?`[object Undefined]`:`[object Null]`:Object.prototype.toString.call(e)}var f=`Incorrect 'index' type`,p=e=>`Invalid value for key ${e}`,m=e=>`Pattern length exceeds max of ${e}.`,h=e=>`Missing ${e} property in key`,g=e=>`Property 'weight' in key '${e}' must be a positive integer`,_=Object.prototype.hasOwnProperty,v=class{constructor(e){this._keys=[],this._keyMap={};let t=0;e.forEach(e=>{let n=y(e);this._keys.push(n),this._keyMap[n.id]=n,t+=n.weight}),this._keys.forEach(e=>{e.weight/=t})}get(e){return this._keyMap[e]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}};function y(t){let n=null,r=null,a=null,o=1,s=null;if(i(t)||e(t))a=t,n=b(t),r=x(t);else{if(!_.call(t,`name`))throw Error(h(`name`));let e=t.name;if(a=e,_.call(t,`weight`)&&(o=t.weight,o<=0))throw Error(g(e));n=b(e),r=x(e),s=t.getFn}return{path:n,id:r,weight:o,src:a,getFn:s}}function b(t){return e(t)?t:t.split(`.`)}function x(t){return e(t)?t.join(`.`):t}function S(t,n){let s=[],c=!1,u=(t,n,d)=>{if(l(t))if(!n[d])s.push(t);else{let f=t[n[d]];if(!l(f))return;if(d===n.length-1&&(i(f)||a(f)||o(f)))s.push(r(f));else if(e(f)){c=!0;for(let e=0,t=f.length;e<t;e+=1)u(f[e],n,d+1)}else n.length&&u(f,n,d+1)}};return u(t,i(n)?n.split(`.`):n,0),c?s:s[0]}var C={includeMatches:!1,findAllMatches:!1,minMatchCharLength:1},w={isCaseSensitive:!1,ignoreDiacritics:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(e,t)=>e.score===t.score?e.idx<t.idx?-1:1:e.score<t.score?-1:1},ee={location:0,threshold:.6,distance:100},te={useExtendedSearch:!1,getFn:S,ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1},T={...w,...C,...ee,...te},E=/[^ ]+/g;function ne(e=1,t=3){let n=new Map,r=10**t;return{get(t){let i=t.match(E).length;if(n.has(i))return n.get(i);let a=1/i**(.5*e),o=parseFloat(Math.round(a*r)/r);return n.set(i,o),o},clear(){n.clear()}}}var D=class{constructor({getFn:e=T.getFn,fieldNormWeight:t=T.fieldNormWeight}={}){this.norm=ne(t,3),this.getFn=e,this.isCreated=!1,this.setIndexRecords()}setSources(e=[]){this.docs=e}setIndexRecords(e=[]){this.records=e}setKeys(e=[]){this.keys=e,this._keysMap={},e.forEach((e,t)=>{this._keysMap[e.id]=t})}create(){this.isCreated||!this.docs.length||(this.isCreated=!0,i(this.docs[0])?this.docs.forEach((e,t)=>{this._addString(e,t)}):this.docs.forEach((e,t)=>{this._addObject(e,t)}),this.norm.clear())}add(e){let t=this.size();i(e)?this._addString(e,t):this._addObject(e,t)}removeAt(e){this.records.splice(e,1);for(let t=e,n=this.size();t<n;t+=1)--this.records[t].i}getValueForItemAtKeyId(e,t){return e[this._keysMap[t]]}size(){return this.records.length}_addString(e,t){if(!l(e)||u(e))return;let n={v:e,i:t,n:this.norm.get(e)};this.records.push(n)}_addObject(t,n){let r={i:n,$:{}};this.keys.forEach((n,a)=>{let o=n.getFn?n.getFn(t):this.getFn(t,n.path);if(l(o)){if(e(o)){let t=[],n=[{nestedArrIndex:-1,value:o}];for(;n.length;){let{nestedArrIndex:r,value:a}=n.pop();if(l(a))if(i(a)&&!u(a)){let e={v:a,i:r,n:this.norm.get(a)};t.push(e)}else e(a)&&a.forEach((e,t)=>{n.push({nestedArrIndex:t,value:e})})}r.$[a]=t}else if(i(o)&&!u(o)){let e={v:o,n:this.norm.get(o)};r.$[a]=e}}}),this.records.push(r)}toJSON(){return{keys:this.keys,records:this.records}}};function O(e,t,{getFn:n=T.getFn,fieldNormWeight:r=T.fieldNormWeight}={}){let i=new D({getFn:n,fieldNormWeight:r});return i.setKeys(e.map(y)),i.setSources(t),i.create(),i}function re(e,{getFn:t=T.getFn,fieldNormWeight:n=T.fieldNormWeight}={}){let{keys:r,records:i}=e,a=new D({getFn:t,fieldNormWeight:n});return a.setKeys(r),a.setIndexRecords(i),a}function k(e,{errors:t=0,currentLocation:n=0,expectedLocation:r=0,distance:i=T.distance,ignoreLocation:a=T.ignoreLocation}={}){let o=t/e.length;if(a)return o;let s=Math.abs(r-n);return i?o+s/i:s?1:o}function A(e=[],t=T.minMatchCharLength){let n=[],r=-1,i=-1,a=0;for(let o=e.length;a<o;a+=1){let o=e[a];o&&r===-1?r=a:!o&&r!==-1&&(i=a-1,i-r+1>=t&&n.push([r,i]),r=-1)}return e[a-1]&&a-r>=t&&n.push([r,a-1]),n}var j=32;function M(e,t,n,{location:r=T.location,distance:i=T.distance,threshold:a=T.threshold,findAllMatches:o=T.findAllMatches,minMatchCharLength:s=T.minMatchCharLength,includeMatches:c=T.includeMatches,ignoreLocation:l=T.ignoreLocation}={}){if(t.length>j)throw Error(m(j));let u=t.length,d=e.length,f=Math.max(0,Math.min(r,d)),p=a,h=f,g=s>1||c,_=g?Array(d):[],v;for(;(v=e.indexOf(t,h))>-1;){let e=k(t,{currentLocation:v,expectedLocation:f,distance:i,ignoreLocation:l});if(p=Math.min(e,p),h=v+u,g){let e=0;for(;e<u;)_[v+e]=1,e+=1}}h=-1;let y=[],b=1,x=u+d,S=1<<u-1;for(let r=0;r<u;r+=1){let a=0,s=x;for(;a<s;)k(t,{errors:r,currentLocation:f+s,expectedLocation:f,distance:i,ignoreLocation:l})<=p?a=s:x=s,s=Math.floor((x-a)/2+a);x=s;let c=Math.max(1,f-s+1),m=o?d:Math.min(f+s,d)+u,v=Array(m+2);v[m+1]=(1<<r)-1;for(let a=m;a>=c;--a){let o=a-1,s=n[e.charAt(o)];if(g&&(_[o]=+!!s),v[a]=(v[a+1]<<1|1)&s,r&&(v[a]|=(y[a+1]|y[a])<<1|1|y[a+1]),v[a]&S&&(b=k(t,{errors:r,currentLocation:o,expectedLocation:f,distance:i,ignoreLocation:l}),b<=p)){if(p=b,h=o,h<=f)break;c=Math.max(1,2*f-h)}}if(k(t,{errors:r+1,currentLocation:f,expectedLocation:f,distance:i,ignoreLocation:l})>p)break;y=v}let C={isMatch:h>=0,score:Math.max(.001,b)};if(g){let e=A(_,s);e.length?c&&(C.indices=e):C.isMatch=!1}return C}function ie(e){let t={};for(let n=0,r=e.length;n<r;n+=1){let i=e.charAt(n);t[i]=(t[i]||0)|1<<r-n-1}return t}var N=String.prototype.normalize?(e=>e.normalize(`NFD`).replace(/[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C04\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F]/g,``)):(e=>e),P=class{constructor(e,{location:t=T.location,threshold:n=T.threshold,distance:r=T.distance,includeMatches:i=T.includeMatches,findAllMatches:a=T.findAllMatches,minMatchCharLength:o=T.minMatchCharLength,isCaseSensitive:s=T.isCaseSensitive,ignoreDiacritics:c=T.ignoreDiacritics,ignoreLocation:l=T.ignoreLocation}={}){if(this.options={location:t,threshold:n,distance:r,includeMatches:i,findAllMatches:a,minMatchCharLength:o,isCaseSensitive:s,ignoreDiacritics:c,ignoreLocation:l},e=s?e:e.toLowerCase(),e=c?N(e):e,this.pattern=e,this.chunks=[],!this.pattern.length)return;let u=(e,t)=>{this.chunks.push({pattern:e,alphabet:ie(e),startIndex:t})},d=this.pattern.length;if(d>j){let e=0,t=d%j,n=d-t;for(;e<n;)u(this.pattern.substr(e,j),e),e+=j;if(t){let e=d-j;u(this.pattern.substr(e),e)}}else u(this.pattern,0)}searchIn(e){let{isCaseSensitive:t,ignoreDiacritics:n,includeMatches:r}=this.options;if(e=t?e:e.toLowerCase(),e=n?N(e):e,this.pattern===e){let t={isMatch:!0,score:0};return r&&(t.indices=[[0,e.length-1]]),t}let{location:i,distance:a,threshold:o,findAllMatches:s,minMatchCharLength:c,ignoreLocation:l}=this.options,u=[],d=0,f=!1;this.chunks.forEach(({pattern:t,alphabet:n,startIndex:p})=>{let{isMatch:m,score:h,indices:g}=M(e,t,n,{location:i+p,distance:a,threshold:o,findAllMatches:s,minMatchCharLength:c,includeMatches:r,ignoreLocation:l});m&&(f=!0),d+=h,m&&g&&(u=[...u,...g])});let p={isMatch:f,score:f?d/this.chunks.length:1};return f&&r&&(p.indices=u),p}},F=class{constructor(e){this.pattern=e}static isMultiMatch(e){return I(e,this.multiRegex)}static isSingleMatch(e){return I(e,this.singleRegex)}search(){}};function I(e,t){let n=e.match(t);return n?n[1]:null}var ae=class extends F{constructor(e){super(e)}static get type(){return`exact`}static get multiRegex(){return/^="(.*)"$/}static get singleRegex(){return/^=(.*)$/}search(e){let t=e===this.pattern;return{isMatch:t,score:t?0:1,indices:[0,this.pattern.length-1]}}},oe=class extends F{constructor(e){super(e)}static get type(){return`inverse-exact`}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(e){let t=e.indexOf(this.pattern)===-1;return{isMatch:t,score:t?0:1,indices:[0,e.length-1]}}},se=class extends F{constructor(e){super(e)}static get type(){return`prefix-exact`}static get multiRegex(){return/^\^"(.*)"$/}static get singleRegex(){return/^\^(.*)$/}search(e){let t=e.startsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,this.pattern.length-1]}}},ce=class extends F{constructor(e){super(e)}static get type(){return`inverse-prefix-exact`}static get multiRegex(){return/^!\^"(.*)"$/}static get singleRegex(){return/^!\^(.*)$/}search(e){let t=!e.startsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,e.length-1]}}},L=class extends F{constructor(e){super(e)}static get type(){return`suffix-exact`}static get multiRegex(){return/^"(.*)"\$$/}static get singleRegex(){return/^(.*)\$$/}search(e){let t=e.endsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[e.length-this.pattern.length,e.length-1]}}},R=class extends F{constructor(e){super(e)}static get type(){return`inverse-suffix-exact`}static get multiRegex(){return/^!"(.*)"\$$/}static get singleRegex(){return/^!(.*)\$$/}search(e){let t=!e.endsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,e.length-1]}}},z=class extends F{constructor(e,{location:t=T.location,threshold:n=T.threshold,distance:r=T.distance,includeMatches:i=T.includeMatches,findAllMatches:a=T.findAllMatches,minMatchCharLength:o=T.minMatchCharLength,isCaseSensitive:s=T.isCaseSensitive,ignoreDiacritics:c=T.ignoreDiacritics,ignoreLocation:l=T.ignoreLocation}={}){super(e),this._bitapSearch=new P(e,{location:t,threshold:n,distance:r,includeMatches:i,findAllMatches:a,minMatchCharLength:o,isCaseSensitive:s,ignoreDiacritics:c,ignoreLocation:l})}static get type(){return`fuzzy`}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(e){return this._bitapSearch.searchIn(e)}},B=class extends F{constructor(e){super(e)}static get type(){return`include`}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(e){let t=0,n,r=[],i=this.pattern.length;for(;(n=e.indexOf(this.pattern,t))>-1;)t=n+i,r.push([n,t-1]);let a=!!r.length;return{isMatch:a,score:a?0:1,indices:r}}},V=[ae,B,se,ce,R,L,oe,z],H=V.length,U=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/,W=`|`;function le(e,t={}){return e.split(W).map(e=>{let n=e.trim().split(U).filter(e=>e&&!!e.trim()),r=[];for(let e=0,i=n.length;e<i;e+=1){let i=n[e],a=!1,o=-1;for(;!a&&++o<H;){let e=V[o],n=e.isMultiMatch(i);n&&(r.push(new e(n,t)),a=!0)}if(!a)for(o=-1;++o<H;){let e=V[o],n=e.isSingleMatch(i);if(n){r.push(new e(n,t));break}}}return r})}var ue=new Set([z.type,B.type]),de=class{constructor(e,{isCaseSensitive:t=T.isCaseSensitive,ignoreDiacritics:n=T.ignoreDiacritics,includeMatches:r=T.includeMatches,minMatchCharLength:i=T.minMatchCharLength,ignoreLocation:a=T.ignoreLocation,findAllMatches:o=T.findAllMatches,location:s=T.location,threshold:c=T.threshold,distance:l=T.distance}={}){this.query=null,this.options={isCaseSensitive:t,ignoreDiacritics:n,includeMatches:r,minMatchCharLength:i,findAllMatches:o,ignoreLocation:a,location:s,threshold:c,distance:l},e=t?e:e.toLowerCase(),e=n?N(e):e,this.pattern=e,this.query=le(this.pattern,this.options)}static condition(e,t){return t.useExtendedSearch}searchIn(e){let t=this.query;if(!t)return{isMatch:!1,score:1};let{includeMatches:n,isCaseSensitive:r,ignoreDiacritics:i}=this.options;e=r?e:e.toLowerCase(),e=i?N(e):e;let a=0,o=[],s=0;for(let r=0,i=t.length;r<i;r+=1){let i=t[r];o.length=0,a=0;for(let t=0,r=i.length;t<r;t+=1){let r=i[t],{isMatch:c,indices:l,score:u}=r.search(e);if(c){if(a+=1,s+=u,n){let e=r.constructor.type;ue.has(e)?o=[...o,...l]:o.push(l)}}else{s=0,a=0,o.length=0;break}}if(a){let e={isMatch:!0,score:s/a};return n&&(e.indices=o),e}}return{isMatch:!1,score:1}}},G=[];function fe(...e){G.push(...e)}function K(e,t){for(let n=0,r=G.length;n<r;n+=1){let r=G[n];if(r.condition(e,t))return new r(e,t)}return new P(e,t)}var q={AND:`$and`,OR:`$or`},J={PATH:`$path`,PATTERN:`$val`},Y=e=>!!(e[q.AND]||e[q.OR]),pe=e=>!!e[J.PATH],me=t=>!e(t)&&s(t)&&!Y(t),X=e=>({[q.AND]:Object.keys(e).map(t=>({[t]:e[t]}))});function Z(t,n,{auto:r=!0}={}){let a=t=>{let o=Object.keys(t),s=pe(t);if(!s&&o.length>1&&!Y(t))return a(X(t));if(me(t)){let e=s?t[J.PATH]:o[0],a=s?t[J.PATTERN]:t[e];if(!i(a))throw Error(p(e));let c={keyId:x(e),pattern:a};return r&&(c.searcher=K(a,n)),c}let c={children:[],operator:o[0]};return o.forEach(n=>{let r=t[n];e(r)&&r.forEach(e=>{c.children.push(a(e))})}),c};return Y(t)||(t=X(t)),a(t)}function Q(e,{ignoreFieldNorm:t=T.ignoreFieldNorm}){e.forEach(e=>{let n=1;e.matches.forEach(({key:e,norm:r,score:i})=>{let a=e?e.weight:null;n*=(i===0&&a?2**-52:i)**+((a||1)*(t?1:r))}),e.score=n})}function he(e,t){let n=e.matches;t.matches=[],l(n)&&n.forEach(e=>{if(!l(e.indices)||!e.indices.length)return;let{indices:n,value:r}=e,i={indices:n,value:r};e.key&&(i.key=e.key.src),e.idx>-1&&(i.refIndex=e.idx),t.matches.push(i)})}function ge(e,t){t.score=e.score}function _e(e,t,{includeMatches:n=T.includeMatches,includeScore:r=T.includeScore}={}){let i=[];return n&&i.push(he),r&&i.push(ge),e.map(e=>{let{idx:n}=e,r={item:t[n],refIndex:n};return i.length&&i.forEach(t=>{t(e,r)}),r})}var $=class{constructor(e,t={},n){this.options={...T,...t},this.options.useExtendedSearch,this._keyStore=new v(this.options.keys),this.setCollection(e,n)}setCollection(e,t){if(this._docs=e,t&&!(t instanceof D))throw Error(f);this._myIndex=t||O(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}add(e){l(e)&&(this._docs.push(e),this._myIndex.add(e))}remove(e=()=>!1){let t=[];for(let n=0,r=this._docs.length;n<r;n+=1){let i=this._docs[n];e(i,n)&&(this.removeAt(n),--n,--r,t.push(i))}return t}removeAt(e){this._docs.splice(e,1),this._myIndex.removeAt(e)}getIndex(){return this._myIndex}search(e,{limit:t=-1}={}){let{includeMatches:n,includeScore:r,shouldSort:o,sortFn:s,ignoreFieldNorm:c}=this.options,l=i(e)?i(this._docs[0])?this._searchStringList(e):this._searchObjectList(e):this._searchLogical(e);return Q(l,{ignoreFieldNorm:c}),o&&l.sort(s),a(t)&&t>-1&&(l=l.slice(0,t)),_e(l,this._docs,{includeMatches:n,includeScore:r})}_searchStringList(e){let t=K(e,this.options),{records:n}=this._myIndex,r=[];return n.forEach(({v:e,i:n,n:i})=>{if(!l(e))return;let{isMatch:a,score:o,indices:s}=t.searchIn(e);a&&r.push({item:e,idx:n,matches:[{score:o,value:e,norm:i,indices:s}]})}),r}_searchLogical(e){let t=Z(e,this.options),n=(e,t,r)=>{if(!e.children){let{keyId:n,searcher:i}=e,a=this._findMatches({key:this._keyStore.get(n),value:this._myIndex.getValueForItemAtKeyId(t,n),searcher:i});return a&&a.length?[{idx:r,item:t,matches:a}]:[]}let i=[];for(let a=0,o=e.children.length;a<o;a+=1){let o=e.children[a],s=n(o,t,r);if(s.length)i.push(...s);else if(e.operator===q.AND)return[]}return i},r=this._myIndex.records,i={},a=[];return r.forEach(({$:e,i:r})=>{if(l(e)){let o=n(t,e,r);o.length&&(i[r]||(i[r]={idx:r,item:e,matches:[]},a.push(i[r])),o.forEach(({matches:e})=>{i[r].matches.push(...e)}))}}),a}_searchObjectList(e){let t=K(e,this.options),{keys:n,records:r}=this._myIndex,i=[];return r.forEach(({$:e,i:r})=>{if(!l(e))return;let a=[];n.forEach((n,r)=>{a.push(...this._findMatches({key:n,value:e[r],searcher:t}))}),a.length&&i.push({idx:r,item:e,matches:a})}),i}_findMatches({key:t,value:n,searcher:r}){if(!l(n))return[];let i=[];if(e(n))n.forEach(({v:e,i:n,n:a})=>{if(!l(e))return;let{isMatch:o,score:s,indices:c}=r.searchIn(e);o&&i.push({score:s,key:t,value:e,idx:n,norm:a,indices:c})});else{let{v:e,n:a}=n,{isMatch:o,score:s,indices:c}=r.searchIn(e);o&&i.push({score:s,key:t,value:e,norm:a,indices:c})}return i}};$.version=`7.1.0`,$.createIndex=O,$.parseIndex=re,$.config=T,$.parseQuery=Z,fe(de);export{$ as t};
|