1 line
7.2 KiB
JavaScript
1 line
7.2 KiB
JavaScript
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[465],{3610:(e,t,r)=>{function n(e,t,{checkForDefaultPrevented:r=!0}={}){return function(n){if(e?.(n),!1===r||!n.defaultPrevented)return t?.(n)}}r.d(t,{mK:()=>n}),"undefined"!=typeof window&&window.document&&window.document.createElement},1295:(e,t,r)=>{function n(e,t,r){if(!t.has(e))throw TypeError("attempted to "+r+" private field on non-instance");return t.get(e)}r.d(t,{N:()=>d});var l,o=r(2115),i=r(8166),u=r(8068),c=r(5155);function f(e){let t=function(e){let t=o.forwardRef((e,t)=>{let{children:r,...n}=e;if(o.isValidElement(r)){let e,l;let i=(e=Object.getOwnPropertyDescriptor(r.props,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning?r.ref:(e=Object.getOwnPropertyDescriptor(r,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning?r.props.ref:r.props.ref||r.ref,c=function(e,t){let r={...t};for(let n in t){let l=e[n],o=t[n];/^on[A-Z]/.test(n)?l&&o?r[n]=(...e)=>{let t=o(...e);return l(...e),t}:l&&(r[n]=l):"style"===n?r[n]={...l,...o}:"className"===n&&(r[n]=[l,o].filter(Boolean).join(" "))}return{...e,...r}}(n,r.props);return r.type!==o.Fragment&&(c.ref=t?(0,u.t)(t,i):i),o.cloneElement(r,c)}return o.Children.count(r)>1?o.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}(e),r=o.forwardRef((e,r)=>{let{children:n,...l}=e,i=o.Children.toArray(n),u=i.find(s);if(u){let e=u.props.children,n=i.map(t=>t!==u?t:o.Children.count(e)>1?o.Children.only(null):o.isValidElement(e)?e.props.children:null);return(0,c.jsx)(t,{...l,ref:r,children:o.isValidElement(e)?o.cloneElement(e,void 0,n):null})}return(0,c.jsx)(t,{...l,ref:r,children:n})});return r.displayName=`${e}.Slot`,r}var a=Symbol("radix.slottable");function s(e){return o.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===a}function d(e){let t=e+"CollectionProvider",[r,n]=(0,i.A)(t),[l,a]=r(t,{collectionRef:{current:null},itemMap:new Map}),s=e=>{let{scope:t,children:r}=e,n=o.useRef(null),i=o.useRef(new Map).current;return(0,c.jsx)(l,{scope:t,itemMap:i,collectionRef:n,children:r})};s.displayName=t;let d=e+"CollectionSlot",p=f(d),m=o.forwardRef((e,t)=>{let{scope:r,children:n}=e,l=a(d,r),o=(0,u.s)(t,l.collectionRef);return(0,c.jsx)(p,{ref:o,children:n})});m.displayName=d;let y=e+"CollectionItemSlot",h="data-radix-collection-item",v=f(y),w=o.forwardRef((e,t)=>{let{scope:r,children:n,...l}=e,i=o.useRef(null),f=(0,u.s)(t,i),s=a(y,r);return o.useEffect(()=>(s.itemMap.set(i,{ref:i,...l}),()=>void s.itemMap.delete(i))),(0,c.jsx)(v,{[h]:"",ref:f,children:n})});return w.displayName=y,[{Provider:s,Slot:m,ItemSlot:w},function(t){let r=a(e+"CollectionConsumer",t);return o.useCallback(()=>{let e=r.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll("[".concat(h,"]")));return Array.from(r.itemMap.values()).sort((e,r)=>t.indexOf(e.ref.current)-t.indexOf(r.ref.current))},[r.collectionRef,r.itemMap])},n]}},8166:(e,t,r)=>{r.d(t,{A:()=>o});var n=r(2115),l=r(5155);function o(e,t=[]){let r=[],i=()=>{let t=r.map(e=>n.createContext(e));return function(r){let l=r?.[e]||t;return n.useMemo(()=>({[`__scope${e}`]:{...r,[e]:l}}),[r,l])}};return i.scopeName=e,[function(t,o){let i=n.createContext(o),u=r.length;r=[...r,o];let c=t=>{let{scope:r,children:o,...c}=t,f=r?.[e]?.[u]||i,a=n.useMemo(()=>c,Object.values(c));return(0,l.jsx)(f.Provider,{value:a,children:o})};return c.displayName=t+"Provider",[c,function(r,l){let c=l?.[e]?.[u]||i,f=n.useContext(c);if(f)return f;if(void 0!==o)return o;throw Error(`\`${r}\` must be used within \`${t}\``)}]},function(...e){let t=e[0];if(1===e.length)return t;let r=()=>{let r=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let l=r.reduce((t,{useScope:r,scopeName:n})=>{let l=r(e)[`__scope${n}`];return{...t,...l}},{});return n.useMemo(()=>({[`__scope${t.scopeName}`]:l}),[l])}};return r.scopeName=t.scopeName,r}(i,...t)]}},4256:(e,t,r)=>{r.d(t,{jH:()=>o});var n=r(2115);r(5155);var l=n.createContext(void 0);function o(e){let t=n.useContext(l);return e||t||"ltr"}},9997:(e,t,r)=>{r.d(t,{sG:()=>f,hO:()=>a});var n=r(2115),l=r(7650),o=r(8068),i=r(5155),u=Symbol("radix.slottable");function c(e){return n.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===u}var f=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((e,t)=>{let r=function(e){let t=function(e){let t=n.forwardRef((e,t)=>{let{children:r,...l}=e;if(n.isValidElement(r)){let e,i;let u=(e=Object.getOwnPropertyDescriptor(r.props,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning?r.ref:(e=Object.getOwnPropertyDescriptor(r,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning?r.props.ref:r.props.ref||r.ref,c=function(e,t){let r={...t};for(let n in t){let l=e[n],o=t[n];/^on[A-Z]/.test(n)?l&&o?r[n]=(...e)=>{let t=o(...e);return l(...e),t}:l&&(r[n]=l):"style"===n?r[n]={...l,...o}:"className"===n&&(r[n]=[l,o].filter(Boolean).join(" "))}return{...e,...r}}(l,r.props);return r.type!==n.Fragment&&(c.ref=t?(0,o.t)(t,u):u),n.cloneElement(r,c)}return n.Children.count(r)>1?n.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}(e),r=n.forwardRef((e,r)=>{let{children:l,...o}=e,u=n.Children.toArray(l),f=u.find(c);if(f){let e=f.props.children,l=u.map(t=>t!==f?t:n.Children.count(e)>1?n.Children.only(null):n.isValidElement(e)?e.props.children:null);return(0,i.jsx)(t,{...o,ref:r,children:n.isValidElement(e)?n.cloneElement(e,void 0,l):null})}return(0,i.jsx)(t,{...o,ref:r,children:l})});return r.displayName=`${e}.Slot`,r}(`Primitive.${t}`),l=n.forwardRef((e,n)=>{let{asChild:l,...o}=e,u=l?r:t;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,i.jsx)(u,{...o,ref:n})});return l.displayName=`Primitive.${t}`,{...e,[t]:l}},{});function a(e,t){e&&l.flushSync(()=>e.dispatchEvent(t))}},1488:(e,t,r)=>{r.d(t,{i:()=>u});var n,l=r(2115),o=r(6611),i=(n||(n=r.t(l,2)))[" useInsertionEffect ".trim().toString()]||o.N;function u({prop:e,defaultProp:t,onChange:r=()=>{},caller:n}){let[o,u,c]=function({defaultProp:e,onChange:t}){let[r,n]=l.useState(e),o=l.useRef(r),u=l.useRef(t);return i(()=>{u.current=t},[t]),l.useEffect(()=>{o.current!==r&&(u.current?.(r),o.current=r)},[r,o]),[r,n,u]}({defaultProp:t,onChange:r}),f=void 0!==e,a=f?e:o;{let t=l.useRef(void 0!==e);l.useEffect(()=>{let e=t.current;if(e!==f){let t=f?"controlled":"uncontrolled";console.warn(`${n} is changing from ${e?"controlled":"uncontrolled"} to ${t}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`)}t.current=f},[f,n])}return[a,l.useCallback(t=>{if(f){let r="function"==typeof t?t(e):t;r!==e&&c.current?.(r)}else u(t)},[f,e,u,c])]}Symbol("RADIX:SYNC_STATE")},6611:(e,t,r)=>{r.d(t,{N:()=>l});var n=r(2115),l=globalThis?.document?n.useLayoutEffect:()=>{}},7510:(e,t,r)=>{r.d(t,{X:()=>o});var n=r(2115),l=r(6611);function o(e){let[t,r]=n.useState(void 0);return(0,l.N)(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});let t=new ResizeObserver(t=>{let n,l;if(!Array.isArray(t)||!t.length)return;let o=t[0];if("borderBoxSize"in o){let e=o.borderBoxSize,t=Array.isArray(e)?e[0]:e;n=t.inlineSize,l=t.blockSize}else n=e.offsetWidth,l=e.offsetHeight;r({width:n,height:l})});return t.observe(e,{box:"border-box"}),()=>t.unobserve(e)}r(void 0)},[e]),t}}}]); |