PageSourceSearch

https://apriori-publishing.com/_nuxt/D_2613HH.js

js apriori-publishing.com collected 2026-10-02 20:24:23 UTC 12,348 bytes, 1 lines download raw bytes

1import{aW as M,aT as J,aU as ce,aV as fe,aX as te,aY as R,bS as ve,a$ as U,b0 as B,b1 as P,bt as $,b4 as o,b6 as ue,be as G,bf as W,b2 as de,b7 as pe,bg as q,co as ge,b8 as me,cu as ae,bi as he,bk as be,cH as ne,aZ as ye,d6 as Ce,bo as N,b3 as j,bq as _,bU as xe,br as re,bs as ke,bp as ie,b5 as Te,bu as Ke,cJ as Se}from"./BKtmRkjI.js";import{c as Ie}from"./5DJgTfwd.js";import Ae from"./Dpj0jJQ9.js";import{M as Ee}from"./97wXVX_v.js";import{u as _e}from"./CXHnjpH1.js";import{u as we}from"./CcNG0HhW.js";import{f as Y}from"./BbhVaU9K.js";import{a as Be,_ as Re}from"./DSs_7f4v.js";import"./XjGdVpCw.js";function H(c){return c.reduce((u,e)=>(u.push(e),e.children&&u.push(...H(e.children)),u),[])}function Ve(c,u){const e=M(),p=(t,g)=>{if(u.multiple&&Array.isArray(c.value))if(u.selectionBehavior==="replace")c.value=[t],e.value=t;else{const x=c.value.findIndex(d=>g(d));x!==-1?c.value=c.value.filter((d,T)=>T!==x):c.value=[...c.value,t]}else u.selectionBehavior==="replace"?c.value={...t}:!Array.isArray(c.value)&&g(c.value)?c.value=void 0:c.value={...t};return c.value};function V(t,g,x,d){var A;if(!(e!=null&&e.value)||!u.multiple||!Array.isArray(c.value))return;const w=(A=x().filter(I=>I.ref.dataset.disabled!=="").find(I=>I.ref===g))==null?void 0:A.value;if(!w)return;let K=null;switch(t){case"prev":case"next":{K=Y(d,e.value,w);break}case"first":{K=Y(d,e.value,d==null?void 0:d[0]);break}case"last":{K=Y(d,e.value,d==null?void 0:d[d.length-1]);break}}c.value=K}return{firstValue:e,onSelectItem:p,handleMultipleReplace:V}}const[$e,Le]=ce("TreeRoot"),Pe=J({__name:"TreeRoot",props:{modelValue:{},defaultValue:{},items:{},expanded:{},defaultExpanded:{},getKey:{},getChildren:{type:Function,default:c=>c.children},selectionBehavior:{default:"toggle"},multiple:{},dir:{},disabled:{type:Boolean},propagateSelect:{type:Boolean},bubbleSelect:{type:Boolean},asChild:{type:Boolean},as:{default:"ul"}}
1,emits:["update:modelValue","update:expanded"],setup(c,{emit:u}){const e=c,p=u,{items:V,multiple:t,disabled:g,propagateSelect:x,dir:d,bubbleSelect:T}=fe(e),{handleTypeaheadSearch:w}=_e(),K=we(d),A=M(),I=M(!1),D=ve(),a=te(e,"modelValue",p,{defaultValue:e.defaultValue??(t.value?[]:void 0),passive:e.modelValue===void 0,deep:!0}),i=te(e,"expanded",p,{defaultValue:e.defaultExpanded??[],passive:e.expanded===void 0,deep:!0}),{onSelectItem:l,handleMultipleReplace:n}=Ve(a,e),s=R(()=>t.value&&Array.isArray(a.value)?a.value.map(r=>e.getKey(r)):[e.getKey(a.value??{})]);function v(r,f=1,h){return r.reduce((k,b,E)=>{const L=e.getKey(b),O=e.getChildren(b),z=i.value.includes(L),F={_id:L,value:b,index:E,level:f,parentItem:h,hasChildren:!!O,bind:{value:b,level:f,"aria-setsize":r.length,"aria-posinset":E+1}};return k.push(F),O&&z&&k.push(...v(O,f+1,b)),k},[])}const m=R(()=>{const r=e.items;return i.value.map(f=>f),v(r??[])});function C(r){var f;if(I.value)D.trigger(r);else{const h=((f=A.value)==null?void 0:f.getItems())??[];w(r.key,h)}}function y(r){if(I.value)return;const f=Ee[r.key];pe(()=>{var h;n(f,q(),(h=A.value)==null?void 0:h.getItems,m.value.map(k=>k.value))})}function S(r){var f;if(r.parentItem!=null&&Array.isArray(a.value)&&e.multiple){const h=m.value.find(k=>r.parentItem!=null&&e.getKey(k.value)===e.getKey(r.parentItem));h!=null&&(((f=e.getChildren(h.value))==null?void 0:f.every(b=>a.value.find(E=>e.getKey(E)===e.getKey(b))))?a.value=[...a.value,h.value]:a.value=a.value.filter(b=>e.getKey(b)!==e.getKey(h.value)),S(h))}}return Le({modelValue:a,selectedKeys:s,onSelect:r=>{var k;const f=b=>e.getKey(b??{})===e.getKey(r),h=e.multiple&&Array.isArray(a.value)?((k=a.value)==null?void 0:k.findIndex(f))!==-1:void 0;if(l(r,f),e.bubbleSelect&&e.multiple&&Array.isArray(a.value)){const b=m.value.find(E=>e.getKey(E.value)===e.getKey(r));b!=null&&S(b)}if(e.propagateSelect&&e.multiple&&Array.isArray(a.value)){const b=H(e.getChildren(r)??[]);h?a.value=[...a.value].filter(E=>!b.some(L=>e.getKey(E??{})===e.getKey(L))):a.value=[...a.value,...b]}},expanded:i,onToggle(r){if(!(r?e.getChildren(r):void 0))return;const h=e.getKey(r)??r;i.value.includes(h)?i.value=i.value.filter(k=>k!==h):i.value.push(h)},getKey:e.getKey,getChildren:e.getChildren,items:V,expandedItems:m,disabled:g,multiple:t,dir:K,prop
1agateSelect:x,bubbleSelect:T,isVirtual:I,virtualKeydownHook:D,handleMultipleReplace:n}),(r,f)=>(B(),U(o(Be),{ref_key:"rovingFocusGroupRef",ref:A,"as-child":"",orientation:"vertical",dir:o(K)},{default:P(()=>[$(o(ue),{role:"tree",as:r.as,"as-child":r.asChild,"aria-multiselectable":o(t)?!0:void 0,onKeydown:[C,G(W(y,["shift"]),["up","down"])]},{default:P(()=>[de(r.$slots,"default",{flattenItems:m.value,modelValue:o(a),expanded:o(i)})]),_:3},8,["as","as-child","aria-multiselectable","onKeydown"])]),_:3},8,["dir"]))}}),De="tree.select",Oe="tree.toggle",Me=J({inheritAttrs:!1,__name:"TreeItem",props:{value:{},level:{},asChild:{type:Boolean},as:{default:"li"}},emits:["select","toggle"],setup(c,{expose:u,emit:e}){const p=c,V=e,t=$e(),{getItems:g}=ge(),x=R(()=>!!t.getChildren(p.value)),d=R(()=>{const l=t.getKey(p.value);return t.expanded.value.includes(l)}),T=R(()=>{const l=t.getKey(p.value);return t.selectedKeys.value.includes(l)}),w=R(()=>{if(t.bubbleSelect.value&&x.value&&Array.isArray(t.modelValue.value)){const l=H(t.getChildren(p.value)||[]);return l.some(n=>t.modelValue.value.find(s=>t.getKey(s)===t.getKey(n)))&&!l.every(n=>t.modelValue.value.find(s=>t.getKey(s)===t.getKey(n)))}else return t.propagateSelect.value&&T.value&&x.value&&Array.isArray(t.modelValue.value)?!H(t.getChildren(p.value)||[]).every(n=>t.modelValue.value.find(s=>t.getKey(s)===t.getKey(n))):void 0});function K(l){if(x.value)if(d.value){const n=g().map(y=>y.ref),s=q(),v=n.indexOf(s),C=[...n].slice(v).find(y=>Number(y.getAttribute("data-indent"))===p.level+1);C&&C.focus()}else i(l)}function A(l){if(d.value)i(l);
1else{const n=g().map(y=>y.ref),s=q(),v=n.indexOf(s),C=[...n].slice(0,v).reverse().find(y=>Number(y.getAttribute("data-indent"))===p.level-1);C&&C.focus()}}async function I(l){V("select",l),!(l!=null&&l.defaultPrevented)&&t.onSelect(p.value)}async function D(l){V("toggle",l),!(l!=null&&l.defaultPrevented)&&t.onToggle(p.value)}async function a(l){if(!l)return;const n={originalEvent:l,value:p.value,isExpanded:d.value,isSelected:T.value};ae(De,I,n)}async function i(l){if(!l)return;const n={originalEvent:l,value:p.value,isExpanded:d.value,isSelected:T.value};ae(Oe,D,n)}return u({isExpanded:d,isSelected:T,isIndeterminate:w,handleToggle:()=>t.onToggle(p.value),handleSelect:()=>t.onSelect(p.value)}),(l,n)=>(B(),U(o(Re),{"as-child":"",value:l.value,"allow-shift-key":""},{default:P(()=>[$(o(ue),me(l.$attrs,{role:"treeitem",as:l.as,"as-child":l.asChild,"aria-selected":T.value,"aria-expanded":x.value?d.value:void 0,"aria-level":l.level,"data-indent":l.level,"data-selected":T.value?"":void 0,"data-expanded":d.value?"":void 0,onKeydown:[G(W(a,["self","prevent"]),["enter","space"]),n[0]||(n[0]=G(W(s=>o(t).dir.value==="ltr"?K(s):A(s),["prevent"]),["right"])),n[1]||(n[1]=G(W(s=>o(t).dir.value==="ltr"?A(s):K(s),["prevent"]),["left"]))],onClick:n[2]||(n[2]=W(s=>{a(s),i(s)},["stop"]))}),{default:P(()=>[de(l.$slots,"default",{isExpanded:d.value,isSelected:T.value,isIndeterminate:w.value,handleSelect:()=>o(t).onSelect(l.value),handleToggle:()=>o(t).onToggle(l.value)})]),_:3},16,["as","as-child","aria-selected","aria-expanded","aria-level","data-indent","data-selected","data-expanded","onKeydown"])]),_:3},8,["value"]))}}),Ne={slots:{root:"relative lg:h-[450px] my-5 grid lg:grid-cols-3 border border-(--ui-border-muted) rounded-[calc(var(--ui-radius)*1.5)]",list:"isolate relative p-2 border-b lg:border-b-0 lg:border-e border-(--ui-border-muted) overflow-y-auto",item:"",listWithChildren:"ms-4.5 border-s border-(--ui-border)",itemWithChildren:"ps-1.5 -ms-px",link:"relative group peer w-full px-2.5 py-1.5 before:inset-y-px before:inset-x-0 flex items-center gap-1.5 text-sm before:absolute before:z-[-1] before:rounded-[calc(var(--ui-radius)*1.5)] focus:outline-none focus-visible:outline-none focus-visible:before:ring-inset focus-visible:before:ring-2",linkLeadingIcon:"size-4 shrink-0",linkLabel:"truncate",linkTrailing:"ms-auto inline-flex gap-1.5 items-center",linkTrailingIcon:"size-5 transform transition-transform duration-200 shrink-0 group-data-expanded:rotate-180",content:"overflow-hidden lg:col-span-2 flex flex-col [&>div]:my-0 [&>div]:flex-1 [&>div]:flex [&>div]:flex-col [&>div>div]:border-0 [&>div>pre]:border-b-0 [&>div>pre]:border-s-0 [&>div>pre]:border-e-0 [&>div>pre]:rounded-l-none [&>div>pre]:flex-1 [&>div]:overflow-y-auto"},variants:{active:{true:{link:"text-(--ui-text-highlighted) before:bg-(--ui-bg-elevated)"},false:{link:["hover:text-(--ui-text-highlighted) hover:before:bg-(--ui-bg-elevated)/50","transition-colors before:transition-colors"]}}}},We=Se;var se,oe;const Ue=ne({extend:ne(Ne),...((oe=(se=We.uiPro)==null?void 0:se.prose)==null?void 0:oe.codeTree)||{}}),ze=J({__name:"CodeTree",props:{defaultValue:{},class:{},ui:{}},setup(c){const u=c,e=he(),p=be(),[V,t]=Ie(),g=Ue(),x=M(u.defaultValue?{path:u.defaultValue}:void 0),d=M(),T=M(1),w=R(()=>{var a,i;return T.value,((i=(a=e.default)==null?void 0:a.call(e))==null?void 0:i.flatMap(I).filter(Boolean))||[]}),K=R(()=>A(w.value));function A(a){const i=new Map,l=[];a.forEach(s=>{const v=s.label.split("/");let m="";v.forEach((C,y)=>{var S,r;if(m=m?`${m}/${C}`:C,!i.has(m)){const f={label:C,path:m,...y<v.length-1&&{children:[]}};i.set(m,f),y===0?l.push(f):(r=(S=i.get(v.slice(0,y).join("/")))==null?void 0:S.children)==null||r.push(f)}})});const n=s=>s.sort((v,m)=>!!v.children==!!m.children?v.label.localeCompare(m.label):m.children?1:-1).map(v=>({...v,children:v.children&&n(v.children)}));return n(l)}function I(a,i){var l,n,s,v;return typeof a.type=="symbol"?(l=a.children)==null?void 0:l.map(I):{label:((n=a.props)==null?void 0:n.filename)||((s=a.props)==null?void 0:s.label)||`${i}`,icon:(v=a.props)==null?void 0:v.icon,component:a}}const D=R(()=>{var l;const a=(l=x.value)==null?void 0:l.path;if(!a)return[];const i=a.split("/");return i.map((n,s)=>i.slice(0,s+1).join("/"))});return ye(x,a=>{const i=w.value.find(l=>(a==null?void 0:a.path)===l.label);i!=null&&i.component&&(d.value=i)},{immediate:!0}),Ce(()=>T.value++),(a,i)=>{var n,s,v,m;const l=Ke;return B(),N(re,null,[$(o(V),null,{default:P(({items:C,level:y})=>[(B(!0),N(re,null,ke(C,(S,r)=>{var f,h;return B(),N("li",{key:`${y}-${r}`,class:_(y>0?o(g).itemWithChildren({class:(f=u.ui)==null?void 0:f.itemWithChildren}):o(g).item({class:(h=u.ui)==null?void 0:h.item}))},[$(o(Me),{"as-child":"",level:y,value:S},{default:P(({isExpanded:k,isSelected:b})=>{var E,L,O,z,F,X,Z,Q,ee,le;return[j("button",{class:_(o(g).link({class:(E=u.ui)==null?void 0:E.link,active:b}))},[(L=S.children)!=null&&L.length?(B(),U(l,{key:0,name:k?o(p).ui.icons.folderOpen:o(p).ui.icons.folder,class:_(o(g).linkLeadingIcon({class:(O=u.ui)==null?void 0:O.linkLeadingIcon}))},null,8,["name","class"])):(B(),U(Ae,{key:1,filename:S.label,class:_(o(g).linkLeadingIcon({class:(z=u.ui)==null?void 0:z.linkLeadingIcon}))},null,8,["filename","class"])),j("span",{class:_(o(g).linkLabel({class:(F=u.ui)==null?void 0:F.linkLabel}))}
1,Te(S.label),3),(X=S.children)!=null&&X.length?(B(),N("span",{key:2,class:_(o(g).linkTrailing({class:(Z=u.ui)==null?void 0:Z.linkTrailing}))},[$(l,{name:o(p).ui.icons.chevronDown,class:_(o(g).linkTrailingIcon({class:(Q=u.ui)==null?void 0:Q.linkTrailingIcon}))},null,8,["name","class"])],2)):ie("",!0)],2),(ee=S.children)!=null&&ee.length&&k?(B(),N("ul",{key:0,class:_(o(g).listWithChildren({class:(le=u.ui)==null?void 0:le.listWithChildren}))},[$(o(t),{items:S.children,level:y+1},null,8,["items","level"])],2)):ie("",!0)]}),_:2},1032,["level","value"])],2)}),128))]),_:1}),j("div",{class:_(o(g).root({class:[u.class,(n=u.ui)==null?void 0:n.root]}))},[$(o(Pe),{modelValue:x.value,"onUpdate:modelValue":i[0]||(i[0]=C=>x.value=C),class:_(o(g).list({class:(s=u.ui)==null?void 0:s.list})),items:K.value,"get-key":C=>C.path,"default-expanded":D.value},{default:P(()=>[$(o(t),{items:K.value,level:0},null,8,["items"])]),_:1},8,["modelValue","class","items","get-key","default-expanded"]),j("div",{class:_(o(g).content({class:(v=u.ui)==null?void 0:v.content}))}
1,[(B(),U(xe((m=d.value)==null?void 0:m.component)))],2)],2)],64)}}}),Qe=Object.assign(ze,{__name:"ProseCodeTree"});export{Qe as default};

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