PageSourceSearch

https://www.storytel.com/web-assets/1a6948cc170aaa6ba7bf4176a8dd6c…/_next/static/chunks/1jc1-ucw_juqv.js

js storytel.com collected 2026-09-24 08:28:27 UTC 32,135 bytes, 4 lines download raw bytes

1;!function(){try { var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof global?global:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&((e._debugIds|| (e._debugIds={}))[n]="8b655f9b-ec0d-837d-830e-d56780d1d335")}catch(e){}}();
2(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,577620,e=>{"use strict";var t=e.i(95293),n=e.i(313577);try{var r=window;r._sentryModuleMetadata=r._sentryModuleMetadata||{},r._sentryModuleMetadata[(new r.Error).stack]=Object.assign({},r._sentryModuleMetadata[(new r.Error).stack],{"_sentryBundlerPluginAppKey:storytelcom":!0})}catch(e){}e.s(["LivePreviewWrapper",0,({children:e,locale:r,isPreview:i})=>i?(0,t.jsx)(n.ContentfulLivePreviewProvider,{locale:r,enableInspectorMode:!0,enableLiveUpdates:!0,children:e}):(0,t.jsx)(t.Fragment,{children:e})])},313577,e=>{"use strict";let t,n;try{var r,i,o,a="u">typeof window?window:e.g;a._sentryModuleMetadata=a._sentryModuleMetadata||{},a._sentryModuleMetadata[(new a.Error).stack]=Object.assign({},a._sentryModuleMetadata[(new a.Error).stack],{"_sentryBundlerPluginAppKey:storytelcom":!0})}catch(e){}var s=Object.create,l=Object.defineProperty,c=Object.getOwnPropertyDescriptor,u=Object.getOwnPropertyNames,d=Object.getPrototypeOf,f=Object.prototype.hasOwnProperty,p=(e,t,n)=>(n=null==e?{}:s(d(e)),((e,t,n)=>{if(t&&"object"==typeof t||"function"==typeof t)for(var r,i=u(t),o=0,a=i.length;o<a;o++)r=i[o],f.call(e,r)||void 0===r||l(e,r,{get:(e=>t[e]).bind(null,r),enumerable:!(n=c(t,r))||n.enumerable});return e})(!t&&e&&e.__esModule?n:l(n,"default",{value:e,enumerable:!0}),e)),h=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),g={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},v={0:8203,1:8204,2:8205,3:65279},m={0:String.fromCodePoint(v[0]),1:String.fromCodePoint(v[1]),2:String.fromCodePoint(v[2]),3:String.fromCodePoint(v[3])},b=[,,,,].fill(String.fromCodePoint(v[0])).join(""),y=Object.fromEntries(Object.entries(m).map(e=>[e[1],+e[0]])),E=Object.fromEntries(Object.entries(g).map(e=>e.reverse())),_=`${Object.values(g).map(e=>`\\u{${e.toString(16)}}`).join("")}`,O=RegExp(`[${_}]{4,}`,"gu"),w=h((e,t)=>{var n=Object.prototype.hasOwnProperty,r=Object.prototype.toString;t.exports=function(e,t,i){if("[object Function]"!==r.call(t))throw TypeError("iterator must be a function");var o=e.length;if(o===+o)for(var a=0;a<o;a++)t.call(i,e[a],a,e);else for(var s in e)n.call(e,s)&&t.call(i,e[s],s,e)}}),T=["nt_experiences","nt_name","nt_description","nt_audience_id","nt_rules","nt_metadata","nt_experience_id","nt_type","nt_config","nt_audience","nt_variants"],M=T.map(e=>e.replace(/_([a-z])/g,(e,t)=>t.toUpperCase()));[...T,...M];var C="4.10.7",I=!1,S=e=>(...t)=>{I&&console[e](...t)},A={error:S("error"),warn:S("warn"),log:S("log")},D=new Set(["AREA","BASE","BR","COL","EMBED","HR","IMG","INPUT","LINK","META","PARAM","SOURCE","TRACK","WBR"]);function L(e,t,n){let r={...t,method:e,source:"live-preview-sdk",location:window.location.href,version:C};A.log("Send message",r),n.forEach(e=>{window.top?.postMessage(r,e)})}function j(e,t=100){let n;return(...r)=>{clearTimeout(n),n=setTimeout(()=>{e.apply(this,r)},t)}}var R=(t=(t,n)=>{var r,i,o,a="__lodash_hash_undefined__",s="[object Arguments]",l="[object Array]",c="[object Boolean]",u="[object Date]",d="[object Error]",f="[object Function]",p="[object Map]",h="[object Number]",g="[object Object]",v="[object Promise]",m="[object RegExp]",b="[object Set]",y="[object String]",E="[object WeakMap]",_="[object ArrayBuffer]",O="[object DataView]",w=/^\[object .+?Constructor\]$/,T=/^(?:0|[1-9]\d*)$/,M={};M["[object Float32Array]"]=M["[object Float64Array]"]=M["[object Int8Array]"]=M["[object Int16Array]"]=M["[object Int32Array]"]=M["[object Uint8Array]"]=M["[object Uint8ClampedArray]"]=M["[object Uint16Array]"]=M["[object Uint32Array]"]=!0,M[s]=M[l]=M[_]=M[c]=M[O]=M[u]=M[d]=M[f]=M[p]=M[h]=M[g]=M[m]=M[b]=M[y]=M[E]=!1;var C=e.g&&e.g.Object===Object&&e.g,I="object"==typeof self&&self&&self.Object===Object&&self,S=C||I||Function("return this")(),A="object"==typeof t&&t&&!t.nodeType&&t,D=A&&"object"==typeof n&&n&&!n.nodeType&&n,L=D&&D.exports===A,j=L&&C.process,R=function(){try{return j&&j.binding&&j.binding("util")}catch{}}(),N=R&&R.isTypedArray;function P(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}function U(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}var B=Array.prototype,x=Function.prototype,z=Object.prototype,k=S["__core-js_shared__"],F=x.toString,G=z.hasOwnProperty,$=(r=/[^.]+$/.exec(k&&k.keys&&k.keys.IE_PROTO||""))?"Symbol(sr
2c)_1."+r:"",V=z.toString,Y=RegExp("^"+F.call(G).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),H=L?S.Buffer:void 0,K=S.Symbol,q=S.Uint8Array,Z=z.propertyIsEnumerable,J=B.splice,W=K?K.toStringTag:void 0,X=Object.getOwnPropertySymbols,Q=H?H.isBuffer:void 0,ee=(i=Object.keys,o=Object,function(e){return i(o(e))}),et=eM(S,"DataView"),en=eM(S,"Map"),er=eM(S,"Promise"),ei=eM(S,"Set"),eo=eM(S,"WeakMap"),ea=eM(Object,"create"),es=eS(et),el=eS(en),ec=eS(er),eu=eS(ei),ed=eS(eo),ef=K?K.prototype:void 0,ep=ef?ef.valueOf:void 0;function eh(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function eg(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function ev(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function em(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new ev;++t<n;)this.add(e[t])}function eb(e){var t=this.__data__=new eg(e);this.size=t.size}function ey(e,t){for(var n=e.length;n--;)if(eA(e[n][0],t))return n;return -1}function eE(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":W&&W in Object(e)?function(e){var t=G.call(e,W),n=e[W];try{e[W]=void 0;var r=!0}catch{}var i=V.call(e);return r&&(t?e[W]=n:delete e[W]),i}(e):V.call(e)}function e_(e){return eU(e)&&eE(e)==s}function eO(e,t,n,r,i,o){var a=1&n,s=e.length,l=t.length;if(s!=l&&!(a&&l>s))return!1;var c=o.get(e);if(c&&o.get(t))return c==t;var u=-1,d=!0,f=2&n?new em:void 0;for(o.set(e,t),o.set(t,e);++u<s;){var p=e[u],h=t[u];if(r)var g=a?r(h,p,u,t,e,o):r(p,h,u,e,t,o);if(void 0!==g){if(g)continue;d=!1;break}if(f){if(!function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}(t,function(e,t){if(!f.has(t)&&(p===e||i(p,e,n,r,o)))return f.push(t)})){d=!1;break}}else if(!(p===h||i(p,h,n,r,o))){d=!1;break}}return o.delete(e),o.delete(t),d}function ew(e){var t;return t=ex(e),eL(e)?t:function(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}(t,eC(e))}function eT(e,t){var n,r=e.__data__;return("string"==(n=typeof t)||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==t:null===t)?r["string"==typeof t?"string":"hash"]:r.map}function eM(e,t){var n=e?.[t];return!(!eP(n)||$&&$ in n)&&(eR(n)?Y:w).test(eS(n))?n:void 0}eh.prototype.clear=function(){this.__data__=ea?ea(null):{},this.size=0},eh.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=!!t,t},eh.prototype.get=function(e){var t=this.__data__;if(ea){var n=t[e];return n===a?void 0:n}return G.call(t,e)?t[e]:void 0},eh.prototype.has=function(e){var t=this.__data__;return ea?void 0!==t[e]:G.call(t,e)},eh.prototype.set=function(e,t){var n=this.__data__;return this.size+=+!this.has(e),n[e]=ea&&void 0===t?a:t,this},eg.prototype.clear=function(){this.__data__=[],this.size=0},eg.prototype.delete=function(e){var t=this.__data__,n=ey(t,e);return!(n<0)&&(n==t.length-1?t.pop():J.call(t,n,1),--this.size,!0)},eg.prototype.get=function(e){var t=this.__data__,n=ey(t,e);return n<0?void 0:t[n][1]},eg.prototype.has=function(e){return ey(this.__data__,e)>-1},eg.prototype.set=function(e,t){var n=this.__data__,r=ey(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},ev.prototype.clear=function(){this.size=0,this.__data__={hash:new eh,map:new(en||eg),string:new eh}},ev.prototype.delete=function(e){var t=eT(this,e).delete(e);return this.size-=!!t,t},ev.prototype.get=function(e){return eT(this,e).get(e)},ev.prototype.has=function(e){return eT(this,e).has(e)},ev.prototype.set=function(e,t){var n=eT(this,e),r=n.size;return n.set(e,t),this.size+=+(n.size!=r),this},em.prototype.add=em.prototype.push=function(e){return this.__data__.set(e,a),this},em.prototype.has=function(e){return this.__data__.has(e)},eb.prototype.clear=function(){this.__data__=new eg,this.size=0},eb.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},eb.prototype.get=function(e){return this.__data__.get(e)},eb.prototype.has=function(e){return this.__data__.has(e)},eb.prototype.set=function(e,t){var n=this.__data__;if(n instanceof eg){var r=n.__data__;if(!en||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new ev(r)}return n.set(e,t),this.size=n.size,this};var eC=X?function(e){return null==e?[]:function(e,t){for(var n=-1,r=null==e?0:e.length,i=0,o=[];++n<r;){var a=e[n];t(a,n,e)&&(o[i++]=a)}return o}(X(e=Object(e)),function(t){return Z.call(e,t)})}:function(){return[]},eI=eE;function eS(e){if(null!=e){try{return F.call(e)}catch{}try{return e+""}catch{}}return""}function eA(e,t){return e===t||e!=e&&t!=t}(et&&eI(new et(new ArrayBuffer(1)))!=O||en&&eI(new en)!=p||er&&eI(er.resolve())!=v||ei&&eI(new ei)!=b||eo&&eI(new eo)!=E)&&(eI=function(e){var t=eE(e),n=t==g?e.constructor:void 0,r=n?eS(n):"";if(r)switch(r){case es:return O;case el:return p;case ec:return v;case eu:return b;case ed:return E}return t});var eD=e_(function(){return arguments}())?e_:function(e){return eU(e)&&G.call(e,"callee")&&!Z.call(e,"callee")},eL=Array.isArray,ej=Q||function(){return!1};function eR(e){if(!eP(e))return!1;var t=eE(e);return t==f||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}function eN(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=0x1fffffffffffff}function eP(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function eU(e){return"object"==typeof e&&!!e}var eB=N?function(e){return N(e)}:function(e){return eU(e)&&eN(e.length)&&!!M[eE(e)]};function ex(e){return null!=e&&eN(e.length)&&!eR(e)?function(e){var t,n=eL(e),r=!n&&eD(e),i=!n&&!r&&ej(e),o=!n&&!r&&!i&&eB(e),a=n||r||i||o,s=a?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],l=s.length;for(var c in e)G.call(e,c)&&!(a&&("length"==c||i&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||(t=l,(t??=0x1fffffffffffff)&&("number"==typeof c||T.test(c))&&c>-1&&c%1==0&&c<t)))&&s.push(c);return s}(e):function(e){if(t=e&&e.constructor,e!==("function"==typeof t&&t.prototype||z))return ee(e);var t,n=[];for(var r in Object(e))G.call(e,r)&&"constructor"!=r&&n.push(r);return n}(e)}n.exports=function(e,t){return function e(t,n,r,i,o){return t===n||(null!=t&&null!=n&&(eU(t)||eU(n))?function(e,t,n,r,i,o){var a=eL(e),f=eL(t),v=a?l:eI(e),E=f?l:eI(t);
2v=v==s?g:v,E=E==s?g:E;var w=v==g,T=E==g,M=v==E;if(M&&ej(e)){if(!ej(t))return!1;a=!0,w=!1}if(M&&!w)return o||=new eb,a||eB(e)?eO(e,t,n,r,i,o):function(e,t,n,r,i,o,a){switch(n){case O:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)break;e=e.buffer,t=t.buffer;case _:return!(e.byteLength!=t.byteLength||!o(new q(e),new q(t)));case c:case u:case h:return eA(+e,+t);case d:return e.name==t.name&&e.message==t.message;case m:case y:return e==t+"";case p:var s=P;case b:var l=1&r;if(s||=U,e.size!=t.size&&!l)break;var f=a.get(e);if(f)return f==t;r|=2,a.set(e,t);var g=eO(s(e),s(t),r,i,o,a);return a.delete(e),g;case"[object Symbol]":if(ep)return ep.call(e)==ep.call(t)}return!1}(e,t,v,n,r,i,o);if(!(1&n)){var C=w&&G.call(e,"__wrapped__"),I=T&&G.call(t,"__wrapped__");if(C||I)return i(C?e.value():e,I?t.value():t,n,r,o||=new eb)}return!!M&&function(e,t,n,r,i,o){var a=1&n,s=ew(e),l=s.length;if(l!=ew(t).length&&!a)return!1;for(var c=l;c--;){var u=s[c];if(!(a?u in t:G.call(t,u)))return!1}var d=o.get(e);if(d&&o.get(t))return d==t;var f=!0;o.set(e,t),o.set(t,e);for(var p=a;++c<l;){var h=e[u=s[c]],g=t[u];if(r)var v=a?r(g,h,u,t,e,o):r(h,g,u,e,t,o);if(!(void 0===v?h===g||i(h,g,n,r,o):v)){f=!1;break}p||="constructor"==u}if(f&&!p){var m=e.constructor,b=t.constructor;m!=b&&"constructor"in e&&"constructor"in t&&!("function"==typeof m&&m instanceof m&&"function"==typeof b&&b instanceof b)&&(f=!1)}return o.delete(e),o.delete(t),f}(e,t,n,r,i,o||=new eb)}(t,n,r,i,e,o):t!=t&&n!=n)}(e,t)}},()=>(n||(t((n={exports:{}}).exports,n),t=null),n.exports)),N=p(R(),1),P=((r={}).FIELD_ID="data-contentful-field-id",r.ENTRY_ID="data-contentful-entry-id",r.ASSET_ID="data-contentful-asset-id",r.LOCALE="data-contentful-locale",r.SPACE="data-contentful-space",r.ENVIRONMENT="data-contentful-environment",r),U=((i={}).MOUSE_MOVE="MOUSE_MOVE",i.SCROLL_START="SCROLL_START",i.SCROLL_END="SCROLL_END",i.RESIZE_START="RESIZE_START",i.RESIZE_END="RESIZE_END",i.TAGGED_ELEMENTS="TAGGED_ELEMENTS",i.INSPECTOR_MODE_CHANGED="INSPECTOR_MODE_CHANGED",i),B={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},x={0:8203,1:8204,2:8205,3:65279},z={0:String.fromCodePoint(x[0]),1:String.fromCodePoint(x[1]),2:String.fromCodePoint(x[2]),3:String.fromCodePoint(x[3])};[,,,,].fill(String.fromCodePoint(x[0])).join(""),Object.fromEntries(Object.entries(z).map(e=>[e[1],+e[0]])),Object.fromEntries(Object.entries(B).map(e=>e.reverse()));var k=`${Object.values(B).map(e=>`\\u{${e.toString(16)}}`).join("")}`,F=RegExp(`[${k}]{4,}`,"gu");function G(e,t){return e.href===t.href}function $({root:e=window.document,options:t}){var n,r;let i,o=[...t.ignoreManuallyTaggedElements?[]:e.querySelectorAll(`[${P.ASSET_ID}][${P.FIELD_ID}], [${P.ENTRY_ID}][${P.FIELD_ID}]`)].map(e=>({element:e,attributes:function(e,t){if(!(e&&e.nodeType===Node.ELEMENT_NODE&&!(!e.hasAttribute(P.FIELD_ID)||!e.hasAttribute(P.ENTRY_ID)&&!e.hasAttribute(P.ASSET_ID))))return null;let n={fieldId:e.getAttribute(P.FIELD_ID),locale:e.getAttribute(P.LOCALE)??t.locale,environment:e.getAttribute(P.ENVIRONMENT)??t.environment,space:e.getAttribute(P.SPACE)??t.space,manuallyTagged:!0};if(!n.fieldId)return A.warn("Element is missing field ID attribute and cannot be tagged",{id:e.getAttribute(P.ENTRY_ID)??e.getAttribute(P.ASSET_ID),sharedProps:n}),null;let r=e.getAttribute(P.ENTRY_ID);if(r)return{...n,entryId:r};let i=e.getAttribute(P.ASSET_ID);return i?{...n,assetId:i}:null}(e,t)})).filter(({attributes:e})=>null!==e),a=[];for(let{node:t,text:r}of(n="body"in e?e.body:e,i=[],"function"==typeof n.matches&&n.matches("*")&&(i=[n]),[...i,...Array.from(n.querySelectorAll("*:not(script,style,meta,title)"))].map(e=>{var t;return{node:e,text:(t=e).matches("input[type=submit], input[type=button], input[type=reset]")?t.value:t.matches("img, video")?t.alt:Array.from(t.childNodes).filter(e=>e.nodeType===Node.TEXT_NODE&&!!e.textContent).map(e=>e.textContent).join("")}}).filter(({text:e})=>!!(e&&e.match(F))))){let e=function(e){let t=e.match(O);return t?function(e,t=!1){let n=Array.from(e),r=1/0,i=-1;for(let e=0;e<n.length;++e)n[e]===b[0]&&n[e+1]===b[1]&&n[e+2]===b[2]&&n[e+3]===b[3]&&(r=Math.min(r,e),i=Math.max(i,e));if(-1===i)return function(e,t){let n=[];for(let t=.5*e.length;t--;){let r=`${E[e[2*t].codePointAt(0)]}${E[e[2*t+1].codePointAt(0)]}`;n.unshift(String.fromCharCode(parseInt(r,16)))}let r=[],i=[n.join("")],o=10;for(;i.length;){let e=i.shift();try{if(r.push(JSON.parse(e)),t)break}catch(n){if(!o--)throw n;let t=+n.message.match(/\sposition\s(\d+)$/)?.[1];if(!t)throw n;i.unshift(e.substring(0,t),e.substring(t))}}return r}(n,t);for(let e=r;e<=i;++e)if(!((n.length-e)%4))try{let r=n.slice(e+4),i=new Uint8Array(r.length/4);for(let e=0;e<i.length;e++)i[e]=y[r[4*e]]<<6|y[r[4*e+1]]<<4|y[r[4*e+2]]<<2|y[r[4*e+3]];let o=new TextDecoder().decode(i);if(t){let e=o.indexOf("\0");return -1===e&&(e=o.length),[JSON.parse(o.slice(0,e))]}
2return o.split("\0").filter(Boolean).map(e=>JSON.parse(e))}catch{}return[]}(t[0],!0)[0]:void 0}(r);if(!e||!e.origin.includes("contentful.com")){A.warn("Element has missing or invalid ContentSourceMap, please check if you have correctly enabled ContentSourceMaps and that the element's data originates from Contentful",{node:t,sourceMap:e});continue}if(!(function(e,t){for(let n of t)if(n.element===e||n.element.contains(e))return!0;return!1}(t,o)||a.some(n=>n.element.contains(t)&&G(n.sourceMap,e)))){if(t.matches("img")){let n=t.closest("figure")||t.closest("picture")||t;a.push({element:n,sourceMap:e});continue}a.push({element:t,sourceMap:e})}}let s=a.filter((e,t)=>a.findIndex(t=>!(!G(e.sourceMap,t.sourceMap)||e.element!==t.element))===t);for(let{element:e,sourceMap:t}of s){let n=null;if(t.href){let r=function(e){try{let t=new URL(e),n=t.searchParams.get("focusedField"),r=t.searchParams.get("focusedLocale"),i=t.pathname.split("/").filter(Boolean),o=i.indexOf("spaces"),a=i.indexOf("environments"),s=-1===o?void 0:i[o+1],l=-1===a?void 0:i[a+1],c,u,d=i.indexOf("entries"),f=i.indexOf("assets");return -1===d?-1!==f&&(c="Asset",u=i[f+1]):(c="Entry",u=i[d+1]),c&&u?n?r?s&&l?{entityId:u,entityType:c,fieldId:n,locale:r,space:s,environment:l}:(console.warn("Missing space or environment in href path",{href:e}),null):(console.warn("Missing focusedLocale query parameter in href",{href:e}),null):(console.warn("Missing focusedField query parameter in href",{href:e}),null):(console.warn("Unable to determine entityType or entityId from href",{href:e}),null)}catch(t){return console.warn("Invalid href URL",{href:e,error:t}),null}}(t.href);if(!r)continue;if("Asset"===r.entityType)n={fieldId:r.fieldId,locale:r.locale,space:r.space,environment:r.environment,assetId:r.entityId};else if("Entry"===r.entityType)n={fieldId:r.fieldId,locale:r.locale,space:r.space,environment:r.environment,entryId:r.entityId};else{A.warn("Unknown entityType",{element:e,sourceMap:t});continue}}else{if(t.contentful&&(r=t.contentful)&&"string"==typeof r.entity&&"string"==typeof r.field&&"string"==typeof r.locale&&"string"==typeof r.space&&"string"==typeof r.environment&&("Asset"===r.entityType||"Entry"===r.entityType)){let r=t.contentful;if(!r.entity||!r.field||!r.locale||!r.space||!r.environment){A.warn("Element has missing information in their ContentSourceMap, please check if you have restricted the platform for the encoding. (Missing parameters in `contentful`)",{element:e,sourceMap:t});continue}let i={fieldId:r.field,locale:r.locale,space:r.space,environment:r.environment};if("Asset"===r.entityType)i.assetId=r.entity,n=i;else if("Entry"===r.entityType)i.entryId=r.entity,n=i;else{A.warn("Unknown entityType in contentful data",{element:e,sourceMap:t});continue}}else{A.warn("Element has neither href nor contentful data in their ContentSourceMap, unable to extract attributes.",{element:e,sourceMap:t});continue}}o.push({element:e,attributes:n})}let l=o.filter(({attributes:e})=>e?.manuallyTagged===!1||!e?.manuallyTagged).length;return{taggedElements:o,manuallyTaggedCount:o.length-l,automaticallyTaggedCount:l,autoTaggedElements:s}}function V({options:e}){return[...new Set($({options:e}).taggedElements.map(e=>e.attributes&&"entryId"in e.attributes?e.attributes.entryId:null).filter(Boolean))]}var Y=class{options;delay=300;isScrolling=!1;scrollTimeout;isResizing=!1;resizeTimeout;hoveredElement;taggedElements=[];manuallyTaggedCount=0;automaticallyTaggedCount=0;releaseId;intersectionObserver;observersCB=[];cleanupCB=[];constructor(e){this.options=e,this.intersectionObserver=new IntersectionObserver(e=>{let t=this.taggedElements;for(let n of e)if(n.isIntersecting)for(let e of t)e.element===n.target&&(e.coordinates=n.intersectionRect,e.isVisible=n.target.checkVisibility({checkOpacity:!0,checkVisibilityCSS:!0}));this.taggedElements=t,this.sendTaggedElements()},{threshold:.15})}init=()=>{this.cleanupCB=[this.addScrollListener(),this.addMutationListener(document.body),this.addResizeListener(),this.addHoverListener()],this.updateElements()};cleanup=()=>{this.observersCB.forEach(e=>
2e()),this.cleanupCB.forEach(e=>e())};receiveMessage=e=>{if(e.method===U.INSPECTOR_MODE_CHANGED){let{isInspectorActive:t,releaseId:n}=e;this.releaseId=n,t?this.init():this.cleanup()}};observe=e=>{this.intersectionObserver.observe(e);let t=this.addMutationListener(e);this.observersCB.push(t,()=>this.intersectionObserver.unobserve(e))};addScrollListener=()=>{let{targetOrigin:e}=this.options,t=()=>{this.isScrolling||(this.isScrolling=!0,L(U.SCROLL_START,{},e)),this.scrollTimeout&&clearTimeout(this.scrollTimeout),this.scrollTimeout=setTimeout(()=>{this.isScrolling=!1,L(U.SCROLL_END,{},e),this.updateElements()},this.delay)},n={capture:!0,passive:!0};return window.addEventListener("scroll",t,n),()=>window.removeEventListener("scroll",t,n)};addMutationListener=e=>{let t=new MutationObserver(()=>{this.updateElements()});return t.observe(e,{characterData:!0,attributes:!0,attributeFilter:[P.ENTRY_ID,P.FIELD_ID,P.LOCALE,P.SPACE,P.ENVIRONMENT,"class","style"],childList:!0,subtree:!0}),()=>t.disconnect()};addResizeListener=()=>{let{targetOrigin:e}=this.options,t=new ResizeObserver(()=>{this.isResizing||(this.isResizing=!0,L(U.RESIZE_START,{},e)),this.resizeTimeout&&clearTimeout(this.resizeTimeout),this.resizeTimeout=setTimeout(()=>{this.isResizing=!1,L(U.RESIZE_END,{},e),this.updateElements()},this.delay)});return t.observe(document.body),()=>t.disconnect()};addHoverListener=()=>{let e=j(e=>{let t;for(let n of e){let e=n;if("BODY"===e.nodeName)break;let r=this.taggedElements.find(t=>t.element===e);if(r){t=r;break}}this.hoveredElement=t?.element,this.updateElements()},this.delay),t=t=>{e(t.composedPath())};return window.addEventListener("mouseover",t,{passive:!0}),()=>window.removeEventListener("mouseover",t)};sendTaggedElements=()=>{L(U.TAGGED_ELEMENTS,{elements:this.taggedElements.map(e=>({coordinates:e.coordinates,isVisible:!!e.isVisible,attributes:e.attributes,isHovered:this.hoveredElement===e.element,isCoveredByOtherElement:!!e.isCoveredByOtherElement,snapshot:D.has(e.element.tagName.toUpperCase())?{[e.element.tagName.toLowerCase()]:Array.from(e.element.attributes).map(e=>`${e.name}="${e.value}"`).join(" ")}:{[e.element.tagName.toLowerCase()]:e.element.innerHTML}})),automaticallyTaggedCount:this.automaticallyTaggedCount,manuallyTaggedCount:this.manuallyTaggedCount,...void 0!==this.releaseId&&{releaseId:this.releaseId}},this.options.targetOrigin)};updateElements=()=>{let{taggedElements:e,manuallyTaggedCount:t,automaticallyTaggedCount:n}=$({options:this.options}),r=((e,t=window.document)=>((e,t=window.document)=>e.map(e=>({...e,isVisible:e.element.checkVisibility({checkOpacity:!0,checkVisibilityCSS:!0}),isCoveredByOtherElement:((e,t,n=window.document)=>{let{top:r,right:i,bottom:o,left:a}=t,s=n.elementFromPoint(a+1,r+1),l=n.elementFromPoint(i-1,r+1),c=n.elementFromPoint(a+1,o-1),u=n.elementFromPoint(i-1,o-1),d=t=>!!t&&(e===t||e.contains(t));return[d(s),d(l),d(c),d(u)].filter(Boolean).length<2})(e.element,e.coordinates,t)})))(e.map(({element:e,attributes:t})=>({element:e,coordinates:e.getBoundingClientRect(),attributes:t})),t))(e);(0,N.default)(r,this.taggedElements)||(this.observersCB.forEach(e=>e()),this.observersCB=[],this.taggedElements=r,e.forEach(({element:e})=>this.observe(e)),this.manuallyTaggedCount=t,this.automaticallyTaggedCount=n)}},{parse:H,stringify:K}=JSON,{keys:q}=Object,Z=String,J=(e,t)=>t,W=(e,t,n)=>{let r=Z(t.push(n)-1);return e.set(n,r),r},X=((o=X||{}).CONNECTED="CONNECTED",o.DISCONNECTED="DISCONNECTED",o.ERROR="ERROR",o.TAGGED_FIELD_CLICKED="TAGGED_FIELD_CLICKED",o.URL_CHANGED="URL_CHANGED",o.SUBSCRIBED="SUBSCRIBED",o.UNSUBSCRIBED="UNSUBSCRIBED",o.ENTRY_UPDATED="ENTRY_UPDATED",o.ENTRY_SAVED="ENTRY_SAVED",o.DEBUG_MODE_ENABLED="DEBUG_MODE_ENABLED",o),Q=class{subscriptions=new Map;defaultLocale;sendMessage;constructor({locale:e,targetOrigin:t}){this.defaultLocale=e,this.sendMessage=(e,n)=>L(e,n,t)}async receiveMessage(e){if(e.method===X.ENTRY_UPDATED){let{data:t,subscriptionId:n}=e,r=this.subscriptions.get(n);r?(r.callback(t),r.data=t,this.subscriptions.set(n,r)):A.error("Received an update for an unknown subscription",{subscriptionId:n,data:t,subscriptions:this.subscriptions})}}subscribe(e){let t=`${performance.now()}-${Math.random().toString(36).slice(2)}`,n=e.locale??this.defaultLocale;this.subscriptions.set(t,{...e});let r={locale:n,event:"edit",id:t,config:(e=>{let t=new Map,n=[],r=[],i=+W(t,n,J.call({"":e},"",e)),o=!i;for(;i<n.length;)o=!0,r[i]=K(n[i++],a,void 0);return"["+r.join(",")+"]";function a(e,r){if(o)return o=!o,r;let i=J.call(this,e,r);switch(typeof i){case"object":if(null===i)break;case"string":return t.get(i)||W(t,n,i)}return i}})(e)};return this.sendMessage(X.SUBSCRIBED,r),()=>{this.sendMessage(X.UNSUBSCRIBED,r),this.subscriptions.delete(t)}}},ee=class{locale;options;inspectorModeEnabled;subscription;constructor({locale:e,options:t,inspectorModeEnabled:n}){this.locale=e,this.options=t,this.inspectorModeEnabled=n}subscribe(e){return this.subscription&&A.log("There is already a subscription for the save event, the existing one will be replaced."),this.subscription=e,()=>{this.subscription=void 0}}receiveMessage(e){if(e.method===X.ENTRY_SAVED&&this.subscription){let{entity:t}=e;this.inspectorModeEnabled?V({options:this.options}).includes(t.sys.id)&&this.subscription(t):this.subscription(t)}}},et=["https://app.contentful.com","https://app.eu.contentful.com","http://localhost:3001"],en=class e{static initialized=!1;static inspectorMode=null;static liveUpdates=null;static saveEvent=null;static inspectorModeEnabled=!0;static liveUpdatesEnabled=!0;static locale;static space;static environment;static sendMessage;static targetOrigin;static init(t){if("object"!=typeof t||!t?.locale)throw Error("Init function has to be called with a locale configuration (for example: `ContentfulLivePreview.init({ locale: 'en-US'})`)");let{debugMode:n,enableInspectorMode:r,enableLiveUpdates:i,locale:o,environment:a,space:s,targetOrigin:l}=t;if("u">typeof window){if(!function(){try{return window.top?.location.href!==window.location.href}catch{return!0}}())return this.liveUpdatesEnabled=!1,Promise.resolve(null);if(n&&(I=n),"boolean"==typeof r&&(this.inspectorModeEnabled=r),"boolean"==typeof i&&(this.liveUpdatesEnabled=i),this.locale=o,this.space=s,this.environment=a,this.initTargetOrigin(l),this.initialized)return A.log("You have already initialized the Live Preview SDK."),Promise.resolve(e.inspectorMode);this.inspectorModeEnabled&&(this.inspectorMode=new Y({locale:o,space:s,environment:a,targetOrigin:this.targetOrigin,ignoreManuallyTaggedElements:t.experimental?.ignoreManuallyTaggedElements})),this.liveUpdatesEnabled&&(this.liveUpdates=new Q({locale:o,targetOrigin:this.targetOrigin}
2),this.saveEvent=new ee({locale:o,options:{locale:this.locale,space:this.space,environment:this.environment,targetOrigin:this.targetOrigin},inspectorModeEnabled:this.inspectorModeEnabled})),window.addEventListener("message",e=>{if("object"==typeof e.data&&e.data&&"source"in e.data&&"live-preview-editor"===e.data.source){if(A.log("Received message",e.data),e.data.method===X.DEBUG_MODE_ENABLED)return void(I=!0);this.inspectorModeEnabled&&this.inspectorMode?.receiveMessage(e.data),this.liveUpdatesEnabled&&(this.liveUpdates?.receiveMessage(e.data),this.saveEvent?.receiveMessage(e.data))}}),function(e,t=500){let n=window.location.href,r=setInterval(()=>{let t=window.location.href;t!==n&&(n=t,e(t))},t)}(()=>{L(X.URL_CHANGED,{action:X.URL_CHANGED,taggedElementCount:document.querySelectorAll(`[${P.ENTRY_ID}]`).length},this.targetOrigin)});let{taggedElements:c,manuallyTaggedCount:u,automaticallyTaggedCount:d}=this.inspectorModeEnabled?$({options:{locale:this.locale,space:this.space,environment:this.environment}}):{taggedElements:[],manuallyTaggedCount:0,automaticallyTaggedCount:0},f=c.length;return L(X.CONNECTED,{action:X.CONNECTED,connected:!0,tags:f,taggedElementCount:f,locale:this.locale,isInspectorEnabled:this.inspectorModeEnabled,isLiveUpdatesEnabled:this.liveUpdatesEnabled,manuallyTaggedElementCount:u,automaticallyTaggedElementCount:d,hideCoveredElementOutlines:t.experimental?.hideCoveredElementOutlines,version:C},this.targetOrigin),this.initialized=!0,Promise.resolve(e.inspectorMode)}}static initTargetOrigin(e){if(e)this.targetOrigin=Array.isArray(e)?e:[e];else{let e=window.location.ancestorOrigins,t=e?et.find(t=>e.contains(t)):et.find(e=>document.referrer.includes(e));if(!t)throw Error("The current origin is not supported. Please provide a targetOrigin in the live preview configuration.");this.targetOrigin=[t]}}static subscribe(e,t){if(!this.liveUpdatesEnabled)return()=>{};let n="string"==typeof e?e:"edit",r="object"==typeof e?e:t;if("save"===n){if(!this.saveEvent)throw Error("Save event is not initialized, please call `ContentfulLivePreview.init()` first.");return this.saveEvent.subscribe(r.callback)}if(!this.liveUpdates)throw Error("Live updates are not initialized, please call `ContentfulLivePreview.init()` first.");return this.liveUpdates.subscribe(r)}static getProps(e){let{fieldId:t,locale:n,environment:r,space:i}=e;if(!this.inspectorModeEnabled)return null;if(t){let o={...n?{[P.LOCALE]:n}:{},...r?{[P.ENVIRONMENT]:r}:{},...i?{[P.SPACE]:i}:{},[P.FIELD_ID]:t};if(n&&(o[P.LOCALE]=n),void 0!==e.assetId)return{...o,[P.ASSET_ID]:e.assetId};if(void 0!==e.entryId)return{...o,[P.ENTRY_ID]:e.entryId}}return A.warn("Missing property for inspector mode",{...e}),null}static toggleInspectorMode(){return this.inspectorModeEnabled=!this.inspectorModeEnabled,this.inspectorModeEnabled}static toggleLiveUpdatesMode(){return this.liveUpdatesEnabled=!this.liveUpdatesEnabled,this.liveUpdatesEnabled}static openEntryInEditor(e){let t={locale:this.locale,environment:this.environment,space:this.space};if(void 0!==e.assetId&&e.fieldId||void 0!==e.entryId&&e.fieldId){var n,r;return void(n={...t,...e},r=this.targetOrigin,L("TAGGED_FIELD_CLICKED",{action:"TAGGED_FIELD_CLICKED",...n},r))}A.error("Please provide field id and entry/asset id to openEntryInEditor.",{...e})}static getEntryList(){return V({options:{locale:this.locale,space:this.space,environment:this.environment}})}},er=e.i(948467),ei=e.i(95293);try{var eo="u">typeof window?window:e.g;eo._sentryModuleMetadata=eo._sentryModuleMetadata||{},eo._sentryModuleMetadata[(new eo.Error).stack]=Object.assign({},eo._sentryModuleMetadata[(new eo.Error).stack],{"_sentryBundlerPluginAppKey:storytelcom":!0})}catch(e){}var ea=p(R(),1),es=(0,er.createContext)(null);e.s(["ContentfulLivePreviewProvider",0,function({children:e,locale:t,space:n,environment:r,debugMode:i=!1,enableInspectorMode:o=!0,enableLiveUpdates:a=!0,targetOrigin:s,experimental:l}){if(!t)throw Error('ContentfulLivePreviewProvider has to be called with a locale property (for example: `<ContentfulLivePreviewProvider locale="en-US">{children}</ContentfulLivePreviewProvider>`');en.init({locale:t,space:n,environment:r,debugMode:i,enableInspectorMode:o,enableLiveUpdates:a,targetOrigin:s,experimental:l});let c=(0,er.useMemo)(()=>({locale:t,space:n,environment:r,debugMode:i,enableInspectorMode:o,enableLiveUpdates:a,targetOrigin:s}),[t,n,r,i,o,a,s]);return(0,ei.jsx)(es.Provider,{value:c,children:e})},"useContentfulLiveUpdates",0,function(e,t,n=!1){var r,i;let o,a,[s,l]=(0,er.useState)({data:e,version:1}),c=(0,er.useRef)(e),u=(0,er.useRef)(j(l)),d=(0,er.useContext)(es),f="object"==typeof t?t:{locale:t,skip:n},p=(0,er.useMemo)(()=>(!d||!!d.enableLiveUpdates)&&!f.skip&&!!(Array.isArray(e)&&e.length||e&&"object"==typeof e&&Object.keys(e).length),[d,f.skip,e]);return r=()=>{if(c.current!==e&&(l({data:e,version:1}),c.current=e),p)return en.subscribe("edit",{data:e,locale:f.locale,query:f.query,callback:e=>{u.current(t=>({data:e,version:t.version+1}))}})},i=[e,p,f.locale,f.query],(0,er.useEffect)(r,(o=(0,er.useRef)(i),a=(0,er.useRef)(0),(0,ea.default)(i,o.current)||(o.current=i,a.current+=1),(0,er.useMemo)(()=>o.current,[a.current]))),s.data}],313577)}]);
3
4//# debugId=8b655f9b-ec0d-837d-830e-d56780d1d335

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.