PageSourceSearch

https://shadcn-svelte.com/_app/immutable/chunks/BxnDnCW2.js

js shadcn-svelte.com collected 2026-09-24 10:33:46 UTC 7,002 bytes, 1 lines download raw bytes

1import{Aa as e,Na as t,Oa as n,Pa as r,Ua as i,Wa as a,_a as o,aa as s,ca as c,fa as l,ga as u,qa as d,ta as f,wa as p}from"./giuxF_U9.js";import"./HEzhq1Rx.js";var m=typeof window<`u`?window:void 0;typeof window<`u`&&window.document,typeof window<`u`&&window.navigator,typeof window<`u`&&window.location;function h(e){let t=e.activeElement;for(;t?.shadowRoot;){let e=t.shadowRoot.activeElement;if(e===t)break;t=e}return t}new class{#e;#t;constructor(e={}){let{window:t=m,document:n=t?.document}=e;t!==void 0&&(this.#e=n,this.#t=r(e=>{let n=f(t,`focusin`,e),r=f(t,`focusout`,e);return()=>{n(),r()}}))}get current(){return this.#t?.(),this.#e?h(this.#e):null}};function g(e){return typeof e==`function`}function _(e,t){if(g(e)){let n=e();return n===void 0?t:n}return e===void 0?t:e}var v=class{#e;#t;constructor(e){this.#e=e,this.#t=Symbol(e)}get key(){return this.#t}exists(){return a(this.#t)}get(){let e=i(this.#t);if(e===void 0)throw Error(`Context "${this.#e}" not found`);return e}getOr(e){let t=i(this.#t);return t===void 0?e:t}set(e){return d(this.#t,e)}};function y(r,i){let a=e(null),o=t(()=>_(i,250));function c(...e){if(s(a))s(a).timeout&&clearTimeout(s(a).timeout);else{let e,t,r=new Promise((n,r)=>{e=n,t=r});n(a,{timeout:null,runner:null,promise:r,resolve:e,reject:t},!0)}return s(a).runner=async()=>{if(!s(a))return;let t=s(a);n(a,null);try{t.resolve(await r.apply(this,e))}catch(e){t.reject(e)}},s(a).timeout=setTimeout(s(a).runner,s(o)),s(a).promise}return c.cancel=async()=>{(!s(a)||s(a).timeout===null)&&(await new Promise(e=>setTimeout(e,0)),!s(a)||s(a).timeout===null)||(clearTimeout(s(a).timeout),s(a).reject(`Cancelled`),n(a,null))},c.runScheduledNow=async()=>{(!s(a)||!s(a).timeout)&&(await new Promise(e=>setTimeout(e,0)),!s(a)||!s(a).timeout)||(clearTimeout(s(a).timeout),s(a).timeout=null,await s(a).runner?.())},Object.defineProperty(c,"pending",{enumerable:!0,get(){return!!s(a)?.timeout}}),c}function b(e,t){switch(e){case`post`:u(t);break;case`pre`:o(t);break}}function x(e,t,n,r={}){let{lazy:i=!1}=r,a=!i,o=Array.isArray(e)?[]:void 0;b(t,()=>{let t=Array.isArray(e)?e.map(e=>e()):e();if(!a){a=!0,o=t;return}let r=c(()=>n(t,o));return o=t,r})}function S(e,t,n){let r=l(()=>{let i=!1;x(e,t,(e,t)=>{if(i){r();return}let a=n(e,t);return i=!0,a},{lazy:!0})});u(()=>r)}function C(e,t,n){x(e,`post`,t,n)}function w(e,t,n){x(e,`pre`,t,n)}C.pre=w;function T(e,t){S(e,`post`,t)}function E(e,t){S(e,`pre`,t)}T.pre=E;function D(e,n,r={}){let{window:i=m}=r,a,o=t(()=>{let t=_(e);return new Set(t?Array.isArray(t)?t:[t]:[])}),c=l(()=>{u(()=>{if(!(!s(o).size||!i)){a=new i.MutationObserver(n);for(let e of s(o))a.observe(e,r);return()=>{a?.disconnect(),a=void 0}}})});return u(()=>c),{stop:c,takeRecords(){return a?.takeRecords()}}}function O(e){return g(e)?e():e}function k(e,t){switch(e){case`local`:return t.localStorage;case`session`:return t.sessionStorage}}function A(e,t,n,r,i,a){if(typeof e!=`object`||!e)return e;let o=Object.getPrototypeOf(e);if(o!==null&&o!==Object.prototype&&!Array.isArray(e))return e;let s=n.get(e);return s||(s=new Proxy(e,{get:(e,o)=>(r?.(),A(Reflect.get(e,o),t,n,r,i,a)),set:(e,n,r)=>(i?.(),Reflect.set(e,n,r),a(t),!0)}),n.set(e,s)),s}var j=class{#e;#t;#n;#r;#i;#a;#o=new WeakMap;#s;#c;#l;#u;#d;constructor(e,t,n={}){let{storage:r=`local`,serializer:i={serialize:JSON.stringify,deserialize:JSON.parse},syncTabs:a=!0,connected:o=!0}=n,s=`window`in n?n.window:m;if(this.#e=t,this.#t=e,this.#n=i,this.#s=o,this.#l=s,this.#u=a,this.#d=r,s===void 0)return;let c=k(r,s);this.#r=c;let l=c.getItem(e);l===null?o&&this.#m(t):this.#e=this.#p(l),this.#h()}get current(){this.#i?.();let e;if(this.#s){let t=this.#r?.getItem(this.#t);e=t?this.#p(t):this.#e}else e=this.#e;return A(e,e,this.#o,this.#i?.bind(this),this.#a?.bind(this),this.#m.bind(this))}set current(e){this.#m(e),this.#a?.()}#f=e=>{e.key!==this.#t||e.newValue===null||(this.#e=this.#p(e.newValue),this.#a?.())};#p(e){try{return this.#n.deserialize(e)}catch(t){console.error(`Error when parsing "${e}" from persisted store "${this.#t}"`,t);return}}#m(e){if(!this.#s){this.#e=e;return}try{e!==void 0&&this.#r?.setItem(this.#t,this.#n.serialize(e))}catch(e){console.error(`Error when writing value from persisted store "${this.#t}" to ${this.#r}`,e)}}#h(){!this.#l||!this.#s||(this.#i=r(e=>(this.#a=e,this.#c=this.#s&&this.#u&&this.#d===`local`?f(this.#l,`storage`,this.#f):void 0,()=>{this.#c?.(),this.#c=void 0,this.#a=void 0})))}#g(){this.#c?.(),this.#c=void 0,this.#i=void 0}get connected(){return this.#s}disconnect(){if(!this.#s)return;let e=this.#r?.getItem(this.#t);e&&(this.#e=this.#p(e)),this.#s=!1,this.#r?.removeItem(this.#t),this.#g()}connect(){this.#s||(this.#s=!0,this.#m(this.#e),this.#h())}};function M(e,t){let n,r=null;return(...i)=>new Promise(a=>{r&&r(void 0),r=a,clearTimeout(n),n=setTimeout(async()=>{let t=await e(...i);r&&=(r(t),null)},t)}
1)}function N(e,t){let n=0,r=null;return(...i)=>{let a=Date.now();return n&&a-n<t?r??Promise.resolve(void 0):(n=a,r=e(...i),r)}}function P(t,r,i={},a){let{lazy:o=!1,once:c=!1,initialValue:l,debounce:u,throttle:d}=i,f=e(p(l)),m=e(p(l===void 0&&!o)),h=e(void 0),g=e(p([])),_=()=>{s(g).forEach(e=>e()),n(g,[],!0)},v=e=>{n(g,[...s(g),e],!0)},y=async(e,t,i=!1)=>{try{n(m,!0),n(h,void 0),_();let a=new AbortController;v(()=>a.abort());let o=await r(e,t,{data:s(f),refetching:i,onCleanup:v,signal:a.signal});return n(f,o,!0),o}catch(e){e instanceof DOMException&&e.name===`AbortError`||n(h,e,!0);return}finally{n(m,!1)}},b=u?M(y,u):d?N(y,d):y,x=Array.isArray(t)?t:[t],S;return a((e,n)=>{c&&S||(S=e,b(Array.isArray(t)?e:e[0],Array.isArray(t)?n:n?.[0]))},{lazy:o}),{get current(){return s(f)},get loading(){return s(m)},get error(){return s(h)},mutate:e=>{n(f,e,!0)},refetch:e=>{let n=x.map(e=>e());return b(Array.isArray(t)?n:n[0],Array.isArray(t)?n:n[0],e??!0)}}}function F(e,t,n){return P(e,t,n,(t,n)=>{let r=Array.isArray(e)?e:[e];C(()=>r.map(e=>e()),(e,n)=>{t(e,n??[])},n)})}function I(e,t,n){return P(e,t,n,(t,n)=>{let r=Array.isArray(e)?e:[e];C.pre(()=>r.map(e=>e()),(e,n)=>{t(e,n??[])},n)})}F.pre=I;var L=class{#e=e(p([]));#t=!1;#n;#r=e(p([]));
1get log(){return s(this.#r)}set log(e){n(this.#r,e,!0)}#i=t(()=>this.log.length>1);get canUndo(){return s(this.#i)}set canUndo(e){n(this.#i,e)}#a=t(()=>s(this.#e).length>0);get canRedo(){return s(this.#a)}set canRedo(e){n(this.#a,e)}constructor(e,t,r){n(this.#e,[],!0),this.#n=t,this.undo=this.undo.bind(this),this.redo=this.redo.bind(this);let i=e=>{this.log.push(e);let t=O(r?.capacity);t&&this.log.length>t&&(this.log=this.log.slice(-t))};C(()=>O(e),e=>{if(this.#t){this.#t=!1;return}i({snapshot:e,timestamp:new Date().getTime()}),n(this.#e,[],!0)}),C(()=>O(r?.capacity),e=>{e&&(this.log=this.log.slice(-e))})}undo(){let[e,t]=this.log.slice(-2);!t||!e||(this.#t=!0,s(this.#e).push(t),this.log.pop(),this.#n(e.snapshot))}redo(){let e=s(this.#e).pop();e&&(this.#t=!0,this.log.push(e),this.#n(e.snapshot))}clear(){this.log=[],n(this.#e,[],!0)}};export{y as a,C as i,j as n,v as o,D as r,L as t};

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.