PageSourceSearch

https://aerosolalliance.com/_next/static/chunks/346-20cf1e5b75b107ab.js

js aerosolalliance.com collected 2026-10-06 18:04:46 UTC 34,495 bytes, 39 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[346],{4917:function(e,t,r){/*!
2 * statuses
3 * Copyright(c) 2014 Jonathan Ong
4 * Copyright(c) 2016 Douglas Christopher Wilson
5 * MIT Licensed
6 */var n,i=r(855);function getStatusMessage(e){if(!Object.prototype.hasOwnProperty.call(status.message,e))throw Error("invalid status code: "+e);return status.message[e]}function status(e){if("number"==typeof e)return getStatusMessage(e);if("string"!=typeof e)throw TypeError("code must be a number or string");var t=parseInt(e,10);return isNaN(t)?function(e){var t=e.toLowerCase();if(!Object.prototype.hasOwnProperty.call(status.code,t))throw Error('invalid status message: "'+e+'"');return status.code[t]}(e):getStatusMessage(t)}e.exports=status,status.message=i,status.code=(n={},Object.keys(i).forEach(function(e){var t=i[e],r=Number(e);n[t.toLowerCase()]=r}),n),status.codes=Object.keys(i).map(function(e){return Number(e)}),status.redirect={300:!0,301:!0,302:!0,303:!0,305:!0,307:!0,308:!0},status.empty={204:!0,205:!0,304:!0},status.retry={502:!0,503:!0,504:!0}},3346:function(e,t,r){r.d(t,{i:function(){return SliceSimulator}});var n,i,s,o,c,u,l,d,p,h,f,_,g,y,v,m,S,T,w=r(7294),b=r(4917);let E=0,createRequestMessage=(e,t,r="")=>({requestID:`${r}${E++}`,type:e,data:t}),createSuccessResponseMessage=(e,t,r=200)=>{var n,i;if(r>=400)throw TypeError(`Invalid success status code, expected status to be within \`[100;400[\`, got \`${r}\``);return{requestID:e,status:r,msg:null!=(i=null==(n=b.message[r])?void 0:n.replace(/\.$/,"").toLowerCase())?i:"",data:t}},createErrorResponseMessage=(e,t,r=400)=>{var n,i;if(r<400)throw TypeError(`Invalid error status code, expected status to be within \`[500;600[\`, got \`${r}\``);return{requestID:e,status:r,msg:null!=(i=null==(n=b.message[r])?void 0:n.replace(/\.$/,"").toLowerCase())?i:"",error:t}},validateMessage=e=>{if("object"!=typeof e||null===e)throw TypeError(`Invalid message received, expected message to be of type \`object\`, got \`${typeof e}\``);if(Object.keys(e).every(e=>["requestID","type","data","status","msg","error"].includes(e))){if("string"!=typeof e.requestID)throw TypeError(`Invalid message received, expected \`message.requestID\` to be of type \`string\`, got \`${typeof e.id}\``)}else throw TypeError(`Invalid message received: ${JSON.stringify(e)}`);return e},isRequestMessage=e=>"type"in e,isResponseMessage=e=>!("type"in e),isSuccessResponseMessage=e=>isResponseMessage(e)&&!("error"in e);let ResponseError=class ResponseError extends Error{constructor(e){super(e.msg),this.response=e}};let TooManyConcurrentRequestsError=class TooManyConcurrentRequestsError extends Error{constructor(e){super("Too many concurrent requests"),this.request=e}};let RequestTimeoutError=class RequestTimeoutError extends Error{constructor(e){super(`Request \`${e.requestID}\` timed out`),this.request=e}};let NotReadyError=class NotReadyError extends Error{};let PortNotSetError=class PortNotSetError extends Error{constructor(){super("Port is not set")}};let I={debug:!1,maximumRequestConcurrency:20,defaultTimeout:5e3,requestIDPrefix:"channel-"};let ChannelNetwork=class ChannelNetwork{constructor(e,t){this._port=null,this._pendingRequests=new Map,this.requestHandlers=e,this.options={...I,...t}}get port(){if(!this._port)throw new PortNotSetError;return this._port}set port(e){this._port&&(this._port.onmessage=null),this._port=e,this._port&&(this._port.onmessage=this.onMessage.bind(this))}createRequestMessage(e,t){return createRequestMessage(e,t,this.options.requestIDPrefix)}async onMessage(e){this.options.debug&&console.debug(e.data);try{let t=validateMessage(e.data);if(isRequestMessage(t)){if(this.requestHandlers[t.type])try{let e=await this.requestHandlers[t.type](t,{success:createSuccessResponseMessage.bind(this,t.requestID),error:createErrorResponseMessage.bind(this,t.requestID)});this.postResponse(e)}catch(e){this.postResponse(createErrorResponseMessage(t.requestID,e,500))}else this.postResponse(createErrorResponseMessage(t.requestID,void 0,501))}else this._pendingRequests.has(t.requestID)?(this._pendingRequests.get(t.requestID)(t),this._pendingRequests.delete(t.requestID)):console.error(`Unknown request ID received in response: ${JSON.stringify(t)}`)}catch(e){if(e instanceof TypeError)console.warn(e.message);else throw e}}
6postRequest(e,t=e=>this.port.postMessage(e),r={}){if(this.options.debug&&console.debug(e),this._pendingRequests.size>=this.options.maximumRequestConcurrency)throw new TooManyConcurrentRequestsError(e);return new Promise((n,i)=>{let s=setTimeout(()=>{this._pendingRequests.has(e.requestID)&&this._pendingRequests.delete(e.requestID),i(new RequestTimeoutError(e))},r.timeout||this.options.defaultTimeout);this._pendingRequests.set(e.requestID,e=>{clearTimeout(s),isSuccessResponseMessage(e)?n(e):i(new ResponseError(e))}),t(e)})}postResponse(e,t=e=>this.port.postMessage(e)){return this.options.debug&&console.debug(e),t(e),e}};var M=((n=M||{}).Connect="connect",n),R=((i=R||{}).Ready="ready",i);let A={readyTimeout:2e4,requestIDPrefix:"receiver-"};let ChannelReceiver=class ChannelReceiver extends ChannelNetwork{constructor(e,t){super(e,{...A,...t}),this._ready=!1,window.addEventListener("message",e=>{this._onPublicMessage(e)})}async ready(){if(window.parent===window)throw Error("Receiver is currently not embedded as an iframe");this._ready=!1;let e=this.createRequestMessage(R.Ready,void 0),t=await this.postRequest(e,e=>{window.parent.postMessage(e,"*")},{timeout:this.options.readyTimeout});return this._ready=!0,t}_onPublicMessage(e){try{let t=validateMessage(e.data);if(isRequestMessage(t)){if(this.options.debug&&console.debug(e.data),t.type===M.Connect){this.port=e.ports[0];let{data:r}=t;this.options={...this.options,...r,debug:this.options.debug,requestIDPrefix:this.options.requestIDPrefix,readyTimeout:this.options.readyTimeout};let n=createSuccessResponseMessage(t.requestID,void 0);this.postResponse(n)}else this.postResponse(createErrorResponseMessage(t.requestID,void 0),t=>{e.source.postMessage(t,e.origin)})}else this._ready||this.onMessage(e)}catch(e){if(e instanceof TypeError);else throw e}}postFormattedRequest(e,t,r={}){if(!this._ready)throw new NotReadyError("Receiver is not ready, use `ChannelReceiver.ready()` first");return this.postRequest(this.createRequestMessage(e,t),void 0,r)}};var D=((s=D||{}).SetActiveSlice="setActiveSlice",s),P=((o=P||{}).Ping="ping",o.GetLibraries="getLibraries",o.SetSliceZone="setSliceZone",o.SetSliceZoneFromSliceIDs="setSliceZoneFromSliceIDs",o.ScrollToSlice="scrollToSlice",o);P.Ping,P.GetLibraries,P.SetSliceZone,P.SetSliceZoneFromSliceIDs,P.ScrollToSlice;let q={requestIDPrefix:"api-",activeSliceAPI:!1};let SimulatorAPI=class SimulatorAPI extends ChannelReceiver{constructor(e,t){var r,n;let i=(null==t?void 0:t.debug)||/[\?&]debug=true/i.test(decodeURIComponent(window.location.search));super({[P.Ping]:(e,t)=>t.success("pong"),...e},{...q,...t,debug:i}),this[T]=async e=>await this.postFormattedRequest(D.SetActiveSlice,e),i&&(window.prismic||(window.prismic={}),(r=window.prismic).sliceSimulator||(r.sliceSimulator={}),(n=window.prismic.sliceSimulator).api||(n.api=[]),window.prismic.sliceSimulator.api.push(this))}};T=D.SetActiveSlice;var __spreadArray=function(e,t,r){if(r||2==arguments.length)for(var n,i=0,s=t.length;i<s;i++)!n&&i in t||(n||(n=Array.prototype.slice.call(t,0,i)),n[i]=t[i]);return e.concat(n||Array.prototype.slice.call(t))},function_dual=function(e,t){var r="number"==typeof e?function(t){return t.length>=e}:e;return function(){var e=Array.from(arguments);return r(arguments)?t.apply(this,e):function(r){return t.apply(void 0,__spreadArray([r],e,!1))}}};function as(e){return function(t,r){return e.map(t,function(){return r})}}Object.prototype.hasOwnProperty;var Either_right=function(e){return{_tag:"Right",right:e}},Either_map=function(e){return function(t){return Either_isLeft(t)?t:Either_right(e(t.right))}},x={URI:"Either",map:function(e,t){return function(e,t,r,n,i,s,o,c,u){switch(arguments.length){case 1:return e;case 2:return t(e);case 3:return r(t(e));case 4:return n(r(t(e)));case 5:return i(n(r(t(e))));case 6:return s(i(n(r(t(e)))));case 7:return o(s(i(n(r(t(e))))));case 8:return c(o(s(i(n(r(t(e)))))));case 9:return(void 0)(c(o(s(i(n(r(t(e))))))));default:for(var l=arguments[0],d=1;d<arguments.length;d++)l=arguments[d](l);return l}}(e,Either_map(t))}};function_dual(2,as(x)),as(x);var Either_isLeft=function(e){return"Left"===e._tag}
6,N=(c=function(e,t){return(c=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function __(){this.constructor=e}c(e,t),e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)}),__assign=function(){return(__assign=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},es6_spreadArray=function(e,t,r){if(r||2==arguments.length)for(var n,i=0,s=t.length;i<s;i++)!n&&i in t||(n||(n=Array.prototype.slice.call(t,0,i)),n[i]=t[i]);return e.concat(n||Array.prototype.slice.call(t))},failures=function(e){return{_tag:"Left",left:e}},failure=function(e,t,r){return failures([{value:e,context:t,message:r}])},L=function(){function Type(e,t,r,n){this.name=e,this.is=t,this.validate=r,this.encode=n,this.decode=this.decode.bind(this)}return Type.prototype.pipe=function(e,t){var r=this;return void 0===t&&(t="pipe(".concat(this.name,", ").concat(e.name,")")),new Type(t,e.is,function(t,n){var i=r.validate(t,n);return Either_isLeft(i)?i:e.validate(i.right,n)},this.encode===es6_identity&&e.encode===es6_identity?es6_identity:function(t){return r.encode(e.encode(t))})},Type.prototype.asDecoder=function(){return this},Type.prototype.asEncoder=function(){return this},Type.prototype.decode=function(e){return this.validate(e,[{key:"",type:this,actual:e}])},Type}(),es6_identity=function(e){return e};function appendContext(e,t,r,n){for(var i=e.length,s=Array(i+1),o=0;o<i;o++)s[o]=e[o];return s[i]={key:t,type:r,actual:n},s}function pushAll(e,t){for(var r=t.length,n=0;n<r;n++)e.push(t[n])}var O=Object.prototype.hasOwnProperty;function getNameFromProps(e){return Object.keys(e).map(function(t){return"".concat(t,": ").concat(e[t].name)}).join(", ")}function useIdentity(e){for(var t=0;t<e.length;t++)if(e[t].encode!==es6_identity)return!1;return!0}function getInterfaceTypeName(e){return"{ ".concat(getNameFromProps(e)," }")}function getPartialTypeName(e){return"Partial<".concat(e,">")}function stripNonDomainKeys(e,t){for(var r=Object.keys(e),n=r.length,i=!1,s={},o=0;o<n;o++){var c=r[o];t.is(c)?s[c]=e[c]:i=!0}return i?s:e}function mergeAll(e,t){for(var r=!0,n=!0,i=!Z.is(e),s=0;s<t.length;s++){var o=t[s];o!==e&&(r=!1),Z.is(o)&&(n=!1)}if(r)return e;if(n)return t[t.length-1];for(var c={},u=0;u<t.length;u++){var o=t[u];for(var l in o)(!O.call(c,l)||i||o[l]!==e[l])&&(c[l]=o[l])}return c}function stripKeys(e,t){for(var r=Object.getOwnPropertyNames(e),n=!1,i={},s=0;s<r.length;s++){var o=r[s];O.call(t,o)?i[o]=e[o]:n=!0}return n?i:e}function isAnyC(e){return"AnyType"===e._tag}new(function(e){function NullType(){var t=e.call(this,"null",function(e){return null===e},function(e,r){return t.is(e)?Either_right(e):failure(e,r)},es6_identity)||this;return t._tag="NullType",t}return N(NullType,e),NullType}(L));var k=new(function(e){function UndefinedType(){var t=e.call(this,"undefined",function(e){return void 0===e},function(e,r){return t.is(e)?Either_right(e):failure(e,r)},es6_identity)||this;return t._tag="UndefinedType",t}return N(UndefinedType,e),UndefinedType}(L));new(function(e){function VoidType(){var t=e.call(this,"void",k.is,k.validate,es6_identity)||this;return t._tag="VoidType",t}return N(VoidType,e),VoidType}(L)),new(function(e){function UnknownType(){var t=e.call(this,"unknown",function(e){return!0},Either_right,es6_identity)||this;return t._tag="UnknownType",t}return N(UnknownType,e),UnknownType}(L));var C=new(function(e){function StringType(){var t=e.call(this,"string",function(e){return"string"==typeof e},function(e,r){return t.is(e)?Either_right(e):failure(e,r)},es6_identity)||this;return t._tag="StringType",t}return N(StringType,e),StringType}(L)),j=new(function(e){function NumberType(){var t=e.call(this,"number",function(e){return"number"==typeof e},function(e,r){return t.is(e)?Either_right(e):failure(e,r)},es6_identity)||this;return t._tag="NumberType",t}return N(NumberType,e),NumberType}(L));new(function(e){function BigIntType(){var t=e.call(this,"bigint",function(e){return"bigint"==typeof e},function(e,r){return t.is(e)?Either_right(e):failure(e,r)},es6_identity)||this;return t._tag="BigIntType",t}return N(BigIntType,e),BigIntType}(L)),new(function(e){function BooleanType(){var t=e.call(this,"boolean",function(e){return"boolean"==typeof e},function(e,r){return t.is(e)?Either_right(e):failure(e,r)},es6_identity)||this;return t._tag="BooleanType",t}return N(BooleanType,e),BooleanType}(L));var F=new(function(e){function AnyArrayType(){var t=e.call(this,"UnknownArray",Array.isArray,function(e,r){return t.is(e)?Either_right(e):failure(e,r)},es6_identity)||this;return t._tag="AnyArrayType",t}return N(AnyArrayType,e),AnyArrayType}(L)),Z=new(function(e){function AnyDictionaryType(){var t=e.call(this,"UnknownRecord",function(e){return null!==e&&"object"==typeof e&&!Array.isArray(e)},function(e,r){return t.is(e)?Either_right(e):failure(e,r)},es6_identity)||this;return t._tag="AnyDictionaryType",t}return N(AnyDictionaryType,e),AnyDictionaryType}(L));N(function(e,t,r,n,i){var s=u.call(this,e,t,r,n)||this;return s.value=i,s._tag="LiteralType",s},u=L),N(function(e,t,r,n,i){var s=l.call(this,e,t,r,n)||this;return s.keys=i,s._tag="KeyofType",s},l=L);var U=function(e){function RefinementType(t,r,n,i,s,o){var c=e.call(this,t,r,n,i)||this;return c.type=s,c.predicate=o,c._tag="RefinementType",c}return N(RefinementType,e),RefinementType}(L);refinement(j,function(e){return Number.isInteger(e)},"Int"),Object.defineProperty(function(e){function RecursiveType(t,r,n,i,s){var o=e.call(this,t,r,n,i)||this;return o.runDefinition=s,o._tag="RecursiveType",o}return N(RecursiveType,e),RecursiveType}(L).prototype,"type",{get:function(){return this.runDefinition()},enumerable:!0,configurable:!0});var $=function(e){function ArrayType(t,r,n,i,s){var o=e.call(this,t,r,n,i)||this;return o.type=s,o._tag="ArrayType",o}return N(ArrayType,e),ArrayType}(L),B=function(e){function InterfaceType(t,r,n,i,s){var o=e.call(this,t,r,n,i)||this;return o.props=s,o._tag="InterfaceType",o}return N(InterfaceType,e),InterfaceType}(L);function type(e,t){void 0===t&&(t=getInterfaceTypeName(e));var r=Object.keys(e),n=r.map(function(t){return e[t]}),i=r.length;return new B(t,function(e){if(Z.is(e)){for(var t=0;t<i;t++){var s=r[t],o=e[s];if(void 0===o&&!O.call(e,s)||!n[t].is(o))return!1}return!0}return!1},function(e,t){var s=Z.validate(e,t);if(Either_isLeft(s))return s;for(var o=s.right,c=o,u=[],l=0;l<i;l++){var d=r[l],p=c[d],h=n[l],f=h.validate(p,appendContext(t,d,h,p));if(Either_isLeft(f))pushAll(u,f.left);else{var _=f.right;
6_===p&&(void 0!==_||O.call(c,d))||(c===o&&(c=__assign({},o)),c[d]=_)}}return u.length>0?failures(u):Either_right(c)},useIdentity(n)?es6_identity:function(e){for(var t=__assign({},e),s=0;s<i;s++){var o=r[s],c=n[s].encode;c!==es6_identity&&(t[o]=c(e[o]))}return t},e)}var z=function(e){function PartialType(t,r,n,i,s){var o=e.call(this,t,r,n,i)||this;return o.props=s,o._tag="PartialType",o}return N(PartialType,e),PartialType}(L);function partial(e,t){void 0===t&&(t=getPartialTypeName(getInterfaceTypeName(e)));var r=Object.keys(e),n=r.map(function(t){return e[t]}),i=r.length;return new z(t,function(t){if(Z.is(t)){for(var n=0;n<i;n++){var s=r[n],o=t[s];if(void 0!==o&&!e[s].is(o))return!1}return!0}return!1},function(t,n){var s=Z.validate(t,n);if(Either_isLeft(s))return s;for(var o=s.right,c=o,u=[],l=0;l<i;l++){var d=r[l],p=c[d],h=e[d],f=h.validate(p,appendContext(n,d,h,p));if(Either_isLeft(f))void 0!==p&&pushAll(u,f.left);else{var _=f.right;_!==p&&(c===o&&(c=__assign({},o)),c[d]=_)}}return u.length>0?failures(u):Either_right(c)},useIdentity(n)?es6_identity:function(e){for(var t=__assign({},e),s=0;s<i;s++){var o=r[s],c=e[o];void 0!==c&&(t[o]=n[s].encode(c))}return t},e)}var K=function(e){function DictionaryType(t,r,n,i,s,o){var c=e.call(this,t,r,n,i)||this;return c.domain=s,c.codomain=o,c._tag="DictionaryType",c}return N(DictionaryType,e),DictionaryType}(L);function record(e,t,r){var n,i=function getDomainKeys(e){var t;if("LiteralType"===e._tag){var r=e.value;if(C.is(r))return(t={})[r]=null,t}else{if("KeyofType"===e._tag)return e.keys;if("UnionType"===e._tag){var n=e.types.map(function(e){return getDomainKeys(e)});return n.some(k.is)?void 0:Object.assign.apply(Object,es6_spreadArray([{}],n,!1))}}}(e);return i?function(e,t,r,n){void 0===n&&(n="{ [K in ".concat(t.name,"]: ").concat(r.name," }"));for(var i=e.length,s={},o=0;o<i;o++)s[e[o]]=r;var c=strict(s,n);return new K(n,function(e){return c.is(e)},c.validate,c.encode,t,r)}(Object.keys(i),e,t,r):(void 0===(n=r)&&(n="{ [K in ".concat(e.name,"]: ").concat(t.name," }")),new K(n,function(r){return Z.is(r)?Object.keys(r).every(function(n){return!e.is(n)||t.is(r[n])}):isAnyC(t)&&Array.isArray(r)},function(r,n){if(Z.is(r)){for(var i={},s=[],o=Object.keys(r),c=o.length,u=!1,l=0;l<c;l++){var d=o[l],p=r[d],h=e.validate(d,appendContext(n,d,e,d));if(Either_isLeft(h))u=!0;else{var f=h.right;u=u||f!==d,d=f;var _=t.validate(p,appendContext(n,d,t,p));if(Either_isLeft(_))pushAll(s,_.left);else{var g=_.right;u=u||g!==p,i[d]=g}}}return s.length>0?failures(s):Either_right(u?i:r)}return isAnyC(t)&&Array.isArray(r)?Either_right(r):failure(r,n)},e.encode===es6_identity&&t.encode===es6_identity?function(t){return stripNonDomainKeys(t,e)}:function(r){for(var n={},i=Object.keys(stripNonDomainKeys(r,e)),s=i.length,o=0;o<s;o++){var c=i[o];n[String(e.encode(c))]=t.encode(r[c])}return n},e,t))}var H=function(e){function UnionType(t,r,n,i,s){var o=e.call(this,t,r,n,i)||this;return o.types=s,o._tag="UnionType",o}return N(UnionType,e),UnionType}(L),V=function(e){function IntersectionType(t,r,n,i,s){var o=e.call(this,t,r,n,i)||this;return o.types=s,o._tag="IntersectionType",o}return N(IntersectionType,e),IntersectionType}(L);function intersection(e,t){void 0===t&&(t="(".concat(e.map(function(e){return e.name}).join(" & "),")"));var r=e.length;return new V(t,function(t){return e.every(function(e){return e.is(t)})},0===e.length?Either_right:function(t,n){for(var i=[],s=[],o=0;o<r;o++){var c=e[o],u=c.validate(t,appendContext(n,String(o),c,t));Either_isLeft(u)?pushAll(s,u.left):i.push(u.right)}return s.length>0?failures(s):Either_right(mergeAll(t,i))},0===e.length?es6_identity:function(t){return mergeAll(t,e.map(function(e){return e.encode(t)}))},e)}N(function(e,t,r,n,i){var s=d.call(this,e,t,r,n)||this;return s.types=i,s._tag="TupleType",s},d=L),N(function(e,t,r,n,i){var s=p.call(this,e,t,r,n)||this;return s.type=i,s._tag="ReadonlyType",s},p=L),N(function(e,t,r,n,i){var s=h.call(this,e,t,r,n)||this;return s.type=i,s._tag="ReadonlyArrayType",s},h=L);var strict=function(e,t){var r,n,i;return r=type(e),void 0===(n=t)&&(n="InterfaceType"===r._tag?"{| ".concat(get
6NameFromProps(r.props)," |}"):"PartialType"===r._tag?getPartialTypeName("{| ".concat(getNameFromProps(r.props)," |}")):"Exact<".concat(r.name,">")),i=function getProps(e){switch(e._tag){case"RefinementType":case"ReadonlyType":return getProps(e.type);case"InterfaceType":case"StrictType":case"PartialType":return e.props;case"IntersectionType":return e.types.reduce(function(e,t){return Object.assign(e,getProps(t))},{})}}(r),new G(n,r.is,function(e,t){var n=Z.validate(e,t);if(Either_isLeft(n))return n;var s=r.validate(e,t);return Either_isLeft(s)?s:Either_right(stripKeys(s.right,i))},function(e){return r.encode(stripKeys(e,i))},r)},G=function(e){function ExactType(t,r,n,i,s){var o=e.call(this,t,r,n,i)||this;return o.type=s,o._tag="ExactType",o}return N(ExactType,e),ExactType}(L);function refinement(e,t,r){return void 0===r&&(r="(".concat(e.name," | ").concat(t.displayName||t.name||"<function".concat(t.length,">"),")")),new U(r,function(r){return e.is(r)&&t(r)},function(r,n){var i=e.validate(r,n);if(Either_isLeft(i))return i;var s=i.right;return t(s)?Either_right(s):failure(s,n)},e.encode,e,t)}new(function(e){function FunctionType(){var t=e.call(this,"Function",function(e){return"function"==typeof e},function(e,r){return t.is(e)?Either_right(e):failure(e,r)},es6_identity)||this;return t._tag="FunctionType",t}return N(FunctionType,e),FunctionType}(L)),new(function(e){function NeverType(){var t=e.call(this,"never",function(e){return!1},function(e,t){return failure(e,t)},function(){throw Error("cannot encode never")})||this;return t._tag="NeverType",t}return N(NeverType,e),NeverType}(L)),new(function(e){function AnyType(){var t=e.call(this,"any",function(e){return!0},Either_right,es6_identity)||this;return t._tag="AnyType",t}return N(AnyType,e),AnyType}(L)),refinement(j,Number.isInteger,"Integer"),N(function(e,t,r,n,i,s){var o=f.call(this,e,t,r,n,i)||this;return o.tag=s,o},f=H),new(function(e){function ObjectType(){var t=e.call(this,"object",function(e){return null!==e&&"object"==typeof e},function(e,r){return t.is(e)?Either_right(e):failure(e,r)},es6_identity)||this;return t._tag="ObjectType",t}return N(ObjectType,e),ObjectType}(L)),N(function(e,t,r,n,i){var s=_.call(this,e,t,r,n)||this;return s.props=i,s._tag="StrictType",s},_=L);var J=r(3454);let Y=record(C,intersection([partial({name:C}),type({components:record(C,intersection([type({id:C,model:intersection([type({id:C,variations:(g=intersection([type({id:C}),partial({name:C})]),void 0===y&&(y="Array<".concat(g.name,">")),new $(y,function(e){return F.is(e)&&e.every(g.is)},function(e,t){var r=F.validate(e,t);if(Either_isLeft(r))return r;for(var n=r.right,i=n.length,s=n,o=[],c=0;c<i;c++){var u=n[c],l=g.validate(u,appendContext(t,String(c),g,u));if(Either_isLeft(l))pushAll(o,l.left);else{var d=l.right;d!==u&&(s===n&&(s=n.slice()),s[c]=d)}}return o.length>0?failures(o):Either_right(s)},g.encode===es6_identity?es6_identity:function(e){return e.map(g.encode)},g))}),partial({name:C})]),mocks:record(C,type({variation:C}))}),partial({name:C})]))})]));var X=((v=X||{}).ManagedState="managedState",v.Slices="slices",v.ActiveSlice="activeSlice",v.Message="message",v),Q=((m=Q||{}).Pending="pending",m.Loaded="loaded",m.Error="error",m);let getDefaultProps=()=>({state:{},zIndex:100,background:"#ffffff"}),getDefaultManagedState=()=>({data:null,status:Q.Pending,error:null}),getDefaultSlices=()=>[],getDefaultMessage=()=>"",W="slice-simulator",ee="slice-simulator--root",getSliceZoneDOM=e=>{let t=document.querySelector(`.${W} [data-slice-zone]`);if(t)return t.children.length!==e&&console.warn(`Flagged SliceZone has an unexpected number of children, found ${t.children.length} but expected ${e}. This might lead to unexpected behaviors. Are you sure you tagged the right element?`),t;if(!(t=document.querySelector(`.${W} .${ee}`)))return null;for(let r=0;r<5;r++){if(t.children.length===e)return t;if(t.children.length)t=t.children[0];else break}return null},getActiveSliceDOM=(e,t)=>{let r=document.elementsFromPoint(t.x,t.y).reverse(),n=r.indexOf(e);if(-1===n)return null;let i=r[n+1];return i||null},a=(e,t)=>`<a href="${e}" style="text-decoration: underline;">${t||e}<a>`,et=(S=`   _____ ___          _____ _                 __      __            
7  / ___// (_)_______ / ___/(_)___ ___  __  __/ /___ _/ /_____  _____
8  \\__ \\/ / / ___/ _ \\\\__ \\/ / __ \`__ \\/ / / / / __ \`/ __/ __ \\/ ___/
9 ___/ / / / /__/  __/__/ / / / / / / / /_/ / / /_/ / /_/ /_/ / /    
10/____/_/_/\\___/\\___/____/_/_/ /_/ /_/\\__,_/_/\\__,_/\\__/\\____/_/     
11                  / /_  __  __   / __ \\_____(_)________ ___  (_)____
12                 / __ \\/ / / /  / /_/ / ___/ / ___/ __ \`__ \\/ / ___/
13                / /_/ / /_/ /  / ____/ /  / (__  ) / / / / / / /__  
14               /_.___/\\__, /  /_/   /_/  /_/____/_/ /_/ /_/_/\\___/  
15                     /____/
16
17You're seeing this page because you're accessing Slice Simulator
18directly, e.g:
19
20  - ${a("http://localhost:3000/slice-simulator")}
21
22
23
24Slice Simulator is not meant to be accessed this way, to preview your
25slices, head over to Slice Machine UI:
26
27  - ${a("http://localhost:9999")}
28
29
30
31If you believe this is an error, please reach out to us:
32
33  - ${a("https://github.com/prismicio/slice-machine/issues/new/choose")}
34
35
36
37
38
39                                                - The Prismic team`,`<div style="word-spacing: initial; white-space: pre; line-height: initial; font-family: monospace; color: #ffffff; mix-blend-mode: difference; padding: 1rem; font-size: 1rem;">${S}</div>`);let EventEmitter=class EventEmitter{constructor(){this._listeners={}}on(e,t,r=null){var n;this._listeners[e]=[...null!=(n=this._listeners[e])?n:[],[t,r]]}off(e,t){var r;this._listeners[e]=(null!=(r=this._listeners[e])?r:[]).filter(([e,r])=>"function"==typeof t?e!==t:r!==t)}emit(e,t){var r;
39(null!=(r=this._listeners[e])?r:[]).forEach(e=>e[0](t))}};let throttle=(e,t=16)=>{let r=0,n=null;return function(...i){let s=Date.now(),o=s-r;o>=t?(e.apply(this,i),r=s):(n&&clearTimeout(n),n=setTimeout(()=>{e.apply(this,i),r=Date.now()},t-o))}};void 0===J&&(globalThis.process={env:{}});let StateManager=class StateManager extends EventEmitter{constructor(e=getDefaultManagedState(),t=getDefaultSlices()){super(),this._setActiveSlice=()=>{if(0===this.slices.length){this.activeSlice=null;return}let e=getSliceZoneDOM(this.slices.length);if(!e){this.activeSlice=null;return}let t=getActiveSliceDOM(e,this._mouse);if(!t){this.activeSlice=null;return}let r=Array.prototype.indexOf.call(e.children,t);this.activeSlice={rect:t.getBoundingClientRect(),sliceID:this.slices[r].slice_type,variationID:this.slices[r].variation,index:r}},this.setActiveSlice=throttle(this._setActiveSlice,16),this._setSliceZoneFromSliceIDsLastCall=null,this._managedState=e,this._slices=t,this._activeSlice=null,this._message="",this._mouse={x:0,y:0}}set managedState(e){this._managedState=e,this.emit(X.ManagedState,e)}get managedState(){return this._managedState}set slices(e){this._slices=e,this.message="",this.emit(X.Slices,e)}get slices(){return this._slices}set activeSlice(e){this._activeSlice=e,this.emit(X.ActiveSlice,e)}get activeSlice(){return this._activeSlice}set message(e){this._message=e,this.emit(X.Message,e)}get message(){return this._message}async init(e){this._managedState=await this.load(e),await this.forceSliceChunksDownload(),this.setDefaultSliceZone(),this.emit(X.ManagedState,this._managedState),window.addEventListener("mousemove",e=>{this._mouse={x:e.clientX,y:e.clientY}})}async load(e){try{let t=await ("function"==typeof e?e():e),r=Y.decode(t);if("Left"===r._tag)throw console.error(r.left),Error("State does not validate expected format, see console logs for detailed report");return{data:r.right,status:Q.Loaded,error:null}}catch(e){return console.error(e),{data:null,status:Q.Error,error:e}}}async reload(e){this.managedState=await this.load(e),this.recoverSliceZone()}_throwIfNotLoaded(e){var t;if(this.managedState.status===Q.Error)throw null!=(t=this.managedState.error)?t:Error("Unknown state error, see console logs for detailed report");if(this.managedState.status===Q.Pending||!this.managedState.data)throw Error(`\`StateManager.${e}()\` can only be called when the state is loaded, use \`StateManager.load()\` first`)}getLibraries(){return this._throwIfNotLoaded("getLibraries"),Object.entries(this.managedState.data).map(([e,t])=>{let r=t.components;return{path:e,slices:Object.values(r).map(e=>({id:e.id,name:e.name||e.id,variations:e.model.variations.map(e=>({id:e.id,name:e.name||e.id}))}))}})}getMocks(){return this._throwIfNotLoaded("getMocks"),Object.values(this.managedState.data).reduce((e,t)=>{let r=t.components;return Object.values(r).forEach(t=>{e[t.id]=Object.values(t.mocks).reduce((e,t)=>(e[t.variation]=t,e),{})}),e},{})}async forceSliceChunksDownload(){this.setSliceZoneFromSliceIDs(this.getLibraries().map(e=>e.slices.map(e=>({sliceID:e.id,variationID:e.variations[0].id}))).flat()),await new Promise(e=>setTimeout(e,0)),this.slices=[]}setDefaultSliceZone(){if(this._throwIfNotLoaded("setDefaultSliceZone"),"undefined"!=typeof window){let e=new URL(window.location.href);e.searchParams.has("sid")&&e.searchParams.has("vid")&&this.setSliceZoneFromSliceIDs([{sliceID:e.searchParams.get("sid"),variationID:e.searchParams.get("vid")}])}}recoverSliceZone(){this._setSliceZoneFromSliceIDsLastCall&&this.setSliceZoneFromSliceIDs(this._setSliceZoneFromSliceIDsLastCall)}setSliceZone(e){this._setSliceZoneFromSliceIDsLastCall=null,this.slices=e}setSliceZoneFromSliceIDs(e){this._setSliceZoneFromSliceIDsLastCall=e;let t=this.getMocks();this.slices=e.map(e=>{let r=e.sliceID,n=e.variationID;if(r in t&&n in t[r])return t[r][n]}).filter(Boolean)}};let disableEventHandler=e=>{e.preventDefault(),e.stopPropagation()},onClickHandler=e=>{e.path&&e.path.slice(0,5).some(e=>e instanceof HTMLAnchorElement)&&(e.preventDefault(),e.stopPropagation())},er=new class{constructor(e=getDefaultManagedState(),t=getDefaultSlices()){this.stateManager=new StateManager(e,t),this._api=null,this._initialized=!1}async init(e){if(this._initialized){await this.stateManager.reload(e);return}this._initialized=!0,await this.stateManager.init(e);try{await this._initAPI()}catch(e){e instanceof Error&&"Receiver is currently not embedded as an iframe"===e.message&&!this.stateManager.slices.length&&(this.stateManager.message=et),console.error(e);return}this._initListeners()}async _initAPI(){this._api=new SimulatorAPI({[P.GetLibraries]:(e,t)=>t.success(this.stateManager.getLibraries()),[P.SetSliceZone]:(e,t)=>
39(this.stateManager.setSliceZone(e.data),t.success()),[P.SetSliceZoneFromSliceIDs]:(e,t)=>(this.stateManager.setSliceZoneFromSliceIDs(e.data),t.success()),[P.ScrollToSlice]:(e,t)=>{var r;if(e.data.sliceIndex<0)return t.error("`sliceIndex` must be > 0",400);if(e.data.sliceIndex>=this.stateManager.slices.length)return t.error(`\`sliceIndex\` must be < ${this.stateManager.slices.length} (\`<SliceZone />\` current length)`,400);let n=getSliceZoneDOM(this.stateManager.slices.length);if(!n)return t.error("Failed to find `<SliceZone />`",500);this.stateManager.activeSlice=null;let i=n.children[e.data.sliceIndex];return i?(i.scrollIntoView({behavior:e.data.behavior,block:e.data.block,inline:e.data.inline}),(null==(r=this._api)?void 0:r.options.activeSliceAPI)&&setTimeout(this.stateManager.setActiveSlice,750),t.success()):t.error("Failed fo find slice at index $`{req.data.sliceIndex}` in `<SliceZone />`",500)}}),await this._api.ready()}_initListeners(){window.addEventListener("mousemove",()=>{var e;(null==(e=this._api)?void 0:e.options.activeSliceAPI)&&this.stateManager.setActiveSlice()}),window.addEventListener("resize",()=>{var e;(null==(e=this._api)?void 0:e.options.activeSliceAPI)&&this.stateManager.setActiveSlice()}),window.addEventListener("mousewheel",()=>{var e;(null==(e=this._api)?void 0:e.options.activeSliceAPI)&&setTimeout(this.stateManager.setActiveSlice,200)}),this.stateManager.on(X.Slices,()=>{var e;(null==(e=this._api)?void 0:e.options.activeSliceAPI)&&this.stateManager.setActiveSlice()}),this.stateManager.on(X.ActiveSlice,async e=>{if(this._api)try{await this._api.setActiveSlice(e)}catch(e){if(e instanceof ResponseError&&400===e.response.status)console.error(e.response);else throw e}})}},SliceSimulator=e=>{let t=getDefaultProps(),[r,n]=w.useState(getDefaultManagedState()),[i,s]=w.useState(getDefaultSlices()),[o,c]=w.useState(getDefaultMessage());w.useEffect(()=>(er.stateManager.on(X.ManagedState,e=>{n(e)},"simulator-managed-state"),er.stateManager.on(X.Slices,e=>{s(e)},"simulator-slices"),er.stateManager.on(X.Message,e=>{c(e)},"simulator-message"),er.init(e.state||t.state),()=>{er.stateManager.off(X.ManagedState,"simulator-managed-state"),er.stateManager.off(X.Slices,"simulator-slices"),er.stateManager.off(X.Message,"simulator-message")}),[]);let u=w.useRef(!1);return w.useEffect(()=>{u.current?er.stateManager.reload(e.state):u.current=!0},[e.state]),w.createElement("div",{className:[W,e.className].filter(Boolean).join(" "),style:{zIndex:void 0===e.zIndex?t.zIndex:e.zIndex,position:"fixed",top:0,left:0,width:"100%",height:"100vh",overflow:"auto",background:void 0===e.background?t.background:e.background}},o?w.createElement("article",{dangerouslySetInnerHTML:{__html:o}}):i.length?w.createElement("div",{id:"root",className:ee,style:r.status!==Q.Loaded?{display:"none"}:void 0,onClickCapture:onClickHandler,onSubmitCapture:disableEventHandler},e.sliceZone({slices:i})):null)}},855:function(e){e.exports=JSON.parse('{"100":"Continue","101":"Switching Protocols","102":"Processing","103":"Early Hints","200":"OK","201":"Created","202":"Accepted","203":"Non-Authoritative Information","204":"No Content","205":"Reset Content","206":"Partial Content","207":"Multi-Status","208":"Already Reported","226":"IM Used","300":"Multiple Choices","301":"Moved Permanently","302":"Found","303":"See Other","304":"Not Modified","305":"Use Proxy","307":"Temporary Redirect","308":"Permanent Redirect","400":"Bad Request","401":"Unauthorized","402":"Payment Required","403":"Forbidden","404":"Not Found","405":"Method Not Allowed","406":"Not Acceptable","407":"Proxy Authentication Required","408":"Request Timeout","409":"Conflict","410":"Gone","411":"Length Required","412":"Precondition Failed","413":"Payload Too Large","414":"URI Too Long","415":"Unsupported Media Type","416":"Range Not Satisfiable","417":"Expectation Failed","418":"I\'m a Teapot","421":"Misdirected Request","422":"Unprocessable Entity","423":"Locked","424":"Failed Dependency","425":"Too Early","426":"Upgrade Required","428":"Precondition Required","429":"Too Many Requests","431":"Request Header Fields Too Large","451":"Unavailable For Legal Reasons","500":"Internal Server Error","501":"Not Implemented","502":"Bad Gateway","503":"Service Unavailable","504":"Gateway Timeout","505":"HTTP Version Not Supported","506":"Variant Also Negotiates","507":"Insufficient Storage","508":"Loop Detected","509":"Bandwidth Limit Exceeded","510":"Not Extended","511":"Network Authentication Required"}')}}]);

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.