!function(e){var t={};function n(o){if(t[o])return t[o].exports;var s=t[o]={i:o,l:!1,exports:{}};return e[o].call(s.exports,s,s.exports,n),s.l=!0,s.exports}n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var s in e)n.d(o,s,function(t){return e[t]}.bind(null,s));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=2)}([function(e,t,n){const{promiseFinally:o,toError:s}=n(1);e.exports=class e{static set(t,n){return(new e).set(t,n)}static wrap(t,n,o){return(new e).wrap(t,n,o)}constructor(){this._id=null,this._delay=null}get id(){return this._id}get delay(){return this._delay}set(e,t=""){return new Promise((n,o)=>{this.clear();const r=t?()=>o(s(t)):n;this._id=setTimeout(r,e),this._delay=e})}wrap(e,t,n=""){const s=o(e,()=>this.clear()),r=this.set(t,n);return Promise.race([s,r])}clear(){this._id&&clearTimeout(this._id)}}},function(e,t){t.promiseFinally=(e,t)=>Promise.resolve(e).then(e=>(t(),e),e=>(t(),Promise.reject(e))),t.toError=e=>"string"==typeof(e="function"==typeof e?e():e)?new Error(e):e},function(e,t,n){"use strict";n.r(t);var o={creativeAssetExtensions:["avi","css","csv","eot","gif","ico","jpg","js","json","map","mov","mp4","mpeg","mpg","ogg","ogv","ott","pdf","png","svg","ttf","webmanifest","wmv","woff","woff2","xml"],noCacheHeaders:{"Cache-Control":"no-cache, no-store, must-revalidate",Expires:"Fri, 01 Jan 1970 00:00:00 GMT",Pragma:"no-cache"},lottery:function(e){return Math.round(Math.random()*parseInt(e))},parseCookies:function(e){const t={};return e.cookie&&e.cookie.split(";").forEach(e=>{if(e){const n=e.split("=");t[n[0].trim()]=n[1].trim()}}),t},queryStringParse:function(e){const t=new URLSearchParams(e);let n={};for(let e of t)n[e[0]]=e[1];return n}};const s={result:{status:2,token:null,title:null,position:null,live_position:null,promoted:null,urlRedirect:null,onsale:null,message:null,slug:null,priority:null,priorityAvailable:null,logo:null,responseID:null,captchaRequired:null,ttl:null}};var r={processResponse:async function(e){let t,n={};return t=await e,t?(200!==t.status?n.body=s:n.body=await e.json(),n.status=t.status,n.statusText=t.statusText,n.success=t.ok,n):(n.body=s,n.status=null,n.statusText="Communication failure between Cloudflare and the CrowdHandler API occured.",n.success=!1,n)}};const a=n(0);async function c(e){const{request:t}=e,n=Date.now(),s=o.creativeAssetExtensions,c=t.url,l=new URL(c),i=l.hostname,u=l.pathname,d=Object.fromEntries(t.headers),h=l.search,p=d["cf-connecting-ip"],f=d["user-agent"],m=/(.*\d+.*)/;let y,g;if(console.log(l),!0===/^\/ch\/.*/.test(u)){const e=await async function(e){let t,n="/"+e.queryString,o=e.path.substring(4);t=o?"https://wait.crowdhandler.com/"+o:"https://wait.crowdhandler.com"+n;let s=await caches.open("crowdhandler:cache"),r=await s.match(t);if(r)return console.log("Serving waiting room template from cache."),{response:r,useCache:!0};let c,l,i,u={headers:{"content-type":"text/html;charset=UTF-8"},method:"GET"},d=0,h=await async function e(){let n,o=new a;c=null;try{if(d++,n=await Promise.race([fetch(t,u),o.set(6e3,"API Communication Timed Out!")]),200!==n.status)throw`${n.status} ${n.statusText}`}catch(e){c=!0,console.error("Template Fetch Failure"),console.log(e)}finally{return o.clear(),!0===c&&d<3&&(console.log("Retrying Template Fetch."),await e()),n}}();return h?(l=await async function(e){const{headers:t}=e,n=t.get("content-type")||"";return n.includes("application/json")?JSON.stringify(await e.json()):(n.includes("application/text")||n.includes("text/html"),e.text())}(h),i={headers:{"content-type":"text/html;charset=UTF-8"},status:h.status,statusText:h.statusText}):(l="