/*! * * PRC Parent Theme * * @author Seth Rubenstein * @version 0.1.0 * @link https://github.com/wpcomvip/pewresearch-org * @license GPL * * Copyright (c) 2023 Seth Rubenstein * * This software is released under the UNLICENSED License * https://opensource.org/licenses/UNLICENSED * * Compiled with the help of https://wpack.io * A zero setup Webpack Bundler Script for WordPress */!function(e){function r(r){for(var n,i,l=r[0],a=r[1],p=r[2],c=0,s=[];c=0&&(e._idleTimeoutId=setTimeout((function(){e._onTimeout&&e._onTimeout()}),t))},n(118),t.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==e&&e.setImmediate||this&&this.setImmediate,t.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==e&&e.clearImmediate||this&&this.clearImmediate}).call(this,n(25))},118:function(e,t,n){(function(e,t){!function(e,n){"use strict";if(!e.setImmediate){var r,o,i,a,u,c=1,l={},s=!1,f=e.document,d=Object.getPrototypeOf&&Object.getPrototypeOf(e);d=d&&d.setTimeout?d:e,"[object process]"==={}.toString.call(e.process)?r=function(e){t.nextTick((function(){m(e)}))}:function(){if(e.postMessage&&!e.importScripts){var t=!0,n=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=n,t}}()?(a="setImmediate$"+Math.random()+"$",u=function(t){t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(a)&&m(+t.data.slice(a.length))},e.addEventListener?e.addEventListener("message",u,!1):e.attachEvent("onmessage",u),r=function(t){e.postMessage(a+t,"*")}):e.MessageChannel?((i=new MessageChannel).port1.onmessage=function(e){m(e.data)},r=function(e){i.port2.postMessage(e)}):f&&"onreadystatechange"in f.createElement("script")?(o=f.documentElement,r=function(e){var t=f.createElement("script");t.onreadystatechange=function(){m(e),t.onreadystatechange=null,o.removeChild(t),t=null},o.appendChild(t)}):r=function(e){setTimeout(m,0,e)},d.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),n=0;n{Array.from(e.getElementsByClassName("vimeo-core-video")).forEach((e,t)=>{const n=new r.a(e);n.on("play",()=>(e=>{o.videoPlayers.forEach((t,n)=>{var r;n!==e&&(r=t.element.src,"true"===new URL(r).searchParams.get("autopause"))&&t.pause()})})(t)),o.videoPlayers.push(n)})};try{"undefined"!=typeof wp&&void 0!==wp.data&&"function"==typeof wp.data.subscribe&&wp.data.subscribe(()=>{wp.data.select("core/editor").getBlocks().filter(e=>"vimeo/create"===e.name).length!==o.videoPlayers.length&&(o.videoPlayers.forEach(e=>e.off("play")),o.videoPlayers=[],i(document.getElementById("editor")))}),window.jQuery(()=>i())}catch(e){console.error(e)}},25:function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},330:function(e,t,n){"use strict";n.r(t);var r=n(47),o=(n(325),n(73));Object(o.b)(),window.jQuery((function(){document.querySelectorAll('[data-js="vimeo-wc-video"]').forEach((function(e){e.classList.add("vimeo-wc-video");const t=JSON.parse(e.dataset.atts),n=new r.a(e.id,t);n.ready().then(()=>{const t=e.querySelector("iframe");if(!t)return;t.classList.add("vimeo-core-video");const r=Number.parseInt(t.width),o=Number.parseInt(t.height);if(r&&o&&(t.style.aspectRatio=`${r}/${o}`),"ontouchstart"in window||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0){const r=function(){t.classList.add("playing")},o=function(){t.classList.add("paused"),t.classList.remove("playing")};n.on("play",r),n.on("pause",o),e.addEventListener("click",()=>{n.play()})}})}))}));function i(e=".vimeo-wc__big-video iframe"){document.querySelectorAll(e).forEach(e=>{const t=new r.a(e);null==t||t.pause()})}function a(){document.querySelectorAll(".woocommerce-product-gallery .woocommerce-product-gallery__image").forEach(e=>{!function(e,t=(()=>{}),n=(()=>{})){new window.MutationObserver((function(e){for(const r of e)"attributes"===r.type&&(n(),"class"===r.attributeName&&t())})).observe(e,{attributes:!0})}(e,()=>{e.classList.contains("flex-active-slide")&&i(".vimeo-wc-video iframe")})})}const u=["autopause","autoplay","background","byline","color","controls","dnt","loop","maxheight","maxwidth","muted","pip","playsinline","portrait","quality","responsive","speed","texttrack","title","transparent"];try{window.jQuery((function(e){var t;if(e(".woocommerce-product-gallery"))if(window.PhotoSwipeUI_Default){function n(e){var t;const n=null===(t=e.src)||void 0===t?void 0:t.match(/#vimeo-wc/),r=document.querySelector(`[data-js="${e.src}"] iframe`);if(n&&r){const t=r.cloneNode(!0);Object(o.a)()&&(t.height=t.width="100%"),t.height=t.width="100%",e.html=`\n\t\t\t
\n\t\t\t\t${t.outerHTML}\n\t\t\t
`,delete e.src}}e(".woocommerce-product-gallery").on("wc-product-gallery-before-init",(function(t,r){e(r).on("mousedown",".flex-control-nav img",e=>{e.target.classList.contains("flex-active")||i(".vimeo-wc-video iframe")});const o=window.PhotoSwipeUI_Default;window.PhotoSwipeUI_Default=function(e,t){return e.items.forEach(n),e.listen("close",()=>{i(".vimeo-wc__big-video iframe")}),e.listen("beforeChange",()=>{i(".vimeo-wc__big-video iframe")}),e.listen("initialZoomIn",()=>{i(".vimeo-wc-video iframe")}),new o(e,t)}})),a()}else null!==(t=window.avadaLightBox)&&void 0!==t&&t.refresh_lightbox?(document.querySelectorAll(".vimeo-wc__gallery-video").forEach(e=>{e.style.position="relative";const t=JSON.parse(e.querySelector('[data-js="vimeo-wc-video"]').dataset.atts),n=document.createElement("a");n.href=function(e,t){const n=new URL(e);for(const e of Object.keys(t).sort()){const r=t[e];u.includes(e)&&null!=r&&n.searchParams.set(e,r)}return n}(t.url,t),n.dataset.rel="iLightbox[product-gallery]",n.dataset.title="",n.dataset.caption="",n.style.padding="5px",n.style.width="auto",n.style.position="absolute",n.style.top="1rem",n.style.right="1rem",n.style.zIndex="99",n.style.left="unset",n.style.fontSize="26px",n.style.height="52px",n.innerText="πŸ”",n.classList.add("avada-product-gallery-lightbox-trigger"),n.title="Open Vimeo Video in Lightbox",e.append(n)}),a()):a()}))}catch(e){console.error(e)}n(173)},47:function(e,t,n){"use strict";(function(e,n){function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{},t=e.id,n=e.url,r=t||n;if(!r)throw new Error("An id or url must be passed, either in an options object or as a data-vimeo-id or data-vimeo-url attribute.");if(c(r))return"https://vimeo.com/".concat(r);if(l(r))return r.replace("http:","https:");if(t)throw new TypeError("β€œ".concat(t,"” is not a valid video id."));throw new TypeError("β€œ".concat(r,"” is not a vimeo.com url."))}var f=void 0!==Array.prototype.indexOf,d="undefined"!=typeof window&&void 0!==window.postMessage;if(!(i||f&&d))throw new Error("Sorry, the Vimeo Player API is not available in this browser.");var h="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==e?e:"undefined"!=typeof self?self:{};!function(e){if(!e.WeakMap){var t=Object.prototype.hasOwnProperty,n=function(e,t,n){Object.defineProperty?Object.defineProperty(e,t,{configurable:!0,writable:!0,value:n}):e[t]=n};e.WeakMap=function(){function e(){if(void 0===this)throw new TypeError("Constructor WeakMap requires 'new'");if(n(this,"_id",i("_WeakMap")),arguments.length>0)throw new TypeError("WeakMap iterable is not supported")}function o(e,n){if(!r(e)||!t.call(e,"_id"))throw new TypeError(n+" method called on incompatible receiver "+typeof e)}function i(e){return e+"_"+a()+"."+a()}function a(){return Math.random().toString().substring(2)}return n(e.prototype,"delete",(function(e){if(o(this,"delete"),!r(e))return!1;var t=e[this._id];return!(!t||t[0]!==e||(delete e[this._id],0))})),n(e.prototype,"get",(function(e){if(o(this,"get"),r(e)){var t=e[this._id];return t&&t[0]===e?t[1]:void 0}})),n(e.prototype,"has",(function(e){if(o(this,"has"),!r(e))return!1;var t=e[this._id];return!(!t||t[0]!==e)})),n(e.prototype,"set",(function(e,t){if(o(this,"set"),!r(e))throw new TypeError("Invalid value used as weak map key");var i=e[this._id];return i&&i[0]===e?(i[1]=t,this):(n(e,this._id,[e,t]),this)})),n(e,"_polyfill",!0),e}()}function r(e){return Object(e)===e}}("undefined"!=typeof self?self:"undefined"!=typeof window?window:h);var m=function(e,t){return function(e){var t,r;r=function(){var e,t,r,o=Object.prototype.toString,i=void 0!==n?function(e){return n(e)}:setTimeout;try{Object.defineProperty({},"x",{}),e=function(e,t,n,r){return Object.defineProperty(e,t,{value:n,writable:!0,configurable:!1!==r})}}catch(t){e=function(e,t,n){return e[t]=n,e}}function a(e,n){r.add(e,n),t||(t=i(r.drain))}function u(e){var t,n=typeof e;return null==e||"object"!=n&&"function"!=n||(t=e.then),"function"==typeof t&&t}function c(){for(var e=0;e0&&a(c,n))}catch(e){f.call(new h(n),e)}}}function f(e){var t=this;t.triggered||(t.triggered=!0,t.def&&(t=t.def),t.msg=e,t.state=2,t.chain.length>0&&a(c,t))}function d(e,t,n,r){for(var o=0;o1&&void 0!==arguments[1]?arguments[1]:{};return b.reduce((function(t,n){var r=e.getAttribute("data-vimeo-".concat(n));return(r||""===r)&&(t[n]=""===r?1:r),t}),t)}function E(e,t){var n=e.html;if(!t)throw new TypeError("An element must be provided");if(null!==t.getAttribute("data-vimeo-initialized"))return t.querySelector("iframe");var r=document.createElement("div");return r.innerHTML=n,t.appendChild(r.firstChild),t.setAttribute("data-vimeo-initialized","true"),t.querySelector("iframe")}function T(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;return new Promise((function(r,o){if(!l(e))throw new TypeError("β€œ".concat(e,"” is not a vimeo.com url."));var i="https://vimeo.com/api/oembed.json?url=".concat(encodeURIComponent(e));for(var a in t)t.hasOwnProperty(a)&&(i+="&".concat(a,"=").concat(encodeURIComponent(t[a])));var u="XDomainRequest"in window?new XDomainRequest:new XMLHttpRequest;u.open("GET",i,!0),u.onload=function(){if(404!==u.status)if(403!==u.status)try{var t=JSON.parse(u.responseText);if(403===t.domain_status_code)return E(t,n),void o(new Error("β€œ".concat(e,"” is not embeddable.")));r(t)}catch(e){o(e)}else o(new Error("β€œ".concat(e,"” is not embeddable.")));else o(new Error("β€œ".concat(e,"” was not found.")))},u.onerror=function(){var e=u.status?" (".concat(u.status,")"):"";o(new Error("There was an error fetching the embed code from Vimeo".concat(e,".")))},u.send()}))}function _(e){if("string"==typeof e)try{e=JSON.parse(e)}catch(e){return console.warn(e),{}}return e}function P(e,t,n){if(e.element.contentWindow&&e.element.contentWindow.postMessage){var r={method:t};void 0!==n&&(r.value=n);var o=parseFloat(navigator.userAgent.toLowerCase().replace(/^.*msie (\d+).*$/,"$1"));o>=8&&o<10&&(r=JSON.stringify(r)),e.element.contentWindow.postMessage(r,e.origin)}}function x(e,t){var n,r=[];if((t=_(t)).event)"error"===t.event&&y(e,t.data.method).forEach((function(n){var r=new Error(t.data.message);r.name=t.data.name,n.reject(r),g(e,t.data.method,n)})),r=y(e,"event:".concat(t.event)),n=t.data;else if(t.method){var o=function(e,t){var n=y(e,t);if(n.length<1)return!1;var r=n.shift();return g(e,t,r),r}(e,t.method);o&&(r.push(o),n=t.value)}r.forEach((function(t){try{if("function"==typeof t)return void t.call(e,n);t.resolve(n)}catch(e){}}))}var M=new WeakMap,j=new WeakMap,I={},N=function(){function e(t){var n=this,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(r(this,e),window.jQuery&&t instanceof jQuery&&(t.length>1&&window.console&&console.warn&&console.warn("A jQuery object with multiple elements was passed, using the first element."),t=t[0]),"undefined"!=typeof document&&"string"==typeof t&&(t=document.getElementById(t)),!u(t))throw new TypeError("You must pass either a valid element or a valid id.");if("IFRAME"!==t.nodeName){var i=t.querySelector("iframe");i&&(t=i)}if("IFRAME"===t.nodeName&&!l(t.getAttribute("src")||""))throw new Error("The player element passed isn’t a Vimeo embed.");if(M.has(t))return M.get(t);this._window=t.ownerDocument.defaultView,this.element=t,this.origin="*";var a=new m((function(e,r){if(n._onMessage=function(t){if(l(t.origin)&&n.element.contentWindow===t.source){"*"===n.origin&&(n.origin=t.origin);var o=_(t.data);if(o&&"error"===o.event&&o.data&&"ready"===o.data.method){var i=new Error(o.data.message);return i.name=o.data.name,void r(i)}var a=o&&"ready"===o.event,u=o&&"ping"===o.method;if(a||u)return n.element.setAttribute("data-ready","true"),void e();x(n,o)}},n._window.addEventListener("message",n._onMessage),"IFRAME"!==n.element.nodeName){var i=k(t,o);T(s(i),i,t).then((function(e){var r=E(e,t);return n.element=r,n._originalElement=t,w(t,r),M.set(n.element,n),e})).catch(r)}}));if(j.set(this,a),M.set(this.element,this),"IFRAME"===this.element.nodeName&&P(this,"ping"),I.isEnabled){var c=function(){return I.exit()};I.on("fullscreenchange",(function(){I.isFullscreen?p(n,"event:exitFullscreen",c):g(n,"event:exitFullscreen",c),n.ready().then((function(){P(n,"fullscreenchange",I.isFullscreen)}))}))}return this}var t,n;return t=e,(n=[{key:"callMethod",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new m((function(r,o){return t.ready().then((function(){p(t,e,{resolve:r,reject:o}),P(t,e,n)})).catch(o)}))}},{key:"get",value:function(e){var t=this;return new m((function(n,r){return e=a(e,"get"),t.ready().then((function(){p(t,e,{resolve:n,reject:r}),P(t,e)})).catch(r)}))}},{key:"set",value:function(e,t){var n=this;return new m((function(r,o){if(e=a(e,"set"),null==t)throw new TypeError("There must be a value to set.");return n.ready().then((function(){p(n,e,{resolve:r,reject:o}),P(n,e,t)})).catch(o)}))}},{key:"on",value:function(e,t){if(!e)throw new TypeError("You must pass an event name.");if(!t)throw new TypeError("You must pass a callback function.");if("function"!=typeof t)throw new TypeError("The callback must be a function.");0===y(this,"event:".concat(e)).length&&this.callMethod("addEventListener",e).catch((function(){})),p(this,"event:".concat(e),t)}},{key:"off",value:function(e,t){if(!e)throw new TypeError("You must pass an event name.");if(t&&"function"!=typeof t)throw new TypeError("The callback must be a function.");g(this,"event:".concat(e),t)&&this.callMethod("removeEventListener",e).catch((function(e){}))}},{key:"loadVideo",value:function(e){return this.callMethod("loadVideo",e)}},{key:"ready",value:function(){var e=j.get(this)||new m((function(e,t){t(new Error("Unknown player. Probably unloaded."))}));return m.resolve(e)}},{key:"addCuePoint",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.callMethod("addCuePoint",{time:e,data:t})}},{key:"removeCuePoint",value:function(e){return this.callMethod("removeCuePoint",e)}},{key:"enableTextTrack",value:function(e,t){if(!e)throw new TypeError("You must pass a language.");return this.callMethod("enableTextTrack",{language:e,kind:t})}},{key:"disableTextTrack",value:function(){return this.callMethod("disableTextTrack")}},{key:"pause",value:function(){return this.callMethod("pause")}},{key:"play",value:function(){return this.callMethod("play")}},{key:"requestFullscreen",value:function(){return I.isEnabled?I.request(this.element):this.callMethod("requestFullscreen")}},{key:"exitFullscreen",value:function(){return I.isEnabled?I.exit():this.callMethod("exitFullscreen")}},{key:"getFullscreen",value:function(){return I.isEnabled?m.resolve(I.isFullscreen):this.get("fullscreen")}},{key:"requestPictureInPicture",value:function(){return this.callMethod("requestPictureInPicture")}},{key:"exitPictureInPicture",value:function(){return this.callMethod("exitPictureInPicture")}},{key:"getPictureInPicture",value:function(){return this.get("pictureInPicture")}},{key:"unload",value:function(){return this.callMethod("unload")}},{key:"destroy",value:function(){var e=this;return new m((function(t){if(j.delete(e),M.delete(e.element),e._originalElement&&(M.delete(e._originalElement),e._originalElement.removeAttribute("data-vimeo-initialized")),e.element&&"IFRAME"===e.element.nodeName&&e.element.parentNode&&(e.element.parentNode.parentNode&&e._originalElement&&e._originalElement!==e.element.parentNode?e.element.parentNode.parentNode.removeChild(e.element.parentNode):e.element.parentNode.removeChild(e.element)),e.element&&"DIV"===e.element.nodeName&&e.element.parentNode){e.element.removeAttribute("data-vimeo-initialized");var n=e.element.querySelector("iframe");n&&n.parentNode&&(n.parentNode.parentNode&&e._originalElement&&e._originalElement!==n.parentNode?n.parentNode.parentNode.removeChild(n.parentNode):n.parentNode.removeChild(n))}e._window.removeEventListener("message",e._onMessage),t()}))}},{key:"getAutopause",value:function(){return this.get("autopause")}},{key:"setAutopause",value:function(e){return this.set("autopause",e)}},{key:"getBuffered",value:function(){return this.get("buffered")}},{key:"getCameraProps",value:function(){return this.get("cameraProps")}},{key:"setCameraProps",value:function(e){return this.set("cameraProps",e)}},{key:"getChapters",value:function(){return this.get("chapters")}},{key:"getCurrentChapter",value:function(){return this.get("currentChapter")}},{key:"getColor",value:function(){return this.get("color")}},{key:"setColor",value:function(e){return this.set("color",e)}},{key:"getCuePoints",value:function(){return this.get("cuePoints")}},{key:"getCurrentTime",value:function(){return this.get("currentTime")}},{key:"setCurrentTime",value:function(e){return this.set("currentTime",e)}},{key:"getDuration",value:function(){return this.get("duration")}},{key:"getEnded",value:function(){return this.get("ended")}},{key:"getLoop",value:function(){return this.get("loop")}},{key:"setLoop",value:function(e){return this.set("loop",e)}},{key:"setMuted",value:function(e){return this.set("muted",e)}},{key:"getMuted",value:function(){return this.get("muted")}},{key:"getPaused",value:function(){return this.get("paused")}},{key:"getPlaybackRate",value:function(){return this.get("playbackRate")}},{key:"setPlaybackRate",value:function(e){return this.set("playbackRate",e)}},{key:"getPlayed",value:function(){return this.get("played")}},{key:"getQualities",value:function(){return this.get("qualities")}},{key:"getQuality",value:function(){return this.get("quality")}},{key:"setQuality",value:function(e){return this.set("quality",e)}},{key:"getSeekable",value:function(){return this.get("seekable")}},{key:"getSeeking",value:function(){return this.get("seeking")}},{key:"getTextTracks",value:function(){return this.get("textTracks")}},{key:"getVideoEmbedCode",value:function(){return this.get("videoEmbedCode")}},{key:"getVideoId",value:function(){return this.get("videoId")}},{key:"getVideoTitle",value:function(){return this.get("videoTitle")}},{key:"getVideoWidth",value:function(){return this.get("videoWidth")}},{key:"getVideoHeight",value:function(){return this.get("videoHeight")}},{key:"getVideoUrl",value:function(){return this.get("videoUrl")}},{key:"getVolume",value:function(){return this.get("volume")}},{key:"setVolume",value:function(e){return this.set("volume",e)}}])&&o(t.prototype,n),e}();i||(I=function(){var e=function(){for(var e,t=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]],n=0,r=t.length,o={};n0&&void 0!==arguments[0]?arguments[0]:document,t=[].slice.call(e.querySelectorAll("[data-vimeo-id], [data-vimeo-url]")),n=function(e){"console"in window&&console.error&&console.error("There was an error creating an embed: ".concat(e))};t.forEach((function(e){try{if(null!==e.getAttribute("data-vimeo-defer"))return;var t=k(e);T(s(t),t,e).then((function(t){return E(t,e)})).catch(n)}catch(e){n(e)}}))}(),function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document;if(!window.VimeoPlayerResizeEmbeds_){window.VimeoPlayerResizeEmbeds_=!0;var t=function(t){if(l(t.origin)&&t.data&&"spacechange"===t.data.event)for(var n=e.querySelectorAll("iframe"),r=0;r1)for(var n=1;n{document.querySelectorAll("iframe.vimeo-core-video").forEach(e=>{var t,n;const r=null!==(t=e.height)&&void 0!==t&&t.endsWith("%")?9:parseInt(e.height),o=null!==(n=e.width)&&void 0!==n&&n.endsWith("%")?16:parseInt(e.width),i=e.offsetWidth*r/o+"px";r&&o&&e.style.height!==i&&(e.style.height=i)})},1500)),r}}});; !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e=e||self).firebase=t()}(this,function(){"use strict";var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)};var n=function(){return(n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r"})}(i,n):"Error",a=this.serviceName+": "+s+" ("+o+").",c=new f(o,a),p=0,l=Object.keys(n);ps[0]&&e[1]=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}}}function _(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),s=[];try{for(;(void 0===e||0>6|192:(55296==(64512&i)&&r+1>18|240,e[n++]=i>>12&63|128):e[n++]=i>>12|224,e[n++]=i>>6&63|128),e[n++]=63&i|128)}return e}function a(t){try{return l.decodeString(t,!0)}catch(t){console.error("base64Decode failed: ",t)}return null}var h={NODE_CLIENT:!1,NODE_ADMIN:!1,SDK_VERSION:"${JSCORE_VERSION}"},C=function(t,e){if(!t)throw c(e)},c=function(t){return new Error("Firebase Database ("+h.SDK_VERSION+") INTERNAL ASSERT FAILED: "+t)},l={byteToCharMap_:null,charToByteMap_:null,byteToCharMapWebSafe_:null,charToByteMapWebSafe_:null,ENCODED_VALS_BASE:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",get ENCODED_VALS(){return this.ENCODED_VALS_BASE+"+/="},get ENCODED_VALS_WEBSAFE(){return this.ENCODED_VALS_BASE+"-_."},HAS_NATIVE_SUPPORT:"function"==typeof atob,encodeByteArray:function(t,e){if(!Array.isArray(t))throw Error("encodeByteArray takes an array as a parameter");this.init_();for(var n=e?this.byteToCharMapWebSafe_:this.byteToCharMap_,r=[],i=0;i>2,c=(3&o)<<4|a>>4,p=(15&a)<<2|l>>6,d=63&l;h||(d=64,s||(p=64)),r.push(n[u],n[c],n[p],n[d])}return r.join("")},encodeString:function(t,e){return this.HAS_NATIVE_SUPPORT&&!e?btoa(t):this.encodeByteArray(s(t),e)},decodeString:function(t,e){return this.HAS_NATIVE_SUPPORT&&!e?atob(t):function(t){for(var e=[],n=0,r=0;n>10)),e[r++]=String.fromCharCode(56320+(1023&s))}else{o=t[n++];var a=t[n++];e[r++]=String.fromCharCode((15&i)<<12|(63&o)<<6|63&a)}}return e.join("")}(this.decodeStringToByteArray(t,e))},decodeStringToByteArray:function(t,e){this.init_();for(var n=e?this.charToByteMapWebSafe_:this.charToByteMap_,r=[],i=0;i>4;if(r.push(l),64!==a){var u=s<<4&240|a>>2;if(r.push(u),64!==h){var c=a<<6&192|h;r.push(c)}}}return r},init_:function(){if(!this.byteToCharMap_){this.byteToCharMap_={},this.charToByteMap_={},this.byteToCharMapWebSafe_={},this.charToByteMapWebSafe_={};for(var t=0;t=this.ENCODED_VALS_BASE.length&&(this.charToByteMap_[this.ENCODED_VALS_WEBSAFE.charAt(t)]=t,this.charToByteMapWebSafe_[this.ENCODED_VALS.charAt(t)]=t)}}};function n(t){return function t(e,n){if(!(n instanceof Object))return n;switch(n.constructor){case Date:var r=n;return new Date(r.getTime());case Object:void 0===e&&(e={});break;case Array:e=[];break;default:return n}for(var i in n)n.hasOwnProperty(i)&&(e[i]=t(e[i],n[i]));return e}(void 0,t)}var p=(i.prototype.wrapCallback=function(n){var r=this;return function(t,e){t?r.reject(t):r.resolve(e),"function"==typeof n&&(r.promise.catch(function(){}),1===n.length?n(t):n(t,e))}},i);function i(){var n=this;this.reject=function(){},this.resolve=function(){},this.promise=new Promise(function(t,e){n.resolve=t,n.reject=e})}function d(){return"undefined"!=typeof window&&!!(window.cordova||window.phonegap||window.PhoneGap)&&/ios|iphone|ipod|ipad|android|blackberry|iemobile/i.test("undefined"!=typeof navigator&&"string"==typeof navigator.userAgent?navigator.userAgent:"")}function y(){return!0===h.NODE_ADMIN}var v,g=(t(m,v=Error),m);function m(t,e){var n=v.call(this,e)||this;return n.code=t,n.name="FirebaseError",Object.setPrototypeOf(n,m.prototype),Error.captureStackTrace&&Error.captureStackTrace(n,E.prototype.create),n}var E=(w.prototype.create=function(t){for(var e=[],n=1;n"})}(o,r):"Error",a=this.serviceName+": "+s+" ("+i+").",h=new g(i,a),l=0,u=Object.keys(r);l>>31)}var o,s,a=this.chain_[0],h=this.chain_[1],l=this.chain_[2],u=this.chain_[3],c=this.chain_[4];for(r=0;r<80;r++)s=r<40?r<20?(o=u^h&(l^u),1518500249):(o=h^l^u,1859775393):r<60?(o=h&l|u&(h|l),2400959708):(o=h^l^u,3395469782),i=(a<<5|a>>>27)+o+c+s+n[r]&4294967295,c=u,u=l,l=4294967295&(h<<30|h>>>2),h=a,a=i;this.chain_[0]=this.chain_[0]+a&4294967295,this.chain_[1]=this.chain_[1]+h&4294967295,this.chain_[2]=this.chain_[2]+l&4294967295,this.chain_[3]=this.chain_[3]+u&4294967295,this.chain_[4]=this.chain_[4]+c&4294967295},x.prototype.update=function(t,e){if(null!=t){void 0===e&&(e=t.length);for(var n=e-this.blockSize,r=0,i=this.buf_,o=this.inbuf_;r>i&255,++r;return t},x);function x(){this.chain_=[],this.buf_=[],this.W_=[],this.pad_=[],this.inbuf_=0,this.total_=0,this.blockSize=64,this.pad_[0]=128;for(var t=1;t 4. Need to update it?")}var i=t+" failed: ";return i+=r+" argument "}function A(t,e,n,r){if((!r||n)&&"function"!=typeof n)throw new Error(F(t,e,r)+"must be a valid function.")}function L(t,e,n,r){if((!r||n)&&("object"!=typeof n||null===n))throw new Error(F(t,e,r)+"must be a valid context object.")}function M(t){for(var e=0,n=0;n>6|192:(i<65536?e[n++]=i>>12|224:(e[n++]=i>>18|240,e[n++]=i>>12&63|128),e[n++]=i>>6&63|128),e[n++]=63&i|128)}return e}(t),n=new O;n.update(e);var r=n.digest();return l.encodeByteArray(r)}function X(t,e){C(!e||!0===t||!1===t,"Can't turn on custom loggers persistently."),!0===t?(lt.logLevel=W.VERBOSE,dt=lt.log.bind(lt),e&&ht.set("logging_enabled",!0)):"function"==typeof t?dt=t:(dt=null,ht.remove("logging_enabled"))}function $(){for(var t=[],e=0;e=Math.pow(2,-1022)?(n=(i=Math.min(Math.floor(Math.log(t)/Math.LN2),1023))+1023,Math.round(t*Math.pow(2,52-i)-Math.pow(2,52))):(n=0,Math.round(t/Math.pow(2,-1074)))),s=[],o=52;o;o-=1)s.push(r%2?1:0),r=Math.floor(r/2);for(o=11;o;o-=1)s.push(n%2?1:0),n=Math.floor(n/2);s.push(e?1:0),s.reverse(),a=s.join("");var h="";for(o=0;o<64;o+=8){var l=parseInt(a.substr(o,8),2).toString(16);1===l.length&&(l="0"+l),h+=l}return h.toLowerCase()}function Et(t){try{t()}catch(e){setTimeout(function(){var t=e.stack||"";throw et("Exception was thrown by user callback.",t),e},Math.floor(0))}}function wt(t,e){var n=setTimeout(t,e);return"object"==typeof n&&n.unref&&n.unref(),n}var bt=new RegExp("^-?(0*)\\d{1,10}$"),St=function(t){if(bt.test(t)){var e=Number(t);if(-2147483648<=e&&e<=2147483647)return e}return null},Tt=(Object.defineProperty(It,"Empty",{get:function(){return new It("")},enumerable:!0,configurable:!0}),It.prototype.getFront=function(){return this.pieceNum_>=this.pieces_.length?null:this.pieces_[this.pieceNum_]},It.prototype.getLength=function(){return this.pieces_.length-this.pieceNum_},It.prototype.popFront=function(){var t=this.pieceNum_;return t=this.pieces_.length)return null;for(var t=[],e=this.pieceNum_;e=this.pieces_.length},It.relativePath=function(t,e){var n=t.getFront(),r=e.getFront();if(null===n)return e;if(n===r)return It.relativePath(t.popFront(),e.popFront());throw new Error("INTERNAL ERROR: innerPath ("+e+") is not within outerPath ("+t+")")},It.comparePaths=function(t,e){for(var n=t.slice(),r=e.slice(),i=0;it.getLength())return!1;for(;eRt.MAX_PATH_LENGTH_BYTES)throw new Error(this.errorPrefix_+"has a key path longer than "+Rt.MAX_PATH_LENGTH_BYTES+" bytes ("+this.byteLength_+").");if(this.parts_.length>Rt.MAX_PATH_DEPTH)throw new Error(this.errorPrefix_+"path specified exceeds the maximum depth that can be written ("+Rt.MAX_PATH_DEPTH+") or object contains a cycle "+this.toErrorString())},Rt.prototype.toErrorString=function(){return 0==this.parts_.length?"":"in property '"+this.parts_.join(".")+"'"},Rt);function Rt(t,e){this.errorPrefix_=e,this.parts_=t.slice(),this.byteLength_=Math.max(1,this.parts_.length);for(var n=0;n"),t},kt.prototype.toURLString=function(){return(this.secure?"https://":"http://")+this.host},kt);function kt(t,e,n,r,i,o){void 0===i&&(i=""),void 0===o&&(o=!1),this.secure=e,this.namespace=n,this.webSocketOnly=r,this.persistenceKey=i,this.includeNamespaceInQueryParams=o,this.host=t.toLowerCase(),this.domain=this.host.substr(this.host.indexOf(".")+1),this.internalHost=at.get("host:"+t)||this.host}function Ft(t){var e=Kt(t),n=e.namespace;"firebase"===e.domain&&tt(e.host+" is no longer supported. Please use .firebaseio.com instead"),n&&"undefined"!=n||"localhost"===e.domain||tt("Cannot parse Firebase url. Please use https://.firebaseio.com"),e.secure||"undefined"!=typeof window&&window.location&&window.location.protocol&&-1!==window.location.protocol.indexOf("https:")&&et("Insecure Firebase access from a secure page. Please use https in calls to new Firebase().");var r="ws"===e.scheme||"wss"===e.scheme;return{repoInfo:new xt(e.host,e.secure,n,r,"",n!=e.subdomain),path:new Tt(e.pathString)}}function At(t){return"string"==typeof t&&0!==t.length&&!Yt.test(t)}function Lt(t){return"string"==typeof t&&0!==t.length&&!zt.test(t)}function Mt(t){return null===t||"string"==typeof t||"number"==typeof t&&!nt(t)||t&&"object"==typeof t&&N(t,".sv")}function Wt(t,e,n,r,i){i&&void 0===n||Xt(F(t,e,i),n,r)}function Qt(t,e,n,r,i){if(!i||void 0!==n){var o=F(t,e,i);if(!n||"object"!=typeof n||Array.isArray(n))throw new Error(o+" must be an object containing the children to replace.");var s=[];mt(n,function(t,e){var n=new Tt(t);if(Xt(o,e,r.child(n)),".priority"===n.getBack()&&!Mt(e))throw new Error(o+"contains an invalid value for '"+n.toString()+"', which must be a valid Firebase priority (a string, finite number, server value, or null).");s.push(n)}),function(t,e){var n,r;for(n=0;nGt/3&&M(t)>Gt)throw new Error(n+"contains a string greater than "+Gt+" utf8 bytes "+r.toErrorString()+" ('"+t.substring(0,50)+"...')");if(t&&"object"==typeof t){var i=!1,o=!1;if(mt(t,function(t,e){if(".value"===t)i=!0;else if(".priority"!==t&&".sv"!==t&&(o=!0,!At(t)))throw new Error(n+" contains an invalid key ("+t+") "+r.toErrorString()+'. Keys must be non-empty strings and can\'t contain ".", "#", "$", "/", "[", or "]"');r.push(t),Xt(n,e,r),r.pop()}),i&&o)throw new Error(n+' contains ".value" child '+r.toErrorString()+" in addition to actual children.")}},$t=(Jt.prototype.cancel=function(t){k("OnDisconnect.cancel",0,1,arguments.length),A("OnDisconnect.cancel",1,t,!0);var e=new p;return this.repo_.onDisconnectCancel(this.path_,e.wrapCallback(t)),e.promise},Jt.prototype.remove=function(t){k("OnDisconnect.remove",0,1,arguments.length),Bt("OnDisconnect.remove",this.path_),A("OnDisconnect.remove",1,t,!0);var e=new p;return this.repo_.onDisconnectSet(this.path_,null,e.wrapCallback(t)),e.promise},Jt.prototype.set=function(t,e){k("OnDisconnect.set",1,2,arguments.length),Bt("OnDisconnect.set",this.path_),Wt("OnDisconnect.set",1,t,this.path_,!1),A("OnDisconnect.set",2,e,!0);var n=new p;return this.repo_.onDisconnectSet(this.path_,t,n.wrapCallback(e)),n.promise},Jt.prototype.setWithPriority=function(t,e,n){k("OnDisconnect.setWithPriority",2,3,arguments.length),Bt("OnDisconnect.setWithPriority",this.path_),Wt("OnDisconnect.setWithPriority",1,t,this.path_,!1),qt("OnDisconnect.setWithPriority",2,e,!1),A("OnDisconnect.setWithPriority",3,n,!0);var r=new p;return this.repo_.onDisconnectSetWithPriority(this.path_,t,e,r.wrapCallback(n)),r.promise},Jt.prototype.update=function(t,e){if(k("OnDisconnect.update",1,2,arguments.length),Bt("OnDisconnect.update",this.path_),Array.isArray(t)){for(var n={},r=0;rthis.lastWriteId_,"Stacking an older write on top of newer ones"),void 0===r&&(r=!0),this.allWrites_.push({path:t,snap:e,writeId:n,visible:r}),r&&(this.visibleWrites_=this.visibleWrites_.addWrite(t,e)),this.lastWriteId_=n},lr.prototype.addMerge=function(t,e,n){C(n>this.lastWriteId_,"Stacking an older merge on top of newer ones"),this.allWrites_.push({path:t,children:e,writeId:n,visible:!0}),this.visibleWrites_=this.visibleWrites_.addWrites(t,e),this.lastWriteId_=n},lr.prototype.getWrite=function(t){for(var e=0;edocument.domain="'+document.domain+'";<\/script>');var o=""+i+"";try{this.myIFrame.doc.open(),this.myIFrame.doc.write(o),this.myIFrame.doc.close()}catch(t){$("frame writing exception"),t.stack&&$(t.stack),$(t)}}var Yr="";var zr=null;"undefined"!=typeof MozWebSocket?zr=MozWebSocket:"undefined"!=typeof WebSocket&&(zr=WebSocket);var Gr=(Xr.connectionURL_=function(t,e,n){var r={v:"5"};return"undefined"!=typeof location&&location.href&&-1!==location.href.indexOf(Pt)&&(r.r="f"),e&&(r.s=e),n&&(r.ls=n),t.connectionURL(Dt,r)},Xr.prototype.open=function(t,e){var n=this;this.onDisconnect=e,this.onMessage=t,this.log_("Websocket connecting to "+this.connURL),this.everConnected_=!1,at.set("previous_websocket_failure",!0);try{if(y()){var r=h.NODE_ADMIN?"AdminNode":"Node",i={headers:{"User-Agent":"Firebase/5/"+Yr+"/"+process.platform+"/"+r}},o=process.env,s=0==this.connURL.indexOf("wss://")?o.HTTPS_PROXY||o.https_proxy:o.HTTP_PROXY||o.http_proxy;s&&(i.proxy={origin:s}),this.mySock=new zr(this.connURL,[],i)}else this.mySock=new zr(this.connURL)}catch(t){this.log_("Error instantiating WebSocket.");var a=t.message||t.data;return a&&this.log_(a),void this.onClosed_()}this.mySock.onopen=function(){n.log_("Websocket connected."),n.everConnected_=!0},this.mySock.onclose=function(){n.log_("Websocket connection was disconnected."),n.mySock=null,n.onClosed_()},this.mySock.onmessage=function(t){n.handleIncomingFrame(t)},this.mySock.onerror=function(t){n.log_("WebSocket error. Closing connection.");var e=t.message||t.data;e&&n.log_(e),n.onClosed_()}},Xr.prototype.start=function(){},Xr.forceDisallow=function(){Xr.forceDisallow_=!0},Xr.isAvailable=function(){var t=!1;if("undefined"!=typeof navigator&&navigator.userAgent){var e=navigator.userAgent.match(/Android ([0-9]{0,}\.[0-9]{0,})/);e&&1=ui.MAX_TRANSACTION_RETRIES_)l=!0,u="maxretry",i=i.concat(this.serverSyncTree_.ackUserWrite(a.currentWriteId,!0));else{var c=this.getLatestState_(a.path,o);a.currentInputSnapshot=c;var p=t[s].update(c.val());if(void 0!==p){Xt("transaction failed: Data returned ",p,a.path);var d=$e(p);"object"==typeof p&&null!=p&&N(p,".priority")||(d=d.updatePriority(c.getPriority()));var f=a.currentWriteId,_=this.generateServerValues(),y=wn(d,_);a.currentOutputSnapshotRaw=d,a.currentOutputSnapshotResolved=y,a.currentWriteId=this.getNextWriteId_(),o.splice(o.indexOf(f),1),i=(i=i.concat(this.serverSyncTree_.applyUserOverwrite(a.path,y,a.currentWriteId,a.applyLocally))).concat(this.serverSyncTree_.ackUserWrite(f,!0))}else l=!0,u="nodata",i=i.concat(this.serverSyncTree_.ackUserWrite(a.currentWriteId,!0))}if(this.eventQueue_.raiseEventsForChangedPath(e,i),i=[],l&&(t[s].status=Ei.COMPLETED,n=t[s].unwatcher,setTimeout(n,Math.floor(0)),t[s].onComplete))if("nodata"===u){var v=new mi(this,t[s].path),g=t[s].currentInputSnapshot,m=new rn(g,v,Se);r.push(t[s].onComplete.bind(null,null,!1,m))}else r.push(t[s].onComplete.bind(null,new Error(u),!1,null))}this.pruneCompletedTransactionsBelowNode_(this.transactionQueueTree_);for(s=0;s>>0),b=0;function y(t,e,n){return t.call.apply(t.bind,arguments)}function w(e,n,t){if(!e)throw Error();if(2"}else o=void 0===t?"undefined":null===t?"null":typeof t;O("Argument is not a %s (or a non-Element, non-Location mock); got: %s",e,o)}}R.prototype.add=function(t,e){var n=D.get();n.set(t,e),this.b?this.b.next=n:this.a=n,this.b=n},C.prototype.set=function(t,e){this.a=t,this.b=e,this.next=null},C.prototype.reset=function(){this.next=this.b=this.a=null};var x=Array.prototype.indexOf?function(t,e){return Array.prototype.indexOf.call(t,e,void 0)}:function(t,e){if(h(t))return h(e)&&1==e.length?t.indexOf(e,0):-1;for(var n=0;n/g,lt=/"/g,ft=/'/g,dt=/\x00/g,pt=/[\x00&<>"']/;function vt(t,e){return-1!=t.indexOf(e)}function mt(t,e){return t");var Rt,Dt,Ct=Pt("");function Lt(t,e){for(var n=t.split("%s"),i="",r=Array.prototype.slice.call(arguments,1);r.length&&1")&&(t=t.replace(ht,">")),-1!=t.indexOf('"')&&(t=t.replace(lt,""")),-1!=t.indexOf("'")&&(t=t.replace(ft,"'")),-1!=t.indexOf("\0")&&(t=t.replace(dt,"�"))),t}function Mt(t){l.setTimeout(function(){throw t},0)}function jt(){var t=l.MessageChannel;if(void 0===t&&"undefined"!=typeof window&&window.postMessage&&window.addEventListener&&!St("Presto")&&(t=function(){var t=document.createElement("IFRAME");t.style.display="none",function(t){var e=at(z(Q));L(t,"HTMLIFrameElement"),t.src=et(e).toString()}(t),document.documentElement.appendChild(t);var e=t.contentWindow;(t=e.document).open(),t.write(Ot(Ct)),t.close();var n="callImmediate"+Math.random(),i="file:"==e.location.protocol?"*":e.location.protocol+"//"+e.location.host;t=I(function(t){"*"!=i&&t.origin!=i||t.data!=n||this.port1.onmessage()},this),e.addEventListener("message",t,!1),this.port1={},this.port2={postMessage:function(){e.postMessage(n,i)}}}),void 0===t||St("Trident")||St("MSIE"))return"undefined"!=typeof document&&"onreadystatechange"in document.createElement("SCRIPT")?function(t){var e=document.createElement("SCRIPT");e.onreadystatechange=function(){e.onreadystatechange=null,e.parentNode.removeChild(e),e=null,t(),t=null},document.documentElement.appendChild(e)}:function(t){l.setTimeout(t,0)};var e=new t,n={},i=n;return e.port1.onmessage=function(){if(void 0!==n.next){var t=(n=n.next).yb;n.yb=null,t()}},function(t){i.next={yb:t},i=i.next,e.port2.postMessage(0)}}function Ut(t,e){Dt||function(){if(l.Promise&&l.Promise.resolve){var t=l.Promise.resolve(void 0);Dt=function(){t.then(Kt)}}else Dt=function(){var t=Kt;!m(l.setImmediate)||l.Window&&l.Window.prototype&&!St("Edge")&&l.Window.prototype.setImmediate==l.setImmediate?(Rt=Rt||jt())(t):l.setImmediate(t)}}(),Vt||(Dt(),Vt=!0),Ft.add(t,e)}Pt("
");var Vt=!1,Ft=new R;function Kt(){for(var t;n=e=void 0,n=null,(e=Ft).a&&(n=e.a,e.a=e.a.next,e.a||(e.b=null),n.next=null),t=n;){try{t.a.call(t.b)}catch(t){Mt(t)}P(D,t)}var e,n;Vt=!1}function qt(t,e){if(this.a=Ht,this.i=void 0,this.f=this.b=this.c=null,this.g=this.h=!1,t!=d)try{var n=this;t.call(e,function(t){ee(n,Bt,t)},function(t){if(!(t instanceof ue))try{if(t instanceof Error)throw t;throw Error("Promise rejected.")}catch(t){}ee(n,Gt,t)})}catch(t){ee(this,Gt,t)}}var Ht=0,Bt=2,Gt=3;function Wt(){this.next=this.f=this.b=this.g=this.a=null,this.c=!1}Wt.prototype.reset=function(){this.f=this.b=this.g=this.a=null,this.c=!1};var Xt=new _(function(){return new Wt},function(t){t.reset()});function Jt(t,e,n){var i=Xt.get();return i.g=t,i.b=e,i.f=n,i}function Yt(t){if(t instanceof qt)return t;var e=new qt(d);return ee(e,Bt,t),e}function zt(n){return new qt(function(t,e){e(n)})}function $t(t,e,n){ne(t,e,n,null)||Ut(T(e,t))}function Zt(n){return new qt(function(i){var r=n.length,o=[];if(r)for(var t=function(t,e,n){r--,o[t]=e?{Gb:!0,value:n}:{Gb:!1,reason:n},0==r&&i(o)},e=0;eparseFloat(Te)){de=String(ke);break t}}de=Te}var Ae,Se={};function Ne(s){return function(t,e){var n=Se;return Object.prototype.hasOwnProperty.call(n,t)?n[t]:n[t]=e(t)}(s,function(){for(var t=0,e=st(String(de)).split("."),n=st(String(s)).split("."),i=Math.max(e.length,n.length),r=0;0==t&&r>>0);function en(e){return m(e)?e:(e[tn]||(e[tn]=function(t){return e.handleEvent(t)}),e[tn])}function nn(){ce.call(this),this.u=new Ve(this),(this.Sb=this).Wa=null}function rn(t,e,n,i,r){t.u.add(String(e),n,!1,i,r)}function on(t,e,n,i,r){t.u.add(String(e),n,!0,i,r)}function an(t,e,n,i){if(!(e=t.u.a[String(e)]))return!0;e=e.concat();for(var r=!0,o=0;o>4&15).toString(16)+(15&t).toString(16)}vn.prototype.toString=function(){var t=[],e=this.f;e&&t.push(kn(e,Sn,!0),":");var n=this.b;return!n&&"file"!=e||(t.push("//"),(e=this.i)&&t.push(kn(e,Sn,!0),"@"),t.push(encodeURIComponent(String(n)).replace(/%25([0-9a-fA-F]{2})/g,"%$1")),null!=(n=this.l)&&t.push(":",String(n))),(n=this.c)&&(this.b&&"/"!=n.charAt(0)&&t.push("/"),t.push(kn(n,"/"==n.charAt(0)?On:Nn,!0))),(n=this.a.toString())&&t.push("?",n),(n=this.g)&&t.push("#",kn(n,Pn)),t.join("")},vn.prototype.resolve=function(t){var e=new vn(this),n=!!t.f;n?mn(e,t.f):n=!!t.i,n?e.i=t.i:n=!!t.b,n?e.b=t.b:n=null!=t.l;var i=t.c;if(n)gn(e,t.l);else if(n=!!t.c){if("/"!=i.charAt(0))if(this.b&&!this.c)i="/"+i;else{var r=e.c.lastIndexOf("/");-1!=r&&(i=e.c.substr(0,r+1)+i)}if(".."==(r=i)||"."==r)i="";else if(vt(r,"./")||vt(r,"/.")){i=0==r.lastIndexOf("/",0),r=r.split("/");for(var o=[],a=0;a2*t.c&&fn(t)))}function xn(t,e){return Dn(t),e=Un(t,e),dn(t.a.b,e)}function Mn(t,e,n){Ln(t,e),0"),o=o.join("")}return o=r.createElement(o),a&&(h(a)?o.className=a:p(a)?o.className=a.join(" "):Kn(o,a)),2'),a.document.write(Ot(t)),a.document.close())):(a=i.open(bt(e).toString(),n,a))&&t.noopener&&(a.opener=null),a)try{a.focus()}catch(t){}return a}var ni=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/,ii=/^[^@]+@[^@]+$/;function ri(){var e=null;return new qt(function(t){"complete"==l.document.readyState?t():(e=function(){t()},We(window,"load",e))}).s(function(t){throw Xe(window,"load",e),t})}function oi(t){return t=t||vi(),!("file:"!==wi()||!t.toLowerCase().match(/iphone|ipad|ipod|android/))}function ai(){var t=l.window;try{return!(!t||t==t.top)}catch(t){return!1}}function si(){return void 0!==l.WorkerGlobalScope&&"function"==typeof l.importScripts}function ui(){return fl.INTERNAL.hasOwnProperty("reactNative")?"ReactNative":fl.INTERNAL.hasOwnProperty("node")?"Node":si()?"Worker":"Browser"}function ci(){var t=ui();return"ReactNative"===t||"Node"===t}var hi="Firefox",li="Chrome";function fi(t){var e=t.toLowerCase();return vt(e,"opera/")||vt(e,"opr/")||vt(e,"opios/")?"Opera":vt(e,"iemobile")?"IEMobile":vt(e,"msie")||vt(e,"trident/")?"IE":vt(e,"edge/")?"Edge":vt(e,"firefox/")?hi:vt(e,"silk/")?"Silk":vt(e,"blackberry")?"Blackberry":vt(e,"webos")?"Webos":!vt(e,"safari/")||vt(e,"chrome/")||vt(e,"crios/")||vt(e,"android")?!vt(e,"chrome/")&&!vt(e,"crios/")||vt(e,"edge/")?vt(e,"android")?"Android":(t=t.match(/([a-zA-Z\d\.]+)\/[a-zA-Z\d\.]*$/))&&2==t.length?t[1]:"Other":li:"Safari"}var di={Vc:"FirebaseCore-web",Xc:"FirebaseUI-web"};function pi(t,e){e=e||[];var n,i=[],r={};for(n in di)r[di[n]]=!0;for(n=0;n>4),64!=a&&(t(o<<4&240|a>>2),64!=s&&t(a<<6&192|s))}}(t,function(t){e+=String.fromCharCode(t)}),e}function Tr(t){this.f=t.sub,this.a=t.provider_id||t.firebase&&t.firebase.sign_in_provider||null,this.c=t.firebase&&t.firebase.tenant||null,this.b=!!t.is_anonymous||"anonymous"==this.a}function Er(t){return(t=kr(t))&&t.sub&&t.iss&&t.aud&&t.exp?new Tr(t):null}function kr(t){if(!t)return null;if(3!=(t=t.split(".")).length)return null;for(var e=(4-(t=t[1]).length%4)%4,n=0;n Auth section -> Sign in method tab.",t):"http"==i||"https"==i?n=Lt("This domain (%s) is not authorized to run this operation. Add it to the OAuth redirect domains list in the Firebase console -> Auth section -> Sign in method tab.",t):e="operation-not-supported-in-this-environment",Yi.call(this,e,n)}function So(t,e,n){Yi.call(this,t,n),(t=e||{}).Ab&&Mi(this,"email",t.Ab),t.ba&&Mi(this,"phoneNumber",t.ba),t.credential&&Mi(this,"credential",t.credential),t.Qb&&Mi(this,"tenantId",t.Qb)}function No(t){if(t.code){var e=t.code||"";0==e.indexOf($i)&&(e=e.substring($i.length));var n={credential:bo(t),Qb:t.tenantId};if(t.email)n.Ab=t.email;else if(t.phoneNumber)n.ba=t.phoneNumber;else if(!n.credential)return new Yi(e,t.message||void 0);return new So(e,n,t.message)}return null}function Oo(){}function _o(t){return t.c||(t.c=t.b())}function Po(){}function Ro(t){if(t.f||"undefined"!=typeof XMLHttpRequest||"undefined"==typeof ActiveXObject)return t.f;for(var e=["MSXML2.XMLHTTP.6.0","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP","Microsoft.XMLHTTP"],n=0;n=function t(e){return e.c?e.c:e.a?t(e.a):(O("Root logger has no level set."),null)}(this).value)for(m(e)&&(e=e()),t=new xo(t,String(e),this.f),n&&(t.a=n),n=this;n;)n=n.a};var qo,Ho={},Bo=null;function Go(t){var e;if(Bo||(Bo=new Mo(""),(Ho[""]=Bo).c=Fo),!(e=Ho[t])){e=new Mo(t);var n=t.lastIndexOf("."),i=t.substr(n+1);(n=Go(t.substr(0,n))).b||(n.b={}),(n.b[i]=e).a=n,Ho[t]=e}return e}function Wo(t,e){t&&t.log(Ko,e,void 0)}function Xo(t){this.f=t}function Jo(t){nn.call(this),this.o=t,this.readyState=Yo,this.status=0,this.responseType=this.responseText=this.response=this.statusText="",this.onreadystatechange=null,this.i=new Headers,this.b=null,this.m="GET",this.g="",this.a=!1,this.h=Go("goog.net.FetchXmlHttp"),this.l=this.c=this.f=null}k(Xo,Oo),Xo.prototype.a=function(){return new Jo(this.f)},Xo.prototype.b=(qo={},function(){return qo}),k(Jo,nn);var Yo=0;function zo(t){t.c.read().then(t.ec.bind(t)).catch(t.Ma.bind(t))}function $o(t,e){e&&t.f&&(t.status=t.f.status,t.statusText=t.f.statusText),t.readyState=4,t.f=null,t.c=null,t.l=null,Zo(t)}function Zo(t){t.onreadystatechange&&t.onreadystatechange.call(t)}function Qo(t){nn.call(this),this.headers=new ln,this.B=t||null,this.c=!1,this.w=this.a=null,this.h=this.O=this.l="",this.f=this.J=this.i=this.I=!1,this.g=0,this.o=null,this.m=ta,this.v=this.P=!1}(t=Jo.prototype).open=function(t,e){if(this.readyState!=Yo)throw this.abort(),Error("Error reopening a connection");this.m=t,this.g=e,this.readyState=1,Zo(this)},t.send=function(t){if(1!=this.readyState)throw this.abort(),Error("need to call open() first. ");this.a=!0;var e={headers:this.i,method:this.m,credentials:void 0,cache:void 0};t&&(e.body=t),this.o.fetch(new Request(this.g,e)).then(this.jc.bind(this),this.Ma.bind(this))},t.abort=function(){this.response=this.responseText="",this.i=new Headers,this.status=0,this.c&&this.c.cancel("Request was aborted."),1<=this.readyState&&this.a&&4!=this.readyState&&(this.a=!1,$o(this,!1)),this.readyState=Yo},t.jc=function(t){this.a&&(this.f=t,this.b||(this.b=t.headers,this.readyState=2,Zo(this)),this.a&&(this.readyState=3,Zo(this),this.a&&("arraybuffer"===this.responseType?t.arrayBuffer().then(this.hc.bind(this),this.Ma.bind(this)):void 0!==l.ReadableStream&&"body"in t?(this.response=this.responseText="",this.c=t.body.getReader(),this.l=new TextDecoder,zo(this)):t.text().then(this.ic.bind(this),this.Ma.bind(this)))))},t.ec=function(t){if(this.a){var e=this.l.decode(t.value?t.value:new Uint8Array(0),{stream:!t.done});e&&(this.response=this.responseText+=e),t.done?$o(this,!0):Zo(this),3==this.readyState&&zo(this)}},t.ic=function(t){this.a&&(this.response=this.responseText=t,$o(this,!0))},t.hc=function(t){this.a&&(this.response=t,$o(this,!0))},t.Ma=function(t){var e=this.h;e&&e.log(Vo,"Failed to fetch url "+this.g,t instanceof Error?t:Error(t)),this.a&&$o(this,!0)},t.setRequestHeader=function(t,e){this.i.append(t,e)},t.getResponseHeader=function(t){return this.b?this.b.get(t.toLowerCase())||"":((t=this.h)&&t.log(Vo,"Attempting to get response header but no headers have been received for url: "+this.g,void 0),"")},t.getAllResponseHeaders=function(){if(!this.b){var t=this.h;return t&&t.log(Vo,"Attempting to get all response headers but no headers have been received for url: "+this.g,void 0),""}t=[];for(var e=this.b.entries(),n=e.next();!n.done;)n=n.value,t.push(n[0]+": "+n[1]),n=e.next();return t.join("\r\n")},k(Qo,nn);var ta="";Qo.prototype.b=Go("goog.net.XhrIo");var ea=/^https?$/i,na=["POST","PUT"];function ia(e,t,n,i,r){if(e.a)throw Error("[goog.net.XhrIo] Object is active with another request="+e.l+"; newUri="+t);n=n?n.toUpperCase():"GET",e.l=t,e.h="",e.O=n,e.I=!1,e.c=!0,e.a=e.B?e.B.a():Eo.a(),e.w=e.B?_o(e.B):_o(Eo),e.a.onreadystatechange=I(e.Lb,e);try{Wo(e.b,fa(e,"Opening Xhr")),e.J=!0,e.a.open(n,String(t),!0),e.J=!1}catch(t){return Wo(e.b,fa(e,"Error opening Xhr: "+t.message)),void oa(e,t)}t=i||"";var o=new ln(e.headers);r&&function(t,e){if(t.forEach&&"function"==typeof t.forEach)t.forEach(e,void 0);else if(v(t)||h(t))M(t,e,void 0);else for(var n=hn(t),i=cn(t),r=i.length,o=0;o>>7|r<<25)^(r>>>18|r<<14)^r>>>3)|0,a=(0|n[e-7])+((i>>>17|i<<15)^(i>>>19|i<<13)^i>>>10)|0;n[e]=o+a|0}i=0|t.a[0],r=0|t.a[1];var s=0|t.a[2],u=0|t.a[3],c=0|t.a[4],h=0|t.a[5],l=0|t.a[6];for(o=0|t.a[7],e=0;e<64;e++){var f=((i>>>2|i<<30)^(i>>>13|i<<19)^(i>>>22|i<<10))+(i&r^i&s^r&s)|0;a=(o=o+((c>>>6|c<<26)^(c>>>11|c<<21)^(c>>>25|c<<7))|0)+((a=(a=c&h^~c&l)+(0|Pu[e])|0)+(0|n[e])|0)|0,o=l,l=h,h=c,c=u+a|0,u=s,s=r,r=i,i=a+f|0}t.a[0]=t.a[0]+i|0,t.a[1]=t.a[1]+r|0,t.a[2]=t.a[2]+s|0,t.a[3]=t.a[3]+u|0,t.a[4]=t.a[4]+c|0,t.a[5]=t.a[5]+h|0,t.a[6]=t.a[6]+l|0,t.a[7]=t.a[7]+o|0}function Fu(t,e,n){void 0===n&&(n=e.length);var i=0,r=t.c;if(h(e))for(;i>r&255;return function(t){return j(t,function(t){return 1<(t=t.toString(16)).length?t:"0"+t}).join("")}(t)}function Xu(t,e){for(var n=0;nt.f&&(t.a=t.f),e)}function Ac(t){this.f=t,this.b=this.a=null,this.c=0}function Sc(t,e){var n=e[Da],i=e.refreshToken;e=Nc(e.expiresIn),t.b=n,t.c=e,t.a=i}function Nc(t){return E()+1e3*parseInt(t,10)}function Oc(e,t){return function(t,i){return new qt(function(e,n){"refresh_token"==i.grant_type&&i.refresh_token||"authorization_code"==i.grant_type&&i.code?Va(t,t.l+"?key="+encodeURIComponent(t.c),function(t){t?t.error?n(_s(t)):t.access_token&&t.refresh_token?e(t):n(new Yi("internal-error")):n(new Yi("network-request-failed"))},"POST",Cn(i).toString(),t.g,t.u.get()):n(new Yi("internal-error"))})}(e.f,t).then(function(t){return e.b=t.access_token,e.c=Nc(t.expires_in),e.a=t.refresh_token,{accessToken:e.b,expirationTime:e.c,refreshToken:e.a}}).s(function(t){throw"auth/user-token-expired"==t.code&&(e.a=null),t})}function _c(t,e){this.a=t||null,this.b=e||null,ji(this,{lastSignInTime:Pi(e||null),creationTime:Pi(t||null)})}function Pc(t,e,n,i,r,o){ji(this,{uid:t,displayName:i||null,photoURL:r||null,email:n||null,phoneNumber:o||null,providerId:e})}function Rc(t,e){for(var n in De.call(this,t),e)this[n]=e[n]}function Dc(t,e,n){this.I=[],this.l=t.apiKey,this.m=t.appName,this.o=t.authDomain||null,t=fl.SDK_VERSION?pi(fl.SDK_VERSION):null,this.a=new Pa(this.l,Nr(Ar),t),this.b=new Ac(this.a),Vc(this,e[Da]),Sc(this.b,e),Mi(this,"refreshToken",this.b.a),qc(this,n||{}),nn.call(this),this.J=!1,this.o&&bi()&&(this.i=fc(this.o,this.l,this.m)),this.O=[],this.h=null,this.w=function(e){return new Ec(function(){return e.G(!0)},function(t){return!(!t||"auth/network-request-failed"!=t.code)},function(){var t=e.b.c-E()-3e5;return 0this.c-3e4?this.a?Oc(this,{grant_type:"refresh_token",refresh_token:this.a}):Yt(null):Yt({accessToken:this.b,expirationTime:this.c,refreshToken:this.a})},_c.prototype.A=function(){return{lastLoginAt:this.b,createdAt:this.a}},k(Rc,De),k(Dc,nn),Dc.prototype.sa=function(t){this.ga=t,ja(this.a,t)},Dc.prototype.ha=function(){return this.ga},Dc.prototype.Aa=function(){return H(this.P)},Dc.prototype.Ha=function(){this.w.b&&(this.w.stop(),this.w.start())},Mi(Dc.prototype,"providerId","firebase"),(t=Dc.prototype).reload=function(){var t=this;return rh(this,Bc(this).then(function(){return zc(t).then(function(){return Fc(t)}).then(Hc)}))},t.dc=function(t){return this.G(t).then(function(t){return new Tc(t)})},t.G=function(t){var e=this;return rh(this,Bc(this).then(function(){return e.b.getToken(t)}).then(function(t){if(!t)throw new Yi("internal-error");return t.accessToken!=e.ma&&(Vc(e,t.accessToken),e.dispatchEvent(new Rc("tokenChanged"))),Jc(e,"refreshToken",t.refreshToken),t.accessToken}))},t.zc=function(t){if(!(t=t.users)||!t.length)throw new Yi("internal-error");qc(this,{uid:(t=t[0]).localId,displayName:t.displayName,photoURL:t.photoUrl,email:t.email,emailVerified:!!t.emailVerified,phoneNumber:t.phoneNumber,lastLoginAt:t.lastLoginAt,createdAt:t.createdAt,tenantId:t.tenantId});for(var e=function(t){return(t=t.providerUserInfo)&&t.length?j(t,function(t){return new Pc(t.rawId,t.providerId,t.email,t.displayName,t.photoUrl,t.phoneNumber)}):[]}(t),n=0;n=Qh.length)throw new Yi("internal-error","Argument validator received an unsupported number of arguments.");n=Qh[r],i=(i?"":n+" argument ")+(e.name?'"'+e.name+'" ':"")+"must be "+e.M+".";break t}i=null}}if(i)throw new Yi("argument-error",t+" failed: "+i)}(t=Hh.prototype).Ba=function(){var e=this;return this.f?this.f:this.f=Yh(this,Yt().then(function(){if(yi()&&!si())return ri();throw new Yi("operation-not-supported-in-this-environment","RecaptchaVerifier is only supported in a browser HTTP/HTTPS environment.")}).then(function(){return e.m.g(e.v())}).then(function(t){return e.g=t,Ns(e.o,ds,{})}).then(function(t){e.a[Wh]=t.recaptchaSiteKey}).s(function(t){throw e.f=null,t}))},t.render=function(){zh(this);var n=this;return Yh(this,this.Ba().then(function(){if(null===n.c){var t=n.u;if(!n.i){var e=Fn(t);t=Hn("DIV"),e.appendChild(t)}n.c=n.g.render(t,n.a)}return n.c}))},t.verify=function(){zh(this);var r=this;return Yh(this,this.render().then(function(i){return new qt(function(e){var t=r.g.getResponse(i);if(t)e(t);else{var n=function(t){t&&(function(t,e){K(t.l,function(t){return t==e})}(r,n),e(t))};r.l.push(n),r.i&&r.g.execute(r.c)}})}))},t.reset=function(){zh(this),null!==this.c&&this.g.reset(this.c)},t.clear=function(){zh(this),this.B=!0,this.m.c();for(var t=0;t { const editLinks = document.querySelectorAll('.prc-block-area__edit-link'); editLinks.forEach((editLink) => { const a = editLink.querySelector('a'); a.addEventListener('mouseover', () => { const area = editLink.closest('.prc-block-area'); area.classList.add('editor-link-is-hovering'); }); a.addEventListener('mouseout', () => { const area = editLink.closest('.prc-block-area'); area.classList.remove('editor-link-is-hovering'); }); }); }, false, ); ; /*! This file is auto-generated */ !function(){"use strict";var n={d:function(t,r){for(var e in r)n.o(r,e)&&!n.o(t,e)&&Object.defineProperty(t,e,{enumerable:!0,get:r[e]})},o:function(n,t){return Object.prototype.hasOwnProperty.call(n,t)},r:function(n){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"__esModule",{value:!0})}},t={};n.r(t),n.d(t,{actions:function(){return S},addAction:function(){return m},addFilter:function(){return p},applyFilters:function(){return k},createHooks:function(){return f},currentAction:function(){return w},currentFilter:function(){return I},defaultHooks:function(){return h},didAction:function(){return O},didFilter:function(){return j},doAction:function(){return b},doingAction:function(){return x},doingFilter:function(){return T},filters:function(){return z},hasAction:function(){return _},hasFilter:function(){return y},removeAction:function(){return A},removeAllActions:function(){return F},removeAllFilters:function(){return g},removeFilter:function(){return v}});var r=function(n){return"string"!=typeof n||""===n?(console.error("The namespace must be a non-empty string."),!1):!!/^[a-zA-Z][a-zA-Z0-9_.\-\/]*$/.test(n)||(console.error("The namespace can only contain numbers, letters, dashes, periods, underscores and slashes."),!1)};var e=function(n){return"string"!=typeof n||""===n?(console.error("The hook name must be a non-empty string."),!1):/^__/.test(n)?(console.error("The hook name cannot begin with `__`."),!1):!!/^[a-zA-Z][a-zA-Z0-9_.-]*$/.test(n)||(console.error("The hook name can only contain numbers, letters, dashes, periods and underscores."),!1)};var o=function(n,t){return function(o,i,c,s=10){const u=n[t];if(!e(o))return;if(!r(i))return;if("function"!=typeof c)return void console.error("The hook callback must be a function.");if("number"!=typeof s)return void console.error("If specified, the hook priority must be a number.");const l={callback:c,priority:s,namespace:i};if(u[o]){const n=u[o].handlers;let t;for(t=n.length;t>0&&!(s>=n[t-1].priority);t--);t===n.length?n[t]=l:n.splice(t,0,l),u.__current.forEach((n=>{n.name===o&&n.currentIndex>=t&&n.currentIndex++}))}else u[o]={handlers:[l],runs:0};"hookAdded"!==o&&n.doAction("hookAdded",o,i,c,s)}};var i=function(n,t,o=!1){return function(i,c){const s=n[t];if(!e(i))return;if(!o&&!r(c))return;if(!s[i])return 0;let u=0;if(o)u=s[i].handlers.length,s[i]={runs:s[i].runs,handlers:[]};else{const n=s[i].handlers;for(let t=n.length-1;t>=0;t--)n[t].namespace===c&&(n.splice(t,1),u++,s.__current.forEach((n=>{n.name===i&&n.currentIndex>=t&&n.currentIndex--})))}return"hookRemoved"!==i&&n.doAction("hookRemoved",i,c),u}};var c=function(n,t){return function(r,e){const o=n[t];return void 0!==e?r in o&&o[r].handlers.some((n=>n.namespace===e)):r in o}};var s=function(n,t,r=!1){return function(e,...o){const i=n[t];i[e]||(i[e]={handlers:[],runs:0}),i[e].runs++;const c=i[e].handlers;if(!c||!c.length)return r?o[0]:void 0;const s={name:e,currentIndex:0};for(i.__current.push(s);s.currentIndex