PageSourceSearch

https://www.sprind.org/_nuxt/anojo5w6.js

js sprind.org collected 2026-09-24 08:54:09 UTC 5,216 bytes, 1 lines download raw bytes

1import{C as w,x as I,J as A,E as k,F as x}from"./DrctnP21.js";import{b as R,a as E,C as O}from"./CafJ9pYE.js";import{h as s,k as m,s as M,e as g,c as _,w as y,j as b,u as o,X as D}from"./CdHCLhiy.js";import{u as T}from"./DG1FduNR.js";import{u as H}from"./xm30D9s3.js";import{i as K}from"./5T1fNdFK.js";import{u as j}from"./D-pctMGk.js";function F({type:t,defaultValue:l,modelValue:a}){const e=a||l;return a!==void 0||l!==void 0?Array.isArray(e)?"multiple":"single":t??"single"}function $({type:t,defaultValue:l,modelValue:a}){return t||F({type:t,defaultValue:l,modelValue:a})}function P({type:t,defaultValue:l}){return l!==void 0?l:t==="single"?void 0:[]}function J(t,l){const a=s(()=>$(t)),e=w(t,"modelValue",l,{defaultValue:P(t),passive:t.modelValue===void 0,deep:!0});function n(i){if(a.value==="single")e.value=I(i,e.value)?void 0:i;else{const d=Array.isArray(e.value)?[...e.value||[]]:[e.value].filter(Boolean);if(K(d,i)){const u=d.findIndex(p=>I(p,i));d.splice(u,1)}else d.push(i);e.value=d}}const r=s(()=>a.value==="single");return{modelValue:e,changeModelValue:n,isSingle:r}}const[q,N]=x("AccordionRoot");var X=m({__name:"AccordionRoot",props:{collapsible:{type:Boolean,required:!1,default:!1},disabled:{type:Boolean,required:!1,default:!1},dir:{type:String,required:!1},orientation:{type:String,required:!1,default:"vertical"},unmountOnHide:{type:Boolean,required:!1,default:!0},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},type:{type:String,required:!1},modelValue:{type:null,required:!1},defaultValue:{type:null,required:!1}},emits:["update:modelValue"],setup(t,{emit:l}){const a=t,e=l,{dir:n,disabled:r,unmountOnHide:i}=M(a),d=H(n),{modelValue:u,changeModelValue:p,isSingle:h}=J(a,e),{forwardRef:c,currentElement:f}=A();return N({disabled:r,direction:d,orientation:a.orientation,parentElement:f,isSingle:h,collapsible:a.collapsible,modelValue:u,changeModelValue:p,unmountOnHide:i}),(v,B)=>(g(),_(o(k),{ref:o(c),"as-child":v.asChild,as:v.as},{default:y(()=>[b(v.$slots,"default",{modelValue:o(u)})]),_:3},8,["as-child","as"]))}}),oe=X,C=(function(t){return t.Open="open",t.Closed="closed",t})(C||{});const[V,z]=x("AccordionItem");var G=m({__name:"AccordionItem",props:{disabled:{type:Boolean,required:!1},value:{type:String,required:!0},unmountOnHide:{type:Boolean,required:!1,default:void 0},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(t,{expose:l}){const a=t,e=q(),n=s(()=>e.isSingle.value?a.value===e.modelValue.value:Array.isArray(e.modelValue.value)&&e.modelValue.value.includes(a.value)),r=s(()=>e.disabled.value||a.disabled),i=s(()=>r.value?"":void 0),d=s(()=>n.value?C.Open:C.Closed);l({open:n,dataDisabled:i});const{currentRef:u,currentElement:p}=A();z({open:n,dataState:d,disabled:r,dataDisabled:i,triggerId:"",currentRef:u,currentElement:p,value:s(()=>a.value)});function h(c){const f=c.target;if(Array.from(e.parentElement.value?.querySelectorAll("[data-reka-collection-item]")??[]).findIndex(S=>S===f)===-1)return null;j(c,f,e.parentElement.value,{arrowKeyOptions:e.orientation,dir:e.direction.value,focus:!0})}return(c,f)=>(g(),_(o(R),{"data-orientation":o(e).orientation,"data-disabled":i.value,"data-state":d.value,disabled:r.value,open:n.value,as:a.as,"as-child":a.asChild,"unmount-on-hide":a.unmountOnHide??o(e).unmountOnHide.value,onKeydown:D(h,["up","down","left","right","home","end"])},{default:y(()=>[b(c.$slots,"default",{open:n.value})]),_:3},8,["data-orientation","data-disabled","data-state","disabled","open","as","as-child","unmount-on-hide"]))}}),le=G,L=m({__name:"AccordionContent",props:{forceMount:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(t){const l=t,a=q(),e=V();return A(),(n,r)=>(g(),_(o(E),{role:"region","as-child":l.asChild,as:n.as,"force-mount":l.forceMount,"aria-labelledby":o(e).triggerId,"data-state":o(e).dataState.value,"data-disabled":o(e).dataDisabled.value,"data-orientation":o(a).orientation,style:{"--reka-accordion-content-width":"var(--reka-collapsible-content-width)","--reka-accordion-content-height":"var(--reka-collapsible-content-height)"},onContentFound:r[0]||(r[0]=i=>o(a).changeModelValue(o(e).value.value))},{default:y(()=>[b(n.$slots,"default")]),_:3},8,["as-child","as","force-mount","aria-labelledby","data-state","data-disabled","data-orientation"]))}}),ne=L,Q=m({__name:"AccordionTrigger",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(t){const l=t,a=q(),e=V();e.triggerId||=T(void 0,"reka-accordion-trigger");function n(){const r=a.isSingle.value&&e.open.value&&!a.collapsible;e.disabled.value||r||a.changeModelValue(e.value.value)}return(r,i)=>(g(),_(o(O),{id:o(e).triggerId,ref:o(e).currentRef,"data-reka-collection-item":"",as:l.as,"as-child":l.asChild,"aria-disabled":o(e).disabled.value||void 0,"aria-expanded":o(e).open.value||!1,"data-disabled":o(e).dataDisabled.value,"data-orientation":o(a).orientation,"data-state":o(e).dataState.value,disabled:o(e).disabled.value,onClick:n},{default:y(()=>[b(r.$slots,"default")]),_:3},8,["id","as","as-child","aria-disabled","aria-expanded","data-disabled","data-orientation","data-state","disabled"]))}}),re=Q;export{le as A,V as a,re as b,ne as c,oe as d,q as i};

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.