PageSourceSearch

https://www.prageru.com/vc-ap-a3b34c/_next/static/chunks/8720-7a7b…?dpl=dpl_Bj6soJemTP6zuvaYMbGKB3YRgnFq

js prageru.com collected 2026-09-24 08:48:39 UTC 47,137 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8720],{26585:(e,t,i)=>{i.d(t,{X:()=>l,k:()=>d});var n=i(83384),r=i(9561),s=i(59252),o=i(16632),a=i(86047),l=class extends o.k{#e;#t;#i;#n;#r;#s;#o;#a;constructor(e){super(),this.#a=!1,this.#o=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#r=e.client,this.#n=this.#r.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#t=c(this.options),this.state=e.state??this.#t,this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return this.#e}get promise(){return this.#s?.promise}setOptions(e){if(this.options={...this.#o,...e},e?._type&&(this.#e=e._type),this.updateGcTime(this.options.gcTime),this.state&&void 0===this.state.data){let e=c(this.options);void 0!==e.data&&(this.setState(h(e.data,e.dataUpdatedAt)),this.#t=e)}}optionalRemove(){this.observers.length||"idle"!==this.state.fetchStatus||this.#n.remove(this)}setData(e,t){let i=(0,n.pl)(this.state.data,e,this.options);return this.#l({data:i,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual}),i}setState(e){this.#l({type:"setState",state:e})}cancel(e){let t=this.#s?.promise;return this.#s?.cancel(e),t?t.then(n.lQ).catch(n.lQ):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#t}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(e=>!1!==(0,n.nU)(e.options.enabled,this))}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===n.hT||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0&&this.observers.some(e=>"static"===(0,n.d2)(e.options.staleTime,this))}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):void 0===this.state.data||this.state.isInvalidated}isStaleByTime(e=0){return void 0===this.state.data||"static"!==e&&(!!this.state.isInvalidated||!(0,n.j3)(this.state.dataUpdatedAt,e))}onFocus(){let e=this.observers.find(e=>e.shouldFetchOnWindowFocus());e?.refetch({cancelRefetch:!1}),this.#s?.continue()}onOnline(){let e=this.observers.find(e=>e.shouldFetchOnReconnect());e?.refetch({cancelRefetch:!1}),this.#s?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#s&&(this.#a||this.#d()?this.#s.cancel({revert:!0}):this.#s.cancelRetry()),this.scheduleGc()),this.#n.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}#d(){return"paused"===this.state.fetchStatus&&"pending"===this.state.status}invalidate(){this.state.isInvalidated||this.#l({type:"invalidate"})}async fetch(e,t){let i;if("idle"!==this.state.fetchStatus&&this.#s?.status()!=="rejected"){if(void 0!==this.state.data&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#s)return this.#s.continueRetry(),this.#s.promise}if(e&&this.setOptions(e),!this.options.queryFn){let e=this.observers.find(e=>e.options.queryFn);e&&this.setOptions(e.options)}let r=new AbortController,o=e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(this.#a=!0,r.signal)})},l=()=>{let e,i=(0,n.ZM)(this.options,t),r=(o(e={client:this.#r,queryKey:this.queryKey,meta:this.meta}),e);return(this.#a=!1,this.options.persister)?this.options.persister(i,r,this):i(r)},d=(o(i={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#r,state:this.state,fetchFn:l}),i),h="infinite"===this.#e?(0,a.PL)(this.options.pages):this.options.behavior;h?.onFetch(d,this),this.#i=this.state,("idle"===this.state.fetchStatus||this.state.fetchMeta!==d.fetchOptions?.meta)&&this.#l({type:"fetch",meta:d.fetchOptions?.meta}),this.#s=(0,s.II)({initialPromise:t?.initialPromise,fn:d.fetchFn,onCancel:e=>{e instanceof s.cc&&e.revert&&this.setState({...this.#i,fetchStatus:"idle"}),r.abort()},onFail:(e,t)=>{this.#l({type:"failed",failureCount:e,error:t})},onPause:()=>{this.#l({type:"pause"})},onContinue:()=>{this.#l({type:"continue"})},retry:d.options.retry,retryDelay:d.options.retryDelay,networkMode:d.options.networkMode,canRun:()=>!0});try{let e=await this.#s.start();if(void 0===e)throw Error(`${this.queryHash} data is undefined`);return this.setData(e),this.#n.config.onSuccess?.(e,this),this.#n.config.onSettled?.(e,this.state.error,this),e}catch(e){if(e instanceof s.cc){if(e.silent)return this.#s.promise;else if(e.revert){if(void 0===this.state.data)throw e;return this.state.data}}throw this.#l({type:"error",error:e}),this.#n.config.onError?.(e,this),this.#n.config.onSettled?.(this.state.data,e,this),e}finally{this.scheduleGc()}}#l(e){let t=t=>{switch(e.type){case"failed":return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...t,fetchStatus:"paused"};case"continue":return{...t,fetchStatus:"fetching"};case"fetch":return{...t,...d(t.data,this.options),fetchMeta:e.meta??null};case"success":let i={...t,...h(e.data,e.dataUpdatedAt),dataUpdateCount:t.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#i=e.manual?i:void 0,i;case"error":let n=e.error;
1return{...t,error:n,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:n,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...t,isInvalidated:!0};case"setState":return{...t,...e.state}}};this.state=t(this.state),r.jG.batch(()=>{this.observers.forEach(e=>{e.onQueryUpdate()}),this.#n.notify({query:this,type:"updated",action:e})})}};function d(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:(0,s.v_)(t.networkMode)?"fetching":"paused",...void 0===e&&{error:null,status:"pending"}}}function h(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function c(e){let t="function"==typeof e.initialData?e.initialData():e.initialData,i=void 0!==t,n=i?"function"==typeof e.initialDataUpdatedAt?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:i?n??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:i?"success":"pending",fetchStatus:"idle"}}},40323:(e,t,i)=>{i.d(t,{A:()=>n});let n=(0,i(30258).A)("mouse-pointer-click",[["path",{d:"M14 4.1 12 6",key:"ita8i4"}],["path",{d:"m5.1 8-2.9-.8",key:"1go3kf"}],["path",{d:"m6 12-1.9 2",key:"mnht97"}],["path",{d:"M7.2 2.2 8 5.1",key:"1cfko1"}],["path",{d:"M9.037 9.69a.498.498 0 0 1 .653-.653l11 4.5a.5.5 0 0 1-.074.949l-4.349 1.041a1 1 0 0 0-.74.739l-1.04 4.35a.5.5 0 0 1-.95.074z",key:"s0h3yz"}]])},69165:(e,t,i)=>{i.d(t,{A:()=>n});let n=(0,i(30258).A)("pen-line",[["path",{d:"M13 21h8",key:"1jsn5i"}],["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}]])},69830:(e,t,i)=>{let n;i.d(t,{d:()=>eE});var r=Object.create,s=Object.defineProperty,o=Object.getOwnPropertyDescriptor,a=Object.getOwnPropertyNames,l=Object.getPrototypeOf,d=Object.prototype.hasOwnProperty,h=(e,t)=>function(){return t||(0,e[a(e)[0]])((t={exports:{}}).exports,t),t.exports},c=h({"node_modules/penpal/lib/constants.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.DATA_CLONE_ERROR=e.MESSAGE=e.REJECTED=e.FULFILLED=e.REPLY=e.CALL=e.HANDSHAKE_REPLY=e.HANDSHAKE=void 0,e.HANDSHAKE="handshake",e.HANDSHAKE_REPLY="handshake-reply",e.CALL="call",e.REPLY="reply",e.FULFILLED="fulfilled",e.REJECTED="rejected",e.MESSAGE="message",e.DATA_CLONE_ERROR="DataCloneError"}}),u=h({"node_modules/penpal/lib/errorCodes.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ERR_NO_IFRAME_SRC=e.ERR_NOT_IN_IFRAME=e.ERR_CONNECTION_TIMEOUT=e.ERR_CONNECTION_DESTROYED=void 0,e.ERR_CONNECTION_DESTROYED="ConnectionDestroyed",e.ERR_CONNECTION_TIMEOUT="ConnectionTimeout",e.ERR_NOT_IN_IFRAME="NotInIframe",e.ERR_NO_IFRAME_SRC="NoIframeSrc"}}),p=h({"node_modules/penpal/lib/createDestructor.js"(e,t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default=()=>{let e=[],t=!1;return{destroy(){t=!0,e.forEach(e=>{e()})},onDestroy(i){t?i():e.push(i)}}},t.exports=e.default}}),f=h({"node_modules/penpal/lib/getOriginFromSrc.js"(e,t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i={"http:":"80","https:":"443"},n=/^(https?:)?\/\/([^/:]+)?(:(\d+))?/,r=["file:","data:"];e.default=e=>{let t,s,o;if(e&&r.find(t=>e.startsWith(t)))return"null";let a=document.location,l=n.exec(e);l?(t=l[1]?l[1]:a.protocol,s=l[2],o=l[4]):(t=a.protocol,s=a.hostname,o=a.port);let d=o&&o!==i[t]?`:${o}`:"";return`${t}//${s}${d}`},t.exports=e.default}}),m=h({"node_modules/penpal/lib/createLogger.js"(e,t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default=e=>function(){if(e){for(var t=arguments.length,i=Array(t),n=0;n<t;n++)i[n]=arguments[n];console.log("[Penpal]",...i)}},t.exports=e.default}}),g=h({"node_modules/penpal/lib/errorSerialization.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.deserializeError=e.serializeError=void 0,e.serializeError=e=>{let t=e.name;return{name:t,message:e.message,stack:e.stack}},e.deserializeError=e=>{let t=Error();return Object.keys(e).forEach(i=>
1t[i]=e[i]),t}}}),y=h({"node_modules/penpal/lib/connectCallReceiver.js"(e,t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=c(),n=g();e.default=(e,t,r)=>{let s=e.localName,o=e.local,a=e.remote,l=e.originForSending,d=e.originForReceiving,h=!1;r(`${s}: Connecting call receiver`);let c=e=>{if(e.source!==a||e.data.penpal!==i.CALL)return;if(e.origin!==d)return void r(`${s} received message from origin ${e.origin} which did not match expected origin ${d}`);let o=e.data,c=o.methodName,u=o.args,p=o.id;r(`${s}: Received ${c}() call`);let f=e=>t=>{if(r(`${s}: Sending ${c}() reply`),h)return void r(`${s}: Unable to send ${c}() reply due to destroyed connection`);let o={penpal:i.REPLY,id:p,resolution:e,returnValue:t};e===i.REJECTED&&t instanceof Error&&(o.returnValue=(0,n.serializeError)(t),o.returnValueIsError=!0);try{a.postMessage(o,l)}catch(e){throw e.name===i.DATA_CLONE_ERROR&&a.postMessage({penpal:i.REPLY,id:p,resolution:i.REJECTED,returnValue:(0,n.serializeError)(e),returnValueIsError:!0},l),e}};new Promise(e=>e(t[c].apply(t,u))).then(f(i.FULFILLED),f(i.REJECTED))};return o.addEventListener(i.MESSAGE,c),()=>{h=!0,o.removeEventListener(i.MESSAGE,c)}},t.exports=e.default}}),v=h({"node_modules/penpal/lib/generateId.js"(e,t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=0;e.default=()=>++i,t.exports=e.default}}),E=h({"node_modules/penpal/lib/connectCallSender.js"(e,t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i,n=c(),r=u(),s=(i=v())&&i.__esModule?i:{default:i},o=g();e.default=(e,t,i,a,l)=>{let d=t.localName,h=t.local,c=t.remote,u=t.originForSending,p=t.originForReceiving,f=!1;return l(`${d}: Connecting call sender`),i.reduce((e,t)=>(e[t]=function(){let e;for(var i=arguments.length,m=Array(i),g=0;g<i;g++)m[g]=arguments[g];l(`${d}: Sending ${t}() call`);try{c.closed&&(e=!0)}catch(t){e=!0}if(e&&a(),f){let e=Error(`Unable to send ${t}() call due to destroyed connection`);throw e.code=r.ERR_CONNECTION_DESTROYED,e}return new Promise((e,i)=>{let r=(0,s.default)(),a=s=>{if(s.source!==c||s.data.penpal!==n.REPLY||s.data.id!==r)return;if(s.origin!==p)return void l(`${d} received message from origin ${s.origin} which did not match expected origin ${p}`);l(`${d}: Received ${t}() reply`),h.removeEventListener(n.MESSAGE,a);let u=s.data.returnValue;s.data.returnValueIsError&&(u=(0,o.deserializeError)(u)),(s.data.resolution===n.FULFILLED?e:i)(u)};h.addEventListener(n.MESSAGE,a),c.postMessage({penpal:n.CALL,id:r,methodName:t,args:m},u)})},e),e),()=>{f=!0}},t.exports=e.default}}),b=h({"node_modules/penpal/lib/connectToChild.js"(e,t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=c(),n=u(),r=d(p()),s=d(f()),o=d(m()),a=d(y()),l=d(E());function d(e){return e&&e.__esModule?e:{default:e}}e.default=e=>{let t=e.iframe,d=e.methods,h=void 0===d?{}:d,c=e.childOrigin,u=e.timeout,p=e.debug,f=(0,o.default)(p),m=window,g=(0,r.default)(),y=g.destroy,v=g.onDestroy;if(!c){if(!t.src&&!t.srcdoc){let e=Error("Iframe must have src or srcdoc property defined.");throw e.code=n.ERR_NO_IFRAME_SRC,e}c=(0,s.default)(t.src)}let E="null"===c?"*":c;return{promise:new Promise((e,r)=>{let s,o,d;void 0!==u&&(s=setTimeout(()=>{let e=Error(`Connection to child timed out after ${u}ms`);e.code=n.ERR_CONNECTION_TIMEOUT,r(e),y()},u));let p={},g=n=>{let r=t.contentWindow;if(n.source!==r||n.data.penpal!==i.HANDSHAKE)return;if(n.origin!==c)return void f(`Parent received handshake from origin ${n.origin} which did not match expected origin ${c}`);f("Parent: Received handshake, sending reply"),n.source.postMessage({penpal:i.HANDSHAKE_REPLY,methodNames:Object.keys(h)},E);let u={localName:"Parent",local:m,remote:r,originForSending:E,originForReceiving:c};d&&d(),v(d=(0,a.default)(u,h,f)),o&&o.forEach(e=>{delete p[e]}),o=n.data.methodNames,v((0,l.default)(p,u,o,y,f)),clearTimeout(s),e(p)};m.addEventListener(i.MESSAGE,g),f("Parent: Awaiting handshake");var b=setInterval(()=>{document.contains(t)||(clearInterval(b),y())},6e4);v(()=>{m.removeEventListener(i.MESSAGE,g),clearInterval(b);let e=Error("Connection destroyed");e.code=n.ERR_CONNECTION_DESTROYED,r(e)})}),destroy:y}},t.exports=e.default}}),w=h({"node_modules/penpal/lib/connectToParent.js"(e,t){Object.defineProperty(e,"__esMo
1dule",{value:!0}),e.default=void 0;var i=c(),n=u(),r=l(p()),s=l(y()),o=l(E()),a=l(m());function l(e){return e&&e.__esModule?e:{default:e}}e.default=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.parentOrigin,l=void 0===t?"*":t,d=e.methods,h=void 0===d?{}:d,c=e.timeout,u=e.debug,p=(0,a.default)(u);if(window===window.top){let e=Error("connectToParent() must be called within an iframe");throw e.code=n.ERR_NOT_IN_IFRAME,e}let f=(0,r.default)(),m=f.destroy,g=f.onDestroy,y=window,v=y.parent;return{promise:new Promise((e,t)=>{let r;void 0!==c&&(r=setTimeout(()=>{let e=Error(`Connection to parent timed out after ${c}ms`);e.code=n.ERR_CONNECTION_TIMEOUT,t(e),m()},c));let a=t=>{try{clearTimeout()}catch(e){return}if(t.source!==v||t.data.penpal!==i.HANDSHAKE_REPLY)return;if("*"!==l&&l!==t.origin)return void p(`Child received handshake reply from origin ${t.origin} which did not match expected origin ${l}`);p("Child: Received handshake reply"),y.removeEventListener(i.MESSAGE,a);let n={localName:"Child",local:y,remote:v,originForSending:"null"===t.origin?"*":t.origin,originForReceiving:t.origin},d={};g((0,s.default)(n,h,p)),g((0,o.default)(d,n,t.data.methodNames,m,p)),clearTimeout(r),e(d)};y.addEventListener(i.MESSAGE,a),g(()=>{y.removeEventListener(i.MESSAGE,a);let e=Error("Connection destroyed");e.code=n.ERR_CONNECTION_DESTROYED,t(e)}),p("Child: Sending handshake"),v.postMessage({penpal:i.HANDSHAKE,methodNames:Object.keys(h)},l)}),destroy:m}},t.exports=e.default}}),C=h({"node_modules/penpal/lib/index.js"(e,t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=s(b()),n=s(w()),r=u();function s(e){return e&&e.__esModule?e:{default:e}}e.default={ERR_CONNECTION_DESTROYED:r.ERR_CONNECTION_DESTROYED,ERR_CONNECTION_TIMEOUT:r.ERR_CONNECTION_TIMEOUT,ERR_NOT_IN_IFRAME:r.ERR_NOT_IN_IFRAME,ERR_NO_IFRAME_SRC:r.ERR_NO_IFRAME_SRC,connectToChild:i.default,connectToParent:n.default},t.exports=e.default}}),A=e=>"object"==typeof e&&null!=e&&1===e.nodeType,S=(e,t)=>(!t||"hidden"!==e)&&"visible"!==e&&"clip"!==e,T=(e,t)=>{if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){let i,n=getComputedStyle(e,null);return S(n.overflowY,t)||S(n.overflowX,t)||!!(i=(e=>{if(!e.ownerDocument||!e.ownerDocument.defaultView)return null;try{return e.ownerDocument.defaultView.frameElement}catch(e){return null}})(e))&&(i.clientHeight<e.scrollHeight||i.clientWidth<e.scrollWidth)}return!1},O=(e,t,i,n,r,s,o,a)=>s<e&&o>t||s>e&&o<t?0:s<=e&&a<=i||o>=t&&a>=i?s-e-n:o>t&&a<i||s<e&&a>i?o-t+r:0,P=e=>{let t=e.parentElement;return null==t?e.getRootNode().host||null:t};function R(e){let t="u">typeof Document?Document:void 0,i="u">typeof document?document:void 0;if(t&&e instanceof t)return e;let n=e.ownerDocument??i??null;if(!n)throw Error("Unable to resolve document");return n}function M(e){let t=new URL(e,"http://example.com");return t.pathname+t.search+t.hash}function k(e){return"u">typeof PointerEvent?e instanceof PointerEvent:"string"==typeof e.pointerType&&"mouse"===e.pointerType}function _(e){return"u">typeof MouseEvent?e instanceof MouseEvent:"number"==typeof e.button}function I(e){return"u">typeof KeyboardEvent?e instanceof KeyboardEvent:"string"==typeof e.key}function N(e){return e.defaultView??("u">typeof window?window:null)}function L(e){let t=e.activeElement;if(!t)return!1;let i=t.tagName;return"INPUT"===i||"TEXTAREA"===i||"SELECT"===i||t.isContentEditable}function D(e){return new Promise(t=>setTimeout(t,e))}function x(e,t){return new Promise((i,n)=>{if(e<=0)return void(t.aborted?n(Error("Animation cancelled")):i());let r=()=>{clearTimeout(s),t.removeEventListener("abort",r),n(Error("Animation cancelled"))},s=setTimeout(()=>{t.removeEventListener("abort",r),i()},e);t.addEventListener("abort",r)})}async function F(){return new Promise(e=>requestAnimationFrame(()=>{requestAnimationFrame(e)}))}function j(e){let t=R(e),i=e.getBoundingClientRect(),n=N(t);if(!n)return!1;let r=n.innerHeight||t.documentElement.clientHeight,s=n.innerWidth||t.documentElement.clientWidth;return i.top<r&&i.bottom>0&&i.left<s&&i.right>0}function U(e,t){let i=((e,t)=>{var i,n,r,s;let o;if("u"<typeof document)return[];
1let{scrollMode:a,block:l,inline:d,boundary:h,skipOverflowHiddenElements:c}=t,u="function"==typeof h?h:e=>e!==h;if(!A(e))throw TypeError("Invalid target");let p=document.scrollingElement||document.documentElement,f=[],m=e;for(;A(m)&&u(m);){if((m=P(m))===p){f.push(m);break}null!=m&&m===document.body&&T(m)&&!T(document.documentElement)||null!=m&&T(m,c)&&f.push(m)}let g=null!=(n=null==(i=window.visualViewport)?void 0:i.width)?n:innerWidth,y=null!=(s=null==(r=window.visualViewport)?void 0:r.height)?s:innerHeight,{scrollX:v,scrollY:E}=window,{height:b,width:w,top:C,right:S,bottom:R,left:M}=e.getBoundingClientRect(),{top:k,right:_,bottom:I,left:N}={top:parseFloat((o=window.getComputedStyle(e)).scrollMarginTop)||0,right:parseFloat(o.scrollMarginRight)||0,bottom:parseFloat(o.scrollMarginBottom)||0,left:parseFloat(o.scrollMarginLeft)||0},L="start"===l||"nearest"===l?C-k:"end"===l?R+I:C+b/2-k+I,D="center"===d?M+w/2-N+_:"end"===d?S+_:M-N,x=[];for(let e=0;e<f.length;e++){let t=f[e],{height:i,width:n,top:r,right:s,bottom:o,left:h}=t.getBoundingClientRect();if("if-needed"===a&&C>=0&&M>=0&&R<=y&&S<=g&&(t===p&&!T(t)||C>=r&&R<=o&&M>=h&&S<=s))break;let c=getComputedStyle(t),u=parseInt(c.borderLeftWidth,10),m=parseInt(c.borderTopWidth,10),A=parseInt(c.borderRightWidth,10),P=parseInt(c.borderBottomWidth,10),k=0,_=0,I="offsetWidth"in t?t.offsetWidth-t.clientWidth-u-A:0,N="offsetHeight"in t?t.offsetHeight-t.clientHeight-m-P:0,F="offsetWidth"in t?0===t.offsetWidth?0:n/t.offsetWidth:0,j="offsetHeight"in t?0===t.offsetHeight?0:i/t.offsetHeight:0;if(p===t)k="start"===l?L:"end"===l?L-y:"nearest"===l?O(E,E+y,y,m,P,E+L,E+L+b,b):L-y/2,_="start"===d?D:"center"===d?D-g/2:"end"===d?D-g:O(v,v+g,g,u,A,v+D,v+D+w,w),k=Math.max(0,k+E),_=Math.max(0,_+v);else{k="start"===l?L-r-m:"end"===l?L-o+P+N:"nearest"===l?O(r,o,i,m,P+N,L,L+b,b):L-(r+i/2)+N/2,_="start"===d?D-h-u:"center"===d?D-(h+n/2)+I/2:"end"===d?D-s+A+I:O(h,s,n,u,A+I,D,D+w,w);let{scrollLeft:e,scrollTop:a}=t;k=0===j?0:Math.max(0,Math.min(a+k/j,t.scrollHeight-i/j+N)),_=0===F?0:Math.max(0,Math.min(e+_/F,t.scrollWidth-n/F+I)),L+=a-k,D+=e-_}x.push({el:t,top:k,left:_})}return x})(e,t),n=0;for(let e of i){let t=e.el,i=Math.abs(e.top-t.scrollTop);n+=Math.abs(e.left-t.scrollLeft)+i}return n}async function $(e,t){if(e.some(j))return;let i=null,n=1/0;for(let t of e){let e=U(t,{scrollMode:"if-needed",block:"center",inline:"nearest"});e<n&&W(t)&&(n=e,i=t)}i&&(i.scrollIntoView({behavior:"smooth",block:"center"}),await H(i,t))}function W(e){if(!e)return!1;let t=window.getComputedStyle(e);return"none"!==t.display&&"hidden"!==t.visibility&&"0"!==t.opacity&&(0!==e.offsetWidth||0!==e.offsetHeight)&&function e(t){if(!t)return!0;let i=window.getComputedStyle(t);return"none"!==i.display&&"hidden"!==i.visibility&&"0"!==i.opacity&&e(t.parentElement)}(e.parentElement)}async function H(e,t){N(R(e))?(await new Promise((i,n)=>{let r;if(t.aborted)return void n(new DOMException("Aborted","AbortError"));let s=()=>{if(t.aborted){cancelAnimationFrame(r),n(new DOMException("Aborted","AbortError"));return}1>Math.abs(U(e,{scrollMode:"if-needed",block:"center",inline:"nearest"}))?i():r=requestAnimationFrame(s)};r=requestAnimationFrame(s)}),await x(100,t)):await x(500,t)}var q=((e,t,i)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let n of a(t))d.call(e,n)||void 0===n||s(e,n,{get:()=>t[n],enumerable:!(i=o(t,n))||i.enumerable});return e})(s(null!=(n=C())?r(l(n)):{},"default",{value:n,enumerable:!0}),n);function z(e,t){let i=e.match(t);return i&&i.groups?{environment:i.groups.environment||"__PRIMARY__",itemTypeId:i.groups.item_type_id,itemId:i.groups.item_id,fieldPath:i.groups.field_path}:null}function K(e){let t=Math.round(100*function(e){let t=0,i=.5,n=0;for(;i-t>.001;){let r=(t+i)/2,[s,o,a]=function(e,t){let i=Math.min(t,1-t),n=n=>{let r=(n+e/30)%12;return t-i*Math.max(-1,Math.min(r-3,Math.min(9-r,1)))};return[Math.round(255*n(0)),Math.round(255*n(8)),Math.round(255*n(4))]}(e,r);1.05/(function(e,t,i){let n=e=>e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4);return .2126*n(e/255)+.7152*n(t/255)+.0722*n(i/255)}(s,o,a)+.05)>=3.5?(n=r,t=r+.001):i=r-.001}return n}(e));return{borderColor:`hsl(${e}, 100%, ${t}%)`,backgroundColor:`hsla(${e}, 100%, ${t}%, 0.15)`}}function G(e){let t=null,i=null,n=()=>{t=null,i&&(e(...i),i=null)},r=(...e)=>{i=e,null==t&&(t=window.requestAnimationFrame(n))};return r.cancel=()=>{null!=t&&(window.cancelAnimationFrame(t),t=null),i=null},r}var V=class{constructor(e){this.doc=e,this.callbacks=new Set,this.running=!1,this.rafHandler=G(()=>{for(let e of Array.from(this.callbacks))try{e()}catch(e){}}),this.onEvent=()=>{this.rafHandler()}}startIfNeeded(){if(this.running)return;let e=N(this.doc);e&&(e.addEventListener("scroll",this.onEvent,{passive:!0,capture:!0}),e.addEventListener("resize",this.onEvent,{passive:!0,capture:!0})),this.doc.addEventListener("scroll",this.onEvent,{passive:!0,capture:!0}),this.running=!0}stopIfIdle(){if(!this.running||this.callbacks.size>0)return;let e=N(this.doc);e&&(e.removeEventListener("scroll",this.onEvent),e.removeEventListener("resize",this.onEvent)),this.doc.removeEventListener("scroll",this.onEvent),this.running=!1,this.rafHandler.cancel()}subscribe(e){return this.callbacks.add(e),this.startIfNeeded(),()=>{this.callbacks.delete(e),this.stopIfIdle()}}}
1,Y=new WeakMap,B=class{constructor(e){this.window=e,this.observer=null,this.callbacks=new WeakMap;const t=function(e){return e&&"ResizeObserver"in e?e.ResizeObserver:"u">typeof ResizeObserver?ResizeObserver:void 0}(this.window);t&&(this.observer=new t(e=>{for(let t of e){let e=this.callbacks.get(t.target);if(e)for(let t of e)t()}}))}observe(e,t){if(!this.observer)return()=>{};let i=this.callbacks.get(e);return i||(i=new Set,this.callbacks.set(e,i),this.observer.observe(e)),i.add(t),()=>{let i=this.callbacks.get(e);i&&(i.delete(t),0===i.size&&(this.callbacks.delete(e),this.observer?.unobserve(e)))}}},J=new WeakMap,Q=class{constructor(e,t={}){this.targetElement=e,this.resizeUnobserve=null,this.scrollResizeUnsubscribe=null,this.pendingAnimationAbortController=null,this.onDispose=t.onDispose,this.showLabel=t.showLabel??!1,this.overlayColors=t.overlayColors??K(17),this.overlayElement=this.createOverlayElement(this.showLabel),document.body.appendChild(this.overlayElement);const i=function(e){let t=Y.get(e);return t||(t=new V(e),Y.set(e,t)),t}(this.document);this.scrollResizeUnsubscribe=i.subscribe(()=>{this.updatePosition()});const n=function(e){if(!e)return null;let t=J.get(e);return t||(t=new B(e),J.set(e,t)),t}(this.window);n&&(this.resizeUnobserve=n.observe(e,()=>{this.updatePosition()}))}show(){this.updatePosition()}get document(){return R(this.targetElement)}get window(){return N(this.document)}dispose(){this.onDispose?.(),this.scrollResizeUnsubscribe?.(),this.resizeUnobserve?.(),this.overlayElement.remove()}cancelPendingAnimation(){this.pendingAnimationAbortController?.abort()}async fadeIn(e=0,t){this.cancelPendingAnimation(),this.pendingAnimationAbortController=t||new AbortController;let{signal:i}=this.pendingAnimationAbortController;try{this.overlayElement.style.opacity="0",await F(),await x(e,i),this.overlayElement.style.opacity="1"}catch(e){}}async disposeWithFadeOut(e=0,t){this.cancelPendingAnimation(),this.pendingAnimationAbortController=t||new AbortController;let{signal:i}=this.pendingAnimationAbortController;try{await x(e,i),this.overlayElement.style.opacity="0",await x(250,i)}catch(e){}finally{this.dispose()}}createOverlayElement(e){let t=this.document.createElement("div");if(t.style.position="fixed",t.style.top="0",t.style.left="0",t.style.width="0",t.style.height="0",t.style.border=`2px solid ${this.overlayColors.borderColor}`,t.style.borderRadius=e?"6px 0 6px 6px":"6px",t.style.background=this.overlayColors.backgroundColor,t.style.boxSizing="border-box",t.style.pointerEvents="none",t.style.zIndex="2147483646",t.style.display="block",t.style.opacity="1",t.style.transition="opacity 200ms ease-in-out",t.setAttribute("aria-hidden","true"),e){let e=this.document.createElement("div");e.textContent="Open in DatoCMS ↗",e.style.position="absolute",e.style.bottom="100%",e.style.right="-2px",e.style.backgroundColor=this.overlayColors.borderColor,e.style.color="white",e.style.padding="4px 12px",e.style.borderRadius="6px 6px 0 0",e.style.fontSize="13px",e.style.fontWeight="600",e.style.fontFamily="system-ui, -apple-system, sans-serif",e.style.whiteSpace="nowrap",e.style.setProperty("-webkit-font-smoothing","antialiased"),e.style.letterSpacing="normal",e.style.lineHeight="normal",e.style.textTransform="none",e.style.fontStyle="normal",e.setAttribute("aria-hidden","true"),t.appendChild(e)}return t}updatePosition(){let e=function(e){if("function"!=typeof e.getBoundingClientRect)return null;let t=e.getBoundingClientRect();return(0!==t.width||0!==t.height)&&W(e)?{top:t.top,left:t.left,width:t.width,height:t.height}:null}(this.targetElement);if(this.overlayElement.style.zIndex=this.computeOverlayZIndex(this.targetElement),!e){this.overlayElement.style.display="none";return}if(this.overlayElement.style.display="block",this.overlayElement.style.top=`${e.top-8}px`,this.overlayElement.style.left=`${e.left-8}px`,this.overlayElement.style.width=`${e.width+16}px`,this.overlayElement.style.height=`${e.height+16}px`,this.showLabel){let t=this.overlayElement.firstElementChild;t&&(e.width+16<150?(t.style.bottom="calc(100% + 10px)",t.style.right="auto",t.style.left="50%",t.style.transform="translateX(-50%)",t.style.borderRadius="6px",this.overlayElement.style.borderRadius="6px"):(t.style.bottom="100%",t.style.right="-2px",t.style.left="auto",t.style.transform="none",t.style.borderRadius="6px 6px 0 0",this.overlayElement.style.borderRadius="6px 0 6px 6px"))}}computeOverlayZIndex(e){if(!this.window)return"0";let t=e,i=null;for(;t&&t instanceof this.window.Element;){let e=this.window.getComputedStyle(t).zIndex;if("auto"!==e){let t=Number(e);Number.isFinite(t)&&(i=t)}t=t.parentElement}return null!==i?String(i):"0"}},X="data-datocms-auto-content-link-url",Z="data-datocms-content-link-url",ee="data-datocms-content-link-group",et="data-datocms-content-link-source",ei=`[${Z}], [${X}]`;function en(e){if(!e||!(e instanceof Element))return null;let t=e.closest(ei);if(!t)return null;let i=t.getAttribute(Z)||t.getAttribute(X);return i?{element:t,editUrl:i}:null}var er=class{constructor(e,t,i=()=>!1,n){this.document=e,this.onEditClick=t,this.shouldShowLabel=i,this.overlayColors=n,this.highlightOverlay=null,this.listenerAbortController=null,this.throttledOnPointerMove=G(e=>this.immediateOnPointerMoveEvent(e))}isActive(){return!!this.listenerAbortController}activate(){if(this.isActive())return;this.listenerAbortController=new AbortController;let e={capture:!0,signal:this.listenerAbortController.signal};this.document.addEventListener("pointerover",this.throttledOnPointerMove,e),this.document.addEventListener("pointermove",this.throttledOnPointerMove,e),this.document.addEventListener("pointerleave",e=>this.onPointerLeave(e),e),this.document.addEventListener("click",e=>this.onClick(e),e),this.document.addEventListener("focusin",e=>this.onFocusIn(e),e),this.document.addEventListener("focusout",()=>this.onFocusOut(),e),this.document.addEventListener("keydown",e=>this.onKeyDown(e),e)}immediateOnPointerMoveEvent(e){if(!k(e))return;let t=en(e.target);this.highlightElement(t?.element)}onPointerLeave(e){!k(e)||en(e.relatedTarget)||this.highlightElement(null)}onFocusIn(e){let t=en(e.target);this.highlightElement(t?.element)}onKeyDown(e){if(!I(e)||"Enter"!==e.key&&" "!==e.key&&"Spacebar"!==e.key)return;let t=en(this.document.activeElement);t&&(this.highlightElement(t.element),e.preventDefault(),e.stopPropagation(),this.onEditClick(t.editUrl))}onClick(e){if(!_(e)||0!==e.button)return;let t=en(e.target);t&&(this.highlightElement(t.element),e.preventDefault(),e.stopPropagation(),this.onEditClick(t.editUrl))}onFocusOut(){this.highlightElement(null)}highlightElement(e){let t=e&&!e.isConnected?null:e;if((!this.highlightOverlay||this.highlightOverlay.targetElement!==t)&&(this.highlightOverlay&&(this.highlightOverlay.dispose(),this.highlightOverlay=null),t)){let e=t.style.cursor;t.style.cursor="pointer",this.highlightOverlay=new Q(t,{onDispose:()=>{t.style.cursor=e},showLabel:this.shouldShowLabel(),overlayColors:this.overlayColors}),this.highlightOverlay.show()}}deactivate(){this.isActive()&&(this.listenerAbortController.abort(),this.listenerAbortController=null,this.throttledOnPointerMove.cancel(),this.highlightOverlay?.dispose(),this.highlightOverlay=null)}},es={0:8203,1:8204,2:8205,3:8290,4:8291,5:8288,6:65279,7:8289,8:119155,9:119156,a:119157,b:119158,c:119159,d:119160,e:119161,f:119162},eo={0:8203,1:8204,2:8205,3:65279},ea=[,,,,].fill(String.fromCodePoint(eo[0])).join(""),el=Object.fromEntries(Object.entries(eo).map(e=>e.reverse())),ed=Object.fromEntries(Object.entries(es).map(e=>e.reverse())),eh=`${Object.values(es).map(e=>`\\u{${e.toString(16)}}`).join("")}`,ec=RegExp(`[${eh}]{4,}`,"gu"),eu=class{constructor(e,t,i=!1,n=!1){this.root=e,this.onStamp=t,this.stripStega=i,this.silenceWarnings=n,this.pendingElementsToStamp=new Set,this.scheduleStamping=function(e){let t=!1,i="function"==typeof queueMicrotask?queueMicrotask:e=>Promise.resolve().then(e);return()=>{t||(t=!0,i(()=>{t=!1,e()}))}}(()=>this.instantStampPendingElements()),this.observer=new MutationObserver(e=>this.handleMutations(e)),this.observer.observe(this.root,{subtree:!0,childList:!0,characterData:!0,attributes:!0,attributeFilter:["alt",et]}),this.instantStampPendingElements(!0)}dispose(){for(let e of(this.observer.disconnect(),this.pendingElementsToStamp.clear(),this.root.querySelectorAll(`[${X}]`)))e.removeAttribute(X)}handleMutations(e){let t=!1;
1for(let i of e)if("characterData"===i.type){let e=i.target,n=e.parentElement??e.parentNode??this.root;this.pendingElementsToStamp.add(n),t=!0}else if("attributes"===i.type&&"alt"===i.attributeName){let e=i.target;this.pendingElementsToStamp.add(e.parentElement??this.root),t=!0}else if("attributes"===i.type&&i.attributeName===et){let e=i.target;this.pendingElementsToStamp.add(e.parentElement??this.root),t=!0}else if("childList"===i.type){for(let e of(this.pendingElementsToStamp.add(i.target),i.addedNodes))(e.nodeType===Node.ELEMENT_NODE||e.nodeType===Node.DOCUMENT_FRAGMENT_NODE)&&this.pendingElementsToStamp.add(e);t=!0}t&&this.scheduleStamping()}instantStampPendingElements(e=!1){let t=0===this.pendingElementsToStamp.size?[this.root]:Array.from(this.pendingElementsToStamp);this.pendingElementsToStamp.clear();let i=[];for(let e of t){let t=this.stampElement(e);i.push(t)}let n=1===i.length?i[0]:{appliedStamps:i.reduce((e,t)=>{for(let[i,n]of t.appliedStamps.entries())e.set(i,n);return e},new Map),scope:this.root};!this.silenceWarnings&&e&&0===n.appliedStamps.size&&console.warn("[@datocms/content-link] No editable elements were detected after initialization. Make sure that Content Link headers are enabled in your GraphQL requests! If you're hydrating/streaming, do not replace the server-rendered nodes that carry stega-encoded data: reuse the same DOM element!"),0!==i.length&&this.onStamp(n)}stampElement(e){let t=R(e);if(!t)return{appliedStamps:new Map,scope:e};let i=new Map,n=t.createTreeWalker(e,NodeFilter.SHOW_TEXT),r=n.nextNode();for(;r;){if(!(r instanceof Text)){r=n.nextNode();continue}let e=r.nodeValue??"",t=r.parentElement;if(t&&this.isInsideExcludedTag(t)){r=n.nextNode();continue}let s=this.addStampingAttributesTargetAndReturnStrippedValue(e,t,i);this.stripStega&&void 0!==s&&(r.nodeValue=s),r=n.nextNode()}for(let t of e.querySelectorAll("img[alt]")){let e=t.getAttribute("alt"),n=this.addStampingAttributesTargetAndReturnStrippedValue(e,t,i);this.stripStega&&void 0!==n&&t.setAttribute("alt",n)}for(let t of e.querySelectorAll(`[${et}]`)){let e=t.getAttribute(et);this.addStampingAttributesTargetAndReturnStrippedValue(e,t,i),this.stripStega&&t.removeAttribute(et)}return{appliedStamps:i,scope:e}}addStampingAttributesTargetAndReturnStrippedValue(e,t,i){let n,r;if(!e||!t)return;try{var s,o;if(!(n={cleaned:e.replace(ec,""),encoded:(null==(s=e.match(ec))?void 0:s[0])||""}).encoded||(o=r=function(e){let t=e.match(ec);if(t)return function(e,t=!1){let i=Array.from(e);if(i.length%2==0){if(i.length%4||!e.startsWith(ea))return function(e,t){var i;let n=[];for(let t=.5*e.length;t--;){let i=`${ed[e[2*t].codePointAt(0)]}${ed[e[2*t+1].codePointAt(0)]}`;n.unshift(String.fromCharCode(parseInt(i,16)))}let r=[],s=[n.join("")],o=10;for(;s.length;){let e=s.shift();try{if(r.push(JSON.parse(e)),t)break}catch(n){if(!o--)throw n;let t=+(null==(i=n.message.match(/\sposition\s(\d+)$/))?void 0:i[1]);if(!t)throw n;s.unshift(e.substring(0,t),e.substring(t))}}return r}(i,t)}else throw Error("Encoded data has invalid length");let n=[];for(let e=.25*i.length;e--;){let t=i.slice(4*e,4*e+4).map(e=>el[e.codePointAt(0)]).join("");n.unshift(String.fromCharCode(parseInt(t,4)))}if(t){n.shift();let e=n.indexOf("\0");return -1===e&&(e=n.length),[JSON.parse(n.slice(0,e).join(""))]}return n.join("").split("\0").filter(Boolean).map(e=>JSON.parse(e))}(t[0],!0)[0]}(n.encoded),"object"!=typeof o||null===o||!("origin"in o)||"string"!=typeof o.origin||!("href"in o)||"string"!=typeof o.href))return}catch(e){return}let a=this.maybeFindGroup(t);if(!a)return;let l=i.get(a);return!this.silenceWarnings&&l&&l!==r.href&&this.warnCollision(a,l,t,r.href),a.getAttribute(X)!==r.href&&(a.setAttribute(X,r.href),i.set(a,r.href)),this.stripStega||t.setAttribute("data-datocms-contains-stega",""),n.cleaned}warnCollision(e,t,i,n){console.warn(`[@datocms/content-link] Multiple stega-encoded payloads resolved to the same DOM element. Previous URL: ${t}. Incoming URL: ${n}. Wrap each encoded block in its own element (for example by adding ${ee}).`,e,i)}isInsideExcludedTag(e){if(!e)return!1;let t=e;for(;t;){if("SCRIPT"===t.tagName||"STYLE"===t.tagName)return!0;t=t.parentElement}return!1}maybeFindGroup(e){let t=e;for(;t;){if(t.hasAttribute(ee))return t;if(t.hasAttribute("data-datocms-content-link-boundary"))break;t=t.parentElement}return e}},ep=class{constructor(e){this.doc=e.doc}emitStamped(e){this.dispatch("datocms:visual-editing:stamped",e)}emitClickToEditToggle(e){this.dispatch("datocms:click-to-edit:toggle",e)}
1dispatch(e,t){let i=this.doc.defaultView?.CustomEvent??("u">typeof CustomEvent?CustomEvent:void 0);if(i)try{let n=new i(e,{detail:t});this.doc.dispatchEvent(n)}catch{}}},ef=class{constructor(e,t){this.wrapperElement=e,this.overlayColors=t,this.overlays=[],this.pendingAnimationAbortController=null,this.disposed=!1}async flash(e){this.disposed||(this.fadeIn(e),await D(1500),this.fadeOut())}async fadeIn(e){if(this.disposed)return;await F();let t=Array.from(this.wrapperElement.querySelectorAll(ei));if(0===t.length)return;this.instantlyDisposeOverlays();let i=new AbortController,{signal:n}=i;this.pendingAnimationAbortController=i;try{e&&await $(t,n);let r=t.length;t.map((e,t)=>{let n=new Q(e,{overlayColors:this.overlayColors});n.fadeIn(r<50?10*t:0,i),this.overlays.push(n)})}catch(e){}}fadeOut(){if(this.disposed)return;this.cancelPendingAnimation();let e=new AbortController,t=this.overlays.length;this.overlays.map((i,n)=>{i.disposeWithFadeOut(t<50?10*n:0,e)}),this.overlays=[]}dispose(){this.disposed||(this.disposed=!0,this.instantlyDisposeOverlays())}cancelPendingAnimation(){this.pendingAnimationAbortController?.abort()}instantlyDisposeOverlays(){this.cancelPendingAnimation(),this.overlays.forEach(e=>{e.cancelPendingAnimation(),e.dispose()}),this.overlays=[]}},em=class{constructor(e,t,i,n){this.wrapperElement=e,this.itemId=t,this.editUrlRegExp=i,this.overlayColors=n,this.overlays=[],this.pendingAnimationAbortController=null,this.disposed=!1}async flash(e){this.disposed||(await F(),this.fadeIn(e),await D(1500),await this.fadeOut())}async fadeIn(e){if(this.disposed)return;let t=this.wrapperElement.querySelectorAll(ei),i=new Set;for(let e of t){let t=e.getAttribute(Z)||e.getAttribute(X);if(t){let n=z(t,this.editUrlRegExp);n&&n.itemId===this.itemId&&i.add(e)}}let n=Array.from(i);if(0===n.length)return;this.instantlyDisposeOverlays();let r=new AbortController,{signal:s}=r;this.pendingAnimationAbortController=r;try{e&&await $(n,s),n.map((e,t)=>{let i=new Q(e,{overlayColors:this.overlayColors});i.fadeIn(10*t,r),this.overlays.push(i)})}catch(e){}}async fadeOut(){if(this.disposed)return;this.cancelPendingAnimation();let e=new AbortController,t=Promise.all(this.overlays.map((t,i)=>t.disposeWithFadeOut(10*i,e)));return this.overlays=[],await t}dispose(){this.disposed||(this.disposed=!0,this.instantlyDisposeOverlays())}cancelPendingAnimation(){this.pendingAnimationAbortController?.abort()}instantlyDisposeOverlays(){this.cancelPendingAnimation(),this.overlays.forEach(e=>{e.cancelPendingAnimation(),e.dispose()}),this.overlays=[]}},eg=class{constructor(e){this.flashItemManager=null,this.webPreviewsPluginConnection=null,this.disposed=!1,this.currentPath=M(document.location.toString()),this.wrapperElement=e.root??document,this.onNavigateTo=e.onNavigateTo,this.overlayColors=K(e.hue??17),this.eventsManager=new ep({doc:this.document}),this.clickToEditManager=new er(this.document,e=>this.handleEditClick(e),()=>null===this.webPreviewsPluginConnection,this.overlayColors),this.initializeWebPreviewsPluginConnection(),this.stampingManager=new eu(this.wrapperElement,e=>this.handleStampResult(e),e.stripStega??!1,e.silenceWarnings??!1),this.flashAllManager=new ef(this.wrapperElement,this.overlayColors),this.listenerAbortController=new AbortController,this.document.addEventListener("keydown",e=>this.onKeyDown(e),{capture:!0,signal:this.listenerAbortController.signal}),this.document.addEventListener("keyup",e=>this.onKeyUp(e),{capture:!0,signal:this.listenerAbortController.signal}),this.document.addEventListener("click",e=>this.onClick(e),{capture:!0,signal:this.listenerAbortController.signal}),this.document.addEventListener("visibilitychange",()=>{document.hidden&&this.disableTemporaryClickToEditState()},{signal:this.listenerAbortController.signal}),N(this.document)?.addEventListener("blur",()=>{this.disableTemporaryClickToEditState()},{signal:this.listenerAbortController.signal})}get document(){return R(this.wrapperElement)}dispose(){this.disposed||(this.disposed=!0,this.clickToEditManager.deactivate(),this.stampingManager.dispose(),this.flashAllManager.dispose(),this.flashItemManager?.dispose(),this.webPreviewsPluginConnection?.destroy(),this.listenerAbortController.abort())}isDisposed(){return this.disposed}setCurrentPath(e){this.currentPath=M(e)}enableClickToEdit(e){!this.disposed&&(this.clickToEditManager.isActive()||(this.clickToEditManager.activate(),this.eventsManager.emitClickToEditToggle(!0),this.notifyStateChangeToWebPreviewsPlugin()),e&&this.flashAllManager.flash(e.scrollToNearestTarget))}disableClickToEdit(){this.clickToEditManager.isActive()&&!this.disposed&&(this.clickToEditManager.deactivate(),this.eventsManager.emitClickToEditToggle(!1),this.notifyStateChangeToWebPreviewsPlugin())}isClickToEditEnabled(){return this.clickToEditManager.isActive()&&!this.disposed}flashAll(e=!1){this.disposed||this.flashAllManager.flash(e)}async flashItem(e,t=!1){if(this.disposed||!this.webPreviewsPluginConnection)return;this.flashItemManager?.dispose();let i=new em(this.wrapperElement,e,this.webPreviewsPluginConnection.editUrlRegExp,this.overlayColors),n=i.flash(t);this.flashItemManager=i,await n,i.dispose()}handleStampResult(e){this.eventsManager.emitStamped(e),this.notifyStateChangeToWebPreviewsPlugin()}async notifyStateChangeToWebPreviewsPlugin(){if(!this.webPreviewsPluginConnection)return;let e=this.wrapperElement.querySelectorAll(ei),t=new Set;for(let i of e){let e=i.getAttribute(Z)||i.getAttribute(X);e&&t.add(e)}await this.webPreviewsPluginConnection.parent.onStateChange({clickToEditEnabled:this.clickToEditManager.isActive(),path:this.currentPath,itemIdsPerEnvironment:function(e,t){let i={};for(let n of e){let e=z(n,t);if(e){let t=e.environment;i[t]||(i[t]=new Set),i[t].add(e.itemId)}}let n={};for(let[e,t]of Object.entries(i))n[e]=Array.from(t);return n}(Array.from(t),this.webPreviewsPluginConnection.editUrlRegExp)})}handleEditClick(e){if(this.webPreviewsPluginConnection){let t=z(e,this.webPreviewsPluginConnection.editUrlRegExp);t&&this.webPreviewsPluginConnection.parent.openItem(t)}else{let t=this.document.defaultView??("u">typeof window?window:null);t?.open(e,"_blank","noopener,noreferrer")}}async initializeWebPreviewsPluginConnection(){let e;if(!("u">typeof window&&window.parent!==window))return;let t=q.default.connectToParent({timeout:2e4,methods:{navigateTo:e=>{this.onNavigateTo?.(e.path)},flashAll:e=>{this.flashAll(e.scrollToNearestTarget)},flashItem:e=>{this.flashItem(e.itemId,e.scrollToNearestTarget)},setClickToEditEnabled:e=>{e.enabled?this.enableClickToEdit(e.flash):this.disableClickToEdit()}}}),i=await t.promise;if(this.disposed)return void t.destroy();let{editUrlRegExp:n}=await i.onInit();e=setInterval(()=>i.onPing(),1e3),this.webPreviewsPluginConnection={parent:i,destroy:()=>{clearInterval(e),t.destroy()},editUrlRegExp:new RegExp(n.source,n.flags)},await this.notifyStateChangeToWebPreviewsPlugin()}onKeyDown(e){I(e)&&"Alt"===e.key&&this.isTopLevelWindowOrInWebPreviewsIframe&&(L(this.document)||this.enableTemporaryClickToEditState())}onKeyUp(e){I(e)&&"Alt"===e.key&&this.isTopLevelWindowOrInWebPreviewsIframe&&(L(this.document)||this.disableTemporaryClickToEditState())}onClick(e){if(_(e)&&0===e.button&&this.temporaryState&&!this.temporaryState.enabled&&e.altKey){e.preventDefault();let t=new MouseEvent("click",{bubbles:!0,cancelable:!0,view:window});e.target.dispatchEvent(t)}}enableTemporaryClickToEditState(){this.clickToEditManager.isActive()?(this.temporaryState={enabled:!1},this.disableClickToEdit(),this.flashAllManager.fadeOut()):(this.temporaryState={enabled:!0},this.enableClickToEdit(),this.flashAllManager.fadeIn(!0))}disableTemporaryClickToEditState(){this.temporaryState&&(this.temporaryState.enabled?(this.disableClickToEdit(),this.flashAllManager.fadeOut()):(this.enableClickToEdit(),this.flashAllManager.flash(!0)),this.temporaryState=void 0)}get isTopLevelWindowOrInWebPreviewsIframe(){let e=this.document.defaultView??("u">typeof window?window:null);return this.webPreviewsPluginConnection||e&&e.parent===e}},ey=class{constructor(){this.disposed=!1}dispose(){this.disposed=!0}isDisposed(){return this.disposed}setCurrentPath(){}enableClickToEdit(){}disableClickToEdit(){}isClickToEditEnabled(){return!1}flashAll(){}},ev=i(78445);function eE(e={}){let{enabled:t=!0,onNavigateTo:i,root:n,hue:r}=e,s=(0,ev.useRef)(null),o=(0,ev.useRef)(i);(0,ev.useEffect)(()=>{o.current=i},[i]),(0,ev.useEffect)(()=>
1{if(!0!==t&&("object"!=typeof t||null===t)){s.current&&(s.current.dispose(),s.current=null);return}let e="object"==typeof t&&t.stripStega,i=function(e={}){return"u">typeof window&&"u">typeof document?new eg(e):new ey}({onNavigateTo:e=>{var t;return null==(t=o.current)?void 0:t.call(o,e)},root:(null==n?void 0:n.current)||void 0,stripStega:e,hue:r});return s.current=i,()=>{i.dispose(),s.current=null}},[t,n,r]);let a=(0,ev.useCallback)(e=>{var t;(null==e||!e.hoverOnly||"u">typeof window&&window.matchMedia("(hover: hover)").matches)&&(null==(t=s.current)||t.enableClickToEdit((null==e?void 0:e.scrollToNearestTarget)?{scrollToNearestTarget:e.scrollToNearestTarget}:void 0))},[]),l=(0,ev.useCallback)(()=>{var e;null==(e=s.current)||e.disableClickToEdit()},[]),d=(0,ev.useCallback)(()=>{var e,t;return null!=(t=null==(e=s.current)?void 0:e.isClickToEditEnabled())&&t},[]),h=(0,ev.useCallback)(e=>{var t;null==(t=s.current)||t.flashAll(e)},[]),c=(0,ev.useCallback)(e=>{var t;null==(t=s.current)||t.setCurrentPath(e)},[]);return{controller:s.current,enableClickToEdit:a,disableClickToEdit:l,isClickToEditEnabled:d,flashAll:h,setCurrentPath:c}}},86047:(e,t,i)=>{i.d(t,{PL:()=>r,RQ:()=>l,rB:()=>a});var n=i(83384);function r(e){return{onFetch:(t,i)=>{let r=t.options,a=t.fetchOptions?.meta?.fetchMore?.direction,l=t.state.data?.pages||[],d=t.state.data?.pageParams||[],h={pages:[],pageParams:[]},c=0,u=async()=>{let i=!1,u=(0,n.ZM)(t.options,t.fetchOptions),p=async(e,r,s)=>{let o;if(i)return Promise.reject(t.signal.reason);if(null==r&&e.pages.length)return Promise.resolve(e);let a=(o={client:t.client,queryKey:t.queryKey,pageParam:r,direction:s?"backward":"forward",meta:t.options.meta},(0,n.ox)(o,()=>t.signal,()=>i=!0),o),l=await u(a),{maxPages:d}=t.options,h=s?n.ZZ:n.y9;return{pages:h(e.pages,l,d),pageParams:h(e.pageParams,r,d)}};if(a&&l.length){let e="backward"===a,t={pages:l,pageParams:d},i=(e?o:s)(r,t);h=await p(t,i,e)}else{let t=e??l.length;do{let e=0===c?d[0]??r.initialPageParam:s(r,h);if(c>0&&null==e)break;h=await p(h,e),c++}while(c<t)}return h};t.options.persister?t.fetchFn=()=>t.options.persister?.(u,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},i):t.fetchFn=u}}}function s(e,{pages:t,pageParams:i}){let n=t.length-1;return t.length>0?e.getNextPageParam(t[n],t,i[n],i):void 0}function o(e,{pages:t,pageParams:i}){return t.length>0?e.getPreviousPageParam?.(t[0],t,i[0],i):void 0}function a(e,t){return!!t&&null!=s(e,t)}function l(e,t){return!!t&&!!e.getPreviousPageParam&&null!=o(e,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.