PageSourceSearch

https://www.trebatfestivalen.no/assets/index-DjdUYHQf.js

js trebatfestivalen.no collected 2026-10-02 12:52:47 UTC 4,007 bytes, 9 lines download raw bytes

1import{a as n,p as $}from"./chunk-LFPYN7LY-DNG8Xu2Q.js";import{M as D,i as z,u as F,P as K,l as U,h as W,o as B}from"./LanguageSwitcher-DCoYFhuc.js";function L(e,r){if(typeof e=="function")return e(r);e!=null&&(e.current=r)}function G(...e){return r=>{let t=!1;const o=e.map(f=>{const u=L(f,r);return!t&&typeof u=="function"&&(t=!0),u});if(t)return()=>{for(let f=0;f<o.length;f++){const u=o[f];typeof u=="function"?u():L(e[f],null)}}}}function T(...e){return n.useCallback(G(...e),e)}class V extends n.Component{getSnapshotBeforeUpdate(r){const t=this.props.childRef.current;if(z(t)&&r.isPresent&&!this.props.isPresent&&this.props.pop!==!1){const o=t.offsetParent,f=z(o)&&o.offsetWidth||0,u=z(o)&&o.offsetHeight||0,a=getComputedStyle(t),s=this.props.sizeRef.current;s.height=parseFloat(a.height),s.width=parseFloat(a.width),s.top=t.offsetTop,s.left=t.offsetLeft,s.right=f-s.width-s.left,s.bottom=u-s.height-s.top}return null}componentDidUpdate(){}render(){return this.props.children}}function X({children:e,isPresent:r,anchorX:t,anchorY:o,root:f,pop:u}){var c;const a=n.useId(),s=n.useRef(null),E=n.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0}),{nonce:w}=n.useContext(D),l=((c=e.props)==null?void 0:c.ref)??(e==null?void 0:e.ref),y=T(s,l);return n.useInsertionEffect(()=>{const{width:p,height:d,top:x,left:g,right:b,bottom:v}=E.current;if(r||u===!1||!s.current||!p||!d)return;const S=t==="left"?`left: ${g}`:`right: ${b}`,m=o==="bottom"?`bottom: ${v}`:`top: ${x}`;s.current.dataset.motionPopId=a;const C=document.createElement("style");w&&(C.nonce=w);const R=f??document.head;return R.appendChild(C),C.sheet&&C.sheet.insertRule(`
2          [data-motion-pop-id="${a}"] {
3            position: absolute !important;
4            width: ${p}px !important;
5            height: ${d}px !important;
6            ${S}px !important;
7            ${m}px !important;
8          }
9        `),()=>{var P;(P=s.current)==null||P.removeAttribute("data-motion-pop-id"),R.contains(C)&&R.removeChild(C)}},[r]),$.jsx(V,{isPresent:r,childRef:s,sizeRef:E,pop:u,children:u===!1?e:n.cloneElement(e,{ref:y})})}const Y=({children:e,initial:r,isPresent:t,onExitComplete:o,custom:f,presenceAffectsLayout:u,mode:a,anchorX:s,anchorY:E,root:w})=>{const l=F(_),y=n.useId();let c=!0,p=n.useMemo(()=>(c=!1,{id:y,initial:r,isPresent:t,custom:f,onExitComplete:d=>{l.set(d,!0);for(const x of l.values())if(!x)return;o&&o()},register:d=>(l.set(d,!1),()=>l.delete(d))}),[t,l,o]);return u&&c&&(p={...p}),n.useMemo(()=>{l.forEach((d,x)=>l.set(x,!1))},[t]),n.useEffect(()=>{!t&&!l.size&&o&&o()},[t]),e=$.jsx(X,{pop:a==="popLayout",isPresent:t,anchorX:s,anchorY:E,root:w,children:e}),$.jsx(K.Provider,{value:p,children:e})};function _(){return new Map}const j=e=>e.key||"";function A(e){const r=[];return n.Children.forEach(e,t=>{n.isValidElement(t)&&r.push(t)}),r}const N=({children:e,custom:r,initial:t=!0,onExitComplete:o,presenceAffectsLayout:f=!0,mode:u="sync",propagate:a=!1,anchorX:s="left",anchorY:E="top",root:w})=>{const[l,y]=U(a),c=n.useMemo(()=>A(e),[e]),p=a&&!l?[]:c.map(j),d=n.useRef(!0),x=n.useRef(c),g=F(()=>new Map),b=n.useRef(new Set),[v,S]=n.useState(c),[m,C]=n.useState(c);W(()=>{d.current=!1,x.current=c;for(let h=0;h<m.length;h++){const i=j(m[h]);p.includes(i)?(g.delete(i),b.current.delete(i)):g.get(i)!==!0&&g.set(i,!1)}},[m,p.length,p.join("-")]);const R=[];if(c!==v){let h=[...c];for(let i=0;i<m.length;i++){const M=m[i],k=j(M);p.includes(k)||(h.splice(i,0,M),R.push(M))}return u==="wait"&&R.length&&(h=R),C(A(h)),S(c),null}const{forceRender:P}=n.useContext(B);return $.jsx($.Fragment,{children:m.map(h=>{const i=j(h),M=a&&!l?!1:c===m||p.includes(i),k=()=>{if(b.current.has(i))return;if(g.has(i))b.current.add(i),g.set(i,!0);else return;let I=!0;g.forEach(H=>{H||(I=!1)}),I&&(P==null||P(),C(x.current),a&&(y==null||y()),o&&o())};return $.jsx(Y,{isPresent:M,initial:!d.current||t?void 0:!1,custom:r,presenceAffectsLayout:f,mode:u,root:w,onExitComplete:M?void 0:k,anchorX:s,anchorY:E,children:h},i)})})};export{N as A};

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.